1import{At as e,Ct as t,Gn as n,Ln as r,Mt as i,St as a,Xn as o,_n as s,bt as c,dn as l,ii as u,jr as d,kt as f,lt as p,pt as m,ri as h,sn as g,wn as _,xr as v,xt as y,yt as b}from"./BPsVqlsv.js";import{C as x,t as S}from"./CTS8L1HF.js";import{i as C,l as w,o as T,t as E,u as D}from"./DFyp3QBT2.js";var O=[`id`],k=Object.assign(i({__name:`UiTooltip`,props:{text:{default:void 0},placement:{default:`top`},openDelay:{default:150},closeDelay:{default:0},disabled:{type:Boolean,default:!1}},setup(i){let k=i,A=v(!1),j=v(!1),M=r(),N=v(null),P=v(null),{floatingStyles:F}=E(N,P,{placement:b(()=>k.placement),middleware:[w(8),T(),D({padding:8})],whileElementsMounted:C}),I;function L(e,t){if(clearTimeout(I),!(k.disabled&&e)){if(t<=0){A.value=e;return}I=setTimeout(()=>{A.value=e},t)}}function R(){L(!0,k.openDelay)}function z(){L(!1,k.closeDelay)}l(()=>{j.value=!0}),g(()=>clearTimeout(I)),n(()=>k.disabled,e=>{e&&L(!1,0)});let B=null,V=null;return n(A,e=>{if(e){if(B=N.value?.firstElementChild??null,!B)return;V=B.getAttribute(`aria-describedby`);let e=V?`${V} ${M}`:M;B.setAttribute(`aria-describedby`,e);return}B&&(V?B.setAttribute(`aria-describedby`,V):B.removeAttribute(`aria-describedby`),B=null,V=null)}),(n,r)=>(s(),t(p,null,[c(`span`,{ref_key:`reference`,ref:N,class:`inline-flex`,"data-testid":`ui-tooltip-trigger`,onMouseenter:R,onMouseleave:z,onFocusin:R,onFocusout:z,onKeydown:r[0]||=x(e=>L(!1,0),[`escape`])},[_(n.$slots,`default`)],544),d(j)?(s(),y(m,{key:0,to:`body`},[e(S,{"enter-active-class":`transition-opacity duration-100 ease-out`,"enter-from-class":`opacity-0`,"leave-active-class":`transition-opacity duration-75 ease-in`,"leave-to-class":`opacity-0`},{default:o(()=>[d(A)?(s(),t(`div`,{key:0,id:d(M),ref_key:`floating`,ref:P,role:`tooltip`,"data-testid":`ui-tooltip`,class:`z-[70] max-w-xs rounded-ui bg-ink-900 px-2.5 py-1.5 text-xs text-white shadow-ui-lg`,style:h(d(F))},[_(n.$slots,`content`,{},()=>[f(u(i.text),1)])],12,O)):a(``,!0)]),_:3})])):a(``,!0)],64))}}),{__name:`UiTooltip`});export{k as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.