System.register(["./offset.cjs.js"],function(_export,_context){"use strict";var o,t;function c(o){if(t.add(o),!document.body.classList.contains("nile-scroll-lock")){var _o=function(){var o=document.documentElement.clientWidth;return Math.abs(window.innerWidth-o);}();document.body.classList.add("nile-scroll-lock"),document.body.style.setProperty("--nile-scroll-lock-size","".concat(_o,"px"));}}function n(o){t["delete"](o),0===t.size&&(document.body.classList.remove("nile-scroll-lock"),document.body.style.removeProperty("--nile-scroll-lock-size"));}function e(t,c){var n=arguments.length>2&&arguments[2]!==undefined?arguments[2]:"vertical";var e=arguments.length>3&&arguments[3]!==undefined?arguments[3]:"smooth";var l=o(t,c),i=l.top+c.scrollTop,s=l.left+c.scrollLeft,r=c.scrollLeft,a=c.scrollLeft+c.offsetWidth,u=c.scrollTop,f=c.scrollTop+c.offsetHeight;"horizontal"!==n&&"both"!==n||(s<r?c.scrollTo({left:s,behavior:e}):s+t.clientWidth>a&&c.scrollTo({left:s-c.offsetWidth+t.clientWidth,behavior:e})),"vertical"!==n&&"both"!==n||(i<u?c.scrollTo({top:i,behavior:e}):i+t.clientHeight>f&&c.scrollTo({top:i-c.offsetHeight+t.clientHeight,behavior:e}));}_export({l:c,s:e,u:n});return{setters:[function(_offsetCjsJs){o=_offsetCjsJs.g;}],execute:function execute(){t=new Set();}};});
//# sourceMappingURL=scroll.cjs.js.map
