import{h as D,j as I,u as M,bh as W,a$ as z,af as B,r as h,D as w,q as S,k as j,l as P}from"./entry.39055499.js";function A(e){return D()?(I(e),!0):!1}function y(e){return typeof e=="function"?e():M(e)}const L=typeof window<"u"&&typeof document<"u",N=Object.prototype.toString,$=e=>N.call(e)==="[object Object]",O=()=>{},E=F();function F(){var e;return L&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent)}const _={mounted:"mounted",updated:"updated",unmounted:"unmounted"};function H(...e){if(e.length!==1)return W(...e);const t=e[0];return typeof t=="function"?z(B(()=>({get:t,set:O}))):h(t)}function m(e){var t;const o=y(e);return(t=o==null?void 0:o.$el)!=null?t:o}const b=L?window:void 0;function g(...e){let t,o,n,c;if(typeof e[0]=="string"||Array.isArray(e[0])?([o,n,c]=e,t=b):[t,o,n,c]=e,!t)return O;Array.isArray(o)||(o=[o]),Array.isArray(n)||(n=[n]);const i=[],l=()=>{i.forEach(a=>a()),i.length=0},s=(a,f,r,d)=>(a.addEventListener(f,r,d),()=>a.removeEventListener(f,r,d)),u=w(()=>[m(t),y(c)],([a,f])=>{if(l(),!a)return;const r=$(f)?{...f}:f;i.push(...o.flatMap(d=>n.map(p=>s(a,d,p,r))))},{immediate:!0,flush:"post"}),v=()=>{u(),l()};return A(v),v}let C=!1;function x(e,t,o={}){const{window:n=b,ignore:c=[],capture:i=!0,detectIframe:l=!1}=o;if(!n)return;E&&!C&&(C=!0,Array.from(n.document.body.children).forEach(r=>r.addEventListener("click",O)),n.document.documentElement.addEventListener("click",O));let s=!0;const u=r=>c.some(d=>{if(typeof d=="string")return Array.from(n.document.querySelectorAll(d)).some(p=>p===r.target||r.composedPath().includes(p));{const p=m(d);return p&&(r.target===p||r.composedPath().includes(p))}}),a=[g(n,"click",r=>{const d=m(e);if(!(!d||d===r.target||r.composedPath().includes(d))){if(r.detail===0&&(s=!u(r)),!s){s=!0;return}t(r)}},{passive:!0,capture:i}),g(n,"pointerdown",r=>{const d=m(e);d&&(s=!r.composedPath().includes(d)&&!u(r))},{passive:!0}),l&&g(n,"blur",r=>{setTimeout(()=>{var d;const p=m(e);((d=n.document.activeElement)==null?void 0:d.tagName)==="IFRAME"&&!(p!=null&&p.contains(n.document.activeElement))&&t(r)},0)})].filter(Boolean);return()=>a.forEach(r=>r())}const K={[_.mounted](e,t){const o=!t.modifiers.bubble;if(typeof t.value=="function")e.__onClickOutside_stop=x(e,t.value,{capture:o});else{const[n,c]=t.value;e.__onClickOutside_stop=x(e,n,Object.assign({capture:o},c))}},[_.unmounted](e){e.__onClickOutside_stop()}};function Y(){const e=h(!1);return j()&&P(()=>{e.value=!0}),e}function q(e){const t=Y();return S(()=>(t.value,!!e()))}function T(e,t,o={}){const{window:n=b,...c}=o;let i;const l=q(()=>n&&"ResizeObserver"in n),s=()=>{i&&(i.disconnect(),i=void 0)},u=S(()=>Array.isArray(e)?e.map(f=>m(f)):[m(e)]),v=w(u,f=>{if(s(),l.value&&n){i=new ResizeObserver(t);for(const r of f)r&&i.observe(r,c)}},{immediate:!0,flush:"post",deep:!0}),a=()=>{s(),v()};return A(a),{isSupported:l,stop:a}}function V(e,t={width:0,height:0},o={}){const{window:n=b,box:c="content-box"}=o,i=S(()=>{var u,v;return(v=(u=m(e))==null?void 0:u.namespaceURI)==null?void 0:v.includes("svg")}),l=h(t.width),s=h(t.height);return T(e,([u])=>{const v=c==="border-box"?u.borderBoxSize:c==="content-box"?u.contentBoxSize:u.devicePixelContentBoxSize;if(n&&i.value){const a=m(e);if(a){const f=n.getComputedStyle(a);l.value=Number.parseFloat(f.width),s.value=Number.parseFloat(f.height)}}else if(v){const a=Array.isArray(v)?v:[v];l.value=a.reduce((f,{inlineSize:r})=>f+r,0),s.value=a.reduce((f,{blockSize:r})=>f+r,0)}else l.value=u.contentRect.width,s.value=u.contentRect.height},o),w(()=>m(e),u=>{l.value=u?t.width:0,s.value=u?t.height:0}),{width:l,height:s}}const Q={[_.mounted](e,t){var o;const n=typeof t.value=="function"?t.value:(o=t.value)==null?void 0:o[0],c=typeof t.value=="function"?[]:t.value.slice(1),{width:i,height:l}=V(e,...c);w([i,l],([s,u])=>n({width:s,height:u}))}};function k(e){return typeof Window<"u"&&e instanceof Window?e.document.documentElement:typeof Document<"u"&&e instanceof Document?e.documentElement:e}function R(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const o=e.parentNode;return!o||o.tagName==="BODY"?!1:R(o)}}function X(e){const t=e||window.event,o=t.target;return R(o)?!1:t.touches.length>1?!0:(t.preventDefault&&t.preventDefault(),!1)}function G(e,t=!1){const o=h(t);let n=null,c;w(H(e),s=>{const u=k(y(s));if(u){const v=u;c=v.style.overflow,o.value&&(v.style.overflow="hidden")}},{immediate:!0});const i=()=>{const s=k(y(e));!s||o.value||(E&&(n=g(s,"touchmove",u=>{X(u)},{passive:!1})),s.style.overflow="hidden",o.value=!0)},l=()=>{const s=k(y(e));!s||!o.value||(E&&(n==null||n()),s.style.overflow=c,o.value=!1)};return A(l),S({get(){return o.value},set(s){s?i():l()}})}function U(){let e=!1;const t=h(!1);return(o,n)=>{if(t.value=n.value,e)return;e=!0;const c=G(o,n.value);w(t,i=>c.value=i)}}U();export{Q as a,K as v};
