window.addEventListener(`message`,e=>{let t=document.getElementById(`name`),n=document.getElementById(`exit`),r=document.getElementById(`confirm`);if(e.data===`port`){let i=e.ports[0];i.onmessage=e=>{if(typeof e.data==`object`&&`isFocused`in e.data){Array.from(document.getElementsByTagName(`button`)).forEach(t=>{e.data.isFocused?t.classList.remove(`blurred`):t.classList.add(`blurred`)});return}let a=e.data;t.value=a,t.select();function o(){i.postMessage(t.value)}n.addEventListener(`click`,()=>{i.postMessage(a)}),r.addEventListener(`click`,o),window.addEventListener(`keydown`,e=>{e.code===`Enter`&&o()})}}});