react-tooltip 5.6.0 → 5.7.1

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.
@@ -2644,7 +2644,7 @@ var styles = {"tooltip":"styles-module_tooltip__mnnfp","fixed":"styles-module_fi
2644
2644
 
2645
2645
  const Tooltip = ({
2646
2646
  // props
2647
- id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', middlewares, wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position, afterShow, afterHide,
2647
+ id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', middlewares, wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style: externalStyles, position, afterShow, afterHide,
2648
2648
  // props handled by controller
2649
2649
  content, html, isOpen, setIsOpen, }) => {
2650
2650
  const tooltipRef = require$$0.useRef(null);
@@ -2791,6 +2791,12 @@ content, html, isOpen, setIsOpen, }) => {
2791
2791
  }
2792
2792
  handleShow(false);
2793
2793
  };
2794
+ const handleEsc = (event) => {
2795
+ if (event.key !== 'Escape') {
2796
+ return;
2797
+ }
2798
+ handleShow(false);
2799
+ };
2794
2800
  // debounce handler to prevent call twice when
2795
2801
  // mouse enter and focus events being triggered toggether
2796
2802
  const debouncedHandleShowTooltip = debounce(handleShowTooltip, 50);
@@ -2806,6 +2812,9 @@ content, html, isOpen, setIsOpen, }) => {
2806
2812
  if (!elementRefs.size) {
2807
2813
  return () => null;
2808
2814
  }
2815
+ if (closeOnEsc) {
2816
+ window.addEventListener('keydown', handleEsc);
2817
+ }
2809
2818
  const enabledEvents = [];
2810
2819
  if (events.find((event) => event === 'click')) {
2811
2820
  window.addEventListener('click', handleClickOutsideAnchor);
@@ -2839,7 +2848,12 @@ content, html, isOpen, setIsOpen, }) => {
2839
2848
  });
2840
2849
  return () => {
2841
2850
  var _a, _b;
2842
- window.removeEventListener('click', handleClickOutsideAnchor);
2851
+ if (events.find((event) => event === 'click')) {
2852
+ window.removeEventListener('click', handleClickOutsideAnchor);
2853
+ }
2854
+ if (closeOnEsc) {
2855
+ window.removeEventListener('keydown', handleEsc);
2856
+ }
2843
2857
  if (clickable) {
2844
2858
  (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', handleMouseEnterTooltip);
2845
2859
  (_b = tooltipRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', handleMouseLeaveTooltip);
@@ -2851,7 +2865,7 @@ content, html, isOpen, setIsOpen, }) => {
2851
2865
  });
2852
2866
  });
2853
2867
  };
2854
- }, [anchorRefs, activeAnchor, anchorId, events, delayHide, delayShow]);
2868
+ }, [anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2855
2869
  require$$0.useEffect(() => {
2856
2870
  if (position) {
2857
2871
  // if `position` is set, override regular and `float` positioning
@@ -2935,7 +2949,7 @@ content, html, isOpen, setIsOpen, }) => {
2935
2949
  }), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
2936
2950
  };
2937
2951
 
2938
- const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
2952
+ const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
2939
2953
  const [tooltipContent, setTooltipContent] = require$$0.useState(content);
2940
2954
  const [tooltipHtml, setTooltipHtml] = require$$0.useState(html);
2941
2955
  const [tooltipPlace, setTooltipPlace] = require$$0.useState(place);
@@ -3073,6 +3087,7 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
3073
3087
  float: tooltipFloat,
3074
3088
  noArrow,
3075
3089
  clickable,
3090
+ closeOnEsc,
3076
3091
  style,
3077
3092
  position,
