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