@qodo/design-system 0.20.18 → 0.20.20
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.
- package/dist/design-system.css +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -16
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -147,7 +147,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
147
147
|
*
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const ih=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ao=Ce("x",ih);function K(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ki(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ae(...e){return t=>{let r=!1;const n=e.map(o=>{const a=ki(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():ki(e[o],null)}}}}function ce(...e){return d.useCallback(Ae(...e),e)}function lh(e,t){const r=d.createContext(t),n=a=>{const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return l.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function je(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,ch(o,...t)]}function ch(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function uh(e){const t=dh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(ph);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function dh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=gh(o),i=mh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fh=Symbol("radix.slottable");function ph(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fh}function mh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function gh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=vh.reduce((e,t)=>{const r=uh(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lc(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}function ze(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function hh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xh="DismissableLayer",ga="dismissableLayer.update",bh="dismissableLayer.pointerDownOutside",yh="dismissableLayer.focusOutside",Ni,cc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(cc),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),h=ce(t,k=>p(k)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),y=f?v.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=b,R=Sh(k=>{const N=k.target,$=[...u.branches].some(B=>B.contains(N));!C||$||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},m),j=Eh(k=>{const N=k.target;[...u.branches].some(B=>B.contains(N))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},m);return hh(k=>{y===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},m),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ni=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ji(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ni)}},[f,m,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ji())},[f,u]),d.useEffect(()=>{const k=()=>g({});return document.addEventListener(ga,k),()=>document.removeEventListener(ga,k)},[]),l.jsx(ne.div,{...c,ref:h,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,j.onFocusCapture),onBlurCapture:K(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,R.onPointerDownCapture)})});gr.displayName=xh;var wh="DismissableLayerBranch",Ch=d.forwardRef((e,t)=>{const r=d.useContext(cc),n=d.useRef(null),o=ce(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(ne.div,{...e,ref:o})});Ch.displayName=wh;function Sh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){uc(bh,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Eh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&uc(yh,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ji(){const e=new CustomEvent(ga);document.dispatchEvent(e)}function uc(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?lc(o,a):o.dispatchEvent(a)}var Ne=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Rh=d[" useId ".trim().toString()]||(()=>{}),kh=0;function be(e){const[t,r]=d.useState(Rh());return Ne(()=>{r(n=>n??String(kh++))},[e]),t?`radix-${t}`:""}const Nh=["top","right","bottom","left"],vt=Math.min,De=Math.max,Vn=Math.round,kn=Math.floor,et=e=>({x:e,y:e}),jh={left:"right",right:"left",bottom:"top",top:"bottom"},Ph={start:"end",end:"start"};function va(e,t,r){return De(e,vt(t,r))}function lt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function vr(e){return e.split("-")[1]}function Wa(e){return e==="x"?"y":"x"}function za(e){return e==="y"?"height":"width"}const Th=new Set(["top","bottom"]);function Qe(e){return Th.has(ct(e))?"y":"x"}function qa(e){return Wa(Qe(e))}function Ih(e,t,r){r===void 0&&(r=!1);const n=vr(e),o=qa(e),a=za(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function Ah(e){const t=Bn(e);return[ha(e),t,ha(t)]}function ha(e){return e.replace(/start|end/g,t=>Ph[t])}const Pi=["left","right"],Ti=["right","left"],_h=["top","bottom"],Oh=["bottom","top"];function Mh(e,t,r){switch(e){case"top":case"bottom":return r?t?Ti:Pi:t?Pi:Ti;case"left":case"right":return t?_h:Oh;default:return[]}}function Dh(e,t,r,n){const o=vr(e);let a=Mh(ct(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ha)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>jh[t])}function $h(e){return{top:0,right:0,bottom:0,left:0,...e}}function dc(e){return typeof e!="number"?$h(e):{top:e,right:e,bottom:e,left:e}}function Gn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Ii(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=qa(t),i=za(s),c=ct(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:p};break;case"left":g={x:n.x-o.width,y:p};break;default:g={x:n.x,y:n.y}}switch(vr(t)){case"start":g[s]-=m*(r&&u?-1:1);break;case"end":g[s]+=m*(r&&u?-1:1);break}return g}const Lh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Ii(u,n,c),m=n,g={},h=0;for(let v=0;v<i.length;v++){const{name:x,fn:b}=i[v],{x:y,y:w,data:C,reset:R}=await b({x:f,y:p,initialPlacement:n,placement:m,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=y??f,p=w??p,g={...g,[x]:{...g[x],...C}},R&&h<=50&&(h++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=Ii(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}};async function Wr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=lt(t,e),h=dc(g),x=i[m?p==="floating"?"reference":"floating":p],b=Gn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),y=p==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Gn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:c}):y);return{top:(b.top-R.top+h.top)/C.y,bottom:(R.bottom-b.bottom+h.bottom)/C.y,left:(b.left-R.left+h.left)/C.x,right:(R.right-b.right+h.right)/C.x}}const Fh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=lt(e,t)||{};if(u==null)return{};const p=dc(f),m={x:r,y:n},g=qa(o),h=za(g),v=await s.getDimensions(u),x=g==="y",b=x?"top":"left",y=x?"bottom":"right",w=x?"clientHeight":"clientWidth",C=a.reference[h]+a.reference[g]-m[g]-a.floating[h],R=m[g]-a.reference[g],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=j?j[w]:0;(!k||!await(s.isElement==null?void 0:s.isElement(j)))&&(k=i.floating[w]||a.floating[h]);const N=C/2-R/2,$=k/2-v[h]/2-1,B=vt(p[b],$),G=vt(p[y],$),Q=B,ee=k-v[h]-G,W=k/2-v[h]/2+N,M=va(Q,W,ee),_=!c.arrow&&vr(o)!=null&&W!==M&&a.reference[h]/2-(W<Q?B:G)-v[h]/2<0,D=_?W<Q?W-Q:W-ee:0;return{[g]:m[g]+D,data:{[g]:M,centerOffset:W-M-D,..._&&{alignmentOffset:D}},reset:_}}}),Vh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...x}=lt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=ct(o),y=Qe(i),w=ct(i)===i,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(w||!v?[Bn(i)]:Ah(i)),j=h!=="none";!m&&j&&R.push(...Dh(i,v,h,C));const k=[i,...R],N=await Wr(t,x),$=[];let B=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(N[b]),p){const W=Ih(o,s,C);$.push(N[W[0]],N[W[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every(W=>W<=0)){var G,Q;const W=(((G=a.flip)==null?void 0:G.index)||0)+1,M=k[W];if(M&&(!(p==="alignment"?y!==Qe(M):!1)||B.every(T=>Qe(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:W,overflows:B},reset:{placement:M}};let _=(Q=B.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:Q.placement;if(!_)switch(g){case"bestFit":{var ee;const D=(ee=B.filter(T=>{if(j){const O=Qe(T.placement);return O===y||O==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(O=>O>0).reduce((O,U)=>O+U,0)]).sort((T,O)=>T[1]-O[1])[0])==null?void 0:ee[0];D&&(_=D);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Ai(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _i(e){return Nh.some(t=>e[t]>=0)}const Bh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=lt(e,t);switch(n){case"referenceHidden":{const a=await Wr(t,{...o,elementContext:"reference"}),s=Ai(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:_i(s)}}}case"escaped":{const a=await Wr(t,{...o,altBoundary:!0}),s=Ai(a,r.floating);return{data:{escapedOffsets:s,escaped:_i(s)}}}default:return{}}}}},fc=new Set(["left","top"]);async function Gh(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ct(r),i=vr(r),c=Qe(r)==="y",u=fc.has(s)?-1:1,f=a&&c?-1:1,p=lt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(g=i==="end"?h*-1:h),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Wh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await Gh(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},zh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:x=>{let{x:b,y}=x;return{x:b,y}}},...c}=lt(e,t),u={x:r,y:n},f=await Wr(t,c),p=Qe(ct(o)),m=Wa(p);let g=u[m],h=u[p];if(a){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=g+f[x],w=g-f[b];g=va(y,g,w)}if(s){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=h+f[x],w=h-f[b];h=va(y,h,w)}const v=i.fn({...t,[m]:g,[p]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[p]:s}}}}}},qh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=lt(e,t),f={x:r,y:n},p=Qe(o),m=Wa(p);let g=f[m],h=f[p];const v=lt(i,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=m==="y"?"height":"width",C=a.reference[m]-a.floating[w]+x.mainAxis,R=a.reference[m]+a.reference[w]-x.mainAxis;g<C?g=C:g>R&&(g=R)}if(u){var b,y;const w=m==="y"?"width":"height",C=fc.has(ct(o)),R=a.reference[p]-a.floating[w]+(C&&((b=s.offset)==null?void 0:b[p])||0)+(C?0:x.crossAxis),j=a.reference[p]+a.reference[w]+(C?0:((y=s.offset)==null?void 0:y[p])||0)-(C?x.crossAxis:0);h<R?h=R:h>j&&(h=j)}return{[m]:g,[p]:h}}}},Hh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=lt(e,t),f=await Wr(t,u),p=ct(o),m=vr(o),g=Qe(o)==="y",{width:h,height:v}=a.floating;let x,b;p==="top"||p==="bottom"?(x=p,b=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=p,x=m==="end"?"top":"bottom");const y=v-f.top-f.bottom,w=h-f.left-f.right,C=vt(v-f[x],y),R=vt(h-f[b],w),j=!t.middlewareData.shift;let k=C,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=y),j&&!m){const B=De(f.left,0),G=De(f.right,0),Q=De(f.top,0),ee=De(f.bottom,0);g?N=h-2*(B!==0||G!==0?B+G:De(f.left,f.right)):k=v-2*(Q!==0||ee!==0?Q+ee:De(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:k});const $=await s.getDimensions(i.floating);return h!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function so(){return typeof window<"u"}function hr(e){return pc(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pc(e){return so()?e instanceof Node||e instanceof $e(e).Node:!1}function qe(e){return so()?e instanceof Element||e instanceof $e(e).Element:!1}function tt(e){return so()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function Oi(e){return!so()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}const Uh=new Set(["inline","contents"]);function Jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Uh.has(o)}const Kh=new Set(["table","td","th"]);function Yh(e){return Kh.has(hr(e))}const Xh=[":popover-open",":modal"];function io(e){return Xh.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zh=["transform","translate","scale","rotate","perspective"],Jh=["transform","translate","scale","rotate","perspective","filter"],Qh=["paint","layout","strict","content"];function Ha(e){const t=Ua(),r=qe(e)?He(e):e;return Zh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Jh.some(n=>(r.willChange||"").includes(n))||Qh.some(n=>(r.contain||"").includes(n))}function ex(e){let t=ht(e);for(;tt(t)&&!cr(t);){if(Ha(t))return t;if(io(t))return null;t=ht(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tx=new Set(["html","body","#document"]);function cr(e){return tx.has(hr(e))}function He(e){return $e(e).getComputedStyle(e)}function lo(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Oi(e)&&e.host||rt(e);return Oi(t)?t.host:t}function mc(e){const t=ht(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&Jr(t)?t:mc(t)}function zr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=mc(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=$e(o);if(a){const i=xa(s);return t.concat(s,s.visualViewport||[],Jr(o)?o:[],i&&r?zr(i):[])}return t.concat(o,zr(o,[],r))}function xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gc(e){const t=He(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Vn(r)!==a||Vn(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function Ka(e){return qe(e)?e:e.contextElement}function ir(e){const t=Ka(e);if(!tt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=gc(t);let s=(a?Vn(r.width):r.width)/n,i=(a?Vn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const rx=et(0);function vc(e){const t=$e(e);return!Ua()||!t.visualViewport?rx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nx(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==$e(e)?!1:t}function _t(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Ka(e);let s=et(1);t&&(n?qe(n)&&(s=ir(n)):s=ir(e));const i=nx(a,r,n)?vc(a):et(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const m=$e(a),g=n&&qe(n)?$e(n):n;let h=m,v=xa(h);for(;v&&n&&g!==h;){const x=ir(v),b=v.getBoundingClientRect(),y=He(v),w=b.left+(v.clientLeft+parseFloat(y.paddingLeft))*x.x,C=b.top+(v.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=w,u+=C,h=$e(v),v=xa(h)}}return Gn({width:f,height:p,x:c,y:u})}function co(e,t){const r=lo(e).scrollLeft;return t?t.left+r:_t(rt(e)).left+r}function hc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-co(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ox(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=rt(n),i=t?io(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},u=et(1);const f=et(0),p=tt(n);if((p||!p&&!a)&&((hr(n)!=="body"||Jr(s))&&(c=lo(n)),tt(n))){const g=_t(n);u=ir(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const m=s&&!p&&!a?hc(s,c):et(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function ax(e){return Array.from(e.getClientRects())}function sx(e){const t=rt(e),r=lo(e),n=e.ownerDocument.body,o=De(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=De(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+co(e);const i=-r.scrollTop;return He(n).direction==="rtl"&&(s+=De(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Mi=25;function ix(e,t){const r=$e(e),n=rt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const f=Ua();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=co(n);if(u<=0){const f=n.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-p.clientWidth-g);h<=Mi&&(a-=h)}else u<=Mi&&(a+=u);return{width:a,height:s,x:i,y:c}}const lx=new Set(["absolute","fixed"]);function cx(e,t){const r=_t(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=tt(e)?ir(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:s,height:i,x:c,y:u}}function Di(e,t,r){let n;if(t==="viewport")n=ix(e,r);else if(t==="document")n=sx(rt(e));else if(qe(t))n=cx(t,r);else{const o=vc(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gn(n)}function xc(e,t){const r=ht(e);return r===t||!qe(r)||cr(r)?!1:He(r).position==="fixed"||xc(r,t)}function ux(e,t){const r=t.get(e);if(r)return r;let n=zr(e,[],!1).filter(i=>qe(i)&&hr(i)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?ht(e):e;for(;qe(s)&&!cr(s);){const i=He(s),c=Ha(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&lx.has(o.position)||Jr(s)&&!c&&xc(e,s))?n=n.filter(f=>f!==s):o=i,s=ht(s)}return t.set(e,n),n}function dx(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?io(t)?[]:ux(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((u,f)=>{const p=Di(t,f,o);return u.top=De(p.top,u.top),u.right=vt(p.right,u.right),u.bottom=vt(p.bottom,u.bottom),u.left=De(p.left,u.left),u},Di(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function fx(e){const{width:t,height:r}=gc(e);return{width:t,height:r}}function px(e,t,r){const n=tt(t),o=rt(t),a=r==="fixed",s=_t(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=et(0);function u(){c.x=co(o)}if(n||!n&&!a)if((hr(t)!=="body"||Jr(o))&&(i=lo(t)),n){const g=_t(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?hc(o,i):et(0),p=s.left+i.scrollLeft-c.x-f.x,m=s.top+i.scrollTop-c.y-f.y;return{x:p,y:m,width:s.width,height:s.height}}function Yo(e){return He(e).position==="static"}function $i(e,t){if(!tt(e)||He(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rt(e)===r&&(r=r.ownerDocument.body),r}function bc(e,t){const r=$e(e);if(io(e))return r;if(!tt(e)){let o=ht(e);for(;o&&!cr(o);){if(qe(o)&&!Yo(o))return o;o=ht(o)}return r}let n=$i(e,t);for(;n&&Yh(n)&&Yo(n);)n=$i(n,t);return n&&cr(n)&&Yo(n)&&!Ha(n)?r:n||ex(e)||r}const mx=async function(e){const t=this.getOffsetParent||bc,r=this.getDimensions,n=await r(e.floating);return{reference:px(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gx(e){return He(e).direction==="rtl"}const vx={convertOffsetParentRelativeRectToViewportRelativeRect:ox,getDocumentElement:rt,getClippingRect:dx,getOffsetParent:bc,getElementRects:mx,getClientRects:ax,getDimensions:fx,getScale:ir,isElement:qe,isRTL:gx};function yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hx(e,t){let r=null,n;const o=rt(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(i||t(),!m||!g)return;const h=kn(p),v=kn(o.clientWidth-(f+m)),x=kn(o.clientHeight-(p+g)),b=kn(f),w={rootMargin:-h+"px "+-v+"px "+-x+"px "+-b+"px",threshold:De(0,vt(1,c))||1};let C=!0;function R(j){const k=j[0].intersectionRatio;if(k!==c){if(!C)return s();k?s(!1,k):n=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!yc(u,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(e)}return s(!0),a}function xx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Ka(e),f=o||a?[...u?zr(u):[],...zr(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const p=u&&i?hx(u,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let h,v=c?_t(e):null;c&&x();function x(){const b=_t(e);v&&!yc(v,b)&&r(),v=b,h=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),p==null||p(),(b=g)==null||b.disconnect(),g=null,c&&cancelAnimationFrame(h)}}const bx=Wh,yx=zh,wx=Vh,Cx=Hh,Sx=Bh,Li=Fh,Ex=qh,Rx=(e,t,r)=>{const n=new Map,o={platform:vx,...r},a={...o.platform,_c:n};return Lh(e,t,{...o,platform:a})};var kx=typeof document<"u",Nx=function(){},On=kx?E.useLayoutEffect:Nx;function Wn(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Wn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Wn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fi(e,t){const r=wc(e);return Math.round(t*r)/r}function Xo(e){const t=d.useRef(e);return On(()=>{t.current=e}),t}function jx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(n);Wn(m,n)||g(n);const[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useCallback(T=>{T!==j.current&&(j.current=T,v(T))},[]),w=d.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),C=a||h,R=s||x,j=d.useRef(null),k=d.useRef(null),N=d.useRef(f),$=c!=null,B=Xo(c),G=Xo(o),Q=Xo(u),ee=d.useCallback(()=>{if(!j.current||!k.current)return;const T={placement:t,strategy:r,middleware:m};G.current&&(T.platform=G.current),Rx(j.current,k.current,T).then(O=>{const U={...O,isPositioned:Q.current!==!1};W.current&&!Wn(N.current,U)&&(N.current=U,no.flushSync(()=>{p(U)}))})},[m,t,r,G,Q]);On(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const W=d.useRef(!1);On(()=>(W.current=!0,()=>{W.current=!1}),[]),On(()=>{if(C&&(j.current=C),R&&(k.current=R),C&&R){if(B.current)return B.current(C,R,ee);ee()}},[C,R,ee,B,$]);const M=d.useMemo(()=>({reference:j,floating:k,setReference:y,setFloating:w}),[y,w]),_=d.useMemo(()=>({reference:C,floating:R}),[C,R]),D=d.useMemo(()=>{const T={position:r,left:0,top:0};if(!_.floating)return T;const O=Fi(_.floating,f.x),U=Fi(_.floating,f.y);return i?{...T,transform:"translate("+O+"px, "+U+"px)",...wc(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:U}},[r,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:ee,refs:M,elements:_,floatingStyles:D}),[f,ee,M,_,D])}const Px=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Li({element:n.current,padding:o}).fn(r):{}:n?Li({element:n,padding:o}).fn(r):{}}}},Tx=(e,t)=>({...bx(e),options:[e,t]}),Ix=(e,t)=>({...yx(e),options:[e,t]}),Ax=(e,t)=>({...Ex(e),options:[e,t]}),_x=(e,t)=>({...wx(e),options:[e,t]}),Ox=(e,t)=>({...Cx(e),options:[e,t]}),Mx=(e,t)=>({...Sx(e),options:[e,t]}),Dx=(e,t)=>({...Px(e),options:[e,t]});var $x="Arrow",Cc=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return l.jsx(ne.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cc.displayName=$x;var Lx=Cc;function uo(e){const[t,r]=d.useState(void 0);return Ne(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ya="Popper",[Sc,bt]=je(Ya),[Fx,Ec]=Sc(Ya),Rc=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return l.jsx(Fx,{scope:t,anchor:n,onAnchorChange:o,children:r})};Rc.displayName=Ya;var kc="PopperAnchor",Nc=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Ec(kc,r),s=d.useRef(null),i=ce(t,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||s.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(ne.div,{...o,ref:i})});Nc.displayName=kc;var Xa="PopperContent",[Vx,Bx]=Sc(Xa),jc=d.forwardRef((e,t)=>{var A,z,Z,H,te,L;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:h,...v}=e,x=Ec(Xa,r),[b,y]=d.useState(null),w=ce(t,se=>y(se)),[C,R]=d.useState(null),j=uo(C),k=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,$=n+(a!=="center"?"-"+a:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},G=Array.isArray(u)?u:[u],Q=G.length>0,ee={padding:B,boundary:G.filter(Wx),altBoundary:Q},{refs:W,floatingStyles:M,placement:_,isPositioned:D,middlewareData:T}=jx({strategy:"fixed",placement:$,whileElementsMounted:(...se)=>xx(...se,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Tx({mainAxis:o+N,alignmentAxis:s}),c&&Ix({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ax():void 0,...ee}),c&&_x({...ee}),Ox({...ee,apply:({elements:se,rects:le,availableWidth:me,availableHeight:ve})=>{const{width:Ee,height:Le}=le.reference,Re=se.floating.style;Re.setProperty("--radix-popper-available-width",`${me}px`),Re.setProperty("--radix-popper-available-height",`${ve}px`),Re.setProperty("--radix-popper-anchor-width",`${Ee}px`),Re.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),C&&Dx({element:C,padding:i}),zx({arrowWidth:k,arrowHeight:N}),m&&Mx({strategy:"referenceHidden",...ee})]}),[O,U]=Ic(_),J=ze(h);Ne(()=>{D&&(J==null||J())},[D,J]);const I=(A=T.arrow)==null?void 0:A.x,q=(z=T.arrow)==null?void 0:z.y,X=((Z=T.arrow)==null?void 0:Z.centerOffset)!==0,[Y,F]=d.useState();return Ne(()=>{b&&F(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(H=T.transformOrigin)==null?void 0:H.x,(te=T.transformOrigin)==null?void 0:te.y].join(" "),...((L=T.hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Vx,{scope:r,placedSide:O,onArrowChange:R,arrowX:I,arrowY:q,shouldHideArrow:X,children:l.jsx(ne.div,{"data-side":O,"data-align":U,...v,ref:w,style:{...v.style,animation:D?void 0:"none"}})})})});jc.displayName=Xa;var Pc="PopperArrow",Gx={top:"bottom",right:"left",bottom:"top",left:"right"},Tc=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Bx(Pc,n),s=Gx[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Lx,{...o,ref:r,style:{...o.style,display:"block"}})})});Tc.displayName=Pc;function Wx(e){return e!==null}var zx=e=>({name:"transformOrigin",options:e,fn(t){var x,b,y;const{placement:r,rects:n,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=Ic(r),p={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let h="",v="";return u==="bottom"?(h=s?p:`${m}px`,v=`${-c}px`):u==="top"?(h=s?p:`${m}px`,v=`${n.floating.height+c}px`):u==="right"?(h=`${-c}px`,v=s?p:`${g}px`):u==="left"&&(h=`${n.floating.width+c}px`,v=s?p:`${g}px`),{data:{x:h,y:v}}}});function Ic(e){const[t,r="center"]=e.split("-");return[t,r]}var Qr=Rc,en=Nc,fo=jc,po=Tc,qx="Portal",xr=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);Ne(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Zr.createPortal(l.jsx(ne.div,{...n,ref:t}),s):null});xr.displayName=qx;function Hx(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Pe=e=>{const{present:t,children:r}=e,n=Ux(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ce(n.ref,Kx(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Pe.displayName="Presence";function Ux(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=Hx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Nn(n.current);a.current=i==="mounted"?u:"none"},[i]),Ne(()=>{const u=n.current,f=o.current;if(f!==e){const m=a.current,g=Nn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ne(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const v=Nn(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(a.current=Nn(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Nn(e){return(e==null?void 0:e.animationName)||"none"}function Kx(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Yx=Symbol("radix.slottable");function Xx(e){const t=({children:r})=>l.jsx(l.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Yx,t}var Zx=d[" useInsertionEffect ".trim().toString()]||Ne;function ke({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,s]=Jx({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=d.useCallback(f=>{var p;if(i){const m=Qx(f)?f(e):f;m!==e&&((p=s.current)==null||p.call(s,m))}else a(f)},[i,e,a,s]);return[c,u]}function Jx({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return Zx(()=>{a.current=t},[t]),d.useEffect(()=>{var s;o.current!==r&&((s=a.current)==null||s.call(a,r),o.current=r)},[r,o]),[r,n,a]}function Qx(e){return typeof e=="function"}var Ac=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eb="VisuallyHidden",_c=d.forwardRef((e,t)=>l.jsx(ne.span,{...e,ref:t,style:{...Ac,...e.style}}));_c.displayName=eb;var tb=_c,[mo]=je("Tooltip",[bt]),go=bt(),Oc="TooltipProvider",rb=700,ba="tooltip.open",[nb,Za]=mo(Oc),Mc=e=>{const{__scopeTooltip:t,delayDuration:r=rb,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,s=d.useRef(!0),i=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(nb,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:d.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Mc.displayName=Oc;var qr="Tooltip",[ob,tn]=mo(qr),Dc=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=Za(qr,e.__scopeTooltip),u=go(t),[f,p]=d.useState(null),m=be(),g=d.useRef(0),h=s??c.disableHoverableContent,v=i??c.delayDuration,x=d.useRef(!1),[b,y]=ke({prop:n,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(ba))):c.onClose(),a==null||a(k)},caller:qr}),w=d.useMemo(()=>b?x.current?"delayed-open":"instant-open":"closed",[b]),C=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x.current=!1,y(!0)},[y]),R=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),j=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,y(!0),g.current=0},v)},[v,y]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(Qr,{...u,children:l.jsx(ob,{scope:t,contentId:m,open:b,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?j():C()},[c.isOpenDelayedRef,j,C]),onTriggerLeave:d.useCallback(()=>{h?R():(window.clearTimeout(g.current),g.current=0)},[R,h]),onOpen:C,onClose:R,disableHoverableContent:h,children:r})})};Dc.displayName=qr;var ya="TooltipTrigger",$c=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=tn(ya,r),a=Za(ya,r),s=go(r),i=d.useRef(null),c=ce(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(en,{asChild:!0,...s,children:l.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:K(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});$c.displayName=ya;var Ja="TooltipPortal",[ab,sb]=mo(Ja,{forceMount:void 0}),Lc=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=tn(Ja,t);return l.jsx(ab,{scope:t,forceMount:r,children:l.jsx(Pe,{present:r||a.open,children:l.jsx(xr,{asChild:!0,container:o,children:n})})})};Lc.displayName=Ja;var ur="TooltipContent",Fc=d.forwardRef((e,t)=>{const r=sb(ur,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=tn(ur,e.__scopeTooltip);return l.jsx(Pe,{present:n||s.open,children:s.disableHoverableContent?l.jsx(Vc,{side:o,...a,ref:t}):l.jsx(ib,{side:o,...a,ref:t})})}),ib=d.forwardRef((e,t)=>{const r=tn(ur,e.__scopeTooltip),n=Za(ur,e.__scopeTooltip),o=d.useRef(null),a=ce(t,o),[s,i]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,m=d.useCallback(()=>{i(null),p(!1)},[p]),g=d.useCallback((h,v)=>{const x=h.currentTarget,b={x:h.clientX,y:h.clientY},y=db(b,x.getBoundingClientRect()),w=fb(b,y),C=pb(v.getBoundingClientRect()),R=gb([...w,...C]);i(R),p(!0)},[p]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&f){const h=x=>g(x,f),v=x=>g(x,c);return c.addEventListener("pointerleave",h),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",v)}}},[c,f,g,m]),d.useEffect(()=>{if(s){const h=v=>{const x=v.target,b={x:v.clientX,y:v.clientY},y=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),w=!mb(b,s);y?m():w&&(m(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,f,s,u,m]),l.jsx(Vc,{...e,ref:a})}),[lb,cb]=mo(qr,{isInside:!1}),ub=Xx("TooltipContent"),Vc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=tn(ur,r),u=go(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(ba,f),()=>document.removeEventListener(ba,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),l.jsx(gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(fo,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(ub,{children:n}),l.jsx(lb,{scope:r,isInside:!0,children:l.jsx(tb,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Fc.displayName=ur;var Bc="TooltipArrow",Gc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=go(r);return cb(Bc,r).isInside?null:l.jsx(po,{...o,...n,ref:t})});Gc.displayName=Bc;function db(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function fb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function pb(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function mb(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,f=i.y,p=c.x,m=c.y;f>n!=m>n&&r<(p-u)*(n-f)/(m-f)+u&&(o=!o)}return o}function gb(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),vb(t)}function vb(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var hb=Mc,xb=Dc,bb=$c,yb=Lc,wb=Fc,Cb=Gc;function Wc({delayDuration:e=0,...t}){return l.jsx(hb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Qa({...e}){return l.jsx(Wc,{children:l.jsx(xb,{"data-slot":"tooltip",...e})})}function es({...e}){return l.jsx(bb,{"data-slot":"tooltip-trigger",...e})}function ts({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return l.jsx(yb,{children:l.jsxs(wb,{"data-slot":"tooltip-content",sideOffset:t,className:P("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&l.jsx(Cb,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const zc=Bt("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] focus:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-hover)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-8 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Be=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,icon:s,iconPosition:i="left",tooltip:c,tooltipProps:u,...f},p)=>{const m={lg:"w-[18px] h-[18px]",default:"w-[18px] h-[18px]",sm:"w-[18px] h-[18px]",xs:"w-3.5 h-3.5",icon:"w-[18px] h-[18px]","icon-sm":"w-3.5 h-3.5","icon-md":"w-[18px] h-[18px]","icon-lg":"w-[18px] h-[18px]"}[r??"default"],g=s&&l.jsx(s,{className:P(m,"transition-opacity",{"mr-2":o&&i==="left","ml-2":o&&i!=="left","opacity-50":a||n})}),h=l.jsxs("button",{className:P(zc({variant:t,size:r,className:e})),ref:p,disabled:a||n,...f,children:[i==="left"&&g,o,i==="right"&&g,n&&l.jsx(sc,{className:P("ml-2 animate-spin",m)})]});return c?l.jsxs(Qa,{children:[l.jsx(es,{asChild:!0,children:l.jsx("span",{className:"inline-flex",children:h})}),l.jsx(ts,{...u,children:c})]}):h});Be.displayName="Button";const Sb=Bt("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:bg-[var(--fill-input-neutral-idle)] disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:cursor-default md:text-sm dark:border-input-neutral-idle dark:bg-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700 [&[readonly]]:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:border-0 [&[readonly]]:text-[var(--text-input-neutral-idle)] [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-[var(--border-input-neutral-idle)] [&[readonly][disabled]]:opacity-100 [&[readonly][disabled]]:cursor-default [&[readonly][disabled]]:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:border-0 [&[readonly][disabled]]:text-[var(--text-input-neutral-idle)] [&[readonly][disabled]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:hover:border-0 [&[readonly][disabled]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus:border-0 [&[readonly][disabled]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus-visible:border-0",{variants:{variant:{default:"dark:focus-visible:bg-fill-input-neutral-idle dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-purple-muted-700 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-0 [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-0 [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-0",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-[--var(text-input-neutral-idle)] placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70",ghost:"bg-transparent border-purple-muted-600 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [:not(:placeholder-shown)]:bg-transparent"}},defaultVariants:{variant:"default"}}),rn=d.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>l.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:P(Sb({variant:t,className:e})),...o}));rn.displayName="Input";function Vi(e,[t,r]){return Math.min(r,Math.max(t,e))}function Bi(e){const t=Eb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(kb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Eb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=jb(o),i=Nb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rb=Symbol("radix.slottable");function kb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rb}function Nb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function jb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function vo(e){const t=e+"CollectionProvider",[r,n]=je(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:b}=v,y=E.useRef(null),w=E.useRef(new Map).current;return l.jsx(o,{scope:x,itemMap:w,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",c=Bi(i),u=E.forwardRef((v,x)=>{const{scope:b,children:y}=v,w=a(i,b),C=ce(x,w.collectionRef);return l.jsx(c,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Bi(f),g=E.forwardRef((v,x)=>{const{scope:b,children:y,...w}=v,C=E.useRef(null),R=ce(x,C),j=a(f,b);return E.useEffect(()=>(j.itemMap.set(C,{ref:C,...w}),()=>void j.itemMap.delete(C))),l.jsx(m,{[p]:"",ref:R,children:y})});g.displayName=f;function h(v){const x=a(e+"CollectionConsumer",v);return E.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,k)=>w.indexOf(j.ref.current)-w.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},h,n]}var Pb=d.createContext(void 0);function Gt(e){const t=d.useContext(Pb);return e||t||"ltr"}var Zo=0;function ho(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gi()),document.body.insertAdjacentElement("beforeend",e[1]??Gi()),Zo++,()=>{Zo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zo--}},[])}function Gi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jo="focusScope.autoFocusOnMount",Qo="focusScope.autoFocusOnUnmount",Wi={bubbles:!1,cancelable:!0},Tb="FocusScope",nn=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=ze(o),f=ze(a),p=d.useRef(null),m=ce(t,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(w){if(g.paused||!i)return;const C=w.target;i.contains(C)?p.current=C:pt(p.current,{select:!0})},x=function(w){if(g.paused||!i)return;const C=w.relatedTarget;C!==null&&(i.contains(C)||pt(p.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&pt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),y.disconnect()}}},[n,i,g.paused]),d.useEffect(()=>{if(i){qi.add(g);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(Jo,Wi);i.addEventListener(Jo,u),i.dispatchEvent(b),b.defaultPrevented||(Ib(Db(qc(i)),{select:!0}),document.activeElement===v&&pt(i))}return()=>{i.removeEventListener(Jo,u),setTimeout(()=>{const b=new CustomEvent(Qo,Wi);i.addEventListener(Qo,f),i.dispatchEvent(b),b.defaultPrevented||pt(v??document.body,{select:!0}),i.removeEventListener(Qo,f),qi.remove(g)},0)}}},[i,u,f,g]);const h=d.useCallback(v=>{if(!r&&!n||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const y=v.currentTarget,[w,C]=Ab(y);w&&C?!v.shiftKey&&b===C?(v.preventDefault(),r&&pt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),r&&pt(C,{select:!0})):b===y&&v.preventDefault()}},[r,n,g.paused]);return l.jsx(ne.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});nn.displayName=Tb;function Ib(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pt(n,{select:t}),document.activeElement!==r)return}function Ab(e){const t=qc(e),r=zi(t,e),n=zi(t.reverse(),e);return[r,n]}function qc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zi(e,t){for(const r of e)if(!_b(r,{upTo:t}))return r}function _b(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ob(e){return e instanceof HTMLInputElement&&"select"in e}function pt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Ob(e)&&t&&e.select()}}var qi=Mb();function Mb(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Hi(e,t),e.unshift(t)},remove(t){var r;e=Hi(e,t),(r=e[0])==null||r.resume()}}}function Hi(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Db(e){return e.filter(t=>t.tagName!=="A")}function $b(e){const t=Lb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(Vb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Lb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=Gb(o),i=Bb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fb=Symbol("radix.slottable");function Vb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fb}function Bb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Gb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xo(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Wb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,jn=new WeakMap,Pn={},ea=0,Hc=function(e){return e&&(e.host||Hc(e.parentNode))},zb=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Hc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},qb=function(e,t,r,n){var o=zb(t,Array.isArray(e)?e:[e]);Pn[r]||(Pn[r]=new WeakMap);var a=Pn[r],s=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(i.has(m))f(m);else try{var g=m.getAttribute(n),h=g!==null&&g!=="false",v=(Qt.get(m)||0)+1,x=(a.get(m)||0)+1;Qt.set(m,v),a.set(m,x),s.push(m),v===1&&h&&jn.set(m,!0),x===1&&m.setAttribute(r,"true"),h||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return f(t),i.clear(),ea++,function(){s.forEach(function(p){var m=Qt.get(p)-1,g=a.get(p)-1;Qt.set(p,m),a.set(p,g),m||(jn.has(p)||p.removeAttribute(n),jn.delete(p)),g||p.removeAttribute(r)}),ea--,ea||(Qt=new WeakMap,Qt=new WeakMap,jn=new WeakMap,Pn={})}},bo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Wb(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),qb(n,o,r,"aria-hidden")):function(){return null}},Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Je.apply(this,arguments)};function Uc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Hb(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Mn="right-scroll-bar-position",Dn="width-before-scroll-bar",Ub="with-scroll-bars-hidden",Kb="--removed-body-scroll-bar-size";function ta(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yb(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Xb=typeof window<"u"?d.useLayoutEffect:d.useEffect,Ui=new WeakMap;function Zb(e,t){var r=Yb(null,function(n){return e.forEach(function(o){return ta(o,n)})});return Xb(function(){var n=Ui.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||ta(i,null)}),a.forEach(function(i){o.has(i)||ta(i,s)})}Ui.set(r,e)},[e]),r}function Jb(e){return e}function Qb(e,t){t===void 0&&(t=Jb);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function ey(e){e===void 0&&(e={});var t=Qb(null);return t.options=Je({async:!0,ssr:!1},e),t}var Kc=function(e){var t=e.sideCar,r=Uc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Je({},r))};Kc.isSideCarExport=!0;function ty(e,t){return e.useMedium(t),Kc}var Yc=ey(),ra=function(){},yo=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:ra,onWheelCapture:ra,onTouchMoveCapture:ra}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,h=e.noIsolation,v=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,C=Uc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,j=Zb([r,t]),k=Je(Je({},C),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:Yc,removeScrollBar:u,shards:p,noRelative:g,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:w}),s?d.cloneElement(d.Children.only(i),Je(Je({},k),{ref:j})):d.createElement(y,Je({},k,{className:c,ref:j}),i))});yo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yo.classNames={fullWidth:Dn,zeroRight:Mn};var ry=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ny(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ry();return t&&e.setAttribute("nonce",t),e}function oy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ay(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sy=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ny())&&(oy(t,r),ay(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iy=function(){var e=sy();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Xc=function(){var e=iy(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},ly={left:0,top:0,right:0,gap:0},na=function(e){return parseInt(e||"",10)||0},cy=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[na(r),na(n),na(o)]},uy=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ly;var t=cy(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},dy=Xc(),lr="data-scroll-locked",fy=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
150
|
+
*/const ih=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ao=Ce("x",ih);function K(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function ki(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ae(...e){return t=>{let r=!1;const n=e.map(o=>{const a=ki(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():ki(e[o],null)}}}}function ce(...e){return d.useCallback(Ae(...e),e)}function lh(e,t){const r=d.createContext(t),n=a=>{const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return l.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function je(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,ch(o,...t)]}function ch(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function uh(e){const t=dh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(ph);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function dh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=gh(o),i=mh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var fh=Symbol("radix.slottable");function ph(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===fh}function mh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function gh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var vh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ne=vh.reduce((e,t)=>{const r=uh(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function lc(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}function ze(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function hh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var xh="DismissableLayer",ga="dismissableLayer.update",bh="dismissableLayer.pointerDownOutside",yh="dismissableLayer.focusOutside",Ni,cc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(cc),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),h=ce(t,k=>p(k)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),y=f?v.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,C=y>=b,R=Sh(k=>{const N=k.target,$=[...u.branches].some(B=>B.contains(N));!C||$||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},m),j=Eh(k=>{const N=k.target;[...u.branches].some(B=>B.contains(N))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},m);return hh(k=>{y===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},m),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ni=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ji(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ni)}},[f,m,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ji())},[f,u]),d.useEffect(()=>{const k=()=>g({});return document.addEventListener(ga,k),()=>document.removeEventListener(ga,k)},[]),l.jsx(ne.div,{...c,ref:h,style:{pointerEvents:w?C?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,j.onFocusCapture),onBlurCapture:K(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,R.onPointerDownCapture)})});gr.displayName=xh;var wh="DismissableLayerBranch",Ch=d.forwardRef((e,t)=>{const r=d.useContext(cc),n=d.useRef(null),o=ce(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(ne.div,{...e,ref:o})});Ch.displayName=wh;function Sh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){uc(bh,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Eh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&uc(yh,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function ji(){const e=new CustomEvent(ga);document.dispatchEvent(e)}function uc(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?lc(o,a):o.dispatchEvent(a)}var Ne=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Rh=d[" useId ".trim().toString()]||(()=>{}),kh=0;function be(e){const[t,r]=d.useState(Rh());return Ne(()=>{r(n=>n??String(kh++))},[e]),t?`radix-${t}`:""}const Nh=["top","right","bottom","left"],vt=Math.min,De=Math.max,Vn=Math.round,kn=Math.floor,et=e=>({x:e,y:e}),jh={left:"right",right:"left",bottom:"top",top:"bottom"},Ph={start:"end",end:"start"};function va(e,t,r){return De(e,vt(t,r))}function lt(e,t){return typeof e=="function"?e(t):e}function ct(e){return e.split("-")[0]}function vr(e){return e.split("-")[1]}function Wa(e){return e==="x"?"y":"x"}function za(e){return e==="y"?"height":"width"}const Th=new Set(["top","bottom"]);function Qe(e){return Th.has(ct(e))?"y":"x"}function qa(e){return Wa(Qe(e))}function Ih(e,t,r){r===void 0&&(r=!1);const n=vr(e),o=qa(e),a=za(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function Ah(e){const t=Bn(e);return[ha(e),t,ha(t)]}function ha(e){return e.replace(/start|end/g,t=>Ph[t])}const Pi=["left","right"],Ti=["right","left"],_h=["top","bottom"],Oh=["bottom","top"];function Mh(e,t,r){switch(e){case"top":case"bottom":return r?t?Ti:Pi:t?Pi:Ti;case"left":case"right":return t?_h:Oh;default:return[]}}function Dh(e,t,r,n){const o=vr(e);let a=Mh(ct(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ha)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>jh[t])}function $h(e){return{top:0,right:0,bottom:0,left:0,...e}}function dc(e){return typeof e!="number"?$h(e):{top:e,right:e,bottom:e,left:e}}function Gn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Ii(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=qa(t),i=za(s),c=ct(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:p};break;case"left":g={x:n.x-o.width,y:p};break;default:g={x:n.x,y:n.y}}switch(vr(t)){case"start":g[s]-=m*(r&&u?-1:1);break;case"end":g[s]+=m*(r&&u?-1:1);break}return g}const Lh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Ii(u,n,c),m=n,g={},h=0;for(let v=0;v<i.length;v++){const{name:x,fn:b}=i[v],{x:y,y:w,data:C,reset:R}=await b({x:f,y:p,initialPlacement:n,placement:m,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=y??f,p=w??p,g={...g,[x]:{...g[x],...C}},R&&h<=50&&(h++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=Ii(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}};async function Wr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=lt(t,e),h=dc(g),x=i[m?p==="floating"?"reference":"floating":p],b=Gn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),y=p==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),C=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Gn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:c}):y);return{top:(b.top-R.top+h.top)/C.y,bottom:(R.bottom-b.bottom+h.bottom)/C.y,left:(b.left-R.left+h.left)/C.x,right:(R.right-b.right+h.right)/C.x}}const Fh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=lt(e,t)||{};if(u==null)return{};const p=dc(f),m={x:r,y:n},g=qa(o),h=za(g),v=await s.getDimensions(u),x=g==="y",b=x?"top":"left",y=x?"bottom":"right",w=x?"clientHeight":"clientWidth",C=a.reference[h]+a.reference[g]-m[g]-a.floating[h],R=m[g]-a.reference[g],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=j?j[w]:0;(!k||!await(s.isElement==null?void 0:s.isElement(j)))&&(k=i.floating[w]||a.floating[h]);const N=C/2-R/2,$=k/2-v[h]/2-1,B=vt(p[b],$),G=vt(p[y],$),Q=B,ee=k-v[h]-G,W=k/2-v[h]/2+N,M=va(Q,W,ee),_=!c.arrow&&vr(o)!=null&&W!==M&&a.reference[h]/2-(W<Q?B:G)-v[h]/2<0,D=_?W<Q?W-Q:W-ee:0;return{[g]:m[g]+D,data:{[g]:M,centerOffset:W-M-D,..._&&{alignmentOffset:D}},reset:_}}}),Vh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...x}=lt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=ct(o),y=Qe(i),w=ct(i)===i,C=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(w||!v?[Bn(i)]:Ah(i)),j=h!=="none";!m&&j&&R.push(...Dh(i,v,h,C));const k=[i,...R],N=await Wr(t,x),$=[];let B=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(N[b]),p){const W=Ih(o,s,C);$.push(N[W[0]],N[W[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every(W=>W<=0)){var G,Q;const W=(((G=a.flip)==null?void 0:G.index)||0)+1,M=k[W];if(M&&(!(p==="alignment"?y!==Qe(M):!1)||B.every(T=>Qe(T.placement)===y?T.overflows[0]>0:!0)))return{data:{index:W,overflows:B},reset:{placement:M}};let _=(Q=B.filter(D=>D.overflows[0]<=0).sort((D,T)=>D.overflows[1]-T.overflows[1])[0])==null?void 0:Q.placement;if(!_)switch(g){case"bestFit":{var ee;const D=(ee=B.filter(T=>{if(j){const O=Qe(T.placement);return O===y||O==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(O=>O>0).reduce((O,U)=>O+U,0)]).sort((T,O)=>T[1]-O[1])[0])==null?void 0:ee[0];D&&(_=D);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Ai(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _i(e){return Nh.some(t=>e[t]>=0)}const Bh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=lt(e,t);switch(n){case"referenceHidden":{const a=await Wr(t,{...o,elementContext:"reference"}),s=Ai(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:_i(s)}}}case"escaped":{const a=await Wr(t,{...o,altBoundary:!0}),s=Ai(a,r.floating);return{data:{escapedOffsets:s,escaped:_i(s)}}}default:return{}}}}},fc=new Set(["left","top"]);async function Gh(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ct(r),i=vr(r),c=Qe(r)==="y",u=fc.has(s)?-1:1,f=a&&c?-1:1,p=lt(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(g=i==="end"?h*-1:h),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Wh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await Gh(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},zh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:x=>{let{x:b,y}=x;return{x:b,y}}},...c}=lt(e,t),u={x:r,y:n},f=await Wr(t,c),p=Qe(ct(o)),m=Wa(p);let g=u[m],h=u[p];if(a){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=g+f[x],w=g-f[b];g=va(y,g,w)}if(s){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=h+f[x],w=h-f[b];h=va(y,h,w)}const v=i.fn({...t,[m]:g,[p]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[p]:s}}}}}},qh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=lt(e,t),f={x:r,y:n},p=Qe(o),m=Wa(p);let g=f[m],h=f[p];const v=lt(i,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=m==="y"?"height":"width",C=a.reference[m]-a.floating[w]+x.mainAxis,R=a.reference[m]+a.reference[w]-x.mainAxis;g<C?g=C:g>R&&(g=R)}if(u){var b,y;const w=m==="y"?"width":"height",C=fc.has(ct(o)),R=a.reference[p]-a.floating[w]+(C&&((b=s.offset)==null?void 0:b[p])||0)+(C?0:x.crossAxis),j=a.reference[p]+a.reference[w]+(C?0:((y=s.offset)==null?void 0:y[p])||0)-(C?x.crossAxis:0);h<R?h=R:h>j&&(h=j)}return{[m]:g,[p]:h}}}},Hh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=lt(e,t),f=await Wr(t,u),p=ct(o),m=vr(o),g=Qe(o)==="y",{width:h,height:v}=a.floating;let x,b;p==="top"||p==="bottom"?(x=p,b=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=p,x=m==="end"?"top":"bottom");const y=v-f.top-f.bottom,w=h-f.left-f.right,C=vt(v-f[x],y),R=vt(h-f[b],w),j=!t.middlewareData.shift;let k=C,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=y),j&&!m){const B=De(f.left,0),G=De(f.right,0),Q=De(f.top,0),ee=De(f.bottom,0);g?N=h-2*(B!==0||G!==0?B+G:De(f.left,f.right)):k=v-2*(Q!==0||ee!==0?Q+ee:De(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:k});const $=await s.getDimensions(i.floating);return h!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function so(){return typeof window<"u"}function hr(e){return pc(e)?(e.nodeName||"").toLowerCase():"#document"}function $e(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function rt(e){var t;return(t=(pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pc(e){return so()?e instanceof Node||e instanceof $e(e).Node:!1}function qe(e){return so()?e instanceof Element||e instanceof $e(e).Element:!1}function tt(e){return so()?e instanceof HTMLElement||e instanceof $e(e).HTMLElement:!1}function Oi(e){return!so()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof $e(e).ShadowRoot}const Uh=new Set(["inline","contents"]);function Jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Uh.has(o)}const Kh=new Set(["table","td","th"]);function Yh(e){return Kh.has(hr(e))}const Xh=[":popover-open",":modal"];function io(e){return Xh.some(t=>{try{return e.matches(t)}catch{return!1}})}const Zh=["transform","translate","scale","rotate","perspective"],Jh=["transform","translate","scale","rotate","perspective","filter"],Qh=["paint","layout","strict","content"];function Ha(e){const t=Ua(),r=qe(e)?He(e):e;return Zh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||Jh.some(n=>(r.willChange||"").includes(n))||Qh.some(n=>(r.contain||"").includes(n))}function ex(e){let t=ht(e);for(;tt(t)&&!cr(t);){if(Ha(t))return t;if(io(t))return null;t=ht(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const tx=new Set(["html","body","#document"]);function cr(e){return tx.has(hr(e))}function He(e){return $e(e).getComputedStyle(e)}function lo(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ht(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Oi(e)&&e.host||rt(e);return Oi(t)?t.host:t}function mc(e){const t=ht(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&Jr(t)?t:mc(t)}function zr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=mc(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=$e(o);if(a){const i=xa(s);return t.concat(s,s.visualViewport||[],Jr(o)?o:[],i&&r?zr(i):[])}return t.concat(o,zr(o,[],r))}function xa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gc(e){const t=He(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Vn(r)!==a||Vn(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function Ka(e){return qe(e)?e:e.contextElement}function ir(e){const t=Ka(e);if(!tt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=gc(t);let s=(a?Vn(r.width):r.width)/n,i=(a?Vn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const rx=et(0);function vc(e){const t=$e(e);return!Ua()||!t.visualViewport?rx:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function nx(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==$e(e)?!1:t}function _t(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Ka(e);let s=et(1);t&&(n?qe(n)&&(s=ir(n)):s=ir(e));const i=nx(a,r,n)?vc(a):et(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const m=$e(a),g=n&&qe(n)?$e(n):n;let h=m,v=xa(h);for(;v&&n&&g!==h;){const x=ir(v),b=v.getBoundingClientRect(),y=He(v),w=b.left+(v.clientLeft+parseFloat(y.paddingLeft))*x.x,C=b.top+(v.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=w,u+=C,h=$e(v),v=xa(h)}}return Gn({width:f,height:p,x:c,y:u})}function co(e,t){const r=lo(e).scrollLeft;return t?t.left+r:_t(rt(e)).left+r}function hc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-co(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ox(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=rt(n),i=t?io(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},u=et(1);const f=et(0),p=tt(n);if((p||!p&&!a)&&((hr(n)!=="body"||Jr(s))&&(c=lo(n)),tt(n))){const g=_t(n);u=ir(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const m=s&&!p&&!a?hc(s,c):et(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function ax(e){return Array.from(e.getClientRects())}function sx(e){const t=rt(e),r=lo(e),n=e.ownerDocument.body,o=De(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=De(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+co(e);const i=-r.scrollTop;return He(n).direction==="rtl"&&(s+=De(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Mi=25;function ix(e,t){const r=$e(e),n=rt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const f=Ua();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=co(n);if(u<=0){const f=n.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-p.clientWidth-g);h<=Mi&&(a-=h)}else u<=Mi&&(a+=u);return{width:a,height:s,x:i,y:c}}const lx=new Set(["absolute","fixed"]);function cx(e,t){const r=_t(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=tt(e)?ir(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:s,height:i,x:c,y:u}}function Di(e,t,r){let n;if(t==="viewport")n=ix(e,r);else if(t==="document")n=sx(rt(e));else if(qe(t))n=cx(t,r);else{const o=vc(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gn(n)}function xc(e,t){const r=ht(e);return r===t||!qe(r)||cr(r)?!1:He(r).position==="fixed"||xc(r,t)}function ux(e,t){const r=t.get(e);if(r)return r;let n=zr(e,[],!1).filter(i=>qe(i)&&hr(i)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?ht(e):e;for(;qe(s)&&!cr(s);){const i=He(s),c=Ha(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&lx.has(o.position)||Jr(s)&&!c&&xc(e,s))?n=n.filter(f=>f!==s):o=i,s=ht(s)}return t.set(e,n),n}function dx(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?io(t)?[]:ux(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((u,f)=>{const p=Di(t,f,o);return u.top=De(p.top,u.top),u.right=vt(p.right,u.right),u.bottom=vt(p.bottom,u.bottom),u.left=De(p.left,u.left),u},Di(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function fx(e){const{width:t,height:r}=gc(e);return{width:t,height:r}}function px(e,t,r){const n=tt(t),o=rt(t),a=r==="fixed",s=_t(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=et(0);function u(){c.x=co(o)}if(n||!n&&!a)if((hr(t)!=="body"||Jr(o))&&(i=lo(t)),n){const g=_t(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?hc(o,i):et(0),p=s.left+i.scrollLeft-c.x-f.x,m=s.top+i.scrollTop-c.y-f.y;return{x:p,y:m,width:s.width,height:s.height}}function Yo(e){return He(e).position==="static"}function $i(e,t){if(!tt(e)||He(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return rt(e)===r&&(r=r.ownerDocument.body),r}function bc(e,t){const r=$e(e);if(io(e))return r;if(!tt(e)){let o=ht(e);for(;o&&!cr(o);){if(qe(o)&&!Yo(o))return o;o=ht(o)}return r}let n=$i(e,t);for(;n&&Yh(n)&&Yo(n);)n=$i(n,t);return n&&cr(n)&&Yo(n)&&!Ha(n)?r:n||ex(e)||r}const mx=async function(e){const t=this.getOffsetParent||bc,r=this.getDimensions,n=await r(e.floating);return{reference:px(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function gx(e){return He(e).direction==="rtl"}const vx={convertOffsetParentRelativeRectToViewportRelativeRect:ox,getDocumentElement:rt,getClippingRect:dx,getOffsetParent:bc,getElementRects:mx,getClientRects:ax,getDimensions:fx,getScale:ir,isElement:qe,isRTL:gx};function yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hx(e,t){let r=null,n;const o=rt(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(i||t(),!m||!g)return;const h=kn(p),v=kn(o.clientWidth-(f+m)),x=kn(o.clientHeight-(p+g)),b=kn(f),w={rootMargin:-h+"px "+-v+"px "+-x+"px "+-b+"px",threshold:De(0,vt(1,c))||1};let C=!0;function R(j){const k=j[0].intersectionRatio;if(k!==c){if(!C)return s();k?s(!1,k):n=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!yc(u,e.getBoundingClientRect())&&s(),C=!1}try{r=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(e)}return s(!0),a}function xx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Ka(e),f=o||a?[...u?zr(u):[],...zr(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const p=u&&i?hx(u,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let h,v=c?_t(e):null;c&&x();function x(){const b=_t(e);v&&!yc(v,b)&&r(),v=b,h=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),p==null||p(),(b=g)==null||b.disconnect(),g=null,c&&cancelAnimationFrame(h)}}const bx=Wh,yx=zh,wx=Vh,Cx=Hh,Sx=Bh,Li=Fh,Ex=qh,Rx=(e,t,r)=>{const n=new Map,o={platform:vx,...r},a={...o.platform,_c:n};return Lh(e,t,{...o,platform:a})};var kx=typeof document<"u",Nx=function(){},On=kx?E.useLayoutEffect:Nx;function Wn(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 r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Wn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Wn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Fi(e,t){const r=wc(e);return Math.round(t*r)/r}function Xo(e){const t=d.useRef(e);return On(()=>{t.current=e}),t}function jx(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(n);Wn(m,n)||g(n);const[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useCallback(T=>{T!==j.current&&(j.current=T,v(T))},[]),w=d.useCallback(T=>{T!==k.current&&(k.current=T,b(T))},[]),C=a||h,R=s||x,j=d.useRef(null),k=d.useRef(null),N=d.useRef(f),$=c!=null,B=Xo(c),G=Xo(o),Q=Xo(u),ee=d.useCallback(()=>{if(!j.current||!k.current)return;const T={placement:t,strategy:r,middleware:m};G.current&&(T.platform=G.current),Rx(j.current,k.current,T).then(O=>{const U={...O,isPositioned:Q.current!==!1};W.current&&!Wn(N.current,U)&&(N.current=U,no.flushSync(()=>{p(U)}))})},[m,t,r,G,Q]);On(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(T=>({...T,isPositioned:!1})))},[u]);const W=d.useRef(!1);On(()=>(W.current=!0,()=>{W.current=!1}),[]),On(()=>{if(C&&(j.current=C),R&&(k.current=R),C&&R){if(B.current)return B.current(C,R,ee);ee()}},[C,R,ee,B,$]);const M=d.useMemo(()=>({reference:j,floating:k,setReference:y,setFloating:w}),[y,w]),_=d.useMemo(()=>({reference:C,floating:R}),[C,R]),D=d.useMemo(()=>{const T={position:r,left:0,top:0};if(!_.floating)return T;const O=Fi(_.floating,f.x),U=Fi(_.floating,f.y);return i?{...T,transform:"translate("+O+"px, "+U+"px)",...wc(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:U}},[r,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:ee,refs:M,elements:_,floatingStyles:D}),[f,ee,M,_,D])}const Px=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Li({element:n.current,padding:o}).fn(r):{}:n?Li({element:n,padding:o}).fn(r):{}}}},Tx=(e,t)=>({...bx(e),options:[e,t]}),Ix=(e,t)=>({...yx(e),options:[e,t]}),Ax=(e,t)=>({...Ex(e),options:[e,t]}),_x=(e,t)=>({...wx(e),options:[e,t]}),Ox=(e,t)=>({...Cx(e),options:[e,t]}),Mx=(e,t)=>({...Sx(e),options:[e,t]}),Dx=(e,t)=>({...Px(e),options:[e,t]});var $x="Arrow",Cc=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return l.jsx(ne.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cc.displayName=$x;var Lx=Cc;function uo(e){const[t,r]=d.useState(void 0);return Ne(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Ya="Popper",[Sc,bt]=je(Ya),[Fx,Ec]=Sc(Ya),Rc=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return l.jsx(Fx,{scope:t,anchor:n,onAnchorChange:o,children:r})};Rc.displayName=Ya;var kc="PopperAnchor",Nc=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Ec(kc,r),s=d.useRef(null),i=ce(t,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||s.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(ne.div,{...o,ref:i})});Nc.displayName=kc;var Xa="PopperContent",[Vx,Bx]=Sc(Xa),jc=d.forwardRef((e,t)=>{var A,z,Z,H,te,L;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:h,...v}=e,x=Ec(Xa,r),[b,y]=d.useState(null),w=ce(t,se=>y(se)),[C,R]=d.useState(null),j=uo(C),k=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,$=n+(a!=="center"?"-"+a:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},G=Array.isArray(u)?u:[u],Q=G.length>0,ee={padding:B,boundary:G.filter(Wx),altBoundary:Q},{refs:W,floatingStyles:M,placement:_,isPositioned:D,middlewareData:T}=jx({strategy:"fixed",placement:$,whileElementsMounted:(...se)=>xx(...se,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[Tx({mainAxis:o+N,alignmentAxis:s}),c&&Ix({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ax():void 0,...ee}),c&&_x({...ee}),Ox({...ee,apply:({elements:se,rects:le,availableWidth:me,availableHeight:ve})=>{const{width:Ee,height:Le}=le.reference,Re=se.floating.style;Re.setProperty("--radix-popper-available-width",`${me}px`),Re.setProperty("--radix-popper-available-height",`${ve}px`),Re.setProperty("--radix-popper-anchor-width",`${Ee}px`),Re.setProperty("--radix-popper-anchor-height",`${Le}px`)}}),C&&Dx({element:C,padding:i}),zx({arrowWidth:k,arrowHeight:N}),m&&Mx({strategy:"referenceHidden",...ee})]}),[O,U]=Ic(_),J=ze(h);Ne(()=>{D&&(J==null||J())},[D,J]);const I=(A=T.arrow)==null?void 0:A.x,q=(z=T.arrow)==null?void 0:z.y,X=((Z=T.arrow)==null?void 0:Z.centerOffset)!==0,[Y,F]=d.useState();return Ne(()=>{b&&F(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...M,transform:D?M.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[(H=T.transformOrigin)==null?void 0:H.x,(te=T.transformOrigin)==null?void 0:te.y].join(" "),...((L=T.hide)==null?void 0:L.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Vx,{scope:r,placedSide:O,onArrowChange:R,arrowX:I,arrowY:q,shouldHideArrow:X,children:l.jsx(ne.div,{"data-side":O,"data-align":U,...v,ref:w,style:{...v.style,animation:D?void 0:"none"}})})})});jc.displayName=Xa;var Pc="PopperArrow",Gx={top:"bottom",right:"left",bottom:"top",left:"right"},Tc=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Bx(Pc,n),s=Gx[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Lx,{...o,ref:r,style:{...o.style,display:"block"}})})});Tc.displayName=Pc;function Wx(e){return e!==null}var zx=e=>({name:"transformOrigin",options:e,fn(t){var x,b,y;const{placement:r,rects:n,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=Ic(r),p={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let h="",v="";return u==="bottom"?(h=s?p:`${m}px`,v=`${-c}px`):u==="top"?(h=s?p:`${m}px`,v=`${n.floating.height+c}px`):u==="right"?(h=`${-c}px`,v=s?p:`${g}px`):u==="left"&&(h=`${n.floating.width+c}px`,v=s?p:`${g}px`),{data:{x:h,y:v}}}});function Ic(e){const[t,r="center"]=e.split("-");return[t,r]}var Qr=Rc,en=Nc,fo=jc,po=Tc,qx="Portal",xr=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);Ne(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Zr.createPortal(l.jsx(ne.div,{...n,ref:t}),s):null});xr.displayName=qx;function Hx(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Pe=e=>{const{present:t,children:r}=e,n=Ux(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ce(n.ref,Kx(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Pe.displayName="Presence";function Ux(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=Hx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Nn(n.current);a.current=i==="mounted"?u:"none"},[i]),Ne(()=>{const u=n.current,f=o.current;if(f!==e){const m=a.current,g=Nn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Ne(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const v=Nn(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(a.current=Nn(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Nn(e){return(e==null?void 0:e.animationName)||"none"}function Kx(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Yx=Symbol("radix.slottable");function Xx(e){const t=({children:r})=>l.jsx(l.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Yx,t}var Zx=d[" useInsertionEffect ".trim().toString()]||Ne;function ke({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,s]=Jx({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=d.useCallback(f=>{var p;if(i){const m=Qx(f)?f(e):f;m!==e&&((p=s.current)==null||p.call(s,m))}else a(f)},[i,e,a,s]);return[c,u]}function Jx({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return Zx(()=>{a.current=t},[t]),d.useEffect(()=>{var s;o.current!==r&&((s=a.current)==null||s.call(a,r),o.current=r)},[r,o]),[r,n,a]}function Qx(e){return typeof e=="function"}var Ac=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eb="VisuallyHidden",_c=d.forwardRef((e,t)=>l.jsx(ne.span,{...e,ref:t,style:{...Ac,...e.style}}));_c.displayName=eb;var tb=_c,[mo]=je("Tooltip",[bt]),go=bt(),Oc="TooltipProvider",rb=700,ba="tooltip.open",[nb,Za]=mo(Oc),Mc=e=>{const{__scopeTooltip:t,delayDuration:r=rb,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,s=d.useRef(!0),i=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(nb,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:d.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Mc.displayName=Oc;var qr="Tooltip",[ob,tn]=mo(qr),Dc=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=Za(qr,e.__scopeTooltip),u=go(t),[f,p]=d.useState(null),m=be(),g=d.useRef(0),h=s??c.disableHoverableContent,v=i??c.delayDuration,x=d.useRef(!1),[b,y]=ke({prop:n,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(ba))):c.onClose(),a==null||a(k)},caller:qr}),w=d.useMemo(()=>b?x.current?"delayed-open":"instant-open":"closed",[b]),C=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x.current=!1,y(!0)},[y]),R=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),j=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,y(!0),g.current=0},v)},[v,y]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(Qr,{...u,children:l.jsx(ob,{scope:t,contentId:m,open:b,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?j():C()},[c.isOpenDelayedRef,j,C]),onTriggerLeave:d.useCallback(()=>{h?R():(window.clearTimeout(g.current),g.current=0)},[R,h]),onOpen:C,onClose:R,disableHoverableContent:h,children:r})})};Dc.displayName=qr;var ya="TooltipTrigger",$c=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=tn(ya,r),a=Za(ya,r),s=go(r),i=d.useRef(null),c=ce(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(en,{asChild:!0,...s,children:l.jsx(ne.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:K(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});$c.displayName=ya;var Ja="TooltipPortal",[ab,sb]=mo(Ja,{forceMount:void 0}),Lc=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=tn(Ja,t);return l.jsx(ab,{scope:t,forceMount:r,children:l.jsx(Pe,{present:r||a.open,children:l.jsx(xr,{asChild:!0,container:o,children:n})})})};Lc.displayName=Ja;var ur="TooltipContent",Fc=d.forwardRef((e,t)=>{const r=sb(ur,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=tn(ur,e.__scopeTooltip);return l.jsx(Pe,{present:n||s.open,children:s.disableHoverableContent?l.jsx(Vc,{side:o,...a,ref:t}):l.jsx(ib,{side:o,...a,ref:t})})}),ib=d.forwardRef((e,t)=>{const r=tn(ur,e.__scopeTooltip),n=Za(ur,e.__scopeTooltip),o=d.useRef(null),a=ce(t,o),[s,i]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,m=d.useCallback(()=>{i(null),p(!1)},[p]),g=d.useCallback((h,v)=>{const x=h.currentTarget,b={x:h.clientX,y:h.clientY},y=db(b,x.getBoundingClientRect()),w=fb(b,y),C=pb(v.getBoundingClientRect()),R=gb([...w,...C]);i(R),p(!0)},[p]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&f){const h=x=>g(x,f),v=x=>g(x,c);return c.addEventListener("pointerleave",h),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",v)}}},[c,f,g,m]),d.useEffect(()=>{if(s){const h=v=>{const x=v.target,b={x:v.clientX,y:v.clientY},y=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),w=!mb(b,s);y?m():w&&(m(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,f,s,u,m]),l.jsx(Vc,{...e,ref:a})}),[lb,cb]=mo(qr,{isInside:!1}),ub=Xx("TooltipContent"),Vc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=tn(ur,r),u=go(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(ba,f),()=>document.removeEventListener(ba,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),l.jsx(gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(fo,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(ub,{children:n}),l.jsx(lb,{scope:r,isInside:!0,children:l.jsx(tb,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Fc.displayName=ur;var Bc="TooltipArrow",Gc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=go(r);return cb(Bc,r).isInside?null:l.jsx(po,{...o,...n,ref:t})});Gc.displayName=Bc;function db(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function fb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function pb(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function mb(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,f=i.y,p=c.x,m=c.y;f>n!=m>n&&r<(p-u)*(n-f)/(m-f)+u&&(o=!o)}return o}function gb(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),vb(t)}function vb(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var hb=Mc,xb=Dc,bb=$c,yb=Lc,wb=Fc,Cb=Gc;function Wc({delayDuration:e=0,...t}){return l.jsx(hb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function Qa({...e}){return l.jsx(Wc,{children:l.jsx(xb,{"data-slot":"tooltip",...e})})}function es({...e}){return l.jsx(bb,{"data-slot":"tooltip-trigger",...e})}function ts({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return l.jsx(yb,{children:l.jsxs(wb,{"data-slot":"tooltip-content",sideOffset:t,className:P("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&l.jsx(Cb,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const zc=Bt("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer border border-transparent",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] focus:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-hover)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-8 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Be=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,icon:s,iconPosition:i="left",tooltip:c,tooltipProps:u,...f},p)=>{const m={lg:"w-[18px] h-[18px]",default:"w-[18px] h-[18px]",sm:"w-[18px] h-[18px]",xs:"w-3.5 h-3.5",icon:"w-[18px] h-[18px]","icon-sm":"w-3.5 h-3.5","icon-md":"w-[18px] h-[18px]","icon-lg":"w-[18px] h-[18px]"}[r??"default"],g=s&&l.jsx(s,{className:P(m,"transition-opacity",{"mr-2":o&&i==="left","ml-2":o&&i!=="left","opacity-50":a||n})}),h=l.jsxs("button",{className:P(zc({variant:t,size:r,className:e})),ref:p,disabled:a||n,...f,children:[i==="left"&&g,o,i==="right"&&g,n&&l.jsx(sc,{className:P("ml-2 animate-spin",m)})]});return c?l.jsxs(Qa,{children:[l.jsx(es,{asChild:!0,children:l.jsx("span",{className:"inline-flex",children:h})}),l.jsx(ts,{...u,children:c})]}):h});Be.displayName="Button";const Sb=Bt("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:bg-[var(--fill-input-neutral-idle)] disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:cursor-default md:text-sm dark:border-input-neutral-idle dark:bg-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700 [&[readonly]]:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:border-0 [&[readonly]]:text-[var(--text-input-neutral-idle)] [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-[var(--border-input-neutral-idle)] [&[readonly][disabled]]:opacity-100 [&[readonly][disabled]]:cursor-default [&[readonly][disabled]]:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:border-0 [&[readonly][disabled]]:text-[var(--text-input-neutral-idle)] [&[readonly][disabled]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:hover:border-0 [&[readonly][disabled]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus:border-0 [&[readonly][disabled]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus-visible:border-0",{variants:{variant:{default:"dark:focus-visible:bg-fill-input-neutral-idle dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-purple-muted-700 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-0 [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-0 [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-0",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-[--var(text-input-neutral-idle)] placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70",ghost:"bg-transparent border-purple-muted-600 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [:not(:placeholder-shown)]:bg-transparent"}},defaultVariants:{variant:"default"}}),rn=d.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>l.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:P(Sb({variant:t,className:e})),...o}));rn.displayName="Input";function Vi(e,[t,r]){return Math.min(r,Math.max(t,e))}function Bi(e){const t=Eb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(kb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Eb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=jb(o),i=Nb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Rb=Symbol("radix.slottable");function kb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Rb}function Nb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function jb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function vo(e){const t=e+"CollectionProvider",[r,n]=je(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:b}=v,y=E.useRef(null),w=E.useRef(new Map).current;return l.jsx(o,{scope:x,itemMap:w,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",c=Bi(i),u=E.forwardRef((v,x)=>{const{scope:b,children:y}=v,w=a(i,b),C=ce(x,w.collectionRef);return l.jsx(c,{ref:C,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=Bi(f),g=E.forwardRef((v,x)=>{const{scope:b,children:y,...w}=v,C=E.useRef(null),R=ce(x,C),j=a(f,b);return E.useEffect(()=>(j.itemMap.set(C,{ref:C,...w}),()=>void j.itemMap.delete(C))),l.jsx(m,{[p]:"",ref:R,children:y})});g.displayName=f;function h(v){const x=a(e+"CollectionConsumer",v);return E.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,k)=>w.indexOf(j.ref.current)-w.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},h,n]}var Pb=d.createContext(void 0);function Gt(e){const t=d.useContext(Pb);return e||t||"ltr"}var Zo=0;function ho(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Gi()),document.body.insertAdjacentElement("beforeend",e[1]??Gi()),Zo++,()=>{Zo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zo--}},[])}function Gi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jo="focusScope.autoFocusOnMount",Qo="focusScope.autoFocusOnUnmount",Wi={bubbles:!1,cancelable:!0},Tb="FocusScope",nn=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=ze(o),f=ze(a),p=d.useRef(null),m=ce(t,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(w){if(g.paused||!i)return;const C=w.target;i.contains(C)?p.current=C:pt(p.current,{select:!0})},x=function(w){if(g.paused||!i)return;const C=w.relatedTarget;C!==null&&(i.contains(C)||pt(p.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&pt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),y.disconnect()}}},[n,i,g.paused]),d.useEffect(()=>{if(i){qi.add(g);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(Jo,Wi);i.addEventListener(Jo,u),i.dispatchEvent(b),b.defaultPrevented||(Ib(Db(qc(i)),{select:!0}),document.activeElement===v&&pt(i))}return()=>{i.removeEventListener(Jo,u),setTimeout(()=>{const b=new CustomEvent(Qo,Wi);i.addEventListener(Qo,f),i.dispatchEvent(b),b.defaultPrevented||pt(v??document.body,{select:!0}),i.removeEventListener(Qo,f),qi.remove(g)},0)}}},[i,u,f,g]);const h=d.useCallback(v=>{if(!r&&!n||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const y=v.currentTarget,[w,C]=Ab(y);w&&C?!v.shiftKey&&b===C?(v.preventDefault(),r&&pt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),r&&pt(C,{select:!0})):b===y&&v.preventDefault()}},[r,n,g.paused]);return l.jsx(ne.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});nn.displayName=Tb;function Ib(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(pt(n,{select:t}),document.activeElement!==r)return}function Ab(e){const t=qc(e),r=zi(t,e),n=zi(t.reverse(),e);return[r,n]}function qc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function zi(e,t){for(const r of e)if(!_b(r,{upTo:t}))return r}function _b(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ob(e){return e instanceof HTMLInputElement&&"select"in e}function pt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&Ob(e)&&t&&e.select()}}var qi=Mb();function Mb(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Hi(e,t),e.unshift(t)},remove(t){var r;e=Hi(e,t),(r=e[0])==null||r.resume()}}}function Hi(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Db(e){return e.filter(t=>t.tagName!=="A")}function $b(e){const t=Lb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(Vb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Lb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=Gb(o),i=Bb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Fb=Symbol("radix.slottable");function Vb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Fb}function Bb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Gb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xo(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Wb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,jn=new WeakMap,Pn={},ea=0,Hc=function(e){return e&&(e.host||Hc(e.parentNode))},zb=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Hc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},qb=function(e,t,r,n){var o=zb(t,Array.isArray(e)?e:[e]);Pn[r]||(Pn[r]=new WeakMap);var a=Pn[r],s=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(i.has(m))f(m);else try{var g=m.getAttribute(n),h=g!==null&&g!=="false",v=(Qt.get(m)||0)+1,x=(a.get(m)||0)+1;Qt.set(m,v),a.set(m,x),s.push(m),v===1&&h&&jn.set(m,!0),x===1&&m.setAttribute(r,"true"),h||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return f(t),i.clear(),ea++,function(){s.forEach(function(p){var m=Qt.get(p)-1,g=a.get(p)-1;Qt.set(p,m),a.set(p,g),m||(jn.has(p)||p.removeAttribute(n),jn.delete(p)),g||p.removeAttribute(r)}),ea--,ea||(Qt=new WeakMap,Qt=new WeakMap,jn=new WeakMap,Pn={})}},bo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Wb(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),qb(n,o,r,"aria-hidden")):function(){return null}},Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Je.apply(this,arguments)};function Uc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Hb(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Mn="right-scroll-bar-position",Dn="width-before-scroll-bar",Ub="with-scroll-bars-hidden",Kb="--removed-body-scroll-bar-size";function ta(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yb(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Xb=typeof window<"u"?d.useLayoutEffect:d.useEffect,Ui=new WeakMap;function Zb(e,t){var r=Yb(null,function(n){return e.forEach(function(o){return ta(o,n)})});return Xb(function(){var n=Ui.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||ta(i,null)}),a.forEach(function(i){o.has(i)||ta(i,s)})}Ui.set(r,e)},[e]),r}function Jb(e){return e}function Qb(e,t){t===void 0&&(t=Jb);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function ey(e){e===void 0&&(e={});var t=Qb(null);return t.options=Je({async:!0,ssr:!1},e),t}var Kc=function(e){var t=e.sideCar,r=Uc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Je({},r))};Kc.isSideCarExport=!0;function ty(e,t){return e.useMedium(t),Kc}var Yc=ey(),ra=function(){},yo=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:ra,onWheelCapture:ra,onTouchMoveCapture:ra}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,h=e.noIsolation,v=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,C=Uc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,j=Zb([r,t]),k=Je(Je({},C),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:Yc,removeScrollBar:u,shards:p,noRelative:g,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:w}),s?d.cloneElement(d.Children.only(i),Je(Je({},k),{ref:j})):d.createElement(y,Je({},k,{className:c,ref:j}),i))});yo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yo.classNames={fullWidth:Dn,zeroRight:Mn};var ry=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ny(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ry();return t&&e.setAttribute("nonce",t),e}function oy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ay(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sy=function(){var e=0,t=null;return{add:function(r){e==0&&(t=ny())&&(oy(t,r),ay(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iy=function(){var e=sy();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Xc=function(){var e=iy(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},ly={left:0,top:0,right:0,gap:0},na=function(e){return parseInt(e||"",10)||0},cy=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[na(r),na(n),na(o)]},uy=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ly;var t=cy(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},dy=Xc(),lr="data-scroll-locked",fy=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
151
151
|
.`.concat(Ub,` {
|
|
152
152
|
overflow: hidden `).concat(n,`;
|
|
153
153
|
padding-right: `).concat(i,"px ").concat(n,`;
|
|
@@ -191,12 +191,12 @@ React keys must be passed directly to JSX without using spread:
|
|
|
191
191
|
|
|
192
192
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
193
193
|
|
|
194
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Nw="DialogDescriptionWarning",jw=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nd(Nw).contentName}}.`;return d.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},od=Wu,Pw=qu,ad=Uu,sd=Ku,id=Yu,Tw=Zu,Iw=Qu,ld=td,Ar='[cmdk-group=""]',sa='[cmdk-group-items=""]',Aw='[cmdk-group-heading=""]',cd='[cmdk-item=""]',el=`${cd}:not([aria-disabled="true"])`,ja="cmdk-item-select",nr="data-value",_w=(e,t,r)=>pw(e,t,r),ud=d.createContext(void 0),an=()=>d.useContext(ud),dd=d.createContext(void 0),ls=()=>d.useContext(dd),fd=d.createContext(void 0),pd=d.forwardRef((e,t)=>{let r=or(()=>{var I,q;return{search:"",value:(q=(I=e.value)!=null?I:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=or(()=>new Set),o=or(()=>new Map),a=or(()=>new Map),s=or(()=>new Set),i=md(e),{label:c,children:u,value:f,onValueChange:p,filter:m,shouldFilter:g,loop:h,disablePointerSelection:v=!1,vimBindings:x=!0,...b}=e,y=be(),w=be(),C=be(),R=d.useRef(null),j=zw();$t(()=>{if(f!==void 0){let I=f.trim();r.current.value=I,k.emit()}},[f]),$t(()=>{j(6,ee)},[]);let k=d.useMemo(()=>({subscribe:I=>(s.current.add(I),()=>s.current.delete(I)),snapshot:()=>r.current,setState:(I,q,X)=>{var Y,F,A,z;if(!Object.is(r.current[I],q)){if(r.current[I]=q,I==="search")Q(),B(),j(1,G);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(C);Z?Z.focus():(Y=document.getElementById(y))==null||Y.focus()}if(j(7,()=>{var Z;r.current.selectedItemId=(Z=W())==null?void 0:Z.id,k.emit()}),X||j(5,ee),((F=i.current)==null?void 0:F.value)!==void 0){let Z=q??"";(z=(A=i.current).onValueChange)==null||z.call(A,Z);return}}k.emit()}},emit:()=>{s.current.forEach(I=>I())}}),[]),N=d.useMemo(()=>({value:(I,q,X)=>{var Y;q!==((Y=a.current.get(I))==null?void 0:Y.value)&&(a.current.set(I,{value:q,keywords:X}),r.current.filtered.items.set(I,$(q,X)),j(2,()=>{B(),k.emit()}))},item:(I,q)=>(n.current.add(I),q&&(o.current.has(q)?o.current.get(q).add(I):o.current.set(q,new Set([I]))),j(3,()=>{Q(),B(),r.current.value||G(),k.emit()}),()=>{a.current.delete(I),n.current.delete(I),r.current.filtered.items.delete(I);let X=W();j(4,()=>{Q(),(X==null?void 0:X.getAttribute("id"))===I&&G(),k.emit()})}),group:I=>(o.current.has(I)||o.current.set(I,new Set),()=>{a.current.delete(I),o.current.delete(I)}),filter:()=>i.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:C,labelId:w,listInnerRef:R}),[]);function $(I,q){var X,Y;let F=(Y=(X=i.current)==null?void 0:X.filter)!=null?Y:_w;return I?F(I,r.current.search,q):0}function B(){if(!r.current.search||i.current.shouldFilter===!1)return;let I=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(Y=>{let F=o.current.get(Y),A=0;F.forEach(z=>{let Z=I.get(z);A=Math.max(Z,A)}),q.push([Y,A])});let X=R.current;M().sort((Y,F)=>{var A,z;let Z=Y.getAttribute("id"),H=F.getAttribute("id");return((A=I.get(H))!=null?A:0)-((z=I.get(Z))!=null?z:0)}).forEach(Y=>{let F=Y.closest(sa);F?F.appendChild(Y.parentElement===F?Y:Y.closest(`${sa} > *`)):X.appendChild(Y.parentElement===X?Y:Y.closest(`${sa} > *`))}),q.sort((Y,F)=>F[1]-Y[1]).forEach(Y=>{var F;let A=(F=R.current)==null?void 0:F.querySelector(`${Ar}[${nr}="${encodeURIComponent(Y[0])}"]`);A==null||A.parentElement.appendChild(A)})}function G(){let I=M().find(X=>X.getAttribute("aria-disabled")!=="true"),q=I==null?void 0:I.getAttribute(nr);k.setState("value",q||void 0)}function Q(){var I,q,X,Y;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let F=0;for(let A of n.current){let z=(q=(I=a.current.get(A))==null?void 0:I.value)!=null?q:"",Z=(Y=(X=a.current.get(A))==null?void 0:X.keywords)!=null?Y:[],H=$(z,Z);r.current.filtered.items.set(A,H),H>0&&F++}for(let[A,z]of o.current)for(let Z of z)if(r.current.filtered.items.get(Z)>0){r.current.filtered.groups.add(A);break}r.current.filtered.count=F}function ee(){var I,q,X;let Y=W();Y&&(((I=Y.parentElement)==null?void 0:I.firstChild)===Y&&((X=(q=Y.closest(Ar))==null?void 0:q.querySelector(Aw))==null||X.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function W(){var I;return(I=R.current)==null?void 0:I.querySelector(`${cd}[aria-selected="true"]`)}function M(){var I;return Array.from(((I=R.current)==null?void 0:I.querySelectorAll(el))||[])}function _(I){let q=M()[I];q&&k.setState("value",q.getAttribute(nr))}function D(I){var q;let X=W(),Y=M(),F=Y.findIndex(z=>z===X),A=Y[F+I];(q=i.current)!=null&&q.loop&&(A=F+I<0?Y[Y.length-1]:F+I===Y.length?Y[0]:Y[F+I]),A&&k.setState("value",A.getAttribute(nr))}function T(I){let q=W(),X=q==null?void 0:q.closest(Ar),Y;for(;X&&!Y;)X=I>0?Gw(X,Ar):Ww(X,Ar),Y=X==null?void 0:X.querySelector(el);Y?k.setState("value",Y.getAttribute(nr)):D(I)}let O=()=>_(M().length-1),U=I=>{I.preventDefault(),I.metaKey?O():I.altKey?T(1):D(1)},J=I=>{I.preventDefault(),I.metaKey?_(0):I.altKey?T(-1):D(-1)};return d.createElement(ne.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:I=>{var q;(q=b.onKeyDown)==null||q.call(b,I);let X=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||X))switch(I.key){case"n":case"j":{x&&I.ctrlKey&&U(I);break}case"ArrowDown":{U(I);break}case"p":case"k":{x&&I.ctrlKey&&J(I);break}case"ArrowUp":{J(I);break}case"Home":{I.preventDefault(),_(0);break}case"End":{I.preventDefault(),O();break}case"Enter":{I.preventDefault();let Y=W();if(Y){let F=new Event(ja);Y.dispatchEvent(F)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Hw},c),Ro(e,I=>d.createElement(dd.Provider,{value:k},d.createElement(ud.Provider,{value:N},I))))}),Ow=d.forwardRef((e,t)=>{var r,n;let o=be(),a=d.useRef(null),s=d.useContext(fd),i=an(),c=md(e),u=(n=(r=c.current)==null?void 0:r.forceMount)!=null?n:s==null?void 0:s.forceMount;$t(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let f=gd(o,a,[e.value,e.children,a],e.keywords),p=ls(),m=xt(j=>j.value&&j.value===f.current),g=xt(j=>u||i.filter()===!1?!0:j.search?j.filtered.items.get(o)>0:!0);d.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(ja,h),()=>j.removeEventListener(ja,h)},[g,e.onSelect,e.disabled]);function h(){var j,k;v(),(k=(j=c.current).onSelect)==null||k.call(j,f.current)}function v(){p.setState("value",f.current,!0)}if(!g)return null;let{disabled:x,value:b,onSelect:y,forceMount:w,keywords:C,...R}=e;return d.createElement(ne.div,{ref:Ae(a,t),...R,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!m,"data-disabled":!!x,"data-selected":!!m,onPointerMove:x||i.getDisablePointerSelection()?void 0:v,onClick:x?void 0:h},e.children)}),Mw=d.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,s=be(),i=d.useRef(null),c=d.useRef(null),u=be(),f=an(),p=xt(g=>o||f.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);$t(()=>f.group(s),[]),gd(s,i,[e.value,e.heading,c]);let m=d.useMemo(()=>({id:s,forceMount:o}),[o]);return d.createElement(ne.div,{ref:Ae(i,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Ro(e,g=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},d.createElement(fd.Provider,{value:m},g))))}),Dw=d.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=d.useRef(null),a=xt(s=>!s.search);return!r&&!a?null:d.createElement(ne.div,{ref:Ae(o,t),...n,"cmdk-separator":"",role:"separator"})}),$w=d.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=ls(),s=xt(u=>u.search),i=xt(u=>u.selectedItemId),c=an();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(ne.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":i,id:c.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),r==null||r(u.target.value)}})}),Lw=d.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=d.useRef(null),s=d.useRef(null),i=xt(u=>u.selectedItemId),c=an();return d.useEffect(()=>{if(s.current&&a.current){let u=s.current,f=a.current,p,m=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let g=u.offsetHeight;f.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return m.observe(u),()=>{cancelAnimationFrame(p),m.unobserve(u)}}},[]),d.createElement(ne.div,{ref:Ae(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":n,id:c.listId},Ro(e,u=>d.createElement("div",{ref:Ae(s,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Fw=d.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:s,...i}=e;return d.createElement(od,{open:r,onOpenChange:n},d.createElement(ad,{container:s},d.createElement(sd,{"cmdk-overlay":"",className:o}),d.createElement(id,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(pd,{ref:t,...i}))))}),Vw=d.forwardRef((e,t)=>xt(r=>r.filtered.count===0)?d.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Bw=d.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return d.createElement(ne.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ro(e,s=>d.createElement("div",{"aria-hidden":!0},s)))}),Wt=Object.assign(pd,{List:Lw,Item:Ow,Input:$w,Group:Mw,Separator:Dw,Dialog:Fw,Empty:Vw,Loading:Bw});function Gw(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Ww(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function md(e){let t=d.useRef(e);return $t(()=>{t.current=e}),t}var $t=typeof window>"u"?d.useEffect:d.useLayoutEffect;function or(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function xt(e){let t=ls(),r=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,r,r)}function gd(e,t,r,n=[]){let o=d.useRef(),a=an();return $t(()=>{var s;let i=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=n.map(u=>u.trim());a.value(e,i,c),(s=t.current)==null||s.setAttribute(nr,i),o.current=i}),o}var zw=()=>{let[e,t]=d.useState(),r=or(()=>new Map);return $t(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function qw(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ro({asChild:e,children:t},r){return e&&d.isValidElement(t)?d.cloneElement(qw(t),{ref:t.ref},r(t.props.children)):r(t)}var Hw={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Uw({...e}){return l.jsx(od,{"data-slot":"dialog",...e})}function Kw({...e}){return l.jsx(Pw,{"data-slot":"dialog-trigger",...e})}function vd({...e}){return l.jsx(ad,{"data-slot":"dialog-portal",...e})}function Yw({...e}){return l.jsx(ld,{"data-slot":"dialog-close",...e})}function hd({className:e,...t}){return l.jsx(sd,{"data-slot":"dialog-overlay",className:P("qodo qodo-dialog-overlay","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-purple-muted-900/75",e),...t})}function Xw({className:e,children:t,showCloseButton:r=!0,...n}){return l.jsxs(vd,{"data-slot":"dialog-portal",children:[l.jsx(hd,{}),l.jsxs(id,{"data-slot":"dialog-content",className:P("qodo qodo-dialog-content bg-[var(--fill-panel-neutral)] 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","fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]","gap-4 rounded-lg border border-[var(--border-action-neutral-idle)] p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&l.jsxs(ld,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[l.jsx(ao,{}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Zw({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-header",className:P("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function Jw({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-footer",className:P("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Qw({className:e,...t}){return l.jsx(Tw,{"data-slot":"dialog-title",className:P("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function e0({className:e,...t}){return l.jsx(Iw,{"data-slot":"dialog-description",className:P("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function xd({className:e,...t}){return l.jsx(Wt,{"data-slot":"command",className:P("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function bd({className:e,...t}){return l.jsxs("div",{"data-slot":"command-input-wrapper",className:P("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-[var(--border-panel-neutral)] px-3 text-purple-muted-300"),children:[l.jsx(ic,{className:"size-4 shrink-0 text-purple-muted-300"}),l.jsx(Wt.Input,{"data-slot":"command-input",className:P("qodo qodo-command-input","placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function yd({className:e,...t}){return l.jsx(Wt.List,{"data-slot":"command-list",className:P("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function wd({...e}){return l.jsx(Wt.Empty,{"data-slot":"command-empty",className:P("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function t0({className:e,...t}){return l.jsx(Wt.Loading,{"data-slot":"command-loading",className:P("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function Cd({className:e,...t}){return l.jsx(Wt.Group,{"data-slot":"command-group",className:P("qodo qodo-command-group","max-h-[160px] text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-y-auto p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Sd({className:e,...t}){return l.jsx(Wt.Item,{"data-slot":"command-item",className:P("qodo qodo-command-item","data-[selected=true]:bg-purple-muted-500 data-[selected=true]:text-purple-100 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function r0(e){const t=n0(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(a0);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function n0(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=i0(o),i=s0(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var o0=Symbol("radix.slottable");function a0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===o0}function s0(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function i0(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ko="Popover",[Ed]=je(ko,[bt]),sn=bt(),[l0,Ct]=Ed(ko),Rd=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=sn(t),c=d.useRef(null),[u,f]=d.useState(!1),[p,m]=ke({prop:n,defaultProp:o??!1,onChange:a,caller:ko});return l.jsx(Qr,{...i,children:l.jsx(l0,{scope:t,contentId:be(),triggerRef:c,open:p,onOpenChange:m,onOpenToggle:d.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:s,children:r})})};Rd.displayName=ko;var kd="PopoverAnchor",c0=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Ct(kd,r),a=sn(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return d.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(en,{...a,...n,ref:t})});c0.displayName=kd;var Nd="PopoverTrigger",jd=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Ct(Nd,r),a=sn(r),s=ce(t,o.triggerRef),i=l.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_d(o.open),...n,ref:s,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(en,{asChild:!0,...a,children:i})});jd.displayName=Nd;var cs="PopoverPortal",[u0,d0]=Ed(cs,{forceMount:void 0}),Pd=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=Ct(cs,t);return l.jsx(u0,{scope:t,forceMount:r,children:l.jsx(Pe,{present:r||a.open,children:l.jsx(xr,{asChild:!0,container:o,children:n})})})};Pd.displayName=cs;var dr="PopoverContent",Td=d.forwardRef((e,t)=>{const r=d0(dr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=Ct(dr,e.__scopePopover);return l.jsx(Pe,{present:n||a.open,children:a.modal?l.jsx(p0,{...o,ref:t}):l.jsx(m0,{...o,ref:t})})});Td.displayName=dr;var f0=r0("PopoverContent.RemoveScroll"),p0=d.forwardRef((e,t)=>{const r=Ct(dr,e.__scopePopover),n=d.useRef(null),o=ce(t,n),a=d.useRef(!1);return d.useEffect(()=>{const s=n.current;if(s)return bo(s)},[]),l.jsx(on,{as:f0,allowPinchZoom:!0,children:l.jsx(Id,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,u=i.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),m0=d.forwardRef((e,t)=>{const r=Ct(dr,e.__scopePopover),n=d.useRef(!1),o=d.useRef(!1);return l.jsx(Id,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Id=d.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,m=Ct(dr,r),g=sn(r);return ho(),l.jsx(nn,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(gr,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:l.jsx(fo,{"data-state":_d(m.open),role:"dialog",id:m.contentId,...g,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ad="PopoverClose",g0=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Ct(Ad,r);return l.jsx(ne.button,{type:"button",...n,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});g0.displayName=Ad;var v0="PopoverArrow",h0=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=sn(r);return l.jsx(po,{...o,...n,ref:t})});h0.displayName=v0;function _d(e){return e?"open":"closed"}var x0=Rd,b0=jd,y0=Pd,w0=Td;function us({...e}){return l.jsx(x0,{"data-slot":"popover",...e})}function ds({...e}){return l.jsx(b0,{"data-slot":"popover-trigger",...e})}function fs({className:e,align:t="center",sideOffset:r=4,...n}){return l.jsx(y0,{children:l.jsx(w0,{"data-slot":"popover-content",align:t,sideOffset:r,className:P("qodo qodo-popover-content bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}const ps=d.forwardRef(({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyText:a="No option found.",disabled:s=!1,readOnly:i=!1,error:c=!1,className:u,onSearchChange:f,isLoading:p=!1,loadingText:m="Loading...",...g},h)=>{const[v,x]=d.useState(!1),[b,y]=d.useState(""),[w,C]=d.useState(0),R=d.useRef(null),j=e.find(N=>N.value===t),k=N=>{y(N),f==null||f(N)};return d.useEffect(()=>{R.current&&C(R.current.offsetWidth)},[]),l.jsxs(us,{open:i?!1:v,onOpenChange:x,children:[l.jsx(ds,{asChild:!0,children:l.jsxs(Be,{ref:N=>{typeof h=="function"?h(N):h&&(h.current=N),R.current=N},variant:"outline",role:"combobox","aria-expanded":v,"aria-invalid":c||void 0,"data-readonly":i||void 0,className:P("qodo qodo-combobox w-full h-9 px-3 py-1 justify-between rounded-md","border border-purple-muted-500 bg-purple-muted-700 hover:bg-purple-muted-700","text-sm md:text-sm text-purple-muted-300 hover:text-purple-muted-300 focus:text-purple-muted-300 active:text-purple-muted-300 selection:bg-primary selection:text-primary-foreground","font-normal shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px] focus-visible:!ring-offset-0","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40","disabled:!cursor-not-allowed disabled:!pointer-events-auto disabled:opacity-50 disabled:!bg-purple-muted-700 disabled:!border-purple-muted-500 disabled:!text-purple-muted-300 disabled:hover:!bg-purple-muted-700 disabled:hover:!text-purple-muted-300","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200 data-[readonly]:hover:bg-purple-muted-700 data-[readonly]:hover:text-purple-muted-200",{"text-muted-foreground":!j},u),disabled:s,...g,children:[j?j.label:n,l.jsx(Fv,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),l.jsx(fs,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-purple-muted-500 text-purple-muted-300",style:{width:w>0?`${w}px`:"auto"},children:l.jsxs(xd,{className:"w-full bg-[var(--fill-interactive-neutral-idle)]",shouldFilter:!f,children:[l.jsx(bd,{placeholder:o,...!!f&&{value:b,onValueChange:k}}),l.jsx(yd,{children:p?l.jsx(t0,{children:m}):l.jsxs(l.Fragment,{children:[l.jsx(wd,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),l.jsx(Cd,{children:e.map(N=>{const $=t===N.value;return l.jsxs(Sd,{value:N.value,keywords:[N.label],disabled:N.disabled,className:P("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":$}),onSelect:B=>{B!==t&&(r==null||r(B===t?"":B)),x(!1)},children:[l.jsx(mr,{className:P("mr-2 h-4 w-4",{"opacity-100":$,"opacity-0":!$})}),N.label]},N.value)})})]})})]})})]})});ps.displayName="Combobox";const C0=Bt("qodo qodo-badge inline-flex items-center dark:font-normal border transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",primary:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",outline:"border-[var(--border-tag-neutral-idle)] bg-[var(--fill-tag-neutral-idle)] text-[var(--text-tag-neutral-idle)] hover:text-[var(--text-tag-neutral-hover)] hover:bg-[var(--fill-tag-neutral-hover)] hover:border-[var(--border-tag-neutral-hover)] aria-active:text-[var(--text-tag-neutral-active)] aria-active:bg-[var(--fill-tag-neutral-active)] aria-active:border-[var(--border-tag-neutral-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-neutral-disabled)] aria-disabled:bg-[var(--fill-tag-neutral-disabled)] aria-disabled:border-[var(--border-tag-neutral-disabled)] ",success:"text-[var(--text-tag-positive-idle)] bg-[var(--fill-tag-positive-idle)] border-[var(--border-tag-positive-idle)] hover:text-[var(--text-tag-positive-hover)] hover:bg-[var(--fill-tag-positive-hover)] hover:border-[var(--border-tag-positive-hover)] aria-active:text-[var(--text-tag-positive-active)] aria-active:bg-[var(--fill-tag-positive-active)] aria-active:border-[var(--border-tag-positive-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-positive-disabled)] aria-disabled:bg-[var(--fill-tag-positive-disabled)] aria-disabled:border-[var(--border-tag-positive-disabled)] ",error:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] aria-active:text-[var(--text-tag-negative-active)] aria-active:bg-[var(--fill-tag-negative-active)] aria-active:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",pending:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] aria-active:text-[var(--text-tag-emphasis-active)] aria-active:bg-[var(--fill-tag-emphasis-active)] aria-active:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",warning:"border-[var(--border-tag-warning-idle)] bg-[var(--fill-tag-warning-idle)] text-[var(--text-tag-warning-idle)] hover:text-[var(--text-tag-warning-hover)] hover:bg-[var(--fill-tag-warning-hover)] hover:border-[var(--border-tag-warning-hover)] aria-active:text-[var(--text-tag-warning-active)] aria-active:bg-[var(--fill-tag-warning-active)] aria-active:border-[var(--border-tag-warning-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-warning-disabled)] aria-disabled:bg-[var(--fill-tag-warning-disabled)] aria-disabled:border-[var(--border-tag-warning-disabled)] ",text:"bg-transparent border-transparent text-primary-foreground !p-0"},size:{xs:"text-[10px] px-1.5 py-0.5 rounded-sm bg-transparent hover:bg-transparent aria-disabled:bg-transparent aria-active:bg-transparent",sm:"text-xs px-2.5 py-0.5 rounded-full",md:"text-sm px-2.5 py-0.5 rounded-full",lg:"text-base px-2.5 py-2 rounded-full"}},defaultVariants:{variant:"default",size:"sm"}});function Lt({className:e,variant:t,size:r,disabled:n=!1,active:o=!1,...a}){return l.jsx("div",{"aria-disabled":n,"aria-active":o,className:P(C0({variant:t,size:r}),e),...a})}function Od({className:e,...t}){return l.jsx("div",{"data-slot":"card",className:P("qodo qodo-card bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function Md({className:e,...t}){return l.jsx("div",{"data-slot":"card-header",className:P("qodo qodo-card-header @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Dd({className:e,...t}){return l.jsx("div",{"data-slot":"card-title",className:P("qodo qodo-card-title leading-none font-semibold",e),...t})}function $d({className:e,...t}){return l.jsx("div",{"data-slot":"card-description",className:P("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function S0({className:e,...t}){return l.jsx("div",{"data-slot":"card-action",className:P("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Ld({className:e,...t}){return l.jsx("div",{"data-slot":"card-content",className:P("qodo qodo-card-content px-6",e),...t})}function E0({className:e,...t}){return l.jsx("div",{"data-slot":"card-footer",className:P("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}function R0(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s);i.displayName=a+"Context";const c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,k0(o,...t)]}function k0(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var N0=Symbol.for("react.lazy"),Hn=d[" use ".trim().toString()];function j0(e){return typeof e=="object"&&e!==null&&"then"in e}function Fd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===N0&&"_payload"in e&&j0(e._payload)}function ms(e){const t=T0(e),r=d.forwardRef((n,o)=>{let{children:a,...s}=n;Fd(a)&&typeof Hn=="function"&&(a=Hn(a._payload));const i=d.Children.toArray(a),c=i.find(A0);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var P0=ms("Slot");function T0(e){const t=d.forwardRef((r,n)=>{let{children:o,...a}=r;if(Fd(o)&&typeof Hn=="function"&&(o=Hn(o._payload)),d.isValidElement(o)){const s=O0(o),i=_0(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var I0=Symbol("radix.slottable");function A0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===I0}function _0(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function O0(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var M0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vd=M0.reduce((e,t)=>{const r=ms(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),gs="Progress",vs=100,[D0]=R0(gs),[$0,L0]=D0(gs),Bd=d.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=F0,...s}=e;(o||o===0)&&!tl(o)&&console.error(V0(`${o}`,"Progress"));const i=tl(o)?o:vs;n!==null&&!rl(n,i)&&console.error(B0(`${n}`,"Progress"));const c=rl(n,i)?n:null,u=Un(c)?a(c,i):void 0;return l.jsx($0,{scope:r,value:c,max:i,children:l.jsx(Vd.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Un(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":zd(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});Bd.displayName=gs;var Gd="ProgressIndicator",Wd=d.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=L0(Gd,r);return l.jsx(Vd.div,{"data-state":zd(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});Wd.displayName=Gd;function F0(e,t){return`${Math.round(e/t*100)}%`}function zd(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Un(e){return typeof e=="number"}function tl(e){return Un(e)&&!isNaN(e)&&e>0}function rl(e,t){return Un(e)&&!isNaN(e)&&e<=t&&e>=0}function V0(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vs}\`.`}function B0(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
194
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},Nw="DialogDescriptionWarning",jw=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${nd(Nw).contentName}}.`;return d.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},od=Wu,Pw=qu,ad=Uu,sd=Ku,id=Yu,Tw=Zu,Iw=Qu,ld=td,Ar='[cmdk-group=""]',sa='[cmdk-group-items=""]',Aw='[cmdk-group-heading=""]',cd='[cmdk-item=""]',el=`${cd}:not([aria-disabled="true"])`,ja="cmdk-item-select",nr="data-value",_w=(e,t,r)=>pw(e,t,r),ud=d.createContext(void 0),an=()=>d.useContext(ud),dd=d.createContext(void 0),ls=()=>d.useContext(dd),fd=d.createContext(void 0),pd=d.forwardRef((e,t)=>{let r=or(()=>{var I,q;return{search:"",value:(q=(I=e.value)!=null?I:e.defaultValue)!=null?q:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=or(()=>new Set),o=or(()=>new Map),a=or(()=>new Map),s=or(()=>new Set),i=md(e),{label:c,children:u,value:f,onValueChange:p,filter:m,shouldFilter:g,loop:h,disablePointerSelection:v=!1,vimBindings:x=!0,...b}=e,y=be(),w=be(),C=be(),R=d.useRef(null),j=zw();$t(()=>{if(f!==void 0){let I=f.trim();r.current.value=I,k.emit()}},[f]),$t(()=>{j(6,ee)},[]);let k=d.useMemo(()=>({subscribe:I=>(s.current.add(I),()=>s.current.delete(I)),snapshot:()=>r.current,setState:(I,q,X)=>{var Y,F,A,z;if(!Object.is(r.current[I],q)){if(r.current[I]=q,I==="search")Q(),B(),j(1,G);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(C);Z?Z.focus():(Y=document.getElementById(y))==null||Y.focus()}if(j(7,()=>{var Z;r.current.selectedItemId=(Z=W())==null?void 0:Z.id,k.emit()}),X||j(5,ee),((F=i.current)==null?void 0:F.value)!==void 0){let Z=q??"";(z=(A=i.current).onValueChange)==null||z.call(A,Z);return}}k.emit()}},emit:()=>{s.current.forEach(I=>I())}}),[]),N=d.useMemo(()=>({value:(I,q,X)=>{var Y;q!==((Y=a.current.get(I))==null?void 0:Y.value)&&(a.current.set(I,{value:q,keywords:X}),r.current.filtered.items.set(I,$(q,X)),j(2,()=>{B(),k.emit()}))},item:(I,q)=>(n.current.add(I),q&&(o.current.has(q)?o.current.get(q).add(I):o.current.set(q,new Set([I]))),j(3,()=>{Q(),B(),r.current.value||G(),k.emit()}),()=>{a.current.delete(I),n.current.delete(I),r.current.filtered.items.delete(I);let X=W();j(4,()=>{Q(),(X==null?void 0:X.getAttribute("id"))===I&&G(),k.emit()})}),group:I=>(o.current.has(I)||o.current.set(I,new Set),()=>{a.current.delete(I),o.current.delete(I)}),filter:()=>i.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:y,inputId:C,labelId:w,listInnerRef:R}),[]);function $(I,q){var X,Y;let F=(Y=(X=i.current)==null?void 0:X.filter)!=null?Y:_w;return I?F(I,r.current.search,q):0}function B(){if(!r.current.search||i.current.shouldFilter===!1)return;let I=r.current.filtered.items,q=[];r.current.filtered.groups.forEach(Y=>{let F=o.current.get(Y),A=0;F.forEach(z=>{let Z=I.get(z);A=Math.max(Z,A)}),q.push([Y,A])});let X=R.current;M().sort((Y,F)=>{var A,z;let Z=Y.getAttribute("id"),H=F.getAttribute("id");return((A=I.get(H))!=null?A:0)-((z=I.get(Z))!=null?z:0)}).forEach(Y=>{let F=Y.closest(sa);F?F.appendChild(Y.parentElement===F?Y:Y.closest(`${sa} > *`)):X.appendChild(Y.parentElement===X?Y:Y.closest(`${sa} > *`))}),q.sort((Y,F)=>F[1]-Y[1]).forEach(Y=>{var F;let A=(F=R.current)==null?void 0:F.querySelector(`${Ar}[${nr}="${encodeURIComponent(Y[0])}"]`);A==null||A.parentElement.appendChild(A)})}function G(){let I=M().find(X=>X.getAttribute("aria-disabled")!=="true"),q=I==null?void 0:I.getAttribute(nr);k.setState("value",q||void 0)}function Q(){var I,q,X,Y;if(!r.current.search||i.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let F=0;for(let A of n.current){let z=(q=(I=a.current.get(A))==null?void 0:I.value)!=null?q:"",Z=(Y=(X=a.current.get(A))==null?void 0:X.keywords)!=null?Y:[],H=$(z,Z);r.current.filtered.items.set(A,H),H>0&&F++}for(let[A,z]of o.current)for(let Z of z)if(r.current.filtered.items.get(Z)>0){r.current.filtered.groups.add(A);break}r.current.filtered.count=F}function ee(){var I,q,X;let Y=W();Y&&(((I=Y.parentElement)==null?void 0:I.firstChild)===Y&&((X=(q=Y.closest(Ar))==null?void 0:q.querySelector(Aw))==null||X.scrollIntoView({block:"nearest"})),Y.scrollIntoView({block:"nearest"}))}function W(){var I;return(I=R.current)==null?void 0:I.querySelector(`${cd}[aria-selected="true"]`)}function M(){var I;return Array.from(((I=R.current)==null?void 0:I.querySelectorAll(el))||[])}function _(I){let q=M()[I];q&&k.setState("value",q.getAttribute(nr))}function D(I){var q;let X=W(),Y=M(),F=Y.findIndex(z=>z===X),A=Y[F+I];(q=i.current)!=null&&q.loop&&(A=F+I<0?Y[Y.length-1]:F+I===Y.length?Y[0]:Y[F+I]),A&&k.setState("value",A.getAttribute(nr))}function T(I){let q=W(),X=q==null?void 0:q.closest(Ar),Y;for(;X&&!Y;)X=I>0?Gw(X,Ar):Ww(X,Ar),Y=X==null?void 0:X.querySelector(el);Y?k.setState("value",Y.getAttribute(nr)):D(I)}let O=()=>_(M().length-1),U=I=>{I.preventDefault(),I.metaKey?O():I.altKey?T(1):D(1)},J=I=>{I.preventDefault(),I.metaKey?_(0):I.altKey?T(-1):D(-1)};return d.createElement(ne.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:I=>{var q;(q=b.onKeyDown)==null||q.call(b,I);let X=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||X))switch(I.key){case"n":case"j":{x&&I.ctrlKey&&U(I);break}case"ArrowDown":{U(I);break}case"p":case"k":{x&&I.ctrlKey&&J(I);break}case"ArrowUp":{J(I);break}case"Home":{I.preventDefault(),_(0);break}case"End":{I.preventDefault(),O();break}case"Enter":{I.preventDefault();let Y=W();if(Y){let F=new Event(ja);Y.dispatchEvent(F)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:Hw},c),Ro(e,I=>d.createElement(dd.Provider,{value:k},d.createElement(ud.Provider,{value:N},I))))}),Ow=d.forwardRef((e,t)=>{var r,n;let o=be(),a=d.useRef(null),s=d.useContext(fd),i=an(),c=md(e),u=(n=(r=c.current)==null?void 0:r.forceMount)!=null?n:s==null?void 0:s.forceMount;$t(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let f=gd(o,a,[e.value,e.children,a],e.keywords),p=ls(),m=xt(j=>j.value&&j.value===f.current),g=xt(j=>u||i.filter()===!1?!0:j.search?j.filtered.items.get(o)>0:!0);d.useEffect(()=>{let j=a.current;if(!(!j||e.disabled))return j.addEventListener(ja,h),()=>j.removeEventListener(ja,h)},[g,e.onSelect,e.disabled]);function h(){var j,k;v(),(k=(j=c.current).onSelect)==null||k.call(j,f.current)}function v(){p.setState("value",f.current,!0)}if(!g)return null;let{disabled:x,value:b,onSelect:y,forceMount:w,keywords:C,...R}=e;return d.createElement(ne.div,{ref:Ae(a,t),...R,id:o,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!m,"data-disabled":!!x,"data-selected":!!m,onPointerMove:x||i.getDisablePointerSelection()?void 0:v,onClick:x?void 0:h},e.children)}),Mw=d.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:o,...a}=e,s=be(),i=d.useRef(null),c=d.useRef(null),u=be(),f=an(),p=xt(g=>o||f.filter()===!1?!0:g.search?g.filtered.groups.has(s):!0);$t(()=>f.group(s),[]),gd(s,i,[e.value,e.heading,c]);let m=d.useMemo(()=>({id:s,forceMount:o}),[o]);return d.createElement(ne.div,{ref:Ae(i,t),...a,"cmdk-group":"",role:"presentation",hidden:p?void 0:!0},r&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},r),Ro(e,g=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?u:void 0},d.createElement(fd.Provider,{value:m},g))))}),Dw=d.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,o=d.useRef(null),a=xt(s=>!s.search);return!r&&!a?null:d.createElement(ne.div,{ref:Ae(o,t),...n,"cmdk-separator":"",role:"separator"})}),$w=d.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,o=e.value!=null,a=ls(),s=xt(u=>u.search),i=xt(u=>u.selectedItemId),c=an();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(ne.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":i,id:c.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),r==null||r(u.target.value)}})}),Lw=d.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...o}=e,a=d.useRef(null),s=d.useRef(null),i=xt(u=>u.selectedItemId),c=an();return d.useEffect(()=>{if(s.current&&a.current){let u=s.current,f=a.current,p,m=new ResizeObserver(()=>{p=requestAnimationFrame(()=>{let g=u.offsetHeight;f.style.setProperty("--cmdk-list-height",g.toFixed(1)+"px")})});return m.observe(u),()=>{cancelAnimationFrame(p),m.unobserve(u)}}},[]),d.createElement(ne.div,{ref:Ae(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":n,id:c.listId},Ro(e,u=>d.createElement("div",{ref:Ae(s,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Fw=d.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:o,contentClassName:a,container:s,...i}=e;return d.createElement(od,{open:r,onOpenChange:n},d.createElement(ad,{container:s},d.createElement(sd,{"cmdk-overlay":"",className:o}),d.createElement(id,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(pd,{ref:t,...i}))))}),Vw=d.forwardRef((e,t)=>xt(r=>r.filtered.count===0)?d.createElement(ne.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Bw=d.forwardRef((e,t)=>{let{progress:r,children:n,label:o="Loading...",...a}=e;return d.createElement(ne.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},Ro(e,s=>d.createElement("div",{"aria-hidden":!0},s)))}),Wt=Object.assign(pd,{List:Lw,Item:Ow,Input:$w,Group:Mw,Separator:Dw,Dialog:Fw,Empty:Vw,Loading:Bw});function Gw(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function Ww(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function md(e){let t=d.useRef(e);return $t(()=>{t.current=e}),t}var $t=typeof window>"u"?d.useEffect:d.useLayoutEffect;function or(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function xt(e){let t=ls(),r=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,r,r)}function gd(e,t,r,n=[]){let o=d.useRef(),a=an();return $t(()=>{var s;let i=(()=>{var u;for(let f of r){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=n.map(u=>u.trim());a.value(e,i,c),(s=t.current)==null||s.setAttribute(nr,i),o.current=i}),o}var zw=()=>{let[e,t]=d.useState(),r=or(()=>new Map);return $t(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,o)=>{r.current.set(n,o),t({})}};function qw(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Ro({asChild:e,children:t},r){return e&&d.isValidElement(t)?d.cloneElement(qw(t),{ref:t.ref},r(t.props.children)):r(t)}var Hw={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};function Uw({...e}){return l.jsx(od,{"data-slot":"dialog",...e})}function Kw({...e}){return l.jsx(Pw,{"data-slot":"dialog-trigger",...e})}function vd({...e}){return l.jsx(ad,{"data-slot":"dialog-portal",...e})}function Yw({...e}){return l.jsx(ld,{"data-slot":"dialog-close",...e})}function hd({className:e,...t}){return l.jsx(sd,{"data-slot":"dialog-overlay",className:P("qodo qodo-dialog-overlay","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-purple-muted-900/75",e),...t})}function Xw({className:e,children:t,showCloseButton:r=!0,...n}){return l.jsxs(vd,{"data-slot":"dialog-portal",children:[l.jsx(hd,{}),l.jsxs(id,{"data-slot":"dialog-content",className:P("qodo qodo-dialog-content bg-[var(--fill-panel-neutral)] 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","fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%]","gap-4 rounded-lg border border-[var(--border-action-neutral-idle)] p-6 shadow-lg duration-200 sm:max-w-lg",e),...n,children:[t,r&&l.jsxs(ld,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[l.jsx(ao,{}),l.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Zw({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-header",className:P("qodo qodo-dialog-header flex flex-col gap-2 text-center sm:text-left",e),...t})}function Jw({className:e,...t}){return l.jsx("div",{"data-slot":"dialog-footer",className:P("qodo qodo-dialog-footer flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function Qw({className:e,...t}){return l.jsx(Tw,{"data-slot":"dialog-title",className:P("qodo qodo-dialog-title text-lg leading-none font-semibold",e),...t})}function e0({className:e,...t}){return l.jsx(Iw,{"data-slot":"dialog-description",className:P("qodo qodo-dialog-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function xd({className:e,...t}){return l.jsx(Wt,{"data-slot":"command",className:P("qodo qodo-command bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function bd({className:e,...t}){return l.jsxs("div",{"data-slot":"command-input-wrapper",className:P("qodo qodo-command-input-wrapper","flex h-9 items-center gap-2 border-b border-[var(--border-panel-neutral)] px-3 text-purple-muted-300"),children:[l.jsx(ic,{className:"size-4 shrink-0 text-purple-muted-300"}),l.jsx(Wt.Input,{"data-slot":"command-input",className:P("qodo qodo-command-input","placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function yd({className:e,...t}){return l.jsx(Wt.List,{"data-slot":"command-list",className:P("qodo qodo-command-list max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function wd({...e}){return l.jsx(Wt.Empty,{"data-slot":"command-empty",className:P("qodo qodo-command-empty","py-6 text-center text-sm text-purple-muted-300"),...e})}function t0({className:e,...t}){return l.jsx(Wt.Loading,{"data-slot":"command-loading",className:P("qodo qodo-command-loading","py-6 text-center text-sm text-purple-muted-300",e),...t})}function Cd({className:e,...t}){return l.jsx(Wt.Group,{"data-slot":"command-group",className:P("qodo qodo-command-group","max-h-[160px] text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-y-auto p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function Sd({className:e,...t}){return l.jsx(Wt.Item,{"data-slot":"command-item",className:P("qodo qodo-command-item","data-[selected=true]:bg-purple-muted-500 data-[selected=true]:text-purple-100 [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function r0(e){const t=n0(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(a0);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function n0(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=i0(o),i=s0(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var o0=Symbol("radix.slottable");function a0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===o0}function s0(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function i0(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var ko="Popover",[Ed]=je(ko,[bt]),sn=bt(),[l0,Ct]=Ed(ko),Rd=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=sn(t),c=d.useRef(null),[u,f]=d.useState(!1),[p,m]=ke({prop:n,defaultProp:o??!1,onChange:a,caller:ko});return l.jsx(Qr,{...i,children:l.jsx(l0,{scope:t,contentId:be(),triggerRef:c,open:p,onOpenChange:m,onOpenToggle:d.useCallback(()=>m(g=>!g),[m]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:s,children:r})})};Rd.displayName=ko;var kd="PopoverAnchor",c0=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Ct(kd,r),a=sn(r),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return d.useEffect(()=>(s(),()=>i()),[s,i]),l.jsx(en,{...a,...n,ref:t})});c0.displayName=kd;var Nd="PopoverTrigger",jd=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Ct(Nd,r),a=sn(r),s=ce(t,o.triggerRef),i=l.jsx(ne.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_d(o.open),...n,ref:s,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:l.jsx(en,{asChild:!0,...a,children:i})});jd.displayName=Nd;var cs="PopoverPortal",[u0,d0]=Ed(cs,{forceMount:void 0}),Pd=e=>{const{__scopePopover:t,forceMount:r,children:n,container:o}=e,a=Ct(cs,t);return l.jsx(u0,{scope:t,forceMount:r,children:l.jsx(Pe,{present:r||a.open,children:l.jsx(xr,{asChild:!0,container:o,children:n})})})};Pd.displayName=cs;var dr="PopoverContent",Td=d.forwardRef((e,t)=>{const r=d0(dr,e.__scopePopover),{forceMount:n=r.forceMount,...o}=e,a=Ct(dr,e.__scopePopover);return l.jsx(Pe,{present:n||a.open,children:a.modal?l.jsx(p0,{...o,ref:t}):l.jsx(m0,{...o,ref:t})})});Td.displayName=dr;var f0=r0("PopoverContent.RemoveScroll"),p0=d.forwardRef((e,t)=>{const r=Ct(dr,e.__scopePopover),n=d.useRef(null),o=ce(t,n),a=d.useRef(!1);return d.useEffect(()=>{const s=n.current;if(s)return bo(s)},[]),l.jsx(on,{as:f0,allowPinchZoom:!0,children:l.jsx(Id,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=r.triggerRef.current)==null||i.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,c=i.button===0&&i.ctrlKey===!0,u=i.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),m0=d.forwardRef((e,t)=>{const r=Ct(dr,e.__scopePopover),n=d.useRef(!1),o=d.useRef(!1);return l.jsx(Id,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(n.current||(i=r.triggerRef.current)==null||i.focus(),a.preventDefault()),n.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(n.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=r.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Id=d.forwardRef((e,t)=>{const{__scopePopover:r,trapFocus:n,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...p}=e,m=Ct(dr,r),g=sn(r);return ho(),l.jsx(nn,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:o,onUnmountAutoFocus:a,children:l.jsx(gr,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:f,onEscapeKeyDown:i,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>m.onOpenChange(!1),children:l.jsx(fo,{"data-state":_d(m.open),role:"dialog",id:m.contentId,...g,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ad="PopoverClose",g0=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=Ct(Ad,r);return l.jsx(ne.button,{type:"button",...n,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});g0.displayName=Ad;var v0="PopoverArrow",h0=d.forwardRef((e,t)=>{const{__scopePopover:r,...n}=e,o=sn(r);return l.jsx(po,{...o,...n,ref:t})});h0.displayName=v0;function _d(e){return e?"open":"closed"}var x0=Rd,b0=jd,y0=Pd,w0=Td;function us({...e}){return l.jsx(x0,{"data-slot":"popover",...e})}function ds({...e}){return l.jsx(b0,{"data-slot":"popover-trigger",...e})}function fs({className:e,align:t="center",sideOffset:r=4,...n}){return l.jsx(y0,{children:l.jsx(w0,{"data-slot":"popover-content",align:t,sideOffset:r,className:P("qodo qodo-popover-content bg-popover text-popover-foreground 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 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-md border p-4 shadow-md outline-hidden",e),...n})})}const ps=d.forwardRef(({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:o="Search...",emptyText:a="No option found.",disabled:s=!1,readOnly:i=!1,error:c=!1,className:u,onSearchChange:f,isLoading:p=!1,loadingText:m="Loading...",...g},h)=>{const[v,x]=d.useState(!1),[b,y]=d.useState(""),[w,C]=d.useState(0),R=d.useRef(null),j=e.find(N=>N.value===t),k=N=>{y(N),f==null||f(N)};return d.useEffect(()=>{R.current&&C(R.current.offsetWidth)},[]),l.jsxs(us,{open:i?!1:v,onOpenChange:x,children:[l.jsx(ds,{asChild:!0,children:l.jsxs(Be,{ref:N=>{typeof h=="function"?h(N):h&&(h.current=N),R.current=N},variant:"outline",role:"combobox","aria-expanded":v,"aria-invalid":c||void 0,"data-readonly":i||void 0,className:P("qodo qodo-combobox w-full h-9 px-3 py-1 justify-between rounded-md","border border-purple-muted-500 bg-purple-muted-700 hover:bg-purple-muted-700","text-sm md:text-sm text-purple-muted-300 hover:text-purple-muted-300 focus:text-purple-muted-300 active:text-purple-muted-300 selection:bg-primary selection:text-primary-foreground","font-normal shadow-xs transition-[color,box-shadow] outline-none focus-visible:!ring-ring/50 focus-visible:!ring-[3px] focus-visible:!ring-offset-0","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40","disabled:!cursor-not-allowed disabled:!pointer-events-auto disabled:opacity-50 disabled:!bg-purple-muted-700 disabled:!border-purple-muted-500 disabled:!text-purple-muted-300 disabled:hover:!bg-purple-muted-700 disabled:hover:!text-purple-muted-300","data-[readonly]:opacity-100 data-[readonly]:bg-purple-muted-700 data-[readonly]:border-purple-muted-400 data-[readonly]:cursor-default data-[readonly]:text-purple-muted-200 data-[readonly]:hover:bg-purple-muted-700 data-[readonly]:hover:text-purple-muted-200",{"text-muted-foreground":!j},u),disabled:s,...g,children:[j?j.label:n,l.jsx(Fv,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),l.jsx(fs,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-purple-muted-500 text-purple-muted-300",style:{width:w>0?`${w}px`:"auto"},children:l.jsxs(xd,{className:"w-full bg-[var(--fill-interactive-neutral-idle)]",shouldFilter:!f,children:[l.jsx(bd,{placeholder:o,...!!f&&{value:b,onValueChange:k}}),l.jsx(yd,{children:p?l.jsx(t0,{children:m}):l.jsxs(l.Fragment,{children:[l.jsx(wd,{className:"flex justify-center items-center p-6 text-center text-sm text-purple-muted-300",children:a}),l.jsx(Cd,{children:e.map(N=>{const $=t===N.value;return l.jsxs(Sd,{value:N.value,keywords:[N.label],disabled:N.disabled,className:P("text-purple-100 hover:bg-purple-muted-500","focus:bg-purple-muted-500 focus:text-purple-100",{"bg-purple-muted-500":$}),onSelect:B=>{B!==t&&(r==null||r(B===t?"":B)),x(!1)},children:[l.jsx(mr,{className:P("mr-2 h-4 w-4",{"opacity-100":$,"opacity-0":!$})}),N.label]},N.value)})})]})})]})})]})});ps.displayName="Combobox";const C0=Bt("qodo qodo-badge inline-flex items-center dark:font-normal border transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 font-light gap-1",{variants:{variant:{default:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] data-[active=true]:text-[var(--text-tag-emphasis-active)] data-[active=true]:bg-[var(--fill-tag-emphasis-active)] data-[active=true]:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",primary:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] data-[active=true]:text-[var(--text-tag-emphasis-active)] data-[active=true]:bg-[var(--fill-tag-emphasis-active)] data-[active=true]:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",secondary:"border-purple-muted-600 text-purple-300",destructive:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] data-[active=true]:text-[var(--text-tag-negative-active)] data-[active=true]:bg-[var(--fill-tag-negative-active)] data-[active=true]:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",outline:"border-[var(--border-tag-neutral-idle)] bg-[var(--fill-tag-neutral-idle)] text-[var(--text-tag-neutral-idle)] hover:text-[var(--text-tag-neutral-hover)] hover:bg-[var(--fill-tag-neutral-hover)] hover:border-[var(--border-tag-neutral-hover)] data-[active=true]:text-[var(--text-tag-neutral-active)] data-[active=true]:bg-[var(--fill-tag-neutral-active)] data-[active=true]:border-[var(--border-tag-neutral-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-neutral-disabled)] aria-disabled:bg-[var(--fill-tag-neutral-disabled)] aria-disabled:border-[var(--border-tag-neutral-disabled)] ",success:"text-[var(--text-tag-positive-idle)] bg-[var(--fill-tag-positive-idle)] border-[var(--border-tag-positive-idle)] hover:text-[var(--text-tag-positive-hover)] hover:bg-[var(--fill-tag-positive-hover)] hover:border-[var(--border-tag-positive-hover)] data-[active=true]:text-[var(--text-tag-positive-active)] data-[active=true]:bg-[var(--fill-tag-positive-active)] data-[active=true]:border-[var(--border-tag-positive-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-positive-disabled)] aria-disabled:bg-[var(--fill-tag-positive-disabled)] aria-disabled:border-[var(--border-tag-positive-disabled)] ",error:"border-[var(--border-tag-negative-idle)] bg-[var(--fill-tag-negative-idle)] text-[var(--text-tag-negative-idle)] hover:text-[var(--text-tag-negative-hover)] hover:bg-[var(--fill-tag-negative-hover)] hover:border-[var(--border-tag-negative-hover)] data-[active=true]:text-[var(--text-tag-negative-active)] data-[active=true]:bg-[var(--fill-tag-negative-active)] data-[active=true]:border-[var(--border-tag-negative-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-negative-disabled)] aria-disabled:bg-[var(--fill-tag-negative-disabled)] aria-disabled:border-[var(--border-tag-negative-disabled)] ",pending:"border-[var(--border-tag-emphasis-idle)] bg-[var(--fill-tag-emphasis-idle)] text-[var(--text-tag-emphasis-idle)] hover:text-[var(--text-tag-emphasis-hover)] hover:bg-[var(--fill-tag-emphasis-hover)] hover:border-[var(--border-tag-emphasis-hover)] data-[active=true]:text-[var(--text-tag-emphasis-active)] data-[active=true]:bg-[var(--fill-tag-emphasis-active)] data-[active=true]:border-[var(--border-tag-emphasis-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-emphasis-disabled)] aria-disabled:bg-[var(--fill-tag-emphasis-disabled)] aria-disabled:border-[var(--border-tag-emphasis-disabled)] ",warning:"border-[var(--border-tag-warning-idle)] bg-[var(--fill-tag-warning-idle)] text-[var(--text-tag-warning-idle)] hover:text-[var(--text-tag-warning-hover)] hover:bg-[var(--fill-tag-warning-hover)] hover:border-[var(--border-tag-warning-hover)] data-[active=true]:text-[var(--text-tag-warning-active)] data-[active=true]:bg-[var(--fill-tag-warning-active)] data-[active=true]:border-[var(--border-tag-warning-active)] aria-disabled:cursor-not-allowed aria-disabled:text-[var(--text-tag-warning-disabled)] aria-disabled:bg-[var(--fill-tag-warning-disabled)] aria-disabled:border-[var(--border-tag-warning-disabled)] ",text:"bg-transparent border-transparent text-primary-foreground !p-0"},size:{xs:"text-[10px] px-1.5 py-0.5 rounded-sm bg-transparent hover:bg-transparent aria-disabled:bg-transparent data-[active=true]:bg-transparent",sm:"text-xs px-2.5 py-0.5 rounded-full",md:"text-sm px-2.5 py-0.5 rounded-full",lg:"text-base px-2.5 py-2 rounded-full"}},defaultVariants:{variant:"default",size:"sm"}});function Lt({className:e,variant:t,size:r,disabled:n=!1,active:o=!1,...a}){return l.jsx("div",{"aria-disabled":n,"data-active":o,className:P(C0({variant:t,size:r}),e),...a})}function Od({className:e,...t}){return l.jsx("div",{"data-slot":"card",className:P("qodo qodo-card bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm dark:bg-card dark:text-card-foreground dark:border-border",e),...t})}function Md({className:e,...t}){return l.jsx("div",{"data-slot":"card-header",className:P("qodo qodo-card-header @container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function Dd({className:e,...t}){return l.jsx("div",{"data-slot":"card-title",className:P("qodo qodo-card-title leading-none font-semibold",e),...t})}function $d({className:e,...t}){return l.jsx("div",{"data-slot":"card-description",className:P("qodo qodo-card-description text-muted-foreground text-sm dark:text-muted-foreground",e),...t})}function S0({className:e,...t}){return l.jsx("div",{"data-slot":"card-action",className:P("qodo qodo-card-action col-start-2 row-span-2 row-start-1 self-start justify-self-end",e),...t})}function Ld({className:e,...t}){return l.jsx("div",{"data-slot":"card-content",className:P("qodo qodo-card-content px-6",e),...t})}function E0({className:e,...t}){return l.jsx("div",{"data-slot":"card-footer",className:P("qodo qodo-card-footer flex items-center px-6 [.border-t]:pt-6",e),...t})}function R0(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s);i.displayName=a+"Context";const c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,k0(o,...t)]}function k0(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}var N0=Symbol.for("react.lazy"),Hn=d[" use ".trim().toString()];function j0(e){return typeof e=="object"&&e!==null&&"then"in e}function Fd(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===N0&&"_payload"in e&&j0(e._payload)}function ms(e){const t=T0(e),r=d.forwardRef((n,o)=>{let{children:a,...s}=n;Fd(a)&&typeof Hn=="function"&&(a=Hn(a._payload));const i=d.Children.toArray(a),c=i.find(A0);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var P0=ms("Slot");function T0(e){const t=d.forwardRef((r,n)=>{let{children:o,...a}=r;if(Fd(o)&&typeof Hn=="function"&&(o=Hn(o._payload)),d.isValidElement(o)){const s=O0(o),i=_0(a,o.props);return o.type!==d.Fragment&&(i.ref=n?Ae(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var I0=Symbol("radix.slottable");function A0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===I0}function _0(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function O0(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var M0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Vd=M0.reduce((e,t)=>{const r=ms(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),gs="Progress",vs=100,[D0]=R0(gs),[$0,L0]=D0(gs),Bd=d.forwardRef((e,t)=>{const{__scopeProgress:r,value:n=null,max:o,getValueLabel:a=F0,...s}=e;(o||o===0)&&!tl(o)&&console.error(V0(`${o}`,"Progress"));const i=tl(o)?o:vs;n!==null&&!rl(n,i)&&console.error(B0(`${n}`,"Progress"));const c=rl(n,i)?n:null,u=Un(c)?a(c,i):void 0;return l.jsx($0,{scope:r,value:c,max:i,children:l.jsx(Vd.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Un(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":zd(c,i),"data-value":c??void 0,"data-max":i,...s,ref:t})})});Bd.displayName=gs;var Gd="ProgressIndicator",Wd=d.forwardRef((e,t)=>{const{__scopeProgress:r,...n}=e,o=L0(Gd,r);return l.jsx(Vd.div,{"data-state":zd(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...n,ref:t})});Wd.displayName=Gd;function F0(e,t){return`${Math.round(e/t*100)}%`}function zd(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Un(e){return typeof e=="number"}function tl(e){return Un(e)&&!isNaN(e)&&e>0}function rl(e,t){return Un(e)&&!isNaN(e)&&e<=t&&e>=0}function V0(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${vs}\`.`}function B0(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
195
195
|
- a positive number
|
|
196
196
|
- less than the value passed to \`max\` (or ${vs} if no \`max\` prop is set)
|
|
197
197
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
198
198
|
|
|
199
|
-
Defaulting to \`null\`.`}var G0=Bd,W0=Wd;function z0({className:e,value:t,...r}){return l.jsx(G0,{"data-slot":"progress",className:P("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:l.jsx(W0,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function qd({className:e,...t}){return l.jsx("div",{className:P("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var No="Switch",[q0]=je(No),[H0,U0]=q0(No),Hd=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:u,form:f,...p}=e,[m,g]=d.useState(null),h=ce(t,w=>g(w)),v=d.useRef(!1),x=m?f||!!m.closest("form"):!0,[b,y]=ke({prop:o,defaultProp:a??!1,onChange:u,caller:No});return l.jsxs(H0,{scope:r,checked:b,disabled:i,children:[l.jsx(ne.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":Xd(b),"data-disabled":i?"":void 0,disabled:i,value:c,...p,ref:h,onClick:K(e.onClick,w=>{y(C=>!C),x&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})}),x&&l.jsx(Yd,{control:m,bubbles:!v.current,name:n,value:c,checked:b,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Hd.displayName=No;var Ud="SwitchThumb",Kd=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=U0(Ud,r);return l.jsx(ne.span,{"data-state":Xd(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Kd.displayName=Ud;var K0="SwitchBubbleInput",Yd=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const s=d.useRef(null),i=ce(s,a),c=xo(r),u=uo(t);return d.useEffect(()=>{const f=s.current;if(!f)return;const p=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&g){const h=new Event("click",{bubbles:n});g.call(f,r),f.dispatchEvent(h)}},[c,r,n]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Yd.displayName=K0;function Xd(e){return e?"checked":"unchecked"}var Y0=Hd,X0=Kd;const Z0=Bt("qodo qodo-switch peer inline-flex shrink-0 items-center rounded-full border transition-all outline-none shadow-lg p-0.5 disabled:cursor-not-allowed",{variants:{size:{small:"h-5 w-8",large:"h-6 w-10"}},defaultVariants:{size:"small"}}),J0=Bt("pointer-events-none block rounded-full ring-0 transition-transform shadow-lg",{variants:{size:{small:"h-[14px] w-[14px] data-[state=checked]:translate-x-[12px]",large:"h-[18px] w-[18px] data-[state=checked]:translate-x-[16px]"}},defaultVariants:{size:"small"}});function Q0({className:e,size:t,...r}){return l.jsx(Y0,{"data-slot":"switch",className:P(Z0({size:t}),"data-[state=unchecked]:border-[var(--border-input-neutral-idle)] data-[state=unchecked]:bg-[var(--fill-input-neutral-idle)]","data-[state=unchecked]:hover:border-[var(--border-input-neutral-hover)] data-[state=unchecked]:hover:bg-[var(--fill-input-neutral-hover)]","data-[state=unchecked]:active:border-[var(--border-input-neutral-active)] data-[state=unchecked]:active:bg-[var(--fill-input-neutral-active)]","data-[state=unchecked]:disabled:border-[var(--border-input-neutral-disabled)] data-[state=unchecked]:disabled:bg-[var(--fill-input-neutral-disabled)]","data-[state=checked]:border-[var(--color-purple-700)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)]","data-[state=checked]:hover:border-[var(--color-purple-600)] data-[state=checked]:hover:bg-[var(--fill-input-emphasis-hover)]","data-[state=checked]:active:border-[var(--color-purple-600)] data-[state=checked]:active:bg-[var(--fill-input-emphasis-active)]","data-[state=checked]:disabled:border-[var(--fill-input-emphasis-disabled)] data-[state=checked]:disabled:bg-[var(--fill-input-emphasis-disabled)]",e),...r,children:l.jsx(X0,{"data-slot":"switch-thumb",className:P(J0({size:t}),"data-[state=unchecked]:bg-[var(--icon-input-neutral-idle)]","data-[state=unchecked]:hover:bg-[var(--icon-input-neutral-hover)]","data-[state=unchecked]:active:bg-[var(--icon-input-neutral-active)]","data-[state=unchecked]:disabled:bg-[var(--icon-input-neutral-disabled)]","data-[state=checked]:bg-[var(--icon-input-emphasis-idle)]","data-[state=checked]:hover:bg-[var(--icon-input-emphasis-hover)]","data-[state=checked]:active:bg-[var(--icon-input-emphasis-active)]","data-[state=checked]:disabled:bg-[var(--icon-input-emphasis-disabled)]","data-[state=unchecked]:translate-x-0")})})}var Zd="Toggle",hs=d.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[s,i]=ke({prop:r,onChange:o,defaultProp:n??!1,caller:Zd});return l.jsx(ne.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:K(e.onClick,()=>{e.disabled||i(!s)})})});hs.displayName=Zd;var eC=hs;const Jd=Bt("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function tC({className:e,variant:t,size:r,...n}){return l.jsx(eC,{"data-slot":"toggle",className:P(Jd({variant:t,size:r,className:e})),...n})}var ia="rovingFocusGroup.onEntryFocus",rC={bubbles:!1,cancelable:!0},ln="RovingFocusGroup",[Pa,Qd,nC]=vo(ln),[oC,St]=je(ln,[nC]),[aC,sC]=oC(ln),ef=d.forwardRef((e,t)=>l.jsx(Pa.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Pa.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(iC,{...e,ref:t})})}));ef.displayName=ln;var iC=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,m=d.useRef(null),g=ce(t,m),h=Gt(a),[v,x]=ke({prop:s,defaultProp:i??null,onChange:c,caller:ln}),[b,y]=d.useState(!1),w=ze(u),C=Qd(r),R=d.useRef(!1),[j,k]=d.useState(0);return d.useEffect(()=>{const N=m.current;if(N)return N.addEventListener(ia,w),()=>N.removeEventListener(ia,w)},[w]),l.jsx(aC,{scope:r,orientation:n,dir:h,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(N=>x(N),[x]),onItemShiftTab:d.useCallback(()=>y(!0),[]),onFocusableItemAdd:d.useCallback(()=>k(N=>N+1),[]),onFocusableItemRemove:d.useCallback(()=>k(N=>N-1),[]),children:l.jsx(ne.div,{tabIndex:b||j===0?-1:0,"data-orientation":n,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{R.current=!0}),onFocus:K(e.onFocus,N=>{const $=!R.current;if(N.target===N.currentTarget&&$&&!b){const B=new CustomEvent(ia,rC);if(N.currentTarget.dispatchEvent(B),!B.defaultPrevented){const G=C().filter(_=>_.focusable),Q=G.find(_=>_.active),ee=G.find(_=>_.id===v),M=[Q,ee,...G].filter(Boolean).map(_=>_.ref.current);nf(M,f)}}R.current=!1}),onBlur:K(e.onBlur,()=>y(!1))})})}),tf="RovingFocusGroupItem",rf=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:s,...i}=e,c=be(),u=a||c,f=sC(tf,r),p=f.currentTabStopId===u,m=Qd(r),{onFocusableItemAdd:g,onFocusableItemRemove:h,currentTabStopId:v}=f;return d.useEffect(()=>{if(n)return g(),()=>h()},[n,g,h]),l.jsx(Pa.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:l.jsx(ne.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:K(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const b=uC(x,f.orientation,f.dir);if(b!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=m().filter(C=>C.focusable).map(C=>C.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const C=w.indexOf(x.currentTarget);w=f.loop?dC(w,C+1):w.slice(C+1)}setTimeout(()=>nf(w))}}),children:typeof s=="function"?s({isCurrentTabStop:p,hasTabStop:v!=null}):s})})});rf.displayName=tf;var lC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function uC(e,t,r){const n=cC(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return lC[n]}function nf(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function dC(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var jo=ef,Po=rf,Et="ToggleGroup",[of]=je(Et,[St]),af=St(),xs=E.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return l.jsx(fC,{...o,ref:t})}if(r==="multiple"){const o=n;return l.jsx(pC,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Et}\``)});xs.displayName=Et;var[sf,lf]=of(Et),fC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[s,i]=ke({prop:r,defaultProp:n??"",onChange:o,caller:Et});return l.jsx(sf,{scope:e.__scopeToggleGroup,type:"single",value:E.useMemo(()=>s?[s]:[],[s]),onItemActivate:i,onItemDeactivate:E.useCallback(()=>i(""),[i]),children:l.jsx(cf,{...a,ref:t})})}),pC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[s,i]=ke({prop:r,defaultProp:n??[],onChange:o,caller:Et}),c=E.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=E.useCallback(f=>i((p=[])=>p.filter(m=>m!==f)),[i]);return l.jsx(sf,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:l.jsx(cf,{...a,ref:t})})});xs.displayName=Et;var[mC,gC]=of(Et),cf=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...c}=e,u=af(r),f=Gt(s),p={role:"group",dir:f,...c};return l.jsx(mC,{scope:r,rovingFocus:o,disabled:n,children:o?l.jsx(jo,{asChild:!0,...u,orientation:a,dir:f,loop:i,children:l.jsx(ne.div,{...p,ref:t})}):l.jsx(ne.div,{...p,ref:t})})}),Kn="ToggleGroupItem",uf=E.forwardRef((e,t)=>{const r=lf(Kn,e.__scopeToggleGroup),n=gC(Kn,e.__scopeToggleGroup),o=af(e.__scopeToggleGroup),a=r.value.includes(e.value),s=n.disabled||e.disabled,i={...e,pressed:a,disabled:s},c=E.useRef(null);return n.rovingFocus?l.jsx(Po,{asChild:!0,...o,focusable:!s,active:a,ref:c,children:l.jsx(nl,{...i,ref:t})}):l.jsx(nl,{...i,ref:t})});uf.displayName=Kn;var nl=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=lf(Kn,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return l.jsx(hs,{...i,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(n):a.onItemDeactivate(n)}})}),vC=xs,hC=uf;const df=d.createContext({size:"default",variant:"default"});function xC({className:e,variant:t,size:r,children:n,...o}){return l.jsx(vC,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:P("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:l.jsx(df.Provider,{value:{variant:t,size:r},children:n})})}function bC({className:e,children:t,variant:r,size:n,...o}){const a=d.useContext(df);return l.jsx(hC,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:P(Jd({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var To="Collapsible",[yC,ff]=je(To),[wC,bs]=yC(To),pf=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[c,u]=ke({prop:n,defaultProp:o??!1,onChange:s,caller:To});return l.jsx(wC,{scope:r,disabled:a,contentId:be(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:l.jsx(ne.div,{"data-state":ws(c),"data-disabled":a?"":void 0,...i,ref:t})})});pf.displayName=To;var mf="CollapsibleTrigger",gf=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=bs(mf,r);return l.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ws(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});gf.displayName=mf;var ys="CollapsibleContent",vf=d.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=bs(ys,e.__scopeCollapsible);return l.jsx(Pe,{present:r||o.open,children:({present:a})=>l.jsx(CC,{...n,ref:t,present:a})})});vf.displayName=ys;var CC=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,s=bs(ys,r),[i,c]=d.useState(n),u=d.useRef(null),f=ce(t,u),p=d.useRef(0),m=p.current,g=d.useRef(0),h=g.current,v=s.open||i,x=d.useRef(v),b=d.useRef(void 0);return d.useEffect(()=>{const y=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(y)},[]),Ne(()=>{const y=u.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const w=y.getBoundingClientRect();p.current=w.height,g.current=w.width,x.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),c(n)}},[s.open,n]),l.jsx(ne.div,{"data-state":ws(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:v&&o})});function ws(e){return e?"open":"closed"}var SC=pf,EC=gf,RC=vf,Ke="Accordion",kC=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Cs,NC,jC]=vo(Ke),[Io]=je(Ke,[jC,ff]),Ss=ff(),hf=E.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return l.jsx(Cs.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?l.jsx(AC,{...a,ref:t}):l.jsx(IC,{...o,ref:t})})});hf.displayName=Ke;var[xf,PC]=Io(Ke),[bf,TC]=Io(Ke,{collapsible:!1}),IC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,c]=ke({prop:r,defaultProp:n??"",onChange:o,caller:Ke});return l.jsx(xf,{scope:e.__scopeAccordion,value:E.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:E.useCallback(()=>a&&c(""),[a,c]),children:l.jsx(bf,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(yf,{...s,ref:t})})})}),AC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[s,i]=ke({prop:r,defaultProp:n??[],onChange:o,caller:Ke}),c=E.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=E.useCallback(f=>i((p=[])=>p.filter(m=>m!==f)),[i]);return l.jsx(xf,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:u,children:l.jsx(bf,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(yf,{...a,ref:t})})})}),[_C,Ao]=Io(Ke),yf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...s}=e,i=E.useRef(null),c=ce(i,t),u=NC(r),p=Gt(o)==="ltr",m=K(e.onKeyDown,g=>{var N;if(!kC.includes(g.key))return;const h=g.target,v=u().filter($=>{var B;return!((B=$.ref.current)!=null&&B.disabled)}),x=v.findIndex($=>$.ref.current===h),b=v.length;if(x===-1)return;g.preventDefault();let y=x;const w=0,C=b-1,R=()=>{y=x+1,y>C&&(y=w)},j=()=>{y=x-1,y<w&&(y=C)};switch(g.key){case"Home":y=w;break;case"End":y=C;break;case"ArrowRight":a==="horizontal"&&(p?R():j());break;case"ArrowDown":a==="vertical"&&R();break;case"ArrowLeft":a==="horizontal"&&(p?j():R());break;case"ArrowUp":a==="vertical"&&j();break}const k=y%b;(N=v[k].ref.current)==null||N.focus()});return l.jsx(_C,{scope:r,disabled:n,direction:o,orientation:a,children:l.jsx(Cs.Slot,{scope:r,children:l.jsx(ne.div,{...s,"data-orientation":a,ref:c,onKeyDown:n?void 0:m})})})}),Yn="AccordionItem",[OC,Es]=Io(Yn),wf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=Ao(Yn,r),s=PC(Yn,r),i=Ss(r),c=be(),u=n&&s.value.includes(n)||!1,f=a.disabled||e.disabled;return l.jsx(OC,{scope:r,open:u,disabled:f,triggerId:c,children:l.jsx(SC,{"data-orientation":a.orientation,"data-state":Nf(u),...i,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?s.onItemOpen(n):s.onItemClose(n)}})})});wf.displayName=Yn;var Cf="AccordionHeader",Sf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Ao(Ke,r),a=Es(Cf,r);return l.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Nf(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Sf.displayName=Cf;var Ta="AccordionTrigger",Ef=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Ao(Ke,r),a=Es(Ta,r),s=TC(Ta,r),i=Ss(r);return l.jsx(Cs.ItemSlot,{scope:r,children:l.jsx(EC,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...n,ref:t})})});Ef.displayName=Ta;var Rf="AccordionContent",kf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Ao(Ke,r),a=Es(Rf,r),s=Ss(r);return l.jsx(RC,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});kf.displayName=Rf;function Nf(e){return e?"open":"closed"}var MC=hf,DC=wf,$C=Sf,LC=Ef,FC=kf;const Rs=d.createContext({variant:"default"});function VC({variant:e="default",...t}){return l.jsx(Rs.Provider,{value:{variant:e},children:l.jsx(MC,{"data-slot":"accordion",...t})})}function BC({className:e,...t}){const{variant:r}=d.useContext(Rs);return l.jsx(DC,{"data-slot":"accordion-item",className:P("qodo qodo-accordion-item","text-[var(--text-interactive-neutral-idle)] text-base font-medium leading-6","hover:text-[var(--text-interactive-neutral-hover)]",{"border-b border-[var(--color-neutral-600)]":r==="default","border border-[var(--color-neutral-600)] mb-2 px-4 rounded-lg":r==="outlined","bg-[var(--fill-interactive-neutral-idle)] mb-2 px-2 rounded-lg":r==="filled"},e),...t})}function GC({className:e,children:t,iconPosition:r="right",...n}){const{variant:o}=d.useContext(Rs);return l.jsx($C,{className:"flex",children:l.jsxs(LC,{"data-slot":"accordion-trigger",className:P("qodo qodo-accordion-trigger","flex flex-1 items-start justify-between gap-4 rounded-md","text-left text-sm font-medium transition-all outline-none","text-text-interactive-neutral-idle cursor-pointer","hover:text-[var(--text-interactive-neutral-hover)]","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","[&[data-state=open]>svg]:rotate-180","dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",{"py-4":o!=="filled","py-2":o==="filled","flex-row-reverse justify-end gap-2":r==="left"},e),...n,children:[t,l.jsx(oo,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function WC({className:e,children:t,...r}){return l.jsx(FC,{"data-slot":"accordion-content",className:P("qodo qodo-accordion-content","overflow-hidden text-sm text-foreground","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down","dark:text-foreground"),...r,children:l.jsx("div",{className:P("pt-0 pb-4","text-text-interactive-neutral-idle font-normal text-sm",e),children:t})})}var _o="Tabs",[zC]=je(_o,[St]),jf=St(),[qC,ks]=zC(_o),Pf=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:c="automatic",...u}=e,f=Gt(i),[p,m]=ke({prop:n,onChange:o,defaultProp:a??"",caller:_o});return l.jsx(qC,{scope:r,baseId:be(),value:p,onValueChange:m,orientation:s,dir:f,activationMode:c,children:l.jsx(ne.div,{dir:f,"data-orientation":s,...u,ref:t})})});Pf.displayName=_o;var Tf="TabsList",If=d.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=ks(Tf,r),s=jf(r);return l.jsx(jo,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:l.jsx(ne.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});If.displayName=Tf;var Af="TabsTrigger",_f=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,s=ks(Af,r),i=jf(r),c=Df(s.baseId,n),u=$f(s.baseId,n),f=n===s.value;return l.jsx(Po,{asChild:!0,...i,focusable:!o,active:f,children:l.jsx(ne.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:K(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(n):p.preventDefault()}),onKeyDown:K(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(n)}),onFocus:K(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(n)})})})});_f.displayName=Af;var Of="TabsContent",Mf=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...s}=e,i=ks(Of,r),c=Df(i.baseId,n),u=$f(i.baseId,n),f=n===i.value,p=d.useRef(f);return d.useEffect(()=>{const m=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(Pe,{present:o||f,children:({present:m})=>l.jsx(ne.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:m&&a})})});Mf.displayName=Of;function Df(e,t){return`${e}-trigger-${t}`}function $f(e,t){return`${e}-content-${t}`}var HC=Pf,UC=If,KC=_f,YC=Mf;function XC({className:e,...t}){return l.jsx(HC,{"data-slot":"tabs",className:P("qodo qodo-tabs flex flex-col gap-2",e),...t})}function ZC({className:e,...t}){return l.jsx(UC,{"data-slot":"tabs-list",className:P("inline-flex w-full items-end justify-start gap-4",e),...t})}function JC({className:e,...t}){return l.jsx(KC,{"data-slot":"tabs-trigger",className:P("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)] data-[state=active]:text-[var(--text-interactive-emphasis-active)] focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 border-b border-transparent py-4 text-xs font-normal whitespace-nowrap transition-[color,border-color] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:border-[var(--color-purple-400)] relative -mb-px tracking-[0.01em] leading-[150%] cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function QC({className:e,...t}){return l.jsx(YC,{"data-slot":"tabs-content",className:P("flex-1 outline-none",e),...t})}const Lf=Bt("qodo qodo-typography",{variants:{variant:{h1:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold tracking-tight",h5:"scroll-m-20 text-lg font-semibold tracking-tight",h6:"scroll-m-20 text-base font-semibold tracking-tight",p:"leading-7 [&:not(:first-child)]:mt-6",lead:"text-xl text-muted-foreground dark:text-muted-foreground",large:"text-lg font-semibold",small:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground dark:text-muted-foreground",body:"text-base leading-relaxed",caption:"text-xs text-muted-foreground dark:text-muted-foreground",code:"font-plex-mono relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-sm font-semibold dark:bg-muted","code-inline":"font-plex-mono relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-xs dark:bg-muted","code-block":"font-plex-mono block w-full rounded-lg bg-muted p-4 text-sm leading-relaxed dark:bg-muted overflow-x-auto",blockquote:"mt-6 border-l-2 pl-6 italic text-muted-foreground dark:text-muted-foreground",list:"my-6 ml-6 list-disc [&>li]:mt-2","list-ordered":"my-6 ml-6 list-decimal [&>li]:mt-2"}},defaultVariants:{variant:"p"}}),Ff=d.forwardRef(({className:e,variant:t,as:r,...n},o)=>{const a=r||eS(t)||"p";return d.createElement(a,{className:P(Lf({variant:t,className:e})),ref:o,...n})});Ff.displayName="Typography";function eS(e){switch(e){case"list":return"ul";case"list-ordered":return"ol";case"code-inline":return"code";case"code-block":return"pre";case"lead":case"large":case"small":case"muted":case"body":case"caption":return"p";default:return e||"p"}}function tS(e){return Object.prototype.toString.call(e)==="[object Object]"}function ol(e){return tS(e)||Array.isArray(e)}function rS(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ns(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==a?!1:r.every(s=>{const i=e[s],c=t[s];return typeof i=="function"?`${i}`==`${c}`:!ol(i)||!ol(c)?i===c:Ns(i,c)})}function al(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function nS(e,t){if(e.length!==t.length)return!1;const r=al(e),n=al(t);return r.every((o,a)=>{const s=n[a];return Ns(o,s)})}function js(e){return typeof e=="number"}function Ia(e){return typeof e=="string"}function Oo(e){return typeof e=="boolean"}function sl(e){return Object.prototype.toString.call(e)==="[object Object]"}function xe(e){return Math.abs(e)}function Ps(e){return Math.sign(e)}function Br(e,t){return xe(e-t)}function oS(e,t){if(e===0||t===0||xe(e)<=xe(t))return 0;const r=Br(xe(e),xe(t));return xe(r/e)}function aS(e){return Math.round(e*100)/100}function Hr(e){return Ur(e).map(Number)}function We(e){return e[cn(e)]}function cn(e){return Math.max(0,e.length-1)}function Ts(e,t){return t===cn(e)}function il(e,t=0){return Array.from(Array(e),(r,n)=>t+n)}function Ur(e){return Object.keys(e)}function Vf(e,t){return[e,t].reduce((r,n)=>(Ur(n).forEach(o=>{const a=r[o],s=n[o],i=sl(a)&&sl(s);r[o]=i?Vf(a,s):s}),r),{})}function Aa(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function sS(e,t){const r={start:n,center:o,end:a};function n(){return 0}function o(c){return a(c)/2}function a(c){return t-c}function s(c,u){return Ia(e)?r[e](c):e(t,c,u)}return{measure:s}}function Kr(){let e=[];function t(o,a,s,i={passive:!0}){let c;if("addEventListener"in o)o.addEventListener(a,s,i),c=()=>o.removeEventListener(a,s,i);else{const u=o;u.addListener(s),c=()=>u.removeListener(s)}return e.push(c),n}function r(){e=e.filter(o=>o())}const n={add:t,clear:r};return n}function iS(e,t,r,n){const o=Kr(),a=1e3/60;let s=null,i=0,c=0;function u(){o.add(e,"visibilitychange",()=>{e.hidden&&h()})}function f(){g(),o.clear()}function p(x){if(!c)return;s||(s=x,r(),r());const b=x-s;for(s=x,i+=b;i>=a;)r(),i-=a;const y=i/a;n(y),c&&(c=t.requestAnimationFrame(p))}function m(){c||(c=t.requestAnimationFrame(p))}function g(){t.cancelAnimationFrame(c),s=null,i=0,c=0}function h(){s=null,i=0}return{init:u,destroy:f,start:m,stop:g,update:r,render:n}}function lS(e,t){const r=t==="rtl",n=e==="y",o=n?"y":"x",a=n?"x":"y",s=!n&&r?-1:1,i=f(),c=p();function u(h){const{height:v,width:x}=h;return n?v:x}function f(){return n?"top":r?"right":"left"}function p(){return n?"bottom":r?"left":"right"}function m(h){return h*s}return{scroll:o,cross:a,startEdge:i,endEdge:c,measureSize:u,direction:m}}function Ft(e=0,t=0){const r=xe(e-t);function n(u){return u<e}function o(u){return u>t}function a(u){return n(u)||o(u)}function s(u){return a(u)?n(u)?e:t:u}function i(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:s,reachedAny:a,reachedMax:o,reachedMin:n,removeOffset:i}}function Bf(e,t,r){const{constrain:n}=Ft(0,e),o=e+1;let a=s(t);function s(m){return r?xe((o+m)%o):n(m)}function i(){return a}function c(m){return a=s(m),p}function u(m){return f().set(i()+m)}function f(){return Bf(e,i(),r)}const p={get:i,set:c,add:u,clone:f};return p}function cS(e,t,r,n,o,a,s,i,c,u,f,p,m,g,h,v,x,b,y){const{cross:w,direction:C}=e,R=["INPUT","SELECT","TEXTAREA"],j={passive:!1},k=Kr(),N=Kr(),$=Ft(50,225).constrain(g.measure(20)),B={mouse:300,touch:400},G={mouse:500,touch:600},Q=h?43:25;let ee=!1,W=0,M=0,_=!1,D=!1,T=!1,O=!1;function U(L){if(!y)return;function se(me){(Oo(y)||y(L,me))&&F(me)}const le=t;k.add(le,"dragstart",me=>me.preventDefault(),j).add(le,"touchmove",()=>{},j).add(le,"touchend",()=>{}).add(le,"touchstart",se).add(le,"mousedown",se).add(le,"touchcancel",z).add(le,"contextmenu",z).add(le,"click",Z,!0)}function J(){k.clear(),N.clear()}function I(){const L=O?r:t;N.add(L,"touchmove",A,j).add(L,"touchend",z).add(L,"mousemove",A,j).add(L,"mouseup",z)}function q(L){const se=L.nodeName||"";return R.includes(se)}function X(){return(h?G:B)[O?"mouse":"touch"]}function Y(L,se){const le=p.add(Ps(L)*-1),me=f.byDistance(L,!h).distance;return h||xe(L)<$?me:x&&se?me*.5:f.byIndex(le.get(),0).distance}function F(L){const se=Aa(L,n);O=se,T=h&&se&&!L.buttons&&ee,ee=Br(o.get(),s.get())>=2,!(se&&L.button!==0)&&(q(L.target)||(_=!0,a.pointerDown(L),u.useFriction(0).useDuration(0),o.set(s),I(),W=a.readPoint(L),M=a.readPoint(L,w),m.emit("pointerDown")))}function A(L){if(!Aa(L,n)&&L.touches.length>=2)return z(L);const le=a.readPoint(L),me=a.readPoint(L,w),ve=Br(le,W),Ee=Br(me,M);if(!D&&!O&&(!L.cancelable||(D=ve>Ee,!D)))return z(L);const Le=a.pointerMove(L);ve>v&&(T=!0),u.useFriction(.3).useDuration(.75),i.start(),o.add(C(Le)),L.preventDefault()}function z(L){const le=f.byDistance(0,!1).index!==p.get(),me=a.pointerUp(L)*X(),ve=Y(C(me),le),Ee=oS(me,ve),Le=Q-10*Ee,Re=b+Ee/50;D=!1,_=!1,N.clear(),u.useDuration(Le).useFriction(Re),c.distance(ve,!h),O=!1,m.emit("pointerUp")}function Z(L){T&&(L.stopPropagation(),L.preventDefault(),T=!1)}function H(){return _}return{init:U,destroy:J,pointerDown:H}}function uS(e,t){let n,o;function a(p){return p.timeStamp}function s(p,m){const h=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(Aa(p,t)?p:p.touches[0])[h]}function i(p){return n=p,o=p,s(p)}function c(p){const m=s(p)-s(o),g=a(p)-a(n)>170;return o=p,g&&(n=p),m}function u(p){if(!n||!o)return 0;const m=s(o)-s(n),g=a(p)-a(n),h=a(p)-a(o)>170,v=m/g;return g&&!h&&xe(v)>.1?v:0}return{pointerDown:i,pointerMove:c,pointerUp:u,readPoint:s}}function dS(){function e(r){const{offsetTop:n,offsetLeft:o,offsetWidth:a,offsetHeight:s}=r;return{top:n,right:o+a,bottom:n+s,left:o,width:a,height:s}}return{measure:e}}function fS(e){function t(n){return e*(n/100)}return{measure:t}}function pS(e,t,r,n,o,a,s){const i=[e].concat(n);let c,u,f=[],p=!1;function m(x){return o.measureSize(s.measure(x))}function g(x){if(!a)return;u=m(e),f=n.map(m);function b(y){for(const w of y){if(p)return;const C=w.target===e,R=n.indexOf(w.target),j=C?u:f[R],k=m(C?e:n[R]);if(xe(k-j)>=.5){x.reInit(),t.emit("resize");break}}}c=new ResizeObserver(y=>{(Oo(a)||a(x,y))&&b(y)}),r.requestAnimationFrame(()=>{i.forEach(y=>c.observe(y))})}function h(){p=!0,c&&c.disconnect()}return{init:g,destroy:h}}function mS(e,t,r,n,o,a){let s=0,i=0,c=o,u=a,f=e.get(),p=0;function m(){const j=n.get()-e.get(),k=!c;let N=0;return k?(s=0,r.set(n),e.set(n),N=j):(r.set(e),s+=j/c,s*=u,f+=s,e.add(s),N=f-p),i=Ps(N),p=f,R}function g(){const j=n.get()-t.get();return xe(j)<.001}function h(){return c}function v(){return i}function x(){return s}function b(){return w(o)}function y(){return C(a)}function w(j){return c=j,R}function C(j){return u=j,R}const R={direction:v,duration:h,velocity:x,seek:m,settled:g,useBaseFriction:y,useBaseDuration:b,useFriction:C,useDuration:w};return R}function gS(e,t,r,n,o){const a=o.measure(10),s=o.measure(50),i=Ft(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function f(g){if(!u())return;const h=e.reachedMin(t.get())?"min":"max",v=xe(e[h]-t.get()),x=r.get()-t.get(),b=i.constrain(v/s);r.subtract(x*b),!g&&xe(x)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function p(g){c=!g}return{shouldConstrain:u,constrain:f,toggleActive:p}}function vS(e,t,r,n,o){const a=Ft(-t+e,0),s=p(),i=f(),c=m();function u(h,v){return Br(h,v)<=1}function f(){const h=s[0],v=We(s),x=s.lastIndexOf(h),b=s.indexOf(v)+1;return Ft(x,b)}function p(){return r.map((h,v)=>{const{min:x,max:b}=a,y=a.constrain(h),w=!v,C=Ts(r,v);return w?b:C||u(x,y)?x:u(b,y)?b:y}).map(h=>parseFloat(h.toFixed(3)))}function m(){if(t<=e+o)return[a.max];if(n==="keepSnaps")return s;const{min:h,max:v}=i;return s.slice(h,v)}return{snapsContained:c,scrollContainLimit:i}}function hS(e,t,r){const n=t[0],o=r?n-e:We(t);return{limit:Ft(o,n)}}function xS(e,t,r,n){const a=t.min+.1,s=t.max+.1,{reachedMin:i,reachedMax:c}=Ft(a,s);function u(m){return m===1?c(r.get()):m===-1?i(r.get()):!1}function f(m){if(!u(m))return;const g=e*(m*-1);n.forEach(h=>h.add(g))}return{loop:f}}function bS(e){const{max:t,length:r}=e;function n(a){const s=a-t;return r?s/-r:0}return{get:n}}function yS(e,t,r,n,o){const{startEdge:a,endEdge:s}=e,{groupSlides:i}=o,c=p().map(t.measure),u=m(),f=g();function p(){return i(n).map(v=>We(v)[s]-v[0][a]).map(xe)}function m(){return n.map(v=>r[a]-v[a]).map(v=>-xe(v))}function g(){return i(u).map(v=>v[0]).map((v,x)=>v+c[x])}return{snaps:u,snapsAligned:f}}function wS(e,t,r,n,o,a){const{groupSlides:s}=o,{min:i,max:c}=n,u=f();function f(){const m=s(a),g=!e||t==="keepSnaps";return r.length===1?[a]:g?m:m.slice(i,c).map((h,v,x)=>{const b=!v,y=Ts(x,v);if(b){const w=We(x[0])+1;return il(w)}if(y){const w=cn(a)-We(x)[0]+1;return il(w,We(x)[0])}return h})}return{slideRegistry:u}}function CS(e,t,r,n,o){const{reachedAny:a,removeOffset:s,constrain:i}=n;function c(h){return h.concat().sort((v,x)=>xe(v)-xe(x))[0]}function u(h){const v=e?s(h):i(h),x=t.map((y,w)=>({diff:f(y-v,0),index:w})).sort((y,w)=>xe(y.diff)-xe(w.diff)),{index:b}=x[0];return{index:b,distance:v}}function f(h,v){const x=[h,h+r,h-r];if(!e)return h;if(!v)return c(x);const b=x.filter(y=>Ps(y)===v);return b.length?c(b):We(x)-r}function p(h,v){const x=t[h]-o.get(),b=f(x,v);return{index:h,distance:b}}function m(h,v){const x=o.get()+h,{index:b,distance:y}=u(x),w=!e&&a(x);if(!v||w)return{index:b,distance:h};const C=t[b]-y,R=h+f(C,0);return{index:b,distance:R}}return{byDistance:m,byIndex:p,shortcut:f}}function SS(e,t,r,n,o,a,s){function i(p){const m=p.distance,g=p.index!==t.get();a.add(m),m&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),g&&(r.set(t.get()),t.set(p.index),s.emit("select"))}function c(p,m){const g=o.byDistance(p,m);i(g)}function u(p,m){const g=t.clone().set(p),h=o.byIndex(g.get(),m);i(h)}return{distance:c,index:u}}function ES(e,t,r,n,o,a,s,i){const c={passive:!0,capture:!0};let u=0;function f(g){if(!i)return;function h(v){if(new Date().getTime()-u>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;const y=r.findIndex(w=>w.includes(v));js(y)&&(o.useDuration(0),n.index(y,0),s.emit("slideFocus"))}a.add(document,"keydown",p,!1),t.forEach((v,x)=>{a.add(v,"focus",b=>{(Oo(i)||i(g,b))&&h(x)},c)})}function p(g){g.code==="Tab"&&(u=new Date().getTime())}return{init:f}}function Mr(e){let t=e;function r(){return t}function n(c){t=s(c)}function o(c){t+=s(c)}function a(c){t-=s(c)}function s(c){return js(c)?c:c.get()}return{get:r,set:n,add:o,subtract:a}}function Gf(e,t){const r=e.scroll==="x"?s:i,n=t.style;let o=null,a=!1;function s(m){return`translate3d(${m}px,0px,0px)`}function i(m){return`translate3d(0px,${m}px,0px)`}function c(m){if(a)return;const g=aS(e.direction(m));g!==o&&(n.transform=r(g),o=g)}function u(m){a=!m}function f(){a||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:f,to:c,toggleActive:u}}function RS(e,t,r,n,o,a,s,i,c){const f=Hr(o),p=Hr(o).reverse(),m=b().concat(y());function g(k,N){return k.reduce(($,B)=>$-o[B],N)}function h(k,N){return k.reduce(($,B)=>g($,N)>0?$.concat([B]):$,[])}function v(k){return a.map((N,$)=>({start:N-n[$]+.5+k,end:N+t-.5+k}))}function x(k,N,$){const B=v(N);return k.map(G=>{const Q=$?0:-r,ee=$?r:0,W=$?"end":"start",M=B[G][W];return{index:G,loopPoint:M,slideLocation:Mr(-1),translate:Gf(e,c[G]),target:()=>i.get()>M?Q:ee}})}function b(){const k=s[0],N=h(p,k);return x(N,r,!1)}function y(){const k=t-s[0]-1,N=h(f,k);return x(N,-r,!0)}function w(){return m.every(({index:k})=>{const N=f.filter($=>$!==k);return g(N,t)<=.1})}function C(){m.forEach(k=>{const{target:N,translate:$,slideLocation:B}=k,G=N();G!==B.get()&&($.to(G),B.set(G))})}function R(){m.forEach(k=>k.translate.clear())}return{canLoop:w,clear:R,loop:C,loopPoints:m}}function kS(e,t,r){let n,o=!1;function a(c){if(!r)return;function u(f){for(const p of f)if(p.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(f=>{o||(Oo(r)||r(c,f))&&u(f)}),n.observe(e,{childList:!0})}function s(){n&&n.disconnect(),o=!0}return{init:a,destroy:s}}function NS(e,t,r,n){const o={};let a=null,s=null,i,c=!1;function u(){i=new IntersectionObserver(h=>{c||(h.forEach(v=>{const x=t.indexOf(v.target);o[x]=v}),a=null,s=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(h=>i.observe(h))}function f(){i&&i.disconnect(),c=!0}function p(h){return Ur(o).reduce((v,x)=>{const b=parseInt(x),{isIntersecting:y}=o[b];return(h&&y||!h&&!y)&&v.push(b),v},[])}function m(h=!0){if(h&&a)return a;if(!h&&s)return s;const v=p(h);return h&&(a=v),h||(s=v),v}return{init:u,destroy:f,get:m}}function jS(e,t,r,n,o,a){const{measureSize:s,startEdge:i,endEdge:c}=e,u=r[0]&&o,f=h(),p=v(),m=r.map(s),g=x();function h(){if(!u)return 0;const y=r[0];return xe(t[i]-y[i])}function v(){if(!u)return 0;const y=a.getComputedStyle(We(n));return parseFloat(y.getPropertyValue(`margin-${c}`))}function x(){return r.map((y,w,C)=>{const R=!w,j=Ts(C,w);return R?m[w]+f:j?m[w]+p:C[w+1][i]-y[i]}).map(xe)}return{slideSizes:m,slideSizesWithGaps:g,startGap:f,endGap:p}}function PS(e,t,r,n,o,a,s,i,c){const{startEdge:u,endEdge:f,direction:p}=e,m=js(r);function g(b,y){return Hr(b).filter(w=>w%y===0).map(w=>b.slice(w,w+y))}function h(b){return b.length?Hr(b).reduce((y,w,C)=>{const R=We(y)||0,j=R===0,k=w===cn(b),N=o[u]-a[R][u],$=o[u]-a[w][f],B=!n&&j?p(s):0,G=!n&&k?p(i):0,Q=xe($-G-(N+B));return C&&Q>t+c&&y.push(w),k&&y.push(b.length),y},[]).map((y,w,C)=>{const R=Math.max(C[w-1]||0);return b.slice(R,y)}):[]}function v(b){return m?g(b,r):h(b)}return{groupSlides:v}}function TS(e,t,r,n,o,a,s){const{align:i,axis:c,direction:u,startIndex:f,loop:p,duration:m,dragFree:g,dragThreshold:h,inViewThreshold:v,slidesToScroll:x,skipSnaps:b,containScroll:y,watchResize:w,watchSlides:C,watchDrag:R,watchFocus:j}=a,k=2,N=dS(),$=N.measure(t),B=r.map(N.measure),G=lS(c,u),Q=G.measureSize($),ee=fS(Q),W=sS(i,Q),M=!p&&!!y,_=p||!!y,{slideSizes:D,slideSizesWithGaps:T,startGap:O,endGap:U}=jS(G,$,B,r,_,o),J=PS(G,Q,x,p,$,B,O,U,k),{snaps:I,snapsAligned:q}=yS(G,W,$,B,J),X=-We(I)+We(T),{snapsContained:Y,scrollContainLimit:F}=vS(Q,X,q,y,k),A=M?Y:q,{limit:z}=hS(X,A,p),Z=Bf(cn(A),f,p),H=Z.clone(),te=Hr(r),L=({dragHandler:at,scrollBody:Sr,scrollBounds:Er,options:{loop:Kt}})=>{Kt||Er.constrain(at.pointerDown()),Sr.seek()},se=({scrollBody:at,translate:Sr,location:Er,offsetLocation:Kt,previousLocation:Bo,scrollLooper:Go,slideLooper:Wo,dragHandler:zo,animation:Rr,eventHandler:kr,scrollBounds:dt,options:{loop:Yt}},Xt)=>{const Nr=at.settled(),qo=!dt.shouldConstrain(),jr=Yt?Nr:Nr&&qo,wn=jr&&!zo.pointerDown();wn&&Rr.stop();const Cn=Er.get()*Xt+Bo.get()*(1-Xt);Kt.set(Cn),Yt&&(Go.loop(at.direction()),Wo.loop()),Sr.to(Kt.get()),wn&&kr.emit("settle"),jr||kr.emit("scroll")},le=iS(n,o,()=>L(Ut),at=>se(Ut,at)),me=.68,ve=A[Z.get()],Ee=Mr(ve),Le=Mr(ve),Re=Mr(ve),ot=Mr(ve),jt=mS(Ee,Re,Le,ot,m,me),Pt=CS(p,A,X,z,ot),yr=SS(le,Z,H,jt,Pt,ot,s),bn=bS(z),wr=Kr(),yn=NS(t,r,s,v),{slideRegistry:Cr}=wS(M,y,A,F,J,te),Vo=ES(e,r,Cr,yr,jt,wr,s,j),Ut={ownerDocument:n,ownerWindow:o,eventHandler:s,containerRect:$,slideRects:B,animation:le,axis:G,dragHandler:cS(G,e,n,o,ot,uS(G,o),Ee,le,yr,jt,Pt,Z,s,ee,g,h,b,me,R),eventStore:wr,percentOfView:ee,index:Z,indexPrevious:H,limit:z,location:Ee,offsetLocation:Re,previousLocation:Le,options:a,resizeHandler:pS(t,s,o,r,G,w,N),scrollBody:jt,scrollBounds:gS(z,Re,ot,jt,ee),scrollLooper:xS(X,z,Re,[Ee,Re,Le,ot]),scrollProgress:bn,scrollSnapList:A.map(bn.get),scrollSnaps:A,scrollTarget:Pt,scrollTo:yr,slideLooper:RS(G,Q,X,D,T,I,A,Re,r),slideFocus:Vo,slidesHandler:kS(t,s,C),slidesInView:yn,slideIndexes:te,slideRegistry:Cr,slidesToScroll:J,target:ot,translate:Gf(G,t)};return Ut}function IS(){let e={},t;function r(u){t=u}function n(u){return e[u]||[]}function o(u){return n(u).forEach(f=>f(t,u)),c}function a(u,f){return e[u]=n(u).concat([f]),c}function s(u,f){return e[u]=n(u).filter(p=>p!==f),c}function i(){e={}}const c={init:r,emit:o,off:s,on:a,clear:i};return c}const AS={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function _S(e){function t(a,s){return Vf(a,s||{})}function r(a){const s=a.breakpoints||{},i=Ur(s).filter(c=>e.matchMedia(c).matches).map(c=>s[c]).reduce((c,u)=>t(c,u),{});return t(a,i)}function n(a){return a.map(s=>Ur(s.breakpoints||{})).reduce((s,i)=>s.concat(i),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function OS(e){let t=[];function r(a,s){return t=s.filter(({options:i})=>e.optionsAtMedia(i).active!==!1),t.forEach(i=>i.init(a,e)),s.reduce((i,c)=>Object.assign(i,{[c.name]:c}),{})}function n(){t=t.filter(a=>a.destroy())}return{init:r,destroy:n}}function Xn(e,t,r){const n=e.ownerDocument,o=n.defaultView,a=_S(o),s=OS(a),i=Kr(),c=IS(),{mergeOptions:u,optionsAtMedia:f,optionsMediaQueries:p}=a,{on:m,off:g,emit:h}=c,v=G;let x=!1,b,y=u(AS,Xn.globalOptions),w=u(y),C=[],R,j,k;function N(){const{container:te,slides:L}=w;j=(Ia(te)?e.querySelector(te):te)||e.children[0];const le=Ia(L)?j.querySelectorAll(L):L;k=[].slice.call(le||j.children)}function $(te){const L=TS(e,j,k,n,o,te,c);if(te.loop&&!L.slideLooper.canLoop()){const se=Object.assign({},te,{loop:!1});return $(se)}return L}function B(te,L){x||(y=u(y,te),w=f(y),C=L||C,N(),b=$(w),p([y,...C.map(({options:se})=>se)]).forEach(se=>i.add(se,"change",G)),w.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(H),b.eventHandler.init(H),b.resizeHandler.init(H),b.slidesHandler.init(H),b.options.loop&&b.slideLooper.loop(),j.offsetParent&&k.length&&b.dragHandler.init(H),R=s.init(H,C)))}function G(te,L){const se=J();Q(),B(u({startIndex:se},te),L),c.emit("reInit")}function Q(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),s.destroy(),i.clear()}function ee(){x||(x=!0,i.clear(),Q(),c.emit("destroy"),c.clear())}function W(te,L,se){!w.active||x||(b.scrollBody.useBaseFriction().useDuration(L===!0?0:w.duration),b.scrollTo.index(te,se||0))}function M(te){const L=b.index.add(1).get();W(L,te,-1)}function _(te){const L=b.index.add(-1).get();W(L,te,1)}function D(){return b.index.add(1).get()!==J()}function T(){return b.index.add(-1).get()!==J()}function O(){return b.scrollSnapList}function U(){return b.scrollProgress.get(b.offsetLocation.get())}function J(){return b.index.get()}function I(){return b.indexPrevious.get()}function q(){return b.slidesInView.get()}function X(){return b.slidesInView.get(!1)}function Y(){return R}function F(){return b}function A(){return e}function z(){return j}function Z(){return k}const H={canScrollNext:D,canScrollPrev:T,containerNode:z,internalEngine:F,destroy:ee,off:g,on:m,emit:h,plugins:Y,previousScrollSnap:I,reInit:v,rootNode:A,scrollNext:M,scrollPrev:_,scrollProgress:U,scrollSnapList:O,scrollTo:W,selectedScrollSnap:J,slideNodes:Z,slidesInView:q,slidesNotInView:X};return B(t,r),setTimeout(()=>c.emit("init"),0),H}Xn.globalOptions=void 0;function Is(e={},t=[]){const r=E.useRef(e),n=E.useRef(t),[o,a]=E.useState(),[s,i]=E.useState(),c=E.useCallback(()=>{o&&o.reInit(r.current,n.current)},[o]);return E.useEffect(()=>{Ns(r.current,e)||(r.current=e,c())},[e,c]),E.useEffect(()=>{nS(n.current,t)||(n.current=t,c())},[t,c]),E.useEffect(()=>{if(rS()&&s){Xn.globalOptions=Is.globalOptions;const u=Xn(s,r.current,n.current);return a(u),()=>u.destroy()}else a(void 0)},[s,a]),[i,o]}Is.globalOptions=void 0;const Wf=d.createContext(null),As=d.createContext(null);function un(){const e=d.useContext(Wf);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function MS({orientation:e="horizontal",opts:t,setApi:r,plugins:n,className:o,children:a,...s}){const[i,c]=Is({...t,axis:e==="horizontal"?"x":"y"},n),[u,f]=d.useState(!1),[p,m]=d.useState(!1),g=d.useCallback(y=>{y&&(f(y.canScrollPrev()),m(y.canScrollNext()))},[]),h=d.useCallback(()=>{c==null||c.scrollPrev()},[c]),v=d.useCallback(()=>{c==null||c.scrollNext()},[c]),x=d.useCallback(y=>{c==null||c.scrollTo(y)},[c]),b=d.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),h()):y.key==="ArrowRight"&&(y.preventDefault(),v())},[h,v]);return d.useEffect(()=>{!c||!r||r(c)},[c,r]),d.useEffect(()=>{if(c)return g(c),c.on("reInit",g),c.on("select",g),()=>{c==null||c.off("reInit",g),c==null||c.off("select",g)}},[c,g]),l.jsx(Wf.Provider,{value:{carouselRef:i,api:c,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:h,scrollNext:v,scrollTo:x,canScrollPrev:u,canScrollNext:p},children:l.jsx("div",{onKeyDownCapture:b,className:P("qodo qodo-carousel","relative",o),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...s,children:a})})}function DS({className:e,...t}){const{carouselRef:r,orientation:n}=un();return l.jsx("div",{ref:r,className:"qodo qodo-carousel-content overflow-hidden","data-slot":"carousel-content",children:l.jsx("div",{className:P("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function $S({className:e,...t}){const{orientation:r}=un();return l.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:P("qodo qodo-carousel-item min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})}function LS({className:e,variant:t="outline",size:r="icon",icon:n=oc,screenReaderLabel:o="Previous slide",...a}){var p;const{orientation:s,scrollPrev:i,canScrollPrev:c}=un(),u=(p=d.useContext(As))==null?void 0:p.isInFooter,f=P("qodo qodo-carousel-previous size-8 rounded-md",u?"flex-shrink-0":s==="horizontal"?"absolute top-1/2 -left-12 -translate-y-1/2":"absolute -top-12 left-1/2 -translate-x-1/2 rotate-90",e);return l.jsxs(Be,{"data-slot":"carousel-previous",variant:t,size:r,className:f,disabled:!c,onClick:i,...a,children:[l.jsx(n,{}),l.jsx("span",{className:"sr-only",children:o})]})}function FS({className:e,variant:t="outline",size:r="icon",icon:n=Ga,screenReaderLabel:o="Next slide",...a}){var p;const{orientation:s,scrollNext:i,canScrollNext:c}=un(),u=(p=d.useContext(As))==null?void 0:p.isInFooter,f=P("qodo qodo-carousel-next size-8 rounded-md flex-shrink-0",u?"flex-shrink-0":s==="horizontal"?"absolute top-1/2 -right-12 -translate-y-1/2":"absolute -bottom-12 left-1/2 -translate-x-1/2 rotate-90",e);return l.jsxs(Be,{"data-slot":"carousel-next",variant:t,size:r,className:f,disabled:!c,onClick:i,...a,children:[l.jsx(n,{}),l.jsx("span",{className:"sr-only",children:o})]})}function VS({className:e,...t}){return l.jsx(As.Provider,{value:{isInFooter:!0},children:l.jsx("div",{className:P("flex items-center justify-center gap-2 py-2",e),...t})})}function BS({className:e,children:t,index:r,isCurrent:n,...o}){const{scrollTo:a}=un(),s=P("text-xs uppercase",n?"!text-[var(--color-text-bg-neutral-strong)]":"!text-[var(--color-text-bg-neutral-mild)]",e);return l.jsx(Be,{variant:"ghost",className:s,disabled:n,onClick:()=>a(r),...o,children:t??`Step ${r+1}`})}var GS=e=>e.type==="checkbox",Dr=e=>e instanceof Date,_s=e=>e==null;const zf=e=>typeof e=="object";var Vt=e=>!_s(e)&&!Array.isArray(e)&&zf(e)&&!Dr(e),WS=e=>Vt(e)&&e.target?GS(e.target)?e.target.checked:e.target.value:e,zS=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qS=(e,t)=>e.has(zS(t)),HS=e=>{const t=e.constructor&&e.constructor.prototype;return Vt(t)&&t.hasOwnProperty("isPrototypeOf")},US=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function qf(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(US&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Vt(e)&&HS(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=qf(e[o]));return n}var Hf=e=>/^\w*$/.test(e),_a=e=>e===void 0,KS=e=>Array.isArray(e)?e.filter(Boolean):[],Uf=e=>KS(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,r)=>{if(!t||!Vt(e))return r;const n=(Hf(t)?[t]:Uf(t)).reduce((o,a)=>_s(o)?o:o[a],e);return _a(n)||n===e?_a(e[t])?r:e[t]:n},la=e=>typeof e=="boolean",An=e=>typeof e=="function",ll=(e,t,r)=>{let n=-1;const o=Hf(t)?[t]:Uf(t),a=o.length,s=a-1;for(;++n<a;){const i=o[n];let c=r;if(n!==s){const u=e[i];c=Vt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const cl={BLUR:"blur",CHANGE:"change"},ul={all:"all"},Os=E.createContext(null);Os.displayName="HookFormControlContext";const Ms=()=>E.useContext(Os);var YS=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const s=a;return t._proxyFormState[s]!==ul.all&&(t._proxyFormState[s]=!n||ul.all),r&&(r[s]=!0),e[s]}});return o};const Kf=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Yf(e){const t=Ms(),{control:r=t,disabled:n,name:o,exact:a}=e||{},[s,i]=E.useState(r._formState),c=E.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Kf(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:u=>{!n&&i({...r._formState,...u})}}),[o,n,a]),E.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),E.useMemo(()=>YS(s,r,c.current,!1),[s,r])}var XS=e=>typeof e=="string",dl=(e,t,r,n,o)=>XS(e)?Oe(r,e,o):Array.isArray(e)?e.map(a=>Oe(r,a)):r,fl=e=>_s(e)||!zf(e);function $n(e,t,r=new WeakSet){if(fl(e)||fl(t))return Object.is(e,t);if(Dr(e)&&Dr(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const s=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const i=t[a];if(Dr(s)&&Dr(i)||Vt(s)&&Vt(i)||Array.isArray(s)&&Array.isArray(i)?!$n(s,i,r):!Object.is(s,i))return!1}}return!0}function ZS(e){const t=Ms(),{control:r=t,name:n,defaultValue:o,disabled:a,exact:s,compute:i}=e||{},c=E.useRef(o),u=E.useRef(i),f=E.useRef(void 0),p=E.useRef(r),m=E.useRef(n);u.current=i;const[g,h]=E.useState(()=>{const C=r._getWatch(n,c.current);return u.current?u.current(C):C}),v=E.useCallback(C=>{const R=dl(n,r._names,C||r._formValues,!1,c.current);return u.current?u.current(R):R},[r._formValues,r._names,n]),x=E.useCallback(C=>{if(!a){const R=dl(n,r._names,C||r._formValues,!1,c.current);if(u.current){const j=u.current(R);$n(j,f.current)||(h(j),f.current=j)}else h(R)}},[r._formValues,r._names,a,n]);Kf(()=>((p.current!==r||!$n(m.current,n))&&(p.current=r,m.current=n,x()),r._subscribe({name:n,formState:{values:!0},exact:s,callback:C=>{x(C.values)}})),[r,s,n,x]),E.useEffect(()=>r._removeUnmounted());const b=p.current!==r,y=m.current,w=E.useMemo(()=>{if(a)return null;const C=!b&&!$n(y,n);return b||C?v():null},[a,b,n,y,v]);return w!==null?w:g}function JS(e){const t=Ms(),{name:r,disabled:n,control:o=t,shouldUnregister:a,defaultValue:s,exact:i=!0}=e,c=qS(o._names.array,r),u=E.useMemo(()=>Oe(o._formValues,r,Oe(o._defaultValues,r,s)),[o,r,s]),f=ZS({control:o,name:r,defaultValue:u,exact:i}),p=Yf({control:o,name:r,exact:i}),m=E.useRef(e),g=E.useRef(void 0),h=E.useRef(o.register(r,{...e.rules,value:f,...la(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const v=E.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Oe(p.errors,r)},isDirty:{enumerable:!0,get:()=>!!Oe(p.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Oe(p.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Oe(p.validatingFields,r)},error:{enumerable:!0,get:()=>Oe(p.errors,r)}}),[p,r]),x=E.useCallback(C=>h.current.onChange({target:{value:WS(C),name:r},type:cl.CHANGE}),[r]),b=E.useCallback(()=>h.current.onBlur({target:{value:Oe(o._formValues,r),name:r},type:cl.BLUR}),[r,o._formValues]),y=E.useCallback(C=>{const R=Oe(o._fields,r);R&&R._f&&C&&(R._f.ref={focus:()=>An(C.focus)&&C.focus(),select:()=>An(C.select)&&C.select(),setCustomValidity:j=>An(C.setCustomValidity)&&C.setCustomValidity(j),reportValidity:()=>An(C.reportValidity)&&C.reportValidity()})},[o._fields,r]),w=E.useMemo(()=>({name:r,value:f,...la(n)||p.disabled?{disabled:p.disabled||n}:{},onChange:x,onBlur:b,ref:y}),[r,n,p.disabled,x,b,y,f]);return E.useEffect(()=>{const C=o._options.shouldUnregister||a,R=g.current;R&&R!==r&&!c&&o.unregister(R),o.register(r,{...m.current.rules,...la(m.current.disabled)?{disabled:m.current.disabled}:{}});const j=(k,N)=>{const $=Oe(o._fields,k);$&&$._f&&($._f.mount=N)};if(j(r,!0),C){const k=qf(Oe(o._options.defaultValues,r,m.current.defaultValue));ll(o._defaultValues,r,k),_a(Oe(o._formValues,r))&&ll(o._formValues,r,k)}return!c&&o.register(r),g.current=r,()=>{(c?C&&!o._state.action:C)?o.unregister(r):j(r,!1)}},[r,o,c,a]),E.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),E.useMemo(()=>({field:w,formState:p,fieldState:v}),[w,p,v])}const Xf=e=>e.render(JS(e)),Ds=E.createContext(null);Ds.displayName="HookFormContext";const $s=()=>E.useContext(Ds),QS=e=>{const{children:t,watch:r,getValues:n,getFieldState:o,setError:a,clearErrors:s,setValue:i,trigger:c,formState:u,resetField:f,reset:p,handleSubmit:m,unregister:g,control:h,register:v,setFocus:x,subscribe:b}=e;return E.createElement(Ds.Provider,{value:E.useMemo(()=>({watch:r,getValues:n,getFieldState:o,setError:a,clearErrors:s,setValue:i,trigger:c,formState:u,resetField:f,reset:p,handleSubmit:m,unregister:g,control:h,register:v,setFocus:x,subscribe:b}),[s,h,u,o,n,m,v,p,f,a,x,i,b,c,g,r])},E.createElement(Os.Provider,{value:h},t))},Zf=E.createContext(void 0),Jf=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return l.jsx(Zf.Provider,{value:{disabled:r,readOnly:n},children:l.jsx(QS,{...t,children:o})})},Qf=()=>{const e=E.useContext(Zf),t=$s();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},e1=({type:e="button",variant:t="outline",...r})=>{const n=()=>e==="submit"||e==="reset"?"default":t;return l.jsx(Be,{type:e,variant:n(),...r})};var ep={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},pl=E.createContext&&E.createContext(ep),t1=["attr","size","title"];function r1(e,t){if(e==null)return{};var r=n1(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function n1(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zn.apply(this,arguments)}function ml(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ml(Object(r),!0).forEach(function(n){o1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ml(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o1(e,t,r){return t=a1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a1(e){var t=s1(e,"string");return typeof t=="symbol"?t:t+""}function s1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tp(e){return e&&e.map((t,r)=>E.createElement(t.tag,Jn({key:r},t.attr),tp(t.child)))}function rp(e){return t=>E.createElement(i1,Zn({attr:Jn({},e.attr)},t),tp(e.child))}function i1(e){var t=r=>{var{attr:n,size:o,title:a}=e,s=r1(e,t1),i=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),E.createElement("svg",Zn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:c,style:Jn(Jn({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&E.createElement("title",null,a),e.children)};return pl!==void 0?E.createElement(pl.Consumer,null,r=>t(r)):t(ep)}function l1(e){return rp({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var c1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],u1=c1.reduce((e,t)=>{const r=ms(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),d1="Label",np=d.forwardRef((e,t)=>l.jsx(u1.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));np.displayName=d1;var f1=np;function Ls({className:e,...t}){return l.jsx(f1,{"data-slot":"label",className:P("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const op=d.createContext({}),p1=({...e})=>l.jsx(op.Provider,{value:{name:e.name},children:l.jsx(Xf,{...e})}),Mo=()=>{const e=d.useContext(op),t=d.useContext(ap),{getFieldState:r}=$s(),n=Yf({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},ap=d.createContext({});function m1({className:e,...t}){const r=d.useId();return l.jsx(ap.Provider,{value:{id:r},children:l.jsx("div",{"data-slot":"form-item",className:P("qodo qodo-form-item grid gap-2",e),...t})})}function g1({className:e,...t}){const{formItemId:r}=Mo();return l.jsx(Ls,{"data-slot":"form-label",className:P("data-[error=true]:text-destructive font-[400] uppercase font-mono text-xs leading-[1.4] text-[var(--text-bg-neutral-mid)] [&_span]:text-[var(--text-bg-neutral-mid)]",e),htmlFor:r,...t})}function v1({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Mo();return l.jsx(P0,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function h1({className:e,...t}){const{formDescriptionId:r}=Mo();return l.jsx("p",{"data-slot":"form-description",id:r,className:P("text-purple-muted-300 text-sm",e),...t})}function x1({className:e,...t}){const{error:r,formMessageId:n}=Mo(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?l.jsx("p",{"data-slot":"form-message",id:n,className:P("text-destructive text-sm",e),role:"alert",...t,children:o}):null}const zt=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:s=!1,...i}=t,{control:c,disabled:u,readOnly:f}=Qf(),p=()=>a?l.jsxs(Qa,{children:[l.jsx(es,{asChild:!0,children:l.jsx("span",{children:l.jsx(l1,{size:16})})}),l.jsx(ts,{children:l.jsx("p",{children:a})})]}):l.jsx(l.Fragment,{}),m=()=>o?l.jsx(h1,{children:o}):l.jsx(l.Fragment,{});return l.jsx(p1,{control:c,name:r,render:({field:g,fieldState:h})=>l.jsxs(m1,{className:"flex flex-col gap-1.5",children:[n&&l.jsx(g1,{children:l.jsxs("span",{className:"flex items-center gap-1",children:[n,s&&l.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),l.jsx(v1,{children:l.jsx(e,{...g,disabled:u,...i,readOnly:f,error:!!h.error})}),!!o&&m(),l.jsx(x1,{})]})})},b1=E.forwardRef((e,t)=>l.jsx(rn,{...e,ref:t})),y1=E.forwardRef((e,t)=>zt(b1)({...e,ref:t})),w1=E.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...s}=e,i=c=>{n({target:{value:c}})};return l.jsx(ps,{ref:t,options:r,onValueChange:i,searchPlaceholder:o,onSearchChange:a,...s})}),C1=zt(w1);var Fs="Radio",[S1,sp]=je(Fs),[E1,R1]=S1(Fs),ip=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:c,form:u,...f}=e,[p,m]=d.useState(null),g=ce(t,x=>m(x)),h=d.useRef(!1),v=p?u||!!p.closest("form"):!0;return l.jsxs(E1,{scope:r,checked:o,disabled:s,children:[l.jsx(ne.button,{type:"button",role:"radio","aria-checked":o,"data-state":dp(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:K(e.onClick,x=>{o||c==null||c(),v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),v&&l.jsx(up,{control:p,bubbles:!h.current,name:n,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});ip.displayName=Fs;var lp="RadioIndicator",cp=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=R1(lp,r);return l.jsx(Pe,{present:n||a.checked,children:l.jsx(ne.span,{"data-state":dp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});cp.displayName=lp;var k1="RadioBubbleInput",up=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const s=d.useRef(null),i=ce(s,a),c=xo(r),u=uo(t);return d.useEffect(()=>{const f=s.current;if(!f)return;const p=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&g){const h=new Event("click",{bubbles:n});g.call(f,r),f.dispatchEvent(h)}},[c,r,n]),l.jsx(ne.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});up.displayName=k1;function dp(e){return e?"checked":"unchecked"}var N1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Do="RadioGroup",[j1]=je(Do,[St,sp]),fp=St(),pp=sp(),[P1,T1]=j1(Do),mp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...m}=e,g=fp(r),h=Gt(u),[v,x]=ke({prop:a,defaultProp:o??null,onChange:p,caller:Do});return l.jsx(P1,{scope:r,name:n,required:s,disabled:i,value:v,onValueChange:x,children:l.jsx(jo,{asChild:!0,...g,orientation:c,dir:h,loop:f,children:l.jsx(ne.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:h,...m,ref:t})})})});mp.displayName=Do;var gp="RadioGroupItem",vp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=T1(gp,r),s=a.disabled||n,i=fp(r),c=pp(r),u=d.useRef(null),f=ce(t,u),p=a.value===o.value,m=d.useRef(!1);return d.useEffect(()=>{const g=v=>{N1.includes(v.key)&&(m.current=!0)},h=()=>m.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",h)}},[]),l.jsx(Po,{asChild:!0,...i,focusable:!s,active:p,children:l.jsx(ip,{disabled:s,required:a.required,checked:p,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:K(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:K(o.onFocus,()=>{var g;m.current&&((g=u.current)==null||g.click())})})})});vp.displayName=gp;var I1="RadioGroupIndicator",hp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=pp(r);return l.jsx(cp,{...o,...n,ref:t})});hp.displayName=I1;var A1=mp,_1=vp,O1=hp;function M1({className:e,...t}){const{readOnly:r,...n}=t;return l.jsx(A1,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:P("qodo qodo-radio-group grid gap-3 group",e),...n})}function D1({className:e,...t}){return l.jsx(_1,{"data-slot":"radio-group-item",className:P("qodo qodo-radio-group-item cursor-pointer border-[var(--border-input-neutral-idle)] bg-[var(--fill-input-neutral-idle)] focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","aria-checked:border-[var(--border-input-emphasis-active)] hover:aria-checked:border-[var(--border-input-emphasis-active)]","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","data-disabled:cursor-not-allowed data-disabled:opacity-50","aria-disabled:cursor-not-allowed aria-disabled:opacity-50","mt-[2px] mr-0",e),...t,children:l.jsx(O1,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:l.jsx(Bv,{className:"stroke-transparent fill-[var(--icon-input-emphasis-active)] absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const Vs=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:s=!1,className:i,direction:c="horizontal",dir:u="ltr",name:f,onChange:p,...m}=e,g=v=>{s||(p==null||p({target:{value:v}}),o==null||o(v))},h=P("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":c==="horizontal","flex-col gap-3":c==="vertical"},i);return l.jsx(M1,{name:f,ref:t,value:r,defaultValue:n,onValueChange:g,disabled:a||s,readOnly:s,className:h,dir:u,...m})});Vs.displayName="BaseRadioGroupComponent";const Bs=({label:e,description:t,disabled:r=!1,labelClassName:n,descriptionClassName:o,labelWrapperClassName:a})=>l.jsxs("div",{className:P("flex flex-col gap-2",a),children:[e&&l.jsx("div",{className:P("text-[var(--text-bg-neutral-mid)] font-normal text-sm","group-has-[button:disabled]/radio-item:opacity-70","group-has-[button:disabled]/checkbox-item:opacity-70",{"opacity-70":r},n),children:e}),t&&l.jsx("div",{className:P("text-sm text-[var(--text-bg-neutral-mild)] font-normal",o),children:t})]});Bs.displayName="LabelWithDescription";const Gs=({value:e="",disabled:t,error:r,name:n="radio",label:o,description:a,wrapperClassName:s,labelClassName:i,descriptionClassName:c,labelWrapperClassName:u})=>{const f=`${n}-${e}`;return l.jsxs(Ls,{htmlFor:f,className:P("group/radio-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal leading-5 cursor-pointer","has-[button:disabled]:cursor-not-allowed has-[button:disabled]:hover:bg-transparent",{"cursor-pointer":!t,"!cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},s),children:[l.jsx(D1,{value:e,id:f,disabled:t||r}),l.jsx(Bs,{label:o,description:a,disabled:t,labelClassName:i,descriptionClassName:c,labelWrapperClassName:u})]},e)};Gs.displayName="RadioGroupItemComponent";const $1=zt(Vs),L1=e=>l.jsx("hr",{className:"w-full h-px border-[var(--base-sidebar-border)]",...e}),F1=({children:e,description:t,className:r})=>l.jsxs("div",{className:P("space-y-1",r),children:[l.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&l.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),xp=E.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=P("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return l.jsx("div",{ref:n,className:o,...r})});xp.displayName="FormGroup";function V1({className:e,rows:t,...r}){return l.jsx("textarea",{"data-slot":"textarea",rows:t,className:P("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-[var(--fill-input-neutral-idle)] flex min-h-16 w-full rounded-md border bg-transparent","border-[var(--border-interactive-neutral-idle)] shadow-none","placeholder:text-purple-muted-400 text-purple-muted-300 outline-none focus-visible:ring-0 selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const B1=E.forwardRef(({variant:e="default",className:t,...r},n)=>{const o=zt(V1);return l.jsx(o,{...r,ref:n,className:P({"font-plex-mono text-sm leading-[1.4] rounded dark:bg-fill-input-neutral-idle px-3 py-2 [&[readonly]]:text-[var(--text-input-neutral-placeholder)] [&[readonly]]:border [&[readonly]]:border-[var(--border-input-neutral-idle)] [&[readonly]]:bg-[var(--fill-input-neutral-idle)]":e==="code"},t)})}),bp=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>l.jsxs(Lt,{variant:a,disabled:n,size:"sm",className:P("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&l.jsx(Be,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:s=>{s.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:l.jsx(ao,{className:"w-[10px] h-[10px]"})})]}),G1=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:s,tagVariant:i})=>l.jsx("div",{onClick:r,className:P("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:l.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[l.jsx(bp,{label:e,id:t,className:s,variant:i}),n&&l.jsx(Be,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||l.jsx(rh,{className:"h-4 w-4"})})]})}),ca={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},W1=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},yp=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:s=100,disabled:i=!1,className:c,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:m,onDeleteSuggestion:g,onBlur:h,normalizeTags:v=W1,onChange:x=()=>{},onAddTag:b=()=>{},onRemoveTag:y=()=>{},onResetTags:w=()=>{}})=>{const[C,R]=E.useState(""),[j,k]=E.useState(!1),N=E.useRef(null),$=E.useRef(null),B=E.useRef(null),[G,Q]=E.useState();E.useEffect(()=>{$.current&&Q($.current.offsetWidth)},[]);const ee=e.length>=s,W=F=>{if(ee||e.some(z=>z.id===F.id))return;const A=[...e,F];x(A),b(F)},M=F=>{const A=e.filter(z=>z.id!==F);x(A),y(F)},_=()=>{x==null||x([]),w()},D=F=>{const A=F.target.value;R(A),k(!0)},T=()=>{const F=C.trim().toLowerCase();if(!F)return[];const A=new Set(e.map(z=>z.id));return o.filter(z=>z.label.toLowerCase().includes(F)&&!A.has(z.id))},O=F=>v?v(F):F,U=()=>{const F=C.trim();if(!F)return;const A=O(F);if(!A)return;if(e.some(Z=>Z.id===A)){R(""),k(!1);return}const z=o.find(Z=>Z.id===A||O(Z.label)===A);z?W(z):a&&W({id:A,label:A}),R(""),k(!1)},J=F=>{const A=F.key===ca.BACKSPACE&&!C&&e.length>0,z=F.key===ca.ENTER&&C,Z=F.key===ca.ESCAPE;z?(F.preventDefault(),U(),B.current&&(B.current.scrollLeft=B.current.scrollWidth)):A?M(e[e.length-1].id):Z&&k(!1)},I=()=>{if(C&&T().length>0)return l.jsx(fs,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:G??void 0},onOpenAutoFocus:F=>F.preventDefault(),onCloseAutoFocus:F=>F.preventDefault(),onMouseDown:F=>F.preventDefault(),children:l.jsx("div",{className:P("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:T().map(F=>l.jsx(G1,{label:F.label,id:F.id,onDeleteSuggestion:g,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var A;W(F),R(""),k(!1),(A=N.current)==null||A.focus()}},F.id))})})},q=()=>m||l.jsx(eh,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),X=()=>e.map(F=>l.jsx(bp,{label:F.label,id:F.id,onRemoveTag:M,disabled:i,className:p,variant:t},F.id)),Y=()=>e.length===0?l.jsx(l.Fragment,{}):l.jsx(ao,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:_});return l.jsx("div",{className:P("w-full",c),children:l.jsxs(us,{open:j&&!i,onOpenChange:k,modal:!1,children:[l.jsx(ds,{className:"w-full",children:l.jsxs("div",{ref:$,tabIndex:-1,className:P("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-purple-muted-800 py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":i}),onClick:F=>{var A;F.stopPropagation(),k(!0),(A=N.current)==null||A.focus()},children:[q(),l.jsxs("div",{ref:B,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[X(),l.jsx(rn,{ref:N,value:C,onChange:D,onClick:F=>F.stopPropagation(),onFocus:()=>k(!0),onBlur:h,onKeyDown:J,placeholder:r,disabled:i||ee,className:P("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),Y()]})}),I()]})})};function z1(e){const{control:t}=$s();return l.jsx(Xf,{name:e.name,control:t,render:({field:r})=>l.jsx(yp,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const q1=zt(z1),H1=12,gl={SINGLE:"single",MULTIPLE:"multiple"},vl={LTR:"ltr"},hl={GHOST:"ghost"};var wp=typeof global=="object"&&global&&global.Object===Object&&global,U1=typeof self=="object"&&self&&self.Object===Object&&self,Rt=wp||U1||Function("return this")(),Qn=Rt.Symbol,Cp=Object.prototype,K1=Cp.hasOwnProperty,Y1=Cp.toString,_r=Qn?Qn.toStringTag:void 0;function X1(e){var t=K1.call(e,_r),r=e[_r];try{e[_r]=void 0;var n=!0}catch{}var o=Y1.call(e);return n&&(t?e[_r]=r:delete e[_r]),o}var Z1=Object.prototype,J1=Z1.toString;function Q1(e){return J1.call(e)}var eE="[object Null]",tE="[object Undefined]",xl=Qn?Qn.toStringTag:void 0;function dn(e){return e==null?e===void 0?tE:eE:xl&&xl in Object(e)?X1(e):Q1(e)}function Ws(e){return e!=null&&typeof e=="object"}var rE=Array.isArray;function Sp(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var nE="[object AsyncFunction]",oE="[object Function]",aE="[object GeneratorFunction]",sE="[object Proxy]";function Ep(e){if(!Sp(e))return!1;var t=dn(e);return t==oE||t==aE||t==nE||t==sE}var ua=Rt["__core-js_shared__"],bl=(function(){var e=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function iE(e){return!!bl&&bl in e}var lE=Function.prototype,cE=lE.toString;function qt(e){if(e!=null){try{return cE.call(e)}catch{}try{return e+""}catch{}}return""}var uE=/[\\^$.*+?()[\]{}|]/g,dE=/^\[object .+?Constructor\]$/,fE=Function.prototype,pE=Object.prototype,mE=fE.toString,gE=pE.hasOwnProperty,vE=RegExp("^"+mE.call(gE).replace(uE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hE(e){if(!Sp(e)||iE(e))return!1;var t=Ep(e)?vE:dE;return t.test(qt(e))}function xE(e,t){return e==null?void 0:e[t]}function fn(e,t){var r=xE(e,t);return hE(r)?r:void 0}var Oa=fn(Rt,"WeakMap"),bE=9007199254740991;function Rp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=bE}function yE(e){return e!=null&&Rp(e.length)&&!Ep(e)}var wE=Object.prototype;function kp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||wE;return e===r}var CE="[object Arguments]";function yl(e){return Ws(e)&&dn(e)==CE}var Np=Object.prototype,SE=Np.hasOwnProperty,EE=Np.propertyIsEnumerable,RE=yl((function(){return arguments})())?yl:function(e){return Ws(e)&&SE.call(e,"callee")&&!EE.call(e,"callee")};function kE(){return!1}var jp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wl=jp&&typeof module=="object"&&module&&!module.nodeType&&module,NE=wl&&wl.exports===jp,Cl=NE?Rt.Buffer:void 0,jE=Cl?Cl.isBuffer:void 0,PE=jE||kE,TE="[object Arguments]",IE="[object Array]",AE="[object Boolean]",_E="[object Date]",OE="[object Error]",ME="[object Function]",DE="[object Map]",$E="[object Number]",LE="[object Object]",FE="[object RegExp]",VE="[object Set]",BE="[object String]",GE="[object WeakMap]",WE="[object ArrayBuffer]",zE="[object DataView]",qE="[object Float32Array]",HE="[object Float64Array]",UE="[object Int8Array]",KE="[object Int16Array]",YE="[object Int32Array]",XE="[object Uint8Array]",ZE="[object Uint8ClampedArray]",JE="[object Uint16Array]",QE="[object Uint32Array]",he={};he[qE]=he[HE]=he[UE]=he[KE]=he[YE]=he[XE]=he[ZE]=he[JE]=he[QE]=!0;he[TE]=he[IE]=he[WE]=he[AE]=he[zE]=he[_E]=he[OE]=he[ME]=he[DE]=he[$E]=he[LE]=he[FE]=he[VE]=he[BE]=he[GE]=!1;function eR(e){return Ws(e)&&Rp(e.length)&&!!he[dn(e)]}function tR(e){return function(t){return e(t)}}var Pp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=Pp&&typeof module=="object"&&module&&!module.nodeType&&module,rR=Gr&&Gr.exports===Pp,da=rR&&wp.process,Sl=(function(){try{var e=Gr&&Gr.require&&Gr.require("util").types;return e||da&&da.binding&&da.binding("util")}catch{}})(),El=Sl&&Sl.isTypedArray,nR=El?tR(El):eR;function oR(e,t){return function(r){return e(t(r))}}var aR=oR(Object.keys,Object),sR=Object.prototype,iR=sR.hasOwnProperty;function lR(e){if(!kp(e))return aR(e);var t=[];for(var r in Object(e))iR.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ma=fn(Rt,"Map"),Da=fn(Rt,"DataView"),$a=fn(Rt,"Promise"),La=fn(Rt,"Set"),Rl="[object Map]",cR="[object Object]",kl="[object Promise]",Nl="[object Set]",jl="[object WeakMap]",Pl="[object DataView]",uR=qt(Da),dR=qt(Ma),fR=qt($a),pR=qt(La),mR=qt(Oa),At=dn;(Da&&At(new Da(new ArrayBuffer(1)))!=Pl||Ma&&At(new Ma)!=Rl||$a&&At($a.resolve())!=kl||La&&At(new La)!=Nl||Oa&&At(new Oa)!=jl)&&(At=function(e){var t=dn(e),r=t==cR?e.constructor:void 0,n=r?qt(r):"";if(n)switch(n){case uR:return Pl;case dR:return Rl;case fR:return kl;case pR:return Nl;case mR:return jl}return t});var gR="[object Map]",vR="[object Set]",hR=Object.prototype,xR=hR.hasOwnProperty;function pn(e){if(e==null)return!0;if(yE(e)&&(rE(e)||typeof e=="string"||typeof e.splice=="function"||PE(e)||nR(e)||RE(e)))return!e.length;var t=At(e);if(t==gR||t==vR)return!e.size;if(kp(e))return!lR(e).length;for(var r in e)if(xR.call(e,r))return!1;return!0}function zs(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>zs(t))}function qs(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...qs(r))}),t}function Hs(e,t){return pn(e.children)?!1:zs(e).every(n=>t.has(n))}function Tp(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=Tp(r.children,t);if(n)return n}}return null}function Us(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&Us(n.children,t).forEach((s,i)=>r.set(i,s))}return r}function Ip(e,t){e.forEach(r=>{pn(r.children)||(Hs(r,t)?t.add(r.value):t.delete(r.value),r.children&&Ip(r.children,t))})}const bR=e=>e?Array.isArray(e)?e:[e]:[],yR=e=>Us(e,t=>[t.value,t.label]),wR=e=>Us(e,t=>t.icon?[t.value,t.icon]:null);function CR(e,t){qs(e).forEach(n=>t.delete(n))}function SR(e,t){qs(e).forEach(n=>t.add(n))}function Ap(e,t){const r=new Set(t);return e.flatMap(n=>!pn(n.children)&&n.children?Hs(n,r)?[n.value]:Ap(n.children,t):r.has(n.value)?[n.value]:[])}function ER(e){return e&&e>=1?e*H1:0}var $o="Checkbox",[RR]=je($o),[kR,Ks]=RR($o);function NR(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[m,g]=ke({prop:r,defaultProp:o??!1,onChange:c,caller:$o}),[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useRef(!1),w=h?!!s||!!h.closest("form"):!0,C={checked:m,disabled:a,setChecked:g,control:h,setControl:v,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:gt(o)?!1:o,isFormControl:w,bubbleInput:x,setBubbleInput:b};return l.jsx(kR,{scope:t,...C,children:jR(p)?p(C):n})}var _p="CheckboxTrigger",Op=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:s,disabled:i,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:h}=Ks(_p,e),v=ce(o,f),x=d.useRef(c);return d.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const y=()=>p(x.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[a,p]),l.jsx(ne.button,{type:"button",role:"checkbox","aria-checked":gt(c)?"mixed":c,"aria-required":u,"data-state":Fp(c),"data-disabled":i?"":void 0,disabled:i,value:s,...n,ref:v,onKeyDown:K(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:K(r,b=>{p(y=>gt(y)?!0:!y),h&&g&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});Op.displayName=_p;var Ys=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:c,onCheckedChange:u,form:f,...p}=e;return l.jsx(NR,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(Op,{...p,ref:t,__scopeCheckbox:r}),m&&l.jsx(Lp,{__scopeCheckbox:r})]})})});Ys.displayName=$o;var Mp="CheckboxIndicator",Dp=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=Ks(Mp,r);return l.jsx(Pe,{present:n||gt(a.checked)||a.checked===!0,children:l.jsx(ne.span,{"data-state":Fp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Dp.displayName=Mp;var $p="CheckboxBubbleInput",Lp=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:c,name:u,value:f,form:p,bubbleInput:m,setBubbleInput:g}=Ks($p,e),h=ce(r,g),v=xo(a),x=uo(n);d.useEffect(()=>{const y=m;if(!y)return;const w=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(w,"checked").set,j=!o.current;if(v!==a&&R){const k=new Event("click",{bubbles:j});y.indeterminate=gt(a),R.call(y,gt(a)?!1:a),y.dispatchEvent(k)}},[m,v,a,o]);const b=d.useRef(gt(a)?!1:a);return l.jsx(ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:i,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:h,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Lp.displayName=$p;function jR(e){return typeof e=="function"}function gt(e){return e==="indeterminate"}function Fp(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}const Xs=d.forwardRef(({className:e,...t},r)=>l.jsx(Ys,{ref:r,className:P("h-4 w-4 shrink-0 rounded-xs shadow disabled:cursor-not-allowed bg-[var(--fill-input-neutral-idle)] border border-[var(--border-input-neutral-idle)] hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)] ","active:border-[var(--border-input-neutral-active)] active:bg-[var(--fill-input-neutral-active)] disabled:border-[var(--border-input-neutral-disabled)] disabled:bg-[var(--fill-input-neutral-disabled)] ","hover:disabled:border-[var(--border-input-neutral-disabled)] hover:disabled:bg-[var(--fill-input-neutral-disabled)] ","data-[state=checked]:border-[var(--border-input-emphasis-idle)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)] hover:data-[state=checked]:border-[var(--border-input-emphasis-hover)] hover:data-[state=checked]:bg-[var(--fill-input-emphasis-hover)] active:data-[state=checked]:border-[var(--border-input-emphasis-active)] active:data-[state=checked]:bg-[var(--fill-input-emphasis-active)] disabled:data-[state=checked]:border-[var(--border-input-emphasis-disabled)] disabled:data-[state=checked]:bg-[var(--fill-input-emphasis-disabled)] ",e),...t,children:l.jsx(Dp,{className:P("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?l.jsx(Zv,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"}):l.jsx(mr,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"})})}));Xs.displayName=Ys.displayName;function Vp({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=vl.LTR,selectionIndicator:s="checkmark",size:i="default",parentSelected:c=!1}){const u=!pn(e.children),f=t.has(e.value),p=`${ER(n)}px`,m=Hs(e,t),g=f||m,h=f&&!c,v=()=>{if(e.icon)return l.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},x=()=>s==="none"?l.jsx(l.Fragment,{}):s==="checkbox"?l.jsx(Xs,{checked:g}):l.jsx(mr,{className:P("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),b=()=>{if(u){const w=!!e.disableChildrenOnParentSelect&&f;return e.children.map(C=>l.jsx(Vp,{option:C,selected:t,onSelect:r,nestLevel:n+1,dir:a,selectionIndicator:s,size:i,parentSelected:f,disabled:w||o},C.value))}},y=()=>l.jsxs("div",{className:P("flex items-center w-full gap-3 flex-row",{"flex-row-reverse":a===vl.LTR}),style:{paddingLeft:p},children:[l.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[v(),l.jsxs("span",{className:P("flex-1 flex items-center gap-2 whitespace-nowrap text-[var(--text-interactive-neutral-active)]",{"text-[var(--text-interactive-emphasis-active,#A8A1FD)]":h}),children:[e.label,e.description&&l.jsx(Lt,{size:"xs",children:e.description})]})]}),x()]});return l.jsxs("div",{children:[l.jsx(Sd,{disabled:e.disabled||o,onSelect:()=>r(e.value,u),className:P("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)]! cursor-pointer disabled:cursor-not-allowed","focus:text-[var(--text-interactive-neutral-active)] data-[selected=true]:text-[var(--text-interactive-neutral-hover)]!",{"px-2 py-1.5 text-xs":i==="xs","px-3 py-1.5":i==="default","bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),b()]})}function Bp({value:e,options:t=[],onSelect:r,disabled:n=!1,readOnly:o=!1,mode:a=gl.SINGLE,placeholder:s="Select...",inputPlaceholder:i="Search...",emptyState:c="No option found.",triggerClassName:u,triggerWrapperClassName:f,badgeClassName:p,badgeVariant:m="text",searchable:g=!1,toggleIcon:h=l.jsx(oo,{}),dir:v="ltr",variant:x="default",iconPosition:b="right",selectionIndicator:y="checkmark",onSearchChange:w,renderValue:C,size:R="default",contentMaxWidth:j,...k}){const[N,$]=E.useState(0),[B,G]=E.useState(!1),[Q,ee]=E.useState(""),W=E.useRef(null),M=a===gl.MULTIPLE,[_,D]=E.useState(e!==void 0?e:M?[]:""),T=bR(_),O=new Set(T);E.useEffect(()=>{W.current&&$(W.current.offsetWidth)},[_]);const U=yR(t),J=wR(t);E.useEffect(()=>{e!==void 0&&D(M?e||[]:e||"")},[e,M]);function I(H,te){if(!M){D(H),r==null||r(H),G(!1);return}D(L=>{const se=Array.isArray(L)?L:[],le=new Set(se),me=Tp(t,H);if(!me)return se;te?q(me,le):X(H,le);const ve=Array.from(le);return r==null||r(ve),ve})}function q(H,te){zs(H).every(le=>te.has(le))?CR(H,te):SR(H,te)}function X(H,te){te.has(H)?te.delete(H):te.add(H),Ip(t,te)}const Y=R==="xs"?"sm":"md",F=()=>{const H=Ap(t,T),te=H.length===0;if(C){const L=C({displayValues:H});if(L)return L}return te?l.jsx(Lt,{variant:m,size:Y,className:P("text-[var(--text-input-neutral-placeholder)]",{"text-[var(--text-input-neutral-disabled)]":n},p),children:s}):H.map(L=>{const se=J.get(L),le=U.get(L)||L;return l.jsx(Lt,{variant:m,size:Y,className:P("text-[var(--text-input-neutral-idle)]",{"text-[var(--text-input-neutral-disabled)]":n},p),children:l.jsxs("div",{className:"flex items-center gap-1",children:[se&&l.jsx("div",{className:"flex-shrink-0",children:se}),l.jsx("span",{children:le})]})},L)})},A=H=>{ee(H),w==null||w(H)},z=()=>{if(g)return l.jsx(bd,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i,value:Q,onValueChange:A})},Z=n||o;return l.jsxs(us,{open:B,onOpenChange:Z?void 0:G,children:[l.jsx(ds,{asChild:!0,disabled:Z,children:l.jsxs("div",{className:P("flex items-center gap-1.5 justify-between w-full min-w-24 border rounded-sm scrollbar-thin","border-[var(--border-interactive-neutral-idle)] aria-invalid:!border-destructive","aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"h-7 px-2 py-1.5 text-xs":R==="xs","h-8 px-3 py-1":R==="default","cursor-pointer hover:border-[var(--border-input-neutral-hover)]":!Z,"hover:bg-[var(--fill-input-neutral-hover)]":!Z&&x!==hl.GHOST,"bg-[var(--fill-input-neutral-idle)]":x!==hl.GHOST,"cursor-not-allowed opacity-75":n,"cursor-default border-0":o&&!n,"flex-row-reverse":b==="left"},f),ref:W,"aria-disabled":Z,"aria-readonly":o,...k,children:[l.jsx("div",{className:P("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",u),children:F()}),!o&&l.jsx("div",{className:"[&>svg]:text-[var(--icon-input-neutral-idle)] [&>svg]:hover:text-[var(--icon-input-neutral-hover)] [&>svg]:w-4 [&>svg]:h-4",children:h})]})}),l.jsx(fs,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:"max-content",minWidth:N??"auto",maxWidth:j??"calc(100vw - 2rem)"},children:l.jsxs(xd,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[z(),l.jsxs(yd,{children:[l.jsx(wd,{children:c}),l.jsx(Cd,{children:t.map(H=>l.jsx(Vp,{disabled:n,option:H,selected:O,onSelect:I,dir:v,selectionIndicator:y,size:R},H.value))})]})]})})]})}const Gp=E.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:s,...i}=e,c=u=>{n||r&&r({target:{value:u}})};return l.jsx(Bp,{options:t,value:o,disabled:a,readOnly:n,...i,onSelect:c,mode:s})});Gp.displayName="BaseSelectComponent";const PR=zt(Gp),Zs=E.forwardRef((e,t)=>{const{value:r=[],defaultValue:n=[],onValueChange:o,disabled:a=!1,readOnly:s=!1,className:i,direction:c="vertical",onChange:u,children:f,...p}=e,[m,g]=E.useState(pn(r)?n:r),h=c==="horizontal",v=r!==void 0?r:m,x=(w,C)=>{if(s)return;const R=C?[...v,w]:v.filter(j=>j!==w);r===void 0&&g(R),u==null||u({target:{value:R}}),o==null||o(R)},b=P("qodo qodo-custom-checkbox-group","flex",{"flex-row gap-6":h,"flex-col gap-3":!h},i),y=()=>E.Children.map(f,w=>{if(!E.isValidElement(w))return w;const C=w.props.name;if(!C)return w;const R=w.props.disabled,j=s||a||R;return E.cloneElement(w,{checked:v.includes(C),onCheckedChange:k=>x(C,k),disabled:j,name:C})});return l.jsx("div",{ref:t,className:b,...p,children:y()})});Zs.displayName="CheckboxGroupComponent";const Js=({disabled:e,error:t,name:r="checkbox",checked:n,onCheckedChange:o,label:a,description:s,labelWrapperClassName:i,labelClassName:c,descriptionClassName:u,checkboxClassName:f,wrapperClassName:p})=>l.jsxs(Ls,{htmlFor:r,className:P("group/checkbox-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer":!e,"cursor-not-allowed":e,"border border-destructive":t},p),children:[l.jsx(Xs,{id:r,disabled:e||t,checked:n,onCheckedChange:o,className:P("mt-0.5",f)}),l.jsx(Bs,{label:a,description:s,disabled:e,labelClassName:c,descriptionClassName:u,labelWrapperClassName:i})]});Js.displayName="CheckboxGroupItemComponent";const TR=zt(Zs),Me=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...s}=e,{handleSubmit:i}=o,c=P("qodo qodo-form","flex flex-col gap-6",t);return l.jsx(Jf,{methods:o,disabled:r,readOnly:n,children:l.jsx("form",{className:c,onSubmit:i(a),...s})})};Me.Button=e1;Me.Input=y1;Me.Select=PR;Me.Combobox=C1;Me.RadioGroup=$1;Me.RadioGroupItem=Gs;Me.Group=xp;Me.Textarea=B1;Me.Divider=L1;Me.Title=F1;Me.TagsInput=q1;Me.CheckboxGroup=TR;Me.Checkbox=Js;function IR(e){return e==null?[]:Array.isArray(e)?e:[e]}var AR=e=>Array.from(Array(e).keys()),Tl=e=>(e==null?void 0:e.constructor.name)==="Array",_R=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Qs(e[r],t[r]))return!1;return!0},Qs=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Tl(e)&&Tl(t))return _R(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!Qs(e[a],t[a]))return!1}return!0},OR=e=>e!=null&&typeof e=="object",Ln=e=>typeof e=="string",sr=e=>typeof e=="function",Wp=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),MR=e=>Object.prototype.toString.call(e),zp=Function.prototype.toString,DR=zp.call(Object),$R=e=>{if(!OR(e)||MR(e)!="[object Object]"||VR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Wp(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&zp.call(r)==DR},LR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,FR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,VR=e=>LR(e)||FR(e),BR=e=>e(),GR=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},WR=e=>Number.isNaN(e),zR=e=>WR(e)?0:e,qR=(e,t,r)=>{const n=zR(e),o=n>=t,a=r==null||n<=r;return o&&a};function qp(e){if(!$R(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=qp(o))}return r}function Il(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function HR(e,t){if(e==null)throw new Error(t())}var Hp=e=>typeof e=="object"&&e!==null,Xe=e=>e?"":void 0,UR=9,KR=e=>Hp(e)&&e.nodeType===UR,YR=e=>Hp(e)&&e===e.window;function XR(e){if(!e)return!1;const t=e.getRootNode();return Up(t)===e}function ZR(e){return KR(e)?e:YR(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Up(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var JR=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),QR=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Al=e=>{const t={};let r;for(;r=QR.exec(e);)t[r[1]]=r[2];return t},ek=(e,t)=>{if(Ln(e)){if(Ln(t))return`${e};${t}`;e=Al(e)}else Ln(t)&&(t=Al(t));return Object.assign({},e??{},t??{})};function Ye(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=GR(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=JR(t[o],r[o]);continue}if(o==="style"){t[o]=ek(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function tk(e,t,r){let n=[],o;return a=>{const s=e(a);return(s.length!==n.length||s.some((c,u)=>!Qs(n[u],c)))&&(n=s,o=t(s,a)),o}}var ar=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ar||{}),fa="__init__";function rk(e){const t=()=>{var s;return((s=e.getRootNode)==null?void 0:s.call(e))??document},r=()=>ZR(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Up(t()),isActiveElement:XR,getById:s=>t().getElementById(s)}}function nk(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var ok=()=>e=>Array.from(new Set(e)),Kp=typeof globalThis.document<"u"?E.useLayoutEffect:E.useEffect;function eo(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=E.useState(t),[o,a]=E.useState(n),s=e().value!==void 0,i=E.useRef(o);i.current=s?e().value:o;const c=E.useRef(i.current);Kp(()=>{c.current=i.current},[o,e().value]);const u=p=>{var h,v;const m=c.current,g=sr(p)?p(m):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:g,prev:m}),s||a(g),r(g,m)||(v=(h=e()).onChange)==null||v.call(h,g,m)};function f(){return s?e().value:o}return{initial:n,ref:i,get:f,set(p){(e().sync?Zr.flushSync:BR)(()=>u(p))},invoke(p,m){var g,h;(h=(g=e()).onChange)==null||h.call(g,p,m)},hash(p){var m,g;return((g=(m=e()).hash)==null?void 0:g.call(m,p))??String(p)}}}eo.cleanup=e=>{E.useEffect(()=>e,[])};eo.ref=e=>{const t=E.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function ak(e){const t=E.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var sk=(e,t)=>{const r=E.useRef(!1),n=E.useRef(!1);E.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),E.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function ik(e,t={}){var G,Q,ee,W;const r=E.useMemo(()=>{const{id:M,ids:_,getRootNode:D}=t;return rk({id:M,ids:_,getRootNode:D})},[t]),n=(...M)=>{e.debug&&console.log(...M)},o=((G=e.props)==null?void 0:G.call(e,{props:qp(t),scope:r}))??t,a=lk(o),s=(Q=e.context)==null?void 0:Q.call(e,{prop:a,bindable:eo,scope:r,flush:_l,getContext(){return c},getComputed(){return R},getRefs(){return v},getEvent(){return g()}}),i=Yp(s),c={get(M){var _;return(_=i.current)==null?void 0:_[M].ref.current},set(M,_){var D;(D=i.current)==null||D[M].set(_)},initial(M){var _;return(_=i.current)==null?void 0:_[M].initial},hash(M){var D,T;const _=(D=i.current)==null?void 0:D[M].get();return(T=i.current)==null?void 0:T[M].hash(_)}},u=E.useRef(new Map),f=E.useRef(null),p=E.useRef(null),m=E.useRef({type:""}),g=()=>({...m.current,current(){return m.current},previous(){return p.current}}),h=()=>({...j,matches(...M){return M.includes(j.ref.current)},hasTag(M){var _,D;return!!((D=(_=e.states[j.ref.current])==null?void 0:_.tags)!=null&&D.includes(M))}}),v=ak(((ee=e.refs)==null?void 0:ee.call(e,{prop:a,context:c}))??{}),x=()=>({state:h(),context:c,event:g(),prop:a,send:B,action:b,guard:y,track:sk,refs:v,computed:R,flush:_l,scope:r,choose:C}),b=M=>{const _=sr(M)?M(x()):M;if(!_)return;const D=_.map(T=>{var U,J;const O=(J=(U=e.implementations)==null?void 0:U.actions)==null?void 0:J[T];return O||Il(`[zag-js] No implementation found for action "${JSON.stringify(T)}"`),O});for(const T of D)T==null||T(x())},y=M=>{var _,D;return sr(M)?M(x()):(D=(_=e.implementations)==null?void 0:_.guards)==null?void 0:D[M](x())},w=M=>{const _=sr(M)?M(x()):M;if(!_)return;const D=_.map(O=>{var J,I;const U=(I=(J=e.implementations)==null?void 0:J.effects)==null?void 0:I[O];return U||Il(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),U}),T=[];for(const O of D){const U=O==null?void 0:O(x());U&&T.push(U)}return()=>T.forEach(O=>O==null?void 0:O())},C=M=>IR(M).find(_=>{let D=!_.guard;return Ln(_.guard)?D=!!y(_.guard):sr(_.guard)&&(D=_.guard(x())),D}),R=M=>{HR(e.computed,()=>"[zag-js] No computed object found on machine");const _=e.computed[M];return _({context:c,event:g(),prop:a,refs:v,scope:r,computed:R})},j=eo(()=>({defaultValue:e.initialState({prop:a}),onChange(M,_){var T,O,U,J;if(_){const I=u.current.get(_);I==null||I(),u.current.delete(_)}_&&b((T=e.states[_])==null?void 0:T.exit),b((O=f.current)==null?void 0:O.actions);const D=w((U=e.states[M])==null?void 0:U.effects);if(D&&u.current.set(M,D),_===fa){b(e.entry);const I=w(e.effects);I&&u.current.set(fa,I)}b((J=e.states[M])==null?void 0:J.entry)}})),k=E.useRef(void 0),N=E.useRef(ar.NotStarted);Kp(()=>{queueMicrotask(()=>{const D=N.current===ar.Started;N.current=ar.Started,n(D?"rehydrating...":"initializing...");const T=k.current??j.initial;j.invoke(T,D?j.get():fa)});const M=u.current,_=j.ref.current;return()=>{n("unmounting..."),k.current=_,N.current=ar.Stopped,M.forEach(D=>D==null?void 0:D()),u.current=new Map,f.current=null,queueMicrotask(()=>{b(e.exit)})}},[]);const $=()=>"ref"in j?j.ref.current:j.get(),B=M=>{queueMicrotask(()=>{var J,I;if(N.current!==ar.Started)return;p.current=m.current,m.current=M;let _=$();const D=((J=e.states[_].on)==null?void 0:J[M.type])??((I=e.on)==null?void 0:I[M.type]),T=C(D);if(!T)return;f.current=T;const O=T.target??_;n("transition",M.type,T.target||_,`(${T.actions})`);const U=O!==_;U?Zr.flushSync(()=>j.set(O)):T.reenter&&!U?j.invoke(_,_):b(T.actions??[])})};return(W=e.watch)==null||W.call(e,x()),{state:h(),send:B,context:c,prop:a,scope:r,refs:v,computed:R,event:g(),getStatus:()=>N.current}}function Yp(e){const t=E.useRef(e);return t.current=e,t}function lk(e){const t=Yp(e);return function(n){return t.current[n]}}function _l(e){queueMicrotask(()=>{Zr.flushSync(()=>e())})}var ck=nk(e=>e);function uk(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function dk(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const pa=e=>{const t=E.memo(E.forwardRef((r,n)=>{const{asChild:o,children:a,...s}=r;if(!o)return E.createElement(e,{...s,ref:n},a);if(!E.isValidElement(a))return null;const i=E.Children.only(a),c=dk(i);return E.cloneElement(i,{...Ye(s,i.props),ref:n?uk(n,c):c})}));return t.displayName=e.displayName||e.name,t},fk=()=>{const e=new Map;return new Proxy(pa,{apply(t,r,n){return pa(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,pa(n)),e.get(n)}})},nt=fk();function pk(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function mn(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=e,i=E.createContext(s);i.displayName=t;function c(){const u=E.useContext(i);if(!u&&r){const f=new Error(a??pk(n,o));throw f.name="ContextError",Wp(Error,"captureStackTrace")&&sr(Error.captureStackTrace)&&Error.captureStackTrace(f,c),f}return u}return[i.Provider,c,i]}const[mk,ut]=mn({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),Xp=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getContentProps({index:r.count}),e);return l.jsx(nt.div,{...n,ref:t})});Xp.displayName="StepsCompletedContent";const ei=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,s=n;return a[s]!==void 0&&(o[s]=a[s]),delete a[s],[o,a]},[{},{...e}]),gk=ei(),Zp=E.forwardRef((e,t)=>{const[r,n]=gk(e,["index"]),o=ut(),a=Ye(o.getContentProps(r),n);return l.jsx(nt.div,{...a,ref:t})});Zp.displayName="StepsContent";const[vk,ti]=mn({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Jp=E.forwardRef((e,t)=>{const r=ut(),n=ti(),o=Ye(r.getIndicatorProps(n),e);return l.jsx(nt.div,{...o,ref:t})});Jp.displayName="StepsIndicator";const[hk]=mn({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),xk=ei(),Qp=E.forwardRef((e,t)=>{const[r,n]=xk(e,["index"]),o=ut(),a=Ye(o.getItemProps(r),n),s=o.getItemState(r);return l.jsx(vk,{value:r,children:l.jsx(hk,{value:s,children:l.jsx(nt.div,{...a,ref:t})})})});Qp.displayName="StepsItem";const em=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getListProps(),e);return l.jsx(nt.div,{...n,ref:t})});em.displayName="StepsList";const tm=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getNextTriggerProps(),e);return l.jsx(nt.button,{...n,ref:t})});tm.displayName="StepsNextTrigger";const rm=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getPrevTriggerProps(),e);return l.jsx(nt.button,{...n,ref:t})});rm.displayName="StepsPrevTrigger";var $r=(e,t=[])=>({parts:(...r)=>{if(bk(t))return $r(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>$r(e,[...t,...r]),omit:(...r)=>$r(e,t.filter(n=>!r.includes(n))),rename:r=>$r(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${rr(e)}"][data-part="${rr(n)}"]`,`& [data-scope="${rr(e)}"][data-part="${rr(n)}"]`].join(", "),attrs:{"data-scope":rr(e),"data-part":rr(n)}}}),{})}),rr=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),bk=e=>e.length===0,yk=$r("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Ze=yk.build(),wk=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},Ck=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Ol=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},Sk=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function Ek(e,t){const{context:r,send:n,computed:o,prop:a,scope:s}=e,i=r.get("step"),c=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),m=b=>({triggerId:Ol(s,b.index),contentId:Sk(s,b.index),current:b.index===i,completed:b.index<i,incomplete:b.index>i,index:b.index,first:b.index===0,last:b.index===c-1}),g=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},h=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=b=>{n({type:"STEP.SET",value:b,src:"api.setValue"})};return{value:i,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:g,goToPrevStep:h,resetStep:v,getItemState:m,setStep:x,getRootProps(){return t.element({...Ze.root.attrs,id:wk(s),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const y=AR(c).map((w,C)=>Ol(s,C));return t.element({...Ze.list.attrs,dir:a("dir"),id:Ck(s),role:"tablist","aria-owns":y.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(b){const y=m(b);return t.element({...Ze.item.attrs,dir:a("dir"),"aria-current":y.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(b){const y=m(b);return t.button({...Ze.trigger.attrs,id:y.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||y.current?0:-1,"aria-selected":y.current,"aria-controls":y.contentId,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"data-complete":Xe(y.completed),"data-current":Xe(y.current),"data-incomplete":Xe(y.incomplete),onClick(w){w.defaultPrevented||a("linear")||n({type:"STEP.SET",value:b.index,src:"trigger.click"})}})},getContentProps(b){const y=m(b);return t.element({...Ze.content.attrs,dir:a("dir"),id:y.contentId,role:"tabpanel",tabIndex:0,hidden:!y.current,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":y.triggerId})},getIndicatorProps(b){const y=m(b);return t.element({...Ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":Xe(y.completed),"data-current":Xe(y.current),"data-incomplete":Xe(y.incomplete)})},getSeparatorProps(b){const y=m(b);return t.element({...Ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":Xe(y.completed),"data-current":Xe(y.current),"data-incomplete":Xe(y.incomplete)})},getNextTriggerProps(){return t.button({...Ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(b){b.defaultPrevented||g()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...Ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(b){b.defaultPrevented||h()}})},getProgressProps(){return t.element({dir:a("dir"),...Ze.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":Xe(u===100)})}}}var Rk={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:tk(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){kk(t("count"),e.get("step"))}}}},kk=(e,t)=>{if(!qR(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};ok()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[oP,Nk]=mn({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[aP,jk]=mn({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function Pk(e){const t=E.useId(),{getRootNode:r}=Nk(),{dir:n}=jk(),o={id:t,dir:n,getRootNode:r,...e},a=ik(Rk,o);return Ek(a,ck)}const Tk=ei(),nm=E.forwardRef((e,t)=>{const[r,n]=Tk(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=Pk(r),a=Ye(o.getRootProps(),n);return l.jsx(mk,{value:o,children:l.jsx(nt.div,{...a,ref:t})})});nm.displayName="StepsRoot";const om=E.forwardRef((e,t)=>{const r=ut(),n=ti(),o=Ye(r.getSeparatorProps(n),e);return l.jsx(nt.div,{...o,ref:t})});om.displayName="StepsSeparator";const am=E.forwardRef((e,t)=>{const r=ut(),n=ti(),o=Ye(r.getTriggerProps(n),e);return l.jsx(nt.button,{...o,ref:t})});am.displayName="StepsTrigger";function Ik(e){return rp({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const sm=E.createContext(void 0),Ak=({children:e,step:t})=>l.jsx(sm.Provider,{value:{step:t},children:e}),im=()=>{const e=E.useContext(sm);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},_k=({className:e,step:t,...r})=>{const n=P("qodo qodo-steps","flex flex-col gap-4",e);return l.jsx(Ak,{step:t??0,children:l.jsx(nm,{className:n,step:t,...r})})},Ok=({className:e,...t})=>{const r=P("flex flex-row gap-4",e);return l.jsx(em,{className:r,...t})},Mk=({className:e,...t})=>{const r=P("flex flex-row items-center gap-4",e);return l.jsx(Qp,{className:r,...t})},Dk=({className:e,...t})=>{const r=P("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return l.jsx(am,{className:r,...t})},$k=({index:e,className:t,...r})=>{const{step:n}=im(),o=e===n,a=e<n,s=P("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),i=P({"text-white":o,"text-purple-muted-300":!a&&e!==n});return l.jsx(Jp,{className:s,...r,children:a?l.jsx(Ik,{className:"text-green-400"}):l.jsx("span",{className:i,children:e+1})})},Lk=({index:e,className:t,...r})=>{const{step:n}=im(),o=e<n,a=P("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return l.jsx(om,{className:a,...r})},Fk=({className:e,...t})=>{const r=P(e);return l.jsx(Zp,{className:r,...t})},Vk=({className:e,...t})=>{const r=P(e);return l.jsx(Xp,{className:r,...t})},Bk=({className:e,...t})=>{const r=P("bg-primary text-white px-4 py-2 rounded-md",e);return l.jsx(rm,{className:r,...t})},Gk=({className:e,...t})=>{const r=P("bg-primary text-white px-4 py-2 rounded-md",e);return l.jsx(tm,{className:r,...t})},Wk={Root:_k,List:Ok,Item:Mk,Trigger:Dk,Indicator:$k,Separator:Lk,Content:Fk,CompletedContent:Vk,PrevTrigger:Bk,NextTrigger:Gk},gn=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>l.jsx(Wc,{...r,children:l.jsxs(Qa,{children:[l.jsx(es,{...n,children:e}),t&&l.jsx(ts,{...o,children:t})]})});/**
|
|
199
|
+
Defaulting to \`null\`.`}var G0=Bd,W0=Wd;function z0({className:e,value:t,...r}){return l.jsx(G0,{"data-slot":"progress",className:P("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:l.jsx(W0,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all dark:bg-primary",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function qd({className:e,...t}){return l.jsx("div",{className:P("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var No="Switch",[q0]=je(No),[H0,U0]=q0(No),Hd=d.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:c="on",onCheckedChange:u,form:f,...p}=e,[m,g]=d.useState(null),h=ce(t,w=>g(w)),v=d.useRef(!1),x=m?f||!!m.closest("form"):!0,[b,y]=ke({prop:o,defaultProp:a??!1,onChange:u,caller:No});return l.jsxs(H0,{scope:r,checked:b,disabled:i,children:[l.jsx(ne.button,{type:"button",role:"switch","aria-checked":b,"aria-required":s,"data-state":Xd(b),"data-disabled":i?"":void 0,disabled:i,value:c,...p,ref:h,onClick:K(e.onClick,w=>{y(C=>!C),x&&(v.current=w.isPropagationStopped(),v.current||w.stopPropagation())})}),x&&l.jsx(Yd,{control:m,bubbles:!v.current,name:n,value:c,checked:b,required:s,disabled:i,form:f,style:{transform:"translateX(-100%)"}})]})});Hd.displayName=No;var Ud="SwitchThumb",Kd=d.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=U0(Ud,r);return l.jsx(ne.span,{"data-state":Xd(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});Kd.displayName=Ud;var K0="SwitchBubbleInput",Yd=d.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const s=d.useRef(null),i=ce(s,a),c=xo(r),u=uo(t);return d.useEffect(()=>{const f=s.current;if(!f)return;const p=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&g){const h=new Event("click",{bubbles:n});g.call(f,r),f.dispatchEvent(h)}},[c,r,n]),l.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Yd.displayName=K0;function Xd(e){return e?"checked":"unchecked"}var Y0=Hd,X0=Kd;const Z0=Bt("qodo qodo-switch peer inline-flex shrink-0 items-center rounded-full border transition-all outline-none shadow-lg p-0.5 disabled:cursor-not-allowed",{variants:{size:{small:"h-5 w-8",large:"h-6 w-10"}},defaultVariants:{size:"small"}}),J0=Bt("pointer-events-none block rounded-full ring-0 transition-transform shadow-lg",{variants:{size:{small:"h-[14px] w-[14px] data-[state=checked]:translate-x-[12px]",large:"h-[18px] w-[18px] data-[state=checked]:translate-x-[16px]"}},defaultVariants:{size:"small"}});function Q0({className:e,size:t,...r}){return l.jsx(Y0,{"data-slot":"switch",className:P(Z0({size:t}),"data-[state=unchecked]:border-[var(--border-input-neutral-idle)] data-[state=unchecked]:bg-[var(--fill-input-neutral-idle)]","data-[state=unchecked]:hover:border-[var(--border-input-neutral-hover)] data-[state=unchecked]:hover:bg-[var(--fill-input-neutral-hover)]","data-[state=unchecked]:active:border-[var(--border-input-neutral-active)] data-[state=unchecked]:active:bg-[var(--fill-input-neutral-active)]","data-[state=unchecked]:disabled:border-[var(--border-input-neutral-disabled)] data-[state=unchecked]:disabled:bg-[var(--fill-input-neutral-disabled)]","data-[state=checked]:border-[var(--color-purple-700)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)]","data-[state=checked]:hover:border-[var(--color-purple-600)] data-[state=checked]:hover:bg-[var(--fill-input-emphasis-hover)]","data-[state=checked]:active:border-[var(--color-purple-600)] data-[state=checked]:active:bg-[var(--fill-input-emphasis-active)]","data-[state=checked]:disabled:border-[var(--fill-input-emphasis-disabled)] data-[state=checked]:disabled:bg-[var(--fill-input-emphasis-disabled)]",e),...r,children:l.jsx(X0,{"data-slot":"switch-thumb",className:P(J0({size:t}),"data-[state=unchecked]:bg-[var(--icon-input-neutral-idle)]","data-[state=unchecked]:hover:bg-[var(--icon-input-neutral-hover)]","data-[state=unchecked]:active:bg-[var(--icon-input-neutral-active)]","data-[state=unchecked]:disabled:bg-[var(--icon-input-neutral-disabled)]","data-[state=checked]:bg-[var(--icon-input-emphasis-idle)]","data-[state=checked]:hover:bg-[var(--icon-input-emphasis-hover)]","data-[state=checked]:active:bg-[var(--icon-input-emphasis-active)]","data-[state=checked]:disabled:bg-[var(--icon-input-emphasis-disabled)]","data-[state=unchecked]:translate-x-0")})})}var Zd="Toggle",hs=d.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[s,i]=ke({prop:r,onChange:o,defaultProp:n??!1,caller:Zd});return l.jsx(ne.button,{type:"button","aria-pressed":s,"data-state":s?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:K(e.onClick,()=>{e.disabled||i(!s)})})});hs.displayName=Zd;var eC=hs;const Jd=Bt("qodo qodo-toggle inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-foreground hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap dark:text-foreground dark:hover:bg-muted dark:hover:text-muted-foreground dark:data-[state=on]:bg-accent dark:data-[state=on]:text-accent-foreground",{variants:{variant:{default:"bg-transparent text-foreground dark:bg-transparent dark:text-foreground",outline:"border border-input bg-transparent text-foreground shadow-xs hover:bg-accent hover:text-accent-foreground dark:border-input dark:bg-transparent dark:text-foreground dark:hover:bg-accent dark:hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}});function tC({className:e,variant:t,size:r,...n}){return l.jsx(eC,{"data-slot":"toggle",className:P(Jd({variant:t,size:r,className:e})),...n})}var ia="rovingFocusGroup.onEntryFocus",rC={bubbles:!1,cancelable:!0},ln="RovingFocusGroup",[Pa,Qd,nC]=vo(ln),[oC,St]=je(ln,[nC]),[aC,sC]=oC(ln),ef=d.forwardRef((e,t)=>l.jsx(Pa.Provider,{scope:e.__scopeRovingFocusGroup,children:l.jsx(Pa.Slot,{scope:e.__scopeRovingFocusGroup,children:l.jsx(iC,{...e,ref:t})})}));ef.displayName=ln;var iC=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,m=d.useRef(null),g=ce(t,m),h=Gt(a),[v,x]=ke({prop:s,defaultProp:i??null,onChange:c,caller:ln}),[b,y]=d.useState(!1),w=ze(u),C=Qd(r),R=d.useRef(!1),[j,k]=d.useState(0);return d.useEffect(()=>{const N=m.current;if(N)return N.addEventListener(ia,w),()=>N.removeEventListener(ia,w)},[w]),l.jsx(aC,{scope:r,orientation:n,dir:h,loop:o,currentTabStopId:v,onItemFocus:d.useCallback(N=>x(N),[x]),onItemShiftTab:d.useCallback(()=>y(!0),[]),onFocusableItemAdd:d.useCallback(()=>k(N=>N+1),[]),onFocusableItemRemove:d.useCallback(()=>k(N=>N-1),[]),children:l.jsx(ne.div,{tabIndex:b||j===0?-1:0,"data-orientation":n,...p,ref:g,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{R.current=!0}),onFocus:K(e.onFocus,N=>{const $=!R.current;if(N.target===N.currentTarget&&$&&!b){const B=new CustomEvent(ia,rC);if(N.currentTarget.dispatchEvent(B),!B.defaultPrevented){const G=C().filter(_=>_.focusable),Q=G.find(_=>_.active),ee=G.find(_=>_.id===v),M=[Q,ee,...G].filter(Boolean).map(_=>_.ref.current);nf(M,f)}}R.current=!1}),onBlur:K(e.onBlur,()=>y(!1))})})}),tf="RovingFocusGroupItem",rf=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:s,...i}=e,c=be(),u=a||c,f=sC(tf,r),p=f.currentTabStopId===u,m=Qd(r),{onFocusableItemAdd:g,onFocusableItemRemove:h,currentTabStopId:v}=f;return d.useEffect(()=>{if(n)return g(),()=>h()},[n,g,h]),l.jsx(Pa.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:l.jsx(ne.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...i,ref:t,onMouseDown:K(e.onMouseDown,x=>{n?f.onItemFocus(u):x.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const b=uC(x,f.orientation,f.dir);if(b!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let w=m().filter(C=>C.focusable).map(C=>C.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const C=w.indexOf(x.currentTarget);w=f.loop?dC(w,C+1):w.slice(C+1)}setTimeout(()=>nf(w))}}),children:typeof s=="function"?s({isCurrentTabStop:p,hasTabStop:v!=null}):s})})});rf.displayName=tf;var lC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function cC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function uC(e,t,r){const n=cC(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return lC[n]}function nf(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function dC(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var jo=ef,Po=rf,Et="ToggleGroup",[of]=je(Et,[St]),af=St(),xs=E.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return l.jsx(fC,{...o,ref:t})}if(r==="multiple"){const o=n;return l.jsx(pC,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Et}\``)});xs.displayName=Et;var[sf,lf]=of(Et),fC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[s,i]=ke({prop:r,defaultProp:n??"",onChange:o,caller:Et});return l.jsx(sf,{scope:e.__scopeToggleGroup,type:"single",value:E.useMemo(()=>s?[s]:[],[s]),onItemActivate:i,onItemDeactivate:E.useCallback(()=>i(""),[i]),children:l.jsx(cf,{...a,ref:t})})}),pC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[s,i]=ke({prop:r,defaultProp:n??[],onChange:o,caller:Et}),c=E.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=E.useCallback(f=>i((p=[])=>p.filter(m=>m!==f)),[i]);return l.jsx(sf,{scope:e.__scopeToggleGroup,type:"multiple",value:s,onItemActivate:c,onItemDeactivate:u,children:l.jsx(cf,{...a,ref:t})})});xs.displayName=Et;var[mC,gC]=of(Et),cf=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:s,loop:i=!0,...c}=e,u=af(r),f=Gt(s),p={role:"group",dir:f,...c};return l.jsx(mC,{scope:r,rovingFocus:o,disabled:n,children:o?l.jsx(jo,{asChild:!0,...u,orientation:a,dir:f,loop:i,children:l.jsx(ne.div,{...p,ref:t})}):l.jsx(ne.div,{...p,ref:t})})}),Kn="ToggleGroupItem",uf=E.forwardRef((e,t)=>{const r=lf(Kn,e.__scopeToggleGroup),n=gC(Kn,e.__scopeToggleGroup),o=af(e.__scopeToggleGroup),a=r.value.includes(e.value),s=n.disabled||e.disabled,i={...e,pressed:a,disabled:s},c=E.useRef(null);return n.rovingFocus?l.jsx(Po,{asChild:!0,...o,focusable:!s,active:a,ref:c,children:l.jsx(nl,{...i,ref:t})}):l.jsx(nl,{...i,ref:t})});uf.displayName=Kn;var nl=E.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=lf(Kn,r),s={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},i=a.type==="single"?s:void 0;return l.jsx(hs,{...i,...o,ref:t,onPressedChange:c=>{c?a.onItemActivate(n):a.onItemDeactivate(n)}})}),vC=xs,hC=uf;const df=d.createContext({size:"default",variant:"default"});function xC({className:e,variant:t,size:r,children:n,...o}){return l.jsx(vC,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:P("qodo qodo-toggle-group group/toggle-group flex w-fit items-center rounded-md data-[variant=outline]:shadow-xs dark:data-[variant=outline]:shadow-xs",e),...o,children:l.jsx(df.Provider,{value:{variant:t,size:r},children:n})})}function bC({className:e,children:t,variant:r,size:n,...o}){const a=d.useContext(df);return l.jsx(hC,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:P(Jd({variant:a.variant||r,size:a.size||n}),"qodo qodo-toggle-group-item min-w-0 flex-1 shrink-0 rounded-none shadow-none first:rounded-l-md last:rounded-r-md focus:z-10 focus-visible:z-10 data-[variant=outline]:border-l-0 data-[variant=outline]:first:border-l",e),...o,children:t})}var To="Collapsible",[yC,ff]=je(To),[wC,bs]=yC(To),pf=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[c,u]=ke({prop:n,defaultProp:o??!1,onChange:s,caller:To});return l.jsx(wC,{scope:r,disabled:a,contentId:be(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:l.jsx(ne.div,{"data-state":ws(c),"data-disabled":a?"":void 0,...i,ref:t})})});pf.displayName=To;var mf="CollapsibleTrigger",gf=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=bs(mf,r);return l.jsx(ne.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ws(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});gf.displayName=mf;var ys="CollapsibleContent",vf=d.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=bs(ys,e.__scopeCollapsible);return l.jsx(Pe,{present:r||o.open,children:({present:a})=>l.jsx(CC,{...n,ref:t,present:a})})});vf.displayName=ys;var CC=d.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,s=bs(ys,r),[i,c]=d.useState(n),u=d.useRef(null),f=ce(t,u),p=d.useRef(0),m=p.current,g=d.useRef(0),h=g.current,v=s.open||i,x=d.useRef(v),b=d.useRef(void 0);return d.useEffect(()=>{const y=requestAnimationFrame(()=>x.current=!1);return()=>cancelAnimationFrame(y)},[]),Ne(()=>{const y=u.current;if(y){b.current=b.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const w=y.getBoundingClientRect();p.current=w.height,g.current=w.width,x.current||(y.style.transitionDuration=b.current.transitionDuration,y.style.animationName=b.current.animationName),c(n)}},[s.open,n]),l.jsx(ne.div,{"data-state":ws(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":m?`${m}px`:void 0,"--radix-collapsible-content-width":h?`${h}px`:void 0,...e.style},children:v&&o})});function ws(e){return e?"open":"closed"}var SC=pf,EC=gf,RC=vf,Ke="Accordion",kC=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Cs,NC,jC]=vo(Ke),[Io]=je(Ke,[jC,ff]),Ss=ff(),hf=E.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return l.jsx(Cs.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?l.jsx(AC,{...a,ref:t}):l.jsx(IC,{...o,ref:t})})});hf.displayName=Ke;var[xf,PC]=Io(Ke),[bf,TC]=Io(Ke,{collapsible:!1}),IC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...s}=e,[i,c]=ke({prop:r,defaultProp:n??"",onChange:o,caller:Ke});return l.jsx(xf,{scope:e.__scopeAccordion,value:E.useMemo(()=>i?[i]:[],[i]),onItemOpen:c,onItemClose:E.useCallback(()=>a&&c(""),[a,c]),children:l.jsx(bf,{scope:e.__scopeAccordion,collapsible:a,children:l.jsx(yf,{...s,ref:t})})})}),AC=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[s,i]=ke({prop:r,defaultProp:n??[],onChange:o,caller:Ke}),c=E.useCallback(f=>i((p=[])=>[...p,f]),[i]),u=E.useCallback(f=>i((p=[])=>p.filter(m=>m!==f)),[i]);return l.jsx(xf,{scope:e.__scopeAccordion,value:s,onItemOpen:c,onItemClose:u,children:l.jsx(bf,{scope:e.__scopeAccordion,collapsible:!0,children:l.jsx(yf,{...a,ref:t})})})}),[_C,Ao]=Io(Ke),yf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...s}=e,i=E.useRef(null),c=ce(i,t),u=NC(r),p=Gt(o)==="ltr",m=K(e.onKeyDown,g=>{var N;if(!kC.includes(g.key))return;const h=g.target,v=u().filter($=>{var B;return!((B=$.ref.current)!=null&&B.disabled)}),x=v.findIndex($=>$.ref.current===h),b=v.length;if(x===-1)return;g.preventDefault();let y=x;const w=0,C=b-1,R=()=>{y=x+1,y>C&&(y=w)},j=()=>{y=x-1,y<w&&(y=C)};switch(g.key){case"Home":y=w;break;case"End":y=C;break;case"ArrowRight":a==="horizontal"&&(p?R():j());break;case"ArrowDown":a==="vertical"&&R();break;case"ArrowLeft":a==="horizontal"&&(p?j():R());break;case"ArrowUp":a==="vertical"&&j();break}const k=y%b;(N=v[k].ref.current)==null||N.focus()});return l.jsx(_C,{scope:r,disabled:n,direction:o,orientation:a,children:l.jsx(Cs.Slot,{scope:r,children:l.jsx(ne.div,{...s,"data-orientation":a,ref:c,onKeyDown:n?void 0:m})})})}),Yn="AccordionItem",[OC,Es]=Io(Yn),wf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=Ao(Yn,r),s=PC(Yn,r),i=Ss(r),c=be(),u=n&&s.value.includes(n)||!1,f=a.disabled||e.disabled;return l.jsx(OC,{scope:r,open:u,disabled:f,triggerId:c,children:l.jsx(SC,{"data-orientation":a.orientation,"data-state":Nf(u),...i,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?s.onItemOpen(n):s.onItemClose(n)}})})});wf.displayName=Yn;var Cf="AccordionHeader",Sf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Ao(Ke,r),a=Es(Cf,r);return l.jsx(ne.h3,{"data-orientation":o.orientation,"data-state":Nf(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});Sf.displayName=Cf;var Ta="AccordionTrigger",Ef=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Ao(Ke,r),a=Es(Ta,r),s=TC(Ta,r),i=Ss(r);return l.jsx(Cs.ItemSlot,{scope:r,children:l.jsx(EC,{"aria-disabled":a.open&&!s.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...i,...n,ref:t})})});Ef.displayName=Ta;var Rf="AccordionContent",kf=E.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=Ao(Ke,r),a=Es(Rf,r),s=Ss(r);return l.jsx(RC,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...s,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});kf.displayName=Rf;function Nf(e){return e?"open":"closed"}var MC=hf,DC=wf,$C=Sf,LC=Ef,FC=kf;const Rs=d.createContext({variant:"default"});function VC({variant:e="default",...t}){return l.jsx(Rs.Provider,{value:{variant:e},children:l.jsx(MC,{"data-slot":"accordion",...t})})}function BC({className:e,...t}){const{variant:r}=d.useContext(Rs);return l.jsx(DC,{"data-slot":"accordion-item",className:P("qodo qodo-accordion-item","text-[var(--text-interactive-neutral-idle)] text-base font-medium leading-6","hover:text-[var(--text-interactive-neutral-hover)]",{"border-b border-[var(--color-neutral-600)]":r==="default","border border-[var(--color-neutral-600)] mb-2 px-4 rounded-lg":r==="outlined","bg-[var(--fill-interactive-neutral-idle)] mb-2 px-2 rounded-lg":r==="filled"},e),...t})}function GC({className:e,children:t,iconPosition:r="right",...n}){const{variant:o}=d.useContext(Rs);return l.jsx($C,{className:"flex",children:l.jsxs(LC,{"data-slot":"accordion-trigger",className:P("qodo qodo-accordion-trigger","flex flex-1 items-start justify-between gap-4 rounded-md","text-left text-sm font-medium transition-all outline-none","text-text-interactive-neutral-idle cursor-pointer","hover:text-[var(--text-interactive-neutral-hover)]","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","disabled:pointer-events-none disabled:opacity-50","[&[data-state=open]>svg]:rotate-180","dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",{"py-4":o!=="filled","py-2":o==="filled","flex-row-reverse justify-end gap-2":r==="left"},e),...n,children:[t,l.jsx(oo,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function WC({className:e,children:t,...r}){return l.jsx(FC,{"data-slot":"accordion-content",className:P("qodo qodo-accordion-content","overflow-hidden text-sm text-foreground","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down","dark:text-foreground"),...r,children:l.jsx("div",{className:P("pt-0 pb-4","text-text-interactive-neutral-idle font-normal text-sm",e),children:t})})}var _o="Tabs",[zC]=je(_o,[St]),jf=St(),[qC,ks]=zC(_o),Pf=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:c="automatic",...u}=e,f=Gt(i),[p,m]=ke({prop:n,onChange:o,defaultProp:a??"",caller:_o});return l.jsx(qC,{scope:r,baseId:be(),value:p,onValueChange:m,orientation:s,dir:f,activationMode:c,children:l.jsx(ne.div,{dir:f,"data-orientation":s,...u,ref:t})})});Pf.displayName=_o;var Tf="TabsList",If=d.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=ks(Tf,r),s=jf(r);return l.jsx(jo,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:n,children:l.jsx(ne.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});If.displayName=Tf;var Af="TabsTrigger",_f=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,s=ks(Af,r),i=jf(r),c=Df(s.baseId,n),u=$f(s.baseId,n),f=n===s.value;return l.jsx(Po,{asChild:!0,...i,focusable:!o,active:f,children:l.jsx(ne.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:K(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?s.onValueChange(n):p.preventDefault()}),onKeyDown:K(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&s.onValueChange(n)}),onFocus:K(e.onFocus,()=>{const p=s.activationMode!=="manual";!f&&!o&&p&&s.onValueChange(n)})})})});_f.displayName=Af;var Of="TabsContent",Mf=d.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...s}=e,i=ks(Of,r),c=Df(i.baseId,n),u=$f(i.baseId,n),f=n===i.value,p=d.useRef(f);return d.useEffect(()=>{const m=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(m)},[]),l.jsx(Pe,{present:o||f,children:({present:m})=>l.jsx(ne.div,{"data-state":f?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":c,hidden:!m,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:m&&a})})});Mf.displayName=Of;function Df(e,t){return`${e}-trigger-${t}`}function $f(e,t){return`${e}-content-${t}`}var HC=Pf,UC=If,KC=_f,YC=Mf;function XC({className:e,...t}){return l.jsx(HC,{"data-slot":"tabs",className:P("qodo qodo-tabs flex flex-col gap-2",e),...t})}function ZC({className:e,...t}){return l.jsx(UC,{"data-slot":"tabs-list",className:P("inline-flex w-full items-end justify-start gap-4",e),...t})}function JC({className:e,...t}){return l.jsx(KC,{"data-slot":"tabs-trigger",className:P("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)] data-[state=active]:text-[var(--text-interactive-emphasis-active)] focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex items-center justify-center gap-1.5 border-b border-transparent py-4 text-xs font-normal whitespace-nowrap transition-[color,border-color] focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 disabled:cursor-not-allowed data-[state=active]:border-[var(--color-purple-400)] relative -mb-px tracking-[0.01em] leading-[150%] cursor-pointer [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function QC({className:e,...t}){return l.jsx(YC,{"data-slot":"tabs-content",className:P("flex-1 outline-none",e),...t})}const Lf=Bt("qodo qodo-typography",{variants:{variant:{h1:"scroll-m-20 text-4xl font-extrabold tracking-tight lg:text-5xl",h2:"scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0",h3:"scroll-m-20 text-2xl font-semibold tracking-tight",h4:"scroll-m-20 text-xl font-semibold tracking-tight",h5:"scroll-m-20 text-lg font-semibold tracking-tight",h6:"scroll-m-20 text-base font-semibold tracking-tight",p:"leading-7 [&:not(:first-child)]:mt-6",lead:"text-xl text-muted-foreground dark:text-muted-foreground",large:"text-lg font-semibold",small:"text-sm font-medium leading-none",muted:"text-sm text-muted-foreground dark:text-muted-foreground",body:"text-base leading-relaxed",caption:"text-xs text-muted-foreground dark:text-muted-foreground",code:"font-plex-mono relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-sm font-semibold dark:bg-muted","code-inline":"font-plex-mono relative rounded bg-muted px-[0.3rem] py-[0.2rem] text-xs dark:bg-muted","code-block":"font-plex-mono block w-full rounded-lg bg-muted p-4 text-sm leading-relaxed dark:bg-muted overflow-x-auto",blockquote:"mt-6 border-l-2 pl-6 italic text-muted-foreground dark:text-muted-foreground",list:"my-6 ml-6 list-disc [&>li]:mt-2","list-ordered":"my-6 ml-6 list-decimal [&>li]:mt-2"}},defaultVariants:{variant:"p"}}),Ff=d.forwardRef(({className:e,variant:t,as:r,...n},o)=>{const a=r||eS(t)||"p";return d.createElement(a,{className:P(Lf({variant:t,className:e})),ref:o,...n})});Ff.displayName="Typography";function eS(e){switch(e){case"list":return"ul";case"list-ordered":return"ol";case"code-inline":return"code";case"code-block":return"pre";case"lead":case"large":case"small":case"muted":case"body":case"caption":return"p";default:return e||"p"}}function tS(e){return Object.prototype.toString.call(e)==="[object Object]"}function ol(e){return tS(e)||Array.isArray(e)}function rS(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Ns(e,t){const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;const o=JSON.stringify(Object.keys(e.breakpoints||{})),a=JSON.stringify(Object.keys(t.breakpoints||{}));return o!==a?!1:r.every(s=>{const i=e[s],c=t[s];return typeof i=="function"?`${i}`==`${c}`:!ol(i)||!ol(c)?i===c:Ns(i,c)})}function al(e){return e.concat().sort((t,r)=>t.name>r.name?1:-1).map(t=>t.options)}function nS(e,t){if(e.length!==t.length)return!1;const r=al(e),n=al(t);return r.every((o,a)=>{const s=n[a];return Ns(o,s)})}function js(e){return typeof e=="number"}function Ia(e){return typeof e=="string"}function Oo(e){return typeof e=="boolean"}function sl(e){return Object.prototype.toString.call(e)==="[object Object]"}function xe(e){return Math.abs(e)}function Ps(e){return Math.sign(e)}function Br(e,t){return xe(e-t)}function oS(e,t){if(e===0||t===0||xe(e)<=xe(t))return 0;const r=Br(xe(e),xe(t));return xe(r/e)}function aS(e){return Math.round(e*100)/100}function Hr(e){return Ur(e).map(Number)}function We(e){return e[cn(e)]}function cn(e){return Math.max(0,e.length-1)}function Ts(e,t){return t===cn(e)}function il(e,t=0){return Array.from(Array(e),(r,n)=>t+n)}function Ur(e){return Object.keys(e)}function Vf(e,t){return[e,t].reduce((r,n)=>(Ur(n).forEach(o=>{const a=r[o],s=n[o],i=sl(a)&&sl(s);r[o]=i?Vf(a,s):s}),r),{})}function Aa(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function sS(e,t){const r={start:n,center:o,end:a};function n(){return 0}function o(c){return a(c)/2}function a(c){return t-c}function s(c,u){return Ia(e)?r[e](c):e(t,c,u)}return{measure:s}}function Kr(){let e=[];function t(o,a,s,i={passive:!0}){let c;if("addEventListener"in o)o.addEventListener(a,s,i),c=()=>o.removeEventListener(a,s,i);else{const u=o;u.addListener(s),c=()=>u.removeListener(s)}return e.push(c),n}function r(){e=e.filter(o=>o())}const n={add:t,clear:r};return n}function iS(e,t,r,n){const o=Kr(),a=1e3/60;let s=null,i=0,c=0;function u(){o.add(e,"visibilitychange",()=>{e.hidden&&h()})}function f(){g(),o.clear()}function p(x){if(!c)return;s||(s=x,r(),r());const b=x-s;for(s=x,i+=b;i>=a;)r(),i-=a;const y=i/a;n(y),c&&(c=t.requestAnimationFrame(p))}function m(){c||(c=t.requestAnimationFrame(p))}function g(){t.cancelAnimationFrame(c),s=null,i=0,c=0}function h(){s=null,i=0}return{init:u,destroy:f,start:m,stop:g,update:r,render:n}}function lS(e,t){const r=t==="rtl",n=e==="y",o=n?"y":"x",a=n?"x":"y",s=!n&&r?-1:1,i=f(),c=p();function u(h){const{height:v,width:x}=h;return n?v:x}function f(){return n?"top":r?"right":"left"}function p(){return n?"bottom":r?"left":"right"}function m(h){return h*s}return{scroll:o,cross:a,startEdge:i,endEdge:c,measureSize:u,direction:m}}function Ft(e=0,t=0){const r=xe(e-t);function n(u){return u<e}function o(u){return u>t}function a(u){return n(u)||o(u)}function s(u){return a(u)?n(u)?e:t:u}function i(u){return r?u-r*Math.ceil((u-t)/r):u}return{length:r,max:t,min:e,constrain:s,reachedAny:a,reachedMax:o,reachedMin:n,removeOffset:i}}function Bf(e,t,r){const{constrain:n}=Ft(0,e),o=e+1;let a=s(t);function s(m){return r?xe((o+m)%o):n(m)}function i(){return a}function c(m){return a=s(m),p}function u(m){return f().set(i()+m)}function f(){return Bf(e,i(),r)}const p={get:i,set:c,add:u,clone:f};return p}function cS(e,t,r,n,o,a,s,i,c,u,f,p,m,g,h,v,x,b,y){const{cross:w,direction:C}=e,R=["INPUT","SELECT","TEXTAREA"],j={passive:!1},k=Kr(),N=Kr(),$=Ft(50,225).constrain(g.measure(20)),B={mouse:300,touch:400},G={mouse:500,touch:600},Q=h?43:25;let ee=!1,W=0,M=0,_=!1,D=!1,T=!1,O=!1;function U(L){if(!y)return;function se(me){(Oo(y)||y(L,me))&&F(me)}const le=t;k.add(le,"dragstart",me=>me.preventDefault(),j).add(le,"touchmove",()=>{},j).add(le,"touchend",()=>{}).add(le,"touchstart",se).add(le,"mousedown",se).add(le,"touchcancel",z).add(le,"contextmenu",z).add(le,"click",Z,!0)}function J(){k.clear(),N.clear()}function I(){const L=O?r:t;N.add(L,"touchmove",A,j).add(L,"touchend",z).add(L,"mousemove",A,j).add(L,"mouseup",z)}function q(L){const se=L.nodeName||"";return R.includes(se)}function X(){return(h?G:B)[O?"mouse":"touch"]}function Y(L,se){const le=p.add(Ps(L)*-1),me=f.byDistance(L,!h).distance;return h||xe(L)<$?me:x&&se?me*.5:f.byIndex(le.get(),0).distance}function F(L){const se=Aa(L,n);O=se,T=h&&se&&!L.buttons&&ee,ee=Br(o.get(),s.get())>=2,!(se&&L.button!==0)&&(q(L.target)||(_=!0,a.pointerDown(L),u.useFriction(0).useDuration(0),o.set(s),I(),W=a.readPoint(L),M=a.readPoint(L,w),m.emit("pointerDown")))}function A(L){if(!Aa(L,n)&&L.touches.length>=2)return z(L);const le=a.readPoint(L),me=a.readPoint(L,w),ve=Br(le,W),Ee=Br(me,M);if(!D&&!O&&(!L.cancelable||(D=ve>Ee,!D)))return z(L);const Le=a.pointerMove(L);ve>v&&(T=!0),u.useFriction(.3).useDuration(.75),i.start(),o.add(C(Le)),L.preventDefault()}function z(L){const le=f.byDistance(0,!1).index!==p.get(),me=a.pointerUp(L)*X(),ve=Y(C(me),le),Ee=oS(me,ve),Le=Q-10*Ee,Re=b+Ee/50;D=!1,_=!1,N.clear(),u.useDuration(Le).useFriction(Re),c.distance(ve,!h),O=!1,m.emit("pointerUp")}function Z(L){T&&(L.stopPropagation(),L.preventDefault(),T=!1)}function H(){return _}return{init:U,destroy:J,pointerDown:H}}function uS(e,t){let n,o;function a(p){return p.timeStamp}function s(p,m){const h=`client${(m||e.scroll)==="x"?"X":"Y"}`;return(Aa(p,t)?p:p.touches[0])[h]}function i(p){return n=p,o=p,s(p)}function c(p){const m=s(p)-s(o),g=a(p)-a(n)>170;return o=p,g&&(n=p),m}function u(p){if(!n||!o)return 0;const m=s(o)-s(n),g=a(p)-a(n),h=a(p)-a(o)>170,v=m/g;return g&&!h&&xe(v)>.1?v:0}return{pointerDown:i,pointerMove:c,pointerUp:u,readPoint:s}}function dS(){function e(r){const{offsetTop:n,offsetLeft:o,offsetWidth:a,offsetHeight:s}=r;return{top:n,right:o+a,bottom:n+s,left:o,width:a,height:s}}return{measure:e}}function fS(e){function t(n){return e*(n/100)}return{measure:t}}function pS(e,t,r,n,o,a,s){const i=[e].concat(n);let c,u,f=[],p=!1;function m(x){return o.measureSize(s.measure(x))}function g(x){if(!a)return;u=m(e),f=n.map(m);function b(y){for(const w of y){if(p)return;const C=w.target===e,R=n.indexOf(w.target),j=C?u:f[R],k=m(C?e:n[R]);if(xe(k-j)>=.5){x.reInit(),t.emit("resize");break}}}c=new ResizeObserver(y=>{(Oo(a)||a(x,y))&&b(y)}),r.requestAnimationFrame(()=>{i.forEach(y=>c.observe(y))})}function h(){p=!0,c&&c.disconnect()}return{init:g,destroy:h}}function mS(e,t,r,n,o,a){let s=0,i=0,c=o,u=a,f=e.get(),p=0;function m(){const j=n.get()-e.get(),k=!c;let N=0;return k?(s=0,r.set(n),e.set(n),N=j):(r.set(e),s+=j/c,s*=u,f+=s,e.add(s),N=f-p),i=Ps(N),p=f,R}function g(){const j=n.get()-t.get();return xe(j)<.001}function h(){return c}function v(){return i}function x(){return s}function b(){return w(o)}function y(){return C(a)}function w(j){return c=j,R}function C(j){return u=j,R}const R={direction:v,duration:h,velocity:x,seek:m,settled:g,useBaseFriction:y,useBaseDuration:b,useFriction:C,useDuration:w};return R}function gS(e,t,r,n,o){const a=o.measure(10),s=o.measure(50),i=Ft(.1,.99);let c=!1;function u(){return!(c||!e.reachedAny(r.get())||!e.reachedAny(t.get()))}function f(g){if(!u())return;const h=e.reachedMin(t.get())?"min":"max",v=xe(e[h]-t.get()),x=r.get()-t.get(),b=i.constrain(v/s);r.subtract(x*b),!g&&xe(x)<a&&(r.set(e.constrain(r.get())),n.useDuration(25).useBaseFriction())}function p(g){c=!g}return{shouldConstrain:u,constrain:f,toggleActive:p}}function vS(e,t,r,n,o){const a=Ft(-t+e,0),s=p(),i=f(),c=m();function u(h,v){return Br(h,v)<=1}function f(){const h=s[0],v=We(s),x=s.lastIndexOf(h),b=s.indexOf(v)+1;return Ft(x,b)}function p(){return r.map((h,v)=>{const{min:x,max:b}=a,y=a.constrain(h),w=!v,C=Ts(r,v);return w?b:C||u(x,y)?x:u(b,y)?b:y}).map(h=>parseFloat(h.toFixed(3)))}function m(){if(t<=e+o)return[a.max];if(n==="keepSnaps")return s;const{min:h,max:v}=i;return s.slice(h,v)}return{snapsContained:c,scrollContainLimit:i}}function hS(e,t,r){const n=t[0],o=r?n-e:We(t);return{limit:Ft(o,n)}}function xS(e,t,r,n){const a=t.min+.1,s=t.max+.1,{reachedMin:i,reachedMax:c}=Ft(a,s);function u(m){return m===1?c(r.get()):m===-1?i(r.get()):!1}function f(m){if(!u(m))return;const g=e*(m*-1);n.forEach(h=>h.add(g))}return{loop:f}}function bS(e){const{max:t,length:r}=e;function n(a){const s=a-t;return r?s/-r:0}return{get:n}}function yS(e,t,r,n,o){const{startEdge:a,endEdge:s}=e,{groupSlides:i}=o,c=p().map(t.measure),u=m(),f=g();function p(){return i(n).map(v=>We(v)[s]-v[0][a]).map(xe)}function m(){return n.map(v=>r[a]-v[a]).map(v=>-xe(v))}function g(){return i(u).map(v=>v[0]).map((v,x)=>v+c[x])}return{snaps:u,snapsAligned:f}}function wS(e,t,r,n,o,a){const{groupSlides:s}=o,{min:i,max:c}=n,u=f();function f(){const m=s(a),g=!e||t==="keepSnaps";return r.length===1?[a]:g?m:m.slice(i,c).map((h,v,x)=>{const b=!v,y=Ts(x,v);if(b){const w=We(x[0])+1;return il(w)}if(y){const w=cn(a)-We(x)[0]+1;return il(w,We(x)[0])}return h})}return{slideRegistry:u}}function CS(e,t,r,n,o){const{reachedAny:a,removeOffset:s,constrain:i}=n;function c(h){return h.concat().sort((v,x)=>xe(v)-xe(x))[0]}function u(h){const v=e?s(h):i(h),x=t.map((y,w)=>({diff:f(y-v,0),index:w})).sort((y,w)=>xe(y.diff)-xe(w.diff)),{index:b}=x[0];return{index:b,distance:v}}function f(h,v){const x=[h,h+r,h-r];if(!e)return h;if(!v)return c(x);const b=x.filter(y=>Ps(y)===v);return b.length?c(b):We(x)-r}function p(h,v){const x=t[h]-o.get(),b=f(x,v);return{index:h,distance:b}}function m(h,v){const x=o.get()+h,{index:b,distance:y}=u(x),w=!e&&a(x);if(!v||w)return{index:b,distance:h};const C=t[b]-y,R=h+f(C,0);return{index:b,distance:R}}return{byDistance:m,byIndex:p,shortcut:f}}function SS(e,t,r,n,o,a,s){function i(p){const m=p.distance,g=p.index!==t.get();a.add(m),m&&(n.duration()?e.start():(e.update(),e.render(1),e.update())),g&&(r.set(t.get()),t.set(p.index),s.emit("select"))}function c(p,m){const g=o.byDistance(p,m);i(g)}function u(p,m){const g=t.clone().set(p),h=o.byIndex(g.get(),m);i(h)}return{distance:c,index:u}}function ES(e,t,r,n,o,a,s,i){const c={passive:!0,capture:!0};let u=0;function f(g){if(!i)return;function h(v){if(new Date().getTime()-u>10)return;s.emit("slideFocusStart"),e.scrollLeft=0;const y=r.findIndex(w=>w.includes(v));js(y)&&(o.useDuration(0),n.index(y,0),s.emit("slideFocus"))}a.add(document,"keydown",p,!1),t.forEach((v,x)=>{a.add(v,"focus",b=>{(Oo(i)||i(g,b))&&h(x)},c)})}function p(g){g.code==="Tab"&&(u=new Date().getTime())}return{init:f}}function Mr(e){let t=e;function r(){return t}function n(c){t=s(c)}function o(c){t+=s(c)}function a(c){t-=s(c)}function s(c){return js(c)?c:c.get()}return{get:r,set:n,add:o,subtract:a}}function Gf(e,t){const r=e.scroll==="x"?s:i,n=t.style;let o=null,a=!1;function s(m){return`translate3d(${m}px,0px,0px)`}function i(m){return`translate3d(0px,${m}px,0px)`}function c(m){if(a)return;const g=aS(e.direction(m));g!==o&&(n.transform=r(g),o=g)}function u(m){a=!m}function f(){a||(n.transform="",t.getAttribute("style")||t.removeAttribute("style"))}return{clear:f,to:c,toggleActive:u}}function RS(e,t,r,n,o,a,s,i,c){const f=Hr(o),p=Hr(o).reverse(),m=b().concat(y());function g(k,N){return k.reduce(($,B)=>$-o[B],N)}function h(k,N){return k.reduce(($,B)=>g($,N)>0?$.concat([B]):$,[])}function v(k){return a.map((N,$)=>({start:N-n[$]+.5+k,end:N+t-.5+k}))}function x(k,N,$){const B=v(N);return k.map(G=>{const Q=$?0:-r,ee=$?r:0,W=$?"end":"start",M=B[G][W];return{index:G,loopPoint:M,slideLocation:Mr(-1),translate:Gf(e,c[G]),target:()=>i.get()>M?Q:ee}})}function b(){const k=s[0],N=h(p,k);return x(N,r,!1)}function y(){const k=t-s[0]-1,N=h(f,k);return x(N,-r,!0)}function w(){return m.every(({index:k})=>{const N=f.filter($=>$!==k);return g(N,t)<=.1})}function C(){m.forEach(k=>{const{target:N,translate:$,slideLocation:B}=k,G=N();G!==B.get()&&($.to(G),B.set(G))})}function R(){m.forEach(k=>k.translate.clear())}return{canLoop:w,clear:R,loop:C,loopPoints:m}}function kS(e,t,r){let n,o=!1;function a(c){if(!r)return;function u(f){for(const p of f)if(p.type==="childList"){c.reInit(),t.emit("slidesChanged");break}}n=new MutationObserver(f=>{o||(Oo(r)||r(c,f))&&u(f)}),n.observe(e,{childList:!0})}function s(){n&&n.disconnect(),o=!0}return{init:a,destroy:s}}function NS(e,t,r,n){const o={};let a=null,s=null,i,c=!1;function u(){i=new IntersectionObserver(h=>{c||(h.forEach(v=>{const x=t.indexOf(v.target);o[x]=v}),a=null,s=null,r.emit("slidesInView"))},{root:e.parentElement,threshold:n}),t.forEach(h=>i.observe(h))}function f(){i&&i.disconnect(),c=!0}function p(h){return Ur(o).reduce((v,x)=>{const b=parseInt(x),{isIntersecting:y}=o[b];return(h&&y||!h&&!y)&&v.push(b),v},[])}function m(h=!0){if(h&&a)return a;if(!h&&s)return s;const v=p(h);return h&&(a=v),h||(s=v),v}return{init:u,destroy:f,get:m}}function jS(e,t,r,n,o,a){const{measureSize:s,startEdge:i,endEdge:c}=e,u=r[0]&&o,f=h(),p=v(),m=r.map(s),g=x();function h(){if(!u)return 0;const y=r[0];return xe(t[i]-y[i])}function v(){if(!u)return 0;const y=a.getComputedStyle(We(n));return parseFloat(y.getPropertyValue(`margin-${c}`))}function x(){return r.map((y,w,C)=>{const R=!w,j=Ts(C,w);return R?m[w]+f:j?m[w]+p:C[w+1][i]-y[i]}).map(xe)}return{slideSizes:m,slideSizesWithGaps:g,startGap:f,endGap:p}}function PS(e,t,r,n,o,a,s,i,c){const{startEdge:u,endEdge:f,direction:p}=e,m=js(r);function g(b,y){return Hr(b).filter(w=>w%y===0).map(w=>b.slice(w,w+y))}function h(b){return b.length?Hr(b).reduce((y,w,C)=>{const R=We(y)||0,j=R===0,k=w===cn(b),N=o[u]-a[R][u],$=o[u]-a[w][f],B=!n&&j?p(s):0,G=!n&&k?p(i):0,Q=xe($-G-(N+B));return C&&Q>t+c&&y.push(w),k&&y.push(b.length),y},[]).map((y,w,C)=>{const R=Math.max(C[w-1]||0);return b.slice(R,y)}):[]}function v(b){return m?g(b,r):h(b)}return{groupSlides:v}}function TS(e,t,r,n,o,a,s){const{align:i,axis:c,direction:u,startIndex:f,loop:p,duration:m,dragFree:g,dragThreshold:h,inViewThreshold:v,slidesToScroll:x,skipSnaps:b,containScroll:y,watchResize:w,watchSlides:C,watchDrag:R,watchFocus:j}=a,k=2,N=dS(),$=N.measure(t),B=r.map(N.measure),G=lS(c,u),Q=G.measureSize($),ee=fS(Q),W=sS(i,Q),M=!p&&!!y,_=p||!!y,{slideSizes:D,slideSizesWithGaps:T,startGap:O,endGap:U}=jS(G,$,B,r,_,o),J=PS(G,Q,x,p,$,B,O,U,k),{snaps:I,snapsAligned:q}=yS(G,W,$,B,J),X=-We(I)+We(T),{snapsContained:Y,scrollContainLimit:F}=vS(Q,X,q,y,k),A=M?Y:q,{limit:z}=hS(X,A,p),Z=Bf(cn(A),f,p),H=Z.clone(),te=Hr(r),L=({dragHandler:at,scrollBody:Sr,scrollBounds:Er,options:{loop:Kt}})=>{Kt||Er.constrain(at.pointerDown()),Sr.seek()},se=({scrollBody:at,translate:Sr,location:Er,offsetLocation:Kt,previousLocation:Bo,scrollLooper:Go,slideLooper:Wo,dragHandler:zo,animation:Rr,eventHandler:kr,scrollBounds:dt,options:{loop:Yt}},Xt)=>{const Nr=at.settled(),qo=!dt.shouldConstrain(),jr=Yt?Nr:Nr&&qo,wn=jr&&!zo.pointerDown();wn&&Rr.stop();const Cn=Er.get()*Xt+Bo.get()*(1-Xt);Kt.set(Cn),Yt&&(Go.loop(at.direction()),Wo.loop()),Sr.to(Kt.get()),wn&&kr.emit("settle"),jr||kr.emit("scroll")},le=iS(n,o,()=>L(Ut),at=>se(Ut,at)),me=.68,ve=A[Z.get()],Ee=Mr(ve),Le=Mr(ve),Re=Mr(ve),ot=Mr(ve),jt=mS(Ee,Re,Le,ot,m,me),Pt=CS(p,A,X,z,ot),yr=SS(le,Z,H,jt,Pt,ot,s),bn=bS(z),wr=Kr(),yn=NS(t,r,s,v),{slideRegistry:Cr}=wS(M,y,A,F,J,te),Vo=ES(e,r,Cr,yr,jt,wr,s,j),Ut={ownerDocument:n,ownerWindow:o,eventHandler:s,containerRect:$,slideRects:B,animation:le,axis:G,dragHandler:cS(G,e,n,o,ot,uS(G,o),Ee,le,yr,jt,Pt,Z,s,ee,g,h,b,me,R),eventStore:wr,percentOfView:ee,index:Z,indexPrevious:H,limit:z,location:Ee,offsetLocation:Re,previousLocation:Le,options:a,resizeHandler:pS(t,s,o,r,G,w,N),scrollBody:jt,scrollBounds:gS(z,Re,ot,jt,ee),scrollLooper:xS(X,z,Re,[Ee,Re,Le,ot]),scrollProgress:bn,scrollSnapList:A.map(bn.get),scrollSnaps:A,scrollTarget:Pt,scrollTo:yr,slideLooper:RS(G,Q,X,D,T,I,A,Re,r),slideFocus:Vo,slidesHandler:kS(t,s,C),slidesInView:yn,slideIndexes:te,slideRegistry:Cr,slidesToScroll:J,target:ot,translate:Gf(G,t)};return Ut}function IS(){let e={},t;function r(u){t=u}function n(u){return e[u]||[]}function o(u){return n(u).forEach(f=>f(t,u)),c}function a(u,f){return e[u]=n(u).concat([f]),c}function s(u,f){return e[u]=n(u).filter(p=>p!==f),c}function i(){e={}}const c={init:r,emit:o,off:s,on:a,clear:i};return c}const AS={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function _S(e){function t(a,s){return Vf(a,s||{})}function r(a){const s=a.breakpoints||{},i=Ur(s).filter(c=>e.matchMedia(c).matches).map(c=>s[c]).reduce((c,u)=>t(c,u),{});return t(a,i)}function n(a){return a.map(s=>Ur(s.breakpoints||{})).reduce((s,i)=>s.concat(i),[]).map(e.matchMedia)}return{mergeOptions:t,optionsAtMedia:r,optionsMediaQueries:n}}function OS(e){let t=[];function r(a,s){return t=s.filter(({options:i})=>e.optionsAtMedia(i).active!==!1),t.forEach(i=>i.init(a,e)),s.reduce((i,c)=>Object.assign(i,{[c.name]:c}),{})}function n(){t=t.filter(a=>a.destroy())}return{init:r,destroy:n}}function Xn(e,t,r){const n=e.ownerDocument,o=n.defaultView,a=_S(o),s=OS(a),i=Kr(),c=IS(),{mergeOptions:u,optionsAtMedia:f,optionsMediaQueries:p}=a,{on:m,off:g,emit:h}=c,v=G;let x=!1,b,y=u(AS,Xn.globalOptions),w=u(y),C=[],R,j,k;function N(){const{container:te,slides:L}=w;j=(Ia(te)?e.querySelector(te):te)||e.children[0];const le=Ia(L)?j.querySelectorAll(L):L;k=[].slice.call(le||j.children)}function $(te){const L=TS(e,j,k,n,o,te,c);if(te.loop&&!L.slideLooper.canLoop()){const se=Object.assign({},te,{loop:!1});return $(se)}return L}function B(te,L){x||(y=u(y,te),w=f(y),C=L||C,N(),b=$(w),p([y,...C.map(({options:se})=>se)]).forEach(se=>i.add(se,"change",G)),w.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(H),b.eventHandler.init(H),b.resizeHandler.init(H),b.slidesHandler.init(H),b.options.loop&&b.slideLooper.loop(),j.offsetParent&&k.length&&b.dragHandler.init(H),R=s.init(H,C)))}function G(te,L){const se=J();Q(),B(u({startIndex:se},te),L),c.emit("reInit")}function Q(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),s.destroy(),i.clear()}function ee(){x||(x=!0,i.clear(),Q(),c.emit("destroy"),c.clear())}function W(te,L,se){!w.active||x||(b.scrollBody.useBaseFriction().useDuration(L===!0?0:w.duration),b.scrollTo.index(te,se||0))}function M(te){const L=b.index.add(1).get();W(L,te,-1)}function _(te){const L=b.index.add(-1).get();W(L,te,1)}function D(){return b.index.add(1).get()!==J()}function T(){return b.index.add(-1).get()!==J()}function O(){return b.scrollSnapList}function U(){return b.scrollProgress.get(b.offsetLocation.get())}function J(){return b.index.get()}function I(){return b.indexPrevious.get()}function q(){return b.slidesInView.get()}function X(){return b.slidesInView.get(!1)}function Y(){return R}function F(){return b}function A(){return e}function z(){return j}function Z(){return k}const H={canScrollNext:D,canScrollPrev:T,containerNode:z,internalEngine:F,destroy:ee,off:g,on:m,emit:h,plugins:Y,previousScrollSnap:I,reInit:v,rootNode:A,scrollNext:M,scrollPrev:_,scrollProgress:U,scrollSnapList:O,scrollTo:W,selectedScrollSnap:J,slideNodes:Z,slidesInView:q,slidesNotInView:X};return B(t,r),setTimeout(()=>c.emit("init"),0),H}Xn.globalOptions=void 0;function Is(e={},t=[]){const r=E.useRef(e),n=E.useRef(t),[o,a]=E.useState(),[s,i]=E.useState(),c=E.useCallback(()=>{o&&o.reInit(r.current,n.current)},[o]);return E.useEffect(()=>{Ns(r.current,e)||(r.current=e,c())},[e,c]),E.useEffect(()=>{nS(n.current,t)||(n.current=t,c())},[t,c]),E.useEffect(()=>{if(rS()&&s){Xn.globalOptions=Is.globalOptions;const u=Xn(s,r.current,n.current);return a(u),()=>u.destroy()}else a(void 0)},[s,a]),[i,o]}Is.globalOptions=void 0;const Wf=d.createContext(null),As=d.createContext(null);function un(){const e=d.useContext(Wf);if(!e)throw new Error("useCarousel must be used within a <Carousel />");return e}function MS({orientation:e="horizontal",opts:t,setApi:r,plugins:n,className:o,children:a,...s}){const[i,c]=Is({...t,axis:e==="horizontal"?"x":"y"},n),[u,f]=d.useState(!1),[p,m]=d.useState(!1),g=d.useCallback(y=>{y&&(f(y.canScrollPrev()),m(y.canScrollNext()))},[]),h=d.useCallback(()=>{c==null||c.scrollPrev()},[c]),v=d.useCallback(()=>{c==null||c.scrollNext()},[c]),x=d.useCallback(y=>{c==null||c.scrollTo(y)},[c]),b=d.useCallback(y=>{y.key==="ArrowLeft"?(y.preventDefault(),h()):y.key==="ArrowRight"&&(y.preventDefault(),v())},[h,v]);return d.useEffect(()=>{!c||!r||r(c)},[c,r]),d.useEffect(()=>{if(c)return g(c),c.on("reInit",g),c.on("select",g),()=>{c==null||c.off("reInit",g),c==null||c.off("select",g)}},[c,g]),l.jsx(Wf.Provider,{value:{carouselRef:i,api:c,opts:t,orientation:e||((t==null?void 0:t.axis)==="y"?"vertical":"horizontal"),scrollPrev:h,scrollNext:v,scrollTo:x,canScrollPrev:u,canScrollNext:p},children:l.jsx("div",{onKeyDownCapture:b,className:P("qodo qodo-carousel","relative",o),role:"region","aria-roledescription":"carousel","data-slot":"carousel",...s,children:a})})}function DS({className:e,...t}){const{carouselRef:r,orientation:n}=un();return l.jsx("div",{ref:r,className:"qodo qodo-carousel-content overflow-hidden","data-slot":"carousel-content",children:l.jsx("div",{className:P("flex",n==="horizontal"?"-ml-4":"-mt-4 flex-col",e),...t})})}function $S({className:e,...t}){const{orientation:r}=un();return l.jsx("div",{role:"group","aria-roledescription":"slide","data-slot":"carousel-item",className:P("qodo qodo-carousel-item min-w-0 shrink-0 grow-0 basis-full",r==="horizontal"?"pl-4":"pt-4",e),...t})}function LS({className:e,variant:t="outline",size:r="icon",icon:n=oc,screenReaderLabel:o="Previous slide",...a}){var p;const{orientation:s,scrollPrev:i,canScrollPrev:c}=un(),u=(p=d.useContext(As))==null?void 0:p.isInFooter,f=P("qodo qodo-carousel-previous size-8 rounded-md p-[6px]",u?"flex-shrink-0":s==="horizontal"?"absolute top-1/2 -left-12 -translate-y-1/2":"absolute -top-12 left-1/2 -translate-x-1/2 rotate-90",e);return l.jsxs(Be,{"data-slot":"carousel-previous",variant:t,size:r,className:f,disabled:!c,onClick:i,...a,children:[l.jsx(n,{className:"stroke-(--icon-action-neutral-idle)"}),l.jsx("span",{className:"sr-only",children:o})]})}function FS({className:e,variant:t="outline",size:r="icon",icon:n=Ga,screenReaderLabel:o="Next slide",...a}){var p;const{orientation:s,scrollNext:i,canScrollNext:c}=un(),u=(p=d.useContext(As))==null?void 0:p.isInFooter,f=P("qodo qodo-carousel-next size-8 rounded-md flex-shrink-0 p-[6px]",u?"flex-shrink-0":s==="horizontal"?"absolute top-1/2 -right-12 -translate-y-1/2":"absolute -bottom-12 left-1/2 -translate-x-1/2 rotate-90",e);return l.jsxs(Be,{"data-slot":"carousel-next",variant:t,size:r,className:f,disabled:!c,onClick:i,...a,children:[l.jsx(n,{className:"stroke-(--icon-action-neutral-idle)"}),l.jsx("span",{className:"sr-only",children:o})]})}function VS({className:e,...t}){return l.jsx(As.Provider,{value:{isInFooter:!0},children:l.jsx("div",{className:P("flex items-center justify-center gap-6 pt-2",e),...t})})}function BS({className:e,children:t,index:r,isCurrent:n,...o}){const{scrollTo:a}=un(),s=P("text-xs uppercase",n?"!text-[var(--color-text-bg-neutral-strong)]":"!text-[var(--color-text-bg-neutral-mild)]",e);return l.jsx(Be,{variant:"ghost",className:s,disabled:n,onClick:()=>a(r),...o,children:t??`Step ${r+1}`})}var GS=e=>e.type==="checkbox",Dr=e=>e instanceof Date,_s=e=>e==null;const zf=e=>typeof e=="object";var Vt=e=>!_s(e)&&!Array.isArray(e)&&zf(e)&&!Dr(e),WS=e=>Vt(e)&&e.target?GS(e.target)?e.target.checked:e.target.value:e,zS=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,qS=(e,t)=>e.has(zS(t)),HS=e=>{const t=e.constructor&&e.constructor.prototype;return Vt(t)&&t.hasOwnProperty("isPrototypeOf")},US=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function qf(e){if(e instanceof Date)return new Date(e);const t=typeof FileList<"u"&&e instanceof FileList;if(US&&(e instanceof Blob||t))return e;const r=Array.isArray(e);if(!r&&!(Vt(e)&&HS(e)))return e;const n=r?[]:Object.create(Object.getPrototypeOf(e));for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=qf(e[o]));return n}var Hf=e=>/^\w*$/.test(e),_a=e=>e===void 0,KS=e=>Array.isArray(e)?e.filter(Boolean):[],Uf=e=>KS(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,r)=>{if(!t||!Vt(e))return r;const n=(Hf(t)?[t]:Uf(t)).reduce((o,a)=>_s(o)?o:o[a],e);return _a(n)||n===e?_a(e[t])?r:e[t]:n},la=e=>typeof e=="boolean",An=e=>typeof e=="function",ll=(e,t,r)=>{let n=-1;const o=Hf(t)?[t]:Uf(t),a=o.length,s=a-1;for(;++n<a;){const i=o[n];let c=r;if(n!==s){const u=e[i];c=Vt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(i==="__proto__"||i==="constructor"||i==="prototype")return;e[i]=c,e=e[i]}};const cl={BLUR:"blur",CHANGE:"change"},ul={all:"all"},Os=E.createContext(null);Os.displayName="HookFormControlContext";const Ms=()=>E.useContext(Os);var YS=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const s=a;return t._proxyFormState[s]!==ul.all&&(t._proxyFormState[s]=!n||ul.all),r&&(r[s]=!0),e[s]}});return o};const Kf=typeof window<"u"?E.useLayoutEffect:E.useEffect;function Yf(e){const t=Ms(),{control:r=t,disabled:n,name:o,exact:a}=e||{},[s,i]=E.useState(r._formState),c=E.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return Kf(()=>r._subscribe({name:o,formState:c.current,exact:a,callback:u=>{!n&&i({...r._formState,...u})}}),[o,n,a]),E.useEffect(()=>{c.current.isValid&&r._setValid(!0)},[r]),E.useMemo(()=>YS(s,r,c.current,!1),[s,r])}var XS=e=>typeof e=="string",dl=(e,t,r,n,o)=>XS(e)?Oe(r,e,o):Array.isArray(e)?e.map(a=>Oe(r,a)):r,fl=e=>_s(e)||!zf(e);function $n(e,t,r=new WeakSet){if(fl(e)||fl(t))return Object.is(e,t);if(Dr(e)&&Dr(t))return Object.is(e.getTime(),t.getTime());const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;if(r.has(e)||r.has(t))return!0;r.add(e),r.add(t);for(const a of n){const s=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const i=t[a];if(Dr(s)&&Dr(i)||Vt(s)&&Vt(i)||Array.isArray(s)&&Array.isArray(i)?!$n(s,i,r):!Object.is(s,i))return!1}}return!0}function ZS(e){const t=Ms(),{control:r=t,name:n,defaultValue:o,disabled:a,exact:s,compute:i}=e||{},c=E.useRef(o),u=E.useRef(i),f=E.useRef(void 0),p=E.useRef(r),m=E.useRef(n);u.current=i;const[g,h]=E.useState(()=>{const C=r._getWatch(n,c.current);return u.current?u.current(C):C}),v=E.useCallback(C=>{const R=dl(n,r._names,C||r._formValues,!1,c.current);return u.current?u.current(R):R},[r._formValues,r._names,n]),x=E.useCallback(C=>{if(!a){const R=dl(n,r._names,C||r._formValues,!1,c.current);if(u.current){const j=u.current(R);$n(j,f.current)||(h(j),f.current=j)}else h(R)}},[r._formValues,r._names,a,n]);Kf(()=>((p.current!==r||!$n(m.current,n))&&(p.current=r,m.current=n,x()),r._subscribe({name:n,formState:{values:!0},exact:s,callback:C=>{x(C.values)}})),[r,s,n,x]),E.useEffect(()=>r._removeUnmounted());const b=p.current!==r,y=m.current,w=E.useMemo(()=>{if(a)return null;const C=!b&&!$n(y,n);return b||C?v():null},[a,b,n,y,v]);return w!==null?w:g}function JS(e){const t=Ms(),{name:r,disabled:n,control:o=t,shouldUnregister:a,defaultValue:s,exact:i=!0}=e,c=qS(o._names.array,r),u=E.useMemo(()=>Oe(o._formValues,r,Oe(o._defaultValues,r,s)),[o,r,s]),f=ZS({control:o,name:r,defaultValue:u,exact:i}),p=Yf({control:o,name:r,exact:i}),m=E.useRef(e),g=E.useRef(void 0),h=E.useRef(o.register(r,{...e.rules,value:f,...la(e.disabled)?{disabled:e.disabled}:{}}));m.current=e;const v=E.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Oe(p.errors,r)},isDirty:{enumerable:!0,get:()=>!!Oe(p.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!Oe(p.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!Oe(p.validatingFields,r)},error:{enumerable:!0,get:()=>Oe(p.errors,r)}}),[p,r]),x=E.useCallback(C=>h.current.onChange({target:{value:WS(C),name:r},type:cl.CHANGE}),[r]),b=E.useCallback(()=>h.current.onBlur({target:{value:Oe(o._formValues,r),name:r},type:cl.BLUR}),[r,o._formValues]),y=E.useCallback(C=>{const R=Oe(o._fields,r);R&&R._f&&C&&(R._f.ref={focus:()=>An(C.focus)&&C.focus(),select:()=>An(C.select)&&C.select(),setCustomValidity:j=>An(C.setCustomValidity)&&C.setCustomValidity(j),reportValidity:()=>An(C.reportValidity)&&C.reportValidity()})},[o._fields,r]),w=E.useMemo(()=>({name:r,value:f,...la(n)||p.disabled?{disabled:p.disabled||n}:{},onChange:x,onBlur:b,ref:y}),[r,n,p.disabled,x,b,y,f]);return E.useEffect(()=>{const C=o._options.shouldUnregister||a,R=g.current;R&&R!==r&&!c&&o.unregister(R),o.register(r,{...m.current.rules,...la(m.current.disabled)?{disabled:m.current.disabled}:{}});const j=(k,N)=>{const $=Oe(o._fields,k);$&&$._f&&($._f.mount=N)};if(j(r,!0),C){const k=qf(Oe(o._options.defaultValues,r,m.current.defaultValue));ll(o._defaultValues,r,k),_a(Oe(o._formValues,r))&&ll(o._formValues,r,k)}return!c&&o.register(r),g.current=r,()=>{(c?C&&!o._state.action:C)?o.unregister(r):j(r,!1)}},[r,o,c,a]),E.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),E.useMemo(()=>({field:w,formState:p,fieldState:v}),[w,p,v])}const Xf=e=>e.render(JS(e)),Ds=E.createContext(null);Ds.displayName="HookFormContext";const $s=()=>E.useContext(Ds),QS=e=>{const{children:t,watch:r,getValues:n,getFieldState:o,setError:a,clearErrors:s,setValue:i,trigger:c,formState:u,resetField:f,reset:p,handleSubmit:m,unregister:g,control:h,register:v,setFocus:x,subscribe:b}=e;return E.createElement(Ds.Provider,{value:E.useMemo(()=>({watch:r,getValues:n,getFieldState:o,setError:a,clearErrors:s,setValue:i,trigger:c,formState:u,resetField:f,reset:p,handleSubmit:m,unregister:g,control:h,register:v,setFocus:x,subscribe:b}),[s,h,u,o,n,m,v,p,f,a,x,i,b,c,g,r])},E.createElement(Os.Provider,{value:h},t))},Zf=E.createContext(void 0),Jf=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return l.jsx(Zf.Provider,{value:{disabled:r,readOnly:n},children:l.jsx(QS,{...t,children:o})})},Qf=()=>{const e=E.useContext(Zf),t=$s();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},e1=({type:e="button",variant:t="outline",...r})=>{const n=()=>e==="submit"||e==="reset"?"default":t;return l.jsx(Be,{type:e,variant:n(),...r})};var ep={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},pl=E.createContext&&E.createContext(ep),t1=["attr","size","title"];function r1(e,t){if(e==null)return{};var r=n1(e,t),n,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)n=a[o],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function n1(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Zn.apply(this,arguments)}function ml(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function Jn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ml(Object(r),!0).forEach(function(n){o1(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ml(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function o1(e,t,r){return t=a1(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a1(e){var t=s1(e,"string");return typeof t=="symbol"?t:t+""}function s1(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tp(e){return e&&e.map((t,r)=>E.createElement(t.tag,Jn({key:r},t.attr),tp(t.child)))}function rp(e){return t=>E.createElement(i1,Zn({attr:Jn({},e.attr)},t),tp(e.child))}function i1(e){var t=r=>{var{attr:n,size:o,title:a}=e,s=r1(e,t1),i=o||r.size||"1em",c;return r.className&&(c=r.className),e.className&&(c=(c?c+" ":"")+e.className),E.createElement("svg",Zn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,s,{className:c,style:Jn(Jn({color:e.color||r.color},r.style),e.style),height:i,width:i,xmlns:"http://www.w3.org/2000/svg"}),a&&E.createElement("title",null,a),e.children)};return pl!==void 0?E.createElement(pl.Consumer,null,r=>t(r)):t(ep)}function l1(e){return rp({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Circle_Info"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M11.5,15a.5.5,0,0,0,1,0h0V10.981a.5.5,0,0,0-1,0Z"},child:[]},{tag:"circle",attr:{cx:"12",cy:"8.999",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M12,2.065A9.934,9.934,0,1,1,2.066,12,9.945,9.945,0,0,1,12,2.065Zm0,18.867A8.934,8.934,0,1,0,3.066,12,8.944,8.944,0,0,0,12,20.932Z"},child:[]}]}]}]})(e)}var c1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],u1=c1.reduce((e,t)=>{const r=ms(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{}),d1="Label",np=d.forwardRef((e,t)=>l.jsx(u1.label,{...e,ref:t,onMouseDown:r=>{var o;r.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));np.displayName=d1;var f1=np;function Ls({className:e,...t}){return l.jsx(f1,{"data-slot":"label",className:P("qodo qodo-label flex items-center text-purple-muted-300 gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}const op=d.createContext({}),p1=({...e})=>l.jsx(op.Provider,{value:{name:e.name},children:l.jsx(Xf,{...e})}),Mo=()=>{const e=d.useContext(op),t=d.useContext(ap),{getFieldState:r}=$s(),n=Yf({name:e.name}),o=r(e.name,n);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...o}},ap=d.createContext({});function m1({className:e,...t}){const r=d.useId();return l.jsx(ap.Provider,{value:{id:r},children:l.jsx("div",{"data-slot":"form-item",className:P("qodo qodo-form-item grid gap-2",e),...t})})}function g1({className:e,...t}){const{formItemId:r}=Mo();return l.jsx(Ls,{"data-slot":"form-label",className:P("data-[error=true]:text-destructive font-[400] uppercase font-mono text-xs leading-[1.4] text-[var(--text-bg-neutral-mid)] [&_span]:text-[var(--text-bg-neutral-mid)]",e),htmlFor:r,...t})}function v1({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Mo();return l.jsx(P0,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function h1({className:e,...t}){const{formDescriptionId:r}=Mo();return l.jsx("p",{"data-slot":"form-description",id:r,className:P("text-purple-muted-300 text-sm",e),...t})}function x1({className:e,...t}){const{error:r,formMessageId:n}=Mo(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?l.jsx("p",{"data-slot":"form-message",id:n,className:P("text-destructive text-sm",e),role:"alert",...t,children:o}):null}const zt=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:s=!1,...i}=t,{control:c,disabled:u,readOnly:f}=Qf(),p=()=>a?l.jsxs(Qa,{children:[l.jsx(es,{asChild:!0,children:l.jsx("span",{children:l.jsx(l1,{size:16})})}),l.jsx(ts,{children:l.jsx("p",{children:a})})]}):l.jsx(l.Fragment,{}),m=()=>o?l.jsx(h1,{children:o}):l.jsx(l.Fragment,{});return l.jsx(p1,{control:c,name:r,render:({field:g,fieldState:h})=>l.jsxs(m1,{className:"flex flex-col gap-1.5",children:[n&&l.jsx(g1,{children:l.jsxs("span",{className:"flex items-center gap-1",children:[n,s&&l.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),l.jsx(v1,{children:l.jsx(e,{...g,disabled:u,...i,readOnly:f,error:!!h.error})}),!!o&&m(),l.jsx(x1,{})]})})},b1=E.forwardRef((e,t)=>l.jsx(rn,{...e,ref:t})),y1=E.forwardRef((e,t)=>zt(b1)({...e,ref:t})),w1=E.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...s}=e,i=c=>{n({target:{value:c}})};return l.jsx(ps,{ref:t,options:r,onValueChange:i,searchPlaceholder:o,onSearchChange:a,...s})}),C1=zt(w1);var Fs="Radio",[S1,sp]=je(Fs),[E1,R1]=S1(Fs),ip=d.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:c,form:u,...f}=e,[p,m]=d.useState(null),g=ce(t,x=>m(x)),h=d.useRef(!1),v=p?u||!!p.closest("form"):!0;return l.jsxs(E1,{scope:r,checked:o,disabled:s,children:[l.jsx(ne.button,{type:"button",role:"radio","aria-checked":o,"data-state":dp(o),"data-disabled":s?"":void 0,disabled:s,value:i,...f,ref:g,onClick:K(e.onClick,x=>{o||c==null||c(),v&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})}),v&&l.jsx(up,{control:p,bubbles:!h.current,name:n,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});ip.displayName=Fs;var lp="RadioIndicator",cp=d.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=R1(lp,r);return l.jsx(Pe,{present:n||a.checked,children:l.jsx(ne.span,{"data-state":dp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});cp.displayName=lp;var k1="RadioBubbleInput",up=d.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const s=d.useRef(null),i=ce(s,a),c=xo(r),u=uo(t);return d.useEffect(()=>{const f=s.current;if(!f)return;const p=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(p,"checked").set;if(c!==r&&g){const h=new Event("click",{bubbles:n});g.call(f,r),f.dispatchEvent(h)}},[c,r,n]),l.jsx(ne.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});up.displayName=k1;function dp(e){return e?"checked":"unchecked"}var N1=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Do="RadioGroup",[j1]=je(Do,[St,sp]),fp=St(),pp=sp(),[P1,T1]=j1(Do),mp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:c,dir:u,loop:f=!0,onValueChange:p,...m}=e,g=fp(r),h=Gt(u),[v,x]=ke({prop:a,defaultProp:o??null,onChange:p,caller:Do});return l.jsx(P1,{scope:r,name:n,required:s,disabled:i,value:v,onValueChange:x,children:l.jsx(jo,{asChild:!0,...g,orientation:c,dir:h,loop:f,children:l.jsx(ne.div,{role:"radiogroup","aria-required":s,"aria-orientation":c,"data-disabled":i?"":void 0,dir:h,...m,ref:t})})})});mp.displayName=Do;var gp="RadioGroupItem",vp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=T1(gp,r),s=a.disabled||n,i=fp(r),c=pp(r),u=d.useRef(null),f=ce(t,u),p=a.value===o.value,m=d.useRef(!1);return d.useEffect(()=>{const g=v=>{N1.includes(v.key)&&(m.current=!0)},h=()=>m.current=!1;return document.addEventListener("keydown",g),document.addEventListener("keyup",h),()=>{document.removeEventListener("keydown",g),document.removeEventListener("keyup",h)}},[]),l.jsx(Po,{asChild:!0,...i,focusable:!s,active:p,children:l.jsx(ip,{disabled:s,required:a.required,checked:p,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:K(g=>{g.key==="Enter"&&g.preventDefault()}),onFocus:K(o.onFocus,()=>{var g;m.current&&((g=u.current)==null||g.click())})})})});vp.displayName=gp;var I1="RadioGroupIndicator",hp=d.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=pp(r);return l.jsx(cp,{...o,...n,ref:t})});hp.displayName=I1;var A1=mp,_1=vp,O1=hp;function M1({className:e,...t}){const{readOnly:r,...n}=t;return l.jsx(A1,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:P("qodo qodo-radio-group grid gap-3 group",e),...n})}function D1({className:e,...t}){return l.jsx(_1,{"data-slot":"radio-group-item",className:P("qodo qodo-radio-group-item cursor-pointer border-[var(--border-input-neutral-idle)] bg-[var(--fill-input-neutral-idle)] focus-visible:border-ring focus-visible:ring-ring/50","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive","aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px]","aria-checked:border-[var(--border-input-emphasis-active)] hover:aria-checked:border-[var(--border-input-emphasis-active)]","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","data-disabled:cursor-not-allowed data-disabled:opacity-50","aria-disabled:cursor-not-allowed aria-disabled:opacity-50","mt-[2px] mr-0",e),...t,children:l.jsx(O1,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:l.jsx(Bv,{className:"stroke-transparent fill-[var(--icon-input-emphasis-active)] absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const Vs=E.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:s=!1,className:i,direction:c="horizontal",dir:u="ltr",name:f,onChange:p,...m}=e,g=v=>{s||(p==null||p({target:{value:v}}),o==null||o(v))},h=P("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":c==="horizontal","flex-col gap-3":c==="vertical"},i);return l.jsx(M1,{name:f,ref:t,value:r,defaultValue:n,onValueChange:g,disabled:a||s,readOnly:s,className:h,dir:u,...m})});Vs.displayName="BaseRadioGroupComponent";const Bs=({label:e,description:t,disabled:r=!1,labelClassName:n,descriptionClassName:o,labelWrapperClassName:a})=>l.jsxs("div",{className:P("flex flex-col gap-2",a),children:[e&&l.jsx("div",{className:P("text-[var(--text-bg-neutral-mid)] font-normal text-sm","group-has-[button:disabled]/radio-item:opacity-70","group-has-[button:disabled]/checkbox-item:opacity-70",{"opacity-70":r},n),children:e}),t&&l.jsx("div",{className:P("text-sm text-[var(--text-bg-neutral-mild)] font-normal",o),children:t})]});Bs.displayName="LabelWithDescription";const Gs=({value:e="",disabled:t,error:r,name:n="radio",label:o,description:a,wrapperClassName:s,labelClassName:i,descriptionClassName:c,labelWrapperClassName:u})=>{const f=`${n}-${e}`;return l.jsxs(Ls,{htmlFor:f,className:P("group/radio-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal leading-5 cursor-pointer","has-[button:disabled]:cursor-not-allowed has-[button:disabled]:hover:bg-transparent",{"cursor-pointer":!t,"!cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},s),children:[l.jsx(D1,{value:e,id:f,disabled:t||r}),l.jsx(Bs,{label:o,description:a,disabled:t,labelClassName:i,descriptionClassName:c,labelWrapperClassName:u})]},e)};Gs.displayName="RadioGroupItemComponent";const $1=zt(Vs),L1=e=>l.jsx("hr",{className:"w-full h-px border-[var(--base-sidebar-border)]",...e}),F1=({children:e,description:t,className:r})=>l.jsxs("div",{className:P("space-y-1",r),children:[l.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&l.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),xp=E.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=P("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return l.jsx("div",{ref:n,className:o,...r})});xp.displayName="FormGroup";function V1({className:e,rows:t,...r}){return l.jsx("textarea",{"data-slot":"textarea",rows:t,className:P("qodo qodo-textarea border-input px-3 py-2 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20","dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-[var(--fill-input-neutral-idle)] flex min-h-16 w-full rounded-md border bg-transparent","border-[var(--border-interactive-neutral-idle)] shadow-none","placeholder:text-purple-muted-400 text-purple-muted-300 outline-none focus-visible:ring-0 selection:bg-primary selection:text-primary-foreground disabled:cursor-not-allowed disabled:opacity-50 disabled:bg-purple-muted-700 disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:bg-purple-muted-700 read-only:border-purple-muted-400 read-only:cursor-default read-only:text-purple-muted-200 md:text-sm",{"field-sizing-content":!t},e),...r})}const B1=E.forwardRef(({variant:e="default",className:t,...r},n)=>{const o=zt(V1);return l.jsx(o,{...r,ref:n,className:P({"font-plex-mono text-sm leading-[1.4] rounded dark:bg-fill-input-neutral-idle px-3 py-2 [&[readonly]]:text-[var(--text-input-neutral-placeholder)] [&[readonly]]:border [&[readonly]]:border-[var(--border-input-neutral-idle)] [&[readonly]]:bg-[var(--fill-input-neutral-idle)]":e==="code"},t)})}),bp=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>l.jsxs(Lt,{variant:a,disabled:n,size:"sm",className:P("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&l.jsx(Be,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:s=>{s.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:l.jsx(ao,{className:"w-[10px] h-[10px]"})})]}),G1=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:s,tagVariant:i})=>l.jsx("div",{onClick:r,className:P("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:l.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[l.jsx(bp,{label:e,id:t,className:s,variant:i}),n&&l.jsx(Be,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||l.jsx(rh,{className:"h-4 w-4"})})]})}),ca={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},W1=e=>{if(!e)return"";let t=e.toLowerCase();return t=t.replace(/[_\s]+/g,"-"),t=t.replace(/[^a-z0-9-]/g,""),t=t.replace(/-+/g,"-"),t=t.replace(/^-|-$/g,""),t},yp=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:s=100,disabled:i=!1,className:c,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:m,onDeleteSuggestion:g,onBlur:h,normalizeTags:v=W1,onChange:x=()=>{},onAddTag:b=()=>{},onRemoveTag:y=()=>{},onResetTags:w=()=>{}})=>{const[C,R]=E.useState(""),[j,k]=E.useState(!1),N=E.useRef(null),$=E.useRef(null),B=E.useRef(null),[G,Q]=E.useState();E.useEffect(()=>{$.current&&Q($.current.offsetWidth)},[]);const ee=e.length>=s,W=F=>{if(ee||e.some(z=>z.id===F.id))return;const A=[...e,F];x(A),b(F)},M=F=>{const A=e.filter(z=>z.id!==F);x(A),y(F)},_=()=>{x==null||x([]),w()},D=F=>{const A=F.target.value;R(A),k(!0)},T=()=>{const F=C.trim().toLowerCase();if(!F)return[];const A=new Set(e.map(z=>z.id));return o.filter(z=>z.label.toLowerCase().includes(F)&&!A.has(z.id))},O=F=>v?v(F):F,U=()=>{const F=C.trim();if(!F)return;const A=O(F);if(!A)return;if(e.some(Z=>Z.id===A)){R(""),k(!1);return}const z=o.find(Z=>Z.id===A||O(Z.label)===A);z?W(z):a&&W({id:A,label:A}),R(""),k(!1)},J=F=>{const A=F.key===ca.BACKSPACE&&!C&&e.length>0,z=F.key===ca.ENTER&&C,Z=F.key===ca.ESCAPE;z?(F.preventDefault(),U(),B.current&&(B.current.scrollLeft=B.current.scrollWidth)):A?M(e[e.length-1].id):Z&&k(!1)},I=()=>{if(C&&T().length>0)return l.jsx(fs,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:G??void 0},onOpenAutoFocus:F=>F.preventDefault(),onCloseAutoFocus:F=>F.preventDefault(),onMouseDown:F=>F.preventDefault(),children:l.jsx("div",{className:P("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:T().map(F=>l.jsx(G1,{label:F.label,id:F.id,onDeleteSuggestion:g,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var A;W(F),R(""),k(!1),(A=N.current)==null||A.focus()}},F.id))})})},q=()=>m||l.jsx(eh,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),X=()=>e.map(F=>l.jsx(bp,{label:F.label,id:F.id,onRemoveTag:M,disabled:i,className:p,variant:t},F.id)),Y=()=>e.length===0?l.jsx(l.Fragment,{}):l.jsx(ao,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:_});return l.jsx("div",{className:P("w-full",c),children:l.jsxs(us,{open:j&&!i,onOpenChange:k,modal:!1,children:[l.jsx(ds,{className:"w-full",children:l.jsxs("div",{ref:$,tabIndex:-1,className:P("flex items-center gap-2 border border-[var(--border-tag-neutral-idle)] bg-purple-muted-800 py-0.5 px-3 rounded-md scrollbar-thin",{"opacity-60":i}),onClick:F=>{var A;F.stopPropagation(),k(!0),(A=N.current)==null||A.focus()},children:[q(),l.jsxs("div",{ref:B,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[X(),l.jsx(rn,{ref:N,value:C,onChange:D,onClick:F=>F.stopPropagation(),onFocus:()=>k(!0),onBlur:h,onKeyDown:J,placeholder:r,disabled:i||ee,className:P("m-0 h-6.5 flex-1 min-w-[6rem] border-0 bg-transparent dark:bg-transparent p-0 shadow-none focus-visible:outline-none focus-visible:ring-0 font-normal text-xs","placeholder:text-[var(--text-input-neutral-placeholder)] dark:placeholder:text-[var(--text-input-neutral-placeholder)] placeholder:text-xs")})]}),Y()]})}),I()]})})};function z1(e){const{control:t}=$s();return l.jsx(Xf,{name:e.name,control:t,render:({field:r})=>l.jsx(yp,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const q1=zt(z1),H1=12,gl={SINGLE:"single",MULTIPLE:"multiple"},vl={LTR:"ltr"},hl={GHOST:"ghost"};var wp=typeof global=="object"&&global&&global.Object===Object&&global,U1=typeof self=="object"&&self&&self.Object===Object&&self,Rt=wp||U1||Function("return this")(),Qn=Rt.Symbol,Cp=Object.prototype,K1=Cp.hasOwnProperty,Y1=Cp.toString,_r=Qn?Qn.toStringTag:void 0;function X1(e){var t=K1.call(e,_r),r=e[_r];try{e[_r]=void 0;var n=!0}catch{}var o=Y1.call(e);return n&&(t?e[_r]=r:delete e[_r]),o}var Z1=Object.prototype,J1=Z1.toString;function Q1(e){return J1.call(e)}var eE="[object Null]",tE="[object Undefined]",xl=Qn?Qn.toStringTag:void 0;function dn(e){return e==null?e===void 0?tE:eE:xl&&xl in Object(e)?X1(e):Q1(e)}function Ws(e){return e!=null&&typeof e=="object"}var rE=Array.isArray;function Sp(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var nE="[object AsyncFunction]",oE="[object Function]",aE="[object GeneratorFunction]",sE="[object Proxy]";function Ep(e){if(!Sp(e))return!1;var t=dn(e);return t==oE||t==aE||t==nE||t==sE}var ua=Rt["__core-js_shared__"],bl=(function(){var e=/[^.]+$/.exec(ua&&ua.keys&&ua.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function iE(e){return!!bl&&bl in e}var lE=Function.prototype,cE=lE.toString;function qt(e){if(e!=null){try{return cE.call(e)}catch{}try{return e+""}catch{}}return""}var uE=/[\\^$.*+?()[\]{}|]/g,dE=/^\[object .+?Constructor\]$/,fE=Function.prototype,pE=Object.prototype,mE=fE.toString,gE=pE.hasOwnProperty,vE=RegExp("^"+mE.call(gE).replace(uE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hE(e){if(!Sp(e)||iE(e))return!1;var t=Ep(e)?vE:dE;return t.test(qt(e))}function xE(e,t){return e==null?void 0:e[t]}function fn(e,t){var r=xE(e,t);return hE(r)?r:void 0}var Oa=fn(Rt,"WeakMap"),bE=9007199254740991;function Rp(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=bE}function yE(e){return e!=null&&Rp(e.length)&&!Ep(e)}var wE=Object.prototype;function kp(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||wE;return e===r}var CE="[object Arguments]";function yl(e){return Ws(e)&&dn(e)==CE}var Np=Object.prototype,SE=Np.hasOwnProperty,EE=Np.propertyIsEnumerable,RE=yl((function(){return arguments})())?yl:function(e){return Ws(e)&&SE.call(e,"callee")&&!EE.call(e,"callee")};function kE(){return!1}var jp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wl=jp&&typeof module=="object"&&module&&!module.nodeType&&module,NE=wl&&wl.exports===jp,Cl=NE?Rt.Buffer:void 0,jE=Cl?Cl.isBuffer:void 0,PE=jE||kE,TE="[object Arguments]",IE="[object Array]",AE="[object Boolean]",_E="[object Date]",OE="[object Error]",ME="[object Function]",DE="[object Map]",$E="[object Number]",LE="[object Object]",FE="[object RegExp]",VE="[object Set]",BE="[object String]",GE="[object WeakMap]",WE="[object ArrayBuffer]",zE="[object DataView]",qE="[object Float32Array]",HE="[object Float64Array]",UE="[object Int8Array]",KE="[object Int16Array]",YE="[object Int32Array]",XE="[object Uint8Array]",ZE="[object Uint8ClampedArray]",JE="[object Uint16Array]",QE="[object Uint32Array]",he={};he[qE]=he[HE]=he[UE]=he[KE]=he[YE]=he[XE]=he[ZE]=he[JE]=he[QE]=!0;he[TE]=he[IE]=he[WE]=he[AE]=he[zE]=he[_E]=he[OE]=he[ME]=he[DE]=he[$E]=he[LE]=he[FE]=he[VE]=he[BE]=he[GE]=!1;function eR(e){return Ws(e)&&Rp(e.length)&&!!he[dn(e)]}function tR(e){return function(t){return e(t)}}var Pp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gr=Pp&&typeof module=="object"&&module&&!module.nodeType&&module,rR=Gr&&Gr.exports===Pp,da=rR&&wp.process,Sl=(function(){try{var e=Gr&&Gr.require&&Gr.require("util").types;return e||da&&da.binding&&da.binding("util")}catch{}})(),El=Sl&&Sl.isTypedArray,nR=El?tR(El):eR;function oR(e,t){return function(r){return e(t(r))}}var aR=oR(Object.keys,Object),sR=Object.prototype,iR=sR.hasOwnProperty;function lR(e){if(!kp(e))return aR(e);var t=[];for(var r in Object(e))iR.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ma=fn(Rt,"Map"),Da=fn(Rt,"DataView"),$a=fn(Rt,"Promise"),La=fn(Rt,"Set"),Rl="[object Map]",cR="[object Object]",kl="[object Promise]",Nl="[object Set]",jl="[object WeakMap]",Pl="[object DataView]",uR=qt(Da),dR=qt(Ma),fR=qt($a),pR=qt(La),mR=qt(Oa),At=dn;(Da&&At(new Da(new ArrayBuffer(1)))!=Pl||Ma&&At(new Ma)!=Rl||$a&&At($a.resolve())!=kl||La&&At(new La)!=Nl||Oa&&At(new Oa)!=jl)&&(At=function(e){var t=dn(e),r=t==cR?e.constructor:void 0,n=r?qt(r):"";if(n)switch(n){case uR:return Pl;case dR:return Rl;case fR:return kl;case pR:return Nl;case mR:return jl}return t});var gR="[object Map]",vR="[object Set]",hR=Object.prototype,xR=hR.hasOwnProperty;function pn(e){if(e==null)return!0;if(yE(e)&&(rE(e)||typeof e=="string"||typeof e.splice=="function"||PE(e)||nR(e)||RE(e)))return!e.length;var t=At(e);if(t==gR||t==vR)return!e.size;if(kp(e))return!lR(e).length;for(var r in e)if(xR.call(e,r))return!1;return!0}function zs(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>zs(t))}function qs(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...qs(r))}),t}function Hs(e,t){return pn(e.children)?!1:zs(e).every(n=>t.has(n))}function Tp(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=Tp(r.children,t);if(n)return n}}return null}function Us(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&Us(n.children,t).forEach((s,i)=>r.set(i,s))}return r}function Ip(e,t){e.forEach(r=>{pn(r.children)||(Hs(r,t)?t.add(r.value):t.delete(r.value),r.children&&Ip(r.children,t))})}const bR=e=>e?Array.isArray(e)?e:[e]:[],yR=e=>Us(e,t=>[t.value,t.label]),wR=e=>Us(e,t=>t.icon?[t.value,t.icon]:null);function CR(e,t){qs(e).forEach(n=>t.delete(n))}function SR(e,t){qs(e).forEach(n=>t.add(n))}function Ap(e,t){const r=new Set(t);return e.flatMap(n=>!pn(n.children)&&n.children?Hs(n,r)?[n.value]:Ap(n.children,t):r.has(n.value)?[n.value]:[])}function ER(e){return e&&e>=1?e*H1:0}var $o="Checkbox",[RR]=je($o),[kR,Ks]=RR($o);function NR(e){const{__scopeCheckbox:t,checked:r,children:n,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:p}=e,[m,g]=ke({prop:r,defaultProp:o??!1,onChange:c,caller:$o}),[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useRef(!1),w=h?!!s||!!h.closest("form"):!0,C={checked:m,disabled:a,setChecked:g,control:h,setControl:v,name:i,form:s,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:gt(o)?!1:o,isFormControl:w,bubbleInput:x,setBubbleInput:b};return l.jsx(kR,{scope:t,...C,children:jR(p)?p(C):n})}var _p="CheckboxTrigger",Op=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:r,...n},o)=>{const{control:a,value:s,disabled:i,checked:c,required:u,setControl:f,setChecked:p,hasConsumerStoppedPropagationRef:m,isFormControl:g,bubbleInput:h}=Ks(_p,e),v=ce(o,f),x=d.useRef(c);return d.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const y=()=>p(x.current);return b.addEventListener("reset",y),()=>b.removeEventListener("reset",y)}},[a,p]),l.jsx(ne.button,{type:"button",role:"checkbox","aria-checked":gt(c)?"mixed":c,"aria-required":u,"data-state":Fp(c),"data-disabled":i?"":void 0,disabled:i,value:s,...n,ref:v,onKeyDown:K(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:K(r,b=>{p(y=>gt(y)?!0:!y),h&&g&&(m.current=b.isPropagationStopped(),m.current||b.stopPropagation())})})});Op.displayName=_p;var Ys=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,name:n,checked:o,defaultChecked:a,required:s,disabled:i,value:c,onCheckedChange:u,form:f,...p}=e;return l.jsx(NR,{__scopeCheckbox:r,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:n,form:f,value:c,internal_do_not_use_render:({isFormControl:m})=>l.jsxs(l.Fragment,{children:[l.jsx(Op,{...p,ref:t,__scopeCheckbox:r}),m&&l.jsx(Lp,{__scopeCheckbox:r})]})})});Ys.displayName=$o;var Mp="CheckboxIndicator",Dp=d.forwardRef((e,t)=>{const{__scopeCheckbox:r,forceMount:n,...o}=e,a=Ks(Mp,r);return l.jsx(Pe,{present:n||gt(a.checked)||a.checked===!0,children:l.jsx(ne.span,{"data-state":Fp(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Dp.displayName=Mp;var $p="CheckboxBubbleInput",Lp=d.forwardRef(({__scopeCheckbox:e,...t},r)=>{const{control:n,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:c,name:u,value:f,form:p,bubbleInput:m,setBubbleInput:g}=Ks($p,e),h=ce(r,g),v=xo(a),x=uo(n);d.useEffect(()=>{const y=m;if(!y)return;const w=window.HTMLInputElement.prototype,R=Object.getOwnPropertyDescriptor(w,"checked").set,j=!o.current;if(v!==a&&R){const k=new Event("click",{bubbles:j});y.indeterminate=gt(a),R.call(y,gt(a)?!1:a),y.dispatchEvent(k)}},[m,v,a,o]);const b=d.useRef(gt(a)?!1:a);return l.jsx(ne.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:i,disabled:c,name:u,value:f,form:p,...t,tabIndex:-1,ref:h,style:{...t.style,...x,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Lp.displayName=$p;function jR(e){return typeof e=="function"}function gt(e){return e==="indeterminate"}function Fp(e){return gt(e)?"indeterminate":e?"checked":"unchecked"}const Xs=d.forwardRef(({className:e,...t},r)=>l.jsx(Ys,{ref:r,className:P("h-4 w-4 shrink-0 rounded-xs shadow disabled:cursor-not-allowed bg-[var(--fill-input-neutral-idle)] border border-[var(--border-input-neutral-idle)] hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)] ","active:border-[var(--border-input-neutral-active)] active:bg-[var(--fill-input-neutral-active)] disabled:border-[var(--border-input-neutral-disabled)] disabled:bg-[var(--fill-input-neutral-disabled)] ","hover:disabled:border-[var(--border-input-neutral-disabled)] hover:disabled:bg-[var(--fill-input-neutral-disabled)] ","data-[state=checked]:border-[var(--border-input-emphasis-idle)] data-[state=checked]:bg-[var(--fill-input-emphasis-idle)] hover:data-[state=checked]:border-[var(--border-input-emphasis-hover)] hover:data-[state=checked]:bg-[var(--fill-input-emphasis-hover)] active:data-[state=checked]:border-[var(--border-input-emphasis-active)] active:data-[state=checked]:bg-[var(--fill-input-emphasis-active)] disabled:data-[state=checked]:border-[var(--border-input-emphasis-disabled)] disabled:data-[state=checked]:bg-[var(--fill-input-emphasis-disabled)] ",e),...t,children:l.jsx(Dp,{className:P("flex items-center justify-center text-current"),children:t.checked==="indeterminate"?l.jsx(Zv,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"}):l.jsx(mr,{className:"h-4 w-4 stroke-[var(--icon-input-emphasis-idle)]"})})}));Xs.displayName=Ys.displayName;function Vp({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=vl.LTR,selectionIndicator:s="checkmark",size:i="default",parentSelected:c=!1}){const u=!pn(e.children),f=t.has(e.value),p=`${ER(n)}px`,m=Hs(e,t),g=f||m,h=f&&!c,v=()=>{if(e.icon)return l.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},x=()=>s==="none"?l.jsx(l.Fragment,{}):s==="checkbox"?l.jsx(Xs,{checked:g}):l.jsx(mr,{className:P("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),b=()=>{if(u){const w=!!e.disableChildrenOnParentSelect&&f;return e.children.map(C=>l.jsx(Vp,{option:C,selected:t,onSelect:r,nestLevel:n+1,dir:a,selectionIndicator:s,size:i,parentSelected:f,disabled:w||o},C.value))}},y=()=>l.jsxs("div",{className:P("flex items-center w-full gap-3 flex-row",{"flex-row-reverse":a===vl.LTR}),style:{paddingLeft:p},children:[l.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[v(),l.jsxs("span",{className:P("flex-1 flex items-center gap-2 whitespace-nowrap text-[var(--text-interactive-neutral-active)]",{"text-[var(--text-interactive-emphasis-active,#A8A1FD)]":h}),children:[e.label,e.description&&l.jsx(Lt,{size:"xs",children:e.description})]})]}),x()]});return l.jsxs("div",{children:[l.jsx(Sd,{disabled:e.disabled||o,onSelect:()=>r(e.value,u),className:P("text-[var(--text-interactive-neutral-idle)] hover:text-[var(--text-interactive-neutral-hover)]! cursor-pointer disabled:cursor-not-allowed","focus:text-[var(--text-interactive-neutral-active)] data-[selected=true]:text-[var(--text-interactive-neutral-hover)]!",{"px-2 py-1.5 text-xs":i==="xs","px-3 py-1.5":i==="default","bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),b()]})}function Bp({value:e,options:t=[],onSelect:r,disabled:n=!1,readOnly:o=!1,mode:a=gl.SINGLE,placeholder:s="Select...",inputPlaceholder:i="Search...",emptyState:c="No option found.",triggerClassName:u,triggerWrapperClassName:f,badgeClassName:p,badgeVariant:m="text",searchable:g=!1,toggleIcon:h=l.jsx(oo,{}),dir:v="ltr",variant:x="default",iconPosition:b="right",selectionIndicator:y="checkmark",onSearchChange:w,renderValue:C,size:R="default",contentMaxWidth:j,...k}){const[N,$]=E.useState(0),[B,G]=E.useState(!1),[Q,ee]=E.useState(""),W=E.useRef(null),M=a===gl.MULTIPLE,[_,D]=E.useState(e!==void 0?e:M?[]:""),T=bR(_),O=new Set(T);E.useEffect(()=>{W.current&&$(W.current.offsetWidth)},[_]);const U=yR(t),J=wR(t);E.useEffect(()=>{e!==void 0&&D(M?e||[]:e||"")},[e,M]);function I(H,te){if(!M){D(H),r==null||r(H),G(!1);return}D(L=>{const se=Array.isArray(L)?L:[],le=new Set(se),me=Tp(t,H);if(!me)return se;te?q(me,le):X(H,le);const ve=Array.from(le);return r==null||r(ve),ve})}function q(H,te){zs(H).every(le=>te.has(le))?CR(H,te):SR(H,te)}function X(H,te){te.has(H)?te.delete(H):te.add(H),Ip(t,te)}const Y=R==="xs"?"sm":"md",F=()=>{const H=Ap(t,T),te=H.length===0;if(C){const L=C({displayValues:H});if(L)return L}return te?l.jsx(Lt,{variant:m,size:Y,className:P("text-[var(--text-input-neutral-placeholder)]",{"text-[var(--text-input-neutral-disabled)]":n},p),children:s}):H.map(L=>{const se=J.get(L),le=U.get(L)||L;return l.jsx(Lt,{variant:m,size:Y,className:P("text-[var(--text-input-neutral-idle)]",{"text-[var(--text-input-neutral-disabled)]":n},p),children:l.jsxs("div",{className:"flex items-center gap-1",children:[se&&l.jsx("div",{className:"flex-shrink-0",children:se}),l.jsx("span",{children:le})]})},L)})},A=H=>{ee(H),w==null||w(H)},z=()=>{if(g)return l.jsx(bd,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i,value:Q,onValueChange:A})},Z=n||o;return l.jsxs(us,{open:B,onOpenChange:Z?void 0:G,children:[l.jsx(ds,{asChild:!0,disabled:Z,children:l.jsxs("div",{className:P("flex items-center gap-1.5 justify-between w-full min-w-24 border rounded-sm scrollbar-thin","border-[var(--border-interactive-neutral-idle)] aria-invalid:!border-destructive","aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"h-7 px-2 py-1.5 text-xs":R==="xs","h-8 px-3 py-1":R==="default","cursor-pointer hover:border-[var(--border-input-neutral-hover)]":!Z,"hover:bg-[var(--fill-input-neutral-hover)]":!Z&&x!==hl.GHOST,"bg-[var(--fill-input-neutral-idle)]":x!==hl.GHOST,"cursor-not-allowed opacity-75":n,"cursor-default border-0":o&&!n,"flex-row-reverse":b==="left"},f),ref:W,"aria-disabled":Z,"aria-readonly":o,...k,children:[l.jsx("div",{className:P("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",u),children:F()}),!o&&l.jsx("div",{className:"[&>svg]:text-[var(--icon-input-neutral-idle)] [&>svg]:hover:text-[var(--icon-input-neutral-hover)] [&>svg]:w-4 [&>svg]:h-4",children:h})]})}),l.jsx(fs,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:"max-content",minWidth:N??"auto",maxWidth:j??"calc(100vw - 2rem)"},children:l.jsxs(xd,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[z(),l.jsxs(yd,{children:[l.jsx(wd,{children:c}),l.jsx(Cd,{children:t.map(H=>l.jsx(Vp,{disabled:n,option:H,selected:O,onSelect:I,dir:v,selectionIndicator:y,size:R},H.value))})]})]})})]})}const Gp=E.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:s,...i}=e,c=u=>{n||r&&r({target:{value:u}})};return l.jsx(Bp,{options:t,value:o,disabled:a,readOnly:n,...i,onSelect:c,mode:s})});Gp.displayName="BaseSelectComponent";const PR=zt(Gp),Zs=E.forwardRef((e,t)=>{const{value:r=[],defaultValue:n=[],onValueChange:o,disabled:a=!1,readOnly:s=!1,className:i,direction:c="vertical",onChange:u,children:f,...p}=e,[m,g]=E.useState(pn(r)?n:r),h=c==="horizontal",v=r!==void 0?r:m,x=(w,C)=>{if(s)return;const R=C?[...v,w]:v.filter(j=>j!==w);r===void 0&&g(R),u==null||u({target:{value:R}}),o==null||o(R)},b=P("qodo qodo-custom-checkbox-group","flex",{"flex-row gap-6":h,"flex-col gap-3":!h},i),y=()=>E.Children.map(f,w=>{if(!E.isValidElement(w))return w;const C=w.props.name;if(!C)return w;const R=w.props.disabled,j=s||a||R;return E.cloneElement(w,{checked:v.includes(C),onCheckedChange:k=>x(C,k),disabled:j,name:C})});return l.jsx("div",{ref:t,className:b,...p,children:y()})});Zs.displayName="CheckboxGroupComponent";const Js=({disabled:e,error:t,name:r="checkbox",checked:n,onCheckedChange:o,label:a,description:s,labelWrapperClassName:i,labelClassName:c,descriptionClassName:u,checkboxClassName:f,wrapperClassName:p})=>l.jsxs(Ls,{htmlFor:r,className:P("group/checkbox-item flex items-start p-4 rounded-lg gap-2 transition-all duration-200","font-normal text-purple-muted-200 dark:text-purple-muted-200 leading-5",{"cursor-pointer":!e,"cursor-not-allowed":e,"border border-destructive":t},p),children:[l.jsx(Xs,{id:r,disabled:e||t,checked:n,onCheckedChange:o,className:P("mt-0.5",f)}),l.jsx(Bs,{label:a,description:s,disabled:e,labelClassName:c,descriptionClassName:u,labelWrapperClassName:i})]});Js.displayName="CheckboxGroupItemComponent";const TR=zt(Zs),Me=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...s}=e,{handleSubmit:i}=o,c=P("qodo qodo-form","flex flex-col gap-6",t);return l.jsx(Jf,{methods:o,disabled:r,readOnly:n,children:l.jsx("form",{className:c,onSubmit:i(a),...s})})};Me.Button=e1;Me.Input=y1;Me.Select=PR;Me.Combobox=C1;Me.RadioGroup=$1;Me.RadioGroupItem=Gs;Me.Group=xp;Me.Textarea=B1;Me.Divider=L1;Me.Title=F1;Me.TagsInput=q1;Me.CheckboxGroup=TR;Me.Checkbox=Js;function IR(e){return e==null?[]:Array.isArray(e)?e:[e]}var AR=e=>Array.from(Array(e).keys()),Tl=e=>(e==null?void 0:e.constructor.name)==="Array",_R=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!Qs(e[r],t[r]))return!1;return!0},Qs=(e,t)=>{if(Object.is(e,t))return!0;if(e==null&&t!=null||e!=null&&t==null)return!1;if(typeof(e==null?void 0:e.isEqual)=="function"&&typeof(t==null?void 0:t.isEqual)=="function")return e.isEqual(t);if(typeof e=="function"&&typeof t=="function")return e.toString()===t.toString();if(Tl(e)&&Tl(t))return _R(Array.from(e),Array.from(t));if(typeof e!="object"||typeof t!="object")return!1;const r=Object.keys(t??Object.create(null)),n=r.length;for(let o=0;o<n;o++)if(!Reflect.has(e,r[o]))return!1;for(let o=0;o<n;o++){const a=r[o];if(!Qs(e[a],t[a]))return!1}return!0},OR=e=>e!=null&&typeof e=="object",Ln=e=>typeof e=="string",sr=e=>typeof e=="function",Wp=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),MR=e=>Object.prototype.toString.call(e),zp=Function.prototype.toString,DR=zp.call(Object),$R=e=>{if(!OR(e)||MR(e)!="[object Object]"||VR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=Wp(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&zp.call(r)==DR},LR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,FR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,VR=e=>LR(e)||FR(e),BR=e=>e(),GR=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},WR=e=>Number.isNaN(e),zR=e=>WR(e)?0:e,qR=(e,t,r)=>{const n=zR(e),o=n>=t,a=r==null||n<=r;return o&&a};function qp(e){if(!$R(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(n=>typeof n=="string"),r={};for(const n of t){const o=e[n];o!==void 0&&(r[n]=qp(o))}return r}function Il(...e){const t=e.length===1?e[0]:e[1];(e.length===2?e[0]:!0)&&process.env.NODE_ENV!=="production"&&console.warn(t)}function HR(e,t){if(e==null)throw new Error(t())}var Hp=e=>typeof e=="object"&&e!==null,Xe=e=>e?"":void 0,UR=9,KR=e=>Hp(e)&&e.nodeType===UR,YR=e=>Hp(e)&&e===e.window;function XR(e){if(!e)return!1;const t=e.getRootNode();return Up(t)===e}function ZR(e){return KR(e)?e:YR(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Up(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const r=t.shadowRoot.activeElement;if(!r||r===t)break;t=r}return t}var JR=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),QR=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Al=e=>{const t={};let r;for(;r=QR.exec(e);)t[r[1]]=r[2];return t},ek=(e,t)=>{if(Ln(e)){if(Ln(t))return`${e};${t}`;e=Al(e)}else Ln(t)&&(t=Al(t));return Object.assign({},e??{},t??{})};function Ye(...e){let t={};for(let r of e){if(!r)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof r[o]=="function"){t[o]=GR(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=JR(t[o],r[o]);continue}if(o==="style"){t[o]=ek(t[o],r[o]);continue}t[o]=r[o]!==void 0?r[o]:t[o]}for(let o in r)t[o]===void 0&&(t[o]=r[o]);const n=Object.getOwnPropertySymbols(r);for(let o of n)t[o]=r[o]}return t}function tk(e,t,r){let n=[],o;return a=>{const s=e(a);return(s.length!==n.length||s.some((c,u)=>!Qs(n[u],c)))&&(n=s,o=t(s,a)),o}}var ar=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(ar||{}),fa="__init__";function rk(e){const t=()=>{var s;return((s=e.getRootNode)==null?void 0:s.call(e))??document},r=()=>ZR(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Up(t()),isActiveElement:XR,getById:s=>t().getElementById(s)}}function nk(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var ok=()=>e=>Array.from(new Set(e)),Kp=typeof globalThis.document<"u"?E.useLayoutEffect:E.useEffect;function eo(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=E.useState(t),[o,a]=E.useState(n),s=e().value!==void 0,i=E.useRef(o);i.current=s?e().value:o;const c=E.useRef(i.current);Kp(()=>{c.current=i.current},[o,e().value]);const u=p=>{var h,v;const m=c.current,g=sr(p)?p(m):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:g,prev:m}),s||a(g),r(g,m)||(v=(h=e()).onChange)==null||v.call(h,g,m)};function f(){return s?e().value:o}return{initial:n,ref:i,get:f,set(p){(e().sync?Zr.flushSync:BR)(()=>u(p))},invoke(p,m){var g,h;(h=(g=e()).onChange)==null||h.call(g,p,m)},hash(p){var m,g;return((g=(m=e()).hash)==null?void 0:g.call(m,p))??String(p)}}}eo.cleanup=e=>{E.useEffect(()=>e,[])};eo.ref=e=>{const t=E.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function ak(e){const t=E.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var sk=(e,t)=>{const r=E.useRef(!1),n=E.useRef(!1);E.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),E.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function ik(e,t={}){var G,Q,ee,W;const r=E.useMemo(()=>{const{id:M,ids:_,getRootNode:D}=t;return rk({id:M,ids:_,getRootNode:D})},[t]),n=(...M)=>{e.debug&&console.log(...M)},o=((G=e.props)==null?void 0:G.call(e,{props:qp(t),scope:r}))??t,a=lk(o),s=(Q=e.context)==null?void 0:Q.call(e,{prop:a,bindable:eo,scope:r,flush:_l,getContext(){return c},getComputed(){return R},getRefs(){return v},getEvent(){return g()}}),i=Yp(s),c={get(M){var _;return(_=i.current)==null?void 0:_[M].ref.current},set(M,_){var D;(D=i.current)==null||D[M].set(_)},initial(M){var _;return(_=i.current)==null?void 0:_[M].initial},hash(M){var D,T;const _=(D=i.current)==null?void 0:D[M].get();return(T=i.current)==null?void 0:T[M].hash(_)}},u=E.useRef(new Map),f=E.useRef(null),p=E.useRef(null),m=E.useRef({type:""}),g=()=>({...m.current,current(){return m.current},previous(){return p.current}}),h=()=>({...j,matches(...M){return M.includes(j.ref.current)},hasTag(M){var _,D;return!!((D=(_=e.states[j.ref.current])==null?void 0:_.tags)!=null&&D.includes(M))}}),v=ak(((ee=e.refs)==null?void 0:ee.call(e,{prop:a,context:c}))??{}),x=()=>({state:h(),context:c,event:g(),prop:a,send:B,action:b,guard:y,track:sk,refs:v,computed:R,flush:_l,scope:r,choose:C}),b=M=>{const _=sr(M)?M(x()):M;if(!_)return;const D=_.map(T=>{var U,J;const O=(J=(U=e.implementations)==null?void 0:U.actions)==null?void 0:J[T];return O||Il(`[zag-js] No implementation found for action "${JSON.stringify(T)}"`),O});for(const T of D)T==null||T(x())},y=M=>{var _,D;return sr(M)?M(x()):(D=(_=e.implementations)==null?void 0:_.guards)==null?void 0:D[M](x())},w=M=>{const _=sr(M)?M(x()):M;if(!_)return;const D=_.map(O=>{var J,I;const U=(I=(J=e.implementations)==null?void 0:J.effects)==null?void 0:I[O];return U||Il(`[zag-js] No implementation found for effect "${JSON.stringify(O)}"`),U}),T=[];for(const O of D){const U=O==null?void 0:O(x());U&&T.push(U)}return()=>T.forEach(O=>O==null?void 0:O())},C=M=>IR(M).find(_=>{let D=!_.guard;return Ln(_.guard)?D=!!y(_.guard):sr(_.guard)&&(D=_.guard(x())),D}),R=M=>{HR(e.computed,()=>"[zag-js] No computed object found on machine");const _=e.computed[M];return _({context:c,event:g(),prop:a,refs:v,scope:r,computed:R})},j=eo(()=>({defaultValue:e.initialState({prop:a}),onChange(M,_){var T,O,U,J;if(_){const I=u.current.get(_);I==null||I(),u.current.delete(_)}_&&b((T=e.states[_])==null?void 0:T.exit),b((O=f.current)==null?void 0:O.actions);const D=w((U=e.states[M])==null?void 0:U.effects);if(D&&u.current.set(M,D),_===fa){b(e.entry);const I=w(e.effects);I&&u.current.set(fa,I)}b((J=e.states[M])==null?void 0:J.entry)}})),k=E.useRef(void 0),N=E.useRef(ar.NotStarted);Kp(()=>{queueMicrotask(()=>{const D=N.current===ar.Started;N.current=ar.Started,n(D?"rehydrating...":"initializing...");const T=k.current??j.initial;j.invoke(T,D?j.get():fa)});const M=u.current,_=j.ref.current;return()=>{n("unmounting..."),k.current=_,N.current=ar.Stopped,M.forEach(D=>D==null?void 0:D()),u.current=new Map,f.current=null,queueMicrotask(()=>{b(e.exit)})}},[]);const $=()=>"ref"in j?j.ref.current:j.get(),B=M=>{queueMicrotask(()=>{var J,I;if(N.current!==ar.Started)return;p.current=m.current,m.current=M;let _=$();const D=((J=e.states[_].on)==null?void 0:J[M.type])??((I=e.on)==null?void 0:I[M.type]),T=C(D);if(!T)return;f.current=T;const O=T.target??_;n("transition",M.type,T.target||_,`(${T.actions})`);const U=O!==_;U?Zr.flushSync(()=>j.set(O)):T.reenter&&!U?j.invoke(_,_):b(T.actions??[])})};return(W=e.watch)==null||W.call(e,x()),{state:h(),send:B,context:c,prop:a,scope:r,refs:v,computed:R,event:g(),getStatus:()=>N.current}}function Yp(e){const t=E.useRef(e);return t.current=e,t}function lk(e){const t=Yp(e);return function(n){return t.current[n]}}function _l(e){queueMicrotask(()=>{Zr.flushSync(()=>e())})}var ck=nk(e=>e);function uk(...e){return t=>{const r=[];for(const n of e)if(typeof n=="function"){const o=n(t);typeof o=="function"&&r.push(o)}else n&&(n.current=t);if(r.length)return()=>{for(const n of r)n()}}}function dk(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}const pa=e=>{const t=E.memo(E.forwardRef((r,n)=>{const{asChild:o,children:a,...s}=r;if(!o)return E.createElement(e,{...s,ref:n},a);if(!E.isValidElement(a))return null;const i=E.Children.only(a),c=dk(i);return E.cloneElement(i,{...Ye(s,i.props),ref:n?uk(n,c):c})}));return t.displayName=e.displayName||e.name,t},fk=()=>{const e=new Map;return new Proxy(pa,{apply(t,r,n){return pa(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,pa(n)),e.get(n)}})},nt=fk();function pk(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function mn(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:s}=e,i=E.createContext(s);i.displayName=t;function c(){const u=E.useContext(i);if(!u&&r){const f=new Error(a??pk(n,o));throw f.name="ContextError",Wp(Error,"captureStackTrace")&&sr(Error.captureStackTrace)&&Error.captureStackTrace(f,c),f}return u}return[i.Provider,c,i]}const[mk,ut]=mn({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),Xp=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getContentProps({index:r.count}),e);return l.jsx(nt.div,{...n,ref:t})});Xp.displayName="StepsCompletedContent";const ei=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,s=n;return a[s]!==void 0&&(o[s]=a[s]),delete a[s],[o,a]},[{},{...e}]),gk=ei(),Zp=E.forwardRef((e,t)=>{const[r,n]=gk(e,["index"]),o=ut(),a=Ye(o.getContentProps(r),n);return l.jsx(nt.div,{...a,ref:t})});Zp.displayName="StepsContent";const[vk,ti]=mn({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Jp=E.forwardRef((e,t)=>{const r=ut(),n=ti(),o=Ye(r.getIndicatorProps(n),e);return l.jsx(nt.div,{...o,ref:t})});Jp.displayName="StepsIndicator";const[hk]=mn({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),xk=ei(),Qp=E.forwardRef((e,t)=>{const[r,n]=xk(e,["index"]),o=ut(),a=Ye(o.getItemProps(r),n),s=o.getItemState(r);return l.jsx(vk,{value:r,children:l.jsx(hk,{value:s,children:l.jsx(nt.div,{...a,ref:t})})})});Qp.displayName="StepsItem";const em=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getListProps(),e);return l.jsx(nt.div,{...n,ref:t})});em.displayName="StepsList";const tm=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getNextTriggerProps(),e);return l.jsx(nt.button,{...n,ref:t})});tm.displayName="StepsNextTrigger";const rm=E.forwardRef((e,t)=>{const r=ut(),n=Ye(r.getPrevTriggerProps(),e);return l.jsx(nt.button,{...n,ref:t})});rm.displayName="StepsPrevTrigger";var $r=(e,t=[])=>({parts:(...r)=>{if(bk(t))return $r(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>$r(e,[...t,...r]),omit:(...r)=>$r(e,t.filter(n=>!r.includes(n))),rename:r=>$r(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${rr(e)}"][data-part="${rr(n)}"]`,`& [data-scope="${rr(e)}"][data-part="${rr(n)}"]`].join(", "),attrs:{"data-scope":rr(e),"data-part":rr(n)}}}),{})}),rr=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),bk=e=>e.length===0,yk=$r("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),Ze=yk.build(),wk=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},Ck=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},Ol=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.triggerId)==null?void 0:n.call(r,t))??`steps:${e.id}:trigger:${t}`},Sk=(e,t)=>{var r,n;return((n=(r=e.ids)==null?void 0:r.contentId)==null?void 0:n.call(r,t))??`steps:${e.id}:content:${t}`};function Ek(e,t){const{context:r,send:n,computed:o,prop:a,scope:s}=e,i=r.get("step"),c=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),m=b=>({triggerId:Ol(s,b.index),contentId:Sk(s,b.index),current:b.index===i,completed:b.index<i,incomplete:b.index>i,index:b.index,first:b.index===0,last:b.index===c-1}),g=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},h=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},x=b=>{n({type:"STEP.SET",value:b,src:"api.setValue"})};return{value:i,count:c,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:g,goToPrevStep:h,resetStep:v,getItemState:m,setStep:x,getRootProps(){return t.element({...Ze.root.attrs,id:wk(s),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const y=AR(c).map((w,C)=>Ol(s,C));return t.element({...Ze.list.attrs,dir:a("dir"),id:Ck(s),role:"tablist","aria-owns":y.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(b){const y=m(b);return t.element({...Ze.item.attrs,dir:a("dir"),"aria-current":y.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(b){const y=m(b);return t.button({...Ze.trigger.attrs,id:y.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||y.current?0:-1,"aria-selected":y.current,"aria-controls":y.contentId,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"data-complete":Xe(y.completed),"data-current":Xe(y.current),"data-incomplete":Xe(y.incomplete),onClick(w){w.defaultPrevented||a("linear")||n({type:"STEP.SET",value:b.index,src:"trigger.click"})}})},getContentProps(b){const y=m(b);return t.element({...Ze.content.attrs,dir:a("dir"),id:y.contentId,role:"tabpanel",tabIndex:0,hidden:!y.current,"data-state":y.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":y.triggerId})},getIndicatorProps(b){const y=m(b);return t.element({...Ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":Xe(y.completed),"data-current":Xe(y.current),"data-incomplete":Xe(y.incomplete)})},getSeparatorProps(b){const y=m(b);return t.element({...Ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":Xe(y.completed),"data-current":Xe(y.current),"data-incomplete":Xe(y.incomplete)})},getNextTriggerProps(){return t.button({...Ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(b){b.defaultPrevented||g()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...Ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(b){b.defaultPrevented||h()}})},getProgressProps(){return t.element({dir:a("dir"),...Ze.progress.attrs,role:"progressbar","aria-valuenow":u,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":`${u}% complete`,"data-complete":Xe(u===100)})}}}var Rk={props({props:e}){return{defaultStep:0,count:1,linear:!1,orientation:"horizontal",...e}},context({prop:e,bindable:t}){return{step:t(()=>({defaultValue:e("defaultStep"),value:e("step"),onChange(r){var o,a;(o=e("onStepChange"))==null||o({step:r}),r==e("count")&&((a=e("onStepComplete"))==null||a())}}))}},computed:{percent:tk(({context:e,prop:t})=>[e.get("step"),t("count")],([e,t])=>e/t*100),hasNextStep:({context:e,prop:t})=>e.get("step")<t("count"),hasPrevStep:({context:e})=>e.get("step")>0,completed:({context:e,prop:t})=>e.get("step")===t("count")},initialState(){return"idle"},entry:["validateStep"],states:{idle:{on:{"STEP.SET":{actions:["setStep"]},"STEP.NEXT":{actions:["goToNextStep"]},"STEP.PREV":{actions:["goToPrevStep"]},"STEP.RESET":{actions:["resetStep"]}}}},implementations:{actions:{goToNextStep({context:e,prop:t}){const r=Math.min(e.get("step")+1,t("count"));e.set("step",r)},goToPrevStep({context:e}){const t=Math.max(e.get("step")-1,0);e.set("step",t)},resetStep({context:e}){e.set("step",0)},setStep({context:e,event:t}){e.set("step",t.value)},validateStep({context:e,prop:t}){kk(t("count"),e.get("step"))}}}},kk=(e,t)=>{if(!qR(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};ok()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[oP,Nk]=mn({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[aP,jk]=mn({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function Pk(e){const t=E.useId(),{getRootNode:r}=Nk(),{dir:n}=jk(),o={id:t,dir:n,getRootNode:r,...e},a=ik(Rk,o);return Ek(a,ck)}const Tk=ei(),nm=E.forwardRef((e,t)=>{const[r,n]=Tk(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=Pk(r),a=Ye(o.getRootProps(),n);return l.jsx(mk,{value:o,children:l.jsx(nt.div,{...a,ref:t})})});nm.displayName="StepsRoot";const om=E.forwardRef((e,t)=>{const r=ut(),n=ti(),o=Ye(r.getSeparatorProps(n),e);return l.jsx(nt.div,{...o,ref:t})});om.displayName="StepsSeparator";const am=E.forwardRef((e,t)=>{const r=ut(),n=ti(),o=Ye(r.getTriggerProps(n),e);return l.jsx(nt.button,{...o,ref:t})});am.displayName="StepsTrigger";function Ik(e){return rp({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M20 6 9 17l-5-5"},child:[]}]})(e)}const sm=E.createContext(void 0),Ak=({children:e,step:t})=>l.jsx(sm.Provider,{value:{step:t},children:e}),im=()=>{const e=E.useContext(sm);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},_k=({className:e,step:t,...r})=>{const n=P("qodo qodo-steps","flex flex-col gap-4",e);return l.jsx(Ak,{step:t??0,children:l.jsx(nm,{className:n,step:t,...r})})},Ok=({className:e,...t})=>{const r=P("flex flex-row gap-4",e);return l.jsx(em,{className:r,...t})},Mk=({className:e,...t})=>{const r=P("flex flex-row items-center gap-4",e);return l.jsx(Qp,{className:r,...t})},Dk=({className:e,...t})=>{const r=P("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return l.jsx(am,{className:r,...t})},$k=({index:e,className:t,...r})=>{const{step:n}=im(),o=e===n,a=e<n,s=P("flex items-center justify-center w-8 h-8 rounded-full text-white",a&&"bg-green-700",o&&"bg-green-600",!a&&!o&&"bg-purple-muted-500",t),i=P({"text-white":o,"text-purple-muted-300":!a&&e!==n});return l.jsx(Jp,{className:s,...r,children:a?l.jsx(Ik,{className:"text-green-400"}):l.jsx("span",{className:i,children:e+1})})},Lk=({index:e,className:t,...r})=>{const{step:n}=im(),o=e<n,a=P("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return l.jsx(om,{className:a,...r})},Fk=({className:e,...t})=>{const r=P(e);return l.jsx(Zp,{className:r,...t})},Vk=({className:e,...t})=>{const r=P(e);return l.jsx(Xp,{className:r,...t})},Bk=({className:e,...t})=>{const r=P("bg-primary text-white px-4 py-2 rounded-md",e);return l.jsx(rm,{className:r,...t})},Gk=({className:e,...t})=>{const r=P("bg-primary text-white px-4 py-2 rounded-md",e);return l.jsx(tm,{className:r,...t})},Wk={Root:_k,List:Ok,Item:Mk,Trigger:Dk,Indicator:$k,Separator:Lk,Content:Fk,CompletedContent:Vk,PrevTrigger:Bk,NextTrigger:Gk},gn=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>l.jsx(Wc,{...r,children:l.jsxs(Qa,{children:[l.jsx(es,{...n,children:e}),t&&l.jsx(ts,{...o,children:t})]})});/**
|
|
200
200
|
* react-table
|
|
201
201
|
*
|
|
202
202
|
* Copyright (c) TanStack
|