/**
 * Minified by jsDelivr using Terser v5.39.0.
 * Original file: /npm/@insite/utils@0.1.1/index.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
export let utils={getDistanceBetweenElements(t,e){const n=this.getPositionAtCenter(t),i=this.getPositionAtCenter(e);return Math.hypot(n.x-i.x,n.y-i.y)},getPositionAtCenter(t){const{top:e,left:n,width:i,height:r}=t.getBoundingClientRect();return{x:n+i/2,y:e+r/2}},getNextSibling(t,e){var n=t.nextElementSibling;if(!e)return n;for(;n;){if(n.matches(e))return n;n=n.nextElementSibling}},createButton(t){let e=document.createElement("button");return e.setAttribute("class",t),e},newButton(t){let e=document.createElement("button");for(const[n,i]of Object.entries(t))e.setAttribute(n,i);return e},createDiv(t){let e=document.createElement("div");return e.setAttribute("class",t),e},createLink(t,e,n){let i=document.createElement("a");return i.setAttribute("class",t),i.setAttribute("href",e),i.innerHTML=n,i},fadeOut(t){t.style.opacity=1,function e(){(t.style.opacity-=.1)<0?t.style.display="none":requestAnimationFrame(e)}()},fadeIn(t,e){t.style.opacity=0,t.style.display=e||"block",function e(){var n=parseFloat(t.style.opacity);(n+=.1)>1||(t.style.opacity=n,requestAnimationFrame(e))}()},debounce(t,e){let n;return function(){let i=arguments,r=this;clearTimeout(n),n=setTimeout((function(){t.apply(r,i)}),e)}}};
//# sourceMappingURL=/sm/7d34f34405a07770b071ec274cc281272e7ca9247bf91d71e1f48bfb8cd689fe.map