1(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="acd2b78d-9f7e-4828-9df9-51e4c46a8ec2",s._sentryDebugIdIdentifier="sentry-dbid-acd2b78d-9f7e-4828-9df9-51e4c46a8ec2")}catch{}})();const h=(s,t)=>{if(!t)return[...s];const e=t.toLowerCase();return s.filter(i=>i?.text?.toLowerCase().includes(e))},c=s=>s?!(s.outOfStock||s.disabled||s.defaultOptionOnly||s.isHeader||s.id==="none"):!1,a=(s,t,e)=>{if(t<=0)return 0;const i=s+e;return i>=t?0:i<0?t-1:i},d=(s,t)=>{const e=s.findIndex(i=>i.id===t);return e===-1?0:e},u="[data-option-row]";class f{root;items;autocomplete;onSelect;onKeyboard;optionsEl;triggerEl;selectorEl;open=!1;dirty=!1;filterString="";hoveredIndex=0;visible;current;constructor({root:t,items:e,autocomplete:i=!1,initialId:r,onSelect:n,onKeyboard:l}){this.root=t,this.items=e,this.autocomplete=i,this.onSelect=n,this.onKeyboard=l,this.visible=[...e],this.current=e[d(e,r)],this.optionsEl=t.querySelector("[data-options]"),this.triggerEl=t.querySelector("[data-trigger]"),this.selectorEl=t.querySelector("[data-selector]"),this.bind(),this.render(),t.selectorController=this,t.dispatchEvent(new CustomEvent("selector:ready",{detail:this,bubbles:!0}))}bind(){this.triggerEl?.addEventListener("click",()=>{this.setOpen(!this.open)}),this.autocomplete&&this.triggerEl instanceof HTMLInputElement&&(this.triggerEl.addEventListener("input",t=>{const e=t.target.value;this.dirty=!!this.current&&e!==this.current?.text,this.filterString=e,this.setOpen(!0),this.hoveredIndex=0,this.render()}),this.triggerEl.addEventListener("blur",()=>{this.dirty&&(this.dirty=!1,this.filterString="",this.render())}),this.triggerEl.addEventListener("focus",()=>this.triggerEl instanceof HTMLInputElement&&this.triggerEl.select())),this.optionsEl?.addEventListener("mousedown",t=>{t.preventDefault()}),this.optionsEl?.addEventListener("click",t=>{const e=t.target;if(e.closest("[data-no-options]")){this.dirty=!1,this.filterString="",this.setOpen(!1),this.render();return}const i=e.closest(u);i&&this.select(i.dataset.id)}),document.addEventListener("click",t=>{t.composedPath().includes(this.root)||this.setOpen(!1)}),this.root.addEventListener("keydown",t=>this.onKeyDown(t))}onKeyDown(t){if(this.onKeyboard?.(),!!this.open)switch(t.key){case"ArrowDown":t.preventDefault(),this.hoveredIndex=a(this.hoveredIndex,this.visible.length,1),this.render(),this.scrollHoveredIntoView();break;case"ArrowUp":t.preventDefault(),this.hoveredIndex=a(this.hoveredIndex,this.visible.length,-1),this.render(),this.scrollHoveredIntoView();break;case"Enter":t.preventDefault(),this.visible.length&&this.select(String(this.visible[Math.max(0,this.hoveredIndex)].id));break;case"Escape":case"Tab":this.setOpen(!1);break}}scrollHoveredIntoView(){const t=this.optionsEl?.querySelector(".hovered");t&&this.optionsEl&&(this.optionsEl.scrollTop=t.offsetTop)}select(t){if(t===void 0)return;const e=this.visible.find(i=>String(i.id)===t);c(e)&&(this.current=e,this.dirty=!1,this.filterString="",this.setOpen(!1),this.hoveredIndex=d(this.visible,e.id),this.render(),this.onSelect?.(e))}setOpen(t){if(t&&this.items.length<=1||this.open===t)return;if(this.open=t,this.selectorEl?.classList.toggle("open",t),t&&this.optionsEl&&!this.autocomplete){const i=this.optionsEl.getBoundingClientRect(),r=window.innerHeight||document.documentElement.clientHeight;this.optionsEl.classList.toggle("below-viewport",i.bottom>r)}const e=this.root.querySelector(".selector-dropdown-chevron");e?.classList.toggle("up",t),e?.classList.toggle("down",!t),this.optionsEl&&(this.optionsEl.hidden=!t)}render(){if(this.visible=h(this.items,this.filterString),this.optionsEl&&(this.optionsEl.innerHTML=this.visible.length?this.visible.map((t,e)=>this.renderRow(t,e)).join(""):'<div class="option" data-no-options data-option="no-options-found">No options found</div>'),this.triggerEl instanceof HTMLInputElement)this.triggerEl.value=this.dirty?this.filterString:this.current?.text??"";else if(this.triggerEl){const t=this.triggerEl.querySelector("[data-trigger-label]");t&&(t.textContent=this.current?.text??this.current?.label??"")}}renderRow(t,e){const i=["option"];t.isHeader&&i.push("group-header"),(t.disabled||t.outOfStock)&&i.push("disabled"),e===this.hoveredIndex&&i.push("hovered"),this.current&&t.id===this.current.id&&i.push("selected-option");const r=String(t.text??t.label??""),n=typeof t.flagCc=="string"&&/^[a-z]{2,3}$/i.test(t.flagCc)?t.flagCc.toLowerCase():null,l=n?`<span class="flag"><img class="flag" src="/assets/flags/${n}.svg" alt="" /></span>`:"";return`<div class="${i.join(" ")}" data-option-row data-id="${o(String(t.id))}" data-option="${o(r)}" tabindex="0" role="option">${l}<span>${o(r)}${t.suffix?" "+o(String(t.suffix)):""}</span></div>`}getValue(){return this.current}selectById(t){if(t==null)return;const e=this.items.find(i=>String(i.id).toLowerCase()===String(t).toLowerCase());e&&(this.current=e,this.hoveredIndex=d(this.items,e.id),this.render())}setItems(t){this.items.splice(0,this.items.length,...t),this.current&&!t.some(e=>
1e.id===this.current.id)&&(this.current=t[0]),this.render()}}const o=s=>s.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""");for(const s of document.querySelectorAll("[data-selector-root]")){if(s.dataset.bound)continue;s.dataset.bound="true";const t=JSON.parse(s.querySelector("[data-items]")?.textContent??"[]");new f({root:s,items:t,autocomplete:s.classList.contains("autocomplete"),initialId:s.dataset.initialId,onKeyboard:()=>s.classList.add("keyboard-user"),onSelect:e=>{s.dispatchEvent(new CustomEvent("selector:change",{detail:e,bubbles:!0}))}})}
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.