PageSourceSearch

https://www.codility.com/wp-content/plugins/codility-blocks/build/…/view.js?ver=27b7dab559db83e57417

js codility.com collected 2026-10-02 06:05:24 UTC 2,973 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t=0;function e(){if("function"!=typeof window.matchMedia)return!1;try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch(t){return!1}}document.addEventListener("DOMContentLoaded",function(){var n=document.querySelectorAll(".wp-block-codility-blocks-product-sections");if(n.length){var r=window.matchMedia("(max-width: 767px)");n.forEach(function(n){var i=n.querySelector(".product-sections__nav");if(i){var c=Array.from(i.querySelectorAll(".product-sections__link"));if(!(c.length<2)){var o=c.map(function(t){var e,n=null===(e=t.getAttribute("href"))||void 0===e?void 0:e.replace(/^#/,"");return n?document.getElementById(n):null}).filter(function(t){return Boolean(t)}),a="product-sections-panel-".concat(++t),s=document.createElement("div");s.className="product-sections__panel",s.id=a;var u=document.createElement("button");u.type="button",u.className="product-sections__trigger",u.setAttribute("aria-expanded","false"),u.setAttribute("aria-controls",a),c.forEach(function(t){return s.appendChild(t)}),i.appendChild(u),i.appendChild(s);var d=function(){var t=i.getBoundingClientRect().height;t>0&&n.style.setProperty("--cd-product-sections-nav-height","".concat(Math.round(t),"px"))};d(),window.addEventListener("resize",d);var l=0,f=function(){var t=c.find(function(t){return t.classList.contains("is-active")});t&&(u.innerHTML=t.innerHTML)},h=function(t){c.forEach(function(e){var n=e===t;e.classList.toggle("is-active",n),n?e.setAttribute("aria-current","location"):e.removeAttribute("aria-current")}),f()},p=function(t){i.classList.toggle("is-open",t),u.setAttribute("aria-expanded",t?"true":"false")};if(c.some(function(t){return t.classList.contains("is-active")})?f():h(c[0]),u.addEventListener("click",function(){r.matches&&p(!i.classList.contains("is-open"))}),i.addEventListener("keydown",function(t){"Escape"===t.key&&i.classList.contains("is-open")&&(t.preventDefault(),p(!1),u.focus())}),c.forEach(function(t){t.addEventListener("click",function(n){var i=t.getAttribute("href"),c=i&&i.startsWith("#")?i.slice(1):"",o=c?document.getElementById(c):null;if(h(t),r.matches&&p(!1),o){if(n.preventDefault(),o.scrollIntoView({behavior:e()?"auto":"smooth",block:"start"}),i&&"undefined"!=typeof history&&history.replaceState)try{history.replaceState(null,"",i)}catch(t){}l=performance.now()+800}})}),document.addEventListener("click",function(t){r.matches&&i.classList.contains("is-open")&&(n.contains(t.target)||p(!1))}),r.addEventListener("change",function(t){t.matches||p(!1)}),o.length&&"IntersectionObserver"in window){var v=new Set,m=new IntersectionObserver(function(t){if(!(performance.now()<l)){t.forEach(function(t){t.isIntersecting?v.add(t.target):v.delete(t.target)});var e=o.find(function(t){return v.has(t)});if(e){var n=c.find(function(t){return t.getAttribute("href")==="#".concat(e.id)});n&&h(n)}}},{rootMargin:"-20% 0px -60% 0px",threshold:0});o.forEach(function(t){return m.observe(t)})}}}})}})})();

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.