var e;function t(t){if(typeof document>`u`)return 0;if(t||e===void 0){let t=document.createElement(`div`);t.style.width=`100%`,t.style.height=`200px`;let n=document.createElement(`div`),r=n.style;r.position=`absolute`,r.top=`0`,r.left=`0`,r.pointerEvents=`none`,r.visibility=`hidden`,r.width=`200px`,r.height=`150px`,r.overflow=`hidden`,n.appendChild(t),document.body.appendChild(n);let i=t.offsetWidth;n.style.overflow=`scroll`;let a=t.offsetWidth;i===a&&(a=n.clientWidth),document.body.removeChild(n),e=i-a}return e}function n(e){let n=e.match(/^(.*)px$/),r=Number(n?.[1]);return Number.isNaN(r)?t():r}function r(e){if(typeof document>`u`||!e||!(e instanceof Element))return{width:0,height:0};let{width:t,height:r}=getComputedStyle(e,`::-webkit-scrollbar`);return{width:n(t),height:n(r)}}exports.default=t,exports.getTargetScrollBarSize=r;