3078
3093
  isOpen,
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e){return e.split("-")[0]}function o(e){return e.split("-")[1]}function i(e){return["top","bottom"].includes(r(e))?"x":"y"}function l(e){return"y"===e?"height":"width"}function a(e,t,n){let{reference:a,floating:s}=e;const c=a.x+a.width/2-s.width/2,u=a.y+a.height/2-s.height/2,f=i(t),p=l(f),d=a[p]/2-s[p]/2,m="x"===f;let y;switch(r(t)){case"top":y={x:c,y:a.y-s.height};break;case"bottom":y={x:c,y:a.y+a.height};break;case"right":y={x:a.x+a.width,y:u};break;case"left":y={x:a.x-s.width,y:u};break;default:y={x:a.x,y:a.y}}switch(o(t)){case"start":y[f]-=d*(n&&m?-1:1);break;case"end":y[f]+=d*(n&&m?-1:1)}return y}function s(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 c(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function u(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=t,h=s(y),g=a[m?"floating"===d?"reference":"floating":d],v=c(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:u})),w=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:u}):l[d]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}const f=Math.min,p=Math.max;function d(e,t,n){return p(e,f(t,n))}const m={left:"right",right:"left",bottom:"top",top:"bottom"};function y(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function h(e,t,n){void 0===n&&(n=!1);const r=o(e),a=i(e),s=l(a);let c="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const g={start:"end",end:"start"};function v(e){return e.replace(/start|end/g,(e=>g[e]))}const w=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const b=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",flipAlignment:g=!0,...w}=e,b=r(o),x=d||(b===a||!g?[y(a)]:function(e){const t=y(e);return[v(e),t,v(t)]}(a)),R=[a,...x],_=await u(t,w),S=[];let T=(null==(n=i.flip)?void 0:n.overflows)||[];if(f&&S.push(_[b]),p){const{main:e,cross:t}=h(o,l,await(null==s.isRTL?void 0:s.isRTL(c.floating)));S.push(_[e],_[t])}if(T=[...T,{placement:o,overflows:S}],!S.every((e=>e<=0))){var O,k;const e=(null!=(O=null==(k=i.flip)?void 0:k.index)?O:0)+1,t=R[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{var A;const e=null==(A=T.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}};const x=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:l}=t,a=await async function(e,t){const{placement:n,platform:l,elements:a}=e,s=await(null==l.isRTL?void 0:l.isRTL(a.floating)),c=r(n),u=o(n),f="x"===i(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,m="function"==typeof t?t(e):t;let{mainAxis:y,crossAxis:h,alignmentAxis:g}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:y*p}:{x:y*p,y:h*d}}(t,e);return{x:n+a.x,y:l+a.y,data:a}}}};const R=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:l}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=e,p={x:n,y:o},m=await u(t,f),y=i(r(l)),h="x"===y?"y":"x";let g=p[y],v=p[h];if(a){const e="y"===y?"bottom":"right";g=d(g+m["y"===y?"top":"left"],g,g-m[e])}if(s){const e="y"===h?"bottom":"right";v=d(v+m["y"===h?"top":"left"],v,v-m[e])}const w=c.fn({...t,[y]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function _(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function S(e){if(null==e)return window;if(!_(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function T(e){return S(e).getComputedStyle(e)}function O(e){return _(e)?"":e?(e.nodeName||"").toLowerCase():""}function k(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function A(e){return e instanceof S(e).HTMLElement}function j(e){return e instanceof S(e).Element}function E(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof S(e).ShadowRoot||e instanceof ShadowRoot}function P(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=T(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function L(e){return["table","td","th"].includes(O(e))}function D(e){const t=/firefox/i.test(k()),n=T(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 N(){return!/^((?!chrome|android).)*safari/i.test(k())}function C(e){return["html","body","#document"].includes(O(e))}const I=Math.min,$=Math.max,F=Math.round;function W(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&A(e)&&(s=e.offsetWidth>0&&F(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&F(a.height)/e.offsetHeight||1);const u=j(e)?S(e):window,f=!N()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,m=a.width/s,y=a.height/c;return{width:m,height:y,top:d,right:p+m,bottom:d+y,left:p,x:p,y:d}}function H(e){return(t=e,(t instanceof S(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function U(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function B(e){return W(H(e)).left+U(e).scrollLeft}function V(e,t,n){const r=A(t),o=H(t),i=W(e,r&&function(e){const t=W(e);return F(t.width)!==e.offsetWidth||F(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==O(t)||P(o))&&(l=U(t)),A(t)){const e=W(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=B(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function M(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||(E(e)?e.host:null)||H(e);return E(t)?t.host:t}function z(e){return A(e)&&"fixed"!==T(e).position?e.offsetParent:null}function q(e){const t=S(e);let n=z(e);for(;n&&L(n)&&"static"===T(n).position;)n=z(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===T(n).position&&!D(n))?t:n||function(e){let t=M(e);for(;A(t)&&!C(t);){if(D(t))return t;t=M(t)}return null}(e)||t}function Y(e){if(A(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=W(e);return{width:t.width,height:t.height}}function X(e){const t=M(e);return C(t)?e.ownerDocument.body:A(t)&&P(t)?t:X(t)}function K(e,t){var n;void 0===t&&(t=[]);const r=X(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=S(r),l=o?[i].concat(i.visualViewport||[],P(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(K(l))}function J(e,t,n){return"viewport"===t?c(function(e,t){const n=S(e),r=H(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=N();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):j(t)?function(e,t){const n=W(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):c(function(e){var t;const n=H(e),r=U(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=$(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=$(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+B(e);const s=-r.scrollTop;return"rtl"===T(o||n).direction&&(a+=$(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(H(e)))}const Z={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=K(e).filter((e=>j(e)&&"body"!==O(e))),n=e,r=null;for(;j(n)&&!C(n);){const e=T(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!D(n)?t=t.filter((e=>e!==n)):r=e,n=M(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=J(t,n,o);return e.top=$(r.top,e.top),e.right=I(r.right,e.right),e.bottom=I(r.bottom,e.bottom),e.left=$(r.left,e.left),e}),J(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=A(n),i=H(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==O(n)||P(i))&&(l=U(n)),A(n))){const e=W(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:j,getDimensions:Y,getOffsetParent:q,getDocumentElement:H,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:V(t,q(n),r),floating:{...Y(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===T(e).direction},G=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=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(" ")),s.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 u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=a(u,r,c),d=r,m={},y=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,m={...m,[i]:{...m[i],...w}},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(" ")),b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=a(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:m}})(e,t,{platform:Z,...n});var Q={exports:{}},ee={};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e);function r(e){return e.split("-")[0]}function o(e){return e.split("-")[1]}function i(e){return["top","bottom"].includes(r(e))?"x":"y"}function l(e){return"y"===e?"height":"width"}function a(e,t,n){let{reference:a,floating:s}=e;const c=a.x+a.width/2-s.width/2,u=a.y+a.height/2-s.height/2,f=i(t),p=l(f),d=a[p]/2-s[p]/2,m="x"===f;let y;switch(r(t)){case"top":y={x:c,y:a.y-s.height};break;case"bottom":y={x:c,y:a.y+a.height};break;case"right":y={x:a.x+a.width,y:u};break;case"left":y={x:a.x-s.width,y:u};break;default:y={x:a.x,y:a.y}}switch(o(t)){case"start":y[f]-=d*(n&&m?-1:1);break;case"end":y[f]+=d*(n&&m?-1:1)}return y}function s(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 c(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function u(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=t,h=s(y),g=a[m?"floating"===d?"reference":"floating":d],v=c(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:u})),w=c(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:u}):l[d]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}const f=Math.min,p=Math.max;function d(e,t,n){return p(e,f(t,n))}const m={left:"right",right:"left",bottom:"top",top:"bottom"};function y(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function h(e,t,n){void 0===n&&(n=!1);const r=o(e),a=i(e),s=l(a);let c="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=y(c)),{main:c,cross:y(c)}}const g={start:"end",end:"start"};function v(e){return e.replace(/start|end/g,(e=>g[e]))}const w=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const b=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:o,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",flipAlignment:g=!0,...w}=e,b=r(o),x=d||(b===a||!g?[y(a)]:function(e){const t=y(e);return[v(e),t,v(t)]}(a)),R=[a,...x],_=await u(t,w),S=[];let T=(null==(n=i.flip)?void 0:n.overflows)||[];if(f&&S.push(_[b]),p){const{main:e,cross:t}=h(o,l,await(null==s.isRTL?void 0:s.isRTL(c.floating)));S.push(_[e],_[t])}if(T=[...T,{placement:o,overflows:S}],!S.every((e=>e<=0))){var O,k;const e=(null!=(O=null==(k=i.flip)?void 0:k.index)?O:0)+1,t=R[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{var E;const e=null==(E=T.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}};const x=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:l}=t,a=await async function(e,t){const{placement:n,platform:l,elements:a}=e,s=await(null==l.isRTL?void 0:l.isRTL(a.floating)),c=r(n),u=o(n),f="x"===i(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,m="function"==typeof t?t(e):t;let{mainAxis:y,crossAxis:h,alignmentAxis:g}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:y*p}:{x:y*p,y:h*d}}(t,e);return{x:n+a.x,y:l+a.y,data:a}}}};const R=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:l}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...f}=e,p={x:n,y:o},m=await u(t,f),y=i(r(l)),h="x"===y?"y":"x";let g=p[y],v=p[h];if(a){const e="y"===y?"bottom":"right";g=d(g+m["y"===y?"top":"left"],g,g-m[e])}if(s){const e="y"===h?"bottom":"right";v=d(v+m["y"===h?"top":"left"],v,v-m[e])}const w=c.fn({...t,[y]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function _(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function S(e){if(null==e)return window;if(!_(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function T(e){return S(e).getComputedStyle(e)}function O(e){return _(e)?"":e?(e.nodeName||"").toLowerCase():""}function k(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function E(e){return e instanceof S(e).HTMLElement}function A(e){return e instanceof S(e).Element}function j(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof S(e).ShadowRoot||e instanceof ShadowRoot}function P(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=T(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function L(e){return["table","td","th"].includes(O(e))}function D(e){const t=/firefox/i.test(k()),n=T(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 N(){return!/^((?!chrome|android).)*safari/i.test(k())}function C(e){return["html","body","#document"].includes(O(e))}const I=Math.min,$=Math.max,F=Math.round;function W(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&E(e)&&(s=e.offsetWidth>0&&F(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&F(a.height)/e.offsetHeight||1);const u=A(e)?S(e):window,f=!N()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,m=a.width/s,y=a.height/c;return{width:m,height:y,top:d,right:p+m,bottom:d+y,left:p,x:p,y:d}}function H(e){return(t=e,(t instanceof S(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function U(e){return A(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function B(e){return W(H(e)).left+U(e).scrollLeft}function V(e,t,n){const r=E(t),o=H(t),i=W(e,r&&function(e){const t=W(e);return F(t.width)!==e.offsetWidth||F(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==O(t)||P(o))&&(l=U(t)),E(t)){const e=W(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=B(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function M(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||(j(e)?e.host:null)||H(e);return j(t)?t.host:t}function z(e){return E(e)&&"fixed"!==T(e).position?e.offsetParent:null}function q(e){const t=S(e);let n=z(e);for(;n&&L(n)&&"static"===T(n).position;)n=z(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===T(n).position&&!D(n))?t:n||function(e){let t=M(e);for(;E(t)&&!C(t);){if(D(t))return t;t=M(t)}return null}(e)||t}function Y(e){if(E(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=W(e);return{width:t.width,height:t.height}}function X(e){const t=M(e);return C(t)?e.ownerDocument.body:E(t)&&P(t)?t:X(t)}function K(e,t){var n;void 0===t&&(t=[]);const r=X(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=S(r),l=o?[i].concat(i.visualViewport||[],P(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(K(l))}function J(e,t,n){return"viewport"===t?c(function(e,t){const n=S(e),r=H(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=N();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):A(t)?function(e,t){const n=W(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):c(function(e){var t;const n=H(e),r=U(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=$(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=$(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+B(e);const s=-r.scrollTop;return"rtl"===T(o||n).direction&&(a+=$(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(H(e)))}const Z={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=K(e).filter((e=>A(e)&&"body"!==O(e))),n=e,r=null;for(;A(n)&&!C(n);){const e=T(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!D(n)?t=t.filter((e=>e!==n)):r=e,n=M(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=J(t,n,o);return e.top=$(r.top,e.top),e.right=I(r.right,e.right),e.bottom=I(r.bottom,e.bottom),e.left=$(r.left,e.left),e}),J(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=E(n),i=H(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==O(n)||P(i))&&(l=U(n)),E(n))){const e=W(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:A,getDimensions:Y,getOffsetParent:q,getDocumentElement:H,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:V(t,q(n),r),floating:{...Y(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===T(e).direction},G=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,s=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(" ")),s.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 u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=a(u,r,c),d=r,m={},y=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,m={...m,[i]:{...m[i],...w}},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(" ")),b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=a(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:m}})(e,t,{platform:Z,...n});var Q={exports:{}},ee={};
2
2
  /** @license React v16.14.0
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -7,9 +7,9 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- !function(e){!function(){var t=n.default,r=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=60116,m=60121,y=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=w("react.lazy"),m=w("react.block"),y=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;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(S,"");if(/^index\./.test(i)){var l=o.match(S);if(l){var a=l[1];if(a)i=a.replace(S,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(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 S=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return y=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",y.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case m:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,y,h,g,v;return null}var O={};x.ReactDebugCurrentFrame;var k=null;function A(e){k=e}var j,E,P,L=x.ReactCurrentOwner,D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};P={};function C(e,t,n,o,i){var l,a={},s=null,c=null;for(l in void 0!==n&&(s=""+n),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)&&(s=""+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)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('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',T(L.current.type),e.ref),P[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(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){j||(j=!0,R("%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),c&&function(e,t){var n=function(){E||(E=!0,R("%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,n,o,i,l,a){var s={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var I,$=x.ReactCurrentOwner;function F(e){k=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function H(){if($.current){var e=T($.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,I=!1;var U={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=H();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(!U[n]){U[n]=!0;var r="";e&&e._owner&&e._owner!==$.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),F(e),R('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),F(null)}}}function V(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 M(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!==p)return;t=n.propTypes}if(t){var r=T(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 s=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 s.name="Invariant Violation",s}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||(A(o),R("%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),A(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,A(o),R("Failed %s type: %s",n,a.message),A(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!I){I=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,n,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===m||t[0]===y)}(t);if(!_){var S="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(S+=" 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 O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=k||H(),null===t?O="null":Array.isArray(t)?O="array":void 0!==t&&t.$$typeof===r?(O="<"+(T(t.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):O=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,S)}var A=C(t,n,o,b,x);if(null==A)return A;if(_){var j=n.children;if(void 0!==j)if(w)if(Array.isArray(j)){for(var E=0;E<j.length;E++)V(j[E],t);Object.freeze&&Object.freeze(j)}else R("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 V(j,t)}return t===e.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){F(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),F(null);break}}null!==e.ref&&(F(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),F(null))}(A):M(A),A}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(ee),Q.exports=ee;var te,ne={exports:{}};
10
+ !function(e){!function(){var t=n.default,r=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=60116,m=60121,y=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;r=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=w("react.lazy"),m=w("react.block"),y=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;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(S,"");if(/^index\./.test(i)){var l=o.match(S);if(l){var a=l[1];if(a)i=a.replace(S,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(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 S=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return y=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",y.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case m:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,y,h,g,v;return null}var O={};x.ReactDebugCurrentFrame;var k=null;function E(e){k=e}var A,j,P,L=x.ReactCurrentOwner,D=Object.prototype.hasOwnProperty,N={key:!0,ref:!0,__self:!0,__source:!0};P={};function C(e,t,n,o,i){var l,a={},s=null,c=null;for(l in void 0!==n&&(s=""+n),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)&&(s=""+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)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('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',T(L.current.type),e.ref),P[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(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,R("%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),c&&function(e,t){var n=function(){j||(j=!0,R("%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,n,o,i,l,a){var s={$$typeof:r,type:e,key:t,ref:n,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var I,$=x.ReactCurrentOwner;function F(e){k=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}function H(){if($.current){var e=T($.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,I=!1;var U={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=H();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(!U[n]){U[n]=!0;var r="";e&&e._owner&&e._owner!==$.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),F(e),R('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),F(null)}}}function V(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 M(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!==p)return;t=n.propTypes}if(t){var r=T(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 s=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 s.name="Invariant Violation",s}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||(E(o),R("%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),E(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,E(o),R("Failed %s type: %s",n,a.message),E(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!I){I=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,n,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===m||t[0]===y)}(t);if(!_){var S="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(S+=" 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 O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=k||H(),null===t?O="null":Array.isArray(t)?O="array":void 0!==t&&t.$$typeof===r?(O="<"+(T(t.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):O=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,S)}var E=C(t,n,o,b,x);if(null==E)return E;if(_){var A=n.children;if(void 0!==A)if(w)if(Array.isArray(A)){for(var j=0;j<A.length;j++)V(A[j],t);Object.freeze&&Object.freeze(A)}else R("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 V(A,t)}return t===e.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){F(e),R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),F(null);break}}null!==e.ref&&(F(e),R("Invalid attribute `ref` supplied to `React.Fragment`."),F(null))}(E):M(E),E}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(ee),Q.exports=ee;var te,ne={exports:{}};
11
11
  /*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */te=ne,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(" ")}te.exports?(t.default=t,te.exports=t):window.classNames=t}();var re=ne.exports;const oe=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ie=({content:e})=>Q.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),le={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ae={getTooltipData:()=>le},se=e.createContext(ae);function ce(t="DEFAULT_TOOLTIP_ID"){return e.useContext(se).getTooltipData(t)}const ue=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:a=10,strategy:c="absolute",middlewares:u=[x(Number(a)),b(),R({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=null!=p?p:{},{x:r,y:a,placement:c,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const m=s(n),y={x:r,y:a},h=i(c),g=o(c),v=l(h),w=await f.getDimensions(t),b="y"===h?"top":"left",x="y"===h?"bottom":"right",R=u.reference[v]+u.reference[h]-y[h]-u.floating[v],_=y[h]-u.reference[h],S=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let T=S?"y"===h?S.clientHeight||0:S.clientWidth||0:0;0===T&&(T=u.floating[v]);const O=R/2-_/2,k=m[b],A=T-w[v]-m[x],j=T/2-w[v]/2+O,E=d(k,j,A),P=("start"===g?m[b]:m[x])>0&&j!==E&&u.reference[v]<=u.floating[v];return{[h]:y[h]-(P?j<k?k-j:A-j:0),data:{[h]:E,centerOffset:j-E}}}}),G(e,t,{placement:r,strategy:c,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):G(e,t,{placement:"bottom",strategy:c,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};var fe={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 pe=({id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f="div",children:p=null,delayShow:d=0,delayHide:m=0,float:y=!1,noArrow:h=!1,clickable:g=!1,style:v,position:w,afterShow:b,afterHide:x,content:R,html:_,isOpen:S,setIsOpen:T})=>{const O=e.useRef(null),k=e.useRef(null),A=e.useRef(null),j=e.useRef(null),[E,P]=e.useState({}),[L,D]=e.useState({}),[N,C]=e.useState(!1),I=e.useRef(!1),[$,F]=e.useState(!1),W=e.useRef(null),{anchorRefs:H,setActiveAnchor:U}=ce(t),[B,V]=e.useState({current:null}),M=e.useRef(!1),z=e=>{T?T(e):void 0===S&&C(e)};e.useEffect((()=>{N!==I.current&&(I.current=N,N?null==b||b():null==x||x())}),[N]);const q=(e=m)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{M.current||z(!1)}),e)},Y=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{z(!0)}),d)):z(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),U({current:n}),j.current&&clearTimeout(j.current)},X=()=>{g?q(m||50):m?q():z(!1),A.current&&clearTimeout(A.current)},K=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};F(!0),ue({place:l,offset:a,elementReference:n,tooltipReference:O.current,tooltipArrowReference:k.current,strategy:c,middlewares:u}).then((e=>{F(!1),Object.keys(e.tooltipStyles).length&&P(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&D(e.tooltipArrowStyles)}))},J=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};K(n),W.current=n},Z=e=>{Y(e),m&&q()},G=e=>{var t;(null===(t=B.current)||void 0===t?void 0:t.contains(e.target))||z(!1)},ee=oe(Y,50),te=oe(X,50);e.useEffect((()=>{var e,t;const n=new Set(H),r=document.querySelector(`[id='${i}']`);if(r&&(V((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",G),o.push({event:"click",listener:Z})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ee},{event:"mouseleave",listener:te},{event:"focus",listener:ee},{event:"blur",listener:te}),y&&o.push({event:"mousemove",listener:J}));const l=()=>{M.current=!0},a=()=>{M.current=!1,X()};return g&&(null===(e=O.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=O.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;window.removeEventListener("click",G),g&&(null===(e=O.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=O.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)}))}))}}),[H,B,i,s,m,d]),e.useEffect((()=>{if(w)return K(w),()=>null;if(y)return W.current&&K(W.current),()=>null;let e=B.current;i&&(e=document.querySelector(`[id='${i}']`)),F(!0);let t=!0;return ue({place:l,offset:a,elementReference:e,tooltipReference:O.current,tooltipArrowReference:k.current,strategy:c,middlewares:u}).then((e=>{t&&(F(!1),Object.keys(e.tooltipStyles).length&&P(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&D(e.tooltipArrowStyles))})),()=>{t=!1}}),[N,S,i,B,R,_,l,a,c,w]),e.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const ne=Boolean(_||R||p);return Q.exports.jsxs(f,{id:t,role:"tooltip",className:re("react-tooltip",fe.tooltip,fe[o],n,{[fe.show]:ne&&!$&&(S||N),[fe.fixed]:"fixed"===c,[fe.clickable]:g}),style:{...v,...E},ref:O,children:[p||_&&Q.exports.jsx(ie,{content:_})||R,Q.exports.jsx("div",{className:re("react-tooltip-arrow",fe.arrow,r,{[fe["no-arrow"]]:h}),style:L,ref:k})]})};exports.Tooltip=({id:t,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:m,delayShow:y=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,style:b,position:x,isOpen:R,setIsOpen:_,afterShow:S,afterHide:T})=>{const[O,k]=e.useState(r),[A,j]=e.useState(o),[E,P]=e.useState(s),[L,D]=e.useState(a),[N,C]=e.useState(c),[I,$]=e.useState(y),[F,W]=e.useState(h),[H,U]=e.useState(g),[B,V]=e.useState(u),[M,z]=e.useState(p),[q,Y]=e.useState(d),{anchorRefs:X,activeAnchor:K}=ce(t),J=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}),{}),Z=e=>{const t={place:e=>{var t;P(null!==(t=e)&&void 0!==t?t:s)},content:e=>{k(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;D(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{C(null===e?c:Number(e))},wrapper:e=>{var t;V(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");z(null!=t?t:p)},"position-strategy":e=>{var t;Y(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{$(null===e?y:Number(e))},"delay-hide":e=>{W(null===e?h:Number(e))},float:e=>{U(null===e?g:Boolean(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)}))};e.useEffect((()=>{k(r)}),[r]),e.useEffect((()=>{j(o)}),[o]),e.useEffect((()=>{var e;const t=new Set(X),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=K.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=J(o);Z(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=J(o);Z(e),i.observe(o,l)}return()=>{i.disconnect()}}),[X,K,n]);const G={id:t,anchorId:n,className:i,classNameArrow:l,content:O,html:A,place:E,variant:L,offset:N,wrapper:B,events:M,positionStrategy:q,middlewares:m,delayShow:I,delayHide:F,float:H,noArrow:v,clickable:w,style:b,position:x,isOpen:R,setIsOpen:_,afterShow:S,afterHide:T};return f?Q.exports.jsx(pe,{...G,children:f}):Q.exports.jsx(pe,{...G})},exports.TooltipProvider=({children:t})=>{const[n,r]=e.useState({DEFAULT_TOOLTIP_ID:new Set}),[o,i]=e.useState({DEFAULT_TOOLTIP_ID:{current:null}}),l=(e,...t)=>{r((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)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=e.useCallback(((e="DEFAULT_TOOLTIP_ID")=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=e.useMemo((()=>({getTooltipData:s})),[s]);return Q.exports.jsx(se.Provider,{value:c,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:m,detach:y}=ce(t),h=e.useRef(null);return e.useEffect((()=>(m(h),()=>{y(h)})),[]),Q.exports.jsx("span",{ref:h,className:re("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},exports.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,l,a,s;const{x:c,y:f,rects:p,middlewareData:d,placement:m,platform:y,elements:g}=t,{alignment:b=null,allowedPlacements:x=w,autoAlignment:R=!0,..._}=e,S=function(e,t,n){return(e?[...n.filter((t=>o(t)===e)),...n.filter((t=>o(t)!==e))]:n.filter((e=>r(e)===e))).filter((n=>!e||o(n)===e||!!t&&v(n)!==n))}(b,R,x),T=await u(t,_),O=null!=(n=null==(i=d.autoPlacement)?void 0:i.index)?n:0,k=S[O];if(null==k)return{};const{main:A,cross:j}=h(k,p,await(null==y.isRTL?void 0:y.isRTL(g.floating)));if(m!==k)return{x:c,y:f,reset:{placement:S[0]}};const E=[T[r(k)],T[A],T[j]],P=[...null!=(l=null==(a=d.autoPlacement)?void 0:a.overflows)?l:[],{placement:k,overflows:E}],L=S[O+1];if(L)return{data:{index:O+1,overflows:P},reset:{placement:L}};const D=P.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),N=null==(s=D.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:s.placement,C=null!=N?N:D[0].placement;return C!==m?{data:{index:O+1,overflows:P},reset:{placement:C}}:{}}}},exports.flip=b,exports.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:o,elements:l,rects:a,platform:u,strategy:d}=t,{padding:m=2,x:y,y:h}=e,g=c(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({rect:a.reference,offsetParent:await(null==u.getOffsetParent?void 0:u.getOffsetParent(l.floating)),strategy:d}):a.reference),v=null!=(n=await(null==u.getClientRects?void 0:u.getClientRects(l.reference)))?n:[],w=s(m);const b=await u.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===v.length&&v[0].left>v[1].right&&null!=y&&null!=h)return null!=(e=v.find((e=>y>e.left-w.left&&y<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)))?e:g;if(v.length>=2){if("x"===i(o)){const e=v[0],t=v[v.length-1],n="top"===r(o),i=e.top,l=t.bottom,a=n?e.left:t.left,s=n?e.right:t.right;return{top:i,bottom:l,left:a,right:s,width:s-a,height:l-i,x:a,y:i}}const e="left"===r(o),t=p(...v.map((e=>e.right))),n=f(...v.map((e=>e.left))),l=v.filter((r=>e?r.left===n:r.right===t)),a=l[0].top,s=l[l.length-1].bottom;return{top:a,bottom:s,left:n,right:t,width:t-n,height:s-a,x:n,y:a}}return g}},floating:l.floating,strategy:d});return a.reference.x!==b.reference.x||a.reference.y!==b.reference.y||a.reference.width!==b.reference.width||a.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},exports.offset=x,exports.shift=R,exports.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:l,elements:a}=t,{apply:s=(()=>{}),...c}=e,f=await u(t,c),d=r(n),m=o(n);let y,h;"top"===d||"bottom"===d?(y=d,h=m===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(h=d,y="end"===m?"top":"bottom");const g=p(f.left,0),v=p(f.right,0),w=p(f.top,0),b=p(f.bottom,0),x={availableHeight:i.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:p(f.top,f.bottom)):f[y]),availableWidth:i.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:p(f.left,f.right)):f[h])};await s({...t,...x});const R=await l.getDimensions(a.floating);return i.floating.width!==R.width||i.floating.height!==R.height?{reset:{rects:!0}}:{}}}};
15
+ */te=ne,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(" ")}te.exports?(t.default=t,te.exports=t):window.classNames=t}();var re=ne.exports;const oe=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ie=({content:e})=>Q.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),le={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},ae={getTooltipData:()=>le},se=e.createContext(ae);function ce(t="DEFAULT_TOOLTIP_ID"){return e.useContext(se).getTooltipData(t)}const ue=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:a=10,strategy:c="absolute",middlewares:u=[x(Number(a)),b(),R({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=null!=p?p:{},{x:r,y:a,placement:c,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const m=s(n),y={x:r,y:a},h=i(c),g=o(c),v=l(h),w=await f.getDimensions(t),b="y"===h?"top":"left",x="y"===h?"bottom":"right",R=u.reference[v]+u.reference[h]-y[h]-u.floating[v],_=y[h]-u.reference[h],S=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let T=S?"y"===h?S.clientHeight||0:S.clientWidth||0:0;0===T&&(T=u.floating[v]);const O=R/2-_/2,k=m[b],E=T-w[v]-m[x],A=T/2-w[v]/2+O,j=d(k,A,E),P=("start"===g?m[b]:m[x])>0&&A!==j&&u.reference[v]<=u.floating[v];return{[h]:y[h]-(P?A<k?k-A:E-A:0),data:{[h]:j,centerOffset:A-j}}}}),G(e,t,{placement:r,strategy:c,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):G(e,t,{placement:"bottom",strategy:c,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};var fe={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 pe=({id:t,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f="div",children:p=null,delayShow:d=0,delayHide:m=0,float:y=!1,noArrow:h=!1,clickable:g=!1,closeOnEsc:v=!1,style:w,position:b,afterShow:x,afterHide:R,content:_,html:S,isOpen:T,setIsOpen:O})=>{const k=e.useRef(null),E=e.useRef(null),A=e.useRef(null),j=e.useRef(null),[P,L]=e.useState({}),[D,N]=e.useState({}),[C,I]=e.useState(!1),$=e.useRef(!1),[F,W]=e.useState(!1),H=e.useRef(null),{anchorRefs:U,setActiveAnchor:B}=ce(t),[V,M]=e.useState({current:null}),z=e.useRef(!1),q=e=>{O?O(e):void 0===T&&I(e)};e.useEffect((()=>{C!==$.current&&($.current=C,C?null==x||x():null==R||R())}),[C]);const Y=(e=m)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{z.current||q(!1)}),e)},X=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{q(!0)}),d)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;M((e=>e.current===n?e:{current:n})),B({current:n}),j.current&&clearTimeout(j.current)},K=()=>{g?Y(m||50):m?Y():q(!1),A.current&&clearTimeout(A.current)},J=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};W(!0),ue({place:l,offset:a,elementReference:n,tooltipReference:k.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles)}))},Z=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};J(n),H.current=n},G=e=>{X(e),m&&Y()},ee=e=>{var t;(null===(t=V.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},te=e=>{"Escape"===e.key&&q(!1)},ne=oe(X,50),le=oe(K,50);e.useEffect((()=>{var e,t;const n=new Set(U),r=document.querySelector(`[id='${i}']`);if(r&&(M((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;v&&window.addEventListener("keydown",te);const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",ee),o.push({event:"click",listener:G})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ne},{event:"mouseleave",listener:le},{event:"focus",listener:ne},{event:"blur",listener:le}),y&&o.push({event:"mousemove",listener:Z}));const l=()=>{z.current=!0},a=()=>{z.current=!1,K()};return g&&(null===(e=k.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=k.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;s.find((e=>"click"===e))&&window.removeEventListener("click",ee),v&&window.removeEventListener("keydown",te),g&&(null===(e=k.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=k.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)}))}))}}),[U,V,v,i,s,m,d]),e.useEffect((()=>{if(b)return J(b),()=>null;if(y)return H.current&&J(H.current),()=>null;let e=V.current;i&&(e=document.querySelector(`[id='${i}']`)),W(!0);let t=!0;return ue({place:l,offset:a,elementReference:e,tooltipReference:k.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{t&&(W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles))})),()=>{t=!1}}),[C,T,i,V,_,S,l,a,c,b]),e.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const ae=Boolean(S||_||p);return Q.exports.jsxs(f,{id:t,role:"tooltip",className:re("react-tooltip",fe.tooltip,fe[o],n,{[fe.show]:ae&&!F&&(T||C),[fe.fixed]:"fixed"===c,[fe.clickable]:g}),style:{...w,...P},ref:k,children:[p||S&&Q.exports.jsx(ie,{content:S})||_,Q.exports.jsx("div",{className:re("react-tooltip-arrow",fe.arrow,r,{[fe["no-arrow"]]:h}),style:D,ref:E})]})};exports.Tooltip=({id:t,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:m,delayShow:y=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:O})=>{const[k,E]=e.useState(r),[A,j]=e.useState(o),[P,L]=e.useState(s),[D,N]=e.useState(a),[C,I]=e.useState(c),[$,F]=e.useState(y),[W,H]=e.useState(h),[U,B]=e.useState(g),[V,M]=e.useState(u),[z,q]=e.useState(p),[Y,X]=e.useState(d),{anchorRefs:K,activeAnchor:J}=ce(t),Z=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}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:s)},content:e=>{E(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;N(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{I(null===e?c:Number(e))},wrapper:e=>{var t;M(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:p)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{F(null===e?y:Number(e))},"delay-hide":e=>{H(null===e?h:Number(e))},float:e=>{B(null===e?g:Boolean(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)}))};e.useEffect((()=>{E(r)}),[r]),e.useEffect((()=>{j(o)}),[o]),e.useEffect((()=>{var e;const t=new Set(K),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Z(o);G(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,n]);const ee={id:t,anchorId:n,className:i,classNameArrow:l,content:k,html:A,place:P,variant:D,offset:C,wrapper:V,events:z,positionStrategy:Y,middlewares:m,delayShow:$,delayHide:W,float:U,noArrow:v,clickable:w,closeOnEsc:b,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:O};return f?Q.exports.jsx(pe,{...ee,children:f}):Q.exports.jsx(pe,{...ee})},exports.TooltipProvider=({children:t})=>{const[n,r]=e.useState({DEFAULT_TOOLTIP_ID:new Set}),[o,i]=e.useState({DEFAULT_TOOLTIP_ID:{current:null}}),l=(e,...t)=>{r((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)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=e.useCallback(((e="DEFAULT_TOOLTIP_ID")=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=e.useMemo((()=>({getTooltipData:s})),[s]);return Q.exports.jsx(se.Provider,{value:c,children:t})},exports.TooltipWrapper=({tooltipId:t,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:m,detach:y}=ce(t),h=e.useRef(null);return e.useEffect((()=>(m(h),()=>{y(h)})),[]),Q.exports.jsx("span",{ref:h,className:re("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},exports.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,i,l,a,s;const{x:c,y:f,rects:p,middlewareData:d,placement:m,platform:y,elements:g}=t,{alignment:b=null,allowedPlacements:x=w,autoAlignment:R=!0,..._}=e,S=function(e,t,n){return(e?[...n.filter((t=>o(t)===e)),...n.filter((t=>o(t)!==e))]:n.filter((e=>r(e)===e))).filter((n=>!e||o(n)===e||!!t&&v(n)!==n))}(b,R,x),T=await u(t,_),O=null!=(n=null==(i=d.autoPlacement)?void 0:i.index)?n:0,k=S[O];if(null==k)return{};const{main:E,cross:A}=h(k,p,await(null==y.isRTL?void 0:y.isRTL(g.floating)));if(m!==k)return{x:c,y:f,reset:{placement:S[0]}};const j=[T[r(k)],T[E],T[A]],P=[...null!=(l=null==(a=d.autoPlacement)?void 0:a.overflows)?l:[],{placement:k,overflows:j}],L=S[O+1];if(L)return{data:{index:O+1,overflows:P},reset:{placement:L}};const D=P.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),N=null==(s=D.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:s.placement,C=null!=N?N:D[0].placement;return C!==m?{data:{index:O+1,overflows:P},reset:{placement:C}}:{}}}},exports.flip=b,exports.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:o,elements:l,rects:a,platform:u,strategy:d}=t,{padding:m=2,x:y,y:h}=e,g=c(u.convertOffsetParentRelativeRectToViewportRelativeRect?await u.convertOffsetParentRelativeRectToViewportRelativeRect({rect:a.reference,offsetParent:await(null==u.getOffsetParent?void 0:u.getOffsetParent(l.floating)),strategy:d}):a.reference),v=null!=(n=await(null==u.getClientRects?void 0:u.getClientRects(l.reference)))?n:[],w=s(m);const b=await u.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===v.length&&v[0].left>v[1].right&&null!=y&&null!=h)return null!=(e=v.find((e=>y>e.left-w.left&&y<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)))?e:g;if(v.length>=2){if("x"===i(o)){const e=v[0],t=v[v.length-1],n="top"===r(o),i=e.top,l=t.bottom,a=n?e.left:t.left,s=n?e.right:t.right;return{top:i,bottom:l,left:a,right:s,width:s-a,height:l-i,x:a,y:i}}const e="left"===r(o),t=p(...v.map((e=>e.right))),n=f(...v.map((e=>e.left))),l=v.filter((r=>e?r.left===n:r.right===t)),a=l[0].top,s=l[l.length-1].bottom;return{top:a,bottom:s,left:n,right:t,width:t-n,height:s-a,x:n,y:a}}return g}},floating:l.floating,strategy:d});return a.reference.x!==b.reference.x||a.reference.y!==b.reference.y||a.reference.width!==b.reference.width||a.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},exports.offset=x,exports.shift=R,exports.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:i,platform:l,elements:a}=t,{apply:s=(()=>{}),...c}=e,f=await u(t,c),d=r(n),m=o(n);let y,h;"top"===d||"bottom"===d?(y=d,h=m===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(h=d,y="end"===m?"top":"bottom");const g=p(f.left,0),v=p(f.right,0),w=p(f.top,0),b=p(f.bottom,0),x={availableHeight:i.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:p(f.top,f.bottom)):f[y]),availableWidth:i.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:p(f.left,f.right)):f[h])};await s({...t,...x});const R=await l.getDimensions(a.floating);return i.floating.width!==R.width||i.floating.height!==R.height?{reset:{rects:!0}}:{}}}};
@@ -1,5 +1,6 @@
1
1
  import React, { ElementType, ReactNode, CSSProperties, PropsWithChildren } from 'react';
2
- export { autoPlacement, flip, inline, offset, shift, size } from '@floating-ui/dom';
2
+ import { Middleware } from '@floating-ui/dom';
3
+ export { Middleware, autoPlacement, flip, inline, offset, shift, size } from '@floating-ui/dom';
3
4
 
4
5
  type PlacesType = 'top' | 'right' | 'bottom' | 'left'
5
6
 
@@ -13,8 +14,6 @@ type EventsType = 'hover' | 'click'
13
14
 
14
15
  type PositionStrategy = 'absolute' | 'fixed'
15
16
 
16
- type Middleware = Middleware
17
-
18
17
  type DataAttribute =
19
18
  | 'place'
20
19
  | 'content'
@@ -53,6 +52,7 @@ interface ITooltipController {
53
52
  float?: boolean
54
53
  noArrow?: boolean
55
54
  clickable?: boolean
55
+ closeOnEsc?: boolean
56
56
  style?: CSSProperties
57
57
  position?: IPosition
58
58
  isOpen?: boolean
@@ -94,7 +94,7 @@ interface ITooltipWrapper {
94
94
  delayHide?: ITooltipController['delayHide']
95
95
  }
96
96
 
97
- declare const TooltipController: ({ id, anchorId, content, html, className, classNameArrow, variant, place, offset, wrapper, children, events, positionStrategy, middlewares, delayShow, delayHide, float, noArrow, clickable, style, position, isOpen, setIsOpen, afterShow, afterHide, }: ITooltipController) => JSX.Element;
97
+ declare const TooltipController: ({ id, anchorId, content, html, className, classNameArrow, variant, place, offset, wrapper, children, events, positionStrategy, middlewares, delayShow, delayHide, float, noArrow, clickable, closeOnEsc, style, position, isOpen, setIsOpen, afterShow, afterHide, }: ITooltipController) => JSX.Element;
98
98
 
99
99
  declare const TooltipProvider: React.FC<PropsWithChildren>;
100
100
 
@@ -2636,7 +2636,7 @@ var styles = {"tooltip":"styles-module_tooltip__mnnfp","fixed":"styles-module_fi
2636
2636
 
2637
2637
  const Tooltip = ({
2638
2638
  // props
2639
- id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', middlewares, wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position, afterShow, afterHide,
2639
+ id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', middlewares, wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style: externalStyles, position, afterShow, afterHide,
2640
2640
  // props handled by controller
2641
2641
  content, html, isOpen, setIsOpen, }) => {
2642
2642
  const tooltipRef = useRef(null);
@@ -2783,6 +2783,12 @@ content, html, isOpen, setIsOpen, }) => {
2783
2783
  }
2784
2784
  handleShow(false);
2785
2785
  };
2786
+ const handleEsc = (event) => {
2787
+ if (event.key !== 'Escape') {
2788
+ return;
2789
+ }
2790
+ handleShow(false);
2791
+ };
2786
2792
  // debounce handler to prevent call twice when
2787
2793
  // mouse enter and focus events being triggered toggether
2788
2794
  const debouncedHandleShowTooltip = debounce(handleShowTooltip, 50);
@@ -2798,6 +2804,9 @@ content, html, isOpen, setIsOpen, }) => {
2798
2804
  if (!elementRefs.size) {
2799
2805
  return () => null;
2800
2806
  }
2807
+ if (closeOnEsc) {
2808
+ window.addEventListener('keydown', handleEsc);
2809
+ }
2801
2810
  const enabledEvents = [];
2802
2811
  if (events.find((event) => event === 'click')) {
2803
2812
  window.addEventListener('click', handleClickOutsideAnchor);
@@ -2831,7 +2840,12 @@ content, html, isOpen, setIsOpen, }) => {
2831
2840
  });
2832
2841
  return () => {
2833
2842
  var _a, _b;
2834
- window.removeEventListener('click', handleClickOutsideAnchor);
2843
+ if (events.find((event) => event === 'click')) {
2844
+ window.removeEventListener('click', handleClickOutsideAnchor);
2845
+ }
2846
+ if (closeOnEsc) {
2847
+ window.removeEventListener('keydown', handleEsc);
2848
+ }
2835
2849
  if (clickable) {
2836
2850
  (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', handleMouseEnterTooltip);
2837
2851
  (_b = tooltipRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', handleMouseLeaveTooltip);
@@ -2843,7 +2857,7 @@ content, html, isOpen, setIsOpen, }) => {
2843
2857
  });
2844
2858
  });
2845
2859
  };
2846
- }, [anchorRefs, activeAnchor, anchorId, events, delayHide, delayShow]);
2860
+ }, [anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2847
2861
  useEffect(() => {
2848
2862
  if (position) {
2849
2863
  // if `position` is set, override regular and `float` positioning
@@ -2927,7 +2941,7 @@ content, html, isOpen, setIsOpen, }) => {
2927
2941
  }), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
2928
2942
  };
2929
2943
 
2930
- const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
2944
+ const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
2931
2945
  const [tooltipContent, setTooltipContent] = useState(content);
2932
2946
  const [tooltipHtml, setTooltipHtml] = useState(html);
2933
2947
  const [tooltipPlace, setTooltipPlace] = useState(place);
@@ -3065,6 +3079,7 @@ const TooltipController = ({ id, anchorId, content, html, className, classNameAr
3065
3079
  float: tooltipFloat,
3066
3080
  noArrow,
3067
3081
  clickable,
3082
+ closeOnEsc,
3068
3083
  style,
3069
3084
  position,
3070
3085
  isOpen,
@@ -1,4 +1,4 @@
1
- import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useContext as i,useRef as l,useEffect as a}from"react";function s(e){return e.split("-")[0]}function c(e){return e.split("-")[1]}function u(e){return["top","bottom"].includes(s(e))?"x":"y"}function f(e){return"y"===e?"height":"width"}function p(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=u(t),p=f(a),d=r[p]/2-o[p]/2,m="x"===a;let y;switch(s(t)){case"top":y={x:i,y:r.y-o.height};break;case"bottom":y={x:i,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:l};break;case"left":y={x:r.x-o.width,y:l};break;default:y={x:r.x,y:r.y}}switch(c(t)){case"start":y[a]-=d*(n&&m?-1:1);break;case"end":y[a]+=d*(n&&m?-1:1)}return y}function d(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 m(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function y(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:y=0}=t,h=d(y),g=a[p?"floating"===f?"reference":"floating":f],v=m(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),w=m(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[f]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}const h=Math.min,g=Math.max;function v(e,t,n){return g(e,h(t,n))}const w={left:"right",right:"left",bottom:"top",top:"bottom"};function b(e){return e.replace(/left|right|bottom|top/g,(e=>w[e]))}function x(e,t,n){void 0===n&&(n=!1);const r=c(e),o=u(e),i=f(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=b(l)),{main:l,cross:b(l)}}const _={start:"end",end:"start"};function R(e){return e.replace(/start|end/g,(e=>_[e]))}const T=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const O=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o,i,l;const{x:a,y:u,rects:f,middlewareData:p,placement:d,platform:m,elements:h}=t,{alignment:g=null,allowedPlacements:v=T,autoAlignment:w=!0,...b}=e,_=function(e,t,n){return(e?[...n.filter((t=>c(t)===e)),...n.filter((t=>c(t)!==e))]:n.filter((e=>s(e)===e))).filter((n=>!e||c(n)===e||!!t&&R(n)!==n))}(g,w,v),O=await y(t,b),S=null!=(n=null==(r=p.autoPlacement)?void 0:r.index)?n:0,k=_[S];if(null==k)return{};const{main:A,cross:j}=x(k,f,await(null==m.isRTL?void 0:m.isRTL(h.floating)));if(d!==k)return{x:a,y:u,reset:{placement:_[0]}};const P=[O[s(k)],O[A],O[j]],E=[...null!=(o=null==(i=p.autoPlacement)?void 0:i.overflows)?o:[],{placement:k,overflows:P}],L=_[S+1];if(L)return{data:{index:S+1,overflows:E},reset:{placement:L}};const D=E.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),N=null==(l=D.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:l.placement,I=null!=N?N:D[0].placement;return I!==d?{data:{index:S+1,overflows:E},reset:{placement:I}}:{}}}};const S=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:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",flipAlignment:m=!0,...h}=e,g=s(r),v=p||(g===l||!m?[b(l)]:function(e){const t=b(e);return[R(e),t,R(t)]}(l)),w=[l,...v],_=await y(t,h),T=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&T.push(_[g]),f){const{main:e,cross:t}=x(r,i,await(null==a.isRTL?void 0:a.isRTL(c.floating)));T.push(_[e],_[t])}if(O=[...O,{placement:r,overflows:T}],!T.every((e=>e<=0))){var S,k;const e=(null!=(S=null==(k=o.flip)?void 0:k.index)?S:0)+1,t=w[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n="bottom";switch(d){case"bestFit":{var A;const e=null==(A=O.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const k=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=s(n),a=c(n),f="x"===u(n),p=["left","top"].includes(l)?-1:1,d=i&&f?-1:1,m="function"==typeof t?t(e):t;let{mainAxis:y,crossAxis:h,alignmentAxis:g}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return a&&"number"==typeof g&&(h="end"===a?-1*g:g),f?{x:h*d,y:y*p}:{x:y*p,y:h*d}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const A=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,f={x:n,y:r},p=await y(t,c),d=u(s(o)),m="x"===d?"y":"x";let h=f[d],g=f[m];if(i){const e="y"===d?"bottom":"right";h=v(h+p["y"===d?"top":"left"],h,h-p[e])}if(l){const e="y"===m?"bottom":"right";g=v(g+p["y"===m?"top":"left"],g,g-p[e])}const w=a.fn({...t,[d]:h,[m]:g});return{...w,data:{x:w.x-n,y:w.y-r}}}}},j=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=(()=>{}),...a}=e,u=await y(t,a),f=s(n),p=c(n);let d,m;"top"===f||"bottom"===f?(d=f,m=p===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=f,d="end"===p?"top":"bottom");const h=g(u.left,0),v=g(u.right,0),w=g(u.top,0),b=g(u.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:g(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==h||0!==v?h+v:g(u.left,u.right)):u[m])};await l({...t,...x});const _=await o.getDimensions(i.floating);return r.floating.width!==_.width||r.floating.height!==_.height?{reset:{rects:!0}}:{}}}},P=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:r,elements:o,rects:i,platform:l,strategy:a}=t,{padding:c=2,x:f,y:p}=e,y=m(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:i.reference,offsetParent:await(null==l.getOffsetParent?void 0:l.getOffsetParent(o.floating)),strategy:a}):i.reference),v=null!=(n=await(null==l.getClientRects?void 0:l.getClientRects(o.reference)))?n:[],w=d(c);const b=await l.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===v.length&&v[0].left>v[1].right&&null!=f&&null!=p)return null!=(e=v.find((e=>f>e.left-w.left&&f<e.right+w.right&&p>e.top-w.top&&p<e.bottom+w.bottom)))?e:y;if(v.length>=2){if("x"===u(r)){const e=v[0],t=v[v.length-1],n="top"===s(r),o=e.top,i=t.bottom,l=n?e.left:t.left,a=n?e.right:t.right;return{top:o,bottom:i,left:l,right:a,width:a-l,height:i-o,x:l,y:o}}const e="left"===s(r),t=g(...v.map((e=>e.right))),n=h(...v.map((e=>e.left))),o=v.filter((r=>e?r.left===n:r.right===t)),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:n,right:t,width:t-n,height:l-i,x:n,y:i}}return y}},floating:o.floating,strategy:a});return i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}};function E(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function L(e){if(null==e)return window;if(!E(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function D(e){return L(e).getComputedStyle(e)}function N(e){return E(e)?"":e?(e.nodeName||"").toLowerCase():""}function I(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function $(e){return e instanceof L(e).HTMLElement}function C(e){return e instanceof L(e).Element}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function W(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=D(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(N(e))}function U(e){const t=/firefox/i.test(I()),n=D(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 B(){return!/^((?!chrome|android).)*safari/i.test(I())}function V(e){return["html","body","#document"].includes(N(e))}const z=Math.min,M=Math.max,Y=Math.round;function q(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&$(e)&&(s=e.offsetWidth>0&&Y(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Y(a.height)/e.offsetHeight||1);const u=C(e)?L(e):window,f=!B()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,m=a.width/s,y=a.height/c;return{width:m,height:y,top:d,right:p+m,bottom:d+y,left:p,x:p,y:d}}function X(e){return(t=e,(t instanceof L(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function K(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J(e){return q(X(e)).left+K(e).scrollLeft}function Z(e,t,n){const r=$(t),o=X(t),i=q(e,r&&function(e){const t=q(e);return Y(t.width)!==e.offsetWidth||Y(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==N(t)||W(o))&&(l=K(t)),$(t)){const e=q(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=J(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function G(e){if("html"===N(e))return e;const t=e.assignedSlot||e.parentNode||(F(e)?e.host:null)||X(e);return F(t)?t.host:t}function Q(e){return $(e)&&"fixed"!==D(e).position?e.offsetParent:null}function ee(e){const t=L(e);let n=Q(e);for(;n&&H(n)&&"static"===D(n).position;)n=Q(n);return n&&("html"===N(n)||"body"===N(n)&&"static"===D(n).position&&!U(n))?t:n||function(e){let t=G(e);for(;$(t)&&!V(t);){if(U(t))return t;t=G(t)}return null}(e)||t}function te(e){if($(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=q(e);return{width:t.width,height:t.height}}function ne(e){const t=G(e);return V(t)?e.ownerDocument.body:$(t)&&W(t)?t:ne(t)}function re(e,t){var n;void 0===t&&(t=[]);const r=ne(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r),l=o?[i].concat(i.visualViewport||[],W(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(re(l))}function oe(e,t,n){return"viewport"===t?m(function(e,t){const n=L(e),r=X(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=B();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):C(t)?function(e,t){const n=q(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):m(function(e){var t;const n=X(e),r=K(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=M(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=M(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+J(e);const s=-r.scrollTop;return"rtl"===D(o||n).direction&&(a+=M(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(X(e)))}const ie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=re(e).filter((e=>C(e)&&"body"!==N(e))),n=e,r=null;for(;C(n)&&!V(n);){const e=D(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!U(n)?t=t.filter((e=>e!==n)):r=e,n=G(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=M(r.top,e.top),e.right=z(r.right,e.right),e.bottom=z(r.bottom,e.bottom),e.left=M(r.left,e.left),e}),oe(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=$(n),i=X(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==N(n)||W(i))&&(l=K(n)),$(n))){const e=q(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:C,getDimensions:te,getOffsetParent:ee,getDocumentElement:X,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Z(t,ee(n),r),floating:{...te(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===D(e).direction},le=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=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 c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=p(c,r,s),d=r,m={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,f=null!=v?v:f,m={...m,[i]:{...m[i],...w}},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(" ")),b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=p(c,d,s))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}})(e,t,{platform:ie,...n});var ae,se={exports:{}},ce={};
1
+ import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useContext as i,useRef as l,useEffect as a}from"react";function s(e){return e.split("-")[0]}function c(e){return e.split("-")[1]}function u(e){return["top","bottom"].includes(s(e))?"x":"y"}function f(e){return"y"===e?"height":"width"}function p(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=u(t),p=f(a),d=r[p]/2-o[p]/2,m="x"===a;let y;switch(s(t)){case"top":y={x:i,y:r.y-o.height};break;case"bottom":y={x:i,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:l};break;case"left":y={x:r.x-o.width,y:l};break;default:y={x:r.x,y:r.y}}switch(c(t)){case"start":y[a]-=d*(n&&m?-1:1);break;case"end":y[a]+=d*(n&&m?-1:1)}return y}function d(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 m(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function y(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:p=!1,padding:y=0}=t,h=d(y),g=a[p?"floating"===f?"reference":"floating":f],v=m(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:s})),w=m(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[f]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}const h=Math.min,g=Math.max;function v(e,t,n){return g(e,h(t,n))}const w={left:"right",right:"left",bottom:"top",top:"bottom"};function b(e){return e.replace(/left|right|bottom|top/g,(e=>w[e]))}function x(e,t,n){void 0===n&&(n=!1);const r=c(e),o=u(e),i=f(o);let l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=b(l)),{main:l,cross:b(l)}}const _={start:"end",end:"start"};function R(e){return e.replace(/start|end/g,(e=>_[e]))}const T=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const O=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,o,i,l;const{x:a,y:u,rects:f,middlewareData:p,placement:d,platform:m,elements:h}=t,{alignment:g=null,allowedPlacements:v=T,autoAlignment:w=!0,...b}=e,_=function(e,t,n){return(e?[...n.filter((t=>c(t)===e)),...n.filter((t=>c(t)!==e))]:n.filter((e=>s(e)===e))).filter((n=>!e||c(n)===e||!!t&&R(n)!==n))}(g,w,v),O=await y(t,b),k=null!=(n=null==(r=p.autoPlacement)?void 0:r.index)?n:0,S=_[k];if(null==S)return{};const{main:A,cross:j}=x(S,f,await(null==m.isRTL?void 0:m.isRTL(h.floating)));if(d!==S)return{x:a,y:u,reset:{placement:_[0]}};const E=[O[s(S)],O[A],O[j]],P=[...null!=(o=null==(i=p.autoPlacement)?void 0:i.overflows)?o:[],{placement:S,overflows:E}],L=_[k+1];if(L)return{data:{index:k+1,overflows:P},reset:{placement:L}};const D=P.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),N=null==(l=D.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:l.placement,I=null!=N?N:D[0].placement;return I!==d?{data:{index:k+1,overflows:P},reset:{placement:I}}:{}}}};const k=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:u=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:d="bestFit",flipAlignment:m=!0,...h}=e,g=s(r),v=p||(g===l||!m?[b(l)]:function(e){const t=b(e);return[R(e),t,R(t)]}(l)),w=[l,...v],_=await y(t,h),T=[];let O=(null==(n=o.flip)?void 0:n.overflows)||[];if(u&&T.push(_[g]),f){const{main:e,cross:t}=x(r,i,await(null==a.isRTL?void 0:a.isRTL(c.floating)));T.push(_[e],_[t])}if(O=[...O,{placement:r,overflows:T}],!T.every((e=>e<=0))){var k,S;const e=(null!=(k=null==(S=o.flip)?void 0:S.index)?k:0)+1,t=w[e];if(t)return{data:{index:e,overflows:O},reset:{placement:t}};let n="bottom";switch(d){case"bestFit":{var A;const e=null==(A=O.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0].placement;e&&(n=e);break}case"initialPlacement":n=l}if(r!==n)return{reset:{placement:n}}}return{}}}};const S=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=s(n),a=c(n),f="x"===u(n),p=["left","top"].includes(l)?-1:1,d=i&&f?-1:1,m="function"==typeof t?t(e):t;let{mainAxis:y,crossAxis:h,alignmentAxis:g}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return a&&"number"==typeof g&&(h="end"===a?-1*g:g),f?{x:h*d,y:y*p}:{x:y*p,y:h*d}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};const A=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,f={x:n,y:r},p=await y(t,c),d=u(s(o)),m="x"===d?"y":"x";let h=f[d],g=f[m];if(i){const e="y"===d?"bottom":"right";h=v(h+p["y"===d?"top":"left"],h,h-p[e])}if(l){const e="y"===m?"bottom":"right";g=v(g+p["y"===m?"top":"left"],g,g-p[e])}const w=a.fn({...t,[d]:h,[m]:g});return{...w,data:{x:w.x-n,y:w.y-r}}}}},j=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:l=(()=>{}),...a}=e,u=await y(t,a),f=s(n),p=c(n);let d,m;"top"===f||"bottom"===f?(d=f,m=p===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(m=f,d="end"===p?"top":"bottom");const h=g(u.left,0),v=g(u.right,0),w=g(u.top,0),b=g(u.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:g(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==h||0!==v?h+v:g(u.left,u.right)):u[m])};await l({...t,...x});const _=await o.getDimensions(i.floating);return r.floating.width!==_.width||r.floating.height!==_.height?{reset:{rects:!0}}:{}}}},E=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:r,elements:o,rects:i,platform:l,strategy:a}=t,{padding:c=2,x:f,y:p}=e,y=m(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:i.reference,offsetParent:await(null==l.getOffsetParent?void 0:l.getOffsetParent(o.floating)),strategy:a}):i.reference),v=null!=(n=await(null==l.getClientRects?void 0:l.getClientRects(o.reference)))?n:[],w=d(c);const b=await l.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===v.length&&v[0].left>v[1].right&&null!=f&&null!=p)return null!=(e=v.find((e=>f>e.left-w.left&&f<e.right+w.right&&p>e.top-w.top&&p<e.bottom+w.bottom)))?e:y;if(v.length>=2){if("x"===u(r)){const e=v[0],t=v[v.length-1],n="top"===s(r),o=e.top,i=t.bottom,l=n?e.left:t.left,a=n?e.right:t.right;return{top:o,bottom:i,left:l,right:a,width:a-l,height:i-o,x:l,y:o}}const e="left"===s(r),t=g(...v.map((e=>e.right))),n=h(...v.map((e=>e.left))),o=v.filter((r=>e?r.left===n:r.right===t)),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:n,right:t,width:t-n,height:l-i,x:n,y:i}}return y}},floating:o.floating,strategy:a});return i.reference.x!==b.reference.x||i.reference.y!==b.reference.y||i.reference.width!==b.reference.width||i.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}};function P(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function L(e){if(null==e)return window;if(!P(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function D(e){return L(e).getComputedStyle(e)}function N(e){return P(e)?"":e?(e.nodeName||"").toLowerCase():""}function I(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function $(e){return e instanceof L(e).HTMLElement}function C(e){return e instanceof L(e).Element}function F(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof L(e).ShadowRoot||e instanceof ShadowRoot}function W(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=D(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function H(e){return["table","td","th"].includes(N(e))}function U(e){const t=/firefox/i.test(I()),n=D(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 B(){return!/^((?!chrome|android).)*safari/i.test(I())}function V(e){return["html","body","#document"].includes(N(e))}const z=Math.min,M=Math.max,Y=Math.round;function q(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&$(e)&&(s=e.offsetWidth>0&&Y(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&Y(a.height)/e.offsetHeight||1);const u=C(e)?L(e):window,f=!B()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,m=a.width/s,y=a.height/c;return{width:m,height:y,top:d,right:p+m,bottom:d+y,left:p,x:p,y:d}}function X(e){return(t=e,(t instanceof L(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function K(e){return C(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function J(e){return q(X(e)).left+K(e).scrollLeft}function Z(e,t,n){const r=$(t),o=X(t),i=q(e,r&&function(e){const t=q(e);return Y(t.width)!==e.offsetWidth||Y(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==N(t)||W(o))&&(l=K(t)),$(t)){const e=q(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=J(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function G(e){if("html"===N(e))return e;const t=e.assignedSlot||e.parentNode||(F(e)?e.host:null)||X(e);return F(t)?t.host:t}function Q(e){return $(e)&&"fixed"!==D(e).position?e.offsetParent:null}function ee(e){const t=L(e);let n=Q(e);for(;n&&H(n)&&"static"===D(n).position;)n=Q(n);return n&&("html"===N(n)||"body"===N(n)&&"static"===D(n).position&&!U(n))?t:n||function(e){let t=G(e);for(;$(t)&&!V(t);){if(U(t))return t;t=G(t)}return null}(e)||t}function te(e){if($(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=q(e);return{width:t.width,height:t.height}}function ne(e){const t=G(e);return V(t)?e.ownerDocument.body:$(t)&&W(t)?t:ne(t)}function re(e,t){var n;void 0===t&&(t=[]);const r=ne(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=L(r),l=o?[i].concat(i.visualViewport||[],W(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(re(l))}function oe(e,t,n){return"viewport"===t?m(function(e,t){const n=L(e),r=X(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=B();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):C(t)?function(e,t){const n=q(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):m(function(e){var t;const n=X(e),r=K(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=M(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=M(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+J(e);const s=-r.scrollTop;return"rtl"===D(o||n).direction&&(a+=M(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(X(e)))}const ie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=re(e).filter((e=>C(e)&&"body"!==N(e))),n=e,r=null;for(;C(n)&&!V(n);){const e=D(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!U(n)?t=t.filter((e=>e!==n)):r=e,n=G(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=oe(t,n,o);return e.top=M(r.top,e.top),e.right=z(r.right,e.right),e.bottom=z(r.bottom,e.bottom),e.left=M(r.left,e.left),e}),oe(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=$(n),i=X(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==N(n)||W(i))&&(l=K(n)),$(n))){const e=q(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:C,getDimensions:te,getOffsetParent:ee,getDocumentElement:X,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:Z(t,ee(n),r),floating:{...te(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===D(e).direction},le=(e,t,n)=>(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),s=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 c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=p(c,r,s),d=r,m={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:u,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:c,platform:l,elements:{reference:e,floating:t}});u=null!=g?g:u,f=null!=v?v:f,m={...m,[i]:{...m[i],...w}},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(" ")),b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(c=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:f}=p(c,d,s))),n=-1)}return{x:u,y:f,placement:d,strategy:o,middlewareData:m}})(e,t,{platform:ie,...n});var ae,se={exports:{}},ce={};
2
2
  /** @license React v16.14.0
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -7,9 +7,9 @@ import e,{createContext as t,useState as n,useCallback as r,useMemo as o,useCont
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- ae=ce,function(){var t=e,n=60103,r=60106;ae.Fragment=60107;var o=60108,i=60114,l=60109,a=60110,s=60112,c=60113,u=60120,f=60115,p=60116,d=60121,m=60122,y=60117,h=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var v=Symbol.for;n=v("react.element"),r=v("react.portal"),ae.Fragment=v("react.fragment"),o=v("react.strict_mode"),i=v("react.profiler"),l=v("react.provider"),a=v("react.context"),s=v("react.forward_ref"),c=v("react.suspense"),u=v("react.suspense_list"),f=v("react.memo"),p=v("react.lazy"),d=v("react.block"),m=v("react.server.block"),y=v("react.fundamental"),v("react.scope"),v("react.opaque.id"),h=v("react.debug_trace_mode"),v("react.offscreen"),g=v("react.legacy_hidden")}var w="function"==typeof Symbol&&Symbol.iterator,b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=b.ReactDebugCurrentFrame,o="";if(S){var i=T(S.type),l=S._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(R,"");if(/^index\./.test(i)){var l=o.match(R);if(l){var a=l[1];a&&(i=a.replace(R,"")+"/"+i)}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,S._source,l&&T(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 R=/^(.*)[\\\/]/;function T(e){if(null==e)return null;if("number"==typeof e.tag&&x("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 ae.Fragment:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return"Context.Consumer";case l:return"Context.Provider";case s:return m=e,y=e.render,h="ForwardRef",g=y.displayName||y.name||"",m.displayName||(""!==g?h+"("+g+")":h);case f:return T(e.type);case d:return T(e.render);case p:var t=1===(n=e)._status?n._result:null;if(t)return T(t)}var n,m,y,h,g;return null}var O={};b.ReactDebugCurrentFrame;var S=null;function k(e){S=e}var A,j,P,E=b.ReactCurrentOwner,L=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(L.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(L.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&E.current&&t&&E.current.stateNode!==t){var n=T(E.current.type);P[n]||(x('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',T(E.current.type),e.ref),P[n]=!0)}}(t,i)),t)L.call(t,l)&&!D.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(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,x("%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),c&&function(e,t){var n=function(){j||(j=!0,x("%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 s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,E.current,a)}P={};var I,$=b.ReactCurrentOwner;function C(e){S=e}function F(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function W(){if($.current){var e=T($.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}b.ReactDebugCurrentFrame,I=!1;var H={};function U(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=W();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!==$.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),C(e),x('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),C(null)}}}function B(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];F(r)&&U(r,t)}else if(F(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=w&&e[w]||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;)F(i.value)&&U(i.value,t)}}function V(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!==s&&n.$$typeof!==f)return;t=n.propTypes}if(t){var r=T(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 s=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 s.name="Invariant Violation",s}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),x("%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 O)&&(O[a.message]=!0,k(o),x("Failed %s type: %s",n,a.message),k(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||I||(I=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(e,t,r,v,w,b){var _=function(e){return"string"==typeof e||"function"==typeof e||e===ae.Fragment||e===i||e===h||e===o||e===c||e===u||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===l||e.$$typeof===a||e.$$typeof===s||e.$$typeof===y||e.$$typeof===d||e[0]===m)}(e);if(!_){var R="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(R+=" 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 O,S=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(w);R+=S||W(),null===e?O="null":Array.isArray(e)?O="array":void 0!==e&&e.$$typeof===n?(O="<"+(T(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):O=typeof e,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,R)}var k=N(e,t,r,w,b);if(null==k)return k;if(_){var A=t.children;if(void 0!==A)if(v)if(Array.isArray(A)){for(var j=0;j<A.length;j++)B(A[j],e);Object.freeze&&Object.freeze(A)}else x("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 B(A,e)}return e===ae.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){C(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),C(null);break}}null!==e.ref&&(C(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),C(null))}(k):V(k),k}var M=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};ae.jsx=M,ae.jsxs=Y}(),se.exports=ce;var ue,fe={exports:{}};
10
+ ae=ce,function(){var t=e,n=60103,r=60106;ae.Fragment=60107;var o=60108,i=60114,l=60109,a=60110,s=60112,c=60113,u=60120,f=60115,p=60116,d=60121,m=60122,y=60117,h=60129,g=60131;if("function"==typeof Symbol&&Symbol.for){var v=Symbol.for;n=v("react.element"),r=v("react.portal"),ae.Fragment=v("react.fragment"),o=v("react.strict_mode"),i=v("react.profiler"),l=v("react.provider"),a=v("react.context"),s=v("react.forward_ref"),c=v("react.suspense"),u=v("react.suspense_list"),f=v("react.memo"),p=v("react.lazy"),d=v("react.block"),m=v("react.server.block"),y=v("react.fundamental"),v("react.scope"),v("react.opaque.id"),h=v("react.debug_trace_mode"),v("react.offscreen"),g=v("react.legacy_hidden")}var w="function"==typeof Symbol&&Symbol.iterator,b=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function x(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=b.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(R,"");if(/^index\./.test(i)){var l=o.match(R);if(l){var a=l[1];a&&(i=a.replace(R,"")+"/"+i)}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(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 R=/^(.*)[\\\/]/;function T(e){if(null==e)return null;if("number"==typeof e.tag&&x("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 ae.Fragment:return"Fragment";case r:return"Portal";case i:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case a:return"Context.Consumer";case l:return"Context.Provider";case s:return m=e,y=e.render,h="ForwardRef",g=y.displayName||y.name||"",m.displayName||(""!==g?h+"("+g+")":h);case f:return T(e.type);case d:return T(e.render);case p:var t=1===(n=e)._status?n._result:null;if(t)return T(t)}var n,m,y,h,g;return null}var O={};b.ReactDebugCurrentFrame;var k=null;function S(e){k=e}var A,j,E,P=b.ReactCurrentOwner,L=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};function N(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(L.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(L.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&P.current&&t&&P.current.stateNode!==t){var n=T(P.current.type);E[n]||(x('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',T(P.current.type),e.ref),E[n]=!0)}}(t,i)),t)L.call(t,l)&&!D.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(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,x("%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),c&&function(e,t){var n=function(){j||(j=!0,x("%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 s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,P.current,a)}E={};var I,$=b.ReactCurrentOwner;function C(e){k=e}function F(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function W(){if($.current){var e=T($.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}b.ReactDebugCurrentFrame,I=!1;var H={};function U(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=W();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!==$.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),C(e),x('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),C(null)}}}function B(e,t){if("object"==typeof e)if(Array.isArray(e))for(var n=0;n<e.length;n++){var r=e[n];F(r)&&U(r,t)}else if(F(e))e._store&&(e._store.validated=!0);else if(e){var o=function(e){if(null===e||"object"!=typeof e)return null;var t=w&&e[w]||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;)F(i.value)&&U(i.value,t)}}function V(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!==s&&n.$$typeof!==f)return;t=n.propTypes}if(t){var r=T(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 s=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 s.name="Invariant Violation",s}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||(S(o),x("%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),S(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,S(o),x("Failed %s type: %s",n,a.message),S(null))}}(t,e.props,"prop",r,e)}else void 0===n.PropTypes||I||(I=!0,x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown"));"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(e,t,r,v,w,b){var _=function(e){return"string"==typeof e||"function"==typeof e||e===ae.Fragment||e===i||e===h||e===o||e===c||e===u||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===l||e.$$typeof===a||e.$$typeof===s||e.$$typeof===y||e.$$typeof===d||e[0]===m)}(e);if(!_){var R="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(R+=" 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 O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(w);R+=k||W(),null===e?O="null":Array.isArray(e)?O="array":void 0!==e&&e.$$typeof===n?(O="<"+(T(e.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):O=typeof e,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,R)}var S=N(e,t,r,w,b);if(null==S)return S;if(_){var A=t.children;if(void 0!==A)if(v)if(Array.isArray(A)){for(var j=0;j<A.length;j++)B(A[j],e);Object.freeze&&Object.freeze(A)}else x("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 B(A,e)}return e===ae.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){C(e),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),C(null);break}}null!==e.ref&&(C(e),x("Invalid attribute `ref` supplied to `React.Fragment`."),C(null))}(S):V(S),S}var M=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};ae.jsx=M,ae.jsxs=Y}(),se.exports=ce;var ue,fe={exports:{}};
11
11
  /*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */ue=fe,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(" ")}ue.exports?(t.default=t,ue.exports=t):window.classNames=t}();var pe=fe.exports;const de=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},me=({content:e})=>se.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),ye={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},he=t({getTooltipData:()=>ye}),ge=({children:e})=>{const[t,i]=n({DEFAULT_TOOLTIP_ID:new Set}),[l,a]=n({DEFAULT_TOOLTIP_ID:{current:null}}),s=(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)}}))},c=(e,...t)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},u=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)=>s(e,...t),detach:(...t)=>c(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,s,c]),f=o((()=>({getTooltipData:u})),[u]);return se.exports.jsx(he.Provider,{value:f,children:e})};function ve(e="DEFAULT_TOOLTIP_ID"){return i(he).getTooltipData(e)}const we=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:s,offset:c,wrapper:u,events:f,positionStrategy:p,delayShow:d,delayHide:m})=>{const{attach:y,detach:h}=ve(e),g=l(null);return a((()=>(y(g),()=>{h(g)})),[]),se.exports.jsx("span",{ref:g,className:pe("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":s,"data-tooltip-offset":c,"data-tooltip-wrapper":u,"data-tooltip-events":f,"data-tooltip-position-strategy":p,"data-tooltip-delay-show":d,"data-tooltip-delay-hide":m,children:t})},be=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[k(Number(o)),S(),A({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=l;return n?(a.push({name:"arrow",options:s={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=null!=s?s:{},{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 p=d(n),m={x:r,y:o},y=u(i),h=c(i),g=f(y),w=await a.getDimensions(t),b="y"===y?"top":"left",x="y"===y?"bottom":"right",_=l.reference[g]+l.reference[y]-m[y]-l.floating[g],R=m[y]-l.reference[y],T=await(null==a.getOffsetParent?void 0:a.getOffsetParent(t));let O=T?"y"===y?T.clientHeight||0:T.clientWidth||0:0;0===O&&(O=l.floating[g]);const S=_/2-R/2,k=p[b],A=O-w[g]-p[x],j=O/2-w[g]/2+S,P=v(k,j,A),E=("start"===h?p[b]:p[x])>0&&j!==P&&l.reference[g]<=l.floating[g];return{[y]:m[y]-(E?j<k?k-j:A-j:0),data:{[y]:P,centerOffset:j-P}}}}),le(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:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):le(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var s};var xe={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 _e=({id:e,className:t,classNameArrow:r,variant:o="dark",anchorId:i,place:s="top",offset:c=10,events:u=["hover"],positionStrategy:f="absolute",middlewares:p,wrapper:d="div",children:m=null,delayShow:y=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,style:b,position:x,afterShow:_,afterHide:R,content:T,html:O,isOpen:S,setIsOpen:k})=>{const A=l(null),j=l(null),P=l(null),E=l(null),[L,D]=n({}),[N,I]=n({}),[$,C]=n(!1),F=l(!1),[W,H]=n(!1),U=l(null),{anchorRefs:B,setActiveAnchor:V}=ve(e),[z,M]=n({current:null}),Y=l(!1),q=e=>{k?k(e):void 0===S&&C(e)};a((()=>{$!==F.current&&(F.current=$,$?null==_||_():null==R||R())}),[$]);const X=(e=h)=>{E.current&&clearTimeout(E.current),E.current=setTimeout((()=>{Y.current||q(!1)}),e)},K=e=>{var t;if(!e)return;y?(P.current&&clearTimeout(P.current),P.current=setTimeout((()=>{q(!0)}),y)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;M((e=>e.current===n?e:{current:n})),V({current:n}),E.current&&clearTimeout(E.current)},J=()=>{w?X(h||50):h?X():q(!1),P.current&&clearTimeout(P.current)},Z=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};H(!0),be({place:s,offset:c,elementReference:n,tooltipReference:A.current,tooltipArrowReference:j.current,strategy:f,middlewares:p}).then((e=>{H(!1),Object.keys(e.tooltipStyles).length&&D(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&I(e.tooltipArrowStyles)}))},G=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};Z(n),U.current=n},Q=e=>{K(e),h&&X()},ee=e=>{var t;(null===(t=z.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},te=de(K,50),ne=de(J,50);a((()=>{var e,t;const n=new Set(B),r=document.querySelector(`[id='${i}']`);if(r&&(M((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;const o=[];u.find((e=>"click"===e))&&(window.addEventListener("click",ee),o.push({event:"click",listener:Q})),u.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:te},{event:"mouseleave",listener:ne},{event:"focus",listener:te},{event:"blur",listener:ne}),g&&o.push({event:"mousemove",listener:G}));const l=()=>{Y.current=!0},a=()=>{Y.current=!1,J()};return w&&(null===(e=A.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=A.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;window.removeEventListener("click",ee),w&&(null===(e=A.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=A.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)}))}))}}),[B,z,i,u,h,y]),a((()=>{if(x)return Z(x),()=>null;if(g)return U.current&&Z(U.current),()=>null;let e=z.current;i&&(e=document.querySelector(`[id='${i}']`)),H(!0);let t=!0;return be({place:s,offset:c,elementReference:e,tooltipReference:A.current,tooltipArrowReference:j.current,strategy:f,middlewares:p}).then((e=>{t&&(H(!1),Object.keys(e.tooltipStyles).length&&D(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&I(e.tooltipArrowStyles))})),()=>{t=!1}}),[$,S,i,z,T,O,s,c,f,x]),a((()=>()=>{P.current&&clearTimeout(P.current),E.current&&clearTimeout(E.current)}),[]);const re=Boolean(O||T||m);return se.exports.jsxs(d,{id:e,role:"tooltip",className:pe("react-tooltip",xe.tooltip,xe[o],t,{[xe.show]:re&&!W&&(S||$),[xe.fixed]:"fixed"===f,[xe.clickable]:w}),style:{...b,...L},ref:A,children:[m||O&&se.exports.jsx(me,{content:O})||T,se.exports.jsx("div",{className:pe("react-tooltip-arrow",xe.arrow,r,{[xe["no-arrow"]]:v}),style:N,ref:j})]})},Re=({id:e,anchorId:t,content:r,html:o,className:i,classNameArrow:l,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:d=["hover"],positionStrategy:m="absolute",middlewares:y,delayShow:h=0,delayHide:g=0,float:v=!1,noArrow:w=!1,clickable:b=!1,style:x,position:_,isOpen:R,setIsOpen:T,afterShow:O,afterHide:S})=>{const[k,A]=n(r),[j,P]=n(o),[E,L]=n(c),[D,N]=n(s),[I,$]=n(u),[C,F]=n(h),[W,H]=n(g),[U,B]=n(v),[V,z]=n(f),[M,Y]=n(d),[q,X]=n(m),{anchorRefs:K,activeAnchor:J}=ve(e),Z=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}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:c)},content:e=>{A(null!=e?e:r)},html:e=>{P(null!=e?e:o)},variant:e=>{var t;N(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{$(null===e?u:Number(e))},wrapper:e=>{var t;z(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");Y(null!=t?t:d)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{F(null===e?h:Number(e))},"delay-hide":e=>{H(null===e?g:Number(e))},float:e=>{B(null===e?v:Boolean(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((()=>{A(r)}),[r]),a((()=>{P(o)}),[o]),a((()=>{var e;const n=new Set(K),r=document.querySelector(`[id='${t}']`);if(r&&n.add({current:r}),!n.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Z(o);G(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,t]);const Q={id:e,anchorId:t,className:i,classNameArrow:l,content:k,html:j,place:E,variant:D,offset:I,wrapper:V,events:M,positionStrategy:q,middlewares:y,delayShow:C,delayHide:W,float:U,noArrow:w,clickable:b,style:x,position:_,isOpen:R,setIsOpen:T,afterShow:O,afterHide:S};return p?se.exports.jsx(_e,{...Q,children:p}):se.exports.jsx(_e,{...Q})};export{Re as Tooltip,ge as TooltipProvider,we as TooltipWrapper,O as autoPlacement,S as flip,P as inline,k as offset,A as shift,j as size};
15
+ */ue=fe,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(" ")}ue.exports?(t.default=t,ue.exports=t):window.classNames=t}();var pe=fe.exports;const de=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},me=({content:e})=>se.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),ye={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},he=t({getTooltipData:()=>ye}),ge=({children:e})=>{const[t,i]=n({DEFAULT_TOOLTIP_ID:new Set}),[l,a]=n({DEFAULT_TOOLTIP_ID:{current:null}}),s=(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)}}))},c=(e,...t)=>{i((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},u=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)=>s(e,...t),detach:(...t)=>c(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,s,c]),f=o((()=>({getTooltipData:u})),[u]);return se.exports.jsx(he.Provider,{value:f,children:e})};function ve(e="DEFAULT_TOOLTIP_ID"){return i(he).getTooltipData(e)}const we=({tooltipId:e,children:t,className:n,place:r,content:o,html:i,variant:s,offset:c,wrapper:u,events:f,positionStrategy:p,delayShow:d,delayHide:m})=>{const{attach:y,detach:h}=ve(e),g=l(null);return a((()=>(y(g),()=>{h(g)})),[]),se.exports.jsx("span",{ref:g,className:pe("react-tooltip-wrapper",n),"data-tooltip-place":r,"data-tooltip-content":o,"data-tooltip-html":i,"data-tooltip-variant":s,"data-tooltip-offset":c,"data-tooltip-wrapper":u,"data-tooltip-events":f,"data-tooltip-position-strategy":p,"data-tooltip-delay-show":d,"data-tooltip-delay-hide":m,children:t})},be=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:i="absolute",middlewares:l=[S(Number(o)),k(),A({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const a=l;return n?(a.push({name:"arrow",options:s={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=null!=s?s:{},{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 p=d(n),m={x:r,y:o},y=u(i),h=c(i),g=f(y),w=await a.getDimensions(t),b="y"===y?"top":"left",x="y"===y?"bottom":"right",_=l.reference[g]+l.reference[y]-m[y]-l.floating[g],R=m[y]-l.reference[y],T=await(null==a.getOffsetParent?void 0:a.getOffsetParent(t));let O=T?"y"===y?T.clientHeight||0:T.clientWidth||0:0;0===O&&(O=l.floating[g]);const k=_/2-R/2,S=p[b],A=O-w[g]-p[x],j=O/2-w[g]/2+k,E=v(S,j,A),P=("start"===h?p[b]:p[x])>0&&j!==E&&l.reference[g]<=l.floating[g];return{[y]:m[y]-(P?j<S?S-j:A-j:0),data:{[y]:E,centerOffset:j-E}}}}),le(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:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):le(e,t,{placement:"bottom",strategy:i,middleware:a}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var s};var xe={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 _e=({id:e,className:t,classNameArrow:r,variant:o="dark",anchorId:i,place:s="top",offset:c=10,events:u=["hover"],positionStrategy:f="absolute",middlewares:p,wrapper:d="div",children:m=null,delayShow:y=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:_,afterShow:R,afterHide:T,content:O,html:k,isOpen:S,setIsOpen:A})=>{const j=l(null),E=l(null),P=l(null),L=l(null),[D,N]=n({}),[I,$]=n({}),[C,F]=n(!1),W=l(!1),[H,U]=n(!1),B=l(null),{anchorRefs:V,setActiveAnchor:z}=ve(e),[M,Y]=n({current:null}),q=l(!1),X=e=>{A?A(e):void 0===S&&F(e)};a((()=>{C!==W.current&&(W.current=C,C?null==R||R():null==T||T())}),[C]);const K=(e=h)=>{L.current&&clearTimeout(L.current),L.current=setTimeout((()=>{q.current||X(!1)}),e)},J=e=>{var t;if(!e)return;y?(P.current&&clearTimeout(P.current),P.current=setTimeout((()=>{X(!0)}),y)):X(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;Y((e=>e.current===n?e:{current:n})),z({current:n}),L.current&&clearTimeout(L.current)},Z=()=>{w?K(h||50):h?K():X(!1),P.current&&clearTimeout(P.current)},G=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};U(!0),be({place:s,offset:c,elementReference:n,tooltipReference:j.current,tooltipArrowReference:E.current,strategy:f,middlewares:p}).then((e=>{U(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&$(e.tooltipArrowStyles)}))},Q=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};G(n),B.current=n},ee=e=>{J(e),h&&K()},te=e=>{var t;(null===(t=M.current)||void 0===t?void 0:t.contains(e.target))||X(!1)},ne=e=>{"Escape"===e.key&&X(!1)},re=de(J,50),oe=de(Z,50);a((()=>{var e,t;const n=new Set(V),r=document.querySelector(`[id='${i}']`);if(r&&(Y((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;b&&window.addEventListener("keydown",ne);const o=[];u.find((e=>"click"===e))&&(window.addEventListener("click",te),o.push({event:"click",listener:ee})),u.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:re},{event:"mouseleave",listener:oe},{event:"focus",listener:re},{event:"blur",listener:oe}),g&&o.push({event:"mousemove",listener:Q}));const l=()=>{q.current=!0},a=()=>{q.current=!1,Z()};return w&&(null===(e=j.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=j.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;u.find((e=>"click"===e))&&window.removeEventListener("click",te),b&&window.removeEventListener("keydown",ne),w&&(null===(e=j.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=j.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)}))}))}}),[V,M,b,i,u,h,y]),a((()=>{if(_)return G(_),()=>null;if(g)return B.current&&G(B.current),()=>null;let e=M.current;i&&(e=document.querySelector(`[id='${i}']`)),U(!0);let t=!0;return be({place:s,offset:c,elementReference:e,tooltipReference:j.current,tooltipArrowReference:E.current,strategy:f,middlewares:p}).then((e=>{t&&(U(!1),Object.keys(e.tooltipStyles).length&&N(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&$(e.tooltipArrowStyles))})),()=>{t=!1}}),[C,S,i,M,O,k,s,c,f,_]),a((()=>()=>{P.current&&clearTimeout(P.current),L.current&&clearTimeout(L.current)}),[]);const ie=Boolean(k||O||m);return se.exports.jsxs(d,{id:e,role:"tooltip",className:pe("react-tooltip",xe.tooltip,xe[o],t,{[xe.show]:ie&&!H&&(S||C),[xe.fixed]:"fixed"===f,[xe.clickable]:w}),style:{...x,...D},ref:j,children:[m||k&&se.exports.jsx(me,{content:k})||O,se.exports.jsx("div",{className:pe("react-tooltip-arrow",xe.arrow,r,{[xe["no-arrow"]]:v}),style:I,ref:E})]})},Re=({id:e,anchorId:t,content:r,html:o,className:i,classNameArrow:l,variant:s="dark",place:c="top",offset:u=10,wrapper:f="div",children:p=null,events:d=["hover"],positionStrategy:m="absolute",middlewares:y,delayShow:h=0,delayHide:g=0,float:v=!1,noArrow:w=!1,clickable:b=!1,closeOnEsc:x=!1,style:_,position:R,isOpen:T,setIsOpen:O,afterShow:k,afterHide:S})=>{const[A,j]=n(r),[E,P]=n(o),[L,D]=n(c),[N,I]=n(s),[$,C]=n(u),[F,W]=n(h),[H,U]=n(g),[B,V]=n(v),[z,M]=n(f),[Y,q]=n(d),[X,K]=n(m),{anchorRefs:J,activeAnchor:Z}=ve(e),G=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}),{}),Q=e=>{const t={place:e=>{var t;D(null!==(t=e)&&void 0!==t?t:c)},content:e=>{j(null!=e?e:r)},html:e=>{P(null!=e?e:o)},variant:e=>{var t;I(null!==(t=e)&&void 0!==t?t:s)},offset:e=>{C(null===e?u:Number(e))},wrapper:e=>{var t;M(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:d)},"position-strategy":e=>{var t;K(null!==(t=e)&&void 0!==t?t:m)},"delay-show":e=>{W(null===e?h:Number(e))},"delay-hide":e=>{U(null===e?g:Number(e))},float:e=>{V(null===e?v:Boolean(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((()=>{j(r)}),[r]),a((()=>{P(o)}),[o]),a((()=>{var e;const n=new Set(J),r=document.querySelector(`[id='${t}']`);if(r&&n.add({current:r}),!n.size)return()=>null;const o=null!==(e=Z.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=G(o);Q(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=G(o);Q(e),i.observe(o,l)}return()=>{i.disconnect()}}),[J,Z,t]);const ee={id:e,anchorId:t,className:i,classNameArrow:l,content:A,html:E,place:L,variant:N,offset:$,wrapper:z,events:Y,positionStrategy:X,middlewares:y,delayShow:F,delayHide:H,float:B,noArrow:w,clickable:b,closeOnEsc:x,style:_,position:R,isOpen:T,setIsOpen:O,afterShow:k,afterHide:S};return p?se.exports.jsx(_e,{...ee,children:p}):se.exports.jsx(_e,{...ee})};export{Re as Tooltip,ge as TooltipProvider,we as TooltipWrapper,O as autoPlacement,k as flip,E as inline,S as offset,A as shift,j as size};
@@ -2644,7 +2644,7 @@
2644
2644
 
2645
2645
  const Tooltip = ({
2646
2646
  // props
2647
- id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', middlewares, wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style: externalStyles, position, afterShow, afterHide,
2647
+ id, className, classNameArrow, variant = 'dark', anchorId, place = 'top', offset = 10, events = ['hover'], positionStrategy = 'absolute', middlewares, wrapper: WrapperElement = 'div', children = null, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style: externalStyles, position, afterShow, afterHide,
2648
2648
  // props handled by controller
2649
2649
  content, html, isOpen, setIsOpen, }) => {
2650
2650
  const tooltipRef = require$$0.useRef(null);
@@ -2791,6 +2791,12 @@
2791
2791
  }
2792
2792
  handleShow(false);
2793
2793
  };
2794
+ const handleEsc = (event) => {
2795
+ if (event.key !== 'Escape') {
2796
+ return;
2797
+ }
2798
+ handleShow(false);
2799
+ };
2794
2800
  // debounce handler to prevent call twice when
2795
2801
  // mouse enter and focus events being triggered toggether
2796
2802
  const debouncedHandleShowTooltip = debounce(handleShowTooltip, 50);
@@ -2806,6 +2812,9 @@
2806
2812
  if (!elementRefs.size) {
2807
2813
  return () => null;
2808
2814
  }
2815
+ if (closeOnEsc) {
2816
+ window.addEventListener('keydown', handleEsc);
2817
+ }
2809
2818
  const enabledEvents = [];
2810
2819
  if (events.find((event) => event === 'click')) {
2811
2820
  window.addEventListener('click', handleClickOutsideAnchor);
@@ -2839,7 +2848,12 @@
2839
2848
  });
2840
2849
  return () => {
2841
2850
  var _a, _b;
2842
- window.removeEventListener('click', handleClickOutsideAnchor);
2851
+ if (events.find((event) => event === 'click')) {
2852
+ window.removeEventListener('click', handleClickOutsideAnchor);
2853
+ }
2854
+ if (closeOnEsc) {
2855
+ window.removeEventListener('keydown', handleEsc);
2856
+ }
2843
2857
  if (clickable) {
2844
2858
  (_a = tooltipRef.current) === null || _a === void 0 ? void 0 : _a.removeEventListener('mouseenter', handleMouseEnterTooltip);
2845
2859
  (_b = tooltipRef.current) === null || _b === void 0 ? void 0 : _b.removeEventListener('mouseleave', handleMouseLeaveTooltip);
@@ -2851,7 +2865,7 @@
2851
2865
  });
2852
2866
  });
2853
2867
  };
2854
- }, [anchorRefs, activeAnchor, anchorId, events, delayHide, delayShow]);
2868
+ }, [anchorRefs, activeAnchor, closeOnEsc, anchorId, events, delayHide, delayShow]);
2855
2869
  require$$0.useEffect(() => {
2856
2870
  if (position) {
2857
2871
  // if `position` is set, override regular and `float` positioning
@@ -2935,7 +2949,7 @@
2935
2949
  }), style: inlineArrowStyles, ref: tooltipArrowRef })] }));
2936
2950
  };
2937
2951
 
2938
- const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
2952
+ const TooltipController = ({ id, anchorId, content, html, className, classNameArrow, variant = 'dark', place = 'top', offset = 10, wrapper = 'div', children = null, events = ['hover'], positionStrategy = 'absolute', middlewares, delayShow = 0, delayHide = 0, float = false, noArrow = false, clickable = false, closeOnEsc = false, style, position, isOpen, setIsOpen, afterShow, afterHide, }) => {
2939
2953
  const [tooltipContent, setTooltipContent] = require$$0.useState(content);
2940
2954
  const [tooltipHtml, setTooltipHtml] = require$$0.useState(html);
2941
2955
  const [tooltipPlace, setTooltipPlace] = require$$0.useState(place);
@@ -3073,6 +3087,7 @@
3073
3087
  float: tooltipFloat,
3074
3088
  noArrow,
3075
3089
  clickable,
3090
+ closeOnEsc,
3076
3091
  style,
3077
3092
  position,
3078
3093
  isOpen,
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e){return e.split("-")[0]}function i(e){return e.split("-")[1]}function l(e){return["top","bottom"].includes(o(e))?"x":"y"}function a(e){return"y"===e?"height":"width"}function s(e,t,n){let{reference:r,floating:s}=e;const c=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=l(t),p=a(f),d=r[p]/2-s[p]/2,m="x"===f;let y;switch(o(t)){case"top":y={x:c,y:r.y-s.height};break;case"bottom":y={x:c,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:u};break;case"left":y={x:r.x-s.width,y:u};break;default:y={x:r.x,y:r.y}}switch(i(t)){case"start":y[f]-=d*(n&&m?-1:1);break;case"end":y[f]+=d*(n&&m?-1:1)}return y}function c(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 u(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function f(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:m=!1,padding:y=0}=t,h=c(y),g=a[m?"floating"===d?"reference":"floating":d],v=u(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:s})),w=u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[d]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}const p=Math.min,d=Math.max;function m(e,t,n){return d(e,p(t,n))}const y={left:"right",right:"left",bottom:"top",top:"bottom"};function h(e){return e.replace(/left|right|bottom|top/g,(e=>y[e]))}function g(e,t,n){void 0===n&&(n=!1);const r=i(e),o=l(e),s=a(o);let c="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=h(c)),{main:c,cross:h(c)}}const v={start:"end",end:"start"};function w(e){return e.replace(/start|end/g,(e=>v[e]))}const b=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const x=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:m="bestFit",flipAlignment:y=!0,...v}=e,b=o(r),x=d||(b===a||!y?[h(a)]:function(e){const t=h(e);return[w(e),t,w(t)]}(a)),R=[a,...x],_=await f(t,v),S=[];let T=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&S.push(_[b]),p){const{main:e,cross:t}=g(r,l,await(null==s.isRTL?void 0:s.isRTL(c.floating)));S.push(_[e],_[t])}if(T=[...T,{placement:r,overflows:S}],!S.every((e=>e<=0))){var O,k;const e=(null!=(O=null==(k=i.flip)?void 0:k.index)?O:0)+1,t=R[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n="bottom";switch(m){case"bestFit":{var A;const e=null==(A=T.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:A[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const R=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,a=await async function(e,t){const{placement:n,platform:r,elements:a}=e,s=await(null==r.isRTL?void 0:r.isRTL(a.floating)),c=o(n),u=i(n),f="x"===l(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,m="function"==typeof t?t(e):t;let{mainAxis:y,crossAxis:h,alignmentAxis:g}="number"==typeof m?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...m};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:y*p}:{x:y*p,y:h*d}}(t,e);return{x:n+a.x,y:r+a.y,data:a}}}};const _=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,p={x:n,y:r},d=await f(t,u),y=l(o(i)),h="x"===y?"y":"x";let g=p[y],v=p[h];if(a){const e="y"===y?"bottom":"right";g=m(g+d["y"===y?"top":"left"],g,g-d[e])}if(s){const e="y"===h?"bottom":"right";v=m(v+d["y"===h?"top":"left"],v,v-d[e])}const w=c.fn({...t,[y]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function S(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function T(e){if(null==e)return window;if(!S(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function O(e){return T(e).getComputedStyle(e)}function k(e){return S(e)?"":e?(e.nodeName||"").toLowerCase():""}function A(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function j(e){return e instanceof T(e).HTMLElement}function E(e){return e instanceof T(e).Element}function P(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof T(e).ShadowRoot||e instanceof ShadowRoot}function L(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=O(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function N(e){return["table","td","th"].includes(k(e))}function D(e){const t=/firefox/i.test(A()),n=O(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 C(){return!/^((?!chrome|android).)*safari/i.test(A())}function $(e){return["html","body","#document"].includes(k(e))}const F=Math.min,I=Math.max,W=Math.round;function H(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&j(e)&&(s=e.offsetWidth>0&&W(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&W(a.height)/e.offsetHeight||1);const u=E(e)?T(e):window,f=!C()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,m=a.width/s,y=a.height/c;return{width:m,height:y,top:d,right:p+m,bottom:d+y,left:p,x:p,y:d}}function U(e){return(t=e,(t instanceof T(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function B(e){return E(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function V(e){return H(U(e)).left+B(e).scrollLeft}function M(e,t,n){const r=j(t),o=U(t),i=H(e,r&&function(e){const t=H(e);return W(t.width)!==e.offsetWidth||W(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==k(t)||L(o))&&(l=B(t)),j(t)){const e=H(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=V(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function z(e){if("html"===k(e))return e;const t=e.assignedSlot||e.parentNode||(P(e)?e.host:null)||U(e);return P(t)?t.host:t}function q(e){return j(e)&&"fixed"!==O(e).position?e.offsetParent:null}function Y(e){const t=T(e);let n=q(e);for(;n&&N(n)&&"static"===O(n).position;)n=q(n);return n&&("html"===k(n)||"body"===k(n)&&"static"===O(n).position&&!D(n))?t:n||function(e){let t=z(e);for(;j(t)&&!$(t);){if(D(t))return t;t=z(t)}return null}(e)||t}function X(e){if(j(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=H(e);return{width:t.width,height:t.height}}function K(e){const t=z(e);return $(t)?e.ownerDocument.body:j(t)&&L(t)?t:K(t)}function J(e,t){var n;void 0===t&&(t=[]);const r=K(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=T(r),l=o?[i].concat(i.visualViewport||[],L(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(J(l))}function Z(e,t,n){return"viewport"===t?u(function(e,t){const n=T(e),r=U(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=C();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):E(t)?function(e,t){const n=H(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):u(function(e){var t;const n=U(e),r=B(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=I(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=I(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+V(e);const s=-r.scrollTop;return"rtl"===O(o||n).direction&&(a+=I(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(U(e)))}const G={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=J(e).filter((e=>E(e)&&"body"!==k(e))),n=e,r=null;for(;E(n)&&!$(n);){const e=O(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!D(n)?t=t.filter((e=>e!==n)):r=e,n=z(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=Z(t,n,o);return e.top=I(r.top,e.top),e.right=F(r.right,e.right),e.bottom=F(r.bottom,e.bottom),e.left=I(r.left,e.left),e}),Z(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=j(n),i=U(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==k(n)||L(i))&&(l=B(n)),j(n))){const e=H(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:E,getDimensions:X,getOffsetParent:Y,getDocumentElement:U,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:M(t,Y(n),r),floating:{...X(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===O(e).direction},Q=(e,t,n)=>(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 u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=s(u,r,c),d=r,m={},y=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:m,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,m={...m,[i]:{...m[i],...w}},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(" ")),b&&y<=50&&(y++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=s(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:m}})(e,t,{platform:G,...n});var ee={exports:{}},te={};
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactTooltip={},e.React)}(this,(function(e,t){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);function o(e){return e.split("-")[0]}function i(e){return e.split("-")[1]}function l(e){return["top","bottom"].includes(o(e))?"x":"y"}function a(e){return"y"===e?"height":"width"}function s(e,t,n){let{reference:r,floating:s}=e;const c=r.x+r.width/2-s.width/2,u=r.y+r.height/2-s.height/2,f=l(t),p=a(f),d=r[p]/2-s[p]/2,y="x"===f;let m;switch(o(t)){case"top":m={x:c,y:r.y-s.height};break;case"bottom":m={x:c,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:u};break;case"left":m={x:r.x-s.width,y:u};break;default:m={x:r.x,y:r.y}}switch(i(t)){case"start":m[f]-=d*(n&&y?-1:1);break;case"end":m[f]+=d*(n&&y?-1:1)}return m}function c(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 u(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function f(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:l,elements:a,strategy:s}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:d="floating",altBoundary:y=!1,padding:m=0}=t,h=c(m),g=a[y?"floating"===d?"reference":"floating":d],v=u(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(g)))||n?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:f,rootBoundary:p,strategy:s})),w=u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...l.floating,x:r,y:o}:l.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),strategy:s}):l[d]);return{top:v.top-w.top+h.top,bottom:w.bottom-v.bottom+h.bottom,left:v.left-w.left+h.left,right:w.right-v.right+h.right}}const p=Math.min,d=Math.max;function y(e,t,n){return d(e,p(t,n))}const m={left:"right",right:"left",bottom:"top",top:"bottom"};function h(e){return e.replace(/left|right|bottom|top/g,(e=>m[e]))}function g(e,t,n){void 0===n&&(n=!1);const r=i(e),o=l(e),s=a(o);let c="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(c=h(c)),{main:c,cross:h(c)}}const v={start:"end",end:"start"};function w(e){return e.replace(/start|end/g,(e=>v[e]))}const b=["top","right","bottom","left"].reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const x=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:i,rects:l,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:u=!0,crossAxis:p=!0,fallbackPlacements:d,fallbackStrategy:y="bestFit",flipAlignment:m=!0,...v}=e,b=o(r),x=d||(b===a||!m?[h(a)]:function(e){const t=h(e);return[w(e),t,w(t)]}(a)),R=[a,...x],_=await f(t,v),S=[];let T=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&S.push(_[b]),p){const{main:e,cross:t}=g(r,l,await(null==s.isRTL?void 0:s.isRTL(c.floating)));S.push(_[e],_[t])}if(T=[...T,{placement:r,overflows:S}],!S.every((e=>e<=0))){var k,O;const e=(null!=(k=null==(O=i.flip)?void 0:O.index)?k:0)+1,t=R[e];if(t)return{data:{index:e,overflows:T},reset:{placement:t}};let n="bottom";switch(y){case"bestFit":{var E;const e=null==(E=T.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:E[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};const R=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,a=await async function(e,t){const{placement:n,platform:r,elements:a}=e,s=await(null==r.isRTL?void 0:r.isRTL(a.floating)),c=o(n),u=i(n),f="x"===l(n),p=["left","top"].includes(c)?-1:1,d=s&&f?-1:1,y="function"==typeof t?t(e):t;let{mainAxis:m,crossAxis:h,alignmentAxis:g}="number"==typeof y?{mainAxis:y,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...y};return u&&"number"==typeof g&&(h="end"===u?-1*g:g),f?{x:h*d,y:m*p}:{x:m*p,y:h*d}}(t,e);return{x:n+a.x,y:r+a.y,data:a}}}};const _=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,p={x:n,y:r},d=await f(t,u),m=l(o(i)),h="x"===m?"y":"x";let g=p[m],v=p[h];if(a){const e="y"===m?"bottom":"right";g=y(g+d["y"===m?"top":"left"],g,g-d[e])}if(s){const e="y"===h?"bottom":"right";v=y(v+d["y"===h?"top":"left"],v,v-d[e])}const w=c.fn({...t,[m]:g,[h]:v});return{...w,data:{x:w.x-n,y:w.y-r}}}}};function S(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function T(e){if(null==e)return window;if(!S(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function k(e){return T(e).getComputedStyle(e)}function O(e){return S(e)?"":e?(e.nodeName||"").toLowerCase():""}function E(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function A(e){return e instanceof T(e).HTMLElement}function j(e){return e instanceof T(e).Element}function P(e){if("undefined"==typeof ShadowRoot)return!1;return e instanceof T(e).ShadowRoot||e instanceof ShadowRoot}function L(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=k(e);return/auto|scroll|overlay|hidden/.test(t+r+n)&&!["inline","contents"].includes(o)}function N(e){return["table","td","th"].includes(O(e))}function D(e){const t=/firefox/i.test(E()),n=k(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 C(){return!/^((?!chrome|android).)*safari/i.test(E())}function $(e){return["html","body","#document"].includes(O(e))}const F=Math.min,I=Math.max,W=Math.round;function H(e,t,n){var r,o,i,l;void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect();let s=1,c=1;t&&A(e)&&(s=e.offsetWidth>0&&W(a.width)/e.offsetWidth||1,c=e.offsetHeight>0&&W(a.height)/e.offsetHeight||1);const u=j(e)?T(e):window,f=!C()&&n,p=(a.left+(f&&null!=(r=null==(o=u.visualViewport)?void 0:o.offsetLeft)?r:0))/s,d=(a.top+(f&&null!=(i=null==(l=u.visualViewport)?void 0:l.offsetTop)?i:0))/c,y=a.width/s,m=a.height/c;return{width:y,height:m,top:d,right:p+y,bottom:d+m,left:p,x:p,y:d}}function U(e){return(t=e,(t instanceof T(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function B(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function V(e){return H(U(e)).left+B(e).scrollLeft}function M(e,t,n){const r=A(t),o=U(t),i=H(e,r&&function(e){const t=H(e);return W(t.width)!==e.offsetWidth||W(t.height)!==e.offsetHeight}(t),"fixed"===n);let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==O(t)||L(o))&&(l=B(t)),A(t)){const e=H(t,!0);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else o&&(a.x=V(o));return{x:i.left+l.scrollLeft-a.x,y:i.top+l.scrollTop-a.y,width:i.width,height:i.height}}function z(e){if("html"===O(e))return e;const t=e.assignedSlot||e.parentNode||(P(e)?e.host:null)||U(e);return P(t)?t.host:t}function q(e){return A(e)&&"fixed"!==k(e).position?e.offsetParent:null}function Y(e){const t=T(e);let n=q(e);for(;n&&N(n)&&"static"===k(n).position;)n=q(n);return n&&("html"===O(n)||"body"===O(n)&&"static"===k(n).position&&!D(n))?t:n||function(e){let t=z(e);for(;A(t)&&!$(t);){if(D(t))return t;t=z(t)}return null}(e)||t}function X(e){if(A(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=H(e);return{width:t.width,height:t.height}}function K(e){const t=z(e);return $(t)?e.ownerDocument.body:A(t)&&L(t)?t:K(t)}function J(e,t){var n;void 0===t&&(t=[]);const r=K(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=T(r),l=o?[i].concat(i.visualViewport||[],L(r)?r:[]):r,a=t.concat(l);return o?a:a.concat(J(l))}function Z(e,t,n){return"viewport"===t?u(function(e,t){const n=T(e),r=U(e),o=n.visualViewport;let i=r.clientWidth,l=r.clientHeight,a=0,s=0;if(o){i=o.width,l=o.height;const e=C();(e||!e&&"fixed"===t)&&(a=o.offsetLeft,s=o.offsetTop)}return{width:i,height:l,x:a,y:s}}(e,n)):j(t)?function(e,t){const n=H(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):u(function(e){var t;const n=U(e),r=B(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=I(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=I(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let a=-r.scrollLeft+V(e);const s=-r.scrollTop;return"rtl"===k(o||n).direction&&(a+=I(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:l,x:a,y:s}}(U(e)))}const G={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i="clippingAncestors"===n?function(e){let t=J(e).filter((e=>j(e)&&"body"!==O(e))),n=e,r=null;for(;j(n)&&!$(n);){const e=k(n);"static"===e.position&&r&&["absolute","fixed"].includes(r.position)&&!D(n)?t=t.filter((e=>e!==n)):r=e,n=z(n)}return t}(t):[].concat(n),l=[...i,r],a=l[0],s=l.reduce(((e,n)=>{const r=Z(t,n,o);return e.top=I(r.top,e.top),e.right=F(r.right,e.right),e.bottom=F(r.bottom,e.bottom),e.left=I(r.left,e.left),e}),Z(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=A(n),i=U(n);if(n===i)return t;let l={scrollLeft:0,scrollTop:0};const a={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==O(n)||L(i))&&(l=B(n)),A(n))){const e=H(n,!0);a.x=e.x+n.clientLeft,a.y=e.y+n.clientTop}return{...t,x:t.x-l.scrollLeft+a.x,y:t.y-l.scrollTop+a.y}},isElement:j,getDimensions:X,getOffsetParent:Y,getDocumentElement:U,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:M(t,Y(n),r),floating:{...X(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===k(e).direction},Q=(e,t,n)=>(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 u=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=s(u,r,c),d=r,y={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:h}=a[n],{x:g,y:v,data:w,reset:b}=await h({x:f,y:p,initialPlacement:r,placement:d,strategy:o,middlewareData:y,rects:u,platform:l,elements:{reference:e,floating:t}});f=null!=g?g:f,p=null!=v?v:p,y={...y,[i]:{...y[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(" ")),b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:f,y:p}=s(u,d,c))),n=-1)}return{x:f,y:p,placement:d,strategy:o,middlewareData:y}})(e,t,{platform:G,...n});var ee={exports:{}},te={};
2
2
  /** @license React v16.14.0
3
3
  * react-jsx-runtime.development.js
4
4
  *
@@ -7,9 +7,9 @@
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
9
  */
10
- !function(e){!function(){var t=r.default,n=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=60116,m=60121,y=60122,h=60117,g=60129,v=60131;if("function"==typeof Symbol&&Symbol.for){var w=Symbol.for;n=w("react.element"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=w("react.lazy"),m=w("react.block"),y=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;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(k){var i=T(k.type),l=k._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(S,"");if(/^index\./.test(i)){var l=o.match(S);if(l){var a=l[1];if(a)i=a.replace(S,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,k._source,l&&T(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 S=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return y=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",y.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case m:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,y,h,g,v;return null}var O={};x.ReactDebugCurrentFrame;var k=null;function A(e){k=e}var j,E,P,L=x.ReactCurrentOwner,N=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};P={};function C(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(N.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(N.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('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',T(L.current.type),e.ref),P[n]=!0)}}(t,i)),t)N.call(t,l)&&!D.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(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){j||(j=!0,R("%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),c&&function(e,t){var n=function(){E||(E=!0,R("%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 s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var $,F=x.ReactCurrentOwner;function I(e){k=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function H(){if(F.current){var e=T(F.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,$=!1;var U={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=H();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(!U[n]){U[n]=!0;var r="";e&&e._owner&&e._owner!==F.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),R('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 V(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 M(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!==p)return;t=n.propTypes}if(t){var r=T(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 s=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 s.name="Invariant Violation",s}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||(A(o),R("%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),A(null)),a instanceof Error&&!(a.message in O)&&(O[a.message]=!0,A(o),R("Failed %s type: %s",n,a.message),A(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!$){$=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,r,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===m||t[0]===y)}(t);if(!_){var S="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(S+=" 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 O,k=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=k||H(),null===t?O="null":Array.isArray(t)?O="array":void 0!==t&&t.$$typeof===n?(O="<"+(T(t.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):O=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",O,S)}var A=C(t,r,o,b,x);if(null==A)return A;if(_){var j=r.children;if(void 0!==j)if(w)if(Array.isArray(j)){for(var E=0;E<j.length;E++)V(j[E],t);Object.freeze&&Object.freeze(j)}else R("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 V(j,t)}return t===e.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),R("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),R("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(A):M(A),A}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(te),function(e){e.exports=te}(ee);var ne={exports:{}};
10
+ !function(e){!function(){var t=r.default,n=60103,o=60106;e.Fragment=60107;var i=60108,l=60114,a=60109,s=60110,c=60112,u=60113,f=60120,p=60115,d=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"),o=w("react.portal"),e.Fragment=w("react.fragment"),i=w("react.strict_mode"),l=w("react.profiler"),a=w("react.provider"),s=w("react.context"),c=w("react.forward_ref"),u=w("react.suspense"),f=w("react.suspense_list"),p=w("react.memo"),d=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;var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function R(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];_("error",e,n)}function _(e,t,n){var r=x.ReactDebugCurrentFrame,o="";if(O){var i=T(O.type),l=O._owner;o+=function(e,t,n){var r="";if(t){var o=t.fileName,i=o.replace(S,"");if(/^index\./.test(i)){var l=o.match(S);if(l){var a=l[1];if(a)i=a.replace(S,"")+"/"+i}}r=" (at "+i+":"+t.lineNumber+")"}else n&&(r=" (created by "+n+")");return"\n in "+(e||"Unknown")+r}(i,O._source,l&&T(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 S=/^(.*)[\\\/]/;function T(t){if(null==t)return null;if("number"==typeof t.tag&&R("Received an unexpected object in getComponentName(). This is likely a bug in React. Please file an issue."),"function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case e.Fragment:return"Fragment";case o:return"Portal";case l:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case f:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case s:return"Context.Consumer";case a:return"Context.Provider";case c:return m=t,h=t.render,g="ForwardRef",v=h.displayName||h.name||"",m.displayName||(""!==v?g+"("+v+")":g);case p:return T(t.type);case y:return T(t.render);case d:var n=1===(r=t)._status?r._result:null;if(n)return T(n)}var r,m,h,g,v;return null}var k={};x.ReactDebugCurrentFrame;var O=null;function E(e){O=e}var A,j,P,L=x.ReactCurrentOwner,N=Object.prototype.hasOwnProperty,D={key:!0,ref:!0,__self:!0,__source:!0};P={};function C(e,t,r,o,i){var l,a={},s=null,c=null;for(l in void 0!==r&&(s=""+r),function(e){if(N.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(t)&&(s=""+t.key),function(e){if(N.call(e,"ref")){var t=Object.getOwnPropertyDescriptor(e,"ref").get;if(t&&t.isReactWarning)return!1}return void 0!==e.ref}(t)&&(c=t.ref,function(e,t){if("string"==typeof e.ref&&L.current&&t&&L.current.stateNode!==t){var n=T(L.current.type);P[n]||(R('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',T(L.current.type),e.ref),P[n]=!0)}}(t,i)),t)N.call(t,l)&&!D.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(s||c){var f="function"==typeof e?e.displayName||e.name||"Unknown":e;s&&function(e,t){var n=function(){A||(A=!0,R("%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),c&&function(e,t){var n=function(){j||(j=!0,R("%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 s={$$typeof:n,type:e,key:t,ref:r,props:a,_owner:l,_store:{}};return Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s}(e,s,c,i,o,L.current,a)}var $,F=x.ReactCurrentOwner;function I(e){O=e}function W(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function H(){if(F.current){var e=T(F.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}x.ReactDebugCurrentFrame,$=!1;var U={};function B(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=H();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(!U[n]){U[n]=!0;var r="";e&&e._owner&&e._owner!==F.current&&(r=" It was passed a child from "+T(e._owner.type)+"."),I(e),R('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 V(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 M(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!==p)return;t=n.propTypes}if(t){var r=T(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 s=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 s.name="Invariant Violation",s}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||(E(o),R("%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),E(null)),a instanceof Error&&!(a.message in k)&&(k[a.message]=!0,E(o),R("Failed %s type: %s",n,a.message),E(null))}}(t,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!$){$=!0,R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",T(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function z(t,r,o,w,b,x){var _=function(t){return"string"==typeof t||"function"==typeof t||t===e.Fragment||t===l||t===g||t===i||t===u||t===f||t===v||"object"==typeof t&&null!==t&&(t.$$typeof===d||t.$$typeof===p||t.$$typeof===a||t.$$typeof===s||t.$$typeof===c||t.$$typeof===h||t.$$typeof===y||t[0]===m)}(t);if(!_){var S="";(void 0===t||"object"==typeof t&&null!==t&&0===Object.keys(t).length)&&(S+=" 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 k,O=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(b);S+=O||H(),null===t?k="null":Array.isArray(t)?k="array":void 0!==t&&t.$$typeof===n?(k="<"+(T(t.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):k=typeof t,R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",k,S)}var E=C(t,r,o,b,x);if(null==E)return E;if(_){var A=r.children;if(void 0!==A)if(w)if(Array.isArray(A)){for(var j=0;j<A.length;j++)V(A[j],t);Object.freeze&&Object.freeze(A)}else R("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 V(A,t)}return t===e.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),R("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),R("Invalid attribute `ref` supplied to `React.Fragment`."),I(null))}(E):M(E),E}var q=function(e,t,n){return z(e,t,n,!1)},Y=function(e,t,n){return z(e,t,n,!0)};e.jsx=q,e.jsxs=Y}()}(te),function(e){e.exports=te}(ee);var ne={exports:{}};
11
11
  /*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
15
- */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&e.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(ne);var re=ne.exports;const oe=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ie=({content:e})=>ee.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),le="DEFAULT_TOOLTIP_ID",ae={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},se={getTooltipData:()=>ae},ce=t.createContext(se);function ue(e=le){return t.useContext(ce).getTooltipData(e)}const fe=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:s="absolute",middlewares:u=[R(Number(o)),x(),_({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=null!=p?p:{},{x:r,y:o,placement:s,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const d=c(n),y={x:r,y:o},h=l(s),g=i(s),v=a(h),w=await f.getDimensions(t),b="y"===h?"top":"left",x="y"===h?"bottom":"right",R=u.reference[v]+u.reference[h]-y[h]-u.floating[v],_=y[h]-u.reference[h],S=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let T=S?"y"===h?S.clientHeight||0:S.clientWidth||0:0;0===T&&(T=u.floating[v]);const O=R/2-_/2,k=d[b],A=T-w[v]-d[x],j=T/2-w[v]/2+O,E=m(k,j,A),P=("start"===g?d[b]:d[x])>0&&j!==E&&u.reference[v]<=u.floating[v];return{[h]:y[h]-(P?j<k?k-j:A-j:0),data:{[h]:E,centerOffset:j-E}}}}),Q(e,t,{placement:r,strategy:s,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):Q(e,t,{placement:"bottom",strategy:s,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};var pe={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 de=({id:e,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f="div",children:p=null,delayShow:d=0,delayHide:m=0,float:y=!1,noArrow:h=!1,clickable:g=!1,style:v,position:w,afterShow:b,afterHide:x,content:R,html:_,isOpen:S,setIsOpen:T})=>{const O=t.useRef(null),k=t.useRef(null),A=t.useRef(null),j=t.useRef(null),[E,P]=t.useState({}),[L,N]=t.useState({}),[D,C]=t.useState(!1),$=t.useRef(!1),[F,I]=t.useState(!1),W=t.useRef(null),{anchorRefs:H,setActiveAnchor:U}=ue(e),[B,V]=t.useState({current:null}),M=t.useRef(!1),z=e=>{T?T(e):void 0===S&&C(e)};t.useEffect((()=>{D!==$.current&&($.current=D,D?null==b||b():null==x||x())}),[D]);const q=(e=m)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{M.current||z(!1)}),e)},Y=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{z(!0)}),d)):z(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;V((e=>e.current===n?e:{current:n})),U({current:n}),j.current&&clearTimeout(j.current)},X=()=>{g?q(m||50):m?q():z(!1),A.current&&clearTimeout(A.current)},K=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};I(!0),fe({place:l,offset:a,elementReference:n,tooltipReference:O.current,tooltipArrowReference:k.current,strategy:c,middlewares:u}).then((e=>{I(!1),Object.keys(e.tooltipStyles).length&&P(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles)}))},J=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};K(n),W.current=n},Z=e=>{Y(e),m&&q()},G=e=>{var t;(null===(t=B.current)||void 0===t?void 0:t.contains(e.target))||z(!1)},Q=oe(Y,50),te=oe(X,50);t.useEffect((()=>{var e,t;const n=new Set(H),r=document.querySelector(`[id='${i}']`);if(r&&(V((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",G),o.push({event:"click",listener:Z})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:Q},{event:"mouseleave",listener:te},{event:"focus",listener:Q},{event:"blur",listener:te}),y&&o.push({event:"mousemove",listener:J}));const l=()=>{M.current=!0},a=()=>{M.current=!1,X()};return g&&(null===(e=O.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=O.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;window.removeEventListener("click",G),g&&(null===(e=O.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=O.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)}))}))}}),[H,B,i,s,m,d]),t.useEffect((()=>{if(w)return K(w),()=>null;if(y)return W.current&&K(W.current),()=>null;let e=B.current;i&&(e=document.querySelector(`[id='${i}']`)),I(!0);let t=!0;return fe({place:l,offset:a,elementReference:e,tooltipReference:O.current,tooltipArrowReference:k.current,strategy:c,middlewares:u}).then((e=>{t&&(I(!1),Object.keys(e.tooltipStyles).length&&P(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&N(e.tooltipArrowStyles))})),()=>{t=!1}}),[D,S,i,B,R,_,l,a,c,w]),t.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const ne=Boolean(_||R||p);return ee.exports.jsxs(f,{id:e,role:"tooltip",className:re("react-tooltip",pe.tooltip,pe[o],n,{[pe.show]:ne&&!F&&(S||D),[pe.fixed]:"fixed"===c,[pe.clickable]:g}),style:{...v,...E},ref:O,children:[p||_&&ee.exports.jsx(ie,{content:_})||R,ee.exports.jsx("div",{className:re("react-tooltip-arrow",pe.arrow,r,{[pe["no-arrow"]]:h}),style:L,ref:k})]})};e.Tooltip=({id:e,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:m,delayShow:y=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,style:b,position:x,isOpen:R,setIsOpen:_,afterShow:S,afterHide:T})=>{const[O,k]=t.useState(r),[A,j]=t.useState(o),[E,P]=t.useState(s),[L,N]=t.useState(a),[D,C]=t.useState(c),[$,F]=t.useState(y),[I,W]=t.useState(h),[H,U]=t.useState(g),[B,V]=t.useState(u),[M,z]=t.useState(p),[q,Y]=t.useState(d),{anchorRefs:X,activeAnchor:K}=ue(e),J=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}),{}),Z=e=>{const t={place:e=>{var t;P(null!==(t=e)&&void 0!==t?t:s)},content:e=>{k(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;N(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{C(null===e?c:Number(e))},wrapper:e=>{var t;V(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");z(null!=t?t:p)},"position-strategy":e=>{var t;Y(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{F(null===e?y:Number(e))},"delay-hide":e=>{W(null===e?h:Number(e))},float:e=>{U(null===e?g:Boolean(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)}))};t.useEffect((()=>{k(r)}),[r]),t.useEffect((()=>{j(o)}),[o]),t.useEffect((()=>{var e;const t=new Set(X),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=K.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=J(o);Z(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=J(o);Z(e),i.observe(o,l)}return()=>{i.disconnect()}}),[X,K,n]);const G={id:e,anchorId:n,className:i,classNameArrow:l,content:O,html:A,place:E,variant:L,offset:D,wrapper:B,events:M,positionStrategy:q,middlewares:m,delayShow:$,delayHide:I,float:H,noArrow:v,clickable:w,style:b,position:x,isOpen:R,setIsOpen:_,afterShow:S,afterHide:T};return f?ee.exports.jsx(de,{...G,children:f}):ee.exports.jsx(de,{...G})},e.TooltipProvider=({children:e})=>{const[n,r]=t.useState({[le]:new Set}),[o,i]=t.useState({[le]:{current:null}}),l=(e,...t)=>{r((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)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=t.useCallback(((e=le)=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=t.useMemo((()=>({getTooltipData:s})),[s]);return ee.exports.jsx(ce.Provider,{value:c,children:e})},e.TooltipWrapper=({tooltipId:e,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:m,detach:y}=ue(e),h=t.useRef(null);return t.useEffect((()=>(m(h),()=>{y(h)})),[]),ee.exports.jsx("span",{ref:h,className:re("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},e.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,l,a,s;const{x:c,y:u,rects:p,middlewareData:d,placement:m,platform:y,elements:h}=t,{alignment:v=null,allowedPlacements:x=b,autoAlignment:R=!0,..._}=e,S=function(e,t,n){return(e?[...n.filter((t=>i(t)===e)),...n.filter((t=>i(t)!==e))]:n.filter((e=>o(e)===e))).filter((n=>!e||i(n)===e||!!t&&w(n)!==n))}(v,R,x),T=await f(t,_),O=null!=(n=null==(r=d.autoPlacement)?void 0:r.index)?n:0,k=S[O];if(null==k)return{};const{main:A,cross:j}=g(k,p,await(null==y.isRTL?void 0:y.isRTL(h.floating)));if(m!==k)return{x:c,y:u,reset:{placement:S[0]}};const E=[T[o(k)],T[A],T[j]],P=[...null!=(l=null==(a=d.autoPlacement)?void 0:a.overflows)?l:[],{placement:k,overflows:E}],L=S[O+1];if(L)return{data:{index:O+1,overflows:P},reset:{placement:L}};const N=P.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),D=null==(s=N.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:s.placement,C=null!=D?D:N[0].placement;return C!==m?{data:{index:O+1,overflows:P},reset:{placement:C}}:{}}}},e.flip=x,e.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:r,elements:i,rects:a,platform:s,strategy:f}=t,{padding:m=2,x:y,y:h}=e,g=u(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:a.reference,offsetParent:await(null==s.getOffsetParent?void 0:s.getOffsetParent(i.floating)),strategy:f}):a.reference),v=null!=(n=await(null==s.getClientRects?void 0:s.getClientRects(i.reference)))?n:[],w=c(m);const b=await s.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===v.length&&v[0].left>v[1].right&&null!=y&&null!=h)return null!=(e=v.find((e=>y>e.left-w.left&&y<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)))?e:g;if(v.length>=2){if("x"===l(r)){const e=v[0],t=v[v.length-1],n="top"===o(r),i=e.top,l=t.bottom,a=n?e.left:t.left,s=n?e.right:t.right;return{top:i,bottom:l,left:a,right:s,width:s-a,height:l-i,x:a,y:i}}const e="left"===o(r),t=d(...v.map((e=>e.right))),n=p(...v.map((e=>e.left))),i=v.filter((r=>e?r.left===n:r.right===t)),a=i[0].top,s=i[i.length-1].bottom;return{top:a,bottom:s,left:n,right:t,width:t-n,height:s-a,x:n,y:a}}return g}},floating:i.floating,strategy:f});return a.reference.x!==b.reference.x||a.reference.y!==b.reference.y||a.reference.width!==b.reference.width||a.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},e.offset=R,e.shift=_,e.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:l,elements:a}=t,{apply:s=(()=>{}),...c}=e,u=await f(t,c),p=o(n),m=i(n);let y,h;"top"===p||"bottom"===p?(y=p,h=m===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(h=p,y="end"===m?"top":"bottom");const g=d(u.left,0),v=d(u.right,0),w=d(u.top,0),b=d(u.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:d(u.top,u.bottom)):u[y]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:d(u.left,u.right)):u[h])};await s({...t,...x});const R=await l.getDimensions(a.floating);return r.floating.width!==R.width||r.floating.height!==R.height?{reset:{rects:!0}}:{}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
15
+ */!function(e){!function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var o=arguments[r];if(o){var i=typeof o;if("string"===i||"number"===i)e.push(o);else if(Array.isArray(o)){if(o.length){var l=n.apply(null,o);l&&e.push(l)}}else if("object"===i){if(o.toString!==Object.prototype.toString&&!o.toString.toString().includes("[native code]")){e.push(o.toString());continue}for(var a in o)t.call(o,a)&&o[a]&&e.push(a)}}}return e.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n}()}(ne);var re=ne.exports;const oe=(e,t,n)=>{let r=null;return function(...o){r&&clearTimeout(r),r=setTimeout((()=>{r=null,n||e.apply(this,o)}),t)}},ie=({content:e})=>ee.exports.jsx("span",{dangerouslySetInnerHTML:{__html:e}}),le="DEFAULT_TOOLTIP_ID",ae={anchorRefs:new Set,activeAnchor:{current:null},attach:()=>{},detach:()=>{},setActiveAnchor:()=>{}},se={getTooltipData:()=>ae},ce=t.createContext(se);function ue(e=le){return t.useContext(ce).getTooltipData(e)}const fe=async({elementReference:e=null,tooltipReference:t=null,tooltipArrowReference:n=null,place:r="top",offset:o=10,strategy:s="absolute",middlewares:u=[R(Number(o)),x(),_({padding:5})]})=>{if(!e)return{tooltipStyles:{},tooltipArrowStyles:{}};if(null===t)return{tooltipStyles:{},tooltipArrowStyles:{}};const f=u;return n?(f.push({name:"arrow",options:p={element:n,padding:5},async fn(e){const{element:t,padding:n=0}=null!=p?p:{},{x:r,y:o,placement:s,rects:u,platform:f}=e;if(null==t)return console.warn("Floating UI: No `element` was passed to the `arrow` middleware."),{};const d=c(n),m={x:r,y:o},h=l(s),g=i(s),v=a(h),w=await f.getDimensions(t),b="y"===h?"top":"left",x="y"===h?"bottom":"right",R=u.reference[v]+u.reference[h]-m[h]-u.floating[v],_=m[h]-u.reference[h],S=await(null==f.getOffsetParent?void 0:f.getOffsetParent(t));let T=S?"y"===h?S.clientHeight||0:S.clientWidth||0:0;0===T&&(T=u.floating[v]);const k=R/2-_/2,O=d[b],E=T-w[v]-d[x],A=T/2-w[v]/2+k,j=y(O,A,E),P=("start"===g?d[b]:d[x])>0&&A!==j&&u.reference[v]<=u.floating[v];return{[h]:m[h]-(P?A<O?O-A:E-A:0),data:{[h]:j,centerOffset:A-j}}}}),Q(e,t,{placement:r,strategy:s,middleware:f}).then((({x:e,y:t,placement:n,middlewareData:r})=>{var o,i;const l={left:`${e}px`,top:`${t}px`},{x:a,y:s}=null!==(o=r.arrow)&&void 0!==o?o:{x:0,y:0};return{tooltipStyles:l,tooltipArrowStyles:{left:null!=a?`${a}px`:"",top:null!=s?`${s}px`:"",right:"",bottom:"",[null!==(i={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]])&&void 0!==i?i:"bottom"]:"-4px"}}}))):Q(e,t,{placement:"bottom",strategy:s,middleware:f}).then((({x:e,y:t})=>({tooltipStyles:{left:`${e}px`,top:`${t}px`},tooltipArrowStyles:{}})));var p};var pe={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 de=({id:e,className:n,classNameArrow:r,variant:o="dark",anchorId:i,place:l="top",offset:a=10,events:s=["hover"],positionStrategy:c="absolute",middlewares:u,wrapper:f="div",children:p=null,delayShow:d=0,delayHide:y=0,float:m=!1,noArrow:h=!1,clickable:g=!1,closeOnEsc:v=!1,style:w,position:b,afterShow:x,afterHide:R,content:_,html:S,isOpen:T,setIsOpen:k})=>{const O=t.useRef(null),E=t.useRef(null),A=t.useRef(null),j=t.useRef(null),[P,L]=t.useState({}),[N,D]=t.useState({}),[C,$]=t.useState(!1),F=t.useRef(!1),[I,W]=t.useState(!1),H=t.useRef(null),{anchorRefs:U,setActiveAnchor:B}=ue(e),[V,M]=t.useState({current:null}),z=t.useRef(!1),q=e=>{k?k(e):void 0===T&&$(e)};t.useEffect((()=>{C!==F.current&&(F.current=C,C?null==x||x():null==R||R())}),[C]);const Y=(e=y)=>{j.current&&clearTimeout(j.current),j.current=setTimeout((()=>{z.current||q(!1)}),e)},X=e=>{var t;if(!e)return;d?(A.current&&clearTimeout(A.current),A.current=setTimeout((()=>{q(!0)}),d)):q(!0);const n=null!==(t=e.currentTarget)&&void 0!==t?t:e.target;M((e=>e.current===n?e:{current:n})),B({current:n}),j.current&&clearTimeout(j.current)},K=()=>{g?Y(y||50):y?Y():q(!1),A.current&&clearTimeout(A.current)},J=({x:e,y:t})=>{const n={getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t})};W(!0),fe({place:l,offset:a,elementReference:n,tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&D(e.tooltipArrowStyles)}))},Z=e=>{if(!e)return;const t=e,n={x:t.clientX,y:t.clientY};J(n),H.current=n},G=e=>{X(e),y&&Y()},Q=e=>{var t;(null===(t=V.current)||void 0===t?void 0:t.contains(e.target))||q(!1)},te=e=>{"Escape"===e.key&&q(!1)},ne=oe(X,50),le=oe(K,50);t.useEffect((()=>{var e,t;const n=new Set(U),r=document.querySelector(`[id='${i}']`);if(r&&(M((e=>e.current===r?e:{current:r})),n.add({current:r})),!n.size)return()=>null;v&&window.addEventListener("keydown",te);const o=[];s.find((e=>"click"===e))&&(window.addEventListener("click",Q),o.push({event:"click",listener:G})),s.find((e=>"hover"===e))&&(o.push({event:"mouseenter",listener:ne},{event:"mouseleave",listener:le},{event:"focus",listener:ne},{event:"blur",listener:le}),m&&o.push({event:"mousemove",listener:Z}));const l=()=>{z.current=!0},a=()=>{z.current=!1,K()};return g&&(null===(e=O.current)||void 0===e||e.addEventListener("mouseenter",l),null===(t=O.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;s.find((e=>"click"===e))&&window.removeEventListener("click",Q),v&&window.removeEventListener("keydown",te),g&&(null===(e=O.current)||void 0===e||e.removeEventListener("mouseenter",l),null===(t=O.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)}))}))}}),[U,V,v,i,s,y,d]),t.useEffect((()=>{if(b)return J(b),()=>null;if(m)return H.current&&J(H.current),()=>null;let e=V.current;i&&(e=document.querySelector(`[id='${i}']`)),W(!0);let t=!0;return fe({place:l,offset:a,elementReference:e,tooltipReference:O.current,tooltipArrowReference:E.current,strategy:c,middlewares:u}).then((e=>{t&&(W(!1),Object.keys(e.tooltipStyles).length&&L(e.tooltipStyles),Object.keys(e.tooltipArrowStyles).length&&D(e.tooltipArrowStyles))})),()=>{t=!1}}),[C,T,i,V,_,S,l,a,c,b]),t.useEffect((()=>()=>{A.current&&clearTimeout(A.current),j.current&&clearTimeout(j.current)}),[]);const ae=Boolean(S||_||p);return ee.exports.jsxs(f,{id:e,role:"tooltip",className:re("react-tooltip",pe.tooltip,pe[o],n,{[pe.show]:ae&&!I&&(T||C),[pe.fixed]:"fixed"===c,[pe.clickable]:g}),style:{...w,...P},ref:O,children:[p||S&&ee.exports.jsx(ie,{content:S})||_,ee.exports.jsx("div",{className:re("react-tooltip-arrow",pe.arrow,r,{[pe["no-arrow"]]:h}),style:N,ref:E})]})};e.Tooltip=({id:e,anchorId:n,content:r,html:o,className:i,classNameArrow:l,variant:a="dark",place:s="top",offset:c=10,wrapper:u="div",children:f=null,events:p=["hover"],positionStrategy:d="absolute",middlewares:y,delayShow:m=0,delayHide:h=0,float:g=!1,noArrow:v=!1,clickable:w=!1,closeOnEsc:b=!1,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:k})=>{const[O,E]=t.useState(r),[A,j]=t.useState(o),[P,L]=t.useState(s),[N,D]=t.useState(a),[C,$]=t.useState(c),[F,I]=t.useState(m),[W,H]=t.useState(h),[U,B]=t.useState(g),[V,M]=t.useState(u),[z,q]=t.useState(p),[Y,X]=t.useState(d),{anchorRefs:K,activeAnchor:J}=ue(e),Z=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}),{}),G=e=>{const t={place:e=>{var t;L(null!==(t=e)&&void 0!==t?t:s)},content:e=>{E(null!=e?e:r)},html:e=>{j(null!=e?e:o)},variant:e=>{var t;D(null!==(t=e)&&void 0!==t?t:a)},offset:e=>{$(null===e?c:Number(e))},wrapper:e=>{var t;M(null!==(t=e)&&void 0!==t?t:"div")},events:e=>{const t=null==e?void 0:e.split(" ");q(null!=t?t:p)},"position-strategy":e=>{var t;X(null!==(t=e)&&void 0!==t?t:d)},"delay-show":e=>{I(null===e?m:Number(e))},"delay-hide":e=>{H(null===e?h:Number(e))},float:e=>{B(null===e?g:Boolean(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)}))};t.useEffect((()=>{E(r)}),[r]),t.useEffect((()=>{j(o)}),[o]),t.useEffect((()=>{var e;const t=new Set(K),r=document.querySelector(`[id='${n}']`);if(r&&t.add({current:r}),!t.size)return()=>null;const o=null!==(e=J.current)&&void 0!==e?e:r,i=new MutationObserver((e=>{e.forEach((e=>{var t;if(!o||"attributes"!==e.type||!(null===(t=e.attributeName)||void 0===t?void 0:t.startsWith("data-tooltip-")))return;const n=Z(o);G(n)}))})),l={attributes:!0,childList:!1,subtree:!1};if(o){const e=Z(o);G(e),i.observe(o,l)}return()=>{i.disconnect()}}),[K,J,n]);const Q={id:e,anchorId:n,className:i,classNameArrow:l,content:O,html:A,place:P,variant:N,offset:C,wrapper:V,events:z,positionStrategy:Y,middlewares:y,delayShow:F,delayHide:W,float:U,noArrow:v,clickable:w,closeOnEsc:b,style:x,position:R,isOpen:_,setIsOpen:S,afterShow:T,afterHide:k};return f?ee.exports.jsx(de,{...Q,children:f}):ee.exports.jsx(de,{...Q})},e.TooltipProvider=({children:e})=>{const[n,r]=t.useState({[le]:new Set}),[o,i]=t.useState({[le]:{current:null}}),l=(e,...t)=>{r((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)}}))},a=(e,...t)=>{r((n=>{const r=n[e];return r?(t.forEach((e=>r.delete(e))),{...n}):n}))},s=t.useCallback(((e=le)=>{var t,r;return{anchorRefs:null!==(t=n[e])&&void 0!==t?t:new Set,activeAnchor:null!==(r=o[e])&&void 0!==r?r:{current:null},attach:(...t)=>l(e,...t),detach:(...t)=>a(e,...t),setActiveAnchor:t=>((e,t)=>{i((n=>{var r;return(null===(r=n[e])||void 0===r?void 0:r.current)===t.current?n:{...n,[e]:t}}))})(e,t)}}),[n,o,l,a]),c=t.useMemo((()=>({getTooltipData:s})),[s]);return ee.exports.jsx(ce.Provider,{value:c,children:e})},e.TooltipWrapper=({tooltipId:e,children:n,className:r,place:o,content:i,html:l,variant:a,offset:s,wrapper:c,events:u,positionStrategy:f,delayShow:p,delayHide:d})=>{const{attach:y,detach:m}=ue(e),h=t.useRef(null);return t.useEffect((()=>(y(h),()=>{m(h)})),[]),ee.exports.jsx("span",{ref:h,className:re("react-tooltip-wrapper",r),"data-tooltip-place":o,"data-tooltip-content":i,"data-tooltip-html":l,"data-tooltip-variant":a,"data-tooltip-offset":s,"data-tooltip-wrapper":c,"data-tooltip-events":u,"data-tooltip-position-strategy":f,"data-tooltip-delay-show":p,"data-tooltip-delay-hide":d,children:n})},e.autoPlacement=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var n,r,l,a,s;const{x:c,y:u,rects:p,middlewareData:d,placement:y,platform:m,elements:h}=t,{alignment:v=null,allowedPlacements:x=b,autoAlignment:R=!0,..._}=e,S=function(e,t,n){return(e?[...n.filter((t=>i(t)===e)),...n.filter((t=>i(t)!==e))]:n.filter((e=>o(e)===e))).filter((n=>!e||i(n)===e||!!t&&w(n)!==n))}(v,R,x),T=await f(t,_),k=null!=(n=null==(r=d.autoPlacement)?void 0:r.index)?n:0,O=S[k];if(null==O)return{};const{main:E,cross:A}=g(O,p,await(null==m.isRTL?void 0:m.isRTL(h.floating)));if(y!==O)return{x:c,y:u,reset:{placement:S[0]}};const j=[T[o(O)],T[E],T[A]],P=[...null!=(l=null==(a=d.autoPlacement)?void 0:a.overflows)?l:[],{placement:O,overflows:j}],L=S[k+1];if(L)return{data:{index:k+1,overflows:P},reset:{placement:L}};const N=P.slice().sort(((e,t)=>e.overflows[0]-t.overflows[0])),D=null==(s=N.find((e=>{let{overflows:t}=e;return t.every((e=>e<=0))})))?void 0:s.placement,C=null!=D?D:N[0].placement;return C!==y?{data:{index:k+1,overflows:P},reset:{placement:C}}:{}}}},e.flip=x,e.inline=function(e){return void 0===e&&(e={}),{name:"inline",options:e,async fn(t){var n;const{placement:r,elements:i,rects:a,platform:s,strategy:f}=t,{padding:y=2,x:m,y:h}=e,g=u(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({rect:a.reference,offsetParent:await(null==s.getOffsetParent?void 0:s.getOffsetParent(i.floating)),strategy:f}):a.reference),v=null!=(n=await(null==s.getClientRects?void 0:s.getClientRects(i.reference)))?n:[],w=c(y);const b=await s.getElementRects({reference:{getBoundingClientRect:function(){var e;if(2===v.length&&v[0].left>v[1].right&&null!=m&&null!=h)return null!=(e=v.find((e=>m>e.left-w.left&&m<e.right+w.right&&h>e.top-w.top&&h<e.bottom+w.bottom)))?e:g;if(v.length>=2){if("x"===l(r)){const e=v[0],t=v[v.length-1],n="top"===o(r),i=e.top,l=t.bottom,a=n?e.left:t.left,s=n?e.right:t.right;return{top:i,bottom:l,left:a,right:s,width:s-a,height:l-i,x:a,y:i}}const e="left"===o(r),t=d(...v.map((e=>e.right))),n=p(...v.map((e=>e.left))),i=v.filter((r=>e?r.left===n:r.right===t)),a=i[0].top,s=i[i.length-1].bottom;return{top:a,bottom:s,left:n,right:t,width:t-n,height:s-a,x:n,y:a}}return g}},floating:i.floating,strategy:f});return a.reference.x!==b.reference.x||a.reference.y!==b.reference.y||a.reference.width!==b.reference.width||a.reference.height!==b.reference.height?{reset:{rects:b}}:{}}}},e.offset=R,e.shift=_,e.size=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:l,elements:a}=t,{apply:s=(()=>{}),...c}=e,u=await f(t,c),p=o(n),y=i(n);let m,h;"top"===p||"bottom"===p?(m=p,h=y===(await(null==l.isRTL?void 0:l.isRTL(a.floating))?"start":"end")?"left":"right"):(h=p,m="end"===y?"top":"bottom");const g=d(u.left,0),v=d(u.right,0),w=d(u.top,0),b=d(u.bottom,0),x={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==w||0!==b?w+b:d(u.top,u.bottom)):u[m]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==g||0!==v?g+v:d(u.left,u.right)):u[h])};await s({...t,...x});const R=await l.getDimensions(a.floating);return r.floating.width!==R.width||r.floating.height!==R.height?{reset:{rects:!0}}:{}}}},Object.defineProperty(e,"__esModule",{value:!0})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-tooltip",
3
- "version": "5.6.0",
3
+ "version": "5.7.1",
4
4
  "description": "react tooltip component",
5
5
  "scripts": {
6
6
  "dev": "node ./cli.js --env=development && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.dev.js --watch",
package/tsconfig.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "include": ["./global.d.ts", "./src/**/*.ts", "./src/**/*.js", "./src/**/*.tsx"],
3
- "exclude": [],
3
+ "exclude": ["src/test/**/*"],
4
4
  "compilerOptions": {
5
5
  /* Visit https://aka.ms/tsconfig to read more about this file */
6
6
 
@@ -104,6 +104,6 @@
104
104
 
105
105
  /* Completeness */
106
106
  // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
107
- "skipLibCheck": true /* Skip type checking all .d.ts files. */
107
+ "skipLibCheck": false /* Skip type checking all .d.ts files. */
108
108
  }
109
109
  }