1 |
- import{b as m,c as w,i as y}from"./index-6280e224-1710127314903.js";import{V as v,y as _,r as h,cr as S,p as $}from"./index-b8f5ef44-1710127314903.js";function f(e){var n;const r=w(e);return(n=r==null?void 0:r.$el)!=null?n:r}const j=y?window:void 0;function M(){const e=h(!1);return S()&&$(()=>{e.value=!0}),e}function P(e){const n=M();return v(()=>(n.value,!!e()))}var c=Object.getOwnPropertySymbols,R=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,z=(e,n)=>{var r={};for(var t in e)R.call(e,t)&&n.indexOf(t)<0&&(r[t]=e[t]);if(e!=null&&c)for(var t of c(e))n.indexOf(t)<0&&g.call(e,t)&&(r[t]=e[t]);return r};function x(e,n,r={}){const t=r,{window:s=j}=t,d=z(t,["window"]);let o;const i=P(()=>s&&"ResizeObserver"in s),u=()=>{o&&(o.disconnect(),o=void 0)},b=v(()=>Array.isArray(e)?e.map(a=>f(a)):[f(e)]),O=_(b,a=>{if(u(),i.value&&s){o=new ResizeObserver(n);for(const p of a)p&&o.observe(p,d)}},{immediate:!0,flush:"post",deep:!0}),l=()=>{u(),O()};return m(l),{isSupported:i,stop:l}}export{x as u};
|