@kaitranntt/ccs 6.1.0-dev.6 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/VERSION +1 -1
- package/config/base-agy.settings.json +1 -1
- package/dist/cliproxy/model-config.d.ts.map +1 -1
- package/dist/cliproxy/model-config.js +28 -1
- package/dist/cliproxy/model-config.js.map +1 -1
- package/dist/ui/assets/accounts-BfRSUzvC.js +1 -0
- package/dist/ui/assets/analytics-ClDxRP9x.js +64 -0
- package/dist/ui/assets/api-DyJHhCv0.js +1 -0
- package/dist/ui/assets/{card-Chzj_-Ta.js → card-CrGAcUkx.js} +1 -1
- package/dist/ui/assets/cliproxy-Zr4pFy6O.js +1 -0
- package/dist/ui/assets/{cliproxy-control-panel-krYbmMtS.js → cliproxy-control-panel-Cu7DgEPx.js} +1 -1
- package/dist/ui/assets/{code-editor-CbTiomDl.js → code-editor-D0YjMRQO.js} +2 -2
- package/dist/ui/assets/{form-utils-BXvNPyud.js → form-utils-CKETQmt9.js} +1 -1
- package/dist/ui/assets/health-Rretog4H.js +1 -0
- package/dist/ui/assets/icons-D6DaLbNh.js +1 -0
- package/dist/ui/assets/index-B2PFll-u.js +46 -0
- package/dist/ui/assets/index-DTVwRqgB.css +1 -0
- package/dist/ui/assets/radix-ui-Bhyw9pC9.js +51 -0
- package/dist/ui/assets/{react-vendor-DMek_JCF.js → react-vendor-DadlvKzT.js} +1 -1
- package/dist/ui/assets/settings-B7OFU9lZ.js +1 -0
- package/dist/ui/assets/shared-qGCa7mu2.js +1 -0
- package/dist/ui/assets/{tanstack-yybD444-.js → tanstack-DZ3a6J0N.js} +1 -1
- package/dist/ui/index.html +7 -10
- package/package.json +1 -1
- package/dist/ui/assets/accounts-D4Or2xry.js +0 -1
- package/dist/ui/assets/analytics-I6l81S4I.js +0 -1
- package/dist/ui/assets/api-CQ-OQQhY.js +0 -1
- package/dist/ui/assets/charts-D_0N6JY8.js +0 -64
- package/dist/ui/assets/cliproxy-_MtZm4Ql.js +0 -1
- package/dist/ui/assets/code-highlight-C2TXE0-z.js +0 -3
- package/dist/ui/assets/health-BbQJHxJ8.js +0 -1
- package/dist/ui/assets/icons-D6zYxEB8.js +0 -1
- package/dist/ui/assets/index-B6Z8UW9Q.js +0 -44
- package/dist/ui/assets/index-CrdQwfsG.css +0 -1
- package/dist/ui/assets/notifications-cqk-Qeo2.js +0 -1
- package/dist/ui/assets/radix-ui-VbLlN_Dz.js +0 -51
- package/dist/ui/assets/settings-KpHgRrbY.js +0 -1
- package/dist/ui/assets/shared-CXuFWO_D.js +0 -1
- package/dist/ui/assets/utils-CzKF5WmX.js +0 -1
- package/dist/ui/logos/claudekit-logo.png +0 -0
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import{r as i,R as Hn,a as Wt,b as Sa,c as Ne}from"./react-vendor-DMek_JCF.js";var gn={exports:{}},nt={};var Co;function Ea(){if(Co)return nt;Co=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(o,r,s){var a=null;if(s!==void 0&&(a=""+s),r.key!==void 0&&(a=""+r.key),"key"in r){s={};for(var c in r)c!=="key"&&(s[c]=r[c])}else s=r;return r=s.ref,{$$typeof:e,type:o,key:a,ref:r!==void 0?r:null,props:s}}return nt.Fragment=t,nt.jsx=n,nt.jsxs=n,nt}var So;function Ra(){return So||(So=1,gn.exports=Ea()),gn.exports}var p=Ra();function Eo(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function we(...e){return t=>{let n=!1;const o=e.map(r=>{const s=Eo(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r<o.length;r++){const s=o[r];typeof s=="function"?s():Eo(e[r],null)}}}}function j(...e){return i.useCallback(we(...e),e)}var Pa=Symbol.for("react.lazy"),_t=Hn[" use ".trim().toString()];function Aa(e){return typeof e=="object"&&e!==null&&"then"in e}function Jo(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===Pa&&"_payload"in e&&Aa(e._payload)}function Un(e){const t=Ta(e),n=i.forwardRef((o,r)=>{let{children:s,...a}=o;Jo(s)&&typeof _t=="function"&&(s=_t(s._payload));const c=i.Children.toArray(s),l=c.find(Ia);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var vh=Un("Slot");function Ta(e){const t=i.forwardRef((n,o)=>{let{children:r,...s}=n;if(Jo(r)&&typeof _t=="function"&&(r=_t(r._payload)),i.isValidElement(r)){const a=Ma(r),c=Oa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _a=Symbol("radix.slottable");function Ia(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_a}function Oa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ma(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Da=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Na=Da.reduce((e,t)=>{const n=Un(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),La="Separator",Ro="horizontal",ja=["horizontal","vertical"],Qo=i.forwardRef((e,t)=>{const{decorative:n,orientation:o=Ro,...r}=e,s=ka(o)?o:Ro,c=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(Na.div,{"data-orientation":s,...c,...r,ref:t})});Qo.displayName=La;function ka(e){return ja.includes(e)}var mh=Qo;function R(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function $a(e,t){const n=i.createContext(t),o=s=>{const{children:a,...c}=s,l=i.useMemo(()=>c,Object.values(c));return p.jsx(n.Provider,{value:l,children:a})};o.displayName=e+"Provider";function r(s){const a=i.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function Q(e,t=[]){let n=[];function o(s,a){const c=i.createContext(a),l=n.length;n=[...n,a];const u=f=>{const{scope:h,children:m,...w}=f,v=h?.[e]?.[l]||c,g=i.useMemo(()=>w,Object.values(w));return p.jsx(v.Provider,{value:g,children:m})};u.displayName=s+"Provider";function d(f,h){const m=h?.[e]?.[l]||c,w=i.useContext(m);if(w)return w;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[u,d]}const r=()=>{const s=n.map(a=>i.createContext(a));return function(c){const l=c?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...c,[e]:l}}),[c,l])}};return r.scopeName=e,[o,Fa(r,...t)]}function Fa(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const a=o.reduce((c,{useScope:l,scopeName:u})=>{const f=l(s)[`__scope${u}`];return{...c,...f}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var z=globalThis?.document?i.useLayoutEffect:()=>{},Wa=Hn[" useId ".trim().toString()]||(()=>{}),Ba=0;function ne(e){const[t,n]=i.useState(Wa());return z(()=>{n(o=>o??String(Ba++))},[e]),t?`radix-${t}`:""}var Va=Hn[" useInsertionEffect ".trim().toString()]||z;function me({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,a]=Ha({defaultProp:t,onChange:n}),c=e!==void 0,l=c?e:r;{const d=i.useRef(e!==void 0);i.useEffect(()=>{const f=d.current;f!==c&&console.warn(`${o} is changing from ${f?"controlled":"uncontrolled"} to ${c?"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.`),d.current=c},[c,o])}const u=i.useCallback(d=>{if(c){const f=Ua(d)?d(e):d;f!==e&&a.current?.(f)}else s(d)},[c,e,s,a]);return[l,u]}function Ha({defaultProp:e,onChange:t}){const[n,o]=i.useState(e),r=i.useRef(n),s=i.useRef(t);return Va(()=>{s.current=t},[t]),i.useEffect(()=>{r.current!==n&&(s.current?.(n),r.current=n)},[n,r]),[n,o,s]}function Ua(e){return typeof e=="function"}function Ga(e){const t=Ka(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Ya);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Ka(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=qa(r),c=Xa(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var za=Symbol("radix.slottable");function Ya(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===za}function Xa(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function qa(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Za=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],D=Za.reduce((e,t)=>{const n=Ga(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function er(e,t){e&&Wt.flushSync(()=>e.dispatchEvent(t))}function X(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}function Ja(e,t=globalThis?.document){const n=X(e);i.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var Qa="DismissableLayer",Tn="dismissableLayer.update",ec="dismissableLayer.pointerDownOutside",tc="dismissableLayer.focusOutside",Po,tr=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ze=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:a,onDismiss:c,...l}=e,u=i.useContext(tr),[d,f]=i.useState(null),h=d?.ownerDocument??globalThis?.document,[,m]=i.useState({}),w=j(t,E=>f(E)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v.indexOf(g),x=d?v.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,C=x>=y,S=rc(E=>{const _=E.target,I=[...u.branches].some(O=>O.contains(_));!C||I||(r?.(E),a?.(E),E.defaultPrevented||c?.())},h),A=sc(E=>{const _=E.target;[...u.branches].some(O=>O.contains(_))||(s?.(E),a?.(E),E.defaultPrevented||c?.())},h);return Ja(E=>{x===u.layers.size-1&&(o?.(E),!E.defaultPrevented&&c&&(E.preventDefault(),c()))},h),i.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Po=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ao(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Po)}},[d,h,n,u]),i.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ao())},[d,u]),i.useEffect(()=>{const E=()=>m({});return document.addEventListener(Tn,E),()=>document.removeEventListener(Tn,E)},[]),p.jsx(D.div,{...l,ref:w,style:{pointerEvents:b?C?"auto":"none":void 0,...e.style},onFocusCapture:R(e.onFocusCapture,A.onFocusCapture),onBlurCapture:R(e.onBlurCapture,A.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,S.onPointerDownCapture)})});Ze.displayName=Qa;var nc="DismissableLayerBranch",oc=i.forwardRef((e,t)=>{const n=i.useContext(tr),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(D.div,{...e,ref:r})});oc.displayName=nc;function rc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1),r=i.useRef(()=>{});return i.useEffect(()=>{const s=c=>{if(c.target&&!o.current){let l=function(){nr(ec,n,u,{discrete:!0})};const u={originalEvent:c};c.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function sc(e,t=globalThis?.document){const n=X(e),o=i.useRef(!1);return i.useEffect(()=>{const r=s=>{s.target&&!o.current&&nr(tc,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Ao(){const e=new CustomEvent(Tn);document.dispatchEvent(e)}function nr(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?er(r,s):r.dispatchEvent(s)}var wn="focusScope.autoFocusOnMount",yn="focusScope.autoFocusOnUnmount",To={bubbles:!1,cancelable:!0},ic="FocusScope",ut=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...a}=e,[c,l]=i.useState(null),u=X(r),d=X(s),f=i.useRef(null),h=j(t,v=>l(v)),m=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let v=function(b){if(m.paused||!c)return;const C=b.target;c.contains(C)?f.current=C:Pe(f.current,{select:!0})},g=function(b){if(m.paused||!c)return;const C=b.relatedTarget;C!==null&&(c.contains(C)||Pe(f.current,{select:!0}))},y=function(b){if(document.activeElement===document.body)for(const S of b)S.removedNodes.length>0&&Pe(c)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const x=new MutationObserver(y);return c&&x.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),x.disconnect()}}},[o,c,m.paused]),i.useEffect(()=>{if(c){Io.add(m);const v=document.activeElement;if(!c.contains(v)){const y=new CustomEvent(wn,To);c.addEventListener(wn,u),c.dispatchEvent(y),y.defaultPrevented||(ac(fc(or(c)),{select:!0}),document.activeElement===v&&Pe(c))}return()=>{c.removeEventListener(wn,u),setTimeout(()=>{const y=new CustomEvent(yn,To);c.addEventListener(yn,d),c.dispatchEvent(y),y.defaultPrevented||Pe(v??document.body,{select:!0}),c.removeEventListener(yn,d),Io.remove(m)},0)}}},[c,u,d,m]);const w=i.useCallback(v=>{if(!n&&!o||m.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,y=document.activeElement;if(g&&y){const x=v.currentTarget,[b,C]=cc(x);b&&C?!v.shiftKey&&y===C?(v.preventDefault(),n&&Pe(b,{select:!0})):v.shiftKey&&y===b&&(v.preventDefault(),n&&Pe(C,{select:!0})):y===x&&v.preventDefault()}},[n,o,m.paused]);return p.jsx(D.div,{tabIndex:-1,...a,ref:h,onKeyDown:w})});ut.displayName=ic;function ac(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(Pe(o,{select:t}),document.activeElement!==n)return}function cc(e){const t=or(e),n=_o(t,e),o=_o(t.reverse(),e);return[n,o]}function or(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function _o(e,t){for(const n of e)if(!lc(n,{upTo:t}))return n}function lc(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 uc(e){return e instanceof HTMLInputElement&&"select"in e}function Pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&uc(e)&&t&&e.select()}}var Io=dc();function dc(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Oo(e,t),e.unshift(t)},remove(t){e=Oo(e,t),e[0]?.resume()}}}function Oo(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function fc(e){return e.filter(t=>t.tagName!=="A")}var pc="Portal",Je=i.forwardRef((e,t)=>{const{container:n,...o}=e,[r,s]=i.useState(!1);z(()=>s(!0),[]);const a=n||r&&globalThis?.document?.body;return a?Sa.createPortal(p.jsx(D.div,{...o,ref:t}),a):null});Je.displayName=pc;function hc(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var Y=e=>{const{present:t,children:n}=e,o=vc(t),r=typeof n=="function"?n({present:o.isPresent}):i.Children.only(n),s=j(o.ref,mc(r));return typeof n=="function"||o.isPresent?i.cloneElement(r,{ref:s}):null};Y.displayName="Presence";function vc(e){const[t,n]=i.useState(),o=i.useRef(null),r=i.useRef(e),s=i.useRef("none"),a=e?"mounted":"unmounted",[c,l]=hc(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const u=xt(o.current);s.current=c==="mounted"?u:"none"},[c]),z(()=>{const u=o.current,d=r.current;if(d!==e){const h=s.current,m=xt(u);e?l("MOUNT"):m==="none"||u?.display==="none"?l("UNMOUNT"):l(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),z(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,f=m=>{const v=xt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&v&&(l("ANIMATION_END"),!r.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},h=m=>{m.target===t&&(s.current=xt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:i.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function xt(e){return e?.animationName||"none"}function mc(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var xn=0;function Bt(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Mo()),document.body.insertAdjacentElement("beforeend",e[1]??Mo()),xn++,()=>{xn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),xn--}},[])}function Mo(){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 pe=function(){return pe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o<r;o++){n=arguments[o];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},pe.apply(this,arguments)};function rr(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]]);return n}function gc(e,t,n){if(n||arguments.length===2)for(var o=0,r=t.length,s;o<r;o++)(s||!(o in t))&&(s||(s=Array.prototype.slice.call(t,0,o)),s[o]=t[o]);return e.concat(s||Array.prototype.slice.call(t))}var Pt="right-scroll-bar-position",At="width-before-scroll-bar",wc="with-scroll-bars-hidden",yc="--removed-body-scroll-bar-size";function bn(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function xc(e,t){var n=i.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(o){var r=n.value;r!==o&&(n.value=o,n.callback(o,r))}}}})[0];return n.callback=t,n.facade}var bc=typeof window<"u"?i.useLayoutEffect:i.useEffect,Do=new WeakMap;function Cc(e,t){var n=xc(null,function(o){return e.forEach(function(r){return bn(r,o)})});return bc(function(){var o=Do.get(n);if(o){var r=new Set(o),s=new Set(e),a=n.current;r.forEach(function(c){s.has(c)||bn(c,null)}),s.forEach(function(c){r.has(c)||bn(c,a)})}Do.set(n,e)},[e]),n}function Sc(e){return e}function Ec(e,t){t===void 0&&(t=Sc);var n=[],o=!1,r={read:function(){if(o)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,o);return n.push(a),function(){n=n.filter(function(c){return c!==a})}},assignSyncMedium:function(s){for(o=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){o=!0;var a=[];if(n.length){var c=n;n=[],c.forEach(s),a=n}var l=function(){var d=a;a=[],d.forEach(s)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(d){a.push(d),u()},filter:function(d){return a=a.filter(d),n}}}};return r}function Rc(e){e===void 0&&(e={});var t=Ec(null);return t.options=pe({async:!0,ssr:!1},e),t}var sr=function(e){var t=e.sideCar,n=rr(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=t.read();if(!o)throw new Error("Sidecar medium not found");return i.createElement(o,pe({},n))};sr.isSideCarExport=!0;function Pc(e,t){return e.useMedium(t),sr}var ir=Rc(),Cn=function(){},Vt=i.forwardRef(function(e,t){var n=i.useRef(null),o=i.useState({onScrollCapture:Cn,onWheelCapture:Cn,onTouchMoveCapture:Cn}),r=o[0],s=o[1],a=e.forwardProps,c=e.children,l=e.className,u=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,w=e.noIsolation,v=e.inert,g=e.allowPinchZoom,y=e.as,x=y===void 0?"div":y,b=e.gapMode,C=rr(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=h,A=Cc([n,t]),E=pe(pe({},C),r);return i.createElement(i.Fragment,null,d&&i.createElement(S,{sideCar:ir,removeScrollBar:u,shards:f,noRelative:m,noIsolation:w,inert:v,setCallbacks:s,allowPinchZoom:!!g,lockRef:n,gapMode:b}),a?i.cloneElement(i.Children.only(c),pe(pe({},E),{ref:A})):i.createElement(x,pe({},E,{className:l,ref:A}),c))});Vt.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vt.classNames={fullWidth:At,zeroRight:Pt};var Ac=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tc(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ac();return t&&e.setAttribute("nonce",t),e}function _c(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Ic(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Oc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tc())&&(_c(t,n),Ic(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Mc=function(){var e=Oc();return function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ar=function(){var e=Mc(),t=function(n){var o=n.styles,r=n.dynamic;return e(o,r),null};return t},Dc={left:0,top:0,right:0,gap:0},Sn=function(e){return parseInt(e||"",10)||0},Nc=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],o=t[e==="padding"?"paddingTop":"marginTop"],r=t[e==="padding"?"paddingRight":"marginRight"];return[Sn(n),Sn(o),Sn(r)]},Lc=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Dc;var t=Nc(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},jc=ar(),Ue="data-scroll-locked",kc=function(e,t,n,o){var r=e.left,s=e.top,a=e.right,c=e.gap;return n===void 0&&(n="margin"),`
|
|
2
|
-
.`.concat(wc,` {
|
|
3
|
-
overflow: hidden `).concat(o,`;
|
|
4
|
-
padding-right: `).concat(c,"px ").concat(o,`;
|
|
5
|
-
}
|
|
6
|
-
body[`).concat(Ue,`] {
|
|
7
|
-
overflow: hidden `).concat(o,`;
|
|
8
|
-
overscroll-behavior: contain;
|
|
9
|
-
`).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&`
|
|
10
|
-
padding-left: `.concat(r,`px;
|
|
11
|
-
padding-top: `).concat(s,`px;
|
|
12
|
-
padding-right: `).concat(a,`px;
|
|
13
|
-
margin-left:0;
|
|
14
|
-
margin-top:0;
|
|
15
|
-
margin-right: `).concat(c,"px ").concat(o,`;
|
|
16
|
-
`),n==="padding"&&"padding-right: ".concat(c,"px ").concat(o,";")].filter(Boolean).join(""),`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.`).concat(Pt,` {
|
|
20
|
-
right: `).concat(c,"px ").concat(o,`;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.`).concat(At,` {
|
|
24
|
-
margin-right: `).concat(c,"px ").concat(o,`;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.`).concat(Pt," .").concat(Pt,` {
|
|
28
|
-
right: 0 `).concat(o,`;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(At," .").concat(At,` {
|
|
32
|
-
margin-right: 0 `).concat(o,`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
body[`).concat(Ue,`] {
|
|
36
|
-
`).concat(yc,": ").concat(c,`px;
|
|
37
|
-
}
|
|
38
|
-
`)},No=function(){var e=parseInt(document.body.getAttribute(Ue)||"0",10);return isFinite(e)?e:0},$c=function(){i.useEffect(function(){return document.body.setAttribute(Ue,(No()+1).toString()),function(){var e=No()-1;e<=0?document.body.removeAttribute(Ue):document.body.setAttribute(Ue,e.toString())}},[])},Fc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;$c();var s=i.useMemo(function(){return Lc(r)},[r]);return i.createElement(jc,{styles:kc(s,!t,r,n?"":"!important")})},_n=!1;if(typeof window<"u")try{var bt=Object.defineProperty({},"passive",{get:function(){return _n=!0,!0}});window.addEventListener("test",bt,bt),window.removeEventListener("test",bt,bt)}catch{_n=!1}var Be=_n?{passive:!1}:!1,Wc=function(e){return e.tagName==="TEXTAREA"},cr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Wc(e)&&n[t]==="visible")},Bc=function(e){return cr(e,"overflowY")},Vc=function(e){return cr(e,"overflowX")},Lo=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=lr(e,o);if(r){var s=ur(e,o),a=s[1],c=s[2];if(a>c)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},Hc=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},Uc=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},lr=function(e,t){return e==="v"?Bc(t):Vc(t)},ur=function(e,t){return e==="v"?Hc(t):Uc(t)},Gc=function(e,t){return e==="h"&&t==="rtl"?-1:1},Kc=function(e,t,n,o,r){var s=Gc(e,window.getComputedStyle(t).direction),a=s*o,c=n.target,l=t.contains(c),u=!1,d=a>0,f=0,h=0;do{if(!c)break;var m=ur(e,c),w=m[0],v=m[1],g=m[2],y=v-g-s*w;(w||y)&&lr(e,c)&&(f+=y,h+=w);var x=c.parentNode;c=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&c!==document.body||l&&(t.contains(c)||t===c));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(u=!0),u},Ct=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jo=function(e){return[e.deltaX,e.deltaY]},ko=function(e){return e&&"current"in e?e.current:e},zc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yc=function(e){return`
|
|
39
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
40
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
41
|
-
`)},Xc=0,Ve=[];function qc(e){var t=i.useRef([]),n=i.useRef([0,0]),o=i.useRef(),r=i.useState(Xc++)[0],s=i.useState(ar)[0],a=i.useRef(e);i.useEffect(function(){a.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var v=gc([e.lockRef.current],(e.shards||[]).map(ko),!0).filter(Boolean);return v.forEach(function(g){return g.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),v.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var c=i.useCallback(function(v,g){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var y=Ct(v),x=n.current,b="deltaX"in v?v.deltaX:x[0]-y[0],C="deltaY"in v?v.deltaY:x[1]-y[1],S,A=v.target,E=Math.abs(b)>Math.abs(C)?"h":"v";if("touches"in v&&E==="h"&&A.type==="range")return!1;var _=window.getSelection(),I=_&&_.anchorNode,O=I?I===A||I.contains(A):!1;if(O)return!1;var L=Lo(E,A);if(!L)return!0;if(L?S=E:(S=E==="v"?"h":"v",L=Lo(E,A)),!L)return!1;if(!o.current&&"changedTouches"in v&&(b||C)&&(o.current=S),!S)return!0;var $=o.current||S;return Kc($,g,v,$==="h"?b:C)},[]),l=i.useCallback(function(v){var g=v;if(!(!Ve.length||Ve[Ve.length-1]!==s)){var y="deltaY"in g?jo(g):Ct(g),x=t.current.filter(function(S){return S.name===g.type&&(S.target===g.target||g.target===S.shadowParent)&&zc(S.delta,y)})[0];if(x&&x.should){g.cancelable&&g.preventDefault();return}if(!x){var b=(a.current.shards||[]).map(ko).filter(Boolean).filter(function(S){return S.contains(g.target)}),C=b.length>0?c(g,b[0]):!a.current.noIsolation;C&&g.cancelable&&g.preventDefault()}}},[]),u=i.useCallback(function(v,g,y,x){var b={name:v,delta:g,target:y,should:x,shadowParent:Zc(y)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(C){return C!==b})},1)},[]),d=i.useCallback(function(v){n.current=Ct(v),o.current=void 0},[]),f=i.useCallback(function(v){u(v.type,jo(v),v.target,c(v,e.lockRef.current))},[]),h=i.useCallback(function(v){u(v.type,Ct(v),v.target,c(v,e.lockRef.current))},[]);i.useEffect(function(){return Ve.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Be),document.addEventListener("touchmove",l,Be),document.addEventListener("touchstart",d,Be),function(){Ve=Ve.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,Be),document.removeEventListener("touchmove",l,Be),document.removeEventListener("touchstart",d,Be)}},[]);var m=e.removeScrollBar,w=e.inert;return i.createElement(i.Fragment,null,w?i.createElement(s,{styles:Yc(r)}):null,m?i.createElement(Fc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Zc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Jc=Pc(ir,qc);var dt=i.forwardRef(function(e,t){return i.createElement(Vt,pe({},e,{ref:t,sideCar:Jc}))});dt.classNames=Vt.classNames;var Qc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},He=new WeakMap,St=new WeakMap,Et={},En=0,dr=function(e){return e&&(e.host||dr(e.parentNode))},el=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=dr(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},tl=function(e,t,n,o){var r=el(t,Array.isArray(e)?e:[e]);Et[n]||(Et[n]=new WeakMap);var s=Et[n],a=[],c=new Set,l=new Set(r),u=function(f){!f||c.has(f)||(c.add(f),u(f.parentNode))};r.forEach(u);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(c.has(h))d(h);else try{var m=h.getAttribute(o),w=m!==null&&m!=="false",v=(He.get(h)||0)+1,g=(s.get(h)||0)+1;He.set(h,v),s.set(h,g),a.push(h),v===1&&w&&St.set(h,!0),g===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(y){console.error("aria-hidden: cannot operate on ",h,y)}})};return d(t),c.clear(),En++,function(){a.forEach(function(f){var h=He.get(f)-1,m=s.get(f)-1;He.set(f,h),s.set(f,m),h||(St.has(f)||f.removeAttribute(o),St.delete(f)),m||f.removeAttribute(n)}),En--,En||(He=new WeakMap,He=new WeakMap,St=new WeakMap,Et={})}},Ht=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=Qc(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live], script"))),tl(o,r,n,"aria-hidden")):function(){return null}};function nl(e){const t=ol(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(sl);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function ol(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=al(r),c=il(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rl=Symbol("radix.slottable");function sl(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rl}function il(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function al(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ut="Dialog",[fr,pr]=Q(Ut),[cl,fe]=fr(Ut),hr=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!0}=e,c=i.useRef(null),l=i.useRef(null),[u,d]=me({prop:o,defaultProp:r??!1,onChange:s,caller:Ut});return p.jsx(cl,{scope:t,triggerRef:c,contentRef:l,contentId:ne(),titleId:ne(),descriptionId:ne(),open:u,onOpenChange:d,onOpenToggle:i.useCallback(()=>d(f=>!f),[d]),modal:a,children:n})};hr.displayName=Ut;var vr="DialogTrigger",mr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(vr,n),s=j(t,r.triggerRef);return p.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":zn(r.open),...o,ref:s,onClick:R(e.onClick,r.onOpenToggle)})});mr.displayName=vr;var Gn="DialogPortal",[ll,gr]=fr(Gn,{forceMount:void 0}),wr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=fe(Gn,t);return p.jsx(ll,{scope:t,forceMount:n,children:i.Children.map(o,a=>p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:a})}))})};wr.displayName=Gn;var It="DialogOverlay",yr=i.forwardRef((e,t)=>{const n=gr(It,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=fe(It,e.__scopeDialog);return s.modal?p.jsx(Y,{present:o||s.open,children:p.jsx(dl,{...r,ref:t})}):null});yr.displayName=It;var ul=nl("DialogOverlay.RemoveScroll"),dl=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(It,n);return p.jsx(dt,{as:ul,allowPinchZoom:!0,shards:[r.contentRef],children:p.jsx(D.div,{"data-state":zn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Le="DialogContent",xr=i.forwardRef((e,t)=>{const n=gr(Le,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=fe(Le,e.__scopeDialog);return p.jsx(Y,{present:o||s.open,children:s.modal?p.jsx(fl,{...r,ref:t}):p.jsx(pl,{...r,ref:t})})});xr.displayName=Le;var fl=i.forwardRef((e,t)=>{const n=fe(Le,e.__scopeDialog),o=i.useRef(null),r=j(t,n.contentRef,o);return i.useEffect(()=>{const s=o.current;if(s)return Ht(s)},[]),p.jsx(br,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0;(a.button===2||c)&&s.preventDefault()}),onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault())})}),pl=i.forwardRef((e,t)=>{const n=fe(Le,e.__scopeDialog),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(br,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),br=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...a}=e,c=fe(Le,n),l=i.useRef(null),u=j(t,l);return Bt(),p.jsxs(p.Fragment,{children:[p.jsx(ut,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ze,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":zn(c.open),...a,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(vl,{titleId:c.titleId}),p.jsx(gl,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Kn="DialogTitle",Cr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(Kn,n);return p.jsx(D.h2,{id:r.titleId,...o,ref:t})});Cr.displayName=Kn;var Sr="DialogDescription",Er=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(Sr,n);return p.jsx(D.p,{id:r.descriptionId,...o,ref:t})});Er.displayName=Sr;var Rr="DialogClose",Pr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=fe(Rr,n);return p.jsx(D.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});Pr.displayName=Rr;function zn(e){return e?"open":"closed"}var Ar="DialogTitleWarning",[hl,Tr]=$a(Ar,{contentName:Le,titleName:Kn,docsSlug:"dialog"}),vl=({titleId:e})=>{const t=Tr(Ar),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
42
|
-
|
|
43
|
-
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
44
|
-
|
|
45
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return i.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},ml="DialogDescriptionWarning",gl=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Tr(ml).contentName}}.`;return i.useEffect(()=>{const r=e.current?.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},wl=hr,yl=mr,xl=wr,bl=yr,Cl=xr,Sl=Cr,El=Er,_r=Pr;const Rl=["top","right","bottom","left"],Ae=Math.min,te=Math.max,Ot=Math.round,Rt=Math.floor,ve=e=>({x:e,y:e}),Pl={left:"right",right:"left",bottom:"top",top:"bottom"},Al={start:"end",end:"start"};function In(e,t,n){return te(e,Ae(t,n))}function Se(e,t){return typeof e=="function"?e(t):e}function Ee(e){return e.split("-")[0]}function Qe(e){return e.split("-")[1]}function Yn(e){return e==="x"?"y":"x"}function Xn(e){return e==="y"?"height":"width"}const Tl=new Set(["top","bottom"]);function he(e){return Tl.has(Ee(e))?"y":"x"}function qn(e){return Yn(he(e))}function _l(e,t,n){n===void 0&&(n=!1);const o=Qe(e),r=qn(e),s=Xn(r);let a=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=Mt(a)),[a,Mt(a)]}function Il(e){const t=Mt(e);return[On(e),t,On(t)]}function On(e){return e.replace(/start|end/g,t=>Al[t])}const $o=["left","right"],Fo=["right","left"],Ol=["top","bottom"],Ml=["bottom","top"];function Dl(e,t,n){switch(e){case"top":case"bottom":return n?t?Fo:$o:t?$o:Fo;case"left":case"right":return t?Ol:Ml;default:return[]}}function Nl(e,t,n,o){const r=Qe(e);let s=Dl(Ee(e),n==="start",o);return r&&(s=s.map(a=>a+"-"+r),t&&(s=s.concat(s.map(On)))),s}function Mt(e){return e.replace(/left|right|bottom|top/g,t=>Pl[t])}function Ll(e){return{top:0,right:0,bottom:0,left:0,...e}}function Ir(e){return typeof e!="number"?Ll(e):{top:e,right:e,bottom:e,left:e}}function Dt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function Wo(e,t,n){let{reference:o,floating:r}=e;const s=he(t),a=qn(t),c=Xn(a),l=Ee(t),u=s==="y",d=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,h=o[c]/2-r[c]/2;let m;switch(l){case"top":m={x:d,y:o.y-r.height};break;case"bottom":m={x:d,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:f};break;case"left":m={x:o.x-r.width,y:f};break;default:m={x:o.x,y:o.y}}switch(Qe(t)){case"start":m[a]-=h*(n&&u?-1:1);break;case"end":m[a]+=h*(n&&u?-1:1);break}return m}const jl=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:a}=n,c=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:r}),{x:d,y:f}=Wo(u,o,l),h=o,m={},w=0;for(let v=0;v<c.length;v++){const{name:g,fn:y}=c[v],{x,y:b,data:C,reset:S}=await y({x:d,y:f,initialPlacement:o,placement:h,strategy:r,middlewareData:m,rects:u,platform:a,elements:{reference:e,floating:t}});d=x??d,f=b??f,m={...m,[g]:{...m[g],...C}},S&&w<=50&&(w++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(u=S.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:r}):S.rects),{x:d,y:f}=Wo(u,h,l)),v=-1)}return{x:d,y:f,placement:h,strategy:r,middlewareData:m}};async function st(e,t){var n;t===void 0&&(t={});const{x:o,y:r,platform:s,rects:a,elements:c,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=Se(t,e),w=Ir(m),g=c[h?f==="floating"?"reference":"floating":f],y=Dt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(g)))==null||n?g:g.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:u,rootBoundary:d,strategy:l})),x=f==="floating"?{x:o,y:r,width:a.floating.width,height:a.floating.height}:a.reference,b=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),C=await(s.isElement==null?void 0:s.isElement(b))?await(s.getScale==null?void 0:s.getScale(b))||{x:1,y:1}:{x:1,y:1},S=Dt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:b,strategy:l}):x);return{top:(y.top-S.top+w.top)/C.y,bottom:(S.bottom-y.bottom+w.bottom)/C.y,left:(y.left-S.left+w.left)/C.x,right:(S.right-y.right+w.right)/C.x}}const kl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:a,elements:c,middlewareData:l}=t,{element:u,padding:d=0}=Se(e,t)||{};if(u==null)return{};const f=Ir(d),h={x:n,y:o},m=qn(r),w=Xn(m),v=await a.getDimensions(u),g=m==="y",y=g?"top":"left",x=g?"bottom":"right",b=g?"clientHeight":"clientWidth",C=s.reference[w]+s.reference[m]-h[m]-s.floating[w],S=h[m]-s.reference[m],A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u));let E=A?A[b]:0;(!E||!await(a.isElement==null?void 0:a.isElement(A)))&&(E=c.floating[b]||s.floating[w]);const _=C/2-S/2,I=E/2-v[w]/2-1,O=Ae(f[y],I),L=Ae(f[x],I),$=O,F=E-v[w]-L,k=E/2-v[w]/2+_,B=In($,k,F),N=!l.arrow&&Qe(r)!=null&&k!==B&&s.reference[w]/2-(k<$?O:L)-v[w]/2<0,W=N?k<$?k-$:k-F:0;return{[m]:h[m]+W,data:{[m]:B,centerOffset:k-B-W,...N&&{alignmentOffset:W}},reset:N}}}),$l=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,o;const{placement:r,middlewareData:s,rects:a,initialPlacement:c,platform:l,elements:u}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:v=!0,...g}=Se(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const y=Ee(r),x=he(c),b=Ee(c)===c,C=await(l.isRTL==null?void 0:l.isRTL(u.floating)),S=h||(b||!v?[Mt(c)]:Il(c)),A=w!=="none";!h&&A&&S.push(...Nl(c,v,w,C));const E=[c,...S],_=await st(t,g),I=[];let O=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&I.push(_[y]),f){const k=_l(r,a,C);I.push(_[k[0]],_[k[1]])}if(O=[...O,{placement:r,overflows:I}],!I.every(k=>k<=0)){var L,$;const k=(((L=s.flip)==null?void 0:L.index)||0)+1,B=E[k];if(B&&(!(f==="alignment"?x!==he(B):!1)||O.every(M=>he(M.placement)===x?M.overflows[0]>0:!0)))return{data:{index:k,overflows:O},reset:{placement:B}};let N=($=O.filter(W=>W.overflows[0]<=0).sort((W,M)=>W.overflows[1]-M.overflows[1])[0])==null?void 0:$.placement;if(!N)switch(m){case"bestFit":{var F;const W=(F=O.filter(M=>{if(A){const P=he(M.placement);return P===x||P==="y"}return!0}).map(M=>[M.placement,M.overflows.filter(P=>P>0).reduce((P,G)=>P+G,0)]).sort((M,P)=>M[1]-P[1])[0])==null?void 0:F[0];W&&(N=W);break}case"initialPlacement":N=c;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function Bo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vo(e){return Rl.some(t=>e[t]>=0)}const Fl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=Se(e,t);switch(o){case"referenceHidden":{const s=await st(t,{...r,elementContext:"reference"}),a=Bo(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:Vo(a)}}}case"escaped":{const s=await st(t,{...r,altBoundary:!0}),a=Bo(s,n.floating);return{data:{escapedOffsets:a,escaped:Vo(a)}}}default:return{}}}}},Or=new Set(["left","top"]);async function Wl(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),a=Ee(n),c=Qe(n),l=he(n)==="y",u=Or.has(a)?-1:1,d=s&&l?-1:1,f=Se(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:w}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof w=="number"&&(m=c==="end"?w*-1:w),l?{x:m*d,y:h*u}:{x:h*u,y:m*d}}const Bl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:a,middlewareData:c}=t,l=await Wl(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:a}}}}},Vl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:a=!1,limiter:c={fn:g=>{let{x:y,y:x}=g;return{x:y,y:x}}},...l}=Se(e,t),u={x:n,y:o},d=await st(t,l),f=he(Ee(r)),h=Yn(f);let m=u[h],w=u[f];if(s){const g=h==="y"?"top":"left",y=h==="y"?"bottom":"right",x=m+d[g],b=m-d[y];m=In(x,m,b)}if(a){const g=f==="y"?"top":"left",y=f==="y"?"bottom":"right",x=w+d[g],b=w-d[y];w=In(x,w,b)}const v=c.fn({...t,[h]:m,[f]:w});return{...v,data:{x:v.x-n,y:v.y-o,enabled:{[h]:s,[f]:a}}}}}},Hl=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:a}=t,{offset:c=0,mainAxis:l=!0,crossAxis:u=!0}=Se(e,t),d={x:n,y:o},f=he(r),h=Yn(f);let m=d[h],w=d[f];const v=Se(c,t),g=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const b=h==="y"?"height":"width",C=s.reference[h]-s.floating[b]+g.mainAxis,S=s.reference[h]+s.reference[b]-g.mainAxis;m<C?m=C:m>S&&(m=S)}if(u){var y,x;const b=h==="y"?"width":"height",C=Or.has(Ee(r)),S=s.reference[f]-s.floating[b]+(C&&((y=a.offset)==null?void 0:y[f])||0)+(C?0:g.crossAxis),A=s.reference[f]+s.reference[b]+(C?0:((x=a.offset)==null?void 0:x[f])||0)-(C?g.crossAxis:0);w<S?w=S:w>A&&(w=A)}return{[h]:m,[f]:w}}}},Ul=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:a,elements:c}=t,{apply:l=()=>{},...u}=Se(e,t),d=await st(t,u),f=Ee(r),h=Qe(r),m=he(r)==="y",{width:w,height:v}=s.floating;let g,y;f==="top"||f==="bottom"?(g=f,y=h===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(y=f,g=h==="end"?"top":"bottom");const x=v-d.top-d.bottom,b=w-d.left-d.right,C=Ae(v-d[g],x),S=Ae(w-d[y],b),A=!t.middlewareData.shift;let E=C,_=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=b),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(E=x),A&&!h){const O=te(d.left,0),L=te(d.right,0),$=te(d.top,0),F=te(d.bottom,0);m?_=w-2*(O!==0||L!==0?O+L:te(d.left,d.right)):E=v-2*($!==0||F!==0?$+F:te(d.top,d.bottom))}await l({...t,availableWidth:_,availableHeight:E});const I=await a.getDimensions(c.floating);return w!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function Gt(){return typeof window<"u"}function et(e){return Mr(e)?(e.nodeName||"").toLowerCase():"#document"}function oe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ye(e){var t;return(t=(Mr(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Mr(e){return Gt()?e instanceof Node||e instanceof oe(e).Node:!1}function ue(e){return Gt()?e instanceof Element||e instanceof oe(e).Element:!1}function ge(e){return Gt()?e instanceof HTMLElement||e instanceof oe(e).HTMLElement:!1}function Ho(e){return!Gt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof oe(e).ShadowRoot}const Gl=new Set(["inline","contents"]);function ft(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=de(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!Gl.has(r)}const Kl=new Set(["table","td","th"]);function zl(e){return Kl.has(et(e))}const Yl=[":popover-open",":modal"];function Kt(e){return Yl.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xl=["transform","translate","scale","rotate","perspective"],ql=["transform","translate","scale","rotate","perspective","filter"],Zl=["paint","layout","strict","content"];function Zn(e){const t=Jn(),n=ue(e)?de(e):e;return Xl.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||ql.some(o=>(n.willChange||"").includes(o))||Zl.some(o=>(n.contain||"").includes(o))}function Jl(e){let t=Te(e);for(;ge(t)&&!ze(t);){if(Zn(t))return t;if(Kt(t))return null;t=Te(t)}return null}function Jn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ql=new Set(["html","body","#document"]);function ze(e){return Ql.has(et(e))}function de(e){return oe(e).getComputedStyle(e)}function zt(e){return ue(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Te(e){if(et(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ho(e)&&e.host||ye(e);return Ho(t)?t.host:t}function Dr(e){const t=Te(e);return ze(t)?e.ownerDocument?e.ownerDocument.body:e.body:ge(t)&&ft(t)?t:Dr(t)}function it(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=Dr(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),a=oe(r);if(s){const c=Mn(a);return t.concat(a,a.visualViewport||[],ft(r)?r:[],c&&n?it(c):[])}return t.concat(r,it(r,[],n))}function Mn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Nr(e){const t=de(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ge(e),s=r?e.offsetWidth:n,a=r?e.offsetHeight:o,c=Ot(n)!==s||Ot(o)!==a;return c&&(n=s,o=a),{width:n,height:o,$:c}}function Qn(e){return ue(e)?e:e.contextElement}function Ge(e){const t=Qn(e);if(!ge(t))return ve(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=Nr(t);let a=(s?Ot(n.width):n.width)/o,c=(s?Ot(n.height):n.height)/r;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const eu=ve(0);function Lr(e){const t=oe(e);return!Jn()||!t.visualViewport?eu:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function tu(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==oe(e)?!1:t}function je(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=Qn(e);let a=ve(1);t&&(o?ue(o)&&(a=Ge(o)):a=Ge(e));const c=tu(s,n,o)?Lr(s):ve(0);let l=(r.left+c.x)/a.x,u=(r.top+c.y)/a.y,d=r.width/a.x,f=r.height/a.y;if(s){const h=oe(s),m=o&&ue(o)?oe(o):o;let w=h,v=Mn(w);for(;v&&o&&m!==w;){const g=Ge(v),y=v.getBoundingClientRect(),x=de(v),b=y.left+(v.clientLeft+parseFloat(x.paddingLeft))*g.x,C=y.top+(v.clientTop+parseFloat(x.paddingTop))*g.y;l*=g.x,u*=g.y,d*=g.x,f*=g.y,l+=b,u+=C,w=oe(v),v=Mn(w)}}return Dt({width:d,height:f,x:l,y:u})}function Yt(e,t){const n=zt(e).scrollLeft;return t?t.left+n:je(ye(e)).left+n}function jr(e,t){const n=e.getBoundingClientRect(),o=n.left+t.scrollLeft-Yt(e,n),r=n.top+t.scrollTop;return{x:o,y:r}}function nu(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",a=ye(o),c=t?Kt(t.floating):!1;if(o===a||c&&s)return n;let l={scrollLeft:0,scrollTop:0},u=ve(1);const d=ve(0),f=ge(o);if((f||!f&&!s)&&((et(o)!=="body"||ft(a))&&(l=zt(o)),ge(o))){const m=je(o);u=Ge(o),d.x=m.x+o.clientLeft,d.y=m.y+o.clientTop}const h=a&&!f&&!s?jr(a,l):ve(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+d.x+h.x,y:n.y*u.y-l.scrollTop*u.y+d.y+h.y}}function ou(e){return Array.from(e.getClientRects())}function ru(e){const t=ye(e),n=zt(e),o=e.ownerDocument.body,r=te(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=te(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let a=-n.scrollLeft+Yt(e);const c=-n.scrollTop;return de(o).direction==="rtl"&&(a+=te(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:a,y:c}}const Uo=25;function su(e,t){const n=oe(e),o=ye(e),r=n.visualViewport;let s=o.clientWidth,a=o.clientHeight,c=0,l=0;if(r){s=r.width,a=r.height;const d=Jn();(!d||d&&t==="fixed")&&(c=r.offsetLeft,l=r.offsetTop)}const u=Yt(o);if(u<=0){const d=o.ownerDocument,f=d.body,h=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,w=Math.abs(o.clientWidth-f.clientWidth-m);w<=Uo&&(s-=w)}else u<=Uo&&(s+=u);return{width:s,height:a,x:c,y:l}}const iu=new Set(["absolute","fixed"]);function au(e,t){const n=je(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ge(e)?Ge(e):ve(1),a=e.clientWidth*s.x,c=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:a,height:c,x:l,y:u}}function Go(e,t,n){let o;if(t==="viewport")o=su(e,n);else if(t==="document")o=ru(ye(e));else if(ue(t))o=au(t,n);else{const r=Lr(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return Dt(o)}function kr(e,t){const n=Te(e);return n===t||!ue(n)||ze(n)?!1:de(n).position==="fixed"||kr(n,t)}function cu(e,t){const n=t.get(e);if(n)return n;let o=it(e,[],!1).filter(c=>ue(c)&&et(c)!=="body"),r=null;const s=de(e).position==="fixed";let a=s?Te(e):e;for(;ue(a)&&!ze(a);){const c=de(a),l=Zn(a);!l&&c.position==="fixed"&&(r=null),(s?!l&&!r:!l&&c.position==="static"&&!!r&&iu.has(r.position)||ft(a)&&!l&&kr(e,a))?o=o.filter(d=>d!==a):r=c,a=Te(a)}return t.set(e,o),o}function lu(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const a=[...n==="clippingAncestors"?Kt(t)?[]:cu(t,this._c):[].concat(n),o],c=a[0],l=a.reduce((u,d)=>{const f=Go(t,d,r);return u.top=te(f.top,u.top),u.right=Ae(f.right,u.right),u.bottom=Ae(f.bottom,u.bottom),u.left=te(f.left,u.left),u},Go(t,c,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function uu(e){const{width:t,height:n}=Nr(e);return{width:t,height:n}}function du(e,t,n){const o=ge(t),r=ye(t),s=n==="fixed",a=je(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const l=ve(0);function u(){l.x=Yt(r)}if(o||!o&&!s)if((et(t)!=="body"||ft(r))&&(c=zt(t)),o){const m=je(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&u();s&&!o&&r&&u();const d=r&&!o&&!s?jr(r,c):ve(0),f=a.left+c.scrollLeft-l.x-d.x,h=a.top+c.scrollTop-l.y-d.y;return{x:f,y:h,width:a.width,height:a.height}}function Rn(e){return de(e).position==="static"}function Ko(e,t){if(!ge(e)||de(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ye(e)===n&&(n=n.ownerDocument.body),n}function $r(e,t){const n=oe(e);if(Kt(e))return n;if(!ge(e)){let r=Te(e);for(;r&&!ze(r);){if(ue(r)&&!Rn(r))return r;r=Te(r)}return n}let o=Ko(e,t);for(;o&&zl(o)&&Rn(o);)o=Ko(o,t);return o&&ze(o)&&Rn(o)&&!Zn(o)?n:o||Jl(e)||n}const fu=async function(e){const t=this.getOffsetParent||$r,n=this.getDimensions,o=await n(e.floating);return{reference:du(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pu(e){return de(e).direction==="rtl"}const hu={convertOffsetParentRelativeRectToViewportRelativeRect:nu,getDocumentElement:ye,getClippingRect:lu,getOffsetParent:$r,getElementRects:fu,getClientRects:ou,getDimensions:uu,getScale:Ge,isElement:ue,isRTL:pu};function Fr(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function vu(e,t){let n=null,o;const r=ye(e);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function a(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=u;if(c||t(),!h||!m)return;const w=Rt(f),v=Rt(r.clientWidth-(d+h)),g=Rt(r.clientHeight-(f+m)),y=Rt(d),b={rootMargin:-w+"px "+-v+"px "+-g+"px "+-y+"px",threshold:te(0,Ae(1,l))||1};let C=!0;function S(A){const E=A[0].intersectionRatio;if(E!==l){if(!C)return a();E?a(!1,E):o=setTimeout(()=>{a(!1,1e-7)},1e3)}E===1&&!Fr(u,e.getBoundingClientRect())&&a(),C=!1}try{n=new IntersectionObserver(S,{...b,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,b)}n.observe(e)}return a(!0),s}function mu(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=Qn(e),d=r||s?[...u?it(u):[],...it(t)]:[];d.forEach(y=>{r&&y.addEventListener("scroll",n,{passive:!0}),s&&y.addEventListener("resize",n)});const f=u&&c?vu(u,n):null;let h=-1,m=null;a&&(m=new ResizeObserver(y=>{let[x]=y;x&&x.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var b;(b=m)==null||b.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let w,v=l?je(e):null;l&&g();function g(){const y=je(e);v&&!Fr(v,y)&&n(),v=y,w=requestAnimationFrame(g)}return n(),()=>{var y;d.forEach(x=>{r&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),f?.(),(y=m)==null||y.disconnect(),m=null,l&&cancelAnimationFrame(w)}}const gu=Bl,wu=Vl,yu=$l,xu=Ul,bu=Fl,zo=kl,Cu=Hl,Su=(e,t,n)=>{const o=new Map,r={platform:hu,...n},s={...r.platform,_c:o};return jl(e,t,{...r,platform:s})};var Eu=typeof document<"u",Ru=function(){},Tt=Eu?i.useLayoutEffect:Ru;function Nt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!Nt(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!Nt(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Wr(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Yo(e,t){const n=Wr(e);return Math.round(t*n)/n}function Pn(e){const t=i.useRef(e);return Tt(()=>{t.current=e}),t}function Pu(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:a}={},transform:c=!0,whileElementsMounted:l,open:u}=e,[d,f]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=i.useState(o);Nt(h,o)||m(o);const[w,v]=i.useState(null),[g,y]=i.useState(null),x=i.useCallback(M=>{M!==A.current&&(A.current=M,v(M))},[]),b=i.useCallback(M=>{M!==E.current&&(E.current=M,y(M))},[]),C=s||w,S=a||g,A=i.useRef(null),E=i.useRef(null),_=i.useRef(d),I=l!=null,O=Pn(l),L=Pn(r),$=Pn(u),F=i.useCallback(()=>{if(!A.current||!E.current)return;const M={placement:t,strategy:n,middleware:h};L.current&&(M.platform=L.current),Su(A.current,E.current,M).then(P=>{const G={...P,isPositioned:$.current!==!1};k.current&&!Nt(_.current,G)&&(_.current=G,Wt.flushSync(()=>{f(G)}))})},[h,t,n,L,$]);Tt(()=>{u===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,f(M=>({...M,isPositioned:!1})))},[u]);const k=i.useRef(!1);Tt(()=>(k.current=!0,()=>{k.current=!1}),[]),Tt(()=>{if(C&&(A.current=C),S&&(E.current=S),C&&S){if(O.current)return O.current(C,S,F);F()}},[C,S,F,O,I]);const B=i.useMemo(()=>({reference:A,floating:E,setReference:x,setFloating:b}),[x,b]),N=i.useMemo(()=>({reference:C,floating:S}),[C,S]),W=i.useMemo(()=>{const M={position:n,left:0,top:0};if(!N.floating)return M;const P=Yo(N.floating,d.x),G=Yo(N.floating,d.y);return c?{...M,transform:"translate("+P+"px, "+G+"px)",...Wr(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:G}},[n,c,N.floating,d.x,d.y]);return i.useMemo(()=>({...d,update:F,refs:B,elements:N,floatingStyles:W}),[d,F,B,N,W])}const Au=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?zo({element:o.current,padding:r}).fn(n):{}:o?zo({element:o,padding:r}).fn(n):{}}}},Tu=(e,t)=>({...gu(e),options:[e,t]}),_u=(e,t)=>({...wu(e),options:[e,t]}),Iu=(e,t)=>({...Cu(e),options:[e,t]}),Ou=(e,t)=>({...yu(e),options:[e,t]}),Mu=(e,t)=>({...xu(e),options:[e,t]}),Du=(e,t)=>({...bu(e),options:[e,t]}),Nu=(e,t)=>({...Au(e),options:[e,t]});var Lu="Arrow",Br=i.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return p.jsx(D.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Br.displayName=Lu;var ju=Br;function Vr(e){const[t,n]=i.useState(void 0);return z(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let a,c;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;a=u.inlineSize,c=u.blockSize}else a=e.offsetWidth,c=e.offsetHeight;n({width:a,height:c})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var eo="Popper",[Hr,_e]=Q(eo),[ku,Ur]=Hr(eo),Gr=e=>{const{__scopePopper:t,children:n}=e,[o,r]=i.useState(null);return p.jsx(ku,{scope:t,anchor:o,onAnchorChange:r,children:n})};Gr.displayName=eo;var Kr="PopperAnchor",zr=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=Ur(Kr,n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return i.useEffect(()=>{const u=l.current;l.current=o?.current||a.current,u!==l.current&&s.onAnchorChange(l.current)}),o?null:p.jsx(D.div,{...r,ref:c})});zr.displayName=Kr;var to="PopperContent",[$u,Fu]=Hr(to),Yr=i.forwardRef((e,t)=>{const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:a=0,arrowPadding:c=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:w,...v}=e,g=Ur(to,n),[y,x]=i.useState(null),b=j(t,T=>x(T)),[C,S]=i.useState(null),A=Vr(C),E=A?.width??0,_=A?.height??0,I=o+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(u)?u:[u],$=L.length>0,F={padding:O,boundary:L.filter(Bu),altBoundary:$},{refs:k,floatingStyles:B,placement:N,isPositioned:W,middlewareData:M}=Pu({strategy:"fixed",placement:I,whileElementsMounted:(...T)=>mu(...T,{animationFrame:m==="always"}),elements:{reference:g.anchor},middleware:[Tu({mainAxis:r+_,alignmentAxis:a}),l&&_u({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Iu():void 0,...F}),l&&Ou({...F}),Mu({...F,apply:({elements:T,rects:V,availableWidth:Z,availableHeight:H})=>{const{width:U,height:K}=V.reference,se=T.floating.style;se.setProperty("--radix-popper-available-width",`${Z}px`),se.setProperty("--radix-popper-available-height",`${H}px`),se.setProperty("--radix-popper-anchor-width",`${U}px`),se.setProperty("--radix-popper-anchor-height",`${K}px`)}}),C&&Nu({element:C,padding:c}),Vu({arrowWidth:E,arrowHeight:_}),h&&Du({strategy:"referenceHidden",...F})]}),[P,G]=Zr(N),q=X(w);z(()=>{W&&q?.()},[W,q]);const ce=M.arrow?.x,be=M.arrow?.y,re=M.arrow?.centerOffset!==0,[Ce,ee]=i.useState();return z(()=>{y&&ee(window.getComputedStyle(y).zIndex)},[y]),p.jsx("div",{ref:k.setFloating,"data-radix-popper-content-wrapper":"",style:{...B,transform:W?B.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Ce,"--radix-popper-transform-origin":[M.transformOrigin?.x,M.transformOrigin?.y].join(" "),...M.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx($u,{scope:n,placedSide:P,onArrowChange:S,arrowX:ce,arrowY:be,shouldHideArrow:re,children:p.jsx(D.div,{"data-side":P,"data-align":G,...v,ref:b,style:{...v.style,animation:W?void 0:"none"}})})})});Yr.displayName=to;var Xr="PopperArrow",Wu={top:"bottom",right:"left",bottom:"top",left:"right"},qr=i.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Fu(Xr,o),a=Wu[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(ju,{...r,ref:n,style:{...r.style,display:"block"}})})});qr.displayName=Xr;function Bu(e){return e!==null}var Vu=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:o,middlewareData:r}=t,a=r.arrow?.centerOffset!==0,c=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[u,d]=Zr(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(r.arrow?.x??0)+c/2,m=(r.arrow?.y??0)+l/2;let w="",v="";return u==="bottom"?(w=a?f:`${h}px`,v=`${-l}px`):u==="top"?(w=a?f:`${h}px`,v=`${o.floating.height+l}px`):u==="right"?(w=`${-l}px`,v=a?f:`${m}px`):u==="left"&&(w=`${o.floating.width+l}px`,v=a?f:`${m}px`),{data:{x:w,y:v}}}});function Zr(e){const[t,n="center"]=e.split("-");return[t,n]}var Xt=Gr,pt=zr,qt=Yr,Zt=qr,Hu=Symbol("radix.slottable");function Uu(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Hu,t}var Jr=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"}),Gu="VisuallyHidden",Qr=i.forwardRef((e,t)=>p.jsx(D.span,{...e,ref:t,style:{...Jr,...e.style}}));Qr.displayName=Gu;var Ku=Qr,[Jt]=Q("Tooltip",[_e]),Qt=_e(),es="TooltipProvider",zu=700,Dn="tooltip.open",[Yu,no]=Jt(es),ts=e=>{const{__scopeTooltip:t,delayDuration:n=zu,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,a=i.useRef(!0),c=i.useRef(!1),l=i.useRef(0);return i.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),p.jsx(Yu,{scope:t,isOpenDelayedRef:a,delayDuration:n,onOpen:i.useCallback(()=>{window.clearTimeout(l.current),a.current=!1},[]),onClose:i.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>a.current=!0,o)},[o]),isPointerInTransitRef:c,onPointerInTransitChange:i.useCallback(u=>{c.current=u},[]),disableHoverableContent:r,children:s})};ts.displayName=es;var at="Tooltip",[Xu,ht]=Jt(at),ns=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:a,delayDuration:c}=e,l=no(at,e.__scopeTooltip),u=Qt(t),[d,f]=i.useState(null),h=ne(),m=i.useRef(0),w=a??l.disableHoverableContent,v=c??l.delayDuration,g=i.useRef(!1),[y,x]=me({prop:o,defaultProp:r??!1,onChange:E=>{E?(l.onOpen(),document.dispatchEvent(new CustomEvent(Dn))):l.onClose(),s?.(E)},caller:at}),b=i.useMemo(()=>y?g.current?"delayed-open":"instant-open":"closed",[y]),C=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g.current=!1,x(!0)},[x]),S=i.useCallback(()=>{window.clearTimeout(m.current),m.current=0,x(!1)},[x]),A=i.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{g.current=!0,x(!0),m.current=0},v)},[v,x]);return i.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(Xt,{...u,children:p.jsx(Xu,{scope:t,contentId:h,open:y,stateAttribute:b,trigger:d,onTriggerChange:f,onTriggerEnter:i.useCallback(()=>{l.isOpenDelayedRef.current?A():C()},[l.isOpenDelayedRef,A,C]),onTriggerLeave:i.useCallback(()=>{w?S():(window.clearTimeout(m.current),m.current=0)},[S,w]),onOpen:C,onClose:S,disableHoverableContent:w,children:n})})};ns.displayName=at;var Nn="TooltipTrigger",os=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=ht(Nn,n),s=no(Nn,n),a=Qt(n),c=i.useRef(null),l=j(t,c,r.onTriggerChange),u=i.useRef(!1),d=i.useRef(!1),f=i.useCallback(()=>u.current=!1,[]);return i.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(pt,{asChild:!0,...a,children:p.jsx(D.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:R(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),d.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{r.onTriggerLeave(),d.current=!1}),onPointerDown:R(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:R(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:R(e.onBlur,r.onClose),onClick:R(e.onClick,r.onClose)})})});os.displayName=Nn;var oo="TooltipPortal",[qu,Zu]=Jt(oo,{forceMount:void 0}),rs=e=>{const{__scopeTooltip:t,forceMount:n,children:o,container:r}=e,s=ht(oo,t);return p.jsx(qu,{scope:t,forceMount:n,children:p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:o})})})};rs.displayName=oo;var Ye="TooltipContent",ss=i.forwardRef((e,t)=>{const n=Zu(Ye,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,a=ht(Ye,e.__scopeTooltip);return p.jsx(Y,{present:o||a.open,children:a.disableHoverableContent?p.jsx(is,{side:r,...s,ref:t}):p.jsx(Ju,{side:r,...s,ref:t})})}),Ju=i.forwardRef((e,t)=>{const n=ht(Ye,e.__scopeTooltip),o=no(Ye,e.__scopeTooltip),r=i.useRef(null),s=j(t,r),[a,c]=i.useState(null),{trigger:l,onClose:u}=n,d=r.current,{onPointerInTransitChange:f}=o,h=i.useCallback(()=>{c(null),f(!1)},[f]),m=i.useCallback((w,v)=>{const g=w.currentTarget,y={x:w.clientX,y:w.clientY},x=nd(y,g.getBoundingClientRect()),b=od(y,x),C=rd(v.getBoundingClientRect()),S=id([...b,...C]);c(S),f(!0)},[f]);return i.useEffect(()=>()=>h(),[h]),i.useEffect(()=>{if(l&&d){const w=g=>m(g,d),v=g=>m(g,l);return l.addEventListener("pointerleave",w),d.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",w),d.removeEventListener("pointerleave",v)}}},[l,d,m,h]),i.useEffect(()=>{if(a){const w=v=>{const g=v.target,y={x:v.clientX,y:v.clientY},x=l?.contains(g)||d?.contains(g),b=!sd(y,a);x?h():b&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,d,a,u,h]),p.jsx(is,{...e,ref:s})}),[Qu,ed]=Jt(at,{isInside:!1}),td=Uu("TooltipContent"),is=i.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:a,...c}=e,l=ht(Ye,n),u=Qt(n),{onClose:d}=l;return i.useEffect(()=>(document.addEventListener(Dn,d),()=>document.removeEventListener(Dn,d)),[d]),i.useEffect(()=>{if(l.trigger){const f=h=>{h.target?.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(qt,{"data-state":l.stateAttribute,...u,...c,ref:t,style:{...c.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:[p.jsx(td,{children:o}),p.jsx(Qu,{scope:n,isInside:!0,children:p.jsx(Ku,{id:l.contentId,role:"tooltip",children:r||o})})]})})});ss.displayName=Ye;var as="TooltipArrow",cs=i.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Qt(n);return ed(as,n).isInside?null:p.jsx(Zt,{...r,...o,ref:t})});cs.displayName=as;function nd(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function od(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function rd(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function sd(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function id(e){const t=e.slice();return t.sort((n,o)=>n.x<o.x?-1:n.x>o.x?1:n.y<o.y?-1:n.y>o.y?1:0),ad(t)}function ad(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o<e.length;o++){const r=e[o];for(;t.length>=2;){const s=t[t.length-1],a=t[t.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(r.y-a.y)>=(s.y-a.y)*(r.x-a.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gh=ts,wh=ns,yh=os,xh=rs,bh=ss,Ch=cs,en="Collapsible",[cd]=Q(en),[ld,ro]=cd(en),ls=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:o,defaultOpen:r,disabled:s,onOpenChange:a,...c}=e,[l,u]=me({prop:o,defaultProp:r??!1,onChange:a,caller:en});return p.jsx(ld,{scope:n,disabled:s,contentId:ne(),open:l,onOpenToggle:i.useCallback(()=>u(d=>!d),[u]),children:p.jsx(D.div,{"data-state":io(l),"data-disabled":s?"":void 0,...c,ref:t})})});ls.displayName=en;var us="CollapsibleTrigger",ud=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,...o}=e,r=ro(us,n);return p.jsx(D.button,{type:"button","aria-controls":r.contentId,"aria-expanded":r.open||!1,"data-state":io(r.open),"data-disabled":r.disabled?"":void 0,disabled:r.disabled,...o,ref:t,onClick:R(e.onClick,r.onOpenToggle)})});ud.displayName=us;var so="CollapsibleContent",dd=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ro(so,e.__scopeCollapsible);return p.jsx(Y,{present:n||r.open,children:({present:s})=>p.jsx(fd,{...o,ref:t,present:s})})});dd.displayName=so;var fd=i.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:o,children:r,...s}=e,a=ro(so,n),[c,l]=i.useState(o),u=i.useRef(null),d=j(t,u),f=i.useRef(0),h=f.current,m=i.useRef(0),w=m.current,v=a.open||c,g=i.useRef(v),y=i.useRef(void 0);return i.useEffect(()=>{const x=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(x)},[]),z(()=>{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 b=x.getBoundingClientRect();f.current=b.height,m.current=b.width,g.current||(x.style.transitionDuration=y.current.transitionDuration,x.style.animationName=y.current.animationName),l(o)}},[a.open,o]),p.jsx(D.div,{"data-state":io(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":w?`${w}px`:void 0,...e.style},children:v&&r})});function io(e){return e?"open":"closed"}var Sh=ls,pd=i.createContext(void 0);function vt(e){const t=i.useContext(pd);return e||t||"ltr"}function Ln(e,[t,n]){return Math.min(n,Math.max(t,e))}function hd(e,t){return i.useReducer((n,o)=>t[n][o]??n,e)}var ao="ScrollArea",[ds]=Q(ao),[vd,ae]=ds(ao),fs=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:o="hover",dir:r,scrollHideDelay:s=600,...a}=e,[c,l]=i.useState(null),[u,d]=i.useState(null),[f,h]=i.useState(null),[m,w]=i.useState(null),[v,g]=i.useState(null),[y,x]=i.useState(0),[b,C]=i.useState(0),[S,A]=i.useState(!1),[E,_]=i.useState(!1),I=j(t,L=>l(L)),O=vt(r);return p.jsx(vd,{scope:n,type:o,dir:O,scrollHideDelay:s,scrollArea:c,viewport:u,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:w,scrollbarXEnabled:S,onScrollbarXEnabledChange:A,scrollbarY:v,onScrollbarYChange:g,scrollbarYEnabled:E,onScrollbarYEnabledChange:_,onCornerWidthChange:x,onCornerHeightChange:C,children:p.jsx(D.div,{dir:O,...a,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":y+"px","--radix-scroll-area-corner-height":b+"px",...e.style}})})});fs.displayName=ao;var ps="ScrollAreaViewport",hs=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:o,nonce:r,...s}=e,a=ae(ps,n),c=i.useRef(null),l=j(t,c,a.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(D.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:a.scrollbarXEnabled?"scroll":"hidden",overflowY:a.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:a.onContentChange,style:{minWidth:"100%",display:"table"},children:o})})]})});hs.displayName=ps;var xe="ScrollAreaScrollbar",vs=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(xe,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:a}=r,c=e.orientation==="horizontal";return i.useEffect(()=>(c?s(!0):a(!0),()=>{c?s(!1):a(!1)}),[c,s,a]),r.type==="hover"?p.jsx(md,{...o,ref:t,forceMount:n}):r.type==="scroll"?p.jsx(gd,{...o,ref:t,forceMount:n}):r.type==="auto"?p.jsx(ms,{...o,ref:t,forceMount:n}):r.type==="always"?p.jsx(co,{...o,ref:t}):null});vs.displayName=xe;var md=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(xe,e.__scopeScrollArea),[s,a]=i.useState(!1);return i.useEffect(()=>{const c=r.scrollArea;let l=0;if(c){const u=()=>{window.clearTimeout(l),a(!0)},d=()=>{l=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return c.addEventListener("pointerenter",u),c.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),c.removeEventListener("pointerenter",u),c.removeEventListener("pointerleave",d)}}},[r.scrollArea,r.scrollHideDelay]),p.jsx(Y,{present:n||s,children:p.jsx(ms,{"data-state":s?"visible":"hidden",...o,ref:t})})}),gd=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=ae(xe,e.__scopeScrollArea),s=e.orientation==="horizontal",a=nn(()=>l("SCROLL_END"),100),[c,l]=hd("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return i.useEffect(()=>{if(c==="idle"){const u=window.setTimeout(()=>l("HIDE"),r.scrollHideDelay);return()=>window.clearTimeout(u)}},[c,r.scrollHideDelay,l]),i.useEffect(()=>{const u=r.viewport,d=s?"scrollLeft":"scrollTop";if(u){let f=u[d];const h=()=>{const m=u[d];f!==m&&(l("SCROLL"),a()),f=m};return u.addEventListener("scroll",h),()=>u.removeEventListener("scroll",h)}},[r.viewport,s,l,a]),p.jsx(Y,{present:n||c!=="hidden",children:p.jsx(co,{"data-state":c==="hidden"?"hidden":"visible",...o,ref:t,onPointerEnter:R(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:R(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),ms=i.forwardRef((e,t)=>{const n=ae(xe,e.__scopeScrollArea),{forceMount:o,...r}=e,[s,a]=i.useState(!1),c=e.orientation==="horizontal",l=nn(()=>{if(n.viewport){const u=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;a(c?u:d)}},10);return Xe(n.viewport,l),Xe(n.content,l),p.jsx(Y,{present:o||s,children:p.jsx(co,{"data-state":s?"visible":"hidden",...r,ref:t})})}),co=i.forwardRef((e,t)=>{const{orientation:n="vertical",...o}=e,r=ae(xe,e.__scopeScrollArea),s=i.useRef(null),a=i.useRef(0),[c,l]=i.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),u=bs(c.viewport,c.content),d={...o,sizes:c,onSizesChange:l,hasThumb:u>0&&u<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>a.current=0,onThumbPointerDown:h=>a.current=h};function f(h,m){return Sd(h,a.current,c,m)}return n==="horizontal"?p.jsx(wd,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollLeft,m=Xo(h,c,r.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollLeft=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollLeft=f(h,r.dir))}}):n==="vertical"?p.jsx(yd,{...d,ref:t,onThumbPositionChange:()=>{if(r.viewport&&s.current){const h=r.viewport.scrollTop,m=Xo(h,c);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{r.viewport&&(r.viewport.scrollTop=h)},onDragScroll:h=>{r.viewport&&(r.viewport.scrollTop=f(h))}}):null}),wd=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(xe,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarXChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(ws,{"data-orientation":"horizontal",...r,ref:u,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":tn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),Ss(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:jt(a.paddingLeft),paddingEnd:jt(a.paddingRight)}})}})}),yd=i.forwardRef((e,t)=>{const{sizes:n,onSizesChange:o,...r}=e,s=ae(xe,e.__scopeScrollArea),[a,c]=i.useState(),l=i.useRef(null),u=j(t,l,s.onScrollbarYChange);return i.useEffect(()=>{l.current&&c(getComputedStyle(l.current))},[l]),p.jsx(ws,{"data-orientation":"vertical",...r,ref:u,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":tn(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),Ss(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&a&&o({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:jt(a.paddingTop),paddingEnd:jt(a.paddingBottom)}})}})}),[xd,gs]=ds(xe),ws=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:o,hasThumb:r,onThumbChange:s,onThumbPointerUp:a,onThumbPointerDown:c,onThumbPositionChange:l,onDragScroll:u,onWheelScroll:d,onResize:f,...h}=e,m=ae(xe,n),[w,v]=i.useState(null),g=j(t,I=>v(I)),y=i.useRef(null),x=i.useRef(""),b=m.viewport,C=o.content-o.viewport,S=X(d),A=X(l),E=nn(f,10);function _(I){if(y.current){const O=I.clientX-y.current.left,L=I.clientY-y.current.top;u({x:O,y:L})}}return i.useEffect(()=>{const I=O=>{const L=O.target;w?.contains(L)&&S(O,C)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[b,w,C,S]),i.useEffect(A,[o,A]),Xe(w,E),Xe(m.content,E),p.jsx(xd,{scope:n,scrollbar:w,hasThumb:r,onThumbChange:X(s),onThumbPointerUp:X(a),onThumbPositionChange:A,onThumbPointerDown:X(c),children:p.jsx(D.div,{...h,ref:g,style:{position:"absolute",...h.style},onPointerDown:R(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),y.current=w.getBoundingClientRect(),x.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),_(I))}),onPointerMove:R(e.onPointerMove,_),onPointerUp:R(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=x.current,m.viewport&&(m.viewport.style.scrollBehavior=""),y.current=null})})})}),Lt="ScrollAreaThumb",ys=i.forwardRef((e,t)=>{const{forceMount:n,...o}=e,r=gs(Lt,e.__scopeScrollArea);return p.jsx(Y,{present:n||r.hasThumb,children:p.jsx(bd,{ref:t,...o})})}),bd=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:o,...r}=e,s=ae(Lt,n),a=gs(Lt,n),{onThumbPositionChange:c}=a,l=j(t,f=>a.onThumbChange(f)),u=i.useRef(void 0),d=nn(()=>{u.current&&(u.current(),u.current=void 0)},100);return i.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!u.current){const m=Ed(f,c);u.current=m,c()}};return c(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,c]),p.jsx(D.div,{"data-state":a.hasThumb?"visible":"hidden",...r,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...o},onPointerDownCapture:R(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),w=f.clientX-m.left,v=f.clientY-m.top;a.onThumbPointerDown({x:w,y:v})}),onPointerUp:R(e.onPointerUp,a.onThumbPointerUp)})});ys.displayName=Lt;var lo="ScrollAreaCorner",xs=i.forwardRef((e,t)=>{const n=ae(lo,e.__scopeScrollArea),o=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&o?p.jsx(Cd,{...e,ref:t}):null});xs.displayName=lo;var Cd=i.forwardRef((e,t)=>{const{__scopeScrollArea:n,...o}=e,r=ae(lo,n),[s,a]=i.useState(0),[c,l]=i.useState(0),u=!!(s&&c);return Xe(r.scrollbarX,()=>{const d=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(d),l(d)}),Xe(r.scrollbarY,()=>{const d=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(d),a(d)}),u?p.jsx(D.div,{...o,ref:t,style:{width:s,height:c,position:"absolute",right:r.dir==="ltr"?0:void 0,left:r.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function jt(e){return e?parseInt(e,10):0}function bs(e,t){const n=e/t;return isNaN(n)?0:n}function tn(e){const t=bs(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,o=(e.scrollbar.size-n)*t;return Math.max(o,18)}function Sd(e,t,n,o="ltr"){const r=tn(n),s=r/2,a=t||s,c=r-a,l=n.scrollbar.paddingStart+a,u=n.scrollbar.size-n.scrollbar.paddingEnd-c,d=n.content-n.viewport,f=o==="ltr"?[0,d]:[d*-1,0];return Cs([l,u],f)(e)}function Xo(e,t,n="ltr"){const o=tn(t),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-r,a=t.content-t.viewport,c=s-o,l=n==="ltr"?[0,a]:[a*-1,0],u=Ln(e,l);return Cs([0,a],[0,c])(u)}function Cs(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const o=(t[1]-t[0])/(e[1]-e[0]);return t[0]+o*(n-e[0])}}function Ss(e,t){return e>0&&e<t}var Ed=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},o=0;return(function r(){const s={left:e.scrollLeft,top:e.scrollTop},a=n.left!==s.left,c=n.top!==s.top;(a||c)&&t(),n=s,o=window.requestAnimationFrame(r)})(),()=>window.cancelAnimationFrame(o)};function nn(e,t){const n=X(e),o=i.useRef(0);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),i.useCallback(()=>{window.clearTimeout(o.current),o.current=window.setTimeout(n,t)},[n,t])}function Xe(e,t){const n=X(t);z(()=>{let o=0;if(e){const r=new ResizeObserver(()=>{cancelAnimationFrame(o),o=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(o),r.unobserve(e)}}},[e,n])}var Eh=fs,Rh=hs,Ph=vs,Ah=ys,Th=xs,Rd=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Pd=Rd.reduce((e,t)=>{const n=Un(`Primitive.${t}`),o=i.forwardRef((r,s)=>{const{asChild:a,...c}=r,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...c,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{}),Ad="Label",Es=i.forwardRef((e,t)=>p.jsx(Pd.label,{...e,ref:t,onMouseDown:n=>{n.target.closest("button, input, select, textarea")||(e.onMouseDown?.(n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Es.displayName=Ad;var _h=Es,Td=Symbol("radix.slottable");function _d(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Td,t}var Rs="AlertDialog",[Id]=Q(Rs,[pr]),Re=pr(),Ps=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(wl,{...o,...n,modal:!0})};Ps.displayName=Rs;var Od="AlertDialogTrigger",Md=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(yl,{...r,...o,ref:t})});Md.displayName=Od;var Dd="AlertDialogPortal",As=e=>{const{__scopeAlertDialog:t,...n}=e,o=Re(t);return p.jsx(xl,{...o,...n})};As.displayName=Dd;var Nd="AlertDialogOverlay",Ts=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(bl,{...r,...o,ref:t})});Ts.displayName=Nd;var Ke="AlertDialogContent",[Ld,jd]=Id(Ke),kd=_d("AlertDialogContent"),_s=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,children:o,...r}=e,s=Re(n),a=i.useRef(null),c=j(t,a),l=i.useRef(null);return p.jsx(hl,{contentName:Ke,titleName:Is,docsSlug:"alert-dialog",children:p.jsx(Ld,{scope:n,cancelRef:l,children:p.jsxs(Cl,{role:"alertdialog",...s,...r,ref:c,onOpenAutoFocus:R(r.onOpenAutoFocus,u=>{u.preventDefault(),l.current?.focus({preventScroll:!0})}),onPointerDownOutside:u=>u.preventDefault(),onInteractOutside:u=>u.preventDefault(),children:[p.jsx(kd,{children:o}),p.jsx(Fd,{contentRef:a})]})})})});_s.displayName=Ke;var Is="AlertDialogTitle",Os=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(Sl,{...r,...o,ref:t})});Os.displayName=Is;var Ms="AlertDialogDescription",Ds=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(El,{...r,...o,ref:t})});Ds.displayName=Ms;var $d="AlertDialogAction",Ns=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,r=Re(n);return p.jsx(_r,{...r,...o,ref:t})});Ns.displayName=$d;var Ls="AlertDialogCancel",js=i.forwardRef((e,t)=>{const{__scopeAlertDialog:n,...o}=e,{cancelRef:r}=jd(Ls,n),s=Re(n),a=j(t,r);return p.jsx(_r,{...s,...o,ref:a})});js.displayName=Ls;var Fd=({contentRef:e})=>{const t=`\`${Ke}\` requires a description for the component to be accessible for screen reader users.
|
|
46
|
-
|
|
47
|
-
You can add a description to the \`${Ke}\` by passing a \`${Ms}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
|
|
48
|
-
|
|
49
|
-
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${Ke}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
50
|
-
|
|
51
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return i.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},Ih=Ps,Oh=As,Mh=Ts,Dh=_s,Nh=Ns,Lh=js,jh=Os,kh=Ds;function qo(e){const t=Wd(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Vd);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Wd(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Ud(r),c=Hd(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Bd=Symbol("radix.slottable");function Vd(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Bd}function Hd(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Ud(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function uo(e){const t=e+"CollectionProvider",[n,o]=Q(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:g,children:y}=v,x=Ne.useRef(null),b=Ne.useRef(new Map).current;return p.jsx(r,{scope:g,itemMap:b,collectionRef:x,children:y})};a.displayName=t;const c=e+"CollectionSlot",l=qo(c),u=Ne.forwardRef((v,g)=>{const{scope:y,children:x}=v,b=s(c,y),C=j(g,b.collectionRef);return p.jsx(l,{ref:C,children:x})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=qo(d),m=Ne.forwardRef((v,g)=>{const{scope:y,children:x,...b}=v,C=Ne.useRef(null),S=j(g,C),A=s(d,y);return Ne.useEffect(()=>(A.itemMap.set(C,{ref:C,...b}),()=>void A.itemMap.delete(C))),p.jsx(h,{[f]:"",ref:S,children:x})});m.displayName=d;function w(v){const g=s(e+"CollectionConsumer",v);return Ne.useCallback(()=>{const x=g.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${f}]`));return Array.from(g.itemMap.values()).sort((A,E)=>b.indexOf(A.ref.current)-b.indexOf(E.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:a,Slot:u,ItemSlot:m},w,o]}var An="rovingFocusGroup.onEntryFocus",Gd={bubbles:!1,cancelable:!0},mt="RovingFocusGroup",[jn,ks,Kd]=uo(mt),[zd,on]=Q(mt,[Kd]),[Yd,Xd]=zd(mt),$s=i.forwardRef((e,t)=>p.jsx(jn.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(jn.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(qd,{...e,ref:t})})}));$s.displayName=mt;var qd=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:r=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=e,h=i.useRef(null),m=j(t,h),w=vt(s),[v,g]=me({prop:a,defaultProp:c??null,onChange:l,caller:mt}),[y,x]=i.useState(!1),b=X(u),C=ks(n),S=i.useRef(!1),[A,E]=i.useState(0);return i.useEffect(()=>{const _=h.current;if(_)return _.addEventListener(An,b),()=>_.removeEventListener(An,b)},[b]),p.jsx(Yd,{scope:n,orientation:o,dir:w,loop:r,currentTabStopId:v,onItemFocus:i.useCallback(_=>g(_),[g]),onItemShiftTab:i.useCallback(()=>x(!0),[]),onFocusableItemAdd:i.useCallback(()=>E(_=>_+1),[]),onFocusableItemRemove:i.useCallback(()=>E(_=>_-1),[]),children:p.jsx(D.div,{tabIndex:y||A===0?-1:0,"data-orientation":o,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:R(e.onMouseDown,()=>{S.current=!0}),onFocus:R(e.onFocus,_=>{const I=!S.current;if(_.target===_.currentTarget&&I&&!y){const O=new CustomEvent(An,Gd);if(_.currentTarget.dispatchEvent(O),!O.defaultPrevented){const L=C().filter(N=>N.focusable),$=L.find(N=>N.active),F=L.find(N=>N.id===v),B=[$,F,...L].filter(Boolean).map(N=>N.ref.current);Bs(B,d)}}S.current=!1}),onBlur:R(e.onBlur,()=>x(!1))})})}),Fs="RovingFocusGroupItem",Ws=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:r=!1,tabStopId:s,children:a,...c}=e,l=ne(),u=s||l,d=Xd(Fs,n),f=d.currentTabStopId===u,h=ks(n),{onFocusableItemAdd:m,onFocusableItemRemove:w,currentTabStopId:v}=d;return i.useEffect(()=>{if(o)return m(),()=>w()},[o,m,w]),p.jsx(jn.ItemSlot,{scope:n,id:u,focusable:o,active:r,children:p.jsx(D.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:t,onMouseDown:R(e.onMouseDown,g=>{o?d.onItemFocus(u):g.preventDefault()}),onFocus:R(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:R(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const y=Qd(g,d.orientation,d.dir);if(y!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let b=h().filter(C=>C.focusable).map(C=>C.ref.current);if(y==="last")b.reverse();else if(y==="prev"||y==="next"){y==="prev"&&b.reverse();const C=b.indexOf(g.currentTarget);b=d.loop?ef(b,C+1):b.slice(C+1)}setTimeout(()=>Bs(b))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:v!=null}):a})})});Ws.displayName=Fs;var Zd={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Jd(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Qd(e,t,n){const o=Jd(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(o))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(o)))return Zd[o]}function Bs(e,t=!1){const n=document.activeElement;for(const o of e)if(o===n||(o.focus({preventScroll:t}),document.activeElement!==n))return}function ef(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Vs=$s,Hs=Ws,rn="Tabs",[tf]=Q(rn,[on]),Us=on(),[nf,fo]=tf(rn),Gs=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,onValueChange:r,defaultValue:s,orientation:a="horizontal",dir:c,activationMode:l="automatic",...u}=e,d=vt(c),[f,h]=me({prop:o,onChange:r,defaultProp:s??"",caller:rn});return p.jsx(nf,{scope:n,baseId:ne(),value:f,onValueChange:h,orientation:a,dir:d,activationMode:l,children:p.jsx(D.div,{dir:d,"data-orientation":a,...u,ref:t})})});Gs.displayName=rn;var Ks="TabsList",zs=i.forwardRef((e,t)=>{const{__scopeTabs:n,loop:o=!0,...r}=e,s=fo(Ks,n),a=Us(n);return p.jsx(Vs,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:o,children:p.jsx(D.div,{role:"tablist","aria-orientation":s.orientation,...r,ref:t})})});zs.displayName=Ks;var Ys="TabsTrigger",Xs=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,disabled:r=!1,...s}=e,a=fo(Ys,n),c=Us(n),l=Js(a.baseId,o),u=Qs(a.baseId,o),d=o===a.value;return p.jsx(Hs,{asChild:!0,...c,focusable:!r,active:d,children:p.jsx(D.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":r?"":void 0,disabled:r,id:l,...s,ref:t,onMouseDown:R(e.onMouseDown,f=>{!r&&f.button===0&&f.ctrlKey===!1?a.onValueChange(o):f.preventDefault()}),onKeyDown:R(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&a.onValueChange(o)}),onFocus:R(e.onFocus,()=>{const f=a.activationMode!=="manual";!d&&!r&&f&&a.onValueChange(o)})})})});Xs.displayName=Ys;var qs="TabsContent",Zs=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:o,forceMount:r,children:s,...a}=e,c=fo(qs,n),l=Js(c.baseId,o),u=Qs(c.baseId,o),d=o===c.value,f=i.useRef(d);return i.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(Y,{present:r||d,children:({present:h})=>p.jsx(D.div,{"data-state":d?"active":"inactive","data-orientation":c.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:u,tabIndex:0,...a,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});Zs.displayName=qs;function Js(e,t){return`${e}-trigger-${t}`}function Qs(e,t){return`${e}-content-${t}`}var $h=Gs,Fh=zs,Wh=Xs,Bh=Zs;function of(e){const t=rf(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(af);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function rf(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=lf(r),c=cf(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sf=Symbol("radix.slottable");function af(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sf}function cf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function lf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ei(e){const t=i.useRef({value:e,previous:e});return i.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var uf=[" ","Enter","ArrowUp","ArrowDown"],df=[" ","Enter"],ke="Select",[sn,an,ff]=uo(ke),[tt]=Q(ke,[ff,_e]),cn=_e(),[pf,Ie]=tt(ke),[hf,vf]=tt(ke),ti=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:a,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:h,required:m,form:w}=e,v=cn(t),[g,y]=i.useState(null),[x,b]=i.useState(null),[C,S]=i.useState(!1),A=vt(u),[E,_]=me({prop:o,defaultProp:r??!1,onChange:s,caller:ke}),[I,O]=me({prop:a,defaultProp:c,onChange:l,caller:ke}),L=i.useRef(null),$=g?w||!!g.closest("form"):!0,[F,k]=i.useState(new Set),B=Array.from(F).map(N=>N.props.value).join(";");return p.jsx(Xt,{...v,children:p.jsxs(pf,{required:m,scope:t,trigger:g,onTriggerChange:y,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:C,onValueNodeHasChildrenChange:S,contentId:ne(),value:I,onValueChange:O,open:E,onOpenChange:_,dir:A,triggerPointerDownPosRef:L,disabled:h,children:[p.jsx(sn.Provider,{scope:t,children:p.jsx(hf,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(N=>{k(W=>new Set(W).add(N))},[]),onNativeOptionRemove:i.useCallback(N=>{k(W=>{const M=new Set(W);return M.delete(N),M})},[]),children:n})}),$?p.jsxs(Pi,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:I,onChange:N=>O(N.target.value),disabled:h,form:w,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(F)]},B):null]})})};ti.displayName=ke;var ni="SelectTrigger",oi=i.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=cn(n),a=Ie(ni,n),c=a.disabled||o,l=j(t,a.onTriggerChange),u=an(n),d=i.useRef("touch"),[f,h,m]=Ti(v=>{const g=u().filter(b=>!b.disabled),y=g.find(b=>b.value===a.value),x=_i(g,v,y);x!==void 0&&a.onValueChange(x.value)}),w=v=>{c||(a.onOpenChange(!0),m()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return p.jsx(pt,{asChild:!0,...s,children:p.jsx(D.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":Ai(a.value)?"":void 0,...r,ref:l,onClick:R(r.onClick,v=>{v.currentTarget.focus(),d.current!=="mouse"&&w(v)}),onPointerDown:R(r.onPointerDown,v=>{d.current=v.pointerType;const g=v.target;g.hasPointerCapture(v.pointerId)&&g.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(w(v),v.preventDefault())}),onKeyDown:R(r.onKeyDown,v=>{const g=f.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&h(v.key),!(g&&v.key===" ")&&uf.includes(v.key)&&(w(),v.preventDefault())})})})});oi.displayName=ni;var ri="SelectValue",si=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:a="",...c}=e,l=Ie(ri,n),{onValueNodeHasChildrenChange:u}=l,d=s!==void 0,f=j(t,l.onValueNodeChange);return z(()=>{u(d)},[u,d]),p.jsx(D.span,{...c,ref:f,style:{pointerEvents:"none"},children:Ai(l.value)?p.jsx(p.Fragment,{children:a}):s})});si.displayName=ri;var mf="SelectIcon",ii=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return p.jsx(D.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});ii.displayName=mf;var gf="SelectPortal",ai=e=>p.jsx(Je,{asChild:!0,...e});ai.displayName=gf;var $e="SelectContent",ci=i.forwardRef((e,t)=>{const n=Ie($e,e.__scopeSelect),[o,r]=i.useState();if(z(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?Wt.createPortal(p.jsx(li,{scope:e.__scopeSelect,children:p.jsx(sn.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(ui,{...e,ref:t})});ci.displayName=$e;var le=10,[li,Oe]=tt($e),wf="SelectContentImpl",yf=of("SelectContent.RemoveScroll"),ui=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:a,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:v,avoidCollisions:g,...y}=e,x=Ie($e,n),[b,C]=i.useState(null),[S,A]=i.useState(null),E=j(t,T=>C(T)),[_,I]=i.useState(null),[O,L]=i.useState(null),$=an(n),[F,k]=i.useState(!1),B=i.useRef(!1);i.useEffect(()=>{if(b)return Ht(b)},[b]),Bt();const N=i.useCallback(T=>{const[V,...Z]=$().map(K=>K.ref.current),[H]=Z.slice(-1),U=document.activeElement;for(const K of T)if(K===U||(K?.scrollIntoView({block:"nearest"}),K===V&&S&&(S.scrollTop=0),K===H&&S&&(S.scrollTop=S.scrollHeight),K?.focus(),document.activeElement!==U))return},[$,S]),W=i.useCallback(()=>N([_,b]),[N,_,b]);i.useEffect(()=>{F&&W()},[F,W]);const{onOpenChange:M,triggerPointerDownPosRef:P}=x;i.useEffect(()=>{if(b){let T={x:0,y:0};const V=H=>{T={x:Math.abs(Math.round(H.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(H.pageY)-(P.current?.y??0))}},Z=H=>{T.x<=10&&T.y<=10?H.preventDefault():b.contains(H.target)||M(!1),document.removeEventListener("pointermove",V),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",V),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",V),document.removeEventListener("pointerup",Z,{capture:!0})}}},[b,M,P]),i.useEffect(()=>{const T=()=>M(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[M]);const[G,q]=Ti(T=>{const V=$().filter(U=>!U.disabled),Z=V.find(U=>U.ref.current===document.activeElement),H=_i(V,T,Z);H&&setTimeout(()=>H.ref.current.focus())}),ce=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(x.value!==void 0&&x.value===V||H)&&(I(T),H&&(B.current=!0))},[x.value]),be=i.useCallback(()=>b?.focus(),[b]),re=i.useCallback((T,V,Z)=>{const H=!B.current&&!Z;(x.value!==void 0&&x.value===V||H)&&L(T)},[x.value]),Ce=o==="popper"?kn:di,ee=Ce===kn?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:v,avoidCollisions:g}:{};return p.jsx(li,{scope:n,content:b,viewport:S,onViewportChange:A,itemRefCallback:ce,selectedItem:_,onItemLeave:be,itemTextRefCallback:re,focusSelectedItem:W,selectedItemText:O,position:o,isPositioned:F,searchRef:G,children:p.jsx(dt,{as:yf,allowPinchZoom:!0,children:p.jsx(ut,{asChild:!0,trapped:x.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:R(r,T=>{x.trigger?.focus({preventScroll:!0}),T.preventDefault()}),children:p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:p.jsx(Ce,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:T=>T.preventDefault(),...y,...ee,onPlaced:()=>k(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:R(y.onKeyDown,T=>{const V=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!V&&T.key.length===1&&q(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let H=$().filter(U=>!U.disabled).map(U=>U.ref.current);if(["ArrowUp","End"].includes(T.key)&&(H=H.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const U=T.target,K=H.indexOf(U);H=H.slice(K+1)}setTimeout(()=>N(H)),T.preventDefault()}})})})})})})});ui.displayName=wf;var xf="SelectItemAlignedPosition",di=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=Ie($e,n),a=Oe($e,n),[c,l]=i.useState(null),[u,d]=i.useState(null),f=j(t,E=>d(E)),h=an(n),m=i.useRef(!1),w=i.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:y,focusSelectedItem:x}=a,b=i.useCallback(()=>{if(s.trigger&&s.valueNode&&c&&u&&v&&g&&y){const E=s.trigger.getBoundingClientRect(),_=u.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),O=y.getBoundingClientRect();if(s.dir!=="rtl"){const U=O.left-_.left,K=I.left-U,se=E.left-K,De=E.width+se,hn=Math.max(De,_.width),vn=window.innerWidth-le,mn=Ln(K,[le,Math.max(le,vn-hn)]);c.style.minWidth=De+"px",c.style.left=mn+"px"}else{const U=_.right-O.right,K=window.innerWidth-I.right-U,se=window.innerWidth-E.right-K,De=E.width+se,hn=Math.max(De,_.width),vn=window.innerWidth-le,mn=Ln(K,[le,Math.max(le,vn-hn)]);c.style.minWidth=De+"px",c.style.right=mn+"px"}const L=h(),$=window.innerHeight-le*2,F=v.scrollHeight,k=window.getComputedStyle(u),B=parseInt(k.borderTopWidth,10),N=parseInt(k.paddingTop,10),W=parseInt(k.borderBottomWidth,10),M=parseInt(k.paddingBottom,10),P=B+N+F+M+W,G=Math.min(g.offsetHeight*5,P),q=window.getComputedStyle(v),ce=parseInt(q.paddingTop,10),be=parseInt(q.paddingBottom,10),re=E.top+E.height/2-le,Ce=$-re,ee=g.offsetHeight/2,T=g.offsetTop+ee,V=B+N+T,Z=P-V;if(V<=re){const U=L.length>0&&g===L[L.length-1].ref.current;c.style.bottom="0px";const K=u.clientHeight-v.offsetTop-v.offsetHeight,se=Math.max(Ce,ee+(U?be:0)+K+W),De=V+se;c.style.height=De+"px"}else{const U=L.length>0&&g===L[0].ref.current;c.style.top="0px";const se=Math.max(re,B+v.offsetTop+(U?ce:0)+ee)+Z;c.style.height=se+"px",v.scrollTop=V-re+v.offsetTop}c.style.margin=`${le}px 0`,c.style.minHeight=G+"px",c.style.maxHeight=$+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,c,u,v,g,y,s.dir,o]);z(()=>b(),[b]);const[C,S]=i.useState();z(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const A=i.useCallback(E=>{E&&w.current===!0&&(b(),x?.(),w.current=!1)},[b,x]);return p.jsx(Cf,{scope:n,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:A,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:C},children:p.jsx(D.div,{...r,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});di.displayName=xf;var bf="SelectPopperPosition",kn=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=le,...s}=e,a=cn(n);return p.jsx(qt,{...a,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});kn.displayName=bf;var[Cf,po]=tt($e,{}),$n="SelectViewport",fi=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=Oe($n,n),a=po($n,n),c=j(t,s.onViewportChange),l=i.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(sn.Slot,{scope:n,children:p.jsx(D.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:R(r.onScroll,u=>{const d=u.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=a;if(h?.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const w=window.innerHeight-le*2,v=parseFloat(f.style.minHeight),g=parseFloat(f.style.height),y=Math.max(v,g);if(y<w){const x=y+m,b=Math.min(w,x),C=x-b;f.style.height=b+"px",f.style.bottom==="0px"&&(d.scrollTop=C>0?C:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});fi.displayName=$n;var pi="SelectGroup",[Sf,Ef]=tt(pi),hi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=ne();return p.jsx(Sf,{scope:n,id:r,children:p.jsx(D.div,{role:"group","aria-labelledby":r,...o,ref:t})})});hi.displayName=pi;var vi="SelectLabel",mi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=Ef(vi,n);return p.jsx(D.div,{id:r.id,...o,ref:t})});mi.displayName=vi;var kt="SelectItem",[Rf,gi]=tt(kt),wi=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...a}=e,c=Ie(kt,n),l=Oe(kt,n),u=c.value===o,[d,f]=i.useState(s??""),[h,m]=i.useState(!1),w=j(t,x=>l.itemRefCallback?.(x,o,r)),v=ne(),g=i.useRef("touch"),y=()=>{r||(c.onValueChange(o),c.onOpenChange(!1))};if(o==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Rf,{scope:n,value:o,disabled:r,textId:v,isSelected:u,onItemTextChange:i.useCallback(x=>{f(b=>b||(x?.textContent??"").trim())},[]),children:p.jsx(sn.ItemSlot,{scope:n,value:o,disabled:r,textValue:d,children:p.jsx(D.div,{role:"option","aria-labelledby":v,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...a,ref:w,onFocus:R(a.onFocus,()=>m(!0)),onBlur:R(a.onBlur,()=>m(!1)),onClick:R(a.onClick,()=>{g.current!=="mouse"&&y()}),onPointerUp:R(a.onPointerUp,()=>{g.current==="mouse"&&y()}),onPointerDown:R(a.onPointerDown,x=>{g.current=x.pointerType}),onPointerMove:R(a.onPointerMove,x=>{g.current=x.pointerType,r?l.onItemLeave?.():g.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(a.onPointerLeave,x=>{x.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:R(a.onKeyDown,x=>{l.searchRef?.current!==""&&x.key===" "||(df.includes(x.key)&&y(),x.key===" "&&x.preventDefault())})})})})});wi.displayName=kt;var ot="SelectItemText",yi=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,a=Ie(ot,n),c=Oe(ot,n),l=gi(ot,n),u=vf(ot,n),[d,f]=i.useState(null),h=j(t,y=>f(y),l.onItemTextChange,y=>c.itemTextRefCallback?.(y,l.value,l.disabled)),m=d?.textContent,w=i.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:v,onNativeOptionRemove:g}=u;return z(()=>(v(w),()=>g(w)),[v,g,w]),p.jsxs(p.Fragment,{children:[p.jsx(D.span,{id:l.textId,...s,ref:h}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Wt.createPortal(s.children,a.valueNode):null]})});yi.displayName=ot;var xi="SelectItemIndicator",bi=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return gi(xi,n).isSelected?p.jsx(D.span,{"aria-hidden":!0,...o,ref:t}):null});bi.displayName=xi;var Fn="SelectScrollUpButton",Ci=i.forwardRef((e,t)=>{const n=Oe(Fn,e.__scopeSelect),o=po(Fn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop-l.offsetHeight)}}):null});Ci.displayName=Fn;var Wn="SelectScrollDownButton",Si=i.forwardRef((e,t)=>{const n=Oe(Wn,e.__scopeSelect),o=po(Wn,e.__scopeSelect),[r,s]=i.useState(!1),a=j(t,o.onScrollButtonChange);return z(()=>{if(n.viewport&&n.isPositioned){let c=function(){const u=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<u;s(d)};const l=n.viewport;return c(),l.addEventListener("scroll",c),()=>l.removeEventListener("scroll",c)}},[n.viewport,n.isPositioned]),r?p.jsx(Ei,{...e,ref:a,onAutoScroll:()=>{const{viewport:c,selectedItem:l}=n;c&&l&&(c.scrollTop=c.scrollTop+l.offsetHeight)}}):null});Si.displayName=Wn;var Ei=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=Oe("SelectScrollButton",n),a=i.useRef(null),c=an(n),l=i.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return i.useEffect(()=>()=>l(),[l]),z(()=>{c().find(d=>d.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:"nearest"})},[c]),p.jsx(D.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:R(r.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(o,50))}),onPointerMove:R(r.onPointerMove,()=>{s.onItemLeave?.(),a.current===null&&(a.current=window.setInterval(o,50))}),onPointerLeave:R(r.onPointerLeave,()=>{l()})})}),Pf="SelectSeparator",Ri=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return p.jsx(D.div,{"aria-hidden":!0,...o,ref:t})});Ri.displayName=Pf;var Bn="SelectArrow",Af=i.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=cn(n),s=Ie(Bn,n),a=Oe(Bn,n);return s.open&&a.position==="popper"?p.jsx(Zt,{...r,...o,ref:t}):null});Af.displayName=Bn;var Tf="SelectBubbleInput",Pi=i.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=i.useRef(null),s=j(o,r),a=ei(t);return i.useEffect(()=>{const c=r.current;if(!c)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&d){const f=new Event("change",{bubbles:!0});d.call(c,t),c.dispatchEvent(f)}},[a,t]),p.jsx(D.select,{...n,style:{...Jr,...n.style},ref:s,defaultValue:t})});Pi.displayName=Tf;function Ai(e){return e===""||e===void 0}function Ti(e){const t=X(e),n=i.useRef(""),o=i.useRef(0),r=i.useCallback(a=>{const c=n.current+a;t(c),(function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))})(c)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function _i(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=_f(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function _f(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Vh=ti,Hh=oi,Uh=si,Gh=ii,Kh=ai,zh=ci,Yh=fi,Xh=hi,qh=mi,Zh=wi,Jh=yi,Qh=bi,ev=Ci,tv=Si,nv=Ri;function If(e){const t=Of(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(Df);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function Of(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=Lf(r),c=Nf(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Mf=Symbol("radix.slottable");function Df(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Mf}function Nf(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function Lf(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Vn=["Enter"," "],jf=["ArrowDown","PageUp","Home"],Ii=["ArrowUp","PageDown","End"],kf=[...jf,...Ii],$f={ltr:[...Vn,"ArrowRight"],rtl:[...Vn,"ArrowLeft"]},Ff={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gt="Menu",[ct,Wf,Bf]=uo(gt),[Fe,Oi]=Q(gt,[Bf,_e,on]),ln=_e(),Mi=on(),[Vf,We]=Fe(gt),[Hf,wt]=Fe(gt),Di=e=>{const{__scopeMenu:t,open:n=!1,children:o,dir:r,onOpenChange:s,modal:a=!0}=e,c=ln(t),[l,u]=i.useState(null),d=i.useRef(!1),f=X(s),h=vt(r);return i.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",w,{capture:!0,once:!0}),document.addEventListener("pointermove",w,{capture:!0,once:!0})},w=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",w,{capture:!0}),document.removeEventListener("pointermove",w,{capture:!0})}},[]),p.jsx(Xt,{...c,children:p.jsx(Vf,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:u,children:p.jsx(Hf,{scope:t,onClose:i.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:a,children:o})})})};Di.displayName=gt;var Uf="MenuAnchor",ho=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=ln(n);return p.jsx(pt,{...r,...o,ref:t})});ho.displayName=Uf;var vo="MenuPortal",[Gf,Ni]=Fe(vo,{forceMount:void 0}),Li=e=>{const{__scopeMenu:t,forceMount:n,children:o,container:r}=e,s=We(vo,t);return p.jsx(Gf,{scope:t,forceMount:n,children:p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:o})})})};Li.displayName=vo;var ie="MenuContent",[Kf,mo]=Fe(ie),ji=i.forwardRef((e,t)=>{const n=Ni(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=We(ie,e.__scopeMenu),a=wt(ie,e.__scopeMenu);return p.jsx(ct.Provider,{scope:e.__scopeMenu,children:p.jsx(Y,{present:o||s.open,children:p.jsx(ct.Slot,{scope:e.__scopeMenu,children:a.modal?p.jsx(zf,{...r,ref:t}):p.jsx(Yf,{...r,ref:t})})})})}),zf=i.forwardRef((e,t)=>{const n=We(ie,e.__scopeMenu),o=i.useRef(null),r=j(t,o);return i.useEffect(()=>{const s=o.current;if(s)return Ht(s)},[]),p.jsx(go,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Yf=i.forwardRef((e,t)=>{const n=We(ie,e.__scopeMenu);return p.jsx(go,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Xf=If("MenuContent.ScrollLock"),go=i.forwardRef((e,t)=>{const{__scopeMenu:n,loop:o=!1,trapFocus:r,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:w,...v}=e,g=We(ie,n),y=wt(ie,n),x=ln(n),b=Mi(n),C=Wf(n),[S,A]=i.useState(null),E=i.useRef(null),_=j(t,E,g.onContentChange),I=i.useRef(0),O=i.useRef(""),L=i.useRef(0),$=i.useRef(null),F=i.useRef("right"),k=i.useRef(0),B=w?dt:i.Fragment,N=w?{as:Xf,allowPinchZoom:!0}:void 0,W=P=>{const G=O.current+P,q=C().filter(T=>!T.disabled),ce=document.activeElement,be=q.find(T=>T.ref.current===ce)?.textValue,re=q.map(T=>T.textValue),Ce=ap(re,G,be),ee=q.find(T=>T.textValue===Ce)?.ref.current;(function T(V){O.current=V,window.clearTimeout(I.current),V!==""&&(I.current=window.setTimeout(()=>T(""),1e3))})(G),ee&&setTimeout(()=>ee.focus())};i.useEffect(()=>()=>window.clearTimeout(I.current),[]),Bt();const M=i.useCallback(P=>F.current===$.current?.side&&lp(P,$.current?.area),[]);return p.jsx(Kf,{scope:n,searchRef:O,onItemEnter:i.useCallback(P=>{M(P)&&P.preventDefault()},[M]),onItemLeave:i.useCallback(P=>{M(P)||(E.current?.focus(),A(null))},[M]),onTriggerLeave:i.useCallback(P=>{M(P)&&P.preventDefault()},[M]),pointerGraceTimerRef:L,onPointerGraceIntentChange:i.useCallback(P=>{$.current=P},[]),children:p.jsx(B,{...N,children:p.jsx(ut,{asChild:!0,trapped:r,onMountAutoFocus:R(s,P=>{P.preventDefault(),E.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:p.jsx(Vs,{asChild:!0,...b,dir:y.dir,orientation:"vertical",loop:o,currentTabStopId:S,onCurrentTabStopIdChange:A,onEntryFocus:R(l,P=>{y.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(qt,{role:"menu","aria-orientation":"vertical","data-state":Ji(g.open),"data-radix-menu-content":"",dir:y.dir,...x,...v,ref:_,style:{outline:"none",...v.style},onKeyDown:R(v.onKeyDown,P=>{const q=P.target.closest("[data-radix-menu-content]")===P.currentTarget,ce=P.ctrlKey||P.altKey||P.metaKey,be=P.key.length===1;q&&(P.key==="Tab"&&P.preventDefault(),!ce&&be&&W(P.key));const re=E.current;if(P.target!==re||!kf.includes(P.key))return;P.preventDefault();const ee=C().filter(T=>!T.disabled).map(T=>T.ref.current);Ii.includes(P.key)&&ee.reverse(),sp(ee)}),onBlur:R(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(I.current),O.current="")}),onPointerMove:R(e.onPointerMove,lt(P=>{const G=P.target,q=k.current!==P.clientX;if(P.currentTarget.contains(G)&&q){const ce=P.clientX>k.current?"right":"left";F.current=ce,k.current=P.clientX}}))})})})})})})});ji.displayName=ie;var qf="MenuGroup",wo=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(D.div,{role:"group",...o,ref:t})});wo.displayName=qf;var Zf="MenuLabel",ki=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(D.div,{...o,ref:t})});ki.displayName=Zf;var $t="MenuItem",Zo="menu.itemSelect",un=i.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:o,...r}=e,s=i.useRef(null),a=wt($t,e.__scopeMenu),c=mo($t,e.__scopeMenu),l=j(t,s),u=i.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(Zo,{bubbles:!0,cancelable:!0});f.addEventListener(Zo,m=>o?.(m),{once:!0}),er(f,h),h.defaultPrevented?u.current=!1:a.onClose()}};return p.jsx($i,{...r,ref:l,disabled:n,onClick:R(e.onClick,d),onPointerDown:f=>{e.onPointerDown?.(f),u.current=!0},onPointerUp:R(e.onPointerUp,f=>{u.current||f.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,f=>{const h=c.searchRef.current!=="";n||h&&f.key===" "||Vn.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});un.displayName=$t;var $i=i.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:o=!1,textValue:r,...s}=e,a=mo($t,n),c=Mi(n),l=i.useRef(null),u=j(t,l),[d,f]=i.useState(!1),[h,m]=i.useState("");return i.useEffect(()=>{const w=l.current;w&&m((w.textContent??"").trim())},[s.children]),p.jsx(ct.ItemSlot,{scope:n,disabled:o,textValue:r??h,children:p.jsx(Hs,{asChild:!0,...c,focusable:!o,children:p.jsx(D.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:u,onPointerMove:R(e.onPointerMove,lt(w=>{o?a.onItemLeave(w):(a.onItemEnter(w),w.defaultPrevented||w.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,lt(w=>a.onItemLeave(w))),onFocus:R(e.onFocus,()=>f(!0)),onBlur:R(e.onBlur,()=>f(!1))})})})}),Jf="MenuCheckboxItem",Fi=i.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:o,...r}=e;return p.jsx(Ui,{scope:e.__scopeMenu,checked:n,children:p.jsx(un,{role:"menuitemcheckbox","aria-checked":Ft(n)?"mixed":n,...r,ref:t,"data-state":xo(n),onSelect:R(r.onSelect,()=>o?.(Ft(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Fi.displayName=Jf;var Wi="MenuRadioGroup",[Qf,ep]=Fe(Wi,{value:void 0,onValueChange:()=>{}}),Bi=i.forwardRef((e,t)=>{const{value:n,onValueChange:o,...r}=e,s=X(o);return p.jsx(Qf,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(wo,{...r,ref:t})})});Bi.displayName=Wi;var Vi="MenuRadioItem",Hi=i.forwardRef((e,t)=>{const{value:n,...o}=e,r=ep(Vi,e.__scopeMenu),s=n===r.value;return p.jsx(Ui,{scope:e.__scopeMenu,checked:s,children:p.jsx(un,{role:"menuitemradio","aria-checked":s,...o,ref:t,"data-state":xo(s),onSelect:R(o.onSelect,()=>r.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});Hi.displayName=Vi;var yo="MenuItemIndicator",[Ui,tp]=Fe(yo,{checked:!1}),Gi=i.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:o,...r}=e,s=tp(yo,n);return p.jsx(Y,{present:o||Ft(s.checked)||s.checked===!0,children:p.jsx(D.span,{...r,ref:t,"data-state":xo(s.checked)})})});Gi.displayName=yo;var np="MenuSeparator",Ki=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e;return p.jsx(D.div,{role:"separator","aria-orientation":"horizontal",...o,ref:t})});Ki.displayName=np;var op="MenuArrow",zi=i.forwardRef((e,t)=>{const{__scopeMenu:n,...o}=e,r=ln(n);return p.jsx(Zt,{...r,...o,ref:t})});zi.displayName=op;var rp="MenuSub",[ov,Yi]=Fe(rp),rt="MenuSubTrigger",Xi=i.forwardRef((e,t)=>{const n=We(rt,e.__scopeMenu),o=wt(rt,e.__scopeMenu),r=Yi(rt,e.__scopeMenu),s=mo(rt,e.__scopeMenu),a=i.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=s,u={__scopeMenu:e.__scopeMenu},d=i.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return i.useEffect(()=>d,[d]),i.useEffect(()=>{const f=c.current;return()=>{window.clearTimeout(f),l(null)}},[c,l]),p.jsx(ho,{asChild:!0,...u,children:p.jsx($i,{id:r.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":r.contentId,"data-state":Ji(n.open),...e,ref:we(t,r.onTriggerChange),onClick:f=>{e.onClick?.(f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:R(e.onPointerMove,lt(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:R(e.onPointerLeave,lt(f=>{d();const h=n.content?.getBoundingClientRect();if(h){const m=n.content?.dataset.side,w=m==="right",v=w?-5:5,g=h[w?"left":"right"],y=h[w?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+v,y:f.clientY},{x:g,y:h.top},{x:y,y:h.top},{x:y,y:h.bottom},{x:g,y:h.bottom}],side:m}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:R(e.onKeyDown,f=>{const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||$f[o.dir].includes(f.key)&&(n.onOpenChange(!0),n.content?.focus(),f.preventDefault())})})})});Xi.displayName=rt;var qi="MenuSubContent",Zi=i.forwardRef((e,t)=>{const n=Ni(ie,e.__scopeMenu),{forceMount:o=n.forceMount,...r}=e,s=We(ie,e.__scopeMenu),a=wt(ie,e.__scopeMenu),c=Yi(qi,e.__scopeMenu),l=i.useRef(null),u=j(t,l);return p.jsx(ct.Provider,{scope:e.__scopeMenu,children:p.jsx(Y,{present:o||s.open,children:p.jsx(ct.Slot,{scope:e.__scopeMenu,children:p.jsx(go,{id:c.contentId,"aria-labelledby":c.triggerId,...r,ref:u,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{a.isUsingKeyboardRef.current&&l.current?.focus(),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:R(e.onFocusOutside,d=>{d.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:R(e.onEscapeKeyDown,d=>{a.onClose(),d.preventDefault()}),onKeyDown:R(e.onKeyDown,d=>{const f=d.currentTarget.contains(d.target),h=Ff[a.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),c.trigger?.focus(),d.preventDefault())})})})})})});Zi.displayName=qi;function Ji(e){return e?"open":"closed"}function Ft(e){return e==="indeterminate"}function xo(e){return Ft(e)?"indeterminate":e?"checked":"unchecked"}function sp(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function ip(e,t){return e.map((n,o)=>e[(t+o)%e.length])}function ap(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=ip(e,Math.max(s,0));r.length===1&&(a=a.filter(u=>u!==n));const l=a.find(u=>u.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function cp(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,a=t.length-1;s<t.length;a=s++){const c=t[s],l=t[a],u=c.x,d=c.y,f=l.x,h=l.y;d>o!=h>o&&n<(f-u)*(o-d)/(h-d)+u&&(r=!r)}return r}function lp(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return cp(n,t)}function lt(e){return t=>t.pointerType==="mouse"?e(t):void 0}var up=Di,dp=ho,fp=Li,pp=ji,hp=wo,vp=ki,mp=un,gp=Fi,wp=Bi,yp=Hi,xp=Gi,bp=Ki,Cp=zi,Sp=Xi,Ep=Zi,dn="DropdownMenu",[Rp]=Q(dn,[Oi]),J=Oi(),[Pp,Qi]=Rp(dn),ea=e=>{const{__scopeDropdownMenu:t,children:n,dir:o,open:r,defaultOpen:s,onOpenChange:a,modal:c=!0}=e,l=J(t),u=i.useRef(null),[d,f]=me({prop:r,defaultProp:s??!1,onChange:a,caller:dn});return p.jsx(Pp,{scope:t,triggerId:ne(),triggerRef:u,contentId:ne(),open:d,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(h=>!h),[f]),modal:c,children:p.jsx(up,{...l,open:d,onOpenChange:f,dir:o,modal:c,children:n})})};ea.displayName=dn;var ta="DropdownMenuTrigger",na=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:o=!1,...r}=e,s=Qi(ta,n),a=J(n);return p.jsx(dp,{asChild:!0,...a,children:p.jsx(D.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...r,ref:we(t,s.triggerRef),onPointerDown:R(e.onPointerDown,c=>{!o&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:R(e.onKeyDown,c=>{o||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});na.displayName=ta;var Ap="DropdownMenuPortal",oa=e=>{const{__scopeDropdownMenu:t,...n}=e,o=J(t);return p.jsx(fp,{...o,...n})};oa.displayName=Ap;var ra="DropdownMenuContent",sa=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=Qi(ra,n),s=J(n),a=i.useRef(!1);return p.jsx(pp,{id:r.contentId,"aria-labelledby":r.triggerId,...s,...o,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,c=>{a.current||r.triggerRef.current?.focus(),a.current=!1,c.preventDefault()}),onInteractOutside:R(e.onInteractOutside,c=>{const l=c.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,d=l.button===2||u;(!r.modal||d)&&(a.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});sa.displayName=ra;var Tp="DropdownMenuGroup",_p=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(hp,{...r,...o,ref:t})});_p.displayName=Tp;var Ip="DropdownMenuLabel",Op=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(vp,{...r,...o,ref:t})});Op.displayName=Ip;var Mp="DropdownMenuItem",ia=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(mp,{...r,...o,ref:t})});ia.displayName=Mp;var Dp="DropdownMenuCheckboxItem",Np=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(gp,{...r,...o,ref:t})});Np.displayName=Dp;var Lp="DropdownMenuRadioGroup",jp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(wp,{...r,...o,ref:t})});jp.displayName=Lp;var kp="DropdownMenuRadioItem",$p=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(yp,{...r,...o,ref:t})});$p.displayName=kp;var Fp="DropdownMenuItemIndicator",Wp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(xp,{...r,...o,ref:t})});Wp.displayName=Fp;var Bp="DropdownMenuSeparator",Vp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(bp,{...r,...o,ref:t})});Vp.displayName=Bp;var Hp="DropdownMenuArrow",Up=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(Cp,{...r,...o,ref:t})});Up.displayName=Hp;var Gp="DropdownMenuSubTrigger",Kp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(Sp,{...r,...o,ref:t})});Kp.displayName=Gp;var zp="DropdownMenuSubContent",Yp=i.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...o}=e,r=J(n);return p.jsx(Ep,{...r,...o,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Yp.displayName=zp;var rv=ea,sv=na,iv=oa,av=sa,cv=ia,fn="Switch",[Xp]=Q(fn),[qp,Zp]=Xp(fn),aa=i.forwardRef((e,t)=>{const{__scopeSwitch:n,name:o,checked:r,defaultChecked:s,required:a,disabled:c,value:l="on",onCheckedChange:u,form:d,...f}=e,[h,m]=i.useState(null),w=j(t,b=>m(b)),v=i.useRef(!1),g=h?d||!!h.closest("form"):!0,[y,x]=me({prop:r,defaultProp:s??!1,onChange:u,caller:fn});return p.jsxs(qp,{scope:n,checked:y,disabled:c,children:[p.jsx(D.button,{type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":da(y),"data-disabled":c?"":void 0,disabled:c,value:l,...f,ref:w,onClick:R(e.onClick,b=>{x(C=>!C),g&&(v.current=b.isPropagationStopped(),v.current||b.stopPropagation())})}),g&&p.jsx(ua,{control:h,bubbles:!v.current,name:o,value:l,checked:y,required:a,disabled:c,form:d,style:{transform:"translateX(-100%)"}})]})});aa.displayName=fn;var ca="SwitchThumb",la=i.forwardRef((e,t)=>{const{__scopeSwitch:n,...o}=e,r=Zp(ca,n);return p.jsx(D.span,{"data-state":da(r.checked),"data-disabled":r.disabled?"":void 0,...o,ref:t})});la.displayName=ca;var Jp="SwitchBubbleInput",ua=i.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:o=!0,...r},s)=>{const a=i.useRef(null),c=j(a,s),l=ei(n),u=Vr(t);return i.useEffect(()=>{const d=a.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const w=new Event("click",{bubbles:o});m.call(d,n),d.dispatchEvent(w)}},[l,n,o]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...r,tabIndex:-1,ref:c,style:{...r.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ua.displayName=Jp;function da(e){return e?"checked":"unchecked"}var lv=aa,uv=la;function Qp(e){const t=eh(e),n=i.forwardRef((o,r)=>{const{children:s,...a}=o,c=i.Children.toArray(s),l=c.find(nh);if(l){const u=l.props.children,d=c.map(f=>f===l?i.Children.count(u)>1?i.Children.only(null):i.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...a,ref:r,children:i.isValidElement(u)?i.cloneElement(u,void 0,d):null})}return p.jsx(t,{...a,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}function eh(e){const t=i.forwardRef((n,o)=>{const{children:r,...s}=n;if(i.isValidElement(r)){const a=rh(r),c=oh(s,r.props);return r.type!==i.Fragment&&(c.ref=o?we(o,a):a),i.cloneElement(r,c)}return i.Children.count(r)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var th=Symbol("radix.slottable");function nh(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===th}function oh(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...c)=>{const l=s(...c);return r(...c),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function rh(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var pn="Popover",[fa]=Q(pn,[_e]),yt=_e(),[sh,Me]=fa(pn),pa=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:a=!1}=e,c=yt(t),l=i.useRef(null),[u,d]=i.useState(!1),[f,h]=me({prop:o,defaultProp:r??!1,onChange:s,caller:pn});return p.jsx(Xt,{...c,children:p.jsx(sh,{scope:t,contentId:ne(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:u,onCustomAnchorAdd:i.useCallback(()=>d(!0),[]),onCustomAnchorRemove:i.useCallback(()=>d(!1),[]),modal:a,children:n})})};pa.displayName=pn;var ha="PopoverAnchor",va=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Me(ha,n),s=yt(n),{onCustomAnchorAdd:a,onCustomAnchorRemove:c}=r;return i.useEffect(()=>(a(),()=>c()),[a,c]),p.jsx(pt,{...s,...o,ref:t})});va.displayName=ha;var ma="PopoverTrigger",ga=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Me(ma,n),s=yt(n),a=j(t,r.triggerRef),c=p.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Ca(r.open),...o,ref:a,onClick:R(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?c:p.jsx(pt,{asChild:!0,...s,children:c})});ga.displayName=ma;var bo="PopoverPortal",[ih,ah]=fa(bo,{forceMount:void 0}),wa=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=Me(bo,t);return p.jsx(ih,{scope:t,forceMount:n,children:p.jsx(Y,{present:n||s.open,children:p.jsx(Je,{asChild:!0,container:r,children:o})})})};wa.displayName=bo;var qe="PopoverContent",ya=i.forwardRef((e,t)=>{const n=ah(qe,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=Me(qe,e.__scopePopover);return p.jsx(Y,{present:o||s.open,children:s.modal?p.jsx(lh,{...r,ref:t}):p.jsx(uh,{...r,ref:t})})});ya.displayName=qe;var ch=Qp("PopoverContent.RemoveScroll"),lh=i.forwardRef((e,t)=>{const n=Me(qe,e.__scopePopover),o=i.useRef(null),r=j(t,o),s=i.useRef(!1);return i.useEffect(()=>{const a=o.current;if(a)return Ht(a)},[]),p.jsx(dt,{as:ch,allowPinchZoom:!0,children:p.jsx(xa,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,a=>{a.preventDefault(),s.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,a=>{const c=a.detail.originalEvent,l=c.button===0&&c.ctrlKey===!0,u=c.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),uh=i.forwardRef((e,t)=>{const n=Me(qe,e.__scopePopover),o=i.useRef(!1),r=i.useRef(!1);return p.jsx(xa,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(o.current||n.triggerRef.current?.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const a=s.target;n.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),xa=i.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:d,...f}=e,h=Me(qe,n),m=yt(n);return Bt(),p.jsx(ut,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:p.jsx(Ze,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:d,onEscapeKeyDown:c,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(qt,{"data-state":Ca(h.open),role:"dialog",id:h.contentId,...m,...f,ref:t,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ba="PopoverClose",dh=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=Me(ba,n);return p.jsx(D.button,{type:"button",...o,ref:t,onClick:R(e.onClick,()=>r.onOpenChange(!1))})});dh.displayName=ba;var fh="PopoverArrow",ph=i.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=yt(n);return p.jsx(Zt,{...r,...o,ref:t})});ph.displayName=fh;function Ca(e){return e?"open":"closed"}var dv=pa,fv=va,pv=ga,hv=wa,vv=ya;export{sv as $,Ch as A,$h as B,Cl as C,El as D,Hh as E,ev as F,tv as G,Kh as H,Gh as I,zh as J,Yh as K,Fh as L,qh as M,Zh as N,bl as O,xl as P,Qh as Q,mh as R,vh as S,Sl as T,Jh as U,Rh as V,nv as W,Vh as X,Uh as Y,Xh as Z,rv as _,wl as a,iv as a0,av as a1,cv as a2,hv as a3,vv as a4,dv as a5,fv as a6,pv as a7,lv as a8,uv as a9,_r as b,gh as c,wh as d,yh as e,xh as f,bh as g,Sh as h,ud as i,p as j,dd as k,Eh as l,Th as m,Ph as n,Ah as o,_h as p,Ih as q,Dh as r,jh as s,kh as t,Lh as u,Nh as v,Oh as w,Mh as x,Wh as y,Bh as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as e,a8 as ie,a9 as oe}from"./radix-ui-VbLlN_Dz.js";import{r}from"./react-vendor-DMek_JCF.js";import{c as q,R as de,T as D,U as ce,V as me,i as xe,B as j,I as K,W as pe}from"./index-B6Z8UW9Q.js";import{CodeEditor as he}from"./code-editor-CbTiomDl.js";import{n as u,aa as ue,a5 as ge,i as be,Y as z,t as L,s as R,a7 as F,h as fe,ab as Y,l as je,m as Ne}from"./icons-D6zYxEB8.js";import"./tanstack-yybD444-.js";import"./notifications-cqk-Qeo2.js";import"./utils-CzKF5WmX.js";import"./form-utils-BXvNPyud.js";import"./code-highlight-C2TXE0-z.js";function H({className:a,...d}){return e.jsx(ie,{"data-slot":"switch",className:q("peer data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:border-ring focus-visible:ring-ring/50 dark:data-[state=unchecked]:bg-input/80 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",a),...d,children:e.jsx(oe,{"data-slot":"switch-thumb",className:q("bg-background dark:data-[state=unchecked]:bg-foreground dark:data-[state=checked]:bg-primary-foreground 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")})})}function Le(){const[a,d]=r.useState(null),[N,M]=r.useState(!0),[c,O]=r.useState(!1),[v,g]=r.useState(null),[$,T]=r.useState(!1),[n,J]=r.useState(null),[m,A]=r.useState(!0),[x,b]=r.useState(null),[w,P]=r.useState(!1),[X,W]=r.useState(!1),[k,V]=r.useState(""),[y,_]=r.useState(""),[C,Z]=r.useState(!1),[S,Q]=r.useState(!1),[E,ee]=r.useState(!1);r.useEffect(()=>{B(),U(),G()},[]),r.useEffect(()=>{a&&(V(a.providers?.gemini?.model??"gemini-2.5-flash"),_(a.providers?.opencode?.model??"opencode/grok-code"))},[a]);const B=async()=>{try{M(!0),g(null);const s=await fetch("/api/websearch");if(!s.ok)throw new Error("Failed to load WebSearch config");const t=await s.json();d(t)}catch(s){g(s.message)}finally{M(!1)}},U=async()=>{try{A(!0);const s=await fetch("/api/websearch/status");if(!s.ok)throw new Error("Failed to load status");const t=await s.json();J(t)}catch(s){console.error("Failed to fetch WebSearch status:",s)}finally{A(!1)}},G=async()=>{try{P(!0);const s=await fetch("/api/config/raw");if(!s.ok){b(null);return}const t=await s.text();b(t)}catch(s){console.error("Failed to fetch raw config:",s),b(null)}finally{P(!1)}},se=async()=>{if(x)try{await navigator.clipboard.writeText(x),W(!0),setTimeout(()=>W(!1),2e3)}catch(s){console.error("Failed to copy:",s)}},te=()=>{const s=a?.providers||{},t=s.gemini?.enabled??!1,i=s.grok?.enabled??!1,I=s.opencode?.enabled??!1;p({enabled:!t||i||I,providers:{...s,gemini:{...s.gemini,enabled:!t}}})},p=async s=>{if(!a)return;const t={...a,...s};d(t);try{O(!0),g(null);const i=await fetch("/api/websearch",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!i.ok){const o=await i.json();throw new Error(o.error||"Failed to save")}const I=await i.json();d(I.websearch),T(!0),setTimeout(()=>T(!1),1500),fetch("/api/config/raw").then(o=>o.ok?o.text():null).then(o=>o&&b(o)).catch(()=>{})}catch(i){d(a),g(i.message)}finally{O(!1)}},l=a?.providers?.gemini?.enabled??!1,f=a?.providers?.grok?.enabled??!1,h=a?.providers?.opencode?.enabled??!1,ae=()=>{const s=a?.providers||{},t=s.grok?.enabled??!1;p({enabled:l||!t||h,providers:{...s,grok:{...s.grok,enabled:!t}}})},re=()=>{const s=a?.providers||{},t=s.opencode?.enabled??!1;p({enabled:l||f||!t,providers:{...s,opencode:{...s.opencode,enabled:!t}}})},ne=()=>{const s=a?.providers?.gemini?.model??"gemini-2.5-flash";if(k!==s){const t=a?.providers||{};p({providers:{...t,gemini:{...t.gemini,model:k}}})}},le=()=>{const s=a?.providers?.opencode?.model??"opencode/grok-code";if(y!==s){const t=a?.providers||{};p({providers:{...t,opencode:{...t.opencode,model:y}}})}};return N?e.jsx("div",{className:"h-[calc(100vh-100px)] flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(u,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{className:"text-lg",children:"Loading configuration..."})]})}):e.jsx("div",{className:"h-[calc(100vh-100px)]",children:e.jsxs(de,{direction:"horizontal",className:"h-full",children:[e.jsx(D,{defaultSize:40,minSize:30,maxSize:55,children:e.jsxs("div",{className:"h-full border-r flex flex-col bg-muted/30 relative",children:[e.jsx("div",{className:"p-5 border-b bg-background",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(ue,{className:"w-6 h-6 text-primary"}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-lg font-semibold",children:"WebSearch"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"CLI-based web search for third-party profiles"})]})]})}),e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${v||$?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[v&&e.jsxs(ce,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(ge,{className:"h-4 w-4"}),e.jsx(me,{children:v})]}),$&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(be,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:"Saved"})]})]}),e.jsx(xe,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between p-4 rounded-lg bg-muted/50",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:l?"WebSearch enabled":"WebSearch disabled"}),m?e.jsx("p",{className:"text-sm text-muted-foreground",children:"Checking status..."}):n?.readiness?e.jsx("p",{className:"text-sm text-muted-foreground",children:n.readiness.message}):null]}),e.jsx(j,{variant:"ghost",size:"sm",onClick:U,disabled:m,children:e.jsx(u,{className:`w-4 h-4 ${m?"animate-spin":""}`})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-base font-medium",children:"Providers"}),e.jsxs("div",{className:`rounded-lg border transition-colors ${l?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{className:`w-5 h-5 ${l?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"gemini"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"FREE"}),n?.geminiCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Google Gemini CLI (1000 req/day free)"})]})]}),e.jsx(H,{checked:l,onCheckedChange:te,disabled:c||!n?.geminiCli?.installed})]}),l&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Model:"}),e.jsx(K,{value:k,onChange:s=>V(s.target.value),onBlur:ne,placeholder:"gemini-2.5-flash",className:"h-8 text-sm font-mono",disabled:c})]})}),!n?.geminiCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>Z(!C),className:"flex items-center gap-2 text-sm text-amber-600 dark:text-amber-400 hover:underline w-full py-2",children:[C?e.jsx(L,{className:"w-4 h-4"}):e.jsx(R,{className:"w-4 h-4"}),"How to install Gemini CLI"]}),C&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-amber-50 dark:bg-amber-900/20 text-sm",children:[e.jsx("p",{className:"text-amber-700 dark:text-amber-300 mb-2",children:"Install globally (FREE tier available):"}),e.jsx("code",{className:"text-sm bg-amber-100 dark:bg-amber-900/40 px-2 py-1 rounded font-mono block mb-2",children:"npm install -g @google/gemini-cli"}),e.jsxs("a",{href:"https://github.com/google-gemini/gemini-cli",target:"_blank",rel:"noopener noreferrer",className:"text-amber-700 dark:text-amber-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(F,{className:"w-3 h-3"}),"View documentation"]})]})]})]}),e.jsxs("div",{className:`rounded-lg border transition-colors ${h?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{className:`w-5 h-5 ${h?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"opencode"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"FREE"}),n?.opencodeCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"OpenCode (web search via Zen)"})]})]}),e.jsx(H,{checked:h,onCheckedChange:re,disabled:c||!n?.opencodeCli?.installed})]}),h&&e.jsx("div",{className:"px-4 pb-4 pt-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{className:"text-sm text-muted-foreground whitespace-nowrap",children:"Model:"}),e.jsx(K,{value:y,onChange:s=>_(s.target.value),onBlur:le,placeholder:"opencode/grok-code",className:"h-8 text-sm font-mono",disabled:c})]})}),!n?.opencodeCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>Q(!S),className:"flex items-center gap-2 text-sm text-purple-600 dark:text-purple-400 hover:underline w-full py-2",children:[S?e.jsx(L,{className:"w-4 h-4"}):e.jsx(R,{className:"w-4 h-4"}),"How to install OpenCode"]}),S&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-purple-50 dark:bg-purple-900/20 text-sm",children:[e.jsx("p",{className:"text-purple-700 dark:text-purple-300 mb-2",children:"Install globally (FREE tier available):"}),e.jsx("code",{className:"text-sm bg-purple-100 dark:bg-purple-900/40 px-2 py-1 rounded font-mono block mb-2",children:"curl -fsSL https://opencode.ai/install | bash"}),e.jsxs("a",{href:"https://github.com/sst/opencode",target:"_blank",rel:"noopener noreferrer",className:"text-purple-700 dark:text-purple-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(F,{className:"w-3 h-3"}),"View documentation"]})]})]})]}),e.jsxs("div",{className:`rounded-lg border transition-colors ${f?"border-primary border-l-4":"border-border"}`,children:[e.jsxs("div",{className:"flex items-center justify-between p-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(z,{className:`w-5 h-5 ${f?"text-primary":"text-muted-foreground"}`}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("p",{className:"font-mono font-medium",children:"grok"}),e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-blue-500/10 text-blue-600 font-medium",children:"GROK_API_KEY"}),n?.grokCli?.installed?e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-green-500/10 text-green-600 font-medium",children:"installed"}):e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-amber-500/10 text-amber-600 font-medium",children:"not installed"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"xAI Grok CLI (web + X search)"})]})]}),e.jsx(H,{checked:f,onCheckedChange:ae,disabled:c||!n?.grokCli?.installed})]}),!n?.grokCli?.installed&&!m&&e.jsxs("div",{className:"px-4 pb-4 pt-0 border-t border-border/50",children:[e.jsxs("button",{onClick:()=>ee(!E),className:"flex items-center gap-2 text-sm text-blue-600 dark:text-blue-400 hover:underline w-full py-2",children:[E?e.jsx(L,{className:"w-4 h-4"}):e.jsx(R,{className:"w-4 h-4"}),"How to install Grok CLI"]}),E&&e.jsxs("div",{className:"mt-2 p-3 rounded-md bg-blue-50 dark:bg-blue-900/20 text-sm",children:[e.jsx("p",{className:"text-blue-700 dark:text-blue-300 mb-2",children:"Install globally (requires xAI API key):"}),e.jsx("code",{className:"text-sm bg-blue-100 dark:bg-blue-900/40 px-2 py-1 rounded font-mono block mb-2",children:"npm install -g @vibe-kit/grok-cli"}),e.jsxs("a",{href:"https://github.com/superagent-ai/grok-cli",target:"_blank",rel:"noopener noreferrer",className:"text-blue-700 dark:text-blue-300 hover:underline inline-flex items-center gap-1",children:[e.jsx(F,{className:"w-3 h-3"}),"View documentation"]})]})]})]})]})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(j,{variant:"outline",size:"sm",onClick:()=>{B(),G()},disabled:N||c,className:"w-full",children:[e.jsx(u,{className:`w-4 h-4 mr-2 ${N?"animate-spin":""}`}),"Refresh"]})})]})}),e.jsx(pe,{className:"w-2 bg-border hover:bg-primary/20 transition-colors cursor-col-resize flex items-center justify-center group",children:e.jsx(fe,{className:"w-3 h-3 text-muted-foreground group-hover:text-primary"})}),e.jsx(D,{defaultSize:60,minSize:35,children:e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"p-4 border-b bg-background flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(Y,{className:"w-5 h-5 text-primary"}),e.jsxs("div",{children:[e.jsx("h2",{className:"font-semibold",children:"config.yaml"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"~/.ccs/config.yaml"})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx(j,{variant:"outline",size:"sm",onClick:se,disabled:!x,children:X?e.jsxs(e.Fragment,{children:[e.jsx(je,{className:"w-4 h-4 mr-1"}),"Copied"]}):e.jsxs(e.Fragment,{children:[e.jsx(Ne,{className:"w-4 h-4 mr-1"}),"Copy"]})}),e.jsx(j,{variant:"outline",size:"sm",onClick:G,disabled:w,children:e.jsx(u,{className:`w-4 h-4 ${w?"animate-spin":""}`})})]})]}),e.jsx("div",{className:"flex-1 overflow-auto",children:w?e.jsxs("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:[e.jsx(u,{className:"w-5 h-5 animate-spin mr-2"}),"Loading..."]}):x?e.jsx(he,{value:x,onChange:()=>{},language:"yaml",readonly:!0,minHeight:"auto",className:"min-h-full"}):e.jsx("div",{className:"flex items-center justify-center h-full text-muted-foreground",children:e.jsxs("div",{className:"text-center",children:[e.jsx(Y,{className:"w-12 h-12 mx-auto mb-3 opacity-30"}),e.jsx("p",{children:"Config file not found"}),e.jsx("code",{className:"text-sm bg-muted px-2 py-1 rounded mt-2 inline-block",children:"ccs migrate"})]})})})]})})]})})}export{Le as SettingsPage};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as s}from"./radix-ui-VbLlN_Dz.js";import{r as d}from"./react-vendor-DMek_JCF.js";import{C as l,a as m}from"./card-Chzj_-Ta.js";import{_ as c,$ as x,U as u,a0 as h,V as p,B as g}from"./index-B6Z8UW9Q.js";import{J as j,u as f,ae as N,T as b}from"./icons-D6zYxEB8.js";import"./tanstack-yybD444-.js";import"./notifications-cqk-Qeo2.js";import"./utils-CzKF5WmX.js";import"./form-utils-BXvNPyud.js";import"./code-highlight-C2TXE0-z.js";function D(){const[t,r]=d.useState("commands"),{data:e}=c(),{data:n,isLoading:i}=x(t),o=[{id:"commands",label:"Commands",icon:j,count:e?.commands??0},{id:"skills",label:"Skills",icon:f,count:e?.skills??0},{id:"agents",label:"Agents",icon:N,count:e?.agents??0}];return s.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Shared Data"}),s.jsx("p",{className:"text-muted-foreground",children:"Commands, skills, and agents shared across Claude instances"})]}),e&&!e.symlinkStatus.valid&&s.jsxs(u,{variant:"warning",children:[s.jsx(b,{className:"h-4 w-4"}),s.jsx(h,{children:"Configuration Required"}),s.jsxs(p,{children:[e.symlinkStatus.message,". Run `ccs sync` to configure."]})]}),s.jsx("div",{className:"flex gap-2 border-b pb-2",children:o.map(a=>s.jsxs(g,{variant:t===a.id?"default":"ghost",size:"sm",onClick:()=>r(a.id),className:"flex items-center gap-2",children:[s.jsx(a.icon,{className:"w-4 h-4"}),a.label," (",a.count,")"]},a.id))}),s.jsx("div",{className:"mt-4",children:i?s.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):n?.items.length===0?s.jsxs("div",{className:"text-muted-foreground",children:["No ",t," found"]}):s.jsx("div",{className:"grid gap-3",children:n?.items.map(a=>s.jsx(l,{children:s.jsxs(m,{children:[s.jsx("div",{className:"font-medium",children:a.name}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 font-mono truncate",children:a.path})]})},a.name))})})]})}export{D as SharedPage};
|