@qodo/design-system 0.17.2 → 0.17.4
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 +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +273 -257
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -152,7 +152,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
152
152
|
*
|
|
153
153
|
* This source code is licensed under the ISC license.
|
|
154
154
|
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
-
*/const Yg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sn=ve("x",Yg),Ji=wn("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium 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)] active:bg-[var(--fill-action-emphasis-active)] 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",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qe=c.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:j(Ji({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(Xi,{className:"ml-2 w-4 h-4 animate-spin"})]}));Qe.displayName="Button";const Xg=wn("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle 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-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 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 dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",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-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),Rr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:j(Xg({variant:t,className:e})),...o}));Rr.displayName="Input";function Ps(e,[t,r]){return Math.min(r,Math.max(t,e))}function F(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 Zg(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,d=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:d,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function we(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),d=r.length;r=[...r,i];const u=p=>{var y;const{scope:g,children:m,...b}=p,v=((y=g==null?void 0:g[e])==null?void 0:y[d])||l,h=c.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:h,children:m})};u.displayName=a+"Provider";function f(p,g){var v;const m=((v=g==null?void 0:g[e])==null?void 0:v[d])||l,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const d=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return o.scopeName=e,[n,Jg(o,...t)]}function Jg(...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 i=n.reduce((l,{useScope:d,scopeName:u})=>{const p=d(a)[`__scope${u}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function js(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function et(...e){return t=>{let r=!1;const n=e.map(o=>{const a=js(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():js(e[o],null)}}}}function se(...e){return c.useCallback(et(...e),e)}function it(e){const t=ev(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),d=l.find(rv);if(d){const u=d.props.children,f=l.map(p=>p===d?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Qg=it("Slot");function ev(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=ov(o),l=nv(a,o.props);return o.type!==c.Fragment&&(l.ref=n?et(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qi=Symbol("radix.slottable");function tv(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Qi,t}function rv(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qi}function nv(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]=(...l)=>{const d=a(...l);return o(...l),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function ov(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 En(e){const t=e+"CollectionProvider",[r,n]=we(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:h,children:y}=v,x=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:h,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const l=e+"CollectionSlot",d=it(l),u=S.forwardRef((v,h)=>{const{scope:y,children:x}=v,C=a(l,y),E=se(h,C.collectionRef);return s.jsx(d,{ref:E,children:x})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=it(f),m=S.forwardRef((v,h)=>{const{scope:y,children:x,...C}=v,E=S.useRef(null),N=se(h,E),T=a(f,y);return S.useEffect(()=>(T.itemMap.set(E,{ref:E,...C}),()=>void T.itemMap.delete(E))),s.jsx(g,{[p]:"",ref:N,children:x})});m.displayName=f;function b(v){const h=a(e+"CollectionConsumer",v);return S.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((T,A)=>C.indexOf(T.ref.current)-C.indexOf(A.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,n]}var av=c.createContext(void 0);function Tt(e){const t=c.useContext(av);return e||t||"ltr"}var sv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=sv.reduce((e,t)=>{const r=it(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(d,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function el(e,t){e&&yn.flushSync(()=>e.dispatchEvent(t))}function De(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function iv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e);c.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 lv="DismissableLayer",To="dismissableLayer.update",cv="dismissableLayer.pointerDownOutside",dv="dismissableLayer.focusOutside",Ns,tl=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...d}=e,u=c.useContext(tl),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),b=se(t,A=>p(A)),v=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(h),x=f?v.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=y,N=pv(A=>{const P=A.target,V=[...u.branches].some(U=>U.contains(P));!E||V||(o==null||o(A),i==null||i(A),A.defaultPrevented||l==null||l())},g),T=mv(A=>{const P=A.target;[...u.branches].some(U=>U.contains(P))||(a==null||a(A),i==null||i(A),A.defaultPrevented||l==null||l())},g);return iv(A=>{x===u.layers.size-1&&(n==null||n(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ns=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ks(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ns)}},[f,g,r,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ks())},[f,u]),c.useEffect(()=>{const A=()=>m({});return document.addEventListener(To,A),()=>document.removeEventListener(To,A)},[]),s.jsx(H.div,{...d,ref:b,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,T.onFocusCapture),onBlurCapture:F(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,N.onPointerDownCapture)})});Qt.displayName=lv;var uv="DismissableLayerBranch",fv=c.forwardRef((e,t)=>{const r=c.useContext(tl),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(H.div,{...e,ref:o})});fv.displayName=uv;function pv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let d=function(){rl(cv,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function mv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&rl(dv,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 ks(){const e=new CustomEvent(To);document.dispatchEvent(e)}function rl(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?el(o,a):o.dispatchEvent(a)}var io=0;function Rn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ts()),document.body.insertAdjacentElement("beforeend",e[1]??Ts()),io++,()=>{io===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),io--}},[])}function Ts(){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 lo="focusScope.autoFocusOnMount",co="focusScope.autoFocusOnUnmount",As={bubbles:!1,cancelable:!0},gv="FocusScope",Pr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,d]=c.useState(null),u=De(o),f=De(a),p=c.useRef(null),g=se(t,v=>d(v)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(C){if(m.paused||!l)return;const E=C.target;l.contains(E)?p.current=E:st(p.current,{select:!0})},h=function(C){if(m.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||st(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&st(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",h);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",h),x.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){Is.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(lo,As);l.addEventListener(lo,u),l.dispatchEvent(y),y.defaultPrevented||(vv(wv(nl(l)),{select:!0}),document.activeElement===v&&st(l))}return()=>{l.removeEventListener(lo,u),setTimeout(()=>{const y=new CustomEvent(co,As);l.addEventListener(co,f),l.dispatchEvent(y),y.defaultPrevented||st(v??document.body,{select:!0}),l.removeEventListener(co,f),Is.remove(m)},0)}}},[l,u,f,m]);const b=c.useCallback(v=>{if(!r&&!n||m.paused)return;const h=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(h&&y){const x=v.currentTarget,[C,E]=hv(x);C&&E?!v.shiftKey&&y===E?(v.preventDefault(),r&&st(C,{select:!0})):v.shiftKey&&y===C&&(v.preventDefault(),r&&st(E,{select:!0})):y===x&&v.preventDefault()}},[r,n,m.paused]);return s.jsx(H.div,{tabIndex:-1,...i,ref:g,onKeyDown:b})});Pr.displayName=gv;function vv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(st(n,{select:t}),document.activeElement!==r)return}function hv(e){const t=nl(e),r=_s(t,e),n=_s(t.reverse(),e);return[r,n]}function nl(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 _s(e,t){for(const r of e)if(!xv(r,{upTo:t}))return r}function xv(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 bv(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bv(e)&&t&&e.select()}}var Is=yv();function yv(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ms(e,t),e.unshift(t)},remove(t){var r;e=Ms(e,t),(r=e[0])==null||r.resume()}}}function Ms(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function wv(e){return e.filter(t=>t.tagName!=="A")}var be=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Cv=c[" useId ".trim().toString()]||(()=>{}),Sv=0;function me(e){const[t,r]=c.useState(Cv());return be(()=>{r(n=>n??String(Sv++))},[e]),t?`radix-${t}`:""}const Ev=["top","right","bottom","left"],lt=Math.min,Ne=Math.max,on=Math.round,Hr=Math.floor,He=e=>({x:e,y:e}),Rv={left:"right",right:"left",bottom:"top",top:"bottom"},Pv={start:"end",end:"start"};function Ao(e,t,r){return Ne(e,lt(t,r))}function tt(e,t){return typeof e=="function"?e(t):e}function rt(e){return e.split("-")[0]}function er(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function ra(e){return e==="y"?"height":"width"}const jv=new Set(["top","bottom"]);function Ue(e){return jv.has(rt(e))?"y":"x"}function na(e){return ta(Ue(e))}function Nv(e,t,r){r===void 0&&(r=!1);const n=er(e),o=na(e),a=ra(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=an(i)),[i,an(i)]}function kv(e){const t=an(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>Pv[t])}const Os=["left","right"],Ds=["right","left"],Tv=["top","bottom"],Av=["bottom","top"];function _v(e,t,r){switch(e){case"top":case"bottom":return r?t?Ds:Os:t?Os:Ds;case"left":case"right":return t?Tv:Av;default:return[]}}function Iv(e,t,r,n){const o=er(e);let a=_v(rt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(_o)))),a}function an(e){return e.replace(/left|right|bottom|top/g,t=>Rv[t])}function Mv(e){return{top:0,right:0,bottom:0,left:0,...e}}function ol(e){return typeof e!="number"?Mv(e):{top:e,right:e,bottom:e,left:e}}function sn(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 $s(e,t,r){let{reference:n,floating:o}=e;const a=Ue(t),i=na(t),l=ra(i),d=rt(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(d){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(er(t)){case"start":m[i]-=g*(r&&u?-1:1);break;case"end":m[i]+=g*(r&&u?-1:1);break}return m}const Ov=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=$s(u,n,d),g=n,m={},b=0;for(let v=0;v<l.length;v++){const{name:h,fn:y}=l[v],{x,y:C,data:E,reset:N}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,m={...m,[h]:{...m[h],...E}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:p}=$s(u,g,d)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function xr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=tt(t,e),b=ol(m),h=l[g?p==="floating"?"reference":"floating":p],y=sn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(h)))==null||r?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:d})),x=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},N=sn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:C,strategy:d}):x);return{top:(y.top-N.top+b.top)/E.y,bottom:(N.bottom-y.bottom+b.bottom)/E.y,left:(y.left-N.left+b.left)/E.x,right:(N.right-y.right+b.right)/E.x}}const Dv=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:d}=t,{element:u,padding:f=0}=tt(e,t)||{};if(u==null)return{};const p=ol(f),g={x:r,y:n},m=na(o),b=ra(m),v=await i.getDimensions(u),h=m==="y",y=h?"top":"left",x=h?"bottom":"right",C=h?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[m]-g[m]-a.floating[b],N=g[m]-a.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let A=T?T[C]:0;(!A||!await(i.isElement==null?void 0:i.isElement(T)))&&(A=l.floating[C]||a.floating[b]);const P=E/2-N/2,V=A/2-v[b]/2-1,U=lt(p[y],V),re=lt(p[x],V),te=U,Q=A-v[b]-re,W=A/2-v[b]/2+P,D=Ao(te,W,Q),I=!d.arrow&&er(o)!=null&&W!==D&&a.reference[b]/2-(W<te?U:re)-v[b]/2<0,O=I?W<te?W-te:W-Q:0;return{[m]:g[m]+O,data:{[m]:D,centerOffset:W-D-O,...I&&{alignmentOffset:O}},reset:I}}}),$v=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...h}=tt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=rt(o),x=Ue(l),C=rt(l)===l,E=await(d.isRTL==null?void 0:d.isRTL(u.floating)),N=g||(C||!v?[an(l)]:kv(l)),T=b!=="none";!g&&T&&N.push(...Iv(l,v,b,E));const A=[l,...N],P=await xr(t,h),V=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&V.push(P[y]),p){const W=Nv(o,i,E);V.push(P[W[0]],P[W[1]])}if(U=[...U,{placement:o,overflows:V}],!V.every(W=>W<=0)){var re,te;const W=(((re=a.flip)==null?void 0:re.index)||0)+1,D=A[W];if(D&&(!(p==="alignment"?x!==Ue(D):!1)||U.every(R=>Ue(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:W,overflows:U},reset:{placement:D}};let I=(te=U.filter(O=>O.overflows[0]<=0).sort((O,R)=>O.overflows[1]-R.overflows[1])[0])==null?void 0:te.placement;if(!I)switch(m){case"bestFit":{var Q;const O=(Q=U.filter(R=>{if(T){const M=Ue(R.placement);return M===x||M==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:Q[0];O&&(I=O);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Ls(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fs(e){return Ev.some(t=>e[t]>=0)}const Lv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=tt(e,t);switch(n){case"referenceHidden":{const a=await xr(t,{...o,elementContext:"reference"}),i=Ls(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fs(i)}}}case"escaped":{const a=await xr(t,{...o,altBoundary:!0}),i=Ls(a,r.floating);return{data:{escapedOffsets:i,escaped:Fs(i)}}}default:return{}}}}},al=new Set(["left","top"]);async function Fv(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=rt(r),l=er(r),d=Ue(r)==="y",u=al.has(i)?-1:1,f=a&&d?-1:1,p=tt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),d?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const Vv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,d=await Fv(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:i}}}}},Bv=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:i=!1,limiter:l={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...d}=tt(e,t),u={x:r,y:n},f=await xr(t,d),p=Ue(rt(o)),g=ta(p);let m=u[g],b=u[p];if(a){const h=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+f[h],C=m-f[y];m=Ao(x,m,C)}if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=b+f[h],C=b-f[y];b=Ao(x,b,C)}const v=l.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[g]:a,[p]:i}}}}}},Gv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:d=!0,crossAxis:u=!0}=tt(e,t),f={x:r,y:n},p=Ue(o),g=ta(p);let m=f[g],b=f[p];const v=tt(l,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(d){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+h.mainAxis,N=a.reference[g]+a.reference[C]-h.mainAxis;m<E?m=E:m>N&&(m=N)}if(u){var y,x;const C=g==="y"?"width":"height",E=al.has(rt(o)),N=a.reference[p]-a.floating[C]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:h.crossAxis),T=a.reference[p]+a.reference[C]+(E?0:((x=i.offset)==null?void 0:x[p])||0)-(E?h.crossAxis:0);b<N?b=N:b>T&&(b=T)}return{[g]:m,[p]:b}}}},Wv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:d=()=>{},...u}=tt(e,t),f=await xr(t,u),p=rt(o),g=er(o),m=Ue(o)==="y",{width:b,height:v}=a.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const x=v-f.top-f.bottom,C=b-f.left-f.right,E=lt(v-f[h],x),N=lt(b-f[y],C),T=!t.middlewareData.shift;let A=E,P=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(A=x),T&&!g){const U=Ne(f.left,0),re=Ne(f.right,0),te=Ne(f.top,0),Q=Ne(f.bottom,0);m?P=b-2*(U!==0||re!==0?U+re:Ne(f.left,f.right)):A=v-2*(te!==0||Q!==0?te+Q:Ne(f.top,f.bottom))}await d({...t,availableWidth:P,availableHeight:A});const V=await i.getDimensions(l.floating);return b!==V.width||v!==V.height?{reset:{rects:!0}}:{}}}};function Pn(){return typeof window<"u"}function tr(e){return sl(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(sl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sl(e){return Pn()?e instanceof Node||e instanceof ke(e).Node:!1}function $e(e){return Pn()?e instanceof Element||e instanceof ke(e).Element:!1}function Ke(e){return Pn()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function Vs(e){return!Pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}const zv=new Set(["inline","contents"]);function jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!zv.has(o)}const qv=new Set(["table","td","th"]);function Uv(e){return qv.has(tr(e))}const Hv=[":popover-open",":modal"];function jn(e){return Hv.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kv=["transform","translate","scale","rotate","perspective"],Yv=["transform","translate","scale","rotate","perspective","filter"],Xv=["paint","layout","strict","content"];function oa(e){const t=aa(),r=$e(e)?Le(e):e;return Kv.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)||Yv.some(n=>(r.willChange||"").includes(n))||Xv.some(n=>(r.contain||"").includes(n))}function Zv(e){let t=ct(e);for(;Ke(t)&&!Ht(t);){if(oa(t))return t;if(jn(t))return null;t=ct(t)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Jv=new Set(["html","body","#document"]);function Ht(e){return Jv.has(tr(e))}function Le(e){return ke(e).getComputedStyle(e)}function Nn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ct(e){if(tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vs(e)&&e.host||Ye(e);return Vs(t)?t.host:t}function il(e){const t=ct(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&jr(t)?t:il(t)}function br(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=il(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=ke(o);if(a){const l=Io(i);return t.concat(i,i.visualViewport||[],jr(o)?o:[],l&&r?br(l):[])}return t.concat(o,br(o,[],r))}function Io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ll(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ke(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=on(r)!==a||on(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function sa(e){return $e(e)?e:e.contextElement}function qt(e){const t=sa(e);if(!Ke(t))return He(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=ll(t);let i=(a?on(r.width):r.width)/n,l=(a?on(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Qv=He(0);function cl(e){const t=ke(e);return!aa()||!t.visualViewport?Qv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ke(e)?!1:t}function Et(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=sa(e);let i=He(1);t&&(n?$e(n)&&(i=qt(n)):i=qt(e));const l=eh(a,r,n)?cl(a):He(0);let d=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=ke(a),m=n&&$e(n)?ke(n):n;let b=g,v=Io(b);for(;v&&n&&m!==b;){const h=qt(v),y=v.getBoundingClientRect(),x=Le(v),C=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*h.x,E=y.top+(v.clientTop+parseFloat(x.paddingTop))*h.y;d*=h.x,u*=h.y,f*=h.x,p*=h.y,d+=C,u+=E,b=ke(v),v=Io(b)}}return sn({width:f,height:p,x:d,y:u})}function kn(e,t){const r=Nn(e).scrollLeft;return t?t.left+r:Et(Ye(e)).left+r}function dl(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-kn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function th(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ye(n),l=t?jn(t.floating):!1;if(n===i||l&&a)return r;let d={scrollLeft:0,scrollTop:0},u=He(1);const f=He(0),p=Ke(n);if((p||!p&&!a)&&((tr(n)!=="body"||jr(i))&&(d=Nn(n)),Ke(n))){const m=Et(n);u=qt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?dl(i,d):He(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-d.scrollTop*u.y+f.y+g.y}}function rh(e){return Array.from(e.getClientRects())}function nh(e){const t=Ye(e),r=Nn(e),n=e.ownerDocument.body,o=Ne(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Ne(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+kn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=Ne(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const Bs=25;function oh(e,t){const r=ke(e),n=Ye(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,d=0;if(o){a=o.width,i=o.height;const f=aa();(!f||f&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const u=kn(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=Bs&&(a-=b)}else u<=Bs&&(a+=u);return{width:a,height:i,x:l,y:d}}const ah=new Set(["absolute","fixed"]);function sh(e,t){const r=Et(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Ke(e)?qt(e):He(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,u=n*a.y;return{width:i,height:l,x:d,y:u}}function Gs(e,t,r){let n;if(t==="viewport")n=oh(e,r);else if(t==="document")n=nh(Ye(e));else if($e(t))n=sh(t,r);else{const o=cl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sn(n)}function ul(e,t){const r=ct(e);return r===t||!$e(r)||Ht(r)?!1:Le(r).position==="fixed"||ul(r,t)}function ih(e,t){const r=t.get(e);if(r)return r;let n=br(e,[],!1).filter(l=>$e(l)&&tr(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?ct(e):e;for(;$e(i)&&!Ht(i);){const l=Le(i),d=oa(i);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&ah.has(o.position)||jr(i)&&!d&&ul(e,i))?n=n.filter(f=>f!==i):o=l,i=ct(i)}return t.set(e,n),n}function lh(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?jn(t)?[]:ih(t,this._c):[].concat(r),n],l=i[0],d=i.reduce((u,f)=>{const p=Gs(t,f,o);return u.top=Ne(p.top,u.top),u.right=lt(p.right,u.right),u.bottom=lt(p.bottom,u.bottom),u.left=Ne(p.left,u.left),u},Gs(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ch(e){const{width:t,height:r}=ll(e);return{width:t,height:r}}function dh(e,t,r){const n=Ke(t),o=Ye(t),a=r==="fixed",i=Et(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=He(0);function u(){d.x=kn(o)}if(n||!n&&!a)if((tr(t)!=="body"||jr(o))&&(l=Nn(t)),n){const m=Et(t,!0,a,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?dl(o,l):He(0),p=i.left+l.scrollLeft-d.x-f.x,g=i.top+l.scrollTop-d.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function uo(e){return Le(e).position==="static"}function Ws(e,t){if(!Ke(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ye(e)===r&&(r=r.ownerDocument.body),r}function fl(e,t){const r=ke(e);if(jn(e))return r;if(!Ke(e)){let o=ct(e);for(;o&&!Ht(o);){if($e(o)&&!uo(o))return o;o=ct(o)}return r}let n=Ws(e,t);for(;n&&Uv(n)&&uo(n);)n=Ws(n,t);return n&&Ht(n)&&uo(n)&&!oa(n)?r:n||Zv(e)||r}const uh=async function(e){const t=this.getOffsetParent||fl,r=this.getDimensions,n=await r(e.floating);return{reference:dh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fh(e){return Le(e).direction==="rtl"}const ph={convertOffsetParentRelativeRectToViewportRelativeRect:th,getDocumentElement:Ye,getClippingRect:lh,getOffsetParent:fl,getElementRects:uh,getClientRects:rh,getDimensions:ch,getScale:qt,isElement:$e,isRTL:fh};function pl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mh(e,t){let r=null,n;const o=Ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(l||t(),!g||!m)return;const b=Hr(p),v=Hr(o.clientWidth-(f+g)),h=Hr(o.clientHeight-(p+m)),y=Hr(f),C={rootMargin:-b+"px "+-v+"px "+-h+"px "+-y+"px",threshold:Ne(0,lt(1,d))||1};let E=!0;function N(T){const A=T[0].intersectionRatio;if(A!==d){if(!E)return i();A?i(!1,A):n=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!pl(u,e.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(N,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(N,C)}r.observe(e)}return i(!0),a}function gh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=sa(e),f=o||a?[...u?br(u):[],...br(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=u&&l?mh(u,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),u&&!d&&m.observe(u),m.observe(t));let b,v=d?Et(e):null;d&&h();function h(){const y=Et(e);v&&!pl(v,y)&&r(),v=y,b=requestAnimationFrame(h)}return r(),()=>{var y;f.forEach(x=>{o&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(b)}}const vh=Vv,hh=Bv,xh=$v,bh=Wv,yh=Lv,zs=Dv,wh=Gv,Ch=(e,t,r)=>{const n=new Map,o={platform:ph,...r},a={...o.platform,_c:n};return Ov(e,t,{...o,platform:a})};var Sh=typeof document<"u",Eh=function(){},en=Sh?S.useLayoutEffect:Eh;function ln(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(!ln(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)&&!ln(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ml(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qs(e,t){const r=ml(e);return Math.round(t*r)/r}function fo(e){const t=c.useRef(e);return en(()=>{t.current=e}),t}function Rh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:d,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);ln(g,n)||m(n);const[b,v]=c.useState(null),[h,y]=c.useState(null),x=c.useCallback(R=>{R!==T.current&&(T.current=R,v(R))},[]),C=c.useCallback(R=>{R!==A.current&&(A.current=R,y(R))},[]),E=a||b,N=i||h,T=c.useRef(null),A=c.useRef(null),P=c.useRef(f),V=d!=null,U=fo(d),re=fo(o),te=fo(u),Q=c.useCallback(()=>{if(!T.current||!A.current)return;const R={placement:t,strategy:r,middleware:g};re.current&&(R.platform=re.current),Ch(T.current,A.current,R).then(M=>{const B={...M,isPositioned:te.current!==!1};W.current&&!ln(P.current,B)&&(P.current=B,yn.flushSync(()=>{p(B)}))})},[g,t,r,re,te]);en(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[u]);const W=c.useRef(!1);en(()=>(W.current=!0,()=>{W.current=!1}),[]),en(()=>{if(E&&(T.current=E),N&&(A.current=N),E&&N){if(U.current)return U.current(E,N,Q);Q()}},[E,N,Q,U,V]);const D=c.useMemo(()=>({reference:T,floating:A,setReference:x,setFloating:C}),[x,C]),I=c.useMemo(()=>({reference:E,floating:N}),[E,N]),O=c.useMemo(()=>{const R={position:r,left:0,top:0};if(!I.floating)return R;const M=qs(I.floating,f.x),B=qs(I.floating,f.y);return l?{...R,transform:"translate("+M+"px, "+B+"px)",...ml(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:B}},[r,l,I.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:Q,refs:D,elements:I,floatingStyles:O}),[f,Q,D,I,O])}const Ph=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?zs({element:n.current,padding:o}).fn(r):{}:n?zs({element:n,padding:o}).fn(r):{}}}},jh=(e,t)=>({...vh(e),options:[e,t]}),Nh=(e,t)=>({...hh(e),options:[e,t]}),kh=(e,t)=>({...wh(e),options:[e,t]}),Th=(e,t)=>({...xh(e),options:[e,t]}),Ah=(e,t)=>({...bh(e),options:[e,t]}),_h=(e,t)=>({...yh(e),options:[e,t]}),Ih=(e,t)=>({...Ph(e),options:[e,t]});var Mh="Arrow",gl=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(H.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});gl.displayName=Mh;var Oh=gl;function ia(e){const[t,r]=c.useState(void 0);return be(()=>{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 i,l;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var la="Popper",[vl,ut]=we(la),[Dh,hl]=vl(la),xl=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(Dh,{scope:t,anchor:n,onAnchorChange:o,children:r})};xl.displayName=la;var bl="PopperAnchor",yl=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=hl(bl,r),i=c.useRef(null),l=se(t,i),d=c.useRef(null);return c.useEffect(()=>{const u=d.current;d.current=(n==null?void 0:n.current)||i.current,u!==d.current&&a.onAnchorChange(d.current)}),n?null:s.jsx(H.div,{...o,ref:l})});yl.displayName=bl;var ca="PopperContent",[$h,Lh]=vl(ca),wl=c.forwardRef((e,t)=>{var _,K,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,h=hl(ca,r),[y,x]=c.useState(null),C=se(t,Se=>x(Se)),[E,N]=c.useState(null),T=ia(E),A=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,V=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(u)?u:[u],te=re.length>0,Q={padding:U,boundary:re.filter(Vh),altBoundary:te},{refs:W,floatingStyles:D,placement:I,isPositioned:O,middlewareData:R}=Rh({strategy:"fixed",placement:V,whileElementsMounted:(...Se)=>gh(...Se,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[jh({mainAxis:o+P,alignmentAxis:i}),d&&Nh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?kh():void 0,...Q}),d&&Th({...Q}),Ah({...Q,apply:({elements:Se,rects:Te,availableWidth:Ge,availableHeight:Me})=>{const{width:ot,height:Wr}=Te.reference,Ze=Se.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ge}px`),Ze.setProperty("--radix-popper-available-height",`${Me}px`),Ze.setProperty("--radix-popper-anchor-width",`${ot}px`),Ze.setProperty("--radix-popper-anchor-height",`${Wr}px`)}}),E&&Ih({element:E,padding:l}),Bh({arrowWidth:A,arrowHeight:P}),g&&_h({strategy:"referenceHidden",...Q})]}),[M,B]=El(I),J=De(b);be(()=>{O&&(J==null||J())},[O,J]);const k=(_=R.arrow)==null?void 0:_.x,G=(K=R.arrow)==null?void 0:K.y,Z=((ee=R.arrow)==null?void 0:ee.centerOffset)!==0,[z,L]=c.useState();return be(()=>{y&&L(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:O?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(oe=R.transformOrigin)==null?void 0:oe.x,(ce=R.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=R.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx($h,{scope:r,placedSide:M,onArrowChange:N,arrowX:k,arrowY:G,shouldHideArrow:Z,children:s.jsx(H.div,{"data-side":M,"data-align":B,...v,ref:C,style:{...v.style,animation:O?void 0:"none"}})})})});wl.displayName=ca;var Cl="PopperArrow",Fh={top:"bottom",right:"left",bottom:"top",left:"right"},Sl=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Lh(Cl,n),i=Fh[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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:s.jsx(Oh,{...o,ref:r,style:{...o.style,display:"block"}})})});Sl.displayName=Cl;function Vh(e){return e!==null}var Bh=e=>({name:"transformOrigin",options:e,fn(t){var h,y,x;const{placement:r,rects:n,middlewareData:o}=t,i=((h=o.arrow)==null?void 0:h.centerOffset)!==0,l=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,f]=El(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+d/2;let b="",v="";return u==="bottom"?(b=i?p:`${g}px`,v=`${-d}px`):u==="top"?(b=i?p:`${g}px`,v=`${n.floating.height+d}px`):u==="right"?(b=`${-d}px`,v=i?p:`${m}px`):u==="left"&&(b=`${n.floating.width+d}px`,v=i?p:`${m}px`),{data:{x:b,y:v}}}});function El(e){const[t,r="center"]=e.split("-");return[t,r]}var Nr=xl,kr=yl,Tn=wl,An=Sl,Gh="Portal",rr=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);be(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Sr.createPortal(s.jsx(H.div,{...n,ref:t}),i):null});rr.displayName=Gh;var Wh=c[" useInsertionEffect ".trim().toString()]||be;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=zh({defaultProp:t,onChange:r}),l=e!==void 0,d=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"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=l},[l,n])}const u=c.useCallback(f=>{var p;if(l){const g=qh(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[d,u]}function zh({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return Wh(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function qh(e){return typeof e=="function"}function da(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Rl=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"}),Uh="VisuallyHidden",Pl=c.forwardRef((e,t)=>s.jsx(H.span,{...e,ref:t,style:{...Rl,...e.style}}));Pl.displayName=Uh;var Hh=Pl,Kh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Kr=new WeakMap,Yr={},po=0,jl=function(e){return e&&(e.host||jl(e.parentNode))},Yh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=jl(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})},Xh=function(e,t,r,n){var o=Yh(t,Array.isArray(e)?e:[e]);Yr[r]||(Yr[r]=new WeakMap);var a=Yr[r],i=[],l=new Set,d=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",v=($t.get(g)||0)+1,h=(a.get(g)||0)+1;$t.set(g,v),a.set(g,h),i.push(g),v===1&&b&&Kr.set(g,!0),h===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),po++,function(){i.forEach(function(p){var g=$t.get(p)-1,m=a.get(p)-1;$t.set(p,g),a.set(p,m),g||(Kr.has(p)||p.removeAttribute(n),Kr.delete(p)),m||p.removeAttribute(r)}),po--,po||($t=new WeakMap,$t=new WeakMap,Kr=new WeakMap,Yr={})}},_n=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Kh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Xh(n,o,r,"aria-hidden")):function(){return null}},qe=function(){return qe=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},qe.apply(this,arguments)};function Nl(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 Zh(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 tn="right-scroll-bar-position",rn="width-before-scroll-bar",Jh="with-scroll-bars-hidden",Qh="--removed-body-scroll-bar-size";function mo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ex(e,t){var r=S.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 tx=typeof window<"u"?c.useLayoutEffect:c.useEffect,Us=new WeakMap;function rx(e,t){var r=ex(null,function(n){return e.forEach(function(o){return mo(o,n)})});return tx(function(){var n=Us.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||mo(l,null)}),a.forEach(function(l){o.has(l)||mo(l,i)})}Us.set(r,e)},[e]),r}function nx(e){return e}function ox(e,t){t===void 0&&(t=nx);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 i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var d=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return o}function ax(e){e===void 0&&(e={});var t=ox(null);return t.options=qe({async:!0,ssr:!1},e),t}var kl=function(e){var t=e.sideCar,r=Nl(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 c.createElement(n,qe({},r))};kl.isSideCarExport=!0;function sx(e,t){return e.useMedium(t),kl}var Tl=ax(),go=function(){},In=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:go,onWheelCapture:go,onTouchMoveCapture:go}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,E=Nl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,T=rx([r,t]),A=qe(qe({},E),o);return c.createElement(c.Fragment,null,f&&c.createElement(N,{sideCar:Tl,removeScrollBar:u,shards:p,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),qe(qe({},A),{ref:T})):c.createElement(x,qe({},A,{className:d,ref:T}),l))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};In.classNames={fullWidth:rn,zeroRight:tn};var ix=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ix();return t&&e.setAttribute("nonce",t),e}function cx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ux=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lx())&&(cx(t,r),dx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fx=function(){var e=ux();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Al=function(){var e=fx(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},px={left:0,top:0,right:0,gap:0},vo=function(e){return parseInt(e||"",10)||0},mx=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[vo(r),vo(n),vo(o)]},gx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return px;var t=mx(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])}},vx=Al(),Ut="data-scroll-locked",hx=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
155
|
+
*/const Yg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Sn=ve("x",Yg),Ji=wn("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium 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)] active:bg-[var(--fill-action-emphasis-active)] 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-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Qe=c.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,...i},l)=>s.jsxs("button",{className:j(Ji({variant:t,size:r,className:e})),ref:l,disabled:a||n,...i,children:[o,n&&s.jsx(Xi,{className:"ml-2 w-4 h-4 animate-spin"})]}));Qe.displayName="Button";const Xg=wn("qodo qodo-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-fill-input-neutral-idle 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-ring/50 focus-visible:ring-[3px] aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 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 dark:border-input-neutral-idle dark:bg-fill-input-neutral-idle dark:text-foreground dark:placeholder:text-muted-foreground",{variants:{variant:{default:"bg-purple-muted-700 border-purple-muted-500 text-purple-muted-300 text-sm",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-muted-foreground dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-muted-foreground",accent:"bg-accent border-accent text-accent-foreground placeholder:text-muted-foreground dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-muted-foreground",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-purple-muted-200 placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70"}},defaultVariants:{variant:"default"}}),Rr=c.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>s.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:j(Xg({variant:t,className:e})),...o}));Rr.displayName="Input";function Ps(e,[t,r]){return Math.min(r,Math.max(t,e))}function F(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 Zg(e,t){const r=c.createContext(t),n=a=>{const{children:i,...l}=a,d=c.useMemo(()=>l,Object.values(l));return s.jsx(r.Provider,{value:d,children:i})};n.displayName=e+"Provider";function o(a){const i=c.useContext(r);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function we(e,t=[]){let r=[];function n(a,i){const l=c.createContext(i),d=r.length;r=[...r,i];const u=p=>{var y;const{scope:g,children:m,...b}=p,v=((y=g==null?void 0:g[e])==null?void 0:y[d])||l,h=c.useMemo(()=>b,Object.values(b));return s.jsx(v.Provider,{value:h,children:m})};u.displayName=a+"Provider";function f(p,g){var v;const m=((v=g==null?void 0:g[e])==null?void 0:v[d])||l,b=c.useContext(m);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(i=>c.createContext(i));return function(l){const d=(l==null?void 0:l[e])||a;return c.useMemo(()=>({[`__scope${e}`]:{...l,[e]:d}}),[l,d])}};return o.scopeName=e,[n,Jg(o,...t)]}function Jg(...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 i=n.reduce((l,{useScope:d,scopeName:u})=>{const p=d(a)[`__scope${u}`];return{...l,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return r.scopeName=t.scopeName,r}function js(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function et(...e){return t=>{let r=!1;const n=e.map(o=>{const a=js(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():js(e[o],null)}}}}function se(...e){return c.useCallback(et(...e),e)}function it(e){const t=ev(e),r=c.forwardRef((n,o)=>{const{children:a,...i}=n,l=c.Children.toArray(a),d=l.find(rv);if(d){const u=d.props.children,f=l.map(p=>p===d?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:p);return s.jsx(t,{...i,ref:o,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return s.jsx(t,{...i,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}var Qg=it("Slot");function ev(e){const t=c.forwardRef((r,n)=>{const{children:o,...a}=r;if(c.isValidElement(o)){const i=ov(o),l=nv(a,o.props);return o.type!==c.Fragment&&(l.ref=n?et(n,i):i),c.cloneElement(o,l)}return c.Children.count(o)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Qi=Symbol("radix.slottable");function tv(e){const t=({children:r})=>s.jsx(s.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Qi,t}function rv(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Qi}function nv(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]=(...l)=>{const d=a(...l);return o(...l),d}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function ov(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 En(e){const t=e+"CollectionProvider",[r,n]=we(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),i=v=>{const{scope:h,children:y}=v,x=S.useRef(null),C=S.useRef(new Map).current;return s.jsx(o,{scope:h,itemMap:C,collectionRef:x,children:y})};i.displayName=t;const l=e+"CollectionSlot",d=it(l),u=S.forwardRef((v,h)=>{const{scope:y,children:x}=v,C=a(l,y),E=se(h,C.collectionRef);return s.jsx(d,{ref:E,children:x})});u.displayName=l;const f=e+"CollectionItemSlot",p="data-radix-collection-item",g=it(f),m=S.forwardRef((v,h)=>{const{scope:y,children:x,...C}=v,E=S.useRef(null),N=se(h,E),T=a(f,y);return S.useEffect(()=>(T.itemMap.set(E,{ref:E,...C}),()=>void T.itemMap.delete(E))),s.jsx(g,{[p]:"",ref:N,children:x})});m.displayName=f;function b(v){const h=a(e+"CollectionConsumer",v);return S.useCallback(()=>{const x=h.collectionRef.current;if(!x)return[];const C=Array.from(x.querySelectorAll(`[${p}]`));return Array.from(h.itemMap.values()).sort((T,A)=>C.indexOf(T.ref.current)-C.indexOf(A.ref.current))},[h.collectionRef,h.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},b,n]}var av=c.createContext(void 0);function Tt(e){const t=c.useContext(av);return e||t||"ltr"}var sv=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=sv.reduce((e,t)=>{const r=it(`Primitive.${t}`),n=c.forwardRef((o,a)=>{const{asChild:i,...l}=o,d=i?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),s.jsx(d,{...l,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function el(e,t){e&&yn.flushSync(()=>e.dispatchEvent(t))}function De(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function iv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e);c.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 lv="DismissableLayer",To="dismissableLayer.update",cv="dismissableLayer.pointerDownOutside",dv="dismissableLayer.focusOutside",Ns,tl=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qt=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:l,...d}=e,u=c.useContext(tl),[f,p]=c.useState(null),g=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),b=se(t,A=>p(A)),v=Array.from(u.layers),[h]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(h),x=f?v.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=x>=y,N=pv(A=>{const P=A.target,V=[...u.branches].some(U=>U.contains(P));!E||V||(o==null||o(A),i==null||i(A),A.defaultPrevented||l==null||l())},g),T=mv(A=>{const P=A.target;[...u.branches].some(U=>U.contains(P))||(a==null||a(A),i==null||i(A),A.defaultPrevented||l==null||l())},g);return iv(A=>{x===u.layers.size-1&&(n==null||n(A),!A.defaultPrevented&&l&&(A.preventDefault(),l()))},g),c.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ns=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ks(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(g.body.style.pointerEvents=Ns)}},[f,g,r,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ks())},[f,u]),c.useEffect(()=>{const A=()=>m({});return document.addEventListener(To,A),()=>document.removeEventListener(To,A)},[]),s.jsx(H.div,{...d,ref:b,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:F(e.onFocusCapture,T.onFocusCapture),onBlurCapture:F(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,N.onPointerDownCapture)})});Qt.displayName=lv;var uv="DismissableLayerBranch",fv=c.forwardRef((e,t)=>{const r=c.useContext(tl),n=c.useRef(null),o=se(t,n);return c.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),s.jsx(H.div,{...e,ref:o})});fv.displayName=uv;function pv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1),o=c.useRef(()=>{});return c.useEffect(()=>{const a=l=>{if(l.target&&!n.current){let d=function(){rl(cv,r,u,{discrete:!0})};const u={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=d,t.addEventListener("click",o.current,{once:!0})):d()}else t.removeEventListener("click",o.current);n.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function mv(e,t=globalThis==null?void 0:globalThis.document){const r=De(e),n=c.useRef(!1);return c.useEffect(()=>{const o=a=>{a.target&&!n.current&&rl(dv,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 ks(){const e=new CustomEvent(To);document.dispatchEvent(e)}function rl(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?el(o,a):o.dispatchEvent(a)}var io=0;function Rn(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ts()),document.body.insertAdjacentElement("beforeend",e[1]??Ts()),io++,()=>{io===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),io--}},[])}function Ts(){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 lo="focusScope.autoFocusOnMount",co="focusScope.autoFocusOnUnmount",As={bubbles:!1,cancelable:!0},gv="FocusScope",Pr=c.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[l,d]=c.useState(null),u=De(o),f=De(a),p=c.useRef(null),g=se(t,v=>d(v)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(n){let v=function(C){if(m.paused||!l)return;const E=C.target;l.contains(E)?p.current=E:st(p.current,{select:!0})},h=function(C){if(m.paused||!l)return;const E=C.relatedTarget;E!==null&&(l.contains(E)||st(p.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const N of C)N.removedNodes.length>0&&st(l)};document.addEventListener("focusin",v),document.addEventListener("focusout",h);const x=new MutationObserver(y);return l&&x.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",h),x.disconnect()}}},[n,l,m.paused]),c.useEffect(()=>{if(l){Is.add(m);const v=document.activeElement;if(!l.contains(v)){const y=new CustomEvent(lo,As);l.addEventListener(lo,u),l.dispatchEvent(y),y.defaultPrevented||(vv(wv(nl(l)),{select:!0}),document.activeElement===v&&st(l))}return()=>{l.removeEventListener(lo,u),setTimeout(()=>{const y=new CustomEvent(co,As);l.addEventListener(co,f),l.dispatchEvent(y),y.defaultPrevented||st(v??document.body,{select:!0}),l.removeEventListener(co,f),Is.remove(m)},0)}}},[l,u,f,m]);const b=c.useCallback(v=>{if(!r&&!n||m.paused)return;const h=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(h&&y){const x=v.currentTarget,[C,E]=hv(x);C&&E?!v.shiftKey&&y===E?(v.preventDefault(),r&&st(C,{select:!0})):v.shiftKey&&y===C&&(v.preventDefault(),r&&st(E,{select:!0})):y===x&&v.preventDefault()}},[r,n,m.paused]);return s.jsx(H.div,{tabIndex:-1,...i,ref:g,onKeyDown:b})});Pr.displayName=gv;function vv(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(st(n,{select:t}),document.activeElement!==r)return}function hv(e){const t=nl(e),r=_s(t,e),n=_s(t.reverse(),e);return[r,n]}function nl(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 _s(e,t){for(const r of e)if(!xv(r,{upTo:t}))return r}function xv(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 bv(e){return e instanceof HTMLInputElement&&"select"in e}function st(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&bv(e)&&t&&e.select()}}var Is=yv();function yv(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Ms(e,t),e.unshift(t)},remove(t){var r;e=Ms(e,t),(r=e[0])==null||r.resume()}}}function Ms(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function wv(e){return e.filter(t=>t.tagName!=="A")}var be=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Cv=c[" useId ".trim().toString()]||(()=>{}),Sv=0;function me(e){const[t,r]=c.useState(Cv());return be(()=>{r(n=>n??String(Sv++))},[e]),t?`radix-${t}`:""}const Ev=["top","right","bottom","left"],lt=Math.min,Ne=Math.max,on=Math.round,Hr=Math.floor,He=e=>({x:e,y:e}),Rv={left:"right",right:"left",bottom:"top",top:"bottom"},Pv={start:"end",end:"start"};function Ao(e,t,r){return Ne(e,lt(t,r))}function tt(e,t){return typeof e=="function"?e(t):e}function rt(e){return e.split("-")[0]}function er(e){return e.split("-")[1]}function ta(e){return e==="x"?"y":"x"}function ra(e){return e==="y"?"height":"width"}const jv=new Set(["top","bottom"]);function Ue(e){return jv.has(rt(e))?"y":"x"}function na(e){return ta(Ue(e))}function Nv(e,t,r){r===void 0&&(r=!1);const n=er(e),o=na(e),a=ra(o);let i=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=an(i)),[i,an(i)]}function kv(e){const t=an(e);return[_o(e),t,_o(t)]}function _o(e){return e.replace(/start|end/g,t=>Pv[t])}const Os=["left","right"],Ds=["right","left"],Tv=["top","bottom"],Av=["bottom","top"];function _v(e,t,r){switch(e){case"top":case"bottom":return r?t?Ds:Os:t?Os:Ds;case"left":case"right":return t?Tv:Av;default:return[]}}function Iv(e,t,r,n){const o=er(e);let a=_v(rt(e),r==="start",n);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(_o)))),a}function an(e){return e.replace(/left|right|bottom|top/g,t=>Rv[t])}function Mv(e){return{top:0,right:0,bottom:0,left:0,...e}}function ol(e){return typeof e!="number"?Mv(e):{top:e,right:e,bottom:e,left:e}}function sn(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 $s(e,t,r){let{reference:n,floating:o}=e;const a=Ue(t),i=na(t),l=ra(i),d=rt(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,g=n[l]/2-o[l]/2;let m;switch(d){case"top":m={x:f,y:n.y-o.height};break;case"bottom":m={x:f,y:n.y+n.height};break;case"right":m={x:n.x+n.width,y:p};break;case"left":m={x:n.x-o.width,y:p};break;default:m={x:n.x,y:n.y}}switch(er(t)){case"start":m[i]-=g*(r&&u?-1:1);break;case"end":m[i]+=g*(r&&u?-1:1);break}return m}const Ov=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:i}=r,l=a.filter(Boolean),d=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=$s(u,n,d),g=n,m={},b=0;for(let v=0;v<l.length;v++){const{name:h,fn:y}=l[v],{x,y:C,data:E,reset:N}=await y({x:f,y:p,initialPlacement:n,placement:g,strategy:o,middlewareData:m,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,p=C??p,m={...m,[h]:{...m[h],...E}},N&&b<=50&&(b++,typeof N=="object"&&(N.placement&&(g=N.placement),N.rects&&(u=N.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):N.rects),{x:f,y:p}=$s(u,g,d)),v=-1)}return{x:f,y:p,placement:g,strategy:o,middlewareData:m}};async function xr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:i,elements:l,strategy:d}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:g=!1,padding:m=0}=tt(t,e),b=ol(m),h=l[g?p==="floating"?"reference":"floating":p],y=sn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(h)))==null||r?h:h.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:f,strategy:d})),x=p==="floating"?{x:n,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),E=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},N=sn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:x,offsetParent:C,strategy:d}):x);return{top:(y.top-N.top+b.top)/E.y,bottom:(N.bottom-y.bottom+b.bottom)/E.y,left:(y.left-N.left+b.left)/E.x,right:(N.right-y.right+b.right)/E.x}}const Dv=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:i,elements:l,middlewareData:d}=t,{element:u,padding:f=0}=tt(e,t)||{};if(u==null)return{};const p=ol(f),g={x:r,y:n},m=na(o),b=ra(m),v=await i.getDimensions(u),h=m==="y",y=h?"top":"left",x=h?"bottom":"right",C=h?"clientHeight":"clientWidth",E=a.reference[b]+a.reference[m]-g[m]-a.floating[b],N=g[m]-a.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let A=T?T[C]:0;(!A||!await(i.isElement==null?void 0:i.isElement(T)))&&(A=l.floating[C]||a.floating[b]);const P=E/2-N/2,V=A/2-v[b]/2-1,U=lt(p[y],V),re=lt(p[x],V),te=U,Q=A-v[b]-re,W=A/2-v[b]/2+P,D=Ao(te,W,Q),I=!d.arrow&&er(o)!=null&&W!==D&&a.reference[b]/2-(W<te?U:re)-v[b]/2<0,O=I?W<te?W-te:W-Q:0;return{[m]:g[m]+O,data:{[m]:D,centerOffset:W-D-O,...I&&{alignmentOffset:O}},reset:I}}}),$v=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:i,initialPlacement:l,platform:d,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:g,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...h}=tt(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const y=rt(o),x=Ue(l),C=rt(l)===l,E=await(d.isRTL==null?void 0:d.isRTL(u.floating)),N=g||(C||!v?[an(l)]:kv(l)),T=b!=="none";!g&&T&&N.push(...Iv(l,v,b,E));const A=[l,...N],P=await xr(t,h),V=[];let U=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&V.push(P[y]),p){const W=Nv(o,i,E);V.push(P[W[0]],P[W[1]])}if(U=[...U,{placement:o,overflows:V}],!V.every(W=>W<=0)){var re,te;const W=(((re=a.flip)==null?void 0:re.index)||0)+1,D=A[W];if(D&&(!(p==="alignment"?x!==Ue(D):!1)||U.every(R=>Ue(R.placement)===x?R.overflows[0]>0:!0)))return{data:{index:W,overflows:U},reset:{placement:D}};let I=(te=U.filter(O=>O.overflows[0]<=0).sort((O,R)=>O.overflows[1]-R.overflows[1])[0])==null?void 0:te.placement;if(!I)switch(m){case"bestFit":{var Q;const O=(Q=U.filter(R=>{if(T){const M=Ue(R.placement);return M===x||M==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(M=>M>0).reduce((M,B)=>M+B,0)]).sort((R,M)=>R[1]-M[1])[0])==null?void 0:Q[0];O&&(I=O);break}case"initialPlacement":I=l;break}if(o!==I)return{reset:{placement:I}}}return{}}}};function Ls(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Fs(e){return Ev.some(t=>e[t]>=0)}const Lv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=tt(e,t);switch(n){case"referenceHidden":{const a=await xr(t,{...o,elementContext:"reference"}),i=Ls(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Fs(i)}}}case"escaped":{const a=await xr(t,{...o,altBoundary:!0}),i=Ls(a,r.floating);return{data:{escapedOffsets:i,escaped:Fs(i)}}}default:return{}}}}},al=new Set(["left","top"]);async function Fv(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),i=rt(r),l=er(r),d=Ue(r)==="y",u=al.has(i)?-1:1,f=a&&d?-1:1,p=tt(t,e);let{mainAxis:g,crossAxis:m,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return l&&typeof b=="number"&&(m=l==="end"?b*-1:b),d?{x:m*f,y:g*u}:{x:g*u,y:m*f}}const Vv=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:i,middlewareData:l}=t,d=await Fv(t,e);return i===((r=l.offset)==null?void 0:r.placement)&&(n=l.arrow)!=null&&n.alignmentOffset?{}:{x:o+d.x,y:a+d.y,data:{...d,placement:i}}}}},Bv=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:i=!1,limiter:l={fn:h=>{let{x:y,y:x}=h;return{x:y,y:x}}},...d}=tt(e,t),u={x:r,y:n},f=await xr(t,d),p=Ue(rt(o)),g=ta(p);let m=u[g],b=u[p];if(a){const h=g==="y"?"top":"left",y=g==="y"?"bottom":"right",x=m+f[h],C=m-f[y];m=Ao(x,m,C)}if(i){const h=p==="y"?"top":"left",y=p==="y"?"bottom":"right",x=b+f[h],C=b-f[y];b=Ao(x,b,C)}const v=l.fn({...t,[g]:m,[p]:b});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[g]:a,[p]:i}}}}}},Gv=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:i}=t,{offset:l=0,mainAxis:d=!0,crossAxis:u=!0}=tt(e,t),f={x:r,y:n},p=Ue(o),g=ta(p);let m=f[g],b=f[p];const v=tt(l,t),h=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(d){const C=g==="y"?"height":"width",E=a.reference[g]-a.floating[C]+h.mainAxis,N=a.reference[g]+a.reference[C]-h.mainAxis;m<E?m=E:m>N&&(m=N)}if(u){var y,x;const C=g==="y"?"width":"height",E=al.has(rt(o)),N=a.reference[p]-a.floating[C]+(E&&((y=i.offset)==null?void 0:y[p])||0)+(E?0:h.crossAxis),T=a.reference[p]+a.reference[C]+(E?0:((x=i.offset)==null?void 0:x[p])||0)-(E?h.crossAxis:0);b<N?b=N:b>T&&(b=T)}return{[g]:m,[p]:b}}}},Wv=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:i,elements:l}=t,{apply:d=()=>{},...u}=tt(e,t),f=await xr(t,u),p=rt(o),g=er(o),m=Ue(o)==="y",{width:b,height:v}=a.floating;let h,y;p==="top"||p==="bottom"?(h=p,y=g===(await(i.isRTL==null?void 0:i.isRTL(l.floating))?"start":"end")?"left":"right"):(y=p,h=g==="end"?"top":"bottom");const x=v-f.top-f.bottom,C=b-f.left-f.right,E=lt(v-f[h],x),N=lt(b-f[y],C),T=!t.middlewareData.shift;let A=E,P=N;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(P=C),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(A=x),T&&!g){const U=Ne(f.left,0),re=Ne(f.right,0),te=Ne(f.top,0),Q=Ne(f.bottom,0);m?P=b-2*(U!==0||re!==0?U+re:Ne(f.left,f.right)):A=v-2*(te!==0||Q!==0?te+Q:Ne(f.top,f.bottom))}await d({...t,availableWidth:P,availableHeight:A});const V=await i.getDimensions(l.floating);return b!==V.width||v!==V.height?{reset:{rects:!0}}:{}}}};function Pn(){return typeof window<"u"}function tr(e){return sl(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(sl(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function sl(e){return Pn()?e instanceof Node||e instanceof ke(e).Node:!1}function $e(e){return Pn()?e instanceof Element||e instanceof ke(e).Element:!1}function Ke(e){return Pn()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function Vs(e){return!Pn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}const zv=new Set(["inline","contents"]);function jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!zv.has(o)}const qv=new Set(["table","td","th"]);function Uv(e){return qv.has(tr(e))}const Hv=[":popover-open",":modal"];function jn(e){return Hv.some(t=>{try{return e.matches(t)}catch{return!1}})}const Kv=["transform","translate","scale","rotate","perspective"],Yv=["transform","translate","scale","rotate","perspective","filter"],Xv=["paint","layout","strict","content"];function oa(e){const t=aa(),r=$e(e)?Le(e):e;return Kv.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)||Yv.some(n=>(r.willChange||"").includes(n))||Xv.some(n=>(r.contain||"").includes(n))}function Zv(e){let t=ct(e);for(;Ke(t)&&!Ht(t);){if(oa(t))return t;if(jn(t))return null;t=ct(t)}return null}function aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Jv=new Set(["html","body","#document"]);function Ht(e){return Jv.has(tr(e))}function Le(e){return ke(e).getComputedStyle(e)}function Nn(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ct(e){if(tr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Vs(e)&&e.host||Ye(e);return Vs(t)?t.host:t}function il(e){const t=ct(e);return Ht(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ke(t)&&jr(t)?t:il(t)}function br(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=il(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),i=ke(o);if(a){const l=Io(i);return t.concat(i,i.visualViewport||[],jr(o)?o:[],l&&r?br(l):[])}return t.concat(o,br(o,[],r))}function Io(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ll(e){const t=Le(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=Ke(e),a=o?e.offsetWidth:r,i=o?e.offsetHeight:n,l=on(r)!==a||on(n)!==i;return l&&(r=a,n=i),{width:r,height:n,$:l}}function sa(e){return $e(e)?e:e.contextElement}function qt(e){const t=sa(e);if(!Ke(t))return He(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=ll(t);let i=(a?on(r.width):r.width)/n,l=(a?on(r.height):r.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!l||!Number.isFinite(l))&&(l=1),{x:i,y:l}}const Qv=He(0);function cl(e){const t=ke(e);return!aa()||!t.visualViewport?Qv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function eh(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==ke(e)?!1:t}function Et(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=sa(e);let i=He(1);t&&(n?$e(n)&&(i=qt(n)):i=qt(e));const l=eh(a,r,n)?cl(a):He(0);let d=(o.left+l.x)/i.x,u=(o.top+l.y)/i.y,f=o.width/i.x,p=o.height/i.y;if(a){const g=ke(a),m=n&&$e(n)?ke(n):n;let b=g,v=Io(b);for(;v&&n&&m!==b;){const h=qt(v),y=v.getBoundingClientRect(),x=Le(v),C=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*h.x,E=y.top+(v.clientTop+parseFloat(x.paddingTop))*h.y;d*=h.x,u*=h.y,f*=h.x,p*=h.y,d+=C,u+=E,b=ke(v),v=Io(b)}}return sn({width:f,height:p,x:d,y:u})}function kn(e,t){const r=Nn(e).scrollLeft;return t?t.left+r:Et(Ye(e)).left+r}function dl(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-kn(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function th(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",i=Ye(n),l=t?jn(t.floating):!1;if(n===i||l&&a)return r;let d={scrollLeft:0,scrollTop:0},u=He(1);const f=He(0),p=Ke(n);if((p||!p&&!a)&&((tr(n)!=="body"||jr(i))&&(d=Nn(n)),Ke(n))){const m=Et(n);u=qt(n),f.x=m.x+n.clientLeft,f.y=m.y+n.clientTop}const g=i&&!p&&!a?dl(i,d):He(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+f.x+g.x,y:r.y*u.y-d.scrollTop*u.y+f.y+g.y}}function rh(e){return Array.from(e.getClientRects())}function nh(e){const t=Ye(e),r=Nn(e),n=e.ownerDocument.body,o=Ne(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=Ne(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+kn(e);const l=-r.scrollTop;return Le(n).direction==="rtl"&&(i+=Ne(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:i,y:l}}const Bs=25;function oh(e,t){const r=ke(e),n=Ye(e),o=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,l=0,d=0;if(o){a=o.width,i=o.height;const f=aa();(!f||f&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const u=kn(n);if(u<=0){const f=n.ownerDocument,p=f.body,g=getComputedStyle(p),m=f.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,b=Math.abs(n.clientWidth-p.clientWidth-m);b<=Bs&&(a-=b)}else u<=Bs&&(a+=u);return{width:a,height:i,x:l,y:d}}const ah=new Set(["absolute","fixed"]);function sh(e,t){const r=Et(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=Ke(e)?qt(e):He(1),i=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,u=n*a.y;return{width:i,height:l,x:d,y:u}}function Gs(e,t,r){let n;if(t==="viewport")n=oh(e,r);else if(t==="document")n=nh(Ye(e));else if($e(t))n=sh(t,r);else{const o=cl(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sn(n)}function ul(e,t){const r=ct(e);return r===t||!$e(r)||Ht(r)?!1:Le(r).position==="fixed"||ul(r,t)}function ih(e,t){const r=t.get(e);if(r)return r;let n=br(e,[],!1).filter(l=>$e(l)&&tr(l)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?ct(e):e;for(;$e(i)&&!Ht(i);){const l=Le(i),d=oa(i);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&ah.has(o.position)||jr(i)&&!d&&ul(e,i))?n=n.filter(f=>f!==i):o=l,i=ct(i)}return t.set(e,n),n}function lh(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[...r==="clippingAncestors"?jn(t)?[]:ih(t,this._c):[].concat(r),n],l=i[0],d=i.reduce((u,f)=>{const p=Gs(t,f,o);return u.top=Ne(p.top,u.top),u.right=lt(p.right,u.right),u.bottom=lt(p.bottom,u.bottom),u.left=Ne(p.left,u.left),u},Gs(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function ch(e){const{width:t,height:r}=ll(e);return{width:t,height:r}}function dh(e,t,r){const n=Ke(t),o=Ye(t),a=r==="fixed",i=Et(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=He(0);function u(){d.x=kn(o)}if(n||!n&&!a)if((tr(t)!=="body"||jr(o))&&(l=Nn(t)),n){const m=Et(t,!0,a,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?dl(o,l):He(0),p=i.left+l.scrollLeft-d.x-f.x,g=i.top+l.scrollTop-d.y-f.y;return{x:p,y:g,width:i.width,height:i.height}}function uo(e){return Le(e).position==="static"}function Ws(e,t){if(!Ke(e)||Le(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return Ye(e)===r&&(r=r.ownerDocument.body),r}function fl(e,t){const r=ke(e);if(jn(e))return r;if(!Ke(e)){let o=ct(e);for(;o&&!Ht(o);){if($e(o)&&!uo(o))return o;o=ct(o)}return r}let n=Ws(e,t);for(;n&&Uv(n)&&uo(n);)n=Ws(n,t);return n&&Ht(n)&&uo(n)&&!oa(n)?r:n||Zv(e)||r}const uh=async function(e){const t=this.getOffsetParent||fl,r=this.getDimensions,n=await r(e.floating);return{reference:dh(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function fh(e){return Le(e).direction==="rtl"}const ph={convertOffsetParentRelativeRectToViewportRelativeRect:th,getDocumentElement:Ye,getClippingRect:lh,getOffsetParent:fl,getElementRects:uh,getClientRects:rh,getDimensions:ch,getScale:qt,isElement:$e,isRTL:fh};function pl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mh(e,t){let r=null,n;const o=Ye(e);function a(){var l;clearTimeout(n),(l=r)==null||l.disconnect(),r=null}function i(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:g,height:m}=u;if(l||t(),!g||!m)return;const b=Hr(p),v=Hr(o.clientWidth-(f+g)),h=Hr(o.clientHeight-(p+m)),y=Hr(f),C={rootMargin:-b+"px "+-v+"px "+-h+"px "+-y+"px",threshold:Ne(0,lt(1,d))||1};let E=!0;function N(T){const A=T[0].intersectionRatio;if(A!==d){if(!E)return i();A?i(!1,A):n=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!pl(u,e.getBoundingClientRect())&&i(),E=!1}try{r=new IntersectionObserver(N,{...C,root:o.ownerDocument})}catch{r=new IntersectionObserver(N,C)}r.observe(e)}return i(!0),a}function gh(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=n,u=sa(e),f=o||a?[...u?br(u):[],...br(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",r,{passive:!0}),a&&y.addEventListener("resize",r)});const p=u&&l?mh(u,r):null;let g=-1,m=null;i&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),r()}),u&&!d&&m.observe(u),m.observe(t));let b,v=d?Et(e):null;d&&h();function h(){const y=Et(e);v&&!pl(v,y)&&r(),v=y,b=requestAnimationFrame(h)}return r(),()=>{var y;f.forEach(x=>{o&&x.removeEventListener("scroll",r),a&&x.removeEventListener("resize",r)}),p==null||p(),(y=m)==null||y.disconnect(),m=null,d&&cancelAnimationFrame(b)}}const vh=Vv,hh=Bv,xh=$v,bh=Wv,yh=Lv,zs=Dv,wh=Gv,Ch=(e,t,r)=>{const n=new Map,o={platform:ph,...r},a={...o.platform,_c:n};return Ov(e,t,{...o,platform:a})};var Sh=typeof document<"u",Eh=function(){},en=Sh?S.useLayoutEffect:Eh;function ln(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(!ln(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)&&!ln(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function ml(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qs(e,t){const r=ml(e);return Math.round(t*r)/r}function fo(e){const t=c.useRef(e);return en(()=>{t.current=e}),t}function Rh(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:i}={},transform:l=!0,whileElementsMounted:d,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[g,m]=c.useState(n);ln(g,n)||m(n);const[b,v]=c.useState(null),[h,y]=c.useState(null),x=c.useCallback(R=>{R!==T.current&&(T.current=R,v(R))},[]),C=c.useCallback(R=>{R!==A.current&&(A.current=R,y(R))},[]),E=a||b,N=i||h,T=c.useRef(null),A=c.useRef(null),P=c.useRef(f),V=d!=null,U=fo(d),re=fo(o),te=fo(u),Q=c.useCallback(()=>{if(!T.current||!A.current)return;const R={placement:t,strategy:r,middleware:g};re.current&&(R.platform=re.current),Ch(T.current,A.current,R).then(M=>{const B={...M,isPositioned:te.current!==!1};W.current&&!ln(P.current,B)&&(P.current=B,yn.flushSync(()=>{p(B)}))})},[g,t,r,re,te]);en(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[u]);const W=c.useRef(!1);en(()=>(W.current=!0,()=>{W.current=!1}),[]),en(()=>{if(E&&(T.current=E),N&&(A.current=N),E&&N){if(U.current)return U.current(E,N,Q);Q()}},[E,N,Q,U,V]);const D=c.useMemo(()=>({reference:T,floating:A,setReference:x,setFloating:C}),[x,C]),I=c.useMemo(()=>({reference:E,floating:N}),[E,N]),O=c.useMemo(()=>{const R={position:r,left:0,top:0};if(!I.floating)return R;const M=qs(I.floating,f.x),B=qs(I.floating,f.y);return l?{...R,transform:"translate("+M+"px, "+B+"px)",...ml(I.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:M,top:B}},[r,l,I.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:Q,refs:D,elements:I,floatingStyles:O}),[f,Q,D,I,O])}const Ph=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?zs({element:n.current,padding:o}).fn(r):{}:n?zs({element:n,padding:o}).fn(r):{}}}},jh=(e,t)=>({...vh(e),options:[e,t]}),Nh=(e,t)=>({...hh(e),options:[e,t]}),kh=(e,t)=>({...wh(e),options:[e,t]}),Th=(e,t)=>({...xh(e),options:[e,t]}),Ah=(e,t)=>({...bh(e),options:[e,t]}),_h=(e,t)=>({...yh(e),options:[e,t]}),Ih=(e,t)=>({...Ph(e),options:[e,t]});var Mh="Arrow",gl=c.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return s.jsx(H.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:s.jsx("polygon",{points:"0,0 30,0 15,10"})})});gl.displayName=Mh;var Oh=gl;function ia(e){const[t,r]=c.useState(void 0);return be(()=>{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 i,l;if("borderBoxSize"in a){const d=a.borderBoxSize,u=Array.isArray(d)?d[0]:d;i=u.inlineSize,l=u.blockSize}else i=e.offsetWidth,l=e.offsetHeight;r({width:i,height:l})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var la="Popper",[vl,ut]=we(la),[Dh,hl]=vl(la),xl=e=>{const{__scopePopper:t,children:r}=e,[n,o]=c.useState(null);return s.jsx(Dh,{scope:t,anchor:n,onAnchorChange:o,children:r})};xl.displayName=la;var bl="PopperAnchor",yl=c.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=hl(bl,r),i=c.useRef(null),l=se(t,i),d=c.useRef(null);return c.useEffect(()=>{const u=d.current;d.current=(n==null?void 0:n.current)||i.current,u!==d.current&&a.onAnchorChange(d.current)}),n?null:s.jsx(H.div,{...o,ref:l})});yl.displayName=bl;var ca="PopperContent",[$h,Lh]=vl(ca),wl=c.forwardRef((e,t)=>{var _,K,ee,oe,ce,ie;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:l=0,avoidCollisions:d=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:g=!1,updatePositionStrategy:m="optimized",onPlaced:b,...v}=e,h=hl(ca,r),[y,x]=c.useState(null),C=se(t,Se=>x(Se)),[E,N]=c.useState(null),T=ia(E),A=(T==null?void 0:T.width)??0,P=(T==null?void 0:T.height)??0,V=n+(a!=="center"?"-"+a:""),U=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},re=Array.isArray(u)?u:[u],te=re.length>0,Q={padding:U,boundary:re.filter(Vh),altBoundary:te},{refs:W,floatingStyles:D,placement:I,isPositioned:O,middlewareData:R}=Rh({strategy:"fixed",placement:V,whileElementsMounted:(...Se)=>gh(...Se,{animationFrame:m==="always"}),elements:{reference:h.anchor},middleware:[jh({mainAxis:o+P,alignmentAxis:i}),d&&Nh({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?kh():void 0,...Q}),d&&Th({...Q}),Ah({...Q,apply:({elements:Se,rects:Te,availableWidth:Ge,availableHeight:Me})=>{const{width:ot,height:Wr}=Te.reference,Ze=Se.floating.style;Ze.setProperty("--radix-popper-available-width",`${Ge}px`),Ze.setProperty("--radix-popper-available-height",`${Me}px`),Ze.setProperty("--radix-popper-anchor-width",`${ot}px`),Ze.setProperty("--radix-popper-anchor-height",`${Wr}px`)}}),E&&Ih({element:E,padding:l}),Bh({arrowWidth:A,arrowHeight:P}),g&&_h({strategy:"referenceHidden",...Q})]}),[M,B]=El(I),J=De(b);be(()=>{O&&(J==null||J())},[O,J]);const k=(_=R.arrow)==null?void 0:_.x,G=(K=R.arrow)==null?void 0:K.y,Z=((ee=R.arrow)==null?void 0:ee.centerOffset)!==0,[z,L]=c.useState();return be(()=>{y&&L(window.getComputedStyle(y).zIndex)},[y]),s.jsx("div",{ref:W.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:O?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:z,"--radix-popper-transform-origin":[(oe=R.transformOrigin)==null?void 0:oe.x,(ce=R.transformOrigin)==null?void 0:ce.y].join(" "),...((ie=R.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:s.jsx($h,{scope:r,placedSide:M,onArrowChange:N,arrowX:k,arrowY:G,shouldHideArrow:Z,children:s.jsx(H.div,{"data-side":M,"data-align":B,...v,ref:C,style:{...v.style,animation:O?void 0:"none"}})})})});wl.displayName=ca;var Cl="PopperArrow",Fh={top:"bottom",right:"left",bottom:"top",left:"right"},Sl=c.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=Lh(Cl,n),i=Fh[a.placedSide];return s.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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:s.jsx(Oh,{...o,ref:r,style:{...o.style,display:"block"}})})});Sl.displayName=Cl;function Vh(e){return e!==null}var Bh=e=>({name:"transformOrigin",options:e,fn(t){var h,y,x;const{placement:r,rects:n,middlewareData:o}=t,i=((h=o.arrow)==null?void 0:h.centerOffset)!==0,l=i?0:e.arrowWidth,d=i?0:e.arrowHeight,[u,f]=El(r),p={start:"0%",center:"50%",end:"100%"}[f],g=(((y=o.arrow)==null?void 0:y.x)??0)+l/2,m=(((x=o.arrow)==null?void 0:x.y)??0)+d/2;let b="",v="";return u==="bottom"?(b=i?p:`${g}px`,v=`${-d}px`):u==="top"?(b=i?p:`${g}px`,v=`${n.floating.height+d}px`):u==="right"?(b=`${-d}px`,v=i?p:`${m}px`):u==="left"&&(b=`${n.floating.width+d}px`,v=i?p:`${m}px`),{data:{x:b,y:v}}}});function El(e){const[t,r="center"]=e.split("-");return[t,r]}var Nr=xl,kr=yl,Tn=wl,An=Sl,Gh="Portal",rr=c.forwardRef((e,t)=>{var l;const{container:r,...n}=e,[o,a]=c.useState(!1);be(()=>a(!0),[]);const i=r||o&&((l=globalThis==null?void 0:globalThis.document)==null?void 0:l.body);return i?Sr.createPortal(s.jsx(H.div,{...n,ref:t}),i):null});rr.displayName=Gh;var Wh=c[" useInsertionEffect ".trim().toString()]||be;function ye({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,i]=zh({defaultProp:t,onChange:r}),l=e!==void 0,d=l?e:o;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==l&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${l?"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=l},[l,n])}const u=c.useCallback(f=>{var p;if(l){const g=qh(f)?f(e):f;g!==e&&((p=i.current)==null||p.call(i,g))}else a(f)},[l,e,a,i]);return[d,u]}function zh({defaultProp:e,onChange:t}){const[r,n]=c.useState(e),o=c.useRef(r),a=c.useRef(t);return Wh(()=>{a.current=t},[t]),c.useEffect(()=>{var i;o.current!==r&&((i=a.current)==null||i.call(a,r),o.current=r)},[r,o]),[r,n,a]}function qh(e){return typeof e=="function"}function da(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Rl=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"}),Uh="VisuallyHidden",Pl=c.forwardRef((e,t)=>s.jsx(H.span,{...e,ref:t,style:{...Rl,...e.style}}));Pl.displayName=Uh;var Hh=Pl,Kh=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Kr=new WeakMap,Yr={},po=0,jl=function(e){return e&&(e.host||jl(e.parentNode))},Yh=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=jl(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})},Xh=function(e,t,r,n){var o=Yh(t,Array.isArray(e)?e:[e]);Yr[r]||(Yr[r]=new WeakMap);var a=Yr[r],i=[],l=new Set,d=new Set(o),u=function(p){!p||l.has(p)||(l.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(g){if(l.has(g))f(g);else try{var m=g.getAttribute(n),b=m!==null&&m!=="false",v=($t.get(g)||0)+1,h=(a.get(g)||0)+1;$t.set(g,v),a.set(g,h),i.push(g),v===1&&b&&Kr.set(g,!0),h===1&&g.setAttribute(r,"true"),b||g.setAttribute(n,"true")}catch(y){console.error("aria-hidden: cannot operate on ",g,y)}})};return f(t),l.clear(),po++,function(){i.forEach(function(p){var g=$t.get(p)-1,m=a.get(p)-1;$t.set(p,g),a.set(p,m),g||(Kr.has(p)||p.removeAttribute(n),Kr.delete(p)),m||p.removeAttribute(r)}),po--,po||($t=new WeakMap,$t=new WeakMap,Kr=new WeakMap,Yr={})}},_n=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Kh(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Xh(n,o,r,"aria-hidden")):function(){return null}},qe=function(){return qe=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},qe.apply(this,arguments)};function Nl(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 Zh(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 tn="right-scroll-bar-position",rn="width-before-scroll-bar",Jh="with-scroll-bars-hidden",Qh="--removed-body-scroll-bar-size";function mo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function ex(e,t){var r=S.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 tx=typeof window<"u"?c.useLayoutEffect:c.useEffect,Us=new WeakMap;function rx(e,t){var r=ex(null,function(n){return e.forEach(function(o){return mo(o,n)})});return tx(function(){var n=Us.get(r);if(n){var o=new Set(n),a=new Set(e),i=r.current;o.forEach(function(l){a.has(l)||mo(l,null)}),a.forEach(function(l){o.has(l)||mo(l,i)})}Us.set(r,e)},[e]),r}function nx(e){return e}function ox(e,t){t===void 0&&(t=nx);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 i=t(a,n);return r.push(i),function(){r=r.filter(function(l){return l!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(l){return a(l)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var l=r;r=[],l.forEach(a),i=r}var d=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(d)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return o}function ax(e){e===void 0&&(e={});var t=ox(null);return t.options=qe({async:!0,ssr:!1},e),t}var kl=function(e){var t=e.sideCar,r=Nl(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 c.createElement(n,qe({},r))};kl.isSideCarExport=!0;function sx(e,t){return e.useMedium(t),kl}var Tl=ax(),go=function(){},In=c.forwardRef(function(e,t){var r=c.useRef(null),n=c.useState({onScrollCapture:go,onWheelCapture:go,onTouchMoveCapture:go}),o=n[0],a=n[1],i=e.forwardProps,l=e.children,d=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,g=e.sideCar,m=e.noRelative,b=e.noIsolation,v=e.inert,h=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,C=e.gapMode,E=Nl(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=g,T=rx([r,t]),A=qe(qe({},E),o);return c.createElement(c.Fragment,null,f&&c.createElement(N,{sideCar:Tl,removeScrollBar:u,shards:p,noRelative:m,noIsolation:b,inert:v,setCallbacks:a,allowPinchZoom:!!h,lockRef:r,gapMode:C}),i?c.cloneElement(c.Children.only(l),qe(qe({},A),{ref:T})):c.createElement(x,qe({},A,{className:d,ref:T}),l))});In.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};In.classNames={fullWidth:rn,zeroRight:tn};var ix=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lx(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ix();return t&&e.setAttribute("nonce",t),e}function cx(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dx(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ux=function(){var e=0,t=null;return{add:function(r){e==0&&(t=lx())&&(cx(t,r),dx(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fx=function(){var e=ux();return function(t,r){c.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Al=function(){var e=fx(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},px={left:0,top:0,right:0,gap:0},vo=function(e){return parseInt(e||"",10)||0},mx=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[vo(r),vo(n),vo(o)]},gx=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return px;var t=mx(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])}},vx=Al(),Ut="data-scroll-locked",hx=function(e,t,r,n){var o=e.left,a=e.top,i=e.right,l=e.gap;return r===void 0&&(r="margin"),`
|
|
156
156
|
.`.concat(Jh,` {
|
|
157
157
|
overflow: hidden `).concat(n,`;
|
|
158
158
|
padding-right: `).concat(l,"px ").concat(n,`;
|
|
@@ -201,7 +201,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
201
201
|
- less than the value passed to \`max\` (or ${Ea} if no \`max\` prop is set)
|
|
202
202
|
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
203
203
|
|
|
204
|
-
Defaulting to \`null\`.`}var jy=yd,Ny=Cd;function ky({className:e,value:t,...r}){return s.jsx(jy,{"data-slot":"progress",className:j("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(Ny,{"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 Ed({className:e,...t}){return s.jsx("div",{className:j("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Vn="Switch",[Ty,lP]=we(Vn),[Ay,_y]=Ty(Vn),Rd=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:d="on",onCheckedChange:u,form:f,...p}=e,[g,m]=c.useState(null),b=se(t,C=>m(C)),v=c.useRef(!1),h=g?f||!!g.closest("form"):!0,[y,x]=ye({prop:o,defaultProp:a??!1,onChange:u,caller:Vn});return s.jsxs(Ay,{scope:r,checked:y,disabled:l,children:[s.jsx(H.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":kd(y),"data-disabled":l?"":void 0,disabled:l,value:d,...p,ref:b,onClick:F(e.onClick,C=>{x(E=>!E),h&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),h&&s.jsx(Nd,{control:g,bubbles:!v.current,name:n,value:d,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Rd.displayName=Vn;var Pd="SwitchThumb",jd=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=_y(Pd,r);return s.jsx(H.span,{"data-state":kd(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});jd.displayName=Pd;var Iy="SwitchBubbleInput",Nd=c.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),d=da(r),u=ia(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[d,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Nd.displayName=Iy;function kd(e){return e?"checked":"unchecked"}var My=Rd,Oy=jd;function Dy({className:e,...t}){return s.jsx(My,{"data-slot":"switch",className:j("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Oy,{"data-slot":"switch-thumb",className:j("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Td="Toggle",Ra=c.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=ye({prop:r,onChange:o,defaultProp:n??!1,caller:Td});return s.jsx(H.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||l(!i)})})});Ra.displayName=Td;var $y=Ra;const Ad=wn("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 Ly({className:e,variant:t,size:r,...n}){return s.jsx($y,{"data-slot":"toggle",className:j(Ad({variant:t,size:r,className:e})),...n})}var yo="rovingFocusGroup.onEntryFocus",Fy={bubbles:!1,cancelable:!0},Ir="RovingFocusGroup",[Go,_d,Vy]=En(Ir),[By,gt]=we(Ir,[Vy]),[Gy,Wy]=By(Ir),Id=c.forwardRef((e,t)=>s.jsx(Go.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Go.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(zy,{...e,ref:t})})}));Id.displayName=Ir;var zy=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=c.useRef(null),m=se(t,g),b=Tt(a),[v,h]=ye({prop:i,defaultProp:l??null,onChange:d,caller:Ir}),[y,x]=c.useState(!1),C=De(u),E=_d(r),N=c.useRef(!1),[T,A]=c.useState(0);return c.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(yo,C),()=>P.removeEventListener(yo,C)},[C]),s.jsx(Gy,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:v,onItemFocus:c.useCallback(P=>h(P),[h]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(P=>P+1),[]),onFocusableItemRemove:c.useCallback(()=>A(P=>P-1),[]),children:s.jsx(H.div,{tabIndex:y||T===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{N.current=!0}),onFocus:F(e.onFocus,P=>{const V=!N.current;if(P.target===P.currentTarget&&V&&!y){const U=new CustomEvent(yo,Fy);if(P.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=E().filter(I=>I.focusable),te=re.find(I=>I.active),Q=re.find(I=>I.id===v),D=[te,Q,...re].filter(Boolean).map(I=>I.ref.current);Dd(D,f)}}N.current=!1}),onBlur:F(e.onBlur,()=>x(!1))})})}),Md="RovingFocusGroupItem",Od=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,d=me(),u=a||d,f=Wy(Md,r),p=f.currentTabStopId===u,g=_d(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return c.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),s.jsx(Go.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:s.jsx(H.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,h=>{n?f.onItemFocus(u):h.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:F(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=Hy(h,f.orientation,f.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let C=g().filter(E=>E.focusable).map(E=>E.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const E=C.indexOf(h.currentTarget);C=f.loop?Ky(C,E+1):C.slice(E+1)}setTimeout(()=>Dd(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});Od.displayName=Md;var qy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Uy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hy(e,t,r){const n=Uy(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return qy[n]}function Dd(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ky(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Bn=Id,Gn=Od,vt="ToggleGroup",[$d,cP]=we(vt,[gt]),Ld=gt(),Pa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(Yy,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(Xy,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${vt}\``)});Pa.displayName=vt;var[Fd,Vd]=$d(vt),Yy=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??"",onChange:o,caller:vt});return s.jsx(Fd,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Bd,{...a,ref:t})})}),Xy=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??[],onChange:o,caller:vt}),d=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Fd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:d,onItemDeactivate:u,children:s.jsx(Bd,{...a,ref:t})})});Pa.displayName=vt;var[Zy,Jy]=$d(vt),Bd=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...d}=e,u=Ld(r),f=Tt(i),p={role:"group",dir:f,...d};return s.jsx(Zy,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(Bn,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(H.div,{...p,ref:t})}):s.jsx(H.div,{...p,ref:t})})}),fn="ToggleGroupItem",Gd=S.forwardRef((e,t)=>{const r=Vd(fn,e.__scopeToggleGroup),n=Jy(fn,e.__scopeToggleGroup),o=Ld(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},d=S.useRef(null);return n.rovingFocus?s.jsx(Gn,{asChild:!0,...o,focusable:!i,active:a,ref:d,children:s.jsx(ri,{...l,ref:t})}):s.jsx(ri,{...l,ref:t})});Gd.displayName=fn;var ri=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=Vd(fn,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(Ra,{...l,...o,ref:t,onPressedChange:d=>{d?a.onItemActivate(n):a.onItemDeactivate(n)}})}),Qy=Pa,ew=Gd;const Wd=c.createContext({size:"default",variant:"default"});function tw({className:e,variant:t,size:r,children:n,...o}){return s.jsx(Qy,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:j("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:s.jsx(Wd.Provider,{value:{variant:t,size:r},children:n})})}function rw({className:e,children:t,variant:r,size:n,...o}){const a=c.useContext(Wd);return s.jsx(ew,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:j(Ad({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 Wn="Collapsible",[nw,zd]=we(Wn),[ow,ja]=nw(Wn),qd=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[d,u]=ye({prop:n,defaultProp:o??!1,onChange:i,caller:Wn});return s.jsx(ow,{scope:r,disabled:a,contentId:me(),open:d,onOpenToggle:c.useCallback(()=>u(f=>!f),[u]),children:s.jsx(H.div,{"data-state":ka(d),"data-disabled":a?"":void 0,...l,ref:t})})});qd.displayName=Wn;var Ud="CollapsibleTrigger",Hd=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=ja(Ud,r);return s.jsx(H.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ka(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});Hd.displayName=Ud;var Na="CollapsibleContent",Kd=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ja(Na,e.__scopeCollapsible);return s.jsx(Re,{present:r||o.open,children:({present:a})=>s.jsx(aw,{...n,ref:t,present:a})})});Kd.displayName=Na;var aw=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=ja(Na,r),[l,d]=c.useState(n),u=c.useRef(null),f=se(t,u),p=c.useRef(0),g=p.current,m=c.useRef(0),b=m.current,v=i.open||l,h=c.useRef(v),y=c.useRef(void 0);return c.useEffect(()=>{const x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),be(()=>{const x=u.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const C=x.getBoundingClientRect();p.current=C.height,m.current=C.width,h.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),d(n)}},[i.open,n]),s.jsx(H.div,{"data-state":ka(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&o})});function ka(e){return e?"open":"closed"}var sw=qd,iw=Hd,lw=Kd,Ve="Accordion",cw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ta,dw,uw]=En(Ve),[zn,dP]=we(Ve,[uw,zd]),Aa=zd(),Yd=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(Ta.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(gw,{...a,ref:t}):s.jsx(mw,{...o,ref:t})})});Yd.displayName=Ve;var[Xd,fw]=zn(Ve),[Zd,pw]=zn(Ve,{collapsible:!1}),mw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,d]=ye({prop:r,defaultProp:n??"",onChange:o,caller:Ve});return s.jsx(Xd,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:d,onItemClose:S.useCallback(()=>a&&d(""),[a,d]),children:s.jsx(Zd,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(Jd,{...i,ref:t})})})}),gw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??[],onChange:o,caller:Ve}),d=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Xd,{scope:e.__scopeAccordion,value:i,onItemOpen:d,onItemClose:u,children:s.jsx(Zd,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(Jd,{...a,ref:t})})})}),[vw,qn]=zn(Ve),Jd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),d=se(l,t),u=dw(r),p=Tt(o)==="ltr",g=F(e.onKeyDown,m=>{var P;if(!cw.includes(m.key))return;const b=m.target,v=u().filter(V=>{var U;return!((U=V.ref.current)!=null&&U.disabled)}),h=v.findIndex(V=>V.ref.current===b),y=v.length;if(h===-1)return;m.preventDefault();let x=h;const C=0,E=y-1,N=()=>{x=h+1,x>E&&(x=C)},T=()=>{x=h-1,x<C&&(x=E)};switch(m.key){case"Home":x=C;break;case"End":x=E;break;case"ArrowRight":a==="horizontal"&&(p?N():T());break;case"ArrowDown":a==="vertical"&&N();break;case"ArrowLeft":a==="horizontal"&&(p?T():N());break;case"ArrowUp":a==="vertical"&&T();break}const A=x%y;(P=v[A].ref.current)==null||P.focus()});return s.jsx(vw,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(Ta.Slot,{scope:r,children:s.jsx(H.div,{...i,"data-orientation":a,ref:d,onKeyDown:n?void 0:g})})})}),pn="AccordionItem",[hw,_a]=zn(pn),Qd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=qn(pn,r),i=fw(pn,r),l=Aa(r),d=me(),u=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(hw,{scope:r,open:u,disabled:f,triggerId:d,children:s.jsx(sw,{"data-orientation":a.orientation,"data-state":au(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});Qd.displayName=pn;var eu="AccordionHeader",tu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=qn(Ve,r),a=_a(eu,r);return s.jsx(H.h3,{"data-orientation":o.orientation,"data-state":au(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});tu.displayName=eu;var Wo="AccordionTrigger",ru=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=qn(Ve,r),a=_a(Wo,r),i=pw(Wo,r),l=Aa(r);return s.jsx(Ta.ItemSlot,{scope:r,children:s.jsx(iw,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});ru.displayName=Wo;var nu="AccordionContent",ou=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=qn(Ve,r),a=_a(nu,r),i=Aa(r);return s.jsx(lw,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ou.displayName=nu;function au(e){return e?"open":"closed"}var xw=Yd,bw=Qd,yw=tu,ww=ru,Cw=ou;function Sw({...e}){return s.jsx(xw,{"data-slot":"accordion",...e})}function Ew({className:e,...t}){return s.jsx(bw,{"data-slot":"accordion-item",className:j("qodo qodo-accordion-item border-b last:border-b-0 dark:border-border",e),...t})}function Rw({className:e,children:t,...r}){return s.jsx(yw,{className:"flex",children:s.jsxs(ww,{"data-slot":"accordion-trigger",className:j("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,s.jsx(Cn,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Pw({className:e,children:t,...r}){return s.jsx(Cw,{"data-slot":"accordion-content",className:j("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:j("pt-0 pb-4",e),children:t})})}var Un="Tabs",[jw,uP]=we(Un,[gt]),su=gt(),[Nw,Ia]=jw(Un),iu=c.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:d="automatic",...u}=e,f=Tt(l),[p,g]=ye({prop:n,onChange:o,defaultProp:a??"",caller:Un});return s.jsx(Nw,{scope:r,baseId:me(),value:p,onValueChange:g,orientation:i,dir:f,activationMode:d,children:s.jsx(H.div,{dir:f,"data-orientation":i,...u,ref:t})})});iu.displayName=Un;var lu="TabsList",cu=c.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=Ia(lu,r),i=su(r);return s.jsx(Bn,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:s.jsx(H.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});cu.displayName=lu;var du="TabsTrigger",uu=c.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=Ia(du,r),l=su(r),d=mu(i.baseId,n),u=gu(i.baseId,n),f=n===i.value;return s.jsx(Gn,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(H.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...a,ref:t,onMouseDown:F(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(n):p.preventDefault()}),onKeyDown:F(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(n)}),onFocus:F(e.onFocus,()=>{const p=i.activationMode!=="manual";!f&&!o&&p&&i.onValueChange(n)})})})});uu.displayName=du;var fu="TabsContent",pu=c.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,l=Ia(fu,r),d=mu(l.baseId,n),u=gu(l.baseId,n),f=n===l.value,p=c.useRef(f);return c.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),s.jsx(Re,{present:o||f,children:({present:g})=>s.jsx(H.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});pu.displayName=fu;function mu(e,t){return`${e}-trigger-${t}`}function gu(e,t){return`${e}-content-${t}`}var kw=iu,Tw=cu,Aw=uu,_w=pu;function Iw({className:e,...t}){return s.jsx(kw,{"data-slot":"tabs",className:j("qodo qodo-tabs flex flex-col gap-2",e),...t})}function Mw({className:e,...t}){return s.jsx(Tw,{"data-slot":"tabs-list",className:j("inline-flex w-full items-end justify-start gap-4",e),...t})}function Ow({className:e,...t}){return s.jsx(Aw,{"data-slot":"tabs-trigger",className:j("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 Dw({className:e,...t}){return s.jsx(_w,{"data-slot":"tabs-content",className:j("flex-1 outline-none",e),...t})}var $w=e=>e.type==="checkbox",fr=e=>e instanceof Date,Ma=e=>e==null;const vu=e=>typeof e=="object";var kt=e=>!Ma(e)&&!Array.isArray(e)&&vu(e)&&!fr(e),Lw=e=>kt(e)&&e.target?$w(e.target)?e.target.checked:e.target.value:e,Fw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vw=(e,t)=>e.has(Fw(t)),Bw=e=>{const t=e.constructor&&e.constructor.prototype;return kt(t)&&t.hasOwnProperty("isPrototypeOf")},Gw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function hu(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Gw&&(e instanceof Blob||n))&&(r||kt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Bw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=hu(e[o]));else return e;return t}var xu=e=>/^\w*$/.test(e),zo=e=>e===void 0,Ww=e=>Array.isArray(e)?e.filter(Boolean):[],bu=e=>Ww(e.replace(/["|']|\]/g,"").split(/\.|\[/)),je=(e,t,r)=>{if(!t||!kt(e))return r;const n=(xu(t)?[t]:bu(t)).reduce((o,a)=>Ma(o)?o:o[a],e);return zo(n)||n===e?zo(e[t])?r:e[t]:n},wo=e=>typeof e=="boolean",ni=(e,t,r)=>{let n=-1;const o=xu(t)?[t]:bu(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let d=r;if(n!==i){const u=e[l];d=kt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const oi={BLUR:"blur",CHANGE:"change"},ai={all:"all"},Oa=S.createContext(null);Oa.displayName="HookFormContext";const or=()=>S.useContext(Oa),zw=e=>{const{children:t,...r}=e;return S.createElement(Oa.Provider,{value:r},t)};var qw=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==ai.all&&(t._proxyFormState[i]=!n||ai.all),r&&(r[i]=!0),e[i]}});return o};const yu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function wu(e){const t=or(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),d=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return yu(()=>r._subscribe({name:o,formState:d.current,exact:a,callback:u=>{!n&&l({...r._formState,...u})}}),[o,n,a]),S.useEffect(()=>{d.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>qw(i,r,d.current,!1),[i,r])}var Uw=e=>typeof e=="string",Hw=(e,t,r,n,o)=>Uw(e)?je(r,e,o):Array.isArray(e)?e.map(a=>je(r,a)):r,si=e=>Ma(e)||!vu(e);function Cu(e,t,r=new WeakSet){if(si(e)||si(t))return e===t;if(fr(e)&&fr(t))return 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 i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(fr(i)&&fr(l)||kt(i)&&kt(l)||Array.isArray(i)&&Array.isArray(l)?!Cu(i,l,r):i!==l)return!1}}return!0}function Kw(e){const t=or(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},d=S.useRef(o),u=S.useRef(l),f=S.useRef(void 0);u.current=l;const p=S.useMemo(()=>r._getWatch(n,d.current),[r,n]),[g,m]=S.useState(u.current?u.current(p):p);return yu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:b=>{if(!a){const v=Hw(n,r._names,b.values||r._formValues,!1,d.current);if(u.current){const h=u.current(v);Cu(h,f.current)||(m(h),f.current=h)}else m(v)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function Yw(e){const t=or(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=Vw(o._names.array,r),d=S.useMemo(()=>je(o._formValues,r,je(o._defaultValues,r,i)),[o,r,i]),u=Kw({control:o,name:r,defaultValue:d,exact:!0}),f=wu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:u,...wo(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!je(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!je(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!je(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!je(f.validatingFields,r)},error:{enumerable:!0,get:()=>je(f.errors,r)}}),[f,r]),b=S.useCallback(x=>g.current.onChange({target:{value:Lw(x),name:r},type:oi.CHANGE}),[r]),v=S.useCallback(()=>g.current.onBlur({target:{value:je(o._formValues,r),name:r},type:oi.BLUR}),[r,o._formValues]),h=S.useCallback(x=>{const C=je(o._fields,r);C&&x&&(C._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:E=>x.setCustomValidity(E),reportValidity:()=>x.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:u,...wo(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:v,ref:h}),[r,n,f.disabled,b,v,h,u]);return S.useEffect(()=>{const x=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...wo(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(E,N)=>{const T=je(o._fields,E);T&&T._f&&(T._f.mount=N)};if(C(r,!0),x){const E=hu(je(o._options.defaultValues,r));ni(o._defaultValues,r,E),zo(je(o._formValues,r))&&ni(o._formValues,r,E)}return!l&&o.register(r),()=>{(l?x&&!o._state.action:x)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const Su=e=>e.render(Yw(e)),Eu=S.createContext(void 0),Ru=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(Eu.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(zw,{...t,children:o})})},Pu=()=>{const e=S.useContext(Eu),t=or();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},Xw=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return s.jsx(Qe,{type:e,variant:r(),...t})};var ju={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ii=S.createContext&&S.createContext(ju),Zw=["attr","size","title"];function Jw(e,t){if(e==null)return{};var r=Qw(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 Qw(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 mn(){return mn=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},mn.apply(this,arguments)}function li(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 gn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?li(Object(r),!0).forEach(function(n){e0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):li(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e0(e,t,r){return t=t0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t0(e){var t=r0(e,"string");return typeof t=="symbol"?t:t+""}function r0(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 Nu(e){return e&&e.map((t,r)=>S.createElement(t.tag,gn({key:r},t.attr),Nu(t.child)))}function ku(e){return t=>S.createElement(n0,mn({attr:gn({},e.attr)},t),Nu(e.child))}function n0(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=Jw(e,Zw),l=o||r.size||"1em",d;return r.className&&(d=r.className),e.className&&(d=(d?d+" ":"")+e.className),S.createElement("svg",mn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:d,style:gn(gn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return ii!==void 0?S.createElement(ii.Consumer,null,r=>t(r)):t(ju)}function o0(e){return ku({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 a0="Label",Tu=c.forwardRef((e,t)=>s.jsx(H.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())}}));Tu.displayName=a0;var s0=Tu;function Au({className:e,...t}){return s.jsx(s0,{"data-slot":"label",className:j("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 _u=c.createContext({}),i0=({...e})=>s.jsx(_u.Provider,{value:{name:e.name},children:s.jsx(Su,{...e})}),Hn=()=>{const e=c.useContext(_u),t=c.useContext(Iu),{getFieldState:r}=or(),n=wu({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}},Iu=c.createContext({});function l0({className:e,...t}){const r=c.useId();return s.jsx(Iu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:j("qodo qodo-form-item grid gap-2",e),...t})})}function c0({className:e,...t}){const{formItemId:r}=Hn();return s.jsx(Au,{"data-slot":"form-label",className:j("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function d0({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Hn();return s.jsx(Qg,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function u0({className:e,...t}){const{formDescriptionId:r}=Hn();return s.jsx("p",{"data-slot":"form-description",id:r,className:j("text-purple-muted-300 text-sm",e),...t})}function f0({className:e,...t}){const{error:r,formMessageId:n}=Hn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:j("text-destructive text-sm",e),...t,children:o}):null}var[Kn,fP]=we("Tooltip",[ut]),Yn=ut(),Mu="TooltipProvider",p0=700,qo="tooltip.open",[m0,Da]=Kn(Mu),Ou=e=>{const{__scopeTooltip:t,delayDuration:r=p0,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=c.useRef(!0),l=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),s.jsx(m0,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(d.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Ou.displayName=Mu;var yr="Tooltip",[g0,Mr]=Kn(yr),Du=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,d=Da(yr,e.__scopeTooltip),u=Yn(t),[f,p]=c.useState(null),g=me(),m=c.useRef(0),b=i??d.disableHoverableContent,v=l??d.delayDuration,h=c.useRef(!1),[y,x]=ye({prop:n,defaultProp:o??!1,onChange:A=>{A?(d.onOpen(),document.dispatchEvent(new CustomEvent(qo))):d.onClose(),a==null||a(A)},caller:yr}),C=c.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h.current=!1,x(!0)},[x]),N=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),T=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,x(!0),m.current=0},v)},[v,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(Nr,{...u,children:s.jsx(g0,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{d.isOpenDelayedRef.current?T():E()},[d.isOpenDelayedRef,T,E]),onTriggerLeave:c.useCallback(()=>{b?N():(window.clearTimeout(m.current),m.current=0)},[N,b]),onOpen:E,onClose:N,disableHoverableContent:b,children:r})})};Du.displayName=yr;var Uo="TooltipTrigger",$u=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mr(Uo,r),a=Da(Uo,r),i=Yn(r),l=c.useRef(null),d=se(t,l,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(kr,{asChild:!0,...i,children:s.jsx(H.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:d,onPointerMove:F(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});$u.displayName=Uo;var $a="TooltipPortal",[v0,h0]=Kn($a,{forceMount:void 0}),Lu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Mr($a,t);return s.jsx(v0,{scope:t,forceMount:r,children:s.jsx(Re,{present:r||a.open,children:s.jsx(rr,{asChild:!0,container:o,children:n})})})};Lu.displayName=$a;var Xt="TooltipContent",Fu=c.forwardRef((e,t)=>{const r=h0(Xt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Mr(Xt,e.__scopeTooltip);return s.jsx(Re,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Vu,{side:o,...a,ref:t}):s.jsx(x0,{side:o,...a,ref:t})})}),x0=c.forwardRef((e,t)=>{const r=Mr(Xt,e.__scopeTooltip),n=Da(Xt,e.__scopeTooltip),o=c.useRef(null),a=se(t,o),[i,l]=c.useState(null),{trigger:d,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=c.useCallback(()=>{l(null),p(!1)},[p]),m=c.useCallback((b,v)=>{const h=b.currentTarget,y={x:b.clientX,y:b.clientY},x=C0(y,h.getBoundingClientRect()),C=S0(y,x),E=E0(v.getBoundingClientRect()),N=P0([...C,...E]);l(N),p(!0)},[p]);return c.useEffect(()=>()=>g(),[g]),c.useEffect(()=>{if(d&&f){const b=h=>m(h,f),v=h=>m(h,d);return d.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{d.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[d,f,m,g]),c.useEffect(()=>{if(i){const b=v=>{const h=v.target,y={x:v.clientX,y:v.clientY},x=(d==null?void 0:d.contains(h))||(f==null?void 0:f.contains(h)),C=!R0(y,i);x?g():C&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[d,f,i,u,g]),s.jsx(Vu,{...e,ref:a})}),[b0,y0]=Kn(yr,{isInside:!1}),w0=tv("TooltipContent"),Vu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,d=Mr(Xt,r),u=Yn(r),{onClose:f}=d;return c.useEffect(()=>(document.addEventListener(qo,f),()=>document.removeEventListener(qo,f)),[f]),c.useEffect(()=>{if(d.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(d.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,f]),s.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(Tn,{"data-state":d.stateAttribute,...u,...l,ref:t,style:{...l.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:[s.jsx(w0,{children:n}),s.jsx(b0,{scope:r,isInside:!0,children:s.jsx(Hh,{id:d.contentId,role:"tooltip",children:o||n})})]})})});Fu.displayName=Xt;var Bu="TooltipArrow",Gu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Yn(r);return y0(Bu,r).isInside?null:s.jsx(An,{...o,...n,ref:t})});Gu.displayName=Bu;function C0(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 S0(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 E0(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 R0(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],d=t[i],u=l.x,f=l.y,p=d.x,g=d.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function P0(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),j0(t)}function j0(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],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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 N0=Ou,k0=Du,T0=$u,A0=Lu,_0=Fu,I0=Gu;function Wu({delayDuration:e=0,...t}){return s.jsx(N0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function zu({...e}){return s.jsx(Wu,{children:s.jsx(k0,{"data-slot":"tooltip",...e})})}function qu({...e}){return s.jsx(T0,{"data-slot":"tooltip-trigger",...e})}function Uu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(A0,{children:s.jsxs(_0,{"data-slot":"tooltip-content",sideOffset:t,className:j("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&&s.jsx(I0,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const ar=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:d,disabled:u,readOnly:f}=Pu(),p=()=>a?s.jsxs(zu,{children:[s.jsx(qu,{asChild:!0,children:s.jsx("span",{children:s.jsx(o0,{size:16})})}),s.jsx(Uu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(u0,{children:o}):s.jsx(s.Fragment,{});return s.jsx(i0,{control:d,name:r,render:({field:m,fieldState:b})=>s.jsxs(l0,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(c0,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(d0,{children:s.jsx(e,{...m,disabled:u,...l,readOnly:f,error:!!b.error})}),!!o&&g(),s.jsx(f0,{})]})})},M0=S.forwardRef((e,t)=>s.jsx(Rr,{...e,ref:t})),O0=S.forwardRef((e,t)=>ar(M0)({...e,ref:t})),D0=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=d=>{n({target:{value:d}})};return s.jsx(Ca,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),$0=ar(D0);var La="Radio",[L0,Hu]=we(La),[F0,V0]=L0(La),Ku=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:d,form:u,...f}=e,[p,g]=c.useState(null),m=se(t,h=>g(h)),b=c.useRef(!1),v=p?u||!!p.closest("form"):!0;return s.jsxs(F0,{scope:r,checked:o,disabled:i,children:[s.jsx(H.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ju(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,h=>{o||d==null||d(),v&&(b.current=h.isPropagationStopped(),b.current||h.stopPropagation())})}),v&&s.jsx(Zu,{control:p,bubbles:!b.current,name:n,value:l,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Ku.displayName=La;var Yu="RadioIndicator",Xu=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=V0(Yu,r);return s.jsx(Re,{present:n||a.checked,children:s.jsx(H.span,{"data-state":Ju(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Xu.displayName=Yu;var B0="RadioBubbleInput",Zu=c.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),d=da(r),u=ia(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[d,r,n]),s.jsx(H.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Zu.displayName=B0;function Ju(e){return e?"checked":"unchecked"}var G0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xn="RadioGroup",[W0,pP]=we(Xn,[gt,Hu]),Qu=gt(),ef=Hu(),[z0,q0]=W0(Xn),tf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:d,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=Qu(r),b=Tt(u),[v,h]=ye({prop:a,defaultProp:o??null,onChange:p,caller:Xn});return s.jsx(z0,{scope:r,name:n,required:i,disabled:l,value:v,onValueChange:h,children:s.jsx(Bn,{asChild:!0,...m,orientation:d,dir:b,loop:f,children:s.jsx(H.div,{role:"radiogroup","aria-required":i,"aria-orientation":d,"data-disabled":l?"":void 0,dir:b,...g,ref:t})})})});tf.displayName=Xn;var rf="RadioGroupItem",nf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=q0(rf,r),i=a.disabled||n,l=Qu(r),d=ef(r),u=c.useRef(null),f=se(t,u),p=a.value===o.value,g=c.useRef(!1);return c.useEffect(()=>{const m=v=>{G0.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),s.jsx(Gn,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(Ku,{disabled:i,required:a.required,checked:p,...d,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:F(o.onFocus,()=>{var m;g.current&&((m=u.current)==null||m.click())})})})});nf.displayName=rf;var U0="RadioGroupIndicator",of=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=ef(r);return s.jsx(Xu,{...o,...n,ref:t})});of.displayName=U0;var H0=tf,K0=nf,Y0=of;function X0({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(H0,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:j("qodo qodo-radio-group grid gap-3 group",e),...n})}function Z0({className:e,...t}){return s.jsx(K0,{"data-slot":"radio-group-item",className:j("qodo qodo-radio-group-item dark:border-purple-muted-200 dark:text-purple-muted-200 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]","disabled:cursor-not-allowed disabled:opacity-50","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","mt-[2px] mr-0",e),...t,children:s.jsx(Y0,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(jg,{className:"fill-purple-muted-200 absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const Fa=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:d="horizontal",dir:u="ltr",name:f,onChange:p,...g}=e,m=v=>{i||(p==null||p({target:{value:v}}),o==null||o(v))},b=j("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":d==="horizontal","flex-col gap-3":d==="vertical"},l);return s.jsx(X0,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:b,dir:u,...g})});Fa.displayName="BaseRadioGroupComponent";const Va=({value:e="",disabled:t,error:r,name:n="radio",children:o,className:a})=>{const i=`${n}-${e}`;return s.jsxs(Au,{htmlFor:i,className:j("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 hover:bg-muted/50":!t,"opacity-50 !cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},a),children:[s.jsx(Z0,{value:e,id:i,disabled:t||r}),o]},e)};Va.displayName="RadioGroupItemComponent";const J0=ar(Fa),Q0=e=>s.jsx("hr",{className:"w-full h-px border-purple-muted-500",...e}),eC=({children:e,description:t,className:r})=>s.jsxs("div",{className:j("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),af=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=j("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});af.displayName="FormGroup";function tC({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:j("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-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] 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 rC=S.forwardRef((e,t)=>ar(tC)({...e,ref:t})),sf=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>s.jsxs(Yt,{variant:a,disabled:n,size:"sm",className:j("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(Sn,{className:"w-[10px] h-[10px]"})})]}),nC=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:j("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(sf,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Qe,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:d=>d.preventDefault(),onClick:d=>{d.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(zg,{className:"h-4 w-4"})})]})}),Co={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},oC=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},lf=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:d,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:b,normalizeTags:v=oC,onChange:h=()=>{},onAddTag:y=()=>{},onRemoveTag:x=()=>{},onResetTags:C=()=>{}})=>{const[E,N]=S.useState(""),[T,A]=S.useState(!1),P=S.useRef(null),V=S.useRef(null),U=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{V.current&&te(V.current.offsetWidth)},[]);const Q=e.length>=i,W=L=>{if(Q||e.some(K=>K.id===L.id))return;const _=[...e,L];h(_),y(L)},D=L=>{const _=e.filter(K=>K.id!==L);h(_),x(L)},I=()=>{h==null||h([]),C()},O=L=>{const _=L.target.value;N(_),A(!0)},R=()=>{const L=E.trim().toLowerCase();if(!L)return[];const _=new Set(e.map(K=>K.id));return o.filter(K=>K.label.toLowerCase().includes(L)&&!_.has(K.id))},M=L=>v?v(L):L,B=()=>{const L=E.trim();if(!L)return;const _=M(L);if(!_)return;if(e.some(ee=>ee.id===_)){N(""),A(!1);return}const K=o.find(ee=>ee.id===_||M(ee.label)===_);K?W(K):a&&W({id:_,label:_}),N(""),A(!1)},J=L=>{const _=L.key===Co.BACKSPACE&&!E&&e.length>0,K=L.key===Co.ENTER&&E,ee=L.key===Co.ESCAPE;K?(L.preventDefault(),B(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):_?D(e[e.length-1].id):ee&&A(!1)},k=()=>{if(E&&R().length>0)return s.jsx(wa,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:L=>L.preventDefault(),onCloseAutoFocus:L=>L.preventDefault(),onMouseDown:L=>L.preventDefault(),children:s.jsx("div",{className:j("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:R().map(L=>s.jsx(nC,{label:L.label,id:L.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var _;W(L),N(""),A(!1),(_=P.current)==null||_.focus()}},L.id))})})},G=()=>g||s.jsx(Gg,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Z=()=>e.map(L=>s.jsx(sf,{label:L.label,id:L.id,onRemoveTag:D,disabled:l,className:p,variant:t},L.id)),z=()=>e.length===0?s.jsx(s.Fragment,{}):s.jsx(Sn,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:I});return s.jsx("div",{className:j("w-full",d),children:s.jsxs(ba,{open:T&&!l,onOpenChange:A,modal:!1,children:[s.jsx(ya,{className:"w-full",children:s.jsxs("div",{ref:V,tabIndex:-1,className:j("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":l}),onClick:L=>{var _;L.stopPropagation(),A(!0),(_=P.current)==null||_.focus()},children:[G(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Z(),s.jsx(Rr,{ref:P,value:E,onChange:O,onClick:L=>L.stopPropagation(),onFocus:()=>A(!0),onBlur:b,onKeyDown:J,placeholder:r,disabled:l||Q,className:j("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")})]}),z()]})}),k()]})})};function aC(e){const{control:t}=or();return s.jsx(Su,{name:e.name,control:t,render:({field:r})=>s.jsx(lf,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const sC=ar(aC),iC=12,ci={SINGLE:"single",MULTIPLE:"multiple"},di={LTR:"ltr"};var cf=typeof global=="object"&&global&&global.Object===Object&&global,lC=typeof self=="object"&&self&&self.Object===Object&&self,ht=cf||lC||Function("return this")(),vn=ht.Symbol,df=Object.prototype,cC=df.hasOwnProperty,dC=df.toString,dr=vn?vn.toStringTag:void 0;function uC(e){var t=cC.call(e,dr),r=e[dr];try{e[dr]=void 0;var n=!0}catch{}var o=dC.call(e);return n&&(t?e[dr]=r:delete e[dr]),o}var fC=Object.prototype,pC=fC.toString;function mC(e){return pC.call(e)}var gC="[object Null]",vC="[object Undefined]",ui=vn?vn.toStringTag:void 0;function Or(e){return e==null?e===void 0?vC:gC:ui&&ui in Object(e)?uC(e):mC(e)}function Ba(e){return e!=null&&typeof e=="object"}var hC=Array.isArray;function uf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xC="[object AsyncFunction]",bC="[object Function]",yC="[object GeneratorFunction]",wC="[object Proxy]";function ff(e){if(!uf(e))return!1;var t=Or(e);return t==bC||t==yC||t==xC||t==wC}var So=ht["__core-js_shared__"],fi=(function(){var e=/[^.]+$/.exec(So&&So.keys&&So.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function CC(e){return!!fi&&fi in e}var SC=Function.prototype,EC=SC.toString;function _t(e){if(e!=null){try{return EC.call(e)}catch{}try{return e+""}catch{}}return""}var RC=/[\\^$.*+?()[\]{}|]/g,PC=/^\[object .+?Constructor\]$/,jC=Function.prototype,NC=Object.prototype,kC=jC.toString,TC=NC.hasOwnProperty,AC=RegExp("^"+kC.call(TC).replace(RC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _C(e){if(!uf(e)||CC(e))return!1;var t=ff(e)?AC:PC;return t.test(_t(e))}function IC(e,t){return e==null?void 0:e[t]}function Dr(e,t){var r=IC(e,t);return _C(r)?r:void 0}var Ho=Dr(ht,"WeakMap"),MC=9007199254740991;function pf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MC}function OC(e){return e!=null&&pf(e.length)&&!ff(e)}var DC=Object.prototype;function mf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||DC;return e===r}var $C="[object Arguments]";function pi(e){return Ba(e)&&Or(e)==$C}var gf=Object.prototype,LC=gf.hasOwnProperty,FC=gf.propertyIsEnumerable,VC=pi((function(){return arguments})())?pi:function(e){return Ba(e)&&LC.call(e,"callee")&&!FC.call(e,"callee")};function BC(){return!1}var vf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mi=vf&&typeof module=="object"&&module&&!module.nodeType&&module,GC=mi&&mi.exports===vf,gi=GC?ht.Buffer:void 0,WC=gi?gi.isBuffer:void 0,zC=WC||BC,qC="[object Arguments]",UC="[object Array]",HC="[object Boolean]",KC="[object Date]",YC="[object Error]",XC="[object Function]",ZC="[object Map]",JC="[object Number]",QC="[object Object]",e1="[object RegExp]",t1="[object Set]",r1="[object String]",n1="[object WeakMap]",o1="[object ArrayBuffer]",a1="[object DataView]",s1="[object Float32Array]",i1="[object Float64Array]",l1="[object Int8Array]",c1="[object Int16Array]",d1="[object Int32Array]",u1="[object Uint8Array]",f1="[object Uint8ClampedArray]",p1="[object Uint16Array]",m1="[object Uint32Array]",pe={};pe[s1]=pe[i1]=pe[l1]=pe[c1]=pe[d1]=pe[u1]=pe[f1]=pe[p1]=pe[m1]=!0;pe[qC]=pe[UC]=pe[o1]=pe[HC]=pe[a1]=pe[KC]=pe[YC]=pe[XC]=pe[ZC]=pe[JC]=pe[QC]=pe[e1]=pe[t1]=pe[r1]=pe[n1]=!1;function g1(e){return Ba(e)&&pf(e.length)&&!!pe[Or(e)]}function v1(e){return function(t){return e(t)}}var hf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hr=hf&&typeof module=="object"&&module&&!module.nodeType&&module,h1=hr&&hr.exports===hf,Eo=h1&&cf.process,vi=(function(){try{var e=hr&&hr.require&&hr.require("util").types;return e||Eo&&Eo.binding&&Eo.binding("util")}catch{}})(),hi=vi&&vi.isTypedArray,x1=hi?v1(hi):g1;function b1(e,t){return function(r){return e(t(r))}}var y1=b1(Object.keys,Object),w1=Object.prototype,C1=w1.hasOwnProperty;function S1(e){if(!mf(e))return y1(e);var t=[];for(var r in Object(e))C1.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ko=Dr(ht,"Map"),Yo=Dr(ht,"DataView"),Xo=Dr(ht,"Promise"),Zo=Dr(ht,"Set"),xi="[object Map]",E1="[object Object]",bi="[object Promise]",yi="[object Set]",wi="[object WeakMap]",Ci="[object DataView]",R1=_t(Yo),P1=_t(Ko),j1=_t(Xo),N1=_t(Zo),k1=_t(Ho),Ct=Or;(Yo&&Ct(new Yo(new ArrayBuffer(1)))!=Ci||Ko&&Ct(new Ko)!=xi||Xo&&Ct(Xo.resolve())!=bi||Zo&&Ct(new Zo)!=yi||Ho&&Ct(new Ho)!=wi)&&(Ct=function(e){var t=Or(e),r=t==E1?e.constructor:void 0,n=r?_t(r):"";if(n)switch(n){case R1:return Ci;case P1:return xi;case j1:return bi;case N1:return yi;case k1:return wi}return t});var T1="[object Map]",A1="[object Set]",_1=Object.prototype,I1=_1.hasOwnProperty;function $r(e){if(e==null)return!0;if(OC(e)&&(hC(e)||typeof e=="string"||typeof e.splice=="function"||zC(e)||x1(e)||VC(e)))return!e.length;var t=Ct(e);if(t==T1||t==A1)return!e.size;if(mf(e))return!S1(e).length;for(var r in e)if(I1.call(e,r))return!1;return!0}function Zn(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>Zn(t))}function Ga(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...Ga(r))}),t}function Wa(e,t){return $r(e.children)?!1:Zn(e).every(n=>t.has(n))}function M1(e,t){return $r(e.children)?!1:Zn(e).some(n=>t.has(n))}function xf(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=xf(r.children,t);if(n)return n}}return null}function za(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&za(n.children,t).forEach((i,l)=>r.set(l,i))}return r}function bf(e,t){e.forEach(r=>{$r(r.children)||(Wa(r,t)?t.add(r.value):t.delete(r.value),r.children&&bf(r.children,t))})}const O1=e=>e?Array.isArray(e)?e:[e]:[],D1=e=>za(e,t=>[t.value,t.label]),$1=e=>za(e,t=>t.icon?[t.value,t.icon]:null);function L1(e,t){Ga(e).forEach(n=>t.delete(n))}function F1(e,t){Ga(e).forEach(n=>t.add(n))}function yf(e,t){const r=new Set(t);return e.flatMap(n=>!$r(n.children)&&n.children?Wa(n,r)?[n.value]:yf(n.children,t):r.has(n.value)?[n.value]:[])}function V1(e){return e&&e>1?e*iC:0}function wf({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=di.LTR}){const i=!$r(e.children),l=t.has(e.value),d=`${V1(n)}px`,u=Wa(e,t),p=M1(e,t)&&!u,g=l||u,m=()=>{if(n!==0)return s.jsx(kg,{className:"w-4 text-[var(--text-interactive-neutral-idle)]"})},b=()=>{if(e.icon)return s.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},v=()=>p?s.jsx(Ag,{className:"w-2 h-2 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)]"}):s.jsx(Er,{className:j("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),h=()=>{if(i)return e.children.map(x=>s.jsx(wf,{option:x,selected:t,onSelect:r,nestLevel:n+1,dir:a},x.value))},y=()=>s.jsxs("div",{className:j("flex items-center w-full gap-2 flex-row",{"flex-row-reverse":a===di.LTR}),style:{paddingLeft:d},children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m(),b(),s.jsx("span",{className:"flex-1 text-[var(--text-interactive-neutral-active)]",children:e.label})]}),v()]});return s.jsxs("div",{children:[s.jsx(od,{disabled:e.disabled||o,onSelect:()=>r(e.value,i),className:j("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)]!",{"bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),h()]})}function B1({value:e,options:t=[],onSelect:r,disabled:n=!1,mode:o=ci.SINGLE,placeholder:a="Select...",inputPlaceholder:i="Search...",emptyState:l="No option found.",triggerClassName:d,triggerWrapperClassName:u,badgeClassName:f,badgeVariant:p="text",searchable:g=!1,toggleIcon:m=s.jsx(Cn,{}),dir:b="ltr",...v}){const[h,y]=S.useState(0),[x,C]=S.useState(!1),E=S.useRef(null),N=o===ci.MULTIPLE,[T,A]=S.useState(e!==void 0?e:N?[]:""),P=O1(T),V=new Set(P);S.useEffect(()=>{E.current&&y(E.current.offsetWidth)},[T]);const U=D1(t),re=$1(t);S.useEffect(()=>{e!==void 0&&A(N?e||[]:e||"")},[e,N]);function te(O,R){if(!N){A(O),r==null||r(O),C(!1);return}A(M=>{const B=Array.isArray(M)?M:[],J=new Set(B),k=xf(t,O);if(!k)return B;R?Q(k,J):W(O,J);const G=Array.from(J);return r==null||r(G),G})}function Q(O,R){Zn(O).every(J=>R.has(J))?L1(O,R):F1(O,R)}function W(O,R){R.has(O)?R.delete(O):R.add(O),bf(t,R)}const D=()=>{const O=yf(t,P);return O.length===0?s.jsx(Yt,{variant:p,size:"md",className:j("text-purple-muted-300",f),children:a}):O.map(M=>{const B=re.get(M),J=U.get(M)||M;return s.jsx(Yt,{variant:p,size:"md",className:j("text-[var(--text-bg-neutral-mid)]",f),children:s.jsxs("div",{className:"flex items-center gap-1",children:[B&&s.jsx("div",{className:"flex-shrink-0",children:B}),s.jsx("span",{children:J})]})},M)})},I=()=>{if(g)return s.jsx(ed,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i})};return s.jsxs(ba,{open:x,onOpenChange:n?void 0:C,children:[s.jsx(ya,{asChild:!0,disabled:n,children:s.jsxs("div",{className:j("flex items-center gap-1.5 justify-between py-1 px-3 w-[100%] border border-[var(--border-interactive-neutral-idle)] bg-[var(--fill-input-neutral-idle)] rounded-sm scrollbar-thin","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"cursor-pointer hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)]":!n,"cursor-not-allowed opacity-75 ":n},u),ref:E,"aria-disabled":n,...v,children:[s.jsx("div",{className:j("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",d),children:D()}),s.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:m})]})}),s.jsx(wa,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:h??"auto"},children:s.jsxs(Qc,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[I(),s.jsxs(td,{children:[s.jsx(rd,{children:l}),s.jsx(nd,{children:t.map(O=>s.jsx(wf,{disabled:n,option:O,selected:V,onSelect:te,dir:b},O.value))})]})]})})]})}const Cf=S.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:i,...l}=e,d=u=>{n||r&&r({target:{value:u}})};return s.jsx(B1,{options:t,value:o,disabled:a,...l,onSelect:d,mode:i})});Cf.displayName="BaseSelectComponent";const G1=ar(Cf),Ie=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,d=j("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(Ru,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:d,onSubmit:l(a),...i})})};Ie.Button=Xw;Ie.Input=O0;Ie.Select=G1;Ie.Combobox=$0;Ie.RadioGroup=J0;Ie.RadioGroupItem=Va;Ie.Group=af;Ie.Textarea=rC;Ie.Divider=Q0;Ie.Title=eC;Ie.TagsInput=sC;function W1(e){return e==null?[]:Array.isArray(e)?e:[e]}var z1=e=>Array.from(Array(e).keys()),Si=e=>(e==null?void 0:e.constructor.name)==="Array",q1=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!qa(e[r],t[r]))return!1;return!0},qa=(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(Si(e)&&Si(t))return q1(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(!qa(e[a],t[a]))return!1}return!0},U1=e=>e!=null&&typeof e=="object",nn=e=>typeof e=="string",pr=e=>typeof e=="function",H1=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),K1=e=>Object.prototype.toString.call(e),Sf=Function.prototype.toString,Y1=Sf.call(Object),X1=e=>{if(!U1(e)||K1(e)!="[object Object]"||Q1(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=H1(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Sf.call(r)==Y1},Z1=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,J1=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Q1=e=>Z1(e)||J1(e),eS=e=>e(),tS=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},rS=e=>Number.isNaN(e),nS=e=>rS(e)?0:e,oS=(e,t,r)=>{const n=nS(e),o=n>=t,a=r==null||n<=r;return o&&a};function Ef(e){if(!X1(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]=Ef(o))}return r}function Ei(...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 aS(e,t){if(e==null)throw new Error(t())}var Rf=e=>typeof e=="object"&&e!==null,We=e=>e?"":void 0,sS=9,iS=e=>Rf(e)&&e.nodeType===sS,lS=e=>Rf(e)&&e===e.window;function cS(e){if(!e)return!1;const t=e.getRootNode();return Pf(t)===e}function dS(e){return iS(e)?e:lS(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Pf(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 uS=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),fS=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ri=e=>{const t={};let r;for(;r=fS.exec(e);)t[r[1]]=r[2];return t},pS=(e,t)=>{if(nn(e)){if(nn(t))return`${e};${t}`;e=Ri(e)}else nn(t)&&(t=Ri(t));return Object.assign({},e??{},t??{})};function Be(...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]=tS(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=uS(t[o],r[o]);continue}if(o==="style"){t[o]=pS(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 mS(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((d,u)=>!qa(n[u],d)))&&(n=i,o=t(i,a)),o}}var Wt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Wt||{}),Ro="__init__";function gS(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>dS(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Pf(t()),isActiveElement:cS,getById:i=>t().getElementById(i)}}function vS(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var hS=()=>e=>Array.from(new Set(e)),jf=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function hn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const d=S.useRef(l.current);jf(()=>{d.current=l.current},[o,e().value]);const u=p=>{var b,v;const g=d.current,m=pr(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(v=(b=e()).onChange)==null||v.call(b,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?Sr.flushSync:eS)(()=>u(p))},invoke(p,g){var m,b;(b=(m=e()).onChange)==null||b.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}hn.cleanup=e=>{S.useEffect(()=>e,[])};hn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function xS(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var bS=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function yS(e,t={}){var re,te,Q,W;const r=S.useMemo(()=>{const{id:D,ids:I,getRootNode:O}=t;return gS({id:D,ids:I,getRootNode:O})},[t]),n=(...D)=>{e.debug&&console.log(...D)},o=((re=e.props)==null?void 0:re.call(e,{props:Ef(t),scope:r}))??t,a=wS(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:hn,scope:r,flush:Pi,getContext(){return d},getComputed(){return N},getRefs(){return v},getEvent(){return m()}}),l=Nf(i),d={get(D){var I;return(I=l.current)==null?void 0:I[D].ref.current},set(D,I){var O;(O=l.current)==null||O[D].set(I)},initial(D){var I;return(I=l.current)==null?void 0:I[D].initial},hash(D){var O,R;const I=(O=l.current)==null?void 0:O[D].get();return(R=l.current)==null?void 0:R[D].hash(I)}},u=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),b=()=>({...T,matches(...D){return D.includes(T.ref.current)},hasTag(D){var I,O;return!!((O=(I=e.states[T.ref.current])==null?void 0:I.tags)!=null&&O.includes(D))}}),v=xS(((Q=e.refs)==null?void 0:Q.call(e,{prop:a,context:d}))??{}),h=()=>({state:b(),context:d,event:m(),prop:a,send:U,action:y,guard:x,track:bS,refs:v,computed:N,flush:Pi,scope:r,choose:E}),y=D=>{const I=pr(D)?D(h()):D;if(!I)return;const O=I.map(R=>{var B,J;const M=(J=(B=e.implementations)==null?void 0:B.actions)==null?void 0:J[R];return M||Ei(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of O)R==null||R(h())},x=D=>{var I,O;return pr(D)?D(h()):(O=(I=e.implementations)==null?void 0:I.guards)==null?void 0:O[D](h())},C=D=>{const I=pr(D)?D(h()):D;if(!I)return;const O=I.map(M=>{var J,k;const B=(k=(J=e.implementations)==null?void 0:J.effects)==null?void 0:k[M];return B||Ei(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of O){const B=M==null?void 0:M(h());B&&R.push(B)}return()=>R.forEach(M=>M==null?void 0:M())},E=D=>W1(D).find(I=>{let O=!I.guard;return nn(I.guard)?O=!!x(I.guard):pr(I.guard)&&(O=I.guard(h())),O}),N=D=>{aS(e.computed,()=>"[zag-js] No computed object found on machine");const I=e.computed[D];return I({context:d,event:m(),prop:a,refs:v,scope:r,computed:N})},T=hn(()=>({defaultValue:e.initialState({prop:a}),onChange(D,I){var R,M,B,J;if(I){const k=u.current.get(I);k==null||k(),u.current.delete(I)}I&&y((R=e.states[I])==null?void 0:R.exit),y((M=f.current)==null?void 0:M.actions);const O=C((B=e.states[D])==null?void 0:B.effects);if(O&&u.current.set(D,O),I===Ro){y(e.entry);const k=C(e.effects);k&&u.current.set(Ro,k)}y((J=e.states[D])==null?void 0:J.entry)}})),A=S.useRef(void 0),P=S.useRef(Wt.NotStarted);jf(()=>{queueMicrotask(()=>{const O=P.current===Wt.Started;P.current=Wt.Started,n(O?"rehydrating...":"initializing...");const R=A.current??T.initial;T.invoke(R,O?T.get():Ro)});const D=u.current,I=T.ref.current;return()=>{n("unmounting..."),A.current=I,P.current=Wt.Stopped,D.forEach(O=>O==null?void 0:O()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const V=()=>"ref"in T?T.ref.current:T.get(),U=D=>{queueMicrotask(()=>{var J,k;if(P.current!==Wt.Started)return;p.current=g.current,g.current=D;let I=V();const O=((J=e.states[I].on)==null?void 0:J[D.type])??((k=e.on)==null?void 0:k[D.type]),R=E(O);if(!R)return;f.current=R;const M=R.target??I;n("transition",D.type,R.target||I,`(${R.actions})`);const B=M!==I;B?Sr.flushSync(()=>T.set(M)):R.reenter&&!B?T.invoke(I,I):y(R.actions??[])})};return(W=e.watch)==null||W.call(e,h()),{state:b(),send:U,context:d,prop:a,scope:r,refs:v,computed:N,event:m(),getStatus:()=>P.current}}function Nf(e){const t=S.useRef(e);return t.current=e,t}function wS(e){const t=Nf(e);return function(n){return t.current[n]}}function Pi(e){queueMicrotask(()=>{Sr.flushSync(()=>e())})}var CS=vS(e=>e);function SS(...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 ES(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 Po=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),d=ES(l);return S.cloneElement(l,{...Be(i,l.props),ref:n?SS(n,d):d})}));return t.displayName=e.displayName||e.name,t},RS=()=>{const e=new Map;return new Proxy(Po,{apply(t,r,n){return Po(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,Po(n)),e.get(n)}})},Xe=RS();function PS(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Lr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function d(){var f;const u=S.useContext(l);if(!u&&r){const p=new Error(a??PS(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,d),p}return u}return[l.Provider,d,l]}const[jS,nt]=Lr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),kf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getContentProps({index:r.count}),e);return s.jsx(Xe.div,{...n,ref:t})});kf.displayName="StepsCompletedContent";const Ua=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),Tf=S.forwardRef((e,t)=>{const[r,n]=Ua()(e,["index"]),o=nt(),a=Be(o.getContentProps(r),n);return s.jsx(Xe.div,{...a,ref:t})});Tf.displayName="StepsContent";const[NS,Ha]=Lr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Af=S.forwardRef((e,t)=>{const r=nt(),n=Ha(),o=Be(r.getIndicatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Af.displayName="StepsIndicator";const[kS,mP]=Lr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),_f=S.forwardRef((e,t)=>{const[r,n]=Ua()(e,["index"]),o=nt(),a=Be(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(NS,{value:r,children:s.jsx(kS,{value:i,children:s.jsx(Xe.div,{...a,ref:t})})})});_f.displayName="StepsItem";const If=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getListProps(),e);return s.jsx(Xe.div,{...n,ref:t})});If.displayName="StepsList";const Mf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getNextTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Mf.displayName="StepsNextTrigger";const Of=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getPrevTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Of.displayName="StepsPrevTrigger";var mr=(e,t=[])=>({parts:(...r)=>{if(TS(t))return mr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>mr(e,[...t,...r]),omit:(...r)=>mr(e,t.filter(n=>!r.includes(n))),rename:r=>mr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Vt(e)}"][data-part="${Vt(n)}"]`,`& [data-scope="${Vt(e)}"][data-part="${Vt(n)}"]`].join(", "),attrs:{"data-scope":Vt(e),"data-part":Vt(n)}}}),{})}),Vt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),TS=e=>e.length===0,AS=mr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),ze=AS.build(),_S=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},IS=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},ji=(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}`},MS=(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 OS(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),d=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:ji(i,y.index),contentId:MS(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===d-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},b=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},h=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:d,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:b,resetStep:v,getItemState:g,setStep:h,getRootProps(){return t.element({...ze.root.attrs,id:_S(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const x=z1(d).map((C,E)=>ji(i,E));return t.element({...ze.list.attrs,dir:a("dir"),id:IS(i),role:"tablist","aria-owns":x.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const x=g(y);return t.element({...ze.item.attrs,dir:a("dir"),"aria-current":x.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const x=g(y);return t.button({...ze.trigger.attrs,id:x.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||x.current?0:-1,"aria-selected":x.current,"aria-controls":x.contentId,"data-state":x.current?"open":"closed","data-orientation":a("orientation"),"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const x=g(y);return t.element({...ze.content.attrs,dir:a("dir"),id:x.contentId,role:"tabpanel",tabIndex:0,hidden:!x.current,"data-state":x.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":x.triggerId})},getIndicatorProps(y){const x=g(y);return t.element({...ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete)})},getSeparatorProps(y){const x=g(y);return t.element({...ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete)})},getNextTriggerProps(){return t.button({...ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||b()}})},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":We(u===100)})}}}var DS={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:mS(({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}){$S(t("count"),e.get("step"))}}}},$S=(e,t)=>{if(!oS(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};hS()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[gP,LS]=Lr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[vP,FS]=Lr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function VS(e){const t=S.useId(),{getRootNode:r}=LS(),{dir:n}=FS(),o={id:t,dir:n,getRootNode:r,...e},a=yS(DS,o);return OS(a,CS)}const Df=S.forwardRef((e,t)=>{const[r,n]=Ua()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=VS(r),a=Be(o.getRootProps(),n);return s.jsx(jS,{value:o,children:s.jsx(Xe.div,{...a,ref:t})})});Df.displayName="StepsRoot";const $f=S.forwardRef((e,t)=>{const r=nt(),n=Ha(),o=Be(r.getSeparatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});$f.displayName="StepsSeparator";const Lf=S.forwardRef((e,t)=>{const r=nt(),n=Ha(),o=Be(r.getTriggerProps(n),e);return s.jsx(Xe.button,{...o,ref:t})});Lf.displayName="StepsTrigger";function BS(e){return ku({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 Ff=S.createContext(void 0),GS=({children:e,step:t})=>s.jsx(Ff.Provider,{value:{step:t},children:e}),Vf=()=>{const e=S.useContext(Ff);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},WS=({className:e,step:t,...r})=>{const n=j("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx(GS,{step:t??0,children:s.jsx(Df,{className:n,step:t,...r})})},zS=({className:e,...t})=>{const r=j("flex flex-row gap-4",e);return s.jsx(If,{className:r,...t})},qS=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4",e);return s.jsx(_f,{className:r,...t})},US=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(Lf,{className:r,...t})},HS=({index:e,className:t,...r})=>{const{step:n}=Vf(),o=e===n,a=e<n,i=j("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),l=j({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(Af,{className:i,...r,children:a?s.jsx(BS,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},KS=({index:e,className:t,...r})=>{const{step:n}=Vf(),o=e<n,a=j("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx($f,{className:a,...r})},YS=({className:e,...t})=>{const r=j(e);return s.jsx(Tf,{className:r,...t})},XS=({className:e,...t})=>{const r=j(e);return s.jsx(kf,{className:r,...t})},ZS=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Of,{className:r,...t})},JS=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Mf,{className:r,...t})},QS={Root:WS,List:zS,Item:qS,Trigger:US,Indicator:HS,Separator:KS,Content:YS,CompletedContent:XS,PrevTrigger:ZS,NextTrigger:JS},Fr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Wu,{...r,children:s.jsxs(zu,{children:[s.jsx(qu,{...n,children:e}),t&&s.jsx(Uu,{...o,children:t})]})});/**
|
|
204
|
+
Defaulting to \`null\`.`}var jy=yd,Ny=Cd;function ky({className:e,value:t,...r}){return s.jsx(jy,{"data-slot":"progress",className:j("qodo qodo-progress bg-primary/20 relative h-2 w-full overflow-hidden rounded-full dark:bg-primary/20",e),...r,children:s.jsx(Ny,{"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 Ed({className:e,...t}){return s.jsx("div",{className:j("qodo qodo-skeleton animate-pulse rounded-md bg-neutral-900/10 dark:bg-neutral-50/10",e),...t})}var Vn="Switch",[Ty,lP]=we(Vn),[Ay,_y]=Ty(Vn),Rd=c.forwardRef((e,t)=>{const{__scopeSwitch:r,name:n,checked:o,defaultChecked:a,required:i,disabled:l,value:d="on",onCheckedChange:u,form:f,...p}=e,[g,m]=c.useState(null),b=se(t,C=>m(C)),v=c.useRef(!1),h=g?f||!!g.closest("form"):!0,[y,x]=ye({prop:o,defaultProp:a??!1,onChange:u,caller:Vn});return s.jsxs(Ay,{scope:r,checked:y,disabled:l,children:[s.jsx(H.button,{type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":kd(y),"data-disabled":l?"":void 0,disabled:l,value:d,...p,ref:b,onClick:F(e.onClick,C=>{x(E=>!E),h&&(v.current=C.isPropagationStopped(),v.current||C.stopPropagation())})}),h&&s.jsx(Nd,{control:g,bubbles:!v.current,name:n,value:d,checked:y,required:i,disabled:l,form:f,style:{transform:"translateX(-100%)"}})]})});Rd.displayName=Vn;var Pd="SwitchThumb",jd=c.forwardRef((e,t)=>{const{__scopeSwitch:r,...n}=e,o=_y(Pd,r);return s.jsx(H.span,{"data-state":kd(o.checked),"data-disabled":o.disabled?"":void 0,...n,ref:t})});jd.displayName=Pd;var Iy="SwitchBubbleInput",Nd=c.forwardRef(({__scopeSwitch:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),d=da(r),u=ia(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[d,r,n]),s.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Nd.displayName=Iy;function kd(e){return e?"checked":"unchecked"}var My=Rd,Oy=jd;function Dy({className:e,...t}){return s.jsx(My,{"data-slot":"switch",className:j("qodo qodo-switch peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 dark:data-[state=checked]:bg-primary dark:data-[state=unchecked]:bg-input",e),...t,children:s.jsx(Oy,{"data-slot":"switch-thumb",className:j("bg-background pointer-events-none block size-4 rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground")})})}var Td="Toggle",Ra=c.forwardRef((e,t)=>{const{pressed:r,defaultPressed:n,onPressedChange:o,...a}=e,[i,l]=ye({prop:r,onChange:o,defaultProp:n??!1,caller:Td});return s.jsx(H.button,{type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0,...a,ref:t,onClick:F(e.onClick,()=>{e.disabled||l(!i)})})});Ra.displayName=Td;var $y=Ra;const Ad=wn("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 Ly({className:e,variant:t,size:r,...n}){return s.jsx($y,{"data-slot":"toggle",className:j(Ad({variant:t,size:r,className:e})),...n})}var yo="rovingFocusGroup.onEntryFocus",Fy={bubbles:!1,cancelable:!0},Ir="RovingFocusGroup",[Go,_d,Vy]=En(Ir),[By,gt]=we(Ir,[Vy]),[Gy,Wy]=By(Ir),Id=c.forwardRef((e,t)=>s.jsx(Go.Provider,{scope:e.__scopeRovingFocusGroup,children:s.jsx(Go.Slot,{scope:e.__scopeRovingFocusGroup,children:s.jsx(zy,{...e,ref:t})})}));Id.displayName=Ir;var zy=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:d,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...p}=e,g=c.useRef(null),m=se(t,g),b=Tt(a),[v,h]=ye({prop:i,defaultProp:l??null,onChange:d,caller:Ir}),[y,x]=c.useState(!1),C=De(u),E=_d(r),N=c.useRef(!1),[T,A]=c.useState(0);return c.useEffect(()=>{const P=g.current;if(P)return P.addEventListener(yo,C),()=>P.removeEventListener(yo,C)},[C]),s.jsx(Gy,{scope:r,orientation:n,dir:b,loop:o,currentTabStopId:v,onItemFocus:c.useCallback(P=>h(P),[h]),onItemShiftTab:c.useCallback(()=>x(!0),[]),onFocusableItemAdd:c.useCallback(()=>A(P=>P+1),[]),onFocusableItemRemove:c.useCallback(()=>A(P=>P-1),[]),children:s.jsx(H.div,{tabIndex:y||T===0?-1:0,"data-orientation":n,...p,ref:m,style:{outline:"none",...e.style},onMouseDown:F(e.onMouseDown,()=>{N.current=!0}),onFocus:F(e.onFocus,P=>{const V=!N.current;if(P.target===P.currentTarget&&V&&!y){const U=new CustomEvent(yo,Fy);if(P.currentTarget.dispatchEvent(U),!U.defaultPrevented){const re=E().filter(I=>I.focusable),te=re.find(I=>I.active),Q=re.find(I=>I.id===v),D=[te,Q,...re].filter(Boolean).map(I=>I.ref.current);Dd(D,f)}}N.current=!1}),onBlur:F(e.onBlur,()=>x(!1))})})}),Md="RovingFocusGroupItem",Od=c.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:o=!1,tabStopId:a,children:i,...l}=e,d=me(),u=a||d,f=Wy(Md,r),p=f.currentTabStopId===u,g=_d(r),{onFocusableItemAdd:m,onFocusableItemRemove:b,currentTabStopId:v}=f;return c.useEffect(()=>{if(n)return m(),()=>b()},[n,m,b]),s.jsx(Go.ItemSlot,{scope:r,id:u,focusable:n,active:o,children:s.jsx(H.span,{tabIndex:p?0:-1,"data-orientation":f.orientation,...l,ref:t,onMouseDown:F(e.onMouseDown,h=>{n?f.onItemFocus(u):h.preventDefault()}),onFocus:F(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:F(e.onKeyDown,h=>{if(h.key==="Tab"&&h.shiftKey){f.onItemShiftTab();return}if(h.target!==h.currentTarget)return;const y=Hy(h,f.orientation,f.dir);if(y!==void 0){if(h.metaKey||h.ctrlKey||h.altKey||h.shiftKey)return;h.preventDefault();let C=g().filter(E=>E.focusable).map(E=>E.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const E=C.indexOf(h.currentTarget);C=f.loop?Ky(C,E+1):C.slice(E+1)}setTimeout(()=>Dd(C))}}),children:typeof i=="function"?i({isCurrentTabStop:p,hasTabStop:v!=null}):i})})});Od.displayName=Md;var qy={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Uy(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Hy(e,t,r){const n=Uy(e.key,r);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return qy[n]}function Dd(e,t=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:t}),document.activeElement!==r))return}function Ky(e,t){return e.map((r,n)=>e[(t+n)%e.length])}var Bn=Id,Gn=Od,vt="ToggleGroup",[$d,cP]=we(vt,[gt]),Ld=gt(),Pa=S.forwardRef((e,t)=>{const{type:r,...n}=e;if(r==="single"){const o=n;return s.jsx(Yy,{...o,ref:t})}if(r==="multiple"){const o=n;return s.jsx(Xy,{...o,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${vt}\``)});Pa.displayName=vt;var[Fd,Vd]=$d(vt),Yy=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??"",onChange:o,caller:vt});return s.jsx(Fd,{scope:e.__scopeToggleGroup,type:"single",value:S.useMemo(()=>i?[i]:[],[i]),onItemActivate:l,onItemDeactivate:S.useCallback(()=>l(""),[l]),children:s.jsx(Bd,{...a,ref:t})})}),Xy=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??[],onChange:o,caller:vt}),d=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Fd,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:d,onItemDeactivate:u,children:s.jsx(Bd,{...a,ref:t})})});Pa.displayName=vt;var[Zy,Jy]=$d(vt),Bd=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,disabled:n=!1,rovingFocus:o=!0,orientation:a,dir:i,loop:l=!0,...d}=e,u=Ld(r),f=Tt(i),p={role:"group",dir:f,...d};return s.jsx(Zy,{scope:r,rovingFocus:o,disabled:n,children:o?s.jsx(Bn,{asChild:!0,...u,orientation:a,dir:f,loop:l,children:s.jsx(H.div,{...p,ref:t})}):s.jsx(H.div,{...p,ref:t})})}),fn="ToggleGroupItem",Gd=S.forwardRef((e,t)=>{const r=Vd(fn,e.__scopeToggleGroup),n=Jy(fn,e.__scopeToggleGroup),o=Ld(e.__scopeToggleGroup),a=r.value.includes(e.value),i=n.disabled||e.disabled,l={...e,pressed:a,disabled:i},d=S.useRef(null);return n.rovingFocus?s.jsx(Gn,{asChild:!0,...o,focusable:!i,active:a,ref:d,children:s.jsx(ri,{...l,ref:t})}):s.jsx(ri,{...l,ref:t})});Gd.displayName=fn;var ri=S.forwardRef((e,t)=>{const{__scopeToggleGroup:r,value:n,...o}=e,a=Vd(fn,r),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=a.type==="single"?i:void 0;return s.jsx(Ra,{...l,...o,ref:t,onPressedChange:d=>{d?a.onItemActivate(n):a.onItemDeactivate(n)}})}),Qy=Pa,ew=Gd;const Wd=c.createContext({size:"default",variant:"default"});function tw({className:e,variant:t,size:r,children:n,...o}){return s.jsx(Qy,{"data-slot":"toggle-group","data-variant":t,"data-size":r,className:j("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:s.jsx(Wd.Provider,{value:{variant:t,size:r},children:n})})}function rw({className:e,children:t,variant:r,size:n,...o}){const a=c.useContext(Wd);return s.jsx(ew,{"data-slot":"toggle-group-item","data-variant":a.variant||r,"data-size":a.size||n,className:j(Ad({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 Wn="Collapsible",[nw,zd]=we(Wn),[ow,ja]=nw(Wn),qd=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,open:n,defaultOpen:o,disabled:a,onOpenChange:i,...l}=e,[d,u]=ye({prop:n,defaultProp:o??!1,onChange:i,caller:Wn});return s.jsx(ow,{scope:r,disabled:a,contentId:me(),open:d,onOpenToggle:c.useCallback(()=>u(f=>!f),[u]),children:s.jsx(H.div,{"data-state":ka(d),"data-disabled":a?"":void 0,...l,ref:t})})});qd.displayName=Wn;var Ud="CollapsibleTrigger",Hd=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,...n}=e,o=ja(Ud,r);return s.jsx(H.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":ka(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...n,ref:t,onClick:F(e.onClick,o.onOpenToggle)})});Hd.displayName=Ud;var Na="CollapsibleContent",Kd=c.forwardRef((e,t)=>{const{forceMount:r,...n}=e,o=ja(Na,e.__scopeCollapsible);return s.jsx(Re,{present:r||o.open,children:({present:a})=>s.jsx(aw,{...n,ref:t,present:a})})});Kd.displayName=Na;var aw=c.forwardRef((e,t)=>{const{__scopeCollapsible:r,present:n,children:o,...a}=e,i=ja(Na,r),[l,d]=c.useState(n),u=c.useRef(null),f=se(t,u),p=c.useRef(0),g=p.current,m=c.useRef(0),b=m.current,v=i.open||l,h=c.useRef(v),y=c.useRef(void 0);return c.useEffect(()=>{const x=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(x)},[]),be(()=>{const x=u.current;if(x){y.current=y.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const C=x.getBoundingClientRect();p.current=C.height,m.current=C.width,h.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),d(n)}},[i.open,n]),s.jsx(H.div,{"data-state":ka(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!v,...a,ref:f,style:{"--radix-collapsible-content-height":g?`${g}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:v&&o})});function ka(e){return e?"open":"closed"}var sw=qd,iw=Hd,lw=Kd,Ve="Accordion",cw=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ta,dw,uw]=En(Ve),[zn,dP]=we(Ve,[uw,zd]),Aa=zd(),Yd=S.forwardRef((e,t)=>{const{type:r,...n}=e,o=n,a=n;return s.jsx(Ta.Provider,{scope:e.__scopeAccordion,children:r==="multiple"?s.jsx(gw,{...a,ref:t}):s.jsx(mw,{...o,ref:t})})});Yd.displayName=Ve;var[Xd,fw]=zn(Ve),[Zd,pw]=zn(Ve,{collapsible:!1}),mw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[l,d]=ye({prop:r,defaultProp:n??"",onChange:o,caller:Ve});return s.jsx(Xd,{scope:e.__scopeAccordion,value:S.useMemo(()=>l?[l]:[],[l]),onItemOpen:d,onItemClose:S.useCallback(()=>a&&d(""),[a,d]),children:s.jsx(Zd,{scope:e.__scopeAccordion,collapsible:a,children:s.jsx(Jd,{...i,ref:t})})})}),gw=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o=()=>{},...a}=e,[i,l]=ye({prop:r,defaultProp:n??[],onChange:o,caller:Ve}),d=S.useCallback(f=>l((p=[])=>[...p,f]),[l]),u=S.useCallback(f=>l((p=[])=>p.filter(g=>g!==f)),[l]);return s.jsx(Xd,{scope:e.__scopeAccordion,value:i,onItemOpen:d,onItemClose:u,children:s.jsx(Zd,{scope:e.__scopeAccordion,collapsible:!0,children:s.jsx(Jd,{...a,ref:t})})})}),[vw,qn]=zn(Ve),Jd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,disabled:n,dir:o,orientation:a="vertical",...i}=e,l=S.useRef(null),d=se(l,t),u=dw(r),p=Tt(o)==="ltr",g=F(e.onKeyDown,m=>{var P;if(!cw.includes(m.key))return;const b=m.target,v=u().filter(V=>{var U;return!((U=V.ref.current)!=null&&U.disabled)}),h=v.findIndex(V=>V.ref.current===b),y=v.length;if(h===-1)return;m.preventDefault();let x=h;const C=0,E=y-1,N=()=>{x=h+1,x>E&&(x=C)},T=()=>{x=h-1,x<C&&(x=E)};switch(m.key){case"Home":x=C;break;case"End":x=E;break;case"ArrowRight":a==="horizontal"&&(p?N():T());break;case"ArrowDown":a==="vertical"&&N();break;case"ArrowLeft":a==="horizontal"&&(p?T():N());break;case"ArrowUp":a==="vertical"&&T();break}const A=x%y;(P=v[A].ref.current)==null||P.focus()});return s.jsx(vw,{scope:r,disabled:n,direction:o,orientation:a,children:s.jsx(Ta.Slot,{scope:r,children:s.jsx(H.div,{...i,"data-orientation":a,ref:d,onKeyDown:n?void 0:g})})})}),pn="AccordionItem",[hw,_a]=zn(pn),Qd=S.forwardRef((e,t)=>{const{__scopeAccordion:r,value:n,...o}=e,a=qn(pn,r),i=fw(pn,r),l=Aa(r),d=me(),u=n&&i.value.includes(n)||!1,f=a.disabled||e.disabled;return s.jsx(hw,{scope:r,open:u,disabled:f,triggerId:d,children:s.jsx(sw,{"data-orientation":a.orientation,"data-state":au(u),...l,...o,ref:t,disabled:f,open:u,onOpenChange:p=>{p?i.onItemOpen(n):i.onItemClose(n)}})})});Qd.displayName=pn;var eu="AccordionHeader",tu=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=qn(Ve,r),a=_a(eu,r);return s.jsx(H.h3,{"data-orientation":o.orientation,"data-state":au(a.open),"data-disabled":a.disabled?"":void 0,...n,ref:t})});tu.displayName=eu;var Wo="AccordionTrigger",ru=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=qn(Ve,r),a=_a(Wo,r),i=pw(Wo,r),l=Aa(r);return s.jsx(Ta.ItemSlot,{scope:r,children:s.jsx(iw,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...l,...n,ref:t})})});ru.displayName=Wo;var nu="AccordionContent",ou=S.forwardRef((e,t)=>{const{__scopeAccordion:r,...n}=e,o=qn(Ve,r),a=_a(nu,r),i=Aa(r);return s.jsx(lw,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...n,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});ou.displayName=nu;function au(e){return e?"open":"closed"}var xw=Yd,bw=Qd,yw=tu,ww=ru,Cw=ou;function Sw({...e}){return s.jsx(xw,{"data-slot":"accordion",...e})}function Ew({className:e,...t}){return s.jsx(bw,{"data-slot":"accordion-item",className:j("qodo qodo-accordion-item border-b last:border-b-0 dark:border-border",e),...t})}function Rw({className:e,children:t,...r}){return s.jsx(yw,{className:"flex",children:s.jsxs(ww,{"data-slot":"accordion-trigger",className:j("qodo qodo-accordion-trigger focus-visible:border-ring focus-visible:ring-ring/50 flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium text-foreground transition-all outline-none hover:underline focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180 dark:text-foreground dark:focus-visible:border-ring dark:focus-visible:ring-ring/50",e),...r,children:[t,s.jsx(Cn,{className:"text-muted-foreground pointer-events-none size-4 shrink-0 translate-y-0.5 transition-transform duration-200 dark:text-muted-foreground"})]})})}function Pw({className:e,children:t,...r}){return s.jsx(Cw,{"data-slot":"accordion-content",className:j("qodo qodo-accordion-content","data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm text-foreground dark:text-foreground"),...r,children:s.jsx("div",{className:j("pt-0 pb-4",e),children:t})})}var Un="Tabs",[jw,uP]=we(Un,[gt]),su=gt(),[Nw,Ia]=jw(Un),iu=c.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:l,activationMode:d="automatic",...u}=e,f=Tt(l),[p,g]=ye({prop:n,onChange:o,defaultProp:a??"",caller:Un});return s.jsx(Nw,{scope:r,baseId:me(),value:p,onValueChange:g,orientation:i,dir:f,activationMode:d,children:s.jsx(H.div,{dir:f,"data-orientation":i,...u,ref:t})})});iu.displayName=Un;var lu="TabsList",cu=c.forwardRef((e,t)=>{const{__scopeTabs:r,loop:n=!0,...o}=e,a=Ia(lu,r),i=su(r);return s.jsx(Bn,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:n,children:s.jsx(H.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});cu.displayName=lu;var du="TabsTrigger",uu=c.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,disabled:o=!1,...a}=e,i=Ia(du,r),l=su(r),d=mu(i.baseId,n),u=gu(i.baseId,n),f=n===i.value;return s.jsx(Gn,{asChild:!0,...l,focusable:!o,active:f,children:s.jsx(H.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:d,...a,ref:t,onMouseDown:F(e.onMouseDown,p=>{!o&&p.button===0&&p.ctrlKey===!1?i.onValueChange(n):p.preventDefault()}),onKeyDown:F(e.onKeyDown,p=>{[" ","Enter"].includes(p.key)&&i.onValueChange(n)}),onFocus:F(e.onFocus,()=>{const p=i.activationMode!=="manual";!f&&!o&&p&&i.onValueChange(n)})})})});uu.displayName=du;var fu="TabsContent",pu=c.forwardRef((e,t)=>{const{__scopeTabs:r,value:n,forceMount:o,children:a,...i}=e,l=Ia(fu,r),d=mu(l.baseId,n),u=gu(l.baseId,n),f=n===l.value,p=c.useRef(f);return c.useEffect(()=>{const g=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(g)},[]),s.jsx(Re,{present:o||f,children:({present:g})=>s.jsx(H.div,{"data-state":f?"active":"inactive","data-orientation":l.orientation,role:"tabpanel","aria-labelledby":d,hidden:!g,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:p.current?"0s":void 0},children:g&&a})})});pu.displayName=fu;function mu(e,t){return`${e}-trigger-${t}`}function gu(e,t){return`${e}-content-${t}`}var kw=iu,Tw=cu,Aw=uu,_w=pu;function Iw({className:e,...t}){return s.jsx(kw,{"data-slot":"tabs",className:j("qodo qodo-tabs flex flex-col gap-2",e),...t})}function Mw({className:e,...t}){return s.jsx(Tw,{"data-slot":"tabs-list",className:j("inline-flex w-full items-end justify-start gap-4",e),...t})}function Ow({className:e,...t}){return s.jsx(Aw,{"data-slot":"tabs-trigger",className:j("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 Dw({className:e,...t}){return s.jsx(_w,{"data-slot":"tabs-content",className:j("flex-1 outline-none",e),...t})}var $w=e=>e.type==="checkbox",fr=e=>e instanceof Date,Ma=e=>e==null;const vu=e=>typeof e=="object";var kt=e=>!Ma(e)&&!Array.isArray(e)&&vu(e)&&!fr(e),Lw=e=>kt(e)&&e.target?$w(e.target)?e.target.checked:e.target.value:e,Fw=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vw=(e,t)=>e.has(Fw(t)),Bw=e=>{const t=e.constructor&&e.constructor.prototype;return kt(t)&&t.hasOwnProperty("isPrototypeOf")},Gw=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function hu(e){let t;const r=Array.isArray(e),n=typeof FileList<"u"?e instanceof FileList:!1;if(e instanceof Date)t=new Date(e);else if(!(Gw&&(e instanceof Blob||n))&&(r||kt(e)))if(t=r?[]:Object.create(Object.getPrototypeOf(e)),!r&&!Bw(e))t=e;else for(const o in e)e.hasOwnProperty(o)&&(t[o]=hu(e[o]));else return e;return t}var xu=e=>/^\w*$/.test(e),zo=e=>e===void 0,Ww=e=>Array.isArray(e)?e.filter(Boolean):[],bu=e=>Ww(e.replace(/["|']|\]/g,"").split(/\.|\[/)),je=(e,t,r)=>{if(!t||!kt(e))return r;const n=(xu(t)?[t]:bu(t)).reduce((o,a)=>Ma(o)?o:o[a],e);return zo(n)||n===e?zo(e[t])?r:e[t]:n},wo=e=>typeof e=="boolean",ni=(e,t,r)=>{let n=-1;const o=xu(t)?[t]:bu(t),a=o.length,i=a-1;for(;++n<a;){const l=o[n];let d=r;if(n!==i){const u=e[l];d=kt(u)||Array.isArray(u)?u:isNaN(+o[n+1])?{}:[]}if(l==="__proto__"||l==="constructor"||l==="prototype")return;e[l]=d,e=e[l]}};const oi={BLUR:"blur",CHANGE:"change"},ai={all:"all"},Oa=S.createContext(null);Oa.displayName="HookFormContext";const or=()=>S.useContext(Oa),zw=e=>{const{children:t,...r}=e;return S.createElement(Oa.Provider,{value:r},t)};var qw=(e,t,r,n=!0)=>{const o={defaultValues:t._defaultValues};for(const a in e)Object.defineProperty(o,a,{get:()=>{const i=a;return t._proxyFormState[i]!==ai.all&&(t._proxyFormState[i]=!n||ai.all),r&&(r[i]=!0),e[i]}});return o};const yu=typeof window<"u"?S.useLayoutEffect:S.useEffect;function wu(e){const t=or(),{control:r=t.control,disabled:n,name:o,exact:a}=e||{},[i,l]=S.useState(r._formState),d=S.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,validatingFields:!1,isValidating:!1,isValid:!1,errors:!1});return yu(()=>r._subscribe({name:o,formState:d.current,exact:a,callback:u=>{!n&&l({...r._formState,...u})}}),[o,n,a]),S.useEffect(()=>{d.current.isValid&&r._setValid(!0)},[r]),S.useMemo(()=>qw(i,r,d.current,!1),[i,r])}var Uw=e=>typeof e=="string",Hw=(e,t,r,n,o)=>Uw(e)?je(r,e,o):Array.isArray(e)?e.map(a=>je(r,a)):r,si=e=>Ma(e)||!vu(e);function Cu(e,t,r=new WeakSet){if(si(e)||si(t))return e===t;if(fr(e)&&fr(t))return 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 i=e[a];if(!o.includes(a))return!1;if(a!=="ref"){const l=t[a];if(fr(i)&&fr(l)||kt(i)&&kt(l)||Array.isArray(i)&&Array.isArray(l)?!Cu(i,l,r):i!==l)return!1}}return!0}function Kw(e){const t=or(),{control:r=t.control,name:n,defaultValue:o,disabled:a,exact:i,compute:l}=e||{},d=S.useRef(o),u=S.useRef(l),f=S.useRef(void 0);u.current=l;const p=S.useMemo(()=>r._getWatch(n,d.current),[r,n]),[g,m]=S.useState(u.current?u.current(p):p);return yu(()=>r._subscribe({name:n,formState:{values:!0},exact:i,callback:b=>{if(!a){const v=Hw(n,r._names,b.values||r._formValues,!1,d.current);if(u.current){const h=u.current(v);Cu(h,f.current)||(m(h),f.current=h)}else m(v)}}}),[r,a,n,i]),S.useEffect(()=>r._removeUnmounted()),g}function Yw(e){const t=or(),{name:r,disabled:n,control:o=t.control,shouldUnregister:a,defaultValue:i}=e,l=Vw(o._names.array,r),d=S.useMemo(()=>je(o._formValues,r,je(o._defaultValues,r,i)),[o,r,i]),u=Kw({control:o,name:r,defaultValue:d,exact:!0}),f=wu({control:o,name:r,exact:!0}),p=S.useRef(e),g=S.useRef(o.register(r,{...e.rules,value:u,...wo(e.disabled)?{disabled:e.disabled}:{}}));p.current=e;const m=S.useMemo(()=>Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!je(f.errors,r)},isDirty:{enumerable:!0,get:()=>!!je(f.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!je(f.touchedFields,r)},isValidating:{enumerable:!0,get:()=>!!je(f.validatingFields,r)},error:{enumerable:!0,get:()=>je(f.errors,r)}}),[f,r]),b=S.useCallback(x=>g.current.onChange({target:{value:Lw(x),name:r},type:oi.CHANGE}),[r]),v=S.useCallback(()=>g.current.onBlur({target:{value:je(o._formValues,r),name:r},type:oi.BLUR}),[r,o._formValues]),h=S.useCallback(x=>{const C=je(o._fields,r);C&&x&&(C._f.ref={focus:()=>x.focus&&x.focus(),select:()=>x.select&&x.select(),setCustomValidity:E=>x.setCustomValidity(E),reportValidity:()=>x.reportValidity()})},[o._fields,r]),y=S.useMemo(()=>({name:r,value:u,...wo(n)||f.disabled?{disabled:f.disabled||n}:{},onChange:b,onBlur:v,ref:h}),[r,n,f.disabled,b,v,h,u]);return S.useEffect(()=>{const x=o._options.shouldUnregister||a;o.register(r,{...p.current.rules,...wo(p.current.disabled)?{disabled:p.current.disabled}:{}});const C=(E,N)=>{const T=je(o._fields,E);T&&T._f&&(T._f.mount=N)};if(C(r,!0),x){const E=hu(je(o._options.defaultValues,r));ni(o._defaultValues,r,E),zo(je(o._formValues,r))&&ni(o._formValues,r,E)}return!l&&o.register(r),()=>{(l?x&&!o._state.action:x)?o.unregister(r):C(r,!1)}},[r,o,l,a]),S.useEffect(()=>{o._setDisabledField({disabled:n,name:r})},[n,r,o]),S.useMemo(()=>({field:y,formState:f,fieldState:m}),[y,f,m])}const Su=e=>e.render(Yw(e)),Eu=S.createContext(void 0),Ru=e=>{const{methods:t,disabled:r,readOnly:n,children:o}=e;return s.jsx(Eu.Provider,{value:{disabled:r,readOnly:n},children:s.jsx(zw,{...t,children:o})})},Pu=()=>{const e=S.useContext(Eu),t=or();if(!e||!t)throw new Error("formContext must be used within a FormProvider");return{...e,...t}},Xw=({type:e="button",...t})=>{const r=()=>e==="submit"||e==="reset"?"default":"outline";return s.jsx(Qe,{type:e,variant:r(),...t})};var ju={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},ii=S.createContext&&S.createContext(ju),Zw=["attr","size","title"];function Jw(e,t){if(e==null)return{};var r=Qw(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 Qw(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 mn(){return mn=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},mn.apply(this,arguments)}function li(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 gn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?li(Object(r),!0).forEach(function(n){e0(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):li(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e0(e,t,r){return t=t0(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t0(e){var t=r0(e,"string");return typeof t=="symbol"?t:t+""}function r0(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 Nu(e){return e&&e.map((t,r)=>S.createElement(t.tag,gn({key:r},t.attr),Nu(t.child)))}function ku(e){return t=>S.createElement(n0,mn({attr:gn({},e.attr)},t),Nu(e.child))}function n0(e){var t=r=>{var{attr:n,size:o,title:a}=e,i=Jw(e,Zw),l=o||r.size||"1em",d;return r.className&&(d=r.className),e.className&&(d=(d?d+" ":"")+e.className),S.createElement("svg",mn({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,i,{className:d,style:gn(gn({color:e.color||r.color},r.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&S.createElement("title",null,a),e.children)};return ii!==void 0?S.createElement(ii.Consumer,null,r=>t(r)):t(ju)}function o0(e){return ku({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 a0="Label",Tu=c.forwardRef((e,t)=>s.jsx(H.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())}}));Tu.displayName=a0;var s0=Tu;function Au({className:e,...t}){return s.jsx(s0,{"data-slot":"label",className:j("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 _u=c.createContext({}),i0=({...e})=>s.jsx(_u.Provider,{value:{name:e.name},children:s.jsx(Su,{...e})}),Hn=()=>{const e=c.useContext(_u),t=c.useContext(Iu),{getFieldState:r}=or(),n=wu({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}},Iu=c.createContext({});function l0({className:e,...t}){const r=c.useId();return s.jsx(Iu.Provider,{value:{id:r},children:s.jsx("div",{"data-slot":"form-item",className:j("qodo qodo-form-item grid gap-2",e),...t})})}function c0({className:e,...t}){const{formItemId:r}=Hn();return s.jsx(Au,{"data-slot":"form-label",className:j("data-[error=true]:text-destructive font-normal text-sm",e),htmlFor:r,...t})}function d0({...e}){const{error:t,formItemId:r,formDescriptionId:n,formMessageId:o}=Hn();return s.jsx(Qg,{"data-slot":"form-control",id:r,"aria-describedby":t?`${n} ${o}`:`${n}`,"aria-invalid":!!t,...e})}function u0({className:e,...t}){const{formDescriptionId:r}=Hn();return s.jsx("p",{"data-slot":"form-description",id:r,className:j("text-purple-muted-300 text-sm",e),...t})}function f0({className:e,...t}){const{error:r,formMessageId:n}=Hn(),o=r?String((r==null?void 0:r.message)??""):t.children;return o?s.jsx("p",{"data-slot":"form-message",id:n,className:j("text-destructive text-sm",e),...t,children:o}):null}var[Kn,fP]=we("Tooltip",[ut]),Yn=ut(),Mu="TooltipProvider",p0=700,qo="tooltip.open",[m0,Da]=Kn(Mu),Ou=e=>{const{__scopeTooltip:t,delayDuration:r=p0,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,i=c.useRef(!0),l=c.useRef(!1),d=c.useRef(0);return c.useEffect(()=>{const u=d.current;return()=>window.clearTimeout(u)},[]),s.jsx(m0,{scope:t,isOpenDelayedRef:i,delayDuration:r,onOpen:c.useCallback(()=>{window.clearTimeout(d.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>i.current=!0,n)},[n]),isPointerInTransitRef:l,onPointerInTransitChange:c.useCallback(u=>{l.current=u},[]),disableHoverableContent:o,children:a})};Ou.displayName=Mu;var yr="Tooltip",[g0,Mr]=Kn(yr),Du=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:l}=e,d=Da(yr,e.__scopeTooltip),u=Yn(t),[f,p]=c.useState(null),g=me(),m=c.useRef(0),b=i??d.disableHoverableContent,v=l??d.delayDuration,h=c.useRef(!1),[y,x]=ye({prop:n,defaultProp:o??!1,onChange:A=>{A?(d.onOpen(),document.dispatchEvent(new CustomEvent(qo))):d.onClose(),a==null||a(A)},caller:yr}),C=c.useMemo(()=>y?h.current?"delayed-open":"instant-open":"closed",[y]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,h.current=!1,x(!0)},[x]),N=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),T=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{h.current=!0,x(!0),m.current=0},v)},[v,x]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),s.jsx(Nr,{...u,children:s.jsx(g0,{scope:t,contentId:g,open:y,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{d.isOpenDelayedRef.current?T():E()},[d.isOpenDelayedRef,T,E]),onTriggerLeave:c.useCallback(()=>{b?N():(window.clearTimeout(m.current),m.current=0)},[N,b]),onOpen:E,onClose:N,disableHoverableContent:b,children:r})})};Du.displayName=yr;var Uo="TooltipTrigger",$u=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Mr(Uo,r),a=Da(Uo,r),i=Yn(r),l=c.useRef(null),d=se(t,l,o.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),s.jsx(kr,{asChild:!0,...i,children:s.jsx(H.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:d,onPointerMove:F(e.onPointerMove,g=>{g.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:F(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:F(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:F(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:F(e.onBlur,o.onClose),onClick:F(e.onClick,o.onClose)})})});$u.displayName=Uo;var $a="TooltipPortal",[v0,h0]=Kn($a,{forceMount:void 0}),Lu=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=Mr($a,t);return s.jsx(v0,{scope:t,forceMount:r,children:s.jsx(Re,{present:r||a.open,children:s.jsx(rr,{asChild:!0,container:o,children:n})})})};Lu.displayName=$a;var Xt="TooltipContent",Fu=c.forwardRef((e,t)=>{const r=h0(Xt,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,i=Mr(Xt,e.__scopeTooltip);return s.jsx(Re,{present:n||i.open,children:i.disableHoverableContent?s.jsx(Vu,{side:o,...a,ref:t}):s.jsx(x0,{side:o,...a,ref:t})})}),x0=c.forwardRef((e,t)=>{const r=Mr(Xt,e.__scopeTooltip),n=Da(Xt,e.__scopeTooltip),o=c.useRef(null),a=se(t,o),[i,l]=c.useState(null),{trigger:d,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,g=c.useCallback(()=>{l(null),p(!1)},[p]),m=c.useCallback((b,v)=>{const h=b.currentTarget,y={x:b.clientX,y:b.clientY},x=C0(y,h.getBoundingClientRect()),C=S0(y,x),E=E0(v.getBoundingClientRect()),N=P0([...C,...E]);l(N),p(!0)},[p]);return c.useEffect(()=>()=>g(),[g]),c.useEffect(()=>{if(d&&f){const b=h=>m(h,f),v=h=>m(h,d);return d.addEventListener("pointerleave",b),f.addEventListener("pointerleave",v),()=>{d.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",v)}}},[d,f,m,g]),c.useEffect(()=>{if(i){const b=v=>{const h=v.target,y={x:v.clientX,y:v.clientY},x=(d==null?void 0:d.contains(h))||(f==null?void 0:f.contains(h)),C=!R0(y,i);x?g():C&&(g(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[d,f,i,u,g]),s.jsx(Vu,{...e,ref:a})}),[b0,y0]=Kn(yr,{isInside:!1}),w0=tv("TooltipContent"),Vu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...l}=e,d=Mr(Xt,r),u=Yn(r),{onClose:f}=d;return c.useEffect(()=>(document.addEventListener(qo,f),()=>document.removeEventListener(qo,f)),[f]),c.useEffect(()=>{if(d.trigger){const p=g=>{const m=g.target;m!=null&&m.contains(d.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,f]),s.jsx(Qt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:s.jsxs(Tn,{"data-state":d.stateAttribute,...u,...l,ref:t,style:{...l.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:[s.jsx(w0,{children:n}),s.jsx(b0,{scope:r,isInside:!0,children:s.jsx(Hh,{id:d.contentId,role:"tooltip",children:o||n})})]})})});Fu.displayName=Xt;var Bu="TooltipArrow",Gu=c.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=Yn(r);return y0(Bu,r).isInside?null:s.jsx(An,{...o,...n,ref:t})});Gu.displayName=Bu;function C0(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 S0(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 E0(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 R0(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const l=t[a],d=t[i],u=l.x,f=l.y,p=d.x,g=d.y;f>n!=g>n&&r<(p-u)*(n-f)/(g-f)+u&&(o=!o)}return o}function P0(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),j0(t)}function j0(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],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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],i=r[r.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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 N0=Ou,k0=Du,T0=$u,A0=Lu,_0=Fu,I0=Gu;function Wu({delayDuration:e=0,...t}){return s.jsx(N0,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function zu({...e}){return s.jsx(Wu,{children:s.jsx(k0,{"data-slot":"tooltip",...e})})}function qu({...e}){return s.jsx(T0,{"data-slot":"tooltip-trigger",...e})}function Uu({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return s.jsx(A0,{children:s.jsxs(_0,{"data-slot":"tooltip-content",sideOffset:t,className:j("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&&s.jsx(I0,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const ar=e=>t=>{const{name:r,label:n,description:o,tooltip:a,required:i=!1,...l}=t,{control:d,disabled:u,readOnly:f}=Pu(),p=()=>a?s.jsxs(zu,{children:[s.jsx(qu,{asChild:!0,children:s.jsx("span",{children:s.jsx(o0,{size:16})})}),s.jsx(Uu,{children:s.jsx("p",{children:a})})]}):s.jsx(s.Fragment,{}),g=()=>o?s.jsx(u0,{children:o}):s.jsx(s.Fragment,{});return s.jsx(i0,{control:d,name:r,render:({field:m,fieldState:b})=>s.jsxs(l0,{className:"flex flex-col gap-1.5",children:[n&&s.jsx(c0,{children:s.jsxs("span",{className:"flex items-center gap-1",children:[n,i&&s.jsx("span",{className:"text-purple-muted-300",children:"*"}),!!a&&p()]})}),s.jsx(d0,{children:s.jsx(e,{...m,disabled:u,...l,readOnly:f,error:!!b.error})}),!!o&&g(),s.jsx(f0,{})]})})},M0=S.forwardRef((e,t)=>s.jsx(Rr,{...e,ref:t})),O0=S.forwardRef((e,t)=>ar(M0)({...e,ref:t})),D0=S.forwardRef((e,t)=>{const{options:r=[],onChange:n=()=>{},searchPlaceholder:o,onSearchChange:a,...i}=e,l=d=>{n({target:{value:d}})};return s.jsx(Ca,{ref:t,options:r,onValueChange:l,searchPlaceholder:o,onSearchChange:a,...i})}),$0=ar(D0);var La="Radio",[L0,Hu]=we(La),[F0,V0]=L0(La),Ku=c.forwardRef((e,t)=>{const{__scopeRadio:r,name:n,checked:o=!1,required:a,disabled:i,value:l="on",onCheck:d,form:u,...f}=e,[p,g]=c.useState(null),m=se(t,h=>g(h)),b=c.useRef(!1),v=p?u||!!p.closest("form"):!0;return s.jsxs(F0,{scope:r,checked:o,disabled:i,children:[s.jsx(H.button,{type:"button",role:"radio","aria-checked":o,"data-state":Ju(o),"data-disabled":i?"":void 0,disabled:i,value:l,...f,ref:m,onClick:F(e.onClick,h=>{o||d==null||d(),v&&(b.current=h.isPropagationStopped(),b.current||h.stopPropagation())})}),v&&s.jsx(Zu,{control:p,bubbles:!b.current,name:n,value:l,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Ku.displayName=La;var Yu="RadioIndicator",Xu=c.forwardRef((e,t)=>{const{__scopeRadio:r,forceMount:n,...o}=e,a=V0(Yu,r);return s.jsx(Re,{present:n||a.checked,children:s.jsx(H.span,{"data-state":Ju(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Xu.displayName=Yu;var B0="RadioBubbleInput",Zu=c.forwardRef(({__scopeRadio:e,control:t,checked:r,bubbles:n=!0,...o},a)=>{const i=c.useRef(null),l=se(i,a),d=da(r),u=ia(t);return c.useEffect(()=>{const f=i.current;if(!f)return;const p=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(p,"checked").set;if(d!==r&&m){const b=new Event("click",{bubbles:n});m.call(f,r),f.dispatchEvent(b)}},[d,r,n]),s.jsx(H.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:l,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Zu.displayName=B0;function Ju(e){return e?"checked":"unchecked"}var G0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Xn="RadioGroup",[W0,pP]=we(Xn,[gt,Hu]),Qu=gt(),ef=Hu(),[z0,q0]=W0(Xn),tf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,name:n,defaultValue:o,value:a,required:i=!1,disabled:l=!1,orientation:d,dir:u,loop:f=!0,onValueChange:p,...g}=e,m=Qu(r),b=Tt(u),[v,h]=ye({prop:a,defaultProp:o??null,onChange:p,caller:Xn});return s.jsx(z0,{scope:r,name:n,required:i,disabled:l,value:v,onValueChange:h,children:s.jsx(Bn,{asChild:!0,...m,orientation:d,dir:b,loop:f,children:s.jsx(H.div,{role:"radiogroup","aria-required":i,"aria-orientation":d,"data-disabled":l?"":void 0,dir:b,...g,ref:t})})})});tf.displayName=Xn;var rf="RadioGroupItem",nf=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,disabled:n,...o}=e,a=q0(rf,r),i=a.disabled||n,l=Qu(r),d=ef(r),u=c.useRef(null),f=se(t,u),p=a.value===o.value,g=c.useRef(!1);return c.useEffect(()=>{const m=v=>{G0.includes(v.key)&&(g.current=!0)},b=()=>g.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",b)}},[]),s.jsx(Gn,{asChild:!0,...l,focusable:!i,active:p,children:s.jsx(Ku,{disabled:i,required:a.required,checked:p,...d,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:F(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:F(o.onFocus,()=>{var m;g.current&&((m=u.current)==null||m.click())})})})});nf.displayName=rf;var U0="RadioGroupIndicator",of=c.forwardRef((e,t)=>{const{__scopeRadioGroup:r,...n}=e,o=ef(r);return s.jsx(Xu,{...o,...n,ref:t})});of.displayName=U0;var H0=tf,K0=nf,Y0=of;function X0({className:e,...t}){const{readOnly:r,...n}=t;return s.jsx(H0,{"data-slot":"radio-group","data-readonly":r||void 0,disabled:n.disabled||r,className:j("qodo qodo-radio-group grid gap-3 group",e),...n})}function Z0({className:e,...t}){return s.jsx(K0,{"data-slot":"radio-group-item",className:j("qodo qodo-radio-group-item dark:border-purple-muted-200 dark:text-purple-muted-200 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]","disabled:cursor-not-allowed disabled:opacity-50","group-data-[readonly]:opacity-100 group-data-[readonly]:cursor-default","mt-[2px] mr-0",e),...t,children:s.jsx(Y0,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:s.jsx(jg,{className:"fill-purple-muted-200 absolute top-1/2 left-1/2 size-3 -translate-x-1/2 -translate-y-1/2"})})})}const Fa=S.forwardRef((e,t)=>{const{value:r,defaultValue:n,onValueChange:o,disabled:a=!1,readOnly:i=!1,className:l,direction:d="horizontal",dir:u="ltr",name:f,onChange:p,...g}=e,m=v=>{i||(p==null||p({target:{value:v}}),o==null||o(v))},b=j("qodo qodo-custom-radio-group","flex",{"flex-row gap-6":d==="horizontal","flex-col gap-3":d==="vertical"},l);return s.jsx(X0,{name:f,ref:t,value:r,defaultValue:n,onValueChange:m,disabled:a||i,readOnly:i,className:b,dir:u,...g})});Fa.displayName="BaseRadioGroupComponent";const Va=({value:e="",disabled:t,error:r,name:n="radio",children:o,className:a})=>{const i=`${n}-${e}`;return s.jsxs(Au,{htmlFor:i,className:j("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 hover:bg-muted/50":!t,"opacity-50 !cursor-not-allowed hover:!bg-transparent":t,"border border-destructive":r},a),children:[s.jsx(Z0,{value:e,id:i,disabled:t||r}),o]},e)};Va.displayName="RadioGroupItemComponent";const J0=ar(Fa),Q0=e=>s.jsx("hr",{className:"w-full h-px border-purple-muted-500",...e}),eC=({children:e,description:t,className:r})=>s.jsxs("div",{className:j("space-y-1",r),children:[s.jsx("h2",{className:"flex items-center gap-2.5 text-2xl text-white",children:e}),t&&s.jsx("span",{className:"text-sm text-purple-muted-300",children:t})]}),af=S.forwardRef(({direction:e="horizontal",className:t,...r},n)=>{const o=j("flex flex-row gap-6",{"flex-col":e==="vertical"},t);return s.jsx("div",{ref:n,className:o,...r})});af.displayName="FormGroup";function tC({className:e,rows:t,...r}){return s.jsx("textarea",{"data-slot":"textarea",rows:t,className:j("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-input/30 flex min-h-16 w-full rounded-md border bg-transparent","placeholder:text-purple-muted-400 text-purple-muted-300 shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] 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 rC=S.forwardRef(({variant:e="default",className:t,...r},n)=>{const o=ar(tC);return s.jsx(o,{...r,ref:n,className:j({"font-plex-mono text-sm leading-relaxed rounded dark:bg-fill-input-neutral-idle px-3 py-2 border-0":e==="code"},t)})}),sf=({label:e,id:t,onRemoveTag:r,disabled:n,className:o,variant:a="default"})=>s.jsxs(Yt,{variant:a,disabled:n,size:"sm",className:j("flex items-center gap-1 px-2 py-0.5","font-normal whitespace-nowrap",o),children:[e,r&&s.jsx(Qe,{type:"button",variant:"ghost",size:"icon",className:"p-0 w-[10px] h-[10px] text-inherit disabled:text-inherit",onClick:i=>{i.stopPropagation(),r==null||r(t)},"aria-label":`Remove ${e}`,disabled:n,children:s.jsx(Sn,{className:"w-[10px] h-[10px]"})})]}),nC=({label:e,id:t,onClick:r,onDeleteSuggestion:n,deleteText:o,className:a,tagClassName:i,tagVariant:l})=>s.jsx("div",{onClick:r,className:j("bg-transparent hover:bg-purple-muted-800 rounded-sm py-1 px-2",a),children:s.jsxs("div",{className:"flex w-full items-center justify-between gap-2",children:[s.jsx(sf,{label:e,id:t,className:i,variant:l}),n&&s.jsx(Qe,{type:"button",variant:"ghost",className:"p-0 text-xs font-normal h-[10px]",onMouseDown:d=>d.preventDefault(),onClick:d=>{d.stopPropagation(),n==null||n(t)},"aria-label":`${o} ${e}`,children:o||s.jsx(zg,{className:"h-4 w-4"})})]})}),Co={BACKSPACE:"Backspace",ESCAPE:"Escape",ENTER:"Enter"},oC=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},lf=({value:e=[],variant:t="default",placeholder:r="Type to add a tag...",deleteText:n="Delete",suggestions:o=[],allowCreate:a=!0,maxTags:i=100,disabled:l=!1,className:d,suggestionWrapperClassName:u,suggestionClassName:f,tagClassName:p,tagInputIcon:g,onDeleteSuggestion:m,onBlur:b,normalizeTags:v=oC,onChange:h=()=>{},onAddTag:y=()=>{},onRemoveTag:x=()=>{},onResetTags:C=()=>{}})=>{const[E,N]=S.useState(""),[T,A]=S.useState(!1),P=S.useRef(null),V=S.useRef(null),U=S.useRef(null),[re,te]=S.useState();S.useEffect(()=>{V.current&&te(V.current.offsetWidth)},[]);const Q=e.length>=i,W=L=>{if(Q||e.some(K=>K.id===L.id))return;const _=[...e,L];h(_),y(L)},D=L=>{const _=e.filter(K=>K.id!==L);h(_),x(L)},I=()=>{h==null||h([]),C()},O=L=>{const _=L.target.value;N(_),A(!0)},R=()=>{const L=E.trim().toLowerCase();if(!L)return[];const _=new Set(e.map(K=>K.id));return o.filter(K=>K.label.toLowerCase().includes(L)&&!_.has(K.id))},M=L=>v?v(L):L,B=()=>{const L=E.trim();if(!L)return;const _=M(L);if(!_)return;if(e.some(ee=>ee.id===_)){N(""),A(!1);return}const K=o.find(ee=>ee.id===_||M(ee.label)===_);K?W(K):a&&W({id:_,label:_}),N(""),A(!1)},J=L=>{const _=L.key===Co.BACKSPACE&&!E&&e.length>0,K=L.key===Co.ENTER&&E,ee=L.key===Co.ESCAPE;K?(L.preventDefault(),B(),U.current&&(U.current.scrollLeft=U.current.scrollWidth)):_?D(e[e.length-1].id):ee&&A(!1)},k=()=>{if(E&&R().length>0)return s.jsx(wa,{className:"p-0 border-transparent bg-[var(--fill-interactive-neutral-idle)] gap-2",align:"start",style:{width:re??void 0},onOpenAutoFocus:L=>L.preventDefault(),onCloseAutoFocus:L=>L.preventDefault(),onMouseDown:L=>L.preventDefault(),children:s.jsx("div",{className:j("max-h-[200px] overflow-y-auto flex flex-col gap-1 p-1",u),children:R().map(L=>s.jsx(nC,{label:L.label,id:L.id,onDeleteSuggestion:m,deleteText:n,className:f,tagClassName:p,tagVariant:t,onClick:()=>{var _;W(L),N(""),A(!1),(_=P.current)==null||_.focus()}},L.id))})})},G=()=>g||s.jsx(Gg,{className:"h-4 w-4 stroke-[var(--icon-bg-neutral-mild)]"}),Z=()=>e.map(L=>s.jsx(sf,{label:L.label,id:L.id,onRemoveTag:D,disabled:l,className:p,variant:t},L.id)),z=()=>e.length===0?s.jsx(s.Fragment,{}):s.jsx(Sn,{className:"h-4 w-4 hover:cursor-pointer stroke-[var(--icon-input-neutral-idle)] hover:stroke-[var(--icon-input-neutral-hover)]",onClick:I});return s.jsx("div",{className:j("w-full",d),children:s.jsxs(ba,{open:T&&!l,onOpenChange:A,modal:!1,children:[s.jsx(ya,{className:"w-full",children:s.jsxs("div",{ref:V,tabIndex:-1,className:j("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":l}),onClick:L=>{var _;L.stopPropagation(),A(!0),(_=P.current)==null||_.focus()},children:[G(),s.jsxs("div",{ref:U,className:"flex items-center gap-2 w-full whitespace-normal overflow-x-auto",children:[Z(),s.jsx(Rr,{ref:P,value:E,onChange:O,onClick:L=>L.stopPropagation(),onFocus:()=>A(!0),onBlur:b,onKeyDown:J,placeholder:r,disabled:l||Q,className:j("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")})]}),z()]})}),k()]})})};function aC(e){const{control:t}=or();return s.jsx(Su,{name:e.name,control:t,render:({field:r})=>s.jsx(lf,{...e,value:r.value,onChange:r.onChange,onBlur:r.onBlur})})}const sC=ar(aC),iC=12,ci={SINGLE:"single",MULTIPLE:"multiple"},di={LTR:"ltr"};var cf=typeof global=="object"&&global&&global.Object===Object&&global,lC=typeof self=="object"&&self&&self.Object===Object&&self,ht=cf||lC||Function("return this")(),vn=ht.Symbol,df=Object.prototype,cC=df.hasOwnProperty,dC=df.toString,dr=vn?vn.toStringTag:void 0;function uC(e){var t=cC.call(e,dr),r=e[dr];try{e[dr]=void 0;var n=!0}catch{}var o=dC.call(e);return n&&(t?e[dr]=r:delete e[dr]),o}var fC=Object.prototype,pC=fC.toString;function mC(e){return pC.call(e)}var gC="[object Null]",vC="[object Undefined]",ui=vn?vn.toStringTag:void 0;function Or(e){return e==null?e===void 0?vC:gC:ui&&ui in Object(e)?uC(e):mC(e)}function Ba(e){return e!=null&&typeof e=="object"}var hC=Array.isArray;function uf(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var xC="[object AsyncFunction]",bC="[object Function]",yC="[object GeneratorFunction]",wC="[object Proxy]";function ff(e){if(!uf(e))return!1;var t=Or(e);return t==bC||t==yC||t==xC||t==wC}var So=ht["__core-js_shared__"],fi=(function(){var e=/[^.]+$/.exec(So&&So.keys&&So.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function CC(e){return!!fi&&fi in e}var SC=Function.prototype,EC=SC.toString;function _t(e){if(e!=null){try{return EC.call(e)}catch{}try{return e+""}catch{}}return""}var RC=/[\\^$.*+?()[\]{}|]/g,PC=/^\[object .+?Constructor\]$/,jC=Function.prototype,NC=Object.prototype,kC=jC.toString,TC=NC.hasOwnProperty,AC=RegExp("^"+kC.call(TC).replace(RC,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _C(e){if(!uf(e)||CC(e))return!1;var t=ff(e)?AC:PC;return t.test(_t(e))}function IC(e,t){return e==null?void 0:e[t]}function Dr(e,t){var r=IC(e,t);return _C(r)?r:void 0}var Ho=Dr(ht,"WeakMap"),MC=9007199254740991;function pf(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=MC}function OC(e){return e!=null&&pf(e.length)&&!ff(e)}var DC=Object.prototype;function mf(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||DC;return e===r}var $C="[object Arguments]";function pi(e){return Ba(e)&&Or(e)==$C}var gf=Object.prototype,LC=gf.hasOwnProperty,FC=gf.propertyIsEnumerable,VC=pi((function(){return arguments})())?pi:function(e){return Ba(e)&&LC.call(e,"callee")&&!FC.call(e,"callee")};function BC(){return!1}var vf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,mi=vf&&typeof module=="object"&&module&&!module.nodeType&&module,GC=mi&&mi.exports===vf,gi=GC?ht.Buffer:void 0,WC=gi?gi.isBuffer:void 0,zC=WC||BC,qC="[object Arguments]",UC="[object Array]",HC="[object Boolean]",KC="[object Date]",YC="[object Error]",XC="[object Function]",ZC="[object Map]",JC="[object Number]",QC="[object Object]",e1="[object RegExp]",t1="[object Set]",r1="[object String]",n1="[object WeakMap]",o1="[object ArrayBuffer]",a1="[object DataView]",s1="[object Float32Array]",i1="[object Float64Array]",l1="[object Int8Array]",c1="[object Int16Array]",d1="[object Int32Array]",u1="[object Uint8Array]",f1="[object Uint8ClampedArray]",p1="[object Uint16Array]",m1="[object Uint32Array]",pe={};pe[s1]=pe[i1]=pe[l1]=pe[c1]=pe[d1]=pe[u1]=pe[f1]=pe[p1]=pe[m1]=!0;pe[qC]=pe[UC]=pe[o1]=pe[HC]=pe[a1]=pe[KC]=pe[YC]=pe[XC]=pe[ZC]=pe[JC]=pe[QC]=pe[e1]=pe[t1]=pe[r1]=pe[n1]=!1;function g1(e){return Ba(e)&&pf(e.length)&&!!pe[Or(e)]}function v1(e){return function(t){return e(t)}}var hf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,hr=hf&&typeof module=="object"&&module&&!module.nodeType&&module,h1=hr&&hr.exports===hf,Eo=h1&&cf.process,vi=(function(){try{var e=hr&&hr.require&&hr.require("util").types;return e||Eo&&Eo.binding&&Eo.binding("util")}catch{}})(),hi=vi&&vi.isTypedArray,x1=hi?v1(hi):g1;function b1(e,t){return function(r){return e(t(r))}}var y1=b1(Object.keys,Object),w1=Object.prototype,C1=w1.hasOwnProperty;function S1(e){if(!mf(e))return y1(e);var t=[];for(var r in Object(e))C1.call(e,r)&&r!="constructor"&&t.push(r);return t}var Ko=Dr(ht,"Map"),Yo=Dr(ht,"DataView"),Xo=Dr(ht,"Promise"),Zo=Dr(ht,"Set"),xi="[object Map]",E1="[object Object]",bi="[object Promise]",yi="[object Set]",wi="[object WeakMap]",Ci="[object DataView]",R1=_t(Yo),P1=_t(Ko),j1=_t(Xo),N1=_t(Zo),k1=_t(Ho),Ct=Or;(Yo&&Ct(new Yo(new ArrayBuffer(1)))!=Ci||Ko&&Ct(new Ko)!=xi||Xo&&Ct(Xo.resolve())!=bi||Zo&&Ct(new Zo)!=yi||Ho&&Ct(new Ho)!=wi)&&(Ct=function(e){var t=Or(e),r=t==E1?e.constructor:void 0,n=r?_t(r):"";if(n)switch(n){case R1:return Ci;case P1:return xi;case j1:return bi;case N1:return yi;case k1:return wi}return t});var T1="[object Map]",A1="[object Set]",_1=Object.prototype,I1=_1.hasOwnProperty;function $r(e){if(e==null)return!0;if(OC(e)&&(hC(e)||typeof e=="string"||typeof e.splice=="function"||zC(e)||x1(e)||VC(e)))return!e.length;var t=Ct(e);if(t==T1||t==A1)return!e.size;if(mf(e))return!S1(e).length;for(var r in e)if(I1.call(e,r))return!1;return!0}function Zn(e){return!e.children||e.children.length===0?[e.value]:e.children.flatMap(t=>Zn(t))}function Ga(e){const t=[e.value];return e.children&&e.children.forEach(r=>{t.push(...Ga(r))}),t}function Wa(e,t){return $r(e.children)?!1:Zn(e).every(n=>t.has(n))}function M1(e,t){return $r(e.children)?!1:Zn(e).some(n=>t.has(n))}function xf(e,t){for(const r of e){if(r.value===t)return r;if(r.children){const n=xf(r.children,t);if(n)return n}}return null}function za(e,t){const r=new Map;for(const n of e){const o=t(n);o&&r.set(o[0],o[1]),n.children&&za(n.children,t).forEach((i,l)=>r.set(l,i))}return r}function bf(e,t){e.forEach(r=>{$r(r.children)||(Wa(r,t)?t.add(r.value):t.delete(r.value),r.children&&bf(r.children,t))})}const O1=e=>e?Array.isArray(e)?e:[e]:[],D1=e=>za(e,t=>[t.value,t.label]),$1=e=>za(e,t=>t.icon?[t.value,t.icon]:null);function L1(e,t){Ga(e).forEach(n=>t.delete(n))}function F1(e,t){Ga(e).forEach(n=>t.add(n))}function yf(e,t){const r=new Set(t);return e.flatMap(n=>!$r(n.children)&&n.children?Wa(n,r)?[n.value]:yf(n.children,t):r.has(n.value)?[n.value]:[])}function V1(e){return e&&e>1?e*iC:0}function wf({option:e,selected:t,onSelect:r,nestLevel:n=0,disabled:o=!1,dir:a=di.LTR}){const i=!$r(e.children),l=t.has(e.value),d=`${V1(n)}px`,u=Wa(e,t),p=M1(e,t)&&!u,g=l||u,m=()=>{if(n!==0)return s.jsx(kg,{className:"w-4 text-[var(--text-interactive-neutral-idle)]"})},b=()=>{if(e.icon)return s.jsx("div",{className:"flex-shrink-0 [&>svg]:text-[var(--text-interactive-neutral-idle)]!",children:e.icon})},v=()=>p?s.jsx(Ag,{className:"w-2 h-2 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)]"}):s.jsx(Er,{className:j("h-4 w-4 flex-shrink-0 transition-opacity text-[var(--text-interactive-neutral-idle)] opacity-0",{"opacity-100":g})}),h=()=>{if(i)return e.children.map(x=>s.jsx(wf,{option:x,selected:t,onSelect:r,nestLevel:n+1,dir:a},x.value))},y=()=>s.jsxs("div",{className:j("flex items-center w-full gap-2 flex-row",{"flex-row-reverse":a===di.LTR}),style:{paddingLeft:d},children:[s.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[m(),b(),s.jsx("span",{className:"flex-1 text-[var(--text-interactive-neutral-active)]",children:e.label})]}),v()]});return s.jsxs("div",{children:[s.jsx(od,{disabled:e.disabled||o,onSelect:()=>r(e.value,i),className:j("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)]!",{"bg-[var(--fill-interactive-neutral-idle)]":g}),children:y()}),h()]})}function B1({value:e,options:t=[],onSelect:r,disabled:n=!1,mode:o=ci.SINGLE,placeholder:a="Select...",inputPlaceholder:i="Search...",emptyState:l="No option found.",triggerClassName:d,triggerWrapperClassName:u,badgeClassName:f,badgeVariant:p="text",searchable:g=!1,toggleIcon:m=s.jsx(Cn,{}),dir:b="ltr",...v}){const[h,y]=S.useState(0),[x,C]=S.useState(!1),E=S.useRef(null),N=o===ci.MULTIPLE,[T,A]=S.useState(e!==void 0?e:N?[]:""),P=O1(T),V=new Set(P);S.useEffect(()=>{E.current&&y(E.current.offsetWidth)},[T]);const U=D1(t),re=$1(t);S.useEffect(()=>{e!==void 0&&A(N?e||[]:e||"")},[e,N]);function te(O,R){if(!N){A(O),r==null||r(O),C(!1);return}A(M=>{const B=Array.isArray(M)?M:[],J=new Set(B),k=xf(t,O);if(!k)return B;R?Q(k,J):W(O,J);const G=Array.from(J);return r==null||r(G),G})}function Q(O,R){Zn(O).every(J=>R.has(J))?L1(O,R):F1(O,R)}function W(O,R){R.has(O)?R.delete(O):R.add(O),bf(t,R)}const D=()=>{const O=yf(t,P);return O.length===0?s.jsx(Yt,{variant:p,size:"md",className:j("text-purple-muted-300",f),children:a}):O.map(M=>{const B=re.get(M),J=U.get(M)||M;return s.jsx(Yt,{variant:p,size:"md",className:j("text-[var(--text-bg-neutral-mid)]",f),children:s.jsxs("div",{className:"flex items-center gap-1",children:[B&&s.jsx("div",{className:"flex-shrink-0",children:B}),s.jsx("span",{children:J})]})},M)})},I=()=>{if(g)return s.jsx(ed,{className:"placeholder:text-[var(--text-bg-neutral-mid)] text-[var(--text-interactive-neutral-active)]",placeholder:i})};return s.jsxs(ba,{open:x,onOpenChange:n?void 0:C,children:[s.jsx(ya,{asChild:!0,disabled:n,children:s.jsxs("div",{className:j("flex items-center gap-1.5 justify-between py-1 px-3 w-[100%] border border-[var(--border-interactive-neutral-idle)] bg-[var(--fill-input-neutral-idle)] rounded-sm scrollbar-thin","aria-invalid:!border-destructive aria-invalid:!ring-destructive/20 dark:aria-invalid:!ring-destructive/40",{"cursor-pointer hover:border-[var(--border-input-neutral-hover)] hover:bg-[var(--fill-input-neutral-hover)]":!n,"cursor-not-allowed opacity-75 ":n},u),ref:E,"aria-disabled":n,...v,children:[s.jsx("div",{className:j("flex justify-start text-start w-[100%] whitespace-nowrap overflow-x-auto gap-1.5",d),children:D()}),s.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:m})]})}),s.jsx(wa,{className:"p-0 border bg-[var(--fill-interactive-neutral-idle)] border-[var(--border-interactive-neutral-idle)] [&>svg]:text-purple-muted-300",style:{width:h??"auto"},children:s.jsxs(Qc,{className:"bg-[var(--fill-interactive-neutral-idle)]",children:[I(),s.jsxs(td,{children:[s.jsx(rd,{children:l}),s.jsx(nd,{children:t.map(O=>s.jsx(wf,{disabled:n,option:O,selected:V,onSelect:te,dir:b},O.value))})]})]})})]})}const Cf=S.forwardRef(e=>{const{options:t,onChange:r,readOnly:n,value:o,disabled:a,mode:i,...l}=e,d=u=>{n||r&&r({target:{value:u}})};return s.jsx(B1,{options:t,value:o,disabled:a,...l,onSelect:d,mode:i})});Cf.displayName="BaseSelectComponent";const G1=ar(Cf),Ie=e=>{const{className:t,disabled:r=!1,readOnly:n=!1,methods:o,onSubmit:a=()=>{},...i}=e,{handleSubmit:l}=o,d=j("qodo qodo-form","flex flex-col gap-6",t);return s.jsx(Ru,{methods:o,disabled:r,readOnly:n,children:s.jsx("form",{className:d,onSubmit:l(a),...i})})};Ie.Button=Xw;Ie.Input=O0;Ie.Select=G1;Ie.Combobox=$0;Ie.RadioGroup=J0;Ie.RadioGroupItem=Va;Ie.Group=af;Ie.Textarea=rC;Ie.Divider=Q0;Ie.Title=eC;Ie.TagsInput=sC;function W1(e){return e==null?[]:Array.isArray(e)?e:[e]}var z1=e=>Array.from(Array(e).keys()),Si=e=>(e==null?void 0:e.constructor.name)==="Array",q1=(e,t)=>{if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!qa(e[r],t[r]))return!1;return!0},qa=(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(Si(e)&&Si(t))return q1(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(!qa(e[a],t[a]))return!1}return!0},U1=e=>e!=null&&typeof e=="object",nn=e=>typeof e=="string",pr=e=>typeof e=="function",H1=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),K1=e=>Object.prototype.toString.call(e),Sf=Function.prototype.toString,Y1=Sf.call(Object),X1=e=>{if(!U1(e)||K1(e)!="[object Object]"||Q1(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const r=H1(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Sf.call(r)==Y1},Z1=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,J1=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,Q1=e=>Z1(e)||J1(e),eS=e=>e(),tS=(...e)=>(...t)=>{e.forEach(function(r){r==null||r(...t)})},rS=e=>Number.isNaN(e),nS=e=>rS(e)?0:e,oS=(e,t,r)=>{const n=nS(e),o=n>=t,a=r==null||n<=r;return o&&a};function Ef(e){if(!X1(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]=Ef(o))}return r}function Ei(...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 aS(e,t){if(e==null)throw new Error(t())}var Rf=e=>typeof e=="object"&&e!==null,We=e=>e?"":void 0,sS=9,iS=e=>Rf(e)&&e.nodeType===sS,lS=e=>Rf(e)&&e===e.window;function cS(e){if(!e)return!1;const t=e.getRootNode();return Pf(t)===e}function dS(e){return iS(e)?e:lS(e)?e.document:(e==null?void 0:e.ownerDocument)??document}function Pf(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 uS=(...e)=>e.map(t=>{var r;return(r=t==null?void 0:t.trim)==null?void 0:r.call(t)}).filter(Boolean).join(" "),fS=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Ri=e=>{const t={};let r;for(;r=fS.exec(e);)t[r[1]]=r[2];return t},pS=(e,t)=>{if(nn(e)){if(nn(t))return`${e};${t}`;e=Ri(e)}else nn(t)&&(t=Ri(t));return Object.assign({},e??{},t??{})};function Be(...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]=tS(r[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=uS(t[o],r[o]);continue}if(o==="style"){t[o]=pS(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 mS(e,t,r){let n=[],o;return a=>{const i=e(a);return(i.length!==n.length||i.some((d,u)=>!qa(n[u],d)))&&(n=i,o=t(i,a)),o}}var Wt=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Wt||{}),Ro="__init__";function gS(e){const t=()=>{var i;return((i=e.getRootNode)==null?void 0:i.call(e))??document},r=()=>dS(t());return{...e,getRootNode:t,getDoc:r,getWin:()=>r().defaultView??window,getActiveElement:()=>Pf(t()),isActiveElement:cS,getById:i=>t().getElementById(i)}}function vS(e){return new Proxy({},{get(t,r){return r==="style"?n=>e({style:n}).style:e}})}var hS=()=>e=>Array.from(new Set(e)),jf=typeof globalThis.document<"u"?S.useLayoutEffect:S.useEffect;function hn(e){const t=e().value??e().defaultValue,r=e().isEqual??Object.is,[n]=S.useState(t),[o,a]=S.useState(n),i=e().value!==void 0,l=S.useRef(o);l.current=i?e().value:o;const d=S.useRef(l.current);jf(()=>{d.current=l.current},[o,e().value]);const u=p=>{var b,v;const g=d.current,m=pr(p)?p(g):p;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:m,prev:g}),i||a(m),r(m,g)||(v=(b=e()).onChange)==null||v.call(b,m,g)};function f(){return i?e().value:o}return{initial:n,ref:l,get:f,set(p){(e().sync?Sr.flushSync:eS)(()=>u(p))},invoke(p,g){var m,b;(b=(m=e()).onChange)==null||b.call(m,p,g)},hash(p){var g,m;return((m=(g=e()).hash)==null?void 0:m.call(g,p))??String(p)}}}hn.cleanup=e=>{S.useEffect(()=>e,[])};hn.ref=e=>{const t=S.useRef(e);return{get:()=>t.current,set:r=>{t.current=r}}};function xS(e){const t=S.useRef(e);return{get(r){return t.current[r]},set(r,n){t.current[r]=n}}}var bS=(e,t)=>{const r=S.useRef(!1),n=S.useRef(!1);S.useEffect(()=>{if(r.current&&n.current)return t();n.current=!0},[...(e??[]).map(o=>typeof o=="function"?o():o)]),S.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[])};function yS(e,t={}){var re,te,Q,W;const r=S.useMemo(()=>{const{id:D,ids:I,getRootNode:O}=t;return gS({id:D,ids:I,getRootNode:O})},[t]),n=(...D)=>{e.debug&&console.log(...D)},o=((re=e.props)==null?void 0:re.call(e,{props:Ef(t),scope:r}))??t,a=wS(o),i=(te=e.context)==null?void 0:te.call(e,{prop:a,bindable:hn,scope:r,flush:Pi,getContext(){return d},getComputed(){return N},getRefs(){return v},getEvent(){return m()}}),l=Nf(i),d={get(D){var I;return(I=l.current)==null?void 0:I[D].ref.current},set(D,I){var O;(O=l.current)==null||O[D].set(I)},initial(D){var I;return(I=l.current)==null?void 0:I[D].initial},hash(D){var O,R;const I=(O=l.current)==null?void 0:O[D].get();return(R=l.current)==null?void 0:R[D].hash(I)}},u=S.useRef(new Map),f=S.useRef(null),p=S.useRef(null),g=S.useRef({type:""}),m=()=>({...g.current,current(){return g.current},previous(){return p.current}}),b=()=>({...T,matches(...D){return D.includes(T.ref.current)},hasTag(D){var I,O;return!!((O=(I=e.states[T.ref.current])==null?void 0:I.tags)!=null&&O.includes(D))}}),v=xS(((Q=e.refs)==null?void 0:Q.call(e,{prop:a,context:d}))??{}),h=()=>({state:b(),context:d,event:m(),prop:a,send:U,action:y,guard:x,track:bS,refs:v,computed:N,flush:Pi,scope:r,choose:E}),y=D=>{const I=pr(D)?D(h()):D;if(!I)return;const O=I.map(R=>{var B,J;const M=(J=(B=e.implementations)==null?void 0:B.actions)==null?void 0:J[R];return M||Ei(`[zag-js] No implementation found for action "${JSON.stringify(R)}"`),M});for(const R of O)R==null||R(h())},x=D=>{var I,O;return pr(D)?D(h()):(O=(I=e.implementations)==null?void 0:I.guards)==null?void 0:O[D](h())},C=D=>{const I=pr(D)?D(h()):D;if(!I)return;const O=I.map(M=>{var J,k;const B=(k=(J=e.implementations)==null?void 0:J.effects)==null?void 0:k[M];return B||Ei(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),B}),R=[];for(const M of O){const B=M==null?void 0:M(h());B&&R.push(B)}return()=>R.forEach(M=>M==null?void 0:M())},E=D=>W1(D).find(I=>{let O=!I.guard;return nn(I.guard)?O=!!x(I.guard):pr(I.guard)&&(O=I.guard(h())),O}),N=D=>{aS(e.computed,()=>"[zag-js] No computed object found on machine");const I=e.computed[D];return I({context:d,event:m(),prop:a,refs:v,scope:r,computed:N})},T=hn(()=>({defaultValue:e.initialState({prop:a}),onChange(D,I){var R,M,B,J;if(I){const k=u.current.get(I);k==null||k(),u.current.delete(I)}I&&y((R=e.states[I])==null?void 0:R.exit),y((M=f.current)==null?void 0:M.actions);const O=C((B=e.states[D])==null?void 0:B.effects);if(O&&u.current.set(D,O),I===Ro){y(e.entry);const k=C(e.effects);k&&u.current.set(Ro,k)}y((J=e.states[D])==null?void 0:J.entry)}})),A=S.useRef(void 0),P=S.useRef(Wt.NotStarted);jf(()=>{queueMicrotask(()=>{const O=P.current===Wt.Started;P.current=Wt.Started,n(O?"rehydrating...":"initializing...");const R=A.current??T.initial;T.invoke(R,O?T.get():Ro)});const D=u.current,I=T.ref.current;return()=>{n("unmounting..."),A.current=I,P.current=Wt.Stopped,D.forEach(O=>O==null?void 0:O()),u.current=new Map,f.current=null,queueMicrotask(()=>{y(e.exit)})}},[]);const V=()=>"ref"in T?T.ref.current:T.get(),U=D=>{queueMicrotask(()=>{var J,k;if(P.current!==Wt.Started)return;p.current=g.current,g.current=D;let I=V();const O=((J=e.states[I].on)==null?void 0:J[D.type])??((k=e.on)==null?void 0:k[D.type]),R=E(O);if(!R)return;f.current=R;const M=R.target??I;n("transition",D.type,R.target||I,`(${R.actions})`);const B=M!==I;B?Sr.flushSync(()=>T.set(M)):R.reenter&&!B?T.invoke(I,I):y(R.actions??[])})};return(W=e.watch)==null||W.call(e,h()),{state:b(),send:U,context:d,prop:a,scope:r,refs:v,computed:N,event:m(),getStatus:()=>P.current}}function Nf(e){const t=S.useRef(e);return t.current=e,t}function wS(e){const t=Nf(e);return function(n){return t.current[n]}}function Pi(e){queueMicrotask(()=>{Sr.flushSync(()=>e())})}var CS=vS(e=>e);function SS(...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 ES(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 Po=e=>{const t=S.memo(S.forwardRef((r,n)=>{const{asChild:o,children:a,...i}=r;if(!o)return S.createElement(e,{...i,ref:n},a);if(!S.isValidElement(a))return null;const l=S.Children.only(a),d=ES(l);return S.cloneElement(l,{...Be(i,l.props),ref:n?SS(n,d):d})}));return t.displayName=e.displayName||e.name,t},RS=()=>{const e=new Map;return new Proxy(Po,{apply(t,r,n){return Po(n[0])},get(t,r){const n=r;return e.has(n)||e.set(n,Po(n)),e.get(n)}})},Xe=RS();function PS(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Lr(e={}){const{name:t,strict:r=!0,hookName:n="useContext",providerName:o="Provider",errorMessage:a,defaultValue:i}=e,l=S.createContext(i);l.displayName=t;function d(){var f;const u=S.useContext(l);if(!u&&r){const p=new Error(a??PS(n,o));throw p.name="ContextError",(f=Error.captureStackTrace)==null||f.call(Error,p,d),p}return u}return[l.Provider,d,l]}const[jS,nt]=Lr({name:"StepsContext",hookName:"useStepsContext",providerName:"<StepsProvider />"}),kf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getContentProps({index:r.count}),e);return s.jsx(Xe.div,{...n,ref:t})});kf.displayName="StepsCompletedContent";const Ua=()=>(e,t)=>t.reduce((r,n)=>{const[o,a]=r,i=n;return a[i]!==void 0&&(o[i]=a[i]),delete a[i],[o,a]},[{},{...e}]),Tf=S.forwardRef((e,t)=>{const[r,n]=Ua()(e,["index"]),o=nt(),a=Be(o.getContentProps(r),n);return s.jsx(Xe.div,{...a,ref:t})});Tf.displayName="StepsContent";const[NS,Ha]=Lr({name:"StepsItemPropsContext",hookName:"useStepsItemPropsContext",providerName:"<StepsItemPropsProvider />"}),Af=S.forwardRef((e,t)=>{const r=nt(),n=Ha(),o=Be(r.getIndicatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});Af.displayName="StepsIndicator";const[kS,mP]=Lr({name:"StepsItemContext",hookName:"useStepsItemContext",providerName:"<StepsItem />"}),_f=S.forwardRef((e,t)=>{const[r,n]=Ua()(e,["index"]),o=nt(),a=Be(o.getItemProps(r),n),i=o.getItemState(r);return s.jsx(NS,{value:r,children:s.jsx(kS,{value:i,children:s.jsx(Xe.div,{...a,ref:t})})})});_f.displayName="StepsItem";const If=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getListProps(),e);return s.jsx(Xe.div,{...n,ref:t})});If.displayName="StepsList";const Mf=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getNextTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Mf.displayName="StepsNextTrigger";const Of=S.forwardRef((e,t)=>{const r=nt(),n=Be(r.getPrevTriggerProps(),e);return s.jsx(Xe.button,{...n,ref:t})});Of.displayName="StepsPrevTrigger";var mr=(e,t=[])=>({parts:(...r)=>{if(TS(t))return mr(e,r);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...r)=>mr(e,[...t,...r]),omit:(...r)=>mr(e,t.filter(n=>!r.includes(n))),rename:r=>mr(r,t),keys:()=>t,build:()=>[...new Set(t)].reduce((r,n)=>Object.assign(r,{[n]:{selector:[`&[data-scope="${Vt(e)}"][data-part="${Vt(n)}"]`,`& [data-scope="${Vt(e)}"][data-part="${Vt(n)}"]`].join(", "),attrs:{"data-scope":Vt(e),"data-part":Vt(n)}}}),{})}),Vt=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),TS=e=>e.length===0,AS=mr("steps").parts("root","list","item","trigger","indicator","separator","content","nextTrigger","prevTrigger","progress"),ze=AS.build(),_S=e=>{var t;return((t=e.ids)==null?void 0:t.root)??`steps:${e.id}`},IS=e=>{var t;return((t=e.ids)==null?void 0:t.list)??`steps:${e.id}:list`},ji=(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}`},MS=(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 OS(e,t){const{context:r,send:n,computed:o,prop:a,scope:i}=e,l=r.get("step"),d=a("count"),u=o("percent"),f=o("hasNextStep"),p=o("hasPrevStep"),g=y=>({triggerId:ji(i,y.index),contentId:MS(i,y.index),current:y.index===l,completed:y.index<l,incomplete:y.index>l,index:y.index,first:y.index===0,last:y.index===d-1}),m=()=>{n({type:"STEP.NEXT",src:"next.trigger.click"})},b=()=>{n({type:"STEP.PREV",src:"prev.trigger.click"})},v=()=>{n({type:"STEP.RESET",src:"reset.trigger.click"})},h=y=>{n({type:"STEP.SET",value:y,src:"api.setValue"})};return{value:l,count:d,percent:u,hasNextStep:f,hasPrevStep:p,isCompleted:o("completed"),goToNextStep:m,goToPrevStep:b,resetStep:v,getItemState:g,setStep:h,getRootProps(){return t.element({...ze.root.attrs,id:_S(i),dir:a("dir"),"data-orientation":a("orientation"),style:{"--percent":`${u}%`}})},getListProps(){const x=z1(d).map((C,E)=>ji(i,E));return t.element({...ze.list.attrs,dir:a("dir"),id:IS(i),role:"tablist","aria-owns":x.join(" "),"aria-orientation":a("orientation"),"data-orientation":a("orientation")})},getItemProps(y){const x=g(y);return t.element({...ze.item.attrs,dir:a("dir"),"aria-current":x.current?"step":void 0,"data-orientation":a("orientation")})},getTriggerProps(y){const x=g(y);return t.button({...ze.trigger.attrs,id:x.triggerId,role:"tab",dir:a("dir"),tabIndex:!a("linear")||x.current?0:-1,"aria-selected":x.current,"aria-controls":x.contentId,"data-state":x.current?"open":"closed","data-orientation":a("orientation"),"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete),onClick(C){C.defaultPrevented||a("linear")||n({type:"STEP.SET",value:y.index,src:"trigger.click"})}})},getContentProps(y){const x=g(y);return t.element({...ze.content.attrs,dir:a("dir"),id:x.contentId,role:"tabpanel",tabIndex:0,hidden:!x.current,"data-state":x.current?"open":"closed","data-orientation":a("orientation"),"aria-labelledby":x.triggerId})},getIndicatorProps(y){const x=g(y);return t.element({...ze.indicator.attrs,dir:a("dir"),"aria-hidden":!0,"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete)})},getSeparatorProps(y){const x=g(y);return t.element({...ze.separator.attrs,dir:a("dir"),"data-orientation":a("orientation"),"data-complete":We(x.completed),"data-current":We(x.current),"data-incomplete":We(x.incomplete)})},getNextTriggerProps(){return t.button({...ze.nextTrigger.attrs,dir:a("dir"),type:"button",disabled:!f,onClick(y){y.defaultPrevented||m()}})},getPrevTriggerProps(){return t.button({dir:a("dir"),...ze.prevTrigger.attrs,type:"button",disabled:!p,onClick(y){y.defaultPrevented||b()}})},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":We(u===100)})}}}var DS={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:mS(({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}){$S(t("count"),e.get("step"))}}}},$S=(e,t)=>{if(!oS(t,0,e))throw new RangeError(`[zag-js/steps] step index ${t} is out of bounds`)};hS()(["count","dir","getRootNode","id","ids","linear","onStepChange","onStepComplete","orientation","step","defaultStep"]);const[gP,LS]=Lr({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[vP,FS]=Lr({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}});function VS(e){const t=S.useId(),{getRootNode:r}=LS(),{dir:n}=FS(),o={id:t,dir:n,getRootNode:r,...e},a=yS(DS,o);return OS(a,CS)}const Df=S.forwardRef((e,t)=>{const[r,n]=Ua()(e,["defaultStep","id","ids","count","linear","onStepChange","onStepComplete","orientation","step"]),o=VS(r),a=Be(o.getRootProps(),n);return s.jsx(jS,{value:o,children:s.jsx(Xe.div,{...a,ref:t})})});Df.displayName="StepsRoot";const $f=S.forwardRef((e,t)=>{const r=nt(),n=Ha(),o=Be(r.getSeparatorProps(n),e);return s.jsx(Xe.div,{...o,ref:t})});$f.displayName="StepsSeparator";const Lf=S.forwardRef((e,t)=>{const r=nt(),n=Ha(),o=Be(r.getTriggerProps(n),e);return s.jsx(Xe.button,{...o,ref:t})});Lf.displayName="StepsTrigger";function BS(e){return ku({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 Ff=S.createContext(void 0),GS=({children:e,step:t})=>s.jsx(Ff.Provider,{value:{step:t},children:e}),Vf=()=>{const e=S.useContext(Ff);if(!e)throw new Error("useSteps must be used within a StepsProvider");return e},WS=({className:e,step:t,...r})=>{const n=j("qodo qodo-steps","flex flex-col gap-4",e);return s.jsx(GS,{step:t??0,children:s.jsx(Df,{className:n,step:t,...r})})},zS=({className:e,...t})=>{const r=j("flex flex-row gap-4",e);return s.jsx(If,{className:r,...t})},qS=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4",e);return s.jsx(_f,{className:r,...t})},US=({className:e,...t})=>{const r=j("flex flex-row items-center gap-4 text-purple-muted-100 text-sm",e);return s.jsx(Lf,{className:r,...t})},HS=({index:e,className:t,...r})=>{const{step:n}=Vf(),o=e===n,a=e<n,i=j("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),l=j({"text-white":o,"text-purple-muted-300":!a&&e!==n});return s.jsx(Af,{className:i,...r,children:a?s.jsx(BS,{className:"text-green-400"}):s.jsx("span",{className:l,children:e+1})})},KS=({index:e,className:t,...r})=>{const{step:n}=Vf(),o=e<n,a=j("min-w-12 h-px",o?"bg-green-400":"bg-gray-400",t);return s.jsx($f,{className:a,...r})},YS=({className:e,...t})=>{const r=j(e);return s.jsx(Tf,{className:r,...t})},XS=({className:e,...t})=>{const r=j(e);return s.jsx(kf,{className:r,...t})},ZS=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Of,{className:r,...t})},JS=({className:e,...t})=>{const r=j("bg-primary text-white px-4 py-2 rounded-md",e);return s.jsx(Mf,{className:r,...t})},QS={Root:WS,List:zS,Item:qS,Trigger:US,Indicator:HS,Separator:KS,Content:YS,CompletedContent:XS,PrevTrigger:ZS,NextTrigger:JS},Fr=({children:e,content:t,providerProps:r={},triggerProps:n={},contentProps:o={}})=>s.jsx(Wu,{...r,children:s.jsxs(zu,{children:[s.jsx(qu,{...n,children:e}),t&&s.jsx(Uu,{...o,children:t})]})});/**
|
|
205
205
|
* react-table
|
|
206
206
|
*
|
|
207
207
|
* Copyright (c) TanStack
|