PageSourceSearch

https://www.amnesty.id/wp-content/plugins/humanity-custom-select/build/view.js?ver=10d9d691bc899b40409a

js amnesty.id collected 2026-10-02 06:12:53 UTC 4,813 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={627(){const e=({key:e})=>["ArrowUp","Up"].includes(e),t=({key:e})=>["ArrowDown","Down"].includes(e),n=({key:e})=>["ArrowLeft","Left"].includes(e),o=({key:e})=>["ArrowRight","Right"].includes(e),c=e,s=t,r=n,i=o,l=({metaKey:e,ctrlKey:t,altKey:n,shiftKey:o})=>e||t||n||o;let a,u=[],m=null;const f=new Map,d=new Map,h=new Map,v=(e,t)=>{t.classList.remove("is-active"),t.setAttribute("aria-expanded",!1)},p=()=>{f.forEach(v)},b=e=>{e.classList.contains("is-active")||p(),e.classList.toggle("is-active"),e.setAttribute("aria-expanded",e.classList.contains("is-active"))},S=function({groupSelector:e,textFilter:t}){return({key:n},o)=>{const c=t=>{if(!t.length)return;let n=-1;document.activeElement.closest(e)&&(m=document.activeElement,n=t.indexOf(m));const o=t[n+1]||t[0];o!==n&&(o.focus(),o.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"}))};clearTimeout(a),u.push(n.toLowerCase());const s=u.join(""),r=o.filter(e=>t(e,s));if(r.length)c(r);else{const e=s[0];c(o.filter(n=>t(n,e)))}a=setTimeout(()=>{u=[]},600)}}({groupSelector:".customSelect-list",textFilter:(e,t)=>0===e.nextElementSibling.textContent.toLowerCase().indexOf(t)}),y=(e,t={})=>{const n=new Event("change",{bubbles:!0});n.data=t,e.dispatchEvent(n)},g=a=>{const{target:u}=a;if((({key:e})=>["Esc","Escape"].includes(e))(a))return void p();const m=u.closest(".customSelect");if(m){if((({key:e})=>/^[a-zA-Z]$/.test(e))(a)&&!l(a)){const e=h.get(m);return void(m&&e&&S(a,e))}if((({key:e})=>["Enter"].includes(e))(a)||(({key:e})=>["Space","Spacebar"," "].includes(e))(a)){if(u.matches(".customSelect-button"))return void b(u);if(m?.matches(".is-nav")&&u?.matches('input[type="radio"]')){const{value:e}=u.parentElement.dataset;if(!e)return;const t=new URL(e);return void(window.location.href=t.href)}return m?.matches(".is-form")&&u?.matches('input[type="radio"]')&&m.submit(),void(m?.matches(".is-control")&&u?.matches('input[type="radio"]')&&(b(m.querySelector(".customSelect-button")),y(u,{input:u})))}if((c=>e(c)||t(c)||n(c)||o(c))(a)){if(l(a))return;if(s(a)){a.preventDefault();const e=f.get(u);let t;return t=e?e.querySelector(".customSelect-item input"):h.get(m).find(e=>e===u),t?.focus(),void t?.parentElement?.scrollIntoView({behavior:"auto",block:"nearest",container:"nearest",inline:"nearest"})}if(c(a)){const e=f.get(u);if(!e)return;a.preventDefault();const t=e.querySelector(".customSelect-item:last-child");return t.focus(),void t.scrollIntoView({behavior:"smooth",block:"nearest",container:"nearest",inline:"nearest"})}(r(a)||i(a))&&a.preventDefault()}}},w=e=>{if(!(e instanceof MouseEvent))return;const{target:t}=e,n=t.closest(".customSelect");if(n)if(t.matches(".customSelect-button"))b(t);else{if(n?.matches(".is-nav")&&t?.matches(".customSelect-item label")){const{value:e}=t.dataset;if(!e)return;try{const t=new URL(e);window.location.href=t.href}catch(t){window.location.hash=e}return}if(n?.matches(".is-form")&&t?.matches(".customSelect-item label"))return t.previousElementSibling.checked=!0,void n.submit();if(n?.matches(".is-control")&&t?.matches(".customSelect-item label")){t.previousElementSibling.checked=!0;const e=n.querySelector(".customSelect-button");return e.querySelector(".customSelect-buttonText").textContent=t.textContent,b(e),void y(t,{input:t.previousElementSibling})}if(!d.has(n)){const{children:e}=n.parentElement,t=Array.from(e).filter(e=>e.matches(".customSelect"));d.set(n,t)}d.get(n).filter(e=>e!==n).forEach(e=>{v(0,e.querySelector(".customSelect-button"))})}else p()};document.addEventListener("DOMContentLoaded",()=>{const e=Array.from(document.querySelectorAll(".customSelect"));e.length&&(e.forEach(e=>{const t=e.querySelector(".customSelect-button");f.set(t,e);const n=e.querySelectorAll(".customSelect-item input");h.set(e,Array.from(n))}),document.addEventListener("keyup",g),document.addEventListener("mouseup",w))})}};const t={};function n(o){const c=t[o];if(void 0!==c)return c.exports;const s=t[o]={exports:{}};return e[o](s,s.exports,n),s.exports}n.m=e,(()=>{const e=[];n.O=(t,o,c,s)=>{if(o){s=s||0;for(var r=e.length;r>0&&e[r-1][2]>s;r--)e[r]=e[r-1];return void(e[r]=[o,c,s])}let i=1/0;for(r=0;r<e.length;r++){let[o,c,s]=e[r],a=!0;for(var l=0;l<o.length;l++)(!1&s||i>=s)&&Object.keys(n.O).every(e=>n.O[e](o[l]))?o.splice(l--,1):(a=!1,s<i&&(i=s));if(a){e.splice(r--,1);const n=c();void 0!==n&&(t=n)}}return t}})(),n.o=(e,t)=>Object.hasOwn(e,t),(()=>{const e={552:0,525:0};n.O.j=t=>0===e[t];const t=(t,o)=>{let[c,s,r]=o;var i,l,a=0;if(c.some(t=>0!==e[t])){for(i in s)n.o(s,i)&&(n.m[i]=s[i]);if(r)var u=r(n)}for(t&&t(o);a<c.length;a++)l=c[a],n.o(e,l)&&e[l]&&e[l][0](),e[l]=0;return n.O(u)},o=globalThis.webpackChunkhumanity_custom_select||=[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))})();let o=n.O(void 0,[525],()=>n(627));o=n.O(o)})();

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.