async function d(n,a=[]){const m=e=>new Promise(i=>{const{animationTime:c,value:o="",isLoop:s}=e;n.style.setProperty("--time",`${c}s`),n.classList.add(o,"animated",r(s));const t=()=>{n.removeEventListener("animationend",t),n.removeEventListener("animationcancel",t),n.classList.remove(o,"animated",r(s)),n.style.removeProperty("--time"),i()};n.addEventListener("animationend",t),n.addEventListener("animationcancel",t)});for(let e=0,i=a.length;e<i;e++)await m(a[e])}function r(n){return n?"infinite":"no-infinite"}export{d as t};
