"use strict";const t=require("vue");function u(o,c){const e=t.ref(!1);let i=!1;if(typeof window!="object"||!("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype))return e;const n=new window.IntersectionObserver(r=>{const s=r[0];s&&(e.value=s.isIntersecting)},c);return t.onMounted(()=>{i=!0,o.value&&n.observe(o.value)}),t.onUnmounted(()=>{i=!1,n.disconnect()}),t.watch(o,r=>{i&&(n.disconnect(),e.value=!1,r&&n.observe(r))}),e}module.exports=u;
