/** ARIA tabs. */ export declare const tabsJs = "(() => {\n const roots = [...document.querySelectorAll(\"[data-island=\\\"tabs\\\"]\")];\n for (const root of roots) {\n const tabs = [...root.querySelectorAll(\"[role=\\\"tab\\\"]\")];\n const panels = [...root.querySelectorAll(\"[role=\\\"tabpanel\\\"]\")];\n if (!tabs.length) continue;\n\n const select = (tab) => {\n for (const t of tabs) {\n const on = t === tab;\n t.setAttribute(\"aria-selected\", on ? \"true\" : \"false\");\n t.tabIndex = on ? 0 : -1;\n }\n const id = tab.getAttribute(\"aria-controls\");\n for (const p of panels) {\n p.hidden = p.id !== id;\n }\n };\n\n tabs.forEach((tab, i) => {\n tab.addEventListener(\"click\", () => select(tab));\n tab.addEventListener(\"keydown\", (e) => {\n if (!(e instanceof KeyboardEvent)) return;\n let next = i;\n if (e.key === \"ArrowRight\") next = (i + 1) % tabs.length;\n if (e.key === \"ArrowLeft\") next = (i - 1 + tabs.length) % tabs.length;\n if (next !== i) {\n e.preventDefault();\n tabs[next].focus();\n select(tabs[next]);\n }\n });\n });\n const initial = tabs.find((t) => t.getAttribute(\"aria-selected\") === \"true\") || tabs[0];\n select(initial);\n }\n})();\n";