var e=`data-font-stylesheet`,t=0;function n(){let n=document.createElement(`link`);return n.rel=`stylesheet`,n.href=t===0?`api/fonts`:`api/fonts?v=${t}`,n.setAttribute(e,`true`),n}function r(){t++;let r=Array.from(document.head.querySelectorAll(`link[${e}]`)),i=n(),a=r.at(-1);a?a.after(i):document.head.appendChild(i),i.addEventListener(`load`,()=>{for(let e of r)e.remove()},{once:!0}),i.addEventListener(`error`,()=>i.remove(),{once:!0})}export{n,r as t};