;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="223fdb72-2ff9-3474-bde1-07469ee9866d")}catch(e){}}(); (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,718801,e=>{"use strict";let t;var n=e.i(472361);let r=["top","right","bottom","left"],i=Math.min,o=Math.max,l=Math.round,a=Math.floor,f=e=>({x:e,y:e}),s={left:"right",right:"left",bottom:"top",top:"bottom"};function c(e,t){return"function"==typeof e?e(t):e}function u(e){return e.split("-")[0]}function d(e){return e.split("-")[1]}function p(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}function m(e){let t=e[0];return"t"===t||"b"===t?"y":"x"}function g(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}let y=["left","right"],w=["right","left"],x=["top","bottom"],v=["bottom","top"];function b(e){let t=u(e);return s[t]+e.slice(t.length)}function R(e){var t,n,r,i;return"number"!=typeof e?{top:null!=(t=e.top)?t:0,right:null!=(n=e.right)?n:0,bottom:null!=(r=e.bottom)?r:0,left:null!=(i=e.left)?i:0}:{top:e,right:e,bottom:e,left:e}}function A(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function C(e,t,n){let r,{reference:i,floating:o}=e,l=m(t),a=p(m(t)),f=h(a),s=u(t),c=i.x+i.width/2-o.width/2,g=i.y+i.height/2-o.height/2,y=i[f]/2-o[f]/2;switch(s){case"top":r={x:c,y:i.y-o.height};break;case"bottom":r={x:c,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:g};break;case"left":r={x:i.x-o.width,y:g};break;default:r={x:i.x,y:i.y}}let w=d(t);return w&&(r[a]+=y*("end"===w?1:-1)*(n&&"y"===l?-1:1)),r}async function L(e,t){var n;void 0===t&&(t={});let{x:r,y:i,platform:o,rects:l,elements:a,strategy:f}=e,{boundary:s="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:p=!1,padding:h=0}=c(t,e),m=R(h),g=a[p?"floating"===d?"reference":"floating":d],y=A(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:s,rootBoundary:u,strategy:f})),w="floating"===d?{x:r,y:i,width:l.floating.width,height:l.floating.height}:l.reference,x=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),v=await (null==o.isElement?void 0:o.isElement(x))&&await (null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},b=A(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:f}):w);return{top:(y.top-b.top+m.top)/v.y,bottom:(b.bottom-y.bottom+m.bottom)/v.y,left:(y.left-b.left+m.left)/v.x,right:(b.right-y.right+m.right)/v.x}}let S=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:l}=n,a=l.detectOverflow?l:{...l,detectOverflow:L},f=await (null==l.isRTL?void 0:l.isRTL(t)),s=await l.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:u}=C(s,r,f),d=r,p=0,h={};for(let n=0;ne[t]>=0)}let T=new Set(["left","top"]);async function E(e,t){let{placement:n,platform:r,elements:i}=e,o=await (null==r.isRTL?void 0:r.isRTL(i.floating)),l=u(n),a=d(n),f="y"===m(n),s=T.has(l)?-1:1,p=o&&f?-1:1,h=c(t,e),{mainAxis:g,crossAxis:y,alignmentAxis:w}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof w&&(y="end"===a?-1*w:w),f?{x:y*p,y:g*s}:{x:g*s,y:y*p}}function H(){return"u">typeof window}function k(e){return $(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function F(e){var t;return null==(t=($(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function $(e){return!!H()&&(e instanceof Node||e instanceof D(e).Node)}function j(e){return!!H()&&(e instanceof Element||e instanceof D(e).Element)}function M(e){return!!H()&&(e instanceof HTMLElement||e instanceof D(e).HTMLElement)}function W(e){return!(!H()||"u"!!e&&"none"!==e;function I(e){let t=j(e)?q(e):e;return _(t.transform)||_(t.translate)||_(t.scale)||_(t.rotate)||_(t.perspective)||!Y()&&(_(t.backdropFilter)||_(t.filter))||B.test(t.willChange||"")||N.test(t.contain||"")}function Y(){return null==t&&(t="u">typeof CSS&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),t}function X(e){return/^(html|body|#document)$/.test(k(e))}function q(e){return D(e).getComputedStyle(e)}function K(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function U(e){if("html"===k(e))return e;let t=e.assignedSlot||e.parentNode||W(e)&&e.host||F(e);return W(t)?t.host:t}function G(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=U(t);return X(n)?(t.ownerDocument||t).body:M(n)&&V(n)?n:e(n)}(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),l=D(i);if(!o)return t.concat(i,G(i,[],n));{let e=J(l);return t.concat(l,l.visualViewport||[],V(i)?i:[],e&&n?G(e):[])}}function J(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Q(e){let t=q(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=M(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,f=l(n)!==o||l(r)!==a;return f&&(n=o,r=a),{width:n,height:r,$:f}}function Z(e){return j(e)?e:e.contextElement}function ee(e){let t=Z(e);if(!M(t))return f(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:o}=Q(t),a=(o?l(n.width):n.width)/r,s=(o?l(n.height):n.height)/i;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let et=f(0);function en(e){let t=D(e);return Y()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:et}function er(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let o=e.getBoundingClientRect(),l=Z(e),a=f(1);t&&(r?j(r)&&(a=ee(r)):a=ee(e));let s=(void 0===(i=n)&&(i=!1),r&&i&&r===D(l))?en(l):f(0),c=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,d=o.width/a.x,p=o.height/a.y;if(l&&r){let e=D(l),t=j(r)?D(r):r,n=e,i=J(n);for(;i&&t!==n;){let e=ee(i),t=i.getBoundingClientRect(),r=q(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,p*=e.y,c+=o,u+=l,i=J(n=D(i))}}return A({width:d,height:p,x:c,y:u})}function ei(e,t){let n=K(e).scrollLeft;return t?t.left+n:er(F(e)).left+n}function eo(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-ei(e,n),y:n.top+t.scrollTop}}function el(e,t,n){var r;let i;if("viewport"===t||"layoutViewport"===t)i=function(e,t,n){void 0===n&&(n="viewport");let r="layoutViewport"===n,i=D(e),o=F(e),l=i.visualViewport,a=o.clientWidth,f=o.clientHeight,s=0,c=0;if(l){let e=!Y()||"fixed"===t;r?e||(s=-l.offsetLeft,c=-l.offsetTop):(a=l.width,f=l.height,e&&(s=l.offsetLeft,c=l.offsetTop))}if(0>=ei(o)){let e=o.ownerDocument,t=e.body,n=getComputedStyle(t),r="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(o.clientWidth-t.clientWidth-r),l="stable both-edges"===getComputedStyle(o).scrollbarGutter?i/2:i;l<=25&&(a-=l)}return{width:a,height:f,x:s,y:c}}(e,n,t);else if("document"===t){let t,n,l,a,f,s;t=K(r=F(e)),n=r.ownerDocument.body,l=o(r.scrollWidth,r.clientWidth,n.scrollWidth,n.clientWidth),a=o(r.scrollHeight,r.clientHeight,n.scrollHeight,n.clientHeight),f=-t.scrollLeft+ei(r),s=-t.scrollTop,"rtl"===q(n).direction&&(f+=o(r.clientWidth,n.clientWidth)-l),i={width:l,height:a,x:f,y:s}}else if(j(t)){let e,r,o,l,a,f;r=(e=er(t,!0,"fixed"===n)).top+t.clientTop,o=e.left+t.clientLeft,l=ee(t),a=t.clientWidth*l.x,f=t.clientHeight*l.y,i={width:a,height:f,x:o*l.x,y:r*l.y}}else{let n=en(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return A(i)}function ea(e){return"static"===q(e).position}function ef(e,t){if(!M(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return F(e)===n&&(n=n.ownerDocument.body),n}function es(e,t){var n;let r=D(e);if(z(e))return r;if(!M(e)){let t=U(e);for(;t&&!X(t);){if(j(t)&&!ea(t))return t;t=U(t)}return r}let i=ef(e,t);for(;i&&(n=i,/^(table|td|th)$/.test(k(n)))&&ea(i);)i=ef(i,t);return i&&X(i)&&ea(i)&&!I(i)?r:i||function(e){let t=U(e);for(;M(t)&&!X(t);){if(I(t))return t;if(z(t))break;t=U(t)}return null}(e)||r}let ec=async function(e){let t=this.getOffsetParent||es,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=M(t),i=F(t),o="fixed"===n,l=er(e,!0,o,t),a={scrollLeft:0,scrollTop:0},s=f(0);if((r||!o)&&(("body"!==k(t)||V(i))&&(a=K(t)),r)){let e=er(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}!r&&i&&(s.x=ei(i));let c=!i||r||o?f(0):eo(i,a);return{x:l.left+a.scrollLeft-s.x-c.x,y:l.top+a.scrollTop-s.y-c.y,width:l.width,height:l.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eu={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,o="fixed"===i,l=F(r),a=!!t&&z(t.floating);if(r===l||a&&o)return n;let s={scrollLeft:0,scrollTop:0},c=f(1),u=f(0),d=M(r);if((d||!o)&&(("body"!==k(r)||V(l))&&(s=K(r)),d)){let e=er(r);c=ee(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let p=!l||d||o?f(0):eo(l,s);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+u.x+p.x,y:n.y*c.y-s.scrollTop*c.y+u.y+p.y}},getDocumentElement:F,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e,a=[..."clippingAncestors"===n?z(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=G(e,[],!1).filter(e=>j(e)&&"body"!==k(e)),i=null,o="fixed"===q(e).position,l=o?U(e):e;for(;j(l)&&!X(l);){let e=q(l),t=I(l),n=i?i.position:o?"fixed":"";t||"fixed"!==n&&("absolute"!==n||"static"!==e.position)?i=e:r=r.filter(e=>e!==l),l=U(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],f=el(t,a[0],l),s=f.top,c=f.right,u=f.bottom,d=f.left;for(let e=1;e({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:l,rects:a,platform:f,elements:s,middlewareData:u}=t,{element:g,padding:y=0}=c(e,t)||{};if(null==g)return{};let w=R(y),x={x:n,y:r},v=p(m(l)),b=h(v),A=await f.getDimensions(g),C="y"===v,L=C?"clientHeight":"clientWidth",S=a.reference[b]+a.reference[v]-x[v]-a.floating[b],O=x[v]-a.reference[v],P=await (null==f.getOffsetParent?void 0:f.getOffsetParent(g)),T=P?P[L]:0;T&&await (null==f.isElement?void 0:f.isElement(P))||(T=s.floating[L]||a.floating[b]);let E=T/2-A[b]/2-1,H=i(w[C?"top":"left"],E),k=i(w[C?"bottom":"right"],E),D=T-A[b]-k,F=T/2-A[b]/2+(S/2-O/2),$=o(H,i(F,D)),j=!u.arrow&&null!=d(l)&&F!==$&&a.reference[b]/2-(Ftypeof document?n.useLayoutEffect:function(){};function eg(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!eg(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!eg(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function ey(e){return"u"{t.current=e}),t}var ev=e.i(421482),eb=e.i(733783),eR=n.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...o}=e;return(0,eb.jsx)(ev.Primitive.svg,{...o,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eb.jsx)("polygon",{points:"0,0 30,0 15,10"})})});eR.displayName="Arrow";var eA=e.i(443644),eC=e.i(833946),eL=e.i(79603),eS=e.i(91467),eO=e.i(270724),eP="Popper",[eT,eE]=(0,eC.createContextScope)(eP),[eH,ek]=eT(eP),eD=e=>{let{__scopePopper:t,children:r}=e,[i,o]=n.useState(null),[l,a]=n.useState(void 0);return(0,eb.jsx)(eH,{scope:t,anchor:i,onAnchorChange:o,placementState:l,setPlacementState:a,children:r})};eD.displayName=eP;var eF="PopperAnchor",e$=n.forwardRef((e,t)=>{let{__scopePopper:r,virtualRef:i,...o}=e,l=ek(eF,r),a=n.useRef(null),f=l.onAnchorChange,s=n.useCallback(e=>{a.current=e,e&&f(e)},[f]),c=(0,eA.useComposedRefs)(t,s),u=n.useRef(null);n.useEffect(()=>{if(!i)return;let e=u.current;u.current=i.current,e!==u.current&&f(u.current)});let d=l.placementState&&eY(l.placementState),p=d?.[0],h=d?.[1];return i?null:(0,eb.jsx)(ev.Primitive.div,{"data-radix-popper-side":p,"data-radix-popper-align":h,...o,ref:c})});e$.displayName=eF;var ej="PopperContent",[eM,eW]=eT(ej),eV=n.forwardRef((e,t)=>{var r,l,f,s,R,A,C,L,H,k,$,j,M;let W,V,z,B,N,_,{__scopePopper:I,side:Y="bottom",sideOffset:X=0,align:q="center",alignOffset:K=0,arrowPadding:U=0,avoidCollisions:J=!0,collisionBoundary:Q=[],collisionPadding:ee=0,sticky:et="partial",hideWhenDetached:en=!1,updatePositionStrategy:ei="optimized",onPlaced:eo,...el}=e,ea=ek(ej,I),[ef,es]=n.useState(null),ec=(0,eA.useComposedRefs)(t,es),[eR,eC]=n.useState(null),eP=(0,eO.useSize)(eR),eT=eP?.width??0,eE=eP?.height??0,eH="number"==typeof ee?ee:{top:0,right:0,bottom:0,left:0,...ee},eD=Array.isArray(Q)?Q:[Q],eF=eD.length>0,e$={padding:eH,boundary:eD.filter(e_),altBoundary:eF},{refs:eW,floatingStyles:eV,placement:ez,isPositioned:eB,middlewareData:eN}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:r="absolute",middleware:i=[],platform:o,elements:{reference:l,floating:a}={},transform:f=!0,whileElementsMounted:s,open:c}=e,[u,d]=n.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=n.useState(i);eg(p,i)||h(i);let[m,g]=n.useState(null),[y,w]=n.useState(null),x=n.useCallback(e=>{e!==A.current&&(A.current=e,g(e))},[]),v=n.useCallback(e=>{e!==C.current&&(C.current=e,w(e))},[]),b=l||m,R=a||y,A=n.useRef(null),C=n.useRef(null),L=n.useRef(u),O=null!=s,P=ex(s),T=ex(o),E=ex(c),H=n.useCallback(()=>{var e,n;let i,o,l;if(!A.current||!C.current)return;let a={placement:t,strategy:r,middleware:p};T.current&&(a.platform=T.current),(e=A.current,n=C.current,i=new Map,o=null!=a?a:{},l={...eu,...o.platform,_c:i},S(e,n,{...o,platform:l})).then(e=>{let t={...e,isPositioned:!1!==E.current};k.current&&!eg(L.current,t)&&(L.current=t,eh.flushSync(()=>{d(t)}))})},[p,t,r,T,E]);em(()=>{!1===c&&L.current.isPositioned&&(L.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);let k=n.useRef(!1);em(()=>(k.current=!0,()=>{k.current=!1}),[]),em(()=>{if(b&&(A.current=b),R&&(C.current=R),b&&R){if(P.current)return P.current(b,R,H);H()}},[b,R,H,P,O]);let D=n.useMemo(()=>({reference:A,floating:C,setReference:x,setFloating:v}),[x,v]),F=n.useMemo(()=>({reference:b,floating:R}),[b,R]),$=n.useMemo(()=>{let e={position:r,left:0,top:0};if(!F.floating)return e;let t=ew(F.floating,u.x),n=ew(F.floating,u.y);return f?{...e,transform:"translate("+t+"px, "+n+"px)",...ey(F.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}},[r,f,F.floating,u.x,u.y]);return n.useMemo(()=>({...u,update:H,refs:D,elements:F,floatingStyles:$}),[u,H,D,F,$])}({strategy:"fixed",placement:Y+("center"!==q?"-"+q:""),whileElementsMounted:(...e)=>(function(e,t,n,r){let l;void 0===r&&(r={});let{ancestorScroll:f=!0,ancestorResize:s=!0,elementResize:c="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=Z(e),h=f||s?[...p?G(p):[],...t?G(t):[]]:[];h.forEach(e=>{f&&e.addEventListener("scroll",n),s&&e.addEventListener("resize",n)});let m=p&&u?function(e,t,n){let r,l=null,f=F(e);function s(){var e;clearTimeout(r),null==(e=l)||e.disconnect(),l=null}function c(n,u){void 0===n&&(n=!1),void 0===u&&(u=1),s();let d=e.getBoundingClientRect(),{left:p,top:h,width:m,height:g}=d;if(n||t(),!m||!g)return;let y={rootMargin:-a(h)+"px "+-a(f.clientWidth-(p+m))+"px "+-a(f.clientHeight-(h+g))+"px "+-a(p)+"px",threshold:o(0,i(1,u))||1},w=!0;function x(t){let n=t[0].intersectionRatio;if(!ed(d,e.getBoundingClientRect()))return c();if(n!==u){if(!w)return c();n?c(!1,n):r=setTimeout(()=>{c(!1,1e-7)},1e3)}w=!1}try{l=new IntersectionObserver(x,{...y,root:f.ownerDocument})}catch(e){l=new IntersectionObserver(x,y)}l.observe(e)}let u=D(e),d=()=>c(n);return u.addEventListener("resize",d),c(!0),()=>{u.removeEventListener("resize",d),s()}}(p,n,s):null,g=-1,y=null;c&&(y=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&y&&t&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),n()}),p&&!d&&y.observe(p),t&&y.observe(t));let w=d?er(e):null;return d&&function t(){let r=er(e);w&&!ed(w,r)&&n(),w=r,l=requestAnimationFrame(t)}(),n(),()=>{var e;h.forEach(e=>{f&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(l)}})(...e,{animationFrame:"always"===ei}),elements:{reference:ea.anchor},middleware:[{name:(W={name:"offset",options:l=r={mainAxis:X+eE,alignmentAxis:K},async fn(e){var t,n;let{x:r,y:i,placement:o,middlewareData:a}=e,f=await E(e,l);return o===(null==(t=a.offset)?void 0:t.placement)&&null!=(n=a.arrow)&&n.alignmentOffset?{}:{x:r+f.x,y:i+f.y,data:{...f,placement:o}}}}).name,fn:W.fn,options:[r,void 0]},J&&{name:(V={name:"shift",options:R=s={mainAxis:!0,crossAxis:!1,limiter:"partial"===et?{fn:(f=void 0,{options:f={},fn(e){var t,n,r,i;let{x:o,y:l,placement:a,rects:s,middlewareData:d}=e,{offset:h=0,mainAxis:g=!0,crossAxis:y=!0}=c(f,e),w={x:o,y:l},x=m(a),v=p(x),b=w[v],R=w[x],A=c(h,e),C="number"==typeof A?{mainAxis:A,crossAxis:0}:{mainAxis:null!=(t=A.mainAxis)?t:0,crossAxis:null!=(n=A.crossAxis)?n:0};if(g){let e="y"===v?"height":"width",t=s.reference[v]-s.floating[e]+C.mainAxis,n=s.reference[v]+s.reference[e]-C.mainAxis;bn&&(b=n)}if(y){let e="y"===v?"width":"height",t=T.has(u(a)),n=s.reference[x]-s.floating[e]+(t&&(null==(r=d.offset)?void 0:r[x])||0)+(t?0:C.crossAxis),o=s.reference[x]+s.reference[e]+(t?0:(null==(i=d.offset)?void 0:i[x])||0)-(t?C.crossAxis:0);Ro&&(R=o)}return{[v]:b,[x]:R}}}).fn,options:[void 0,void 0]}:void 0,...e$},async fn(e){let{x:t,y:n,placement:r,platform:l}=e,{mainAxis:a=!0,crossAxis:f=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=c(R,e),d={x:t,y:n},h=await l.detectOverflow(e,u),g=m(r),y=p(g),w=d[y],x=d[g],v=(e,t)=>o(t+h["y"===e?"top":"left"],i(t,t-h["y"===e?"bottom":"right"]));a&&(w=v(y,w)),f&&(x=v(g,x));let b=s.fn({...e,[y]:w,[g]:x});return{...b,data:{x:b.x-t,y:b.y-n,enabled:{[y]:a,[g]:f}}}}}).name,fn:V.fn,options:[s,void 0]},J&&{name:(z={name:"flip",options:C=A={...e$},async fn(e){var t,n,r,i,o,l,a,f;let s,R,A,{placement:L,middlewareData:S,rects:O,initialPlacement:P,platform:T,elements:E}=e,{mainAxis:H=!0,crossAxis:k=!0,fallbackPlacements:D,fallbackStrategy:F="bestFit",fallbackAxisSideDirection:$="none",flipAlignment:j=!0,...M}=c(C,e);if(null!=(t=S.arrow)&&t.alignmentOffset)return{};let W=u(L),V=m(P),z=u(P)===P,B=await (null==T.isRTL?void 0:T.isRTL(E.floating)),N=D||(z||!j?[b(P)]:(s=b(P),[g(P),s,g(s)])),_="none"!==$;!D&&_&&N.push(...(R=d(P),A=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?w:y;return t?y:w;case"left":case"right":return t?x:v;default:return[]}}(u(P),"start"===$,B),R&&(A=A.map(e=>e+"-"+R),j&&(A=A.concat(A.map(g)))),A));let I=[P,...N],Y=await T.detectOverflow(e,M),X=[],q=(null==(n=S.flip)?void 0:n.overflows)||[];if(H&&X.push(Y[W]),k){let e,t,n,r,i=(l=L,a=O,void 0===(f=B)&&(f=!1),e=d(l),n=h(t=p(m(l))),r="x"===t?e===(f?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[n]>a.floating[n]&&(r=b(r)),[r,b(r)]);X.push(Y[i[0]],Y[i[1]])}if(q=[...q,{placement:L,overflows:X}],!X.every(e=>e<=0)){let e=((null==(r=S.flip)?void 0:r.index)||0)+1,t=I[e];if(t&&("alignment"!==k||V===m(t)||q.every(e=>m(e.placement)!==V||e.overflows[0]>0)))return{data:{index:e,overflows:q},reset:{placement:t}};let n=null==(i=q.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(F){case"bestFit":{let e=null==(o=q.filter(e=>{if(_){let t=m(e.placement);return t===V||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:o[0];e&&(n=e);break}case"initialPlacement":n=P}if(L!==n)return{reset:{placement:n}}}return{}}}).name,fn:z.fn,options:[A,void 0]},{name:(B={name:"size",options:H=L={...e$,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:o}=t.reference,l=e.floating.style;l.setProperty("--radix-popper-available-width",`${n}px`),l.setProperty("--radix-popper-available-height",`${r}px`),l.setProperty("--radix-popper-anchor-width",`${i}px`),l.setProperty("--radix-popper-anchor-height",`${o}px`)}},async fn(e){let t,n,{placement:r,rects:l,platform:a,elements:f}=e,{apply:s=()=>{},...p}=c(H,e),h=await a.detectOverflow(e,p),g=u(r),y=d(r),w="y"===m(r),{width:x,height:v}=l.floating;"top"===g||"bottom"===g?(t=g,n=y===(await (null==a.isRTL?void 0:a.isRTL(f.floating))?"start":"end")?"left":"right"):(n=g,t="end"===y?"top":"bottom");let b=v-h.top-h.bottom,R=x-h.left-h.right,A=i(v-h[t],b),C=i(x-h[n],R),L=e.middlewareData.shift,S=!L,O=A,P=C;null!=L&&L.enabled.x&&(P=R),null!=L&&L.enabled.y&&(O=b),S&&!y&&(w?P=x-2*o(h.left,h.right):O=v-2*o(h.top,h.bottom)),await s({...e,availableWidth:P,availableHeight:O});let T=await a.getDimensions(f.floating);return x!==T.width||v!==T.height?{reset:{rects:!0}}:{}}}).name,fn:B.fn,options:[L,void 0]},eR&&{name:(N={name:"arrow",options:$=k={element:eR,padding:U},fn(e){let{element:t,padding:n}="function"==typeof $?$(e):$;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?ep({element:t.current,padding:n}).fn(e):{}:t?ep({element:t,padding:n}).fn(e):{}}}).name,fn:N.fn,options:[k,void 0]},eI({arrowWidth:eT,arrowHeight:eE}),en&&{name:(_={name:"hide",options:M=j={strategy:"referenceHidden",...e$,boundary:eF?e$.boundary:void 0},async fn(e){let{rects:t,platform:n}=e,{strategy:r="referenceHidden",...i}=c(M,e);switch(r){case"referenceHidden":{let r=O(await n.detectOverflow(e,{...i,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:P(r)}}}case"escaped":{let r=O(await n.detectOverflow(e,{...i,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:P(r)}}}default:return{}}}}).name,fn:_.fn,options:[j,void 0]}]}),eX=ea.setPlacementState;(0,eS.useLayoutEffect)(()=>(eX(ez),()=>{eX(void 0)}),[ez,eX]);let[eq,eK]=eY(ez),eU=(0,eL.useCallbackRef)(eo);(0,eS.useLayoutEffect)(()=>{eB&&eU?.()},[eB,eU]);let eG=eN.arrow?.x,eJ=eN.arrow?.y,eQ=eN.arrow?.centerOffset!==0,[eZ,e0]=n.useState();return(0,eS.useLayoutEffect)(()=>{ef&&e0(window.getComputedStyle(ef).zIndex)},[ef]),(0,eb.jsx)("div",{ref:eW.setFloating,"data-radix-popper-content-wrapper":"",style:{...eV,transform:eB?eV.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eZ,"--radix-popper-transform-origin":[eN.transformOrigin?.x,eN.transformOrigin?.y].join(" "),...eN.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eb.jsx)(eM,{scope:I,placedSide:eq,placedAlign:eK,onArrowChange:eC,arrowX:eG,arrowY:eJ,shouldHideArrow:eQ,children:(0,eb.jsx)(ev.Primitive.div,{"data-side":eq,"data-align":eK,...el,ref:ec,style:{...el.style,animation:eB?void 0:"none"}})})})});eV.displayName=ej;var ez="PopperArrow",eB={top:"bottom",right:"left",bottom:"top",left:"right"},eN=n.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=eW(ez,n),o=eB[i.placedSide];return(0,eb.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,eb.jsx)(eR,{...r,ref:t,style:{...r.style,display:"block"}})})});function e_(e){return null!==e}eN.displayName=ez;var eI=e=>({name:"transformOrigin",options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,o=i.arrow?.centerOffset!==0,l=o?0:e.arrowWidth,a=o?0:e.arrowHeight,[f,s]=eY(n),c={start:"0%",center:"50%",end:"100%"}[s],u=(i.arrow?.x??0)+l/2,d=(i.arrow?.y??0)+a/2,p="",h="";return"bottom"===f?(p=o?c:`${u}px`,h=`${-a}px`):"top"===f?(p=o?c:`${u}px`,h=`${r.floating.height+a}px`):"right"===f?(p=`${-a}px`,h=o?c:`${d}px`):"left"===f&&(p=`${r.floating.width+a}px`,h=o?c:`${d}px`),{data:{x:p,y:h}}}});function eY(e){let[t,n="center"]=e.split("-");return[t,n]}e.s(["Anchor",0,e$,"Arrow",0,eN,"Content",0,eV,"Root",0,eD,"createPopperScope",0,eE],718801)}]); //# debugId=223fdb72-2ff9-3474-bde1-07469ee9866d