PageSourceSearch

https://www.toyota.com/etc.clientlibs/tcom/clientlibs/clientlib-ta…nav.min.e1b4d0f9bd48e22fa0099483ab318958.js

js toyota.com collected 2026-09-24 07:49:47 UTC 7,222 bytes, 2 lines download raw bytes

1!function(){"use strict";window.TCOM_COMPONENT_LIST_CACHE||(window.TCOM_COMPONENT_LIST_CACHE=[]),window.TCOM_MUTATION_LIST_CACHE||(window.TCOM_MUTATION_LIST_CACHE=[]),window.TCOM_MUTATION_TOINIT||(window.TCOM_MUTATION_TOINIT=[]),window.TCOM_ENTRYPOINT_MUTATION_OBSERVER||(window.TCOM_ENTRYPOINT_MUTATION_OBSERVER=null),window.TCOM_ENTRYPOINT_MUTATION_OBSERVER_PROCESS||(window.TCOM_ENTRYPOINT_MUTATION_OBSERVER_PROCESS=null),window.TCOM_BIND_TIMEOUT||(window.TCOM_BIND_TO=null);function t(t,e){[...document.querySelectorAll(e)].forEach(i=>{const{autobind:s,bound:o}=i.dataset||{};if("false"!==s&&"true"!==o&&!i.closest('[data-prevent_entrypoint_init="true"]'))try{const s=function(t){const e=t.dataset;return Object.keys(e).filter(function(t){return t.split("cfg").length>1}).reduce(function(t,i){try{return t[i.split("cfg")[1].replace(/^([A-Z])/g,(t,e)=>e.toLowerCase())]=e[i],t}catch(t){return null}},{})}(i);new t({el:i,...s}),i.setAttribute("data-bound","true"),console.log("EntryPoint.initComponents: component bound",t.name||"",e)}catch(i){console.error("EntryPoint.initComponents: error binding component",t.name||"",e,i)}})}function e(){window.TCOM_BIND_TIMEOUT=!1,window.TCOM_COMPONENT_LIST_CACHE.forEach(({constructor:e,selector:i})=>{window.TCOM_MUTATION_TOINIT.indexOf(i)>-1&&t(e,i)}),window.TCOM_MUTATION_TOINIT.length=0}function i(t){window.TCOM_MUTATION_TOINIT.push(t),window.TCOM_BIND_TIMEOUT&&clearTimeout(window.TCOM_BIND_TIMEOUT),window.TCOM_BIND_TIMEOUT=setTimeout(e,340)}function s(){for(const t of window.TCOM_MUTATION_LIST_CACHE)if(t?.addedNodes?.length)for(const e of t.addedNodes)if(window.TCOM_COMPONENT_LIST_CACHE?.length)for(const s of window.TCOM_COMPONENT_LIST_CACHE){const{selector:o}=s;if(window.TCOM_MUTATION_TOINIT.indexOf(o)>-1)continue;const n="function"==typeof e.querySelectorAll?e.querySelectorAll(o):null,a="function"==typeof e.matches&&e.matches(o);(n?.length||t.target.matches(o)||a)&&i(o)}window.TCOM_MUTATION_LIST_CACHE.length=0}function o(){window.TCOM_ENTRYPOINT_MUTATION_OBSERVER||(window.TCOM_ENTRYPOINT_MUTATION_OBSERVER=new MutationObserver(t=>{t?.length&&(window.TCOM_MUTATION_LIST_CACHE=[...window.window.TCOM_MUTATION_LIST_CACHE,...t],window.TCOM_ENTRYPOINT_MUTATION_OBSERVER_PROCESS&&window.cancelAnimationFrame(window.TCOM_ENTRYPOINT_MUTATION_OBSERVER_PROCESS),window.TCOM_ENTRYPOINT_MUTATION_OBSERVER_PROCESS=window.requestAnimationFrame(s))}),window.TCOM_ENTRYPOINT_MUTATION_OBSERVER.observe(document.documentElement,{subtree:!0,childList:!0}))}var n=function(e,i){if(!e||!i)return;!function(t,e){window.TCOM_COMPONENT_LIST_CACHE.some(t=>t.selector===e)||window.TCOM_COMPONENT_LIST_CACHE.push({constructor:t,selector:e})}(e,i),t(e,i),document.querySelector(".xf-modal .modal-content")&&t(e,`.xf-modal ${i}`),document.addEventListener("DOMContentLoaded",o)};function a(t){let e=0;do{isNaN(t.offsetTop)||(e+=t.offsetTop)}while(t=t.offsetParent);return e}const r=window.location.pathname.endsWith("/")?window.location.pathname.slice(0,-1):window.location.pathname;new n(class{constructor(t){this.config={...t};let e=this.tabbedNav=this.config.el.closest(".tabbed-nav");this.tabbedNav&&(this.tabbedNavTop=this.tabbedNav.offsetTop,this.tabNav=this.config.el,this.tabNavLinks=this.config.el.querySelectorAll("a"),this.tabNavWrapper=this.config.el.closest(".tcom-nav-wrapper"),this.tabNavWrapper&&(this.prevArrow=this.tabNavWrapper.querySelector(".prev"),this.nextArrow=this.tabNavWrapper.querySelector(".next"),this.tabNavTargets=[],this.config.el.classList.contains("sticky")&&this.tabbedNav.classList.add("sticky"),new IntersectionObserver(function(t){0===t[0].intersectionRatio||1===t[0].intersectionRatio?e.classList.remove("is-stuck"):t[0].intersectionRatio<1&&t[0].intersectionRatio>0&&e.classList.add("is-stuck")},{root:null,rootMargin:"-1px 0px 0px 0px",threshold:[0,1]}).observe(e),this.initialize()))}initialize=()=>{this.setActiveClass(),this.updateScrollableSubnav(),this.step=this.tabNav.scrollWidth/this.tabNavLinks.length,this.updateScrollPosition=0,this.tabNavHeight=this.tabNav.offsetHeight,this.addEventListeners()};addEventListeners=()=>{window.addEventListener("resize",this.updateScrollableSubnav.bind(this)),window.addEventListener("scroll",t=>{clearTimeout(this.scrollTimeout),this.scrollTimeout=setTimeout(()=>{this.setActiveStateOnScroll()},100)}),this.config.el.addEventListener("click",this.handleEvent.bind(this)),this.tabNav.addEventListener("scroll",()=>this.updateFadeOut()),this.prevArrow.addEventListener("click",t=>{this.updateNavPosition(t,"left")}),this.nextArrow.addEventListener("click",t=>{this.updateNavPosition(t,"right")})};handleEvent(t){t.target.closest(".tcom-nav a")&&-1!==t.target.getAttribute("href").indexOf("#")&&(t.preventDefault(),this.setScrollValue(t),this.setActiveClass(t.target))}updateNavPosition(t,e){t.currentTarget.classList.contains("is-on")&&(this.tabNav.scrollLeft="left"==e?this.tabNav.scrollLeft-this.step:this.tabNav.scrollLeft+this.step)}updateScrollableSubnav(){const t=this.tabNav.querySelector("a.active")||this.tabNav.querySelector("a.is-on"),e=t?.offsetLeft,i=t?.offsetWidth;this.tabNav.scrollWidth!=this.tabNav.offsetWidth?(this.tabNavWrapper.classList.add("scrollable"),this.tabNav.scrollLeft=e-(i+20)||0):this.tabNavWrapper.classList.remove("scrollable"),this.updateFadeOut()}updateFadeOut(){const t=this.tabNav.scrollLeft,e=this.tabNav.scrollWidth,i=this.tabNav.offsetWidth;t>10?this.prevArrow.classList.add("is-on"):this.prevArrow.classList.remove("is-on"),t+i===e?this.nextArrow.classList.remove("is-on"):this.nextArrow.classList.add("is-on")}setActiveClass=t=>{if(this.tabNav.classList.contains("sly-set-active")||this.tabNav.classList.contains("tcom-accessories"))return;let e=!1,i=t&&t.getAttribute("href");this.tabNavLinks.forEach(t=>{t.classList.remove("active");const s=t.getAttribute("href");if(s){var o=s.endsWith("/")?s.slice(0,-1):s;const n=(o=o.replace(".html","")).split("/");if(i&&n[n.length-1]===i?(t.classList.add("active"),e=!0):t?.pathname!==r.replace(".html","")&&o!==r.replace(".html","")||(t.classList.add("active"),e=!0),s.startsWith("#")){const t=document.querySelector(s);t&&this.tabNavTargets.push(t)}}}),!e&&this.tabNavLinks&&this.tabNavLinks.length>0&&this.tabNavLinks[0].classList.add("active"),t&&(this.tabNav.scrollLeft=t.offsetLeft-window.innerWidth/2+t.offsetWidth/2)};setActiveStateOnScroll(){const{tabNavTargets:t}=this,{scrollY:e}=window,i=t=>{t&&!t.classList.contains("active")&&this.setActiveClass(t)};for(let e in t){const s=Number(e),o=t[s],n=t[s+1];if(!o||!o.id)continue;const r=this.tabNav.querySelector(`a[href="#${o.id}"]`);if(!r)continue;const c=150,l=a(o)-c,d=n?a(n)-c:l,T=0===s,h=s===t.length-1,N=!T&&!h,O=window.scrollY<=l,w=window.scrollY>=d,u=!O&&!w;if(T&&(u||O)){i(r);break}if(N&&u){i(r);break}if(h&&(u||w)){i(r);break}}}makeNavSticky(){this.tabbedNav.classList.contains("sticky")&&(window.pageYOffset>=this.tabbedNavTop?this.tabbedNav.classList.add("make-sticky"):this.tabbedNav.classList.remove("make-sticky"))}setScrollValue(t){const e=t.target.getAttribute("href");if(e.length>1){const t=document.querySelector(e);
1t.dataset.scrollValue=tcom_v2.dom.getOffsetTop(t)-this.tabNavHeight}}},".tcom-nav")}();
2//# sourceMappingURL=tabbednav.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.