"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5305],{89416:function(e,t,n){n.d(t,{U0:function(){return l},zf:function(){return a}});var r=n(51211),o=n(7653),i=(0,o.createContext)({client:r.ZP});function a(e){var t=e.children,n=e.client,a=e.apiKey,l=e.options,u=(0,o.useState)(!1),s=u[0],c=u[1],d=(0,o.useMemo)(function(){return n?(a&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),l&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),n.__loaded&&console.warn("[PostHog.js] `client` was already loaded elsewhere. This may cause issues."),n):(a?(!1!==s?(a!==s.previousAPIKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),l&&!function e(t,n,r){if(void 0===r&&(r=new WeakMap),t===n)return!0;if("object"!=typeof t||null===t||"object"!=typeof n||null===n)return!1;if(r.has(t)&&r.get(t)===n)return!0;r.set(t,n);var o=Object.keys(t),i=Object.keys(n);if(o.length!==i.length)return!1;for(var a=0;a<o.length;a++){var l=o[a];if(!i.includes(l)||!e(t[l],n[l],r))return!1}return!0}(l,s.previousOptions)&&r.ZP.set_config(l)):(r.ZP.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),r.ZP.init(a,l)),c({previousAPIKey:a,previousOptions:null!=l?l:{}})):console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),r.ZP)},[n,a,JSON.stringify(l)]);return o.createElement(i.Provider,{value:{client:d}},t)}var l=function(){return(0,o.useContext)(i).client}},43406:function(e,t,n){let r;n.d(t,{Arrow:function(){return e9},Close:function(){return e4},Content:function(){return e8},Portal:function(){return e7},Root:function(){return e2},Trigger:function(){return e3}});var o,i=n(7653),a=n.t(i,2);function l(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function u(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}function s(...e){return i.useCallback(u(...e),e)}var c=n(27573);function d(e,t=[]){let n=[],r=()=>{let t=n.map(e=>i.createContext(e));return function(n){let r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=i.createContext(r),a=n.length;function l(t){let{scope:n,children:r,...l}=t,u=n?.[e][a]||o,s=i.useMemo(()=>l,Object.values(l));return(0,c.jsx)(u.Provider,{value:s,children:r})}return n=[...n,r],l.displayName=t+"Provider",[l,function(n,l){let u=l?.[e][a]||o,s=i.useContext(u);if(s)return s;if(void 0!==r)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}]},function(...e){let t=e[0];if(1===e.length)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}(r,...t)]}var f=n(3458),p=i.forwardRef((e,t)=>{let{children:n,...r}=e,o=i.Children.toArray(n),a=o.find(m);if(a){let e=a.props.children,n=o.map(t=>t!==a?t:i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null);return(0,c.jsx)(v,{...r,ref:t,children:i.isValidElement(e)?i.cloneElement(e,void 0,n):null})}return(0,c.jsx)(v,{...r,ref:t,children:n})});p.displayName="Slot";var v=i.forwardRef((e,t)=>{let{children:n,...r}=e;if(i.isValidElement(n)){let e,o;let a=(e=Object.getOwnPropertyDescriptor(n.props,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.ref:(e=Object.getOwnPropertyDescriptor(n,"ref")?.get)&&"isReactWarning"in e&&e.isReactWarning?n.props.ref:n.props.ref||n.ref;return i.cloneElement(n,{...function(e,t){let n={...t};for(let r in t){let o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:t?u(t,a):a})}return i.Children.count(n)>1?i.Children.only(null):null});v.displayName="SlotClone";var h=({children:e})=>(0,c.jsx)(c.Fragment,{children:e});function m(e){return i.isValidElement(e)&&e.type===h}var g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=i.forwardRef((e,n)=>{let{asChild:r,...o}=e,i=r?p:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,c.jsx)(i,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function y(e){let t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var b="dismissableLayer.update",w=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),E=i.forwardRef((e,t)=>{var n,r;let{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:v,...h}=e,m=i.useContext(w),[E,C]=i.useState(null),N=null!==(r=null==E?void 0:E.ownerDocument)&&void 0!==r?r:null===(n=globalThis)||void 0===n?void 0:n.document,[,R]=i.useState({}),O=s(t,e=>C(e)),S=Array.from(m.layers),[j]=[...m.layersWithOutsidePointerEventsDisabled].slice(-1),A=S.indexOf(j),T=E?S.indexOf(E):-1,L=m.layersWithOutsidePointerEventsDisabled.size>0,k=T>=A,D=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=y(e),o=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{let e=e=>{if(e.target&&!o.current){let t=function(){P("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",a.current),a.current=t,n.addEventListener("click",a.current,{once:!0})):t()}else n.removeEventListener("click",a.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",a.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{let t=e.target,n=[...m.branches].some(e=>e.contains(t));!k||n||(null==d||d(e),null==p||p(e),e.defaultPrevented||null==v||v())},N),M=function(e){var t;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===(t=globalThis)||void 0===t?void 0:t.document,r=y(e),o=i.useRef(!1);return i.useEffect(()=>{let e=e=>{e.target&&!o.current&&P("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{let t=e.target;[...m.branches].some(e=>e.contains(t))||(null==f||f(e),null==p||p(e),e.defaultPrevented||null==v||v())},N);return!function(e,t=globalThis?.document){let n=y(e);i.useEffect(()=>{let e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{T!==m.layers.size-1||(null==u||u(e),!e.defaultPrevented&&v&&(e.preventDefault(),v()))},N),i.useEffect(()=>{if(E)return a&&(0===m.layersWithOutsidePointerEventsDisabled.size&&(o=N.body.style.pointerEvents,N.body.style.pointerEvents="none"),m.layersWithOutsidePointerEventsDisabled.add(E)),m.layers.add(E),x(),()=>{a&&1===m.layersWithOutsidePointerEventsDisabled.size&&(N.body.style.pointerEvents=o)}},[E,N,a,m]),i.useEffect(()=>()=>{E&&(m.layers.delete(E),m.layersWithOutsidePointerEventsDisabled.delete(E),x())},[E,m]),i.useEffect(()=>{let e=()=>R({});return document.addEventListener(b,e),()=>document.removeEventListener(b,e)},[]),(0,c.jsx)(g.div,{...h,ref:O,style:{pointerEvents:L?k?"auto":"none":void 0,...e.style},onFocusCapture:l(e.onFocusCapture,M.onFocusCapture),onBlurCapture:l(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:l(e.onPointerDownCapture,D.onPointerDownCapture)})});function x(){let e=new CustomEvent(b);document.dispatchEvent(e)}function P(e,t,n,r){let{discrete:o}=r,i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&i.addEventListener(e,t,{once:!0}),o)?i&&f.flushSync(()=>i.dispatchEvent(a)):i.dispatchEvent(a)}E.displayName="DismissableLayer",i.forwardRef((e,t)=>{let n=i.useContext(w),r=i.useRef(null),o=s(t,r);return i.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,c.jsx)(g.div,{...e,ref:o})}).displayName="DismissableLayerBranch";var C=0;function N(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}var R="focusScope.autoFocusOnMount",O="focusScope.autoFocusOnUnmount",S={bubbles:!1,cancelable:!0},j=i.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...l}=e,[u,d]=i.useState(null),f=y(o),p=y(a),v=i.useRef(null),h=s(t,e=>d(e)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let e=function(e){if(m.paused||!u)return;let t=e.target;u.contains(t)?v.current=t:L(v.current,{select:!0})},t=function(e){if(m.paused||!u)return;let t=e.relatedTarget;null===t||u.contains(t)||L(v.current,{select:!0})};document.addEventListener("focusin",e),document.addEventListener("focusout",t);let n=new MutationObserver(function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&L(u)});return u&&n.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,u,m.paused]),i.useEffect(()=>{if(u){k.add(m);let e=document.activeElement;if(!u.contains(e)){let t=new CustomEvent(R,S);u.addEventListener(R,f),u.dispatchEvent(t),t.defaultPrevented||(function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=document.activeElement;for(let r of e)if(L(r,{select:t}),document.activeElement!==n)return}(A(u).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&L(u))}return()=>{u.removeEventListener(R,f),setTimeout(()=>{let t=new CustomEvent(O,S);u.addEventListener(O,p),u.dispatchEvent(t),t.defaultPrevented||L(null!=e?e:document.body,{select:!0}),u.removeEventListener(O,p),k.remove(m)},0)}}},[u,f,p,m]);let b=i.useCallback(e=>{if(!n&&!r||m.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,i]=function(e){let t=A(e);return[T(t,e),T(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&L(i,{select:!0})):(e.preventDefault(),n&&L(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,m.paused]);return(0,c.jsx)(g.div,{tabIndex:-1,...l,ref:h,onKeyDown:b})});function A(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function T(e,t){for(let n of e)if(!function(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e&&(void 0===n||e!==n);){if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}(n,{upTo:t}))return n}function L(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){var n;let r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&(n=e)instanceof HTMLInputElement&&"select"in n&&t&&e.select()}}j.displayName="FocusScope";var k=(r=[],{add(e){let t=r[0];e!==t&&(null==t||t.pause()),(r=D(r,e)).unshift(e)},remove(e){var t;null===(t=(r=D(r,e))[0])||void 0===t||t.resume()}});function D(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}var M=globalThis?.document?i.useLayoutEffect:()=>{},I=a["useId".toString()]||(()=>void 0),F=0,_=n(24019),W=n(87197),H=n(45778),K=i.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,c.jsx)(g.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,c.jsx)("polygon",{points:"0,0 30,0 15,10"})})});K.displayName="Arrow";var z="Popper",[B,U]=d(z),[Y,Z]=B(z),X=e=>{let{__scopePopper:t,children:n}=e,[r,o]=i.useState(null);return(0,c.jsx)(Y,{scope:t,anchor:r,onAnchorChange:o,children:n})};X.displayName=z;var $="PopperAnchor",V=i.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...o}=e,a=Z($,n),l=i.useRef(null),u=s(t,l);return i.useEffect(()=>{a.onAnchorChange((null==r?void 0:r.current)||l.current)}),r?null:(0,c.jsx)(g.div,{...o,ref:u})});V.displayName=$;var q="PopperContent",[J,G]=B(q),Q=i.forwardRef((e,t)=>{var n,r,o,a,l,u,d,f;let{__scopePopper:p,side:v="bottom",sideOffset:h=0,align:m="center",alignOffset:b=0,arrowPadding:w=0,avoidCollisions:E=!0,collisionBoundary:x=[],collisionPadding:P=0,sticky:C="partial",hideWhenDetached:N=!1,updatePositionStrategy:R="optimized",onPlaced:O,...S}=e,j=Z(q,p),[A,T]=i.useState(null),L=s(t,e=>T(e)),[k,D]=i.useState(null),I=function(e){let[t,n]=i.useState(void 0);return M(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,o;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,o=t.blockSize}else r=e.offsetWidth,o=e.offsetHeight;n({width:r,height:o})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(k),F=null!==(d=null==I?void 0:I.width)&&void 0!==d?d:0,K=null!==(f=null==I?void 0:I.height)&&void 0!==f?f:0,z="number"==typeof P?P:{top:0,right:0,bottom:0,left:0,...P},B=Array.isArray(x)?x:[x],U=B.length>0,Y={padding:z,boundary:B.filter(er),altBoundary:U},{refs:X,floatingStyles:$,placement:V,isPositioned:G,middlewareData:Q}=(0,_.YF)({strategy:"fixed",placement:v+("center"!==m?"-"+m:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,W.Me)(...t,{animationFrame:"always"===R})},elements:{reference:j.anchor},middleware:[(0,H.cv)({mainAxis:h+K,alignmentAxis:b}),E&&(0,W.uY)({mainAxis:!0,crossAxis:!1,limiter:"partial"===C?(0,W.dr)():void 0,...Y}),E&&(0,W.RR)({...Y}),(0,W.dp)({...Y,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:a}=n.reference,l=t.floating.style;l.setProperty("--radix-popper-available-width","".concat(r,"px")),l.setProperty("--radix-popper-available-height","".concat(o,"px")),l.setProperty("--radix-popper-anchor-width","".concat(i,"px")),l.setProperty("--radix-popper-anchor-height","".concat(a,"px"))}}),k&&(0,_.x7)({element:k,padding:w}),eo({arrowWidth:F,arrowHeight:K}),N&&(0,W.Cp)({strategy:"referenceHidden",...Y})]}),[ee,et]=ei(V),en=y(O);M(()=>{G&&(null==en||en())},[G,en]);let ea=null===(n=Q.arrow)||void 0===n?void 0:n.x,el=null===(r=Q.arrow)||void 0===r?void 0:r.y,eu=(null===(o=Q.arrow)||void 0===o?void 0:o.centerOffset)!==0,[es,ec]=i.useState();return M(()=>{A&&ec(window.getComputedStyle(A).zIndex)},[A]),(0,c.jsx)("div",{ref:X.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:G?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:es,"--radix-popper-transform-origin":[null===(a=Q.transformOrigin)||void 0===a?void 0:a.x,null===(l=Q.transformOrigin)||void 0===l?void 0:l.y].join(" "),...(null===(u=Q.hide)||void 0===u?void 0:u.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,c.jsx)(J,{scope:p,placedSide:ee,onArrowChange:D,arrowX:ea,arrowY:el,shouldHideArrow:eu,children:(0,c.jsx)(g.div,{"data-side":ee,"data-align":et,...S,ref:L,style:{...S.style,animation:G?void 0:"none"}})})})});Q.displayName=q;var ee="PopperArrow",et={top:"bottom",right:"left",bottom:"top",left:"right"},en=i.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=G(ee,n),i=et[o.placedSide];return(0,c.jsx)("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:(0,c.jsx)(K,{...r,ref:t,style:{...r.style,display:"block"}})})});function er(e){return null!==e}en.displayName=ee;var eo=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;let{placement:l,rects:u,middlewareData:s}=t,c=(null===(n=s.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,v]=ei(l),h={start:"0%",center:"50%",end:"100%"}[v],m=(null!==(i=null===(r=s.arrow)||void 0===r?void 0:r.x)&&void 0!==i?i:0)+d/2,g=(null!==(a=null===(o=s.arrow)||void 0===o?void 0:o.y)&&void 0!==a?a:0)+f/2,y="",b="";return"bottom"===p?(y=c?h:"".concat(m,"px"),b="".concat(-f,"px")):"top"===p?(y=c?h:"".concat(m,"px"),b="".concat(u.floating.height+f,"px")):"right"===p?(y="".concat(-f,"px"),b=c?h:"".concat(g,"px")):"left"===p&&(y="".concat(u.floating.width+f,"px"),b=c?h:"".concat(g,"px")),{data:{x:y,y:b}}}});function ei(e){let[t,n="center"]=e.split("-");return[t,n]}var ea=i.forwardRef((e,t)=>{var n,r;let{container:o,...a}=e,[l,u]=i.useState(!1);M(()=>u(!0),[]);let s=o||l&&(null===(r=globalThis)||void 0===r?void 0:null===(n=r.document)||void 0===n?void 0:n.body);return s?f.createPortal((0,c.jsx)(g.div,{...a,ref:t}),s):null});ea.displayName="Portal";var el=e=>{var t,n;let r,o;let{present:a,children:l}=e,u=function(e){var t,n;let[r,o]=i.useState(),a=i.useRef({}),l=i.useRef(e),u=i.useRef("none"),[s,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},i.useReducer((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return i.useEffect(()=>{let e=eu(a.current);u.current="mounted"===s?e:"none"},[s]),M(()=>{let t=a.current,n=l.current;if(n!==e){let r=u.current,o=eu(t);e?c("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?c("UNMOUNT"):n&&r!==o?c("ANIMATION_OUT"):c("UNMOUNT"),l.current=e}},[e,c]),M(()=>{if(r){let e=e=>{let t=eu(a.current).includes(e.animationName);e.target===r&&t&&f.flushSync(()=>c("ANIMATION_END"))},t=e=>{e.target===r&&(u.current=eu(a.current))};return r.addEventListener("animationstart",t),r.addEventListener("animationcancel",e),r.addEventListener("animationend",e),()=>{r.removeEventListener("animationstart",t),r.removeEventListener("animationcancel",e),r.removeEventListener("animationend",e)}}c("ANIMATION_END")},[r,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(e=>{e&&(a.current=getComputedStyle(e)),o(e)},[])}}(a),c="function"==typeof l?l({present:u.isPresent}):i.Children.only(l),d=s(u.ref,(r=null===(t=Object.getOwnPropertyDescriptor(c.props,"ref"))||void 0===t?void 0:t.get)&&"isReactWarning"in r&&r.isReactWarning?c.ref:(r=null===(n=Object.getOwnPropertyDescriptor(c,"ref"))||void 0===n?void 0:n.get)&&"isReactWarning"in r&&r.isReactWarning?c.props.ref:c.props.ref||c.ref);return"function"==typeof l||u.isPresent?i.cloneElement(c,{ref:d}):null};function eu(e){return(null==e?void 0:e.animationName)||"none"}el.displayName="Presence";var es=n(27130),ec=function(){return(ec=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},ed=n(14718),ef=n(64296),ep=(0,n(98788)._)(),ev=function(){},eh=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:ev,onWheelCapture:ev,onTouchMoveCapture:ev}),o=r[0],a=r[1],l=e.forwardProps,u=e.children,s=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,v=e.noIsolation,h=e.inert,m=e.allowPinchZoom,g=e.as,y=e.gapMode,b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=(0,ef.q)([n,t]),E=ec(ec({},b),o);return i.createElement(i.Fragment,null,d&&i.createElement(p,{sideCar:ep,removeScrollBar:c,shards:f,noIsolation:v,inert:h,setCallbacks:a,allowPinchZoom:!!m,lockRef:n,gapMode:y}),l?i.cloneElement(i.Children.only(u),ec(ec({},E),{ref:w})):i.createElement(void 0===g?"div":g,ec({},E,{className:s,ref:w}),u))});eh.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},eh.classNames={fullWidth:ed.zi,zeroRight:ed.pF};var em=n(69806),eg=n(13935),ey=n(50304),eb=!1;if("undefined"!=typeof window)try{var ew=Object.defineProperty({},"passive",{get:function(){return eb=!0,!0}});window.addEventListener("test",ew,ew),window.removeEventListener("test",ew,ew)}catch(e){eb=!1}var eE=!!eb&&{passive:!1},ex=function(e,t){var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},eP=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),eC(e,r)){var o=eN(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},eC=function(e,t){return"v"===e?ex(t,"overflowY"):ex(t,"overflowX")},eN=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},eR=function(e,t,n,r,o){var i,a=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),l=a*r,u=n.target,s=t.contains(u),c=!1,d=l>0,f=0,p=0;do{var v=eN(e,u),h=v[0],m=v[1]-v[2]-a*h;(h||m)&&eC(e,u)&&(f+=m,p+=h),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!s&&u!==document.body||s&&(t.contains(u)||t===u));return d&&(o&&1>Math.abs(f)||!o&&l>f)?c=!0:!d&&(o&&1>Math.abs(p)||!o&&-l>p)&&(c=!0),c},eO=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},eS=function(e){return[e.deltaX,e.deltaY]},ej=function(e){return e&&"current"in e?e.current:e},eA=0,eT=[],eL=(0,em.L)(ep,function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(eA++)[0],a=i.useState(ey.Ws)[0],l=i.useRef(e);i.useEffect(function(){l.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(function(e,t,n){if(n||2==arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))})([e.lockRef.current],(e.shards||[]).map(ej),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var u=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!l.current.allowPinchZoom;var o,i=eO(e),a=n.current,u="deltaX"in e?e.deltaX:a[0]-i[0],s="deltaY"in e?e.deltaY:a[1]-i[1],c=e.target,d=Math.abs(u)>Math.abs(s)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=eP(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=eP(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||s)&&(r.current=o),!o)return!0;var p=r.current||o;return eR(p,t,e,"h"===p?u:s,!0)},[]),s=i.useCallback(function(e){if(eT.length&&eT[eT.length-1]===a){var n="deltaY"in e?eS(e):eO(e),r=t.current.filter(function(t){var r;return t.name===e.type&&(t.target===e.target||e.target===t.shadowParent)&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.cancelable&&e.preventDefault();return}if(!r){var o=(l.current.shards||[]).map(ej).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?u(e,o[0]):!l.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),c=i.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:function(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=i.useCallback(function(e){n.current=eO(e),r.current=void 0},[]),f=i.useCallback(function(t){c(t.type,eS(t),t.target,u(t,e.lockRef.current))},[]),p=i.useCallback(function(t){c(t.type,eO(t),t.target,u(t,e.lockRef.current))},[]);i.useEffect(function(){return eT.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",s,eE),document.addEventListener("touchmove",s,eE),document.addEventListener("touchstart",d,eE),function(){eT=eT.filter(function(e){return e!==a}),document.removeEventListener("wheel",s,eE),document.removeEventListener("touchmove",s,eE),document.removeEventListener("touchstart",d,eE)}},[]);var v=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(a,{styles:"\n  .block-interactivity-".concat(o," {pointer-events: none;}\n  .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,v?i.createElement(eg.jp,{gapMode:e.gapMode}):null)}),ek=i.forwardRef(function(e,t){return i.createElement(eh,ec({},e,{ref:t,sideCar:eL}))});ek.classNames=eh.classNames;var eD="Popover",[eM,eI]=d(eD,[U]),eF=U(),[e_,eW]=eM(eD),eH=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:l=!1}=e,u=eF(t),s=i.useRef(null),[d,f]=i.useState(!1),[p=!1,v]=function({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,o]=function({defaultProp:e,onChange:t}){let n=i.useState(e),[r]=n,o=i.useRef(r),a=y(t);return i.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}({defaultProp:t,onChange:n}),a=void 0!==e,l=a?e:r,u=y(n);return[l,i.useCallback(t=>{if(a){let n="function"==typeof t?t(e):t;n!==e&&u(n)}else o(t)},[a,e,o,u])]}({prop:r,defaultProp:o,onChange:a});return(0,c.jsx)(X,{...u,children:(0,c.jsx)(e_,{scope:t,contentId:function(e){let[t,n]=i.useState(I());return M(()=>{n(e=>e??String(F++))},[void 0]),t?`radix-${t}`:""}(),triggerRef:s,open:p,onOpenChange:v,onOpenToggle:i.useCallback(()=>v(e=>!e),[v]),hasCustomAnchor:d,onCustomAnchorAdd:i.useCallback(()=>f(!0),[]),onCustomAnchorRemove:i.useCallback(()=>f(!1),[]),modal:l,children:n})})};eH.displayName=eD;var eK="PopoverAnchor";i.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=eW(eK,n),a=eF(n),{onCustomAnchorAdd:l,onCustomAnchorRemove:u}=o;return i.useEffect(()=>(l(),()=>u()),[l,u]),(0,c.jsx)(V,{...a,...r,ref:t})}).displayName=eK;var ez="PopoverTrigger",eB=i.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=eW(ez,n),i=eF(n),a=s(t,o.triggerRef),u=(0,c.jsx)(g.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":e5(o.open),...r,ref:a,onClick:l(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?u:(0,c.jsx)(V,{asChild:!0,...i,children:u})});eB.displayName=ez;var eU="PopoverPortal",[eY,eZ]=eM(eU,{forceMount:void 0}),eX=e=>{let{__scopePopover:t,forceMount:n,children:r,container:o}=e,i=eW(eU,t);return(0,c.jsx)(eY,{scope:t,forceMount:n,children:(0,c.jsx)(el,{present:n||i.open,children:(0,c.jsx)(ea,{asChild:!0,container:o,children:r})})})};eX.displayName=eU;var e$="PopoverContent",eV=i.forwardRef((e,t)=>{let n=eZ(e$,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,i=eW(e$,e.__scopePopover);return(0,c.jsx)(el,{present:r||i.open,children:i.modal?(0,c.jsx)(eq,{...o,ref:t}):(0,c.jsx)(eJ,{...o,ref:t})})});eV.displayName=e$;var eq=i.forwardRef((e,t)=>{let n=eW(e$,e.__scopePopover),r=i.useRef(null),o=s(t,r),a=i.useRef(!1);return i.useEffect(()=>{let e=r.current;if(e)return(0,es.Ry)(e)},[]),(0,c.jsx)(ek,{as:p,allowPinchZoom:!0,children:(0,c.jsx)(eG,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:l(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),a.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:l(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:l(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})}),eJ=i.forwardRef((e,t)=>{let n=eW(e$,e.__scopePopover),r=i.useRef(!1),o=i.useRef(!1);return(0,c.jsx)(eG,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,a;null===(i=e.onCloseAutoFocus)||void 0===i||i.call(e,t),t.defaultPrevented||(r.current||null===(a=n.triggerRef.current)||void 0===a||a.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var i,a;null===(i=e.onInteractOutside)||void 0===i||i.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"!==t.detail.originalEvent.type||(o.current=!0));let l=t.target;(null===(a=n.triggerRef.current)||void 0===a?void 0:a.contains(l))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})}),eG=i.forwardRef((e,t)=>{let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:l,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:d,onInteractOutside:f,...p}=e,v=eW(e$,n),h=eF(n);return i.useEffect(()=>{var e,t;let n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:N()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:N()),C++,()=>{1===C&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),C--}},[]),(0,c.jsx)(j,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:(0,c.jsx)(E,{asChild:!0,disableOutsidePointerEvents:l,onInteractOutside:f,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:d,onDismiss:()=>v.onOpenChange(!1),children:(0,c.jsx)(Q,{"data-state":e5(v.open),role:"dialog",id:v.contentId,...h,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),eQ="PopoverClose",e0=i.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=eW(eQ,n);return(0,c.jsx)(g.button,{type:"button",...r,ref:t,onClick:l(e.onClick,()=>o.onOpenChange(!1))})});e0.displayName=eQ;var e1=i.forwardRef((e,t)=>{let{__scopePopover:n,...r}=e,o=eF(n);return(0,c.jsx)(en,{...o,...r,ref:t})});function e5(e){return e?"open":"closed"}e1.displayName="PopoverArrow";var e2=eH,e3=eB,e7=eX,e8=eV,e4=e0,e9=e1}}]);