import{Z as g,B as y,E as z,$ as f}from"./app-CPb3bToC.js";import{g as w,O as c,m as O,x as v,y as m,l as x}from"./chunk-DhYw-kuD.js";function E(){const r=w(!g.value);return r.value===!1&&c(()=>{r.value=!0}),{isHydrated:r}}const h=typeof ResizeObserver<"u",b=h===!0?{}:{style:"display:block;position:absolute;top:0;left:0;right:0;bottom:0;height:100%;width:100%;overflow:hidden;pointer-events:none;z-index:-1;",url:"about:blank"},R=y({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(r,{emit:p}){let i=null,t,s={width:-1,height:-1};function u(e){e===!0||r.debounce===0||r.debounce==="0"?l():i===null&&(i=setTimeout(l,r.debounce))}function l(){if(i!==null&&(clearTimeout(i),i=null),t){const{offsetWidth:e,offsetHeight:n}=t;(e!==s.width||n!==s.height)&&(s={width:e,height:n},p("resize",s))}}const{proxy:a}=O();if(a.trigger=u,h===!0){let e;const n=d=>{t=a.$el.parentNode,t?(e=new ResizeObserver(u),e.observe(t),l()):d!==!0&&m(()=>{n(!0)})};return c(()=>{n()}),v(()=>{i!==null&&clearTimeout(i),e!==void 0&&(e.disconnect!==void 0?e.disconnect():t&&e.unobserve(t))}),z}else{let e=function(){i!==null&&(clearTimeout(i),i=null),o!==void 0&&(o.removeEventListener!==void 0&&o.removeEventListener("resize",u,f.passive),o=void 0)},n=function(){e(),t&&t.contentDocument&&(o=t.contentDocument.defaultView,o.addEventListener("resize",u,f.passive),l())};const{isHydrated:d}=E();let o;return c(()=>{m(()=>{t=a.$el,t&&n()})}),v(e),()=>{if(d.value===!0)return x("object",{class:"q--avoid-card-border",style:b.style,tabindex:-1,type:"text/html",data:b.url,"aria-hidden":"true",onLoad:n})}}}});export{R as Q};
