@tickernelz/paperclip-pro-ui 2026.1104.2 → 2026.1105.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.
Files changed (64) hide show
  1. package/dist/assets/{AgentAvatar-D4YQ4myL.js → AgentAvatar-CvyykZ_o.js} +1 -1
  2. package/dist/assets/{Agents.production-3o22cTMy.js → Agents.production-DUI6AhwG.js} +2 -2
  3. package/dist/assets/{BreadcrumbContext-DP0mgUIg.js → BreadcrumbContext-BdR2QZTG.js} +1 -1
  4. package/dist/assets/{CompanyActivity.production-BuMyl9vi.js → CompanyActivity.production-D6dcprLq.js} +1 -1
  5. package/dist/assets/{CompanyExport-CxG4H3oy.js → CompanyExport-gCQ-_PJI.js} +1 -1
  6. package/dist/assets/{CompanySkills.production-gGx6JkVb.js → CompanySkills.production-BA5OJ0hH.js} +1 -1
  7. package/dist/assets/{EmptyState-BN5HM6-K.js → EmptyState-COTvzeWR.js} +1 -1
  8. package/dist/assets/{MarkdownBody-N2K7JfY-.js → MarkdownBody-C1YBAJse.js} +1 -1
  9. package/dist/assets/{MarkdownEditor-DHz7g42W.js → MarkdownEditor-DCjWqjUr.js} +1 -1
  10. package/dist/assets/{OrgChart.production-D9TmPZB8.js → OrgChart.production-gtlqn5p2.js} +1 -1
  11. package/dist/assets/{PageSkeleton-BiXcKvFW.js → PageSkeleton-BF2o9r1d.js} +1 -1
  12. package/dist/assets/{RoutineDetail.production-BIlrKHc3.js → RoutineDetail.production-BGGd4_si.js} +1 -1
  13. package/dist/assets/{RoutineRunVariablesDialog-CrC88u8T.js → RoutineRunVariablesDialog-BH0cvoTO.js} +1 -1
  14. package/dist/assets/{Routines.production-DiZ3H_oD.js → Routines.production-zUQqy5oH.js} +1 -1
  15. package/dist/assets/{SearchableSelect-CyZJenSa.js → SearchableSelect-Bx1Kt-dp.js} +1 -1
  16. package/dist/assets/{StatusIcon-C_7wHYAC.js → StatusIcon-_JGOqNQ3.js} +1 -1
  17. package/dist/assets/{Terminal-DszNkjQY.js → Terminal-Cstwn3GT.js} +1 -1
  18. package/dist/assets/{ToastContext-YqYQB596.js → ToastContext-GEapFtzb.js} +1 -1
  19. package/dist/assets/{access-CspWWirX.js → access-Xsz-Z8Lm.js} +1 -1
  20. package/dist/assets/agent-avatar-url-B_0YMMar.js +1 -0
  21. package/dist/assets/{agents-BXUtBaur.js → agents-D-qAkJZt.js} +1 -1
  22. package/dist/assets/{alert-dialog-BGWR1eHm.js → alert-dialog-C78v0zDA.js} +1 -1
  23. package/dist/assets/{arrow-right-QtlfoJHE.js → arrow-right-DNfKtTnU.js} +1 -1
  24. package/dist/assets/{badge-_pdOC0PF.js → badge-BKd5IdYw.js} +1 -1
  25. package/dist/assets/{bot-B09KshQK.js → bot-5n6nYPlO.js} +1 -1
  26. package/dist/assets/{boxes-Bpd3vwBa.js → boxes-DcYq-jCc.js} +25 -25
  27. package/dist/assets/{card-B_2b5Riw.js → card-XuMW7HM-.js} +1 -1
  28. package/dist/assets/{check-2BJzr5lo.js → check-2qo6ZJ2G.js} +1 -1
  29. package/dist/assets/{checkbox-DhPd8h_U.js → checkbox-BWE2L3Gp.js} +1 -1
  30. package/dist/assets/{chevron-down-C8ZdH7h9.js → chevron-down-BiI_5EGy.js} +1 -1
  31. package/dist/assets/{clipboard-B6GwC8zN.js → clipboard-Bi4egf3Q.js} +1 -1
  32. package/dist/assets/{definition-B7zsSRty.js → definition-CdfMs8VB.js} +1 -1
  33. package/dist/assets/{dialog-aW5qVpwP.js → dialog-Be3BfHbu.js} +1 -1
  34. package/dist/assets/{dist-f8T_RDWp.js → dist-DEpI4MsF.js} +1 -1
  35. package/dist/assets/{dist-Cwi5N9Q2.js → dist-DTju_OGk.js} +1 -1
  36. package/dist/assets/{dist-BNyB3Sjo.js → dist-D_GJjr4Y.js} +1 -1
  37. package/dist/assets/{dist-G1LZKTxg.js → dist-DdELVTA2.js} +1 -1
  38. package/dist/assets/{dist-rAdi5Ixy.js → dist-FV5ug9Gh.js} +1 -1
  39. package/dist/assets/{environments-C7g5xojw.js → environments-BZZFtpSV.js} +1 -1
  40. package/dist/assets/{external-link-CDJwwbV8.js → external-link-DWz359_G.js} +1 -1
  41. package/dist/assets/{file-text-HU_olDIx.js → file-text--r-wpJ-x.js} +1 -1
  42. package/dist/assets/{health-Za7wEC5p.js → health-DdYtGPqQ.js} +1 -1
  43. package/dist/assets/{heartbeats-CpU47ZZC.js → heartbeats-BpBzZUnr.js} +1 -1
  44. package/dist/assets/{index-g3t6OqDb.js → index-C4vuH91F.js} +171 -170
  45. package/dist/assets/index-DeHHR47K.css +1 -0
  46. package/dist/assets/{input-CfcFr-x-.js → input-BUMo9M0E.js} +1 -1
  47. package/dist/assets/{instanceSettings-CIY4sDga.js → instanceSettings-C15rYV4N.js} +1 -1
  48. package/dist/assets/{label-CRFTGD7I.js → label-DxRcxQw2.js} +1 -1
  49. package/dist/assets/{mention-chips-1XYhZxbY.js → mention-chips-BeL0ezh9.js} +1 -1
  50. package/dist/assets/{rotate-ccw-MDZCGMRv.js → rotate-ccw-Cvm9Gwuw.js} +1 -1
  51. package/dist/assets/{save-BDLuZ_1b.js → save-BfH6Olgf.js} +1 -1
  52. package/dist/assets/{select-CV4NIBut.js → select-DpNDmO-G.js} +1 -1
  53. package/dist/assets/{sheet-gHOCLZNA.js → sheet-D80ckd0R.js} +1 -1
  54. package/dist/assets/{skeleton-BXdcfOZv.js → skeleton-8ry9j5Fi.js} +1 -1
  55. package/dist/assets/{tabs-D69nzsXS.js → tabs-wYrBE8R2.js} +1 -1
  56. package/dist/assets/{use-adapter-capabilities--7ZiaS5B.js → use-adapter-capabilities-BvfYABSN.js} +1 -1
  57. package/dist/assets/{useHiddenSettings-DUdQI3FV.js → useHiddenSettings-NiFytxe3.js} +1 -1
  58. package/dist/assets/{usePrefersReducedMotion-CT6hiLGt.js → usePrefersReducedMotion-DxMMBfvJ.js} +1 -1
  59. package/dist/assets/{x-BYvg7sTI.js → x-C7r-gM7x.js} +1 -1
  60. package/dist/index.html +50 -50
  61. package/dist/sw.js +1 -1
  62. package/package.json +1 -1
  63. package/dist/assets/agent-avatar-url-BgdXoMNW.js +0 -1
  64. package/dist/assets/index-C5M2iOzo.css +0 -1
