tab-trail 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/README.md +25 -16
- package/data/api.json +8 -0
- package/data/features.json +48 -1
- package/data/limits.json +1 -1
- package/dist/index.mjs +9 -9
- package/dist/tab-trail.js +541 -19
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export const VERSION = "1.
|
|
2
|
-
export const UPDATED = "
|
|
3
|
-
export const CODE = "\n/* Tab trail 1.0.0. Copyright (c) 2026 Matjaž Korošec. MIT License, full text: https://github.com/matjazkorosec/tab-trail/blob/main/LICENSE */\nvar VERSION = \"1.0.0\";\nvar ID = \"tab-trail-host\";\nvar prev = [].filter.call(document.querySelectorAll(\"[id='\" + ID + \"']\"), function (e) { return typeof e.__close === \"function\"; })[0];\nif (prev) { prev.__close(); return; }\nvar NS = \"http://www.w3.org/2000/svg\";\nvar FOCUSABLE = \"a[href],area[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[contenteditable]:not([contenteditable='false']),[tabindex]\";\nvar ROLES = /^(button|link|tab|menuitem|menuitemcheckbox|menuitemradio|checkbox|radio|switch|option|combobox|slider|treeitem)$/;\n\nfunction walk(root, out) {\n var kids = root.children;\n for (var i = 0; i < kids.length; i++) visit(kids[i], out);\n return out;\n}\nfunction visit(el, out) {\n if (el.id === ID && el === host && (!skip || skip.checked)) return;\n if (!(host && el.getRootNode() === host.shadowRoot && (!panel.contains(el) || (logList && logList.contains(el))))) out.push(el);\n if (el.shadowRoot) return walk(el.shadowRoot, out);\n if (el.tagName === \"SLOT\" && el.assignedElements) {\n var got = el.assignedElements({ flatten: true });\n if (got.length) {\n for (var i = 0; i < got.length; i++) visit(got[i], out);\n return;\n }\n }\n walk(el, out);\n}\nfunction shown(el) {\n if (el.checkVisibility) return el.checkVisibility({ visibilityProperty: true, opacityProperty: false });\n var s = getComputedStyle(el);\n return s.display !== \"none\" && s.visibility !== \"hidden\" && el.getClientRects().length > 0;\n}\nfunction tabbable(el) {\n if (!el.matches(FOCUSABLE)) return false;\n if (el.tabIndex < 0 || el.matches(\":disabled\") || el.closest(\"[inert]\")) return false;\n if (el.tagName === \"INPUT\" && el.type === \"hidden\") return false;\n if (el.tagName === \"SUMMARY\" && (!el.parentElement || el.parentElement.tagName !== \"DETAILS\" || el.parentElement.querySelector(\"summary\") !== el)) return false;\n return shown(el);\n}\n\nvar stops = [], stopSet = new Set(), upSet = new Set(), missed = [], forced = [], forcedBad = [], domAt = new Map();\nvar GROUP = \"[role=tablist],[role=menu],[role=menubar],[role=listbox],[role=radiogroup],[role=grid],[role=treegrid],[role=tree],[role=toolbar]\";\nvar ITEM = /^(tab|menuitem|menuitemcheckbox|menuitemradio|option|radio|gridcell|row|treeitem)$/;\nfunction nearTab(el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (stopSet.has(p)) return true;\n return upSet.has(el);\n}\nfunction roving(el) {\n var g = el.closest(GROUP);\n if (!g || (!ITEM.test(el.getAttribute(\"role\") || \"\") && !(el.hasAttribute(\"tabindex\") && el.tabIndex < 0))) return false;\n if (stopSet.has(g) || upSet.has(g)) return true;\n var id = g.id;\n return !!id && stops.some(function (s) { return (\" \" + (s.getAttribute(\"aria-controls\") || \"\") + \" \" + (s.getAttribute(\"aria-owns\") || \"\") + \" \").indexOf(\" \" + id + \" \") >= 0; });\n}\nfunction modal() {\n try {\n var l = document.querySelectorAll(\"dialog:modal\");\n return l.length ? l[l.length - 1] : null;\n } catch (e) { return null; }\n}\nfunction within(m, e) {\n for (var n = e; n; n = n.parentNode || n.host) if (n === m) return true;\n return false;\n}\nfunction scan() {\n var all = walk(document, []);\n var top = modal();\n if (top) all = all.filter(function (e) { return within(top, e); });\n var found = all.filter(tabbable);\n var groups = new Map();\n found = found.filter(function (el) {\n if (el.tagName !== \"INPUT\" || el.type !== \"radio\" || !el.name) return true;\n var own = el.form || el.getRootNode(), byName = groups.get(own) || {};\n groups.set(own, byName);\n var g = byName[el.name] || (byName[el.name] = found.filter(function (x) { return x.tagName === \"INPUT\" && x.type === \"radio\" && x.name === el.name && (x.form || x.getRootNode()) === own; }));\n var picked = g.filter(function (x) { return x.checked; })[0] || g[0];\n return picked === el;\n });\n forced = found.filter(function (el) { return el.tabIndex > 0 && !(host && el.getRootNode() === host.shadowRoot); });\n stops = ordered(document, found, null);\n domAt = new Map();\n forced.forEach(function (f) { domAt.set(f, forced.length > 30 ? found.indexOf(f) : ordered(document, found, f).indexOf(f)); });\n forcedBad = forced.filter(function (f) { return domAt.get(f) !== stops.indexOf(f); });\n stopSet = new Set(stops);\n upSet = new Set();\n stops.forEach(function (s) {\n for (var p = s.parentElement; p && !upSet.has(p); p = p.parentElement) upSet.add(p);\n });\n var ids = document.querySelectorAll(\"[id='\" + ID + \"']\"), only = !ids.length || (ids.length === 1 && ids[0] === host);\n var miss = all.filter(function (el) {\n if (stopSet.has(el) || (only ? el === host : el.closest(\"#\" + ID)) || (host && el.getRootNode() === host.shadowRoot)) return false;\n var t = el.tagName;\n if (t === \"HTML\" || t === \"BODY\" || t === \"LABEL\" || t === \"OPTION\" || t === \"OPTGROUP\") return false;\n var role = el.getAttribute(\"role\") || \"\";\n var looks = el.hasAttribute(\"onclick\") || ROLES.test(role);\n var s = getComputedStyle(el);\n if (s.pointerEvents === \"none\") return false;\n if (!looks) {\n if (s.cursor !== \"pointer\") return false;\n var ps = el.parentElement && getComputedStyle(el.parentElement);\n if (ps && ps.cursor === \"pointer\") return false;\n }\n if (el.closest(\"label\") || el.matches(\":disabled\") || el.closest(\"[inert]\") || el.closest(\"[aria-disabled='true']\")) return false;\n if (!shown(el)) return false;\n var r = el.getBoundingClientRect();\n if (r.width < 8 || r.height < 8) return false;\n return !nearTab(el) && !roving(el);\n });\n var missSet = new Set(miss);\n missed = miss.filter(function (el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (missSet.has(p)) return false;\n return true;\n });\n hoverScan();\n}\nfunction ordered(scope, list, flat) {\n var units = [], groups = new Map(), out = [];\n list.forEach(function (el) {\n var h = el;\n while (h.getRootNode() !== scope && h.getRootNode().host) h = h.getRootNode().host;\n if (h === el) return units.push({ k: el === flat ? 0 : el.tabIndex, el: el });\n var g = groups.get(h);\n if (!g) {\n g = { k: h.hasAttribute(\"tabindex\") && h !== flat ? Math.max(h.tabIndex, 0) : 0, host: h, els: [] };\n groups.set(h, g);\n units.push(g);\n }\n g.els.push(el);\n });\n units.filter(function (u) { return u.k > 0; }).sort(function (a, b) { return a.k - b.k; }).concat(units.filter(function (u) { return u.k <= 0; })).forEach(function (u) {\n if (u.host) out = out.concat(ordered(u.host.shadowRoot, u.els, flat));\n else out.push(u.el);\n });\n return out;\n}\nvar hovers = [], hoverOk = [], hovRule = new Map(), hovSeen = new Set(), hovHid = new Map(), tabOpens = new WeakSet();\nfunction hoverTry(s) {\n var hit = false;\n hovers.forEach(function (h) {\n var e = hovHid.get(h);\n if (e && within(h, s) && !within(e, s) && !hiddenNow(e)) {\n tabOpens.add(h);\n hit = true;\n }\n });\n if (hit) rescan();\n}\nvar HOVER = \":hover\", FOC = \":focus-within|:focus-visible|:focus\";\nfunction parts(sel) {\n var out = [], depth = 0, start = 0;\n for (var i = 0; i < sel.length; i++) {\n var ch = sel.charAt(i);\n if (ch === \"(\") depth++;\n else if (ch === \")\") depth--;\n else if (ch === \",\" && !depth) { out.push(sel.slice(start, i).trim()); start = i + 1; }\n }\n out.push(sel.slice(start).trim());\n return out;\n}\nfunction bare(sel, re) {\n return sel.replace(new RegExp(\"(^|[\\\\s>+~(])(\" + re + \")\", \"g\"), \"$1*\").replace(new RegExp(re, \"g\"), \"\");\n}\nfunction reveals(st) {\n var d = st.getPropertyValue(\"display\"), v = st.getPropertyValue(\"visibility\"), o = st.getPropertyValue(\"opacity\"), mh = st.getPropertyValue(\"max-height\");\n return (d !== \"\" && d !== \"none\") || v === \"visible\" || (o !== \"\" && parseFloat(o) > 0) || (mh !== \"\" && mh !== \"0\" && mh !== \"0px\");\n}\nvar cssRules = 0, cssSheets = 0, cssBlocked = [];\nfunction nest(sel, up) {\n if (!up) return sel;\n return parts(sel).map(function (q) { return q.indexOf(\"&\") >= 0 ? q.split(\"&\").join(\":is(\" + up + \")\") : \":is(\" + up + \") \" + q; }).join(\", \");\n}\nfunction depth(p, k) {\n var d = 0;\n for (var i = 0; i < k; i++) {\n var ch = p.charAt(i);\n if (ch === \"\\\\\") i++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n }\n return d;\n}\nfunction compound(p, k) {\n var d = 0, i = k - 1;\n for (; i >= 0; i--) {\n var ch = p.charAt(i);\n if (i > 0 && p.charAt(i - 1) === \"\\\\\") {\n i--;\n continue;\n }\n if (ch === \")\") d++;\n else if (ch === \"(\") {\n if (!d) break;\n d--;\n } else if (!d && /[\\s>+~,]/.test(ch)) break;\n }\n var c = p.slice(i + 1, k).trim();\n return c ? bare(c, HOVER) : \"\";\n}\nfunction selfFocus(p) {\n var m = p.match(new RegExp(FOC)), k = m ? m.index + m[0].length : -1;\n if (k < 0 || depth(p, k)) return false;\n for (var d = 0; k < p.length; k++) {\n var ch = p.charAt(k);\n if (ch === \"\\\\\") k++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n else if (!d && /[\\s>+~]/.test(ch)) return false;\n }\n return true;\n}\nvar sheetMemo = new WeakMap();\nfunction readRules() {\n var hov = [], foc = [];\n cssRules = 0;\n cssSheets = 0;\n cssBlocked = [];\n function take(sel, src) {\n parts(sel).forEach(function (p) {\n if (/:focus/.test(p)) return foc.push([bare(p, FOC), selfFocus(p)]);\n var k = p.indexOf(HOVER), on;\n if (k < 0) return;\n if (depth(p, k)) on = compound(p, k);\n else {\n var pre = p.slice(0, k);\n if (!pre.trim() || /[\\s>+~]$/.test(pre)) return;\n on = bare(pre, HOVER);\n }\n if (on) hov.push([bare(p, HOVER), on, p, src]);\n });\n }\n function go(list, src, up) {\n for (var i = 0; i < list.length; i++) {\n var r = list[i], sel = up, st = null;\n if (r.selectorText !== undefined) {\n sel = nest(r.selectorText, up);\n st = r.style;\n } else if (up && r.style && !r.cssRules) st = r.style;\n if (st) {\n cssRules++;\n if (/:hover|:focus/.test(sel) && reveals(st)) take(sel, src);\n }\n if (r.cssRules && r.cssRules.length) go(r.cssRules, src, sel);\n }\n }\n var sheets = Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets || []);\n sheets.forEach(function (sh) {\n var list;\n try { list = sh.cssRules; } catch (e) { return cssBlocked.push(sh.href || \"a style sheet\"); }\n var memo = sheetMemo.get(sh);\n if (!memo || memo.list !== list || memo.n !== list.length || memo.node !== sh.ownerNode) {\n var h0 = hov, f0 = foc, c0 = cssRules;\n hov = [];\n foc = [];\n cssRules = 0;\n try { go(list, sh.href || (sh.ownerNode ? \"an inline <style> in the page\" : \"a style sheet added by script\"), \"\"); } catch (e) {\n hov = h0;\n foc = f0;\n cssRules = c0;\n return cssBlocked.push(sh.href || \"a style sheet\");\n }\n memo = { list: list, n: list.length, node: sh.ownerNode, hov: hov, foc: foc, rules: cssRules };\n sheetMemo.set(sh, memo);\n hov = h0;\n foc = f0;\n cssRules = c0;\n }\n hov = hov.concat(memo.hov);\n foc = foc.concat(memo.foc);\n cssRules += memo.rules;\n cssSheets++;\n });\n return [hov, foc];\n}\nfunction hiddenNow(e) {\n return !shown(e) || getComputedStyle(e).opacity === \"0\" || e.getBoundingClientRect().height < 1;\n}\nfunction hoverScan() {\n var rr = readRules(), foc = rr[1], found = [], seenH = new Set(), ok = [], top = modal();\n hovRule = new Map();\n hovSeen = new Set();\n rr[0].forEach(function (h) {\n var list;\n try { list = document.querySelectorAll(h[0]); } catch (e) { return; }\n for (var i = 0; i < list.length; i++) {\n var e = list[i], host = null;\n if (!hiddenNow(e) || (!e.matches(FOCUSABLE) && !e.querySelector(FOCUSABLE))) continue;\n try { host = e.parentElement && e.parentElement.closest(h[1]); } catch (x) {}\n if (!host || host === document.body || host === document.documentElement || seenH.has(host) || !shown(host) || (top && !within(top, host))) continue;\n if (host.matches(\"[aria-expanded],[aria-haspopup]\") || host.querySelector(\"[aria-expanded],[aria-haspopup]\")) {\n ok.push([host, \"toggle\"]);\n continue;\n }\n if (foc.some(function (f) { try { return (!f[1] || shown(e)) && e.matches(f[0]); } catch (x) { return false; } })) {\n ok.push([host, \"focus\"]);\n continue;\n }\n if (tabOpens.has(host)) {\n ok.push([host, \"tab\"]);\n continue;\n }\n found.push(host);\n seenH.add(host);\n hovHid.set(host, e);\n hovRule.set(host, [h[2], h[3]]);\n if (shown(e) && stops.some(function (s) { return e.contains(s); })) hovSeen.add(host);\n }\n });\n hovers = found;\n hoverOk = ok.filter(function (o) { return !seenH.has(o[0]); });\n}\nscan();\n\nvar host = document.createElement(\"div\");\nhost.id = ID;\nhost.style.cssText = \"all:initial;position:absolute;left:0;top:0;width:0;height:0;overflow:visible;z-index:2147483647;pointer-events:none;\";\nvar root = host.attachShadow({ mode: \"open\" });\nvar style = document.createElement(\"style\");\nstyle.textContent = [\n \":host{all:initial}\",\n \"svg{position:fixed;inset:0;width:100vw;height:100vh;overflow:visible}\",\n \"svg.pg{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible}\",\n \".p{position:fixed;bottom:66px;right:66px;width:350px;box-sizing:border-box;padding:6px;background:#e4dccd;color:#1a1612;border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.12),0 14px 34px rgba(0,0,0,.26);font:14px/1.45 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;pointer-events:auto;cursor:grab;overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 90px);overscroll-behavior:contain}\",\n \".tb{display:flex;align-items:center;gap:4px;padding:0 0 5px 4px}\",\n \".t{margin:0;flex:1;white-space:nowrap;font:700 17px/1.2 Georgia,serif;letter-spacing:-.01em}\",\n \".cd{margin:4px 0 0;padding:7px 10px;background:#fbf8f3;border-radius:10px}\",\n \".tb+.cd{margin-top:0}\",\n \".p.rm{padding:10px}\",\n \".rm .tb{gap:6px;padding:4px 2px 8px 6px}\",\n \".rm .t{font-size:19px}\",\n \".rm .cd{margin-top:6px;padding:12px 14px}\",\n \".rm .tb+.cd{margin-top:0}\",\n \".rm .ta{height:32px;padding:0 12px 0 10px}\",\n \".rm .n{gap:7px;margin-top:12px}\",\n \".rm .n b{font-size:22px}\",\n \".rm .k{margin-top:7px}\",\n \".rm .x,.rm .b.cn{width:32px;height:32px}\",\n \".rm .sec{margin-top:6px}\",\n \".rm .sg{min-height:46px;padding:0 12px 0 8px}\",\n \".rm .ic{width:30px;height:30px;border-radius:8px}\",\n \".rm .so,.rm .lbd,.rm .la{padding:2px 14px 14px}\",\n \".rm .hw{margin:10px 6px 2px}\",\n \".rm .m{margin-top:8px;gap:6px}\",\n \".rm .c{padding:6px 10px}\",\n \".rm .pr{margin-top:12px}\",\n \".rm .pl{height:30px;padding:0 14px 0 11px}\",\n \".rm .b{width:30px;height:30px}\",\n \".rm .lf{margin-top:10px}\",\n \".rm .lt{padding:3px 9px}\",\n \".rm .ll{margin:10px -14px 0}\",\n \".rm .lx{padding:6px 14px}\",\n \".rm .lr.lb2{gap:6px;margin-top:12px}\",\n \".rm .kl,.rm .ka{height:38px;border-radius:8px}\",\n \".rm .lnt{height:38px;border-radius:8px}\",\n \".rm .lck,.rm .lw,.rm .sm,.rm .lr{margin-top:10px}\",\n \".rm .lrt{margin-top:0}\",\n \".rm .gp .k,.rm .lgp .k{margin-top:10px}\",\n \".rm .mn{margin-top:12px}\",\n \".rm .so>.k:first-child,.rm .lbd>:first-child,.rm .la>:first-child,.rm .cd>:first-child,.rm .cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>:first-child,.cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>div:empty{display:none}\",\n \".ta{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px 0 8px;border:1.5px solid #1a1612;border-radius:999px;background:#fbf8f3;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer;flex:none}\",\n \".ta:hover{background:#fff}\",\n \".ta:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".n{display:flex;align-items:baseline;gap:6px;margin:5px 0 0}\",\n \".n b{font:700 20px/1 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;letter-spacing:-.02em;font-variant-numeric:tabular-nums}\",\n \".k{display:flex;align-items:center;gap:10px;margin:4px 0 0;font-size:14px}\",\n \".d{width:16px;height:16px;border-radius:50%;background:#1a1612;box-shadow:0 0 0 2px #fff inset,0 0 0 1px #1a1612;flex:none}\",\n \".r{width:16px;height:12px;box-sizing:border-box;border:2px dashed #d0103a;border-radius:2px;background:rgba(208,16,58,.12);flex:none}\",\n \".x{width:28px;height:28px;flex:none;padding:0;border:0;border-radius:50%;background:transparent;color:#1a1612;cursor:pointer;display:grid;place-items:center}\",\n \".p svg{display:block;position:static;inset:auto;width:auto;height:auto;overflow:hidden;flex:none}\",\n \".x:hover{background:rgba(26,22,18,.08)}\",\n \".b.cn{width:28px;height:28px}\",\n \".sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\",\n \".x:focus-visible,.a:focus-visible,.sg:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".sec{margin:4px 0 0;background:#fbf8f3;border-radius:10px}\",\n \".sg{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:32px;padding:0 9px 0 5px;border-radius:10px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".sg:hover{background:#fff}\",\n \".ic{width:22px;height:22px;border-radius:6px;background:#efe8dc;display:grid;place-items:center;flex:none}\",\n \".sg[aria-expanded=true] .ic{background:#1a1612;color:#fbf8f3}\",\n \".warn .ic{background:rgba(208,16,58,.12);color:#d0103a}\",\n \".warn .sg[aria-expanded=true] .ic{background:#d0103a;color:#fff}\",\n \".bg{margin-left:auto;padding:2px 8px;border-radius:999px;background:#d0103a;color:#fff;font-weight:700;line-height:1.3}\",\n \".bg:empty{display:none}\",\n \".bg:not(:empty)+i{margin-left:12px}\",\n \".sg i{margin-left:auto;width:7px;height:7px;border-right:2px solid #1a1612;border-bottom:2px solid #1a1612;transform:translate(-3px,-2px) rotate(45deg)}\",\n \".sg[aria-expanded=true] i{transform:translate(-3px,2px) rotate(225deg)}\",\n \".so,.lbd,.la{padding:1px 10px 8px}\",\n \".lbd{overflow:hidden}\",\n \".so>.k:first-child,.lbd>:first-child,.la>:first-child{margin-top:0}\",\n \".so[hidden]{display:none}\",\n \".hw{margin:5px 4px 0;color:#5f564c;font-size:11px;line-height:1.3;font-weight:600}\",\n \".a{color:#5f564c;font-size:13px;font-weight:400;text-decoration:none;white-space:nowrap}\",\n \".vr{float:right;margin-left:8px;color:#5f564c;font-weight:400}\",\n \".hw+.hw{margin-top:4px}\",\n \".mn{margin:6px 0 0;color:#1e3a8a}\",\n \".a:hover{color:#9a3412;text-decoration:underline}\",\n \".p.g{cursor:grabbing;user-select:none}\",\n \".n b.e{color:#d0103a}\",\n \".n b.ok{color:#1f7a3f}\",\n \".s{cursor:pointer}\",\n \"svg.in{z-index:1}\",\n \"g.o{pointer-events:auto;cursor:pointer;-webkit-user-select:none;user-select:none}\",\n \".s input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".s.off{opacity:.45;cursor:default}\",\n \".s.off input{cursor:default}\",\n \".s input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".h{width:16px;height:16px;border-radius:50%;background:#fff;border:2px dashed #1a1612;box-sizing:border-box;flex:none}\",\n \".m{list-style:none;margin:5px 0 0;padding:2px;display:flex;flex-wrap:wrap;gap:4px}\",\n \".c{all:unset;font:inherit;font-size:14px;line-height:1;cursor:pointer;padding:4px 8px;border:1px dashed #d0103a;border-radius:999px;background:rgba(208,16,58,.06);color:#1a1612}\",\n \".c:hover{background:rgba(208,16,58,.14)}\",\n \".c[aria-pressed=true]{border-style:solid;background:#d0103a;color:#fff}\",\n \".c:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".gp[hidden]{display:none}\",\n \".gp .k,.lgp .k{margin:6px 0 0}\",\n \".w{display:flex;align-items:center;gap:8px;margin:0;font-size:14px}\",\n \".w span{flex:1;font-variant-numeric:tabular-nums}\",\n \".b{all:unset;box-sizing:border-box;width:28px;height:28px;border:1.5px solid #1a1612;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#1a1612;flex:none}\",\n \".b:hover{background:rgba(26,22,18,.08)}\",\n \".b:disabled{opacity:.3;cursor:default;background:none}\",\n \".b:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".pr{display:flex;align-items:center;gap:10px;margin:6px 0 0;font-size:14px;color:#5f564c}\",\n \".pr+.pr{margin-top:8px}\",\n \".pr .lo{display:inline-flex;align-items:center;height:30px;color:#1a1612}\",\n \".sm{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".sm[hidden]{display:none}\",\n \".sm .g{color:#1f7a3f;font-weight:600}\",\n \".sm .e{color:#d0103a;font-weight:700}\",\n \".sm .q{color:#5f564c;font-weight:400}\",\n \".m .mo{align-self:center;color:#5f564c;font-size:14px}\",\n \".pl{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 13px 0 10px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer;flex:none}\",\n \".pl:hover{background:#3a332c}\",\n \".pl:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".ls{font-weight:400;color:#5f564c}\",\n \".lv{color:#d0103a;font-weight:700}\",\n \".lbd[hidden],.la[hidden],.lm[hidden]{display:none}\",\n \".lf{display:grid;grid-template-columns:1fr 1fr;gap:2px;margin:6px 0 0;padding:3px;background:#efe8dc;border-radius:10px}\",\n \".lt{all:unset;box-sizing:border-box;text-align:center;padding:2px 9px;border-radius:7px;color:#5f564c;font-weight:600;font-size:14px;line-height:1.3;cursor:pointer}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".ll{list-style:none;margin:6px -10px 0;padding:0;cursor:auto}\",\n \".lx{padding:3px 10px}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".lx .tm{margin-right:8px;font:500 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".lx .st{font:700 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\",\n \".lx .bd{display:block}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{all:unset;box-sizing:border-box;display:inline-block;min-width:22px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;font-size:14px;line-height:1.4;text-align:center;cursor:pointer}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\",\n \".lr{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 0}\",\n \".lrt{margin:0}\",\n \".lr.lb2{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}\",\n \".kl,.ka{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:30px;border-radius:7px;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer}\",\n \".kl{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover{background:#efe8dc}\",\n \".ka{background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".kl:focus-visible,.ka:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lnt{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:30px;border:1.5px dashed #1a1612;border-radius:7px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lnt:hover{border-style:solid;background:#fff}\",\n \".lnt:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lk{all:unset;box-sizing:border-box;padding:5px 13px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lk:hover{background:#3a332c}\",\n \".lo{all:unset;box-sizing:border-box;padding:4px 12px;border:1.5px solid #1a1612;border-radius:999px;font-weight:600;font-size:14px;cursor:pointer}\",\n \".lo:hover{background:rgba(26,22,18,.08)}\",\n \".lt:focus-visible,.lc:focus-visible,.lk:focus-visible,.lo:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".la p,.lm{margin:8px 0 0}\",\n \".lck{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:flex;align-items:center;gap:8px;margin:6px 0 0;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lm{color:#d0103a}\"\n].join(\"\");\ntry {\n var sheet = new CSSStyleSheet();\n sheet.replaceSync(style.textContent);\n root.adoptedStyleSheets = [sheet];\n} catch (e) {\n root.appendChild(style);\n}\nvar spot = document.createElementNS(NS, \"svg\");\nroot.appendChild(spot);\nvar underPg = document.createElementNS(NS, \"svg\");\nunderPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(underPg);\nvar svgPg = document.createElementNS(NS, \"svg\");\nsvgPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(svgPg);\nvar under = document.createElementNS(NS, \"svg\");\nroot.appendChild(under);\nvar svg = document.createElementNS(NS, \"svg\");\nroot.appendChild(svg);\nvar dotPg = document.createElementNS(NS, \"svg\");\ndotPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(dotPg);\nvar dot = document.createElementNS(NS, \"svg\");\nroot.appendChild(dot);\n[spot, underPg, svgPg, under, svg, dotPg, dot].forEach(function (g) { g.setAttribute(\"aria-hidden\", \"true\"); });\n\nvar panel = document.createElement(\"div\");\npanel.className = \"p\";\npanel.setAttribute(\"role\", \"dialog\");\npanel.setAttribute(\"aria-label\", \"Tab trail\");\nfunction line(cls, bold, text, mark) {\n var p = document.createElement(\"p\");\n p.className = cls;\n if (mark) { var m = document.createElement(\"span\"); m.className = mark; p.appendChild(m); }\n if (bold !== null) { var b = document.createElement(\"b\"); b.textContent = bold; p.appendChild(b); }\n p.appendChild(document.createTextNode(text));\n panel.appendChild(p);\n return p;\n}\nvar x = document.createElement(\"button\");\nx.className = \"x\";\nx.type = \"button\";\nx.setAttribute(\"aria-label\", \"Close Tab trail\");\nfunction icon(parent, w, d, sw) {\n var g = el(\"svg\", { width: w, height: w, viewBox: \"0 0 16 16\", fill: \"none\", stroke: \"currentColor\", \"stroke-width\": sw, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\", \"aria-hidden\": \"true\" }, parent);\n el(\"path\", { d: d }, g);\n return g;\n}\nicon(x, 16, \"M3 3l10 10M13 3L3 13\", 2);\nvar bar = document.createElement(\"div\");\nbar.className = \"tb\";\npanel.appendChild(bar);\nvar corner = document.createElement(\"button\");\ncorner.className = \"b cn\";\ncorner.type = \"button\";\ncorner.setAttribute(\"aria-label\", \"Move to the next corner\");\ncorner.title = \"Move to the next corner\";\nvar cg = icon(corner, 16, \"M5 11.5V5h6.5M9.5 3.2L11.5 5 9.5 6.8\", 1.6);\nel(\"rect\", { x: 2, y: 2, width: 12, height: 12, rx: 2 }, cg);\nel(\"rect\", { x: 9.5, y: 9.5, width: 2, height: 2, fill: \"currentColor\" }, cg);\ncorner.addEventListener(\"click\", function () {\n var r = panel.getBoundingClientRect(), W = innerWidth, H = innerHeight;\n var mx = Math.max(8, Math.min(66, (W - r.width) / 2)) + \"px\", my = Math.max(8, Math.min(66, (H - r.height) / 2)) + \"px\";\n var right = r.left + r.width / 2 > W / 2, low = r.top + r.height / 2 > H / 2;\n var k = !low && !right ? 1 : !low && right ? 2 : low && right ? 3 : 0;\n for (var i = 0; i < 4; i++) {\n var toRight = k === 1 || k === 2, toLow = k === 2 || k === 3;\n panel.style.left = toRight ? \"auto\" : mx;\n panel.style.right = toRight ? mx : \"auto\";\n panel.style.top = toLow ? \"auto\" : my;\n panel.style.bottom = toLow ? my : \"auto\";\n var n = panel.getBoundingClientRect();\n if (Math.abs(n.left - r.left) > 2 || Math.abs(n.top - r.top) > 2) break;\n k = (k + 1) % 4;\n }\n});\nvar say = document.createElement(\"p\");\nsay.className = \"sr\";\nsay.setAttribute(\"role\", \"status\");\nsay.setAttribute(\"aria-live\", \"polite\");\npanel.appendChild(say);\nvar sayList = [], sayT = 0;\nfunction announce(t) {\n sayList.push(t);\n if (sayT) return;\n sayT = setTimeout(function () {\n sayT = 0;\n if (closed) return;\n var text = sayList.join(\" \");\n sayList = [];\n say.textContent = \"\";\n setTimeout(function () { say.textContent = text; }, 50);\n }, 1000);\n}\nbar.appendChild(line(\"t\", null, \"Tab trail\"));\nvar playCard = document.createElement(\"div\");\nplayCard.className = \"cd\";\npanel.appendChild(playCard);\nvar playRow = document.createElement(\"p\");\nplayRow.className = \"pr\";\nvar play = document.createElement(\"button\");\nplay.className = \"pl\";\nplay.type = \"button\";\nvar playIcon = document.createElement(\"span\");\nplay.appendChild(playIcon);\nvar playWord = document.createTextNode(\"Play\");\nplay.appendChild(playWord);\nplay.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\nvar playText = document.createElement(\"span\");\nplayText.textContent = \"Visits every stop for you\";\nplayRow.appendChild(play);\nplayRow.appendChild(playText);\nplayCard.appendChild(playRow);\nvar AI_ICON = \"M3.5 5.5h9v8h-9zM8 5.5V3.2M8 1.9v.1M6 8.6v1.1M10 8.6v1.1M6.3 11.6h3.4M1.8 8.5v2.6M14.2 8.5v2.6\", COPY_ICON = \"M10.5 5.5V3a.5.5 0 0 0-.5-.5H3a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h2.5M5.5 5.5h8v8h-8z\";\nvar aiBtn = document.createElement(\"button\");\naiBtn.className = \"ta\";\naiBtn.type = \"button\";\nicon(aiBtn, 15, AI_ICON, 1.6);\naiBtn.appendChild(document.createTextNode(\"Copy for AI\"));\naiBtn.addEventListener(\"click\", function () { copyIt(aiBtn, window, aiText(), \"Copy for AI\"); });\nbar.appendChild(aiBtn);\nbar.appendChild(corner);\nbar.appendChild(x);\nvar sumLine = document.createElement(\"p\");\nsumLine.className = \"sm\";\nsumLine.hidden = true;\nplayCard.appendChild(sumLine);\nvar resCard = document.createElement(\"div\");\nresCard.className = \"cd\";\npanel.appendChild(resCard);\nvar info = document.createElement(\"div\");\nresCard.appendChild(info);\nvar shownEl = null, chips = [], drawn = [], panelIn = false, pRet = null;\nvar KIND = { img: \"Image\", picture: \"Image\", svg: \"Icon\", i: \"Icon\", video: \"Video\", a: \"Link\", li: \"List item\", tr: \"Table row\", td: \"Table cell\" };\nvar BARE = { button: \"Button\", textarea: \"Field\", select: \"Dropdown\", iframe: \"Frame\" };\nfunction kind(m, tag) {\n if (tag === \"input\") return m.type === \"checkbox\" ? \"Checkbox\" : m.type === \"radio\" ? \"Radio\" : /^(submit|button|reset|image)$/.test(m.type) ? \"Button\" : \"Field\";\n return KIND[tag] || BARE[tag] || \"Clickable box\";\n}\nfunction named(m) {\n var by = m.getAttribute(\"aria-labelledby\"), r = m.getRootNode(), t = \"\";\n if (by && r.getElementById) t = by.split(/\\s+/).map(function (id) { var x = r.getElementById(id); return x ? x.textContent : \"\"; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"aria-label\") || \"\";\n if (!t.trim() && m.labels && m.labels.length) t = [].map.call(m.labels, function (l) { return l.innerText || l.textContent; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"placeholder\") || \"\";\n if (!t.trim() && m.tagName === \"INPUT\" && /^(submit|button|reset)$/.test(m.type)) t = m.value;\n if (!t.trim()) t = m.innerText || \"\";\n if (!t.trim()) t = m.getAttribute(\"title\") || \"\";\n return t;\n}\nvar EMAIL = /[\\w.+-]+@[\\w-]+(\\.[\\w-]+)+/g, DIGITS = /\\d(?:[\\s-]?\\d){5,}/g, TOKEN = /[A-Za-z0-9_%=+-]{16,}/g;\nvar SECRET = /\\b(?:(?:sk|pk|rk)_(?:live|test)_\\w+|gh[pousr]_\\w{20,}|github_pat_\\w+|AKIA[0-9A-Z]{16}|xox[abprs]-[\\w-]+|eyJ[\\w-]+\\.[\\w-]+\\.[\\w-]*)/g, SAID = /\\b((?:password|passwd|pwd|passcode|pin|secret|api[ _-]?key|token)\\s*[:=]\\s*)\\S+/gi;\nfunction tokens(t) { return t.replace(SECRET, \"[token]\").replace(TOKEN, function (w) { return /\\d/.test(w) ? \"[token]\" : w; }); }\nfunction scrub(t) { return tokens(String(t).replace(SAID, \"$1[token]\")).replace(EMAIL, \"[email]\").replace(DIGITS, \"[number]\"); }\nfunction secretish(t) { return scrub(t) !== t; }\nfunction cleanUrl(u) {\n u = String(u).split(/[?#]/)[0].replace(/^([a-z][\\w+.-]*:\\/\\/)[^@\\/]*@/i, \"$1\");\n if (/^(javascript|data|blob):/i.test(u)) return u.split(\":\")[0] + \":\";\n return scrub(u);\n}\nfunction label(m) {\n var tag = m.tagName.toLowerCase();\n var inner = m.querySelector(\"img[alt],[aria-label],title\");\n var alt = (m.getAttribute(\"alt\") || (inner && (inner.getAttribute(\"alt\") || inner.getAttribute(\"aria-label\") || inner.textContent)) || \"\").trim();\n var t = scrub(named(m)).trim().replace(/\\s+/g, \" \");\n alt = scrub(alt);\n if (!t && alt) t = (KIND[tag] ? KIND[tag] + \": \" : \"\") + alt.replace(/\\s+/g, \" \");\n if (!t) t = kind(m, tag);\n return t.length > 28 ? t.slice(0, 27) + \"...\" : t;\n}\nfunction count(n, text, bad, good, parent) {\n var p = document.createElement(\"p\");\n p.className = \"n\";\n var b = document.createElement(\"b\");\n b.textContent = String(n);\n if (bad) b.className = \"e\";\n else if (good) b.className = \"ok\";\n p.appendChild(b);\n p.appendChild(document.createTextNode(text));\n (parent || info).appendChild(p);\n}\nvar CHIPS = 50;\nfunction chipUl(parent, list, text, go) {\n var ul = document.createElement(\"ul\"), out = [];\n ul.className = \"m\";\n list.slice(0, CHIPS).forEach(function (m) {\n var li = document.createElement(\"li\");\n var c = document.createElement(\"button\");\n c.className = \"c\";\n c.type = \"button\";\n c.textContent = text(m);\n c.addEventListener(\"click\", function () { go(m, c); });\n out.push(c);\n li.appendChild(c);\n ul.appendChild(li);\n });\n if (list.length > CHIPS) {\n var mo = document.createElement(\"li\");\n mo.className = \"mo\";\n mo.textContent = \"and \" + (list.length - CHIPS).toLocaleString(\"en-US\") + \" more\";\n ul.appendChild(mo);\n }\n parent.appendChild(ul);\n return out;\n}\nfunction fill() {\n var had = chips.indexOf(root.activeElement);\n while (info.firstChild) info.removeChild(info.firstChild);\n chips = [];\n drawn = sig();\n count(stops.length, stops.length === 1 ? \" stop for the Tab key\" : \" stops for the Tab key\");\n count(missed.length, missed.length === 0 ? \" clickable things Tab skips\" : missed.length === 1 ? \" looks clickable, but Tab skips it\" : \" look clickable, but Tab skips them\", missed.length > 0, missed.length === 0);\n if (missed.indexOf(shownEl) < 0 && hovers.indexOf(shownEl) < 0 && forcedBad.indexOf(shownEl) < 0) shownEl = null;\n if (missed.length) chipList(missed);\n if (hovers.length) {\n count(hovers.length, hovers.length === 1 ? \" menu or box opens only on mouse hover\" : \" menus or boxes open only on mouse hover\", true);\n chipList(hovers);\n }\n if (forcedBad.length) {\n count(forcedBad.length, forcedBad.length === 1 ? \" stop has tabindex above 0, which pulls it ahead of the page\" : \" stops have tabindex above 0, which pulls them ahead of the page\", true);\n chipList(forcedBad, true);\n }\n if (skip) skipPanel();\n if (had >= 0 && chips.length) chips[Math.min(had, chips.length - 1)].focus();\n}\nfunction sig() { return [stops.length].concat(missed, [\"|\"], hovers, [\"|\"], forced, [\"|\"], forcedBad); }\nfunction chipList(list, num) {\n var made = chipUl(info, list, function (m) { return (num && stops.indexOf(m) >= 0 ? stops.indexOf(m) + 1 + \": \" : \"\") + label(m); }, function (m, c) {\n shownEl = m;\n chips.forEach(function (x) { x.setAttribute(\"aria-pressed\", x === c ? \"true\" : \"false\"); });\n m.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n queue();\n });\n made.forEach(function (c, i) { c.setAttribute(\"aria-pressed\", list[i] === shownEl ? \"true\" : \"false\"); });\n chips = chips.concat(made);\n}\nfill();\nvar PAGE = 50, win = 0, seen = -1;\nvar pager = document.createElement(\"p\");\npager.className = \"w\";\nvar pageText = document.createElement(\"span\");\npager.appendChild(pageText);\nfunction pageBtn(text, step) {\n var b = document.createElement(\"button\");\n b.className = \"b\";\n b.type = \"button\";\n b.setAttribute(\"aria-label\", text);\n icon(b, 14, step < 0 ? \"M10 3L5 8l5 5\" : \"M6 3l5 5-5 5\", 2);\n b.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\n b.addEventListener(\"click\", function () {\n win = Math.min(Math.max(win + step, 0), Math.ceil(stops.length / PAGE) - 1);\n queue();\n });\n pager.appendChild(b);\n return b;\n}\nvar prevBtn = pageBtn(\"Previous\", -1), nextBtn = pageBtn(\"Next\", 1);\nvar group = document.createElement(\"div\");\ngroup.className = \"cd gp\";\ngroup.appendChild(pager);\nvar jumpBox = document.createElement(\"div\");\nresCard.appendChild(jumpBox);\npanel.appendChild(group);\nvar jumps = [], pressed = 0, before = -1, popMissed = null, lost = false;\nvar POP = /cookie|consent|gdpr|modal|popup/i;\nfunction dimmed() {\n var W = innerWidth, H = innerHeight;\n return Array.prototype.some.call(document.querySelectorAll(\"body *\"), function (e) {\n if (e.id === ID) return false;\n var cs = getComputedStyle(e);\n if (cs.position !== \"fixed\" || cs.display === \"none\" || cs.visibility === \"hidden\") return false;\n var r = e.getBoundingClientRect();\n if (r.width < W * 0.9 || r.height < H * 0.9) return false;\n var m = cs.backgroundColor.match(/rgba?\\(([^)]+)\\)/);\n var al = m ? m[1].split(\",\")[3] : null;\n return (al !== undefined && al !== null && +al > 0 && +al < 1) || cs.backdropFilter !== \"none\" && cs.backdropFilter !== \"\";\n });\n}\nfunction blocking(p) {\n if (p.matches(\"dialog\") && p.matches(\":modal\")) return true;\n if (p.getAttribute(\"aria-modal\") === \"true\") return true;\n var r = p.getBoundingClientRect();\n if (r.width * r.height >= innerWidth * innerHeight * 0.5) return true;\n return dimmed();\n}\nfunction popupOf(el) {\n for (var p = el; p && p !== document.documentElement; p = p.parentElement || (p.getRootNode().host || null)) {\n if (p.nodeType !== 1) continue;\n if (p.matches(\"dialog[open],[role=dialog],[role=alertdialog],[aria-modal=true]\")) return p;\n var c = typeof p.className === \"string\" ? p.className : \"\";\n if (POP.test(p.id + \" \" + c) && getComputedStyle(p).position === \"fixed\") return p;\n }\n return null;\n}\nvar covered = [], trapped = [], probHid = new Map();\nfunction pinOf(e) {\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") return n;\n }\n return null;\n}\nfunction hideInfo(s) {\n var r = s.getBoundingClientRect();\n if (r.width < 1 || r.height < 1) return { why: \"has no size\" };\n var m = modal();\n if (m && !within(m, s)) return { why: \"is under an open modal\" };\n if (popupOf(s)) return { why: \"is inside a popup\" };\n var pts = [[r.left + r.width / 2, r.top + r.height / 2], [r.left + 1, r.top + 1], [r.right - 1, r.top + 1], [r.left + 1, r.bottom - 1], [r.right - 1, r.bottom - 1]];\n var tested = 0, under = 0, pin = null;\n for (var i = 0; i < pts.length; i++) {\n var px = pts[i][0], py = pts[i][1];\n if (px < 0 || py < 0 || px >= innerWidth || py >= innerHeight) continue;\n tested++;\n var hit = null, list = document.elementsFromPoint(px, py);\n for (var k = 0; k < list.length; k++) if (list[k] !== host && !host.contains(list[k])) { hit = list[k]; break; }\n if (!hit || within(s, hit) || within(hit, s)) continue;\n var p = pinOf(hit);\n if (!p || within(p, s)) continue;\n under++;\n if (!pin) pin = p;\n }\n if (!tested) return { why: \"is off screen\" };\n return { tested: tested, under: under, pin: pin };\n}\nfunction pinText(p) {\n return desc(p) + \" (\" + getComputedStyle(p).position + \", \" + Math.round(p.getBoundingClientRect().height) + \" px tall)\";\n}\nvar moved = [], movedE = null;\nfunction movedLine() {\n if (movedE) {\n var i = logs.indexOf(movedE);\n if (i >= 0) logs.splice(i, 1);\n if (movedE.li && movedE.li.parentNode) movedE.li.parentNode.removeChild(movedE.li);\n movedE = null;\n }\n moved = moved.filter(function (x) { return x.isConnected; });\n if (!moved.length) {\n if (logList) logSummary();\n return;\n }\n var nums = moved.map(function (x) { return stops.indexOf(x) + 1; }).filter(function (n) { return n > 0; }).sort(function (a, b) { return a - b; });\n var list = nums.length ? \": \" + nums.slice(0, 20).join(\", \") + (nums.length > 20 ? \" and \" + (nums.length - 20) + \" more\" : \"\") : \"\";\n log(\"SKIPPED\", \"Hidden focus\", [pl(moved.length, \"stop\", \"stops\") + \" not tested, Tab moved on before the page stopped scrolling\" + list + \". Press Play to test them.\"]);\n movedE = logs[logs.length - 1];\n}\nfunction tested(s) {\n var i = moved.indexOf(s);\n if (i < 0) return;\n moved.splice(i, 1);\n movedLine();\n}\nfunction where(s) {\n var r = s.getBoundingClientRect();\n return scrollX + \",\" + scrollY + \",\" + r.left + \",\" + r.top;\n}\nfunction check(s, then) {\n function end() {\n var f = then;\n then = null;\n if (f) f();\n }\n if (!s) return end();\n var was = covered.indexOf(s) >= 0;\n var at = where(s), still = 0, tries = 0;\n function look() {\n if (closed || (covered.indexOf(s) >= 0) !== was) return end();\n var now = where(s);\n if (now !== at) {\n if (stops[current] !== s) {\n if (was) return end();\n if (moved.indexOf(s) < 0) {\n moved.push(s);\n movedLine();\n }\n return end();\n }\n at = now;\n still = 0;\n } else still++;\n if (still < 2 && ++tries < 90) return requestAnimationFrame(look);\n var h = hideInfo(s);\n tested(s);\n hidTested.add(s);\n if (!h.tested) {\n log(\"SKIPPED\", \"Hidden focus\", [ref(s), \" \" + h.why + \". Not tested.\"]);\n return end();\n }\n if (was && h.under >= h.tested) {\n log(\"INFO\", \"Hidden focus\", [ref(s), \" is already listed as hidden.\"]);\n return end();\n }\n if (was) {\n covered.splice(covered.indexOf(s), 1);\n var pe = probHid.get(s);\n if (pe) pe.fixed = true;\n probHid.delete(s);\n renderJumps();\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is not hidden anymore: it is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is not hidden anymore, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n if (h.under < h.tested) {\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is in view, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n covered.push(s);\n renderJumps();\n announce(\"Hidden focus: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", is covered.\");\n var pr = h.pin.getBoundingClientRect(), up = pr.top + pr.height / 2 < innerHeight / 2, ph = Math.round(pr.height);\n log(\"PROBLEM\", \"Hidden focus\", [ref(s), \": all \" + h.tested + \" points are under \" + pinText(h.pin) + \".\"], aiOf(W_HIDE, \"When the element gets keyboard focus, at least part of it stays visible, not covered by \" + desc(h.pin) + \".\", \"Add html { scroll-padding-\" + (up ? \"top\" : \"bottom\") + \": \" + (ph + 8) + \"px; } so the browser scrolls focused elements clear of the \" + (up ? \"top\" : \"bottom\") + \" bar (\" + ph + \" px tall, plus 8 px of room).\", [[\"Element\", s], [\"Covered by\", h.pin]], [\"Measured: \" + desc(h.pin) + \" is \" + getComputedStyle(h.pin).position + \", \" + ph + \" px tall, at the \" + (up ? \"top\" : \"bottom\") + \" of a \" + innerHeight + \" px tall window.\"]));\n probHid.set(s, logs[logs.length - 1]);\n end();\n }\n requestAnimationFrame(look);\n}\nvar popInfo = null, lostPops = [], openPop = null, opener = null, lastOut = null, tapIn = null, tapT = 0, lastKey = \"\", keyT = 0, keyOn = null;\nfunction deep() {\n var a = document.activeElement;\n while (a && a.shadowRoot && a.shadowRoot.activeElement) a = a.shadowRoot.activeElement;\n return a;\n}\nfunction gone(p) { return !p.isConnected || !shown(p) || (p.matches(\"dialog\") && !p.open); }\nfunction closedBy(p) {\n var now = Date.now();\n if (tapIn && now - tapT < 600 && within(p, tapIn)) {\n var b = tapIn.closest ? tapIn.closest(\"button,a,[role=button]\") : null;\n return b ? \" with \\\"\" + label(b) + \"\\\"\" : \" with a click\";\n }\n if (keyT && now - keyT < 600) {\n if (lastKey === \"Escape\") return \" with Escape\";\n if (lastKey === \"Enter\" || lastKey === \" \") return \" with \" + (lastKey === \" \" ? \"Space\" : \"Enter\") + (keyOn && keyOn.nodeType === 1 && keyOn !== document.body && keyOn !== document.documentElement ? \" on \\\"\" + label(keyOn) + \"\\\"\" : \"\");\n }\n return \"\";\n}\nfunction popClosed() {\n var p = openPop, from = opener, pn = popName(p), by = closedBy(p), pi = popInfo;\n openPop = null;\n if (!from) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". It opened on its own, so there is no button to go back to.\"]);\n if (!from.isConnected || !shown(from)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". The button that opened it is gone or hidden.\"]);\n if (lostPops.some(function (l) { return l[0] === from; })) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". Already listed.\"]);\n if (tapIn && Date.now() - tapT < 600 && !within(p, tapIn)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed by a click outside it. Not judged.\"]);\n var frames = 0;\n function look() {\n if (closed) return;\n var a = deep();\n if (a && a !== document.body && a !== document.documentElement && !within(p, a) && shown(a)) {\n if (a === from) return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went back to \", ref(from), \".\"]);\n return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went to \", ref(a), \", not to the button that opened it, \", ref(from), \".\"]);\n }\n if (++frames < 30) return requestAnimationFrame(look);\n if (lostPops.some(function (l) { return l[0] === from; })) return;\n lostPops.push([from, p]);\n renderJumps();\n announce(\"Lost focus: \" + pn.l + \" closed and focus fell to the page body.\");\n log(\"PROBLEM\", \"Lost focus\", [pn, \" closed\" + by + \". Focus fell to the page body instead of going back to \", ref(from), \".\"], aiOf(W_ORDER, \"When the popup closes, focus goes back to the element that opened it, so a keyboard user carries on from there.\", \"Before the popup opens, store document.activeElement. After it closes, call .focus() on that element. A <dialog> opened with showModal() and closed with close() does this by itself, so if this one is a <dialog>, look for code that calls blur() or .focus() on something else after it closes.\", [[\"Popup\", p, pi], [\"Opened by\", from]]));\n }\n requestAnimationFrame(look);\n}\nfunction track(a) {\n if (openPop && gone(openPop)) popClosed();\n if (!a || a === document.body || a === document.documentElement || a === host || a.getRootNode() === root) return;\n var p = popupOf(a);\n if (!p) {\n lastOut = a;\n openPop = null;\n } else if (!openPop) {\n openPop = p;\n opener = lastOut;\n popInfo = { sel: sel(p), html: snip(p) };\n }\n}\nfunction tap(e) {\n tapIn = e.composedPath ? e.composedPath()[0] : e.target;\n tapT = Date.now();\n}\nfunction stopGo(e) {\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n current = stops.indexOf(e);\n queue();\n}\nfunction stopName(e) {\n var i = stops.indexOf(e);\n return (i >= 0 ? i + 1 : \"?\") + \": \" + label(e);\n}\nfunction byStop(list) { return list.slice().sort(function (a, b) { return stops.indexOf(a) - stops.indexOf(b); }); }\nfunction renderJumps() {\n while (jumpBox.firstChild) jumpBox.removeChild(jumpBox.firstChild);\n if (macNote) {\n var mn = document.createElement(\"p\");\n mn.className = \"mn\";\n mn.textContent = MAC_NOTE;\n jumpBox.appendChild(mn);\n }\n if (popMissed) {\n count(1, \" popup blocks the page, but Tab goes somewhere else first\", true, false, jumpBox);\n chipUl(jumpBox, [popMissed], function () { return \"Show the popup\"; }, function (m) { m.scrollIntoView({ block: \"center\", behavior: \"smooth\" }); });\n }\n if (covered.length) {\n count(covered.length, covered.length === 1 ? \" stop is hidden when Tab reaches it\" : \" stops are hidden when Tab reaches them\", true, false, jumpBox);\n chipUl(jumpBox, byStop(covered), stopName, stopGo);\n }\n if (trapped.length) {\n count(trapped.length, trapped.length === 1 ? \" stop where Tab gets stuck\" : \" stops where Tab gets stuck\", true, false, jumpBox);\n chipUl(jumpBox, byStop(trapped), stopName, stopGo);\n }\n if (lostPops.length) {\n count(lostPops.length, lostPops.length === 1 ? \" popup loses focus when it closes\" : \" popups lose focus when they close\", true, false, jumpBox);\n chipUl(jumpBox, lostPops, function (l) {\n var i = stops.indexOf(l[0]);\n return (i >= 0 ? i + 1 : label(l[0])) + \" \\u2192 Start\";\n }, function (l) { stopGo(l[0]); });\n }\n if (jumps.length) {\n count(jumps.length, jumps.length === 1 ? \" time Tab jumped out of order\" : \" times Tab jumped out of order\", true, false, jumpBox);\n chipUl(jumpBox, jumps, function (j) {\n var from = j[0] ? stops.indexOf(j[0]) + 1 || label(j[0]) : \"Start\", to = stops.indexOf(j[1]) + 1;\n return from + \" \\u2192 \" + (to || \"?\");\n }, function (j) { stopGo(j[1]); });\n }\n if (skip) skipPanel();\n}\nvar legend = document.createElement(\"div\");\nlegend.className = \"so\";\nlegend.hidden = true;\nlegend.appendChild(line(\"k\", null, \"The order Tab visits\", \"d\"));\nlegend.appendChild(line(\"k\", null, \"Hidden until Tab reaches it\", \"h\"));\nlegend.appendChild(line(\"k\", null, \"Tab can't reach or see it\", \"r\"));\nvar tray = document.createElement(\"div\");\ntray.className = \"tr\";\npanel.appendChild(tray);\nvar gear = document.createElement(\"button\");\ngear.className = \"sg\";\ngear.type = \"button\";\ngear.setAttribute(\"aria-expanded\", \"false\");\nvar gearIcon = icon(gear, 16, \"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4\", 1.6);\nel(\"circle\", { cx: 8, cy: 8, r: 2.2 }, gearIcon);\ngear.appendChild(document.createTextNode(\"Settings\"));\ngear.appendChild(document.createElement(\"i\"));\ntray.appendChild(gear);\nvar settings = document.createElement(\"div\");\nsettings.className = \"so\";\nsettings.hidden = true;\ntray.appendChild(settings);\ngear.addEventListener(\"click\", function () {\n settings.hidden = !settings.hidden;\n gear.setAttribute(\"aria-expanded\", settings.hidden ? \"false\" : \"true\");\n});\nvar skipBox = document.createElement(\"label\");\nskipBox.className = \"k s\";\nvar skip = document.createElement(\"input\");\nskip.type = \"checkbox\";\nskip.checked = true;\nskipBox.appendChild(skip);\nskipBox.appendChild(document.createTextNode(\"Leave this panel out of Tab\"));\nsettings.appendChild(skipBox);\nvar tightBox = document.createElement(\"label\");\ntightBox.className = \"k s\";\nvar tight = document.createElement(\"input\");\ntight.type = \"checkbox\";\ntight.checked = true;\ntightBox.appendChild(tight);\ntightBox.appendChild(document.createTextNode(\"Compact view\"));\nsettings.appendChild(tightBox);\ntight.addEventListener(\"change\", function () { panel.classList.toggle(\"rm\", !tight.checked); });\nvar chunkBox = document.createElement(\"label\");\nchunkBox.className = \"k s\";\nvar chunk = document.createElement(\"input\");\nchunk.type = \"checkbox\";\nchunk.checked = true;\nchunkBox.appendChild(chunk);\nchunkBox.appendChild(document.createTextNode(\"Show \" + PAGE + \" stops at a time\"));\ngroup.appendChild(chunkBox);\nvar shortBox = document.createElement(\"label\");\nshortBox.className = \"k s\";\nvar stub = document.createElement(\"input\");\nstub.type = \"checkbox\";\nstub.checked = true;\nshortBox.appendChild(stub);\nshortBox.appendChild(document.createTextNode(\"Long lines\"));\nsettings.insertBefore(shortBox, skipBox);\nvar lineBox = document.createElement(\"label\");\nlineBox.className = \"k s\";\nvar lines = document.createElement(\"input\");\nlines.type = \"checkbox\";\nlines.checked = true;\nlineBox.appendChild(lines);\nlineBox.appendChild(document.createTextNode(\"Show lines\"));\nsettings.insertBefore(lineBox, shortBox);\nlines.addEventListener(\"change\", function () {\n stub.disabled = !lines.checked;\n shortBox.classList.toggle(\"off\", !lines.checked);\n queue();\n});\nstub.addEventListener(\"change\", function () { queue(); });\nvar spotBox = document.createElement(\"label\");\nspotBox.className = \"k s\";\nvar light = document.createElement(\"input\");\nlight.type = \"checkbox\";\nspotBox.appendChild(light);\nspotBox.appendChild(document.createTextNode(\"Spotlight\"));\nsettings.insertBefore(spotBox, settings.firstChild);\nlight.addEventListener(\"change\", function () { queue(); });\nchunk.addEventListener(\"change\", function () { queue(); });\nfunction paged() { return chunk.checked && stops.length > PAGE; }\nfunction outT() { return skip.checked && !panelIn ? -1 : 0; }\nfunction skipPanel() {\n panel.tabIndex = outT();\n panel.querySelectorAll(\"button,a,input\").forEach(function (e) { e.tabIndex = e.className === \"lc\" ? (panelIn ? 0 : -1) : outT(); });\n}\nskip.addEventListener(\"change\", function () {\n skipPanel();\n svg.classList.toggle(\"in\", !skip.checked);\n svgPg.classList.toggle(\"in\", !skip.checked);\n dot.classList.toggle(\"in\", !skip.checked);\n dotPg.classList.toggle(\"in\", !skip.checked);\n rescan();\n});\nvar a = document.createElement(\"a\");\na.className = \"a\";\na.href = \"https://matjazkorosec.com/tools/tab-trail\";\na.target = \"_blank\";\na.rel = \"noopener\";\na.textContent = \"matjazkorosec.com/tools/tab-trail\";\nvar how = document.createElement(\"p\");\nhow.className = \"hw\";\nvar MAC = /Mac/.test(navigator.platform || navigator.userAgent);\nvar KEYS = \"Ctrl+Shift+F\";\nvar ver = document.createElement(\"span\");\nver.className = \"vr\";\nver.textContent = \"v\" + VERSION;\nhow.appendChild(ver);\nhow.appendChild(document.createTextNode(\"How to use & latest version: \"));\nhow.appendChild(a);\nvar keysBtn = document.createElement(\"button\");\nkeysBtn.className = \"sg\";\nkeysBtn.type = \"button\";\nkeysBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(keysBtn, 16, \"M1.5 4.5h13v7h-13zM4 7h1M7.5 7h1M11 7h1M5 9.5h6\", 1.6);\nkeysBtn.appendChild(document.createTextNode(\"Shortcuts\"));\nkeysBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(keysBtn, gear);\nvar keysBox = document.createElement(\"div\");\nkeysBox.className = \"so\";\nkeysBox.hidden = true;\ntray.insertBefore(keysBox, gear);\n[[KEYS + \":\", \" into this panel\"], [\"Escape:\", \" back to the page\"], [\"Tab, Shift+Tab:\", \" along the trail\"], [\"Space or Escape:\", \" pause Play\"]].forEach(function (k) {\n keysBox.appendChild(line(\"k\", k[0], k[1]));\n});\nkeysBtn.addEventListener(\"click\", function () {\n keysBox.hidden = !keysBox.hidden;\n keysBtn.setAttribute(\"aria-expanded\", keysBox.hidden ? \"false\" : \"true\");\n});\nvar legendBtn = document.createElement(\"button\");\nlegendBtn.className = \"sg\";\nlegendBtn.type = \"button\";\nlegendBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(legendBtn, 16, \"M3 4h1M6.5 4H13M3 8h1M6.5 8H13M3 12h1M6.5 12H13\", 1.6);\nlegendBtn.appendChild(document.createTextNode(\"Legend\"));\nlegendBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(legendBtn, keysBtn);\ntray.insertBefore(legend, keysBtn);\nlegendBtn.addEventListener(\"click\", function () {\n legend.hidden = !legend.hidden;\n legendBtn.setAttribute(\"aria-expanded\", legend.hidden ? \"false\" : \"true\");\n});\ntray.appendChild(how);\nvar logs = [], logFilter = \"all\", logOpen = false, LOG_MAX = 500, showWcag = false, wcagBoxes = [];\nfunction wcagBox(parent, doc) {\n var lb = doc.createElement(\"label\");\n lb.className = \"lw\";\n var cb = doc.createElement(\"input\");\n cb.type = \"checkbox\";\n cb.checked = showWcag;\n cb.addEventListener(\"change\", function () {\n showWcag = cb.checked;\n wcagSync();\n });\n lb.appendChild(cb);\n lb.appendChild(doc.createTextNode(\"Show WCAG\"));\n parent.appendChild(lb);\n wcagBoxes.push(cb);\n return cb;\n}\nfunction wcagSync() {\n wcagBoxes.forEach(function (b) { b.checked = showWcag; });\n logGroup.classList.toggle(\"nw\", !showWcag);\n if (tabOpen()) logTab.document.body.classList.toggle(\"nw\", !showWcag);\n}\nvar lastStops = -1, lastMissed = -1, lastForced = -1, probMiss = new Map(), probHov = new Map(), probForce = new Map(), seenForce = new WeakSet(), seenOk = new WeakSet(), seenCss = new Set();\nvar RES = { OK: \"ok\", PROBLEM: \"bad\", SKIPPED: \"skip\", INFO: \"info\" };\nvar FILT = [[\"all\", \"All\"], [\"bad\", \"Problems\"], [\"ok\", \"OK\"], [\"skip\", \"Skipped\"]];\nvar tabChecked = null, filterSets = [], logTab = null, tabList = null, tabSum = null, tabSet = null, tabNote = null, tabPoll = 0;\nfunction pl(n, one, many) { return n + \" \" + (n === 1 ? one : many); }\nfunction desc(e) {\n var t = e.tagName.toLowerCase();\n if (e.id) return t + \"#\" + scrub(e.id);\n var c = typeof e.className === \"string\" ? e.className.trim().split(/\\s+/).filter(Boolean).slice(0, 2) : [];\n return c.length ? t + \".\" + scrub(c.join(\".\")) : t;\n}\nfunction ref(e) { return { el: e, n: stops.indexOf(e) + 1, l: label(e), d: desc(e) }; }\nfunction popName(p) {\n var n = p.getAttribute(\"aria-label\") || \"\", by = p.getAttribute(\"aria-labelledby\");\n if (!n && by) {\n var t = document.getElementById(by.split(/\\s+/)[0]);\n if (t) n = t.textContent || \"\";\n }\n if (!n) {\n var h = p.querySelector(\"h1,h2,h3,h4,legend\");\n if (h) n = h.textContent || \"\";\n }\n n = scrub(n).trim().replace(/\\s+/g, \" \");\n if (n.length > 28) n = n.slice(0, 27) + \"...\";\n return { el: p, n: 0, l: n || label(p), d: desc(p) };\n}\nfunction partText(x) { return typeof x === \"string\" ? x : x.n ? x.n + \" \\\"\" + x.l + \"\\\"\" : \"\\\"\" + x.l + \"\\\" \" + x.d; }\nfunction looksWhy(m) {\n var why = [], role = m.getAttribute(\"role\") || \"\";\n if (m.tagName === \"A\" && !m.hasAttribute(\"href\")) why.push(\"a link with no address\");\n if (m.hasAttribute(\"onclick\")) why.push(\"a click handler in the HTML\");\n if (ROLES.test(role)) why.push(\"role=\\\"\" + role + \"\\\"\");\n if (getComputedStyle(m).cursor === \"pointer\") why.push(\"a pointer cursor\");\n return why.length ? \"has \" + why.join(\", \") : \"looks clickable\";\n}\nfunction addr() { return location.protocol + \"//\" + location.host + cleanUrl(location.pathname); }\nfunction two(n) { return (n < 10 ? \"0\" : \"\") + n; }\nfunction clock(t) { return two(t.getHours()) + \":\" + two(t.getMinutes()) + \":\" + two(t.getSeconds()); }\nfunction browser() {\n var u = navigator.userAgent, m;\n if ((m = u.match(/Edg\\/(\\d+)/))) return \"Edge \" + m[1];\n if ((m = u.match(/Firefox\\/(\\d+)/))) return \"Firefox \" + m[1];\n if ((m = u.match(/Chrome\\/(\\d+)/))) return \"Chrome \" + m[1];\n if ((m = u.match(/Version\\/(\\d+)[^ ]* (Mobile\\/\\S+ )?Safari/))) return \"Safari \" + m[1];\n return u;\n}\nvar CHECKS = [\"Missed spots\", \"Hover menus\", \"Forced order\", \"Out of order\", \"Keyboard trap\", \"Hidden focus\", \"Lost focus\"];\nvar WCAG = { \"Missed spots\": \"2.1.1 A\", \"Hover menus\": \"2.1.1 A\", \"Out of order\": \"2.4.3 A\", \"Forced order\": \"2.4.3 A\", \"Keyboard trap\": \"2.1.2 A\", \"Lost focus\": \"2.4.3 A\", \"Hidden focus\": \"2.4.11 AA\" };\nfunction showUrl(f) { return \"https://matjazkorosec.com/tools/tab-trail#show-\" + f.toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\"); }\nfunction ranChecks() {\n var out = [];\n logs.forEach(function (e) { if (e.k !== \"INFO\" && CHECKS.indexOf(e.f) >= 0 && out.indexOf(e.f) < 0) out.push(e.f); });\n return out;\n}\nvar checkedKey = {};\nfunction checkedLine(p, doc) {\n var ran = ranChecks(), bad = {};\n logs.forEach(function (e) { if (e.k === \"PROBLEM\" && !e.fixed) bad[e.f] = 1; });\n var k = ran.map(function (f) { return f + (bad[f] ? \"!\" : \"\"); }).join(\"|\");\n p.hidden = !ran.length;\n if (checkedKey[p.className + (doc === document ? \"1\" : \"2\")] === k && p.firstChild) return;\n checkedKey[p.className + (doc === document ? \"1\" : \"2\")] = k;\n while (p.firstChild) p.removeChild(p.firstChild);\n p.appendChild(doc.createTextNode(\"Checked: \"));\n ran.forEach(function (f, i) {\n if (i) p.appendChild(doc.createTextNode(\", \"));\n var a = doc.createElement(\"a\");\n a.className = bad[f] ? \"lq bad\" : \"lq\";\n a.href = showUrl(f);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = f;\n a.title = \"What \" + f + \" checks\";\n if (doc === document) a.tabIndex = outT();\n p.appendChild(a);\n });\n}\nfunction res(e) { return e.fixed ? \"fixed\" : RES[e.k]; }\nfunction shows(e) { return logFilter === \"all\" || res(e) === logFilter; }\nfunction logCounts() {\n var c = { all: logs.length, bad: 0, ok: 0, skip: 0, info: 0, fixed: 0 };\n logs.forEach(function (e) { c[res(e)]++; });\n return c;\n}\nfunction tabOpen() { return !!(logTab && !logTab.closed); }\nfunction logView() { return tabOpen() ? tabList : logOpen ? logList : null; }\nfunction scroller(v) { return v === logList ? panel : v.ownerDocument.scrollingElement || v.ownerDocument.documentElement; }\nfunction toTop(v) {\n if (v !== logList) return void (scroller(v).scrollTop = 0);\n var d = v.getBoundingClientRect().top - panel.getBoundingClientRect().top;\n if (d < 0) panel.scrollTop += d - 12;\n}\nfunction wcagOf(e) { return e.w || WCAG[e.f]; }\nfunction log(k, f, parts, ai, w) {\n var e = { t: new Date(), k: k, f: f, p: parts, li: null, ai: ai || null, w: w || null };\n logs.push(e);\n if (k === \"PROBLEM\" && e.ai) probLog.push(e);\n if ((k === \"OK\" || k === \"PROBLEM\") && (f === \"Out of order\" || f === \"Keyboard trap\") && pressed) judgedDir[pressed > 0 ? 1 : -1] = 1;\n if (logs.length > LOG_MAX) {\n var old = logs.shift();\n if (old.li && old.li.parentNode) old.li.parentNode.removeChild(old.li);\n }\n if (!logList) return;\n logSummary();\n var v = logView();\n if (!v || !shows(e)) return;\n var sc = scroller(v), top = v === logList ? v.getBoundingClientRect().top >= sc.getBoundingClientRect().top : sc.scrollTop < 8;\n e.li = logLi(e, v.ownerDocument);\n v.insertBefore(e.li, v.firstChild);\n if (top) { if (v !== logList) sc.scrollTop = 0; }\n else sc.scrollTop += e.li.getBoundingClientRect().height;\n}\nfunction review() {\n if (lastStops < 0) log(\"INFO\", \"Scan\", [\"Found \" + pl(stops.length, \"stop\", \"stops\") + \". Read \" + pl(cssRules, \"CSS rule\", \"CSS rules\") + \" from \" + pl(cssSheets, \"style sheet\", \"style sheets\") + \".\"]);\n else if (stops.length !== lastStops) log(\"INFO\", \"Scan\", [\"Page changed: \" + pl(stops.length, \"stop\", \"stops\") + \" now, \" + lastStops + \" before.\"]);\n lastStops = stops.length;\n cssBlocked.forEach(function (h) {\n if (seenCss.has(h)) return;\n seenCss.add(h);\n log(\"SKIPPED\", \"Hover menus\", [\"Can't read \" + cleanUrl(h) + \", it comes from another site.\"]);\n });\n var mSet = new Set(missed), hSet = new Set(hovers), fSet = new Set(forcedBad), fresh = {}, nNew = 0;\n function add(f) {\n fresh[f] = 1;\n nNew++;\n }\n probMiss.forEach(function (e, m) {\n if (mSet.has(m)) return;\n e.fixed = true;\n probMiss.delete(m);\n log(\"OK\", \"Missed spots\", [ref(m), stopSet.has(m) ? \" is a Tab stop now.\" : m.isConnected ? \" is no longer flagged.\" : \" is gone from the page.\"]);\n });\n probHov.forEach(function (e, h) {\n if (hSet.has(h)) return;\n e.fixed = true;\n probHov.delete(h);\n if (tabOpens.has(h)) seenOk.add(h);\n log(\"OK\", \"Hover menus\", [ref(h), !h.isConnected ? \" is gone from the page.\" : tabOpens.has(h) ? \" opens when Tab reaches it.\" : \" no longer opens only on mouse hover.\"]);\n });\n missed.forEach(function (m) {\n if (probMiss.has(m)) return;\n var item = m.closest(GROUP) && ITEM.test(m.getAttribute(\"role\") || \"\");\n log(\"PROBLEM\", \"Missed spots\", [ref(m), \" \" + looksWhy(m) + \", but Tab never reaches it.\"], aiOf(W_KEY, \"Every element that reacts to a click can be reached with the Tab key and used with Enter or Space.\", item ? \"It is a role=\\\"\" + m.getAttribute(\"role\") + \"\\\" item in a group the arrow keys move through, and no item in the group is a Tab stop. Give 1 item tabindex=\\\"0\\\" (the selected one) and move between the items with the arrow keys.\" : m.tagName === \"A\" && !m.hasAttribute(\"href\") ? \"Give the link an href, or make it a <button type=\\\"button\\\"> if it runs script.\" : \"Use <button type=\\\"button\\\"> for an action or <a href> for a link instead of the \" + m.tagName.toLowerCase() + \". If the tag can't change, add tabindex=\\\"0\\\" and role=\\\"button\\\", and handle Enter and Space in a keydown listener.\" + (looksWhy(m) === \"has a pointer cursor\" ? \" Only the pointer cursor makes it look clickable: if it is not meant to be clickable, remove cursor: pointer from it instead.\" : \"\"), [[\"Element\", m]], null, true));\n probMiss.set(m, logs[logs.length - 1]);\n add(\"Missed spots\");\n });\n if (!missed.length && lastMissed !== 0) log(\"OK\", \"Missed spots\", [lastMissed > 0 ? \"No clickable things Tab skips now.\" : \"No clickable things Tab skips.\"]);\n lastMissed = missed.length;\n hoverOk.forEach(function (o) {\n if (seenOk.has(o[0])) return;\n seenOk.add(o[0]);\n log(\"OK\", \"Hover menus\", [ref(o[0]), o[1] === \"focus\" ? \" opens on mouse hover and on keyboard focus.\" : o[1] === \"tab\" ? \" opens when Tab reaches it.\" : \" opens on mouse hover and has a toggle button (aria-expanded), so the keyboard can open it.\"]);\n });\n hovers.forEach(function (h) {\n if (probHov.has(h)) return;\n var hr = hovRule.get(h) || [\":hover\", \"\"];\n hr = [scrub(hr[0]), hr[1]];\n var tw = (hr[0].match(/\\.(?:[\\w-]|\\\\.)+/g) || []).map(function (c) { return c.slice(1).replace(/\\\\(.)/g, \"$1\"); }).filter(function (c) { return /(^|:)(group-|peer-)?hover:/.test(c); })[0];\n var twFix = tw ? \"This rule comes from the Tailwind class \" + tw + \". Add \" + tw.replace(/(^|:)group-hover:/, \"$1group-focus-within:\").replace(/(^|:)peer-hover:/, \"$1peer-focus:\").replace(/(^|:)hover:/, \"$1focus-within:\") + \" next to it in the same class list, so it also opens on keyboard focus. Or open the menu with a <button aria-expanded> that toggles it.\" : \"\";\n var seen = hovSeen.has(h);\n var dead = !seen && !h.matches(FOCUSABLE) && ![].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return tabbable(x); });\n var skipped = [].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return x.tabIndex < 0; });\n var deadFix = dead ? \" Nothing inside it can take keyboard focus now, so a focus rule alone will never open it: make the part you hover a <button type=\\\"button\\\" aria-expanded=\\\"false\\\"> that toggles the menu.\" + (skipped ? \" The links or buttons inside have tabindex=\\\"-1\\\", so Tab skips them even when the menu is open: remove it.\" : \"\") : \"\";\n log(\"PROBLEM\", \"Hover menus\", [ref(h), \" opens only on mouse hover (\" + hr[0] + \").\" + (seen ? \" Tab reaches its links, but they stay invisible while they have focus.\" : \" No focus rule, no toggle button.\")], aiOf(seen ? W_VIS : W_KEY, seen ? \"The menu also opens while a link or button inside it has keyboard focus, so keyboard users can see where they are.\" : \"The menu also opens when a link or button inside it gets keyboard focus, so keyboard users can reach its links.\", (twFix || \"Next to the rule \" + hr[0] + \" add \" + hr[0].replace(/:hover/g, \":focus-within\") + \" with the same declarations, or open the menu with a <button aria-expanded> that toggles it.\") + deadFix, [[\"Element\", h, null, true]], [\"CSS rule: \" + hr[0], \"Style sheet: \" + (hr[1] ? cleanUrl(hr[1]) : \"unknown\")], true), seen ? \"2.4.7 AA\" : null);\n probHov.set(h, logs[logs.length - 1]);\n add(\"Hover menus\");\n });\n probForce.forEach(function (e, f) {\n if (fSet.has(f)) return;\n e.fixed = true;\n probForce.delete(f);\n log(\"OK\", \"Forced order\", [ref(f), !f.isConnected ? \" is gone from the page.\" : forced.indexOf(f) >= 0 ? \" is in page order now.\" : f.tabIndex > 0 ? \" is no longer a Tab stop.\" : \" has no tabindex above 0 now.\"]);\n });\n forced.forEach(function (f) {\n if (probForce.has(f) || (!fSet.has(f) && seenForce.has(f))) return;\n var ti = f.getAttribute(\"tabindex\"), at = stops.indexOf(f) + 1, page = domAt.get(f) + 1;\n if (!fSet.has(f)) {\n seenForce.add(f);\n return log(\"INFO\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", but it is already in page order, so Tab order stays the same. tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\"]);\n }\n seenForce.delete(f);\n log(\"PROBLEM\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", which pulls it ahead of the page: Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". It fails WCAG 2.4.3 when that order makes no sense (F44).\"], aiOf(W_FORCE, \"Tab follows the order of the page. No element has tabindex above 0, so none is pulled ahead of the rest.\", \"Remove the tabindex, or set it to 0, and move the element in the HTML where it should come in Tab order.\", [[\"Element\", f]], [\"Measured: tabindex=\\\"\" + ti + \"\\\", Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". \" + pl(forced.length, \"stop\", \"stops\") + \" on the page \" + (forced.length === 1 ? \"has\" : \"have\") + \" tabindex above 0.\"], true));\n probForce.set(f, logs[logs.length - 1]);\n add(\"Forced order\");\n });\n if (!forcedBad.length && lastForced !== 0) log(\"OK\", \"Forced order\", [forced.length ? \"No stop with tabindex above 0 is out of page order\" + (lastForced > 0 ? \" now.\" : \".\") : lastForced > 0 ? \"No stops with tabindex above 0 now.\" : \"No stops with tabindex above 0.\"]);\n lastForced = forcedBad.length;\n if (nNew) announce(pl(nNew, \"new problem\", \"new problems\") + \": \" + Object.keys(fresh).join(\", \") + \".\");\n}\nfunction goTo(e) {\n if (!e.isConnected) return;\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n if (stops.indexOf(e) < 0) return queue();\n endPress();\n e.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction logLi(e, doc) {\n var li = doc.createElement(\"li\");\n li.className = \"lx \" + RES[e.k];\n function sp(cls, text) {\n var x = doc.createElement(\"span\");\n x.className = cls;\n x.textContent = text;\n li.appendChild(x);\n return x;\n }\n sp(\"tm\", clock(e.t));\n sp(\"st\", e.k);\n var bd = sp(\"bd\", \"\");\n var ft = doc.createElement(CHECKS.indexOf(e.f) >= 0 ? \"a\" : \"b\");\n ft.className = \"ft\";\n ft.textContent = e.f;\n if (ft.tagName === \"A\") {\n ft.className = \"ft lq\";\n ft.href = showUrl(e.f);\n ft.target = \"_blank\";\n ft.rel = \"noopener\";\n ft.title = \"What \" + e.f + \" checks\";\n if (doc === document) ft.tabIndex = outT();\n }\n bd.appendChild(ft);\n bd.appendChild(doc.createTextNode(\" \"));\n if (wcagOf(e)) {\n var wc = doc.createElement(\"span\");\n wc.className = \"wc\";\n wc.textContent = \"WCAG \" + wcagOf(e);\n bd.appendChild(wc);\n bd.appendChild(doc.createTextNode(\" \"));\n }\n e.p.forEach(function (x) {\n if (typeof x === \"string\") return bd.appendChild(doc.createTextNode(x));\n if (!x.n) return bd.appendChild(doc.createTextNode(partText(x)));\n var c = doc.createElement(\"button\");\n c.type = \"button\";\n c.className = \"lc\";\n c.textContent = String(x.n);\n c.setAttribute(\"aria-label\", \"Go to stop \" + x.n);\n if (doc === document) c.tabIndex = panelIn ? 0 : -1;\n c.addEventListener(\"click\", function () {\n if (doc !== document && tabOpen() && window.name) logTab.open(\"\", window.name);\n goTo(x.el);\n });\n bd.appendChild(c);\n bd.appendChild(doc.createTextNode(\" \\\"\" + x.l + \"\\\"\"));\n });\n return li;\n}\nfunction logText() {\n var c = logCounts();\n var out = [\"Tab trail \" + VERSION + \" log\", addr(), stamp(), browser() + \", window \" + innerWidth + \" x \" + innerHeight, pl(stops.length, \"stop\", \"stops\") + \", \" + pl(c.bad, \"problem\", \"problems\") + \", \" + c.ok + \" OK, \" + c.skip + \" skipped\", \"\"];\n logs.slice().reverse().forEach(function (e) {\n out.push(clock(e.t) + \" \" + (e.k + \" \").slice(0, 8) + \" \" + e.f + (showWcag && wcagOf(e) ? \" (WCAG \" + wcagOf(e) + \")\" : \"\"));\n out.push(\" \" + e.p.map(partText).join(\"\"));\n });\n return out.join(\"\\n\");\n}\nvar W_FORCE = \"2.4.3 Focus Order (Level A). tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\", W_TRAP = \"2.1.2 No Keyboard Trap (Level A)\", W_KEY = \"2.1.1 Keyboard (Level A)\", W_VIS = \"2.4.7 Focus Visible (Level AA)\", W_ORDER = \"2.4.3 Focus Order (Level A)\", W_HIDE = \"2.4.11 Focus Not Obscured (Minimum) (Level AA)\";\nfunction cssId(t) { return /^[A-Za-z][\\w-]*$/.test(t); }\nfunction sel(e) {\n if (!e || e.nodeType !== 1) return \"\";\n var rt = e.getRootNode(), live = e.isConnected, path = [];\n for (var n = e; n && n.nodeType === 1; n = n.parentElement) {\n var t = n.tagName.toLowerCase();\n if (n.id && cssId(n.id) && !secretish(n.id) && live && rt.querySelectorAll(\"#\" + n.id).length === 1) {\n path.unshift(\"#\" + n.id);\n break;\n }\n if (t === \"html\" || t === \"body\") {\n path.unshift(t);\n break;\n }\n var c = typeof n.className === \"string\" ? n.className.trim().split(/\\s+/).filter(function (x) { return cssId(x) && !secretish(x); }).slice(0, 2) : [];\n var part = t + (c.length ? \".\" + c.join(\".\") : \"\"), par = n.parentElement;\n if (par) {\n var same = Array.prototype.filter.call(par.children, function (x) { return x.tagName === n.tagName; });\n if (same.length > 1) part += \":nth-of-type(\" + (same.indexOf(n) + 1) + \")\";\n }\n path.unshift(part);\n if (live) {\n try { if (rt.querySelectorAll(path.join(\" > \")).length === 1) break; } catch (x) {}\n }\n }\n var out = path.join(\" > \");\n if (rt && rt.host) out = sel(rt.host) + \" (inside its shadow root) \" + out;\n return out;\n}\nvar KEEP = /^(id|class|role|type|name|href|src|tabindex|disabled|hidden|contenteditable|aria-[\\w-]+)$/, VOID = /^(area|br|col|embed|hr|img|input|link|meta|source|track|wbr)$/;\nfunction attrText(n, v) {\n if (n === \"href\" || n === \"src\") return cleanUrl(v);\n if (n === \"id\" || n === \"class\") return scrub(v);\n if (n === \"role\" || n === \"type\") return v;\n v = scrub(v);\n return v.length > 60 ? v.slice(0, 60) + \"...\" : v;\n}\nfunction snip(e, kids) {\n var tag = e.tagName.toLowerCase(), open = \"<\" + tag;\n [].forEach.call(e.attributes, function (a) {\n if (KEEP.test(a.name)) open += \" \" + a.name + \"=\\\"\" + attrText(a.name, a.value).replace(/\"/g, \""\") + \"\\\"\";\n });\n open += \">\";\n if (VOID.test(tag)) return open;\n if (kids && e.children.length) return open + [].slice.call(e.children, 0, 8).map(function (c) { return c.children.length ? snip(c).replace(/>[^<]*<\\/[\\w-]+>$/, \">...</\" + c.tagName.toLowerCase() + \">\") : snip(c); }).join(\"\") + (e.children.length > 8 ? \"...\" : \"\") + \"</\" + tag + \">\";\n var text = scrub((e.textContent || \"\").trim().replace(/\\s+/g, \" \"));\n return open + (text.length > 40 ? text.slice(0, 40) + \"...\" : text) + \"</\" + tag + \">\";\n}\nvar FRAME = /^(__.*|SegmentViewNode|LayoutRouter.*|InnerLayoutRouter|OuterLayoutRouter|RenderFromTemplateContext|ScrollAndFocusHandler|InnerScrollAndFocusHandler|.*Boundary.*|HTTPAccessFallback.*|Router|AppRouter|HotReload|ReactDevOverlay|DevRootHTTPAccessFallbackBoundary|ServerRoot|Root|AppContainer|Suspense|Fragment|StrictMode|Head|Html|Body|Script|ClientPageRoot|ClientSegmentRoot|.*Provider|.*Context|.*Consumer|Link|LinkComponent|Image|ForwardRef|Memo|Anonymous|_c\\d*)$/;\nfunction compOf(e) {\n var keys = Object.keys(e), k = keys.filter(function (x) { return x.indexOf(\"__reactFiber$\") === 0 || x.indexOf(\"__reactInternalInstance$\") === 0; })[0];\n if (k) {\n var names = [], src = \"\", any = false;\n for (var f = e[k]; f && names.length < 3; f = f.return) {\n var t = f.type;\n if (!src && f._debugSource && f._debugSource.fileName) src = f._debugSource.fileName + \":\" + f._debugSource.lineNumber;\n if (!t || typeof t === \"string\" || typeof t === \"symbol\") continue;\n var n = t.displayName || t.name || (t.render && (t.render.displayName || t.render.name)) || (t.type && (t.type.displayName || t.type.name));\n if (!n) continue;\n any = true;\n if (FRAME.test(n) || names.indexOf(n) >= 0) continue;\n names.push(n);\n }\n if (!names.length) return any ? \"React, rendered by a server component or by the framework itself, so its component name is not in the browser; search the code for the HTML or its classes\" : \"\";\n if (names.every(function (n) { return n.length <= 2; })) return \"React (component names are minified in this production build; a development build shows them)\";\n return \"React \" + names[0] + (names.length > 1 ? \", inside \" + names.slice(1).join(\", inside \") : \"\") + (src ? \", source \" + src : \"\");\n }\n if (e.__vueParentComponent) {\n var vn = [];\n for (var c = e.__vueParentComponent; c && vn.length < 3; c = c.parent) {\n var nm = c.type && (c.type.name || c.type.__name);\n if (nm && vn.indexOf(nm) < 0) vn.push(nm);\n }\n if (vn.length) return \"Vue \" + vn[0] + (vn.length > 1 ? \", inside \" + vn.slice(1).join(\", inside \") : \"\");\n }\n if (e.__vue__ && e.__vue__.$options && e.__vue__.$options.name) return \"Vue \" + e.__vue__.$options.name;\n try {\n var ng = window.ng;\n if (ng && ng.getOwningComponent) {\n var oc = ng.getOwningComponent(e);\n if (oc && oc.constructor) return \"Angular \" + oc.constructor.name;\n }\n } catch (x) {}\n return \"\";\n}\nfunction whereOf(el) {\n if (!el || !el.isConnected) return \"\";\n var out = [], up = el.parentElement;\n while (up && up !== document.body && up !== document.documentElement && !up.id) up = up.parentElement;\n if (up && up.id && up !== document.body) out.push(\"inside #\" + scrub(up.id));\n var hs = document.querySelectorAll(\"h1,h2,h3,h4,h5,h6,[role=heading]\"), last = null;\n for (var i = 0; i < hs.length; i++) {\n if (hs[i] === el || (host && host.contains(hs[i]))) continue;\n if (hs[i].contains(el) || hs[i].compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) last = hs[i]; else break;\n }\n var t = last ? scrub((last.textContent || \"\").replace(/\\s+/g, \" \").trim()).slice(0, 60) : \"\";\n if (t) out.push(\"under the heading \\\"\" + t + \"\\\"\");\n return out.join(\", \");\n}\nfunction aiOf(crit, expect, fix, els, more, lazy) {\n function fact(x) {\n var o = { role: x[0], el: x[1] };\n function fill() {\n o.sel = x[2] ? x[2].sel : sel(x[1]);\n o.html = x[2] ? x[2].html : snip(x[1], x[3]);\n o.comp = compOf(x[1]);\n }\n if (!lazy) fill();\n else [\"sel\", \"html\", \"comp\"].forEach(function (k) {\n Object.defineProperty(o, k, { configurable: true, enumerable: true, get: function () { fill(); return o[k]; }, set: function (v) { Object.defineProperty(o, k, { value: v, writable: true, enumerable: true }); } });\n });\n return o;\n }\n return {\n crit: crit,\n expect: expect,\n fix: fix,\n more: more || [],\n els: els.filter(function (x) { return x[1]; }).map(fact)\n };\n}\nfunction tally(k) {\n var m = {}, order = [];\n logs.forEach(function (e) {\n if (e.k !== k) return;\n if (!m[e.f]) {\n m[e.f] = 0;\n order.push(e.f);\n }\n m[e.f]++;\n });\n return order.map(function (f) { return f + \" \" + m[f]; }).join(\", \");\n}\nfunction stamp() {\n var d = new Date();\n return d.getFullYear() + \"-\" + two(d.getMonth() + 1) + \"-\" + two(d.getDate()) + \" \" + two(d.getHours()) + \":\" + two(d.getMinutes());\n}\nfunction verifyOf(e) {\n var a = e.ai, t = e.p.map(partText).join(\"\");\n function el(r) {\n var x = a.els.filter(function (y) { return y.role === r; })[0];\n return x ? x.sel : \"\";\n }\n if (e.f === \"Missed spots\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" gets a stop number and the skipped count goes down by 1. Press Tab until it has focus, then Enter (and Space for a button) does what a click does.\";\n if (e.f === \"Forced order\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" has no tabindex above 0, its stop number matches its place on the page, and the Forced order count goes down by 1.\";\n if (e.f === \"Hover menus\") return \"Press Tab until a link inside \" + el(\"Element\") + \" has focus: the menu opens while focus is inside it, and Tab trail no longer lists it under hover menus.\";\n if (e.f === \"Hidden focus\") return \"Press Tab until \" + el(\"Element\") + \" has focus: part of it shows next to \" + el(\"Covered by\") + \", and its Hidden focus line in the log says in view or partly covered.\";\n if (e.f === \"Keyboard trap\") return \"Put focus on \" + el(\"Element\") + \" and press Tab: focus moves on to \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n if (e.f === \"Lost focus\") return \"Open the popup from \" + el(\"Opened by\") + \" with Enter, then close it with Escape or its close button: focus is back on \" + el(\"Opened by\") + \", and the log shows an OK Lost focus line.\";\n if (el(\"Popup\")) return \"Reload so the popup shows, then press Tab once: focus lands inside \" + el(\"Popup\") + \".\";\n return \"Put focus on \" + (el(\"Tab left from\") || \"the start of the page\") + \" and press \" + (t.indexOf(\"(Shift+Tab)\") >= 0 ? \"Shift+Tab\" : \"Tab\") + \" once: focus lands on \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n}\nvar hidTested = new Set();\nfunction coverage() {\n var out = [], left = stops.filter(function (x) { return !hidTested.has(x); }).map(function (x) { return stops.indexOf(x) + 1; });\n if (left.length) out.push(\"Hidden focus: \" + left.length + \" of \" + pl(stops.length, \"stop was\", \"stops were\") + \" never tested (\" + left.slice(0, 30).join(\", \") + (left.length > 30 ? \" and \" + (left.length - 30) + \" more\" : \"\") + \"). Press Play to test every stop.\");\n var presses = logs.filter(function (e) { return e.f === \"Out of order\" || e.f === \"Keyboard trap\"; }).length;\n out.push(\"Out of order and Keyboard trap: judged only for the \" + pl(presses, \"Tab press\", \"Tab presses\") + \" made in this run. Press Tab through the whole page, and Shift+Tab back, to judge every step.\");\n var pops = logs.filter(function (e) { return e.f === \"Lost focus\"; }).length;\n out.push(\"Lost focus: \" + (pops ? \"only \" + pl(pops, \"popup was\", \"popups were\") : \"no popups were\") + \" opened and closed in this run. Open and close every popup, menu and dialog on the page to check them all.\");\n out.push(\"Window size: everything was tested at \" + innerWidth + \" x \" + innerHeight + \" only. Sticky bars, menus and popups can behave differently on phones; run it again in a window about 390 px wide.\");\n out.push(\"Not checked by Tab trail at all: whether the focus outline is visible and has enough contrast, accessible names of buttons and links, color contrast of text, what a screen reader announces, and content inside iframes. Use axe DevTools or Lighthouse for names, contrast and iframes. Check focus visibility with Spotlight and screen reader output with VoiceOver or NVDA.\");\n return out;\n}\nvar probLog = [], ignore = [], CAP = 200, judgedDir = {};\nfunction ignored(e) {\n return ignore.length && e.ai.els.some(function (x) {\n for (var n = x.el; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n for (var i = 0; i < ignore.length; i++) if (n.matches(ignore[i])) return true;\n }\n return false;\n });\n}\nfunction openProbs(all) {\n var seen = {}, out = [];\n probLog.forEach(function (e) {\n var t = e.f + e.p.map(partText).join(\"\");\n if (e.fixed || seen[t]) return;\n seen[t] = 1;\n if (all || !ignored(e)) out.push(e);\n });\n return out;\n}\nfunction hash(t) {\n var h = 2166136261;\n for (var i = 0; i < t.length; i++) h = Math.imul(h ^ t.charCodeAt(i), 16777619);\n return (\"0000000\" + (h >>> 0).toString(16)).slice(-8);\n}\nfunction keyOf(e) {\n var t = e.tagName.toLowerCase();\n if (e.id && cssId(e.id)) return t + \"#\" + e.id;\n var up = \"\";\n for (var p = e.parentElement; p; p = p.parentElement) if (p.id && cssId(p.id)) { up = \"#\" + p.id + \" \"; break; }\n return up + t + (e.getAttribute(\"role\") ? \"[role=\" + e.getAttribute(\"role\") + \"]\" : \"\") + (e.getAttribute(\"name\") ? \"[name=\" + e.getAttribute(\"name\") + \"]\" : \"\") + \"\\\"\" + label(e) + \"\\\"\";\n}\nfunction mainEl(e) {\n var to = e.ai.els.filter(function (x) { return x.role === \"Tab jumped to\"; })[0];\n return to || e.ai.els[0];\n}\nfunction problemsOf(list) {\n var used = {};\n return list.map(function (e) {\n var m = mainEl(e), id = hash(e.f + \"|\" + e.ai.els.map(function (x) { return keyOf(x.el); }).join(\"|\"));\n used[id] = (used[id] || 0) + 1;\n return { id: used[id] > 1 ? id + \"-\" + used[id] : id, check: e.f, wcag: wcagOf(e) || null, selector: m ? m.sel : null, html: m ? m.html : null, component: m && m.comp ? m.comp : null, fix: e.ai.fix, verify: verifyOf(e) };\n });\n}\nfunction aiText() {\n var out = [], skips = [], seenS = {}, notes = [], probs = openProbs(), left = openProbs(true).length - probs.length, ids = problemsOf(probs), groups = [], byKey = {};\n probs.forEach(function (e, i) {\n var m = mainEl(e), k = /^(Missed spots|Hover menus|Forced order)$/.test(e.f) && m ? e.f + \"|\" + e.ai.fix + \"|\" + desc(m.el) + \"|\" + m.comp : \"#\" + i, g = byKey[k];\n if (!g) groups.push((g = byKey[k] = { i: i, list: [] }));\n g.list.push(e);\n });\n logs.forEach(function (e) {\n var t = e.p.map(partText).join(\"\");\n if (e.k === \"SKIPPED\" && !seenS[e.f + t]) {\n seenS[e.f + t] = 1;\n skips.push(e.f + \": \" + t);\n } else if (e.k === \"INFO\") notes.push(clock(e.t) + \" \" + e.f + \": \" + t);\n });\n var c = logCounts();\n out.push(\"Tab trail \" + VERSION + \" report for an AI agent\");\n out.push(\"Page: \" + addr());\n out.push(\"Ran on: \" + stamp() + \", \" + browser() + \", window \" + innerWidth + \" x \" + innerHeight);\n out.push(\"Tool: Tab trail (matjazkorosec.com/tools/tab-trail), a bookmarklet that checks the keyboard Tab order of the page. Stop numbers are positions in the Tab order when the check ran. Use the selectors, the HTML and the component names to find each element in the code.\");\n out.push(\"Run it again from a script (for example Playwright): save https://raw.githubusercontent.com/matjazkorosec/tab-trail/v\" + VERSION + \"/dist/tab-trail.js in your repo once and load your saved copy with page.evaluate(readFileSync(...)), which works under a Content Security Policy. Then await window.__tabTrail.play() to walk every stop, and read window.__tabTrail.problems() for every open problem as data, window.__tabTrail.report() for this same report or window.__tabTrail.log() for every line.\");\n out.push(\"\");\n out.push(\"Summary: \" + pl(probs.length, \"problem\", \"problems\") + \" to fix\" + (groups.length < probs.length ? \" (\" + pl(groups.length, \"different fix\", \"different fixes\") + \")\" : \"\") + \". \" + pl(c.ok, \"check\", \"checks\") + \" passed, \" + c.skip + \" skipped.\");\n if (walkEnd || walking) out.push(\"Play: \" + playState() + \".\");\n var pass = tally(\"OK\"), sk = tally(\"SKIPPED\");\n if (pass) out.push(\"Passed: \" + pass + \".\");\n if (sk) out.push(\"Skipped: \" + sk + \".\");\n var ran = ranChecks();\n if (ran.length) out.push(\"Checked: \" + ran.join(\", \") + \". Each check is explained at \" + showUrl(ran[0]).replace(/#.*/, \"#shows\") + \" under Fix what turns red.\");\n if (left) out.push(\"Left out on purpose: \" + pl(left, \"problem\", \"problems\") + \" inside \" + ignore.join(\", \") + \".\");\n if (groups.length > CAP) out.push(\"Showing the first \" + CAP + \" of \" + groups.length.toLocaleString(\"en-US\") + \" problems. window.__tabTrail.problems() returns every one.\");\n groups.slice(0, CAP).forEach(function (g, n) {\n var e = g.list[0], i = g.i, more = g.list.length - 2;\n out.push(\"\");\n out.push(\"Problem \" + (n + 1) + \" of \" + groups.length + \": \" + e.f + (g.list.length > 1 ? \", \" + g.list.length + \" elements with the same cause: \" + desc(mainEl(e).el) + \" (\" + g.list.slice(0, 2).map(function (x) { return \"\\\"\" + label(mainEl(x).el) + \"\\\"\"; }).join(\", \") + (more > 0 ? \" and \" + more + \" more\" : \"\") + \"). Fix it once in the component that draws them.\" : \"\") + \" (\" + clock(e.t) + \")\");\n out.push(\"Id: \" + ids[i].id + (g.list.length > 1 ? \" (the first of \" + g.list.length + \", window.__tabTrail.problems() lists every one)\" : \"\"));\n if (e.ai) out.push(\"WCAG: \" + e.ai.crit);\n out.push(\"What happened: \" + e.p.map(partText).join(\"\"));\n if (!e.ai) return;\n out.push(\"Expected: \" + e.ai.expect);\n e.ai.els.forEach(function (x) {\n out.push(x.role + \": \" + x.sel + (x.el.isConnected ? \"\" : \" (no longer on the page)\"));\n out.push(\" HTML: \" + x.html);\n if (x.comp) out.push(\" Component: \" + x.comp);\n var where = whereOf(x.el);\n if (where) out.push(\" Where: \" + where);\n });\n e.ai.more.forEach(function (m) { out.push(m); });\n out.push(\"Fix hint: \" + e.ai.fix);\n out.push(\"How to check the fix: \" + verifyOf(e));\n if (CHECKS.indexOf(e.f) >= 0) out.push(\"About this check: \" + showUrl(e.f));\n });\n out.push(\"\");\n out.push(\"Not covered in this run:\");\n coverage().forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length) {\n out.push(\"\");\n out.push(\"Skipped checks, and why:\");\n skips.slice(0, 12).forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length > 12) out.push(\"- and \" + (skips.length - 12) + \" more\");\n }\n if (notes.length) {\n out.push(\"\");\n out.push(\"Notes:\");\n notes.slice(-10).forEach(function (t) { out.push(\"- \" + t); });\n }\n return out.join(\"\\n\");\n}\nfunction copyIt(b, w, text, word) {\n var d = w.document;\n var lb = b.lastChild && b.lastChild.nodeType === 3 ? b.lastChild : b;\n function done(ok) {\n lb.textContent = ok ? \"Copied\" : \"Copy failed\";\n setTimeout(function () { lb.textContent = word; }, 1500);\n }\n function old() {\n var back = w === window ? deep() : d.activeElement;\n var ta = d.createElement(\"textarea\");\n ta.value = text;\n ta.setAttribute(\"readonly\", \"\");\n ta.style.cssText = \"position:fixed;left:0;top:0;width:1px;height:1px;opacity:0\";\n (w === window ? root : d.body).appendChild(ta);\n ta.focus({ preventScroll: true });\n ta.select();\n var ok = false;\n try { ok = d.execCommand(\"copy\"); } catch (x) {}\n ta.remove();\n if (back && back.focus) back.focus({ preventScroll: true });\n done(ok);\n }\n if (w.navigator.clipboard && w.isSecureContext) w.navigator.clipboard.writeText(text).then(function () { done(true); }, old);\n else old();\n}\nfunction filters(parent, doc) {\n var row = doc.createElement(\"div\");\n row.className = \"lf\";\n var set = FILT.map(function (f) {\n var b = doc.createElement(\"button\");\n b.type = \"button\";\n b.className = \"lt\";\n b.addEventListener(\"click\", function () {\n logFilter = f[0];\n logDraw();\n });\n row.appendChild(b);\n return b;\n });\n parent.appendChild(row);\n filterSets.push(set);\n return set;\n}\nfunction logSummary() {\n var c = logCounts();\n logSum.textContent = \" \" + pl(c.all, \"event\", \"events\");\n logBad.textContent = c.bad ? pl(c.bad, \"problem\", \"problems\") : \"\";\n logGroup.classList.toggle(\"warn\", c.bad > 0);\n filterSets.forEach(function (set) {\n set.forEach(function (b, i) {\n b.textContent = FILT[i][1] + \" \" + c[FILT[i][0]];\n b.setAttribute(\"aria-pressed\", logFilter === FILT[i][0] ? \"true\" : \"false\");\n b.classList.toggle(\"e\", FILT[i][0] === \"bad\" && c.bad > 0);\n });\n });\n if (tabSum && tabOpen()) tabSum.textContent = addr() + \", \" + pl(stops.length, \"stop\", \"stops\");\n checkedLine(logChecked, document);\n if (tabChecked && tabOpen()) checkedLine(tabChecked, logTab.document);\n if (sumLine && walkEnd === \"done\") sumDraw();\n}\nfunction logDraw() {\n if (logTab && logTab.closed) tabGone();\n logSummary();\n [logList, tabList].forEach(function (u) { if (u) while (u.firstChild) u.removeChild(u.firstChild); });\n logs.forEach(function (e) { e.li = null; });\n var away = tabOpen();\n logBody.hidden = !logOpen || away;\n logAway.hidden = !away;\n logBtn.setAttribute(\"aria-expanded\", logBody.hidden ? \"false\" : \"true\");\n var v = logView();\n if (!v) return;\n var frag = v.ownerDocument.createDocumentFragment();\n logs.slice().reverse().forEach(function (e) {\n if (!shows(e)) return;\n e.li = logLi(e, v.ownerDocument);\n frag.appendChild(e.li);\n });\n v.appendChild(frag);\n toTop(v);\n}\nfunction tabGone() {\n logTab = null;\n tabList = null;\n tabSum = null;\n tabChecked = null;\n wcagBoxes = wcagBoxes.filter(function (b) { return b.ownerDocument === document; });\n tabNote = null;\n filterSets = filterSets.filter(function (x) { return x !== tabSet; });\n tabSet = null;\n if (tabPoll) clearInterval(tabPoll);\n tabPoll = 0;\n}\nvar TAB_CSS = [\n \"body{margin:0;padding:12px;background:#e4dccd;color:#1a1612;font:15px/1.5 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif}\",\n \".hd,.box{box-sizing:border-box;max-width:1200px;margin:0 auto;background:#fbf8f3;border-radius:12px}\",\n \".wide .hd,.wide .box{max-width:none}\",\n \".fw{display:inline-grid;place-items:center;width:34px;height:34px;padding:0;border:1.5px solid #1a1612;border-radius:8px;background:#fff;color:#1a1612;cursor:pointer;box-sizing:border-box}\",\n \".fw:hover{background:#efe8dc}\",\n \".fw:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".fw .in,.wide .fw .out{display:none}\",\n \".wide .fw .in{display:inline}\",\n \".hd{position:sticky;top:12px;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:10px 8px;padding:14px 18px;box-shadow:0 0 0 12px #e4dccd}\",\n \".box{margin-top:8px;padding:12px 0 8px;overflow:hidden}\",\n \"h1{margin:0;font:700 22px/1.2 Georgia,serif}\",\n \".u{margin:0 auto 0 6px;color:#5f564c}\",\n \".nt{flex-basis:100%;margin:0;color:#d0103a;font-weight:700}\",\n \".nt[hidden]{display:none}\",\n \".lf{display:inline-grid;grid-auto-flow:column;gap:2px;padding:3px;background:#efe8dc;border-radius:10px;margin-right:14px}\",\n \".fr{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px 0}\",\n \".lt,.kl,.ka,.lo,.lc{font:inherit;color:inherit;cursor:pointer}\",\n \".lt{padding:3px 14px;border:0;border-radius:7px;background:none;color:#5f564c;font-weight:600;font-size:14px}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".kl,.ka,.lo{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border-radius:8px;font-weight:700;font-size:14px;white-space:nowrap;box-sizing:border-box}\",\n \".kl,.lo{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover,.lo:hover{background:#efe8dc}\",\n \".ka{border:0;background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".lo{font-weight:600}\",\n \".lt:focus-visible,.kl:focus-visible,.ka:focus-visible,.lo:focus-visible,.lc:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lck{margin:0;padding:0 18px 8px}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".ll{list-style:none;margin:0;padding:0}\",\n \".lx{display:grid;grid-template-columns:72px 80px 1fr;gap:2px 12px;padding:6px 18px;align-items:baseline}\",\n \".lx:hover{background:#f3ede3}\",\n \".lx .bd{min-width:0;overflow-wrap:anywhere}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".tm,.st{font:500 14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".st{font-weight:700}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{display:inline-block;min-width:24px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;background:none;font-size:14px;line-height:1.4;text-align:center}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\"\n].join(\"\");\nvar ownName = false, tabWide = false;\nfunction openTab() {\n var w = window.open(\"\", \"_blank\");\n if (!w) {\n tabMsg.hidden = false;\n return;\n }\n tabMsg.hidden = true;\n logTab = w;\n if (!window.name) {\n window.name = \"tab-trail-\" + Date.now();\n ownName = true;\n }\n var d = w.document;\n d.title = \"Tab trail log: \" + location.host;\n try {\n var tsh = new w.CSSStyleSheet();\n tsh.replaceSync(TAB_CSS);\n d.adoptedStyleSheets = [tsh];\n } catch (e) {\n var st = d.createElement(\"style\");\n st.textContent = TAB_CSS;\n d.head.appendChild(st);\n }\n var hd = d.createElement(\"div\");\n hd.className = \"hd\";\n var h1 = d.createElement(\"h1\");\n h1.textContent = \"Tab trail log\";\n hd.appendChild(h1);\n tabSum = d.createElement(\"p\");\n tabSum.className = \"u\";\n hd.appendChild(tabSum);\n var cp = d.createElement(\"button\");\n cp.type = \"button\";\n cp.className = \"kl\";\n icon(cp, 16, COPY_ICON, 1.6);\n cp.appendChild(d.createTextNode(\"Copy log\"));\n cp.addEventListener(\"click\", function () { copyIt(cp, w, logText(), \"Copy log\"); });\n hd.appendChild(cp);\n var ca = d.createElement(\"button\");\n ca.type = \"button\";\n ca.className = \"ka\";\n icon(ca, 16, AI_ICON, 1.6);\n ca.appendChild(d.createTextNode(\"Copy for AI\"));\n ca.addEventListener(\"click\", function () { copyIt(ca, w, aiText(), \"Copy for AI\"); });\n hd.appendChild(ca);\n var bk = d.createElement(\"button\");\n bk.type = \"button\";\n bk.className = \"lo\";\n bk.textContent = \"Put back in panel\";\n bk.addEventListener(\"click\", putBack);\n hd.appendChild(bk);\n var fw = d.createElement(\"button\");\n fw.type = \"button\";\n fw.className = \"fw\";\n fw.setAttribute(\"aria-label\", \"Full width\");\n fw.title = \"Full width\";\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n icon(fw, 16, \"M1.5 8h13M1.5 8l3-3M1.5 8l3 3M14.5 8l-3-3M14.5 8l-3 3\", 1.6).setAttribute(\"class\", \"out\");\n icon(fw, 16, \"M1.5 8h4.5M6 8l-3-3M6 8l-3 3M14.5 8H10M10 8l3-3M10 8l3 3\", 1.6).setAttribute(\"class\", \"in\");\n fw.addEventListener(\"click\", function () {\n tabWide = !tabWide;\n d.body.classList.toggle(\"wide\", tabWide);\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n });\n hd.appendChild(fw);\n d.body.classList.toggle(\"wide\", tabWide);\n tabNote = d.createElement(\"p\");\n tabNote.className = \"nt\";\n tabNote.textContent = \"Tab trail was closed on the page. This log no longer updates.\";\n tabNote.hidden = true;\n hd.appendChild(tabNote);\n var fr = d.createElement(\"div\");\n fr.className = \"fr\";\n hd.appendChild(fr);\n tabSet = filters(fr, d);\n wcagBox(fr, d);\n d.body.appendChild(hd);\n d.body.classList.toggle(\"nw\", !showWcag);\n var bd = d.createElement(\"div\");\n bd.className = \"box\";\n d.body.appendChild(bd);\n tabChecked = d.createElement(\"p\");\n tabChecked.className = \"lck\";\n bd.appendChild(tabChecked);\n tabList = d.createElement(\"ul\");\n tabList.className = \"ll\";\n bd.appendChild(tabList);\n tabPoll = setInterval(function () {\n if (logTab && logTab.closed) {\n tabGone();\n logDraw();\n }\n }, 1000);\n logOpen = true;\n logDraw();\n}\nfunction putBack() {\n var w = logTab;\n tabGone();\n logOpen = true;\n logDraw();\n if (w && !w.closed) w.close();\n}\nfunction lbtn(cls, text, parent) {\n var b = document.createElement(\"button\");\n b.type = \"button\";\n b.className = cls;\n b.textContent = text;\n parent.appendChild(b);\n return b;\n}\nvar logGroup = document.createElement(\"div\");\nlogGroup.className = \"lgp\";\nvar logBtn = document.createElement(\"button\");\nlogBtn.type = \"button\";\nlogBtn.className = \"sg\";\nlogBtn.setAttribute(\"aria-expanded\", \"false\");\nvar logWord = document.createElement(\"b\");\nlogWord.textContent = \"Log\";\nicon(logBtn, 16, \"M4 1.5h8v13H4zM6.5 5h3M6.5 8h3M6.5 11h2\", 1.6);\nlogBtn.appendChild(logWord);\nvar logSum = document.createElement(\"span\");\nlogSum.className = \"ls\";\nvar logBad = document.createElement(\"span\");\nlogBad.className = \"bg\";\nvar logInfo = document.createElement(\"span\");\nlogInfo.appendChild(logSum);\nlogBtn.appendChild(logInfo);\nlogBtn.appendChild(logBad);\nlogBtn.appendChild(document.createElement(\"i\"));\nlogGroup.appendChild(logBtn);\nvar logBody = document.createElement(\"div\");\nlogBody.className = \"lbd\";\nlogBody.hidden = true;\nlogGroup.appendChild(logBody);\nvar logTop = document.createElement(\"div\");\nlogTop.className = \"lr lrt\";\nlogBody.appendChild(logTop);\nvar logChecked = document.createElement(\"p\");\nlogChecked.className = \"lck\";\nlogChecked.hidden = true;\nlogBody.appendChild(logChecked);\nfilters(logBody, document);\nwcagBox(logBody, document);\nvar logList = document.createElement(\"ul\");\nlogList.className = \"ll\";\nlogBody.appendChild(logList);\nvar logRow = document.createElement(\"div\");\nlogRow.className = \"lr lb2\";\nlogBody.appendChild(logRow);\nvar copyBtn = lbtn(\"kl\", \"Copy log\", logRow);\ncopyBtn.insertBefore(icon(copyBtn, 16, COPY_ICON, 1.6), copyBtn.firstChild);\ncopyBtn.addEventListener(\"click\", function () { copyIt(copyBtn, window, logText(), \"Copy log\"); });\nvar aiLog = lbtn(\"ka\", \"Copy for AI\", logRow);\naiLog.insertBefore(icon(aiLog, 16, AI_ICON, 1.6), aiLog.firstChild);\naiLog.addEventListener(\"click\", function () { copyIt(aiLog, window, aiText(), \"Copy for AI\"); });\nfunction newTabBtn(parent) {\n var b = lbtn(\"lnt\", \"\", parent);\n icon(b, 14, \"M9 2.5h4.5V7M13.5 2.5L7.5 8.5M12 9.5v4h-9.5v-9.5h4\", 1.6);\n b.appendChild(document.createTextNode(\"Open log in new tab\"));\n b.addEventListener(\"click\", openTab);\n return b;\n}\nnewTabBtn(logTop);\nvar logEnd = document.createElement(\"div\");\nlogEnd.className = \"lr\";\nlogBody.insertBefore(logEnd, logRow.nextSibling);\nnewTabBtn(logEnd);\nvar tabMsg = document.createElement(\"p\");\ntabMsg.className = \"lm\";\ntabMsg.textContent = \"The browser blocked the new tab. Allow pop-ups for this site and try again.\";\ntabMsg.hidden = true;\nlogBody.insertBefore(tabMsg, logChecked);\nvar logAway = document.createElement(\"div\");\nlogAway.className = \"la\";\nlogAway.hidden = true;\nvar awayText = document.createElement(\"p\");\nawayText.textContent = \"The log is open in a new tab.\";\nlogAway.appendChild(awayText);\nvar awayRow = document.createElement(\"div\");\nawayRow.className = \"lr\";\nlogAway.appendChild(awayRow);\nlbtn(\"lo\", \"Show it\", awayRow).addEventListener(\"click\", function () { if (tabOpen()) logTab.focus(); });\nlbtn(\"lo\", \"Put it back\", awayRow).addEventListener(\"click\", putBack);\nlogGroup.appendChild(logAway);\nlogBtn.addEventListener(\"click\", function () {\n if (tabOpen()) return logTab.focus();\n logOpen = !logOpen;\n logDraw();\n if (!logOpen) return;\n var gr = logGroup.getBoundingClientRect(), pr = panel.getBoundingClientRect();\n if (gr.bottom > pr.bottom) panel.scrollTop += Math.min(gr.bottom - pr.bottom, gr.top - pr.top);\n});\ntray.insertBefore(logGroup, tray.firstChild);\nlogGroup.className = \"lgp sec\";\n[[legendBtn, legend], [keysBtn, keysBox], [gear, settings]].forEach(function (p) {\n var w = document.createElement(\"div\");\n w.className = \"sec\";\n tray.insertBefore(w, p[0]);\n w.appendChild(p[0]);\n w.appendChild(p[1]);\n});\n[logBtn, legendBtn, keysBtn, gear].forEach(function (b) {\n var g = b.querySelector(\"svg\"), t = document.createElement(\"span\");\n t.className = \"ic\";\n b.insertBefore(t, g);\n t.appendChild(g);\n});\nwcagSync();\nlogSummary();\nroot.appendChild(panel);\nskipPanel();\nvar closed = false;\nfunction place() {\n if (closed) return;\n var m = modal(), to = m || document.documentElement;\n if (host.parentNode !== to) to.appendChild(host);\n var want = { position: m ? \"fixed\" : \"absolute\", left: m ? -scrollX + \"px\" : \"0px\", top: m ? -scrollY + \"px\" : \"0px\" };\n for (var k in want) if (host.style[k] !== want[k]) host.style[k] = want[k];\n}\nplace();\n\nfunction el(name, attrs, parent) {\n var n = document.createElementNS(NS, name);\n for (var k in attrs) n.setAttribute(k, attrs[k]);\n parent.appendChild(n);\n return n;\n}\nvar queued = false, onlyScreen = true, boxKey = [];\nvar current = -1;\nvar pinned = new WeakMap();\nfunction isPinned(e) {\n if (pinned.has(e)) return pinned.get(e);\n var p = false;\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") { p = true; break; }\n }\n pinned.set(e, p);\n return p;\n}\nfunction clear(g) { while (g.firstChild) g.removeChild(g.firstChild); }\nvar spotEl = null;\nfunction lit(r) {\n clear(spot);\n if (!light.checked) return;\n var W = innerWidth, H = innerHeight, d = \"M0 0H\" + W + \"V\" + H + \"H0Z\";\n if (r && (r.width || r.height)) {\n var x0 = r.left - 6, y0 = r.top - 6, x1 = r.right + 6, y1 = r.bottom + 6, k = Math.min(8, (x1 - x0) / 2, (y1 - y0) / 2);\n d += \"M\" + (x0 + k) + \" \" + y0 + \"H\" + (x1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x1 + \" \" + (y0 + k) + \"V\" + (y1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x1 - k) + \" \" + y1 + \"H\" + (x0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x0 + \" \" + (y1 - k) + \"V\" + (y0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x0 + k) + \" \" + y0 + \"Z\";\n }\n el(\"path\", { d: d, fill: \"rgba(15,12,10,.72)\", \"fill-rule\": \"evenodd\" }, spot);\n}\nfunction box(m, r, layer) {\n if (m === shownEl) {\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, layer);\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, layer);\n }\n el(\"rect\", { x: r.left, y: r.top, width: r.width, height: r.height, fill: \"rgba(208,16,58,.12)\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\", rx: 3 }, layer);\n}\nfunction trailLine(pts, layer) {\n if (pts.length < 2) return;\n var p = pts.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \");\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 6, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\", opacity: 0.9 }, layer);\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 3, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\" }, layer);\n}\nfunction dotsIn(list, layer) {\n list.sort(function (a, b) { return (a[2] - 1 === current) - (b[2] - 1 === current); });\n list.forEach(function (d) {\n var big = d[2] > 99, on = d[2] - 1 === current;\n var g = el(\"g\", { class: \"o\", \"data-i\": d[2] - 1 }, layer);\n if (on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 19 : 17, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 4 }, g);\n if (d[3] && !on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: \"#fff\", stroke: \"#1a1612\", \"stroke-width\": 2, \"stroke-dasharray\": \"4 3\" }, g);\n else el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: on ? \"#c2410c\" : \"#1a1612\", stroke: \"#fff\", \"stroke-width\": 2 }, g);\n var t = el(\"text\", { x: d[0], y: d[1] + 0.5, fill: d[3] && !on ? \"#1a1612\" : \"#fff\", \"font-size\": big ? 10 : 11, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\", \"text-anchor\": \"middle\", \"dominant-baseline\": \"middle\" }, g);\n t.textContent = d[2];\n });\n}\nfunction shortLines(pts, sx, sy) {\n var W = innerWidth, H = innerHeight, MAX = 100;\n var v = pts.map(function (p) { return p[2] ? [p[0], p[1]] : [p[0] - sx, p[1] - sy]; });\n function on(p) { return p[0] >= 0 && p[0] <= W && p[1] >= 0 && p[1] <= H; }\n function arrow(from, to, L) {\n var dx = to[0] - from[0], dy = to[1] - from[1], len = Math.sqrt(dx * dx + dy * dy) || 1;\n var ux = dx / len, uy = dy / len;\n var tip = [from[0] + ux * L, from[1] + uy * L];\n trailLine([from, tip], svg);\n var pts3 = [[tip[0] + ux * 6, tip[1] + uy * 6], [tip[0] - ux * 9 + uy * 9, tip[1] - uy * 9 - ux * 9], [tip[0] - ux * 9 - uy * 9, tip[1] - uy * 9 + ux * 9]];\n el(\"polygon\", { points: pts3.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \"), fill: \"#ff8f57\", stroke: \"#fff\", \"stroke-width\": 2, \"stroke-linejoin\": \"round\" }, svg);\n }\n for (var k = 1; k < v.length; k++) {\n var a = v[k - 1], b = v[k], ia = on(a), ib = on(b);\n var len = Math.sqrt((b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1]));\n if (ia && ib && len <= MAX) trailLine([a, b], svg);\n else if (ia && ib) {\n var L = Math.min(MAX - 6, len / 2 - 12);\n arrow(a, b, L);\n arrow(b, a, L);\n }\n else if (ia || ib) arrow(ia ? a : b, ia ? b : a, Math.min(MAX - 6, len));\n }\n}\nfunction draw() {\n queued = false;\n var page = !onlyScreen;\n onlyScreen = true;\n var sx = scrollX, sy = scrollY;\n var last = Math.max(Math.ceil(stops.length / PAGE) - 1, 0);\n if (win > last) win = last;\n var lo = paged() ? win * PAGE : 0, hi = paged() ? Math.min(lo + PAGE, stops.length) : stops.length;\n var red = [], at = [];\n missed.concat(hovers).forEach(function (m) {\n var p = isPinned(m);\n if (p || page) red.push([m, m.getBoundingClientRect(), p]);\n });\n for (var i = lo; i < hi; i++) {\n var sr = stops[i].getBoundingClientRect(), st = sr.width < 2 && sr.height < 2;\n at.push([sr, st, st || isPinned(stops[i])]);\n }\n var fr = shownEl && hovers.indexOf(shownEl) < 0 && forced.indexOf(shownEl) >= 0 ? [shownEl.getBoundingClientRect(), isPinned(shownEl)] : null;\n var lr = light.checked && spotEl && spotEl.isConnected ? spotEl.getBoundingClientRect() : null;\n var key = [shownEl];\n red.forEach(function (x) { if (!x[2]) key.push(x[0], x[1].left + sx, x[1].top + sy, x[1].width, x[1].height); });\n if (fr && !fr[1]) key.push(fr[0].left + sx, fr[0].top + sy, fr[0].width, fr[0].height);\n var keep = page && same(key, boxKey);\n if (page) boxKey = key;\n clear(svg);\n clear(dot);\n clear(under);\n lit(lr);\n if (page) {\n clear(svgPg);\n clear(dotPg);\n if (!keep) clear(underPg);\n }\n red.forEach(function (x) {\n var m = x[0], r = x[1];\n if (x[2]) box(m, r, under);\n else if (!keep) box(m, { left: r.left + sx, top: r.top + sy, width: r.width, height: r.height }, underPg);\n });\n if (fr) {\n var hr = fr[0], hp = fr[1];\n if (hp || (page && !keep)) {\n var hx = hp ? hr.left : hr.left + sx, hy = hp ? hr.top : hr.top + sy, hl = hp ? under : underPg;\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, hl);\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, hl);\n }\n }\n var hid = 0, placedPg = [], placedSc = [], pts = [], dotsPg = [], dotsSc = [];\n var big = stops.length > PAGE;\n group.style.display = big ? \"\" : \"none\";\n pager.style.display = paged() ? \"\" : \"none\";\n chunkBox.style.marginTop = paged() ? \"\" : \"0\";\n if (paged()) {\n pageText.textContent = \"Stops \" + (lo + 1) + \" to \" + hi + \" of \" + stops.length;\n prevBtn.disabled = win === 0;\n nextBtn.disabled = win === last;\n }\n stops.forEach(function (s, i) {\n if (i < lo || i >= hi) return;\n var r = at[i - lo][0];\n var tiny = at[i - lo][1];\n var onScreen = at[i - lo][2];\n var cx = tiny ? 13 + hid++ * 30 : onScreen ? Math.max(r.left - 8, 13) : Math.max(r.left + sx - 8, 13);\n var cy = tiny ? 13 : onScreen ? Math.max(r.top - 8, 13) : Math.max(r.top + sy - 8, 13);\n var placed = onScreen ? placedSc : placedPg;\n for (var j = placed.length - 1, tries = 0; j >= 0 && tries < 40; j--) {\n if (Math.abs(placed[j][0] - cx) < 26 && Math.abs(placed[j][1] - cy) < 26) {\n cx = placed[j][0] + 28;\n j = placed.length;\n tries++;\n }\n }\n placed.push([cx, cy]);\n pts.push([cx, cy, onScreen]);\n (onScreen ? dotsSc : dotsPg).push([cx, cy, i + 1, tiny]);\n });\n if (lines.checked && !stub.checked) shortLines(pts, sx, sy);\n var run = [], runPg = null;\n function flush() {\n if (runPg === null) return;\n if (runPg) { if (page) trailLine(run, svgPg); }\n else trailLine(run, svg);\n run = [];\n runPg = null;\n }\n for (var k = lines.checked && stub.checked ? 1 : pts.length; k < pts.length; k++) {\n var a = pts[k - 1], b = pts[k], both = !a[2] && !b[2];\n if (runPg !== both) {\n flush();\n runPg = both;\n run.push(both || a[2] ? [a[0], a[1]] : [a[0] - sx, a[1] - sy]);\n }\n run.push(both || b[2] ? [b[0], b[1]] : [b[0] - sx, b[1] - sy]);\n }\n flush();\n if (page) dotsIn(dotsPg, dotPg);\n dotsIn(dotsSc, dot);\n}\nfunction queue(screenOnly) {\n if (screenOnly !== true) onlyScreen = false;\n if (!queued) { queued = true; requestAnimationFrame(draw); }\n}\nvar timer = 0, idle = 0, nextScan = 0, settling = false;\nfunction same(a, b) {\n if (a.length !== b.length) return false;\n for (var i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\nfunction rescan() {\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n timer = 0;\n idle = 0;\n if (closed) return;\n if (settling) return later();\n var t0 = performance.now();\n place();\n pinned = new WeakMap();\n scan();\n if (!same(drawn, sig())) {\n fill();\n scan();\n renderJumps();\n review();\n }\n focus();\n var t1 = performance.now();\n nextScan = t1 + Math.max(500, 4 * (t1 - t0));\n}\nvar due = 0;\nfunction later(min) {\n if (idle || closed) return;\n var wait = Math.max(min || 500, nextScan - performance.now());\n if (timer) {\n if (performance.now() + wait >= due) return;\n clearTimeout(timer);\n }\n due = performance.now() + wait;\n timer = setTimeout(function () {\n timer = 0;\n if (window.requestIdleCallback) idle = requestIdleCallback(rescan, { timeout: 1000 });\n else rescan();\n }, wait);\n}\nvar LOUD = /^(tabindex|disabled|inert|href|role|open|hidden)$/;\nfunction matters(m) {\n var t = m.target;\n if (t === host || host.contains(t)) return false;\n if (m.type === \"childList\") {\n var l = [].concat([].slice.call(m.addedNodes), [].slice.call(m.removedNodes));\n for (var i = 0; i < l.length; i++) if (l[i].nodeType === 1) return true;\n return false;\n }\n if (LOUD.test(m.attributeName || \"\") || t.nodeType !== 1) return true;\n if (stopSet.has(t) || upSet.has(t) || t.matches(FOCUSABLE) || t.querySelector(FOCUSABLE)) return true;\n return missed.concat(hovers, forced).some(function (x) { return t === x || t.contains(x); });\n}\nfunction onMoved(e) { if (host.style.position === \"fixed\") place(); queue((stub.checked || !lines.checked) && !!e && e.type === \"scroll\" && (e.target === document || e.target === document.documentElement)); later(); }\nvar watch = new MutationObserver(function (list) {\n place();\n if (openPop && gone(openPop)) popClosed();\n for (var i = 0; i < list.length; i++) if (matters(list[i])) return later();\n later(3000);\n});\nfunction focus() {\n var a = deep();\n track(a);\n if (a && a !== document.body && a !== document.documentElement) {\n lost = false;\n if (a !== host && a.getRootNode() !== root) spotEl = a;\n } else spotEl = null;\n current = stops.indexOf(a);\n if (current !== seen) {\n seen = current;\n if (current >= 0) win = Math.floor(current / PAGE);\n }\n queue();\n}\nfunction lose(e) {\n var t = e && !e.relatedTarget && e.composedPath ? e.composedPath()[0] : null, p = t && t.nodeType === 1 ? popupOf(t) : null;\n if (p && p === openPop) requestAnimationFrame(function () { if (!closed && openPop === p && gone(p)) popClosed(); });\n setTimeout(function () {\n var a = document.activeElement;\n if (a && a !== document.body && a !== document.documentElement) return;\n lost = true;\n focus();\n }, 0);\n}\nvar walking = false, walkDelay = 400, walkT = 0, walked = new Set(), walkAt = null, walkEnd = null;\nfunction walkedN() { return stops.filter(function (s) { return walked.has(s); }).length; }\nfunction playState() {\n var at = walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) + \" \\\"\" + label(walkAt) + \"\\\"\" : \"\";\n var n = \"walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\");\n if (walking) return \"still walking\" + at + \", \" + n;\n return walkEnd === \"done\" ? \"finished, \" + n : \"paused\" + at + \", \" + n;\n}\nfunction playLook() {\n while (playIcon.firstChild) playIcon.removeChild(playIcon.firstChild);\n icon(playIcon, 12, walking ? \"M5 3v10M11 3v10\" : \"M4 2.5l9 5.5-9 5.5z\", 2.4);\n playWord.textContent = walking ? \"Pause\" : \"Play\";\n play.setAttribute(\"aria-pressed\", walking ? \"true\" : \"false\");\n if (walked.size) playText.textContent = \"Walked \" + walkedN() + \" of \" + stops.length + \" stops\";\n}\nfunction walkedText() { return \" after \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\"; }\nfunction stopWalk(why, fin) {\n if (!walking) return;\n walking = false;\n walkEnd = fin ? \"done\" : \"paused\";\n settling = false;\n if (walkT) clearTimeout(walkT);\n walkT = 0;\n playLook();\n if (why) log(\"INFO\", \"Play it\", [why]);\n sumDraw();\n if (fin) announce(\"Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \". \" + pl(logCounts().bad, \"problem\", \"problems\") + \".\");\n else if (why) announce(\"Play paused\" + (walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) : \"\") + \". Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\");\n var done = walkDone;\n walkDone = [];\n done.forEach(function (f) { f(aiText()); });\n}\nfunction step(s) {\n walkT = 0;\n if (!walking || closed) return;\n if (!s || stops.indexOf(s) < 0) s = stops.filter(function (x) { return !walked.has(x); })[0];\n if (!s) {\n stopWalk(\"Finished: walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\", true);\n return;\n }\n endPress();\n s.focus({ focusVisible: true });\n focus();\n walked.add(s);\n walkAt = s;\n playLook();\n var at = where(s), still = 0, tries = 0;\n settling = true;\n function wait() {\n if (!walking || closed) return void (settling = false);\n var now = where(s);\n if (now !== at) {\n at = now;\n still = 0;\n } else still++;\n if (++tries < 90 && (still < 2 || tries < 6)) return requestAnimationFrame(wait);\n settling = false;\n hoverTry(s);\n check(s, function () {\n if (walking && !closed) walkT = setTimeout(function () { step(); }, walkDelay);\n });\n }\n requestAnimationFrame(wait);\n}\nvar walkDone = [];\nfunction untested() {\n var judged = {};\n logs.forEach(function (e) { if ((e.k === \"OK\" || e.k === \"PROBLEM\") && e.f === \"Lost focus\") judged[e.f] = 1; });\n if (judgedDir[1] && judgedDir[-1]) judged[\"Out of order\"] = judged[\"Keyboard trap\"] = 1;\n openProbs().forEach(function (e) { judged[e.f] = 1; });\n return [\"Out of order\", \"Keyboard trap\", \"Lost focus\"].filter(function (f) { return !judged[f]; });\n}\nfunction sumDraw() {\n sumLine.hidden = walking || walkEnd !== \"done\";\n if (sumLine.hidden) return;\n var per = {}, probs = openProbs(), left = untested();\n probs.forEach(function (e) { per[e.f] = (per[e.f] || 0) + 1; });\n var red = CHECKS.filter(function (f) { return per[f]; }), ok = CHECKS.filter(function (f) { return !per[f] && left.indexOf(f) < 0; });\n var tabLeft = left.indexOf(\"Out of order\") >= 0 || left.indexOf(\"Keyboard trap\") >= 0, popLeft = left.indexOf(\"Lost focus\") >= 0;\n while (sumLine.firstChild) sumLine.removeChild(sumLine.firstChild);\n var b = document.createElement(\"b\");\n b.textContent = pl(CHECKS.length, \"check\", \"checks\") + \": \" + ok.length + \" passed, \" + red.length + (red.length === 1 ? \" found a problem, \" : \" found problems, \") + left.length + \" not tested.\";\n sumLine.appendChild(b);\n function part(head, list, cls, count) {\n if (!list.length) return;\n sumLine.appendChild(document.createTextNode(\" \" + head + \": \"));\n var sp = document.createElement(\"span\");\n sp.className = cls;\n sp.textContent = list.map(function (f) { return f + (count ? \" \" + per[f] : \"\"); }).join(\", \");\n sumLine.appendChild(sp);\n sumLine.appendChild(document.createTextNode(\".\"));\n }\n part(\"Passed\", ok, \"g\");\n part(red.length === 1 ? \"Problem\" : \"Problems\", red, \"e\", true);\n part(\"Not tested (\" + (tabLeft && popLeft ? \"press Tab and Shift+Tab, open and close a popup\" : tabLeft ? \"press Tab and Shift+Tab\" : \"open and close a popup\") + \")\", left, \"q\");\n}\nfunction startWalk() {\n walking = true;\n sumDraw();\n if (walkedN() >= stops.length) walked = new Set();\n playLook();\n var first = current >= 0 && current < stops.length - 1 && walked.size ? current + 1 : 0;\n if (stops[first]) {\n log(\"INFO\", \"Play it\", [first ? \"Went on from \" : \"Started at \", ref(stops[first]), \".\"]);\n announce((first ? \"Play went on from stop \" : \"Play started at stop \") + (first + 1) + \".\");\n }\n step(stops[first]);\n}\nplay.addEventListener(\"click\", function () {\n if (walking) return stopWalk(\"Paused with the Pause button\" + walkedText());\n walkDelay = 400;\n startWalk();\n});\nfunction interrupt(e) {\n if (!walking || (e.composedPath && e.composedPath().indexOf(host) >= 0)) return;\n stopWalk(\"Paused by a click on the page\" + walkedText());\n}\nplayLook();\nvar SAFARI = MAC && /^Safari /.test(browser()), FIREFOX = MAC && /^Firefox /.test(browser());\nvar settleT = 0, macNote = false, beforeEl = null, wantEl = null, MAC_NOTE = SAFARI ? \"Safari skips links and buttons on Tab until you turn it on: Settings, Advanced, Press Tab to highlight each item.\" : \"Firefox skips links on Tab until you turn it on: System Settings, Keyboard, Keyboard navigation.\";\nvar LINKS = \"a[href],area[href]\", SKIPS = SAFARI ? [\"a[href]\", \"area[href]\", \"button\", \"input[type=button]\", \"input[type=submit]\", \"input[type=reset]\", \"input[type=image]\", \"input[type=checkbox]\", \"input[type=radio]\", \"input[type=range]\", \"input[type=file]\", \"input[type=color]\"].map(function (q) { return q + \":not([tabindex])\"; }).join(\",\") : LINKS;\nfunction linkSkip(want, cur, dir) {\n if (!SAFARI && !FIREFOX) return null;\n var n = stops.length, k = 0, links = 0;\n for (var i = want; i !== cur && k < n; i = (i + dir + n) % n, k++) {\n if (!stops[i].matches(SKIPS)) return null;\n if (stops[i].matches(LINKS)) links++;\n }\n return k && k < n ? [links, k - links] : null;\n}\nfunction skipText(c) {\n var l = c[0] ? pl(c[0], \"link\", \"links\") : \"\", b = c[1] ? pl(c[1], \"button\", \"buttons\") : \"\";\n return l && b ? l + \" and \" + b : l || b;\n}\nfunction after(el, dir) {\n var ord = new Map(), n = stops.length, pick = -1;\n walk(document, []).forEach(function (e, i) { ord.set(e, i); });\n var at = ord.get(el);\n if (at === undefined) return dir > 0 ? 0 : n - 1;\n for (var i = 0; i < n; i++) {\n var k = ord.get(stops[i]);\n if (stops[i].tabIndex > 0 || k === undefined) continue;\n if (dir > 0 && k > at) return i;\n if (dir < 0 && k < at) pick = i;\n }\n return dir > 0 ? 0 : pick >= 0 ? pick : forced.length ? forced.length - 1 : n - 1;\n}\nvar stays = new WeakMap(), leaves = new WeakMap();\nfunction tellsHow(e) {\n if (!(e.tagName === \"TEXTAREA\" || e.isContentEditable || /^(application|textbox)$/.test(e.getAttribute(\"role\") || \"\"))) return false;\n var r = e.getRootNode(), t = (e.getAttribute(\"aria-description\") || \"\") + \" \" + (e.getAttribute(\"aria-keyshortcuts\") || \"\") + \" \" + (e.getAttribute(\"title\") || \"\");\n (e.getAttribute(\"aria-describedby\") || \"\").split(/\\s+/).forEach(function (id) { var x = id && r.getElementById ? r.getElementById(id) : null; if (x) t += \" \" + x.textContent; });\n return /\\b(escape|esc)\\b/i.test(t);\n}\nfunction multi(e) { return /^(IFRAME|OBJECT|EMBED|AUDIO|VIDEO)$/.test(e.tagName) || !!e.shadowRoot || (e.tagName === \"INPUT\" && /^(date|datetime-local|month|time|week)$/.test(e.type)); }\nfunction endPress() {\n if (settleT) {\n clearTimeout(settleT);\n settle();\n }\n pressed = 0;\n}\nfunction settle() {\n settleT = 0;\n focus();\n if (pressed && current >= 0) {\n check(stops[current]);\n hoverTry(stops[current]);\n }\n if (!pressed || current < 0 || before === -2) {\n if (pressed && before === -2) log(\"SKIPPED\", \"Out of order\", [\"Focus was on the page body, so this Tab press is not judged.\"]);\n else if (pressed) {\n var o = deep();\n if (o && o !== document.body && o !== document.documentElement && !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(o), \", which is not in the list of stops. Not judged.\"]);\n else if (!o || !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Focus left the page, or went to the browser. Not judged.\"]);\n }\n pressed = 0;\n return;\n }\n var w0 = before >= 0 ? (before + pressed + stops.length) % stops.length : -1;\n if (w0 >= 0 && w0 !== current && !tabbable(stops[w0])) {\n var fromEl = stops[before], toEl = stops[current];\n rescan();\n current = stops.indexOf(toEl);\n before = stops.indexOf(fromEl);\n if (before < 0) beforeEl = fromEl;\n if (current < 0) {\n log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(toEl), \", which is not in the list of stops. Not judged.\"]);\n pressed = 0;\n return;\n }\n }\n var n = stops.length, src = before >= 0 ? null : beforeEl, first = before < 0 && !src;\n var want = before >= 0 ? (before + pressed + n) % n : src ? after(src, pressed) : pressed > 0 ? 0 : n - 1;\n if (before >= 0 && wantEl && stops.indexOf(wantEl) >= 0) want = stops.indexOf(wantEl);\n var landed = popupOf(stops[current]), left = before >= 0 ? popupOf(stops[before]) : src ? popupOf(src) : null;\n if (first && pressed > 0 && !landed && !popMissed) {\n for (var k = 0; k < n && !popMissed; k++) {\n var pop = popupOf(stops[k]);\n if (pop && shown(pop) && blocking(pop)) popMissed = pop;\n }\n if (popMissed) {\n renderJumps();\n announce(\"A popup blocks the page, but the first Tab went somewhere else.\");\n log(\"PROBLEM\", \"Out of order\", [popName(popMissed), \" blocks the page, but the first Tab went to \", ref(stops[current]), \".\"], aiOf(W_ORDER, \"A popup that blocks the page gets keyboard focus first, so the first Tab lands inside it.\", \"When the popup opens, move focus into it: call .focus() on its first control, or on the popup itself with tabindex=\\\"-1\\\". A <dialog> opened with showModal() does this by itself.\", [[\"Popup\", popMissed], [\"First Tab went to\", stops[current]]]));\n }\n }\n var start = before >= 0 ? [ref(stops[before])] : src ? [ref(src)] : [\"Start\"], back = pressed < 0 ? \" (Shift+Tab)\" : \"\";\n if (current === before && current !== want && !landed && !left) {\n var s = stops[current];\n var d = pressed > 0 ? 1 : -1, st = stays.get(s) || stays.set(s, {}).get(s), key1 = d > 0 ? \"Tab\" : \"Shift+Tab\", key2 = d > 0 ? \"Shift+Tab\" : \"Tab\";\n if (multi(s)) log(\"SKIPPED\", \"Out of order\", start.concat([\" \\u2192 \", ref(s), back + \": Tab moved inside it, it has parts of its own (like a date field, a video or a frame). Not judged.\"]));\n else if (tellsHow(s)) {\n if (!st.how) log(\"SKIPPED\", \"Keyboard trap\", [ref(s), \" keeps Tab, and says how to leave.\"]);\n st.how = 1;\n } else if (!st[d] && (leaves.get(s) || {})[-d]) {\n st[d] = 1;\n log(\"OK\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \", but \" + key2 + \" leaves it, so it is not a trap.\"]);\n } else if (!st[d] && !st[-d]) {\n st[d] = 1;\n log(\"SKIPPED\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \". Press \" + key2 + \": if focus can't leave that way either, it is a keyboard trap.\"]);\n } else if (!st[d] && trapped.indexOf(s) < 0) {\n st[d] = 1;\n trapped.push(s);\n renderJumps();\n announce(\"Keyboard trap: Tab and Shift+Tab both stay on stop \" + (current + 1) + \".\");\n log(\"PROBLEM\", \"Keyboard trap\", [\"Tab and Shift+Tab both stay on \", ref(s), \": the keyboard can't move focus away.\"], aiOf(W_TRAP, \"Tab or Shift+Tab moves focus away from the element, so a keyboard user can leave it.\", \"Find the keydown listener on the element or its parents that calls preventDefault() on Tab, or that calls .focus() on the same element again, and let Tab through. If the element needs Tab (a code editor), let Escape move focus out and say so next to it.\", [[\"Element\", s], [\"Expected next\", stops[(current + 1) % n]]]));\n }\n pressed = 0;\n return;\n }\n if (before >= 0 && current !== before) {\n var lv = leaves.get(stops[before]) || leaves.set(stops[before], {}).get(stops[before]), sd = pressed > 0 ? 1 : -1, so = stays.get(stops[before]);\n if (!lv[sd] && so && so[-sd] && !so[sd] && trapped.indexOf(stops[before]) < 0) log(\"OK\", \"Keyboard trap\", [(sd > 0 ? \"Tab\" : \"Shift+Tab\") + \" leaves \", ref(stops[before]), \", so it is not a trap.\"]);\n lv[sd] = 1;\n }\n var skipped = current !== want && !landed && !left ? linkSkip(want, current, pressed > 0 ? 1 : -1) : null;\n if (first && pressed > 0 && landed) log(\"OK\", \"Out of order\", [\"First Tab went into the popup \", popName(landed), \".\"]);\n else if (skipped) {\n if (!macNote) {\n macNote = true;\n renderJumps();\n log(\"INFO\", \"Out of order\", [MAC_NOTE]);\n }\n log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \": your browser skipped \" + skipText(skipped) + \". Not judged.\"]));\n } else if (current !== want && !landed && !left && !(popMissed && first)) {\n var from = before >= 0 ? stops[before] : src, to = stops[current], fromText = before >= 0 ? \"stop \" + (before + 1) : src ? \"\\\"\" + label(src) + \"\\\" \" + desc(src) : \"the start of the page\";\n announce(\"Tab jumped out of order, from \" + (before >= 0 ? \"stop \" + (before + 1) : src ? label(src) : \"the start\") + \" to stop \" + (current + 1) + \".\");\n if (!jumps.some(function (j) { return j[0] === from && j[1] === to; })) {\n jumps.push([from, to]);\n renderJumps();\n }\n log(\"PROBLEM\", \"Out of order\", start.concat([\" → \", ref(to), back + \", expected \", ref(stops[want]), to.tabIndex > 0 ? \". It has tabindex=\\\"\" + to.tabIndex + \"\\\".\" : \".\"]), aiOf(W_ORDER, \"Tab\" + (pressed < 0 ? \" with Shift\" : \"\") + \" moves from \" + fromText + \" to stop \" + (want + 1) + \", the next element in the Tab order.\", to.tabIndex > 0 ? \"Remove tabindex=\\\"\" + to.tabIndex + \"\\\" from the element Tab jumped to, or set it to 0. A positive tabindex pulls an element ahead of the page order.\" : \"Tab follows the order of the HTML, so a jump comes from a script. Look for code that calls .focus() on focus, blur or keydown near the element Tab left from, and for content added or moved while Tab was pressed. If the element Tab jumped to sits elsewhere in the HTML on purpose, move it next to the one before it.\", [[\"Tab left from\", from], [\"Tab jumped to\", to], [\"Expected next\", stops[want]]]));\n } else if (current !== want) log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + (landed || left ? \": into or inside a popup, allowed.\" : \": the popup that blocks the page is listed already.\")]));\n else log(\"OK\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \", next in line.\"]));\n pressed = 0;\n}\nfunction inPanel() {\n var a = root.activeElement;\n return !!a && panel.contains(a);\n}\nfunction panelCtl() {\n return [].filter.call(panel.querySelectorAll(\"button,a,input\"), function (e) { return !e.disabled && e.getClientRects().length > 0; });\n}\nfunction enter() {\n endPress();\n if (walking) stopWalk(\"Paused by \" + KEYS + walkedText());\n var a = deep();\n pRet = a && a !== document.body && a !== document.documentElement && a !== host && a.getRootNode() !== root ? a : null;\n panelIn = true;\n skipPanel();\n play.focus({ focusVisible: true });\n}\nfunction back() {\n var r = pRet;\n panelIn = false;\n pRet = null;\n skipPanel();\n if (r && r.isConnected) r.focus({ focusVisible: true });\n else {\n var a = root.activeElement;\n if (a && a.blur) a.blur();\n }\n}\nfunction key(e) {\n if (e.code === \"KeyF\" && e.ctrlKey && e.shiftKey && !e.altKey && !e.metaKey) {\n e.preventDefault();\n e.stopPropagation();\n if (inPanel()) back();\n else enter();\n return;\n }\n if (e.key !== \"Tab\" && settleT) endPress();\n lastKey = e.key;\n keyT = Date.now();\n keyOn = deep();\n if (walking && (e.key === \" \" || e.key === \"Tab\" || e.key === \"Escape\")) {\n if (e.key === \" \") e.preventDefault();\n stopWalk(\"Paused by \" + (e.key === \" \" ? \"Space\" : e.key) + walkedText());\n if (e.key !== \"Tab\") return;\n }\n if (panelIn && inPanel()) {\n if (e.key === \"Escape\") {\n e.preventDefault();\n return back();\n }\n if (e.key === \"Tab\" && skip.checked) {\n var l = panelCtl(), i = l.indexOf(root.activeElement), n = l.length;\n e.preventDefault();\n if (n) l[i < 0 ? 0 : (i + (e.shiftKey ? -1 : 1) + n) % n].focus({ focusVisible: true });\n return;\n }\n }\n var fa = deep(), onBody = !fa || fa === document.body || fa === document.documentElement;\n if (e.key === \"Escape\" && !modal() && !(openPop && !gone(openPop)) && (onBody || inPanel())) close();\n if (e.key === \"Tab\") {\n endPress();\n fa = deep();\n pressed = e.shiftKey ? -1 : 1;\n before = current < 0 && lost ? -2 : current;\n beforeEl = current < 0 && !lost && fa && fa !== document.body && fa !== document.documentElement && !within(host, fa) ? fa : null;\n wantEl = null;\n for (var k = 1, n = stops.length; before >= 0 && k < n; k++) {\n var c = stops[(((before + pressed * k) % n) + n) % n];\n if (tabbable(c)) {\n wantEl = c;\n break;\n }\n }\n settleT = setTimeout(settle, 150);\n }\n}\nfunction pick(e) {\n var g = e.target.closest && e.target.closest(\"g.o\");\n if (!g) return;\n e.preventDefault();\n e.stopPropagation();\n if (e.type !== \"click\") return;\n var s = stops[+g.getAttribute(\"data-i\")];\n if (!s) return;\n endPress();\n s.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction close() {\n closed = true;\n stopWalk();\n removeEventListener(\"pointerdown\", interrupt, true);\n removeEventListener(\"pointerdown\", tap, true);\n removeEventListener(\"scroll\", onMoved, true);\n removeEventListener(\"resize\", onMoved);\n removeEventListener(\"resize\", keepIn);\n if (fit) fit.disconnect();\n watch.disconnect();\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n if (sayT) clearTimeout(sayT);\n if (settleT) clearTimeout(settleT);\n removeEventListener(\"keydown\", key, true);\n removeEventListener(\"focusin\", focus, true);\n removeEventListener(\"focusout\", lose, true);\n if (tabPoll) clearInterval(tabPoll);\n if (logTab && !logTab.closed && tabNote) tabNote.hidden = false;\n if (window.__tabTrail === api) delete window.__tabTrail;\n if (ownName) window.name = \"\";\n host.remove();\n}\nvar grab = null;\npanel.addEventListener(\"pointerdown\", function (e) {\n if (e.button !== 0 || e.target.closest(\"button,a,ul,label\")) return;\n var r = panel.getBoundingClientRect();\n grab = [e.clientX - r.left, e.clientY - r.top];\n panel.setPointerCapture(e.pointerId);\n panel.classList.add(\"g\");\n});\npanel.addEventListener(\"pointermove\", function (e) {\n if (!grab) return;\n var x = Math.min(Math.max(e.clientX - grab[0], 0), innerWidth - panel.offsetWidth);\n var y = Math.min(Math.max(e.clientY - grab[1], 0), innerHeight - panel.offsetHeight);\n panel.style.left = x + \"px\";\n panel.style.top = y + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n});\nfunction drop() { grab = null; panel.classList.remove(\"g\"); }\nfunction keepIn() {\n if (closed) return;\n var r = panel.getBoundingClientRect(), m = 8;\n if (!r.height || (r.top >= m && r.bottom <= innerHeight - m && r.left >= m && r.right <= innerWidth - m)) return;\n panel.style.top = Math.min(Math.max(r.top, m), Math.max(m, innerHeight - m - r.height)) + \"px\";\n panel.style.left = Math.min(Math.max(r.left, m), Math.max(m, innerWidth - m - r.width)) + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n}\nvar fit = window.ResizeObserver ? new ResizeObserver(keepIn) : null;\nif (fit) fit.observe(panel);\naddEventListener(\"resize\", keepIn);\npanel.addEventListener(\"pointerup\", drop);\npanel.addEventListener(\"pointercancel\", drop);\nhost.__close = close;\nfunction mainOf(e) {\n var first = null;\n for (var i = 0; i < e.p.length; i++) {\n var x = e.p[i];\n if (typeof x === \"string\" || !x.el) continue;\n if (i && typeof e.p[i - 1] === \"string\" && /\\u2192 $/.test(e.p[i - 1])) return x;\n if (!first) first = x;\n }\n return first;\n}\nvar api = {\n report: function () { return aiText(); },\n log: function () {\n return logs.map(function (e) {\n var m = mainOf(e);\n return { time: clock(e.t), result: e.k, check: e.f, wcag: wcagOf(e) || null, text: e.p.map(partText).join(\"\"), fixed: !!e.fixed, selector: m ? sel(m.el) || null : null, stop: m && m.n ? m.n : null };\n });\n },\n play: function (o) {\n o = o || {};\n var skipOut = [].concat(o.ignore || []);\n for (var i = 0; i < skipOut.length; i++) {\n try { document.querySelector(skipOut[i]); } catch (x) { return Promise.reject(new Error(\"Tab trail: \\\"\" + skipOut[i] + \"\\\" in ignore is not a valid CSS selector.\")); }\n }\n ignore = skipOut;\n walkDelay = typeof o.delay === \"number\" && o.delay >= 0 ? o.delay : 400;\n return new Promise(function (res) {\n walkDone.push(res);\n if (!walking) {\n walked = new Set();\n startWalk();\n }\n });\n },\n problems: function () { return problemsOf(openProbs()); },\n state: function () { return { walked: walkedN(), total: stops.length, done: !walking && walkEnd === \"done\" && stops.every(function (x) { return hidTested.has(x); }), untested: untested() }; },\n version: VERSION,\n close: function () { close(); }\n};\nwindow.__tabTrail = api;\nx.addEventListener(\"click\", close);\naddEventListener(\"scroll\", onMoved, { capture: true, passive: true });\naddEventListener(\"resize\", onMoved);\nwatch.observe(document.documentElement, { subtree: true, childList: true, attributes: true, attributeFilter: [\"style\", \"class\", \"hidden\", \"tabindex\", \"disabled\", \"inert\", \"href\", \"role\", \"open\"] });\naddEventListener(\"keydown\", key, true);\naddEventListener(\"pointerdown\", interrupt, true);\naddEventListener(\"pointerdown\", tap, true);\naddEventListener(\"focusin\", focus, true);\naddEventListener(\"focusout\", lose, true);\nroot.addEventListener(\"focusin\", function () {\n if (root.activeElement === panel && panel.tabIndex < 0) return panel.blur();\n focus();\n});\nroot.addEventListener(\"focusout\", function () {\n setTimeout(function () {\n if (!panelIn || closed || inPanel()) return;\n var a = deep();\n if ((!a || a === document.body || a === document.documentElement) && Date.now() - tapT > 600) return play.focus({ focusVisible: true });\n panelIn = false;\n pRet = null;\n skipPanel();\n }, 0);\n});\n[\"pointerdown\", \"mousedown\", \"pointerup\", \"mouseup\", \"click\"].forEach(function (t) {\n dot.addEventListener(t, pick);\n dotPg.addEventListener(t, pick);\n});\nreview();\nfocus();\ndraw();\n";
|
|
4
|
-
export const FILE = "/*\n * Tab trail 1.0.0, https://matjazkorosec.com/tools/tab-trail\n *\n * MIT License\n *\n * Copyright (c) 2026 Matjaž Korošec\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n(function(){\n/* Tab trail 1.0.0. Copyright (c) 2026 Matjaž Korošec. MIT License, full text: https://github.com/matjazkorosec/tab-trail/blob/main/LICENSE */\nvar VERSION = \"1.0.0\";\nvar ID = \"tab-trail-host\";\nvar prev = [].filter.call(document.querySelectorAll(\"[id='\" + ID + \"']\"), function (e) { return typeof e.__close === \"function\"; })[0];\nif (prev) { prev.__close(); return; }\nvar NS = \"http://www.w3.org/2000/svg\";\nvar FOCUSABLE = \"a[href],area[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[contenteditable]:not([contenteditable='false']),[tabindex]\";\nvar ROLES = /^(button|link|tab|menuitem|menuitemcheckbox|menuitemradio|checkbox|radio|switch|option|combobox|slider|treeitem)$/;\n\nfunction walk(root, out) {\n var kids = root.children;\n for (var i = 0; i < kids.length; i++) visit(kids[i], out);\n return out;\n}\nfunction visit(el, out) {\n if (el.id === ID && el === host && (!skip || skip.checked)) return;\n if (!(host && el.getRootNode() === host.shadowRoot && (!panel.contains(el) || (logList && logList.contains(el))))) out.push(el);\n if (el.shadowRoot) return walk(el.shadowRoot, out);\n if (el.tagName === \"SLOT\" && el.assignedElements) {\n var got = el.assignedElements({ flatten: true });\n if (got.length) {\n for (var i = 0; i < got.length; i++) visit(got[i], out);\n return;\n }\n }\n walk(el, out);\n}\nfunction shown(el) {\n if (el.checkVisibility) return el.checkVisibility({ visibilityProperty: true, opacityProperty: false });\n var s = getComputedStyle(el);\n return s.display !== \"none\" && s.visibility !== \"hidden\" && el.getClientRects().length > 0;\n}\nfunction tabbable(el) {\n if (!el.matches(FOCUSABLE)) return false;\n if (el.tabIndex < 0 || el.matches(\":disabled\") || el.closest(\"[inert]\")) return false;\n if (el.tagName === \"INPUT\" && el.type === \"hidden\") return false;\n if (el.tagName === \"SUMMARY\" && (!el.parentElement || el.parentElement.tagName !== \"DETAILS\" || el.parentElement.querySelector(\"summary\") !== el)) return false;\n return shown(el);\n}\n\nvar stops = [], stopSet = new Set(), upSet = new Set(), missed = [], forced = [], forcedBad = [], domAt = new Map();\nvar GROUP = \"[role=tablist],[role=menu],[role=menubar],[role=listbox],[role=radiogroup],[role=grid],[role=treegrid],[role=tree],[role=toolbar]\";\nvar ITEM = /^(tab|menuitem|menuitemcheckbox|menuitemradio|option|radio|gridcell|row|treeitem)$/;\nfunction nearTab(el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (stopSet.has(p)) return true;\n return upSet.has(el);\n}\nfunction roving(el) {\n var g = el.closest(GROUP);\n if (!g || (!ITEM.test(el.getAttribute(\"role\") || \"\") && !(el.hasAttribute(\"tabindex\") && el.tabIndex < 0))) return false;\n if (stopSet.has(g) || upSet.has(g)) return true;\n var id = g.id;\n return !!id && stops.some(function (s) { return (\" \" + (s.getAttribute(\"aria-controls\") || \"\") + \" \" + (s.getAttribute(\"aria-owns\") || \"\") + \" \").indexOf(\" \" + id + \" \") >= 0; });\n}\nfunction modal() {\n try {\n var l = document.querySelectorAll(\"dialog:modal\");\n return l.length ? l[l.length - 1] : null;\n } catch (e) { return null; }\n}\nfunction within(m, e) {\n for (var n = e; n; n = n.parentNode || n.host) if (n === m) return true;\n return false;\n}\nfunction scan() {\n var all = walk(document, []);\n var top = modal();\n if (top) all = all.filter(function (e) { return within(top, e); });\n var found = all.filter(tabbable);\n var groups = new Map();\n found = found.filter(function (el) {\n if (el.tagName !== \"INPUT\" || el.type !== \"radio\" || !el.name) return true;\n var own = el.form || el.getRootNode(), byName = groups.get(own) || {};\n groups.set(own, byName);\n var g = byName[el.name] || (byName[el.name] = found.filter(function (x) { return x.tagName === \"INPUT\" && x.type === \"radio\" && x.name === el.name && (x.form || x.getRootNode()) === own; }));\n var picked = g.filter(function (x) { return x.checked; })[0] || g[0];\n return picked === el;\n });\n forced = found.filter(function (el) { return el.tabIndex > 0 && !(host && el.getRootNode() === host.shadowRoot); });\n stops = ordered(document, found, null);\n domAt = new Map();\n forced.forEach(function (f) { domAt.set(f, forced.length > 30 ? found.indexOf(f) : ordered(document, found, f).indexOf(f)); });\n forcedBad = forced.filter(function (f) { return domAt.get(f) !== stops.indexOf(f); });\n stopSet = new Set(stops);\n upSet = new Set();\n stops.forEach(function (s) {\n for (var p = s.parentElement; p && !upSet.has(p); p = p.parentElement) upSet.add(p);\n });\n var ids = document.querySelectorAll(\"[id='\" + ID + \"']\"), only = !ids.length || (ids.length === 1 && ids[0] === host);\n var miss = all.filter(function (el) {\n if (stopSet.has(el) || (only ? el === host : el.closest(\"#\" + ID)) || (host && el.getRootNode() === host.shadowRoot)) return false;\n var t = el.tagName;\n if (t === \"HTML\" || t === \"BODY\" || t === \"LABEL\" || t === \"OPTION\" || t === \"OPTGROUP\") return false;\n var role = el.getAttribute(\"role\") || \"\";\n var looks = el.hasAttribute(\"onclick\") || ROLES.test(role);\n var s = getComputedStyle(el);\n if (s.pointerEvents === \"none\") return false;\n if (!looks) {\n if (s.cursor !== \"pointer\") return false;\n var ps = el.parentElement && getComputedStyle(el.parentElement);\n if (ps && ps.cursor === \"pointer\") return false;\n }\n if (el.closest(\"label\") || el.matches(\":disabled\") || el.closest(\"[inert]\") || el.closest(\"[aria-disabled='true']\")) return false;\n if (!shown(el)) return false;\n var r = el.getBoundingClientRect();\n if (r.width < 8 || r.height < 8) return false;\n return !nearTab(el) && !roving(el);\n });\n var missSet = new Set(miss);\n missed = miss.filter(function (el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (missSet.has(p)) return false;\n return true;\n });\n hoverScan();\n}\nfunction ordered(scope, list, flat) {\n var units = [], groups = new Map(), out = [];\n list.forEach(function (el) {\n var h = el;\n while (h.getRootNode() !== scope && h.getRootNode().host) h = h.getRootNode().host;\n if (h === el) return units.push({ k: el === flat ? 0 : el.tabIndex, el: el });\n var g = groups.get(h);\n if (!g) {\n g = { k: h.hasAttribute(\"tabindex\") && h !== flat ? Math.max(h.tabIndex, 0) : 0, host: h, els: [] };\n groups.set(h, g);\n units.push(g);\n }\n g.els.push(el);\n });\n units.filter(function (u) { return u.k > 0; }).sort(function (a, b) { return a.k - b.k; }).concat(units.filter(function (u) { return u.k <= 0; })).forEach(function (u) {\n if (u.host) out = out.concat(ordered(u.host.shadowRoot, u.els, flat));\n else out.push(u.el);\n });\n return out;\n}\nvar hovers = [], hoverOk = [], hovRule = new Map(), hovSeen = new Set(), hovHid = new Map(), tabOpens = new WeakSet();\nfunction hoverTry(s) {\n var hit = false;\n hovers.forEach(function (h) {\n var e = hovHid.get(h);\n if (e && within(h, s) && !within(e, s) && !hiddenNow(e)) {\n tabOpens.add(h);\n hit = true;\n }\n });\n if (hit) rescan();\n}\nvar HOVER = \":hover\", FOC = \":focus-within|:focus-visible|:focus\";\nfunction parts(sel) {\n var out = [], depth = 0, start = 0;\n for (var i = 0; i < sel.length; i++) {\n var ch = sel.charAt(i);\n if (ch === \"(\") depth++;\n else if (ch === \")\") depth--;\n else if (ch === \",\" && !depth) { out.push(sel.slice(start, i).trim()); start = i + 1; }\n }\n out.push(sel.slice(start).trim());\n return out;\n}\nfunction bare(sel, re) {\n return sel.replace(new RegExp(\"(^|[\\\\s>+~(])(\" + re + \")\", \"g\"), \"$1*\").replace(new RegExp(re, \"g\"), \"\");\n}\nfunction reveals(st) {\n var d = st.getPropertyValue(\"display\"), v = st.getPropertyValue(\"visibility\"), o = st.getPropertyValue(\"opacity\"), mh = st.getPropertyValue(\"max-height\");\n return (d !== \"\" && d !== \"none\") || v === \"visible\" || (o !== \"\" && parseFloat(o) > 0) || (mh !== \"\" && mh !== \"0\" && mh !== \"0px\");\n}\nvar cssRules = 0, cssSheets = 0, cssBlocked = [];\nfunction nest(sel, up) {\n if (!up) return sel;\n return parts(sel).map(function (q) { return q.indexOf(\"&\") >= 0 ? q.split(\"&\").join(\":is(\" + up + \")\") : \":is(\" + up + \") \" + q; }).join(\", \");\n}\nfunction depth(p, k) {\n var d = 0;\n for (var i = 0; i < k; i++) {\n var ch = p.charAt(i);\n if (ch === \"\\\\\") i++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n }\n return d;\n}\nfunction compound(p, k) {\n var d = 0, i = k - 1;\n for (; i >= 0; i--) {\n var ch = p.charAt(i);\n if (i > 0 && p.charAt(i - 1) === \"\\\\\") {\n i--;\n continue;\n }\n if (ch === \")\") d++;\n else if (ch === \"(\") {\n if (!d) break;\n d--;\n } else if (!d && /[\\s>+~,]/.test(ch)) break;\n }\n var c = p.slice(i + 1, k).trim();\n return c ? bare(c, HOVER) : \"\";\n}\nfunction selfFocus(p) {\n var m = p.match(new RegExp(FOC)), k = m ? m.index + m[0].length : -1;\n if (k < 0 || depth(p, k)) return false;\n for (var d = 0; k < p.length; k++) {\n var ch = p.charAt(k);\n if (ch === \"\\\\\") k++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n else if (!d && /[\\s>+~]/.test(ch)) return false;\n }\n return true;\n}\nvar sheetMemo = new WeakMap();\nfunction readRules() {\n var hov = [], foc = [];\n cssRules = 0;\n cssSheets = 0;\n cssBlocked = [];\n function take(sel, src) {\n parts(sel).forEach(function (p) {\n if (/:focus/.test(p)) return foc.push([bare(p, FOC), selfFocus(p)]);\n var k = p.indexOf(HOVER), on;\n if (k < 0) return;\n if (depth(p, k)) on = compound(p, k);\n else {\n var pre = p.slice(0, k);\n if (!pre.trim() || /[\\s>+~]$/.test(pre)) return;\n on = bare(pre, HOVER);\n }\n if (on) hov.push([bare(p, HOVER), on, p, src]);\n });\n }\n function go(list, src, up) {\n for (var i = 0; i < list.length; i++) {\n var r = list[i], sel = up, st = null;\n if (r.selectorText !== undefined) {\n sel = nest(r.selectorText, up);\n st = r.style;\n } else if (up && r.style && !r.cssRules) st = r.style;\n if (st) {\n cssRules++;\n if (/:hover|:focus/.test(sel) && reveals(st)) take(sel, src);\n }\n if (r.cssRules && r.cssRules.length) go(r.cssRules, src, sel);\n }\n }\n var sheets = Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets || []);\n sheets.forEach(function (sh) {\n var list;\n try { list = sh.cssRules; } catch (e) { return cssBlocked.push(sh.href || \"a style sheet\"); }\n var memo = sheetMemo.get(sh);\n if (!memo || memo.list !== list || memo.n !== list.length || memo.node !== sh.ownerNode) {\n var h0 = hov, f0 = foc, c0 = cssRules;\n hov = [];\n foc = [];\n cssRules = 0;\n try { go(list, sh.href || (sh.ownerNode ? \"an inline <style> in the page\" : \"a style sheet added by script\"), \"\"); } catch (e) {\n hov = h0;\n foc = f0;\n cssRules = c0;\n return cssBlocked.push(sh.href || \"a style sheet\");\n }\n memo = { list: list, n: list.length, node: sh.ownerNode, hov: hov, foc: foc, rules: cssRules };\n sheetMemo.set(sh, memo);\n hov = h0;\n foc = f0;\n cssRules = c0;\n }\n hov = hov.concat(memo.hov);\n foc = foc.concat(memo.foc);\n cssRules += memo.rules;\n cssSheets++;\n });\n return [hov, foc];\n}\nfunction hiddenNow(e) {\n return !shown(e) || getComputedStyle(e).opacity === \"0\" || e.getBoundingClientRect().height < 1;\n}\nfunction hoverScan() {\n var rr = readRules(), foc = rr[1], found = [], seenH = new Set(), ok = [], top = modal();\n hovRule = new Map();\n hovSeen = new Set();\n rr[0].forEach(function (h) {\n var list;\n try { list = document.querySelectorAll(h[0]); } catch (e) { return; }\n for (var i = 0; i < list.length; i++) {\n var e = list[i], host = null;\n if (!hiddenNow(e) || (!e.matches(FOCUSABLE) && !e.querySelector(FOCUSABLE))) continue;\n try { host = e.parentElement && e.parentElement.closest(h[1]); } catch (x) {}\n if (!host || host === document.body || host === document.documentElement || seenH.has(host) || !shown(host) || (top && !within(top, host))) continue;\n if (host.matches(\"[aria-expanded],[aria-haspopup]\") || host.querySelector(\"[aria-expanded],[aria-haspopup]\")) {\n ok.push([host, \"toggle\"]);\n continue;\n }\n if (foc.some(function (f) { try { return (!f[1] || shown(e)) && e.matches(f[0]); } catch (x) { return false; } })) {\n ok.push([host, \"focus\"]);\n continue;\n }\n if (tabOpens.has(host)) {\n ok.push([host, \"tab\"]);\n continue;\n }\n found.push(host);\n seenH.add(host);\n hovHid.set(host, e);\n hovRule.set(host, [h[2], h[3]]);\n if (shown(e) && stops.some(function (s) { return e.contains(s); })) hovSeen.add(host);\n }\n });\n hovers = found;\n hoverOk = ok.filter(function (o) { return !seenH.has(o[0]); });\n}\nscan();\n\nvar host = document.createElement(\"div\");\nhost.id = ID;\nhost.style.cssText = \"all:initial;position:absolute;left:0;top:0;width:0;height:0;overflow:visible;z-index:2147483647;pointer-events:none;\";\nvar root = host.attachShadow({ mode: \"open\" });\nvar style = document.createElement(\"style\");\nstyle.textContent = [\n \":host{all:initial}\",\n \"svg{position:fixed;inset:0;width:100vw;height:100vh;overflow:visible}\",\n \"svg.pg{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible}\",\n \".p{position:fixed;bottom:66px;right:66px;width:350px;box-sizing:border-box;padding:6px;background:#e4dccd;color:#1a1612;border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.12),0 14px 34px rgba(0,0,0,.26);font:14px/1.45 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;pointer-events:auto;cursor:grab;overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 90px);overscroll-behavior:contain}\",\n \".tb{display:flex;align-items:center;gap:4px;padding:0 0 5px 4px}\",\n \".t{margin:0;flex:1;white-space:nowrap;font:700 17px/1.2 Georgia,serif;letter-spacing:-.01em}\",\n \".cd{margin:4px 0 0;padding:7px 10px;background:#fbf8f3;border-radius:10px}\",\n \".tb+.cd{margin-top:0}\",\n \".p.rm{padding:10px}\",\n \".rm .tb{gap:6px;padding:4px 2px 8px 6px}\",\n \".rm .t{font-size:19px}\",\n \".rm .cd{margin-top:6px;padding:12px 14px}\",\n \".rm .tb+.cd{margin-top:0}\",\n \".rm .ta{height:32px;padding:0 12px 0 10px}\",\n \".rm .n{gap:7px;margin-top:12px}\",\n \".rm .n b{font-size:22px}\",\n \".rm .k{margin-top:7px}\",\n \".rm .x,.rm .b.cn{width:32px;height:32px}\",\n \".rm .sec{margin-top:6px}\",\n \".rm .sg{min-height:46px;padding:0 12px 0 8px}\",\n \".rm .ic{width:30px;height:30px;border-radius:8px}\",\n \".rm .so,.rm .lbd,.rm .la{padding:2px 14px 14px}\",\n \".rm .hw{margin:10px 6px 2px}\",\n \".rm .m{margin-top:8px;gap:6px}\",\n \".rm .c{padding:6px 10px}\",\n \".rm .pr{margin-top:12px}\",\n \".rm .pl{height:30px;padding:0 14px 0 11px}\",\n \".rm .b{width:30px;height:30px}\",\n \".rm .lf{margin-top:10px}\",\n \".rm .lt{padding:3px 9px}\",\n \".rm .ll{margin:10px -14px 0}\",\n \".rm .lx{padding:6px 14px}\",\n \".rm .lr.lb2{gap:6px;margin-top:12px}\",\n \".rm .kl,.rm .ka{height:38px;border-radius:8px}\",\n \".rm .lnt{height:38px;border-radius:8px}\",\n \".rm .lck,.rm .lw,.rm .sm,.rm .lr{margin-top:10px}\",\n \".rm .lrt{margin-top:0}\",\n \".rm .gp .k,.rm .lgp .k{margin-top:10px}\",\n \".rm .mn{margin-top:12px}\",\n \".rm .so>.k:first-child,.rm .lbd>:first-child,.rm .la>:first-child,.rm .cd>:first-child,.rm .cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>:first-child,.cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>div:empty{display:none}\",\n \".ta{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px 0 8px;border:1.5px solid #1a1612;border-radius:999px;background:#fbf8f3;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer;flex:none}\",\n \".ta:hover{background:#fff}\",\n \".ta:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".n{display:flex;align-items:baseline;gap:6px;margin:5px 0 0}\",\n \".n b{font:700 20px/1 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;letter-spacing:-.02em;font-variant-numeric:tabular-nums}\",\n \".k{display:flex;align-items:center;gap:10px;margin:4px 0 0;font-size:14px}\",\n \".d{width:16px;height:16px;border-radius:50%;background:#1a1612;box-shadow:0 0 0 2px #fff inset,0 0 0 1px #1a1612;flex:none}\",\n \".r{width:16px;height:12px;box-sizing:border-box;border:2px dashed #d0103a;border-radius:2px;background:rgba(208,16,58,.12);flex:none}\",\n \".x{width:28px;height:28px;flex:none;padding:0;border:0;border-radius:50%;background:transparent;color:#1a1612;cursor:pointer;display:grid;place-items:center}\",\n \".p svg{display:block;position:static;inset:auto;width:auto;height:auto;overflow:hidden;flex:none}\",\n \".x:hover{background:rgba(26,22,18,.08)}\",\n \".b.cn{width:28px;height:28px}\",\n \".sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\",\n \".x:focus-visible,.a:focus-visible,.sg:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".sec{margin:4px 0 0;background:#fbf8f3;border-radius:10px}\",\n \".sg{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:32px;padding:0 9px 0 5px;border-radius:10px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".sg:hover{background:#fff}\",\n \".ic{width:22px;height:22px;border-radius:6px;background:#efe8dc;display:grid;place-items:center;flex:none}\",\n \".sg[aria-expanded=true] .ic{background:#1a1612;color:#fbf8f3}\",\n \".warn .ic{background:rgba(208,16,58,.12);color:#d0103a}\",\n \".warn .sg[aria-expanded=true] .ic{background:#d0103a;color:#fff}\",\n \".bg{margin-left:auto;padding:2px 8px;border-radius:999px;background:#d0103a;color:#fff;font-weight:700;line-height:1.3}\",\n \".bg:empty{display:none}\",\n \".bg:not(:empty)+i{margin-left:12px}\",\n \".sg i{margin-left:auto;width:7px;height:7px;border-right:2px solid #1a1612;border-bottom:2px solid #1a1612;transform:translate(-3px,-2px) rotate(45deg)}\",\n \".sg[aria-expanded=true] i{transform:translate(-3px,2px) rotate(225deg)}\",\n \".so,.lbd,.la{padding:1px 10px 8px}\",\n \".lbd{overflow:hidden}\",\n \".so>.k:first-child,.lbd>:first-child,.la>:first-child{margin-top:0}\",\n \".so[hidden]{display:none}\",\n \".hw{margin:5px 4px 0;color:#5f564c;font-size:11px;line-height:1.3;font-weight:600}\",\n \".a{color:#5f564c;font-size:13px;font-weight:400;text-decoration:none;white-space:nowrap}\",\n \".vr{float:right;margin-left:8px;color:#5f564c;font-weight:400}\",\n \".hw+.hw{margin-top:4px}\",\n \".mn{margin:6px 0 0;color:#1e3a8a}\",\n \".a:hover{color:#9a3412;text-decoration:underline}\",\n \".p.g{cursor:grabbing;user-select:none}\",\n \".n b.e{color:#d0103a}\",\n \".n b.ok{color:#1f7a3f}\",\n \".s{cursor:pointer}\",\n \"svg.in{z-index:1}\",\n \"g.o{pointer-events:auto;cursor:pointer;-webkit-user-select:none;user-select:none}\",\n \".s input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".s.off{opacity:.45;cursor:default}\",\n \".s.off input{cursor:default}\",\n \".s input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".h{width:16px;height:16px;border-radius:50%;background:#fff;border:2px dashed #1a1612;box-sizing:border-box;flex:none}\",\n \".m{list-style:none;margin:5px 0 0;padding:2px;display:flex;flex-wrap:wrap;gap:4px}\",\n \".c{all:unset;font:inherit;font-size:14px;line-height:1;cursor:pointer;padding:4px 8px;border:1px dashed #d0103a;border-radius:999px;background:rgba(208,16,58,.06);color:#1a1612}\",\n \".c:hover{background:rgba(208,16,58,.14)}\",\n \".c[aria-pressed=true]{border-style:solid;background:#d0103a;color:#fff}\",\n \".c:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".gp[hidden]{display:none}\",\n \".gp .k,.lgp .k{margin:6px 0 0}\",\n \".w{display:flex;align-items:center;gap:8px;margin:0;font-size:14px}\",\n \".w span{flex:1;font-variant-numeric:tabular-nums}\",\n \".b{all:unset;box-sizing:border-box;width:28px;height:28px;border:1.5px solid #1a1612;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#1a1612;flex:none}\",\n \".b:hover{background:rgba(26,22,18,.08)}\",\n \".b:disabled{opacity:.3;cursor:default;background:none}\",\n \".b:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".pr{display:flex;align-items:center;gap:10px;margin:6px 0 0;font-size:14px;color:#5f564c}\",\n \".pr+.pr{margin-top:8px}\",\n \".pr .lo{display:inline-flex;align-items:center;height:30px;color:#1a1612}\",\n \".sm{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".sm[hidden]{display:none}\",\n \".sm .g{color:#1f7a3f;font-weight:600}\",\n \".sm .e{color:#d0103a;font-weight:700}\",\n \".sm .q{color:#5f564c;font-weight:400}\",\n \".m .mo{align-self:center;color:#5f564c;font-size:14px}\",\n \".pl{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 13px 0 10px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer;flex:none}\",\n \".pl:hover{background:#3a332c}\",\n \".pl:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".ls{font-weight:400;color:#5f564c}\",\n \".lv{color:#d0103a;font-weight:700}\",\n \".lbd[hidden],.la[hidden],.lm[hidden]{display:none}\",\n \".lf{display:grid;grid-template-columns:1fr 1fr;gap:2px;margin:6px 0 0;padding:3px;background:#efe8dc;border-radius:10px}\",\n \".lt{all:unset;box-sizing:border-box;text-align:center;padding:2px 9px;border-radius:7px;color:#5f564c;font-weight:600;font-size:14px;line-height:1.3;cursor:pointer}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".ll{list-style:none;margin:6px -10px 0;padding:0;cursor:auto}\",\n \".lx{padding:3px 10px}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".lx .tm{margin-right:8px;font:500 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".lx .st{font:700 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\",\n \".lx .bd{display:block}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{all:unset;box-sizing:border-box;display:inline-block;min-width:22px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;font-size:14px;line-height:1.4;text-align:center;cursor:pointer}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\",\n \".lr{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 0}\",\n \".lrt{margin:0}\",\n \".lr.lb2{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}\",\n \".kl,.ka{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:30px;border-radius:7px;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer}\",\n \".kl{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover{background:#efe8dc}\",\n \".ka{background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".kl:focus-visible,.ka:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lnt{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:30px;border:1.5px dashed #1a1612;border-radius:7px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lnt:hover{border-style:solid;background:#fff}\",\n \".lnt:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lk{all:unset;box-sizing:border-box;padding:5px 13px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lk:hover{background:#3a332c}\",\n \".lo{all:unset;box-sizing:border-box;padding:4px 12px;border:1.5px solid #1a1612;border-radius:999px;font-weight:600;font-size:14px;cursor:pointer}\",\n \".lo:hover{background:rgba(26,22,18,.08)}\",\n \".lt:focus-visible,.lc:focus-visible,.lk:focus-visible,.lo:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".la p,.lm{margin:8px 0 0}\",\n \".lck{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:flex;align-items:center;gap:8px;margin:6px 0 0;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lm{color:#d0103a}\"\n].join(\"\");\ntry {\n var sheet = new CSSStyleSheet();\n sheet.replaceSync(style.textContent);\n root.adoptedStyleSheets = [sheet];\n} catch (e) {\n root.appendChild(style);\n}\nvar spot = document.createElementNS(NS, \"svg\");\nroot.appendChild(spot);\nvar underPg = document.createElementNS(NS, \"svg\");\nunderPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(underPg);\nvar svgPg = document.createElementNS(NS, \"svg\");\nsvgPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(svgPg);\nvar under = document.createElementNS(NS, \"svg\");\nroot.appendChild(under);\nvar svg = document.createElementNS(NS, \"svg\");\nroot.appendChild(svg);\nvar dotPg = document.createElementNS(NS, \"svg\");\ndotPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(dotPg);\nvar dot = document.createElementNS(NS, \"svg\");\nroot.appendChild(dot);\n[spot, underPg, svgPg, under, svg, dotPg, dot].forEach(function (g) { g.setAttribute(\"aria-hidden\", \"true\"); });\n\nvar panel = document.createElement(\"div\");\npanel.className = \"p\";\npanel.setAttribute(\"role\", \"dialog\");\npanel.setAttribute(\"aria-label\", \"Tab trail\");\nfunction line(cls, bold, text, mark) {\n var p = document.createElement(\"p\");\n p.className = cls;\n if (mark) { var m = document.createElement(\"span\"); m.className = mark; p.appendChild(m); }\n if (bold !== null) { var b = document.createElement(\"b\"); b.textContent = bold; p.appendChild(b); }\n p.appendChild(document.createTextNode(text));\n panel.appendChild(p);\n return p;\n}\nvar x = document.createElement(\"button\");\nx.className = \"x\";\nx.type = \"button\";\nx.setAttribute(\"aria-label\", \"Close Tab trail\");\nfunction icon(parent, w, d, sw) {\n var g = el(\"svg\", { width: w, height: w, viewBox: \"0 0 16 16\", fill: \"none\", stroke: \"currentColor\", \"stroke-width\": sw, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\", \"aria-hidden\": \"true\" }, parent);\n el(\"path\", { d: d }, g);\n return g;\n}\nicon(x, 16, \"M3 3l10 10M13 3L3 13\", 2);\nvar bar = document.createElement(\"div\");\nbar.className = \"tb\";\npanel.appendChild(bar);\nvar corner = document.createElement(\"button\");\ncorner.className = \"b cn\";\ncorner.type = \"button\";\ncorner.setAttribute(\"aria-label\", \"Move to the next corner\");\ncorner.title = \"Move to the next corner\";\nvar cg = icon(corner, 16, \"M5 11.5V5h6.5M9.5 3.2L11.5 5 9.5 6.8\", 1.6);\nel(\"rect\", { x: 2, y: 2, width: 12, height: 12, rx: 2 }, cg);\nel(\"rect\", { x: 9.5, y: 9.5, width: 2, height: 2, fill: \"currentColor\" }, cg);\ncorner.addEventListener(\"click\", function () {\n var r = panel.getBoundingClientRect(), W = innerWidth, H = innerHeight;\n var mx = Math.max(8, Math.min(66, (W - r.width) / 2)) + \"px\", my = Math.max(8, Math.min(66, (H - r.height) / 2)) + \"px\";\n var right = r.left + r.width / 2 > W / 2, low = r.top + r.height / 2 > H / 2;\n var k = !low && !right ? 1 : !low && right ? 2 : low && right ? 3 : 0;\n for (var i = 0; i < 4; i++) {\n var toRight = k === 1 || k === 2, toLow = k === 2 || k === 3;\n panel.style.left = toRight ? \"auto\" : mx;\n panel.style.right = toRight ? mx : \"auto\";\n panel.style.top = toLow ? \"auto\" : my;\n panel.style.bottom = toLow ? my : \"auto\";\n var n = panel.getBoundingClientRect();\n if (Math.abs(n.left - r.left) > 2 || Math.abs(n.top - r.top) > 2) break;\n k = (k + 1) % 4;\n }\n});\nvar say = document.createElement(\"p\");\nsay.className = \"sr\";\nsay.setAttribute(\"role\", \"status\");\nsay.setAttribute(\"aria-live\", \"polite\");\npanel.appendChild(say);\nvar sayList = [], sayT = 0;\nfunction announce(t) {\n sayList.push(t);\n if (sayT) return;\n sayT = setTimeout(function () {\n sayT = 0;\n if (closed) return;\n var text = sayList.join(\" \");\n sayList = [];\n say.textContent = \"\";\n setTimeout(function () { say.textContent = text; }, 50);\n }, 1000);\n}\nbar.appendChild(line(\"t\", null, \"Tab trail\"));\nvar playCard = document.createElement(\"div\");\nplayCard.className = \"cd\";\npanel.appendChild(playCard);\nvar playRow = document.createElement(\"p\");\nplayRow.className = \"pr\";\nvar play = document.createElement(\"button\");\nplay.className = \"pl\";\nplay.type = \"button\";\nvar playIcon = document.createElement(\"span\");\nplay.appendChild(playIcon);\nvar playWord = document.createTextNode(\"Play\");\nplay.appendChild(playWord);\nplay.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\nvar playText = document.createElement(\"span\");\nplayText.textContent = \"Visits every stop for you\";\nplayRow.appendChild(play);\nplayRow.appendChild(playText);\nplayCard.appendChild(playRow);\nvar AI_ICON = \"M3.5 5.5h9v8h-9zM8 5.5V3.2M8 1.9v.1M6 8.6v1.1M10 8.6v1.1M6.3 11.6h3.4M1.8 8.5v2.6M14.2 8.5v2.6\", COPY_ICON = \"M10.5 5.5V3a.5.5 0 0 0-.5-.5H3a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h2.5M5.5 5.5h8v8h-8z\";\nvar aiBtn = document.createElement(\"button\");\naiBtn.className = \"ta\";\naiBtn.type = \"button\";\nicon(aiBtn, 15, AI_ICON, 1.6);\naiBtn.appendChild(document.createTextNode(\"Copy for AI\"));\naiBtn.addEventListener(\"click\", function () { copyIt(aiBtn, window, aiText(), \"Copy for AI\"); });\nbar.appendChild(aiBtn);\nbar.appendChild(corner);\nbar.appendChild(x);\nvar sumLine = document.createElement(\"p\");\nsumLine.className = \"sm\";\nsumLine.hidden = true;\nplayCard.appendChild(sumLine);\nvar resCard = document.createElement(\"div\");\nresCard.className = \"cd\";\npanel.appendChild(resCard);\nvar info = document.createElement(\"div\");\nresCard.appendChild(info);\nvar shownEl = null, chips = [], drawn = [], panelIn = false, pRet = null;\nvar KIND = { img: \"Image\", picture: \"Image\", svg: \"Icon\", i: \"Icon\", video: \"Video\", a: \"Link\", li: \"List item\", tr: \"Table row\", td: \"Table cell\" };\nvar BARE = { button: \"Button\", textarea: \"Field\", select: \"Dropdown\", iframe: \"Frame\" };\nfunction kind(m, tag) {\n if (tag === \"input\") return m.type === \"checkbox\" ? \"Checkbox\" : m.type === \"radio\" ? \"Radio\" : /^(submit|button|reset|image)$/.test(m.type) ? \"Button\" : \"Field\";\n return KIND[tag] || BARE[tag] || \"Clickable box\";\n}\nfunction named(m) {\n var by = m.getAttribute(\"aria-labelledby\"), r = m.getRootNode(), t = \"\";\n if (by && r.getElementById) t = by.split(/\\s+/).map(function (id) { var x = r.getElementById(id); return x ? x.textContent : \"\"; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"aria-label\") || \"\";\n if (!t.trim() && m.labels && m.labels.length) t = [].map.call(m.labels, function (l) { return l.innerText || l.textContent; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"placeholder\") || \"\";\n if (!t.trim() && m.tagName === \"INPUT\" && /^(submit|button|reset)$/.test(m.type)) t = m.value;\n if (!t.trim()) t = m.innerText || \"\";\n if (!t.trim()) t = m.getAttribute(\"title\") || \"\";\n return t;\n}\nvar EMAIL = /[\\w.+-]+@[\\w-]+(\\.[\\w-]+)+/g, DIGITS = /\\d(?:[\\s-]?\\d){5,}/g, TOKEN = /[A-Za-z0-9_%=+-]{16,}/g;\nvar SECRET = /\\b(?:(?:sk|pk|rk)_(?:live|test)_\\w+|gh[pousr]_\\w{20,}|github_pat_\\w+|AKIA[0-9A-Z]{16}|xox[abprs]-[\\w-]+|eyJ[\\w-]+\\.[\\w-]+\\.[\\w-]*)/g, SAID = /\\b((?:password|passwd|pwd|passcode|pin|secret|api[ _-]?key|token)\\s*[:=]\\s*)\\S+/gi;\nfunction tokens(t) { return t.replace(SECRET, \"[token]\").replace(TOKEN, function (w) { return /\\d/.test(w) ? \"[token]\" : w; }); }\nfunction scrub(t) { return tokens(String(t).replace(SAID, \"$1[token]\")).replace(EMAIL, \"[email]\").replace(DIGITS, \"[number]\"); }\nfunction secretish(t) { return scrub(t) !== t; }\nfunction cleanUrl(u) {\n u = String(u).split(/[?#]/)[0].replace(/^([a-z][\\w+.-]*:\\/\\/)[^@\\/]*@/i, \"$1\");\n if (/^(javascript|data|blob):/i.test(u)) return u.split(\":\")[0] + \":\";\n return scrub(u);\n}\nfunction label(m) {\n var tag = m.tagName.toLowerCase();\n var inner = m.querySelector(\"img[alt],[aria-label],title\");\n var alt = (m.getAttribute(\"alt\") || (inner && (inner.getAttribute(\"alt\") || inner.getAttribute(\"aria-label\") || inner.textContent)) || \"\").trim();\n var t = scrub(named(m)).trim().replace(/\\s+/g, \" \");\n alt = scrub(alt);\n if (!t && alt) t = (KIND[tag] ? KIND[tag] + \": \" : \"\") + alt.replace(/\\s+/g, \" \");\n if (!t) t = kind(m, tag);\n return t.length > 28 ? t.slice(0, 27) + \"...\" : t;\n}\nfunction count(n, text, bad, good, parent) {\n var p = document.createElement(\"p\");\n p.className = \"n\";\n var b = document.createElement(\"b\");\n b.textContent = String(n);\n if (bad) b.className = \"e\";\n else if (good) b.className = \"ok\";\n p.appendChild(b);\n p.appendChild(document.createTextNode(text));\n (parent || info).appendChild(p);\n}\nvar CHIPS = 50;\nfunction chipUl(parent, list, text, go) {\n var ul = document.createElement(\"ul\"), out = [];\n ul.className = \"m\";\n list.slice(0, CHIPS).forEach(function (m) {\n var li = document.createElement(\"li\");\n var c = document.createElement(\"button\");\n c.className = \"c\";\n c.type = \"button\";\n c.textContent = text(m);\n c.addEventListener(\"click\", function () { go(m, c); });\n out.push(c);\n li.appendChild(c);\n ul.appendChild(li);\n });\n if (list.length > CHIPS) {\n var mo = document.createElement(\"li\");\n mo.className = \"mo\";\n mo.textContent = \"and \" + (list.length - CHIPS).toLocaleString(\"en-US\") + \" more\";\n ul.appendChild(mo);\n }\n parent.appendChild(ul);\n return out;\n}\nfunction fill() {\n var had = chips.indexOf(root.activeElement);\n while (info.firstChild) info.removeChild(info.firstChild);\n chips = [];\n drawn = sig();\n count(stops.length, stops.length === 1 ? \" stop for the Tab key\" : \" stops for the Tab key\");\n count(missed.length, missed.length === 0 ? \" clickable things Tab skips\" : missed.length === 1 ? \" looks clickable, but Tab skips it\" : \" look clickable, but Tab skips them\", missed.length > 0, missed.length === 0);\n if (missed.indexOf(shownEl) < 0 && hovers.indexOf(shownEl) < 0 && forcedBad.indexOf(shownEl) < 0) shownEl = null;\n if (missed.length) chipList(missed);\n if (hovers.length) {\n count(hovers.length, hovers.length === 1 ? \" menu or box opens only on mouse hover\" : \" menus or boxes open only on mouse hover\", true);\n chipList(hovers);\n }\n if (forcedBad.length) {\n count(forcedBad.length, forcedBad.length === 1 ? \" stop has tabindex above 0, which pulls it ahead of the page\" : \" stops have tabindex above 0, which pulls them ahead of the page\", true);\n chipList(forcedBad, true);\n }\n if (skip) skipPanel();\n if (had >= 0 && chips.length) chips[Math.min(had, chips.length - 1)].focus();\n}\nfunction sig() { return [stops.length].concat(missed, [\"|\"], hovers, [\"|\"], forced, [\"|\"], forcedBad); }\nfunction chipList(list, num) {\n var made = chipUl(info, list, function (m) { return (num && stops.indexOf(m) >= 0 ? stops.indexOf(m) + 1 + \": \" : \"\") + label(m); }, function (m, c) {\n shownEl = m;\n chips.forEach(function (x) { x.setAttribute(\"aria-pressed\", x === c ? \"true\" : \"false\"); });\n m.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n queue();\n });\n made.forEach(function (c, i) { c.setAttribute(\"aria-pressed\", list[i] === shownEl ? \"true\" : \"false\"); });\n chips = chips.concat(made);\n}\nfill();\nvar PAGE = 50, win = 0, seen = -1;\nvar pager = document.createElement(\"p\");\npager.className = \"w\";\nvar pageText = document.createElement(\"span\");\npager.appendChild(pageText);\nfunction pageBtn(text, step) {\n var b = document.createElement(\"button\");\n b.className = \"b\";\n b.type = \"button\";\n b.setAttribute(\"aria-label\", text);\n icon(b, 14, step < 0 ? \"M10 3L5 8l5 5\" : \"M6 3l5 5-5 5\", 2);\n b.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\n b.addEventListener(\"click\", function () {\n win = Math.min(Math.max(win + step, 0), Math.ceil(stops.length / PAGE) - 1);\n queue();\n });\n pager.appendChild(b);\n return b;\n}\nvar prevBtn = pageBtn(\"Previous\", -1), nextBtn = pageBtn(\"Next\", 1);\nvar group = document.createElement(\"div\");\ngroup.className = \"cd gp\";\ngroup.appendChild(pager);\nvar jumpBox = document.createElement(\"div\");\nresCard.appendChild(jumpBox);\npanel.appendChild(group);\nvar jumps = [], pressed = 0, before = -1, popMissed = null, lost = false;\nvar POP = /cookie|consent|gdpr|modal|popup/i;\nfunction dimmed() {\n var W = innerWidth, H = innerHeight;\n return Array.prototype.some.call(document.querySelectorAll(\"body *\"), function (e) {\n if (e.id === ID) return false;\n var cs = getComputedStyle(e);\n if (cs.position !== \"fixed\" || cs.display === \"none\" || cs.visibility === \"hidden\") return false;\n var r = e.getBoundingClientRect();\n if (r.width < W * 0.9 || r.height < H * 0.9) return false;\n var m = cs.backgroundColor.match(/rgba?\\(([^)]+)\\)/);\n var al = m ? m[1].split(\",\")[3] : null;\n return (al !== undefined && al !== null && +al > 0 && +al < 1) || cs.backdropFilter !== \"none\" && cs.backdropFilter !== \"\";\n });\n}\nfunction blocking(p) {\n if (p.matches(\"dialog\") && p.matches(\":modal\")) return true;\n if (p.getAttribute(\"aria-modal\") === \"true\") return true;\n var r = p.getBoundingClientRect();\n if (r.width * r.height >= innerWidth * innerHeight * 0.5) return true;\n return dimmed();\n}\nfunction popupOf(el) {\n for (var p = el; p && p !== document.documentElement; p = p.parentElement || (p.getRootNode().host || null)) {\n if (p.nodeType !== 1) continue;\n if (p.matches(\"dialog[open],[role=dialog],[role=alertdialog],[aria-modal=true]\")) return p;\n var c = typeof p.className === \"string\" ? p.className : \"\";\n if (POP.test(p.id + \" \" + c) && getComputedStyle(p).position === \"fixed\") return p;\n }\n return null;\n}\nvar covered = [], trapped = [], probHid = new Map();\nfunction pinOf(e) {\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") return n;\n }\n return null;\n}\nfunction hideInfo(s) {\n var r = s.getBoundingClientRect();\n if (r.width < 1 || r.height < 1) return { why: \"has no size\" };\n var m = modal();\n if (m && !within(m, s)) return { why: \"is under an open modal\" };\n if (popupOf(s)) return { why: \"is inside a popup\" };\n var pts = [[r.left + r.width / 2, r.top + r.height / 2], [r.left + 1, r.top + 1], [r.right - 1, r.top + 1], [r.left + 1, r.bottom - 1], [r.right - 1, r.bottom - 1]];\n var tested = 0, under = 0, pin = null;\n for (var i = 0; i < pts.length; i++) {\n var px = pts[i][0], py = pts[i][1];\n if (px < 0 || py < 0 || px >= innerWidth || py >= innerHeight) continue;\n tested++;\n var hit = null, list = document.elementsFromPoint(px, py);\n for (var k = 0; k < list.length; k++) if (list[k] !== host && !host.contains(list[k])) { hit = list[k]; break; }\n if (!hit || within(s, hit) || within(hit, s)) continue;\n var p = pinOf(hit);\n if (!p || within(p, s)) continue;\n under++;\n if (!pin) pin = p;\n }\n if (!tested) return { why: \"is off screen\" };\n return { tested: tested, under: under, pin: pin };\n}\nfunction pinText(p) {\n return desc(p) + \" (\" + getComputedStyle(p).position + \", \" + Math.round(p.getBoundingClientRect().height) + \" px tall)\";\n}\nvar moved = [], movedE = null;\nfunction movedLine() {\n if (movedE) {\n var i = logs.indexOf(movedE);\n if (i >= 0) logs.splice(i, 1);\n if (movedE.li && movedE.li.parentNode) movedE.li.parentNode.removeChild(movedE.li);\n movedE = null;\n }\n moved = moved.filter(function (x) { return x.isConnected; });\n if (!moved.length) {\n if (logList) logSummary();\n return;\n }\n var nums = moved.map(function (x) { return stops.indexOf(x) + 1; }).filter(function (n) { return n > 0; }).sort(function (a, b) { return a - b; });\n var list = nums.length ? \": \" + nums.slice(0, 20).join(\", \") + (nums.length > 20 ? \" and \" + (nums.length - 20) + \" more\" : \"\") : \"\";\n log(\"SKIPPED\", \"Hidden focus\", [pl(moved.length, \"stop\", \"stops\") + \" not tested, Tab moved on before the page stopped scrolling\" + list + \". Press Play to test them.\"]);\n movedE = logs[logs.length - 1];\n}\nfunction tested(s) {\n var i = moved.indexOf(s);\n if (i < 0) return;\n moved.splice(i, 1);\n movedLine();\n}\nfunction where(s) {\n var r = s.getBoundingClientRect();\n return scrollX + \",\" + scrollY + \",\" + r.left + \",\" + r.top;\n}\nfunction check(s, then) {\n function end() {\n var f = then;\n then = null;\n if (f) f();\n }\n if (!s) return end();\n var was = covered.indexOf(s) >= 0;\n var at = where(s), still = 0, tries = 0;\n function look() {\n if (closed || (covered.indexOf(s) >= 0) !== was) return end();\n var now = where(s);\n if (now !== at) {\n if (stops[current] !== s) {\n if (was) return end();\n if (moved.indexOf(s) < 0) {\n moved.push(s);\n movedLine();\n }\n return end();\n }\n at = now;\n still = 0;\n } else still++;\n if (still < 2 && ++tries < 90) return requestAnimationFrame(look);\n var h = hideInfo(s);\n tested(s);\n hidTested.add(s);\n if (!h.tested) {\n log(\"SKIPPED\", \"Hidden focus\", [ref(s), \" \" + h.why + \". Not tested.\"]);\n return end();\n }\n if (was && h.under >= h.tested) {\n log(\"INFO\", \"Hidden focus\", [ref(s), \" is already listed as hidden.\"]);\n return end();\n }\n if (was) {\n covered.splice(covered.indexOf(s), 1);\n var pe = probHid.get(s);\n if (pe) pe.fixed = true;\n probHid.delete(s);\n renderJumps();\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is not hidden anymore: it is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is not hidden anymore, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n if (h.under < h.tested) {\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is in view, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n covered.push(s);\n renderJumps();\n announce(\"Hidden focus: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", is covered.\");\n var pr = h.pin.getBoundingClientRect(), up = pr.top + pr.height / 2 < innerHeight / 2, ph = Math.round(pr.height);\n log(\"PROBLEM\", \"Hidden focus\", [ref(s), \": all \" + h.tested + \" points are under \" + pinText(h.pin) + \".\"], aiOf(W_HIDE, \"When the element gets keyboard focus, at least part of it stays visible, not covered by \" + desc(h.pin) + \".\", \"Add html { scroll-padding-\" + (up ? \"top\" : \"bottom\") + \": \" + (ph + 8) + \"px; } so the browser scrolls focused elements clear of the \" + (up ? \"top\" : \"bottom\") + \" bar (\" + ph + \" px tall, plus 8 px of room).\", [[\"Element\", s], [\"Covered by\", h.pin]], [\"Measured: \" + desc(h.pin) + \" is \" + getComputedStyle(h.pin).position + \", \" + ph + \" px tall, at the \" + (up ? \"top\" : \"bottom\") + \" of a \" + innerHeight + \" px tall window.\"]));\n probHid.set(s, logs[logs.length - 1]);\n end();\n }\n requestAnimationFrame(look);\n}\nvar popInfo = null, lostPops = [], openPop = null, opener = null, lastOut = null, tapIn = null, tapT = 0, lastKey = \"\", keyT = 0, keyOn = null;\nfunction deep() {\n var a = document.activeElement;\n while (a && a.shadowRoot && a.shadowRoot.activeElement) a = a.shadowRoot.activeElement;\n return a;\n}\nfunction gone(p) { return !p.isConnected || !shown(p) || (p.matches(\"dialog\") && !p.open); }\nfunction closedBy(p) {\n var now = Date.now();\n if (tapIn && now - tapT < 600 && within(p, tapIn)) {\n var b = tapIn.closest ? tapIn.closest(\"button,a,[role=button]\") : null;\n return b ? \" with \\\"\" + label(b) + \"\\\"\" : \" with a click\";\n }\n if (keyT && now - keyT < 600) {\n if (lastKey === \"Escape\") return \" with Escape\";\n if (lastKey === \"Enter\" || lastKey === \" \") return \" with \" + (lastKey === \" \" ? \"Space\" : \"Enter\") + (keyOn && keyOn.nodeType === 1 && keyOn !== document.body && keyOn !== document.documentElement ? \" on \\\"\" + label(keyOn) + \"\\\"\" : \"\");\n }\n return \"\";\n}\nfunction popClosed() {\n var p = openPop, from = opener, pn = popName(p), by = closedBy(p), pi = popInfo;\n openPop = null;\n if (!from) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". It opened on its own, so there is no button to go back to.\"]);\n if (!from.isConnected || !shown(from)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". The button that opened it is gone or hidden.\"]);\n if (lostPops.some(function (l) { return l[0] === from; })) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". Already listed.\"]);\n if (tapIn && Date.now() - tapT < 600 && !within(p, tapIn)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed by a click outside it. Not judged.\"]);\n var frames = 0;\n function look() {\n if (closed) return;\n var a = deep();\n if (a && a !== document.body && a !== document.documentElement && !within(p, a) && shown(a)) {\n if (a === from) return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went back to \", ref(from), \".\"]);\n return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went to \", ref(a), \", not to the button that opened it, \", ref(from), \".\"]);\n }\n if (++frames < 30) return requestAnimationFrame(look);\n if (lostPops.some(function (l) { return l[0] === from; })) return;\n lostPops.push([from, p]);\n renderJumps();\n announce(\"Lost focus: \" + pn.l + \" closed and focus fell to the page body.\");\n log(\"PROBLEM\", \"Lost focus\", [pn, \" closed\" + by + \". Focus fell to the page body instead of going back to \", ref(from), \".\"], aiOf(W_ORDER, \"When the popup closes, focus goes back to the element that opened it, so a keyboard user carries on from there.\", \"Before the popup opens, store document.activeElement. After it closes, call .focus() on that element. A <dialog> opened with showModal() and closed with close() does this by itself, so if this one is a <dialog>, look for code that calls blur() or .focus() on something else after it closes.\", [[\"Popup\", p, pi], [\"Opened by\", from]]));\n }\n requestAnimationFrame(look);\n}\nfunction track(a) {\n if (openPop && gone(openPop)) popClosed();\n if (!a || a === document.body || a === document.documentElement || a === host || a.getRootNode() === root) return;\n var p = popupOf(a);\n if (!p) {\n lastOut = a;\n openPop = null;\n } else if (!openPop) {\n openPop = p;\n opener = lastOut;\n popInfo = { sel: sel(p), html: snip(p) };\n }\n}\nfunction tap(e) {\n tapIn = e.composedPath ? e.composedPath()[0] : e.target;\n tapT = Date.now();\n}\nfunction stopGo(e) {\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n current = stops.indexOf(e);\n queue();\n}\nfunction stopName(e) {\n var i = stops.indexOf(e);\n return (i >= 0 ? i + 1 : \"?\") + \": \" + label(e);\n}\nfunction byStop(list) { return list.slice().sort(function (a, b) { return stops.indexOf(a) - stops.indexOf(b); }); }\nfunction renderJumps() {\n while (jumpBox.firstChild) jumpBox.removeChild(jumpBox.firstChild);\n if (macNote) {\n var mn = document.createElement(\"p\");\n mn.className = \"mn\";\n mn.textContent = MAC_NOTE;\n jumpBox.appendChild(mn);\n }\n if (popMissed) {\n count(1, \" popup blocks the page, but Tab goes somewhere else first\", true, false, jumpBox);\n chipUl(jumpBox, [popMissed], function () { return \"Show the popup\"; }, function (m) { m.scrollIntoView({ block: \"center\", behavior: \"smooth\" }); });\n }\n if (covered.length) {\n count(covered.length, covered.length === 1 ? \" stop is hidden when Tab reaches it\" : \" stops are hidden when Tab reaches them\", true, false, jumpBox);\n chipUl(jumpBox, byStop(covered), stopName, stopGo);\n }\n if (trapped.length) {\n count(trapped.length, trapped.length === 1 ? \" stop where Tab gets stuck\" : \" stops where Tab gets stuck\", true, false, jumpBox);\n chipUl(jumpBox, byStop(trapped), stopName, stopGo);\n }\n if (lostPops.length) {\n count(lostPops.length, lostPops.length === 1 ? \" popup loses focus when it closes\" : \" popups lose focus when they close\", true, false, jumpBox);\n chipUl(jumpBox, lostPops, function (l) {\n var i = stops.indexOf(l[0]);\n return (i >= 0 ? i + 1 : label(l[0])) + \" \\u2192 Start\";\n }, function (l) { stopGo(l[0]); });\n }\n if (jumps.length) {\n count(jumps.length, jumps.length === 1 ? \" time Tab jumped out of order\" : \" times Tab jumped out of order\", true, false, jumpBox);\n chipUl(jumpBox, jumps, function (j) {\n var from = j[0] ? stops.indexOf(j[0]) + 1 || label(j[0]) : \"Start\", to = stops.indexOf(j[1]) + 1;\n return from + \" \\u2192 \" + (to || \"?\");\n }, function (j) { stopGo(j[1]); });\n }\n if (skip) skipPanel();\n}\nvar legend = document.createElement(\"div\");\nlegend.className = \"so\";\nlegend.hidden = true;\nlegend.appendChild(line(\"k\", null, \"The order Tab visits\", \"d\"));\nlegend.appendChild(line(\"k\", null, \"Hidden until Tab reaches it\", \"h\"));\nlegend.appendChild(line(\"k\", null, \"Tab can't reach or see it\", \"r\"));\nvar tray = document.createElement(\"div\");\ntray.className = \"tr\";\npanel.appendChild(tray);\nvar gear = document.createElement(\"button\");\ngear.className = \"sg\";\ngear.type = \"button\";\ngear.setAttribute(\"aria-expanded\", \"false\");\nvar gearIcon = icon(gear, 16, \"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4\", 1.6);\nel(\"circle\", { cx: 8, cy: 8, r: 2.2 }, gearIcon);\ngear.appendChild(document.createTextNode(\"Settings\"));\ngear.appendChild(document.createElement(\"i\"));\ntray.appendChild(gear);\nvar settings = document.createElement(\"div\");\nsettings.className = \"so\";\nsettings.hidden = true;\ntray.appendChild(settings);\ngear.addEventListener(\"click\", function () {\n settings.hidden = !settings.hidden;\n gear.setAttribute(\"aria-expanded\", settings.hidden ? \"false\" : \"true\");\n});\nvar skipBox = document.createElement(\"label\");\nskipBox.className = \"k s\";\nvar skip = document.createElement(\"input\");\nskip.type = \"checkbox\";\nskip.checked = true;\nskipBox.appendChild(skip);\nskipBox.appendChild(document.createTextNode(\"Leave this panel out of Tab\"));\nsettings.appendChild(skipBox);\nvar tightBox = document.createElement(\"label\");\ntightBox.className = \"k s\";\nvar tight = document.createElement(\"input\");\ntight.type = \"checkbox\";\ntight.checked = true;\ntightBox.appendChild(tight);\ntightBox.appendChild(document.createTextNode(\"Compact view\"));\nsettings.appendChild(tightBox);\ntight.addEventListener(\"change\", function () { panel.classList.toggle(\"rm\", !tight.checked); });\nvar chunkBox = document.createElement(\"label\");\nchunkBox.className = \"k s\";\nvar chunk = document.createElement(\"input\");\nchunk.type = \"checkbox\";\nchunk.checked = true;\nchunkBox.appendChild(chunk);\nchunkBox.appendChild(document.createTextNode(\"Show \" + PAGE + \" stops at a time\"));\ngroup.appendChild(chunkBox);\nvar shortBox = document.createElement(\"label\");\nshortBox.className = \"k s\";\nvar stub = document.createElement(\"input\");\nstub.type = \"checkbox\";\nstub.checked = true;\nshortBox.appendChild(stub);\nshortBox.appendChild(document.createTextNode(\"Long lines\"));\nsettings.insertBefore(shortBox, skipBox);\nvar lineBox = document.createElement(\"label\");\nlineBox.className = \"k s\";\nvar lines = document.createElement(\"input\");\nlines.type = \"checkbox\";\nlines.checked = true;\nlineBox.appendChild(lines);\nlineBox.appendChild(document.createTextNode(\"Show lines\"));\nsettings.insertBefore(lineBox, shortBox);\nlines.addEventListener(\"change\", function () {\n stub.disabled = !lines.checked;\n shortBox.classList.toggle(\"off\", !lines.checked);\n queue();\n});\nstub.addEventListener(\"change\", function () { queue(); });\nvar spotBox = document.createElement(\"label\");\nspotBox.className = \"k s\";\nvar light = document.createElement(\"input\");\nlight.type = \"checkbox\";\nspotBox.appendChild(light);\nspotBox.appendChild(document.createTextNode(\"Spotlight\"));\nsettings.insertBefore(spotBox, settings.firstChild);\nlight.addEventListener(\"change\", function () { queue(); });\nchunk.addEventListener(\"change\", function () { queue(); });\nfunction paged() { return chunk.checked && stops.length > PAGE; }\nfunction outT() { return skip.checked && !panelIn ? -1 : 0; }\nfunction skipPanel() {\n panel.tabIndex = outT();\n panel.querySelectorAll(\"button,a,input\").forEach(function (e) { e.tabIndex = e.className === \"lc\" ? (panelIn ? 0 : -1) : outT(); });\n}\nskip.addEventListener(\"change\", function () {\n skipPanel();\n svg.classList.toggle(\"in\", !skip.checked);\n svgPg.classList.toggle(\"in\", !skip.checked);\n dot.classList.toggle(\"in\", !skip.checked);\n dotPg.classList.toggle(\"in\", !skip.checked);\n rescan();\n});\nvar a = document.createElement(\"a\");\na.className = \"a\";\na.href = \"https://matjazkorosec.com/tools/tab-trail\";\na.target = \"_blank\";\na.rel = \"noopener\";\na.textContent = \"matjazkorosec.com/tools/tab-trail\";\nvar how = document.createElement(\"p\");\nhow.className = \"hw\";\nvar MAC = /Mac/.test(navigator.platform || navigator.userAgent);\nvar KEYS = \"Ctrl+Shift+F\";\nvar ver = document.createElement(\"span\");\nver.className = \"vr\";\nver.textContent = \"v\" + VERSION;\nhow.appendChild(ver);\nhow.appendChild(document.createTextNode(\"How to use & latest version: \"));\nhow.appendChild(a);\nvar keysBtn = document.createElement(\"button\");\nkeysBtn.className = \"sg\";\nkeysBtn.type = \"button\";\nkeysBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(keysBtn, 16, \"M1.5 4.5h13v7h-13zM4 7h1M7.5 7h1M11 7h1M5 9.5h6\", 1.6);\nkeysBtn.appendChild(document.createTextNode(\"Shortcuts\"));\nkeysBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(keysBtn, gear);\nvar keysBox = document.createElement(\"div\");\nkeysBox.className = \"so\";\nkeysBox.hidden = true;\ntray.insertBefore(keysBox, gear);\n[[KEYS + \":\", \" into this panel\"], [\"Escape:\", \" back to the page\"], [\"Tab, Shift+Tab:\", \" along the trail\"], [\"Space or Escape:\", \" pause Play\"]].forEach(function (k) {\n keysBox.appendChild(line(\"k\", k[0], k[1]));\n});\nkeysBtn.addEventListener(\"click\", function () {\n keysBox.hidden = !keysBox.hidden;\n keysBtn.setAttribute(\"aria-expanded\", keysBox.hidden ? \"false\" : \"true\");\n});\nvar legendBtn = document.createElement(\"button\");\nlegendBtn.className = \"sg\";\nlegendBtn.type = \"button\";\nlegendBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(legendBtn, 16, \"M3 4h1M6.5 4H13M3 8h1M6.5 8H13M3 12h1M6.5 12H13\", 1.6);\nlegendBtn.appendChild(document.createTextNode(\"Legend\"));\nlegendBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(legendBtn, keysBtn);\ntray.insertBefore(legend, keysBtn);\nlegendBtn.addEventListener(\"click\", function () {\n legend.hidden = !legend.hidden;\n legendBtn.setAttribute(\"aria-expanded\", legend.hidden ? \"false\" : \"true\");\n});\ntray.appendChild(how);\nvar logs = [], logFilter = \"all\", logOpen = false, LOG_MAX = 500, showWcag = false, wcagBoxes = [];\nfunction wcagBox(parent, doc) {\n var lb = doc.createElement(\"label\");\n lb.className = \"lw\";\n var cb = doc.createElement(\"input\");\n cb.type = \"checkbox\";\n cb.checked = showWcag;\n cb.addEventListener(\"change\", function () {\n showWcag = cb.checked;\n wcagSync();\n });\n lb.appendChild(cb);\n lb.appendChild(doc.createTextNode(\"Show WCAG\"));\n parent.appendChild(lb);\n wcagBoxes.push(cb);\n return cb;\n}\nfunction wcagSync() {\n wcagBoxes.forEach(function (b) { b.checked = showWcag; });\n logGroup.classList.toggle(\"nw\", !showWcag);\n if (tabOpen()) logTab.document.body.classList.toggle(\"nw\", !showWcag);\n}\nvar lastStops = -1, lastMissed = -1, lastForced = -1, probMiss = new Map(), probHov = new Map(), probForce = new Map(), seenForce = new WeakSet(), seenOk = new WeakSet(), seenCss = new Set();\nvar RES = { OK: \"ok\", PROBLEM: \"bad\", SKIPPED: \"skip\", INFO: \"info\" };\nvar FILT = [[\"all\", \"All\"], [\"bad\", \"Problems\"], [\"ok\", \"OK\"], [\"skip\", \"Skipped\"]];\nvar tabChecked = null, filterSets = [], logTab = null, tabList = null, tabSum = null, tabSet = null, tabNote = null, tabPoll = 0;\nfunction pl(n, one, many) { return n + \" \" + (n === 1 ? one : many); }\nfunction desc(e) {\n var t = e.tagName.toLowerCase();\n if (e.id) return t + \"#\" + scrub(e.id);\n var c = typeof e.className === \"string\" ? e.className.trim().split(/\\s+/).filter(Boolean).slice(0, 2) : [];\n return c.length ? t + \".\" + scrub(c.join(\".\")) : t;\n}\nfunction ref(e) { return { el: e, n: stops.indexOf(e) + 1, l: label(e), d: desc(e) }; }\nfunction popName(p) {\n var n = p.getAttribute(\"aria-label\") || \"\", by = p.getAttribute(\"aria-labelledby\");\n if (!n && by) {\n var t = document.getElementById(by.split(/\\s+/)[0]);\n if (t) n = t.textContent || \"\";\n }\n if (!n) {\n var h = p.querySelector(\"h1,h2,h3,h4,legend\");\n if (h) n = h.textContent || \"\";\n }\n n = scrub(n).trim().replace(/\\s+/g, \" \");\n if (n.length > 28) n = n.slice(0, 27) + \"...\";\n return { el: p, n: 0, l: n || label(p), d: desc(p) };\n}\nfunction partText(x) { return typeof x === \"string\" ? x : x.n ? x.n + \" \\\"\" + x.l + \"\\\"\" : \"\\\"\" + x.l + \"\\\" \" + x.d; }\nfunction looksWhy(m) {\n var why = [], role = m.getAttribute(\"role\") || \"\";\n if (m.tagName === \"A\" && !m.hasAttribute(\"href\")) why.push(\"a link with no address\");\n if (m.hasAttribute(\"onclick\")) why.push(\"a click handler in the HTML\");\n if (ROLES.test(role)) why.push(\"role=\\\"\" + role + \"\\\"\");\n if (getComputedStyle(m).cursor === \"pointer\") why.push(\"a pointer cursor\");\n return why.length ? \"has \" + why.join(\", \") : \"looks clickable\";\n}\nfunction addr() { return location.protocol + \"//\" + location.host + cleanUrl(location.pathname); }\nfunction two(n) { return (n < 10 ? \"0\" : \"\") + n; }\nfunction clock(t) { return two(t.getHours()) + \":\" + two(t.getMinutes()) + \":\" + two(t.getSeconds()); }\nfunction browser() {\n var u = navigator.userAgent, m;\n if ((m = u.match(/Edg\\/(\\d+)/))) return \"Edge \" + m[1];\n if ((m = u.match(/Firefox\\/(\\d+)/))) return \"Firefox \" + m[1];\n if ((m = u.match(/Chrome\\/(\\d+)/))) return \"Chrome \" + m[1];\n if ((m = u.match(/Version\\/(\\d+)[^ ]* (Mobile\\/\\S+ )?Safari/))) return \"Safari \" + m[1];\n return u;\n}\nvar CHECKS = [\"Missed spots\", \"Hover menus\", \"Forced order\", \"Out of order\", \"Keyboard trap\", \"Hidden focus\", \"Lost focus\"];\nvar WCAG = { \"Missed spots\": \"2.1.1 A\", \"Hover menus\": \"2.1.1 A\", \"Out of order\": \"2.4.3 A\", \"Forced order\": \"2.4.3 A\", \"Keyboard trap\": \"2.1.2 A\", \"Lost focus\": \"2.4.3 A\", \"Hidden focus\": \"2.4.11 AA\" };\nfunction showUrl(f) { return \"https://matjazkorosec.com/tools/tab-trail#show-\" + f.toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\"); }\nfunction ranChecks() {\n var out = [];\n logs.forEach(function (e) { if (e.k !== \"INFO\" && CHECKS.indexOf(e.f) >= 0 && out.indexOf(e.f) < 0) out.push(e.f); });\n return out;\n}\nvar checkedKey = {};\nfunction checkedLine(p, doc) {\n var ran = ranChecks(), bad = {};\n logs.forEach(function (e) { if (e.k === \"PROBLEM\" && !e.fixed) bad[e.f] = 1; });\n var k = ran.map(function (f) { return f + (bad[f] ? \"!\" : \"\"); }).join(\"|\");\n p.hidden = !ran.length;\n if (checkedKey[p.className + (doc === document ? \"1\" : \"2\")] === k && p.firstChild) return;\n checkedKey[p.className + (doc === document ? \"1\" : \"2\")] = k;\n while (p.firstChild) p.removeChild(p.firstChild);\n p.appendChild(doc.createTextNode(\"Checked: \"));\n ran.forEach(function (f, i) {\n if (i) p.appendChild(doc.createTextNode(\", \"));\n var a = doc.createElement(\"a\");\n a.className = bad[f] ? \"lq bad\" : \"lq\";\n a.href = showUrl(f);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = f;\n a.title = \"What \" + f + \" checks\";\n if (doc === document) a.tabIndex = outT();\n p.appendChild(a);\n });\n}\nfunction res(e) { return e.fixed ? \"fixed\" : RES[e.k]; }\nfunction shows(e) { return logFilter === \"all\" || res(e) === logFilter; }\nfunction logCounts() {\n var c = { all: logs.length, bad: 0, ok: 0, skip: 0, info: 0, fixed: 0 };\n logs.forEach(function (e) { c[res(e)]++; });\n return c;\n}\nfunction tabOpen() { return !!(logTab && !logTab.closed); }\nfunction logView() { return tabOpen() ? tabList : logOpen ? logList : null; }\nfunction scroller(v) { return v === logList ? panel : v.ownerDocument.scrollingElement || v.ownerDocument.documentElement; }\nfunction toTop(v) {\n if (v !== logList) return void (scroller(v).scrollTop = 0);\n var d = v.getBoundingClientRect().top - panel.getBoundingClientRect().top;\n if (d < 0) panel.scrollTop += d - 12;\n}\nfunction wcagOf(e) { return e.w || WCAG[e.f]; }\nfunction log(k, f, parts, ai, w) {\n var e = { t: new Date(), k: k, f: f, p: parts, li: null, ai: ai || null, w: w || null };\n logs.push(e);\n if (k === \"PROBLEM\" && e.ai) probLog.push(e);\n if ((k === \"OK\" || k === \"PROBLEM\") && (f === \"Out of order\" || f === \"Keyboard trap\") && pressed) judgedDir[pressed > 0 ? 1 : -1] = 1;\n if (logs.length > LOG_MAX) {\n var old = logs.shift();\n if (old.li && old.li.parentNode) old.li.parentNode.removeChild(old.li);\n }\n if (!logList) return;\n logSummary();\n var v = logView();\n if (!v || !shows(e)) return;\n var sc = scroller(v), top = v === logList ? v.getBoundingClientRect().top >= sc.getBoundingClientRect().top : sc.scrollTop < 8;\n e.li = logLi(e, v.ownerDocument);\n v.insertBefore(e.li, v.firstChild);\n if (top) { if (v !== logList) sc.scrollTop = 0; }\n else sc.scrollTop += e.li.getBoundingClientRect().height;\n}\nfunction review() {\n if (lastStops < 0) log(\"INFO\", \"Scan\", [\"Found \" + pl(stops.length, \"stop\", \"stops\") + \". Read \" + pl(cssRules, \"CSS rule\", \"CSS rules\") + \" from \" + pl(cssSheets, \"style sheet\", \"style sheets\") + \".\"]);\n else if (stops.length !== lastStops) log(\"INFO\", \"Scan\", [\"Page changed: \" + pl(stops.length, \"stop\", \"stops\") + \" now, \" + lastStops + \" before.\"]);\n lastStops = stops.length;\n cssBlocked.forEach(function (h) {\n if (seenCss.has(h)) return;\n seenCss.add(h);\n log(\"SKIPPED\", \"Hover menus\", [\"Can't read \" + cleanUrl(h) + \", it comes from another site.\"]);\n });\n var mSet = new Set(missed), hSet = new Set(hovers), fSet = new Set(forcedBad), fresh = {}, nNew = 0;\n function add(f) {\n fresh[f] = 1;\n nNew++;\n }\n probMiss.forEach(function (e, m) {\n if (mSet.has(m)) return;\n e.fixed = true;\n probMiss.delete(m);\n log(\"OK\", \"Missed spots\", [ref(m), stopSet.has(m) ? \" is a Tab stop now.\" : m.isConnected ? \" is no longer flagged.\" : \" is gone from the page.\"]);\n });\n probHov.forEach(function (e, h) {\n if (hSet.has(h)) return;\n e.fixed = true;\n probHov.delete(h);\n if (tabOpens.has(h)) seenOk.add(h);\n log(\"OK\", \"Hover menus\", [ref(h), !h.isConnected ? \" is gone from the page.\" : tabOpens.has(h) ? \" opens when Tab reaches it.\" : \" no longer opens only on mouse hover.\"]);\n });\n missed.forEach(function (m) {\n if (probMiss.has(m)) return;\n var item = m.closest(GROUP) && ITEM.test(m.getAttribute(\"role\") || \"\");\n log(\"PROBLEM\", \"Missed spots\", [ref(m), \" \" + looksWhy(m) + \", but Tab never reaches it.\"], aiOf(W_KEY, \"Every element that reacts to a click can be reached with the Tab key and used with Enter or Space.\", item ? \"It is a role=\\\"\" + m.getAttribute(\"role\") + \"\\\" item in a group the arrow keys move through, and no item in the group is a Tab stop. Give 1 item tabindex=\\\"0\\\" (the selected one) and move between the items with the arrow keys.\" : m.tagName === \"A\" && !m.hasAttribute(\"href\") ? \"Give the link an href, or make it a <button type=\\\"button\\\"> if it runs script.\" : \"Use <button type=\\\"button\\\"> for an action or <a href> for a link instead of the \" + m.tagName.toLowerCase() + \". If the tag can't change, add tabindex=\\\"0\\\" and role=\\\"button\\\", and handle Enter and Space in a keydown listener.\" + (looksWhy(m) === \"has a pointer cursor\" ? \" Only the pointer cursor makes it look clickable: if it is not meant to be clickable, remove cursor: pointer from it instead.\" : \"\"), [[\"Element\", m]], null, true));\n probMiss.set(m, logs[logs.length - 1]);\n add(\"Missed spots\");\n });\n if (!missed.length && lastMissed !== 0) log(\"OK\", \"Missed spots\", [lastMissed > 0 ? \"No clickable things Tab skips now.\" : \"No clickable things Tab skips.\"]);\n lastMissed = missed.length;\n hoverOk.forEach(function (o) {\n if (seenOk.has(o[0])) return;\n seenOk.add(o[0]);\n log(\"OK\", \"Hover menus\", [ref(o[0]), o[1] === \"focus\" ? \" opens on mouse hover and on keyboard focus.\" : o[1] === \"tab\" ? \" opens when Tab reaches it.\" : \" opens on mouse hover and has a toggle button (aria-expanded), so the keyboard can open it.\"]);\n });\n hovers.forEach(function (h) {\n if (probHov.has(h)) return;\n var hr = hovRule.get(h) || [\":hover\", \"\"];\n hr = [scrub(hr[0]), hr[1]];\n var tw = (hr[0].match(/\\.(?:[\\w-]|\\\\.)+/g) || []).map(function (c) { return c.slice(1).replace(/\\\\(.)/g, \"$1\"); }).filter(function (c) { return /(^|:)(group-|peer-)?hover:/.test(c); })[0];\n var twFix = tw ? \"This rule comes from the Tailwind class \" + tw + \". Add \" + tw.replace(/(^|:)group-hover:/, \"$1group-focus-within:\").replace(/(^|:)peer-hover:/, \"$1peer-focus:\").replace(/(^|:)hover:/, \"$1focus-within:\") + \" next to it in the same class list, so it also opens on keyboard focus. Or open the menu with a <button aria-expanded> that toggles it.\" : \"\";\n var seen = hovSeen.has(h);\n var dead = !seen && !h.matches(FOCUSABLE) && ![].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return tabbable(x); });\n var skipped = [].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return x.tabIndex < 0; });\n var deadFix = dead ? \" Nothing inside it can take keyboard focus now, so a focus rule alone will never open it: make the part you hover a <button type=\\\"button\\\" aria-expanded=\\\"false\\\"> that toggles the menu.\" + (skipped ? \" The links or buttons inside have tabindex=\\\"-1\\\", so Tab skips them even when the menu is open: remove it.\" : \"\") : \"\";\n log(\"PROBLEM\", \"Hover menus\", [ref(h), \" opens only on mouse hover (\" + hr[0] + \").\" + (seen ? \" Tab reaches its links, but they stay invisible while they have focus.\" : \" No focus rule, no toggle button.\")], aiOf(seen ? W_VIS : W_KEY, seen ? \"The menu also opens while a link or button inside it has keyboard focus, so keyboard users can see where they are.\" : \"The menu also opens when a link or button inside it gets keyboard focus, so keyboard users can reach its links.\", (twFix || \"Next to the rule \" + hr[0] + \" add \" + hr[0].replace(/:hover/g, \":focus-within\") + \" with the same declarations, or open the menu with a <button aria-expanded> that toggles it.\") + deadFix, [[\"Element\", h, null, true]], [\"CSS rule: \" + hr[0], \"Style sheet: \" + (hr[1] ? cleanUrl(hr[1]) : \"unknown\")], true), seen ? \"2.4.7 AA\" : null);\n probHov.set(h, logs[logs.length - 1]);\n add(\"Hover menus\");\n });\n probForce.forEach(function (e, f) {\n if (fSet.has(f)) return;\n e.fixed = true;\n probForce.delete(f);\n log(\"OK\", \"Forced order\", [ref(f), !f.isConnected ? \" is gone from the page.\" : forced.indexOf(f) >= 0 ? \" is in page order now.\" : f.tabIndex > 0 ? \" is no longer a Tab stop.\" : \" has no tabindex above 0 now.\"]);\n });\n forced.forEach(function (f) {\n if (probForce.has(f) || (!fSet.has(f) && seenForce.has(f))) return;\n var ti = f.getAttribute(\"tabindex\"), at = stops.indexOf(f) + 1, page = domAt.get(f) + 1;\n if (!fSet.has(f)) {\n seenForce.add(f);\n return log(\"INFO\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", but it is already in page order, so Tab order stays the same. tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\"]);\n }\n seenForce.delete(f);\n log(\"PROBLEM\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", which pulls it ahead of the page: Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". It fails WCAG 2.4.3 when that order makes no sense (F44).\"], aiOf(W_FORCE, \"Tab follows the order of the page. No element has tabindex above 0, so none is pulled ahead of the rest.\", \"Remove the tabindex, or set it to 0, and move the element in the HTML where it should come in Tab order.\", [[\"Element\", f]], [\"Measured: tabindex=\\\"\" + ti + \"\\\", Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". \" + pl(forced.length, \"stop\", \"stops\") + \" on the page \" + (forced.length === 1 ? \"has\" : \"have\") + \" tabindex above 0.\"], true));\n probForce.set(f, logs[logs.length - 1]);\n add(\"Forced order\");\n });\n if (!forcedBad.length && lastForced !== 0) log(\"OK\", \"Forced order\", [forced.length ? \"No stop with tabindex above 0 is out of page order\" + (lastForced > 0 ? \" now.\" : \".\") : lastForced > 0 ? \"No stops with tabindex above 0 now.\" : \"No stops with tabindex above 0.\"]);\n lastForced = forcedBad.length;\n if (nNew) announce(pl(nNew, \"new problem\", \"new problems\") + \": \" + Object.keys(fresh).join(\", \") + \".\");\n}\nfunction goTo(e) {\n if (!e.isConnected) return;\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n if (stops.indexOf(e) < 0) return queue();\n endPress();\n e.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction logLi(e, doc) {\n var li = doc.createElement(\"li\");\n li.className = \"lx \" + RES[e.k];\n function sp(cls, text) {\n var x = doc.createElement(\"span\");\n x.className = cls;\n x.textContent = text;\n li.appendChild(x);\n return x;\n }\n sp(\"tm\", clock(e.t));\n sp(\"st\", e.k);\n var bd = sp(\"bd\", \"\");\n var ft = doc.createElement(CHECKS.indexOf(e.f) >= 0 ? \"a\" : \"b\");\n ft.className = \"ft\";\n ft.textContent = e.f;\n if (ft.tagName === \"A\") {\n ft.className = \"ft lq\";\n ft.href = showUrl(e.f);\n ft.target = \"_blank\";\n ft.rel = \"noopener\";\n ft.title = \"What \" + e.f + \" checks\";\n if (doc === document) ft.tabIndex = outT();\n }\n bd.appendChild(ft);\n bd.appendChild(doc.createTextNode(\" \"));\n if (wcagOf(e)) {\n var wc = doc.createElement(\"span\");\n wc.className = \"wc\";\n wc.textContent = \"WCAG \" + wcagOf(e);\n bd.appendChild(wc);\n bd.appendChild(doc.createTextNode(\" \"));\n }\n e.p.forEach(function (x) {\n if (typeof x === \"string\") return bd.appendChild(doc.createTextNode(x));\n if (!x.n) return bd.appendChild(doc.createTextNode(partText(x)));\n var c = doc.createElement(\"button\");\n c.type = \"button\";\n c.className = \"lc\";\n c.textContent = String(x.n);\n c.setAttribute(\"aria-label\", \"Go to stop \" + x.n);\n if (doc === document) c.tabIndex = panelIn ? 0 : -1;\n c.addEventListener(\"click\", function () {\n if (doc !== document && tabOpen() && window.name) logTab.open(\"\", window.name);\n goTo(x.el);\n });\n bd.appendChild(c);\n bd.appendChild(doc.createTextNode(\" \\\"\" + x.l + \"\\\"\"));\n });\n return li;\n}\nfunction logText() {\n var c = logCounts();\n var out = [\"Tab trail \" + VERSION + \" log\", addr(), stamp(), browser() + \", window \" + innerWidth + \" x \" + innerHeight, pl(stops.length, \"stop\", \"stops\") + \", \" + pl(c.bad, \"problem\", \"problems\") + \", \" + c.ok + \" OK, \" + c.skip + \" skipped\", \"\"];\n logs.slice().reverse().forEach(function (e) {\n out.push(clock(e.t) + \" \" + (e.k + \" \").slice(0, 8) + \" \" + e.f + (showWcag && wcagOf(e) ? \" (WCAG \" + wcagOf(e) + \")\" : \"\"));\n out.push(\" \" + e.p.map(partText).join(\"\"));\n });\n return out.join(\"\\n\");\n}\nvar W_FORCE = \"2.4.3 Focus Order (Level A). tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\", W_TRAP = \"2.1.2 No Keyboard Trap (Level A)\", W_KEY = \"2.1.1 Keyboard (Level A)\", W_VIS = \"2.4.7 Focus Visible (Level AA)\", W_ORDER = \"2.4.3 Focus Order (Level A)\", W_HIDE = \"2.4.11 Focus Not Obscured (Minimum) (Level AA)\";\nfunction cssId(t) { return /^[A-Za-z][\\w-]*$/.test(t); }\nfunction sel(e) {\n if (!e || e.nodeType !== 1) return \"\";\n var rt = e.getRootNode(), live = e.isConnected, path = [];\n for (var n = e; n && n.nodeType === 1; n = n.parentElement) {\n var t = n.tagName.toLowerCase();\n if (n.id && cssId(n.id) && !secretish(n.id) && live && rt.querySelectorAll(\"#\" + n.id).length === 1) {\n path.unshift(\"#\" + n.id);\n break;\n }\n if (t === \"html\" || t === \"body\") {\n path.unshift(t);\n break;\n }\n var c = typeof n.className === \"string\" ? n.className.trim().split(/\\s+/).filter(function (x) { return cssId(x) && !secretish(x); }).slice(0, 2) : [];\n var part = t + (c.length ? \".\" + c.join(\".\") : \"\"), par = n.parentElement;\n if (par) {\n var same = Array.prototype.filter.call(par.children, function (x) { return x.tagName === n.tagName; });\n if (same.length > 1) part += \":nth-of-type(\" + (same.indexOf(n) + 1) + \")\";\n }\n path.unshift(part);\n if (live) {\n try { if (rt.querySelectorAll(path.join(\" > \")).length === 1) break; } catch (x) {}\n }\n }\n var out = path.join(\" > \");\n if (rt && rt.host) out = sel(rt.host) + \" (inside its shadow root) \" + out;\n return out;\n}\nvar KEEP = /^(id|class|role|type|name|href|src|tabindex|disabled|hidden|contenteditable|aria-[\\w-]+)$/, VOID = /^(area|br|col|embed|hr|img|input|link|meta|source|track|wbr)$/;\nfunction attrText(n, v) {\n if (n === \"href\" || n === \"src\") return cleanUrl(v);\n if (n === \"id\" || n === \"class\") return scrub(v);\n if (n === \"role\" || n === \"type\") return v;\n v = scrub(v);\n return v.length > 60 ? v.slice(0, 60) + \"...\" : v;\n}\nfunction snip(e, kids) {\n var tag = e.tagName.toLowerCase(), open = \"<\" + tag;\n [].forEach.call(e.attributes, function (a) {\n if (KEEP.test(a.name)) open += \" \" + a.name + \"=\\\"\" + attrText(a.name, a.value).replace(/\"/g, \""\") + \"\\\"\";\n });\n open += \">\";\n if (VOID.test(tag)) return open;\n if (kids && e.children.length) return open + [].slice.call(e.children, 0, 8).map(function (c) { return c.children.length ? snip(c).replace(/>[^<]*<\\/[\\w-]+>$/, \">...</\" + c.tagName.toLowerCase() + \">\") : snip(c); }).join(\"\") + (e.children.length > 8 ? \"...\" : \"\") + \"</\" + tag + \">\";\n var text = scrub((e.textContent || \"\").trim().replace(/\\s+/g, \" \"));\n return open + (text.length > 40 ? text.slice(0, 40) + \"...\" : text) + \"</\" + tag + \">\";\n}\nvar FRAME = /^(__.*|SegmentViewNode|LayoutRouter.*|InnerLayoutRouter|OuterLayoutRouter|RenderFromTemplateContext|ScrollAndFocusHandler|InnerScrollAndFocusHandler|.*Boundary.*|HTTPAccessFallback.*|Router|AppRouter|HotReload|ReactDevOverlay|DevRootHTTPAccessFallbackBoundary|ServerRoot|Root|AppContainer|Suspense|Fragment|StrictMode|Head|Html|Body|Script|ClientPageRoot|ClientSegmentRoot|.*Provider|.*Context|.*Consumer|Link|LinkComponent|Image|ForwardRef|Memo|Anonymous|_c\\d*)$/;\nfunction compOf(e) {\n var keys = Object.keys(e), k = keys.filter(function (x) { return x.indexOf(\"__reactFiber$\") === 0 || x.indexOf(\"__reactInternalInstance$\") === 0; })[0];\n if (k) {\n var names = [], src = \"\", any = false;\n for (var f = e[k]; f && names.length < 3; f = f.return) {\n var t = f.type;\n if (!src && f._debugSource && f._debugSource.fileName) src = f._debugSource.fileName + \":\" + f._debugSource.lineNumber;\n if (!t || typeof t === \"string\" || typeof t === \"symbol\") continue;\n var n = t.displayName || t.name || (t.render && (t.render.displayName || t.render.name)) || (t.type && (t.type.displayName || t.type.name));\n if (!n) continue;\n any = true;\n if (FRAME.test(n) || names.indexOf(n) >= 0) continue;\n names.push(n);\n }\n if (!names.length) return any ? \"React, rendered by a server component or by the framework itself, so its component name is not in the browser; search the code for the HTML or its classes\" : \"\";\n if (names.every(function (n) { return n.length <= 2; })) return \"React (component names are minified in this production build; a development build shows them)\";\n return \"React \" + names[0] + (names.length > 1 ? \", inside \" + names.slice(1).join(\", inside \") : \"\") + (src ? \", source \" + src : \"\");\n }\n if (e.__vueParentComponent) {\n var vn = [];\n for (var c = e.__vueParentComponent; c && vn.length < 3; c = c.parent) {\n var nm = c.type && (c.type.name || c.type.__name);\n if (nm && vn.indexOf(nm) < 0) vn.push(nm);\n }\n if (vn.length) return \"Vue \" + vn[0] + (vn.length > 1 ? \", inside \" + vn.slice(1).join(\", inside \") : \"\");\n }\n if (e.__vue__ && e.__vue__.$options && e.__vue__.$options.name) return \"Vue \" + e.__vue__.$options.name;\n try {\n var ng = window.ng;\n if (ng && ng.getOwningComponent) {\n var oc = ng.getOwningComponent(e);\n if (oc && oc.constructor) return \"Angular \" + oc.constructor.name;\n }\n } catch (x) {}\n return \"\";\n}\nfunction whereOf(el) {\n if (!el || !el.isConnected) return \"\";\n var out = [], up = el.parentElement;\n while (up && up !== document.body && up !== document.documentElement && !up.id) up = up.parentElement;\n if (up && up.id && up !== document.body) out.push(\"inside #\" + scrub(up.id));\n var hs = document.querySelectorAll(\"h1,h2,h3,h4,h5,h6,[role=heading]\"), last = null;\n for (var i = 0; i < hs.length; i++) {\n if (hs[i] === el || (host && host.contains(hs[i]))) continue;\n if (hs[i].contains(el) || hs[i].compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) last = hs[i]; else break;\n }\n var t = last ? scrub((last.textContent || \"\").replace(/\\s+/g, \" \").trim()).slice(0, 60) : \"\";\n if (t) out.push(\"under the heading \\\"\" + t + \"\\\"\");\n return out.join(\", \");\n}\nfunction aiOf(crit, expect, fix, els, more, lazy) {\n function fact(x) {\n var o = { role: x[0], el: x[1] };\n function fill() {\n o.sel = x[2] ? x[2].sel : sel(x[1]);\n o.html = x[2] ? x[2].html : snip(x[1], x[3]);\n o.comp = compOf(x[1]);\n }\n if (!lazy) fill();\n else [\"sel\", \"html\", \"comp\"].forEach(function (k) {\n Object.defineProperty(o, k, { configurable: true, enumerable: true, get: function () { fill(); return o[k]; }, set: function (v) { Object.defineProperty(o, k, { value: v, writable: true, enumerable: true }); } });\n });\n return o;\n }\n return {\n crit: crit,\n expect: expect,\n fix: fix,\n more: more || [],\n els: els.filter(function (x) { return x[1]; }).map(fact)\n };\n}\nfunction tally(k) {\n var m = {}, order = [];\n logs.forEach(function (e) {\n if (e.k !== k) return;\n if (!m[e.f]) {\n m[e.f] = 0;\n order.push(e.f);\n }\n m[e.f]++;\n });\n return order.map(function (f) { return f + \" \" + m[f]; }).join(\", \");\n}\nfunction stamp() {\n var d = new Date();\n return d.getFullYear() + \"-\" + two(d.getMonth() + 1) + \"-\" + two(d.getDate()) + \" \" + two(d.getHours()) + \":\" + two(d.getMinutes());\n}\nfunction verifyOf(e) {\n var a = e.ai, t = e.p.map(partText).join(\"\");\n function el(r) {\n var x = a.els.filter(function (y) { return y.role === r; })[0];\n return x ? x.sel : \"\";\n }\n if (e.f === \"Missed spots\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" gets a stop number and the skipped count goes down by 1. Press Tab until it has focus, then Enter (and Space for a button) does what a click does.\";\n if (e.f === \"Forced order\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" has no tabindex above 0, its stop number matches its place on the page, and the Forced order count goes down by 1.\";\n if (e.f === \"Hover menus\") return \"Press Tab until a link inside \" + el(\"Element\") + \" has focus: the menu opens while focus is inside it, and Tab trail no longer lists it under hover menus.\";\n if (e.f === \"Hidden focus\") return \"Press Tab until \" + el(\"Element\") + \" has focus: part of it shows next to \" + el(\"Covered by\") + \", and its Hidden focus line in the log says in view or partly covered.\";\n if (e.f === \"Keyboard trap\") return \"Put focus on \" + el(\"Element\") + \" and press Tab: focus moves on to \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n if (e.f === \"Lost focus\") return \"Open the popup from \" + el(\"Opened by\") + \" with Enter, then close it with Escape or its close button: focus is back on \" + el(\"Opened by\") + \", and the log shows an OK Lost focus line.\";\n if (el(\"Popup\")) return \"Reload so the popup shows, then press Tab once: focus lands inside \" + el(\"Popup\") + \".\";\n return \"Put focus on \" + (el(\"Tab left from\") || \"the start of the page\") + \" and press \" + (t.indexOf(\"(Shift+Tab)\") >= 0 ? \"Shift+Tab\" : \"Tab\") + \" once: focus lands on \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n}\nvar hidTested = new Set();\nfunction coverage() {\n var out = [], left = stops.filter(function (x) { return !hidTested.has(x); }).map(function (x) { return stops.indexOf(x) + 1; });\n if (left.length) out.push(\"Hidden focus: \" + left.length + \" of \" + pl(stops.length, \"stop was\", \"stops were\") + \" never tested (\" + left.slice(0, 30).join(\", \") + (left.length > 30 ? \" and \" + (left.length - 30) + \" more\" : \"\") + \"). Press Play to test every stop.\");\n var presses = logs.filter(function (e) { return e.f === \"Out of order\" || e.f === \"Keyboard trap\"; }).length;\n out.push(\"Out of order and Keyboard trap: judged only for the \" + pl(presses, \"Tab press\", \"Tab presses\") + \" made in this run. Press Tab through the whole page, and Shift+Tab back, to judge every step.\");\n var pops = logs.filter(function (e) { return e.f === \"Lost focus\"; }).length;\n out.push(\"Lost focus: \" + (pops ? \"only \" + pl(pops, \"popup was\", \"popups were\") : \"no popups were\") + \" opened and closed in this run. Open and close every popup, menu and dialog on the page to check them all.\");\n out.push(\"Window size: everything was tested at \" + innerWidth + \" x \" + innerHeight + \" only. Sticky bars, menus and popups can behave differently on phones; run it again in a window about 390 px wide.\");\n out.push(\"Not checked by Tab trail at all: whether the focus outline is visible and has enough contrast, accessible names of buttons and links, color contrast of text, what a screen reader announces, and content inside iframes. Use axe DevTools or Lighthouse for names, contrast and iframes. Check focus visibility with Spotlight and screen reader output with VoiceOver or NVDA.\");\n return out;\n}\nvar probLog = [], ignore = [], CAP = 200, judgedDir = {};\nfunction ignored(e) {\n return ignore.length && e.ai.els.some(function (x) {\n for (var n = x.el; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n for (var i = 0; i < ignore.length; i++) if (n.matches(ignore[i])) return true;\n }\n return false;\n });\n}\nfunction openProbs(all) {\n var seen = {}, out = [];\n probLog.forEach(function (e) {\n var t = e.f + e.p.map(partText).join(\"\");\n if (e.fixed || seen[t]) return;\n seen[t] = 1;\n if (all || !ignored(e)) out.push(e);\n });\n return out;\n}\nfunction hash(t) {\n var h = 2166136261;\n for (var i = 0; i < t.length; i++) h = Math.imul(h ^ t.charCodeAt(i), 16777619);\n return (\"0000000\" + (h >>> 0).toString(16)).slice(-8);\n}\nfunction keyOf(e) {\n var t = e.tagName.toLowerCase();\n if (e.id && cssId(e.id)) return t + \"#\" + e.id;\n var up = \"\";\n for (var p = e.parentElement; p; p = p.parentElement) if (p.id && cssId(p.id)) { up = \"#\" + p.id + \" \"; break; }\n return up + t + (e.getAttribute(\"role\") ? \"[role=\" + e.getAttribute(\"role\") + \"]\" : \"\") + (e.getAttribute(\"name\") ? \"[name=\" + e.getAttribute(\"name\") + \"]\" : \"\") + \"\\\"\" + label(e) + \"\\\"\";\n}\nfunction mainEl(e) {\n var to = e.ai.els.filter(function (x) { return x.role === \"Tab jumped to\"; })[0];\n return to || e.ai.els[0];\n}\nfunction problemsOf(list) {\n var used = {};\n return list.map(function (e) {\n var m = mainEl(e), id = hash(e.f + \"|\" + e.ai.els.map(function (x) { return keyOf(x.el); }).join(\"|\"));\n used[id] = (used[id] || 0) + 1;\n return { id: used[id] > 1 ? id + \"-\" + used[id] : id, check: e.f, wcag: wcagOf(e) || null, selector: m ? m.sel : null, html: m ? m.html : null, component: m && m.comp ? m.comp : null, fix: e.ai.fix, verify: verifyOf(e) };\n });\n}\nfunction aiText() {\n var out = [], skips = [], seenS = {}, notes = [], probs = openProbs(), left = openProbs(true).length - probs.length, ids = problemsOf(probs), groups = [], byKey = {};\n probs.forEach(function (e, i) {\n var m = mainEl(e), k = /^(Missed spots|Hover menus|Forced order)$/.test(e.f) && m ? e.f + \"|\" + e.ai.fix + \"|\" + desc(m.el) + \"|\" + m.comp : \"#\" + i, g = byKey[k];\n if (!g) groups.push((g = byKey[k] = { i: i, list: [] }));\n g.list.push(e);\n });\n logs.forEach(function (e) {\n var t = e.p.map(partText).join(\"\");\n if (e.k === \"SKIPPED\" && !seenS[e.f + t]) {\n seenS[e.f + t] = 1;\n skips.push(e.f + \": \" + t);\n } else if (e.k === \"INFO\") notes.push(clock(e.t) + \" \" + e.f + \": \" + t);\n });\n var c = logCounts();\n out.push(\"Tab trail \" + VERSION + \" report for an AI agent\");\n out.push(\"Page: \" + addr());\n out.push(\"Ran on: \" + stamp() + \", \" + browser() + \", window \" + innerWidth + \" x \" + innerHeight);\n out.push(\"Tool: Tab trail (matjazkorosec.com/tools/tab-trail), a bookmarklet that checks the keyboard Tab order of the page. Stop numbers are positions in the Tab order when the check ran. Use the selectors, the HTML and the component names to find each element in the code.\");\n out.push(\"Run it again from a script (for example Playwright): save https://raw.githubusercontent.com/matjazkorosec/tab-trail/v\" + VERSION + \"/dist/tab-trail.js in your repo once and load your saved copy with page.evaluate(readFileSync(...)), which works under a Content Security Policy. Then await window.__tabTrail.play() to walk every stop, and read window.__tabTrail.problems() for every open problem as data, window.__tabTrail.report() for this same report or window.__tabTrail.log() for every line.\");\n out.push(\"\");\n out.push(\"Summary: \" + pl(probs.length, \"problem\", \"problems\") + \" to fix\" + (groups.length < probs.length ? \" (\" + pl(groups.length, \"different fix\", \"different fixes\") + \")\" : \"\") + \". \" + pl(c.ok, \"check\", \"checks\") + \" passed, \" + c.skip + \" skipped.\");\n if (walkEnd || walking) out.push(\"Play: \" + playState() + \".\");\n var pass = tally(\"OK\"), sk = tally(\"SKIPPED\");\n if (pass) out.push(\"Passed: \" + pass + \".\");\n if (sk) out.push(\"Skipped: \" + sk + \".\");\n var ran = ranChecks();\n if (ran.length) out.push(\"Checked: \" + ran.join(\", \") + \". Each check is explained at \" + showUrl(ran[0]).replace(/#.*/, \"#shows\") + \" under Fix what turns red.\");\n if (left) out.push(\"Left out on purpose: \" + pl(left, \"problem\", \"problems\") + \" inside \" + ignore.join(\", \") + \".\");\n if (groups.length > CAP) out.push(\"Showing the first \" + CAP + \" of \" + groups.length.toLocaleString(\"en-US\") + \" problems. window.__tabTrail.problems() returns every one.\");\n groups.slice(0, CAP).forEach(function (g, n) {\n var e = g.list[0], i = g.i, more = g.list.length - 2;\n out.push(\"\");\n out.push(\"Problem \" + (n + 1) + \" of \" + groups.length + \": \" + e.f + (g.list.length > 1 ? \", \" + g.list.length + \" elements with the same cause: \" + desc(mainEl(e).el) + \" (\" + g.list.slice(0, 2).map(function (x) { return \"\\\"\" + label(mainEl(x).el) + \"\\\"\"; }).join(\", \") + (more > 0 ? \" and \" + more + \" more\" : \"\") + \"). Fix it once in the component that draws them.\" : \"\") + \" (\" + clock(e.t) + \")\");\n out.push(\"Id: \" + ids[i].id + (g.list.length > 1 ? \" (the first of \" + g.list.length + \", window.__tabTrail.problems() lists every one)\" : \"\"));\n if (e.ai) out.push(\"WCAG: \" + e.ai.crit);\n out.push(\"What happened: \" + e.p.map(partText).join(\"\"));\n if (!e.ai) return;\n out.push(\"Expected: \" + e.ai.expect);\n e.ai.els.forEach(function (x) {\n out.push(x.role + \": \" + x.sel + (x.el.isConnected ? \"\" : \" (no longer on the page)\"));\n out.push(\" HTML: \" + x.html);\n if (x.comp) out.push(\" Component: \" + x.comp);\n var where = whereOf(x.el);\n if (where) out.push(\" Where: \" + where);\n });\n e.ai.more.forEach(function (m) { out.push(m); });\n out.push(\"Fix hint: \" + e.ai.fix);\n out.push(\"How to check the fix: \" + verifyOf(e));\n if (CHECKS.indexOf(e.f) >= 0) out.push(\"About this check: \" + showUrl(e.f));\n });\n out.push(\"\");\n out.push(\"Not covered in this run:\");\n coverage().forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length) {\n out.push(\"\");\n out.push(\"Skipped checks, and why:\");\n skips.slice(0, 12).forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length > 12) out.push(\"- and \" + (skips.length - 12) + \" more\");\n }\n if (notes.length) {\n out.push(\"\");\n out.push(\"Notes:\");\n notes.slice(-10).forEach(function (t) { out.push(\"- \" + t); });\n }\n return out.join(\"\\n\");\n}\nfunction copyIt(b, w, text, word) {\n var d = w.document;\n var lb = b.lastChild && b.lastChild.nodeType === 3 ? b.lastChild : b;\n function done(ok) {\n lb.textContent = ok ? \"Copied\" : \"Copy failed\";\n setTimeout(function () { lb.textContent = word; }, 1500);\n }\n function old() {\n var back = w === window ? deep() : d.activeElement;\n var ta = d.createElement(\"textarea\");\n ta.value = text;\n ta.setAttribute(\"readonly\", \"\");\n ta.style.cssText = \"position:fixed;left:0;top:0;width:1px;height:1px;opacity:0\";\n (w === window ? root : d.body).appendChild(ta);\n ta.focus({ preventScroll: true });\n ta.select();\n var ok = false;\n try { ok = d.execCommand(\"copy\"); } catch (x) {}\n ta.remove();\n if (back && back.focus) back.focus({ preventScroll: true });\n done(ok);\n }\n if (w.navigator.clipboard && w.isSecureContext) w.navigator.clipboard.writeText(text).then(function () { done(true); }, old);\n else old();\n}\nfunction filters(parent, doc) {\n var row = doc.createElement(\"div\");\n row.className = \"lf\";\n var set = FILT.map(function (f) {\n var b = doc.createElement(\"button\");\n b.type = \"button\";\n b.className = \"lt\";\n b.addEventListener(\"click\", function () {\n logFilter = f[0];\n logDraw();\n });\n row.appendChild(b);\n return b;\n });\n parent.appendChild(row);\n filterSets.push(set);\n return set;\n}\nfunction logSummary() {\n var c = logCounts();\n logSum.textContent = \" \" + pl(c.all, \"event\", \"events\");\n logBad.textContent = c.bad ? pl(c.bad, \"problem\", \"problems\") : \"\";\n logGroup.classList.toggle(\"warn\", c.bad > 0);\n filterSets.forEach(function (set) {\n set.forEach(function (b, i) {\n b.textContent = FILT[i][1] + \" \" + c[FILT[i][0]];\n b.setAttribute(\"aria-pressed\", logFilter === FILT[i][0] ? \"true\" : \"false\");\n b.classList.toggle(\"e\", FILT[i][0] === \"bad\" && c.bad > 0);\n });\n });\n if (tabSum && tabOpen()) tabSum.textContent = addr() + \", \" + pl(stops.length, \"stop\", \"stops\");\n checkedLine(logChecked, document);\n if (tabChecked && tabOpen()) checkedLine(tabChecked, logTab.document);\n if (sumLine && walkEnd === \"done\") sumDraw();\n}\nfunction logDraw() {\n if (logTab && logTab.closed) tabGone();\n logSummary();\n [logList, tabList].forEach(function (u) { if (u) while (u.firstChild) u.removeChild(u.firstChild); });\n logs.forEach(function (e) { e.li = null; });\n var away = tabOpen();\n logBody.hidden = !logOpen || away;\n logAway.hidden = !away;\n logBtn.setAttribute(\"aria-expanded\", logBody.hidden ? \"false\" : \"true\");\n var v = logView();\n if (!v) return;\n var frag = v.ownerDocument.createDocumentFragment();\n logs.slice().reverse().forEach(function (e) {\n if (!shows(e)) return;\n e.li = logLi(e, v.ownerDocument);\n frag.appendChild(e.li);\n });\n v.appendChild(frag);\n toTop(v);\n}\nfunction tabGone() {\n logTab = null;\n tabList = null;\n tabSum = null;\n tabChecked = null;\n wcagBoxes = wcagBoxes.filter(function (b) { return b.ownerDocument === document; });\n tabNote = null;\n filterSets = filterSets.filter(function (x) { return x !== tabSet; });\n tabSet = null;\n if (tabPoll) clearInterval(tabPoll);\n tabPoll = 0;\n}\nvar TAB_CSS = [\n \"body{margin:0;padding:12px;background:#e4dccd;color:#1a1612;font:15px/1.5 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif}\",\n \".hd,.box{box-sizing:border-box;max-width:1200px;margin:0 auto;background:#fbf8f3;border-radius:12px}\",\n \".wide .hd,.wide .box{max-width:none}\",\n \".fw{display:inline-grid;place-items:center;width:34px;height:34px;padding:0;border:1.5px solid #1a1612;border-radius:8px;background:#fff;color:#1a1612;cursor:pointer;box-sizing:border-box}\",\n \".fw:hover{background:#efe8dc}\",\n \".fw:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".fw .in,.wide .fw .out{display:none}\",\n \".wide .fw .in{display:inline}\",\n \".hd{position:sticky;top:12px;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:10px 8px;padding:14px 18px;box-shadow:0 0 0 12px #e4dccd}\",\n \".box{margin-top:8px;padding:12px 0 8px;overflow:hidden}\",\n \"h1{margin:0;font:700 22px/1.2 Georgia,serif}\",\n \".u{margin:0 auto 0 6px;color:#5f564c}\",\n \".nt{flex-basis:100%;margin:0;color:#d0103a;font-weight:700}\",\n \".nt[hidden]{display:none}\",\n \".lf{display:inline-grid;grid-auto-flow:column;gap:2px;padding:3px;background:#efe8dc;border-radius:10px;margin-right:14px}\",\n \".fr{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px 0}\",\n \".lt,.kl,.ka,.lo,.lc{font:inherit;color:inherit;cursor:pointer}\",\n \".lt{padding:3px 14px;border:0;border-radius:7px;background:none;color:#5f564c;font-weight:600;font-size:14px}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".kl,.ka,.lo{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border-radius:8px;font-weight:700;font-size:14px;white-space:nowrap;box-sizing:border-box}\",\n \".kl,.lo{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover,.lo:hover{background:#efe8dc}\",\n \".ka{border:0;background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".lo{font-weight:600}\",\n \".lt:focus-visible,.kl:focus-visible,.ka:focus-visible,.lo:focus-visible,.lc:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lck{margin:0;padding:0 18px 8px}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".ll{list-style:none;margin:0;padding:0}\",\n \".lx{display:grid;grid-template-columns:72px 80px 1fr;gap:2px 12px;padding:6px 18px;align-items:baseline}\",\n \".lx:hover{background:#f3ede3}\",\n \".lx .bd{min-width:0;overflow-wrap:anywhere}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".tm,.st{font:500 14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".st{font-weight:700}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{display:inline-block;min-width:24px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;background:none;font-size:14px;line-height:1.4;text-align:center}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\"\n].join(\"\");\nvar ownName = false, tabWide = false;\nfunction openTab() {\n var w = window.open(\"\", \"_blank\");\n if (!w) {\n tabMsg.hidden = false;\n return;\n }\n tabMsg.hidden = true;\n logTab = w;\n if (!window.name) {\n window.name = \"tab-trail-\" + Date.now();\n ownName = true;\n }\n var d = w.document;\n d.title = \"Tab trail log: \" + location.host;\n try {\n var tsh = new w.CSSStyleSheet();\n tsh.replaceSync(TAB_CSS);\n d.adoptedStyleSheets = [tsh];\n } catch (e) {\n var st = d.createElement(\"style\");\n st.textContent = TAB_CSS;\n d.head.appendChild(st);\n }\n var hd = d.createElement(\"div\");\n hd.className = \"hd\";\n var h1 = d.createElement(\"h1\");\n h1.textContent = \"Tab trail log\";\n hd.appendChild(h1);\n tabSum = d.createElement(\"p\");\n tabSum.className = \"u\";\n hd.appendChild(tabSum);\n var cp = d.createElement(\"button\");\n cp.type = \"button\";\n cp.className = \"kl\";\n icon(cp, 16, COPY_ICON, 1.6);\n cp.appendChild(d.createTextNode(\"Copy log\"));\n cp.addEventListener(\"click\", function () { copyIt(cp, w, logText(), \"Copy log\"); });\n hd.appendChild(cp);\n var ca = d.createElement(\"button\");\n ca.type = \"button\";\n ca.className = \"ka\";\n icon(ca, 16, AI_ICON, 1.6);\n ca.appendChild(d.createTextNode(\"Copy for AI\"));\n ca.addEventListener(\"click\", function () { copyIt(ca, w, aiText(), \"Copy for AI\"); });\n hd.appendChild(ca);\n var bk = d.createElement(\"button\");\n bk.type = \"button\";\n bk.className = \"lo\";\n bk.textContent = \"Put back in panel\";\n bk.addEventListener(\"click\", putBack);\n hd.appendChild(bk);\n var fw = d.createElement(\"button\");\n fw.type = \"button\";\n fw.className = \"fw\";\n fw.setAttribute(\"aria-label\", \"Full width\");\n fw.title = \"Full width\";\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n icon(fw, 16, \"M1.5 8h13M1.5 8l3-3M1.5 8l3 3M14.5 8l-3-3M14.5 8l-3 3\", 1.6).setAttribute(\"class\", \"out\");\n icon(fw, 16, \"M1.5 8h4.5M6 8l-3-3M6 8l-3 3M14.5 8H10M10 8l3-3M10 8l3 3\", 1.6).setAttribute(\"class\", \"in\");\n fw.addEventListener(\"click\", function () {\n tabWide = !tabWide;\n d.body.classList.toggle(\"wide\", tabWide);\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n });\n hd.appendChild(fw);\n d.body.classList.toggle(\"wide\", tabWide);\n tabNote = d.createElement(\"p\");\n tabNote.className = \"nt\";\n tabNote.textContent = \"Tab trail was closed on the page. This log no longer updates.\";\n tabNote.hidden = true;\n hd.appendChild(tabNote);\n var fr = d.createElement(\"div\");\n fr.className = \"fr\";\n hd.appendChild(fr);\n tabSet = filters(fr, d);\n wcagBox(fr, d);\n d.body.appendChild(hd);\n d.body.classList.toggle(\"nw\", !showWcag);\n var bd = d.createElement(\"div\");\n bd.className = \"box\";\n d.body.appendChild(bd);\n tabChecked = d.createElement(\"p\");\n tabChecked.className = \"lck\";\n bd.appendChild(tabChecked);\n tabList = d.createElement(\"ul\");\n tabList.className = \"ll\";\n bd.appendChild(tabList);\n tabPoll = setInterval(function () {\n if (logTab && logTab.closed) {\n tabGone();\n logDraw();\n }\n }, 1000);\n logOpen = true;\n logDraw();\n}\nfunction putBack() {\n var w = logTab;\n tabGone();\n logOpen = true;\n logDraw();\n if (w && !w.closed) w.close();\n}\nfunction lbtn(cls, text, parent) {\n var b = document.createElement(\"button\");\n b.type = \"button\";\n b.className = cls;\n b.textContent = text;\n parent.appendChild(b);\n return b;\n}\nvar logGroup = document.createElement(\"div\");\nlogGroup.className = \"lgp\";\nvar logBtn = document.createElement(\"button\");\nlogBtn.type = \"button\";\nlogBtn.className = \"sg\";\nlogBtn.setAttribute(\"aria-expanded\", \"false\");\nvar logWord = document.createElement(\"b\");\nlogWord.textContent = \"Log\";\nicon(logBtn, 16, \"M4 1.5h8v13H4zM6.5 5h3M6.5 8h3M6.5 11h2\", 1.6);\nlogBtn.appendChild(logWord);\nvar logSum = document.createElement(\"span\");\nlogSum.className = \"ls\";\nvar logBad = document.createElement(\"span\");\nlogBad.className = \"bg\";\nvar logInfo = document.createElement(\"span\");\nlogInfo.appendChild(logSum);\nlogBtn.appendChild(logInfo);\nlogBtn.appendChild(logBad);\nlogBtn.appendChild(document.createElement(\"i\"));\nlogGroup.appendChild(logBtn);\nvar logBody = document.createElement(\"div\");\nlogBody.className = \"lbd\";\nlogBody.hidden = true;\nlogGroup.appendChild(logBody);\nvar logTop = document.createElement(\"div\");\nlogTop.className = \"lr lrt\";\nlogBody.appendChild(logTop);\nvar logChecked = document.createElement(\"p\");\nlogChecked.className = \"lck\";\nlogChecked.hidden = true;\nlogBody.appendChild(logChecked);\nfilters(logBody, document);\nwcagBox(logBody, document);\nvar logList = document.createElement(\"ul\");\nlogList.className = \"ll\";\nlogBody.appendChild(logList);\nvar logRow = document.createElement(\"div\");\nlogRow.className = \"lr lb2\";\nlogBody.appendChild(logRow);\nvar copyBtn = lbtn(\"kl\", \"Copy log\", logRow);\ncopyBtn.insertBefore(icon(copyBtn, 16, COPY_ICON, 1.6), copyBtn.firstChild);\ncopyBtn.addEventListener(\"click\", function () { copyIt(copyBtn, window, logText(), \"Copy log\"); });\nvar aiLog = lbtn(\"ka\", \"Copy for AI\", logRow);\naiLog.insertBefore(icon(aiLog, 16, AI_ICON, 1.6), aiLog.firstChild);\naiLog.addEventListener(\"click\", function () { copyIt(aiLog, window, aiText(), \"Copy for AI\"); });\nfunction newTabBtn(parent) {\n var b = lbtn(\"lnt\", \"\", parent);\n icon(b, 14, \"M9 2.5h4.5V7M13.5 2.5L7.5 8.5M12 9.5v4h-9.5v-9.5h4\", 1.6);\n b.appendChild(document.createTextNode(\"Open log in new tab\"));\n b.addEventListener(\"click\", openTab);\n return b;\n}\nnewTabBtn(logTop);\nvar logEnd = document.createElement(\"div\");\nlogEnd.className = \"lr\";\nlogBody.insertBefore(logEnd, logRow.nextSibling);\nnewTabBtn(logEnd);\nvar tabMsg = document.createElement(\"p\");\ntabMsg.className = \"lm\";\ntabMsg.textContent = \"The browser blocked the new tab. Allow pop-ups for this site and try again.\";\ntabMsg.hidden = true;\nlogBody.insertBefore(tabMsg, logChecked);\nvar logAway = document.createElement(\"div\");\nlogAway.className = \"la\";\nlogAway.hidden = true;\nvar awayText = document.createElement(\"p\");\nawayText.textContent = \"The log is open in a new tab.\";\nlogAway.appendChild(awayText);\nvar awayRow = document.createElement(\"div\");\nawayRow.className = \"lr\";\nlogAway.appendChild(awayRow);\nlbtn(\"lo\", \"Show it\", awayRow).addEventListener(\"click\", function () { if (tabOpen()) logTab.focus(); });\nlbtn(\"lo\", \"Put it back\", awayRow).addEventListener(\"click\", putBack);\nlogGroup.appendChild(logAway);\nlogBtn.addEventListener(\"click\", function () {\n if (tabOpen()) return logTab.focus();\n logOpen = !logOpen;\n logDraw();\n if (!logOpen) return;\n var gr = logGroup.getBoundingClientRect(), pr = panel.getBoundingClientRect();\n if (gr.bottom > pr.bottom) panel.scrollTop += Math.min(gr.bottom - pr.bottom, gr.top - pr.top);\n});\ntray.insertBefore(logGroup, tray.firstChild);\nlogGroup.className = \"lgp sec\";\n[[legendBtn, legend], [keysBtn, keysBox], [gear, settings]].forEach(function (p) {\n var w = document.createElement(\"div\");\n w.className = \"sec\";\n tray.insertBefore(w, p[0]);\n w.appendChild(p[0]);\n w.appendChild(p[1]);\n});\n[logBtn, legendBtn, keysBtn, gear].forEach(function (b) {\n var g = b.querySelector(\"svg\"), t = document.createElement(\"span\");\n t.className = \"ic\";\n b.insertBefore(t, g);\n t.appendChild(g);\n});\nwcagSync();\nlogSummary();\nroot.appendChild(panel);\nskipPanel();\nvar closed = false;\nfunction place() {\n if (closed) return;\n var m = modal(), to = m || document.documentElement;\n if (host.parentNode !== to) to.appendChild(host);\n var want = { position: m ? \"fixed\" : \"absolute\", left: m ? -scrollX + \"px\" : \"0px\", top: m ? -scrollY + \"px\" : \"0px\" };\n for (var k in want) if (host.style[k] !== want[k]) host.style[k] = want[k];\n}\nplace();\n\nfunction el(name, attrs, parent) {\n var n = document.createElementNS(NS, name);\n for (var k in attrs) n.setAttribute(k, attrs[k]);\n parent.appendChild(n);\n return n;\n}\nvar queued = false, onlyScreen = true, boxKey = [];\nvar current = -1;\nvar pinned = new WeakMap();\nfunction isPinned(e) {\n if (pinned.has(e)) return pinned.get(e);\n var p = false;\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") { p = true; break; }\n }\n pinned.set(e, p);\n return p;\n}\nfunction clear(g) { while (g.firstChild) g.removeChild(g.firstChild); }\nvar spotEl = null;\nfunction lit(r) {\n clear(spot);\n if (!light.checked) return;\n var W = innerWidth, H = innerHeight, d = \"M0 0H\" + W + \"V\" + H + \"H0Z\";\n if (r && (r.width || r.height)) {\n var x0 = r.left - 6, y0 = r.top - 6, x1 = r.right + 6, y1 = r.bottom + 6, k = Math.min(8, (x1 - x0) / 2, (y1 - y0) / 2);\n d += \"M\" + (x0 + k) + \" \" + y0 + \"H\" + (x1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x1 + \" \" + (y0 + k) + \"V\" + (y1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x1 - k) + \" \" + y1 + \"H\" + (x0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x0 + \" \" + (y1 - k) + \"V\" + (y0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x0 + k) + \" \" + y0 + \"Z\";\n }\n el(\"path\", { d: d, fill: \"rgba(15,12,10,.72)\", \"fill-rule\": \"evenodd\" }, spot);\n}\nfunction box(m, r, layer) {\n if (m === shownEl) {\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, layer);\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, layer);\n }\n el(\"rect\", { x: r.left, y: r.top, width: r.width, height: r.height, fill: \"rgba(208,16,58,.12)\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\", rx: 3 }, layer);\n}\nfunction trailLine(pts, layer) {\n if (pts.length < 2) return;\n var p = pts.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \");\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 6, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\", opacity: 0.9 }, layer);\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 3, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\" }, layer);\n}\nfunction dotsIn(list, layer) {\n list.sort(function (a, b) { return (a[2] - 1 === current) - (b[2] - 1 === current); });\n list.forEach(function (d) {\n var big = d[2] > 99, on = d[2] - 1 === current;\n var g = el(\"g\", { class: \"o\", \"data-i\": d[2] - 1 }, layer);\n if (on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 19 : 17, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 4 }, g);\n if (d[3] && !on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: \"#fff\", stroke: \"#1a1612\", \"stroke-width\": 2, \"stroke-dasharray\": \"4 3\" }, g);\n else el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: on ? \"#c2410c\" : \"#1a1612\", stroke: \"#fff\", \"stroke-width\": 2 }, g);\n var t = el(\"text\", { x: d[0], y: d[1] + 0.5, fill: d[3] && !on ? \"#1a1612\" : \"#fff\", \"font-size\": big ? 10 : 11, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\", \"text-anchor\": \"middle\", \"dominant-baseline\": \"middle\" }, g);\n t.textContent = d[2];\n });\n}\nfunction shortLines(pts, sx, sy) {\n var W = innerWidth, H = innerHeight, MAX = 100;\n var v = pts.map(function (p) { return p[2] ? [p[0], p[1]] : [p[0] - sx, p[1] - sy]; });\n function on(p) { return p[0] >= 0 && p[0] <= W && p[1] >= 0 && p[1] <= H; }\n function arrow(from, to, L) {\n var dx = to[0] - from[0], dy = to[1] - from[1], len = Math.sqrt(dx * dx + dy * dy) || 1;\n var ux = dx / len, uy = dy / len;\n var tip = [from[0] + ux * L, from[1] + uy * L];\n trailLine([from, tip], svg);\n var pts3 = [[tip[0] + ux * 6, tip[1] + uy * 6], [tip[0] - ux * 9 + uy * 9, tip[1] - uy * 9 - ux * 9], [tip[0] - ux * 9 - uy * 9, tip[1] - uy * 9 + ux * 9]];\n el(\"polygon\", { points: pts3.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \"), fill: \"#ff8f57\", stroke: \"#fff\", \"stroke-width\": 2, \"stroke-linejoin\": \"round\" }, svg);\n }\n for (var k = 1; k < v.length; k++) {\n var a = v[k - 1], b = v[k], ia = on(a), ib = on(b);\n var len = Math.sqrt((b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1]));\n if (ia && ib && len <= MAX) trailLine([a, b], svg);\n else if (ia && ib) {\n var L = Math.min(MAX - 6, len / 2 - 12);\n arrow(a, b, L);\n arrow(b, a, L);\n }\n else if (ia || ib) arrow(ia ? a : b, ia ? b : a, Math.min(MAX - 6, len));\n }\n}\nfunction draw() {\n queued = false;\n var page = !onlyScreen;\n onlyScreen = true;\n var sx = scrollX, sy = scrollY;\n var last = Math.max(Math.ceil(stops.length / PAGE) - 1, 0);\n if (win > last) win = last;\n var lo = paged() ? win * PAGE : 0, hi = paged() ? Math.min(lo + PAGE, stops.length) : stops.length;\n var red = [], at = [];\n missed.concat(hovers).forEach(function (m) {\n var p = isPinned(m);\n if (p || page) red.push([m, m.getBoundingClientRect(), p]);\n });\n for (var i = lo; i < hi; i++) {\n var sr = stops[i].getBoundingClientRect(), st = sr.width < 2 && sr.height < 2;\n at.push([sr, st, st || isPinned(stops[i])]);\n }\n var fr = shownEl && hovers.indexOf(shownEl) < 0 && forced.indexOf(shownEl) >= 0 ? [shownEl.getBoundingClientRect(), isPinned(shownEl)] : null;\n var lr = light.checked && spotEl && spotEl.isConnected ? spotEl.getBoundingClientRect() : null;\n var key = [shownEl];\n red.forEach(function (x) { if (!x[2]) key.push(x[0], x[1].left + sx, x[1].top + sy, x[1].width, x[1].height); });\n if (fr && !fr[1]) key.push(fr[0].left + sx, fr[0].top + sy, fr[0].width, fr[0].height);\n var keep = page && same(key, boxKey);\n if (page) boxKey = key;\n clear(svg);\n clear(dot);\n clear(under);\n lit(lr);\n if (page) {\n clear(svgPg);\n clear(dotPg);\n if (!keep) clear(underPg);\n }\n red.forEach(function (x) {\n var m = x[0], r = x[1];\n if (x[2]) box(m, r, under);\n else if (!keep) box(m, { left: r.left + sx, top: r.top + sy, width: r.width, height: r.height }, underPg);\n });\n if (fr) {\n var hr = fr[0], hp = fr[1];\n if (hp || (page && !keep)) {\n var hx = hp ? hr.left : hr.left + sx, hy = hp ? hr.top : hr.top + sy, hl = hp ? under : underPg;\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, hl);\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, hl);\n }\n }\n var hid = 0, placedPg = [], placedSc = [], pts = [], dotsPg = [], dotsSc = [];\n var big = stops.length > PAGE;\n group.style.display = big ? \"\" : \"none\";\n pager.style.display = paged() ? \"\" : \"none\";\n chunkBox.style.marginTop = paged() ? \"\" : \"0\";\n if (paged()) {\n pageText.textContent = \"Stops \" + (lo + 1) + \" to \" + hi + \" of \" + stops.length;\n prevBtn.disabled = win === 0;\n nextBtn.disabled = win === last;\n }\n stops.forEach(function (s, i) {\n if (i < lo || i >= hi) return;\n var r = at[i - lo][0];\n var tiny = at[i - lo][1];\n var onScreen = at[i - lo][2];\n var cx = tiny ? 13 + hid++ * 30 : onScreen ? Math.max(r.left - 8, 13) : Math.max(r.left + sx - 8, 13);\n var cy = tiny ? 13 : onScreen ? Math.max(r.top - 8, 13) : Math.max(r.top + sy - 8, 13);\n var placed = onScreen ? placedSc : placedPg;\n for (var j = placed.length - 1, tries = 0; j >= 0 && tries < 40; j--) {\n if (Math.abs(placed[j][0] - cx) < 26 && Math.abs(placed[j][1] - cy) < 26) {\n cx = placed[j][0] + 28;\n j = placed.length;\n tries++;\n }\n }\n placed.push([cx, cy]);\n pts.push([cx, cy, onScreen]);\n (onScreen ? dotsSc : dotsPg).push([cx, cy, i + 1, tiny]);\n });\n if (lines.checked && !stub.checked) shortLines(pts, sx, sy);\n var run = [], runPg = null;\n function flush() {\n if (runPg === null) return;\n if (runPg) { if (page) trailLine(run, svgPg); }\n else trailLine(run, svg);\n run = [];\n runPg = null;\n }\n for (var k = lines.checked && stub.checked ? 1 : pts.length; k < pts.length; k++) {\n var a = pts[k - 1], b = pts[k], both = !a[2] && !b[2];\n if (runPg !== both) {\n flush();\n runPg = both;\n run.push(both || a[2] ? [a[0], a[1]] : [a[0] - sx, a[1] - sy]);\n }\n run.push(both || b[2] ? [b[0], b[1]] : [b[0] - sx, b[1] - sy]);\n }\n flush();\n if (page) dotsIn(dotsPg, dotPg);\n dotsIn(dotsSc, dot);\n}\nfunction queue(screenOnly) {\n if (screenOnly !== true) onlyScreen = false;\n if (!queued) { queued = true; requestAnimationFrame(draw); }\n}\nvar timer = 0, idle = 0, nextScan = 0, settling = false;\nfunction same(a, b) {\n if (a.length !== b.length) return false;\n for (var i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\nfunction rescan() {\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n timer = 0;\n idle = 0;\n if (closed) return;\n if (settling) return later();\n var t0 = performance.now();\n place();\n pinned = new WeakMap();\n scan();\n if (!same(drawn, sig())) {\n fill();\n scan();\n renderJumps();\n review();\n }\n focus();\n var t1 = performance.now();\n nextScan = t1 + Math.max(500, 4 * (t1 - t0));\n}\nvar due = 0;\nfunction later(min) {\n if (idle || closed) return;\n var wait = Math.max(min || 500, nextScan - performance.now());\n if (timer) {\n if (performance.now() + wait >= due) return;\n clearTimeout(timer);\n }\n due = performance.now() + wait;\n timer = setTimeout(function () {\n timer = 0;\n if (window.requestIdleCallback) idle = requestIdleCallback(rescan, { timeout: 1000 });\n else rescan();\n }, wait);\n}\nvar LOUD = /^(tabindex|disabled|inert|href|role|open|hidden)$/;\nfunction matters(m) {\n var t = m.target;\n if (t === host || host.contains(t)) return false;\n if (m.type === \"childList\") {\n var l = [].concat([].slice.call(m.addedNodes), [].slice.call(m.removedNodes));\n for (var i = 0; i < l.length; i++) if (l[i].nodeType === 1) return true;\n return false;\n }\n if (LOUD.test(m.attributeName || \"\") || t.nodeType !== 1) return true;\n if (stopSet.has(t) || upSet.has(t) || t.matches(FOCUSABLE) || t.querySelector(FOCUSABLE)) return true;\n return missed.concat(hovers, forced).some(function (x) { return t === x || t.contains(x); });\n}\nfunction onMoved(e) { if (host.style.position === \"fixed\") place(); queue((stub.checked || !lines.checked) && !!e && e.type === \"scroll\" && (e.target === document || e.target === document.documentElement)); later(); }\nvar watch = new MutationObserver(function (list) {\n place();\n if (openPop && gone(openPop)) popClosed();\n for (var i = 0; i < list.length; i++) if (matters(list[i])) return later();\n later(3000);\n});\nfunction focus() {\n var a = deep();\n track(a);\n if (a && a !== document.body && a !== document.documentElement) {\n lost = false;\n if (a !== host && a.getRootNode() !== root) spotEl = a;\n } else spotEl = null;\n current = stops.indexOf(a);\n if (current !== seen) {\n seen = current;\n if (current >= 0) win = Math.floor(current / PAGE);\n }\n queue();\n}\nfunction lose(e) {\n var t = e && !e.relatedTarget && e.composedPath ? e.composedPath()[0] : null, p = t && t.nodeType === 1 ? popupOf(t) : null;\n if (p && p === openPop) requestAnimationFrame(function () { if (!closed && openPop === p && gone(p)) popClosed(); });\n setTimeout(function () {\n var a = document.activeElement;\n if (a && a !== document.body && a !== document.documentElement) return;\n lost = true;\n focus();\n }, 0);\n}\nvar walking = false, walkDelay = 400, walkT = 0, walked = new Set(), walkAt = null, walkEnd = null;\nfunction walkedN() { return stops.filter(function (s) { return walked.has(s); }).length; }\nfunction playState() {\n var at = walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) + \" \\\"\" + label(walkAt) + \"\\\"\" : \"\";\n var n = \"walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\");\n if (walking) return \"still walking\" + at + \", \" + n;\n return walkEnd === \"done\" ? \"finished, \" + n : \"paused\" + at + \", \" + n;\n}\nfunction playLook() {\n while (playIcon.firstChild) playIcon.removeChild(playIcon.firstChild);\n icon(playIcon, 12, walking ? \"M5 3v10M11 3v10\" : \"M4 2.5l9 5.5-9 5.5z\", 2.4);\n playWord.textContent = walking ? \"Pause\" : \"Play\";\n play.setAttribute(\"aria-pressed\", walking ? \"true\" : \"false\");\n if (walked.size) playText.textContent = \"Walked \" + walkedN() + \" of \" + stops.length + \" stops\";\n}\nfunction walkedText() { return \" after \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\"; }\nfunction stopWalk(why, fin) {\n if (!walking) return;\n walking = false;\n walkEnd = fin ? \"done\" : \"paused\";\n settling = false;\n if (walkT) clearTimeout(walkT);\n walkT = 0;\n playLook();\n if (why) log(\"INFO\", \"Play it\", [why]);\n sumDraw();\n if (fin) announce(\"Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \". \" + pl(logCounts().bad, \"problem\", \"problems\") + \".\");\n else if (why) announce(\"Play paused\" + (walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) : \"\") + \". Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\");\n var done = walkDone;\n walkDone = [];\n done.forEach(function (f) { f(aiText()); });\n}\nfunction step(s) {\n walkT = 0;\n if (!walking || closed) return;\n if (!s || stops.indexOf(s) < 0) s = stops.filter(function (x) { return !walked.has(x); })[0];\n if (!s) {\n stopWalk(\"Finished: walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\", true);\n return;\n }\n endPress();\n s.focus({ focusVisible: true });\n focus();\n walked.add(s);\n walkAt = s;\n playLook();\n var at = where(s), still = 0, tries = 0;\n settling = true;\n function wait() {\n if (!walking || closed) return void (settling = false);\n var now = where(s);\n if (now !== at) {\n at = now;\n still = 0;\n } else still++;\n if (++tries < 90 && (still < 2 || tries < 6)) return requestAnimationFrame(wait);\n settling = false;\n hoverTry(s);\n check(s, function () {\n if (walking && !closed) walkT = setTimeout(function () { step(); }, walkDelay);\n });\n }\n requestAnimationFrame(wait);\n}\nvar walkDone = [];\nfunction untested() {\n var judged = {};\n logs.forEach(function (e) { if ((e.k === \"OK\" || e.k === \"PROBLEM\") && e.f === \"Lost focus\") judged[e.f] = 1; });\n if (judgedDir[1] && judgedDir[-1]) judged[\"Out of order\"] = judged[\"Keyboard trap\"] = 1;\n openProbs().forEach(function (e) { judged[e.f] = 1; });\n return [\"Out of order\", \"Keyboard trap\", \"Lost focus\"].filter(function (f) { return !judged[f]; });\n}\nfunction sumDraw() {\n sumLine.hidden = walking || walkEnd !== \"done\";\n if (sumLine.hidden) return;\n var per = {}, probs = openProbs(), left = untested();\n probs.forEach(function (e) { per[e.f] = (per[e.f] || 0) + 1; });\n var red = CHECKS.filter(function (f) { return per[f]; }), ok = CHECKS.filter(function (f) { return !per[f] && left.indexOf(f) < 0; });\n var tabLeft = left.indexOf(\"Out of order\") >= 0 || left.indexOf(\"Keyboard trap\") >= 0, popLeft = left.indexOf(\"Lost focus\") >= 0;\n while (sumLine.firstChild) sumLine.removeChild(sumLine.firstChild);\n var b = document.createElement(\"b\");\n b.textContent = pl(CHECKS.length, \"check\", \"checks\") + \": \" + ok.length + \" passed, \" + red.length + (red.length === 1 ? \" found a problem, \" : \" found problems, \") + left.length + \" not tested.\";\n sumLine.appendChild(b);\n function part(head, list, cls, count) {\n if (!list.length) return;\n sumLine.appendChild(document.createTextNode(\" \" + head + \": \"));\n var sp = document.createElement(\"span\");\n sp.className = cls;\n sp.textContent = list.map(function (f) { return f + (count ? \" \" + per[f] : \"\"); }).join(\", \");\n sumLine.appendChild(sp);\n sumLine.appendChild(document.createTextNode(\".\"));\n }\n part(\"Passed\", ok, \"g\");\n part(red.length === 1 ? \"Problem\" : \"Problems\", red, \"e\", true);\n part(\"Not tested (\" + (tabLeft && popLeft ? \"press Tab and Shift+Tab, open and close a popup\" : tabLeft ? \"press Tab and Shift+Tab\" : \"open and close a popup\") + \")\", left, \"q\");\n}\nfunction startWalk() {\n walking = true;\n sumDraw();\n if (walkedN() >= stops.length) walked = new Set();\n playLook();\n var first = current >= 0 && current < stops.length - 1 && walked.size ? current + 1 : 0;\n if (stops[first]) {\n log(\"INFO\", \"Play it\", [first ? \"Went on from \" : \"Started at \", ref(stops[first]), \".\"]);\n announce((first ? \"Play went on from stop \" : \"Play started at stop \") + (first + 1) + \".\");\n }\n step(stops[first]);\n}\nplay.addEventListener(\"click\", function () {\n if (walking) return stopWalk(\"Paused with the Pause button\" + walkedText());\n walkDelay = 400;\n startWalk();\n});\nfunction interrupt(e) {\n if (!walking || (e.composedPath && e.composedPath().indexOf(host) >= 0)) return;\n stopWalk(\"Paused by a click on the page\" + walkedText());\n}\nplayLook();\nvar SAFARI = MAC && /^Safari /.test(browser()), FIREFOX = MAC && /^Firefox /.test(browser());\nvar settleT = 0, macNote = false, beforeEl = null, wantEl = null, MAC_NOTE = SAFARI ? \"Safari skips links and buttons on Tab until you turn it on: Settings, Advanced, Press Tab to highlight each item.\" : \"Firefox skips links on Tab until you turn it on: System Settings, Keyboard, Keyboard navigation.\";\nvar LINKS = \"a[href],area[href]\", SKIPS = SAFARI ? [\"a[href]\", \"area[href]\", \"button\", \"input[type=button]\", \"input[type=submit]\", \"input[type=reset]\", \"input[type=image]\", \"input[type=checkbox]\", \"input[type=radio]\", \"input[type=range]\", \"input[type=file]\", \"input[type=color]\"].map(function (q) { return q + \":not([tabindex])\"; }).join(\",\") : LINKS;\nfunction linkSkip(want, cur, dir) {\n if (!SAFARI && !FIREFOX) return null;\n var n = stops.length, k = 0, links = 0;\n for (var i = want; i !== cur && k < n; i = (i + dir + n) % n, k++) {\n if (!stops[i].matches(SKIPS)) return null;\n if (stops[i].matches(LINKS)) links++;\n }\n return k && k < n ? [links, k - links] : null;\n}\nfunction skipText(c) {\n var l = c[0] ? pl(c[0], \"link\", \"links\") : \"\", b = c[1] ? pl(c[1], \"button\", \"buttons\") : \"\";\n return l && b ? l + \" and \" + b : l || b;\n}\nfunction after(el, dir) {\n var ord = new Map(), n = stops.length, pick = -1;\n walk(document, []).forEach(function (e, i) { ord.set(e, i); });\n var at = ord.get(el);\n if (at === undefined) return dir > 0 ? 0 : n - 1;\n for (var i = 0; i < n; i++) {\n var k = ord.get(stops[i]);\n if (stops[i].tabIndex > 0 || k === undefined) continue;\n if (dir > 0 && k > at) return i;\n if (dir < 0 && k < at) pick = i;\n }\n return dir > 0 ? 0 : pick >= 0 ? pick : forced.length ? forced.length - 1 : n - 1;\n}\nvar stays = new WeakMap(), leaves = new WeakMap();\nfunction tellsHow(e) {\n if (!(e.tagName === \"TEXTAREA\" || e.isContentEditable || /^(application|textbox)$/.test(e.getAttribute(\"role\") || \"\"))) return false;\n var r = e.getRootNode(), t = (e.getAttribute(\"aria-description\") || \"\") + \" \" + (e.getAttribute(\"aria-keyshortcuts\") || \"\") + \" \" + (e.getAttribute(\"title\") || \"\");\n (e.getAttribute(\"aria-describedby\") || \"\").split(/\\s+/).forEach(function (id) { var x = id && r.getElementById ? r.getElementById(id) : null; if (x) t += \" \" + x.textContent; });\n return /\\b(escape|esc)\\b/i.test(t);\n}\nfunction multi(e) { return /^(IFRAME|OBJECT|EMBED|AUDIO|VIDEO)$/.test(e.tagName) || !!e.shadowRoot || (e.tagName === \"INPUT\" && /^(date|datetime-local|month|time|week)$/.test(e.type)); }\nfunction endPress() {\n if (settleT) {\n clearTimeout(settleT);\n settle();\n }\n pressed = 0;\n}\nfunction settle() {\n settleT = 0;\n focus();\n if (pressed && current >= 0) {\n check(stops[current]);\n hoverTry(stops[current]);\n }\n if (!pressed || current < 0 || before === -2) {\n if (pressed && before === -2) log(\"SKIPPED\", \"Out of order\", [\"Focus was on the page body, so this Tab press is not judged.\"]);\n else if (pressed) {\n var o = deep();\n if (o && o !== document.body && o !== document.documentElement && !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(o), \", which is not in the list of stops. Not judged.\"]);\n else if (!o || !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Focus left the page, or went to the browser. Not judged.\"]);\n }\n pressed = 0;\n return;\n }\n var w0 = before >= 0 ? (before + pressed + stops.length) % stops.length : -1;\n if (w0 >= 0 && w0 !== current && !tabbable(stops[w0])) {\n var fromEl = stops[before], toEl = stops[current];\n rescan();\n current = stops.indexOf(toEl);\n before = stops.indexOf(fromEl);\n if (before < 0) beforeEl = fromEl;\n if (current < 0) {\n log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(toEl), \", which is not in the list of stops. Not judged.\"]);\n pressed = 0;\n return;\n }\n }\n var n = stops.length, src = before >= 0 ? null : beforeEl, first = before < 0 && !src;\n var want = before >= 0 ? (before + pressed + n) % n : src ? after(src, pressed) : pressed > 0 ? 0 : n - 1;\n if (before >= 0 && wantEl && stops.indexOf(wantEl) >= 0) want = stops.indexOf(wantEl);\n var landed = popupOf(stops[current]), left = before >= 0 ? popupOf(stops[before]) : src ? popupOf(src) : null;\n if (first && pressed > 0 && !landed && !popMissed) {\n for (var k = 0; k < n && !popMissed; k++) {\n var pop = popupOf(stops[k]);\n if (pop && shown(pop) && blocking(pop)) popMissed = pop;\n }\n if (popMissed) {\n renderJumps();\n announce(\"A popup blocks the page, but the first Tab went somewhere else.\");\n log(\"PROBLEM\", \"Out of order\", [popName(popMissed), \" blocks the page, but the first Tab went to \", ref(stops[current]), \".\"], aiOf(W_ORDER, \"A popup that blocks the page gets keyboard focus first, so the first Tab lands inside it.\", \"When the popup opens, move focus into it: call .focus() on its first control, or on the popup itself with tabindex=\\\"-1\\\". A <dialog> opened with showModal() does this by itself.\", [[\"Popup\", popMissed], [\"First Tab went to\", stops[current]]]));\n }\n }\n var start = before >= 0 ? [ref(stops[before])] : src ? [ref(src)] : [\"Start\"], back = pressed < 0 ? \" (Shift+Tab)\" : \"\";\n if (current === before && current !== want && !landed && !left) {\n var s = stops[current];\n var d = pressed > 0 ? 1 : -1, st = stays.get(s) || stays.set(s, {}).get(s), key1 = d > 0 ? \"Tab\" : \"Shift+Tab\", key2 = d > 0 ? \"Shift+Tab\" : \"Tab\";\n if (multi(s)) log(\"SKIPPED\", \"Out of order\", start.concat([\" \\u2192 \", ref(s), back + \": Tab moved inside it, it has parts of its own (like a date field, a video or a frame). Not judged.\"]));\n else if (tellsHow(s)) {\n if (!st.how) log(\"SKIPPED\", \"Keyboard trap\", [ref(s), \" keeps Tab, and says how to leave.\"]);\n st.how = 1;\n } else if (!st[d] && (leaves.get(s) || {})[-d]) {\n st[d] = 1;\n log(\"OK\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \", but \" + key2 + \" leaves it, so it is not a trap.\"]);\n } else if (!st[d] && !st[-d]) {\n st[d] = 1;\n log(\"SKIPPED\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \". Press \" + key2 + \": if focus can't leave that way either, it is a keyboard trap.\"]);\n } else if (!st[d] && trapped.indexOf(s) < 0) {\n st[d] = 1;\n trapped.push(s);\n renderJumps();\n announce(\"Keyboard trap: Tab and Shift+Tab both stay on stop \" + (current + 1) + \".\");\n log(\"PROBLEM\", \"Keyboard trap\", [\"Tab and Shift+Tab both stay on \", ref(s), \": the keyboard can't move focus away.\"], aiOf(W_TRAP, \"Tab or Shift+Tab moves focus away from the element, so a keyboard user can leave it.\", \"Find the keydown listener on the element or its parents that calls preventDefault() on Tab, or that calls .focus() on the same element again, and let Tab through. If the element needs Tab (a code editor), let Escape move focus out and say so next to it.\", [[\"Element\", s], [\"Expected next\", stops[(current + 1) % n]]]));\n }\n pressed = 0;\n return;\n }\n if (before >= 0 && current !== before) {\n var lv = leaves.get(stops[before]) || leaves.set(stops[before], {}).get(stops[before]), sd = pressed > 0 ? 1 : -1, so = stays.get(stops[before]);\n if (!lv[sd] && so && so[-sd] && !so[sd] && trapped.indexOf(stops[before]) < 0) log(\"OK\", \"Keyboard trap\", [(sd > 0 ? \"Tab\" : \"Shift+Tab\") + \" leaves \", ref(stops[before]), \", so it is not a trap.\"]);\n lv[sd] = 1;\n }\n var skipped = current !== want && !landed && !left ? linkSkip(want, current, pressed > 0 ? 1 : -1) : null;\n if (first && pressed > 0 && landed) log(\"OK\", \"Out of order\", [\"First Tab went into the popup \", popName(landed), \".\"]);\n else if (skipped) {\n if (!macNote) {\n macNote = true;\n renderJumps();\n log(\"INFO\", \"Out of order\", [MAC_NOTE]);\n }\n log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \": your browser skipped \" + skipText(skipped) + \". Not judged.\"]));\n } else if (current !== want && !landed && !left && !(popMissed && first)) {\n var from = before >= 0 ? stops[before] : src, to = stops[current], fromText = before >= 0 ? \"stop \" + (before + 1) : src ? \"\\\"\" + label(src) + \"\\\" \" + desc(src) : \"the start of the page\";\n announce(\"Tab jumped out of order, from \" + (before >= 0 ? \"stop \" + (before + 1) : src ? label(src) : \"the start\") + \" to stop \" + (current + 1) + \".\");\n if (!jumps.some(function (j) { return j[0] === from && j[1] === to; })) {\n jumps.push([from, to]);\n renderJumps();\n }\n log(\"PROBLEM\", \"Out of order\", start.concat([\" → \", ref(to), back + \", expected \", ref(stops[want]), to.tabIndex > 0 ? \". It has tabindex=\\\"\" + to.tabIndex + \"\\\".\" : \".\"]), aiOf(W_ORDER, \"Tab\" + (pressed < 0 ? \" with Shift\" : \"\") + \" moves from \" + fromText + \" to stop \" + (want + 1) + \", the next element in the Tab order.\", to.tabIndex > 0 ? \"Remove tabindex=\\\"\" + to.tabIndex + \"\\\" from the element Tab jumped to, or set it to 0. A positive tabindex pulls an element ahead of the page order.\" : \"Tab follows the order of the HTML, so a jump comes from a script. Look for code that calls .focus() on focus, blur or keydown near the element Tab left from, and for content added or moved while Tab was pressed. If the element Tab jumped to sits elsewhere in the HTML on purpose, move it next to the one before it.\", [[\"Tab left from\", from], [\"Tab jumped to\", to], [\"Expected next\", stops[want]]]));\n } else if (current !== want) log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + (landed || left ? \": into or inside a popup, allowed.\" : \": the popup that blocks the page is listed already.\")]));\n else log(\"OK\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \", next in line.\"]));\n pressed = 0;\n}\nfunction inPanel() {\n var a = root.activeElement;\n return !!a && panel.contains(a);\n}\nfunction panelCtl() {\n return [].filter.call(panel.querySelectorAll(\"button,a,input\"), function (e) { return !e.disabled && e.getClientRects().length > 0; });\n}\nfunction enter() {\n endPress();\n if (walking) stopWalk(\"Paused by \" + KEYS + walkedText());\n var a = deep();\n pRet = a && a !== document.body && a !== document.documentElement && a !== host && a.getRootNode() !== root ? a : null;\n panelIn = true;\n skipPanel();\n play.focus({ focusVisible: true });\n}\nfunction back() {\n var r = pRet;\n panelIn = false;\n pRet = null;\n skipPanel();\n if (r && r.isConnected) r.focus({ focusVisible: true });\n else {\n var a = root.activeElement;\n if (a && a.blur) a.blur();\n }\n}\nfunction key(e) {\n if (e.code === \"KeyF\" && e.ctrlKey && e.shiftKey && !e.altKey && !e.metaKey) {\n e.preventDefault();\n e.stopPropagation();\n if (inPanel()) back();\n else enter();\n return;\n }\n if (e.key !== \"Tab\" && settleT) endPress();\n lastKey = e.key;\n keyT = Date.now();\n keyOn = deep();\n if (walking && (e.key === \" \" || e.key === \"Tab\" || e.key === \"Escape\")) {\n if (e.key === \" \") e.preventDefault();\n stopWalk(\"Paused by \" + (e.key === \" \" ? \"Space\" : e.key) + walkedText());\n if (e.key !== \"Tab\") return;\n }\n if (panelIn && inPanel()) {\n if (e.key === \"Escape\") {\n e.preventDefault();\n return back();\n }\n if (e.key === \"Tab\" && skip.checked) {\n var l = panelCtl(), i = l.indexOf(root.activeElement), n = l.length;\n e.preventDefault();\n if (n) l[i < 0 ? 0 : (i + (e.shiftKey ? -1 : 1) + n) % n].focus({ focusVisible: true });\n return;\n }\n }\n var fa = deep(), onBody = !fa || fa === document.body || fa === document.documentElement;\n if (e.key === \"Escape\" && !modal() && !(openPop && !gone(openPop)) && (onBody || inPanel())) close();\n if (e.key === \"Tab\") {\n endPress();\n fa = deep();\n pressed = e.shiftKey ? -1 : 1;\n before = current < 0 && lost ? -2 : current;\n beforeEl = current < 0 && !lost && fa && fa !== document.body && fa !== document.documentElement && !within(host, fa) ? fa : null;\n wantEl = null;\n for (var k = 1, n = stops.length; before >= 0 && k < n; k++) {\n var c = stops[(((before + pressed * k) % n) + n) % n];\n if (tabbable(c)) {\n wantEl = c;\n break;\n }\n }\n settleT = setTimeout(settle, 150);\n }\n}\nfunction pick(e) {\n var g = e.target.closest && e.target.closest(\"g.o\");\n if (!g) return;\n e.preventDefault();\n e.stopPropagation();\n if (e.type !== \"click\") return;\n var s = stops[+g.getAttribute(\"data-i\")];\n if (!s) return;\n endPress();\n s.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction close() {\n closed = true;\n stopWalk();\n removeEventListener(\"pointerdown\", interrupt, true);\n removeEventListener(\"pointerdown\", tap, true);\n removeEventListener(\"scroll\", onMoved, true);\n removeEventListener(\"resize\", onMoved);\n removeEventListener(\"resize\", keepIn);\n if (fit) fit.disconnect();\n watch.disconnect();\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n if (sayT) clearTimeout(sayT);\n if (settleT) clearTimeout(settleT);\n removeEventListener(\"keydown\", key, true);\n removeEventListener(\"focusin\", focus, true);\n removeEventListener(\"focusout\", lose, true);\n if (tabPoll) clearInterval(tabPoll);\n if (logTab && !logTab.closed && tabNote) tabNote.hidden = false;\n if (window.__tabTrail === api) delete window.__tabTrail;\n if (ownName) window.name = \"\";\n host.remove();\n}\nvar grab = null;\npanel.addEventListener(\"pointerdown\", function (e) {\n if (e.button !== 0 || e.target.closest(\"button,a,ul,label\")) return;\n var r = panel.getBoundingClientRect();\n grab = [e.clientX - r.left, e.clientY - r.top];\n panel.setPointerCapture(e.pointerId);\n panel.classList.add(\"g\");\n});\npanel.addEventListener(\"pointermove\", function (e) {\n if (!grab) return;\n var x = Math.min(Math.max(e.clientX - grab[0], 0), innerWidth - panel.offsetWidth);\n var y = Math.min(Math.max(e.clientY - grab[1], 0), innerHeight - panel.offsetHeight);\n panel.style.left = x + \"px\";\n panel.style.top = y + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n});\nfunction drop() { grab = null; panel.classList.remove(\"g\"); }\nfunction keepIn() {\n if (closed) return;\n var r = panel.getBoundingClientRect(), m = 8;\n if (!r.height || (r.top >= m && r.bottom <= innerHeight - m && r.left >= m && r.right <= innerWidth - m)) return;\n panel.style.top = Math.min(Math.max(r.top, m), Math.max(m, innerHeight - m - r.height)) + \"px\";\n panel.style.left = Math.min(Math.max(r.left, m), Math.max(m, innerWidth - m - r.width)) + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n}\nvar fit = window.ResizeObserver ? new ResizeObserver(keepIn) : null;\nif (fit) fit.observe(panel);\naddEventListener(\"resize\", keepIn);\npanel.addEventListener(\"pointerup\", drop);\npanel.addEventListener(\"pointercancel\", drop);\nhost.__close = close;\nfunction mainOf(e) {\n var first = null;\n for (var i = 0; i < e.p.length; i++) {\n var x = e.p[i];\n if (typeof x === \"string\" || !x.el) continue;\n if (i && typeof e.p[i - 1] === \"string\" && /\\u2192 $/.test(e.p[i - 1])) return x;\n if (!first) first = x;\n }\n return first;\n}\nvar api = {\n report: function () { return aiText(); },\n log: function () {\n return logs.map(function (e) {\n var m = mainOf(e);\n return { time: clock(e.t), result: e.k, check: e.f, wcag: wcagOf(e) || null, text: e.p.map(partText).join(\"\"), fixed: !!e.fixed, selector: m ? sel(m.el) || null : null, stop: m && m.n ? m.n : null };\n });\n },\n play: function (o) {\n o = o || {};\n var skipOut = [].concat(o.ignore || []);\n for (var i = 0; i < skipOut.length; i++) {\n try { document.querySelector(skipOut[i]); } catch (x) { return Promise.reject(new Error(\"Tab trail: \\\"\" + skipOut[i] + \"\\\" in ignore is not a valid CSS selector.\")); }\n }\n ignore = skipOut;\n walkDelay = typeof o.delay === \"number\" && o.delay >= 0 ? o.delay : 400;\n return new Promise(function (res) {\n walkDone.push(res);\n if (!walking) {\n walked = new Set();\n startWalk();\n }\n });\n },\n problems: function () { return problemsOf(openProbs()); },\n state: function () { return { walked: walkedN(), total: stops.length, done: !walking && walkEnd === \"done\" && stops.every(function (x) { return hidTested.has(x); }), untested: untested() }; },\n version: VERSION,\n close: function () { close(); }\n};\nwindow.__tabTrail = api;\nx.addEventListener(\"click\", close);\naddEventListener(\"scroll\", onMoved, { capture: true, passive: true });\naddEventListener(\"resize\", onMoved);\nwatch.observe(document.documentElement, { subtree: true, childList: true, attributes: true, attributeFilter: [\"style\", \"class\", \"hidden\", \"tabindex\", \"disabled\", \"inert\", \"href\", \"role\", \"open\"] });\naddEventListener(\"keydown\", key, true);\naddEventListener(\"pointerdown\", interrupt, true);\naddEventListener(\"pointerdown\", tap, true);\naddEventListener(\"focusin\", focus, true);\naddEventListener(\"focusout\", lose, true);\nroot.addEventListener(\"focusin\", function () {\n if (root.activeElement === panel && panel.tabIndex < 0) return panel.blur();\n focus();\n});\nroot.addEventListener(\"focusout\", function () {\n setTimeout(function () {\n if (!panelIn || closed || inPanel()) return;\n var a = deep();\n if ((!a || a === document.body || a === document.documentElement) && Date.now() - tapT > 600) return play.focus({ focusVisible: true });\n panelIn = false;\n pRet = null;\n skipPanel();\n }, 0);\n});\n[\"pointerdown\", \"mousedown\", \"pointerup\", \"mouseup\", \"click\"].forEach(function (t) {\n dot.addEventListener(t, pick);\n dotPg.addEventListener(t, pick);\n});\nreview();\nfocus();\ndraw();\n})();\n";
|
|
5
|
-
export const HREF = "javascript:(function()%7B%0A%2F*%20Tab%20trail%201.0.0.%20Copyright%20(c)%202026%20Matja%C5%BE%20Koro%C5%A1ec.%20MIT%20License%2C%20full%20text%3A%20https%3A%2F%2Fgithub.com%2Fmatjazkorosec%2Ftab-trail%2Fblob%2Fmain%2FLICENSE%20*%2F%0Avar%20VERSION%20%3D%20%221.0.0%22%3B%0Avar%20ID%20%3D%20%22tab-trail-host%22%3B%0Avar%20prev%20%3D%20%5B%5D.filter.call(document.querySelectorAll(%22%5Bid%3D'%22%20%2B%20ID%20%2B%20%22'%5D%22)%2C%20function%20(e)%20%7B%20return%20typeof%20e.__close%20%3D%3D%3D%20%22function%22%3B%20%7D)%5B0%5D%3B%0Aif%20(prev)%20%7B%20prev.__close()%3B%20return%3B%20%7D%0Avar%20NS%20%3D%20%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3B%0Avar%20FOCUSABLE%20%3D%20%22a%5Bhref%5D%2Carea%5Bhref%5D%2Cbutton%2Cinput%2Cselect%2Ctextarea%2Ciframe%2Csummary%2Caudio%5Bcontrols%5D%2Cvideo%5Bcontrols%5D%2C%5Bcontenteditable%5D%3Anot(%5Bcontenteditable%3D'false'%5D)%2C%5Btabindex%5D%22%3B%0Avar%20ROLES%20%3D%20%2F%5E(button%7Clink%7Ctab%7Cmenuitem%7Cmenuitemcheckbox%7Cmenuitemradio%7Ccheckbox%7Cradio%7Cswitch%7Coption%7Ccombobox%7Cslider%7Ctreeitem)%24%2F%3B%0A%0Afunction%20walk(root%2C%20out)%20%7B%0A%20%20var%20kids%20%3D%20root.children%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20kids.length%3B%20i%2B%2B)%20visit(kids%5Bi%5D%2C%20out)%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20visit(el%2C%20out)%20%7B%0A%20%20if%20(el.id%20%3D%3D%3D%20ID%20%26%26%20el%20%3D%3D%3D%20host%20%26%26%20(!skip%20%7C%7C%20skip.checked))%20return%3B%0A%20%20if%20(!(host%20%26%26%20el.getRootNode()%20%3D%3D%3D%20host.shadowRoot%20%26%26%20(!panel.contains(el)%20%7C%7C%20(logList%20%26%26%20logList.contains(el)))))%20out.push(el)%3B%0A%20%20if%20(el.shadowRoot)%20return%20walk(el.shadowRoot%2C%20out)%3B%0A%20%20if%20(el.tagName%20%3D%3D%3D%20%22SLOT%22%20%26%26%20el.assignedElements)%20%7B%0A%20%20%20%20var%20got%20%3D%20el.assignedElements(%7B%20flatten%3A%20true%20%7D)%3B%0A%20%20%20%20if%20(got.length)%20%7B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20got.length%3B%20i%2B%2B)%20visit(got%5Bi%5D%2C%20out)%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20walk(el%2C%20out)%3B%0A%7D%0Afunction%20shown(el)%20%7B%0A%20%20if%20(el.checkVisibility)%20return%20el.checkVisibility(%7B%20visibilityProperty%3A%20true%2C%20opacityProperty%3A%20false%20%7D)%3B%0A%20%20var%20s%20%3D%20getComputedStyle(el)%3B%0A%20%20return%20s.display%20!%3D%3D%20%22none%22%20%26%26%20s.visibility%20!%3D%3D%20%22hidden%22%20%26%26%20el.getClientRects().length%20%3E%200%3B%0A%7D%0Afunction%20tabbable(el)%20%7B%0A%20%20if%20(!el.matches(FOCUSABLE))%20return%20false%3B%0A%20%20if%20(el.tabIndex%20%3C%200%20%7C%7C%20el.matches(%22%3Adisabled%22)%20%7C%7C%20el.closest(%22%5Binert%5D%22))%20return%20false%3B%0A%20%20if%20(el.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20el.type%20%3D%3D%3D%20%22hidden%22)%20return%20false%3B%0A%20%20if%20(el.tagName%20%3D%3D%3D%20%22SUMMARY%22%20%26%26%20(!el.parentElement%20%7C%7C%20el.parentElement.tagName%20!%3D%3D%20%22DETAILS%22%20%7C%7C%20el.parentElement.querySelector(%22summary%22)%20!%3D%3D%20el))%20return%20false%3B%0A%20%20return%20shown(el)%3B%0A%7D%0A%0Avar%20stops%20%3D%20%5B%5D%2C%20stopSet%20%3D%20new%20Set()%2C%20upSet%20%3D%20new%20Set()%2C%20missed%20%3D%20%5B%5D%2C%20forced%20%3D%20%5B%5D%2C%20forcedBad%20%3D%20%5B%5D%2C%20domAt%20%3D%20new%20Map()%3B%0Avar%20GROUP%20%3D%20%22%5Brole%3Dtablist%5D%2C%5Brole%3Dmenu%5D%2C%5Brole%3Dmenubar%5D%2C%5Brole%3Dlistbox%5D%2C%5Brole%3Dradiogroup%5D%2C%5Brole%3Dgrid%5D%2C%5Brole%3Dtreegrid%5D%2C%5Brole%3Dtree%5D%2C%5Brole%3Dtoolbar%5D%22%3B%0Avar%20ITEM%20%3D%20%2F%5E(tab%7Cmenuitem%7Cmenuitemcheckbox%7Cmenuitemradio%7Coption%7Cradio%7Cgridcell%7Crow%7Ctreeitem)%24%2F%3B%0Afunction%20nearTab(el)%20%7B%0A%20%20for%20(var%20p%20%3D%20el.parentElement%3B%20p%3B%20p%20%3D%20p.parentElement)%20if%20(stopSet.has(p))%20return%20true%3B%0A%20%20return%20upSet.has(el)%3B%0A%7D%0Afunction%20roving(el)%20%7B%0A%20%20var%20g%20%3D%20el.closest(GROUP)%3B%0A%20%20if%20(!g%20%7C%7C%20(!ITEM.test(el.getAttribute(%22role%22)%20%7C%7C%20%22%22)%20%26%26%20!(el.hasAttribute(%22tabindex%22)%20%26%26%20el.tabIndex%20%3C%200)))%20return%20false%3B%0A%20%20if%20(stopSet.has(g)%20%7C%7C%20upSet.has(g))%20return%20true%3B%0A%20%20var%20id%20%3D%20g.id%3B%0A%20%20return%20!!id%20%26%26%20stops.some(function%20(s)%20%7B%20return%20(%22%20%22%20%2B%20(s.getAttribute(%22aria-controls%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22%20%2B%20(s.getAttribute(%22aria-owns%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22).indexOf(%22%20%22%20%2B%20id%20%2B%20%22%20%22)%20%3E%3D%200%3B%20%7D)%3B%0A%7D%0Afunction%20modal()%20%7B%0A%20%20try%20%7B%0A%20%20%20%20var%20l%20%3D%20document.querySelectorAll(%22dialog%3Amodal%22)%3B%0A%20%20%20%20return%20l.length%20%3F%20l%5Bl.length%20-%201%5D%20%3A%20null%3B%0A%20%20%7D%20catch%20(e)%20%7B%20return%20null%3B%20%7D%0A%7D%0Afunction%20within(m%2C%20e)%20%7B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%3B%20n%20%3D%20n.parentNode%20%7C%7C%20n.host)%20if%20(n%20%3D%3D%3D%20m)%20return%20true%3B%0A%20%20return%20false%3B%0A%7D%0Afunction%20scan()%20%7B%0A%20%20var%20all%20%3D%20walk(document%2C%20%5B%5D)%3B%0A%20%20var%20top%20%3D%20modal()%3B%0A%20%20if%20(top)%20all%20%3D%20all.filter(function%20(e)%20%7B%20return%20within(top%2C%20e)%3B%20%7D)%3B%0A%20%20var%20found%20%3D%20all.filter(tabbable)%3B%0A%20%20var%20groups%20%3D%20new%20Map()%3B%0A%20%20found%20%3D%20found.filter(function%20(el)%20%7B%0A%20%20%20%20if%20(el.tagName%20!%3D%3D%20%22INPUT%22%20%7C%7C%20el.type%20!%3D%3D%20%22radio%22%20%7C%7C%20!el.name)%20return%20true%3B%0A%20%20%20%20var%20own%20%3D%20el.form%20%7C%7C%20el.getRootNode()%2C%20byName%20%3D%20groups.get(own)%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20groups.set(own%2C%20byName)%3B%0A%20%20%20%20var%20g%20%3D%20byName%5Bel.name%5D%20%7C%7C%20(byName%5Bel.name%5D%20%3D%20found.filter(function%20(x)%20%7B%20return%20x.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20x.type%20%3D%3D%3D%20%22radio%22%20%26%26%20x.name%20%3D%3D%3D%20el.name%20%26%26%20(x.form%20%7C%7C%20x.getRootNode())%20%3D%3D%3D%20own%3B%20%7D))%3B%0A%20%20%20%20var%20picked%20%3D%20g.filter(function%20(x)%20%7B%20return%20x.checked%3B%20%7D)%5B0%5D%20%7C%7C%20g%5B0%5D%3B%0A%20%20%20%20return%20picked%20%3D%3D%3D%20el%3B%0A%20%20%7D)%3B%0A%20%20forced%20%3D%20found.filter(function%20(el)%20%7B%20return%20el.tabIndex%20%3E%200%20%26%26%20!(host%20%26%26%20el.getRootNode()%20%3D%3D%3D%20host.shadowRoot)%3B%20%7D)%3B%0A%20%20stops%20%3D%20ordered(document%2C%20found%2C%20null)%3B%0A%20%20domAt%20%3D%20new%20Map()%3B%0A%20%20forced.forEach(function%20(f)%20%7B%20domAt.set(f%2C%20forced.length%20%3E%2030%20%3F%20found.indexOf(f)%20%3A%20ordered(document%2C%20found%2C%20f).indexOf(f))%3B%20%7D)%3B%0A%20%20forcedBad%20%3D%20forced.filter(function%20(f)%20%7B%20return%20domAt.get(f)%20!%3D%3D%20stops.indexOf(f)%3B%20%7D)%3B%0A%20%20stopSet%20%3D%20new%20Set(stops)%3B%0A%20%20upSet%20%3D%20new%20Set()%3B%0A%20%20stops.forEach(function%20(s)%20%7B%0A%20%20%20%20for%20(var%20p%20%3D%20s.parentElement%3B%20p%20%26%26%20!upSet.has(p)%3B%20p%20%3D%20p.parentElement)%20upSet.add(p)%3B%0A%20%20%7D)%3B%0A%20%20var%20ids%20%3D%20document.querySelectorAll(%22%5Bid%3D'%22%20%2B%20ID%20%2B%20%22'%5D%22)%2C%20only%20%3D%20!ids.length%20%7C%7C%20(ids.length%20%3D%3D%3D%201%20%26%26%20ids%5B0%5D%20%3D%3D%3D%20host)%3B%0A%20%20var%20miss%20%3D%20all.filter(function%20(el)%20%7B%0A%20%20%20%20if%20(stopSet.has(el)%20%7C%7C%20(only%20%3F%20el%20%3D%3D%3D%20host%20%3A%20el.closest(%22%23%22%20%2B%20ID))%20%7C%7C%20(host%20%26%26%20el.getRootNode()%20%3D%3D%3D%20host.shadowRoot))%20return%20false%3B%0A%20%20%20%20var%20t%20%3D%20el.tagName%3B%0A%20%20%20%20if%20(t%20%3D%3D%3D%20%22HTML%22%20%7C%7C%20t%20%3D%3D%3D%20%22BODY%22%20%7C%7C%20t%20%3D%3D%3D%20%22LABEL%22%20%7C%7C%20t%20%3D%3D%3D%20%22OPTION%22%20%7C%7C%20t%20%3D%3D%3D%20%22OPTGROUP%22)%20return%20false%3B%0A%20%20%20%20var%20role%20%3D%20el.getAttribute(%22role%22)%20%7C%7C%20%22%22%3B%0A%20%20%20%20var%20looks%20%3D%20el.hasAttribute(%22onclick%22)%20%7C%7C%20ROLES.test(role)%3B%0A%20%20%20%20var%20s%20%3D%20getComputedStyle(el)%3B%0A%20%20%20%20if%20(s.pointerEvents%20%3D%3D%3D%20%22none%22)%20return%20false%3B%0A%20%20%20%20if%20(!looks)%20%7B%0A%20%20%20%20%20%20if%20(s.cursor%20!%3D%3D%20%22pointer%22)%20return%20false%3B%0A%20%20%20%20%20%20var%20ps%20%3D%20el.parentElement%20%26%26%20getComputedStyle(el.parentElement)%3B%0A%20%20%20%20%20%20if%20(ps%20%26%26%20ps.cursor%20%3D%3D%3D%20%22pointer%22)%20return%20false%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(el.closest(%22label%22)%20%7C%7C%20el.matches(%22%3Adisabled%22)%20%7C%7C%20el.closest(%22%5Binert%5D%22)%20%7C%7C%20el.closest(%22%5Baria-disabled%3D'true'%5D%22))%20return%20false%3B%0A%20%20%20%20if%20(!shown(el))%20return%20false%3B%0A%20%20%20%20var%20r%20%3D%20el.getBoundingClientRect()%3B%0A%20%20%20%20if%20(r.width%20%3C%208%20%7C%7C%20r.height%20%3C%208)%20return%20false%3B%0A%20%20%20%20return%20!nearTab(el)%20%26%26%20!roving(el)%3B%0A%20%20%7D)%3B%0A%20%20var%20missSet%20%3D%20new%20Set(miss)%3B%0A%20%20missed%20%3D%20miss.filter(function%20(el)%20%7B%0A%20%20%20%20for%20(var%20p%20%3D%20el.parentElement%3B%20p%3B%20p%20%3D%20p.parentElement)%20if%20(missSet.has(p))%20return%20false%3B%0A%20%20%20%20return%20true%3B%0A%20%20%7D)%3B%0A%20%20hoverScan()%3B%0A%7D%0Afunction%20ordered(scope%2C%20list%2C%20flat)%20%7B%0A%20%20var%20units%20%3D%20%5B%5D%2C%20groups%20%3D%20new%20Map()%2C%20out%20%3D%20%5B%5D%3B%0A%20%20list.forEach(function%20(el)%20%7B%0A%20%20%20%20var%20h%20%3D%20el%3B%0A%20%20%20%20while%20(h.getRootNode()%20!%3D%3D%20scope%20%26%26%20h.getRootNode().host)%20h%20%3D%20h.getRootNode().host%3B%0A%20%20%20%20if%20(h%20%3D%3D%3D%20el)%20return%20units.push(%7B%20k%3A%20el%20%3D%3D%3D%20flat%20%3F%200%20%3A%20el.tabIndex%2C%20el%3A%20el%20%7D)%3B%0A%20%20%20%20var%20g%20%3D%20groups.get(h)%3B%0A%20%20%20%20if%20(!g)%20%7B%0A%20%20%20%20%20%20g%20%3D%20%7B%20k%3A%20h.hasAttribute(%22tabindex%22)%20%26%26%20h%20!%3D%3D%20flat%20%3F%20Math.max(h.tabIndex%2C%200)%20%3A%200%2C%20host%3A%20h%2C%20els%3A%20%5B%5D%20%7D%3B%0A%20%20%20%20%20%20groups.set(h%2C%20g)%3B%0A%20%20%20%20%20%20units.push(g)%3B%0A%20%20%20%20%7D%0A%20%20%20%20g.els.push(el)%3B%0A%20%20%7D)%3B%0A%20%20units.filter(function%20(u)%20%7B%20return%20u.k%20%3E%200%3B%20%7D).sort(function%20(a%2C%20b)%20%7B%20return%20a.k%20-%20b.k%3B%20%7D).concat(units.filter(function%20(u)%20%7B%20return%20u.k%20%3C%3D%200%3B%20%7D)).forEach(function%20(u)%20%7B%0A%20%20%20%20if%20(u.host)%20out%20%3D%20out.concat(ordered(u.host.shadowRoot%2C%20u.els%2C%20flat))%3B%0A%20%20%20%20else%20out.push(u.el)%3B%0A%20%20%7D)%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20hovers%20%3D%20%5B%5D%2C%20hoverOk%20%3D%20%5B%5D%2C%20hovRule%20%3D%20new%20Map()%2C%20hovSeen%20%3D%20new%20Set()%2C%20hovHid%20%3D%20new%20Map()%2C%20tabOpens%20%3D%20new%20WeakSet()%3B%0Afunction%20hoverTry(s)%20%7B%0A%20%20var%20hit%20%3D%20false%3B%0A%20%20hovers.forEach(function%20(h)%20%7B%0A%20%20%20%20var%20e%20%3D%20hovHid.get(h)%3B%0A%20%20%20%20if%20(e%20%26%26%20within(h%2C%20s)%20%26%26%20!within(e%2C%20s)%20%26%26%20!hiddenNow(e))%20%7B%0A%20%20%20%20%20%20tabOpens.add(h)%3B%0A%20%20%20%20%20%20hit%20%3D%20true%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%20%20if%20(hit)%20rescan()%3B%0A%7D%0Avar%20HOVER%20%3D%20%22%3Ahover%22%2C%20FOC%20%3D%20%22%3Afocus-within%7C%3Afocus-visible%7C%3Afocus%22%3B%0Afunction%20parts(sel)%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20depth%20%3D%200%2C%20start%20%3D%200%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20sel.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20ch%20%3D%20sel.charAt(i)%3B%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22(%22)%20depth%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22)%22)%20depth--%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22%2C%22%20%26%26%20!depth)%20%7B%20out.push(sel.slice(start%2C%20i).trim())%3B%20start%20%3D%20i%20%2B%201%3B%20%7D%0A%20%20%7D%0A%20%20out.push(sel.slice(start).trim())%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20bare(sel%2C%20re)%20%7B%0A%20%20return%20sel.replace(new%20RegExp(%22(%5E%7C%5B%5C%5Cs%3E%2B~(%5D)(%22%20%2B%20re%20%2B%20%22)%22%2C%20%22g%22)%2C%20%22%241*%22).replace(new%20RegExp(re%2C%20%22g%22)%2C%20%22%22)%3B%0A%7D%0Afunction%20reveals(st)%20%7B%0A%20%20var%20d%20%3D%20st.getPropertyValue(%22display%22)%2C%20v%20%3D%20st.getPropertyValue(%22visibility%22)%2C%20o%20%3D%20st.getPropertyValue(%22opacity%22)%2C%20mh%20%3D%20st.getPropertyValue(%22max-height%22)%3B%0A%20%20return%20(d%20!%3D%3D%20%22%22%20%26%26%20d%20!%3D%3D%20%22none%22)%20%7C%7C%20v%20%3D%3D%3D%20%22visible%22%20%7C%7C%20(o%20!%3D%3D%20%22%22%20%26%26%20parseFloat(o)%20%3E%200)%20%7C%7C%20(mh%20!%3D%3D%20%22%22%20%26%26%20mh%20!%3D%3D%20%220%22%20%26%26%20mh%20!%3D%3D%20%220px%22)%3B%0A%7D%0Avar%20cssRules%20%3D%200%2C%20cssSheets%20%3D%200%2C%20cssBlocked%20%3D%20%5B%5D%3B%0Afunction%20nest(sel%2C%20up)%20%7B%0A%20%20if%20(!up)%20return%20sel%3B%0A%20%20return%20parts(sel).map(function%20(q)%20%7B%20return%20q.indexOf(%22%26%22)%20%3E%3D%200%20%3F%20q.split(%22%26%22).join(%22%3Ais(%22%20%2B%20up%20%2B%20%22)%22)%20%3A%20%22%3Ais(%22%20%2B%20up%20%2B%20%22)%20%22%20%2B%20q%3B%20%7D).join(%22%2C%20%22)%3B%0A%7D%0Afunction%20depth(p%2C%20k)%20%7B%0A%20%20var%20d%20%3D%200%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20k%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20ch%20%3D%20p.charAt(i)%3B%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22%5C%5C%22)%20i%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22(%22)%20d%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22)%22)%20d--%3B%0A%20%20%7D%0A%20%20return%20d%3B%0A%7D%0Afunction%20compound(p%2C%20k)%20%7B%0A%20%20var%20d%20%3D%200%2C%20i%20%3D%20k%20-%201%3B%0A%20%20for%20(%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0A%20%20%20%20var%20ch%20%3D%20p.charAt(i)%3B%0A%20%20%20%20if%20(i%20%3E%200%20%26%26%20p.charAt(i%20-%201)%20%3D%3D%3D%20%22%5C%5C%22)%20%7B%0A%20%20%20%20%20%20i--%3B%0A%20%20%20%20%20%20continue%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22)%22)%20d%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22(%22)%20%7B%0A%20%20%20%20%20%20if%20(!d)%20break%3B%0A%20%20%20%20%20%20d--%3B%0A%20%20%20%20%7D%20else%20if%20(!d%20%26%26%20%2F%5B%5Cs%3E%2B~%2C%5D%2F.test(ch))%20break%3B%0A%20%20%7D%0A%20%20var%20c%20%3D%20p.slice(i%20%2B%201%2C%20k).trim()%3B%0A%20%20return%20c%20%3F%20bare(c%2C%20HOVER)%20%3A%20%22%22%3B%0A%7D%0Afunction%20selfFocus(p)%20%7B%0A%20%20var%20m%20%3D%20p.match(new%20RegExp(FOC))%2C%20k%20%3D%20m%20%3F%20m.index%20%2B%20m%5B0%5D.length%20%3A%20-1%3B%0A%20%20if%20(k%20%3C%200%20%7C%7C%20depth(p%2C%20k))%20return%20false%3B%0A%20%20for%20(var%20d%20%3D%200%3B%20k%20%3C%20p.length%3B%20k%2B%2B)%20%7B%0A%20%20%20%20var%20ch%20%3D%20p.charAt(k)%3B%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22%5C%5C%22)%20k%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22(%22)%20d%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22)%22)%20d--%3B%0A%20%20%20%20else%20if%20(!d%20%26%26%20%2F%5B%5Cs%3E%2B~%5D%2F.test(ch))%20return%20false%3B%0A%20%20%7D%0A%20%20return%20true%3B%0A%7D%0Avar%20sheetMemo%20%3D%20new%20WeakMap()%3B%0Afunction%20readRules()%20%7B%0A%20%20var%20hov%20%3D%20%5B%5D%2C%20foc%20%3D%20%5B%5D%3B%0A%20%20cssRules%20%3D%200%3B%0A%20%20cssSheets%20%3D%200%3B%0A%20%20cssBlocked%20%3D%20%5B%5D%3B%0A%20%20function%20take(sel%2C%20src)%20%7B%0A%20%20%20%20parts(sel).forEach(function%20(p)%20%7B%0A%20%20%20%20%20%20if%20(%2F%3Afocus%2F.test(p))%20return%20foc.push(%5Bbare(p%2C%20FOC)%2C%20selfFocus(p)%5D)%3B%0A%20%20%20%20%20%20var%20k%20%3D%20p.indexOf(HOVER)%2C%20on%3B%0A%20%20%20%20%20%20if%20(k%20%3C%200)%20return%3B%0A%20%20%20%20%20%20if%20(depth(p%2C%20k))%20on%20%3D%20compound(p%2C%20k)%3B%0A%20%20%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20pre%20%3D%20p.slice(0%2C%20k)%3B%0A%20%20%20%20%20%20%20%20if%20(!pre.trim()%20%7C%7C%20%2F%5B%5Cs%3E%2B~%5D%24%2F.test(pre))%20return%3B%0A%20%20%20%20%20%20%20%20on%20%3D%20bare(pre%2C%20HOVER)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(on)%20hov.push(%5Bbare(p%2C%20HOVER)%2C%20on%2C%20p%2C%20src%5D)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20function%20go(list%2C%20src%2C%20up)%20%7B%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20list.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20r%20%3D%20list%5Bi%5D%2C%20sel%20%3D%20up%2C%20st%20%3D%20null%3B%0A%20%20%20%20%20%20if%20(r.selectorText%20!%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20sel%20%3D%20nest(r.selectorText%2C%20up)%3B%0A%20%20%20%20%20%20%20%20st%20%3D%20r.style%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(up%20%26%26%20r.style%20%26%26%20!r.cssRules)%20st%20%3D%20r.style%3B%0A%20%20%20%20%20%20if%20(st)%20%7B%0A%20%20%20%20%20%20%20%20cssRules%2B%2B%3B%0A%20%20%20%20%20%20%20%20if%20(%2F%3Ahover%7C%3Afocus%2F.test(sel)%20%26%26%20reveals(st))%20take(sel%2C%20src)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(r.cssRules%20%26%26%20r.cssRules.length)%20go(r.cssRules%2C%20src%2C%20sel)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20sheets%20%3D%20Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets%20%7C%7C%20%5B%5D)%3B%0A%20%20sheets.forEach(function%20(sh)%20%7B%0A%20%20%20%20var%20list%3B%0A%20%20%20%20try%20%7B%20list%20%3D%20sh.cssRules%3B%20%7D%20catch%20(e)%20%7B%20return%20cssBlocked.push(sh.href%20%7C%7C%20%22a%20style%20sheet%22)%3B%20%7D%0A%20%20%20%20var%20memo%20%3D%20sheetMemo.get(sh)%3B%0A%20%20%20%20if%20(!memo%20%7C%7C%20memo.list%20!%3D%3D%20list%20%7C%7C%20memo.n%20!%3D%3D%20list.length%20%7C%7C%20memo.node%20!%3D%3D%20sh.ownerNode)%20%7B%0A%20%20%20%20%20%20var%20h0%20%3D%20hov%2C%20f0%20%3D%20foc%2C%20c0%20%3D%20cssRules%3B%0A%20%20%20%20%20%20hov%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20foc%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20cssRules%20%3D%200%3B%0A%20%20%20%20%20%20try%20%7B%20go(list%2C%20sh.href%20%7C%7C%20(sh.ownerNode%20%3F%20%22an%20inline%20%3Cstyle%3E%20in%20the%20page%22%20%3A%20%22a%20style%20sheet%20added%20by%20script%22)%2C%20%22%22)%3B%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20hov%20%3D%20h0%3B%0A%20%20%20%20%20%20%20%20foc%20%3D%20f0%3B%0A%20%20%20%20%20%20%20%20cssRules%20%3D%20c0%3B%0A%20%20%20%20%20%20%20%20return%20cssBlocked.push(sh.href%20%7C%7C%20%22a%20style%20sheet%22)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20memo%20%3D%20%7B%20list%3A%20list%2C%20n%3A%20list.length%2C%20node%3A%20sh.ownerNode%2C%20hov%3A%20hov%2C%20foc%3A%20foc%2C%20rules%3A%20cssRules%20%7D%3B%0A%20%20%20%20%20%20sheetMemo.set(sh%2C%20memo)%3B%0A%20%20%20%20%20%20hov%20%3D%20h0%3B%0A%20%20%20%20%20%20foc%20%3D%20f0%3B%0A%20%20%20%20%20%20cssRules%20%3D%20c0%3B%0A%20%20%20%20%7D%0A%20%20%20%20hov%20%3D%20hov.concat(memo.hov)%3B%0A%20%20%20%20foc%20%3D%20foc.concat(memo.foc)%3B%0A%20%20%20%20cssRules%20%2B%3D%20memo.rules%3B%0A%20%20%20%20cssSheets%2B%2B%3B%0A%20%20%7D)%3B%0A%20%20return%20%5Bhov%2C%20foc%5D%3B%0A%7D%0Afunction%20hiddenNow(e)%20%7B%0A%20%20return%20!shown(e)%20%7C%7C%20getComputedStyle(e).opacity%20%3D%3D%3D%20%220%22%20%7C%7C%20e.getBoundingClientRect().height%20%3C%201%3B%0A%7D%0Afunction%20hoverScan()%20%7B%0A%20%20var%20rr%20%3D%20readRules()%2C%20foc%20%3D%20rr%5B1%5D%2C%20found%20%3D%20%5B%5D%2C%20seenH%20%3D%20new%20Set()%2C%20ok%20%3D%20%5B%5D%2C%20top%20%3D%20modal()%3B%0A%20%20hovRule%20%3D%20new%20Map()%3B%0A%20%20hovSeen%20%3D%20new%20Set()%3B%0A%20%20rr%5B0%5D.forEach(function%20(h)%20%7B%0A%20%20%20%20var%20list%3B%0A%20%20%20%20try%20%7B%20list%20%3D%20document.querySelectorAll(h%5B0%5D)%3B%20%7D%20catch%20(e)%20%7B%20return%3B%20%7D%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20list.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20e%20%3D%20list%5Bi%5D%2C%20host%20%3D%20null%3B%0A%20%20%20%20%20%20if%20(!hiddenNow(e)%20%7C%7C%20(!e.matches(FOCUSABLE)%20%26%26%20!e.querySelector(FOCUSABLE)))%20continue%3B%0A%20%20%20%20%20%20try%20%7B%20host%20%3D%20e.parentElement%20%26%26%20e.parentElement.closest(h%5B1%5D)%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20%20%20if%20(!host%20%7C%7C%20host%20%3D%3D%3D%20document.body%20%7C%7C%20host%20%3D%3D%3D%20document.documentElement%20%7C%7C%20seenH.has(host)%20%7C%7C%20!shown(host)%20%7C%7C%20(top%20%26%26%20!within(top%2C%20host)))%20continue%3B%0A%20%20%20%20%20%20if%20(host.matches(%22%5Baria-expanded%5D%2C%5Baria-haspopup%5D%22)%20%7C%7C%20host.querySelector(%22%5Baria-expanded%5D%2C%5Baria-haspopup%5D%22))%20%7B%0A%20%20%20%20%20%20%20%20ok.push(%5Bhost%2C%20%22toggle%22%5D)%3B%0A%20%20%20%20%20%20%20%20continue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(foc.some(function%20(f)%20%7B%20try%20%7B%20return%20(!f%5B1%5D%20%7C%7C%20shown(e))%20%26%26%20e.matches(f%5B0%5D)%3B%20%7D%20catch%20(x)%20%7B%20return%20false%3B%20%7D%20%7D))%20%7B%0A%20%20%20%20%20%20%20%20ok.push(%5Bhost%2C%20%22focus%22%5D)%3B%0A%20%20%20%20%20%20%20%20continue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(tabOpens.has(host))%20%7B%0A%20%20%20%20%20%20%20%20ok.push(%5Bhost%2C%20%22tab%22%5D)%3B%0A%20%20%20%20%20%20%20%20continue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20found.push(host)%3B%0A%20%20%20%20%20%20seenH.add(host)%3B%0A%20%20%20%20%20%20hovHid.set(host%2C%20e)%3B%0A%20%20%20%20%20%20hovRule.set(host%2C%20%5Bh%5B2%5D%2C%20h%5B3%5D%5D)%3B%0A%20%20%20%20%20%20if%20(shown(e)%20%26%26%20stops.some(function%20(s)%20%7B%20return%20e.contains(s)%3B%20%7D))%20hovSeen.add(host)%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%20%20hovers%20%3D%20found%3B%0A%20%20hoverOk%20%3D%20ok.filter(function%20(o)%20%7B%20return%20!seenH.has(o%5B0%5D)%3B%20%7D)%3B%0A%7D%0Ascan()%3B%0A%0Avar%20host%20%3D%20document.createElement(%22div%22)%3B%0Ahost.id%20%3D%20ID%3B%0Ahost.style.cssText%20%3D%20%22all%3Ainitial%3Bposition%3Aabsolute%3Bleft%3A0%3Btop%3A0%3Bwidth%3A0%3Bheight%3A0%3Boverflow%3Avisible%3Bz-index%3A2147483647%3Bpointer-events%3Anone%3B%22%3B%0Avar%20root%20%3D%20host.attachShadow(%7B%20mode%3A%20%22open%22%20%7D)%3B%0Avar%20style%20%3D%20document.createElement(%22style%22)%3B%0Astyle.textContent%20%3D%20%5B%0A%20%20%22%3Ahost%7Ball%3Ainitial%7D%22%2C%0A%20%20%22svg%7Bposition%3Afixed%3Binset%3A0%3Bwidth%3A100vw%3Bheight%3A100vh%3Boverflow%3Avisible%7D%22%2C%0A%20%20%22svg.pg%7Bposition%3Aabsolute%3Bleft%3A0%3Btop%3A0%3Bwidth%3A1px%3Bheight%3A1px%3Boverflow%3Avisible%7D%22%2C%0A%20%20%22.p%7Bposition%3Afixed%3Bbottom%3A66px%3Bright%3A66px%3Bwidth%3A350px%3Bbox-sizing%3Aborder-box%3Bpadding%3A6px%3Bbackground%3A%23e4dccd%3Bcolor%3A%231a1612%3Bborder-radius%3A16px%3Bbox-shadow%3A0%201px%202px%20rgba(0%2C0%2C0%2C.12)%2C0%2014px%2034px%20rgba(0%2C0%2C0%2C.26)%3Bfont%3A14px%2F1.45%20-apple-system%2Csystem-ui%2C'Segoe%20UI'%2CRoboto%2Csans-serif%3Bpointer-events%3Aauto%3Bcursor%3Agrab%3Boverflow-x%3Ahidden%3Boverflow-y%3Aauto%3Bmax-height%3Acalc(100vh%20-%2090px)%3Boverscroll-behavior%3Acontain%7D%22%2C%0A%20%20%22.tb%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A4px%3Bpadding%3A0%200%205px%204px%7D%22%2C%0A%20%20%22.t%7Bmargin%3A0%3Bflex%3A1%3Bwhite-space%3Anowrap%3Bfont%3A700%2017px%2F1.2%20Georgia%2Cserif%3Bletter-spacing%3A-.01em%7D%22%2C%0A%20%20%22.cd%7Bmargin%3A4px%200%200%3Bpadding%3A7px%2010px%3Bbackground%3A%23fbf8f3%3Bborder-radius%3A10px%7D%22%2C%0A%20%20%22.tb%2B.cd%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.p.rm%7Bpadding%3A10px%7D%22%2C%0A%20%20%22.rm%20.tb%7Bgap%3A6px%3Bpadding%3A4px%202px%208px%206px%7D%22%2C%0A%20%20%22.rm%20.t%7Bfont-size%3A19px%7D%22%2C%0A%20%20%22.rm%20.cd%7Bmargin-top%3A6px%3Bpadding%3A12px%2014px%7D%22%2C%0A%20%20%22.rm%20.tb%2B.cd%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.rm%20.ta%7Bheight%3A32px%3Bpadding%3A0%2012px%200%2010px%7D%22%2C%0A%20%20%22.rm%20.n%7Bgap%3A7px%3Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.n%20b%7Bfont-size%3A22px%7D%22%2C%0A%20%20%22.rm%20.k%7Bmargin-top%3A7px%7D%22%2C%0A%20%20%22.rm%20.x%2C.rm%20.b.cn%7Bwidth%3A32px%3Bheight%3A32px%7D%22%2C%0A%20%20%22.rm%20.sec%7Bmargin-top%3A6px%7D%22%2C%0A%20%20%22.rm%20.sg%7Bmin-height%3A46px%3Bpadding%3A0%2012px%200%208px%7D%22%2C%0A%20%20%22.rm%20.ic%7Bwidth%3A30px%3Bheight%3A30px%3Bborder-radius%3A8px%7D%22%2C%0A%20%20%22.rm%20.so%2C.rm%20.lbd%2C.rm%20.la%7Bpadding%3A2px%2014px%2014px%7D%22%2C%0A%20%20%22.rm%20.hw%7Bmargin%3A10px%206px%202px%7D%22%2C%0A%20%20%22.rm%20.m%7Bmargin-top%3A8px%3Bgap%3A6px%7D%22%2C%0A%20%20%22.rm%20.c%7Bpadding%3A6px%2010px%7D%22%2C%0A%20%20%22.rm%20.pr%7Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.pl%7Bheight%3A30px%3Bpadding%3A0%2014px%200%2011px%7D%22%2C%0A%20%20%22.rm%20.b%7Bwidth%3A30px%3Bheight%3A30px%7D%22%2C%0A%20%20%22.rm%20.lf%7Bmargin-top%3A10px%7D%22%2C%0A%20%20%22.rm%20.lt%7Bpadding%3A3px%209px%7D%22%2C%0A%20%20%22.rm%20.ll%7Bmargin%3A10px%20-14px%200%7D%22%2C%0A%20%20%22.rm%20.lx%7Bpadding%3A6px%2014px%7D%22%2C%0A%20%20%22.rm%20.lr.lb2%7Bgap%3A6px%3Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.kl%2C.rm%20.ka%7Bheight%3A38px%3Bborder-radius%3A8px%7D%22%2C%0A%20%20%22.rm%20.lnt%7Bheight%3A38px%3Bborder-radius%3A8px%7D%22%2C%0A%20%20%22.rm%20.lck%2C.rm%20.lw%2C.rm%20.sm%2C.rm%20.lr%7Bmargin-top%3A10px%7D%22%2C%0A%20%20%22.rm%20.lrt%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.rm%20.gp%20.k%2C.rm%20.lgp%20.k%7Bmargin-top%3A10px%7D%22%2C%0A%20%20%22.rm%20.mn%7Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.so%3E.k%3Afirst-child%2C.rm%20.lbd%3E%3Afirst-child%2C.rm%20.la%3E%3Afirst-child%2C.rm%20.cd%3E%3Afirst-child%2C.rm%20.cd%3Ediv%3Afirst-child%3E%3Afirst-child%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.cd%3E%3Afirst-child%2C.cd%3Ediv%3Afirst-child%3E%3Afirst-child%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.cd%3Ediv%3Aempty%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.ta%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A6px%3Bheight%3A28px%3Bpadding%3A0%2010px%200%208px%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A999px%3Bbackground%3A%23fbf8f3%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bwhite-space%3Anowrap%3Bcursor%3Apointer%3Bflex%3Anone%7D%22%2C%0A%20%20%22.ta%3Ahover%7Bbackground%3A%23fff%7D%22%2C%0A%20%20%22.ta%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.n%7Bdisplay%3Aflex%3Balign-items%3Abaseline%3Bgap%3A6px%3Bmargin%3A5px%200%200%7D%22%2C%0A%20%20%22.n%20b%7Bfont%3A700%2020px%2F1%20-apple-system%2Csystem-ui%2C'Segoe%20UI'%2CRoboto%2Csans-serif%3Bletter-spacing%3A-.02em%3Bfont-variant-numeric%3Atabular-nums%7D%22%2C%0A%20%20%22.k%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A10px%3Bmargin%3A4px%200%200%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.d%7Bwidth%3A16px%3Bheight%3A16px%3Bborder-radius%3A50%25%3Bbackground%3A%231a1612%3Bbox-shadow%3A0%200%200%202px%20%23fff%20inset%2C0%200%200%201px%20%231a1612%3Bflex%3Anone%7D%22%2C%0A%20%20%22.r%7Bwidth%3A16px%3Bheight%3A12px%3Bbox-sizing%3Aborder-box%3Bborder%3A2px%20dashed%20%23d0103a%3Bborder-radius%3A2px%3Bbackground%3Argba(208%2C16%2C58%2C.12)%3Bflex%3Anone%7D%22%2C%0A%20%20%22.x%7Bwidth%3A28px%3Bheight%3A28px%3Bflex%3Anone%3Bpadding%3A0%3Bborder%3A0%3Bborder-radius%3A50%25%3Bbackground%3Atransparent%3Bcolor%3A%231a1612%3Bcursor%3Apointer%3Bdisplay%3Agrid%3Bplace-items%3Acenter%7D%22%2C%0A%20%20%22.p%20svg%7Bdisplay%3Ablock%3Bposition%3Astatic%3Binset%3Aauto%3Bwidth%3Aauto%3Bheight%3Aauto%3Boverflow%3Ahidden%3Bflex%3Anone%7D%22%2C%0A%20%20%22.x%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.b.cn%7Bwidth%3A28px%3Bheight%3A28px%7D%22%2C%0A%20%20%22.sr%7Bposition%3Aabsolute%3Bwidth%3A1px%3Bheight%3A1px%3Bmargin%3A-1px%3Bpadding%3A0%3Bborder%3A0%3Boverflow%3Ahidden%3Bclip%3Arect(0%200%200%200)%3Bwhite-space%3Anowrap%7D%22%2C%0A%20%20%22.x%3Afocus-visible%2C.a%3Afocus-visible%2C.sg%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.sec%7Bmargin%3A4px%200%200%3Bbackground%3A%23fbf8f3%3Bborder-radius%3A10px%7D%22%2C%0A%20%20%22.sg%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A10px%3Bwidth%3A100%25%3Bmin-height%3A32px%3Bpadding%3A0%209px%200%205px%3Bborder-radius%3A10px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.sg%3Ahover%7Bbackground%3A%23fff%7D%22%2C%0A%20%20%22.ic%7Bwidth%3A22px%3Bheight%3A22px%3Bborder-radius%3A6px%3Bbackground%3A%23efe8dc%3Bdisplay%3Agrid%3Bplace-items%3Acenter%3Bflex%3Anone%7D%22%2C%0A%20%20%22.sg%5Baria-expanded%3Dtrue%5D%20.ic%7Bbackground%3A%231a1612%3Bcolor%3A%23fbf8f3%7D%22%2C%0A%20%20%22.warn%20.ic%7Bbackground%3Argba(208%2C16%2C58%2C.12)%3Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.warn%20.sg%5Baria-expanded%3Dtrue%5D%20.ic%7Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.bg%7Bmargin-left%3Aauto%3Bpadding%3A2px%208px%3Bborder-radius%3A999px%3Bbackground%3A%23d0103a%3Bcolor%3A%23fff%3Bfont-weight%3A700%3Bline-height%3A1.3%7D%22%2C%0A%20%20%22.bg%3Aempty%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.bg%3Anot(%3Aempty)%2Bi%7Bmargin-left%3A12px%7D%22%2C%0A%20%20%22.sg%20i%7Bmargin-left%3Aauto%3Bwidth%3A7px%3Bheight%3A7px%3Bborder-right%3A2px%20solid%20%231a1612%3Bborder-bottom%3A2px%20solid%20%231a1612%3Btransform%3Atranslate(-3px%2C-2px)%20rotate(45deg)%7D%22%2C%0A%20%20%22.sg%5Baria-expanded%3Dtrue%5D%20i%7Btransform%3Atranslate(-3px%2C2px)%20rotate(225deg)%7D%22%2C%0A%20%20%22.so%2C.lbd%2C.la%7Bpadding%3A1px%2010px%208px%7D%22%2C%0A%20%20%22.lbd%7Boverflow%3Ahidden%7D%22%2C%0A%20%20%22.so%3E.k%3Afirst-child%2C.lbd%3E%3Afirst-child%2C.la%3E%3Afirst-child%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.so%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.hw%7Bmargin%3A5px%204px%200%3Bcolor%3A%235f564c%3Bfont-size%3A11px%3Bline-height%3A1.3%3Bfont-weight%3A600%7D%22%2C%0A%20%20%22.a%7Bcolor%3A%235f564c%3Bfont-size%3A13px%3Bfont-weight%3A400%3Btext-decoration%3Anone%3Bwhite-space%3Anowrap%7D%22%2C%0A%20%20%22.vr%7Bfloat%3Aright%3Bmargin-left%3A8px%3Bcolor%3A%235f564c%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.hw%2B.hw%7Bmargin-top%3A4px%7D%22%2C%0A%20%20%22.mn%7Bmargin%3A6px%200%200%3Bcolor%3A%231e3a8a%7D%22%2C%0A%20%20%22.a%3Ahover%7Bcolor%3A%239a3412%3Btext-decoration%3Aunderline%7D%22%2C%0A%20%20%22.p.g%7Bcursor%3Agrabbing%3Buser-select%3Anone%7D%22%2C%0A%20%20%22.n%20b.e%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.n%20b.ok%7Bcolor%3A%231f7a3f%7D%22%2C%0A%20%20%22.s%7Bcursor%3Apointer%7D%22%2C%0A%20%20%22svg.in%7Bz-index%3A1%7D%22%2C%0A%20%20%22g.o%7Bpointer-events%3Aauto%3Bcursor%3Apointer%3B-webkit-user-select%3Anone%3Buser-select%3Anone%7D%22%2C%0A%20%20%22.s%20input%7Bwidth%3A16px%3Bheight%3A16px%3Bmargin%3A0%202px%200%201px%3Baccent-color%3A%23c2410c%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.s.off%7Bopacity%3A.45%3Bcursor%3Adefault%7D%22%2C%0A%20%20%22.s.off%20input%7Bcursor%3Adefault%7D%22%2C%0A%20%20%22.s%20input%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.h%7Bwidth%3A16px%3Bheight%3A16px%3Bborder-radius%3A50%25%3Bbackground%3A%23fff%3Bborder%3A2px%20dashed%20%231a1612%3Bbox-sizing%3Aborder-box%3Bflex%3Anone%7D%22%2C%0A%20%20%22.m%7Blist-style%3Anone%3Bmargin%3A5px%200%200%3Bpadding%3A2px%3Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Bgap%3A4px%7D%22%2C%0A%20%20%22.c%7Ball%3Aunset%3Bfont%3Ainherit%3Bfont-size%3A14px%3Bline-height%3A1%3Bcursor%3Apointer%3Bpadding%3A4px%208px%3Bborder%3A1px%20dashed%20%23d0103a%3Bborder-radius%3A999px%3Bbackground%3Argba(208%2C16%2C58%2C.06)%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.c%3Ahover%7Bbackground%3Argba(208%2C16%2C58%2C.14)%7D%22%2C%0A%20%20%22.c%5Baria-pressed%3Dtrue%5D%7Bborder-style%3Asolid%3Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.c%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.gp%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.gp%20.k%2C.lgp%20.k%7Bmargin%3A6px%200%200%7D%22%2C%0A%20%20%22.w%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A8px%3Bmargin%3A0%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.w%20span%7Bflex%3A1%3Bfont-variant-numeric%3Atabular-nums%7D%22%2C%0A%20%20%22.b%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bwidth%3A28px%3Bheight%3A28px%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A50%25%3Bdisplay%3Agrid%3Bplace-items%3Acenter%3Bcursor%3Apointer%3Bcolor%3A%231a1612%3Bflex%3Anone%7D%22%2C%0A%20%20%22.b%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.b%3Adisabled%7Bopacity%3A.3%3Bcursor%3Adefault%3Bbackground%3Anone%7D%22%2C%0A%20%20%22.b%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.pr%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A10px%3Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.pr%2B.pr%7Bmargin-top%3A8px%7D%22%2C%0A%20%20%22.pr%20.lo%7Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bheight%3A30px%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.sm%7Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bline-height%3A1.45%7D%22%2C%0A%20%20%22.sm%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.sm%20.g%7Bcolor%3A%231f7a3f%3Bfont-weight%3A600%7D%22%2C%0A%20%20%22.sm%20.e%7Bcolor%3A%23d0103a%3Bfont-weight%3A700%7D%22%2C%0A%20%20%22.sm%20.q%7Bcolor%3A%235f564c%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.m%20.mo%7Balign-self%3Acenter%3Bcolor%3A%235f564c%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.pl%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A7px%3Bheight%3A28px%3Bpadding%3A0%2013px%200%2010px%3Bborder-radius%3A999px%3Bbackground%3A%231a1612%3Bcolor%3A%23f7f3ec%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%3Bflex%3Anone%7D%22%2C%0A%20%20%22.pl%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.pl%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.ls%7Bfont-weight%3A400%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.lv%7Bcolor%3A%23d0103a%3Bfont-weight%3A700%7D%22%2C%0A%20%20%22.lbd%5Bhidden%5D%2C.la%5Bhidden%5D%2C.lm%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lf%7Bdisplay%3Agrid%3Bgrid-template-columns%3A1fr%201fr%3Bgap%3A2px%3Bmargin%3A6px%200%200%3Bpadding%3A3px%3Bbackground%3A%23efe8dc%3Bborder-radius%3A10px%7D%22%2C%0A%20%20%22.lt%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Btext-align%3Acenter%3Bpadding%3A2px%209px%3Bborder-radius%3A7px%3Bcolor%3A%235f564c%3Bfont-weight%3A600%3Bfont-size%3A14px%3Bline-height%3A1.3%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lt%3Ahover%7Bcolor%3A%231a1612%3Bbackground%3Argba(26%2C22%2C18%2C.06)%7D%22%2C%0A%20%20%22.lt%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23fff%3Bcolor%3A%231a1612%3Bbox-shadow%3A0%201px%202px%20rgba(26%2C22%2C18%2C.2)%7D%22%2C%0A%20%20%22.lt.e%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lt.e%3Ahover%7Bbackground%3Argba(208%2C16%2C58%2C.1)%7D%22%2C%0A%20%20%22.lt.e%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.ll%7Blist-style%3Anone%3Bmargin%3A6px%20-10px%200%3Bpadding%3A0%3Bcursor%3Aauto%7D%22%2C%0A%20%20%22.lx%7Bpadding%3A3px%2010px%7D%22%2C%0A%20%20%22.lx.bad%7Bbackground%3Argba(208%2C16%2C58%2C.07)%7D%22%2C%0A%20%20%22.lx%20.tm%7Bmargin-right%3A8px%3Bfont%3A500%2014px%2F1.4%20ui-monospace%2CSFMono-Regular%2CMenlo%2CConsolas%2Cmonospace%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.lx%20.st%7Bfont%3A700%2014px%2F1.4%20ui-monospace%2CSFMono-Regular%2CMenlo%2CConsolas%2Cmonospace%7D%22%2C%0A%20%20%22.lx%20.bd%7Bdisplay%3Ablock%7D%22%2C%0A%20%20%22.ok%20.st%7Bcolor%3A%231f7a3f%7D.bad%20.st%7Bcolor%3A%23d0103a%7D.skip%20.st%7Bcolor%3A%235f564c%7D.info%20.st%7Bcolor%3A%231e3a8a%7D%22%2C%0A%20%20%22.ft%7Bcolor%3A%231e3a8a%7D.bad%20.ft%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lc%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-block%3Bmin-width%3A22px%3Bpadding%3A0%206px%3Bborder%3A1px%20dashed%20%231a1612%3Bborder-radius%3A999px%3Bfont-size%3A14px%3Bline-height%3A1.4%3Btext-align%3Acenter%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lc%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.lr%7Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Bgap%3A8px%3Bmargin%3A6px%200%200%7D%22%2C%0A%20%20%22.lrt%7Bmargin%3A0%7D%22%2C%0A%20%20%22.lr.lb2%7Bdisplay%3Agrid%3Bgrid-template-columns%3A1fr%201fr%3Bgap%3A5px%3Bmargin-top%3A8px%7D%22%2C%0A%20%20%22.kl%2C.ka%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bjustify-content%3Acenter%3Bgap%3A7px%3Bheight%3A30px%3Bborder-radius%3A7px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bwhite-space%3Anowrap%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.kl%7Bborder%3A1.5px%20solid%20%231a1612%3Bbackground%3A%23fff%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.kl%3Ahover%7Bbackground%3A%23efe8dc%7D%22%2C%0A%20%20%22.ka%7Bbackground%3A%231a1612%3Bcolor%3A%23fbf8f3%7D%22%2C%0A%20%20%22.ka%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.kl%3Afocus-visible%2C.ka%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lnt%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Aflex%3Balign-items%3Acenter%3Bjustify-content%3Acenter%3Bgap%3A7px%3Bwidth%3A100%25%3Bheight%3A30px%3Bborder%3A1.5px%20dashed%20%231a1612%3Bborder-radius%3A7px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lnt%3Ahover%7Bborder-style%3Asolid%3Bbackground%3A%23fff%7D%22%2C%0A%20%20%22.lnt%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lk%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bpadding%3A5px%2013px%3Bborder-radius%3A999px%3Bbackground%3A%231a1612%3Bcolor%3A%23f7f3ec%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lk%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.lo%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bpadding%3A4px%2012px%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A999px%3Bfont-weight%3A600%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lo%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.lt%3Afocus-visible%2C.lc%3Afocus-visible%2C.lk%3Afocus-visible%2C.lo%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.la%20p%2C.lm%7Bmargin%3A8px%200%200%7D%22%2C%0A%20%20%22.lck%7Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bline-height%3A1.45%7D%22%2C%0A%20%20%22.lck%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lq%7Bcolor%3A%231e3a8a%3Bfont-weight%3A700%3Btext-decoration%3Anone%7D%22%2C%0A%20%20%22.lq%3Ahover%7Btext-decoration%3Aunderline%3Btext-underline-offset%3A2px%7D%22%2C%0A%20%20%22.lq.bad%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lq%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%3Bborder-radius%3A2px%7D%22%2C%0A%20%20%22.wc%7Bcolor%3A%231f7a3f%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.nw%20.wc%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lw%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A8px%3Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bcolor%3A%231f7a3f%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%7Bwidth%3A16px%3Bheight%3A16px%3Bmargin%3A0%202px%200%201px%3Baccent-color%3A%23c2410c%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lm%7Bcolor%3A%23d0103a%7D%22%0A%5D.join(%22%22)%3B%0Atry%20%7B%0A%20%20var%20sheet%20%3D%20new%20CSSStyleSheet()%3B%0A%20%20sheet.replaceSync(style.textContent)%3B%0A%20%20root.adoptedStyleSheets%20%3D%20%5Bsheet%5D%3B%0A%7D%20catch%20(e)%20%7B%0A%20%20root.appendChild(style)%3B%0A%7D%0Avar%20spot%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(spot)%3B%0Avar%20underPg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0AunderPg.setAttribute(%22class%22%2C%20%22pg%22)%3B%0Aroot.appendChild(underPg)%3B%0Avar%20svgPg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0AsvgPg.setAttribute(%22class%22%2C%20%22pg%22)%3B%0Aroot.appendChild(svgPg)%3B%0Avar%20under%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(under)%3B%0Avar%20svg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(svg)%3B%0Avar%20dotPg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0AdotPg.setAttribute(%22class%22%2C%20%22pg%22)%3B%0Aroot.appendChild(dotPg)%3B%0Avar%20dot%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(dot)%3B%0A%5Bspot%2C%20underPg%2C%20svgPg%2C%20under%2C%20svg%2C%20dotPg%2C%20dot%5D.forEach(function%20(g)%20%7B%20g.setAttribute(%22aria-hidden%22%2C%20%22true%22)%3B%20%7D)%3B%0A%0Avar%20panel%20%3D%20document.createElement(%22div%22)%3B%0Apanel.className%20%3D%20%22p%22%3B%0Apanel.setAttribute(%22role%22%2C%20%22dialog%22)%3B%0Apanel.setAttribute(%22aria-label%22%2C%20%22Tab%20trail%22)%3B%0Afunction%20line(cls%2C%20bold%2C%20text%2C%20mark)%20%7B%0A%20%20var%20p%20%3D%20document.createElement(%22p%22)%3B%0A%20%20p.className%20%3D%20cls%3B%0A%20%20if%20(mark)%20%7B%20var%20m%20%3D%20document.createElement(%22span%22)%3B%20m.className%20%3D%20mark%3B%20p.appendChild(m)%3B%20%7D%0A%20%20if%20(bold%20!%3D%3D%20null)%20%7B%20var%20b%20%3D%20document.createElement(%22b%22)%3B%20b.textContent%20%3D%20bold%3B%20p.appendChild(b)%3B%20%7D%0A%20%20p.appendChild(document.createTextNode(text))%3B%0A%20%20panel.appendChild(p)%3B%0A%20%20return%20p%3B%0A%7D%0Avar%20x%20%3D%20document.createElement(%22button%22)%3B%0Ax.className%20%3D%20%22x%22%3B%0Ax.type%20%3D%20%22button%22%3B%0Ax.setAttribute(%22aria-label%22%2C%20%22Close%20Tab%20trail%22)%3B%0Afunction%20icon(parent%2C%20w%2C%20d%2C%20sw)%20%7B%0A%20%20var%20g%20%3D%20el(%22svg%22%2C%20%7B%20width%3A%20w%2C%20height%3A%20w%2C%20viewBox%3A%20%220%200%2016%2016%22%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22currentColor%22%2C%20%22stroke-width%22%3A%20sw%2C%20%22stroke-linecap%22%3A%20%22round%22%2C%20%22stroke-linejoin%22%3A%20%22round%22%2C%20%22aria-hidden%22%3A%20%22true%22%20%7D%2C%20parent)%3B%0A%20%20el(%22path%22%2C%20%7B%20d%3A%20d%20%7D%2C%20g)%3B%0A%20%20return%20g%3B%0A%7D%0Aicon(x%2C%2016%2C%20%22M3%203l10%2010M13%203L3%2013%22%2C%202)%3B%0Avar%20bar%20%3D%20document.createElement(%22div%22)%3B%0Abar.className%20%3D%20%22tb%22%3B%0Apanel.appendChild(bar)%3B%0Avar%20corner%20%3D%20document.createElement(%22button%22)%3B%0Acorner.className%20%3D%20%22b%20cn%22%3B%0Acorner.type%20%3D%20%22button%22%3B%0Acorner.setAttribute(%22aria-label%22%2C%20%22Move%20to%20the%20next%20corner%22)%3B%0Acorner.title%20%3D%20%22Move%20to%20the%20next%20corner%22%3B%0Avar%20cg%20%3D%20icon(corner%2C%2016%2C%20%22M5%2011.5V5h6.5M9.5%203.2L11.5%205%209.5%206.8%22%2C%201.6)%3B%0Ael(%22rect%22%2C%20%7B%20x%3A%202%2C%20y%3A%202%2C%20width%3A%2012%2C%20height%3A%2012%2C%20rx%3A%202%20%7D%2C%20cg)%3B%0Ael(%22rect%22%2C%20%7B%20x%3A%209.5%2C%20y%3A%209.5%2C%20width%3A%202%2C%20height%3A%202%2C%20fill%3A%20%22currentColor%22%20%7D%2C%20cg)%3B%0Acorner.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20var%20r%20%3D%20panel.getBoundingClientRect()%2C%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%3B%0A%20%20var%20mx%20%3D%20Math.max(8%2C%20Math.min(66%2C%20(W%20-%20r.width)%20%2F%202))%20%2B%20%22px%22%2C%20my%20%3D%20Math.max(8%2C%20Math.min(66%2C%20(H%20-%20r.height)%20%2F%202))%20%2B%20%22px%22%3B%0A%20%20var%20right%20%3D%20r.left%20%2B%20r.width%20%2F%202%20%3E%20W%20%2F%202%2C%20low%20%3D%20r.top%20%2B%20r.height%20%2F%202%20%3E%20H%20%2F%202%3B%0A%20%20var%20k%20%3D%20!low%20%26%26%20!right%20%3F%201%20%3A%20!low%20%26%26%20right%20%3F%202%20%3A%20low%20%26%26%20right%20%3F%203%20%3A%200%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%204%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20toRight%20%3D%20k%20%3D%3D%3D%201%20%7C%7C%20k%20%3D%3D%3D%202%2C%20toLow%20%3D%20k%20%3D%3D%3D%202%20%7C%7C%20k%20%3D%3D%3D%203%3B%0A%20%20%20%20panel.style.left%20%3D%20toRight%20%3F%20%22auto%22%20%3A%20mx%3B%0A%20%20%20%20panel.style.right%20%3D%20toRight%20%3F%20mx%20%3A%20%22auto%22%3B%0A%20%20%20%20panel.style.top%20%3D%20toLow%20%3F%20%22auto%22%20%3A%20my%3B%0A%20%20%20%20panel.style.bottom%20%3D%20toLow%20%3F%20my%20%3A%20%22auto%22%3B%0A%20%20%20%20var%20n%20%3D%20panel.getBoundingClientRect()%3B%0A%20%20%20%20if%20(Math.abs(n.left%20-%20r.left)%20%3E%202%20%7C%7C%20Math.abs(n.top%20-%20r.top)%20%3E%202)%20break%3B%0A%20%20%20%20k%20%3D%20(k%20%2B%201)%20%25%204%3B%0A%20%20%7D%0A%7D)%3B%0Avar%20say%20%3D%20document.createElement(%22p%22)%3B%0Asay.className%20%3D%20%22sr%22%3B%0Asay.setAttribute(%22role%22%2C%20%22status%22)%3B%0Asay.setAttribute(%22aria-live%22%2C%20%22polite%22)%3B%0Apanel.appendChild(say)%3B%0Avar%20sayList%20%3D%20%5B%5D%2C%20sayT%20%3D%200%3B%0Afunction%20announce(t)%20%7B%0A%20%20sayList.push(t)%3B%0A%20%20if%20(sayT)%20return%3B%0A%20%20sayT%20%3D%20setTimeout(function%20()%20%7B%0A%20%20%20%20sayT%20%3D%200%3B%0A%20%20%20%20if%20(closed)%20return%3B%0A%20%20%20%20var%20text%20%3D%20sayList.join(%22%20%22)%3B%0A%20%20%20%20sayList%20%3D%20%5B%5D%3B%0A%20%20%20%20say.textContent%20%3D%20%22%22%3B%0A%20%20%20%20setTimeout(function%20()%20%7B%20say.textContent%20%3D%20text%3B%20%7D%2C%2050)%3B%0A%20%20%7D%2C%201000)%3B%0A%7D%0Abar.appendChild(line(%22t%22%2C%20null%2C%20%22Tab%20trail%22))%3B%0Avar%20playCard%20%3D%20document.createElement(%22div%22)%3B%0AplayCard.className%20%3D%20%22cd%22%3B%0Apanel.appendChild(playCard)%3B%0Avar%20playRow%20%3D%20document.createElement(%22p%22)%3B%0AplayRow.className%20%3D%20%22pr%22%3B%0Avar%20play%20%3D%20document.createElement(%22button%22)%3B%0Aplay.className%20%3D%20%22pl%22%3B%0Aplay.type%20%3D%20%22button%22%3B%0Avar%20playIcon%20%3D%20document.createElement(%22span%22)%3B%0Aplay.appendChild(playIcon)%3B%0Avar%20playWord%20%3D%20document.createTextNode(%22Play%22)%3B%0Aplay.appendChild(playWord)%3B%0Aplay.addEventListener(%22mousedown%22%2C%20function%20(e)%20%7B%20e.preventDefault()%3B%20%7D)%3B%0Avar%20playText%20%3D%20document.createElement(%22span%22)%3B%0AplayText.textContent%20%3D%20%22Visits%20every%20stop%20for%20you%22%3B%0AplayRow.appendChild(play)%3B%0AplayRow.appendChild(playText)%3B%0AplayCard.appendChild(playRow)%3B%0Avar%20AI_ICON%20%3D%20%22M3.5%205.5h9v8h-9zM8%205.5V3.2M8%201.9v.1M6%208.6v1.1M10%208.6v1.1M6.3%2011.6h3.4M1.8%208.5v2.6M14.2%208.5v2.6%22%2C%20COPY_ICON%20%3D%20%22M10.5%205.5V3a.5.5%200%200%200-.5-.5H3a.5.5%200%200%200-.5.5v7a.5.5%200%200%200%20.5.5h2.5M5.5%205.5h8v8h-8z%22%3B%0Avar%20aiBtn%20%3D%20document.createElement(%22button%22)%3B%0AaiBtn.className%20%3D%20%22ta%22%3B%0AaiBtn.type%20%3D%20%22button%22%3B%0Aicon(aiBtn%2C%2015%2C%20AI_ICON%2C%201.6)%3B%0AaiBtn.appendChild(document.createTextNode(%22Copy%20for%20AI%22))%3B%0AaiBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(aiBtn%2C%20window%2C%20aiText()%2C%20%22Copy%20for%20AI%22)%3B%20%7D)%3B%0Abar.appendChild(aiBtn)%3B%0Abar.appendChild(corner)%3B%0Abar.appendChild(x)%3B%0Avar%20sumLine%20%3D%20document.createElement(%22p%22)%3B%0AsumLine.className%20%3D%20%22sm%22%3B%0AsumLine.hidden%20%3D%20true%3B%0AplayCard.appendChild(sumLine)%3B%0Avar%20resCard%20%3D%20document.createElement(%22div%22)%3B%0AresCard.className%20%3D%20%22cd%22%3B%0Apanel.appendChild(resCard)%3B%0Avar%20info%20%3D%20document.createElement(%22div%22)%3B%0AresCard.appendChild(info)%3B%0Avar%20shownEl%20%3D%20null%2C%20chips%20%3D%20%5B%5D%2C%20drawn%20%3D%20%5B%5D%2C%20panelIn%20%3D%20false%2C%20pRet%20%3D%20null%3B%0Avar%20KIND%20%3D%20%7B%20img%3A%20%22Image%22%2C%20picture%3A%20%22Image%22%2C%20svg%3A%20%22Icon%22%2C%20i%3A%20%22Icon%22%2C%20video%3A%20%22Video%22%2C%20a%3A%20%22Link%22%2C%20li%3A%20%22List%20item%22%2C%20tr%3A%20%22Table%20row%22%2C%20td%3A%20%22Table%20cell%22%20%7D%3B%0Avar%20BARE%20%3D%20%7B%20button%3A%20%22Button%22%2C%20textarea%3A%20%22Field%22%2C%20select%3A%20%22Dropdown%22%2C%20iframe%3A%20%22Frame%22%20%7D%3B%0Afunction%20kind(m%2C%20tag)%20%7B%0A%20%20if%20(tag%20%3D%3D%3D%20%22input%22)%20return%20m.type%20%3D%3D%3D%20%22checkbox%22%20%3F%20%22Checkbox%22%20%3A%20m.type%20%3D%3D%3D%20%22radio%22%20%3F%20%22Radio%22%20%3A%20%2F%5E(submit%7Cbutton%7Creset%7Cimage)%24%2F.test(m.type)%20%3F%20%22Button%22%20%3A%20%22Field%22%3B%0A%20%20return%20KIND%5Btag%5D%20%7C%7C%20BARE%5Btag%5D%20%7C%7C%20%22Clickable%20box%22%3B%0A%7D%0Afunction%20named(m)%20%7B%0A%20%20var%20by%20%3D%20m.getAttribute(%22aria-labelledby%22)%2C%20r%20%3D%20m.getRootNode()%2C%20t%20%3D%20%22%22%3B%0A%20%20if%20(by%20%26%26%20r.getElementById)%20t%20%3D%20by.split(%2F%5Cs%2B%2F).map(function%20(id)%20%7B%20var%20x%20%3D%20r.getElementById(id)%3B%20return%20x%20%3F%20x.textContent%20%3A%20%22%22%3B%20%7D).join(%22%20%22)%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.getAttribute(%22aria-label%22)%20%7C%7C%20%22%22%3B%0A%20%20if%20(!t.trim()%20%26%26%20m.labels%20%26%26%20m.labels.length)%20t%20%3D%20%5B%5D.map.call(m.labels%2C%20function%20(l)%20%7B%20return%20l.innerText%20%7C%7C%20l.textContent%3B%20%7D).join(%22%20%22)%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.getAttribute(%22placeholder%22)%20%7C%7C%20%22%22%3B%0A%20%20if%20(!t.trim()%20%26%26%20m.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20%2F%5E(submit%7Cbutton%7Creset)%24%2F.test(m.type))%20t%20%3D%20m.value%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.innerText%20%7C%7C%20%22%22%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.getAttribute(%22title%22)%20%7C%7C%20%22%22%3B%0A%20%20return%20t%3B%0A%7D%0Avar%20EMAIL%20%3D%20%2F%5B%5Cw.%2B-%5D%2B%40%5B%5Cw-%5D%2B(%5C.%5B%5Cw-%5D%2B)%2B%2Fg%2C%20DIGITS%20%3D%20%2F%5Cd(%3F%3A%5B%5Cs-%5D%3F%5Cd)%7B5%2C%7D%2Fg%2C%20TOKEN%20%3D%20%2F%5BA-Za-z0-9_%25%3D%2B-%5D%7B16%2C%7D%2Fg%3B%0Avar%20SECRET%20%3D%20%2F%5Cb(%3F%3A(%3F%3Ask%7Cpk%7Crk)_(%3F%3Alive%7Ctest)_%5Cw%2B%7Cgh%5Bpousr%5D_%5Cw%7B20%2C%7D%7Cgithub_pat_%5Cw%2B%7CAKIA%5B0-9A-Z%5D%7B16%7D%7Cxox%5Babprs%5D-%5B%5Cw-%5D%2B%7CeyJ%5B%5Cw-%5D%2B%5C.%5B%5Cw-%5D%2B%5C.%5B%5Cw-%5D*)%2Fg%2C%20SAID%20%3D%20%2F%5Cb((%3F%3Apassword%7Cpasswd%7Cpwd%7Cpasscode%7Cpin%7Csecret%7Capi%5B%20_-%5D%3Fkey%7Ctoken)%5Cs*%5B%3A%3D%5D%5Cs*)%5CS%2B%2Fgi%3B%0Afunction%20tokens(t)%20%7B%20return%20t.replace(SECRET%2C%20%22%5Btoken%5D%22).replace(TOKEN%2C%20function%20(w)%20%7B%20return%20%2F%5Cd%2F.test(w)%20%3F%20%22%5Btoken%5D%22%20%3A%20w%3B%20%7D)%3B%20%7D%0Afunction%20scrub(t)%20%7B%20return%20tokens(String(t).replace(SAID%2C%20%22%241%5Btoken%5D%22)).replace(EMAIL%2C%20%22%5Bemail%5D%22).replace(DIGITS%2C%20%22%5Bnumber%5D%22)%3B%20%7D%0Afunction%20secretish(t)%20%7B%20return%20scrub(t)%20!%3D%3D%20t%3B%20%7D%0Afunction%20cleanUrl(u)%20%7B%0A%20%20u%20%3D%20String(u).split(%2F%5B%3F%23%5D%2F)%5B0%5D.replace(%2F%5E(%5Ba-z%5D%5B%5Cw%2B.-%5D*%3A%5C%2F%5C%2F)%5B%5E%40%5C%2F%5D*%40%2Fi%2C%20%22%241%22)%3B%0A%20%20if%20(%2F%5E(javascript%7Cdata%7Cblob)%3A%2Fi.test(u))%20return%20u.split(%22%3A%22)%5B0%5D%20%2B%20%22%3A%22%3B%0A%20%20return%20scrub(u)%3B%0A%7D%0Afunction%20label(m)%20%7B%0A%20%20var%20tag%20%3D%20m.tagName.toLowerCase()%3B%0A%20%20var%20inner%20%3D%20m.querySelector(%22img%5Balt%5D%2C%5Baria-label%5D%2Ctitle%22)%3B%0A%20%20var%20alt%20%3D%20(m.getAttribute(%22alt%22)%20%7C%7C%20(inner%20%26%26%20(inner.getAttribute(%22alt%22)%20%7C%7C%20inner.getAttribute(%22aria-label%22)%20%7C%7C%20inner.textContent))%20%7C%7C%20%22%22).trim()%3B%0A%20%20var%20t%20%3D%20scrub(named(m)).trim().replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22)%3B%0A%20%20alt%20%3D%20scrub(alt)%3B%0A%20%20if%20(!t%20%26%26%20alt)%20t%20%3D%20(KIND%5Btag%5D%20%3F%20KIND%5Btag%5D%20%2B%20%22%3A%20%22%20%3A%20%22%22)%20%2B%20alt.replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22)%3B%0A%20%20if%20(!t)%20t%20%3D%20kind(m%2C%20tag)%3B%0A%20%20return%20t.length%20%3E%2028%20%3F%20t.slice(0%2C%2027)%20%2B%20%22...%22%20%3A%20t%3B%0A%7D%0Afunction%20count(n%2C%20text%2C%20bad%2C%20good%2C%20parent)%20%7B%0A%20%20var%20p%20%3D%20document.createElement(%22p%22)%3B%0A%20%20p.className%20%3D%20%22n%22%3B%0A%20%20var%20b%20%3D%20document.createElement(%22b%22)%3B%0A%20%20b.textContent%20%3D%20String(n)%3B%0A%20%20if%20(bad)%20b.className%20%3D%20%22e%22%3B%0A%20%20else%20if%20(good)%20b.className%20%3D%20%22ok%22%3B%0A%20%20p.appendChild(b)%3B%0A%20%20p.appendChild(document.createTextNode(text))%3B%0A%20%20(parent%20%7C%7C%20info).appendChild(p)%3B%0A%7D%0Avar%20CHIPS%20%3D%2050%3B%0Afunction%20chipUl(parent%2C%20list%2C%20text%2C%20go)%20%7B%0A%20%20var%20ul%20%3D%20document.createElement(%22ul%22)%2C%20out%20%3D%20%5B%5D%3B%0A%20%20ul.className%20%3D%20%22m%22%3B%0A%20%20list.slice(0%2C%20CHIPS).forEach(function%20(m)%20%7B%0A%20%20%20%20var%20li%20%3D%20document.createElement(%22li%22)%3B%0A%20%20%20%20var%20c%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20c.className%20%3D%20%22c%22%3B%0A%20%20%20%20c.type%20%3D%20%22button%22%3B%0A%20%20%20%20c.textContent%20%3D%20text(m)%3B%0A%20%20%20%20c.addEventListener(%22click%22%2C%20function%20()%20%7B%20go(m%2C%20c)%3B%20%7D)%3B%0A%20%20%20%20out.push(c)%3B%0A%20%20%20%20li.appendChild(c)%3B%0A%20%20%20%20ul.appendChild(li)%3B%0A%20%20%7D)%3B%0A%20%20if%20(list.length%20%3E%20CHIPS)%20%7B%0A%20%20%20%20var%20mo%20%3D%20document.createElement(%22li%22)%3B%0A%20%20%20%20mo.className%20%3D%20%22mo%22%3B%0A%20%20%20%20mo.textContent%20%3D%20%22and%20%22%20%2B%20(list.length%20-%20CHIPS).toLocaleString(%22en-US%22)%20%2B%20%22%20more%22%3B%0A%20%20%20%20ul.appendChild(mo)%3B%0A%20%20%7D%0A%20%20parent.appendChild(ul)%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20fill()%20%7B%0A%20%20var%20had%20%3D%20chips.indexOf(root.activeElement)%3B%0A%20%20while%20(info.firstChild)%20info.removeChild(info.firstChild)%3B%0A%20%20chips%20%3D%20%5B%5D%3B%0A%20%20drawn%20%3D%20sig()%3B%0A%20%20count(stops.length%2C%20stops.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20for%20the%20Tab%20key%22%20%3A%20%22%20stops%20for%20the%20Tab%20key%22)%3B%0A%20%20count(missed.length%2C%20missed.length%20%3D%3D%3D%200%20%3F%20%22%20clickable%20things%20Tab%20skips%22%20%3A%20missed.length%20%3D%3D%3D%201%20%3F%20%22%20looks%20clickable%2C%20but%20Tab%20skips%20it%22%20%3A%20%22%20look%20clickable%2C%20but%20Tab%20skips%20them%22%2C%20missed.length%20%3E%200%2C%20missed.length%20%3D%3D%3D%200)%3B%0A%20%20if%20(missed.indexOf(shownEl)%20%3C%200%20%26%26%20hovers.indexOf(shownEl)%20%3C%200%20%26%26%20forcedBad.indexOf(shownEl)%20%3C%200)%20shownEl%20%3D%20null%3B%0A%20%20if%20(missed.length)%20chipList(missed)%3B%0A%20%20if%20(hovers.length)%20%7B%0A%20%20%20%20count(hovers.length%2C%20hovers.length%20%3D%3D%3D%201%20%3F%20%22%20menu%20or%20box%20opens%20only%20on%20mouse%20hover%22%20%3A%20%22%20menus%20or%20boxes%20open%20only%20on%20mouse%20hover%22%2C%20true)%3B%0A%20%20%20%20chipList(hovers)%3B%0A%20%20%7D%0A%20%20if%20(forcedBad.length)%20%7B%0A%20%20%20%20count(forcedBad.length%2C%20forcedBad.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20has%20tabindex%20above%200%2C%20which%20pulls%20it%20ahead%20of%20the%20page%22%20%3A%20%22%20stops%20have%20tabindex%20above%200%2C%20which%20pulls%20them%20ahead%20of%20the%20page%22%2C%20true)%3B%0A%20%20%20%20chipList(forcedBad%2C%20true)%3B%0A%20%20%7D%0A%20%20if%20(skip)%20skipPanel()%3B%0A%20%20if%20(had%20%3E%3D%200%20%26%26%20chips.length)%20chips%5BMath.min(had%2C%20chips.length%20-%201)%5D.focus()%3B%0A%7D%0Afunction%20sig()%20%7B%20return%20%5Bstops.length%5D.concat(missed%2C%20%5B%22%7C%22%5D%2C%20hovers%2C%20%5B%22%7C%22%5D%2C%20forced%2C%20%5B%22%7C%22%5D%2C%20forcedBad)%3B%20%7D%0Afunction%20chipList(list%2C%20num)%20%7B%0A%20%20var%20made%20%3D%20chipUl(info%2C%20list%2C%20function%20(m)%20%7B%20return%20(num%20%26%26%20stops.indexOf(m)%20%3E%3D%200%20%3F%20stops.indexOf(m)%20%2B%201%20%2B%20%22%3A%20%22%20%3A%20%22%22)%20%2B%20label(m)%3B%20%7D%2C%20function%20(m%2C%20c)%20%7B%0A%20%20%20%20shownEl%20%3D%20m%3B%0A%20%20%20%20chips.forEach(function%20(x)%20%7B%20x.setAttribute(%22aria-pressed%22%2C%20x%20%3D%3D%3D%20c%20%3F%20%22true%22%20%3A%20%22false%22)%3B%20%7D)%3B%0A%20%20%20%20m.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%0A%20%20%20%20queue()%3B%0A%20%20%7D)%3B%0A%20%20made.forEach(function%20(c%2C%20i)%20%7B%20c.setAttribute(%22aria-pressed%22%2C%20list%5Bi%5D%20%3D%3D%3D%20shownEl%20%3F%20%22true%22%20%3A%20%22false%22)%3B%20%7D)%3B%0A%20%20chips%20%3D%20chips.concat(made)%3B%0A%7D%0Afill()%3B%0Avar%20PAGE%20%3D%2050%2C%20win%20%3D%200%2C%20seen%20%3D%20-1%3B%0Avar%20pager%20%3D%20document.createElement(%22p%22)%3B%0Apager.className%20%3D%20%22w%22%3B%0Avar%20pageText%20%3D%20document.createElement(%22span%22)%3B%0Apager.appendChild(pageText)%3B%0Afunction%20pageBtn(text%2C%20step)%20%7B%0A%20%20var%20b%20%3D%20document.createElement(%22button%22)%3B%0A%20%20b.className%20%3D%20%22b%22%3B%0A%20%20b.type%20%3D%20%22button%22%3B%0A%20%20b.setAttribute(%22aria-label%22%2C%20text)%3B%0A%20%20icon(b%2C%2014%2C%20step%20%3C%200%20%3F%20%22M10%203L5%208l5%205%22%20%3A%20%22M6%203l5%205-5%205%22%2C%202)%3B%0A%20%20b.addEventListener(%22mousedown%22%2C%20function%20(e)%20%7B%20e.preventDefault()%3B%20%7D)%3B%0A%20%20b.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20win%20%3D%20Math.min(Math.max(win%20%2B%20step%2C%200)%2C%20Math.ceil(stops.length%20%2F%20PAGE)%20-%201)%3B%0A%20%20%20%20queue()%3B%0A%20%20%7D)%3B%0A%20%20pager.appendChild(b)%3B%0A%20%20return%20b%3B%0A%7D%0Avar%20prevBtn%20%3D%20pageBtn(%22Previous%22%2C%20-1)%2C%20nextBtn%20%3D%20pageBtn(%22Next%22%2C%201)%3B%0Avar%20group%20%3D%20document.createElement(%22div%22)%3B%0Agroup.className%20%3D%20%22cd%20gp%22%3B%0Agroup.appendChild(pager)%3B%0Avar%20jumpBox%20%3D%20document.createElement(%22div%22)%3B%0AresCard.appendChild(jumpBox)%3B%0Apanel.appendChild(group)%3B%0Avar%20jumps%20%3D%20%5B%5D%2C%20pressed%20%3D%200%2C%20before%20%3D%20-1%2C%20popMissed%20%3D%20null%2C%20lost%20%3D%20false%3B%0Avar%20POP%20%3D%20%2Fcookie%7Cconsent%7Cgdpr%7Cmodal%7Cpopup%2Fi%3B%0Afunction%20dimmed()%20%7B%0A%20%20var%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%3B%0A%20%20return%20Array.prototype.some.call(document.querySelectorAll(%22body%20*%22)%2C%20function%20(e)%20%7B%0A%20%20%20%20if%20(e.id%20%3D%3D%3D%20ID)%20return%20false%3B%0A%20%20%20%20var%20cs%20%3D%20getComputedStyle(e)%3B%0A%20%20%20%20if%20(cs.position%20!%3D%3D%20%22fixed%22%20%7C%7C%20cs.display%20%3D%3D%3D%20%22none%22%20%7C%7C%20cs.visibility%20%3D%3D%3D%20%22hidden%22)%20return%20false%3B%0A%20%20%20%20var%20r%20%3D%20e.getBoundingClientRect()%3B%0A%20%20%20%20if%20(r.width%20%3C%20W%20*%200.9%20%7C%7C%20r.height%20%3C%20H%20*%200.9)%20return%20false%3B%0A%20%20%20%20var%20m%20%3D%20cs.backgroundColor.match(%2Frgba%3F%5C((%5B%5E)%5D%2B)%5C)%2F)%3B%0A%20%20%20%20var%20al%20%3D%20m%20%3F%20m%5B1%5D.split(%22%2C%22)%5B3%5D%20%3A%20null%3B%0A%20%20%20%20return%20(al%20!%3D%3D%20undefined%20%26%26%20al%20!%3D%3D%20null%20%26%26%20%2Bal%20%3E%200%20%26%26%20%2Bal%20%3C%201)%20%7C%7C%20cs.backdropFilter%20!%3D%3D%20%22none%22%20%26%26%20cs.backdropFilter%20!%3D%3D%20%22%22%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20blocking(p)%20%7B%0A%20%20if%20(p.matches(%22dialog%22)%20%26%26%20p.matches(%22%3Amodal%22))%20return%20true%3B%0A%20%20if%20(p.getAttribute(%22aria-modal%22)%20%3D%3D%3D%20%22true%22)%20return%20true%3B%0A%20%20var%20r%20%3D%20p.getBoundingClientRect()%3B%0A%20%20if%20(r.width%20*%20r.height%20%3E%3D%20innerWidth%20*%20innerHeight%20*%200.5)%20return%20true%3B%0A%20%20return%20dimmed()%3B%0A%7D%0Afunction%20popupOf(el)%20%7B%0A%20%20for%20(var%20p%20%3D%20el%3B%20p%20%26%26%20p%20!%3D%3D%20document.documentElement%3B%20p%20%3D%20p.parentElement%20%7C%7C%20(p.getRootNode().host%20%7C%7C%20null))%20%7B%0A%20%20%20%20if%20(p.nodeType%20!%3D%3D%201)%20continue%3B%0A%20%20%20%20if%20(p.matches(%22dialog%5Bopen%5D%2C%5Brole%3Ddialog%5D%2C%5Brole%3Dalertdialog%5D%2C%5Baria-modal%3Dtrue%5D%22))%20return%20p%3B%0A%20%20%20%20var%20c%20%3D%20typeof%20p.className%20%3D%3D%3D%20%22string%22%20%3F%20p.className%20%3A%20%22%22%3B%0A%20%20%20%20if%20(POP.test(p.id%20%2B%20%22%20%22%20%2B%20c)%20%26%26%20getComputedStyle(p).position%20%3D%3D%3D%20%22fixed%22)%20return%20p%3B%0A%20%20%7D%0A%20%20return%20null%3B%0A%7D%0Avar%20covered%20%3D%20%5B%5D%2C%20trapped%20%3D%20%5B%5D%2C%20probHid%20%3D%20new%20Map()%3B%0Afunction%20pinOf(e)%20%7B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement%20%7C%7C%20(n.getRootNode()%20%26%26%20n.getRootNode().host))%20%7B%0A%20%20%20%20var%20pos%20%3D%20getComputedStyle(n).position%3B%0A%20%20%20%20if%20(pos%20%3D%3D%3D%20%22fixed%22%20%7C%7C%20pos%20%3D%3D%3D%20%22sticky%22)%20return%20n%3B%0A%20%20%7D%0A%20%20return%20null%3B%0A%7D%0Afunction%20hideInfo(s)%20%7B%0A%20%20var%20r%20%3D%20s.getBoundingClientRect()%3B%0A%20%20if%20(r.width%20%3C%201%20%7C%7C%20r.height%20%3C%201)%20return%20%7B%20why%3A%20%22has%20no%20size%22%20%7D%3B%0A%20%20var%20m%20%3D%20modal()%3B%0A%20%20if%20(m%20%26%26%20!within(m%2C%20s))%20return%20%7B%20why%3A%20%22is%20under%20an%20open%20modal%22%20%7D%3B%0A%20%20if%20(popupOf(s))%20return%20%7B%20why%3A%20%22is%20inside%20a%20popup%22%20%7D%3B%0A%20%20var%20pts%20%3D%20%5B%5Br.left%20%2B%20r.width%20%2F%202%2C%20r.top%20%2B%20r.height%20%2F%202%5D%2C%20%5Br.left%20%2B%201%2C%20r.top%20%2B%201%5D%2C%20%5Br.right%20-%201%2C%20r.top%20%2B%201%5D%2C%20%5Br.left%20%2B%201%2C%20r.bottom%20-%201%5D%2C%20%5Br.right%20-%201%2C%20r.bottom%20-%201%5D%5D%3B%0A%20%20var%20tested%20%3D%200%2C%20under%20%3D%200%2C%20pin%20%3D%20null%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20pts.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20px%20%3D%20pts%5Bi%5D%5B0%5D%2C%20py%20%3D%20pts%5Bi%5D%5B1%5D%3B%0A%20%20%20%20if%20(px%20%3C%200%20%7C%7C%20py%20%3C%200%20%7C%7C%20px%20%3E%3D%20innerWidth%20%7C%7C%20py%20%3E%3D%20innerHeight)%20continue%3B%0A%20%20%20%20tested%2B%2B%3B%0A%20%20%20%20var%20hit%20%3D%20null%2C%20list%20%3D%20document.elementsFromPoint(px%2C%20py)%3B%0A%20%20%20%20for%20(var%20k%20%3D%200%3B%20k%20%3C%20list.length%3B%20k%2B%2B)%20if%20(list%5Bk%5D%20!%3D%3D%20host%20%26%26%20!host.contains(list%5Bk%5D))%20%7B%20hit%20%3D%20list%5Bk%5D%3B%20break%3B%20%7D%0A%20%20%20%20if%20(!hit%20%7C%7C%20within(s%2C%20hit)%20%7C%7C%20within(hit%2C%20s))%20continue%3B%0A%20%20%20%20var%20p%20%3D%20pinOf(hit)%3B%0A%20%20%20%20if%20(!p%20%7C%7C%20within(p%2C%20s))%20continue%3B%0A%20%20%20%20under%2B%2B%3B%0A%20%20%20%20if%20(!pin)%20pin%20%3D%20p%3B%0A%20%20%7D%0A%20%20if%20(!tested)%20return%20%7B%20why%3A%20%22is%20off%20screen%22%20%7D%3B%0A%20%20return%20%7B%20tested%3A%20tested%2C%20under%3A%20under%2C%20pin%3A%20pin%20%7D%3B%0A%7D%0Afunction%20pinText(p)%20%7B%0A%20%20return%20desc(p)%20%2B%20%22%20(%22%20%2B%20getComputedStyle(p).position%20%2B%20%22%2C%20%22%20%2B%20Math.round(p.getBoundingClientRect().height)%20%2B%20%22%20px%20tall)%22%3B%0A%7D%0Avar%20moved%20%3D%20%5B%5D%2C%20movedE%20%3D%20null%3B%0Afunction%20movedLine()%20%7B%0A%20%20if%20(movedE)%20%7B%0A%20%20%20%20var%20i%20%3D%20logs.indexOf(movedE)%3B%0A%20%20%20%20if%20(i%20%3E%3D%200)%20logs.splice(i%2C%201)%3B%0A%20%20%20%20if%20(movedE.li%20%26%26%20movedE.li.parentNode)%20movedE.li.parentNode.removeChild(movedE.li)%3B%0A%20%20%20%20movedE%20%3D%20null%3B%0A%20%20%7D%0A%20%20moved%20%3D%20moved.filter(function%20(x)%20%7B%20return%20x.isConnected%3B%20%7D)%3B%0A%20%20if%20(!moved.length)%20%7B%0A%20%20%20%20if%20(logList)%20logSummary()%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20var%20nums%20%3D%20moved.map(function%20(x)%20%7B%20return%20stops.indexOf(x)%20%2B%201%3B%20%7D).filter(function%20(n)%20%7B%20return%20n%20%3E%200%3B%20%7D).sort(function%20(a%2C%20b)%20%7B%20return%20a%20-%20b%3B%20%7D)%3B%0A%20%20var%20list%20%3D%20nums.length%20%3F%20%22%3A%20%22%20%2B%20nums.slice(0%2C%2020).join(%22%2C%20%22)%20%2B%20(nums.length%20%3E%2020%20%3F%20%22%20and%20%22%20%2B%20(nums.length%20-%2020)%20%2B%20%22%20more%22%20%3A%20%22%22)%20%3A%20%22%22%3B%0A%20%20log(%22SKIPPED%22%2C%20%22Hidden%20focus%22%2C%20%5Bpl(moved.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%20not%20tested%2C%20Tab%20moved%20on%20before%20the%20page%20stopped%20scrolling%22%20%2B%20list%20%2B%20%22.%20Press%20Play%20to%20test%20them.%22%5D)%3B%0A%20%20movedE%20%3D%20logs%5Blogs.length%20-%201%5D%3B%0A%7D%0Afunction%20tested(s)%20%7B%0A%20%20var%20i%20%3D%20moved.indexOf(s)%3B%0A%20%20if%20(i%20%3C%200)%20return%3B%0A%20%20moved.splice(i%2C%201)%3B%0A%20%20movedLine()%3B%0A%7D%0Afunction%20where(s)%20%7B%0A%20%20var%20r%20%3D%20s.getBoundingClientRect()%3B%0A%20%20return%20scrollX%20%2B%20%22%2C%22%20%2B%20scrollY%20%2B%20%22%2C%22%20%2B%20r.left%20%2B%20%22%2C%22%20%2B%20r.top%3B%0A%7D%0Afunction%20check(s%2C%20then)%20%7B%0A%20%20function%20end()%20%7B%0A%20%20%20%20var%20f%20%3D%20then%3B%0A%20%20%20%20then%20%3D%20null%3B%0A%20%20%20%20if%20(f)%20f()%3B%0A%20%20%7D%0A%20%20if%20(!s)%20return%20end()%3B%0A%20%20var%20was%20%3D%20covered.indexOf(s)%20%3E%3D%200%3B%0A%20%20var%20at%20%3D%20where(s)%2C%20still%20%3D%200%2C%20tries%20%3D%200%3B%0A%20%20function%20look()%20%7B%0A%20%20%20%20if%20(closed%20%7C%7C%20(covered.indexOf(s)%20%3E%3D%200)%20!%3D%3D%20was)%20return%20end()%3B%0A%20%20%20%20var%20now%20%3D%20where(s)%3B%0A%20%20%20%20if%20(now%20!%3D%3D%20at)%20%7B%0A%20%20%20%20%20%20if%20(stops%5Bcurrent%5D%20!%3D%3D%20s)%20%7B%0A%20%20%20%20%20%20%20%20if%20(was)%20return%20end()%3B%0A%20%20%20%20%20%20%20%20if%20(moved.indexOf(s)%20%3C%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20moved.push(s)%3B%0A%20%20%20%20%20%20%20%20%20%20movedLine()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20end()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20at%20%3D%20now%3B%0A%20%20%20%20%20%20still%20%3D%200%3B%0A%20%20%20%20%7D%20else%20still%2B%2B%3B%0A%20%20%20%20if%20(still%20%3C%202%20%26%26%20%2B%2Btries%20%3C%2090)%20return%20requestAnimationFrame(look)%3B%0A%20%20%20%20var%20h%20%3D%20hideInfo(s)%3B%0A%20%20%20%20tested(s)%3B%0A%20%20%20%20hidTested.add(s)%3B%0A%20%20%20%20if%20(!h.tested)%20%7B%0A%20%20%20%20%20%20log(%22SKIPPED%22%2C%20%22Hidden%20focus%22%2C%20%5Bref(s)%2C%20%22%20%22%20%2B%20h.why%20%2B%20%22.%20Not%20tested.%22%5D)%3B%0A%20%20%20%20%20%20return%20end()%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(was%20%26%26%20h.under%20%3E%3D%20h.tested)%20%7B%0A%20%20%20%20%20%20log(%22INFO%22%2C%20%22Hidden%20focus%22%2C%20%5Bref(s)%2C%20%22%20is%20already%20listed%20as%20hidden.%22%5D)%3B%0A%20%20%20%20%20%20return%20end()%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(was)%20%7B%0A%20%20%20%20%20%20covered.splice(covered.indexOf(s)%2C%201)%3B%0A%20%20%20%20%20%20var%20pe%20%3D%20probHid.get(s)%3B%0A%20%20%20%20%20%20if%20(pe)%20pe.fixed%20%3D%20true%3B%0A%20%20%20%20%20%20probHid.delete(s)%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20end()%3B%0A%20%20%20%20%20%20return%20log(%22OK%22%2C%20%22Hidden%20focus%22%2C%20h.under%20%3F%20%5Bref(s)%2C%20%22%20is%20not%20hidden%20anymore%3A%20it%20is%20partly%20covered%20by%20%22%20%2B%20pinText(h.pin)%20%2B%20%22%2C%20%22%20%2B%20(h.tested%20-%20h.under)%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%20That%20passes%20AA%202.4.11%3B%20AAA%202.4.12%20needs%20it%20fully%20visible.%22%5D%20%3A%20%5Bref(s)%2C%20%22%20is%20not%20hidden%20anymore%2C%20%22%20%2B%20h.tested%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(h.under%20%3C%20h.tested)%20%7B%0A%20%20%20%20%20%20end()%3B%0A%20%20%20%20%20%20return%20log(%22OK%22%2C%20%22Hidden%20focus%22%2C%20h.under%20%3F%20%5Bref(s)%2C%20%22%20is%20partly%20covered%20by%20%22%20%2B%20pinText(h.pin)%20%2B%20%22%2C%20%22%20%2B%20(h.tested%20-%20h.under)%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%20That%20passes%20AA%202.4.11%3B%20AAA%202.4.12%20needs%20it%20fully%20visible.%22%5D%20%3A%20%5Bref(s)%2C%20%22%20is%20in%20view%2C%20%22%20%2B%20h.tested%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20covered.push(s)%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20announce(%22Hidden%20focus%3A%20stop%20%22%20%2B%20(stops.indexOf(s)%20%2B%201)%20%2B%20%22%2C%20%22%20%2B%20label(s)%20%2B%20%22%2C%20is%20covered.%22)%3B%0A%20%20%20%20var%20pr%20%3D%20h.pin.getBoundingClientRect()%2C%20up%20%3D%20pr.top%20%2B%20pr.height%20%2F%202%20%3C%20innerHeight%20%2F%202%2C%20ph%20%3D%20Math.round(pr.height)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Hidden%20focus%22%2C%20%5Bref(s)%2C%20%22%3A%20all%20%22%20%2B%20h.tested%20%2B%20%22%20points%20are%20under%20%22%20%2B%20pinText(h.pin)%20%2B%20%22.%22%5D%2C%20aiOf(W_HIDE%2C%20%22When%20the%20element%20gets%20keyboard%20focus%2C%20at%20least%20part%20of%20it%20stays%20visible%2C%20not%20covered%20by%20%22%20%2B%20desc(h.pin)%20%2B%20%22.%22%2C%20%22Add%20html%20%7B%20scroll-padding-%22%20%2B%20(up%20%3F%20%22top%22%20%3A%20%22bottom%22)%20%2B%20%22%3A%20%22%20%2B%20(ph%20%2B%208)%20%2B%20%22px%3B%20%7D%20so%20the%20browser%20scrolls%20focused%20elements%20clear%20of%20the%20%22%20%2B%20(up%20%3F%20%22top%22%20%3A%20%22bottom%22)%20%2B%20%22%20bar%20(%22%20%2B%20ph%20%2B%20%22%20px%20tall%2C%20plus%208%20px%20of%20room).%22%2C%20%5B%5B%22Element%22%2C%20s%5D%2C%20%5B%22Covered%20by%22%2C%20h.pin%5D%5D%2C%20%5B%22Measured%3A%20%22%20%2B%20desc(h.pin)%20%2B%20%22%20is%20%22%20%2B%20getComputedStyle(h.pin).position%20%2B%20%22%2C%20%22%20%2B%20ph%20%2B%20%22%20px%20tall%2C%20at%20the%20%22%20%2B%20(up%20%3F%20%22top%22%20%3A%20%22bottom%22)%20%2B%20%22%20of%20a%20%22%20%2B%20innerHeight%20%2B%20%22%20px%20tall%20window.%22%5D))%3B%0A%20%20%20%20probHid.set(s%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20end()%3B%0A%20%20%7D%0A%20%20requestAnimationFrame(look)%3B%0A%7D%0Avar%20popInfo%20%3D%20null%2C%20lostPops%20%3D%20%5B%5D%2C%20openPop%20%3D%20null%2C%20opener%20%3D%20null%2C%20lastOut%20%3D%20null%2C%20tapIn%20%3D%20null%2C%20tapT%20%3D%200%2C%20lastKey%20%3D%20%22%22%2C%20keyT%20%3D%200%2C%20keyOn%20%3D%20null%3B%0Afunction%20deep()%20%7B%0A%20%20var%20a%20%3D%20document.activeElement%3B%0A%20%20while%20(a%20%26%26%20a.shadowRoot%20%26%26%20a.shadowRoot.activeElement)%20a%20%3D%20a.shadowRoot.activeElement%3B%0A%20%20return%20a%3B%0A%7D%0Afunction%20gone(p)%20%7B%20return%20!p.isConnected%20%7C%7C%20!shown(p)%20%7C%7C%20(p.matches(%22dialog%22)%20%26%26%20!p.open)%3B%20%7D%0Afunction%20closedBy(p)%20%7B%0A%20%20var%20now%20%3D%20Date.now()%3B%0A%20%20if%20(tapIn%20%26%26%20now%20-%20tapT%20%3C%20600%20%26%26%20within(p%2C%20tapIn))%20%7B%0A%20%20%20%20var%20b%20%3D%20tapIn.closest%20%3F%20tapIn.closest(%22button%2Ca%2C%5Brole%3Dbutton%5D%22)%20%3A%20null%3B%0A%20%20%20%20return%20b%20%3F%20%22%20with%20%5C%22%22%20%2B%20label(b)%20%2B%20%22%5C%22%22%20%3A%20%22%20with%20a%20click%22%3B%0A%20%20%7D%0A%20%20if%20(keyT%20%26%26%20now%20-%20keyT%20%3C%20600)%20%7B%0A%20%20%20%20if%20(lastKey%20%3D%3D%3D%20%22Escape%22)%20return%20%22%20with%20Escape%22%3B%0A%20%20%20%20if%20(lastKey%20%3D%3D%3D%20%22Enter%22%20%7C%7C%20lastKey%20%3D%3D%3D%20%22%20%22)%20return%20%22%20with%20%22%20%2B%20(lastKey%20%3D%3D%3D%20%22%20%22%20%3F%20%22Space%22%20%3A%20%22Enter%22)%20%2B%20(keyOn%20%26%26%20keyOn.nodeType%20%3D%3D%3D%201%20%26%26%20keyOn%20!%3D%3D%20document.body%20%26%26%20keyOn%20!%3D%3D%20document.documentElement%20%3F%20%22%20on%20%5C%22%22%20%2B%20label(keyOn)%20%2B%20%22%5C%22%22%20%3A%20%22%22)%3B%0A%20%20%7D%0A%20%20return%20%22%22%3B%0A%7D%0Afunction%20popClosed()%20%7B%0A%20%20var%20p%20%3D%20openPop%2C%20from%20%3D%20opener%2C%20pn%20%3D%20popName(p)%2C%20by%20%3D%20closedBy(p)%2C%20pi%20%3D%20popInfo%3B%0A%20%20openPop%20%3D%20null%3B%0A%20%20if%20(!from)%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20It%20opened%20on%20its%20own%2C%20so%20there%20is%20no%20button%20to%20go%20back%20to.%22%5D)%3B%0A%20%20if%20(!from.isConnected%20%7C%7C%20!shown(from))%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20The%20button%20that%20opened%20it%20is%20gone%20or%20hidden.%22%5D)%3B%0A%20%20if%20(lostPops.some(function%20(l)%20%7B%20return%20l%5B0%5D%20%3D%3D%3D%20from%3B%20%7D))%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Already%20listed.%22%5D)%3B%0A%20%20if%20(tapIn%20%26%26%20Date.now()%20-%20tapT%20%3C%20600%20%26%26%20!within(p%2C%20tapIn))%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%20by%20a%20click%20outside%20it.%20Not%20judged.%22%5D)%3B%0A%20%20var%20frames%20%3D%200%3B%0A%20%20function%20look()%20%7B%0A%20%20%20%20if%20(closed)%20return%3B%0A%20%20%20%20var%20a%20%3D%20deep()%3B%0A%20%20%20%20if%20(a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement%20%26%26%20!within(p%2C%20a)%20%26%26%20shown(a))%20%7B%0A%20%20%20%20%20%20if%20(a%20%3D%3D%3D%20from)%20return%20log(%22OK%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Focus%20went%20back%20to%20%22%2C%20ref(from)%2C%20%22.%22%5D)%3B%0A%20%20%20%20%20%20return%20log(%22OK%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Focus%20went%20to%20%22%2C%20ref(a)%2C%20%22%2C%20not%20to%20the%20button%20that%20opened%20it%2C%20%22%2C%20ref(from)%2C%20%22.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(%2B%2Bframes%20%3C%2030)%20return%20requestAnimationFrame(look)%3B%0A%20%20%20%20if%20(lostPops.some(function%20(l)%20%7B%20return%20l%5B0%5D%20%3D%3D%3D%20from%3B%20%7D))%20return%3B%0A%20%20%20%20lostPops.push(%5Bfrom%2C%20p%5D)%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20announce(%22Lost%20focus%3A%20%22%20%2B%20pn.l%20%2B%20%22%20closed%20and%20focus%20fell%20to%20the%20page%20body.%22)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Focus%20fell%20to%20the%20page%20body%20instead%20of%20going%20back%20to%20%22%2C%20ref(from)%2C%20%22.%22%5D%2C%20aiOf(W_ORDER%2C%20%22When%20the%20popup%20closes%2C%20focus%20goes%20back%20to%20the%20element%20that%20opened%20it%2C%20so%20a%20keyboard%20user%20carries%20on%20from%20there.%22%2C%20%22Before%20the%20popup%20opens%2C%20store%20document.activeElement.%20After%20it%20closes%2C%20call%20.focus()%20on%20that%20element.%20A%20%3Cdialog%3E%20opened%20with%20showModal()%20and%20closed%20with%20close()%20does%20this%20by%20itself%2C%20so%20if%20this%20one%20is%20a%20%3Cdialog%3E%2C%20look%20for%20code%20that%20calls%20blur()%20or%20.focus()%20on%20something%20else%20after%20it%20closes.%22%2C%20%5B%5B%22Popup%22%2C%20p%2C%20pi%5D%2C%20%5B%22Opened%20by%22%2C%20from%5D%5D))%3B%0A%20%20%7D%0A%20%20requestAnimationFrame(look)%3B%0A%7D%0Afunction%20track(a)%20%7B%0A%20%20if%20(openPop%20%26%26%20gone(openPop))%20popClosed()%3B%0A%20%20if%20(!a%20%7C%7C%20a%20%3D%3D%3D%20document.body%20%7C%7C%20a%20%3D%3D%3D%20document.documentElement%20%7C%7C%20a%20%3D%3D%3D%20host%20%7C%7C%20a.getRootNode()%20%3D%3D%3D%20root)%20return%3B%0A%20%20var%20p%20%3D%20popupOf(a)%3B%0A%20%20if%20(!p)%20%7B%0A%20%20%20%20lastOut%20%3D%20a%3B%0A%20%20%20%20openPop%20%3D%20null%3B%0A%20%20%7D%20else%20if%20(!openPop)%20%7B%0A%20%20%20%20openPop%20%3D%20p%3B%0A%20%20%20%20opener%20%3D%20lastOut%3B%0A%20%20%20%20popInfo%20%3D%20%7B%20sel%3A%20sel(p)%2C%20html%3A%20snip(p)%20%7D%3B%0A%20%20%7D%0A%7D%0Afunction%20tap(e)%20%7B%0A%20%20tapIn%20%3D%20e.composedPath%20%3F%20e.composedPath()%5B0%5D%20%3A%20e.target%3B%0A%20%20tapT%20%3D%20Date.now()%3B%0A%7D%0Afunction%20stopGo(e)%20%7B%0A%20%20e.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%0A%20%20current%20%3D%20stops.indexOf(e)%3B%0A%20%20queue()%3B%0A%7D%0Afunction%20stopName(e)%20%7B%0A%20%20var%20i%20%3D%20stops.indexOf(e)%3B%0A%20%20return%20(i%20%3E%3D%200%20%3F%20i%20%2B%201%20%3A%20%22%3F%22)%20%2B%20%22%3A%20%22%20%2B%20label(e)%3B%0A%7D%0Afunction%20byStop(list)%20%7B%20return%20list.slice().sort(function%20(a%2C%20b)%20%7B%20return%20stops.indexOf(a)%20-%20stops.indexOf(b)%3B%20%7D)%3B%20%7D%0Afunction%20renderJumps()%20%7B%0A%20%20while%20(jumpBox.firstChild)%20jumpBox.removeChild(jumpBox.firstChild)%3B%0A%20%20if%20(macNote)%20%7B%0A%20%20%20%20var%20mn%20%3D%20document.createElement(%22p%22)%3B%0A%20%20%20%20mn.className%20%3D%20%22mn%22%3B%0A%20%20%20%20mn.textContent%20%3D%20MAC_NOTE%3B%0A%20%20%20%20jumpBox.appendChild(mn)%3B%0A%20%20%7D%0A%20%20if%20(popMissed)%20%7B%0A%20%20%20%20count(1%2C%20%22%20popup%20blocks%20the%20page%2C%20but%20Tab%20goes%20somewhere%20else%20first%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20%5BpopMissed%5D%2C%20function%20()%20%7B%20return%20%22Show%20the%20popup%22%3B%20%7D%2C%20function%20(m)%20%7B%20m.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(covered.length)%20%7B%0A%20%20%20%20count(covered.length%2C%20covered.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20is%20hidden%20when%20Tab%20reaches%20it%22%20%3A%20%22%20stops%20are%20hidden%20when%20Tab%20reaches%20them%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20byStop(covered)%2C%20stopName%2C%20stopGo)%3B%0A%20%20%7D%0A%20%20if%20(trapped.length)%20%7B%0A%20%20%20%20count(trapped.length%2C%20trapped.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20where%20Tab%20gets%20stuck%22%20%3A%20%22%20stops%20where%20Tab%20gets%20stuck%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20byStop(trapped)%2C%20stopName%2C%20stopGo)%3B%0A%20%20%7D%0A%20%20if%20(lostPops.length)%20%7B%0A%20%20%20%20count(lostPops.length%2C%20lostPops.length%20%3D%3D%3D%201%20%3F%20%22%20popup%20loses%20focus%20when%20it%20closes%22%20%3A%20%22%20popups%20lose%20focus%20when%20they%20close%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20lostPops%2C%20function%20(l)%20%7B%0A%20%20%20%20%20%20var%20i%20%3D%20stops.indexOf(l%5B0%5D)%3B%0A%20%20%20%20%20%20return%20(i%20%3E%3D%200%20%3F%20i%20%2B%201%20%3A%20label(l%5B0%5D))%20%2B%20%22%20%5Cu2192%20Start%22%3B%0A%20%20%20%20%7D%2C%20function%20(l)%20%7B%20stopGo(l%5B0%5D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(jumps.length)%20%7B%0A%20%20%20%20count(jumps.length%2C%20jumps.length%20%3D%3D%3D%201%20%3F%20%22%20time%20Tab%20jumped%20out%20of%20order%22%20%3A%20%22%20times%20Tab%20jumped%20out%20of%20order%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20jumps%2C%20function%20(j)%20%7B%0A%20%20%20%20%20%20var%20from%20%3D%20j%5B0%5D%20%3F%20stops.indexOf(j%5B0%5D)%20%2B%201%20%7C%7C%20label(j%5B0%5D)%20%3A%20%22Start%22%2C%20to%20%3D%20stops.indexOf(j%5B1%5D)%20%2B%201%3B%0A%20%20%20%20%20%20return%20from%20%2B%20%22%20%5Cu2192%20%22%20%2B%20(to%20%7C%7C%20%22%3F%22)%3B%0A%20%20%20%20%7D%2C%20function%20(j)%20%7B%20stopGo(j%5B1%5D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(skip)%20skipPanel()%3B%0A%7D%0Avar%20legend%20%3D%20document.createElement(%22div%22)%3B%0Alegend.className%20%3D%20%22so%22%3B%0Alegend.hidden%20%3D%20true%3B%0Alegend.appendChild(line(%22k%22%2C%20null%2C%20%22The%20order%20Tab%20visits%22%2C%20%22d%22))%3B%0Alegend.appendChild(line(%22k%22%2C%20null%2C%20%22Hidden%20until%20Tab%20reaches%20it%22%2C%20%22h%22))%3B%0Alegend.appendChild(line(%22k%22%2C%20null%2C%20%22Tab%20can't%20reach%20or%20see%20it%22%2C%20%22r%22))%3B%0Avar%20tray%20%3D%20document.createElement(%22div%22)%3B%0Atray.className%20%3D%20%22tr%22%3B%0Apanel.appendChild(tray)%3B%0Avar%20gear%20%3D%20document.createElement(%22button%22)%3B%0Agear.className%20%3D%20%22sg%22%3B%0Agear.type%20%3D%20%22button%22%3B%0Agear.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Avar%20gearIcon%20%3D%20icon(gear%2C%2016%2C%20%22M8%201.5v2M8%2012.5v2M1.5%208h2M12.5%208h2M3.4%203.4l1.4%201.4M11.2%2011.2l1.4%201.4M3.4%2012.6l1.4-1.4M11.2%204.8l1.4-1.4%22%2C%201.6)%3B%0Ael(%22circle%22%2C%20%7B%20cx%3A%208%2C%20cy%3A%208%2C%20r%3A%202.2%20%7D%2C%20gearIcon)%3B%0Agear.appendChild(document.createTextNode(%22Settings%22))%3B%0Agear.appendChild(document.createElement(%22i%22))%3B%0Atray.appendChild(gear)%3B%0Avar%20settings%20%3D%20document.createElement(%22div%22)%3B%0Asettings.className%20%3D%20%22so%22%3B%0Asettings.hidden%20%3D%20true%3B%0Atray.appendChild(settings)%3B%0Agear.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20settings.hidden%20%3D%20!settings.hidden%3B%0A%20%20gear.setAttribute(%22aria-expanded%22%2C%20settings.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%7D)%3B%0Avar%20skipBox%20%3D%20document.createElement(%22label%22)%3B%0AskipBox.className%20%3D%20%22k%20s%22%3B%0Avar%20skip%20%3D%20document.createElement(%22input%22)%3B%0Askip.type%20%3D%20%22checkbox%22%3B%0Askip.checked%20%3D%20true%3B%0AskipBox.appendChild(skip)%3B%0AskipBox.appendChild(document.createTextNode(%22Leave%20this%20panel%20out%20of%20Tab%22))%3B%0Asettings.appendChild(skipBox)%3B%0Avar%20tightBox%20%3D%20document.createElement(%22label%22)%3B%0AtightBox.className%20%3D%20%22k%20s%22%3B%0Avar%20tight%20%3D%20document.createElement(%22input%22)%3B%0Atight.type%20%3D%20%22checkbox%22%3B%0Atight.checked%20%3D%20true%3B%0AtightBox.appendChild(tight)%3B%0AtightBox.appendChild(document.createTextNode(%22Compact%20view%22))%3B%0Asettings.appendChild(tightBox)%3B%0Atight.addEventListener(%22change%22%2C%20function%20()%20%7B%20panel.classList.toggle(%22rm%22%2C%20!tight.checked)%3B%20%7D)%3B%0Avar%20chunkBox%20%3D%20document.createElement(%22label%22)%3B%0AchunkBox.className%20%3D%20%22k%20s%22%3B%0Avar%20chunk%20%3D%20document.createElement(%22input%22)%3B%0Achunk.type%20%3D%20%22checkbox%22%3B%0Achunk.checked%20%3D%20true%3B%0AchunkBox.appendChild(chunk)%3B%0AchunkBox.appendChild(document.createTextNode(%22Show%20%22%20%2B%20PAGE%20%2B%20%22%20stops%20at%20a%20time%22))%3B%0Agroup.appendChild(chunkBox)%3B%0Avar%20shortBox%20%3D%20document.createElement(%22label%22)%3B%0AshortBox.className%20%3D%20%22k%20s%22%3B%0Avar%20stub%20%3D%20document.createElement(%22input%22)%3B%0Astub.type%20%3D%20%22checkbox%22%3B%0Astub.checked%20%3D%20true%3B%0AshortBox.appendChild(stub)%3B%0AshortBox.appendChild(document.createTextNode(%22Long%20lines%22))%3B%0Asettings.insertBefore(shortBox%2C%20skipBox)%3B%0Avar%20lineBox%20%3D%20document.createElement(%22label%22)%3B%0AlineBox.className%20%3D%20%22k%20s%22%3B%0Avar%20lines%20%3D%20document.createElement(%22input%22)%3B%0Alines.type%20%3D%20%22checkbox%22%3B%0Alines.checked%20%3D%20true%3B%0AlineBox.appendChild(lines)%3B%0AlineBox.appendChild(document.createTextNode(%22Show%20lines%22))%3B%0Asettings.insertBefore(lineBox%2C%20shortBox)%3B%0Alines.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20stub.disabled%20%3D%20!lines.checked%3B%0A%20%20shortBox.classList.toggle(%22off%22%2C%20!lines.checked)%3B%0A%20%20queue()%3B%0A%7D)%3B%0Astub.addEventListener(%22change%22%2C%20function%20()%20%7B%20queue()%3B%20%7D)%3B%0Avar%20spotBox%20%3D%20document.createElement(%22label%22)%3B%0AspotBox.className%20%3D%20%22k%20s%22%3B%0Avar%20light%20%3D%20document.createElement(%22input%22)%3B%0Alight.type%20%3D%20%22checkbox%22%3B%0AspotBox.appendChild(light)%3B%0AspotBox.appendChild(document.createTextNode(%22Spotlight%22))%3B%0Asettings.insertBefore(spotBox%2C%20settings.firstChild)%3B%0Alight.addEventListener(%22change%22%2C%20function%20()%20%7B%20queue()%3B%20%7D)%3B%0Achunk.addEventListener(%22change%22%2C%20function%20()%20%7B%20queue()%3B%20%7D)%3B%0Afunction%20paged()%20%7B%20return%20chunk.checked%20%26%26%20stops.length%20%3E%20PAGE%3B%20%7D%0Afunction%20outT()%20%7B%20return%20skip.checked%20%26%26%20!panelIn%20%3F%20-1%20%3A%200%3B%20%7D%0Afunction%20skipPanel()%20%7B%0A%20%20panel.tabIndex%20%3D%20outT()%3B%0A%20%20panel.querySelectorAll(%22button%2Ca%2Cinput%22).forEach(function%20(e)%20%7B%20e.tabIndex%20%3D%20e.className%20%3D%3D%3D%20%22lc%22%20%3F%20(panelIn%20%3F%200%20%3A%20-1)%20%3A%20outT()%3B%20%7D)%3B%0A%7D%0Askip.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20skipPanel()%3B%0A%20%20svg.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20svgPg.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20dot.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20dotPg.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20rescan()%3B%0A%7D)%3B%0Avar%20a%20%3D%20document.createElement(%22a%22)%3B%0Aa.className%20%3D%20%22a%22%3B%0Aa.href%20%3D%20%22https%3A%2F%2Fmatjazkorosec.com%2Ftools%2Ftab-trail%22%3B%0Aa.target%20%3D%20%22_blank%22%3B%0Aa.rel%20%3D%20%22noopener%22%3B%0Aa.textContent%20%3D%20%22matjazkorosec.com%2Ftools%2Ftab-trail%22%3B%0Avar%20how%20%3D%20document.createElement(%22p%22)%3B%0Ahow.className%20%3D%20%22hw%22%3B%0Avar%20MAC%20%3D%20%2FMac%2F.test(navigator.platform%20%7C%7C%20navigator.userAgent)%3B%0Avar%20KEYS%20%3D%20%22Ctrl%2BShift%2BF%22%3B%0Avar%20ver%20%3D%20document.createElement(%22span%22)%3B%0Aver.className%20%3D%20%22vr%22%3B%0Aver.textContent%20%3D%20%22v%22%20%2B%20VERSION%3B%0Ahow.appendChild(ver)%3B%0Ahow.appendChild(document.createTextNode(%22How%20to%20use%20%26%20latest%20version%3A%20%22))%3B%0Ahow.appendChild(a)%3B%0Avar%20keysBtn%20%3D%20document.createElement(%22button%22)%3B%0AkeysBtn.className%20%3D%20%22sg%22%3B%0AkeysBtn.type%20%3D%20%22button%22%3B%0AkeysBtn.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Aicon(keysBtn%2C%2016%2C%20%22M1.5%204.5h13v7h-13zM4%207h1M7.5%207h1M11%207h1M5%209.5h6%22%2C%201.6)%3B%0AkeysBtn.appendChild(document.createTextNode(%22Shortcuts%22))%3B%0AkeysBtn.appendChild(document.createElement(%22i%22))%3B%0Atray.insertBefore(keysBtn%2C%20gear)%3B%0Avar%20keysBox%20%3D%20document.createElement(%22div%22)%3B%0AkeysBox.className%20%3D%20%22so%22%3B%0AkeysBox.hidden%20%3D%20true%3B%0Atray.insertBefore(keysBox%2C%20gear)%3B%0A%5B%5BKEYS%20%2B%20%22%3A%22%2C%20%22%20into%20this%20panel%22%5D%2C%20%5B%22Escape%3A%22%2C%20%22%20back%20to%20the%20page%22%5D%2C%20%5B%22Tab%2C%20Shift%2BTab%3A%22%2C%20%22%20along%20the%20trail%22%5D%2C%20%5B%22Space%20or%20Escape%3A%22%2C%20%22%20pause%20Play%22%5D%5D.forEach(function%20(k)%20%7B%0A%20%20keysBox.appendChild(line(%22k%22%2C%20k%5B0%5D%2C%20k%5B1%5D))%3B%0A%7D)%3B%0AkeysBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20keysBox.hidden%20%3D%20!keysBox.hidden%3B%0A%20%20keysBtn.setAttribute(%22aria-expanded%22%2C%20keysBox.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%7D)%3B%0Avar%20legendBtn%20%3D%20document.createElement(%22button%22)%3B%0AlegendBtn.className%20%3D%20%22sg%22%3B%0AlegendBtn.type%20%3D%20%22button%22%3B%0AlegendBtn.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Aicon(legendBtn%2C%2016%2C%20%22M3%204h1M6.5%204H13M3%208h1M6.5%208H13M3%2012h1M6.5%2012H13%22%2C%201.6)%3B%0AlegendBtn.appendChild(document.createTextNode(%22Legend%22))%3B%0AlegendBtn.appendChild(document.createElement(%22i%22))%3B%0Atray.insertBefore(legendBtn%2C%20keysBtn)%3B%0Atray.insertBefore(legend%2C%20keysBtn)%3B%0AlegendBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20legend.hidden%20%3D%20!legend.hidden%3B%0A%20%20legendBtn.setAttribute(%22aria-expanded%22%2C%20legend.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%7D)%3B%0Atray.appendChild(how)%3B%0Avar%20logs%20%3D%20%5B%5D%2C%20logFilter%20%3D%20%22all%22%2C%20logOpen%20%3D%20false%2C%20LOG_MAX%20%3D%20500%2C%20showWcag%20%3D%20false%2C%20wcagBoxes%20%3D%20%5B%5D%3B%0Afunction%20wcagBox(parent%2C%20doc)%20%7B%0A%20%20var%20lb%20%3D%20doc.createElement(%22label%22)%3B%0A%20%20lb.className%20%3D%20%22lw%22%3B%0A%20%20var%20cb%20%3D%20doc.createElement(%22input%22)%3B%0A%20%20cb.type%20%3D%20%22checkbox%22%3B%0A%20%20cb.checked%20%3D%20showWcag%3B%0A%20%20cb.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20%20%20showWcag%20%3D%20cb.checked%3B%0A%20%20%20%20wcagSync()%3B%0A%20%20%7D)%3B%0A%20%20lb.appendChild(cb)%3B%0A%20%20lb.appendChild(doc.createTextNode(%22Show%20WCAG%22))%3B%0A%20%20parent.appendChild(lb)%3B%0A%20%20wcagBoxes.push(cb)%3B%0A%20%20return%20cb%3B%0A%7D%0Afunction%20wcagSync()%20%7B%0A%20%20wcagBoxes.forEach(function%20(b)%20%7B%20b.checked%20%3D%20showWcag%3B%20%7D)%3B%0A%20%20logGroup.classList.toggle(%22nw%22%2C%20!showWcag)%3B%0A%20%20if%20(tabOpen())%20logTab.document.body.classList.toggle(%22nw%22%2C%20!showWcag)%3B%0A%7D%0Avar%20lastStops%20%3D%20-1%2C%20lastMissed%20%3D%20-1%2C%20lastForced%20%3D%20-1%2C%20probMiss%20%3D%20new%20Map()%2C%20probHov%20%3D%20new%20Map()%2C%20probForce%20%3D%20new%20Map()%2C%20seenForce%20%3D%20new%20WeakSet()%2C%20seenOk%20%3D%20new%20WeakSet()%2C%20seenCss%20%3D%20new%20Set()%3B%0Avar%20RES%20%3D%20%7B%20OK%3A%20%22ok%22%2C%20PROBLEM%3A%20%22bad%22%2C%20SKIPPED%3A%20%22skip%22%2C%20INFO%3A%20%22info%22%20%7D%3B%0Avar%20FILT%20%3D%20%5B%5B%22all%22%2C%20%22All%22%5D%2C%20%5B%22bad%22%2C%20%22Problems%22%5D%2C%20%5B%22ok%22%2C%20%22OK%22%5D%2C%20%5B%22skip%22%2C%20%22Skipped%22%5D%5D%3B%0Avar%20tabChecked%20%3D%20null%2C%20filterSets%20%3D%20%5B%5D%2C%20logTab%20%3D%20null%2C%20tabList%20%3D%20null%2C%20tabSum%20%3D%20null%2C%20tabSet%20%3D%20null%2C%20tabNote%20%3D%20null%2C%20tabPoll%20%3D%200%3B%0Afunction%20pl(n%2C%20one%2C%20many)%20%7B%20return%20n%20%2B%20%22%20%22%20%2B%20(n%20%3D%3D%3D%201%20%3F%20one%20%3A%20many)%3B%20%7D%0Afunction%20desc(e)%20%7B%0A%20%20var%20t%20%3D%20e.tagName.toLowerCase()%3B%0A%20%20if%20(e.id)%20return%20t%20%2B%20%22%23%22%20%2B%20scrub(e.id)%3B%0A%20%20var%20c%20%3D%20typeof%20e.className%20%3D%3D%3D%20%22string%22%20%3F%20e.className.trim().split(%2F%5Cs%2B%2F).filter(Boolean).slice(0%2C%202)%20%3A%20%5B%5D%3B%0A%20%20return%20c.length%20%3F%20t%20%2B%20%22.%22%20%2B%20scrub(c.join(%22.%22))%20%3A%20t%3B%0A%7D%0Afunction%20ref(e)%20%7B%20return%20%7B%20el%3A%20e%2C%20n%3A%20stops.indexOf(e)%20%2B%201%2C%20l%3A%20label(e)%2C%20d%3A%20desc(e)%20%7D%3B%20%7D%0Afunction%20popName(p)%20%7B%0A%20%20var%20n%20%3D%20p.getAttribute(%22aria-label%22)%20%7C%7C%20%22%22%2C%20by%20%3D%20p.getAttribute(%22aria-labelledby%22)%3B%0A%20%20if%20(!n%20%26%26%20by)%20%7B%0A%20%20%20%20var%20t%20%3D%20document.getElementById(by.split(%2F%5Cs%2B%2F)%5B0%5D)%3B%0A%20%20%20%20if%20(t)%20n%20%3D%20t.textContent%20%7C%7C%20%22%22%3B%0A%20%20%7D%0A%20%20if%20(!n)%20%7B%0A%20%20%20%20var%20h%20%3D%20p.querySelector(%22h1%2Ch2%2Ch3%2Ch4%2Clegend%22)%3B%0A%20%20%20%20if%20(h)%20n%20%3D%20h.textContent%20%7C%7C%20%22%22%3B%0A%20%20%7D%0A%20%20n%20%3D%20scrub(n).trim().replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22)%3B%0A%20%20if%20(n.length%20%3E%2028)%20n%20%3D%20n.slice(0%2C%2027)%20%2B%20%22...%22%3B%0A%20%20return%20%7B%20el%3A%20p%2C%20n%3A%200%2C%20l%3A%20n%20%7C%7C%20label(p)%2C%20d%3A%20desc(p)%20%7D%3B%0A%7D%0Afunction%20partText(x)%20%7B%20return%20typeof%20x%20%3D%3D%3D%20%22string%22%20%3F%20x%20%3A%20x.n%20%3F%20x.n%20%2B%20%22%20%5C%22%22%20%2B%20x.l%20%2B%20%22%5C%22%22%20%3A%20%22%5C%22%22%20%2B%20x.l%20%2B%20%22%5C%22%20%22%20%2B%20x.d%3B%20%7D%0Afunction%20looksWhy(m)%20%7B%0A%20%20var%20why%20%3D%20%5B%5D%2C%20role%20%3D%20m.getAttribute(%22role%22)%20%7C%7C%20%22%22%3B%0A%20%20if%20(m.tagName%20%3D%3D%3D%20%22A%22%20%26%26%20!m.hasAttribute(%22href%22))%20why.push(%22a%20link%20with%20no%20address%22)%3B%0A%20%20if%20(m.hasAttribute(%22onclick%22))%20why.push(%22a%20click%20handler%20in%20the%20HTML%22)%3B%0A%20%20if%20(ROLES.test(role))%20why.push(%22role%3D%5C%22%22%20%2B%20role%20%2B%20%22%5C%22%22)%3B%0A%20%20if%20(getComputedStyle(m).cursor%20%3D%3D%3D%20%22pointer%22)%20why.push(%22a%20pointer%20cursor%22)%3B%0A%20%20return%20why.length%20%3F%20%22has%20%22%20%2B%20why.join(%22%2C%20%22)%20%3A%20%22looks%20clickable%22%3B%0A%7D%0Afunction%20addr()%20%7B%20return%20location.protocol%20%2B%20%22%2F%2F%22%20%2B%20location.host%20%2B%20cleanUrl(location.pathname)%3B%20%7D%0Afunction%20two(n)%20%7B%20return%20(n%20%3C%2010%20%3F%20%220%22%20%3A%20%22%22)%20%2B%20n%3B%20%7D%0Afunction%20clock(t)%20%7B%20return%20two(t.getHours())%20%2B%20%22%3A%22%20%2B%20two(t.getMinutes())%20%2B%20%22%3A%22%20%2B%20two(t.getSeconds())%3B%20%7D%0Afunction%20browser()%20%7B%0A%20%20var%20u%20%3D%20navigator.userAgent%2C%20m%3B%0A%20%20if%20((m%20%3D%20u.match(%2FEdg%5C%2F(%5Cd%2B)%2F)))%20return%20%22Edge%20%22%20%2B%20m%5B1%5D%3B%0A%20%20if%20((m%20%3D%20u.match(%2FFirefox%5C%2F(%5Cd%2B)%2F)))%20return%20%22Firefox%20%22%20%2B%20m%5B1%5D%3B%0A%20%20if%20((m%20%3D%20u.match(%2FChrome%5C%2F(%5Cd%2B)%2F)))%20return%20%22Chrome%20%22%20%2B%20m%5B1%5D%3B%0A%20%20if%20((m%20%3D%20u.match(%2FVersion%5C%2F(%5Cd%2B)%5B%5E%20%5D*%20(Mobile%5C%2F%5CS%2B%20)%3FSafari%2F)))%20return%20%22Safari%20%22%20%2B%20m%5B1%5D%3B%0A%20%20return%20u%3B%0A%7D%0Avar%20CHECKS%20%3D%20%5B%22Missed%20spots%22%2C%20%22Hover%20menus%22%2C%20%22Forced%20order%22%2C%20%22Out%20of%20order%22%2C%20%22Keyboard%20trap%22%2C%20%22Hidden%20focus%22%2C%20%22Lost%20focus%22%5D%3B%0Avar%20WCAG%20%3D%20%7B%20%22Missed%20spots%22%3A%20%222.1.1%20A%22%2C%20%22Hover%20menus%22%3A%20%222.1.1%20A%22%2C%20%22Out%20of%20order%22%3A%20%222.4.3%20A%22%2C%20%22Forced%20order%22%3A%20%222.4.3%20A%22%2C%20%22Keyboard%20trap%22%3A%20%222.1.2%20A%22%2C%20%22Lost%20focus%22%3A%20%222.4.3%20A%22%2C%20%22Hidden%20focus%22%3A%20%222.4.11%20AA%22%20%7D%3B%0Afunction%20showUrl(f)%20%7B%20return%20%22https%3A%2F%2Fmatjazkorosec.com%2Ftools%2Ftab-trail%23show-%22%20%2B%20f.toLowerCase().replace(%2F%5B%5Ea-z0-9%5D%2B%2Fg%2C%20%22-%22).replace(%2F%5E-%7C-%24%2Fg%2C%20%22%22)%3B%20%7D%0Afunction%20ranChecks()%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20if%20(e.k%20!%3D%3D%20%22INFO%22%20%26%26%20CHECKS.indexOf(e.f)%20%3E%3D%200%20%26%26%20out.indexOf(e.f)%20%3C%200)%20out.push(e.f)%3B%20%7D)%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20checkedKey%20%3D%20%7B%7D%3B%0Afunction%20checkedLine(p%2C%20doc)%20%7B%0A%20%20var%20ran%20%3D%20ranChecks()%2C%20bad%20%3D%20%7B%7D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20if%20(e.k%20%3D%3D%3D%20%22PROBLEM%22%20%26%26%20!e.fixed)%20bad%5Be.f%5D%20%3D%201%3B%20%7D)%3B%0A%20%20var%20k%20%3D%20ran.map(function%20(f)%20%7B%20return%20f%20%2B%20(bad%5Bf%5D%20%3F%20%22!%22%20%3A%20%22%22)%3B%20%7D).join(%22%7C%22)%3B%0A%20%20p.hidden%20%3D%20!ran.length%3B%0A%20%20if%20(checkedKey%5Bp.className%20%2B%20(doc%20%3D%3D%3D%20document%20%3F%20%221%22%20%3A%20%222%22)%5D%20%3D%3D%3D%20k%20%26%26%20p.firstChild)%20return%3B%0A%20%20checkedKey%5Bp.className%20%2B%20(doc%20%3D%3D%3D%20document%20%3F%20%221%22%20%3A%20%222%22)%5D%20%3D%20k%3B%0A%20%20while%20(p.firstChild)%20p.removeChild(p.firstChild)%3B%0A%20%20p.appendChild(doc.createTextNode(%22Checked%3A%20%22))%3B%0A%20%20ran.forEach(function%20(f%2C%20i)%20%7B%0A%20%20%20%20if%20(i)%20p.appendChild(doc.createTextNode(%22%2C%20%22))%3B%0A%20%20%20%20var%20a%20%3D%20doc.createElement(%22a%22)%3B%0A%20%20%20%20a.className%20%3D%20bad%5Bf%5D%20%3F%20%22lq%20bad%22%20%3A%20%22lq%22%3B%0A%20%20%20%20a.href%20%3D%20showUrl(f)%3B%0A%20%20%20%20a.target%20%3D%20%22_blank%22%3B%0A%20%20%20%20a.rel%20%3D%20%22noopener%22%3B%0A%20%20%20%20a.textContent%20%3D%20f%3B%0A%20%20%20%20a.title%20%3D%20%22What%20%22%20%2B%20f%20%2B%20%22%20checks%22%3B%0A%20%20%20%20if%20(doc%20%3D%3D%3D%20document)%20a.tabIndex%20%3D%20outT()%3B%0A%20%20%20%20p.appendChild(a)%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20res(e)%20%7B%20return%20e.fixed%20%3F%20%22fixed%22%20%3A%20RES%5Be.k%5D%3B%20%7D%0Afunction%20shows(e)%20%7B%20return%20logFilter%20%3D%3D%3D%20%22all%22%20%7C%7C%20res(e)%20%3D%3D%3D%20logFilter%3B%20%7D%0Afunction%20logCounts()%20%7B%0A%20%20var%20c%20%3D%20%7B%20all%3A%20logs.length%2C%20bad%3A%200%2C%20ok%3A%200%2C%20skip%3A%200%2C%20info%3A%200%2C%20fixed%3A%200%20%7D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20c%5Bres(e)%5D%2B%2B%3B%20%7D)%3B%0A%20%20return%20c%3B%0A%7D%0Afunction%20tabOpen()%20%7B%20return%20!!(logTab%20%26%26%20!logTab.closed)%3B%20%7D%0Afunction%20logView()%20%7B%20return%20tabOpen()%20%3F%20tabList%20%3A%20logOpen%20%3F%20logList%20%3A%20null%3B%20%7D%0Afunction%20scroller(v)%20%7B%20return%20v%20%3D%3D%3D%20logList%20%3F%20panel%20%3A%20v.ownerDocument.scrollingElement%20%7C%7C%20v.ownerDocument.documentElement%3B%20%7D%0Afunction%20toTop(v)%20%7B%0A%20%20if%20(v%20!%3D%3D%20logList)%20return%20void%20(scroller(v).scrollTop%20%3D%200)%3B%0A%20%20var%20d%20%3D%20v.getBoundingClientRect().top%20-%20panel.getBoundingClientRect().top%3B%0A%20%20if%20(d%20%3C%200)%20panel.scrollTop%20%2B%3D%20d%20-%2012%3B%0A%7D%0Afunction%20wcagOf(e)%20%7B%20return%20e.w%20%7C%7C%20WCAG%5Be.f%5D%3B%20%7D%0Afunction%20log(k%2C%20f%2C%20parts%2C%20ai%2C%20w)%20%7B%0A%20%20var%20e%20%3D%20%7B%20t%3A%20new%20Date()%2C%20k%3A%20k%2C%20f%3A%20f%2C%20p%3A%20parts%2C%20li%3A%20null%2C%20ai%3A%20ai%20%7C%7C%20null%2C%20w%3A%20w%20%7C%7C%20null%20%7D%3B%0A%20%20logs.push(e)%3B%0A%20%20if%20(k%20%3D%3D%3D%20%22PROBLEM%22%20%26%26%20e.ai)%20probLog.push(e)%3B%0A%20%20if%20((k%20%3D%3D%3D%20%22OK%22%20%7C%7C%20k%20%3D%3D%3D%20%22PROBLEM%22)%20%26%26%20(f%20%3D%3D%3D%20%22Out%20of%20order%22%20%7C%7C%20f%20%3D%3D%3D%20%22Keyboard%20trap%22)%20%26%26%20pressed)%20judgedDir%5Bpressed%20%3E%200%20%3F%201%20%3A%20-1%5D%20%3D%201%3B%0A%20%20if%20(logs.length%20%3E%20LOG_MAX)%20%7B%0A%20%20%20%20var%20old%20%3D%20logs.shift()%3B%0A%20%20%20%20if%20(old.li%20%26%26%20old.li.parentNode)%20old.li.parentNode.removeChild(old.li)%3B%0A%20%20%7D%0A%20%20if%20(!logList)%20return%3B%0A%20%20logSummary()%3B%0A%20%20var%20v%20%3D%20logView()%3B%0A%20%20if%20(!v%20%7C%7C%20!shows(e))%20return%3B%0A%20%20var%20sc%20%3D%20scroller(v)%2C%20top%20%3D%20v%20%3D%3D%3D%20logList%20%3F%20v.getBoundingClientRect().top%20%3E%3D%20sc.getBoundingClientRect().top%20%3A%20sc.scrollTop%20%3C%208%3B%0A%20%20e.li%20%3D%20logLi(e%2C%20v.ownerDocument)%3B%0A%20%20v.insertBefore(e.li%2C%20v.firstChild)%3B%0A%20%20if%20(top)%20%7B%20if%20(v%20!%3D%3D%20logList)%20sc.scrollTop%20%3D%200%3B%20%7D%0A%20%20else%20sc.scrollTop%20%2B%3D%20e.li.getBoundingClientRect().height%3B%0A%7D%0Afunction%20review()%20%7B%0A%20%20if%20(lastStops%20%3C%200)%20log(%22INFO%22%2C%20%22Scan%22%2C%20%5B%22Found%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%20Read%20%22%20%2B%20pl(cssRules%2C%20%22CSS%20rule%22%2C%20%22CSS%20rules%22)%20%2B%20%22%20from%20%22%20%2B%20pl(cssSheets%2C%20%22style%20sheet%22%2C%20%22style%20sheets%22)%20%2B%20%22.%22%5D)%3B%0A%20%20else%20if%20(stops.length%20!%3D%3D%20lastStops)%20log(%22INFO%22%2C%20%22Scan%22%2C%20%5B%22Page%20changed%3A%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%20now%2C%20%22%20%2B%20lastStops%20%2B%20%22%20before.%22%5D)%3B%0A%20%20lastStops%20%3D%20stops.length%3B%0A%20%20cssBlocked.forEach(function%20(h)%20%7B%0A%20%20%20%20if%20(seenCss.has(h))%20return%3B%0A%20%20%20%20seenCss.add(h)%3B%0A%20%20%20%20log(%22SKIPPED%22%2C%20%22Hover%20menus%22%2C%20%5B%22Can't%20read%20%22%20%2B%20cleanUrl(h)%20%2B%20%22%2C%20it%20comes%20from%20another%20site.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20var%20mSet%20%3D%20new%20Set(missed)%2C%20hSet%20%3D%20new%20Set(hovers)%2C%20fSet%20%3D%20new%20Set(forcedBad)%2C%20fresh%20%3D%20%7B%7D%2C%20nNew%20%3D%200%3B%0A%20%20function%20add(f)%20%7B%0A%20%20%20%20fresh%5Bf%5D%20%3D%201%3B%0A%20%20%20%20nNew%2B%2B%3B%0A%20%20%7D%0A%20%20probMiss.forEach(function%20(e%2C%20m)%20%7B%0A%20%20%20%20if%20(mSet.has(m))%20return%3B%0A%20%20%20%20e.fixed%20%3D%20true%3B%0A%20%20%20%20probMiss.delete(m)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Missed%20spots%22%2C%20%5Bref(m)%2C%20stopSet.has(m)%20%3F%20%22%20is%20a%20Tab%20stop%20now.%22%20%3A%20m.isConnected%20%3F%20%22%20is%20no%20longer%20flagged.%22%20%3A%20%22%20is%20gone%20from%20the%20page.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20probHov.forEach(function%20(e%2C%20h)%20%7B%0A%20%20%20%20if%20(hSet.has(h))%20return%3B%0A%20%20%20%20e.fixed%20%3D%20true%3B%0A%20%20%20%20probHov.delete(h)%3B%0A%20%20%20%20if%20(tabOpens.has(h))%20seenOk.add(h)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Hover%20menus%22%2C%20%5Bref(h)%2C%20!h.isConnected%20%3F%20%22%20is%20gone%20from%20the%20page.%22%20%3A%20tabOpens.has(h)%20%3F%20%22%20opens%20when%20Tab%20reaches%20it.%22%20%3A%20%22%20no%20longer%20opens%20only%20on%20mouse%20hover.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20missed.forEach(function%20(m)%20%7B%0A%20%20%20%20if%20(probMiss.has(m))%20return%3B%0A%20%20%20%20var%20item%20%3D%20m.closest(GROUP)%20%26%26%20ITEM.test(m.getAttribute(%22role%22)%20%7C%7C%20%22%22)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Missed%20spots%22%2C%20%5Bref(m)%2C%20%22%20%22%20%2B%20looksWhy(m)%20%2B%20%22%2C%20but%20Tab%20never%20reaches%20it.%22%5D%2C%20aiOf(W_KEY%2C%20%22Every%20element%20that%20reacts%20to%20a%20click%20can%20be%20reached%20with%20the%20Tab%20key%20and%20used%20with%20Enter%20or%20Space.%22%2C%20item%20%3F%20%22It%20is%20a%20role%3D%5C%22%22%20%2B%20m.getAttribute(%22role%22)%20%2B%20%22%5C%22%20item%20in%20a%20group%20the%20arrow%20keys%20move%20through%2C%20and%20no%20item%20in%20the%20group%20is%20a%20Tab%20stop.%20Give%201%20item%20tabindex%3D%5C%220%5C%22%20(the%20selected%20one)%20and%20move%20between%20the%20items%20with%20the%20arrow%20keys.%22%20%3A%20m.tagName%20%3D%3D%3D%20%22A%22%20%26%26%20!m.hasAttribute(%22href%22)%20%3F%20%22Give%20the%20link%20an%20href%2C%20or%20make%20it%20a%20%3Cbutton%20type%3D%5C%22button%5C%22%3E%20if%20it%20runs%20script.%22%20%3A%20%22Use%20%3Cbutton%20type%3D%5C%22button%5C%22%3E%20for%20an%20action%20or%20%3Ca%20href%3E%20for%20a%20link%20instead%20of%20the%20%22%20%2B%20m.tagName.toLowerCase()%20%2B%20%22.%20If%20the%20tag%20can't%20change%2C%20add%20tabindex%3D%5C%220%5C%22%20and%20role%3D%5C%22button%5C%22%2C%20and%20handle%20Enter%20and%20Space%20in%20a%20keydown%20listener.%22%20%2B%20(looksWhy(m)%20%3D%3D%3D%20%22has%20a%20pointer%20cursor%22%20%3F%20%22%20Only%20the%20pointer%20cursor%20makes%20it%20look%20clickable%3A%20if%20it%20is%20not%20meant%20to%20be%20clickable%2C%20remove%20cursor%3A%20pointer%20from%20it%20instead.%22%20%3A%20%22%22)%2C%20%5B%5B%22Element%22%2C%20m%5D%5D%2C%20null%2C%20true))%3B%0A%20%20%20%20probMiss.set(m%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20add(%22Missed%20spots%22)%3B%0A%20%20%7D)%3B%0A%20%20if%20(!missed.length%20%26%26%20lastMissed%20!%3D%3D%200)%20log(%22OK%22%2C%20%22Missed%20spots%22%2C%20%5BlastMissed%20%3E%200%20%3F%20%22No%20clickable%20things%20Tab%20skips%20now.%22%20%3A%20%22No%20clickable%20things%20Tab%20skips.%22%5D)%3B%0A%20%20lastMissed%20%3D%20missed.length%3B%0A%20%20hoverOk.forEach(function%20(o)%20%7B%0A%20%20%20%20if%20(seenOk.has(o%5B0%5D))%20return%3B%0A%20%20%20%20seenOk.add(o%5B0%5D)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Hover%20menus%22%2C%20%5Bref(o%5B0%5D)%2C%20o%5B1%5D%20%3D%3D%3D%20%22focus%22%20%3F%20%22%20opens%20on%20mouse%20hover%20and%20on%20keyboard%20focus.%22%20%3A%20o%5B1%5D%20%3D%3D%3D%20%22tab%22%20%3F%20%22%20opens%20when%20Tab%20reaches%20it.%22%20%3A%20%22%20opens%20on%20mouse%20hover%20and%20has%20a%20toggle%20button%20(aria-expanded)%2C%20so%20the%20keyboard%20can%20open%20it.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20hovers.forEach(function%20(h)%20%7B%0A%20%20%20%20if%20(probHov.has(h))%20return%3B%0A%20%20%20%20var%20hr%20%3D%20hovRule.get(h)%20%7C%7C%20%5B%22%3Ahover%22%2C%20%22%22%5D%3B%0A%20%20%20%20hr%20%3D%20%5Bscrub(hr%5B0%5D)%2C%20hr%5B1%5D%5D%3B%0A%20%20%20%20var%20tw%20%3D%20(hr%5B0%5D.match(%2F%5C.(%3F%3A%5B%5Cw-%5D%7C%5C%5C.)%2B%2Fg)%20%7C%7C%20%5B%5D).map(function%20(c)%20%7B%20return%20c.slice(1).replace(%2F%5C%5C(.)%2Fg%2C%20%22%241%22)%3B%20%7D).filter(function%20(c)%20%7B%20return%20%2F(%5E%7C%3A)(group-%7Cpeer-)%3Fhover%3A%2F.test(c)%3B%20%7D)%5B0%5D%3B%0A%20%20%20%20var%20twFix%20%3D%20tw%20%3F%20%22This%20rule%20comes%20from%20the%20Tailwind%20class%20%22%20%2B%20tw%20%2B%20%22.%20Add%20%22%20%2B%20tw.replace(%2F(%5E%7C%3A)group-hover%3A%2F%2C%20%22%241group-focus-within%3A%22).replace(%2F(%5E%7C%3A)peer-hover%3A%2F%2C%20%22%241peer-focus%3A%22).replace(%2F(%5E%7C%3A)hover%3A%2F%2C%20%22%241focus-within%3A%22)%20%2B%20%22%20next%20to%20it%20in%20the%20same%20class%20list%2C%20so%20it%20also%20opens%20on%20keyboard%20focus.%20Or%20open%20the%20menu%20with%20a%20%3Cbutton%20aria-expanded%3E%20that%20toggles%20it.%22%20%3A%20%22%22%3B%0A%20%20%20%20var%20seen%20%3D%20hovSeen.has(h)%3B%0A%20%20%20%20var%20dead%20%3D%20!seen%20%26%26%20!h.matches(FOCUSABLE)%20%26%26%20!%5B%5D.some.call(h.querySelectorAll(FOCUSABLE)%2C%20function%20(x)%20%7B%20return%20tabbable(x)%3B%20%7D)%3B%0A%20%20%20%20var%20skipped%20%3D%20%5B%5D.some.call(h.querySelectorAll(FOCUSABLE)%2C%20function%20(x)%20%7B%20return%20x.tabIndex%20%3C%200%3B%20%7D)%3B%0A%20%20%20%20var%20deadFix%20%3D%20dead%20%3F%20%22%20Nothing%20inside%20it%20can%20take%20keyboard%20focus%20now%2C%20so%20a%20focus%20rule%20alone%20will%20never%20open%20it%3A%20make%20the%20part%20you%20hover%20a%20%3Cbutton%20type%3D%5C%22button%5C%22%20aria-expanded%3D%5C%22false%5C%22%3E%20that%20toggles%20the%20menu.%22%20%2B%20(skipped%20%3F%20%22%20The%20links%20or%20buttons%20inside%20have%20tabindex%3D%5C%22-1%5C%22%2C%20so%20Tab%20skips%20them%20even%20when%20the%20menu%20is%20open%3A%20remove%20it.%22%20%3A%20%22%22)%20%3A%20%22%22%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Hover%20menus%22%2C%20%5Bref(h)%2C%20%22%20opens%20only%20on%20mouse%20hover%20(%22%20%2B%20hr%5B0%5D%20%2B%20%22).%22%20%2B%20(seen%20%3F%20%22%20Tab%20reaches%20its%20links%2C%20but%20they%20stay%20invisible%20while%20they%20have%20focus.%22%20%3A%20%22%20No%20focus%20rule%2C%20no%20toggle%20button.%22)%5D%2C%20aiOf(seen%20%3F%20W_VIS%20%3A%20W_KEY%2C%20seen%20%3F%20%22The%20menu%20also%20opens%20while%20a%20link%20or%20button%20inside%20it%20has%20keyboard%20focus%2C%20so%20keyboard%20users%20can%20see%20where%20they%20are.%22%20%3A%20%22The%20menu%20also%20opens%20when%20a%20link%20or%20button%20inside%20it%20gets%20keyboard%20focus%2C%20so%20keyboard%20users%20can%20reach%20its%20links.%22%2C%20(twFix%20%7C%7C%20%22Next%20to%20the%20rule%20%22%20%2B%20hr%5B0%5D%20%2B%20%22%20add%20%22%20%2B%20hr%5B0%5D.replace(%2F%3Ahover%2Fg%2C%20%22%3Afocus-within%22)%20%2B%20%22%20with%20the%20same%20declarations%2C%20or%20open%20the%20menu%20with%20a%20%3Cbutton%20aria-expanded%3E%20that%20toggles%20it.%22)%20%2B%20deadFix%2C%20%5B%5B%22Element%22%2C%20h%2C%20null%2C%20true%5D%5D%2C%20%5B%22CSS%20rule%3A%20%22%20%2B%20hr%5B0%5D%2C%20%22Style%20sheet%3A%20%22%20%2B%20(hr%5B1%5D%20%3F%20cleanUrl(hr%5B1%5D)%20%3A%20%22unknown%22)%5D%2C%20true)%2C%20seen%20%3F%20%222.4.7%20AA%22%20%3A%20null)%3B%0A%20%20%20%20probHov.set(h%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20add(%22Hover%20menus%22)%3B%0A%20%20%7D)%3B%0A%20%20probForce.forEach(function%20(e%2C%20f)%20%7B%0A%20%20%20%20if%20(fSet.has(f))%20return%3B%0A%20%20%20%20e.fixed%20%3D%20true%3B%0A%20%20%20%20probForce.delete(f)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Forced%20order%22%2C%20%5Bref(f)%2C%20!f.isConnected%20%3F%20%22%20is%20gone%20from%20the%20page.%22%20%3A%20forced.indexOf(f)%20%3E%3D%200%20%3F%20%22%20is%20in%20page%20order%20now.%22%20%3A%20f.tabIndex%20%3E%200%20%3F%20%22%20is%20no%20longer%20a%20Tab%20stop.%22%20%3A%20%22%20has%20no%20tabindex%20above%200%20now.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20forced.forEach(function%20(f)%20%7B%0A%20%20%20%20if%20(probForce.has(f)%20%7C%7C%20(!fSet.has(f)%20%26%26%20seenForce.has(f)))%20return%3B%0A%20%20%20%20var%20ti%20%3D%20f.getAttribute(%22tabindex%22)%2C%20at%20%3D%20stops.indexOf(f)%20%2B%201%2C%20page%20%3D%20domAt.get(f)%20%2B%201%3B%0A%20%20%20%20if%20(!fSet.has(f))%20%7B%0A%20%20%20%20%20%20seenForce.add(f)%3B%0A%20%20%20%20%20%20return%20log(%22INFO%22%2C%20%22Forced%20order%22%2C%20%5Bref(f)%2C%20%22%20has%20tabindex%3D%5C%22%22%20%2B%20ti%20%2B%20%22%5C%22%2C%20but%20it%20is%20already%20in%20page%20order%2C%20so%20Tab%20order%20stays%20the%20same.%20tabindex%20above%200%20pulls%20it%20ahead%20of%20the%20page.%20It%20fails%20WCAG%202.4.3%20when%20that%20order%20makes%20no%20sense%20(F44).%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20seenForce.delete(f)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Forced%20order%22%2C%20%5Bref(f)%2C%20%22%20has%20tabindex%3D%5C%22%22%20%2B%20ti%20%2B%20%22%5C%22%2C%20which%20pulls%20it%20ahead%20of%20the%20page%3A%20Tab%20visits%20it%20as%20stop%20%22%20%2B%20at%20%2B%20%22%2C%20its%20place%20in%20the%20page%20is%20stop%20%22%20%2B%20page%20%2B%20%22.%20It%20fails%20WCAG%202.4.3%20when%20that%20order%20makes%20no%20sense%20(F44).%22%5D%2C%20aiOf(W_FORCE%2C%20%22Tab%20follows%20the%20order%20of%20the%20page.%20No%20element%20has%20tabindex%20above%200%2C%20so%20none%20is%20pulled%20ahead%20of%20the%20rest.%22%2C%20%22Remove%20the%20tabindex%2C%20or%20set%20it%20to%200%2C%20and%20move%20the%20element%20in%20the%20HTML%20where%20it%20should%20come%20in%20Tab%20order.%22%2C%20%5B%5B%22Element%22%2C%20f%5D%5D%2C%20%5B%22Measured%3A%20tabindex%3D%5C%22%22%20%2B%20ti%20%2B%20%22%5C%22%2C%20Tab%20visits%20it%20as%20stop%20%22%20%2B%20at%20%2B%20%22%2C%20its%20place%20in%20the%20page%20is%20stop%20%22%20%2B%20page%20%2B%20%22.%20%22%20%2B%20pl(forced.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%20on%20the%20page%20%22%20%2B%20(forced.length%20%3D%3D%3D%201%20%3F%20%22has%22%20%3A%20%22have%22)%20%2B%20%22%20tabindex%20above%200.%22%5D%2C%20true))%3B%0A%20%20%20%20probForce.set(f%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20add(%22Forced%20order%22)%3B%0A%20%20%7D)%3B%0A%20%20if%20(!forcedBad.length%20%26%26%20lastForced%20!%3D%3D%200)%20log(%22OK%22%2C%20%22Forced%20order%22%2C%20%5Bforced.length%20%3F%20%22No%20stop%20with%20tabindex%20above%200%20is%20out%20of%20page%20order%22%20%2B%20(lastForced%20%3E%200%20%3F%20%22%20now.%22%20%3A%20%22.%22)%20%3A%20lastForced%20%3E%200%20%3F%20%22No%20stops%20with%20tabindex%20above%200%20now.%22%20%3A%20%22No%20stops%20with%20tabindex%20above%200.%22%5D)%3B%0A%20%20lastForced%20%3D%20forcedBad.length%3B%0A%20%20if%20(nNew)%20announce(pl(nNew%2C%20%22new%20problem%22%2C%20%22new%20problems%22)%20%2B%20%22%3A%20%22%20%2B%20Object.keys(fresh).join(%22%2C%20%22)%20%2B%20%22.%22)%3B%0A%7D%0Afunction%20goTo(e)%20%7B%0A%20%20if%20(!e.isConnected)%20return%3B%0A%20%20e.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%0A%20%20if%20(stops.indexOf(e)%20%3C%200)%20return%20queue()%3B%0A%20%20endPress()%3B%0A%20%20e.focus(%7B%20preventScroll%3A%20true%2C%20focusVisible%3A%20true%20%7D)%3B%0A%20%20focus()%3B%0A%7D%0Afunction%20logLi(e%2C%20doc)%20%7B%0A%20%20var%20li%20%3D%20doc.createElement(%22li%22)%3B%0A%20%20li.className%20%3D%20%22lx%20%22%20%2B%20RES%5Be.k%5D%3B%0A%20%20function%20sp(cls%2C%20text)%20%7B%0A%20%20%20%20var%20x%20%3D%20doc.createElement(%22span%22)%3B%0A%20%20%20%20x.className%20%3D%20cls%3B%0A%20%20%20%20x.textContent%20%3D%20text%3B%0A%20%20%20%20li.appendChild(x)%3B%0A%20%20%20%20return%20x%3B%0A%20%20%7D%0A%20%20sp(%22tm%22%2C%20clock(e.t))%3B%0A%20%20sp(%22st%22%2C%20e.k)%3B%0A%20%20var%20bd%20%3D%20sp(%22bd%22%2C%20%22%22)%3B%0A%20%20var%20ft%20%3D%20doc.createElement(CHECKS.indexOf(e.f)%20%3E%3D%200%20%3F%20%22a%22%20%3A%20%22b%22)%3B%0A%20%20ft.className%20%3D%20%22ft%22%3B%0A%20%20ft.textContent%20%3D%20e.f%3B%0A%20%20if%20(ft.tagName%20%3D%3D%3D%20%22A%22)%20%7B%0A%20%20%20%20ft.className%20%3D%20%22ft%20lq%22%3B%0A%20%20%20%20ft.href%20%3D%20showUrl(e.f)%3B%0A%20%20%20%20ft.target%20%3D%20%22_blank%22%3B%0A%20%20%20%20ft.rel%20%3D%20%22noopener%22%3B%0A%20%20%20%20ft.title%20%3D%20%22What%20%22%20%2B%20e.f%20%2B%20%22%20checks%22%3B%0A%20%20%20%20if%20(doc%20%3D%3D%3D%20document)%20ft.tabIndex%20%3D%20outT()%3B%0A%20%20%7D%0A%20%20bd.appendChild(ft)%3B%0A%20%20bd.appendChild(doc.createTextNode(%22%20%22))%3B%0A%20%20if%20(wcagOf(e))%20%7B%0A%20%20%20%20var%20wc%20%3D%20doc.createElement(%22span%22)%3B%0A%20%20%20%20wc.className%20%3D%20%22wc%22%3B%0A%20%20%20%20wc.textContent%20%3D%20%22WCAG%20%22%20%2B%20wcagOf(e)%3B%0A%20%20%20%20bd.appendChild(wc)%3B%0A%20%20%20%20bd.appendChild(doc.createTextNode(%22%20%22))%3B%0A%20%20%7D%0A%20%20e.p.forEach(function%20(x)%20%7B%0A%20%20%20%20if%20(typeof%20x%20%3D%3D%3D%20%22string%22)%20return%20bd.appendChild(doc.createTextNode(x))%3B%0A%20%20%20%20if%20(!x.n)%20return%20bd.appendChild(doc.createTextNode(partText(x)))%3B%0A%20%20%20%20var%20c%20%3D%20doc.createElement(%22button%22)%3B%0A%20%20%20%20c.type%20%3D%20%22button%22%3B%0A%20%20%20%20c.className%20%3D%20%22lc%22%3B%0A%20%20%20%20c.textContent%20%3D%20String(x.n)%3B%0A%20%20%20%20c.setAttribute(%22aria-label%22%2C%20%22Go%20to%20stop%20%22%20%2B%20x.n)%3B%0A%20%20%20%20if%20(doc%20%3D%3D%3D%20document)%20c.tabIndex%20%3D%20panelIn%20%3F%200%20%3A%20-1%3B%0A%20%20%20%20c.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20%20%20if%20(doc%20!%3D%3D%20document%20%26%26%20tabOpen()%20%26%26%20window.name)%20logTab.open(%22%22%2C%20window.name)%3B%0A%20%20%20%20%20%20goTo(x.el)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20bd.appendChild(c)%3B%0A%20%20%20%20bd.appendChild(doc.createTextNode(%22%20%5C%22%22%20%2B%20x.l%20%2B%20%22%5C%22%22))%3B%0A%20%20%7D)%3B%0A%20%20return%20li%3B%0A%7D%0Afunction%20logText()%20%7B%0A%20%20var%20c%20%3D%20logCounts()%3B%0A%20%20var%20out%20%3D%20%5B%22Tab%20trail%20%22%20%2B%20VERSION%20%2B%20%22%20log%22%2C%20addr()%2C%20stamp()%2C%20browser()%20%2B%20%22%2C%20window%20%22%20%2B%20innerWidth%20%2B%20%22%20x%20%22%20%2B%20innerHeight%2C%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%2C%20%22%20%2B%20pl(c.bad%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22%2C%20%22%20%2B%20c.ok%20%2B%20%22%20OK%2C%20%22%20%2B%20c.skip%20%2B%20%22%20skipped%22%2C%20%22%22%5D%3B%0A%20%20logs.slice().reverse().forEach(function%20(e)%20%7B%0A%20%20%20%20out.push(clock(e.t)%20%2B%20%22%20%22%20%2B%20(e.k%20%2B%20%22%20%20%20%20%20%20%20%20%22).slice(0%2C%208)%20%2B%20%22%20%22%20%2B%20e.f%20%2B%20(showWcag%20%26%26%20wcagOf(e)%20%3F%20%22%20(WCAG%20%22%20%2B%20wcagOf(e)%20%2B%20%22)%22%20%3A%20%22%22))%3B%0A%20%20%20%20out.push(%22%20%20%22%20%2B%20e.p.map(partText).join(%22%22))%3B%0A%20%20%7D)%3B%0A%20%20return%20out.join(%22%5Cn%22)%3B%0A%7D%0Avar%20W_FORCE%20%3D%20%222.4.3%20Focus%20Order%20(Level%20A).%20tabindex%20above%200%20pulls%20it%20ahead%20of%20the%20page.%20It%20fails%20WCAG%202.4.3%20when%20that%20order%20makes%20no%20sense%20(F44).%22%2C%20W_TRAP%20%3D%20%222.1.2%20No%20Keyboard%20Trap%20(Level%20A)%22%2C%20W_KEY%20%3D%20%222.1.1%20Keyboard%20(Level%20A)%22%2C%20W_VIS%20%3D%20%222.4.7%20Focus%20Visible%20(Level%20AA)%22%2C%20W_ORDER%20%3D%20%222.4.3%20Focus%20Order%20(Level%20A)%22%2C%20W_HIDE%20%3D%20%222.4.11%20Focus%20Not%20Obscured%20(Minimum)%20(Level%20AA)%22%3B%0Afunction%20cssId(t)%20%7B%20return%20%2F%5E%5BA-Za-z%5D%5B%5Cw-%5D*%24%2F.test(t)%3B%20%7D%0Afunction%20sel(e)%20%7B%0A%20%20if%20(!e%20%7C%7C%20e.nodeType%20!%3D%3D%201)%20return%20%22%22%3B%0A%20%20var%20rt%20%3D%20e.getRootNode()%2C%20live%20%3D%20e.isConnected%2C%20path%20%3D%20%5B%5D%3B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement)%20%7B%0A%20%20%20%20var%20t%20%3D%20n.tagName.toLowerCase()%3B%0A%20%20%20%20if%20(n.id%20%26%26%20cssId(n.id)%20%26%26%20!secretish(n.id)%20%26%26%20live%20%26%26%20rt.querySelectorAll(%22%23%22%20%2B%20n.id).length%20%3D%3D%3D%201)%20%7B%0A%20%20%20%20%20%20path.unshift(%22%23%22%20%2B%20n.id)%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(t%20%3D%3D%3D%20%22html%22%20%7C%7C%20t%20%3D%3D%3D%20%22body%22)%20%7B%0A%20%20%20%20%20%20path.unshift(t)%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20c%20%3D%20typeof%20n.className%20%3D%3D%3D%20%22string%22%20%3F%20n.className.trim().split(%2F%5Cs%2B%2F).filter(function%20(x)%20%7B%20return%20cssId(x)%20%26%26%20!secretish(x)%3B%20%7D).slice(0%2C%202)%20%3A%20%5B%5D%3B%0A%20%20%20%20var%20part%20%3D%20t%20%2B%20(c.length%20%3F%20%22.%22%20%2B%20c.join(%22.%22)%20%3A%20%22%22)%2C%20par%20%3D%20n.parentElement%3B%0A%20%20%20%20if%20(par)%20%7B%0A%20%20%20%20%20%20var%20same%20%3D%20Array.prototype.filter.call(par.children%2C%20function%20(x)%20%7B%20return%20x.tagName%20%3D%3D%3D%20n.tagName%3B%20%7D)%3B%0A%20%20%20%20%20%20if%20(same.length%20%3E%201)%20part%20%2B%3D%20%22%3Anth-of-type(%22%20%2B%20(same.indexOf(n)%20%2B%201)%20%2B%20%22)%22%3B%0A%20%20%20%20%7D%0A%20%20%20%20path.unshift(part)%3B%0A%20%20%20%20if%20(live)%20%7B%0A%20%20%20%20%20%20try%20%7B%20if%20(rt.querySelectorAll(path.join(%22%20%3E%20%22)).length%20%3D%3D%3D%201)%20break%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20out%20%3D%20path.join(%22%20%3E%20%22)%3B%0A%20%20if%20(rt%20%26%26%20rt.host)%20out%20%3D%20sel(rt.host)%20%2B%20%22%20(inside%20its%20shadow%20root)%20%22%20%2B%20out%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20KEEP%20%3D%20%2F%5E(id%7Cclass%7Crole%7Ctype%7Cname%7Chref%7Csrc%7Ctabindex%7Cdisabled%7Chidden%7Ccontenteditable%7Caria-%5B%5Cw-%5D%2B)%24%2F%2C%20VOID%20%3D%20%2F%5E(area%7Cbr%7Ccol%7Cembed%7Chr%7Cimg%7Cinput%7Clink%7Cmeta%7Csource%7Ctrack%7Cwbr)%24%2F%3B%0Afunction%20attrText(n%2C%20v)%20%7B%0A%20%20if%20(n%20%3D%3D%3D%20%22href%22%20%7C%7C%20n%20%3D%3D%3D%20%22src%22)%20return%20cleanUrl(v)%3B%0A%20%20if%20(n%20%3D%3D%3D%20%22id%22%20%7C%7C%20n%20%3D%3D%3D%20%22class%22)%20return%20scrub(v)%3B%0A%20%20if%20(n%20%3D%3D%3D%20%22role%22%20%7C%7C%20n%20%3D%3D%3D%20%22type%22)%20return%20v%3B%0A%20%20v%20%3D%20scrub(v)%3B%0A%20%20return%20v.length%20%3E%2060%20%3F%20v.slice(0%2C%2060)%20%2B%20%22...%22%20%3A%20v%3B%0A%7D%0Afunction%20snip(e%2C%20kids)%20%7B%0A%20%20var%20tag%20%3D%20e.tagName.toLowerCase()%2C%20open%20%3D%20%22%3C%22%20%2B%20tag%3B%0A%20%20%5B%5D.forEach.call(e.attributes%2C%20function%20(a)%20%7B%0A%20%20%20%20if%20(KEEP.test(a.name))%20open%20%2B%3D%20%22%20%22%20%2B%20a.name%20%2B%20%22%3D%5C%22%22%20%2B%20attrText(a.name%2C%20a.value).replace(%2F%22%2Fg%2C%20%22%26quot%3B%22)%20%2B%20%22%5C%22%22%3B%0A%20%20%7D)%3B%0A%20%20open%20%2B%3D%20%22%3E%22%3B%0A%20%20if%20(VOID.test(tag))%20return%20open%3B%0A%20%20if%20(kids%20%26%26%20e.children.length)%20return%20open%20%2B%20%5B%5D.slice.call(e.children%2C%200%2C%208).map(function%20(c)%20%7B%20return%20c.children.length%20%3F%20snip(c).replace(%2F%3E%5B%5E%3C%5D*%3C%5C%2F%5B%5Cw-%5D%2B%3E%24%2F%2C%20%22%3E...%3C%2F%22%20%2B%20c.tagName.toLowerCase()%20%2B%20%22%3E%22)%20%3A%20snip(c)%3B%20%7D).join(%22%22)%20%2B%20(e.children.length%20%3E%208%20%3F%20%22...%22%20%3A%20%22%22)%20%2B%20%22%3C%2F%22%20%2B%20tag%20%2B%20%22%3E%22%3B%0A%20%20var%20text%20%3D%20scrub((e.textContent%20%7C%7C%20%22%22).trim().replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22))%3B%0A%20%20return%20open%20%2B%20(text.length%20%3E%2040%20%3F%20text.slice(0%2C%2040)%20%2B%20%22...%22%20%3A%20text)%20%2B%20%22%3C%2F%22%20%2B%20tag%20%2B%20%22%3E%22%3B%0A%7D%0Avar%20FRAME%20%3D%20%2F%5E(__.*%7CSegmentViewNode%7CLayoutRouter.*%7CInnerLayoutRouter%7COuterLayoutRouter%7CRenderFromTemplateContext%7CScrollAndFocusHandler%7CInnerScrollAndFocusHandler%7C.*Boundary.*%7CHTTPAccessFallback.*%7CRouter%7CAppRouter%7CHotReload%7CReactDevOverlay%7CDevRootHTTPAccessFallbackBoundary%7CServerRoot%7CRoot%7CAppContainer%7CSuspense%7CFragment%7CStrictMode%7CHead%7CHtml%7CBody%7CScript%7CClientPageRoot%7CClientSegmentRoot%7C.*Provider%7C.*Context%7C.*Consumer%7CLink%7CLinkComponent%7CImage%7CForwardRef%7CMemo%7CAnonymous%7C_c%5Cd*)%24%2F%3B%0Afunction%20compOf(e)%20%7B%0A%20%20var%20keys%20%3D%20Object.keys(e)%2C%20k%20%3D%20keys.filter(function%20(x)%20%7B%20return%20x.indexOf(%22__reactFiber%24%22)%20%3D%3D%3D%200%20%7C%7C%20x.indexOf(%22__reactInternalInstance%24%22)%20%3D%3D%3D%200%3B%20%7D)%5B0%5D%3B%0A%20%20if%20(k)%20%7B%0A%20%20%20%20var%20names%20%3D%20%5B%5D%2C%20src%20%3D%20%22%22%2C%20any%20%3D%20false%3B%0A%20%20%20%20for%20(var%20f%20%3D%20e%5Bk%5D%3B%20f%20%26%26%20names.length%20%3C%203%3B%20f%20%3D%20f.return)%20%7B%0A%20%20%20%20%20%20var%20t%20%3D%20f.type%3B%0A%20%20%20%20%20%20if%20(!src%20%26%26%20f._debugSource%20%26%26%20f._debugSource.fileName)%20src%20%3D%20f._debugSource.fileName%20%2B%20%22%3A%22%20%2B%20f._debugSource.lineNumber%3B%0A%20%20%20%20%20%20if%20(!t%20%7C%7C%20typeof%20t%20%3D%3D%3D%20%22string%22%20%7C%7C%20typeof%20t%20%3D%3D%3D%20%22symbol%22)%20continue%3B%0A%20%20%20%20%20%20var%20n%20%3D%20t.displayName%20%7C%7C%20t.name%20%7C%7C%20(t.render%20%26%26%20(t.render.displayName%20%7C%7C%20t.render.name))%20%7C%7C%20(t.type%20%26%26%20(t.type.displayName%20%7C%7C%20t.type.name))%3B%0A%20%20%20%20%20%20if%20(!n)%20continue%3B%0A%20%20%20%20%20%20any%20%3D%20true%3B%0A%20%20%20%20%20%20if%20(FRAME.test(n)%20%7C%7C%20names.indexOf(n)%20%3E%3D%200)%20continue%3B%0A%20%20%20%20%20%20names.push(n)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(!names.length)%20return%20any%20%3F%20%22React%2C%20rendered%20by%20a%20server%20component%20or%20by%20the%20framework%20itself%2C%20so%20its%20component%20name%20is%20not%20in%20the%20browser%3B%20search%20the%20code%20for%20the%20HTML%20or%20its%20classes%22%20%3A%20%22%22%3B%0A%20%20%20%20if%20(names.every(function%20(n)%20%7B%20return%20n.length%20%3C%3D%202%3B%20%7D))%20return%20%22React%20(component%20names%20are%20minified%20in%20this%20production%20build%3B%20a%20development%20build%20shows%20them)%22%3B%0A%20%20%20%20return%20%22React%20%22%20%2B%20names%5B0%5D%20%2B%20(names.length%20%3E%201%20%3F%20%22%2C%20inside%20%22%20%2B%20names.slice(1).join(%22%2C%20inside%20%22)%20%3A%20%22%22)%20%2B%20(src%20%3F%20%22%2C%20source%20%22%20%2B%20src%20%3A%20%22%22)%3B%0A%20%20%7D%0A%20%20if%20(e.__vueParentComponent)%20%7B%0A%20%20%20%20var%20vn%20%3D%20%5B%5D%3B%0A%20%20%20%20for%20(var%20c%20%3D%20e.__vueParentComponent%3B%20c%20%26%26%20vn.length%20%3C%203%3B%20c%20%3D%20c.parent)%20%7B%0A%20%20%20%20%20%20var%20nm%20%3D%20c.type%20%26%26%20(c.type.name%20%7C%7C%20c.type.__name)%3B%0A%20%20%20%20%20%20if%20(nm%20%26%26%20vn.indexOf(nm)%20%3C%200)%20vn.push(nm)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(vn.length)%20return%20%22Vue%20%22%20%2B%20vn%5B0%5D%20%2B%20(vn.length%20%3E%201%20%3F%20%22%2C%20inside%20%22%20%2B%20vn.slice(1).join(%22%2C%20inside%20%22)%20%3A%20%22%22)%3B%0A%20%20%7D%0A%20%20if%20(e.__vue__%20%26%26%20e.__vue__.%24options%20%26%26%20e.__vue__.%24options.name)%20return%20%22Vue%20%22%20%2B%20e.__vue__.%24options.name%3B%0A%20%20try%20%7B%0A%20%20%20%20var%20ng%20%3D%20window.ng%3B%0A%20%20%20%20if%20(ng%20%26%26%20ng.getOwningComponent)%20%7B%0A%20%20%20%20%20%20var%20oc%20%3D%20ng.getOwningComponent(e)%3B%0A%20%20%20%20%20%20if%20(oc%20%26%26%20oc.constructor)%20return%20%22Angular%20%22%20%2B%20oc.constructor.name%3B%0A%20%20%20%20%7D%0A%20%20%7D%20catch%20(x)%20%7B%7D%0A%20%20return%20%22%22%3B%0A%7D%0Afunction%20whereOf(el)%20%7B%0A%20%20if%20(!el%20%7C%7C%20!el.isConnected)%20return%20%22%22%3B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20up%20%3D%20el.parentElement%3B%0A%20%20while%20(up%20%26%26%20up%20!%3D%3D%20document.body%20%26%26%20up%20!%3D%3D%20document.documentElement%20%26%26%20!up.id)%20up%20%3D%20up.parentElement%3B%0A%20%20if%20(up%20%26%26%20up.id%20%26%26%20up%20!%3D%3D%20document.body)%20out.push(%22inside%20%23%22%20%2B%20scrub(up.id))%3B%0A%20%20var%20hs%20%3D%20document.querySelectorAll(%22h1%2Ch2%2Ch3%2Ch4%2Ch5%2Ch6%2C%5Brole%3Dheading%5D%22)%2C%20last%20%3D%20null%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20hs.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20if%20(hs%5Bi%5D%20%3D%3D%3D%20el%20%7C%7C%20(host%20%26%26%20host.contains(hs%5Bi%5D)))%20continue%3B%0A%20%20%20%20if%20(hs%5Bi%5D.contains(el)%20%7C%7C%20hs%5Bi%5D.compareDocumentPosition(el)%20%26%20Node.DOCUMENT_POSITION_FOLLOWING)%20last%20%3D%20hs%5Bi%5D%3B%20else%20break%3B%0A%20%20%7D%0A%20%20var%20t%20%3D%20last%20%3F%20scrub((last.textContent%20%7C%7C%20%22%22).replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22).trim()).slice(0%2C%2060)%20%3A%20%22%22%3B%0A%20%20if%20(t)%20out.push(%22under%20the%20heading%20%5C%22%22%20%2B%20t%20%2B%20%22%5C%22%22)%3B%0A%20%20return%20out.join(%22%2C%20%22)%3B%0A%7D%0Afunction%20aiOf(crit%2C%20expect%2C%20fix%2C%20els%2C%20more%2C%20lazy)%20%7B%0A%20%20function%20fact(x)%20%7B%0A%20%20%20%20var%20o%20%3D%20%7B%20role%3A%20x%5B0%5D%2C%20el%3A%20x%5B1%5D%20%7D%3B%0A%20%20%20%20function%20fill()%20%7B%0A%20%20%20%20%20%20o.sel%20%3D%20x%5B2%5D%20%3F%20x%5B2%5D.sel%20%3A%20sel(x%5B1%5D)%3B%0A%20%20%20%20%20%20o.html%20%3D%20x%5B2%5D%20%3F%20x%5B2%5D.html%20%3A%20snip(x%5B1%5D%2C%20x%5B3%5D)%3B%0A%20%20%20%20%20%20o.comp%20%3D%20compOf(x%5B1%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(!lazy)%20fill()%3B%0A%20%20%20%20else%20%5B%22sel%22%2C%20%22html%22%2C%20%22comp%22%5D.forEach(function%20(k)%20%7B%0A%20%20%20%20%20%20Object.defineProperty(o%2C%20k%2C%20%7B%20configurable%3A%20true%2C%20enumerable%3A%20true%2C%20get%3A%20function%20()%20%7B%20fill()%3B%20return%20o%5Bk%5D%3B%20%7D%2C%20set%3A%20function%20(v)%20%7B%20Object.defineProperty(o%2C%20k%2C%20%7B%20value%3A%20v%2C%20writable%3A%20true%2C%20enumerable%3A%20true%20%7D)%3B%20%7D%20%7D)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20return%20o%3B%0A%20%20%7D%0A%20%20return%20%7B%0A%20%20%20%20crit%3A%20crit%2C%0A%20%20%20%20expect%3A%20expect%2C%0A%20%20%20%20fix%3A%20fix%2C%0A%20%20%20%20more%3A%20more%20%7C%7C%20%5B%5D%2C%0A%20%20%20%20els%3A%20els.filter(function%20(x)%20%7B%20return%20x%5B1%5D%3B%20%7D).map(fact)%0A%20%20%7D%3B%0A%7D%0Afunction%20tally(k)%20%7B%0A%20%20var%20m%20%3D%20%7B%7D%2C%20order%20%3D%20%5B%5D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%0A%20%20%20%20if%20(e.k%20!%3D%3D%20k)%20return%3B%0A%20%20%20%20if%20(!m%5Be.f%5D)%20%7B%0A%20%20%20%20%20%20m%5Be.f%5D%20%3D%200%3B%0A%20%20%20%20%20%20order.push(e.f)%3B%0A%20%20%20%20%7D%0A%20%20%20%20m%5Be.f%5D%2B%2B%3B%0A%20%20%7D)%3B%0A%20%20return%20order.map(function%20(f)%20%7B%20return%20f%20%2B%20%22%20%22%20%2B%20m%5Bf%5D%3B%20%7D).join(%22%2C%20%22)%3B%0A%7D%0Afunction%20stamp()%20%7B%0A%20%20var%20d%20%3D%20new%20Date()%3B%0A%20%20return%20d.getFullYear()%20%2B%20%22-%22%20%2B%20two(d.getMonth()%20%2B%201)%20%2B%20%22-%22%20%2B%20two(d.getDate())%20%2B%20%22%20%22%20%2B%20two(d.getHours())%20%2B%20%22%3A%22%20%2B%20two(d.getMinutes())%3B%0A%7D%0Afunction%20verifyOf(e)%20%7B%0A%20%20var%20a%20%3D%20e.ai%2C%20t%20%3D%20e.p.map(partText).join(%22%22)%3B%0A%20%20function%20el(r)%20%7B%0A%20%20%20%20var%20x%20%3D%20a.els.filter(function%20(y)%20%7B%20return%20y.role%20%3D%3D%3D%20r%3B%20%7D)%5B0%5D%3B%0A%20%20%20%20return%20x%20%3F%20x.sel%20%3A%20%22%22%3B%0A%20%20%7D%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Missed%20spots%22)%20return%20%22Reload%20the%20page%20and%20run%20Tab%20trail%20again%3A%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20gets%20a%20stop%20number%20and%20the%20skipped%20count%20goes%20down%20by%201.%20Press%20Tab%20until%20it%20has%20focus%2C%20then%20Enter%20(and%20Space%20for%20a%20button)%20does%20what%20a%20click%20does.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Forced%20order%22)%20return%20%22Reload%20the%20page%20and%20run%20Tab%20trail%20again%3A%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20no%20tabindex%20above%200%2C%20its%20stop%20number%20matches%20its%20place%20on%20the%20page%2C%20and%20the%20Forced%20order%20count%20goes%20down%20by%201.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Hover%20menus%22)%20return%20%22Press%20Tab%20until%20a%20link%20inside%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20focus%3A%20the%20menu%20opens%20while%20focus%20is%20inside%20it%2C%20and%20Tab%20trail%20no%20longer%20lists%20it%20under%20hover%20menus.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Hidden%20focus%22)%20return%20%22Press%20Tab%20until%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20focus%3A%20part%20of%20it%20shows%20next%20to%20%22%20%2B%20el(%22Covered%20by%22)%20%2B%20%22%2C%20and%20its%20Hidden%20focus%20line%20in%20the%20log%20says%20in%20view%20or%20partly%20covered.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Keyboard%20trap%22)%20return%20%22Put%20focus%20on%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20and%20press%20Tab%3A%20focus%20moves%20on%20to%20%22%20%2B%20el(%22Expected%20next%22)%20%2B%20%22%2C%20and%20the%20log%20shows%20an%20OK%20Out%20of%20order%20line.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Lost%20focus%22)%20return%20%22Open%20the%20popup%20from%20%22%20%2B%20el(%22Opened%20by%22)%20%2B%20%22%20with%20Enter%2C%20then%20close%20it%20with%20Escape%20or%20its%20close%20button%3A%20focus%20is%20back%20on%20%22%20%2B%20el(%22Opened%20by%22)%20%2B%20%22%2C%20and%20the%20log%20shows%20an%20OK%20Lost%20focus%20line.%22%3B%0A%20%20if%20(el(%22Popup%22))%20return%20%22Reload%20so%20the%20popup%20shows%2C%20then%20press%20Tab%20once%3A%20focus%20lands%20inside%20%22%20%2B%20el(%22Popup%22)%20%2B%20%22.%22%3B%0A%20%20return%20%22Put%20focus%20on%20%22%20%2B%20(el(%22Tab%20left%20from%22)%20%7C%7C%20%22the%20start%20of%20the%20page%22)%20%2B%20%22%20and%20press%20%22%20%2B%20(t.indexOf(%22(Shift%2BTab)%22)%20%3E%3D%200%20%3F%20%22Shift%2BTab%22%20%3A%20%22Tab%22)%20%2B%20%22%20once%3A%20focus%20lands%20on%20%22%20%2B%20el(%22Expected%20next%22)%20%2B%20%22%2C%20and%20the%20log%20shows%20an%20OK%20Out%20of%20order%20line.%22%3B%0A%7D%0Avar%20hidTested%20%3D%20new%20Set()%3B%0Afunction%20coverage()%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20left%20%3D%20stops.filter(function%20(x)%20%7B%20return%20!hidTested.has(x)%3B%20%7D).map(function%20(x)%20%7B%20return%20stops.indexOf(x)%20%2B%201%3B%20%7D)%3B%0A%20%20if%20(left.length)%20out.push(%22Hidden%20focus%3A%20%22%20%2B%20left.length%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%20was%22%2C%20%22stops%20were%22)%20%2B%20%22%20never%20tested%20(%22%20%2B%20left.slice(0%2C%2030).join(%22%2C%20%22)%20%2B%20(left.length%20%3E%2030%20%3F%20%22%20and%20%22%20%2B%20(left.length%20-%2030)%20%2B%20%22%20more%22%20%3A%20%22%22)%20%2B%20%22).%20Press%20Play%20to%20test%20every%20stop.%22)%3B%0A%20%20var%20presses%20%3D%20logs.filter(function%20(e)%20%7B%20return%20e.f%20%3D%3D%3D%20%22Out%20of%20order%22%20%7C%7C%20e.f%20%3D%3D%3D%20%22Keyboard%20trap%22%3B%20%7D).length%3B%0A%20%20out.push(%22Out%20of%20order%20and%20Keyboard%20trap%3A%20judged%20only%20for%20the%20%22%20%2B%20pl(presses%2C%20%22Tab%20press%22%2C%20%22Tab%20presses%22)%20%2B%20%22%20made%20in%20this%20run.%20Press%20Tab%20through%20the%20whole%20page%2C%20and%20Shift%2BTab%20back%2C%20to%20judge%20every%20step.%22)%3B%0A%20%20var%20pops%20%3D%20logs.filter(function%20(e)%20%7B%20return%20e.f%20%3D%3D%3D%20%22Lost%20focus%22%3B%20%7D).length%3B%0A%20%20out.push(%22Lost%20focus%3A%20%22%20%2B%20(pops%20%3F%20%22only%20%22%20%2B%20pl(pops%2C%20%22popup%20was%22%2C%20%22popups%20were%22)%20%3A%20%22no%20popups%20were%22)%20%2B%20%22%20opened%20and%20closed%20in%20this%20run.%20Open%20and%20close%20every%20popup%2C%20menu%20and%20dialog%20on%20the%20page%20to%20check%20them%20all.%22)%3B%0A%20%20out.push(%22Window%20size%3A%20everything%20was%20tested%20at%20%22%20%2B%20innerWidth%20%2B%20%22%20x%20%22%20%2B%20innerHeight%20%2B%20%22%20only.%20Sticky%20bars%2C%20menus%20and%20popups%20can%20behave%20differently%20on%20phones%3B%20run%20it%20again%20in%20a%20window%20about%20390%20px%20wide.%22)%3B%0A%20%20out.push(%22Not%20checked%20by%20Tab%20trail%20at%20all%3A%20whether%20the%20focus%20outline%20is%20visible%20and%20has%20enough%20contrast%2C%20accessible%20names%20of%20buttons%20and%20links%2C%20color%20contrast%20of%20text%2C%20what%20a%20screen%20reader%20announces%2C%20and%20content%20inside%20iframes.%20Use%20axe%20DevTools%20or%20Lighthouse%20for%20names%2C%20contrast%20and%20iframes.%20Check%20focus%20visibility%20with%20Spotlight%20and%20screen%20reader%20output%20with%20VoiceOver%20or%20NVDA.%22)%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20probLog%20%3D%20%5B%5D%2C%20ignore%20%3D%20%5B%5D%2C%20CAP%20%3D%20200%2C%20judgedDir%20%3D%20%7B%7D%3B%0Afunction%20ignored(e)%20%7B%0A%20%20return%20ignore.length%20%26%26%20e.ai.els.some(function%20(x)%20%7B%0A%20%20%20%20for%20(var%20n%20%3D%20x.el%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement%20%7C%7C%20(n.getRootNode()%20%26%26%20n.getRootNode().host))%20%7B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20ignore.length%3B%20i%2B%2B)%20if%20(n.matches(ignore%5Bi%5D))%20return%20true%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20false%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20openProbs(all)%20%7B%0A%20%20var%20seen%20%3D%20%7B%7D%2C%20out%20%3D%20%5B%5D%3B%0A%20%20probLog.forEach(function%20(e)%20%7B%0A%20%20%20%20var%20t%20%3D%20e.f%20%2B%20e.p.map(partText).join(%22%22)%3B%0A%20%20%20%20if%20(e.fixed%20%7C%7C%20seen%5Bt%5D)%20return%3B%0A%20%20%20%20seen%5Bt%5D%20%3D%201%3B%0A%20%20%20%20if%20(all%20%7C%7C%20!ignored(e))%20out.push(e)%3B%0A%20%20%7D)%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20hash(t)%20%7B%0A%20%20var%20h%20%3D%202166136261%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20t.length%3B%20i%2B%2B)%20h%20%3D%20Math.imul(h%20%5E%20t.charCodeAt(i)%2C%2016777619)%3B%0A%20%20return%20(%220000000%22%20%2B%20(h%20%3E%3E%3E%200).toString(16)).slice(-8)%3B%0A%7D%0Afunction%20keyOf(e)%20%7B%0A%20%20var%20t%20%3D%20e.tagName.toLowerCase()%3B%0A%20%20if%20(e.id%20%26%26%20cssId(e.id))%20return%20t%20%2B%20%22%23%22%20%2B%20e.id%3B%0A%20%20var%20up%20%3D%20%22%22%3B%0A%20%20for%20(var%20p%20%3D%20e.parentElement%3B%20p%3B%20p%20%3D%20p.parentElement)%20if%20(p.id%20%26%26%20cssId(p.id))%20%7B%20up%20%3D%20%22%23%22%20%2B%20p.id%20%2B%20%22%20%22%3B%20break%3B%20%7D%0A%20%20return%20up%20%2B%20t%20%2B%20(e.getAttribute(%22role%22)%20%3F%20%22%5Brole%3D%22%20%2B%20e.getAttribute(%22role%22)%20%2B%20%22%5D%22%20%3A%20%22%22)%20%2B%20(e.getAttribute(%22name%22)%20%3F%20%22%5Bname%3D%22%20%2B%20e.getAttribute(%22name%22)%20%2B%20%22%5D%22%20%3A%20%22%22)%20%2B%20%22%5C%22%22%20%2B%20label(e)%20%2B%20%22%5C%22%22%3B%0A%7D%0Afunction%20mainEl(e)%20%7B%0A%20%20var%20to%20%3D%20e.ai.els.filter(function%20(x)%20%7B%20return%20x.role%20%3D%3D%3D%20%22Tab%20jumped%20to%22%3B%20%7D)%5B0%5D%3B%0A%20%20return%20to%20%7C%7C%20e.ai.els%5B0%5D%3B%0A%7D%0Afunction%20problemsOf(list)%20%7B%0A%20%20var%20used%20%3D%20%7B%7D%3B%0A%20%20return%20list.map(function%20(e)%20%7B%0A%20%20%20%20var%20m%20%3D%20mainEl(e)%2C%20id%20%3D%20hash(e.f%20%2B%20%22%7C%22%20%2B%20e.ai.els.map(function%20(x)%20%7B%20return%20keyOf(x.el)%3B%20%7D).join(%22%7C%22))%3B%0A%20%20%20%20used%5Bid%5D%20%3D%20(used%5Bid%5D%20%7C%7C%200)%20%2B%201%3B%0A%20%20%20%20return%20%7B%20id%3A%20used%5Bid%5D%20%3E%201%20%3F%20id%20%2B%20%22-%22%20%2B%20used%5Bid%5D%20%3A%20id%2C%20check%3A%20e.f%2C%20wcag%3A%20wcagOf(e)%20%7C%7C%20null%2C%20selector%3A%20m%20%3F%20m.sel%20%3A%20null%2C%20html%3A%20m%20%3F%20m.html%20%3A%20null%2C%20component%3A%20m%20%26%26%20m.comp%20%3F%20m.comp%20%3A%20null%2C%20fix%3A%20e.ai.fix%2C%20verify%3A%20verifyOf(e)%20%7D%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20aiText()%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20skips%20%3D%20%5B%5D%2C%20seenS%20%3D%20%7B%7D%2C%20notes%20%3D%20%5B%5D%2C%20probs%20%3D%20openProbs()%2C%20left%20%3D%20openProbs(true).length%20-%20probs.length%2C%20ids%20%3D%20problemsOf(probs)%2C%20groups%20%3D%20%5B%5D%2C%20byKey%20%3D%20%7B%7D%3B%0A%20%20probs.forEach(function%20(e%2C%20i)%20%7B%0A%20%20%20%20var%20m%20%3D%20mainEl(e)%2C%20k%20%3D%20%2F%5E(Missed%20spots%7CHover%20menus%7CForced%20order)%24%2F.test(e.f)%20%26%26%20m%20%3F%20e.f%20%2B%20%22%7C%22%20%2B%20e.ai.fix%20%2B%20%22%7C%22%20%2B%20desc(m.el)%20%2B%20%22%7C%22%20%2B%20m.comp%20%3A%20%22%23%22%20%2B%20i%2C%20g%20%3D%20byKey%5Bk%5D%3B%0A%20%20%20%20if%20(!g)%20groups.push((g%20%3D%20byKey%5Bk%5D%20%3D%20%7B%20i%3A%20i%2C%20list%3A%20%5B%5D%20%7D))%3B%0A%20%20%20%20g.list.push(e)%3B%0A%20%20%7D)%3B%0A%20%20logs.forEach(function%20(e)%20%7B%0A%20%20%20%20var%20t%20%3D%20e.p.map(partText).join(%22%22)%3B%0A%20%20%20%20if%20(e.k%20%3D%3D%3D%20%22SKIPPED%22%20%26%26%20!seenS%5Be.f%20%2B%20t%5D)%20%7B%0A%20%20%20%20%20%20seenS%5Be.f%20%2B%20t%5D%20%3D%201%3B%0A%20%20%20%20%20%20skips.push(e.f%20%2B%20%22%3A%20%22%20%2B%20t)%3B%0A%20%20%20%20%7D%20else%20if%20(e.k%20%3D%3D%3D%20%22INFO%22)%20notes.push(clock(e.t)%20%2B%20%22%20%22%20%2B%20e.f%20%2B%20%22%3A%20%22%20%2B%20t)%3B%0A%20%20%7D)%3B%0A%20%20var%20c%20%3D%20logCounts()%3B%0A%20%20out.push(%22Tab%20trail%20%22%20%2B%20VERSION%20%2B%20%22%20report%20for%20an%20AI%20agent%22)%3B%0A%20%20out.push(%22Page%3A%20%22%20%2B%20addr())%3B%0A%20%20out.push(%22Ran%20on%3A%20%22%20%2B%20stamp()%20%2B%20%22%2C%20%22%20%2B%20browser()%20%2B%20%22%2C%20window%20%22%20%2B%20innerWidth%20%2B%20%22%20x%20%22%20%2B%20innerHeight)%3B%0A%20%20out.push(%22Tool%3A%20Tab%20trail%20(matjazkorosec.com%2Ftools%2Ftab-trail)%2C%20a%20bookmarklet%20that%20checks%20the%20keyboard%20Tab%20order%20of%20the%20page.%20Stop%20numbers%20are%20positions%20in%20the%20Tab%20order%20when%20the%20check%20ran.%20Use%20the%20selectors%2C%20the%20HTML%20and%20the%20component%20names%20to%20find%20each%20element%20in%20the%20code.%22)%3B%0A%20%20out.push(%22Run%20it%20again%20from%20a%20script%20(for%20example%20Playwright)%3A%20save%20https%3A%2F%2Fraw.githubusercontent.com%2Fmatjazkorosec%2Ftab-trail%2Fv%22%20%2B%20VERSION%20%2B%20%22%2Fdist%2Ftab-trail.js%20in%20your%20repo%20once%20and%20load%20your%20saved%20copy%20with%20page.evaluate(readFileSync(...))%2C%20which%20works%20under%20a%20Content%20Security%20Policy.%20Then%20await%20window.__tabTrail.play()%20to%20walk%20every%20stop%2C%20and%20read%20window.__tabTrail.problems()%20for%20every%20open%20problem%20as%20data%2C%20window.__tabTrail.report()%20for%20this%20same%20report%20or%20window.__tabTrail.log()%20for%20every%20line.%22)%3B%0A%20%20out.push(%22%22)%3B%0A%20%20out.push(%22Summary%3A%20%22%20%2B%20pl(probs.length%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22%20to%20fix%22%20%2B%20(groups.length%20%3C%20probs.length%20%3F%20%22%20(%22%20%2B%20pl(groups.length%2C%20%22different%20fix%22%2C%20%22different%20fixes%22)%20%2B%20%22)%22%20%3A%20%22%22)%20%2B%20%22.%20%22%20%2B%20pl(c.ok%2C%20%22check%22%2C%20%22checks%22)%20%2B%20%22%20passed%2C%20%22%20%2B%20c.skip%20%2B%20%22%20skipped.%22)%3B%0A%20%20if%20(walkEnd%20%7C%7C%20walking)%20out.push(%22Play%3A%20%22%20%2B%20playState()%20%2B%20%22.%22)%3B%0A%20%20var%20pass%20%3D%20tally(%22OK%22)%2C%20sk%20%3D%20tally(%22SKIPPED%22)%3B%0A%20%20if%20(pass)%20out.push(%22Passed%3A%20%22%20%2B%20pass%20%2B%20%22.%22)%3B%0A%20%20if%20(sk)%20out.push(%22Skipped%3A%20%22%20%2B%20sk%20%2B%20%22.%22)%3B%0A%20%20var%20ran%20%3D%20ranChecks()%3B%0A%20%20if%20(ran.length)%20out.push(%22Checked%3A%20%22%20%2B%20ran.join(%22%2C%20%22)%20%2B%20%22.%20Each%20check%20is%20explained%20at%20%22%20%2B%20showUrl(ran%5B0%5D).replace(%2F%23.*%2F%2C%20%22%23shows%22)%20%2B%20%22%20under%20Fix%20what%20turns%20red.%22)%3B%0A%20%20if%20(left)%20out.push(%22Left%20out%20on%20purpose%3A%20%22%20%2B%20pl(left%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22%20inside%20%22%20%2B%20ignore.join(%22%2C%20%22)%20%2B%20%22.%22)%3B%0A%20%20if%20(groups.length%20%3E%20CAP)%20out.push(%22Showing%20the%20first%20%22%20%2B%20CAP%20%2B%20%22%20of%20%22%20%2B%20groups.length.toLocaleString(%22en-US%22)%20%2B%20%22%20problems.%20window.__tabTrail.problems()%20returns%20every%20one.%22)%3B%0A%20%20groups.slice(0%2C%20CAP).forEach(function%20(g%2C%20n)%20%7B%0A%20%20%20%20var%20e%20%3D%20g.list%5B0%5D%2C%20i%20%3D%20g.i%2C%20more%20%3D%20g.list.length%20-%202%3B%0A%20%20%20%20out.push(%22%22)%3B%0A%20%20%20%20out.push(%22Problem%20%22%20%2B%20(n%20%2B%201)%20%2B%20%22%20of%20%22%20%2B%20groups.length%20%2B%20%22%3A%20%22%20%2B%20e.f%20%2B%20(g.list.length%20%3E%201%20%3F%20%22%2C%20%22%20%2B%20g.list.length%20%2B%20%22%20elements%20with%20the%20same%20cause%3A%20%22%20%2B%20desc(mainEl(e).el)%20%2B%20%22%20(%22%20%2B%20g.list.slice(0%2C%202).map(function%20(x)%20%7B%20return%20%22%5C%22%22%20%2B%20label(mainEl(x).el)%20%2B%20%22%5C%22%22%3B%20%7D).join(%22%2C%20%22)%20%2B%20(more%20%3E%200%20%3F%20%22%20and%20%22%20%2B%20more%20%2B%20%22%20more%22%20%3A%20%22%22)%20%2B%20%22).%20Fix%20it%20once%20in%20the%20component%20that%20draws%20them.%22%20%3A%20%22%22)%20%2B%20%22%20(%22%20%2B%20clock(e.t)%20%2B%20%22)%22)%3B%0A%20%20%20%20out.push(%22Id%3A%20%22%20%2B%20ids%5Bi%5D.id%20%2B%20(g.list.length%20%3E%201%20%3F%20%22%20(the%20first%20of%20%22%20%2B%20g.list.length%20%2B%20%22%2C%20window.__tabTrail.problems()%20lists%20every%20one)%22%20%3A%20%22%22))%3B%0A%20%20%20%20if%20(e.ai)%20out.push(%22WCAG%3A%20%22%20%2B%20e.ai.crit)%3B%0A%20%20%20%20out.push(%22What%20happened%3A%20%22%20%2B%20e.p.map(partText).join(%22%22))%3B%0A%20%20%20%20if%20(!e.ai)%20return%3B%0A%20%20%20%20out.push(%22Expected%3A%20%22%20%2B%20e.ai.expect)%3B%0A%20%20%20%20e.ai.els.forEach(function%20(x)%20%7B%0A%20%20%20%20%20%20out.push(x.role%20%2B%20%22%3A%20%22%20%2B%20x.sel%20%2B%20(x.el.isConnected%20%3F%20%22%22%20%3A%20%22%20(no%20longer%20on%20the%20page)%22))%3B%0A%20%20%20%20%20%20out.push(%22%20%20HTML%3A%20%22%20%2B%20x.html)%3B%0A%20%20%20%20%20%20if%20(x.comp)%20out.push(%22%20%20Component%3A%20%22%20%2B%20x.comp)%3B%0A%20%20%20%20%20%20var%20where%20%3D%20whereOf(x.el)%3B%0A%20%20%20%20%20%20if%20(where)%20out.push(%22%20%20Where%3A%20%22%20%2B%20where)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20e.ai.more.forEach(function%20(m)%20%7B%20out.push(m)%3B%20%7D)%3B%0A%20%20%20%20out.push(%22Fix%20hint%3A%20%22%20%2B%20e.ai.fix)%3B%0A%20%20%20%20out.push(%22How%20to%20check%20the%20fix%3A%20%22%20%2B%20verifyOf(e))%3B%0A%20%20%20%20if%20(CHECKS.indexOf(e.f)%20%3E%3D%200)%20out.push(%22About%20this%20check%3A%20%22%20%2B%20showUrl(e.f))%3B%0A%20%20%7D)%3B%0A%20%20out.push(%22%22)%3B%0A%20%20out.push(%22Not%20covered%20in%20this%20run%3A%22)%3B%0A%20%20coverage().forEach(function%20(t)%20%7B%20out.push(%22-%20%22%20%2B%20t)%3B%20%7D)%3B%0A%20%20if%20(skips.length)%20%7B%0A%20%20%20%20out.push(%22%22)%3B%0A%20%20%20%20out.push(%22Skipped%20checks%2C%20and%20why%3A%22)%3B%0A%20%20%20%20skips.slice(0%2C%2012).forEach(function%20(t)%20%7B%20out.push(%22-%20%22%20%2B%20t)%3B%20%7D)%3B%0A%20%20%20%20if%20(skips.length%20%3E%2012)%20out.push(%22-%20and%20%22%20%2B%20(skips.length%20-%2012)%20%2B%20%22%20more%22)%3B%0A%20%20%7D%0A%20%20if%20(notes.length)%20%7B%0A%20%20%20%20out.push(%22%22)%3B%0A%20%20%20%20out.push(%22Notes%3A%22)%3B%0A%20%20%20%20notes.slice(-10).forEach(function%20(t)%20%7B%20out.push(%22-%20%22%20%2B%20t)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20return%20out.join(%22%5Cn%22)%3B%0A%7D%0Afunction%20copyIt(b%2C%20w%2C%20text%2C%20word)%20%7B%0A%20%20var%20d%20%3D%20w.document%3B%0A%20%20var%20lb%20%3D%20b.lastChild%20%26%26%20b.lastChild.nodeType%20%3D%3D%3D%203%20%3F%20b.lastChild%20%3A%20b%3B%0A%20%20function%20done(ok)%20%7B%0A%20%20%20%20lb.textContent%20%3D%20ok%20%3F%20%22Copied%22%20%3A%20%22Copy%20failed%22%3B%0A%20%20%20%20setTimeout(function%20()%20%7B%20lb.textContent%20%3D%20word%3B%20%7D%2C%201500)%3B%0A%20%20%7D%0A%20%20function%20old()%20%7B%0A%20%20%20%20var%20back%20%3D%20w%20%3D%3D%3D%20window%20%3F%20deep()%20%3A%20d.activeElement%3B%0A%20%20%20%20var%20ta%20%3D%20d.createElement(%22textarea%22)%3B%0A%20%20%20%20ta.value%20%3D%20text%3B%0A%20%20%20%20ta.setAttribute(%22readonly%22%2C%20%22%22)%3B%0A%20%20%20%20ta.style.cssText%20%3D%20%22position%3Afixed%3Bleft%3A0%3Btop%3A0%3Bwidth%3A1px%3Bheight%3A1px%3Bopacity%3A0%22%3B%0A%20%20%20%20(w%20%3D%3D%3D%20window%20%3F%20root%20%3A%20d.body).appendChild(ta)%3B%0A%20%20%20%20ta.focus(%7B%20preventScroll%3A%20true%20%7D)%3B%0A%20%20%20%20ta.select()%3B%0A%20%20%20%20var%20ok%20%3D%20false%3B%0A%20%20%20%20try%20%7B%20ok%20%3D%20d.execCommand(%22copy%22)%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20ta.remove()%3B%0A%20%20%20%20if%20(back%20%26%26%20back.focus)%20back.focus(%7B%20preventScroll%3A%20true%20%7D)%3B%0A%20%20%20%20done(ok)%3B%0A%20%20%7D%0A%20%20if%20(w.navigator.clipboard%20%26%26%20w.isSecureContext)%20w.navigator.clipboard.writeText(text).then(function%20()%20%7B%20done(true)%3B%20%7D%2C%20old)%3B%0A%20%20else%20old()%3B%0A%7D%0Afunction%20filters(parent%2C%20doc)%20%7B%0A%20%20var%20row%20%3D%20doc.createElement(%22div%22)%3B%0A%20%20row.className%20%3D%20%22lf%22%3B%0A%20%20var%20set%20%3D%20FILT.map(function%20(f)%20%7B%0A%20%20%20%20var%20b%20%3D%20doc.createElement(%22button%22)%3B%0A%20%20%20%20b.type%20%3D%20%22button%22%3B%0A%20%20%20%20b.className%20%3D%20%22lt%22%3B%0A%20%20%20%20b.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20%20%20logFilter%20%3D%20f%5B0%5D%3B%0A%20%20%20%20%20%20logDraw()%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20row.appendChild(b)%3B%0A%20%20%20%20return%20b%3B%0A%20%20%7D)%3B%0A%20%20parent.appendChild(row)%3B%0A%20%20filterSets.push(set)%3B%0A%20%20return%20set%3B%0A%7D%0Afunction%20logSummary()%20%7B%0A%20%20var%20c%20%3D%20logCounts()%3B%0A%20%20logSum.textContent%20%3D%20%22%20%22%20%2B%20pl(c.all%2C%20%22event%22%2C%20%22events%22)%3B%0A%20%20logBad.textContent%20%3D%20c.bad%20%3F%20pl(c.bad%2C%20%22problem%22%2C%20%22problems%22)%20%3A%20%22%22%3B%0A%20%20logGroup.classList.toggle(%22warn%22%2C%20c.bad%20%3E%200)%3B%0A%20%20filterSets.forEach(function%20(set)%20%7B%0A%20%20%20%20set.forEach(function%20(b%2C%20i)%20%7B%0A%20%20%20%20%20%20b.textContent%20%3D%20FILT%5Bi%5D%5B1%5D%20%2B%20%22%20%22%20%2B%20c%5BFILT%5Bi%5D%5B0%5D%5D%3B%0A%20%20%20%20%20%20b.setAttribute(%22aria-pressed%22%2C%20logFilter%20%3D%3D%3D%20FILT%5Bi%5D%5B0%5D%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20%20%20%20%20b.classList.toggle(%22e%22%2C%20FILT%5Bi%5D%5B0%5D%20%3D%3D%3D%20%22bad%22%20%26%26%20c.bad%20%3E%200)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D)%3B%0A%20%20if%20(tabSum%20%26%26%20tabOpen())%20tabSum.textContent%20%3D%20addr()%20%2B%20%22%2C%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%3B%0A%20%20checkedLine(logChecked%2C%20document)%3B%0A%20%20if%20(tabChecked%20%26%26%20tabOpen())%20checkedLine(tabChecked%2C%20logTab.document)%3B%0A%20%20if%20(sumLine%20%26%26%20walkEnd%20%3D%3D%3D%20%22done%22)%20sumDraw()%3B%0A%7D%0Afunction%20logDraw()%20%7B%0A%20%20if%20(logTab%20%26%26%20logTab.closed)%20tabGone()%3B%0A%20%20logSummary()%3B%0A%20%20%5BlogList%2C%20tabList%5D.forEach(function%20(u)%20%7B%20if%20(u)%20while%20(u.firstChild)%20u.removeChild(u.firstChild)%3B%20%7D)%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20e.li%20%3D%20null%3B%20%7D)%3B%0A%20%20var%20away%20%3D%20tabOpen()%3B%0A%20%20logBody.hidden%20%3D%20!logOpen%20%7C%7C%20away%3B%0A%20%20logAway.hidden%20%3D%20!away%3B%0A%20%20logBtn.setAttribute(%22aria-expanded%22%2C%20logBody.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%20%20var%20v%20%3D%20logView()%3B%0A%20%20if%20(!v)%20return%3B%0A%20%20var%20frag%20%3D%20v.ownerDocument.createDocumentFragment()%3B%0A%20%20logs.slice().reverse().forEach(function%20(e)%20%7B%0A%20%20%20%20if%20(!shows(e))%20return%3B%0A%20%20%20%20e.li%20%3D%20logLi(e%2C%20v.ownerDocument)%3B%0A%20%20%20%20frag.appendChild(e.li)%3B%0A%20%20%7D)%3B%0A%20%20v.appendChild(frag)%3B%0A%20%20toTop(v)%3B%0A%7D%0Afunction%20tabGone()%20%7B%0A%20%20logTab%20%3D%20null%3B%0A%20%20tabList%20%3D%20null%3B%0A%20%20tabSum%20%3D%20null%3B%0A%20%20tabChecked%20%3D%20null%3B%0A%20%20wcagBoxes%20%3D%20wcagBoxes.filter(function%20(b)%20%7B%20return%20b.ownerDocument%20%3D%3D%3D%20document%3B%20%7D)%3B%0A%20%20tabNote%20%3D%20null%3B%0A%20%20filterSets%20%3D%20filterSets.filter(function%20(x)%20%7B%20return%20x%20!%3D%3D%20tabSet%3B%20%7D)%3B%0A%20%20tabSet%20%3D%20null%3B%0A%20%20if%20(tabPoll)%20clearInterval(tabPoll)%3B%0A%20%20tabPoll%20%3D%200%3B%0A%7D%0Avar%20TAB_CSS%20%3D%20%5B%0A%20%20%22body%7Bmargin%3A0%3Bpadding%3A12px%3Bbackground%3A%23e4dccd%3Bcolor%3A%231a1612%3Bfont%3A15px%2F1.5%20-apple-system%2Csystem-ui%2C'Segoe%20UI'%2CRoboto%2Csans-serif%7D%22%2C%0A%20%20%22.hd%2C.box%7Bbox-sizing%3Aborder-box%3Bmax-width%3A1200px%3Bmargin%3A0%20auto%3Bbackground%3A%23fbf8f3%3Bborder-radius%3A12px%7D%22%2C%0A%20%20%22.wide%20.hd%2C.wide%20.box%7Bmax-width%3Anone%7D%22%2C%0A%20%20%22.fw%7Bdisplay%3Ainline-grid%3Bplace-items%3Acenter%3Bwidth%3A34px%3Bheight%3A34px%3Bpadding%3A0%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A8px%3Bbackground%3A%23fff%3Bcolor%3A%231a1612%3Bcursor%3Apointer%3Bbox-sizing%3Aborder-box%7D%22%2C%0A%20%20%22.fw%3Ahover%7Bbackground%3A%23efe8dc%7D%22%2C%0A%20%20%22.fw%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.fw%20.in%2C.wide%20.fw%20.out%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.wide%20.fw%20.in%7Bdisplay%3Ainline%7D%22%2C%0A%20%20%22.hd%7Bposition%3Asticky%3Btop%3A12px%3Bz-index%3A1%3Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Balign-items%3Acenter%3Bgap%3A10px%208px%3Bpadding%3A14px%2018px%3Bbox-shadow%3A0%200%200%2012px%20%23e4dccd%7D%22%2C%0A%20%20%22.box%7Bmargin-top%3A8px%3Bpadding%3A12px%200%208px%3Boverflow%3Ahidden%7D%22%2C%0A%20%20%22h1%7Bmargin%3A0%3Bfont%3A700%2022px%2F1.2%20Georgia%2Cserif%7D%22%2C%0A%20%20%22.u%7Bmargin%3A0%20auto%200%206px%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.nt%7Bflex-basis%3A100%25%3Bmargin%3A0%3Bcolor%3A%23d0103a%3Bfont-weight%3A700%7D%22%2C%0A%20%20%22.nt%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lf%7Bdisplay%3Ainline-grid%3Bgrid-auto-flow%3Acolumn%3Bgap%3A2px%3Bpadding%3A3px%3Bbackground%3A%23efe8dc%3Bborder-radius%3A10px%3Bmargin-right%3A14px%7D%22%2C%0A%20%20%22.fr%7Bflex-basis%3A100%25%3Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Balign-items%3Acenter%3Bgap%3A8px%200%7D%22%2C%0A%20%20%22.lt%2C.kl%2C.ka%2C.lo%2C.lc%7Bfont%3Ainherit%3Bcolor%3Ainherit%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lt%7Bpadding%3A3px%2014px%3Bborder%3A0%3Bborder-radius%3A7px%3Bbackground%3Anone%3Bcolor%3A%235f564c%3Bfont-weight%3A600%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.lt%3Ahover%7Bcolor%3A%231a1612%3Bbackground%3Argba(26%2C22%2C18%2C.06)%7D%22%2C%0A%20%20%22.lt%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23fff%3Bcolor%3A%231a1612%3Bbox-shadow%3A0%201px%202px%20rgba(26%2C22%2C18%2C.2)%7D%22%2C%0A%20%20%22.lt.e%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lt.e%3Ahover%7Bbackground%3Argba(208%2C16%2C58%2C.1)%7D%22%2C%0A%20%20%22.lt.e%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.kl%2C.ka%2C.lo%7Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A7px%3Bheight%3A34px%3Bpadding%3A0%2014px%3Bborder-radius%3A8px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bwhite-space%3Anowrap%3Bbox-sizing%3Aborder-box%7D%22%2C%0A%20%20%22.kl%2C.lo%7Bborder%3A1.5px%20solid%20%231a1612%3Bbackground%3A%23fff%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.kl%3Ahover%2C.lo%3Ahover%7Bbackground%3A%23efe8dc%7D%22%2C%0A%20%20%22.ka%7Bborder%3A0%3Bbackground%3A%231a1612%3Bcolor%3A%23fbf8f3%7D%22%2C%0A%20%20%22.ka%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.lo%7Bfont-weight%3A600%7D%22%2C%0A%20%20%22.lt%3Afocus-visible%2C.kl%3Afocus-visible%2C.ka%3Afocus-visible%2C.lo%3Afocus-visible%2C.lc%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lck%7Bmargin%3A0%3Bpadding%3A0%2018px%208px%7D%22%2C%0A%20%20%22.lck%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lq%7Bcolor%3A%231e3a8a%3Bfont-weight%3A700%3Btext-decoration%3Anone%7D%22%2C%0A%20%20%22.lq%3Ahover%7Btext-decoration%3Aunderline%3Btext-underline-offset%3A2px%7D%22%2C%0A%20%20%22.wc%7Bcolor%3A%231f7a3f%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.nw%20.wc%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lw%7Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A8px%3Bfont-size%3A14px%3Bcolor%3A%231f7a3f%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%7Bwidth%3A16px%3Bheight%3A16px%3Bmargin%3A0%3Baccent-color%3A%23c2410c%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lq.bad%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lq%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%3Bborder-radius%3A2px%7D%22%2C%0A%20%20%22.ll%7Blist-style%3Anone%3Bmargin%3A0%3Bpadding%3A0%7D%22%2C%0A%20%20%22.lx%7Bdisplay%3Agrid%3Bgrid-template-columns%3A72px%2080px%201fr%3Bgap%3A2px%2012px%3Bpadding%3A6px%2018px%3Balign-items%3Abaseline%7D%22%2C%0A%20%20%22.lx%3Ahover%7Bbackground%3A%23f3ede3%7D%22%2C%0A%20%20%22.lx%20.bd%7Bmin-width%3A0%3Boverflow-wrap%3Aanywhere%7D%22%2C%0A%20%20%22.lx.bad%7Bbackground%3Argba(208%2C16%2C58%2C.07)%7D%22%2C%0A%20%20%22.tm%2C.st%7Bfont%3A500%2014px%2F1.5%20ui-monospace%2CSFMono-Regular%2CMenlo%2CConsolas%2Cmonospace%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.st%7Bfont-weight%3A700%7D%22%2C%0A%20%20%22.ok%20.st%7Bcolor%3A%231f7a3f%7D.bad%20.st%7Bcolor%3A%23d0103a%7D.skip%20.st%7Bcolor%3A%235f564c%7D.info%20.st%7Bcolor%3A%231e3a8a%7D%22%2C%0A%20%20%22.ft%7Bcolor%3A%231e3a8a%7D.bad%20.ft%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lc%7Bdisplay%3Ainline-block%3Bmin-width%3A24px%3Bpadding%3A0%206px%3Bborder%3A1px%20dashed%20%231a1612%3Bborder-radius%3A999px%3Bbackground%3Anone%3Bfont-size%3A14px%3Bline-height%3A1.4%3Btext-align%3Acenter%7D%22%2C%0A%20%20%22.lc%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%0A%5D.join(%22%22)%3B%0Avar%20ownName%20%3D%20false%2C%20tabWide%20%3D%20false%3B%0Afunction%20openTab()%20%7B%0A%20%20var%20w%20%3D%20window.open(%22%22%2C%20%22_blank%22)%3B%0A%20%20if%20(!w)%20%7B%0A%20%20%20%20tabMsg.hidden%20%3D%20false%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20tabMsg.hidden%20%3D%20true%3B%0A%20%20logTab%20%3D%20w%3B%0A%20%20if%20(!window.name)%20%7B%0A%20%20%20%20window.name%20%3D%20%22tab-trail-%22%20%2B%20Date.now()%3B%0A%20%20%20%20ownName%20%3D%20true%3B%0A%20%20%7D%0A%20%20var%20d%20%3D%20w.document%3B%0A%20%20d.title%20%3D%20%22Tab%20trail%20log%3A%20%22%20%2B%20location.host%3B%0A%20%20try%20%7B%0A%20%20%20%20var%20tsh%20%3D%20new%20w.CSSStyleSheet()%3B%0A%20%20%20%20tsh.replaceSync(TAB_CSS)%3B%0A%20%20%20%20d.adoptedStyleSheets%20%3D%20%5Btsh%5D%3B%0A%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20var%20st%20%3D%20d.createElement(%22style%22)%3B%0A%20%20%20%20st.textContent%20%3D%20TAB_CSS%3B%0A%20%20%20%20d.head.appendChild(st)%3B%0A%20%20%7D%0A%20%20var%20hd%20%3D%20d.createElement(%22div%22)%3B%0A%20%20hd.className%20%3D%20%22hd%22%3B%0A%20%20var%20h1%20%3D%20d.createElement(%22h1%22)%3B%0A%20%20h1.textContent%20%3D%20%22Tab%20trail%20log%22%3B%0A%20%20hd.appendChild(h1)%3B%0A%20%20tabSum%20%3D%20d.createElement(%22p%22)%3B%0A%20%20tabSum.className%20%3D%20%22u%22%3B%0A%20%20hd.appendChild(tabSum)%3B%0A%20%20var%20cp%20%3D%20d.createElement(%22button%22)%3B%0A%20%20cp.type%20%3D%20%22button%22%3B%0A%20%20cp.className%20%3D%20%22kl%22%3B%0A%20%20icon(cp%2C%2016%2C%20COPY_ICON%2C%201.6)%3B%0A%20%20cp.appendChild(d.createTextNode(%22Copy%20log%22))%3B%0A%20%20cp.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(cp%2C%20w%2C%20logText()%2C%20%22Copy%20log%22)%3B%20%7D)%3B%0A%20%20hd.appendChild(cp)%3B%0A%20%20var%20ca%20%3D%20d.createElement(%22button%22)%3B%0A%20%20ca.type%20%3D%20%22button%22%3B%0A%20%20ca.className%20%3D%20%22ka%22%3B%0A%20%20icon(ca%2C%2016%2C%20AI_ICON%2C%201.6)%3B%0A%20%20ca.appendChild(d.createTextNode(%22Copy%20for%20AI%22))%3B%0A%20%20ca.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(ca%2C%20w%2C%20aiText()%2C%20%22Copy%20for%20AI%22)%3B%20%7D)%3B%0A%20%20hd.appendChild(ca)%3B%0A%20%20var%20bk%20%3D%20d.createElement(%22button%22)%3B%0A%20%20bk.type%20%3D%20%22button%22%3B%0A%20%20bk.className%20%3D%20%22lo%22%3B%0A%20%20bk.textContent%20%3D%20%22Put%20back%20in%20panel%22%3B%0A%20%20bk.addEventListener(%22click%22%2C%20putBack)%3B%0A%20%20hd.appendChild(bk)%3B%0A%20%20var%20fw%20%3D%20d.createElement(%22button%22)%3B%0A%20%20fw.type%20%3D%20%22button%22%3B%0A%20%20fw.className%20%3D%20%22fw%22%3B%0A%20%20fw.setAttribute(%22aria-label%22%2C%20%22Full%20width%22)%3B%0A%20%20fw.title%20%3D%20%22Full%20width%22%3B%0A%20%20fw.setAttribute(%22aria-pressed%22%2C%20tabWide%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20icon(fw%2C%2016%2C%20%22M1.5%208h13M1.5%208l3-3M1.5%208l3%203M14.5%208l-3-3M14.5%208l-3%203%22%2C%201.6).setAttribute(%22class%22%2C%20%22out%22)%3B%0A%20%20icon(fw%2C%2016%2C%20%22M1.5%208h4.5M6%208l-3-3M6%208l-3%203M14.5%208H10M10%208l3-3M10%208l3%203%22%2C%201.6).setAttribute(%22class%22%2C%20%22in%22)%3B%0A%20%20fw.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20tabWide%20%3D%20!tabWide%3B%0A%20%20%20%20d.body.classList.toggle(%22wide%22%2C%20tabWide)%3B%0A%20%20%20%20fw.setAttribute(%22aria-pressed%22%2C%20tabWide%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20%7D)%3B%0A%20%20hd.appendChild(fw)%3B%0A%20%20d.body.classList.toggle(%22wide%22%2C%20tabWide)%3B%0A%20%20tabNote%20%3D%20d.createElement(%22p%22)%3B%0A%20%20tabNote.className%20%3D%20%22nt%22%3B%0A%20%20tabNote.textContent%20%3D%20%22Tab%20trail%20was%20closed%20on%20the%20page.%20This%20log%20no%20longer%20updates.%22%3B%0A%20%20tabNote.hidden%20%3D%20true%3B%0A%20%20hd.appendChild(tabNote)%3B%0A%20%20var%20fr%20%3D%20d.createElement(%22div%22)%3B%0A%20%20fr.className%20%3D%20%22fr%22%3B%0A%20%20hd.appendChild(fr)%3B%0A%20%20tabSet%20%3D%20filters(fr%2C%20d)%3B%0A%20%20wcagBox(fr%2C%20d)%3B%0A%20%20d.body.appendChild(hd)%3B%0A%20%20d.body.classList.toggle(%22nw%22%2C%20!showWcag)%3B%0A%20%20var%20bd%20%3D%20d.createElement(%22div%22)%3B%0A%20%20bd.className%20%3D%20%22box%22%3B%0A%20%20d.body.appendChild(bd)%3B%0A%20%20tabChecked%20%3D%20d.createElement(%22p%22)%3B%0A%20%20tabChecked.className%20%3D%20%22lck%22%3B%0A%20%20bd.appendChild(tabChecked)%3B%0A%20%20tabList%20%3D%20d.createElement(%22ul%22)%3B%0A%20%20tabList.className%20%3D%20%22ll%22%3B%0A%20%20bd.appendChild(tabList)%3B%0A%20%20tabPoll%20%3D%20setInterval(function%20()%20%7B%0A%20%20%20%20if%20(logTab%20%26%26%20logTab.closed)%20%7B%0A%20%20%20%20%20%20tabGone()%3B%0A%20%20%20%20%20%20logDraw()%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%201000)%3B%0A%20%20logOpen%20%3D%20true%3B%0A%20%20logDraw()%3B%0A%7D%0Afunction%20putBack()%20%7B%0A%20%20var%20w%20%3D%20logTab%3B%0A%20%20tabGone()%3B%0A%20%20logOpen%20%3D%20true%3B%0A%20%20logDraw()%3B%0A%20%20if%20(w%20%26%26%20!w.closed)%20w.close()%3B%0A%7D%0Afunction%20lbtn(cls%2C%20text%2C%20parent)%20%7B%0A%20%20var%20b%20%3D%20document.createElement(%22button%22)%3B%0A%20%20b.type%20%3D%20%22button%22%3B%0A%20%20b.className%20%3D%20cls%3B%0A%20%20b.textContent%20%3D%20text%3B%0A%20%20parent.appendChild(b)%3B%0A%20%20return%20b%3B%0A%7D%0Avar%20logGroup%20%3D%20document.createElement(%22div%22)%3B%0AlogGroup.className%20%3D%20%22lgp%22%3B%0Avar%20logBtn%20%3D%20document.createElement(%22button%22)%3B%0AlogBtn.type%20%3D%20%22button%22%3B%0AlogBtn.className%20%3D%20%22sg%22%3B%0AlogBtn.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Avar%20logWord%20%3D%20document.createElement(%22b%22)%3B%0AlogWord.textContent%20%3D%20%22Log%22%3B%0Aicon(logBtn%2C%2016%2C%20%22M4%201.5h8v13H4zM6.5%205h3M6.5%208h3M6.5%2011h2%22%2C%201.6)%3B%0AlogBtn.appendChild(logWord)%3B%0Avar%20logSum%20%3D%20document.createElement(%22span%22)%3B%0AlogSum.className%20%3D%20%22ls%22%3B%0Avar%20logBad%20%3D%20document.createElement(%22span%22)%3B%0AlogBad.className%20%3D%20%22bg%22%3B%0Avar%20logInfo%20%3D%20document.createElement(%22span%22)%3B%0AlogInfo.appendChild(logSum)%3B%0AlogBtn.appendChild(logInfo)%3B%0AlogBtn.appendChild(logBad)%3B%0AlogBtn.appendChild(document.createElement(%22i%22))%3B%0AlogGroup.appendChild(logBtn)%3B%0Avar%20logBody%20%3D%20document.createElement(%22div%22)%3B%0AlogBody.className%20%3D%20%22lbd%22%3B%0AlogBody.hidden%20%3D%20true%3B%0AlogGroup.appendChild(logBody)%3B%0Avar%20logTop%20%3D%20document.createElement(%22div%22)%3B%0AlogTop.className%20%3D%20%22lr%20lrt%22%3B%0AlogBody.appendChild(logTop)%3B%0Avar%20logChecked%20%3D%20document.createElement(%22p%22)%3B%0AlogChecked.className%20%3D%20%22lck%22%3B%0AlogChecked.hidden%20%3D%20true%3B%0AlogBody.appendChild(logChecked)%3B%0Afilters(logBody%2C%20document)%3B%0AwcagBox(logBody%2C%20document)%3B%0Avar%20logList%20%3D%20document.createElement(%22ul%22)%3B%0AlogList.className%20%3D%20%22ll%22%3B%0AlogBody.appendChild(logList)%3B%0Avar%20logRow%20%3D%20document.createElement(%22div%22)%3B%0AlogRow.className%20%3D%20%22lr%20lb2%22%3B%0AlogBody.appendChild(logRow)%3B%0Avar%20copyBtn%20%3D%20lbtn(%22kl%22%2C%20%22Copy%20log%22%2C%20logRow)%3B%0AcopyBtn.insertBefore(icon(copyBtn%2C%2016%2C%20COPY_ICON%2C%201.6)%2C%20copyBtn.firstChild)%3B%0AcopyBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(copyBtn%2C%20window%2C%20logText()%2C%20%22Copy%20log%22)%3B%20%7D)%3B%0Avar%20aiLog%20%3D%20lbtn(%22ka%22%2C%20%22Copy%20for%20AI%22%2C%20logRow)%3B%0AaiLog.insertBefore(icon(aiLog%2C%2016%2C%20AI_ICON%2C%201.6)%2C%20aiLog.firstChild)%3B%0AaiLog.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(aiLog%2C%20window%2C%20aiText()%2C%20%22Copy%20for%20AI%22)%3B%20%7D)%3B%0Afunction%20newTabBtn(parent)%20%7B%0A%20%20var%20b%20%3D%20lbtn(%22lnt%22%2C%20%22%22%2C%20parent)%3B%0A%20%20icon(b%2C%2014%2C%20%22M9%202.5h4.5V7M13.5%202.5L7.5%208.5M12%209.5v4h-9.5v-9.5h4%22%2C%201.6)%3B%0A%20%20b.appendChild(document.createTextNode(%22Open%20log%20in%20new%20tab%22))%3B%0A%20%20b.addEventListener(%22click%22%2C%20openTab)%3B%0A%20%20return%20b%3B%0A%7D%0AnewTabBtn(logTop)%3B%0Avar%20logEnd%20%3D%20document.createElement(%22div%22)%3B%0AlogEnd.className%20%3D%20%22lr%22%3B%0AlogBody.insertBefore(logEnd%2C%20logRow.nextSibling)%3B%0AnewTabBtn(logEnd)%3B%0Avar%20tabMsg%20%3D%20document.createElement(%22p%22)%3B%0AtabMsg.className%20%3D%20%22lm%22%3B%0AtabMsg.textContent%20%3D%20%22The%20browser%20blocked%20the%20new%20tab.%20Allow%20pop-ups%20for%20this%20site%20and%20try%20again.%22%3B%0AtabMsg.hidden%20%3D%20true%3B%0AlogBody.insertBefore(tabMsg%2C%20logChecked)%3B%0Avar%20logAway%20%3D%20document.createElement(%22div%22)%3B%0AlogAway.className%20%3D%20%22la%22%3B%0AlogAway.hidden%20%3D%20true%3B%0Avar%20awayText%20%3D%20document.createElement(%22p%22)%3B%0AawayText.textContent%20%3D%20%22The%20log%20is%20open%20in%20a%20new%20tab.%22%3B%0AlogAway.appendChild(awayText)%3B%0Avar%20awayRow%20%3D%20document.createElement(%22div%22)%3B%0AawayRow.className%20%3D%20%22lr%22%3B%0AlogAway.appendChild(awayRow)%3B%0Albtn(%22lo%22%2C%20%22Show%20it%22%2C%20awayRow).addEventListener(%22click%22%2C%20function%20()%20%7B%20if%20(tabOpen())%20logTab.focus()%3B%20%7D)%3B%0Albtn(%22lo%22%2C%20%22Put%20it%20back%22%2C%20awayRow).addEventListener(%22click%22%2C%20putBack)%3B%0AlogGroup.appendChild(logAway)%3B%0AlogBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20if%20(tabOpen())%20return%20logTab.focus()%3B%0A%20%20logOpen%20%3D%20!logOpen%3B%0A%20%20logDraw()%3B%0A%20%20if%20(!logOpen)%20return%3B%0A%20%20var%20gr%20%3D%20logGroup.getBoundingClientRect()%2C%20pr%20%3D%20panel.getBoundingClientRect()%3B%0A%20%20if%20(gr.bottom%20%3E%20pr.bottom)%20panel.scrollTop%20%2B%3D%20Math.min(gr.bottom%20-%20pr.bottom%2C%20gr.top%20-%20pr.top)%3B%0A%7D)%3B%0Atray.insertBefore(logGroup%2C%20tray.firstChild)%3B%0AlogGroup.className%20%3D%20%22lgp%20sec%22%3B%0A%5B%5BlegendBtn%2C%20legend%5D%2C%20%5BkeysBtn%2C%20keysBox%5D%2C%20%5Bgear%2C%20settings%5D%5D.forEach(function%20(p)%20%7B%0A%20%20var%20w%20%3D%20document.createElement(%22div%22)%3B%0A%20%20w.className%20%3D%20%22sec%22%3B%0A%20%20tray.insertBefore(w%2C%20p%5B0%5D)%3B%0A%20%20w.appendChild(p%5B0%5D)%3B%0A%20%20w.appendChild(p%5B1%5D)%3B%0A%7D)%3B%0A%5BlogBtn%2C%20legendBtn%2C%20keysBtn%2C%20gear%5D.forEach(function%20(b)%20%7B%0A%20%20var%20g%20%3D%20b.querySelector(%22svg%22)%2C%20t%20%3D%20document.createElement(%22span%22)%3B%0A%20%20t.className%20%3D%20%22ic%22%3B%0A%20%20b.insertBefore(t%2C%20g)%3B%0A%20%20t.appendChild(g)%3B%0A%7D)%3B%0AwcagSync()%3B%0AlogSummary()%3B%0Aroot.appendChild(panel)%3B%0AskipPanel()%3B%0Avar%20closed%20%3D%20false%3B%0Afunction%20place()%20%7B%0A%20%20if%20(closed)%20return%3B%0A%20%20var%20m%20%3D%20modal()%2C%20to%20%3D%20m%20%7C%7C%20document.documentElement%3B%0A%20%20if%20(host.parentNode%20!%3D%3D%20to)%20to.appendChild(host)%3B%0A%20%20var%20want%20%3D%20%7B%20position%3A%20m%20%3F%20%22fixed%22%20%3A%20%22absolute%22%2C%20left%3A%20m%20%3F%20-scrollX%20%2B%20%22px%22%20%3A%20%220px%22%2C%20top%3A%20m%20%3F%20-scrollY%20%2B%20%22px%22%20%3A%20%220px%22%20%7D%3B%0A%20%20for%20(var%20k%20in%20want)%20if%20(host.style%5Bk%5D%20!%3D%3D%20want%5Bk%5D)%20host.style%5Bk%5D%20%3D%20want%5Bk%5D%3B%0A%7D%0Aplace()%3B%0A%0Afunction%20el(name%2C%20attrs%2C%20parent)%20%7B%0A%20%20var%20n%20%3D%20document.createElementNS(NS%2C%20name)%3B%0A%20%20for%20(var%20k%20in%20attrs)%20n.setAttribute(k%2C%20attrs%5Bk%5D)%3B%0A%20%20parent.appendChild(n)%3B%0A%20%20return%20n%3B%0A%7D%0Avar%20queued%20%3D%20false%2C%20onlyScreen%20%3D%20true%2C%20boxKey%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20-1%3B%0Avar%20pinned%20%3D%20new%20WeakMap()%3B%0Afunction%20isPinned(e)%20%7B%0A%20%20if%20(pinned.has(e))%20return%20pinned.get(e)%3B%0A%20%20var%20p%20%3D%20false%3B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement%20%7C%7C%20(n.getRootNode()%20%26%26%20n.getRootNode().host))%20%7B%0A%20%20%20%20var%20pos%20%3D%20getComputedStyle(n).position%3B%0A%20%20%20%20if%20(pos%20%3D%3D%3D%20%22fixed%22%20%7C%7C%20pos%20%3D%3D%3D%20%22sticky%22)%20%7B%20p%20%3D%20true%3B%20break%3B%20%7D%0A%20%20%7D%0A%20%20pinned.set(e%2C%20p)%3B%0A%20%20return%20p%3B%0A%7D%0Afunction%20clear(g)%20%7B%20while%20(g.firstChild)%20g.removeChild(g.firstChild)%3B%20%7D%0Avar%20spotEl%20%3D%20null%3B%0Afunction%20lit(r)%20%7B%0A%20%20clear(spot)%3B%0A%20%20if%20(!light.checked)%20return%3B%0A%20%20var%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%2C%20d%20%3D%20%22M0%200H%22%20%2B%20W%20%2B%20%22V%22%20%2B%20H%20%2B%20%22H0Z%22%3B%0A%20%20if%20(r%20%26%26%20(r.width%20%7C%7C%20r.height))%20%7B%0A%20%20%20%20var%20x0%20%3D%20r.left%20-%206%2C%20y0%20%3D%20r.top%20-%206%2C%20x1%20%3D%20r.right%20%2B%206%2C%20y1%20%3D%20r.bottom%20%2B%206%2C%20k%20%3D%20Math.min(8%2C%20(x1%20-%20x0)%20%2F%202%2C%20(y1%20-%20y0)%20%2F%202)%3B%0A%20%20%20%20d%20%2B%3D%20%22M%22%20%2B%20(x0%20%2B%20k)%20%2B%20%22%20%22%20%2B%20y0%20%2B%20%22H%22%20%2B%20(x1%20-%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20x1%20%2B%20%22%20%22%20%2B%20(y0%20%2B%20k)%20%2B%20%22V%22%20%2B%20(y1%20-%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20(x1%20-%20k)%20%2B%20%22%20%22%20%2B%20y1%20%2B%20%22H%22%20%2B%20(x0%20%2B%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20x0%20%2B%20%22%20%22%20%2B%20(y1%20-%20k)%20%2B%20%22V%22%20%2B%20(y0%20%2B%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20(x0%20%2B%20k)%20%2B%20%22%20%22%20%2B%20y0%20%2B%20%22Z%22%3B%0A%20%20%7D%0A%20%20el(%22path%22%2C%20%7B%20d%3A%20d%2C%20fill%3A%20%22rgba(15%2C12%2C10%2C.72)%22%2C%20%22fill-rule%22%3A%20%22evenodd%22%20%7D%2C%20spot)%3B%0A%7D%0Afunction%20box(m%2C%20r%2C%20layer)%20%7B%0A%20%20if%20(m%20%3D%3D%3D%20shownEl)%20%7B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20r.left%20-%206%2C%20y%3A%20r.top%20-%206%2C%20width%3A%20r.width%20%2B%2012%2C%20height%3A%20r.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%208%2C%20rx%3A%206%20%7D%2C%20layer)%3B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20r.left%20-%206%2C%20y%3A%20r.top%20-%206%2C%20width%3A%20r.width%20%2B%2012%2C%20height%3A%20r.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%204%2C%20rx%3A%206%20%7D%2C%20layer)%3B%0A%20%20%7D%0A%20%20el(%22rect%22%2C%20%7B%20x%3A%20r.left%2C%20y%3A%20r.top%2C%20width%3A%20r.width%2C%20height%3A%20r.height%2C%20fill%3A%20%22rgba(208%2C16%2C58%2C.12)%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-dasharray%22%3A%20%227%205%22%2C%20rx%3A%203%20%7D%2C%20layer)%3B%0A%7D%0Afunction%20trailLine(pts%2C%20layer)%20%7B%0A%20%20if%20(pts.length%20%3C%202)%20return%3B%0A%20%20var%20p%20%3D%20pts.map(function%20(q)%20%7B%20return%20q%5B0%5D%20%2B%20%22%2C%22%20%2B%20q%5B1%5D%3B%20%7D).join(%22%20%22)%3B%0A%20%20el(%22polyline%22%2C%20%7B%20points%3A%20p%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%206%2C%20%22stroke-linejoin%22%3A%20%22round%22%2C%20%22stroke-linecap%22%3A%20%22round%22%2C%20opacity%3A%200.9%20%7D%2C%20layer)%3B%0A%20%20el(%22polyline%22%2C%20%7B%20points%3A%20p%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23ff8f57%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-linejoin%22%3A%20%22round%22%2C%20%22stroke-linecap%22%3A%20%22round%22%20%7D%2C%20layer)%3B%0A%7D%0Afunction%20dotsIn(list%2C%20layer)%20%7B%0A%20%20list.sort(function%20(a%2C%20b)%20%7B%20return%20(a%5B2%5D%20-%201%20%3D%3D%3D%20current)%20-%20(b%5B2%5D%20-%201%20%3D%3D%3D%20current)%3B%20%7D)%3B%0A%20%20list.forEach(function%20(d)%20%7B%0A%20%20%20%20var%20big%20%3D%20d%5B2%5D%20%3E%2099%2C%20on%20%3D%20d%5B2%5D%20-%201%20%3D%3D%3D%20current%3B%0A%20%20%20%20var%20g%20%3D%20el(%22g%22%2C%20%7B%20class%3A%20%22o%22%2C%20%22data-i%22%3A%20d%5B2%5D%20-%201%20%7D%2C%20layer)%3B%0A%20%20%20%20if%20(on)%20el(%22circle%22%2C%20%7B%20cx%3A%20d%5B0%5D%2C%20cy%3A%20d%5B1%5D%2C%20r%3A%20big%20%3F%2019%20%3A%2017%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23ff8f57%22%2C%20%22stroke-width%22%3A%204%20%7D%2C%20g)%3B%0A%20%20%20%20if%20(d%5B3%5D%20%26%26%20!on)%20el(%22circle%22%2C%20%7B%20cx%3A%20d%5B0%5D%2C%20cy%3A%20d%5B1%5D%2C%20r%3A%20big%20%3F%2014%20%3A%2012%2C%20fill%3A%20%22%23fff%22%2C%20stroke%3A%20%22%231a1612%22%2C%20%22stroke-width%22%3A%202%2C%20%22stroke-dasharray%22%3A%20%224%203%22%20%7D%2C%20g)%3B%0A%20%20%20%20else%20el(%22circle%22%2C%20%7B%20cx%3A%20d%5B0%5D%2C%20cy%3A%20d%5B1%5D%2C%20r%3A%20big%20%3F%2014%20%3A%2012%2C%20fill%3A%20on%20%3F%20%22%23c2410c%22%20%3A%20%22%231a1612%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%202%20%7D%2C%20g)%3B%0A%20%20%20%20var%20t%20%3D%20el(%22text%22%2C%20%7B%20x%3A%20d%5B0%5D%2C%20y%3A%20d%5B1%5D%20%2B%200.5%2C%20fill%3A%20d%5B3%5D%20%26%26%20!on%20%3F%20%22%231a1612%22%20%3A%20%22%23fff%22%2C%20%22font-size%22%3A%20big%20%3F%2010%20%3A%2011%2C%20%22font-weight%22%3A%20700%2C%20%22font-family%22%3A%20%22system-ui%2Csans-serif%22%2C%20%22text-anchor%22%3A%20%22middle%22%2C%20%22dominant-baseline%22%3A%20%22middle%22%20%7D%2C%20g)%3B%0A%20%20%20%20t.textContent%20%3D%20d%5B2%5D%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20shortLines(pts%2C%20sx%2C%20sy)%20%7B%0A%20%20var%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%2C%20MAX%20%3D%20100%3B%0A%20%20var%20v%20%3D%20pts.map(function%20(p)%20%7B%20return%20p%5B2%5D%20%3F%20%5Bp%5B0%5D%2C%20p%5B1%5D%5D%20%3A%20%5Bp%5B0%5D%20-%20sx%2C%20p%5B1%5D%20-%20sy%5D%3B%20%7D)%3B%0A%20%20function%20on(p)%20%7B%20return%20p%5B0%5D%20%3E%3D%200%20%26%26%20p%5B0%5D%20%3C%3D%20W%20%26%26%20p%5B1%5D%20%3E%3D%200%20%26%26%20p%5B1%5D%20%3C%3D%20H%3B%20%7D%0A%20%20function%20arrow(from%2C%20to%2C%20L)%20%7B%0A%20%20%20%20var%20dx%20%3D%20to%5B0%5D%20-%20from%5B0%5D%2C%20dy%20%3D%20to%5B1%5D%20-%20from%5B1%5D%2C%20len%20%3D%20Math.sqrt(dx%20*%20dx%20%2B%20dy%20*%20dy)%20%7C%7C%201%3B%0A%20%20%20%20var%20ux%20%3D%20dx%20%2F%20len%2C%20uy%20%3D%20dy%20%2F%20len%3B%0A%20%20%20%20var%20tip%20%3D%20%5Bfrom%5B0%5D%20%2B%20ux%20*%20L%2C%20from%5B1%5D%20%2B%20uy%20*%20L%5D%3B%0A%20%20%20%20trailLine(%5Bfrom%2C%20tip%5D%2C%20svg)%3B%0A%20%20%20%20var%20pts3%20%3D%20%5B%5Btip%5B0%5D%20%2B%20ux%20*%206%2C%20tip%5B1%5D%20%2B%20uy%20*%206%5D%2C%20%5Btip%5B0%5D%20-%20ux%20*%209%20%2B%20uy%20*%209%2C%20tip%5B1%5D%20-%20uy%20*%209%20-%20ux%20*%209%5D%2C%20%5Btip%5B0%5D%20-%20ux%20*%209%20-%20uy%20*%209%2C%20tip%5B1%5D%20-%20uy%20*%209%20%2B%20ux%20*%209%5D%5D%3B%0A%20%20%20%20el(%22polygon%22%2C%20%7B%20points%3A%20pts3.map(function%20(q)%20%7B%20return%20q%5B0%5D%20%2B%20%22%2C%22%20%2B%20q%5B1%5D%3B%20%7D).join(%22%20%22)%2C%20fill%3A%20%22%23ff8f57%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%202%2C%20%22stroke-linejoin%22%3A%20%22round%22%20%7D%2C%20svg)%3B%0A%20%20%7D%0A%20%20for%20(var%20k%20%3D%201%3B%20k%20%3C%20v.length%3B%20k%2B%2B)%20%7B%0A%20%20%20%20var%20a%20%3D%20v%5Bk%20-%201%5D%2C%20b%20%3D%20v%5Bk%5D%2C%20ia%20%3D%20on(a)%2C%20ib%20%3D%20on(b)%3B%0A%20%20%20%20var%20len%20%3D%20Math.sqrt((b%5B0%5D%20-%20a%5B0%5D)%20*%20(b%5B0%5D%20-%20a%5B0%5D)%20%2B%20(b%5B1%5D%20-%20a%5B1%5D)%20*%20(b%5B1%5D%20-%20a%5B1%5D))%3B%0A%20%20%20%20if%20(ia%20%26%26%20ib%20%26%26%20len%20%3C%3D%20MAX)%20trailLine(%5Ba%2C%20b%5D%2C%20svg)%3B%0A%20%20%20%20else%20if%20(ia%20%26%26%20ib)%20%7B%0A%20%20%20%20%20%20var%20L%20%3D%20Math.min(MAX%20-%206%2C%20len%20%2F%202%20-%2012)%3B%0A%20%20%20%20%20%20arrow(a%2C%20b%2C%20L)%3B%0A%20%20%20%20%20%20arrow(b%2C%20a%2C%20L)%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20(ia%20%7C%7C%20ib)%20arrow(ia%20%3F%20a%20%3A%20b%2C%20ia%20%3F%20b%20%3A%20a%2C%20Math.min(MAX%20-%206%2C%20len))%3B%0A%20%20%7D%0A%7D%0Afunction%20draw()%20%7B%0A%20%20queued%20%3D%20false%3B%0A%20%20var%20page%20%3D%20!onlyScreen%3B%0A%20%20onlyScreen%20%3D%20true%3B%0A%20%20var%20sx%20%3D%20scrollX%2C%20sy%20%3D%20scrollY%3B%0A%20%20var%20last%20%3D%20Math.max(Math.ceil(stops.length%20%2F%20PAGE)%20-%201%2C%200)%3B%0A%20%20if%20(win%20%3E%20last)%20win%20%3D%20last%3B%0A%20%20var%20lo%20%3D%20paged()%20%3F%20win%20*%20PAGE%20%3A%200%2C%20hi%20%3D%20paged()%20%3F%20Math.min(lo%20%2B%20PAGE%2C%20stops.length)%20%3A%20stops.length%3B%0A%20%20var%20red%20%3D%20%5B%5D%2C%20at%20%3D%20%5B%5D%3B%0A%20%20missed.concat(hovers).forEach(function%20(m)%20%7B%0A%20%20%20%20var%20p%20%3D%20isPinned(m)%3B%0A%20%20%20%20if%20(p%20%7C%7C%20page)%20red.push(%5Bm%2C%20m.getBoundingClientRect()%2C%20p%5D)%3B%0A%20%20%7D)%3B%0A%20%20for%20(var%20i%20%3D%20lo%3B%20i%20%3C%20hi%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20sr%20%3D%20stops%5Bi%5D.getBoundingClientRect()%2C%20st%20%3D%20sr.width%20%3C%202%20%26%26%20sr.height%20%3C%202%3B%0A%20%20%20%20at.push(%5Bsr%2C%20st%2C%20st%20%7C%7C%20isPinned(stops%5Bi%5D)%5D)%3B%0A%20%20%7D%0A%20%20var%20fr%20%3D%20shownEl%20%26%26%20hovers.indexOf(shownEl)%20%3C%200%20%26%26%20forced.indexOf(shownEl)%20%3E%3D%200%20%3F%20%5BshownEl.getBoundingClientRect()%2C%20isPinned(shownEl)%5D%20%3A%20null%3B%0A%20%20var%20lr%20%3D%20light.checked%20%26%26%20spotEl%20%26%26%20spotEl.isConnected%20%3F%20spotEl.getBoundingClientRect()%20%3A%20null%3B%0A%20%20var%20key%20%3D%20%5BshownEl%5D%3B%0A%20%20red.forEach(function%20(x)%20%7B%20if%20(!x%5B2%5D)%20key.push(x%5B0%5D%2C%20x%5B1%5D.left%20%2B%20sx%2C%20x%5B1%5D.top%20%2B%20sy%2C%20x%5B1%5D.width%2C%20x%5B1%5D.height)%3B%20%7D)%3B%0A%20%20if%20(fr%20%26%26%20!fr%5B1%5D)%20key.push(fr%5B0%5D.left%20%2B%20sx%2C%20fr%5B0%5D.top%20%2B%20sy%2C%20fr%5B0%5D.width%2C%20fr%5B0%5D.height)%3B%0A%20%20var%20keep%20%3D%20page%20%26%26%20same(key%2C%20boxKey)%3B%0A%20%20if%20(page)%20boxKey%20%3D%20key%3B%0A%20%20clear(svg)%3B%0A%20%20clear(dot)%3B%0A%20%20clear(under)%3B%0A%20%20lit(lr)%3B%0A%20%20if%20(page)%20%7B%0A%20%20%20%20clear(svgPg)%3B%0A%20%20%20%20clear(dotPg)%3B%0A%20%20%20%20if%20(!keep)%20clear(underPg)%3B%0A%20%20%7D%0A%20%20red.forEach(function%20(x)%20%7B%0A%20%20%20%20var%20m%20%3D%20x%5B0%5D%2C%20r%20%3D%20x%5B1%5D%3B%0A%20%20%20%20if%20(x%5B2%5D)%20box(m%2C%20r%2C%20under)%3B%0A%20%20%20%20else%20if%20(!keep)%20box(m%2C%20%7B%20left%3A%20r.left%20%2B%20sx%2C%20top%3A%20r.top%20%2B%20sy%2C%20width%3A%20r.width%2C%20height%3A%20r.height%20%7D%2C%20underPg)%3B%0A%20%20%7D)%3B%0A%20%20if%20(fr)%20%7B%0A%20%20%20%20var%20hr%20%3D%20fr%5B0%5D%2C%20hp%20%3D%20fr%5B1%5D%3B%0A%20%20%20%20if%20(hp%20%7C%7C%20(page%20%26%26%20!keep))%20%7B%0A%20%20%20%20%20%20var%20hx%20%3D%20hp%20%3F%20hr.left%20%3A%20hr.left%20%2B%20sx%2C%20hy%20%3D%20hp%20%3F%20hr.top%20%3A%20hr.top%20%2B%20sy%2C%20hl%20%3D%20hp%20%3F%20under%20%3A%20underPg%3B%0A%20%20%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20hx%20-%206%2C%20y%3A%20hy%20-%206%2C%20width%3A%20hr.width%20%2B%2012%2C%20height%3A%20hr.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%208%2C%20rx%3A%206%20%7D%2C%20hl)%3B%0A%20%20%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20hx%20-%206%2C%20y%3A%20hy%20-%206%2C%20width%3A%20hr.width%20%2B%2012%2C%20height%3A%20hr.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%204%2C%20rx%3A%206%20%7D%2C%20hl)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20hid%20%3D%200%2C%20placedPg%20%3D%20%5B%5D%2C%20placedSc%20%3D%20%5B%5D%2C%20pts%20%3D%20%5B%5D%2C%20dotsPg%20%3D%20%5B%5D%2C%20dotsSc%20%3D%20%5B%5D%3B%0A%20%20var%20big%20%3D%20stops.length%20%3E%20PAGE%3B%0A%20%20group.style.display%20%3D%20big%20%3F%20%22%22%20%3A%20%22none%22%3B%0A%20%20pager.style.display%20%3D%20paged()%20%3F%20%22%22%20%3A%20%22none%22%3B%0A%20%20chunkBox.style.marginTop%20%3D%20paged()%20%3F%20%22%22%20%3A%20%220%22%3B%0A%20%20if%20(paged())%20%7B%0A%20%20%20%20pageText.textContent%20%3D%20%22Stops%20%22%20%2B%20(lo%20%2B%201)%20%2B%20%22%20to%20%22%20%2B%20hi%20%2B%20%22%20of%20%22%20%2B%20stops.length%3B%0A%20%20%20%20prevBtn.disabled%20%3D%20win%20%3D%3D%3D%200%3B%0A%20%20%20%20nextBtn.disabled%20%3D%20win%20%3D%3D%3D%20last%3B%0A%20%20%7D%0A%20%20stops.forEach(function%20(s%2C%20i)%20%7B%0A%20%20%20%20if%20(i%20%3C%20lo%20%7C%7C%20i%20%3E%3D%20hi)%20return%3B%0A%20%20%20%20var%20r%20%3D%20at%5Bi%20-%20lo%5D%5B0%5D%3B%0A%20%20%20%20var%20tiny%20%3D%20at%5Bi%20-%20lo%5D%5B1%5D%3B%0A%20%20%20%20var%20onScreen%20%3D%20at%5Bi%20-%20lo%5D%5B2%5D%3B%0A%20%20%20%20var%20cx%20%3D%20tiny%20%3F%2013%20%2B%20hid%2B%2B%20*%2030%20%3A%20onScreen%20%3F%20Math.max(r.left%20-%208%2C%2013)%20%3A%20Math.max(r.left%20%2B%20sx%20-%208%2C%2013)%3B%0A%20%20%20%20var%20cy%20%3D%20tiny%20%3F%2013%20%3A%20onScreen%20%3F%20Math.max(r.top%20-%208%2C%2013)%20%3A%20Math.max(r.top%20%2B%20sy%20-%208%2C%2013)%3B%0A%20%20%20%20var%20placed%20%3D%20onScreen%20%3F%20placedSc%20%3A%20placedPg%3B%0A%20%20%20%20for%20(var%20j%20%3D%20placed.length%20-%201%2C%20tries%20%3D%200%3B%20j%20%3E%3D%200%20%26%26%20tries%20%3C%2040%3B%20j--)%20%7B%0A%20%20%20%20%20%20if%20(Math.abs(placed%5Bj%5D%5B0%5D%20-%20cx)%20%3C%2026%20%26%26%20Math.abs(placed%5Bj%5D%5B1%5D%20-%20cy)%20%3C%2026)%20%7B%0A%20%20%20%20%20%20%20%20cx%20%3D%20placed%5Bj%5D%5B0%5D%20%2B%2028%3B%0A%20%20%20%20%20%20%20%20j%20%3D%20placed.length%3B%0A%20%20%20%20%20%20%20%20tries%2B%2B%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20placed.push(%5Bcx%2C%20cy%5D)%3B%0A%20%20%20%20pts.push(%5Bcx%2C%20cy%2C%20onScreen%5D)%3B%0A%20%20%20%20(onScreen%20%3F%20dotsSc%20%3A%20dotsPg).push(%5Bcx%2C%20cy%2C%20i%20%2B%201%2C%20tiny%5D)%3B%0A%20%20%7D)%3B%0A%20%20if%20(lines.checked%20%26%26%20!stub.checked)%20shortLines(pts%2C%20sx%2C%20sy)%3B%0A%20%20var%20run%20%3D%20%5B%5D%2C%20runPg%20%3D%20null%3B%0A%20%20function%20flush()%20%7B%0A%20%20%20%20if%20(runPg%20%3D%3D%3D%20null)%20return%3B%0A%20%20%20%20if%20(runPg)%20%7B%20if%20(page)%20trailLine(run%2C%20svgPg)%3B%20%7D%0A%20%20%20%20else%20trailLine(run%2C%20svg)%3B%0A%20%20%20%20run%20%3D%20%5B%5D%3B%0A%20%20%20%20runPg%20%3D%20null%3B%0A%20%20%7D%0A%20%20for%20(var%20k%20%3D%20lines.checked%20%26%26%20stub.checked%20%3F%201%20%3A%20pts.length%3B%20k%20%3C%20pts.length%3B%20k%2B%2B)%20%7B%0A%20%20%20%20var%20a%20%3D%20pts%5Bk%20-%201%5D%2C%20b%20%3D%20pts%5Bk%5D%2C%20both%20%3D%20!a%5B2%5D%20%26%26%20!b%5B2%5D%3B%0A%20%20%20%20if%20(runPg%20!%3D%3D%20both)%20%7B%0A%20%20%20%20%20%20flush()%3B%0A%20%20%20%20%20%20runPg%20%3D%20both%3B%0A%20%20%20%20%20%20run.push(both%20%7C%7C%20a%5B2%5D%20%3F%20%5Ba%5B0%5D%2C%20a%5B1%5D%5D%20%3A%20%5Ba%5B0%5D%20-%20sx%2C%20a%5B1%5D%20-%20sy%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20run.push(both%20%7C%7C%20b%5B2%5D%20%3F%20%5Bb%5B0%5D%2C%20b%5B1%5D%5D%20%3A%20%5Bb%5B0%5D%20-%20sx%2C%20b%5B1%5D%20-%20sy%5D)%3B%0A%20%20%7D%0A%20%20flush()%3B%0A%20%20if%20(page)%20dotsIn(dotsPg%2C%20dotPg)%3B%0A%20%20dotsIn(dotsSc%2C%20dot)%3B%0A%7D%0Afunction%20queue(screenOnly)%20%7B%0A%20%20if%20(screenOnly%20!%3D%3D%20true)%20onlyScreen%20%3D%20false%3B%0A%20%20if%20(!queued)%20%7B%20queued%20%3D%20true%3B%20requestAnimationFrame(draw)%3B%20%7D%0A%7D%0Avar%20timer%20%3D%200%2C%20idle%20%3D%200%2C%20nextScan%20%3D%200%2C%20settling%20%3D%20false%3B%0Afunction%20same(a%2C%20b)%20%7B%0A%20%20if%20(a.length%20!%3D%3D%20b.length)%20return%20false%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20a.length%3B%20i%2B%2B)%20if%20(a%5Bi%5D%20!%3D%3D%20b%5Bi%5D)%20return%20false%3B%0A%20%20return%20true%3B%0A%7D%0Afunction%20rescan()%20%7B%0A%20%20if%20(timer)%20clearTimeout(timer)%3B%0A%20%20if%20(idle%20%26%26%20window.cancelIdleCallback)%20cancelIdleCallback(idle)%3B%0A%20%20timer%20%3D%200%3B%0A%20%20idle%20%3D%200%3B%0A%20%20if%20(closed)%20return%3B%0A%20%20if%20(settling)%20return%20later()%3B%0A%20%20var%20t0%20%3D%20performance.now()%3B%0A%20%20place()%3B%0A%20%20pinned%20%3D%20new%20WeakMap()%3B%0A%20%20scan()%3B%0A%20%20if%20(!same(drawn%2C%20sig()))%20%7B%0A%20%20%20%20fill()%3B%0A%20%20%20%20scan()%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20review()%3B%0A%20%20%7D%0A%20%20focus()%3B%0A%20%20var%20t1%20%3D%20performance.now()%3B%0A%20%20nextScan%20%3D%20t1%20%2B%20Math.max(500%2C%204%20*%20(t1%20-%20t0))%3B%0A%7D%0Avar%20due%20%3D%200%3B%0Afunction%20later(min)%20%7B%0A%20%20if%20(idle%20%7C%7C%20closed)%20return%3B%0A%20%20var%20wait%20%3D%20Math.max(min%20%7C%7C%20500%2C%20nextScan%20-%20performance.now())%3B%0A%20%20if%20(timer)%20%7B%0A%20%20%20%20if%20(performance.now()%20%2B%20wait%20%3E%3D%20due)%20return%3B%0A%20%20%20%20clearTimeout(timer)%3B%0A%20%20%7D%0A%20%20due%20%3D%20performance.now()%20%2B%20wait%3B%0A%20%20timer%20%3D%20setTimeout(function%20()%20%7B%0A%20%20%20%20timer%20%3D%200%3B%0A%20%20%20%20if%20(window.requestIdleCallback)%20idle%20%3D%20requestIdleCallback(rescan%2C%20%7B%20timeout%3A%201000%20%7D)%3B%0A%20%20%20%20else%20rescan()%3B%0A%20%20%7D%2C%20wait)%3B%0A%7D%0Avar%20LOUD%20%3D%20%2F%5E(tabindex%7Cdisabled%7Cinert%7Chref%7Crole%7Copen%7Chidden)%24%2F%3B%0Afunction%20matters(m)%20%7B%0A%20%20var%20t%20%3D%20m.target%3B%0A%20%20if%20(t%20%3D%3D%3D%20host%20%7C%7C%20host.contains(t))%20return%20false%3B%0A%20%20if%20(m.type%20%3D%3D%3D%20%22childList%22)%20%7B%0A%20%20%20%20var%20l%20%3D%20%5B%5D.concat(%5B%5D.slice.call(m.addedNodes)%2C%20%5B%5D.slice.call(m.removedNodes))%3B%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20l.length%3B%20i%2B%2B)%20if%20(l%5Bi%5D.nodeType%20%3D%3D%3D%201)%20return%20true%3B%0A%20%20%20%20return%20false%3B%0A%20%20%7D%0A%20%20if%20(LOUD.test(m.attributeName%20%7C%7C%20%22%22)%20%7C%7C%20t.nodeType%20!%3D%3D%201)%20return%20true%3B%0A%20%20if%20(stopSet.has(t)%20%7C%7C%20upSet.has(t)%20%7C%7C%20t.matches(FOCUSABLE)%20%7C%7C%20t.querySelector(FOCUSABLE))%20return%20true%3B%0A%20%20return%20missed.concat(hovers%2C%20forced).some(function%20(x)%20%7B%20return%20t%20%3D%3D%3D%20x%20%7C%7C%20t.contains(x)%3B%20%7D)%3B%0A%7D%0Afunction%20onMoved(e)%20%7B%20if%20(host.style.position%20%3D%3D%3D%20%22fixed%22)%20place()%3B%20queue((stub.checked%20%7C%7C%20!lines.checked)%20%26%26%20!!e%20%26%26%20e.type%20%3D%3D%3D%20%22scroll%22%20%26%26%20(e.target%20%3D%3D%3D%20document%20%7C%7C%20e.target%20%3D%3D%3D%20document.documentElement))%3B%20later()%3B%20%7D%0Avar%20watch%20%3D%20new%20MutationObserver(function%20(list)%20%7B%0A%20%20place()%3B%0A%20%20if%20(openPop%20%26%26%20gone(openPop))%20popClosed()%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20list.length%3B%20i%2B%2B)%20if%20(matters(list%5Bi%5D))%20return%20later()%3B%0A%20%20later(3000)%3B%0A%7D)%3B%0Afunction%20focus()%20%7B%0A%20%20var%20a%20%3D%20deep()%3B%0A%20%20track(a)%3B%0A%20%20if%20(a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement)%20%7B%0A%20%20%20%20lost%20%3D%20false%3B%0A%20%20%20%20if%20(a%20!%3D%3D%20host%20%26%26%20a.getRootNode()%20!%3D%3D%20root)%20spotEl%20%3D%20a%3B%0A%20%20%7D%20else%20spotEl%20%3D%20null%3B%0A%20%20current%20%3D%20stops.indexOf(a)%3B%0A%20%20if%20(current%20!%3D%3D%20seen)%20%7B%0A%20%20%20%20seen%20%3D%20current%3B%0A%20%20%20%20if%20(current%20%3E%3D%200)%20win%20%3D%20Math.floor(current%20%2F%20PAGE)%3B%0A%20%20%7D%0A%20%20queue()%3B%0A%7D%0Afunction%20lose(e)%20%7B%0A%20%20var%20t%20%3D%20e%20%26%26%20!e.relatedTarget%20%26%26%20e.composedPath%20%3F%20e.composedPath()%5B0%5D%20%3A%20null%2C%20p%20%3D%20t%20%26%26%20t.nodeType%20%3D%3D%3D%201%20%3F%20popupOf(t)%20%3A%20null%3B%0A%20%20if%20(p%20%26%26%20p%20%3D%3D%3D%20openPop)%20requestAnimationFrame(function%20()%20%7B%20if%20(!closed%20%26%26%20openPop%20%3D%3D%3D%20p%20%26%26%20gone(p))%20popClosed()%3B%20%7D)%3B%0A%20%20setTimeout(function%20()%20%7B%0A%20%20%20%20var%20a%20%3D%20document.activeElement%3B%0A%20%20%20%20if%20(a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement)%20return%3B%0A%20%20%20%20lost%20%3D%20true%3B%0A%20%20%20%20focus()%3B%0A%20%20%7D%2C%200)%3B%0A%7D%0Avar%20walking%20%3D%20false%2C%20walkDelay%20%3D%20400%2C%20walkT%20%3D%200%2C%20walked%20%3D%20new%20Set()%2C%20walkAt%20%3D%20null%2C%20walkEnd%20%3D%20null%3B%0Afunction%20walkedN()%20%7B%20return%20stops.filter(function%20(s)%20%7B%20return%20walked.has(s)%3B%20%7D).length%3B%20%7D%0Afunction%20playState()%20%7B%0A%20%20var%20at%20%3D%20walkAt%20%26%26%20stops.indexOf(walkAt)%20%3E%3D%200%20%3F%20%22%20at%20stop%20%22%20%2B%20(stops.indexOf(walkAt)%20%2B%201)%20%2B%20%22%20%5C%22%22%20%2B%20label(walkAt)%20%2B%20%22%5C%22%22%20%3A%20%22%22%3B%0A%20%20var%20n%20%3D%20%22walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%3B%0A%20%20if%20(walking)%20return%20%22still%20walking%22%20%2B%20at%20%2B%20%22%2C%20%22%20%2B%20n%3B%0A%20%20return%20walkEnd%20%3D%3D%3D%20%22done%22%20%3F%20%22finished%2C%20%22%20%2B%20n%20%3A%20%22paused%22%20%2B%20at%20%2B%20%22%2C%20%22%20%2B%20n%3B%0A%7D%0Afunction%20playLook()%20%7B%0A%20%20while%20(playIcon.firstChild)%20playIcon.removeChild(playIcon.firstChild)%3B%0A%20%20icon(playIcon%2C%2012%2C%20walking%20%3F%20%22M5%203v10M11%203v10%22%20%3A%20%22M4%202.5l9%205.5-9%205.5z%22%2C%202.4)%3B%0A%20%20playWord.textContent%20%3D%20walking%20%3F%20%22Pause%22%20%3A%20%22Play%22%3B%0A%20%20play.setAttribute(%22aria-pressed%22%2C%20walking%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20if%20(walked.size)%20playText.textContent%20%3D%20%22Walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20stops.length%20%2B%20%22%20stops%22%3B%0A%7D%0Afunction%20walkedText()%20%7B%20return%20%22%20after%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%22%3B%20%7D%0Afunction%20stopWalk(why%2C%20fin)%20%7B%0A%20%20if%20(!walking)%20return%3B%0A%20%20walking%20%3D%20false%3B%0A%20%20walkEnd%20%3D%20fin%20%3F%20%22done%22%20%3A%20%22paused%22%3B%0A%20%20settling%20%3D%20false%3B%0A%20%20if%20(walkT)%20clearTimeout(walkT)%3B%0A%20%20walkT%20%3D%200%3B%0A%20%20playLook()%3B%0A%20%20if%20(why)%20log(%22INFO%22%2C%20%22Play%20it%22%2C%20%5Bwhy%5D)%3B%0A%20%20sumDraw()%3B%0A%20%20if%20(fin)%20announce(%22Walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%20%22%20%2B%20pl(logCounts().bad%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22.%22)%3B%0A%20%20else%20if%20(why)%20announce(%22Play%20paused%22%20%2B%20(walkAt%20%26%26%20stops.indexOf(walkAt)%20%3E%3D%200%20%3F%20%22%20at%20stop%20%22%20%2B%20(stops.indexOf(walkAt)%20%2B%201)%20%3A%20%22%22)%20%2B%20%22.%20Walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%22)%3B%0A%20%20var%20done%20%3D%20walkDone%3B%0A%20%20walkDone%20%3D%20%5B%5D%3B%0A%20%20done.forEach(function%20(f)%20%7B%20f(aiText())%3B%20%7D)%3B%0A%7D%0Afunction%20step(s)%20%7B%0A%20%20walkT%20%3D%200%3B%0A%20%20if%20(!walking%20%7C%7C%20closed)%20return%3B%0A%20%20if%20(!s%20%7C%7C%20stops.indexOf(s)%20%3C%200)%20s%20%3D%20stops.filter(function%20(x)%20%7B%20return%20!walked.has(x)%3B%20%7D)%5B0%5D%3B%0A%20%20if%20(!s)%20%7B%0A%20%20%20%20stopWalk(%22Finished%3A%20walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%22%2C%20true)%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20endPress()%3B%0A%20%20s.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20focus()%3B%0A%20%20walked.add(s)%3B%0A%20%20walkAt%20%3D%20s%3B%0A%20%20playLook()%3B%0A%20%20var%20at%20%3D%20where(s)%2C%20still%20%3D%200%2C%20tries%20%3D%200%3B%0A%20%20settling%20%3D%20true%3B%0A%20%20function%20wait()%20%7B%0A%20%20%20%20if%20(!walking%20%7C%7C%20closed)%20return%20void%20(settling%20%3D%20false)%3B%0A%20%20%20%20var%20now%20%3D%20where(s)%3B%0A%20%20%20%20if%20(now%20!%3D%3D%20at)%20%7B%0A%20%20%20%20%20%20at%20%3D%20now%3B%0A%20%20%20%20%20%20still%20%3D%200%3B%0A%20%20%20%20%7D%20else%20still%2B%2B%3B%0A%20%20%20%20if%20(%2B%2Btries%20%3C%2090%20%26%26%20(still%20%3C%202%20%7C%7C%20tries%20%3C%206))%20return%20requestAnimationFrame(wait)%3B%0A%20%20%20%20settling%20%3D%20false%3B%0A%20%20%20%20hoverTry(s)%3B%0A%20%20%20%20check(s%2C%20function%20()%20%7B%0A%20%20%20%20%20%20if%20(walking%20%26%26%20!closed)%20walkT%20%3D%20setTimeout(function%20()%20%7B%20step()%3B%20%7D%2C%20walkDelay)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20requestAnimationFrame(wait)%3B%0A%7D%0Avar%20walkDone%20%3D%20%5B%5D%3B%0Afunction%20untested()%20%7B%0A%20%20var%20judged%20%3D%20%7B%7D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20if%20((e.k%20%3D%3D%3D%20%22OK%22%20%7C%7C%20e.k%20%3D%3D%3D%20%22PROBLEM%22)%20%26%26%20e.f%20%3D%3D%3D%20%22Lost%20focus%22)%20judged%5Be.f%5D%20%3D%201%3B%20%7D)%3B%0A%20%20if%20(judgedDir%5B1%5D%20%26%26%20judgedDir%5B-1%5D)%20judged%5B%22Out%20of%20order%22%5D%20%3D%20judged%5B%22Keyboard%20trap%22%5D%20%3D%201%3B%0A%20%20openProbs().forEach(function%20(e)%20%7B%20judged%5Be.f%5D%20%3D%201%3B%20%7D)%3B%0A%20%20return%20%5B%22Out%20of%20order%22%2C%20%22Keyboard%20trap%22%2C%20%22Lost%20focus%22%5D.filter(function%20(f)%20%7B%20return%20!judged%5Bf%5D%3B%20%7D)%3B%0A%7D%0Afunction%20sumDraw()%20%7B%0A%20%20sumLine.hidden%20%3D%20walking%20%7C%7C%20walkEnd%20!%3D%3D%20%22done%22%3B%0A%20%20if%20(sumLine.hidden)%20return%3B%0A%20%20var%20per%20%3D%20%7B%7D%2C%20probs%20%3D%20openProbs()%2C%20left%20%3D%20untested()%3B%0A%20%20probs.forEach(function%20(e)%20%7B%20per%5Be.f%5D%20%3D%20(per%5Be.f%5D%20%7C%7C%200)%20%2B%201%3B%20%7D)%3B%0A%20%20var%20red%20%3D%20CHECKS.filter(function%20(f)%20%7B%20return%20per%5Bf%5D%3B%20%7D)%2C%20ok%20%3D%20CHECKS.filter(function%20(f)%20%7B%20return%20!per%5Bf%5D%20%26%26%20left.indexOf(f)%20%3C%200%3B%20%7D)%3B%0A%20%20var%20tabLeft%20%3D%20left.indexOf(%22Out%20of%20order%22)%20%3E%3D%200%20%7C%7C%20left.indexOf(%22Keyboard%20trap%22)%20%3E%3D%200%2C%20popLeft%20%3D%20left.indexOf(%22Lost%20focus%22)%20%3E%3D%200%3B%0A%20%20while%20(sumLine.firstChild)%20sumLine.removeChild(sumLine.firstChild)%3B%0A%20%20var%20b%20%3D%20document.createElement(%22b%22)%3B%0A%20%20b.textContent%20%3D%20pl(CHECKS.length%2C%20%22check%22%2C%20%22checks%22)%20%2B%20%22%3A%20%22%20%2B%20ok.length%20%2B%20%22%20passed%2C%20%22%20%2B%20red.length%20%2B%20(red.length%20%3D%3D%3D%201%20%3F%20%22%20found%20a%20problem%2C%20%22%20%3A%20%22%20found%20problems%2C%20%22)%20%2B%20left.length%20%2B%20%22%20not%20tested.%22%3B%0A%20%20sumLine.appendChild(b)%3B%0A%20%20function%20part(head%2C%20list%2C%20cls%2C%20count)%20%7B%0A%20%20%20%20if%20(!list.length)%20return%3B%0A%20%20%20%20sumLine.appendChild(document.createTextNode(%22%20%22%20%2B%20head%20%2B%20%22%3A%20%22))%3B%0A%20%20%20%20var%20sp%20%3D%20document.createElement(%22span%22)%3B%0A%20%20%20%20sp.className%20%3D%20cls%3B%0A%20%20%20%20sp.textContent%20%3D%20list.map(function%20(f)%20%7B%20return%20f%20%2B%20(count%20%3F%20%22%20%22%20%2B%20per%5Bf%5D%20%3A%20%22%22)%3B%20%7D).join(%22%2C%20%22)%3B%0A%20%20%20%20sumLine.appendChild(sp)%3B%0A%20%20%20%20sumLine.appendChild(document.createTextNode(%22.%22))%3B%0A%20%20%7D%0A%20%20part(%22Passed%22%2C%20ok%2C%20%22g%22)%3B%0A%20%20part(red.length%20%3D%3D%3D%201%20%3F%20%22Problem%22%20%3A%20%22Problems%22%2C%20red%2C%20%22e%22%2C%20true)%3B%0A%20%20part(%22Not%20tested%20(%22%20%2B%20(tabLeft%20%26%26%20popLeft%20%3F%20%22press%20Tab%20and%20Shift%2BTab%2C%20open%20and%20close%20a%20popup%22%20%3A%20tabLeft%20%3F%20%22press%20Tab%20and%20Shift%2BTab%22%20%3A%20%22open%20and%20close%20a%20popup%22)%20%2B%20%22)%22%2C%20left%2C%20%22q%22)%3B%0A%7D%0Afunction%20startWalk()%20%7B%0A%20%20walking%20%3D%20true%3B%0A%20%20sumDraw()%3B%0A%20%20if%20(walkedN()%20%3E%3D%20stops.length)%20walked%20%3D%20new%20Set()%3B%0A%20%20playLook()%3B%0A%20%20var%20first%20%3D%20current%20%3E%3D%200%20%26%26%20current%20%3C%20stops.length%20-%201%20%26%26%20walked.size%20%3F%20current%20%2B%201%20%3A%200%3B%0A%20%20if%20(stops%5Bfirst%5D)%20%7B%0A%20%20%20%20log(%22INFO%22%2C%20%22Play%20it%22%2C%20%5Bfirst%20%3F%20%22Went%20on%20from%20%22%20%3A%20%22Started%20at%20%22%2C%20ref(stops%5Bfirst%5D)%2C%20%22.%22%5D)%3B%0A%20%20%20%20announce((first%20%3F%20%22Play%20went%20on%20from%20stop%20%22%20%3A%20%22Play%20started%20at%20stop%20%22)%20%2B%20(first%20%2B%201)%20%2B%20%22.%22)%3B%0A%20%20%7D%0A%20%20step(stops%5Bfirst%5D)%3B%0A%7D%0Aplay.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20if%20(walking)%20return%20stopWalk(%22Paused%20with%20the%20Pause%20button%22%20%2B%20walkedText())%3B%0A%20%20walkDelay%20%3D%20400%3B%0A%20%20startWalk()%3B%0A%7D)%3B%0Afunction%20interrupt(e)%20%7B%0A%20%20if%20(!walking%20%7C%7C%20(e.composedPath%20%26%26%20e.composedPath().indexOf(host)%20%3E%3D%200))%20return%3B%0A%20%20stopWalk(%22Paused%20by%20a%20click%20on%20the%20page%22%20%2B%20walkedText())%3B%0A%7D%0AplayLook()%3B%0Avar%20SAFARI%20%3D%20MAC%20%26%26%20%2F%5ESafari%20%2F.test(browser())%2C%20FIREFOX%20%3D%20MAC%20%26%26%20%2F%5EFirefox%20%2F.test(browser())%3B%0Avar%20settleT%20%3D%200%2C%20macNote%20%3D%20false%2C%20beforeEl%20%3D%20null%2C%20wantEl%20%3D%20null%2C%20MAC_NOTE%20%3D%20SAFARI%20%3F%20%22Safari%20skips%20links%20and%20buttons%20on%20Tab%20until%20you%20turn%20it%20on%3A%20Settings%2C%20Advanced%2C%20Press%20Tab%20to%20highlight%20each%20item.%22%20%3A%20%22Firefox%20skips%20links%20on%20Tab%20until%20you%20turn%20it%20on%3A%20System%20Settings%2C%20Keyboard%2C%20Keyboard%20navigation.%22%3B%0Avar%20LINKS%20%3D%20%22a%5Bhref%5D%2Carea%5Bhref%5D%22%2C%20SKIPS%20%3D%20SAFARI%20%3F%20%5B%22a%5Bhref%5D%22%2C%20%22area%5Bhref%5D%22%2C%20%22button%22%2C%20%22input%5Btype%3Dbutton%5D%22%2C%20%22input%5Btype%3Dsubmit%5D%22%2C%20%22input%5Btype%3Dreset%5D%22%2C%20%22input%5Btype%3Dimage%5D%22%2C%20%22input%5Btype%3Dcheckbox%5D%22%2C%20%22input%5Btype%3Dradio%5D%22%2C%20%22input%5Btype%3Drange%5D%22%2C%20%22input%5Btype%3Dfile%5D%22%2C%20%22input%5Btype%3Dcolor%5D%22%5D.map(function%20(q)%20%7B%20return%20q%20%2B%20%22%3Anot(%5Btabindex%5D)%22%3B%20%7D).join(%22%2C%22)%20%3A%20LINKS%3B%0Afunction%20linkSkip(want%2C%20cur%2C%20dir)%20%7B%0A%20%20if%20(!SAFARI%20%26%26%20!FIREFOX)%20return%20null%3B%0A%20%20var%20n%20%3D%20stops.length%2C%20k%20%3D%200%2C%20links%20%3D%200%3B%0A%20%20for%20(var%20i%20%3D%20want%3B%20i%20!%3D%3D%20cur%20%26%26%20k%20%3C%20n%3B%20i%20%3D%20(i%20%2B%20dir%20%2B%20n)%20%25%20n%2C%20k%2B%2B)%20%7B%0A%20%20%20%20if%20(!stops%5Bi%5D.matches(SKIPS))%20return%20null%3B%0A%20%20%20%20if%20(stops%5Bi%5D.matches(LINKS))%20links%2B%2B%3B%0A%20%20%7D%0A%20%20return%20k%20%26%26%20k%20%3C%20n%20%3F%20%5Blinks%2C%20k%20-%20links%5D%20%3A%20null%3B%0A%7D%0Afunction%20skipText(c)%20%7B%0A%20%20var%20l%20%3D%20c%5B0%5D%20%3F%20pl(c%5B0%5D%2C%20%22link%22%2C%20%22links%22)%20%3A%20%22%22%2C%20b%20%3D%20c%5B1%5D%20%3F%20pl(c%5B1%5D%2C%20%22button%22%2C%20%22buttons%22)%20%3A%20%22%22%3B%0A%20%20return%20l%20%26%26%20b%20%3F%20l%20%2B%20%22%20and%20%22%20%2B%20b%20%3A%20l%20%7C%7C%20b%3B%0A%7D%0Afunction%20after(el%2C%20dir)%20%7B%0A%20%20var%20ord%20%3D%20new%20Map()%2C%20n%20%3D%20stops.length%2C%20pick%20%3D%20-1%3B%0A%20%20walk(document%2C%20%5B%5D).forEach(function%20(e%2C%20i)%20%7B%20ord.set(e%2C%20i)%3B%20%7D)%3B%0A%20%20var%20at%20%3D%20ord.get(el)%3B%0A%20%20if%20(at%20%3D%3D%3D%20undefined)%20return%20dir%20%3E%200%20%3F%200%20%3A%20n%20-%201%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20n%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20k%20%3D%20ord.get(stops%5Bi%5D)%3B%0A%20%20%20%20if%20(stops%5Bi%5D.tabIndex%20%3E%200%20%7C%7C%20k%20%3D%3D%3D%20undefined)%20continue%3B%0A%20%20%20%20if%20(dir%20%3E%200%20%26%26%20k%20%3E%20at)%20return%20i%3B%0A%20%20%20%20if%20(dir%20%3C%200%20%26%26%20k%20%3C%20at)%20pick%20%3D%20i%3B%0A%20%20%7D%0A%20%20return%20dir%20%3E%200%20%3F%200%20%3A%20pick%20%3E%3D%200%20%3F%20pick%20%3A%20forced.length%20%3F%20forced.length%20-%201%20%3A%20n%20-%201%3B%0A%7D%0Avar%20stays%20%3D%20new%20WeakMap()%2C%20leaves%20%3D%20new%20WeakMap()%3B%0Afunction%20tellsHow(e)%20%7B%0A%20%20if%20(!(e.tagName%20%3D%3D%3D%20%22TEXTAREA%22%20%7C%7C%20e.isContentEditable%20%7C%7C%20%2F%5E(application%7Ctextbox)%24%2F.test(e.getAttribute(%22role%22)%20%7C%7C%20%22%22)))%20return%20false%3B%0A%20%20var%20r%20%3D%20e.getRootNode()%2C%20t%20%3D%20(e.getAttribute(%22aria-description%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22%20%2B%20(e.getAttribute(%22aria-keyshortcuts%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22%20%2B%20(e.getAttribute(%22title%22)%20%7C%7C%20%22%22)%3B%0A%20%20(e.getAttribute(%22aria-describedby%22)%20%7C%7C%20%22%22).split(%2F%5Cs%2B%2F).forEach(function%20(id)%20%7B%20var%20x%20%3D%20id%20%26%26%20r.getElementById%20%3F%20r.getElementById(id)%20%3A%20null%3B%20if%20(x)%20t%20%2B%3D%20%22%20%22%20%2B%20x.textContent%3B%20%7D)%3B%0A%20%20return%20%2F%5Cb(escape%7Cesc)%5Cb%2Fi.test(t)%3B%0A%7D%0Afunction%20multi(e)%20%7B%20return%20%2F%5E(IFRAME%7COBJECT%7CEMBED%7CAUDIO%7CVIDEO)%24%2F.test(e.tagName)%20%7C%7C%20!!e.shadowRoot%20%7C%7C%20(e.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20%2F%5E(date%7Cdatetime-local%7Cmonth%7Ctime%7Cweek)%24%2F.test(e.type))%3B%20%7D%0Afunction%20endPress()%20%7B%0A%20%20if%20(settleT)%20%7B%0A%20%20%20%20clearTimeout(settleT)%3B%0A%20%20%20%20settle()%3B%0A%20%20%7D%0A%20%20pressed%20%3D%200%3B%0A%7D%0Afunction%20settle()%20%7B%0A%20%20settleT%20%3D%200%3B%0A%20%20focus()%3B%0A%20%20if%20(pressed%20%26%26%20current%20%3E%3D%200)%20%7B%0A%20%20%20%20check(stops%5Bcurrent%5D)%3B%0A%20%20%20%20hoverTry(stops%5Bcurrent%5D)%3B%0A%20%20%7D%0A%20%20if%20(!pressed%20%7C%7C%20current%20%3C%200%20%7C%7C%20before%20%3D%3D%3D%20-2)%20%7B%0A%20%20%20%20if%20(pressed%20%26%26%20before%20%3D%3D%3D%20-2)%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Focus%20was%20on%20the%20page%20body%2C%20so%20this%20Tab%20press%20is%20not%20judged.%22%5D)%3B%0A%20%20%20%20else%20if%20(pressed)%20%7B%0A%20%20%20%20%20%20var%20o%20%3D%20deep()%3B%0A%20%20%20%20%20%20if%20(o%20%26%26%20o%20!%3D%3D%20document.body%20%26%26%20o%20!%3D%3D%20document.documentElement%20%26%26%20!within(host%2C%20o))%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Tab%20landed%20on%20%22%2C%20ref(o)%2C%20%22%2C%20which%20is%20not%20in%20the%20list%20of%20stops.%20Not%20judged.%22%5D)%3B%0A%20%20%20%20%20%20else%20if%20(!o%20%7C%7C%20!within(host%2C%20o))%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Focus%20left%20the%20page%2C%20or%20went%20to%20the%20browser.%20Not%20judged.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20pressed%20%3D%200%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20var%20w0%20%3D%20before%20%3E%3D%200%20%3F%20(before%20%2B%20pressed%20%2B%20stops.length)%20%25%20stops.length%20%3A%20-1%3B%0A%20%20if%20(w0%20%3E%3D%200%20%26%26%20w0%20!%3D%3D%20current%20%26%26%20!tabbable(stops%5Bw0%5D))%20%7B%0A%20%20%20%20var%20fromEl%20%3D%20stops%5Bbefore%5D%2C%20toEl%20%3D%20stops%5Bcurrent%5D%3B%0A%20%20%20%20rescan()%3B%0A%20%20%20%20current%20%3D%20stops.indexOf(toEl)%3B%0A%20%20%20%20before%20%3D%20stops.indexOf(fromEl)%3B%0A%20%20%20%20if%20(before%20%3C%200)%20beforeEl%20%3D%20fromEl%3B%0A%20%20%20%20if%20(current%20%3C%200)%20%7B%0A%20%20%20%20%20%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Tab%20landed%20on%20%22%2C%20ref(toEl)%2C%20%22%2C%20which%20is%20not%20in%20the%20list%20of%20stops.%20Not%20judged.%22%5D)%3B%0A%20%20%20%20%20%20pressed%20%3D%200%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20n%20%3D%20stops.length%2C%20src%20%3D%20before%20%3E%3D%200%20%3F%20null%20%3A%20beforeEl%2C%20first%20%3D%20before%20%3C%200%20%26%26%20!src%3B%0A%20%20var%20want%20%3D%20before%20%3E%3D%200%20%3F%20(before%20%2B%20pressed%20%2B%20n)%20%25%20n%20%3A%20src%20%3F%20after(src%2C%20pressed)%20%3A%20pressed%20%3E%200%20%3F%200%20%3A%20n%20-%201%3B%0A%20%20if%20(before%20%3E%3D%200%20%26%26%20wantEl%20%26%26%20stops.indexOf(wantEl)%20%3E%3D%200)%20want%20%3D%20stops.indexOf(wantEl)%3B%0A%20%20var%20landed%20%3D%20popupOf(stops%5Bcurrent%5D)%2C%20left%20%3D%20before%20%3E%3D%200%20%3F%20popupOf(stops%5Bbefore%5D)%20%3A%20src%20%3F%20popupOf(src)%20%3A%20null%3B%0A%20%20if%20(first%20%26%26%20pressed%20%3E%200%20%26%26%20!landed%20%26%26%20!popMissed)%20%7B%0A%20%20%20%20for%20(var%20k%20%3D%200%3B%20k%20%3C%20n%20%26%26%20!popMissed%3B%20k%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20pop%20%3D%20popupOf(stops%5Bk%5D)%3B%0A%20%20%20%20%20%20if%20(pop%20%26%26%20shown(pop)%20%26%26%20blocking(pop))%20popMissed%20%3D%20pop%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(popMissed)%20%7B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20announce(%22A%20popup%20blocks%20the%20page%2C%20but%20the%20first%20Tab%20went%20somewhere%20else.%22)%3B%0A%20%20%20%20%20%20log(%22PROBLEM%22%2C%20%22Out%20of%20order%22%2C%20%5BpopName(popMissed)%2C%20%22%20blocks%20the%20page%2C%20but%20the%20first%20Tab%20went%20to%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20%22.%22%5D%2C%20aiOf(W_ORDER%2C%20%22A%20popup%20that%20blocks%20the%20page%20gets%20keyboard%20focus%20first%2C%20so%20the%20first%20Tab%20lands%20inside%20it.%22%2C%20%22When%20the%20popup%20opens%2C%20move%20focus%20into%20it%3A%20call%20.focus()%20on%20its%20first%20control%2C%20or%20on%20the%20popup%20itself%20with%20tabindex%3D%5C%22-1%5C%22.%20A%20%3Cdialog%3E%20opened%20with%20showModal()%20does%20this%20by%20itself.%22%2C%20%5B%5B%22Popup%22%2C%20popMissed%5D%2C%20%5B%22First%20Tab%20went%20to%22%2C%20stops%5Bcurrent%5D%5D%5D))%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20start%20%3D%20before%20%3E%3D%200%20%3F%20%5Bref(stops%5Bbefore%5D)%5D%20%3A%20src%20%3F%20%5Bref(src)%5D%20%3A%20%5B%22Start%22%5D%2C%20back%20%3D%20pressed%20%3C%200%20%3F%20%22%20(Shift%2BTab)%22%20%3A%20%22%22%3B%0A%20%20if%20(current%20%3D%3D%3D%20before%20%26%26%20current%20!%3D%3D%20want%20%26%26%20!landed%20%26%26%20!left)%20%7B%0A%20%20%20%20var%20s%20%3D%20stops%5Bcurrent%5D%3B%0A%20%20%20%20var%20d%20%3D%20pressed%20%3E%200%20%3F%201%20%3A%20-1%2C%20st%20%3D%20stays.get(s)%20%7C%7C%20stays.set(s%2C%20%7B%7D).get(s)%2C%20key1%20%3D%20d%20%3E%200%20%3F%20%22Tab%22%20%3A%20%22Shift%2BTab%22%2C%20key2%20%3D%20d%20%3E%200%20%3F%20%22Shift%2BTab%22%20%3A%20%22Tab%22%3B%0A%20%20%20%20if%20(multi(s))%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%5Cu2192%20%22%2C%20ref(s)%2C%20back%20%2B%20%22%3A%20Tab%20moved%20inside%20it%2C%20it%20has%20parts%20of%20its%20own%20(like%20a%20date%20field%2C%20a%20video%20or%20a%20frame).%20Not%20judged.%22%5D))%3B%0A%20%20%20%20else%20if%20(tellsHow(s))%20%7B%0A%20%20%20%20%20%20if%20(!st.how)%20log(%22SKIPPED%22%2C%20%22Keyboard%20trap%22%2C%20%5Bref(s)%2C%20%22%20keeps%20Tab%2C%20and%20says%20how%20to%20leave.%22%5D)%3B%0A%20%20%20%20%20%20st.how%20%3D%201%3B%0A%20%20%20%20%7D%20else%20if%20(!st%5Bd%5D%20%26%26%20(leaves.get(s)%20%7C%7C%20%7B%7D)%5B-d%5D)%20%7B%0A%20%20%20%20%20%20st%5Bd%5D%20%3D%201%3B%0A%20%20%20%20%20%20log(%22OK%22%2C%20%22Keyboard%20trap%22%2C%20%5Bkey1%20%2B%20%22%20stays%20on%20%22%2C%20ref(s)%2C%20%22%2C%20but%20%22%20%2B%20key2%20%2B%20%22%20leaves%20it%2C%20so%20it%20is%20not%20a%20trap.%22%5D)%3B%0A%20%20%20%20%7D%20else%20if%20(!st%5Bd%5D%20%26%26%20!st%5B-d%5D)%20%7B%0A%20%20%20%20%20%20st%5Bd%5D%20%3D%201%3B%0A%20%20%20%20%20%20log(%22SKIPPED%22%2C%20%22Keyboard%20trap%22%2C%20%5Bkey1%20%2B%20%22%20stays%20on%20%22%2C%20ref(s)%2C%20%22.%20Press%20%22%20%2B%20key2%20%2B%20%22%3A%20if%20focus%20can't%20leave%20that%20way%20either%2C%20it%20is%20a%20keyboard%20trap.%22%5D)%3B%0A%20%20%20%20%7D%20else%20if%20(!st%5Bd%5D%20%26%26%20trapped.indexOf(s)%20%3C%200)%20%7B%0A%20%20%20%20%20%20st%5Bd%5D%20%3D%201%3B%0A%20%20%20%20%20%20trapped.push(s)%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20announce(%22Keyboard%20trap%3A%20Tab%20and%20Shift%2BTab%20both%20stay%20on%20stop%20%22%20%2B%20(current%20%2B%201)%20%2B%20%22.%22)%3B%0A%20%20%20%20%20%20log(%22PROBLEM%22%2C%20%22Keyboard%20trap%22%2C%20%5B%22Tab%20and%20Shift%2BTab%20both%20stay%20on%20%22%2C%20ref(s)%2C%20%22%3A%20the%20keyboard%20can't%20move%20focus%20away.%22%5D%2C%20aiOf(W_TRAP%2C%20%22Tab%20or%20Shift%2BTab%20moves%20focus%20away%20from%20the%20element%2C%20so%20a%20keyboard%20user%20can%20leave%20it.%22%2C%20%22Find%20the%20keydown%20listener%20on%20the%20element%20or%20its%20parents%20that%20calls%20preventDefault()%20on%20Tab%2C%20or%20that%20calls%20.focus()%20on%20the%20same%20element%20again%2C%20and%20let%20Tab%20through.%20If%20the%20element%20needs%20Tab%20(a%20code%20editor)%2C%20let%20Escape%20move%20focus%20out%20and%20say%20so%20next%20to%20it.%22%2C%20%5B%5B%22Element%22%2C%20s%5D%2C%20%5B%22Expected%20next%22%2C%20stops%5B(current%20%2B%201)%20%25%20n%5D%5D%5D))%3B%0A%20%20%20%20%7D%0A%20%20%20%20pressed%20%3D%200%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20if%20(before%20%3E%3D%200%20%26%26%20current%20!%3D%3D%20before)%20%7B%0A%20%20%20%20var%20lv%20%3D%20leaves.get(stops%5Bbefore%5D)%20%7C%7C%20leaves.set(stops%5Bbefore%5D%2C%20%7B%7D).get(stops%5Bbefore%5D)%2C%20sd%20%3D%20pressed%20%3E%200%20%3F%201%20%3A%20-1%2C%20so%20%3D%20stays.get(stops%5Bbefore%5D)%3B%0A%20%20%20%20if%20(!lv%5Bsd%5D%20%26%26%20so%20%26%26%20so%5B-sd%5D%20%26%26%20!so%5Bsd%5D%20%26%26%20trapped.indexOf(stops%5Bbefore%5D)%20%3C%200)%20log(%22OK%22%2C%20%22Keyboard%20trap%22%2C%20%5B(sd%20%3E%200%20%3F%20%22Tab%22%20%3A%20%22Shift%2BTab%22)%20%2B%20%22%20leaves%20%22%2C%20ref(stops%5Bbefore%5D)%2C%20%22%2C%20so%20it%20is%20not%20a%20trap.%22%5D)%3B%0A%20%20%20%20lv%5Bsd%5D%20%3D%201%3B%0A%20%20%7D%0A%20%20var%20skipped%20%3D%20current%20!%3D%3D%20want%20%26%26%20!landed%20%26%26%20!left%20%3F%20linkSkip(want%2C%20current%2C%20pressed%20%3E%200%20%3F%201%20%3A%20-1)%20%3A%20null%3B%0A%20%20if%20(first%20%26%26%20pressed%20%3E%200%20%26%26%20landed)%20log(%22OK%22%2C%20%22Out%20of%20order%22%2C%20%5B%22First%20Tab%20went%20into%20the%20popup%20%22%2C%20popName(landed)%2C%20%22.%22%5D)%3B%0A%20%20else%20if%20(skipped)%20%7B%0A%20%20%20%20if%20(!macNote)%20%7B%0A%20%20%20%20%20%20macNote%20%3D%20true%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20log(%22INFO%22%2C%20%22Out%20of%20order%22%2C%20%5BMAC_NOTE%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20back%20%2B%20%22%3A%20your%20browser%20skipped%20%22%20%2B%20skipText(skipped)%20%2B%20%22.%20Not%20judged.%22%5D))%3B%0A%20%20%7D%20else%20if%20(current%20!%3D%3D%20want%20%26%26%20!landed%20%26%26%20!left%20%26%26%20!(popMissed%20%26%26%20first))%20%7B%0A%20%20%20%20var%20from%20%3D%20before%20%3E%3D%200%20%3F%20stops%5Bbefore%5D%20%3A%20src%2C%20to%20%3D%20stops%5Bcurrent%5D%2C%20fromText%20%3D%20before%20%3E%3D%200%20%3F%20%22stop%20%22%20%2B%20(before%20%2B%201)%20%3A%20src%20%3F%20%22%5C%22%22%20%2B%20label(src)%20%2B%20%22%5C%22%20%22%20%2B%20desc(src)%20%3A%20%22the%20start%20of%20the%20page%22%3B%0A%20%20%20%20announce(%22Tab%20jumped%20out%20of%20order%2C%20from%20%22%20%2B%20(before%20%3E%3D%200%20%3F%20%22stop%20%22%20%2B%20(before%20%2B%201)%20%3A%20src%20%3F%20label(src)%20%3A%20%22the%20start%22)%20%2B%20%22%20to%20stop%20%22%20%2B%20(current%20%2B%201)%20%2B%20%22.%22)%3B%0A%20%20%20%20if%20(!jumps.some(function%20(j)%20%7B%20return%20j%5B0%5D%20%3D%3D%3D%20from%20%26%26%20j%5B1%5D%20%3D%3D%3D%20to%3B%20%7D))%20%7B%0A%20%20%20%20%20%20jumps.push(%5Bfrom%2C%20to%5D)%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%7D%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(to)%2C%20back%20%2B%20%22%2C%20expected%20%22%2C%20ref(stops%5Bwant%5D)%2C%20to.tabIndex%20%3E%200%20%3F%20%22.%20It%20has%20tabindex%3D%5C%22%22%20%2B%20to.tabIndex%20%2B%20%22%5C%22.%22%20%3A%20%22.%22%5D)%2C%20aiOf(W_ORDER%2C%20%22Tab%22%20%2B%20(pressed%20%3C%200%20%3F%20%22%20with%20Shift%22%20%3A%20%22%22)%20%2B%20%22%20moves%20from%20%22%20%2B%20fromText%20%2B%20%22%20to%20stop%20%22%20%2B%20(want%20%2B%201)%20%2B%20%22%2C%20the%20next%20element%20in%20the%20Tab%20order.%22%2C%20to.tabIndex%20%3E%200%20%3F%20%22Remove%20tabindex%3D%5C%22%22%20%2B%20to.tabIndex%20%2B%20%22%5C%22%20from%20the%20element%20Tab%20jumped%20to%2C%20or%20set%20it%20to%200.%20A%20positive%20tabindex%20pulls%20an%20element%20ahead%20of%20the%20page%20order.%22%20%3A%20%22Tab%20follows%20the%20order%20of%20the%20HTML%2C%20so%20a%20jump%20comes%20from%20a%20script.%20Look%20for%20code%20that%20calls%20.focus()%20on%20focus%2C%20blur%20or%20keydown%20near%20the%20element%20Tab%20left%20from%2C%20and%20for%20content%20added%20or%20moved%20while%20Tab%20was%20pressed.%20If%20the%20element%20Tab%20jumped%20to%20sits%20elsewhere%20in%20the%20HTML%20on%20purpose%2C%20move%20it%20next%20to%20the%20one%20before%20it.%22%2C%20%5B%5B%22Tab%20left%20from%22%2C%20from%5D%2C%20%5B%22Tab%20jumped%20to%22%2C%20to%5D%2C%20%5B%22Expected%20next%22%2C%20stops%5Bwant%5D%5D%5D))%3B%0A%20%20%7D%20else%20if%20(current%20!%3D%3D%20want)%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20back%20%2B%20(landed%20%7C%7C%20left%20%3F%20%22%3A%20into%20or%20inside%20a%20popup%2C%20allowed.%22%20%3A%20%22%3A%20the%20popup%20that%20blocks%20the%20page%20is%20listed%20already.%22)%5D))%3B%0A%20%20else%20log(%22OK%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20back%20%2B%20%22%2C%20next%20in%20line.%22%5D))%3B%0A%20%20pressed%20%3D%200%3B%0A%7D%0Afunction%20inPanel()%20%7B%0A%20%20var%20a%20%3D%20root.activeElement%3B%0A%20%20return%20!!a%20%26%26%20panel.contains(a)%3B%0A%7D%0Afunction%20panelCtl()%20%7B%0A%20%20return%20%5B%5D.filter.call(panel.querySelectorAll(%22button%2Ca%2Cinput%22)%2C%20function%20(e)%20%7B%20return%20!e.disabled%20%26%26%20e.getClientRects().length%20%3E%200%3B%20%7D)%3B%0A%7D%0Afunction%20enter()%20%7B%0A%20%20endPress()%3B%0A%20%20if%20(walking)%20stopWalk(%22Paused%20by%20%22%20%2B%20KEYS%20%2B%20walkedText())%3B%0A%20%20var%20a%20%3D%20deep()%3B%0A%20%20pRet%20%3D%20a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement%20%26%26%20a%20!%3D%3D%20host%20%26%26%20a.getRootNode()%20!%3D%3D%20root%20%3F%20a%20%3A%20null%3B%0A%20%20panelIn%20%3D%20true%3B%0A%20%20skipPanel()%3B%0A%20%20play.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%7D%0Afunction%20back()%20%7B%0A%20%20var%20r%20%3D%20pRet%3B%0A%20%20panelIn%20%3D%20false%3B%0A%20%20pRet%20%3D%20null%3B%0A%20%20skipPanel()%3B%0A%20%20if%20(r%20%26%26%20r.isConnected)%20r.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20else%20%7B%0A%20%20%20%20var%20a%20%3D%20root.activeElement%3B%0A%20%20%20%20if%20(a%20%26%26%20a.blur)%20a.blur()%3B%0A%20%20%7D%0A%7D%0Afunction%20key(e)%20%7B%0A%20%20if%20(e.code%20%3D%3D%3D%20%22KeyF%22%20%26%26%20e.ctrlKey%20%26%26%20e.shiftKey%20%26%26%20!e.altKey%20%26%26%20!e.metaKey)%20%7B%0A%20%20%20%20e.preventDefault()%3B%0A%20%20%20%20e.stopPropagation()%3B%0A%20%20%20%20if%20(inPanel())%20back()%3B%0A%20%20%20%20else%20enter()%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20if%20(e.key%20!%3D%3D%20%22Tab%22%20%26%26%20settleT)%20endPress()%3B%0A%20%20lastKey%20%3D%20e.key%3B%0A%20%20keyT%20%3D%20Date.now()%3B%0A%20%20keyOn%20%3D%20deep()%3B%0A%20%20if%20(walking%20%26%26%20(e.key%20%3D%3D%3D%20%22%20%22%20%7C%7C%20e.key%20%3D%3D%3D%20%22Tab%22%20%7C%7C%20e.key%20%3D%3D%3D%20%22Escape%22))%20%7B%0A%20%20%20%20if%20(e.key%20%3D%3D%3D%20%22%20%22)%20e.preventDefault()%3B%0A%20%20%20%20stopWalk(%22Paused%20by%20%22%20%2B%20(e.key%20%3D%3D%3D%20%22%20%22%20%3F%20%22Space%22%20%3A%20e.key)%20%2B%20walkedText())%3B%0A%20%20%20%20if%20(e.key%20!%3D%3D%20%22Tab%22)%20return%3B%0A%20%20%7D%0A%20%20if%20(panelIn%20%26%26%20inPanel())%20%7B%0A%20%20%20%20if%20(e.key%20%3D%3D%3D%20%22Escape%22)%20%7B%0A%20%20%20%20%20%20e.preventDefault()%3B%0A%20%20%20%20%20%20return%20back()%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(e.key%20%3D%3D%3D%20%22Tab%22%20%26%26%20skip.checked)%20%7B%0A%20%20%20%20%20%20var%20l%20%3D%20panelCtl()%2C%20i%20%3D%20l.indexOf(root.activeElement)%2C%20n%20%3D%20l.length%3B%0A%20%20%20%20%20%20e.preventDefault()%3B%0A%20%20%20%20%20%20if%20(n)%20l%5Bi%20%3C%200%20%3F%200%20%3A%20(i%20%2B%20(e.shiftKey%20%3F%20-1%20%3A%201)%20%2B%20n)%20%25%20n%5D.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20fa%20%3D%20deep()%2C%20onBody%20%3D%20!fa%20%7C%7C%20fa%20%3D%3D%3D%20document.body%20%7C%7C%20fa%20%3D%3D%3D%20document.documentElement%3B%0A%20%20if%20(e.key%20%3D%3D%3D%20%22Escape%22%20%26%26%20!modal()%20%26%26%20!(openPop%20%26%26%20!gone(openPop))%20%26%26%20(onBody%20%7C%7C%20inPanel()))%20close()%3B%0A%20%20if%20(e.key%20%3D%3D%3D%20%22Tab%22)%20%7B%0A%20%20%20%20endPress()%3B%0A%20%20%20%20fa%20%3D%20deep()%3B%0A%20%20%20%20pressed%20%3D%20e.shiftKey%20%3F%20-1%20%3A%201%3B%0A%20%20%20%20before%20%3D%20current%20%3C%200%20%26%26%20lost%20%3F%20-2%20%3A%20current%3B%0A%20%20%20%20beforeEl%20%3D%20current%20%3C%200%20%26%26%20!lost%20%26%26%20fa%20%26%26%20fa%20!%3D%3D%20document.body%20%26%26%20fa%20!%3D%3D%20document.documentElement%20%26%26%20!within(host%2C%20fa)%20%3F%20fa%20%3A%20null%3B%0A%20%20%20%20wantEl%20%3D%20null%3B%0A%20%20%20%20for%20(var%20k%20%3D%201%2C%20n%20%3D%20stops.length%3B%20before%20%3E%3D%200%20%26%26%20k%20%3C%20n%3B%20k%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20c%20%3D%20stops%5B(((before%20%2B%20pressed%20*%20k)%20%25%20n)%20%2B%20n)%20%25%20n%5D%3B%0A%20%20%20%20%20%20if%20(tabbable(c))%20%7B%0A%20%20%20%20%20%20%20%20wantEl%20%3D%20c%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20settleT%20%3D%20setTimeout(settle%2C%20150)%3B%0A%20%20%7D%0A%7D%0Afunction%20pick(e)%20%7B%0A%20%20var%20g%20%3D%20e.target.closest%20%26%26%20e.target.closest(%22g.o%22)%3B%0A%20%20if%20(!g)%20return%3B%0A%20%20e.preventDefault()%3B%0A%20%20e.stopPropagation()%3B%0A%20%20if%20(e.type%20!%3D%3D%20%22click%22)%20return%3B%0A%20%20var%20s%20%3D%20stops%5B%2Bg.getAttribute(%22data-i%22)%5D%3B%0A%20%20if%20(!s)%20return%3B%0A%20%20endPress()%3B%0A%20%20s.focus(%7B%20preventScroll%3A%20true%2C%20focusVisible%3A%20true%20%7D)%3B%0A%20%20focus()%3B%0A%7D%0Afunction%20close()%20%7B%0A%20%20closed%20%3D%20true%3B%0A%20%20stopWalk()%3B%0A%20%20removeEventListener(%22pointerdown%22%2C%20interrupt%2C%20true)%3B%0A%20%20removeEventListener(%22pointerdown%22%2C%20tap%2C%20true)%3B%0A%20%20removeEventListener(%22scroll%22%2C%20onMoved%2C%20true)%3B%0A%20%20removeEventListener(%22resize%22%2C%20onMoved)%3B%0A%20%20removeEventListener(%22resize%22%2C%20keepIn)%3B%0A%20%20if%20(fit)%20fit.disconnect()%3B%0A%20%20watch.disconnect()%3B%0A%20%20if%20(timer)%20clearTimeout(timer)%3B%0A%20%20if%20(idle%20%26%26%20window.cancelIdleCallback)%20cancelIdleCallback(idle)%3B%0A%20%20if%20(sayT)%20clearTimeout(sayT)%3B%0A%20%20if%20(settleT)%20clearTimeout(settleT)%3B%0A%20%20removeEventListener(%22keydown%22%2C%20key%2C%20true)%3B%0A%20%20removeEventListener(%22focusin%22%2C%20focus%2C%20true)%3B%0A%20%20removeEventListener(%22focusout%22%2C%20lose%2C%20true)%3B%0A%20%20if%20(tabPoll)%20clearInterval(tabPoll)%3B%0A%20%20if%20(logTab%20%26%26%20!logTab.closed%20%26%26%20tabNote)%20tabNote.hidden%20%3D%20false%3B%0A%20%20if%20(window.__tabTrail%20%3D%3D%3D%20api)%20delete%20window.__tabTrail%3B%0A%20%20if%20(ownName)%20window.name%20%3D%20%22%22%3B%0A%20%20host.remove()%3B%0A%7D%0Avar%20grab%20%3D%20null%3B%0Apanel.addEventListener(%22pointerdown%22%2C%20function%20(e)%20%7B%0A%20%20if%20(e.button%20!%3D%3D%200%20%7C%7C%20e.target.closest(%22button%2Ca%2Cul%2Clabel%22))%20return%3B%0A%20%20var%20r%20%3D%20panel.getBoundingClientRect()%3B%0A%20%20grab%20%3D%20%5Be.clientX%20-%20r.left%2C%20e.clientY%20-%20r.top%5D%3B%0A%20%20panel.setPointerCapture(e.pointerId)%3B%0A%20%20panel.classList.add(%22g%22)%3B%0A%7D)%3B%0Apanel.addEventListener(%22pointermove%22%2C%20function%20(e)%20%7B%0A%20%20if%20(!grab)%20return%3B%0A%20%20var%20x%20%3D%20Math.min(Math.max(e.clientX%20-%20grab%5B0%5D%2C%200)%2C%20innerWidth%20-%20panel.offsetWidth)%3B%0A%20%20var%20y%20%3D%20Math.min(Math.max(e.clientY%20-%20grab%5B1%5D%2C%200)%2C%20innerHeight%20-%20panel.offsetHeight)%3B%0A%20%20panel.style.left%20%3D%20x%20%2B%20%22px%22%3B%0A%20%20panel.style.top%20%3D%20y%20%2B%20%22px%22%3B%0A%20%20panel.style.right%20%3D%20%22auto%22%3B%0A%20%20panel.style.bottom%20%3D%20%22auto%22%3B%0A%7D)%3B%0Afunction%20drop()%20%7B%20grab%20%3D%20null%3B%20panel.classList.remove(%22g%22)%3B%20%7D%0Afunction%20keepIn()%20%7B%0A%20%20if%20(closed)%20return%3B%0A%20%20var%20r%20%3D%20panel.getBoundingClientRect()%2C%20m%20%3D%208%3B%0A%20%20if%20(!r.height%20%7C%7C%20(r.top%20%3E%3D%20m%20%26%26%20r.bottom%20%3C%3D%20innerHeight%20-%20m%20%26%26%20r.left%20%3E%3D%20m%20%26%26%20r.right%20%3C%3D%20innerWidth%20-%20m))%20return%3B%0A%20%20panel.style.top%20%3D%20Math.min(Math.max(r.top%2C%20m)%2C%20Math.max(m%2C%20innerHeight%20-%20m%20-%20r.height))%20%2B%20%22px%22%3B%0A%20%20panel.style.left%20%3D%20Math.min(Math.max(r.left%2C%20m)%2C%20Math.max(m%2C%20innerWidth%20-%20m%20-%20r.width))%20%2B%20%22px%22%3B%0A%20%20panel.style.right%20%3D%20%22auto%22%3B%0A%20%20panel.style.bottom%20%3D%20%22auto%22%3B%0A%7D%0Avar%20fit%20%3D%20window.ResizeObserver%20%3F%20new%20ResizeObserver(keepIn)%20%3A%20null%3B%0Aif%20(fit)%20fit.observe(panel)%3B%0AaddEventListener(%22resize%22%2C%20keepIn)%3B%0Apanel.addEventListener(%22pointerup%22%2C%20drop)%3B%0Apanel.addEventListener(%22pointercancel%22%2C%20drop)%3B%0Ahost.__close%20%3D%20close%3B%0Afunction%20mainOf(e)%20%7B%0A%20%20var%20first%20%3D%20null%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20e.p.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20x%20%3D%20e.p%5Bi%5D%3B%0A%20%20%20%20if%20(typeof%20x%20%3D%3D%3D%20%22string%22%20%7C%7C%20!x.el)%20continue%3B%0A%20%20%20%20if%20(i%20%26%26%20typeof%20e.p%5Bi%20-%201%5D%20%3D%3D%3D%20%22string%22%20%26%26%20%2F%5Cu2192%20%24%2F.test(e.p%5Bi%20-%201%5D))%20return%20x%3B%0A%20%20%20%20if%20(!first)%20first%20%3D%20x%3B%0A%20%20%7D%0A%20%20return%20first%3B%0A%7D%0Avar%20api%20%3D%20%7B%0A%20%20report%3A%20function%20()%20%7B%20return%20aiText()%3B%20%7D%2C%0A%20%20log%3A%20function%20()%20%7B%0A%20%20%20%20return%20logs.map(function%20(e)%20%7B%0A%20%20%20%20%20%20var%20m%20%3D%20mainOf(e)%3B%0A%20%20%20%20%20%20return%20%7B%20time%3A%20clock(e.t)%2C%20result%3A%20e.k%2C%20check%3A%20e.f%2C%20wcag%3A%20wcagOf(e)%20%7C%7C%20null%2C%20text%3A%20e.p.map(partText).join(%22%22)%2C%20fixed%3A%20!!e.fixed%2C%20selector%3A%20m%20%3F%20sel(m.el)%20%7C%7C%20null%20%3A%20null%2C%20stop%3A%20m%20%26%26%20m.n%20%3F%20m.n%20%3A%20null%20%7D%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%2C%0A%20%20play%3A%20function%20(o)%20%7B%0A%20%20%20%20o%20%3D%20o%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20var%20skipOut%20%3D%20%5B%5D.concat(o.ignore%20%7C%7C%20%5B%5D)%3B%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20skipOut.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20try%20%7B%20document.querySelector(skipOut%5Bi%5D)%3B%20%7D%20catch%20(x)%20%7B%20return%20Promise.reject(new%20Error(%22Tab%20trail%3A%20%5C%22%22%20%2B%20skipOut%5Bi%5D%20%2B%20%22%5C%22%20in%20ignore%20is%20not%20a%20valid%20CSS%20selector.%22))%3B%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20ignore%20%3D%20skipOut%3B%0A%20%20%20%20walkDelay%20%3D%20typeof%20o.delay%20%3D%3D%3D%20%22number%22%20%26%26%20o.delay%20%3E%3D%200%20%3F%20o.delay%20%3A%20400%3B%0A%20%20%20%20return%20new%20Promise(function%20(res)%20%7B%0A%20%20%20%20%20%20walkDone.push(res)%3B%0A%20%20%20%20%20%20if%20(!walking)%20%7B%0A%20%20%20%20%20%20%20%20walked%20%3D%20new%20Set()%3B%0A%20%20%20%20%20%20%20%20startWalk()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D%2C%0A%20%20problems%3A%20function%20()%20%7B%20return%20problemsOf(openProbs())%3B%20%7D%2C%0A%20%20state%3A%20function%20()%20%7B%20return%20%7B%20walked%3A%20walkedN()%2C%20total%3A%20stops.length%2C%20done%3A%20!walking%20%26%26%20walkEnd%20%3D%3D%3D%20%22done%22%20%26%26%20stops.every(function%20(x)%20%7B%20return%20hidTested.has(x)%3B%20%7D)%2C%20untested%3A%20untested()%20%7D%3B%20%7D%2C%0A%20%20version%3A%20VERSION%2C%0A%20%20close%3A%20function%20()%20%7B%20close()%3B%20%7D%0A%7D%3B%0Awindow.__tabTrail%20%3D%20api%3B%0Ax.addEventListener(%22click%22%2C%20close)%3B%0AaddEventListener(%22scroll%22%2C%20onMoved%2C%20%7B%20capture%3A%20true%2C%20passive%3A%20true%20%7D)%3B%0AaddEventListener(%22resize%22%2C%20onMoved)%3B%0Awatch.observe(document.documentElement%2C%20%7B%20subtree%3A%20true%2C%20childList%3A%20true%2C%20attributes%3A%20true%2C%20attributeFilter%3A%20%5B%22style%22%2C%20%22class%22%2C%20%22hidden%22%2C%20%22tabindex%22%2C%20%22disabled%22%2C%20%22inert%22%2C%20%22href%22%2C%20%22role%22%2C%20%22open%22%5D%20%7D)%3B%0AaddEventListener(%22keydown%22%2C%20key%2C%20true)%3B%0AaddEventListener(%22pointerdown%22%2C%20interrupt%2C%20true)%3B%0AaddEventListener(%22pointerdown%22%2C%20tap%2C%20true)%3B%0AaddEventListener(%22focusin%22%2C%20focus%2C%20true)%3B%0AaddEventListener(%22focusout%22%2C%20lose%2C%20true)%3B%0Aroot.addEventListener(%22focusin%22%2C%20function%20()%20%7B%0A%20%20if%20(root.activeElement%20%3D%3D%3D%20panel%20%26%26%20panel.tabIndex%20%3C%200)%20return%20panel.blur()%3B%0A%20%20focus()%3B%0A%7D)%3B%0Aroot.addEventListener(%22focusout%22%2C%20function%20()%20%7B%0A%20%20setTimeout(function%20()%20%7B%0A%20%20%20%20if%20(!panelIn%20%7C%7C%20closed%20%7C%7C%20inPanel())%20return%3B%0A%20%20%20%20var%20a%20%3D%20deep()%3B%0A%20%20%20%20if%20((!a%20%7C%7C%20a%20%3D%3D%3D%20document.body%20%7C%7C%20a%20%3D%3D%3D%20document.documentElement)%20%26%26%20Date.now()%20-%20tapT%20%3E%20600)%20return%20play.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20%20%20panelIn%20%3D%20false%3B%0A%20%20%20%20pRet%20%3D%20null%3B%0A%20%20%20%20skipPanel()%3B%0A%20%20%7D%2C%200)%3B%0A%7D)%3B%0A%5B%22pointerdown%22%2C%20%22mousedown%22%2C%20%22pointerup%22%2C%20%22mouseup%22%2C%20%22click%22%5D.forEach(function%20(t)%20%7B%0A%20%20dot.addEventListener(t%2C%20pick)%3B%0A%20%20dotPg.addEventListener(t%2C%20pick)%3B%0A%7D)%3B%0Areview()%3B%0Afocus()%3B%0Adraw()%3B%0A%7D)()%3Bvoid%200";
|
|
1
|
+
export const VERSION = "1.1.0";
|
|
2
|
+
export const UPDATED = "November 23, 2026";
|
|
3
|
+
export const CODE = "\n/* Tab trail 1.1.0. Copyright (c) 2026 Matjaž Korošec. MIT License, full text: https://github.com/matjazkorosec/tab-trail/blob/main/LICENSE */\nvar VERSION = \"1.1.0\";\nvar ID = \"tab-trail-host\";\nvar prev = [].filter.call(document.querySelectorAll(\"[id='\" + ID + \"']\"), function (e) { return typeof e.__close === \"function\"; })[0];\nif (prev) { prev.__close(); return; }\nvar NS = \"http://www.w3.org/2000/svg\";\nvar FOCUSABLE = \"a[href],area[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[contenteditable]:not([contenteditable='false']),[tabindex]\";\nvar ROLES = /^(button|link|tab|menuitem|menuitemcheckbox|menuitemradio|checkbox|radio|switch|option|combobox|slider|treeitem)$/;\n\nfunction walk(root, out) {\n var kids = root.children;\n for (var i = 0; i < kids.length; i++) visit(kids[i], out);\n return out;\n}\nfunction visit(el, out) {\n if (el.id === ID && el === host && (!skip || skip.checked)) return;\n if (!(host && el.getRootNode() === host.shadowRoot && (!panel.contains(el) || (logList && logList.contains(el))))) out.push(el);\n if (el.shadowRoot) return walk(el.shadowRoot, out);\n if (el.tagName === \"SLOT\" && el.assignedElements) {\n var got = el.assignedElements({ flatten: true });\n if (got.length) {\n for (var i = 0; i < got.length; i++) visit(got[i], out);\n return;\n }\n }\n walk(el, out);\n}\nfunction shown(el) {\n if (el.checkVisibility) return el.checkVisibility({ visibilityProperty: true, opacityProperty: false });\n var s = getComputedStyle(el);\n return s.display !== \"none\" && s.visibility !== \"hidden\" && el.getClientRects().length > 0;\n}\nfunction tabbable(el) {\n if (!el.matches(FOCUSABLE)) return false;\n if (el.tabIndex < 0 || el.matches(\":disabled\") || el.closest(\"[inert]\")) return false;\n if (el.tagName === \"INPUT\" && el.type === \"hidden\") return false;\n if (el.tagName === \"SUMMARY\" && (!el.parentElement || el.parentElement.tagName !== \"DETAILS\" || el.parentElement.querySelector(\"summary\") !== el)) return false;\n return shown(el);\n}\n\nvar stops = [], stopSet = new Set(), upSet = new Set(), missed = [], forced = [], forcedBad = [], domAt = new Map();\nvar GROUP = \"[role=tablist],[role=menu],[role=menubar],[role=listbox],[role=radiogroup],[role=grid],[role=treegrid],[role=tree],[role=toolbar]\";\nvar ITEM = /^(tab|menuitem|menuitemcheckbox|menuitemradio|option|radio|gridcell|row|treeitem)$/;\nfunction nearTab(el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (stopSet.has(p)) return true;\n return upSet.has(el);\n}\nfunction roving(el) {\n var g = el.closest(GROUP);\n if (!g || (!ITEM.test(el.getAttribute(\"role\") || \"\") && !(el.hasAttribute(\"tabindex\") && el.tabIndex < 0))) return false;\n if (stopSet.has(g) || upSet.has(g)) return true;\n var id = g.id;\n return !!id && stops.some(function (s) { return (\" \" + (s.getAttribute(\"aria-controls\") || \"\") + \" \" + (s.getAttribute(\"aria-owns\") || \"\") + \" \").indexOf(\" \" + id + \" \") >= 0; });\n}\nfunction modal() {\n try {\n var l = document.querySelectorAll(\"dialog:modal\");\n return l.length ? l[l.length - 1] : null;\n } catch (e) { return null; }\n}\nfunction within(m, e) {\n for (var n = e; n; n = n.parentNode || n.host) if (n === m) return true;\n return false;\n}\nfunction scan() {\n var all = walk(document, []);\n var top = modal();\n if (top) all = all.filter(function (e) { return within(top, e); });\n var found = all.filter(tabbable);\n var groups = new Map();\n found = found.filter(function (el) {\n if (el.tagName !== \"INPUT\" || el.type !== \"radio\" || !el.name) return true;\n var own = el.form || el.getRootNode(), byName = groups.get(own) || {};\n groups.set(own, byName);\n var g = byName[el.name] || (byName[el.name] = found.filter(function (x) { return x.tagName === \"INPUT\" && x.type === \"radio\" && x.name === el.name && (x.form || x.getRootNode()) === own; }));\n var picked = g.filter(function (x) { return x.checked; })[0] || g[0];\n return picked === el;\n });\n forced = found.filter(function (el) { return el.tabIndex > 0 && !(host && el.getRootNode() === host.shadowRoot); });\n stops = ordered(document, found, null);\n domAt = new Map();\n forced.forEach(function (f) { domAt.set(f, forced.length > 30 ? found.indexOf(f) : ordered(document, found, f).indexOf(f)); });\n forcedBad = forced.filter(function (f) { return domAt.get(f) !== stops.indexOf(f); });\n stopSet = new Set(stops);\n upSet = new Set();\n stops.forEach(function (s) {\n for (var p = s.parentElement; p && !upSet.has(p); p = p.parentElement) upSet.add(p);\n });\n var ids = document.querySelectorAll(\"[id='\" + ID + \"']\"), only = !ids.length || (ids.length === 1 && ids[0] === host);\n var miss = all.filter(function (el) {\n if (stopSet.has(el) || (only ? el === host : el.closest(\"#\" + ID)) || (host && el.getRootNode() === host.shadowRoot)) return false;\n var t = el.tagName;\n if (t === \"HTML\" || t === \"BODY\" || t === \"LABEL\" || t === \"OPTION\" || t === \"OPTGROUP\") return false;\n var role = el.getAttribute(\"role\") || \"\";\n var looks = el.hasAttribute(\"onclick\") || ROLES.test(role);\n var s = getComputedStyle(el);\n if (s.pointerEvents === \"none\") return false;\n if (!looks) {\n if (s.cursor !== \"pointer\") return false;\n var ps = el.parentElement && getComputedStyle(el.parentElement);\n if (ps && ps.cursor === \"pointer\") return false;\n }\n if (el.closest(\"label\") || el.matches(\":disabled\") || el.closest(\"[inert]\") || el.closest(\"[aria-disabled='true']\")) return false;\n if (!shown(el)) return false;\n var r = el.getBoundingClientRect();\n if (r.width < 8 || r.height < 8) return false;\n return !nearTab(el) && !roving(el);\n });\n var missSet = new Set(miss);\n missed = miss.filter(function (el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (missSet.has(p)) return false;\n return true;\n });\n hoverScan();\n}\nfunction ordered(scope, list, flat) {\n var units = [], groups = new Map(), out = [];\n list.forEach(function (el) {\n var h = el;\n while (h.getRootNode() !== scope && h.getRootNode().host) h = h.getRootNode().host;\n if (h === el) return units.push({ k: el === flat ? 0 : el.tabIndex, el: el });\n var g = groups.get(h);\n if (!g) {\n g = { k: h.hasAttribute(\"tabindex\") && h !== flat ? Math.max(h.tabIndex, 0) : 0, host: h, els: [] };\n groups.set(h, g);\n units.push(g);\n }\n g.els.push(el);\n });\n units.filter(function (u) { return u.k > 0; }).sort(function (a, b) { return a.k - b.k; }).concat(units.filter(function (u) { return u.k <= 0; })).forEach(function (u) {\n if (u.host) out = out.concat(ordered(u.host.shadowRoot, u.els, flat));\n else out.push(u.el);\n });\n return out;\n}\nvar hovers = [], hoverOk = [], hovRule = new Map(), hovSeen = new Set(), hovHid = new Map(), tabOpens = new WeakSet();\nfunction hoverTry(s) {\n var hit = false;\n hovers.forEach(function (h) {\n var e = hovHid.get(h);\n if (e && within(h, s) && !within(e, s) && !hiddenNow(e)) {\n tabOpens.add(h);\n hit = true;\n }\n });\n if (hit) rescan();\n}\nvar HOVER = \":hover\", FOC = \":focus-within|:focus-visible|:focus\";\nfunction parts(sel) {\n var out = [], depth = 0, start = 0;\n for (var i = 0; i < sel.length; i++) {\n var ch = sel.charAt(i);\n if (ch === \"(\") depth++;\n else if (ch === \")\") depth--;\n else if (ch === \",\" && !depth) { out.push(sel.slice(start, i).trim()); start = i + 1; }\n }\n out.push(sel.slice(start).trim());\n return out;\n}\nfunction bare(sel, re) {\n return sel.replace(new RegExp(\"(^|[\\\\s>+~(])(\" + re + \")\", \"g\"), \"$1*\").replace(new RegExp(re, \"g\"), \"\");\n}\nfunction reveals(st) {\n var d = st.getPropertyValue(\"display\"), v = st.getPropertyValue(\"visibility\"), o = st.getPropertyValue(\"opacity\"), mh = st.getPropertyValue(\"max-height\");\n return (d !== \"\" && d !== \"none\") || v === \"visible\" || (o !== \"\" && parseFloat(o) > 0) || (mh !== \"\" && mh !== \"0\" && mh !== \"0px\");\n}\nvar cssRules = 0, cssSheets = 0, cssBlocked = [];\nfunction nest(sel, up) {\n if (!up) return sel;\n return parts(sel).map(function (q) { return q.indexOf(\"&\") >= 0 ? q.split(\"&\").join(\":is(\" + up + \")\") : \":is(\" + up + \") \" + q; }).join(\", \");\n}\nfunction depth(p, k) {\n var d = 0;\n for (var i = 0; i < k; i++) {\n var ch = p.charAt(i);\n if (ch === \"\\\\\") i++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n }\n return d;\n}\nfunction compound(p, k) {\n var d = 0, i = k - 1;\n for (; i >= 0; i--) {\n var ch = p.charAt(i);\n if (i > 0 && p.charAt(i - 1) === \"\\\\\") {\n i--;\n continue;\n }\n if (ch === \")\") d++;\n else if (ch === \"(\") {\n if (!d) break;\n d--;\n } else if (!d && /[\\s>+~,]/.test(ch)) break;\n }\n var c = p.slice(i + 1, k).trim();\n return c ? bare(c, HOVER) : \"\";\n}\nfunction selfFocus(p) {\n var m = p.match(new RegExp(FOC)), k = m ? m.index + m[0].length : -1;\n if (k < 0 || depth(p, k)) return false;\n for (var d = 0; k < p.length; k++) {\n var ch = p.charAt(k);\n if (ch === \"\\\\\") k++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n else if (!d && /[\\s>+~]/.test(ch)) return false;\n }\n return true;\n}\nvar sheetMemo = new WeakMap();\nfunction readRules() {\n var hov = [], foc = [];\n cssRules = 0;\n cssSheets = 0;\n cssBlocked = [];\n function take(sel, src) {\n parts(sel).forEach(function (p) {\n if (/:focus/.test(p)) return foc.push([bare(p, FOC), selfFocus(p)]);\n var k = p.indexOf(HOVER), on;\n if (k < 0) return;\n if (depth(p, k)) on = compound(p, k);\n else {\n var pre = p.slice(0, k);\n if (!pre.trim() || /[\\s>+~]$/.test(pre)) return;\n on = bare(pre, HOVER);\n }\n if (on) hov.push([bare(p, HOVER), on, p, src]);\n });\n }\n function go(list, src, up) {\n for (var i = 0; i < list.length; i++) {\n var r = list[i], sel = up, st = null;\n if (r.selectorText !== undefined) {\n sel = nest(r.selectorText, up);\n st = r.style;\n } else if (up && r.style && !r.cssRules) st = r.style;\n if (st) {\n cssRules++;\n if (/:hover|:focus/.test(sel) && reveals(st)) take(sel, src);\n }\n if (r.cssRules && r.cssRules.length) go(r.cssRules, src, sel);\n }\n }\n var sheets = Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets || []);\n sheets.forEach(function (sh) {\n var list;\n try { list = sh.cssRules; } catch (e) { return cssBlocked.push(sh.href || \"a style sheet\"); }\n var memo = sheetMemo.get(sh);\n if (!memo || memo.list !== list || memo.n !== list.length || memo.node !== sh.ownerNode) {\n var h0 = hov, f0 = foc, c0 = cssRules;\n hov = [];\n foc = [];\n cssRules = 0;\n try { go(list, sh.href || (sh.ownerNode ? \"an inline <style> in the page\" : \"a style sheet added by script\"), \"\"); } catch (e) {\n hov = h0;\n foc = f0;\n cssRules = c0;\n return cssBlocked.push(sh.href || \"a style sheet\");\n }\n memo = { list: list, n: list.length, node: sh.ownerNode, hov: hov, foc: foc, rules: cssRules };\n sheetMemo.set(sh, memo);\n hov = h0;\n foc = f0;\n cssRules = c0;\n }\n hov = hov.concat(memo.hov);\n foc = foc.concat(memo.foc);\n cssRules += memo.rules;\n cssSheets++;\n });\n return [hov, foc];\n}\nfunction hiddenNow(e) {\n return !shown(e) || getComputedStyle(e).opacity === \"0\" || e.getBoundingClientRect().height < 1;\n}\nfunction hoverScan() {\n var rr = readRules(), foc = rr[1], found = [], seenH = new Set(), ok = [], top = modal();\n hovRule = new Map();\n hovSeen = new Set();\n rr[0].forEach(function (h) {\n var list;\n try { list = document.querySelectorAll(h[0]); } catch (e) { return; }\n for (var i = 0; i < list.length; i++) {\n var e = list[i], host = null;\n if (!hiddenNow(e) || (!e.matches(FOCUSABLE) && !e.querySelector(FOCUSABLE))) continue;\n try { host = e.parentElement && e.parentElement.closest(h[1]); } catch (x) {}\n if (!host || host === document.body || host === document.documentElement || seenH.has(host) || !shown(host) || (top && !within(top, host))) continue;\n if (host.matches(\"[aria-expanded],[aria-haspopup]\") || host.querySelector(\"[aria-expanded],[aria-haspopup]\")) {\n ok.push([host, \"toggle\"]);\n continue;\n }\n if (foc.some(function (f) { try { return (!f[1] || shown(e)) && e.matches(f[0]); } catch (x) { return false; } })) {\n ok.push([host, \"focus\"]);\n continue;\n }\n if (tabOpens.has(host)) {\n ok.push([host, \"tab\"]);\n continue;\n }\n found.push(host);\n seenH.add(host);\n hovHid.set(host, e);\n hovRule.set(host, [h[2], h[3]]);\n if (shown(e) && stops.some(function (s) { return e.contains(s); })) hovSeen.add(host);\n }\n });\n hovers = found;\n hoverOk = ok.filter(function (o) { return !seenH.has(o[0]); });\n}\nscan();\n\nvar host = document.createElement(\"div\");\nhost.id = ID;\nhost.style.cssText = \"all:initial;position:absolute;left:0;top:0;width:0;height:0;overflow:visible;z-index:2147483647;pointer-events:none;\";\nvar root = host.attachShadow({ mode: \"open\" });\nvar style = document.createElement(\"style\");\nstyle.textContent = [\n \":host{all:initial}\",\n \"svg{position:fixed;inset:0;width:100vw;height:100vh;overflow:visible}\",\n \"svg.pg{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible}\",\n \".p{position:fixed;bottom:66px;right:66px;width:350px;box-sizing:border-box;padding:6px;background:#e4dccd;color:#1a1612;border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.12),0 14px 34px rgba(0,0,0,.26);font:14px/1.45 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;pointer-events:auto;cursor:grab;overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 90px);overscroll-behavior:contain}\",\n \".tb{display:flex;align-items:center;gap:4px;padding:0 0 5px 4px}\",\n \".t{margin:0;flex:1;white-space:nowrap;font:700 17px/1.2 Georgia,serif;letter-spacing:-.01em}\",\n \".cd{margin:4px 0 0;padding:7px 10px;background:#fbf8f3;border-radius:10px}\",\n \".tb+.cd{margin-top:0}\",\n \".p.rm{padding:10px}\",\n \".rm .tb{gap:6px;padding:4px 2px 8px 6px}\",\n \".rm .t{font-size:19px}\",\n \".rm .cd{margin-top:6px;padding:12px 14px}\",\n \".rm .tb+.cd{margin-top:0}\",\n \".rm .ta{height:32px;padding:0 12px 0 10px}\",\n \".rm .n{gap:7px;margin-top:12px}\",\n \".rm .n b{font-size:22px}\",\n \".rm .k{margin-top:7px}\",\n \".rm .x,.rm .b.cn{width:32px;height:32px}\",\n \".rm .sec{margin-top:6px}\",\n \".rm .sg{min-height:46px;padding:0 12px 0 8px}\",\n \".rm .ic{width:30px;height:30px;border-radius:8px}\",\n \".rm .so,.rm .lbd,.rm .la{padding:2px 14px 14px}\",\n \".rm .hw{margin:10px 6px 2px}\",\n \".rm .m{margin-top:8px;gap:6px}\",\n \".rm .c{padding:6px 10px}\",\n \".rm .pr{margin-top:12px}\",\n \".rm .pl{height:30px;padding:0 14px 0 11px}\",\n \".rm .b{width:30px;height:30px}\",\n \".rm .lf{margin-top:10px}\",\n \".rm .lt{padding:3px 9px}\",\n \".rm .ll{margin:10px -14px 0}\",\n \".rm .lx{padding:6px 14px}\",\n \".rm .lr.lb2{gap:6px;margin-top:12px}\",\n \".rm .kl,.rm .ka{height:38px;border-radius:8px}\",\n \".rm .lnt{height:38px;border-radius:8px}\",\n \".rm .lck,.rm .lw,.rm .sm,.rm .lr{margin-top:10px}\",\n \".rm .lrt{margin-top:0}\",\n \".rm .gp .k,.rm .lgp .k{margin-top:10px}\",\n \".rm .mn{margin-top:12px}\",\n \".rm .so>.k:first-child,.rm .lbd>:first-child,.rm .la>:first-child,.rm .cd>:first-child,.rm .cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>:first-child,.cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>div:empty{display:none}\",\n \".ta{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px 0 8px;border:1.5px solid #1a1612;border-radius:999px;background:#fbf8f3;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer;flex:none}\",\n \".ta:hover{background:#fff}\",\n \".ta:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".n{display:flex;align-items:baseline;gap:6px;margin:5px 0 0}\",\n \".n b{font:700 20px/1 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;letter-spacing:-.02em;font-variant-numeric:tabular-nums}\",\n \".k{display:flex;align-items:center;gap:10px;margin:4px 0 0;font-size:14px}\",\n \".d{width:16px;height:16px;border-radius:50%;background:#1a1612;box-shadow:0 0 0 2px #fff inset,0 0 0 1px #1a1612;flex:none}\",\n \".r{width:16px;height:12px;box-sizing:border-box;border:2px dashed #d0103a;border-radius:2px;background:rgba(208,16,58,.12);flex:none}\",\n \".x{width:28px;height:28px;flex:none;padding:0;border:0;border-radius:50%;background:transparent;color:#1a1612;cursor:pointer;display:grid;place-items:center}\",\n \".p svg{display:block;position:static;inset:auto;width:auto;height:auto;overflow:hidden;flex:none}\",\n \".x:hover{background:rgba(26,22,18,.08)}\",\n \".b.cn{width:28px;height:28px}\",\n \".sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\",\n \".x:focus-visible,.a:focus-visible,.sg:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".sec{margin:4px 0 0;background:#fbf8f3;border-radius:10px}\",\n \".sg{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:32px;padding:0 9px 0 5px;border-radius:10px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".sg:hover{background:#fff}\",\n \".ic{width:22px;height:22px;border-radius:6px;background:#efe8dc;display:grid;place-items:center;flex:none}\",\n \".sg[aria-expanded=true] .ic{background:#1a1612;color:#fbf8f3}\",\n \".warn .ic{background:rgba(208,16,58,.12);color:#d0103a}\",\n \".warn .sg[aria-expanded=true] .ic{background:#d0103a;color:#fff}\",\n \".bg{margin-left:auto;padding:2px 8px;border-radius:999px;background:#d0103a;color:#fff;font-weight:700;line-height:1.3}\",\n \".bg:empty{display:none}\",\n \".bg:not(:empty)+i{margin-left:12px}\",\n \".sg i{margin-left:auto;width:7px;height:7px;border-right:2px solid #1a1612;border-bottom:2px solid #1a1612;transform:translate(-3px,-2px) rotate(45deg)}\",\n \".sg[aria-expanded=true] i{transform:translate(-3px,2px) rotate(225deg)}\",\n \".so,.lbd,.la{padding:1px 10px 8px}\",\n \".lbd{overflow:hidden}\",\n \".so>.k:first-child,.lbd>:first-child,.la>:first-child{margin-top:0}\",\n \".so[hidden]{display:none}\",\n \".hw{margin:5px 4px 0;color:#5f564c;font-size:11px;line-height:1.3;font-weight:600}\",\n \".a{color:#5f564c;font-size:13px;font-weight:400;text-decoration:none;white-space:nowrap}\",\n \".vr{float:right;margin-left:8px;color:#5f564c;font-weight:400}\",\n \".hw+.hw{margin-top:4px}\",\n \".mn{margin:6px 0 0;color:#1e3a8a}\",\n \".a:hover{color:#9a3412;text-decoration:underline}\",\n \".p.g{cursor:grabbing;user-select:none}\",\n \".n b.e{color:#d0103a}\",\n \".n b.ok{color:#1f7a3f}\",\n \"button.lq{all:unset;cursor:pointer;color:#1e3a8a;font-weight:700}.cg{color:#5f564c}.pk{color:#c2410c}\",\n \".bar{display:flex;gap:2px;height:24px;margin:6px 0 2px}.bar button{border:0;padding:0;min-width:6px;border-radius:4px;cursor:pointer}.bar button:focus-visible{outline:2px solid #1a1612;outline-offset:2px}.bl{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;margin:4px 0 8px}.bl em{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:5px}\",\n \".s{cursor:pointer}\",\n \"svg.in{z-index:1}\",\n \"g.o{pointer-events:auto;cursor:pointer;-webkit-user-select:none;user-select:none}\",\n \".s input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".s.off{opacity:.45;cursor:default}\",\n \".s.off input{cursor:default}\",\n \".s input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".h{width:16px;height:16px;border-radius:50%;background:#fff;border:2px dashed #1a1612;box-sizing:border-box;flex:none}\",\n \".m{list-style:none;margin:5px 0 0;padding:2px;display:flex;flex-wrap:wrap;gap:4px}\",\n \".c{all:unset;font:inherit;font-size:14px;line-height:1;cursor:pointer;padding:4px 8px;border:1px dashed #d0103a;border-radius:999px;background:rgba(208,16,58,.06);color:#1a1612}\",\n \".c:hover{background:rgba(208,16,58,.14)}\",\n \".c[aria-pressed=true]{border-style:solid;background:#d0103a;color:#fff}\",\n \".c:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".gp[hidden]{display:none}\",\n \".gp .k,.lgp .k{margin:6px 0 0}\",\n \".w{display:flex;align-items:center;gap:8px;margin:0;font-size:14px}\",\n \".w span{flex:1;font-variant-numeric:tabular-nums}\",\n \".b{all:unset;box-sizing:border-box;width:28px;height:28px;border:1.5px solid #1a1612;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#1a1612;flex:none}\",\n \".b:hover{background:rgba(26,22,18,.08)}\",\n \".b:disabled{opacity:.3;cursor:default;background:none}\",\n \".b:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".pr{display:flex;align-items:center;gap:10px;margin:6px 0 0;font-size:14px;color:#5f564c}\",\n \".pr+.pr{margin-top:8px}\",\n \".pr .lo{display:inline-flex;align-items:center;height:30px;color:#1a1612}\",\n \".sm{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".sm[hidden]{display:none}\",\n \".sm .g{color:#1f7a3f;font-weight:600}\",\n \".sm .e{color:#d0103a;font-weight:700}\",\n \".sm .q{color:#5f564c;font-weight:400}\",\n \".m .mo{align-self:center;color:#5f564c;font-size:14px}\",\n \".pl{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 13px 0 10px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer;flex:none}\",\n \".pl:hover{background:#3a332c}\",\n \".pl:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".ls{font-weight:400;color:#5f564c}\",\n \".lv{color:#d0103a;font-weight:700}\",\n \".lbd[hidden],.la[hidden],.lm[hidden]{display:none}\",\n \".lf{display:grid;grid-template-columns:1fr 1fr;gap:2px;margin:6px 0 0;padding:3px;background:#efe8dc;border-radius:10px}\",\n \".lt{all:unset;box-sizing:border-box;text-align:center;padding:2px 9px;border-radius:7px;color:#5f564c;font-weight:600;font-size:14px;line-height:1.3;cursor:pointer}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".ll{list-style:none;margin:6px -10px 0;padding:0;cursor:auto}\",\n \".lx{padding:3px 10px}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".lx .tm{margin-right:8px;font:500 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".lx .st{font:700 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\",\n \".lx .bd{display:block}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{all:unset;box-sizing:border-box;display:inline-block;min-width:22px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;font-size:14px;line-height:1.4;text-align:center;cursor:pointer}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\",\n \".lr{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 0}\",\n \".lrt{margin:0}\",\n \".lr.lb2{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}\",\n \".kl,.ka{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:30px;border-radius:7px;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer}\",\n \".kl{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover{background:#efe8dc}\",\n \".ka{background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".kl:focus-visible,.ka:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lnt{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:30px;border:1.5px dashed #1a1612;border-radius:7px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lnt:hover{border-style:solid;background:#fff}\",\n \".lnt:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lk{all:unset;box-sizing:border-box;padding:5px 13px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lk:hover{background:#3a332c}\",\n \".lo{all:unset;box-sizing:border-box;padding:4px 12px;border:1.5px solid #1a1612;border-radius:999px;font-weight:600;font-size:14px;cursor:pointer}\",\n \".lo:hover{background:rgba(26,22,18,.08)}\",\n \".lt:focus-visible,.lc:focus-visible,.lk:focus-visible,.lo:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".la p,.lm{margin:8px 0 0}\",\n \".lck{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:flex;align-items:center;gap:8px;margin:6px 0 0;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lm{color:#d0103a}\"\n].join(\"\");\ntry {\n var sheet = new CSSStyleSheet();\n sheet.replaceSync(style.textContent);\n root.adoptedStyleSheets = [sheet];\n} catch (e) {\n root.appendChild(style);\n}\nvar spot = document.createElementNS(NS, \"svg\");\nroot.appendChild(spot);\nvar underPg = document.createElementNS(NS, \"svg\");\nunderPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(underPg);\nvar svgPg = document.createElementNS(NS, \"svg\");\nsvgPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(svgPg);\nvar under = document.createElementNS(NS, \"svg\");\nroot.appendChild(under);\nvar svg = document.createElementNS(NS, \"svg\");\nroot.appendChild(svg);\nvar dotPg = document.createElementNS(NS, \"svg\");\ndotPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(dotPg);\nvar dot = document.createElementNS(NS, \"svg\");\nroot.appendChild(dot);\n[spot, underPg, svgPg, under, svg, dotPg, dot].forEach(function (g) { g.setAttribute(\"aria-hidden\", \"true\"); });\n\nvar panel = document.createElement(\"div\");\npanel.className = \"p\";\npanel.setAttribute(\"role\", \"dialog\");\npanel.setAttribute(\"aria-label\", \"Tab trail\");\nfunction line(cls, bold, text, mark) {\n var p = document.createElement(\"p\");\n p.className = cls;\n if (mark) { var m = document.createElement(\"span\"); m.className = mark; p.appendChild(m); }\n if (bold !== null) { var b = document.createElement(\"b\"); b.textContent = bold; p.appendChild(b); }\n p.appendChild(document.createTextNode(text));\n panel.appendChild(p);\n return p;\n}\nvar x = document.createElement(\"button\");\nx.className = \"x\";\nx.type = \"button\";\nx.setAttribute(\"aria-label\", \"Close Tab trail\");\nfunction icon(parent, w, d, sw) {\n var g = el(\"svg\", { width: w, height: w, viewBox: \"0 0 16 16\", fill: \"none\", stroke: \"currentColor\", \"stroke-width\": sw, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\", \"aria-hidden\": \"true\" }, parent);\n el(\"path\", { d: d }, g);\n return g;\n}\nicon(x, 16, \"M3 3l10 10M13 3L3 13\", 2);\nvar bar = document.createElement(\"div\");\nbar.className = \"tb\";\npanel.appendChild(bar);\nvar corner = document.createElement(\"button\");\ncorner.className = \"b cn\";\ncorner.type = \"button\";\ncorner.setAttribute(\"aria-label\", \"Move to the next corner\");\ncorner.title = \"Move to the next corner\";\nvar cg = icon(corner, 16, \"M5 11.5V5h6.5M9.5 3.2L11.5 5 9.5 6.8\", 1.6);\nel(\"rect\", { x: 2, y: 2, width: 12, height: 12, rx: 2 }, cg);\nel(\"rect\", { x: 9.5, y: 9.5, width: 2, height: 2, fill: \"currentColor\" }, cg);\ncorner.addEventListener(\"click\", function () {\n var r = panel.getBoundingClientRect(), W = innerWidth, H = innerHeight;\n var mx = Math.max(8, Math.min(66, (W - r.width) / 2)) + \"px\", my = Math.max(8, Math.min(66, (H - r.height) / 2)) + \"px\";\n var right = r.left + r.width / 2 > W / 2, low = r.top + r.height / 2 > H / 2;\n var k = !low && !right ? 1 : !low && right ? 2 : low && right ? 3 : 0;\n for (var i = 0; i < 4; i++) {\n var toRight = k === 1 || k === 2, toLow = k === 2 || k === 3;\n panel.style.left = toRight ? \"auto\" : mx;\n panel.style.right = toRight ? mx : \"auto\";\n panel.style.top = toLow ? \"auto\" : my;\n panel.style.bottom = toLow ? my : \"auto\";\n var n = panel.getBoundingClientRect();\n if (Math.abs(n.left - r.left) > 2 || Math.abs(n.top - r.top) > 2) break;\n k = (k + 1) % 4;\n }\n});\nvar say = document.createElement(\"p\");\nsay.className = \"sr\";\nsay.setAttribute(\"role\", \"status\");\nsay.setAttribute(\"aria-live\", \"polite\");\npanel.appendChild(say);\nvar sayList = [], sayT = 0;\nfunction announce(t) {\n sayList.push(t);\n if (sayT) return;\n sayT = setTimeout(function () {\n sayT = 0;\n if (closed) return;\n var text = sayList.join(\" \");\n sayList = [];\n say.textContent = \"\";\n setTimeout(function () { say.textContent = text; }, 50);\n }, 1000);\n}\nbar.appendChild(line(\"t\", null, \"Tab trail\"));\nvar playCard = document.createElement(\"div\");\nplayCard.className = \"cd\";\npanel.appendChild(playCard);\nvar playRow = document.createElement(\"p\");\nplayRow.className = \"pr\";\nvar play = document.createElement(\"button\");\nplay.className = \"pl\";\nplay.type = \"button\";\nvar playIcon = document.createElement(\"span\");\nplay.appendChild(playIcon);\nvar playWord = document.createTextNode(\"Play\");\nplay.appendChild(playWord);\nplay.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\nvar playText = document.createElement(\"span\");\nplayText.textContent = \"Visits every stop for you\";\nplayRow.appendChild(play);\nplayRow.appendChild(playText);\nplayCard.appendChild(playRow);\nvar AI_ICON = \"M3.5 5.5h9v8h-9zM8 5.5V3.2M8 1.9v.1M6 8.6v1.1M10 8.6v1.1M6.3 11.6h3.4M1.8 8.5v2.6M14.2 8.5v2.6\", COPY_ICON = \"M10.5 5.5V3a.5.5 0 0 0-.5-.5H3a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h2.5M5.5 5.5h8v8h-8z\";\nvar aiBtn = document.createElement(\"button\");\naiBtn.className = \"ta\";\naiBtn.type = \"button\";\nicon(aiBtn, 15, AI_ICON, 1.6);\naiBtn.appendChild(document.createTextNode(\"Copy for AI\"));\naiBtn.addEventListener(\"click\", function () { copyIt(aiBtn, window, aiText(), \"Copy for AI\"); });\nbar.appendChild(aiBtn);\nbar.appendChild(corner);\nbar.appendChild(x);\nvar sumLine = document.createElement(\"p\");\nsumLine.className = \"sm\";\nsumLine.hidden = true;\nplayCard.appendChild(sumLine);\nvar resCard = document.createElement(\"div\");\nresCard.className = \"cd\";\npanel.appendChild(resCard);\nvar info = document.createElement(\"div\");\nresCard.appendChild(info);\nvar shownEl = null, chips = [], drawn = [], panelIn = false, pRet = null;\nvar KIND = { img: \"Image\", picture: \"Image\", svg: \"Icon\", i: \"Icon\", video: \"Video\", a: \"Link\", li: \"List item\", tr: \"Table row\", td: \"Table cell\" };\nvar BARE = { button: \"Button\", textarea: \"Field\", select: \"Dropdown\", iframe: \"Frame\" };\nfunction kind(m, tag) {\n if (tag === \"input\") return m.type === \"checkbox\" ? \"Checkbox\" : m.type === \"radio\" ? \"Radio\" : /^(submit|button|reset|image)$/.test(m.type) ? \"Button\" : \"Field\";\n return KIND[tag] || BARE[tag] || \"Clickable box\";\n}\nfunction named(m) {\n var by = m.getAttribute(\"aria-labelledby\"), r = m.getRootNode(), t = \"\";\n if (by && r.getElementById) t = by.split(/\\s+/).map(function (id) { var x = r.getElementById(id); return x ? x.textContent : \"\"; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"aria-label\") || \"\";\n if (!t.trim() && m.labels && m.labels.length) t = [].map.call(m.labels, function (l) { return l.innerText || l.textContent; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"placeholder\") || \"\";\n if (!t.trim() && m.tagName === \"INPUT\" && /^(submit|button|reset)$/.test(m.type)) t = m.value;\n if (!t.trim()) t = m.innerText || \"\";\n if (!t.trim()) t = m.getAttribute(\"title\") || \"\";\n return t;\n}\nvar EMAIL = /[\\w.+-]+@[\\w-]+(\\.[\\w-]+)+/g, DIGITS = /\\d(?:[\\s-]?\\d){5,}/g, TOKEN = /[A-Za-z0-9_%=+-]{16,}/g;\nvar SECRET = /\\b(?:(?:sk|pk|rk)_(?:live|test)_\\w+|gh[pousr]_\\w{20,}|github_pat_\\w+|AKIA[0-9A-Z]{16}|xox[abprs]-[\\w-]+|eyJ[\\w-]+\\.[\\w-]+\\.[\\w-]*)/g, SAID = /\\b((?:password|passwd|pwd|passcode|pin|secret|api[ _-]?key|token)\\s*[:=]\\s*)\\S+/gi;\nfunction tokens(t) { return t.replace(SECRET, \"[token]\").replace(TOKEN, function (w) { return /\\d/.test(w) ? \"[token]\" : w; }); }\nfunction scrub(t) { return tokens(String(t).replace(SAID, \"$1[token]\")).replace(EMAIL, \"[email]\").replace(DIGITS, \"[number]\"); }\nfunction secretish(t) { return scrub(t) !== t; }\nfunction cleanUrl(u) {\n u = String(u).split(/[?#]/)[0].replace(/^([a-z][\\w+.-]*:\\/\\/)[^@\\/]*@/i, \"$1\");\n if (/^(javascript|data|blob):/i.test(u)) return u.split(\":\")[0] + \":\";\n return scrub(u);\n}\nfunction label(m) {\n var tag = m.tagName.toLowerCase();\n var inner = m.querySelector(\"img[alt],[aria-label],title\");\n var alt = (m.getAttribute(\"alt\") || (inner && (inner.getAttribute(\"alt\") || inner.getAttribute(\"aria-label\") || inner.textContent)) || \"\").trim();\n var t = scrub(named(m)).trim().replace(/\\s+/g, \" \");\n alt = scrub(alt);\n if (!t && alt) t = (KIND[tag] ? KIND[tag] + \": \" : \"\") + alt.replace(/\\s+/g, \" \");\n if (!t) t = kind(m, tag);\n return t.length > 28 ? t.slice(0, 27) + \"...\" : t;\n}\nfunction count(n, text, bad, good, parent) {\n var p = document.createElement(\"p\");\n p.className = \"n\";\n var b = document.createElement(\"b\");\n b.textContent = String(n);\n if (bad) b.className = \"e\";\n else if (good) b.className = \"ok\";\n p.appendChild(b);\n p.appendChild(document.createTextNode(text));\n (parent || info).appendChild(p);\n}\nvar CHIPS = 50;\nfunction chipUl(parent, list, text, go) {\n var ul = document.createElement(\"ul\"), out = [];\n ul.className = \"m\";\n list.slice(0, CHIPS).forEach(function (m) {\n var li = document.createElement(\"li\");\n var c = document.createElement(\"button\");\n c.className = \"c\";\n c.type = \"button\";\n c.textContent = text(m);\n c.addEventListener(\"click\", function () { go(m, c); });\n out.push(c);\n li.appendChild(c);\n ul.appendChild(li);\n });\n if (list.length > CHIPS) {\n var mo = document.createElement(\"li\");\n mo.className = \"mo\";\n mo.textContent = \"and \" + (list.length - CHIPS).toLocaleString(\"en-US\") + \" more\";\n ul.appendChild(mo);\n }\n parent.appendChild(ul);\n return out;\n}\nfunction fill() {\n var had = chips.indexOf(root.activeElement);\n while (info.firstChild) info.removeChild(info.firstChild);\n chips = [];\n drawn = sig();\n count(stops.length, stops.length === 1 ? \" stop for the Tab key\" : \" stops for the Tab key\");\n count(missed.length, missed.length === 0 ? \" clickable things Tab skips\" : missed.length === 1 ? \" looks clickable, but Tab skips it\" : \" look clickable, but Tab skips them\", missed.length > 0, missed.length === 0);\n if (missed.indexOf(shownEl) < 0 && hovers.indexOf(shownEl) < 0 && forcedBad.indexOf(shownEl) < 0) shownEl = null;\n if (missed.length) chipList(missed);\n if (hovers.length) {\n count(hovers.length, hovers.length === 1 ? \" menu or box opens only on mouse hover\" : \" menus or boxes open only on mouse hover\", true);\n chipList(hovers);\n }\n if (forcedBad.length) {\n count(forcedBad.length, forcedBad.length === 1 ? \" stop has tabindex above 0, which pulls it ahead of the page\" : \" stops have tabindex above 0, which pulls them ahead of the page\", true);\n chipList(forcedBad, true);\n }\n costDraw();\n mapDraw();\n if (skip) skipPanel();\n if (had >= 0 && chips.length) chips[Math.min(had, chips.length - 1)].focus();\n}\nfunction sig() { return [stops.length, mapOn && mapOn.checked && JSON.stringify(regions()[0]), costOn && costOn.checked && goals().map(function (g) { return g.presses + g.name; }).join()].concat(missed, [\"|\"], hovers, [\"|\"], forced, [\"|\"], forcedBad); }\nfunction chipList(list, num) {\n var made = chipUl(info, list, function (m) { return (num && stops.indexOf(m) >= 0 ? stops.indexOf(m) + 1 + \": \" : \"\") + label(m); }, function (m, c) {\n shownEl = m;\n chips.forEach(function (x) { x.setAttribute(\"aria-pressed\", x === c ? \"true\" : \"false\"); });\n m.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n queue();\n });\n made.forEach(function (c, i) { c.setAttribute(\"aria-pressed\", list[i] === shownEl ? \"true\" : \"false\"); });\n chips = chips.concat(made);\n}\nfill();\nvar PAGE = 50, win = 0, seen = -1;\nvar pager = document.createElement(\"p\");\npager.className = \"w\";\nvar pageText = document.createElement(\"span\");\npager.appendChild(pageText);\nfunction pageBtn(text, step) {\n var b = document.createElement(\"button\");\n b.className = \"b\";\n b.type = \"button\";\n b.setAttribute(\"aria-label\", text);\n icon(b, 14, step < 0 ? \"M10 3L5 8l5 5\" : \"M6 3l5 5-5 5\", 2);\n b.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\n b.addEventListener(\"click\", function () {\n win = Math.min(Math.max(win + step, 0), Math.ceil(stops.length / PAGE) - 1);\n queue();\n });\n pager.appendChild(b);\n return b;\n}\nvar prevBtn = pageBtn(\"Previous\", -1), nextBtn = pageBtn(\"Next\", 1);\nvar group = document.createElement(\"div\");\ngroup.className = \"cd gp\";\ngroup.appendChild(pager);\nvar costBox = document.createElement(\"div\");\nresCard.appendChild(costBox);\nvar mapBox = document.createElement(\"div\");\nresCard.appendChild(mapBox);\nvar jumpBox = document.createElement(\"div\");\nresCard.appendChild(jumpBox);\npanel.appendChild(group);\nvar jumps = [], pressed = 0, before = -1, popMissed = null, lost = false;\nvar POP = /cookie|consent|gdpr|modal|popup/i;\nfunction dimmed() {\n var W = innerWidth, H = innerHeight;\n return Array.prototype.some.call(document.querySelectorAll(\"body *\"), function (e) {\n if (e.id === ID) return false;\n var cs = getComputedStyle(e);\n if (cs.position !== \"fixed\" || cs.display === \"none\" || cs.visibility === \"hidden\") return false;\n var r = e.getBoundingClientRect();\n if (r.width < W * 0.9 || r.height < H * 0.9) return false;\n var m = cs.backgroundColor.match(/rgba?\\(([^)]+)\\)/);\n var al = m ? m[1].split(\",\")[3] : null;\n return (al !== undefined && al !== null && +al > 0 && +al < 1) || cs.backdropFilter !== \"none\" && cs.backdropFilter !== \"\";\n });\n}\nfunction blocking(p) {\n if (p.matches(\"dialog\") && p.matches(\":modal\")) return true;\n if (p.getAttribute(\"aria-modal\") === \"true\") return true;\n var r = p.getBoundingClientRect();\n if (r.width * r.height >= innerWidth * innerHeight * 0.5) return true;\n return dimmed();\n}\nfunction popupOf(el) {\n for (var p = el; p && p !== document.documentElement; p = p.parentElement || (p.getRootNode().host || null)) {\n if (p.nodeType !== 1) continue;\n if (p.matches(\"dialog[open],[role=dialog],[role=alertdialog],[aria-modal=true]\")) return p;\n var c = typeof p.className === \"string\" ? p.className : \"\";\n if (POP.test(p.id + \" \" + c) && getComputedStyle(p).position === \"fixed\") return p;\n }\n return null;\n}\nvar covered = [], trapped = [], probHid = new Map();\nfunction pinOf(e) {\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") return n;\n }\n return null;\n}\nfunction hideInfo(s) {\n var r = s.getBoundingClientRect();\n if (r.width < 1 || r.height < 1) return { why: \"has no size\" };\n var m = modal();\n if (m && !within(m, s)) return { why: \"is under an open modal\" };\n if (popupOf(s)) return { why: \"is inside a popup\" };\n var pts = [[r.left + r.width / 2, r.top + r.height / 2], [r.left + 1, r.top + 1], [r.right - 1, r.top + 1], [r.left + 1, r.bottom - 1], [r.right - 1, r.bottom - 1]];\n var tested = 0, under = 0, pin = null;\n for (var i = 0; i < pts.length; i++) {\n var px = pts[i][0], py = pts[i][1];\n if (px < 0 || py < 0 || px >= innerWidth || py >= innerHeight) continue;\n tested++;\n var hit = null, list = document.elementsFromPoint(px, py);\n for (var k = 0; k < list.length; k++) if (list[k] !== host && !host.contains(list[k])) { hit = list[k]; break; }\n if (!hit || within(s, hit) || within(hit, s)) continue;\n var p = pinOf(hit);\n if (!p || within(p, s)) continue;\n under++;\n if (!pin) pin = p;\n }\n if (!tested) return { why: \"is off screen\" };\n return { tested: tested, under: under, pin: pin };\n}\nfunction pinText(p) {\n return desc(p) + \" (\" + getComputedStyle(p).position + \", \" + Math.round(p.getBoundingClientRect().height) + \" px tall)\";\n}\nvar moved = [], movedE = null;\nfunction movedLine() {\n if (movedE) {\n var i = logs.indexOf(movedE);\n if (i >= 0) logs.splice(i, 1);\n if (movedE.li && movedE.li.parentNode) movedE.li.parentNode.removeChild(movedE.li);\n movedE = null;\n }\n moved = moved.filter(function (x) { return x.isConnected; });\n if (!moved.length) {\n if (logList) logSummary();\n return;\n }\n var nums = moved.map(function (x) { return stops.indexOf(x) + 1; }).filter(function (n) { return n > 0; }).sort(function (a, b) { return a - b; });\n var list = nums.length ? \": \" + nums.slice(0, 20).join(\", \") + (nums.length > 20 ? \" and \" + (nums.length - 20) + \" more\" : \"\") : \"\";\n log(\"SKIPPED\", \"Hidden focus\", [pl(moved.length, \"stop\", \"stops\") + \" not tested, Tab moved on before the page stopped scrolling\" + list + \". Press Play to test them.\"]);\n movedE = logs[logs.length - 1];\n}\nfunction tested(s) {\n var i = moved.indexOf(s);\n if (i < 0) return;\n moved.splice(i, 1);\n movedLine();\n}\nfunction where(s) {\n var r = s.getBoundingClientRect();\n return scrollX + \",\" + scrollY + \",\" + r.left + \",\" + r.top;\n}\nvar restSig = new WeakMap(), noRing = [], probRing = new Map(), SIG = [\"outline-style\", \"outline-width\", \"outline-color\", \"box-shadow\", \"background-color\", \"background-image\", \"color\", \"text-decoration-line\", \"text-decoration-color\", \"opacity\", \"transform\", \"filter\"];\nfunction upOf(e) { return e && (e.parentElement || (e.parentNode && e.parentNode.host)); }\nfunction focusSig(e) {\n var out = [], up = upOf(e);\n [[e], [e, \"::before\"], [e, \"::after\"], [up], [upOf(up)], [e.nextElementSibling], [e.firstElementChild], [e.labels && e.labels[0]]].forEach(function (x) {\n if (!x[0]) return;\n var c = getComputedStyle(x[0], x[1] || null), o = c.outlineStyle !== \"none\" && c.outlineWidth !== \"0px\";\n SIG.forEach(function (k) { if (o || k.indexOf(\"outline\") < 0) out.push(c.getPropertyValue(k)); });\n [\"top\", \"right\", \"bottom\", \"left\"].forEach(function (d) {\n var w = c.getPropertyValue(\"border-\" + d + \"-width\");\n out.push(w, w === \"0px\" ? \"\" : c.getPropertyValue(\"border-\" + d + \"-color\"));\n });\n });\n return out.join(\"|\");\n}\nfunction rest(e) {\n if (!e) return;\n if (e.matches(\":hover\")) restSig.delete(e);\n else restSig.set(e, focusSig(e));\n}\nvar noOutline = null;\nfunction outlineRule(e) {\n if (!noOutline) {\n noOutline = [];\n var go = function (list, src) {\n for (var i = 0; i < list.length; i++) {\n var r = list[i], st = r.style;\n if (r.cssRules && r.cssRules.length) go(r.cssRules, src);\n if (r.selectorText && st && (st.outlineStyle === \"none\" || /^0(px)?$/.test(st.outlineWidth))) parts(r.selectorText).forEach(function (p) { noOutline.push([p, src, p.replace(/:focus(-visible)?(?![\\w-])/g, \"\").trim() || \"*\"]); });\n }\n };\n Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets || []).forEach(function (sh) {\n try { go(sh.cssRules, sh.href || (sh.ownerNode ? \"an inline <style> in the page\" : \"a style sheet added by script\")); } catch (x) {}\n });\n }\n for (var i = 0; i < noOutline.length; i++) {\n try { if (e.matches(noOutline[i][2])) return noOutline[i]; } catch (x) {}\n }\n return null;\n}\nvar ghosts = [], ghostOf = new Map(), probGhost = new Map(), GHOST = { off: \"is off screen\", size: \"has no size\", inv: \"is invisible\", aria: \"is inside aria-hidden\" };\nfunction unseen(e) {\n var r = e.getBoundingClientRect();\n if (r.width < 1 || r.height < 1) return \"size\";\n if (r.right <= 0 || r.left >= innerWidth || r.bottom <= 0 || r.top >= innerHeight) return \"off\";\n if (getComputedStyle(e).visibility === \"hidden\") return \"inv\";\n for (var n = e; n; n = upOf(n)) if (getComputedStyle(n).opacity === \"0\") return \"inv\";\n return \"\";\n}\nfunction ghostWhy(e) {\n var why = unseen(e), lb = (e.labels && e.labels[0]) || (e.tagName === \"INPUT\" && e.nextElementSibling);\n if (why && why !== \"off\" && lb && !unseen(lb)) why = \"\";\n for (var n = e; n && !why; n = upOf(n)) if (n.getAttribute(\"aria-hidden\") === \"true\") why = \"aria\";\n return why;\n}\nfunction ghostCheck(s) {\n if (hovers.some(function (h) { return hovSeen.has(h) && within(hovHid.get(h), s); })) return true;\n var why = ghostWhy(s), was = ghosts.indexOf(s) >= 0;\n if (!why) {\n if (!was) log(\"OK\", \"Ghost stop\", [ref(s), \" is visible when Tab is on it.\"]);\n else {\n ghosts.splice(ghosts.indexOf(s), 1);\n ghostOf.delete(s);\n probGhost.get(s).fixed = true;\n probGhost.delete(s);\n renderJumps();\n queue();\n log(\"OK\", \"Ghost stop\", [ref(s), \" shows now when Tab is on it.\"]);\n }\n return false;\n }\n if (was) return true;\n ghosts.push(s);\n ghostOf.set(s, why);\n renderJumps();\n queue();\n announce(\"Ghost stop: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", \" + GHOST[why] + \".\");\n var aria = why === \"aria\";\n log(\"PROBLEM\", \"Ghost stop\", [ref(s), \" \" + GHOST[why] + \" when Tab is on it.\"], aiOf(aria ? W_NAME : W_VIS, aria ? \"An element Tab can reach is not hidden from screen readers.\" : \"The element shows on screen while it has keyboard focus.\", aria ? \"Remove aria-hidden, or add inert or tabindex=\\\"-1\\\" so Tab skips it too.\" : \"Hide it with display: none or inert while it is closed, or show it when it gets focus.\", [[\"Element\", s, null, true]]), aria ? \"4.1.2 A\" : null);\n probGhost.set(s, logs[logs.length - 1]);\n return true;\n}\nvar skipBad = null, noSkip = 0, skipSaid = null, probSkip = null, SKIPW = /(^|[^a-z\\u010d\\u0161\\u017e])(skip|jump|main|content|presko\\u010di|vsebina)(?![a-z\\u010d\\u0161\\u017e])/i;\nfunction mainRegion() { return [].filter.call(document.querySelectorAll(\"main,[role=main]\"), shown)[0] || null; }\nfunction tucked(e) {\n var r = e.getBoundingClientRect();\n return (r.width < 2 && r.height < 2) || r.bottom + scrollY <= 0 || r.right + scrollX <= 0;\n}\nfunction skipLink() {\n for (var i = 0; i < 3 && i < stops.length; i++) {\n var e = stops[i], h = e.getAttribute(\"href\") || \"\";\n if (e.tagName === \"A\" && h.charAt(0) === \"#\" && h.length > 1 && (SKIPW.test(label(e)) || (e !== deep() && tucked(e)))) return e;\n }\n return null;\n}\nfunction ahead(m) { return stops.filter(function (x) { return !within(m, x) && m.compareDocumentPosition(x) & 2; }).length; }\nfunction skipCheck() {\n var l = skipLink(), m = mainRegion(), why = \"\", n = 0, id = \"\", t = null;\n if (l) {\n id = l.getAttribute(\"href\").slice(1);\n try { id = decodeURIComponent(id); } catch (x) {}\n t = document.getElementById(id) || document.getElementsByName(id)[0];\n if (!t) why = \"#\" + id + \" is missing\";\n else if (!shown(t)) why = \"#\" + id + \" is hidden\";\n else if (!stops.some(function (x) { return x === t || within(t, x) || t.compareDocumentPosition(x) & 4; })) why = \"nothing after #\" + id + \" takes focus\";\n } else if (m) {\n n = ahead(m);\n if (n < 15) n = 0;\n }\n var key = [l, why, n, !!m].join(\"|\");\n if (key === skipSaid) return;\n skipSaid = key;\n if (probSkip) probSkip.fixed = true;\n probSkip = null;\n skipBad = l && why ? { link: l, why: why, to: t } : null;\n noSkip = n;\n renderJumps();\n queue();\n if (skipBad) log(\"PROBLEM\", \"Broken skip link\", [ref(l), \" goes nowhere: \" + why + \".\"], aiOf(W_BYPASS, \"The skip link moves focus past the header to the main content.\", t ? \"Make #\" + id + \" visible, and put the main content after it.\" : \"Give the main content id=\\\"\" + id + \"\\\", or point the link at the id it has.\", [[\"Element\", l], [\"Main content\", m]]));\n else if (n) log(\"PROBLEM\", \"Broken skip link\", [n + \" stops before the main content, and no skip link.\"], aiOf(W_BYPASS, \"A skip link as the first stop moves focus past the header to the main content.\", \"Add <a href=\\\"#main\\\">Skip to content</a> as the first link, and id=\\\"main\\\" on <main>.\", [[\"Main content\", m]]));\n else if (l) return log(\"OK\", \"Broken skip link\", [ref(l), \" goes to #\" + id + \".\"]);\n else if (m) return log(\"OK\", \"Broken skip link\", [pl(ahead(m), \"stop comes\", \"stops come\") + \" before the main content, so a skip link is not needed.\"]);\n else return log(\"INFO\", \"Broken skip link\", [\"No main region, so the skip link check has nothing to aim at.\"]);\n probSkip = logs[logs.length - 1];\n}\nfunction live(m) { return stops.indexOf(m) >= 0; }\nfunction runs(list) {\n var out = [];\n byStop(list).forEach(function (e) {\n var g = out[out.length - 1];\n if (g && stops.indexOf(g[g.length - 1]) === stops.indexOf(e) - 1 && ghostOf.get(g[0]) === ghostOf.get(e)) g.push(e);\n else out.push([e]);\n });\n return out;\n}\nfunction span(g) {\n var a = stops.indexOf(g[0]) + 1, b = stops.indexOf(g[g.length - 1]) + 1;\n return a === b ? String(a) : a + \" to \" + b;\n}\nfunction ringCheck(s) {\n var was = noRing.indexOf(s) >= 0, before = restSig.get(s);\n if (!before) return log(\"SKIPPED\", \"No focus style\", [ref(s), \" has no style from before focus yet, or the mouse was on it. Judged on the next visit.\"]);\n if (before !== focusSig(s)) {\n if (!was) return log(\"OK\", \"No focus style\", [ref(s), \" changes when Tab is on it.\"]);\n noRing.splice(noRing.indexOf(s), 1);\n probRing.get(s).fixed = true;\n probRing.delete(s);\n renderJumps();\n queue();\n return log(\"OK\", \"No focus style\", [ref(s), \" shows focus now.\"]);\n }\n if (was) return;\n noRing.push(s);\n renderJumps();\n queue();\n announce(\"No focus style: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", shows no focus.\");\n var rule = outlineRule(s);\n log(\"PROBLEM\", \"No focus style\", [ref(s), \" shows nothing when Tab is on it.\"], aiOf(W_VIS, \"The element shows a visible change when it has keyboard focus.\", \"Add :focus-visible { outline: 2px solid; outline-offset: 2px } for it\" + (rule ? \", or remove outline: none from \" + scrub(rule[0]) : \"\") + \".\", [[\"Element\", s, null, true]], rule ? [\"CSS rule: \" + scrub(rule[0]), \"Style sheet: \" + cleanUrl(rule[1])] : []));\n probRing.set(s, logs[logs.length - 1]);\n}\nfunction check(s, then) {\n function end() {\n var f = then;\n then = null;\n if (f) f();\n }\n if (!s) return end();\n var was = covered.indexOf(s) >= 0;\n var at = where(s), still = 0, tries = 0, late = 0;\n function look() {\n if (closed || (covered.indexOf(s) >= 0) !== was) return end();\n var now = where(s);\n if (now !== at) {\n if (stops[current] !== s) {\n if (was) return end();\n if (moved.indexOf(s) < 0) {\n moved.push(s);\n movedLine();\n }\n return end();\n }\n at = now;\n still = 0;\n } else still++;\n if (still < 2 && ++tries < 90) return requestAnimationFrame(look);\n var on = deep() === s;\n if (on && !late && ghostWhy(s)) {\n late = 1;\n return setTimeout(function () {\n if (closed) return end();\n if (deep() !== s) {\n log(\"SKIPPED\", \"Ghost stop\", [ref(s), \" lost focus before it could be judged.\"]);\n return end();\n }\n still = 0;\n look();\n }, 400);\n }\n nameOne(s);\n if (on && !ghostCheck(s)) ringCheck(s);\n tested(s);\n hidTested.add(s);\n if (ghosts.indexOf(s) >= 0) return end();\n var h = hideInfo(s);\n if (!h.tested) {\n log(\"SKIPPED\", \"Hidden focus\", [ref(s), \" \" + h.why + \". Not tested.\"]);\n return end();\n }\n if (was && h.under >= h.tested) {\n log(\"INFO\", \"Hidden focus\", [ref(s), \" is already listed as hidden.\"]);\n return end();\n }\n if (was) {\n covered.splice(covered.indexOf(s), 1);\n var pe = probHid.get(s);\n if (pe) pe.fixed = true;\n probHid.delete(s);\n renderJumps();\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is not hidden anymore: it is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is not hidden anymore, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n if (h.under < h.tested) {\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is in view, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n covered.push(s);\n renderJumps();\n announce(\"Hidden focus: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", is covered.\");\n var pr = h.pin.getBoundingClientRect(), up = pr.top + pr.height / 2 < innerHeight / 2, ph = Math.round(pr.height);\n log(\"PROBLEM\", \"Hidden focus\", [ref(s), \": all \" + h.tested + \" points are under \" + pinText(h.pin) + \".\"], aiOf(W_HIDE, \"When the element gets keyboard focus, at least part of it stays visible, not covered by \" + desc(h.pin) + \".\", \"Add html { scroll-padding-\" + (up ? \"top\" : \"bottom\") + \": \" + (ph + 8) + \"px; } so the browser scrolls focused elements clear of the \" + (up ? \"top\" : \"bottom\") + \" bar (\" + ph + \" px tall, plus 8 px of room).\", [[\"Element\", s], [\"Covered by\", h.pin]], [\"Measured: \" + desc(h.pin) + \" is \" + getComputedStyle(h.pin).position + \", \" + ph + \" px tall, at the \" + (up ? \"top\" : \"bottom\") + \" of a \" + innerHeight + \" px tall window.\"]));\n probHid.set(s, logs[logs.length - 1]);\n end();\n }\n requestAnimationFrame(look);\n}\nvar popInfo = null, lostPops = [], openPop = null, opener = null, lastOut = null, tapIn = null, tapT = 0, lastKey = \"\", keyT = 0, keyOn = null;\nfunction deep() {\n var a = document.activeElement;\n while (a && a.shadowRoot && a.shadowRoot.activeElement) a = a.shadowRoot.activeElement;\n return a;\n}\nfunction gone(p) { return !p.isConnected || !shown(p) || (p.matches(\"dialog\") && !p.open); }\nfunction closedBy(p) {\n var now = Date.now();\n if (tapIn && now - tapT < 600 && within(p, tapIn)) {\n var b = tapIn.closest ? tapIn.closest(\"button,a,[role=button]\") : null;\n return b ? \" with \\\"\" + label(b) + \"\\\"\" : \" with a click\";\n }\n if (keyT && now - keyT < 600) {\n if (lastKey === \"Escape\") return \" with Escape\";\n if (lastKey === \"Enter\" || lastKey === \" \") return \" with \" + (lastKey === \" \" ? \"Space\" : \"Enter\") + (keyOn && keyOn.nodeType === 1 && keyOn !== document.body && keyOn !== document.documentElement ? \" on \\\"\" + label(keyOn) + \"\\\"\" : \"\");\n }\n return \"\";\n}\nfunction popClosed() {\n var p = openPop, from = opener, pn = popName(p), by = closedBy(p), pi = popInfo;\n if (by === \" with Escape\") exitOk(p);\n openPop = null;\n if (!from) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". It opened on its own, so there is no button to go back to.\"]);\n if (!from.isConnected || !shown(from)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". The button that opened it is gone or hidden.\"]);\n if (lostPops.some(function (l) { return l[0] === from; })) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". Already listed.\"]);\n if (tapIn && Date.now() - tapT < 600 && !within(p, tapIn)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed by a click outside it. Not judged.\"]);\n var frames = 0;\n function look() {\n if (closed) return;\n var a = deep();\n if (a && a !== document.body && a !== document.documentElement && !within(p, a) && shown(a)) {\n if (a === from) return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went back to \", ref(from), \".\"]);\n return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went to \", ref(a), \", not to the button that opened it, \", ref(from), \".\"]);\n }\n if (++frames < 30) return requestAnimationFrame(look);\n if (lostPops.some(function (l) { return l[0] === from; })) return;\n lostPops.push([from, p]);\n renderJumps();\n announce(\"Lost focus: \" + pn.l + \" closed and focus fell to the page body.\");\n log(\"PROBLEM\", \"Lost focus\", [pn, \" closed\" + by + \". Focus fell to the page body instead of going back to \", ref(from), \".\"], aiOf(W_ORDER, \"When the popup closes, focus goes back to the element that opened it, so a keyboard user carries on from there.\", \"Before the popup opens, store document.activeElement. After it closes, call .focus() on that element. A <dialog> opened with showModal() and closed with close() does this by itself, so if this one is a <dialog>, look for code that calls blur() or .focus() on something else after it closes.\", [[\"Popup\", p, pi], [\"Opened by\", from]]));\n }\n requestAnimationFrame(look);\n}\nfunction track(a) {\n if (openPop && gone(openPop)) popClosed();\n if (!a || a === document.body || a === document.documentElement || a === host || a.getRootNode() === root) return;\n var p = popupOf(a);\n if (!p) {\n lastOut = a;\n openPop = null;\n } else if (!openPop) {\n openPop = p;\n opener = lastOut;\n popInfo = { sel: sel(p), html: snip(p) };\n if (isModal(p) && !natives.has(p)) {\n natives.add(p);\n log(\"INFO\", \"No way out\", [popName(p), \": Native dialog: Escape closes it in the browser. Check by hand that the page does not block it.\"]);\n }\n }\n}\nvar natives = new WeakSet(), noExit = [], okPops = [], CLOSE = /(^|[^a-z\\u010d\\u0161\\u017e])(close|cancel|dismiss|no thanks|not now|skip|x|\\u00d7|\\u2715|\\u2716|zapri|prekli\\u010di|ne hvala)(?![a-z\\u010d\\u0161\\u017e])/i;\nfunction isModal(p) {\n try { return p.matches(\"dialog:modal\"); } catch (x) { return false; }\n}\nfunction popKey(p) { return popName(p).l + \"|\" + sel(p); }\nfunction exitOk(p) {\n var k = popKey(p);\n noExit = noExit.filter(function (x) {\n if (x[2] !== k) return true;\n x[3].fixed = true;\n return false;\n });\n renderJumps();\n}\nvar nameOf = new WeakMap(), nameless = [], probName = new Map(), sameSaid = {}, ROLE = { A: \"link\", BUTTON: \"button\", SELECT: \"combobox\", TEXTAREA: \"textbox\", IFRAME: \"frame\", SUMMARY: \"button\" };\nfunction accName(e) {\n var t = named(e) || (/^(INPUT|AREA)$/.test(e.tagName) && (e.alt || (/^(submit|reset)$/.test(e.type) && e.type))) || \"\";\n if (!t.trim()) [].some.call(e.querySelectorAll(\"img[alt],[aria-label],svg title\"), function (i) { return (t = i.getAttribute(\"alt\") || i.getAttribute(\"aria-label\") || i.textContent || \"\").trim(); });\n return scrub(t).replace(/\\s+/g, \" \").trim();\n}\nfunction roleOf(e) { return e.getAttribute(\"role\") || ROLE[e.tagName] || (e.tagName === \"INPUT\" ? (/^(checkbox|radio)$/.test(e.type) ? e.type : /^(submit|button|reset|image)$/.test(e.type) ? \"button\" : \"textbox\") : e.tagName.toLowerCase()); }\nfunction nameOne(s) {\n var n = accName(s), was = nameless.indexOf(s) >= 0;\n nameOf.set(s, n);\n if (n && was) {\n nameless.splice(nameless.indexOf(s), 1);\n probName.get(s).fixed = true;\n probName.delete(s);\n renderJumps();\n log(\"OK\", \"Nameless stop\", [ref(s), \" has a name now.\"]);\n }\n if (n || was || s.shadowRoot || /^(AUDIO|VIDEO|OBJECT|EMBED)$/.test(s.tagName)) return n;\n nameless.push(s);\n log(\"PROBLEM\", \"Nameless stop\", [ref(s), \" has no name, so a screen reader reads only \\\"\" + roleOf(s) + \"\\\".\"], aiOf(W_NAME, \"Every Tab stop has a name that says what it does.\", \"Add visible text, an aria-label, or alt text on its image.\", [[\"Element\", s, null, true]]));\n probName.set(s, logs[logs.length - 1]);\n return n;\n}\nfunction nameCheck() {\n var by = {};\n stops.forEach(function (s) {\n var n = nameOne(s);\n if (s.tagName === \"A\" && n) (by[n] = by[n] || {})[s.getAttribute(\"href\")] = 1;\n });\n Object.keys(by).forEach(function (n) {\n var k = Object.keys(by[n]).length;\n if (k > 2 && !sameSaid[n]) log(\"INFO\", \"Nameless stop\", [k + \" links share the name \" + n + \". That passes 2.4.4 when the text around each one tells them apart.\"]);\n sameSaid[n] = sameSaid[n] || k > 2;\n });\n renderJumps();\n}\nfunction closer(p, ps) {\n return ps.filter(function (x) { return CLOSE.test(accName(x)) || /close|dismiss/i.test(x.id + \" \" + x.getAttribute(\"class\")) || (x.matches(\"button:not([type]),[type=submit]\") && x.closest(\"form[method=dialog]\")); })[0] || null;\n}\nfunction loopCheck(p, from, to, d) {\n var ps = stops.filter(function (x) { return within(p, x); }), n = ps.length;\n var k = popKey(p), c = closer(p, ps), had = noExit.some(function (x) { return x[2] === k; });\n if (n < 2 || isModal(p) || ps[d > 0 ? n - 1 : 0] !== from || ps[d > 0 ? 0 : n - 1] !== to || (had && !c)) return;\n if (c) {\n if (had) exitOk(p);\n if (okPops.indexOf(k) < 0) log(\"OK\", \"No way out\", [popName(p), \": Tab loops inside it, and \", ref(c), \" closes it.\"]);\n okPops.push(k);\n return;\n }\n announce(\"No way out: \" + popName(p).l + \" has no close control Tab reaches.\");\n log(\"PROBLEM\", \"No way out\", [popName(p), \": Tab loops through \" + n + \" stops, and none of them closes it.\"], aiOf(W_TRAP, \"A keyboard user can close the popup with a button Tab reaches.\", \"Add a Close button inside it, or let Escape close it.\", [[\"Popup\", p]]));\n noExit.push([p, n, k, logs[logs.length - 1]]);\n renderJumps();\n}\nfunction tap(e) {\n if (picking) return;\n tapIn = e.composedPath ? e.composedPath()[0] : e.target;\n tapT = Date.now();\n}\nfunction stopGo(e) {\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n current = stops.indexOf(e);\n queue();\n}\nfunction stopName(e) {\n var i = stops.indexOf(e);\n return (i >= 0 ? i + 1 : \"?\") + \": \" + label(e);\n}\nfunction byStop(list) { return list.slice().sort(function (a, b) { return stops.indexOf(a) - stops.indexOf(b); }); }\nfunction renderJumps() {\n while (jumpBox.firstChild) jumpBox.removeChild(jumpBox.firstChild);\n if (macNote) {\n var mn = document.createElement(\"p\");\n mn.className = \"mn\";\n mn.textContent = MAC_NOTE;\n jumpBox.appendChild(mn);\n }\n if (popMissed) {\n count(1, \" popup blocks the page, but Tab goes somewhere else first\", true, false, jumpBox);\n chipUl(jumpBox, [popMissed], function () { return \"Show the popup\"; }, function (m) { m.scrollIntoView({ block: \"center\", behavior: \"smooth\" }); });\n }\n if (covered.length) {\n count(covered.length, covered.length === 1 ? \" stop is hidden when Tab reaches it\" : \" stops are hidden when Tab reaches them\", true, false, jumpBox);\n chipUl(jumpBox, byStop(covered), stopName, stopGo);\n }\n var gl = ghosts.filter(live), nl = noRing.filter(live);\n if (skipBad) {\n count(1, \" skip link goes nowhere\", true, false, jumpBox);\n chipUl(jumpBox, [skipBad.link], function (l) { return stopName(l) + \" \\u2192 \" + skipBad.why; }, stopGo);\n }\n if (noExit.length) {\n count(noExit.length, noExit.length === 1 ? \" popup has no keyboard way out\" : \" popups have no keyboard way out\", true, false, jumpBox);\n chipUl(jumpBox, noExit, function (x) { return popName(x[0]).l + \": Tab loops 1 to \" + x[1]; }, function (x) { stopGo(stops.filter(function (y) { return within(x[0], y); })[0] || x[0]); });\n }\n var ml = nameless.filter(live);\n if (ml.length) {\n count(ml.length, ml.length === 1 ? \" stop has no name for screen readers\" : \" stops have no name for screen readers\", true, false, jumpBox);\n chipUl(jumpBox, byStop(ml), stopName, stopGo);\n }\n if (noSkip) count(noSkip, \" stops before the main content, and no skip link\", true, false, jumpBox);\n if (gl.length) {\n count(gl.length, gl.length === 1 ? \" stop you can't see when Tab is on it\" : \" stops you can't see when Tab is on them\", true, false, jumpBox);\n chipUl(jumpBox, runs(gl), function (g) { return span(g) + \": \" + label(g[0]) + \", \" + GHOST[ghostOf.get(g[0])].replace(/^(is|has) (inside )?/, \"\"); }, function (g) { stopGo(g[0]); });\n }\n if (nl.length) {\n count(nl.length, nl.length === 1 ? \" stop shows no focus when Tab is on it\" : \" stops show no focus when Tab is on them\", true, false, jumpBox);\n chipUl(jumpBox, byStop(nl), stopName, stopGo);\n }\n if (trapped.length) {\n count(trapped.length, trapped.length === 1 ? \" stop where Tab gets stuck\" : \" stops where Tab gets stuck\", true, false, jumpBox);\n chipUl(jumpBox, byStop(trapped), stopName, stopGo);\n }\n if (lostPops.length) {\n count(lostPops.length, lostPops.length === 1 ? \" popup loses focus when it closes\" : \" popups lose focus when they close\", true, false, jumpBox);\n chipUl(jumpBox, lostPops, function (l) {\n var i = stops.indexOf(l[0]);\n return (i >= 0 ? i + 1 : label(l[0])) + \" \\u2192 Start\";\n }, function (l) { stopGo(l[0]); });\n }\n if (jumps.length) {\n count(jumps.length, jumps.length === 1 ? \" time Tab jumped out of order\" : \" times Tab jumped out of order\", true, false, jumpBox);\n chipUl(jumpBox, jumps, function (j) {\n var from = j[0] ? stops.indexOf(j[0]) + 1 || label(j[0]) : \"Start\", to = stops.indexOf(j[1]) + 1;\n return from + \" \\u2192 \" + (to || \"?\");\n }, function (j) { stopGo(j[1]); });\n }\n if (skip) skipPanel();\n}\nvar legend = document.createElement(\"div\");\nlegend.className = \"so\";\nlegend.hidden = true;\nlegend.appendChild(line(\"k\", null, \"The order Tab visits\", \"d\"));\nlegend.appendChild(line(\"k\", null, \"Hidden until Tab reaches it\", \"h\"));\nlegend.appendChild(line(\"k\", null, \"Tab can't reach or see it\", \"r\"));\nvar tray = document.createElement(\"div\");\ntray.className = \"tr\";\npanel.appendChild(tray);\nvar gear = document.createElement(\"button\");\ngear.className = \"sg\";\ngear.type = \"button\";\ngear.setAttribute(\"aria-expanded\", \"false\");\nvar gearIcon = icon(gear, 16, \"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4\", 1.6);\nel(\"circle\", { cx: 8, cy: 8, r: 2.2 }, gearIcon);\ngear.appendChild(document.createTextNode(\"Settings\"));\ngear.appendChild(document.createElement(\"i\"));\ntray.appendChild(gear);\nvar settings = document.createElement(\"div\");\nsettings.className = \"so\";\nsettings.hidden = true;\ntray.appendChild(settings);\ngear.addEventListener(\"click\", function () {\n settings.hidden = !settings.hidden;\n gear.setAttribute(\"aria-expanded\", settings.hidden ? \"false\" : \"true\");\n});\nvar skipBox = document.createElement(\"label\");\nskipBox.className = \"k s\";\nvar skip = document.createElement(\"input\");\nskip.type = \"checkbox\";\nskip.checked = true;\nskipBox.appendChild(skip);\nskipBox.appendChild(document.createTextNode(\"Leave this panel out of Tab\"));\nsettings.appendChild(skipBox);\nvar tightBox = document.createElement(\"label\");\ntightBox.className = \"k s\";\nvar tight = document.createElement(\"input\");\ntight.type = \"checkbox\";\ntight.checked = true;\ntightBox.appendChild(tight);\ntightBox.appendChild(document.createTextNode(\"Compact view\"));\nsettings.appendChild(tightBox);\ntight.addEventListener(\"change\", function () { panel.classList.toggle(\"rm\", !tight.checked); });\nvar chunkBox = document.createElement(\"label\");\nchunkBox.className = \"k s\";\nvar chunk = document.createElement(\"input\");\nchunk.type = \"checkbox\";\nchunk.checked = true;\nchunkBox.appendChild(chunk);\nchunkBox.appendChild(document.createTextNode(\"Show \" + PAGE + \" stops at a time\"));\ngroup.appendChild(chunkBox);\nvar shortBox = document.createElement(\"label\");\nshortBox.className = \"k s\";\nvar stub = document.createElement(\"input\");\nstub.type = \"checkbox\";\nstub.checked = true;\nshortBox.appendChild(stub);\nshortBox.appendChild(document.createTextNode(\"Long lines\"));\nsettings.insertBefore(shortBox, skipBox);\nvar lineBox = document.createElement(\"label\");\nlineBox.className = \"k s\";\nvar lines = document.createElement(\"input\");\nlines.type = \"checkbox\";\nlines.checked = true;\nlineBox.appendChild(lines);\nlineBox.appendChild(document.createTextNode(\"Show lines\"));\nsettings.insertBefore(lineBox, shortBox);\nlines.addEventListener(\"change\", function () {\n stub.disabled = !lines.checked;\n shortBox.classList.toggle(\"off\", !lines.checked);\n queue();\n});\nstub.addEventListener(\"change\", function () { queue(); });\nvar spotBox = document.createElement(\"label\");\nspotBox.className = \"k s\";\nvar light = document.createElement(\"input\");\nlight.type = \"checkbox\";\nspotBox.appendChild(light);\nspotBox.appendChild(document.createTextNode(\"Spotlight\"));\nsettings.insertBefore(spotBox, settings.firstChild);\nlight.addEventListener(\"change\", function () { queue(); });\nvar mapLabel = document.createElement(\"label\");\nmapLabel.className = \"k s\";\nvar mapOn = document.createElement(\"input\");\nmapOn.type = \"checkbox\";\nmapLabel.appendChild(mapOn);\nmapLabel.appendChild(document.createTextNode(\"Region map\"));\nsettings.insertBefore(mapLabel, spotBox.nextSibling);\nvar costLabel = document.createElement(\"label\");\ncostLabel.className = \"k s\";\nvar costOn = document.createElement(\"input\");\ncostOn.type = \"checkbox\";\ncostLabel.appendChild(costOn);\ncostLabel.appendChild(document.createTextNode(\"Tab cost\"));\nsettings.insertBefore(costLabel, mapLabel);\ncostOn.addEventListener(\"change\", function () {\n if (!costOn.checked) endPick();\n costDraw();\n queue();\n});\nvar picked = null, picking = false, pickAt = null, costGoals = [], PICKS = [\"pointermove\", \"pointerdown\", \"mousedown\", \"pointerup\", \"mouseup\", \"click\", \"auxclick\", \"dblclick\", \"contextmenu\"], GOALW = /(^|[^a-z\\u010d\\u0161\\u017e])(add to cart|buy|checkout|book|reserve|subscribe|sign up|register|download|contact|get started|donate|v ko\\u0161arico|kupi|naro\\u010di|rezerviraj|prijava|naro\\u010di se|prenesi|kontakt)(?![a-z\\u010d\\u0161\\u017e])/i;\nfunction mainStop() {\n var m = mainRegion();\n return m ? stops.filter(function (x) { return within(m, x); })[0] || null : null;\n}\nfunction goals() {\n var out = [], m = mainRegion(), found = 0;\n function add(e, name, how) {\n if (e && !out.some(function (g) { return g.el === e || (name && g.name.toLowerCase() === name.toLowerCase()); })) out.push({ name: name, presses: stops.indexOf(e) + 1, how: how, el: e });\n }\n [].forEach.call(document.querySelectorAll(\"[data-tab-trail-goal]\"), function (x) {\n found = 1;\n add(stops.indexOf(x) >= 0 ? x : stops.filter(function (y) { return within(x, y); })[0], x.getAttribute(\"data-tab-trail-goal\"), \"set in the page\");\n });\n add(mainStop(), \"the main content\", \"always\");\n stops.forEach(function (e) {\n if (!GOALW.test(accName(e))) return;\n found = 1;\n add(e, label(e), \"found by its words\");\n });\n stops.forEach(function (e) {\n if (!e.form || !e.form.querySelector(\"input[type=email]\") || !e.matches(\"button:not([type]),[type=submit]\")) return;\n found = 1;\n add(e, label(e), \"form with an e-mail field\");\n });\n if (!found && m) add(stops.filter(function (x) { return x.tagName === \"BUTTON\" && within(m, x); }).sort(function (a, b) { var p = a.getBoundingClientRect(), q = b.getBoundingClientRect(); return q.width * q.height - p.width * p.height; })[0], \"\", \"guessed\");\n out.forEach(function (g) { if (!g.name) g.name = label(g.el); });\n var mg = out.filter(function (g) { return g.how === \"always\"; })[0], rest = out.filter(function (g) { return g !== mg; });\n out = out.filter(function (g) { return g === mg || rest.indexOf(g) < (mg ? 2 : 3); });\n if (picked && stops.indexOf(picked) >= 0) {\n out = out.filter(function (g) { return g.el !== picked; });\n out.unshift({ name: label(picked), presses: stops.indexOf(picked) + 1, how: \"picked by you\", el: picked });\n }\n return out;\n}\nfunction para(parent, cls, text) {\n var p = document.createElement(\"p\");\n p.className = cls;\n p.textContent = text || \"\";\n parent.appendChild(p);\n return p;\n}\nfunction costDraw() {\n if (!costOn) return;\n while (costBox.firstChild) costBox.removeChild(costBox.firstChild);\n costGoals = costOn.checked ? goals() : [];\n if (!costOn.checked) return;\n para(costBox, \"\", \"\").appendChild(document.createElement(\"b\")).textContent = \"Tab presses to reach\";\n costGoals.forEach(function (g) {\n var p = para(costBox, \"n\", \"\");\n p.appendChild(document.createElement(\"b\")).textContent = String(g.presses);\n p.appendChild(document.createTextNode(\" \" + g.name + \" \"));\n p.appendChild(document.createElement(\"span\")).textContent = \"\\u00b7 \" + g.how;\n p.lastChild.className = \"cg\";\n if (g.el === picked) lbtn(\"lq\", \" Remove\", p).addEventListener(\"click\", function () {\n picked = null;\n costDraw();\n queue();\n costBox.querySelector(\"p:last-child button\").focus();\n });\n });\n var ms = mainStop();\n if (ms && !skipLink() && stops.indexOf(ms) >= 10) para(costBox, \"cg\", \"A skip link would make the main content 1.\");\n var pl2 = para(costBox, picking ? \"pk\" : \"\", picking ? \"Click the goal on the page. Escape cancels. \" : \"\");\n lbtn(\"lq\", picking ? \"Cancel\" : \"Pick a goal\", pl2).addEventListener(\"click\", function () {\n if (picking) endPick();\n else {\n picking = true;\n PICKS.forEach(function (t) { addEventListener(t, pickEv, true); });\n }\n costDraw();\n costBox.querySelector(\"p:last-child button\").focus();\n });\n skipPanel();\n}\nfunction endPick() {\n picking = false;\n pickAt = null;\n PICKS.forEach(function (t) { removeEventListener(t, pickEv, true); });\n costDraw();\n queue();\n}\nfunction pickEv(e) {\n var t = e.composedPath ? e.composedPath()[0] : e.target, s = null;\n if (!picking || within(host, t)) return;\n e.preventDefault();\n e.stopPropagation();\n for (var n = t; n && !s; n = upOf(n)) if (stops.indexOf(n) >= 0) s = n;\n if (e.type === \"pointermove\") {\n if (s !== pickAt) {\n pickAt = s;\n queue();\n }\n } else if (e.type === \"click\" && s) {\n picked = s;\n endPick();\n }\n}\nmapOn.addEventListener(\"change\", function () {\n tint = null;\n mapDraw();\n queue();\n});\nvar REG = [\"header\", \"nav\", \"main\", \"aside\", \"footer\", \"other\"], REGC = [\"#c2410c\", \"#9a3412\", \"#1f7a3f\", \"#5f564c\", \"#1e3a8a\", \"#7d756b\"], LAND = { HEADER: \"header\", BANNER: \"header\", NAV: \"nav\", NAVIGATION: \"nav\", MAIN: \"main\", ASIDE: \"aside\", COMPLEMENTARY: \"aside\", FOOTER: \"footer\", CONTENTINFO: \"footer\" }, tint = null;\nfunction regionOf(e) {\n for (var n = upOf(e); n && n.nodeType === 1; n = upOf(n)) {\n var ro = n.getAttribute(\"role\"), r = ro ? LAND[ro.split(\" \")[0].toUpperCase()] : LAND[n.tagName];\n if (r && !ro && /^(HEADER|FOOTER)$/.test(n.tagName) && n.parentElement && n.parentElement.closest(\"article,aside,main,nav,section,[role=article],[role=complementary],[role=main],[role=navigation],[role=region]\")) r = null;\n if (r) return [r, n];\n }\n return [\"other\", e];\n}\nfunction regions() {\n var out = { header: 0, nav: 0, main: 0, aside: 0, footer: 0, other: 0 }, els = {};\n stops.forEach(function (x) {\n var r = regionOf(x);\n out[r[0]]++;\n (els[r[0]] = els[r[0]] || []).indexOf(r[1]) < 0 && els[r[0]].push(r[1]);\n });\n return [out, els];\n}\nfunction mapDraw() {\n if (!mapOn) return;\n while (mapBox.firstChild) mapBox.removeChild(mapBox.firstChild);\n if (!mapOn.checked) return;\n var r = regions(), bar = document.createElement(\"div\"), bl = document.createElement(\"div\");\n count(stops.length, \" stops, by region\", false, false, mapBox);\n bar.className = \"bar\";\n bl.className = \"bl\";\n REG.forEach(function (k, i) {\n var n = r[0][k], name = k.charAt(0).toUpperCase() + k.slice(1);\n if (!n) return;\n var b = document.createElement(\"button\"), sp = document.createElement(\"span\"), em = document.createElement(\"em\");\n b.type = \"button\";\n b.style.cssText = \"flex:\" + n + \";background:\" + REGC[i];\n b.setAttribute(\"aria-label\", name + \" \" + n);\n b.addEventListener(\"click\", function () {\n tint = [r[1][k], REGC[i]];\n r[1][k][0].scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n queue();\n });\n bar.appendChild(b);\n em.style.background = REGC[i];\n sp.appendChild(em);\n sp.appendChild(document.createTextNode(name + \" \" + n));\n bl.appendChild(sp);\n });\n mapBox.appendChild(bar);\n mapBox.appendChild(bl);\n skipPanel();\n}\nchunk.addEventListener(\"change\", function () { queue(); });\nfunction paged() { return chunk.checked && stops.length > PAGE; }\nfunction outT() { return skip.checked && !panelIn ? -1 : 0; }\nfunction skipPanel() {\n panel.tabIndex = outT();\n panel.querySelectorAll(\"button,a,input\").forEach(function (e) { e.tabIndex = e.className === \"lc\" ? (panelIn ? 0 : -1) : outT(); });\n}\nskip.addEventListener(\"change\", function () {\n skipPanel();\n svg.classList.toggle(\"in\", !skip.checked);\n svgPg.classList.toggle(\"in\", !skip.checked);\n dot.classList.toggle(\"in\", !skip.checked);\n dotPg.classList.toggle(\"in\", !skip.checked);\n rescan();\n});\nvar a = document.createElement(\"a\");\na.className = \"a\";\na.href = \"https://matjazkorosec.com/tools/tab-trail\";\na.target = \"_blank\";\na.rel = \"noopener\";\na.textContent = \"matjazkorosec.com/tools/tab-trail\";\nvar how = document.createElement(\"p\");\nhow.className = \"hw\";\nvar MAC = /Mac/.test(navigator.platform || navigator.userAgent);\nvar KEYS = \"Ctrl+Shift+F\";\nvar ver = document.createElement(\"span\");\nver.className = \"vr\";\nver.textContent = \"v\" + VERSION;\nhow.appendChild(ver);\nhow.appendChild(document.createTextNode(\"How to use & latest version: \"));\nhow.appendChild(a);\nvar keysBtn = document.createElement(\"button\");\nkeysBtn.className = \"sg\";\nkeysBtn.type = \"button\";\nkeysBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(keysBtn, 16, \"M1.5 4.5h13v7h-13zM4 7h1M7.5 7h1M11 7h1M5 9.5h6\", 1.6);\nkeysBtn.appendChild(document.createTextNode(\"Shortcuts\"));\nkeysBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(keysBtn, gear);\nvar keysBox = document.createElement(\"div\");\nkeysBox.className = \"so\";\nkeysBox.hidden = true;\ntray.insertBefore(keysBox, gear);\n[[KEYS + \":\", \" into this panel\"], [\"Escape:\", \" back to the page\"], [\"Tab, Shift+Tab:\", \" along the trail\"], [\"Space or Escape:\", \" pause Play\"]].forEach(function (k) {\n keysBox.appendChild(line(\"k\", k[0], k[1]));\n});\nkeysBtn.addEventListener(\"click\", function () {\n keysBox.hidden = !keysBox.hidden;\n keysBtn.setAttribute(\"aria-expanded\", keysBox.hidden ? \"false\" : \"true\");\n});\nvar legendBtn = document.createElement(\"button\");\nlegendBtn.className = \"sg\";\nlegendBtn.type = \"button\";\nlegendBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(legendBtn, 16, \"M3 4h1M6.5 4H13M3 8h1M6.5 8H13M3 12h1M6.5 12H13\", 1.6);\nlegendBtn.appendChild(document.createTextNode(\"Legend\"));\nlegendBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(legendBtn, keysBtn);\ntray.insertBefore(legend, keysBtn);\nlegendBtn.addEventListener(\"click\", function () {\n legend.hidden = !legend.hidden;\n legendBtn.setAttribute(\"aria-expanded\", legend.hidden ? \"false\" : \"true\");\n});\ntray.appendChild(how);\nvar logs = [], logFilter = \"all\", logOpen = false, LOG_MAX = 500, showWcag = false, wcagBoxes = [];\nfunction wcagBox(parent, doc) {\n var lb = doc.createElement(\"label\");\n lb.className = \"lw\";\n var cb = doc.createElement(\"input\");\n cb.type = \"checkbox\";\n cb.checked = showWcag;\n cb.addEventListener(\"change\", function () {\n showWcag = cb.checked;\n wcagSync();\n });\n lb.appendChild(cb);\n lb.appendChild(doc.createTextNode(\"Show WCAG\"));\n parent.appendChild(lb);\n wcagBoxes.push(cb);\n return cb;\n}\nfunction wcagSync() {\n wcagBoxes.forEach(function (b) { b.checked = showWcag; });\n logGroup.classList.toggle(\"nw\", !showWcag);\n if (tabOpen()) logTab.document.body.classList.toggle(\"nw\", !showWcag);\n}\nvar lastStops = -1, lastMissed = -1, lastForced = -1, probMiss = new Map(), probHov = new Map(), probForce = new Map(), seenForce = new WeakSet(), seenOk = new WeakSet(), seenCss = new Set();\nvar RES = { OK: \"ok\", PROBLEM: \"bad\", SKIPPED: \"skip\", INFO: \"info\" };\nvar FILT = [[\"all\", \"All\"], [\"bad\", \"Problems\"], [\"ok\", \"OK\"], [\"skip\", \"Skipped\"]];\nvar tabChecked = null, filterSets = [], logTab = null, tabList = null, tabSum = null, tabSet = null, tabNote = null, tabPoll = 0;\nfunction pl(n, one, many) { return n + \" \" + (n === 1 ? one : many); }\nfunction desc(e) {\n var t = e.tagName.toLowerCase();\n if (e.id) return t + \"#\" + scrub(e.id);\n var c = typeof e.className === \"string\" ? e.className.trim().split(/\\s+/).filter(Boolean).slice(0, 2) : [];\n return c.length ? t + \".\" + scrub(c.join(\".\")) : t;\n}\nfunction ref(e) { return { el: e, n: stops.indexOf(e) + 1, l: label(e), d: desc(e) }; }\nfunction popName(p) {\n var n = p.getAttribute(\"aria-label\") || \"\", by = p.getAttribute(\"aria-labelledby\");\n if (!n && by) {\n var t = document.getElementById(by.split(/\\s+/)[0]);\n if (t) n = t.textContent || \"\";\n }\n if (!n) {\n var h = p.querySelector(\"h1,h2,h3,h4,legend\");\n if (h) n = h.textContent || \"\";\n }\n n = scrub(n).trim().replace(/\\s+/g, \" \");\n if (n.length > 28) n = n.slice(0, 27) + \"...\";\n return { el: p, n: 0, l: n || label(p), d: desc(p) };\n}\nfunction partText(x) { return typeof x === \"string\" ? x : x.n ? x.n + \" \\\"\" + x.l + \"\\\"\" : \"\\\"\" + x.l + \"\\\" \" + x.d; }\nfunction looksWhy(m) {\n var why = [], role = m.getAttribute(\"role\") || \"\";\n if (m.tagName === \"A\" && !m.hasAttribute(\"href\")) why.push(\"a link with no address\");\n if (m.hasAttribute(\"onclick\")) why.push(\"a click handler in the HTML\");\n if (ROLES.test(role)) why.push(\"role=\\\"\" + role + \"\\\"\");\n if (getComputedStyle(m).cursor === \"pointer\") why.push(\"a pointer cursor\");\n return why.length ? \"has \" + why.join(\", \") : \"looks clickable\";\n}\nfunction addr() { return location.protocol + \"//\" + location.host + cleanUrl(location.pathname); }\nfunction two(n) { return (n < 10 ? \"0\" : \"\") + n; }\nfunction clock(t) { return two(t.getHours()) + \":\" + two(t.getMinutes()) + \":\" + two(t.getSeconds()); }\nfunction browser() {\n var u = navigator.userAgent, m;\n if ((m = u.match(/Edg\\/(\\d+)/))) return \"Edge \" + m[1];\n if ((m = u.match(/Firefox\\/(\\d+)/))) return \"Firefox \" + m[1];\n if ((m = u.match(/Chrome\\/(\\d+)/))) return \"Chrome \" + m[1];\n if ((m = u.match(/Version\\/(\\d+)[^ ]* (Mobile\\/\\S+ )?Safari/))) return \"Safari \" + m[1];\n return u;\n}\nvar CHECKS = [\"Missed spots\", \"Hover menus\", \"Forced order\", \"Out of order\", \"Keyboard trap\", \"Hidden focus\", \"Lost focus\", \"No focus style\", \"Ghost stop\", \"Broken skip link\", \"No way out\", \"Nameless stop\"];\nvar WCAG = { \"Missed spots\": \"2.1.1 A\", \"Hover menus\": \"2.1.1 A\", \"Out of order\": \"2.4.3 A\", \"Forced order\": \"2.4.3 A\", \"Keyboard trap\": \"2.1.2 A\", \"Lost focus\": \"2.4.3 A\", \"Hidden focus\": \"2.4.11 AA\", \"No focus style\": \"2.4.7 AA\", \"Ghost stop\": \"2.4.7 AA\", \"Broken skip link\": \"2.4.1 A\", \"No way out\": \"2.1.2 A\", \"Nameless stop\": \"4.1.2 A\" };\nfunction showUrl(f) { return \"https://matjazkorosec.com/tools/tab-trail#show-\" + f.toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\"); }\nfunction ranChecks() {\n var out = [];\n logs.forEach(function (e) { if (e.k !== \"INFO\" && CHECKS.indexOf(e.f) >= 0 && out.indexOf(e.f) < 0) out.push(e.f); });\n return out;\n}\nvar checkedKey = {};\nfunction checkedLine(p, doc) {\n var ran = ranChecks(), bad = {};\n logs.forEach(function (e) { if (e.k === \"PROBLEM\" && !e.fixed) bad[e.f] = 1; });\n var k = ran.map(function (f) { return f + (bad[f] ? \"!\" : \"\"); }).join(\"|\");\n p.hidden = !ran.length;\n if (checkedKey[p.className + (doc === document ? \"1\" : \"2\")] === k && p.firstChild) return;\n checkedKey[p.className + (doc === document ? \"1\" : \"2\")] = k;\n while (p.firstChild) p.removeChild(p.firstChild);\n p.appendChild(doc.createTextNode(\"Checked: \"));\n ran.forEach(function (f, i) {\n if (i) p.appendChild(doc.createTextNode(\", \"));\n var a = doc.createElement(\"a\");\n a.className = bad[f] ? \"lq bad\" : \"lq\";\n a.href = showUrl(f);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = f;\n a.title = \"What \" + f + \" checks\";\n if (doc === document) a.tabIndex = outT();\n p.appendChild(a);\n });\n}\nfunction res(e) { return e.fixed ? \"fixed\" : RES[e.k]; }\nfunction shows(e) { return logFilter === \"all\" || res(e) === logFilter; }\nfunction logCounts() {\n var c = { all: logs.length, bad: 0, ok: 0, skip: 0, info: 0, fixed: 0 };\n logs.forEach(function (e) { c[res(e)]++; });\n return c;\n}\nfunction tabOpen() { return !!(logTab && !logTab.closed); }\nfunction logView() { return tabOpen() ? tabList : logOpen ? logList : null; }\nfunction scroller(v) { return v === logList ? panel : v.ownerDocument.scrollingElement || v.ownerDocument.documentElement; }\nfunction toTop(v) {\n if (v !== logList) return void (scroller(v).scrollTop = 0);\n var d = v.getBoundingClientRect().top - panel.getBoundingClientRect().top;\n if (d < 0) panel.scrollTop += d - 12;\n}\nfunction wcagOf(e) { return e.w || WCAG[e.f]; }\nfunction log(k, f, parts, ai, w) {\n var e = { t: new Date(), k: k, f: f, p: parts, li: null, ai: ai || null, w: w || null };\n logs.push(e);\n if (k === \"PROBLEM\" && e.ai) probLog.push(e);\n if ((k === \"OK\" || k === \"PROBLEM\") && (f === \"Out of order\" || f === \"Keyboard trap\") && pressed) judgedDir[pressed > 0 ? 1 : -1] = 1;\n if (logs.length > LOG_MAX) {\n var old = logs.shift();\n if (old.li && old.li.parentNode) old.li.parentNode.removeChild(old.li);\n }\n if (!logList) return;\n logSummary();\n var v = logView();\n if (!v || !shows(e)) return;\n var sc = scroller(v), top = v === logList ? v.getBoundingClientRect().top >= sc.getBoundingClientRect().top : sc.scrollTop < 8;\n e.li = logLi(e, v.ownerDocument);\n v.insertBefore(e.li, v.firstChild);\n if (top) { if (v !== logList) sc.scrollTop = 0; }\n else sc.scrollTop += e.li.getBoundingClientRect().height;\n}\nfunction review() {\n if (lastStops < 0) log(\"INFO\", \"Scan\", [\"Found \" + pl(stops.length, \"stop\", \"stops\") + \". Read \" + pl(cssRules, \"CSS rule\", \"CSS rules\") + \" from \" + pl(cssSheets, \"style sheet\", \"style sheets\") + \".\"]);\n else if (stops.length !== lastStops) log(\"INFO\", \"Scan\", [\"Page changed: \" + pl(stops.length, \"stop\", \"stops\") + \" now, \" + lastStops + \" before.\"]);\n lastStops = stops.length;\n skipCheck();\n nameCheck();\n cssBlocked.forEach(function (h) {\n if (seenCss.has(h)) return;\n seenCss.add(h);\n log(\"SKIPPED\", \"Hover menus\", [\"Can't read \" + cleanUrl(h) + \", it comes from another site.\"]);\n });\n var mSet = new Set(missed), hSet = new Set(hovers), fSet = new Set(forcedBad), fresh = {}, nNew = 0;\n function add(f) {\n fresh[f] = 1;\n nNew++;\n }\n probMiss.forEach(function (e, m) {\n if (mSet.has(m)) return;\n e.fixed = true;\n probMiss.delete(m);\n log(\"OK\", \"Missed spots\", [ref(m), stopSet.has(m) ? \" is a Tab stop now.\" : m.isConnected ? \" is no longer flagged.\" : \" is gone from the page.\"]);\n });\n probHov.forEach(function (e, h) {\n if (hSet.has(h)) return;\n e.fixed = true;\n probHov.delete(h);\n if (tabOpens.has(h)) seenOk.add(h);\n log(\"OK\", \"Hover menus\", [ref(h), !h.isConnected ? \" is gone from the page.\" : tabOpens.has(h) ? \" opens when Tab reaches it.\" : \" no longer opens only on mouse hover.\"]);\n });\n missed.forEach(function (m) {\n if (probMiss.has(m)) return;\n var item = m.closest(GROUP) && ITEM.test(m.getAttribute(\"role\") || \"\");\n log(\"PROBLEM\", \"Missed spots\", [ref(m), \" \" + looksWhy(m) + \", but Tab never reaches it.\"], aiOf(W_KEY, \"Every element that reacts to a click can be reached with the Tab key and used with Enter or Space.\", item ? \"It is a role=\\\"\" + m.getAttribute(\"role\") + \"\\\" item in a group the arrow keys move through, and no item in the group is a Tab stop. Give 1 item tabindex=\\\"0\\\" (the selected one) and move between the items with the arrow keys.\" : m.tagName === \"A\" && !m.hasAttribute(\"href\") ? \"Give the link an href, or make it a <button type=\\\"button\\\"> if it runs script.\" : \"Use <button type=\\\"button\\\"> for an action or <a href> for a link instead of the \" + m.tagName.toLowerCase() + \". If the tag can't change, add tabindex=\\\"0\\\" and role=\\\"button\\\", and handle Enter and Space in a keydown listener.\" + (looksWhy(m) === \"has a pointer cursor\" ? \" Only the pointer cursor makes it look clickable: if it is not meant to be clickable, remove cursor: pointer from it instead.\" : \"\"), [[\"Element\", m]], null, true));\n probMiss.set(m, logs[logs.length - 1]);\n add(\"Missed spots\");\n });\n if (!missed.length && lastMissed !== 0) log(\"OK\", \"Missed spots\", [lastMissed > 0 ? \"No clickable things Tab skips now.\" : \"No clickable things Tab skips.\"]);\n lastMissed = missed.length;\n hoverOk.forEach(function (o) {\n if (seenOk.has(o[0])) return;\n seenOk.add(o[0]);\n log(\"OK\", \"Hover menus\", [ref(o[0]), o[1] === \"focus\" ? \" opens on mouse hover and on keyboard focus.\" : o[1] === \"tab\" ? \" opens when Tab reaches it.\" : \" opens on mouse hover and has a toggle button (aria-expanded), so the keyboard can open it.\"]);\n });\n hovers.forEach(function (h) {\n if (probHov.has(h)) return;\n var hr = hovRule.get(h) || [\":hover\", \"\"];\n hr = [scrub(hr[0]), hr[1]];\n var tw = (hr[0].match(/\\.(?:[\\w-]|\\\\.)+/g) || []).map(function (c) { return c.slice(1).replace(/\\\\(.)/g, \"$1\"); }).filter(function (c) { return /(^|:)(group-|peer-)?hover:/.test(c); })[0];\n var twFix = tw ? \"This rule comes from the Tailwind class \" + tw + \". Add \" + tw.replace(/(^|:)group-hover:/, \"$1group-focus-within:\").replace(/(^|:)peer-hover:/, \"$1peer-focus:\").replace(/(^|:)hover:/, \"$1focus-within:\") + \" next to it in the same class list, so it also opens on keyboard focus. Or open the menu with a <button aria-expanded> that toggles it.\" : \"\";\n var seen = hovSeen.has(h);\n var dead = !seen && !h.matches(FOCUSABLE) && ![].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return tabbable(x); });\n var skipped = [].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return x.tabIndex < 0; });\n var deadFix = dead ? \" Nothing inside it can take keyboard focus now, so a focus rule alone will never open it: make the part you hover a <button type=\\\"button\\\" aria-expanded=\\\"false\\\"> that toggles the menu.\" + (skipped ? \" The links or buttons inside have tabindex=\\\"-1\\\", so Tab skips them even when the menu is open: remove it.\" : \"\") : \"\";\n log(\"PROBLEM\", \"Hover menus\", [ref(h), \" opens only on mouse hover (\" + hr[0] + \").\" + (seen ? \" Tab reaches its links, but they stay invisible while they have focus.\" : \" No focus rule, no toggle button.\")], aiOf(seen ? W_VIS : W_KEY, seen ? \"The menu also opens while a link or button inside it has keyboard focus, so keyboard users can see where they are.\" : \"The menu also opens when a link or button inside it gets keyboard focus, so keyboard users can reach its links.\", (twFix || \"Next to the rule \" + hr[0] + \" add \" + hr[0].replace(/:hover/g, \":focus-within\") + \" with the same declarations, or open the menu with a <button aria-expanded> that toggles it.\") + deadFix, [[\"Element\", h, null, true]], [\"CSS rule: \" + hr[0], \"Style sheet: \" + (hr[1] ? cleanUrl(hr[1]) : \"unknown\")], true), seen ? \"2.4.7 AA\" : null);\n probHov.set(h, logs[logs.length - 1]);\n add(\"Hover menus\");\n });\n probForce.forEach(function (e, f) {\n if (fSet.has(f)) return;\n e.fixed = true;\n probForce.delete(f);\n log(\"OK\", \"Forced order\", [ref(f), !f.isConnected ? \" is gone from the page.\" : forced.indexOf(f) >= 0 ? \" is in page order now.\" : f.tabIndex > 0 ? \" is no longer a Tab stop.\" : \" has no tabindex above 0 now.\"]);\n });\n forced.forEach(function (f) {\n if (probForce.has(f) || (!fSet.has(f) && seenForce.has(f))) return;\n var ti = f.getAttribute(\"tabindex\"), at = stops.indexOf(f) + 1, page = domAt.get(f) + 1;\n if (!fSet.has(f)) {\n seenForce.add(f);\n return log(\"INFO\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", but it is already in page order, so Tab order stays the same. tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\"]);\n }\n seenForce.delete(f);\n log(\"PROBLEM\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", which pulls it ahead of the page: Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". It fails WCAG 2.4.3 when that order makes no sense (F44).\"], aiOf(W_FORCE, \"Tab follows the order of the page. No element has tabindex above 0, so none is pulled ahead of the rest.\", \"Remove the tabindex, or set it to 0, and move the element in the HTML where it should come in Tab order.\", [[\"Element\", f]], [\"Measured: tabindex=\\\"\" + ti + \"\\\", Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". \" + pl(forced.length, \"stop\", \"stops\") + \" on the page \" + (forced.length === 1 ? \"has\" : \"have\") + \" tabindex above 0.\"], true));\n probForce.set(f, logs[logs.length - 1]);\n add(\"Forced order\");\n });\n if (!forcedBad.length && lastForced !== 0) log(\"OK\", \"Forced order\", [forced.length ? \"No stop with tabindex above 0 is out of page order\" + (lastForced > 0 ? \" now.\" : \".\") : lastForced > 0 ? \"No stops with tabindex above 0 now.\" : \"No stops with tabindex above 0.\"]);\n lastForced = forcedBad.length;\n if (nNew) announce(pl(nNew, \"new problem\", \"new problems\") + \": \" + Object.keys(fresh).join(\", \") + \".\");\n}\nfunction goTo(e) {\n if (!e.isConnected) return;\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n if (stops.indexOf(e) < 0) return queue();\n endPress();\n e.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction logLi(e, doc) {\n var li = doc.createElement(\"li\");\n li.className = \"lx \" + RES[e.k];\n function sp(cls, text) {\n var x = doc.createElement(\"span\");\n x.className = cls;\n x.textContent = text;\n li.appendChild(x);\n return x;\n }\n sp(\"tm\", clock(e.t));\n sp(\"st\", e.k);\n var bd = sp(\"bd\", \"\");\n var ft = doc.createElement(CHECKS.indexOf(e.f) >= 0 ? \"a\" : \"b\");\n ft.className = \"ft\";\n ft.textContent = e.f;\n if (ft.tagName === \"A\") {\n ft.className = \"ft lq\";\n ft.href = showUrl(e.f);\n ft.target = \"_blank\";\n ft.rel = \"noopener\";\n ft.title = \"What \" + e.f + \" checks\";\n if (doc === document) ft.tabIndex = outT();\n }\n bd.appendChild(ft);\n bd.appendChild(doc.createTextNode(\" \"));\n if (wcagOf(e)) {\n var wc = doc.createElement(\"span\");\n wc.className = \"wc\";\n wc.textContent = \"WCAG \" + wcagOf(e);\n bd.appendChild(wc);\n bd.appendChild(doc.createTextNode(\" \"));\n }\n e.p.forEach(function (x) {\n if (typeof x === \"string\") return bd.appendChild(doc.createTextNode(x));\n if (!x.n) return bd.appendChild(doc.createTextNode(partText(x)));\n var c = doc.createElement(\"button\");\n c.type = \"button\";\n c.className = \"lc\";\n c.textContent = String(x.n);\n c.setAttribute(\"aria-label\", \"Go to stop \" + x.n);\n if (doc === document) c.tabIndex = panelIn ? 0 : -1;\n c.addEventListener(\"click\", function () {\n if (doc !== document && tabOpen() && window.name) logTab.open(\"\", window.name);\n goTo(x.el);\n });\n bd.appendChild(c);\n bd.appendChild(doc.createTextNode(\" \\\"\" + x.l + \"\\\"\"));\n });\n return li;\n}\nfunction logText() {\n var c = logCounts();\n var out = [\"Tab trail \" + VERSION + \" log\", addr(), stamp(), browser() + \", window \" + innerWidth + \" x \" + innerHeight, pl(stops.length, \"stop\", \"stops\") + \", \" + pl(c.bad, \"problem\", \"problems\") + \", \" + c.ok + \" OK, \" + c.skip + \" skipped\", \"\"];\n logs.slice().reverse().forEach(function (e) {\n out.push(clock(e.t) + \" \" + (e.k + \" \").slice(0, 8) + \" \" + e.f + (showWcag && wcagOf(e) ? \" (WCAG \" + wcagOf(e) + \")\" : \"\"));\n out.push(\" \" + e.p.map(partText).join(\"\"));\n });\n return out.join(\"\\n\");\n}\nvar W_FORCE = \"2.4.3 Focus Order (Level A). tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\", W_TRAP = \"2.1.2 No Keyboard Trap (Level A)\", W_KEY = \"2.1.1 Keyboard (Level A)\", W_VIS = \"2.4.7 Focus Visible (Level AA)\", W_ORDER = \"2.4.3 Focus Order (Level A)\", W_HIDE = \"2.4.11 Focus Not Obscured (Minimum) (Level AA)\", W_NAME = \"4.1.2 Name, Role, Value (Level A)\", W_BYPASS = \"2.4.1 Bypass Blocks (Level A)\";\nfunction cssId(t) { return /^[A-Za-z][\\w-]*$/.test(t); }\nfunction sel(e) {\n if (!e || e.nodeType !== 1) return \"\";\n var rt = e.getRootNode(), live = e.isConnected, path = [];\n for (var n = e; n && n.nodeType === 1; n = n.parentElement) {\n var t = n.tagName.toLowerCase();\n if (n.id && cssId(n.id) && !secretish(n.id) && live && rt.querySelectorAll(\"#\" + n.id).length === 1) {\n path.unshift(\"#\" + n.id);\n break;\n }\n if (t === \"html\" || t === \"body\") {\n path.unshift(t);\n break;\n }\n var c = typeof n.className === \"string\" ? n.className.trim().split(/\\s+/).filter(function (x) { return cssId(x) && !secretish(x); }).slice(0, 2) : [];\n var part = t + (c.length ? \".\" + c.join(\".\") : \"\"), par = n.parentElement;\n if (par) {\n var same = Array.prototype.filter.call(par.children, function (x) { return x.tagName === n.tagName; });\n if (same.length > 1) part += \":nth-of-type(\" + (same.indexOf(n) + 1) + \")\";\n }\n path.unshift(part);\n if (live) {\n try { if (rt.querySelectorAll(path.join(\" > \")).length === 1) break; } catch (x) {}\n }\n }\n var out = path.join(\" > \");\n if (rt && rt.host) out = sel(rt.host) + \" (inside its shadow root) \" + out;\n return out;\n}\nvar KEEP = /^(id|class|role|type|name|href|src|tabindex|disabled|hidden|contenteditable|aria-[\\w-]+)$/, VOID = /^(area|br|col|embed|hr|img|input|link|meta|source|track|wbr)$/;\nfunction attrText(n, v) {\n if (n === \"href\" || n === \"src\") return cleanUrl(v);\n if (n === \"id\" || n === \"class\") return scrub(v);\n if (n === \"role\" || n === \"type\") return v;\n v = scrub(v);\n return v.length > 60 ? v.slice(0, 60) + \"...\" : v;\n}\nfunction snip(e, kids) {\n var tag = e.tagName.toLowerCase(), open = \"<\" + tag;\n [].forEach.call(e.attributes, function (a) {\n if (KEEP.test(a.name)) open += \" \" + a.name + \"=\\\"\" + attrText(a.name, a.value).replace(/\"/g, \""\") + \"\\\"\";\n });\n open += \">\";\n if (VOID.test(tag)) return open;\n if (kids && e.children.length) return open + [].slice.call(e.children, 0, 8).map(function (c) { return c.children.length ? snip(c).replace(/>[^<]*<\\/[\\w-]+>$/, \">...</\" + c.tagName.toLowerCase() + \">\") : snip(c); }).join(\"\") + (e.children.length > 8 ? \"...\" : \"\") + \"</\" + tag + \">\";\n var text = scrub((e.textContent || \"\").trim().replace(/\\s+/g, \" \"));\n return open + (text.length > 40 ? text.slice(0, 40) + \"...\" : text) + \"</\" + tag + \">\";\n}\nvar FRAME = /^(__.*|SegmentViewNode|LayoutRouter.*|InnerLayoutRouter|OuterLayoutRouter|RenderFromTemplateContext|ScrollAndFocusHandler|InnerScrollAndFocusHandler|.*Boundary.*|HTTPAccessFallback.*|Router|AppRouter|HotReload|ReactDevOverlay|DevRootHTTPAccessFallbackBoundary|ServerRoot|Root|AppContainer|Suspense|Fragment|StrictMode|Head|Html|Body|Script|ClientPageRoot|ClientSegmentRoot|.*Provider|.*Context|.*Consumer|Link|LinkComponent|Image|ForwardRef|Memo|Anonymous|_c\\d*)$/;\nfunction compOf(e) {\n var keys = Object.keys(e), k = keys.filter(function (x) { return x.indexOf(\"__reactFiber$\") === 0 || x.indexOf(\"__reactInternalInstance$\") === 0; })[0];\n if (k) {\n var names = [], src = \"\", any = false;\n for (var f = e[k]; f && names.length < 3; f = f.return) {\n var t = f.type;\n if (!src && f._debugSource && f._debugSource.fileName) src = f._debugSource.fileName + \":\" + f._debugSource.lineNumber;\n if (!t || typeof t === \"string\" || typeof t === \"symbol\") continue;\n var n = t.displayName || t.name || (t.render && (t.render.displayName || t.render.name)) || (t.type && (t.type.displayName || t.type.name));\n if (!n) continue;\n any = true;\n if (FRAME.test(n) || names.indexOf(n) >= 0) continue;\n names.push(n);\n }\n if (!names.length) return any ? \"React, rendered by a server component or by the framework itself, so its component name is not in the browser; search the code for the HTML or its classes\" : \"\";\n if (names.every(function (n) { return n.length <= 2; })) return \"React (component names are minified in this production build; a development build shows them)\";\n return \"React \" + names[0] + (names.length > 1 ? \", inside \" + names.slice(1).join(\", inside \") : \"\") + (src ? \", source \" + src : \"\");\n }\n if (e.__vueParentComponent) {\n var vn = [];\n for (var c = e.__vueParentComponent; c && vn.length < 3; c = c.parent) {\n var nm = c.type && (c.type.name || c.type.__name);\n if (nm && vn.indexOf(nm) < 0) vn.push(nm);\n }\n if (vn.length) return \"Vue \" + vn[0] + (vn.length > 1 ? \", inside \" + vn.slice(1).join(\", inside \") : \"\");\n }\n if (e.__vue__ && e.__vue__.$options && e.__vue__.$options.name) return \"Vue \" + e.__vue__.$options.name;\n try {\n var ng = window.ng;\n if (ng && ng.getOwningComponent) {\n var oc = ng.getOwningComponent(e);\n if (oc && oc.constructor) return \"Angular \" + oc.constructor.name;\n }\n } catch (x) {}\n return \"\";\n}\nfunction whereOf(el) {\n if (!el || !el.isConnected) return \"\";\n var out = [], up = el.parentElement;\n while (up && up !== document.body && up !== document.documentElement && !up.id) up = up.parentElement;\n if (up && up.id && up !== document.body) out.push(\"inside #\" + scrub(up.id));\n var hs = document.querySelectorAll(\"h1,h2,h3,h4,h5,h6,[role=heading]\"), last = null;\n for (var i = 0; i < hs.length; i++) {\n if (hs[i] === el || (host && host.contains(hs[i]))) continue;\n if (hs[i].contains(el) || hs[i].compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) last = hs[i]; else break;\n }\n var t = last ? scrub((last.textContent || \"\").replace(/\\s+/g, \" \").trim()).slice(0, 60) : \"\";\n if (t) out.push(\"under the heading \\\"\" + t + \"\\\"\");\n return out.join(\", \");\n}\nfunction aiOf(crit, expect, fix, els, more, lazy) {\n function fact(x) {\n var o = { role: x[0], el: x[1] };\n function fill() {\n o.sel = x[2] ? x[2].sel : sel(x[1]);\n o.html = x[2] ? x[2].html : snip(x[1], x[3]);\n o.comp = compOf(x[1]);\n }\n if (!lazy) fill();\n else [\"sel\", \"html\", \"comp\"].forEach(function (k) {\n Object.defineProperty(o, k, { configurable: true, enumerable: true, get: function () { fill(); return o[k]; }, set: function (v) { Object.defineProperty(o, k, { value: v, writable: true, enumerable: true }); } });\n });\n return o;\n }\n return {\n crit: crit,\n expect: expect,\n fix: fix,\n more: more || [],\n els: els.filter(function (x) { return x[1]; }).map(fact)\n };\n}\nfunction tally(k) {\n var m = {}, order = [];\n logs.forEach(function (e) {\n if (e.k !== k) return;\n if (!m[e.f]) {\n m[e.f] = 0;\n order.push(e.f);\n }\n m[e.f]++;\n });\n return order.map(function (f) { return f + \" \" + m[f]; }).join(\", \");\n}\nfunction stamp() {\n var d = new Date();\n return d.getFullYear() + \"-\" + two(d.getMonth() + 1) + \"-\" + two(d.getDate()) + \" \" + two(d.getHours()) + \":\" + two(d.getMinutes());\n}\nfunction verifyOf(e) {\n var a = e.ai, t = e.p.map(partText).join(\"\");\n function el(r) {\n var x = a.els.filter(function (y) { return y.role === r; })[0];\n return x ? x.sel : \"\";\n }\n if (e.f === \"Missed spots\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" gets a stop number and the skipped count goes down by 1. Press Tab until it has focus, then Enter (and Space for a button) does what a click does.\";\n if (e.f === \"Forced order\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" has no tabindex above 0, its stop number matches its place on the page, and the Forced order count goes down by 1.\";\n if (e.f === \"Hover menus\") return \"Press Tab until a link inside \" + el(\"Element\") + \" has focus: the menu opens while focus is inside it, and Tab trail no longer lists it under hover menus.\";\n if (e.f === \"Hidden focus\") return \"Press Tab until \" + el(\"Element\") + \" has focus: part of it shows next to \" + el(\"Covered by\") + \", and its Hidden focus line in the log says in view or partly covered.\";\n if (e.f === \"Nameless stop\") return \"Hover the dot of \" + el(\"Element\") + \" in Tab trail: it shows a name, not \\\"no name\\\".\";\n if (e.f === \"No way out\") return \"Open \" + el(\"Popup\") + \" and press Tab until a Close button has focus, then Enter closes the popup.\";\n if (e.f === \"Broken skip link\") return el(\"Element\") ? \"Reload the page, press Tab once and then Enter on \" + el(\"Element\") + \": the next Tab lands inside the main content.\" : \"Reload the page and press Tab once: the first stop is a skip link, and Enter on it moves focus to the main content.\";\n if (e.f === \"Ghost stop\") return a.crit === W_NAME ? \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" is no longer inside aria-hidden, or Tab skips it, and the Ghost stop count goes down by 1.\" : \"Press Tab until \" + el(\"Element\") + \" has focus: it shows on screen, and its Ghost stop line in the log says OK.\";\n if (e.f === \"No focus style\") return \"Press Tab until \" + el(\"Element\") + \" has focus: an outline or another visible change shows on it, and its No focus style line in the log says OK.\";\n if (e.f === \"Keyboard trap\") return \"Put focus on \" + el(\"Element\") + \" and press Tab: focus moves on to \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n if (e.f === \"Lost focus\") return \"Open the popup from \" + el(\"Opened by\") + \" with Enter, then close it with Escape or its close button: focus is back on \" + el(\"Opened by\") + \", and the log shows an OK Lost focus line.\";\n if (el(\"Popup\")) return \"Reload so the popup shows, then press Tab once: focus lands inside \" + el(\"Popup\") + \".\";\n return \"Put focus on \" + (el(\"Tab left from\") || \"the start of the page\") + \" and press \" + (t.indexOf(\"(Shift+Tab)\") >= 0 ? \"Shift+Tab\" : \"Tab\") + \" once: focus lands on \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n}\nvar hidTested = new Set();\nfunction coverage() {\n var out = [], left = stops.filter(function (x) { return !hidTested.has(x); }).map(function (x) { return stops.indexOf(x) + 1; });\n if (left.length) out.push(\"Hidden focus: \" + left.length + \" of \" + pl(stops.length, \"stop was\", \"stops were\") + \" never tested (\" + left.slice(0, 30).join(\", \") + (left.length > 30 ? \" and \" + (left.length - 30) + \" more\" : \"\") + \"). Press Play to test every stop.\");\n var presses = logs.filter(function (e) { return e.f === \"Out of order\" || e.f === \"Keyboard trap\"; }).length;\n out.push(\"Out of order and Keyboard trap: judged only for the \" + pl(presses, \"Tab press\", \"Tab presses\") + \" made in this run. Press Tab through the whole page, and Shift+Tab back, to judge every step.\");\n var pops = logs.filter(function (e) { return e.f === \"Lost focus\"; }).length;\n out.push(\"Lost focus: \" + (pops ? \"only \" + pl(pops, \"popup was\", \"popups were\") : \"no popups were\") + \" opened and closed in this run. Open and close every popup, menu and dialog on the page to check them all.\");\n out.push(\"Window size: everything was tested at \" + innerWidth + \" x \" + innerHeight + \" only. Sticky bars, menus and popups can behave differently on phones; run it again in a window about 390 px wide.\");\n out.push(\"Not checked by Tab trail at all: how strong the focus change is (contrast, size: AAA), accessible names of things Tab doesn't reach, color contrast of text, what a screen reader announces, and content inside iframes. Use axe DevTools or Lighthouse for names, contrast and iframes. Check focus visibility with Spotlight and screen reader output with VoiceOver or NVDA.\");\n return out;\n}\nvar probLog = [], ignore = [], CAP = 200, judgedDir = {};\nfunction ignored(e) {\n return ignore.length && e.ai.els.some(function (x) {\n for (var n = x.el; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n for (var i = 0; i < ignore.length; i++) if (n.matches(ignore[i])) return true;\n }\n return false;\n });\n}\nfunction openProbs(all) {\n var seen = {}, out = [];\n probLog.forEach(function (e) {\n var t = e.f + e.p.map(partText).join(\"\");\n if (e.fixed || seen[t]) return;\n seen[t] = 1;\n if (all || !ignored(e)) out.push(e);\n });\n return out;\n}\nfunction hash(t) {\n var h = 2166136261;\n for (var i = 0; i < t.length; i++) h = Math.imul(h ^ t.charCodeAt(i), 16777619);\n return (\"0000000\" + (h >>> 0).toString(16)).slice(-8);\n}\nfunction keyOf(e) {\n var t = e.tagName.toLowerCase();\n if (e.id && cssId(e.id)) return t + \"#\" + e.id;\n var up = \"\";\n for (var p = e.parentElement; p; p = p.parentElement) if (p.id && cssId(p.id)) { up = \"#\" + p.id + \" \"; break; }\n return up + t + (e.getAttribute(\"role\") ? \"[role=\" + e.getAttribute(\"role\") + \"]\" : \"\") + (e.getAttribute(\"name\") ? \"[name=\" + e.getAttribute(\"name\") + \"]\" : \"\") + \"\\\"\" + label(e) + \"\\\"\";\n}\nfunction mainEl(e) {\n var to = e.ai.els.filter(function (x) { return x.role === \"Tab jumped to\"; })[0];\n return to || e.ai.els[0];\n}\nfunction problemsOf(list) {\n var used = {};\n return list.map(function (e) {\n var m = mainEl(e), id = hash(e.f + \"|\" + e.ai.els.map(function (x) { return keyOf(x.el); }).join(\"|\"));\n used[id] = (used[id] || 0) + 1;\n return { id: used[id] > 1 ? id + \"-\" + used[id] : id, check: e.f, wcag: wcagOf(e) || null, selector: m ? m.sel : null, html: m ? m.html : null, component: m && m.comp ? m.comp : null, fix: e.ai.fix, verify: verifyOf(e) };\n });\n}\nfunction aiText() {\n var out = [], skips = [], seenS = {}, notes = [], probs = openProbs(), left = openProbs(true).length - probs.length, ids = problemsOf(probs), groups = [], byKey = {};\n probs.forEach(function (e, i) {\n var m = mainEl(e), k = /^(Missed spots|Hover menus|Forced order)$/.test(e.f) && m ? e.f + \"|\" + e.ai.fix + \"|\" + desc(m.el) + \"|\" + m.comp : \"#\" + i, g = byKey[k];\n if (!g) groups.push((g = byKey[k] = { i: i, list: [] }));\n g.list.push(e);\n });\n logs.forEach(function (e) {\n var t = e.p.map(partText).join(\"\");\n if (e.k === \"SKIPPED\" && !seenS[e.f + t]) {\n seenS[e.f + t] = 1;\n skips.push(e.f + \": \" + t);\n } else if (e.k === \"INFO\") notes.push(clock(e.t) + \" \" + e.f + \": \" + t);\n });\n var c = logCounts();\n out.push(\"Tab trail \" + VERSION + \" report for an AI agent\");\n out.push(\"Page: \" + addr());\n out.push(\"Ran on: \" + stamp() + \", \" + browser() + \", window \" + innerWidth + \" x \" + innerHeight);\n out.push(\"Tool: Tab trail (matjazkorosec.com/tools/tab-trail), a bookmarklet that checks the keyboard Tab order of the page. Stop numbers are positions in the Tab order when the check ran. Use the selectors, the HTML and the component names to find each element in the code.\");\n out.push(\"Run it again from a script (for example Playwright): save https://raw.githubusercontent.com/matjazkorosec/tab-trail/v\" + VERSION + \"/dist/tab-trail.js in your repo once and load your saved copy with page.evaluate(readFileSync(...)), which works under a Content Security Policy. Then await window.__tabTrail.play() to walk every stop, and read window.__tabTrail.problems() for every open problem as data, window.__tabTrail.report() for this same report or window.__tabTrail.log() for every line.\");\n out.push(\"\");\n out.push(\"Summary: \" + pl(probs.length, \"problem\", \"problems\") + \" to fix\" + (groups.length < probs.length ? \" (\" + pl(groups.length, \"different fix\", \"different fixes\") + \")\" : \"\") + \". \" + pl(c.ok, \"check\", \"checks\") + \" passed, \" + c.skip + \" skipped.\");\n if (walkEnd || walking) out.push(\"Play: \" + playState() + \".\");\n var pass = tally(\"OK\"), sk = tally(\"SKIPPED\");\n if (pass) out.push(\"Passed: \" + pass + \".\");\n if (sk) out.push(\"Skipped: \" + sk + \".\");\n var ran = ranChecks();\n if (ran.length) out.push(\"Checked: \" + ran.join(\", \") + \". Each check is explained at \" + showUrl(ran[0]).replace(/#.*/, \"#shows\") + \" under Fix what turns red.\");\n if (left) out.push(\"Left out on purpose: \" + pl(left, \"problem\", \"problems\") + \" inside \" + ignore.join(\", \") + \".\");\n if (groups.length > CAP) out.push(\"Showing the first \" + CAP + \" of \" + groups.length.toLocaleString(\"en-US\") + \" problems. window.__tabTrail.problems() returns every one.\");\n groups.slice(0, CAP).forEach(function (g, n) {\n var e = g.list[0], i = g.i, more = g.list.length - 2;\n out.push(\"\");\n out.push(\"Problem \" + (n + 1) + \" of \" + groups.length + \": \" + e.f + (g.list.length > 1 ? \", \" + g.list.length + \" elements with the same cause: \" + desc(mainEl(e).el) + \" (\" + g.list.slice(0, 2).map(function (x) { return \"\\\"\" + label(mainEl(x).el) + \"\\\"\"; }).join(\", \") + (more > 0 ? \" and \" + more + \" more\" : \"\") + \"). Fix it once in the component that draws them.\" : \"\") + \" (\" + clock(e.t) + \")\");\n out.push(\"Id: \" + ids[i].id + (g.list.length > 1 ? \" (the first of \" + g.list.length + \", window.__tabTrail.problems() lists every one)\" : \"\"));\n if (e.ai) out.push(\"WCAG: \" + e.ai.crit);\n out.push(\"What happened: \" + e.p.map(partText).join(\"\"));\n if (!e.ai) return;\n out.push(\"Expected: \" + e.ai.expect);\n e.ai.els.forEach(function (x) {\n out.push(x.role + \": \" + x.sel + (x.el.isConnected ? \"\" : \" (no longer on the page)\"));\n out.push(\" HTML: \" + x.html);\n if (x.comp) out.push(\" Component: \" + x.comp);\n var where = whereOf(x.el);\n if (where) out.push(\" Where: \" + where);\n });\n e.ai.more.forEach(function (m) { out.push(m); });\n out.push(\"Fix hint: \" + e.ai.fix);\n out.push(\"How to check the fix: \" + verifyOf(e));\n if (CHECKS.indexOf(e.f) >= 0) out.push(\"About this check: \" + showUrl(e.f));\n });\n out.push(\"\");\n out.push(\"Not covered in this run:\");\n coverage().forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length) {\n out.push(\"\");\n out.push(\"Skipped checks, and why:\");\n skips.slice(0, 12).forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length > 12) out.push(\"- and \" + (skips.length - 12) + \" more\");\n }\n if (notes.length) {\n out.push(\"\");\n out.push(\"Notes:\");\n notes.slice(-10).forEach(function (t) { out.push(\"- \" + t); });\n }\n return out.join(\"\\n\");\n}\nfunction copyIt(b, w, text, word) {\n var d = w.document;\n var lb = b.lastChild && b.lastChild.nodeType === 3 ? b.lastChild : b;\n function done(ok) {\n lb.textContent = ok ? \"Copied\" : \"Copy failed\";\n setTimeout(function () { lb.textContent = word; }, 1500);\n }\n function old() {\n var back = w === window ? deep() : d.activeElement;\n var ta = d.createElement(\"textarea\");\n ta.value = text;\n ta.setAttribute(\"readonly\", \"\");\n ta.style.cssText = \"position:fixed;left:0;top:0;width:1px;height:1px;opacity:0\";\n (w === window ? root : d.body).appendChild(ta);\n ta.focus({ preventScroll: true });\n ta.select();\n var ok = false;\n try { ok = d.execCommand(\"copy\"); } catch (x) {}\n ta.remove();\n if (back && back.focus) back.focus({ preventScroll: true });\n done(ok);\n }\n if (w.navigator.clipboard && w.isSecureContext) w.navigator.clipboard.writeText(text).then(function () { done(true); }, old);\n else old();\n}\nfunction filters(parent, doc) {\n var row = doc.createElement(\"div\");\n row.className = \"lf\";\n var set = FILT.map(function (f) {\n var b = doc.createElement(\"button\");\n b.type = \"button\";\n b.className = \"lt\";\n b.addEventListener(\"click\", function () {\n logFilter = f[0];\n logDraw();\n });\n row.appendChild(b);\n return b;\n });\n parent.appendChild(row);\n filterSets.push(set);\n return set;\n}\nfunction logSummary() {\n var c = logCounts();\n logSum.textContent = \" \" + pl(c.all, \"event\", \"events\");\n logBad.textContent = c.bad ? pl(c.bad, \"problem\", \"problems\") : \"\";\n logGroup.classList.toggle(\"warn\", c.bad > 0);\n filterSets.forEach(function (set) {\n set.forEach(function (b, i) {\n b.textContent = FILT[i][1] + \" \" + c[FILT[i][0]];\n b.setAttribute(\"aria-pressed\", logFilter === FILT[i][0] ? \"true\" : \"false\");\n b.classList.toggle(\"e\", FILT[i][0] === \"bad\" && c.bad > 0);\n });\n });\n if (tabSum && tabOpen()) tabSum.textContent = addr() + \", \" + pl(stops.length, \"stop\", \"stops\");\n checkedLine(logChecked, document);\n if (tabChecked && tabOpen()) checkedLine(tabChecked, logTab.document);\n if (sumLine && walkEnd === \"done\") sumDraw();\n}\nfunction logDraw() {\n if (logTab && logTab.closed) tabGone();\n logSummary();\n [logList, tabList].forEach(function (u) { if (u) while (u.firstChild) u.removeChild(u.firstChild); });\n logs.forEach(function (e) { e.li = null; });\n var away = tabOpen();\n logBody.hidden = !logOpen || away;\n logAway.hidden = !away;\n logBtn.setAttribute(\"aria-expanded\", logBody.hidden ? \"false\" : \"true\");\n var v = logView();\n if (!v) return;\n var frag = v.ownerDocument.createDocumentFragment();\n logs.slice().reverse().forEach(function (e) {\n if (!shows(e)) return;\n e.li = logLi(e, v.ownerDocument);\n frag.appendChild(e.li);\n });\n v.appendChild(frag);\n toTop(v);\n}\nfunction tabGone() {\n logTab = null;\n tabList = null;\n tabSum = null;\n tabChecked = null;\n wcagBoxes = wcagBoxes.filter(function (b) { return b.ownerDocument === document; });\n tabNote = null;\n filterSets = filterSets.filter(function (x) { return x !== tabSet; });\n tabSet = null;\n if (tabPoll) clearInterval(tabPoll);\n tabPoll = 0;\n}\nvar TAB_CSS = [\n \"body{margin:0;padding:12px;background:#e4dccd;color:#1a1612;font:15px/1.5 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif}\",\n \".hd,.box{box-sizing:border-box;max-width:1200px;margin:0 auto;background:#fbf8f3;border-radius:12px}\",\n \".wide .hd,.wide .box{max-width:none}\",\n \".fw{display:inline-grid;place-items:center;width:34px;height:34px;padding:0;border:1.5px solid #1a1612;border-radius:8px;background:#fff;color:#1a1612;cursor:pointer;box-sizing:border-box}\",\n \".fw:hover{background:#efe8dc}\",\n \".fw:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".fw .in,.wide .fw .out{display:none}\",\n \".wide .fw .in{display:inline}\",\n \".hd{position:sticky;top:12px;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:10px 8px;padding:14px 18px;box-shadow:0 0 0 12px #e4dccd}\",\n \".box{margin-top:8px;padding:12px 0 8px;overflow:hidden}\",\n \"h1{margin:0;font:700 22px/1.2 Georgia,serif}\",\n \".u{margin:0 auto 0 6px;color:#5f564c}\",\n \".nt{flex-basis:100%;margin:0;color:#d0103a;font-weight:700}\",\n \".nt[hidden]{display:none}\",\n \".lf{display:inline-grid;grid-auto-flow:column;gap:2px;padding:3px;background:#efe8dc;border-radius:10px;margin-right:14px}\",\n \".fr{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px 0}\",\n \".lt,.kl,.ka,.lo,.lc{font:inherit;color:inherit;cursor:pointer}\",\n \".lt{padding:3px 14px;border:0;border-radius:7px;background:none;color:#5f564c;font-weight:600;font-size:14px}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".kl,.ka,.lo{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border-radius:8px;font-weight:700;font-size:14px;white-space:nowrap;box-sizing:border-box}\",\n \".kl,.lo{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover,.lo:hover{background:#efe8dc}\",\n \".ka{border:0;background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".lo{font-weight:600}\",\n \".lt:focus-visible,.kl:focus-visible,.ka:focus-visible,.lo:focus-visible,.lc:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lck{margin:0;padding:0 18px 8px}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".ll{list-style:none;margin:0;padding:0}\",\n \".lx{display:grid;grid-template-columns:72px 80px 1fr;gap:2px 12px;padding:6px 18px;align-items:baseline}\",\n \".lx:hover{background:#f3ede3}\",\n \".lx .bd{min-width:0;overflow-wrap:anywhere}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".tm,.st{font:500 14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".st{font-weight:700}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{display:inline-block;min-width:24px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;background:none;font-size:14px;line-height:1.4;text-align:center}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\"\n].join(\"\");\nvar ownName = false, tabWide = false;\nfunction openTab() {\n var w = window.open(\"\", \"_blank\");\n if (!w) {\n tabMsg.hidden = false;\n return;\n }\n tabMsg.hidden = true;\n logTab = w;\n if (!window.name) {\n window.name = \"tab-trail-\" + Date.now();\n ownName = true;\n }\n var d = w.document;\n d.title = \"Tab trail log: \" + location.host;\n try {\n var tsh = new w.CSSStyleSheet();\n tsh.replaceSync(TAB_CSS);\n d.adoptedStyleSheets = [tsh];\n } catch (e) {\n var st = d.createElement(\"style\");\n st.textContent = TAB_CSS;\n d.head.appendChild(st);\n }\n var hd = d.createElement(\"div\");\n hd.className = \"hd\";\n var h1 = d.createElement(\"h1\");\n h1.textContent = \"Tab trail log\";\n hd.appendChild(h1);\n tabSum = d.createElement(\"p\");\n tabSum.className = \"u\";\n hd.appendChild(tabSum);\n var cp = d.createElement(\"button\");\n cp.type = \"button\";\n cp.className = \"kl\";\n icon(cp, 16, COPY_ICON, 1.6);\n cp.appendChild(d.createTextNode(\"Copy log\"));\n cp.addEventListener(\"click\", function () { copyIt(cp, w, logText(), \"Copy log\"); });\n hd.appendChild(cp);\n var ca = d.createElement(\"button\");\n ca.type = \"button\";\n ca.className = \"ka\";\n icon(ca, 16, AI_ICON, 1.6);\n ca.appendChild(d.createTextNode(\"Copy for AI\"));\n ca.addEventListener(\"click\", function () { copyIt(ca, w, aiText(), \"Copy for AI\"); });\n hd.appendChild(ca);\n var bk = d.createElement(\"button\");\n bk.type = \"button\";\n bk.className = \"lo\";\n bk.textContent = \"Put back in panel\";\n bk.addEventListener(\"click\", putBack);\n hd.appendChild(bk);\n var fw = d.createElement(\"button\");\n fw.type = \"button\";\n fw.className = \"fw\";\n fw.setAttribute(\"aria-label\", \"Full width\");\n fw.title = \"Full width\";\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n icon(fw, 16, \"M1.5 8h13M1.5 8l3-3M1.5 8l3 3M14.5 8l-3-3M14.5 8l-3 3\", 1.6).setAttribute(\"class\", \"out\");\n icon(fw, 16, \"M1.5 8h4.5M6 8l-3-3M6 8l-3 3M14.5 8H10M10 8l3-3M10 8l3 3\", 1.6).setAttribute(\"class\", \"in\");\n fw.addEventListener(\"click\", function () {\n tabWide = !tabWide;\n d.body.classList.toggle(\"wide\", tabWide);\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n });\n hd.appendChild(fw);\n d.body.classList.toggle(\"wide\", tabWide);\n tabNote = d.createElement(\"p\");\n tabNote.className = \"nt\";\n tabNote.textContent = \"Tab trail was closed on the page. This log no longer updates.\";\n tabNote.hidden = true;\n hd.appendChild(tabNote);\n var fr = d.createElement(\"div\");\n fr.className = \"fr\";\n hd.appendChild(fr);\n tabSet = filters(fr, d);\n wcagBox(fr, d);\n d.body.appendChild(hd);\n d.body.classList.toggle(\"nw\", !showWcag);\n var bd = d.createElement(\"div\");\n bd.className = \"box\";\n d.body.appendChild(bd);\n tabChecked = d.createElement(\"p\");\n tabChecked.className = \"lck\";\n bd.appendChild(tabChecked);\n tabList = d.createElement(\"ul\");\n tabList.className = \"ll\";\n bd.appendChild(tabList);\n tabPoll = setInterval(function () {\n if (logTab && logTab.closed) {\n tabGone();\n logDraw();\n }\n }, 1000);\n logOpen = true;\n logDraw();\n}\nfunction putBack() {\n var w = logTab;\n tabGone();\n logOpen = true;\n logDraw();\n if (w && !w.closed) w.close();\n}\nfunction lbtn(cls, text, parent) {\n var b = document.createElement(\"button\");\n b.type = \"button\";\n b.className = cls;\n b.textContent = text;\n parent.appendChild(b);\n return b;\n}\nvar logGroup = document.createElement(\"div\");\nlogGroup.className = \"lgp\";\nvar logBtn = document.createElement(\"button\");\nlogBtn.type = \"button\";\nlogBtn.className = \"sg\";\nlogBtn.setAttribute(\"aria-expanded\", \"false\");\nvar logWord = document.createElement(\"b\");\nlogWord.textContent = \"Log\";\nicon(logBtn, 16, \"M4 1.5h8v13H4zM6.5 5h3M6.5 8h3M6.5 11h2\", 1.6);\nlogBtn.appendChild(logWord);\nvar logSum = document.createElement(\"span\");\nlogSum.className = \"ls\";\nvar logBad = document.createElement(\"span\");\nlogBad.className = \"bg\";\nvar logInfo = document.createElement(\"span\");\nlogInfo.appendChild(logSum);\nlogBtn.appendChild(logInfo);\nlogBtn.appendChild(logBad);\nlogBtn.appendChild(document.createElement(\"i\"));\nlogGroup.appendChild(logBtn);\nvar logBody = document.createElement(\"div\");\nlogBody.className = \"lbd\";\nlogBody.hidden = true;\nlogGroup.appendChild(logBody);\nvar logTop = document.createElement(\"div\");\nlogTop.className = \"lr lrt\";\nlogBody.appendChild(logTop);\nvar logChecked = document.createElement(\"p\");\nlogChecked.className = \"lck\";\nlogChecked.hidden = true;\nlogBody.appendChild(logChecked);\nfilters(logBody, document);\nwcagBox(logBody, document);\nvar logList = document.createElement(\"ul\");\nlogList.className = \"ll\";\nlogBody.appendChild(logList);\nvar logRow = document.createElement(\"div\");\nlogRow.className = \"lr lb2\";\nlogBody.appendChild(logRow);\nvar copyBtn = lbtn(\"kl\", \"Copy log\", logRow);\ncopyBtn.insertBefore(icon(copyBtn, 16, COPY_ICON, 1.6), copyBtn.firstChild);\ncopyBtn.addEventListener(\"click\", function () { copyIt(copyBtn, window, logText(), \"Copy log\"); });\nvar aiLog = lbtn(\"ka\", \"Copy for AI\", logRow);\naiLog.insertBefore(icon(aiLog, 16, AI_ICON, 1.6), aiLog.firstChild);\naiLog.addEventListener(\"click\", function () { copyIt(aiLog, window, aiText(), \"Copy for AI\"); });\nfunction newTabBtn(parent) {\n var b = lbtn(\"lnt\", \"\", parent);\n icon(b, 14, \"M9 2.5h4.5V7M13.5 2.5L7.5 8.5M12 9.5v4h-9.5v-9.5h4\", 1.6);\n b.appendChild(document.createTextNode(\"Open log in new tab\"));\n b.addEventListener(\"click\", openTab);\n return b;\n}\nnewTabBtn(logTop);\nvar logEnd = document.createElement(\"div\");\nlogEnd.className = \"lr\";\nlogBody.insertBefore(logEnd, logRow.nextSibling);\nnewTabBtn(logEnd);\nvar tabMsg = document.createElement(\"p\");\ntabMsg.className = \"lm\";\ntabMsg.textContent = \"The browser blocked the new tab. Allow pop-ups for this site and try again.\";\ntabMsg.hidden = true;\nlogBody.insertBefore(tabMsg, logChecked);\nvar logAway = document.createElement(\"div\");\nlogAway.className = \"la\";\nlogAway.hidden = true;\nvar awayText = document.createElement(\"p\");\nawayText.textContent = \"The log is open in a new tab.\";\nlogAway.appendChild(awayText);\nvar awayRow = document.createElement(\"div\");\nawayRow.className = \"lr\";\nlogAway.appendChild(awayRow);\nlbtn(\"lo\", \"Show it\", awayRow).addEventListener(\"click\", function () { if (tabOpen()) logTab.focus(); });\nlbtn(\"lo\", \"Put it back\", awayRow).addEventListener(\"click\", putBack);\nlogGroup.appendChild(logAway);\nlogBtn.addEventListener(\"click\", function () {\n if (tabOpen()) return logTab.focus();\n logOpen = !logOpen;\n logDraw();\n if (!logOpen) return;\n var gr = logGroup.getBoundingClientRect(), pr = panel.getBoundingClientRect();\n if (gr.bottom > pr.bottom) panel.scrollTop += Math.min(gr.bottom - pr.bottom, gr.top - pr.top);\n});\ntray.insertBefore(logGroup, tray.firstChild);\nlogGroup.className = \"lgp sec\";\n[[legendBtn, legend], [keysBtn, keysBox], [gear, settings]].forEach(function (p) {\n var w = document.createElement(\"div\");\n w.className = \"sec\";\n tray.insertBefore(w, p[0]);\n w.appendChild(p[0]);\n w.appendChild(p[1]);\n});\n[logBtn, legendBtn, keysBtn, gear].forEach(function (b) {\n var g = b.querySelector(\"svg\"), t = document.createElement(\"span\");\n t.className = \"ic\";\n b.insertBefore(t, g);\n t.appendChild(g);\n});\nwcagSync();\nlogSummary();\nroot.appendChild(panel);\nskipPanel();\nvar closed = false;\nfunction place() {\n if (closed) return;\n var m = modal(), to = m || document.documentElement;\n if (host.parentNode !== to) to.appendChild(host);\n var want = { position: m ? \"fixed\" : \"absolute\", left: m ? -scrollX + \"px\" : \"0px\", top: m ? -scrollY + \"px\" : \"0px\" };\n for (var k in want) if (host.style[k] !== want[k]) host.style[k] = want[k];\n}\nplace();\n\nfunction el(name, attrs, parent) {\n var n = document.createElementNS(NS, name);\n for (var k in attrs) n.setAttribute(k, attrs[k]);\n parent.appendChild(n);\n return n;\n}\nvar queued = false, onlyScreen = true, boxKey = [];\nvar current = -1;\nvar pinned = new WeakMap();\nfunction isPinned(e) {\n if (pinned.has(e)) return pinned.get(e);\n var p = false;\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") { p = true; break; }\n }\n pinned.set(e, p);\n return p;\n}\nfunction clear(g) { while (g.firstChild) g.removeChild(g.firstChild); }\nvar spotEl = null;\nfunction lit(r) {\n clear(spot);\n if (!light.checked) return;\n var W = innerWidth, H = innerHeight, d = \"M0 0H\" + W + \"V\" + H + \"H0Z\";\n if (r && (r.width || r.height)) {\n var x0 = r.left - 6, y0 = r.top - 6, x1 = r.right + 6, y1 = r.bottom + 6, k = Math.min(8, (x1 - x0) / 2, (y1 - y0) / 2);\n d += \"M\" + (x0 + k) + \" \" + y0 + \"H\" + (x1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x1 + \" \" + (y0 + k) + \"V\" + (y1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x1 - k) + \" \" + y1 + \"H\" + (x0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x0 + \" \" + (y1 - k) + \"V\" + (y0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x0 + k) + \" \" + y0 + \"Z\";\n }\n el(\"path\", { d: d, fill: \"rgba(15,12,10,.72)\", \"fill-rule\": \"evenodd\" }, spot);\n}\nfunction box(m, r, layer) {\n if (m === shownEl) {\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, layer);\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, layer);\n }\n el(\"rect\", { x: r.left, y: r.top, width: r.width, height: r.height, fill: \"rgba(208,16,58,.12)\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\", rx: 3 }, layer);\n}\nfunction trailLine(pts, layer) {\n if (pts.length < 2) return;\n var p = pts.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \");\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 6, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\", opacity: 0.9 }, layer);\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 3, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\" }, layer);\n}\nfunction dotsIn(list, layer) {\n list.sort(function (a, b) { return (a[2] - 1 === current) - (b[2] - 1 === current); });\n list.forEach(function (d) {\n var big = d[2] > 99, on = d[2] - 1 === current;\n var g = el(\"g\", { class: \"o\", \"data-i\": d[2] - 1 }, layer), ds = stops[d[2] - 1];\n if (ds) el(\"title\", {}, g).textContent = d[2] + \" \\u00b7 \" + roleOf(ds) + \" \\u00b7 \" + (nameOf.get(ds) || \"no name\");\n if (on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 19 : 17, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 4 }, g);\n if (d[3] && !on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: \"#fff\", stroke: \"#1a1612\", \"stroke-width\": 2, \"stroke-dasharray\": \"4 3\" }, g);\n else el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: on ? \"#c2410c\" : \"#1a1612\", stroke: \"#fff\", \"stroke-width\": 2 }, g);\n var t = el(\"text\", { x: d[0], y: d[1] + 0.5, fill: d[3] && !on ? \"#1a1612\" : \"#fff\", \"font-size\": big ? 10 : 11, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\", \"text-anchor\": \"middle\", \"dominant-baseline\": \"middle\" }, g);\n t.textContent = d[2];\n });\n}\nfunction shortLines(pts, sx, sy) {\n var W = innerWidth, H = innerHeight, MAX = 100;\n var v = pts.map(function (p) { return p[2] ? [p[0], p[1]] : [p[0] - sx, p[1] - sy]; });\n function on(p) { return p[0] >= 0 && p[0] <= W && p[1] >= 0 && p[1] <= H; }\n function arrow(from, to, L) {\n var dx = to[0] - from[0], dy = to[1] - from[1], len = Math.sqrt(dx * dx + dy * dy) || 1;\n var ux = dx / len, uy = dy / len;\n var tip = [from[0] + ux * L, from[1] + uy * L];\n trailLine([from, tip], svg);\n var pts3 = [[tip[0] + ux * 6, tip[1] + uy * 6], [tip[0] - ux * 9 + uy * 9, tip[1] - uy * 9 - ux * 9], [tip[0] - ux * 9 - uy * 9, tip[1] - uy * 9 + ux * 9]];\n el(\"polygon\", { points: pts3.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \"), fill: \"#ff8f57\", stroke: \"#fff\", \"stroke-width\": 2, \"stroke-linejoin\": \"round\" }, svg);\n }\n for (var k = 1; k < v.length; k++) {\n var a = v[k - 1], b = v[k], ia = on(a), ib = on(b);\n var len = Math.sqrt((b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1]));\n if (ia && ib && len <= MAX) trailLine([a, b], svg);\n else if (ia && ib) {\n var L = Math.min(MAX - 6, len / 2 - 12);\n arrow(a, b, L);\n arrow(b, a, L);\n }\n else if (ia || ib) arrow(ia ? a : b, ia ? b : a, Math.min(MAX - 6, len));\n }\n}\nfunction draw() {\n queued = false;\n var page = !onlyScreen;\n onlyScreen = true;\n var sx = scrollX, sy = scrollY;\n var last = Math.max(Math.ceil(stops.length / PAGE) - 1, 0);\n if (win > last) win = last;\n var lo = paged() ? win * PAGE : 0, hi = paged() ? Math.min(lo + PAGE, stops.length) : stops.length;\n var red = [], at = [];\n var edges = {};\n missed.concat(hovers, noRing.filter(live), ghosts.filter(live)).forEach(function (m) {\n var p = isPinned(m), r = m.getBoundingClientRect(), ed = ghostOf.get(m) === \"off\" ? (r.right <= 0 ? \"l\" : r.left >= innerWidth ? \"r\" : r.bottom <= 0 ? \"t\" : r.top >= innerHeight ? \"b\" : \"\") : \"\";\n if (ed) (edges[ed] = edges[ed] || []).push(m);\n else if (p || page) red.push([m, r, p]);\n });\n for (var i = lo; i < hi; i++) {\n var sr = stops[i].getBoundingClientRect(), st = sr.width < 2 && sr.height < 2;\n at.push([sr, st, st || isPinned(stops[i])]);\n }\n var fr = shownEl && hovers.indexOf(shownEl) < 0 && forced.indexOf(shownEl) >= 0 ? [shownEl.getBoundingClientRect(), isPinned(shownEl)] : null;\n var lr = light.checked && spotEl && spotEl.isConnected ? spotEl.getBoundingClientRect() : null;\n var key = [shownEl, skipBad && skipBad.why];\n red.forEach(function (x) { if (!x[2]) key.push(x[0], x[1].left + sx, x[1].top + sy, x[1].width, x[1].height); });\n if (fr && !fr[1]) key.push(fr[0].left + sx, fr[0].top + sy, fr[0].width, fr[0].height);\n var keep = page && same(key, boxKey);\n if (page) boxKey = key;\n clear(svg);\n clear(dot);\n clear(under);\n lit(lr);\n if (page) {\n clear(svgPg);\n clear(dotPg);\n if (!keep) clear(underPg);\n }\n red.forEach(function (x) {\n var m = x[0], r = x[1];\n if (x[2]) box(m, r, under);\n else if (!keep) box(m, { left: r.left + sx, top: r.top + sy, width: r.width, height: r.height }, underPg);\n });\n Object.keys(edges).forEach(function (ed) {\n var vw = Math.min(innerWidth, document.documentElement.clientWidth || innerWidth), vh = Math.min(innerHeight, document.documentElement.clientHeight || innerHeight), v = ed === \"l\" || ed === \"r\", max = v ? vh : vw, lo = max, hi = 0;\n edges[ed].forEach(function (m) {\n var r = m.getBoundingClientRect();\n lo = Math.min(lo, v ? r.top : r.left);\n hi = Math.max(hi, v ? r.bottom : r.right);\n });\n lo = Math.max(4, Math.min(lo, max - 144));\n hi = Math.min(max - 4, Math.max(hi, lo + 140));\n var x = v ? (ed === \"r\" ? vw - 36 : 4) : lo, y = v ? lo : ed === \"b\" ? vh - 36 : 4, w = v ? 32 : hi - lo, h = v ? hi - lo : 32;\n el(\"rect\", { x: x, y: y, width: w, height: h, rx: 6, fill: \"rgba(208,16,58,.12)\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\" }, under);\n el(\"path\", { d: { r: \"M-5 -9l10 9-10 9\", l: \"M5 -9l-10 9 10 9\", t: \"M-9 5l9-10 9 10\", b: \"M-9 -5l9 10 9-10\" }[ed], transform: \"translate(\" + (x + (v ? 16 : 22)) + \" \" + (y + (v ? 22 : 16)) + \")\", fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }, under);\n var t = el(\"text\", { x: 0, y: 0, transform: \"translate(\" + (x + w / 2) + \" \" + (y + h / 2) + \")\" + (v ? \" rotate(-90)\" : \"\"), fill: \"#d0103a\", stroke: \"#fff\", \"stroke-width\": 3, \"paint-order\": \"stroke\", \"font-size\": 11, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\", \"text-anchor\": \"middle\", \"dominant-baseline\": \"middle\" }, under);\n t.textContent = runs(edges[ed]).map(span).join(\", \");\n });\n costGoals.concat(pickAt ? [{ el: pickAt, pick: 1 }] : []).forEach(function (g) {\n if (!g.el.isConnected) return;\n var q = g.el.getBoundingClientRect(), t = g.pick ? \"Click to make \" + label(g.el) + \" a goal\" : g.name + \": \" + g.presses;\n el(\"rect\", { x: q.left - 4, y: q.top - 4, width: q.width + 8, height: q.height + 8, fill: \"none\", stroke: \"#c2410c\", \"stroke-width\": 3, \"stroke-dasharray\": g.pick ? \"7 5\" : \"\", rx: 6 }, under);\n el(\"rect\", { x: q.right + 10, y: q.top + q.height / 2 - 11, width: t.length * 6.6 + 16, height: 22, fill: \"#c2410c\", rx: 11 }, under);\n el(\"text\", { x: q.right + 18, y: q.top + q.height / 2 + 4, fill: \"#fff\", \"font-size\": 12, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\" }, under).textContent = t;\n });\n if (tint && mapOn.checked) tint[0].filter(function (m) { return m.isConnected; }).forEach(function (m) {\n var q = m.getBoundingClientRect();\n el(\"rect\", { x: q.left, y: q.top, width: q.width, height: q.height, fill: tint[1], \"fill-opacity\": 0.12, stroke: tint[1], \"stroke-width\": 2, rx: 4 }, under);\n });\n if (skipBad && skipBad.link.isConnected && page && !keep) {\n var ka = skipBad.link.getBoundingClientRect(), kt = skipBad.to && shown(skipBad.to) ? skipBad.to : mainRegion(), kb = kt ? kt.getBoundingClientRect() : null;\n var ax = Math.max(ka.left + sx, 13) + 14, ay = Math.max(ka.bottom + sy, 26) + 4, bx = kb ? kb.left + sx + 16 : ax + 160, by = kb ? Math.max(kb.top + sy + 16, ay + 40) : ay + 80;\n el(\"path\", { d: \"M\" + ax + \" \" + ay + \"L\" + bx + \" \" + by, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\", \"stroke-linecap\": \"round\" }, underPg);\n el(\"circle\", { cx: bx, cy: by, r: 11, fill: \"#fff\", stroke: \"#d0103a\", \"stroke-width\": 3 }, underPg);\n el(\"path\", { d: \"M\" + (bx - 5) + \" \" + (by - 5) + \"l10 10m0 -10l-10 10\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-linecap\": \"round\" }, underPg);\n }\n if (fr) {\n var hr = fr[0], hp = fr[1];\n if (hp || (page && !keep)) {\n var hx = hp ? hr.left : hr.left + sx, hy = hp ? hr.top : hr.top + sy, hl = hp ? under : underPg;\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, hl);\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, hl);\n }\n }\n var hid = 0, placedPg = [], placedSc = [], pts = [], dotsPg = [], dotsSc = [];\n var big = stops.length > PAGE;\n group.style.display = big ? \"\" : \"none\";\n pager.style.display = paged() ? \"\" : \"none\";\n chunkBox.style.marginTop = paged() ? \"\" : \"0\";\n if (paged()) {\n pageText.textContent = \"Stops \" + (lo + 1) + \" to \" + hi + \" of \" + stops.length;\n prevBtn.disabled = win === 0;\n nextBtn.disabled = win === last;\n }\n stops.forEach(function (s, i) {\n if (i < lo || i >= hi) return;\n var r = at[i - lo][0];\n var tiny = at[i - lo][1];\n var onScreen = at[i - lo][2];\n var cx = tiny ? 13 + hid++ * 30 : onScreen ? Math.max(r.left - 8, 13) : Math.max(r.left + sx - 8, 13);\n var cy = tiny ? 13 : onScreen ? Math.max(r.top - 8, 13) : Math.max(r.top + sy - 8, 13);\n var placed = onScreen ? placedSc : placedPg;\n for (var j = placed.length - 1, tries = 0; j >= 0 && tries < 40; j--) {\n if (Math.abs(placed[j][0] - cx) < 26 && Math.abs(placed[j][1] - cy) < 26) {\n cx = placed[j][0] + 28;\n j = placed.length;\n tries++;\n }\n }\n placed.push([cx, cy]);\n pts.push([cx, cy, onScreen]);\n (onScreen ? dotsSc : dotsPg).push([cx, cy, i + 1, tiny]);\n });\n if (lines.checked && !stub.checked) shortLines(pts, sx, sy);\n var run = [], runPg = null;\n function flush() {\n if (runPg === null) return;\n if (runPg) { if (page) trailLine(run, svgPg); }\n else trailLine(run, svg);\n run = [];\n runPg = null;\n }\n for (var k = lines.checked && stub.checked ? 1 : pts.length; k < pts.length; k++) {\n var a = pts[k - 1], b = pts[k], both = !a[2] && !b[2];\n if (runPg !== both) {\n flush();\n runPg = both;\n run.push(both || a[2] ? [a[0], a[1]] : [a[0] - sx, a[1] - sy]);\n }\n run.push(both || b[2] ? [b[0], b[1]] : [b[0] - sx, b[1] - sy]);\n }\n flush();\n if (page) dotsIn(dotsPg, dotPg);\n dotsIn(dotsSc, dot);\n}\nfunction queue(screenOnly) {\n if (screenOnly !== true) onlyScreen = false;\n if (!queued) { queued = true; requestAnimationFrame(draw); }\n}\nvar timer = 0, idle = 0, nextScan = 0, settling = false;\nfunction same(a, b) {\n if (a.length !== b.length) return false;\n for (var i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\nfunction rescan() {\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n timer = 0;\n idle = 0;\n if (closed) return;\n if (settling) return later();\n var t0 = performance.now();\n place();\n pinned = new WeakMap();\n scan();\n var fa = deep();\n noOutline = null;\n stops.forEach(function (x) { if (x !== fa && !restSig.has(x)) rest(x); });\n skipCheck();\n if (!same(drawn, sig())) {\n fill();\n scan();\n renderJumps();\n review();\n }\n focus();\n var t1 = performance.now();\n nextScan = t1 + Math.max(500, 4 * (t1 - t0));\n}\nvar due = 0;\nfunction later(min) {\n if (idle || closed) return;\n var wait = Math.max(min || 500, nextScan - performance.now());\n if (timer) {\n if (performance.now() + wait >= due) return;\n clearTimeout(timer);\n }\n due = performance.now() + wait;\n timer = setTimeout(function () {\n timer = 0;\n if (window.requestIdleCallback) idle = requestIdleCallback(rescan, { timeout: 1000 });\n else rescan();\n }, wait);\n}\nvar LOUD = /^(tabindex|disabled|inert|href|role|open|hidden)$/;\nfunction matters(m) {\n var t = m.target;\n if (t === host || host.contains(t)) return false;\n if (m.type === \"childList\") {\n var l = [].concat([].slice.call(m.addedNodes), [].slice.call(m.removedNodes));\n for (var i = 0; i < l.length; i++) if (l[i].nodeType === 1) return true;\n return false;\n }\n if (LOUD.test(m.attributeName || \"\") || t.nodeType !== 1) return true;\n if (stopSet.has(t) || upSet.has(t) || t.matches(FOCUSABLE) || t.querySelector(FOCUSABLE)) return true;\n return missed.concat(hovers, forced).some(function (x) { return t === x || t.contains(x); });\n}\nfunction onMoved(e) { if (host.style.position === \"fixed\") place(); queue((stub.checked || !lines.checked) && !!e && e.type === \"scroll\" && (e.target === document || e.target === document.documentElement)); later(); }\nvar watch = new MutationObserver(function (list) {\n place();\n if (openPop && gone(openPop)) popClosed();\n for (var i = 0; i < list.length; i++) if (matters(list[i])) return later();\n later(3000);\n});\nfunction focus() {\n var a = deep();\n track(a);\n if (a && a !== document.body && a !== document.documentElement) {\n lost = false;\n if (a !== host && a.getRootNode() !== root) spotEl = a;\n } else spotEl = null;\n current = stops.indexOf(a);\n if (current !== seen) {\n seen = current;\n if (current >= 0) win = Math.floor(current / PAGE);\n }\n queue();\n}\nfunction lose(e) {\n var t = e && !e.relatedTarget && e.composedPath ? e.composedPath()[0] : null, p = t && t.nodeType === 1 ? popupOf(t) : null;\n if (p && p === openPop) requestAnimationFrame(function () { if (!closed && openPop === p && gone(p)) popClosed(); });\n setTimeout(function () {\n var a = document.activeElement;\n if (a && a !== document.body && a !== document.documentElement) return;\n lost = true;\n focus();\n }, 0);\n}\nvar walking = false, walkDelay = 400, walkT = 0, walked = new Set(), walkAt = null, walkEnd = null;\nfunction walkedN() { return stops.filter(function (s) { return walked.has(s); }).length; }\nfunction playState() {\n var at = walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) + \" \\\"\" + label(walkAt) + \"\\\"\" : \"\";\n var n = \"walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\");\n if (walking) return \"still walking\" + at + \", \" + n;\n return walkEnd === \"done\" ? \"finished, \" + n : \"paused\" + at + \", \" + n;\n}\nfunction playLook() {\n while (playIcon.firstChild) playIcon.removeChild(playIcon.firstChild);\n icon(playIcon, 12, walking ? \"M5 3v10M11 3v10\" : \"M4 2.5l9 5.5-9 5.5z\", 2.4);\n playWord.textContent = walking ? \"Pause\" : \"Play\";\n play.setAttribute(\"aria-pressed\", walking ? \"true\" : \"false\");\n if (walked.size) playText.textContent = \"Walked \" + walkedN() + \" of \" + stops.length + \" stops\";\n}\nfunction walkedText() { return \" after \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\"; }\nfunction stopWalk(why, fin) {\n if (!walking) return;\n walking = false;\n walkEnd = fin ? \"done\" : \"paused\";\n settling = false;\n if (walkT) clearTimeout(walkT);\n walkT = 0;\n playLook();\n if (why) log(\"INFO\", \"Play it\", [why]);\n sumDraw();\n if (fin) announce(\"Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \". \" + pl(logCounts().bad, \"problem\", \"problems\") + \".\");\n else if (why) announce(\"Play paused\" + (walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) : \"\") + \". Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\");\n var done = walkDone;\n walkDone = [];\n done.forEach(function (f) { f(aiText()); });\n}\nfunction step(s) {\n walkT = 0;\n if (!walking || closed) return;\n if (!s || stops.indexOf(s) < 0) s = stops.filter(function (x) { return !walked.has(x); })[0];\n if (!s) {\n stopWalk(\"Finished: walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\", true);\n return;\n }\n endPress();\n if (s !== deep()) rest(s);\n s.focus({ focusVisible: true });\n focus();\n walked.add(s);\n walkAt = s;\n playLook();\n var at = where(s), still = 0, tries = 0;\n settling = true;\n function wait() {\n if (!walking || closed) return void (settling = false);\n var now = where(s);\n if (now !== at) {\n at = now;\n still = 0;\n } else still++;\n if (++tries < 90 && (still < 2 || tries < 6)) return requestAnimationFrame(wait);\n settling = false;\n hoverTry(s);\n check(s, function () {\n if (walking && !closed) walkT = setTimeout(function () { step(); }, walkDelay);\n });\n }\n requestAnimationFrame(wait);\n}\nvar walkDone = [];\nfunction untested() {\n var judged = {};\n logs.forEach(function (e) { if ((e.k === \"OK\" || e.k === \"PROBLEM\") && (e.f === \"Lost focus\" || e.f === \"Broken skip link\" || e.f === \"No way out\")) judged[e.f] = 1; });\n if (judgedDir[1] && judgedDir[-1]) judged[\"Out of order\"] = judged[\"Keyboard trap\"] = 1;\n openProbs().forEach(function (e) { judged[e.f] = 1; });\n return [\"Out of order\", \"Keyboard trap\", \"Lost focus\", \"No way out\", \"Broken skip link\"].filter(function (f) { return !judged[f]; });\n}\nfunction sumDraw() {\n sumLine.hidden = walking || walkEnd !== \"done\";\n if (sumLine.hidden) return;\n var per = {}, probs = openProbs(), left = untested();\n probs.forEach(function (e) { per[e.f] = (per[e.f] || 0) + 1; });\n var red = CHECKS.filter(function (f) { return per[f]; }), ok = CHECKS.filter(function (f) { return !per[f] && left.indexOf(f) < 0; });\n var tabLeft = left.indexOf(\"Out of order\") >= 0 || left.indexOf(\"Keyboard trap\") >= 0, popLeft = left.indexOf(\"Lost focus\") >= 0 || left.indexOf(\"No way out\") >= 0;\n while (sumLine.firstChild) sumLine.removeChild(sumLine.firstChild);\n var b = document.createElement(\"b\");\n b.textContent = pl(CHECKS.length, \"check\", \"checks\") + \": \" + ok.length + \" passed, \" + red.length + (red.length === 1 ? \" found a problem, \" : \" found problems, \") + left.length + \" not tested.\";\n sumLine.appendChild(b);\n function part(head, list, cls, count) {\n if (!list.length) return;\n sumLine.appendChild(document.createTextNode(\" \" + head + \": \"));\n var sp = document.createElement(\"span\");\n sp.className = cls;\n sp.textContent = list.map(function (f) { return f + (count ? \" \" + per[f] : \"\"); }).join(\", \");\n sumLine.appendChild(sp);\n sumLine.appendChild(document.createTextNode(\".\"));\n }\n part(\"Passed\", ok, \"g\");\n part(red.length === 1 ? \"Problem\" : \"Problems\", red, \"e\", true);\n part(\"Not tested (\" + [tabLeft ? \"press Tab and Shift+Tab\" : \"\", popLeft ? \"open and close a popup\" : \"\", left.indexOf(\"Broken skip link\") >= 0 ? \"the page has no main region\" : \"\"].filter(Boolean).join(\", \") + \")\", left, \"q\");\n}\nfunction startWalk() {\n walking = true;\n sumDraw();\n if (walkedN() >= stops.length) walked = new Set();\n playLook();\n var first = current >= 0 && current < stops.length - 1 && walked.size ? current + 1 : 0;\n if (stops[first]) {\n log(\"INFO\", \"Play it\", [first ? \"Went on from \" : \"Started at \", ref(stops[first]), \".\"]);\n announce((first ? \"Play went on from stop \" : \"Play started at stop \") + (first + 1) + \".\");\n }\n step(stops[first]);\n}\nplay.addEventListener(\"click\", function () {\n if (walking) return stopWalk(\"Paused with the Pause button\" + walkedText());\n walkDelay = 400;\n startWalk();\n});\nfunction interrupt(e) {\n if (picking) return;\n if (!walking || (e.composedPath && e.composedPath().indexOf(host) >= 0)) return;\n stopWalk(\"Paused by a click on the page\" + walkedText());\n}\nplayLook();\nvar SAFARI = MAC && /^Safari /.test(browser()), FIREFOX = MAC && /^Firefox /.test(browser());\nvar settleT = 0, macNote = false, beforeEl = null, wantEl = null, MAC_NOTE = SAFARI ? \"Safari skips links and buttons on Tab until you turn it on: Settings, Advanced, Press Tab to highlight each item.\" : \"Firefox skips links on Tab until you turn it on: System Settings, Keyboard, Keyboard navigation.\";\nvar LINKS = \"a[href],area[href]\", SKIPS = SAFARI ? [\"a[href]\", \"area[href]\", \"button\", \"input[type=button]\", \"input[type=submit]\", \"input[type=reset]\", \"input[type=image]\", \"input[type=checkbox]\", \"input[type=radio]\", \"input[type=range]\", \"input[type=file]\", \"input[type=color]\"].map(function (q) { return q + \":not([tabindex])\"; }).join(\",\") : LINKS;\nfunction linkSkip(want, cur, dir) {\n if (!SAFARI && !FIREFOX) return null;\n var n = stops.length, k = 0, links = 0;\n for (var i = want; i !== cur && k < n; i = (i + dir + n) % n, k++) {\n if (!stops[i].matches(SKIPS)) return null;\n if (stops[i].matches(LINKS)) links++;\n }\n return k && k < n ? [links, k - links] : null;\n}\nfunction skipText(c) {\n var l = c[0] ? pl(c[0], \"link\", \"links\") : \"\", b = c[1] ? pl(c[1], \"button\", \"buttons\") : \"\";\n return l && b ? l + \" and \" + b : l || b;\n}\nfunction after(el, dir) {\n var ord = new Map(), n = stops.length, pick = -1;\n walk(document, []).forEach(function (e, i) { ord.set(e, i); });\n var at = ord.get(el);\n if (at === undefined) return dir > 0 ? 0 : n - 1;\n for (var i = 0; i < n; i++) {\n var k = ord.get(stops[i]);\n if (stops[i].tabIndex > 0 || k === undefined) continue;\n if (dir > 0 && k > at) return i;\n if (dir < 0 && k < at) pick = i;\n }\n return dir > 0 ? 0 : pick >= 0 ? pick : forced.length ? forced.length - 1 : n - 1;\n}\nvar stays = new WeakMap(), leaves = new WeakMap();\nfunction tellsHow(e) {\n if (!(e.tagName === \"TEXTAREA\" || e.isContentEditable || /^(application|textbox)$/.test(e.getAttribute(\"role\") || \"\"))) return false;\n var r = e.getRootNode(), t = (e.getAttribute(\"aria-description\") || \"\") + \" \" + (e.getAttribute(\"aria-keyshortcuts\") || \"\") + \" \" + (e.getAttribute(\"title\") || \"\");\n (e.getAttribute(\"aria-describedby\") || \"\").split(/\\s+/).forEach(function (id) { var x = id && r.getElementById ? r.getElementById(id) : null; if (x) t += \" \" + x.textContent; });\n return /\\b(escape|esc)\\b/i.test(t);\n}\nfunction multi(e) { return /^(IFRAME|OBJECT|EMBED|AUDIO|VIDEO)$/.test(e.tagName) || !!e.shadowRoot || (e.tagName === \"INPUT\" && /^(date|datetime-local|month|time|week)$/.test(e.type)); }\nfunction endPress() {\n if (settleT) {\n clearTimeout(settleT);\n settle();\n }\n pressed = 0;\n}\nfunction settle() {\n settleT = 0;\n focus();\n if (pressed && current >= 0) {\n check(stops[current]);\n hoverTry(stops[current]);\n }\n if (!pressed || current < 0 || before === -2) {\n if (pressed && before === -2) log(\"SKIPPED\", \"Out of order\", [\"Focus was on the page body, so this Tab press is not judged.\"]);\n else if (pressed) {\n var o = deep();\n if (o && o !== document.body && o !== document.documentElement && !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(o), \", which is not in the list of stops. Not judged.\"]);\n else if (!o || !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Focus left the page, or went to the browser. Not judged.\"]);\n }\n pressed = 0;\n return;\n }\n var w0 = before >= 0 ? (before + pressed + stops.length) % stops.length : -1;\n if (w0 >= 0 && w0 !== current && !tabbable(stops[w0])) {\n var fromEl = stops[before], toEl = stops[current];\n rescan();\n current = stops.indexOf(toEl);\n before = stops.indexOf(fromEl);\n if (before < 0) beforeEl = fromEl;\n if (current < 0) {\n log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(toEl), \", which is not in the list of stops. Not judged.\"]);\n pressed = 0;\n return;\n }\n }\n var n = stops.length, src = before >= 0 ? null : beforeEl, first = before < 0 && !src;\n var want = before >= 0 ? (before + pressed + n) % n : src ? after(src, pressed) : pressed > 0 ? 0 : n - 1;\n if (before >= 0 && wantEl && stops.indexOf(wantEl) >= 0) want = stops.indexOf(wantEl);\n var landed = popupOf(stops[current]), left = before >= 0 ? popupOf(stops[before]) : src ? popupOf(src) : null;\n if (landed && landed === left && before >= 0) loopCheck(landed, stops[before], stops[current], pressed);\n if (first && pressed > 0 && !landed && !popMissed) {\n for (var k = 0; k < n && !popMissed; k++) {\n var pop = popupOf(stops[k]);\n if (pop && shown(pop) && blocking(pop)) popMissed = pop;\n }\n if (popMissed) {\n renderJumps();\n announce(\"A popup blocks the page, but the first Tab went somewhere else.\");\n log(\"PROBLEM\", \"Out of order\", [popName(popMissed), \" blocks the page, but the first Tab went to \", ref(stops[current]), \".\"], aiOf(W_ORDER, \"A popup that blocks the page gets keyboard focus first, so the first Tab lands inside it.\", \"When the popup opens, move focus into it: call .focus() on its first control, or on the popup itself with tabindex=\\\"-1\\\". A <dialog> opened with showModal() does this by itself.\", [[\"Popup\", popMissed], [\"First Tab went to\", stops[current]]]));\n }\n }\n var start = before >= 0 ? [ref(stops[before])] : src ? [ref(src)] : [\"Start\"], back = pressed < 0 ? \" (Shift+Tab)\" : \"\";\n if (current === before && current !== want && !landed && !left) {\n var s = stops[current];\n var d = pressed > 0 ? 1 : -1, st = stays.get(s) || stays.set(s, {}).get(s), key1 = d > 0 ? \"Tab\" : \"Shift+Tab\", key2 = d > 0 ? \"Shift+Tab\" : \"Tab\";\n if (multi(s)) log(\"SKIPPED\", \"Out of order\", start.concat([\" \\u2192 \", ref(s), back + \": Tab moved inside it, it has parts of its own (like a date field, a video or a frame). Not judged.\"]));\n else if (tellsHow(s)) {\n if (!st.how) log(\"SKIPPED\", \"Keyboard trap\", [ref(s), \" keeps Tab, and says how to leave.\"]);\n st.how = 1;\n } else if (!st[d] && (leaves.get(s) || {})[-d]) {\n st[d] = 1;\n log(\"OK\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \", but \" + key2 + \" leaves it, so it is not a trap.\"]);\n } else if (!st[d] && !st[-d]) {\n st[d] = 1;\n log(\"SKIPPED\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \". Press \" + key2 + \": if focus can't leave that way either, it is a keyboard trap.\"]);\n } else if (!st[d] && trapped.indexOf(s) < 0) {\n st[d] = 1;\n trapped.push(s);\n renderJumps();\n announce(\"Keyboard trap: Tab and Shift+Tab both stay on stop \" + (current + 1) + \".\");\n log(\"PROBLEM\", \"Keyboard trap\", [\"Tab and Shift+Tab both stay on \", ref(s), \": the keyboard can't move focus away.\"], aiOf(W_TRAP, \"Tab or Shift+Tab moves focus away from the element, so a keyboard user can leave it.\", \"Find the keydown listener on the element or its parents that calls preventDefault() on Tab, or that calls .focus() on the same element again, and let Tab through. If the element needs Tab (a code editor), let Escape move focus out and say so next to it.\", [[\"Element\", s], [\"Expected next\", stops[(current + 1) % n]]]));\n }\n pressed = 0;\n return;\n }\n if (before >= 0 && current !== before) {\n var lv = leaves.get(stops[before]) || leaves.set(stops[before], {}).get(stops[before]), sd = pressed > 0 ? 1 : -1, so = stays.get(stops[before]);\n if (!lv[sd] && so && so[-sd] && !so[sd] && trapped.indexOf(stops[before]) < 0) log(\"OK\", \"Keyboard trap\", [(sd > 0 ? \"Tab\" : \"Shift+Tab\") + \" leaves \", ref(stops[before]), \", so it is not a trap.\"]);\n lv[sd] = 1;\n }\n var skipped = current !== want && !landed && !left ? linkSkip(want, current, pressed > 0 ? 1 : -1) : null;\n if (first && pressed > 0 && landed) log(\"OK\", \"Out of order\", [\"First Tab went into the popup \", popName(landed), \".\"]);\n else if (skipped) {\n if (!macNote) {\n macNote = true;\n renderJumps();\n log(\"INFO\", \"Out of order\", [MAC_NOTE]);\n }\n log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \": your browser skipped \" + skipText(skipped) + \". Not judged.\"]));\n } else if (current !== want && !landed && !left && !(popMissed && first)) {\n var from = before >= 0 ? stops[before] : src, to = stops[current], fromText = before >= 0 ? \"stop \" + (before + 1) : src ? \"\\\"\" + label(src) + \"\\\" \" + desc(src) : \"the start of the page\";\n announce(\"Tab jumped out of order, from \" + (before >= 0 ? \"stop \" + (before + 1) : src ? label(src) : \"the start\") + \" to stop \" + (current + 1) + \".\");\n if (!jumps.some(function (j) { return j[0] === from && j[1] === to; })) {\n jumps.push([from, to]);\n renderJumps();\n }\n log(\"PROBLEM\", \"Out of order\", start.concat([\" → \", ref(to), back + \", expected \", ref(stops[want]), to.tabIndex > 0 ? \". It has tabindex=\\\"\" + to.tabIndex + \"\\\".\" : \".\"]), aiOf(W_ORDER, \"Tab\" + (pressed < 0 ? \" with Shift\" : \"\") + \" moves from \" + fromText + \" to stop \" + (want + 1) + \", the next element in the Tab order.\", to.tabIndex > 0 ? \"Remove tabindex=\\\"\" + to.tabIndex + \"\\\" from the element Tab jumped to, or set it to 0. A positive tabindex pulls an element ahead of the page order.\" : \"Tab follows the order of the HTML, so a jump comes from a script. Look for code that calls .focus() on focus, blur or keydown near the element Tab left from, and for content added or moved while Tab was pressed. If the element Tab jumped to sits elsewhere in the HTML on purpose, move it next to the one before it.\", [[\"Tab left from\", from], [\"Tab jumped to\", to], [\"Expected next\", stops[want]]]));\n } else if (current !== want) log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + (landed || left ? \": into or inside a popup, allowed.\" : \": the popup that blocks the page is listed already.\")]));\n else log(\"OK\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \", next in line.\"]));\n pressed = 0;\n}\nfunction inPanel() {\n var a = root.activeElement;\n return !!a && panel.contains(a);\n}\nfunction panelCtl() {\n return [].filter.call(panel.querySelectorAll(\"button,a,input\"), function (e) { return !e.disabled && e.getClientRects().length > 0; });\n}\nfunction enter() {\n endPress();\n if (walking) stopWalk(\"Paused by \" + KEYS + walkedText());\n var a = deep();\n pRet = a && a !== document.body && a !== document.documentElement && a !== host && a.getRootNode() !== root ? a : null;\n panelIn = true;\n skipPanel();\n play.focus({ focusVisible: true });\n}\nfunction back() {\n var r = pRet;\n panelIn = false;\n pRet = null;\n skipPanel();\n if (r && r.isConnected) r.focus({ focusVisible: true });\n else {\n var a = root.activeElement;\n if (a && a.blur) a.blur();\n }\n}\nfunction key(e) {\n if (picking && e.key === \"Escape\" && e.isTrusted) {\n e.preventDefault();\n e.stopPropagation();\n return endPick();\n }\n if (e.code === \"KeyF\" && e.ctrlKey && e.shiftKey && !e.altKey && !e.metaKey) {\n e.preventDefault();\n e.stopPropagation();\n if (inPanel()) back();\n else enter();\n return;\n }\n if (e.key !== \"Tab\" && settleT) endPress();\n lastKey = e.key;\n keyT = Date.now();\n keyOn = deep();\n if (walking && (e.key === \" \" || e.key === \"Tab\" || e.key === \"Escape\")) {\n if (e.key === \" \") e.preventDefault();\n stopWalk(\"Paused by \" + (e.key === \" \" ? \"Space\" : e.key) + walkedText());\n if (e.key !== \"Tab\") return;\n }\n if (panelIn && inPanel()) {\n if (e.key === \"Escape\") {\n e.preventDefault();\n return back();\n }\n if (e.key === \"Tab\" && skip.checked) {\n var l = panelCtl(), i = l.indexOf(root.activeElement), n = l.length;\n e.preventDefault();\n if (n) l[i < 0 ? 0 : (i + (e.shiftKey ? -1 : 1) + n) % n].focus({ focusVisible: true });\n return;\n }\n }\n var fa = deep(), onBody = !fa || fa === document.body || fa === document.documentElement;\n if (e.key === \"Escape\" && e.isTrusted && openPop && !gone(openPop)) {\n var ep = openPop;\n setTimeout(function () { if (!closed && openPop === ep && !gone(ep)) log(\"INFO\", \"No way out\", [popName(ep), \": Escape did not close it. WCAG 2.2 AA does not require Escape when Tab reaches a close button; it is a best practice (ARIA APG).\"]); }, 300);\n }\n if (e.key === \"Escape\" && !modal() && !(openPop && !gone(openPop)) && (onBody || inPanel())) close();\n if (e.key === \"Tab\") {\n endPress();\n fa = deep();\n pressed = e.shiftKey ? -1 : 1;\n before = current < 0 && lost ? -2 : current;\n beforeEl = current < 0 && !lost && fa && fa !== document.body && fa !== document.documentElement && !within(host, fa) ? fa : null;\n wantEl = null;\n for (var k = 1, n = stops.length; before >= 0 && k < n; k++) {\n var c = stops[(((before + pressed * k) % n) + n) % n];\n if (tabbable(c)) {\n wantEl = c;\n if (c !== fa) rest(c);\n break;\n }\n }\n settleT = setTimeout(settle, 150);\n }\n}\nfunction pick(e) {\n var g = e.target.closest && e.target.closest(\"g.o\");\n if (!g) return;\n e.preventDefault();\n e.stopPropagation();\n if (e.type !== \"click\") return;\n var s = stops[+g.getAttribute(\"data-i\")];\n if (!s) return;\n endPress();\n if (s !== deep()) rest(s);\n s.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction close() {\n closed = true;\n picking = false;\n PICKS.forEach(function (t) { removeEventListener(t, pickEv, true); });\n stopWalk();\n removeEventListener(\"pointerdown\", interrupt, true);\n removeEventListener(\"pointerdown\", tap, true);\n removeEventListener(\"scroll\", onMoved, true);\n removeEventListener(\"resize\", onMoved);\n removeEventListener(\"resize\", keepIn);\n if (fit) fit.disconnect();\n watch.disconnect();\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n if (sayT) clearTimeout(sayT);\n if (settleT) clearTimeout(settleT);\n removeEventListener(\"keydown\", key, true);\n removeEventListener(\"focusin\", focus, true);\n removeEventListener(\"focusout\", lose, true);\n if (tabPoll) clearInterval(tabPoll);\n if (logTab && !logTab.closed && tabNote) tabNote.hidden = false;\n if (window.__tabTrail === api) delete window.__tabTrail;\n if (ownName) window.name = \"\";\n host.remove();\n}\nvar grab = null;\npanel.addEventListener(\"pointerdown\", function (e) {\n if (e.button !== 0 || e.target.closest(\"button,a,ul,label\")) return;\n var r = panel.getBoundingClientRect();\n grab = [e.clientX - r.left, e.clientY - r.top];\n panel.setPointerCapture(e.pointerId);\n panel.classList.add(\"g\");\n});\npanel.addEventListener(\"pointermove\", function (e) {\n if (!grab) return;\n var x = Math.min(Math.max(e.clientX - grab[0], 0), innerWidth - panel.offsetWidth);\n var y = Math.min(Math.max(e.clientY - grab[1], 0), innerHeight - panel.offsetHeight);\n panel.style.left = x + \"px\";\n panel.style.top = y + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n});\nfunction drop() { grab = null; panel.classList.remove(\"g\"); }\nfunction keepIn() {\n if (closed) return;\n var r = panel.getBoundingClientRect(), m = 8;\n if (!r.height || (r.top >= m && r.bottom <= innerHeight - m && r.left >= m && r.right <= innerWidth - m)) return;\n panel.style.top = Math.min(Math.max(r.top, m), Math.max(m, innerHeight - m - r.height)) + \"px\";\n panel.style.left = Math.min(Math.max(r.left, m), Math.max(m, innerWidth - m - r.width)) + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n}\nvar fit = window.ResizeObserver ? new ResizeObserver(keepIn) : null;\nif (fit) fit.observe(panel);\naddEventListener(\"resize\", keepIn);\npanel.addEventListener(\"pointerup\", drop);\npanel.addEventListener(\"pointercancel\", drop);\nhost.__close = close;\nfunction mainOf(e) {\n var first = null;\n for (var i = 0; i < e.p.length; i++) {\n var x = e.p[i];\n if (typeof x === \"string\" || !x.el) continue;\n if (i && typeof e.p[i - 1] === \"string\" && /\\u2192 $/.test(e.p[i - 1])) return x;\n if (!first) first = x;\n }\n return first;\n}\nvar api = {\n report: function () { return aiText(); },\n log: function () {\n return logs.map(function (e) {\n var m = mainOf(e);\n return { time: clock(e.t), result: e.k, check: e.f, wcag: wcagOf(e) || null, text: e.p.map(partText).join(\"\"), fixed: !!e.fixed, selector: m ? sel(m.el) || null : null, stop: m && m.n ? m.n : null };\n });\n },\n play: function (o) {\n o = o || {};\n var skipOut = [].concat(o.ignore || []);\n for (var i = 0; i < skipOut.length; i++) {\n try { document.querySelector(skipOut[i]); } catch (x) { return Promise.reject(new Error(\"Tab trail: \\\"\" + skipOut[i] + \"\\\" in ignore is not a valid CSS selector.\")); }\n }\n ignore = skipOut;\n walkDelay = typeof o.delay === \"number\" && o.delay >= 0 ? o.delay : 400;\n return new Promise(function (res) {\n walkDone.push(res);\n if (!walking) {\n walked = new Set();\n startWalk();\n }\n });\n },\n problems: function () { return problemsOf(openProbs()); },\n state: function () { return { walked: walkedN(), total: stops.length, done: !walking && walkEnd === \"done\" && stops.every(function (x) { return hidTested.has(x); }), untested: untested() }; },\n regions: function () { return regions()[0]; },\n cost: function (q) {\n if (q) {\n var e = document.querySelector(q);\n return e && stops.indexOf(e) >= 0 ? stops.indexOf(e) + 1 : null;\n }\n return goals().map(function (g) { return { name: g.name, presses: g.presses, how: g.how, selector: sel(g.el) }; });\n },\n version: VERSION,\n close: function () { close(); }\n};\nwindow.__tabTrail = api;\nx.addEventListener(\"click\", close);\naddEventListener(\"scroll\", onMoved, { capture: true, passive: true });\naddEventListener(\"resize\", onMoved);\nwatch.observe(document.documentElement, { subtree: true, childList: true, attributes: true, attributeFilter: [\"style\", \"class\", \"hidden\", \"tabindex\", \"disabled\", \"inert\", \"href\", \"role\", \"open\"] });\naddEventListener(\"keydown\", key, true);\naddEventListener(\"pointerdown\", interrupt, true);\naddEventListener(\"pointerdown\", tap, true);\naddEventListener(\"focusin\", focus, true);\naddEventListener(\"focusout\", lose, true);\nroot.addEventListener(\"focusin\", function () {\n if (root.activeElement === panel && panel.tabIndex < 0) return panel.blur();\n focus();\n});\nroot.addEventListener(\"focusout\", function () {\n setTimeout(function () {\n if (!panelIn || closed || inPanel()) return;\n var a = deep();\n if ((!a || a === document.body || a === document.documentElement) && Date.now() - tapT > 600) return play.focus({ focusVisible: true });\n panelIn = false;\n pRet = null;\n skipPanel();\n }, 0);\n});\n[\"pointerdown\", \"mousedown\", \"pointerup\", \"mouseup\", \"click\"].forEach(function (t) {\n dot.addEventListener(t, pick);\n dotPg.addEventListener(t, pick);\n});\nreview();\nfocus();\ndraw();\n";
|
|
4
|
+
export const FILE = "/*\n * Tab trail 1.1.0, https://matjazkorosec.com/tools/tab-trail\n *\n * MIT License\n *\n * Copyright (c) 2026 Matjaž Korošec\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n(function(){\n/* Tab trail 1.1.0. Copyright (c) 2026 Matjaž Korošec. MIT License, full text: https://github.com/matjazkorosec/tab-trail/blob/main/LICENSE */\nvar VERSION = \"1.1.0\";\nvar ID = \"tab-trail-host\";\nvar prev = [].filter.call(document.querySelectorAll(\"[id='\" + ID + \"']\"), function (e) { return typeof e.__close === \"function\"; })[0];\nif (prev) { prev.__close(); return; }\nvar NS = \"http://www.w3.org/2000/svg\";\nvar FOCUSABLE = \"a[href],area[href],button,input,select,textarea,iframe,summary,audio[controls],video[controls],[contenteditable]:not([contenteditable='false']),[tabindex]\";\nvar ROLES = /^(button|link|tab|menuitem|menuitemcheckbox|menuitemradio|checkbox|radio|switch|option|combobox|slider|treeitem)$/;\n\nfunction walk(root, out) {\n var kids = root.children;\n for (var i = 0; i < kids.length; i++) visit(kids[i], out);\n return out;\n}\nfunction visit(el, out) {\n if (el.id === ID && el === host && (!skip || skip.checked)) return;\n if (!(host && el.getRootNode() === host.shadowRoot && (!panel.contains(el) || (logList && logList.contains(el))))) out.push(el);\n if (el.shadowRoot) return walk(el.shadowRoot, out);\n if (el.tagName === \"SLOT\" && el.assignedElements) {\n var got = el.assignedElements({ flatten: true });\n if (got.length) {\n for (var i = 0; i < got.length; i++) visit(got[i], out);\n return;\n }\n }\n walk(el, out);\n}\nfunction shown(el) {\n if (el.checkVisibility) return el.checkVisibility({ visibilityProperty: true, opacityProperty: false });\n var s = getComputedStyle(el);\n return s.display !== \"none\" && s.visibility !== \"hidden\" && el.getClientRects().length > 0;\n}\nfunction tabbable(el) {\n if (!el.matches(FOCUSABLE)) return false;\n if (el.tabIndex < 0 || el.matches(\":disabled\") || el.closest(\"[inert]\")) return false;\n if (el.tagName === \"INPUT\" && el.type === \"hidden\") return false;\n if (el.tagName === \"SUMMARY\" && (!el.parentElement || el.parentElement.tagName !== \"DETAILS\" || el.parentElement.querySelector(\"summary\") !== el)) return false;\n return shown(el);\n}\n\nvar stops = [], stopSet = new Set(), upSet = new Set(), missed = [], forced = [], forcedBad = [], domAt = new Map();\nvar GROUP = \"[role=tablist],[role=menu],[role=menubar],[role=listbox],[role=radiogroup],[role=grid],[role=treegrid],[role=tree],[role=toolbar]\";\nvar ITEM = /^(tab|menuitem|menuitemcheckbox|menuitemradio|option|radio|gridcell|row|treeitem)$/;\nfunction nearTab(el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (stopSet.has(p)) return true;\n return upSet.has(el);\n}\nfunction roving(el) {\n var g = el.closest(GROUP);\n if (!g || (!ITEM.test(el.getAttribute(\"role\") || \"\") && !(el.hasAttribute(\"tabindex\") && el.tabIndex < 0))) return false;\n if (stopSet.has(g) || upSet.has(g)) return true;\n var id = g.id;\n return !!id && stops.some(function (s) { return (\" \" + (s.getAttribute(\"aria-controls\") || \"\") + \" \" + (s.getAttribute(\"aria-owns\") || \"\") + \" \").indexOf(\" \" + id + \" \") >= 0; });\n}\nfunction modal() {\n try {\n var l = document.querySelectorAll(\"dialog:modal\");\n return l.length ? l[l.length - 1] : null;\n } catch (e) { return null; }\n}\nfunction within(m, e) {\n for (var n = e; n; n = n.parentNode || n.host) if (n === m) return true;\n return false;\n}\nfunction scan() {\n var all = walk(document, []);\n var top = modal();\n if (top) all = all.filter(function (e) { return within(top, e); });\n var found = all.filter(tabbable);\n var groups = new Map();\n found = found.filter(function (el) {\n if (el.tagName !== \"INPUT\" || el.type !== \"radio\" || !el.name) return true;\n var own = el.form || el.getRootNode(), byName = groups.get(own) || {};\n groups.set(own, byName);\n var g = byName[el.name] || (byName[el.name] = found.filter(function (x) { return x.tagName === \"INPUT\" && x.type === \"radio\" && x.name === el.name && (x.form || x.getRootNode()) === own; }));\n var picked = g.filter(function (x) { return x.checked; })[0] || g[0];\n return picked === el;\n });\n forced = found.filter(function (el) { return el.tabIndex > 0 && !(host && el.getRootNode() === host.shadowRoot); });\n stops = ordered(document, found, null);\n domAt = new Map();\n forced.forEach(function (f) { domAt.set(f, forced.length > 30 ? found.indexOf(f) : ordered(document, found, f).indexOf(f)); });\n forcedBad = forced.filter(function (f) { return domAt.get(f) !== stops.indexOf(f); });\n stopSet = new Set(stops);\n upSet = new Set();\n stops.forEach(function (s) {\n for (var p = s.parentElement; p && !upSet.has(p); p = p.parentElement) upSet.add(p);\n });\n var ids = document.querySelectorAll(\"[id='\" + ID + \"']\"), only = !ids.length || (ids.length === 1 && ids[0] === host);\n var miss = all.filter(function (el) {\n if (stopSet.has(el) || (only ? el === host : el.closest(\"#\" + ID)) || (host && el.getRootNode() === host.shadowRoot)) return false;\n var t = el.tagName;\n if (t === \"HTML\" || t === \"BODY\" || t === \"LABEL\" || t === \"OPTION\" || t === \"OPTGROUP\") return false;\n var role = el.getAttribute(\"role\") || \"\";\n var looks = el.hasAttribute(\"onclick\") || ROLES.test(role);\n var s = getComputedStyle(el);\n if (s.pointerEvents === \"none\") return false;\n if (!looks) {\n if (s.cursor !== \"pointer\") return false;\n var ps = el.parentElement && getComputedStyle(el.parentElement);\n if (ps && ps.cursor === \"pointer\") return false;\n }\n if (el.closest(\"label\") || el.matches(\":disabled\") || el.closest(\"[inert]\") || el.closest(\"[aria-disabled='true']\")) return false;\n if (!shown(el)) return false;\n var r = el.getBoundingClientRect();\n if (r.width < 8 || r.height < 8) return false;\n return !nearTab(el) && !roving(el);\n });\n var missSet = new Set(miss);\n missed = miss.filter(function (el) {\n for (var p = el.parentElement; p; p = p.parentElement) if (missSet.has(p)) return false;\n return true;\n });\n hoverScan();\n}\nfunction ordered(scope, list, flat) {\n var units = [], groups = new Map(), out = [];\n list.forEach(function (el) {\n var h = el;\n while (h.getRootNode() !== scope && h.getRootNode().host) h = h.getRootNode().host;\n if (h === el) return units.push({ k: el === flat ? 0 : el.tabIndex, el: el });\n var g = groups.get(h);\n if (!g) {\n g = { k: h.hasAttribute(\"tabindex\") && h !== flat ? Math.max(h.tabIndex, 0) : 0, host: h, els: [] };\n groups.set(h, g);\n units.push(g);\n }\n g.els.push(el);\n });\n units.filter(function (u) { return u.k > 0; }).sort(function (a, b) { return a.k - b.k; }).concat(units.filter(function (u) { return u.k <= 0; })).forEach(function (u) {\n if (u.host) out = out.concat(ordered(u.host.shadowRoot, u.els, flat));\n else out.push(u.el);\n });\n return out;\n}\nvar hovers = [], hoverOk = [], hovRule = new Map(), hovSeen = new Set(), hovHid = new Map(), tabOpens = new WeakSet();\nfunction hoverTry(s) {\n var hit = false;\n hovers.forEach(function (h) {\n var e = hovHid.get(h);\n if (e && within(h, s) && !within(e, s) && !hiddenNow(e)) {\n tabOpens.add(h);\n hit = true;\n }\n });\n if (hit) rescan();\n}\nvar HOVER = \":hover\", FOC = \":focus-within|:focus-visible|:focus\";\nfunction parts(sel) {\n var out = [], depth = 0, start = 0;\n for (var i = 0; i < sel.length; i++) {\n var ch = sel.charAt(i);\n if (ch === \"(\") depth++;\n else if (ch === \")\") depth--;\n else if (ch === \",\" && !depth) { out.push(sel.slice(start, i).trim()); start = i + 1; }\n }\n out.push(sel.slice(start).trim());\n return out;\n}\nfunction bare(sel, re) {\n return sel.replace(new RegExp(\"(^|[\\\\s>+~(])(\" + re + \")\", \"g\"), \"$1*\").replace(new RegExp(re, \"g\"), \"\");\n}\nfunction reveals(st) {\n var d = st.getPropertyValue(\"display\"), v = st.getPropertyValue(\"visibility\"), o = st.getPropertyValue(\"opacity\"), mh = st.getPropertyValue(\"max-height\");\n return (d !== \"\" && d !== \"none\") || v === \"visible\" || (o !== \"\" && parseFloat(o) > 0) || (mh !== \"\" && mh !== \"0\" && mh !== \"0px\");\n}\nvar cssRules = 0, cssSheets = 0, cssBlocked = [];\nfunction nest(sel, up) {\n if (!up) return sel;\n return parts(sel).map(function (q) { return q.indexOf(\"&\") >= 0 ? q.split(\"&\").join(\":is(\" + up + \")\") : \":is(\" + up + \") \" + q; }).join(\", \");\n}\nfunction depth(p, k) {\n var d = 0;\n for (var i = 0; i < k; i++) {\n var ch = p.charAt(i);\n if (ch === \"\\\\\") i++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n }\n return d;\n}\nfunction compound(p, k) {\n var d = 0, i = k - 1;\n for (; i >= 0; i--) {\n var ch = p.charAt(i);\n if (i > 0 && p.charAt(i - 1) === \"\\\\\") {\n i--;\n continue;\n }\n if (ch === \")\") d++;\n else if (ch === \"(\") {\n if (!d) break;\n d--;\n } else if (!d && /[\\s>+~,]/.test(ch)) break;\n }\n var c = p.slice(i + 1, k).trim();\n return c ? bare(c, HOVER) : \"\";\n}\nfunction selfFocus(p) {\n var m = p.match(new RegExp(FOC)), k = m ? m.index + m[0].length : -1;\n if (k < 0 || depth(p, k)) return false;\n for (var d = 0; k < p.length; k++) {\n var ch = p.charAt(k);\n if (ch === \"\\\\\") k++;\n else if (ch === \"(\") d++;\n else if (ch === \")\") d--;\n else if (!d && /[\\s>+~]/.test(ch)) return false;\n }\n return true;\n}\nvar sheetMemo = new WeakMap();\nfunction readRules() {\n var hov = [], foc = [];\n cssRules = 0;\n cssSheets = 0;\n cssBlocked = [];\n function take(sel, src) {\n parts(sel).forEach(function (p) {\n if (/:focus/.test(p)) return foc.push([bare(p, FOC), selfFocus(p)]);\n var k = p.indexOf(HOVER), on;\n if (k < 0) return;\n if (depth(p, k)) on = compound(p, k);\n else {\n var pre = p.slice(0, k);\n if (!pre.trim() || /[\\s>+~]$/.test(pre)) return;\n on = bare(pre, HOVER);\n }\n if (on) hov.push([bare(p, HOVER), on, p, src]);\n });\n }\n function go(list, src, up) {\n for (var i = 0; i < list.length; i++) {\n var r = list[i], sel = up, st = null;\n if (r.selectorText !== undefined) {\n sel = nest(r.selectorText, up);\n st = r.style;\n } else if (up && r.style && !r.cssRules) st = r.style;\n if (st) {\n cssRules++;\n if (/:hover|:focus/.test(sel) && reveals(st)) take(sel, src);\n }\n if (r.cssRules && r.cssRules.length) go(r.cssRules, src, sel);\n }\n }\n var sheets = Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets || []);\n sheets.forEach(function (sh) {\n var list;\n try { list = sh.cssRules; } catch (e) { return cssBlocked.push(sh.href || \"a style sheet\"); }\n var memo = sheetMemo.get(sh);\n if (!memo || memo.list !== list || memo.n !== list.length || memo.node !== sh.ownerNode) {\n var h0 = hov, f0 = foc, c0 = cssRules;\n hov = [];\n foc = [];\n cssRules = 0;\n try { go(list, sh.href || (sh.ownerNode ? \"an inline <style> in the page\" : \"a style sheet added by script\"), \"\"); } catch (e) {\n hov = h0;\n foc = f0;\n cssRules = c0;\n return cssBlocked.push(sh.href || \"a style sheet\");\n }\n memo = { list: list, n: list.length, node: sh.ownerNode, hov: hov, foc: foc, rules: cssRules };\n sheetMemo.set(sh, memo);\n hov = h0;\n foc = f0;\n cssRules = c0;\n }\n hov = hov.concat(memo.hov);\n foc = foc.concat(memo.foc);\n cssRules += memo.rules;\n cssSheets++;\n });\n return [hov, foc];\n}\nfunction hiddenNow(e) {\n return !shown(e) || getComputedStyle(e).opacity === \"0\" || e.getBoundingClientRect().height < 1;\n}\nfunction hoverScan() {\n var rr = readRules(), foc = rr[1], found = [], seenH = new Set(), ok = [], top = modal();\n hovRule = new Map();\n hovSeen = new Set();\n rr[0].forEach(function (h) {\n var list;\n try { list = document.querySelectorAll(h[0]); } catch (e) { return; }\n for (var i = 0; i < list.length; i++) {\n var e = list[i], host = null;\n if (!hiddenNow(e) || (!e.matches(FOCUSABLE) && !e.querySelector(FOCUSABLE))) continue;\n try { host = e.parentElement && e.parentElement.closest(h[1]); } catch (x) {}\n if (!host || host === document.body || host === document.documentElement || seenH.has(host) || !shown(host) || (top && !within(top, host))) continue;\n if (host.matches(\"[aria-expanded],[aria-haspopup]\") || host.querySelector(\"[aria-expanded],[aria-haspopup]\")) {\n ok.push([host, \"toggle\"]);\n continue;\n }\n if (foc.some(function (f) { try { return (!f[1] || shown(e)) && e.matches(f[0]); } catch (x) { return false; } })) {\n ok.push([host, \"focus\"]);\n continue;\n }\n if (tabOpens.has(host)) {\n ok.push([host, \"tab\"]);\n continue;\n }\n found.push(host);\n seenH.add(host);\n hovHid.set(host, e);\n hovRule.set(host, [h[2], h[3]]);\n if (shown(e) && stops.some(function (s) { return e.contains(s); })) hovSeen.add(host);\n }\n });\n hovers = found;\n hoverOk = ok.filter(function (o) { return !seenH.has(o[0]); });\n}\nscan();\n\nvar host = document.createElement(\"div\");\nhost.id = ID;\nhost.style.cssText = \"all:initial;position:absolute;left:0;top:0;width:0;height:0;overflow:visible;z-index:2147483647;pointer-events:none;\";\nvar root = host.attachShadow({ mode: \"open\" });\nvar style = document.createElement(\"style\");\nstyle.textContent = [\n \":host{all:initial}\",\n \"svg{position:fixed;inset:0;width:100vw;height:100vh;overflow:visible}\",\n \"svg.pg{position:absolute;left:0;top:0;width:1px;height:1px;overflow:visible}\",\n \".p{position:fixed;bottom:66px;right:66px;width:350px;box-sizing:border-box;padding:6px;background:#e4dccd;color:#1a1612;border-radius:16px;box-shadow:0 1px 2px rgba(0,0,0,.12),0 14px 34px rgba(0,0,0,.26);font:14px/1.45 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;pointer-events:auto;cursor:grab;overflow-x:hidden;overflow-y:auto;max-height:calc(100vh - 90px);overscroll-behavior:contain}\",\n \".tb{display:flex;align-items:center;gap:4px;padding:0 0 5px 4px}\",\n \".t{margin:0;flex:1;white-space:nowrap;font:700 17px/1.2 Georgia,serif;letter-spacing:-.01em}\",\n \".cd{margin:4px 0 0;padding:7px 10px;background:#fbf8f3;border-radius:10px}\",\n \".tb+.cd{margin-top:0}\",\n \".p.rm{padding:10px}\",\n \".rm .tb{gap:6px;padding:4px 2px 8px 6px}\",\n \".rm .t{font-size:19px}\",\n \".rm .cd{margin-top:6px;padding:12px 14px}\",\n \".rm .tb+.cd{margin-top:0}\",\n \".rm .ta{height:32px;padding:0 12px 0 10px}\",\n \".rm .n{gap:7px;margin-top:12px}\",\n \".rm .n b{font-size:22px}\",\n \".rm .k{margin-top:7px}\",\n \".rm .x,.rm .b.cn{width:32px;height:32px}\",\n \".rm .sec{margin-top:6px}\",\n \".rm .sg{min-height:46px;padding:0 12px 0 8px}\",\n \".rm .ic{width:30px;height:30px;border-radius:8px}\",\n \".rm .so,.rm .lbd,.rm .la{padding:2px 14px 14px}\",\n \".rm .hw{margin:10px 6px 2px}\",\n \".rm .m{margin-top:8px;gap:6px}\",\n \".rm .c{padding:6px 10px}\",\n \".rm .pr{margin-top:12px}\",\n \".rm .pl{height:30px;padding:0 14px 0 11px}\",\n \".rm .b{width:30px;height:30px}\",\n \".rm .lf{margin-top:10px}\",\n \".rm .lt{padding:3px 9px}\",\n \".rm .ll{margin:10px -14px 0}\",\n \".rm .lx{padding:6px 14px}\",\n \".rm .lr.lb2{gap:6px;margin-top:12px}\",\n \".rm .kl,.rm .ka{height:38px;border-radius:8px}\",\n \".rm .lnt{height:38px;border-radius:8px}\",\n \".rm .lck,.rm .lw,.rm .sm,.rm .lr{margin-top:10px}\",\n \".rm .lrt{margin-top:0}\",\n \".rm .gp .k,.rm .lgp .k{margin-top:10px}\",\n \".rm .mn{margin-top:12px}\",\n \".rm .so>.k:first-child,.rm .lbd>:first-child,.rm .la>:first-child,.rm .cd>:first-child,.rm .cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>:first-child,.cd>div:first-child>:first-child{margin-top:0}\",\n \".cd>div:empty{display:none}\",\n \".ta{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 10px 0 8px;border:1.5px solid #1a1612;border-radius:999px;background:#fbf8f3;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer;flex:none}\",\n \".ta:hover{background:#fff}\",\n \".ta:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".n{display:flex;align-items:baseline;gap:6px;margin:5px 0 0}\",\n \".n b{font:700 20px/1 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif;letter-spacing:-.02em;font-variant-numeric:tabular-nums}\",\n \".k{display:flex;align-items:center;gap:10px;margin:4px 0 0;font-size:14px}\",\n \".d{width:16px;height:16px;border-radius:50%;background:#1a1612;box-shadow:0 0 0 2px #fff inset,0 0 0 1px #1a1612;flex:none}\",\n \".r{width:16px;height:12px;box-sizing:border-box;border:2px dashed #d0103a;border-radius:2px;background:rgba(208,16,58,.12);flex:none}\",\n \".x{width:28px;height:28px;flex:none;padding:0;border:0;border-radius:50%;background:transparent;color:#1a1612;cursor:pointer;display:grid;place-items:center}\",\n \".p svg{display:block;position:static;inset:auto;width:auto;height:auto;overflow:hidden;flex:none}\",\n \".x:hover{background:rgba(26,22,18,.08)}\",\n \".b.cn{width:28px;height:28px}\",\n \".sr{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}\",\n \".x:focus-visible,.a:focus-visible,.sg:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".sec{margin:4px 0 0;background:#fbf8f3;border-radius:10px}\",\n \".sg{all:unset;box-sizing:border-box;display:flex;align-items:center;gap:10px;width:100%;min-height:32px;padding:0 9px 0 5px;border-radius:10px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".sg:hover{background:#fff}\",\n \".ic{width:22px;height:22px;border-radius:6px;background:#efe8dc;display:grid;place-items:center;flex:none}\",\n \".sg[aria-expanded=true] .ic{background:#1a1612;color:#fbf8f3}\",\n \".warn .ic{background:rgba(208,16,58,.12);color:#d0103a}\",\n \".warn .sg[aria-expanded=true] .ic{background:#d0103a;color:#fff}\",\n \".bg{margin-left:auto;padding:2px 8px;border-radius:999px;background:#d0103a;color:#fff;font-weight:700;line-height:1.3}\",\n \".bg:empty{display:none}\",\n \".bg:not(:empty)+i{margin-left:12px}\",\n \".sg i{margin-left:auto;width:7px;height:7px;border-right:2px solid #1a1612;border-bottom:2px solid #1a1612;transform:translate(-3px,-2px) rotate(45deg)}\",\n \".sg[aria-expanded=true] i{transform:translate(-3px,2px) rotate(225deg)}\",\n \".so,.lbd,.la{padding:1px 10px 8px}\",\n \".lbd{overflow:hidden}\",\n \".so>.k:first-child,.lbd>:first-child,.la>:first-child{margin-top:0}\",\n \".so[hidden]{display:none}\",\n \".hw{margin:5px 4px 0;color:#5f564c;font-size:11px;line-height:1.3;font-weight:600}\",\n \".a{color:#5f564c;font-size:13px;font-weight:400;text-decoration:none;white-space:nowrap}\",\n \".vr{float:right;margin-left:8px;color:#5f564c;font-weight:400}\",\n \".hw+.hw{margin-top:4px}\",\n \".mn{margin:6px 0 0;color:#1e3a8a}\",\n \".a:hover{color:#9a3412;text-decoration:underline}\",\n \".p.g{cursor:grabbing;user-select:none}\",\n \".n b.e{color:#d0103a}\",\n \".n b.ok{color:#1f7a3f}\",\n \"button.lq{all:unset;cursor:pointer;color:#1e3a8a;font-weight:700}.cg{color:#5f564c}.pk{color:#c2410c}\",\n \".bar{display:flex;gap:2px;height:24px;margin:6px 0 2px}.bar button{border:0;padding:0;min-width:6px;border-radius:4px;cursor:pointer}.bar button:focus-visible{outline:2px solid #1a1612;outline-offset:2px}.bl{display:flex;flex-wrap:wrap;gap:4px 12px;font-size:13px;margin:4px 0 8px}.bl em{width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:5px}\",\n \".s{cursor:pointer}\",\n \"svg.in{z-index:1}\",\n \"g.o{pointer-events:auto;cursor:pointer;-webkit-user-select:none;user-select:none}\",\n \".s input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".s.off{opacity:.45;cursor:default}\",\n \".s.off input{cursor:default}\",\n \".s input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".h{width:16px;height:16px;border-radius:50%;background:#fff;border:2px dashed #1a1612;box-sizing:border-box;flex:none}\",\n \".m{list-style:none;margin:5px 0 0;padding:2px;display:flex;flex-wrap:wrap;gap:4px}\",\n \".c{all:unset;font:inherit;font-size:14px;line-height:1;cursor:pointer;padding:4px 8px;border:1px dashed #d0103a;border-radius:999px;background:rgba(208,16,58,.06);color:#1a1612}\",\n \".c:hover{background:rgba(208,16,58,.14)}\",\n \".c[aria-pressed=true]{border-style:solid;background:#d0103a;color:#fff}\",\n \".c:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".gp[hidden]{display:none}\",\n \".gp .k,.lgp .k{margin:6px 0 0}\",\n \".w{display:flex;align-items:center;gap:8px;margin:0;font-size:14px}\",\n \".w span{flex:1;font-variant-numeric:tabular-nums}\",\n \".b{all:unset;box-sizing:border-box;width:28px;height:28px;border:1.5px solid #1a1612;border-radius:50%;display:grid;place-items:center;cursor:pointer;color:#1a1612;flex:none}\",\n \".b:hover{background:rgba(26,22,18,.08)}\",\n \".b:disabled{opacity:.3;cursor:default;background:none}\",\n \".b:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".pr{display:flex;align-items:center;gap:10px;margin:6px 0 0;font-size:14px;color:#5f564c}\",\n \".pr+.pr{margin-top:8px}\",\n \".pr .lo{display:inline-flex;align-items:center;height:30px;color:#1a1612}\",\n \".sm{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".sm[hidden]{display:none}\",\n \".sm .g{color:#1f7a3f;font-weight:600}\",\n \".sm .e{color:#d0103a;font-weight:700}\",\n \".sm .q{color:#5f564c;font-weight:400}\",\n \".m .mo{align-self:center;color:#5f564c;font-size:14px}\",\n \".pl{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;gap:7px;height:28px;padding:0 13px 0 10px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer;flex:none}\",\n \".pl:hover{background:#3a332c}\",\n \".pl:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".ls{font-weight:400;color:#5f564c}\",\n \".lv{color:#d0103a;font-weight:700}\",\n \".lbd[hidden],.la[hidden],.lm[hidden]{display:none}\",\n \".lf{display:grid;grid-template-columns:1fr 1fr;gap:2px;margin:6px 0 0;padding:3px;background:#efe8dc;border-radius:10px}\",\n \".lt{all:unset;box-sizing:border-box;text-align:center;padding:2px 9px;border-radius:7px;color:#5f564c;font-weight:600;font-size:14px;line-height:1.3;cursor:pointer}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".ll{list-style:none;margin:6px -10px 0;padding:0;cursor:auto}\",\n \".lx{padding:3px 10px}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".lx .tm{margin-right:8px;font:500 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".lx .st{font:700 14px/1.4 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}\",\n \".lx .bd{display:block}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{all:unset;box-sizing:border-box;display:inline-block;min-width:22px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;font-size:14px;line-height:1.4;text-align:center;cursor:pointer}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\",\n \".lr{display:flex;flex-wrap:wrap;gap:8px;margin:6px 0 0}\",\n \".lrt{margin:0}\",\n \".lr.lb2{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:8px}\",\n \".kl,.ka{all:unset;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:7px;height:30px;border-radius:7px;font-weight:700;font-size:14px;white-space:nowrap;cursor:pointer}\",\n \".kl{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover{background:#efe8dc}\",\n \".ka{background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".kl:focus-visible,.ka:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lnt{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:7px;width:100%;height:30px;border:1.5px dashed #1a1612;border-radius:7px;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lnt:hover{border-style:solid;background:#fff}\",\n \".lnt:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lk{all:unset;box-sizing:border-box;padding:5px 13px;border-radius:999px;background:#1a1612;color:#f7f3ec;font-weight:700;font-size:14px;cursor:pointer}\",\n \".lk:hover{background:#3a332c}\",\n \".lo{all:unset;box-sizing:border-box;padding:4px 12px;border:1.5px solid #1a1612;border-radius:999px;font-weight:600;font-size:14px;cursor:pointer}\",\n \".lo:hover{background:rgba(26,22,18,.08)}\",\n \".lt:focus-visible,.lc:focus-visible,.lk:focus-visible,.lo:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".la p,.lm{margin:8px 0 0}\",\n \".lck{margin:6px 0 0;font-size:14px;line-height:1.45}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:flex;align-items:center;gap:8px;margin:6px 0 0;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0 2px 0 1px;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lm{color:#d0103a}\"\n].join(\"\");\ntry {\n var sheet = new CSSStyleSheet();\n sheet.replaceSync(style.textContent);\n root.adoptedStyleSheets = [sheet];\n} catch (e) {\n root.appendChild(style);\n}\nvar spot = document.createElementNS(NS, \"svg\");\nroot.appendChild(spot);\nvar underPg = document.createElementNS(NS, \"svg\");\nunderPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(underPg);\nvar svgPg = document.createElementNS(NS, \"svg\");\nsvgPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(svgPg);\nvar under = document.createElementNS(NS, \"svg\");\nroot.appendChild(under);\nvar svg = document.createElementNS(NS, \"svg\");\nroot.appendChild(svg);\nvar dotPg = document.createElementNS(NS, \"svg\");\ndotPg.setAttribute(\"class\", \"pg\");\nroot.appendChild(dotPg);\nvar dot = document.createElementNS(NS, \"svg\");\nroot.appendChild(dot);\n[spot, underPg, svgPg, under, svg, dotPg, dot].forEach(function (g) { g.setAttribute(\"aria-hidden\", \"true\"); });\n\nvar panel = document.createElement(\"div\");\npanel.className = \"p\";\npanel.setAttribute(\"role\", \"dialog\");\npanel.setAttribute(\"aria-label\", \"Tab trail\");\nfunction line(cls, bold, text, mark) {\n var p = document.createElement(\"p\");\n p.className = cls;\n if (mark) { var m = document.createElement(\"span\"); m.className = mark; p.appendChild(m); }\n if (bold !== null) { var b = document.createElement(\"b\"); b.textContent = bold; p.appendChild(b); }\n p.appendChild(document.createTextNode(text));\n panel.appendChild(p);\n return p;\n}\nvar x = document.createElement(\"button\");\nx.className = \"x\";\nx.type = \"button\";\nx.setAttribute(\"aria-label\", \"Close Tab trail\");\nfunction icon(parent, w, d, sw) {\n var g = el(\"svg\", { width: w, height: w, viewBox: \"0 0 16 16\", fill: \"none\", stroke: \"currentColor\", \"stroke-width\": sw, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\", \"aria-hidden\": \"true\" }, parent);\n el(\"path\", { d: d }, g);\n return g;\n}\nicon(x, 16, \"M3 3l10 10M13 3L3 13\", 2);\nvar bar = document.createElement(\"div\");\nbar.className = \"tb\";\npanel.appendChild(bar);\nvar corner = document.createElement(\"button\");\ncorner.className = \"b cn\";\ncorner.type = \"button\";\ncorner.setAttribute(\"aria-label\", \"Move to the next corner\");\ncorner.title = \"Move to the next corner\";\nvar cg = icon(corner, 16, \"M5 11.5V5h6.5M9.5 3.2L11.5 5 9.5 6.8\", 1.6);\nel(\"rect\", { x: 2, y: 2, width: 12, height: 12, rx: 2 }, cg);\nel(\"rect\", { x: 9.5, y: 9.5, width: 2, height: 2, fill: \"currentColor\" }, cg);\ncorner.addEventListener(\"click\", function () {\n var r = panel.getBoundingClientRect(), W = innerWidth, H = innerHeight;\n var mx = Math.max(8, Math.min(66, (W - r.width) / 2)) + \"px\", my = Math.max(8, Math.min(66, (H - r.height) / 2)) + \"px\";\n var right = r.left + r.width / 2 > W / 2, low = r.top + r.height / 2 > H / 2;\n var k = !low && !right ? 1 : !low && right ? 2 : low && right ? 3 : 0;\n for (var i = 0; i < 4; i++) {\n var toRight = k === 1 || k === 2, toLow = k === 2 || k === 3;\n panel.style.left = toRight ? \"auto\" : mx;\n panel.style.right = toRight ? mx : \"auto\";\n panel.style.top = toLow ? \"auto\" : my;\n panel.style.bottom = toLow ? my : \"auto\";\n var n = panel.getBoundingClientRect();\n if (Math.abs(n.left - r.left) > 2 || Math.abs(n.top - r.top) > 2) break;\n k = (k + 1) % 4;\n }\n});\nvar say = document.createElement(\"p\");\nsay.className = \"sr\";\nsay.setAttribute(\"role\", \"status\");\nsay.setAttribute(\"aria-live\", \"polite\");\npanel.appendChild(say);\nvar sayList = [], sayT = 0;\nfunction announce(t) {\n sayList.push(t);\n if (sayT) return;\n sayT = setTimeout(function () {\n sayT = 0;\n if (closed) return;\n var text = sayList.join(\" \");\n sayList = [];\n say.textContent = \"\";\n setTimeout(function () { say.textContent = text; }, 50);\n }, 1000);\n}\nbar.appendChild(line(\"t\", null, \"Tab trail\"));\nvar playCard = document.createElement(\"div\");\nplayCard.className = \"cd\";\npanel.appendChild(playCard);\nvar playRow = document.createElement(\"p\");\nplayRow.className = \"pr\";\nvar play = document.createElement(\"button\");\nplay.className = \"pl\";\nplay.type = \"button\";\nvar playIcon = document.createElement(\"span\");\nplay.appendChild(playIcon);\nvar playWord = document.createTextNode(\"Play\");\nplay.appendChild(playWord);\nplay.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\nvar playText = document.createElement(\"span\");\nplayText.textContent = \"Visits every stop for you\";\nplayRow.appendChild(play);\nplayRow.appendChild(playText);\nplayCard.appendChild(playRow);\nvar AI_ICON = \"M3.5 5.5h9v8h-9zM8 5.5V3.2M8 1.9v.1M6 8.6v1.1M10 8.6v1.1M6.3 11.6h3.4M1.8 8.5v2.6M14.2 8.5v2.6\", COPY_ICON = \"M10.5 5.5V3a.5.5 0 0 0-.5-.5H3a.5.5 0 0 0-.5.5v7a.5.5 0 0 0 .5.5h2.5M5.5 5.5h8v8h-8z\";\nvar aiBtn = document.createElement(\"button\");\naiBtn.className = \"ta\";\naiBtn.type = \"button\";\nicon(aiBtn, 15, AI_ICON, 1.6);\naiBtn.appendChild(document.createTextNode(\"Copy for AI\"));\naiBtn.addEventListener(\"click\", function () { copyIt(aiBtn, window, aiText(), \"Copy for AI\"); });\nbar.appendChild(aiBtn);\nbar.appendChild(corner);\nbar.appendChild(x);\nvar sumLine = document.createElement(\"p\");\nsumLine.className = \"sm\";\nsumLine.hidden = true;\nplayCard.appendChild(sumLine);\nvar resCard = document.createElement(\"div\");\nresCard.className = \"cd\";\npanel.appendChild(resCard);\nvar info = document.createElement(\"div\");\nresCard.appendChild(info);\nvar shownEl = null, chips = [], drawn = [], panelIn = false, pRet = null;\nvar KIND = { img: \"Image\", picture: \"Image\", svg: \"Icon\", i: \"Icon\", video: \"Video\", a: \"Link\", li: \"List item\", tr: \"Table row\", td: \"Table cell\" };\nvar BARE = { button: \"Button\", textarea: \"Field\", select: \"Dropdown\", iframe: \"Frame\" };\nfunction kind(m, tag) {\n if (tag === \"input\") return m.type === \"checkbox\" ? \"Checkbox\" : m.type === \"radio\" ? \"Radio\" : /^(submit|button|reset|image)$/.test(m.type) ? \"Button\" : \"Field\";\n return KIND[tag] || BARE[tag] || \"Clickable box\";\n}\nfunction named(m) {\n var by = m.getAttribute(\"aria-labelledby\"), r = m.getRootNode(), t = \"\";\n if (by && r.getElementById) t = by.split(/\\s+/).map(function (id) { var x = r.getElementById(id); return x ? x.textContent : \"\"; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"aria-label\") || \"\";\n if (!t.trim() && m.labels && m.labels.length) t = [].map.call(m.labels, function (l) { return l.innerText || l.textContent; }).join(\" \");\n if (!t.trim()) t = m.getAttribute(\"placeholder\") || \"\";\n if (!t.trim() && m.tagName === \"INPUT\" && /^(submit|button|reset)$/.test(m.type)) t = m.value;\n if (!t.trim()) t = m.innerText || \"\";\n if (!t.trim()) t = m.getAttribute(\"title\") || \"\";\n return t;\n}\nvar EMAIL = /[\\w.+-]+@[\\w-]+(\\.[\\w-]+)+/g, DIGITS = /\\d(?:[\\s-]?\\d){5,}/g, TOKEN = /[A-Za-z0-9_%=+-]{16,}/g;\nvar SECRET = /\\b(?:(?:sk|pk|rk)_(?:live|test)_\\w+|gh[pousr]_\\w{20,}|github_pat_\\w+|AKIA[0-9A-Z]{16}|xox[abprs]-[\\w-]+|eyJ[\\w-]+\\.[\\w-]+\\.[\\w-]*)/g, SAID = /\\b((?:password|passwd|pwd|passcode|pin|secret|api[ _-]?key|token)\\s*[:=]\\s*)\\S+/gi;\nfunction tokens(t) { return t.replace(SECRET, \"[token]\").replace(TOKEN, function (w) { return /\\d/.test(w) ? \"[token]\" : w; }); }\nfunction scrub(t) { return tokens(String(t).replace(SAID, \"$1[token]\")).replace(EMAIL, \"[email]\").replace(DIGITS, \"[number]\"); }\nfunction secretish(t) { return scrub(t) !== t; }\nfunction cleanUrl(u) {\n u = String(u).split(/[?#]/)[0].replace(/^([a-z][\\w+.-]*:\\/\\/)[^@\\/]*@/i, \"$1\");\n if (/^(javascript|data|blob):/i.test(u)) return u.split(\":\")[0] + \":\";\n return scrub(u);\n}\nfunction label(m) {\n var tag = m.tagName.toLowerCase();\n var inner = m.querySelector(\"img[alt],[aria-label],title\");\n var alt = (m.getAttribute(\"alt\") || (inner && (inner.getAttribute(\"alt\") || inner.getAttribute(\"aria-label\") || inner.textContent)) || \"\").trim();\n var t = scrub(named(m)).trim().replace(/\\s+/g, \" \");\n alt = scrub(alt);\n if (!t && alt) t = (KIND[tag] ? KIND[tag] + \": \" : \"\") + alt.replace(/\\s+/g, \" \");\n if (!t) t = kind(m, tag);\n return t.length > 28 ? t.slice(0, 27) + \"...\" : t;\n}\nfunction count(n, text, bad, good, parent) {\n var p = document.createElement(\"p\");\n p.className = \"n\";\n var b = document.createElement(\"b\");\n b.textContent = String(n);\n if (bad) b.className = \"e\";\n else if (good) b.className = \"ok\";\n p.appendChild(b);\n p.appendChild(document.createTextNode(text));\n (parent || info).appendChild(p);\n}\nvar CHIPS = 50;\nfunction chipUl(parent, list, text, go) {\n var ul = document.createElement(\"ul\"), out = [];\n ul.className = \"m\";\n list.slice(0, CHIPS).forEach(function (m) {\n var li = document.createElement(\"li\");\n var c = document.createElement(\"button\");\n c.className = \"c\";\n c.type = \"button\";\n c.textContent = text(m);\n c.addEventListener(\"click\", function () { go(m, c); });\n out.push(c);\n li.appendChild(c);\n ul.appendChild(li);\n });\n if (list.length > CHIPS) {\n var mo = document.createElement(\"li\");\n mo.className = \"mo\";\n mo.textContent = \"and \" + (list.length - CHIPS).toLocaleString(\"en-US\") + \" more\";\n ul.appendChild(mo);\n }\n parent.appendChild(ul);\n return out;\n}\nfunction fill() {\n var had = chips.indexOf(root.activeElement);\n while (info.firstChild) info.removeChild(info.firstChild);\n chips = [];\n drawn = sig();\n count(stops.length, stops.length === 1 ? \" stop for the Tab key\" : \" stops for the Tab key\");\n count(missed.length, missed.length === 0 ? \" clickable things Tab skips\" : missed.length === 1 ? \" looks clickable, but Tab skips it\" : \" look clickable, but Tab skips them\", missed.length > 0, missed.length === 0);\n if (missed.indexOf(shownEl) < 0 && hovers.indexOf(shownEl) < 0 && forcedBad.indexOf(shownEl) < 0) shownEl = null;\n if (missed.length) chipList(missed);\n if (hovers.length) {\n count(hovers.length, hovers.length === 1 ? \" menu or box opens only on mouse hover\" : \" menus or boxes open only on mouse hover\", true);\n chipList(hovers);\n }\n if (forcedBad.length) {\n count(forcedBad.length, forcedBad.length === 1 ? \" stop has tabindex above 0, which pulls it ahead of the page\" : \" stops have tabindex above 0, which pulls them ahead of the page\", true);\n chipList(forcedBad, true);\n }\n costDraw();\n mapDraw();\n if (skip) skipPanel();\n if (had >= 0 && chips.length) chips[Math.min(had, chips.length - 1)].focus();\n}\nfunction sig() { return [stops.length, mapOn && mapOn.checked && JSON.stringify(regions()[0]), costOn && costOn.checked && goals().map(function (g) { return g.presses + g.name; }).join()].concat(missed, [\"|\"], hovers, [\"|\"], forced, [\"|\"], forcedBad); }\nfunction chipList(list, num) {\n var made = chipUl(info, list, function (m) { return (num && stops.indexOf(m) >= 0 ? stops.indexOf(m) + 1 + \": \" : \"\") + label(m); }, function (m, c) {\n shownEl = m;\n chips.forEach(function (x) { x.setAttribute(\"aria-pressed\", x === c ? \"true\" : \"false\"); });\n m.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n queue();\n });\n made.forEach(function (c, i) { c.setAttribute(\"aria-pressed\", list[i] === shownEl ? \"true\" : \"false\"); });\n chips = chips.concat(made);\n}\nfill();\nvar PAGE = 50, win = 0, seen = -1;\nvar pager = document.createElement(\"p\");\npager.className = \"w\";\nvar pageText = document.createElement(\"span\");\npager.appendChild(pageText);\nfunction pageBtn(text, step) {\n var b = document.createElement(\"button\");\n b.className = \"b\";\n b.type = \"button\";\n b.setAttribute(\"aria-label\", text);\n icon(b, 14, step < 0 ? \"M10 3L5 8l5 5\" : \"M6 3l5 5-5 5\", 2);\n b.addEventListener(\"mousedown\", function (e) { e.preventDefault(); });\n b.addEventListener(\"click\", function () {\n win = Math.min(Math.max(win + step, 0), Math.ceil(stops.length / PAGE) - 1);\n queue();\n });\n pager.appendChild(b);\n return b;\n}\nvar prevBtn = pageBtn(\"Previous\", -1), nextBtn = pageBtn(\"Next\", 1);\nvar group = document.createElement(\"div\");\ngroup.className = \"cd gp\";\ngroup.appendChild(pager);\nvar costBox = document.createElement(\"div\");\nresCard.appendChild(costBox);\nvar mapBox = document.createElement(\"div\");\nresCard.appendChild(mapBox);\nvar jumpBox = document.createElement(\"div\");\nresCard.appendChild(jumpBox);\npanel.appendChild(group);\nvar jumps = [], pressed = 0, before = -1, popMissed = null, lost = false;\nvar POP = /cookie|consent|gdpr|modal|popup/i;\nfunction dimmed() {\n var W = innerWidth, H = innerHeight;\n return Array.prototype.some.call(document.querySelectorAll(\"body *\"), function (e) {\n if (e.id === ID) return false;\n var cs = getComputedStyle(e);\n if (cs.position !== \"fixed\" || cs.display === \"none\" || cs.visibility === \"hidden\") return false;\n var r = e.getBoundingClientRect();\n if (r.width < W * 0.9 || r.height < H * 0.9) return false;\n var m = cs.backgroundColor.match(/rgba?\\(([^)]+)\\)/);\n var al = m ? m[1].split(\",\")[3] : null;\n return (al !== undefined && al !== null && +al > 0 && +al < 1) || cs.backdropFilter !== \"none\" && cs.backdropFilter !== \"\";\n });\n}\nfunction blocking(p) {\n if (p.matches(\"dialog\") && p.matches(\":modal\")) return true;\n if (p.getAttribute(\"aria-modal\") === \"true\") return true;\n var r = p.getBoundingClientRect();\n if (r.width * r.height >= innerWidth * innerHeight * 0.5) return true;\n return dimmed();\n}\nfunction popupOf(el) {\n for (var p = el; p && p !== document.documentElement; p = p.parentElement || (p.getRootNode().host || null)) {\n if (p.nodeType !== 1) continue;\n if (p.matches(\"dialog[open],[role=dialog],[role=alertdialog],[aria-modal=true]\")) return p;\n var c = typeof p.className === \"string\" ? p.className : \"\";\n if (POP.test(p.id + \" \" + c) && getComputedStyle(p).position === \"fixed\") return p;\n }\n return null;\n}\nvar covered = [], trapped = [], probHid = new Map();\nfunction pinOf(e) {\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") return n;\n }\n return null;\n}\nfunction hideInfo(s) {\n var r = s.getBoundingClientRect();\n if (r.width < 1 || r.height < 1) return { why: \"has no size\" };\n var m = modal();\n if (m && !within(m, s)) return { why: \"is under an open modal\" };\n if (popupOf(s)) return { why: \"is inside a popup\" };\n var pts = [[r.left + r.width / 2, r.top + r.height / 2], [r.left + 1, r.top + 1], [r.right - 1, r.top + 1], [r.left + 1, r.bottom - 1], [r.right - 1, r.bottom - 1]];\n var tested = 0, under = 0, pin = null;\n for (var i = 0; i < pts.length; i++) {\n var px = pts[i][0], py = pts[i][1];\n if (px < 0 || py < 0 || px >= innerWidth || py >= innerHeight) continue;\n tested++;\n var hit = null, list = document.elementsFromPoint(px, py);\n for (var k = 0; k < list.length; k++) if (list[k] !== host && !host.contains(list[k])) { hit = list[k]; break; }\n if (!hit || within(s, hit) || within(hit, s)) continue;\n var p = pinOf(hit);\n if (!p || within(p, s)) continue;\n under++;\n if (!pin) pin = p;\n }\n if (!tested) return { why: \"is off screen\" };\n return { tested: tested, under: under, pin: pin };\n}\nfunction pinText(p) {\n return desc(p) + \" (\" + getComputedStyle(p).position + \", \" + Math.round(p.getBoundingClientRect().height) + \" px tall)\";\n}\nvar moved = [], movedE = null;\nfunction movedLine() {\n if (movedE) {\n var i = logs.indexOf(movedE);\n if (i >= 0) logs.splice(i, 1);\n if (movedE.li && movedE.li.parentNode) movedE.li.parentNode.removeChild(movedE.li);\n movedE = null;\n }\n moved = moved.filter(function (x) { return x.isConnected; });\n if (!moved.length) {\n if (logList) logSummary();\n return;\n }\n var nums = moved.map(function (x) { return stops.indexOf(x) + 1; }).filter(function (n) { return n > 0; }).sort(function (a, b) { return a - b; });\n var list = nums.length ? \": \" + nums.slice(0, 20).join(\", \") + (nums.length > 20 ? \" and \" + (nums.length - 20) + \" more\" : \"\") : \"\";\n log(\"SKIPPED\", \"Hidden focus\", [pl(moved.length, \"stop\", \"stops\") + \" not tested, Tab moved on before the page stopped scrolling\" + list + \". Press Play to test them.\"]);\n movedE = logs[logs.length - 1];\n}\nfunction tested(s) {\n var i = moved.indexOf(s);\n if (i < 0) return;\n moved.splice(i, 1);\n movedLine();\n}\nfunction where(s) {\n var r = s.getBoundingClientRect();\n return scrollX + \",\" + scrollY + \",\" + r.left + \",\" + r.top;\n}\nvar restSig = new WeakMap(), noRing = [], probRing = new Map(), SIG = [\"outline-style\", \"outline-width\", \"outline-color\", \"box-shadow\", \"background-color\", \"background-image\", \"color\", \"text-decoration-line\", \"text-decoration-color\", \"opacity\", \"transform\", \"filter\"];\nfunction upOf(e) { return e && (e.parentElement || (e.parentNode && e.parentNode.host)); }\nfunction focusSig(e) {\n var out = [], up = upOf(e);\n [[e], [e, \"::before\"], [e, \"::after\"], [up], [upOf(up)], [e.nextElementSibling], [e.firstElementChild], [e.labels && e.labels[0]]].forEach(function (x) {\n if (!x[0]) return;\n var c = getComputedStyle(x[0], x[1] || null), o = c.outlineStyle !== \"none\" && c.outlineWidth !== \"0px\";\n SIG.forEach(function (k) { if (o || k.indexOf(\"outline\") < 0) out.push(c.getPropertyValue(k)); });\n [\"top\", \"right\", \"bottom\", \"left\"].forEach(function (d) {\n var w = c.getPropertyValue(\"border-\" + d + \"-width\");\n out.push(w, w === \"0px\" ? \"\" : c.getPropertyValue(\"border-\" + d + \"-color\"));\n });\n });\n return out.join(\"|\");\n}\nfunction rest(e) {\n if (!e) return;\n if (e.matches(\":hover\")) restSig.delete(e);\n else restSig.set(e, focusSig(e));\n}\nvar noOutline = null;\nfunction outlineRule(e) {\n if (!noOutline) {\n noOutline = [];\n var go = function (list, src) {\n for (var i = 0; i < list.length; i++) {\n var r = list[i], st = r.style;\n if (r.cssRules && r.cssRules.length) go(r.cssRules, src);\n if (r.selectorText && st && (st.outlineStyle === \"none\" || /^0(px)?$/.test(st.outlineWidth))) parts(r.selectorText).forEach(function (p) { noOutline.push([p, src, p.replace(/:focus(-visible)?(?![\\w-])/g, \"\").trim() || \"*\"]); });\n }\n };\n Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets || []).forEach(function (sh) {\n try { go(sh.cssRules, sh.href || (sh.ownerNode ? \"an inline <style> in the page\" : \"a style sheet added by script\")); } catch (x) {}\n });\n }\n for (var i = 0; i < noOutline.length; i++) {\n try { if (e.matches(noOutline[i][2])) return noOutline[i]; } catch (x) {}\n }\n return null;\n}\nvar ghosts = [], ghostOf = new Map(), probGhost = new Map(), GHOST = { off: \"is off screen\", size: \"has no size\", inv: \"is invisible\", aria: \"is inside aria-hidden\" };\nfunction unseen(e) {\n var r = e.getBoundingClientRect();\n if (r.width < 1 || r.height < 1) return \"size\";\n if (r.right <= 0 || r.left >= innerWidth || r.bottom <= 0 || r.top >= innerHeight) return \"off\";\n if (getComputedStyle(e).visibility === \"hidden\") return \"inv\";\n for (var n = e; n; n = upOf(n)) if (getComputedStyle(n).opacity === \"0\") return \"inv\";\n return \"\";\n}\nfunction ghostWhy(e) {\n var why = unseen(e), lb = (e.labels && e.labels[0]) || (e.tagName === \"INPUT\" && e.nextElementSibling);\n if (why && why !== \"off\" && lb && !unseen(lb)) why = \"\";\n for (var n = e; n && !why; n = upOf(n)) if (n.getAttribute(\"aria-hidden\") === \"true\") why = \"aria\";\n return why;\n}\nfunction ghostCheck(s) {\n if (hovers.some(function (h) { return hovSeen.has(h) && within(hovHid.get(h), s); })) return true;\n var why = ghostWhy(s), was = ghosts.indexOf(s) >= 0;\n if (!why) {\n if (!was) log(\"OK\", \"Ghost stop\", [ref(s), \" is visible when Tab is on it.\"]);\n else {\n ghosts.splice(ghosts.indexOf(s), 1);\n ghostOf.delete(s);\n probGhost.get(s).fixed = true;\n probGhost.delete(s);\n renderJumps();\n queue();\n log(\"OK\", \"Ghost stop\", [ref(s), \" shows now when Tab is on it.\"]);\n }\n return false;\n }\n if (was) return true;\n ghosts.push(s);\n ghostOf.set(s, why);\n renderJumps();\n queue();\n announce(\"Ghost stop: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", \" + GHOST[why] + \".\");\n var aria = why === \"aria\";\n log(\"PROBLEM\", \"Ghost stop\", [ref(s), \" \" + GHOST[why] + \" when Tab is on it.\"], aiOf(aria ? W_NAME : W_VIS, aria ? \"An element Tab can reach is not hidden from screen readers.\" : \"The element shows on screen while it has keyboard focus.\", aria ? \"Remove aria-hidden, or add inert or tabindex=\\\"-1\\\" so Tab skips it too.\" : \"Hide it with display: none or inert while it is closed, or show it when it gets focus.\", [[\"Element\", s, null, true]]), aria ? \"4.1.2 A\" : null);\n probGhost.set(s, logs[logs.length - 1]);\n return true;\n}\nvar skipBad = null, noSkip = 0, skipSaid = null, probSkip = null, SKIPW = /(^|[^a-z\\u010d\\u0161\\u017e])(skip|jump|main|content|presko\\u010di|vsebina)(?![a-z\\u010d\\u0161\\u017e])/i;\nfunction mainRegion() { return [].filter.call(document.querySelectorAll(\"main,[role=main]\"), shown)[0] || null; }\nfunction tucked(e) {\n var r = e.getBoundingClientRect();\n return (r.width < 2 && r.height < 2) || r.bottom + scrollY <= 0 || r.right + scrollX <= 0;\n}\nfunction skipLink() {\n for (var i = 0; i < 3 && i < stops.length; i++) {\n var e = stops[i], h = e.getAttribute(\"href\") || \"\";\n if (e.tagName === \"A\" && h.charAt(0) === \"#\" && h.length > 1 && (SKIPW.test(label(e)) || (e !== deep() && tucked(e)))) return e;\n }\n return null;\n}\nfunction ahead(m) { return stops.filter(function (x) { return !within(m, x) && m.compareDocumentPosition(x) & 2; }).length; }\nfunction skipCheck() {\n var l = skipLink(), m = mainRegion(), why = \"\", n = 0, id = \"\", t = null;\n if (l) {\n id = l.getAttribute(\"href\").slice(1);\n try { id = decodeURIComponent(id); } catch (x) {}\n t = document.getElementById(id) || document.getElementsByName(id)[0];\n if (!t) why = \"#\" + id + \" is missing\";\n else if (!shown(t)) why = \"#\" + id + \" is hidden\";\n else if (!stops.some(function (x) { return x === t || within(t, x) || t.compareDocumentPosition(x) & 4; })) why = \"nothing after #\" + id + \" takes focus\";\n } else if (m) {\n n = ahead(m);\n if (n < 15) n = 0;\n }\n var key = [l, why, n, !!m].join(\"|\");\n if (key === skipSaid) return;\n skipSaid = key;\n if (probSkip) probSkip.fixed = true;\n probSkip = null;\n skipBad = l && why ? { link: l, why: why, to: t } : null;\n noSkip = n;\n renderJumps();\n queue();\n if (skipBad) log(\"PROBLEM\", \"Broken skip link\", [ref(l), \" goes nowhere: \" + why + \".\"], aiOf(W_BYPASS, \"The skip link moves focus past the header to the main content.\", t ? \"Make #\" + id + \" visible, and put the main content after it.\" : \"Give the main content id=\\\"\" + id + \"\\\", or point the link at the id it has.\", [[\"Element\", l], [\"Main content\", m]]));\n else if (n) log(\"PROBLEM\", \"Broken skip link\", [n + \" stops before the main content, and no skip link.\"], aiOf(W_BYPASS, \"A skip link as the first stop moves focus past the header to the main content.\", \"Add <a href=\\\"#main\\\">Skip to content</a> as the first link, and id=\\\"main\\\" on <main>.\", [[\"Main content\", m]]));\n else if (l) return log(\"OK\", \"Broken skip link\", [ref(l), \" goes to #\" + id + \".\"]);\n else if (m) return log(\"OK\", \"Broken skip link\", [pl(ahead(m), \"stop comes\", \"stops come\") + \" before the main content, so a skip link is not needed.\"]);\n else return log(\"INFO\", \"Broken skip link\", [\"No main region, so the skip link check has nothing to aim at.\"]);\n probSkip = logs[logs.length - 1];\n}\nfunction live(m) { return stops.indexOf(m) >= 0; }\nfunction runs(list) {\n var out = [];\n byStop(list).forEach(function (e) {\n var g = out[out.length - 1];\n if (g && stops.indexOf(g[g.length - 1]) === stops.indexOf(e) - 1 && ghostOf.get(g[0]) === ghostOf.get(e)) g.push(e);\n else out.push([e]);\n });\n return out;\n}\nfunction span(g) {\n var a = stops.indexOf(g[0]) + 1, b = stops.indexOf(g[g.length - 1]) + 1;\n return a === b ? String(a) : a + \" to \" + b;\n}\nfunction ringCheck(s) {\n var was = noRing.indexOf(s) >= 0, before = restSig.get(s);\n if (!before) return log(\"SKIPPED\", \"No focus style\", [ref(s), \" has no style from before focus yet, or the mouse was on it. Judged on the next visit.\"]);\n if (before !== focusSig(s)) {\n if (!was) return log(\"OK\", \"No focus style\", [ref(s), \" changes when Tab is on it.\"]);\n noRing.splice(noRing.indexOf(s), 1);\n probRing.get(s).fixed = true;\n probRing.delete(s);\n renderJumps();\n queue();\n return log(\"OK\", \"No focus style\", [ref(s), \" shows focus now.\"]);\n }\n if (was) return;\n noRing.push(s);\n renderJumps();\n queue();\n announce(\"No focus style: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", shows no focus.\");\n var rule = outlineRule(s);\n log(\"PROBLEM\", \"No focus style\", [ref(s), \" shows nothing when Tab is on it.\"], aiOf(W_VIS, \"The element shows a visible change when it has keyboard focus.\", \"Add :focus-visible { outline: 2px solid; outline-offset: 2px } for it\" + (rule ? \", or remove outline: none from \" + scrub(rule[0]) : \"\") + \".\", [[\"Element\", s, null, true]], rule ? [\"CSS rule: \" + scrub(rule[0]), \"Style sheet: \" + cleanUrl(rule[1])] : []));\n probRing.set(s, logs[logs.length - 1]);\n}\nfunction check(s, then) {\n function end() {\n var f = then;\n then = null;\n if (f) f();\n }\n if (!s) return end();\n var was = covered.indexOf(s) >= 0;\n var at = where(s), still = 0, tries = 0, late = 0;\n function look() {\n if (closed || (covered.indexOf(s) >= 0) !== was) return end();\n var now = where(s);\n if (now !== at) {\n if (stops[current] !== s) {\n if (was) return end();\n if (moved.indexOf(s) < 0) {\n moved.push(s);\n movedLine();\n }\n return end();\n }\n at = now;\n still = 0;\n } else still++;\n if (still < 2 && ++tries < 90) return requestAnimationFrame(look);\n var on = deep() === s;\n if (on && !late && ghostWhy(s)) {\n late = 1;\n return setTimeout(function () {\n if (closed) return end();\n if (deep() !== s) {\n log(\"SKIPPED\", \"Ghost stop\", [ref(s), \" lost focus before it could be judged.\"]);\n return end();\n }\n still = 0;\n look();\n }, 400);\n }\n nameOne(s);\n if (on && !ghostCheck(s)) ringCheck(s);\n tested(s);\n hidTested.add(s);\n if (ghosts.indexOf(s) >= 0) return end();\n var h = hideInfo(s);\n if (!h.tested) {\n log(\"SKIPPED\", \"Hidden focus\", [ref(s), \" \" + h.why + \". Not tested.\"]);\n return end();\n }\n if (was && h.under >= h.tested) {\n log(\"INFO\", \"Hidden focus\", [ref(s), \" is already listed as hidden.\"]);\n return end();\n }\n if (was) {\n covered.splice(covered.indexOf(s), 1);\n var pe = probHid.get(s);\n if (pe) pe.fixed = true;\n probHid.delete(s);\n renderJumps();\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is not hidden anymore: it is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is not hidden anymore, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n if (h.under < h.tested) {\n end();\n return log(\"OK\", \"Hidden focus\", h.under ? [ref(s), \" is partly covered by \" + pinText(h.pin) + \", \" + (h.tested - h.under) + \" of \" + h.tested + \" points clear. That passes AA 2.4.11; AAA 2.4.12 needs it fully visible.\"] : [ref(s), \" is in view, \" + h.tested + \" of \" + h.tested + \" points clear.\"]);\n }\n covered.push(s);\n renderJumps();\n announce(\"Hidden focus: stop \" + (stops.indexOf(s) + 1) + \", \" + label(s) + \", is covered.\");\n var pr = h.pin.getBoundingClientRect(), up = pr.top + pr.height / 2 < innerHeight / 2, ph = Math.round(pr.height);\n log(\"PROBLEM\", \"Hidden focus\", [ref(s), \": all \" + h.tested + \" points are under \" + pinText(h.pin) + \".\"], aiOf(W_HIDE, \"When the element gets keyboard focus, at least part of it stays visible, not covered by \" + desc(h.pin) + \".\", \"Add html { scroll-padding-\" + (up ? \"top\" : \"bottom\") + \": \" + (ph + 8) + \"px; } so the browser scrolls focused elements clear of the \" + (up ? \"top\" : \"bottom\") + \" bar (\" + ph + \" px tall, plus 8 px of room).\", [[\"Element\", s], [\"Covered by\", h.pin]], [\"Measured: \" + desc(h.pin) + \" is \" + getComputedStyle(h.pin).position + \", \" + ph + \" px tall, at the \" + (up ? \"top\" : \"bottom\") + \" of a \" + innerHeight + \" px tall window.\"]));\n probHid.set(s, logs[logs.length - 1]);\n end();\n }\n requestAnimationFrame(look);\n}\nvar popInfo = null, lostPops = [], openPop = null, opener = null, lastOut = null, tapIn = null, tapT = 0, lastKey = \"\", keyT = 0, keyOn = null;\nfunction deep() {\n var a = document.activeElement;\n while (a && a.shadowRoot && a.shadowRoot.activeElement) a = a.shadowRoot.activeElement;\n return a;\n}\nfunction gone(p) { return !p.isConnected || !shown(p) || (p.matches(\"dialog\") && !p.open); }\nfunction closedBy(p) {\n var now = Date.now();\n if (tapIn && now - tapT < 600 && within(p, tapIn)) {\n var b = tapIn.closest ? tapIn.closest(\"button,a,[role=button]\") : null;\n return b ? \" with \\\"\" + label(b) + \"\\\"\" : \" with a click\";\n }\n if (keyT && now - keyT < 600) {\n if (lastKey === \"Escape\") return \" with Escape\";\n if (lastKey === \"Enter\" || lastKey === \" \") return \" with \" + (lastKey === \" \" ? \"Space\" : \"Enter\") + (keyOn && keyOn.nodeType === 1 && keyOn !== document.body && keyOn !== document.documentElement ? \" on \\\"\" + label(keyOn) + \"\\\"\" : \"\");\n }\n return \"\";\n}\nfunction popClosed() {\n var p = openPop, from = opener, pn = popName(p), by = closedBy(p), pi = popInfo;\n if (by === \" with Escape\") exitOk(p);\n openPop = null;\n if (!from) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". It opened on its own, so there is no button to go back to.\"]);\n if (!from.isConnected || !shown(from)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". The button that opened it is gone or hidden.\"]);\n if (lostPops.some(function (l) { return l[0] === from; })) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed\" + by + \". Already listed.\"]);\n if (tapIn && Date.now() - tapT < 600 && !within(p, tapIn)) return log(\"SKIPPED\", \"Lost focus\", [pn, \" closed by a click outside it. Not judged.\"]);\n var frames = 0;\n function look() {\n if (closed) return;\n var a = deep();\n if (a && a !== document.body && a !== document.documentElement && !within(p, a) && shown(a)) {\n if (a === from) return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went back to \", ref(from), \".\"]);\n return log(\"OK\", \"Lost focus\", [pn, \" closed\" + by + \". Focus went to \", ref(a), \", not to the button that opened it, \", ref(from), \".\"]);\n }\n if (++frames < 30) return requestAnimationFrame(look);\n if (lostPops.some(function (l) { return l[0] === from; })) return;\n lostPops.push([from, p]);\n renderJumps();\n announce(\"Lost focus: \" + pn.l + \" closed and focus fell to the page body.\");\n log(\"PROBLEM\", \"Lost focus\", [pn, \" closed\" + by + \". Focus fell to the page body instead of going back to \", ref(from), \".\"], aiOf(W_ORDER, \"When the popup closes, focus goes back to the element that opened it, so a keyboard user carries on from there.\", \"Before the popup opens, store document.activeElement. After it closes, call .focus() on that element. A <dialog> opened with showModal() and closed with close() does this by itself, so if this one is a <dialog>, look for code that calls blur() or .focus() on something else after it closes.\", [[\"Popup\", p, pi], [\"Opened by\", from]]));\n }\n requestAnimationFrame(look);\n}\nfunction track(a) {\n if (openPop && gone(openPop)) popClosed();\n if (!a || a === document.body || a === document.documentElement || a === host || a.getRootNode() === root) return;\n var p = popupOf(a);\n if (!p) {\n lastOut = a;\n openPop = null;\n } else if (!openPop) {\n openPop = p;\n opener = lastOut;\n popInfo = { sel: sel(p), html: snip(p) };\n if (isModal(p) && !natives.has(p)) {\n natives.add(p);\n log(\"INFO\", \"No way out\", [popName(p), \": Native dialog: Escape closes it in the browser. Check by hand that the page does not block it.\"]);\n }\n }\n}\nvar natives = new WeakSet(), noExit = [], okPops = [], CLOSE = /(^|[^a-z\\u010d\\u0161\\u017e])(close|cancel|dismiss|no thanks|not now|skip|x|\\u00d7|\\u2715|\\u2716|zapri|prekli\\u010di|ne hvala)(?![a-z\\u010d\\u0161\\u017e])/i;\nfunction isModal(p) {\n try { return p.matches(\"dialog:modal\"); } catch (x) { return false; }\n}\nfunction popKey(p) { return popName(p).l + \"|\" + sel(p); }\nfunction exitOk(p) {\n var k = popKey(p);\n noExit = noExit.filter(function (x) {\n if (x[2] !== k) return true;\n x[3].fixed = true;\n return false;\n });\n renderJumps();\n}\nvar nameOf = new WeakMap(), nameless = [], probName = new Map(), sameSaid = {}, ROLE = { A: \"link\", BUTTON: \"button\", SELECT: \"combobox\", TEXTAREA: \"textbox\", IFRAME: \"frame\", SUMMARY: \"button\" };\nfunction accName(e) {\n var t = named(e) || (/^(INPUT|AREA)$/.test(e.tagName) && (e.alt || (/^(submit|reset)$/.test(e.type) && e.type))) || \"\";\n if (!t.trim()) [].some.call(e.querySelectorAll(\"img[alt],[aria-label],svg title\"), function (i) { return (t = i.getAttribute(\"alt\") || i.getAttribute(\"aria-label\") || i.textContent || \"\").trim(); });\n return scrub(t).replace(/\\s+/g, \" \").trim();\n}\nfunction roleOf(e) { return e.getAttribute(\"role\") || ROLE[e.tagName] || (e.tagName === \"INPUT\" ? (/^(checkbox|radio)$/.test(e.type) ? e.type : /^(submit|button|reset|image)$/.test(e.type) ? \"button\" : \"textbox\") : e.tagName.toLowerCase()); }\nfunction nameOne(s) {\n var n = accName(s), was = nameless.indexOf(s) >= 0;\n nameOf.set(s, n);\n if (n && was) {\n nameless.splice(nameless.indexOf(s), 1);\n probName.get(s).fixed = true;\n probName.delete(s);\n renderJumps();\n log(\"OK\", \"Nameless stop\", [ref(s), \" has a name now.\"]);\n }\n if (n || was || s.shadowRoot || /^(AUDIO|VIDEO|OBJECT|EMBED)$/.test(s.tagName)) return n;\n nameless.push(s);\n log(\"PROBLEM\", \"Nameless stop\", [ref(s), \" has no name, so a screen reader reads only \\\"\" + roleOf(s) + \"\\\".\"], aiOf(W_NAME, \"Every Tab stop has a name that says what it does.\", \"Add visible text, an aria-label, or alt text on its image.\", [[\"Element\", s, null, true]]));\n probName.set(s, logs[logs.length - 1]);\n return n;\n}\nfunction nameCheck() {\n var by = {};\n stops.forEach(function (s) {\n var n = nameOne(s);\n if (s.tagName === \"A\" && n) (by[n] = by[n] || {})[s.getAttribute(\"href\")] = 1;\n });\n Object.keys(by).forEach(function (n) {\n var k = Object.keys(by[n]).length;\n if (k > 2 && !sameSaid[n]) log(\"INFO\", \"Nameless stop\", [k + \" links share the name \" + n + \". That passes 2.4.4 when the text around each one tells them apart.\"]);\n sameSaid[n] = sameSaid[n] || k > 2;\n });\n renderJumps();\n}\nfunction closer(p, ps) {\n return ps.filter(function (x) { return CLOSE.test(accName(x)) || /close|dismiss/i.test(x.id + \" \" + x.getAttribute(\"class\")) || (x.matches(\"button:not([type]),[type=submit]\") && x.closest(\"form[method=dialog]\")); })[0] || null;\n}\nfunction loopCheck(p, from, to, d) {\n var ps = stops.filter(function (x) { return within(p, x); }), n = ps.length;\n var k = popKey(p), c = closer(p, ps), had = noExit.some(function (x) { return x[2] === k; });\n if (n < 2 || isModal(p) || ps[d > 0 ? n - 1 : 0] !== from || ps[d > 0 ? 0 : n - 1] !== to || (had && !c)) return;\n if (c) {\n if (had) exitOk(p);\n if (okPops.indexOf(k) < 0) log(\"OK\", \"No way out\", [popName(p), \": Tab loops inside it, and \", ref(c), \" closes it.\"]);\n okPops.push(k);\n return;\n }\n announce(\"No way out: \" + popName(p).l + \" has no close control Tab reaches.\");\n log(\"PROBLEM\", \"No way out\", [popName(p), \": Tab loops through \" + n + \" stops, and none of them closes it.\"], aiOf(W_TRAP, \"A keyboard user can close the popup with a button Tab reaches.\", \"Add a Close button inside it, or let Escape close it.\", [[\"Popup\", p]]));\n noExit.push([p, n, k, logs[logs.length - 1]]);\n renderJumps();\n}\nfunction tap(e) {\n if (picking) return;\n tapIn = e.composedPath ? e.composedPath()[0] : e.target;\n tapT = Date.now();\n}\nfunction stopGo(e) {\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n current = stops.indexOf(e);\n queue();\n}\nfunction stopName(e) {\n var i = stops.indexOf(e);\n return (i >= 0 ? i + 1 : \"?\") + \": \" + label(e);\n}\nfunction byStop(list) { return list.slice().sort(function (a, b) { return stops.indexOf(a) - stops.indexOf(b); }); }\nfunction renderJumps() {\n while (jumpBox.firstChild) jumpBox.removeChild(jumpBox.firstChild);\n if (macNote) {\n var mn = document.createElement(\"p\");\n mn.className = \"mn\";\n mn.textContent = MAC_NOTE;\n jumpBox.appendChild(mn);\n }\n if (popMissed) {\n count(1, \" popup blocks the page, but Tab goes somewhere else first\", true, false, jumpBox);\n chipUl(jumpBox, [popMissed], function () { return \"Show the popup\"; }, function (m) { m.scrollIntoView({ block: \"center\", behavior: \"smooth\" }); });\n }\n if (covered.length) {\n count(covered.length, covered.length === 1 ? \" stop is hidden when Tab reaches it\" : \" stops are hidden when Tab reaches them\", true, false, jumpBox);\n chipUl(jumpBox, byStop(covered), stopName, stopGo);\n }\n var gl = ghosts.filter(live), nl = noRing.filter(live);\n if (skipBad) {\n count(1, \" skip link goes nowhere\", true, false, jumpBox);\n chipUl(jumpBox, [skipBad.link], function (l) { return stopName(l) + \" \\u2192 \" + skipBad.why; }, stopGo);\n }\n if (noExit.length) {\n count(noExit.length, noExit.length === 1 ? \" popup has no keyboard way out\" : \" popups have no keyboard way out\", true, false, jumpBox);\n chipUl(jumpBox, noExit, function (x) { return popName(x[0]).l + \": Tab loops 1 to \" + x[1]; }, function (x) { stopGo(stops.filter(function (y) { return within(x[0], y); })[0] || x[0]); });\n }\n var ml = nameless.filter(live);\n if (ml.length) {\n count(ml.length, ml.length === 1 ? \" stop has no name for screen readers\" : \" stops have no name for screen readers\", true, false, jumpBox);\n chipUl(jumpBox, byStop(ml), stopName, stopGo);\n }\n if (noSkip) count(noSkip, \" stops before the main content, and no skip link\", true, false, jumpBox);\n if (gl.length) {\n count(gl.length, gl.length === 1 ? \" stop you can't see when Tab is on it\" : \" stops you can't see when Tab is on them\", true, false, jumpBox);\n chipUl(jumpBox, runs(gl), function (g) { return span(g) + \": \" + label(g[0]) + \", \" + GHOST[ghostOf.get(g[0])].replace(/^(is|has) (inside )?/, \"\"); }, function (g) { stopGo(g[0]); });\n }\n if (nl.length) {\n count(nl.length, nl.length === 1 ? \" stop shows no focus when Tab is on it\" : \" stops show no focus when Tab is on them\", true, false, jumpBox);\n chipUl(jumpBox, byStop(nl), stopName, stopGo);\n }\n if (trapped.length) {\n count(trapped.length, trapped.length === 1 ? \" stop where Tab gets stuck\" : \" stops where Tab gets stuck\", true, false, jumpBox);\n chipUl(jumpBox, byStop(trapped), stopName, stopGo);\n }\n if (lostPops.length) {\n count(lostPops.length, lostPops.length === 1 ? \" popup loses focus when it closes\" : \" popups lose focus when they close\", true, false, jumpBox);\n chipUl(jumpBox, lostPops, function (l) {\n var i = stops.indexOf(l[0]);\n return (i >= 0 ? i + 1 : label(l[0])) + \" \\u2192 Start\";\n }, function (l) { stopGo(l[0]); });\n }\n if (jumps.length) {\n count(jumps.length, jumps.length === 1 ? \" time Tab jumped out of order\" : \" times Tab jumped out of order\", true, false, jumpBox);\n chipUl(jumpBox, jumps, function (j) {\n var from = j[0] ? stops.indexOf(j[0]) + 1 || label(j[0]) : \"Start\", to = stops.indexOf(j[1]) + 1;\n return from + \" \\u2192 \" + (to || \"?\");\n }, function (j) { stopGo(j[1]); });\n }\n if (skip) skipPanel();\n}\nvar legend = document.createElement(\"div\");\nlegend.className = \"so\";\nlegend.hidden = true;\nlegend.appendChild(line(\"k\", null, \"The order Tab visits\", \"d\"));\nlegend.appendChild(line(\"k\", null, \"Hidden until Tab reaches it\", \"h\"));\nlegend.appendChild(line(\"k\", null, \"Tab can't reach or see it\", \"r\"));\nvar tray = document.createElement(\"div\");\ntray.className = \"tr\";\npanel.appendChild(tray);\nvar gear = document.createElement(\"button\");\ngear.className = \"sg\";\ngear.type = \"button\";\ngear.setAttribute(\"aria-expanded\", \"false\");\nvar gearIcon = icon(gear, 16, \"M8 1.5v2M8 12.5v2M1.5 8h2M12.5 8h2M3.4 3.4l1.4 1.4M11.2 11.2l1.4 1.4M3.4 12.6l1.4-1.4M11.2 4.8l1.4-1.4\", 1.6);\nel(\"circle\", { cx: 8, cy: 8, r: 2.2 }, gearIcon);\ngear.appendChild(document.createTextNode(\"Settings\"));\ngear.appendChild(document.createElement(\"i\"));\ntray.appendChild(gear);\nvar settings = document.createElement(\"div\");\nsettings.className = \"so\";\nsettings.hidden = true;\ntray.appendChild(settings);\ngear.addEventListener(\"click\", function () {\n settings.hidden = !settings.hidden;\n gear.setAttribute(\"aria-expanded\", settings.hidden ? \"false\" : \"true\");\n});\nvar skipBox = document.createElement(\"label\");\nskipBox.className = \"k s\";\nvar skip = document.createElement(\"input\");\nskip.type = \"checkbox\";\nskip.checked = true;\nskipBox.appendChild(skip);\nskipBox.appendChild(document.createTextNode(\"Leave this panel out of Tab\"));\nsettings.appendChild(skipBox);\nvar tightBox = document.createElement(\"label\");\ntightBox.className = \"k s\";\nvar tight = document.createElement(\"input\");\ntight.type = \"checkbox\";\ntight.checked = true;\ntightBox.appendChild(tight);\ntightBox.appendChild(document.createTextNode(\"Compact view\"));\nsettings.appendChild(tightBox);\ntight.addEventListener(\"change\", function () { panel.classList.toggle(\"rm\", !tight.checked); });\nvar chunkBox = document.createElement(\"label\");\nchunkBox.className = \"k s\";\nvar chunk = document.createElement(\"input\");\nchunk.type = \"checkbox\";\nchunk.checked = true;\nchunkBox.appendChild(chunk);\nchunkBox.appendChild(document.createTextNode(\"Show \" + PAGE + \" stops at a time\"));\ngroup.appendChild(chunkBox);\nvar shortBox = document.createElement(\"label\");\nshortBox.className = \"k s\";\nvar stub = document.createElement(\"input\");\nstub.type = \"checkbox\";\nstub.checked = true;\nshortBox.appendChild(stub);\nshortBox.appendChild(document.createTextNode(\"Long lines\"));\nsettings.insertBefore(shortBox, skipBox);\nvar lineBox = document.createElement(\"label\");\nlineBox.className = \"k s\";\nvar lines = document.createElement(\"input\");\nlines.type = \"checkbox\";\nlines.checked = true;\nlineBox.appendChild(lines);\nlineBox.appendChild(document.createTextNode(\"Show lines\"));\nsettings.insertBefore(lineBox, shortBox);\nlines.addEventListener(\"change\", function () {\n stub.disabled = !lines.checked;\n shortBox.classList.toggle(\"off\", !lines.checked);\n queue();\n});\nstub.addEventListener(\"change\", function () { queue(); });\nvar spotBox = document.createElement(\"label\");\nspotBox.className = \"k s\";\nvar light = document.createElement(\"input\");\nlight.type = \"checkbox\";\nspotBox.appendChild(light);\nspotBox.appendChild(document.createTextNode(\"Spotlight\"));\nsettings.insertBefore(spotBox, settings.firstChild);\nlight.addEventListener(\"change\", function () { queue(); });\nvar mapLabel = document.createElement(\"label\");\nmapLabel.className = \"k s\";\nvar mapOn = document.createElement(\"input\");\nmapOn.type = \"checkbox\";\nmapLabel.appendChild(mapOn);\nmapLabel.appendChild(document.createTextNode(\"Region map\"));\nsettings.insertBefore(mapLabel, spotBox.nextSibling);\nvar costLabel = document.createElement(\"label\");\ncostLabel.className = \"k s\";\nvar costOn = document.createElement(\"input\");\ncostOn.type = \"checkbox\";\ncostLabel.appendChild(costOn);\ncostLabel.appendChild(document.createTextNode(\"Tab cost\"));\nsettings.insertBefore(costLabel, mapLabel);\ncostOn.addEventListener(\"change\", function () {\n if (!costOn.checked) endPick();\n costDraw();\n queue();\n});\nvar picked = null, picking = false, pickAt = null, costGoals = [], PICKS = [\"pointermove\", \"pointerdown\", \"mousedown\", \"pointerup\", \"mouseup\", \"click\", \"auxclick\", \"dblclick\", \"contextmenu\"], GOALW = /(^|[^a-z\\u010d\\u0161\\u017e])(add to cart|buy|checkout|book|reserve|subscribe|sign up|register|download|contact|get started|donate|v ko\\u0161arico|kupi|naro\\u010di|rezerviraj|prijava|naro\\u010di se|prenesi|kontakt)(?![a-z\\u010d\\u0161\\u017e])/i;\nfunction mainStop() {\n var m = mainRegion();\n return m ? stops.filter(function (x) { return within(m, x); })[0] || null : null;\n}\nfunction goals() {\n var out = [], m = mainRegion(), found = 0;\n function add(e, name, how) {\n if (e && !out.some(function (g) { return g.el === e || (name && g.name.toLowerCase() === name.toLowerCase()); })) out.push({ name: name, presses: stops.indexOf(e) + 1, how: how, el: e });\n }\n [].forEach.call(document.querySelectorAll(\"[data-tab-trail-goal]\"), function (x) {\n found = 1;\n add(stops.indexOf(x) >= 0 ? x : stops.filter(function (y) { return within(x, y); })[0], x.getAttribute(\"data-tab-trail-goal\"), \"set in the page\");\n });\n add(mainStop(), \"the main content\", \"always\");\n stops.forEach(function (e) {\n if (!GOALW.test(accName(e))) return;\n found = 1;\n add(e, label(e), \"found by its words\");\n });\n stops.forEach(function (e) {\n if (!e.form || !e.form.querySelector(\"input[type=email]\") || !e.matches(\"button:not([type]),[type=submit]\")) return;\n found = 1;\n add(e, label(e), \"form with an e-mail field\");\n });\n if (!found && m) add(stops.filter(function (x) { return x.tagName === \"BUTTON\" && within(m, x); }).sort(function (a, b) { var p = a.getBoundingClientRect(), q = b.getBoundingClientRect(); return q.width * q.height - p.width * p.height; })[0], \"\", \"guessed\");\n out.forEach(function (g) { if (!g.name) g.name = label(g.el); });\n var mg = out.filter(function (g) { return g.how === \"always\"; })[0], rest = out.filter(function (g) { return g !== mg; });\n out = out.filter(function (g) { return g === mg || rest.indexOf(g) < (mg ? 2 : 3); });\n if (picked && stops.indexOf(picked) >= 0) {\n out = out.filter(function (g) { return g.el !== picked; });\n out.unshift({ name: label(picked), presses: stops.indexOf(picked) + 1, how: \"picked by you\", el: picked });\n }\n return out;\n}\nfunction para(parent, cls, text) {\n var p = document.createElement(\"p\");\n p.className = cls;\n p.textContent = text || \"\";\n parent.appendChild(p);\n return p;\n}\nfunction costDraw() {\n if (!costOn) return;\n while (costBox.firstChild) costBox.removeChild(costBox.firstChild);\n costGoals = costOn.checked ? goals() : [];\n if (!costOn.checked) return;\n para(costBox, \"\", \"\").appendChild(document.createElement(\"b\")).textContent = \"Tab presses to reach\";\n costGoals.forEach(function (g) {\n var p = para(costBox, \"n\", \"\");\n p.appendChild(document.createElement(\"b\")).textContent = String(g.presses);\n p.appendChild(document.createTextNode(\" \" + g.name + \" \"));\n p.appendChild(document.createElement(\"span\")).textContent = \"\\u00b7 \" + g.how;\n p.lastChild.className = \"cg\";\n if (g.el === picked) lbtn(\"lq\", \" Remove\", p).addEventListener(\"click\", function () {\n picked = null;\n costDraw();\n queue();\n costBox.querySelector(\"p:last-child button\").focus();\n });\n });\n var ms = mainStop();\n if (ms && !skipLink() && stops.indexOf(ms) >= 10) para(costBox, \"cg\", \"A skip link would make the main content 1.\");\n var pl2 = para(costBox, picking ? \"pk\" : \"\", picking ? \"Click the goal on the page. Escape cancels. \" : \"\");\n lbtn(\"lq\", picking ? \"Cancel\" : \"Pick a goal\", pl2).addEventListener(\"click\", function () {\n if (picking) endPick();\n else {\n picking = true;\n PICKS.forEach(function (t) { addEventListener(t, pickEv, true); });\n }\n costDraw();\n costBox.querySelector(\"p:last-child button\").focus();\n });\n skipPanel();\n}\nfunction endPick() {\n picking = false;\n pickAt = null;\n PICKS.forEach(function (t) { removeEventListener(t, pickEv, true); });\n costDraw();\n queue();\n}\nfunction pickEv(e) {\n var t = e.composedPath ? e.composedPath()[0] : e.target, s = null;\n if (!picking || within(host, t)) return;\n e.preventDefault();\n e.stopPropagation();\n for (var n = t; n && !s; n = upOf(n)) if (stops.indexOf(n) >= 0) s = n;\n if (e.type === \"pointermove\") {\n if (s !== pickAt) {\n pickAt = s;\n queue();\n }\n } else if (e.type === \"click\" && s) {\n picked = s;\n endPick();\n }\n}\nmapOn.addEventListener(\"change\", function () {\n tint = null;\n mapDraw();\n queue();\n});\nvar REG = [\"header\", \"nav\", \"main\", \"aside\", \"footer\", \"other\"], REGC = [\"#c2410c\", \"#9a3412\", \"#1f7a3f\", \"#5f564c\", \"#1e3a8a\", \"#7d756b\"], LAND = { HEADER: \"header\", BANNER: \"header\", NAV: \"nav\", NAVIGATION: \"nav\", MAIN: \"main\", ASIDE: \"aside\", COMPLEMENTARY: \"aside\", FOOTER: \"footer\", CONTENTINFO: \"footer\" }, tint = null;\nfunction regionOf(e) {\n for (var n = upOf(e); n && n.nodeType === 1; n = upOf(n)) {\n var ro = n.getAttribute(\"role\"), r = ro ? LAND[ro.split(\" \")[0].toUpperCase()] : LAND[n.tagName];\n if (r && !ro && /^(HEADER|FOOTER)$/.test(n.tagName) && n.parentElement && n.parentElement.closest(\"article,aside,main,nav,section,[role=article],[role=complementary],[role=main],[role=navigation],[role=region]\")) r = null;\n if (r) return [r, n];\n }\n return [\"other\", e];\n}\nfunction regions() {\n var out = { header: 0, nav: 0, main: 0, aside: 0, footer: 0, other: 0 }, els = {};\n stops.forEach(function (x) {\n var r = regionOf(x);\n out[r[0]]++;\n (els[r[0]] = els[r[0]] || []).indexOf(r[1]) < 0 && els[r[0]].push(r[1]);\n });\n return [out, els];\n}\nfunction mapDraw() {\n if (!mapOn) return;\n while (mapBox.firstChild) mapBox.removeChild(mapBox.firstChild);\n if (!mapOn.checked) return;\n var r = regions(), bar = document.createElement(\"div\"), bl = document.createElement(\"div\");\n count(stops.length, \" stops, by region\", false, false, mapBox);\n bar.className = \"bar\";\n bl.className = \"bl\";\n REG.forEach(function (k, i) {\n var n = r[0][k], name = k.charAt(0).toUpperCase() + k.slice(1);\n if (!n) return;\n var b = document.createElement(\"button\"), sp = document.createElement(\"span\"), em = document.createElement(\"em\");\n b.type = \"button\";\n b.style.cssText = \"flex:\" + n + \";background:\" + REGC[i];\n b.setAttribute(\"aria-label\", name + \" \" + n);\n b.addEventListener(\"click\", function () {\n tint = [r[1][k], REGC[i]];\n r[1][k][0].scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n queue();\n });\n bar.appendChild(b);\n em.style.background = REGC[i];\n sp.appendChild(em);\n sp.appendChild(document.createTextNode(name + \" \" + n));\n bl.appendChild(sp);\n });\n mapBox.appendChild(bar);\n mapBox.appendChild(bl);\n skipPanel();\n}\nchunk.addEventListener(\"change\", function () { queue(); });\nfunction paged() { return chunk.checked && stops.length > PAGE; }\nfunction outT() { return skip.checked && !panelIn ? -1 : 0; }\nfunction skipPanel() {\n panel.tabIndex = outT();\n panel.querySelectorAll(\"button,a,input\").forEach(function (e) { e.tabIndex = e.className === \"lc\" ? (panelIn ? 0 : -1) : outT(); });\n}\nskip.addEventListener(\"change\", function () {\n skipPanel();\n svg.classList.toggle(\"in\", !skip.checked);\n svgPg.classList.toggle(\"in\", !skip.checked);\n dot.classList.toggle(\"in\", !skip.checked);\n dotPg.classList.toggle(\"in\", !skip.checked);\n rescan();\n});\nvar a = document.createElement(\"a\");\na.className = \"a\";\na.href = \"https://matjazkorosec.com/tools/tab-trail\";\na.target = \"_blank\";\na.rel = \"noopener\";\na.textContent = \"matjazkorosec.com/tools/tab-trail\";\nvar how = document.createElement(\"p\");\nhow.className = \"hw\";\nvar MAC = /Mac/.test(navigator.platform || navigator.userAgent);\nvar KEYS = \"Ctrl+Shift+F\";\nvar ver = document.createElement(\"span\");\nver.className = \"vr\";\nver.textContent = \"v\" + VERSION;\nhow.appendChild(ver);\nhow.appendChild(document.createTextNode(\"How to use & latest version: \"));\nhow.appendChild(a);\nvar keysBtn = document.createElement(\"button\");\nkeysBtn.className = \"sg\";\nkeysBtn.type = \"button\";\nkeysBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(keysBtn, 16, \"M1.5 4.5h13v7h-13zM4 7h1M7.5 7h1M11 7h1M5 9.5h6\", 1.6);\nkeysBtn.appendChild(document.createTextNode(\"Shortcuts\"));\nkeysBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(keysBtn, gear);\nvar keysBox = document.createElement(\"div\");\nkeysBox.className = \"so\";\nkeysBox.hidden = true;\ntray.insertBefore(keysBox, gear);\n[[KEYS + \":\", \" into this panel\"], [\"Escape:\", \" back to the page\"], [\"Tab, Shift+Tab:\", \" along the trail\"], [\"Space or Escape:\", \" pause Play\"]].forEach(function (k) {\n keysBox.appendChild(line(\"k\", k[0], k[1]));\n});\nkeysBtn.addEventListener(\"click\", function () {\n keysBox.hidden = !keysBox.hidden;\n keysBtn.setAttribute(\"aria-expanded\", keysBox.hidden ? \"false\" : \"true\");\n});\nvar legendBtn = document.createElement(\"button\");\nlegendBtn.className = \"sg\";\nlegendBtn.type = \"button\";\nlegendBtn.setAttribute(\"aria-expanded\", \"false\");\nicon(legendBtn, 16, \"M3 4h1M6.5 4H13M3 8h1M6.5 8H13M3 12h1M6.5 12H13\", 1.6);\nlegendBtn.appendChild(document.createTextNode(\"Legend\"));\nlegendBtn.appendChild(document.createElement(\"i\"));\ntray.insertBefore(legendBtn, keysBtn);\ntray.insertBefore(legend, keysBtn);\nlegendBtn.addEventListener(\"click\", function () {\n legend.hidden = !legend.hidden;\n legendBtn.setAttribute(\"aria-expanded\", legend.hidden ? \"false\" : \"true\");\n});\ntray.appendChild(how);\nvar logs = [], logFilter = \"all\", logOpen = false, LOG_MAX = 500, showWcag = false, wcagBoxes = [];\nfunction wcagBox(parent, doc) {\n var lb = doc.createElement(\"label\");\n lb.className = \"lw\";\n var cb = doc.createElement(\"input\");\n cb.type = \"checkbox\";\n cb.checked = showWcag;\n cb.addEventListener(\"change\", function () {\n showWcag = cb.checked;\n wcagSync();\n });\n lb.appendChild(cb);\n lb.appendChild(doc.createTextNode(\"Show WCAG\"));\n parent.appendChild(lb);\n wcagBoxes.push(cb);\n return cb;\n}\nfunction wcagSync() {\n wcagBoxes.forEach(function (b) { b.checked = showWcag; });\n logGroup.classList.toggle(\"nw\", !showWcag);\n if (tabOpen()) logTab.document.body.classList.toggle(\"nw\", !showWcag);\n}\nvar lastStops = -1, lastMissed = -1, lastForced = -1, probMiss = new Map(), probHov = new Map(), probForce = new Map(), seenForce = new WeakSet(), seenOk = new WeakSet(), seenCss = new Set();\nvar RES = { OK: \"ok\", PROBLEM: \"bad\", SKIPPED: \"skip\", INFO: \"info\" };\nvar FILT = [[\"all\", \"All\"], [\"bad\", \"Problems\"], [\"ok\", \"OK\"], [\"skip\", \"Skipped\"]];\nvar tabChecked = null, filterSets = [], logTab = null, tabList = null, tabSum = null, tabSet = null, tabNote = null, tabPoll = 0;\nfunction pl(n, one, many) { return n + \" \" + (n === 1 ? one : many); }\nfunction desc(e) {\n var t = e.tagName.toLowerCase();\n if (e.id) return t + \"#\" + scrub(e.id);\n var c = typeof e.className === \"string\" ? e.className.trim().split(/\\s+/).filter(Boolean).slice(0, 2) : [];\n return c.length ? t + \".\" + scrub(c.join(\".\")) : t;\n}\nfunction ref(e) { return { el: e, n: stops.indexOf(e) + 1, l: label(e), d: desc(e) }; }\nfunction popName(p) {\n var n = p.getAttribute(\"aria-label\") || \"\", by = p.getAttribute(\"aria-labelledby\");\n if (!n && by) {\n var t = document.getElementById(by.split(/\\s+/)[0]);\n if (t) n = t.textContent || \"\";\n }\n if (!n) {\n var h = p.querySelector(\"h1,h2,h3,h4,legend\");\n if (h) n = h.textContent || \"\";\n }\n n = scrub(n).trim().replace(/\\s+/g, \" \");\n if (n.length > 28) n = n.slice(0, 27) + \"...\";\n return { el: p, n: 0, l: n || label(p), d: desc(p) };\n}\nfunction partText(x) { return typeof x === \"string\" ? x : x.n ? x.n + \" \\\"\" + x.l + \"\\\"\" : \"\\\"\" + x.l + \"\\\" \" + x.d; }\nfunction looksWhy(m) {\n var why = [], role = m.getAttribute(\"role\") || \"\";\n if (m.tagName === \"A\" && !m.hasAttribute(\"href\")) why.push(\"a link with no address\");\n if (m.hasAttribute(\"onclick\")) why.push(\"a click handler in the HTML\");\n if (ROLES.test(role)) why.push(\"role=\\\"\" + role + \"\\\"\");\n if (getComputedStyle(m).cursor === \"pointer\") why.push(\"a pointer cursor\");\n return why.length ? \"has \" + why.join(\", \") : \"looks clickable\";\n}\nfunction addr() { return location.protocol + \"//\" + location.host + cleanUrl(location.pathname); }\nfunction two(n) { return (n < 10 ? \"0\" : \"\") + n; }\nfunction clock(t) { return two(t.getHours()) + \":\" + two(t.getMinutes()) + \":\" + two(t.getSeconds()); }\nfunction browser() {\n var u = navigator.userAgent, m;\n if ((m = u.match(/Edg\\/(\\d+)/))) return \"Edge \" + m[1];\n if ((m = u.match(/Firefox\\/(\\d+)/))) return \"Firefox \" + m[1];\n if ((m = u.match(/Chrome\\/(\\d+)/))) return \"Chrome \" + m[1];\n if ((m = u.match(/Version\\/(\\d+)[^ ]* (Mobile\\/\\S+ )?Safari/))) return \"Safari \" + m[1];\n return u;\n}\nvar CHECKS = [\"Missed spots\", \"Hover menus\", \"Forced order\", \"Out of order\", \"Keyboard trap\", \"Hidden focus\", \"Lost focus\", \"No focus style\", \"Ghost stop\", \"Broken skip link\", \"No way out\", \"Nameless stop\"];\nvar WCAG = { \"Missed spots\": \"2.1.1 A\", \"Hover menus\": \"2.1.1 A\", \"Out of order\": \"2.4.3 A\", \"Forced order\": \"2.4.3 A\", \"Keyboard trap\": \"2.1.2 A\", \"Lost focus\": \"2.4.3 A\", \"Hidden focus\": \"2.4.11 AA\", \"No focus style\": \"2.4.7 AA\", \"Ghost stop\": \"2.4.7 AA\", \"Broken skip link\": \"2.4.1 A\", \"No way out\": \"2.1.2 A\", \"Nameless stop\": \"4.1.2 A\" };\nfunction showUrl(f) { return \"https://matjazkorosec.com/tools/tab-trail#show-\" + f.toLowerCase().replace(/[^a-z0-9]+/g, \"-\").replace(/^-|-$/g, \"\"); }\nfunction ranChecks() {\n var out = [];\n logs.forEach(function (e) { if (e.k !== \"INFO\" && CHECKS.indexOf(e.f) >= 0 && out.indexOf(e.f) < 0) out.push(e.f); });\n return out;\n}\nvar checkedKey = {};\nfunction checkedLine(p, doc) {\n var ran = ranChecks(), bad = {};\n logs.forEach(function (e) { if (e.k === \"PROBLEM\" && !e.fixed) bad[e.f] = 1; });\n var k = ran.map(function (f) { return f + (bad[f] ? \"!\" : \"\"); }).join(\"|\");\n p.hidden = !ran.length;\n if (checkedKey[p.className + (doc === document ? \"1\" : \"2\")] === k && p.firstChild) return;\n checkedKey[p.className + (doc === document ? \"1\" : \"2\")] = k;\n while (p.firstChild) p.removeChild(p.firstChild);\n p.appendChild(doc.createTextNode(\"Checked: \"));\n ran.forEach(function (f, i) {\n if (i) p.appendChild(doc.createTextNode(\", \"));\n var a = doc.createElement(\"a\");\n a.className = bad[f] ? \"lq bad\" : \"lq\";\n a.href = showUrl(f);\n a.target = \"_blank\";\n a.rel = \"noopener\";\n a.textContent = f;\n a.title = \"What \" + f + \" checks\";\n if (doc === document) a.tabIndex = outT();\n p.appendChild(a);\n });\n}\nfunction res(e) { return e.fixed ? \"fixed\" : RES[e.k]; }\nfunction shows(e) { return logFilter === \"all\" || res(e) === logFilter; }\nfunction logCounts() {\n var c = { all: logs.length, bad: 0, ok: 0, skip: 0, info: 0, fixed: 0 };\n logs.forEach(function (e) { c[res(e)]++; });\n return c;\n}\nfunction tabOpen() { return !!(logTab && !logTab.closed); }\nfunction logView() { return tabOpen() ? tabList : logOpen ? logList : null; }\nfunction scroller(v) { return v === logList ? panel : v.ownerDocument.scrollingElement || v.ownerDocument.documentElement; }\nfunction toTop(v) {\n if (v !== logList) return void (scroller(v).scrollTop = 0);\n var d = v.getBoundingClientRect().top - panel.getBoundingClientRect().top;\n if (d < 0) panel.scrollTop += d - 12;\n}\nfunction wcagOf(e) { return e.w || WCAG[e.f]; }\nfunction log(k, f, parts, ai, w) {\n var e = { t: new Date(), k: k, f: f, p: parts, li: null, ai: ai || null, w: w || null };\n logs.push(e);\n if (k === \"PROBLEM\" && e.ai) probLog.push(e);\n if ((k === \"OK\" || k === \"PROBLEM\") && (f === \"Out of order\" || f === \"Keyboard trap\") && pressed) judgedDir[pressed > 0 ? 1 : -1] = 1;\n if (logs.length > LOG_MAX) {\n var old = logs.shift();\n if (old.li && old.li.parentNode) old.li.parentNode.removeChild(old.li);\n }\n if (!logList) return;\n logSummary();\n var v = logView();\n if (!v || !shows(e)) return;\n var sc = scroller(v), top = v === logList ? v.getBoundingClientRect().top >= sc.getBoundingClientRect().top : sc.scrollTop < 8;\n e.li = logLi(e, v.ownerDocument);\n v.insertBefore(e.li, v.firstChild);\n if (top) { if (v !== logList) sc.scrollTop = 0; }\n else sc.scrollTop += e.li.getBoundingClientRect().height;\n}\nfunction review() {\n if (lastStops < 0) log(\"INFO\", \"Scan\", [\"Found \" + pl(stops.length, \"stop\", \"stops\") + \". Read \" + pl(cssRules, \"CSS rule\", \"CSS rules\") + \" from \" + pl(cssSheets, \"style sheet\", \"style sheets\") + \".\"]);\n else if (stops.length !== lastStops) log(\"INFO\", \"Scan\", [\"Page changed: \" + pl(stops.length, \"stop\", \"stops\") + \" now, \" + lastStops + \" before.\"]);\n lastStops = stops.length;\n skipCheck();\n nameCheck();\n cssBlocked.forEach(function (h) {\n if (seenCss.has(h)) return;\n seenCss.add(h);\n log(\"SKIPPED\", \"Hover menus\", [\"Can't read \" + cleanUrl(h) + \", it comes from another site.\"]);\n });\n var mSet = new Set(missed), hSet = new Set(hovers), fSet = new Set(forcedBad), fresh = {}, nNew = 0;\n function add(f) {\n fresh[f] = 1;\n nNew++;\n }\n probMiss.forEach(function (e, m) {\n if (mSet.has(m)) return;\n e.fixed = true;\n probMiss.delete(m);\n log(\"OK\", \"Missed spots\", [ref(m), stopSet.has(m) ? \" is a Tab stop now.\" : m.isConnected ? \" is no longer flagged.\" : \" is gone from the page.\"]);\n });\n probHov.forEach(function (e, h) {\n if (hSet.has(h)) return;\n e.fixed = true;\n probHov.delete(h);\n if (tabOpens.has(h)) seenOk.add(h);\n log(\"OK\", \"Hover menus\", [ref(h), !h.isConnected ? \" is gone from the page.\" : tabOpens.has(h) ? \" opens when Tab reaches it.\" : \" no longer opens only on mouse hover.\"]);\n });\n missed.forEach(function (m) {\n if (probMiss.has(m)) return;\n var item = m.closest(GROUP) && ITEM.test(m.getAttribute(\"role\") || \"\");\n log(\"PROBLEM\", \"Missed spots\", [ref(m), \" \" + looksWhy(m) + \", but Tab never reaches it.\"], aiOf(W_KEY, \"Every element that reacts to a click can be reached with the Tab key and used with Enter or Space.\", item ? \"It is a role=\\\"\" + m.getAttribute(\"role\") + \"\\\" item in a group the arrow keys move through, and no item in the group is a Tab stop. Give 1 item tabindex=\\\"0\\\" (the selected one) and move between the items with the arrow keys.\" : m.tagName === \"A\" && !m.hasAttribute(\"href\") ? \"Give the link an href, or make it a <button type=\\\"button\\\"> if it runs script.\" : \"Use <button type=\\\"button\\\"> for an action or <a href> for a link instead of the \" + m.tagName.toLowerCase() + \". If the tag can't change, add tabindex=\\\"0\\\" and role=\\\"button\\\", and handle Enter and Space in a keydown listener.\" + (looksWhy(m) === \"has a pointer cursor\" ? \" Only the pointer cursor makes it look clickable: if it is not meant to be clickable, remove cursor: pointer from it instead.\" : \"\"), [[\"Element\", m]], null, true));\n probMiss.set(m, logs[logs.length - 1]);\n add(\"Missed spots\");\n });\n if (!missed.length && lastMissed !== 0) log(\"OK\", \"Missed spots\", [lastMissed > 0 ? \"No clickable things Tab skips now.\" : \"No clickable things Tab skips.\"]);\n lastMissed = missed.length;\n hoverOk.forEach(function (o) {\n if (seenOk.has(o[0])) return;\n seenOk.add(o[0]);\n log(\"OK\", \"Hover menus\", [ref(o[0]), o[1] === \"focus\" ? \" opens on mouse hover and on keyboard focus.\" : o[1] === \"tab\" ? \" opens when Tab reaches it.\" : \" opens on mouse hover and has a toggle button (aria-expanded), so the keyboard can open it.\"]);\n });\n hovers.forEach(function (h) {\n if (probHov.has(h)) return;\n var hr = hovRule.get(h) || [\":hover\", \"\"];\n hr = [scrub(hr[0]), hr[1]];\n var tw = (hr[0].match(/\\.(?:[\\w-]|\\\\.)+/g) || []).map(function (c) { return c.slice(1).replace(/\\\\(.)/g, \"$1\"); }).filter(function (c) { return /(^|:)(group-|peer-)?hover:/.test(c); })[0];\n var twFix = tw ? \"This rule comes from the Tailwind class \" + tw + \". Add \" + tw.replace(/(^|:)group-hover:/, \"$1group-focus-within:\").replace(/(^|:)peer-hover:/, \"$1peer-focus:\").replace(/(^|:)hover:/, \"$1focus-within:\") + \" next to it in the same class list, so it also opens on keyboard focus. Or open the menu with a <button aria-expanded> that toggles it.\" : \"\";\n var seen = hovSeen.has(h);\n var dead = !seen && !h.matches(FOCUSABLE) && ![].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return tabbable(x); });\n var skipped = [].some.call(h.querySelectorAll(FOCUSABLE), function (x) { return x.tabIndex < 0; });\n var deadFix = dead ? \" Nothing inside it can take keyboard focus now, so a focus rule alone will never open it: make the part you hover a <button type=\\\"button\\\" aria-expanded=\\\"false\\\"> that toggles the menu.\" + (skipped ? \" The links or buttons inside have tabindex=\\\"-1\\\", so Tab skips them even when the menu is open: remove it.\" : \"\") : \"\";\n log(\"PROBLEM\", \"Hover menus\", [ref(h), \" opens only on mouse hover (\" + hr[0] + \").\" + (seen ? \" Tab reaches its links, but they stay invisible while they have focus.\" : \" No focus rule, no toggle button.\")], aiOf(seen ? W_VIS : W_KEY, seen ? \"The menu also opens while a link or button inside it has keyboard focus, so keyboard users can see where they are.\" : \"The menu also opens when a link or button inside it gets keyboard focus, so keyboard users can reach its links.\", (twFix || \"Next to the rule \" + hr[0] + \" add \" + hr[0].replace(/:hover/g, \":focus-within\") + \" with the same declarations, or open the menu with a <button aria-expanded> that toggles it.\") + deadFix, [[\"Element\", h, null, true]], [\"CSS rule: \" + hr[0], \"Style sheet: \" + (hr[1] ? cleanUrl(hr[1]) : \"unknown\")], true), seen ? \"2.4.7 AA\" : null);\n probHov.set(h, logs[logs.length - 1]);\n add(\"Hover menus\");\n });\n probForce.forEach(function (e, f) {\n if (fSet.has(f)) return;\n e.fixed = true;\n probForce.delete(f);\n log(\"OK\", \"Forced order\", [ref(f), !f.isConnected ? \" is gone from the page.\" : forced.indexOf(f) >= 0 ? \" is in page order now.\" : f.tabIndex > 0 ? \" is no longer a Tab stop.\" : \" has no tabindex above 0 now.\"]);\n });\n forced.forEach(function (f) {\n if (probForce.has(f) || (!fSet.has(f) && seenForce.has(f))) return;\n var ti = f.getAttribute(\"tabindex\"), at = stops.indexOf(f) + 1, page = domAt.get(f) + 1;\n if (!fSet.has(f)) {\n seenForce.add(f);\n return log(\"INFO\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", but it is already in page order, so Tab order stays the same. tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\"]);\n }\n seenForce.delete(f);\n log(\"PROBLEM\", \"Forced order\", [ref(f), \" has tabindex=\\\"\" + ti + \"\\\", which pulls it ahead of the page: Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". It fails WCAG 2.4.3 when that order makes no sense (F44).\"], aiOf(W_FORCE, \"Tab follows the order of the page. No element has tabindex above 0, so none is pulled ahead of the rest.\", \"Remove the tabindex, or set it to 0, and move the element in the HTML where it should come in Tab order.\", [[\"Element\", f]], [\"Measured: tabindex=\\\"\" + ti + \"\\\", Tab visits it as stop \" + at + \", its place in the page is stop \" + page + \". \" + pl(forced.length, \"stop\", \"stops\") + \" on the page \" + (forced.length === 1 ? \"has\" : \"have\") + \" tabindex above 0.\"], true));\n probForce.set(f, logs[logs.length - 1]);\n add(\"Forced order\");\n });\n if (!forcedBad.length && lastForced !== 0) log(\"OK\", \"Forced order\", [forced.length ? \"No stop with tabindex above 0 is out of page order\" + (lastForced > 0 ? \" now.\" : \".\") : lastForced > 0 ? \"No stops with tabindex above 0 now.\" : \"No stops with tabindex above 0.\"]);\n lastForced = forcedBad.length;\n if (nNew) announce(pl(nNew, \"new problem\", \"new problems\") + \": \" + Object.keys(fresh).join(\", \") + \".\");\n}\nfunction goTo(e) {\n if (!e.isConnected) return;\n e.scrollIntoView({ block: \"center\", behavior: \"smooth\" });\n if (stops.indexOf(e) < 0) return queue();\n endPress();\n e.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction logLi(e, doc) {\n var li = doc.createElement(\"li\");\n li.className = \"lx \" + RES[e.k];\n function sp(cls, text) {\n var x = doc.createElement(\"span\");\n x.className = cls;\n x.textContent = text;\n li.appendChild(x);\n return x;\n }\n sp(\"tm\", clock(e.t));\n sp(\"st\", e.k);\n var bd = sp(\"bd\", \"\");\n var ft = doc.createElement(CHECKS.indexOf(e.f) >= 0 ? \"a\" : \"b\");\n ft.className = \"ft\";\n ft.textContent = e.f;\n if (ft.tagName === \"A\") {\n ft.className = \"ft lq\";\n ft.href = showUrl(e.f);\n ft.target = \"_blank\";\n ft.rel = \"noopener\";\n ft.title = \"What \" + e.f + \" checks\";\n if (doc === document) ft.tabIndex = outT();\n }\n bd.appendChild(ft);\n bd.appendChild(doc.createTextNode(\" \"));\n if (wcagOf(e)) {\n var wc = doc.createElement(\"span\");\n wc.className = \"wc\";\n wc.textContent = \"WCAG \" + wcagOf(e);\n bd.appendChild(wc);\n bd.appendChild(doc.createTextNode(\" \"));\n }\n e.p.forEach(function (x) {\n if (typeof x === \"string\") return bd.appendChild(doc.createTextNode(x));\n if (!x.n) return bd.appendChild(doc.createTextNode(partText(x)));\n var c = doc.createElement(\"button\");\n c.type = \"button\";\n c.className = \"lc\";\n c.textContent = String(x.n);\n c.setAttribute(\"aria-label\", \"Go to stop \" + x.n);\n if (doc === document) c.tabIndex = panelIn ? 0 : -1;\n c.addEventListener(\"click\", function () {\n if (doc !== document && tabOpen() && window.name) logTab.open(\"\", window.name);\n goTo(x.el);\n });\n bd.appendChild(c);\n bd.appendChild(doc.createTextNode(\" \\\"\" + x.l + \"\\\"\"));\n });\n return li;\n}\nfunction logText() {\n var c = logCounts();\n var out = [\"Tab trail \" + VERSION + \" log\", addr(), stamp(), browser() + \", window \" + innerWidth + \" x \" + innerHeight, pl(stops.length, \"stop\", \"stops\") + \", \" + pl(c.bad, \"problem\", \"problems\") + \", \" + c.ok + \" OK, \" + c.skip + \" skipped\", \"\"];\n logs.slice().reverse().forEach(function (e) {\n out.push(clock(e.t) + \" \" + (e.k + \" \").slice(0, 8) + \" \" + e.f + (showWcag && wcagOf(e) ? \" (WCAG \" + wcagOf(e) + \")\" : \"\"));\n out.push(\" \" + e.p.map(partText).join(\"\"));\n });\n return out.join(\"\\n\");\n}\nvar W_FORCE = \"2.4.3 Focus Order (Level A). tabindex above 0 pulls it ahead of the page. It fails WCAG 2.4.3 when that order makes no sense (F44).\", W_TRAP = \"2.1.2 No Keyboard Trap (Level A)\", W_KEY = \"2.1.1 Keyboard (Level A)\", W_VIS = \"2.4.7 Focus Visible (Level AA)\", W_ORDER = \"2.4.3 Focus Order (Level A)\", W_HIDE = \"2.4.11 Focus Not Obscured (Minimum) (Level AA)\", W_NAME = \"4.1.2 Name, Role, Value (Level A)\", W_BYPASS = \"2.4.1 Bypass Blocks (Level A)\";\nfunction cssId(t) { return /^[A-Za-z][\\w-]*$/.test(t); }\nfunction sel(e) {\n if (!e || e.nodeType !== 1) return \"\";\n var rt = e.getRootNode(), live = e.isConnected, path = [];\n for (var n = e; n && n.nodeType === 1; n = n.parentElement) {\n var t = n.tagName.toLowerCase();\n if (n.id && cssId(n.id) && !secretish(n.id) && live && rt.querySelectorAll(\"#\" + n.id).length === 1) {\n path.unshift(\"#\" + n.id);\n break;\n }\n if (t === \"html\" || t === \"body\") {\n path.unshift(t);\n break;\n }\n var c = typeof n.className === \"string\" ? n.className.trim().split(/\\s+/).filter(function (x) { return cssId(x) && !secretish(x); }).slice(0, 2) : [];\n var part = t + (c.length ? \".\" + c.join(\".\") : \"\"), par = n.parentElement;\n if (par) {\n var same = Array.prototype.filter.call(par.children, function (x) { return x.tagName === n.tagName; });\n if (same.length > 1) part += \":nth-of-type(\" + (same.indexOf(n) + 1) + \")\";\n }\n path.unshift(part);\n if (live) {\n try { if (rt.querySelectorAll(path.join(\" > \")).length === 1) break; } catch (x) {}\n }\n }\n var out = path.join(\" > \");\n if (rt && rt.host) out = sel(rt.host) + \" (inside its shadow root) \" + out;\n return out;\n}\nvar KEEP = /^(id|class|role|type|name|href|src|tabindex|disabled|hidden|contenteditable|aria-[\\w-]+)$/, VOID = /^(area|br|col|embed|hr|img|input|link|meta|source|track|wbr)$/;\nfunction attrText(n, v) {\n if (n === \"href\" || n === \"src\") return cleanUrl(v);\n if (n === \"id\" || n === \"class\") return scrub(v);\n if (n === \"role\" || n === \"type\") return v;\n v = scrub(v);\n return v.length > 60 ? v.slice(0, 60) + \"...\" : v;\n}\nfunction snip(e, kids) {\n var tag = e.tagName.toLowerCase(), open = \"<\" + tag;\n [].forEach.call(e.attributes, function (a) {\n if (KEEP.test(a.name)) open += \" \" + a.name + \"=\\\"\" + attrText(a.name, a.value).replace(/\"/g, \""\") + \"\\\"\";\n });\n open += \">\";\n if (VOID.test(tag)) return open;\n if (kids && e.children.length) return open + [].slice.call(e.children, 0, 8).map(function (c) { return c.children.length ? snip(c).replace(/>[^<]*<\\/[\\w-]+>$/, \">...</\" + c.tagName.toLowerCase() + \">\") : snip(c); }).join(\"\") + (e.children.length > 8 ? \"...\" : \"\") + \"</\" + tag + \">\";\n var text = scrub((e.textContent || \"\").trim().replace(/\\s+/g, \" \"));\n return open + (text.length > 40 ? text.slice(0, 40) + \"...\" : text) + \"</\" + tag + \">\";\n}\nvar FRAME = /^(__.*|SegmentViewNode|LayoutRouter.*|InnerLayoutRouter|OuterLayoutRouter|RenderFromTemplateContext|ScrollAndFocusHandler|InnerScrollAndFocusHandler|.*Boundary.*|HTTPAccessFallback.*|Router|AppRouter|HotReload|ReactDevOverlay|DevRootHTTPAccessFallbackBoundary|ServerRoot|Root|AppContainer|Suspense|Fragment|StrictMode|Head|Html|Body|Script|ClientPageRoot|ClientSegmentRoot|.*Provider|.*Context|.*Consumer|Link|LinkComponent|Image|ForwardRef|Memo|Anonymous|_c\\d*)$/;\nfunction compOf(e) {\n var keys = Object.keys(e), k = keys.filter(function (x) { return x.indexOf(\"__reactFiber$\") === 0 || x.indexOf(\"__reactInternalInstance$\") === 0; })[0];\n if (k) {\n var names = [], src = \"\", any = false;\n for (var f = e[k]; f && names.length < 3; f = f.return) {\n var t = f.type;\n if (!src && f._debugSource && f._debugSource.fileName) src = f._debugSource.fileName + \":\" + f._debugSource.lineNumber;\n if (!t || typeof t === \"string\" || typeof t === \"symbol\") continue;\n var n = t.displayName || t.name || (t.render && (t.render.displayName || t.render.name)) || (t.type && (t.type.displayName || t.type.name));\n if (!n) continue;\n any = true;\n if (FRAME.test(n) || names.indexOf(n) >= 0) continue;\n names.push(n);\n }\n if (!names.length) return any ? \"React, rendered by a server component or by the framework itself, so its component name is not in the browser; search the code for the HTML or its classes\" : \"\";\n if (names.every(function (n) { return n.length <= 2; })) return \"React (component names are minified in this production build; a development build shows them)\";\n return \"React \" + names[0] + (names.length > 1 ? \", inside \" + names.slice(1).join(\", inside \") : \"\") + (src ? \", source \" + src : \"\");\n }\n if (e.__vueParentComponent) {\n var vn = [];\n for (var c = e.__vueParentComponent; c && vn.length < 3; c = c.parent) {\n var nm = c.type && (c.type.name || c.type.__name);\n if (nm && vn.indexOf(nm) < 0) vn.push(nm);\n }\n if (vn.length) return \"Vue \" + vn[0] + (vn.length > 1 ? \", inside \" + vn.slice(1).join(\", inside \") : \"\");\n }\n if (e.__vue__ && e.__vue__.$options && e.__vue__.$options.name) return \"Vue \" + e.__vue__.$options.name;\n try {\n var ng = window.ng;\n if (ng && ng.getOwningComponent) {\n var oc = ng.getOwningComponent(e);\n if (oc && oc.constructor) return \"Angular \" + oc.constructor.name;\n }\n } catch (x) {}\n return \"\";\n}\nfunction whereOf(el) {\n if (!el || !el.isConnected) return \"\";\n var out = [], up = el.parentElement;\n while (up && up !== document.body && up !== document.documentElement && !up.id) up = up.parentElement;\n if (up && up.id && up !== document.body) out.push(\"inside #\" + scrub(up.id));\n var hs = document.querySelectorAll(\"h1,h2,h3,h4,h5,h6,[role=heading]\"), last = null;\n for (var i = 0; i < hs.length; i++) {\n if (hs[i] === el || (host && host.contains(hs[i]))) continue;\n if (hs[i].contains(el) || hs[i].compareDocumentPosition(el) & Node.DOCUMENT_POSITION_FOLLOWING) last = hs[i]; else break;\n }\n var t = last ? scrub((last.textContent || \"\").replace(/\\s+/g, \" \").trim()).slice(0, 60) : \"\";\n if (t) out.push(\"under the heading \\\"\" + t + \"\\\"\");\n return out.join(\", \");\n}\nfunction aiOf(crit, expect, fix, els, more, lazy) {\n function fact(x) {\n var o = { role: x[0], el: x[1] };\n function fill() {\n o.sel = x[2] ? x[2].sel : sel(x[1]);\n o.html = x[2] ? x[2].html : snip(x[1], x[3]);\n o.comp = compOf(x[1]);\n }\n if (!lazy) fill();\n else [\"sel\", \"html\", \"comp\"].forEach(function (k) {\n Object.defineProperty(o, k, { configurable: true, enumerable: true, get: function () { fill(); return o[k]; }, set: function (v) { Object.defineProperty(o, k, { value: v, writable: true, enumerable: true }); } });\n });\n return o;\n }\n return {\n crit: crit,\n expect: expect,\n fix: fix,\n more: more || [],\n els: els.filter(function (x) { return x[1]; }).map(fact)\n };\n}\nfunction tally(k) {\n var m = {}, order = [];\n logs.forEach(function (e) {\n if (e.k !== k) return;\n if (!m[e.f]) {\n m[e.f] = 0;\n order.push(e.f);\n }\n m[e.f]++;\n });\n return order.map(function (f) { return f + \" \" + m[f]; }).join(\", \");\n}\nfunction stamp() {\n var d = new Date();\n return d.getFullYear() + \"-\" + two(d.getMonth() + 1) + \"-\" + two(d.getDate()) + \" \" + two(d.getHours()) + \":\" + two(d.getMinutes());\n}\nfunction verifyOf(e) {\n var a = e.ai, t = e.p.map(partText).join(\"\");\n function el(r) {\n var x = a.els.filter(function (y) { return y.role === r; })[0];\n return x ? x.sel : \"\";\n }\n if (e.f === \"Missed spots\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" gets a stop number and the skipped count goes down by 1. Press Tab until it has focus, then Enter (and Space for a button) does what a click does.\";\n if (e.f === \"Forced order\") return \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" has no tabindex above 0, its stop number matches its place on the page, and the Forced order count goes down by 1.\";\n if (e.f === \"Hover menus\") return \"Press Tab until a link inside \" + el(\"Element\") + \" has focus: the menu opens while focus is inside it, and Tab trail no longer lists it under hover menus.\";\n if (e.f === \"Hidden focus\") return \"Press Tab until \" + el(\"Element\") + \" has focus: part of it shows next to \" + el(\"Covered by\") + \", and its Hidden focus line in the log says in view or partly covered.\";\n if (e.f === \"Nameless stop\") return \"Hover the dot of \" + el(\"Element\") + \" in Tab trail: it shows a name, not \\\"no name\\\".\";\n if (e.f === \"No way out\") return \"Open \" + el(\"Popup\") + \" and press Tab until a Close button has focus, then Enter closes the popup.\";\n if (e.f === \"Broken skip link\") return el(\"Element\") ? \"Reload the page, press Tab once and then Enter on \" + el(\"Element\") + \": the next Tab lands inside the main content.\" : \"Reload the page and press Tab once: the first stop is a skip link, and Enter on it moves focus to the main content.\";\n if (e.f === \"Ghost stop\") return a.crit === W_NAME ? \"Reload the page and run Tab trail again: \" + el(\"Element\") + \" is no longer inside aria-hidden, or Tab skips it, and the Ghost stop count goes down by 1.\" : \"Press Tab until \" + el(\"Element\") + \" has focus: it shows on screen, and its Ghost stop line in the log says OK.\";\n if (e.f === \"No focus style\") return \"Press Tab until \" + el(\"Element\") + \" has focus: an outline or another visible change shows on it, and its No focus style line in the log says OK.\";\n if (e.f === \"Keyboard trap\") return \"Put focus on \" + el(\"Element\") + \" and press Tab: focus moves on to \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n if (e.f === \"Lost focus\") return \"Open the popup from \" + el(\"Opened by\") + \" with Enter, then close it with Escape or its close button: focus is back on \" + el(\"Opened by\") + \", and the log shows an OK Lost focus line.\";\n if (el(\"Popup\")) return \"Reload so the popup shows, then press Tab once: focus lands inside \" + el(\"Popup\") + \".\";\n return \"Put focus on \" + (el(\"Tab left from\") || \"the start of the page\") + \" and press \" + (t.indexOf(\"(Shift+Tab)\") >= 0 ? \"Shift+Tab\" : \"Tab\") + \" once: focus lands on \" + el(\"Expected next\") + \", and the log shows an OK Out of order line.\";\n}\nvar hidTested = new Set();\nfunction coverage() {\n var out = [], left = stops.filter(function (x) { return !hidTested.has(x); }).map(function (x) { return stops.indexOf(x) + 1; });\n if (left.length) out.push(\"Hidden focus: \" + left.length + \" of \" + pl(stops.length, \"stop was\", \"stops were\") + \" never tested (\" + left.slice(0, 30).join(\", \") + (left.length > 30 ? \" and \" + (left.length - 30) + \" more\" : \"\") + \"). Press Play to test every stop.\");\n var presses = logs.filter(function (e) { return e.f === \"Out of order\" || e.f === \"Keyboard trap\"; }).length;\n out.push(\"Out of order and Keyboard trap: judged only for the \" + pl(presses, \"Tab press\", \"Tab presses\") + \" made in this run. Press Tab through the whole page, and Shift+Tab back, to judge every step.\");\n var pops = logs.filter(function (e) { return e.f === \"Lost focus\"; }).length;\n out.push(\"Lost focus: \" + (pops ? \"only \" + pl(pops, \"popup was\", \"popups were\") : \"no popups were\") + \" opened and closed in this run. Open and close every popup, menu and dialog on the page to check them all.\");\n out.push(\"Window size: everything was tested at \" + innerWidth + \" x \" + innerHeight + \" only. Sticky bars, menus and popups can behave differently on phones; run it again in a window about 390 px wide.\");\n out.push(\"Not checked by Tab trail at all: how strong the focus change is (contrast, size: AAA), accessible names of things Tab doesn't reach, color contrast of text, what a screen reader announces, and content inside iframes. Use axe DevTools or Lighthouse for names, contrast and iframes. Check focus visibility with Spotlight and screen reader output with VoiceOver or NVDA.\");\n return out;\n}\nvar probLog = [], ignore = [], CAP = 200, judgedDir = {};\nfunction ignored(e) {\n return ignore.length && e.ai.els.some(function (x) {\n for (var n = x.el; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n for (var i = 0; i < ignore.length; i++) if (n.matches(ignore[i])) return true;\n }\n return false;\n });\n}\nfunction openProbs(all) {\n var seen = {}, out = [];\n probLog.forEach(function (e) {\n var t = e.f + e.p.map(partText).join(\"\");\n if (e.fixed || seen[t]) return;\n seen[t] = 1;\n if (all || !ignored(e)) out.push(e);\n });\n return out;\n}\nfunction hash(t) {\n var h = 2166136261;\n for (var i = 0; i < t.length; i++) h = Math.imul(h ^ t.charCodeAt(i), 16777619);\n return (\"0000000\" + (h >>> 0).toString(16)).slice(-8);\n}\nfunction keyOf(e) {\n var t = e.tagName.toLowerCase();\n if (e.id && cssId(e.id)) return t + \"#\" + e.id;\n var up = \"\";\n for (var p = e.parentElement; p; p = p.parentElement) if (p.id && cssId(p.id)) { up = \"#\" + p.id + \" \"; break; }\n return up + t + (e.getAttribute(\"role\") ? \"[role=\" + e.getAttribute(\"role\") + \"]\" : \"\") + (e.getAttribute(\"name\") ? \"[name=\" + e.getAttribute(\"name\") + \"]\" : \"\") + \"\\\"\" + label(e) + \"\\\"\";\n}\nfunction mainEl(e) {\n var to = e.ai.els.filter(function (x) { return x.role === \"Tab jumped to\"; })[0];\n return to || e.ai.els[0];\n}\nfunction problemsOf(list) {\n var used = {};\n return list.map(function (e) {\n var m = mainEl(e), id = hash(e.f + \"|\" + e.ai.els.map(function (x) { return keyOf(x.el); }).join(\"|\"));\n used[id] = (used[id] || 0) + 1;\n return { id: used[id] > 1 ? id + \"-\" + used[id] : id, check: e.f, wcag: wcagOf(e) || null, selector: m ? m.sel : null, html: m ? m.html : null, component: m && m.comp ? m.comp : null, fix: e.ai.fix, verify: verifyOf(e) };\n });\n}\nfunction aiText() {\n var out = [], skips = [], seenS = {}, notes = [], probs = openProbs(), left = openProbs(true).length - probs.length, ids = problemsOf(probs), groups = [], byKey = {};\n probs.forEach(function (e, i) {\n var m = mainEl(e), k = /^(Missed spots|Hover menus|Forced order)$/.test(e.f) && m ? e.f + \"|\" + e.ai.fix + \"|\" + desc(m.el) + \"|\" + m.comp : \"#\" + i, g = byKey[k];\n if (!g) groups.push((g = byKey[k] = { i: i, list: [] }));\n g.list.push(e);\n });\n logs.forEach(function (e) {\n var t = e.p.map(partText).join(\"\");\n if (e.k === \"SKIPPED\" && !seenS[e.f + t]) {\n seenS[e.f + t] = 1;\n skips.push(e.f + \": \" + t);\n } else if (e.k === \"INFO\") notes.push(clock(e.t) + \" \" + e.f + \": \" + t);\n });\n var c = logCounts();\n out.push(\"Tab trail \" + VERSION + \" report for an AI agent\");\n out.push(\"Page: \" + addr());\n out.push(\"Ran on: \" + stamp() + \", \" + browser() + \", window \" + innerWidth + \" x \" + innerHeight);\n out.push(\"Tool: Tab trail (matjazkorosec.com/tools/tab-trail), a bookmarklet that checks the keyboard Tab order of the page. Stop numbers are positions in the Tab order when the check ran. Use the selectors, the HTML and the component names to find each element in the code.\");\n out.push(\"Run it again from a script (for example Playwright): save https://raw.githubusercontent.com/matjazkorosec/tab-trail/v\" + VERSION + \"/dist/tab-trail.js in your repo once and load your saved copy with page.evaluate(readFileSync(...)), which works under a Content Security Policy. Then await window.__tabTrail.play() to walk every stop, and read window.__tabTrail.problems() for every open problem as data, window.__tabTrail.report() for this same report or window.__tabTrail.log() for every line.\");\n out.push(\"\");\n out.push(\"Summary: \" + pl(probs.length, \"problem\", \"problems\") + \" to fix\" + (groups.length < probs.length ? \" (\" + pl(groups.length, \"different fix\", \"different fixes\") + \")\" : \"\") + \". \" + pl(c.ok, \"check\", \"checks\") + \" passed, \" + c.skip + \" skipped.\");\n if (walkEnd || walking) out.push(\"Play: \" + playState() + \".\");\n var pass = tally(\"OK\"), sk = tally(\"SKIPPED\");\n if (pass) out.push(\"Passed: \" + pass + \".\");\n if (sk) out.push(\"Skipped: \" + sk + \".\");\n var ran = ranChecks();\n if (ran.length) out.push(\"Checked: \" + ran.join(\", \") + \". Each check is explained at \" + showUrl(ran[0]).replace(/#.*/, \"#shows\") + \" under Fix what turns red.\");\n if (left) out.push(\"Left out on purpose: \" + pl(left, \"problem\", \"problems\") + \" inside \" + ignore.join(\", \") + \".\");\n if (groups.length > CAP) out.push(\"Showing the first \" + CAP + \" of \" + groups.length.toLocaleString(\"en-US\") + \" problems. window.__tabTrail.problems() returns every one.\");\n groups.slice(0, CAP).forEach(function (g, n) {\n var e = g.list[0], i = g.i, more = g.list.length - 2;\n out.push(\"\");\n out.push(\"Problem \" + (n + 1) + \" of \" + groups.length + \": \" + e.f + (g.list.length > 1 ? \", \" + g.list.length + \" elements with the same cause: \" + desc(mainEl(e).el) + \" (\" + g.list.slice(0, 2).map(function (x) { return \"\\\"\" + label(mainEl(x).el) + \"\\\"\"; }).join(\", \") + (more > 0 ? \" and \" + more + \" more\" : \"\") + \"). Fix it once in the component that draws them.\" : \"\") + \" (\" + clock(e.t) + \")\");\n out.push(\"Id: \" + ids[i].id + (g.list.length > 1 ? \" (the first of \" + g.list.length + \", window.__tabTrail.problems() lists every one)\" : \"\"));\n if (e.ai) out.push(\"WCAG: \" + e.ai.crit);\n out.push(\"What happened: \" + e.p.map(partText).join(\"\"));\n if (!e.ai) return;\n out.push(\"Expected: \" + e.ai.expect);\n e.ai.els.forEach(function (x) {\n out.push(x.role + \": \" + x.sel + (x.el.isConnected ? \"\" : \" (no longer on the page)\"));\n out.push(\" HTML: \" + x.html);\n if (x.comp) out.push(\" Component: \" + x.comp);\n var where = whereOf(x.el);\n if (where) out.push(\" Where: \" + where);\n });\n e.ai.more.forEach(function (m) { out.push(m); });\n out.push(\"Fix hint: \" + e.ai.fix);\n out.push(\"How to check the fix: \" + verifyOf(e));\n if (CHECKS.indexOf(e.f) >= 0) out.push(\"About this check: \" + showUrl(e.f));\n });\n out.push(\"\");\n out.push(\"Not covered in this run:\");\n coverage().forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length) {\n out.push(\"\");\n out.push(\"Skipped checks, and why:\");\n skips.slice(0, 12).forEach(function (t) { out.push(\"- \" + t); });\n if (skips.length > 12) out.push(\"- and \" + (skips.length - 12) + \" more\");\n }\n if (notes.length) {\n out.push(\"\");\n out.push(\"Notes:\");\n notes.slice(-10).forEach(function (t) { out.push(\"- \" + t); });\n }\n return out.join(\"\\n\");\n}\nfunction copyIt(b, w, text, word) {\n var d = w.document;\n var lb = b.lastChild && b.lastChild.nodeType === 3 ? b.lastChild : b;\n function done(ok) {\n lb.textContent = ok ? \"Copied\" : \"Copy failed\";\n setTimeout(function () { lb.textContent = word; }, 1500);\n }\n function old() {\n var back = w === window ? deep() : d.activeElement;\n var ta = d.createElement(\"textarea\");\n ta.value = text;\n ta.setAttribute(\"readonly\", \"\");\n ta.style.cssText = \"position:fixed;left:0;top:0;width:1px;height:1px;opacity:0\";\n (w === window ? root : d.body).appendChild(ta);\n ta.focus({ preventScroll: true });\n ta.select();\n var ok = false;\n try { ok = d.execCommand(\"copy\"); } catch (x) {}\n ta.remove();\n if (back && back.focus) back.focus({ preventScroll: true });\n done(ok);\n }\n if (w.navigator.clipboard && w.isSecureContext) w.navigator.clipboard.writeText(text).then(function () { done(true); }, old);\n else old();\n}\nfunction filters(parent, doc) {\n var row = doc.createElement(\"div\");\n row.className = \"lf\";\n var set = FILT.map(function (f) {\n var b = doc.createElement(\"button\");\n b.type = \"button\";\n b.className = \"lt\";\n b.addEventListener(\"click\", function () {\n logFilter = f[0];\n logDraw();\n });\n row.appendChild(b);\n return b;\n });\n parent.appendChild(row);\n filterSets.push(set);\n return set;\n}\nfunction logSummary() {\n var c = logCounts();\n logSum.textContent = \" \" + pl(c.all, \"event\", \"events\");\n logBad.textContent = c.bad ? pl(c.bad, \"problem\", \"problems\") : \"\";\n logGroup.classList.toggle(\"warn\", c.bad > 0);\n filterSets.forEach(function (set) {\n set.forEach(function (b, i) {\n b.textContent = FILT[i][1] + \" \" + c[FILT[i][0]];\n b.setAttribute(\"aria-pressed\", logFilter === FILT[i][0] ? \"true\" : \"false\");\n b.classList.toggle(\"e\", FILT[i][0] === \"bad\" && c.bad > 0);\n });\n });\n if (tabSum && tabOpen()) tabSum.textContent = addr() + \", \" + pl(stops.length, \"stop\", \"stops\");\n checkedLine(logChecked, document);\n if (tabChecked && tabOpen()) checkedLine(tabChecked, logTab.document);\n if (sumLine && walkEnd === \"done\") sumDraw();\n}\nfunction logDraw() {\n if (logTab && logTab.closed) tabGone();\n logSummary();\n [logList, tabList].forEach(function (u) { if (u) while (u.firstChild) u.removeChild(u.firstChild); });\n logs.forEach(function (e) { e.li = null; });\n var away = tabOpen();\n logBody.hidden = !logOpen || away;\n logAway.hidden = !away;\n logBtn.setAttribute(\"aria-expanded\", logBody.hidden ? \"false\" : \"true\");\n var v = logView();\n if (!v) return;\n var frag = v.ownerDocument.createDocumentFragment();\n logs.slice().reverse().forEach(function (e) {\n if (!shows(e)) return;\n e.li = logLi(e, v.ownerDocument);\n frag.appendChild(e.li);\n });\n v.appendChild(frag);\n toTop(v);\n}\nfunction tabGone() {\n logTab = null;\n tabList = null;\n tabSum = null;\n tabChecked = null;\n wcagBoxes = wcagBoxes.filter(function (b) { return b.ownerDocument === document; });\n tabNote = null;\n filterSets = filterSets.filter(function (x) { return x !== tabSet; });\n tabSet = null;\n if (tabPoll) clearInterval(tabPoll);\n tabPoll = 0;\n}\nvar TAB_CSS = [\n \"body{margin:0;padding:12px;background:#e4dccd;color:#1a1612;font:15px/1.5 -apple-system,system-ui,'Segoe UI',Roboto,sans-serif}\",\n \".hd,.box{box-sizing:border-box;max-width:1200px;margin:0 auto;background:#fbf8f3;border-radius:12px}\",\n \".wide .hd,.wide .box{max-width:none}\",\n \".fw{display:inline-grid;place-items:center;width:34px;height:34px;padding:0;border:1.5px solid #1a1612;border-radius:8px;background:#fff;color:#1a1612;cursor:pointer;box-sizing:border-box}\",\n \".fw:hover{background:#efe8dc}\",\n \".fw:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".fw .in,.wide .fw .out{display:none}\",\n \".wide .fw .in{display:inline}\",\n \".hd{position:sticky;top:12px;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:10px 8px;padding:14px 18px;box-shadow:0 0 0 12px #e4dccd}\",\n \".box{margin-top:8px;padding:12px 0 8px;overflow:hidden}\",\n \"h1{margin:0;font:700 22px/1.2 Georgia,serif}\",\n \".u{margin:0 auto 0 6px;color:#5f564c}\",\n \".nt{flex-basis:100%;margin:0;color:#d0103a;font-weight:700}\",\n \".nt[hidden]{display:none}\",\n \".lf{display:inline-grid;grid-auto-flow:column;gap:2px;padding:3px;background:#efe8dc;border-radius:10px;margin-right:14px}\",\n \".fr{flex-basis:100%;display:flex;flex-wrap:wrap;align-items:center;gap:8px 0}\",\n \".lt,.kl,.ka,.lo,.lc{font:inherit;color:inherit;cursor:pointer}\",\n \".lt{padding:3px 14px;border:0;border-radius:7px;background:none;color:#5f564c;font-weight:600;font-size:14px}\",\n \".lt:hover{color:#1a1612;background:rgba(26,22,18,.06)}\",\n \".lt[aria-pressed=true]{background:#fff;color:#1a1612;box-shadow:0 1px 2px rgba(26,22,18,.2)}\",\n \".lt.e{color:#d0103a}\",\n \".lt.e:hover{background:rgba(208,16,58,.1)}\",\n \".lt.e[aria-pressed=true]{background:#d0103a;color:#fff}\",\n \".kl,.ka,.lo{display:inline-flex;align-items:center;gap:7px;height:34px;padding:0 14px;border-radius:8px;font-weight:700;font-size:14px;white-space:nowrap;box-sizing:border-box}\",\n \".kl,.lo{border:1.5px solid #1a1612;background:#fff;color:#1a1612}\",\n \".kl:hover,.lo:hover{background:#efe8dc}\",\n \".ka{border:0;background:#1a1612;color:#fbf8f3}\",\n \".ka:hover{background:#3a332c}\",\n \".lo{font-weight:600}\",\n \".lt:focus-visible,.kl:focus-visible,.ka:focus-visible,.lo:focus-visible,.lc:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lck{margin:0;padding:0 18px 8px}\",\n \".lck[hidden]{display:none}\",\n \".lq{color:#1e3a8a;font-weight:700;text-decoration:none}\",\n \".lq:hover{text-decoration:underline;text-underline-offset:2px}\",\n \".wc{color:#1f7a3f;font-weight:400}\",\n \".nw .wc{display:none}\",\n \".lw{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:#1f7a3f;cursor:pointer}\",\n \".lw input{width:16px;height:16px;margin:0;accent-color:#c2410c;cursor:pointer}\",\n \".lw input:focus-visible{outline:3px solid #c2410c;outline-offset:2px}\",\n \".lq.bad{color:#d0103a}\",\n \".lq:focus-visible{outline:3px solid #c2410c;outline-offset:2px;border-radius:2px}\",\n \".ll{list-style:none;margin:0;padding:0}\",\n \".lx{display:grid;grid-template-columns:72px 80px 1fr;gap:2px 12px;padding:6px 18px;align-items:baseline}\",\n \".lx:hover{background:#f3ede3}\",\n \".lx .bd{min-width:0;overflow-wrap:anywhere}\",\n \".lx.bad{background:rgba(208,16,58,.07)}\",\n \".tm,.st{font:500 14px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;color:#5f564c}\",\n \".st{font-weight:700}\",\n \".ok .st{color:#1f7a3f}.bad .st{color:#d0103a}.skip .st{color:#5f564c}.info .st{color:#1e3a8a}\",\n \".ft{color:#1e3a8a}.bad .ft{color:#d0103a}\",\n \".lc{display:inline-block;min-width:24px;padding:0 6px;border:1px dashed #1a1612;border-radius:999px;background:none;font-size:14px;line-height:1.4;text-align:center}\",\n \".lc:hover{background:rgba(26,22,18,.08)}\"\n].join(\"\");\nvar ownName = false, tabWide = false;\nfunction openTab() {\n var w = window.open(\"\", \"_blank\");\n if (!w) {\n tabMsg.hidden = false;\n return;\n }\n tabMsg.hidden = true;\n logTab = w;\n if (!window.name) {\n window.name = \"tab-trail-\" + Date.now();\n ownName = true;\n }\n var d = w.document;\n d.title = \"Tab trail log: \" + location.host;\n try {\n var tsh = new w.CSSStyleSheet();\n tsh.replaceSync(TAB_CSS);\n d.adoptedStyleSheets = [tsh];\n } catch (e) {\n var st = d.createElement(\"style\");\n st.textContent = TAB_CSS;\n d.head.appendChild(st);\n }\n var hd = d.createElement(\"div\");\n hd.className = \"hd\";\n var h1 = d.createElement(\"h1\");\n h1.textContent = \"Tab trail log\";\n hd.appendChild(h1);\n tabSum = d.createElement(\"p\");\n tabSum.className = \"u\";\n hd.appendChild(tabSum);\n var cp = d.createElement(\"button\");\n cp.type = \"button\";\n cp.className = \"kl\";\n icon(cp, 16, COPY_ICON, 1.6);\n cp.appendChild(d.createTextNode(\"Copy log\"));\n cp.addEventListener(\"click\", function () { copyIt(cp, w, logText(), \"Copy log\"); });\n hd.appendChild(cp);\n var ca = d.createElement(\"button\");\n ca.type = \"button\";\n ca.className = \"ka\";\n icon(ca, 16, AI_ICON, 1.6);\n ca.appendChild(d.createTextNode(\"Copy for AI\"));\n ca.addEventListener(\"click\", function () { copyIt(ca, w, aiText(), \"Copy for AI\"); });\n hd.appendChild(ca);\n var bk = d.createElement(\"button\");\n bk.type = \"button\";\n bk.className = \"lo\";\n bk.textContent = \"Put back in panel\";\n bk.addEventListener(\"click\", putBack);\n hd.appendChild(bk);\n var fw = d.createElement(\"button\");\n fw.type = \"button\";\n fw.className = \"fw\";\n fw.setAttribute(\"aria-label\", \"Full width\");\n fw.title = \"Full width\";\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n icon(fw, 16, \"M1.5 8h13M1.5 8l3-3M1.5 8l3 3M14.5 8l-3-3M14.5 8l-3 3\", 1.6).setAttribute(\"class\", \"out\");\n icon(fw, 16, \"M1.5 8h4.5M6 8l-3-3M6 8l-3 3M14.5 8H10M10 8l3-3M10 8l3 3\", 1.6).setAttribute(\"class\", \"in\");\n fw.addEventListener(\"click\", function () {\n tabWide = !tabWide;\n d.body.classList.toggle(\"wide\", tabWide);\n fw.setAttribute(\"aria-pressed\", tabWide ? \"true\" : \"false\");\n });\n hd.appendChild(fw);\n d.body.classList.toggle(\"wide\", tabWide);\n tabNote = d.createElement(\"p\");\n tabNote.className = \"nt\";\n tabNote.textContent = \"Tab trail was closed on the page. This log no longer updates.\";\n tabNote.hidden = true;\n hd.appendChild(tabNote);\n var fr = d.createElement(\"div\");\n fr.className = \"fr\";\n hd.appendChild(fr);\n tabSet = filters(fr, d);\n wcagBox(fr, d);\n d.body.appendChild(hd);\n d.body.classList.toggle(\"nw\", !showWcag);\n var bd = d.createElement(\"div\");\n bd.className = \"box\";\n d.body.appendChild(bd);\n tabChecked = d.createElement(\"p\");\n tabChecked.className = \"lck\";\n bd.appendChild(tabChecked);\n tabList = d.createElement(\"ul\");\n tabList.className = \"ll\";\n bd.appendChild(tabList);\n tabPoll = setInterval(function () {\n if (logTab && logTab.closed) {\n tabGone();\n logDraw();\n }\n }, 1000);\n logOpen = true;\n logDraw();\n}\nfunction putBack() {\n var w = logTab;\n tabGone();\n logOpen = true;\n logDraw();\n if (w && !w.closed) w.close();\n}\nfunction lbtn(cls, text, parent) {\n var b = document.createElement(\"button\");\n b.type = \"button\";\n b.className = cls;\n b.textContent = text;\n parent.appendChild(b);\n return b;\n}\nvar logGroup = document.createElement(\"div\");\nlogGroup.className = \"lgp\";\nvar logBtn = document.createElement(\"button\");\nlogBtn.type = \"button\";\nlogBtn.className = \"sg\";\nlogBtn.setAttribute(\"aria-expanded\", \"false\");\nvar logWord = document.createElement(\"b\");\nlogWord.textContent = \"Log\";\nicon(logBtn, 16, \"M4 1.5h8v13H4zM6.5 5h3M6.5 8h3M6.5 11h2\", 1.6);\nlogBtn.appendChild(logWord);\nvar logSum = document.createElement(\"span\");\nlogSum.className = \"ls\";\nvar logBad = document.createElement(\"span\");\nlogBad.className = \"bg\";\nvar logInfo = document.createElement(\"span\");\nlogInfo.appendChild(logSum);\nlogBtn.appendChild(logInfo);\nlogBtn.appendChild(logBad);\nlogBtn.appendChild(document.createElement(\"i\"));\nlogGroup.appendChild(logBtn);\nvar logBody = document.createElement(\"div\");\nlogBody.className = \"lbd\";\nlogBody.hidden = true;\nlogGroup.appendChild(logBody);\nvar logTop = document.createElement(\"div\");\nlogTop.className = \"lr lrt\";\nlogBody.appendChild(logTop);\nvar logChecked = document.createElement(\"p\");\nlogChecked.className = \"lck\";\nlogChecked.hidden = true;\nlogBody.appendChild(logChecked);\nfilters(logBody, document);\nwcagBox(logBody, document);\nvar logList = document.createElement(\"ul\");\nlogList.className = \"ll\";\nlogBody.appendChild(logList);\nvar logRow = document.createElement(\"div\");\nlogRow.className = \"lr lb2\";\nlogBody.appendChild(logRow);\nvar copyBtn = lbtn(\"kl\", \"Copy log\", logRow);\ncopyBtn.insertBefore(icon(copyBtn, 16, COPY_ICON, 1.6), copyBtn.firstChild);\ncopyBtn.addEventListener(\"click\", function () { copyIt(copyBtn, window, logText(), \"Copy log\"); });\nvar aiLog = lbtn(\"ka\", \"Copy for AI\", logRow);\naiLog.insertBefore(icon(aiLog, 16, AI_ICON, 1.6), aiLog.firstChild);\naiLog.addEventListener(\"click\", function () { copyIt(aiLog, window, aiText(), \"Copy for AI\"); });\nfunction newTabBtn(parent) {\n var b = lbtn(\"lnt\", \"\", parent);\n icon(b, 14, \"M9 2.5h4.5V7M13.5 2.5L7.5 8.5M12 9.5v4h-9.5v-9.5h4\", 1.6);\n b.appendChild(document.createTextNode(\"Open log in new tab\"));\n b.addEventListener(\"click\", openTab);\n return b;\n}\nnewTabBtn(logTop);\nvar logEnd = document.createElement(\"div\");\nlogEnd.className = \"lr\";\nlogBody.insertBefore(logEnd, logRow.nextSibling);\nnewTabBtn(logEnd);\nvar tabMsg = document.createElement(\"p\");\ntabMsg.className = \"lm\";\ntabMsg.textContent = \"The browser blocked the new tab. Allow pop-ups for this site and try again.\";\ntabMsg.hidden = true;\nlogBody.insertBefore(tabMsg, logChecked);\nvar logAway = document.createElement(\"div\");\nlogAway.className = \"la\";\nlogAway.hidden = true;\nvar awayText = document.createElement(\"p\");\nawayText.textContent = \"The log is open in a new tab.\";\nlogAway.appendChild(awayText);\nvar awayRow = document.createElement(\"div\");\nawayRow.className = \"lr\";\nlogAway.appendChild(awayRow);\nlbtn(\"lo\", \"Show it\", awayRow).addEventListener(\"click\", function () { if (tabOpen()) logTab.focus(); });\nlbtn(\"lo\", \"Put it back\", awayRow).addEventListener(\"click\", putBack);\nlogGroup.appendChild(logAway);\nlogBtn.addEventListener(\"click\", function () {\n if (tabOpen()) return logTab.focus();\n logOpen = !logOpen;\n logDraw();\n if (!logOpen) return;\n var gr = logGroup.getBoundingClientRect(), pr = panel.getBoundingClientRect();\n if (gr.bottom > pr.bottom) panel.scrollTop += Math.min(gr.bottom - pr.bottom, gr.top - pr.top);\n});\ntray.insertBefore(logGroup, tray.firstChild);\nlogGroup.className = \"lgp sec\";\n[[legendBtn, legend], [keysBtn, keysBox], [gear, settings]].forEach(function (p) {\n var w = document.createElement(\"div\");\n w.className = \"sec\";\n tray.insertBefore(w, p[0]);\n w.appendChild(p[0]);\n w.appendChild(p[1]);\n});\n[logBtn, legendBtn, keysBtn, gear].forEach(function (b) {\n var g = b.querySelector(\"svg\"), t = document.createElement(\"span\");\n t.className = \"ic\";\n b.insertBefore(t, g);\n t.appendChild(g);\n});\nwcagSync();\nlogSummary();\nroot.appendChild(panel);\nskipPanel();\nvar closed = false;\nfunction place() {\n if (closed) return;\n var m = modal(), to = m || document.documentElement;\n if (host.parentNode !== to) to.appendChild(host);\n var want = { position: m ? \"fixed\" : \"absolute\", left: m ? -scrollX + \"px\" : \"0px\", top: m ? -scrollY + \"px\" : \"0px\" };\n for (var k in want) if (host.style[k] !== want[k]) host.style[k] = want[k];\n}\nplace();\n\nfunction el(name, attrs, parent) {\n var n = document.createElementNS(NS, name);\n for (var k in attrs) n.setAttribute(k, attrs[k]);\n parent.appendChild(n);\n return n;\n}\nvar queued = false, onlyScreen = true, boxKey = [];\nvar current = -1;\nvar pinned = new WeakMap();\nfunction isPinned(e) {\n if (pinned.has(e)) return pinned.get(e);\n var p = false;\n for (var n = e; n && n.nodeType === 1; n = n.parentElement || (n.getRootNode() && n.getRootNode().host)) {\n var pos = getComputedStyle(n).position;\n if (pos === \"fixed\" || pos === \"sticky\") { p = true; break; }\n }\n pinned.set(e, p);\n return p;\n}\nfunction clear(g) { while (g.firstChild) g.removeChild(g.firstChild); }\nvar spotEl = null;\nfunction lit(r) {\n clear(spot);\n if (!light.checked) return;\n var W = innerWidth, H = innerHeight, d = \"M0 0H\" + W + \"V\" + H + \"H0Z\";\n if (r && (r.width || r.height)) {\n var x0 = r.left - 6, y0 = r.top - 6, x1 = r.right + 6, y1 = r.bottom + 6, k = Math.min(8, (x1 - x0) / 2, (y1 - y0) / 2);\n d += \"M\" + (x0 + k) + \" \" + y0 + \"H\" + (x1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x1 + \" \" + (y0 + k) + \"V\" + (y1 - k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x1 - k) + \" \" + y1 + \"H\" + (x0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + x0 + \" \" + (y1 - k) + \"V\" + (y0 + k) + \"A\" + k + \" \" + k + \" 0 0 1 \" + (x0 + k) + \" \" + y0 + \"Z\";\n }\n el(\"path\", { d: d, fill: \"rgba(15,12,10,.72)\", \"fill-rule\": \"evenodd\" }, spot);\n}\nfunction box(m, r, layer) {\n if (m === shownEl) {\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, layer);\n el(\"rect\", { x: r.left - 6, y: r.top - 6, width: r.width + 12, height: r.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, layer);\n }\n el(\"rect\", { x: r.left, y: r.top, width: r.width, height: r.height, fill: \"rgba(208,16,58,.12)\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\", rx: 3 }, layer);\n}\nfunction trailLine(pts, layer) {\n if (pts.length < 2) return;\n var p = pts.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \");\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 6, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\", opacity: 0.9 }, layer);\n el(\"polyline\", { points: p, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 3, \"stroke-linejoin\": \"round\", \"stroke-linecap\": \"round\" }, layer);\n}\nfunction dotsIn(list, layer) {\n list.sort(function (a, b) { return (a[2] - 1 === current) - (b[2] - 1 === current); });\n list.forEach(function (d) {\n var big = d[2] > 99, on = d[2] - 1 === current;\n var g = el(\"g\", { class: \"o\", \"data-i\": d[2] - 1 }, layer), ds = stops[d[2] - 1];\n if (ds) el(\"title\", {}, g).textContent = d[2] + \" \\u00b7 \" + roleOf(ds) + \" \\u00b7 \" + (nameOf.get(ds) || \"no name\");\n if (on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 19 : 17, fill: \"none\", stroke: \"#ff8f57\", \"stroke-width\": 4 }, g);\n if (d[3] && !on) el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: \"#fff\", stroke: \"#1a1612\", \"stroke-width\": 2, \"stroke-dasharray\": \"4 3\" }, g);\n else el(\"circle\", { cx: d[0], cy: d[1], r: big ? 14 : 12, fill: on ? \"#c2410c\" : \"#1a1612\", stroke: \"#fff\", \"stroke-width\": 2 }, g);\n var t = el(\"text\", { x: d[0], y: d[1] + 0.5, fill: d[3] && !on ? \"#1a1612\" : \"#fff\", \"font-size\": big ? 10 : 11, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\", \"text-anchor\": \"middle\", \"dominant-baseline\": \"middle\" }, g);\n t.textContent = d[2];\n });\n}\nfunction shortLines(pts, sx, sy) {\n var W = innerWidth, H = innerHeight, MAX = 100;\n var v = pts.map(function (p) { return p[2] ? [p[0], p[1]] : [p[0] - sx, p[1] - sy]; });\n function on(p) { return p[0] >= 0 && p[0] <= W && p[1] >= 0 && p[1] <= H; }\n function arrow(from, to, L) {\n var dx = to[0] - from[0], dy = to[1] - from[1], len = Math.sqrt(dx * dx + dy * dy) || 1;\n var ux = dx / len, uy = dy / len;\n var tip = [from[0] + ux * L, from[1] + uy * L];\n trailLine([from, tip], svg);\n var pts3 = [[tip[0] + ux * 6, tip[1] + uy * 6], [tip[0] - ux * 9 + uy * 9, tip[1] - uy * 9 - ux * 9], [tip[0] - ux * 9 - uy * 9, tip[1] - uy * 9 + ux * 9]];\n el(\"polygon\", { points: pts3.map(function (q) { return q[0] + \",\" + q[1]; }).join(\" \"), fill: \"#ff8f57\", stroke: \"#fff\", \"stroke-width\": 2, \"stroke-linejoin\": \"round\" }, svg);\n }\n for (var k = 1; k < v.length; k++) {\n var a = v[k - 1], b = v[k], ia = on(a), ib = on(b);\n var len = Math.sqrt((b[0] - a[0]) * (b[0] - a[0]) + (b[1] - a[1]) * (b[1] - a[1]));\n if (ia && ib && len <= MAX) trailLine([a, b], svg);\n else if (ia && ib) {\n var L = Math.min(MAX - 6, len / 2 - 12);\n arrow(a, b, L);\n arrow(b, a, L);\n }\n else if (ia || ib) arrow(ia ? a : b, ia ? b : a, Math.min(MAX - 6, len));\n }\n}\nfunction draw() {\n queued = false;\n var page = !onlyScreen;\n onlyScreen = true;\n var sx = scrollX, sy = scrollY;\n var last = Math.max(Math.ceil(stops.length / PAGE) - 1, 0);\n if (win > last) win = last;\n var lo = paged() ? win * PAGE : 0, hi = paged() ? Math.min(lo + PAGE, stops.length) : stops.length;\n var red = [], at = [];\n var edges = {};\n missed.concat(hovers, noRing.filter(live), ghosts.filter(live)).forEach(function (m) {\n var p = isPinned(m), r = m.getBoundingClientRect(), ed = ghostOf.get(m) === \"off\" ? (r.right <= 0 ? \"l\" : r.left >= innerWidth ? \"r\" : r.bottom <= 0 ? \"t\" : r.top >= innerHeight ? \"b\" : \"\") : \"\";\n if (ed) (edges[ed] = edges[ed] || []).push(m);\n else if (p || page) red.push([m, r, p]);\n });\n for (var i = lo; i < hi; i++) {\n var sr = stops[i].getBoundingClientRect(), st = sr.width < 2 && sr.height < 2;\n at.push([sr, st, st || isPinned(stops[i])]);\n }\n var fr = shownEl && hovers.indexOf(shownEl) < 0 && forced.indexOf(shownEl) >= 0 ? [shownEl.getBoundingClientRect(), isPinned(shownEl)] : null;\n var lr = light.checked && spotEl && spotEl.isConnected ? spotEl.getBoundingClientRect() : null;\n var key = [shownEl, skipBad && skipBad.why];\n red.forEach(function (x) { if (!x[2]) key.push(x[0], x[1].left + sx, x[1].top + sy, x[1].width, x[1].height); });\n if (fr && !fr[1]) key.push(fr[0].left + sx, fr[0].top + sy, fr[0].width, fr[0].height);\n var keep = page && same(key, boxKey);\n if (page) boxKey = key;\n clear(svg);\n clear(dot);\n clear(under);\n lit(lr);\n if (page) {\n clear(svgPg);\n clear(dotPg);\n if (!keep) clear(underPg);\n }\n red.forEach(function (x) {\n var m = x[0], r = x[1];\n if (x[2]) box(m, r, under);\n else if (!keep) box(m, { left: r.left + sx, top: r.top + sy, width: r.width, height: r.height }, underPg);\n });\n Object.keys(edges).forEach(function (ed) {\n var vw = Math.min(innerWidth, document.documentElement.clientWidth || innerWidth), vh = Math.min(innerHeight, document.documentElement.clientHeight || innerHeight), v = ed === \"l\" || ed === \"r\", max = v ? vh : vw, lo = max, hi = 0;\n edges[ed].forEach(function (m) {\n var r = m.getBoundingClientRect();\n lo = Math.min(lo, v ? r.top : r.left);\n hi = Math.max(hi, v ? r.bottom : r.right);\n });\n lo = Math.max(4, Math.min(lo, max - 144));\n hi = Math.min(max - 4, Math.max(hi, lo + 140));\n var x = v ? (ed === \"r\" ? vw - 36 : 4) : lo, y = v ? lo : ed === \"b\" ? vh - 36 : 4, w = v ? 32 : hi - lo, h = v ? hi - lo : 32;\n el(\"rect\", { x: x, y: y, width: w, height: h, rx: 6, fill: \"rgba(208,16,58,.12)\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\" }, under);\n el(\"path\", { d: { r: \"M-5 -9l10 9-10 9\", l: \"M5 -9l-10 9 10 9\", t: \"M-9 5l9-10 9 10\", b: \"M-9 -5l9 10 9-10\" }[ed], transform: \"translate(\" + (x + (v ? 16 : 22)) + \" \" + (y + (v ? 22 : 16)) + \")\", fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }, under);\n var t = el(\"text\", { x: 0, y: 0, transform: \"translate(\" + (x + w / 2) + \" \" + (y + h / 2) + \")\" + (v ? \" rotate(-90)\" : \"\"), fill: \"#d0103a\", stroke: \"#fff\", \"stroke-width\": 3, \"paint-order\": \"stroke\", \"font-size\": 11, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\", \"text-anchor\": \"middle\", \"dominant-baseline\": \"middle\" }, under);\n t.textContent = runs(edges[ed]).map(span).join(\", \");\n });\n costGoals.concat(pickAt ? [{ el: pickAt, pick: 1 }] : []).forEach(function (g) {\n if (!g.el.isConnected) return;\n var q = g.el.getBoundingClientRect(), t = g.pick ? \"Click to make \" + label(g.el) + \" a goal\" : g.name + \": \" + g.presses;\n el(\"rect\", { x: q.left - 4, y: q.top - 4, width: q.width + 8, height: q.height + 8, fill: \"none\", stroke: \"#c2410c\", \"stroke-width\": 3, \"stroke-dasharray\": g.pick ? \"7 5\" : \"\", rx: 6 }, under);\n el(\"rect\", { x: q.right + 10, y: q.top + q.height / 2 - 11, width: t.length * 6.6 + 16, height: 22, fill: \"#c2410c\", rx: 11 }, under);\n el(\"text\", { x: q.right + 18, y: q.top + q.height / 2 + 4, fill: \"#fff\", \"font-size\": 12, \"font-weight\": 700, \"font-family\": \"system-ui,sans-serif\" }, under).textContent = t;\n });\n if (tint && mapOn.checked) tint[0].filter(function (m) { return m.isConnected; }).forEach(function (m) {\n var q = m.getBoundingClientRect();\n el(\"rect\", { x: q.left, y: q.top, width: q.width, height: q.height, fill: tint[1], \"fill-opacity\": 0.12, stroke: tint[1], \"stroke-width\": 2, rx: 4 }, under);\n });\n if (skipBad && skipBad.link.isConnected && page && !keep) {\n var ka = skipBad.link.getBoundingClientRect(), kt = skipBad.to && shown(skipBad.to) ? skipBad.to : mainRegion(), kb = kt ? kt.getBoundingClientRect() : null;\n var ax = Math.max(ka.left + sx, 13) + 14, ay = Math.max(ka.bottom + sy, 26) + 4, bx = kb ? kb.left + sx + 16 : ax + 160, by = kb ? Math.max(kb.top + sy + 16, ay + 40) : ay + 80;\n el(\"path\", { d: \"M\" + ax + \" \" + ay + \"L\" + bx + \" \" + by, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-dasharray\": \"7 5\", \"stroke-linecap\": \"round\" }, underPg);\n el(\"circle\", { cx: bx, cy: by, r: 11, fill: \"#fff\", stroke: \"#d0103a\", \"stroke-width\": 3 }, underPg);\n el(\"path\", { d: \"M\" + (bx - 5) + \" \" + (by - 5) + \"l10 10m0 -10l-10 10\", stroke: \"#d0103a\", \"stroke-width\": 3, \"stroke-linecap\": \"round\" }, underPg);\n }\n if (fr) {\n var hr = fr[0], hp = fr[1];\n if (hp || (page && !keep)) {\n var hx = hp ? hr.left : hr.left + sx, hy = hp ? hr.top : hr.top + sy, hl = hp ? under : underPg;\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#fff\", \"stroke-width\": 8, rx: 6 }, hl);\n el(\"rect\", { x: hx - 6, y: hy - 6, width: hr.width + 12, height: hr.height + 12, fill: \"none\", stroke: \"#d0103a\", \"stroke-width\": 4, rx: 6 }, hl);\n }\n }\n var hid = 0, placedPg = [], placedSc = [], pts = [], dotsPg = [], dotsSc = [];\n var big = stops.length > PAGE;\n group.style.display = big ? \"\" : \"none\";\n pager.style.display = paged() ? \"\" : \"none\";\n chunkBox.style.marginTop = paged() ? \"\" : \"0\";\n if (paged()) {\n pageText.textContent = \"Stops \" + (lo + 1) + \" to \" + hi + \" of \" + stops.length;\n prevBtn.disabled = win === 0;\n nextBtn.disabled = win === last;\n }\n stops.forEach(function (s, i) {\n if (i < lo || i >= hi) return;\n var r = at[i - lo][0];\n var tiny = at[i - lo][1];\n var onScreen = at[i - lo][2];\n var cx = tiny ? 13 + hid++ * 30 : onScreen ? Math.max(r.left - 8, 13) : Math.max(r.left + sx - 8, 13);\n var cy = tiny ? 13 : onScreen ? Math.max(r.top - 8, 13) : Math.max(r.top + sy - 8, 13);\n var placed = onScreen ? placedSc : placedPg;\n for (var j = placed.length - 1, tries = 0; j >= 0 && tries < 40; j--) {\n if (Math.abs(placed[j][0] - cx) < 26 && Math.abs(placed[j][1] - cy) < 26) {\n cx = placed[j][0] + 28;\n j = placed.length;\n tries++;\n }\n }\n placed.push([cx, cy]);\n pts.push([cx, cy, onScreen]);\n (onScreen ? dotsSc : dotsPg).push([cx, cy, i + 1, tiny]);\n });\n if (lines.checked && !stub.checked) shortLines(pts, sx, sy);\n var run = [], runPg = null;\n function flush() {\n if (runPg === null) return;\n if (runPg) { if (page) trailLine(run, svgPg); }\n else trailLine(run, svg);\n run = [];\n runPg = null;\n }\n for (var k = lines.checked && stub.checked ? 1 : pts.length; k < pts.length; k++) {\n var a = pts[k - 1], b = pts[k], both = !a[2] && !b[2];\n if (runPg !== both) {\n flush();\n runPg = both;\n run.push(both || a[2] ? [a[0], a[1]] : [a[0] - sx, a[1] - sy]);\n }\n run.push(both || b[2] ? [b[0], b[1]] : [b[0] - sx, b[1] - sy]);\n }\n flush();\n if (page) dotsIn(dotsPg, dotPg);\n dotsIn(dotsSc, dot);\n}\nfunction queue(screenOnly) {\n if (screenOnly !== true) onlyScreen = false;\n if (!queued) { queued = true; requestAnimationFrame(draw); }\n}\nvar timer = 0, idle = 0, nextScan = 0, settling = false;\nfunction same(a, b) {\n if (a.length !== b.length) return false;\n for (var i = 0; i < a.length; i++) if (a[i] !== b[i]) return false;\n return true;\n}\nfunction rescan() {\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n timer = 0;\n idle = 0;\n if (closed) return;\n if (settling) return later();\n var t0 = performance.now();\n place();\n pinned = new WeakMap();\n scan();\n var fa = deep();\n noOutline = null;\n stops.forEach(function (x) { if (x !== fa && !restSig.has(x)) rest(x); });\n skipCheck();\n if (!same(drawn, sig())) {\n fill();\n scan();\n renderJumps();\n review();\n }\n focus();\n var t1 = performance.now();\n nextScan = t1 + Math.max(500, 4 * (t1 - t0));\n}\nvar due = 0;\nfunction later(min) {\n if (idle || closed) return;\n var wait = Math.max(min || 500, nextScan - performance.now());\n if (timer) {\n if (performance.now() + wait >= due) return;\n clearTimeout(timer);\n }\n due = performance.now() + wait;\n timer = setTimeout(function () {\n timer = 0;\n if (window.requestIdleCallback) idle = requestIdleCallback(rescan, { timeout: 1000 });\n else rescan();\n }, wait);\n}\nvar LOUD = /^(tabindex|disabled|inert|href|role|open|hidden)$/;\nfunction matters(m) {\n var t = m.target;\n if (t === host || host.contains(t)) return false;\n if (m.type === \"childList\") {\n var l = [].concat([].slice.call(m.addedNodes), [].slice.call(m.removedNodes));\n for (var i = 0; i < l.length; i++) if (l[i].nodeType === 1) return true;\n return false;\n }\n if (LOUD.test(m.attributeName || \"\") || t.nodeType !== 1) return true;\n if (stopSet.has(t) || upSet.has(t) || t.matches(FOCUSABLE) || t.querySelector(FOCUSABLE)) return true;\n return missed.concat(hovers, forced).some(function (x) { return t === x || t.contains(x); });\n}\nfunction onMoved(e) { if (host.style.position === \"fixed\") place(); queue((stub.checked || !lines.checked) && !!e && e.type === \"scroll\" && (e.target === document || e.target === document.documentElement)); later(); }\nvar watch = new MutationObserver(function (list) {\n place();\n if (openPop && gone(openPop)) popClosed();\n for (var i = 0; i < list.length; i++) if (matters(list[i])) return later();\n later(3000);\n});\nfunction focus() {\n var a = deep();\n track(a);\n if (a && a !== document.body && a !== document.documentElement) {\n lost = false;\n if (a !== host && a.getRootNode() !== root) spotEl = a;\n } else spotEl = null;\n current = stops.indexOf(a);\n if (current !== seen) {\n seen = current;\n if (current >= 0) win = Math.floor(current / PAGE);\n }\n queue();\n}\nfunction lose(e) {\n var t = e && !e.relatedTarget && e.composedPath ? e.composedPath()[0] : null, p = t && t.nodeType === 1 ? popupOf(t) : null;\n if (p && p === openPop) requestAnimationFrame(function () { if (!closed && openPop === p && gone(p)) popClosed(); });\n setTimeout(function () {\n var a = document.activeElement;\n if (a && a !== document.body && a !== document.documentElement) return;\n lost = true;\n focus();\n }, 0);\n}\nvar walking = false, walkDelay = 400, walkT = 0, walked = new Set(), walkAt = null, walkEnd = null;\nfunction walkedN() { return stops.filter(function (s) { return walked.has(s); }).length; }\nfunction playState() {\n var at = walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) + \" \\\"\" + label(walkAt) + \"\\\"\" : \"\";\n var n = \"walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\");\n if (walking) return \"still walking\" + at + \", \" + n;\n return walkEnd === \"done\" ? \"finished, \" + n : \"paused\" + at + \", \" + n;\n}\nfunction playLook() {\n while (playIcon.firstChild) playIcon.removeChild(playIcon.firstChild);\n icon(playIcon, 12, walking ? \"M5 3v10M11 3v10\" : \"M4 2.5l9 5.5-9 5.5z\", 2.4);\n playWord.textContent = walking ? \"Pause\" : \"Play\";\n play.setAttribute(\"aria-pressed\", walking ? \"true\" : \"false\");\n if (walked.size) playText.textContent = \"Walked \" + walkedN() + \" of \" + stops.length + \" stops\";\n}\nfunction walkedText() { return \" after \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\"; }\nfunction stopWalk(why, fin) {\n if (!walking) return;\n walking = false;\n walkEnd = fin ? \"done\" : \"paused\";\n settling = false;\n if (walkT) clearTimeout(walkT);\n walkT = 0;\n playLook();\n if (why) log(\"INFO\", \"Play it\", [why]);\n sumDraw();\n if (fin) announce(\"Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \". \" + pl(logCounts().bad, \"problem\", \"problems\") + \".\");\n else if (why) announce(\"Play paused\" + (walkAt && stops.indexOf(walkAt) >= 0 ? \" at stop \" + (stops.indexOf(walkAt) + 1) : \"\") + \". Walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\");\n var done = walkDone;\n walkDone = [];\n done.forEach(function (f) { f(aiText()); });\n}\nfunction step(s) {\n walkT = 0;\n if (!walking || closed) return;\n if (!s || stops.indexOf(s) < 0) s = stops.filter(function (x) { return !walked.has(x); })[0];\n if (!s) {\n stopWalk(\"Finished: walked \" + walkedN() + \" of \" + pl(stops.length, \"stop\", \"stops\") + \".\", true);\n return;\n }\n endPress();\n if (s !== deep()) rest(s);\n s.focus({ focusVisible: true });\n focus();\n walked.add(s);\n walkAt = s;\n playLook();\n var at = where(s), still = 0, tries = 0;\n settling = true;\n function wait() {\n if (!walking || closed) return void (settling = false);\n var now = where(s);\n if (now !== at) {\n at = now;\n still = 0;\n } else still++;\n if (++tries < 90 && (still < 2 || tries < 6)) return requestAnimationFrame(wait);\n settling = false;\n hoverTry(s);\n check(s, function () {\n if (walking && !closed) walkT = setTimeout(function () { step(); }, walkDelay);\n });\n }\n requestAnimationFrame(wait);\n}\nvar walkDone = [];\nfunction untested() {\n var judged = {};\n logs.forEach(function (e) { if ((e.k === \"OK\" || e.k === \"PROBLEM\") && (e.f === \"Lost focus\" || e.f === \"Broken skip link\" || e.f === \"No way out\")) judged[e.f] = 1; });\n if (judgedDir[1] && judgedDir[-1]) judged[\"Out of order\"] = judged[\"Keyboard trap\"] = 1;\n openProbs().forEach(function (e) { judged[e.f] = 1; });\n return [\"Out of order\", \"Keyboard trap\", \"Lost focus\", \"No way out\", \"Broken skip link\"].filter(function (f) { return !judged[f]; });\n}\nfunction sumDraw() {\n sumLine.hidden = walking || walkEnd !== \"done\";\n if (sumLine.hidden) return;\n var per = {}, probs = openProbs(), left = untested();\n probs.forEach(function (e) { per[e.f] = (per[e.f] || 0) + 1; });\n var red = CHECKS.filter(function (f) { return per[f]; }), ok = CHECKS.filter(function (f) { return !per[f] && left.indexOf(f) < 0; });\n var tabLeft = left.indexOf(\"Out of order\") >= 0 || left.indexOf(\"Keyboard trap\") >= 0, popLeft = left.indexOf(\"Lost focus\") >= 0 || left.indexOf(\"No way out\") >= 0;\n while (sumLine.firstChild) sumLine.removeChild(sumLine.firstChild);\n var b = document.createElement(\"b\");\n b.textContent = pl(CHECKS.length, \"check\", \"checks\") + \": \" + ok.length + \" passed, \" + red.length + (red.length === 1 ? \" found a problem, \" : \" found problems, \") + left.length + \" not tested.\";\n sumLine.appendChild(b);\n function part(head, list, cls, count) {\n if (!list.length) return;\n sumLine.appendChild(document.createTextNode(\" \" + head + \": \"));\n var sp = document.createElement(\"span\");\n sp.className = cls;\n sp.textContent = list.map(function (f) { return f + (count ? \" \" + per[f] : \"\"); }).join(\", \");\n sumLine.appendChild(sp);\n sumLine.appendChild(document.createTextNode(\".\"));\n }\n part(\"Passed\", ok, \"g\");\n part(red.length === 1 ? \"Problem\" : \"Problems\", red, \"e\", true);\n part(\"Not tested (\" + [tabLeft ? \"press Tab and Shift+Tab\" : \"\", popLeft ? \"open and close a popup\" : \"\", left.indexOf(\"Broken skip link\") >= 0 ? \"the page has no main region\" : \"\"].filter(Boolean).join(\", \") + \")\", left, \"q\");\n}\nfunction startWalk() {\n walking = true;\n sumDraw();\n if (walkedN() >= stops.length) walked = new Set();\n playLook();\n var first = current >= 0 && current < stops.length - 1 && walked.size ? current + 1 : 0;\n if (stops[first]) {\n log(\"INFO\", \"Play it\", [first ? \"Went on from \" : \"Started at \", ref(stops[first]), \".\"]);\n announce((first ? \"Play went on from stop \" : \"Play started at stop \") + (first + 1) + \".\");\n }\n step(stops[first]);\n}\nplay.addEventListener(\"click\", function () {\n if (walking) return stopWalk(\"Paused with the Pause button\" + walkedText());\n walkDelay = 400;\n startWalk();\n});\nfunction interrupt(e) {\n if (picking) return;\n if (!walking || (e.composedPath && e.composedPath().indexOf(host) >= 0)) return;\n stopWalk(\"Paused by a click on the page\" + walkedText());\n}\nplayLook();\nvar SAFARI = MAC && /^Safari /.test(browser()), FIREFOX = MAC && /^Firefox /.test(browser());\nvar settleT = 0, macNote = false, beforeEl = null, wantEl = null, MAC_NOTE = SAFARI ? \"Safari skips links and buttons on Tab until you turn it on: Settings, Advanced, Press Tab to highlight each item.\" : \"Firefox skips links on Tab until you turn it on: System Settings, Keyboard, Keyboard navigation.\";\nvar LINKS = \"a[href],area[href]\", SKIPS = SAFARI ? [\"a[href]\", \"area[href]\", \"button\", \"input[type=button]\", \"input[type=submit]\", \"input[type=reset]\", \"input[type=image]\", \"input[type=checkbox]\", \"input[type=radio]\", \"input[type=range]\", \"input[type=file]\", \"input[type=color]\"].map(function (q) { return q + \":not([tabindex])\"; }).join(\",\") : LINKS;\nfunction linkSkip(want, cur, dir) {\n if (!SAFARI && !FIREFOX) return null;\n var n = stops.length, k = 0, links = 0;\n for (var i = want; i !== cur && k < n; i = (i + dir + n) % n, k++) {\n if (!stops[i].matches(SKIPS)) return null;\n if (stops[i].matches(LINKS)) links++;\n }\n return k && k < n ? [links, k - links] : null;\n}\nfunction skipText(c) {\n var l = c[0] ? pl(c[0], \"link\", \"links\") : \"\", b = c[1] ? pl(c[1], \"button\", \"buttons\") : \"\";\n return l && b ? l + \" and \" + b : l || b;\n}\nfunction after(el, dir) {\n var ord = new Map(), n = stops.length, pick = -1;\n walk(document, []).forEach(function (e, i) { ord.set(e, i); });\n var at = ord.get(el);\n if (at === undefined) return dir > 0 ? 0 : n - 1;\n for (var i = 0; i < n; i++) {\n var k = ord.get(stops[i]);\n if (stops[i].tabIndex > 0 || k === undefined) continue;\n if (dir > 0 && k > at) return i;\n if (dir < 0 && k < at) pick = i;\n }\n return dir > 0 ? 0 : pick >= 0 ? pick : forced.length ? forced.length - 1 : n - 1;\n}\nvar stays = new WeakMap(), leaves = new WeakMap();\nfunction tellsHow(e) {\n if (!(e.tagName === \"TEXTAREA\" || e.isContentEditable || /^(application|textbox)$/.test(e.getAttribute(\"role\") || \"\"))) return false;\n var r = e.getRootNode(), t = (e.getAttribute(\"aria-description\") || \"\") + \" \" + (e.getAttribute(\"aria-keyshortcuts\") || \"\") + \" \" + (e.getAttribute(\"title\") || \"\");\n (e.getAttribute(\"aria-describedby\") || \"\").split(/\\s+/).forEach(function (id) { var x = id && r.getElementById ? r.getElementById(id) : null; if (x) t += \" \" + x.textContent; });\n return /\\b(escape|esc)\\b/i.test(t);\n}\nfunction multi(e) { return /^(IFRAME|OBJECT|EMBED|AUDIO|VIDEO)$/.test(e.tagName) || !!e.shadowRoot || (e.tagName === \"INPUT\" && /^(date|datetime-local|month|time|week)$/.test(e.type)); }\nfunction endPress() {\n if (settleT) {\n clearTimeout(settleT);\n settle();\n }\n pressed = 0;\n}\nfunction settle() {\n settleT = 0;\n focus();\n if (pressed && current >= 0) {\n check(stops[current]);\n hoverTry(stops[current]);\n }\n if (!pressed || current < 0 || before === -2) {\n if (pressed && before === -2) log(\"SKIPPED\", \"Out of order\", [\"Focus was on the page body, so this Tab press is not judged.\"]);\n else if (pressed) {\n var o = deep();\n if (o && o !== document.body && o !== document.documentElement && !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(o), \", which is not in the list of stops. Not judged.\"]);\n else if (!o || !within(host, o)) log(\"SKIPPED\", \"Out of order\", [\"Focus left the page, or went to the browser. Not judged.\"]);\n }\n pressed = 0;\n return;\n }\n var w0 = before >= 0 ? (before + pressed + stops.length) % stops.length : -1;\n if (w0 >= 0 && w0 !== current && !tabbable(stops[w0])) {\n var fromEl = stops[before], toEl = stops[current];\n rescan();\n current = stops.indexOf(toEl);\n before = stops.indexOf(fromEl);\n if (before < 0) beforeEl = fromEl;\n if (current < 0) {\n log(\"SKIPPED\", \"Out of order\", [\"Tab landed on \", ref(toEl), \", which is not in the list of stops. Not judged.\"]);\n pressed = 0;\n return;\n }\n }\n var n = stops.length, src = before >= 0 ? null : beforeEl, first = before < 0 && !src;\n var want = before >= 0 ? (before + pressed + n) % n : src ? after(src, pressed) : pressed > 0 ? 0 : n - 1;\n if (before >= 0 && wantEl && stops.indexOf(wantEl) >= 0) want = stops.indexOf(wantEl);\n var landed = popupOf(stops[current]), left = before >= 0 ? popupOf(stops[before]) : src ? popupOf(src) : null;\n if (landed && landed === left && before >= 0) loopCheck(landed, stops[before], stops[current], pressed);\n if (first && pressed > 0 && !landed && !popMissed) {\n for (var k = 0; k < n && !popMissed; k++) {\n var pop = popupOf(stops[k]);\n if (pop && shown(pop) && blocking(pop)) popMissed = pop;\n }\n if (popMissed) {\n renderJumps();\n announce(\"A popup blocks the page, but the first Tab went somewhere else.\");\n log(\"PROBLEM\", \"Out of order\", [popName(popMissed), \" blocks the page, but the first Tab went to \", ref(stops[current]), \".\"], aiOf(W_ORDER, \"A popup that blocks the page gets keyboard focus first, so the first Tab lands inside it.\", \"When the popup opens, move focus into it: call .focus() on its first control, or on the popup itself with tabindex=\\\"-1\\\". A <dialog> opened with showModal() does this by itself.\", [[\"Popup\", popMissed], [\"First Tab went to\", stops[current]]]));\n }\n }\n var start = before >= 0 ? [ref(stops[before])] : src ? [ref(src)] : [\"Start\"], back = pressed < 0 ? \" (Shift+Tab)\" : \"\";\n if (current === before && current !== want && !landed && !left) {\n var s = stops[current];\n var d = pressed > 0 ? 1 : -1, st = stays.get(s) || stays.set(s, {}).get(s), key1 = d > 0 ? \"Tab\" : \"Shift+Tab\", key2 = d > 0 ? \"Shift+Tab\" : \"Tab\";\n if (multi(s)) log(\"SKIPPED\", \"Out of order\", start.concat([\" \\u2192 \", ref(s), back + \": Tab moved inside it, it has parts of its own (like a date field, a video or a frame). Not judged.\"]));\n else if (tellsHow(s)) {\n if (!st.how) log(\"SKIPPED\", \"Keyboard trap\", [ref(s), \" keeps Tab, and says how to leave.\"]);\n st.how = 1;\n } else if (!st[d] && (leaves.get(s) || {})[-d]) {\n st[d] = 1;\n log(\"OK\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \", but \" + key2 + \" leaves it, so it is not a trap.\"]);\n } else if (!st[d] && !st[-d]) {\n st[d] = 1;\n log(\"SKIPPED\", \"Keyboard trap\", [key1 + \" stays on \", ref(s), \". Press \" + key2 + \": if focus can't leave that way either, it is a keyboard trap.\"]);\n } else if (!st[d] && trapped.indexOf(s) < 0) {\n st[d] = 1;\n trapped.push(s);\n renderJumps();\n announce(\"Keyboard trap: Tab and Shift+Tab both stay on stop \" + (current + 1) + \".\");\n log(\"PROBLEM\", \"Keyboard trap\", [\"Tab and Shift+Tab both stay on \", ref(s), \": the keyboard can't move focus away.\"], aiOf(W_TRAP, \"Tab or Shift+Tab moves focus away from the element, so a keyboard user can leave it.\", \"Find the keydown listener on the element or its parents that calls preventDefault() on Tab, or that calls .focus() on the same element again, and let Tab through. If the element needs Tab (a code editor), let Escape move focus out and say so next to it.\", [[\"Element\", s], [\"Expected next\", stops[(current + 1) % n]]]));\n }\n pressed = 0;\n return;\n }\n if (before >= 0 && current !== before) {\n var lv = leaves.get(stops[before]) || leaves.set(stops[before], {}).get(stops[before]), sd = pressed > 0 ? 1 : -1, so = stays.get(stops[before]);\n if (!lv[sd] && so && so[-sd] && !so[sd] && trapped.indexOf(stops[before]) < 0) log(\"OK\", \"Keyboard trap\", [(sd > 0 ? \"Tab\" : \"Shift+Tab\") + \" leaves \", ref(stops[before]), \", so it is not a trap.\"]);\n lv[sd] = 1;\n }\n var skipped = current !== want && !landed && !left ? linkSkip(want, current, pressed > 0 ? 1 : -1) : null;\n if (first && pressed > 0 && landed) log(\"OK\", \"Out of order\", [\"First Tab went into the popup \", popName(landed), \".\"]);\n else if (skipped) {\n if (!macNote) {\n macNote = true;\n renderJumps();\n log(\"INFO\", \"Out of order\", [MAC_NOTE]);\n }\n log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \": your browser skipped \" + skipText(skipped) + \". Not judged.\"]));\n } else if (current !== want && !landed && !left && !(popMissed && first)) {\n var from = before >= 0 ? stops[before] : src, to = stops[current], fromText = before >= 0 ? \"stop \" + (before + 1) : src ? \"\\\"\" + label(src) + \"\\\" \" + desc(src) : \"the start of the page\";\n announce(\"Tab jumped out of order, from \" + (before >= 0 ? \"stop \" + (before + 1) : src ? label(src) : \"the start\") + \" to stop \" + (current + 1) + \".\");\n if (!jumps.some(function (j) { return j[0] === from && j[1] === to; })) {\n jumps.push([from, to]);\n renderJumps();\n }\n log(\"PROBLEM\", \"Out of order\", start.concat([\" → \", ref(to), back + \", expected \", ref(stops[want]), to.tabIndex > 0 ? \". It has tabindex=\\\"\" + to.tabIndex + \"\\\".\" : \".\"]), aiOf(W_ORDER, \"Tab\" + (pressed < 0 ? \" with Shift\" : \"\") + \" moves from \" + fromText + \" to stop \" + (want + 1) + \", the next element in the Tab order.\", to.tabIndex > 0 ? \"Remove tabindex=\\\"\" + to.tabIndex + \"\\\" from the element Tab jumped to, or set it to 0. A positive tabindex pulls an element ahead of the page order.\" : \"Tab follows the order of the HTML, so a jump comes from a script. Look for code that calls .focus() on focus, blur or keydown near the element Tab left from, and for content added or moved while Tab was pressed. If the element Tab jumped to sits elsewhere in the HTML on purpose, move it next to the one before it.\", [[\"Tab left from\", from], [\"Tab jumped to\", to], [\"Expected next\", stops[want]]]));\n } else if (current !== want) log(\"SKIPPED\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + (landed || left ? \": into or inside a popup, allowed.\" : \": the popup that blocks the page is listed already.\")]));\n else log(\"OK\", \"Out of order\", start.concat([\" → \", ref(stops[current]), back + \", next in line.\"]));\n pressed = 0;\n}\nfunction inPanel() {\n var a = root.activeElement;\n return !!a && panel.contains(a);\n}\nfunction panelCtl() {\n return [].filter.call(panel.querySelectorAll(\"button,a,input\"), function (e) { return !e.disabled && e.getClientRects().length > 0; });\n}\nfunction enter() {\n endPress();\n if (walking) stopWalk(\"Paused by \" + KEYS + walkedText());\n var a = deep();\n pRet = a && a !== document.body && a !== document.documentElement && a !== host && a.getRootNode() !== root ? a : null;\n panelIn = true;\n skipPanel();\n play.focus({ focusVisible: true });\n}\nfunction back() {\n var r = pRet;\n panelIn = false;\n pRet = null;\n skipPanel();\n if (r && r.isConnected) r.focus({ focusVisible: true });\n else {\n var a = root.activeElement;\n if (a && a.blur) a.blur();\n }\n}\nfunction key(e) {\n if (picking && e.key === \"Escape\" && e.isTrusted) {\n e.preventDefault();\n e.stopPropagation();\n return endPick();\n }\n if (e.code === \"KeyF\" && e.ctrlKey && e.shiftKey && !e.altKey && !e.metaKey) {\n e.preventDefault();\n e.stopPropagation();\n if (inPanel()) back();\n else enter();\n return;\n }\n if (e.key !== \"Tab\" && settleT) endPress();\n lastKey = e.key;\n keyT = Date.now();\n keyOn = deep();\n if (walking && (e.key === \" \" || e.key === \"Tab\" || e.key === \"Escape\")) {\n if (e.key === \" \") e.preventDefault();\n stopWalk(\"Paused by \" + (e.key === \" \" ? \"Space\" : e.key) + walkedText());\n if (e.key !== \"Tab\") return;\n }\n if (panelIn && inPanel()) {\n if (e.key === \"Escape\") {\n e.preventDefault();\n return back();\n }\n if (e.key === \"Tab\" && skip.checked) {\n var l = panelCtl(), i = l.indexOf(root.activeElement), n = l.length;\n e.preventDefault();\n if (n) l[i < 0 ? 0 : (i + (e.shiftKey ? -1 : 1) + n) % n].focus({ focusVisible: true });\n return;\n }\n }\n var fa = deep(), onBody = !fa || fa === document.body || fa === document.documentElement;\n if (e.key === \"Escape\" && e.isTrusted && openPop && !gone(openPop)) {\n var ep = openPop;\n setTimeout(function () { if (!closed && openPop === ep && !gone(ep)) log(\"INFO\", \"No way out\", [popName(ep), \": Escape did not close it. WCAG 2.2 AA does not require Escape when Tab reaches a close button; it is a best practice (ARIA APG).\"]); }, 300);\n }\n if (e.key === \"Escape\" && !modal() && !(openPop && !gone(openPop)) && (onBody || inPanel())) close();\n if (e.key === \"Tab\") {\n endPress();\n fa = deep();\n pressed = e.shiftKey ? -1 : 1;\n before = current < 0 && lost ? -2 : current;\n beforeEl = current < 0 && !lost && fa && fa !== document.body && fa !== document.documentElement && !within(host, fa) ? fa : null;\n wantEl = null;\n for (var k = 1, n = stops.length; before >= 0 && k < n; k++) {\n var c = stops[(((before + pressed * k) % n) + n) % n];\n if (tabbable(c)) {\n wantEl = c;\n if (c !== fa) rest(c);\n break;\n }\n }\n settleT = setTimeout(settle, 150);\n }\n}\nfunction pick(e) {\n var g = e.target.closest && e.target.closest(\"g.o\");\n if (!g) return;\n e.preventDefault();\n e.stopPropagation();\n if (e.type !== \"click\") return;\n var s = stops[+g.getAttribute(\"data-i\")];\n if (!s) return;\n endPress();\n if (s !== deep()) rest(s);\n s.focus({ preventScroll: true, focusVisible: true });\n focus();\n}\nfunction close() {\n closed = true;\n picking = false;\n PICKS.forEach(function (t) { removeEventListener(t, pickEv, true); });\n stopWalk();\n removeEventListener(\"pointerdown\", interrupt, true);\n removeEventListener(\"pointerdown\", tap, true);\n removeEventListener(\"scroll\", onMoved, true);\n removeEventListener(\"resize\", onMoved);\n removeEventListener(\"resize\", keepIn);\n if (fit) fit.disconnect();\n watch.disconnect();\n if (timer) clearTimeout(timer);\n if (idle && window.cancelIdleCallback) cancelIdleCallback(idle);\n if (sayT) clearTimeout(sayT);\n if (settleT) clearTimeout(settleT);\n removeEventListener(\"keydown\", key, true);\n removeEventListener(\"focusin\", focus, true);\n removeEventListener(\"focusout\", lose, true);\n if (tabPoll) clearInterval(tabPoll);\n if (logTab && !logTab.closed && tabNote) tabNote.hidden = false;\n if (window.__tabTrail === api) delete window.__tabTrail;\n if (ownName) window.name = \"\";\n host.remove();\n}\nvar grab = null;\npanel.addEventListener(\"pointerdown\", function (e) {\n if (e.button !== 0 || e.target.closest(\"button,a,ul,label\")) return;\n var r = panel.getBoundingClientRect();\n grab = [e.clientX - r.left, e.clientY - r.top];\n panel.setPointerCapture(e.pointerId);\n panel.classList.add(\"g\");\n});\npanel.addEventListener(\"pointermove\", function (e) {\n if (!grab) return;\n var x = Math.min(Math.max(e.clientX - grab[0], 0), innerWidth - panel.offsetWidth);\n var y = Math.min(Math.max(e.clientY - grab[1], 0), innerHeight - panel.offsetHeight);\n panel.style.left = x + \"px\";\n panel.style.top = y + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n});\nfunction drop() { grab = null; panel.classList.remove(\"g\"); }\nfunction keepIn() {\n if (closed) return;\n var r = panel.getBoundingClientRect(), m = 8;\n if (!r.height || (r.top >= m && r.bottom <= innerHeight - m && r.left >= m && r.right <= innerWidth - m)) return;\n panel.style.top = Math.min(Math.max(r.top, m), Math.max(m, innerHeight - m - r.height)) + \"px\";\n panel.style.left = Math.min(Math.max(r.left, m), Math.max(m, innerWidth - m - r.width)) + \"px\";\n panel.style.right = \"auto\";\n panel.style.bottom = \"auto\";\n}\nvar fit = window.ResizeObserver ? new ResizeObserver(keepIn) : null;\nif (fit) fit.observe(panel);\naddEventListener(\"resize\", keepIn);\npanel.addEventListener(\"pointerup\", drop);\npanel.addEventListener(\"pointercancel\", drop);\nhost.__close = close;\nfunction mainOf(e) {\n var first = null;\n for (var i = 0; i < e.p.length; i++) {\n var x = e.p[i];\n if (typeof x === \"string\" || !x.el) continue;\n if (i && typeof e.p[i - 1] === \"string\" && /\\u2192 $/.test(e.p[i - 1])) return x;\n if (!first) first = x;\n }\n return first;\n}\nvar api = {\n report: function () { return aiText(); },\n log: function () {\n return logs.map(function (e) {\n var m = mainOf(e);\n return { time: clock(e.t), result: e.k, check: e.f, wcag: wcagOf(e) || null, text: e.p.map(partText).join(\"\"), fixed: !!e.fixed, selector: m ? sel(m.el) || null : null, stop: m && m.n ? m.n : null };\n });\n },\n play: function (o) {\n o = o || {};\n var skipOut = [].concat(o.ignore || []);\n for (var i = 0; i < skipOut.length; i++) {\n try { document.querySelector(skipOut[i]); } catch (x) { return Promise.reject(new Error(\"Tab trail: \\\"\" + skipOut[i] + \"\\\" in ignore is not a valid CSS selector.\")); }\n }\n ignore = skipOut;\n walkDelay = typeof o.delay === \"number\" && o.delay >= 0 ? o.delay : 400;\n return new Promise(function (res) {\n walkDone.push(res);\n if (!walking) {\n walked = new Set();\n startWalk();\n }\n });\n },\n problems: function () { return problemsOf(openProbs()); },\n state: function () { return { walked: walkedN(), total: stops.length, done: !walking && walkEnd === \"done\" && stops.every(function (x) { return hidTested.has(x); }), untested: untested() }; },\n regions: function () { return regions()[0]; },\n cost: function (q) {\n if (q) {\n var e = document.querySelector(q);\n return e && stops.indexOf(e) >= 0 ? stops.indexOf(e) + 1 : null;\n }\n return goals().map(function (g) { return { name: g.name, presses: g.presses, how: g.how, selector: sel(g.el) }; });\n },\n version: VERSION,\n close: function () { close(); }\n};\nwindow.__tabTrail = api;\nx.addEventListener(\"click\", close);\naddEventListener(\"scroll\", onMoved, { capture: true, passive: true });\naddEventListener(\"resize\", onMoved);\nwatch.observe(document.documentElement, { subtree: true, childList: true, attributes: true, attributeFilter: [\"style\", \"class\", \"hidden\", \"tabindex\", \"disabled\", \"inert\", \"href\", \"role\", \"open\"] });\naddEventListener(\"keydown\", key, true);\naddEventListener(\"pointerdown\", interrupt, true);\naddEventListener(\"pointerdown\", tap, true);\naddEventListener(\"focusin\", focus, true);\naddEventListener(\"focusout\", lose, true);\nroot.addEventListener(\"focusin\", function () {\n if (root.activeElement === panel && panel.tabIndex < 0) return panel.blur();\n focus();\n});\nroot.addEventListener(\"focusout\", function () {\n setTimeout(function () {\n if (!panelIn || closed || inPanel()) return;\n var a = deep();\n if ((!a || a === document.body || a === document.documentElement) && Date.now() - tapT > 600) return play.focus({ focusVisible: true });\n panelIn = false;\n pRet = null;\n skipPanel();\n }, 0);\n});\n[\"pointerdown\", \"mousedown\", \"pointerup\", \"mouseup\", \"click\"].forEach(function (t) {\n dot.addEventListener(t, pick);\n dotPg.addEventListener(t, pick);\n});\nreview();\nfocus();\ndraw();\n})();\n";
|
|
5
|
+
export const HREF = "javascript:(function()%7B%0A%2F*%20Tab%20trail%201.1.0.%20Copyright%20(c)%202026%20Matja%C5%BE%20Koro%C5%A1ec.%20MIT%20License%2C%20full%20text%3A%20https%3A%2F%2Fgithub.com%2Fmatjazkorosec%2Ftab-trail%2Fblob%2Fmain%2FLICENSE%20*%2F%0Avar%20VERSION%20%3D%20%221.1.0%22%3B%0Avar%20ID%20%3D%20%22tab-trail-host%22%3B%0Avar%20prev%20%3D%20%5B%5D.filter.call(document.querySelectorAll(%22%5Bid%3D'%22%20%2B%20ID%20%2B%20%22'%5D%22)%2C%20function%20(e)%20%7B%20return%20typeof%20e.__close%20%3D%3D%3D%20%22function%22%3B%20%7D)%5B0%5D%3B%0Aif%20(prev)%20%7B%20prev.__close()%3B%20return%3B%20%7D%0Avar%20NS%20%3D%20%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3B%0Avar%20FOCUSABLE%20%3D%20%22a%5Bhref%5D%2Carea%5Bhref%5D%2Cbutton%2Cinput%2Cselect%2Ctextarea%2Ciframe%2Csummary%2Caudio%5Bcontrols%5D%2Cvideo%5Bcontrols%5D%2C%5Bcontenteditable%5D%3Anot(%5Bcontenteditable%3D'false'%5D)%2C%5Btabindex%5D%22%3B%0Avar%20ROLES%20%3D%20%2F%5E(button%7Clink%7Ctab%7Cmenuitem%7Cmenuitemcheckbox%7Cmenuitemradio%7Ccheckbox%7Cradio%7Cswitch%7Coption%7Ccombobox%7Cslider%7Ctreeitem)%24%2F%3B%0A%0Afunction%20walk(root%2C%20out)%20%7B%0A%20%20var%20kids%20%3D%20root.children%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20kids.length%3B%20i%2B%2B)%20visit(kids%5Bi%5D%2C%20out)%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20visit(el%2C%20out)%20%7B%0A%20%20if%20(el.id%20%3D%3D%3D%20ID%20%26%26%20el%20%3D%3D%3D%20host%20%26%26%20(!skip%20%7C%7C%20skip.checked))%20return%3B%0A%20%20if%20(!(host%20%26%26%20el.getRootNode()%20%3D%3D%3D%20host.shadowRoot%20%26%26%20(!panel.contains(el)%20%7C%7C%20(logList%20%26%26%20logList.contains(el)))))%20out.push(el)%3B%0A%20%20if%20(el.shadowRoot)%20return%20walk(el.shadowRoot%2C%20out)%3B%0A%20%20if%20(el.tagName%20%3D%3D%3D%20%22SLOT%22%20%26%26%20el.assignedElements)%20%7B%0A%20%20%20%20var%20got%20%3D%20el.assignedElements(%7B%20flatten%3A%20true%20%7D)%3B%0A%20%20%20%20if%20(got.length)%20%7B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20got.length%3B%20i%2B%2B)%20visit(got%5Bi%5D%2C%20out)%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20walk(el%2C%20out)%3B%0A%7D%0Afunction%20shown(el)%20%7B%0A%20%20if%20(el.checkVisibility)%20return%20el.checkVisibility(%7B%20visibilityProperty%3A%20true%2C%20opacityProperty%3A%20false%20%7D)%3B%0A%20%20var%20s%20%3D%20getComputedStyle(el)%3B%0A%20%20return%20s.display%20!%3D%3D%20%22none%22%20%26%26%20s.visibility%20!%3D%3D%20%22hidden%22%20%26%26%20el.getClientRects().length%20%3E%200%3B%0A%7D%0Afunction%20tabbable(el)%20%7B%0A%20%20if%20(!el.matches(FOCUSABLE))%20return%20false%3B%0A%20%20if%20(el.tabIndex%20%3C%200%20%7C%7C%20el.matches(%22%3Adisabled%22)%20%7C%7C%20el.closest(%22%5Binert%5D%22))%20return%20false%3B%0A%20%20if%20(el.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20el.type%20%3D%3D%3D%20%22hidden%22)%20return%20false%3B%0A%20%20if%20(el.tagName%20%3D%3D%3D%20%22SUMMARY%22%20%26%26%20(!el.parentElement%20%7C%7C%20el.parentElement.tagName%20!%3D%3D%20%22DETAILS%22%20%7C%7C%20el.parentElement.querySelector(%22summary%22)%20!%3D%3D%20el))%20return%20false%3B%0A%20%20return%20shown(el)%3B%0A%7D%0A%0Avar%20stops%20%3D%20%5B%5D%2C%20stopSet%20%3D%20new%20Set()%2C%20upSet%20%3D%20new%20Set()%2C%20missed%20%3D%20%5B%5D%2C%20forced%20%3D%20%5B%5D%2C%20forcedBad%20%3D%20%5B%5D%2C%20domAt%20%3D%20new%20Map()%3B%0Avar%20GROUP%20%3D%20%22%5Brole%3Dtablist%5D%2C%5Brole%3Dmenu%5D%2C%5Brole%3Dmenubar%5D%2C%5Brole%3Dlistbox%5D%2C%5Brole%3Dradiogroup%5D%2C%5Brole%3Dgrid%5D%2C%5Brole%3Dtreegrid%5D%2C%5Brole%3Dtree%5D%2C%5Brole%3Dtoolbar%5D%22%3B%0Avar%20ITEM%20%3D%20%2F%5E(tab%7Cmenuitem%7Cmenuitemcheckbox%7Cmenuitemradio%7Coption%7Cradio%7Cgridcell%7Crow%7Ctreeitem)%24%2F%3B%0Afunction%20nearTab(el)%20%7B%0A%20%20for%20(var%20p%20%3D%20el.parentElement%3B%20p%3B%20p%20%3D%20p.parentElement)%20if%20(stopSet.has(p))%20return%20true%3B%0A%20%20return%20upSet.has(el)%3B%0A%7D%0Afunction%20roving(el)%20%7B%0A%20%20var%20g%20%3D%20el.closest(GROUP)%3B%0A%20%20if%20(!g%20%7C%7C%20(!ITEM.test(el.getAttribute(%22role%22)%20%7C%7C%20%22%22)%20%26%26%20!(el.hasAttribute(%22tabindex%22)%20%26%26%20el.tabIndex%20%3C%200)))%20return%20false%3B%0A%20%20if%20(stopSet.has(g)%20%7C%7C%20upSet.has(g))%20return%20true%3B%0A%20%20var%20id%20%3D%20g.id%3B%0A%20%20return%20!!id%20%26%26%20stops.some(function%20(s)%20%7B%20return%20(%22%20%22%20%2B%20(s.getAttribute(%22aria-controls%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22%20%2B%20(s.getAttribute(%22aria-owns%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22).indexOf(%22%20%22%20%2B%20id%20%2B%20%22%20%22)%20%3E%3D%200%3B%20%7D)%3B%0A%7D%0Afunction%20modal()%20%7B%0A%20%20try%20%7B%0A%20%20%20%20var%20l%20%3D%20document.querySelectorAll(%22dialog%3Amodal%22)%3B%0A%20%20%20%20return%20l.length%20%3F%20l%5Bl.length%20-%201%5D%20%3A%20null%3B%0A%20%20%7D%20catch%20(e)%20%7B%20return%20null%3B%20%7D%0A%7D%0Afunction%20within(m%2C%20e)%20%7B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%3B%20n%20%3D%20n.parentNode%20%7C%7C%20n.host)%20if%20(n%20%3D%3D%3D%20m)%20return%20true%3B%0A%20%20return%20false%3B%0A%7D%0Afunction%20scan()%20%7B%0A%20%20var%20all%20%3D%20walk(document%2C%20%5B%5D)%3B%0A%20%20var%20top%20%3D%20modal()%3B%0A%20%20if%20(top)%20all%20%3D%20all.filter(function%20(e)%20%7B%20return%20within(top%2C%20e)%3B%20%7D)%3B%0A%20%20var%20found%20%3D%20all.filter(tabbable)%3B%0A%20%20var%20groups%20%3D%20new%20Map()%3B%0A%20%20found%20%3D%20found.filter(function%20(el)%20%7B%0A%20%20%20%20if%20(el.tagName%20!%3D%3D%20%22INPUT%22%20%7C%7C%20el.type%20!%3D%3D%20%22radio%22%20%7C%7C%20!el.name)%20return%20true%3B%0A%20%20%20%20var%20own%20%3D%20el.form%20%7C%7C%20el.getRootNode()%2C%20byName%20%3D%20groups.get(own)%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20groups.set(own%2C%20byName)%3B%0A%20%20%20%20var%20g%20%3D%20byName%5Bel.name%5D%20%7C%7C%20(byName%5Bel.name%5D%20%3D%20found.filter(function%20(x)%20%7B%20return%20x.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20x.type%20%3D%3D%3D%20%22radio%22%20%26%26%20x.name%20%3D%3D%3D%20el.name%20%26%26%20(x.form%20%7C%7C%20x.getRootNode())%20%3D%3D%3D%20own%3B%20%7D))%3B%0A%20%20%20%20var%20picked%20%3D%20g.filter(function%20(x)%20%7B%20return%20x.checked%3B%20%7D)%5B0%5D%20%7C%7C%20g%5B0%5D%3B%0A%20%20%20%20return%20picked%20%3D%3D%3D%20el%3B%0A%20%20%7D)%3B%0A%20%20forced%20%3D%20found.filter(function%20(el)%20%7B%20return%20el.tabIndex%20%3E%200%20%26%26%20!(host%20%26%26%20el.getRootNode()%20%3D%3D%3D%20host.shadowRoot)%3B%20%7D)%3B%0A%20%20stops%20%3D%20ordered(document%2C%20found%2C%20null)%3B%0A%20%20domAt%20%3D%20new%20Map()%3B%0A%20%20forced.forEach(function%20(f)%20%7B%20domAt.set(f%2C%20forced.length%20%3E%2030%20%3F%20found.indexOf(f)%20%3A%20ordered(document%2C%20found%2C%20f).indexOf(f))%3B%20%7D)%3B%0A%20%20forcedBad%20%3D%20forced.filter(function%20(f)%20%7B%20return%20domAt.get(f)%20!%3D%3D%20stops.indexOf(f)%3B%20%7D)%3B%0A%20%20stopSet%20%3D%20new%20Set(stops)%3B%0A%20%20upSet%20%3D%20new%20Set()%3B%0A%20%20stops.forEach(function%20(s)%20%7B%0A%20%20%20%20for%20(var%20p%20%3D%20s.parentElement%3B%20p%20%26%26%20!upSet.has(p)%3B%20p%20%3D%20p.parentElement)%20upSet.add(p)%3B%0A%20%20%7D)%3B%0A%20%20var%20ids%20%3D%20document.querySelectorAll(%22%5Bid%3D'%22%20%2B%20ID%20%2B%20%22'%5D%22)%2C%20only%20%3D%20!ids.length%20%7C%7C%20(ids.length%20%3D%3D%3D%201%20%26%26%20ids%5B0%5D%20%3D%3D%3D%20host)%3B%0A%20%20var%20miss%20%3D%20all.filter(function%20(el)%20%7B%0A%20%20%20%20if%20(stopSet.has(el)%20%7C%7C%20(only%20%3F%20el%20%3D%3D%3D%20host%20%3A%20el.closest(%22%23%22%20%2B%20ID))%20%7C%7C%20(host%20%26%26%20el.getRootNode()%20%3D%3D%3D%20host.shadowRoot))%20return%20false%3B%0A%20%20%20%20var%20t%20%3D%20el.tagName%3B%0A%20%20%20%20if%20(t%20%3D%3D%3D%20%22HTML%22%20%7C%7C%20t%20%3D%3D%3D%20%22BODY%22%20%7C%7C%20t%20%3D%3D%3D%20%22LABEL%22%20%7C%7C%20t%20%3D%3D%3D%20%22OPTION%22%20%7C%7C%20t%20%3D%3D%3D%20%22OPTGROUP%22)%20return%20false%3B%0A%20%20%20%20var%20role%20%3D%20el.getAttribute(%22role%22)%20%7C%7C%20%22%22%3B%0A%20%20%20%20var%20looks%20%3D%20el.hasAttribute(%22onclick%22)%20%7C%7C%20ROLES.test(role)%3B%0A%20%20%20%20var%20s%20%3D%20getComputedStyle(el)%3B%0A%20%20%20%20if%20(s.pointerEvents%20%3D%3D%3D%20%22none%22)%20return%20false%3B%0A%20%20%20%20if%20(!looks)%20%7B%0A%20%20%20%20%20%20if%20(s.cursor%20!%3D%3D%20%22pointer%22)%20return%20false%3B%0A%20%20%20%20%20%20var%20ps%20%3D%20el.parentElement%20%26%26%20getComputedStyle(el.parentElement)%3B%0A%20%20%20%20%20%20if%20(ps%20%26%26%20ps.cursor%20%3D%3D%3D%20%22pointer%22)%20return%20false%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(el.closest(%22label%22)%20%7C%7C%20el.matches(%22%3Adisabled%22)%20%7C%7C%20el.closest(%22%5Binert%5D%22)%20%7C%7C%20el.closest(%22%5Baria-disabled%3D'true'%5D%22))%20return%20false%3B%0A%20%20%20%20if%20(!shown(el))%20return%20false%3B%0A%20%20%20%20var%20r%20%3D%20el.getBoundingClientRect()%3B%0A%20%20%20%20if%20(r.width%20%3C%208%20%7C%7C%20r.height%20%3C%208)%20return%20false%3B%0A%20%20%20%20return%20!nearTab(el)%20%26%26%20!roving(el)%3B%0A%20%20%7D)%3B%0A%20%20var%20missSet%20%3D%20new%20Set(miss)%3B%0A%20%20missed%20%3D%20miss.filter(function%20(el)%20%7B%0A%20%20%20%20for%20(var%20p%20%3D%20el.parentElement%3B%20p%3B%20p%20%3D%20p.parentElement)%20if%20(missSet.has(p))%20return%20false%3B%0A%20%20%20%20return%20true%3B%0A%20%20%7D)%3B%0A%20%20hoverScan()%3B%0A%7D%0Afunction%20ordered(scope%2C%20list%2C%20flat)%20%7B%0A%20%20var%20units%20%3D%20%5B%5D%2C%20groups%20%3D%20new%20Map()%2C%20out%20%3D%20%5B%5D%3B%0A%20%20list.forEach(function%20(el)%20%7B%0A%20%20%20%20var%20h%20%3D%20el%3B%0A%20%20%20%20while%20(h.getRootNode()%20!%3D%3D%20scope%20%26%26%20h.getRootNode().host)%20h%20%3D%20h.getRootNode().host%3B%0A%20%20%20%20if%20(h%20%3D%3D%3D%20el)%20return%20units.push(%7B%20k%3A%20el%20%3D%3D%3D%20flat%20%3F%200%20%3A%20el.tabIndex%2C%20el%3A%20el%20%7D)%3B%0A%20%20%20%20var%20g%20%3D%20groups.get(h)%3B%0A%20%20%20%20if%20(!g)%20%7B%0A%20%20%20%20%20%20g%20%3D%20%7B%20k%3A%20h.hasAttribute(%22tabindex%22)%20%26%26%20h%20!%3D%3D%20flat%20%3F%20Math.max(h.tabIndex%2C%200)%20%3A%200%2C%20host%3A%20h%2C%20els%3A%20%5B%5D%20%7D%3B%0A%20%20%20%20%20%20groups.set(h%2C%20g)%3B%0A%20%20%20%20%20%20units.push(g)%3B%0A%20%20%20%20%7D%0A%20%20%20%20g.els.push(el)%3B%0A%20%20%7D)%3B%0A%20%20units.filter(function%20(u)%20%7B%20return%20u.k%20%3E%200%3B%20%7D).sort(function%20(a%2C%20b)%20%7B%20return%20a.k%20-%20b.k%3B%20%7D).concat(units.filter(function%20(u)%20%7B%20return%20u.k%20%3C%3D%200%3B%20%7D)).forEach(function%20(u)%20%7B%0A%20%20%20%20if%20(u.host)%20out%20%3D%20out.concat(ordered(u.host.shadowRoot%2C%20u.els%2C%20flat))%3B%0A%20%20%20%20else%20out.push(u.el)%3B%0A%20%20%7D)%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20hovers%20%3D%20%5B%5D%2C%20hoverOk%20%3D%20%5B%5D%2C%20hovRule%20%3D%20new%20Map()%2C%20hovSeen%20%3D%20new%20Set()%2C%20hovHid%20%3D%20new%20Map()%2C%20tabOpens%20%3D%20new%20WeakSet()%3B%0Afunction%20hoverTry(s)%20%7B%0A%20%20var%20hit%20%3D%20false%3B%0A%20%20hovers.forEach(function%20(h)%20%7B%0A%20%20%20%20var%20e%20%3D%20hovHid.get(h)%3B%0A%20%20%20%20if%20(e%20%26%26%20within(h%2C%20s)%20%26%26%20!within(e%2C%20s)%20%26%26%20!hiddenNow(e))%20%7B%0A%20%20%20%20%20%20tabOpens.add(h)%3B%0A%20%20%20%20%20%20hit%20%3D%20true%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%20%20if%20(hit)%20rescan()%3B%0A%7D%0Avar%20HOVER%20%3D%20%22%3Ahover%22%2C%20FOC%20%3D%20%22%3Afocus-within%7C%3Afocus-visible%7C%3Afocus%22%3B%0Afunction%20parts(sel)%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20depth%20%3D%200%2C%20start%20%3D%200%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20sel.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20ch%20%3D%20sel.charAt(i)%3B%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22(%22)%20depth%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22)%22)%20depth--%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22%2C%22%20%26%26%20!depth)%20%7B%20out.push(sel.slice(start%2C%20i).trim())%3B%20start%20%3D%20i%20%2B%201%3B%20%7D%0A%20%20%7D%0A%20%20out.push(sel.slice(start).trim())%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20bare(sel%2C%20re)%20%7B%0A%20%20return%20sel.replace(new%20RegExp(%22(%5E%7C%5B%5C%5Cs%3E%2B~(%5D)(%22%20%2B%20re%20%2B%20%22)%22%2C%20%22g%22)%2C%20%22%241*%22).replace(new%20RegExp(re%2C%20%22g%22)%2C%20%22%22)%3B%0A%7D%0Afunction%20reveals(st)%20%7B%0A%20%20var%20d%20%3D%20st.getPropertyValue(%22display%22)%2C%20v%20%3D%20st.getPropertyValue(%22visibility%22)%2C%20o%20%3D%20st.getPropertyValue(%22opacity%22)%2C%20mh%20%3D%20st.getPropertyValue(%22max-height%22)%3B%0A%20%20return%20(d%20!%3D%3D%20%22%22%20%26%26%20d%20!%3D%3D%20%22none%22)%20%7C%7C%20v%20%3D%3D%3D%20%22visible%22%20%7C%7C%20(o%20!%3D%3D%20%22%22%20%26%26%20parseFloat(o)%20%3E%200)%20%7C%7C%20(mh%20!%3D%3D%20%22%22%20%26%26%20mh%20!%3D%3D%20%220%22%20%26%26%20mh%20!%3D%3D%20%220px%22)%3B%0A%7D%0Avar%20cssRules%20%3D%200%2C%20cssSheets%20%3D%200%2C%20cssBlocked%20%3D%20%5B%5D%3B%0Afunction%20nest(sel%2C%20up)%20%7B%0A%20%20if%20(!up)%20return%20sel%3B%0A%20%20return%20parts(sel).map(function%20(q)%20%7B%20return%20q.indexOf(%22%26%22)%20%3E%3D%200%20%3F%20q.split(%22%26%22).join(%22%3Ais(%22%20%2B%20up%20%2B%20%22)%22)%20%3A%20%22%3Ais(%22%20%2B%20up%20%2B%20%22)%20%22%20%2B%20q%3B%20%7D).join(%22%2C%20%22)%3B%0A%7D%0Afunction%20depth(p%2C%20k)%20%7B%0A%20%20var%20d%20%3D%200%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20k%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20ch%20%3D%20p.charAt(i)%3B%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22%5C%5C%22)%20i%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22(%22)%20d%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22)%22)%20d--%3B%0A%20%20%7D%0A%20%20return%20d%3B%0A%7D%0Afunction%20compound(p%2C%20k)%20%7B%0A%20%20var%20d%20%3D%200%2C%20i%20%3D%20k%20-%201%3B%0A%20%20for%20(%3B%20i%20%3E%3D%200%3B%20i--)%20%7B%0A%20%20%20%20var%20ch%20%3D%20p.charAt(i)%3B%0A%20%20%20%20if%20(i%20%3E%200%20%26%26%20p.charAt(i%20-%201)%20%3D%3D%3D%20%22%5C%5C%22)%20%7B%0A%20%20%20%20%20%20i--%3B%0A%20%20%20%20%20%20continue%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22)%22)%20d%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22(%22)%20%7B%0A%20%20%20%20%20%20if%20(!d)%20break%3B%0A%20%20%20%20%20%20d--%3B%0A%20%20%20%20%7D%20else%20if%20(!d%20%26%26%20%2F%5B%5Cs%3E%2B~%2C%5D%2F.test(ch))%20break%3B%0A%20%20%7D%0A%20%20var%20c%20%3D%20p.slice(i%20%2B%201%2C%20k).trim()%3B%0A%20%20return%20c%20%3F%20bare(c%2C%20HOVER)%20%3A%20%22%22%3B%0A%7D%0Afunction%20selfFocus(p)%20%7B%0A%20%20var%20m%20%3D%20p.match(new%20RegExp(FOC))%2C%20k%20%3D%20m%20%3F%20m.index%20%2B%20m%5B0%5D.length%20%3A%20-1%3B%0A%20%20if%20(k%20%3C%200%20%7C%7C%20depth(p%2C%20k))%20return%20false%3B%0A%20%20for%20(var%20d%20%3D%200%3B%20k%20%3C%20p.length%3B%20k%2B%2B)%20%7B%0A%20%20%20%20var%20ch%20%3D%20p.charAt(k)%3B%0A%20%20%20%20if%20(ch%20%3D%3D%3D%20%22%5C%5C%22)%20k%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22(%22)%20d%2B%2B%3B%0A%20%20%20%20else%20if%20(ch%20%3D%3D%3D%20%22)%22)%20d--%3B%0A%20%20%20%20else%20if%20(!d%20%26%26%20%2F%5B%5Cs%3E%2B~%5D%2F.test(ch))%20return%20false%3B%0A%20%20%7D%0A%20%20return%20true%3B%0A%7D%0Avar%20sheetMemo%20%3D%20new%20WeakMap()%3B%0Afunction%20readRules()%20%7B%0A%20%20var%20hov%20%3D%20%5B%5D%2C%20foc%20%3D%20%5B%5D%3B%0A%20%20cssRules%20%3D%200%3B%0A%20%20cssSheets%20%3D%200%3B%0A%20%20cssBlocked%20%3D%20%5B%5D%3B%0A%20%20function%20take(sel%2C%20src)%20%7B%0A%20%20%20%20parts(sel).forEach(function%20(p)%20%7B%0A%20%20%20%20%20%20if%20(%2F%3Afocus%2F.test(p))%20return%20foc.push(%5Bbare(p%2C%20FOC)%2C%20selfFocus(p)%5D)%3B%0A%20%20%20%20%20%20var%20k%20%3D%20p.indexOf(HOVER)%2C%20on%3B%0A%20%20%20%20%20%20if%20(k%20%3C%200)%20return%3B%0A%20%20%20%20%20%20if%20(depth(p%2C%20k))%20on%20%3D%20compound(p%2C%20k)%3B%0A%20%20%20%20%20%20else%20%7B%0A%20%20%20%20%20%20%20%20var%20pre%20%3D%20p.slice(0%2C%20k)%3B%0A%20%20%20%20%20%20%20%20if%20(!pre.trim()%20%7C%7C%20%2F%5B%5Cs%3E%2B~%5D%24%2F.test(pre))%20return%3B%0A%20%20%20%20%20%20%20%20on%20%3D%20bare(pre%2C%20HOVER)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(on)%20hov.push(%5Bbare(p%2C%20HOVER)%2C%20on%2C%20p%2C%20src%5D)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20function%20go(list%2C%20src%2C%20up)%20%7B%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20list.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20r%20%3D%20list%5Bi%5D%2C%20sel%20%3D%20up%2C%20st%20%3D%20null%3B%0A%20%20%20%20%20%20if%20(r.selectorText%20!%3D%3D%20undefined)%20%7B%0A%20%20%20%20%20%20%20%20sel%20%3D%20nest(r.selectorText%2C%20up)%3B%0A%20%20%20%20%20%20%20%20st%20%3D%20r.style%3B%0A%20%20%20%20%20%20%7D%20else%20if%20(up%20%26%26%20r.style%20%26%26%20!r.cssRules)%20st%20%3D%20r.style%3B%0A%20%20%20%20%20%20if%20(st)%20%7B%0A%20%20%20%20%20%20%20%20cssRules%2B%2B%3B%0A%20%20%20%20%20%20%20%20if%20(%2F%3Ahover%7C%3Afocus%2F.test(sel)%20%26%26%20reveals(st))%20take(sel%2C%20src)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(r.cssRules%20%26%26%20r.cssRules.length)%20go(r.cssRules%2C%20src%2C%20sel)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20sheets%20%3D%20Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets%20%7C%7C%20%5B%5D)%3B%0A%20%20sheets.forEach(function%20(sh)%20%7B%0A%20%20%20%20var%20list%3B%0A%20%20%20%20try%20%7B%20list%20%3D%20sh.cssRules%3B%20%7D%20catch%20(e)%20%7B%20return%20cssBlocked.push(sh.href%20%7C%7C%20%22a%20style%20sheet%22)%3B%20%7D%0A%20%20%20%20var%20memo%20%3D%20sheetMemo.get(sh)%3B%0A%20%20%20%20if%20(!memo%20%7C%7C%20memo.list%20!%3D%3D%20list%20%7C%7C%20memo.n%20!%3D%3D%20list.length%20%7C%7C%20memo.node%20!%3D%3D%20sh.ownerNode)%20%7B%0A%20%20%20%20%20%20var%20h0%20%3D%20hov%2C%20f0%20%3D%20foc%2C%20c0%20%3D%20cssRules%3B%0A%20%20%20%20%20%20hov%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20foc%20%3D%20%5B%5D%3B%0A%20%20%20%20%20%20cssRules%20%3D%200%3B%0A%20%20%20%20%20%20try%20%7B%20go(list%2C%20sh.href%20%7C%7C%20(sh.ownerNode%20%3F%20%22an%20inline%20%3Cstyle%3E%20in%20the%20page%22%20%3A%20%22a%20style%20sheet%20added%20by%20script%22)%2C%20%22%22)%3B%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20%20%20%20%20hov%20%3D%20h0%3B%0A%20%20%20%20%20%20%20%20foc%20%3D%20f0%3B%0A%20%20%20%20%20%20%20%20cssRules%20%3D%20c0%3B%0A%20%20%20%20%20%20%20%20return%20cssBlocked.push(sh.href%20%7C%7C%20%22a%20style%20sheet%22)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20memo%20%3D%20%7B%20list%3A%20list%2C%20n%3A%20list.length%2C%20node%3A%20sh.ownerNode%2C%20hov%3A%20hov%2C%20foc%3A%20foc%2C%20rules%3A%20cssRules%20%7D%3B%0A%20%20%20%20%20%20sheetMemo.set(sh%2C%20memo)%3B%0A%20%20%20%20%20%20hov%20%3D%20h0%3B%0A%20%20%20%20%20%20foc%20%3D%20f0%3B%0A%20%20%20%20%20%20cssRules%20%3D%20c0%3B%0A%20%20%20%20%7D%0A%20%20%20%20hov%20%3D%20hov.concat(memo.hov)%3B%0A%20%20%20%20foc%20%3D%20foc.concat(memo.foc)%3B%0A%20%20%20%20cssRules%20%2B%3D%20memo.rules%3B%0A%20%20%20%20cssSheets%2B%2B%3B%0A%20%20%7D)%3B%0A%20%20return%20%5Bhov%2C%20foc%5D%3B%0A%7D%0Afunction%20hiddenNow(e)%20%7B%0A%20%20return%20!shown(e)%20%7C%7C%20getComputedStyle(e).opacity%20%3D%3D%3D%20%220%22%20%7C%7C%20e.getBoundingClientRect().height%20%3C%201%3B%0A%7D%0Afunction%20hoverScan()%20%7B%0A%20%20var%20rr%20%3D%20readRules()%2C%20foc%20%3D%20rr%5B1%5D%2C%20found%20%3D%20%5B%5D%2C%20seenH%20%3D%20new%20Set()%2C%20ok%20%3D%20%5B%5D%2C%20top%20%3D%20modal()%3B%0A%20%20hovRule%20%3D%20new%20Map()%3B%0A%20%20hovSeen%20%3D%20new%20Set()%3B%0A%20%20rr%5B0%5D.forEach(function%20(h)%20%7B%0A%20%20%20%20var%20list%3B%0A%20%20%20%20try%20%7B%20list%20%3D%20document.querySelectorAll(h%5B0%5D)%3B%20%7D%20catch%20(e)%20%7B%20return%3B%20%7D%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20list.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20e%20%3D%20list%5Bi%5D%2C%20host%20%3D%20null%3B%0A%20%20%20%20%20%20if%20(!hiddenNow(e)%20%7C%7C%20(!e.matches(FOCUSABLE)%20%26%26%20!e.querySelector(FOCUSABLE)))%20continue%3B%0A%20%20%20%20%20%20try%20%7B%20host%20%3D%20e.parentElement%20%26%26%20e.parentElement.closest(h%5B1%5D)%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20%20%20if%20(!host%20%7C%7C%20host%20%3D%3D%3D%20document.body%20%7C%7C%20host%20%3D%3D%3D%20document.documentElement%20%7C%7C%20seenH.has(host)%20%7C%7C%20!shown(host)%20%7C%7C%20(top%20%26%26%20!within(top%2C%20host)))%20continue%3B%0A%20%20%20%20%20%20if%20(host.matches(%22%5Baria-expanded%5D%2C%5Baria-haspopup%5D%22)%20%7C%7C%20host.querySelector(%22%5Baria-expanded%5D%2C%5Baria-haspopup%5D%22))%20%7B%0A%20%20%20%20%20%20%20%20ok.push(%5Bhost%2C%20%22toggle%22%5D)%3B%0A%20%20%20%20%20%20%20%20continue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(foc.some(function%20(f)%20%7B%20try%20%7B%20return%20(!f%5B1%5D%20%7C%7C%20shown(e))%20%26%26%20e.matches(f%5B0%5D)%3B%20%7D%20catch%20(x)%20%7B%20return%20false%3B%20%7D%20%7D))%20%7B%0A%20%20%20%20%20%20%20%20ok.push(%5Bhost%2C%20%22focus%22%5D)%3B%0A%20%20%20%20%20%20%20%20continue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20if%20(tabOpens.has(host))%20%7B%0A%20%20%20%20%20%20%20%20ok.push(%5Bhost%2C%20%22tab%22%5D)%3B%0A%20%20%20%20%20%20%20%20continue%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20found.push(host)%3B%0A%20%20%20%20%20%20seenH.add(host)%3B%0A%20%20%20%20%20%20hovHid.set(host%2C%20e)%3B%0A%20%20%20%20%20%20hovRule.set(host%2C%20%5Bh%5B2%5D%2C%20h%5B3%5D%5D)%3B%0A%20%20%20%20%20%20if%20(shown(e)%20%26%26%20stops.some(function%20(s)%20%7B%20return%20e.contains(s)%3B%20%7D))%20hovSeen.add(host)%3B%0A%20%20%20%20%7D%0A%20%20%7D)%3B%0A%20%20hovers%20%3D%20found%3B%0A%20%20hoverOk%20%3D%20ok.filter(function%20(o)%20%7B%20return%20!seenH.has(o%5B0%5D)%3B%20%7D)%3B%0A%7D%0Ascan()%3B%0A%0Avar%20host%20%3D%20document.createElement(%22div%22)%3B%0Ahost.id%20%3D%20ID%3B%0Ahost.style.cssText%20%3D%20%22all%3Ainitial%3Bposition%3Aabsolute%3Bleft%3A0%3Btop%3A0%3Bwidth%3A0%3Bheight%3A0%3Boverflow%3Avisible%3Bz-index%3A2147483647%3Bpointer-events%3Anone%3B%22%3B%0Avar%20root%20%3D%20host.attachShadow(%7B%20mode%3A%20%22open%22%20%7D)%3B%0Avar%20style%20%3D%20document.createElement(%22style%22)%3B%0Astyle.textContent%20%3D%20%5B%0A%20%20%22%3Ahost%7Ball%3Ainitial%7D%22%2C%0A%20%20%22svg%7Bposition%3Afixed%3Binset%3A0%3Bwidth%3A100vw%3Bheight%3A100vh%3Boverflow%3Avisible%7D%22%2C%0A%20%20%22svg.pg%7Bposition%3Aabsolute%3Bleft%3A0%3Btop%3A0%3Bwidth%3A1px%3Bheight%3A1px%3Boverflow%3Avisible%7D%22%2C%0A%20%20%22.p%7Bposition%3Afixed%3Bbottom%3A66px%3Bright%3A66px%3Bwidth%3A350px%3Bbox-sizing%3Aborder-box%3Bpadding%3A6px%3Bbackground%3A%23e4dccd%3Bcolor%3A%231a1612%3Bborder-radius%3A16px%3Bbox-shadow%3A0%201px%202px%20rgba(0%2C0%2C0%2C.12)%2C0%2014px%2034px%20rgba(0%2C0%2C0%2C.26)%3Bfont%3A14px%2F1.45%20-apple-system%2Csystem-ui%2C'Segoe%20UI'%2CRoboto%2Csans-serif%3Bpointer-events%3Aauto%3Bcursor%3Agrab%3Boverflow-x%3Ahidden%3Boverflow-y%3Aauto%3Bmax-height%3Acalc(100vh%20-%2090px)%3Boverscroll-behavior%3Acontain%7D%22%2C%0A%20%20%22.tb%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A4px%3Bpadding%3A0%200%205px%204px%7D%22%2C%0A%20%20%22.t%7Bmargin%3A0%3Bflex%3A1%3Bwhite-space%3Anowrap%3Bfont%3A700%2017px%2F1.2%20Georgia%2Cserif%3Bletter-spacing%3A-.01em%7D%22%2C%0A%20%20%22.cd%7Bmargin%3A4px%200%200%3Bpadding%3A7px%2010px%3Bbackground%3A%23fbf8f3%3Bborder-radius%3A10px%7D%22%2C%0A%20%20%22.tb%2B.cd%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.p.rm%7Bpadding%3A10px%7D%22%2C%0A%20%20%22.rm%20.tb%7Bgap%3A6px%3Bpadding%3A4px%202px%208px%206px%7D%22%2C%0A%20%20%22.rm%20.t%7Bfont-size%3A19px%7D%22%2C%0A%20%20%22.rm%20.cd%7Bmargin-top%3A6px%3Bpadding%3A12px%2014px%7D%22%2C%0A%20%20%22.rm%20.tb%2B.cd%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.rm%20.ta%7Bheight%3A32px%3Bpadding%3A0%2012px%200%2010px%7D%22%2C%0A%20%20%22.rm%20.n%7Bgap%3A7px%3Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.n%20b%7Bfont-size%3A22px%7D%22%2C%0A%20%20%22.rm%20.k%7Bmargin-top%3A7px%7D%22%2C%0A%20%20%22.rm%20.x%2C.rm%20.b.cn%7Bwidth%3A32px%3Bheight%3A32px%7D%22%2C%0A%20%20%22.rm%20.sec%7Bmargin-top%3A6px%7D%22%2C%0A%20%20%22.rm%20.sg%7Bmin-height%3A46px%3Bpadding%3A0%2012px%200%208px%7D%22%2C%0A%20%20%22.rm%20.ic%7Bwidth%3A30px%3Bheight%3A30px%3Bborder-radius%3A8px%7D%22%2C%0A%20%20%22.rm%20.so%2C.rm%20.lbd%2C.rm%20.la%7Bpadding%3A2px%2014px%2014px%7D%22%2C%0A%20%20%22.rm%20.hw%7Bmargin%3A10px%206px%202px%7D%22%2C%0A%20%20%22.rm%20.m%7Bmargin-top%3A8px%3Bgap%3A6px%7D%22%2C%0A%20%20%22.rm%20.c%7Bpadding%3A6px%2010px%7D%22%2C%0A%20%20%22.rm%20.pr%7Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.pl%7Bheight%3A30px%3Bpadding%3A0%2014px%200%2011px%7D%22%2C%0A%20%20%22.rm%20.b%7Bwidth%3A30px%3Bheight%3A30px%7D%22%2C%0A%20%20%22.rm%20.lf%7Bmargin-top%3A10px%7D%22%2C%0A%20%20%22.rm%20.lt%7Bpadding%3A3px%209px%7D%22%2C%0A%20%20%22.rm%20.ll%7Bmargin%3A10px%20-14px%200%7D%22%2C%0A%20%20%22.rm%20.lx%7Bpadding%3A6px%2014px%7D%22%2C%0A%20%20%22.rm%20.lr.lb2%7Bgap%3A6px%3Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.kl%2C.rm%20.ka%7Bheight%3A38px%3Bborder-radius%3A8px%7D%22%2C%0A%20%20%22.rm%20.lnt%7Bheight%3A38px%3Bborder-radius%3A8px%7D%22%2C%0A%20%20%22.rm%20.lck%2C.rm%20.lw%2C.rm%20.sm%2C.rm%20.lr%7Bmargin-top%3A10px%7D%22%2C%0A%20%20%22.rm%20.lrt%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.rm%20.gp%20.k%2C.rm%20.lgp%20.k%7Bmargin-top%3A10px%7D%22%2C%0A%20%20%22.rm%20.mn%7Bmargin-top%3A12px%7D%22%2C%0A%20%20%22.rm%20.so%3E.k%3Afirst-child%2C.rm%20.lbd%3E%3Afirst-child%2C.rm%20.la%3E%3Afirst-child%2C.rm%20.cd%3E%3Afirst-child%2C.rm%20.cd%3Ediv%3Afirst-child%3E%3Afirst-child%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.cd%3E%3Afirst-child%2C.cd%3Ediv%3Afirst-child%3E%3Afirst-child%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.cd%3Ediv%3Aempty%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.ta%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A6px%3Bheight%3A28px%3Bpadding%3A0%2010px%200%208px%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A999px%3Bbackground%3A%23fbf8f3%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bwhite-space%3Anowrap%3Bcursor%3Apointer%3Bflex%3Anone%7D%22%2C%0A%20%20%22.ta%3Ahover%7Bbackground%3A%23fff%7D%22%2C%0A%20%20%22.ta%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.n%7Bdisplay%3Aflex%3Balign-items%3Abaseline%3Bgap%3A6px%3Bmargin%3A5px%200%200%7D%22%2C%0A%20%20%22.n%20b%7Bfont%3A700%2020px%2F1%20-apple-system%2Csystem-ui%2C'Segoe%20UI'%2CRoboto%2Csans-serif%3Bletter-spacing%3A-.02em%3Bfont-variant-numeric%3Atabular-nums%7D%22%2C%0A%20%20%22.k%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A10px%3Bmargin%3A4px%200%200%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.d%7Bwidth%3A16px%3Bheight%3A16px%3Bborder-radius%3A50%25%3Bbackground%3A%231a1612%3Bbox-shadow%3A0%200%200%202px%20%23fff%20inset%2C0%200%200%201px%20%231a1612%3Bflex%3Anone%7D%22%2C%0A%20%20%22.r%7Bwidth%3A16px%3Bheight%3A12px%3Bbox-sizing%3Aborder-box%3Bborder%3A2px%20dashed%20%23d0103a%3Bborder-radius%3A2px%3Bbackground%3Argba(208%2C16%2C58%2C.12)%3Bflex%3Anone%7D%22%2C%0A%20%20%22.x%7Bwidth%3A28px%3Bheight%3A28px%3Bflex%3Anone%3Bpadding%3A0%3Bborder%3A0%3Bborder-radius%3A50%25%3Bbackground%3Atransparent%3Bcolor%3A%231a1612%3Bcursor%3Apointer%3Bdisplay%3Agrid%3Bplace-items%3Acenter%7D%22%2C%0A%20%20%22.p%20svg%7Bdisplay%3Ablock%3Bposition%3Astatic%3Binset%3Aauto%3Bwidth%3Aauto%3Bheight%3Aauto%3Boverflow%3Ahidden%3Bflex%3Anone%7D%22%2C%0A%20%20%22.x%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.b.cn%7Bwidth%3A28px%3Bheight%3A28px%7D%22%2C%0A%20%20%22.sr%7Bposition%3Aabsolute%3Bwidth%3A1px%3Bheight%3A1px%3Bmargin%3A-1px%3Bpadding%3A0%3Bborder%3A0%3Boverflow%3Ahidden%3Bclip%3Arect(0%200%200%200)%3Bwhite-space%3Anowrap%7D%22%2C%0A%20%20%22.x%3Afocus-visible%2C.a%3Afocus-visible%2C.sg%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.sec%7Bmargin%3A4px%200%200%3Bbackground%3A%23fbf8f3%3Bborder-radius%3A10px%7D%22%2C%0A%20%20%22.sg%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A10px%3Bwidth%3A100%25%3Bmin-height%3A32px%3Bpadding%3A0%209px%200%205px%3Bborder-radius%3A10px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.sg%3Ahover%7Bbackground%3A%23fff%7D%22%2C%0A%20%20%22.ic%7Bwidth%3A22px%3Bheight%3A22px%3Bborder-radius%3A6px%3Bbackground%3A%23efe8dc%3Bdisplay%3Agrid%3Bplace-items%3Acenter%3Bflex%3Anone%7D%22%2C%0A%20%20%22.sg%5Baria-expanded%3Dtrue%5D%20.ic%7Bbackground%3A%231a1612%3Bcolor%3A%23fbf8f3%7D%22%2C%0A%20%20%22.warn%20.ic%7Bbackground%3Argba(208%2C16%2C58%2C.12)%3Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.warn%20.sg%5Baria-expanded%3Dtrue%5D%20.ic%7Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.bg%7Bmargin-left%3Aauto%3Bpadding%3A2px%208px%3Bborder-radius%3A999px%3Bbackground%3A%23d0103a%3Bcolor%3A%23fff%3Bfont-weight%3A700%3Bline-height%3A1.3%7D%22%2C%0A%20%20%22.bg%3Aempty%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.bg%3Anot(%3Aempty)%2Bi%7Bmargin-left%3A12px%7D%22%2C%0A%20%20%22.sg%20i%7Bmargin-left%3Aauto%3Bwidth%3A7px%3Bheight%3A7px%3Bborder-right%3A2px%20solid%20%231a1612%3Bborder-bottom%3A2px%20solid%20%231a1612%3Btransform%3Atranslate(-3px%2C-2px)%20rotate(45deg)%7D%22%2C%0A%20%20%22.sg%5Baria-expanded%3Dtrue%5D%20i%7Btransform%3Atranslate(-3px%2C2px)%20rotate(225deg)%7D%22%2C%0A%20%20%22.so%2C.lbd%2C.la%7Bpadding%3A1px%2010px%208px%7D%22%2C%0A%20%20%22.lbd%7Boverflow%3Ahidden%7D%22%2C%0A%20%20%22.so%3E.k%3Afirst-child%2C.lbd%3E%3Afirst-child%2C.la%3E%3Afirst-child%7Bmargin-top%3A0%7D%22%2C%0A%20%20%22.so%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.hw%7Bmargin%3A5px%204px%200%3Bcolor%3A%235f564c%3Bfont-size%3A11px%3Bline-height%3A1.3%3Bfont-weight%3A600%7D%22%2C%0A%20%20%22.a%7Bcolor%3A%235f564c%3Bfont-size%3A13px%3Bfont-weight%3A400%3Btext-decoration%3Anone%3Bwhite-space%3Anowrap%7D%22%2C%0A%20%20%22.vr%7Bfloat%3Aright%3Bmargin-left%3A8px%3Bcolor%3A%235f564c%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.hw%2B.hw%7Bmargin-top%3A4px%7D%22%2C%0A%20%20%22.mn%7Bmargin%3A6px%200%200%3Bcolor%3A%231e3a8a%7D%22%2C%0A%20%20%22.a%3Ahover%7Bcolor%3A%239a3412%3Btext-decoration%3Aunderline%7D%22%2C%0A%20%20%22.p.g%7Bcursor%3Agrabbing%3Buser-select%3Anone%7D%22%2C%0A%20%20%22.n%20b.e%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.n%20b.ok%7Bcolor%3A%231f7a3f%7D%22%2C%0A%20%20%22button.lq%7Ball%3Aunset%3Bcursor%3Apointer%3Bcolor%3A%231e3a8a%3Bfont-weight%3A700%7D.cg%7Bcolor%3A%235f564c%7D.pk%7Bcolor%3A%23c2410c%7D%22%2C%0A%20%20%22.bar%7Bdisplay%3Aflex%3Bgap%3A2px%3Bheight%3A24px%3Bmargin%3A6px%200%202px%7D.bar%20button%7Bborder%3A0%3Bpadding%3A0%3Bmin-width%3A6px%3Bborder-radius%3A4px%3Bcursor%3Apointer%7D.bar%20button%3Afocus-visible%7Boutline%3A2px%20solid%20%231a1612%3Boutline-offset%3A2px%7D.bl%7Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Bgap%3A4px%2012px%3Bfont-size%3A13px%3Bmargin%3A4px%200%208px%7D.bl%20em%7Bwidth%3A10px%3Bheight%3A10px%3Bborder-radius%3A3px%3Bdisplay%3Ainline-block%3Bmargin-right%3A5px%7D%22%2C%0A%20%20%22.s%7Bcursor%3Apointer%7D%22%2C%0A%20%20%22svg.in%7Bz-index%3A1%7D%22%2C%0A%20%20%22g.o%7Bpointer-events%3Aauto%3Bcursor%3Apointer%3B-webkit-user-select%3Anone%3Buser-select%3Anone%7D%22%2C%0A%20%20%22.s%20input%7Bwidth%3A16px%3Bheight%3A16px%3Bmargin%3A0%202px%200%201px%3Baccent-color%3A%23c2410c%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.s.off%7Bopacity%3A.45%3Bcursor%3Adefault%7D%22%2C%0A%20%20%22.s.off%20input%7Bcursor%3Adefault%7D%22%2C%0A%20%20%22.s%20input%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.h%7Bwidth%3A16px%3Bheight%3A16px%3Bborder-radius%3A50%25%3Bbackground%3A%23fff%3Bborder%3A2px%20dashed%20%231a1612%3Bbox-sizing%3Aborder-box%3Bflex%3Anone%7D%22%2C%0A%20%20%22.m%7Blist-style%3Anone%3Bmargin%3A5px%200%200%3Bpadding%3A2px%3Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Bgap%3A4px%7D%22%2C%0A%20%20%22.c%7Ball%3Aunset%3Bfont%3Ainherit%3Bfont-size%3A14px%3Bline-height%3A1%3Bcursor%3Apointer%3Bpadding%3A4px%208px%3Bborder%3A1px%20dashed%20%23d0103a%3Bborder-radius%3A999px%3Bbackground%3Argba(208%2C16%2C58%2C.06)%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.c%3Ahover%7Bbackground%3Argba(208%2C16%2C58%2C.14)%7D%22%2C%0A%20%20%22.c%5Baria-pressed%3Dtrue%5D%7Bborder-style%3Asolid%3Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.c%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.gp%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.gp%20.k%2C.lgp%20.k%7Bmargin%3A6px%200%200%7D%22%2C%0A%20%20%22.w%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A8px%3Bmargin%3A0%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.w%20span%7Bflex%3A1%3Bfont-variant-numeric%3Atabular-nums%7D%22%2C%0A%20%20%22.b%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bwidth%3A28px%3Bheight%3A28px%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A50%25%3Bdisplay%3Agrid%3Bplace-items%3Acenter%3Bcursor%3Apointer%3Bcolor%3A%231a1612%3Bflex%3Anone%7D%22%2C%0A%20%20%22.b%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.b%3Adisabled%7Bopacity%3A.3%3Bcursor%3Adefault%3Bbackground%3Anone%7D%22%2C%0A%20%20%22.b%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.pr%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A10px%3Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.pr%2B.pr%7Bmargin-top%3A8px%7D%22%2C%0A%20%20%22.pr%20.lo%7Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bheight%3A30px%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.sm%7Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bline-height%3A1.45%7D%22%2C%0A%20%20%22.sm%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.sm%20.g%7Bcolor%3A%231f7a3f%3Bfont-weight%3A600%7D%22%2C%0A%20%20%22.sm%20.e%7Bcolor%3A%23d0103a%3Bfont-weight%3A700%7D%22%2C%0A%20%20%22.sm%20.q%7Bcolor%3A%235f564c%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.m%20.mo%7Balign-self%3Acenter%3Bcolor%3A%235f564c%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.pl%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A7px%3Bheight%3A28px%3Bpadding%3A0%2013px%200%2010px%3Bborder-radius%3A999px%3Bbackground%3A%231a1612%3Bcolor%3A%23f7f3ec%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%3Bflex%3Anone%7D%22%2C%0A%20%20%22.pl%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.pl%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.ls%7Bfont-weight%3A400%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.lv%7Bcolor%3A%23d0103a%3Bfont-weight%3A700%7D%22%2C%0A%20%20%22.lbd%5Bhidden%5D%2C.la%5Bhidden%5D%2C.lm%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lf%7Bdisplay%3Agrid%3Bgrid-template-columns%3A1fr%201fr%3Bgap%3A2px%3Bmargin%3A6px%200%200%3Bpadding%3A3px%3Bbackground%3A%23efe8dc%3Bborder-radius%3A10px%7D%22%2C%0A%20%20%22.lt%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Btext-align%3Acenter%3Bpadding%3A2px%209px%3Bborder-radius%3A7px%3Bcolor%3A%235f564c%3Bfont-weight%3A600%3Bfont-size%3A14px%3Bline-height%3A1.3%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lt%3Ahover%7Bcolor%3A%231a1612%3Bbackground%3Argba(26%2C22%2C18%2C.06)%7D%22%2C%0A%20%20%22.lt%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23fff%3Bcolor%3A%231a1612%3Bbox-shadow%3A0%201px%202px%20rgba(26%2C22%2C18%2C.2)%7D%22%2C%0A%20%20%22.lt.e%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lt.e%3Ahover%7Bbackground%3Argba(208%2C16%2C58%2C.1)%7D%22%2C%0A%20%20%22.lt.e%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.ll%7Blist-style%3Anone%3Bmargin%3A6px%20-10px%200%3Bpadding%3A0%3Bcursor%3Aauto%7D%22%2C%0A%20%20%22.lx%7Bpadding%3A3px%2010px%7D%22%2C%0A%20%20%22.lx.bad%7Bbackground%3Argba(208%2C16%2C58%2C.07)%7D%22%2C%0A%20%20%22.lx%20.tm%7Bmargin-right%3A8px%3Bfont%3A500%2014px%2F1.4%20ui-monospace%2CSFMono-Regular%2CMenlo%2CConsolas%2Cmonospace%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.lx%20.st%7Bfont%3A700%2014px%2F1.4%20ui-monospace%2CSFMono-Regular%2CMenlo%2CConsolas%2Cmonospace%7D%22%2C%0A%20%20%22.lx%20.bd%7Bdisplay%3Ablock%7D%22%2C%0A%20%20%22.ok%20.st%7Bcolor%3A%231f7a3f%7D.bad%20.st%7Bcolor%3A%23d0103a%7D.skip%20.st%7Bcolor%3A%235f564c%7D.info%20.st%7Bcolor%3A%231e3a8a%7D%22%2C%0A%20%20%22.ft%7Bcolor%3A%231e3a8a%7D.bad%20.ft%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lc%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-block%3Bmin-width%3A22px%3Bpadding%3A0%206px%3Bborder%3A1px%20dashed%20%231a1612%3Bborder-radius%3A999px%3Bfont-size%3A14px%3Bline-height%3A1.4%3Btext-align%3Acenter%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lc%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.lr%7Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Bgap%3A8px%3Bmargin%3A6px%200%200%7D%22%2C%0A%20%20%22.lrt%7Bmargin%3A0%7D%22%2C%0A%20%20%22.lr.lb2%7Bdisplay%3Agrid%3Bgrid-template-columns%3A1fr%201fr%3Bgap%3A5px%3Bmargin-top%3A8px%7D%22%2C%0A%20%20%22.kl%2C.ka%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bjustify-content%3Acenter%3Bgap%3A7px%3Bheight%3A30px%3Bborder-radius%3A7px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bwhite-space%3Anowrap%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.kl%7Bborder%3A1.5px%20solid%20%231a1612%3Bbackground%3A%23fff%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.kl%3Ahover%7Bbackground%3A%23efe8dc%7D%22%2C%0A%20%20%22.ka%7Bbackground%3A%231a1612%3Bcolor%3A%23fbf8f3%7D%22%2C%0A%20%20%22.ka%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.kl%3Afocus-visible%2C.ka%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lnt%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bdisplay%3Aflex%3Balign-items%3Acenter%3Bjustify-content%3Acenter%3Bgap%3A7px%3Bwidth%3A100%25%3Bheight%3A30px%3Bborder%3A1.5px%20dashed%20%231a1612%3Bborder-radius%3A7px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lnt%3Ahover%7Bborder-style%3Asolid%3Bbackground%3A%23fff%7D%22%2C%0A%20%20%22.lnt%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lk%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bpadding%3A5px%2013px%3Bborder-radius%3A999px%3Bbackground%3A%231a1612%3Bcolor%3A%23f7f3ec%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lk%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.lo%7Ball%3Aunset%3Bbox-sizing%3Aborder-box%3Bpadding%3A4px%2012px%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A999px%3Bfont-weight%3A600%3Bfont-size%3A14px%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lo%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%2C%0A%20%20%22.lt%3Afocus-visible%2C.lc%3Afocus-visible%2C.lk%3Afocus-visible%2C.lo%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.la%20p%2C.lm%7Bmargin%3A8px%200%200%7D%22%2C%0A%20%20%22.lck%7Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bline-height%3A1.45%7D%22%2C%0A%20%20%22.lck%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lq%7Bcolor%3A%231e3a8a%3Bfont-weight%3A700%3Btext-decoration%3Anone%7D%22%2C%0A%20%20%22.lq%3Ahover%7Btext-decoration%3Aunderline%3Btext-underline-offset%3A2px%7D%22%2C%0A%20%20%22.lq.bad%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lq%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%3Bborder-radius%3A2px%7D%22%2C%0A%20%20%22.wc%7Bcolor%3A%231f7a3f%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.nw%20.wc%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lw%7Bdisplay%3Aflex%3Balign-items%3Acenter%3Bgap%3A8px%3Bmargin%3A6px%200%200%3Bfont-size%3A14px%3Bcolor%3A%231f7a3f%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%7Bwidth%3A16px%3Bheight%3A16px%3Bmargin%3A0%202px%200%201px%3Baccent-color%3A%23c2410c%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lm%7Bcolor%3A%23d0103a%7D%22%0A%5D.join(%22%22)%3B%0Atry%20%7B%0A%20%20var%20sheet%20%3D%20new%20CSSStyleSheet()%3B%0A%20%20sheet.replaceSync(style.textContent)%3B%0A%20%20root.adoptedStyleSheets%20%3D%20%5Bsheet%5D%3B%0A%7D%20catch%20(e)%20%7B%0A%20%20root.appendChild(style)%3B%0A%7D%0Avar%20spot%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(spot)%3B%0Avar%20underPg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0AunderPg.setAttribute(%22class%22%2C%20%22pg%22)%3B%0Aroot.appendChild(underPg)%3B%0Avar%20svgPg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0AsvgPg.setAttribute(%22class%22%2C%20%22pg%22)%3B%0Aroot.appendChild(svgPg)%3B%0Avar%20under%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(under)%3B%0Avar%20svg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(svg)%3B%0Avar%20dotPg%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0AdotPg.setAttribute(%22class%22%2C%20%22pg%22)%3B%0Aroot.appendChild(dotPg)%3B%0Avar%20dot%20%3D%20document.createElementNS(NS%2C%20%22svg%22)%3B%0Aroot.appendChild(dot)%3B%0A%5Bspot%2C%20underPg%2C%20svgPg%2C%20under%2C%20svg%2C%20dotPg%2C%20dot%5D.forEach(function%20(g)%20%7B%20g.setAttribute(%22aria-hidden%22%2C%20%22true%22)%3B%20%7D)%3B%0A%0Avar%20panel%20%3D%20document.createElement(%22div%22)%3B%0Apanel.className%20%3D%20%22p%22%3B%0Apanel.setAttribute(%22role%22%2C%20%22dialog%22)%3B%0Apanel.setAttribute(%22aria-label%22%2C%20%22Tab%20trail%22)%3B%0Afunction%20line(cls%2C%20bold%2C%20text%2C%20mark)%20%7B%0A%20%20var%20p%20%3D%20document.createElement(%22p%22)%3B%0A%20%20p.className%20%3D%20cls%3B%0A%20%20if%20(mark)%20%7B%20var%20m%20%3D%20document.createElement(%22span%22)%3B%20m.className%20%3D%20mark%3B%20p.appendChild(m)%3B%20%7D%0A%20%20if%20(bold%20!%3D%3D%20null)%20%7B%20var%20b%20%3D%20document.createElement(%22b%22)%3B%20b.textContent%20%3D%20bold%3B%20p.appendChild(b)%3B%20%7D%0A%20%20p.appendChild(document.createTextNode(text))%3B%0A%20%20panel.appendChild(p)%3B%0A%20%20return%20p%3B%0A%7D%0Avar%20x%20%3D%20document.createElement(%22button%22)%3B%0Ax.className%20%3D%20%22x%22%3B%0Ax.type%20%3D%20%22button%22%3B%0Ax.setAttribute(%22aria-label%22%2C%20%22Close%20Tab%20trail%22)%3B%0Afunction%20icon(parent%2C%20w%2C%20d%2C%20sw)%20%7B%0A%20%20var%20g%20%3D%20el(%22svg%22%2C%20%7B%20width%3A%20w%2C%20height%3A%20w%2C%20viewBox%3A%20%220%200%2016%2016%22%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22currentColor%22%2C%20%22stroke-width%22%3A%20sw%2C%20%22stroke-linecap%22%3A%20%22round%22%2C%20%22stroke-linejoin%22%3A%20%22round%22%2C%20%22aria-hidden%22%3A%20%22true%22%20%7D%2C%20parent)%3B%0A%20%20el(%22path%22%2C%20%7B%20d%3A%20d%20%7D%2C%20g)%3B%0A%20%20return%20g%3B%0A%7D%0Aicon(x%2C%2016%2C%20%22M3%203l10%2010M13%203L3%2013%22%2C%202)%3B%0Avar%20bar%20%3D%20document.createElement(%22div%22)%3B%0Abar.className%20%3D%20%22tb%22%3B%0Apanel.appendChild(bar)%3B%0Avar%20corner%20%3D%20document.createElement(%22button%22)%3B%0Acorner.className%20%3D%20%22b%20cn%22%3B%0Acorner.type%20%3D%20%22button%22%3B%0Acorner.setAttribute(%22aria-label%22%2C%20%22Move%20to%20the%20next%20corner%22)%3B%0Acorner.title%20%3D%20%22Move%20to%20the%20next%20corner%22%3B%0Avar%20cg%20%3D%20icon(corner%2C%2016%2C%20%22M5%2011.5V5h6.5M9.5%203.2L11.5%205%209.5%206.8%22%2C%201.6)%3B%0Ael(%22rect%22%2C%20%7B%20x%3A%202%2C%20y%3A%202%2C%20width%3A%2012%2C%20height%3A%2012%2C%20rx%3A%202%20%7D%2C%20cg)%3B%0Ael(%22rect%22%2C%20%7B%20x%3A%209.5%2C%20y%3A%209.5%2C%20width%3A%202%2C%20height%3A%202%2C%20fill%3A%20%22currentColor%22%20%7D%2C%20cg)%3B%0Acorner.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20var%20r%20%3D%20panel.getBoundingClientRect()%2C%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%3B%0A%20%20var%20mx%20%3D%20Math.max(8%2C%20Math.min(66%2C%20(W%20-%20r.width)%20%2F%202))%20%2B%20%22px%22%2C%20my%20%3D%20Math.max(8%2C%20Math.min(66%2C%20(H%20-%20r.height)%20%2F%202))%20%2B%20%22px%22%3B%0A%20%20var%20right%20%3D%20r.left%20%2B%20r.width%20%2F%202%20%3E%20W%20%2F%202%2C%20low%20%3D%20r.top%20%2B%20r.height%20%2F%202%20%3E%20H%20%2F%202%3B%0A%20%20var%20k%20%3D%20!low%20%26%26%20!right%20%3F%201%20%3A%20!low%20%26%26%20right%20%3F%202%20%3A%20low%20%26%26%20right%20%3F%203%20%3A%200%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%204%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20toRight%20%3D%20k%20%3D%3D%3D%201%20%7C%7C%20k%20%3D%3D%3D%202%2C%20toLow%20%3D%20k%20%3D%3D%3D%202%20%7C%7C%20k%20%3D%3D%3D%203%3B%0A%20%20%20%20panel.style.left%20%3D%20toRight%20%3F%20%22auto%22%20%3A%20mx%3B%0A%20%20%20%20panel.style.right%20%3D%20toRight%20%3F%20mx%20%3A%20%22auto%22%3B%0A%20%20%20%20panel.style.top%20%3D%20toLow%20%3F%20%22auto%22%20%3A%20my%3B%0A%20%20%20%20panel.style.bottom%20%3D%20toLow%20%3F%20my%20%3A%20%22auto%22%3B%0A%20%20%20%20var%20n%20%3D%20panel.getBoundingClientRect()%3B%0A%20%20%20%20if%20(Math.abs(n.left%20-%20r.left)%20%3E%202%20%7C%7C%20Math.abs(n.top%20-%20r.top)%20%3E%202)%20break%3B%0A%20%20%20%20k%20%3D%20(k%20%2B%201)%20%25%204%3B%0A%20%20%7D%0A%7D)%3B%0Avar%20say%20%3D%20document.createElement(%22p%22)%3B%0Asay.className%20%3D%20%22sr%22%3B%0Asay.setAttribute(%22role%22%2C%20%22status%22)%3B%0Asay.setAttribute(%22aria-live%22%2C%20%22polite%22)%3B%0Apanel.appendChild(say)%3B%0Avar%20sayList%20%3D%20%5B%5D%2C%20sayT%20%3D%200%3B%0Afunction%20announce(t)%20%7B%0A%20%20sayList.push(t)%3B%0A%20%20if%20(sayT)%20return%3B%0A%20%20sayT%20%3D%20setTimeout(function%20()%20%7B%0A%20%20%20%20sayT%20%3D%200%3B%0A%20%20%20%20if%20(closed)%20return%3B%0A%20%20%20%20var%20text%20%3D%20sayList.join(%22%20%22)%3B%0A%20%20%20%20sayList%20%3D%20%5B%5D%3B%0A%20%20%20%20say.textContent%20%3D%20%22%22%3B%0A%20%20%20%20setTimeout(function%20()%20%7B%20say.textContent%20%3D%20text%3B%20%7D%2C%2050)%3B%0A%20%20%7D%2C%201000)%3B%0A%7D%0Abar.appendChild(line(%22t%22%2C%20null%2C%20%22Tab%20trail%22))%3B%0Avar%20playCard%20%3D%20document.createElement(%22div%22)%3B%0AplayCard.className%20%3D%20%22cd%22%3B%0Apanel.appendChild(playCard)%3B%0Avar%20playRow%20%3D%20document.createElement(%22p%22)%3B%0AplayRow.className%20%3D%20%22pr%22%3B%0Avar%20play%20%3D%20document.createElement(%22button%22)%3B%0Aplay.className%20%3D%20%22pl%22%3B%0Aplay.type%20%3D%20%22button%22%3B%0Avar%20playIcon%20%3D%20document.createElement(%22span%22)%3B%0Aplay.appendChild(playIcon)%3B%0Avar%20playWord%20%3D%20document.createTextNode(%22Play%22)%3B%0Aplay.appendChild(playWord)%3B%0Aplay.addEventListener(%22mousedown%22%2C%20function%20(e)%20%7B%20e.preventDefault()%3B%20%7D)%3B%0Avar%20playText%20%3D%20document.createElement(%22span%22)%3B%0AplayText.textContent%20%3D%20%22Visits%20every%20stop%20for%20you%22%3B%0AplayRow.appendChild(play)%3B%0AplayRow.appendChild(playText)%3B%0AplayCard.appendChild(playRow)%3B%0Avar%20AI_ICON%20%3D%20%22M3.5%205.5h9v8h-9zM8%205.5V3.2M8%201.9v.1M6%208.6v1.1M10%208.6v1.1M6.3%2011.6h3.4M1.8%208.5v2.6M14.2%208.5v2.6%22%2C%20COPY_ICON%20%3D%20%22M10.5%205.5V3a.5.5%200%200%200-.5-.5H3a.5.5%200%200%200-.5.5v7a.5.5%200%200%200%20.5.5h2.5M5.5%205.5h8v8h-8z%22%3B%0Avar%20aiBtn%20%3D%20document.createElement(%22button%22)%3B%0AaiBtn.className%20%3D%20%22ta%22%3B%0AaiBtn.type%20%3D%20%22button%22%3B%0Aicon(aiBtn%2C%2015%2C%20AI_ICON%2C%201.6)%3B%0AaiBtn.appendChild(document.createTextNode(%22Copy%20for%20AI%22))%3B%0AaiBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(aiBtn%2C%20window%2C%20aiText()%2C%20%22Copy%20for%20AI%22)%3B%20%7D)%3B%0Abar.appendChild(aiBtn)%3B%0Abar.appendChild(corner)%3B%0Abar.appendChild(x)%3B%0Avar%20sumLine%20%3D%20document.createElement(%22p%22)%3B%0AsumLine.className%20%3D%20%22sm%22%3B%0AsumLine.hidden%20%3D%20true%3B%0AplayCard.appendChild(sumLine)%3B%0Avar%20resCard%20%3D%20document.createElement(%22div%22)%3B%0AresCard.className%20%3D%20%22cd%22%3B%0Apanel.appendChild(resCard)%3B%0Avar%20info%20%3D%20document.createElement(%22div%22)%3B%0AresCard.appendChild(info)%3B%0Avar%20shownEl%20%3D%20null%2C%20chips%20%3D%20%5B%5D%2C%20drawn%20%3D%20%5B%5D%2C%20panelIn%20%3D%20false%2C%20pRet%20%3D%20null%3B%0Avar%20KIND%20%3D%20%7B%20img%3A%20%22Image%22%2C%20picture%3A%20%22Image%22%2C%20svg%3A%20%22Icon%22%2C%20i%3A%20%22Icon%22%2C%20video%3A%20%22Video%22%2C%20a%3A%20%22Link%22%2C%20li%3A%20%22List%20item%22%2C%20tr%3A%20%22Table%20row%22%2C%20td%3A%20%22Table%20cell%22%20%7D%3B%0Avar%20BARE%20%3D%20%7B%20button%3A%20%22Button%22%2C%20textarea%3A%20%22Field%22%2C%20select%3A%20%22Dropdown%22%2C%20iframe%3A%20%22Frame%22%20%7D%3B%0Afunction%20kind(m%2C%20tag)%20%7B%0A%20%20if%20(tag%20%3D%3D%3D%20%22input%22)%20return%20m.type%20%3D%3D%3D%20%22checkbox%22%20%3F%20%22Checkbox%22%20%3A%20m.type%20%3D%3D%3D%20%22radio%22%20%3F%20%22Radio%22%20%3A%20%2F%5E(submit%7Cbutton%7Creset%7Cimage)%24%2F.test(m.type)%20%3F%20%22Button%22%20%3A%20%22Field%22%3B%0A%20%20return%20KIND%5Btag%5D%20%7C%7C%20BARE%5Btag%5D%20%7C%7C%20%22Clickable%20box%22%3B%0A%7D%0Afunction%20named(m)%20%7B%0A%20%20var%20by%20%3D%20m.getAttribute(%22aria-labelledby%22)%2C%20r%20%3D%20m.getRootNode()%2C%20t%20%3D%20%22%22%3B%0A%20%20if%20(by%20%26%26%20r.getElementById)%20t%20%3D%20by.split(%2F%5Cs%2B%2F).map(function%20(id)%20%7B%20var%20x%20%3D%20r.getElementById(id)%3B%20return%20x%20%3F%20x.textContent%20%3A%20%22%22%3B%20%7D).join(%22%20%22)%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.getAttribute(%22aria-label%22)%20%7C%7C%20%22%22%3B%0A%20%20if%20(!t.trim()%20%26%26%20m.labels%20%26%26%20m.labels.length)%20t%20%3D%20%5B%5D.map.call(m.labels%2C%20function%20(l)%20%7B%20return%20l.innerText%20%7C%7C%20l.textContent%3B%20%7D).join(%22%20%22)%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.getAttribute(%22placeholder%22)%20%7C%7C%20%22%22%3B%0A%20%20if%20(!t.trim()%20%26%26%20m.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20%2F%5E(submit%7Cbutton%7Creset)%24%2F.test(m.type))%20t%20%3D%20m.value%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.innerText%20%7C%7C%20%22%22%3B%0A%20%20if%20(!t.trim())%20t%20%3D%20m.getAttribute(%22title%22)%20%7C%7C%20%22%22%3B%0A%20%20return%20t%3B%0A%7D%0Avar%20EMAIL%20%3D%20%2F%5B%5Cw.%2B-%5D%2B%40%5B%5Cw-%5D%2B(%5C.%5B%5Cw-%5D%2B)%2B%2Fg%2C%20DIGITS%20%3D%20%2F%5Cd(%3F%3A%5B%5Cs-%5D%3F%5Cd)%7B5%2C%7D%2Fg%2C%20TOKEN%20%3D%20%2F%5BA-Za-z0-9_%25%3D%2B-%5D%7B16%2C%7D%2Fg%3B%0Avar%20SECRET%20%3D%20%2F%5Cb(%3F%3A(%3F%3Ask%7Cpk%7Crk)_(%3F%3Alive%7Ctest)_%5Cw%2B%7Cgh%5Bpousr%5D_%5Cw%7B20%2C%7D%7Cgithub_pat_%5Cw%2B%7CAKIA%5B0-9A-Z%5D%7B16%7D%7Cxox%5Babprs%5D-%5B%5Cw-%5D%2B%7CeyJ%5B%5Cw-%5D%2B%5C.%5B%5Cw-%5D%2B%5C.%5B%5Cw-%5D*)%2Fg%2C%20SAID%20%3D%20%2F%5Cb((%3F%3Apassword%7Cpasswd%7Cpwd%7Cpasscode%7Cpin%7Csecret%7Capi%5B%20_-%5D%3Fkey%7Ctoken)%5Cs*%5B%3A%3D%5D%5Cs*)%5CS%2B%2Fgi%3B%0Afunction%20tokens(t)%20%7B%20return%20t.replace(SECRET%2C%20%22%5Btoken%5D%22).replace(TOKEN%2C%20function%20(w)%20%7B%20return%20%2F%5Cd%2F.test(w)%20%3F%20%22%5Btoken%5D%22%20%3A%20w%3B%20%7D)%3B%20%7D%0Afunction%20scrub(t)%20%7B%20return%20tokens(String(t).replace(SAID%2C%20%22%241%5Btoken%5D%22)).replace(EMAIL%2C%20%22%5Bemail%5D%22).replace(DIGITS%2C%20%22%5Bnumber%5D%22)%3B%20%7D%0Afunction%20secretish(t)%20%7B%20return%20scrub(t)%20!%3D%3D%20t%3B%20%7D%0Afunction%20cleanUrl(u)%20%7B%0A%20%20u%20%3D%20String(u).split(%2F%5B%3F%23%5D%2F)%5B0%5D.replace(%2F%5E(%5Ba-z%5D%5B%5Cw%2B.-%5D*%3A%5C%2F%5C%2F)%5B%5E%40%5C%2F%5D*%40%2Fi%2C%20%22%241%22)%3B%0A%20%20if%20(%2F%5E(javascript%7Cdata%7Cblob)%3A%2Fi.test(u))%20return%20u.split(%22%3A%22)%5B0%5D%20%2B%20%22%3A%22%3B%0A%20%20return%20scrub(u)%3B%0A%7D%0Afunction%20label(m)%20%7B%0A%20%20var%20tag%20%3D%20m.tagName.toLowerCase()%3B%0A%20%20var%20inner%20%3D%20m.querySelector(%22img%5Balt%5D%2C%5Baria-label%5D%2Ctitle%22)%3B%0A%20%20var%20alt%20%3D%20(m.getAttribute(%22alt%22)%20%7C%7C%20(inner%20%26%26%20(inner.getAttribute(%22alt%22)%20%7C%7C%20inner.getAttribute(%22aria-label%22)%20%7C%7C%20inner.textContent))%20%7C%7C%20%22%22).trim()%3B%0A%20%20var%20t%20%3D%20scrub(named(m)).trim().replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22)%3B%0A%20%20alt%20%3D%20scrub(alt)%3B%0A%20%20if%20(!t%20%26%26%20alt)%20t%20%3D%20(KIND%5Btag%5D%20%3F%20KIND%5Btag%5D%20%2B%20%22%3A%20%22%20%3A%20%22%22)%20%2B%20alt.replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22)%3B%0A%20%20if%20(!t)%20t%20%3D%20kind(m%2C%20tag)%3B%0A%20%20return%20t.length%20%3E%2028%20%3F%20t.slice(0%2C%2027)%20%2B%20%22...%22%20%3A%20t%3B%0A%7D%0Afunction%20count(n%2C%20text%2C%20bad%2C%20good%2C%20parent)%20%7B%0A%20%20var%20p%20%3D%20document.createElement(%22p%22)%3B%0A%20%20p.className%20%3D%20%22n%22%3B%0A%20%20var%20b%20%3D%20document.createElement(%22b%22)%3B%0A%20%20b.textContent%20%3D%20String(n)%3B%0A%20%20if%20(bad)%20b.className%20%3D%20%22e%22%3B%0A%20%20else%20if%20(good)%20b.className%20%3D%20%22ok%22%3B%0A%20%20p.appendChild(b)%3B%0A%20%20p.appendChild(document.createTextNode(text))%3B%0A%20%20(parent%20%7C%7C%20info).appendChild(p)%3B%0A%7D%0Avar%20CHIPS%20%3D%2050%3B%0Afunction%20chipUl(parent%2C%20list%2C%20text%2C%20go)%20%7B%0A%20%20var%20ul%20%3D%20document.createElement(%22ul%22)%2C%20out%20%3D%20%5B%5D%3B%0A%20%20ul.className%20%3D%20%22m%22%3B%0A%20%20list.slice(0%2C%20CHIPS).forEach(function%20(m)%20%7B%0A%20%20%20%20var%20li%20%3D%20document.createElement(%22li%22)%3B%0A%20%20%20%20var%20c%20%3D%20document.createElement(%22button%22)%3B%0A%20%20%20%20c.className%20%3D%20%22c%22%3B%0A%20%20%20%20c.type%20%3D%20%22button%22%3B%0A%20%20%20%20c.textContent%20%3D%20text(m)%3B%0A%20%20%20%20c.addEventListener(%22click%22%2C%20function%20()%20%7B%20go(m%2C%20c)%3B%20%7D)%3B%0A%20%20%20%20out.push(c)%3B%0A%20%20%20%20li.appendChild(c)%3B%0A%20%20%20%20ul.appendChild(li)%3B%0A%20%20%7D)%3B%0A%20%20if%20(list.length%20%3E%20CHIPS)%20%7B%0A%20%20%20%20var%20mo%20%3D%20document.createElement(%22li%22)%3B%0A%20%20%20%20mo.className%20%3D%20%22mo%22%3B%0A%20%20%20%20mo.textContent%20%3D%20%22and%20%22%20%2B%20(list.length%20-%20CHIPS).toLocaleString(%22en-US%22)%20%2B%20%22%20more%22%3B%0A%20%20%20%20ul.appendChild(mo)%3B%0A%20%20%7D%0A%20%20parent.appendChild(ul)%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20fill()%20%7B%0A%20%20var%20had%20%3D%20chips.indexOf(root.activeElement)%3B%0A%20%20while%20(info.firstChild)%20info.removeChild(info.firstChild)%3B%0A%20%20chips%20%3D%20%5B%5D%3B%0A%20%20drawn%20%3D%20sig()%3B%0A%20%20count(stops.length%2C%20stops.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20for%20the%20Tab%20key%22%20%3A%20%22%20stops%20for%20the%20Tab%20key%22)%3B%0A%20%20count(missed.length%2C%20missed.length%20%3D%3D%3D%200%20%3F%20%22%20clickable%20things%20Tab%20skips%22%20%3A%20missed.length%20%3D%3D%3D%201%20%3F%20%22%20looks%20clickable%2C%20but%20Tab%20skips%20it%22%20%3A%20%22%20look%20clickable%2C%20but%20Tab%20skips%20them%22%2C%20missed.length%20%3E%200%2C%20missed.length%20%3D%3D%3D%200)%3B%0A%20%20if%20(missed.indexOf(shownEl)%20%3C%200%20%26%26%20hovers.indexOf(shownEl)%20%3C%200%20%26%26%20forcedBad.indexOf(shownEl)%20%3C%200)%20shownEl%20%3D%20null%3B%0A%20%20if%20(missed.length)%20chipList(missed)%3B%0A%20%20if%20(hovers.length)%20%7B%0A%20%20%20%20count(hovers.length%2C%20hovers.length%20%3D%3D%3D%201%20%3F%20%22%20menu%20or%20box%20opens%20only%20on%20mouse%20hover%22%20%3A%20%22%20menus%20or%20boxes%20open%20only%20on%20mouse%20hover%22%2C%20true)%3B%0A%20%20%20%20chipList(hovers)%3B%0A%20%20%7D%0A%20%20if%20(forcedBad.length)%20%7B%0A%20%20%20%20count(forcedBad.length%2C%20forcedBad.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20has%20tabindex%20above%200%2C%20which%20pulls%20it%20ahead%20of%20the%20page%22%20%3A%20%22%20stops%20have%20tabindex%20above%200%2C%20which%20pulls%20them%20ahead%20of%20the%20page%22%2C%20true)%3B%0A%20%20%20%20chipList(forcedBad%2C%20true)%3B%0A%20%20%7D%0A%20%20costDraw()%3B%0A%20%20mapDraw()%3B%0A%20%20if%20(skip)%20skipPanel()%3B%0A%20%20if%20(had%20%3E%3D%200%20%26%26%20chips.length)%20chips%5BMath.min(had%2C%20chips.length%20-%201)%5D.focus()%3B%0A%7D%0Afunction%20sig()%20%7B%20return%20%5Bstops.length%2C%20mapOn%20%26%26%20mapOn.checked%20%26%26%20JSON.stringify(regions()%5B0%5D)%2C%20costOn%20%26%26%20costOn.checked%20%26%26%20goals().map(function%20(g)%20%7B%20return%20g.presses%20%2B%20g.name%3B%20%7D).join()%5D.concat(missed%2C%20%5B%22%7C%22%5D%2C%20hovers%2C%20%5B%22%7C%22%5D%2C%20forced%2C%20%5B%22%7C%22%5D%2C%20forcedBad)%3B%20%7D%0Afunction%20chipList(list%2C%20num)%20%7B%0A%20%20var%20made%20%3D%20chipUl(info%2C%20list%2C%20function%20(m)%20%7B%20return%20(num%20%26%26%20stops.indexOf(m)%20%3E%3D%200%20%3F%20stops.indexOf(m)%20%2B%201%20%2B%20%22%3A%20%22%20%3A%20%22%22)%20%2B%20label(m)%3B%20%7D%2C%20function%20(m%2C%20c)%20%7B%0A%20%20%20%20shownEl%20%3D%20m%3B%0A%20%20%20%20chips.forEach(function%20(x)%20%7B%20x.setAttribute(%22aria-pressed%22%2C%20x%20%3D%3D%3D%20c%20%3F%20%22true%22%20%3A%20%22false%22)%3B%20%7D)%3B%0A%20%20%20%20m.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%0A%20%20%20%20queue()%3B%0A%20%20%7D)%3B%0A%20%20made.forEach(function%20(c%2C%20i)%20%7B%20c.setAttribute(%22aria-pressed%22%2C%20list%5Bi%5D%20%3D%3D%3D%20shownEl%20%3F%20%22true%22%20%3A%20%22false%22)%3B%20%7D)%3B%0A%20%20chips%20%3D%20chips.concat(made)%3B%0A%7D%0Afill()%3B%0Avar%20PAGE%20%3D%2050%2C%20win%20%3D%200%2C%20seen%20%3D%20-1%3B%0Avar%20pager%20%3D%20document.createElement(%22p%22)%3B%0Apager.className%20%3D%20%22w%22%3B%0Avar%20pageText%20%3D%20document.createElement(%22span%22)%3B%0Apager.appendChild(pageText)%3B%0Afunction%20pageBtn(text%2C%20step)%20%7B%0A%20%20var%20b%20%3D%20document.createElement(%22button%22)%3B%0A%20%20b.className%20%3D%20%22b%22%3B%0A%20%20b.type%20%3D%20%22button%22%3B%0A%20%20b.setAttribute(%22aria-label%22%2C%20text)%3B%0A%20%20icon(b%2C%2014%2C%20step%20%3C%200%20%3F%20%22M10%203L5%208l5%205%22%20%3A%20%22M6%203l5%205-5%205%22%2C%202)%3B%0A%20%20b.addEventListener(%22mousedown%22%2C%20function%20(e)%20%7B%20e.preventDefault()%3B%20%7D)%3B%0A%20%20b.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20win%20%3D%20Math.min(Math.max(win%20%2B%20step%2C%200)%2C%20Math.ceil(stops.length%20%2F%20PAGE)%20-%201)%3B%0A%20%20%20%20queue()%3B%0A%20%20%7D)%3B%0A%20%20pager.appendChild(b)%3B%0A%20%20return%20b%3B%0A%7D%0Avar%20prevBtn%20%3D%20pageBtn(%22Previous%22%2C%20-1)%2C%20nextBtn%20%3D%20pageBtn(%22Next%22%2C%201)%3B%0Avar%20group%20%3D%20document.createElement(%22div%22)%3B%0Agroup.className%20%3D%20%22cd%20gp%22%3B%0Agroup.appendChild(pager)%3B%0Avar%20costBox%20%3D%20document.createElement(%22div%22)%3B%0AresCard.appendChild(costBox)%3B%0Avar%20mapBox%20%3D%20document.createElement(%22div%22)%3B%0AresCard.appendChild(mapBox)%3B%0Avar%20jumpBox%20%3D%20document.createElement(%22div%22)%3B%0AresCard.appendChild(jumpBox)%3B%0Apanel.appendChild(group)%3B%0Avar%20jumps%20%3D%20%5B%5D%2C%20pressed%20%3D%200%2C%20before%20%3D%20-1%2C%20popMissed%20%3D%20null%2C%20lost%20%3D%20false%3B%0Avar%20POP%20%3D%20%2Fcookie%7Cconsent%7Cgdpr%7Cmodal%7Cpopup%2Fi%3B%0Afunction%20dimmed()%20%7B%0A%20%20var%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%3B%0A%20%20return%20Array.prototype.some.call(document.querySelectorAll(%22body%20*%22)%2C%20function%20(e)%20%7B%0A%20%20%20%20if%20(e.id%20%3D%3D%3D%20ID)%20return%20false%3B%0A%20%20%20%20var%20cs%20%3D%20getComputedStyle(e)%3B%0A%20%20%20%20if%20(cs.position%20!%3D%3D%20%22fixed%22%20%7C%7C%20cs.display%20%3D%3D%3D%20%22none%22%20%7C%7C%20cs.visibility%20%3D%3D%3D%20%22hidden%22)%20return%20false%3B%0A%20%20%20%20var%20r%20%3D%20e.getBoundingClientRect()%3B%0A%20%20%20%20if%20(r.width%20%3C%20W%20*%200.9%20%7C%7C%20r.height%20%3C%20H%20*%200.9)%20return%20false%3B%0A%20%20%20%20var%20m%20%3D%20cs.backgroundColor.match(%2Frgba%3F%5C((%5B%5E)%5D%2B)%5C)%2F)%3B%0A%20%20%20%20var%20al%20%3D%20m%20%3F%20m%5B1%5D.split(%22%2C%22)%5B3%5D%20%3A%20null%3B%0A%20%20%20%20return%20(al%20!%3D%3D%20undefined%20%26%26%20al%20!%3D%3D%20null%20%26%26%20%2Bal%20%3E%200%20%26%26%20%2Bal%20%3C%201)%20%7C%7C%20cs.backdropFilter%20!%3D%3D%20%22none%22%20%26%26%20cs.backdropFilter%20!%3D%3D%20%22%22%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20blocking(p)%20%7B%0A%20%20if%20(p.matches(%22dialog%22)%20%26%26%20p.matches(%22%3Amodal%22))%20return%20true%3B%0A%20%20if%20(p.getAttribute(%22aria-modal%22)%20%3D%3D%3D%20%22true%22)%20return%20true%3B%0A%20%20var%20r%20%3D%20p.getBoundingClientRect()%3B%0A%20%20if%20(r.width%20*%20r.height%20%3E%3D%20innerWidth%20*%20innerHeight%20*%200.5)%20return%20true%3B%0A%20%20return%20dimmed()%3B%0A%7D%0Afunction%20popupOf(el)%20%7B%0A%20%20for%20(var%20p%20%3D%20el%3B%20p%20%26%26%20p%20!%3D%3D%20document.documentElement%3B%20p%20%3D%20p.parentElement%20%7C%7C%20(p.getRootNode().host%20%7C%7C%20null))%20%7B%0A%20%20%20%20if%20(p.nodeType%20!%3D%3D%201)%20continue%3B%0A%20%20%20%20if%20(p.matches(%22dialog%5Bopen%5D%2C%5Brole%3Ddialog%5D%2C%5Brole%3Dalertdialog%5D%2C%5Baria-modal%3Dtrue%5D%22))%20return%20p%3B%0A%20%20%20%20var%20c%20%3D%20typeof%20p.className%20%3D%3D%3D%20%22string%22%20%3F%20p.className%20%3A%20%22%22%3B%0A%20%20%20%20if%20(POP.test(p.id%20%2B%20%22%20%22%20%2B%20c)%20%26%26%20getComputedStyle(p).position%20%3D%3D%3D%20%22fixed%22)%20return%20p%3B%0A%20%20%7D%0A%20%20return%20null%3B%0A%7D%0Avar%20covered%20%3D%20%5B%5D%2C%20trapped%20%3D%20%5B%5D%2C%20probHid%20%3D%20new%20Map()%3B%0Afunction%20pinOf(e)%20%7B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement%20%7C%7C%20(n.getRootNode()%20%26%26%20n.getRootNode().host))%20%7B%0A%20%20%20%20var%20pos%20%3D%20getComputedStyle(n).position%3B%0A%20%20%20%20if%20(pos%20%3D%3D%3D%20%22fixed%22%20%7C%7C%20pos%20%3D%3D%3D%20%22sticky%22)%20return%20n%3B%0A%20%20%7D%0A%20%20return%20null%3B%0A%7D%0Afunction%20hideInfo(s)%20%7B%0A%20%20var%20r%20%3D%20s.getBoundingClientRect()%3B%0A%20%20if%20(r.width%20%3C%201%20%7C%7C%20r.height%20%3C%201)%20return%20%7B%20why%3A%20%22has%20no%20size%22%20%7D%3B%0A%20%20var%20m%20%3D%20modal()%3B%0A%20%20if%20(m%20%26%26%20!within(m%2C%20s))%20return%20%7B%20why%3A%20%22is%20under%20an%20open%20modal%22%20%7D%3B%0A%20%20if%20(popupOf(s))%20return%20%7B%20why%3A%20%22is%20inside%20a%20popup%22%20%7D%3B%0A%20%20var%20pts%20%3D%20%5B%5Br.left%20%2B%20r.width%20%2F%202%2C%20r.top%20%2B%20r.height%20%2F%202%5D%2C%20%5Br.left%20%2B%201%2C%20r.top%20%2B%201%5D%2C%20%5Br.right%20-%201%2C%20r.top%20%2B%201%5D%2C%20%5Br.left%20%2B%201%2C%20r.bottom%20-%201%5D%2C%20%5Br.right%20-%201%2C%20r.bottom%20-%201%5D%5D%3B%0A%20%20var%20tested%20%3D%200%2C%20under%20%3D%200%2C%20pin%20%3D%20null%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20pts.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20px%20%3D%20pts%5Bi%5D%5B0%5D%2C%20py%20%3D%20pts%5Bi%5D%5B1%5D%3B%0A%20%20%20%20if%20(px%20%3C%200%20%7C%7C%20py%20%3C%200%20%7C%7C%20px%20%3E%3D%20innerWidth%20%7C%7C%20py%20%3E%3D%20innerHeight)%20continue%3B%0A%20%20%20%20tested%2B%2B%3B%0A%20%20%20%20var%20hit%20%3D%20null%2C%20list%20%3D%20document.elementsFromPoint(px%2C%20py)%3B%0A%20%20%20%20for%20(var%20k%20%3D%200%3B%20k%20%3C%20list.length%3B%20k%2B%2B)%20if%20(list%5Bk%5D%20!%3D%3D%20host%20%26%26%20!host.contains(list%5Bk%5D))%20%7B%20hit%20%3D%20list%5Bk%5D%3B%20break%3B%20%7D%0A%20%20%20%20if%20(!hit%20%7C%7C%20within(s%2C%20hit)%20%7C%7C%20within(hit%2C%20s))%20continue%3B%0A%20%20%20%20var%20p%20%3D%20pinOf(hit)%3B%0A%20%20%20%20if%20(!p%20%7C%7C%20within(p%2C%20s))%20continue%3B%0A%20%20%20%20under%2B%2B%3B%0A%20%20%20%20if%20(!pin)%20pin%20%3D%20p%3B%0A%20%20%7D%0A%20%20if%20(!tested)%20return%20%7B%20why%3A%20%22is%20off%20screen%22%20%7D%3B%0A%20%20return%20%7B%20tested%3A%20tested%2C%20under%3A%20under%2C%20pin%3A%20pin%20%7D%3B%0A%7D%0Afunction%20pinText(p)%20%7B%0A%20%20return%20desc(p)%20%2B%20%22%20(%22%20%2B%20getComputedStyle(p).position%20%2B%20%22%2C%20%22%20%2B%20Math.round(p.getBoundingClientRect().height)%20%2B%20%22%20px%20tall)%22%3B%0A%7D%0Avar%20moved%20%3D%20%5B%5D%2C%20movedE%20%3D%20null%3B%0Afunction%20movedLine()%20%7B%0A%20%20if%20(movedE)%20%7B%0A%20%20%20%20var%20i%20%3D%20logs.indexOf(movedE)%3B%0A%20%20%20%20if%20(i%20%3E%3D%200)%20logs.splice(i%2C%201)%3B%0A%20%20%20%20if%20(movedE.li%20%26%26%20movedE.li.parentNode)%20movedE.li.parentNode.removeChild(movedE.li)%3B%0A%20%20%20%20movedE%20%3D%20null%3B%0A%20%20%7D%0A%20%20moved%20%3D%20moved.filter(function%20(x)%20%7B%20return%20x.isConnected%3B%20%7D)%3B%0A%20%20if%20(!moved.length)%20%7B%0A%20%20%20%20if%20(logList)%20logSummary()%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20var%20nums%20%3D%20moved.map(function%20(x)%20%7B%20return%20stops.indexOf(x)%20%2B%201%3B%20%7D).filter(function%20(n)%20%7B%20return%20n%20%3E%200%3B%20%7D).sort(function%20(a%2C%20b)%20%7B%20return%20a%20-%20b%3B%20%7D)%3B%0A%20%20var%20list%20%3D%20nums.length%20%3F%20%22%3A%20%22%20%2B%20nums.slice(0%2C%2020).join(%22%2C%20%22)%20%2B%20(nums.length%20%3E%2020%20%3F%20%22%20and%20%22%20%2B%20(nums.length%20-%2020)%20%2B%20%22%20more%22%20%3A%20%22%22)%20%3A%20%22%22%3B%0A%20%20log(%22SKIPPED%22%2C%20%22Hidden%20focus%22%2C%20%5Bpl(moved.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%20not%20tested%2C%20Tab%20moved%20on%20before%20the%20page%20stopped%20scrolling%22%20%2B%20list%20%2B%20%22.%20Press%20Play%20to%20test%20them.%22%5D)%3B%0A%20%20movedE%20%3D%20logs%5Blogs.length%20-%201%5D%3B%0A%7D%0Afunction%20tested(s)%20%7B%0A%20%20var%20i%20%3D%20moved.indexOf(s)%3B%0A%20%20if%20(i%20%3C%200)%20return%3B%0A%20%20moved.splice(i%2C%201)%3B%0A%20%20movedLine()%3B%0A%7D%0Afunction%20where(s)%20%7B%0A%20%20var%20r%20%3D%20s.getBoundingClientRect()%3B%0A%20%20return%20scrollX%20%2B%20%22%2C%22%20%2B%20scrollY%20%2B%20%22%2C%22%20%2B%20r.left%20%2B%20%22%2C%22%20%2B%20r.top%3B%0A%7D%0Avar%20restSig%20%3D%20new%20WeakMap()%2C%20noRing%20%3D%20%5B%5D%2C%20probRing%20%3D%20new%20Map()%2C%20SIG%20%3D%20%5B%22outline-style%22%2C%20%22outline-width%22%2C%20%22outline-color%22%2C%20%22box-shadow%22%2C%20%22background-color%22%2C%20%22background-image%22%2C%20%22color%22%2C%20%22text-decoration-line%22%2C%20%22text-decoration-color%22%2C%20%22opacity%22%2C%20%22transform%22%2C%20%22filter%22%5D%3B%0Afunction%20upOf(e)%20%7B%20return%20e%20%26%26%20(e.parentElement%20%7C%7C%20(e.parentNode%20%26%26%20e.parentNode.host))%3B%20%7D%0Afunction%20focusSig(e)%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20up%20%3D%20upOf(e)%3B%0A%20%20%5B%5Be%5D%2C%20%5Be%2C%20%22%3A%3Abefore%22%5D%2C%20%5Be%2C%20%22%3A%3Aafter%22%5D%2C%20%5Bup%5D%2C%20%5BupOf(up)%5D%2C%20%5Be.nextElementSibling%5D%2C%20%5Be.firstElementChild%5D%2C%20%5Be.labels%20%26%26%20e.labels%5B0%5D%5D%5D.forEach(function%20(x)%20%7B%0A%20%20%20%20if%20(!x%5B0%5D)%20return%3B%0A%20%20%20%20var%20c%20%3D%20getComputedStyle(x%5B0%5D%2C%20x%5B1%5D%20%7C%7C%20null)%2C%20o%20%3D%20c.outlineStyle%20!%3D%3D%20%22none%22%20%26%26%20c.outlineWidth%20!%3D%3D%20%220px%22%3B%0A%20%20%20%20SIG.forEach(function%20(k)%20%7B%20if%20(o%20%7C%7C%20k.indexOf(%22outline%22)%20%3C%200)%20out.push(c.getPropertyValue(k))%3B%20%7D)%3B%0A%20%20%20%20%5B%22top%22%2C%20%22right%22%2C%20%22bottom%22%2C%20%22left%22%5D.forEach(function%20(d)%20%7B%0A%20%20%20%20%20%20var%20w%20%3D%20c.getPropertyValue(%22border-%22%20%2B%20d%20%2B%20%22-width%22)%3B%0A%20%20%20%20%20%20out.push(w%2C%20w%20%3D%3D%3D%20%220px%22%20%3F%20%22%22%20%3A%20c.getPropertyValue(%22border-%22%20%2B%20d%20%2B%20%22-color%22))%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D)%3B%0A%20%20return%20out.join(%22%7C%22)%3B%0A%7D%0Afunction%20rest(e)%20%7B%0A%20%20if%20(!e)%20return%3B%0A%20%20if%20(e.matches(%22%3Ahover%22))%20restSig.delete(e)%3B%0A%20%20else%20restSig.set(e%2C%20focusSig(e))%3B%0A%7D%0Avar%20noOutline%20%3D%20null%3B%0Afunction%20outlineRule(e)%20%7B%0A%20%20if%20(!noOutline)%20%7B%0A%20%20%20%20noOutline%20%3D%20%5B%5D%3B%0A%20%20%20%20var%20go%20%3D%20function%20(list%2C%20src)%20%7B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20list.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20%20%20var%20r%20%3D%20list%5Bi%5D%2C%20st%20%3D%20r.style%3B%0A%20%20%20%20%20%20%20%20if%20(r.cssRules%20%26%26%20r.cssRules.length)%20go(r.cssRules%2C%20src)%3B%0A%20%20%20%20%20%20%20%20if%20(r.selectorText%20%26%26%20st%20%26%26%20(st.outlineStyle%20%3D%3D%3D%20%22none%22%20%7C%7C%20%2F%5E0(px)%3F%24%2F.test(st.outlineWidth)))%20parts(r.selectorText).forEach(function%20(p)%20%7B%20noOutline.push(%5Bp%2C%20src%2C%20p.replace(%2F%3Afocus(-visible)%3F(%3F!%5B%5Cw-%5D)%2Fg%2C%20%22%22).trim()%20%7C%7C%20%22*%22%5D)%3B%20%7D)%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%3B%0A%20%20%20%20Array.prototype.slice.call(document.styleSheets).concat(document.adoptedStyleSheets%20%7C%7C%20%5B%5D).forEach(function%20(sh)%20%7B%0A%20%20%20%20%20%20try%20%7B%20go(sh.cssRules%2C%20sh.href%20%7C%7C%20(sh.ownerNode%20%3F%20%22an%20inline%20%3Cstyle%3E%20in%20the%20page%22%20%3A%20%22a%20style%20sheet%20added%20by%20script%22))%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20noOutline.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20try%20%7B%20if%20(e.matches(noOutline%5Bi%5D%5B2%5D))%20return%20noOutline%5Bi%5D%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%7D%0A%20%20return%20null%3B%0A%7D%0Avar%20ghosts%20%3D%20%5B%5D%2C%20ghostOf%20%3D%20new%20Map()%2C%20probGhost%20%3D%20new%20Map()%2C%20GHOST%20%3D%20%7B%20off%3A%20%22is%20off%20screen%22%2C%20size%3A%20%22has%20no%20size%22%2C%20inv%3A%20%22is%20invisible%22%2C%20aria%3A%20%22is%20inside%20aria-hidden%22%20%7D%3B%0Afunction%20unseen(e)%20%7B%0A%20%20var%20r%20%3D%20e.getBoundingClientRect()%3B%0A%20%20if%20(r.width%20%3C%201%20%7C%7C%20r.height%20%3C%201)%20return%20%22size%22%3B%0A%20%20if%20(r.right%20%3C%3D%200%20%7C%7C%20r.left%20%3E%3D%20innerWidth%20%7C%7C%20r.bottom%20%3C%3D%200%20%7C%7C%20r.top%20%3E%3D%20innerHeight)%20return%20%22off%22%3B%0A%20%20if%20(getComputedStyle(e).visibility%20%3D%3D%3D%20%22hidden%22)%20return%20%22inv%22%3B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%3B%20n%20%3D%20upOf(n))%20if%20(getComputedStyle(n).opacity%20%3D%3D%3D%20%220%22)%20return%20%22inv%22%3B%0A%20%20return%20%22%22%3B%0A%7D%0Afunction%20ghostWhy(e)%20%7B%0A%20%20var%20why%20%3D%20unseen(e)%2C%20lb%20%3D%20(e.labels%20%26%26%20e.labels%5B0%5D)%20%7C%7C%20(e.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20e.nextElementSibling)%3B%0A%20%20if%20(why%20%26%26%20why%20!%3D%3D%20%22off%22%20%26%26%20lb%20%26%26%20!unseen(lb))%20why%20%3D%20%22%22%3B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%20%26%26%20!why%3B%20n%20%3D%20upOf(n))%20if%20(n.getAttribute(%22aria-hidden%22)%20%3D%3D%3D%20%22true%22)%20why%20%3D%20%22aria%22%3B%0A%20%20return%20why%3B%0A%7D%0Afunction%20ghostCheck(s)%20%7B%0A%20%20if%20(hovers.some(function%20(h)%20%7B%20return%20hovSeen.has(h)%20%26%26%20within(hovHid.get(h)%2C%20s)%3B%20%7D))%20return%20true%3B%0A%20%20var%20why%20%3D%20ghostWhy(s)%2C%20was%20%3D%20ghosts.indexOf(s)%20%3E%3D%200%3B%0A%20%20if%20(!why)%20%7B%0A%20%20%20%20if%20(!was)%20log(%22OK%22%2C%20%22Ghost%20stop%22%2C%20%5Bref(s)%2C%20%22%20is%20visible%20when%20Tab%20is%20on%20it.%22%5D)%3B%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20ghosts.splice(ghosts.indexOf(s)%2C%201)%3B%0A%20%20%20%20%20%20ghostOf.delete(s)%3B%0A%20%20%20%20%20%20probGhost.get(s).fixed%20%3D%20true%3B%0A%20%20%20%20%20%20probGhost.delete(s)%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20queue()%3B%0A%20%20%20%20%20%20log(%22OK%22%2C%20%22Ghost%20stop%22%2C%20%5Bref(s)%2C%20%22%20shows%20now%20when%20Tab%20is%20on%20it.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20false%3B%0A%20%20%7D%0A%20%20if%20(was)%20return%20true%3B%0A%20%20ghosts.push(s)%3B%0A%20%20ghostOf.set(s%2C%20why)%3B%0A%20%20renderJumps()%3B%0A%20%20queue()%3B%0A%20%20announce(%22Ghost%20stop%3A%20stop%20%22%20%2B%20(stops.indexOf(s)%20%2B%201)%20%2B%20%22%2C%20%22%20%2B%20label(s)%20%2B%20%22%2C%20%22%20%2B%20GHOST%5Bwhy%5D%20%2B%20%22.%22)%3B%0A%20%20var%20aria%20%3D%20why%20%3D%3D%3D%20%22aria%22%3B%0A%20%20log(%22PROBLEM%22%2C%20%22Ghost%20stop%22%2C%20%5Bref(s)%2C%20%22%20%22%20%2B%20GHOST%5Bwhy%5D%20%2B%20%22%20when%20Tab%20is%20on%20it.%22%5D%2C%20aiOf(aria%20%3F%20W_NAME%20%3A%20W_VIS%2C%20aria%20%3F%20%22An%20element%20Tab%20can%20reach%20is%20not%20hidden%20from%20screen%20readers.%22%20%3A%20%22The%20element%20shows%20on%20screen%20while%20it%20has%20keyboard%20focus.%22%2C%20aria%20%3F%20%22Remove%20aria-hidden%2C%20or%20add%20inert%20or%20tabindex%3D%5C%22-1%5C%22%20so%20Tab%20skips%20it%20too.%22%20%3A%20%22Hide%20it%20with%20display%3A%20none%20or%20inert%20while%20it%20is%20closed%2C%20or%20show%20it%20when%20it%20gets%20focus.%22%2C%20%5B%5B%22Element%22%2C%20s%2C%20null%2C%20true%5D%5D)%2C%20aria%20%3F%20%224.1.2%20A%22%20%3A%20null)%3B%0A%20%20probGhost.set(s%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20return%20true%3B%0A%7D%0Avar%20skipBad%20%3D%20null%2C%20noSkip%20%3D%200%2C%20skipSaid%20%3D%20null%2C%20probSkip%20%3D%20null%2C%20SKIPW%20%3D%20%2F(%5E%7C%5B%5Ea-z%5Cu010d%5Cu0161%5Cu017e%5D)(skip%7Cjump%7Cmain%7Ccontent%7Cpresko%5Cu010di%7Cvsebina)(%3F!%5Ba-z%5Cu010d%5Cu0161%5Cu017e%5D)%2Fi%3B%0Afunction%20mainRegion()%20%7B%20return%20%5B%5D.filter.call(document.querySelectorAll(%22main%2C%5Brole%3Dmain%5D%22)%2C%20shown)%5B0%5D%20%7C%7C%20null%3B%20%7D%0Afunction%20tucked(e)%20%7B%0A%20%20var%20r%20%3D%20e.getBoundingClientRect()%3B%0A%20%20return%20(r.width%20%3C%202%20%26%26%20r.height%20%3C%202)%20%7C%7C%20r.bottom%20%2B%20scrollY%20%3C%3D%200%20%7C%7C%20r.right%20%2B%20scrollX%20%3C%3D%200%3B%0A%7D%0Afunction%20skipLink()%20%7B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%203%20%26%26%20i%20%3C%20stops.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20e%20%3D%20stops%5Bi%5D%2C%20h%20%3D%20e.getAttribute(%22href%22)%20%7C%7C%20%22%22%3B%0A%20%20%20%20if%20(e.tagName%20%3D%3D%3D%20%22A%22%20%26%26%20h.charAt(0)%20%3D%3D%3D%20%22%23%22%20%26%26%20h.length%20%3E%201%20%26%26%20(SKIPW.test(label(e))%20%7C%7C%20(e%20!%3D%3D%20deep()%20%26%26%20tucked(e))))%20return%20e%3B%0A%20%20%7D%0A%20%20return%20null%3B%0A%7D%0Afunction%20ahead(m)%20%7B%20return%20stops.filter(function%20(x)%20%7B%20return%20!within(m%2C%20x)%20%26%26%20m.compareDocumentPosition(x)%20%26%202%3B%20%7D).length%3B%20%7D%0Afunction%20skipCheck()%20%7B%0A%20%20var%20l%20%3D%20skipLink()%2C%20m%20%3D%20mainRegion()%2C%20why%20%3D%20%22%22%2C%20n%20%3D%200%2C%20id%20%3D%20%22%22%2C%20t%20%3D%20null%3B%0A%20%20if%20(l)%20%7B%0A%20%20%20%20id%20%3D%20l.getAttribute(%22href%22).slice(1)%3B%0A%20%20%20%20try%20%7B%20id%20%3D%20decodeURIComponent(id)%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20t%20%3D%20document.getElementById(id)%20%7C%7C%20document.getElementsByName(id)%5B0%5D%3B%0A%20%20%20%20if%20(!t)%20why%20%3D%20%22%23%22%20%2B%20id%20%2B%20%22%20is%20missing%22%3B%0A%20%20%20%20else%20if%20(!shown(t))%20why%20%3D%20%22%23%22%20%2B%20id%20%2B%20%22%20is%20hidden%22%3B%0A%20%20%20%20else%20if%20(!stops.some(function%20(x)%20%7B%20return%20x%20%3D%3D%3D%20t%20%7C%7C%20within(t%2C%20x)%20%7C%7C%20t.compareDocumentPosition(x)%20%26%204%3B%20%7D))%20why%20%3D%20%22nothing%20after%20%23%22%20%2B%20id%20%2B%20%22%20takes%20focus%22%3B%0A%20%20%7D%20else%20if%20(m)%20%7B%0A%20%20%20%20n%20%3D%20ahead(m)%3B%0A%20%20%20%20if%20(n%20%3C%2015)%20n%20%3D%200%3B%0A%20%20%7D%0A%20%20var%20key%20%3D%20%5Bl%2C%20why%2C%20n%2C%20!!m%5D.join(%22%7C%22)%3B%0A%20%20if%20(key%20%3D%3D%3D%20skipSaid)%20return%3B%0A%20%20skipSaid%20%3D%20key%3B%0A%20%20if%20(probSkip)%20probSkip.fixed%20%3D%20true%3B%0A%20%20probSkip%20%3D%20null%3B%0A%20%20skipBad%20%3D%20l%20%26%26%20why%20%3F%20%7B%20link%3A%20l%2C%20why%3A%20why%2C%20to%3A%20t%20%7D%20%3A%20null%3B%0A%20%20noSkip%20%3D%20n%3B%0A%20%20renderJumps()%3B%0A%20%20queue()%3B%0A%20%20if%20(skipBad)%20log(%22PROBLEM%22%2C%20%22Broken%20skip%20link%22%2C%20%5Bref(l)%2C%20%22%20goes%20nowhere%3A%20%22%20%2B%20why%20%2B%20%22.%22%5D%2C%20aiOf(W_BYPASS%2C%20%22The%20skip%20link%20moves%20focus%20past%20the%20header%20to%20the%20main%20content.%22%2C%20t%20%3F%20%22Make%20%23%22%20%2B%20id%20%2B%20%22%20visible%2C%20and%20put%20the%20main%20content%20after%20it.%22%20%3A%20%22Give%20the%20main%20content%20id%3D%5C%22%22%20%2B%20id%20%2B%20%22%5C%22%2C%20or%20point%20the%20link%20at%20the%20id%20it%20has.%22%2C%20%5B%5B%22Element%22%2C%20l%5D%2C%20%5B%22Main%20content%22%2C%20m%5D%5D))%3B%0A%20%20else%20if%20(n)%20log(%22PROBLEM%22%2C%20%22Broken%20skip%20link%22%2C%20%5Bn%20%2B%20%22%20stops%20before%20the%20main%20content%2C%20and%20no%20skip%20link.%22%5D%2C%20aiOf(W_BYPASS%2C%20%22A%20skip%20link%20as%20the%20first%20stop%20moves%20focus%20past%20the%20header%20to%20the%20main%20content.%22%2C%20%22Add%20%3Ca%20href%3D%5C%22%23main%5C%22%3ESkip%20to%20content%3C%2Fa%3E%20as%20the%20first%20link%2C%20and%20id%3D%5C%22main%5C%22%20on%20%3Cmain%3E.%22%2C%20%5B%5B%22Main%20content%22%2C%20m%5D%5D))%3B%0A%20%20else%20if%20(l)%20return%20log(%22OK%22%2C%20%22Broken%20skip%20link%22%2C%20%5Bref(l)%2C%20%22%20goes%20to%20%23%22%20%2B%20id%20%2B%20%22.%22%5D)%3B%0A%20%20else%20if%20(m)%20return%20log(%22OK%22%2C%20%22Broken%20skip%20link%22%2C%20%5Bpl(ahead(m)%2C%20%22stop%20comes%22%2C%20%22stops%20come%22)%20%2B%20%22%20before%20the%20main%20content%2C%20so%20a%20skip%20link%20is%20not%20needed.%22%5D)%3B%0A%20%20else%20return%20log(%22INFO%22%2C%20%22Broken%20skip%20link%22%2C%20%5B%22No%20main%20region%2C%20so%20the%20skip%20link%20check%20has%20nothing%20to%20aim%20at.%22%5D)%3B%0A%20%20probSkip%20%3D%20logs%5Blogs.length%20-%201%5D%3B%0A%7D%0Afunction%20live(m)%20%7B%20return%20stops.indexOf(m)%20%3E%3D%200%3B%20%7D%0Afunction%20runs(list)%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%3B%0A%20%20byStop(list).forEach(function%20(e)%20%7B%0A%20%20%20%20var%20g%20%3D%20out%5Bout.length%20-%201%5D%3B%0A%20%20%20%20if%20(g%20%26%26%20stops.indexOf(g%5Bg.length%20-%201%5D)%20%3D%3D%3D%20stops.indexOf(e)%20-%201%20%26%26%20ghostOf.get(g%5B0%5D)%20%3D%3D%3D%20ghostOf.get(e))%20g.push(e)%3B%0A%20%20%20%20else%20out.push(%5Be%5D)%3B%0A%20%20%7D)%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20span(g)%20%7B%0A%20%20var%20a%20%3D%20stops.indexOf(g%5B0%5D)%20%2B%201%2C%20b%20%3D%20stops.indexOf(g%5Bg.length%20-%201%5D)%20%2B%201%3B%0A%20%20return%20a%20%3D%3D%3D%20b%20%3F%20String(a)%20%3A%20a%20%2B%20%22%20to%20%22%20%2B%20b%3B%0A%7D%0Afunction%20ringCheck(s)%20%7B%0A%20%20var%20was%20%3D%20noRing.indexOf(s)%20%3E%3D%200%2C%20before%20%3D%20restSig.get(s)%3B%0A%20%20if%20(!before)%20return%20log(%22SKIPPED%22%2C%20%22No%20focus%20style%22%2C%20%5Bref(s)%2C%20%22%20has%20no%20style%20from%20before%20focus%20yet%2C%20or%20the%20mouse%20was%20on%20it.%20Judged%20on%20the%20next%20visit.%22%5D)%3B%0A%20%20if%20(before%20!%3D%3D%20focusSig(s))%20%7B%0A%20%20%20%20if%20(!was)%20return%20log(%22OK%22%2C%20%22No%20focus%20style%22%2C%20%5Bref(s)%2C%20%22%20changes%20when%20Tab%20is%20on%20it.%22%5D)%3B%0A%20%20%20%20noRing.splice(noRing.indexOf(s)%2C%201)%3B%0A%20%20%20%20probRing.get(s).fixed%20%3D%20true%3B%0A%20%20%20%20probRing.delete(s)%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20queue()%3B%0A%20%20%20%20return%20log(%22OK%22%2C%20%22No%20focus%20style%22%2C%20%5Bref(s)%2C%20%22%20shows%20focus%20now.%22%5D)%3B%0A%20%20%7D%0A%20%20if%20(was)%20return%3B%0A%20%20noRing.push(s)%3B%0A%20%20renderJumps()%3B%0A%20%20queue()%3B%0A%20%20announce(%22No%20focus%20style%3A%20stop%20%22%20%2B%20(stops.indexOf(s)%20%2B%201)%20%2B%20%22%2C%20%22%20%2B%20label(s)%20%2B%20%22%2C%20shows%20no%20focus.%22)%3B%0A%20%20var%20rule%20%3D%20outlineRule(s)%3B%0A%20%20log(%22PROBLEM%22%2C%20%22No%20focus%20style%22%2C%20%5Bref(s)%2C%20%22%20shows%20nothing%20when%20Tab%20is%20on%20it.%22%5D%2C%20aiOf(W_VIS%2C%20%22The%20element%20shows%20a%20visible%20change%20when%20it%20has%20keyboard%20focus.%22%2C%20%22Add%20%3Afocus-visible%20%7B%20outline%3A%202px%20solid%3B%20outline-offset%3A%202px%20%7D%20for%20it%22%20%2B%20(rule%20%3F%20%22%2C%20or%20remove%20outline%3A%20none%20from%20%22%20%2B%20scrub(rule%5B0%5D)%20%3A%20%22%22)%20%2B%20%22.%22%2C%20%5B%5B%22Element%22%2C%20s%2C%20null%2C%20true%5D%5D%2C%20rule%20%3F%20%5B%22CSS%20rule%3A%20%22%20%2B%20scrub(rule%5B0%5D)%2C%20%22Style%20sheet%3A%20%22%20%2B%20cleanUrl(rule%5B1%5D)%5D%20%3A%20%5B%5D))%3B%0A%20%20probRing.set(s%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%7D%0Afunction%20check(s%2C%20then)%20%7B%0A%20%20function%20end()%20%7B%0A%20%20%20%20var%20f%20%3D%20then%3B%0A%20%20%20%20then%20%3D%20null%3B%0A%20%20%20%20if%20(f)%20f()%3B%0A%20%20%7D%0A%20%20if%20(!s)%20return%20end()%3B%0A%20%20var%20was%20%3D%20covered.indexOf(s)%20%3E%3D%200%3B%0A%20%20var%20at%20%3D%20where(s)%2C%20still%20%3D%200%2C%20tries%20%3D%200%2C%20late%20%3D%200%3B%0A%20%20function%20look()%20%7B%0A%20%20%20%20if%20(closed%20%7C%7C%20(covered.indexOf(s)%20%3E%3D%200)%20!%3D%3D%20was)%20return%20end()%3B%0A%20%20%20%20var%20now%20%3D%20where(s)%3B%0A%20%20%20%20if%20(now%20!%3D%3D%20at)%20%7B%0A%20%20%20%20%20%20if%20(stops%5Bcurrent%5D%20!%3D%3D%20s)%20%7B%0A%20%20%20%20%20%20%20%20if%20(was)%20return%20end()%3B%0A%20%20%20%20%20%20%20%20if%20(moved.indexOf(s)%20%3C%200)%20%7B%0A%20%20%20%20%20%20%20%20%20%20moved.push(s)%3B%0A%20%20%20%20%20%20%20%20%20%20movedLine()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20return%20end()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20at%20%3D%20now%3B%0A%20%20%20%20%20%20still%20%3D%200%3B%0A%20%20%20%20%7D%20else%20still%2B%2B%3B%0A%20%20%20%20if%20(still%20%3C%202%20%26%26%20%2B%2Btries%20%3C%2090)%20return%20requestAnimationFrame(look)%3B%0A%20%20%20%20var%20on%20%3D%20deep()%20%3D%3D%3D%20s%3B%0A%20%20%20%20if%20(on%20%26%26%20!late%20%26%26%20ghostWhy(s))%20%7B%0A%20%20%20%20%20%20late%20%3D%201%3B%0A%20%20%20%20%20%20return%20setTimeout(function%20()%20%7B%0A%20%20%20%20%20%20%20%20if%20(closed)%20return%20end()%3B%0A%20%20%20%20%20%20%20%20if%20(deep()%20!%3D%3D%20s)%20%7B%0A%20%20%20%20%20%20%20%20%20%20log(%22SKIPPED%22%2C%20%22Ghost%20stop%22%2C%20%5Bref(s)%2C%20%22%20lost%20focus%20before%20it%20could%20be%20judged.%22%5D)%3B%0A%20%20%20%20%20%20%20%20%20%20return%20end()%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20still%20%3D%200%3B%0A%20%20%20%20%20%20%20%20look()%3B%0A%20%20%20%20%20%20%7D%2C%20400)%3B%0A%20%20%20%20%7D%0A%20%20%20%20nameOne(s)%3B%0A%20%20%20%20if%20(on%20%26%26%20!ghostCheck(s))%20ringCheck(s)%3B%0A%20%20%20%20tested(s)%3B%0A%20%20%20%20hidTested.add(s)%3B%0A%20%20%20%20if%20(ghosts.indexOf(s)%20%3E%3D%200)%20return%20end()%3B%0A%20%20%20%20var%20h%20%3D%20hideInfo(s)%3B%0A%20%20%20%20if%20(!h.tested)%20%7B%0A%20%20%20%20%20%20log(%22SKIPPED%22%2C%20%22Hidden%20focus%22%2C%20%5Bref(s)%2C%20%22%20%22%20%2B%20h.why%20%2B%20%22.%20Not%20tested.%22%5D)%3B%0A%20%20%20%20%20%20return%20end()%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(was%20%26%26%20h.under%20%3E%3D%20h.tested)%20%7B%0A%20%20%20%20%20%20log(%22INFO%22%2C%20%22Hidden%20focus%22%2C%20%5Bref(s)%2C%20%22%20is%20already%20listed%20as%20hidden.%22%5D)%3B%0A%20%20%20%20%20%20return%20end()%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(was)%20%7B%0A%20%20%20%20%20%20covered.splice(covered.indexOf(s)%2C%201)%3B%0A%20%20%20%20%20%20var%20pe%20%3D%20probHid.get(s)%3B%0A%20%20%20%20%20%20if%20(pe)%20pe.fixed%20%3D%20true%3B%0A%20%20%20%20%20%20probHid.delete(s)%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20end()%3B%0A%20%20%20%20%20%20return%20log(%22OK%22%2C%20%22Hidden%20focus%22%2C%20h.under%20%3F%20%5Bref(s)%2C%20%22%20is%20not%20hidden%20anymore%3A%20it%20is%20partly%20covered%20by%20%22%20%2B%20pinText(h.pin)%20%2B%20%22%2C%20%22%20%2B%20(h.tested%20-%20h.under)%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%20That%20passes%20AA%202.4.11%3B%20AAA%202.4.12%20needs%20it%20fully%20visible.%22%5D%20%3A%20%5Bref(s)%2C%20%22%20is%20not%20hidden%20anymore%2C%20%22%20%2B%20h.tested%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(h.under%20%3C%20h.tested)%20%7B%0A%20%20%20%20%20%20end()%3B%0A%20%20%20%20%20%20return%20log(%22OK%22%2C%20%22Hidden%20focus%22%2C%20h.under%20%3F%20%5Bref(s)%2C%20%22%20is%20partly%20covered%20by%20%22%20%2B%20pinText(h.pin)%20%2B%20%22%2C%20%22%20%2B%20(h.tested%20-%20h.under)%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%20That%20passes%20AA%202.4.11%3B%20AAA%202.4.12%20needs%20it%20fully%20visible.%22%5D%20%3A%20%5Bref(s)%2C%20%22%20is%20in%20view%2C%20%22%20%2B%20h.tested%20%2B%20%22%20of%20%22%20%2B%20h.tested%20%2B%20%22%20points%20clear.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20covered.push(s)%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20announce(%22Hidden%20focus%3A%20stop%20%22%20%2B%20(stops.indexOf(s)%20%2B%201)%20%2B%20%22%2C%20%22%20%2B%20label(s)%20%2B%20%22%2C%20is%20covered.%22)%3B%0A%20%20%20%20var%20pr%20%3D%20h.pin.getBoundingClientRect()%2C%20up%20%3D%20pr.top%20%2B%20pr.height%20%2F%202%20%3C%20innerHeight%20%2F%202%2C%20ph%20%3D%20Math.round(pr.height)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Hidden%20focus%22%2C%20%5Bref(s)%2C%20%22%3A%20all%20%22%20%2B%20h.tested%20%2B%20%22%20points%20are%20under%20%22%20%2B%20pinText(h.pin)%20%2B%20%22.%22%5D%2C%20aiOf(W_HIDE%2C%20%22When%20the%20element%20gets%20keyboard%20focus%2C%20at%20least%20part%20of%20it%20stays%20visible%2C%20not%20covered%20by%20%22%20%2B%20desc(h.pin)%20%2B%20%22.%22%2C%20%22Add%20html%20%7B%20scroll-padding-%22%20%2B%20(up%20%3F%20%22top%22%20%3A%20%22bottom%22)%20%2B%20%22%3A%20%22%20%2B%20(ph%20%2B%208)%20%2B%20%22px%3B%20%7D%20so%20the%20browser%20scrolls%20focused%20elements%20clear%20of%20the%20%22%20%2B%20(up%20%3F%20%22top%22%20%3A%20%22bottom%22)%20%2B%20%22%20bar%20(%22%20%2B%20ph%20%2B%20%22%20px%20tall%2C%20plus%208%20px%20of%20room).%22%2C%20%5B%5B%22Element%22%2C%20s%5D%2C%20%5B%22Covered%20by%22%2C%20h.pin%5D%5D%2C%20%5B%22Measured%3A%20%22%20%2B%20desc(h.pin)%20%2B%20%22%20is%20%22%20%2B%20getComputedStyle(h.pin).position%20%2B%20%22%2C%20%22%20%2B%20ph%20%2B%20%22%20px%20tall%2C%20at%20the%20%22%20%2B%20(up%20%3F%20%22top%22%20%3A%20%22bottom%22)%20%2B%20%22%20of%20a%20%22%20%2B%20innerHeight%20%2B%20%22%20px%20tall%20window.%22%5D))%3B%0A%20%20%20%20probHid.set(s%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20end()%3B%0A%20%20%7D%0A%20%20requestAnimationFrame(look)%3B%0A%7D%0Avar%20popInfo%20%3D%20null%2C%20lostPops%20%3D%20%5B%5D%2C%20openPop%20%3D%20null%2C%20opener%20%3D%20null%2C%20lastOut%20%3D%20null%2C%20tapIn%20%3D%20null%2C%20tapT%20%3D%200%2C%20lastKey%20%3D%20%22%22%2C%20keyT%20%3D%200%2C%20keyOn%20%3D%20null%3B%0Afunction%20deep()%20%7B%0A%20%20var%20a%20%3D%20document.activeElement%3B%0A%20%20while%20(a%20%26%26%20a.shadowRoot%20%26%26%20a.shadowRoot.activeElement)%20a%20%3D%20a.shadowRoot.activeElement%3B%0A%20%20return%20a%3B%0A%7D%0Afunction%20gone(p)%20%7B%20return%20!p.isConnected%20%7C%7C%20!shown(p)%20%7C%7C%20(p.matches(%22dialog%22)%20%26%26%20!p.open)%3B%20%7D%0Afunction%20closedBy(p)%20%7B%0A%20%20var%20now%20%3D%20Date.now()%3B%0A%20%20if%20(tapIn%20%26%26%20now%20-%20tapT%20%3C%20600%20%26%26%20within(p%2C%20tapIn))%20%7B%0A%20%20%20%20var%20b%20%3D%20tapIn.closest%20%3F%20tapIn.closest(%22button%2Ca%2C%5Brole%3Dbutton%5D%22)%20%3A%20null%3B%0A%20%20%20%20return%20b%20%3F%20%22%20with%20%5C%22%22%20%2B%20label(b)%20%2B%20%22%5C%22%22%20%3A%20%22%20with%20a%20click%22%3B%0A%20%20%7D%0A%20%20if%20(keyT%20%26%26%20now%20-%20keyT%20%3C%20600)%20%7B%0A%20%20%20%20if%20(lastKey%20%3D%3D%3D%20%22Escape%22)%20return%20%22%20with%20Escape%22%3B%0A%20%20%20%20if%20(lastKey%20%3D%3D%3D%20%22Enter%22%20%7C%7C%20lastKey%20%3D%3D%3D%20%22%20%22)%20return%20%22%20with%20%22%20%2B%20(lastKey%20%3D%3D%3D%20%22%20%22%20%3F%20%22Space%22%20%3A%20%22Enter%22)%20%2B%20(keyOn%20%26%26%20keyOn.nodeType%20%3D%3D%3D%201%20%26%26%20keyOn%20!%3D%3D%20document.body%20%26%26%20keyOn%20!%3D%3D%20document.documentElement%20%3F%20%22%20on%20%5C%22%22%20%2B%20label(keyOn)%20%2B%20%22%5C%22%22%20%3A%20%22%22)%3B%0A%20%20%7D%0A%20%20return%20%22%22%3B%0A%7D%0Afunction%20popClosed()%20%7B%0A%20%20var%20p%20%3D%20openPop%2C%20from%20%3D%20opener%2C%20pn%20%3D%20popName(p)%2C%20by%20%3D%20closedBy(p)%2C%20pi%20%3D%20popInfo%3B%0A%20%20if%20(by%20%3D%3D%3D%20%22%20with%20Escape%22)%20exitOk(p)%3B%0A%20%20openPop%20%3D%20null%3B%0A%20%20if%20(!from)%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20It%20opened%20on%20its%20own%2C%20so%20there%20is%20no%20button%20to%20go%20back%20to.%22%5D)%3B%0A%20%20if%20(!from.isConnected%20%7C%7C%20!shown(from))%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20The%20button%20that%20opened%20it%20is%20gone%20or%20hidden.%22%5D)%3B%0A%20%20if%20(lostPops.some(function%20(l)%20%7B%20return%20l%5B0%5D%20%3D%3D%3D%20from%3B%20%7D))%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Already%20listed.%22%5D)%3B%0A%20%20if%20(tapIn%20%26%26%20Date.now()%20-%20tapT%20%3C%20600%20%26%26%20!within(p%2C%20tapIn))%20return%20log(%22SKIPPED%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%20by%20a%20click%20outside%20it.%20Not%20judged.%22%5D)%3B%0A%20%20var%20frames%20%3D%200%3B%0A%20%20function%20look()%20%7B%0A%20%20%20%20if%20(closed)%20return%3B%0A%20%20%20%20var%20a%20%3D%20deep()%3B%0A%20%20%20%20if%20(a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement%20%26%26%20!within(p%2C%20a)%20%26%26%20shown(a))%20%7B%0A%20%20%20%20%20%20if%20(a%20%3D%3D%3D%20from)%20return%20log(%22OK%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Focus%20went%20back%20to%20%22%2C%20ref(from)%2C%20%22.%22%5D)%3B%0A%20%20%20%20%20%20return%20log(%22OK%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Focus%20went%20to%20%22%2C%20ref(a)%2C%20%22%2C%20not%20to%20the%20button%20that%20opened%20it%2C%20%22%2C%20ref(from)%2C%20%22.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(%2B%2Bframes%20%3C%2030)%20return%20requestAnimationFrame(look)%3B%0A%20%20%20%20if%20(lostPops.some(function%20(l)%20%7B%20return%20l%5B0%5D%20%3D%3D%3D%20from%3B%20%7D))%20return%3B%0A%20%20%20%20lostPops.push(%5Bfrom%2C%20p%5D)%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20announce(%22Lost%20focus%3A%20%22%20%2B%20pn.l%20%2B%20%22%20closed%20and%20focus%20fell%20to%20the%20page%20body.%22)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Lost%20focus%22%2C%20%5Bpn%2C%20%22%20closed%22%20%2B%20by%20%2B%20%22.%20Focus%20fell%20to%20the%20page%20body%20instead%20of%20going%20back%20to%20%22%2C%20ref(from)%2C%20%22.%22%5D%2C%20aiOf(W_ORDER%2C%20%22When%20the%20popup%20closes%2C%20focus%20goes%20back%20to%20the%20element%20that%20opened%20it%2C%20so%20a%20keyboard%20user%20carries%20on%20from%20there.%22%2C%20%22Before%20the%20popup%20opens%2C%20store%20document.activeElement.%20After%20it%20closes%2C%20call%20.focus()%20on%20that%20element.%20A%20%3Cdialog%3E%20opened%20with%20showModal()%20and%20closed%20with%20close()%20does%20this%20by%20itself%2C%20so%20if%20this%20one%20is%20a%20%3Cdialog%3E%2C%20look%20for%20code%20that%20calls%20blur()%20or%20.focus()%20on%20something%20else%20after%20it%20closes.%22%2C%20%5B%5B%22Popup%22%2C%20p%2C%20pi%5D%2C%20%5B%22Opened%20by%22%2C%20from%5D%5D))%3B%0A%20%20%7D%0A%20%20requestAnimationFrame(look)%3B%0A%7D%0Afunction%20track(a)%20%7B%0A%20%20if%20(openPop%20%26%26%20gone(openPop))%20popClosed()%3B%0A%20%20if%20(!a%20%7C%7C%20a%20%3D%3D%3D%20document.body%20%7C%7C%20a%20%3D%3D%3D%20document.documentElement%20%7C%7C%20a%20%3D%3D%3D%20host%20%7C%7C%20a.getRootNode()%20%3D%3D%3D%20root)%20return%3B%0A%20%20var%20p%20%3D%20popupOf(a)%3B%0A%20%20if%20(!p)%20%7B%0A%20%20%20%20lastOut%20%3D%20a%3B%0A%20%20%20%20openPop%20%3D%20null%3B%0A%20%20%7D%20else%20if%20(!openPop)%20%7B%0A%20%20%20%20openPop%20%3D%20p%3B%0A%20%20%20%20opener%20%3D%20lastOut%3B%0A%20%20%20%20popInfo%20%3D%20%7B%20sel%3A%20sel(p)%2C%20html%3A%20snip(p)%20%7D%3B%0A%20%20%20%20if%20(isModal(p)%20%26%26%20!natives.has(p))%20%7B%0A%20%20%20%20%20%20natives.add(p)%3B%0A%20%20%20%20%20%20log(%22INFO%22%2C%20%22No%20way%20out%22%2C%20%5BpopName(p)%2C%20%22%3A%20Native%20dialog%3A%20Escape%20closes%20it%20in%20the%20browser.%20Check%20by%20hand%20that%20the%20page%20does%20not%20block%20it.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0Avar%20natives%20%3D%20new%20WeakSet()%2C%20noExit%20%3D%20%5B%5D%2C%20okPops%20%3D%20%5B%5D%2C%20CLOSE%20%3D%20%2F(%5E%7C%5B%5Ea-z%5Cu010d%5Cu0161%5Cu017e%5D)(close%7Ccancel%7Cdismiss%7Cno%20thanks%7Cnot%20now%7Cskip%7Cx%7C%5Cu00d7%7C%5Cu2715%7C%5Cu2716%7Czapri%7Cprekli%5Cu010di%7Cne%20hvala)(%3F!%5Ba-z%5Cu010d%5Cu0161%5Cu017e%5D)%2Fi%3B%0Afunction%20isModal(p)%20%7B%0A%20%20try%20%7B%20return%20p.matches(%22dialog%3Amodal%22)%3B%20%7D%20catch%20(x)%20%7B%20return%20false%3B%20%7D%0A%7D%0Afunction%20popKey(p)%20%7B%20return%20popName(p).l%20%2B%20%22%7C%22%20%2B%20sel(p)%3B%20%7D%0Afunction%20exitOk(p)%20%7B%0A%20%20var%20k%20%3D%20popKey(p)%3B%0A%20%20noExit%20%3D%20noExit.filter(function%20(x)%20%7B%0A%20%20%20%20if%20(x%5B2%5D%20!%3D%3D%20k)%20return%20true%3B%0A%20%20%20%20x%5B3%5D.fixed%20%3D%20true%3B%0A%20%20%20%20return%20false%3B%0A%20%20%7D)%3B%0A%20%20renderJumps()%3B%0A%7D%0Avar%20nameOf%20%3D%20new%20WeakMap()%2C%20nameless%20%3D%20%5B%5D%2C%20probName%20%3D%20new%20Map()%2C%20sameSaid%20%3D%20%7B%7D%2C%20ROLE%20%3D%20%7B%20A%3A%20%22link%22%2C%20BUTTON%3A%20%22button%22%2C%20SELECT%3A%20%22combobox%22%2C%20TEXTAREA%3A%20%22textbox%22%2C%20IFRAME%3A%20%22frame%22%2C%20SUMMARY%3A%20%22button%22%20%7D%3B%0Afunction%20accName(e)%20%7B%0A%20%20var%20t%20%3D%20named(e)%20%7C%7C%20(%2F%5E(INPUT%7CAREA)%24%2F.test(e.tagName)%20%26%26%20(e.alt%20%7C%7C%20(%2F%5E(submit%7Creset)%24%2F.test(e.type)%20%26%26%20e.type)))%20%7C%7C%20%22%22%3B%0A%20%20if%20(!t.trim())%20%5B%5D.some.call(e.querySelectorAll(%22img%5Balt%5D%2C%5Baria-label%5D%2Csvg%20title%22)%2C%20function%20(i)%20%7B%20return%20(t%20%3D%20i.getAttribute(%22alt%22)%20%7C%7C%20i.getAttribute(%22aria-label%22)%20%7C%7C%20i.textContent%20%7C%7C%20%22%22).trim()%3B%20%7D)%3B%0A%20%20return%20scrub(t).replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22).trim()%3B%0A%7D%0Afunction%20roleOf(e)%20%7B%20return%20e.getAttribute(%22role%22)%20%7C%7C%20ROLE%5Be.tagName%5D%20%7C%7C%20(e.tagName%20%3D%3D%3D%20%22INPUT%22%20%3F%20(%2F%5E(checkbox%7Cradio)%24%2F.test(e.type)%20%3F%20e.type%20%3A%20%2F%5E(submit%7Cbutton%7Creset%7Cimage)%24%2F.test(e.type)%20%3F%20%22button%22%20%3A%20%22textbox%22)%20%3A%20e.tagName.toLowerCase())%3B%20%7D%0Afunction%20nameOne(s)%20%7B%0A%20%20var%20n%20%3D%20accName(s)%2C%20was%20%3D%20nameless.indexOf(s)%20%3E%3D%200%3B%0A%20%20nameOf.set(s%2C%20n)%3B%0A%20%20if%20(n%20%26%26%20was)%20%7B%0A%20%20%20%20nameless.splice(nameless.indexOf(s)%2C%201)%3B%0A%20%20%20%20probName.get(s).fixed%20%3D%20true%3B%0A%20%20%20%20probName.delete(s)%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Nameless%20stop%22%2C%20%5Bref(s)%2C%20%22%20has%20a%20name%20now.%22%5D)%3B%0A%20%20%7D%0A%20%20if%20(n%20%7C%7C%20was%20%7C%7C%20s.shadowRoot%20%7C%7C%20%2F%5E(AUDIO%7CVIDEO%7COBJECT%7CEMBED)%24%2F.test(s.tagName))%20return%20n%3B%0A%20%20nameless.push(s)%3B%0A%20%20log(%22PROBLEM%22%2C%20%22Nameless%20stop%22%2C%20%5Bref(s)%2C%20%22%20has%20no%20name%2C%20so%20a%20screen%20reader%20reads%20only%20%5C%22%22%20%2B%20roleOf(s)%20%2B%20%22%5C%22.%22%5D%2C%20aiOf(W_NAME%2C%20%22Every%20Tab%20stop%20has%20a%20name%20that%20says%20what%20it%20does.%22%2C%20%22Add%20visible%20text%2C%20an%20aria-label%2C%20or%20alt%20text%20on%20its%20image.%22%2C%20%5B%5B%22Element%22%2C%20s%2C%20null%2C%20true%5D%5D))%3B%0A%20%20probName.set(s%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20return%20n%3B%0A%7D%0Afunction%20nameCheck()%20%7B%0A%20%20var%20by%20%3D%20%7B%7D%3B%0A%20%20stops.forEach(function%20(s)%20%7B%0A%20%20%20%20var%20n%20%3D%20nameOne(s)%3B%0A%20%20%20%20if%20(s.tagName%20%3D%3D%3D%20%22A%22%20%26%26%20n)%20(by%5Bn%5D%20%3D%20by%5Bn%5D%20%7C%7C%20%7B%7D)%5Bs.getAttribute(%22href%22)%5D%20%3D%201%3B%0A%20%20%7D)%3B%0A%20%20Object.keys(by).forEach(function%20(n)%20%7B%0A%20%20%20%20var%20k%20%3D%20Object.keys(by%5Bn%5D).length%3B%0A%20%20%20%20if%20(k%20%3E%202%20%26%26%20!sameSaid%5Bn%5D)%20log(%22INFO%22%2C%20%22Nameless%20stop%22%2C%20%5Bk%20%2B%20%22%20links%20share%20the%20name%20%22%20%2B%20n%20%2B%20%22.%20That%20passes%202.4.4%20when%20the%20text%20around%20each%20one%20tells%20them%20apart.%22%5D)%3B%0A%20%20%20%20sameSaid%5Bn%5D%20%3D%20sameSaid%5Bn%5D%20%7C%7C%20k%20%3E%202%3B%0A%20%20%7D)%3B%0A%20%20renderJumps()%3B%0A%7D%0Afunction%20closer(p%2C%20ps)%20%7B%0A%20%20return%20ps.filter(function%20(x)%20%7B%20return%20CLOSE.test(accName(x))%20%7C%7C%20%2Fclose%7Cdismiss%2Fi.test(x.id%20%2B%20%22%20%22%20%2B%20x.getAttribute(%22class%22))%20%7C%7C%20(x.matches(%22button%3Anot(%5Btype%5D)%2C%5Btype%3Dsubmit%5D%22)%20%26%26%20x.closest(%22form%5Bmethod%3Ddialog%5D%22))%3B%20%7D)%5B0%5D%20%7C%7C%20null%3B%0A%7D%0Afunction%20loopCheck(p%2C%20from%2C%20to%2C%20d)%20%7B%0A%20%20var%20ps%20%3D%20stops.filter(function%20(x)%20%7B%20return%20within(p%2C%20x)%3B%20%7D)%2C%20n%20%3D%20ps.length%3B%0A%20%20var%20k%20%3D%20popKey(p)%2C%20c%20%3D%20closer(p%2C%20ps)%2C%20had%20%3D%20noExit.some(function%20(x)%20%7B%20return%20x%5B2%5D%20%3D%3D%3D%20k%3B%20%7D)%3B%0A%20%20if%20(n%20%3C%202%20%7C%7C%20isModal(p)%20%7C%7C%20ps%5Bd%20%3E%200%20%3F%20n%20-%201%20%3A%200%5D%20!%3D%3D%20from%20%7C%7C%20ps%5Bd%20%3E%200%20%3F%200%20%3A%20n%20-%201%5D%20!%3D%3D%20to%20%7C%7C%20(had%20%26%26%20!c))%20return%3B%0A%20%20if%20(c)%20%7B%0A%20%20%20%20if%20(had)%20exitOk(p)%3B%0A%20%20%20%20if%20(okPops.indexOf(k)%20%3C%200)%20log(%22OK%22%2C%20%22No%20way%20out%22%2C%20%5BpopName(p)%2C%20%22%3A%20Tab%20loops%20inside%20it%2C%20and%20%22%2C%20ref(c)%2C%20%22%20closes%20it.%22%5D)%3B%0A%20%20%20%20okPops.push(k)%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20announce(%22No%20way%20out%3A%20%22%20%2B%20popName(p).l%20%2B%20%22%20has%20no%20close%20control%20Tab%20reaches.%22)%3B%0A%20%20log(%22PROBLEM%22%2C%20%22No%20way%20out%22%2C%20%5BpopName(p)%2C%20%22%3A%20Tab%20loops%20through%20%22%20%2B%20n%20%2B%20%22%20stops%2C%20and%20none%20of%20them%20closes%20it.%22%5D%2C%20aiOf(W_TRAP%2C%20%22A%20keyboard%20user%20can%20close%20the%20popup%20with%20a%20button%20Tab%20reaches.%22%2C%20%22Add%20a%20Close%20button%20inside%20it%2C%20or%20let%20Escape%20close%20it.%22%2C%20%5B%5B%22Popup%22%2C%20p%5D%5D))%3B%0A%20%20noExit.push(%5Bp%2C%20n%2C%20k%2C%20logs%5Blogs.length%20-%201%5D%5D)%3B%0A%20%20renderJumps()%3B%0A%7D%0Afunction%20tap(e)%20%7B%0A%20%20if%20(picking)%20return%3B%0A%20%20tapIn%20%3D%20e.composedPath%20%3F%20e.composedPath()%5B0%5D%20%3A%20e.target%3B%0A%20%20tapT%20%3D%20Date.now()%3B%0A%7D%0Afunction%20stopGo(e)%20%7B%0A%20%20e.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%0A%20%20current%20%3D%20stops.indexOf(e)%3B%0A%20%20queue()%3B%0A%7D%0Afunction%20stopName(e)%20%7B%0A%20%20var%20i%20%3D%20stops.indexOf(e)%3B%0A%20%20return%20(i%20%3E%3D%200%20%3F%20i%20%2B%201%20%3A%20%22%3F%22)%20%2B%20%22%3A%20%22%20%2B%20label(e)%3B%0A%7D%0Afunction%20byStop(list)%20%7B%20return%20list.slice().sort(function%20(a%2C%20b)%20%7B%20return%20stops.indexOf(a)%20-%20stops.indexOf(b)%3B%20%7D)%3B%20%7D%0Afunction%20renderJumps()%20%7B%0A%20%20while%20(jumpBox.firstChild)%20jumpBox.removeChild(jumpBox.firstChild)%3B%0A%20%20if%20(macNote)%20%7B%0A%20%20%20%20var%20mn%20%3D%20document.createElement(%22p%22)%3B%0A%20%20%20%20mn.className%20%3D%20%22mn%22%3B%0A%20%20%20%20mn.textContent%20%3D%20MAC_NOTE%3B%0A%20%20%20%20jumpBox.appendChild(mn)%3B%0A%20%20%7D%0A%20%20if%20(popMissed)%20%7B%0A%20%20%20%20count(1%2C%20%22%20popup%20blocks%20the%20page%2C%20but%20Tab%20goes%20somewhere%20else%20first%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20%5BpopMissed%5D%2C%20function%20()%20%7B%20return%20%22Show%20the%20popup%22%3B%20%7D%2C%20function%20(m)%20%7B%20m.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(covered.length)%20%7B%0A%20%20%20%20count(covered.length%2C%20covered.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20is%20hidden%20when%20Tab%20reaches%20it%22%20%3A%20%22%20stops%20are%20hidden%20when%20Tab%20reaches%20them%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20byStop(covered)%2C%20stopName%2C%20stopGo)%3B%0A%20%20%7D%0A%20%20var%20gl%20%3D%20ghosts.filter(live)%2C%20nl%20%3D%20noRing.filter(live)%3B%0A%20%20if%20(skipBad)%20%7B%0A%20%20%20%20count(1%2C%20%22%20skip%20link%20goes%20nowhere%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20%5BskipBad.link%5D%2C%20function%20(l)%20%7B%20return%20stopName(l)%20%2B%20%22%20%5Cu2192%20%22%20%2B%20skipBad.why%3B%20%7D%2C%20stopGo)%3B%0A%20%20%7D%0A%20%20if%20(noExit.length)%20%7B%0A%20%20%20%20count(noExit.length%2C%20noExit.length%20%3D%3D%3D%201%20%3F%20%22%20popup%20has%20no%20keyboard%20way%20out%22%20%3A%20%22%20popups%20have%20no%20keyboard%20way%20out%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20noExit%2C%20function%20(x)%20%7B%20return%20popName(x%5B0%5D).l%20%2B%20%22%3A%20Tab%20loops%201%20to%20%22%20%2B%20x%5B1%5D%3B%20%7D%2C%20function%20(x)%20%7B%20stopGo(stops.filter(function%20(y)%20%7B%20return%20within(x%5B0%5D%2C%20y)%3B%20%7D)%5B0%5D%20%7C%7C%20x%5B0%5D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20var%20ml%20%3D%20nameless.filter(live)%3B%0A%20%20if%20(ml.length)%20%7B%0A%20%20%20%20count(ml.length%2C%20ml.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20has%20no%20name%20for%20screen%20readers%22%20%3A%20%22%20stops%20have%20no%20name%20for%20screen%20readers%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20byStop(ml)%2C%20stopName%2C%20stopGo)%3B%0A%20%20%7D%0A%20%20if%20(noSkip)%20count(noSkip%2C%20%22%20stops%20before%20the%20main%20content%2C%20and%20no%20skip%20link%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20if%20(gl.length)%20%7B%0A%20%20%20%20count(gl.length%2C%20gl.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20you%20can't%20see%20when%20Tab%20is%20on%20it%22%20%3A%20%22%20stops%20you%20can't%20see%20when%20Tab%20is%20on%20them%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20runs(gl)%2C%20function%20(g)%20%7B%20return%20span(g)%20%2B%20%22%3A%20%22%20%2B%20label(g%5B0%5D)%20%2B%20%22%2C%20%22%20%2B%20GHOST%5BghostOf.get(g%5B0%5D)%5D.replace(%2F%5E(is%7Chas)%20(inside%20)%3F%2F%2C%20%22%22)%3B%20%7D%2C%20function%20(g)%20%7B%20stopGo(g%5B0%5D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(nl.length)%20%7B%0A%20%20%20%20count(nl.length%2C%20nl.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20shows%20no%20focus%20when%20Tab%20is%20on%20it%22%20%3A%20%22%20stops%20show%20no%20focus%20when%20Tab%20is%20on%20them%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20byStop(nl)%2C%20stopName%2C%20stopGo)%3B%0A%20%20%7D%0A%20%20if%20(trapped.length)%20%7B%0A%20%20%20%20count(trapped.length%2C%20trapped.length%20%3D%3D%3D%201%20%3F%20%22%20stop%20where%20Tab%20gets%20stuck%22%20%3A%20%22%20stops%20where%20Tab%20gets%20stuck%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20byStop(trapped)%2C%20stopName%2C%20stopGo)%3B%0A%20%20%7D%0A%20%20if%20(lostPops.length)%20%7B%0A%20%20%20%20count(lostPops.length%2C%20lostPops.length%20%3D%3D%3D%201%20%3F%20%22%20popup%20loses%20focus%20when%20it%20closes%22%20%3A%20%22%20popups%20lose%20focus%20when%20they%20close%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20lostPops%2C%20function%20(l)%20%7B%0A%20%20%20%20%20%20var%20i%20%3D%20stops.indexOf(l%5B0%5D)%3B%0A%20%20%20%20%20%20return%20(i%20%3E%3D%200%20%3F%20i%20%2B%201%20%3A%20label(l%5B0%5D))%20%2B%20%22%20%5Cu2192%20Start%22%3B%0A%20%20%20%20%7D%2C%20function%20(l)%20%7B%20stopGo(l%5B0%5D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(jumps.length)%20%7B%0A%20%20%20%20count(jumps.length%2C%20jumps.length%20%3D%3D%3D%201%20%3F%20%22%20time%20Tab%20jumped%20out%20of%20order%22%20%3A%20%22%20times%20Tab%20jumped%20out%20of%20order%22%2C%20true%2C%20false%2C%20jumpBox)%3B%0A%20%20%20%20chipUl(jumpBox%2C%20jumps%2C%20function%20(j)%20%7B%0A%20%20%20%20%20%20var%20from%20%3D%20j%5B0%5D%20%3F%20stops.indexOf(j%5B0%5D)%20%2B%201%20%7C%7C%20label(j%5B0%5D)%20%3A%20%22Start%22%2C%20to%20%3D%20stops.indexOf(j%5B1%5D)%20%2B%201%3B%0A%20%20%20%20%20%20return%20from%20%2B%20%22%20%5Cu2192%20%22%20%2B%20(to%20%7C%7C%20%22%3F%22)%3B%0A%20%20%20%20%7D%2C%20function%20(j)%20%7B%20stopGo(j%5B1%5D)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20if%20(skip)%20skipPanel()%3B%0A%7D%0Avar%20legend%20%3D%20document.createElement(%22div%22)%3B%0Alegend.className%20%3D%20%22so%22%3B%0Alegend.hidden%20%3D%20true%3B%0Alegend.appendChild(line(%22k%22%2C%20null%2C%20%22The%20order%20Tab%20visits%22%2C%20%22d%22))%3B%0Alegend.appendChild(line(%22k%22%2C%20null%2C%20%22Hidden%20until%20Tab%20reaches%20it%22%2C%20%22h%22))%3B%0Alegend.appendChild(line(%22k%22%2C%20null%2C%20%22Tab%20can't%20reach%20or%20see%20it%22%2C%20%22r%22))%3B%0Avar%20tray%20%3D%20document.createElement(%22div%22)%3B%0Atray.className%20%3D%20%22tr%22%3B%0Apanel.appendChild(tray)%3B%0Avar%20gear%20%3D%20document.createElement(%22button%22)%3B%0Agear.className%20%3D%20%22sg%22%3B%0Agear.type%20%3D%20%22button%22%3B%0Agear.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Avar%20gearIcon%20%3D%20icon(gear%2C%2016%2C%20%22M8%201.5v2M8%2012.5v2M1.5%208h2M12.5%208h2M3.4%203.4l1.4%201.4M11.2%2011.2l1.4%201.4M3.4%2012.6l1.4-1.4M11.2%204.8l1.4-1.4%22%2C%201.6)%3B%0Ael(%22circle%22%2C%20%7B%20cx%3A%208%2C%20cy%3A%208%2C%20r%3A%202.2%20%7D%2C%20gearIcon)%3B%0Agear.appendChild(document.createTextNode(%22Settings%22))%3B%0Agear.appendChild(document.createElement(%22i%22))%3B%0Atray.appendChild(gear)%3B%0Avar%20settings%20%3D%20document.createElement(%22div%22)%3B%0Asettings.className%20%3D%20%22so%22%3B%0Asettings.hidden%20%3D%20true%3B%0Atray.appendChild(settings)%3B%0Agear.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20settings.hidden%20%3D%20!settings.hidden%3B%0A%20%20gear.setAttribute(%22aria-expanded%22%2C%20settings.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%7D)%3B%0Avar%20skipBox%20%3D%20document.createElement(%22label%22)%3B%0AskipBox.className%20%3D%20%22k%20s%22%3B%0Avar%20skip%20%3D%20document.createElement(%22input%22)%3B%0Askip.type%20%3D%20%22checkbox%22%3B%0Askip.checked%20%3D%20true%3B%0AskipBox.appendChild(skip)%3B%0AskipBox.appendChild(document.createTextNode(%22Leave%20this%20panel%20out%20of%20Tab%22))%3B%0Asettings.appendChild(skipBox)%3B%0Avar%20tightBox%20%3D%20document.createElement(%22label%22)%3B%0AtightBox.className%20%3D%20%22k%20s%22%3B%0Avar%20tight%20%3D%20document.createElement(%22input%22)%3B%0Atight.type%20%3D%20%22checkbox%22%3B%0Atight.checked%20%3D%20true%3B%0AtightBox.appendChild(tight)%3B%0AtightBox.appendChild(document.createTextNode(%22Compact%20view%22))%3B%0Asettings.appendChild(tightBox)%3B%0Atight.addEventListener(%22change%22%2C%20function%20()%20%7B%20panel.classList.toggle(%22rm%22%2C%20!tight.checked)%3B%20%7D)%3B%0Avar%20chunkBox%20%3D%20document.createElement(%22label%22)%3B%0AchunkBox.className%20%3D%20%22k%20s%22%3B%0Avar%20chunk%20%3D%20document.createElement(%22input%22)%3B%0Achunk.type%20%3D%20%22checkbox%22%3B%0Achunk.checked%20%3D%20true%3B%0AchunkBox.appendChild(chunk)%3B%0AchunkBox.appendChild(document.createTextNode(%22Show%20%22%20%2B%20PAGE%20%2B%20%22%20stops%20at%20a%20time%22))%3B%0Agroup.appendChild(chunkBox)%3B%0Avar%20shortBox%20%3D%20document.createElement(%22label%22)%3B%0AshortBox.className%20%3D%20%22k%20s%22%3B%0Avar%20stub%20%3D%20document.createElement(%22input%22)%3B%0Astub.type%20%3D%20%22checkbox%22%3B%0Astub.checked%20%3D%20true%3B%0AshortBox.appendChild(stub)%3B%0AshortBox.appendChild(document.createTextNode(%22Long%20lines%22))%3B%0Asettings.insertBefore(shortBox%2C%20skipBox)%3B%0Avar%20lineBox%20%3D%20document.createElement(%22label%22)%3B%0AlineBox.className%20%3D%20%22k%20s%22%3B%0Avar%20lines%20%3D%20document.createElement(%22input%22)%3B%0Alines.type%20%3D%20%22checkbox%22%3B%0Alines.checked%20%3D%20true%3B%0AlineBox.appendChild(lines)%3B%0AlineBox.appendChild(document.createTextNode(%22Show%20lines%22))%3B%0Asettings.insertBefore(lineBox%2C%20shortBox)%3B%0Alines.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20stub.disabled%20%3D%20!lines.checked%3B%0A%20%20shortBox.classList.toggle(%22off%22%2C%20!lines.checked)%3B%0A%20%20queue()%3B%0A%7D)%3B%0Astub.addEventListener(%22change%22%2C%20function%20()%20%7B%20queue()%3B%20%7D)%3B%0Avar%20spotBox%20%3D%20document.createElement(%22label%22)%3B%0AspotBox.className%20%3D%20%22k%20s%22%3B%0Avar%20light%20%3D%20document.createElement(%22input%22)%3B%0Alight.type%20%3D%20%22checkbox%22%3B%0AspotBox.appendChild(light)%3B%0AspotBox.appendChild(document.createTextNode(%22Spotlight%22))%3B%0Asettings.insertBefore(spotBox%2C%20settings.firstChild)%3B%0Alight.addEventListener(%22change%22%2C%20function%20()%20%7B%20queue()%3B%20%7D)%3B%0Avar%20mapLabel%20%3D%20document.createElement(%22label%22)%3B%0AmapLabel.className%20%3D%20%22k%20s%22%3B%0Avar%20mapOn%20%3D%20document.createElement(%22input%22)%3B%0AmapOn.type%20%3D%20%22checkbox%22%3B%0AmapLabel.appendChild(mapOn)%3B%0AmapLabel.appendChild(document.createTextNode(%22Region%20map%22))%3B%0Asettings.insertBefore(mapLabel%2C%20spotBox.nextSibling)%3B%0Avar%20costLabel%20%3D%20document.createElement(%22label%22)%3B%0AcostLabel.className%20%3D%20%22k%20s%22%3B%0Avar%20costOn%20%3D%20document.createElement(%22input%22)%3B%0AcostOn.type%20%3D%20%22checkbox%22%3B%0AcostLabel.appendChild(costOn)%3B%0AcostLabel.appendChild(document.createTextNode(%22Tab%20cost%22))%3B%0Asettings.insertBefore(costLabel%2C%20mapLabel)%3B%0AcostOn.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20if%20(!costOn.checked)%20endPick()%3B%0A%20%20costDraw()%3B%0A%20%20queue()%3B%0A%7D)%3B%0Avar%20picked%20%3D%20null%2C%20picking%20%3D%20false%2C%20pickAt%20%3D%20null%2C%20costGoals%20%3D%20%5B%5D%2C%20PICKS%20%3D%20%5B%22pointermove%22%2C%20%22pointerdown%22%2C%20%22mousedown%22%2C%20%22pointerup%22%2C%20%22mouseup%22%2C%20%22click%22%2C%20%22auxclick%22%2C%20%22dblclick%22%2C%20%22contextmenu%22%5D%2C%20GOALW%20%3D%20%2F(%5E%7C%5B%5Ea-z%5Cu010d%5Cu0161%5Cu017e%5D)(add%20to%20cart%7Cbuy%7Ccheckout%7Cbook%7Creserve%7Csubscribe%7Csign%20up%7Cregister%7Cdownload%7Ccontact%7Cget%20started%7Cdonate%7Cv%20ko%5Cu0161arico%7Ckupi%7Cnaro%5Cu010di%7Crezerviraj%7Cprijava%7Cnaro%5Cu010di%20se%7Cprenesi%7Ckontakt)(%3F!%5Ba-z%5Cu010d%5Cu0161%5Cu017e%5D)%2Fi%3B%0Afunction%20mainStop()%20%7B%0A%20%20var%20m%20%3D%20mainRegion()%3B%0A%20%20return%20m%20%3F%20stops.filter(function%20(x)%20%7B%20return%20within(m%2C%20x)%3B%20%7D)%5B0%5D%20%7C%7C%20null%20%3A%20null%3B%0A%7D%0Afunction%20goals()%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20m%20%3D%20mainRegion()%2C%20found%20%3D%200%3B%0A%20%20function%20add(e%2C%20name%2C%20how)%20%7B%0A%20%20%20%20if%20(e%20%26%26%20!out.some(function%20(g)%20%7B%20return%20g.el%20%3D%3D%3D%20e%20%7C%7C%20(name%20%26%26%20g.name.toLowerCase()%20%3D%3D%3D%20name.toLowerCase())%3B%20%7D))%20out.push(%7B%20name%3A%20name%2C%20presses%3A%20stops.indexOf(e)%20%2B%201%2C%20how%3A%20how%2C%20el%3A%20e%20%7D)%3B%0A%20%20%7D%0A%20%20%5B%5D.forEach.call(document.querySelectorAll(%22%5Bdata-tab-trail-goal%5D%22)%2C%20function%20(x)%20%7B%0A%20%20%20%20found%20%3D%201%3B%0A%20%20%20%20add(stops.indexOf(x)%20%3E%3D%200%20%3F%20x%20%3A%20stops.filter(function%20(y)%20%7B%20return%20within(x%2C%20y)%3B%20%7D)%5B0%5D%2C%20x.getAttribute(%22data-tab-trail-goal%22)%2C%20%22set%20in%20the%20page%22)%3B%0A%20%20%7D)%3B%0A%20%20add(mainStop()%2C%20%22the%20main%20content%22%2C%20%22always%22)%3B%0A%20%20stops.forEach(function%20(e)%20%7B%0A%20%20%20%20if%20(!GOALW.test(accName(e)))%20return%3B%0A%20%20%20%20found%20%3D%201%3B%0A%20%20%20%20add(e%2C%20label(e)%2C%20%22found%20by%20its%20words%22)%3B%0A%20%20%7D)%3B%0A%20%20stops.forEach(function%20(e)%20%7B%0A%20%20%20%20if%20(!e.form%20%7C%7C%20!e.form.querySelector(%22input%5Btype%3Demail%5D%22)%20%7C%7C%20!e.matches(%22button%3Anot(%5Btype%5D)%2C%5Btype%3Dsubmit%5D%22))%20return%3B%0A%20%20%20%20found%20%3D%201%3B%0A%20%20%20%20add(e%2C%20label(e)%2C%20%22form%20with%20an%20e-mail%20field%22)%3B%0A%20%20%7D)%3B%0A%20%20if%20(!found%20%26%26%20m)%20add(stops.filter(function%20(x)%20%7B%20return%20x.tagName%20%3D%3D%3D%20%22BUTTON%22%20%26%26%20within(m%2C%20x)%3B%20%7D).sort(function%20(a%2C%20b)%20%7B%20var%20p%20%3D%20a.getBoundingClientRect()%2C%20q%20%3D%20b.getBoundingClientRect()%3B%20return%20q.width%20*%20q.height%20-%20p.width%20*%20p.height%3B%20%7D)%5B0%5D%2C%20%22%22%2C%20%22guessed%22)%3B%0A%20%20out.forEach(function%20(g)%20%7B%20if%20(!g.name)%20g.name%20%3D%20label(g.el)%3B%20%7D)%3B%0A%20%20var%20mg%20%3D%20out.filter(function%20(g)%20%7B%20return%20g.how%20%3D%3D%3D%20%22always%22%3B%20%7D)%5B0%5D%2C%20rest%20%3D%20out.filter(function%20(g)%20%7B%20return%20g%20!%3D%3D%20mg%3B%20%7D)%3B%0A%20%20out%20%3D%20out.filter(function%20(g)%20%7B%20return%20g%20%3D%3D%3D%20mg%20%7C%7C%20rest.indexOf(g)%20%3C%20(mg%20%3F%202%20%3A%203)%3B%20%7D)%3B%0A%20%20if%20(picked%20%26%26%20stops.indexOf(picked)%20%3E%3D%200)%20%7B%0A%20%20%20%20out%20%3D%20out.filter(function%20(g)%20%7B%20return%20g.el%20!%3D%3D%20picked%3B%20%7D)%3B%0A%20%20%20%20out.unshift(%7B%20name%3A%20label(picked)%2C%20presses%3A%20stops.indexOf(picked)%20%2B%201%2C%20how%3A%20%22picked%20by%20you%22%2C%20el%3A%20picked%20%7D)%3B%0A%20%20%7D%0A%20%20return%20out%3B%0A%7D%0Afunction%20para(parent%2C%20cls%2C%20text)%20%7B%0A%20%20var%20p%20%3D%20document.createElement(%22p%22)%3B%0A%20%20p.className%20%3D%20cls%3B%0A%20%20p.textContent%20%3D%20text%20%7C%7C%20%22%22%3B%0A%20%20parent.appendChild(p)%3B%0A%20%20return%20p%3B%0A%7D%0Afunction%20costDraw()%20%7B%0A%20%20if%20(!costOn)%20return%3B%0A%20%20while%20(costBox.firstChild)%20costBox.removeChild(costBox.firstChild)%3B%0A%20%20costGoals%20%3D%20costOn.checked%20%3F%20goals()%20%3A%20%5B%5D%3B%0A%20%20if%20(!costOn.checked)%20return%3B%0A%20%20para(costBox%2C%20%22%22%2C%20%22%22).appendChild(document.createElement(%22b%22)).textContent%20%3D%20%22Tab%20presses%20to%20reach%22%3B%0A%20%20costGoals.forEach(function%20(g)%20%7B%0A%20%20%20%20var%20p%20%3D%20para(costBox%2C%20%22n%22%2C%20%22%22)%3B%0A%20%20%20%20p.appendChild(document.createElement(%22b%22)).textContent%20%3D%20String(g.presses)%3B%0A%20%20%20%20p.appendChild(document.createTextNode(%22%20%22%20%2B%20g.name%20%2B%20%22%20%22))%3B%0A%20%20%20%20p.appendChild(document.createElement(%22span%22)).textContent%20%3D%20%22%5Cu00b7%20%22%20%2B%20g.how%3B%0A%20%20%20%20p.lastChild.className%20%3D%20%22cg%22%3B%0A%20%20%20%20if%20(g.el%20%3D%3D%3D%20picked)%20lbtn(%22lq%22%2C%20%22%20Remove%22%2C%20p).addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20%20%20picked%20%3D%20null%3B%0A%20%20%20%20%20%20costDraw()%3B%0A%20%20%20%20%20%20queue()%3B%0A%20%20%20%20%20%20costBox.querySelector(%22p%3Alast-child%20button%22).focus()%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D)%3B%0A%20%20var%20ms%20%3D%20mainStop()%3B%0A%20%20if%20(ms%20%26%26%20!skipLink()%20%26%26%20stops.indexOf(ms)%20%3E%3D%2010)%20para(costBox%2C%20%22cg%22%2C%20%22A%20skip%20link%20would%20make%20the%20main%20content%201.%22)%3B%0A%20%20var%20pl2%20%3D%20para(costBox%2C%20picking%20%3F%20%22pk%22%20%3A%20%22%22%2C%20picking%20%3F%20%22Click%20the%20goal%20on%20the%20page.%20Escape%20cancels.%20%22%20%3A%20%22%22)%3B%0A%20%20lbtn(%22lq%22%2C%20picking%20%3F%20%22Cancel%22%20%3A%20%22Pick%20a%20goal%22%2C%20pl2).addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20if%20(picking)%20endPick()%3B%0A%20%20%20%20else%20%7B%0A%20%20%20%20%20%20picking%20%3D%20true%3B%0A%20%20%20%20%20%20PICKS.forEach(function%20(t)%20%7B%20addEventListener(t%2C%20pickEv%2C%20true)%3B%20%7D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20costDraw()%3B%0A%20%20%20%20costBox.querySelector(%22p%3Alast-child%20button%22).focus()%3B%0A%20%20%7D)%3B%0A%20%20skipPanel()%3B%0A%7D%0Afunction%20endPick()%20%7B%0A%20%20picking%20%3D%20false%3B%0A%20%20pickAt%20%3D%20null%3B%0A%20%20PICKS.forEach(function%20(t)%20%7B%20removeEventListener(t%2C%20pickEv%2C%20true)%3B%20%7D)%3B%0A%20%20costDraw()%3B%0A%20%20queue()%3B%0A%7D%0Afunction%20pickEv(e)%20%7B%0A%20%20var%20t%20%3D%20e.composedPath%20%3F%20e.composedPath()%5B0%5D%20%3A%20e.target%2C%20s%20%3D%20null%3B%0A%20%20if%20(!picking%20%7C%7C%20within(host%2C%20t))%20return%3B%0A%20%20e.preventDefault()%3B%0A%20%20e.stopPropagation()%3B%0A%20%20for%20(var%20n%20%3D%20t%3B%20n%20%26%26%20!s%3B%20n%20%3D%20upOf(n))%20if%20(stops.indexOf(n)%20%3E%3D%200)%20s%20%3D%20n%3B%0A%20%20if%20(e.type%20%3D%3D%3D%20%22pointermove%22)%20%7B%0A%20%20%20%20if%20(s%20!%3D%3D%20pickAt)%20%7B%0A%20%20%20%20%20%20pickAt%20%3D%20s%3B%0A%20%20%20%20%20%20queue()%3B%0A%20%20%20%20%7D%0A%20%20%7D%20else%20if%20(e.type%20%3D%3D%3D%20%22click%22%20%26%26%20s)%20%7B%0A%20%20%20%20picked%20%3D%20s%3B%0A%20%20%20%20endPick()%3B%0A%20%20%7D%0A%7D%0AmapOn.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20tint%20%3D%20null%3B%0A%20%20mapDraw()%3B%0A%20%20queue()%3B%0A%7D)%3B%0Avar%20REG%20%3D%20%5B%22header%22%2C%20%22nav%22%2C%20%22main%22%2C%20%22aside%22%2C%20%22footer%22%2C%20%22other%22%5D%2C%20REGC%20%3D%20%5B%22%23c2410c%22%2C%20%22%239a3412%22%2C%20%22%231f7a3f%22%2C%20%22%235f564c%22%2C%20%22%231e3a8a%22%2C%20%22%237d756b%22%5D%2C%20LAND%20%3D%20%7B%20HEADER%3A%20%22header%22%2C%20BANNER%3A%20%22header%22%2C%20NAV%3A%20%22nav%22%2C%20NAVIGATION%3A%20%22nav%22%2C%20MAIN%3A%20%22main%22%2C%20ASIDE%3A%20%22aside%22%2C%20COMPLEMENTARY%3A%20%22aside%22%2C%20FOOTER%3A%20%22footer%22%2C%20CONTENTINFO%3A%20%22footer%22%20%7D%2C%20tint%20%3D%20null%3B%0Afunction%20regionOf(e)%20%7B%0A%20%20for%20(var%20n%20%3D%20upOf(e)%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20upOf(n))%20%7B%0A%20%20%20%20var%20ro%20%3D%20n.getAttribute(%22role%22)%2C%20r%20%3D%20ro%20%3F%20LAND%5Bro.split(%22%20%22)%5B0%5D.toUpperCase()%5D%20%3A%20LAND%5Bn.tagName%5D%3B%0A%20%20%20%20if%20(r%20%26%26%20!ro%20%26%26%20%2F%5E(HEADER%7CFOOTER)%24%2F.test(n.tagName)%20%26%26%20n.parentElement%20%26%26%20n.parentElement.closest(%22article%2Caside%2Cmain%2Cnav%2Csection%2C%5Brole%3Darticle%5D%2C%5Brole%3Dcomplementary%5D%2C%5Brole%3Dmain%5D%2C%5Brole%3Dnavigation%5D%2C%5Brole%3Dregion%5D%22))%20r%20%3D%20null%3B%0A%20%20%20%20if%20(r)%20return%20%5Br%2C%20n%5D%3B%0A%20%20%7D%0A%20%20return%20%5B%22other%22%2C%20e%5D%3B%0A%7D%0Afunction%20regions()%20%7B%0A%20%20var%20out%20%3D%20%7B%20header%3A%200%2C%20nav%3A%200%2C%20main%3A%200%2C%20aside%3A%200%2C%20footer%3A%200%2C%20other%3A%200%20%7D%2C%20els%20%3D%20%7B%7D%3B%0A%20%20stops.forEach(function%20(x)%20%7B%0A%20%20%20%20var%20r%20%3D%20regionOf(x)%3B%0A%20%20%20%20out%5Br%5B0%5D%5D%2B%2B%3B%0A%20%20%20%20(els%5Br%5B0%5D%5D%20%3D%20els%5Br%5B0%5D%5D%20%7C%7C%20%5B%5D).indexOf(r%5B1%5D)%20%3C%200%20%26%26%20els%5Br%5B0%5D%5D.push(r%5B1%5D)%3B%0A%20%20%7D)%3B%0A%20%20return%20%5Bout%2C%20els%5D%3B%0A%7D%0Afunction%20mapDraw()%20%7B%0A%20%20if%20(!mapOn)%20return%3B%0A%20%20while%20(mapBox.firstChild)%20mapBox.removeChild(mapBox.firstChild)%3B%0A%20%20if%20(!mapOn.checked)%20return%3B%0A%20%20var%20r%20%3D%20regions()%2C%20bar%20%3D%20document.createElement(%22div%22)%2C%20bl%20%3D%20document.createElement(%22div%22)%3B%0A%20%20count(stops.length%2C%20%22%20stops%2C%20by%20region%22%2C%20false%2C%20false%2C%20mapBox)%3B%0A%20%20bar.className%20%3D%20%22bar%22%3B%0A%20%20bl.className%20%3D%20%22bl%22%3B%0A%20%20REG.forEach(function%20(k%2C%20i)%20%7B%0A%20%20%20%20var%20n%20%3D%20r%5B0%5D%5Bk%5D%2C%20name%20%3D%20k.charAt(0).toUpperCase()%20%2B%20k.slice(1)%3B%0A%20%20%20%20if%20(!n)%20return%3B%0A%20%20%20%20var%20b%20%3D%20document.createElement(%22button%22)%2C%20sp%20%3D%20document.createElement(%22span%22)%2C%20em%20%3D%20document.createElement(%22em%22)%3B%0A%20%20%20%20b.type%20%3D%20%22button%22%3B%0A%20%20%20%20b.style.cssText%20%3D%20%22flex%3A%22%20%2B%20n%20%2B%20%22%3Bbackground%3A%22%20%2B%20REGC%5Bi%5D%3B%0A%20%20%20%20b.setAttribute(%22aria-label%22%2C%20name%20%2B%20%22%20%22%20%2B%20n)%3B%0A%20%20%20%20b.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20%20%20tint%20%3D%20%5Br%5B1%5D%5Bk%5D%2C%20REGC%5Bi%5D%5D%3B%0A%20%20%20%20%20%20r%5B1%5D%5Bk%5D%5B0%5D.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%0A%20%20%20%20%20%20queue()%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20bar.appendChild(b)%3B%0A%20%20%20%20em.style.background%20%3D%20REGC%5Bi%5D%3B%0A%20%20%20%20sp.appendChild(em)%3B%0A%20%20%20%20sp.appendChild(document.createTextNode(name%20%2B%20%22%20%22%20%2B%20n))%3B%0A%20%20%20%20bl.appendChild(sp)%3B%0A%20%20%7D)%3B%0A%20%20mapBox.appendChild(bar)%3B%0A%20%20mapBox.appendChild(bl)%3B%0A%20%20skipPanel()%3B%0A%7D%0Achunk.addEventListener(%22change%22%2C%20function%20()%20%7B%20queue()%3B%20%7D)%3B%0Afunction%20paged()%20%7B%20return%20chunk.checked%20%26%26%20stops.length%20%3E%20PAGE%3B%20%7D%0Afunction%20outT()%20%7B%20return%20skip.checked%20%26%26%20!panelIn%20%3F%20-1%20%3A%200%3B%20%7D%0Afunction%20skipPanel()%20%7B%0A%20%20panel.tabIndex%20%3D%20outT()%3B%0A%20%20panel.querySelectorAll(%22button%2Ca%2Cinput%22).forEach(function%20(e)%20%7B%20e.tabIndex%20%3D%20e.className%20%3D%3D%3D%20%22lc%22%20%3F%20(panelIn%20%3F%200%20%3A%20-1)%20%3A%20outT()%3B%20%7D)%3B%0A%7D%0Askip.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20skipPanel()%3B%0A%20%20svg.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20svgPg.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20dot.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20dotPg.classList.toggle(%22in%22%2C%20!skip.checked)%3B%0A%20%20rescan()%3B%0A%7D)%3B%0Avar%20a%20%3D%20document.createElement(%22a%22)%3B%0Aa.className%20%3D%20%22a%22%3B%0Aa.href%20%3D%20%22https%3A%2F%2Fmatjazkorosec.com%2Ftools%2Ftab-trail%22%3B%0Aa.target%20%3D%20%22_blank%22%3B%0Aa.rel%20%3D%20%22noopener%22%3B%0Aa.textContent%20%3D%20%22matjazkorosec.com%2Ftools%2Ftab-trail%22%3B%0Avar%20how%20%3D%20document.createElement(%22p%22)%3B%0Ahow.className%20%3D%20%22hw%22%3B%0Avar%20MAC%20%3D%20%2FMac%2F.test(navigator.platform%20%7C%7C%20navigator.userAgent)%3B%0Avar%20KEYS%20%3D%20%22Ctrl%2BShift%2BF%22%3B%0Avar%20ver%20%3D%20document.createElement(%22span%22)%3B%0Aver.className%20%3D%20%22vr%22%3B%0Aver.textContent%20%3D%20%22v%22%20%2B%20VERSION%3B%0Ahow.appendChild(ver)%3B%0Ahow.appendChild(document.createTextNode(%22How%20to%20use%20%26%20latest%20version%3A%20%22))%3B%0Ahow.appendChild(a)%3B%0Avar%20keysBtn%20%3D%20document.createElement(%22button%22)%3B%0AkeysBtn.className%20%3D%20%22sg%22%3B%0AkeysBtn.type%20%3D%20%22button%22%3B%0AkeysBtn.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Aicon(keysBtn%2C%2016%2C%20%22M1.5%204.5h13v7h-13zM4%207h1M7.5%207h1M11%207h1M5%209.5h6%22%2C%201.6)%3B%0AkeysBtn.appendChild(document.createTextNode(%22Shortcuts%22))%3B%0AkeysBtn.appendChild(document.createElement(%22i%22))%3B%0Atray.insertBefore(keysBtn%2C%20gear)%3B%0Avar%20keysBox%20%3D%20document.createElement(%22div%22)%3B%0AkeysBox.className%20%3D%20%22so%22%3B%0AkeysBox.hidden%20%3D%20true%3B%0Atray.insertBefore(keysBox%2C%20gear)%3B%0A%5B%5BKEYS%20%2B%20%22%3A%22%2C%20%22%20into%20this%20panel%22%5D%2C%20%5B%22Escape%3A%22%2C%20%22%20back%20to%20the%20page%22%5D%2C%20%5B%22Tab%2C%20Shift%2BTab%3A%22%2C%20%22%20along%20the%20trail%22%5D%2C%20%5B%22Space%20or%20Escape%3A%22%2C%20%22%20pause%20Play%22%5D%5D.forEach(function%20(k)%20%7B%0A%20%20keysBox.appendChild(line(%22k%22%2C%20k%5B0%5D%2C%20k%5B1%5D))%3B%0A%7D)%3B%0AkeysBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20keysBox.hidden%20%3D%20!keysBox.hidden%3B%0A%20%20keysBtn.setAttribute(%22aria-expanded%22%2C%20keysBox.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%7D)%3B%0Avar%20legendBtn%20%3D%20document.createElement(%22button%22)%3B%0AlegendBtn.className%20%3D%20%22sg%22%3B%0AlegendBtn.type%20%3D%20%22button%22%3B%0AlegendBtn.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Aicon(legendBtn%2C%2016%2C%20%22M3%204h1M6.5%204H13M3%208h1M6.5%208H13M3%2012h1M6.5%2012H13%22%2C%201.6)%3B%0AlegendBtn.appendChild(document.createTextNode(%22Legend%22))%3B%0AlegendBtn.appendChild(document.createElement(%22i%22))%3B%0Atray.insertBefore(legendBtn%2C%20keysBtn)%3B%0Atray.insertBefore(legend%2C%20keysBtn)%3B%0AlegendBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20legend.hidden%20%3D%20!legend.hidden%3B%0A%20%20legendBtn.setAttribute(%22aria-expanded%22%2C%20legend.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%7D)%3B%0Atray.appendChild(how)%3B%0Avar%20logs%20%3D%20%5B%5D%2C%20logFilter%20%3D%20%22all%22%2C%20logOpen%20%3D%20false%2C%20LOG_MAX%20%3D%20500%2C%20showWcag%20%3D%20false%2C%20wcagBoxes%20%3D%20%5B%5D%3B%0Afunction%20wcagBox(parent%2C%20doc)%20%7B%0A%20%20var%20lb%20%3D%20doc.createElement(%22label%22)%3B%0A%20%20lb.className%20%3D%20%22lw%22%3B%0A%20%20var%20cb%20%3D%20doc.createElement(%22input%22)%3B%0A%20%20cb.type%20%3D%20%22checkbox%22%3B%0A%20%20cb.checked%20%3D%20showWcag%3B%0A%20%20cb.addEventListener(%22change%22%2C%20function%20()%20%7B%0A%20%20%20%20showWcag%20%3D%20cb.checked%3B%0A%20%20%20%20wcagSync()%3B%0A%20%20%7D)%3B%0A%20%20lb.appendChild(cb)%3B%0A%20%20lb.appendChild(doc.createTextNode(%22Show%20WCAG%22))%3B%0A%20%20parent.appendChild(lb)%3B%0A%20%20wcagBoxes.push(cb)%3B%0A%20%20return%20cb%3B%0A%7D%0Afunction%20wcagSync()%20%7B%0A%20%20wcagBoxes.forEach(function%20(b)%20%7B%20b.checked%20%3D%20showWcag%3B%20%7D)%3B%0A%20%20logGroup.classList.toggle(%22nw%22%2C%20!showWcag)%3B%0A%20%20if%20(tabOpen())%20logTab.document.body.classList.toggle(%22nw%22%2C%20!showWcag)%3B%0A%7D%0Avar%20lastStops%20%3D%20-1%2C%20lastMissed%20%3D%20-1%2C%20lastForced%20%3D%20-1%2C%20probMiss%20%3D%20new%20Map()%2C%20probHov%20%3D%20new%20Map()%2C%20probForce%20%3D%20new%20Map()%2C%20seenForce%20%3D%20new%20WeakSet()%2C%20seenOk%20%3D%20new%20WeakSet()%2C%20seenCss%20%3D%20new%20Set()%3B%0Avar%20RES%20%3D%20%7B%20OK%3A%20%22ok%22%2C%20PROBLEM%3A%20%22bad%22%2C%20SKIPPED%3A%20%22skip%22%2C%20INFO%3A%20%22info%22%20%7D%3B%0Avar%20FILT%20%3D%20%5B%5B%22all%22%2C%20%22All%22%5D%2C%20%5B%22bad%22%2C%20%22Problems%22%5D%2C%20%5B%22ok%22%2C%20%22OK%22%5D%2C%20%5B%22skip%22%2C%20%22Skipped%22%5D%5D%3B%0Avar%20tabChecked%20%3D%20null%2C%20filterSets%20%3D%20%5B%5D%2C%20logTab%20%3D%20null%2C%20tabList%20%3D%20null%2C%20tabSum%20%3D%20null%2C%20tabSet%20%3D%20null%2C%20tabNote%20%3D%20null%2C%20tabPoll%20%3D%200%3B%0Afunction%20pl(n%2C%20one%2C%20many)%20%7B%20return%20n%20%2B%20%22%20%22%20%2B%20(n%20%3D%3D%3D%201%20%3F%20one%20%3A%20many)%3B%20%7D%0Afunction%20desc(e)%20%7B%0A%20%20var%20t%20%3D%20e.tagName.toLowerCase()%3B%0A%20%20if%20(e.id)%20return%20t%20%2B%20%22%23%22%20%2B%20scrub(e.id)%3B%0A%20%20var%20c%20%3D%20typeof%20e.className%20%3D%3D%3D%20%22string%22%20%3F%20e.className.trim().split(%2F%5Cs%2B%2F).filter(Boolean).slice(0%2C%202)%20%3A%20%5B%5D%3B%0A%20%20return%20c.length%20%3F%20t%20%2B%20%22.%22%20%2B%20scrub(c.join(%22.%22))%20%3A%20t%3B%0A%7D%0Afunction%20ref(e)%20%7B%20return%20%7B%20el%3A%20e%2C%20n%3A%20stops.indexOf(e)%20%2B%201%2C%20l%3A%20label(e)%2C%20d%3A%20desc(e)%20%7D%3B%20%7D%0Afunction%20popName(p)%20%7B%0A%20%20var%20n%20%3D%20p.getAttribute(%22aria-label%22)%20%7C%7C%20%22%22%2C%20by%20%3D%20p.getAttribute(%22aria-labelledby%22)%3B%0A%20%20if%20(!n%20%26%26%20by)%20%7B%0A%20%20%20%20var%20t%20%3D%20document.getElementById(by.split(%2F%5Cs%2B%2F)%5B0%5D)%3B%0A%20%20%20%20if%20(t)%20n%20%3D%20t.textContent%20%7C%7C%20%22%22%3B%0A%20%20%7D%0A%20%20if%20(!n)%20%7B%0A%20%20%20%20var%20h%20%3D%20p.querySelector(%22h1%2Ch2%2Ch3%2Ch4%2Clegend%22)%3B%0A%20%20%20%20if%20(h)%20n%20%3D%20h.textContent%20%7C%7C%20%22%22%3B%0A%20%20%7D%0A%20%20n%20%3D%20scrub(n).trim().replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22)%3B%0A%20%20if%20(n.length%20%3E%2028)%20n%20%3D%20n.slice(0%2C%2027)%20%2B%20%22...%22%3B%0A%20%20return%20%7B%20el%3A%20p%2C%20n%3A%200%2C%20l%3A%20n%20%7C%7C%20label(p)%2C%20d%3A%20desc(p)%20%7D%3B%0A%7D%0Afunction%20partText(x)%20%7B%20return%20typeof%20x%20%3D%3D%3D%20%22string%22%20%3F%20x%20%3A%20x.n%20%3F%20x.n%20%2B%20%22%20%5C%22%22%20%2B%20x.l%20%2B%20%22%5C%22%22%20%3A%20%22%5C%22%22%20%2B%20x.l%20%2B%20%22%5C%22%20%22%20%2B%20x.d%3B%20%7D%0Afunction%20looksWhy(m)%20%7B%0A%20%20var%20why%20%3D%20%5B%5D%2C%20role%20%3D%20m.getAttribute(%22role%22)%20%7C%7C%20%22%22%3B%0A%20%20if%20(m.tagName%20%3D%3D%3D%20%22A%22%20%26%26%20!m.hasAttribute(%22href%22))%20why.push(%22a%20link%20with%20no%20address%22)%3B%0A%20%20if%20(m.hasAttribute(%22onclick%22))%20why.push(%22a%20click%20handler%20in%20the%20HTML%22)%3B%0A%20%20if%20(ROLES.test(role))%20why.push(%22role%3D%5C%22%22%20%2B%20role%20%2B%20%22%5C%22%22)%3B%0A%20%20if%20(getComputedStyle(m).cursor%20%3D%3D%3D%20%22pointer%22)%20why.push(%22a%20pointer%20cursor%22)%3B%0A%20%20return%20why.length%20%3F%20%22has%20%22%20%2B%20why.join(%22%2C%20%22)%20%3A%20%22looks%20clickable%22%3B%0A%7D%0Afunction%20addr()%20%7B%20return%20location.protocol%20%2B%20%22%2F%2F%22%20%2B%20location.host%20%2B%20cleanUrl(location.pathname)%3B%20%7D%0Afunction%20two(n)%20%7B%20return%20(n%20%3C%2010%20%3F%20%220%22%20%3A%20%22%22)%20%2B%20n%3B%20%7D%0Afunction%20clock(t)%20%7B%20return%20two(t.getHours())%20%2B%20%22%3A%22%20%2B%20two(t.getMinutes())%20%2B%20%22%3A%22%20%2B%20two(t.getSeconds())%3B%20%7D%0Afunction%20browser()%20%7B%0A%20%20var%20u%20%3D%20navigator.userAgent%2C%20m%3B%0A%20%20if%20((m%20%3D%20u.match(%2FEdg%5C%2F(%5Cd%2B)%2F)))%20return%20%22Edge%20%22%20%2B%20m%5B1%5D%3B%0A%20%20if%20((m%20%3D%20u.match(%2FFirefox%5C%2F(%5Cd%2B)%2F)))%20return%20%22Firefox%20%22%20%2B%20m%5B1%5D%3B%0A%20%20if%20((m%20%3D%20u.match(%2FChrome%5C%2F(%5Cd%2B)%2F)))%20return%20%22Chrome%20%22%20%2B%20m%5B1%5D%3B%0A%20%20if%20((m%20%3D%20u.match(%2FVersion%5C%2F(%5Cd%2B)%5B%5E%20%5D*%20(Mobile%5C%2F%5CS%2B%20)%3FSafari%2F)))%20return%20%22Safari%20%22%20%2B%20m%5B1%5D%3B%0A%20%20return%20u%3B%0A%7D%0Avar%20CHECKS%20%3D%20%5B%22Missed%20spots%22%2C%20%22Hover%20menus%22%2C%20%22Forced%20order%22%2C%20%22Out%20of%20order%22%2C%20%22Keyboard%20trap%22%2C%20%22Hidden%20focus%22%2C%20%22Lost%20focus%22%2C%20%22No%20focus%20style%22%2C%20%22Ghost%20stop%22%2C%20%22Broken%20skip%20link%22%2C%20%22No%20way%20out%22%2C%20%22Nameless%20stop%22%5D%3B%0Avar%20WCAG%20%3D%20%7B%20%22Missed%20spots%22%3A%20%222.1.1%20A%22%2C%20%22Hover%20menus%22%3A%20%222.1.1%20A%22%2C%20%22Out%20of%20order%22%3A%20%222.4.3%20A%22%2C%20%22Forced%20order%22%3A%20%222.4.3%20A%22%2C%20%22Keyboard%20trap%22%3A%20%222.1.2%20A%22%2C%20%22Lost%20focus%22%3A%20%222.4.3%20A%22%2C%20%22Hidden%20focus%22%3A%20%222.4.11%20AA%22%2C%20%22No%20focus%20style%22%3A%20%222.4.7%20AA%22%2C%20%22Ghost%20stop%22%3A%20%222.4.7%20AA%22%2C%20%22Broken%20skip%20link%22%3A%20%222.4.1%20A%22%2C%20%22No%20way%20out%22%3A%20%222.1.2%20A%22%2C%20%22Nameless%20stop%22%3A%20%224.1.2%20A%22%20%7D%3B%0Afunction%20showUrl(f)%20%7B%20return%20%22https%3A%2F%2Fmatjazkorosec.com%2Ftools%2Ftab-trail%23show-%22%20%2B%20f.toLowerCase().replace(%2F%5B%5Ea-z0-9%5D%2B%2Fg%2C%20%22-%22).replace(%2F%5E-%7C-%24%2Fg%2C%20%22%22)%3B%20%7D%0Afunction%20ranChecks()%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20if%20(e.k%20!%3D%3D%20%22INFO%22%20%26%26%20CHECKS.indexOf(e.f)%20%3E%3D%200%20%26%26%20out.indexOf(e.f)%20%3C%200)%20out.push(e.f)%3B%20%7D)%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20checkedKey%20%3D%20%7B%7D%3B%0Afunction%20checkedLine(p%2C%20doc)%20%7B%0A%20%20var%20ran%20%3D%20ranChecks()%2C%20bad%20%3D%20%7B%7D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20if%20(e.k%20%3D%3D%3D%20%22PROBLEM%22%20%26%26%20!e.fixed)%20bad%5Be.f%5D%20%3D%201%3B%20%7D)%3B%0A%20%20var%20k%20%3D%20ran.map(function%20(f)%20%7B%20return%20f%20%2B%20(bad%5Bf%5D%20%3F%20%22!%22%20%3A%20%22%22)%3B%20%7D).join(%22%7C%22)%3B%0A%20%20p.hidden%20%3D%20!ran.length%3B%0A%20%20if%20(checkedKey%5Bp.className%20%2B%20(doc%20%3D%3D%3D%20document%20%3F%20%221%22%20%3A%20%222%22)%5D%20%3D%3D%3D%20k%20%26%26%20p.firstChild)%20return%3B%0A%20%20checkedKey%5Bp.className%20%2B%20(doc%20%3D%3D%3D%20document%20%3F%20%221%22%20%3A%20%222%22)%5D%20%3D%20k%3B%0A%20%20while%20(p.firstChild)%20p.removeChild(p.firstChild)%3B%0A%20%20p.appendChild(doc.createTextNode(%22Checked%3A%20%22))%3B%0A%20%20ran.forEach(function%20(f%2C%20i)%20%7B%0A%20%20%20%20if%20(i)%20p.appendChild(doc.createTextNode(%22%2C%20%22))%3B%0A%20%20%20%20var%20a%20%3D%20doc.createElement(%22a%22)%3B%0A%20%20%20%20a.className%20%3D%20bad%5Bf%5D%20%3F%20%22lq%20bad%22%20%3A%20%22lq%22%3B%0A%20%20%20%20a.href%20%3D%20showUrl(f)%3B%0A%20%20%20%20a.target%20%3D%20%22_blank%22%3B%0A%20%20%20%20a.rel%20%3D%20%22noopener%22%3B%0A%20%20%20%20a.textContent%20%3D%20f%3B%0A%20%20%20%20a.title%20%3D%20%22What%20%22%20%2B%20f%20%2B%20%22%20checks%22%3B%0A%20%20%20%20if%20(doc%20%3D%3D%3D%20document)%20a.tabIndex%20%3D%20outT()%3B%0A%20%20%20%20p.appendChild(a)%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20res(e)%20%7B%20return%20e.fixed%20%3F%20%22fixed%22%20%3A%20RES%5Be.k%5D%3B%20%7D%0Afunction%20shows(e)%20%7B%20return%20logFilter%20%3D%3D%3D%20%22all%22%20%7C%7C%20res(e)%20%3D%3D%3D%20logFilter%3B%20%7D%0Afunction%20logCounts()%20%7B%0A%20%20var%20c%20%3D%20%7B%20all%3A%20logs.length%2C%20bad%3A%200%2C%20ok%3A%200%2C%20skip%3A%200%2C%20info%3A%200%2C%20fixed%3A%200%20%7D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20c%5Bres(e)%5D%2B%2B%3B%20%7D)%3B%0A%20%20return%20c%3B%0A%7D%0Afunction%20tabOpen()%20%7B%20return%20!!(logTab%20%26%26%20!logTab.closed)%3B%20%7D%0Afunction%20logView()%20%7B%20return%20tabOpen()%20%3F%20tabList%20%3A%20logOpen%20%3F%20logList%20%3A%20null%3B%20%7D%0Afunction%20scroller(v)%20%7B%20return%20v%20%3D%3D%3D%20logList%20%3F%20panel%20%3A%20v.ownerDocument.scrollingElement%20%7C%7C%20v.ownerDocument.documentElement%3B%20%7D%0Afunction%20toTop(v)%20%7B%0A%20%20if%20(v%20!%3D%3D%20logList)%20return%20void%20(scroller(v).scrollTop%20%3D%200)%3B%0A%20%20var%20d%20%3D%20v.getBoundingClientRect().top%20-%20panel.getBoundingClientRect().top%3B%0A%20%20if%20(d%20%3C%200)%20panel.scrollTop%20%2B%3D%20d%20-%2012%3B%0A%7D%0Afunction%20wcagOf(e)%20%7B%20return%20e.w%20%7C%7C%20WCAG%5Be.f%5D%3B%20%7D%0Afunction%20log(k%2C%20f%2C%20parts%2C%20ai%2C%20w)%20%7B%0A%20%20var%20e%20%3D%20%7B%20t%3A%20new%20Date()%2C%20k%3A%20k%2C%20f%3A%20f%2C%20p%3A%20parts%2C%20li%3A%20null%2C%20ai%3A%20ai%20%7C%7C%20null%2C%20w%3A%20w%20%7C%7C%20null%20%7D%3B%0A%20%20logs.push(e)%3B%0A%20%20if%20(k%20%3D%3D%3D%20%22PROBLEM%22%20%26%26%20e.ai)%20probLog.push(e)%3B%0A%20%20if%20((k%20%3D%3D%3D%20%22OK%22%20%7C%7C%20k%20%3D%3D%3D%20%22PROBLEM%22)%20%26%26%20(f%20%3D%3D%3D%20%22Out%20of%20order%22%20%7C%7C%20f%20%3D%3D%3D%20%22Keyboard%20trap%22)%20%26%26%20pressed)%20judgedDir%5Bpressed%20%3E%200%20%3F%201%20%3A%20-1%5D%20%3D%201%3B%0A%20%20if%20(logs.length%20%3E%20LOG_MAX)%20%7B%0A%20%20%20%20var%20old%20%3D%20logs.shift()%3B%0A%20%20%20%20if%20(old.li%20%26%26%20old.li.parentNode)%20old.li.parentNode.removeChild(old.li)%3B%0A%20%20%7D%0A%20%20if%20(!logList)%20return%3B%0A%20%20logSummary()%3B%0A%20%20var%20v%20%3D%20logView()%3B%0A%20%20if%20(!v%20%7C%7C%20!shows(e))%20return%3B%0A%20%20var%20sc%20%3D%20scroller(v)%2C%20top%20%3D%20v%20%3D%3D%3D%20logList%20%3F%20v.getBoundingClientRect().top%20%3E%3D%20sc.getBoundingClientRect().top%20%3A%20sc.scrollTop%20%3C%208%3B%0A%20%20e.li%20%3D%20logLi(e%2C%20v.ownerDocument)%3B%0A%20%20v.insertBefore(e.li%2C%20v.firstChild)%3B%0A%20%20if%20(top)%20%7B%20if%20(v%20!%3D%3D%20logList)%20sc.scrollTop%20%3D%200%3B%20%7D%0A%20%20else%20sc.scrollTop%20%2B%3D%20e.li.getBoundingClientRect().height%3B%0A%7D%0Afunction%20review()%20%7B%0A%20%20if%20(lastStops%20%3C%200)%20log(%22INFO%22%2C%20%22Scan%22%2C%20%5B%22Found%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%20Read%20%22%20%2B%20pl(cssRules%2C%20%22CSS%20rule%22%2C%20%22CSS%20rules%22)%20%2B%20%22%20from%20%22%20%2B%20pl(cssSheets%2C%20%22style%20sheet%22%2C%20%22style%20sheets%22)%20%2B%20%22.%22%5D)%3B%0A%20%20else%20if%20(stops.length%20!%3D%3D%20lastStops)%20log(%22INFO%22%2C%20%22Scan%22%2C%20%5B%22Page%20changed%3A%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%20now%2C%20%22%20%2B%20lastStops%20%2B%20%22%20before.%22%5D)%3B%0A%20%20lastStops%20%3D%20stops.length%3B%0A%20%20skipCheck()%3B%0A%20%20nameCheck()%3B%0A%20%20cssBlocked.forEach(function%20(h)%20%7B%0A%20%20%20%20if%20(seenCss.has(h))%20return%3B%0A%20%20%20%20seenCss.add(h)%3B%0A%20%20%20%20log(%22SKIPPED%22%2C%20%22Hover%20menus%22%2C%20%5B%22Can't%20read%20%22%20%2B%20cleanUrl(h)%20%2B%20%22%2C%20it%20comes%20from%20another%20site.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20var%20mSet%20%3D%20new%20Set(missed)%2C%20hSet%20%3D%20new%20Set(hovers)%2C%20fSet%20%3D%20new%20Set(forcedBad)%2C%20fresh%20%3D%20%7B%7D%2C%20nNew%20%3D%200%3B%0A%20%20function%20add(f)%20%7B%0A%20%20%20%20fresh%5Bf%5D%20%3D%201%3B%0A%20%20%20%20nNew%2B%2B%3B%0A%20%20%7D%0A%20%20probMiss.forEach(function%20(e%2C%20m)%20%7B%0A%20%20%20%20if%20(mSet.has(m))%20return%3B%0A%20%20%20%20e.fixed%20%3D%20true%3B%0A%20%20%20%20probMiss.delete(m)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Missed%20spots%22%2C%20%5Bref(m)%2C%20stopSet.has(m)%20%3F%20%22%20is%20a%20Tab%20stop%20now.%22%20%3A%20m.isConnected%20%3F%20%22%20is%20no%20longer%20flagged.%22%20%3A%20%22%20is%20gone%20from%20the%20page.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20probHov.forEach(function%20(e%2C%20h)%20%7B%0A%20%20%20%20if%20(hSet.has(h))%20return%3B%0A%20%20%20%20e.fixed%20%3D%20true%3B%0A%20%20%20%20probHov.delete(h)%3B%0A%20%20%20%20if%20(tabOpens.has(h))%20seenOk.add(h)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Hover%20menus%22%2C%20%5Bref(h)%2C%20!h.isConnected%20%3F%20%22%20is%20gone%20from%20the%20page.%22%20%3A%20tabOpens.has(h)%20%3F%20%22%20opens%20when%20Tab%20reaches%20it.%22%20%3A%20%22%20no%20longer%20opens%20only%20on%20mouse%20hover.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20missed.forEach(function%20(m)%20%7B%0A%20%20%20%20if%20(probMiss.has(m))%20return%3B%0A%20%20%20%20var%20item%20%3D%20m.closest(GROUP)%20%26%26%20ITEM.test(m.getAttribute(%22role%22)%20%7C%7C%20%22%22)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Missed%20spots%22%2C%20%5Bref(m)%2C%20%22%20%22%20%2B%20looksWhy(m)%20%2B%20%22%2C%20but%20Tab%20never%20reaches%20it.%22%5D%2C%20aiOf(W_KEY%2C%20%22Every%20element%20that%20reacts%20to%20a%20click%20can%20be%20reached%20with%20the%20Tab%20key%20and%20used%20with%20Enter%20or%20Space.%22%2C%20item%20%3F%20%22It%20is%20a%20role%3D%5C%22%22%20%2B%20m.getAttribute(%22role%22)%20%2B%20%22%5C%22%20item%20in%20a%20group%20the%20arrow%20keys%20move%20through%2C%20and%20no%20item%20in%20the%20group%20is%20a%20Tab%20stop.%20Give%201%20item%20tabindex%3D%5C%220%5C%22%20(the%20selected%20one)%20and%20move%20between%20the%20items%20with%20the%20arrow%20keys.%22%20%3A%20m.tagName%20%3D%3D%3D%20%22A%22%20%26%26%20!m.hasAttribute(%22href%22)%20%3F%20%22Give%20the%20link%20an%20href%2C%20or%20make%20it%20a%20%3Cbutton%20type%3D%5C%22button%5C%22%3E%20if%20it%20runs%20script.%22%20%3A%20%22Use%20%3Cbutton%20type%3D%5C%22button%5C%22%3E%20for%20an%20action%20or%20%3Ca%20href%3E%20for%20a%20link%20instead%20of%20the%20%22%20%2B%20m.tagName.toLowerCase()%20%2B%20%22.%20If%20the%20tag%20can't%20change%2C%20add%20tabindex%3D%5C%220%5C%22%20and%20role%3D%5C%22button%5C%22%2C%20and%20handle%20Enter%20and%20Space%20in%20a%20keydown%20listener.%22%20%2B%20(looksWhy(m)%20%3D%3D%3D%20%22has%20a%20pointer%20cursor%22%20%3F%20%22%20Only%20the%20pointer%20cursor%20makes%20it%20look%20clickable%3A%20if%20it%20is%20not%20meant%20to%20be%20clickable%2C%20remove%20cursor%3A%20pointer%20from%20it%20instead.%22%20%3A%20%22%22)%2C%20%5B%5B%22Element%22%2C%20m%5D%5D%2C%20null%2C%20true))%3B%0A%20%20%20%20probMiss.set(m%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20add(%22Missed%20spots%22)%3B%0A%20%20%7D)%3B%0A%20%20if%20(!missed.length%20%26%26%20lastMissed%20!%3D%3D%200)%20log(%22OK%22%2C%20%22Missed%20spots%22%2C%20%5BlastMissed%20%3E%200%20%3F%20%22No%20clickable%20things%20Tab%20skips%20now.%22%20%3A%20%22No%20clickable%20things%20Tab%20skips.%22%5D)%3B%0A%20%20lastMissed%20%3D%20missed.length%3B%0A%20%20hoverOk.forEach(function%20(o)%20%7B%0A%20%20%20%20if%20(seenOk.has(o%5B0%5D))%20return%3B%0A%20%20%20%20seenOk.add(o%5B0%5D)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Hover%20menus%22%2C%20%5Bref(o%5B0%5D)%2C%20o%5B1%5D%20%3D%3D%3D%20%22focus%22%20%3F%20%22%20opens%20on%20mouse%20hover%20and%20on%20keyboard%20focus.%22%20%3A%20o%5B1%5D%20%3D%3D%3D%20%22tab%22%20%3F%20%22%20opens%20when%20Tab%20reaches%20it.%22%20%3A%20%22%20opens%20on%20mouse%20hover%20and%20has%20a%20toggle%20button%20(aria-expanded)%2C%20so%20the%20keyboard%20can%20open%20it.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20hovers.forEach(function%20(h)%20%7B%0A%20%20%20%20if%20(probHov.has(h))%20return%3B%0A%20%20%20%20var%20hr%20%3D%20hovRule.get(h)%20%7C%7C%20%5B%22%3Ahover%22%2C%20%22%22%5D%3B%0A%20%20%20%20hr%20%3D%20%5Bscrub(hr%5B0%5D)%2C%20hr%5B1%5D%5D%3B%0A%20%20%20%20var%20tw%20%3D%20(hr%5B0%5D.match(%2F%5C.(%3F%3A%5B%5Cw-%5D%7C%5C%5C.)%2B%2Fg)%20%7C%7C%20%5B%5D).map(function%20(c)%20%7B%20return%20c.slice(1).replace(%2F%5C%5C(.)%2Fg%2C%20%22%241%22)%3B%20%7D).filter(function%20(c)%20%7B%20return%20%2F(%5E%7C%3A)(group-%7Cpeer-)%3Fhover%3A%2F.test(c)%3B%20%7D)%5B0%5D%3B%0A%20%20%20%20var%20twFix%20%3D%20tw%20%3F%20%22This%20rule%20comes%20from%20the%20Tailwind%20class%20%22%20%2B%20tw%20%2B%20%22.%20Add%20%22%20%2B%20tw.replace(%2F(%5E%7C%3A)group-hover%3A%2F%2C%20%22%241group-focus-within%3A%22).replace(%2F(%5E%7C%3A)peer-hover%3A%2F%2C%20%22%241peer-focus%3A%22).replace(%2F(%5E%7C%3A)hover%3A%2F%2C%20%22%241focus-within%3A%22)%20%2B%20%22%20next%20to%20it%20in%20the%20same%20class%20list%2C%20so%20it%20also%20opens%20on%20keyboard%20focus.%20Or%20open%20the%20menu%20with%20a%20%3Cbutton%20aria-expanded%3E%20that%20toggles%20it.%22%20%3A%20%22%22%3B%0A%20%20%20%20var%20seen%20%3D%20hovSeen.has(h)%3B%0A%20%20%20%20var%20dead%20%3D%20!seen%20%26%26%20!h.matches(FOCUSABLE)%20%26%26%20!%5B%5D.some.call(h.querySelectorAll(FOCUSABLE)%2C%20function%20(x)%20%7B%20return%20tabbable(x)%3B%20%7D)%3B%0A%20%20%20%20var%20skipped%20%3D%20%5B%5D.some.call(h.querySelectorAll(FOCUSABLE)%2C%20function%20(x)%20%7B%20return%20x.tabIndex%20%3C%200%3B%20%7D)%3B%0A%20%20%20%20var%20deadFix%20%3D%20dead%20%3F%20%22%20Nothing%20inside%20it%20can%20take%20keyboard%20focus%20now%2C%20so%20a%20focus%20rule%20alone%20will%20never%20open%20it%3A%20make%20the%20part%20you%20hover%20a%20%3Cbutton%20type%3D%5C%22button%5C%22%20aria-expanded%3D%5C%22false%5C%22%3E%20that%20toggles%20the%20menu.%22%20%2B%20(skipped%20%3F%20%22%20The%20links%20or%20buttons%20inside%20have%20tabindex%3D%5C%22-1%5C%22%2C%20so%20Tab%20skips%20them%20even%20when%20the%20menu%20is%20open%3A%20remove%20it.%22%20%3A%20%22%22)%20%3A%20%22%22%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Hover%20menus%22%2C%20%5Bref(h)%2C%20%22%20opens%20only%20on%20mouse%20hover%20(%22%20%2B%20hr%5B0%5D%20%2B%20%22).%22%20%2B%20(seen%20%3F%20%22%20Tab%20reaches%20its%20links%2C%20but%20they%20stay%20invisible%20while%20they%20have%20focus.%22%20%3A%20%22%20No%20focus%20rule%2C%20no%20toggle%20button.%22)%5D%2C%20aiOf(seen%20%3F%20W_VIS%20%3A%20W_KEY%2C%20seen%20%3F%20%22The%20menu%20also%20opens%20while%20a%20link%20or%20button%20inside%20it%20has%20keyboard%20focus%2C%20so%20keyboard%20users%20can%20see%20where%20they%20are.%22%20%3A%20%22The%20menu%20also%20opens%20when%20a%20link%20or%20button%20inside%20it%20gets%20keyboard%20focus%2C%20so%20keyboard%20users%20can%20reach%20its%20links.%22%2C%20(twFix%20%7C%7C%20%22Next%20to%20the%20rule%20%22%20%2B%20hr%5B0%5D%20%2B%20%22%20add%20%22%20%2B%20hr%5B0%5D.replace(%2F%3Ahover%2Fg%2C%20%22%3Afocus-within%22)%20%2B%20%22%20with%20the%20same%20declarations%2C%20or%20open%20the%20menu%20with%20a%20%3Cbutton%20aria-expanded%3E%20that%20toggles%20it.%22)%20%2B%20deadFix%2C%20%5B%5B%22Element%22%2C%20h%2C%20null%2C%20true%5D%5D%2C%20%5B%22CSS%20rule%3A%20%22%20%2B%20hr%5B0%5D%2C%20%22Style%20sheet%3A%20%22%20%2B%20(hr%5B1%5D%20%3F%20cleanUrl(hr%5B1%5D)%20%3A%20%22unknown%22)%5D%2C%20true)%2C%20seen%20%3F%20%222.4.7%20AA%22%20%3A%20null)%3B%0A%20%20%20%20probHov.set(h%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20add(%22Hover%20menus%22)%3B%0A%20%20%7D)%3B%0A%20%20probForce.forEach(function%20(e%2C%20f)%20%7B%0A%20%20%20%20if%20(fSet.has(f))%20return%3B%0A%20%20%20%20e.fixed%20%3D%20true%3B%0A%20%20%20%20probForce.delete(f)%3B%0A%20%20%20%20log(%22OK%22%2C%20%22Forced%20order%22%2C%20%5Bref(f)%2C%20!f.isConnected%20%3F%20%22%20is%20gone%20from%20the%20page.%22%20%3A%20forced.indexOf(f)%20%3E%3D%200%20%3F%20%22%20is%20in%20page%20order%20now.%22%20%3A%20f.tabIndex%20%3E%200%20%3F%20%22%20is%20no%20longer%20a%20Tab%20stop.%22%20%3A%20%22%20has%20no%20tabindex%20above%200%20now.%22%5D)%3B%0A%20%20%7D)%3B%0A%20%20forced.forEach(function%20(f)%20%7B%0A%20%20%20%20if%20(probForce.has(f)%20%7C%7C%20(!fSet.has(f)%20%26%26%20seenForce.has(f)))%20return%3B%0A%20%20%20%20var%20ti%20%3D%20f.getAttribute(%22tabindex%22)%2C%20at%20%3D%20stops.indexOf(f)%20%2B%201%2C%20page%20%3D%20domAt.get(f)%20%2B%201%3B%0A%20%20%20%20if%20(!fSet.has(f))%20%7B%0A%20%20%20%20%20%20seenForce.add(f)%3B%0A%20%20%20%20%20%20return%20log(%22INFO%22%2C%20%22Forced%20order%22%2C%20%5Bref(f)%2C%20%22%20has%20tabindex%3D%5C%22%22%20%2B%20ti%20%2B%20%22%5C%22%2C%20but%20it%20is%20already%20in%20page%20order%2C%20so%20Tab%20order%20stays%20the%20same.%20tabindex%20above%200%20pulls%20it%20ahead%20of%20the%20page.%20It%20fails%20WCAG%202.4.3%20when%20that%20order%20makes%20no%20sense%20(F44).%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20seenForce.delete(f)%3B%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Forced%20order%22%2C%20%5Bref(f)%2C%20%22%20has%20tabindex%3D%5C%22%22%20%2B%20ti%20%2B%20%22%5C%22%2C%20which%20pulls%20it%20ahead%20of%20the%20page%3A%20Tab%20visits%20it%20as%20stop%20%22%20%2B%20at%20%2B%20%22%2C%20its%20place%20in%20the%20page%20is%20stop%20%22%20%2B%20page%20%2B%20%22.%20It%20fails%20WCAG%202.4.3%20when%20that%20order%20makes%20no%20sense%20(F44).%22%5D%2C%20aiOf(W_FORCE%2C%20%22Tab%20follows%20the%20order%20of%20the%20page.%20No%20element%20has%20tabindex%20above%200%2C%20so%20none%20is%20pulled%20ahead%20of%20the%20rest.%22%2C%20%22Remove%20the%20tabindex%2C%20or%20set%20it%20to%200%2C%20and%20move%20the%20element%20in%20the%20HTML%20where%20it%20should%20come%20in%20Tab%20order.%22%2C%20%5B%5B%22Element%22%2C%20f%5D%5D%2C%20%5B%22Measured%3A%20tabindex%3D%5C%22%22%20%2B%20ti%20%2B%20%22%5C%22%2C%20Tab%20visits%20it%20as%20stop%20%22%20%2B%20at%20%2B%20%22%2C%20its%20place%20in%20the%20page%20is%20stop%20%22%20%2B%20page%20%2B%20%22.%20%22%20%2B%20pl(forced.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%20on%20the%20page%20%22%20%2B%20(forced.length%20%3D%3D%3D%201%20%3F%20%22has%22%20%3A%20%22have%22)%20%2B%20%22%20tabindex%20above%200.%22%5D%2C%20true))%3B%0A%20%20%20%20probForce.set(f%2C%20logs%5Blogs.length%20-%201%5D)%3B%0A%20%20%20%20add(%22Forced%20order%22)%3B%0A%20%20%7D)%3B%0A%20%20if%20(!forcedBad.length%20%26%26%20lastForced%20!%3D%3D%200)%20log(%22OK%22%2C%20%22Forced%20order%22%2C%20%5Bforced.length%20%3F%20%22No%20stop%20with%20tabindex%20above%200%20is%20out%20of%20page%20order%22%20%2B%20(lastForced%20%3E%200%20%3F%20%22%20now.%22%20%3A%20%22.%22)%20%3A%20lastForced%20%3E%200%20%3F%20%22No%20stops%20with%20tabindex%20above%200%20now.%22%20%3A%20%22No%20stops%20with%20tabindex%20above%200.%22%5D)%3B%0A%20%20lastForced%20%3D%20forcedBad.length%3B%0A%20%20if%20(nNew)%20announce(pl(nNew%2C%20%22new%20problem%22%2C%20%22new%20problems%22)%20%2B%20%22%3A%20%22%20%2B%20Object.keys(fresh).join(%22%2C%20%22)%20%2B%20%22.%22)%3B%0A%7D%0Afunction%20goTo(e)%20%7B%0A%20%20if%20(!e.isConnected)%20return%3B%0A%20%20e.scrollIntoView(%7B%20block%3A%20%22center%22%2C%20behavior%3A%20%22smooth%22%20%7D)%3B%0A%20%20if%20(stops.indexOf(e)%20%3C%200)%20return%20queue()%3B%0A%20%20endPress()%3B%0A%20%20e.focus(%7B%20preventScroll%3A%20true%2C%20focusVisible%3A%20true%20%7D)%3B%0A%20%20focus()%3B%0A%7D%0Afunction%20logLi(e%2C%20doc)%20%7B%0A%20%20var%20li%20%3D%20doc.createElement(%22li%22)%3B%0A%20%20li.className%20%3D%20%22lx%20%22%20%2B%20RES%5Be.k%5D%3B%0A%20%20function%20sp(cls%2C%20text)%20%7B%0A%20%20%20%20var%20x%20%3D%20doc.createElement(%22span%22)%3B%0A%20%20%20%20x.className%20%3D%20cls%3B%0A%20%20%20%20x.textContent%20%3D%20text%3B%0A%20%20%20%20li.appendChild(x)%3B%0A%20%20%20%20return%20x%3B%0A%20%20%7D%0A%20%20sp(%22tm%22%2C%20clock(e.t))%3B%0A%20%20sp(%22st%22%2C%20e.k)%3B%0A%20%20var%20bd%20%3D%20sp(%22bd%22%2C%20%22%22)%3B%0A%20%20var%20ft%20%3D%20doc.createElement(CHECKS.indexOf(e.f)%20%3E%3D%200%20%3F%20%22a%22%20%3A%20%22b%22)%3B%0A%20%20ft.className%20%3D%20%22ft%22%3B%0A%20%20ft.textContent%20%3D%20e.f%3B%0A%20%20if%20(ft.tagName%20%3D%3D%3D%20%22A%22)%20%7B%0A%20%20%20%20ft.className%20%3D%20%22ft%20lq%22%3B%0A%20%20%20%20ft.href%20%3D%20showUrl(e.f)%3B%0A%20%20%20%20ft.target%20%3D%20%22_blank%22%3B%0A%20%20%20%20ft.rel%20%3D%20%22noopener%22%3B%0A%20%20%20%20ft.title%20%3D%20%22What%20%22%20%2B%20e.f%20%2B%20%22%20checks%22%3B%0A%20%20%20%20if%20(doc%20%3D%3D%3D%20document)%20ft.tabIndex%20%3D%20outT()%3B%0A%20%20%7D%0A%20%20bd.appendChild(ft)%3B%0A%20%20bd.appendChild(doc.createTextNode(%22%20%22))%3B%0A%20%20if%20(wcagOf(e))%20%7B%0A%20%20%20%20var%20wc%20%3D%20doc.createElement(%22span%22)%3B%0A%20%20%20%20wc.className%20%3D%20%22wc%22%3B%0A%20%20%20%20wc.textContent%20%3D%20%22WCAG%20%22%20%2B%20wcagOf(e)%3B%0A%20%20%20%20bd.appendChild(wc)%3B%0A%20%20%20%20bd.appendChild(doc.createTextNode(%22%20%22))%3B%0A%20%20%7D%0A%20%20e.p.forEach(function%20(x)%20%7B%0A%20%20%20%20if%20(typeof%20x%20%3D%3D%3D%20%22string%22)%20return%20bd.appendChild(doc.createTextNode(x))%3B%0A%20%20%20%20if%20(!x.n)%20return%20bd.appendChild(doc.createTextNode(partText(x)))%3B%0A%20%20%20%20var%20c%20%3D%20doc.createElement(%22button%22)%3B%0A%20%20%20%20c.type%20%3D%20%22button%22%3B%0A%20%20%20%20c.className%20%3D%20%22lc%22%3B%0A%20%20%20%20c.textContent%20%3D%20String(x.n)%3B%0A%20%20%20%20c.setAttribute(%22aria-label%22%2C%20%22Go%20to%20stop%20%22%20%2B%20x.n)%3B%0A%20%20%20%20if%20(doc%20%3D%3D%3D%20document)%20c.tabIndex%20%3D%20panelIn%20%3F%200%20%3A%20-1%3B%0A%20%20%20%20c.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20%20%20if%20(doc%20!%3D%3D%20document%20%26%26%20tabOpen()%20%26%26%20window.name)%20logTab.open(%22%22%2C%20window.name)%3B%0A%20%20%20%20%20%20goTo(x.el)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20bd.appendChild(c)%3B%0A%20%20%20%20bd.appendChild(doc.createTextNode(%22%20%5C%22%22%20%2B%20x.l%20%2B%20%22%5C%22%22))%3B%0A%20%20%7D)%3B%0A%20%20return%20li%3B%0A%7D%0Afunction%20logText()%20%7B%0A%20%20var%20c%20%3D%20logCounts()%3B%0A%20%20var%20out%20%3D%20%5B%22Tab%20trail%20%22%20%2B%20VERSION%20%2B%20%22%20log%22%2C%20addr()%2C%20stamp()%2C%20browser()%20%2B%20%22%2C%20window%20%22%20%2B%20innerWidth%20%2B%20%22%20x%20%22%20%2B%20innerHeight%2C%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22%2C%20%22%20%2B%20pl(c.bad%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22%2C%20%22%20%2B%20c.ok%20%2B%20%22%20OK%2C%20%22%20%2B%20c.skip%20%2B%20%22%20skipped%22%2C%20%22%22%5D%3B%0A%20%20logs.slice().reverse().forEach(function%20(e)%20%7B%0A%20%20%20%20out.push(clock(e.t)%20%2B%20%22%20%22%20%2B%20(e.k%20%2B%20%22%20%20%20%20%20%20%20%20%22).slice(0%2C%208)%20%2B%20%22%20%22%20%2B%20e.f%20%2B%20(showWcag%20%26%26%20wcagOf(e)%20%3F%20%22%20(WCAG%20%22%20%2B%20wcagOf(e)%20%2B%20%22)%22%20%3A%20%22%22))%3B%0A%20%20%20%20out.push(%22%20%20%22%20%2B%20e.p.map(partText).join(%22%22))%3B%0A%20%20%7D)%3B%0A%20%20return%20out.join(%22%5Cn%22)%3B%0A%7D%0Avar%20W_FORCE%20%3D%20%222.4.3%20Focus%20Order%20(Level%20A).%20tabindex%20above%200%20pulls%20it%20ahead%20of%20the%20page.%20It%20fails%20WCAG%202.4.3%20when%20that%20order%20makes%20no%20sense%20(F44).%22%2C%20W_TRAP%20%3D%20%222.1.2%20No%20Keyboard%20Trap%20(Level%20A)%22%2C%20W_KEY%20%3D%20%222.1.1%20Keyboard%20(Level%20A)%22%2C%20W_VIS%20%3D%20%222.4.7%20Focus%20Visible%20(Level%20AA)%22%2C%20W_ORDER%20%3D%20%222.4.3%20Focus%20Order%20(Level%20A)%22%2C%20W_HIDE%20%3D%20%222.4.11%20Focus%20Not%20Obscured%20(Minimum)%20(Level%20AA)%22%2C%20W_NAME%20%3D%20%224.1.2%20Name%2C%20Role%2C%20Value%20(Level%20A)%22%2C%20W_BYPASS%20%3D%20%222.4.1%20Bypass%20Blocks%20(Level%20A)%22%3B%0Afunction%20cssId(t)%20%7B%20return%20%2F%5E%5BA-Za-z%5D%5B%5Cw-%5D*%24%2F.test(t)%3B%20%7D%0Afunction%20sel(e)%20%7B%0A%20%20if%20(!e%20%7C%7C%20e.nodeType%20!%3D%3D%201)%20return%20%22%22%3B%0A%20%20var%20rt%20%3D%20e.getRootNode()%2C%20live%20%3D%20e.isConnected%2C%20path%20%3D%20%5B%5D%3B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement)%20%7B%0A%20%20%20%20var%20t%20%3D%20n.tagName.toLowerCase()%3B%0A%20%20%20%20if%20(n.id%20%26%26%20cssId(n.id)%20%26%26%20!secretish(n.id)%20%26%26%20live%20%26%26%20rt.querySelectorAll(%22%23%22%20%2B%20n.id).length%20%3D%3D%3D%201)%20%7B%0A%20%20%20%20%20%20path.unshift(%22%23%22%20%2B%20n.id)%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(t%20%3D%3D%3D%20%22html%22%20%7C%7C%20t%20%3D%3D%3D%20%22body%22)%20%7B%0A%20%20%20%20%20%20path.unshift(t)%3B%0A%20%20%20%20%20%20break%3B%0A%20%20%20%20%7D%0A%20%20%20%20var%20c%20%3D%20typeof%20n.className%20%3D%3D%3D%20%22string%22%20%3F%20n.className.trim().split(%2F%5Cs%2B%2F).filter(function%20(x)%20%7B%20return%20cssId(x)%20%26%26%20!secretish(x)%3B%20%7D).slice(0%2C%202)%20%3A%20%5B%5D%3B%0A%20%20%20%20var%20part%20%3D%20t%20%2B%20(c.length%20%3F%20%22.%22%20%2B%20c.join(%22.%22)%20%3A%20%22%22)%2C%20par%20%3D%20n.parentElement%3B%0A%20%20%20%20if%20(par)%20%7B%0A%20%20%20%20%20%20var%20same%20%3D%20Array.prototype.filter.call(par.children%2C%20function%20(x)%20%7B%20return%20x.tagName%20%3D%3D%3D%20n.tagName%3B%20%7D)%3B%0A%20%20%20%20%20%20if%20(same.length%20%3E%201)%20part%20%2B%3D%20%22%3Anth-of-type(%22%20%2B%20(same.indexOf(n)%20%2B%201)%20%2B%20%22)%22%3B%0A%20%20%20%20%7D%0A%20%20%20%20path.unshift(part)%3B%0A%20%20%20%20if%20(live)%20%7B%0A%20%20%20%20%20%20try%20%7B%20if%20(rt.querySelectorAll(path.join(%22%20%3E%20%22)).length%20%3D%3D%3D%201)%20break%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20out%20%3D%20path.join(%22%20%3E%20%22)%3B%0A%20%20if%20(rt%20%26%26%20rt.host)%20out%20%3D%20sel(rt.host)%20%2B%20%22%20(inside%20its%20shadow%20root)%20%22%20%2B%20out%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20KEEP%20%3D%20%2F%5E(id%7Cclass%7Crole%7Ctype%7Cname%7Chref%7Csrc%7Ctabindex%7Cdisabled%7Chidden%7Ccontenteditable%7Caria-%5B%5Cw-%5D%2B)%24%2F%2C%20VOID%20%3D%20%2F%5E(area%7Cbr%7Ccol%7Cembed%7Chr%7Cimg%7Cinput%7Clink%7Cmeta%7Csource%7Ctrack%7Cwbr)%24%2F%3B%0Afunction%20attrText(n%2C%20v)%20%7B%0A%20%20if%20(n%20%3D%3D%3D%20%22href%22%20%7C%7C%20n%20%3D%3D%3D%20%22src%22)%20return%20cleanUrl(v)%3B%0A%20%20if%20(n%20%3D%3D%3D%20%22id%22%20%7C%7C%20n%20%3D%3D%3D%20%22class%22)%20return%20scrub(v)%3B%0A%20%20if%20(n%20%3D%3D%3D%20%22role%22%20%7C%7C%20n%20%3D%3D%3D%20%22type%22)%20return%20v%3B%0A%20%20v%20%3D%20scrub(v)%3B%0A%20%20return%20v.length%20%3E%2060%20%3F%20v.slice(0%2C%2060)%20%2B%20%22...%22%20%3A%20v%3B%0A%7D%0Afunction%20snip(e%2C%20kids)%20%7B%0A%20%20var%20tag%20%3D%20e.tagName.toLowerCase()%2C%20open%20%3D%20%22%3C%22%20%2B%20tag%3B%0A%20%20%5B%5D.forEach.call(e.attributes%2C%20function%20(a)%20%7B%0A%20%20%20%20if%20(KEEP.test(a.name))%20open%20%2B%3D%20%22%20%22%20%2B%20a.name%20%2B%20%22%3D%5C%22%22%20%2B%20attrText(a.name%2C%20a.value).replace(%2F%22%2Fg%2C%20%22%26quot%3B%22)%20%2B%20%22%5C%22%22%3B%0A%20%20%7D)%3B%0A%20%20open%20%2B%3D%20%22%3E%22%3B%0A%20%20if%20(VOID.test(tag))%20return%20open%3B%0A%20%20if%20(kids%20%26%26%20e.children.length)%20return%20open%20%2B%20%5B%5D.slice.call(e.children%2C%200%2C%208).map(function%20(c)%20%7B%20return%20c.children.length%20%3F%20snip(c).replace(%2F%3E%5B%5E%3C%5D*%3C%5C%2F%5B%5Cw-%5D%2B%3E%24%2F%2C%20%22%3E...%3C%2F%22%20%2B%20c.tagName.toLowerCase()%20%2B%20%22%3E%22)%20%3A%20snip(c)%3B%20%7D).join(%22%22)%20%2B%20(e.children.length%20%3E%208%20%3F%20%22...%22%20%3A%20%22%22)%20%2B%20%22%3C%2F%22%20%2B%20tag%20%2B%20%22%3E%22%3B%0A%20%20var%20text%20%3D%20scrub((e.textContent%20%7C%7C%20%22%22).trim().replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22))%3B%0A%20%20return%20open%20%2B%20(text.length%20%3E%2040%20%3F%20text.slice(0%2C%2040)%20%2B%20%22...%22%20%3A%20text)%20%2B%20%22%3C%2F%22%20%2B%20tag%20%2B%20%22%3E%22%3B%0A%7D%0Avar%20FRAME%20%3D%20%2F%5E(__.*%7CSegmentViewNode%7CLayoutRouter.*%7CInnerLayoutRouter%7COuterLayoutRouter%7CRenderFromTemplateContext%7CScrollAndFocusHandler%7CInnerScrollAndFocusHandler%7C.*Boundary.*%7CHTTPAccessFallback.*%7CRouter%7CAppRouter%7CHotReload%7CReactDevOverlay%7CDevRootHTTPAccessFallbackBoundary%7CServerRoot%7CRoot%7CAppContainer%7CSuspense%7CFragment%7CStrictMode%7CHead%7CHtml%7CBody%7CScript%7CClientPageRoot%7CClientSegmentRoot%7C.*Provider%7C.*Context%7C.*Consumer%7CLink%7CLinkComponent%7CImage%7CForwardRef%7CMemo%7CAnonymous%7C_c%5Cd*)%24%2F%3B%0Afunction%20compOf(e)%20%7B%0A%20%20var%20keys%20%3D%20Object.keys(e)%2C%20k%20%3D%20keys.filter(function%20(x)%20%7B%20return%20x.indexOf(%22__reactFiber%24%22)%20%3D%3D%3D%200%20%7C%7C%20x.indexOf(%22__reactInternalInstance%24%22)%20%3D%3D%3D%200%3B%20%7D)%5B0%5D%3B%0A%20%20if%20(k)%20%7B%0A%20%20%20%20var%20names%20%3D%20%5B%5D%2C%20src%20%3D%20%22%22%2C%20any%20%3D%20false%3B%0A%20%20%20%20for%20(var%20f%20%3D%20e%5Bk%5D%3B%20f%20%26%26%20names.length%20%3C%203%3B%20f%20%3D%20f.return)%20%7B%0A%20%20%20%20%20%20var%20t%20%3D%20f.type%3B%0A%20%20%20%20%20%20if%20(!src%20%26%26%20f._debugSource%20%26%26%20f._debugSource.fileName)%20src%20%3D%20f._debugSource.fileName%20%2B%20%22%3A%22%20%2B%20f._debugSource.lineNumber%3B%0A%20%20%20%20%20%20if%20(!t%20%7C%7C%20typeof%20t%20%3D%3D%3D%20%22string%22%20%7C%7C%20typeof%20t%20%3D%3D%3D%20%22symbol%22)%20continue%3B%0A%20%20%20%20%20%20var%20n%20%3D%20t.displayName%20%7C%7C%20t.name%20%7C%7C%20(t.render%20%26%26%20(t.render.displayName%20%7C%7C%20t.render.name))%20%7C%7C%20(t.type%20%26%26%20(t.type.displayName%20%7C%7C%20t.type.name))%3B%0A%20%20%20%20%20%20if%20(!n)%20continue%3B%0A%20%20%20%20%20%20any%20%3D%20true%3B%0A%20%20%20%20%20%20if%20(FRAME.test(n)%20%7C%7C%20names.indexOf(n)%20%3E%3D%200)%20continue%3B%0A%20%20%20%20%20%20names.push(n)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(!names.length)%20return%20any%20%3F%20%22React%2C%20rendered%20by%20a%20server%20component%20or%20by%20the%20framework%20itself%2C%20so%20its%20component%20name%20is%20not%20in%20the%20browser%3B%20search%20the%20code%20for%20the%20HTML%20or%20its%20classes%22%20%3A%20%22%22%3B%0A%20%20%20%20if%20(names.every(function%20(n)%20%7B%20return%20n.length%20%3C%3D%202%3B%20%7D))%20return%20%22React%20(component%20names%20are%20minified%20in%20this%20production%20build%3B%20a%20development%20build%20shows%20them)%22%3B%0A%20%20%20%20return%20%22React%20%22%20%2B%20names%5B0%5D%20%2B%20(names.length%20%3E%201%20%3F%20%22%2C%20inside%20%22%20%2B%20names.slice(1).join(%22%2C%20inside%20%22)%20%3A%20%22%22)%20%2B%20(src%20%3F%20%22%2C%20source%20%22%20%2B%20src%20%3A%20%22%22)%3B%0A%20%20%7D%0A%20%20if%20(e.__vueParentComponent)%20%7B%0A%20%20%20%20var%20vn%20%3D%20%5B%5D%3B%0A%20%20%20%20for%20(var%20c%20%3D%20e.__vueParentComponent%3B%20c%20%26%26%20vn.length%20%3C%203%3B%20c%20%3D%20c.parent)%20%7B%0A%20%20%20%20%20%20var%20nm%20%3D%20c.type%20%26%26%20(c.type.name%20%7C%7C%20c.type.__name)%3B%0A%20%20%20%20%20%20if%20(nm%20%26%26%20vn.indexOf(nm)%20%3C%200)%20vn.push(nm)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(vn.length)%20return%20%22Vue%20%22%20%2B%20vn%5B0%5D%20%2B%20(vn.length%20%3E%201%20%3F%20%22%2C%20inside%20%22%20%2B%20vn.slice(1).join(%22%2C%20inside%20%22)%20%3A%20%22%22)%3B%0A%20%20%7D%0A%20%20if%20(e.__vue__%20%26%26%20e.__vue__.%24options%20%26%26%20e.__vue__.%24options.name)%20return%20%22Vue%20%22%20%2B%20e.__vue__.%24options.name%3B%0A%20%20try%20%7B%0A%20%20%20%20var%20ng%20%3D%20window.ng%3B%0A%20%20%20%20if%20(ng%20%26%26%20ng.getOwningComponent)%20%7B%0A%20%20%20%20%20%20var%20oc%20%3D%20ng.getOwningComponent(e)%3B%0A%20%20%20%20%20%20if%20(oc%20%26%26%20oc.constructor)%20return%20%22Angular%20%22%20%2B%20oc.constructor.name%3B%0A%20%20%20%20%7D%0A%20%20%7D%20catch%20(x)%20%7B%7D%0A%20%20return%20%22%22%3B%0A%7D%0Afunction%20whereOf(el)%20%7B%0A%20%20if%20(!el%20%7C%7C%20!el.isConnected)%20return%20%22%22%3B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20up%20%3D%20el.parentElement%3B%0A%20%20while%20(up%20%26%26%20up%20!%3D%3D%20document.body%20%26%26%20up%20!%3D%3D%20document.documentElement%20%26%26%20!up.id)%20up%20%3D%20up.parentElement%3B%0A%20%20if%20(up%20%26%26%20up.id%20%26%26%20up%20!%3D%3D%20document.body)%20out.push(%22inside%20%23%22%20%2B%20scrub(up.id))%3B%0A%20%20var%20hs%20%3D%20document.querySelectorAll(%22h1%2Ch2%2Ch3%2Ch4%2Ch5%2Ch6%2C%5Brole%3Dheading%5D%22)%2C%20last%20%3D%20null%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20hs.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20if%20(hs%5Bi%5D%20%3D%3D%3D%20el%20%7C%7C%20(host%20%26%26%20host.contains(hs%5Bi%5D)))%20continue%3B%0A%20%20%20%20if%20(hs%5Bi%5D.contains(el)%20%7C%7C%20hs%5Bi%5D.compareDocumentPosition(el)%20%26%20Node.DOCUMENT_POSITION_FOLLOWING)%20last%20%3D%20hs%5Bi%5D%3B%20else%20break%3B%0A%20%20%7D%0A%20%20var%20t%20%3D%20last%20%3F%20scrub((last.textContent%20%7C%7C%20%22%22).replace(%2F%5Cs%2B%2Fg%2C%20%22%20%22).trim()).slice(0%2C%2060)%20%3A%20%22%22%3B%0A%20%20if%20(t)%20out.push(%22under%20the%20heading%20%5C%22%22%20%2B%20t%20%2B%20%22%5C%22%22)%3B%0A%20%20return%20out.join(%22%2C%20%22)%3B%0A%7D%0Afunction%20aiOf(crit%2C%20expect%2C%20fix%2C%20els%2C%20more%2C%20lazy)%20%7B%0A%20%20function%20fact(x)%20%7B%0A%20%20%20%20var%20o%20%3D%20%7B%20role%3A%20x%5B0%5D%2C%20el%3A%20x%5B1%5D%20%7D%3B%0A%20%20%20%20function%20fill()%20%7B%0A%20%20%20%20%20%20o.sel%20%3D%20x%5B2%5D%20%3F%20x%5B2%5D.sel%20%3A%20sel(x%5B1%5D)%3B%0A%20%20%20%20%20%20o.html%20%3D%20x%5B2%5D%20%3F%20x%5B2%5D.html%20%3A%20snip(x%5B1%5D%2C%20x%5B3%5D)%3B%0A%20%20%20%20%20%20o.comp%20%3D%20compOf(x%5B1%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(!lazy)%20fill()%3B%0A%20%20%20%20else%20%5B%22sel%22%2C%20%22html%22%2C%20%22comp%22%5D.forEach(function%20(k)%20%7B%0A%20%20%20%20%20%20Object.defineProperty(o%2C%20k%2C%20%7B%20configurable%3A%20true%2C%20enumerable%3A%20true%2C%20get%3A%20function%20()%20%7B%20fill()%3B%20return%20o%5Bk%5D%3B%20%7D%2C%20set%3A%20function%20(v)%20%7B%20Object.defineProperty(o%2C%20k%2C%20%7B%20value%3A%20v%2C%20writable%3A%20true%2C%20enumerable%3A%20true%20%7D)%3B%20%7D%20%7D)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20return%20o%3B%0A%20%20%7D%0A%20%20return%20%7B%0A%20%20%20%20crit%3A%20crit%2C%0A%20%20%20%20expect%3A%20expect%2C%0A%20%20%20%20fix%3A%20fix%2C%0A%20%20%20%20more%3A%20more%20%7C%7C%20%5B%5D%2C%0A%20%20%20%20els%3A%20els.filter(function%20(x)%20%7B%20return%20x%5B1%5D%3B%20%7D).map(fact)%0A%20%20%7D%3B%0A%7D%0Afunction%20tally(k)%20%7B%0A%20%20var%20m%20%3D%20%7B%7D%2C%20order%20%3D%20%5B%5D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%0A%20%20%20%20if%20(e.k%20!%3D%3D%20k)%20return%3B%0A%20%20%20%20if%20(!m%5Be.f%5D)%20%7B%0A%20%20%20%20%20%20m%5Be.f%5D%20%3D%200%3B%0A%20%20%20%20%20%20order.push(e.f)%3B%0A%20%20%20%20%7D%0A%20%20%20%20m%5Be.f%5D%2B%2B%3B%0A%20%20%7D)%3B%0A%20%20return%20order.map(function%20(f)%20%7B%20return%20f%20%2B%20%22%20%22%20%2B%20m%5Bf%5D%3B%20%7D).join(%22%2C%20%22)%3B%0A%7D%0Afunction%20stamp()%20%7B%0A%20%20var%20d%20%3D%20new%20Date()%3B%0A%20%20return%20d.getFullYear()%20%2B%20%22-%22%20%2B%20two(d.getMonth()%20%2B%201)%20%2B%20%22-%22%20%2B%20two(d.getDate())%20%2B%20%22%20%22%20%2B%20two(d.getHours())%20%2B%20%22%3A%22%20%2B%20two(d.getMinutes())%3B%0A%7D%0Afunction%20verifyOf(e)%20%7B%0A%20%20var%20a%20%3D%20e.ai%2C%20t%20%3D%20e.p.map(partText).join(%22%22)%3B%0A%20%20function%20el(r)%20%7B%0A%20%20%20%20var%20x%20%3D%20a.els.filter(function%20(y)%20%7B%20return%20y.role%20%3D%3D%3D%20r%3B%20%7D)%5B0%5D%3B%0A%20%20%20%20return%20x%20%3F%20x.sel%20%3A%20%22%22%3B%0A%20%20%7D%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Missed%20spots%22)%20return%20%22Reload%20the%20page%20and%20run%20Tab%20trail%20again%3A%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20gets%20a%20stop%20number%20and%20the%20skipped%20count%20goes%20down%20by%201.%20Press%20Tab%20until%20it%20has%20focus%2C%20then%20Enter%20(and%20Space%20for%20a%20button)%20does%20what%20a%20click%20does.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Forced%20order%22)%20return%20%22Reload%20the%20page%20and%20run%20Tab%20trail%20again%3A%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20no%20tabindex%20above%200%2C%20its%20stop%20number%20matches%20its%20place%20on%20the%20page%2C%20and%20the%20Forced%20order%20count%20goes%20down%20by%201.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Hover%20menus%22)%20return%20%22Press%20Tab%20until%20a%20link%20inside%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20focus%3A%20the%20menu%20opens%20while%20focus%20is%20inside%20it%2C%20and%20Tab%20trail%20no%20longer%20lists%20it%20under%20hover%20menus.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Hidden%20focus%22)%20return%20%22Press%20Tab%20until%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20focus%3A%20part%20of%20it%20shows%20next%20to%20%22%20%2B%20el(%22Covered%20by%22)%20%2B%20%22%2C%20and%20its%20Hidden%20focus%20line%20in%20the%20log%20says%20in%20view%20or%20partly%20covered.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Nameless%20stop%22)%20return%20%22Hover%20the%20dot%20of%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20in%20Tab%20trail%3A%20it%20shows%20a%20name%2C%20not%20%5C%22no%20name%5C%22.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22No%20way%20out%22)%20return%20%22Open%20%22%20%2B%20el(%22Popup%22)%20%2B%20%22%20and%20press%20Tab%20until%20a%20Close%20button%20has%20focus%2C%20then%20Enter%20closes%20the%20popup.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Broken%20skip%20link%22)%20return%20el(%22Element%22)%20%3F%20%22Reload%20the%20page%2C%20press%20Tab%20once%20and%20then%20Enter%20on%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%3A%20the%20next%20Tab%20lands%20inside%20the%20main%20content.%22%20%3A%20%22Reload%20the%20page%20and%20press%20Tab%20once%3A%20the%20first%20stop%20is%20a%20skip%20link%2C%20and%20Enter%20on%20it%20moves%20focus%20to%20the%20main%20content.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Ghost%20stop%22)%20return%20a.crit%20%3D%3D%3D%20W_NAME%20%3F%20%22Reload%20the%20page%20and%20run%20Tab%20trail%20again%3A%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20is%20no%20longer%20inside%20aria-hidden%2C%20or%20Tab%20skips%20it%2C%20and%20the%20Ghost%20stop%20count%20goes%20down%20by%201.%22%20%3A%20%22Press%20Tab%20until%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20focus%3A%20it%20shows%20on%20screen%2C%20and%20its%20Ghost%20stop%20line%20in%20the%20log%20says%20OK.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22No%20focus%20style%22)%20return%20%22Press%20Tab%20until%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20has%20focus%3A%20an%20outline%20or%20another%20visible%20change%20shows%20on%20it%2C%20and%20its%20No%20focus%20style%20line%20in%20the%20log%20says%20OK.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Keyboard%20trap%22)%20return%20%22Put%20focus%20on%20%22%20%2B%20el(%22Element%22)%20%2B%20%22%20and%20press%20Tab%3A%20focus%20moves%20on%20to%20%22%20%2B%20el(%22Expected%20next%22)%20%2B%20%22%2C%20and%20the%20log%20shows%20an%20OK%20Out%20of%20order%20line.%22%3B%0A%20%20if%20(e.f%20%3D%3D%3D%20%22Lost%20focus%22)%20return%20%22Open%20the%20popup%20from%20%22%20%2B%20el(%22Opened%20by%22)%20%2B%20%22%20with%20Enter%2C%20then%20close%20it%20with%20Escape%20or%20its%20close%20button%3A%20focus%20is%20back%20on%20%22%20%2B%20el(%22Opened%20by%22)%20%2B%20%22%2C%20and%20the%20log%20shows%20an%20OK%20Lost%20focus%20line.%22%3B%0A%20%20if%20(el(%22Popup%22))%20return%20%22Reload%20so%20the%20popup%20shows%2C%20then%20press%20Tab%20once%3A%20focus%20lands%20inside%20%22%20%2B%20el(%22Popup%22)%20%2B%20%22.%22%3B%0A%20%20return%20%22Put%20focus%20on%20%22%20%2B%20(el(%22Tab%20left%20from%22)%20%7C%7C%20%22the%20start%20of%20the%20page%22)%20%2B%20%22%20and%20press%20%22%20%2B%20(t.indexOf(%22(Shift%2BTab)%22)%20%3E%3D%200%20%3F%20%22Shift%2BTab%22%20%3A%20%22Tab%22)%20%2B%20%22%20once%3A%20focus%20lands%20on%20%22%20%2B%20el(%22Expected%20next%22)%20%2B%20%22%2C%20and%20the%20log%20shows%20an%20OK%20Out%20of%20order%20line.%22%3B%0A%7D%0Avar%20hidTested%20%3D%20new%20Set()%3B%0Afunction%20coverage()%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20left%20%3D%20stops.filter(function%20(x)%20%7B%20return%20!hidTested.has(x)%3B%20%7D).map(function%20(x)%20%7B%20return%20stops.indexOf(x)%20%2B%201%3B%20%7D)%3B%0A%20%20if%20(left.length)%20out.push(%22Hidden%20focus%3A%20%22%20%2B%20left.length%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%20was%22%2C%20%22stops%20were%22)%20%2B%20%22%20never%20tested%20(%22%20%2B%20left.slice(0%2C%2030).join(%22%2C%20%22)%20%2B%20(left.length%20%3E%2030%20%3F%20%22%20and%20%22%20%2B%20(left.length%20-%2030)%20%2B%20%22%20more%22%20%3A%20%22%22)%20%2B%20%22).%20Press%20Play%20to%20test%20every%20stop.%22)%3B%0A%20%20var%20presses%20%3D%20logs.filter(function%20(e)%20%7B%20return%20e.f%20%3D%3D%3D%20%22Out%20of%20order%22%20%7C%7C%20e.f%20%3D%3D%3D%20%22Keyboard%20trap%22%3B%20%7D).length%3B%0A%20%20out.push(%22Out%20of%20order%20and%20Keyboard%20trap%3A%20judged%20only%20for%20the%20%22%20%2B%20pl(presses%2C%20%22Tab%20press%22%2C%20%22Tab%20presses%22)%20%2B%20%22%20made%20in%20this%20run.%20Press%20Tab%20through%20the%20whole%20page%2C%20and%20Shift%2BTab%20back%2C%20to%20judge%20every%20step.%22)%3B%0A%20%20var%20pops%20%3D%20logs.filter(function%20(e)%20%7B%20return%20e.f%20%3D%3D%3D%20%22Lost%20focus%22%3B%20%7D).length%3B%0A%20%20out.push(%22Lost%20focus%3A%20%22%20%2B%20(pops%20%3F%20%22only%20%22%20%2B%20pl(pops%2C%20%22popup%20was%22%2C%20%22popups%20were%22)%20%3A%20%22no%20popups%20were%22)%20%2B%20%22%20opened%20and%20closed%20in%20this%20run.%20Open%20and%20close%20every%20popup%2C%20menu%20and%20dialog%20on%20the%20page%20to%20check%20them%20all.%22)%3B%0A%20%20out.push(%22Window%20size%3A%20everything%20was%20tested%20at%20%22%20%2B%20innerWidth%20%2B%20%22%20x%20%22%20%2B%20innerHeight%20%2B%20%22%20only.%20Sticky%20bars%2C%20menus%20and%20popups%20can%20behave%20differently%20on%20phones%3B%20run%20it%20again%20in%20a%20window%20about%20390%20px%20wide.%22)%3B%0A%20%20out.push(%22Not%20checked%20by%20Tab%20trail%20at%20all%3A%20how%20strong%20the%20focus%20change%20is%20(contrast%2C%20size%3A%20AAA)%2C%20accessible%20names%20of%20things%20Tab%20doesn't%20reach%2C%20color%20contrast%20of%20text%2C%20what%20a%20screen%20reader%20announces%2C%20and%20content%20inside%20iframes.%20Use%20axe%20DevTools%20or%20Lighthouse%20for%20names%2C%20contrast%20and%20iframes.%20Check%20focus%20visibility%20with%20Spotlight%20and%20screen%20reader%20output%20with%20VoiceOver%20or%20NVDA.%22)%3B%0A%20%20return%20out%3B%0A%7D%0Avar%20probLog%20%3D%20%5B%5D%2C%20ignore%20%3D%20%5B%5D%2C%20CAP%20%3D%20200%2C%20judgedDir%20%3D%20%7B%7D%3B%0Afunction%20ignored(e)%20%7B%0A%20%20return%20ignore.length%20%26%26%20e.ai.els.some(function%20(x)%20%7B%0A%20%20%20%20for%20(var%20n%20%3D%20x.el%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement%20%7C%7C%20(n.getRootNode()%20%26%26%20n.getRootNode().host))%20%7B%0A%20%20%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20ignore.length%3B%20i%2B%2B)%20if%20(n.matches(ignore%5Bi%5D))%20return%20true%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20false%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20openProbs(all)%20%7B%0A%20%20var%20seen%20%3D%20%7B%7D%2C%20out%20%3D%20%5B%5D%3B%0A%20%20probLog.forEach(function%20(e)%20%7B%0A%20%20%20%20var%20t%20%3D%20e.f%20%2B%20e.p.map(partText).join(%22%22)%3B%0A%20%20%20%20if%20(e.fixed%20%7C%7C%20seen%5Bt%5D)%20return%3B%0A%20%20%20%20seen%5Bt%5D%20%3D%201%3B%0A%20%20%20%20if%20(all%20%7C%7C%20!ignored(e))%20out.push(e)%3B%0A%20%20%7D)%3B%0A%20%20return%20out%3B%0A%7D%0Afunction%20hash(t)%20%7B%0A%20%20var%20h%20%3D%202166136261%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20t.length%3B%20i%2B%2B)%20h%20%3D%20Math.imul(h%20%5E%20t.charCodeAt(i)%2C%2016777619)%3B%0A%20%20return%20(%220000000%22%20%2B%20(h%20%3E%3E%3E%200).toString(16)).slice(-8)%3B%0A%7D%0Afunction%20keyOf(e)%20%7B%0A%20%20var%20t%20%3D%20e.tagName.toLowerCase()%3B%0A%20%20if%20(e.id%20%26%26%20cssId(e.id))%20return%20t%20%2B%20%22%23%22%20%2B%20e.id%3B%0A%20%20var%20up%20%3D%20%22%22%3B%0A%20%20for%20(var%20p%20%3D%20e.parentElement%3B%20p%3B%20p%20%3D%20p.parentElement)%20if%20(p.id%20%26%26%20cssId(p.id))%20%7B%20up%20%3D%20%22%23%22%20%2B%20p.id%20%2B%20%22%20%22%3B%20break%3B%20%7D%0A%20%20return%20up%20%2B%20t%20%2B%20(e.getAttribute(%22role%22)%20%3F%20%22%5Brole%3D%22%20%2B%20e.getAttribute(%22role%22)%20%2B%20%22%5D%22%20%3A%20%22%22)%20%2B%20(e.getAttribute(%22name%22)%20%3F%20%22%5Bname%3D%22%20%2B%20e.getAttribute(%22name%22)%20%2B%20%22%5D%22%20%3A%20%22%22)%20%2B%20%22%5C%22%22%20%2B%20label(e)%20%2B%20%22%5C%22%22%3B%0A%7D%0Afunction%20mainEl(e)%20%7B%0A%20%20var%20to%20%3D%20e.ai.els.filter(function%20(x)%20%7B%20return%20x.role%20%3D%3D%3D%20%22Tab%20jumped%20to%22%3B%20%7D)%5B0%5D%3B%0A%20%20return%20to%20%7C%7C%20e.ai.els%5B0%5D%3B%0A%7D%0Afunction%20problemsOf(list)%20%7B%0A%20%20var%20used%20%3D%20%7B%7D%3B%0A%20%20return%20list.map(function%20(e)%20%7B%0A%20%20%20%20var%20m%20%3D%20mainEl(e)%2C%20id%20%3D%20hash(e.f%20%2B%20%22%7C%22%20%2B%20e.ai.els.map(function%20(x)%20%7B%20return%20keyOf(x.el)%3B%20%7D).join(%22%7C%22))%3B%0A%20%20%20%20used%5Bid%5D%20%3D%20(used%5Bid%5D%20%7C%7C%200)%20%2B%201%3B%0A%20%20%20%20return%20%7B%20id%3A%20used%5Bid%5D%20%3E%201%20%3F%20id%20%2B%20%22-%22%20%2B%20used%5Bid%5D%20%3A%20id%2C%20check%3A%20e.f%2C%20wcag%3A%20wcagOf(e)%20%7C%7C%20null%2C%20selector%3A%20m%20%3F%20m.sel%20%3A%20null%2C%20html%3A%20m%20%3F%20m.html%20%3A%20null%2C%20component%3A%20m%20%26%26%20m.comp%20%3F%20m.comp%20%3A%20null%2C%20fix%3A%20e.ai.fix%2C%20verify%3A%20verifyOf(e)%20%7D%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20aiText()%20%7B%0A%20%20var%20out%20%3D%20%5B%5D%2C%20skips%20%3D%20%5B%5D%2C%20seenS%20%3D%20%7B%7D%2C%20notes%20%3D%20%5B%5D%2C%20probs%20%3D%20openProbs()%2C%20left%20%3D%20openProbs(true).length%20-%20probs.length%2C%20ids%20%3D%20problemsOf(probs)%2C%20groups%20%3D%20%5B%5D%2C%20byKey%20%3D%20%7B%7D%3B%0A%20%20probs.forEach(function%20(e%2C%20i)%20%7B%0A%20%20%20%20var%20m%20%3D%20mainEl(e)%2C%20k%20%3D%20%2F%5E(Missed%20spots%7CHover%20menus%7CForced%20order)%24%2F.test(e.f)%20%26%26%20m%20%3F%20e.f%20%2B%20%22%7C%22%20%2B%20e.ai.fix%20%2B%20%22%7C%22%20%2B%20desc(m.el)%20%2B%20%22%7C%22%20%2B%20m.comp%20%3A%20%22%23%22%20%2B%20i%2C%20g%20%3D%20byKey%5Bk%5D%3B%0A%20%20%20%20if%20(!g)%20groups.push((g%20%3D%20byKey%5Bk%5D%20%3D%20%7B%20i%3A%20i%2C%20list%3A%20%5B%5D%20%7D))%3B%0A%20%20%20%20g.list.push(e)%3B%0A%20%20%7D)%3B%0A%20%20logs.forEach(function%20(e)%20%7B%0A%20%20%20%20var%20t%20%3D%20e.p.map(partText).join(%22%22)%3B%0A%20%20%20%20if%20(e.k%20%3D%3D%3D%20%22SKIPPED%22%20%26%26%20!seenS%5Be.f%20%2B%20t%5D)%20%7B%0A%20%20%20%20%20%20seenS%5Be.f%20%2B%20t%5D%20%3D%201%3B%0A%20%20%20%20%20%20skips.push(e.f%20%2B%20%22%3A%20%22%20%2B%20t)%3B%0A%20%20%20%20%7D%20else%20if%20(e.k%20%3D%3D%3D%20%22INFO%22)%20notes.push(clock(e.t)%20%2B%20%22%20%22%20%2B%20e.f%20%2B%20%22%3A%20%22%20%2B%20t)%3B%0A%20%20%7D)%3B%0A%20%20var%20c%20%3D%20logCounts()%3B%0A%20%20out.push(%22Tab%20trail%20%22%20%2B%20VERSION%20%2B%20%22%20report%20for%20an%20AI%20agent%22)%3B%0A%20%20out.push(%22Page%3A%20%22%20%2B%20addr())%3B%0A%20%20out.push(%22Ran%20on%3A%20%22%20%2B%20stamp()%20%2B%20%22%2C%20%22%20%2B%20browser()%20%2B%20%22%2C%20window%20%22%20%2B%20innerWidth%20%2B%20%22%20x%20%22%20%2B%20innerHeight)%3B%0A%20%20out.push(%22Tool%3A%20Tab%20trail%20(matjazkorosec.com%2Ftools%2Ftab-trail)%2C%20a%20bookmarklet%20that%20checks%20the%20keyboard%20Tab%20order%20of%20the%20page.%20Stop%20numbers%20are%20positions%20in%20the%20Tab%20order%20when%20the%20check%20ran.%20Use%20the%20selectors%2C%20the%20HTML%20and%20the%20component%20names%20to%20find%20each%20element%20in%20the%20code.%22)%3B%0A%20%20out.push(%22Run%20it%20again%20from%20a%20script%20(for%20example%20Playwright)%3A%20save%20https%3A%2F%2Fraw.githubusercontent.com%2Fmatjazkorosec%2Ftab-trail%2Fv%22%20%2B%20VERSION%20%2B%20%22%2Fdist%2Ftab-trail.js%20in%20your%20repo%20once%20and%20load%20your%20saved%20copy%20with%20page.evaluate(readFileSync(...))%2C%20which%20works%20under%20a%20Content%20Security%20Policy.%20Then%20await%20window.__tabTrail.play()%20to%20walk%20every%20stop%2C%20and%20read%20window.__tabTrail.problems()%20for%20every%20open%20problem%20as%20data%2C%20window.__tabTrail.report()%20for%20this%20same%20report%20or%20window.__tabTrail.log()%20for%20every%20line.%22)%3B%0A%20%20out.push(%22%22)%3B%0A%20%20out.push(%22Summary%3A%20%22%20%2B%20pl(probs.length%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22%20to%20fix%22%20%2B%20(groups.length%20%3C%20probs.length%20%3F%20%22%20(%22%20%2B%20pl(groups.length%2C%20%22different%20fix%22%2C%20%22different%20fixes%22)%20%2B%20%22)%22%20%3A%20%22%22)%20%2B%20%22.%20%22%20%2B%20pl(c.ok%2C%20%22check%22%2C%20%22checks%22)%20%2B%20%22%20passed%2C%20%22%20%2B%20c.skip%20%2B%20%22%20skipped.%22)%3B%0A%20%20if%20(walkEnd%20%7C%7C%20walking)%20out.push(%22Play%3A%20%22%20%2B%20playState()%20%2B%20%22.%22)%3B%0A%20%20var%20pass%20%3D%20tally(%22OK%22)%2C%20sk%20%3D%20tally(%22SKIPPED%22)%3B%0A%20%20if%20(pass)%20out.push(%22Passed%3A%20%22%20%2B%20pass%20%2B%20%22.%22)%3B%0A%20%20if%20(sk)%20out.push(%22Skipped%3A%20%22%20%2B%20sk%20%2B%20%22.%22)%3B%0A%20%20var%20ran%20%3D%20ranChecks()%3B%0A%20%20if%20(ran.length)%20out.push(%22Checked%3A%20%22%20%2B%20ran.join(%22%2C%20%22)%20%2B%20%22.%20Each%20check%20is%20explained%20at%20%22%20%2B%20showUrl(ran%5B0%5D).replace(%2F%23.*%2F%2C%20%22%23shows%22)%20%2B%20%22%20under%20Fix%20what%20turns%20red.%22)%3B%0A%20%20if%20(left)%20out.push(%22Left%20out%20on%20purpose%3A%20%22%20%2B%20pl(left%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22%20inside%20%22%20%2B%20ignore.join(%22%2C%20%22)%20%2B%20%22.%22)%3B%0A%20%20if%20(groups.length%20%3E%20CAP)%20out.push(%22Showing%20the%20first%20%22%20%2B%20CAP%20%2B%20%22%20of%20%22%20%2B%20groups.length.toLocaleString(%22en-US%22)%20%2B%20%22%20problems.%20window.__tabTrail.problems()%20returns%20every%20one.%22)%3B%0A%20%20groups.slice(0%2C%20CAP).forEach(function%20(g%2C%20n)%20%7B%0A%20%20%20%20var%20e%20%3D%20g.list%5B0%5D%2C%20i%20%3D%20g.i%2C%20more%20%3D%20g.list.length%20-%202%3B%0A%20%20%20%20out.push(%22%22)%3B%0A%20%20%20%20out.push(%22Problem%20%22%20%2B%20(n%20%2B%201)%20%2B%20%22%20of%20%22%20%2B%20groups.length%20%2B%20%22%3A%20%22%20%2B%20e.f%20%2B%20(g.list.length%20%3E%201%20%3F%20%22%2C%20%22%20%2B%20g.list.length%20%2B%20%22%20elements%20with%20the%20same%20cause%3A%20%22%20%2B%20desc(mainEl(e).el)%20%2B%20%22%20(%22%20%2B%20g.list.slice(0%2C%202).map(function%20(x)%20%7B%20return%20%22%5C%22%22%20%2B%20label(mainEl(x).el)%20%2B%20%22%5C%22%22%3B%20%7D).join(%22%2C%20%22)%20%2B%20(more%20%3E%200%20%3F%20%22%20and%20%22%20%2B%20more%20%2B%20%22%20more%22%20%3A%20%22%22)%20%2B%20%22).%20Fix%20it%20once%20in%20the%20component%20that%20draws%20them.%22%20%3A%20%22%22)%20%2B%20%22%20(%22%20%2B%20clock(e.t)%20%2B%20%22)%22)%3B%0A%20%20%20%20out.push(%22Id%3A%20%22%20%2B%20ids%5Bi%5D.id%20%2B%20(g.list.length%20%3E%201%20%3F%20%22%20(the%20first%20of%20%22%20%2B%20g.list.length%20%2B%20%22%2C%20window.__tabTrail.problems()%20lists%20every%20one)%22%20%3A%20%22%22))%3B%0A%20%20%20%20if%20(e.ai)%20out.push(%22WCAG%3A%20%22%20%2B%20e.ai.crit)%3B%0A%20%20%20%20out.push(%22What%20happened%3A%20%22%20%2B%20e.p.map(partText).join(%22%22))%3B%0A%20%20%20%20if%20(!e.ai)%20return%3B%0A%20%20%20%20out.push(%22Expected%3A%20%22%20%2B%20e.ai.expect)%3B%0A%20%20%20%20e.ai.els.forEach(function%20(x)%20%7B%0A%20%20%20%20%20%20out.push(x.role%20%2B%20%22%3A%20%22%20%2B%20x.sel%20%2B%20(x.el.isConnected%20%3F%20%22%22%20%3A%20%22%20(no%20longer%20on%20the%20page)%22))%3B%0A%20%20%20%20%20%20out.push(%22%20%20HTML%3A%20%22%20%2B%20x.html)%3B%0A%20%20%20%20%20%20if%20(x.comp)%20out.push(%22%20%20Component%3A%20%22%20%2B%20x.comp)%3B%0A%20%20%20%20%20%20var%20where%20%3D%20whereOf(x.el)%3B%0A%20%20%20%20%20%20if%20(where)%20out.push(%22%20%20Where%3A%20%22%20%2B%20where)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20e.ai.more.forEach(function%20(m)%20%7B%20out.push(m)%3B%20%7D)%3B%0A%20%20%20%20out.push(%22Fix%20hint%3A%20%22%20%2B%20e.ai.fix)%3B%0A%20%20%20%20out.push(%22How%20to%20check%20the%20fix%3A%20%22%20%2B%20verifyOf(e))%3B%0A%20%20%20%20if%20(CHECKS.indexOf(e.f)%20%3E%3D%200)%20out.push(%22About%20this%20check%3A%20%22%20%2B%20showUrl(e.f))%3B%0A%20%20%7D)%3B%0A%20%20out.push(%22%22)%3B%0A%20%20out.push(%22Not%20covered%20in%20this%20run%3A%22)%3B%0A%20%20coverage().forEach(function%20(t)%20%7B%20out.push(%22-%20%22%20%2B%20t)%3B%20%7D)%3B%0A%20%20if%20(skips.length)%20%7B%0A%20%20%20%20out.push(%22%22)%3B%0A%20%20%20%20out.push(%22Skipped%20checks%2C%20and%20why%3A%22)%3B%0A%20%20%20%20skips.slice(0%2C%2012).forEach(function%20(t)%20%7B%20out.push(%22-%20%22%20%2B%20t)%3B%20%7D)%3B%0A%20%20%20%20if%20(skips.length%20%3E%2012)%20out.push(%22-%20and%20%22%20%2B%20(skips.length%20-%2012)%20%2B%20%22%20more%22)%3B%0A%20%20%7D%0A%20%20if%20(notes.length)%20%7B%0A%20%20%20%20out.push(%22%22)%3B%0A%20%20%20%20out.push(%22Notes%3A%22)%3B%0A%20%20%20%20notes.slice(-10).forEach(function%20(t)%20%7B%20out.push(%22-%20%22%20%2B%20t)%3B%20%7D)%3B%0A%20%20%7D%0A%20%20return%20out.join(%22%5Cn%22)%3B%0A%7D%0Afunction%20copyIt(b%2C%20w%2C%20text%2C%20word)%20%7B%0A%20%20var%20d%20%3D%20w.document%3B%0A%20%20var%20lb%20%3D%20b.lastChild%20%26%26%20b.lastChild.nodeType%20%3D%3D%3D%203%20%3F%20b.lastChild%20%3A%20b%3B%0A%20%20function%20done(ok)%20%7B%0A%20%20%20%20lb.textContent%20%3D%20ok%20%3F%20%22Copied%22%20%3A%20%22Copy%20failed%22%3B%0A%20%20%20%20setTimeout(function%20()%20%7B%20lb.textContent%20%3D%20word%3B%20%7D%2C%201500)%3B%0A%20%20%7D%0A%20%20function%20old()%20%7B%0A%20%20%20%20var%20back%20%3D%20w%20%3D%3D%3D%20window%20%3F%20deep()%20%3A%20d.activeElement%3B%0A%20%20%20%20var%20ta%20%3D%20d.createElement(%22textarea%22)%3B%0A%20%20%20%20ta.value%20%3D%20text%3B%0A%20%20%20%20ta.setAttribute(%22readonly%22%2C%20%22%22)%3B%0A%20%20%20%20ta.style.cssText%20%3D%20%22position%3Afixed%3Bleft%3A0%3Btop%3A0%3Bwidth%3A1px%3Bheight%3A1px%3Bopacity%3A0%22%3B%0A%20%20%20%20(w%20%3D%3D%3D%20window%20%3F%20root%20%3A%20d.body).appendChild(ta)%3B%0A%20%20%20%20ta.focus(%7B%20preventScroll%3A%20true%20%7D)%3B%0A%20%20%20%20ta.select()%3B%0A%20%20%20%20var%20ok%20%3D%20false%3B%0A%20%20%20%20try%20%7B%20ok%20%3D%20d.execCommand(%22copy%22)%3B%20%7D%20catch%20(x)%20%7B%7D%0A%20%20%20%20ta.remove()%3B%0A%20%20%20%20if%20(back%20%26%26%20back.focus)%20back.focus(%7B%20preventScroll%3A%20true%20%7D)%3B%0A%20%20%20%20done(ok)%3B%0A%20%20%7D%0A%20%20if%20(w.navigator.clipboard%20%26%26%20w.isSecureContext)%20w.navigator.clipboard.writeText(text).then(function%20()%20%7B%20done(true)%3B%20%7D%2C%20old)%3B%0A%20%20else%20old()%3B%0A%7D%0Afunction%20filters(parent%2C%20doc)%20%7B%0A%20%20var%20row%20%3D%20doc.createElement(%22div%22)%3B%0A%20%20row.className%20%3D%20%22lf%22%3B%0A%20%20var%20set%20%3D%20FILT.map(function%20(f)%20%7B%0A%20%20%20%20var%20b%20%3D%20doc.createElement(%22button%22)%3B%0A%20%20%20%20b.type%20%3D%20%22button%22%3B%0A%20%20%20%20b.className%20%3D%20%22lt%22%3B%0A%20%20%20%20b.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20%20%20logFilter%20%3D%20f%5B0%5D%3B%0A%20%20%20%20%20%20logDraw()%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20row.appendChild(b)%3B%0A%20%20%20%20return%20b%3B%0A%20%20%7D)%3B%0A%20%20parent.appendChild(row)%3B%0A%20%20filterSets.push(set)%3B%0A%20%20return%20set%3B%0A%7D%0Afunction%20logSummary()%20%7B%0A%20%20var%20c%20%3D%20logCounts()%3B%0A%20%20logSum.textContent%20%3D%20%22%20%22%20%2B%20pl(c.all%2C%20%22event%22%2C%20%22events%22)%3B%0A%20%20logBad.textContent%20%3D%20c.bad%20%3F%20pl(c.bad%2C%20%22problem%22%2C%20%22problems%22)%20%3A%20%22%22%3B%0A%20%20logGroup.classList.toggle(%22warn%22%2C%20c.bad%20%3E%200)%3B%0A%20%20filterSets.forEach(function%20(set)%20%7B%0A%20%20%20%20set.forEach(function%20(b%2C%20i)%20%7B%0A%20%20%20%20%20%20b.textContent%20%3D%20FILT%5Bi%5D%5B1%5D%20%2B%20%22%20%22%20%2B%20c%5BFILT%5Bi%5D%5B0%5D%5D%3B%0A%20%20%20%20%20%20b.setAttribute(%22aria-pressed%22%2C%20logFilter%20%3D%3D%3D%20FILT%5Bi%5D%5B0%5D%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20%20%20%20%20b.classList.toggle(%22e%22%2C%20FILT%5Bi%5D%5B0%5D%20%3D%3D%3D%20%22bad%22%20%26%26%20c.bad%20%3E%200)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D)%3B%0A%20%20if%20(tabSum%20%26%26%20tabOpen())%20tabSum.textContent%20%3D%20addr()%20%2B%20%22%2C%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%3B%0A%20%20checkedLine(logChecked%2C%20document)%3B%0A%20%20if%20(tabChecked%20%26%26%20tabOpen())%20checkedLine(tabChecked%2C%20logTab.document)%3B%0A%20%20if%20(sumLine%20%26%26%20walkEnd%20%3D%3D%3D%20%22done%22)%20sumDraw()%3B%0A%7D%0Afunction%20logDraw()%20%7B%0A%20%20if%20(logTab%20%26%26%20logTab.closed)%20tabGone()%3B%0A%20%20logSummary()%3B%0A%20%20%5BlogList%2C%20tabList%5D.forEach(function%20(u)%20%7B%20if%20(u)%20while%20(u.firstChild)%20u.removeChild(u.firstChild)%3B%20%7D)%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20e.li%20%3D%20null%3B%20%7D)%3B%0A%20%20var%20away%20%3D%20tabOpen()%3B%0A%20%20logBody.hidden%20%3D%20!logOpen%20%7C%7C%20away%3B%0A%20%20logAway.hidden%20%3D%20!away%3B%0A%20%20logBtn.setAttribute(%22aria-expanded%22%2C%20logBody.hidden%20%3F%20%22false%22%20%3A%20%22true%22)%3B%0A%20%20var%20v%20%3D%20logView()%3B%0A%20%20if%20(!v)%20return%3B%0A%20%20var%20frag%20%3D%20v.ownerDocument.createDocumentFragment()%3B%0A%20%20logs.slice().reverse().forEach(function%20(e)%20%7B%0A%20%20%20%20if%20(!shows(e))%20return%3B%0A%20%20%20%20e.li%20%3D%20logLi(e%2C%20v.ownerDocument)%3B%0A%20%20%20%20frag.appendChild(e.li)%3B%0A%20%20%7D)%3B%0A%20%20v.appendChild(frag)%3B%0A%20%20toTop(v)%3B%0A%7D%0Afunction%20tabGone()%20%7B%0A%20%20logTab%20%3D%20null%3B%0A%20%20tabList%20%3D%20null%3B%0A%20%20tabSum%20%3D%20null%3B%0A%20%20tabChecked%20%3D%20null%3B%0A%20%20wcagBoxes%20%3D%20wcagBoxes.filter(function%20(b)%20%7B%20return%20b.ownerDocument%20%3D%3D%3D%20document%3B%20%7D)%3B%0A%20%20tabNote%20%3D%20null%3B%0A%20%20filterSets%20%3D%20filterSets.filter(function%20(x)%20%7B%20return%20x%20!%3D%3D%20tabSet%3B%20%7D)%3B%0A%20%20tabSet%20%3D%20null%3B%0A%20%20if%20(tabPoll)%20clearInterval(tabPoll)%3B%0A%20%20tabPoll%20%3D%200%3B%0A%7D%0Avar%20TAB_CSS%20%3D%20%5B%0A%20%20%22body%7Bmargin%3A0%3Bpadding%3A12px%3Bbackground%3A%23e4dccd%3Bcolor%3A%231a1612%3Bfont%3A15px%2F1.5%20-apple-system%2Csystem-ui%2C'Segoe%20UI'%2CRoboto%2Csans-serif%7D%22%2C%0A%20%20%22.hd%2C.box%7Bbox-sizing%3Aborder-box%3Bmax-width%3A1200px%3Bmargin%3A0%20auto%3Bbackground%3A%23fbf8f3%3Bborder-radius%3A12px%7D%22%2C%0A%20%20%22.wide%20.hd%2C.wide%20.box%7Bmax-width%3Anone%7D%22%2C%0A%20%20%22.fw%7Bdisplay%3Ainline-grid%3Bplace-items%3Acenter%3Bwidth%3A34px%3Bheight%3A34px%3Bpadding%3A0%3Bborder%3A1.5px%20solid%20%231a1612%3Bborder-radius%3A8px%3Bbackground%3A%23fff%3Bcolor%3A%231a1612%3Bcursor%3Apointer%3Bbox-sizing%3Aborder-box%7D%22%2C%0A%20%20%22.fw%3Ahover%7Bbackground%3A%23efe8dc%7D%22%2C%0A%20%20%22.fw%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.fw%20.in%2C.wide%20.fw%20.out%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.wide%20.fw%20.in%7Bdisplay%3Ainline%7D%22%2C%0A%20%20%22.hd%7Bposition%3Asticky%3Btop%3A12px%3Bz-index%3A1%3Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Balign-items%3Acenter%3Bgap%3A10px%208px%3Bpadding%3A14px%2018px%3Bbox-shadow%3A0%200%200%2012px%20%23e4dccd%7D%22%2C%0A%20%20%22.box%7Bmargin-top%3A8px%3Bpadding%3A12px%200%208px%3Boverflow%3Ahidden%7D%22%2C%0A%20%20%22h1%7Bmargin%3A0%3Bfont%3A700%2022px%2F1.2%20Georgia%2Cserif%7D%22%2C%0A%20%20%22.u%7Bmargin%3A0%20auto%200%206px%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.nt%7Bflex-basis%3A100%25%3Bmargin%3A0%3Bcolor%3A%23d0103a%3Bfont-weight%3A700%7D%22%2C%0A%20%20%22.nt%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lf%7Bdisplay%3Ainline-grid%3Bgrid-auto-flow%3Acolumn%3Bgap%3A2px%3Bpadding%3A3px%3Bbackground%3A%23efe8dc%3Bborder-radius%3A10px%3Bmargin-right%3A14px%7D%22%2C%0A%20%20%22.fr%7Bflex-basis%3A100%25%3Bdisplay%3Aflex%3Bflex-wrap%3Awrap%3Balign-items%3Acenter%3Bgap%3A8px%200%7D%22%2C%0A%20%20%22.lt%2C.kl%2C.ka%2C.lo%2C.lc%7Bfont%3Ainherit%3Bcolor%3Ainherit%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lt%7Bpadding%3A3px%2014px%3Bborder%3A0%3Bborder-radius%3A7px%3Bbackground%3Anone%3Bcolor%3A%235f564c%3Bfont-weight%3A600%3Bfont-size%3A14px%7D%22%2C%0A%20%20%22.lt%3Ahover%7Bcolor%3A%231a1612%3Bbackground%3Argba(26%2C22%2C18%2C.06)%7D%22%2C%0A%20%20%22.lt%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23fff%3Bcolor%3A%231a1612%3Bbox-shadow%3A0%201px%202px%20rgba(26%2C22%2C18%2C.2)%7D%22%2C%0A%20%20%22.lt.e%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lt.e%3Ahover%7Bbackground%3Argba(208%2C16%2C58%2C.1)%7D%22%2C%0A%20%20%22.lt.e%5Baria-pressed%3Dtrue%5D%7Bbackground%3A%23d0103a%3Bcolor%3A%23fff%7D%22%2C%0A%20%20%22.kl%2C.ka%2C.lo%7Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A7px%3Bheight%3A34px%3Bpadding%3A0%2014px%3Bborder-radius%3A8px%3Bfont-weight%3A700%3Bfont-size%3A14px%3Bwhite-space%3Anowrap%3Bbox-sizing%3Aborder-box%7D%22%2C%0A%20%20%22.kl%2C.lo%7Bborder%3A1.5px%20solid%20%231a1612%3Bbackground%3A%23fff%3Bcolor%3A%231a1612%7D%22%2C%0A%20%20%22.kl%3Ahover%2C.lo%3Ahover%7Bbackground%3A%23efe8dc%7D%22%2C%0A%20%20%22.ka%7Bborder%3A0%3Bbackground%3A%231a1612%3Bcolor%3A%23fbf8f3%7D%22%2C%0A%20%20%22.ka%3Ahover%7Bbackground%3A%233a332c%7D%22%2C%0A%20%20%22.lo%7Bfont-weight%3A600%7D%22%2C%0A%20%20%22.lt%3Afocus-visible%2C.kl%3Afocus-visible%2C.ka%3Afocus-visible%2C.lo%3Afocus-visible%2C.lc%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lck%7Bmargin%3A0%3Bpadding%3A0%2018px%208px%7D%22%2C%0A%20%20%22.lck%5Bhidden%5D%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lq%7Bcolor%3A%231e3a8a%3Bfont-weight%3A700%3Btext-decoration%3Anone%7D%22%2C%0A%20%20%22.lq%3Ahover%7Btext-decoration%3Aunderline%3Btext-underline-offset%3A2px%7D%22%2C%0A%20%20%22.wc%7Bcolor%3A%231f7a3f%3Bfont-weight%3A400%7D%22%2C%0A%20%20%22.nw%20.wc%7Bdisplay%3Anone%7D%22%2C%0A%20%20%22.lw%7Bdisplay%3Ainline-flex%3Balign-items%3Acenter%3Bgap%3A8px%3Bfont-size%3A14px%3Bcolor%3A%231f7a3f%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%7Bwidth%3A16px%3Bheight%3A16px%3Bmargin%3A0%3Baccent-color%3A%23c2410c%3Bcursor%3Apointer%7D%22%2C%0A%20%20%22.lw%20input%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%7D%22%2C%0A%20%20%22.lq.bad%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lq%3Afocus-visible%7Boutline%3A3px%20solid%20%23c2410c%3Boutline-offset%3A2px%3Bborder-radius%3A2px%7D%22%2C%0A%20%20%22.ll%7Blist-style%3Anone%3Bmargin%3A0%3Bpadding%3A0%7D%22%2C%0A%20%20%22.lx%7Bdisplay%3Agrid%3Bgrid-template-columns%3A72px%2080px%201fr%3Bgap%3A2px%2012px%3Bpadding%3A6px%2018px%3Balign-items%3Abaseline%7D%22%2C%0A%20%20%22.lx%3Ahover%7Bbackground%3A%23f3ede3%7D%22%2C%0A%20%20%22.lx%20.bd%7Bmin-width%3A0%3Boverflow-wrap%3Aanywhere%7D%22%2C%0A%20%20%22.lx.bad%7Bbackground%3Argba(208%2C16%2C58%2C.07)%7D%22%2C%0A%20%20%22.tm%2C.st%7Bfont%3A500%2014px%2F1.5%20ui-monospace%2CSFMono-Regular%2CMenlo%2CConsolas%2Cmonospace%3Bcolor%3A%235f564c%7D%22%2C%0A%20%20%22.st%7Bfont-weight%3A700%7D%22%2C%0A%20%20%22.ok%20.st%7Bcolor%3A%231f7a3f%7D.bad%20.st%7Bcolor%3A%23d0103a%7D.skip%20.st%7Bcolor%3A%235f564c%7D.info%20.st%7Bcolor%3A%231e3a8a%7D%22%2C%0A%20%20%22.ft%7Bcolor%3A%231e3a8a%7D.bad%20.ft%7Bcolor%3A%23d0103a%7D%22%2C%0A%20%20%22.lc%7Bdisplay%3Ainline-block%3Bmin-width%3A24px%3Bpadding%3A0%206px%3Bborder%3A1px%20dashed%20%231a1612%3Bborder-radius%3A999px%3Bbackground%3Anone%3Bfont-size%3A14px%3Bline-height%3A1.4%3Btext-align%3Acenter%7D%22%2C%0A%20%20%22.lc%3Ahover%7Bbackground%3Argba(26%2C22%2C18%2C.08)%7D%22%0A%5D.join(%22%22)%3B%0Avar%20ownName%20%3D%20false%2C%20tabWide%20%3D%20false%3B%0Afunction%20openTab()%20%7B%0A%20%20var%20w%20%3D%20window.open(%22%22%2C%20%22_blank%22)%3B%0A%20%20if%20(!w)%20%7B%0A%20%20%20%20tabMsg.hidden%20%3D%20false%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20tabMsg.hidden%20%3D%20true%3B%0A%20%20logTab%20%3D%20w%3B%0A%20%20if%20(!window.name)%20%7B%0A%20%20%20%20window.name%20%3D%20%22tab-trail-%22%20%2B%20Date.now()%3B%0A%20%20%20%20ownName%20%3D%20true%3B%0A%20%20%7D%0A%20%20var%20d%20%3D%20w.document%3B%0A%20%20d.title%20%3D%20%22Tab%20trail%20log%3A%20%22%20%2B%20location.host%3B%0A%20%20try%20%7B%0A%20%20%20%20var%20tsh%20%3D%20new%20w.CSSStyleSheet()%3B%0A%20%20%20%20tsh.replaceSync(TAB_CSS)%3B%0A%20%20%20%20d.adoptedStyleSheets%20%3D%20%5Btsh%5D%3B%0A%20%20%7D%20catch%20(e)%20%7B%0A%20%20%20%20var%20st%20%3D%20d.createElement(%22style%22)%3B%0A%20%20%20%20st.textContent%20%3D%20TAB_CSS%3B%0A%20%20%20%20d.head.appendChild(st)%3B%0A%20%20%7D%0A%20%20var%20hd%20%3D%20d.createElement(%22div%22)%3B%0A%20%20hd.className%20%3D%20%22hd%22%3B%0A%20%20var%20h1%20%3D%20d.createElement(%22h1%22)%3B%0A%20%20h1.textContent%20%3D%20%22Tab%20trail%20log%22%3B%0A%20%20hd.appendChild(h1)%3B%0A%20%20tabSum%20%3D%20d.createElement(%22p%22)%3B%0A%20%20tabSum.className%20%3D%20%22u%22%3B%0A%20%20hd.appendChild(tabSum)%3B%0A%20%20var%20cp%20%3D%20d.createElement(%22button%22)%3B%0A%20%20cp.type%20%3D%20%22button%22%3B%0A%20%20cp.className%20%3D%20%22kl%22%3B%0A%20%20icon(cp%2C%2016%2C%20COPY_ICON%2C%201.6)%3B%0A%20%20cp.appendChild(d.createTextNode(%22Copy%20log%22))%3B%0A%20%20cp.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(cp%2C%20w%2C%20logText()%2C%20%22Copy%20log%22)%3B%20%7D)%3B%0A%20%20hd.appendChild(cp)%3B%0A%20%20var%20ca%20%3D%20d.createElement(%22button%22)%3B%0A%20%20ca.type%20%3D%20%22button%22%3B%0A%20%20ca.className%20%3D%20%22ka%22%3B%0A%20%20icon(ca%2C%2016%2C%20AI_ICON%2C%201.6)%3B%0A%20%20ca.appendChild(d.createTextNode(%22Copy%20for%20AI%22))%3B%0A%20%20ca.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(ca%2C%20w%2C%20aiText()%2C%20%22Copy%20for%20AI%22)%3B%20%7D)%3B%0A%20%20hd.appendChild(ca)%3B%0A%20%20var%20bk%20%3D%20d.createElement(%22button%22)%3B%0A%20%20bk.type%20%3D%20%22button%22%3B%0A%20%20bk.className%20%3D%20%22lo%22%3B%0A%20%20bk.textContent%20%3D%20%22Put%20back%20in%20panel%22%3B%0A%20%20bk.addEventListener(%22click%22%2C%20putBack)%3B%0A%20%20hd.appendChild(bk)%3B%0A%20%20var%20fw%20%3D%20d.createElement(%22button%22)%3B%0A%20%20fw.type%20%3D%20%22button%22%3B%0A%20%20fw.className%20%3D%20%22fw%22%3B%0A%20%20fw.setAttribute(%22aria-label%22%2C%20%22Full%20width%22)%3B%0A%20%20fw.title%20%3D%20%22Full%20width%22%3B%0A%20%20fw.setAttribute(%22aria-pressed%22%2C%20tabWide%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20icon(fw%2C%2016%2C%20%22M1.5%208h13M1.5%208l3-3M1.5%208l3%203M14.5%208l-3-3M14.5%208l-3%203%22%2C%201.6).setAttribute(%22class%22%2C%20%22out%22)%3B%0A%20%20icon(fw%2C%2016%2C%20%22M1.5%208h4.5M6%208l-3-3M6%208l-3%203M14.5%208H10M10%208l3-3M10%208l3%203%22%2C%201.6).setAttribute(%22class%22%2C%20%22in%22)%3B%0A%20%20fw.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20%20%20tabWide%20%3D%20!tabWide%3B%0A%20%20%20%20d.body.classList.toggle(%22wide%22%2C%20tabWide)%3B%0A%20%20%20%20fw.setAttribute(%22aria-pressed%22%2C%20tabWide%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20%7D)%3B%0A%20%20hd.appendChild(fw)%3B%0A%20%20d.body.classList.toggle(%22wide%22%2C%20tabWide)%3B%0A%20%20tabNote%20%3D%20d.createElement(%22p%22)%3B%0A%20%20tabNote.className%20%3D%20%22nt%22%3B%0A%20%20tabNote.textContent%20%3D%20%22Tab%20trail%20was%20closed%20on%20the%20page.%20This%20log%20no%20longer%20updates.%22%3B%0A%20%20tabNote.hidden%20%3D%20true%3B%0A%20%20hd.appendChild(tabNote)%3B%0A%20%20var%20fr%20%3D%20d.createElement(%22div%22)%3B%0A%20%20fr.className%20%3D%20%22fr%22%3B%0A%20%20hd.appendChild(fr)%3B%0A%20%20tabSet%20%3D%20filters(fr%2C%20d)%3B%0A%20%20wcagBox(fr%2C%20d)%3B%0A%20%20d.body.appendChild(hd)%3B%0A%20%20d.body.classList.toggle(%22nw%22%2C%20!showWcag)%3B%0A%20%20var%20bd%20%3D%20d.createElement(%22div%22)%3B%0A%20%20bd.className%20%3D%20%22box%22%3B%0A%20%20d.body.appendChild(bd)%3B%0A%20%20tabChecked%20%3D%20d.createElement(%22p%22)%3B%0A%20%20tabChecked.className%20%3D%20%22lck%22%3B%0A%20%20bd.appendChild(tabChecked)%3B%0A%20%20tabList%20%3D%20d.createElement(%22ul%22)%3B%0A%20%20tabList.className%20%3D%20%22ll%22%3B%0A%20%20bd.appendChild(tabList)%3B%0A%20%20tabPoll%20%3D%20setInterval(function%20()%20%7B%0A%20%20%20%20if%20(logTab%20%26%26%20logTab.closed)%20%7B%0A%20%20%20%20%20%20tabGone()%3B%0A%20%20%20%20%20%20logDraw()%3B%0A%20%20%20%20%7D%0A%20%20%7D%2C%201000)%3B%0A%20%20logOpen%20%3D%20true%3B%0A%20%20logDraw()%3B%0A%7D%0Afunction%20putBack()%20%7B%0A%20%20var%20w%20%3D%20logTab%3B%0A%20%20tabGone()%3B%0A%20%20logOpen%20%3D%20true%3B%0A%20%20logDraw()%3B%0A%20%20if%20(w%20%26%26%20!w.closed)%20w.close()%3B%0A%7D%0Afunction%20lbtn(cls%2C%20text%2C%20parent)%20%7B%0A%20%20var%20b%20%3D%20document.createElement(%22button%22)%3B%0A%20%20b.type%20%3D%20%22button%22%3B%0A%20%20b.className%20%3D%20cls%3B%0A%20%20b.textContent%20%3D%20text%3B%0A%20%20parent.appendChild(b)%3B%0A%20%20return%20b%3B%0A%7D%0Avar%20logGroup%20%3D%20document.createElement(%22div%22)%3B%0AlogGroup.className%20%3D%20%22lgp%22%3B%0Avar%20logBtn%20%3D%20document.createElement(%22button%22)%3B%0AlogBtn.type%20%3D%20%22button%22%3B%0AlogBtn.className%20%3D%20%22sg%22%3B%0AlogBtn.setAttribute(%22aria-expanded%22%2C%20%22false%22)%3B%0Avar%20logWord%20%3D%20document.createElement(%22b%22)%3B%0AlogWord.textContent%20%3D%20%22Log%22%3B%0Aicon(logBtn%2C%2016%2C%20%22M4%201.5h8v13H4zM6.5%205h3M6.5%208h3M6.5%2011h2%22%2C%201.6)%3B%0AlogBtn.appendChild(logWord)%3B%0Avar%20logSum%20%3D%20document.createElement(%22span%22)%3B%0AlogSum.className%20%3D%20%22ls%22%3B%0Avar%20logBad%20%3D%20document.createElement(%22span%22)%3B%0AlogBad.className%20%3D%20%22bg%22%3B%0Avar%20logInfo%20%3D%20document.createElement(%22span%22)%3B%0AlogInfo.appendChild(logSum)%3B%0AlogBtn.appendChild(logInfo)%3B%0AlogBtn.appendChild(logBad)%3B%0AlogBtn.appendChild(document.createElement(%22i%22))%3B%0AlogGroup.appendChild(logBtn)%3B%0Avar%20logBody%20%3D%20document.createElement(%22div%22)%3B%0AlogBody.className%20%3D%20%22lbd%22%3B%0AlogBody.hidden%20%3D%20true%3B%0AlogGroup.appendChild(logBody)%3B%0Avar%20logTop%20%3D%20document.createElement(%22div%22)%3B%0AlogTop.className%20%3D%20%22lr%20lrt%22%3B%0AlogBody.appendChild(logTop)%3B%0Avar%20logChecked%20%3D%20document.createElement(%22p%22)%3B%0AlogChecked.className%20%3D%20%22lck%22%3B%0AlogChecked.hidden%20%3D%20true%3B%0AlogBody.appendChild(logChecked)%3B%0Afilters(logBody%2C%20document)%3B%0AwcagBox(logBody%2C%20document)%3B%0Avar%20logList%20%3D%20document.createElement(%22ul%22)%3B%0AlogList.className%20%3D%20%22ll%22%3B%0AlogBody.appendChild(logList)%3B%0Avar%20logRow%20%3D%20document.createElement(%22div%22)%3B%0AlogRow.className%20%3D%20%22lr%20lb2%22%3B%0AlogBody.appendChild(logRow)%3B%0Avar%20copyBtn%20%3D%20lbtn(%22kl%22%2C%20%22Copy%20log%22%2C%20logRow)%3B%0AcopyBtn.insertBefore(icon(copyBtn%2C%2016%2C%20COPY_ICON%2C%201.6)%2C%20copyBtn.firstChild)%3B%0AcopyBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(copyBtn%2C%20window%2C%20logText()%2C%20%22Copy%20log%22)%3B%20%7D)%3B%0Avar%20aiLog%20%3D%20lbtn(%22ka%22%2C%20%22Copy%20for%20AI%22%2C%20logRow)%3B%0AaiLog.insertBefore(icon(aiLog%2C%2016%2C%20AI_ICON%2C%201.6)%2C%20aiLog.firstChild)%3B%0AaiLog.addEventListener(%22click%22%2C%20function%20()%20%7B%20copyIt(aiLog%2C%20window%2C%20aiText()%2C%20%22Copy%20for%20AI%22)%3B%20%7D)%3B%0Afunction%20newTabBtn(parent)%20%7B%0A%20%20var%20b%20%3D%20lbtn(%22lnt%22%2C%20%22%22%2C%20parent)%3B%0A%20%20icon(b%2C%2014%2C%20%22M9%202.5h4.5V7M13.5%202.5L7.5%208.5M12%209.5v4h-9.5v-9.5h4%22%2C%201.6)%3B%0A%20%20b.appendChild(document.createTextNode(%22Open%20log%20in%20new%20tab%22))%3B%0A%20%20b.addEventListener(%22click%22%2C%20openTab)%3B%0A%20%20return%20b%3B%0A%7D%0AnewTabBtn(logTop)%3B%0Avar%20logEnd%20%3D%20document.createElement(%22div%22)%3B%0AlogEnd.className%20%3D%20%22lr%22%3B%0AlogBody.insertBefore(logEnd%2C%20logRow.nextSibling)%3B%0AnewTabBtn(logEnd)%3B%0Avar%20tabMsg%20%3D%20document.createElement(%22p%22)%3B%0AtabMsg.className%20%3D%20%22lm%22%3B%0AtabMsg.textContent%20%3D%20%22The%20browser%20blocked%20the%20new%20tab.%20Allow%20pop-ups%20for%20this%20site%20and%20try%20again.%22%3B%0AtabMsg.hidden%20%3D%20true%3B%0AlogBody.insertBefore(tabMsg%2C%20logChecked)%3B%0Avar%20logAway%20%3D%20document.createElement(%22div%22)%3B%0AlogAway.className%20%3D%20%22la%22%3B%0AlogAway.hidden%20%3D%20true%3B%0Avar%20awayText%20%3D%20document.createElement(%22p%22)%3B%0AawayText.textContent%20%3D%20%22The%20log%20is%20open%20in%20a%20new%20tab.%22%3B%0AlogAway.appendChild(awayText)%3B%0Avar%20awayRow%20%3D%20document.createElement(%22div%22)%3B%0AawayRow.className%20%3D%20%22lr%22%3B%0AlogAway.appendChild(awayRow)%3B%0Albtn(%22lo%22%2C%20%22Show%20it%22%2C%20awayRow).addEventListener(%22click%22%2C%20function%20()%20%7B%20if%20(tabOpen())%20logTab.focus()%3B%20%7D)%3B%0Albtn(%22lo%22%2C%20%22Put%20it%20back%22%2C%20awayRow).addEventListener(%22click%22%2C%20putBack)%3B%0AlogGroup.appendChild(logAway)%3B%0AlogBtn.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20if%20(tabOpen())%20return%20logTab.focus()%3B%0A%20%20logOpen%20%3D%20!logOpen%3B%0A%20%20logDraw()%3B%0A%20%20if%20(!logOpen)%20return%3B%0A%20%20var%20gr%20%3D%20logGroup.getBoundingClientRect()%2C%20pr%20%3D%20panel.getBoundingClientRect()%3B%0A%20%20if%20(gr.bottom%20%3E%20pr.bottom)%20panel.scrollTop%20%2B%3D%20Math.min(gr.bottom%20-%20pr.bottom%2C%20gr.top%20-%20pr.top)%3B%0A%7D)%3B%0Atray.insertBefore(logGroup%2C%20tray.firstChild)%3B%0AlogGroup.className%20%3D%20%22lgp%20sec%22%3B%0A%5B%5BlegendBtn%2C%20legend%5D%2C%20%5BkeysBtn%2C%20keysBox%5D%2C%20%5Bgear%2C%20settings%5D%5D.forEach(function%20(p)%20%7B%0A%20%20var%20w%20%3D%20document.createElement(%22div%22)%3B%0A%20%20w.className%20%3D%20%22sec%22%3B%0A%20%20tray.insertBefore(w%2C%20p%5B0%5D)%3B%0A%20%20w.appendChild(p%5B0%5D)%3B%0A%20%20w.appendChild(p%5B1%5D)%3B%0A%7D)%3B%0A%5BlogBtn%2C%20legendBtn%2C%20keysBtn%2C%20gear%5D.forEach(function%20(b)%20%7B%0A%20%20var%20g%20%3D%20b.querySelector(%22svg%22)%2C%20t%20%3D%20document.createElement(%22span%22)%3B%0A%20%20t.className%20%3D%20%22ic%22%3B%0A%20%20b.insertBefore(t%2C%20g)%3B%0A%20%20t.appendChild(g)%3B%0A%7D)%3B%0AwcagSync()%3B%0AlogSummary()%3B%0Aroot.appendChild(panel)%3B%0AskipPanel()%3B%0Avar%20closed%20%3D%20false%3B%0Afunction%20place()%20%7B%0A%20%20if%20(closed)%20return%3B%0A%20%20var%20m%20%3D%20modal()%2C%20to%20%3D%20m%20%7C%7C%20document.documentElement%3B%0A%20%20if%20(host.parentNode%20!%3D%3D%20to)%20to.appendChild(host)%3B%0A%20%20var%20want%20%3D%20%7B%20position%3A%20m%20%3F%20%22fixed%22%20%3A%20%22absolute%22%2C%20left%3A%20m%20%3F%20-scrollX%20%2B%20%22px%22%20%3A%20%220px%22%2C%20top%3A%20m%20%3F%20-scrollY%20%2B%20%22px%22%20%3A%20%220px%22%20%7D%3B%0A%20%20for%20(var%20k%20in%20want)%20if%20(host.style%5Bk%5D%20!%3D%3D%20want%5Bk%5D)%20host.style%5Bk%5D%20%3D%20want%5Bk%5D%3B%0A%7D%0Aplace()%3B%0A%0Afunction%20el(name%2C%20attrs%2C%20parent)%20%7B%0A%20%20var%20n%20%3D%20document.createElementNS(NS%2C%20name)%3B%0A%20%20for%20(var%20k%20in%20attrs)%20n.setAttribute(k%2C%20attrs%5Bk%5D)%3B%0A%20%20parent.appendChild(n)%3B%0A%20%20return%20n%3B%0A%7D%0Avar%20queued%20%3D%20false%2C%20onlyScreen%20%3D%20true%2C%20boxKey%20%3D%20%5B%5D%3B%0Avar%20current%20%3D%20-1%3B%0Avar%20pinned%20%3D%20new%20WeakMap()%3B%0Afunction%20isPinned(e)%20%7B%0A%20%20if%20(pinned.has(e))%20return%20pinned.get(e)%3B%0A%20%20var%20p%20%3D%20false%3B%0A%20%20for%20(var%20n%20%3D%20e%3B%20n%20%26%26%20n.nodeType%20%3D%3D%3D%201%3B%20n%20%3D%20n.parentElement%20%7C%7C%20(n.getRootNode()%20%26%26%20n.getRootNode().host))%20%7B%0A%20%20%20%20var%20pos%20%3D%20getComputedStyle(n).position%3B%0A%20%20%20%20if%20(pos%20%3D%3D%3D%20%22fixed%22%20%7C%7C%20pos%20%3D%3D%3D%20%22sticky%22)%20%7B%20p%20%3D%20true%3B%20break%3B%20%7D%0A%20%20%7D%0A%20%20pinned.set(e%2C%20p)%3B%0A%20%20return%20p%3B%0A%7D%0Afunction%20clear(g)%20%7B%20while%20(g.firstChild)%20g.removeChild(g.firstChild)%3B%20%7D%0Avar%20spotEl%20%3D%20null%3B%0Afunction%20lit(r)%20%7B%0A%20%20clear(spot)%3B%0A%20%20if%20(!light.checked)%20return%3B%0A%20%20var%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%2C%20d%20%3D%20%22M0%200H%22%20%2B%20W%20%2B%20%22V%22%20%2B%20H%20%2B%20%22H0Z%22%3B%0A%20%20if%20(r%20%26%26%20(r.width%20%7C%7C%20r.height))%20%7B%0A%20%20%20%20var%20x0%20%3D%20r.left%20-%206%2C%20y0%20%3D%20r.top%20-%206%2C%20x1%20%3D%20r.right%20%2B%206%2C%20y1%20%3D%20r.bottom%20%2B%206%2C%20k%20%3D%20Math.min(8%2C%20(x1%20-%20x0)%20%2F%202%2C%20(y1%20-%20y0)%20%2F%202)%3B%0A%20%20%20%20d%20%2B%3D%20%22M%22%20%2B%20(x0%20%2B%20k)%20%2B%20%22%20%22%20%2B%20y0%20%2B%20%22H%22%20%2B%20(x1%20-%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20x1%20%2B%20%22%20%22%20%2B%20(y0%20%2B%20k)%20%2B%20%22V%22%20%2B%20(y1%20-%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20(x1%20-%20k)%20%2B%20%22%20%22%20%2B%20y1%20%2B%20%22H%22%20%2B%20(x0%20%2B%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20x0%20%2B%20%22%20%22%20%2B%20(y1%20-%20k)%20%2B%20%22V%22%20%2B%20(y0%20%2B%20k)%20%2B%20%22A%22%20%2B%20k%20%2B%20%22%20%22%20%2B%20k%20%2B%20%22%200%200%201%20%22%20%2B%20(x0%20%2B%20k)%20%2B%20%22%20%22%20%2B%20y0%20%2B%20%22Z%22%3B%0A%20%20%7D%0A%20%20el(%22path%22%2C%20%7B%20d%3A%20d%2C%20fill%3A%20%22rgba(15%2C12%2C10%2C.72)%22%2C%20%22fill-rule%22%3A%20%22evenodd%22%20%7D%2C%20spot)%3B%0A%7D%0Afunction%20box(m%2C%20r%2C%20layer)%20%7B%0A%20%20if%20(m%20%3D%3D%3D%20shownEl)%20%7B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20r.left%20-%206%2C%20y%3A%20r.top%20-%206%2C%20width%3A%20r.width%20%2B%2012%2C%20height%3A%20r.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%208%2C%20rx%3A%206%20%7D%2C%20layer)%3B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20r.left%20-%206%2C%20y%3A%20r.top%20-%206%2C%20width%3A%20r.width%20%2B%2012%2C%20height%3A%20r.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%204%2C%20rx%3A%206%20%7D%2C%20layer)%3B%0A%20%20%7D%0A%20%20el(%22rect%22%2C%20%7B%20x%3A%20r.left%2C%20y%3A%20r.top%2C%20width%3A%20r.width%2C%20height%3A%20r.height%2C%20fill%3A%20%22rgba(208%2C16%2C58%2C.12)%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-dasharray%22%3A%20%227%205%22%2C%20rx%3A%203%20%7D%2C%20layer)%3B%0A%7D%0Afunction%20trailLine(pts%2C%20layer)%20%7B%0A%20%20if%20(pts.length%20%3C%202)%20return%3B%0A%20%20var%20p%20%3D%20pts.map(function%20(q)%20%7B%20return%20q%5B0%5D%20%2B%20%22%2C%22%20%2B%20q%5B1%5D%3B%20%7D).join(%22%20%22)%3B%0A%20%20el(%22polyline%22%2C%20%7B%20points%3A%20p%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%206%2C%20%22stroke-linejoin%22%3A%20%22round%22%2C%20%22stroke-linecap%22%3A%20%22round%22%2C%20opacity%3A%200.9%20%7D%2C%20layer)%3B%0A%20%20el(%22polyline%22%2C%20%7B%20points%3A%20p%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23ff8f57%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-linejoin%22%3A%20%22round%22%2C%20%22stroke-linecap%22%3A%20%22round%22%20%7D%2C%20layer)%3B%0A%7D%0Afunction%20dotsIn(list%2C%20layer)%20%7B%0A%20%20list.sort(function%20(a%2C%20b)%20%7B%20return%20(a%5B2%5D%20-%201%20%3D%3D%3D%20current)%20-%20(b%5B2%5D%20-%201%20%3D%3D%3D%20current)%3B%20%7D)%3B%0A%20%20list.forEach(function%20(d)%20%7B%0A%20%20%20%20var%20big%20%3D%20d%5B2%5D%20%3E%2099%2C%20on%20%3D%20d%5B2%5D%20-%201%20%3D%3D%3D%20current%3B%0A%20%20%20%20var%20g%20%3D%20el(%22g%22%2C%20%7B%20class%3A%20%22o%22%2C%20%22data-i%22%3A%20d%5B2%5D%20-%201%20%7D%2C%20layer)%2C%20ds%20%3D%20stops%5Bd%5B2%5D%20-%201%5D%3B%0A%20%20%20%20if%20(ds)%20el(%22title%22%2C%20%7B%7D%2C%20g).textContent%20%3D%20d%5B2%5D%20%2B%20%22%20%5Cu00b7%20%22%20%2B%20roleOf(ds)%20%2B%20%22%20%5Cu00b7%20%22%20%2B%20(nameOf.get(ds)%20%7C%7C%20%22no%20name%22)%3B%0A%20%20%20%20if%20(on)%20el(%22circle%22%2C%20%7B%20cx%3A%20d%5B0%5D%2C%20cy%3A%20d%5B1%5D%2C%20r%3A%20big%20%3F%2019%20%3A%2017%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23ff8f57%22%2C%20%22stroke-width%22%3A%204%20%7D%2C%20g)%3B%0A%20%20%20%20if%20(d%5B3%5D%20%26%26%20!on)%20el(%22circle%22%2C%20%7B%20cx%3A%20d%5B0%5D%2C%20cy%3A%20d%5B1%5D%2C%20r%3A%20big%20%3F%2014%20%3A%2012%2C%20fill%3A%20%22%23fff%22%2C%20stroke%3A%20%22%231a1612%22%2C%20%22stroke-width%22%3A%202%2C%20%22stroke-dasharray%22%3A%20%224%203%22%20%7D%2C%20g)%3B%0A%20%20%20%20else%20el(%22circle%22%2C%20%7B%20cx%3A%20d%5B0%5D%2C%20cy%3A%20d%5B1%5D%2C%20r%3A%20big%20%3F%2014%20%3A%2012%2C%20fill%3A%20on%20%3F%20%22%23c2410c%22%20%3A%20%22%231a1612%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%202%20%7D%2C%20g)%3B%0A%20%20%20%20var%20t%20%3D%20el(%22text%22%2C%20%7B%20x%3A%20d%5B0%5D%2C%20y%3A%20d%5B1%5D%20%2B%200.5%2C%20fill%3A%20d%5B3%5D%20%26%26%20!on%20%3F%20%22%231a1612%22%20%3A%20%22%23fff%22%2C%20%22font-size%22%3A%20big%20%3F%2010%20%3A%2011%2C%20%22font-weight%22%3A%20700%2C%20%22font-family%22%3A%20%22system-ui%2Csans-serif%22%2C%20%22text-anchor%22%3A%20%22middle%22%2C%20%22dominant-baseline%22%3A%20%22middle%22%20%7D%2C%20g)%3B%0A%20%20%20%20t.textContent%20%3D%20d%5B2%5D%3B%0A%20%20%7D)%3B%0A%7D%0Afunction%20shortLines(pts%2C%20sx%2C%20sy)%20%7B%0A%20%20var%20W%20%3D%20innerWidth%2C%20H%20%3D%20innerHeight%2C%20MAX%20%3D%20100%3B%0A%20%20var%20v%20%3D%20pts.map(function%20(p)%20%7B%20return%20p%5B2%5D%20%3F%20%5Bp%5B0%5D%2C%20p%5B1%5D%5D%20%3A%20%5Bp%5B0%5D%20-%20sx%2C%20p%5B1%5D%20-%20sy%5D%3B%20%7D)%3B%0A%20%20function%20on(p)%20%7B%20return%20p%5B0%5D%20%3E%3D%200%20%26%26%20p%5B0%5D%20%3C%3D%20W%20%26%26%20p%5B1%5D%20%3E%3D%200%20%26%26%20p%5B1%5D%20%3C%3D%20H%3B%20%7D%0A%20%20function%20arrow(from%2C%20to%2C%20L)%20%7B%0A%20%20%20%20var%20dx%20%3D%20to%5B0%5D%20-%20from%5B0%5D%2C%20dy%20%3D%20to%5B1%5D%20-%20from%5B1%5D%2C%20len%20%3D%20Math.sqrt(dx%20*%20dx%20%2B%20dy%20*%20dy)%20%7C%7C%201%3B%0A%20%20%20%20var%20ux%20%3D%20dx%20%2F%20len%2C%20uy%20%3D%20dy%20%2F%20len%3B%0A%20%20%20%20var%20tip%20%3D%20%5Bfrom%5B0%5D%20%2B%20ux%20*%20L%2C%20from%5B1%5D%20%2B%20uy%20*%20L%5D%3B%0A%20%20%20%20trailLine(%5Bfrom%2C%20tip%5D%2C%20svg)%3B%0A%20%20%20%20var%20pts3%20%3D%20%5B%5Btip%5B0%5D%20%2B%20ux%20*%206%2C%20tip%5B1%5D%20%2B%20uy%20*%206%5D%2C%20%5Btip%5B0%5D%20-%20ux%20*%209%20%2B%20uy%20*%209%2C%20tip%5B1%5D%20-%20uy%20*%209%20-%20ux%20*%209%5D%2C%20%5Btip%5B0%5D%20-%20ux%20*%209%20-%20uy%20*%209%2C%20tip%5B1%5D%20-%20uy%20*%209%20%2B%20ux%20*%209%5D%5D%3B%0A%20%20%20%20el(%22polygon%22%2C%20%7B%20points%3A%20pts3.map(function%20(q)%20%7B%20return%20q%5B0%5D%20%2B%20%22%2C%22%20%2B%20q%5B1%5D%3B%20%7D).join(%22%20%22)%2C%20fill%3A%20%22%23ff8f57%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%202%2C%20%22stroke-linejoin%22%3A%20%22round%22%20%7D%2C%20svg)%3B%0A%20%20%7D%0A%20%20for%20(var%20k%20%3D%201%3B%20k%20%3C%20v.length%3B%20k%2B%2B)%20%7B%0A%20%20%20%20var%20a%20%3D%20v%5Bk%20-%201%5D%2C%20b%20%3D%20v%5Bk%5D%2C%20ia%20%3D%20on(a)%2C%20ib%20%3D%20on(b)%3B%0A%20%20%20%20var%20len%20%3D%20Math.sqrt((b%5B0%5D%20-%20a%5B0%5D)%20*%20(b%5B0%5D%20-%20a%5B0%5D)%20%2B%20(b%5B1%5D%20-%20a%5B1%5D)%20*%20(b%5B1%5D%20-%20a%5B1%5D))%3B%0A%20%20%20%20if%20(ia%20%26%26%20ib%20%26%26%20len%20%3C%3D%20MAX)%20trailLine(%5Ba%2C%20b%5D%2C%20svg)%3B%0A%20%20%20%20else%20if%20(ia%20%26%26%20ib)%20%7B%0A%20%20%20%20%20%20var%20L%20%3D%20Math.min(MAX%20-%206%2C%20len%20%2F%202%20-%2012)%3B%0A%20%20%20%20%20%20arrow(a%2C%20b%2C%20L)%3B%0A%20%20%20%20%20%20arrow(b%2C%20a%2C%20L)%3B%0A%20%20%20%20%7D%0A%20%20%20%20else%20if%20(ia%20%7C%7C%20ib)%20arrow(ia%20%3F%20a%20%3A%20b%2C%20ia%20%3F%20b%20%3A%20a%2C%20Math.min(MAX%20-%206%2C%20len))%3B%0A%20%20%7D%0A%7D%0Afunction%20draw()%20%7B%0A%20%20queued%20%3D%20false%3B%0A%20%20var%20page%20%3D%20!onlyScreen%3B%0A%20%20onlyScreen%20%3D%20true%3B%0A%20%20var%20sx%20%3D%20scrollX%2C%20sy%20%3D%20scrollY%3B%0A%20%20var%20last%20%3D%20Math.max(Math.ceil(stops.length%20%2F%20PAGE)%20-%201%2C%200)%3B%0A%20%20if%20(win%20%3E%20last)%20win%20%3D%20last%3B%0A%20%20var%20lo%20%3D%20paged()%20%3F%20win%20*%20PAGE%20%3A%200%2C%20hi%20%3D%20paged()%20%3F%20Math.min(lo%20%2B%20PAGE%2C%20stops.length)%20%3A%20stops.length%3B%0A%20%20var%20red%20%3D%20%5B%5D%2C%20at%20%3D%20%5B%5D%3B%0A%20%20var%20edges%20%3D%20%7B%7D%3B%0A%20%20missed.concat(hovers%2C%20noRing.filter(live)%2C%20ghosts.filter(live)).forEach(function%20(m)%20%7B%0A%20%20%20%20var%20p%20%3D%20isPinned(m)%2C%20r%20%3D%20m.getBoundingClientRect()%2C%20ed%20%3D%20ghostOf.get(m)%20%3D%3D%3D%20%22off%22%20%3F%20(r.right%20%3C%3D%200%20%3F%20%22l%22%20%3A%20r.left%20%3E%3D%20innerWidth%20%3F%20%22r%22%20%3A%20r.bottom%20%3C%3D%200%20%3F%20%22t%22%20%3A%20r.top%20%3E%3D%20innerHeight%20%3F%20%22b%22%20%3A%20%22%22)%20%3A%20%22%22%3B%0A%20%20%20%20if%20(ed)%20(edges%5Bed%5D%20%3D%20edges%5Bed%5D%20%7C%7C%20%5B%5D).push(m)%3B%0A%20%20%20%20else%20if%20(p%20%7C%7C%20page)%20red.push(%5Bm%2C%20r%2C%20p%5D)%3B%0A%20%20%7D)%3B%0A%20%20for%20(var%20i%20%3D%20lo%3B%20i%20%3C%20hi%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20sr%20%3D%20stops%5Bi%5D.getBoundingClientRect()%2C%20st%20%3D%20sr.width%20%3C%202%20%26%26%20sr.height%20%3C%202%3B%0A%20%20%20%20at.push(%5Bsr%2C%20st%2C%20st%20%7C%7C%20isPinned(stops%5Bi%5D)%5D)%3B%0A%20%20%7D%0A%20%20var%20fr%20%3D%20shownEl%20%26%26%20hovers.indexOf(shownEl)%20%3C%200%20%26%26%20forced.indexOf(shownEl)%20%3E%3D%200%20%3F%20%5BshownEl.getBoundingClientRect()%2C%20isPinned(shownEl)%5D%20%3A%20null%3B%0A%20%20var%20lr%20%3D%20light.checked%20%26%26%20spotEl%20%26%26%20spotEl.isConnected%20%3F%20spotEl.getBoundingClientRect()%20%3A%20null%3B%0A%20%20var%20key%20%3D%20%5BshownEl%2C%20skipBad%20%26%26%20skipBad.why%5D%3B%0A%20%20red.forEach(function%20(x)%20%7B%20if%20(!x%5B2%5D)%20key.push(x%5B0%5D%2C%20x%5B1%5D.left%20%2B%20sx%2C%20x%5B1%5D.top%20%2B%20sy%2C%20x%5B1%5D.width%2C%20x%5B1%5D.height)%3B%20%7D)%3B%0A%20%20if%20(fr%20%26%26%20!fr%5B1%5D)%20key.push(fr%5B0%5D.left%20%2B%20sx%2C%20fr%5B0%5D.top%20%2B%20sy%2C%20fr%5B0%5D.width%2C%20fr%5B0%5D.height)%3B%0A%20%20var%20keep%20%3D%20page%20%26%26%20same(key%2C%20boxKey)%3B%0A%20%20if%20(page)%20boxKey%20%3D%20key%3B%0A%20%20clear(svg)%3B%0A%20%20clear(dot)%3B%0A%20%20clear(under)%3B%0A%20%20lit(lr)%3B%0A%20%20if%20(page)%20%7B%0A%20%20%20%20clear(svgPg)%3B%0A%20%20%20%20clear(dotPg)%3B%0A%20%20%20%20if%20(!keep)%20clear(underPg)%3B%0A%20%20%7D%0A%20%20red.forEach(function%20(x)%20%7B%0A%20%20%20%20var%20m%20%3D%20x%5B0%5D%2C%20r%20%3D%20x%5B1%5D%3B%0A%20%20%20%20if%20(x%5B2%5D)%20box(m%2C%20r%2C%20under)%3B%0A%20%20%20%20else%20if%20(!keep)%20box(m%2C%20%7B%20left%3A%20r.left%20%2B%20sx%2C%20top%3A%20r.top%20%2B%20sy%2C%20width%3A%20r.width%2C%20height%3A%20r.height%20%7D%2C%20underPg)%3B%0A%20%20%7D)%3B%0A%20%20Object.keys(edges).forEach(function%20(ed)%20%7B%0A%20%20%20%20var%20vw%20%3D%20Math.min(innerWidth%2C%20document.documentElement.clientWidth%20%7C%7C%20innerWidth)%2C%20vh%20%3D%20Math.min(innerHeight%2C%20document.documentElement.clientHeight%20%7C%7C%20innerHeight)%2C%20v%20%3D%20ed%20%3D%3D%3D%20%22l%22%20%7C%7C%20ed%20%3D%3D%3D%20%22r%22%2C%20max%20%3D%20v%20%3F%20vh%20%3A%20vw%2C%20lo%20%3D%20max%2C%20hi%20%3D%200%3B%0A%20%20%20%20edges%5Bed%5D.forEach(function%20(m)%20%7B%0A%20%20%20%20%20%20var%20r%20%3D%20m.getBoundingClientRect()%3B%0A%20%20%20%20%20%20lo%20%3D%20Math.min(lo%2C%20v%20%3F%20r.top%20%3A%20r.left)%3B%0A%20%20%20%20%20%20hi%20%3D%20Math.max(hi%2C%20v%20%3F%20r.bottom%20%3A%20r.right)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%20%20lo%20%3D%20Math.max(4%2C%20Math.min(lo%2C%20max%20-%20144))%3B%0A%20%20%20%20hi%20%3D%20Math.min(max%20-%204%2C%20Math.max(hi%2C%20lo%20%2B%20140))%3B%0A%20%20%20%20var%20x%20%3D%20v%20%3F%20(ed%20%3D%3D%3D%20%22r%22%20%3F%20vw%20-%2036%20%3A%204)%20%3A%20lo%2C%20y%20%3D%20v%20%3F%20lo%20%3A%20ed%20%3D%3D%3D%20%22b%22%20%3F%20vh%20-%2036%20%3A%204%2C%20w%20%3D%20v%20%3F%2032%20%3A%20hi%20-%20lo%2C%20h%20%3D%20v%20%3F%20hi%20-%20lo%20%3A%2032%3B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20x%2C%20y%3A%20y%2C%20width%3A%20w%2C%20height%3A%20h%2C%20rx%3A%206%2C%20fill%3A%20%22rgba(208%2C16%2C58%2C.12)%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-dasharray%22%3A%20%227%205%22%20%7D%2C%20under)%3B%0A%20%20%20%20el(%22path%22%2C%20%7B%20d%3A%20%7B%20r%3A%20%22M-5%20-9l10%209-10%209%22%2C%20l%3A%20%22M5%20-9l-10%209%2010%209%22%2C%20t%3A%20%22M-9%205l9-10%209%2010%22%2C%20b%3A%20%22M-9%20-5l9%2010%209-10%22%20%7D%5Bed%5D%2C%20transform%3A%20%22translate(%22%20%2B%20(x%20%2B%20(v%20%3F%2016%20%3A%2022))%20%2B%20%22%20%22%20%2B%20(y%20%2B%20(v%20%3F%2022%20%3A%2016))%20%2B%20%22)%22%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-linecap%22%3A%20%22round%22%2C%20%22stroke-linejoin%22%3A%20%22round%22%20%7D%2C%20under)%3B%0A%20%20%20%20var%20t%20%3D%20el(%22text%22%2C%20%7B%20x%3A%200%2C%20y%3A%200%2C%20transform%3A%20%22translate(%22%20%2B%20(x%20%2B%20w%20%2F%202)%20%2B%20%22%20%22%20%2B%20(y%20%2B%20h%20%2F%202)%20%2B%20%22)%22%20%2B%20(v%20%3F%20%22%20rotate(-90)%22%20%3A%20%22%22)%2C%20fill%3A%20%22%23d0103a%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%203%2C%20%22paint-order%22%3A%20%22stroke%22%2C%20%22font-size%22%3A%2011%2C%20%22font-weight%22%3A%20700%2C%20%22font-family%22%3A%20%22system-ui%2Csans-serif%22%2C%20%22text-anchor%22%3A%20%22middle%22%2C%20%22dominant-baseline%22%3A%20%22middle%22%20%7D%2C%20under)%3B%0A%20%20%20%20t.textContent%20%3D%20runs(edges%5Bed%5D).map(span).join(%22%2C%20%22)%3B%0A%20%20%7D)%3B%0A%20%20costGoals.concat(pickAt%20%3F%20%5B%7B%20el%3A%20pickAt%2C%20pick%3A%201%20%7D%5D%20%3A%20%5B%5D).forEach(function%20(g)%20%7B%0A%20%20%20%20if%20(!g.el.isConnected)%20return%3B%0A%20%20%20%20var%20q%20%3D%20g.el.getBoundingClientRect()%2C%20t%20%3D%20g.pick%20%3F%20%22Click%20to%20make%20%22%20%2B%20label(g.el)%20%2B%20%22%20a%20goal%22%20%3A%20g.name%20%2B%20%22%3A%20%22%20%2B%20g.presses%3B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20q.left%20-%204%2C%20y%3A%20q.top%20-%204%2C%20width%3A%20q.width%20%2B%208%2C%20height%3A%20q.height%20%2B%208%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23c2410c%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-dasharray%22%3A%20g.pick%20%3F%20%227%205%22%20%3A%20%22%22%2C%20rx%3A%206%20%7D%2C%20under)%3B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20q.right%20%2B%2010%2C%20y%3A%20q.top%20%2B%20q.height%20%2F%202%20-%2011%2C%20width%3A%20t.length%20*%206.6%20%2B%2016%2C%20height%3A%2022%2C%20fill%3A%20%22%23c2410c%22%2C%20rx%3A%2011%20%7D%2C%20under)%3B%0A%20%20%20%20el(%22text%22%2C%20%7B%20x%3A%20q.right%20%2B%2018%2C%20y%3A%20q.top%20%2B%20q.height%20%2F%202%20%2B%204%2C%20fill%3A%20%22%23fff%22%2C%20%22font-size%22%3A%2012%2C%20%22font-weight%22%3A%20700%2C%20%22font-family%22%3A%20%22system-ui%2Csans-serif%22%20%7D%2C%20under).textContent%20%3D%20t%3B%0A%20%20%7D)%3B%0A%20%20if%20(tint%20%26%26%20mapOn.checked)%20tint%5B0%5D.filter(function%20(m)%20%7B%20return%20m.isConnected%3B%20%7D).forEach(function%20(m)%20%7B%0A%20%20%20%20var%20q%20%3D%20m.getBoundingClientRect()%3B%0A%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20q.left%2C%20y%3A%20q.top%2C%20width%3A%20q.width%2C%20height%3A%20q.height%2C%20fill%3A%20tint%5B1%5D%2C%20%22fill-opacity%22%3A%200.12%2C%20stroke%3A%20tint%5B1%5D%2C%20%22stroke-width%22%3A%202%2C%20rx%3A%204%20%7D%2C%20under)%3B%0A%20%20%7D)%3B%0A%20%20if%20(skipBad%20%26%26%20skipBad.link.isConnected%20%26%26%20page%20%26%26%20!keep)%20%7B%0A%20%20%20%20var%20ka%20%3D%20skipBad.link.getBoundingClientRect()%2C%20kt%20%3D%20skipBad.to%20%26%26%20shown(skipBad.to)%20%3F%20skipBad.to%20%3A%20mainRegion()%2C%20kb%20%3D%20kt%20%3F%20kt.getBoundingClientRect()%20%3A%20null%3B%0A%20%20%20%20var%20ax%20%3D%20Math.max(ka.left%20%2B%20sx%2C%2013)%20%2B%2014%2C%20ay%20%3D%20Math.max(ka.bottom%20%2B%20sy%2C%2026)%20%2B%204%2C%20bx%20%3D%20kb%20%3F%20kb.left%20%2B%20sx%20%2B%2016%20%3A%20ax%20%2B%20160%2C%20by%20%3D%20kb%20%3F%20Math.max(kb.top%20%2B%20sy%20%2B%2016%2C%20ay%20%2B%2040)%20%3A%20ay%20%2B%2080%3B%0A%20%20%20%20el(%22path%22%2C%20%7B%20d%3A%20%22M%22%20%2B%20ax%20%2B%20%22%20%22%20%2B%20ay%20%2B%20%22L%22%20%2B%20bx%20%2B%20%22%20%22%20%2B%20by%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-dasharray%22%3A%20%227%205%22%2C%20%22stroke-linecap%22%3A%20%22round%22%20%7D%2C%20underPg)%3B%0A%20%20%20%20el(%22circle%22%2C%20%7B%20cx%3A%20bx%2C%20cy%3A%20by%2C%20r%3A%2011%2C%20fill%3A%20%22%23fff%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%203%20%7D%2C%20underPg)%3B%0A%20%20%20%20el(%22path%22%2C%20%7B%20d%3A%20%22M%22%20%2B%20(bx%20-%205)%20%2B%20%22%20%22%20%2B%20(by%20-%205)%20%2B%20%22l10%2010m0%20-10l-10%2010%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%203%2C%20%22stroke-linecap%22%3A%20%22round%22%20%7D%2C%20underPg)%3B%0A%20%20%7D%0A%20%20if%20(fr)%20%7B%0A%20%20%20%20var%20hr%20%3D%20fr%5B0%5D%2C%20hp%20%3D%20fr%5B1%5D%3B%0A%20%20%20%20if%20(hp%20%7C%7C%20(page%20%26%26%20!keep))%20%7B%0A%20%20%20%20%20%20var%20hx%20%3D%20hp%20%3F%20hr.left%20%3A%20hr.left%20%2B%20sx%2C%20hy%20%3D%20hp%20%3F%20hr.top%20%3A%20hr.top%20%2B%20sy%2C%20hl%20%3D%20hp%20%3F%20under%20%3A%20underPg%3B%0A%20%20%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20hx%20-%206%2C%20y%3A%20hy%20-%206%2C%20width%3A%20hr.width%20%2B%2012%2C%20height%3A%20hr.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23fff%22%2C%20%22stroke-width%22%3A%208%2C%20rx%3A%206%20%7D%2C%20hl)%3B%0A%20%20%20%20%20%20el(%22rect%22%2C%20%7B%20x%3A%20hx%20-%206%2C%20y%3A%20hy%20-%206%2C%20width%3A%20hr.width%20%2B%2012%2C%20height%3A%20hr.height%20%2B%2012%2C%20fill%3A%20%22none%22%2C%20stroke%3A%20%22%23d0103a%22%2C%20%22stroke-width%22%3A%204%2C%20rx%3A%206%20%7D%2C%20hl)%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20hid%20%3D%200%2C%20placedPg%20%3D%20%5B%5D%2C%20placedSc%20%3D%20%5B%5D%2C%20pts%20%3D%20%5B%5D%2C%20dotsPg%20%3D%20%5B%5D%2C%20dotsSc%20%3D%20%5B%5D%3B%0A%20%20var%20big%20%3D%20stops.length%20%3E%20PAGE%3B%0A%20%20group.style.display%20%3D%20big%20%3F%20%22%22%20%3A%20%22none%22%3B%0A%20%20pager.style.display%20%3D%20paged()%20%3F%20%22%22%20%3A%20%22none%22%3B%0A%20%20chunkBox.style.marginTop%20%3D%20paged()%20%3F%20%22%22%20%3A%20%220%22%3B%0A%20%20if%20(paged())%20%7B%0A%20%20%20%20pageText.textContent%20%3D%20%22Stops%20%22%20%2B%20(lo%20%2B%201)%20%2B%20%22%20to%20%22%20%2B%20hi%20%2B%20%22%20of%20%22%20%2B%20stops.length%3B%0A%20%20%20%20prevBtn.disabled%20%3D%20win%20%3D%3D%3D%200%3B%0A%20%20%20%20nextBtn.disabled%20%3D%20win%20%3D%3D%3D%20last%3B%0A%20%20%7D%0A%20%20stops.forEach(function%20(s%2C%20i)%20%7B%0A%20%20%20%20if%20(i%20%3C%20lo%20%7C%7C%20i%20%3E%3D%20hi)%20return%3B%0A%20%20%20%20var%20r%20%3D%20at%5Bi%20-%20lo%5D%5B0%5D%3B%0A%20%20%20%20var%20tiny%20%3D%20at%5Bi%20-%20lo%5D%5B1%5D%3B%0A%20%20%20%20var%20onScreen%20%3D%20at%5Bi%20-%20lo%5D%5B2%5D%3B%0A%20%20%20%20var%20cx%20%3D%20tiny%20%3F%2013%20%2B%20hid%2B%2B%20*%2030%20%3A%20onScreen%20%3F%20Math.max(r.left%20-%208%2C%2013)%20%3A%20Math.max(r.left%20%2B%20sx%20-%208%2C%2013)%3B%0A%20%20%20%20var%20cy%20%3D%20tiny%20%3F%2013%20%3A%20onScreen%20%3F%20Math.max(r.top%20-%208%2C%2013)%20%3A%20Math.max(r.top%20%2B%20sy%20-%208%2C%2013)%3B%0A%20%20%20%20var%20placed%20%3D%20onScreen%20%3F%20placedSc%20%3A%20placedPg%3B%0A%20%20%20%20for%20(var%20j%20%3D%20placed.length%20-%201%2C%20tries%20%3D%200%3B%20j%20%3E%3D%200%20%26%26%20tries%20%3C%2040%3B%20j--)%20%7B%0A%20%20%20%20%20%20if%20(Math.abs(placed%5Bj%5D%5B0%5D%20-%20cx)%20%3C%2026%20%26%26%20Math.abs(placed%5Bj%5D%5B1%5D%20-%20cy)%20%3C%2026)%20%7B%0A%20%20%20%20%20%20%20%20cx%20%3D%20placed%5Bj%5D%5B0%5D%20%2B%2028%3B%0A%20%20%20%20%20%20%20%20j%20%3D%20placed.length%3B%0A%20%20%20%20%20%20%20%20tries%2B%2B%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20placed.push(%5Bcx%2C%20cy%5D)%3B%0A%20%20%20%20pts.push(%5Bcx%2C%20cy%2C%20onScreen%5D)%3B%0A%20%20%20%20(onScreen%20%3F%20dotsSc%20%3A%20dotsPg).push(%5Bcx%2C%20cy%2C%20i%20%2B%201%2C%20tiny%5D)%3B%0A%20%20%7D)%3B%0A%20%20if%20(lines.checked%20%26%26%20!stub.checked)%20shortLines(pts%2C%20sx%2C%20sy)%3B%0A%20%20var%20run%20%3D%20%5B%5D%2C%20runPg%20%3D%20null%3B%0A%20%20function%20flush()%20%7B%0A%20%20%20%20if%20(runPg%20%3D%3D%3D%20null)%20return%3B%0A%20%20%20%20if%20(runPg)%20%7B%20if%20(page)%20trailLine(run%2C%20svgPg)%3B%20%7D%0A%20%20%20%20else%20trailLine(run%2C%20svg)%3B%0A%20%20%20%20run%20%3D%20%5B%5D%3B%0A%20%20%20%20runPg%20%3D%20null%3B%0A%20%20%7D%0A%20%20for%20(var%20k%20%3D%20lines.checked%20%26%26%20stub.checked%20%3F%201%20%3A%20pts.length%3B%20k%20%3C%20pts.length%3B%20k%2B%2B)%20%7B%0A%20%20%20%20var%20a%20%3D%20pts%5Bk%20-%201%5D%2C%20b%20%3D%20pts%5Bk%5D%2C%20both%20%3D%20!a%5B2%5D%20%26%26%20!b%5B2%5D%3B%0A%20%20%20%20if%20(runPg%20!%3D%3D%20both)%20%7B%0A%20%20%20%20%20%20flush()%3B%0A%20%20%20%20%20%20runPg%20%3D%20both%3B%0A%20%20%20%20%20%20run.push(both%20%7C%7C%20a%5B2%5D%20%3F%20%5Ba%5B0%5D%2C%20a%5B1%5D%5D%20%3A%20%5Ba%5B0%5D%20-%20sx%2C%20a%5B1%5D%20-%20sy%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20run.push(both%20%7C%7C%20b%5B2%5D%20%3F%20%5Bb%5B0%5D%2C%20b%5B1%5D%5D%20%3A%20%5Bb%5B0%5D%20-%20sx%2C%20b%5B1%5D%20-%20sy%5D)%3B%0A%20%20%7D%0A%20%20flush()%3B%0A%20%20if%20(page)%20dotsIn(dotsPg%2C%20dotPg)%3B%0A%20%20dotsIn(dotsSc%2C%20dot)%3B%0A%7D%0Afunction%20queue(screenOnly)%20%7B%0A%20%20if%20(screenOnly%20!%3D%3D%20true)%20onlyScreen%20%3D%20false%3B%0A%20%20if%20(!queued)%20%7B%20queued%20%3D%20true%3B%20requestAnimationFrame(draw)%3B%20%7D%0A%7D%0Avar%20timer%20%3D%200%2C%20idle%20%3D%200%2C%20nextScan%20%3D%200%2C%20settling%20%3D%20false%3B%0Afunction%20same(a%2C%20b)%20%7B%0A%20%20if%20(a.length%20!%3D%3D%20b.length)%20return%20false%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20a.length%3B%20i%2B%2B)%20if%20(a%5Bi%5D%20!%3D%3D%20b%5Bi%5D)%20return%20false%3B%0A%20%20return%20true%3B%0A%7D%0Afunction%20rescan()%20%7B%0A%20%20if%20(timer)%20clearTimeout(timer)%3B%0A%20%20if%20(idle%20%26%26%20window.cancelIdleCallback)%20cancelIdleCallback(idle)%3B%0A%20%20timer%20%3D%200%3B%0A%20%20idle%20%3D%200%3B%0A%20%20if%20(closed)%20return%3B%0A%20%20if%20(settling)%20return%20later()%3B%0A%20%20var%20t0%20%3D%20performance.now()%3B%0A%20%20place()%3B%0A%20%20pinned%20%3D%20new%20WeakMap()%3B%0A%20%20scan()%3B%0A%20%20var%20fa%20%3D%20deep()%3B%0A%20%20noOutline%20%3D%20null%3B%0A%20%20stops.forEach(function%20(x)%20%7B%20if%20(x%20!%3D%3D%20fa%20%26%26%20!restSig.has(x))%20rest(x)%3B%20%7D)%3B%0A%20%20skipCheck()%3B%0A%20%20if%20(!same(drawn%2C%20sig()))%20%7B%0A%20%20%20%20fill()%3B%0A%20%20%20%20scan()%3B%0A%20%20%20%20renderJumps()%3B%0A%20%20%20%20review()%3B%0A%20%20%7D%0A%20%20focus()%3B%0A%20%20var%20t1%20%3D%20performance.now()%3B%0A%20%20nextScan%20%3D%20t1%20%2B%20Math.max(500%2C%204%20*%20(t1%20-%20t0))%3B%0A%7D%0Avar%20due%20%3D%200%3B%0Afunction%20later(min)%20%7B%0A%20%20if%20(idle%20%7C%7C%20closed)%20return%3B%0A%20%20var%20wait%20%3D%20Math.max(min%20%7C%7C%20500%2C%20nextScan%20-%20performance.now())%3B%0A%20%20if%20(timer)%20%7B%0A%20%20%20%20if%20(performance.now()%20%2B%20wait%20%3E%3D%20due)%20return%3B%0A%20%20%20%20clearTimeout(timer)%3B%0A%20%20%7D%0A%20%20due%20%3D%20performance.now()%20%2B%20wait%3B%0A%20%20timer%20%3D%20setTimeout(function%20()%20%7B%0A%20%20%20%20timer%20%3D%200%3B%0A%20%20%20%20if%20(window.requestIdleCallback)%20idle%20%3D%20requestIdleCallback(rescan%2C%20%7B%20timeout%3A%201000%20%7D)%3B%0A%20%20%20%20else%20rescan()%3B%0A%20%20%7D%2C%20wait)%3B%0A%7D%0Avar%20LOUD%20%3D%20%2F%5E(tabindex%7Cdisabled%7Cinert%7Chref%7Crole%7Copen%7Chidden)%24%2F%3B%0Afunction%20matters(m)%20%7B%0A%20%20var%20t%20%3D%20m.target%3B%0A%20%20if%20(t%20%3D%3D%3D%20host%20%7C%7C%20host.contains(t))%20return%20false%3B%0A%20%20if%20(m.type%20%3D%3D%3D%20%22childList%22)%20%7B%0A%20%20%20%20var%20l%20%3D%20%5B%5D.concat(%5B%5D.slice.call(m.addedNodes)%2C%20%5B%5D.slice.call(m.removedNodes))%3B%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20l.length%3B%20i%2B%2B)%20if%20(l%5Bi%5D.nodeType%20%3D%3D%3D%201)%20return%20true%3B%0A%20%20%20%20return%20false%3B%0A%20%20%7D%0A%20%20if%20(LOUD.test(m.attributeName%20%7C%7C%20%22%22)%20%7C%7C%20t.nodeType%20!%3D%3D%201)%20return%20true%3B%0A%20%20if%20(stopSet.has(t)%20%7C%7C%20upSet.has(t)%20%7C%7C%20t.matches(FOCUSABLE)%20%7C%7C%20t.querySelector(FOCUSABLE))%20return%20true%3B%0A%20%20return%20missed.concat(hovers%2C%20forced).some(function%20(x)%20%7B%20return%20t%20%3D%3D%3D%20x%20%7C%7C%20t.contains(x)%3B%20%7D)%3B%0A%7D%0Afunction%20onMoved(e)%20%7B%20if%20(host.style.position%20%3D%3D%3D%20%22fixed%22)%20place()%3B%20queue((stub.checked%20%7C%7C%20!lines.checked)%20%26%26%20!!e%20%26%26%20e.type%20%3D%3D%3D%20%22scroll%22%20%26%26%20(e.target%20%3D%3D%3D%20document%20%7C%7C%20e.target%20%3D%3D%3D%20document.documentElement))%3B%20later()%3B%20%7D%0Avar%20watch%20%3D%20new%20MutationObserver(function%20(list)%20%7B%0A%20%20place()%3B%0A%20%20if%20(openPop%20%26%26%20gone(openPop))%20popClosed()%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20list.length%3B%20i%2B%2B)%20if%20(matters(list%5Bi%5D))%20return%20later()%3B%0A%20%20later(3000)%3B%0A%7D)%3B%0Afunction%20focus()%20%7B%0A%20%20var%20a%20%3D%20deep()%3B%0A%20%20track(a)%3B%0A%20%20if%20(a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement)%20%7B%0A%20%20%20%20lost%20%3D%20false%3B%0A%20%20%20%20if%20(a%20!%3D%3D%20host%20%26%26%20a.getRootNode()%20!%3D%3D%20root)%20spotEl%20%3D%20a%3B%0A%20%20%7D%20else%20spotEl%20%3D%20null%3B%0A%20%20current%20%3D%20stops.indexOf(a)%3B%0A%20%20if%20(current%20!%3D%3D%20seen)%20%7B%0A%20%20%20%20seen%20%3D%20current%3B%0A%20%20%20%20if%20(current%20%3E%3D%200)%20win%20%3D%20Math.floor(current%20%2F%20PAGE)%3B%0A%20%20%7D%0A%20%20queue()%3B%0A%7D%0Afunction%20lose(e)%20%7B%0A%20%20var%20t%20%3D%20e%20%26%26%20!e.relatedTarget%20%26%26%20e.composedPath%20%3F%20e.composedPath()%5B0%5D%20%3A%20null%2C%20p%20%3D%20t%20%26%26%20t.nodeType%20%3D%3D%3D%201%20%3F%20popupOf(t)%20%3A%20null%3B%0A%20%20if%20(p%20%26%26%20p%20%3D%3D%3D%20openPop)%20requestAnimationFrame(function%20()%20%7B%20if%20(!closed%20%26%26%20openPop%20%3D%3D%3D%20p%20%26%26%20gone(p))%20popClosed()%3B%20%7D)%3B%0A%20%20setTimeout(function%20()%20%7B%0A%20%20%20%20var%20a%20%3D%20document.activeElement%3B%0A%20%20%20%20if%20(a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement)%20return%3B%0A%20%20%20%20lost%20%3D%20true%3B%0A%20%20%20%20focus()%3B%0A%20%20%7D%2C%200)%3B%0A%7D%0Avar%20walking%20%3D%20false%2C%20walkDelay%20%3D%20400%2C%20walkT%20%3D%200%2C%20walked%20%3D%20new%20Set()%2C%20walkAt%20%3D%20null%2C%20walkEnd%20%3D%20null%3B%0Afunction%20walkedN()%20%7B%20return%20stops.filter(function%20(s)%20%7B%20return%20walked.has(s)%3B%20%7D).length%3B%20%7D%0Afunction%20playState()%20%7B%0A%20%20var%20at%20%3D%20walkAt%20%26%26%20stops.indexOf(walkAt)%20%3E%3D%200%20%3F%20%22%20at%20stop%20%22%20%2B%20(stops.indexOf(walkAt)%20%2B%201)%20%2B%20%22%20%5C%22%22%20%2B%20label(walkAt)%20%2B%20%22%5C%22%22%20%3A%20%22%22%3B%0A%20%20var%20n%20%3D%20%22walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%3B%0A%20%20if%20(walking)%20return%20%22still%20walking%22%20%2B%20at%20%2B%20%22%2C%20%22%20%2B%20n%3B%0A%20%20return%20walkEnd%20%3D%3D%3D%20%22done%22%20%3F%20%22finished%2C%20%22%20%2B%20n%20%3A%20%22paused%22%20%2B%20at%20%2B%20%22%2C%20%22%20%2B%20n%3B%0A%7D%0Afunction%20playLook()%20%7B%0A%20%20while%20(playIcon.firstChild)%20playIcon.removeChild(playIcon.firstChild)%3B%0A%20%20icon(playIcon%2C%2012%2C%20walking%20%3F%20%22M5%203v10M11%203v10%22%20%3A%20%22M4%202.5l9%205.5-9%205.5z%22%2C%202.4)%3B%0A%20%20playWord.textContent%20%3D%20walking%20%3F%20%22Pause%22%20%3A%20%22Play%22%3B%0A%20%20play.setAttribute(%22aria-pressed%22%2C%20walking%20%3F%20%22true%22%20%3A%20%22false%22)%3B%0A%20%20if%20(walked.size)%20playText.textContent%20%3D%20%22Walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20stops.length%20%2B%20%22%20stops%22%3B%0A%7D%0Afunction%20walkedText()%20%7B%20return%20%22%20after%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%22%3B%20%7D%0Afunction%20stopWalk(why%2C%20fin)%20%7B%0A%20%20if%20(!walking)%20return%3B%0A%20%20walking%20%3D%20false%3B%0A%20%20walkEnd%20%3D%20fin%20%3F%20%22done%22%20%3A%20%22paused%22%3B%0A%20%20settling%20%3D%20false%3B%0A%20%20if%20(walkT)%20clearTimeout(walkT)%3B%0A%20%20walkT%20%3D%200%3B%0A%20%20playLook()%3B%0A%20%20if%20(why)%20log(%22INFO%22%2C%20%22Play%20it%22%2C%20%5Bwhy%5D)%3B%0A%20%20sumDraw()%3B%0A%20%20if%20(fin)%20announce(%22Walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%20%22%20%2B%20pl(logCounts().bad%2C%20%22problem%22%2C%20%22problems%22)%20%2B%20%22.%22)%3B%0A%20%20else%20if%20(why)%20announce(%22Play%20paused%22%20%2B%20(walkAt%20%26%26%20stops.indexOf(walkAt)%20%3E%3D%200%20%3F%20%22%20at%20stop%20%22%20%2B%20(stops.indexOf(walkAt)%20%2B%201)%20%3A%20%22%22)%20%2B%20%22.%20Walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%22)%3B%0A%20%20var%20done%20%3D%20walkDone%3B%0A%20%20walkDone%20%3D%20%5B%5D%3B%0A%20%20done.forEach(function%20(f)%20%7B%20f(aiText())%3B%20%7D)%3B%0A%7D%0Afunction%20step(s)%20%7B%0A%20%20walkT%20%3D%200%3B%0A%20%20if%20(!walking%20%7C%7C%20closed)%20return%3B%0A%20%20if%20(!s%20%7C%7C%20stops.indexOf(s)%20%3C%200)%20s%20%3D%20stops.filter(function%20(x)%20%7B%20return%20!walked.has(x)%3B%20%7D)%5B0%5D%3B%0A%20%20if%20(!s)%20%7B%0A%20%20%20%20stopWalk(%22Finished%3A%20walked%20%22%20%2B%20walkedN()%20%2B%20%22%20of%20%22%20%2B%20pl(stops.length%2C%20%22stop%22%2C%20%22stops%22)%20%2B%20%22.%22%2C%20true)%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20endPress()%3B%0A%20%20if%20(s%20!%3D%3D%20deep())%20rest(s)%3B%0A%20%20s.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20focus()%3B%0A%20%20walked.add(s)%3B%0A%20%20walkAt%20%3D%20s%3B%0A%20%20playLook()%3B%0A%20%20var%20at%20%3D%20where(s)%2C%20still%20%3D%200%2C%20tries%20%3D%200%3B%0A%20%20settling%20%3D%20true%3B%0A%20%20function%20wait()%20%7B%0A%20%20%20%20if%20(!walking%20%7C%7C%20closed)%20return%20void%20(settling%20%3D%20false)%3B%0A%20%20%20%20var%20now%20%3D%20where(s)%3B%0A%20%20%20%20if%20(now%20!%3D%3D%20at)%20%7B%0A%20%20%20%20%20%20at%20%3D%20now%3B%0A%20%20%20%20%20%20still%20%3D%200%3B%0A%20%20%20%20%7D%20else%20still%2B%2B%3B%0A%20%20%20%20if%20(%2B%2Btries%20%3C%2090%20%26%26%20(still%20%3C%202%20%7C%7C%20tries%20%3C%206))%20return%20requestAnimationFrame(wait)%3B%0A%20%20%20%20settling%20%3D%20false%3B%0A%20%20%20%20hoverTry(s)%3B%0A%20%20%20%20check(s%2C%20function%20()%20%7B%0A%20%20%20%20%20%20if%20(walking%20%26%26%20!closed)%20walkT%20%3D%20setTimeout(function%20()%20%7B%20step()%3B%20%7D%2C%20walkDelay)%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%0A%20%20requestAnimationFrame(wait)%3B%0A%7D%0Avar%20walkDone%20%3D%20%5B%5D%3B%0Afunction%20untested()%20%7B%0A%20%20var%20judged%20%3D%20%7B%7D%3B%0A%20%20logs.forEach(function%20(e)%20%7B%20if%20((e.k%20%3D%3D%3D%20%22OK%22%20%7C%7C%20e.k%20%3D%3D%3D%20%22PROBLEM%22)%20%26%26%20(e.f%20%3D%3D%3D%20%22Lost%20focus%22%20%7C%7C%20e.f%20%3D%3D%3D%20%22Broken%20skip%20link%22%20%7C%7C%20e.f%20%3D%3D%3D%20%22No%20way%20out%22))%20judged%5Be.f%5D%20%3D%201%3B%20%7D)%3B%0A%20%20if%20(judgedDir%5B1%5D%20%26%26%20judgedDir%5B-1%5D)%20judged%5B%22Out%20of%20order%22%5D%20%3D%20judged%5B%22Keyboard%20trap%22%5D%20%3D%201%3B%0A%20%20openProbs().forEach(function%20(e)%20%7B%20judged%5Be.f%5D%20%3D%201%3B%20%7D)%3B%0A%20%20return%20%5B%22Out%20of%20order%22%2C%20%22Keyboard%20trap%22%2C%20%22Lost%20focus%22%2C%20%22No%20way%20out%22%2C%20%22Broken%20skip%20link%22%5D.filter(function%20(f)%20%7B%20return%20!judged%5Bf%5D%3B%20%7D)%3B%0A%7D%0Afunction%20sumDraw()%20%7B%0A%20%20sumLine.hidden%20%3D%20walking%20%7C%7C%20walkEnd%20!%3D%3D%20%22done%22%3B%0A%20%20if%20(sumLine.hidden)%20return%3B%0A%20%20var%20per%20%3D%20%7B%7D%2C%20probs%20%3D%20openProbs()%2C%20left%20%3D%20untested()%3B%0A%20%20probs.forEach(function%20(e)%20%7B%20per%5Be.f%5D%20%3D%20(per%5Be.f%5D%20%7C%7C%200)%20%2B%201%3B%20%7D)%3B%0A%20%20var%20red%20%3D%20CHECKS.filter(function%20(f)%20%7B%20return%20per%5Bf%5D%3B%20%7D)%2C%20ok%20%3D%20CHECKS.filter(function%20(f)%20%7B%20return%20!per%5Bf%5D%20%26%26%20left.indexOf(f)%20%3C%200%3B%20%7D)%3B%0A%20%20var%20tabLeft%20%3D%20left.indexOf(%22Out%20of%20order%22)%20%3E%3D%200%20%7C%7C%20left.indexOf(%22Keyboard%20trap%22)%20%3E%3D%200%2C%20popLeft%20%3D%20left.indexOf(%22Lost%20focus%22)%20%3E%3D%200%20%7C%7C%20left.indexOf(%22No%20way%20out%22)%20%3E%3D%200%3B%0A%20%20while%20(sumLine.firstChild)%20sumLine.removeChild(sumLine.firstChild)%3B%0A%20%20var%20b%20%3D%20document.createElement(%22b%22)%3B%0A%20%20b.textContent%20%3D%20pl(CHECKS.length%2C%20%22check%22%2C%20%22checks%22)%20%2B%20%22%3A%20%22%20%2B%20ok.length%20%2B%20%22%20passed%2C%20%22%20%2B%20red.length%20%2B%20(red.length%20%3D%3D%3D%201%20%3F%20%22%20found%20a%20problem%2C%20%22%20%3A%20%22%20found%20problems%2C%20%22)%20%2B%20left.length%20%2B%20%22%20not%20tested.%22%3B%0A%20%20sumLine.appendChild(b)%3B%0A%20%20function%20part(head%2C%20list%2C%20cls%2C%20count)%20%7B%0A%20%20%20%20if%20(!list.length)%20return%3B%0A%20%20%20%20sumLine.appendChild(document.createTextNode(%22%20%22%20%2B%20head%20%2B%20%22%3A%20%22))%3B%0A%20%20%20%20var%20sp%20%3D%20document.createElement(%22span%22)%3B%0A%20%20%20%20sp.className%20%3D%20cls%3B%0A%20%20%20%20sp.textContent%20%3D%20list.map(function%20(f)%20%7B%20return%20f%20%2B%20(count%20%3F%20%22%20%22%20%2B%20per%5Bf%5D%20%3A%20%22%22)%3B%20%7D).join(%22%2C%20%22)%3B%0A%20%20%20%20sumLine.appendChild(sp)%3B%0A%20%20%20%20sumLine.appendChild(document.createTextNode(%22.%22))%3B%0A%20%20%7D%0A%20%20part(%22Passed%22%2C%20ok%2C%20%22g%22)%3B%0A%20%20part(red.length%20%3D%3D%3D%201%20%3F%20%22Problem%22%20%3A%20%22Problems%22%2C%20red%2C%20%22e%22%2C%20true)%3B%0A%20%20part(%22Not%20tested%20(%22%20%2B%20%5BtabLeft%20%3F%20%22press%20Tab%20and%20Shift%2BTab%22%20%3A%20%22%22%2C%20popLeft%20%3F%20%22open%20and%20close%20a%20popup%22%20%3A%20%22%22%2C%20left.indexOf(%22Broken%20skip%20link%22)%20%3E%3D%200%20%3F%20%22the%20page%20has%20no%20main%20region%22%20%3A%20%22%22%5D.filter(Boolean).join(%22%2C%20%22)%20%2B%20%22)%22%2C%20left%2C%20%22q%22)%3B%0A%7D%0Afunction%20startWalk()%20%7B%0A%20%20walking%20%3D%20true%3B%0A%20%20sumDraw()%3B%0A%20%20if%20(walkedN()%20%3E%3D%20stops.length)%20walked%20%3D%20new%20Set()%3B%0A%20%20playLook()%3B%0A%20%20var%20first%20%3D%20current%20%3E%3D%200%20%26%26%20current%20%3C%20stops.length%20-%201%20%26%26%20walked.size%20%3F%20current%20%2B%201%20%3A%200%3B%0A%20%20if%20(stops%5Bfirst%5D)%20%7B%0A%20%20%20%20log(%22INFO%22%2C%20%22Play%20it%22%2C%20%5Bfirst%20%3F%20%22Went%20on%20from%20%22%20%3A%20%22Started%20at%20%22%2C%20ref(stops%5Bfirst%5D)%2C%20%22.%22%5D)%3B%0A%20%20%20%20announce((first%20%3F%20%22Play%20went%20on%20from%20stop%20%22%20%3A%20%22Play%20started%20at%20stop%20%22)%20%2B%20(first%20%2B%201)%20%2B%20%22.%22)%3B%0A%20%20%7D%0A%20%20step(stops%5Bfirst%5D)%3B%0A%7D%0Aplay.addEventListener(%22click%22%2C%20function%20()%20%7B%0A%20%20if%20(walking)%20return%20stopWalk(%22Paused%20with%20the%20Pause%20button%22%20%2B%20walkedText())%3B%0A%20%20walkDelay%20%3D%20400%3B%0A%20%20startWalk()%3B%0A%7D)%3B%0Afunction%20interrupt(e)%20%7B%0A%20%20if%20(picking)%20return%3B%0A%20%20if%20(!walking%20%7C%7C%20(e.composedPath%20%26%26%20e.composedPath().indexOf(host)%20%3E%3D%200))%20return%3B%0A%20%20stopWalk(%22Paused%20by%20a%20click%20on%20the%20page%22%20%2B%20walkedText())%3B%0A%7D%0AplayLook()%3B%0Avar%20SAFARI%20%3D%20MAC%20%26%26%20%2F%5ESafari%20%2F.test(browser())%2C%20FIREFOX%20%3D%20MAC%20%26%26%20%2F%5EFirefox%20%2F.test(browser())%3B%0Avar%20settleT%20%3D%200%2C%20macNote%20%3D%20false%2C%20beforeEl%20%3D%20null%2C%20wantEl%20%3D%20null%2C%20MAC_NOTE%20%3D%20SAFARI%20%3F%20%22Safari%20skips%20links%20and%20buttons%20on%20Tab%20until%20you%20turn%20it%20on%3A%20Settings%2C%20Advanced%2C%20Press%20Tab%20to%20highlight%20each%20item.%22%20%3A%20%22Firefox%20skips%20links%20on%20Tab%20until%20you%20turn%20it%20on%3A%20System%20Settings%2C%20Keyboard%2C%20Keyboard%20navigation.%22%3B%0Avar%20LINKS%20%3D%20%22a%5Bhref%5D%2Carea%5Bhref%5D%22%2C%20SKIPS%20%3D%20SAFARI%20%3F%20%5B%22a%5Bhref%5D%22%2C%20%22area%5Bhref%5D%22%2C%20%22button%22%2C%20%22input%5Btype%3Dbutton%5D%22%2C%20%22input%5Btype%3Dsubmit%5D%22%2C%20%22input%5Btype%3Dreset%5D%22%2C%20%22input%5Btype%3Dimage%5D%22%2C%20%22input%5Btype%3Dcheckbox%5D%22%2C%20%22input%5Btype%3Dradio%5D%22%2C%20%22input%5Btype%3Drange%5D%22%2C%20%22input%5Btype%3Dfile%5D%22%2C%20%22input%5Btype%3Dcolor%5D%22%5D.map(function%20(q)%20%7B%20return%20q%20%2B%20%22%3Anot(%5Btabindex%5D)%22%3B%20%7D).join(%22%2C%22)%20%3A%20LINKS%3B%0Afunction%20linkSkip(want%2C%20cur%2C%20dir)%20%7B%0A%20%20if%20(!SAFARI%20%26%26%20!FIREFOX)%20return%20null%3B%0A%20%20var%20n%20%3D%20stops.length%2C%20k%20%3D%200%2C%20links%20%3D%200%3B%0A%20%20for%20(var%20i%20%3D%20want%3B%20i%20!%3D%3D%20cur%20%26%26%20k%20%3C%20n%3B%20i%20%3D%20(i%20%2B%20dir%20%2B%20n)%20%25%20n%2C%20k%2B%2B)%20%7B%0A%20%20%20%20if%20(!stops%5Bi%5D.matches(SKIPS))%20return%20null%3B%0A%20%20%20%20if%20(stops%5Bi%5D.matches(LINKS))%20links%2B%2B%3B%0A%20%20%7D%0A%20%20return%20k%20%26%26%20k%20%3C%20n%20%3F%20%5Blinks%2C%20k%20-%20links%5D%20%3A%20null%3B%0A%7D%0Afunction%20skipText(c)%20%7B%0A%20%20var%20l%20%3D%20c%5B0%5D%20%3F%20pl(c%5B0%5D%2C%20%22link%22%2C%20%22links%22)%20%3A%20%22%22%2C%20b%20%3D%20c%5B1%5D%20%3F%20pl(c%5B1%5D%2C%20%22button%22%2C%20%22buttons%22)%20%3A%20%22%22%3B%0A%20%20return%20l%20%26%26%20b%20%3F%20l%20%2B%20%22%20and%20%22%20%2B%20b%20%3A%20l%20%7C%7C%20b%3B%0A%7D%0Afunction%20after(el%2C%20dir)%20%7B%0A%20%20var%20ord%20%3D%20new%20Map()%2C%20n%20%3D%20stops.length%2C%20pick%20%3D%20-1%3B%0A%20%20walk(document%2C%20%5B%5D).forEach(function%20(e%2C%20i)%20%7B%20ord.set(e%2C%20i)%3B%20%7D)%3B%0A%20%20var%20at%20%3D%20ord.get(el)%3B%0A%20%20if%20(at%20%3D%3D%3D%20undefined)%20return%20dir%20%3E%200%20%3F%200%20%3A%20n%20-%201%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20n%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20k%20%3D%20ord.get(stops%5Bi%5D)%3B%0A%20%20%20%20if%20(stops%5Bi%5D.tabIndex%20%3E%200%20%7C%7C%20k%20%3D%3D%3D%20undefined)%20continue%3B%0A%20%20%20%20if%20(dir%20%3E%200%20%26%26%20k%20%3E%20at)%20return%20i%3B%0A%20%20%20%20if%20(dir%20%3C%200%20%26%26%20k%20%3C%20at)%20pick%20%3D%20i%3B%0A%20%20%7D%0A%20%20return%20dir%20%3E%200%20%3F%200%20%3A%20pick%20%3E%3D%200%20%3F%20pick%20%3A%20forced.length%20%3F%20forced.length%20-%201%20%3A%20n%20-%201%3B%0A%7D%0Avar%20stays%20%3D%20new%20WeakMap()%2C%20leaves%20%3D%20new%20WeakMap()%3B%0Afunction%20tellsHow(e)%20%7B%0A%20%20if%20(!(e.tagName%20%3D%3D%3D%20%22TEXTAREA%22%20%7C%7C%20e.isContentEditable%20%7C%7C%20%2F%5E(application%7Ctextbox)%24%2F.test(e.getAttribute(%22role%22)%20%7C%7C%20%22%22)))%20return%20false%3B%0A%20%20var%20r%20%3D%20e.getRootNode()%2C%20t%20%3D%20(e.getAttribute(%22aria-description%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22%20%2B%20(e.getAttribute(%22aria-keyshortcuts%22)%20%7C%7C%20%22%22)%20%2B%20%22%20%22%20%2B%20(e.getAttribute(%22title%22)%20%7C%7C%20%22%22)%3B%0A%20%20(e.getAttribute(%22aria-describedby%22)%20%7C%7C%20%22%22).split(%2F%5Cs%2B%2F).forEach(function%20(id)%20%7B%20var%20x%20%3D%20id%20%26%26%20r.getElementById%20%3F%20r.getElementById(id)%20%3A%20null%3B%20if%20(x)%20t%20%2B%3D%20%22%20%22%20%2B%20x.textContent%3B%20%7D)%3B%0A%20%20return%20%2F%5Cb(escape%7Cesc)%5Cb%2Fi.test(t)%3B%0A%7D%0Afunction%20multi(e)%20%7B%20return%20%2F%5E(IFRAME%7COBJECT%7CEMBED%7CAUDIO%7CVIDEO)%24%2F.test(e.tagName)%20%7C%7C%20!!e.shadowRoot%20%7C%7C%20(e.tagName%20%3D%3D%3D%20%22INPUT%22%20%26%26%20%2F%5E(date%7Cdatetime-local%7Cmonth%7Ctime%7Cweek)%24%2F.test(e.type))%3B%20%7D%0Afunction%20endPress()%20%7B%0A%20%20if%20(settleT)%20%7B%0A%20%20%20%20clearTimeout(settleT)%3B%0A%20%20%20%20settle()%3B%0A%20%20%7D%0A%20%20pressed%20%3D%200%3B%0A%7D%0Afunction%20settle()%20%7B%0A%20%20settleT%20%3D%200%3B%0A%20%20focus()%3B%0A%20%20if%20(pressed%20%26%26%20current%20%3E%3D%200)%20%7B%0A%20%20%20%20check(stops%5Bcurrent%5D)%3B%0A%20%20%20%20hoverTry(stops%5Bcurrent%5D)%3B%0A%20%20%7D%0A%20%20if%20(!pressed%20%7C%7C%20current%20%3C%200%20%7C%7C%20before%20%3D%3D%3D%20-2)%20%7B%0A%20%20%20%20if%20(pressed%20%26%26%20before%20%3D%3D%3D%20-2)%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Focus%20was%20on%20the%20page%20body%2C%20so%20this%20Tab%20press%20is%20not%20judged.%22%5D)%3B%0A%20%20%20%20else%20if%20(pressed)%20%7B%0A%20%20%20%20%20%20var%20o%20%3D%20deep()%3B%0A%20%20%20%20%20%20if%20(o%20%26%26%20o%20!%3D%3D%20document.body%20%26%26%20o%20!%3D%3D%20document.documentElement%20%26%26%20!within(host%2C%20o))%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Tab%20landed%20on%20%22%2C%20ref(o)%2C%20%22%2C%20which%20is%20not%20in%20the%20list%20of%20stops.%20Not%20judged.%22%5D)%3B%0A%20%20%20%20%20%20else%20if%20(!o%20%7C%7C%20!within(host%2C%20o))%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Focus%20left%20the%20page%2C%20or%20went%20to%20the%20browser.%20Not%20judged.%22%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20pressed%20%3D%200%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20var%20w0%20%3D%20before%20%3E%3D%200%20%3F%20(before%20%2B%20pressed%20%2B%20stops.length)%20%25%20stops.length%20%3A%20-1%3B%0A%20%20if%20(w0%20%3E%3D%200%20%26%26%20w0%20!%3D%3D%20current%20%26%26%20!tabbable(stops%5Bw0%5D))%20%7B%0A%20%20%20%20var%20fromEl%20%3D%20stops%5Bbefore%5D%2C%20toEl%20%3D%20stops%5Bcurrent%5D%3B%0A%20%20%20%20rescan()%3B%0A%20%20%20%20current%20%3D%20stops.indexOf(toEl)%3B%0A%20%20%20%20before%20%3D%20stops.indexOf(fromEl)%3B%0A%20%20%20%20if%20(before%20%3C%200)%20beforeEl%20%3D%20fromEl%3B%0A%20%20%20%20if%20(current%20%3C%200)%20%7B%0A%20%20%20%20%20%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20%5B%22Tab%20landed%20on%20%22%2C%20ref(toEl)%2C%20%22%2C%20which%20is%20not%20in%20the%20list%20of%20stops.%20Not%20judged.%22%5D)%3B%0A%20%20%20%20%20%20pressed%20%3D%200%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20n%20%3D%20stops.length%2C%20src%20%3D%20before%20%3E%3D%200%20%3F%20null%20%3A%20beforeEl%2C%20first%20%3D%20before%20%3C%200%20%26%26%20!src%3B%0A%20%20var%20want%20%3D%20before%20%3E%3D%200%20%3F%20(before%20%2B%20pressed%20%2B%20n)%20%25%20n%20%3A%20src%20%3F%20after(src%2C%20pressed)%20%3A%20pressed%20%3E%200%20%3F%200%20%3A%20n%20-%201%3B%0A%20%20if%20(before%20%3E%3D%200%20%26%26%20wantEl%20%26%26%20stops.indexOf(wantEl)%20%3E%3D%200)%20want%20%3D%20stops.indexOf(wantEl)%3B%0A%20%20var%20landed%20%3D%20popupOf(stops%5Bcurrent%5D)%2C%20left%20%3D%20before%20%3E%3D%200%20%3F%20popupOf(stops%5Bbefore%5D)%20%3A%20src%20%3F%20popupOf(src)%20%3A%20null%3B%0A%20%20if%20(landed%20%26%26%20landed%20%3D%3D%3D%20left%20%26%26%20before%20%3E%3D%200)%20loopCheck(landed%2C%20stops%5Bbefore%5D%2C%20stops%5Bcurrent%5D%2C%20pressed)%3B%0A%20%20if%20(first%20%26%26%20pressed%20%3E%200%20%26%26%20!landed%20%26%26%20!popMissed)%20%7B%0A%20%20%20%20for%20(var%20k%20%3D%200%3B%20k%20%3C%20n%20%26%26%20!popMissed%3B%20k%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20pop%20%3D%20popupOf(stops%5Bk%5D)%3B%0A%20%20%20%20%20%20if%20(pop%20%26%26%20shown(pop)%20%26%26%20blocking(pop))%20popMissed%20%3D%20pop%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(popMissed)%20%7B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20announce(%22A%20popup%20blocks%20the%20page%2C%20but%20the%20first%20Tab%20went%20somewhere%20else.%22)%3B%0A%20%20%20%20%20%20log(%22PROBLEM%22%2C%20%22Out%20of%20order%22%2C%20%5BpopName(popMissed)%2C%20%22%20blocks%20the%20page%2C%20but%20the%20first%20Tab%20went%20to%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20%22.%22%5D%2C%20aiOf(W_ORDER%2C%20%22A%20popup%20that%20blocks%20the%20page%20gets%20keyboard%20focus%20first%2C%20so%20the%20first%20Tab%20lands%20inside%20it.%22%2C%20%22When%20the%20popup%20opens%2C%20move%20focus%20into%20it%3A%20call%20.focus()%20on%20its%20first%20control%2C%20or%20on%20the%20popup%20itself%20with%20tabindex%3D%5C%22-1%5C%22.%20A%20%3Cdialog%3E%20opened%20with%20showModal()%20does%20this%20by%20itself.%22%2C%20%5B%5B%22Popup%22%2C%20popMissed%5D%2C%20%5B%22First%20Tab%20went%20to%22%2C%20stops%5Bcurrent%5D%5D%5D))%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20start%20%3D%20before%20%3E%3D%200%20%3F%20%5Bref(stops%5Bbefore%5D)%5D%20%3A%20src%20%3F%20%5Bref(src)%5D%20%3A%20%5B%22Start%22%5D%2C%20back%20%3D%20pressed%20%3C%200%20%3F%20%22%20(Shift%2BTab)%22%20%3A%20%22%22%3B%0A%20%20if%20(current%20%3D%3D%3D%20before%20%26%26%20current%20!%3D%3D%20want%20%26%26%20!landed%20%26%26%20!left)%20%7B%0A%20%20%20%20var%20s%20%3D%20stops%5Bcurrent%5D%3B%0A%20%20%20%20var%20d%20%3D%20pressed%20%3E%200%20%3F%201%20%3A%20-1%2C%20st%20%3D%20stays.get(s)%20%7C%7C%20stays.set(s%2C%20%7B%7D).get(s)%2C%20key1%20%3D%20d%20%3E%200%20%3F%20%22Tab%22%20%3A%20%22Shift%2BTab%22%2C%20key2%20%3D%20d%20%3E%200%20%3F%20%22Shift%2BTab%22%20%3A%20%22Tab%22%3B%0A%20%20%20%20if%20(multi(s))%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%5Cu2192%20%22%2C%20ref(s)%2C%20back%20%2B%20%22%3A%20Tab%20moved%20inside%20it%2C%20it%20has%20parts%20of%20its%20own%20(like%20a%20date%20field%2C%20a%20video%20or%20a%20frame).%20Not%20judged.%22%5D))%3B%0A%20%20%20%20else%20if%20(tellsHow(s))%20%7B%0A%20%20%20%20%20%20if%20(!st.how)%20log(%22SKIPPED%22%2C%20%22Keyboard%20trap%22%2C%20%5Bref(s)%2C%20%22%20keeps%20Tab%2C%20and%20says%20how%20to%20leave.%22%5D)%3B%0A%20%20%20%20%20%20st.how%20%3D%201%3B%0A%20%20%20%20%7D%20else%20if%20(!st%5Bd%5D%20%26%26%20(leaves.get(s)%20%7C%7C%20%7B%7D)%5B-d%5D)%20%7B%0A%20%20%20%20%20%20st%5Bd%5D%20%3D%201%3B%0A%20%20%20%20%20%20log(%22OK%22%2C%20%22Keyboard%20trap%22%2C%20%5Bkey1%20%2B%20%22%20stays%20on%20%22%2C%20ref(s)%2C%20%22%2C%20but%20%22%20%2B%20key2%20%2B%20%22%20leaves%20it%2C%20so%20it%20is%20not%20a%20trap.%22%5D)%3B%0A%20%20%20%20%7D%20else%20if%20(!st%5Bd%5D%20%26%26%20!st%5B-d%5D)%20%7B%0A%20%20%20%20%20%20st%5Bd%5D%20%3D%201%3B%0A%20%20%20%20%20%20log(%22SKIPPED%22%2C%20%22Keyboard%20trap%22%2C%20%5Bkey1%20%2B%20%22%20stays%20on%20%22%2C%20ref(s)%2C%20%22.%20Press%20%22%20%2B%20key2%20%2B%20%22%3A%20if%20focus%20can't%20leave%20that%20way%20either%2C%20it%20is%20a%20keyboard%20trap.%22%5D)%3B%0A%20%20%20%20%7D%20else%20if%20(!st%5Bd%5D%20%26%26%20trapped.indexOf(s)%20%3C%200)%20%7B%0A%20%20%20%20%20%20st%5Bd%5D%20%3D%201%3B%0A%20%20%20%20%20%20trapped.push(s)%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20announce(%22Keyboard%20trap%3A%20Tab%20and%20Shift%2BTab%20both%20stay%20on%20stop%20%22%20%2B%20(current%20%2B%201)%20%2B%20%22.%22)%3B%0A%20%20%20%20%20%20log(%22PROBLEM%22%2C%20%22Keyboard%20trap%22%2C%20%5B%22Tab%20and%20Shift%2BTab%20both%20stay%20on%20%22%2C%20ref(s)%2C%20%22%3A%20the%20keyboard%20can't%20move%20focus%20away.%22%5D%2C%20aiOf(W_TRAP%2C%20%22Tab%20or%20Shift%2BTab%20moves%20focus%20away%20from%20the%20element%2C%20so%20a%20keyboard%20user%20can%20leave%20it.%22%2C%20%22Find%20the%20keydown%20listener%20on%20the%20element%20or%20its%20parents%20that%20calls%20preventDefault()%20on%20Tab%2C%20or%20that%20calls%20.focus()%20on%20the%20same%20element%20again%2C%20and%20let%20Tab%20through.%20If%20the%20element%20needs%20Tab%20(a%20code%20editor)%2C%20let%20Escape%20move%20focus%20out%20and%20say%20so%20next%20to%20it.%22%2C%20%5B%5B%22Element%22%2C%20s%5D%2C%20%5B%22Expected%20next%22%2C%20stops%5B(current%20%2B%201)%20%25%20n%5D%5D%5D))%3B%0A%20%20%20%20%7D%0A%20%20%20%20pressed%20%3D%200%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20if%20(before%20%3E%3D%200%20%26%26%20current%20!%3D%3D%20before)%20%7B%0A%20%20%20%20var%20lv%20%3D%20leaves.get(stops%5Bbefore%5D)%20%7C%7C%20leaves.set(stops%5Bbefore%5D%2C%20%7B%7D).get(stops%5Bbefore%5D)%2C%20sd%20%3D%20pressed%20%3E%200%20%3F%201%20%3A%20-1%2C%20so%20%3D%20stays.get(stops%5Bbefore%5D)%3B%0A%20%20%20%20if%20(!lv%5Bsd%5D%20%26%26%20so%20%26%26%20so%5B-sd%5D%20%26%26%20!so%5Bsd%5D%20%26%26%20trapped.indexOf(stops%5Bbefore%5D)%20%3C%200)%20log(%22OK%22%2C%20%22Keyboard%20trap%22%2C%20%5B(sd%20%3E%200%20%3F%20%22Tab%22%20%3A%20%22Shift%2BTab%22)%20%2B%20%22%20leaves%20%22%2C%20ref(stops%5Bbefore%5D)%2C%20%22%2C%20so%20it%20is%20not%20a%20trap.%22%5D)%3B%0A%20%20%20%20lv%5Bsd%5D%20%3D%201%3B%0A%20%20%7D%0A%20%20var%20skipped%20%3D%20current%20!%3D%3D%20want%20%26%26%20!landed%20%26%26%20!left%20%3F%20linkSkip(want%2C%20current%2C%20pressed%20%3E%200%20%3F%201%20%3A%20-1)%20%3A%20null%3B%0A%20%20if%20(first%20%26%26%20pressed%20%3E%200%20%26%26%20landed)%20log(%22OK%22%2C%20%22Out%20of%20order%22%2C%20%5B%22First%20Tab%20went%20into%20the%20popup%20%22%2C%20popName(landed)%2C%20%22.%22%5D)%3B%0A%20%20else%20if%20(skipped)%20%7B%0A%20%20%20%20if%20(!macNote)%20%7B%0A%20%20%20%20%20%20macNote%20%3D%20true%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%20%20log(%22INFO%22%2C%20%22Out%20of%20order%22%2C%20%5BMAC_NOTE%5D)%3B%0A%20%20%20%20%7D%0A%20%20%20%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20back%20%2B%20%22%3A%20your%20browser%20skipped%20%22%20%2B%20skipText(skipped)%20%2B%20%22.%20Not%20judged.%22%5D))%3B%0A%20%20%7D%20else%20if%20(current%20!%3D%3D%20want%20%26%26%20!landed%20%26%26%20!left%20%26%26%20!(popMissed%20%26%26%20first))%20%7B%0A%20%20%20%20var%20from%20%3D%20before%20%3E%3D%200%20%3F%20stops%5Bbefore%5D%20%3A%20src%2C%20to%20%3D%20stops%5Bcurrent%5D%2C%20fromText%20%3D%20before%20%3E%3D%200%20%3F%20%22stop%20%22%20%2B%20(before%20%2B%201)%20%3A%20src%20%3F%20%22%5C%22%22%20%2B%20label(src)%20%2B%20%22%5C%22%20%22%20%2B%20desc(src)%20%3A%20%22the%20start%20of%20the%20page%22%3B%0A%20%20%20%20announce(%22Tab%20jumped%20out%20of%20order%2C%20from%20%22%20%2B%20(before%20%3E%3D%200%20%3F%20%22stop%20%22%20%2B%20(before%20%2B%201)%20%3A%20src%20%3F%20label(src)%20%3A%20%22the%20start%22)%20%2B%20%22%20to%20stop%20%22%20%2B%20(current%20%2B%201)%20%2B%20%22.%22)%3B%0A%20%20%20%20if%20(!jumps.some(function%20(j)%20%7B%20return%20j%5B0%5D%20%3D%3D%3D%20from%20%26%26%20j%5B1%5D%20%3D%3D%3D%20to%3B%20%7D))%20%7B%0A%20%20%20%20%20%20jumps.push(%5Bfrom%2C%20to%5D)%3B%0A%20%20%20%20%20%20renderJumps()%3B%0A%20%20%20%20%7D%0A%20%20%20%20log(%22PROBLEM%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(to)%2C%20back%20%2B%20%22%2C%20expected%20%22%2C%20ref(stops%5Bwant%5D)%2C%20to.tabIndex%20%3E%200%20%3F%20%22.%20It%20has%20tabindex%3D%5C%22%22%20%2B%20to.tabIndex%20%2B%20%22%5C%22.%22%20%3A%20%22.%22%5D)%2C%20aiOf(W_ORDER%2C%20%22Tab%22%20%2B%20(pressed%20%3C%200%20%3F%20%22%20with%20Shift%22%20%3A%20%22%22)%20%2B%20%22%20moves%20from%20%22%20%2B%20fromText%20%2B%20%22%20to%20stop%20%22%20%2B%20(want%20%2B%201)%20%2B%20%22%2C%20the%20next%20element%20in%20the%20Tab%20order.%22%2C%20to.tabIndex%20%3E%200%20%3F%20%22Remove%20tabindex%3D%5C%22%22%20%2B%20to.tabIndex%20%2B%20%22%5C%22%20from%20the%20element%20Tab%20jumped%20to%2C%20or%20set%20it%20to%200.%20A%20positive%20tabindex%20pulls%20an%20element%20ahead%20of%20the%20page%20order.%22%20%3A%20%22Tab%20follows%20the%20order%20of%20the%20HTML%2C%20so%20a%20jump%20comes%20from%20a%20script.%20Look%20for%20code%20that%20calls%20.focus()%20on%20focus%2C%20blur%20or%20keydown%20near%20the%20element%20Tab%20left%20from%2C%20and%20for%20content%20added%20or%20moved%20while%20Tab%20was%20pressed.%20If%20the%20element%20Tab%20jumped%20to%20sits%20elsewhere%20in%20the%20HTML%20on%20purpose%2C%20move%20it%20next%20to%20the%20one%20before%20it.%22%2C%20%5B%5B%22Tab%20left%20from%22%2C%20from%5D%2C%20%5B%22Tab%20jumped%20to%22%2C%20to%5D%2C%20%5B%22Expected%20next%22%2C%20stops%5Bwant%5D%5D%5D))%3B%0A%20%20%7D%20else%20if%20(current%20!%3D%3D%20want)%20log(%22SKIPPED%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20back%20%2B%20(landed%20%7C%7C%20left%20%3F%20%22%3A%20into%20or%20inside%20a%20popup%2C%20allowed.%22%20%3A%20%22%3A%20the%20popup%20that%20blocks%20the%20page%20is%20listed%20already.%22)%5D))%3B%0A%20%20else%20log(%22OK%22%2C%20%22Out%20of%20order%22%2C%20start.concat(%5B%22%20%E2%86%92%20%22%2C%20ref(stops%5Bcurrent%5D)%2C%20back%20%2B%20%22%2C%20next%20in%20line.%22%5D))%3B%0A%20%20pressed%20%3D%200%3B%0A%7D%0Afunction%20inPanel()%20%7B%0A%20%20var%20a%20%3D%20root.activeElement%3B%0A%20%20return%20!!a%20%26%26%20panel.contains(a)%3B%0A%7D%0Afunction%20panelCtl()%20%7B%0A%20%20return%20%5B%5D.filter.call(panel.querySelectorAll(%22button%2Ca%2Cinput%22)%2C%20function%20(e)%20%7B%20return%20!e.disabled%20%26%26%20e.getClientRects().length%20%3E%200%3B%20%7D)%3B%0A%7D%0Afunction%20enter()%20%7B%0A%20%20endPress()%3B%0A%20%20if%20(walking)%20stopWalk(%22Paused%20by%20%22%20%2B%20KEYS%20%2B%20walkedText())%3B%0A%20%20var%20a%20%3D%20deep()%3B%0A%20%20pRet%20%3D%20a%20%26%26%20a%20!%3D%3D%20document.body%20%26%26%20a%20!%3D%3D%20document.documentElement%20%26%26%20a%20!%3D%3D%20host%20%26%26%20a.getRootNode()%20!%3D%3D%20root%20%3F%20a%20%3A%20null%3B%0A%20%20panelIn%20%3D%20true%3B%0A%20%20skipPanel()%3B%0A%20%20play.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%7D%0Afunction%20back()%20%7B%0A%20%20var%20r%20%3D%20pRet%3B%0A%20%20panelIn%20%3D%20false%3B%0A%20%20pRet%20%3D%20null%3B%0A%20%20skipPanel()%3B%0A%20%20if%20(r%20%26%26%20r.isConnected)%20r.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20else%20%7B%0A%20%20%20%20var%20a%20%3D%20root.activeElement%3B%0A%20%20%20%20if%20(a%20%26%26%20a.blur)%20a.blur()%3B%0A%20%20%7D%0A%7D%0Afunction%20key(e)%20%7B%0A%20%20if%20(picking%20%26%26%20e.key%20%3D%3D%3D%20%22Escape%22%20%26%26%20e.isTrusted)%20%7B%0A%20%20%20%20e.preventDefault()%3B%0A%20%20%20%20e.stopPropagation()%3B%0A%20%20%20%20return%20endPick()%3B%0A%20%20%7D%0A%20%20if%20(e.code%20%3D%3D%3D%20%22KeyF%22%20%26%26%20e.ctrlKey%20%26%26%20e.shiftKey%20%26%26%20!e.altKey%20%26%26%20!e.metaKey)%20%7B%0A%20%20%20%20e.preventDefault()%3B%0A%20%20%20%20e.stopPropagation()%3B%0A%20%20%20%20if%20(inPanel())%20back()%3B%0A%20%20%20%20else%20enter()%3B%0A%20%20%20%20return%3B%0A%20%20%7D%0A%20%20if%20(e.key%20!%3D%3D%20%22Tab%22%20%26%26%20settleT)%20endPress()%3B%0A%20%20lastKey%20%3D%20e.key%3B%0A%20%20keyT%20%3D%20Date.now()%3B%0A%20%20keyOn%20%3D%20deep()%3B%0A%20%20if%20(walking%20%26%26%20(e.key%20%3D%3D%3D%20%22%20%22%20%7C%7C%20e.key%20%3D%3D%3D%20%22Tab%22%20%7C%7C%20e.key%20%3D%3D%3D%20%22Escape%22))%20%7B%0A%20%20%20%20if%20(e.key%20%3D%3D%3D%20%22%20%22)%20e.preventDefault()%3B%0A%20%20%20%20stopWalk(%22Paused%20by%20%22%20%2B%20(e.key%20%3D%3D%3D%20%22%20%22%20%3F%20%22Space%22%20%3A%20e.key)%20%2B%20walkedText())%3B%0A%20%20%20%20if%20(e.key%20!%3D%3D%20%22Tab%22)%20return%3B%0A%20%20%7D%0A%20%20if%20(panelIn%20%26%26%20inPanel())%20%7B%0A%20%20%20%20if%20(e.key%20%3D%3D%3D%20%22Escape%22)%20%7B%0A%20%20%20%20%20%20e.preventDefault()%3B%0A%20%20%20%20%20%20return%20back()%3B%0A%20%20%20%20%7D%0A%20%20%20%20if%20(e.key%20%3D%3D%3D%20%22Tab%22%20%26%26%20skip.checked)%20%7B%0A%20%20%20%20%20%20var%20l%20%3D%20panelCtl()%2C%20i%20%3D%20l.indexOf(root.activeElement)%2C%20n%20%3D%20l.length%3B%0A%20%20%20%20%20%20e.preventDefault()%3B%0A%20%20%20%20%20%20if%20(n)%20l%5Bi%20%3C%200%20%3F%200%20%3A%20(i%20%2B%20(e.shiftKey%20%3F%20-1%20%3A%201)%20%2B%20n)%20%25%20n%5D.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20%20%20%20%20return%3B%0A%20%20%20%20%7D%0A%20%20%7D%0A%20%20var%20fa%20%3D%20deep()%2C%20onBody%20%3D%20!fa%20%7C%7C%20fa%20%3D%3D%3D%20document.body%20%7C%7C%20fa%20%3D%3D%3D%20document.documentElement%3B%0A%20%20if%20(e.key%20%3D%3D%3D%20%22Escape%22%20%26%26%20e.isTrusted%20%26%26%20openPop%20%26%26%20!gone(openPop))%20%7B%0A%20%20%20%20var%20ep%20%3D%20openPop%3B%0A%20%20%20%20setTimeout(function%20()%20%7B%20if%20(!closed%20%26%26%20openPop%20%3D%3D%3D%20ep%20%26%26%20!gone(ep))%20log(%22INFO%22%2C%20%22No%20way%20out%22%2C%20%5BpopName(ep)%2C%20%22%3A%20Escape%20did%20not%20close%20it.%20WCAG%202.2%20AA%20does%20not%20require%20Escape%20when%20Tab%20reaches%20a%20close%20button%3B%20it%20is%20a%20best%20practice%20(ARIA%20APG).%22%5D)%3B%20%7D%2C%20300)%3B%0A%20%20%7D%0A%20%20if%20(e.key%20%3D%3D%3D%20%22Escape%22%20%26%26%20!modal()%20%26%26%20!(openPop%20%26%26%20!gone(openPop))%20%26%26%20(onBody%20%7C%7C%20inPanel()))%20close()%3B%0A%20%20if%20(e.key%20%3D%3D%3D%20%22Tab%22)%20%7B%0A%20%20%20%20endPress()%3B%0A%20%20%20%20fa%20%3D%20deep()%3B%0A%20%20%20%20pressed%20%3D%20e.shiftKey%20%3F%20-1%20%3A%201%3B%0A%20%20%20%20before%20%3D%20current%20%3C%200%20%26%26%20lost%20%3F%20-2%20%3A%20current%3B%0A%20%20%20%20beforeEl%20%3D%20current%20%3C%200%20%26%26%20!lost%20%26%26%20fa%20%26%26%20fa%20!%3D%3D%20document.body%20%26%26%20fa%20!%3D%3D%20document.documentElement%20%26%26%20!within(host%2C%20fa)%20%3F%20fa%20%3A%20null%3B%0A%20%20%20%20wantEl%20%3D%20null%3B%0A%20%20%20%20for%20(var%20k%20%3D%201%2C%20n%20%3D%20stops.length%3B%20before%20%3E%3D%200%20%26%26%20k%20%3C%20n%3B%20k%2B%2B)%20%7B%0A%20%20%20%20%20%20var%20c%20%3D%20stops%5B(((before%20%2B%20pressed%20*%20k)%20%25%20n)%20%2B%20n)%20%25%20n%5D%3B%0A%20%20%20%20%20%20if%20(tabbable(c))%20%7B%0A%20%20%20%20%20%20%20%20wantEl%20%3D%20c%3B%0A%20%20%20%20%20%20%20%20if%20(c%20!%3D%3D%20fa)%20rest(c)%3B%0A%20%20%20%20%20%20%20%20break%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20settleT%20%3D%20setTimeout(settle%2C%20150)%3B%0A%20%20%7D%0A%7D%0Afunction%20pick(e)%20%7B%0A%20%20var%20g%20%3D%20e.target.closest%20%26%26%20e.target.closest(%22g.o%22)%3B%0A%20%20if%20(!g)%20return%3B%0A%20%20e.preventDefault()%3B%0A%20%20e.stopPropagation()%3B%0A%20%20if%20(e.type%20!%3D%3D%20%22click%22)%20return%3B%0A%20%20var%20s%20%3D%20stops%5B%2Bg.getAttribute(%22data-i%22)%5D%3B%0A%20%20if%20(!s)%20return%3B%0A%20%20endPress()%3B%0A%20%20if%20(s%20!%3D%3D%20deep())%20rest(s)%3B%0A%20%20s.focus(%7B%20preventScroll%3A%20true%2C%20focusVisible%3A%20true%20%7D)%3B%0A%20%20focus()%3B%0A%7D%0Afunction%20close()%20%7B%0A%20%20closed%20%3D%20true%3B%0A%20%20picking%20%3D%20false%3B%0A%20%20PICKS.forEach(function%20(t)%20%7B%20removeEventListener(t%2C%20pickEv%2C%20true)%3B%20%7D)%3B%0A%20%20stopWalk()%3B%0A%20%20removeEventListener(%22pointerdown%22%2C%20interrupt%2C%20true)%3B%0A%20%20removeEventListener(%22pointerdown%22%2C%20tap%2C%20true)%3B%0A%20%20removeEventListener(%22scroll%22%2C%20onMoved%2C%20true)%3B%0A%20%20removeEventListener(%22resize%22%2C%20onMoved)%3B%0A%20%20removeEventListener(%22resize%22%2C%20keepIn)%3B%0A%20%20if%20(fit)%20fit.disconnect()%3B%0A%20%20watch.disconnect()%3B%0A%20%20if%20(timer)%20clearTimeout(timer)%3B%0A%20%20if%20(idle%20%26%26%20window.cancelIdleCallback)%20cancelIdleCallback(idle)%3B%0A%20%20if%20(sayT)%20clearTimeout(sayT)%3B%0A%20%20if%20(settleT)%20clearTimeout(settleT)%3B%0A%20%20removeEventListener(%22keydown%22%2C%20key%2C%20true)%3B%0A%20%20removeEventListener(%22focusin%22%2C%20focus%2C%20true)%3B%0A%20%20removeEventListener(%22focusout%22%2C%20lose%2C%20true)%3B%0A%20%20if%20(tabPoll)%20clearInterval(tabPoll)%3B%0A%20%20if%20(logTab%20%26%26%20!logTab.closed%20%26%26%20tabNote)%20tabNote.hidden%20%3D%20false%3B%0A%20%20if%20(window.__tabTrail%20%3D%3D%3D%20api)%20delete%20window.__tabTrail%3B%0A%20%20if%20(ownName)%20window.name%20%3D%20%22%22%3B%0A%20%20host.remove()%3B%0A%7D%0Avar%20grab%20%3D%20null%3B%0Apanel.addEventListener(%22pointerdown%22%2C%20function%20(e)%20%7B%0A%20%20if%20(e.button%20!%3D%3D%200%20%7C%7C%20e.target.closest(%22button%2Ca%2Cul%2Clabel%22))%20return%3B%0A%20%20var%20r%20%3D%20panel.getBoundingClientRect()%3B%0A%20%20grab%20%3D%20%5Be.clientX%20-%20r.left%2C%20e.clientY%20-%20r.top%5D%3B%0A%20%20panel.setPointerCapture(e.pointerId)%3B%0A%20%20panel.classList.add(%22g%22)%3B%0A%7D)%3B%0Apanel.addEventListener(%22pointermove%22%2C%20function%20(e)%20%7B%0A%20%20if%20(!grab)%20return%3B%0A%20%20var%20x%20%3D%20Math.min(Math.max(e.clientX%20-%20grab%5B0%5D%2C%200)%2C%20innerWidth%20-%20panel.offsetWidth)%3B%0A%20%20var%20y%20%3D%20Math.min(Math.max(e.clientY%20-%20grab%5B1%5D%2C%200)%2C%20innerHeight%20-%20panel.offsetHeight)%3B%0A%20%20panel.style.left%20%3D%20x%20%2B%20%22px%22%3B%0A%20%20panel.style.top%20%3D%20y%20%2B%20%22px%22%3B%0A%20%20panel.style.right%20%3D%20%22auto%22%3B%0A%20%20panel.style.bottom%20%3D%20%22auto%22%3B%0A%7D)%3B%0Afunction%20drop()%20%7B%20grab%20%3D%20null%3B%20panel.classList.remove(%22g%22)%3B%20%7D%0Afunction%20keepIn()%20%7B%0A%20%20if%20(closed)%20return%3B%0A%20%20var%20r%20%3D%20panel.getBoundingClientRect()%2C%20m%20%3D%208%3B%0A%20%20if%20(!r.height%20%7C%7C%20(r.top%20%3E%3D%20m%20%26%26%20r.bottom%20%3C%3D%20innerHeight%20-%20m%20%26%26%20r.left%20%3E%3D%20m%20%26%26%20r.right%20%3C%3D%20innerWidth%20-%20m))%20return%3B%0A%20%20panel.style.top%20%3D%20Math.min(Math.max(r.top%2C%20m)%2C%20Math.max(m%2C%20innerHeight%20-%20m%20-%20r.height))%20%2B%20%22px%22%3B%0A%20%20panel.style.left%20%3D%20Math.min(Math.max(r.left%2C%20m)%2C%20Math.max(m%2C%20innerWidth%20-%20m%20-%20r.width))%20%2B%20%22px%22%3B%0A%20%20panel.style.right%20%3D%20%22auto%22%3B%0A%20%20panel.style.bottom%20%3D%20%22auto%22%3B%0A%7D%0Avar%20fit%20%3D%20window.ResizeObserver%20%3F%20new%20ResizeObserver(keepIn)%20%3A%20null%3B%0Aif%20(fit)%20fit.observe(panel)%3B%0AaddEventListener(%22resize%22%2C%20keepIn)%3B%0Apanel.addEventListener(%22pointerup%22%2C%20drop)%3B%0Apanel.addEventListener(%22pointercancel%22%2C%20drop)%3B%0Ahost.__close%20%3D%20close%3B%0Afunction%20mainOf(e)%20%7B%0A%20%20var%20first%20%3D%20null%3B%0A%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20e.p.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20var%20x%20%3D%20e.p%5Bi%5D%3B%0A%20%20%20%20if%20(typeof%20x%20%3D%3D%3D%20%22string%22%20%7C%7C%20!x.el)%20continue%3B%0A%20%20%20%20if%20(i%20%26%26%20typeof%20e.p%5Bi%20-%201%5D%20%3D%3D%3D%20%22string%22%20%26%26%20%2F%5Cu2192%20%24%2F.test(e.p%5Bi%20-%201%5D))%20return%20x%3B%0A%20%20%20%20if%20(!first)%20first%20%3D%20x%3B%0A%20%20%7D%0A%20%20return%20first%3B%0A%7D%0Avar%20api%20%3D%20%7B%0A%20%20report%3A%20function%20()%20%7B%20return%20aiText()%3B%20%7D%2C%0A%20%20log%3A%20function%20()%20%7B%0A%20%20%20%20return%20logs.map(function%20(e)%20%7B%0A%20%20%20%20%20%20var%20m%20%3D%20mainOf(e)%3B%0A%20%20%20%20%20%20return%20%7B%20time%3A%20clock(e.t)%2C%20result%3A%20e.k%2C%20check%3A%20e.f%2C%20wcag%3A%20wcagOf(e)%20%7C%7C%20null%2C%20text%3A%20e.p.map(partText).join(%22%22)%2C%20fixed%3A%20!!e.fixed%2C%20selector%3A%20m%20%3F%20sel(m.el)%20%7C%7C%20null%20%3A%20null%2C%20stop%3A%20m%20%26%26%20m.n%20%3F%20m.n%20%3A%20null%20%7D%3B%0A%20%20%20%20%7D)%3B%0A%20%20%7D%2C%0A%20%20play%3A%20function%20(o)%20%7B%0A%20%20%20%20o%20%3D%20o%20%7C%7C%20%7B%7D%3B%0A%20%20%20%20var%20skipOut%20%3D%20%5B%5D.concat(o.ignore%20%7C%7C%20%5B%5D)%3B%0A%20%20%20%20for%20(var%20i%20%3D%200%3B%20i%20%3C%20skipOut.length%3B%20i%2B%2B)%20%7B%0A%20%20%20%20%20%20try%20%7B%20document.querySelector(skipOut%5Bi%5D)%3B%20%7D%20catch%20(x)%20%7B%20return%20Promise.reject(new%20Error(%22Tab%20trail%3A%20%5C%22%22%20%2B%20skipOut%5Bi%5D%20%2B%20%22%5C%22%20in%20ignore%20is%20not%20a%20valid%20CSS%20selector.%22))%3B%20%7D%0A%20%20%20%20%7D%0A%20%20%20%20ignore%20%3D%20skipOut%3B%0A%20%20%20%20walkDelay%20%3D%20typeof%20o.delay%20%3D%3D%3D%20%22number%22%20%26%26%20o.delay%20%3E%3D%200%20%3F%20o.delay%20%3A%20400%3B%0A%20%20%20%20return%20new%20Promise(function%20(res)%20%7B%0A%20%20%20%20%20%20walkDone.push(res)%3B%0A%20%20%20%20%20%20if%20(!walking)%20%7B%0A%20%20%20%20%20%20%20%20walked%20%3D%20new%20Set()%3B%0A%20%20%20%20%20%20%20%20startWalk()%3B%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D)%3B%0A%20%20%7D%2C%0A%20%20problems%3A%20function%20()%20%7B%20return%20problemsOf(openProbs())%3B%20%7D%2C%0A%20%20state%3A%20function%20()%20%7B%20return%20%7B%20walked%3A%20walkedN()%2C%20total%3A%20stops.length%2C%20done%3A%20!walking%20%26%26%20walkEnd%20%3D%3D%3D%20%22done%22%20%26%26%20stops.every(function%20(x)%20%7B%20return%20hidTested.has(x)%3B%20%7D)%2C%20untested%3A%20untested()%20%7D%3B%20%7D%2C%0A%20%20regions%3A%20function%20()%20%7B%20return%20regions()%5B0%5D%3B%20%7D%2C%0A%20%20cost%3A%20function%20(q)%20%7B%0A%20%20%20%20if%20(q)%20%7B%0A%20%20%20%20%20%20var%20e%20%3D%20document.querySelector(q)%3B%0A%20%20%20%20%20%20return%20e%20%26%26%20stops.indexOf(e)%20%3E%3D%200%20%3F%20stops.indexOf(e)%20%2B%201%20%3A%20null%3B%0A%20%20%20%20%7D%0A%20%20%20%20return%20goals().map(function%20(g)%20%7B%20return%20%7B%20name%3A%20g.name%2C%20presses%3A%20g.presses%2C%20how%3A%20g.how%2C%20selector%3A%20sel(g.el)%20%7D%3B%20%7D)%3B%0A%20%20%7D%2C%0A%20%20version%3A%20VERSION%2C%0A%20%20close%3A%20function%20()%20%7B%20close()%3B%20%7D%0A%7D%3B%0Awindow.__tabTrail%20%3D%20api%3B%0Ax.addEventListener(%22click%22%2C%20close)%3B%0AaddEventListener(%22scroll%22%2C%20onMoved%2C%20%7B%20capture%3A%20true%2C%20passive%3A%20true%20%7D)%3B%0AaddEventListener(%22resize%22%2C%20onMoved)%3B%0Awatch.observe(document.documentElement%2C%20%7B%20subtree%3A%20true%2C%20childList%3A%20true%2C%20attributes%3A%20true%2C%20attributeFilter%3A%20%5B%22style%22%2C%20%22class%22%2C%20%22hidden%22%2C%20%22tabindex%22%2C%20%22disabled%22%2C%20%22inert%22%2C%20%22href%22%2C%20%22role%22%2C%20%22open%22%5D%20%7D)%3B%0AaddEventListener(%22keydown%22%2C%20key%2C%20true)%3B%0AaddEventListener(%22pointerdown%22%2C%20interrupt%2C%20true)%3B%0AaddEventListener(%22pointerdown%22%2C%20tap%2C%20true)%3B%0AaddEventListener(%22focusin%22%2C%20focus%2C%20true)%3B%0AaddEventListener(%22focusout%22%2C%20lose%2C%20true)%3B%0Aroot.addEventListener(%22focusin%22%2C%20function%20()%20%7B%0A%20%20if%20(root.activeElement%20%3D%3D%3D%20panel%20%26%26%20panel.tabIndex%20%3C%200)%20return%20panel.blur()%3B%0A%20%20focus()%3B%0A%7D)%3B%0Aroot.addEventListener(%22focusout%22%2C%20function%20()%20%7B%0A%20%20setTimeout(function%20()%20%7B%0A%20%20%20%20if%20(!panelIn%20%7C%7C%20closed%20%7C%7C%20inPanel())%20return%3B%0A%20%20%20%20var%20a%20%3D%20deep()%3B%0A%20%20%20%20if%20((!a%20%7C%7C%20a%20%3D%3D%3D%20document.body%20%7C%7C%20a%20%3D%3D%3D%20document.documentElement)%20%26%26%20Date.now()%20-%20tapT%20%3E%20600)%20return%20play.focus(%7B%20focusVisible%3A%20true%20%7D)%3B%0A%20%20%20%20panelIn%20%3D%20false%3B%0A%20%20%20%20pRet%20%3D%20null%3B%0A%20%20%20%20skipPanel()%3B%0A%20%20%7D%2C%200)%3B%0A%7D)%3B%0A%5B%22pointerdown%22%2C%20%22mousedown%22%2C%20%22pointerup%22%2C%20%22mouseup%22%2C%20%22click%22%5D.forEach(function%20(t)%20%7B%0A%20%20dot.addEventListener(t%2C%20pick)%3B%0A%20%20dotPg.addEventListener(t%2C%20pick)%3B%0A%7D)%3B%0Areview()%3B%0Afocus()%3B%0Adraw()%3B%0A%7D)()%3Bvoid%200";
|
|
6
6
|
export const GROUPS = [{"id":"red","title":"What it lists in red"},{"id":"read","title":"How to read the trail"},{"id":"work","title":"How to work with it"},{"id":"settings","title":"Settings"}];
|
|
7
|
-
export const FEATURES = [{"group":"red","wcag":"2.1.1 A","title":"Missed spots","short":"\"2 look clickable, but Tab skips them.\" Red boxes mark them.","long":"A red box marks something that looks clickable, like a box with a pointer cursor, a button role or a click handler in the HTML. The keyboard never gets there."},{"group":"red","wcag":"2.1.1 A, 2.4.7 AA","title":"Hover menus","short":"\"1 menu or box opens only on mouse hover.\"","long":"A menu that opens on mouse hover but never when Tab reaches it hides its links from keyboard users. Tab trail reads the page's CSS and marks each one with a red box."},{"group":"red","wcag":"2.4.3 A","title":"Forced order","short":"\"1 stop has tabindex above 0, which pulls it ahead of the page.\"","long":"An element with tabindex=\"5\" gets Tab before the rest of the page, wherever it sits. When that changes the order, it is listed in red: set it to 0 and move the element in the HTML instead. If it was first anyway, the Log only notes it."},{"group":"red","wcag":"2.4.11 AA","title":"Hidden focus","short":"\"1 stop is hidden when Tab reaches it.\" Under a sticky bar.","long":"When Tab lands on something a sticky header, a cookie bar or a chat button covers completely, the panel lists it in red. Click it to scroll it into view. Fix it and Tab there again: it leaves the list. This check is new in WCAG 2.2 AA."},{"group":"red","wcag":"2.1.2 A","title":"Keyboard trap","short":"\"1 stop where Tab gets stuck.\"","long":"When Tab and Shift+Tab both leave focus on the same spot, a keyboard user can't get out. The panel lists that stop in red, once, like \"2: Message\". A spot that keeps Tab but says how to leave, like a code editor, is not red."},{"group":"red","wcag":"2.4.3 A","title":"Lost focus","short":"\"1 popup loses focus when it closes.\"","long":"When a popup or cookie bar closes, focus should go back to the button that opened it. If it drops to the top of the page instead, the panel lists it in red, like \"2 → Start\"."},{"group":"red","wcag":"2.4.3 A","title":"Out of order","short":"\"1 time Tab jumped out of order.\"","long":"Each time Tab jumps out of order, the panel lists the jump in red. A popup that blocks the page must get Tab first, or it is flagged too."},{"group":"read","title":"Tab order","short":"Numbers show where Tab goes. The orange one is where you are.","long":"Each dot is 1 press of the Tab key, in the order the keyboard visits, and the one you are on turns orange. A line that jumps all over the page will confuse people."},{"group":"read","title":"Hidden links","short":"Skip links show as dashed dots.","long":"Some links stay hidden until Tab reaches them, like \"Skip to content\". They get a dashed dot in the top left corner."},{"group":"read","title":"Inside dialogs","short":"A dialog opens? The trail goes in too.","long":"When a page opens a modal dialog (the HTML <dialog> element), the trail goes in too and shows only the stops there. Close it and the page comes back."},{"group":"read","title":"Late arrivals","short":"Scroll, and new buttons get counted.","long":"It checks again as you scroll. Buttons that only appear later, like a back to top arrow, get counted too."},{"group":"read","title":"Big pages","short":"Over 50 stops? See 50 at a time.","long":"Over 50 stops, it shows 50 at a time. Next and Previous page through them, and Tab turns the page for you. Untick Show 50 stops at a time to see them all."},{"group":"work","title":"Copy for AI","short":"Paste the problems into your AI. It gets the fix.","long":"Copies only the problems, each with its WCAG rule, a CSS selector, the HTML, the component and a fix hint. Paste it into your coding AI and it knows where to look."},{"group":"work","title":"Out of the way","short":"Drag the panel anywhere, or send it to a corner.","long":"Grab the panel and drag it anywhere, or press the corner button to move it to the next corner. It only moves by itself to stay on screen when it grows, and Compact view under Settings keeps it small."},{"group":"work","title":"Play it","short":"No Tab key? Press Play, it walks every stop.","long":"Play moves focus through every stop for you and checks each one, then 1 line sums up all
|
|
7
|
+
export const FEATURES = [{"group":"red","wcag":"2.1.1 A","title":"Missed spots","short":"\"2 look clickable, but Tab skips them.\" Red boxes mark them.","long":"A red box marks something that looks clickable, like a box with a pointer cursor, a button role or a click handler in the HTML. The keyboard never gets there."},{"group":"red","wcag":"2.1.1 A, 2.4.7 AA","title":"Hover menus","short":"\"1 menu or box opens only on mouse hover.\"","long":"A menu that opens on mouse hover but never when Tab reaches it hides its links from keyboard users. Tab trail reads the page's CSS and marks each one with a red box."},{"group":"red","wcag":"2.4.3 A","title":"Forced order","short":"\"1 stop has tabindex above 0, which pulls it ahead of the page.\"","long":"An element with tabindex=\"5\" gets Tab before the rest of the page, wherever it sits. When that changes the order, it is listed in red: set it to 0 and move the element in the HTML instead. If it was first anyway, the Log only notes it."},{"group":"red","wcag":"2.4.11 AA","title":"Hidden focus","short":"\"1 stop is hidden when Tab reaches it.\" Under a sticky bar.","long":"When Tab lands on something a sticky header, a cookie bar or a chat button covers completely, the panel lists it in red. Click it to scroll it into view. Fix it and Tab there again: it leaves the list. This check is new in WCAG 2.2 AA."},{"group":"red","wcag":"2.1.2 A","title":"Keyboard trap","short":"\"1 stop where Tab gets stuck.\"","long":"When Tab and Shift+Tab both leave focus on the same spot, a keyboard user can't get out. The panel lists that stop in red, once, like \"2: Message\". A spot that keeps Tab but says how to leave, like a code editor, is not red."},{"group":"red","wcag":"2.4.3 A","title":"Lost focus","short":"\"1 popup loses focus when it closes.\"","long":"When a popup or cookie bar closes, focus should go back to the button that opened it. If it drops to the top of the page instead, the panel lists it in red, like \"2 → Start\"."},{"group":"red","wcag":"2.4.3 A","title":"Out of order","short":"\"1 time Tab jumped out of order.\"","long":"Each time Tab jumps out of order, the panel lists the jump in red. A popup that blocks the page must get Tab first, or it is flagged too."},{"group":"red","wcag":"2.4.7 AA","title":"No focus style","short":"\"2 stops show no focus when Tab is on them.\"","long":"Tab trail compares how a stop looks before and after it gets focus: its outline, shadow, border, colors, underline, its ::before and ::after, and its parent, sibling, label and first child, so a ring drawn around it counts. Nothing changed means keyboard users can't see where they are. Copy for AI names the CSS rule that removes the outline."},{"group":"red","wcag":"2.4.7 AA, 4.1.2 A","title":"Ghost stop","short":"\"7 stops you can't see when Tab is on them.\"","long":"Tab lands on something nobody can see: off screen, no size, transparent, or inside aria-hidden. Off-screen stops, like a closed phone menu, become 1 red strip at the edge they hide behind, with the range. A slide or menu that moves in on focus passes."},{"group":"red","wcag":"2.4.1 A","title":"Broken skip link","short":"\"1 skip link goes nowhere.\"","long":"A skip link among the first stops points at an id that is missing or hidden, so Enter does nothing. A red line runs to an X where the target should be. With no skip link and 15 or more stops before the main content, that is listed too."},{"group":"red","wcag":"2.1.2 A","title":"No way out","short":"\"1 popup has no keyboard way out.\"","long":"Tab goes round and round inside a popup, and none of its stops closes it. Tab trail never presses keys itself, so it judges your own Tab presses. A native dialog opened with showModal() is never red, because Escape closes it."},{"group":"red","wcag":"4.1.2 A","title":"Nameless stop","short":"\"3 stops have no name for screen readers.\"","long":"An icon button or image link with no text, no aria-label and no alt makes a screen reader say only \"button\" or \"link\". Hover any dot to see the name Tab trail found: \"3 · button · no name\"."},{"group":"read","title":"Tab order","short":"Numbers show where Tab goes. The orange one is where you are.","long":"Each dot is 1 press of the Tab key, in the order the keyboard visits, and the one you are on turns orange. A line that jumps all over the page will confuse people."},{"group":"read","title":"Hidden links","short":"Skip links show as dashed dots.","long":"Some links stay hidden until Tab reaches them, like \"Skip to content\". They get a dashed dot in the top left corner."},{"group":"read","title":"Inside dialogs","short":"A dialog opens? The trail goes in too.","long":"When a page opens a modal dialog (the HTML <dialog> element), the trail goes in too and shows only the stops there. Close it and the page comes back."},{"group":"read","title":"Late arrivals","short":"Scroll, and new buttons get counted.","long":"It checks again as you scroll. Buttons that only appear later, like a back to top arrow, get counted too."},{"group":"read","title":"Big pages","short":"Over 50 stops? See 50 at a time.","long":"Over 50 stops, it shows 50 at a time. Next and Previous page through them, and Tab turns the page for you. Untick Show 50 stops at a time to see them all."},{"group":"work","title":"Copy for AI","short":"Paste the problems into your AI. It gets the fix.","long":"Copies only the problems, each with its WCAG rule, a CSS selector, the HTML, the component and a fix hint. Paste it into your coding AI and it knows where to look."},{"group":"work","title":"Out of the way","short":"Drag the panel anywhere, or send it to a corner.","long":"Grab the panel and drag it anywhere, or press the corner button to move it to the next corner. It only moves by itself to stay on screen when it grows, and Compact view under Settings keeps it small."},{"group":"work","title":"Play it","short":"No Tab key? Press Play, it walks every stop.","long":"Play moves focus through every stop for you and checks each one, then 1 line sums up all 12 checks. It only moves focus, it never clicks."},{"group":"work","title":"The count","short":"Fix it, run it again, compare.","long":"The panel counts the stops and the spots Tab skips. Fix something, run it again and compare the numbers."},{"group":"work","title":"Find it","short":"Click a red spot in the list to see it.","long":"The panel lists every spot Tab never reaches, named by its label or text, 50 at a time. Click one and the page scrolls to it and outlines it."},{"group":"work","title":"Log","short":"See every check, the good ones too.","long":"Every check as it runs: OK, PROBLEM, SKIPPED with why, or INFO. Filter it, tick Show WCAG to see each rule, click a stop number to jump there, copy it for a bug report, or keep it live in a new tab."},{"group":"work","title":"Keyboard","short":"No mouse? Ctrl+Shift+F jumps into the panel.","long":"Press Ctrl+Shift+F, on a Mac and on Windows, and focus jumps to Play in the panel, where Tab reaches every button. Escape takes you back to the stop you were on."},{"group":"work","title":"Jump there","short":"Click a number and focus moves there.","long":"Click any number and focus moves to that spot, as if you had tabbed there. The next Tab goes on from it, and it is not counted as a jump."},{"group":"settings","title":"Spotlight","short":"Dim the page, light up where Tab is.","long":"Open Settings and tick Spotlight: the page goes dark except what Tab is on, so you follow it the way a keyboard user does. A missing focus ring is easy to spot, even for someone watching."},{"group":"settings","title":"Tab cost","short":"How many Tab presses to the goal?","long":"Lists up to 3 goals with the Tab presses it takes to reach them: the main content, buttons like Add to cart or Subscribe, and anything marked data-tab-trail-goal=\"Name\". Pick a goal lets you click any stop to add it. Each goal gets an orange ring and its number on the page."},{"group":"settings","title":"Region map","short":"Where do the Tab presses go?","long":"Counts the stops in the header, navigation, main content, sidebar and footer, as 1 bar. Click a part to tint that region on the page. It shows at a glance when the content is buried behind the menus."},{"group":"settings","title":"Show lines","short":"Just the numbers? Untick Show lines.","long":"Open Settings and untick Show lines, and only the numbered dots stay. Long lines turns grey until you tick Show lines again."},{"group":"settings","title":"Long lines","short":"Too many lines? Untick Long lines.","long":"Open Settings, untick Long lines, and no line is over 100 px. A longer one becomes 2 arrows, 1 from each stop. A line off screen becomes 1 arrow pointing its way."},{"group":"settings","title":"Out of Tab","short":"The panel stays out of the trail.","long":"Leave this panel out of Tab is ticked at first, so Tab never runs into the panel. Untick it and Tab reaches the panel's buttons too. Ctrl+Shift+F gets you in either way."}];
|
|
8
8
|
export const KEYS = {"title":"Keys","items":["Tab, Shift+Tab: Move along the trail.","Click a number: Focus jumps there. Click empty space and no stop is lit, so the next Tab is not judged.","Space, Tab, Escape: Pause Play. A click on the page pauses it too.","Ctrl+Shift+F: Jumps into the panel, on a Mac and on Windows. Escape takes you back to the stop you were on.","Escape: Closes it once you click empty space on the page, so the page's own menus keep Escape. The close button or the bookmark again close it too."]};
|
|
9
9
|
export const READ = {"items":["A green 0 means that check found nothing. A red number means it found something, and the chips under it take you there.","In the Log, OK passed, PROBLEM needs a fix, SKIPPED was not judged and says why, and INFO is a note.","Out of order is judged only for the Tab presses you make. Press Tab to the end, then Shift+Tab back.","Hidden focus is judged once the page stops scrolling. Press Play to test every stop.","Lost focus is judged only for the popups you open and close.","Everything is tested at your window size. Try a narrow window too."]};
|
|
10
10
|
export const QUIET = {"title":"When it stays quiet on purpose","items":["Tab reaches 1 item of a tab list, menu, list box, radio group, grid, tree or toolbar: the arrow keys do the rest, so the other items are not red.","A stop only partly under a sticky bar passes AA 2.4.11. The Log adds that AAA 2.4.12 wants it fully visible.","Jumps into or inside a popup are fine, and small bars that leave the page usable are never flagged.","A popup closed by a click outside it is not judged for Lost focus.","On a Mac, a Tab press that skips only links (Firefox) or only links and buttons (Safari) is SKIPPED, not a jump, until you turn on Tab for them.","Tab moving inside a date field, a video or a frame is SKIPPED: those have parts of their own.","After a skip link moves focus to the main content, the next Tab is judged from there, not from the top."]};
|
|
11
|
-
export const API = [{"call":"await window.__tabTrail.play({ ignore, delay })","gives":"Walks every stop, or until it is paused, then gives back the report. Call it again to go on. ignore is a list of CSS selectors to leave out, like a part broken on purpose. delay is the wait at each stop, 400 ms if you leave it out. An ignore entry that isn't valid CSS makes it fail with an error."},{"call":"window.__tabTrail.problems()","gives":"Every open problem as data, never cut short: id (the same on every run), check, wcag, selector, html, component, fix, verify."},{"call":"window.__tabTrail.report()","gives":"The Copy for AI text."},{"call":"window.__tabTrail.log()","gives":"Every Log line as data: time, result, check, wcag, text, fixed, selector, stop."},{"call":"window.__tabTrail.state()","gives":"{ walked, total, done, untested }. done is true once Play reached the end. untested names the checks that never ran, like Lost focus when no popup was opened, so a green test can tell a clean page from a check that was skipped."},{"call":"window.__tabTrail.version","gives":"\"VERSION\""},{"call":"window.__tabTrail.close()","gives":"Closes it."}];
|
|
12
|
-
export const LIMITS = ["It spots clickable things by the pointer cursor, button roles and onclick in the HTML. A link with no address and no pointer cursor, or a click handler added only by script, stays hidden.","It checks that Tab gets there, not that Enter or Space then works.","A loop that Tab never leaves, but Shift+Tab does, shows as Out of order, not Keyboard trap.","It doesn't compare Tab order with the order you see. If CSS moves things around, follow the numbers and check it yourself.","Play moves focus in Tab order without pressing the key, so code that listens for the Tab key only runs when you press Tab.","It
|
|
11
|
+
export const API = [{"call":"await window.__tabTrail.play({ ignore, delay })","gives":"Walks every stop, or until it is paused, then gives back the report. Call it again to go on. ignore is a list of CSS selectors to leave out, like a part broken on purpose. delay is the wait at each stop, 400 ms if you leave it out. An ignore entry that isn't valid CSS makes it fail with an error."},{"call":"window.__tabTrail.problems()","gives":"Every open problem as data, never cut short: id (the same on every run), check, wcag, selector, html, component, fix, verify."},{"call":"window.__tabTrail.report()","gives":"The Copy for AI text."},{"call":"window.__tabTrail.log()","gives":"Every Log line as data: time, result, check, wcag, text, fixed, selector, stop."},{"call":"window.__tabTrail.state()","gives":"{ walked, total, done, untested }. done is true once Play reached the end. untested names the checks that never ran, like Lost focus when no popup was opened, so a green test can tell a clean page from a check that was skipped."},{"call":"window.__tabTrail.cost(selector)","gives":"With a CSS selector, the Tab presses from the top of the page to that element, or null if Tab never reaches it. Without one, the goals Tab cost finds: name, presses, how it was found, selector."},{"call":"window.__tabTrail.regions()","gives":"How many stops sit in each region: { header, nav, main, aside, footer, other }."},{"call":"window.__tabTrail.version","gives":"\"VERSION\""},{"call":"window.__tabTrail.close()","gives":"Closes it."}];
|
|
12
|
+
export const LIMITS = ["It spots clickable things by the pointer cursor, button roles and onclick in the HTML. A link with no address and no pointer cursor, or a click handler added only by script, stays hidden.","It checks that Tab gets there, not that Enter or Space then works.","A loop that Tab never leaves, but Shift+Tab does, shows as Out of order, not Keyboard trap.","It doesn't compare Tab order with the order you see. If CSS moves things around, follow the numbers and check it yourself.","Play moves focus in Tab order without pressing the key, so code that listens for the Tab key only runs when you press Tab.","It checks that something changes when a stop gets focus, not how strong the change is (that is AAA), or what a screen reader says. Use Spotlight to look for yourself, and VoiceOver or NVDA to listen. Pages inside frames and web components with closed shadow roots are skipped.","Style sheets loaded from other sites without CORS can't be read, so hover menus styled there are not checked.","It's made for Chrome, Edge, Firefox and Safari on a desktop computer. On a Mac, turn on Tab for links first, and Firefox needs the console."];
|
|
13
13
|
export const VS = ["Accessibility Insights, ANDI, WAVE, taba11y, Polypane, Firefox's Show Tabbing Order and the paid axe DevTools keyboard test all number your Tab stops, and Insights and paid axe flag some Tab problems too. Chrome DevTools shows the order of the HTML, not the order Tab takes. Tab trail numbers them too, then checks the things below.","It reads your CSS for menus that open only for the mouse, tests every stop for focus hidden under a sticky bar, and catches focus lost when a popup closes.","It hands each problem to your AI with a selector and a fix hint, and gives your tests window.__tabTrail.","Use them together. Tab trail is the keyboard part."];
|
|
14
|
-
export const CHANGES = [{"v":"1.0.0","t":"First public release: every Tab stop in order, 7 checks in red with their WCAG rule, Play, Copy for AI and window.__tabTrail for tests."}];
|
|
14
|
+
export const CHANGES = [{"v":"1.1.0","t":"5 new checks and 2 new settings: focus you can see, skip links, popups with a way out, names, Tab cost, Region map."},{"v":"1.0.0","t":"First public release: every Tab stop in order, 7 checks in red with their WCAG rule, Play, Copy for AI and window.__tabTrail for tests."}];
|