import{dr as e,sn as t}from"./vendor-Dcerr41Y.js";import{nt as n}from"./vendor-quasar-CU_esu6y.js";import{$ as r,$i as i,Ht as a,Jt as o,Ut as s,Y as c,Yn as l,Yt as u,Zn as d,b as f,ra as p,ta as m,x as h,y as g}from"./ws-DjAvcWfg.js";import{bn as _,yn as v}from"./smart-playlist-store-U6zHlhLg.js";import{t as y}from"./Events-Bl5q4sx7.js";t(),p(),h(),_(),s(),u(),c(),l();var b=n(async()=>{if(r())return;console.debug(`[boot] Client Listeners`);let t=d(),n=g(),s=m()===`win32`&&i()==`universal`;(m()===`darwin`||s)&&(document.body.classList.add(`window-glass`),document.documentElement.classList.add(`window-glass`)),e(()=>n.debug?.mklite,e=>{globalThis.__MKLITE_DEBUG=!!e},{immediate:!0}),o(),a();let c=new Set;window.addEventListener(`blur`,()=>{if(f(`visual.pauseAnimatedOnBlur`)){let e=document.querySelectorAll(`.animated-artwork-video`);for(let t of e)t.paused||(t.pause(),c.add(t))}document.body.setAttribute(`window-blurred`,`true`),t.windowFocusState=`blurred`}),window.addEventListener(`focus`,()=>{for(let e of c)c.delete(e),e.isConnected&&e.play().catch(()=>{});document.body.removeAttribute(`window-blurred`),t.windowFocusState=`focused`}),window.addEventListener(`beforeunload`,()=>{y()}),v(n.general.keybindings)});export{b as default};