@@ -1,4 +1,4 @@
1
- var nn=Object.defineProperty;var a=(e,t)=>nn(e,"name",{value:t,configurable:!0});import{i as We}from"./rolldown-runtime-ZpX3ckPj.js";import{$a as rn,A as on,Aa as sn,D as an,E as ln,Fa as un,G as k,Ha as Xe,Ia as ht,Ja as cn,Ka as Re,L as dn,La as fn,M as qe,Na as Ye,O as pn,Oa as mn,Pa as F,Qa as hn,Ra as Je,Ua as V,Va as Ze,Wa as et,_ as vn,eo as gn,j as yn,k as bn,n as vt,v as En,za as gt}from"./boxes-Bpd3vwBa.js";import{Vt as xn,Wt as wn,r as Cn,rt as Sn,zt as On}from"./BreadcrumbContext-DP0mgUIg.js";import{n as Nn}from"./dist-BNyB3Sjo.js";import{c as Rn,i as Dn,o as Pn,r as _n,t as In}from"./dialog-aW5qVpwP.js";import{t as An}from"./check-2BJzr5lo.js";import{t as yt}from"./x-BYvg7sTI.js";var Tn=class extends ht{static{a(this,"MutationCache")}#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){const r=new mn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t)?.find(r=>r.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=ye(e);return typeof t=="string"?this.#t.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ze(t,n))}findAll(e={}){return this.getAll().filter(t=>Ze(e,t))}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return F.batch(()=>Promise.all(e.map(t=>t.continue().catch(V))))}};function ye(e){return e.options.scope?.id}a(ye,"scopeFor");var Mn=class extends ht{static{a(this,"QueryCache")}#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){const r=t.queryKey,o=t.queryHash??gt(r,t);let s=this.get(o);return s||(s=new sn({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){F.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Xe(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Xe(e,n)):t}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$o=class{static{a(this,"QueryClient")}#e;#t;#n;#o;#s;#r;#i;#a;constructor(e={}){this.#e=e.queryCache||new Mn,this.#t=e.mutationCache||new Tn,this.#n=e.defaultOptions||{},this.#o=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#i=un.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Ye.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#i?.(),this.#i=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Re(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,s=fn(t,o);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return F.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;F.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return F.batch(()=>{const r=n.findAll(e),o=new Set(r);return r.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:a(s=>o.has(s),"predicate")},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},r=F.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(V).catch(V)}invalidateQueries(e,t={}){return F.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=F.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(V)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(V)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t),r=n.isStaleByTime(Re(t.staleTime,n))?await n.fetch(t):n.state.data,o=t.select;return o?o(r):r}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Re(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(V).catch(V)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(V).catch(V)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ye.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Je(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{et(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(Je(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{et(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=gt(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===cn&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},i=We(gn(),1),f=We(hn(),1),kn=Object.defineProperty,ve=a((e,t)=>kn(e,"name",{value:t,configurable:!0}),"__name"),Ue="Collapsible",[jn,Qo]=yn(Ue),[Fn,He]=jn(Ue),Ln=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,open:o,defaultOpen:s,disabled:u,onOpenChange:l,...p}=t,[c,h]=pn({prop:o,defaultProp:s??!1,onChange:l,caller:Ue});return(0,f.jsx)(Fn,{scope:r,disabled:u,contentId:ln(),open:c,onOpenToggle:i.useCallback(()=>h(y=>!y),[h]),children:(0,f.jsx)(qe.div,{"data-state":Ce(c),"data-disabled":u?"":void 0,...p,ref:n})})},"Collapsible2"),"Collapsible")),$n="CollapsibleTrigger",Qn=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,...o}=t,s=He($n,r);return(0,f.jsx)(qe.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":Ce(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...o,ref:n,onClick:on(t.onClick,s.onOpenToggle)})},"CollapsibleTrigger2"),"CollapsibleTrigger")),bt="CollapsibleContent",zn=i.forwardRef(ve(a(function(t,n){const{forceMount:r,...o}=t,s=He(bt,t.__scopeCollapsible);return(0,f.jsx)(an,{present:r||s.open,children:a(({present:u})=>(0,f.jsx)(Wn,{...o,ref:n,present:u}),"children")})},"CollapsibleContent2"),"CollapsibleContent")),Wn=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,present:o,children:s,...u}=t,l=He(bt,r),[p,c]=i.useState(o),h=i.useRef(null),y=dn(n,h),E=i.useRef(0),x=E.current,R=i.useRef(0),C=R.current,S=l.open||p,I=i.useRef(S),_=i.useRef(void 0);return i.useEffect(()=>{const N=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(N)},[]),bn(()=>{const N=h.current;if(N){_.current=_.current||{transitionDuration:N.style.transitionDuration,animationName:N.style.animationName},N.style.transitionDuration="0s",N.style.animationName="none";const P=N.getBoundingClientRect();E.current=P.height,R.current=P.width,I.current||(N.style.transitionDuration=_.current.transitionDuration,N.style.animationName=_.current.animationName),c(o)}},[l.open,o]),(0,f.jsx)(qe.div,{"data-state":Ce(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!S,...u,ref:y,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:S&&s})},"CollapsibleContentImpl2"),"CollapsibleContentImpl"));function Ce(e){return e?"open":"closed"}a(Ce,"getState$1");ve(Ce,"getState");var qn=Ln,Et={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};Et.node;var Un=vt(Et),xt={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};xt.node;var zo=vt(xt);function Wo({...e}){return(0,f.jsx)(qn,{"data-slot":"collapsible",...e})}a(Wo,"Collapsible");function qo({...e}){return(0,f.jsx)(Qn,{"data-slot":"collapsible-trigger",...e})}a(qo,"CollapsibleTrigger");function Uo({...e}){return(0,f.jsx)(zn,{"data-slot":"collapsible-content",...e})}a(Uo,"CollapsibleContent");var tt=1,Hn=.9,Vn=.8,Kn=.17,De=.1,Pe=.999,Bn=.9999,Gn=.99,Xn=/[\\\/_+.#"@\[\(\{&]/,Yn=/[\\\/_+.#"@\[\(\{&]/g,Jn=/[\s-]/,wt=/[\s-]/g;function je(e,t,n,r,o,s,u){if(s===t.length)return o===e.length?tt:Gn;var l=`${o},${s}`;if(u[l]!==void 0)return u[l];for(var p=r.charAt(s),c=n.indexOf(p,o),h=0,y,E,x,R;c>=0;)y=je(e,t,n,r,c+1,s+1,u),y>h&&(c===o?y*=tt:Xn.test(e.charAt(c-1))?(y*=Vn,x=e.slice(o,c-1).match(Yn),x&&o>0&&(y*=Math.pow(Pe,x.length))):Jn.test(e.charAt(c-1))?(y*=Hn,R=e.slice(o,c-1).match(wt),R&&o>0&&(y*=Math.pow(Pe,R.length))):(y*=Kn,o>0&&(y*=Math.pow(Pe,c-o))),e.charAt(c)!==t.charAt(s)&&(y*=Bn)),(y<De&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(E=je(e,t,n,r,c+1,s+2,u),E*De>y&&(y=E*De)),y>h&&(h=y),c=n.indexOf(p,c+1);return u[l]=h,h}a(je,"G");function nt(e){return e.toLowerCase().replace(wt," ")}a(nt,"D");function Zn(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,je(e,t,nt(e),nt(t),0,0,{})}a(Zn,"W");var Ho=!!(typeof window<"u"&&window.document&&window.document.createElement);function J(e,t,{checkForDefaultPrevented:n=!0}={}){return a(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}a(J,"composeEventHandlers");function rt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}a(rt,"setRef");function te(...e){return t=>{let n=!1;const r=e.map(o=>{const s=rt(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():rt(e[o],null)}}}}a(te,"composeRefs");function oe(...e){return i.useCallback(te(...e),e)}a(oe,"useComposedRefs");function er(e,t){const n=i.createContext(t),r=a(s=>{const{children:u,...l}=s,p=i.useMemo(()=>l,Object.values(l));return(0,f.jsx)(n.Provider,{value:p,children:u})},"Provider");r.displayName=e+"Provider";function o(s){const u=i.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return a(o,"useContext2"),[r,o]}a(er,"createContext2");function tr(e,t=[]){let n=[];function r(s,u){const l=i.createContext(u),p=n.length;n=[...n,u];const c=a(y=>{const{scope:E,children:x,...R}=y,C=E?.[e]?.[p]||l,S=i.useMemo(()=>R,Object.values(R));return(0,f.jsx)(C.Provider,{value:S,children:x})},"Provider");c.displayName=s+"Provider";function h(y,E){const x=E?.[e]?.[p]||l,R=i.useContext(x);if(R)return R;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${s}\``)}return a(h,"useContext2"),[c,h]}a(r,"createContext3");const o=a(()=>{const s=n.map(u=>i.createContext(u));return a(function(l){const p=l?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:p}}),[l,p])},"useScope")},"createScope");return o.scopeName=e,[r,nr(o,...t)]}a(tr,"createContextScope");function nr(...e){const t=e[0];if(e.length===1)return t;const n=a(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return a(function(s){const u=r.reduce((l,{useScope:p,scopeName:c})=>{const h=p(s)[`__scope${c}`];return{...l,...h}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}a(nr,"composeContextScopes");var me=globalThis?.document?i.useLayoutEffect:()=>{},rr=i[" useId ".trim().toString()]||(()=>{}),or=0;function K(e){const[t,n]=i.useState(rr());return me(()=>{e||n(r=>r??String(or++))},[e]),e||(t?`radix-${t}`:"")}a(K,"useId");var sr=i[" useInsertionEffect ".trim().toString()]||me;function ir({prop:e,defaultProp:t,onChange:n=a(()=>{},"onChange"),caller:r}){const[o,s,u]=ar({defaultProp:t,onChange:n}),l=e!==void 0,p=l?e:o;{const c=i.useRef(e!==void 0);i.useEffect(()=>{const h=c.current;c.current=l},[l,r])}return[p,i.useCallback(c=>{if(l){const h=lr(c)?c(e):c;h!==e&&u.current?.(h)}else s(c)},[l,e,s,u])]}a(ir,"useControllableState");function ar({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),s=i.useRef(t);return sr(()=>{s.current=t},[t]),i.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}a(ar,"useUncontrolledState");function lr(e){return typeof e=="function"}a(lr,"isFunction");var Ct=We(rn(),1);function St(e){const t=ur(e),n=i.forwardRef((r,o)=>{const{children:s,...u}=r,l=i.Children.toArray(s),p=l.find(dr);if(p){const c=p.props.children,h=l.map(y=>y===p?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:y);return(0,f.jsx)(t,{...u,ref:o,children:i.isValidElement(c)?i.cloneElement(c,void 0,h):null})}return(0,f.jsx)(t,{...u,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}a(St,"createSlot");function ur(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const u=pr(o),l=fr(s,o.props);return o.type!==i.Fragment&&(l.ref=r?te(r,u):u),i.cloneElement(o,l)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}a(ur,"createSlotClone");var cr=Symbol("radix.slottable");function dr(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cr}a(dr,"isSlottable");function fr(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...u)=>{const l=s(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(fr,"mergeProps");function pr(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)}a(pr,"getElementRef$1");var T=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=St(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:u,...l}=o,p=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,f.jsx)(p,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mr(e,t){e&&Ct.flushSync(()=>e.dispatchEvent(t))}a(mr,"dispatchDiscreteCustomEvent");function he(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}a(he,"useCallbackRef");function hr(e,t=globalThis?.document){const n=he(e);i.useEffect(()=>{const r=a(o=>{o.key==="Escape"&&n(o)},"handleKeyDown");return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}a(hr,"useEscapeKeydown");var vr="DismissableLayer",Fe="dismissableLayer.update",gr="dismissableLayer.pointerDownOutside",yr="dismissableLayer.focusOutside",ot,Ot=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...p}=e,c=i.useContext(Ot),[h,y]=i.useState(null),E=h?.ownerDocument??globalThis?.document,[,x]=i.useState({}),R=oe(t,w=>y(w)),C=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),I=C.indexOf(S),_=h?C.indexOf(h):-1,N=c.layersWithOutsidePointerEventsDisabled.size>0,P=_>=I,Q=xr(w=>{const U=w.target,L=[...c.branches].some(q=>q.contains(U));!P||L||(o?.(w),u?.(w),w.defaultPrevented||l?.())},E),D=wr(w=>{const U=w.target;[...c.branches].some(L=>L.contains(U))||(s?.(w),u?.(w),w.defaultPrevented||l?.())},E);return hr(w=>{_===c.layers.size-1&&(r?.(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},E),i.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ot=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),st(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=ot)}},[h,E,n,c]),i.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),st())},[h,c]),i.useEffect(()=>{const w=a(()=>x({}),"handleUpdate");return document.addEventListener(Fe,w),()=>document.removeEventListener(Fe,w)},[]),(0,f.jsx)(T.div,{...p,ref:R,style:{pointerEvents:N?P?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,D.onFocusCapture),onBlurCapture:J(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,Q.onPointerDownCapture)})});Nt.displayName=vr;var br="DismissableLayerBranch",Er=i.forwardRef((e,t)=>{const n=i.useContext(Ot),r=i.useRef(null),o=oe(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),(0,f.jsx)(T.div,{...e,ref:o})});Er.displayName=br;function xr(e,t=globalThis?.document){const n=he(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a(l=>{if(l.target&&!r.current){let p=a(function(){Rt(gr,n,c,{discrete:!0})},"handleAndDispatchPointerDownOutsideEvent2");const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=p,t.addEventListener("click",o.current,{once:!0})):p()}else t.removeEventListener("click",o.current);r.current=!1},"handlePointerDown"),u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:a(()=>r.current=!0,"onPointerDownCapture")}}a(xr,"usePointerDownOutside");function wr(e,t=globalThis?.document){const n=he(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a(s=>{s.target&&!r.current&&Rt(yr,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:a(()=>r.current=!0,"onFocusCapture"),onBlurCapture:a(()=>r.current=!1,"onBlurCapture")}}a(wr,"useFocusOutside");function st(){const e=new CustomEvent(Fe);document.dispatchEvent(e)}a(st,"dispatchUpdate");function Rt(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mr(o,s):o.dispatchEvent(s)}a(Rt,"handleAndDispatchCustomEvent");var _e="focusScope.autoFocusOnMount",Ie="focusScope.autoFocusOnUnmount",it={bubbles:!1,cancelable:!0},Cr="FocusScope",Dt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[l,p]=i.useState(null),c=he(o),h=he(s),y=i.useRef(null),E=oe(t,C=>p(C)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let C=a(function(N){if(x.paused||!l)return;const P=N.target;l.contains(P)?y.current=P:Y(y.current,{select:!0})},"handleFocusIn2"),S=a(function(N){if(x.paused||!l)return;const P=N.relatedTarget;P!==null&&(l.contains(P)||Y(y.current,{select:!0}))},"handleFocusOut2"),I=a(function(N){if(document.activeElement===document.body)for(const P of N)P.removedNodes.length>0&&Y(l)},"handleMutations2");document.addEventListener("focusin",C),document.addEventListener("focusout",S);const _=new MutationObserver(I);return l&&_.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",S),_.disconnect()}}},[r,l,x.paused]),i.useEffect(()=>{if(l){lt.add(x);const C=document.activeElement;if(!l.contains(C)){const S=new CustomEvent(_e,it);l.addEventListener(_e,c),l.dispatchEvent(S),S.defaultPrevented||(Sr(Pr(Pt(l)),{select:!0}),document.activeElement===C&&Y(l))}return()=>{l.removeEventListener(_e,c),setTimeout(()=>{const S=new CustomEvent(Ie,it);l.addEventListener(Ie,h),l.dispatchEvent(S),S.defaultPrevented||Y(C??document.body,{select:!0}),l.removeEventListener(Ie,h),lt.remove(x)},0)}}},[l,c,h,x]);const R=i.useCallback(C=>{if(!n&&!r||x.paused)return;const S=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,I=document.activeElement;if(S&&I){const _=C.currentTarget,[N,P]=Or(_);N&&P?!C.shiftKey&&I===P?(C.preventDefault(),n&&Y(N,{select:!0})):C.shiftKey&&I===N&&(C.preventDefault(),n&&Y(P,{select:!0})):I===_&&C.preventDefault()}},[n,r,x.paused]);return(0,f.jsx)(T.div,{tabIndex:-1,...u,ref:E,onKeyDown:R})});Dt.displayName=Cr;function Sr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Y(r,{select:t}),document.activeElement!==n)return}a(Sr,"focusFirst");function Or(e){const t=Pt(e);return[at(t,e),at(t.reverse(),e)]}a(Or,"getTabbableEdges");function Pt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}a(Pt,"getTabbableCandidates");function at(e,t){for(const n of e)if(!Nr(n,{upTo:t}))return n}a(at,"findVisible");function Nr(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}a(Nr,"isHidden");function Rr(e){return e instanceof HTMLInputElement&&"select"in e}a(Rr,"isSelectableInput");function Y(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rr(e)&&t&&e.select()}}a(Y,"focus");var lt=Dr();function Dr(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ut(e,t),e.unshift(t)},remove(t){e=ut(e,t),e[0]?.resume()}}}a(Dr,"createFocusScopesStack");function ut(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}a(ut,"arrayRemove");function Pr(e){return e.filter(t=>t.tagName!=="A")}a(Pr,"removeLinks");var _r="Portal",_t=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=i.useState(!1);me(()=>s(!0),[]);const u=n||o&&globalThis?.document?.body;return u?Ct.createPortal((0,f.jsx)(T.div,{...r,ref:t}),u):null});_t.displayName=_r;function Ir(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}a(Ir,"useStateMachine");var Se=a(e=>{const{present:t,children:n}=e,r=Ar(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=oe(r.ref,Tr(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null},"Presence");Se.displayName="Presence";function Ar(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),s=i.useRef("none"),[u,l]=Ir(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const p=be(r.current);s.current=u==="mounted"?p:"none"},[u]),me(()=>{const p=r.current,c=o.current;if(c!==e){const h=s.current,y=be(p);e?l("MOUNT"):y==="none"||p?.display==="none"?l("UNMOUNT"):l(c&&h!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),me(()=>{if(t){let p;const c=t.ownerDocument.defaultView??window,h=a(E=>{const x=be(r.current).includes(CSS.escape(E.animationName));if(E.target===t&&x&&(l("ANIMATION_END"),!o.current)){const R=t.style.animationFillMode;t.style.animationFillMode="forwards",p=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=R)})}},"handleAnimationEnd"),y=a(E=>{E.target===t&&(s.current=be(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{c.clearTimeout(p),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(p=>{r.current=p?getComputedStyle(p):null,n(p)},[])}}a(Ar,"usePresence");function be(e){return e?.animationName||"none"}a(be,"getAnimationName");function Tr(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)}a(Tr,"getElementRef");var Ae=0;function Mr(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ct()),document.body.insertAdjacentElement("beforeend",e[1]??ct()),Ae++,()=>{Ae===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ae--}},[])}a(Mr,"useFocusGuards");function ct(){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}a(ct,"createFocusGuard");var Oe="Dialog",[It,Vo]=tr(Oe),[kr,W]=It(Oe),At=a(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,l=i.useRef(null),p=i.useRef(null),[c,h]=ir({prop:r,defaultProp:o??!1,onChange:s,caller:Oe});return(0,f.jsx)(kr,{scope:t,triggerRef:l,contentRef:p,contentId:K(),titleId:K(),descriptionId:K(),open:c,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(y=>!y),[h]),modal:u,children:n})},"Dialog");At.displayName=Oe;var Tt="DialogTrigger",jr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Tt,n),s=oe(t,o.triggerRef);return(0,f.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Be(o.open),...r,ref:s,onClick:J(e.onClick,o.onOpenToggle)})});jr.displayName=Tt;var Ve="DialogPortal",[Fr,Mt]=It(Ve,{forceMount:void 0}),kt=a(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=W(Ve,t);return(0,f.jsx)(Fr,{scope:t,forceMount:n,children:i.Children.map(r,u=>(0,f.jsx)(Se,{present:n||s.open,children:(0,f.jsx)(_t,{asChild:!0,container:o,children:u})}))})},"DialogPortal");kt.displayName=Ve;var xe="DialogOverlay",jt=i.forwardRef((e,t)=>{const n=Mt(xe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=W(xe,e.__scopeDialog);return s.modal?(0,f.jsx)(Se,{present:r||s.open,children:(0,f.jsx)($r,{...o,ref:t})}):null});jt.displayName=xe;var Lr=St("DialogOverlay.RemoveScroll"),$r=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(xe,n);return(0,f.jsx)(En,{as:Lr,allowPinchZoom:!0,shards:[o.contentRef],children:(0,f.jsx)(T.div,{"data-state":Be(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ne="DialogContent",Ft=i.forwardRef((e,t)=>{const n=Mt(ne,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=W(ne,e.__scopeDialog);return(0,f.jsx)(Se,{present:r||s.open,children:s.modal?(0,f.jsx)(Qr,{...o,ref:t}):(0,f.jsx)(zr,{...o,ref:t})})});Ft.displayName=ne;var Qr=i.forwardRef((e,t)=>{const n=W(ne,e.__scopeDialog),r=i.useRef(null),o=oe(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return vn(s)},[]),(0,f.jsx)(Lt,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&s.preventDefault()}),onFocusOutside:J(e.onFocusOutside,s=>s.preventDefault())})}),zr=i.forwardRef((e,t)=>{const n=W(ne,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return(0,f.jsx)(Lt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a(s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:a(s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=s.target;n.triggerRef.current?.contains(u)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()},"onInteractOutside")})}),Lt=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...u}=e,l=W(ne,n),p=i.useRef(null),c=oe(t,p);return Mr(),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Dt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,f.jsx)(Nt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Be(l.open),...u,ref:c,onDismiss:a(()=>l.onOpenChange(!1),"onDismiss")})}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Hr,{titleId:l.titleId}),(0,f.jsx)(Kr,{contentRef:p,descriptionId:l.descriptionId})]})]})}),Ke="DialogTitle",Wr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Ke,n);return(0,f.jsx)(T.h2,{id:o.titleId,...r,ref:t})});Wr.displayName=Ke;var $t="DialogDescription",qr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W($t,n);return(0,f.jsx)(T.p,{id:o.descriptionId,...r,ref:t})});qr.displayName=$t;var Qt="DialogClose",Ur=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Qt,n);return(0,f.jsx)(T.button,{type:"button",...r,ref:t,onClick:J(e.onClick,()=>o.onOpenChange(!1))})});Ur.displayName=Qt;function Be(e){return e?"open":"closed"}a(Be,"getState");var zt="DialogTitleWarning",[Ko,Wt]=er(zt,{contentName:ne,titleName:Ke,docsSlug:"dialog"}),Hr=a(({titleId:e})=>{const t=Wt(zt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
1
+ var nn=Object.defineProperty;var a=(e,t)=>nn(e,"name",{value:t,configurable:!0});import{i as We}from"./rolldown-runtime-ZpX3ckPj.js";import{$a as rn,A as on,Aa as sn,D as an,E as ln,Fa as un,G as k,Ha as Xe,Ia as ht,Ja as cn,Ka as Re,L as dn,La as fn,M as qe,Na as Ye,O as pn,Oa as mn,Pa as F,Qa as hn,Ra as Je,Ua as V,Va as Ze,Wa as et,_ as vn,eo as gn,j as yn,k as bn,n as vt,v as En,za as gt}from"./boxes-DcYq-jCc.js";import{Vt as xn,Wt as wn,r as Cn,rt as Sn,zt as On}from"./BreadcrumbContext-BdR2QZTG.js";import{n as Nn}from"./dist-D_GJjr4Y.js";import{c as Rn,i as Dn,o as Pn,r as _n,t as In}from"./dialog-Be3BfHbu.js";import{t as An}from"./check-2qo6ZJ2G.js";import{t as yt}from"./x-C7r-gM7x.js";var Tn=class extends ht{static{a(this,"MutationCache")}#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){const r=new mn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const r=n.indexOf(e);r!==-1&&n.splice(r,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=ye(e);if(typeof t=="string"){const n=this.#t.get(t)?.find(r=>r.state.status==="pending");return!n||n===e}else return!0}runNext(e){const t=ye(e);return typeof t=="string"?this.#t.get(t)?.find(n=>n!==e&&n.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){F.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Ze(t,n))}findAll(e={}){return this.getAll().filter(t=>Ze(e,t))}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return F.batch(()=>Promise.all(e.map(t=>t.continue().catch(V))))}};function ye(e){return e.options.scope?.id}a(ye,"scopeFor");var Mn=class extends ht{static{a(this,"QueryCache")}#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){const r=t.queryKey,o=t.queryHash??gt(r,t);let s=this.get(o);return s||(s=new sn({client:e,queryKey:r,queryHash:o,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(s)),s}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){F.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>Xe(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>Xe(e,n)):t}notify(e){F.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){F.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){F.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},$o=class{static{a(this,"QueryClient")}#e;#t;#n;#o;#s;#r;#i;#a;constructor(e={}){this.#e=e.queryCache||new Mn,this.#t=e.mutationCache||new Tn,this.#n=e.defaultOptions||{},this.#o=new Map,this.#s=new Map,this.#r=0}mount(){this.#r++,this.#r===1&&(this.#i=un.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=Ye.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#r--,this.#r===0&&(this.#i?.(),this.#i=void 0,this.#a?.(),this.#a=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Re(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>[t,n.data])}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(r.queryHash)?.state.data,s=fn(t,o);if(s!==void 0)return this.#e.build(this,r).setData(s,{...n,manual:!0})}setQueriesData(e,t,n){return F.batch(()=>this.#e.findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;F.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return F.batch(()=>{const r=n.findAll(e),o=new Set(r);return r.forEach(s=>{s.reset()}),this.refetchQueries({type:"active",predicate:a(s=>o.has(s),"predicate")},t)})}cancelQueries(e,t={}){const n={revert:!0,...t},r=F.batch(()=>this.#e.findAll(e).map(o=>o.cancel(n)));return Promise.all(r).then(V).catch(V)}invalidateQueries(e,t={}){return F.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=F.batch(()=>this.#e.findAll(e).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let s=o.fetch(void 0,n);return n.throwOnError||(s=s.catch(V)),o.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(V)}async query(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t),r=n.isStaleByTime(Re(t.staleTime,n))?await n.fetch(t):n.state.data,o=t.select;return o?o(r):r}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(Re(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(V).catch(V)}infiniteQuery(e){return e._type="infinite",this.query(e)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(V).catch(V)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return Ye.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#o.set(Je(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#o.values()],n={};return t.forEach(r=>{et(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){this.#s.set(Je(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#s.values()],n={};return t.forEach(r=>{et(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=gt(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===cn&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},i=We(gn(),1),f=We(hn(),1),kn=Object.defineProperty,ve=a((e,t)=>kn(e,"name",{value:t,configurable:!0}),"__name"),Ue="Collapsible",[jn,Qo]=yn(Ue),[Fn,He]=jn(Ue),Ln=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,open:o,defaultOpen:s,disabled:u,onOpenChange:l,...p}=t,[c,h]=pn({prop:o,defaultProp:s??!1,onChange:l,caller:Ue});return(0,f.jsx)(Fn,{scope:r,disabled:u,contentId:ln(),open:c,onOpenToggle:i.useCallback(()=>h(y=>!y),[h]),children:(0,f.jsx)(qe.div,{"data-state":Ce(c),"data-disabled":u?"":void 0,...p,ref:n})})},"Collapsible2"),"Collapsible")),$n="CollapsibleTrigger",Qn=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,...o}=t,s=He($n,r);return(0,f.jsx)(qe.button,{type:"button","aria-controls":s.open?s.contentId:void 0,"aria-expanded":s.open||!1,"data-state":Ce(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled,...o,ref:n,onClick:on(t.onClick,s.onOpenToggle)})},"CollapsibleTrigger2"),"CollapsibleTrigger")),bt="CollapsibleContent",zn=i.forwardRef(ve(a(function(t,n){const{forceMount:r,...o}=t,s=He(bt,t.__scopeCollapsible);return(0,f.jsx)(an,{present:r||s.open,children:a(({present:u})=>(0,f.jsx)(Wn,{...o,ref:n,present:u}),"children")})},"CollapsibleContent2"),"CollapsibleContent")),Wn=i.forwardRef(ve(a(function(t,n){const{__scopeCollapsible:r,present:o,children:s,...u}=t,l=He(bt,r),[p,c]=i.useState(o),h=i.useRef(null),y=dn(n,h),E=i.useRef(0),x=E.current,R=i.useRef(0),C=R.current,S=l.open||p,I=i.useRef(S),_=i.useRef(void 0);return i.useEffect(()=>{const N=requestAnimationFrame(()=>I.current=!1);return()=>cancelAnimationFrame(N)},[]),bn(()=>{const N=h.current;if(N){_.current=_.current||{transitionDuration:N.style.transitionDuration,animationName:N.style.animationName},N.style.transitionDuration="0s",N.style.animationName="none";const P=N.getBoundingClientRect();E.current=P.height,R.current=P.width,I.current||(N.style.transitionDuration=_.current.transitionDuration,N.style.animationName=_.current.animationName),c(o)}},[l.open,o]),(0,f.jsx)(qe.div,{"data-state":Ce(l.open),"data-disabled":l.disabled?"":void 0,id:l.contentId,hidden:!S,...u,ref:y,style:{"--radix-collapsible-content-height":x?`${x}px`:void 0,"--radix-collapsible-content-width":C?`${C}px`:void 0,...t.style},children:S&&s})},"CollapsibleContentImpl2"),"CollapsibleContentImpl"));function Ce(e){return e?"open":"closed"}a(Ce,"getState$1");ve(Ce,"getState");var qn=Ln,Et={name:"chevrons-up-down",size:24,node:[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]};Et.node;var Un=vt(Et),xt={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};xt.node;var zo=vt(xt);function Wo({...e}){return(0,f.jsx)(qn,{"data-slot":"collapsible",...e})}a(Wo,"Collapsible");function qo({...e}){return(0,f.jsx)(Qn,{"data-slot":"collapsible-trigger",...e})}a(qo,"CollapsibleTrigger");function Uo({...e}){return(0,f.jsx)(zn,{"data-slot":"collapsible-content",...e})}a(Uo,"CollapsibleContent");var tt=1,Hn=.9,Vn=.8,Kn=.17,De=.1,Pe=.999,Bn=.9999,Gn=.99,Xn=/[\\\/_+.#"@\[\(\{&]/,Yn=/[\\\/_+.#"@\[\(\{&]/g,Jn=/[\s-]/,wt=/[\s-]/g;function je(e,t,n,r,o,s,u){if(s===t.length)return o===e.length?tt:Gn;var l=`${o},${s}`;if(u[l]!==void 0)return u[l];for(var p=r.charAt(s),c=n.indexOf(p,o),h=0,y,E,x,R;c>=0;)y=je(e,t,n,r,c+1,s+1,u),y>h&&(c===o?y*=tt:Xn.test(e.charAt(c-1))?(y*=Vn,x=e.slice(o,c-1).match(Yn),x&&o>0&&(y*=Math.pow(Pe,x.length))):Jn.test(e.charAt(c-1))?(y*=Hn,R=e.slice(o,c-1).match(wt),R&&o>0&&(y*=Math.pow(Pe,R.length))):(y*=Kn,o>0&&(y*=Math.pow(Pe,c-o))),e.charAt(c)!==t.charAt(s)&&(y*=Bn)),(y<De&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(E=je(e,t,n,r,c+1,s+2,u),E*De>y&&(y=E*De)),y>h&&(h=y),c=n.indexOf(p,c+1);return u[l]=h,h}a(je,"G");function nt(e){return e.toLowerCase().replace(wt," ")}a(nt,"D");function Zn(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,je(e,t,nt(e),nt(t),0,0,{})}a(Zn,"W");var Ho=!!(typeof window<"u"&&window.document&&window.document.createElement);function J(e,t,{checkForDefaultPrevented:n=!0}={}){return a(function(o){if(e?.(o),n===!1||!o.defaultPrevented)return t?.(o)},"handleEvent")}a(J,"composeEventHandlers");function rt(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}a(rt,"setRef");function te(...e){return t=>{let n=!1;const r=e.map(o=>{const s=rt(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():rt(e[o],null)}}}}a(te,"composeRefs");function oe(...e){return i.useCallback(te(...e),e)}a(oe,"useComposedRefs");function er(e,t){const n=i.createContext(t),r=a(s=>{const{children:u,...l}=s,p=i.useMemo(()=>l,Object.values(l));return(0,f.jsx)(n.Provider,{value:p,children:u})},"Provider");r.displayName=e+"Provider";function o(s){const u=i.useContext(n);if(u)return u;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return a(o,"useContext2"),[r,o]}a(er,"createContext2");function tr(e,t=[]){let n=[];function r(s,u){const l=i.createContext(u),p=n.length;n=[...n,u];const c=a(y=>{const{scope:E,children:x,...R}=y,C=E?.[e]?.[p]||l,S=i.useMemo(()=>R,Object.values(R));return(0,f.jsx)(C.Provider,{value:S,children:x})},"Provider");c.displayName=s+"Provider";function h(y,E){const x=E?.[e]?.[p]||l,R=i.useContext(x);if(R)return R;if(u!==void 0)return u;throw new Error(`\`${y}\` must be used within \`${s}\``)}return a(h,"useContext2"),[c,h]}a(r,"createContext3");const o=a(()=>{const s=n.map(u=>i.createContext(u));return a(function(l){const p=l?.[e]||s;return i.useMemo(()=>({[`__scope${e}`]:{...l,[e]:p}}),[l,p])},"useScope")},"createScope");return o.scopeName=e,[r,nr(o,...t)]}a(tr,"createContextScope");function nr(...e){const t=e[0];if(e.length===1)return t;const n=a(()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return a(function(s){const u=r.reduce((l,{useScope:p,scopeName:c})=>{const h=p(s)[`__scope${c}`];return{...l,...h}},{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:u}),[u])},"useComposedScopes")},"createScope");return n.scopeName=t.scopeName,n}a(nr,"composeContextScopes");var me=globalThis?.document?i.useLayoutEffect:()=>{},rr=i[" useId ".trim().toString()]||(()=>{}),or=0;function K(e){const[t,n]=i.useState(rr());return me(()=>{e||n(r=>r??String(or++))},[e]),e||(t?`radix-${t}`:"")}a(K,"useId");var sr=i[" useInsertionEffect ".trim().toString()]||me;function ir({prop:e,defaultProp:t,onChange:n=a(()=>{},"onChange"),caller:r}){const[o,s,u]=ar({defaultProp:t,onChange:n}),l=e!==void 0,p=l?e:o;{const c=i.useRef(e!==void 0);i.useEffect(()=>{const h=c.current;c.current=l},[l,r])}return[p,i.useCallback(c=>{if(l){const h=lr(c)?c(e):c;h!==e&&u.current?.(h)}else s(c)},[l,e,s,u])]}a(ir,"useControllableState");function ar({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),s=i.useRef(t);return sr(()=>{s.current=t},[t]),i.useEffect(()=>{o.current!==n&&(s.current?.(n),o.current=n)},[n,o]),[n,r,s]}a(ar,"useUncontrolledState");function lr(e){return typeof e=="function"}a(lr,"isFunction");var Ct=We(rn(),1);function St(e){const t=ur(e),n=i.forwardRef((r,o)=>{const{children:s,...u}=r,l=i.Children.toArray(s),p=l.find(dr);if(p){const c=p.props.children,h=l.map(y=>y===p?i.Children.count(c)>1?i.Children.only(null):i.isValidElement(c)?c.props.children:null:y);return(0,f.jsx)(t,{...u,ref:o,children:i.isValidElement(c)?i.cloneElement(c,void 0,h):null})}return(0,f.jsx)(t,{...u,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}a(St,"createSlot");function ur(e){const t=i.forwardRef((n,r)=>{const{children:o,...s}=n;if(i.isValidElement(o)){const u=pr(o),l=fr(s,o.props);return o.type!==i.Fragment&&(l.ref=r?te(r,u):u),i.cloneElement(o,l)}return i.Children.count(o)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}a(ur,"createSlotClone");var cr=Symbol("radix.slottable");function dr(e){return i.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cr}a(dr,"isSlottable");function fr(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...u)=>{const l=s(...u);return o(...u),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}a(fr,"mergeProps");function pr(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)}a(pr,"getElementRef$1");var T=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=St(`Primitive.${t}`),r=i.forwardRef((o,s)=>{const{asChild:u,...l}=o,p=u?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),(0,f.jsx)(p,{...l,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function mr(e,t){e&&Ct.flushSync(()=>e.dispatchEvent(t))}a(mr,"dispatchDiscreteCustomEvent");function he(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...n)=>t.current?.(...n),[])}a(he,"useCallbackRef");function hr(e,t=globalThis?.document){const n=he(e);i.useEffect(()=>{const r=a(o=>{o.key==="Escape"&&n(o)},"handleKeyDown");return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}a(hr,"useEscapeKeydown");var vr="DismissableLayer",Fe="dismissableLayer.update",gr="dismissableLayer.pointerDownOutside",yr="dismissableLayer.focusOutside",ot,Ot=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nt=i.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:u,onDismiss:l,...p}=e,c=i.useContext(Ot),[h,y]=i.useState(null),E=h?.ownerDocument??globalThis?.document,[,x]=i.useState({}),R=oe(t,w=>y(w)),C=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),I=C.indexOf(S),_=h?C.indexOf(h):-1,N=c.layersWithOutsidePointerEventsDisabled.size>0,P=_>=I,Q=xr(w=>{const U=w.target,L=[...c.branches].some(q=>q.contains(U));!P||L||(o?.(w),u?.(w),w.defaultPrevented||l?.())},E),D=wr(w=>{const U=w.target;[...c.branches].some(L=>L.contains(U))||(s?.(w),u?.(w),w.defaultPrevented||l?.())},E);return hr(w=>{_===c.layers.size-1&&(r?.(w),!w.defaultPrevented&&l&&(w.preventDefault(),l()))},E),i.useEffect(()=>{if(h)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(ot=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(h)),c.layers.add(h),st(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(E.body.style.pointerEvents=ot)}},[h,E,n,c]),i.useEffect(()=>()=>{h&&(c.layers.delete(h),c.layersWithOutsidePointerEventsDisabled.delete(h),st())},[h,c]),i.useEffect(()=>{const w=a(()=>x({}),"handleUpdate");return document.addEventListener(Fe,w),()=>document.removeEventListener(Fe,w)},[]),(0,f.jsx)(T.div,{...p,ref:R,style:{pointerEvents:N?P?"auto":"none":void 0,...e.style},onFocusCapture:J(e.onFocusCapture,D.onFocusCapture),onBlurCapture:J(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:J(e.onPointerDownCapture,Q.onPointerDownCapture)})});Nt.displayName=vr;var br="DismissableLayerBranch",Er=i.forwardRef((e,t)=>{const n=i.useContext(Ot),r=i.useRef(null),o=oe(t,r);return i.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),(0,f.jsx)(T.div,{...e,ref:o})});Er.displayName=br;function xr(e,t=globalThis?.document){const n=he(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const s=a(l=>{if(l.target&&!r.current){let p=a(function(){Rt(gr,n,c,{discrete:!0})},"handleAndDispatchPointerDownOutsideEvent2");const c={originalEvent:l};l.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=p,t.addEventListener("click",o.current,{once:!0})):p()}else t.removeEventListener("click",o.current);r.current=!1},"handlePointerDown"),u=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(u),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:a(()=>r.current=!0,"onPointerDownCapture")}}a(xr,"usePointerDownOutside");function wr(e,t=globalThis?.document){const n=he(e),r=i.useRef(!1);return i.useEffect(()=>{const o=a(s=>{s.target&&!r.current&&Rt(yr,n,{originalEvent:s},{discrete:!1})},"handleFocus");return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:a(()=>r.current=!0,"onFocusCapture"),onBlurCapture:a(()=>r.current=!1,"onBlurCapture")}}a(wr,"useFocusOutside");function st(){const e=new CustomEvent(Fe);document.dispatchEvent(e)}a(st,"dispatchUpdate");function Rt(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?mr(o,s):o.dispatchEvent(s)}a(Rt,"handleAndDispatchCustomEvent");var _e="focusScope.autoFocusOnMount",Ie="focusScope.autoFocusOnUnmount",it={bubbles:!1,cancelable:!0},Cr="FocusScope",Dt=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...u}=e,[l,p]=i.useState(null),c=he(o),h=he(s),y=i.useRef(null),E=oe(t,C=>p(C)),x=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(r){let C=a(function(N){if(x.paused||!l)return;const P=N.target;l.contains(P)?y.current=P:Y(y.current,{select:!0})},"handleFocusIn2"),S=a(function(N){if(x.paused||!l)return;const P=N.relatedTarget;P!==null&&(l.contains(P)||Y(y.current,{select:!0}))},"handleFocusOut2"),I=a(function(N){if(document.activeElement===document.body)for(const P of N)P.removedNodes.length>0&&Y(l)},"handleMutations2");document.addEventListener("focusin",C),document.addEventListener("focusout",S);const _=new MutationObserver(I);return l&&_.observe(l,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",S),_.disconnect()}}},[r,l,x.paused]),i.useEffect(()=>{if(l){lt.add(x);const C=document.activeElement;if(!l.contains(C)){const S=new CustomEvent(_e,it);l.addEventListener(_e,c),l.dispatchEvent(S),S.defaultPrevented||(Sr(Pr(Pt(l)),{select:!0}),document.activeElement===C&&Y(l))}return()=>{l.removeEventListener(_e,c),setTimeout(()=>{const S=new CustomEvent(Ie,it);l.addEventListener(Ie,h),l.dispatchEvent(S),S.defaultPrevented||Y(C??document.body,{select:!0}),l.removeEventListener(Ie,h),lt.remove(x)},0)}}},[l,c,h,x]);const R=i.useCallback(C=>{if(!n&&!r||x.paused)return;const S=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,I=document.activeElement;if(S&&I){const _=C.currentTarget,[N,P]=Or(_);N&&P?!C.shiftKey&&I===P?(C.preventDefault(),n&&Y(N,{select:!0})):C.shiftKey&&I===N&&(C.preventDefault(),n&&Y(P,{select:!0})):I===_&&C.preventDefault()}},[n,r,x.paused]);return(0,f.jsx)(T.div,{tabIndex:-1,...u,ref:E,onKeyDown:R})});Dt.displayName=Cr;function Sr(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Y(r,{select:t}),document.activeElement!==n)return}a(Sr,"focusFirst");function Or(e){const t=Pt(e);return[at(t,e),at(t.reverse(),e)]}a(Or,"getTabbableEdges");function Pt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:a(r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});for(;n.nextNode();)t.push(n.currentNode);return t}a(Pt,"getTabbableCandidates");function at(e,t){for(const n of e)if(!Nr(n,{upTo:t}))return n}a(at,"findVisible");function Nr(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}a(Nr,"isHidden");function Rr(e){return e instanceof HTMLInputElement&&"select"in e}a(Rr,"isSelectableInput");function Y(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Rr(e)&&t&&e.select()}}a(Y,"focus");var lt=Dr();function Dr(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=ut(e,t),e.unshift(t)},remove(t){e=ut(e,t),e[0]?.resume()}}}a(Dr,"createFocusScopesStack");function ut(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}a(ut,"arrayRemove");function Pr(e){return e.filter(t=>t.tagName!=="A")}a(Pr,"removeLinks");var _r="Portal",_t=i.forwardRef((e,t)=>{const{container:n,...r}=e,[o,s]=i.useState(!1);me(()=>s(!0),[]);const u=n||o&&globalThis?.document?.body;return u?Ct.createPortal((0,f.jsx)(T.div,{...r,ref:t}),u):null});_t.displayName=_r;function Ir(e,t){return i.useReducer((n,r)=>t[n][r]??n,e)}a(Ir,"useStateMachine");var Se=a(e=>{const{present:t,children:n}=e,r=Ar(t),o=typeof n=="function"?n({present:r.isPresent}):i.Children.only(n),s=oe(r.ref,Tr(o));return typeof n=="function"||r.isPresent?i.cloneElement(o,{ref:s}):null},"Presence");Se.displayName="Presence";function Ar(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),s=i.useRef("none"),[u,l]=Ir(e?"mounted":"unmounted",{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const p=be(r.current);s.current=u==="mounted"?p:"none"},[u]),me(()=>{const p=r.current,c=o.current;if(c!==e){const h=s.current,y=be(p);e?l("MOUNT"):y==="none"||p?.display==="none"?l("UNMOUNT"):l(c&&h!==y?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),me(()=>{if(t){let p;const c=t.ownerDocument.defaultView??window,h=a(E=>{const x=be(r.current).includes(CSS.escape(E.animationName));if(E.target===t&&x&&(l("ANIMATION_END"),!o.current)){const R=t.style.animationFillMode;t.style.animationFillMode="forwards",p=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=R)})}},"handleAnimationEnd"),y=a(E=>{E.target===t&&(s.current=be(r.current))},"handleAnimationStart");return t.addEventListener("animationstart",y),t.addEventListener("animationcancel",h),t.addEventListener("animationend",h),()=>{c.clearTimeout(p),t.removeEventListener("animationstart",y),t.removeEventListener("animationcancel",h),t.removeEventListener("animationend",h)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:i.useCallback(p=>{r.current=p?getComputedStyle(p):null,n(p)},[])}}a(Ar,"usePresence");function be(e){return e?.animationName||"none"}a(be,"getAnimationName");function Tr(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)}a(Tr,"getElementRef");var Ae=0;function Mr(){i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ct()),document.body.insertAdjacentElement("beforeend",e[1]??ct()),Ae++,()=>{Ae===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ae--}},[])}a(Mr,"useFocusGuards");function ct(){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}a(ct,"createFocusGuard");var Oe="Dialog",[It,Vo]=tr(Oe),[kr,W]=It(Oe),At=a(e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:u=!0}=e,l=i.useRef(null),p=i.useRef(null),[c,h]=ir({prop:r,defaultProp:o??!1,onChange:s,caller:Oe});return(0,f.jsx)(kr,{scope:t,triggerRef:l,contentRef:p,contentId:K(),titleId:K(),descriptionId:K(),open:c,onOpenChange:h,onOpenToggle:i.useCallback(()=>h(y=>!y),[h]),modal:u,children:n})},"Dialog");At.displayName=Oe;var Tt="DialogTrigger",jr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Tt,n),s=oe(t,o.triggerRef);return(0,f.jsx)(T.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Be(o.open),...r,ref:s,onClick:J(e.onClick,o.onOpenToggle)})});jr.displayName=Tt;var Ve="DialogPortal",[Fr,Mt]=It(Ve,{forceMount:void 0}),kt=a(e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=W(Ve,t);return(0,f.jsx)(Fr,{scope:t,forceMount:n,children:i.Children.map(r,u=>(0,f.jsx)(Se,{present:n||s.open,children:(0,f.jsx)(_t,{asChild:!0,container:o,children:u})}))})},"DialogPortal");kt.displayName=Ve;var xe="DialogOverlay",jt=i.forwardRef((e,t)=>{const n=Mt(xe,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=W(xe,e.__scopeDialog);return s.modal?(0,f.jsx)(Se,{present:r||s.open,children:(0,f.jsx)($r,{...o,ref:t})}):null});jt.displayName=xe;var Lr=St("DialogOverlay.RemoveScroll"),$r=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(xe,n);return(0,f.jsx)(En,{as:Lr,allowPinchZoom:!0,shards:[o.contentRef],children:(0,f.jsx)(T.div,{"data-state":Be(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),ne="DialogContent",Ft=i.forwardRef((e,t)=>{const n=Mt(ne,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=W(ne,e.__scopeDialog);return(0,f.jsx)(Se,{present:r||s.open,children:s.modal?(0,f.jsx)(Qr,{...o,ref:t}):(0,f.jsx)(zr,{...o,ref:t})})});Ft.displayName=ne;var Qr=i.forwardRef((e,t)=>{const n=W(ne,e.__scopeDialog),r=i.useRef(null),o=oe(t,n.contentRef,r);return i.useEffect(()=>{const s=r.current;if(s)return vn(s)},[]),(0,f.jsx)(Lt,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:J(e.onCloseAutoFocus,s=>{s.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:J(e.onPointerDownOutside,s=>{const u=s.detail.originalEvent,l=u.button===0&&u.ctrlKey===!0;(u.button===2||l)&&s.preventDefault()}),onFocusOutside:J(e.onFocusOutside,s=>s.preventDefault())})}),zr=i.forwardRef((e,t)=>{const n=W(ne,e.__scopeDialog),r=i.useRef(!1),o=i.useRef(!1);return(0,f.jsx)(Lt,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a(s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||n.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,o.current=!1},"onCloseAutoFocus"),onInteractOutside:a(s=>{e.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const u=s.target;n.triggerRef.current?.contains(u)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()},"onInteractOutside")})}),Lt=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...u}=e,l=W(ne,n),p=i.useRef(null),c=oe(t,p);return Mr(),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Dt,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:(0,f.jsx)(Nt,{role:"dialog",id:l.contentId,"aria-describedby":l.descriptionId,"aria-labelledby":l.titleId,"data-state":Be(l.open),...u,ref:c,onDismiss:a(()=>l.onOpenChange(!1),"onDismiss")})}),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(Hr,{titleId:l.titleId}),(0,f.jsx)(Kr,{contentRef:p,descriptionId:l.descriptionId})]})]})}),Ke="DialogTitle",Wr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Ke,n);return(0,f.jsx)(T.h2,{id:o.titleId,...r,ref:t})});Wr.displayName=Ke;var $t="DialogDescription",qr=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W($t,n);return(0,f.jsx)(T.p,{id:o.descriptionId,...r,ref:t})});qr.displayName=$t;var Qt="DialogClose",Ur=i.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=W(Qt,n);return(0,f.jsx)(T.button,{type:"button",...r,ref:t,onClick:J(e.onClick,()=>o.onOpenChange(!1))})});Ur.displayName=Qt;function Be(e){return e?"open":"closed"}a(Be,"getState");var zt="DialogTitleWarning",[Ko,Wt]=er(zt,{contentName:ne,titleName:Ke,docsSlug:"dialog"}),Hr=a(({titleId:e})=>{const t=Wt(zt),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
2
2
 
3
3
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
4
4
 
@@ -1 +1 @@
1
- var P=Object.defineProperty;var n=(e,r)=>P(e,"name",{value:r,configurable:!0});import{i as _}from"./rolldown-runtime-ZpX3ckPj.js";import{G as b,Qa as W,eo as A,ia as c,n as i}from"./boxes-Bpd3vwBa.js";import{Mt as C,Nt as v,T as H,Vt as V,Wt as F,jt as w,kt as j,r as Y,zt as J}from"./BreadcrumbContext-DP0mgUIg.js";import{i as $,n as B}from"./usePrefersReducedMotion-CT6hiLGt.js";import{r as I}from"./badge-_pdOC0PF.js";var S={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};S.node;var L=i(S),O={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};O.node;var R=i(O),E={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};E.node;var K=i(E),q={name:"git-merge",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]};q.node;var X=i(q),M={name:"git-pull-request",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]};M.node;var Q=i(M),U={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};U.node;var Z=i(U);function x(e={}){return{workspaceCommandId:e.workspaceCommandId??null,runtimeServiceId:e.runtimeServiceId??null,serviceIndex:e.serviceIndex??null}}n(x,"sanitizeWorkspaceRuntimeControlTarget");function ee(e,r){return r?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(r)}`:e}n(ee,"withCompanyScope");function o(e,r,t=""){return ee(`/projects/${encodeURIComponent(e)}${t}`,r)}n(o,"projectPath");var je={repositoryOptions:n(e=>c.get(`/companies/${e}/project-repositories`),"repositoryOptions"),setRepositories:n((e,r)=>c.put(o(e,void 0,"/repositories"),{repositoryIds:r}),"setRepositories"),list:n((e,r={})=>{const t=new URLSearchParams;r.includeArchived&&t.set("includeArchived","true");const a=t.toString();return c.get("/companies/"+encodeURIComponent(e)+"/projects"+(a?"?"+a:""))},"list"),get:n((e,r)=>c.get(o(e,r)),"get"),create:n((e,r)=>c.post(`/companies/${e}/projects`,r),"create"),update:n((e,r,t)=>c.patch(o(e,t),r),"update"),listAccessMembers:n((e,r)=>c.get(o(e,r,"/access-members")),"listAccessMembers"),addAccessMember:n((e,r,t)=>c.post(o(e,t,"/access-members"),r),"addAccessMember"),removeAccessMember:n((e,r,t)=>c.delete(o(e,t,`/access-members/${encodeURIComponent(r)}`)),"removeAccessMember"),listWorkspaces:n((e,r)=>c.get(o(e,r,"/workspaces")),"listWorkspaces"),createWorkspace:n((e,r,t)=>c.post(o(e,t,"/workspaces"),r),"createWorkspace"),updateWorkspace:n((e,r,t,a)=>c.patch(o(e,a,`/workspaces/${encodeURIComponent(r)}`),t),"updateWorkspace"),controlWorkspaceRuntimeServices:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-services/${t}`),x(l)),"controlWorkspaceRuntimeServices"),controlWorkspaceCommands:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-commands/${t}`),x(l)),"controlWorkspaceCommands"),removeWorkspace:n((e,r,t)=>c.delete(o(e,t,`/workspaces/${encodeURIComponent(r)}`)),"removeWorkspace"),remove:n((e,r)=>c.delete(o(e,r)),"remove")};function $e(e){if(!e)return null;let r;try{r=new URL(e.trim())}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:"||r.username||r.password)return null;const t=r.protocol==="https:"?"https":"http",a=r.pathname||"/";return`${t}://${r.host.toLowerCase()}${a}`}n($e,"normalizeExternalObjectHref");var re=i("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),te={unknown:C,open:w,waiting:$,running:I,succeeded:v,failed:R,blocked:Z,closed:j,archived:L,auth_required:B,unreachable:K},ne=C;function Be(e){return te[e]??ne}n(Be,"externalObjectIconForCategory");var ae={archive:L,check:v,"check-circle":v,circle:j,"circle-dot":w,clock:$,github:re,"git-merge":X,"git-pull-request":Q,key:B,loader:I,"x-circle":R};function Ie(e){return e?ae[e]??null:null}n(Ie,"externalObjectIconForKey");var ce={unknown:"Not yet resolved",open:"Open",waiting:"Waiting",running:"Running",succeeded:"Succeeded",failed:"Failed",blocked:"Blocked",closed:"Closed",archived:"Archived",auth_required:"Authorization required",unreachable:"Unreachable"};function oe(e){return ce[e]??e.replace(/_/g," ")}n(oe,"externalObjectCategoryLabel");var se={unknown:"Not yet refreshed",fresh:"Fresh",stale:"Stale",auth_required:"Requires auth",unreachable:"Unreachable"};function ie(e){return se[e]??e.replace(/_/g," ")}n(ie,"externalObjectLivenessLabel");function Se(e){const r=e.statusLabel?.trim();if(r)return r;const t=e.providerKey==="url"&&e.objectType==="link",a=!!(e.providerKey&&e.objectType);return e.statusCategory==="unknown"&&a&&!t?e.liveness==="fresh"?"Status unavailable":ie(e.liveness):oe(e.statusCategory)}n(Se,"externalObjectDisplayStatusLabel");var N={muted:0,neutral:1,success:2,info:3,warning:4,danger:5};function le(e){return e?N[e]??0:0}n(le,"externalObjectToneSeverity");var ue={github:"GitHub",github_pull_request:"GitHub",github_issue:"GitHub",hubspot:"HubSpot",linear:"Linear",jira:"Jira",notion:"Notion",asana:"Asana"};function de(e){if(!e)return"External";const r=ue[e];return r||e.split(/[._-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}n(de,"externalObjectProviderLabel");var pe={pull_request:"pull request",issue:"issue",deployment:"deployment",workflow_run:"workflow run",ticket:"ticket",lead:"lead",url_link:"URL"};function me(e){return e?pe[e]??e.replace(/_/g," "):"object"}n(me,"externalObjectTypeLabel");function Le(e,r,t){const a=t?.trim();return a||(e==="url"&&r==="link"?"URL":`${de(e)} ${me(r)}`)}n(Le,"externalObjectDisplayLabel");function he(e){if(!e)return null;const r=e.highestSeverity;return!r||le(r)<=N.muted?null:r}n(he,"dominantExternalObjectTone");function Oe(e){if(!e)return 0;const r=he(e);return r?e.objects.filter(t=>t.statusTone===r).length:0}n(Oe,"externalObjectDominantCount");var fe=_(A(),1),s=_(W(),1),ve=["backlog","todo","in_progress","in_review","done","cancelled","blocked"];function m(e){return e.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}n(m,"statusLabel");function ke(e){if(!e||e.state==="none")return"Blocked";if(e.reason==="active_child"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · waiting on active sub-task ${e.sampleBlockerIdentifier}`:r===1?"Blocked · waiting on 1 active sub-task":`Blocked · waiting on ${r} active sub-tasks`}if(e.reason==="active_dependency"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · covered by active dependency ${e.sampleBlockerIdentifier}`:r===1?"Blocked · covered by 1 active dependency":`Blocked · covered by ${r} active dependencies`}if(e.reason==="stalled_review"){const r=e.stalledBlockerCount,t=e.sampleStalledBlockerIdentifier??e.sampleBlockerIdentifier;return r===1&&t?`Blocked · review stalled on ${t}`:r===1?"Blocked · review stalled with no clear next step":`Blocked · ${r} reviews stalled with no clear next step`}if(e.reason==="attention_required"){const r=e.attentionBlockerCount||e.unresolvedBlockerCount,t=`${r} ${r===1?"blocker needs":"blockers need"} attention`,a=e.coveredBlockerCount;return a>0?`Blocked · ${t}; ${a} covered by active work`:`Blocked · ${t}`}return"Blocked"}n(ke,"blockedAttentionLabel");function ge({status:e,externalConversationState:r,blockerAttention:t,onChange:a,className:l,glyphContainerClassName:k,showLabel:h,size:z="md"}){const[D,g]=(0,fe.useState)(!1),d=e==="in_review"&&r==="waiting"?"idle":e,T=e==="blocked"&&t?.state==="covered",f=e==="blocked"?ke(t):m(d),y=(0,s.jsx)(H,{status:T?"in_queue":d,size:z,className:b(a&&!h&&"cursor-pointer",l),title:f}),p=k?(0,s.jsx)("span",{className:k,"data-status-glyph-container":"true",children:y}):y;if(!a)return h?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):p;const G=h?(0,s.jsxs)("button",{type:"button","aria-label":`Change status (current: ${f})`,className:"inline-flex min-h-5 items-center gap-1.5 cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):(0,s.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change status (current: ${f})`,className:"inline-flex cursor-pointer items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",children:p});return(0,s.jsxs)(J,{open:D,onOpenChange:g,children:[(0,s.jsx)(F,{asChild:!0,children:G}),(0,s.jsx)(V,{className:"w-40 p-1",align:"start",children:ve.map(u=>(0,s.jsxs)(Y,{variant:"ghost",size:"sm",className:b("w-full justify-start gap-2 text-xs",u===e&&"bg-accent"),onClick:n(()=>{a(u),g(!1)},"onClick"),children:[(0,s.jsx)(ge,{status:u,size:"lg"}),m(u)]},u))})]})}n(ge,"StatusIcon");export{Z as _,Se as a,R as b,Ie as c,le as d,me as f,x as g,je as h,Le as i,ie as l,$e as m,he as n,Oe as o,re as p,oe as r,Be as s,ge as t,de as u,Q as v,L as x,X as y};
1
+ var P=Object.defineProperty;var n=(e,r)=>P(e,"name",{value:r,configurable:!0});import{i as _}from"./rolldown-runtime-ZpX3ckPj.js";import{G as b,Qa as W,eo as A,ia as c,n as i}from"./boxes-DcYq-jCc.js";import{Mt as C,Nt as v,T as H,Vt as V,Wt as F,jt as w,kt as j,r as Y,zt as J}from"./BreadcrumbContext-BdR2QZTG.js";import{i as $,n as B}from"./usePrefersReducedMotion-DxMMBfvJ.js";import{r as I}from"./badge-BKd5IdYw.js";var S={name:"archive",size:24,node:[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]]};S.node;var L=i(S),O={name:"circle-x",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],aliases:["x-circle"]};O.node;var R=i(O),E={name:"cloud-off",size:24,node:[["path",{d:"M10.94 5.274A7 7 0 0 1 15.71 10h1.79a4.5 4.5 0 0 1 4.222 6.057",key:"1uxyv8"}],["path",{d:"M18.796 18.81A4.5 4.5 0 0 1 17.5 19H9A7 7 0 0 1 5.79 5.78",key:"99tcn7"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]};E.node;var K=i(E),q={name:"git-merge",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M6 21V9a9 9 0 0 0 9 9",key:"7kw0sc"}]]};q.node;var X=i(q),M={name:"git-pull-request",size:24,node:[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]]};M.node;var Q=i(M),U={name:"octagon-alert",size:24,node:[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]],aliases:["alert-octagon"]};U.node;var Z=i(U);function x(e={}){return{workspaceCommandId:e.workspaceCommandId??null,runtimeServiceId:e.runtimeServiceId??null,serviceIndex:e.serviceIndex??null}}n(x,"sanitizeWorkspaceRuntimeControlTarget");function ee(e,r){return r?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(r)}`:e}n(ee,"withCompanyScope");function o(e,r,t=""){return ee(`/projects/${encodeURIComponent(e)}${t}`,r)}n(o,"projectPath");var je={repositoryOptions:n(e=>c.get(`/companies/${e}/project-repositories`),"repositoryOptions"),setRepositories:n((e,r)=>c.put(o(e,void 0,"/repositories"),{repositoryIds:r}),"setRepositories"),list:n((e,r={})=>{const t=new URLSearchParams;r.includeArchived&&t.set("includeArchived","true");const a=t.toString();return c.get("/companies/"+encodeURIComponent(e)+"/projects"+(a?"?"+a:""))},"list"),get:n((e,r)=>c.get(o(e,r)),"get"),create:n((e,r)=>c.post(`/companies/${e}/projects`,r),"create"),update:n((e,r,t)=>c.patch(o(e,t),r),"update"),listAccessMembers:n((e,r)=>c.get(o(e,r,"/access-members")),"listAccessMembers"),addAccessMember:n((e,r,t)=>c.post(o(e,t,"/access-members"),r),"addAccessMember"),removeAccessMember:n((e,r,t)=>c.delete(o(e,t,`/access-members/${encodeURIComponent(r)}`)),"removeAccessMember"),listWorkspaces:n((e,r)=>c.get(o(e,r,"/workspaces")),"listWorkspaces"),createWorkspace:n((e,r,t)=>c.post(o(e,t,"/workspaces"),r),"createWorkspace"),updateWorkspace:n((e,r,t,a)=>c.patch(o(e,a,`/workspaces/${encodeURIComponent(r)}`),t),"updateWorkspace"),controlWorkspaceRuntimeServices:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-services/${t}`),x(l)),"controlWorkspaceRuntimeServices"),controlWorkspaceCommands:n((e,r,t,a,l={})=>c.post(o(e,a,`/workspaces/${encodeURIComponent(r)}/runtime-commands/${t}`),x(l)),"controlWorkspaceCommands"),removeWorkspace:n((e,r,t)=>c.delete(o(e,t,`/workspaces/${encodeURIComponent(r)}`)),"removeWorkspace"),remove:n((e,r)=>c.delete(o(e,r)),"remove")};function $e(e){if(!e)return null;let r;try{r=new URL(e.trim())}catch{return null}if(r.protocol!=="http:"&&r.protocol!=="https:"||r.username||r.password)return null;const t=r.protocol==="https:"?"https":"http",a=r.pathname||"/";return`${t}://${r.host.toLowerCase()}${a}`}n($e,"normalizeExternalObjectHref");var re=i("github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]),te={unknown:C,open:w,waiting:$,running:I,succeeded:v,failed:R,blocked:Z,closed:j,archived:L,auth_required:B,unreachable:K},ne=C;function Be(e){return te[e]??ne}n(Be,"externalObjectIconForCategory");var ae={archive:L,check:v,"check-circle":v,circle:j,"circle-dot":w,clock:$,github:re,"git-merge":X,"git-pull-request":Q,key:B,loader:I,"x-circle":R};function Ie(e){return e?ae[e]??null:null}n(Ie,"externalObjectIconForKey");var ce={unknown:"Not yet resolved",open:"Open",waiting:"Waiting",running:"Running",succeeded:"Succeeded",failed:"Failed",blocked:"Blocked",closed:"Closed",archived:"Archived",auth_required:"Authorization required",unreachable:"Unreachable"};function oe(e){return ce[e]??e.replace(/_/g," ")}n(oe,"externalObjectCategoryLabel");var se={unknown:"Not yet refreshed",fresh:"Fresh",stale:"Stale",auth_required:"Requires auth",unreachable:"Unreachable"};function ie(e){return se[e]??e.replace(/_/g," ")}n(ie,"externalObjectLivenessLabel");function Se(e){const r=e.statusLabel?.trim();if(r)return r;const t=e.providerKey==="url"&&e.objectType==="link",a=!!(e.providerKey&&e.objectType);return e.statusCategory==="unknown"&&a&&!t?e.liveness==="fresh"?"Status unavailable":ie(e.liveness):oe(e.statusCategory)}n(Se,"externalObjectDisplayStatusLabel");var N={muted:0,neutral:1,success:2,info:3,warning:4,danger:5};function le(e){return e?N[e]??0:0}n(le,"externalObjectToneSeverity");var ue={github:"GitHub",github_pull_request:"GitHub",github_issue:"GitHub",hubspot:"HubSpot",linear:"Linear",jira:"Jira",notion:"Notion",asana:"Asana"};function de(e){if(!e)return"External";const r=ue[e];return r||e.split(/[._-]/).map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ")}n(de,"externalObjectProviderLabel");var pe={pull_request:"pull request",issue:"issue",deployment:"deployment",workflow_run:"workflow run",ticket:"ticket",lead:"lead",url_link:"URL"};function me(e){return e?pe[e]??e.replace(/_/g," "):"object"}n(me,"externalObjectTypeLabel");function Le(e,r,t){const a=t?.trim();return a||(e==="url"&&r==="link"?"URL":`${de(e)} ${me(r)}`)}n(Le,"externalObjectDisplayLabel");function he(e){if(!e)return null;const r=e.highestSeverity;return!r||le(r)<=N.muted?null:r}n(he,"dominantExternalObjectTone");function Oe(e){if(!e)return 0;const r=he(e);return r?e.objects.filter(t=>t.statusTone===r).length:0}n(Oe,"externalObjectDominantCount");var fe=_(A(),1),s=_(W(),1),ve=["backlog","todo","in_progress","in_review","done","cancelled","blocked"];function m(e){return e.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}n(m,"statusLabel");function ke(e){if(!e||e.state==="none")return"Blocked";if(e.reason==="active_child"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · waiting on active sub-task ${e.sampleBlockerIdentifier}`:r===1?"Blocked · waiting on 1 active sub-task":`Blocked · waiting on ${r} active sub-tasks`}if(e.reason==="active_dependency"){const r=e.coveredBlockerCount;return r===1&&e.sampleBlockerIdentifier?`Blocked · covered by active dependency ${e.sampleBlockerIdentifier}`:r===1?"Blocked · covered by 1 active dependency":`Blocked · covered by ${r} active dependencies`}if(e.reason==="stalled_review"){const r=e.stalledBlockerCount,t=e.sampleStalledBlockerIdentifier??e.sampleBlockerIdentifier;return r===1&&t?`Blocked · review stalled on ${t}`:r===1?"Blocked · review stalled with no clear next step":`Blocked · ${r} reviews stalled with no clear next step`}if(e.reason==="attention_required"){const r=e.attentionBlockerCount||e.unresolvedBlockerCount,t=`${r} ${r===1?"blocker needs":"blockers need"} attention`,a=e.coveredBlockerCount;return a>0?`Blocked · ${t}; ${a} covered by active work`:`Blocked · ${t}`}return"Blocked"}n(ke,"blockedAttentionLabel");function ge({status:e,externalConversationState:r,blockerAttention:t,onChange:a,className:l,glyphContainerClassName:k,showLabel:h,size:z="md"}){const[D,g]=(0,fe.useState)(!1),d=e==="in_review"&&r==="waiting"?"idle":e,T=e==="blocked"&&t?.state==="covered",f=e==="blocked"?ke(t):m(d),y=(0,s.jsx)(H,{status:T?"in_queue":d,size:z,className:b(a&&!h&&"cursor-pointer",l),title:f}),p=k?(0,s.jsx)("span",{className:k,"data-status-glyph-container":"true",children:y}):y;if(!a)return h?(0,s.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):p;const G=h?(0,s.jsxs)("button",{type:"button","aria-label":`Change status (current: ${f})`,className:"inline-flex min-h-5 items-center gap-1.5 cursor-pointer hover:bg-accent/50 rounded px-1 -mx-1 py-0.5 transition-colors",children:[p,(0,s.jsx)("span",{className:"text-sm",children:m(d)})]}):(0,s.jsx)("button",{type:"button","data-slot":"icon-button","aria-label":`Change status (current: ${f})`,className:"inline-flex cursor-pointer items-center justify-center rounded-sm focus-visible:outline-none focus-visible:ring-(length:--rad-3) focus-visible:ring-ring",children:p});return(0,s.jsxs)(J,{open:D,onOpenChange:g,children:[(0,s.jsx)(F,{asChild:!0,children:G}),(0,s.jsx)(V,{className:"w-40 p-1",align:"start",children:ve.map(u=>(0,s.jsxs)(Y,{variant:"ghost",size:"sm",className:b("w-full justify-start gap-2 text-xs",u===e&&"bg-accent"),onClick:n(()=>{a(u),g(!1)},"onClick"),children:[(0,s.jsx)(ge,{status:u,size:"lg"}),m(u)]},u))})]})}n(ge,"StatusIcon");export{Z as _,Se as a,R as b,Ie as c,le as d,me as f,x as g,je as h,Le as i,ie as l,$e as m,he as n,Oe as o,re as p,oe as r,Be as s,ge as t,de as u,Q as v,L as x,X as y};
@@ -1 +1 @@
1
- var xe=Object.defineProperty;var s=(n,o)=>xe(n,"name",{value:o,configurable:!0});import{i as ae}from"./rolldown-runtime-ZpX3ckPj.js";import{G as ee,Qa as pe,St as te,Za as re,_a as Q,eo as fe,ht as ge,n as je,va as K}from"./boxes-Bpd3vwBa.js";import{n as be,o as ve,r as S,st as se}from"./BreadcrumbContext-DP0mgUIg.js";import{C as ye,S as Se,_ as Ne,a as Ce,c as we,f as ke,i as De,m as G,o as Me,p,r as Ee,t as He,u as ze}from"./dialog-aW5qVpwP.js";import{t as X}from"./label-CRFTGD7I.js";import{t as Fe}from"./x-BYvg7sTI.js";import{t as P}from"./input-CfcFr-x-.js";import{t as Le}from"./access-CspWWirX.js";import{t as _e}from"./environments-C7g5xojw.js";import{_t as k,c as Ae,gt as qe,ht as Z,mt as D,o as Te,pn as ne,pt as Ke,s as Pe,un as V}from"./index-g3t6OqDb.js";var ie={name:"columns-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],aliases:["columns"]};ie.node;var Qe=je(ie),d=ae(fe(),1),e=ae(pe(),1);function Oe({companyId:n,open:o,savedHosts:u,onOpenChange:r,onConnect:m}){const M=re(),[N,j]=(0,d.useState)(""),[v,E]=(0,d.useState)(""),[y,L]=(0,d.useState)(""),[H,C]=(0,d.useState)(null),f=y.trim(),g=s(()=>M.invalidateQueries({queryKey:Z.sshHosts(n)}),"refreshHosts"),w=Q({mutationFn:s(()=>D.createSshHost(n,{name:N.trim(),destination:v.trim(),...f?{port:Number.parseInt(f,10)}:{}}),"mutationFn"),onSuccess:s(l=>{C(null),j(""),E(""),L(""),g(),r(!1),m(l)},"onSuccess"),onError:s(l=>C(k(l,"Could not save the SSH host.")),"onError")}),b=Q({mutationFn:s(l=>D.removeSshHost(n,l),"mutationFn"),onSuccess:s(()=>{C(null),g()},"onSuccess"),onError:s(l=>C(k(l,"Could not remove the saved SSH host.")),"onError")}),z=f.length>0&&!/^[0-9]+$/.test(f),x=w.isPending||!N.trim()||!v.trim()||z;return(0,e.jsx)(He,{open:o,onOpenChange:r,children:(0,e.jsxs)(Ee,{className:"sm:max-w-md",children:[(0,e.jsxs)(Me,{children:[(0,e.jsx)(we,{children:"Connect to host"}),(0,e.jsx)(De,{children:"The session starts this server's ssh client with its own keys, agent and known hosts."})]}),(0,e.jsxs)("form",{className:"space-y-3",onSubmit:s(l=>{l.preventDefault(),x||w.mutate()},"onSubmit"),children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(X,{htmlFor:"ssh-host-name",children:"Name"}),(0,e.jsx)(P,{id:"ssh-host-name",value:N,placeholder:"prod-db",autoComplete:"off",onChange:s(l=>j(l.target.value),"onChange")})]}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(X,{htmlFor:"ssh-host-destination",children:"Destination"}),(0,e.jsx)(P,{id:"ssh-host-destination",value:v,placeholder:"user@host",autoComplete:"off",onChange:s(l=>E(l.target.value),"onChange")})]}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(X,{htmlFor:"ssh-host-port",children:"Port"}),(0,e.jsx)(P,{id:"ssh-host-port",value:y,placeholder:"22",inputMode:"numeric",autoComplete:"off","aria-invalid":z,onChange:s(l=>L(l.target.value),"onChange")})]}),H?(0,e.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:H}):null,u.length>0?(0,e.jsxs)("div",{className:"space-y-1 border-t border-border pt-3",children:[(0,e.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Saved hosts"}),(0,e.jsx)("ul",{className:"space-y-1",children:u.map(l=>(0,e.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,e.jsxs)("button",{type:"button",className:"min-w-0 flex-1 truncate text-left hover:underline",onClick:s(()=>{r(!1),m(l)},"onClick"),children:[l.name,(0,e.jsxs)("span",{className:"ml-2 text-muted-foreground",children:[l.destination,l.port===null?"":`:${l.port}`]})]}),(0,e.jsx)(S,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Remove ${l.name}`,disabled:b.isPending&&b.variables===l.id,onClick:s(()=>b.mutate(l.id),"onClick"),children:(0,e.jsx)(ye,{"aria-hidden":!0})})]},l.id))})]}):null,(0,e.jsxs)(Ce,{children:[(0,e.jsx)(S,{type:"button",variant:"ghost",onClick:s(()=>r(!1),"onClick"),children:"Cancel"}),(0,e.jsx)(S,{type:"submit",disabled:x,children:"Save and connect"})]})]})]})})}s(Oe,"SshHostDialog");var F=2;function oe(n){return`paperclip:terminal-layout:v1:${n}`}s(oe,"layoutKey");function U(n){return`paperclip:terminal-titles:v1:${n}`}s(U,"titlesKey");function le(n){try{return JSON.parse(window.localStorage.getItem(n)??"null")}catch{return null}}s(le,"readJson");function W(n,o){try{window.localStorage.setItem(n,JSON.stringify(o))}catch{return}}s(W,"writeJson");function $e(n){const o=le(oe(n)),u=Array.isArray(o?.panes)?o.panes.filter(r=>typeof r=="string").slice(0,F):[];return{panes:u,focused:typeof o?.focused=="number"&&o.focused>=0&&o.focused<u.length?o.focused:0}}s($e,"readLayout");function Be(n){const o=le(U(n));return!o||typeof o!="object"||Array.isArray(o)?{}:Object.fromEntries(Object.entries(o).filter(u=>typeof u[1]=="string"))}s(Be,"readTitles");function Re(n,o){const u=new Set(o.map(m=>m.id)),r=n.panes.filter((m,M)=>u.has(m)&&n.panes.indexOf(m)===M);return r.length===0&&o.length>0&&r.push(o[0].id),{panes:r,focused:Math.min(n.focused,Math.max(0,r.length-1))}}s(Re,"reconcileLayout");function Je(n,o){return n.focused===o.focused&&n.panes.length===o.panes.length&&n.panes.every((u,r)=>u===o.panes[r])}s(Je,"sameLayout");function Ge({companyId:n}){const o=re(),u=Z.sessions(n),[r,m]=(0,d.useState)(()=>$e(n)),[M,N]=(0,d.useState)(()=>Be(n)),[j,v]=(0,d.useState)(null),[E,y]=(0,d.useState)(null),[L,H]=(0,d.useState)(!1),C=K({queryKey:te.access.currentBoardAccess,queryFn:s(()=>Le.getCurrentBoardAccess(),"queryFn")}),f=qe(C.data),g=K({queryKey:u,queryFn:s(()=>D.list(n),"queryFn")}),w=K({queryKey:te.environments.list(n),queryFn:s(()=>_e.list(n),"queryFn"),enabled:g.isSuccess}),b=(0,d.useMemo)(()=>g.data??[],[g.data]),z=(0,d.useMemo)(()=>(w.data??[]).filter(t=>t.driver==="ssh"),[w.data]),x=K({queryKey:Z.sshHosts(n),queryFn:s(()=>D.listSshHosts(n),"queryFn"),enabled:f}),l=(0,d.useMemo)(()=>(x.data?.hosts??[]).filter(t=>t.source==="config"),[x.data]),_=(0,d.useMemo)(()=>(x.data?.hosts??[]).filter(t=>t.source==="saved"),[x.data]);(0,d.useEffect)(()=>{g.isSuccess&&m(t=>{const a=Re(t,b);return Je(t,a)?t:a})},[b,g.isSuccess]),(0,d.useEffect)(()=>{W(oe(n),r)},[n,r]);const O=(0,d.useCallback)(t=>{o.setQueryData(u,(a=[])=>a.some(i=>i.id===t.id)?a.map(i=>i.id===t.id?t:i):[...a,t])},[o,u]),$=(0,d.useCallback)((t,a)=>{m(i=>{const c=i.panes.indexOf(t);if(c>=0)return{...i,focused:c};const h=a??i.focused,T=[...i.panes];return h>=T.length?T.push(t):T[h]=t,{panes:T.slice(0,F),focused:Math.min(h,1)}})},[]),A=Q({mutationFn:s(t=>D.create(n,t.body),"mutationFn"),onSuccess:s((t,a)=>{y(null),O(t),$(t.id,a.pane)},"onSuccess"),onError:s(t=>y(k(t,"Could not open a terminal session.")),"onError")}),B=Q({mutationFn:s(t=>D.remove(n,t),"mutationFn"),onSuccess:s((t,a)=>{y(null),o.setQueryData(u,(i=[])=>i.filter(c=>c.id!==a)),m(i=>{const c=i.panes.filter(h=>h!==a);return{panes:c,focused:Math.min(i.focused,Math.max(0,c.length-1))}}),N(i=>{if(!(a in i))return i;const{[a]:c,...h}=i;return W(U(n),h),h})},"onSuccess"),onError:s(t=>y(k(t,"Could not close the terminal session.")),"onError")}),R=s(t=>A.mutate({body:{kind:"local"},pane:t}),"createLocal"),de=s((t,a)=>A.mutate({body:{kind:"ssh",environmentId:t,title:a}}),"createSsh"),J=s(t=>A.mutate({body:{kind:"local",sshHostId:t.id,title:t.name}}),"createSshHost"),ce=s(()=>{if(r.panes.length>=F){const a=r.panes[r.focused]??r.panes[0];m({panes:[a],focused:0});return}const t=b.find(a=>!r.panes.includes(a.id));t?$(t.id,r.panes.length):f&&R(r.panes.length)},"toggleSplit"),ue=s(t=>M[t.id]??t.title,"titleOf"),Y=s(()=>{if(!j)return;const t=j.value.trim();N(a=>{const{[j.id]:i,...c}=a,h=t?{...c,[j.id]:t}:c;return W(U(n),h),h}),v(null)},"commitRename"),me=s(t=>{t.key==="Enter"?(t.preventDefault(),Y()):t.key==="Escape"&&(t.preventDefault(),v(null))},"onRenameKeyDown");if(g.isLoading)return(0,e.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:"Loading terminal sessions…"});if(g.isError)return(0,e.jsxs)("div",{className:"flex h-full min-h-(--sz-60vh) flex-col items-center justify-center gap-2 p-6 text-center","data-testid":"terminal-access-error",children:[(0,e.jsx)(V,{className:"size-6 text-muted-foreground","aria-hidden":!0}),(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Terminal unavailable"}),(0,e.jsx)("p",{className:"max-w-md text-sm text-muted-foreground",children:k(g.error,"Terminal sessions could not be loaded.")})]});const he=r.panes[r.focused]??null,I=new Map(b.map(t=>[t.id,t])),q=A.isPending;return(0,e.jsxs)("div",{className:"flex h-full min-h-(--sz-60vh) flex-col overflow-hidden rounded-md border border-border","data-testid":"terminal-workspace",children:[(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-2 py-1",children:[(0,e.jsx)("div",{role:"tablist","aria-label":"Terminal sessions",className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto",children:b.map(t=>{const a=t.id===he,i=r.panes.includes(t.id),c=ue(t);return(0,e.jsxs)("div",{className:ee("group flex shrink-0 items-center gap-1 rounded-md border px-2 py-1 text-xs",a?"border-ring bg-accent text-foreground":i?"border-border text-foreground":"border-transparent text-muted-foreground hover:bg-accent"),children:[t.kind==="ssh"||t.sshHost?(0,e.jsx)(ne,{className:"size-3","aria-hidden":!0}):(0,e.jsx)(V,{className:"size-3","aria-hidden":!0}),j?.id===t.id?(0,e.jsx)(P,{autoFocus:!0,value:j.value,"aria-label":"Session title",onChange:s(h=>v({id:t.id,value:h.target.value}),"onChange"),onKeyDown:me,onBlur:Y,className:"h-6 w-32 px-1 text-xs md:text-xs"}):(0,e.jsxs)("button",{type:"button",role:"tab","aria-selected":a,title:"Double-click to rename",className:"max-w-48 truncate outline-none focus-visible:underline",onClick:s(()=>$(t.id),"onClick"),onDoubleClick:s(()=>v({id:t.id,value:c}),"onDoubleClick"),children:[c,t.status==="exited"?(0,e.jsx)("span",{className:"ml-1 text-muted-foreground",children:"(ended)"}):null]}),(0,e.jsx)("button",{type:"button","aria-label":`Close ${c}`,className:"rounded-sm text-muted-foreground hover:text-foreground",disabled:B.isPending&&B.variables===t.id,onClick:s(()=>B.mutate(t.id),"onClick"),children:(0,e.jsx)(Fe,{className:"size-3","aria-hidden":!0})})]},t.id)})}),f?(0,e.jsxs)(S,{type:"button",variant:"ghost",size:"xs",onClick:s(()=>R(),"onClick"),disabled:q,children:[(0,e.jsx)(se,{"aria-hidden":!0}),"Local"]}):null,(0,e.jsxs)(ze,{children:[(0,e.jsx)(Se,{asChild:!0,children:(0,e.jsxs)(S,{type:"button",variant:"ghost",size:"xs",disabled:q,children:[(0,e.jsx)(ne,{"aria-hidden":!0}),"SSH"]})}),(0,e.jsxs)(ke,{align:"end",className:"w-72",children:[f?(0,e.jsxs)(e.Fragment,{children:[x.isLoading?(0,e.jsx)(p,{disabled:!0,children:"Loading…"}):x.isError?(0,e.jsx)(p,{disabled:!0,className:"text-destructive",children:k(x.error,"SSH hosts could not be loaded.")}):l.length===0&&_.length===0?(0,e.jsx)(p,{disabled:!0,children:"No SSH hosts"}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(G,{children:"~/.ssh/config"}),l.length===0?(0,e.jsx)(p,{disabled:!0,children:"No hosts"}):l.map(t=>(0,e.jsxs)(p,{onSelect:s(()=>J(t),"onSelect"),children:[(0,e.jsx)("span",{className:"truncate",children:t.name}),(0,e.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:t.destination})]},t.id)),(0,e.jsx)(G,{children:"Saved"}),_.length===0?(0,e.jsx)(p,{disabled:!0,children:"No saved hosts"}):_.map(t=>(0,e.jsxs)(p,{onSelect:s(()=>J(t),"onSelect"),children:[(0,e.jsx)("span",{className:"truncate",children:t.name}),(0,e.jsxs)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:[t.destination,t.port===null?"":`:${t.port}`]})]},t.id))]}),x.data?.configError?(0,e.jsx)(p,{disabled:!0,className:"text-muted-foreground",children:x.data.configError}):null]}):null,(0,e.jsx)(G,{children:"Environments"}),z.length===0?(0,e.jsx)(p,{disabled:!0,children:w.isLoading?"Loading…":"No SSH environments"}):z.map(t=>(0,e.jsx)(p,{onSelect:s(()=>de(t.id,t.name),"onSelect"),children:t.name},t.id)),(0,e.jsx)(Ne,{}),f?(0,e.jsx)(p,{onSelect:s(()=>H(!0),"onSelect"),children:"Connect to host…"}):null,(0,e.jsx)(p,{asChild:!0,children:(0,e.jsx)(ve,{to:"/company/settings/instance/environments",children:"Manage SSH environments"})})]})]}),(0,e.jsx)(S,{type:"button",variant:"ghost",size:"icon-xs","aria-label":r.panes.length>=F?"Close split":"Split terminal","aria-pressed":r.panes.length>=F,onClick:ce,disabled:q||r.panes.length===0,children:(0,e.jsx)(Qe,{"aria-hidden":!0})})]}),(0,e.jsx)(Oe,{companyId:n,open:L,savedHosts:_,onOpenChange:H,onConnect:J}),E?(0,e.jsx)("p",{className:"shrink-0 border-b border-border px-3 py-1 text-xs text-destructive",role:"alert",children:E}):null,r.panes.length===0?(0,e.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center",children:[(0,e.jsx)(V,{className:"size-6 text-muted-foreground","aria-hidden":!0}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No terminal sessions yet."}),f?(0,e.jsxs)(S,{type:"button",variant:"outline",size:"sm",onClick:s(()=>R(),"onClick"),disabled:q,children:[(0,e.jsx)(se,{"aria-hidden":!0}),"New local terminal"]}):(0,e.jsx)("p",{className:"max-w-md text-xs text-muted-foreground",children:"A shell on this host needs instance admin access. Open an SSH terminal to a registered environment instead."})]}):(0,e.jsx)(Ae,{className:"min-h-0 flex-1",children:r.panes.map((t,a)=>(0,e.jsxs)(d.Fragment,{children:[a>0?(0,e.jsx)(Te,{}):null,(0,e.jsx)(Pe,{id:`terminal-pane-${a}`,minSize:"20%",children:(0,e.jsx)("div",{className:ee("h-full min-h-0",r.panes.length>1&&a===r.focused&&"ring-1 ring-inset ring-ring"),onFocusCapture:s(()=>m(i=>i.focused===a?i:{...i,focused:a}),"onFocusCapture"),onMouseDown:s(()=>m(i=>i.focused===a?i:{...i,focused:a}),"onMouseDown"),"data-testid":`terminal-pane-${a}`,children:(0,e.jsx)(Ke,{companyId:n,sessionId:t,active:a===r.focused,onSessionChange:s(i=>{I.has(i.id)&&O(i)},"onSessionChange"),onExit:s(i=>{const c=I.get(t);c&&O({...c,status:"exited",exitCode:i.exitCode})},"onExit")})})})]},t))})]})}s(Ge,"TerminalWorkspace");function at(){const{selectedCompanyId:n}=ge(),{setBreadcrumbs:o}=be();return(0,d.useEffect)(()=>{o([{label:"Terminal"}])},[o]),n?(0,e.jsx)(Ge,{companyId:n},n):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select a company to open a terminal."})}s(at,"Terminal");export{at as Terminal};
1
+ var xe=Object.defineProperty;var s=(n,o)=>xe(n,"name",{value:o,configurable:!0});import{i as ae}from"./rolldown-runtime-ZpX3ckPj.js";import{G as ee,Qa as pe,St as te,Za as re,_a as Q,eo as fe,ht as ge,n as je,va as K}from"./boxes-DcYq-jCc.js";import{n as be,o as ve,r as S,st as se}from"./BreadcrumbContext-BdR2QZTG.js";import{C as ye,S as Se,_ as Ne,a as Ce,c as we,f as ke,i as De,m as G,o as Me,p,r as Ee,t as He,u as ze}from"./dialog-Be3BfHbu.js";import{t as X}from"./label-DxRcxQw2.js";import{t as Fe}from"./x-C7r-gM7x.js";import{t as P}from"./input-BUMo9M0E.js";import{t as Le}from"./access-Xsz-Z8Lm.js";import{t as _e}from"./environments-BZZFtpSV.js";import{_t as k,c as Ae,gt as qe,ht as Z,mt as D,o as Te,pn as ne,pt as Ke,s as Pe,un as V}from"./index-C4vuH91F.js";var ie={name:"columns-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],aliases:["columns"]};ie.node;var Qe=je(ie),d=ae(fe(),1),e=ae(pe(),1);function Oe({companyId:n,open:o,savedHosts:u,onOpenChange:r,onConnect:m}){const M=re(),[N,j]=(0,d.useState)(""),[v,E]=(0,d.useState)(""),[y,L]=(0,d.useState)(""),[H,C]=(0,d.useState)(null),f=y.trim(),g=s(()=>M.invalidateQueries({queryKey:Z.sshHosts(n)}),"refreshHosts"),w=Q({mutationFn:s(()=>D.createSshHost(n,{name:N.trim(),destination:v.trim(),...f?{port:Number.parseInt(f,10)}:{}}),"mutationFn"),onSuccess:s(l=>{C(null),j(""),E(""),L(""),g(),r(!1),m(l)},"onSuccess"),onError:s(l=>C(k(l,"Could not save the SSH host.")),"onError")}),b=Q({mutationFn:s(l=>D.removeSshHost(n,l),"mutationFn"),onSuccess:s(()=>{C(null),g()},"onSuccess"),onError:s(l=>C(k(l,"Could not remove the saved SSH host.")),"onError")}),z=f.length>0&&!/^[0-9]+$/.test(f),x=w.isPending||!N.trim()||!v.trim()||z;return(0,e.jsx)(He,{open:o,onOpenChange:r,children:(0,e.jsxs)(Ee,{className:"sm:max-w-md",children:[(0,e.jsxs)(Me,{children:[(0,e.jsx)(we,{children:"Connect to host"}),(0,e.jsx)(De,{children:"The session starts this server's ssh client with its own keys, agent and known hosts."})]}),(0,e.jsxs)("form",{className:"space-y-3",onSubmit:s(l=>{l.preventDefault(),x||w.mutate()},"onSubmit"),children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(X,{htmlFor:"ssh-host-name",children:"Name"}),(0,e.jsx)(P,{id:"ssh-host-name",value:N,placeholder:"prod-db",autoComplete:"off",onChange:s(l=>j(l.target.value),"onChange")})]}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(X,{htmlFor:"ssh-host-destination",children:"Destination"}),(0,e.jsx)(P,{id:"ssh-host-destination",value:v,placeholder:"user@host",autoComplete:"off",onChange:s(l=>E(l.target.value),"onChange")})]}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)(X,{htmlFor:"ssh-host-port",children:"Port"}),(0,e.jsx)(P,{id:"ssh-host-port",value:y,placeholder:"22",inputMode:"numeric",autoComplete:"off","aria-invalid":z,onChange:s(l=>L(l.target.value),"onChange")})]}),H?(0,e.jsx)("p",{className:"text-xs text-destructive",role:"alert",children:H}):null,u.length>0?(0,e.jsxs)("div",{className:"space-y-1 border-t border-border pt-3",children:[(0,e.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Saved hosts"}),(0,e.jsx)("ul",{className:"space-y-1",children:u.map(l=>(0,e.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,e.jsxs)("button",{type:"button",className:"min-w-0 flex-1 truncate text-left hover:underline",onClick:s(()=>{r(!1),m(l)},"onClick"),children:[l.name,(0,e.jsxs)("span",{className:"ml-2 text-muted-foreground",children:[l.destination,l.port===null?"":`:${l.port}`]})]}),(0,e.jsx)(S,{type:"button",variant:"ghost",size:"icon-xs","aria-label":`Remove ${l.name}`,disabled:b.isPending&&b.variables===l.id,onClick:s(()=>b.mutate(l.id),"onClick"),children:(0,e.jsx)(ye,{"aria-hidden":!0})})]},l.id))})]}):null,(0,e.jsxs)(Ce,{children:[(0,e.jsx)(S,{type:"button",variant:"ghost",onClick:s(()=>r(!1),"onClick"),children:"Cancel"}),(0,e.jsx)(S,{type:"submit",disabled:x,children:"Save and connect"})]})]})]})})}s(Oe,"SshHostDialog");var F=2;function oe(n){return`paperclip:terminal-layout:v1:${n}`}s(oe,"layoutKey");function U(n){return`paperclip:terminal-titles:v1:${n}`}s(U,"titlesKey");function le(n){try{return JSON.parse(window.localStorage.getItem(n)??"null")}catch{return null}}s(le,"readJson");function W(n,o){try{window.localStorage.setItem(n,JSON.stringify(o))}catch{return}}s(W,"writeJson");function $e(n){const o=le(oe(n)),u=Array.isArray(o?.panes)?o.panes.filter(r=>typeof r=="string").slice(0,F):[];return{panes:u,focused:typeof o?.focused=="number"&&o.focused>=0&&o.focused<u.length?o.focused:0}}s($e,"readLayout");function Be(n){const o=le(U(n));return!o||typeof o!="object"||Array.isArray(o)?{}:Object.fromEntries(Object.entries(o).filter(u=>typeof u[1]=="string"))}s(Be,"readTitles");function Re(n,o){const u=new Set(o.map(m=>m.id)),r=n.panes.filter((m,M)=>u.has(m)&&n.panes.indexOf(m)===M);return r.length===0&&o.length>0&&r.push(o[0].id),{panes:r,focused:Math.min(n.focused,Math.max(0,r.length-1))}}s(Re,"reconcileLayout");function Je(n,o){return n.focused===o.focused&&n.panes.length===o.panes.length&&n.panes.every((u,r)=>u===o.panes[r])}s(Je,"sameLayout");function Ge({companyId:n}){const o=re(),u=Z.sessions(n),[r,m]=(0,d.useState)(()=>$e(n)),[M,N]=(0,d.useState)(()=>Be(n)),[j,v]=(0,d.useState)(null),[E,y]=(0,d.useState)(null),[L,H]=(0,d.useState)(!1),C=K({queryKey:te.access.currentBoardAccess,queryFn:s(()=>Le.getCurrentBoardAccess(),"queryFn")}),f=qe(C.data),g=K({queryKey:u,queryFn:s(()=>D.list(n),"queryFn")}),w=K({queryKey:te.environments.list(n),queryFn:s(()=>_e.list(n),"queryFn"),enabled:g.isSuccess}),b=(0,d.useMemo)(()=>g.data??[],[g.data]),z=(0,d.useMemo)(()=>(w.data??[]).filter(t=>t.driver==="ssh"),[w.data]),x=K({queryKey:Z.sshHosts(n),queryFn:s(()=>D.listSshHosts(n),"queryFn"),enabled:f}),l=(0,d.useMemo)(()=>(x.data?.hosts??[]).filter(t=>t.source==="config"),[x.data]),_=(0,d.useMemo)(()=>(x.data?.hosts??[]).filter(t=>t.source==="saved"),[x.data]);(0,d.useEffect)(()=>{g.isSuccess&&m(t=>{const a=Re(t,b);return Je(t,a)?t:a})},[b,g.isSuccess]),(0,d.useEffect)(()=>{W(oe(n),r)},[n,r]);const O=(0,d.useCallback)(t=>{o.setQueryData(u,(a=[])=>a.some(i=>i.id===t.id)?a.map(i=>i.id===t.id?t:i):[...a,t])},[o,u]),$=(0,d.useCallback)((t,a)=>{m(i=>{const c=i.panes.indexOf(t);if(c>=0)return{...i,focused:c};const h=a??i.focused,T=[...i.panes];return h>=T.length?T.push(t):T[h]=t,{panes:T.slice(0,F),focused:Math.min(h,1)}})},[]),A=Q({mutationFn:s(t=>D.create(n,t.body),"mutationFn"),onSuccess:s((t,a)=>{y(null),O(t),$(t.id,a.pane)},"onSuccess"),onError:s(t=>y(k(t,"Could not open a terminal session.")),"onError")}),B=Q({mutationFn:s(t=>D.remove(n,t),"mutationFn"),onSuccess:s((t,a)=>{y(null),o.setQueryData(u,(i=[])=>i.filter(c=>c.id!==a)),m(i=>{const c=i.panes.filter(h=>h!==a);return{panes:c,focused:Math.min(i.focused,Math.max(0,c.length-1))}}),N(i=>{if(!(a in i))return i;const{[a]:c,...h}=i;return W(U(n),h),h})},"onSuccess"),onError:s(t=>y(k(t,"Could not close the terminal session.")),"onError")}),R=s(t=>A.mutate({body:{kind:"local"},pane:t}),"createLocal"),de=s((t,a)=>A.mutate({body:{kind:"ssh",environmentId:t,title:a}}),"createSsh"),J=s(t=>A.mutate({body:{kind:"local",sshHostId:t.id,title:t.name}}),"createSshHost"),ce=s(()=>{if(r.panes.length>=F){const a=r.panes[r.focused]??r.panes[0];m({panes:[a],focused:0});return}const t=b.find(a=>!r.panes.includes(a.id));t?$(t.id,r.panes.length):f&&R(r.panes.length)},"toggleSplit"),ue=s(t=>M[t.id]??t.title,"titleOf"),Y=s(()=>{if(!j)return;const t=j.value.trim();N(a=>{const{[j.id]:i,...c}=a,h=t?{...c,[j.id]:t}:c;return W(U(n),h),h}),v(null)},"commitRename"),me=s(t=>{t.key==="Enter"?(t.preventDefault(),Y()):t.key==="Escape"&&(t.preventDefault(),v(null))},"onRenameKeyDown");if(g.isLoading)return(0,e.jsx)("p",{className:"p-4 text-sm text-muted-foreground",children:"Loading terminal sessions…"});if(g.isError)return(0,e.jsxs)("div",{className:"flex h-full min-h-(--sz-60vh) flex-col items-center justify-center gap-2 p-6 text-center","data-testid":"terminal-access-error",children:[(0,e.jsx)(V,{className:"size-6 text-muted-foreground","aria-hidden":!0}),(0,e.jsx)("p",{className:"text-sm font-medium text-foreground",children:"Terminal unavailable"}),(0,e.jsx)("p",{className:"max-w-md text-sm text-muted-foreground",children:k(g.error,"Terminal sessions could not be loaded.")})]});const he=r.panes[r.focused]??null,I=new Map(b.map(t=>[t.id,t])),q=A.isPending;return(0,e.jsxs)("div",{className:"flex h-full min-h-(--sz-60vh) flex-col overflow-hidden rounded-md border border-border","data-testid":"terminal-workspace",children:[(0,e.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border px-2 py-1",children:[(0,e.jsx)("div",{role:"tablist","aria-label":"Terminal sessions",className:"flex min-w-0 flex-1 items-center gap-1 overflow-x-auto",children:b.map(t=>{const a=t.id===he,i=r.panes.includes(t.id),c=ue(t);return(0,e.jsxs)("div",{className:ee("group flex shrink-0 items-center gap-1 rounded-md border px-2 py-1 text-xs",a?"border-ring bg-accent text-foreground":i?"border-border text-foreground":"border-transparent text-muted-foreground hover:bg-accent"),children:[t.kind==="ssh"||t.sshHost?(0,e.jsx)(ne,{className:"size-3","aria-hidden":!0}):(0,e.jsx)(V,{className:"size-3","aria-hidden":!0}),j?.id===t.id?(0,e.jsx)(P,{autoFocus:!0,value:j.value,"aria-label":"Session title",onChange:s(h=>v({id:t.id,value:h.target.value}),"onChange"),onKeyDown:me,onBlur:Y,className:"h-6 w-32 px-1 text-xs md:text-xs"}):(0,e.jsxs)("button",{type:"button",role:"tab","aria-selected":a,title:"Double-click to rename",className:"max-w-48 truncate outline-none focus-visible:underline",onClick:s(()=>$(t.id),"onClick"),onDoubleClick:s(()=>v({id:t.id,value:c}),"onDoubleClick"),children:[c,t.status==="exited"?(0,e.jsx)("span",{className:"ml-1 text-muted-foreground",children:"(ended)"}):null]}),(0,e.jsx)("button",{type:"button","aria-label":`Close ${c}`,className:"rounded-sm text-muted-foreground hover:text-foreground",disabled:B.isPending&&B.variables===t.id,onClick:s(()=>B.mutate(t.id),"onClick"),children:(0,e.jsx)(Fe,{className:"size-3","aria-hidden":!0})})]},t.id)})}),f?(0,e.jsxs)(S,{type:"button",variant:"ghost",size:"xs",onClick:s(()=>R(),"onClick"),disabled:q,children:[(0,e.jsx)(se,{"aria-hidden":!0}),"Local"]}):null,(0,e.jsxs)(ze,{children:[(0,e.jsx)(Se,{asChild:!0,children:(0,e.jsxs)(S,{type:"button",variant:"ghost",size:"xs",disabled:q,children:[(0,e.jsx)(ne,{"aria-hidden":!0}),"SSH"]})}),(0,e.jsxs)(ke,{align:"end",className:"w-72",children:[f?(0,e.jsxs)(e.Fragment,{children:[x.isLoading?(0,e.jsx)(p,{disabled:!0,children:"Loading…"}):x.isError?(0,e.jsx)(p,{disabled:!0,className:"text-destructive",children:k(x.error,"SSH hosts could not be loaded.")}):l.length===0&&_.length===0?(0,e.jsx)(p,{disabled:!0,children:"No SSH hosts"}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(G,{children:"~/.ssh/config"}),l.length===0?(0,e.jsx)(p,{disabled:!0,children:"No hosts"}):l.map(t=>(0,e.jsxs)(p,{onSelect:s(()=>J(t),"onSelect"),children:[(0,e.jsx)("span",{className:"truncate",children:t.name}),(0,e.jsx)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:t.destination})]},t.id)),(0,e.jsx)(G,{children:"Saved"}),_.length===0?(0,e.jsx)(p,{disabled:!0,children:"No saved hosts"}):_.map(t=>(0,e.jsxs)(p,{onSelect:s(()=>J(t),"onSelect"),children:[(0,e.jsx)("span",{className:"truncate",children:t.name}),(0,e.jsxs)("span",{className:"ml-auto truncate pl-2 text-xs text-muted-foreground",children:[t.destination,t.port===null?"":`:${t.port}`]})]},t.id))]}),x.data?.configError?(0,e.jsx)(p,{disabled:!0,className:"text-muted-foreground",children:x.data.configError}):null]}):null,(0,e.jsx)(G,{children:"Environments"}),z.length===0?(0,e.jsx)(p,{disabled:!0,children:w.isLoading?"Loading…":"No SSH environments"}):z.map(t=>(0,e.jsx)(p,{onSelect:s(()=>de(t.id,t.name),"onSelect"),children:t.name},t.id)),(0,e.jsx)(Ne,{}),f?(0,e.jsx)(p,{onSelect:s(()=>H(!0),"onSelect"),children:"Connect to host…"}):null,(0,e.jsx)(p,{asChild:!0,children:(0,e.jsx)(ve,{to:"/company/settings/instance/environments",children:"Manage SSH environments"})})]})]}),(0,e.jsx)(S,{type:"button",variant:"ghost",size:"icon-xs","aria-label":r.panes.length>=F?"Close split":"Split terminal","aria-pressed":r.panes.length>=F,onClick:ce,disabled:q||r.panes.length===0,children:(0,e.jsx)(Qe,{"aria-hidden":!0})})]}),(0,e.jsx)(Oe,{companyId:n,open:L,savedHosts:_,onOpenChange:H,onConnect:J}),E?(0,e.jsx)("p",{className:"shrink-0 border-b border-border px-3 py-1 text-xs text-destructive",role:"alert",children:E}):null,r.panes.length===0?(0,e.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-6 text-center",children:[(0,e.jsx)(V,{className:"size-6 text-muted-foreground","aria-hidden":!0}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No terminal sessions yet."}),f?(0,e.jsxs)(S,{type:"button",variant:"outline",size:"sm",onClick:s(()=>R(),"onClick"),disabled:q,children:[(0,e.jsx)(se,{"aria-hidden":!0}),"New local terminal"]}):(0,e.jsx)("p",{className:"max-w-md text-xs text-muted-foreground",children:"A shell on this host needs instance admin access. Open an SSH terminal to a registered environment instead."})]}):(0,e.jsx)(Ae,{className:"min-h-0 flex-1",children:r.panes.map((t,a)=>(0,e.jsxs)(d.Fragment,{children:[a>0?(0,e.jsx)(Te,{}):null,(0,e.jsx)(Pe,{id:`terminal-pane-${a}`,minSize:"20%",children:(0,e.jsx)("div",{className:ee("h-full min-h-0",r.panes.length>1&&a===r.focused&&"ring-1 ring-inset ring-ring"),onFocusCapture:s(()=>m(i=>i.focused===a?i:{...i,focused:a}),"onFocusCapture"),onMouseDown:s(()=>m(i=>i.focused===a?i:{...i,focused:a}),"onMouseDown"),"data-testid":`terminal-pane-${a}`,children:(0,e.jsx)(Ke,{companyId:n,sessionId:t,active:a===r.focused,onSessionChange:s(i=>{I.has(i.id)&&O(i)},"onSessionChange"),onExit:s(i=>{const c=I.get(t);c&&O({...c,status:"exited",exitCode:i.exitCode})},"onExit")})})})]},t))})]})}s(Ge,"TerminalWorkspace");function at(){const{selectedCompanyId:n}=ge(),{setBreadcrumbs:o}=be();return(0,d.useEffect)(()=>{o([{label:"Terminal"}])},[o]),n?(0,e.jsx)(Ge,{companyId:n},n):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Select a company to open a terminal."})}s(at,"Terminal");export{at as Terminal};
@@ -1 +1 @@
1
- var D=Object.defineProperty;var s=(e,n)=>D(e,"name",{value:n,configurable:!0});import{i as C}from"./rolldown-runtime-ZpX3ckPj.js";import{Qa as y,eo as P}from"./boxes-Bpd3vwBa.js";var o=C(P(),1),b=C(y(),1),k={info:4e3,success:3500,warn:8e3,error:1e4},$=1500,O=15e3,g=5,j=3500,L=2e4,_=(0,o.createContext)(null),w=(0,o.createContext)(null);function N(e,n){const i=k[n];return typeof e!="number"||!Number.isFinite(e)?i:Math.max($,Math.min(O,Math.floor(e)))}s(N,"normalizeTtl");function R(){return`toast_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}s(R,"generateToastId");function F({children:e}){const[n,i]=(0,o.useState)([]),a=(0,o.useRef)(new Map),l=(0,o.useRef)(new Map),f=(0,o.useCallback)(t=>{const r=a.current.get(t);r!==void 0&&(window.clearTimeout(r),a.current.delete(t))},[]),d=(0,o.useCallback)(t=>{f(t),i(r=>r.filter(u=>u.id!==t))},[f]),M=(0,o.useCallback)(()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear(),i([])},[]),v=(0,o.useCallback)(t=>{const r=Date.now(),u=t.tone??"info",x=N(t.ttlMs,u),h=t.dedupeKey??t.id??`${u}|${t.title}|${t.body??""}|${t.action?.href??""}`;for(const[T,m]of l.current.entries())r-m>L&&l.current.delete(T);const S=l.current.get(h);if(S&&r-S<j)return null;l.current.set(h,r);const c=t.id??R();f(c),i(T=>[{id:c,title:t.title,body:t.body,tone:u,ttlMs:x,action:t.action,actor:t.actor,createdAt:r},...T.filter(m=>m.id!==c)].slice(0,g));const E=window.setTimeout(()=>{d(c)},x);return a.current.set(c,E),c},[f,d]);(0,o.useEffect)(()=>()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear()},[]);const A=(0,o.useMemo)(()=>({pushToast:v,dismissToast:d,clearToasts:M}),[v,d,M]);return(0,b.jsx)(w.Provider,{value:A,children:(0,b.jsx)(_.Provider,{value:n,children:e})})}s(F,"ToastProvider");function p(){const e=(0,o.useContext)(_);if(!e)throw new Error("useToastState must be used within a ToastProvider");return e}s(p,"useToastState");function I(){const e=(0,o.useContext)(w);if(!e)throw new Error("useToastActions must be used within a ToastProvider");return e}s(I,"useToastActions");function K(){return(0,o.useContext)(w)}s(K,"useOptionalToastActions");function W(){return(0,o.useContext)(_)}s(W,"useOptionalToastState");function z(){const e=p(),n=I();return(0,o.useMemo)(()=>({toasts:e,...n}),[e,n])}s(z,"useToast");export{I as a,z as i,K as n,p as o,W as r,F as t};
1
+ var D=Object.defineProperty;var s=(e,n)=>D(e,"name",{value:n,configurable:!0});import{i as C}from"./rolldown-runtime-ZpX3ckPj.js";import{Qa as y,eo as P}from"./boxes-DcYq-jCc.js";var o=C(P(),1),b=C(y(),1),k={info:4e3,success:3500,warn:8e3,error:1e4},$=1500,O=15e3,g=5,j=3500,L=2e4,_=(0,o.createContext)(null),w=(0,o.createContext)(null);function N(e,n){const i=k[n];return typeof e!="number"||!Number.isFinite(e)?i:Math.max($,Math.min(O,Math.floor(e)))}s(N,"normalizeTtl");function R(){return`toast_${Date.now()}_${Math.random().toString(36).slice(2,8)}`}s(R,"generateToastId");function F({children:e}){const[n,i]=(0,o.useState)([]),a=(0,o.useRef)(new Map),l=(0,o.useRef)(new Map),f=(0,o.useCallback)(t=>{const r=a.current.get(t);r!==void 0&&(window.clearTimeout(r),a.current.delete(t))},[]),d=(0,o.useCallback)(t=>{f(t),i(r=>r.filter(u=>u.id!==t))},[f]),M=(0,o.useCallback)(()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear(),i([])},[]),v=(0,o.useCallback)(t=>{const r=Date.now(),u=t.tone??"info",x=N(t.ttlMs,u),h=t.dedupeKey??t.id??`${u}|${t.title}|${t.body??""}|${t.action?.href??""}`;for(const[T,m]of l.current.entries())r-m>L&&l.current.delete(T);const S=l.current.get(h);if(S&&r-S<j)return null;l.current.set(h,r);const c=t.id??R();f(c),i(T=>[{id:c,title:t.title,body:t.body,tone:u,ttlMs:x,action:t.action,actor:t.actor,createdAt:r},...T.filter(m=>m.id!==c)].slice(0,g));const E=window.setTimeout(()=>{d(c)},x);return a.current.set(c,E),c},[f,d]);(0,o.useEffect)(()=>()=>{for(const t of a.current.values())window.clearTimeout(t);a.current.clear()},[]);const A=(0,o.useMemo)(()=>({pushToast:v,dismissToast:d,clearToasts:M}),[v,d,M]);return(0,b.jsx)(w.Provider,{value:A,children:(0,b.jsx)(_.Provider,{value:n,children:e})})}s(F,"ToastProvider");function p(){const e=(0,o.useContext)(_);if(!e)throw new Error("useToastState must be used within a ToastProvider");return e}s(p,"useToastState");function I(){const e=(0,o.useContext)(w);if(!e)throw new Error("useToastActions must be used within a ToastProvider");return e}s(I,"useToastActions");function K(){return(0,o.useContext)(w)}s(K,"useOptionalToastActions");function W(){return(0,o.useContext)(_)}s(W,"useOptionalToastState");function z(){const e=p(),n=I();return(0,o.useMemo)(()=>({toasts:e,...n}),[e,n])}s(z,"useToast");export{I as a,z as i,K as n,p as o,W as r,F as t};
@@ -1 +1 @@
1
- var n=Object.defineProperty;var s=(e,t)=>n(e,"name",{value:t,configurable:!0});import{ia as i}from"./boxes-Bpd3vwBa.js";function o(e){const t=new URLSearchParams;e.state&&t.set("state",e.state),e.limit&&t.set("limit",String(e.limit)),e.offset&&t.set("offset",String(e.offset));const a=t.toString();return a?`?${a}`:""}s(o,"buildInviteListQuery");var m={createCompanyInvite:s((e,t={})=>i.post(`/companies/${e}/invites`,t),"createCompanyInvite"),createOpenClawInvitePrompt:s((e,t={})=>i.post(`/companies/${e}/openclaw/invite-prompt`,t),"createOpenClawInvitePrompt"),getInvite:s(e=>i.get(`/invites/${e}`),"getInvite"),getInviteOnboarding:s(e=>i.get(`/invites/${e}/onboarding`),"getInviteOnboarding"),acceptInvite:s((e,t)=>i.post(`/invites/${e}/accept`,t),"acceptInvite"),listInvites:s((e,t={})=>i.get(`/companies/${e}/invites${o(t)}`),"listInvites"),revokeInvite:s(e=>i.post(`/invites/${e}/revoke`,{}),"revokeInvite"),listJoinRequests:s((e,t="pending_approval",a)=>i.get(`/companies/${e}/join-requests?status=${t}${a?`&requestType=${a}`:""}`),"listJoinRequests"),listMembers:s(e=>i.get(`/companies/${e}/members`),"listMembers"),listUserDirectory:s(e=>i.get(`/companies/${e}/user-directory`),"listUserDirectory"),updateMember:s((e,t,a)=>i.patch(`/companies/${e}/members/${t}`,a),"updateMember"),updateMemberPermissions:s((e,t,a)=>i.patch(`/companies/${e}/members/${t}/permissions`,a),"updateMemberPermissions"),updateMemberAccess:s((e,t,a)=>i.patch(`/companies/${e}/members/${t}/role-and-grants`,a),"updateMemberAccess"),archiveMember:s((e,t,a={})=>i.post(`/companies/${e}/members/${t}/archive`,a),"archiveMember"),approveJoinRequest:s((e,t)=>i.post(`/companies/${e}/join-requests/${t}/approve`,{}),"approveJoinRequest"),rejectJoinRequest:s((e,t)=>i.post(`/companies/${e}/join-requests/${t}/reject`,{}),"rejectJoinRequest"),claimJoinRequestApiKey:s((e,t)=>i.post(`/join-requests/${e}/claim-api-key`,{claimSecret:t}),"claimJoinRequestApiKey"),getBoardClaimStatus:s((e,t)=>i.get(`/board-claim/${e}?code=${encodeURIComponent(t)}`),"getBoardClaimStatus"),claimBoard:s((e,t)=>i.post(`/board-claim/${e}/claim`,{code:t}),"claimBoard"),claimBootstrapAdmin:s(()=>i.post("/bootstrap/claim",{}),"claimBootstrapAdmin"),getCliAuthChallenge:s((e,t)=>i.get(`/cli-auth/challenges/${e}?token=${encodeURIComponent(t)}`),"getCliAuthChallenge"),approveCliAuthChallenge:s((e,t)=>i.post(`/cli-auth/challenges/${e}/approve`,{token:t}),"approveCliAuthChallenge"),cancelCliAuthChallenge:s((e,t)=>i.post(`/cli-auth/challenges/${e}/cancel`,{token:t}),"cancelCliAuthChallenge"),searchAdminUsers:s(e=>i.get(`/admin/users?query=${encodeURIComponent(e)}`),"searchAdminUsers"),promoteInstanceAdmin:s(e=>i.post(`/admin/users/${e}/promote-instance-admin`,{}),"promoteInstanceAdmin"),demoteInstanceAdmin:s(e=>i.post(`/admin/users/${e}/demote-instance-admin`,{}),"demoteInstanceAdmin"),getUserCompanyAccess:s(e=>i.get(`/admin/users/${e}/company-access`),"getUserCompanyAccess"),setUserCompanyAccess:s((e,t)=>i.put(`/admin/users/${e}/company-access`,{companyIds:t}),"setUserCompanyAccess"),getCurrentBoardAccess:s(()=>i.get("/cli-auth/me"),"getCurrentBoardAccess")};export{m as t};
1
+ var n=Object.defineProperty;var s=(e,t)=>n(e,"name",{value:t,configurable:!0});import{ia as i}from"./boxes-DcYq-jCc.js";function o(e){const t=new URLSearchParams;e.state&&t.set("state",e.state),e.limit&&t.set("limit",String(e.limit)),e.offset&&t.set("offset",String(e.offset));const a=t.toString();return a?`?${a}`:""}s(o,"buildInviteListQuery");var m={createCompanyInvite:s((e,t={})=>i.post(`/companies/${e}/invites`,t),"createCompanyInvite"),createOpenClawInvitePrompt:s((e,t={})=>i.post(`/companies/${e}/openclaw/invite-prompt`,t),"createOpenClawInvitePrompt"),getInvite:s(e=>i.get(`/invites/${e}`),"getInvite"),getInviteOnboarding:s(e=>i.get(`/invites/${e}/onboarding`),"getInviteOnboarding"),acceptInvite:s((e,t)=>i.post(`/invites/${e}/accept`,t),"acceptInvite"),listInvites:s((e,t={})=>i.get(`/companies/${e}/invites${o(t)}`),"listInvites"),revokeInvite:s(e=>i.post(`/invites/${e}/revoke`,{}),"revokeInvite"),listJoinRequests:s((e,t="pending_approval",a)=>i.get(`/companies/${e}/join-requests?status=${t}${a?`&requestType=${a}`:""}`),"listJoinRequests"),listMembers:s(e=>i.get(`/companies/${e}/members`),"listMembers"),listUserDirectory:s(e=>i.get(`/companies/${e}/user-directory`),"listUserDirectory"),updateMember:s((e,t,a)=>i.patch(`/companies/${e}/members/${t}`,a),"updateMember"),updateMemberPermissions:s((e,t,a)=>i.patch(`/companies/${e}/members/${t}/permissions`,a),"updateMemberPermissions"),updateMemberAccess:s((e,t,a)=>i.patch(`/companies/${e}/members/${t}/role-and-grants`,a),"updateMemberAccess"),archiveMember:s((e,t,a={})=>i.post(`/companies/${e}/members/${t}/archive`,a),"archiveMember"),approveJoinRequest:s((e,t)=>i.post(`/companies/${e}/join-requests/${t}/approve`,{}),"approveJoinRequest"),rejectJoinRequest:s((e,t)=>i.post(`/companies/${e}/join-requests/${t}/reject`,{}),"rejectJoinRequest"),claimJoinRequestApiKey:s((e,t)=>i.post(`/join-requests/${e}/claim-api-key`,{claimSecret:t}),"claimJoinRequestApiKey"),getBoardClaimStatus:s((e,t)=>i.get(`/board-claim/${e}?code=${encodeURIComponent(t)}`),"getBoardClaimStatus"),claimBoard:s((e,t)=>i.post(`/board-claim/${e}/claim`,{code:t}),"claimBoard"),claimBootstrapAdmin:s(()=>i.post("/bootstrap/claim",{}),"claimBootstrapAdmin"),getCliAuthChallenge:s((e,t)=>i.get(`/cli-auth/challenges/${e}?token=${encodeURIComponent(t)}`),"getCliAuthChallenge"),approveCliAuthChallenge:s((e,t)=>i.post(`/cli-auth/challenges/${e}/approve`,{token:t}),"approveCliAuthChallenge"),cancelCliAuthChallenge:s((e,t)=>i.post(`/cli-auth/challenges/${e}/cancel`,{token:t}),"cancelCliAuthChallenge"),searchAdminUsers:s(e=>i.get(`/admin/users?query=${encodeURIComponent(e)}`),"searchAdminUsers"),promoteInstanceAdmin:s(e=>i.post(`/admin/users/${e}/promote-instance-admin`,{}),"promoteInstanceAdmin"),demoteInstanceAdmin:s(e=>i.post(`/admin/users/${e}/demote-instance-admin`,{}),"demoteInstanceAdmin"),getUserCompanyAccess:s(e=>i.get(`/admin/users/${e}/company-access`),"getUserCompanyAccess"),setUserCompanyAccess:s((e,t)=>i.put(`/admin/users/${e}/company-access`,{companyIds:t}),"setUserCompanyAccess"),getCurrentBoardAccess:s(()=>i.get("/cli-auth/me"),"getCurrentBoardAccess")};export{m as t};
@@ -0,0 +1 @@
1
+ import"./boxes-DcYq-jCc.js";
@@ -1 +1 @@
1
- var u=Object.defineProperty;var o=(e,t)=>u(e,"name",{value:t,configurable:!0});import{Br as p,ia as s,ra as l,zr as g}from"./boxes-Bpd3vwBa.js";function d(e,t){return t?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(t)}`:e}o(d,"withCompanyScope");function a(e,t,n=""){return d(`/agents/${encodeURIComponent(e)}${n}`,t)}o(a,"agentPath");var C={setAvatar:o((e,t,n)=>s.put(`/companies/${e}/agents/${t}/avatar`,{imageBase64:n}),"setAvatar"),getIdentity:o((e,t)=>s.get(a(e,t,"/identity")),"getIdentity"),adoptAiConnection:o((e,t,n,i)=>s.post(d(`/agents/${e}/connection-intents/${t}/adopt`,i),{connectionId:n}),"adoptAiConnection"),list:o(e=>s.get(`/companies/${e}/agents`),"list"),org:o(e=>s.get(`/companies/${e}/org`),"org"),listConfigurations:o(e=>s.get(`/companies/${e}/agent-configurations`),"listConfigurations"),get:o(async(e,t)=>{try{return await s.get(a(e,t))}catch(n){if(!(n instanceof l)||n.status!==409||!t||g(e))throw n;const i=p(e);if(!i)throw n;const r=(await s.get(`/companies/${t}/agents`)).filter(c=>c.status!=="terminated"&&p(c.urlKey)===i);if(r.length!==1)throw n;return s.get(a(r[0].id,t))}},"get"),getConfiguration:o((e,t)=>s.get(a(e,t,"/configuration")),"getConfiguration"),listConfigRevisions:o((e,t)=>s.get(a(e,t,"/config-revisions")),"listConfigRevisions"),getConfigRevision:o((e,t,n)=>s.get(a(e,n,`/config-revisions/${t}`)),"getConfigRevision"),rollbackConfigRevision:o((e,t,n)=>s.post(a(e,n,`/config-revisions/${t}/rollback`),{}),"rollbackConfigRevision"),create:o((e,t)=>s.post(`/companies/${e}/agents`,t),"create"),hire:o((e,t)=>s.post(`/companies/${e}/agent-hires`,t),"hire"),update:o((e,t,n)=>s.patch(a(e,n),t),"update"),updatePermissions:o((e,t,n)=>s.patch(a(e,n,"/permissions"),t),"updatePermissions"),batchAdapterConfigPreview:o(e=>s.post("/agents/batch/adapter-config/preview",{agentIds:e}),"batchAdapterConfigPreview"),batchAdapterConfig:o((e,t)=>s.post("/agents/batch/adapter-config",{agentIds:e,values:t}),"batchAdapterConfig"),instructionsBundle:o((e,t)=>s.get(a(e,t,"/instructions-bundle")),"instructionsBundle"),updateInstructionsBundle:o((e,t,n)=>s.patch(a(e,n,"/instructions-bundle"),t),"updateInstructionsBundle"),instructionsFile:o((e,t,n)=>s.get(a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),"instructionsFile"),saveInstructionsFile:o((e,t,n)=>s.put(a(e,n,"/instructions-bundle/file"),t),"saveInstructionsFile"),instructionCandidates:o((e,t)=>s.get(a(e,t,"/instructions-bundle/candidates")),"instructionCandidates"),resolveInstructionCandidate:o((e,t,n,i)=>s.post(a(e,i,`/instructions-bundle/candidates/${t}/resolve`),n),"resolveInstructionCandidate"),instructionHistory:o((e,t,n,i)=>s.get(a(e,n,`/instructions-bundle/history?path=${encodeURIComponent(t)}${i?`&cursor=${encodeURIComponent(i)}`:""}`)),"instructionHistory"),instructionRevision:o((e,t,n,i)=>s.get(a(e,i,`/instructions-bundle/revision/${n}?path=${encodeURIComponent(t)}`)),"instructionRevision"),instructionDiff:o((e,t,n,i,r)=>s.get(a(e,r,`/instructions-bundle/diff?path=${encodeURIComponent(t)}&from=${encodeURIComponent(n)}&to=${encodeURIComponent(i)}`)),"instructionDiff"),restoreInstructions:o((e,t,n)=>s.post(a(e,n,"/instructions-bundle/restore"),t),"restoreInstructions"),downloadInstructionsFile:o((e,t,n)=>`/api${a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}&download=true`)}`,"downloadInstructionsFile"),deleteInstructionsFile:o((e,t,n,i)=>s.delete(a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}${i?`&baseHash=${i}`:""}`)),"deleteInstructionsFile"),retryLifecycle:o((e,t)=>s.post(a(e,t,"/lifecycle/retry"),{}),"retryLifecycle"),pause:o((e,t)=>s.post(a(e,t,"/pause"),{}),"pause"),resume:o((e,t)=>s.post(a(e,t,"/resume"),{}),"resume"),clearError:o((e,t)=>s.post(a(e,t,"/clear-error"),{}),"clearError"),approve:o((e,t)=>s.post(a(e,t,"/approve"),{}),"approve"),terminate:o((e,t)=>s.post(a(e,t,"/terminate"),{}),"terminate"),remove:o((e,t)=>s.delete(a(e,t)),"remove"),listKeys:o((e,t)=>s.get(a(e,t,"/keys")),"listKeys"),skills:o((e,t)=>s.get(a(e,t,"/skills")),"skills"),syncSkills:o((e,t,n,i)=>s.post(a(e,i,"/skills/sync"),{desiredSkills:t,mode:n}),"syncSkills"),createKey:o((e,t,n,i)=>s.post(a(e,n,"/keys"),{name:t,...i?{scope:i}:{}}),"createKey"),revokeKey:o((e,t,n)=>s.delete(a(e,n,`/keys/${encodeURIComponent(t)}`)),"revokeKey"),runtimeState:o((e,t)=>s.get(a(e,t,"/runtime-state")),"runtimeState"),taskSessions:o((e,t)=>s.get(a(e,t,"/task-sessions")),"taskSessions"),resetSession:o((e,t,n)=>s.post(a(e,n,"/runtime-state/reset-session"),{taskKey:t??null}),"resetSession"),adapterModels:o((e,t,n)=>{const i=new URLSearchParams;n?.refresh&&i.set("refresh","1"),n?.provider&&i.set("provider",n.provider),n?.poolId&&i.set("poolId",n.poolId),n?.environmentId&&i.set("environmentId",n.environmentId);const r=i.size>0?`?${i.toString()}`:"";return s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/models${r}`)},"adapterModels"),detectModel:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/detect-model`),"detectModel"),testEnvironment:o((e,t,n)=>s.post(`/companies/${e}/adapters/${t}/test-environment`,n),"testEnvironment"),getAdapterAuthSignal:o((e,t,n)=>{const i=n?`?environmentId=${encodeURIComponent(n)}`:"";return s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/auth-signal${i}`)},"getAdapterAuthSignal"),invoke:o((e,t,n={})=>s.post(a(e,t,"/heartbeat/invoke"),n),"invoke"),wakeup:o((e,t,n)=>s.post(a(e,n,"/wakeup"),t),"wakeup"),retryFailedRun:o(async(e,t,n)=>{const i=await s.post(a(e,n,"/wakeup"),{source:"on_demand",triggerDetail:"manual",reason:"retry_failed_run",failedRunId:t});if("id"in i){if(["failed","timed_out","cancelled","interrupted"].includes(i.status))throw new Error("The previous retry has already stopped. Refresh the task and retry its latest failed run.");return{runId:i.id,issueId:null}}if("actionId"in i){if(i.status==="failed"||i.status==="cancelled")throw new Error("This retry could not start. Open the task to review its current access and recovery state.");return{runId:i.runId,issueId:i.issueId}}throw new Error(i.message??"Retry was skipped.")},"retryFailedRun"),loginWithClaude:o((e,t)=>s.post(a(e,t,"/claude-login"),{}),"loginWithClaude"),startAdapterAuthLogin:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions`,n),"startAdapterAuthLogin"),getAdapterAuthLoginStatus:o((e,t,n)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(n)}`,{cache:"no-store"}),"getAdapterAuthLoginStatus"),getActiveAdapterAuthLoginSession:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/active`,{cache:"no-store"}),"getActiveAdapterAuthLoginSession"),cancelAdapterAuthLogin:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(n)}/cancel`,{}),"cancelAdapterAuthLogin"),getClaudeOAuthTokenStatus:o(e=>s.get(`/companies/${encodeURIComponent(e)}/claude-oauth-token-status`),"getClaudeOAuthTokenStatus"),startClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions`,{adapterType:"claude_local",...t}),"startClaudeSetupTokenLogin"),getClaudeSetupTokenLoginStatus:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}`),"getClaudeSetupTokenLoginStatus"),getActiveClaudeSetupTokenLoginSession:o(e=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/active`,{cache:"no-store"}),"getActiveClaudeSetupTokenLoginSession"),getClaudeSetupTokenLoginPrompt:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/prompt`),"getClaudeSetupTokenLoginPrompt"),submitClaudeSetupTokenBrowserCode:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/code`,{browserCode:n}),"submitClaudeSetupTokenBrowserCode"),completeClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/completion`,{}),"completeClaudeSetupTokenLogin"),cancelClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/cancel`,{}),"cancelClaudeSetupTokenLogin"),availableSkills:o(()=>s.get("/skills/available"),"availableSkills")};export{C as t};
1
+ var u=Object.defineProperty;var o=(e,t)=>u(e,"name",{value:t,configurable:!0});import{Br as p,ia as s,ra as l,zr as g}from"./boxes-DcYq-jCc.js";function d(e,t){return t?`${e}${e.includes("?")?"&":"?"}companyId=${encodeURIComponent(t)}`:e}o(d,"withCompanyScope");function a(e,t,n=""){return d(`/agents/${encodeURIComponent(e)}${n}`,t)}o(a,"agentPath");var C={setAvatar:o((e,t,n)=>s.put(`/companies/${e}/agents/${t}/avatar`,{imageBase64:n}),"setAvatar"),getIdentity:o((e,t)=>s.get(a(e,t,"/identity")),"getIdentity"),adoptAiConnection:o((e,t,n,i)=>s.post(d(`/agents/${e}/connection-intents/${t}/adopt`,i),{connectionId:n}),"adoptAiConnection"),list:o(e=>s.get(`/companies/${e}/agents`),"list"),org:o(e=>s.get(`/companies/${e}/org`),"org"),listConfigurations:o(e=>s.get(`/companies/${e}/agent-configurations`),"listConfigurations"),get:o(async(e,t)=>{try{return await s.get(a(e,t))}catch(n){if(!(n instanceof l)||n.status!==409||!t||g(e))throw n;const i=p(e);if(!i)throw n;const r=(await s.get(`/companies/${t}/agents`)).filter(c=>c.status!=="terminated"&&p(c.urlKey)===i);if(r.length!==1)throw n;return s.get(a(r[0].id,t))}},"get"),getConfiguration:o((e,t)=>s.get(a(e,t,"/configuration")),"getConfiguration"),listConfigRevisions:o((e,t)=>s.get(a(e,t,"/config-revisions")),"listConfigRevisions"),getConfigRevision:o((e,t,n)=>s.get(a(e,n,`/config-revisions/${t}`)),"getConfigRevision"),rollbackConfigRevision:o((e,t,n)=>s.post(a(e,n,`/config-revisions/${t}/rollback`),{}),"rollbackConfigRevision"),create:o((e,t)=>s.post(`/companies/${e}/agents`,t),"create"),hire:o((e,t)=>s.post(`/companies/${e}/agent-hires`,t),"hire"),update:o((e,t,n)=>s.patch(a(e,n),t),"update"),updatePermissions:o((e,t,n)=>s.patch(a(e,n,"/permissions"),t),"updatePermissions"),batchAdapterConfigPreview:o(e=>s.post("/agents/batch/adapter-config/preview",{agentIds:e}),"batchAdapterConfigPreview"),batchAdapterConfig:o((e,t)=>s.post("/agents/batch/adapter-config",{agentIds:e,values:t}),"batchAdapterConfig"),instructionsBundle:o((e,t)=>s.get(a(e,t,"/instructions-bundle")),"instructionsBundle"),updateInstructionsBundle:o((e,t,n)=>s.patch(a(e,n,"/instructions-bundle"),t),"updateInstructionsBundle"),instructionsFile:o((e,t,n)=>s.get(a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}`)),"instructionsFile"),saveInstructionsFile:o((e,t,n)=>s.put(a(e,n,"/instructions-bundle/file"),t),"saveInstructionsFile"),instructionCandidates:o((e,t)=>s.get(a(e,t,"/instructions-bundle/candidates")),"instructionCandidates"),resolveInstructionCandidate:o((e,t,n,i)=>s.post(a(e,i,`/instructions-bundle/candidates/${t}/resolve`),n),"resolveInstructionCandidate"),instructionHistory:o((e,t,n,i)=>s.get(a(e,n,`/instructions-bundle/history?path=${encodeURIComponent(t)}${i?`&cursor=${encodeURIComponent(i)}`:""}`)),"instructionHistory"),instructionRevision:o((e,t,n,i)=>s.get(a(e,i,`/instructions-bundle/revision/${n}?path=${encodeURIComponent(t)}`)),"instructionRevision"),instructionDiff:o((e,t,n,i,r)=>s.get(a(e,r,`/instructions-bundle/diff?path=${encodeURIComponent(t)}&from=${encodeURIComponent(n)}&to=${encodeURIComponent(i)}`)),"instructionDiff"),restoreInstructions:o((e,t,n)=>s.post(a(e,n,"/instructions-bundle/restore"),t),"restoreInstructions"),downloadInstructionsFile:o((e,t,n)=>`/api${a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}&download=true`)}`,"downloadInstructionsFile"),deleteInstructionsFile:o((e,t,n,i)=>s.delete(a(e,n,`/instructions-bundle/file?path=${encodeURIComponent(t)}${i?`&baseHash=${i}`:""}`)),"deleteInstructionsFile"),retryLifecycle:o((e,t)=>s.post(a(e,t,"/lifecycle/retry"),{}),"retryLifecycle"),pause:o((e,t)=>s.post(a(e,t,"/pause"),{}),"pause"),resume:o((e,t)=>s.post(a(e,t,"/resume"),{}),"resume"),clearError:o((e,t)=>s.post(a(e,t,"/clear-error"),{}),"clearError"),approve:o((e,t)=>s.post(a(e,t,"/approve"),{}),"approve"),terminate:o((e,t)=>s.post(a(e,t,"/terminate"),{}),"terminate"),remove:o((e,t)=>s.delete(a(e,t)),"remove"),listKeys:o((e,t)=>s.get(a(e,t,"/keys")),"listKeys"),skills:o((e,t)=>s.get(a(e,t,"/skills")),"skills"),syncSkills:o((e,t,n,i)=>s.post(a(e,i,"/skills/sync"),{desiredSkills:t,mode:n}),"syncSkills"),createKey:o((e,t,n,i)=>s.post(a(e,n,"/keys"),{name:t,...i?{scope:i}:{}}),"createKey"),revokeKey:o((e,t,n)=>s.delete(a(e,n,`/keys/${encodeURIComponent(t)}`)),"revokeKey"),runtimeState:o((e,t)=>s.get(a(e,t,"/runtime-state")),"runtimeState"),taskSessions:o((e,t)=>s.get(a(e,t,"/task-sessions")),"taskSessions"),resetSession:o((e,t,n)=>s.post(a(e,n,"/runtime-state/reset-session"),{taskKey:t??null}),"resetSession"),adapterModels:o((e,t,n)=>{const i=new URLSearchParams;n?.refresh&&i.set("refresh","1"),n?.provider&&i.set("provider",n.provider),n?.poolId&&i.set("poolId",n.poolId),n?.environmentId&&i.set("environmentId",n.environmentId);const r=i.size>0?`?${i.toString()}`:"";return s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/models${r}`)},"adapterModels"),detectModel:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/detect-model`),"detectModel"),testEnvironment:o((e,t,n)=>s.post(`/companies/${e}/adapters/${t}/test-environment`,n),"testEnvironment"),getAdapterAuthSignal:o((e,t,n)=>{const i=n?`?environmentId=${encodeURIComponent(n)}`:"";return s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/auth-signal${i}`)},"getAdapterAuthSignal"),invoke:o((e,t,n={})=>s.post(a(e,t,"/heartbeat/invoke"),n),"invoke"),wakeup:o((e,t,n)=>s.post(a(e,n,"/wakeup"),t),"wakeup"),retryFailedRun:o(async(e,t,n)=>{const i=await s.post(a(e,n,"/wakeup"),{source:"on_demand",triggerDetail:"manual",reason:"retry_failed_run",failedRunId:t});if("id"in i){if(["failed","timed_out","cancelled","interrupted"].includes(i.status))throw new Error("The previous retry has already stopped. Refresh the task and retry its latest failed run.");return{runId:i.id,issueId:null}}if("actionId"in i){if(i.status==="failed"||i.status==="cancelled")throw new Error("This retry could not start. Open the task to review its current access and recovery state.");return{runId:i.runId,issueId:i.issueId}}throw new Error(i.message??"Retry was skipped.")},"retryFailedRun"),loginWithClaude:o((e,t)=>s.post(a(e,t,"/claude-login"),{}),"loginWithClaude"),startAdapterAuthLogin:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions`,n),"startAdapterAuthLogin"),getAdapterAuthLoginStatus:o((e,t,n)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(n)}`,{cache:"no-store"}),"getAdapterAuthLoginStatus"),getActiveAdapterAuthLoginSession:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/active`,{cache:"no-store"}),"getActiveAdapterAuthLoginSession"),cancelAdapterAuthLogin:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/adapters/${encodeURIComponent(t)}/login-sessions/${encodeURIComponent(n)}/cancel`,{}),"cancelAdapterAuthLogin"),getClaudeOAuthTokenStatus:o(e=>s.get(`/companies/${encodeURIComponent(e)}/claude-oauth-token-status`),"getClaudeOAuthTokenStatus"),startClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions`,{adapterType:"claude_local",...t}),"startClaudeSetupTokenLogin"),getClaudeSetupTokenLoginStatus:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}`),"getClaudeSetupTokenLoginStatus"),getActiveClaudeSetupTokenLoginSession:o(e=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/active`,{cache:"no-store"}),"getActiveClaudeSetupTokenLoginSession"),getClaudeSetupTokenLoginPrompt:o((e,t)=>s.get(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/prompt`),"getClaudeSetupTokenLoginPrompt"),submitClaudeSetupTokenBrowserCode:o((e,t,n)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/code`,{browserCode:n}),"submitClaudeSetupTokenBrowserCode"),completeClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/completion`,{}),"completeClaudeSetupTokenLogin"),cancelClaudeSetupTokenLogin:o((e,t)=>s.post(`/companies/${encodeURIComponent(e)}/setup-token-login-sessions/${encodeURIComponent(t)}/cancel`,{}),"cancelClaudeSetupTokenLogin"),availableSkills:o(()=>s.get("/skills/available"),"availableSkills")};export{C as t};
@@ -1 +1 @@
1
- var P=Object.defineProperty;var o=(t,e)=>P(t,"name",{value:e,configurable:!0});import{i as A}from"./rolldown-runtime-ZpX3ckPj.js";import{A as T,G as c,L as m,Qa as b,eo as w,j as y,n as R}from"./boxes-Bpd3vwBa.js";import{i as x}from"./BreadcrumbContext-DP0mgUIg.js";import{a as z,c as S,i as h,l as v,n as j,o as N,r as O,s as $,t as k}from"./dist-BNyB3Sjo.js";import{a as E,i as M,n as q,o as F,r as L,t as H}from"./dist-G1LZKTxg.js";var s=A(w(),1),a=A(b(),1),I=Object.defineProperty,d=o((t,e)=>I(t,"name",{value:e,configurable:!0}),"__name"),[G,vt]=y("AlertDialog",[v]),g=v(),Q=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(k,{...r,...l,modal:!0})},"AlertDialog"),V=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(S,{...n,...i,ref:l})},"AlertDialogTrigger2"),"AlertDialogTrigger")),B=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(N,{...r,...l})},"AlertDialogPortal"),J=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(z,{...n,...i,ref:l})},"AlertDialogOverlay2"),"AlertDialogOverlay")),[K,U]=G("AlertDialogContent"),W=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,children:i,...n}=e,p=g(r),f=s.useRef(null),C=m(l,f),D=s.useRef(null);return(0,a.jsx)(K,{scope:r,cancelRef:D,children:(0,a.jsx)(O,{role:"alertdialog",...p,...n,ref:C,onOpenAutoFocus:T(n.onOpenAutoFocus,u=>{u.preventDefault(),D.current?.focus({preventScroll:!0})}),onPointerDownOutside:o(u=>u.preventDefault(),"onPointerDownOutside"),onInteractOutside:o(u=>u.preventDefault(),"onInteractOutside"),children:i})})},"AlertDialogContent2"),"AlertDialogContent")),X=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)($,{...n,...i,ref:l})},"AlertDialogTitle2"),"AlertDialogTitle")),Y=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(h,{...n,...i,ref:l})},"AlertDialogDescription2"),"AlertDialogDescription")),Z=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(j,{...n,...i,ref:l})},"AlertDialogAction2"),"AlertDialogAction")),tt="AlertDialogCancel",et=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,{cancelRef:n}=U(tt,r),p=g(r),f=m(l,n);return(0,a.jsx)(j,{...p,...i,ref:f})},"AlertDialogCancel2"),"AlertDialogCancel")),at=Q,ot=V,rt=B,lt=J,nt=W,it=Z,st=et,ct=X,dt=Y,_={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};_.node;var jt=R(_);function _t({delayDuration:t=0,...e}){return(0,a.jsx)(M,{"data-slot":"tooltip-provider",delayDuration:t,...e})}o(_t,"TooltipProvider");function Ct({...t}){return(0,a.jsx)(E,{"data-slot":"tooltip",...t})}o(Ct,"Tooltip");function Pt({...t}){return(0,a.jsx)(F,{"data-slot":"tooltip-trigger",...t})}o(Pt,"TooltipTrigger");function Tt({className:t,sideOffset:e=0,children:l,...r}){return(0,a.jsx)(L,{children:(0,a.jsxs)(q,{"data-slot":"tooltip-content",sideOffset:e,className:c("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...r,children:[l,(0,a.jsx)(H,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-(--sz-calc-28) rotate-45 rounded-(--rad-2)"})]})})}o(Tt,"TooltipContent");function bt({...t}){return(0,a.jsx)(at,{"data-slot":"alert-dialog",...t})}o(bt,"AlertDialog");function wt({...t}){return(0,a.jsx)(ot,{"data-slot":"alert-dialog-trigger",...t})}o(wt,"AlertDialogTrigger");function gt({...t}){return(0,a.jsx)(rt,{"data-slot":"alert-dialog-portal",...t})}o(gt,"AlertDialogPortal");function ut({className:t,...e}){return(0,a.jsx)(lt,{"data-slot":"alert-dialog-overlay",className:c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100",t),...e})}o(ut,"AlertDialogOverlay");function yt({className:t,...e}){return(0,a.jsxs)(gt,{children:[(0,a.jsx)(ut,{}),(0,a.jsx)(nt,{"data-slot":"alert-dialog-content",className:c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0",t),...e})]})}o(yt,"AlertDialogContent");function Rt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:c("flex flex-col gap-2 text-center sm:text-left",t),...e})}o(Rt,"AlertDialogHeader");function zt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}o(zt,"AlertDialogFooter");function St({className:t,...e}){return(0,a.jsx)(ct,{"data-slot":"alert-dialog-title",className:c("text-lg leading-none font-semibold",t),...e})}o(St,"AlertDialogTitle");function ht({className:t,...e}){return(0,a.jsx)(dt,{"data-slot":"alert-dialog-description",className:c("text-muted-foreground text-sm",t),...e})}o(ht,"AlertDialogDescription");function Nt({className:t,...e}){return(0,a.jsx)(it,{"data-slot":"alert-dialog-action",className:c(x(),t),...e})}o(Nt,"AlertDialogAction");function Ot({className:t,...e}){return(0,a.jsx)(st,{"data-slot":"alert-dialog-cancel",className:c(x({variant:"outline"}),t),...e})}o(Ot,"AlertDialogCancel");export{ht as a,St as c,Tt as d,_t as f,yt as i,wt as l,jt as m,Nt as n,zt as o,Pt as p,Ot as r,Rt as s,bt as t,Ct as u};
1
+ var P=Object.defineProperty;var o=(t,e)=>P(t,"name",{value:e,configurable:!0});import{i as A}from"./rolldown-runtime-ZpX3ckPj.js";import{A as T,G as c,L as m,Qa as b,eo as w,j as y,n as R}from"./boxes-DcYq-jCc.js";import{i as x}from"./BreadcrumbContext-BdR2QZTG.js";import{a as z,c as S,i as h,l as v,n as j,o as N,r as O,s as $,t as k}from"./dist-D_GJjr4Y.js";import{a as E,i as M,n as q,o as F,r as L,t as H}from"./dist-DdELVTA2.js";var s=A(w(),1),a=A(b(),1),I=Object.defineProperty,d=o((t,e)=>I(t,"name",{value:e,configurable:!0}),"__name"),[G,vt]=y("AlertDialog",[v]),g=v(),Q=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(k,{...r,...l,modal:!0})},"AlertDialog"),V=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(S,{...n,...i,ref:l})},"AlertDialogTrigger2"),"AlertDialogTrigger")),B=d(t=>{const{__scopeAlertDialog:e,...l}=t,r=g(e);return(0,a.jsx)(N,{...r,...l})},"AlertDialogPortal"),J=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(z,{...n,...i,ref:l})},"AlertDialogOverlay2"),"AlertDialogOverlay")),[K,U]=G("AlertDialogContent"),W=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,children:i,...n}=e,p=g(r),f=s.useRef(null),C=m(l,f),D=s.useRef(null);return(0,a.jsx)(K,{scope:r,cancelRef:D,children:(0,a.jsx)(O,{role:"alertdialog",...p,...n,ref:C,onOpenAutoFocus:T(n.onOpenAutoFocus,u=>{u.preventDefault(),D.current?.focus({preventScroll:!0})}),onPointerDownOutside:o(u=>u.preventDefault(),"onPointerDownOutside"),onInteractOutside:o(u=>u.preventDefault(),"onInteractOutside"),children:i})})},"AlertDialogContent2"),"AlertDialogContent")),X=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)($,{...n,...i,ref:l})},"AlertDialogTitle2"),"AlertDialogTitle")),Y=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(h,{...n,...i,ref:l})},"AlertDialogDescription2"),"AlertDialogDescription")),Z=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,n=g(r);return(0,a.jsx)(j,{...n,...i,ref:l})},"AlertDialogAction2"),"AlertDialogAction")),tt="AlertDialogCancel",et=s.forwardRef(d(o(function(e,l){const{__scopeAlertDialog:r,...i}=e,{cancelRef:n}=U(tt,r),p=g(r),f=m(l,n);return(0,a.jsx)(j,{...p,...i,ref:f})},"AlertDialogCancel2"),"AlertDialogCancel")),at=Q,ot=V,rt=B,lt=J,nt=W,it=Z,st=et,ct=X,dt=Y,_={name:"triangle-alert",size:24,node:[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["alert-triangle"]};_.node;var jt=R(_);function _t({delayDuration:t=0,...e}){return(0,a.jsx)(M,{"data-slot":"tooltip-provider",delayDuration:t,...e})}o(_t,"TooltipProvider");function Ct({...t}){return(0,a.jsx)(E,{"data-slot":"tooltip",...t})}o(Ct,"Tooltip");function Pt({...t}){return(0,a.jsx)(F,{"data-slot":"tooltip-trigger",...t})}o(Pt,"TooltipTrigger");function Tt({className:t,sideOffset:e=0,children:l,...r}){return(0,a.jsx)(L,{children:(0,a.jsxs)(q,{"data-slot":"tooltip-content",sideOffset:e,className:c("bg-foreground text-background animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",t),...r,children:[l,(0,a.jsx)(H,{className:"bg-foreground fill-foreground z-50 size-2.5 translate-y-(--sz-calc-28) rotate-45 rounded-(--rad-2)"})]})})}o(Tt,"TooltipContent");function bt({...t}){return(0,a.jsx)(at,{"data-slot":"alert-dialog",...t})}o(bt,"AlertDialog");function wt({...t}){return(0,a.jsx)(ot,{"data-slot":"alert-dialog-trigger",...t})}o(wt,"AlertDialogTrigger");function gt({...t}){return(0,a.jsx)(rt,{"data-slot":"alert-dialog-portal",...t})}o(gt,"AlertDialogPortal");function ut({className:t,...e}){return(0,a.jsx)(lt,{"data-slot":"alert-dialog-overlay",className:c("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50 duration-100",t),...e})}o(ut,"AlertDialogOverlay");function yt({className:t,...e}){return(0,a.jsxs)(gt,{children:[(0,a.jsx)(ut,{}),(0,a.jsx)(nt,{"data-slot":"alert-dialog-content",className:c("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-[0.97] data-[state=open]:zoom-in-[0.97] fixed top-(--sz-calc-26) md:top-(--pct-50) left-(--pct-50) z-50 grid w-full max-w-(--sz-calc-25) translate-x-(--pct-neg-50) translate-y-0 md:translate-y-(--pct-neg-50) gap-4 rounded-lg border p-6 shadow-lg duration-150 ease-(--e-cubic-bezier-0_16-1-0_3-1) outline-none sm:max-w-lg [&>*]:min-w-0",t),...e})]})}o(yt,"AlertDialogContent");function Rt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-header",className:c("flex flex-col gap-2 text-center sm:text-left",t),...e})}o(Rt,"AlertDialogHeader");function zt({className:t,...e}){return(0,a.jsx)("div",{"data-slot":"alert-dialog-footer",className:c("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),...e})}o(zt,"AlertDialogFooter");function St({className:t,...e}){return(0,a.jsx)(ct,{"data-slot":"alert-dialog-title",className:c("text-lg leading-none font-semibold",t),...e})}o(St,"AlertDialogTitle");function ht({className:t,...e}){return(0,a.jsx)(dt,{"data-slot":"alert-dialog-description",className:c("text-muted-foreground text-sm",t),...e})}o(ht,"AlertDialogDescription");function Nt({className:t,...e}){return(0,a.jsx)(it,{"data-slot":"alert-dialog-action",className:c(x(),t),...e})}o(Nt,"AlertDialogAction");function Ot({className:t,...e}){return(0,a.jsx)(st,{"data-slot":"alert-dialog-cancel",className:c(x({variant:"outline"}),t),...e})}o(Ot,"AlertDialogCancel");export{ht as a,St as c,Tt as d,_t as f,yt as i,wt as l,jt as m,Nt as n,zt as o,Pt as p,Ot as r,Rt as s,bt as t,Ct as u};
@@ -1 +1 @@
1
- import{n as r}from"./boxes-Bpd3vwBa.js";var a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;var o=r(a);export{o as t};
1
+ import{n as r}from"./boxes-DcYq-jCc.js";var a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;var o=r(a);export{o as t};
@@ -1 +1 @@
1
- var d=Object.defineProperty;var a=(r,e)=>d(r,"name",{value:e,configurable:!0});import{i as t}from"./rolldown-runtime-ZpX3ckPj.js";import{G as c,P as v,Qa as u,eo as l,n as g}from"./boxes-Bpd3vwBa.js";import{a as f}from"./BreadcrumbContext-DP0mgUIg.js";var i={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};i.node;var _=g(i),k=t(l(),1),b=t(u(),1),p=f("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-(--tp-color-box-shadow) overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function w({className:r,variant:e="default",asChild:o=!1,...n}){const s=o?v:"span";return(0,b.jsx)(s,{"data-slot":"badge","data-variant":e,className:c(p({variant:e}),r),...n})}a(w,"Badge");export{p as n,_ as r,w as t};
1
+ var d=Object.defineProperty;var a=(r,e)=>d(r,"name",{value:e,configurable:!0});import{i as t}from"./rolldown-runtime-ZpX3ckPj.js";import{G as c,P as v,Qa as u,eo as l,n as g}from"./boxes-DcYq-jCc.js";import{a as f}from"./BreadcrumbContext-BdR2QZTG.js";var i={name:"loader-circle",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],aliases:["loader-2"]};i.node;var _=g(i),k=t(l(),1),b=t(u(),1),p=f("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-(length:--rad-3) aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-(--tp-color-box-shadow) overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function w({className:r,variant:e="default",asChild:o=!1,...n}){const s=o?v:"span";return(0,b.jsx)(s,{"data-slot":"badge","data-variant":e,className:c(p({variant:e}),r),...n})}a(w,"Badge");export{p as n,_ as r,w as t};
@@ -1 +1 @@
1
- import{n as t}from"./boxes-Bpd3vwBa.js";var e={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};e.node;var r=t(e);export{r as t};
1
+ import{n as t}from"./boxes-DcYq-jCc.js";var e={name:"bot",size:24,node:[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]};e.node;var r=t(e);export{r as t};