import{ref as o,onMounted as c,createBlock as i,openBlock as f,resolveDynamicComponent as m,withCtx as d,renderSlot as n,createCommentVNode as a,unref as s}from"/vue.js";import{D as y}from"./nc-main.DEgIQeOo.js";import"./service-worker.DGZzV4eE.js";const v=Object.assign({name:"nc-lazy"},{__name:"nc-lazy",props:{tag:{type:String,default:"div"}},setup(l){const t=o(!1),r=o(null),{stop:p,isSupported:u}=y(r,([{isIntersecting:e}])=>{console.debug("* nc-lazy isIntersecting",e),e&&(t.value=!0,p())});return c(()=>{u||(t.value=!0)}),(e,g)=>(f(),i(m(l.tag),{ref_key:"wrapper",ref:r,style:{minWidth:"1px",minHeight:"1px"}},{default:d(()=>[s(t)?n(e.$slots,"default",{key:0}):a("",!0),s(t)?a("",!0):n(e.$slots,"placeholder",{key:1})]),_:3},512))}});export{v as default};
