randmarcomps 1.523.0 → 1.524.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6197,35 +6197,44 @@ const DialogTrigger = Trigger$6, DialogPortal = Portal$4, DialogClose = Close$1,
6197
6197
  }
6198
6198
  ));
6199
6199
  DialogOverlay.displayName = Overlay.displayName;
6200
- const DialogContent = React.forwardRef(({ className: e, children: t, animateExit: n = !0, overlayClassName: a, showOverlay: s, ...o }, l) => /* @__PURE__ */ jsxs(DialogPortal, { forceMount: o.forceMount, children: [
6201
- a && s ? /* @__PURE__ */ jsx(
6202
- "div",
6203
- {
6204
- "aria-hidden": "true",
6205
- className: cn("fixed inset-0 z-[10000] pointer-events-none", a)
6206
- }
6207
- ) : null,
6208
- /* @__PURE__ */ jsx(DialogOverlay, { className: a, forceMount: o.forceMount }),
6209
- /* @__PURE__ */ jsxs(
6210
- Content$3,
6211
- {
6212
- ref: l,
6213
- className: cn(
6214
- "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
6215
- n && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",
6216
- e
6217
- ),
6218
- ...o,
6219
- children: [
6220
- t,
6221
- /* @__PURE__ */ jsxs(Close$1, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
6222
- /* @__PURE__ */ jsx(X$2, { className: "h-4 w-4" }),
6223
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
6224
- ] })
6225
- ]
6226
- }
6227
- )
6228
- ] }));
6200
+ const DialogContent = React.forwardRef(({ className: e, children: t, animateExit: n = !0, overlayClassName: a, showOverlay: s, onPointerDownOutside: o, onInteractOutside: l, ...c }, f) => {
6201
+ const g = !!(a && s);
6202
+ return /* @__PURE__ */ jsxs(DialogPortal, { forceMount: c.forceMount, children: [
6203
+ g ? /* @__PURE__ */ jsx(Close$1, { asChild: !0, children: /* @__PURE__ */ jsx(
6204
+ "div",
6205
+ {
6206
+ "aria-hidden": "true",
6207
+ className: cn("fixed inset-0 z-[10000] pointer-events-auto", a)
6208
+ }
6209
+ ) }) : null,
6210
+ /* @__PURE__ */ jsx(DialogOverlay, { className: a, forceMount: c.forceMount }),
6211
+ /* @__PURE__ */ jsxs(
6212
+ Content$3,
6213
+ {
6214
+ ref: f,
6215
+ className: cn(
6216
+ "fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",
6217
+ n && "data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",
6218
+ e
6219
+ ),
6220
+ onPointerDownOutside: (A) => {
6221
+ g && A.preventDefault(), o == null || o(A);
6222
+ },
6223
+ onInteractOutside: (A) => {
6224
+ g && A.preventDefault(), l == null || l(A);
6225
+ },
6226
+ ...c,
6227
+ children: [
6228
+ t,
6229
+ /* @__PURE__ */ jsxs(Close$1, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground", children: [
6230
+ /* @__PURE__ */ jsx(X$2, { className: "h-4 w-4" }),
6231
+ /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
6232
+ ] })
6233
+ ]
6234
+ }
6235
+ )
6236
+ ] });
6237
+ });
6229
6238
  DialogContent.displayName = Content$3.displayName;
