PageSourceSearch

https://www.nkvts.no/content/plugins/t2/build/block-library/accordion/view.js?ver=f0dbcaaa753069eccf59

js nkvts.no collected 2026-10-02 04:20:03 UTC 2,373 bytes, 1 lines download raw bytes

1!function(){"use strict";var e={n:function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,{a:n}),n},d:function(t,n){for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}},t=window.wp.domReady,n=e.n(t);let o=!1;function r({target:e}){if(o||document.querySelectorAll(".t2-accordion-item.is-focused").forEach(e=>e.classList.remove("is-focused")),!(e instanceof HTMLElement))return;const t=e.closest(".t2-accordion");if(t){const n=t.hasAttribute("data-allow-multiple"),o=t.querySelector('[aria-expanded="true"]');!n&&o&&o!==e&&(o.setAttribute("aria-expanded","false"),document.getElementById(o.getAttribute("aria-controls"))?.setAttribute("hidden",""))}const n=document.getElementById(e.getAttribute("aria-controls"));if("true"===e.getAttribute("aria-expanded"))return e.setAttribute("aria-expanded","false"),n?.setAttribute("hidden",""),void history.replaceState({},"",window.location.pathname+window.location.search);e.setAttribute("aria-expanded","true"),n?.removeAttribute("hidden"),history.replaceState({},"",`#${e.getAttribute("id")}`)}function i(e){if(!(e instanceof KeyboardEvent))return;const{target:t,key:n}=e;if(!(t instanceof HTMLElement))return;const o=t.closest(".t2-accordion");if(!o)return;const r=Array.from(o.querySelectorAll(".t2-accordion-trigger"));if(t.classList.contains("t2-accordion-trigger"))if(n.match(/ArrowUp|ArrowDown|PageUp|PageDown/)){const o=r.indexOf(t),i=n.match(/ArrowDown|PageDown/)?1:-1,{length:c}=r,a=(o+c+i)%c;r[a]?.focus(),e.preventDefault()}else if(n.match(/Home|End/)){switch(n){case"Home":r[0]?.focus();break;case"End":r[r.length-1]?.focus()}e.preventDefault()}}function c(e){e.addEventListener("click",r),e.addEventListener("focus",()=>{if(o){const t=e.closest(".t2-accordion-item");t?.classList.add("is-focused")}}),e.addEventListener("blur",()=>{const t=e.closest(".t2-accordion-item");t?.classList.remove("is-focused")}),e.getAttribute("id")===window.location.hash.replace("#","")&&e?.click();const t=e.closest(".t2-accordion");t&&t.addEventListener("keydown",i)}window.bindT2Accordions=()=>{document.querySelectorAll(".t2-accordion-trigger").forEach(c)},n()(()=>{window.bindT2Accordions(),document.addEventListener("keydown",()=>o=!0),document.addEventListener("mouseup",()=>o=!1)})}();

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.