function c(e){return typeof document<"u"?document.querySelector(e):null}function h(e){return e.split(/<[^>]+>/).map(t=>t.trim()).filter(t=>t.length>0).join(" ")}typeof Element<"u"&&!Element.prototype.scrollIntoViewIfNeeded&&(Element.prototype.scrollIntoViewIfNeeded=function(e){e=arguments.length===0?!0:!!e;const t=this.parentNode,i=window.getComputedStyle(t,void 0),r=parseInt(i.getPropertyValue("border-top-width"),10),f=parseInt(i.getPropertyValue("border-left-width"),10),o=this.offsetTop-t.offsetTop<t.scrollTop,n=this.offsetTop-t.offsetTop+this.clientHeight-r>t.scrollTop+t.clientHeight,s=this.offsetLeft-t.offsetLeft<t.scrollLeft,l=this.offsetLeft-t.offsetLeft+this.clientWidth-f>t.scrollLeft+t.clientWidth,p=o&&!n;(o||n)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-r+this.clientHeight/2),(s||l)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-f+this.clientWidth/2),(o||n||s||l)&&!e&&this.scrollIntoView(p)});const d=typeof window<"u"&&"HTMLElement"in window;export{d as IS_BROWSER,h as html2Str,c as querySelector};
