1import{r as w,j as o,gz as S,ec as B,cV as D,cP as F}from"./constants.C-ElzX8V.js";import{u as L,o as W,a as $,f as z,s as C}from"./floating-ui.react.CXZRsFe-.js";import{a as K}from"./floating-ui.dom.DcxS7X_V.js";const N=t=>{var a,s,n;const e=(n=(s=(a=t==null?void 0:t.modifiers)==null?void 0:a.find(r=>r.name==="offset"))==null?void 0:s.options)==null?void 0:n.offset;return Array.isArray(e)?{mainAxis:e[1]||0,crossAxis:e[0]||0}:e??8},R=(t,e)=>{var n,r,i;const a=(n=t==null?void 0:t.modifiers)==null?void 0:n.find(l=>l.name==="flip");return(a==null?void 0:a.enabled)??e?z({fallbackPlacements:(((r=a==null?void 0:a.options)==null?void 0:r.fallbackPlacements)??["top-start","bottom-start"]).filter(l=>!l.startsWith("auto")),padding:((i=a==null?void 0:a.options)==null?void 0:i.padding)??120}):null},U=t=>{var s,n,r,i;const e=(s=t==null?void 0:t.modifiers)==null?void 0:s.find(l=>l.name==="preventOverflow");return(e==null?void 0:e.enabled)!==!1?C({padding:((n=e==null?void 0:e.options)==null?void 0:n.padding)??8,mainAxis:((r=e==null?void 0:e.options)==null?void 0:r.mainAxis)??!0,crossAxis:((i=e==null?void 0:e.options)==null?void 0:i.altAxis)??!1}):null},G=({options:t,placement:e="bottom",referenceElement:a,withArrow:s=!0,flipStatus:n=!0,children:r,onClose:i,style:l,...E})=>{var b,g;const[d,h]=w.useState(null);w.useEffect(()=>{if(!i)return;const y=M=>{M.key==="Escape"&&i()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[i]);const A=e.startsWith("auto")?"bottom":e,{x:j,y:P,strategy:T,refs:f,placement:k,middlewareData:c,isPositioned:V}=L({placement:A,strategy:(t==null?void 0:t.strategy)??"absolute",whileElementsMounted:K,elements:{reference:a},middleware:[W(N(t)),R(t,n),U(t),s&&d&&$({element:d})].filter(Boolean)}),m=(b=c.arrow)==null?void 0:b.x,u=(g=c.arrow)==null?void 0:g.y,x=!!a&&!!f.floating.current,p=o.jsx(F,{ref:h,style:{position:"absolute",left:m!=null?`${m}px`:"",top:u!=null?`${u}px`:""},"data-arrow":"TooltipArrow","data-hidden":!s});return o.jsxs(o.Fragment,{children:[!x&&o.jsx(S,{placement:e,options:t,referenceElement:a,withArrow:s,children:r}),o.jsx(B,{"data-testid":"TooltipView",ref:f.setFloating,style:V?{position:T,top:P??0,left:j??0,visibility:"visible",...l}:{position:"absolute",visibility:"hidden",pointerEvents:"none",display:"none"},"data-popper-placement":k,...E,children:x?o.jsxs(o.Fragment,{children:[o.jsx(D,{className:"tooltipContent",children:r}),p]}):p})]})};export{G as default}; 2//# sourceMappingURL=index.Gt79HNHv.js.map
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.