const initUnicornAnimation=(e=document)=>{let t=(t=e)=>{t.querySelectorAll("[data-canvas-type='unicorn']").forEach(e=>{let t=e.getAttribute("data-canvas-src"),n=e.getAttribute("data-canvas-project-id"),d={elementId:e.id};t?d.filePath=t:n&&(d.projectId=n),UnicornStudio.addScene(d).then(t=>{e.classList.add("loaded")})})},n=()=>{let e=document.getElementById("unicorn-js");if(e)e.onload=()=>{t()};else{let n=document.createElement("script");n.src="https://cdn.jsdelivr.net/gh/hiunicornstudio/unicornstudio.js@latest/dist/unicornStudio.umd.js",n.id="unicorn-js",document.body.appendChild(n),n.onload=()=>{t()}}},d=e.querySelectorAll("[data-canvas-type='unicorn']");if(d&&d.length>0){let a=!1;d.forEach(e=>{e.getAttribute("data-canvas-smart-lazy-load")&&(a=!0)}),a?(document.body.addEventListener("mouseover",n,{once:!0}),document.body.addEventListener("touchmove",n,{once:!0}),window.addEventListener("scroll",n,{once:!0}),document.body.addEventListener("keydown",n,{once:!0})):n()}};initUnicornAnimation();