/* * React Tooltip * {@link https://github.com/ReactTooltip/react-tooltip} * @copyright ReactTooltip Team * @license MIT */ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("@floating-ui/dom"),o=require("classnames");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(e),n=l(o);const s="react-tooltip-core-styles",c="react-tooltip-base-styles",i={core:!1,base:!1};function a({css:e,id:t=c,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||i[o])return;if("core"===o&&"undefined"!=typeof process&&(null===(r=null===process||void 0===process?void 0:process.env)||void 0===r?void 0:r.REACT_TOOLTIP_DISABLE_CORE_STYLES))return;if("base"!==o&&"undefined"!=typeof process&&(null===(n=null===process||void 0===process?void 0:process.env)||void 0===n?void 0:n.REACT_TOOLTIP_DISABLE_BASE_STYLES))return;"core"===o&&(t=s),l||(l={});const{insertAt:a}=l;if(document.getElementById(t))return;const u=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.id=t,d.type="text/css","top"===a&&u.firstChild?u.insertBefore(d,u.firstChild):u.appendChild(d),d.styleSheet?d.styleSheet.cssText=e:d.appendChild(document.createTextNode(e)),i[o]=!0}const u=async({elementReference:e=null,tooltipReference:o=null,tooltipArrowReference:l=null,place:r="top",offset:n=10,strategy:s="absolute",middlewares:c=[t.offset(Number(n)),t.flip({fallbackAxisSideDirection:"start"}),t.shift({padding:5})],border:i})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===o)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=c;return l?(a.push(t.arrow({element:l,padding:5})),t.computePosition(e,o,{placement:r,strategy:s,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const s={left:`${e}px`,top:`${t}px`,border:i},{x:c,y:a}=null!==(r=l.arrow)&&void 0!==r?r:{x:0,y:0},u=null!==(n={top:"bottom",right:"left",bottom:"top",left:"right"}[o.split("-")[0]])&&void 0!==n?n:"bottom",d=i&&{borderBottom:i,borderRight:i};let p=0;if(i){const e=`${i}`.match(/(\d+)px/);p=(null==e?void 0:e[1])?Number(e[1]):1}return{tooltipStyles:s,tooltipArrowStyles:{left:null!=c?`${c}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):t.computePosition(e,o,{placement:"bottom",strategy:s,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))},d=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),p=(e,t,o)=>{let l=null;const r=function(...r){const n=()=>{l=null,o||e.apply(this,r)};o&&!l&&(e.apply(this,r),l=setTimeout(n,t)),o||(l&&clearTimeout(l),l=setTimeout(n,t))};return r.cancel=()=>{l&&(clearTimeout(l),l=null)},r},f=e=>null!==e&&!Array.isArray(e)&&"object"==typeof e,v=(e,t)=>{if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every(((e,o)=>v(e,t[o])));if(Array.isArray(e)!==Array.isArray(t))return!1;if(!f(e)||!f(t))return e===t;const o=Object.keys(e),l=Object.keys(t);return o.length===l.length&&o.every((o=>v(e[o],t[o])))},m=e=>{if(!(e instanceof HTMLElement||e instanceof SVGElement))return!1;const t=getComputedStyle(e);return["overflow","overflow-x","overflow-y"].some((e=>{const o=t.getPropertyValue(e);return"auto"===o||"scroll"===o}))},y=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(m(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},h="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,w=e=>{e.current&&(clearTimeout(e.current),e.current=null)},b="DEFAULT_TOOLTIP_ID",S={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},E={getTooltipData:()=>S},g=e.createContext(E);function A(t=b){return e.useContext(g).getTooltipData(t)}var _={tooltip:"core-styles-module_tooltip__3vRRp",fixed:"core-styles-module_fixed__pcSol",arrow:"core-styles-module_arrow__cvMwQ",noArrow:"core-styles-module_noArrow__xock6",clickable:"core-styles-module_clickable__ZuTTB",show:"core-styles-module_show__Nt9eE",closing:"core-styles-module_closing__sGnxF"},O={tooltip:"styles-module_tooltip__mnnfp",arrow:"styles-module_arrow__K0L3T",dark:"styles-module_dark__xNqje",light:"styles-module_light__Z6W-X",success:"styles-module_success__A2AKt",warning:"styles-module_warning__SCK0X",error:"styles-module_error__JvumD",info:"styles-module_info__BWdHW"};const k=({forwardRef:o,id:l,className:s,classNameArrow:c,variant:i="dark",anchorId:a,anchorSelect:d,place:f="top",offset:m=10,events:b=["hover"],openOnClick:S=!1,positionStrategy:E="absolute",middlewares:g,wrapper:k,delayShow:T=0,delayHide:R=0,float:C=!1,hidden:x=!1,noArrow:L=!1,clickable:N=!1,closeOnEsc:$=!1,closeOnScroll:I=!1,closeOnResize:j=!1,openEvents:B,closeEvents:q,globalCloseEvents:z,imperativeModeOnly:D,style:M,position:H,afterShow:P,afterHide:W,disableTooltip:V,content:F,contentWrapperRef:U,isOpen:K,defaultIsOpen:X=!1,setIsOpen:Y,activeAnchor:G,setActiveAnchor:Z,border:J,opacity:Q,arrowColor:ee,role:te="tooltip"})=>{var oe;const le=e.useRef(null),re=e.useRef(null),ne=e.useRef(null),se=e.useRef(null),ce=e.useRef(null),[ie,ae]=e.useState({tooltipStyles:{},tooltipArrowStyles:{},place:f}),[ue,de]=e.useState(!1),[pe,fe]=e.useState(!1),[ve,me]=e.useState(null),ye=e.useRef(!1),he=e.useRef(null),{anchorRefs:we,setActiveAnchor:be}=A(l),Se=e.useRef(!1),[Ee,ge]=e.useState([]),Ae=e.useRef(!1),_e=S||b.includes("click"),Oe=_e||(null==B?void 0:B.click)||(null==B?void 0:B.dblclick)||(null==B?void 0:B.mousedown),ke=B?{...B}:{mouseover:!0,focus:!0,mouseenter:!1,click:!1,dblclick:!1,mousedown:!1};!B&&_e&&Object.assign(ke,{mouseenter:!1,focus:!1,mouseover:!1,click:!0});const Te=q?{...q}:{mouseout:!0,blur:!0,mouseleave:!1,click:!1,dblclick:!1,mouseup:!1};!q&&_e&&Object.assign(Te,{mouseleave:!1,blur:!1,mouseout:!1});const Re=z?{...z}:{escape:$||!1,scroll:I||!1,resize:j||!1,clickOutsideAnchor:Oe||!1};D&&(Object.assign(ke,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(Te,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Re,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),h((()=>(Ae.current=!0,()=>{Ae.current=!1})),[]);const Ce=e=>{Ae.current&&(e&&fe(!0),setTimeout((()=>{Ae.current&&(null==Y||Y(e),void 0===K&&de(e))}),10))};e.useEffect((()=>{if(void 0===K)return()=>null;K&&fe(!0);const e=setTimeout((()=>{de(K)}),10);return()=>{clearTimeout(e)}}),[K]),e.useEffect((()=>{if(ue!==ye.current)if(w(ce),ye.current=ue,ue)null==P||P();else{const e=(e=>{const t=e.match(/^([\d.]+)(ms|s)$/);if(!t)return 0;const[,o,l]=t;return Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));ce.current=setTimeout((()=>{fe(!1),me(null),null==W||W()}),e+25)}}),[ue]);const xe=e=>{ae((t=>v(t,e)?t:e))},Le=(e=T)=>{w(ne),pe?Ce(!0):ne.current=setTimeout((()=>{Ce(!0)}),e)},Ne=(e=R)=>{w(se),se.current=setTimeout((()=>{Se.current||Ce(!1)}),e)},$e=e=>{var t;if(!e)return;const o=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;if(!(null==o?void 0:o.isConnected))return Z(null),void be({current:null});T?Le():Ce(!0),Z(o),be({current:o}),w(se)},Ie=()=>{N?Ne(R||100):R?Ne():Ce(!1),w(ne)},je=({x:e,y:t})=>{var o;const l={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};u({place:null!==(o=null==ve?void 0:ve.place)&&void 0!==o?o:f,offset:m,elementReference:l,tooltipReference:le.current,tooltipArrowReference:re.current,strategy:E,middlewares:g,border:J}).then((e=>{xe(e)}))},Be=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};je(o),he.current=o},qe=e=>{var t;if(!ue)return;const o=e.target;if(!o.isConnected)return;if(null===(t=le.current)||void 0===t?void 0:t.contains(o))return;[document.querySelector(`[id='${a}']`),...Ee].some((e=>null==e?void 0:e.contains(o)))||(Ce(!1),w(ne))},ze=p($e,50,!0),De=p(Ie,50,!0),Me=e=>{De.cancel(),ze(e)},He=()=>{ze.cancel(),De()},Pe=e.useCallback((()=>{var e,t;const o=null!==(e=null==ve?void 0:ve.position)&&void 0!==e?e:H;o?je(o):C?he.current&&je(he.current):(null==G?void 0:G.isConnected)&&u({place:null!==(t=null==ve?void 0:ve.place)&&void 0!==t?t:f,offset:m,elementReference:G,tooltipReference:le.current,tooltipArrowReference:re.current,strategy:E,middlewares:g,border:J}).then((e=>{Ae.current&&xe(e)}))}),[ue,G,F,M,f,null==ve?void 0:ve.place,m,E,H,null==ve?void 0:ve.position,C]);e.useEffect((()=>{var e,o;const l=new Set(we);Ee.forEach((e=>{(null==V?void 0:V(e))||l.add({current:e})}));const r=document.querySelector(`[id='${a}']`);r&&!(null==V?void 0:V(r))&&l.add({current:r});const n=()=>{Ce(!1)},s=y(G),c=y(le.current);Re.scroll&&(window.addEventListener("scroll",n),null==s||s.addEventListener("scroll",n),null==c||c.addEventListener("scroll",n));let i=null;Re.resize?window.addEventListener("resize",n):G&&le.current&&(i=t.autoUpdate(G,le.current,Pe,{ancestorResize:!0,elementResize:!0,layoutShift:!0}));const u=e=>{"Escape"===e.key&&Ce(!1)};Re.escape&&window.addEventListener("keydown",u),Re.clickOutsideAnchor&&window.addEventListener("click",qe);const d=[],p=e=>{ue&&(null==e?void 0:e.target)===G||$e(e)},f=e=>{ue&&(null==e?void 0:e.target)===G&&Ie()},v=["mouseover","mouseout","mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(ke).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:Me}):m.includes(e)&&d.push({event:e,listener:p}))})),Object.entries(Te).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:He}):m.includes(e)&&d.push({event:e,listener:f}))})),C&&d.push({event:"pointermove",listener:Be});const h=()=>{Se.current=!0},w=()=>{Se.current=!1,Ie()};return N&&!Oe&&(null===(e=le.current)||void 0===e||e.addEventListener("mouseenter",h),null===(o=le.current)||void 0===o||o.addEventListener("mouseleave",w)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.addEventListener(e,t)}))})),()=>{var e,t;Re.scroll&&(window.removeEventListener("scroll",n),null==s||s.removeEventListener("scroll",n),null==c||c.removeEventListener("scroll",n)),Re.resize?window.removeEventListener("resize",n):null==i||i(),Re.clickOutsideAnchor&&window.removeEventListener("click",qe),Re.escape&&window.removeEventListener("keydown",u),N&&!Oe&&(null===(e=le.current)||void 0===e||e.removeEventListener("mouseenter",h),null===(t=le.current)||void 0===t||t.removeEventListener("mouseleave",w)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t)}))}))}}),[G,Pe,pe,we,Ee,B,q,z,_e,T,R]),e.useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==ve?void 0:ve.anchorSelect)&&void 0!==e?e:d)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`);const r=new MutationObserver((e=>{const t=[],r=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===l?t.push(e.target):e.oldValue===l&&r.push(e.target)}if("childList"===e.type){if(G){const t=[...e.removedNodes].filter((e=>1===e.nodeType));if(o)try{r.push(...t.filter((e=>e.matches(o)))),r.push(...t.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}t.some((e=>{var t;return!!(null===(t=null==e?void 0:e.contains)||void 0===t?void 0:t.call(e,G))&&(fe(!1),Ce(!1),Z(null),w(ne),w(se),!0)}))}if(o)try{const l=[...e.addedNodes].filter((e=>1===e.nodeType));t.push(...l.filter((e=>e.matches(o)))),t.push(...l.flatMap((e=>[...e.querySelectorAll(o)])))}catch(e){}}})),(t.length||r.length)&&ge((e=>[...e.filter((e=>!r.includes(e))),...t]))}));return r.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"],attributeOldValue:!0}),()=>{r.disconnect()}}),[l,d,null==ve?void 0:ve.anchorSelect,G]),e.useEffect((()=>{Pe()}),[Pe]),e.useEffect((()=>{if(!(null==U?void 0:U.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>Pe()))}));return e.observe(U.current),()=>{e.disconnect()}}),[F,null==U?void 0:U.current]),e.useEffect((()=>{var e;const t=document.querySelector(`[id='${a}']`),o=[...Ee,t];G&&o.includes(G)||Z(null!==(e=Ee[0])&&void 0!==e?e:t)}),[a,Ee,G]),e.useEffect((()=>(X&&Ce(!0),()=>{w(ne),w(se)})),[]),e.useEffect((()=>{var e;let t=null!==(e=null==ve?void 0:ve.anchorSelect)&&void 0!==e?e:d;if(!t&&l&&(t=`[data-tooltip-id='${l.replace(/'/g,"\\'")}']`),t)try{const e=Array.from(document.querySelectorAll(t));ge(e)}catch(e){ge([])}}),[l,d,null==ve?void 0:ve.anchorSelect]),e.useEffect((()=>{ne.current&&(w(ne),Le(T))}),[T]);const We=null!==(oe=null==ve?void 0:ve.content)&&void 0!==oe?oe:F,Ve=ue&&Object.keys(ie.tooltipStyles).length>0;return e.useImperativeHandle(o,(()=>({open:e=>{if(null==e?void 0:e.anchorSelect)try{document.querySelector(e.anchorSelect)}catch(t){return void console.warn(`[react-tooltip] "${e.anchorSelect}" is not a valid CSS selector`)}me(null!=e?e:null),(null==e?void 0:e.delay)?Le(e.delay):Ce(!0)},close:e=>{(null==e?void 0:e.delay)?Ne(e.delay):Ce(!1)},activeAnchor:G,place:ie.place,isOpen:Boolean(pe&&!x&&We&&Ve)}))),pe&&!x&&We?r.default.createElement(k,{id:l,role:te,className:n.default("react-tooltip",_.tooltip,O.tooltip,O[i],s,`react-tooltip__place-${ie.place}`,_[Ve?"show":"closing"],Ve?"react-tooltip__show":"react-tooltip__closing","fixed"===E&&_.fixed,N&&_.clickable),onTransitionEnd:e=>{w(ce),ue||"opacity"!==e.propertyName||(fe(!1),me(null),null==W||W())},style:{...M,...ie.tooltipStyles,opacity:void 0!==Q&&Ve?Q:void 0},ref:le},We,r.default.createElement(k,{className:n.default("react-tooltip-arrow",_.arrow,O.arrow,c,L&&_.noArrow),style:{...ie.tooltipArrowStyles,background:ee?`linear-gradient(to right bottom, transparent 50%, ${ee} 50%)`:void 0},ref:re})):null},T=({content:e})=>r.default.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),R=r.default.forwardRef((({id:t,anchorId:o,anchorSelect:l,content:s,html:c,render:i,className:a,classNameArrow:u,variant:p="dark",place:f="top",offset:v=10,wrapper:m="div",children:y=null,events:h=["hover"],openOnClick:w=!1,positionStrategy:b="absolute",middlewares:S,delayShow:E=0,delayHide:g=0,float:_=!1,hidden:O=!1,noArrow:R=!1,clickable:C=!1,closeOnEsc:x=!1,closeOnScroll:L=!1,closeOnResize:N=!1,openEvents:$,closeEvents:I,globalCloseEvents:j,imperativeModeOnly:B=!1,style:q,position:z,isOpen:D,defaultIsOpen:M=!1,disableStyleInjection:H=!1,border:P,opacity:W,arrowColor:V,setIsOpen:F,afterShow:U,afterHide:K,disableTooltip:X,role:Y="tooltip"},G)=>{const[Z,J]=e.useState(s),[Q,ee]=e.useState(c),[te,oe]=e.useState(f),[le,re]=e.useState(p),[ne,se]=e.useState(v),[ce,ie]=e.useState(E),[ae,ue]=e.useState(g),[de,pe]=e.useState(_),[fe,ve]=e.useState(O),[me,ye]=e.useState(m),[he,we]=e.useState(h),[be,Se]=e.useState(b),[Ee,ge]=e.useState(null),[Ae,_e]=e.useState(null),Oe=e.useRef(H),{anchorRefs:ke,activeAnchor:Te}=A(t),Re=e=>null==e?void 0:e.getAttributeNames().reduce(((t,o)=>{var l;if(o.startsWith("data-tooltip-")){t[o.replace(/^data-tooltip-/,"")]=null!==(l=null==e?void 0:e.getAttribute(o))&&void 0!==l?l:null}return t}),{}),Ce=e=>{const t={place:e=>{var t;oe(null!==(t=e)&&void 0!==t?t:f)},content:e=>{J(null!=e?e:s)},html:e=>{ee(null!=e?e:c)},variant:e=>{var t;re(null!==(t=e)&&void 0!==t?t:p)},offset:e=>{se(null===e?v:Number(e))},wrapper:e=>{var t;ye(null!==(t=e)&&void 0!==t?t:m)},events:e=>{const t=null==e?void 0:e.split(" ");we(null!=t?t:h)},"position-strategy":e=>{var t;Se(null!==(t=e)&&void 0!==t?t:b)},"delay-show":e=>{ie(null===e?E:Number(e))},"delay-hide":e=>{ue(null===e?g:Number(e))},float:e=>{pe(null===e?_:"true"===e)},hidden:e=>{ve(null===e?O:"true"===e)},"class-name":e=>{ge(e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,o])=>{var l;null===(l=t[e])||void 0===l||l.call(t,o)}))};e.useEffect((()=>{J(s)}),[s]),e.useEffect((()=>{ee(c)}),[c]),e.useEffect((()=>{oe(f)}),[f]),e.useEffect((()=>{re(p)}),[p]),e.useEffect((()=>{se(v)}),[v]),e.useEffect((()=>{ie(E)}),[E]),e.useEffect((()=>{ue(g)}),[g]),e.useEffect((()=>{pe(_)}),[_]),e.useEffect((()=>{ve(O)}),[O]),e.useEffect((()=>{Se(b)}),[b]),e.useEffect((()=>{Oe.current!==H&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[H]),e.useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===H,disableBase:H}}))}),[]),e.useEffect((()=>{var e;const r=new Set(ke);let n=l;if(!n&&t&&(n=`[data-tooltip-id='${t.replace(/'/g,"\\'")}']`),n)try{document.querySelectorAll(n).forEach((e=>{r.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${n}" is not a valid CSS selector`)}const s=document.querySelector(`[id='${o}']`);if(s&&r.add({current:s}),!r.size)return()=>null;const c=null!==(e=null!=Ae?Ae:s)&&void 0!==e?e:Te.current,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!c||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Re(c);Ce(o)}))})),a={attributes:!0,childList:!1,subtree:!1};if(c){const e=Re(c);Ce(e),i.observe(c,a)}return()=>{i.disconnect()}}),[ke,Te,Ae,o,l]),e.useEffect((()=>{(null==q?void 0:q.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),P&&!d("border",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`border\`.`),(null==q?void 0:q.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),W&&!d("opacity",`${W}`)&&console.warn(`[react-tooltip] "${W}" is not a valid \`opacity\`.`)}),[]);let xe=y;const Le=e.useRef(null);if(i){const e=i({content:(null==Ae?void 0:Ae.getAttribute("data-tooltip-content"))||Z||null,activeAnchor:Ae});xe=e?r.default.createElement("div",{ref:Le,className:"react-tooltip-content-wrapper"},e):null}else Z&&(xe=Z);Q&&(xe=r.default.createElement(T,{content:Q}));const Ne={forwardRef:G,id:t,anchorId:o,anchorSelect:l,className:n.default(a,Ee),classNameArrow:u,content:xe,contentWrapperRef:Le,place:te,variant:le,offset:ne,wrapper:me,events:he,openOnClick:w,positionStrategy:be,middlewares:S,delayShow:ce,delayHide:ae,float:de,hidden:fe,noArrow:R,clickable:C,closeOnEsc:x,closeOnScroll:L,closeOnResize:N,openEvents:$,closeEvents:I,globalCloseEvents:j,imperativeModeOnly:B,style:q,position:z,isOpen:D,defaultIsOpen:M,border:P,opacity:W,arrowColor:V,setIsOpen:F,afterShow:U,afterHide:K,disableTooltip:X,activeAnchor:Ae,setActiveAnchor:e=>_e(e),role:Y};return r.default.createElement(k,{...Ne})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||a({css:`:root{--rt-color-white:#fff;--rt-color-dark:#222;--rt-color-success:#8dc572;--rt-color-error:#be6464;--rt-color-warning:#f0ad4e;--rt-color-info:#337ab7;--rt-opacity:0.9;--rt-transition-show-delay:0.15s;--rt-transition-closing-delay:0.15s}.core-styles-module_tooltip__3vRRp{position:absolute;top:0;left:0;pointer-events:none;opacity:0;will-change:opacity}.core-styles-module_fixed__pcSol{position:fixed}.core-styles-module_arrow__cvMwQ{position:absolute;background:inherit}.core-styles-module_noArrow__xock6{display:none}.core-styles-module_clickable__ZuTTB{pointer-events:auto}.core-styles-module_show__Nt9eE{opacity:var(--rt-opacity);transition:opacity var(--rt-transition-show-delay)ease-out}.core-styles-module_closing__sGnxF{opacity:0;transition:opacity var(--rt-transition-closing-delay)ease-in}`,type:"core"}),e.detail.disableBase||a({css:` .styles-module_tooltip__mnnfp{padding:8px 16px;border-radius:3px;font-size:90%;width:max-content}.styles-module_arrow__K0L3T{width:8px;height:8px}[class*='react-tooltip__place-top']>.styles-module_arrow__K0L3T{transform:rotate(45deg)}[class*='react-tooltip__place-right']>.styles-module_arrow__K0L3T{transform:rotate(135deg)}[class*='react-tooltip__place-bottom']>.styles-module_arrow__K0L3T{transform:rotate(225deg)}[class*='react-tooltip__place-left']>.styles-module_arrow__K0L3T{transform:rotate(315deg)}.styles-module_dark__xNqje{background:var(--rt-color-dark);color:var(--rt-color-white)}.styles-module_light__Z6W-X{background-color:var(--rt-color-white);color:var(--rt-color-dark)}.styles-module_success__A2AKt{background-color:var(--rt-color-success);color:var(--rt-color-white)}.styles-module_warning__SCK0X{background-color:var(--rt-color-warning);color:var(--rt-color-white)}.styles-module_error__JvumD{background-color:var(--rt-color-error);color:var(--rt-color-white)}.styles-module_info__BWdHW{background-color:var(--rt-color-info);color:var(--rt-color-white)}`,type:"base"})})),exports.Tooltip=R,exports.TooltipProvider=({children:t})=>{const[o,l]=e.useState({[b]:new Set}),[n,s]=e.useState({[b]:{current:null}}),c=(e,...t)=>{l((o=>{var l;const r=null!==(l=o[e])&&void 0!==l?l:new Set;return t.forEach((e=>r.add(e))),{...o,[e]:new Set(r)}}))},i=(e,...t)=>{l((o=>{const l=o[e];return l?(t.forEach((e=>l.delete(e))),{...o}):o}))},a=e.useCallback(((e=b)=>{var t,l;return{anchorRefs:null!==(t=o[e])&&void 0!==t?t:new Set,activeAnchor:null!==(l=n[e])&&void 0!==l?l:{current:null},attach:(...t)=>c(e,...t),detach:(...t)=>i(e,...t),setActiveAnchor:t=>((e,t)=>{s((o=>{var l;return(null===(l=o[e])||void 0===l?void 0:l.current)===t.current?o:{...o,[e]:t}}))})(e,t)}}),[o,n,c,i]),u=e.useMemo((()=>({getTooltipData:a})),[a]);return r.default.createElement(g.Provider,{value:u},t)},exports.TooltipWrapper=({tooltipId:t,children:o,className:l,place:s,content:c,html:i,variant:a,offset:u,wrapper:d,events:p,positionStrategy:f,delayShow:v,delayHide:m})=>{const{attach:y,detach:h}=A(t),w=e.useRef(null);return e.useEffect((()=>(y(w),()=>{h(w)})),[]),r.default.createElement("span",{ref:w,className:n.default("react-tooltip-wrapper",l),"data-tooltip-place":s,"data-tooltip-content":c,"data-tooltip-html":i,"data-tooltip-variant":a,"data-tooltip-offset":u,"data-tooltip-wrapper":d,"data-tooltip-events":p,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":v,"data-tooltip-delay-hide":m},o)},exports.removeStyle=function({type:e="base",id:t=c}={}){if(!i[e])return;"core"===e&&(t=s);const o=document.getElementById(t);"style"===(null==o?void 0:o.tagName)?null==o||o.remove():console.warn(`[react-tooltip] Failed to remove 'style' element with id '${t}'. Call \`injectStyle()\` first`),i[e]=!1};