Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-tooltip

Package Overview
Dependencies
Maintainers
6
Versions
344
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tooltip - npm Package Compare versions

Comparing version 5.25.2-beta.1148.6 to 5.25.2-beta.1149.0

2

dist/react-tooltip.umd.min.js

@@ -7,3 +7,3 @@ /*

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@floating-ui/dom"),require("classnames")):"function"==typeof define&&define.amd?define(["exports","react","@floating-ui/dom","classnames"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React,e.FloatingUIDOM,e.classNames)}(this,(function(e,t,o,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(t),c=r(l);const s="react-tooltip-core-styles",i="react-tooltip-base-styles",a={core:!1,base:!1};function u({css:e,id:t=i,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||a[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:c}=l;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const u=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.id=t,d.type="text/css","top"===c&&u.firstChild?u.insertBefore(d,u.firstChild):u.appendChild(d),d.styleSheet?d.styleSheet.cssText=e:d.appendChild(document.createTextNode(e)),a[o]=!0}const d=(e,t,o)=>{let l=null;return 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))}},p="DEFAULT_TOOLTIP_ID",f={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v={getTooltipData:()=>f},m=t.createContext(v);function y(e=p){return t.useContext(m).getTooltipData(e)}const h="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,w=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}))},S=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(w(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},b=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:l=null,place:r="top",offset:n=10,strategy:c="absolute",middlewares:s=[o.offset(Number(n)),o.flip({fallbackAxisSideDirection:"start"}),o.shift({padding:5})],border:i})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=s;return l?(a.push(o.arrow({element:l,padding:5})),o.computePosition(e,t,{placement:r,strategy:c,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const c={left:`${e}px`,top:`${t}px`,border:i},{x:s,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:c,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):o.computePosition(e,t,{placement:"bottom",strategy:c,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))};var E={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"},g={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 _=({forwardRef:e,id:l,className:r,classNameArrow:s,variant:i="dark",anchorId:a,anchorSelect:u,place:p="top",offset:f=10,events:v=["hover"],openOnClick:m=!1,positionStrategy:w="absolute",middlewares:_,wrapper:A,delayShow:T=0,delayHide:O=0,float:k=!1,hidden:R=!1,noArrow:C=!1,clickable:L=!1,closeOnEsc:x=!1,closeOnScroll:N=!1,closeOnResize:$=!1,openEvents:j,closeEvents:I,globalCloseEvents:B,imperativeModeOnly:D,style:q,position:z,afterShow:M,afterHide:H,content:P,contentWrapperRef:W,isOpen:F,setIsOpen:U,activeAnchor:K,setActiveAnchor:V,border:X,opacity:Y,arrowColor:G,role:Z="tooltip"})=>{var J;const Q=t.useRef(null),ee=t.useRef(null),te=t.useRef(null),oe=t.useRef(null),le=t.useRef(null),[re,ne]=t.useState(p),[ce,se]=t.useState({}),[ie,ae]=t.useState({}),[ue,de]=t.useState(!1),[pe,fe]=t.useState(!1),[ve,me]=t.useState(null),ye=t.useRef(!1),he=t.useRef(null),{anchorRefs:we,setActiveAnchor:Se}=y(l),be=t.useRef(!1),[Ee,ge]=t.useState([]),_e=t.useRef(!1),Ae=m||v.includes("click"),Te=Ae||(null==j?void 0:j.click)||(null==j?void 0:j.dblclick)||(null==j?void 0:j.mousedown),Oe=j?{...j}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!j&&Ae&&Object.assign(Oe,{mouseenter:!1,focus:!1,click:!0});const ke=I?{...I}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!I&&Ae&&Object.assign(ke,{mouseleave:!1,blur:!1});const Re=B?{...B}:{escape:x||!1,scroll:N||!1,resize:$||!1,clickOutsideAnchor:Te||!1};D&&(Object.assign(Oe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(ke,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Re,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),h((()=>(_e.current=!0,()=>{_e.current=!1})),[]);const Ce=e=>{_e.current&&(e&&fe(!0),setTimeout((()=>{_e.current&&(null==U||U(e),void 0===F&&de(e))}),10))};t.useEffect((()=>{if(void 0===F)return()=>null;F&&fe(!0);const e=setTimeout((()=>{de(F)}),10);return()=>{clearTimeout(e)}}),[F]),t.useEffect((()=>{if(ue!==ye.current)if(le.current&&clearTimeout(le.current),ye.current=ue,ue)null==M||M();else{const e=(e=>{const t=e.match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,o,l]=t;return"s"!==l&&"ms"!==l?0:Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));le.current=setTimeout((()=>{fe(!1),me(null),null==H||H()}),e+25)}}),[ue]);const Le=(e=T)=>{te.current&&clearTimeout(te.current),te.current=setTimeout((()=>{Ce(!0)}),e)},xe=(e=O)=>{oe.current&&clearTimeout(oe.current),oe.current=setTimeout((()=>{be.current||Ce(!1)}),e)},Ne=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 V(null),void Se({current:null});T?Le():Ce(!0),V(o),Se({current:o}),oe.current&&clearTimeout(oe.current)},$e=()=>{L?xe(O||100):O?xe():Ce(!1),te.current&&clearTimeout(te.current)},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})};b({place:null!==(o=null==ve?void 0:ve.place)&&void 0!==o?o:p,offset:f,elementReference:l,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:X}).then((e=>{Object.keys(e.tooltipStyles).length&&se(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ae(e.tooltipArrowStyles),ne(e.place)}))},Ie=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};je(o),he.current=o},Be=e=>{var t;if(!ue)return;const o=e.target;if(null===(t=Q.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),te.current&&clearTimeout(te.current))},De=d(Ne,50,!0),qe=d($e,50,!0),ze=t.useCallback((()=>{var e,t;const o=null!==(e=null==ve?void 0:ve.position)&&void 0!==e?e:z;o?je(o):k?he.current&&je(he.current):(null==K?void 0:K.isConnected)&&b({place:null!==(t=null==ve?void 0:ve.place)&&void 0!==t?t:p,offset:f,elementReference:K,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:X}).then((e=>{_e.current&&(Object.keys(e.tooltipStyles).length&&se(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ae(e.tooltipArrowStyles),ne(e.place))}))}),[ue,K,P,q,p,null==ve?void 0:ve.place,f,w,z,null==ve?void 0:ve.position,k]);t.useEffect((()=>{var e,t;const l=new Set(we);Ee.forEach((e=>{l.add({current:e})}));const r=document.querySelector(`[id='${a}']`);r&&l.add({current:r});const n=()=>{Ce(!1)},c=S(K),s=S(Q.current);Re.scroll&&(window.addEventListener("scroll",n),null==c||c.addEventListener("scroll",n),null==s||s.addEventListener("scroll",n));let i=null;Re.resize?window.addEventListener("resize",n):K&&Q.current&&(i=o.autoUpdate(K,Q.current,ze,{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",Be);const d=[],p=e=>{ue&&(null==e?void 0:e.target)===K||Ne(e)},f=e=>{ue&&(null==e?void 0:e.target)===K&&$e()},v=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Oe).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:De}):m.includes(e)&&d.push({event:e,listener:p}))})),Object.entries(ke).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:qe}):m.includes(e)&&d.push({event:e,listener:f}))})),k&&d.push({event:"mousemove",listener:Ie});const y=()=>{be.current=!0},h=()=>{be.current=!1,$e()};return L&&!Te&&(null===(e=Q.current)||void 0===e||e.addEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.addEventListener("mouseleave",h)),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==c||c.removeEventListener("scroll",n),null==s||s.removeEventListener("scroll",n)),Re.resize?window.removeEventListener("resize",n):null==i||i(),Re.clickOutsideAnchor&&window.removeEventListener("click",Be),Re.escape&&window.removeEventListener("keydown",u),L&&!Te&&(null===(e=Q.current)||void 0===e||e.removeEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.removeEventListener("mouseleave",h)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t)}))}))}}),[K,ze,pe,we,Ee,j,I,B,Ae]),t.useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==ve?void 0:ve.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l}']`);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)}if("childList"===e.type){if(K){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,K))&&(fe(!1),Ce(!1),V(null),te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current),!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"]}),()=>{r.disconnect()}}),[l,u,null==ve?void 0:ve.anchorSelect,K]),t.useEffect((()=>{ze()}),[ze]),t.useEffect((()=>{if(!(null==W?void 0:W.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>ze()))}));return e.observe(W.current),()=>{e.disconnect()}}),[P,null==W?void 0:W.current]),t.useEffect((()=>{var e;const t=document.querySelector(`[id='${a}']`),o=[...Ee,t];K&&o.includes(K)||V(null!==(e=Ee[0])&&void 0!==e?e:t)}),[a,Ee,K]),t.useEffect((()=>()=>{te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current)}),[]),t.useEffect((()=>{var e;let t=null!==(e=null==ve?void 0:ve.anchorSelect)&&void 0!==e?e:u;if(!t&&l&&(t=`[data-tooltip-id='${l}']`),t)try{const e=Array.from(document.querySelectorAll(t));ge(e)}catch(e){ge([])}}),[l,u,null==ve?void 0:ve.anchorSelect]);const Me=null!==(J=null==ve?void 0:ve.content)&&void 0!==J?J:P,He=ue&&Object.keys(ce).length>0;return t.useImperativeHandle(e,(()=>({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)?xe(e.delay):Ce(!1)},activeAnchor:K,place:re,isOpen:Boolean(pe&&!R&&Me&&He)}))),pe&&!R&&Me?n.default.createElement(A,{id:l,role:Z,className:c.default("react-tooltip",E.tooltip,g.tooltip,g[i],r,`react-tooltip__place-${re}`,E[He?"show":"closing"],He?"react-tooltip__show":"react-tooltip__closing","fixed"===w&&E.fixed,L&&E.clickable),onTransitionEnd:e=>{le.current&&clearTimeout(le.current),ue||"opacity"!==e.propertyName||(fe(!1),me(null),null==H||H())},style:{...q,...ce,opacity:void 0!==Y&&He?Y:void 0},ref:Q},Me,n.default.createElement(A,{className:c.default("react-tooltip-arrow",E.arrow,g.arrow,s,C&&E.noArrow),style:{...ie,background:G?`linear-gradient(to right bottom, transparent 50%, ${G} 50%)`:void 0},ref:ee})):null},A=({content:e})=>n.default.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),T=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),O=n.default.forwardRef((({id:e,anchorId:o,anchorSelect:l,content:r,html:s,render:i,className:a,classNameArrow:u,variant:d="dark",place:p="top",offset:f=10,wrapper:v="div",children:m=null,events:h=["hover"],openOnClick:w=!1,positionStrategy:S="absolute",middlewares:b,delayShow:E=0,delayHide:g=0,float:O=!1,hidden:k=!1,noArrow:R=!1,clickable:C=!1,closeOnEsc:L=!1,closeOnScroll:x=!1,closeOnResize:N=!1,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B=!1,style:D,position:q,isOpen:z,disableStyleInjection:M=!1,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,role:V="tooltip"},X)=>{const[Y,G]=t.useState(r),[Z,J]=t.useState(s),[Q,ee]=t.useState(p),[te,oe]=t.useState(d),[le,re]=t.useState(f),[ne,ce]=t.useState(E),[se,ie]=t.useState(g),[ae,ue]=t.useState(O),[de,pe]=t.useState(k),[fe,ve]=t.useState(v),[me,ye]=t.useState(h),[he,we]=t.useState(S),[Se,be]=t.useState(null),[Ee,ge]=t.useState(null),_e=t.useRef(M),{anchorRefs:Ae,activeAnchor:Te}=y(e),Oe=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}),{}),ke=e=>{const t={place:e=>{var t;ee(null!==(t=e)&&void 0!==t?t:p)},content:e=>{G(null!=e?e:r)},html:e=>{J(null!=e?e:s)},variant:e=>{var t;oe(null!==(t=e)&&void 0!==t?t:d)},offset:e=>{re(null===e?f:Number(e))},wrapper:e=>{var t;ve(null!==(t=e)&&void 0!==t?t:v)},events:e=>{const t=null==e?void 0:e.split(" ");ye(null!=t?t:h)},"position-strategy":e=>{var t;we(null!==(t=e)&&void 0!==t?t:S)},"delay-show":e=>{ce(null===e?E:Number(e))},"delay-hide":e=>{ie(null===e?g:Number(e))},float:e=>{ue(null===e?O:"true"===e)},hidden:e=>{pe(null===e?k:"true"===e)},"class-name":e=>{be(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)}))};t.useEffect((()=>{G(r)}),[r]),t.useEffect((()=>{J(s)}),[s]),t.useEffect((()=>{ee(p)}),[p]),t.useEffect((()=>{oe(d)}),[d]),t.useEffect((()=>{re(f)}),[f]),t.useEffect((()=>{ce(E)}),[E]),t.useEffect((()=>{ie(g)}),[g]),t.useEffect((()=>{ue(O)}),[O]),t.useEffect((()=>{pe(k)}),[k]),t.useEffect((()=>{we(S)}),[S]),t.useEffect((()=>{_e.current!==M&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[M]),t.useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===M,disableBase:M}}))}),[]),t.useEffect((()=>{var t;const r=new Set(Ae);let n=l;if(!n&&e&&(n=`[data-tooltip-id='${e}']`),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 c=document.querySelector(`[id='${o}']`);if(c&&r.add({current:c}),!r.size)return()=>null;const s=null!==(t=null!=Ee?Ee:c)&&void 0!==t?t:Te.current,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Oe(s);ke(o)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Oe(s);ke(e),i.observe(s,a)}return()=>{i.disconnect()}}),[Ae,Te,Ee,o,l]),t.useEffect((()=>{(null==D?void 0:D.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),H&&!T("border",`${H}`)&&console.warn(`[react-tooltip] "${H}" is not a valid \`border\`.`),(null==D?void 0:D.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),P&&!T("opacity",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`opacity\`.`)}),[]);let Re=m;const Ce=t.useRef(null);if(i){const e=i({content:null!=Y?Y:null,activeAnchor:Ee});Re=e?n.default.createElement("div",{ref:Ce,className:"react-tooltip-content-wrapper"},e):null}else Y&&(Re=Y);Z&&(Re=n.default.createElement(A,{content:Z}));const Le={forwardRef:X,id:e,anchorId:o,anchorSelect:l,className:c.default(a,Se),classNameArrow:u,content:Re,contentWrapperRef:Ce,place:Q,variant:te,offset:le,wrapper:fe,events:me,openOnClick:w,positionStrategy:he,middlewares:b,delayShow:ne,delayHide:se,float:ae,hidden:de,noArrow:R,clickable:C,closeOnEsc:L,closeOnScroll:x,closeOnResize:N,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B,style:D,position:q,isOpen:z,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,activeAnchor:Ee,setActiveAnchor:e=>ge(e),role:V};return n.default.createElement(_,{...Le})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||u({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||u({css:`
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("@floating-ui/dom"),require("classnames")):"function"==typeof define&&define.amd?define(["exports","react","@floating-ui/dom","classnames"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React,e.FloatingUIDOM,e.classNames)}(this,(function(e,t,o,l){"use strict";function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(t),c=r(l);const s="react-tooltip-core-styles",i="react-tooltip-base-styles",a={core:!1,base:!1};function u({css:e,id:t=i,type:o="base",ref:l}){var r,n;if(!e||"undefined"==typeof document||a[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:c}=l;if(document.getElementById(t))return void console.warn(`[react-tooltip] Element with id '${t}' already exists. Call \`removeStyle()\` first`);const u=document.head||document.getElementsByTagName("head")[0],d=document.createElement("style");d.id=t,d.type="text/css","top"===c&&u.firstChild?u.insertBefore(d,u.firstChild):u.appendChild(d),d.styleSheet?d.styleSheet.cssText=e:d.appendChild(document.createTextNode(e)),a[o]=!0}const d=(e,t,o)=>{let l=null;return 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))}},p="DEFAULT_TOOLTIP_ID",f={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v={getTooltipData:()=>f},m=t.createContext(v);function y(e=p){return t.useContext(m).getTooltipData(e)}const h="undefined"!=typeof window?t.useLayoutEffect:t.useEffect,w=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}))},S=e=>{if(!e)return null;let t=e.parentElement;for(;t;){if(w(t))return t;t=t.parentElement}return document.scrollingElement||document.documentElement},b=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:l=null,place:r="top",offset:n=10,strategy:c="absolute",middlewares:s=[o.offset(Number(n)),o.flip({fallbackAxisSideDirection:"start"}),o.shift({padding:5})],border:i})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{},place:r};const a=s;return l?(a.push(o.arrow({element:l,padding:5})),o.computePosition(e,t,{placement:r,strategy:c,middleware:a}).then((({x:e,y:t,placement:o,middlewareData:l})=>{var r,n;const c={left:`${e}px`,top:`${t}px`,border:i},{x:s,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:c,tooltipArrowStyles:{left:null!=s?`${s}px`:"",top:null!=a?`${a}px`:"",right:"",bottom:"",...d,[u]:`-${4+p}px`},place:o}}))):o.computePosition(e,t,{placement:"bottom",strategy:c,middleware:a}).then((({x:e,y:t,placement:o})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{},place:o})))};var E={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"},g={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 _=({forwardRef:e,id:l,className:r,classNameArrow:s,variant:i="dark",anchorId:a,anchorSelect:u,place:p="top",offset:f=10,events:v=["hover"],openOnClick:m=!1,positionStrategy:w="absolute",middlewares:_,wrapper:A,delayShow:T=0,delayHide:O=0,float:k=!1,hidden:R=!1,noArrow:C=!1,clickable:L=!1,closeOnEsc:x=!1,closeOnScroll:N=!1,closeOnResize:$=!1,openEvents:j,closeEvents:I,globalCloseEvents:B,imperativeModeOnly:D,style:q,position:z,afterShow:M,afterHide:H,content:P,contentWrapperRef:W,isOpen:F,setIsOpen:U,activeAnchor:K,setActiveAnchor:V,border:X,opacity:Y,arrowColor:G,role:Z="tooltip"})=>{var J;const Q=t.useRef(null),ee=t.useRef(null),te=t.useRef(null),oe=t.useRef(null),le=t.useRef(null),[re,ne]=t.useState(p),[ce,se]=t.useState({}),[ie,ae]=t.useState({}),[ue,de]=t.useState(!1),[pe,fe]=t.useState(!1),[ve,me]=t.useState(null),ye=t.useRef(!1),he=t.useRef(null),{anchorRefs:we,setActiveAnchor:Se}=y(l),be=t.useRef(!1),[Ee,ge]=t.useState([]),_e=t.useRef(!1),Ae=m||v.includes("click"),Te=Ae||(null==j?void 0:j.click)||(null==j?void 0:j.dblclick)||(null==j?void 0:j.mousedown),Oe=j?{...j}:{mouseenter:!0,focus:!0,click:!1,dblclick:!1,mousedown:!1};!j&&Ae&&Object.assign(Oe,{mouseenter:!1,focus:!1,click:!0});const ke=I?{...I}:{mouseleave:!0,blur:!0,click:!1,dblclick:!1,mouseup:!1};!I&&Ae&&Object.assign(ke,{mouseleave:!1,blur:!1});const Re=B?{...B}:{escape:x||!1,scroll:N||!1,resize:$||!1,clickOutsideAnchor:Te||!1};D&&(Object.assign(Oe,{mouseenter:!1,focus:!1,click:!1,dblclick:!1,mousedown:!1}),Object.assign(ke,{mouseleave:!1,blur:!1,click:!1,dblclick:!1,mouseup:!1}),Object.assign(Re,{escape:!1,scroll:!1,resize:!1,clickOutsideAnchor:!1})),h((()=>(_e.current=!0,()=>{_e.current=!1})),[]);const Ce=e=>{_e.current&&(e&&fe(!0),setTimeout((()=>{_e.current&&(null==U||U(e),void 0===F&&de(e))}),10))};t.useEffect((()=>{if(void 0===F)return()=>null;F&&fe(!0);const e=setTimeout((()=>{de(F)}),10);return()=>{clearTimeout(e)}}),[F]),t.useEffect((()=>{if(ue!==ye.current)if(le.current&&clearTimeout(le.current),ye.current=ue,ue)null==M||M();else{const e=(e=>{const t=e.match(/^([\d.]+)(m?s?)$/);if(!t)return 0;const[,o,l]=t;return"s"!==l&&"ms"!==l?0:Number(o)*("ms"===l?1:1e3)})(getComputedStyle(document.body).getPropertyValue("--rt-transition-show-delay"));le.current=setTimeout((()=>{fe(!1),me(null),null==H||H()}),e+25)}}),[ue]);const Le=(e=T)=>{te.current&&clearTimeout(te.current),te.current=setTimeout((()=>{Ce(!0)}),e)},xe=(e=O)=>{oe.current&&clearTimeout(oe.current),oe.current=setTimeout((()=>{be.current||Ce(!1)}),e)},Ne=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 V(null),void Se({current:null});T?Le():Ce(!0),V(o),Se({current:o}),oe.current&&clearTimeout(oe.current)},$e=()=>{L?xe(O||100):O?xe():Ce(!1),te.current&&clearTimeout(te.current)},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})};b({place:null!==(o=null==ve?void 0:ve.place)&&void 0!==o?o:p,offset:f,elementReference:l,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:X}).then((e=>{Object.keys(e.tooltipStyles).length&&se(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ae(e.tooltipArrowStyles),ne(e.place)}))},Ie=e=>{if(!e)return;const t=e,o={x:t.clientX,y:t.clientY};je(o),he.current=o},Be=e=>{var t;if(!ue)return;const o=e.target;if(null===(t=Q.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),te.current&&clearTimeout(te.current))},De=d(Ne,50,!0),qe=d($e,50,!0),ze=t.useCallback((()=>{var e,t;const o=null!==(e=null==ve?void 0:ve.position)&&void 0!==e?e:z;o?je(o):k?he.current&&je(he.current):(null==K?void 0:K.isConnected)&&b({place:null!==(t=null==ve?void 0:ve.place)&&void 0!==t?t:p,offset:f,elementReference:K,tooltipReference:Q.current,tooltipArrowReference:ee.current,strategy:w,middlewares:_,border:X}).then((e=>{_e.current&&(Object.keys(e.tooltipStyles).length&&se(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&ae(e.tooltipArrowStyles),ne(e.place))}))}),[ue,K,P,q,p,null==ve?void 0:ve.place,f,w,z,null==ve?void 0:ve.position,k]);t.useEffect((()=>{var e,t;const l=new Set(we);Ee.forEach((e=>{l.add({current:e})}));const r=document.querySelector(`[id='${a}']`);r&&l.add({current:r});const n=()=>{Ce(!1)},c=S(K),s=S(Q.current);Re.scroll&&(window.addEventListener("scroll",n),null==c||c.addEventListener("scroll",n),null==s||s.addEventListener("scroll",n));let i=null;Re.resize?window.addEventListener("resize",n):K&&Q.current&&(i=o.autoUpdate(K,Q.current,ze,{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",Be);const d=[],p=e=>{ue&&(null==e?void 0:e.target)===K||Ne(e)},f=e=>{ue&&(null==e?void 0:e.target)===K&&$e()},v=["mouseenter","mouseleave","focus","blur"],m=["click","dblclick","mousedown","mouseup"];Object.entries(Oe).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:De}):m.includes(e)&&d.push({event:e,listener:p}))})),Object.entries(ke).forEach((([e,t])=>{t&&(v.includes(e)?d.push({event:e,listener:qe}):m.includes(e)&&d.push({event:e,listener:f}))})),k&&d.push({event:"pointermove",listener:Ie});const y=()=>{be.current=!0},h=()=>{be.current=!1,$e()};return L&&!Te&&(null===(e=Q.current)||void 0===e||e.addEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.addEventListener("mouseleave",h)),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==c||c.removeEventListener("scroll",n),null==s||s.removeEventListener("scroll",n)),Re.resize?window.removeEventListener("resize",n):null==i||i(),Re.clickOutsideAnchor&&window.removeEventListener("click",Be),Re.escape&&window.removeEventListener("keydown",u),L&&!Te&&(null===(e=Q.current)||void 0===e||e.removeEventListener("mouseenter",y),null===(t=Q.current)||void 0===t||t.removeEventListener("mouseleave",h)),d.forEach((({event:e,listener:t})=>{l.forEach((o=>{var l;null===(l=o.current)||void 0===l||l.removeEventListener(e,t)}))}))}}),[K,ze,pe,we,Ee,j,I,B,Ae]),t.useEffect((()=>{var e,t;let o=null!==(t=null!==(e=null==ve?void 0:ve.anchorSelect)&&void 0!==e?e:u)&&void 0!==t?t:"";!o&&l&&(o=`[data-tooltip-id='${l}']`);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)}if("childList"===e.type){if(K){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,K))&&(fe(!1),Ce(!1),V(null),te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current),!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"]}),()=>{r.disconnect()}}),[l,u,null==ve?void 0:ve.anchorSelect,K]),t.useEffect((()=>{ze()}),[ze]),t.useEffect((()=>{if(!(null==W?void 0:W.current))return()=>null;const e=new ResizeObserver((()=>{setTimeout((()=>ze()))}));return e.observe(W.current),()=>{e.disconnect()}}),[P,null==W?void 0:W.current]),t.useEffect((()=>{var e;const t=document.querySelector(`[id='${a}']`),o=[...Ee,t];K&&o.includes(K)||V(null!==(e=Ee[0])&&void 0!==e?e:t)}),[a,Ee,K]),t.useEffect((()=>()=>{te.current&&clearTimeout(te.current),oe.current&&clearTimeout(oe.current)}),[]),t.useEffect((()=>{var e;let t=null!==(e=null==ve?void 0:ve.anchorSelect)&&void 0!==e?e:u;if(!t&&l&&(t=`[data-tooltip-id='${l}']`),t)try{const e=Array.from(document.querySelectorAll(t));ge(e)}catch(e){ge([])}}),[l,u,null==ve?void 0:ve.anchorSelect]);const Me=null!==(J=null==ve?void 0:ve.content)&&void 0!==J?J:P,He=ue&&Object.keys(ce).length>0;return t.useImperativeHandle(e,(()=>({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)?xe(e.delay):Ce(!1)},activeAnchor:K,place:re,isOpen:Boolean(pe&&!R&&Me&&He)}))),pe&&!R&&Me?n.default.createElement(A,{id:l,role:Z,className:c.default("react-tooltip",E.tooltip,g.tooltip,g[i],r,`react-tooltip__place-${re}`,E[He?"show":"closing"],He?"react-tooltip__show":"react-tooltip__closing","fixed"===w&&E.fixed,L&&E.clickable),onTransitionEnd:e=>{le.current&&clearTimeout(le.current),ue||"opacity"!==e.propertyName||(fe(!1),me(null),null==H||H())},style:{...q,...ce,opacity:void 0!==Y&&He?Y:void 0},ref:Q},Me,n.default.createElement(A,{className:c.default("react-tooltip-arrow",E.arrow,g.arrow,s,C&&E.noArrow),style:{...ie,background:G?`linear-gradient(to right bottom, transparent 50%, ${G} 50%)`:void 0},ref:ee})):null},A=({content:e})=>n.default.createElement("span",{dangerouslySetInnerHTML:{__html:e}}),T=(e,t)=>!("CSS"in window&&"supports"in window.CSS)||window.CSS.supports(e,t),O=n.default.forwardRef((({id:e,anchorId:o,anchorSelect:l,content:r,html:s,render:i,className:a,classNameArrow:u,variant:d="dark",place:p="top",offset:f=10,wrapper:v="div",children:m=null,events:h=["hover"],openOnClick:w=!1,positionStrategy:S="absolute",middlewares:b,delayShow:E=0,delayHide:g=0,float:O=!1,hidden:k=!1,noArrow:R=!1,clickable:C=!1,closeOnEsc:L=!1,closeOnScroll:x=!1,closeOnResize:N=!1,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B=!1,style:D,position:q,isOpen:z,disableStyleInjection:M=!1,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,role:V="tooltip"},X)=>{const[Y,G]=t.useState(r),[Z,J]=t.useState(s),[Q,ee]=t.useState(p),[te,oe]=t.useState(d),[le,re]=t.useState(f),[ne,ce]=t.useState(E),[se,ie]=t.useState(g),[ae,ue]=t.useState(O),[de,pe]=t.useState(k),[fe,ve]=t.useState(v),[me,ye]=t.useState(h),[he,we]=t.useState(S),[Se,be]=t.useState(null),[Ee,ge]=t.useState(null),_e=t.useRef(M),{anchorRefs:Ae,activeAnchor:Te}=y(e),Oe=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}),{}),ke=e=>{const t={place:e=>{var t;ee(null!==(t=e)&&void 0!==t?t:p)},content:e=>{G(null!=e?e:r)},html:e=>{J(null!=e?e:s)},variant:e=>{var t;oe(null!==(t=e)&&void 0!==t?t:d)},offset:e=>{re(null===e?f:Number(e))},wrapper:e=>{var t;ve(null!==(t=e)&&void 0!==t?t:v)},events:e=>{const t=null==e?void 0:e.split(" ");ye(null!=t?t:h)},"position-strategy":e=>{var t;we(null!==(t=e)&&void 0!==t?t:S)},"delay-show":e=>{ce(null===e?E:Number(e))},"delay-hide":e=>{ie(null===e?g:Number(e))},float:e=>{ue(null===e?O:"true"===e)},hidden:e=>{pe(null===e?k:"true"===e)},"class-name":e=>{be(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)}))};t.useEffect((()=>{G(r)}),[r]),t.useEffect((()=>{J(s)}),[s]),t.useEffect((()=>{ee(p)}),[p]),t.useEffect((()=>{oe(d)}),[d]),t.useEffect((()=>{re(f)}),[f]),t.useEffect((()=>{ce(E)}),[E]),t.useEffect((()=>{ie(g)}),[g]),t.useEffect((()=>{ue(O)}),[O]),t.useEffect((()=>{pe(k)}),[k]),t.useEffect((()=>{we(S)}),[S]),t.useEffect((()=>{_e.current!==M&&console.warn("[react-tooltip] Do not change `disableStyleInjection` dynamically.")}),[M]),t.useEffect((()=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("react-tooltip-inject-styles",{detail:{disableCore:"core"===M,disableBase:M}}))}),[]),t.useEffect((()=>{var t;const r=new Set(Ae);let n=l;if(!n&&e&&(n=`[data-tooltip-id='${e}']`),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 c=document.querySelector(`[id='${o}']`);if(c&&r.add({current:c}),!r.size)return()=>null;const s=null!==(t=null!=Ee?Ee:c)&&void 0!==t?t:Te.current,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!s||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const o=Oe(s);ke(o)}))})),a={attributes:!0,childList:!1,subtree:!1};if(s){const e=Oe(s);ke(e),i.observe(s,a)}return()=>{i.disconnect()}}),[Ae,Te,Ee,o,l]),t.useEffect((()=>{(null==D?void 0:D.border)&&console.warn("[react-tooltip] Do not set `style.border`. Use `border` prop instead."),H&&!T("border",`${H}`)&&console.warn(`[react-tooltip] "${H}" is not a valid \`border\`.`),(null==D?void 0:D.opacity)&&console.warn("[react-tooltip] Do not set `style.opacity`. Use `opacity` prop instead."),P&&!T("opacity",`${P}`)&&console.warn(`[react-tooltip] "${P}" is not a valid \`opacity\`.`)}),[]);let Re=m;const Ce=t.useRef(null);if(i){const e=i({content:null!=Y?Y:null,activeAnchor:Ee});Re=e?n.default.createElement("div",{ref:Ce,className:"react-tooltip-content-wrapper"},e):null}else Y&&(Re=Y);Z&&(Re=n.default.createElement(A,{content:Z}));const Le={forwardRef:X,id:e,anchorId:o,anchorSelect:l,className:c.default(a,Se),classNameArrow:u,content:Re,contentWrapperRef:Ce,place:Q,variant:te,offset:le,wrapper:fe,events:me,openOnClick:w,positionStrategy:he,middlewares:b,delayShow:ne,delayHide:se,float:ae,hidden:de,noArrow:R,clickable:C,closeOnEsc:L,closeOnScroll:x,closeOnResize:N,openEvents:$,closeEvents:j,globalCloseEvents:I,imperativeModeOnly:B,style:D,position:q,isOpen:z,border:H,opacity:P,arrowColor:W,setIsOpen:F,afterShow:U,afterHide:K,activeAnchor:Ee,setActiveAnchor:e=>ge(e),role:V};return n.default.createElement(_,{...Le})}));"undefined"!=typeof window&&window.addEventListener("react-tooltip-inject-styles",(e=>{e.detail.disableCore||u({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||u({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"})})),e.Tooltip=O,e.TooltipProvider=({children:e})=>{const[o,l]=t.useState({[p]:new Set}),[r,c]=t.useState({[p]:{current:null}}),s=(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=t.useCallback(((e=p)=>{var t,l;return{anchorRefs:null!==(t=o[e])&&void 0!==t?t:new Set,activeAnchor:null!==(l=r[e])&&void 0!==l?l:{current:null},attach:(...t)=>s(e,...t),detach:(...t)=>i(e,...t),setActiveAnchor:t=>((e,t)=>{c((o=>{var l;return(null===(l=o[e])||void 0===l?void 0:l.current)===t.current?o:{...o,[e]:t}}))})(e,t)}}),[o,r,s,i]),u=t.useMemo((()=>({getTooltipData:a})),[a]);return n.default.createElement(m.Provider,{value:u},e)},e.TooltipWrapper=({tooltipId:e,children:o,className:l,place:r,content:s,html:i,variant:a,offset:u,wrapper:d,events:p,positionStrategy:f,delayShow:v,delayHide:m})=>{const{attach:h,detach:w}=y(e),S=t.useRef(null);return t.useEffect((()=>(h(S),()=>{w(S)})),[]),n.default.createElement("span",{ref:S,className:c.default("react-tooltip-wrapper",l),"data-tooltip-place":r,"data-tooltip-content":s,"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)},e.removeStyle=function({type:e="base",id:t=i}={}){if(!a[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`),a[e]=!1},Object.defineProperty(e,"__esModule",{value:!0})}));
{
"name": "react-tooltip",
"version": "5.25.2-beta.1148.6",
"version": "5.25.2-beta.1149.0",
"description": "react tooltip component",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc