Quickly understand trade-offs across performance, memory, and model size before selecting the right model for your exact needs.

). */ (function () { 'use strict'; var NAV_SELECTOR = '.c-advanced-sticky-nav'; var DEFAULT_OFFSET = 0; // px below the nav when a nav link has no data-offset // Force the same offset on EVERY nav link (overrides the per-item value from Sitecore). // The nav's own click handler reads data-offset at click time, so this makes nav clicks // and anchor links land identically for all sections. Set to null to keep Sitecore's values. var FORCE_OFFSET = 20; var STYLE_ID = 'sticky-nav-anchor-offset'; var SMOOTH_CLASS = 'sticky-nav-smooth-scroll'; // toggled on only while an anchor jump is in flight var SMOOTH_TIMEOUT = 1500; // ms safety net if `scrollend` never fires function getNav() { return document.querySelector(NAV_SELECTOR); } function getNavBottom(nav) { if (!nav) return 0; // CSS `top` (80px) + rendered height (60px) — stable whether or not the nav is currently stuck. var stickyTop = parseFloat(getComputedStyle(nav).top) || 0; return Math.round(stickyTop + nav.getBoundingClientRect().height); } // Returns [{ id, offset }] for every anchor the nav links to. function getTargets(nav) { var targets = []; var seen = {}; var links = nav.querySelectorAll('a[href*="#"]'); for (var i = 0; i < links.length; i++) { var href = links[i].getAttribute('href') || ''; var id = href.slice(href.indexOf('#') + 1); if (!id || seen[id]) continue; seen[id] = true; if (FORCE_OFFSET !== null && links[i].getAttribute('data-offset') !== String(FORCE_OFFSET)) { links[i].setAttribute('data-offset', String(FORCE_OFFSET)); // nav click handler reads this } var offset = parseInt(links[i].getAttribute('data-offset'), 10); targets.push({ id: id, offset: isNaN(offset) ? DEFAULT_OFFSET : offset }); } return targets; } function cssEscape(id) { return (window.CSS && CSS.escape) ? CSS.escape(id) : id.replace(/[^a-zA-Z0-9_-]/g, '\\$&'); } var lastCss = ''; function applyOffsets() { var nav = getNav(); var styleEl = document.getElementById(STYLE_ID); if (!nav) { if (styleEl) styleEl.remove(); // nav removed (e.g. client-side route change) lastCss = ''; return; } var navBottom = getNavBottom(nav); if (!navBottom) return; // not laid out yet var targets = getTargets(nav); var css = 'html { scroll-padding-top: ' + navBottom + 'px !important; }' + '\nhtml.' + SMOOTH_CLASS + ' { scroll-behavior: smooth; }'; for (var i = 0; i < targets.length; i++) { css += '\n#' + cssEscape(targets[i].id) + ' { scroll-margin-top: ' + targets[i].offset + 'px; }'; } if (css === lastCss) return; lastCss = css; if (!styleEl) { styleEl = document.createElement('style'); styleEl.id = STYLE_ID; document.head.appendChild(styleEl); } styleEl.textContent = css; } function getOffsetFor(id) { var nav = getNav(); if (!nav) return DEFAULT_OFFSET; var targets = getTargets(nav); for (var i = 0; i < targets.length; i++) { if (targets[i].id === id) return targets[i].offset; } return DEFAULT_OFFSET; } function scrollToHash(hash) { if (!hash || hash.length < 2) return; var id = decodeURIComponent(hash.slice(1)); var el = document.getElementById(id); if (!el) return; var y = el.getBoundingClientRect().top + window.pageYOffset - getNavBottom(getNav()) - getOffsetFor(id); window.scrollTo(0, Math.max(0, y)); } function debounce(fn, ms) { var t; return function () { clearTimeout(t); t = setTimeout(fn, ms); }; } function init() { applyOffsets(); var scheduled = debounce(applyOffsets, 100); // Header / nav height changes at responsive breakpoints. window.addEventListener('resize', scheduled); // React hydration / re-renders can replace the nav or the section anchors, // and a nav link's data-offset may change; regenerate the CSS when they do. if ('MutationObserver' in window) { new MutationObserver(scheduled).observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['data-offset', 'href'] }); } // Deep link (page opened with #Hash): the browser jumps before the offsets exist, // so correct the position once everything has loaded. if (location.hash) { window.addEventListener('load', function () { setTimeout(function () { applyOffsets(); scrollToHash(location.hash); }, 100); }); } // Animated scrolling for same-page anchor clicks outside the nav // (e.g. "Pre-optimized models" -> #Models). // // We let the browser perform its native jump (it honours scroll-padding-top / // scroll-margin-top and updates the hash), and just switch on // `scroll-behavior: smooth` for the duration of that jump. A permanent global // `html { scroll-behavior: smooth }` would break the sticky nav's own JS // animation, and intercepting with pushState makes the site router scroll twice. document.addEventListener('click', function (e) { var a = e.target.closest && e.target.closest('a[href*="#"]'); if (!a) return; var nav = getNav(); if (!nav || nav.contains(a)) return; // nav handles its own links var url; try { url = new URL(a.getAttribute('href'), location.href); } catch (err) { return; } if (url.origin !== location.origin || url.pathname !== location.pathname || !url.hash) return; if (!document.getElementById(decodeURIComponent(url.hash.slice(1)))) return; var html = document.documentElement; html.classList.add(SMOOTH_CLASS); var off = function () { html.classList.remove(SMOOTH_CLASS); }; if ('onscrollend' in window) window.addEventListener('scrollend', off, { once: true }); setTimeout(off, SMOOTH_TIMEOUT); }, true); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })();
AI Portal helps you and your coding agents find, evaluate, and optimize AI models, so you can focus on building applications. Optimize your own models for Arm, or use the Arm MCP Server to access AI Portal resources from the tools you already use. Explore the AI Portal Story or the Arm Community blog to learn more.