"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5024],{74012:function(e,t,n){n.d(t,{Z:function(){return S}});var r=n(53176),o=n(7653),i=n(78001),l=n(3417),a=(0,n(36650)._)(),u=function(){},c=o.forwardRef(function(e,t){var n=o.useRef(null),i=o.useState({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:u}),c=i[0],s=i[1],f=e.forwardProps,d=e.children,p=e.className,m=e.removeScrollBar,v=e.enabled,h=e.shards,g=e.sideCar,y=e.noIsolation,w=e.inert,b=e.allowPinchZoom,x=e.as,E=e.gapMode,R=(0,r._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=(0,l.q)([n,t]),P=(0,r.pi)((0,r.pi)({},R),c);return o.createElement(o.Fragment,null,v&&o.createElement(g,{sideCar:a,removeScrollBar:m,shards:h,noIsolation:y,inert:w,setCallbacks:s,allowPinchZoom:!!b,lockRef:n,gapMode:E}),f?o.cloneElement(o.Children.only(d),(0,r.pi)((0,r.pi)({},P),{ref:C})):o.createElement(void 0===x?"div":x,(0,r.pi)({},P,{className:p,ref:C}),d))});c.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},c.classNames={fullWidth:i.zi,zeroRight:i.pF};var s=n(63021),f=n(17006),d=n(61228),p=!1;if("undefined"!=typeof window)try{var m=Object.defineProperty({},"passive",{get:function(){return p=!0,!0}});window.addEventListener("test",m,m),window.removeEventListener("test",m,m)}catch(e){p=!1}var v=!!p&&{passive:!1},h=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&"TEXTAREA"!==e.tagName&&"visible"===n[t])},g=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),y(e,r)){var o=w(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},y=function(e,t){return"v"===e?h(t,"overflowY"):h(t,"overflowX")},w=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},b=function(e,t,n,r,o){var i,l=(i=window.getComputedStyle(t).direction,"h"===e&&"rtl"===i?-1:1),a=l*r,u=n.target,c=t.contains(u),s=!1,f=a>0,d=0,p=0;do{var m=w(e,u),v=m[0],h=m[1]-m[2]-l*v;(v||h)&&y(e,u)&&(d+=h,p+=v),u instanceof ShadowRoot?u=u.host:u=u.parentNode}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return f&&(o&&1>Math.abs(d)||!o&&a>d)?s=!0:!f&&(o&&1>Math.abs(p)||!o&&-a>p)&&(s=!0),s},x=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},E=function(e){return[e.deltaX,e.deltaY]},R=function(e){return e&&"current"in e?e.current:e},C=0,P=[],L=(0,s.L)(a,function(e){var t=o.useRef([]),n=o.useRef([0,0]),i=o.useRef(),l=o.useState(C++)[0],a=o.useState(d.Ws)[0],u=o.useRef(e);o.useEffect(function(){u.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(l));var t=(0,r.ev)([e.lockRef.current],(e.shards||[]).map(R),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(l))}),function(){document.body.classList.remove("block-interactivity-".concat(l)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(l))})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!u.current.allowPinchZoom;var r,o=x(e),l=n.current,a="deltaX"in e?e.deltaX:l[0]-o[0],c="deltaY"in e?e.deltaY:l[1]-o[1],s=e.target,f=Math.abs(a)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===f&&"range"===s.type)return!1;var d=g(f,s);if(!d)return!0;if(d?r=f:(r="v"===f?"h":"v",d=g(f,s)),!d)return!1;if(!i.current&&"changedTouches"in e&&(a||c)&&(i.current=r),!r)return!0;var p=i.current||r;return b(p,t,e,"h"===p?a:c,!0)},[]),s=o.useCallback(function(e){if(P.length&&P[P.length-1]===a){var n="deltaY"in e?E(e):x(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=(u.current.shards||[]).map(R).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?c(e,o[0]):!u.current.noIsolation)&&e.cancelable&&e.preventDefault()}}},[]),p=o.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)},[]),m=o.useCallback(function(e){n.current=x(e),i.current=void 0},[]),h=o.useCallback(function(t){p(t.type,E(t),t.target,c(t,e.lockRef.current))},[]),y=o.useCallback(function(t){p(t.type,x(t),t.target,c(t,e.lockRef.current))},[]);o.useEffect(function(){return P.push(a),e.setCallbacks({onScrollCapture:h,onWheelCapture:h,onTouchMoveCapture:y}),document.addEventListener("wheel",s,v),document.addEventListener("touchmove",s,v),document.addEventListener("touchstart",m,v),function(){P=P.filter(function(e){return e!==a}),document.removeEventListener("wheel",s,v),document.removeEventListener("touchmove",s,v),document.removeEventListener("touchstart",m,v)}},[]);var w=e.removeScrollBar,L=e.inert;return o.createElement(o.Fragment,null,L?o.createElement(a,{styles:"\n  .block-interactivity-".concat(l," {pointer-events: none;}\n  .allow-interactivity-").concat(l," {pointer-events: all;}\n")}):null,w?o.createElement(f.jp,{gapMode:e.gapMode}):null)}),O=o.forwardRef(function(e,t){return o.createElement(c,(0,r.pi)({},e,{ref:t,sideCar:L}))});O.classNames=c.classNames;var S=O},36449:function(e,t,n){n.d(t,{XB:function(){return m}});var r,o=n(7653);function i(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}var l=n(3458),a=n(29602),u=n(27573),c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=o.forwardRef((e,n)=>{let{asChild:r,...o}=e,i=r?a.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,u.jsx)(i,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function s(...e){return o.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}var f=n(63465),d="dismissableLayer.update",p=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=o.forwardRef((e,t)=>{var n,l;let{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:y,onInteractOutside:w,onDismiss:b,...x}=e,E=o.useContext(p),[R,C]=o.useState(null),P=null!==(l=null==R?void 0:R.ownerDocument)&&void 0!==l?l:null===(n=globalThis)||void 0===n?void 0:n.document,[,L]=o.useState({}),O=s(t,e=>C(e)),S=Array.from(E.layers),[T]=[...E.layersWithOutsidePointerEventsDisabled].slice(-1),A=S.indexOf(T),N=R?S.indexOf(R):-1,k=E.layersWithOutsidePointerEventsDisabled.size>0,j=N>=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=(0,f.W)(e),i=o.useRef(!1),l=o.useRef(()=>{});return o.useEffect(()=>{let e=e=>{if(e.target&&!i.current){let t=function(){h("dismissableLayer.pointerDownOutside",r,o,{discrete:!0})},o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",l.current),l.current=t,n.addEventListener("click",l.current,{once:!0})):t()}else n.removeEventListener("click",l.current);i.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",l.current)}},[n,r]),{onPointerDownCapture:()=>i.current=!0}}(e=>{let t=e.target,n=[...E.branches].some(e=>e.contains(t));!j||n||(null==g||g(e),null==w||w(e),e.defaultPrevented||null==b||b())},P),W=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=(0,f.W)(e),i=o.useRef(!1);return o.useEffect(()=>{let e=e=>{e.target&&!i.current&&h("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>i.current=!0,onBlurCapture:()=>i.current=!1}}(e=>{let t=e.target;[...E.branches].some(e=>e.contains(t))||(null==y||y(e),null==w||w(e),e.defaultPrevented||null==b||b())},P);return!function(e,t=globalThis?.document){let n=(0,f.W)(e);o.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=>{N!==E.layers.size-1||(null==m||m(e),!e.defaultPrevented&&b&&(e.preventDefault(),b()))},P),o.useEffect(()=>{if(R)return a&&(0===E.layersWithOutsidePointerEventsDisabled.size&&(r=P.body.style.pointerEvents,P.body.style.pointerEvents="none"),E.layersWithOutsidePointerEventsDisabled.add(R)),E.layers.add(R),v(),()=>{a&&1===E.layersWithOutsidePointerEventsDisabled.size&&(P.body.style.pointerEvents=r)}},[R,P,a,E]),o.useEffect(()=>()=>{R&&(E.layers.delete(R),E.layersWithOutsidePointerEventsDisabled.delete(R),v())},[R,E]),o.useEffect(()=>{let e=()=>L({});return document.addEventListener(d,e),()=>document.removeEventListener(d,e)},[]),(0,u.jsx)(c.div,{...x,ref:O,style:{pointerEvents:k?j?"auto":"none":void 0,...e.style},onFocusCapture:i(e.onFocusCapture,W.onFocusCapture),onBlurCapture:i(e.onBlurCapture,W.onBlurCapture),onPointerDownCapture:i(e.onPointerDownCapture,D.onPointerDownCapture)})});function v(){let e=new CustomEvent(d);document.dispatchEvent(e)}function h(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&&l.flushSync(()=>i.dispatchEvent(a)):i.dispatchEvent(a)}m.displayName="DismissableLayer",o.forwardRef((e,t)=>{let n=o.useContext(p),r=o.useRef(null),i=s(t,r);return o.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(c.div,{...e,ref:i})}).displayName="DismissableLayerBranch"},48086:function(e,t,n){n.d(t,{EW:function(){return i}});var r=n(7653),o=0;function i(){r.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:l()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:l()),o++,()=>{1===o&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),o--}},[])}function l(){let e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}},78986:function(e,t,n){let r;n.d(t,{M:function(){return d}});var o=n(7653);n(3458);var i=n(29602),l=n(27573),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=o.forwardRef((e,n)=>{let{asChild:r,...o}=e,a=r?i.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(a,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),u=n(63465),c="focusScope.autoFocusOnMount",s="focusScope.autoFocusOnUnmount",f={bubbles:!1,cancelable:!0},d=o.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:d,...g}=e,[y,w]=o.useState(null),b=(0,u.W)(i),x=(0,u.W)(d),E=o.useRef(null),R=function(...e){return o.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}(t,e=>w(e)),C=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let e=function(e){if(C.paused||!y)return;let t=e.target;y.contains(t)?E.current=t:v(E.current,{select:!0})},t=function(e){if(C.paused||!y)return;let t=e.relatedTarget;null===t||y.contains(t)||v(E.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&&v(y)});return y&&n.observe(y,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),n.disconnect()}}},[r,y,C.paused]),o.useEffect(()=>{if(y){h.add(C);let e=document.activeElement;if(!y.contains(e)){let t=new CustomEvent(c,f);y.addEventListener(c,b),y.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(v(r,{select:t}),document.activeElement!==n)return}(p(y).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&v(y))}return()=>{y.removeEventListener(c,b),setTimeout(()=>{let t=new CustomEvent(s,f);y.addEventListener(s,x),y.dispatchEvent(t),t.defaultPrevented||v(null!=e?e:document.body,{select:!0}),y.removeEventListener(s,x),h.remove(C)},0)}}},[y,b,x,C]);let P=o.useCallback(e=>{if(!n&&!r||C.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=p(e);return[m(t,e),m(t.reverse(),e)]}(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&v(i,{select:!0})):(e.preventDefault(),n&&v(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,C.paused]);return(0,l.jsx)(a.div,{tabIndex:-1,...g,ref:R,onKeyDown:P})});function p(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 m(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 v(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()}}d.displayName="FocusScope";var h=(r=[],{add(e){let t=r[0];e!==t&&(null==t||t.pause()),(r=g(r,e)).unshift(e)},remove(e){var t;null===(t=(r=g(r,e))[0])||void 0===t||t.resume()}});function g(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}},45230:function(e,t,n){n.d(t,{ee:function(){return eZ},Eh:function(){return eG},VY:function(){return eU},fC:function(){return eq},D7:function(){return ek}});var r=n(7653);let o=["top","right","bottom","left"],i=Math.min,l=Math.max,a=Math.round,u=Math.floor,c=e=>({x:e,y:e}),s={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function d(e,t){return"function"==typeof e?e(t):e}function p(e){return e.split("-")[0]}function m(e){return e.split("-")[1]}function v(e){return"x"===e?"y":"x"}function h(e){return"y"===e?"height":"width"}function g(e){return["top","bottom"].includes(p(e))?"y":"x"}function y(e){return e.replace(/start|end/g,e=>f[e])}function w(e){return e.replace(/left|right|bottom|top/g,e=>s[e])}function b(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function x(e){let{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function E(e,t,n){let r,{reference:o,floating:i}=e,l=g(t),a=v(g(t)),u=h(a),c=p(t),s="y"===l,f=o.x+o.width/2-i.width/2,d=o.y+o.height/2-i.height/2,y=o[u]/2-i[u]/2;switch(c){case"top":r={x:f,y:o.y-i.height};break;case"bottom":r={x:f,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:d};break;case"left":r={x:o.x-i.width,y:d};break;default:r={x:o.x,y:o.y}}switch(m(t)){case"start":r[a]-=y*(n&&s?-1:1);break;case"end":r[a]+=y*(n&&s?-1:1)}return r}let R=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:l}=n,a=i.filter(Boolean),u=await (null==l.isRTL?void 0:l.isRTL(t)),c=await l.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:f}=E(c,r,u),d=r,p={},m=0;for(let n=0;n<a.length;n++){let{name:i,fn:v}=a[n],{x:h,y:g,data:y,reset:w}=await v({x:s,y:f,initialPlacement:r,placement:d,strategy:o,middlewareData:p,rects:c,platform:l,elements:{reference:e,floating:t}});s=null!=h?h:s,f=null!=g?g:f,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(d=w.placement),w.rects&&(c=!0===w.rects?await l.getElementRects({reference:e,floating:t,strategy:o}):w.rects),{x:s,y:f}=E(c,d,u)),n=-1)}return{x:s,y:f,placement:d,strategy:o,middlewareData:p}};async function C(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:i,rects:l,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=d(t,e),v=b(m),h=a[p?"floating"===f?"reference":"floating":f],g=x(await i.getClippingRect({element:null==(n=await (null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),y="floating"===f?{x:r,y:o,width:l.floating.width,height:l.floating.height}:l.reference,w=await (null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),E=await (null==i.isElement?void 0:i.isElement(w))&&await (null==i.getScale?void 0:i.getScale(w))||{x:1,y:1},R=x(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:w,strategy:u}):y);return{top:(g.top-R.top+v.top)/E.y,bottom:(R.bottom-g.bottom+v.bottom)/E.y,left:(g.left-R.left+v.left)/E.x,right:(R.right-g.right+v.right)/E.x}}function P(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function L(e){return o.some(t=>e[t]>=0)}async function O(e,t){let{placement:n,platform:r,elements:o}=e,i=await (null==r.isRTL?void 0:r.isRTL(o.floating)),l=p(n),a=m(n),u="y"===g(n),c=["left","top"].includes(l)?-1:1,s=i&&u?-1:1,f=d(t,e),{mainAxis:v,crossAxis:h,alignmentAxis:y}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&"number"==typeof y&&(h="end"===a?-1*y:y),u?{x:h*s,y:v*c}:{x:v*c,y:h*s}}function S(){return"undefined"!=typeof window}function T(e){return k(e)?(e.nodeName||"").toLowerCase():"#document"}function A(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function N(e){var t;return null==(t=(k(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function k(e){return!!S()&&(e instanceof Node||e instanceof A(e).Node)}function j(e){return!!S()&&(e instanceof Element||e instanceof A(e).Element)}function D(e){return!!S()&&(e instanceof HTMLElement||e instanceof A(e).HTMLElement)}function W(e){return!!S()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof A(e).ShadowRoot)}function F(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=I(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function M(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function H(e){let t=B(),n=j(e)?I(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some(e=>(n.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(n.contain||"").includes(e))}function B(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function z(e){return["html","body","#document"].includes(T(e))}function I(e){return A(e).getComputedStyle(e)}function _(e){return j(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Y(e){if("html"===T(e))return e;let t=e.assignedSlot||e.parentNode||W(e)&&e.host||N(e);return W(t)?t.host:t}function $(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=Y(t);return z(n)?t.ownerDocument?t.ownerDocument.body:t.body:D(n)&&F(n)?n:e(n)}(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),l=A(o);if(i){let e=X(l);return t.concat(l,l.visualViewport||[],F(o)?o:[],e&&n?$(e):[])}return t.concat(o,$(o,[],n))}function X(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function V(e){let t=I(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=D(e),i=o?e.offsetWidth:n,l=o?e.offsetHeight:r,u=a(n)!==i||a(r)!==l;return u&&(n=i,r=l),{width:n,height:r,$:u}}function K(e){return j(e)?e:e.contextElement}function q(e){let t=K(e);if(!D(t))return c(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:i}=V(t),l=(i?a(n.width):n.width)/r,u=(i?a(n.height):n.height)/o;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}let Z=c(0);function U(e){let t=A(e);return B()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Z}function G(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let i=e.getBoundingClientRect(),l=K(e),a=c(1);t&&(r?j(r)&&(a=q(r)):a=q(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===A(l))&&o)?U(l):c(0),s=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,d=i.width/a.x,p=i.height/a.y;if(l){let e=A(l),t=r&&j(r)?A(r):r,n=e,o=X(n);for(;o&&r&&t!==n;){let e=q(o),t=o.getBoundingClientRect(),r=I(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,f*=e.y,d*=e.x,p*=e.y,s+=i,f+=l,o=X(n=A(o))}}return x({width:d,height:p,x:s,y:f})}function J(e,t){let n=_(e).scrollLeft;return t?t.left+n:G(N(e)).left+n}function Q(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=A(e),r=N(e),o=n.visualViewport,i=r.clientWidth,l=r.clientHeight,a=0,u=0;if(o){i=o.width,l=o.height;let e=B();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}return{width:i,height:l,x:a,y:u}}(e,n);else if("document"===t)r=function(e){let t=N(e),n=_(e),r=e.ownerDocument.body,o=l(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=l(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),a=-n.scrollLeft+J(e),u=-n.scrollTop;return"rtl"===I(r).direction&&(a+=l(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:u}}(N(e));else if(j(t))r=function(e,t){let n=G(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=D(e)?q(e):c(1),l=e.clientWidth*i.x;return{width:l,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{let n=U(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return x(r)}function ee(e){return"static"===I(e).position}function et(e,t){if(!D(e)||"fixed"===I(e).position)return null;if(t)return t(e);let n=e.offsetParent;return N(e)===n&&(n=n.ownerDocument.body),n}function en(e,t){let n=A(e);if(M(e))return n;if(!D(e)){let t=Y(e);for(;t&&!z(t);){if(j(t)&&!ee(t))return t;t=Y(t)}return n}let r=et(e,t);for(;r&&["table","td","th"].includes(T(r))&&ee(r);)r=et(r,t);return r&&z(r)&&ee(r)&&!H(r)?n:r||function(e){let t=Y(e);for(;D(t)&&!z(t);){if(H(t))return t;if(M(t))break;t=Y(t)}return null}(e)||n}let er=async function(e){let t=this.getOffsetParent||en,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=D(t),o=N(t),i="fixed"===n,l=G(e,!0,i,t),a={scrollLeft:0,scrollTop:0},u=c(0);if(r||!r&&!i){if(("body"!==T(t)||F(o))&&(a=_(t)),r){let e=G(t,!0,i,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=J(o))}let s=0,f=0;if(o&&!r&&!i){let e=o.getBoundingClientRect();f=e.top+a.scrollTop,s=e.left+a.scrollLeft-J(o,e)}return{x:l.left+a.scrollLeft-u.x-s,y:l.top+a.scrollTop-u.y-f,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}}},eo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e,i="fixed"===o,l=N(r),a=!!t&&M(t.floating);if(r===l||a&&i)return n;let u={scrollLeft:0,scrollTop:0},s=c(1),f=c(0),d=D(r);if((d||!d&&!i)&&(("body"!==T(r)||F(l))&&(u=_(r)),D(r))){let e=G(r);s=q(r),f.x=e.x+r.clientLeft,f.y=e.y+r.clientTop}return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+f.x,y:n.y*s.y-u.scrollTop*s.y+f.y}},getDocumentElement:N,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,a=[..."clippingAncestors"===n?M(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=$(e,[],!1).filter(e=>j(e)&&"body"!==T(e)),o=null,i="fixed"===I(e).position,l=i?Y(e):e;for(;j(l)&&!z(l);){let t=I(l),n=H(l);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||F(l)&&!n&&function e(t,n){let r=Y(t);return!(r===n||!j(r)||z(r))&&("fixed"===I(r).position||e(r,n))}(e,l))?r=r.filter(e=>e!==l):o=t,l=Y(l)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=a[0],c=a.reduce((e,n)=>{let r=Q(t,n,o);return e.top=l(r.top,e.top),e.right=i(r.right,e.right),e.bottom=i(r.bottom,e.bottom),e.left=l(r.left,e.left),e},Q(t,u,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:en,getElementRects:er,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=V(e);return{width:t,height:n}},getScale:q,isElement:j,isRTL:function(e){return"rtl"===I(e).direction}},ei=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:a,platform:u,elements:c,middlewareData:s}=t,{element:f,padding:p=0}=d(e,t)||{};if(null==f)return{};let y=b(p),w={x:n,y:r},x=v(g(o)),E=h(x),R=await u.getDimensions(f),C="y"===x,P=C?"clientHeight":"clientWidth",L=a.reference[E]+a.reference[x]-w[x]-a.floating[E],O=w[x]-a.reference[x],S=await (null==u.getOffsetParent?void 0:u.getOffsetParent(f)),T=S?S[P]:0;T&&await (null==u.isElement?void 0:u.isElement(S))||(T=c.floating[P]||a.floating[E]);let A=T/2-R[E]/2-1,N=i(y[C?"top":"left"],A),k=i(y[C?"bottom":"right"],A),j=T-R[E]-k,D=T/2-R[E]/2+(L/2-O/2),W=l(N,i(D,j)),F=!s.arrow&&null!=m(o)&&D!==W&&a.reference[E]/2-(D<N?N:k)-R[E]/2<0,M=F?D<N?D-N:D-j:0;return{[x]:w[x]+M,data:{[x]:W,centerOffset:D-W-M,...F&&{alignmentOffset:M}},reset:F}}}),el=(e,t,n)=>{let r=new Map,o={platform:eo,...n},i={...o.platform,_c:r};return R(e,t,{...o,platform:i})};var ea=n(3458),eu="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function ec(e,t){let n,r,o;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(!ec(e[r],t[r]))return!1;return!0}if((n=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){let n=o[r];if(("_owner"!==n||!e.$$typeof)&&!ec(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function es(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ef(e,t){let n=es(e);return Math.round(t*n)/n}function ed(e){let t=r.useRef(e);return eu(()=>{t.current=e}),t}let ep=e=>({name:"arrow",options:e,fn(t){let{element:n,padding:r}="function"==typeof e?e(t):e;return n&&({}).hasOwnProperty.call(n,"current")?null!=n.current?ei({element:n.current,padding:r}).fn(t):{}:n?ei({element:n,padding:r}).fn(t):{}}}),em=(e,t)=>{var n;return{...(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:o,y:i,placement:l,middlewareData:a}=e,u=await O(e,n);return l===(null==(t=a.offset)?void 0:t.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:l}}}}),options:[e,t]}},ev=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"shift",options:n,async fn(e){let{x:t,y:r,placement:o}=e,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=d(n,e),f={x:t,y:r},m=await C(e,s),h=g(p(o)),y=v(h),w=f[y],b=f[h];if(a){let e="y"===y?"top":"left",t="y"===y?"bottom":"right",n=w+m[e],r=w-m[t];w=l(n,i(w,r))}if(u){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",n=b+m[e],r=b-m[t];b=l(n,i(b,r))}let x=c.fn({...e,[y]:w,[h]:b});return{...x,data:{x:x.x-t,y:x.y-r,enabled:{[y]:a,[h]:u}}}}}),options:[e,t]}},eh=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{options:n,fn(e){let{x:t,y:r,placement:o,rects:i,middlewareData:l}=e,{offset:a=0,mainAxis:u=!0,crossAxis:c=!0}=d(n,e),s={x:t,y:r},f=g(o),m=v(f),h=s[m],y=s[f],w=d(a,e),b="number"==typeof w?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(u){let e="y"===m?"height":"width",t=i.reference[m]-i.floating[e]+b.mainAxis,n=i.reference[m]+i.reference[e]-b.mainAxis;h<t?h=t:h>n&&(h=n)}if(c){var x,E;let e="y"===m?"width":"height",t=["top","left"].includes(p(o)),n=i.reference[f]-i.floating[e]+(t&&(null==(x=l.offset)?void 0:x[f])||0)+(t?0:b.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:(null==(E=l.offset)?void 0:E[f])||0)-(t?b.crossAxis:0);y<n?y=n:y>r&&(y=r)}return{[m]:h,[f]:y}}}),options:[e,t]}},eg=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"flip",options:n,async fn(e){var t,r,o,i,l;let{placement:a,middlewareData:u,rects:c,initialPlacement:s,platform:f,elements:b}=e,{mainAxis:x=!0,crossAxis:E=!0,fallbackPlacements:R,fallbackStrategy:P="bestFit",fallbackAxisSideDirection:L="none",flipAlignment:O=!0,...S}=d(n,e);if(null!=(t=u.arrow)&&t.alignmentOffset)return{};let T=p(a),A=g(s),N=p(s)===s,k=await (null==f.isRTL?void 0:f.isRTL(b.floating)),j=R||(N||!O?[w(s)]:function(e){let t=w(e);return[y(e),t,y(t)]}(s)),D="none"!==L;!R&&D&&j.push(...function(e,t,n,r){let o=m(e),i=function(e,t,n){let r=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(n)return t?o:r;return t?r:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(p(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(y)))),i}(s,O,L,k));let W=[s,...j],F=await C(e,S),M=[],H=(null==(r=u.flip)?void 0:r.overflows)||[];if(x&&M.push(F[T]),E){let e=function(e,t,n){void 0===n&&(n=!1);let r=m(e),o=v(g(e)),i=h(o),l="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(l=w(l)),[l,w(l)]}(a,c,k);M.push(F[e[0]],F[e[1]])}if(H=[...H,{placement:a,overflows:M}],!M.every(e=>e<=0)){let e=((null==(o=u.flip)?void 0:o.index)||0)+1,t=W[e];if(t)return{data:{index:e,overflows:H},reset:{placement:t}};let n=null==(i=H.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(P){case"bestFit":{let e=null==(l=H.filter(e=>{if(D){let t=g(e.placement);return t===A||"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:l[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}),options:[e,t]}},ey=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"size",options:n,async fn(e){var t,r;let o,a;let{placement:u,rects:c,platform:s,elements:f}=e,{apply:v=()=>{},...h}=d(n,e),y=await C(e,h),w=p(u),b=m(u),x="y"===g(u),{width:E,height:R}=c.floating;"top"===w||"bottom"===w?(o=w,a=b===(await (null==s.isRTL?void 0:s.isRTL(f.floating))?"start":"end")?"left":"right"):(a=w,o="end"===b?"top":"bottom");let P=R-y.top-y.bottom,L=E-y.left-y.right,O=i(R-y[o],P),S=i(E-y[a],L),T=!e.middlewareData.shift,A=O,N=S;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(N=L),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(A=P),T&&!b){let e=l(y.left,0),t=l(y.right,0),n=l(y.top,0),r=l(y.bottom,0);x?N=E-2*(0!==e||0!==t?e+t:l(y.left,y.right)):A=R-2*(0!==n||0!==r?n+r:l(y.top,y.bottom))}await v({...e,availableWidth:N,availableHeight:A});let k=await s.getDimensions(f.floating);return E!==k.width||R!==k.height?{reset:{rects:!0}}:{}}}),options:[e,t]}},ew=(e,t)=>{var n;return{...(void 0===(n=e)&&(n={}),{name:"hide",options:n,async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...o}=d(n,e);switch(r){case"referenceHidden":{let n=P(await C(e,{...o,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:L(n)}}}case"escaped":{let n=P(await C(e,{...o,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:L(n)}}}default:return{}}}}),options:[e,t]}},eb=(e,t)=>({...ep(e),options:[e,t]});var ex=n(29602),eE=n(27573),eR=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...o}=e,i=r?ex.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,eE.jsx)(i,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),eC=r.forwardRef((e,t)=>{let{children:n,width:r=10,height:o=5,...i}=e;return(0,eE.jsx)(eR.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,eE.jsx)("polygon",{points:"0,0 30,0 15,10"})})});function eP(...e){return r.useCallback(function(...e){return t=>e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}(...e),e)}eC.displayName="Arrow";var eL=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...o}=e,i=r?ex.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,eE.jsx)(i,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),eO=n(63465),eS=n(32316),eT=n(68288),eA="Popper",[eN,ek]=function(e,t=[]){let n=[],o=()=>{let t=n.map(e=>r.createContext(e));return function(n){let o=n?.[e]||t;return r.useMemo(()=>({[`__scope${e}`]:{...n,[e]:o}}),[n,o])}};return o.scopeName=e,[function(t,o){let i=r.createContext(o),l=n.length;function a(t){let{scope:n,children:o,...a}=t,u=n?.[e][l]||i,c=r.useMemo(()=>a,Object.values(a));return(0,eE.jsx)(u.Provider,{value:c,children:o})}return n=[...n,o],a.displayName=t+"Provider",[a,function(n,a){let u=a?.[e][l]||i,c=r.useContext(u);if(c)return c;if(void 0!==o)return o;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 o=n.reduce((t,{useScope:n,scopeName:r})=>{let o=n(e)[`__scope${r}`];return{...t,...o}},{});return r.useMemo(()=>({[`__scope${t.scopeName}`]:o}),[o])}};return n.scopeName=t.scopeName,n}(o,...t)]}(eA),[ej,eD]=eN(eA),eW=e=>{let{__scopePopper:t,children:n}=e,[o,i]=r.useState(null);return(0,eE.jsx)(ej,{scope:t,anchor:o,onAnchorChange:i,children:n})};eW.displayName=eA;var eF="PopperAnchor",eM=r.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:o,...i}=e,l=eD(eF,n),a=r.useRef(null),u=eP(t,a);return r.useEffect(()=>{l.onAnchorChange((null==o?void 0:o.current)||a.current)}),o?null:(0,eE.jsx)(eL.div,{...i,ref:u})});eM.displayName=eF;var eH="PopperContent",[eB,ez]=eN(eH),eI=r.forwardRef((e,t)=>{var n,o,a,c,s,f,d,p;let{__scopePopper:m,side:v="bottom",sideOffset:h=0,align:g="center",alignOffset:y=0,arrowPadding:w=0,avoidCollisions:b=!0,collisionBoundary:x=[],collisionPadding:E=0,sticky:R="partial",hideWhenDetached:C=!1,updatePositionStrategy:P="optimized",onPlaced:L,...O}=e,S=eD(eH,m),[T,A]=r.useState(null),k=eP(t,e=>A(e)),[j,D]=r.useState(null),W=(0,eT.t)(j),F=null!==(d=null==W?void 0:W.width)&&void 0!==d?d:0,M=null!==(p=null==W?void 0:W.height)&&void 0!==p?p:0,H="number"==typeof E?E:{top:0,right:0,bottom:0,left:0,...E},B=Array.isArray(x)?x:[x],z=B.length>0,I={padding:H,boundary:B.filter(eX),altBoundary:z},{refs:_,floatingStyles:Y,placement:X,isPositioned:V,middlewareData:q}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:l,floating:a}={},transform:u=!0,whileElementsMounted:c,open:s}=e,[f,d]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);ec(p,o)||m(o);let[v,h]=r.useState(null),[g,y]=r.useState(null),w=r.useCallback(e=>{e!==R.current&&(R.current=e,h(e))},[]),b=r.useCallback(e=>{e!==C.current&&(C.current=e,y(e))},[]),x=l||v,E=a||g,R=r.useRef(null),C=r.useRef(null),P=r.useRef(f),L=null!=c,O=ed(c),S=ed(i),T=ed(s),A=r.useCallback(()=>{if(!R.current||!C.current)return;let e={placement:t,strategy:n,middleware:p};S.current&&(e.platform=S.current),el(R.current,C.current,e).then(e=>{let t={...e,isPositioned:!1!==T.current};N.current&&!ec(P.current,t)&&(P.current=t,ea.flushSync(()=>{d(t)}))})},[p,t,n,S,T]);eu(()=>{!1===s&&P.current.isPositioned&&(P.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[s]);let N=r.useRef(!1);eu(()=>(N.current=!0,()=>{N.current=!1}),[]),eu(()=>{if(x&&(R.current=x),E&&(C.current=E),x&&E){if(O.current)return O.current(x,E,A);A()}},[x,E,A,O,L]);let k=r.useMemo(()=>({reference:R,floating:C,setReference:w,setFloating:b}),[w,b]),j=r.useMemo(()=>({reference:x,floating:E}),[x,E]),D=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!j.floating)return e;let t=ef(j.floating,f.x),r=ef(j.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...es(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,j.floating,f.x,f.y]);return r.useMemo(()=>({...f,update:A,refs:k,elements:j,floatingStyles:D}),[f,A,k,j,D])}({strategy:"fixed",placement:v+("center"!==g?"-"+g:""),whileElementsMounted:function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e,t,n,r){let o;void 0===r&&(r={});let{ancestorScroll:a=!0,ancestorResize:c=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:f="function"==typeof IntersectionObserver,animationFrame:d=!1}=r,p=K(e),m=a||c?[...p?$(p):[],...$(t)]:[];m.forEach(e=>{a&&e.addEventListener("scroll",n,{passive:!0}),c&&e.addEventListener("resize",n)});let v=p&&f?function(e,t){let n,r=null,o=N(e);function a(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function c(s,f){void 0===s&&(s=!1),void 0===f&&(f=1),a();let{left:d,top:p,width:m,height:v}=e.getBoundingClientRect();if(s||t(),!m||!v)return;let h=u(p),g=u(o.clientWidth-(d+m)),y={rootMargin:-h+"px "+-g+"px "+-u(o.clientHeight-(p+v))+"px "+-u(d)+"px",threshold:l(0,i(1,f))||1},w=!0;function b(e){let t=e[0].intersectionRatio;if(t!==f){if(!w)return c();t?c(!1,t):n=setTimeout(()=>{c(!1,1e-7)},1e3)}w=!1}try{r=new IntersectionObserver(b,{...y,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(b,y)}r.observe(e)}(!0),a}(p,n):null,h=-1,g=null;s&&(g=new ResizeObserver(e=>{let[r]=e;r&&r.target===p&&g&&(g.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=g)||e.observe(t)})),n()}),p&&!d&&g.observe(p),g.observe(t));let y=d?G(e):null;return d&&function t(){let r=G(e);y&&(r.x!==y.x||r.y!==y.y||r.width!==y.width||r.height!==y.height)&&n(),y=r,o=requestAnimationFrame(t)}(),n(),()=>{var e;m.forEach(e=>{a&&e.removeEventListener("scroll",n),c&&e.removeEventListener("resize",n)}),null==v||v(),null==(e=g)||e.disconnect(),g=null,d&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===P})},elements:{reference:S.anchor},middleware:[em({mainAxis:h+M,alignmentAxis:y}),b&&ev({mainAxis:!0,crossAxis:!1,limiter:"partial"===R?eh():void 0,...I}),b&&eg({...I}),ey({...I,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:i,height:l}=n.reference,a=t.floating.style;a.setProperty("--radix-popper-available-width","".concat(r,"px")),a.setProperty("--radix-popper-available-height","".concat(o,"px")),a.setProperty("--radix-popper-anchor-width","".concat(i,"px")),a.setProperty("--radix-popper-anchor-height","".concat(l,"px"))}}),j&&eb({element:j,padding:w}),eV({arrowWidth:F,arrowHeight:M}),C&&ew({strategy:"referenceHidden",...I})]}),[Z,U]=eK(X),J=(0,eO.W)(L);(0,eS.b)(()=>{V&&(null==J||J())},[V,J]);let Q=null===(n=q.arrow)||void 0===n?void 0:n.x,ee=null===(o=q.arrow)||void 0===o?void 0:o.y,et=(null===(a=q.arrow)||void 0===a?void 0:a.centerOffset)!==0,[en,er]=r.useState();return(0,eS.b)(()=>{T&&er(window.getComputedStyle(T).zIndex)},[T]),(0,eE.jsx)("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:V?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:en,"--radix-popper-transform-origin":[null===(c=q.transformOrigin)||void 0===c?void 0:c.x,null===(s=q.transformOrigin)||void 0===s?void 0:s.y].join(" "),...(null===(f=q.hide)||void 0===f?void 0:f.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,eE.jsx)(eB,{scope:m,placedSide:Z,onArrowChange:D,arrowX:Q,arrowY:ee,shouldHideArrow:et,children:(0,eE.jsx)(eL.div,{"data-side":Z,"data-align":U,...O,ref:k,style:{...O.style,animation:V?void 0:"none"}})})})});eI.displayName=eH;var e_="PopperArrow",eY={top:"bottom",right:"left",bottom:"top",left:"right"},e$=r.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,o=ez(e_,n),i=eY[o.placedSide];return(0,eE.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,eE.jsx)(eC,{...r,ref:t,style:{...r.style,display:"block"}})})});function eX(e){return null!==e}e$.displayName=e_;var eV=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,l;let{placement:a,rects:u,middlewareData:c}=t,s=(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset)!==0,f=s?0:e.arrowWidth,d=s?0:e.arrowHeight,[p,m]=eK(a),v={start:"0%",center:"50%",end:"100%"}[m],h=(null!==(i=null===(r=c.arrow)||void 0===r?void 0:r.x)&&void 0!==i?i:0)+f/2,g=(null!==(l=null===(o=c.arrow)||void 0===o?void 0:o.y)&&void 0!==l?l:0)+d/2,y="",w="";return"bottom"===p?(y=s?v:"".concat(h,"px"),w="".concat(-d,"px")):"top"===p?(y=s?v:"".concat(h,"px"),w="".concat(u.floating.height+d,"px")):"right"===p?(y="".concat(-d,"px"),w=s?v:"".concat(g,"px")):"left"===p&&(y="".concat(u.floating.width+d,"px"),w=s?v:"".concat(g,"px")),{data:{x:y,y:w}}}});function eK(e){let[t,n="center"]=e.split("-");return[t,n]}var eq=eW,eZ=eM,eU=eI,eG=e$},53425:function(e,t,n){n.d(t,{h:function(){return c}});var r=n(7653),o=n(3458),i=n(29602),l=n(27573),a=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=r.forwardRef((e,n)=>{let{asChild:r,...o}=e,a=r?i.g7:t;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(a,{...o,ref:n})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),u=n(32316),c=r.forwardRef((e,t)=>{var n,i;let{container:c,...s}=e,[f,d]=r.useState(!1);(0,u.b)(()=>d(!0),[]);let p=c||f&&(null===(i=globalThis)||void 0===i?void 0:null===(n=i.document)||void 0===n?void 0:n.body);return p?o.createPortal((0,l.jsx)(a.div,{...s,ref:t}),p):null});c.displayName="Portal"},68288:function(e,t,n){n.d(t,{t:function(){return i}});var r=n(7653),o=n(32316);function i(e){let[t,n]=r.useState(void 0);return(0,o.b)(()=>{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}},16516:function(e,t,n){n.d(t,{w_:function(){return s}});var r=n(7653),o={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},i=r.createContext&&r.createContext(o),l=["attr","size","title"];function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach(function(t){var r,o;r=t,o=n[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in e?Object.defineProperty(e,r,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[r]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function s(e){return t=>r.createElement(f,a({attr:c({},e.attr)},t),function e(t){return t&&t.map((t,n)=>r.createElement(t.tag,c({key:n},t.attr),e(t.child)))}(e.child))}function f(e){var t=t=>{var n,{attr:o,size:i,title:u}=e,s=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,l),f=i||t.size||"1em";return t.className&&(n=t.className),e.className&&(n=(n?n+" ":"")+e.className),r.createElement("svg",a({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,o,s,{className:n,style:c(c({color:e.color||t.color},t.style),e.style),height:f,width:f,xmlns:"http://www.w3.org/2000/svg"}),u&&r.createElement("title",null,u),e.children)};return void 0!==i?r.createElement(i.Consumer,null,e=>t(e)):t(o)}}}]);