"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[35829],{35829:(t,e,n)=>{n.d(e,{f:()=>h,A:()=>m});var o=n(14232),r=n(81631),i=n(38993),l=n(24054),a=n(43516),u=n(70975),c=(0,r.A)("div",{target:"e1huxitw1"})("background-color:",function(t){return"dark"===t.theme?"#3d3d3d":"white"},";color:",function(t){return"dark"===t.theme?u.fl.TEXT.TEXT:u.Nu.TEXT.TEXT_STRONG},";box-shadow:0 2px 8px 0 rgba(0, 0, 0, 0.15);text-align:left;border-radius:6px;position:absolute;z-index:9999;left:50%;transform:translate(-50%, 0);white-space:pre-wrap;width:max-content;pointer-events:none;",(0,l.Gg)("p3")," padding:",a.E.SPACING_8," ",a.E.SPACING_12,";bottom:calc(100% + ",a.E.SPACING_12,");opacity:0;max-width:calc(24ch + ",a.E.SPACING_12," * 2);transition:opacity 300ms ease-in-out;transition-delay:0ms;&::after{",function(t){var e,n=t.tooltipAlignment,o="dark"===t.theme?"#3d3d3d":"white";return e="below"===n?(0,i.AH)("top:0;left:50%;margin-left:0;border-bottom-color:",o,";transform:translateX(-50%) translateY(-100%);",""):(0,i.AH)("top:100%;left:50%;margin-left:-5px;border-top-color:",o,";",""),(0,i.AH)('content:"";position:absolute;border:5px transparent solid;',e,";","")},";}",function(t){return"below"===t.tooltipAlignment?(0,i.AH)("top:100%;bottom:auto;left:50%;transform:translateY(-",a.E.SPACING_8,") translateX(-50%);",""):(0,i.AH)("bottom:100%;top:auto;transform:translateY(-",a.E.SPACING_8,") translateX(-50%);","")},";"),s=(0,r.A)("div",{target:"e1huxitw0"})("display:inline-block;position:relative;&:hover ",c,",&:focus-within ",c,"{opacity:",function(t){return t.isTooltipVisible?"1":"0"},";transition-delay:",function(t){return"description"===t.role?"500ms":"300ms"},";}"),d=(0,o.createContext)(null);let f=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"above",r=(0,o.useState)(n),i=r[0],l=r[1],a=function(){if(t.current&&e.current){var o=t.current.getBoundingClientRect(),r=e.current.offsetHeight;o.top-r<0?l("below"):l(n)}};return(0,o.useEffect)(function(){return window.addEventListener("scroll",a),function(){window.removeEventListener("scroll",a)}},[t,e,n]),i};var p=n(18153);function m(t){var e=t.children,n=t.tooltipId,r=t.role,i=t.alignment,l=t.hideOnClick,a=void 0!==l&&l,u=t.theme,c=(0,o.useState)(!0),m=c[0],h=c[1],v=(0,o.useRef)(null),b=(0,o.useRef)(null),g=f(b,v,void 0===i?"above":i);return(0,o.useEffect)(function(){var t=function(t){var e,n;"Escape"===t.key&&null!=(e=b.current)&&e.contains(document.activeElement)&&h(!1),a&&"Space"===t.code&&null!=(n=b.current)&&n.contains(document.activeElement)&&h(!1)};return document.addEventListener("keydown",t),function(){document.removeEventListener("keydown",t)}},[]),(0,p.Y)(d.Provider,{value:{triggerRef:b,messageRef:v,tooltipId:n,tooltipAlignment:g,role:void 0===r?"label":r,theme:void 0===u?"light":u},children:(0,p.Y)(s,{isTooltipVisible:m,ref:b,"aria-describedby":n,onMouseEnter:function(){return h(!0)},onBlur:function(){return h(!0)},onClick:function(){a&&h(!1)},children:e})})}function h(t){var e=t.children,n=function(){var t=(0,o.useContext)(d);if(!t)throw Error("TooltipMessage must be used within a Tooltip component");return t}(),r=n.messageRef,i=n.tooltipId,l=n.tooltipAlignment,a=n.role,u=n.theme;return(0,p.Y)(c,{ref:r,role:a,id:i,tooltipAlignment:l,theme:u,children:e})}}}]);