import{At as e,G as t,Nt as n,Pt as r,Rt as i,Tt as a,V as o,j as s,nt as c,vt as l}from"./vue-3bs2-dMU.js";import{Q as u,Z as d,_t as f,at as p,ct as m,et as h,ft as g,gt as _,ht as v,it as y,lt as b,mt as x,nt as S,pt as C,rt as w,st as T,tt as E,ut as D}from"./stores-DmetsdTd.js";t(),a(),g({mounted(e,t){let n=t.arg?.split(`,`)??!0;if(typeof t.value==`function`)d(n,t.value,{target:e});else{let[r,i]=t.value;d(n,r,{target:e,...i})}}});var O=g({mounted(e,t){typeof t.value==`function`?u(e,t.value,{modifiers:t.modifiers}):u(e,...t.value)}});g({mounted(e,t){let[n,r]=typeof t.value==`function`?[t.value,{}]:t.value,{height:i,bottom:a,left:o,right:s,top:c,width:u,x:d,y:f}=h(e,r);l([i,a,o,s,c,u,d,f],()=>n({height:i,bottom:a,left:o,right:s,top:c,width:u,x:d,y:f}))}}),g({mounted(e,t){let n=t.value;if(typeof n==`function`)l(E(e),e=>n(e));else{let[t,r]=n;l(E(e,r),e=>t(e))}}});var k=C?window:void 0;C&&window.document,C&&window.navigator,C&&window.location;function A(e){let t=i(e);return t?.$el??t}function j(){let e=r(!1),t=o();return t&&c(()=>{e.value=!0},t),e}function M(e){let t=j();return s(()=>(t.value,!!e()))}function N(e,t,n={}){let{window:r=k,...a}=n,o,c=M(()=>r&&`MutationObserver`in r),u=()=>{o&&=(o.disconnect(),void 0)},d=l(s(()=>{let t=_(i(e)).map(A).filter(x);return new Set(t)}),e=>{u(),c.value&&e.size&&(o=new MutationObserver(t),e.forEach(e=>o.observe(e,a)))},{immediate:!0,flush:`post`}),p=()=>o?.takeRecords(),m=()=>{d(),u()};return f(m),{isSupported:c,stop:m,takeRecords:p}}function P(e,t,n={}){let{window:r=k,...a}=n,o,c=M(()=>r&&`ResizeObserver`in r),u=()=>{o&&=(o.disconnect(),void 0)},d=l(s(()=>{let t=i(e);return Array.isArray(t)?t.map(e=>A(e)):[A(t)]}),e=>{if(u(),c.value&&r){o=new ResizeObserver(t);for(let t of e)t&&o.observe(t,a)}},{immediate:!0,flush:`post`}),p=()=>{u(),d()};return f(p),{isSupported:c,stop:p}}function F(e,t={}){let{observeMutation:i=!1,onUpdated:a,window:o=k}=t,c=r(!1),l=r(!1);function u(e){c.value=e.scrollWidth>e.offsetWidth,l.value=e.scrollHeight>e.offsetHeight}let d=a,f=s(()=>{let t=A(e);if(!(!t||t instanceof SVGElement))return t}),p=()=>{let e=f.value;return!e||e instanceof SVGElement?[]:[e,...Array.from(e.children).filter(e=>e instanceof HTMLElement)]};if(P(p,(e,t)=>{let n=f.value;n&&u(n),d?.(e,t)},{window:o}),i){let e=a;N(p,(t,n)=>{let r=f.value;r&&u(r),e?.(t,n)},{window:o,...typeof i==`object`?i:{childList:!0,subtree:!0,characterData:!0}})}return{isXOverflowed:n(c),isYOverflowed:n(l),stop,update:()=>{let e=f.value;e&&o&&u(e)}}}g({mounted(e,t){let[n,r]=typeof t.value==`function`?[t.value]:t.value,i=F(e,r),{isXOverflowed:a,isYOverflowed:o}=i;l([a,o],()=>n(i),{immediate:!0})}}),g({mounted(e,t){let n=typeof t.value==`function`?t.value:t.value?.[0],{width:r,height:i}=S(e,...typeof t.value==`function`?[]:t.value.slice(1));l([r,i],([e,t])=>n({width:e,height:t}),{immediate:!0})}}),g({mounted(e,t){if(typeof t.value==`function`){let n=t.value;l(w(e),e=>n(e),{immediate:!0})}else{let[n,r]=t.value;if(r?.controls){let t=w(e,r);l(t.isVisible,()=>n(t),{immediate:!0})}else l(w(e,r),e=>n(e),{immediate:!0})}}}),g({mounted(e,t){typeof t.value==`function`?y(e,t.value):y(e,...t.value)}}),g({mounted(e,t){typeof t.value==`function`?p(e,t.value):p(e,...t.value)}}),g({mounted(t,n){let[r,i]=typeof n.value==`function`?[n.value,{}]:n.value;l(v(e(T(t,i)),`stop`),e=>r(e))}}),g({mounted(e,t){typeof t.value==`function`?m(e,t.value):m(e,...t.value)}}),g({mounted(e,t){if(typeof t.value==`function`){let n=t.value,r=b(e,{onScroll(){n(r)},onStop(){n(r)}})}else{let[n,r]=t.value,i=b(e,{...r,onScroll(e){var t;(t=r.onScroll)==null||t.call(r,e),n(i)},onStop(e){var t;(t=r.onStop)==null||t.call(r,e),n(i)}})}}});function I(){let e=!1,t=r(!1);return g((n,r)=>{if(t.value=r.value,e)return;e=!0;let i=D(n,r.value);l(t,e=>i.value=e)})}I();export{O as t};