"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[99],{72134:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.363.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(70843).Z)("BotMessageSquare",[["path",{d:"M12 6V2H8",key:"1155em"}],["path",{d:"m8 18-4 4V8a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2Z",key:"w2lp3e"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M9 11v2",key:"1ueba0"}],["path",{d:"M15 11v2",key:"i11awn"}],["path",{d:"M20 12h2",key:"1q8mjw"}]])},93276:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.363.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(70843).Z)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},911:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.363.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(70843).Z)("Triangle",[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]])},20703:function(e,t,n){n.d(t,{default:function(){return o.a}});var r=n(67447),o=n.n(r)},81749:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Image",{enumerable:!0,get:function(){return b}});let r=n(86921),o=n(91884),i=n(57437),l=o._(n(2265)),a=r._(n(54887)),u=r._(n(42251)),s=n(38630),d=n(76906),c=n(60337);n(76184);let f=n(46993),p=r._(n(10536)),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0};function m(e,t,n,r,o,i){let l=null==e?void 0:e.src;e&&e["data-loaded-src"]!==l&&(e["data-loaded-src"]=l,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&o(!0),null==n?void 0:n.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,o=!1;n.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>o,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{o=!0,t.stopPropagation()}})}(null==r?void 0:r.current)&&r.current(e)}}))}function h(e){let[t,n]=l.version.split(".",2),r=parseInt(t,10),o=parseInt(n,10);return r>18||18===r&&o>=3?{fetchPriority:e}:{fetchpriority:e}}"undefined"==typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let y=(0,l.forwardRef)((e,t)=>{let{src:n,srcSet:r,sizes:o,height:a,width:u,decoding:s,className:d,style:c,fetchPriority:f,placeholder:p,loading:g,unoptimized:y,fill:v,onLoadRef:b,onLoadingCompleteRef:w,setBlurComplete:x,setShowAltText:_,onLoad:C,onError:E,...P}=e;return(0,i.jsx)("img",{...P,...h(f),loading:g,width:u,height:a,decoding:s,"data-nimg":v?"fill":"1",className:d,style:c,sizes:o,srcSet:r,src:n,ref:(0,l.useCallback)(e=>{t&&("function"==typeof t?t(e):"object"==typeof t&&(t.current=e)),e&&(E&&(e.src=e.src),e.complete&&m(e,p,b,w,x,y))},[n,p,b,w,x,E,y,t]),onLoad:e=>{m(e.currentTarget,p,b,w,x,y)},onError:e=>{_(!0),"empty"!==p&&x(!0),E&&E(e)}})});function v(e){let{isAppRouter:t,imgAttributes:n}=e,r={as:"image",imageSrcSet:n.srcSet,imageSizes:n.sizes,crossOrigin:n.crossOrigin,referrerPolicy:n.referrerPolicy,...h(n.fetchPriority)};return t&&a.default.preload?(a.default.preload(n.src,r),null):(0,i.jsx)(u.default,{children:(0,i.jsx)("link",{rel:"preload",href:n.srcSet?void 0:n.src,...r},"__nimg-"+n.src+n.srcSet+n.sizes)})}let b=(0,l.forwardRef)((e,t)=>{let n=(0,l.useContext)(f.RouterContext),r=(0,l.useContext)(c.ImageConfigContext),o=(0,l.useMemo)(()=>{let e=g||r||d.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),n=e.deviceSizes.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:n}},[r]),{onLoad:a,onLoadingComplete:u}=e,m=(0,l.useRef)(a);(0,l.useEffect)(()=>{m.current=a},[a]);let h=(0,l.useRef)(u);(0,l.useEffect)(()=>{h.current=u},[u]);let[b,w]=(0,l.useState)(!1),[x,_]=(0,l.useState)(!1),{props:C,meta:E}=(0,s.getImgProps)(e,{defaultLoader:p.default,imgConf:o,blurComplete:b,showAltText:x});return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y,{...C,unoptimized:E.unoptimized,placeholder:E.placeholder,fill:E.fill,onLoadRef:m,onLoadingCompleteRef:h,setBlurComplete:w,setShowAltText:_,ref:t}),E.priority?(0,i.jsx)(v,{isAppRouter:!n,imgAttributes:C}):null]})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2595:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return r}});let r=n(86921)._(n(2265)).default.createContext({})},43044:function(e,t){function n(e){let{ampFirst:t=!1,hybrid:n=!1,hasQuery:r=!1}=void 0===e?{}:e;return t||n&&r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return n}})},38630:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImgProps",{enumerable:!0,get:function(){return a}}),n(76184);let r=n(67160),o=n(76906);function i(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function a(e,t){var n;let a,u,s,{src:d,sizes:c,unoptimized:f=!1,priority:p=!1,loading:g,className:m,quality:h,width:y,height:v,fill:b=!1,style:w,onLoad:x,onLoadingComplete:_,placeholder:C="empty",blurDataURL:E,fetchPriority:P,layout:M,objectFit:S,objectPosition:j,lazyBoundary:k,lazyRoot:O,...T}=e,{imgConf:I,showAltText:R,blurComplete:z,defaultLoader:D}=t,A=I||o.imageConfigDefault;if("allSizes"in A)a=A;else{let e=[...A.deviceSizes,...A.imageSizes].sort((e,t)=>e-t),t=A.deviceSizes.sort((e,t)=>e-t);a={...A,allSizes:e,deviceSizes:t}}let L=T.loader||D;delete T.loader,delete T.srcSet;let B="__next_img_default"in L;if(B){if("custom"===a.loader)throw Error('Image with src "'+d+'" is missing "loader" prop.\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader')}else{let e=L;L=t=>{let{config:n,...r}=t;return e(r)}}if(M){"fill"===M&&(b=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[M];e&&(w={...w,...e});let t={responsive:"100vw",fill:"100vw"}[M];t&&!c&&(c=t)}let Z="",V=l(y),F=l(v);if("object"==typeof(n=d)&&(i(n)||void 0!==n.src)){let e=i(d)?d.default:d;if(!e.src)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received "+JSON.stringify(e));if(!e.height||!e.width)throw Error("An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received "+JSON.stringify(e));if(u=e.blurWidth,s=e.blurHeight,E=E||e.blurDataURL,Z=e.src,!b){if(V||F){if(V&&!F){let t=V/e.width;F=Math.round(e.height*t)}else if(!V&&F){let t=F/e.height;V=Math.round(e.width*t)}}else V=e.width,F=e.height}}let H=!p&&("lazy"===g||void 0===g);(!(d="string"==typeof d?d:Z)||d.startsWith("data:")||d.startsWith("blob:"))&&(f=!0,H=!1),a.unoptimized&&(f=!0),B&&d.endsWith(".svg")&&!a.dangerouslyAllowSVG&&(f=!0),p&&(P="high");let N=l(h),U=Object.assign(b?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:S,objectPosition:j}:{},R?{}:{color:"transparent"},w),G=z||"empty"===C?null:"blur"===C?'url("data:image/svg+xml;charset=utf-8,'+(0,r.getImageBlurSvg)({widthInt:V,heightInt:F,blurWidth:u,blurHeight:s,blurDataURL:E||"",objectFit:U.objectFit})+'")':'url("'+C+'")',W=G?{backgroundSize:U.objectFit||"cover",backgroundPosition:U.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:G}:{},Y=function(e){let{config:t,src:n,unoptimized:r,width:o,quality:i,sizes:l,loader:a}=e;if(r)return{src:n,srcSet:void 0,sizes:void 0};let{widths:u,kind:s}=function(e,t,n){let{deviceSizes:r,allSizes:o}=e;if(n){let e=/(^|\s)(1?\d?\d)vw/g,t=[];for(let r;r=e.exec(n);r)t.push(parseInt(r[2]));if(t.length){let e=.01*Math.min(...t);return{widths:o.filter(t=>t>=r[0]*e),kind:"w"}}return{widths:o,kind:"w"}}return"number"!=typeof t?{widths:r,kind:"w"}:{widths:[...new Set([t,2*t].map(e=>o.find(t=>t>=e)||o[o.length-1]))],kind:"x"}}(t,o,l),d=u.length-1;return{sizes:l||"w"!==s?l:"100vw",srcSet:u.map((e,r)=>a({config:t,src:n,quality:i,width:e})+" "+("w"===s?e:r+1)+s).join(", "),src:a({config:t,src:n,quality:i,width:u[d]})}}({config:a,src:d,unoptimized:f,width:V,quality:N,sizes:c,loader:L});return{props:{...T,loading:H?"lazy":g,fetchPriority:P,width:V,height:F,decoding:"async",className:m,style:{...U,...W},sizes:Y.sizes,srcSet:Y.srcSet,src:Y.src},meta:{unoptimized:f,priority:p,placeholder:C,fill:b}}}},42251:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{defaultHead:function(){return c},default:function(){return m}});let r=n(86921),o=n(91884),i=n(57437),l=o._(n(2265)),a=r._(n(27392)),u=n(2595),s=n(27484),d=n(43044);function c(e){void 0===e&&(e=!1);let t=[(0,i.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,i.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function f(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}n(76184);let p=["name","httpEquiv","charSet","itemProp"];function g(e,t){let{inAmpMode:n}=t;return e.reduce(f,[]).reverse().concat(c(n).reverse()).filter(function(){let e=new Set,t=new Set,n=new Set,r={};return o=>{let i=!0,l=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){l=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?i=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?i=!1:t.add(o.type);break;case"meta":for(let e=0,t=p.length;e<t;e++){let t=p[e];if(o.props.hasOwnProperty(t)){if("charSet"===t)n.has(t)?i=!1:n.add(t);else{let e=o.props[t],n=r[t]||new Set;("name"!==t||!l)&&n.has(e)?i=!1:(n.add(e),r[t]=n)}}}}return i}}()).reverse().map((e,t)=>{let r=e.key||t;if(!n&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,l.default.cloneElement(e,t)}return l.default.cloneElement(e,{key:r})})}let m=function(e){let{children:t}=e,n=(0,l.useContext)(u.AmpStateContext),r=(0,l.useContext)(s.HeadManagerContext);return(0,i.jsx)(a.default,{reduceComponentsToState:g,headManager:r,inAmpMode:(0,d.isInAmpMode)(n),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},67160:function(e,t){function n(e){let{widthInt:t,heightInt:n,blurWidth:r,blurHeight:o,blurDataURL:i,objectFit:l}=e,a=r?40*r:t,u=o?40*o:n,s=a&&u?"viewBox='0 0 "+a+" "+u+"'":"";return"%3Csvg xmlns='http://www.w3.org/2000/svg' "+s+"%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='"+(s?"none":"contain"===l?"xMidYMid":"cover"===l?"xMidYMid slice":"none")+"' style='filter: url(%23b);' href='"+i+"'/%3E%3C/svg%3E"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getImageBlurSvg",{enumerable:!0,get:function(){return n}})},60337:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return i}});let r=n(86921)._(n(2265)),o=n(76906),i=r.default.createContext(o.imageConfigDefault)},76906:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{VALID_LOADERS:function(){return n},imageConfigDefault:function(){return r}});let n=["default","imgix","cloudinary","akamai","custom"],r={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},67447:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var n in t)Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}(t,{getImageProps:function(){return a},default:function(){return u}});let r=n(86921),o=n(38630),i=n(81749),l=r._(n(10536)),a=e=>{let{props:t}=(0,o.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0}});for(let[e,n]of Object.entries(t))void 0===n&&delete t[e];return{props:t}},u=i.Image},10536:function(e,t){function n(e){let{config:t,src:n,width:r,quality:o}=e;return t.path+"?url="+encodeURIComponent(n)+"&w="+r+"&q="+(o||75)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}}),n.__next_img_default=!0;let r=n},46993:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return r}});let r=n(86921)._(n(2265)).default.createContext(null)},27392:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let r=n(2265),o="undefined"==typeof window,i=o?()=>{}:r.useLayoutEffect,l=o?()=>{}:r.useEffect;function a(e){let{headManager:t,reduceComponentsToState:n}=e;function a(){if(t&&t.mountedInstances){let o=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(n(o,e))}}if(o){var u;null==t||null==(u=t.mountedInstances)||u.add(e.children),a()}return i(()=>{var n;return null==t||null==(n=t.mountedInstances)||n.add(e.children),()=>{var n;null==t||null==(n=t.mountedInstances)||n.delete(e.children)}}),i(()=>(t&&(t._pendingUpdate=a),()=>{t&&(t._pendingUpdate=a)})),l(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},38152:function(e,t,n){n.d(t,{VY:function(){return B},fC:function(){return A},xz:function(){return L},zt:function(){return D}});var r=n(14749),o=n(2265),i=n(44991),l=n(61266),a=n(84104),u=n(1260),s=n(38687),d=n(25341),c=(n(37881),n(12642)),f=n(29586),p=n(59143),g=n(9310),m=n(11780);let[h,y]=(0,a.b)("Tooltip",[d.D7]),v=(0,d.D7)(),b="tooltip.open",[w,x]=h("TooltipProvider"),_="Tooltip",[C,E]=h(_),P="TooltipTrigger",M=(0,o.forwardRef)((e,t)=>{let{__scopeTooltip:n,...a}=e,u=E(P,n),s=x(P,n),c=v(n),p=(0,o.useRef)(null),g=(0,l.e)(t,p,u.onTriggerChange),m=(0,o.useRef)(!1),h=(0,o.useRef)(!1),y=(0,o.useCallback)(()=>m.current=!1,[]);return(0,o.useEffect)(()=>()=>document.removeEventListener("pointerup",y),[y]),(0,o.createElement)(d.ee,(0,r.Z)({asChild:!0},c),(0,o.createElement)(f.WV.button,(0,r.Z)({"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute},a,{ref:g,onPointerMove:(0,i.M)(e.onPointerMove,e=>{"touch"===e.pointerType||h.current||s.isPointerInTransitRef.current||(u.onTriggerEnter(),h.current=!0)}),onPointerLeave:(0,i.M)(e.onPointerLeave,()=>{u.onTriggerLeave(),h.current=!1}),onPointerDown:(0,i.M)(e.onPointerDown,()=>{m.current=!0,document.addEventListener("pointerup",y,{once:!0})}),onFocus:(0,i.M)(e.onFocus,()=>{m.current||u.onOpen()}),onBlur:(0,i.M)(e.onBlur,u.onClose),onClick:(0,i.M)(e.onClick,u.onClose)})))}),[S,j]=h("TooltipPortal",{forceMount:void 0}),k="TooltipContent",O=(0,o.forwardRef)((e,t)=>{let n=j(k,e.__scopeTooltip),{forceMount:i=n.forceMount,side:l="top",...a}=e,u=E(k,e.__scopeTooltip);return(0,o.createElement)(c.z,{present:i||u.open},u.disableHoverableContent?(0,o.createElement)(z,(0,r.Z)({side:l},a,{ref:t})):(0,o.createElement)(T,(0,r.Z)({side:l},a,{ref:t})))}),T=(0,o.forwardRef)((e,t)=>{let n=E(k,e.__scopeTooltip),i=x(k,e.__scopeTooltip),a=(0,o.useRef)(null),u=(0,l.e)(t,a),[s,d]=(0,o.useState)(null),{trigger:c,onClose:f}=n,p=a.current,{onPointerInTransitChange:g}=i,m=(0,o.useCallback)(()=>{d(null),g(!1)},[g]),h=(0,o.useCallback)((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=function(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw Error("unreachable")}}(r,n.getBoundingClientRect());d(function(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),function(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return(n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y)?t:t.concat(n)}(t)}([...function(e,t,n=5){let r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}(r,o),...function(e){let{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}(t.getBoundingClientRect())])),g(!0)},[g]);return(0,o.useEffect)(()=>()=>m(),[m]),(0,o.useEffect)(()=>{if(c&&p){let e=e=>h(e,p),t=e=>h(e,c);return c.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}},[c,p,h,m]),(0,o.useEffect)(()=>{if(s){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==p?void 0:p.contains(t)),o=!function(e,t){let{x:n,y:r}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let l=t[e].x,a=t[e].y,u=t[i].x,s=t[i].y;a>r!=s>r&&n<(u-l)*(r-a)/(s-a)+l&&(o=!o)}return o}(n,s);r?m():o&&(m(),f())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[c,p,s,f,m]),(0,o.createElement)(z,(0,r.Z)({},e,{ref:u}))}),[I,R]=h(_,{isInside:!1}),z=(0,o.forwardRef)((e,t)=>{let{__scopeTooltip:n,children:i,"aria-label":l,onEscapeKeyDown:a,onPointerDownOutside:s,...c}=e,f=E(k,n),g=v(n),{onClose:h}=f;return(0,o.useEffect)(()=>(document.addEventListener(b,h),()=>document.removeEventListener(b,h)),[h]),(0,o.useEffect)(()=>{if(f.trigger){let e=e=>{let t=e.target;null!=t&&t.contains(f.trigger)&&h()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[f.trigger,h]),(0,o.createElement)(u.XB,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:h},(0,o.createElement)(d.VY,(0,r.Z)({"data-state":f.stateAttribute},g,c,{ref:t,style:{...c.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),(0,o.createElement)(p.A4,null,i),(0,o.createElement)(I,{scope:n,isInside:!0},(0,o.createElement)(m.f,{id:f.contentId,role:"tooltip"},l||i))))}),D=e=>{let{__scopeTooltip:t,delayDuration:n=700,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:l}=e,[a,u]=(0,o.useState)(!0),s=(0,o.useRef)(!1),d=(0,o.useRef)(0);return(0,o.useEffect)(()=>{let e=d.current;return()=>window.clearTimeout(e)},[]),(0,o.createElement)(w,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:(0,o.useCallback)(()=>{window.clearTimeout(d.current),u(!1)},[]),onClose:(0,o.useCallback)(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>u(!0),r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:(0,o.useCallback)(e=>{s.current=e},[]),disableHoverableContent:i},l)},A=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i=!1,onOpenChange:l,disableHoverableContent:a,delayDuration:u}=e,c=x(_,e.__scopeTooltip),f=v(t),[p,m]=(0,o.useState)(null),h=(0,s.M)(),y=(0,o.useRef)(0),w=null!=a?a:c.disableHoverableContent,E=null!=u?u:c.delayDuration,P=(0,o.useRef)(!1),[M=!1,S]=(0,g.T)({prop:r,defaultProp:i,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(b))):c.onClose(),null==l||l(e)}}),j=(0,o.useMemo)(()=>M?P.current?"delayed-open":"instant-open":"closed",[M]),k=(0,o.useCallback)(()=>{window.clearTimeout(y.current),P.current=!1,S(!0)},[S]),O=(0,o.useCallback)(()=>{window.clearTimeout(y.current),S(!1)},[S]),T=(0,o.useCallback)(()=>{window.clearTimeout(y.current),y.current=window.setTimeout(()=>{P.current=!0,S(!0)},E)},[E,S]);return(0,o.useEffect)(()=>()=>window.clearTimeout(y.current),[]),(0,o.createElement)(d.fC,f,(0,o.createElement)(C,{scope:t,contentId:h,open:M,stateAttribute:j,trigger:p,onTriggerChange:m,onTriggerEnter:(0,o.useCallback)(()=>{c.isOpenDelayed?T():k()},[c.isOpenDelayed,T,k]),onTriggerLeave:(0,o.useCallback)(()=>{w?O():window.clearTimeout(y.current)},[O,w]),onOpen:k,onClose:O,disableHoverableContent:w},n))},L=M,B=O}}]);