6230
6239
  const DialogHeader = ({
6231
6240
  className: e,
@@ -516,7 +516,7 @@
516
516
 
517
517
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
518
518
 
519
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},Root$a=Dialog$1,Trigger$6=DialogTrigger$1,Portal$4=DialogPortal$1,Overlay=DialogOverlay$1,Content$3=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$a,{modal:e,...t});Dialog.displayName=Root$a.displayName;const DialogTrigger=Trigger$6,DialogPortal=Portal$4,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:opacity-0 data-[state=closed]:pointer-events-none",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,overlayClassName:s,showOverlay:a,...o},l)=>jsxRuntime.jsxs(DialogPortal,{forceMount:o.forceMount,children:[s&&a?jsxRuntime.jsx("div",{"aria-hidden":"true",className:cn("fixed inset-0 z-[10000] pointer-events-none",s)}):null,jsxRuntime.jsx(DialogOverlay,{className:s,forceMount:o.forceMount}),jsxRuntime.jsxs(Content$3,{ref:l,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",e),...o,children:[t,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X$2,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));DialogContent.displayName=Content$3.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;const sides=["top","right","bottom","left"],min$3=Math.min,max$3=Math.max,round$2=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$3(e,min$3(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide$1(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(e){return yAxisSides.has(getSide$1(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const s=getAlignment(e),a=getAlignmentAxis(e),o=getAxisLength(a);let l=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=getOppositePlacement(l)),[l,getOppositePlacement(l)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(e,t,n){switch(e){case"top":case"bottom":return n?t?rlPlacement:lrPlacement:t?lrPlacement:rlPlacement;case"left":case"right":return t?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e,t,n,s){const a=getAlignment(e);let o=getSideList(getSide$1(e),n==="start",s);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(getOppositeAlignmentPlacement)))),o}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:s,floating:a}=e;const o=getSideAxis(t),l=getAlignmentAxis(t),c=getAxisLength(l),f=getSide$1(t),g=o==="y",R=s.x+s.width/2-a.width/2,A=s.y+s.height/2-a.height/2,V=s[c]/2-a[c]/2;let Ve;switch(f){case"top":Ve={x:R,y:s.y-a.height};break;case"bottom":Ve={x:R,y:s.y+s.height};break;case"right":Ve={x:s.x+s.width,y:A};break;case"left":Ve={x:s.x-a.width,y:A};break;default:Ve={x:s.x,y:s.y}}switch(getAlignment(t)){case"start":Ve[l]-=V*(n&&g?-1:1);break;case"end":Ve[l]+=V*(n&&g?-1:1);break}return Ve}const computePosition$1=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let g=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:R,y:A}=computeCoordsFromPlacement(g,s,f),V=s,Ve={},Ye=0;for(let nt=0;nt<c.length;nt++){const{name:et,fn:rt}=c[nt],{x:st,y:ot,data:ct,reset:lt}=await rt({x:R,y:A,initialPlacement:s,placement:V,strategy:a,middlewareData:Ve,rects:g,platform:l,elements:{reference:e,floating:t}});R=st??R,A=ot??A,Ve={...Ve,[et]:{...Ve[et],...ct}},lt&&Ye<=50&&(Ye++,typeof lt=="object"&&(lt.placement&&(V=lt.placement),lt.rects&&(g=lt.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):lt.rects),{x:R,y:A}=computeCoordsFromPlacement(g,V,f)),nt=-1)}return{x:R,y:A,placement:V,strategy:a,middlewareData:Ve}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:g="clippingAncestors",rootBoundary:R="viewport",elementContext:A="floating",altBoundary:V=!1,padding:Ve=0}=evaluate(t,e),Ye=getPaddingObject(Ve),et=c[V?A==="floating"?"reference":"floating":A],rt=rectToClientRect(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(et)))==null||n?et:et.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:g,rootBoundary:R,strategy:f})),st=A==="floating"?{x:s,y:a,width:l.floating.width,height:l.floating.height}:l.reference,ot=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),ct=await(o.isElement==null?void 0:o.isElement(ot))?await(o.getScale==null?void 0:o.getScale(ot))||{x:1,y:1}:{x:1,y:1},lt=rectToClientRect(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:st,offsetParent:ot,strategy:f}):st);return{top:(rt.top-lt.top+Ye.top)/ct.y,bottom:(lt.bottom-rt.bottom+Ye.bottom)/ct.y,left:(rt.left-lt.left+Ye.left)/ct.x,right:(lt.right-rt.right+Ye.right)/ct.x}}const arrow$4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:g,padding:R=0}=evaluate(e,t)||{};if(g==null)return{};const A=getPaddingObject(R),V={x:n,y:s},Ve=getAlignmentAxis(a),Ye=getAxisLength(Ve),nt=await l.getDimensions(g),et=Ve==="y",rt=et?"top":"left",st=et?"bottom":"right",ot=et?"clientHeight":"clientWidth",ct=o.reference[Ye]+o.reference[Ve]-V[Ve]-o.floating[Ye],lt=V[Ve]-o.reference[Ve],at=await(l.getOffsetParent==null?void 0:l.getOffsetParent(g));let ut=at?at[ot]:0;(!ut||!await(l.isElement==null?void 0:l.isElement(at)))&&(ut=c.floating[ot]||o.floating[Ye]);const pt=ct/2-lt/2,mt=ut/2-nt[Ye]/2-1,Ct=min$3(A[rt],mt),Rt=min$3(A[st],mt),ft=Ct,It=ut-nt[Ye]-Rt,yt=ut/2-nt[Ye]/2+pt,Mt=clamp$1(ft,yt,It),Ft=!f.arrow&&getAlignment(a)!=null&&yt!==Mt&&o.reference[Ye]/2-(yt<ft?Ct:Rt)-nt[Ye]/2<0,Ht=Ft?yt<ft?yt-ft:yt-It:0;return{[Ve]:V[Ve]+Ht,data:{[Ve]:Mt,centerOffset:yt-Mt-Ht,...Ft&&{alignmentOffset:Ht}},reset:Ft}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:g}=t,{mainAxis:R=!0,crossAxis:A=!0,fallbackPlacements:V,fallbackStrategy:Ve="bestFit",fallbackAxisSideDirection:Ye="none",flipAlignment:nt=!0,...et}=evaluate(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const rt=getSide$1(a),st=getSideAxis(c),ot=getSide$1(c)===c,ct=await(f.isRTL==null?void 0:f.isRTL(g.floating)),lt=V||(ot||!nt?[getOppositePlacement(c)]:getExpandedPlacements(c)),at=Ye!=="none";!V&&at&&lt.push(...getOppositeAxisPlacements(c,nt,Ye,ct));const ut=[c,...lt],pt=await detectOverflow(t,et),mt=[];let Ct=((s=o.flip)==null?void 0:s.overflows)||[];if(R&&mt.push(pt[rt]),A){const yt=getAlignmentSides(a,l,ct);mt.push(pt[yt[0]],pt[yt[1]])}if(Ct=[...Ct,{placement:a,overflows:mt}],!mt.every(yt=>yt<=0)){var Rt,ft;const yt=(((Rt=o.flip)==null?void 0:Rt.index)||0)+1,Mt=ut[yt];if(Mt&&(!(A==="alignment"?st!==getSideAxis(Mt):!1)||Ct.every(Dt=>getSideAxis(Dt.placement)===st?Dt.overflows[0]>0:!0)))return{data:{index:yt,overflows:Ct},reset:{placement:Mt}};let Ft=(ft=Ct.filter(Ht=>Ht.overflows[0]<=0).sort((Ht,Dt)=>Ht.overflows[1]-Dt.overflows[1])[0])==null?void 0:ft.placement;if(!Ft)switch(Ve){case"bestFit":{var It;const Ht=(It=Ct.filter(Dt=>{if(at){const $t=getSideAxis(Dt.placement);return $t===st||$t==="y"}return!0}).map(Dt=>[Dt.placement,Dt.overflows.filter($t=>$t>0).reduce(($t,zt)=>$t+zt,0)]).sort((Dt,$t)=>Dt[1]-$t[1])[0])==null?void 0:It[0];Ht&&(Ft=Ht);break}case"initialPlacement":Ft=c;break}if(a!==Ft)return{reset:{placement:Ft}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...a}=evaluate(e,t);switch(s){case"referenceHidden":{const o=await detectOverflow(t,{...a,elementContext:"reference"}),l=getSideOffsets(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:isAnySideFullyClipped(l)}}}case"escaped":{const o=await detectOverflow(t,{...a,altBoundary:!0}),l=getSideOffsets(o,n.floating);return{data:{escapedOffsets:l,escaped:isAnySideFullyClipped(l)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(e,t){const{placement:n,platform:s,elements:a}=e,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),l=getSide$1(n),c=getAlignment(n),f=getSideAxis(n)==="y",g=originSides.has(l)?-1:1,R=o&&f?-1:1,A=evaluate(t,e);let{mainAxis:V,crossAxis:Ve,alignmentAxis:Ye}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return c&&typeof Ye=="number"&&(Ve=c==="end"?Ye*-1:Ye),f?{x:Ve*R,y:V*g}:{x:V*g,y:Ve*R}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:o,placement:l,middlewareData:c}=t,f=await convertValueToCoords(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:o+f.y,data:{...f,placement:l}}}}},shift$3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:et=>{let{x:rt,y:st}=et;return{x:rt,y:st}}},...f}=evaluate(e,t),g={x:n,y:s},R=await detectOverflow(t,f),A=getSideAxis(getSide$1(a)),V=getOppositeAxis(A);let Ve=g[V],Ye=g[A];if(o){const et=V==="y"?"top":"left",rt=V==="y"?"bottom":"right",st=Ve+R[et],ot=Ve-R[rt];Ve=clamp$1(st,Ve,ot)}if(l){const et=A==="y"?"top":"left",rt=A==="y"?"bottom":"right",st=Ye+R[et],ot=Ye-R[rt];Ye=clamp$1(st,Ye,ot)}const nt=c.fn({...t,[V]:Ve,[A]:Ye});return{...nt,data:{x:nt.x-n,y:nt.y-s,enabled:{[V]:o,[A]:l}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:g=!0}=evaluate(e,t),R={x:n,y:s},A=getSideAxis(a),V=getOppositeAxis(A);let Ve=R[V],Ye=R[A];const nt=evaluate(c,t),et=typeof nt=="number"?{mainAxis:nt,crossAxis:0}:{mainAxis:0,crossAxis:0,...nt};if(f){const ot=V==="y"?"height":"width",ct=o.reference[V]-o.floating[ot]+et.mainAxis,lt=o.reference[V]+o.reference[ot]-et.mainAxis;Ve<ct?Ve=ct:Ve>lt&&(Ve=lt)}if(g){var rt,st;const ot=V==="y"?"width":"height",ct=originSides.has(getSide$1(a)),lt=o.reference[A]-o.floating[ot]+(ct&&((rt=l.offset)==null?void 0:rt[A])||0)+(ct?0:et.crossAxis),at=o.reference[A]+o.reference[ot]+(ct?0:((st=l.offset)==null?void 0:st[A])||0)-(ct?et.crossAxis:0);Ye<lt?Ye=lt:Ye>at&&(Ye=at)}return{[V]:Ve,[A]:Ye}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:o,platform:l,elements:c}=t,{apply:f=()=>{},...g}=evaluate(e,t),R=await detectOverflow(t,g),A=getSide$1(a),V=getAlignment(a),Ve=getSideAxis(a)==="y",{width:Ye,height:nt}=o.floating;let et,rt;A==="top"||A==="bottom"?(et=A,rt=V===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(rt=A,et=V==="end"?"top":"bottom");const st=nt-R.top-R.bottom,ot=Ye-R.left-R.right,ct=min$3(nt-R[et],st),lt=min$3(Ye-R[rt],ot),at=!t.middlewareData.shift;let ut=ct,pt=lt;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(pt=ot),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(ut=st),at&&!V){const Ct=max$3(R.left,0),Rt=max$3(R.right,0),ft=max$3(R.top,0),It=max$3(R.bottom,0);Ve?pt=Ye-2*(Ct!==0||Rt!==0?Ct+Rt:max$3(R.left,R.right)):ut=nt-2*(ft!==0||It!==0?ft+It:max$3(R.top,R.bottom))}await f({...t,availableWidth:pt,availableHeight:ut});const mt=await l.getDimensions(c.floating);return Ye!==mt.width||nt!==mt.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$2(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!invalidOverflowDisplayValues.has(a)}const tableElements=new Set(["table","td","th"]);function isTableElement(e){return tableElements.has(getNodeName(e))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(e){return topLayerSelectors.some(t=>{try{return e.matches(t)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return transformProperties.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||willChangeValues.some(s=>(n.willChange||"").includes(s))||containValues.some(s=>(n.contain||"").includes(s))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$2(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(e){return lastTraversableNodeNames.has(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$2(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=getNearestOverflowAncestor(e),o=a===((s=e.ownerDocument)==null?void 0:s.body),l=getWindow(a);if(o){const c=getFrameElement(l);return t.concat(l,l.visualViewport||[],isOverflowElement(a)?a:[],c&&n?getOverflowAncestors(c):[])}return t.concat(a,getOverflowAncestors(a,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=isHTMLElement$2(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:s,c=round$2(n)!==o||round$2(s)!==l;return c&&(n=o,s=l),{width:n,height:s,$:c}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$2(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:o}=getCssDimensions(t);let l=(o?round$2(n.width):n.width)/s,c=(o?round$2(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=unwrapElement(e);let l=createCoords(1);t&&(s?isElement(s)&&(l=getScale(s)):l=getScale(e));const c=shouldAddVisualOffsets(o,n,s)?getVisualOffsets(o):createCoords(0);let f=(a.left+c.x)/l.x,g=(a.top+c.y)/l.y,R=a.width/l.x,A=a.height/l.y;if(o){const V=getWindow(o),Ve=s&&isElement(s)?getWindow(s):s;let Ye=V,nt=getFrameElement(Ye);for(;nt&&s&&Ve!==Ye;){const et=getScale(nt),rt=nt.getBoundingClientRect(),st=getComputedStyle$1(nt),ot=rt.left+(nt.clientLeft+parseFloat(st.paddingLeft))*et.x,ct=rt.top+(nt.clientTop+parseFloat(st.paddingTop))*et.y;f*=et.x,g*=et.y,R*=et.x,A*=et.y,f+=ot,g+=ct,Ye=getWindow(nt),nt=getFrameElement(Ye)}}return rectToClientRect({width:R,height:A,x:f,y:g})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-getWindowScrollBarX(e,n),a=n.top+t.scrollTop;return{x:s,y:a}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const o=a==="fixed",l=getDocumentElement(s),c=t?isTopLayer(t.floating):!1;if(s===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},g=createCoords(1);const R=createCoords(0),A=isHTMLElement$2(s);if((A||!A&&!o)&&((getNodeName(s)!=="body"||isOverflowElement(l))&&(f=getNodeScroll(s)),isHTMLElement$2(s))){const Ve=getBoundingClientRect(s);g=getScale(s),R.x=Ve.x+s.clientLeft,R.y=Ve.y+s.clientTop}const V=l&&!A&&!o?getHTMLOffset(l,f):createCoords(0);return{width:n.width*g.x,height:n.height*g.y,x:n.x*g.x-f.scrollLeft*g.x+R.x+V.x,y:n.y*g.y-f.scrollTop*g.y+R.y+V.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),s=e.ownerDocument.body,a=max$3(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=max$3(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let l=-n.scrollLeft+getWindowScrollBarX(e);const c=-n.scrollTop;return getComputedStyle$1(s).direction==="rtl"&&(l+=max$3(t.clientWidth,s.clientWidth)-a),{width:a,height:o,x:l,y:c}}const SCROLLBAR_MAX=25;function getViewportRect(e,t){const n=getWindow(e),s=getDocumentElement(e),a=n.visualViewport;let o=s.clientWidth,l=s.clientHeight,c=0,f=0;if(a){o=a.width,l=a.height;const R=isWebKit();(!R||R&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}const g=getWindowScrollBarX(s);if(g<=0){const R=s.ownerDocument,A=R.body,V=getComputedStyle(A),Ve=R.compatMode==="CSS1Compat"&&parseFloat(V.marginLeft)+parseFloat(V.marginRight)||0,Ye=Math.abs(s.clientWidth-A.clientWidth-Ve);Ye<=SCROLLBAR_MAX&&(o-=Ye)}else g<=SCROLLBAR_MAX&&(o+=g);return{width:o,height:l,x:c,y:f}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,o=isHTMLElement$2(e)?getScale(e):createCoords(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=a*o.x,g=s*o.y;return{width:l,height:c,x:f,y:g}}function getClientRectFromClippingAncestor(e,t,n){let s;if(t==="viewport")s=getViewportRect(e,n);else if(t==="document")s=getDocumentRect(getDocumentElement(e));else if(isElement(t))s=getInnerBoundingClientRect(t,n);else{const a=getVisualOffsets(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return rectToClientRect(s)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let s=getOverflowAncestors(e,[],!1).filter(c=>isElement(c)&&getNodeName(c)!=="body"),a=null;const o=getComputedStyle$1(e).position==="fixed";let l=o?getParentNode(e):e;for(;isElement(l)&&!isLastTraversableNode(l);){const c=getComputedStyle$1(l),f=isContainingBlock(l);!f&&c.position==="fixed"&&(a=null),(o?!f&&!a:!f&&c.position==="static"&&!!a&&absoluteOrFixed.has(a.position)||isOverflowElement(l)&&!f&&hasFixedPositionAncestor(e,l))?s=s.filter(R=>R!==l):a=c,l=getParentNode(l)}return t.set(e,s),s}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const l=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),s],c=l[0],f=l.reduce((g,R)=>{const A=getClientRectFromClippingAncestor(t,R,a);return g.top=max$3(A.top,g.top),g.right=min$3(A.right,g.right),g.bottom=min$3(A.bottom,g.bottom),g.left=max$3(A.left,g.left),g},getClientRectFromClippingAncestor(t,c,a));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const s=isHTMLElement$2(t),a=getDocumentElement(t),o=n==="fixed",l=getBoundingClientRect(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=createCoords(0);function g(){f.x=getWindowScrollBarX(a)}if(s||!s&&!o)if((getNodeName(t)!=="body"||isOverflowElement(a))&&(c=getNodeScroll(t)),s){const Ve=getBoundingClientRect(t,!0,o,t);f.x=Ve.x+t.clientLeft,f.y=Ve.y+t.clientTop}else a&&g();o&&!s&&a&&g();const R=a&&!s&&!o?getHTMLOffset(a,c):createCoords(0),A=l.left+c.scrollLeft-f.x-R.x,V=l.top+c.scrollTop-f.y-R.y;return{x:A,y:V,width:l.width,height:l.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$2(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$2(e)){let a=getParentNode(e);for(;a&&!isLastTraversableNode(a);){if(isElement(a)&&!isStaticPositioned(a))return a;a=getParentNode(a)}return n}let s=getTrueOffsetParent(e,t);for(;s&&isTableElement(s)&&isStaticPositioned(s);)s=getTrueOffsetParent(s,t);return s&&isLastTraversableNode(s)&&isStaticPositioned(s)&&!isContainingBlock(s)?n:s||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,s=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,s;const a=getDocumentElement(e);function o(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const g=e.getBoundingClientRect(),{left:R,top:A,width:V,height:Ve}=g;if(c||t(),!V||!Ve)return;const Ye=floor(A),nt=floor(a.clientWidth-(R+V)),et=floor(a.clientHeight-(A+Ve)),rt=floor(R),ot={rootMargin:-Ye+"px "+-nt+"px "+-et+"px "+-rt+"px",threshold:max$3(0,min$3(1,f))||1};let ct=!0;function lt(at){const ut=at[0].intersectionRatio;if(ut!==f){if(!ct)return l();ut?l(!1,ut):s=setTimeout(()=>{l(!1,1e-7)},1e3)}ut===1&&!rectsAreEqual(g,e.getBoundingClientRect())&&l(),ct=!1}try{n=new IntersectionObserver(lt,{...ot,root:a.ownerDocument})}catch{n=new IntersectionObserver(lt,ot)}n.observe(e)}return l(!0),o}function autoUpdate(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,g=unwrapElement(e),R=a||o?[...g?getOverflowAncestors(g):[],...getOverflowAncestors(t)]:[];R.forEach(rt=>{a&&rt.addEventListener("scroll",n,{passive:!0}),o&&rt.addEventListener("resize",n)});const A=g&&c?observeMove(g,n):null;let V=-1,Ve=null;l&&(Ve=new ResizeObserver(rt=>{let[st]=rt;st&&st.target===g&&Ve&&(Ve.unobserve(t),cancelAnimationFrame(V),V=requestAnimationFrame(()=>{var ot;(ot=Ve)==null||ot.observe(t)})),n()}),g&&!f&&Ve.observe(g),Ve.observe(t));let Ye,nt=f?getBoundingClientRect(e):null;f&&et();function et(){const rt=getBoundingClientRect(e);nt&&!rectsAreEqual(nt,rt)&&n(),nt=rt,Ye=requestAnimationFrame(et)}return n(),()=>{var rt;R.forEach(st=>{a&&st.removeEventListener("scroll",n),o&&st.removeEventListener("resize",n)}),A==null||A(),(rt=Ve)==null||rt.disconnect(),Ve=null,f&&cancelAnimationFrame(Ye)}}const offset$1=offset$2,shift$2=shift$3,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$3=arrow$4,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const s=new Map,a={platform,...n},o={...a.platform,_c:s};return computePosition$1(e,t,{...a,platform:o})};var isClient=typeof document<"u",noop$6=function(){},index=isClient?React.useLayoutEffect:noop$6;function deepEqual$2(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!deepEqual$2(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&e.$$typeof)&&!deepEqual$2(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:g}=e,[R,A]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[V,Ve]=React__namespace.useState(s);deepEqual$2(V,s)||Ve(s);const[Ye,nt]=React__namespace.useState(null),[et,rt]=React__namespace.useState(null),st=React__namespace.useCallback(Dt=>{Dt!==at.current&&(at.current=Dt,nt(Dt))},[]),ot=React__namespace.useCallback(Dt=>{Dt!==ut.current&&(ut.current=Dt,rt(Dt))},[]),ct=o||Ye,lt=l||et,at=React__namespace.useRef(null),ut=React__namespace.useRef(null),pt=React__namespace.useRef(R),mt=f!=null,Ct=useLatestRef(f),Rt=useLatestRef(a),ft=useLatestRef(g),It=React__namespace.useCallback(()=>{if(!at.current||!ut.current)return;const Dt={placement:t,strategy:n,middleware:V};Rt.current&&(Dt.platform=Rt.current),computePosition(at.current,ut.current,Dt).then($t=>{const zt={...$t,isPositioned:ft.current!==!1};yt.current&&!deepEqual$2(pt.current,zt)&&(pt.current=zt,ReactDOM__namespace.flushSync(()=>{A(zt)}))})},[V,t,n,Rt,ft]);index(()=>{g===!1&&pt.current.isPositioned&&(pt.current.isPositioned=!1,A(Dt=>({...Dt,isPositioned:!1})))},[g]);const yt=React__namespace.useRef(!1);index(()=>(yt.current=!0,()=>{yt.current=!1}),[]),index(()=>{if(ct&&(at.current=ct),lt&&(ut.current=lt),ct&&lt){if(Ct.current)return Ct.current(ct,lt,It);It()}},[ct,lt,It,Ct,mt]);const Mt=React__namespace.useMemo(()=>({reference:at,floating:ut,setReference:st,setFloating:ot}),[st,ot]),Ft=React__namespace.useMemo(()=>({reference:ct,floating:lt}),[ct,lt]),Ht=React__namespace.useMemo(()=>{const Dt={position:n,left:0,top:0};if(!Ft.floating)return Dt;const $t=roundByDPR(Ft.floating,R.x),zt=roundByDPR(Ft.floating,R.y);return c?{...Dt,transform:"translate("+$t+"px, "+zt+"px)",...getDPR(Ft.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$t,top:zt}},[n,c,Ft.floating,R.x,R.y]);return React__namespace.useMemo(()=>({...R,update:It,refs:Mt,elements:Ft,floatingStyles:Ht}),[R,It,Mt,Ft,Ht])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?arrow$3({element:s.current,padding:a}).fn(n):{}:s?arrow$3({element:s,padding:a}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift$1=(e,t)=>({...shift$2(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow$2=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...o}=e;return jsxRuntime.jsx(Primitive$4.svg,{...o,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$9=Arrow$1,POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope$2(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[s,a]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:s,onAnchorChange:a,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$2="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,o=usePopperContext(ANCHOR_NAME$2,n),l=React__namespace.useRef(null),c=useComposedRefs(t,l),f=React__namespace.useRef(null);return React__namespace.useEffect(()=>{const g=f.current;f.current=(s==null?void 0:s.current)||l.current,g!==f.current&&o.onAnchorChange(f.current)}),s?null:jsxRuntime.jsx(Primitive$4.div,{...a,ref:c})});PopperAnchor.displayName=ANCHOR_NAME$2;var CONTENT_NAME$9="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$9),PopperContent=React__namespace.forwardRef((e,t)=>{var Xt,fn,Yt,pn,gn,Kt;const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:g=[],collisionPadding:R=0,sticky:A="partial",hideWhenDetached:V=!1,updatePositionStrategy:Ve="optimized",onPlaced:Ye,...nt}=e,et=usePopperContext(CONTENT_NAME$9,n),[rt,st]=React__namespace.useState(null),ot=useComposedRefs(t,Tn=>st(Tn)),[ct,lt]=React__namespace.useState(null),at=useSize(ct),ut=(at==null?void 0:at.width)??0,pt=(at==null?void 0:at.height)??0,mt=s+(o!=="center"?"-"+o:""),Ct=typeof R=="number"?R:{top:0,right:0,bottom:0,left:0,...R},Rt=Array.isArray(g)?g:[g],ft=Rt.length>0,It={padding:Ct,boundary:Rt.filter(isNotNull),altBoundary:ft},{refs:yt,floatingStyles:Mt,placement:Ft,isPositioned:Ht,middlewareData:Dt}=useFloating({strategy:"fixed",placement:mt,whileElementsMounted:(...Tn)=>autoUpdate(...Tn,{animationFrame:Ve==="always"}),elements:{reference:et.anchor},middleware:[offset({mainAxis:a+pt,alignmentAxis:l}),f&&shift$1({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?limitShift():void 0,...It}),f&&flip({...It}),size({...It,apply:({elements:Tn,rects:hn,availableWidth:Sn,availableHeight:vn})=>{const{width:Rn,height:Cn}=hn.reference,bn=Tn.floating.style;bn.setProperty("--radix-popper-available-width",`${Sn}px`),bn.setProperty("--radix-popper-available-height",`${vn}px`),bn.setProperty("--radix-popper-anchor-width",`${Rn}px`),bn.setProperty("--radix-popper-anchor-height",`${Cn}px`)}}),ct&&arrow$2({element:ct,padding:c}),transformOrigin({arrowWidth:ut,arrowHeight:pt}),V&&hide({strategy:"referenceHidden",...It})]}),[$t,zt]=getSideAndAlignFromPlacement(Ft),Qt=useCallbackRef$1(Ye);useLayoutEffect2(()=>{Ht&&(Qt==null||Qt())},[Ht,Qt]);const Jt=(Xt=Dt.arrow)==null?void 0:Xt.x,sn=(fn=Dt.arrow)==null?void 0:fn.y,an=((Yt=Dt.arrow)==null?void 0:Yt.centerOffset)!==0,[Zt,mn]=React__namespace.useState();return useLayoutEffect2(()=>{rt&&mn(window.getComputedStyle(rt).zIndex)},[rt]),jsxRuntime.jsx("div",{ref:yt.setFloating,"data-radix-popper-content-wrapper":"",style:{...Mt,transform:Ht?Mt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Zt,"--radix-popper-transform-origin":[(pn=Dt.transformOrigin)==null?void 0:pn.x,(gn=Dt.transformOrigin)==null?void 0:gn.y].join(" "),...((Kt=Dt.hide)==null?void 0:Kt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:$t,onArrowChange:lt,arrowX:Jt,arrowY:sn,shouldHideArrow:an,children:jsxRuntime.jsx(Primitive$4.div,{"data-side":$t,"data-align":zt,...nt,ref:ot,style:{...nt.style,animation:Ht?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$9;var ARROW_NAME$5="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,o=useContentContext(ARROW_NAME$5,s),l=OPPOSITE_SIDE[o.placedSide];return jsxRuntime.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]: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:jsxRuntime.jsx(Root$9,{...a,ref:n,style:{...a.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$5;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var et,rt,st;const{placement:n,rects:s,middlewareData:a}=t,l=((et=a.arrow)==null?void 0:et.centerOffset)!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[g,R]=getSideAndAlignFromPlacement(n),A={start:"0%",center:"50%",end:"100%"}[R],V=(((rt=a.arrow)==null?void 0:rt.x)??0)+c/2,Ve=(((st=a.arrow)==null?void 0:st.y)??0)+f/2;let Ye="",nt="";return g==="bottom"?(Ye=l?A:`${V}px`,nt=`${-f}px`):g==="top"?(Ye=l?A:`${V}px`,nt=`${s.floating.height+f}px`):g==="right"?(Ye=`${-f}px`,nt=l?A:`${Ve}px`):g==="left"&&(Ye=`${s.floating.width+f}px`,nt=l?A:`${Ve}px`),{data:{x:Ye,y:nt}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$7=Popper,Anchor=PopperAnchor,Content$2=PopperContent,Arrow=PopperArrow;function createSlot$3(e){const t=createSlotClone$3(e),n=React__namespace.forwardRef((s,a)=>{const{children:o,...l}=s,c=React__namespace.Children.toArray(o),f=c.find(isSlottable$3);if(f){const g=f.props.children,R=c.map(A=>A===f?React__namespace.Children.count(g)>1?React__namespace.Children.only(null):React__namespace.isValidElement(g)?g.props.children:null:A);return jsxRuntime.jsx(t,{...l,ref:a,children:React__namespace.isValidElement(g)?React__namespace.cloneElement(g,void 0,R):null})}return jsxRuntime.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function createSlotClone$3(e){const t=React__namespace.forwardRef((n,s)=>{const{children:a,...o}=n;if(React__namespace.isValidElement(a)){const l=getElementRef$3(a),c=mergeProps$3(o,a.props);return a.type!==React__namespace.Fragment&&(c.ref=s?composeRefs(s,l):l),React__namespace.cloneElement(a,c)}return React__namespace.Children.count(a)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$5=Symbol("radix.slottable");function isSlottable$3(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$5}function mergeProps$3(e,t){const n={...t};for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?n[s]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[s]=a):s==="style"?n[s]={...a,...o}:s==="className"&&(n[s]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$3(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var SELECTION_KEYS$1=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS$1,"ArrowRight"],rtl:[...SELECTION_KEYS$1,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope$3,createPopperScope,createRovingFocusGroupScope]),usePopperScope$3=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:a,onOpenChange:o,modal:l=!0}=e,c=usePopperScope$3(t),[f,g]=React__namespace.useState(null),R=React__namespace.useRef(!1),A=useCallbackRef$1(o),V=useDirection(a);return React__namespace.useEffect(()=>{const Ve=()=>{R.current=!0,document.addEventListener("pointerdown",Ye,{capture:!0,once:!0}),document.addEventListener("pointermove",Ye,{capture:!0,once:!0})},Ye=()=>R.current=!1;return document.addEventListener("keydown",Ve,{capture:!0}),()=>{document.removeEventListener("keydown",Ve,{capture:!0}),document.removeEventListener("pointerdown",Ye,{capture:!0}),document.removeEventListener("pointermove",Ye,{capture:!0})}},[]),jsxRuntime.jsx(Root2$7,{...c,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:A,content:f,onContentChange:g,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>A(!1),[A]),isUsingKeyboardRef:R,dir:V,modal:l,children:s})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME$1="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,a=usePopperScope$3(n);return jsxRuntime.jsx(Anchor,{...a,...s,ref:t})});MenuAnchor.displayName=ANCHOR_NAME$1;var PORTAL_NAME$5="MenuPortal",[PortalProvider$2,usePortalContext$2]=createMenuContext(PORTAL_NAME$5,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:s,container:a}=e,o=useMenuContext(PORTAL_NAME$5,t);return jsxRuntime.jsx(PortalProvider$2,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||o.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:a,children:s})})})};MenuPortal.displayName=PORTAL_NAME$5;var CONTENT_NAME$8="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$8),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:s=n.forceMount,...a}=e,o=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),l=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:s||o.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:l.modal?jsxRuntime.jsx(MenuRootContentModal,{...a,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...a,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),s=React__namespace.useRef(null),a=useComposedRefs(t,s);return React__namespace.useEffect(()=>{const o=s.current;if(o)return hideOthers(o)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$3=createSlot$3("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:s=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:g,onPointerDownOutside:R,onFocusOutside:A,onInteractOutside:V,onDismiss:Ve,disableOutsideScroll:Ye,...nt}=e,et=useMenuContext(CONTENT_NAME$8,n),rt=useMenuRootContext(CONTENT_NAME$8,n),st=usePopperScope$3(n),ot=useRovingFocusGroupScope$1(n),ct=useCollection$3(n),[lt,at]=React__namespace.useState(null),ut=React__namespace.useRef(null),pt=useComposedRefs(t,ut,et.onContentChange),mt=React__namespace.useRef(0),Ct=React__namespace.useRef(""),Rt=React__namespace.useRef(0),ft=React__namespace.useRef(null),It=React__namespace.useRef("right"),yt=React__namespace.useRef(0),Mt=Ye?ReactRemoveScroll:React__namespace.Fragment,Ft=Ye?{as:Slot$3,allowPinchZoom:!0}:void 0,Ht=$t=>{var Xt,fn;const zt=Ct.current+$t,Qt=ct().filter(Yt=>!Yt.disabled),Jt=document.activeElement,sn=(Xt=Qt.find(Yt=>Yt.ref.current===Jt))==null?void 0:Xt.textValue,an=Qt.map(Yt=>Yt.textValue),Zt=getNextMatch(an,zt,sn),mn=(fn=Qt.find(Yt=>Yt.textValue===Zt))==null?void 0:fn.ref.current;(function Yt(pn){Ct.current=pn,window.clearTimeout(mt.current),pn!==""&&(mt.current=window.setTimeout(()=>Yt(""),1e3))})(zt),mn&&setTimeout(()=>mn.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(mt.current),[]),useFocusGuards();const Dt=React__namespace.useCallback($t=>{var Qt,Jt;return It.current===((Qt=ft.current)==null?void 0:Qt.side)&&isPointerInGraceArea($t,(Jt=ft.current)==null?void 0:Jt.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:Ct,onItemEnter:React__namespace.useCallback($t=>{Dt($t)&&$t.preventDefault()},[Dt]),onItemLeave:React__namespace.useCallback($t=>{var zt;Dt($t)||((zt=ut.current)==null||zt.focus(),at(null))},[Dt]),onTriggerLeave:React__namespace.useCallback($t=>{Dt($t)&&$t.preventDefault()},[Dt]),pointerGraceTimerRef:Rt,onPointerGraceIntentChange:React__namespace.useCallback($t=>{ft.current=$t},[]),children:jsxRuntime.jsx(Mt,{...Ft,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:a,onMountAutoFocus:composeEventHandlers(o,$t=>{var zt;$t.preventDefault(),(zt=ut.current)==null||zt.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:g,onPointerDownOutside:R,onFocusOutside:A,onInteractOutside:V,onDismiss:Ve,children:jsxRuntime.jsx(Root$c,{asChild:!0,...ot,dir:rt.dir,orientation:"vertical",loop:s,currentTabStopId:lt,onCurrentTabStopIdChange:at,onEntryFocus:composeEventHandlers(f,$t=>{rt.isUsingKeyboardRef.current||$t.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$2,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(et.open),"data-radix-menu-content":"",dir:rt.dir,...st,...nt,ref:pt,style:{outline:"none",...nt.style},onKeyDown:composeEventHandlers(nt.onKeyDown,$t=>{const Qt=$t.target.closest("[data-radix-menu-content]")===$t.currentTarget,Jt=$t.ctrlKey||$t.altKey||$t.metaKey,sn=$t.key.length===1;Qt&&($t.key==="Tab"&&$t.preventDefault(),!Jt&&sn&&Ht($t.key));const an=ut.current;if($t.target!==an||!FIRST_LAST_KEYS.includes($t.key))return;$t.preventDefault();const mn=ct().filter(Xt=>!Xt.disabled).map(Xt=>Xt.ref.current);LAST_KEYS.includes($t.key)&&mn.reverse(),focusFirst$1(mn)}),onBlur:composeEventHandlers(e.onBlur,$t=>{$t.currentTarget.contains($t.target)||(window.clearTimeout(mt.current),Ct.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse($t=>{const zt=$t.target,Qt=yt.current!==$t.clientX;if($t.currentTarget.contains(zt)&&Qt){const Jt=$t.clientX>yt.current?"right":"left";It.current=Jt,yt.current=$t.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$8;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"group",...s,ref:t})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return jsxRuntime.jsx(Primitive$4.div,{...s,ref:t})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$3="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:s,...a}=e,o=React__namespace.useRef(null),l=useMenuRootContext(ITEM_NAME$3,e.__scopeMenu),c=useMenuContentContext(ITEM_NAME$3,e.__scopeMenu),f=useComposedRefs(t,o),g=React__namespace.useRef(!1),R=()=>{const A=o.current;if(!n&&A){const V=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});A.addEventListener(ITEM_SELECT,Ve=>s==null?void 0:s(Ve),{once:!0}),dispatchDiscreteCustomEvent(A,V),V.defaultPrevented?g.current=!1:l.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...a,ref:f,disabled:n,onClick:composeEventHandlers(e.onClick,R),onPointerDown:A=>{var V;(V=e.onPointerDown)==null||V.call(e,A),g.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,A=>{var V;g.current||(V=A.currentTarget)==null||V.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,A=>{const V=c.searchRef.current!=="";n||V&&A.key===" "||SELECTION_KEYS$1.includes(A.key)&&(A.currentTarget.click(),A.preventDefault())})})});MenuItem.displayName=ITEM_NAME$3;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:s=!1,textValue:a,...o}=e,l=useMenuContentContext(ITEM_NAME$3,n),c=useRovingFocusGroupScope$1(n),f=React__namespace.useRef(null),g=useComposedRefs(t,f),[R,A]=React__namespace.useState(!1),[V,Ve]=React__namespace.useState("");return React__namespace.useEffect(()=>{const Ye=f.current;Ye&&Ve((Ye.textContent??"").trim())},[o.children]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,disabled:s,textValue:a??V,children:jsxRuntime.jsx(Item$3,{asChild:!0,...c,focusable:!s,children:jsxRuntime.jsx(Primitive$4.div,{role:"menuitem","data-highlighted":R?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...o,ref:g,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(Ye=>{s?l.onItemLeave(Ye):(l.onItemEnter(Ye),Ye.defaultPrevented||Ye.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(Ye=>l.onItemLeave(Ye))),onFocus:composeEventHandlers(e.onFocus,()=>A(!0)),onBlur:composeEventHandlers(e.onBlur,()=>A(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:s,...a}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate$1(n)?"mixed":n,...a,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(a.onSelect,()=>s==null?void 0:s(isIndeterminate$1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((e,t)=>{const{value:n,onValueChange:s,...a}=e,o=useCallbackRef$1(s);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:o,children:jsxRuntime.jsx(MenuGroup,{...a,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...s}=e,a=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),o=n===a.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:o,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":o,...s,ref:t,"data-state":getCheckedState(o),onSelect:composeEventHandlers(s.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME$1="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME$1,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:s,...a}=e,o=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:s||isIndeterminate$1(o.checked)||o.checked===!0,children:jsxRuntime.jsx(Primitive$4.span,{...a,ref:t,"data-state":getCheckedState(o.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"separator","aria-orientation":"horizontal",...s,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$4="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,a=usePopperScope$3(n);return jsxRuntime.jsx(Arrow,{...a,...s,ref:t})});MenuArrow.displayName=ARROW_NAME$4;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:s=!1,onOpenChange:a}=e,o=useMenuContext(SUB_NAME,t),l=usePopperScope$3(t),[c,f]=React__namespace.useState(null),[g,R]=React__namespace.useState(null),A=useCallbackRef$1(a);return React__namespace.useEffect(()=>(o.open===!1&&A(!1),()=>A(!1)),[o.open,A]),jsxRuntime.jsx(Root2$7,{...l,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:s,onOpenChange:A,content:g,onContentChange:R,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId$1(),triggerId:useId$1(),trigger:c,onTriggerChange:f,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),s=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),a=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=React__namespace.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=o,g={__scopeMenu:e.__scopeMenu},R=React__namespace.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return React__namespace.useEffect(()=>R,[R]),React__namespace.useEffect(()=>{const A=c.current;return()=>{window.clearTimeout(A),f(null)}},[c,f]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,...g,children:jsxRuntime.jsx(MenuItemImpl,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,a.onTriggerChange),onClick:A=>{var V;(V=e.onClick)==null||V.call(e,A),!(e.disabled||A.defaultPrevented)&&(A.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(A=>{o.onItemEnter(A),!A.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),R()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(A=>{var Ve,Ye;R();const V=(Ve=n.content)==null?void 0:Ve.getBoundingClientRect();if(V){const nt=(Ye=n.content)==null?void 0:Ye.dataset.side,et=nt==="right",rt=et?-5:5,st=V[et?"left":"right"],ot=V[et?"right":"left"];o.onPointerGraceIntentChange({area:[{x:A.clientX+rt,y:A.clientY},{x:st,y:V.top},{x:ot,y:V.top},{x:ot,y:V.bottom},{x:st,y:V.bottom}],side:nt}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(A),A.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,A=>{var Ve;const V=o.searchRef.current!=="";e.disabled||V&&A.key===" "||SUB_OPEN_KEYS[s.dir].includes(A.key)&&(n.onOpenChange(!0),(Ve=n.content)==null||Ve.focus(),A.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:s=n.forceMount,...a}=e,o=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),l=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu),c=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),g=useComposedRefs(t,f);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:s||o.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:g,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:R=>{var A;l.isUsingKeyboardRef.current&&((A=f.current)==null||A.focus()),R.preventDefault()},onCloseAutoFocus:R=>R.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,R=>{R.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,R=>{l.onClose(),R.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{var Ve;const A=R.currentTarget.contains(R.target),V=SUB_CLOSE_KEYS[l.dir].includes(R.key);A&&V&&(o.onOpenChange(!1),(Ve=c.trigger)==null||Ve.focus(),R.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate$1(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate$1(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray$1(e,t){return e.map((n,s)=>e[(t+s)%e.length])}function getNextMatch(e,t,n){const a=t.length>1&&Array.from(t).every(g=>g===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=wrapArray$1(e,Math.max(o,0));a.length===1&&(l=l.filter(g=>g!==n));const f=l.find(g=>g.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function isPointInPolygon$1(e,t){const{x:n,y:s}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],f=t[l],g=c.x,R=c.y,A=f.x,V=f.y;R>s!=V>s&&n<(A-g)*(s-R)/(V-R)+g&&(a=!a)}return a}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2$1=MenuAnchor,Portal$3=MenuPortal,Content2$6=MenuContent,Group$1=MenuGroup,Label$4=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator$1=MenuItemIndicator,Separator$3=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:s,open:a,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=useMenuScope(t),g=React__namespace.useRef(null),[R,A]=useControllableState({prop:a,defaultProp:o??!1,onChange:l,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId$1(),triggerRef:g,contentId:useId$1(),open:R,onOpenChange:A,onOpenToggle:React__namespace.useCallback(()=>A(V=>!V),[A]),modal:c,children:jsxRuntime.jsx(Root3$1,{...f,open:R,onOpenChange:A,dir:s,modal:c,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$8="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:s=!1,...a}=e,o=useDropdownMenuContext(TRIGGER_NAME$8,n),l=useMenuScope(n);return jsxRuntime.jsx(Anchor2$1,{asChild:!0,...l,children:jsxRuntime.jsx(Primitive$4.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":s?"":void 0,disabled:s,...a,ref:composeRefs(t,o.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,c=>{!s&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,c=>{s||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$8;var PORTAL_NAME$4="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,s=useMenuScope(t);return jsxRuntime.jsx(Portal$3,{...s,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$4;var CONTENT_NAME$7="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useDropdownMenuContext(CONTENT_NAME$7,n),o=useMenuScope(n),l=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$6,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...s,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,c=>{var f;l.current||(f=a.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,c=>{const f=c.detail.originalEvent,g=f.button===0&&f.ctrlKey===!0,R=f.button===2||g;(!a.modal||R)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$7;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Group$1,{...a,...s,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...a,...s,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$2="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...a,...s,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME$2;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...a,...s,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...a,...s,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...a,...s,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME$2="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...a,...s,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME$2;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...a,...s,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$3="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...a,...s,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$3;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:s,onOpenChange:a,defaultOpen:o}=e,l=useMenuScope(t),[c,f]=useControllableState({prop:s,defaultProp:o??!1,onChange:a,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...l,open:c,onOpenChange:f,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...a,...s,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...a,...s,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$6=DropdownMenu$1,Trigger$5=DropdownMenuTrigger$1,Portal2$1=DropdownMenuPortal$1,Content2$5=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$6,DropdownMenuTrigger=Trigger$5,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2$1,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,children:n,...s},a)=>jsxRuntime.jsxs(SubTrigger2,{ref:a,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...s,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},s)=>jsxRuntime.jsx(Portal2$1,{children:jsxRuntime.jsx(Content2$5,{ref:s,sideOffset:t,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));DropdownMenuContent.displayName=Content2$5.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...n},s)=>jsxRuntime.jsx(Item2,{ref:s,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,checked:n,...s},a)=>jsxRuntime.jsxs(CheckboxItem2,{ref:a,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...n},s)=>jsxRuntime.jsxs(RadioItem2,{ref:s,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},s)=>jsxRuntime.jsx(Label2,{ref:s,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";var REACT_LAZY_TYPE=Symbol.for("react.lazy"),use=React__namespace[" use ".trim().toString()];function isPromiseLike(e){return typeof e=="object"&&e!==null&&"then"in e}function isLazyComponent(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===REACT_LAZY_TYPE&&"_payload"in e&&isPromiseLike(e._payload)}function createSlot$2(e){const t=createSlotClone$2(e),n=React__namespace.forwardRef((s,a)=>{let{children:o,...l}=s;isLazyComponent(o)&&typeof use=="function"&&(o=use(o._payload));const c=React__namespace.Children.toArray(o),f=c.find(isSlottable$2);if(f){const g=f.props.children,R=c.map(A=>A===f?React__namespace.Children.count(g)>1?React__namespace.Children.only(null):React__namespace.isValidElement(g)?g.props.children:null:A);return jsxRuntime.jsx(t,{...l,ref:a,children:React__namespace.isValidElement(g)?React__namespace.cloneElement(g,void 0,R):null})}return jsxRuntime.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var Slot$2=createSlot$2("Slot");function createSlotClone$2(e){const t=React__namespace.forwardRef((n,s)=>{let{children:a,...o}=n;if(isLazyComponent(a)&&typeof use=="function"&&(a=use(a._payload)),React__namespace.isValidElement(a)){const l=getElementRef$2(a),c=mergeProps$2(o,a.props);return a.type!==React__namespace.Fragment&&(c.ref=s?composeRefs(s,l):l),React__namespace.cloneElement(a,c)}return React__namespace.Children.count(a)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$4=Symbol("radix.slottable");function isSlottable$2(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$4}function mergeProps$2(e,t){const n={...t};for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?n[s]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[s]=a):s==="style"?n[s]={...a,...o}:s==="className"&&(n[s]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$2(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(g=>{const R=n==null?void 0:n[g],A=o==null?void 0:o[g];if(R===null)return null;const V=falsyToString(R)||falsyToString(A);return a[g][V]}),c=n&&Object.entries(n).reduce((g,R)=>{let[A,V]=R;return V===void 0||(g[A]=V),g},{}),f=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((g,R)=>{let{class:A,className:V,...Ve}=R;return Object.entries(Ve).every(Ye=>{let[nt,et]=Ye;return Array.isArray(et)?et.includes({...o,...c}[nt]):{...o,...c}[nt]===et})?[...g,A,V]:g},[]);return cx(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",purple:"bg-randmar-purple text-gray-100 shadow-sm hover:bg-randmar-purple/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button$1=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:s=!1,confirmationDialog:a,onClick:o,...l},c)=>{const f=s?Slot$2:"button";if(!a)return jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:c,onClick:o,...l});o&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:g,content:R,onConfirm:A,confirmText:V="Confirm",cancelText:Ve="Cancel"}=a,Ye=()=>{A()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:c,...l})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:g}),jsxRuntime.jsx(DialogDescription,{children:R})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{variant:"outline",children:Ve})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{onClick:Ye,children:V})})]})]})]})});Button$1.displayName="Button";function formatProdErrorMessage$1(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $$observable=typeof Symbol=="function"&&Symbol.observable||"@@observable",symbol_observable_default=$$observable,randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$4(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function miniKindOf(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(isDate$1(e))return"date";if(isError(e))return"error";const n=ctorName(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(e){return typeof e.constructor=="function"?e.constructor.name:null}function isError(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function isDate$1(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function kindOf(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=miniKindOf(e)),t}function createStore$1(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(2):`Expected the root reducer to be a function. Instead, received: '${kindOf(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(1):`Expected the enhancer to be a function. Instead, received: '${kindOf(n)}'`);return n(createStore$1)(e,t)}let s=e,a=t,o=new Map,l=o,c=0,f=!1;function g(){l===o&&(l=new Map,o.forEach((et,rt)=>{l.set(rt,et)}))}function R(){if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function A(et){if(typeof et!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(4):`Expected the listener to be a function. Instead, received: '${kindOf(et)}'`);if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let rt=!0;g();const st=c++;return l.set(st,et),function(){if(rt){if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");rt=!1,g(),l.delete(st),o=null}}}function V(et){if(!isPlainObject$4(et))throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(7):`Actions must be plain objects. Instead, the actual type was: '${kindOf(et)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof et.type>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof et.type!="string")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(17):`Action "type" property must be a string. Instead, the actual type was: '${kindOf(et.type)}'. Value was: '${et.type}' (stringified)`);if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(9):"Reducers may not dispatch actions.");try{f=!0,a=s(a,et)}finally{f=!1}return(o=l).forEach(st=>{st()}),et}function Ve(et){if(typeof et!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(10):`Expected the nextReducer to be a function. Instead, received: '${kindOf(et)}`);s=et,V({type:actionTypes_default.REPLACE})}function Ye(){const et=A;return{subscribe(rt){if(typeof rt!="object"||rt===null)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(11):`Expected the observer to be an object. Instead, received: '${kindOf(rt)}'`);function st(){const ct=rt;ct.next&&ct.next(R())}return st(),{unsubscribe:et(st)}},[symbol_observable_default](){return this}}}return V({type:actionTypes_default.INIT}),{dispatch:V,subscribe:A,getState:R,replaceReducer:Ve,[symbol_observable_default]:Ye}}function warning(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function getUnexpectedStateShapeWarningMessage(e,t,n,s){const a=Object.keys(t),o=n&&n.type===actionTypes_default.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(a.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject$4(e))return`The ${o} has unexpected type of "${kindOf(e)}". Expected argument to be an object with the following keys: "${a.join('", "')}"`;const l=Object.keys(e).filter(c=>!t.hasOwnProperty(c)&&!s[c]);if(l.forEach(c=>{s[c]=!0}),!(n&&n.type===actionTypes_default.REPLACE)&&l.length>0)return`Unexpected ${l.length>1?"keys":"key"} "${l.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${a.join('", "')}". Unexpected keys will be ignored.`}function assertReducerShape(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function combineReducers(e){const t=Object.keys(e),n={};for(let l=0;l<t.length;l++){const c=t[l];process.env.NODE_ENV!=="production"&&typeof e[c]>"u"&&warning(`No reducer provided for key "${c}"`),typeof e[c]=="function"&&(n[c]=e[c])}const s=Object.keys(n);let a;process.env.NODE_ENV!=="production"&&(a={});let o;try{assertReducerShape(n)}catch(l){o=l}return function(c={},f){if(o)throw o;if(process.env.NODE_ENV!=="production"){const A=getUnexpectedStateShapeWarningMessage(c,n,f,a);A&&warning(A)}let g=!1;const R={};for(let A=0;A<s.length;A++){const V=s[A],Ve=n[V],Ye=c[V],nt=Ve(Ye,f);if(typeof nt>"u"){const et=f&&f.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(14):`When called with an action of type ${et?`"${String(et)}"`:"(unknown type)"}, the slice reducer for key "${V}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}R[V]=nt,g=g||nt!==Ye}return g=g||s.length!==Object.keys(c).length,g?R:c}}function compose$1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}function applyMiddleware(...e){return t=>(n,s)=>{const a=t(n,s);let o=()=>{throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const l={getState:a.getState,dispatch:(f,...g)=>o(f,...g)},c=e.map(f=>f(l));return o=compose$1(...c)(a.dispatch),{...a,dispatch:o}}}function isAction(e){return isPlainObject$4(e)&&"type"in e&&typeof e.type=="string"}var NOTHING$1=Symbol.for("immer-nothing"),DRAFTABLE$1=Symbol.for("immer-draftable"),DRAFT_STATE$1=Symbol.for("immer-state"),errors$1=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die$1(e,...t){if(process.env.NODE_ENV!=="production"){const n=errors$1[e],s=isFunction$5(n)?n.apply(null,t):n;throw new Error(`[Immer] ${s}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var O=Object,getPrototypeOf$2=O.getPrototypeOf,CONSTRUCTOR="constructor",PROTOTYPE="prototype",CONFIGURABLE="configurable",ENUMERABLE="enumerable",WRITABLE="writable",VALUE="value",isDraft$1=e=>!!e&&!!e[DRAFT_STATE$1];function isDraftable$1(e){var t;return e?isPlainObject$3(e)||isArray$2(e)||!!e[DRAFTABLE$1]||!!((t=e[CONSTRUCTOR])!=null&&t[DRAFTABLE$1])||isMap$1(e)||isSet$1(e):!1}var objectCtorString$1=O[PROTOTYPE][CONSTRUCTOR].toString(),cachedCtorStrings$1=new WeakMap;function isPlainObject$3(e){if(!e||!isObjectish(e))return!1;const t=getPrototypeOf$2(e);if(t===null||t===O[PROTOTYPE])return!0;const n=O.hasOwnProperty.call(t,CONSTRUCTOR)&&t[CONSTRUCTOR];if(n===Object)return!0;if(!isFunction$5(n))return!1;let s=cachedCtorStrings$1.get(n);return s===void 0&&(s=Function.toString.call(n),cachedCtorStrings$1.set(n,s)),s===objectCtorString$1}function original(e){return isDraft$1(e)||die$1(15,e),e[DRAFT_STATE$1].base_}function each$1(e,t,n=!0){getArchtype$1(e)===0?(n?Reflect.ownKeys(e):O.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((s,a)=>t(a,s,e))}function getArchtype$1(e){const t=e[DRAFT_STATE$1];return t?t.type_:isArray$2(e)?1:isMap$1(e)?2:isSet$1(e)?3:0}var has$2=(e,t,n=getArchtype$1(e))=>n===2?e.has(t):O[PROTOTYPE].hasOwnProperty.call(e,t),get$5=(e,t,n=getArchtype$1(e))=>n===2?e.get(t):e[t],set$3=(e,t,n,s=getArchtype$1(e))=>{s===2?e.set(t,n):s===3?e.add(n):e[t]=n};function is$2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var isArray$2=Array.isArray,isMap$1=e=>e instanceof Map,isSet$1=e=>e instanceof Set,isObjectish=e=>typeof e=="object",isFunction$5=e=>typeof e=="function",isBoolean$2=e=>typeof e=="boolean";function isArrayIndex(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var getProxyDraft=e=>isObjectish(e)?e==null?void 0:e[DRAFT_STATE$1]:null,latest$1=e=>e.copy_||e.base_,getFinalValue=e=>e.modified_?e.copy_:e.base_;function shallowCopy$1(e,t){if(isMap$1(e))return new Map(e);if(isSet$1(e))return new Set(e);if(isArray$2(e))return Array[PROTOTYPE].slice.call(e);const n=isPlainObject$3(e);if(t===!0||t==="class_only"&&!n){const s=O.getOwnPropertyDescriptors(e);delete s[DRAFT_STATE$1];let a=Reflect.ownKeys(s);for(let o=0;o<a.length;o++){const l=a[o],c=s[l];c[WRITABLE]===!1&&(c[WRITABLE]=!0,c[CONFIGURABLE]=!0),(c.get||c.set)&&(s[l]={[CONFIGURABLE]:!0,[WRITABLE]:!0,[ENUMERABLE]:c[ENUMERABLE],[VALUE]:e[l]})}return O.create(getPrototypeOf$2(e),s)}else{const s=getPrototypeOf$2(e);if(s!==null&&n)return{...e};const a=O.create(s);return O.assign(a,e)}}function freeze$2(e,t=!1){return isFrozen$2(e)||isDraft$1(e)||!isDraftable$1(e)||(getArchtype$1(e)>1&&O.defineProperties(e,{set:dontMutateMethodOverride$1,add:dontMutateMethodOverride$1,clear:dontMutateMethodOverride$1,delete:dontMutateMethodOverride$1}),O.freeze(e),t&&each$1(e,(n,s)=>{freeze$2(s,!0)},!1)),e}function dontMutateFrozenCollections$1(){die$1(2)}var dontMutateMethodOverride$1={[VALUE]:dontMutateFrozenCollections$1};function isFrozen$2(e){return e===null||!isObjectish(e)?!0:O.isFrozen(e)}var PluginMapSet="MapSet",PluginPatches="Patches",PluginArrayMethods="ArrayMethods",plugins$1={};function getPlugin$1(e){const t=plugins$1[e];return t||die$1(0,e),t}var isPluginLoaded=e=>!!plugins$1[e];function loadPlugin(e,t){plugins$1[e]||(plugins$1[e]=t)}var currentScope$1,getCurrentScope$1=()=>currentScope$1,createScope$1=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(PluginMapSet)?getPlugin$1(PluginMapSet):void 0,arrayMethodsPlugin_:isPluginLoaded(PluginArrayMethods)?getPlugin$1(PluginArrayMethods):void 0});function usePatchesInScope$1(e,t){t&&(e.patchPlugin_=getPlugin$1(PluginPatches),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope$1(e){leaveScope$1(e),e.drafts_.forEach(revokeDraft$1),e.drafts_=null}function leaveScope$1(e){e===currentScope$1&&(currentScope$1=e.parent_)}var enterScope$1=e=>currentScope$1=createScope$1(currentScope$1,e);function revokeDraft$1(e){const t=e[DRAFT_STATE$1];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function processResult$1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[DRAFT_STATE$1].modified_&&(revokeScope$1(t),die$1(4)),isDraftable$1(e)&&(e=finalize$1(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[DRAFT_STATE$1].base_,e,t)}else e=finalize$1(t,n);return maybeFreeze$1(t,e,!0),revokeScope$1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING$1?e:void 0}function finalize$1(e,t){if(isFrozen$2(t))return t;const n=t[DRAFT_STATE$1];if(!n)return handleValue(t,e.handledSet_,e);if(!isSameScope(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:s}=n;if(s)for(;s.length>0;)s.pop()(e);generatePatchesAndFinalize(n,e)}return n.copy_}function maybeFreeze$1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze$2(t,n)}function markStateFinalized(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var isSameScope=(e,t)=>e.scope_===t,EMPTY_LOCATIONS_RESULT=[];function updateDraftInParent(e,t,n,s){const a=latest$1(e),o=e.type_;if(s!==void 0&&get$5(a,s,o)===t){set$3(a,s,n,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;each$1(a,(f,g)=>{if(isDraft$1(g)){const R=c.get(g)||[];R.push(f),c.set(g,R)}})}const l=e.draftLocations_.get(t)??EMPTY_LOCATIONS_RESULT;for(const c of l)set$3(a,c,n,o)}function registerChildFinalizationCallback(e,t,n){e.callbacks_.push(function(a){var c;const o=t;if(!o||!isSameScope(o,a))return;(c=a.mapSetPlugin_)==null||c.fixSetContents(o);const l=getFinalValue(o);updateDraftInParent(e,o.draft_??o,l,n),generatePatchesAndFinalize(o,a)})}function generatePatchesAndFinalize(e,t){var s;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((s=e.assigned_)==null?void 0:s.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}markStateFinalized(e)}}function handleCrossReference(e,t,n){const{scope_:s}=e;if(isDraft$1(n)){const a=n[DRAFT_STATE$1];isSameScope(a,s)&&a.callbacks_.push(function(){prepareCopy$1(e);const l=getFinalValue(a);updateDraftInParent(e,n,l,t)})}else isDraftable$1(n)&&e.callbacks_.push(function(){const o=latest$1(e);e.type_===3?o.has(n)&&handleValue(n,s.handledSet_,s):get$5(o,t,e.type_)===n&&s.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&handleValue(get$5(e.copy_,t,e.type_),s.handledSet_,s)})}function handleValue(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||isDraft$1(e)||t.has(e)||!isDraftable$1(e)||isFrozen$2(e)||(t.add(e),each$1(e,(s,a)=>{if(isDraft$1(a)){const o=a[DRAFT_STATE$1];if(isSameScope(o,n)){const l=getFinalValue(o);set$3(e,s,l,e.type_),markStateFinalized(o)}}else isDraftable$1(a)&&handleValue(a,t,n)})),e}function createProxyProxy$1(e,t){const n=isArray$2(e),s={type_:n?1:0,scope_:t?t.scope_:getCurrentScope$1(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=s,o=objectTraps$1;n&&(a=[s],o=arrayTraps$1);const{revoke:l,proxy:c}=Proxy.revocable(a,o);return s.draft_=c,s.revoke_=l,[c,s]}var objectTraps$1={get(e,t){if(t===DRAFT_STATE$1)return e;let n=e.scope_.arrayMethodsPlugin_;const s=e.type_===1&&typeof t=="string";if(s&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=latest$1(e);if(!has$2(a,t,e.type_))return readPropFromProto$1(e,a,t);const o=a[t];if(e.finalized_||!isDraftable$1(o)||s&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&isArrayIndex(t))return o;if(o===peek$1(e.base_,t)){prepareCopy$1(e);const l=e.type_===1?+t:t,c=createProxy$1(e.scope_,o,e,l);return e.copy_[l]=c}return o},has(e,t){return t in latest$1(e)},ownKeys(e){return Reflect.ownKeys(latest$1(e))},set(e,t,n){const s=getDescriptorFromProto$1(latest$1(e),t);if(s!=null&&s.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){const a=peek$1(latest$1(e),t),o=a==null?void 0:a[DRAFT_STATE$1];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(is$2(n,a)&&(n!==void 0||has$2(e.base_,t,e.type_)))return!0;prepareCopy$1(e),markChanged$1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),handleCrossReference(e,t,n)),!0},deleteProperty(e,t){return prepareCopy$1(e),peek$1(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),markChanged$1(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=latest$1(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s&&{[WRITABLE]:!0,[CONFIGURABLE]:e.type_!==1||t!=="length",[ENUMERABLE]:s[ENUMERABLE],[VALUE]:n[t]}},defineProperty(){die$1(11)},getPrototypeOf(e){return getPrototypeOf$2(e.base_)},setPrototypeOf(){die$1(12)}},arrayTraps$1={};for(let e in objectTraps$1){let t=objectTraps$1[e];arrayTraps$1[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}arrayTraps$1.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&die$1(13),arrayTraps$1.set.call(this,e,t,void 0)},arrayTraps$1.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&die$1(14),objectTraps$1.set.call(this,e[0],t,n,e[0])};function peek$1(e,t){const n=e[DRAFT_STATE$1];return(n?latest$1(n):e)[t]}function readPropFromProto$1(e,t,n){var a;const s=getDescriptorFromProto$1(t,n);return s?VALUE in s?s[VALUE]:(a=s.get)==null?void 0:a.call(e.draft_):void 0}function getDescriptorFromProto$1(e,t){if(!(t in e))return;let n=getPrototypeOf$2(e);for(;n;){const s=Object.getOwnPropertyDescriptor(n,t);if(s)return s;n=getPrototypeOf$2(n)}}function markChanged$1(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged$1(e.parent_))}function prepareCopy$1(e){e.copy_||(e.assigned_=new Map,e.copy_=shallowCopy$1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Immer2$1=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,s,a)=>{if(isFunction$5(n)&&!isFunction$5(s)){const l=s;s=n;const c=this;return function(g=l,...R){return c.produce(g,A=>s.call(this,A,...R))}}isFunction$5(s)||die$1(6),a!==void 0&&!isFunction$5(a)&&die$1(7);let o;if(isDraftable$1(n)){const l=enterScope$1(this),c=createProxy$1(l,n,void 0);let f=!0;try{o=s(c),f=!1}finally{f?revokeScope$1(l):leaveScope$1(l)}return usePatchesInScope$1(l,a),processResult$1(o,l)}else if(!n||!isObjectish(n)){if(o=s(n),o===void 0&&(o=n),o===NOTHING$1&&(o=void 0),this.autoFreeze_&&freeze$2(o,!0),a){const l=[],c=[];getPlugin$1(PluginPatches).generateReplacementPatches_(n,o,{patches_:l,inversePatches_:c}),a(l,c)}return o}else die$1(1,n)},this.produceWithPatches=(n,s)=>{if(isFunction$5(n))return(c,...f)=>this.produceWithPatches(c,g=>n(g,...f));let a,o;return[this.produce(n,s,(c,f)=>{a=c,o=f}),a,o]},isBoolean$2(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),isBoolean$2(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),isBoolean$2(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){isDraftable$1(t)||die$1(8),isDraft$1(t)&&(t=current$1(t));const n=enterScope$1(this),s=createProxy$1(n,t,void 0);return s[DRAFT_STATE$1].isManual_=!0,leaveScope$1(n),s}finishDraft(t,n){const s=t&&t[DRAFT_STATE$1];(!s||!s.isManual_)&&die$1(9);const{scope_:a}=s;return usePatchesInScope$1(a,n),processResult$1(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let s;for(s=n.length-1;s>=0;s--){const o=n[s];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}s>-1&&(n=n.slice(s+1));const a=getPlugin$1(PluginPatches).applyPatches_;return isDraft$1(t)?a(t,n):this.produce(t,o=>a(o,n))}};function createProxy$1(e,t,n,s){const[a,o]=isMap$1(t)?getPlugin$1(PluginMapSet).proxyMap_(t,n):isSet$1(t)?getPlugin$1(PluginMapSet).proxySet_(t,n):createProxyProxy$1(t,n);return((n==null?void 0:n.scope_)??getCurrentScope$1()).drafts_.push(a),o.callbacks_=(n==null?void 0:n.callbacks_)??[],o.key_=s,n&&s!==void 0?registerChildFinalizationCallback(n,o,s):o.callbacks_.push(function(f){var R;(R=f.mapSetPlugin_)==null||R.fixSetContents(o);const{patchPlugin_:g}=f;o.modified_&&g&&g.generatePatches_(o,[],f)}),a}function current$1(e){return isDraft$1(e)||die$1(10,e),currentImpl$1(e)}function currentImpl$1(e){if(!isDraftable$1(e)||isFrozen$2(e))return e;const t=e[DRAFT_STATE$1];let n,s=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=shallowCopy$1(e,t.scope_.immer_.useStrictShallowCopy_),s=t.scope_.immer_.shouldUseStrictIteration()}else n=shallowCopy$1(e,!0);return each$1(n,(a,o)=>{set$3(n,a,currentImpl$1(o))},s),t&&(t.finalized_=!1),n}function enablePatches(){process.env.NODE_ENV!=="production"&&errors$1.push('Sets cannot have "replace" patches.',function(Ye){return"Unsupported patch operation: "+Ye},function(Ye){return"Cannot apply patch, path doesn't resolve: "+Ye},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");function t(Ye,nt=[]){if(Ye.key_!==void 0){const et=Ye.parent_.copy_??Ye.parent_.base_,rt=getProxyDraft(get$5(et,Ye.key_)),st=get$5(et,Ye.key_);if(st===void 0||st!==Ye.draft_&&st!==Ye.base_&&st!==Ye.copy_||rt!=null&&rt.base_!==Ye.base_)return null;const ot=Ye.parent_.type_===3;let ct;if(ot){const lt=Ye.parent_;ct=Array.from(lt.drafts_.keys()).indexOf(Ye.key_)}else ct=Ye.key_;if(!(ot&&et.size>ct||has$2(et,ct)))return null;nt.push(ct)}if(Ye.parent_)return t(Ye.parent_,nt);nt.reverse();try{n(Ye.copy_,nt)}catch{return null}return nt}function n(Ye,nt){let et=Ye;for(let rt=0;rt<nt.length-1;rt++){const st=nt[rt];if(et=get$5(et,st),!isObjectish(et)||et===null)throw new Error(`Cannot resolve path at '${nt.join("/")}'`)}return et}const s="replace",a="add",o="remove";function l(Ye,nt,et){if(Ye.scope_.processedForPatches_.has(Ye))return;Ye.scope_.processedForPatches_.add(Ye);const{patches_:rt,inversePatches_:st}=et;switch(Ye.type_){case 0:case 2:return f(Ye,nt,rt,st);case 1:return c(Ye,nt,rt,st);case 3:return g(Ye,nt,rt,st)}}function c(Ye,nt,et,rt){let{base_:st,assigned_:ot}=Ye,ct=Ye.copy_;ct.length<st.length&&([st,ct]=[ct,st],[et,rt]=[rt,et]);const lt=Ye.allIndicesReassigned_===!0;for(let at=0;at<st.length;at++){const ut=ct[at],pt=st[at];if((lt||(ot==null?void 0:ot.get(at.toString())))&&ut!==pt){const Ct=ut==null?void 0:ut[DRAFT_STATE$1];if(Ct&&Ct.modified_)continue;const Rt=nt.concat([at]);et.push({op:s,path:Rt,value:Ve(ut)}),rt.push({op:s,path:Rt,value:Ve(pt)})}}for(let at=st.length;at<ct.length;at++){const ut=nt.concat([at]);et.push({op:a,path:ut,value:Ve(ct[at])})}for(let at=ct.length-1;st.length<=at;--at){const ut=nt.concat([at]);rt.push({op:o,path:ut})}}function f(Ye,nt,et,rt){const{base_:st,copy_:ot,type_:ct}=Ye;each$1(Ye.assigned_,(lt,at)=>{const ut=get$5(st,lt,ct),pt=get$5(ot,lt,ct),mt=at?has$2(st,lt)?s:a:o;if(ut===pt&&mt===s)return;const Ct=nt.concat(lt);et.push(mt===o?{op:mt,path:Ct}:{op:mt,path:Ct,value:Ve(pt)}),rt.push(mt===a?{op:o,path:Ct}:mt===o?{op:a,path:Ct,value:Ve(ut)}:{op:s,path:Ct,value:Ve(ut)})})}function g(Ye,nt,et,rt){let{base_:st,copy_:ot}=Ye,ct=0;st.forEach(lt=>{if(!ot.has(lt)){const at=nt.concat([ct]);et.push({op:o,path:at,value:lt}),rt.unshift({op:a,path:at,value:lt})}ct++}),ct=0,ot.forEach(lt=>{if(!st.has(lt)){const at=nt.concat([ct]);et.push({op:a,path:at,value:lt}),rt.unshift({op:o,path:at,value:lt})}ct++})}function R(Ye,nt,et){const{patches_:rt,inversePatches_:st}=et;rt.push({op:s,path:[],value:nt===NOTHING$1?void 0:nt}),st.push({op:s,path:[],value:Ye})}function A(Ye,nt){return nt.forEach(et=>{const{path:rt,op:st}=et;let ot=Ye;for(let ut=0;ut<rt.length-1;ut++){const pt=getArchtype$1(ot);let mt=rt[ut];typeof mt!="string"&&typeof mt!="number"&&(mt=""+mt),(pt===0||pt===1)&&(mt==="__proto__"||mt===CONSTRUCTOR)&&die$1(19),isFunction$5(ot)&&mt===PROTOTYPE&&die$1(19),ot=get$5(ot,mt),isObjectish(ot)||die$1(18,rt.join("/"))}const ct=getArchtype$1(ot),lt=V(et.value),at=rt[rt.length-1];switch(st){case s:switch(ct){case 2:return ot.set(at,lt);case 3:die$1(16);default:return ot[at]=lt}case a:switch(ct){case 1:return at==="-"?ot.push(lt):ot.splice(at,0,lt);case 2:return ot.set(at,lt);case 3:return ot.add(lt);default:return ot[at]=lt}case o:switch(ct){case 1:return ot.splice(at,1);case 2:return ot.delete(at);case 3:return ot.delete(et.value);default:return delete ot[at]}default:die$1(17,st)}}),Ye}function V(Ye){if(!isDraftable$1(Ye))return Ye;if(isArray$2(Ye))return Ye.map(V);if(isMap$1(Ye))return new Map(Array.from(Ye.entries()).map(([et,rt])=>[et,V(rt)]));if(isSet$1(Ye))return new Set(Array.from(Ye).map(V));const nt=Object.create(getPrototypeOf$2(Ye));for(const et in Ye)nt[et]=V(Ye[et]);return has$2(Ye,DRAFTABLE$1)&&(nt[DRAFTABLE$1]=Ye[DRAFTABLE$1]),nt}function Ve(Ye){return isDraft$1(Ye)?V(Ye):Ye}loadPlugin(PluginPatches,{applyPatches_:A,generatePatches_:l,generateReplacementPatches_:R,getPath:t})}var immer$1=new Immer2$1,produce=immer$1.produce,produceWithPatches=immer$1.produceWithPatches.bind(immer$1),applyPatches=immer$1.applyPatches.bind(immer$1),runIdentityFunctionCheck=(e,t,n)=>{if(t.length===1&&t[0]===n){let s=!1;try{const a={};e(a)===a&&(s=!0)}catch{}if(s){let a;try{throw new Error}catch(o){({stack:a}=o)}console.warn(`The result function returned its own inputs without modification. e.g
519
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return React__namespace.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},DESCRIPTION_WARNING_NAME="DialogDescriptionWarning",DescriptionWarning$1=({contentRef:e,descriptionId:t})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${useWarningContext(DESCRIPTION_WARNING_NAME).contentName}}.`;return React__namespace.useEffect(()=>{var o;const a=(o=e.current)==null?void 0:o.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(s))},[s,e,t]),null},Root$a=Dialog$1,Trigger$6=DialogTrigger$1,Portal$4=DialogPortal$1,Overlay=DialogOverlay$1,Content$3=DialogContent$1,Title$1=DialogTitle$1,Description$1=DialogDescription$1,Close$1=DialogClose$1;const Dialog=({modal:e=!1,...t})=>jsxRuntime.jsx(Root$a,{modal:e,...t});Dialog.displayName=Root$a.displayName;const DialogTrigger=Trigger$6,DialogPortal=Portal$4,DialogClose=Close$1,DialogOverlay=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Overlay,{ref:n,className:cn("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:opacity-0 data-[state=closed]:pointer-events-none",e),...t}));DialogOverlay.displayName=Overlay.displayName;const DialogContent=React__namespace.forwardRef(({className:e,children:t,animateExit:n=!0,overlayClassName:s,showOverlay:a,onPointerDownOutside:o,onInteractOutside:l,...c},f)=>{const g=!!(s&&a);return jsxRuntime.jsxs(DialogPortal,{forceMount:c.forceMount,children:[g?jsxRuntime.jsx(Close$1,{asChild:!0,children:jsxRuntime.jsx("div",{"aria-hidden":"true",className:cn("fixed inset-0 z-[10000] pointer-events-auto",s)})}):null,jsxRuntime.jsx(DialogOverlay,{className:s,forceMount:c.forceMount}),jsxRuntime.jsxs(Content$3,{ref:f,className:cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-2xl shadow-primary duration-200 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n&&"data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]",e),onPointerDownOutside:R=>{g&&R.preventDefault(),o==null||o(R)},onInteractOutside:R=>{g&&R.preventDefault(),l==null||l(R)},...c,children:[t,jsxRuntime.jsxs(Close$1,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-hidden focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[jsxRuntime.jsx(X$2,{className:"h-4 w-4"}),jsxRuntime.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});DialogContent.displayName=Content$3.displayName;const DialogHeader=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});DialogHeader.displayName="DialogHeader";const DialogFooter=({className:e,...t})=>jsxRuntime.jsx("div",{className:cn("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});DialogFooter.displayName="DialogFooter";const DialogTitle=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Title$1,{ref:n,className:cn("text-lg font-semibold leading-none tracking-tight",e),...t}));DialogTitle.displayName=Title$1.displayName;const DialogDescription=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Description$1,{ref:n,className:cn("text-sm text-muted-foreground",e),...t}));DialogDescription.displayName=Description$1.displayName;const sides=["top","right","bottom","left"],min$3=Math.min,max$3=Math.max,round$2=Math.round,floor=Math.floor,createCoords=e=>({x:e,y:e}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(e,t,n){return max$3(e,min$3(t,n))}function evaluate(e,t){return typeof e=="function"?e(t):e}function getSide$1(e){return e.split("-")[0]}function getAlignment(e){return e.split("-")[1]}function getOppositeAxis(e){return e==="x"?"y":"x"}function getAxisLength(e){return e==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(e){return yAxisSides.has(getSide$1(e))?"y":"x"}function getAlignmentAxis(e){return getOppositeAxis(getSideAxis(e))}function getAlignmentSides(e,t,n){n===void 0&&(n=!1);const s=getAlignment(e),a=getAlignmentAxis(e),o=getAxisLength(a);let l=a==="x"?s===(n?"end":"start")?"right":"left":s==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(l=getOppositePlacement(l)),[l,getOppositePlacement(l)]}function getExpandedPlacements(e){const t=getOppositePlacement(e);return[getOppositeAlignmentPlacement(e),t,getOppositeAlignmentPlacement(t)]}function getOppositeAlignmentPlacement(e){return e.replace(/start|end/g,t=>oppositeAlignmentMap[t])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(e,t,n){switch(e){case"top":case"bottom":return n?t?rlPlacement:lrPlacement:t?lrPlacement:rlPlacement;case"left":case"right":return t?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(e,t,n,s){const a=getAlignment(e);let o=getSideList(getSide$1(e),n==="start",s);return a&&(o=o.map(l=>l+"-"+a),t&&(o=o.concat(o.map(getOppositeAlignmentPlacement)))),o}function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,t=>oppositeSideMap[t])}function expandPaddingObject(e){return{top:0,right:0,bottom:0,left:0,...e}}function getPaddingObject(e){return typeof e!="number"?expandPaddingObject(e):{top:e,right:e,bottom:e,left:e}}function rectToClientRect(e){const{x:t,y:n,width:s,height:a}=e;return{width:s,height:a,top:n,left:t,right:t+s,bottom:n+a,x:t,y:n}}function computeCoordsFromPlacement(e,t,n){let{reference:s,floating:a}=e;const o=getSideAxis(t),l=getAlignmentAxis(t),c=getAxisLength(l),f=getSide$1(t),g=o==="y",R=s.x+s.width/2-a.width/2,A=s.y+s.height/2-a.height/2,V=s[c]/2-a[c]/2;let Ve;switch(f){case"top":Ve={x:R,y:s.y-a.height};break;case"bottom":Ve={x:R,y:s.y+s.height};break;case"right":Ve={x:s.x+s.width,y:A};break;case"left":Ve={x:s.x-a.width,y:A};break;default:Ve={x:s.x,y:s.y}}switch(getAlignment(t)){case"start":Ve[l]-=V*(n&&g?-1:1);break;case"end":Ve[l]+=V*(n&&g?-1:1);break}return Ve}const computePosition$1=async(e,t,n)=>{const{placement:s="bottom",strategy:a="absolute",middleware:o=[],platform:l}=n,c=o.filter(Boolean),f=await(l.isRTL==null?void 0:l.isRTL(t));let g=await l.getElementRects({reference:e,floating:t,strategy:a}),{x:R,y:A}=computeCoordsFromPlacement(g,s,f),V=s,Ve={},Ye=0;for(let nt=0;nt<c.length;nt++){const{name:et,fn:rt}=c[nt],{x:st,y:ot,data:ct,reset:lt}=await rt({x:R,y:A,initialPlacement:s,placement:V,strategy:a,middlewareData:Ve,rects:g,platform:l,elements:{reference:e,floating:t}});R=st??R,A=ot??A,Ve={...Ve,[et]:{...Ve[et],...ct}},lt&&Ye<=50&&(Ye++,typeof lt=="object"&&(lt.placement&&(V=lt.placement),lt.rects&&(g=lt.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:a}):lt.rects),{x:R,y:A}=computeCoordsFromPlacement(g,V,f)),nt=-1)}return{x:R,y:A,placement:V,strategy:a,middlewareData:Ve}};async function detectOverflow(e,t){var n;t===void 0&&(t={});const{x:s,y:a,platform:o,rects:l,elements:c,strategy:f}=e,{boundary:g="clippingAncestors",rootBoundary:R="viewport",elementContext:A="floating",altBoundary:V=!1,padding:Ve=0}=evaluate(t,e),Ye=getPaddingObject(Ve),et=c[V?A==="floating"?"reference":"floating":A],rt=rectToClientRect(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(et)))==null||n?et:et.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(c.floating)),boundary:g,rootBoundary:R,strategy:f})),st=A==="floating"?{x:s,y:a,width:l.floating.width,height:l.floating.height}:l.reference,ot=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c.floating)),ct=await(o.isElement==null?void 0:o.isElement(ot))?await(o.getScale==null?void 0:o.getScale(ot))||{x:1,y:1}:{x:1,y:1},lt=rectToClientRect(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:st,offsetParent:ot,strategy:f}):st);return{top:(rt.top-lt.top+Ye.top)/ct.y,bottom:(lt.bottom-rt.bottom+Ye.bottom)/ct.y,left:(rt.left-lt.left+Ye.left)/ct.x,right:(lt.right-rt.right+Ye.right)/ct.x}}const arrow$4=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:s,placement:a,rects:o,platform:l,elements:c,middlewareData:f}=t,{element:g,padding:R=0}=evaluate(e,t)||{};if(g==null)return{};const A=getPaddingObject(R),V={x:n,y:s},Ve=getAlignmentAxis(a),Ye=getAxisLength(Ve),nt=await l.getDimensions(g),et=Ve==="y",rt=et?"top":"left",st=et?"bottom":"right",ot=et?"clientHeight":"clientWidth",ct=o.reference[Ye]+o.reference[Ve]-V[Ve]-o.floating[Ye],lt=V[Ve]-o.reference[Ve],at=await(l.getOffsetParent==null?void 0:l.getOffsetParent(g));let ut=at?at[ot]:0;(!ut||!await(l.isElement==null?void 0:l.isElement(at)))&&(ut=c.floating[ot]||o.floating[Ye]);const pt=ct/2-lt/2,mt=ut/2-nt[Ye]/2-1,Ct=min$3(A[rt],mt),Rt=min$3(A[st],mt),ft=Ct,It=ut-nt[Ye]-Rt,yt=ut/2-nt[Ye]/2+pt,Mt=clamp$1(ft,yt,It),Ft=!f.arrow&&getAlignment(a)!=null&&yt!==Mt&&o.reference[Ye]/2-(yt<ft?Ct:Rt)-nt[Ye]/2<0,Ht=Ft?yt<ft?yt-ft:yt-It:0;return{[Ve]:V[Ve]+Ht,data:{[Ve]:Mt,centerOffset:yt-Mt-Ht,...Ft&&{alignmentOffset:Ht}},reset:Ft}}}),flip$2=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,s;const{placement:a,middlewareData:o,rects:l,initialPlacement:c,platform:f,elements:g}=t,{mainAxis:R=!0,crossAxis:A=!0,fallbackPlacements:V,fallbackStrategy:Ve="bestFit",fallbackAxisSideDirection:Ye="none",flipAlignment:nt=!0,...et}=evaluate(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const rt=getSide$1(a),st=getSideAxis(c),ot=getSide$1(c)===c,ct=await(f.isRTL==null?void 0:f.isRTL(g.floating)),lt=V||(ot||!nt?[getOppositePlacement(c)]:getExpandedPlacements(c)),at=Ye!=="none";!V&&at&&lt.push(...getOppositeAxisPlacements(c,nt,Ye,ct));const ut=[c,...lt],pt=await detectOverflow(t,et),mt=[];let Ct=((s=o.flip)==null?void 0:s.overflows)||[];if(R&&mt.push(pt[rt]),A){const yt=getAlignmentSides(a,l,ct);mt.push(pt[yt[0]],pt[yt[1]])}if(Ct=[...Ct,{placement:a,overflows:mt}],!mt.every(yt=>yt<=0)){var Rt,ft;const yt=(((Rt=o.flip)==null?void 0:Rt.index)||0)+1,Mt=ut[yt];if(Mt&&(!(A==="alignment"?st!==getSideAxis(Mt):!1)||Ct.every(Dt=>getSideAxis(Dt.placement)===st?Dt.overflows[0]>0:!0)))return{data:{index:yt,overflows:Ct},reset:{placement:Mt}};let Ft=(ft=Ct.filter(Ht=>Ht.overflows[0]<=0).sort((Ht,Dt)=>Ht.overflows[1]-Dt.overflows[1])[0])==null?void 0:ft.placement;if(!Ft)switch(Ve){case"bestFit":{var It;const Ht=(It=Ct.filter(Dt=>{if(at){const $t=getSideAxis(Dt.placement);return $t===st||$t==="y"}return!0}).map(Dt=>[Dt.placement,Dt.overflows.filter($t=>$t>0).reduce(($t,zt)=>$t+zt,0)]).sort((Dt,$t)=>Dt[1]-$t[1])[0])==null?void 0:It[0];Ht&&(Ft=Ht);break}case"initialPlacement":Ft=c;break}if(a!==Ft)return{reset:{placement:Ft}}}return{}}}};function getSideOffsets(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function isAnySideFullyClipped(e){return sides.some(t=>e[t]>=0)}const hide$2=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:s="referenceHidden",...a}=evaluate(e,t);switch(s){case"referenceHidden":{const o=await detectOverflow(t,{...a,elementContext:"reference"}),l=getSideOffsets(o,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:isAnySideFullyClipped(l)}}}case"escaped":{const o=await detectOverflow(t,{...a,altBoundary:!0}),l=getSideOffsets(o,n.floating);return{data:{escapedOffsets:l,escaped:isAnySideFullyClipped(l)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(e,t){const{placement:n,platform:s,elements:a}=e,o=await(s.isRTL==null?void 0:s.isRTL(a.floating)),l=getSide$1(n),c=getAlignment(n),f=getSideAxis(n)==="y",g=originSides.has(l)?-1:1,R=o&&f?-1:1,A=evaluate(t,e);let{mainAxis:V,crossAxis:Ve,alignmentAxis:Ye}=typeof A=="number"?{mainAxis:A,crossAxis:0,alignmentAxis:null}:{mainAxis:A.mainAxis||0,crossAxis:A.crossAxis||0,alignmentAxis:A.alignmentAxis};return c&&typeof Ye=="number"&&(Ve=c==="end"?Ye*-1:Ye),f?{x:Ve*R,y:V*g}:{x:V*g,y:Ve*R}}const offset$2=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,s;const{x:a,y:o,placement:l,middlewareData:c}=t,f=await convertValueToCoords(t,e);return l===((n=c.offset)==null?void 0:n.placement)&&(s=c.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:o+f.y,data:{...f,placement:l}}}}},shift$3=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:s,placement:a}=t,{mainAxis:o=!0,crossAxis:l=!1,limiter:c={fn:et=>{let{x:rt,y:st}=et;return{x:rt,y:st}}},...f}=evaluate(e,t),g={x:n,y:s},R=await detectOverflow(t,f),A=getSideAxis(getSide$1(a)),V=getOppositeAxis(A);let Ve=g[V],Ye=g[A];if(o){const et=V==="y"?"top":"left",rt=V==="y"?"bottom":"right",st=Ve+R[et],ot=Ve-R[rt];Ve=clamp$1(st,Ve,ot)}if(l){const et=A==="y"?"top":"left",rt=A==="y"?"bottom":"right",st=Ye+R[et],ot=Ye-R[rt];Ye=clamp$1(st,Ye,ot)}const nt=c.fn({...t,[V]:Ve,[A]:Ye});return{...nt,data:{x:nt.x-n,y:nt.y-s,enabled:{[V]:o,[A]:l}}}}}},limitShift$2=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:s,placement:a,rects:o,middlewareData:l}=t,{offset:c=0,mainAxis:f=!0,crossAxis:g=!0}=evaluate(e,t),R={x:n,y:s},A=getSideAxis(a),V=getOppositeAxis(A);let Ve=R[V],Ye=R[A];const nt=evaluate(c,t),et=typeof nt=="number"?{mainAxis:nt,crossAxis:0}:{mainAxis:0,crossAxis:0,...nt};if(f){const ot=V==="y"?"height":"width",ct=o.reference[V]-o.floating[ot]+et.mainAxis,lt=o.reference[V]+o.reference[ot]-et.mainAxis;Ve<ct?Ve=ct:Ve>lt&&(Ve=lt)}if(g){var rt,st;const ot=V==="y"?"width":"height",ct=originSides.has(getSide$1(a)),lt=o.reference[A]-o.floating[ot]+(ct&&((rt=l.offset)==null?void 0:rt[A])||0)+(ct?0:et.crossAxis),at=o.reference[A]+o.reference[ot]+(ct?0:((st=l.offset)==null?void 0:st[A])||0)-(ct?et.crossAxis:0);Ye<lt?Ye=lt:Ye>at&&(Ye=at)}return{[V]:Ve,[A]:Ye}}}},size$2=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,s;const{placement:a,rects:o,platform:l,elements:c}=t,{apply:f=()=>{},...g}=evaluate(e,t),R=await detectOverflow(t,g),A=getSide$1(a),V=getAlignment(a),Ve=getSideAxis(a)==="y",{width:Ye,height:nt}=o.floating;let et,rt;A==="top"||A==="bottom"?(et=A,rt=V===(await(l.isRTL==null?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(rt=A,et=V==="end"?"top":"bottom");const st=nt-R.top-R.bottom,ot=Ye-R.left-R.right,ct=min$3(nt-R[et],st),lt=min$3(Ye-R[rt],ot),at=!t.middlewareData.shift;let ut=ct,pt=lt;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(pt=ot),(s=t.middlewareData.shift)!=null&&s.enabled.y&&(ut=st),at&&!V){const Ct=max$3(R.left,0),Rt=max$3(R.right,0),ft=max$3(R.top,0),It=max$3(R.bottom,0);Ve?pt=Ye-2*(Ct!==0||Rt!==0?Ct+Rt:max$3(R.left,R.right)):ut=nt-2*(ft!==0||It!==0?ft+It:max$3(R.top,R.bottom))}await f({...t,availableWidth:pt,availableHeight:ut});const mt=await l.getDimensions(c.floating);return Ye!==mt.width||nt!==mt.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement$2(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(e){const{overflow:t,overflowX:n,overflowY:s,display:a}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+n)&&!invalidOverflowDisplayValues.has(a)}const tableElements=new Set(["table","td","th"]);function isTableElement(e){return tableElements.has(getNodeName(e))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(e){return topLayerSelectors.some(t=>{try{return e.matches(t)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","perspective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(e){const t=isWebKit(),n=isElement(e)?getComputedStyle$1(e):e;return transformProperties.some(s=>n[s]?n[s]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||willChangeValues.some(s=>(n.willChange||"").includes(s))||containValues.some(s=>(n.contain||"").includes(s))}function getContainingBlock(e){let t=getParentNode(e);for(;isHTMLElement$2(t)&&!isLastTraversableNode(t);){if(isContainingBlock(t))return t;if(isTopLayer(t))return null;t=getParentNode(t)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(e){return lastTraversableNodeNames.has(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getNodeScroll(e){return isElement(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement$2(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,n){var s;t===void 0&&(t=[]),n===void 0&&(n=!0);const a=getNearestOverflowAncestor(e),o=a===((s=e.ownerDocument)==null?void 0:s.body),l=getWindow(a);if(o){const c=getFrameElement(l);return t.concat(l,l.visualViewport||[],isOverflowElement(a)?a:[],c&&n?getOverflowAncestors(c):[])}return t.concat(a,getOverflowAncestors(a,[],n))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let n=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const a=isHTMLElement$2(e),o=a?e.offsetWidth:n,l=a?e.offsetHeight:s,c=round$2(n)!==o||round$2(s)!==l;return c&&(n=o,s=l),{width:n,height:s,$:c}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement$2(t))return createCoords(1);const n=t.getBoundingClientRect(),{width:s,height:a,$:o}=getCssDimensions(t);let l=(o?round$2(n.width):n.width)/s,c=(o?round$2(n.height):n.height)/a;return(!l||!Number.isFinite(l))&&(l=1),(!c||!Number.isFinite(c))&&(c=1),{x:l,y:c}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==getWindow(e)?!1:t}function getBoundingClientRect(e,t,n,s){t===void 0&&(t=!1),n===void 0&&(n=!1);const a=e.getBoundingClientRect(),o=unwrapElement(e);let l=createCoords(1);t&&(s?isElement(s)&&(l=getScale(s)):l=getScale(e));const c=shouldAddVisualOffsets(o,n,s)?getVisualOffsets(o):createCoords(0);let f=(a.left+c.x)/l.x,g=(a.top+c.y)/l.y,R=a.width/l.x,A=a.height/l.y;if(o){const V=getWindow(o),Ve=s&&isElement(s)?getWindow(s):s;let Ye=V,nt=getFrameElement(Ye);for(;nt&&s&&Ve!==Ye;){const et=getScale(nt),rt=nt.getBoundingClientRect(),st=getComputedStyle$1(nt),ot=rt.left+(nt.clientLeft+parseFloat(st.paddingLeft))*et.x,ct=rt.top+(nt.clientTop+parseFloat(st.paddingTop))*et.y;f*=et.x,g*=et.y,R*=et.x,A*=et.y,f+=ot,g+=ct,Ye=getWindow(nt),nt=getFrameElement(Ye)}}return rectToClientRect({width:R,height:A,x:f,y:g})}function getWindowScrollBarX(e,t){const n=getNodeScroll(e).scrollLeft;return t?t.left+n:getBoundingClientRect(getDocumentElement(e)).left+n}function getHTMLOffset(e,t){const n=e.getBoundingClientRect(),s=n.left+t.scrollLeft-getWindowScrollBarX(e,n),a=n.top+t.scrollTop;return{x:s,y:a}}function convertOffsetParentRelativeRectToViewportRelativeRect(e){let{elements:t,rect:n,offsetParent:s,strategy:a}=e;const o=a==="fixed",l=getDocumentElement(s),c=t?isTopLayer(t.floating):!1;if(s===l||c&&o)return n;let f={scrollLeft:0,scrollTop:0},g=createCoords(1);const R=createCoords(0),A=isHTMLElement$2(s);if((A||!A&&!o)&&((getNodeName(s)!=="body"||isOverflowElement(l))&&(f=getNodeScroll(s)),isHTMLElement$2(s))){const Ve=getBoundingClientRect(s);g=getScale(s),R.x=Ve.x+s.clientLeft,R.y=Ve.y+s.clientTop}const V=l&&!A&&!o?getHTMLOffset(l,f):createCoords(0);return{width:n.width*g.x,height:n.height*g.y,x:n.x*g.x-f.scrollLeft*g.x+R.x+V.x,y:n.y*g.y-f.scrollTop*g.y+R.y+V.y}}function getClientRects(e){return Array.from(e.getClientRects())}function getDocumentRect(e){const t=getDocumentElement(e),n=getNodeScroll(e),s=e.ownerDocument.body,a=max$3(t.scrollWidth,t.clientWidth,s.scrollWidth,s.clientWidth),o=max$3(t.scrollHeight,t.clientHeight,s.scrollHeight,s.clientHeight);let l=-n.scrollLeft+getWindowScrollBarX(e);const c=-n.scrollTop;return getComputedStyle$1(s).direction==="rtl"&&(l+=max$3(t.clientWidth,s.clientWidth)-a),{width:a,height:o,x:l,y:c}}const SCROLLBAR_MAX=25;function getViewportRect(e,t){const n=getWindow(e),s=getDocumentElement(e),a=n.visualViewport;let o=s.clientWidth,l=s.clientHeight,c=0,f=0;if(a){o=a.width,l=a.height;const R=isWebKit();(!R||R&&t==="fixed")&&(c=a.offsetLeft,f=a.offsetTop)}const g=getWindowScrollBarX(s);if(g<=0){const R=s.ownerDocument,A=R.body,V=getComputedStyle(A),Ve=R.compatMode==="CSS1Compat"&&parseFloat(V.marginLeft)+parseFloat(V.marginRight)||0,Ye=Math.abs(s.clientWidth-A.clientWidth-Ve);Ye<=SCROLLBAR_MAX&&(o-=Ye)}else g<=SCROLLBAR_MAX&&(o+=g);return{width:o,height:l,x:c,y:f}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(e,t){const n=getBoundingClientRect(e,!0,t==="fixed"),s=n.top+e.clientTop,a=n.left+e.clientLeft,o=isHTMLElement$2(e)?getScale(e):createCoords(1),l=e.clientWidth*o.x,c=e.clientHeight*o.y,f=a*o.x,g=s*o.y;return{width:l,height:c,x:f,y:g}}function getClientRectFromClippingAncestor(e,t,n){let s;if(t==="viewport")s=getViewportRect(e,n);else if(t==="document")s=getDocumentRect(getDocumentElement(e));else if(isElement(t))s=getInnerBoundingClientRect(t,n);else{const a=getVisualOffsets(e);s={x:t.x-a.x,y:t.y-a.y,width:t.width,height:t.height}}return rectToClientRect(s)}function hasFixedPositionAncestor(e,t){const n=getParentNode(e);return n===t||!isElement(n)||isLastTraversableNode(n)?!1:getComputedStyle$1(n).position==="fixed"||hasFixedPositionAncestor(n,t)}function getClippingElementAncestors(e,t){const n=t.get(e);if(n)return n;let s=getOverflowAncestors(e,[],!1).filter(c=>isElement(c)&&getNodeName(c)!=="body"),a=null;const o=getComputedStyle$1(e).position==="fixed";let l=o?getParentNode(e):e;for(;isElement(l)&&!isLastTraversableNode(l);){const c=getComputedStyle$1(l),f=isContainingBlock(l);!f&&c.position==="fixed"&&(a=null),(o?!f&&!a:!f&&c.position==="static"&&!!a&&absoluteOrFixed.has(a.position)||isOverflowElement(l)&&!f&&hasFixedPositionAncestor(e,l))?s=s.filter(R=>R!==l):a=c,l=getParentNode(l)}return t.set(e,s),s}function getClippingRect(e){let{element:t,boundary:n,rootBoundary:s,strategy:a}=e;const l=[...n==="clippingAncestors"?isTopLayer(t)?[]:getClippingElementAncestors(t,this._c):[].concat(n),s],c=l[0],f=l.reduce((g,R)=>{const A=getClientRectFromClippingAncestor(t,R,a);return g.top=max$3(A.top,g.top),g.right=min$3(A.right,g.right),g.bottom=min$3(A.bottom,g.bottom),g.left=max$3(A.left,g.left),g},getClientRectFromClippingAncestor(t,c,a));return{width:f.right-f.left,height:f.bottom-f.top,x:f.left,y:f.top}}function getDimensions(e){const{width:t,height:n}=getCssDimensions(e);return{width:t,height:n}}function getRectRelativeToOffsetParent(e,t,n){const s=isHTMLElement$2(t),a=getDocumentElement(t),o=n==="fixed",l=getBoundingClientRect(e,!0,o,t);let c={scrollLeft:0,scrollTop:0};const f=createCoords(0);function g(){f.x=getWindowScrollBarX(a)}if(s||!s&&!o)if((getNodeName(t)!=="body"||isOverflowElement(a))&&(c=getNodeScroll(t)),s){const Ve=getBoundingClientRect(t,!0,o,t);f.x=Ve.x+t.clientLeft,f.y=Ve.y+t.clientTop}else a&&g();o&&!s&&a&&g();const R=a&&!s&&!o?getHTMLOffset(a,c):createCoords(0),A=l.left+c.scrollLeft-f.x-R.x,V=l.top+c.scrollTop-f.y-R.y;return{x:A,y:V,width:l.width,height:l.height}}function isStaticPositioned(e){return getComputedStyle$1(e).position==="static"}function getTrueOffsetParent(e,t){if(!isHTMLElement$2(e)||getComputedStyle$1(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return getDocumentElement(e)===n&&(n=n.ownerDocument.body),n}function getOffsetParent(e,t){const n=getWindow(e);if(isTopLayer(e))return n;if(!isHTMLElement$2(e)){let a=getParentNode(e);for(;a&&!isLastTraversableNode(a);){if(isElement(a)&&!isStaticPositioned(a))return a;a=getParentNode(a)}return n}let s=getTrueOffsetParent(e,t);for(;s&&isTableElement(s)&&isStaticPositioned(s);)s=getTrueOffsetParent(s,t);return s&&isLastTraversableNode(s)&&isStaticPositioned(s)&&!isContainingBlock(s)?n:s||getContainingBlock(e)||n}const getElementRects=async function(e){const t=this.getOffsetParent||getOffsetParent,n=this.getDimensions,s=await n(e.floating);return{reference:getRectRelativeToOffsetParent(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function isRTL(e){return getComputedStyle$1(e).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let n=null,s;const a=getDocumentElement(e);function o(){var c;clearTimeout(s),(c=n)==null||c.disconnect(),n=null}function l(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),o();const g=e.getBoundingClientRect(),{left:R,top:A,width:V,height:Ve}=g;if(c||t(),!V||!Ve)return;const Ye=floor(A),nt=floor(a.clientWidth-(R+V)),et=floor(a.clientHeight-(A+Ve)),rt=floor(R),ot={rootMargin:-Ye+"px "+-nt+"px "+-et+"px "+-rt+"px",threshold:max$3(0,min$3(1,f))||1};let ct=!0;function lt(at){const ut=at[0].intersectionRatio;if(ut!==f){if(!ct)return l();ut?l(!1,ut):s=setTimeout(()=>{l(!1,1e-7)},1e3)}ut===1&&!rectsAreEqual(g,e.getBoundingClientRect())&&l(),ct=!1}try{n=new IntersectionObserver(lt,{...ot,root:a.ownerDocument})}catch{n=new IntersectionObserver(lt,ot)}n.observe(e)}return l(!0),o}function autoUpdate(e,t,n,s){s===void 0&&(s={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=s,g=unwrapElement(e),R=a||o?[...g?getOverflowAncestors(g):[],...getOverflowAncestors(t)]:[];R.forEach(rt=>{a&&rt.addEventListener("scroll",n,{passive:!0}),o&&rt.addEventListener("resize",n)});const A=g&&c?observeMove(g,n):null;let V=-1,Ve=null;l&&(Ve=new ResizeObserver(rt=>{let[st]=rt;st&&st.target===g&&Ve&&(Ve.unobserve(t),cancelAnimationFrame(V),V=requestAnimationFrame(()=>{var ot;(ot=Ve)==null||ot.observe(t)})),n()}),g&&!f&&Ve.observe(g),Ve.observe(t));let Ye,nt=f?getBoundingClientRect(e):null;f&&et();function et(){const rt=getBoundingClientRect(e);nt&&!rectsAreEqual(nt,rt)&&n(),nt=rt,Ye=requestAnimationFrame(et)}return n(),()=>{var rt;R.forEach(st=>{a&&st.removeEventListener("scroll",n),o&&st.removeEventListener("resize",n)}),A==null||A(),(rt=Ve)==null||rt.disconnect(),Ve=null,f&&cancelAnimationFrame(Ye)}}const offset$1=offset$2,shift$2=shift$3,flip$1=flip$2,size$1=size$2,hide$1=hide$2,arrow$3=arrow$4,limitShift$1=limitShift$2,computePosition=(e,t,n)=>{const s=new Map,a={platform,...n},o={...a.platform,_c:s};return computePosition$1(e,t,{...a,platform:o})};var isClient=typeof document<"u",noop$6=function(){},index=isClient?React.useLayoutEffect:noop$6;function deepEqual$2(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,s,a;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(s=n;s--!==0;)if(!deepEqual$2(e[s],t[s]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(s=n;s--!==0;)if(!{}.hasOwnProperty.call(t,a[s]))return!1;for(s=n;s--!==0;){const o=a[s];if(!(o==="_owner"&&e.$$typeof)&&!deepEqual$2(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function getDPR(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(e,t){const n=getDPR(e);return Math.round(t*n)/n}function useLatestRef(e){const t=React__namespace.useRef(e);return index(()=>{t.current=e}),t}function useFloating(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:s=[],platform:a,elements:{reference:o,floating:l}={},transform:c=!0,whileElementsMounted:f,open:g}=e,[R,A]=React__namespace.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[V,Ve]=React__namespace.useState(s);deepEqual$2(V,s)||Ve(s);const[Ye,nt]=React__namespace.useState(null),[et,rt]=React__namespace.useState(null),st=React__namespace.useCallback(Dt=>{Dt!==at.current&&(at.current=Dt,nt(Dt))},[]),ot=React__namespace.useCallback(Dt=>{Dt!==ut.current&&(ut.current=Dt,rt(Dt))},[]),ct=o||Ye,lt=l||et,at=React__namespace.useRef(null),ut=React__namespace.useRef(null),pt=React__namespace.useRef(R),mt=f!=null,Ct=useLatestRef(f),Rt=useLatestRef(a),ft=useLatestRef(g),It=React__namespace.useCallback(()=>{if(!at.current||!ut.current)return;const Dt={placement:t,strategy:n,middleware:V};Rt.current&&(Dt.platform=Rt.current),computePosition(at.current,ut.current,Dt).then($t=>{const zt={...$t,isPositioned:ft.current!==!1};yt.current&&!deepEqual$2(pt.current,zt)&&(pt.current=zt,ReactDOM__namespace.flushSync(()=>{A(zt)}))})},[V,t,n,Rt,ft]);index(()=>{g===!1&&pt.current.isPositioned&&(pt.current.isPositioned=!1,A(Dt=>({...Dt,isPositioned:!1})))},[g]);const yt=React__namespace.useRef(!1);index(()=>(yt.current=!0,()=>{yt.current=!1}),[]),index(()=>{if(ct&&(at.current=ct),lt&&(ut.current=lt),ct&&lt){if(Ct.current)return Ct.current(ct,lt,It);It()}},[ct,lt,It,Ct,mt]);const Mt=React__namespace.useMemo(()=>({reference:at,floating:ut,setReference:st,setFloating:ot}),[st,ot]),Ft=React__namespace.useMemo(()=>({reference:ct,floating:lt}),[ct,lt]),Ht=React__namespace.useMemo(()=>{const Dt={position:n,left:0,top:0};if(!Ft.floating)return Dt;const $t=roundByDPR(Ft.floating,R.x),zt=roundByDPR(Ft.floating,R.y);return c?{...Dt,transform:"translate("+$t+"px, "+zt+"px)",...getDPR(Ft.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$t,top:zt}},[n,c,Ft.floating,R.x,R.y]);return React__namespace.useMemo(()=>({...R,update:It,refs:Mt,elements:Ft,floatingStyles:Ht}),[R,It,Mt,Ft,Ht])}const arrow$1=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:s,padding:a}=typeof e=="function"?e(n):e;return s&&t(s)?s.current!=null?arrow$3({element:s.current,padding:a}).fn(n):{}:s?arrow$3({element:s,padding:a}).fn(n):{}}}},offset=(e,t)=>({...offset$1(e),options:[e,t]}),shift$1=(e,t)=>({...shift$2(e),options:[e,t]}),limitShift=(e,t)=>({...limitShift$1(e),options:[e,t]}),flip=(e,t)=>({...flip$1(e),options:[e,t]}),size=(e,t)=>({...size$1(e),options:[e,t]}),hide=(e,t)=>({...hide$1(e),options:[e,t]}),arrow$2=(e,t)=>({...arrow$1(e),options:[e,t]});var NAME$3="Arrow",Arrow$1=React__namespace.forwardRef((e,t)=>{const{children:n,width:s=10,height:a=5,...o}=e;return jsxRuntime.jsx(Primitive$4.svg,{...o,ref:t,width:s,height:a,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:jsxRuntime.jsx("polygon",{points:"0,0 30,0 15,10"})})});Arrow$1.displayName=NAME$3;var Root$9=Arrow$1,POPPER_NAME="Popper",[createPopperContext,createPopperScope]=createContextScope$2(POPPER_NAME),[PopperProvider,usePopperContext]=createPopperContext(POPPER_NAME),Popper=e=>{const{__scopePopper:t,children:n}=e,[s,a]=React__namespace.useState(null);return jsxRuntime.jsx(PopperProvider,{scope:t,anchor:s,onAnchorChange:a,children:n})};Popper.displayName=POPPER_NAME;var ANCHOR_NAME$2="PopperAnchor",PopperAnchor=React__namespace.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s,...a}=e,o=usePopperContext(ANCHOR_NAME$2,n),l=React__namespace.useRef(null),c=useComposedRefs(t,l),f=React__namespace.useRef(null);return React__namespace.useEffect(()=>{const g=f.current;f.current=(s==null?void 0:s.current)||l.current,g!==f.current&&o.onAnchorChange(f.current)}),s?null:jsxRuntime.jsx(Primitive$4.div,{...a,ref:c})});PopperAnchor.displayName=ANCHOR_NAME$2;var CONTENT_NAME$9="PopperContent",[PopperContentProvider,useContentContext]=createPopperContext(CONTENT_NAME$9),PopperContent=React__namespace.forwardRef((e,t)=>{var Xt,fn,Yt,pn,gn,Kt;const{__scopePopper:n,side:s="bottom",sideOffset:a=0,align:o="center",alignOffset:l=0,arrowPadding:c=0,avoidCollisions:f=!0,collisionBoundary:g=[],collisionPadding:R=0,sticky:A="partial",hideWhenDetached:V=!1,updatePositionStrategy:Ve="optimized",onPlaced:Ye,...nt}=e,et=usePopperContext(CONTENT_NAME$9,n),[rt,st]=React__namespace.useState(null),ot=useComposedRefs(t,Tn=>st(Tn)),[ct,lt]=React__namespace.useState(null),at=useSize(ct),ut=(at==null?void 0:at.width)??0,pt=(at==null?void 0:at.height)??0,mt=s+(o!=="center"?"-"+o:""),Ct=typeof R=="number"?R:{top:0,right:0,bottom:0,left:0,...R},Rt=Array.isArray(g)?g:[g],ft=Rt.length>0,It={padding:Ct,boundary:Rt.filter(isNotNull),altBoundary:ft},{refs:yt,floatingStyles:Mt,placement:Ft,isPositioned:Ht,middlewareData:Dt}=useFloating({strategy:"fixed",placement:mt,whileElementsMounted:(...Tn)=>autoUpdate(...Tn,{animationFrame:Ve==="always"}),elements:{reference:et.anchor},middleware:[offset({mainAxis:a+pt,alignmentAxis:l}),f&&shift$1({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?limitShift():void 0,...It}),f&&flip({...It}),size({...It,apply:({elements:Tn,rects:hn,availableWidth:Sn,availableHeight:vn})=>{const{width:Rn,height:Cn}=hn.reference,bn=Tn.floating.style;bn.setProperty("--radix-popper-available-width",`${Sn}px`),bn.setProperty("--radix-popper-available-height",`${vn}px`),bn.setProperty("--radix-popper-anchor-width",`${Rn}px`),bn.setProperty("--radix-popper-anchor-height",`${Cn}px`)}}),ct&&arrow$2({element:ct,padding:c}),transformOrigin({arrowWidth:ut,arrowHeight:pt}),V&&hide({strategy:"referenceHidden",...It})]}),[$t,zt]=getSideAndAlignFromPlacement(Ft),Qt=useCallbackRef$1(Ye);useLayoutEffect2(()=>{Ht&&(Qt==null||Qt())},[Ht,Qt]);const Jt=(Xt=Dt.arrow)==null?void 0:Xt.x,sn=(fn=Dt.arrow)==null?void 0:fn.y,an=((Yt=Dt.arrow)==null?void 0:Yt.centerOffset)!==0,[Zt,mn]=React__namespace.useState();return useLayoutEffect2(()=>{rt&&mn(window.getComputedStyle(rt).zIndex)},[rt]),jsxRuntime.jsx("div",{ref:yt.setFloating,"data-radix-popper-content-wrapper":"",style:{...Mt,transform:Ht?Mt.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Zt,"--radix-popper-transform-origin":[(pn=Dt.transformOrigin)==null?void 0:pn.x,(gn=Dt.transformOrigin)==null?void 0:gn.y].join(" "),...((Kt=Dt.hide)==null?void 0:Kt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:jsxRuntime.jsx(PopperContentProvider,{scope:n,placedSide:$t,onArrowChange:lt,arrowX:Jt,arrowY:sn,shouldHideArrow:an,children:jsxRuntime.jsx(Primitive$4.div,{"data-side":$t,"data-align":zt,...nt,ref:ot,style:{...nt.style,animation:Ht?void 0:"none"}})})})});PopperContent.displayName=CONTENT_NAME$9;var ARROW_NAME$5="PopperArrow",OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},PopperArrow=React__namespace.forwardRef(function(t,n){const{__scopePopper:s,...a}=t,o=useContentContext(ARROW_NAME$5,s),l=OPPOSITE_SIDE[o.placedSide];return jsxRuntime.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[l]: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:jsxRuntime.jsx(Root$9,{...a,ref:n,style:{...a.style,display:"block"}})})});PopperArrow.displayName=ARROW_NAME$5;function isNotNull(e){return e!==null}var transformOrigin=e=>({name:"transformOrigin",options:e,fn(t){var et,rt,st;const{placement:n,rects:s,middlewareData:a}=t,l=((et=a.arrow)==null?void 0:et.centerOffset)!==0,c=l?0:e.arrowWidth,f=l?0:e.arrowHeight,[g,R]=getSideAndAlignFromPlacement(n),A={start:"0%",center:"50%",end:"100%"}[R],V=(((rt=a.arrow)==null?void 0:rt.x)??0)+c/2,Ve=(((st=a.arrow)==null?void 0:st.y)??0)+f/2;let Ye="",nt="";return g==="bottom"?(Ye=l?A:`${V}px`,nt=`${-f}px`):g==="top"?(Ye=l?A:`${V}px`,nt=`${s.floating.height+f}px`):g==="right"?(Ye=`${-f}px`,nt=l?A:`${Ve}px`):g==="left"&&(Ye=`${s.floating.width+f}px`,nt=l?A:`${Ve}px`),{data:{x:Ye,y:nt}}}});function getSideAndAlignFromPlacement(e){const[t,n="center"]=e.split("-");return[t,n]}var Root2$7=Popper,Anchor=PopperAnchor,Content$2=PopperContent,Arrow=PopperArrow;function createSlot$3(e){const t=createSlotClone$3(e),n=React__namespace.forwardRef((s,a)=>{const{children:o,...l}=s,c=React__namespace.Children.toArray(o),f=c.find(isSlottable$3);if(f){const g=f.props.children,R=c.map(A=>A===f?React__namespace.Children.count(g)>1?React__namespace.Children.only(null):React__namespace.isValidElement(g)?g.props.children:null:A);return jsxRuntime.jsx(t,{...l,ref:a,children:React__namespace.isValidElement(g)?React__namespace.cloneElement(g,void 0,R):null})}return jsxRuntime.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}function createSlotClone$3(e){const t=React__namespace.forwardRef((n,s)=>{const{children:a,...o}=n;if(React__namespace.isValidElement(a)){const l=getElementRef$3(a),c=mergeProps$3(o,a.props);return a.type!==React__namespace.Fragment&&(c.ref=s?composeRefs(s,l):l),React__namespace.cloneElement(a,c)}return React__namespace.Children.count(a)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$5=Symbol("radix.slottable");function isSlottable$3(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$5}function mergeProps$3(e,t){const n={...t};for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?n[s]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[s]=a):s==="style"?n[s]={...a,...o}:s==="className"&&(n[s]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$3(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var SELECTION_KEYS$1=["Enter"," "],FIRST_KEYS=["ArrowDown","PageUp","Home"],LAST_KEYS=["ArrowUp","PageDown","End"],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS$1,"ArrowRight"],rtl:[...SELECTION_KEYS$1,"ArrowLeft"]},SUB_CLOSE_KEYS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},MENU_NAME="Menu",[Collection$3,useCollection$3,createCollectionScope$3]=createCollection(MENU_NAME),[createMenuContext,createMenuScope]=createContextScope$2(MENU_NAME,[createCollectionScope$3,createPopperScope,createRovingFocusGroupScope]),usePopperScope$3=createPopperScope(),useRovingFocusGroupScope$1=createRovingFocusGroupScope(),[MenuProvider,useMenuContext]=createMenuContext(MENU_NAME),[MenuRootProvider,useMenuRootContext]=createMenuContext(MENU_NAME),Menu=e=>{const{__scopeMenu:t,open:n=!1,children:s,dir:a,onOpenChange:o,modal:l=!0}=e,c=usePopperScope$3(t),[f,g]=React__namespace.useState(null),R=React__namespace.useRef(!1),A=useCallbackRef$1(o),V=useDirection(a);return React__namespace.useEffect(()=>{const Ve=()=>{R.current=!0,document.addEventListener("pointerdown",Ye,{capture:!0,once:!0}),document.addEventListener("pointermove",Ye,{capture:!0,once:!0})},Ye=()=>R.current=!1;return document.addEventListener("keydown",Ve,{capture:!0}),()=>{document.removeEventListener("keydown",Ve,{capture:!0}),document.removeEventListener("pointerdown",Ye,{capture:!0}),document.removeEventListener("pointermove",Ye,{capture:!0})}},[]),jsxRuntime.jsx(Root2$7,{...c,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:n,onOpenChange:A,content:f,onContentChange:g,children:jsxRuntime.jsx(MenuRootProvider,{scope:t,onClose:React__namespace.useCallback(()=>A(!1),[A]),isUsingKeyboardRef:R,dir:V,modal:l,children:s})})})};Menu.displayName=MENU_NAME;var ANCHOR_NAME$1="MenuAnchor",MenuAnchor=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,a=usePopperScope$3(n);return jsxRuntime.jsx(Anchor,{...a,...s,ref:t})});MenuAnchor.displayName=ANCHOR_NAME$1;var PORTAL_NAME$5="MenuPortal",[PortalProvider$2,usePortalContext$2]=createMenuContext(PORTAL_NAME$5,{forceMount:void 0}),MenuPortal=e=>{const{__scopeMenu:t,forceMount:n,children:s,container:a}=e,o=useMenuContext(PORTAL_NAME$5,t);return jsxRuntime.jsx(PortalProvider$2,{scope:t,forceMount:n,children:jsxRuntime.jsx(Presence,{present:n||o.open,children:jsxRuntime.jsx(Portal$5,{asChild:!0,container:a,children:s})})})};MenuPortal.displayName=PORTAL_NAME$5;var CONTENT_NAME$8="MenuContent",[MenuContentProvider,useMenuContentContext]=createMenuContext(CONTENT_NAME$8),MenuContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:s=n.forceMount,...a}=e,o=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),l=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:s||o.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:l.modal?jsxRuntime.jsx(MenuRootContentModal,{...a,ref:t}):jsxRuntime.jsx(MenuRootContentNonModal,{...a,ref:t})})})})}),MenuRootContentModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),s=React__namespace.useRef(null),a=useComposedRefs(t,s);return React__namespace.useEffect(()=>{const o=s.current;if(o)return hideOthers(o)},[]),jsxRuntime.jsx(MenuContentImpl,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:composeEventHandlers(e.onFocusOutside,o=>o.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),MenuRootContentNonModal=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(CONTENT_NAME$8,e.__scopeMenu);return jsxRuntime.jsx(MenuContentImpl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Slot$3=createSlot$3("MenuContent.ScrollLock"),MenuContentImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,loop:s=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:f,onEscapeKeyDown:g,onPointerDownOutside:R,onFocusOutside:A,onInteractOutside:V,onDismiss:Ve,disableOutsideScroll:Ye,...nt}=e,et=useMenuContext(CONTENT_NAME$8,n),rt=useMenuRootContext(CONTENT_NAME$8,n),st=usePopperScope$3(n),ot=useRovingFocusGroupScope$1(n),ct=useCollection$3(n),[lt,at]=React__namespace.useState(null),ut=React__namespace.useRef(null),pt=useComposedRefs(t,ut,et.onContentChange),mt=React__namespace.useRef(0),Ct=React__namespace.useRef(""),Rt=React__namespace.useRef(0),ft=React__namespace.useRef(null),It=React__namespace.useRef("right"),yt=React__namespace.useRef(0),Mt=Ye?ReactRemoveScroll:React__namespace.Fragment,Ft=Ye?{as:Slot$3,allowPinchZoom:!0}:void 0,Ht=$t=>{var Xt,fn;const zt=Ct.current+$t,Qt=ct().filter(Yt=>!Yt.disabled),Jt=document.activeElement,sn=(Xt=Qt.find(Yt=>Yt.ref.current===Jt))==null?void 0:Xt.textValue,an=Qt.map(Yt=>Yt.textValue),Zt=getNextMatch(an,zt,sn),mn=(fn=Qt.find(Yt=>Yt.textValue===Zt))==null?void 0:fn.ref.current;(function Yt(pn){Ct.current=pn,window.clearTimeout(mt.current),pn!==""&&(mt.current=window.setTimeout(()=>Yt(""),1e3))})(zt),mn&&setTimeout(()=>mn.focus())};React__namespace.useEffect(()=>()=>window.clearTimeout(mt.current),[]),useFocusGuards();const Dt=React__namespace.useCallback($t=>{var Qt,Jt;return It.current===((Qt=ft.current)==null?void 0:Qt.side)&&isPointerInGraceArea($t,(Jt=ft.current)==null?void 0:Jt.area)},[]);return jsxRuntime.jsx(MenuContentProvider,{scope:n,searchRef:Ct,onItemEnter:React__namespace.useCallback($t=>{Dt($t)&&$t.preventDefault()},[Dt]),onItemLeave:React__namespace.useCallback($t=>{var zt;Dt($t)||((zt=ut.current)==null||zt.focus(),at(null))},[Dt]),onTriggerLeave:React__namespace.useCallback($t=>{Dt($t)&&$t.preventDefault()},[Dt]),pointerGraceTimerRef:Rt,onPointerGraceIntentChange:React__namespace.useCallback($t=>{ft.current=$t},[]),children:jsxRuntime.jsx(Mt,{...Ft,children:jsxRuntime.jsx(FocusScope,{asChild:!0,trapped:a,onMountAutoFocus:composeEventHandlers(o,$t=>{var zt;$t.preventDefault(),(zt=ut.current)==null||zt.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:jsxRuntime.jsx(DismissableLayer,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:g,onPointerDownOutside:R,onFocusOutside:A,onInteractOutside:V,onDismiss:Ve,children:jsxRuntime.jsx(Root$c,{asChild:!0,...ot,dir:rt.dir,orientation:"vertical",loop:s,currentTabStopId:lt,onCurrentTabStopIdChange:at,onEntryFocus:composeEventHandlers(f,$t=>{rt.isUsingKeyboardRef.current||$t.preventDefault()}),preventScrollOnEntryFocus:!0,children:jsxRuntime.jsx(Content$2,{role:"menu","aria-orientation":"vertical","data-state":getOpenState(et.open),"data-radix-menu-content":"",dir:rt.dir,...st,...nt,ref:pt,style:{outline:"none",...nt.style},onKeyDown:composeEventHandlers(nt.onKeyDown,$t=>{const Qt=$t.target.closest("[data-radix-menu-content]")===$t.currentTarget,Jt=$t.ctrlKey||$t.altKey||$t.metaKey,sn=$t.key.length===1;Qt&&($t.key==="Tab"&&$t.preventDefault(),!Jt&&sn&&Ht($t.key));const an=ut.current;if($t.target!==an||!FIRST_LAST_KEYS.includes($t.key))return;$t.preventDefault();const mn=ct().filter(Xt=>!Xt.disabled).map(Xt=>Xt.ref.current);LAST_KEYS.includes($t.key)&&mn.reverse(),focusFirst$1(mn)}),onBlur:composeEventHandlers(e.onBlur,$t=>{$t.currentTarget.contains($t.target)||(window.clearTimeout(mt.current),Ct.current="")}),onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse($t=>{const zt=$t.target,Qt=yt.current!==$t.clientX;if($t.currentTarget.contains(zt)&&Qt){const Jt=$t.clientX>yt.current?"right":"left";It.current=Jt,yt.current=$t.clientX}}))})})})})})})});MenuContent.displayName=CONTENT_NAME$8;var GROUP_NAME$2="MenuGroup",MenuGroup=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"group",...s,ref:t})});MenuGroup.displayName=GROUP_NAME$2;var LABEL_NAME$2="MenuLabel",MenuLabel=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return jsxRuntime.jsx(Primitive$4.div,{...s,ref:t})});MenuLabel.displayName=LABEL_NAME$2;var ITEM_NAME$3="MenuItem",ITEM_SELECT="menu.itemSelect",MenuItem=React__namespace.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:s,...a}=e,o=React__namespace.useRef(null),l=useMenuRootContext(ITEM_NAME$3,e.__scopeMenu),c=useMenuContentContext(ITEM_NAME$3,e.__scopeMenu),f=useComposedRefs(t,o),g=React__namespace.useRef(!1),R=()=>{const A=o.current;if(!n&&A){const V=new CustomEvent(ITEM_SELECT,{bubbles:!0,cancelable:!0});A.addEventListener(ITEM_SELECT,Ve=>s==null?void 0:s(Ve),{once:!0}),dispatchDiscreteCustomEvent(A,V),V.defaultPrevented?g.current=!1:l.onClose()}};return jsxRuntime.jsx(MenuItemImpl,{...a,ref:f,disabled:n,onClick:composeEventHandlers(e.onClick,R),onPointerDown:A=>{var V;(V=e.onPointerDown)==null||V.call(e,A),g.current=!0},onPointerUp:composeEventHandlers(e.onPointerUp,A=>{var V;g.current||(V=A.currentTarget)==null||V.click()}),onKeyDown:composeEventHandlers(e.onKeyDown,A=>{const V=c.searchRef.current!=="";n||V&&A.key===" "||SELECTION_KEYS$1.includes(A.key)&&(A.currentTarget.click(),A.preventDefault())})})});MenuItem.displayName=ITEM_NAME$3;var MenuItemImpl=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:s=!1,textValue:a,...o}=e,l=useMenuContentContext(ITEM_NAME$3,n),c=useRovingFocusGroupScope$1(n),f=React__namespace.useRef(null),g=useComposedRefs(t,f),[R,A]=React__namespace.useState(!1),[V,Ve]=React__namespace.useState("");return React__namespace.useEffect(()=>{const Ye=f.current;Ye&&Ve((Ye.textContent??"").trim())},[o.children]),jsxRuntime.jsx(Collection$3.ItemSlot,{scope:n,disabled:s,textValue:a??V,children:jsxRuntime.jsx(Item$3,{asChild:!0,...c,focusable:!s,children:jsxRuntime.jsx(Primitive$4.div,{role:"menuitem","data-highlighted":R?"":void 0,"aria-disabled":s||void 0,"data-disabled":s?"":void 0,...o,ref:g,onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(Ye=>{s?l.onItemLeave(Ye):(l.onItemEnter(Ye),Ye.defaultPrevented||Ye.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(Ye=>l.onItemLeave(Ye))),onFocus:composeEventHandlers(e.onFocus,()=>A(!0)),onBlur:composeEventHandlers(e.onBlur,()=>A(!1))})})})}),CHECKBOX_ITEM_NAME$1="MenuCheckboxItem",MenuCheckboxItem=React__namespace.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:s,...a}=e;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:n,children:jsxRuntime.jsx(MenuItem,{role:"menuitemcheckbox","aria-checked":isIndeterminate$1(n)?"mixed":n,...a,ref:t,"data-state":getCheckedState(n),onSelect:composeEventHandlers(a.onSelect,()=>s==null?void 0:s(isIndeterminate$1(n)?!0:!n),{checkForDefaultPrevented:!1})})})});MenuCheckboxItem.displayName=CHECKBOX_ITEM_NAME$1;var RADIO_GROUP_NAME$1="MenuRadioGroup",[RadioGroupProvider,useRadioGroupContext]=createMenuContext(RADIO_GROUP_NAME$1,{value:void 0,onValueChange:()=>{}}),MenuRadioGroup=React__namespace.forwardRef((e,t)=>{const{value:n,onValueChange:s,...a}=e,o=useCallbackRef$1(s);return jsxRuntime.jsx(RadioGroupProvider,{scope:e.__scopeMenu,value:n,onValueChange:o,children:jsxRuntime.jsx(MenuGroup,{...a,ref:t})})});MenuRadioGroup.displayName=RADIO_GROUP_NAME$1;var RADIO_ITEM_NAME$1="MenuRadioItem",MenuRadioItem=React__namespace.forwardRef((e,t)=>{const{value:n,...s}=e,a=useRadioGroupContext(RADIO_ITEM_NAME$1,e.__scopeMenu),o=n===a.value;return jsxRuntime.jsx(ItemIndicatorProvider,{scope:e.__scopeMenu,checked:o,children:jsxRuntime.jsx(MenuItem,{role:"menuitemradio","aria-checked":o,...s,ref:t,"data-state":getCheckedState(o),onSelect:composeEventHandlers(s.onSelect,()=>{var l;return(l=a.onValueChange)==null?void 0:l.call(a,n)},{checkForDefaultPrevented:!1})})})});MenuRadioItem.displayName=RADIO_ITEM_NAME$1;var ITEM_INDICATOR_NAME$1="MenuItemIndicator",[ItemIndicatorProvider,useItemIndicatorContext]=createMenuContext(ITEM_INDICATOR_NAME$1,{checked:!1}),MenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:s,...a}=e,o=useItemIndicatorContext(ITEM_INDICATOR_NAME$1,n);return jsxRuntime.jsx(Presence,{present:s||isIndeterminate$1(o.checked)||o.checked===!0,children:jsxRuntime.jsx(Primitive$4.span,{...a,ref:t,"data-state":getCheckedState(o.checked)})})});MenuItemIndicator.displayName=ITEM_INDICATOR_NAME$1;var SEPARATOR_NAME$2="MenuSeparator",MenuSeparator=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e;return jsxRuntime.jsx(Primitive$4.div,{role:"separator","aria-orientation":"horizontal",...s,ref:t})});MenuSeparator.displayName=SEPARATOR_NAME$2;var ARROW_NAME$4="MenuArrow",MenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeMenu:n,...s}=e,a=usePopperScope$3(n);return jsxRuntime.jsx(Arrow,{...a,...s,ref:t})});MenuArrow.displayName=ARROW_NAME$4;var SUB_NAME="MenuSub",[MenuSubProvider,useMenuSubContext]=createMenuContext(SUB_NAME),MenuSub=e=>{const{__scopeMenu:t,children:n,open:s=!1,onOpenChange:a}=e,o=useMenuContext(SUB_NAME,t),l=usePopperScope$3(t),[c,f]=React__namespace.useState(null),[g,R]=React__namespace.useState(null),A=useCallbackRef$1(a);return React__namespace.useEffect(()=>(o.open===!1&&A(!1),()=>A(!1)),[o.open,A]),jsxRuntime.jsx(Root2$7,{...l,children:jsxRuntime.jsx(MenuProvider,{scope:t,open:s,onOpenChange:A,content:g,onContentChange:R,children:jsxRuntime.jsx(MenuSubProvider,{scope:t,contentId:useId$1(),triggerId:useId$1(),trigger:c,onTriggerChange:f,children:n})})})};MenuSub.displayName=SUB_NAME;var SUB_TRIGGER_NAME$1="MenuSubTrigger",MenuSubTrigger=React__namespace.forwardRef((e,t)=>{const n=useMenuContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),s=useMenuRootContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),a=useMenuSubContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),o=useMenuContentContext(SUB_TRIGGER_NAME$1,e.__scopeMenu),l=React__namespace.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:f}=o,g={__scopeMenu:e.__scopeMenu},R=React__namespace.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return React__namespace.useEffect(()=>R,[R]),React__namespace.useEffect(()=>{const A=c.current;return()=>{window.clearTimeout(A),f(null)}},[c,f]),jsxRuntime.jsx(MenuAnchor,{asChild:!0,...g,children:jsxRuntime.jsx(MenuItemImpl,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":getOpenState(n.open),...e,ref:composeRefs(t,a.onTriggerChange),onClick:A=>{var V;(V=e.onClick)==null||V.call(e,A),!(e.disabled||A.defaultPrevented)&&(A.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:composeEventHandlers(e.onPointerMove,whenMouse(A=>{o.onItemEnter(A),!A.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(o.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),R()},100))})),onPointerLeave:composeEventHandlers(e.onPointerLeave,whenMouse(A=>{var Ve,Ye;R();const V=(Ve=n.content)==null?void 0:Ve.getBoundingClientRect();if(V){const nt=(Ye=n.content)==null?void 0:Ye.dataset.side,et=nt==="right",rt=et?-5:5,st=V[et?"left":"right"],ot=V[et?"right":"left"];o.onPointerGraceIntentChange({area:[{x:A.clientX+rt,y:A.clientY},{x:st,y:V.top},{x:ot,y:V.top},{x:ot,y:V.bottom},{x:st,y:V.bottom}],side:nt}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.onPointerGraceIntentChange(null),300)}else{if(o.onTriggerLeave(A),A.defaultPrevented)return;o.onPointerGraceIntentChange(null)}})),onKeyDown:composeEventHandlers(e.onKeyDown,A=>{var Ve;const V=o.searchRef.current!=="";e.disabled||V&&A.key===" "||SUB_OPEN_KEYS[s.dir].includes(A.key)&&(n.onOpenChange(!0),(Ve=n.content)==null||Ve.focus(),A.preventDefault())})})})});MenuSubTrigger.displayName=SUB_TRIGGER_NAME$1;var SUB_CONTENT_NAME$1="MenuSubContent",MenuSubContent=React__namespace.forwardRef((e,t)=>{const n=usePortalContext$2(CONTENT_NAME$8,e.__scopeMenu),{forceMount:s=n.forceMount,...a}=e,o=useMenuContext(CONTENT_NAME$8,e.__scopeMenu),l=useMenuRootContext(CONTENT_NAME$8,e.__scopeMenu),c=useMenuSubContext(SUB_CONTENT_NAME$1,e.__scopeMenu),f=React__namespace.useRef(null),g=useComposedRefs(t,f);return jsxRuntime.jsx(Collection$3.Provider,{scope:e.__scopeMenu,children:jsxRuntime.jsx(Presence,{present:s||o.open,children:jsxRuntime.jsx(Collection$3.Slot,{scope:e.__scopeMenu,children:jsxRuntime.jsx(MenuContentImpl,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:g,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:R=>{var A;l.isUsingKeyboardRef.current&&((A=f.current)==null||A.focus()),R.preventDefault()},onCloseAutoFocus:R=>R.preventDefault(),onFocusOutside:composeEventHandlers(e.onFocusOutside,R=>{R.target!==c.trigger&&o.onOpenChange(!1)}),onEscapeKeyDown:composeEventHandlers(e.onEscapeKeyDown,R=>{l.onClose(),R.preventDefault()}),onKeyDown:composeEventHandlers(e.onKeyDown,R=>{var Ve;const A=R.currentTarget.contains(R.target),V=SUB_CLOSE_KEYS[l.dir].includes(R.key);A&&V&&(o.onOpenChange(!1),(Ve=c.trigger)==null||Ve.focus(),R.preventDefault())})})})})})});MenuSubContent.displayName=SUB_CONTENT_NAME$1;function getOpenState(e){return e?"open":"closed"}function isIndeterminate$1(e){return e==="indeterminate"}function getCheckedState(e){return isIndeterminate$1(e)?"indeterminate":e?"checked":"unchecked"}function focusFirst$1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function wrapArray$1(e,t){return e.map((n,s)=>e[(t+s)%e.length])}function getNextMatch(e,t,n){const a=t.length>1&&Array.from(t).every(g=>g===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let l=wrapArray$1(e,Math.max(o,0));a.length===1&&(l=l.filter(g=>g!==n));const f=l.find(g=>g.toLowerCase().startsWith(a.toLowerCase()));return f!==n?f:void 0}function isPointInPolygon$1(e,t){const{x:n,y:s}=e;let a=!1;for(let o=0,l=t.length-1;o<t.length;l=o++){const c=t[o],f=t[l],g=c.x,R=c.y,A=f.x,V=f.y;R>s!=V>s&&n<(A-g)*(s-R)/(V-R)+g&&(a=!a)}return a}function isPointerInGraceArea(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return isPointInPolygon$1(n,t)}function whenMouse(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Root3$1=Menu,Anchor2$1=MenuAnchor,Portal$3=MenuPortal,Content2$6=MenuContent,Group$1=MenuGroup,Label$4=MenuLabel,Item2$1=MenuItem,CheckboxItem=MenuCheckboxItem,RadioGroup=MenuRadioGroup,RadioItem=MenuRadioItem,ItemIndicator$1=MenuItemIndicator,Separator$3=MenuSeparator,Arrow2=MenuArrow,Sub=MenuSub,SubTrigger=MenuSubTrigger,SubContent=MenuSubContent,DROPDOWN_MENU_NAME="DropdownMenu",[createDropdownMenuContext]=createContextScope$2(DROPDOWN_MENU_NAME,[createMenuScope]),useMenuScope=createMenuScope(),[DropdownMenuProvider,useDropdownMenuContext]=createDropdownMenuContext(DROPDOWN_MENU_NAME),DropdownMenu$1=e=>{const{__scopeDropdownMenu:t,children:n,dir:s,open:a,defaultOpen:o,onOpenChange:l,modal:c=!0}=e,f=useMenuScope(t),g=React__namespace.useRef(null),[R,A]=useControllableState({prop:a,defaultProp:o??!1,onChange:l,caller:DROPDOWN_MENU_NAME});return jsxRuntime.jsx(DropdownMenuProvider,{scope:t,triggerId:useId$1(),triggerRef:g,contentId:useId$1(),open:R,onOpenChange:A,onOpenToggle:React__namespace.useCallback(()=>A(V=>!V),[A]),modal:c,children:jsxRuntime.jsx(Root3$1,{...f,open:R,onOpenChange:A,dir:s,modal:c,children:n})})};DropdownMenu$1.displayName=DROPDOWN_MENU_NAME;var TRIGGER_NAME$8="DropdownMenuTrigger",DropdownMenuTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:s=!1,...a}=e,o=useDropdownMenuContext(TRIGGER_NAME$8,n),l=useMenuScope(n);return jsxRuntime.jsx(Anchor2$1,{asChild:!0,...l,children:jsxRuntime.jsx(Primitive$4.button,{type:"button",id:o.triggerId,"aria-haspopup":"menu","aria-expanded":o.open,"aria-controls":o.open?o.contentId:void 0,"data-state":o.open?"open":"closed","data-disabled":s?"":void 0,disabled:s,...a,ref:composeRefs(t,o.triggerRef),onPointerDown:composeEventHandlers(e.onPointerDown,c=>{!s&&c.button===0&&c.ctrlKey===!1&&(o.onOpenToggle(),o.open||c.preventDefault())}),onKeyDown:composeEventHandlers(e.onKeyDown,c=>{s||(["Enter"," "].includes(c.key)&&o.onOpenToggle(),c.key==="ArrowDown"&&o.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});DropdownMenuTrigger$1.displayName=TRIGGER_NAME$8;var PORTAL_NAME$4="DropdownMenuPortal",DropdownMenuPortal$1=e=>{const{__scopeDropdownMenu:t,...n}=e,s=useMenuScope(t);return jsxRuntime.jsx(Portal$3,{...s,...n})};DropdownMenuPortal$1.displayName=PORTAL_NAME$4;var CONTENT_NAME$7="DropdownMenuContent",DropdownMenuContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useDropdownMenuContext(CONTENT_NAME$7,n),o=useMenuScope(n),l=React__namespace.useRef(!1);return jsxRuntime.jsx(Content2$6,{id:a.contentId,"aria-labelledby":a.triggerId,...o,...s,ref:t,onCloseAutoFocus:composeEventHandlers(e.onCloseAutoFocus,c=>{var f;l.current||(f=a.triggerRef.current)==null||f.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:composeEventHandlers(e.onInteractOutside,c=>{const f=c.detail.originalEvent,g=f.button===0&&f.ctrlKey===!0,R=f.button===2||g;(!a.modal||R)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuContent$1.displayName=CONTENT_NAME$7;var GROUP_NAME$1="DropdownMenuGroup",DropdownMenuGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Group$1,{...a,...s,ref:t})});DropdownMenuGroup$1.displayName=GROUP_NAME$1;var LABEL_NAME$1="DropdownMenuLabel",DropdownMenuLabel$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Label$4,{...a,...s,ref:t})});DropdownMenuLabel$1.displayName=LABEL_NAME$1;var ITEM_NAME$2="DropdownMenuItem",DropdownMenuItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Item2$1,{...a,...s,ref:t})});DropdownMenuItem$1.displayName=ITEM_NAME$2;var CHECKBOX_ITEM_NAME="DropdownMenuCheckboxItem",DropdownMenuCheckboxItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(CheckboxItem,{...a,...s,ref:t})});DropdownMenuCheckboxItem$1.displayName=CHECKBOX_ITEM_NAME;var RADIO_GROUP_NAME="DropdownMenuRadioGroup",DropdownMenuRadioGroup$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(RadioGroup,{...a,...s,ref:t})});DropdownMenuRadioGroup$1.displayName=RADIO_GROUP_NAME;var RADIO_ITEM_NAME="DropdownMenuRadioItem",DropdownMenuRadioItem$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(RadioItem,{...a,...s,ref:t})});DropdownMenuRadioItem$1.displayName=RADIO_ITEM_NAME;var INDICATOR_NAME$2="DropdownMenuItemIndicator",DropdownMenuItemIndicator=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(ItemIndicator$1,{...a,...s,ref:t})});DropdownMenuItemIndicator.displayName=INDICATOR_NAME$2;var SEPARATOR_NAME$1="DropdownMenuSeparator",DropdownMenuSeparator$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Separator$3,{...a,...s,ref:t})});DropdownMenuSeparator$1.displayName=SEPARATOR_NAME$1;var ARROW_NAME$3="DropdownMenuArrow",DropdownMenuArrow=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(Arrow2,{...a,...s,ref:t})});DropdownMenuArrow.displayName=ARROW_NAME$3;var DropdownMenuSub$1=e=>{const{__scopeDropdownMenu:t,children:n,open:s,onOpenChange:a,defaultOpen:o}=e,l=useMenuScope(t),[c,f]=useControllableState({prop:s,defaultProp:o??!1,onChange:a,caller:"DropdownMenuSub"});return jsxRuntime.jsx(Sub,{...l,open:c,onOpenChange:f,children:n})},SUB_TRIGGER_NAME="DropdownMenuSubTrigger",DropdownMenuSubTrigger$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(SubTrigger,{...a,...s,ref:t})});DropdownMenuSubTrigger$1.displayName=SUB_TRIGGER_NAME;var SUB_CONTENT_NAME="DropdownMenuSubContent",DropdownMenuSubContent$1=React__namespace.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...s}=e,a=useMenuScope(n);return jsxRuntime.jsx(SubContent,{...a,...s,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});DropdownMenuSubContent$1.displayName=SUB_CONTENT_NAME;var Root2$6=DropdownMenu$1,Trigger$5=DropdownMenuTrigger$1,Portal2$1=DropdownMenuPortal$1,Content2$5=DropdownMenuContent$1,Group2=DropdownMenuGroup$1,Label2=DropdownMenuLabel$1,Item2=DropdownMenuItem$1,CheckboxItem2=DropdownMenuCheckboxItem$1,RadioGroup2=DropdownMenuRadioGroup$1,RadioItem2=DropdownMenuRadioItem$1,ItemIndicator2=DropdownMenuItemIndicator,Separator2=DropdownMenuSeparator$1,Sub2=DropdownMenuSub$1,SubTrigger2=DropdownMenuSubTrigger$1,SubContent2=DropdownMenuSubContent$1;const DropdownMenu=Root2$6,DropdownMenuTrigger=Trigger$5,DropdownMenuGroup=Group2,DropdownMenuPortal=Portal2$1,DropdownMenuSub=Sub2,DropdownMenuRadioGroup=RadioGroup2,DropdownMenuSubTrigger=React__namespace.forwardRef(({className:e,inset:t,children:n,...s},a)=>jsxRuntime.jsxs(SubTrigger2,{ref:a,className:cn("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...s,children:[n,jsxRuntime.jsx(ChevronRight,{className:"ml-auto"})]}));DropdownMenuSubTrigger.displayName=SubTrigger2.displayName;const DropdownMenuSubContent=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(SubContent2,{ref:n,className:cn("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));DropdownMenuSubContent.displayName=SubContent2.displayName;const DropdownMenuContent=React__namespace.forwardRef(({className:e,sideOffset:t=4,...n},s)=>jsxRuntime.jsx(Portal2$1,{children:jsxRuntime.jsx(Content2$5,{ref:s,sideOffset:t,className:cn("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));DropdownMenuContent.displayName=Content2$5.displayName;const DropdownMenuItem=React__namespace.forwardRef(({className:e,inset:t,...n},s)=>jsxRuntime.jsx(Item2,{ref:s,className:cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",t&&"pl-8",e),...n}));DropdownMenuItem.displayName=Item2.displayName;const DropdownMenuCheckboxItem=React__namespace.forwardRef(({className:e,children:t,checked:n,...s},a)=>jsxRuntime.jsxs(CheckboxItem2,{ref:a,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...s,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Check,{className:"h-4 w-4"})})}),t]}));DropdownMenuCheckboxItem.displayName=CheckboxItem2.displayName;const DropdownMenuRadioItem=React__namespace.forwardRef(({className:e,children:t,...n},s)=>jsxRuntime.jsxs(RadioItem2,{ref:s,className:cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[jsxRuntime.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:jsxRuntime.jsx(ItemIndicator2,{children:jsxRuntime.jsx(Circle,{className:"h-2 w-2 fill-current"})})}),t]}));DropdownMenuRadioItem.displayName=RadioItem2.displayName;const DropdownMenuLabel=React__namespace.forwardRef(({className:e,inset:t,...n},s)=>jsxRuntime.jsx(Label2,{ref:s,className:cn("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));DropdownMenuLabel.displayName=Label2.displayName;const DropdownMenuSeparator=React__namespace.forwardRef(({className:e,...t},n)=>jsxRuntime.jsx(Separator2,{ref:n,className:cn("-mx-1 my-1 h-px bg-muted",e),...t}));DropdownMenuSeparator.displayName=Separator2.displayName;const DropdownMenuShortcut=({className:e,...t})=>jsxRuntime.jsx("span",{className:cn("ml-auto text-xs tracking-widest opacity-60",e),...t});DropdownMenuShortcut.displayName="DropdownMenuShortcut";var REACT_LAZY_TYPE=Symbol.for("react.lazy"),use=React__namespace[" use ".trim().toString()];function isPromiseLike(e){return typeof e=="object"&&e!==null&&"then"in e}function isLazyComponent(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===REACT_LAZY_TYPE&&"_payload"in e&&isPromiseLike(e._payload)}function createSlot$2(e){const t=createSlotClone$2(e),n=React__namespace.forwardRef((s,a)=>{let{children:o,...l}=s;isLazyComponent(o)&&typeof use=="function"&&(o=use(o._payload));const c=React__namespace.Children.toArray(o),f=c.find(isSlottable$2);if(f){const g=f.props.children,R=c.map(A=>A===f?React__namespace.Children.count(g)>1?React__namespace.Children.only(null):React__namespace.isValidElement(g)?g.props.children:null:A);return jsxRuntime.jsx(t,{...l,ref:a,children:React__namespace.isValidElement(g)?React__namespace.cloneElement(g,void 0,R):null})}return jsxRuntime.jsx(t,{...l,ref:a,children:o})});return n.displayName=`${e}.Slot`,n}var Slot$2=createSlot$2("Slot");function createSlotClone$2(e){const t=React__namespace.forwardRef((n,s)=>{let{children:a,...o}=n;if(isLazyComponent(a)&&typeof use=="function"&&(a=use(a._payload)),React__namespace.isValidElement(a)){const l=getElementRef$2(a),c=mergeProps$2(o,a.props);return a.type!==React__namespace.Fragment&&(c.ref=s?composeRefs(s,l):l),React__namespace.cloneElement(a,c)}return React__namespace.Children.count(a)>1?React__namespace.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var SLOTTABLE_IDENTIFIER$4=Symbol("radix.slottable");function isSlottable$2(e){return React__namespace.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===SLOTTABLE_IDENTIFIER$4}function mergeProps$2(e,t){const n={...t};for(const s in t){const a=e[s],o=t[s];/^on[A-Z]/.test(s)?a&&o?n[s]=(...c)=>{const f=o(...c);return a(...c),f}:a&&(n[s]=a):s==="style"?n[s]={...a,...o}:s==="className"&&(n[s]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function getElementRef$2(e){var s,a;let t=(s=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const falsyToString=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,cx=clsx,cva=(e,t)=>n=>{var s;if((t==null?void 0:t.variants)==null)return cx(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:o}=t,l=Object.keys(a).map(g=>{const R=n==null?void 0:n[g],A=o==null?void 0:o[g];if(R===null)return null;const V=falsyToString(R)||falsyToString(A);return a[g][V]}),c=n&&Object.entries(n).reduce((g,R)=>{let[A,V]=R;return V===void 0||(g[A]=V),g},{}),f=t==null||(s=t.compoundVariants)===null||s===void 0?void 0:s.reduce((g,R)=>{let{class:A,className:V,...Ve}=R;return Object.entries(Ve).every(Ye=>{let[nt,et]=Ye;return Array.isArray(et)?et.includes({...o,...c}[nt]):{...o,...c}[nt]===et})?[...g,A,V]:g},[]);return cx(e,l,f,n==null?void 0:n.class,n==null?void 0:n.className)},buttonVariants=cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer",{variants:{variant:{default:"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90",outline:"border border-input text-foreground bg-background shadow-xs hover:bg-accent hover:text-accent-foreground",defaultOutline:"border border-red-600/30 text-red-600 bg-background shadow-xs hover:bg-red-600/5 ",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline",blue:"bg-randmar-blue text-gray-100 shadow-sm hover:bg-randmar-blue/90",red:"bg-randmar-red text-gray-100 shadow-sm hover:bg-randmar-red/90",purple:"bg-randmar-purple text-gray-100 shadow-sm hover:bg-randmar-purple/90",none:""},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),Button$1=React__namespace.forwardRef(({className:e,variant:t,size:n,asChild:s=!1,confirmationDialog:a,onClick:o,...l},c)=>{const f=s?Slot$2:"button";if(!a)return jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:c,onClick:o,...l});o&&console.warn("Button: You provided both onClick and confirmationDialog props. The onClick prop will be ignored. Use the onConfirm callback in confirmationDialog instead.");const{title:g,content:R,onConfirm:A,confirmText:V="Confirm",cancelText:Ve="Cancel"}=a,Ye=()=>{A()};return jsxRuntime.jsxs(Dialog,{children:[jsxRuntime.jsx(DialogTrigger,{asChild:!0,children:jsxRuntime.jsx(f,{className:cn(buttonVariants({variant:t,size:n,className:e})),ref:c,...l})}),jsxRuntime.jsxs(DialogContent,{children:[jsxRuntime.jsxs(DialogHeader,{children:[jsxRuntime.jsx(DialogTitle,{children:g}),jsxRuntime.jsx(DialogDescription,{children:R})]}),jsxRuntime.jsxs(DialogFooter,{className:"flex justify-end gap-2 pt-4",children:[jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{variant:"outline",children:Ve})}),jsxRuntime.jsx(DialogClose,{asChild:!0,children:jsxRuntime.jsx(Button$1,{onClick:Ye,children:V})})]})]})]})});Button$1.displayName="Button";function formatProdErrorMessage$1(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var $$observable=typeof Symbol=="function"&&Symbol.observable||"@@observable",symbol_observable_default=$$observable,randomString=()=>Math.random().toString(36).substring(7).split("").join("."),ActionTypes={INIT:`@@redux/INIT${randomString()}`,REPLACE:`@@redux/REPLACE${randomString()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${randomString()}`},actionTypes_default=ActionTypes;function isPlainObject$4(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function miniKindOf(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(isDate$1(e))return"date";if(isError(e))return"error";const n=ctorName(e);switch(n){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return n}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function ctorName(e){return typeof e.constructor=="function"?e.constructor.name:null}function isError(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function isDate$1(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function kindOf(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=miniKindOf(e)),t}function createStore$1(e,t,n){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(2):`Expected the root reducer to be a function. Instead, received: '${kindOf(e)}'`);if(typeof t=="function"&&typeof n=="function"||typeof n=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(1):`Expected the enhancer to be a function. Instead, received: '${kindOf(n)}'`);return n(createStore$1)(e,t)}let s=e,a=t,o=new Map,l=o,c=0,f=!1;function g(){l===o&&(l=new Map,o.forEach((et,rt)=>{l.set(rt,et)}))}function R(){if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return a}function A(et){if(typeof et!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(4):`Expected the listener to be a function. Instead, received: '${kindOf(et)}'`);if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let rt=!0;g();const st=c++;return l.set(st,et),function(){if(rt){if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");rt=!1,g(),l.delete(st),o=null}}}function V(et){if(!isPlainObject$4(et))throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(7):`Actions must be plain objects. Instead, the actual type was: '${kindOf(et)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof et.type>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof et.type!="string")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(17):`Action "type" property must be a string. Instead, the actual type was: '${kindOf(et.type)}'. Value was: '${et.type}' (stringified)`);if(f)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(9):"Reducers may not dispatch actions.");try{f=!0,a=s(a,et)}finally{f=!1}return(o=l).forEach(st=>{st()}),et}function Ve(et){if(typeof et!="function")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(10):`Expected the nextReducer to be a function. Instead, received: '${kindOf(et)}`);s=et,V({type:actionTypes_default.REPLACE})}function Ye(){const et=A;return{subscribe(rt){if(typeof rt!="object"||rt===null)throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(11):`Expected the observer to be an object. Instead, received: '${kindOf(rt)}'`);function st(){const ct=rt;ct.next&&ct.next(R())}return st(),{unsubscribe:et(st)}},[symbol_observable_default](){return this}}}return V({type:actionTypes_default.INIT}),{dispatch:V,subscribe:A,getState:R,replaceReducer:Ve,[symbol_observable_default]:Ye}}function warning(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function getUnexpectedStateShapeWarningMessage(e,t,n,s){const a=Object.keys(t),o=n&&n.type===actionTypes_default.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(a.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!isPlainObject$4(e))return`The ${o} has unexpected type of "${kindOf(e)}". Expected argument to be an object with the following keys: "${a.join('", "')}"`;const l=Object.keys(e).filter(c=>!t.hasOwnProperty(c)&&!s[c]);if(l.forEach(c=>{s[c]=!0}),!(n&&n.type===actionTypes_default.REPLACE)&&l.length>0)return`Unexpected ${l.length>1?"keys":"key"} "${l.join('", "')}" found in ${o}. Expected to find one of the known reducer keys instead: "${a.join('", "')}". Unexpected keys will be ignored.`}function assertReducerShape(e){Object.keys(e).forEach(t=>{const n=e[t];if(typeof n(void 0,{type:actionTypes_default.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof n(void 0,{type:actionTypes_default.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${actionTypes_default.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function combineReducers(e){const t=Object.keys(e),n={};for(let l=0;l<t.length;l++){const c=t[l];process.env.NODE_ENV!=="production"&&typeof e[c]>"u"&&warning(`No reducer provided for key "${c}"`),typeof e[c]=="function"&&(n[c]=e[c])}const s=Object.keys(n);let a;process.env.NODE_ENV!=="production"&&(a={});let o;try{assertReducerShape(n)}catch(l){o=l}return function(c={},f){if(o)throw o;if(process.env.NODE_ENV!=="production"){const A=getUnexpectedStateShapeWarningMessage(c,n,f,a);A&&warning(A)}let g=!1;const R={};for(let A=0;A<s.length;A++){const V=s[A],Ve=n[V],Ye=c[V],nt=Ve(Ye,f);if(typeof nt>"u"){const et=f&&f.type;throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(14):`When called with an action of type ${et?`"${String(et)}"`:"(unknown type)"}, the slice reducer for key "${V}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}R[V]=nt,g=g||nt!==Ye}return g=g||s.length!==Object.keys(c).length,g?R:c}}function compose$1(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,n)=>(...s)=>t(n(...s)))}function applyMiddleware(...e){return t=>(n,s)=>{const a=t(n,s);let o=()=>{throw new Error(process.env.NODE_ENV==="production"?formatProdErrorMessage$1(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const l={getState:a.getState,dispatch:(f,...g)=>o(f,...g)},c=e.map(f=>f(l));return o=compose$1(...c)(a.dispatch),{...a,dispatch:o}}}function isAction(e){return isPlainObject$4(e)&&"type"in e&&typeof e.type=="string"}var NOTHING$1=Symbol.for("immer-nothing"),DRAFTABLE$1=Symbol.for("immer-draftable"),DRAFT_STATE$1=Symbol.for("immer-state"),errors$1=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function die$1(e,...t){if(process.env.NODE_ENV!=="production"){const n=errors$1[e],s=isFunction$5(n)?n.apply(null,t):n;throw new Error(`[Immer] ${s}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var O=Object,getPrototypeOf$2=O.getPrototypeOf,CONSTRUCTOR="constructor",PROTOTYPE="prototype",CONFIGURABLE="configurable",ENUMERABLE="enumerable",WRITABLE="writable",VALUE="value",isDraft$1=e=>!!e&&!!e[DRAFT_STATE$1];function isDraftable$1(e){var t;return e?isPlainObject$3(e)||isArray$2(e)||!!e[DRAFTABLE$1]||!!((t=e[CONSTRUCTOR])!=null&&t[DRAFTABLE$1])||isMap$1(e)||isSet$1(e):!1}var objectCtorString$1=O[PROTOTYPE][CONSTRUCTOR].toString(),cachedCtorStrings$1=new WeakMap;function isPlainObject$3(e){if(!e||!isObjectish(e))return!1;const t=getPrototypeOf$2(e);if(t===null||t===O[PROTOTYPE])return!0;const n=O.hasOwnProperty.call(t,CONSTRUCTOR)&&t[CONSTRUCTOR];if(n===Object)return!0;if(!isFunction$5(n))return!1;let s=cachedCtorStrings$1.get(n);return s===void 0&&(s=Function.toString.call(n),cachedCtorStrings$1.set(n,s)),s===objectCtorString$1}function original(e){return isDraft$1(e)||die$1(15,e),e[DRAFT_STATE$1].base_}function each$1(e,t,n=!0){getArchtype$1(e)===0?(n?Reflect.ownKeys(e):O.keys(e)).forEach(a=>{t(a,e[a],e)}):e.forEach((s,a)=>t(a,s,e))}function getArchtype$1(e){const t=e[DRAFT_STATE$1];return t?t.type_:isArray$2(e)?1:isMap$1(e)?2:isSet$1(e)?3:0}var has$2=(e,t,n=getArchtype$1(e))=>n===2?e.has(t):O[PROTOTYPE].hasOwnProperty.call(e,t),get$5=(e,t,n=getArchtype$1(e))=>n===2?e.get(t):e[t],set$3=(e,t,n,s=getArchtype$1(e))=>{s===2?e.set(t,n):s===3?e.add(n):e[t]=n};function is$2(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var isArray$2=Array.isArray,isMap$1=e=>e instanceof Map,isSet$1=e=>e instanceof Set,isObjectish=e=>typeof e=="object",isFunction$5=e=>typeof e=="function",isBoolean$2=e=>typeof e=="boolean";function isArrayIndex(e){const t=+e;return Number.isInteger(t)&&String(t)===e}var getProxyDraft=e=>isObjectish(e)?e==null?void 0:e[DRAFT_STATE$1]:null,latest$1=e=>e.copy_||e.base_,getFinalValue=e=>e.modified_?e.copy_:e.base_;function shallowCopy$1(e,t){if(isMap$1(e))return new Map(e);if(isSet$1(e))return new Set(e);if(isArray$2(e))return Array[PROTOTYPE].slice.call(e);const n=isPlainObject$3(e);if(t===!0||t==="class_only"&&!n){const s=O.getOwnPropertyDescriptors(e);delete s[DRAFT_STATE$1];let a=Reflect.ownKeys(s);for(let o=0;o<a.length;o++){const l=a[o],c=s[l];c[WRITABLE]===!1&&(c[WRITABLE]=!0,c[CONFIGURABLE]=!0),(c.get||c.set)&&(s[l]={[CONFIGURABLE]:!0,[WRITABLE]:!0,[ENUMERABLE]:c[ENUMERABLE],[VALUE]:e[l]})}return O.create(getPrototypeOf$2(e),s)}else{const s=getPrototypeOf$2(e);if(s!==null&&n)return{...e};const a=O.create(s);return O.assign(a,e)}}function freeze$2(e,t=!1){return isFrozen$2(e)||isDraft$1(e)||!isDraftable$1(e)||(getArchtype$1(e)>1&&O.defineProperties(e,{set:dontMutateMethodOverride$1,add:dontMutateMethodOverride$1,clear:dontMutateMethodOverride$1,delete:dontMutateMethodOverride$1}),O.freeze(e),t&&each$1(e,(n,s)=>{freeze$2(s,!0)},!1)),e}function dontMutateFrozenCollections$1(){die$1(2)}var dontMutateMethodOverride$1={[VALUE]:dontMutateFrozenCollections$1};function isFrozen$2(e){return e===null||!isObjectish(e)?!0:O.isFrozen(e)}var PluginMapSet="MapSet",PluginPatches="Patches",PluginArrayMethods="ArrayMethods",plugins$1={};function getPlugin$1(e){const t=plugins$1[e];return t||die$1(0,e),t}var isPluginLoaded=e=>!!plugins$1[e];function loadPlugin(e,t){plugins$1[e]||(plugins$1[e]=t)}var currentScope$1,getCurrentScope$1=()=>currentScope$1,createScope$1=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:isPluginLoaded(PluginMapSet)?getPlugin$1(PluginMapSet):void 0,arrayMethodsPlugin_:isPluginLoaded(PluginArrayMethods)?getPlugin$1(PluginArrayMethods):void 0});function usePatchesInScope$1(e,t){t&&(e.patchPlugin_=getPlugin$1(PluginPatches),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function revokeScope$1(e){leaveScope$1(e),e.drafts_.forEach(revokeDraft$1),e.drafts_=null}function leaveScope$1(e){e===currentScope$1&&(currentScope$1=e.parent_)}var enterScope$1=e=>currentScope$1=createScope$1(currentScope$1,e);function revokeDraft$1(e){const t=e[DRAFT_STATE$1];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function processResult$1(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];if(e!==void 0&&e!==n){n[DRAFT_STATE$1].modified_&&(revokeScope$1(t),die$1(4)),isDraftable$1(e)&&(e=finalize$1(t,e));const{patchPlugin_:a}=t;a&&a.generateReplacementPatches_(n[DRAFT_STATE$1].base_,e,t)}else e=finalize$1(t,n);return maybeFreeze$1(t,e,!0),revokeScope$1(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==NOTHING$1?e:void 0}function finalize$1(e,t){if(isFrozen$2(t))return t;const n=t[DRAFT_STATE$1];if(!n)return handleValue(t,e.handledSet_,e);if(!isSameScope(n,e))return t;if(!n.modified_)return n.base_;if(!n.finalized_){const{callbacks_:s}=n;if(s)for(;s.length>0;)s.pop()(e);generatePatchesAndFinalize(n,e)}return n.copy_}function maybeFreeze$1(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&freeze$2(t,n)}function markStateFinalized(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var isSameScope=(e,t)=>e.scope_===t,EMPTY_LOCATIONS_RESULT=[];function updateDraftInParent(e,t,n,s){const a=latest$1(e),o=e.type_;if(s!==void 0&&get$5(a,s,o)===t){set$3(a,s,n,o);return}if(!e.draftLocations_){const c=e.draftLocations_=new Map;each$1(a,(f,g)=>{if(isDraft$1(g)){const R=c.get(g)||[];R.push(f),c.set(g,R)}})}const l=e.draftLocations_.get(t)??EMPTY_LOCATIONS_RESULT;for(const c of l)set$3(a,c,n,o)}function registerChildFinalizationCallback(e,t,n){e.callbacks_.push(function(a){var c;const o=t;if(!o||!isSameScope(o,a))return;(c=a.mapSetPlugin_)==null||c.fixSetContents(o);const l=getFinalValue(o);updateDraftInParent(e,o.draft_??o,l,n),generatePatchesAndFinalize(o,a)})}function generatePatchesAndFinalize(e,t){var s;if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(((s=e.assigned_)==null?void 0:s.size)??0)>0)){const{patchPlugin_:a}=t;if(a){const o=a.getPath(e);o&&a.generatePatches_(e,o,t)}markStateFinalized(e)}}function handleCrossReference(e,t,n){const{scope_:s}=e;if(isDraft$1(n)){const a=n[DRAFT_STATE$1];isSameScope(a,s)&&a.callbacks_.push(function(){prepareCopy$1(e);const l=getFinalValue(a);updateDraftInParent(e,n,l,t)})}else isDraftable$1(n)&&e.callbacks_.push(function(){const o=latest$1(e);e.type_===3?o.has(n)&&handleValue(n,s.handledSet_,s):get$5(o,t,e.type_)===n&&s.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&handleValue(get$5(e.copy_,t,e.type_),s.handledSet_,s)})}function handleValue(e,t,n){return!n.immer_.autoFreeze_&&n.unfinalizedDrafts_<1||isDraft$1(e)||t.has(e)||!isDraftable$1(e)||isFrozen$2(e)||(t.add(e),each$1(e,(s,a)=>{if(isDraft$1(a)){const o=a[DRAFT_STATE$1];if(isSameScope(o,n)){const l=getFinalValue(o);set$3(e,s,l,e.type_),markStateFinalized(o)}}else isDraftable$1(a)&&handleValue(a,t,n)})),e}function createProxyProxy$1(e,t){const n=isArray$2(e),s={type_:n?1:0,scope_:t?t.scope_:getCurrentScope$1(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0};let a=s,o=objectTraps$1;n&&(a=[s],o=arrayTraps$1);const{revoke:l,proxy:c}=Proxy.revocable(a,o);return s.draft_=c,s.revoke_=l,[c,s]}var objectTraps$1={get(e,t){if(t===DRAFT_STATE$1)return e;let n=e.scope_.arrayMethodsPlugin_;const s=e.type_===1&&typeof t=="string";if(s&&n!=null&&n.isArrayOperationMethod(t))return n.createMethodInterceptor(e,t);const a=latest$1(e);if(!has$2(a,t,e.type_))return readPropFromProto$1(e,a,t);const o=a[t];if(e.finalized_||!isDraftable$1(o)||s&&e.operationMethod&&(n!=null&&n.isMutatingArrayMethod(e.operationMethod))&&isArrayIndex(t))return o;if(o===peek$1(e.base_,t)){prepareCopy$1(e);const l=e.type_===1?+t:t,c=createProxy$1(e.scope_,o,e,l);return e.copy_[l]=c}return o},has(e,t){return t in latest$1(e)},ownKeys(e){return Reflect.ownKeys(latest$1(e))},set(e,t,n){const s=getDescriptorFromProto$1(latest$1(e),t);if(s!=null&&s.set)return s.set.call(e.draft_,n),!0;if(!e.modified_){const a=peek$1(latest$1(e),t),o=a==null?void 0:a[DRAFT_STATE$1];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_.set(t,!1),!0;if(is$2(n,a)&&(n!==void 0||has$2(e.base_,t,e.type_)))return!0;prepareCopy$1(e),markChanged$1(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_.set(t,!0),handleCrossReference(e,t,n)),!0},deleteProperty(e,t){return prepareCopy$1(e),peek$1(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),markChanged$1(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=latest$1(e),s=Reflect.getOwnPropertyDescriptor(n,t);return s&&{[WRITABLE]:!0,[CONFIGURABLE]:e.type_!==1||t!=="length",[ENUMERABLE]:s[ENUMERABLE],[VALUE]:n[t]}},defineProperty(){die$1(11)},getPrototypeOf(e){return getPrototypeOf$2(e.base_)},setPrototypeOf(){die$1(12)}},arrayTraps$1={};for(let e in objectTraps$1){let t=objectTraps$1[e];arrayTraps$1[e]=function(){const n=arguments;return n[0]=n[0][0],t.apply(this,n)}}arrayTraps$1.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&die$1(13),arrayTraps$1.set.call(this,e,t,void 0)},arrayTraps$1.set=function(e,t,n){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&die$1(14),objectTraps$1.set.call(this,e[0],t,n,e[0])};function peek$1(e,t){const n=e[DRAFT_STATE$1];return(n?latest$1(n):e)[t]}function readPropFromProto$1(e,t,n){var a;const s=getDescriptorFromProto$1(t,n);return s?VALUE in s?s[VALUE]:(a=s.get)==null?void 0:a.call(e.draft_):void 0}function getDescriptorFromProto$1(e,t){if(!(t in e))return;let n=getPrototypeOf$2(e);for(;n;){const s=Object.getOwnPropertyDescriptor(n,t);if(s)return s;n=getPrototypeOf$2(n)}}function markChanged$1(e){e.modified_||(e.modified_=!0,e.parent_&&markChanged$1(e.parent_))}function prepareCopy$1(e){e.copy_||(e.assigned_=new Map,e.copy_=shallowCopy$1(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Immer2$1=class{constructor(t){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(n,s,a)=>{if(isFunction$5(n)&&!isFunction$5(s)){const l=s;s=n;const c=this;return function(g=l,...R){return c.produce(g,A=>s.call(this,A,...R))}}isFunction$5(s)||die$1(6),a!==void 0&&!isFunction$5(a)&&die$1(7);let o;if(isDraftable$1(n)){const l=enterScope$1(this),c=createProxy$1(l,n,void 0);let f=!0;try{o=s(c),f=!1}finally{f?revokeScope$1(l):leaveScope$1(l)}return usePatchesInScope$1(l,a),processResult$1(o,l)}else if(!n||!isObjectish(n)){if(o=s(n),o===void 0&&(o=n),o===NOTHING$1&&(o=void 0),this.autoFreeze_&&freeze$2(o,!0),a){const l=[],c=[];getPlugin$1(PluginPatches).generateReplacementPatches_(n,o,{patches_:l,inversePatches_:c}),a(l,c)}return o}else die$1(1,n)},this.produceWithPatches=(n,s)=>{if(isFunction$5(n))return(c,...f)=>this.produceWithPatches(c,g=>n(g,...f));let a,o;return[this.produce(n,s,(c,f)=>{a=c,o=f}),a,o]},isBoolean$2(t==null?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze),isBoolean$2(t==null?void 0:t.useStrictShallowCopy)&&this.setUseStrictShallowCopy(t.useStrictShallowCopy),isBoolean$2(t==null?void 0:t.useStrictIteration)&&this.setUseStrictIteration(t.useStrictIteration)}createDraft(t){isDraftable$1(t)||die$1(8),isDraft$1(t)&&(t=current$1(t));const n=enterScope$1(this),s=createProxy$1(n,t,void 0);return s[DRAFT_STATE$1].isManual_=!0,leaveScope$1(n),s}finishDraft(t,n){const s=t&&t[DRAFT_STATE$1];(!s||!s.isManual_)&&die$1(9);const{scope_:a}=s;return usePatchesInScope$1(a,n),processResult$1(void 0,a)}setAutoFreeze(t){this.autoFreeze_=t}setUseStrictShallowCopy(t){this.useStrictShallowCopy_=t}setUseStrictIteration(t){this.useStrictIteration_=t}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(t,n){let s;for(s=n.length-1;s>=0;s--){const o=n[s];if(o.path.length===0&&o.op==="replace"){t=o.value;break}}s>-1&&(n=n.slice(s+1));const a=getPlugin$1(PluginPatches).applyPatches_;return isDraft$1(t)?a(t,n):this.produce(t,o=>a(o,n))}};function createProxy$1(e,t,n,s){const[a,o]=isMap$1(t)?getPlugin$1(PluginMapSet).proxyMap_(t,n):isSet$1(t)?getPlugin$1(PluginMapSet).proxySet_(t,n):createProxyProxy$1(t,n);return((n==null?void 0:n.scope_)??getCurrentScope$1()).drafts_.push(a),o.callbacks_=(n==null?void 0:n.callbacks_)??[],o.key_=s,n&&s!==void 0?registerChildFinalizationCallback(n,o,s):o.callbacks_.push(function(f){var R;(R=f.mapSetPlugin_)==null||R.fixSetContents(o);const{patchPlugin_:g}=f;o.modified_&&g&&g.generatePatches_(o,[],f)}),a}function current$1(e){return isDraft$1(e)||die$1(10,e),currentImpl$1(e)}function currentImpl$1(e){if(!isDraftable$1(e)||isFrozen$2(e))return e;const t=e[DRAFT_STATE$1];let n,s=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=shallowCopy$1(e,t.scope_.immer_.useStrictShallowCopy_),s=t.scope_.immer_.shouldUseStrictIteration()}else n=shallowCopy$1(e,!0);return each$1(n,(a,o)=>{set$3(n,a,currentImpl$1(o))},s),t&&(t.finalized_=!1),n}function enablePatches(){process.env.NODE_ENV!=="production"&&errors$1.push('Sets cannot have "replace" patches.',function(Ye){return"Unsupported patch operation: "+Ye},function(Ye){return"Cannot apply patch, path doesn't resolve: "+Ye},"Patching reserved attributes like __proto__, prototype and constructor is not allowed");function t(Ye,nt=[]){if(Ye.key_!==void 0){const et=Ye.parent_.copy_??Ye.parent_.base_,rt=getProxyDraft(get$5(et,Ye.key_)),st=get$5(et,Ye.key_);if(st===void 0||st!==Ye.draft_&&st!==Ye.base_&&st!==Ye.copy_||rt!=null&&rt.base_!==Ye.base_)return null;const ot=Ye.parent_.type_===3;let ct;if(ot){const lt=Ye.parent_;ct=Array.from(lt.drafts_.keys()).indexOf(Ye.key_)}else ct=Ye.key_;if(!(ot&&et.size>ct||has$2(et,ct)))return null;nt.push(ct)}if(Ye.parent_)return t(Ye.parent_,nt);nt.reverse();try{n(Ye.copy_,nt)}catch{return null}return nt}function n(Ye,nt){let et=Ye;for(let rt=0;rt<nt.length-1;rt++){const st=nt[rt];if(et=get$5(et,st),!isObjectish(et)||et===null)throw new Error(`Cannot resolve path at '${nt.join("/")}'`)}return et}const s="replace",a="add",o="remove";function l(Ye,nt,et){if(Ye.scope_.processedForPatches_.has(Ye))return;Ye.scope_.processedForPatches_.add(Ye);const{patches_:rt,inversePatches_:st}=et;switch(Ye.type_){case 0:case 2:return f(Ye,nt,rt,st);case 1:return c(Ye,nt,rt,st);case 3:return g(Ye,nt,rt,st)}}function c(Ye,nt,et,rt){let{base_:st,assigned_:ot}=Ye,ct=Ye.copy_;ct.length<st.length&&([st,ct]=[ct,st],[et,rt]=[rt,et]);const lt=Ye.allIndicesReassigned_===!0;for(let at=0;at<st.length;at++){const ut=ct[at],pt=st[at];if((lt||(ot==null?void 0:ot.get(at.toString())))&&ut!==pt){const Ct=ut==null?void 0:ut[DRAFT_STATE$1];if(Ct&&Ct.modified_)continue;const Rt=nt.concat([at]);et.push({op:s,path:Rt,value:Ve(ut)}),rt.push({op:s,path:Rt,value:Ve(pt)})}}for(let at=st.length;at<ct.length;at++){const ut=nt.concat([at]);et.push({op:a,path:ut,value:Ve(ct[at])})}for(let at=ct.length-1;st.length<=at;--at){const ut=nt.concat([at]);rt.push({op:o,path:ut})}}function f(Ye,nt,et,rt){const{base_:st,copy_:ot,type_:ct}=Ye;each$1(Ye.assigned_,(lt,at)=>{const ut=get$5(st,lt,ct),pt=get$5(ot,lt,ct),mt=at?has$2(st,lt)?s:a:o;if(ut===pt&&mt===s)return;const Ct=nt.concat(lt);et.push(mt===o?{op:mt,path:Ct}:{op:mt,path:Ct,value:Ve(pt)}),rt.push(mt===a?{op:o,path:Ct}:mt===o?{op:a,path:Ct,value:Ve(ut)}:{op:s,path:Ct,value:Ve(ut)})})}function g(Ye,nt,et,rt){let{base_:st,copy_:ot}=Ye,ct=0;st.forEach(lt=>{if(!ot.has(lt)){const at=nt.concat([ct]);et.push({op:o,path:at,value:lt}),rt.unshift({op:a,path:at,value:lt})}ct++}),ct=0,ot.forEach(lt=>{if(!st.has(lt)){const at=nt.concat([ct]);et.push({op:a,path:at,value:lt}),rt.unshift({op:o,path:at,value:lt})}ct++})}function R(Ye,nt,et){const{patches_:rt,inversePatches_:st}=et;rt.push({op:s,path:[],value:nt===NOTHING$1?void 0:nt}),st.push({op:s,path:[],value:Ye})}function A(Ye,nt){return nt.forEach(et=>{const{path:rt,op:st}=et;let ot=Ye;for(let ut=0;ut<rt.length-1;ut++){const pt=getArchtype$1(ot);let mt=rt[ut];typeof mt!="string"&&typeof mt!="number"&&(mt=""+mt),(pt===0||pt===1)&&(mt==="__proto__"||mt===CONSTRUCTOR)&&die$1(19),isFunction$5(ot)&&mt===PROTOTYPE&&die$1(19),ot=get$5(ot,mt),isObjectish(ot)||die$1(18,rt.join("/"))}const ct=getArchtype$1(ot),lt=V(et.value),at=rt[rt.length-1];switch(st){case s:switch(ct){case 2:return ot.set(at,lt);case 3:die$1(16);default:return ot[at]=lt}case a:switch(ct){case 1:return at==="-"?ot.push(lt):ot.splice(at,0,lt);case 2:return ot.set(at,lt);case 3:return ot.add(lt);default:return ot[at]=lt}case o:switch(ct){case 1:return ot.splice(at,1);case 2:return ot.delete(at);case 3:return ot.delete(et.value);default:return delete ot[at]}default:die$1(17,st)}}),Ye}function V(Ye){if(!isDraftable$1(Ye))return Ye;if(isArray$2(Ye))return Ye.map(V);if(isMap$1(Ye))return new Map(Array.from(Ye.entries()).map(([et,rt])=>[et,V(rt)]));if(isSet$1(Ye))return new Set(Array.from(Ye).map(V));const nt=Object.create(getPrototypeOf$2(Ye));for(const et in Ye)nt[et]=V(Ye[et]);return has$2(Ye,DRAFTABLE$1)&&(nt[DRAFTABLE$1]=Ye[DRAFTABLE$1]),nt}function Ve(Ye){return isDraft$1(Ye)?V(Ye):Ye}loadPlugin(PluginPatches,{applyPatches_:A,generatePatches_:l,generateReplacementPatches_:R,getPath:t})}var immer$1=new Immer2$1,produce=immer$1.produce,produceWithPatches=immer$1.produceWithPatches.bind(immer$1),applyPatches=immer$1.applyPatches.bind(immer$1),runIdentityFunctionCheck=(e,t,n)=>{if(t.length===1&&t[0]===n){let s=!1;try{const a={};e(a)===a&&(s=!0)}catch{}if(s){let a;try{throw new Error}catch(o){({stack:a}=o)}console.warn(`The result function returned its own inputs without modification. e.g
520
520
  \`createSelector([state => state.todos], todos => todos)\`
521
521
  This could lead to inefficient memoization and unnecessary re-renders.
522
522
  Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:a})}}},runInputStabilityCheck=(e,t,n)=>{const{memoize:s,memoizeOptions:a}=t,{inputSelectorResults:o,inputSelectorResultsCopy:l}=e,c=s(()=>({}),...a);if(!(c.apply(null,o)===c.apply(null,l))){let g;try{throw new Error}catch(R){({stack:g}=R)}console.warn(`An input selector returned a different result when passed same arguments.
package/dist/style.css CHANGED
@@ -140,7 +140,7 @@ body {
140
140
 
141
141
  /* Deep bokeh treatment for Randmar Assistant modal overlay */
142
142
  .randmar-assistant-overlay {
143
- pointer-events: none;
143
+ pointer-events: auto;
144
144
  opacity: 1;
145
145
  animation: none !important;
146
146
  transition: none !important;
@@ -155,6 +155,7 @@ body {
155
155
  }
156
156
 
157
157
  .randmar-assistant-overlay[data-state="closed"] {
158
+ pointer-events: none !important;
158
159
  opacity: 0 !important;
159
160
  background: transparent !important;
160
161
  box-shadow: none !important;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "randmarcomps",
3
3
  "private": false,
4
- "version": "1.523.0",
4
+ "version": "1.524.0",
5
5
  "description": "The UI library enabling speed and consistency in Randmar frontends.",
6
6
  "type": "module",
7
7
  "files": [