import{c as i}from"./compute-scroll-into-view.6058b3be.js";function u(e){return e===Object(e)&&Object.keys(e).length!==0}function f(e,t){t===void 0&&(t="auto");var r="scrollBehavior"in document.body.style;e.forEach(function(n){var c=n.el,l=n.top,o=n.left;c.scroll&&r?c.scroll({top:l,left:o,behavior:t}):(c.scrollTop=l,c.scrollLeft=o)})}function a(e){return e===!1?{block:"end",inline:"nearest"}:u(e)?e:{block:"start",inline:"nearest"}}function m(e,t){var r=e.isConnected||e.ownerDocument.documentElement.contains(e);if(u(t)&&typeof t.behavior=="function")return t.behavior(r?i(e,t):[]);if(!!r){var n=a(t);return f(i(e,n),n.behavior)}}export{m as s};
