react-tooltip 5.8.2-beta.4 → 5.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,15 @@
1
- import{jsx as t,jsxs as e}from"react/jsx-runtime";import{createContext as n,useState as o,useCallback as r,useMemo as i,useContext as l,useRef as a,useEffect as c,useLayoutEffect as s}from"react";function u(t){return t.split("-")[1]}function f(t){return"y"===t?"height":"width"}function d(t){return t.split("-")[0]}function p(t){return["top","bottom"].includes(d(t))?"x":"y"}function h(t,e,n){let{reference:o,floating:r}=t;const i=o.x+o.width/2-r.width/2,l=o.y+o.height/2-r.height/2,a=p(e),c=f(a),s=o[c]/2-r[c]/2,h="x"===a;let m;switch(d(e)){case"top":m={x:i,y:o.y-r.height};break;case"bottom":m={x:i,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:l};break;case"left":m={x:o.x-r.width,y:l};break;default:m={x:o.x,y:o.y}}switch(u(e)){case"start":m[a]-=s*(n&&h?-1:1);break;case"end":m[a]+=s*(n&&h?-1:1)}return m}function m(t){return"number"!=typeof t?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(t):{top:t,right:t,bottom:t,left:t}}function g(t){return{...t,top:t.y,left:t.x,right:t.x+t.width,bottom:t.y+t.height}}async function y(t,e){var n;void 0===e&&(e={});const{x:o,y:r,platform:i,rects:l,elements:a,strategy:c}=t,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=e,h=m(p),y=a[d?"floating"===f?"reference":"floating":f],v=g(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(y)))||n?y:y.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:s,rootBoundary:u,strategy:c})),w="floating"===f?{...l.floating,x:o,y:r}:l.reference,x=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(x))&&await(null==i.getScale?void 0:i.getScale(x))||{x:1,y:1},T=g(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:x,strategy:c}):w);return{top:(v.top-T.top+h.top)/b.y,bottom:(T.bottom-v.bottom+h.bottom)/b.y,left:(v.left-T.left+h.left)/b.x,right:(T.right-v.right+h.right)/b.x}}const v=Math.min,w=Math.max;function x(t,e,n){return w(t,v(e,n))}const b=["top","right","bottom","left"].reduce(((t,e)=>t.concat(e,e+"-start",e+"-end")),[]),T={left:"right",right:"left",bottom:"top",top:"bottom"};function A(t){return t.replace(/left|right|bottom|top/g,(t=>T[t]))}function S(t,e,n){void 0===n&&(n=!1);const o=u(t),r=p(t),i=f(r);let l="x"===r?o===(n?"end":"start")?"right":"left":"start"===o?"bottom":"top";return e.reference[i]>e.floating[i]&&(l=A(l)),{main:l,cross:A(l)}}const R={start:"end",end:"start"};function E(t){return t.replace(/start|end/g,(t=>R[t]))}const L=function(t){return void 0===t&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,r;const{rects:i,middlewareData:l,placement:a,platform:c,elements:s}=e,{alignment:f,allowedPlacements:p=b,autoAlignment:h=!0,...m}=t,g=void 0!==f||p===b?function(t,e,n){return(t?[...n.filter((e=>u(e)===t)),...n.filter((e=>u(e)!==t))]:n.filter((t=>d(t)===t))).filter((n=>!t||u(n)===t||!!e&&E(n)!==n))}(f||null,h,p):p,v=await y(e,m),w=(null==(n=l.autoPlacement)?void 0:n.index)||0,x=g[w];if(null==x)return{};const{main:T,cross:A}=S(x,i,await(null==c.isRTL?void 0:c.isRTL(s.floating)));if(a!==x)return{reset:{placement:g[0]}};const R=[v[d(x)],v[T],v[A]],L=[...(null==(o=l.autoPlacement)?void 0:o.overflows)||[],{placement:x,overflows:R}],_=g[w+1];if(_)return{data:{index:w+1,overflows:L},reset:{placement:_}};const O=L.slice().sort(((t,e)=>t.overflows[0]-e.overflows[0])),k=null==(r=O.find((t=>{let{overflows:e}=t;return e.every((t=>t<=0))})))?void 0:r.placement,P=k||O[0].placement;return P!==a?{data:{index:w+1,overflows:L},reset:{placement:P}}:{}}}};const _=function(t){return void 0===t&&(t={}),{name:"flip",options:t,async fn(e){var n;const{placement:o,middlewareData:r,rects:i,initialPlacement:l,platform:a,elements:c}=e,{mainAxis:s=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:g=!0,...v}=t,w=d(o),x=d(l)===l,b=await(null==a.isRTL?void 0:a.isRTL(c.floating)),T=p||(x||!g?[A(l)]:function(t){const e=A(t);return[E(t),e,E(e)]}(l));p||"none"===m||T.push(...function(t,e,n,o){const r=u(t);let i=function(t,e,n){const o=["left","right"],r=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(t){case"top":case"bottom":return n?e?r:o:e?o:r;case"left":case"right":return e?i:l;default:return[]}}(d(t),"start"===n,o);return r&&(i=i.map((t=>t+"-"+r)),e&&(i=i.concat(i.map(E)))),i}(l,g,m,b));const R=[l,...T],L=await y(e,v),_=[];let O=(null==(n=r.flip)?void 0:n.overflows)||[];if(s&&_.push(L[w]),f){const{main:t,cross:e}=S(o,i,b);_.push(L[t],L[e])}if(O=[...O,{placement:o,overflows:_}],!_.every((t=>t<=0))){var k,P;const t=((null==(k=r.flip)?void 0:k.index)||0)+1,e=R[t];if(e)return{data:{index:t,overflows:O},reset:{placement:e}};let n=null==(P=O.find((t=>t.overflows[0]<=0)))?void 0:P.placement;if(!n)switch(h){case"bestFit":{var D;const t=null==(D=O.map((t=>[t.placement,t.overflows.filter((t=>t>0)).reduce(((t,e)=>t+e),0)])).sort(((t,e)=>t[1]-e[1]))[0])?void 0:D[0];t&&(n=t);break}case"initialPlacement":n=l}if(o!==n)return{reset:{placement:n}}}return{}}}},O=function(t){return void 0===t&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:r,platform:i,strategy:l}=e,{padding:a=2,x:c,y:s}=t,u=g(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:r.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(o.floating)),strategy:l}):r.reference),f=await(null==i.getClientRects?void 0:i.getClientRects(o.reference))||[],h=m(a);const y=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===f.length&&f[0].left>f[1].right&&null!=c&&null!=s)return f.find((t=>c>t.left-h.left&&c<t.right+h.right&&s>t.top-h.top&&s<t.bottom+h.bottom))||u;if(f.length>=2){if("x"===p(n)){const t=f[0],e=f[f.length-1],o="top"===d(n),r=t.top,i=e.bottom,l=o?t.left:e.left,a=o?t.right:e.right;return{top:r,bottom:i,left:l,right:a,width:a-l,height:i-r,x:l,y:r}}const t="left"===d(n),e=w(...f.map((t=>t.right))),o=v(...f.map((t=>t.left))),r=f.filter((n=>t?n.left===o:n.right===e)),i=r[0].top,l=r[r.length-1].bottom;return{top:i,bottom:l,left:o,right:e,width:e-o,height:l-i,x:o,y:i}}return u}},floating:o.floating,strategy:l});return r.reference.x!==y.reference.x||r.reference.y!==y.reference.y||r.reference.width!==y.reference.width||r.reference.height!==y.reference.height?{reset:{rects:y}}:{}}}};const k=function(t){return void 0===t&&(t=0),{name:"offset",options:t,async fn(e){const{x:n,y:o}=e,r=await async function(t,e){const{placement:n,platform:o,elements:r}=t,i=await(null==o.isRTL?void 0:o.isRTL(r.floating)),l=d(n),a=u(n),c="x"===p(n),s=["left","top"].includes(l)?-1:1,f=i&&c?-1:1,h="function"==typeof e?e(t):e;let{mainAxis:m,crossAxis:g,alignmentAxis:y}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...h};return a&&"number"==typeof y&&(g="end"===a?-1*y:y),c?{x:g*f,y:m*s}:{x:m*s,y:g*f}}(e,t);return{x:n+r.x,y:o+r.y,data:r}}}};const P=function(t){return void 0===t&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r}=e,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:t=>{let{x:e,y:n}=t;return{x:e,y:n}}},...c}=t,s={x:n,y:o},u=await y(e,c),f=p(d(r)),h="x"===f?"y":"x";let m=s[f],g=s[h];if(i){const t="y"===f?"bottom":"right";m=x(m+u["y"===f?"top":"left"],m,m-u[t])}if(l){const t="y"===h?"bottom":"right";g=x(g+u["y"===h?"top":"left"],g,g-u[t])}const v=a.fn({...e,[f]:m,[h]:g});return{...v,data:{x:v.x-n,y:v.y-o}}}}},D=function(t){return void 0===t&&(t={}),{name:"size",options:t,async fn(e){const{placement:n,rects:o,platform:r,elements:i}=e,{apply:l=(()=>{}),...a}=t,c=await y(e,a),s=d(n),f=u(n);let p,h;"top"===s||"bottom"===s?(p=s,h=f===(await(null==r.isRTL?void 0:r.isRTL(i.floating))?"start":"end")?"left":"right"):(h=s,p="end"===f?"top":"bottom");const m=w(c.left,0),g=w(c.right,0),v=w(c.top,0),x=w(c.bottom,0),b={availableHeight:o.floating.height-(["left","right"].includes(n)?2*(0!==v||0!==x?v+x:w(c.top,c.bottom)):c[p]),availableWidth:o.floating.width-(["top","bottom"].includes(n)?2*(0!==m||0!==g?m+g:w(c.left,c.right)):c[h])};await l({...e,...b});const T=await r.getDimensions(i.floating);return o.floating.width!==T.width||o.floating.height!==T.height?{reset:{rects:!0}}:{}}}};function N(t){var e;return(null==(e=t.ownerDocument)?void 0:e.defaultView)||window}function I(t){return N(t).getComputedStyle(t)}const F=Math.min,C=Math.max,H=Math.round;function j(t){const e=I(t);let n=parseFloat(e.width),o=parseFloat(e.height);const r=t.offsetWidth,i=t.offsetHeight,l=H(n)!==r||H(o)!==i;return l&&(n=r,o=i),{width:n,height:o,fallback:l}}function W(t){return V(t)?(t.nodeName||"").toLowerCase():""}let B;function $(){if(B)return B;const t=navigator.userAgentData;return t&&Array.isArray(t.brands)?(B=t.brands.map((t=>t.brand+"/"+t.version)).join(" "),B):navigator.userAgent}function M(t){return t instanceof N(t).HTMLElement}function U(t){return t instanceof N(t).Element}function V(t){return t instanceof N(t).Node}function q(t){if("undefined"==typeof ShadowRoot)return!1;return t instanceof N(t).ShadowRoot||t instanceof ShadowRoot}function X(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=I(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(r)}function K(t){return["table","td","th"].includes(W(t))}function Y(t){const e=/firefox/i.test($()),n=I(t),o=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!o&&"none"!==o||e&&"filter"===n.willChange||e&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((t=>n.willChange.includes(t)))||["paint","layout","strict","content"].some((t=>{const e=n.contain;return null!=e&&e.includes(t)}))}function z(){return!/^((?!chrome|android).)*safari/i.test($())}function J(t){return["html","body","#document"].includes(W(t))}function Z(t){return U(t)?t:t.contextElement}const G={x:1,y:1};function Q(t){const e=Z(t);if(!M(e))return G;const n=e.getBoundingClientRect(),{width:o,height:r,fallback:i}=j(e);let l=(i?H(n.width):n.width)/o,a=(i?H(n.height):n.height)/r;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function tt(t,e,n,o){var r,i;void 0===e&&(e=!1),void 0===n&&(n=!1);const l=t.getBoundingClientRect(),a=Z(t);let c=G;e&&(o?U(o)&&(c=Q(o)):c=Q(t));const s=a?N(a):window,u=!z()&&n;let f=(l.left+(u&&(null==(r=s.visualViewport)?void 0:r.offsetLeft)||0))/c.x,d=(l.top+(u&&(null==(i=s.visualViewport)?void 0:i.offsetTop)||0))/c.y,p=l.width/c.x,h=l.height/c.y;if(a){const t=N(a),e=o&&U(o)?N(o):o;let n=t.frameElement;for(;n&&o&&e!==t;){const t=Q(n),e=n.getBoundingClientRect(),o=getComputedStyle(n);e.x+=(n.clientLeft+parseFloat(o.paddingLeft))*t.x,e.y+=(n.clientTop+parseFloat(o.paddingTop))*t.y,f*=t.x,d*=t.y,p*=t.x,h*=t.y,f+=e.x,d+=e.y,n=N(n).frameElement}}return{width:p,height:h,top:d,right:f+p,bottom:d+h,left:f,x:f,y:d}}function et(t){return((V(t)?t.ownerDocument:t.document)||window.document).documentElement}function nt(t){return U(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function ot(t){return tt(et(t)).left+nt(t).scrollLeft}function rt(t){if("html"===W(t))return t;const e=t.assignedSlot||t.parentNode||q(t)&&t.host||et(t);return q(e)?e.host:e}function it(t){const e=rt(t);return J(e)?e.ownerDocument.body:M(e)&&X(e)?e:it(e)}function lt(t,e){var n;void 0===e&&(e=[]);const o=it(t),r=o===(null==(n=t.ownerDocument)?void 0:n.body),i=N(o);return r?e.concat(i,i.visualViewport||[],X(o)?o:[]):e.concat(o,lt(o))}function at(t,e,n){return"viewport"===e?g(function(t,e){const n=N(t),o=et(t),r=n.visualViewport;let i=o.clientWidth,l=o.clientHeight,a=0,c=0;if(r){i=r.width,l=r.height;const t=z();(t||!t&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:i,height:l,x:a,y:c}}(t,n)):U(e)?g(function(t,e){const n=tt(t,!0,"fixed"===e),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=M(t)?Q(t):{x:1,y:1};return{width:t.clientWidth*i.x,height:t.clientHeight*i.y,x:r*i.x,y:o*i.y}}(e,n)):g(function(t){const e=et(t),n=nt(t),o=t.ownerDocument.body,r=C(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=C(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let l=-n.scrollLeft+ot(t);const a=-n.scrollTop;return"rtl"===I(o).direction&&(l+=C(e.clientWidth,o.clientWidth)-r),{width:r,height:i,x:l,y:a}}(et(t)))}function ct(t){return M(t)&&"fixed"!==I(t).position?t.offsetParent:null}function st(t){const e=N(t);let n=ct(t);for(;n&&K(n)&&"static"===I(n).position;)n=ct(n);return n&&("html"===W(n)||"body"===W(n)&&"static"===I(n).position&&!Y(n))?e:n||function(t){let e=rt(t);for(;M(e)&&!J(e);){if(Y(e))return e;e=rt(e)}return null}(t)||e}function ut(t,e,n){const o=M(e),r=et(e),i=tt(t,!0,"fixed"===n,e);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(o||!o&&"fixed"!==n)if(("body"!==W(e)||X(r))&&(l=nt(e)),M(e)){const t=tt(e,!0);a.x=t.x+e.clientLeft,a.y=t.y+e.clientTop}else r&&(a.x=ot(r));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const ft={getClippingRect:function(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const i="clippingAncestors"===n?function(t,e){const n=e.get(t);if(n)return n;let o=lt(t).filter((t=>U(t)&&"body"!==W(t))),r=null;const i="fixed"===I(t).position;let l=i?rt(t):t;for(;U(l)&&!J(l);){const t=I(l),e=Y(l);(i?e||r:e||"static"!==t.position||!r||!["absolute","fixed"].includes(r.position))?r=t:o=o.filter((t=>t!==l)),l=rt(l)}return e.set(t,o),o}(e,this._c):[].concat(n),l=[...i,o],a=l[0],c=l.reduce(((t,n)=>{const o=at(e,n,r);return t.top=C(o.top,t.top),t.right=F(o.right,t.right),t.bottom=F(o.bottom,t.bottom),t.left=C(o.left,t.left),t}),at(e,a,r));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(t){let{rect:e,offsetParent:n,strategy:o}=t;const r=M(n),i=et(n);if(n===i)return e;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const c={x:0,y:0};if((r||!r&&"fixed"!==o)&&(("body"!==W(n)||X(i))&&(l=nt(n)),M(n))){const t=tt(n);a=Q(n),c.x=t.x+n.clientLeft,c.y=t.y+n.clientTop}return{width:e.width*a.x,height:e.height*a.y,x:e.x*a.x-l.scrollLeft*a.x+c.x,y:e.y*a.y-l.scrollTop*a.y+c.y}},isElement:U,getDimensions:function(t){return M(t)?j(t):t.getBoundingClientRect()},getOffsetParent:st,getDocumentElement:et,getScale:Q,async getElementRects(t){let{reference:e,floating:n,strategy:o}=t;const r=this.getOffsetParent||st,i=this.getDimensions;return{reference:ut(e,await r(n),o),floating:{x:0,y:0,...await i(n)}}},getClientRects:t=>Array.from(t.getClientRects()),isRTL:t=>"rtl"===I(t).direction},dt=(t,e,n)=>{const o=new Map,r={platform:ft,...n},i={...r.platform,_c:o};return(async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(e));if(null==l&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((t=>{let{name:e}=t;return"autoPlacement"===e||"flip"===e})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));t&&e||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let s=await l.getElementRects({reference:t,floating:e,strategy:r}),{x:u,y:f}=h(s,o,c),d=o,p={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:g}=a[n],{x:y,y:v,data:w,reset:x}=await g({x:u,y:f,initialPlacement:o,placement:d,strategy:r,middlewareData:p,rects:s,platform:l,elements:{reference:t,floating:e}});u=null!=y?y:u,f=null!=v?v:f,p={...p,[i]:{...p[i],...w}},m>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(d=x.placement),x.rects&&(s=!0===x.rects?await l.getElementRects({reference:t,floating:e,strategy:r}):x.rects),({x:u,y:f}=h(s,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:r,middlewareData:p}})(t,e,{...r,platform:i})};var pt,ht={exports:{}};
1
+ import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useContext as i,useRef as l,useEffect as a,useLayoutEffect as c}from"react";var s,u={exports:{}},f={};
2
+ /** @license React v16.14.0
3
+ * react-jsx-runtime.development.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ s=f,function(){var t=e,n=60103,r=60106;s.Fragment=60107;var o=60108,i=60114,l=60109,a=60110,c=60112,u=60113,f=60120,d=60115,p=60116,y=60121,m=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element"),r=w("react.portal"),s.Fragment=w("react.fragment"),o=w("react.strict_mode"),i=w("react.profiler"),l=w("react.provider"),a=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),d=w("react.memo"),p=w("react.lazy"),y=w("react.block"),m=w("react.server.block"),h=w("react.fundamental"),w("react.scope"),w("react.opaque.id"),g=w("react.debug_trace_mode"),w("react.offscreen"),v=w("react.legacy_hidden")}var b="function"==typeof Symbol&&Symbol.iterator,x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function _(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];S("error",e,n)}function S(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(O){var i=A(O.type),l=O._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(T,"");if(/^index\./.test(i)){var l=o.match(T);if(l){var a=l[1];a&&(i=a.replace(T,"")+"/"+i)}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,O._source,l&&A(l.type))}""!==(o+=r.getStackAddendum())&&(t+="%s",n=n.concat([o]));var a=n.map((function(e){return""+e}));a.unshift("Warning: "+t),Function.prototype.apply.call(console[e],console,a)}var T=/^(.*)[\\\/]/;function A(e){if(null==e)return null;if("number"==typeof e.tag&&_("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case s.Fragment:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return"Context.Consumer";case l:return"Context.Provider";case c:return m=e,h=e.render,g="ForwardRef",v=h.displayName||h.name||"",m.displayName||(""!==v?g+"("+v+")":g);case d:return A(e.type);case y:return A(e.render);case p:var t=1===(n=e)._status?n._result:null;if(t)return A(t)}var n,m,h,g,v;return null}var R={};x.ReactDebugCurrentFrame;var O=null;function k(e){O=e}var E,j,L,P=x.ReactCurrentOwner,D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};function F(e,t,r,o,i){var l,a={},c=null,s=null;for(l in void 0!==r&&(c=""+r),function(e){if(D.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(c=""+t.key),function(e){if(D.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(s=t.ref,function(e,t){if("string"==typeof e.ref&&P.current&&t&&P.current.stateNode!==t){var n=A(P.current.type);L[n]||(_('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',A(P.current.type),e.ref),L[n]=!0)}}(t,i)),t)D.call(t,l)&&!N.hasOwnProperty(l)&&(a[l]=t[l]);if(e&&e.defaultProps){var u=e.defaultProps;for(l in u)void 0===a[l]&&(a[l]=u[l])}if(c||s){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;c&&function(e,t){var n=function(){E||(E=!0,_("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(a,f),s&&function(e,t){var n=function(){j||(j=!0,_("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",t))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(a,f)}return function(e,t,r,o,i,l,a){var c={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(c._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(c,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(c,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(c.props),Object.freeze(c)),c}(e,c,s,i,o,P.current,a)}L={};var $,C=x.ReactCurrentOwner;function I(e){O=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function U(){if(C.current){var e=A(C.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,$=!1;var H={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=U();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!H[n]){H[n]=!0;var r="";e&&e._owner&&e._owner!==C.current&&(r=" It was passed a child from "+A(e._owner.type)+"."),I(e),_('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),I(null)}}}function M(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];W(r)&&B(r,t)}else if(W(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=b&&e[b]||e["@@iterator"];return"function"==typeof t?t:null}(e);if("function"==typeof o&&o!==e.entries)for(var i,l=o.call(e);!(i=l.next()).done;)W(i.value)&&B(i.value,t)}}function q(e){var t,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)t=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==c&&n.$$typeof!==d)return;t=n.propTypes}if(t){var r=A(n);!function(e,t,n,r,o){var i=Function.call.bind(Object.prototype.hasOwnProperty);for(var l in e)if(i(e,l)){var a=void 0;try{if("function"!=typeof e[l]){var c=Error((r||"React class")+": "+n+" type `"+l+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[l]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[l](t,l,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){a=e}!a||a instanceof Error||(k(o),_("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,l,typeof a),k(null)),a instanceof Error&&!(a.message in R)&&(R[a.message]=!0,k(o),_("Failed %s type: %s",n,a.message),k(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||$||($=!0,_("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||_("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function V(e,t,r,w,b,x){var S=function(e){return"string"==typeof e||"function"==typeof e||e===s.Fragment||e===i||e===g||e===o||e===u||e===f||e===v||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===d||e.$$typeof===l||e.$$typeof===a||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e[0]===m)}(e);if(!S){var T="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(T+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var R,O=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);T+=O||U(),null===e?R="null":Array.isArray(e)?R="array":void 0!==e&&e.$$typeof===n?(R="<"+(A(e.type)||"Unknown")+" />",T=" Did you accidentally export a JSX literal instead of a component?"):R=typeof e,_("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",R,T)}var k=F(e,t,r,b,x);if(null==k)return k;if(S){var E=t.children;if(void 0!==E)if(w)if(Array.isArray(E)){for(var j=0;j<E.length;j++)M(E[j],e);Object.freeze&&Object.freeze(E)}else _("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else M(E,e)}return e===s.Fragment?function(e){for(var t=Object.keys(e.props),n=0;n<t.length;n++){var r=t[n];if("children"!==r&&"key"!==r){I(e),_("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),I(null);break}}null!==e.ref&&(I(e),_("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(k):q(k),k}var Y=function(e,t,n){return V(e,t,n,!1)},z=function(e,t,n){return V(e,t,n,!0)};s.jsx=Y,s.jsxs=z}(),u.exports=f;var d,p={exports:{}};
2
11
  /*!
3
12
  Copyright (c) 2018 Jed Watson.
4
13
  Licensed under the MIT License (MIT), see
5
14
  http://jedwatson.github.io/classnames
6
- */pt=ht,function(){var t={}.hasOwnProperty;function e(){for(var n=[],o=0;o<arguments.length;o++){var r=arguments[o];if(r){var i=typeof r;if("string"===i||"number"===i)n.push(r);else if(Array.isArray(r)){if(r.length){var l=e.apply(null,r);l&&n.push(l)}}else if("object"===i){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes("[native code]")){n.push(r.toString());continue}for(var a in r)t.call(r,a)&&r[a]&&n.push(a)}}}return n.join(" ")}pt.exports?(e.default=e,pt.exports=e):window.classNames=e}();var mt=ht.exports;const gt=(t,e,n)=>{let o=null;return function(...r){o&&clearTimeout(o),o=setTimeout((()=>{o=null,n||t.apply(this,r)}),e)}},yt=({content:e})=>t("span",{dangerouslySetInnerHTML:{__html:e}}),vt={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},wt=n({getTooltipData:()=>vt}),xt=({children:e})=>{const[n,l]=o({DEFAULT_TOOLTIP_ID:new Set}),[a,c]=o({DEFAULT_TOOLTIP_ID:{current:null}}),s=(t,...e)=>{l((n=>{var o;const r=null!==(o=n[t])&&void 0!==o?o:new Set;return e.forEach((t=>r.add(t))),{...n,[t]:new Set(r)}}))},u=(t,...e)=>{l((n=>{const o=n[t];return o?(e.forEach((t=>o.delete(t))),{...n}):n}))},f=r(((t="DEFAULT_TOOLTIP_ID")=>{var e,o;return{anchorRefs:null!==(e=n[t])&&void 0!==e?e:new Set,activeAnchor:null!==(o=a[t])&&void 0!==o?o:{current:null},attach:(...e)=>s(t,...e),detach:(...e)=>u(t,...e),setActiveAnchor:e=>((t,e)=>{c((n=>{var o;return(null===(o=n[t])||void 0===o?void 0:o.current)===e.current?n:{...n,[t]:e}}))})(t,e)}}),[n,a,s,u]),d=i((()=>({getTooltipData:f})),[f]);return t(wt.Provider,{value:d,children:e})};function bt(t="DEFAULT_TOOLTIP_ID"){return l(wt).getTooltipData(t)}const Tt=({tooltipId:e,children:n,className:o,place:r,content:i,html:l,variant:s,offset:u,wrapper:f,events:d,positionStrategy:p,delayShow:h,delayHide:m})=>{const{attach:g,detach:y}=bt(e),v=a(null);return c((()=>(g(v),()=>{y(v)})),[]),t("span",{ref:v,className:mt("react-tooltip-wrapper",o),"data-tooltip-place":r,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":s,"data-tooltip-offset":u,"data-tooltip-wrapper":f,"data-tooltip-events":d,"data-tooltip-position-strategy":p,"data-tooltip-delay-show":h,"data-tooltip-delay-hide":m,children:n})},At=async({elementReference:t=null,tooltipReference:e=null,tooltipArrowReference:n=null,place:o="top",offset:r=10,strategy:i="absolute",middlewares:l=[k(Number(r)),_(),P({padding:5})]})=>{if(!t)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===e)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=l;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(t){const{element:e,padding:n=0}=c||{},{x:o,y:r,placement:i,rects:l,platform:a}=t;if(null==e)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const s=m(n),d={x:o,y:r},h=p(i),g=f(h),y=await a.getDimensions(e),v="y"===h?"top":"left",w="y"===h?"bottom":"right",b=l.reference[g]+l.reference[h]-d[h]-l.floating[g],T=d[h]-l.reference[h],A=await(null==a.getOffsetParent?void 0:a.getOffsetParent(e));let S=A?"y"===h?A.clientHeight||0:A.clientWidth||0:0;0===S&&(S=l.floating[g]);const R=b/2-T/2,E=s[v],L=S-y[g]-s[w],_=S/2-y[g]/2+R,O=x(E,_,L),k=null!=u(i)&&_!=O&&l.reference[g]/2-(_<E?s[v]:s[w])-y[g]/2<0;return{[h]:d[h]-(k?_<E?E-_:L-_:0),data:{[h]:O,centerOffset:_-O}}}}),dt(t,e,{placement:o,strategy:i,middleware:a}).then((({x:t,y:e,placement:n,middlewareData:o})=>{var r,i;const l={left:`${t}px`,top:`${e}px`},{x:a,y:c}=null!==(r=o.arrow)&&void 0!==r?r:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):dt(t,e,{placement:"bottom",strategy:i,middleware:a}).then((({x:t,y:e})=>({tooltipStyles:{left:`${t}px`,top:`${e}px`},tooltipArrowStyles:{}})));var c};var St={tooltip:"styles-module_tooltip__mnnfp",fixed:"styles-module_fixed__7ciUi",arrow:"styles-module_arrow__K0L3T","no-arrow":"styles-module_no-arrow__KcFZN",clickable:"styles-module_clickable__Bv9o7",show:"styles-module_show__2NboJ",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 Rt=({id:n,className:r,classNameArrow:i,variant:l="dark",anchorId:u,anchorSelect:f,place:d="top",offset:p=10,events:h=["hover"],positionStrategy:m="absolute",middlewares:g,wrapper:y,children:v=null,delayShow:w=0,delayHide:x=0,float:b=!1,noArrow:T=!1,clickable:A=!1,closeOnEsc:S=!1,style:R,position:E,afterShow:L,afterHide:_,content:O,html:k,isOpen:P,setIsOpen:D,activeAnchor:N,setActiveAnchor:I})=>{const F=a(null),C=a(null),H=a(null),j=a(null),[W,B]=o({}),[$,M]=o({}),[U,V]=o(!1),[q,X]=o(!1),K=a(!1),Y=a(null),{anchorRefs:z,setActiveAnchor:J}=bt(n),Z=a(!1),[G,Q]=o([]),tt=a(!1);s((()=>(tt.current=!0,()=>{tt.current=!1})),[]),c((()=>{if(!U){const t=setTimeout((()=>{X(!1)}),150);return()=>{clearTimeout(t)}}return()=>null}),[U]);const et=t=>{tt.current&&(t&&X(!0),setTimeout((()=>{tt.current&&(null==D||D(t),void 0===P&&V(t))}),10))};c((()=>{if(void 0===P)return()=>null;P&&X(!0);const t=setTimeout((()=>{V(P)}),10);return()=>{clearTimeout(t)}}),[P]),c((()=>{U!==K.current&&(K.current=U,U?null==L||L():null==_||_())}),[U]);const nt=(t=x)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{Z.current||et(!1)}),t)},ot=t=>{var e;if(!t)return;w?(H.current&&clearTimeout(H.current),H.current=setTimeout((()=>{et(!0)}),w)):et(!0);const n=null!==(e=t.currentTarget)&&void 0!==e?e:t.target;I(n),J({current:n}),j.current&&clearTimeout(j.current)},rt=()=>{A?nt(x||100):x?nt():et(!1),H.current&&clearTimeout(H.current)},it=({x:t,y:e})=>{At({place:d,offset:p,elementReference:{getBoundingClientRect:()=>({x:t,y:e,width:0,height:0,top:e,left:t,right:t,bottom:e})},tooltipReference:F.current,tooltipArrowReference:C.current,strategy:m,middlewares:g}).then((t=>{Object.keys(t.tooltipStyles).length&&B(t.tooltipStyles),Object.keys(t.tooltipArrowStyles).length&&M(t.tooltipArrowStyles)}))},lt=t=>{if(!t)return;const e=t,n={x:e.clientX,y:e.clientY};it(n),Y.current=n},at=t=>{ot(t),x&&nt()},ct=t=>{const e=document.querySelector(`[id='${u}']`);(null==e?void 0:e.contains(t.target))||G.some((e=>e.contains(t.target)))||et(!1)},st=t=>{"Escape"===t.key&&et(!1)},ut=gt(ot,50),ft=gt(rt,50);c((()=>{var t,e;const n=new Set(z);G.forEach((t=>{n.add({current:t})}));const o=document.querySelector(`[id='${u}']`);o&&n.add({current:o}),S&&window.addEventListener("keydown",st);const r=[];h.find((t=>"click"===t))&&(window.addEventListener("click",ct),r.push({event:"click",listener:at})),h.find((t=>"hover"===t))&&(r.push({event:"mouseenter",listener:ut},{event:"mouseleave",listener:ft},{event:"focus",listener:ut},{event:"blur",listener:ft}),b&&r.push({event:"mousemove",listener:lt}));const i=()=>{Z.current=!0},l=()=>{Z.current=!1,rt()};return A&&(null===(t=F.current)||void 0===t||t.addEventListener("mouseenter",i),null===(e=F.current)||void 0===e||e.addEventListener("mouseleave",l)),r.forEach((({event:t,listener:e})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.addEventListener(t,e)}))})),()=>{var t,e;h.find((t=>"click"===t))&&window.removeEventListener("click",ct),S&&window.removeEventListener("keydown",st),A&&(null===(t=F.current)||void 0===t||t.removeEventListener("mouseenter",i),null===(e=F.current)||void 0===e||e.removeEventListener("mouseleave",l)),r.forEach((({event:t,listener:e})=>{n.forEach((n=>{var o;null===(o=n.current)||void 0===o||o.removeEventListener(t,e)}))}))}}),[q,z,G,S,h]),c((()=>{let t=null!=f?f:"";!t&&n&&(t=`[data-tooltip-id='${n}']`);const e=new MutationObserver((e=>{const o=[];e.forEach((e=>{if("attributes"===e.type&&"data-tooltip-id"===e.attributeName){e.target.getAttribute("data-tooltip-id")===n&&o.push(e.target)}if("childList"===e.type&&(N&&[...e.removedNodes].some((t=>!!t.contains(N)&&(X(!1),et(!1),I(null),!0))),t))try{const n=[...e.addedNodes].filter((t=>1===t.nodeType));o.push(...n.filter((e=>e.matches(t)))),o.push(...n.flatMap((e=>[...e.querySelectorAll(t)])))}catch(t){}})),o.length&&Q((t=>[...t,...o]))}));return e.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{e.disconnect()}}),[n,f,N]),c((()=>{E?it(E):b?Y.current&&it(Y.current):At({place:d,offset:p,elementReference:N,tooltipReference:F.current,tooltipArrowReference:C.current,strategy:m,middlewares:g}).then((t=>{tt.current&&(Object.keys(t.tooltipStyles).length&&B(t.tooltipStyles),Object.keys(t.tooltipArrowStyles).length&&M(t.tooltipArrowStyles))}))}),[U,N,O,k,d,p,m,E]),c((()=>{var t;const e=document.querySelector(`[id='${u}']`),n=[...G,e];N&&n.includes(N)||I(null!==(t=G[0])&&void 0!==t?t:e)}),[u,G,N]),c((()=>()=>{H.current&&clearTimeout(H.current),j.current&&clearTimeout(j.current)}),[]),c((()=>{let t=f;if(!t&&n&&(t=`[data-tooltip-id='${n}']`),t)try{const e=Array.from(document.querySelectorAll(t));Q(e)}catch(t){Q([])}}),[n,f]);const dt=Boolean(k||O||v)&&U&&Object.keys(W).length>0;return q?e(y,{id:n,role:"tooltip",className:mt("react-tooltip",St.tooltip,St[l],r,{[St.show]:dt,[St.fixed]:"fixed"===m,[St.clickable]:A}),style:{...R,...W},ref:F,children:[k&&t(yt,{content:k})||O||v,t(y,{className:mt("react-tooltip-arrow",St.arrow,i,{[St["no-arrow"]]:T}),style:$,ref:C})]}):null},Et=({id:e,anchorId:n,anchorSelect:r,content:i,html:l,className:a,classNameArrow:s,variant:u="dark",place:f="top",offset:d=10,wrapper:p="div",children:h=null,events:m=["hover"],positionStrategy:g="absolute",middlewares:y,delayShow:v=0,delayHide:w=0,float:x=!1,noArrow:b=!1,clickable:T=!1,closeOnEsc:A=!1,style:S,position:R,isOpen:E,setIsOpen:L,afterShow:_,afterHide:O})=>{const[k,P]=o(i),[D,N]=o(l),[I,F]=o(f),[C,H]=o(u),[j,W]=o(d),[B,$]=o(v),[M,U]=o(w),[V,q]=o(x),[X,K]=o(p),[Y,z]=o(m),[J,Z]=o(g),[G,Q]=o(null),{anchorRefs:tt,activeAnchor:et}=bt(e),nt=t=>null==t?void 0:t.getAttributeNames().reduce(((e,n)=>{var o;if(n.startsWith("data-tooltip-")){e[n.replace(/^data-tooltip-/,"")]=null!==(o=null==t?void 0:t.getAttribute(n))&&void 0!==o?o:null}return e}),{}),ot=t=>{const e={place:t=>{var e;F(null!==(e=t)&&void 0!==e?e:f)},content:t=>{P(null!=t?t:i)},html:t=>{N(null!=t?t:l)},variant:t=>{var e;H(null!==(e=t)&&void 0!==e?e:u)},offset:t=>{W(null===t?d:Number(t))},wrapper:t=>{var e;K(null!==(e=t)&&void 0!==e?e:p)},events:t=>{const e=null==t?void 0:t.split(" ");z(null!=e?e:m)},"position-strategy":t=>{var e;Z(null!==(e=t)&&void 0!==e?e:g)},"delay-show":t=>{$(null===t?v:Number(t))},"delay-hide":t=>{U(null===t?w:Number(t))},float:t=>{q(null===t?x:Boolean(t))}};Object.values(e).forEach((t=>t(null))),Object.entries(t).forEach((([t,n])=>{var o;null===(o=e[t])||void 0===o||o.call(e,n)}))};c((()=>{P(i)}),[i]),c((()=>{N(l)}),[l]),c((()=>{F(f)}),[f]),c((()=>{var t;const o=new Set(tt);let i=r;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((t=>{o.add({current:t})}))}catch(t){console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${n}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(t=null!=G?G:l)&&void 0!==t?t:et.current,c=new MutationObserver((t=>{t.forEach((t=>{var e;if(!a||"attributes"!==t.type||!(null===(e=t.attributeName)||void 0===e?void 0:e.startsWith("data-tooltip-")))return;const n=nt(a);ot(n)}))})),s={attributes:!0,childList:!1,subtree:!1};if(a){const t=nt(a);ot(t),c.observe(a,s)}return()=>{c.disconnect()}}),[tt,et,G,n,r]);const rt={id:e,anchorId:n,anchorSelect:r,className:a,classNameArrow:s,content:k,html:D,place:I,variant:C,offset:j,wrapper:X,events:Y,positionStrategy:J,middlewares:y,delayShow:B,delayHide:M,float:V,noArrow:b,clickable:T,closeOnEsc:A,style:S,position:R,isOpen:E,setIsOpen:L,afterShow:_,afterHide:O,activeAnchor:G,setActiveAnchor:t=>Q(t)};return t(Rt,h?{...rt,children:h}:{...rt})};export{Et as Tooltip,xt as TooltipProvider,Tt as TooltipWrapper,L as autoPlacement,_ as flip,O as inline,k as offset,P as shift,D as size};
15
+ */d=p,function(){var e={}.hasOwnProperty;function t(){for(var n=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)n.push(o);else if(Array.isArray(o)){if(o.length){var l=t.apply(null,o);l&&n.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){n.push(o.toString());continue}for(var a in o)e.call(o,a)&&o[a]&&n.push(a)}}}return n.join(" ")}d.exports?(t.default=t,d.exports=t):window.classNames=t}();var y=p.exports;const m=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},h=({content:e})=>u.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),g={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},v=t({getTooltipData:()=>g}),w=({children:e})=>{const[t,i]=n({DEFAULT_TOOLTIP_ID:new Set}),[l,a]=n({DEFAULT_TOOLTIP_ID:{current:null}}),c=(e,...t)=>{i((n=>{var r;const o=null!==(r=n[e])&&void 0!==r?r:new Set;return t.forEach((e=>o.add(e))),{...n,[e]:new Set(o)}}))},s=(e,...t)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},f=r(((e="DEFAULT_TOOLTIP_ID")=>{var n,r;return{anchorRefs:null!==(n=t[e])&&void 0!==n?n:new Set,activeAnchor:null!==(r=l[e])&&void 0!==r?r:{current:null},attach:(...t)=>c(e,...t),detach:(...t)=>s(e,...t),setActiveAnchor:t=>((e,t)=>{a((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[t,l,c,s]),d=o((()=>({getTooltipData:f})),[f]);return u.exports.jsx(v.Provider,{value:d,children:e})};function b(e="DEFAULT_TOOLTIP_ID"){return i(v).getTooltipData(e)}const x=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:c,offset:s,wrapper:f,events:d,positionStrategy:p,delayShow:m,delayHide:h})=>{const{attach:g,detach:v}=b(e),w=l(null);return a((()=>(g(w),()=>{v(w)})),[]),u.exports.jsx("span",{ref:w,className:y("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":c,"data-tooltip-offset":s,"data-tooltip-wrapper":f,"data-tooltip-events":d,"data-tooltip-position-strategy":p,"data-tooltip-delay-show":m,"data-tooltip-delay-hide":h,children:t})},_="undefined"!=typeof window?c:a;function S(e){return e.split("-")[1]}function T(e){return"y"===e?"height":"width"}function A(e){return e.split("-")[0]}function R(e){return["top","bottom"].includes(A(e))?"x":"y"}function O(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,a=R(t),c=T(a),s=r[c]/2-o[c]/2,u="x"===a;let f;switch(A(t)){case"top":f={x:i,y:r.y-o.height};break;case"bottom":f={x:i,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:l};break;case"left":f={x:r.x-o.width,y:l};break;default:f={x:r.x,y:r.y}}switch(S(t)){case"start":f[a]-=s*(n&&u?-1:1);break;case"end":f[a]+=s*(n&&u?-1:1)}return f}function k(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function E(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function j(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:c}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=t,y=k(p),m=a[d?"floating"===f?"reference":"floating":f],h=E(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:s,rootBoundary:u,strategy:c})),g="floating"===f?{...l.floating,x:r,y:o}:l.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),w=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},b=E(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:g,offsetParent:v,strategy:c}):g);return{top:(h.top-b.top+y.top)/w.y,bottom:(b.bottom-h.bottom+y.bottom)/w.y,left:(h.left-b.left+y.left)/w.x,right:(b.right-h.right+y.right)/w.x}}const L=Math.min,P=Math.max;function D(e,t,n){return P(e,L(t,n))}const N={left:"right",right:"left",bottom:"top",top:"bottom"};function F(e){return e.replace(/left|right|bottom|top/g,(e=>N[e]))}const $={start:"end",end:"start"};function C(e){return e.replace(/start|end/g,(e=>$[e]))}const I=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:l,platform:a,elements:c}=t,{mainAxis:s=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:y=!0,...m}=e,h=A(r),g=A(l)===l,v=await(null==a.isRTL?void 0:a.isRTL(c.floating)),w=f||(g||!y?[F(l)]:function(e){const t=F(e);return[C(e),t,C(t)]}(l));f||"none"===p||w.push(...function(e,t,n,r){const o=S(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:l;default:return[]}}(A(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(C)))),i}(l,y,p,v));const b=[l,...w],x=await j(t,m),_=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(s&&_.push(x[h]),u){const{main:e,cross:t}=function(e,t,n){void 0===n&&(n=!1);const r=S(e),o=R(e),i=T(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=F(l)),{main:l,cross:F(l)}}(r,i,v);_.push(x[e],x[t])}if(O=[...O,{placement:r,overflows:_}],!_.every((e=>e<=0))){var k,E;const e=((null==(k=o.flip)?void 0:k.index)||0)+1,t=b[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n=null==(E=O.find((e=>e.overflows[0]<=0)))?void 0:E.placement;if(!n)switch(d){case"bestFit":{var L;const e=null==(L=O.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:L[0];e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const W=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),l=A(n),a=S(n),c="x"===R(n),s=["left","top"].includes(l)?-1:1,u=i&&c?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:d,crossAxis:p,alignmentAxis:y}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return a&&"number"==typeof y&&(p="end"===a?-1*y:y),c?{x:p*u,y:d*s}:{x:d*s,y:p*u}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const U=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:l=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=e,s={x:n,y:r},u=await j(t,c),f=R(A(o)),d="x"===f?"y":"x";let p=s[f],y=s[d];if(i){const e="y"===f?"bottom":"right";p=D(p+u["y"===f?"top":"left"],p,p-u[e])}if(l){const e="y"===d?"bottom":"right";y=D(y+u["y"===d?"top":"left"],y,y-u[e])}const m=a.fn({...t,[f]:p,[d]:y});return{...m,data:{x:m.x-n,y:m.y-r}}}}};function H(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function B(e){return H(e).getComputedStyle(e)}const M=Math.min,q=Math.max,V=Math.round;function Y(e){const t=B(e);let n=parseFloat(t.width),r=parseFloat(t.height);const o=e.offsetWidth,i=e.offsetHeight,l=V(n)!==o||V(r)!==i;return l&&(n=o,r=i),{width:n,height:r,fallback:l}}function z(e){return G(e)?(e.nodeName||"").toLowerCase():""}let X;function K(){if(X)return X;const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(X=e.brands.map((e=>e.brand+"/"+e.version)).join(" "),X):navigator.userAgent}function J(e){return e instanceof H(e).HTMLElement}function Z(e){return e instanceof H(e).Element}function G(e){return e instanceof H(e).Node}function Q(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof H(e).ShadowRoot||e instanceof ShadowRoot}function ee(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=B(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function te(e){return["table","td","th"].includes(z(e))}function ne(e){const t=/firefox/i.test(K()),n=B(e),r=n.backdropFilter||n.WebkitBackdropFilter;return"none"!==n.transform||"none"!==n.perspective||!!r&&"none"!==r||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter||["transform","perspective"].some((e=>n.willChange.includes(e)))||["paint","layout","strict","content"].some((e=>{const t=n.contain;return null!=t&&t.includes(e)}))}function re(){return!/^((?!chrome|android).)*safari/i.test(K())}function oe(e){return["html","body","#document"].includes(z(e))}function ie(e){return Z(e)?e:e.contextElement}const le={x:1,y:1};function ae(e){const t=ie(e);if(!J(t))return le;const n=t.getBoundingClientRect(),{width:r,height:o,fallback:i}=Y(t);let l=(i?V(n.width):n.width)/r,a=(i?V(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),a&&Number.isFinite(a)||(a=1),{x:l,y:a}}function ce(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const l=e.getBoundingClientRect(),a=ie(e);let c=le;t&&(r?Z(r)&&(c=ae(r)):c=ae(e));const s=a?H(a):window,u=!re()&&n;let f=(l.left+(u&&(null==(o=s.visualViewport)?void 0:o.offsetLeft)||0))/c.x,d=(l.top+(u&&(null==(i=s.visualViewport)?void 0:i.offsetTop)||0))/c.y,p=l.width/c.x,y=l.height/c.y;if(a){const e=H(a),t=r&&Z(r)?H(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=ae(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,f*=e.x,d*=e.y,p*=e.x,y*=e.y,f+=t.x,d+=t.y,n=H(n).frameElement}}return{width:p,height:y,top:d,right:f+p,bottom:d+y,left:f,x:f,y:d}}function se(e){return((G(e)?e.ownerDocument:e.document)||window.document).documentElement}function ue(e){return Z(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function fe(e){return ce(se(e)).left+ue(e).scrollLeft}function de(e){if("html"===z(e))return e;const t=e.assignedSlot||e.parentNode||Q(e)&&e.host||se(e);return Q(t)?t.host:t}function pe(e){const t=de(e);return oe(t)?t.ownerDocument.body:J(t)&&ee(t)?t:pe(t)}function ye(e,t){var n;void 0===t&&(t=[]);const r=pe(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=H(r);return o?t.concat(i,i.visualViewport||[],ee(r)?r:[]):t.concat(r,ye(r))}function me(e,t,n){return"viewport"===t?E(function(e,t){const n=H(e),r=se(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,c=0;if(o){i=o.width,l=o.height;const e=re();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,c=o.offsetTop)}return{width:i,height:l,x:a,y:c}}(e,n)):Z(t)?E(function(e,t){const n=ce(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=J(e)?ae(e):{x:1,y:1};return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n)):E(function(e){const t=se(e),n=ue(e),r=e.ownerDocument.body,o=q(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=q(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let l=-n.scrollLeft+fe(e);const a=-n.scrollTop;return"rtl"===B(r).direction&&(l+=q(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:l,y:a}}(se(e)))}function he(e){return J(e)&&"fixed"!==B(e).position?e.offsetParent:null}function ge(e){const t=H(e);let n=he(e);for(;n&&te(n)&&"static"===B(n).position;)n=he(n);return n&&("html"===z(n)||"body"===z(n)&&"static"===B(n).position&&!ne(n))?t:n||function(e){let t=de(e);for(;J(t)&&!oe(t);){if(ne(t))return t;t=de(t)}return null}(e)||t}function ve(e,t,n){const r=J(t),o=se(t),i=ce(e,!0,"fixed"===n,t);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==z(t)||ee(o))&&(l=ue(t)),J(t)){const e=ce(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=fe(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}const we={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e,t){const n=t.get(e);if(n)return n;let r=ye(e).filter((e=>Z(e)&&"body"!==z(e))),o=null;const i="fixed"===B(e).position;let l=i?de(e):e;for(;Z(l)&&!oe(l);){const e=B(l),t=ne(l);(i?t||o:t||"static"!==e.position||!o||!["absolute","fixed"].includes(o.position))?o=e:r=r.filter((e=>e!==l)),l=de(l)}return t.set(e,r),r}(t,this._c):[].concat(n),l=[...i,r],a=l[0],c=l.reduce(((e,n)=>{const r=me(t,n,o);return e.top=q(r.top,e.top),e.right=M(r.right,e.right),e.bottom=M(r.bottom,e.bottom),e.left=q(r.left,e.left),e}),me(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=J(n),i=se(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0},a={x:1,y:1};const c={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==z(n)||ee(i))&&(l=ue(n)),J(n))){const e=ce(n);a=ae(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-l.scrollLeft*a.x+c.x,y:t.y*a.y-l.scrollTop*a.y+c.y}},isElement:Z,getDimensions:function(e){return J(e)?Y(e):e.getBoundingClientRect()},getOffsetParent:ge,getDocumentElement:se,getScale:ae,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const o=this.getOffsetParent||ge,i=this.getDimensions;return{reference:ve(t,await o(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===B(e).direction},be=(e,t,n)=>{const r=new Map,o={platform:we,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),c=await(null==l.isRTL?void 0:l.isRTL(t));if(null==l&&console.error(["Floating UI: `platform` property was not passed to config. If you","want to use Floating UI on the web, install @floating-ui/dom","instead of the /core package. Otherwise, you can create your own","`platform`: https://floating-ui.com/docs/platform"].join(" ")),a.filter((e=>{let{name:t}=e;return"autoPlacement"===t||"flip"===t})).length>1)throw new Error(["Floating UI: duplicate `flip` and/or `autoPlacement` middleware","detected. This will lead to an infinite loop. Ensure only one of","either has been passed to the `middleware` array."].join(" "));e&&t||console.error(["Floating UI: The reference and/or floating element was not defined","when `computePosition()` was called. Ensure that both elements have","been created and can be measured."].join(" "));let s=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=O(s,r,c),d=r,p={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:m}=a[n],{x:h,y:g,data:v,reset:w}=await m({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:s,platform:l,elements:{reference:e,floating:t}});u=null!=h?h:u,f=null!=g?g:f,p={...p,[i]:{...p[i],...v}},y>50&&console.warn(["Floating UI: The middleware lifecycle appears to be running in an","infinite loop. This is usually caused by a `reset` continually","being returned without a break condition."].join(" ")),w&&y<=50&&(y++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(s=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:f}=O(s,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})},xe=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[W(Number(o)),I(),U({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=l;return n?(a.push({name:"arrow",options:c={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=c||{},{x:r,y:o,placement:i,rects:l,platform:a}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const s=k(n),u={x:r,y:o},f=R(i),d=T(f),p=await a.getDimensions(t),y="y"===f?"top":"left",m="y"===f?"bottom":"right",h=l.reference[d]+l.reference[f]-u[f]-l.floating[d],g=u[f]-l.reference[f],v=await(null==a.getOffsetParent?void 0:a.getOffsetParent(t));let w=v?"y"===f?v.clientHeight||0:v.clientWidth||0:0;0===w&&(w=l.floating[d]);const b=h/2-g/2,x=s[y],_=w-p[d]-s[m],A=w/2-p[d]/2+b,O=D(x,A,_),E=null!=S(i)&&A!=O&&l.reference[d]/2-(A<x?s[y]:s[m])-p[d]/2<0;return{[f]:u[f]-(E?A<x?x-A:_-A:0),data:{[f]:O,centerOffset:A-O}}}}),be(e,t,{placement:r,strategy:i,middleware:a}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:c}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=c?`${c}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):be(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var c};var _e={tooltip:"styles-module_tooltip__mnnfp",fixed:"styles-module_fixed__7ciUi",arrow:"styles-module_arrow__K0L3T","no-arrow":"styles-module_no-arrow__KcFZN",clickable:"styles-module_clickable__Bv9o7",show:"styles-module_show__2NboJ",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 Se=({id:e,className:t,classNameArrow:r,variant:o="dark",anchorId:i,anchorSelect:c,place:s="top",offset:f=10,events:d=["hover"],positionStrategy:p="absolute",middlewares:g,wrapper:v,children:w=null,delayShow:x=0,delayHide:S=0,float:T=!1,noArrow:A=!1,clickable:R=!1,closeOnEsc:O=!1,style:k,position:E,afterShow:j,afterHide:L,content:P,html:D,isOpen:N,setIsOpen:F,activeAnchor:$,setActiveAnchor:C})=>{const I=l(null),W=l(null),U=l(null),H=l(null),[B,M]=n({}),[q,V]=n({}),[Y,z]=n(!1),[X,K]=n(!1),J=l(!1),Z=l(null),{anchorRefs:G,setActiveAnchor:Q}=b(e),ee=l(!1),[te,ne]=n([]),re=l(!1);_((()=>(re.current=!0,()=>{re.current=!1})),[]),a((()=>{if(!Y){const e=setTimeout((()=>{K(!1)}),150);return()=>{clearTimeout(e)}}return()=>null}),[Y]);const oe=e=>{re.current&&(e&&K(!0),setTimeout((()=>{re.current&&(null==F||F(e),void 0===N&&z(e))}),10))};a((()=>{if(void 0===N)return()=>null;N&&K(!0);const e=setTimeout((()=>{z(N)}),10);return()=>{clearTimeout(e)}}),[N]),a((()=>{Y!==J.current&&(J.current=Y,Y?null==j||j():null==L||L())}),[Y]);const ie=(e=S)=>{H.current&&clearTimeout(H.current),H.current=setTimeout((()=>{ee.current||oe(!1)}),e)},le=e=>{var t;if(!e)return;x?(U.current&&clearTimeout(U.current),U.current=setTimeout((()=>{oe(!0)}),x)):oe(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;C(n),Q({current:n}),H.current&&clearTimeout(H.current)},ae=()=>{R?ie(S||100):S?ie():oe(!1),U.current&&clearTimeout(U.current)},ce=({x:e,y:t})=>{xe({place:s,offset:f,elementReference:{getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})},tooltipReference:I.current,tooltipArrowReference:W.current,strategy:p,middlewares:g}).then((e=>{Object.keys(e.tooltipStyles).length&&M(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&V(e.tooltipArrowStyles)}))},se=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};ce(n),Z.current=n},ue=e=>{le(e),S&&ie()},fe=e=>{const t=document.querySelector(`[id='${i}']`);(null==t?void 0:t.contains(e.target))||te.some((t=>t.contains(e.target)))||oe(!1)},de=e=>{"Escape"===e.key&&oe(!1)},pe=m(le,50),ye=m(ae,50);a((()=>{var e,t;const n=new Set(G);te.forEach((e=>{n.add({current:e})}));const r=document.querySelector(`[id='${i}']`);r&&n.add({current:r}),O&&window.addEventListener("keydown",de);const o=[];d.find((e=>"click"===e))&&(window.addEventListener("click",fe),o.push({event:"click",listener:ue})),d.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:pe},{event:"mouseleave",listener:ye},{event:"focus",listener:pe},{event:"blur",listener:ye}),T&&o.push({event:"mousemove",listener:se}));const l=()=>{ee.current=!0},a=()=>{ee.current=!1,ae()};return R&&(null===(e=I.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=I.current)||void 0===t||t.addEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.addEventListener(e,t)}))})),()=>{var e,t;d.find((e=>"click"===e))&&window.removeEventListener("click",fe),O&&window.removeEventListener("keydown",de),R&&(null===(e=I.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=I.current)||void 0===t||t.removeEventListener("mouseleave",a)),o.forEach((({event:e,listener:t})=>{n.forEach((n=>{var r;null===(r=n.current)||void 0===r||r.removeEventListener(e,t)}))}))}}),[X,G,te,O,d]),a((()=>{let t=null!=c?c:"";!t&&e&&(t=`[data-tooltip-id='${e}']`);const n=new MutationObserver((n=>{const r=[];n.forEach((n=>{if("attributes"===n.type&&"data-tooltip-id"===n.attributeName){n.target.getAttribute("data-tooltip-id")===e&&r.push(n.target)}if("childList"===n.type&&($&&[...n.removedNodes].some((e=>!!e.contains($)&&(K(!1),oe(!1),C(null),!0))),t))try{const e=[...n.addedNodes].filter((e=>1===e.nodeType));r.push(...e.filter((e=>e.matches(t)))),r.push(...e.flatMap((e=>[...e.querySelectorAll(t)])))}catch(e){}})),r.length&&ne((e=>[...e,...r]))}));return n.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-tooltip-id"]}),()=>{n.disconnect()}}),[e,c,$]),a((()=>{E?ce(E):T?Z.current&&ce(Z.current):xe({place:s,offset:f,elementReference:$,tooltipReference:I.current,tooltipArrowReference:W.current,strategy:p,middlewares:g}).then((e=>{re.current&&(Object.keys(e.tooltipStyles).length&&M(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&V(e.tooltipArrowStyles))}))}),[Y,$,P,D,s,f,p,E]),a((()=>{var e;const t=document.querySelector(`[id='${i}']`),n=[...te,t];$&&n.includes($)||C(null!==(e=te[0])&&void 0!==e?e:t)}),[i,te,$]),a((()=>()=>{U.current&&clearTimeout(U.current),H.current&&clearTimeout(H.current)}),[]),a((()=>{let t=c;if(!t&&e&&(t=`[data-tooltip-id='${e}']`),t)try{const e=Array.from(document.querySelectorAll(t));ne(e)}catch(e){ne([])}}),[e,c]);const me=Boolean(D||P||w)&&Y&&Object.keys(B).length>0;return X?u.exports.jsxs(v,{id:e,role:"tooltip",className:y("react-tooltip",_e.tooltip,_e[o],t,{[_e.show]:me,[_e.fixed]:"fixed"===p,[_e.clickable]:R}),style:{...k,...B},ref:I,children:[D&&u.exports.jsx(h,{content:D})||P||w,u.exports.jsx(v,{className:y("react-tooltip-arrow",_e.arrow,r,{[_e["no-arrow"]]:A}),style:q,ref:W})]}):null},Te=({id:e,anchorId:t,anchorSelect:r,content:o,html:i,className:l,classNameArrow:c,variant:s="dark",place:f="top",offset:d=10,wrapper:p="div",children:y=null,events:m=["hover"],positionStrategy:h="absolute",middlewares:g,delayShow:v=0,delayHide:w=0,float:x=!1,noArrow:_=!1,clickable:S=!1,closeOnEsc:T=!1,style:A,position:R,isOpen:O,setIsOpen:k,afterShow:E,afterHide:j})=>{const[L,P]=n(o),[D,N]=n(i),[F,$]=n(f),[C,I]=n(s),[W,U]=n(d),[H,B]=n(v),[M,q]=n(w),[V,Y]=n(x),[z,X]=n(p),[K,J]=n(m),[Z,G]=n(h),[Q,ee]=n(null),{anchorRefs:te,activeAnchor:ne}=b(e),re=e=>null==e?void 0:e.getAttributeNames().reduce(((t,n)=>{var r;if(n.startsWith("data-tooltip-")){t[n.replace(/^data-tooltip-/,"")]=null!==(r=null==e?void 0:e.getAttribute(n))&&void 0!==r?r:null}return t}),{}),oe=e=>{const t={place:e=>{var t;$(null!==(t=e)&&void 0!==t?t:f)},content:e=>{P(null!=e?e:o)},html:e=>{N(null!=e?e:i)},variant:e=>{var t;I(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{U(null===e?d:Number(e))},wrapper:e=>{var t;X(null!==(t=e)&&void 0!==t?t:p)},events:e=>{const t=null==e?void 0:e.split(" ");J(null!=t?t:m)},"position-strategy":e=>{var t;G(null!==(t=e)&&void 0!==t?t:h)},"delay-show":e=>{B(null===e?v:Number(e))},"delay-hide":e=>{q(null===e?w:Number(e))},float:e=>{Y(null===e?x:"true"===e)}};Object.values(t).forEach((e=>e(null))),Object.entries(e).forEach((([e,n])=>{var r;null===(r=t[e])||void 0===r||r.call(t,n)}))};a((()=>{P(o)}),[o]),a((()=>{N(i)}),[i]),a((()=>{$(f)}),[f]),a((()=>{var n;const o=new Set(te);let i=r;if(!i&&e&&(i=`[data-tooltip-id='${e}']`),i)try{document.querySelectorAll(i).forEach((e=>{o.add({current:e})}))}catch(e){console.warn(`[react-tooltip] "${r}" is not a valid CSS selector`)}const l=document.querySelector(`[id='${t}']`);if(l&&o.add({current:l}),!o.size)return()=>null;const a=null!==(n=null!=Q?Q:l)&&void 0!==n?n:ne.current,c=new MutationObserver((e=>{e.forEach((e=>{var t;if(!a||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=re(a);oe(n)}))})),s={attributes:!0,childList:!1,subtree:!1};if(a){const e=re(a);oe(e),c.observe(a,s)}return()=>{c.disconnect()}}),[te,ne,Q,t,r]);const ie={id:e,anchorId:t,anchorSelect:r,className:l,classNameArrow:c,content:L,html:D,place:F,variant:C,offset:W,wrapper:z,events:K,positionStrategy:Z,middlewares:g,delayShow:H,delayHide:M,float:V,noArrow:_,clickable:S,closeOnEsc:T,style:A,position:R,isOpen:O,setIsOpen:k,afterShow:E,afterHide:j,activeAnchor:Q,setActiveAnchor:e=>ee(e)};return y?u.exports.jsx(Se,{...ie,children:y}):u.exports.jsx(Se,{...ie})};export{Te as Tooltip,w as TooltipProvider,x as TooltipWrapper};