import{g as y,c as m}from"./dom.44408ff4.js";import{r as E,m as z,o as f,c as x,j as h,n as L,z as p,h as O,g as S,k as w}from"./index.2c15b870.js";const _=[Element,String],T=[null,document,document.body,document.scrollingElement,document.documentElement];function k(e,n){let t=y(n);if(t===void 0){if(e==null)return window;t=e.closest(".scroll,.scroll-y,.overflow-auto")}return T.includes(t)?window:t}function N(e){return e===window?window.pageYOffset||window.scrollY||document.body.scrollTop||0:e.scrollTop}function P(e){return e===window?window.pageXOffset||window.scrollX||document.body.scrollLeft||0:e.scrollLeft}let u;function R(){if(u!==void 0)return u;const e=document.createElement("p"),n=document.createElement("div");m(e,{width:"100%",height:"200px"}),m(n,{position:"absolute",top:"0px",left:"0px",visibility:"hidden",width:"200px",height:"150px",overflow:"hidden"}),n.appendChild(e),document.body.appendChild(n);const t=e.offsetWidth;n.style.overflow="scroll";let o=e.offsetWidth;return t===o&&(o=n.clientWidth),n.remove(),u=t-o,u}function D(e,n=!0){return!e||e.nodeType!==Node.ELEMENT_NODE?!1:n?e.scrollHeight>e.clientHeight&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-y"])):e.scrollWidth>e.clientWidth&&(e.classList.contains("scroll")||e.classList.contains("overflow-auto")||["auto","scroll"].includes(window.getComputedStyle(e)["overflow-x"]))}function H(){const e=E(!z.value);return e.value===!1&&f(()=>{e.value=!0}),{isHydrated:e}}const b=typeof ResizeObserver!="undefined",g=b===!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"};var j=x({name:"QResizeObserver",props:{debounce:{type:[String,Number],default:100}},emits:["resize"],setup(e,{emit:n}){let t=null,o,s={width:-1,height:-1};function l(i){i===!0||e.debounce===0||e.debounce==="0"?c():t===null&&(t=setTimeout(c,e.debounce))}function c(){if(t!==null&&(clearTimeout(t),t=null),o){const{offsetWidth:i,offsetHeight:r}=o;(i!==s.width||r!==s.height)&&(s={width:i,height:r},n("resize",s))}}const{proxy:a}=S();if(a.trigger=l,b===!0){let i;const r=d=>{o=a.$el.parentNode,o?(i=new ResizeObserver(l),i.observe(o),c()):d!==!0&&p(()=>{r(!0)})};return f(()=>{r()}),h(()=>{t!==null&&clearTimeout(t),i!==void 0&&(i.disconnect!==void 0?i.disconnect():o&&i.unobserve(o))}),L}else{let d=function(){t!==null&&(clearTimeout(t),t=null),r!==void 0&&(r.removeEventListener!==void 0&&r.removeEventListener("resize",l,w.passive),r=void 0)},v=function(){d(),o&&o.contentDocument&&(r=o.contentDocument.defaultView,r.addEventListener("resize",l,w.passive),c())};const{isHydrated:i}=H();let r;return f(()=>{p(()=>{o=a.$el,o&&v()})}),h(d),()=>{if(i.value===!0)return O("object",{class:"q--avoid-card-border",style:g.style,tabindex:-1,type:"text/html",data:g.url,"aria-hidden":"true",onLoad:v})}}}}),Q=(e,n)=>{const t=e.__vccOpts||e;for(const[o,s]of n)t[o]=s;return t};export{j as Q,Q as _,N as a,P as b,R as c,k as g,D as h,_ as s};
