"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[401],{9374:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.314.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(1319).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},7006:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.314.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(1319).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},4107:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.314.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(1319).Z)("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]])},1312:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.314.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(1319).Z)("ChevronsUpDown",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]])},40:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.314.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(1319).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},6433:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.314.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(1319).Z)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]])},7355:function(e,t,n){n.d(t,{Z:function(){return r}});/**
 * @license lucide-react v0.314.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,n(1319).Z)("Trash",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}]])},2600:function(e,t,n){var r=n(3197);n.o(r,"usePathname")&&n.d(t,{usePathname:function(){return r.usePathname}}),n.o(r,"useSearchParams")&&n.d(t,{useSearchParams:function(){return r.useSearchParams}})},9438:function(e,t,n){n.d(t,{B:function(){return a}});var r=n(8803),o=n(9352),l=n(6957),i=n(8155);function a(e){let t=e+"CollectionProvider",[n,a]=(0,o.b)(t),[u,c]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e+"CollectionSlot",d=r.forwardRef((e,t)=>{let{scope:n,children:o}=e,a=c(s,n),u=(0,l.e)(t,a.collectionRef);return r.createElement(i.g7,{ref:u},o)}),f=e+"CollectionItemSlot",p="data-radix-collection-item";return[{Provider:e=>{let{scope:t,children:n}=e,o=r.useRef(null),l=r.useRef(new Map).current;return r.createElement(u,{scope:t,itemMap:l,collectionRef:o},n)},Slot:d,ItemSlot:r.forwardRef((e,t)=>{let{scope:n,children:o,...a}=e,u=r.useRef(null),s=(0,l.e)(t,u),d=c(f,n);return r.useEffect(()=>(d.itemMap.set(u,{ref:u,...a}),()=>void d.itemMap.delete(u))),r.createElement(i.g7,{[p]:"",ref:s},o)})},function(t){let n=c(e+"CollectionConsumer",t);return r.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll("[".concat(p,"]")));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])},a]}},2124:function(e,t,n){n.d(t,{VY:function(){return W},fC:function(){return N},h_:function(){return Z},xz:function(){return F}});var r=n(1988),o=n(8803),l=n(7656),i=n(6957),a=n(9352),u=n(1219),c=n(4220),s=n(6267),d=n(951),f=n(8048),p=n(1214),m=n(3214),v=n(564),h=n(8155),g=n(9057),w=n(9694),y=n(2294);let b="Popover",[E,x]=(0,a.b)(b,[f.D7]),C=(0,f.D7)(),[S,R]=E(b),P=(0,o.forwardRef)((e,t)=>{let{__scopePopover:n,...a}=e,u=R("PopoverTrigger",n),c=C(n),s=(0,i.e)(t,u.triggerRef),d=(0,o.createElement)(v.WV.button,(0,r.Z)({type:"button","aria-haspopup":"dialog","aria-expanded":u.open,"aria-controls":u.contentId,"data-state":I(u.open)},a,{ref:s,onClick:(0,l.M)(e.onClick,u.onOpenToggle)}));return u.hasCustomAnchor?d:(0,o.createElement)(f.ee,(0,r.Z)({asChild:!0},c),d)}),k="PopoverPortal",[A,O]=E(k,{forceMount:void 0}),D="PopoverContent",M=(0,o.forwardRef)((e,t)=>{let n=O(D,e.__scopePopover),{forceMount:l=n.forceMount,...i}=e,a=R(D,e.__scopePopover);return(0,o.createElement)(m.z,{present:l||a.open},a.modal?(0,o.createElement)(T,(0,r.Z)({},i,{ref:t})):(0,o.createElement)(_,(0,r.Z)({},i,{ref:t})))}),T=(0,o.forwardRef)((e,t)=>{let n=R(D,e.__scopePopover),a=(0,o.useRef)(null),u=(0,i.e)(t,a),c=(0,o.useRef)(!1);return(0,o.useEffect)(()=>{let e=a.current;if(e)return(0,w.Ry)(e)},[]),(0,o.createElement)(y.Z,{as:h.g7,allowPinchZoom:!0},(0,o.createElement)(L,(0,r.Z)({},e,{ref:u,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,l.M)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),c.current||null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,l.M)(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;c.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:(0,l.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})))}),_=(0,o.forwardRef)((e,t)=>{let n=R(D,e.__scopePopover),l=(0,o.useRef)(!1),i=(0,o.useRef)(!1);return(0,o.createElement)(L,(0,r.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,o;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current||null===(o=n.triggerRef.current)||void 0===o||o.focus(),t.preventDefault()),l.current=!1,i.current=!1},onInteractOutside:t=>{var r,o;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(l.current=!0,"pointerdown"!==t.detail.originalEvent.type||(i.current=!0));let a=t.target;(null===(o=n.triggerRef.current)||void 0===o?void 0:o.contains(a))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&i.current&&t.preventDefault()}}))}),L=(0,o.forwardRef)((e,t)=>{let{__scopePopover:n,trapFocus:l,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:v,onInteractOutside:h,...g}=e,w=R(D,n),y=C(n);return(0,c.EW)(),(0,o.createElement)(s.M,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:i,onUnmountAutoFocus:a},(0,o.createElement)(u.XB,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:h,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:v,onDismiss:()=>w.onOpenChange(!1)},(0,o.createElement)(f.VY,(0,r.Z)({"data-state":I(w.open),role:"dialog",id:w.contentId},y,g,{ref:t,style:{...g.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)"}}))))});function I(e){return e?"open":"closed"}let N=e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:l,onOpenChange:i,modal:a=!1}=e,u=C(t),c=(0,o.useRef)(null),[s,p]=(0,o.useState)(!1),[m=!1,v]=(0,g.T)({prop:r,defaultProp:l,onChange:i});return(0,o.createElement)(f.fC,u,(0,o.createElement)(S,{scope:t,contentId:(0,d.M)(),triggerRef:c,open:m,onOpenChange:v,onOpenToggle:(0,o.useCallback)(()=>v(e=>!e),[v]),hasCustomAnchor:s,onCustomAnchorAdd:(0,o.useCallback)(()=>p(!0),[]),onCustomAnchorRemove:(0,o.useCallback)(()=>p(!1),[]),modal:a},n))},F=P,Z=e=>{let{__scopePopover:t,forceMount:n,children:r,container:l}=e,i=R(k,t);return(0,o.createElement)(A,{scope:t,forceMount:n},(0,o.createElement)(m.z,{present:n||i.open},(0,o.createElement)(p.h,{asChild:!0,container:l},r)))},W=M},8048:function(e,t,n){n.d(t,{ee:function(){return e_},Eh:function(){return eI},VY:function(){return eL},fC:function(){return eT},D7:function(){return ey}});var r=n(1988),o=n(8803);let l=["top","right","bottom","left"],i=Math.min,a=Math.max,u=Math.round,c=Math.floor,s=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function p(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function h(e){return"x"===e?"y":"x"}function g(e){return"y"===e?"height":"width"}function w(e){return["top","bottom"].includes(m(e))?"y":"x"}function y(e){return e.replace(/start|end/g,e=>f[e])}function b(e){return e.replace(/left|right|bottom|top/g,e=>d[e])}function E(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){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function C(e,t,n){let r,{reference:o,floating:l}=e,i=w(t),a=h(w(t)),u=g(a),c=m(t),s="y"===i,d=o.x+o.width/2-l.width/2,f=o.y+o.height/2-l.height/2,p=o[u]/2-l[u]/2;switch(c){case"top":r={x:d,y:o.y-l.height};break;case"bottom":r={x:d,y:o.y+o.height};break;case"right":r={x:o.x+o.width,y:f};break;case"left":r={x:o.x-l.width,y:f};break;default:r={x:o.x,y:o.y}}switch(v(t)){case"start":r[a]-=p*(n&&s?-1:1);break;case"end":r[a]+=p*(n&&s?-1:1)}return r}let S=async(e,t,n)=>{let{placement:r="bottom",strategy:o="absolute",middleware:l=[],platform:i}=n,a=l.filter(Boolean),u=await (null==i.isRTL?void 0:i.isRTL(t)),c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:s,y:d}=C(c,r,u),f=r,p={},m=0;for(let n=0;n<a.length;n++){let{name:l,fn:v}=a[n],{x:h,y:g,data:w,reset:y}=await v({x:s,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:c,platform:i,elements:{reference:e,floating:t}});if(s=null!=h?h:s,d=null!=g?g:d,p={...p,[l]:{...p[l],...w}},y&&m<=50){m++,"object"==typeof y&&(y.placement&&(f=y.placement),y.rects&&(c=!0===y.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):y.rects),{x:s,y:d}=C(c,f,u)),n=-1;continue}}return{x:s,y:d,placement:f,strategy:o,middlewareData:p}};async function R(e,t){var n;void 0===t&&(t={});let{x:r,y:o,platform:l,rects:i,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:s="viewport",elementContext:d="floating",altBoundary:f=!1,padding:m=0}=p(t,e),v=E(m),h=a[f?"floating"===d?"reference":"floating":d],g=x(await l.getClippingRect({element:null==(n=await (null==l.isElement?void 0:l.isElement(h)))||n?h:h.contextElement||await (null==l.getDocumentElement?void 0:l.getDocumentElement(a.floating)),boundary:c,rootBoundary:s,strategy:u})),w="floating"===d?{...i.floating,x:r,y:o}:i.reference,y=await (null==l.getOffsetParent?void 0:l.getOffsetParent(a.floating)),b=await (null==l.isElement?void 0:l.isElement(y))&&await (null==l.getScale?void 0:l.getScale(y))||{x:1,y:1},C=x(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({rect:w,offsetParent:y,strategy:u}):w);return{top:(g.top-C.top+v.top)/b.y,bottom:(C.bottom-g.bottom+v.bottom)/b.y,left:(g.left-C.left+v.left)/b.x,right:(C.right-g.right+v.right)/b.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 k(e){return l.some(t=>e[t]>=0)}async function A(e,t){let{placement:n,platform:r,elements:o}=e,l=await (null==r.isRTL?void 0:r.isRTL(o.floating)),i=m(n),a=v(n),u="y"===w(n),c=["left","top"].includes(i)?-1:1,s=l&&u?-1:1,d=p(t,e),{mainAxis:f,crossAxis:h,alignmentAxis:g}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof g&&(h="end"===a?-1*g:g),u?{x:h*s,y:f*c}:{x:f*c,y:h*s}}function O(e){return T(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function M(e){var t;return null==(t=(T(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function T(e){return e instanceof Node||e instanceof D(e).Node}function _(e){return e instanceof Element||e instanceof D(e).Element}function L(e){return e instanceof HTMLElement||e instanceof D(e).HTMLElement}function I(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function N(e){let{overflow:t,overflowX:n,overflowY:r,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function F(e){let t=Z(),n=V(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 Z(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function W(e){return["html","body","#document"].includes(O(e))}function V(e){return D(e).getComputedStyle(e)}function H(e){return _(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function B(e){if("html"===O(e))return e;let t=e.assignedSlot||e.parentNode||I(e)&&e.host||M(e);return I(t)?t.host:t}function K(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let o=function e(t){let n=B(t);return W(n)?t.ownerDocument?t.ownerDocument.body:t.body:L(n)&&N(n)?n:e(n)}(e),l=o===(null==(r=e.ownerDocument)?void 0:r.body),i=D(o);return l?t.concat(i,i.visualViewport||[],N(o)?o:[],i.frameElement&&n?K(i.frameElement):[]):t.concat(o,K(o,[],n))}function z(e){let t=V(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,o=L(e),l=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=u(n)!==l||u(r)!==i;return a&&(n=l,r=i),{width:n,height:r,$:a}}function U(e){return _(e)?e:e.contextElement}function q(e){let t=U(e);if(!L(t))return s(1);let n=t.getBoundingClientRect(),{width:r,height:o,$:l}=z(t),i=(l?u(n.width):n.width)/r,a=(l?u(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}let Y=s(0);function j(e){let t=D(e);return Z()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Y}function X(e,t,n,r){var o;void 0===t&&(t=!1),void 0===n&&(n=!1);let l=e.getBoundingClientRect(),i=U(e),a=s(1);t&&(r?_(r)&&(a=q(r)):a=q(e));let u=(void 0===(o=n)&&(o=!1),r&&(!o||r===D(i))&&o)?j(i):s(0),c=(l.left+u.x)/a.x,d=(l.top+u.y)/a.y,f=l.width/a.x,p=l.height/a.y;if(i){let e=D(i),t=r&&_(r)?D(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=q(n),t=n.getBoundingClientRect(),r=V(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,l=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,d*=e.y,f*=e.x,p*=e.y,c+=o,d+=l,n=D(n).frameElement}}return x({width:f,height:p,x:c,y:d})}function $(e){return X(M(e)).left+H(e).scrollLeft}function G(e,t,n){let r;if("viewport"===t)r=function(e,t){let n=D(e),r=M(e),o=n.visualViewport,l=r.clientWidth,i=r.clientHeight,a=0,u=0;if(o){l=o.width,i=o.height;let e=Z();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,u=o.offsetTop)}return{width:l,height:i,x:a,y:u}}(e,n);else if("document"===t)r=function(e){let t=M(e),n=H(e),r=e.ownerDocument.body,o=a(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),l=a(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),i=-n.scrollLeft+$(e),u=-n.scrollTop;return"rtl"===V(r).direction&&(i+=a(t.clientWidth,r.clientWidth)-o),{width:o,height:l,x:i,y:u}}(M(e));else if(_(t))r=function(e,t){let n=X(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,l=L(e)?q(e):s(1),i=e.clientWidth*l.x;return{width:i,height:e.clientHeight*l.y,x:o*l.x,y:r*l.y}}(t,n);else{let n=j(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return x(r)}function J(e,t){return L(e)&&"fixed"!==V(e).position?t?t(e):e.offsetParent:null}function Q(e,t){let n=D(e);if(!L(e))return n;let r=J(e,t);for(;r&&["table","td","th"].includes(O(r))&&"static"===V(r).position;)r=J(r,t);return r&&("html"===O(r)||"body"===O(r)&&"static"===V(r).position&&!F(r))?n:r||function(e){let t=B(e);for(;L(t)&&!W(t);){if(F(t))return t;t=B(t)}return null}(e)||n}let ee=async function(e){let{reference:t,floating:n,strategy:r}=e,o=this.getOffsetParent||Q,l=this.getDimensions;return{reference:function(e,t,n){let r=L(t),o=M(t),l="fixed"===n,i=X(e,!0,l,t),a={scrollLeft:0,scrollTop:0},u=s(0);if(r||!r&&!l){if(("body"!==O(t)||N(o))&&(a=H(t)),r){let e=X(t,!0,l,t);u.x=e.x+t.clientLeft,u.y=e.y+t.clientTop}else o&&(u.x=$(o))}return{x:i.left+a.scrollLeft-u.x,y:i.top+a.scrollTop-u.y,width:i.width,height:i.height}}(t,await o(n),r),floating:{x:0,y:0,...await l(n)}}},et={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,o=L(n),l=M(n);if(n===l)return t;let i={scrollLeft:0,scrollTop:0},a=s(1),u=s(0);if((o||!o&&"fixed"!==r)&&(("body"!==O(n)||N(l))&&(i=H(n)),L(n))){let e=X(n);a=q(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-i.scrollLeft*a.x+u.x,y:t.y*a.y-i.scrollTop*a.y+u.y}},getDocumentElement:M,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e,l=[..."clippingAncestors"===n?function(e,t){let n=t.get(e);if(n)return n;let r=K(e,[],!1).filter(e=>_(e)&&"body"!==O(e)),o=null,l="fixed"===V(e).position,i=l?B(e):e;for(;_(i)&&!W(i);){let t=V(i),n=F(i);n||"fixed"!==t.position||(o=null),(l?!n&&!o:!n&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||N(i)&&!n&&function e(t,n){let r=B(t);return!(r===n||!_(r)||W(r))&&("fixed"===V(r).position||e(r,n))}(e,i))?r=r.filter(e=>e!==i):o=t,i=B(i)}return t.set(e,r),r}(t,this._c):[].concat(n),r],u=l[0],c=l.reduce((e,n)=>{let r=G(t,n,o);return e.top=a(r.top,e.top),e.right=i(r.right,e.right),e.bottom=i(r.bottom,e.bottom),e.left=a(r.left,e.left),e},G(t,u,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:Q,getElementRects:ee,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=z(e);return{width:t,height:n}},getScale:q,isElement:_,isRTL:function(e){return"rtl"===V(e).direction}},en=e=>({name:"arrow",options:e,async fn(t){let{x:n,y:r,placement:o,rects:l,platform:u,elements:c,middlewareData:s}=t,{element:d,padding:f=0}=p(e,t)||{};if(null==d)return{};let m=E(f),y={x:n,y:r},b=h(w(o)),x=g(b),C=await u.getDimensions(d),S="y"===b,R=S?"clientHeight":"clientWidth",P=l.reference[x]+l.reference[b]-y[b]-l.floating[x],k=y[b]-l.reference[b],A=await (null==u.getOffsetParent?void 0:u.getOffsetParent(d)),O=A?A[R]:0;O&&await (null==u.isElement?void 0:u.isElement(A))||(O=c.floating[R]||l.floating[x]);let D=O/2-C[x]/2-1,M=i(m[S?"top":"left"],D),T=i(m[S?"bottom":"right"],D),_=O-C[x]-T,L=O/2-C[x]/2+(P/2-k/2),I=a(M,i(L,_)),N=!s.arrow&&null!=v(o)&&L!=I&&l.reference[x]/2-(L<M?M:T)-C[x]/2<0,F=N?L<M?L-M:L-_:0;return{[b]:y[b]+F,data:{[b]:I,centerOffset:L-I-F,...N&&{alignmentOffset:F}},reset:N}}}),er=(e,t,n)=>{let r=new Map,o={platform:et,...n},l={...o.platform,_c:r};return S(e,t,{...o,platform:l})};var eo=n(9805);let el=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?en({element:n.current,padding:r}).fn(t):{}:n?en({element:n,padding:r}).fn(t):{}}});var ei="undefined"!=typeof document?o.useLayoutEffect:o.useEffect;function ea(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(!ea(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)&&!ea(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function eu(e){return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ec(e,t){let n=eu(e);return Math.round(t*n)/n}function es(e){let t=o.useRef(e);return ei(()=>{t.current=e}),t}var ed=n(564);let ef=(0,o.forwardRef)((e,t)=>{let{children:n,width:l=10,height:i=5,...a}=e;return(0,o.createElement)(ed.WV.svg,(0,r.Z)({},a,{ref:t,width:l,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?n:(0,o.createElement)("polygon",{points:"0,0 30,0 15,10"}))});var ep=n(6957),em=n(9352),ev=n(6896),eh=n(8843);let eg="Popper",[ew,ey]=(0,em.b)(eg),[eb,eE]=ew(eg),ex=(0,o.forwardRef)((e,t)=>{let{__scopePopper:n,virtualRef:l,...i}=e,a=eE("PopperAnchor",n),u=(0,o.useRef)(null),c=(0,ep.e)(t,u);return(0,o.useEffect)(()=>{a.onAnchorChange((null==l?void 0:l.current)||u.current)}),l?null:(0,o.createElement)(ed.WV.div,(0,r.Z)({},i,{ref:c}))}),eC="PopperContent",[eS,eR]=ew(eC),eP=(0,o.forwardRef)((e,t)=>{var n,l,u,s,d,f,E,x,C,S,O,D,T,_;let{__scopePopper:L,side:I="bottom",sideOffset:N=0,align:F="center",alignOffset:Z=0,arrowPadding:W=0,avoidCollisions:V=!0,collisionBoundary:H=[],collisionPadding:B=0,sticky:z="partial",hideWhenDetached:q=!1,updatePositionStrategy:Y="optimized",onPlaced:j,...$}=e,G=eE(eC,L),[J,Q]=(0,o.useState)(null),ee=(0,ep.e)(t,e=>Q(e)),[et,en]=(0,o.useState)(null),ef=function(e){let[t,n]=(0,o.useState)(void 0);return(0,eh.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 l=t[0];if("borderBoxSize"in l){let e=l.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}(et),em=null!==(n=null==ef?void 0:ef.width)&&void 0!==n?n:0,eg=null!==(l=null==ef?void 0:ef.height)&&void 0!==l?l:0,ew="number"==typeof B?B:{top:0,right:0,bottom:0,left:0,...B},ey=Array.isArray(H)?H:[H],eb=ey.length>0,ex={padding:ew,boundary:ey.filter(eO),altBoundary:eb},{refs:eR,floatingStyles:eP,placement:ek,isPositioned:eA,middlewareData:eT}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:l,elements:{reference:i,floating:a}={},transform:u=!0,whileElementsMounted:c,open:s}=e,[d,f]=o.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=o.useState(r);ea(p,r)||m(r);let[v,h]=o.useState(null),[g,w]=o.useState(null),y=o.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=o.useCallback(e=>{e!==S.current&&(S.current=e,w(e))},[]),E=i||v,x=a||g,C=o.useRef(null),S=o.useRef(null),R=o.useRef(d),P=null!=c,k=es(c),A=es(l),O=o.useCallback(()=>{if(!C.current||!S.current)return;let e={placement:t,strategy:n,middleware:p};A.current&&(e.platform=A.current),er(C.current,S.current,e).then(e=>{let t={...e,isPositioned:!0};D.current&&!ea(R.current,t)&&(R.current=t,eo.flushSync(()=>{f(t)}))})},[p,t,n,A]);ei(()=>{!1===s&&R.current.isPositioned&&(R.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[s]);let D=o.useRef(!1);ei(()=>(D.current=!0,()=>{D.current=!1}),[]),ei(()=>{if(E&&(C.current=E),x&&(S.current=x),E&&x){if(k.current)return k.current(E,x,O);O()}},[E,x,O,k,P]);let M=o.useMemo(()=>({reference:C,floating:S,setReference:y,setFloating:b}),[y,b]),T=o.useMemo(()=>({reference:E,floating:x}),[E,x]),_=o.useMemo(()=>{let e={position:n,left:0,top:0};if(!T.floating)return e;let t=ec(T.floating,d.x),r=ec(T.floating,d.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...eu(T.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,T.floating,d.x,d.y]);return o.useMemo(()=>({...d,update:O,refs:M,elements:T,floatingStyles:_}),[d,O,M,T,_])}({strategy:"fixed",placement:I+("center"!==F?"-"+F:""),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:l=!0,ancestorResize:u=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:d="function"==typeof IntersectionObserver,animationFrame:f=!1}=r,p=U(e),m=l||u?[...p?K(p):[],...K(t)]:[];m.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)});let v=p&&d?function(e,t){let n,r=null,o=M(e);function l(){clearTimeout(n),r&&r.disconnect(),r=null}return!function u(s,d){void 0===s&&(s=!1),void 0===d&&(d=1),l();let{left:f,top:p,width:m,height:v}=e.getBoundingClientRect();if(s||t(),!m||!v)return;let h=c(p),g=c(o.clientWidth-(f+m)),w={rootMargin:-h+"px "+-g+"px "+-c(o.clientHeight-(p+v))+"px "+-c(f)+"px",threshold:a(0,i(1,d))||1},y=!0;function b(e){let t=e[0].intersectionRatio;if(t!==d){if(!y)return u();t?u(!1,t):n=setTimeout(()=>{u(!1,1e-7)},100)}y=!1}try{r=new IntersectionObserver(b,{...w,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(b,w)}r.observe(e)}(!0),l}(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(()=>{g&&g.observe(t)})),n()}),p&&!f&&g.observe(p),g.observe(t));let w=f?X(e):null;return f&&function t(){let r=X(e);w&&(r.x!==w.x||r.y!==w.y||r.width!==w.width||r.height!==w.height)&&n(),w=r,o=requestAnimationFrame(t)}(),n(),()=>{m.forEach(e=>{l&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)}),v&&v(),g&&g.disconnect(),g=null,f&&cancelAnimationFrame(o)}}(...t,{animationFrame:"always"===Y})},elements:{reference:G.anchor},middleware:[{name:"offset",options:C={mainAxis:N+eg,alignmentAxis:Z},async fn(e){var t,n;let{x:r,y:o,placement:l,middlewareData:i}=e,a=await A(e,C);return l===(null==(t=i.offset)?void 0:t.placement)&&null!=(n=i.arrow)&&n.alignmentOffset?{}:{x:r+a.x,y:o+a.y,data:{...a,placement:l}}}},V&&{name:"shift",options:O={mainAxis:!0,crossAxis:!1,limiter:"partial"===z?(void 0===S&&(S={}),{options:S,fn(e){let{x:t,y:n,placement:r,rects:o,middlewareData:l}=e,{offset:i=0,mainAxis:a=!0,crossAxis:u=!0}=p(S,e),c={x:t,y:n},s=w(r),d=h(s),f=c[d],v=c[s],g=p(i,e),y="number"==typeof g?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(a){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+y.mainAxis,n=o.reference[d]+o.reference[e]-y.mainAxis;f<t?f=t:f>n&&(f=n)}if(u){var b,E;let e="y"===d?"width":"height",t=["top","left"].includes(m(r)),n=o.reference[s]-o.floating[e]+(t&&(null==(b=l.offset)?void 0:b[s])||0)+(t?0:y.crossAxis),i=o.reference[s]+o.reference[e]+(t?0:(null==(E=l.offset)?void 0:E[s])||0)-(t?y.crossAxis:0);v<n?v=n:v>i&&(v=i)}return{[d]:f,[s]:v}}}):void 0,...ex},async fn(e){let{x:t,y:n,placement:r}=e,{mainAxis:o=!0,crossAxis:l=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=p(O,e),s={x:t,y:n},d=await R(e,c),f=w(m(r)),v=h(f),g=s[v],y=s[f];if(o){let e="y"===v?"top":"left",t="y"===v?"bottom":"right",n=g+d[e],r=g-d[t];g=a(n,i(g,r))}if(l){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=y+d[e],r=y-d[t];y=a(n,i(y,r))}let b=u.fn({...e,[v]:g,[f]:y});return{...b,data:{x:b.x-t,y:b.y-n}}}},V&&{name:"flip",options:D={...ex},async fn(e){var t,n,r,o,l;let{placement:i,middlewareData:a,rects:u,initialPlacement:c,platform:s,elements:d}=e,{mainAxis:f=!0,crossAxis:E=!0,fallbackPlacements:x,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:P=!0,...k}=p(D,e);if(null!=(t=a.arrow)&&t.alignmentOffset)return{};let A=m(i),O=m(c)===c,M=await (null==s.isRTL?void 0:s.isRTL(d.floating)),T=x||(O||!P?[b(c)]:function(e){let t=b(e);return[y(e),t,y(t)]}(c));x||"none"===S||T.push(...function(e,t,n,r){let o=v(e),l=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[]}}(m(e),"start"===n,r);return o&&(l=l.map(e=>e+"-"+o),t&&(l=l.concat(l.map(y)))),l}(c,P,S,M));let _=[c,...T],L=await R(e,k),I=[],N=(null==(n=a.flip)?void 0:n.overflows)||[];if(f&&I.push(L[A]),E){let e=function(e,t,n){void 0===n&&(n=!1);let r=v(e),o=h(w(e)),l=g(o),i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[l]>t.floating[l]&&(i=b(i)),[i,b(i)]}(i,u,M);I.push(L[e[0]],L[e[1]])}if(N=[...N,{placement:i,overflows:I}],!I.every(e=>e<=0)){let e=((null==(r=a.flip)?void 0:r.index)||0)+1,t=_[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let n=null==(o=N.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!n)switch(C){case"bestFit":{let e=null==(l=N.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=c}if(i!==n)return{reset:{placement:n}}}return{}}},{name:"size",options:T={...ex,apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:o}=e,{width:l,height:i}=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(l,"px")),a.setProperty("--radix-popper-anchor-height","".concat(i,"px"))}},async fn(e){let t,n;let{placement:r,rects:o,platform:l,elements:u}=e,{apply:c=()=>{},...s}=p(T,e),d=await R(e,s),f=m(r),h=v(r),g="y"===w(r),{width:y,height:b}=o.floating;"top"===f||"bottom"===f?(t=f,n=h===(await (null==l.isRTL?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(n=f,t="end"===h?"top":"bottom");let E=b-d[t],x=y-d[n],C=!e.middlewareData.shift,S=E,P=x;if(g){let e=y-d.left-d.right;P=h||C?i(x,e):e}else{let e=b-d.top-d.bottom;S=h||C?i(E,e):e}if(C&&!h){let e=a(d.left,0),t=a(d.right,0),n=a(d.top,0),r=a(d.bottom,0);g?P=y-2*(0!==e||0!==t?e+t:a(d.left,d.right)):S=b-2*(0!==n||0!==r?n+r:a(d.top,d.bottom))}await c({...e,availableWidth:P,availableHeight:S});let k=await l.getDimensions(u.floating);return y!==k.width||b!==k.height?{reset:{rects:!0}}:{}}},et&&el({element:et,padding:W}),eD({arrowWidth:em,arrowHeight:eg}),q&&{name:"hide",options:_={strategy:"referenceHidden",...ex},async fn(e){let{rects:t}=e,{strategy:n="referenceHidden",...r}=p(_,e);switch(n){case"referenceHidden":{let n=P(await R(e,{...r,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:k(n)}}}case"escaped":{let n=P(await R(e,{...r,altBoundary:!0}),t.floating);return{data:{escapedOffsets:n,escaped:k(n)}}}default:return{}}}}]}),[e_,eL]=eM(ek),eI=(0,ev.W)(j);(0,eh.b)(()=>{eA&&(null==eI||eI())},[eA,eI]);let eN=null===(u=eT.arrow)||void 0===u?void 0:u.x,eF=null===(s=eT.arrow)||void 0===s?void 0:s.y,eZ=(null===(d=eT.arrow)||void 0===d?void 0:d.centerOffset)!==0,[eW,eV]=(0,o.useState)();return(0,eh.b)(()=>{J&&eV(window.getComputedStyle(J).zIndex)},[J]),(0,o.createElement)("div",{ref:eR.setFloating,"data-radix-popper-content-wrapper":"",style:{...eP,transform:eA?eP.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eW,"--radix-popper-transform-origin":[null===(f=eT.transformOrigin)||void 0===f?void 0:f.x,null===(E=eT.transformOrigin)||void 0===E?void 0:E.y].join(" ")},dir:e.dir},(0,o.createElement)(eS,{scope:L,placedSide:e_,onArrowChange:en,arrowX:eN,arrowY:eF,shouldHideArrow:eZ},(0,o.createElement)(ed.WV.div,(0,r.Z)({"data-side":e_,"data-align":eL},$,{ref:ee,style:{...$.style,animation:eA?void 0:"none",opacity:null!==(x=eT.hide)&&void 0!==x&&x.referenceHidden?0:void 0}}))))}),ek={top:"bottom",right:"left",bottom:"top",left:"right"},eA=(0,o.forwardRef)(function(e,t){let{__scopePopper:n,...l}=e,i=eR("PopperArrow",n),a=ek[i.placedSide];return(0,o.createElement)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]: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}},(0,o.createElement)(ef,(0,r.Z)({},l,{ref:t,style:{...l.style,display:"block"}})))});function eO(e){return null!==e}let eD=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,l,i;let{placement:a,rects:u,middlewareData:c}=t,s=(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset)!==0,d=s?0:e.arrowWidth,f=s?0:e.arrowHeight,[p,m]=eM(a),v={start:"0%",center:"50%",end:"100%"}[m],h=(null!==(r=null===(o=c.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,g=(null!==(l=null===(i=c.arrow)||void 0===i?void 0:i.y)&&void 0!==l?l:0)+f/2,w="",y="";return"bottom"===p?(w=s?v:"".concat(h,"px"),y="".concat(-f,"px")):"top"===p?(w=s?v:"".concat(h,"px"),y="".concat(u.floating.height+f,"px")):"right"===p?(w="".concat(-f,"px"),y=s?v:"".concat(g,"px")):"left"===p&&(w="".concat(u.floating.width+f,"px"),y=s?v:"".concat(g,"px")),{data:{x:w,y:y}}}});function eM(e){let[t,n="center"]=e.split("-");return[t,n]}let eT=e=>{let{__scopePopper:t,children:n}=e,[r,l]=(0,o.useState)(null);return(0,o.createElement)(eb,{scope:t,anchor:r,onAnchorChange:l},n)},e_=ex,eL=eP,eI=eA},3896:function(e,t,n){n.d(t,{VY:function(){return eR},ZA:function(){return ek},JO:function(){return eC},ck:function(){return eO},wU:function(){return eM},eT:function(){return eD},__:function(){return eA},h_:function(){return eS},fC:function(){return eb},$G:function(){return e_},u_:function(){return eT},Z0:function(){return eL},xz:function(){return eE},B4:function(){return ex},l_:function(){return eP}});var r=n(1988),o=n(8803),l=n(9805);function i(e,t){let[n,r]=t;return Math.min(r,Math.max(n,e))}var a=n(7656),u=n(9438),c=n(6957),s=n(9352);let d=(0,o.createContext)(void 0);var f=n(1219),p=n(4220),m=n(6267),v=n(951),h=n(8048),g=n(1214),w=n(564),y=n(8155),b=n(6896),E=n(9057),x=n(8843),C=n(3325),S=n(9694),R=n(2294);let P=[" ","Enter","ArrowUp","ArrowDown"],k=[" ","Enter"],A="Select",[O,D,M]=(0,u.B)(A),[T,_]=(0,s.b)(A,[M,h.D7]),L=(0,h.D7)(),[I,N]=T(A),[F,Z]=T(A),W=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,disabled:l=!1,...i}=e,u=L(n),s=N("SelectTrigger",n),d=s.disabled||l,f=(0,c.e)(t,s.onTriggerChange),p=D(n),[m,v,g]=ew(e=>{let t=p().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=ey(t,e,n);void 0!==r&&s.onValueChange(r.value)}),y=()=>{d||(s.onOpenChange(!0),g())};return(0,o.createElement)(h.ee,(0,r.Z)({asChild:!0},u),(0,o.createElement)(w.WV.button,(0,r.Z)({type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":eh(s.value)?"":void 0},i,{ref:f,onClick:(0,a.M)(i.onClick,e=>{e.currentTarget.focus()}),onPointerDown:(0,a.M)(i.onPointerDown,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(y(),s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())}),onKeyDown:(0,a.M)(i.onKeyDown,e=>{let t=""!==m.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),(!t||" "!==e.key)&&P.includes(e.key)&&(y(),e.preventDefault())})})))}),V=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,className:l,style:i,children:a,placeholder:u="",...s}=e,d=N("SelectValue",n),{onValueNodeHasChildrenChange:f}=d,p=void 0!==a,m=(0,c.e)(t,d.onValueNodeChange);return(0,x.b)(()=>{f(p)},[f,p]),(0,o.createElement)(w.WV.span,(0,r.Z)({},s,{ref:m,style:{pointerEvents:"none"}}),eh(d.value)?(0,o.createElement)(o.Fragment,null,u):a)}),H=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,children:l,...i}=e;return(0,o.createElement)(w.WV.span,(0,r.Z)({"aria-hidden":!0},i,{ref:t}),l||"▼")}),B="SelectContent",K=(0,o.forwardRef)((e,t)=>{let n=N(B,e.__scopeSelect),[i,a]=(0,o.useState)();return((0,x.b)(()=>{a(new DocumentFragment)},[]),n.open)?(0,o.createElement)(q,(0,r.Z)({},e,{ref:t})):i?(0,l.createPortal)((0,o.createElement)(z,{scope:e.__scopeSelect},(0,o.createElement)(O.Slot,{scope:e.__scopeSelect},(0,o.createElement)("div",null,e.children))),i):null}),[z,U]=T(B),q=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,position:l="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:u,onPointerDownOutside:s,side:d,sideOffset:v,align:h,alignOffset:g,arrowPadding:w,collisionBoundary:b,collisionPadding:E,sticky:x,hideWhenDetached:C,avoidCollisions:P,...k}=e,A=N(B,n),[O,M]=(0,o.useState)(null),[T,_]=(0,o.useState)(null),L=(0,c.e)(t,e=>M(e)),[I,F]=(0,o.useState)(null),[Z,W]=(0,o.useState)(null),V=D(n),[H,K]=(0,o.useState)(!1),U=(0,o.useRef)(!1);(0,o.useEffect)(()=>{if(O)return(0,S.Ry)(O)},[O]),(0,p.EW)();let q=(0,o.useCallback)(e=>{let[t,...n]=V().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(let n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&T&&(T.scrollTop=0),n===r&&T&&(T.scrollTop=T.scrollHeight),null==n||n.focus(),document.activeElement!==o))return},[V,T]),X=(0,o.useCallback)(()=>q([I,O]),[q,I,O]);(0,o.useEffect)(()=>{H&&X()},[H,X]);let{onOpenChange:$,triggerPointerDownPosRef:G}=A;(0,o.useEffect)(()=>{if(O){let e={x:0,y:0},t=t=>{var n,r,o,l;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=G.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(l=G.current)||void 0===l?void 0:l.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():O.contains(n.target)||$(!1),document.removeEventListener("pointermove",t),G.current=null};return null!==G.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[O,$,G]),(0,o.useEffect)(()=>{let e=()=>$(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[$]);let[J,Q]=ew(e=>{let t=V().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=ey(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),ee=(0,o.useCallback)((e,t,n)=>{let r=!U.current&&!n;(void 0!==A.value&&A.value===t||r)&&(F(e),r&&(U.current=!0))},[A.value]),et=(0,o.useCallback)(()=>null==O?void 0:O.focus(),[O]),en=(0,o.useCallback)((e,t,n)=>{let r=!U.current&&!n;(void 0!==A.value&&A.value===t||r)&&W(e)},[A.value]),er="popper"===l?j:Y;return(0,o.createElement)(z,{scope:n,content:O,viewport:T,onViewportChange:_,itemRefCallback:ee,selectedItem:I,onItemLeave:et,itemTextRefCallback:en,focusSelectedItem:X,selectedItemText:Z,position:l,isPositioned:H,searchRef:J},(0,o.createElement)(R.Z,{as:y.g7,allowPinchZoom:!0},(0,o.createElement)(m.M,{asChild:!0,trapped:A.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,a.M)(i,e=>{var t;null===(t=A.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()})},(0,o.createElement)(f.XB,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:u,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>A.onOpenChange(!1)},(0,o.createElement)(er,(0,r.Z)({role:"listbox",id:A.contentId,"data-state":A.open?"open":"closed",dir:A.dir,onContextMenu:e=>e.preventDefault()},k,er===j?{side:d,sideOffset:v,align:h,alignOffset:g,arrowPadding:w,collisionBoundary:b,collisionPadding:E,sticky:x,hideWhenDetached:C,avoidCollisions:P}:{},{onPlaced:()=>K(!0),ref:L,style:{display:"flex",flexDirection:"column",outline:"none",...k.style},onKeyDown:(0,a.M)(k.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||Q(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=V().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>q(t)),e.preventDefault()}})}))))))}),Y=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,onPlaced:l,...a}=e,u=N(B,n),s=U(B,n),[d,f]=(0,o.useState)(null),[p,m]=(0,o.useState)(null),v=(0,c.e)(t,e=>m(e)),h=D(n),g=(0,o.useRef)(!1),y=(0,o.useRef)(!0),{viewport:b,selectedItem:E,selectedItemText:C,focusSelectedItem:S}=s,R=(0,o.useCallback)(()=>{if(u.trigger&&u.valueNode&&d&&p&&b&&E&&C){let e=u.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=u.valueNode.getBoundingClientRect(),r=C.getBoundingClientRect();if("rtl"!==u.dir){let o=r.left-t.left,l=n.left-o,a=e.left-l,u=e.width+a,c=Math.max(u,t.width),s=i(l,[10,window.innerWidth-10-c]);d.style.minWidth=u+"px",d.style.left=s+"px"}else{let o=t.right-r.right,l=window.innerWidth-n.right-o,a=window.innerWidth-e.right-l,u=e.width+a,c=Math.max(u,t.width),s=i(l,[10,window.innerWidth-10-c]);d.style.minWidth=u+"px",d.style.right=s+"px"}let o=h(),a=window.innerHeight-20,c=b.scrollHeight,s=window.getComputedStyle(p),f=parseInt(s.borderTopWidth,10),m=parseInt(s.paddingTop,10),v=parseInt(s.borderBottomWidth,10),w=f+m+c+parseInt(s.paddingBottom,10)+v,y=Math.min(5*E.offsetHeight,w),x=window.getComputedStyle(b),S=parseInt(x.paddingTop,10),R=parseInt(x.paddingBottom,10),P=e.top+e.height/2-10,k=E.offsetHeight/2,A=f+m+(E.offsetTop+k);if(A<=P){let e=E===o[o.length-1].ref.current;d.style.bottom="0px";let t=p.clientHeight-b.offsetTop-b.offsetHeight;d.style.height=A+Math.max(a-P,k+(e?R:0)+t+v)+"px"}else{let e=E===o[0].ref.current;d.style.top="0px";let t=Math.max(P,f+b.offsetTop+(e?S:0)+k);d.style.height=t+(w-A)+"px",b.scrollTop=A-P+b.offsetTop}d.style.margin="".concat(10,"px 0"),d.style.minHeight=y+"px",d.style.maxHeight=a+"px",null==l||l(),requestAnimationFrame(()=>g.current=!0)}},[h,u.trigger,u.valueNode,d,p,b,E,C,u.dir,l]);(0,x.b)(()=>R(),[R]);let[P,k]=(0,o.useState)();(0,x.b)(()=>{p&&k(window.getComputedStyle(p).zIndex)},[p]);let A=(0,o.useCallback)(e=>{e&&!0===y.current&&(R(),null==S||S(),y.current=!1)},[R,S]);return(0,o.createElement)(X,{scope:n,contentWrapper:d,shouldExpandOnScrollRef:g,onScrollButtonChange:A},(0,o.createElement)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:P}},(0,o.createElement)(w.WV.div,(0,r.Z)({},a,{ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}}))))}),j=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,align:l="start",collisionPadding:i=10,...a}=e,u=L(n);return(0,o.createElement)(h.VY,(0,r.Z)({},u,a,{ref:t,align:l,collisionPadding:i,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))}),[X,$]=T(B,{}),G="SelectViewport",J=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,...l}=e,i=U(G,n),u=$(G,n),s=(0,c.e)(t,i.onViewportChange),d=(0,o.useRef)(0);return(0,o.createElement)(o.Fragment,null,(0,o.createElement)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),(0,o.createElement)(O.Slot,{scope:n},(0,o.createElement)(w.WV.div,(0,r.Z)({"data-radix-select-viewport":"",role:"presentation"},l,{ref:s,style:{position:"relative",flex:1,overflow:"auto",...l.style},onScroll:(0,a.M)(l.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=u;if(null!=r&&r.current&&n){let e=Math.abs(d.current-t.scrollTop);if(e>0){let r=window.innerHeight-20,o=Math.max(parseFloat(n.style.minHeight),parseFloat(n.style.height));if(o<r){let l=o+e,i=Math.min(r,l),a=l-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=a>0?a:0,n.style.justifyContent="flex-end")}}}d.current=t.scrollTop})}))))}),[Q,ee]=T("SelectGroup"),et=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,...l}=e,i=(0,v.M)();return(0,o.createElement)(Q,{scope:n,id:i},(0,o.createElement)(w.WV.div,(0,r.Z)({role:"group","aria-labelledby":i},l,{ref:t})))}),en=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,...l}=e,i=ee("SelectLabel",n);return(0,o.createElement)(w.WV.div,(0,r.Z)({id:i.id},l,{ref:t}))}),er="SelectItem",[eo,el]=T(er),ei=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,value:l,disabled:i=!1,textValue:u,...s}=e,d=N(er,n),f=U(er,n),p=d.value===l,[m,h]=(0,o.useState)(null!=u?u:""),[g,y]=(0,o.useState)(!1),b=(0,c.e)(t,e=>{var t;return null===(t=f.itemRefCallback)||void 0===t?void 0:t.call(f,e,l,i)}),E=(0,v.M)(),x=()=>{i||(d.onValueChange(l),d.onOpenChange(!1))};if(""===l)throw Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,o.createElement)(eo,{scope:n,value:l,disabled:i,textId:E,isSelected:p,onItemTextChange:(0,o.useCallback)(e=>{h(t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()})},[])},(0,o.createElement)(O.ItemSlot,{scope:n,value:l,disabled:i,textValue:m},(0,o.createElement)(w.WV.div,(0,r.Z)({role:"option","aria-labelledby":E,"data-highlighted":g?"":void 0,"aria-selected":p&&g,"data-state":p?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1},s,{ref:b,onFocus:(0,a.M)(s.onFocus,()=>y(!0)),onBlur:(0,a.M)(s.onBlur,()=>y(!1)),onPointerUp:(0,a.M)(s.onPointerUp,x),onPointerMove:(0,a.M)(s.onPointerMove,e=>{if(i){var t;null===(t=f.onItemLeave)||void 0===t||t.call(f)}else e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,a.M)(s.onPointerLeave,e=>{if(e.currentTarget===document.activeElement){var t;null===(t=f.onItemLeave)||void 0===t||t.call(f)}}),onKeyDown:(0,a.M)(s.onKeyDown,e=>{var t;(null===(t=f.searchRef)||void 0===t?void 0:t.current)!==""&&" "===e.key||(k.includes(e.key)&&x()," "===e.key&&e.preventDefault())})}))))}),ea="SelectItemText",eu=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,className:i,style:a,...u}=e,s=N(ea,n),d=U(ea,n),f=el(ea,n),p=Z(ea,n),[m,v]=(0,o.useState)(null),h=(0,c.e)(t,e=>v(e),f.onItemTextChange,e=>{var t;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,f.value,f.disabled)}),g=null==m?void 0:m.textContent,y=(0,o.useMemo)(()=>(0,o.createElement)("option",{key:f.value,value:f.value,disabled:f.disabled},g),[f.disabled,f.value,g]),{onNativeOptionAdd:b,onNativeOptionRemove:E}=p;return(0,x.b)(()=>(b(y),()=>E(y)),[b,E,y]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)(w.WV.span,(0,r.Z)({id:f.textId},u,{ref:h})),f.isSelected&&s.valueNode&&!s.valueNodeHasChildren?(0,l.createPortal)(u.children,s.valueNode):null)}),ec=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,...l}=e;return el("SelectItemIndicator",n).isSelected?(0,o.createElement)(w.WV.span,(0,r.Z)({"aria-hidden":!0},l,{ref:t})):null}),es="SelectScrollUpButton",ed=(0,o.forwardRef)((e,t)=>{let n=U(es,e.__scopeSelect),l=$(es,e.__scopeSelect),[i,a]=(0,o.useState)(!1),u=(0,c.e)(t,l.onScrollButtonChange);return(0,x.b)(()=>{if(n.viewport&&n.isPositioned){let t=n.viewport;function e(){a(t.scrollTop>0)}return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,o.createElement)(em,(0,r.Z)({},e,{ref:u,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null}),ef="SelectScrollDownButton",ep=(0,o.forwardRef)((e,t)=>{let n=U(ef,e.__scopeSelect),l=$(ef,e.__scopeSelect),[i,a]=(0,o.useState)(!1),u=(0,c.e)(t,l.onScrollButtonChange);return(0,x.b)(()=>{if(n.viewport&&n.isPositioned){let t=n.viewport;function e(){let e=t.scrollHeight-t.clientHeight;a(Math.ceil(t.scrollTop)<e)}return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),i?(0,o.createElement)(em,(0,r.Z)({},e,{ref:u,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null}),em=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,onAutoScroll:l,...i}=e,u=U("SelectScrollButton",n),c=(0,o.useRef)(null),s=D(n),d=(0,o.useCallback)(()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)},[]);return(0,o.useEffect)(()=>()=>d(),[d]),(0,x.b)(()=>{var e;let t=s().find(e=>e.ref.current===document.activeElement);null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[s]),(0,o.createElement)(w.WV.div,(0,r.Z)({"aria-hidden":!0},i,{ref:t,style:{flexShrink:0,...i.style},onPointerDown:(0,a.M)(i.onPointerDown,()=>{null===c.current&&(c.current=window.setInterval(l,50))}),onPointerMove:(0,a.M)(i.onPointerMove,()=>{var e;null===(e=u.onItemLeave)||void 0===e||e.call(u),null===c.current&&(c.current=window.setInterval(l,50))}),onPointerLeave:(0,a.M)(i.onPointerLeave,()=>{d()})}))}),ev=(0,o.forwardRef)((e,t)=>{let{__scopeSelect:n,...l}=e;return(0,o.createElement)(w.WV.div,(0,r.Z)({"aria-hidden":!0},l,{ref:t}))});function eh(e){return""===e||void 0===e}let eg=(0,o.forwardRef)((e,t)=>{let{value:n,...l}=e,i=(0,o.useRef)(null),a=(0,c.e)(t,i),u=function(e){let t=(0,o.useRef)({value:e,previous:e});return(0,o.useMemo)(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}(n);return(0,o.useEffect)(()=>{let e=i.current,t=Object.getOwnPropertyDescriptor(window.HTMLSelectElement.prototype,"value").set;if(u!==n&&t){let r=new Event("change",{bubbles:!0});t.call(e,n),e.dispatchEvent(r)}},[u,n]),(0,o.createElement)(C.T,{asChild:!0},(0,o.createElement)("select",(0,r.Z)({},l,{ref:a,defaultValue:n})))});function ew(e){let t=(0,b.W)(e),n=(0,o.useRef)(""),r=(0,o.useRef)(0),l=(0,o.useCallback)(e=>{let o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(o)},[t]),i=(0,o.useCallback)(()=>{n.current="",window.clearTimeout(r.current)},[]);return(0,o.useEffect)(()=>()=>window.clearTimeout(r.current),[]),[n,l,i]}function ey(e,t,n){var r;let o=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,l=(r=Math.max(n?e.indexOf(n):-1,0),e.map((t,n)=>e[(r+n)%e.length]));1===o.length&&(l=l.filter(e=>e!==n));let i=l.find(e=>e.textValue.toLowerCase().startsWith(o.toLowerCase()));return i!==n?i:void 0}eg.displayName="BubbleSelect";let eb=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:l,onOpenChange:i,value:a,defaultValue:u,onValueChange:c,dir:s,name:f,autoComplete:p,disabled:m,required:g}=e,w=L(t),[y,b]=(0,o.useState)(null),[x,C]=(0,o.useState)(null),[S,R]=(0,o.useState)(!1),P=function(e){let t=(0,o.useContext)(d);return e||t||"ltr"}(s),[k=!1,A]=(0,E.T)({prop:r,defaultProp:l,onChange:i}),[D,M]=(0,E.T)({prop:a,defaultProp:u,onChange:c}),T=(0,o.useRef)(null),_=!y||!!y.closest("form"),[N,Z]=(0,o.useState)(new Set),W=Array.from(N).map(e=>e.props.value).join(";");return(0,o.createElement)(h.fC,w,(0,o.createElement)(I,{required:g,scope:t,trigger:y,onTriggerChange:b,valueNode:x,onValueNodeChange:C,valueNodeHasChildren:S,onValueNodeHasChildrenChange:R,contentId:(0,v.M)(),value:D,onValueChange:M,open:k,onOpenChange:A,dir:P,triggerPointerDownPosRef:T,disabled:m},(0,o.createElement)(O.Provider,{scope:t},(0,o.createElement)(F,{scope:e.__scopeSelect,onNativeOptionAdd:(0,o.useCallback)(e=>{Z(t=>new Set(t).add(e))},[]),onNativeOptionRemove:(0,o.useCallback)(e=>{Z(t=>{let n=new Set(t);return n.delete(e),n})},[])},n)),_?(0,o.createElement)(eg,{key:W,"aria-hidden":!0,required:g,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:e=>M(e.target.value),disabled:m},void 0===D?(0,o.createElement)("option",{value:""}):null,Array.from(N)):null))},eE=W,ex=V,eC=H,eS=e=>(0,o.createElement)(g.h,(0,r.Z)({asChild:!0},e)),eR=K,eP=J,ek=et,eA=en,eO=ei,eD=eu,eM=ec,eT=ed,e_=ep,eL=ev},3325:function(e,t,n){n.d(t,{T:function(){return i}});var r=n(1988),o=n(8803),l=n(564);let i=(0,o.forwardRef)((e,t)=>(0,o.createElement)(l.WV.span,(0,r.Z)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))},9493:function(e,t,n){let r,o;n.d(t,{mY:function(){return e5}});var l=/[\\\/_+.#"@\[\(\{&]/,i=/[\\\/_+.#"@\[\(\{&]/g,a=/[\s-]/,u=/[\s-]/g;function c(e){return e.toLowerCase().replace(u," ")}var s=n(1988),d=n(8803),f=n.t(d,2);function p(e,t){let{checkForDefaultPrevented:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function m(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>t.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})}function v(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,d.useCallback)(m(...t),t)}let h=(null==globalThis?void 0:globalThis.document)?d.useLayoutEffect:()=>{},g=f["useId".toString()]||(()=>void 0),w=0;function y(e){let[t,n]=d.useState(g());return h(()=>{e||n(e=>null!=e?e:String(w++))},[e]),e||(t?"radix-".concat(t):"")}function b(e){let t=(0,d.useRef)(e);return(0,d.useEffect)(()=>{t.current=e}),(0,d.useMemo)(()=>function(){for(var e,n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];return null===(e=t.current)||void 0===e?void 0:e.call(t,...r)},[])}var E=n(9805);let x=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e,o=d.Children.toArray(n),l=o.find(R);if(l){let e=l.props.children,n=o.map(t=>t!==l?t:d.Children.count(e)>1?d.Children.only(null):(0,d.isValidElement)(e)?e.props.children:null);return(0,d.createElement)(C,(0,s.Z)({},r,{ref:t}),(0,d.isValidElement)(e)?(0,d.cloneElement)(e,void 0,n):null)}return(0,d.createElement)(C,(0,s.Z)({},r,{ref:t}),n)});x.displayName="Slot";let C=(0,d.forwardRef)((e,t)=>{let{children:n,...r}=e;return(0,d.isValidElement)(n)?(0,d.cloneElement)(n,{...function(e,t){let n={...t};for(let r in t){let o=e[r],l=t[r];/^on[A-Z]/.test(r)?n[r]=function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];null==l||l(...t),null==o||o(...t)}:"style"===r?n[r]={...o,...l}:"className"===r&&(n[r]=[o,l].filter(Boolean).join(" "))}return{...e,...n}}(r,n.props),ref:m(t,n.ref)}):d.Children.count(n)>1?d.Children.only(null):null});C.displayName="SlotClone";let S=e=>{let{children:t}=e;return(0,d.createElement)(d.Fragment,null,t)};function R(e){return(0,d.isValidElement)(e)&&e.type===S}let P=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce((e,t)=>{let n=(0,d.forwardRef)((e,n)=>{let{asChild:r,...o}=e,l=r?x:t;return(0,d.useEffect)(()=>{window[Symbol.for("radix-ui")]=!0},[]),(0,d.createElement)(l,(0,s.Z)({},o,{ref:n}))});return n.displayName="Primitive.".concat(t),{...e,[t]:n}},{}),k="dismissableLayer.update",A=(0,d.createContext)({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),O=(0,d.forwardRef)((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:l,onFocusOutside:i,onInteractOutside:a,onDismiss:u,...c}=e,f=(0,d.useContext)(A),[m,h]=(0,d.useState)(null),[,g]=(0,d.useState)({}),w=v(t,e=>h(e)),y=Array.from(f.layers),[E]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),x=y.indexOf(E),C=m?y.indexOf(m):-1,S=f.layersWithOutsidePointerEventsDisabled.size>0,R=C>=x,O=function(e){let t=b(e),n=(0,d.useRef)(!1),r=(0,d.useRef)(()=>{});return(0,d.useEffect)(()=>{let e=e=>{if(e.target&&!n.current){let n={originalEvent:e};function o(){M("dismissableLayer.pointerDownOutside",t,n,{discrete:!0})}"touch"===e.pointerType?(document.removeEventListener("click",r.current),r.current=o,document.addEventListener("click",r.current,{once:!0})):o()}n.current=!1},o=window.setTimeout(()=>{document.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(o),document.removeEventListener("pointerdown",e),document.removeEventListener("click",r.current)}},[t]),{onPointerDownCapture:()=>n.current=!0}}(e=>{let t=e.target,n=[...f.branches].some(e=>e.contains(t));!R||n||(null==l||l(e),null==a||a(e),e.defaultPrevented||null==u||u())}),T=function(e){let t=b(e),n=(0,d.useRef)(!1);return(0,d.useEffect)(()=>{let e=e=>{e.target&&!n.current&&M("dismissableLayer.focusOutside",t,{originalEvent:e},{discrete:!1})};return document.addEventListener("focusin",e),()=>document.removeEventListener("focusin",e)},[t]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}(e=>{let t=e.target;[...f.branches].some(e=>e.contains(t))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==u||u())});return!function(e){let t=b(e);(0,d.useEffect)(()=>{let e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[t])}(e=>{C!==f.layers.size-1||(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),(0,d.useEffect)(()=>{if(m)return n&&(0===f.layersWithOutsidePointerEventsDisabled.size&&(r=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),f.layersWithOutsidePointerEventsDisabled.add(m)),f.layers.add(m),D(),()=>{n&&1===f.layersWithOutsidePointerEventsDisabled.size&&(document.body.style.pointerEvents=r)}},[m,n,f]),(0,d.useEffect)(()=>()=>{m&&(f.layers.delete(m),f.layersWithOutsidePointerEventsDisabled.delete(m),D())},[m,f]),(0,d.useEffect)(()=>{let e=()=>g({});return document.addEventListener(k,e),()=>document.removeEventListener(k,e)},[]),(0,d.createElement)(P.div,(0,s.Z)({},c,{ref:w,style:{pointerEvents:S?R?"auto":"none":void 0,...e.style},onFocusCapture:p(e.onFocusCapture,T.onFocusCapture),onBlurCapture:p(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:p(e.onPointerDownCapture,O.onPointerDownCapture)}))});function D(){let e=new CustomEvent(k);document.dispatchEvent(e)}function M(e,t,n,r){let{discrete:o}=r,l=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});(t&&l.addEventListener(e,t,{once:!0}),o)?l&&(0,E.flushSync)(()=>l.dispatchEvent(i)):l.dispatchEvent(i)}let T="focusScope.autoFocusOnMount",_="focusScope.autoFocusOnUnmount",L={bubbles:!1,cancelable:!0},I=(0,d.forwardRef)((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:l,...i}=e,[a,u]=(0,d.useState)(null),c=b(o),f=b(l),p=(0,d.useRef)(null),m=v(t,e=>u(e)),h=(0,d.useRef)({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;(0,d.useEffect)(()=>{if(r){function e(e){if(h.paused||!a)return;let t=e.target;a.contains(t)?p.current=t:Z(p.current,{select:!0})}function t(e){h.paused||!a||a.contains(e.relatedTarget)||Z(p.current,{select:!0})}return document.addEventListener("focusin",e),document.addEventListener("focusout",t),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t)}}},[r,a,h.paused]),(0,d.useEffect)(()=>{if(a){W.add(h);let e=document.activeElement;if(!a.contains(e)){let t=new CustomEvent(T,L);a.addEventListener(T,c),a.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(Z(r,{select:t}),document.activeElement!==n)return}(N(a).filter(e=>"A"!==e.tagName),{select:!0}),document.activeElement===e&&Z(a))}return()=>{a.removeEventListener(T,c),setTimeout(()=>{let t=new CustomEvent(_,L);a.addEventListener(_,f),a.dispatchEvent(t),t.defaultPrevented||Z(null!=e?e:document.body,{select:!0}),a.removeEventListener(_,f),W.remove(h)},0)}}},[a,c,f,h]);let g=(0,d.useCallback)(e=>{if(!n&&!r||h.paused)return;let t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){let t=e.currentTarget,[r,l]=function(e){let t=N(e);return[F(t,e),F(t.reverse(),e)]}(t);r&&l?e.shiftKey||o!==l?e.shiftKey&&o===r&&(e.preventDefault(),n&&Z(l,{select:!0})):(e.preventDefault(),n&&Z(r,{select:!0})):o===t&&e.preventDefault()}},[n,r,h.paused]);return(0,d.createElement)(P.div,(0,s.Z)({tabIndex:-1},i,{ref:m,onKeyDown:g}))});function N(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 F(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 Z(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()}}let W=(o=[],{add(e){let t=o[0];e!==t&&(null==t||t.pause()),(o=V(o,e)).unshift(e)},remove(e){var t;null===(t=(o=V(o,e))[0])||void 0===t||t.resume()}});function V(e,t){let n=[...e],r=n.indexOf(t);return -1!==r&&n.splice(r,1),n}let H=(0,d.forwardRef)((e,t)=>{var n;let{container:r=null==globalThis?void 0:null===(n=globalThis.document)||void 0===n?void 0:n.body,...o}=e;return r?E.createPortal((0,d.createElement)(P.div,(0,s.Z)({},o,{ref:t})),r):null}),B=e=>{let{present:t,children:n}=e,r=function(e){var t,n;let[r,o]=(0,d.useState)(),l=(0,d.useRef)({}),i=(0,d.useRef)(e),a=(0,d.useRef)("none"),[u,c]=(t=e?"mounted":"unmounted",n={mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}},(0,d.useReducer)((e,t)=>{let r=n[e][t];return null!=r?r:e},t));return(0,d.useEffect)(()=>{let e=K(l.current);a.current="mounted"===u?e:"none"},[u]),h(()=>{let t=l.current,n=i.current;if(n!==e){let r=a.current,o=K(t);e?c("MOUNT"):"none"===o||(null==t?void 0:t.display)==="none"?c("UNMOUNT"):n&&r!==o?c("ANIMATION_OUT"):c("UNMOUNT"),i.current=e}},[e,c]),h(()=>{if(r){let e=e=>{let t=K(l.current).includes(e.animationName);e.target===r&&t&&(0,E.flushSync)(()=>c("ANIMATION_END"))},t=e=>{e.target===r&&(a.current=K(l.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(u),ref:(0,d.useCallback)(e=>{e&&(l.current=getComputedStyle(e)),o(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):d.Children.only(n),l=v(r.ref,o.ref);return"function"==typeof n||r.isPresent?(0,d.cloneElement)(o,{ref:l}):null};function K(e){return(null==e?void 0:e.animationName)||"none"}B.displayName="Presence";let z=0;function U(){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 q=n(1663),Y=n(8880),j=n(9651),X=(0,n(6567)._)(),$=function(){},G=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:$,onWheelCapture:$,onTouchMoveCapture:$}),o=r[0],l=r[1],i=e.forwardProps,a=e.children,u=e.className,c=e.removeScrollBar,s=e.enabled,f=e.shards,p=e.sideCar,m=e.noIsolation,v=e.inert,h=e.allowPinchZoom,g=e.as,w=(0,q._T)(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as"]),y=(0,j.q)([n,t]),b=(0,q.pi)((0,q.pi)({},w),o);return d.createElement(d.Fragment,null,s&&d.createElement(p,{sideCar:X,removeScrollBar:c,shards:f,noIsolation:m,inert:v,setCallbacks:l,allowPinchZoom:!!h,lockRef:n}),i?d.cloneElement(d.Children.only(a),(0,q.pi)((0,q.pi)({},b),{ref:y})):d.createElement(void 0===g?"div":g,(0,q.pi)({},b,{className:u,ref:y}),a))});G.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},G.classNames={fullWidth:Y.zi,zeroRight:Y.pF};var J=n(4138),Q=n(2451),ee=n(4548),et=!1;try{var en=Object.defineProperty({},"passive",{get:function(){return et=!0,!0}});window.addEventListener("test",en,en),window.removeEventListener("test",en,en)}catch(e){et=!1}var er=!!et&&{passive:!1},eo=function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowY&&!(t.overflowY===t.overflowX&&"visible"===t.overflowY)},el=function(e){var t=window.getComputedStyle(e);return"hidden"!==t.overflowX&&!(t.overflowY===t.overflowX&&"visible"===t.overflowX)},ei=function(e,t){var n=t;do{if("undefined"!=typeof ShadowRoot&&n instanceof ShadowRoot&&(n=n.host),ea(e,n)){var r=eu(e,n);if(r[1]>r[2])return!0}n=n.parentNode}while(n&&n!==document.body);return!1},ea=function(e,t){return"v"===e?eo(t):el(t)},eu=function(e,t){return"v"===e?[t.scrollTop,t.scrollHeight,t.clientHeight]:[t.scrollLeft,t.scrollWidth,t.clientWidth]},ec=function(e,t,n,r,o){var l,i=(l=window.getComputedStyle(t).direction,"h"===e&&"rtl"===l?-1:1),a=i*r,u=n.target,c=t.contains(u),s=!1,d=a>0,f=0,p=0;do{var m=eu(e,u),v=m[0],h=m[1]-m[2]-i*v;(v||h)&&ea(e,u)&&(f+=h,p+=v),u=u.parentNode}while(!c&&u!==document.body||c&&(t.contains(u)||t===u));return d&&(o&&0===f||!o&&a>f)?s=!0:!d&&(o&&0===p||!o&&-a>p)&&(s=!0),s},es=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ed=function(e){return[e.deltaX,e.deltaY]},ef=function(e){return e&&"current"in e?e.current:e},ep=0,em=[],ev=(0,J.L)(X,function(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(ep++)[0],l=d.useState(function(){return(0,ee.Ws)()})[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=(0,q.ev)([e.lockRef.current],(e.shards||[]).map(ef),!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 a=d.useCallback(function(e,t){if("touches"in e&&2===e.touches.length)return!i.current.allowPinchZoom;var o,l=es(e),a=n.current,u="deltaX"in e?e.deltaX:a[0]-l[0],c="deltaY"in e?e.deltaY:a[1]-l[1],s=e.target,d=Math.abs(u)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===s.type)return!1;var f=ei(d,s);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=ei(d,s)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||c)&&(r.current=o),!o)return!0;var p=r.current||o;return ec(p,t,e,"h"===p?u:c,!0)},[]),u=d.useCallback(function(e){if(em.length&&em[em.length-1]===l){var n="deltaY"in e?ed(e):es(e),r=t.current.filter(function(t){var r;return t.name===e.type&&t.target===e.target&&(r=t.delta)[0]===n[0]&&r[1]===n[1]})[0];if(r&&r.should){e.preventDefault();return}if(!r){var o=(i.current.shards||[]).map(ef).filter(Boolean).filter(function(t){return t.contains(e.target)});(o.length>0?a(e,o[0]):!i.current.noIsolation)&&e.preventDefault()}}},[]),c=d.useCallback(function(e,n,r,o){var l={name:e,delta:n,target:r,should:o};t.current.push(l),setTimeout(function(){t.current=t.current.filter(function(e){return e!==l})},1)},[]),s=d.useCallback(function(e){n.current=es(e),r.current=void 0},[]),f=d.useCallback(function(t){c(t.type,ed(t),t.target,a(t,e.lockRef.current))},[]),p=d.useCallback(function(t){c(t.type,es(t),t.target,a(t,e.lockRef.current))},[]);d.useEffect(function(){return em.push(l),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,er),document.addEventListener("touchmove",u,er),document.addEventListener("touchstart",s,er),function(){em=em.filter(function(e){return e!==l}),document.removeEventListener("wheel",u,er),document.removeEventListener("touchmove",u,er),document.removeEventListener("touchstart",s,er)}},[]);var m=e.removeScrollBar,v=e.inert;return d.createElement(d.Fragment,null,v?d.createElement(l,{styles:"\n  .block-interactivity-".concat(o," {pointer-events: none;}\n  .allow-interactivity-").concat(o," {pointer-events: all;}\n")}):null,m?d.createElement(Q.jp,{gapMode:"margin"}):null)}),eh=d.forwardRef(function(e,t){return d.createElement(G,(0,q.pi)({},e,{ref:t,sideCar:ev}))});eh.classNames=G.classNames;var eg=n(9694);let ew="Dialog",[ey,eb]=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=()=>{let t=n.map(e=>(0,d.createContext)(e));return function(n){let r=(null==n?void 0:n[e])||t;return(0,d.useMemo)(()=>({["__scope".concat(e)]:{...n,[e]:r}}),[n,r])}};return r.scopeName=e,[function(t,r){let o=(0,d.createContext)(r),l=n.length;function i(t){let{scope:n,children:r,...i}=t,a=(null==n?void 0:n[e][l])||o,u=(0,d.useMemo)(()=>i,Object.values(i));return(0,d.createElement)(a.Provider,{value:u},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){let a=(null==i?void 0:i[e][l])||o,u=(0,d.useContext)(a);if(u)return u;if(void 0!==r)return r;throw Error("`".concat(n,"` must be used within `").concat(t,"`"))}]},function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];let r=t[0];if(1===t.length)return r;let o=()=>{let e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){let n=e.reduce((e,n)=>{let{useScope:r,scopeName:o}=n,l=r(t)["__scope".concat(o)];return{...e,...l}},{});return(0,d.useMemo)(()=>({["__scope".concat(r.scopeName)]:n}),[n])}};return o.scopeName=r.scopeName,o}(r,...t)]}(ew),[eE,ex]=ey(ew),eC="DialogPortal",[eS,eR]=ey(eC,{forceMount:void 0}),eP="DialogOverlay",ek=(0,d.forwardRef)((e,t)=>{let n=eR(eP,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,l=ex(eP,e.__scopeDialog);return l.modal?(0,d.createElement)(B,{present:r||l.open},(0,d.createElement)(eA,(0,s.Z)({},o,{ref:t}))):null}),eA=(0,d.forwardRef)((e,t)=>{let{__scopeDialog:n,...r}=e,o=ex(eP,n);return(0,d.createElement)(eh,{as:x,allowPinchZoom:!0,shards:[o.contentRef]},(0,d.createElement)(P.div,(0,s.Z)({"data-state":eL(o.open)},r,{ref:t,style:{pointerEvents:"auto",...r.style}})))}),eO="DialogContent",eD=(0,d.forwardRef)((e,t)=>{let n=eR(eO,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,l=ex(eO,e.__scopeDialog);return(0,d.createElement)(B,{present:r||l.open},l.modal?(0,d.createElement)(eM,(0,s.Z)({},o,{ref:t})):(0,d.createElement)(eT,(0,s.Z)({},o,{ref:t})))}),eM=(0,d.forwardRef)((e,t)=>{let n=ex(eO,e.__scopeDialog),r=(0,d.useRef)(null),o=v(t,n.contentRef,r);return(0,d.useEffect)(()=>{let e=r.current;if(e)return(0,eg.Ry)(e)},[]),(0,d.createElement)(e_,(0,s.Z)({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:p(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:p(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:p(e.onFocusOutside,e=>e.preventDefault())}))}),eT=(0,d.forwardRef)((e,t)=>{let n=ex(eO,e.__scopeDialog),r=(0,d.useRef)(!1);return(0,d.createElement)(e_,(0,s.Z)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,l;null===(o=e.onCloseAutoFocus)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current||null===(l=n.triggerRef.current)||void 0===l||l.focus(),t.preventDefault()),r.current=!1},onInteractOutside:t=>{var o,l;null===(o=e.onInteractOutside)||void 0===o||o.call(e,t),t.defaultPrevented||(r.current=!0);let i=t.target;(null===(l=n.triggerRef.current)||void 0===l?void 0:l.contains(i))&&t.preventDefault()}}))}),e_=(0,d.forwardRef)((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:l,...i}=e,a=ex(eO,n),u=v(t,(0,d.useRef)(null));return(0,d.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:U()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:U()),z++,()=>{1===z&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),z--}},[]),(0,d.createElement)(d.Fragment,null,(0,d.createElement)(I,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:l},(0,d.createElement)(O,(0,s.Z)({role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":eL(a.open)},i,{ref:u,onDismiss:()=>a.onOpenChange(!1)}))),!1)});function eL(e){return e?"open":"closed"}let[eI,eN]=function(e,t){let n=(0,d.createContext)(t);function r(e){let{children:t,...r}=e,o=(0,d.useMemo)(()=>r,Object.values(r));return(0,d.createElement)(n.Provider,{value:o},t)}return r.displayName=e+"Provider",[r,function(r){let o=(0,d.useContext)(n);if(o)return o;if(void 0!==t)return t;throw Error("`".concat(r,"` must be used within `").concat(e,"`"))}]}("DialogTitleWarning",{contentName:eO,titleName:"DialogTitle",docsSlug:"dialog"}),eF=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:l,modal:i=!0}=e,a=(0,d.useRef)(null),u=(0,d.useRef)(null),[c=!1,s]=function(e){let{prop:t,defaultProp:n,onChange:r=()=>{}}=e,[o,l]=function(e){let{defaultProp:t,onChange:n}=e,r=(0,d.useState)(t),[o]=r,l=(0,d.useRef)(o),i=b(n);return(0,d.useEffect)(()=>{l.current!==o&&(i(o),l.current=o)},[o,l,i]),r}({defaultProp:n,onChange:r}),i=void 0!==t,a=i?t:o,u=b(r);return[a,(0,d.useCallback)(e=>{if(i){let n="function"==typeof e?e(t):e;n!==t&&u(n)}else l(e)},[i,t,l,u])]}({prop:r,defaultProp:o,onChange:l});return(0,d.createElement)(eE,{scope:t,triggerRef:a,contentRef:u,contentId:y(),titleId:y(),descriptionId:y(),open:c,onOpenChange:s,onOpenToggle:(0,d.useCallback)(()=>s(e=>!e),[s]),modal:i},n)},eZ=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:o}=e,l=ex(eC,t);return(0,d.createElement)(eS,{scope:t,forceMount:n},d.Children.map(r,e=>(0,d.createElement)(B,{present:n||l.open},(0,d.createElement)(H,{asChild:!0,container:o},e))))};var eW='[cmdk-group=""]',eV='[cmdk-group-items=""]',eH='[cmdk-item=""]',eB="".concat(eH,':not([aria-disabled="true"])'),eK="cmdk-item-select",ez="data-value",eU=(e,t)=>(function e(t,n,r,o,c,s,d){if(s===n.length)return c===t.length?1:.99;var f="".concat(c,",").concat(s);if(void 0!==d[f])return d[f];for(var p,m,v,h,g=o.charAt(s),w=r.indexOf(g,c),y=0;w>=0;)(p=e(t,n,r,o,w+1,s+1,d))>y&&(w===c?p*=1:l.test(t.charAt(w-1))?(p*=.8,(v=t.slice(c,w-1).match(i))&&c>0&&(p*=Math.pow(.999,v.length))):a.test(t.charAt(w-1))?(p*=.9,(h=t.slice(c,w-1).match(u))&&c>0&&(p*=Math.pow(.999,h.length))):(p*=.17,c>0&&(p*=Math.pow(.999,w-c))),t.charAt(w)!==n.charAt(s)&&(p*=.9999)),(p<.1&&r.charAt(w-1)===o.charAt(s+1)||o.charAt(s+1)===o.charAt(s)&&r.charAt(w-1)!==o.charAt(s))&&.1*(m=e(t,n,r,o,w+1,s+2,d))>p&&(p=.1*m),p>y&&(y=p),w=r.indexOf(g,w+1);return d[f]=y,y})(e,t,c(e),c(t),0,0,{}),eq=d.createContext(void 0),eY=()=>d.useContext(eq),ej=d.createContext(void 0),eX=()=>d.useContext(ej),e$=d.createContext(void 0),eG=d.forwardRef((e,t)=>{let n=d.useRef(null),r=e3(()=>{var t,n,r;return{search:"",value:null!=(r=null!=(n=e.value)?n:null==(t=e.defaultValue)?void 0:t.toLowerCase())?r:"",filtered:{count:0,items:new Map,groups:new Set}}}),o=e3(()=>new Set),l=e3(()=>new Map),i=e3(()=>new Map),a=e3(()=>new Set),u=e8(e),{label:c,children:s,value:f,onValueChange:p,filter:m,shouldFilter:v,vimBindings:h=!0,...g}=e,w=d.useId(),y=d.useId(),b=d.useId(),E=tt();e6(()=>{if(void 0!==f){let e=f.trim().toLowerCase();r.current.value=e,E(6,A),x.emit()}},[f]);let x=d.useMemo(()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>r.current,setState:(e,t,n)=>{var o,l,i;if(!Object.is(r.current[e],t)){if(r.current[e]=t,"search"===e)k(),R(),E(1,P);else if("value"===e){if((null==(o=u.current)?void 0:o.value)!==void 0){null==(i=(l=u.current).onValueChange)||i.call(l,null!=t?t:"");return}n||E(5,A)}x.emit()}},emit:()=>{a.current.forEach(e=>e())}}),[]),C=d.useMemo(()=>({value:(e,t)=>{t!==i.current.get(e)&&(i.current.set(e,t),r.current.filtered.items.set(e,S(t)),E(2,()=>{R(),x.emit()}))},item:(e,t)=>(o.current.add(e),t&&(l.current.has(t)?l.current.get(t).add(e):l.current.set(t,new Set([e]))),E(3,()=>{k(),R(),r.current.value||P(),x.emit()}),()=>{i.current.delete(e),o.current.delete(e),r.current.filtered.items.delete(e);let t=O();E(4,()=>{k(),(null==t?void 0:t.getAttribute("id"))===e&&P(),x.emit()})}),group:e=>(l.current.has(e)||l.current.set(e,new Set),()=>{i.current.delete(e),l.current.delete(e)}),filter:()=>u.current.shouldFilter,label:c||e["aria-label"],commandRef:n,listId:w,inputId:b,labelId:y}),[]);function S(e){var t,n;let o=null!=(n=null==(t=u.current)?void 0:t.filter)?n:eU;return e?o(e,r.current.search):0}function R(){if(!n.current||!r.current.search||!1===u.current.shouldFilter)return;let e=r.current.filtered.items,t=[];r.current.filtered.groups.forEach(n=>{let r=l.current.get(n),o=0;r.forEach(t=>{o=Math.max(e.get(t),o)}),t.push([n,o])});let o=n.current.querySelector('[cmdk-list-sizer=""]');D().sort((t,n)=>{var r,o;let l=t.getAttribute(ez),i=n.getAttribute(ez);return(null!=(r=e.get(i))?r:0)-(null!=(o=e.get(l))?o:0)}).forEach(e=>{let t=e.closest(eV);t?t.appendChild(e.parentElement===t?e:e.closest("".concat(eV," > *"))):o.appendChild(e.parentElement===o?e:e.closest("".concat(eV," > *")))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=n.current.querySelector("".concat(eW,"[").concat(ez,'="').concat(e[0],'"]'));null==t||t.parentElement.appendChild(t)})}function P(){let e=D().find(e=>!e.ariaDisabled),t=null==e?void 0:e.getAttribute(ez);x.setState("value",t||void 0)}function k(){if(!r.current.search||!1===u.current.shouldFilter){r.current.filtered.count=o.current.size;return}r.current.filtered.groups=new Set;let e=0;for(let t of o.current){let n=S(i.current.get(t));r.current.filtered.items.set(t,n),n>0&&e++}for(let[e,t]of l.current)for(let n of t)if(r.current.filtered.items.get(n)>0){r.current.filtered.groups.add(e);break}r.current.filtered.count=e}function A(){var e,t,n;let r=O();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(eW))?void 0:t.querySelector('[cmdk-group-heading=""]'))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function O(){var e;return null==(e=n.current)?void 0:e.querySelector("".concat(eH,'[aria-selected="true"]'))}function D(){return Array.from(n.current.querySelectorAll(eB))}function M(e){let t=D()[e];t&&x.setState("value",t.getAttribute(ez))}function T(e){var t;let n=O(),r=D(),o=r.findIndex(e=>e===n),l=r[o+e];null!=(t=u.current)&&t.loop&&(l=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),l&&x.setState("value",l.getAttribute(ez))}function _(e){let t=O(),n=null==t?void 0:t.closest(eW),r;for(;n&&!r;)r=null==(n=e>0?function(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}(n,eW):function(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}(n,eW))?void 0:n.querySelector(eB);r?x.setState("value",r.getAttribute(ez)):T(e)}let L=()=>M(D().length-1),I=e=>{e.preventDefault(),e.metaKey?L():e.altKey?_(1):T(1)},N=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?_(-1):T(-1)};return d.createElement("div",{ref:e4([n,t]),...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":h&&e.ctrlKey&&I(e);break;case"ArrowDown":I(e);break;case"p":case"k":h&&e.ctrlKey&&N(e);break;case"ArrowUp":N(e);break;case"Home":e.preventDefault(),M(0);break;case"End":e.preventDefault(),L();break;case"Enter":if(!e.nativeEvent.isComposing){e.preventDefault();let t=O();if(t){let e=new Event(eK);t.dispatchEvent(e)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:C.inputId,id:C.labelId,style:tn},c),d.createElement(ej.Provider,{value:x},d.createElement(eq.Provider,{value:C},s)))}),eJ=d.forwardRef((e,t)=>{var n,r;let o=d.useId(),l=d.useRef(null),i=d.useContext(e$),a=eY(),u=e8(e),c=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;e6(()=>a.item(o,null==i?void 0:i.id),[]);let s=te(o,l,[e.value,e.children,l]),f=eX(),p=e7(e=>e.value&&e.value===s.current),m=e7(e=>!!c||!1===a.filter()||!e.search||e.filtered.items.get(o)>0);function v(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,s.current)}function h(){f.setState("value",s.current,!0)}if(d.useEffect(()=>{let t=l.current;if(!(!t||e.disabled))return t.addEventListener(eK,v),()=>t.removeEventListener(eK,v)},[m,e.onSelect,e.disabled]),!m)return null;let{disabled:g,value:w,onSelect:y,forceMount:b,...E}=e;return d.createElement("div",{ref:e4([l,t]),...E,id:o,"cmdk-item":"",role:"option","aria-disabled":g||void 0,"aria-selected":p||void 0,"data-disabled":g||void 0,"data-selected":p||void 0,onPointerMove:g?void 0:h,onClick:g?void 0:v},e.children)}),eQ=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...l}=e,i=d.useId(),a=d.useRef(null),u=d.useRef(null),c=d.useId(),s=eY(),f=e7(e=>!!o||!1===s.filter()||!e.search||e.filtered.groups.has(i));e6(()=>s.group(i),[]),te(i,a,[e.value,e.heading,u]);let p=d.useMemo(()=>({id:i,forceMount:o}),[o]),m=d.createElement(e$.Provider,{value:p},r);return d.createElement("div",{ref:e4([a,t]),...l,"cmdk-group":"",role:"presentation",hidden:!f||void 0},n&&d.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},m))}),e0=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),l=e7(e=>!e.search);return n||l?d.createElement("div",{ref:e4([o,t]),...r,"cmdk-separator":"",role:"separator"}):null}),e1=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,l=eX(),i=e7(e=>e.search),a=e7(e=>e.value),u=eY(),c=d.useMemo(()=>{var e;let t=null==(e=u.commandRef.current)?void 0:e.querySelector("".concat(eH,"[").concat(ez,'="').concat(a,'"]'));return null==t?void 0:t.getAttribute("id")},[a,u.commandRef]);return d.useEffect(()=>{null!=e.value&&l.setState("search",e.value)},[e.value]),d.createElement("input",{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":c,id:u.inputId,type:"text",value:o?e.value:i,onChange:e=>{o||l.setState("search",e.target.value),null==n||n(e.target.value)}})}),e2=d.forwardRef((e,t)=>{let{children:n,...r}=e,o=d.useRef(null),l=d.useRef(null),i=eY();return d.useEffect(()=>{if(l.current&&o.current){let e=l.current,t=o.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty("--cmdk-list-height",n.toFixed(1)+"px")})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),d.createElement("div",{ref:e4([o,t]),...r,"cmdk-list":"",role:"listbox","aria-label":"Suggestions",id:i.listId,"aria-labelledby":i.inputId},d.createElement("div",{ref:l,"cmdk-list-sizer":""},n))}),e9=d.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:l,container:i,...a}=e;return d.createElement(eF,{open:n,onOpenChange:r},d.createElement(eZ,{container:i},d.createElement(ek,{"cmdk-overlay":"",className:o}),d.createElement(eD,{"aria-label":e.label,"cmdk-dialog":"",className:l},d.createElement(eG,{ref:t,...a}))))}),e5=Object.assign(eG,{List:e2,Item:eJ,Input:e1,Group:eQ,Separator:e0,Dialog:e9,Empty:d.forwardRef((e,t)=>{let n=d.useRef(!0),r=e7(e=>0===e.filtered.count);return d.useEffect(()=>{n.current=!1},[]),n.current||!r?null:d.createElement("div",{ref:t,...e,"cmdk-empty":"",role:"presentation"})}),Loading:d.forwardRef((e,t)=>{let{progress:n,children:r,...o}=e;return d.createElement("div",{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":"Loading..."},d.createElement("div",{"aria-hidden":!0},r))})});function e8(e){let t=d.useRef(e);return e6(()=>{t.current=e}),t}var e6=d.useLayoutEffect;function e3(e){let t=d.useRef();return void 0===t.current&&(t.current=e()),t}function e4(e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}function e7(e){let t=eX(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function te(e,t,n){let r=d.useRef(),o=eY();return e6(()=>{var l;let i=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim().toLowerCase();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim().toLowerCase():r.current}})();o.value(e,i),null==(l=t.current)||l.setAttribute(ez,i),r.current=i}),r}var tt=()=>{let[e,t]=d.useState(),n=e3(()=>new Map);return e6(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}},tn={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}}}]);