adam-agent-server 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/dist/App-RIYRYLKD.js +9 -0
  2. package/dist/adam-tools-YBKSTHVJ.js +1 -0
  3. package/dist/approval-handler-JYIS2PKQ.js +1 -0
  4. package/dist/audit-manager-7M2CDMP5.js +1 -0
  5. package/dist/bree-engine-Y24K4PXN.js +1 -0
  6. package/dist/channels-WMCY4QC3.js +1 -0
  7. package/dist/{channels-NAPXRIOX.js → channels-WZOYE4O4.js} +1 -1
  8. package/dist/chunk-2HN2TSP6.js +5 -0
  9. package/dist/{chunk-ROSOI75V.js → chunk-3RAFA6QK.js} +1 -1
  10. package/dist/{chunk-I5RUEOSQ.js → chunk-4TCP2AT7.js} +1 -1
  11. package/dist/{chunk-42RHY3Q3.js → chunk-6DXNXLYG.js} +1 -1
  12. package/dist/chunk-6HD6NYIB.js +1 -0
  13. package/dist/{chunk-GA7GEIXB.js → chunk-6YURWVQG.js} +1 -1
  14. package/dist/chunk-7IFLU3CY.js +4 -0
  15. package/dist/{chunk-QMKQBU3R.js → chunk-7LBDLAUQ.js} +1 -1
  16. package/dist/{chunk-BONI2HUN.js → chunk-AJVN3KPM.js} +1 -1
  17. package/dist/{chunk-4TBGFHYX.js → chunk-AR2IZMM2.js} +1 -1
  18. package/dist/chunk-B4WHT7DX.js +8 -0
  19. package/dist/{chunk-XFTRKHH2.js → chunk-BIIP363C.js} +1 -1
  20. package/dist/{chunk-KHPXEUSY.js → chunk-CDVIT7L5.js} +1 -1
  21. package/dist/{chunk-BCELBB5Q.js → chunk-EGS6U3V5.js} +2 -2
  22. package/dist/{chunk-NFSXJNPD.js → chunk-EJVUUIAV.js} +1 -1
  23. package/dist/{chunk-X26NKAXY.js → chunk-GMCIKDTC.js} +1 -1
  24. package/dist/{chunk-2C5U3CNX.js → chunk-GUQAIWCQ.js} +1 -1
  25. package/dist/chunk-IHP7JV6J.js +1 -0
  26. package/dist/chunk-JTMFEUDA.js +1 -0
  27. package/dist/chunk-KLQOILIJ.js +21 -0
  28. package/dist/{chunk-CREHL4BN.js → chunk-KVSO3KGZ.js} +1 -1
  29. package/dist/{chunk-YEV5YTS3.js → chunk-MPRAVJUO.js} +1 -1
  30. package/dist/{chunk-6VPL5CXB.js → chunk-OEKM2W3K.js} +1 -1
  31. package/dist/{chunk-TEMWI6U5.js → chunk-OFOVSC72.js} +1 -1
  32. package/dist/chunk-PMHNW5IL.js +49 -0
  33. package/dist/{chunk-35DBEYMG.js → chunk-Q4YE5BU7.js} +1 -1
  34. package/dist/{chunk-PT55643Q.js → chunk-QN6BEJF5.js} +1 -1
  35. package/dist/{chunk-64FIXWFL.js → chunk-SWPXG2CY.js} +1 -1
  36. package/dist/{chunk-CFTWJZVX.js → chunk-U5NRQNBB.js} +14 -14
  37. package/dist/{chunk-QC6QVNKP.js → chunk-UW3OJG7U.js} +3 -3
  38. package/dist/chunk-WVGNP2LQ.js +3 -0
  39. package/dist/cli.js +4 -4
  40. package/dist/{config-N2GMLTPU.js → config-EI3SCA4W.js} +1 -1
  41. package/dist/config-OH6Q2D2Y.js +1 -0
  42. package/dist/{db-S6HDMJ3B.js → db-4NY7ZOS2.js} +1 -1
  43. package/dist/{delivery-log-VAI35G5V.js → delivery-log-SC2ULFCK.js} +1 -1
  44. package/dist/engine-JKSNQQDM.js +1 -0
  45. package/dist/{evolution-audit-KCFDGNSM.js → evolution-audit-KUBXFUHI.js} +1 -1
  46. package/dist/index.js +10 -10
  47. package/dist/{learner-ABYVK33T.js → learner-UYDFNURD.js} +1 -1
  48. package/dist/{memories-3ZAV55YZ.js → memories-FQCRKMK6.js} +1 -1
  49. package/dist/{memory-extractor-BHHKD7X7.js → memory-extractor-FUOJ5D77.js} +2 -2
  50. package/dist/memory-service-ANR67OPY.js +1 -0
  51. package/dist/outbound-gateway-6FQRWYFF.js +1 -0
  52. package/dist/role-presets-LRP6P5O2.js +1 -0
  53. package/dist/{roles-LXRHEVUK.js → roles-3UTFKSHI.js} +1 -1
  54. package/dist/runtime-B2DP3JNB.js +1 -0
  55. package/dist/session-manager-VYKNKQ46.js +1 -0
  56. package/dist/{task-templates-XQNKAA4U.js → task-templates-PSP7GOJJ.js} +1 -1
  57. package/package.json +2 -1
  58. package/web/dist/assets/Card-4mOZntHG.js +1 -0
  59. package/web/dist/assets/ChannelDetail-e6rVX_y8.js +1 -0
  60. package/web/dist/assets/Channels-DJvZPKer.js +12 -0
  61. package/web/dist/assets/Chat-hTZdEwyE.js +1 -0
  62. package/web/dist/assets/Dashboard-B4rL_ePs.js +1 -0
  63. package/web/dist/assets/{EmptyState-DBFJc4PL.js → EmptyState-BlgMMAr-.js} +1 -1
  64. package/web/dist/assets/EnvVarEditor-C8kRWejV.js +1 -0
  65. package/web/dist/assets/Evolution-BGwFCo7X.js +6 -0
  66. package/web/dist/assets/GoalDetail-BH2ku-0t.js +1 -0
  67. package/web/dist/assets/Goals-DynDtpMC.js +1 -0
  68. package/web/dist/assets/Logs-CyJFouE6.js +1 -0
  69. package/web/dist/assets/Memories-ClcFD7OG.js +1 -0
  70. package/web/dist/assets/{NotFound-Cidygwnn.js → NotFound-CSjhzSGa.js} +1 -1
  71. package/web/dist/assets/Plugins-SNOQNNcL.js +1 -0
  72. package/web/dist/assets/RoleDetail-vlTPiYwY.js +33 -0
  73. package/web/dist/assets/Roles-CFcuHIvA.js +1 -0
  74. package/web/dist/assets/Settings-C9Kuz-6D.js +1 -0
  75. package/web/dist/assets/Strategies-DZWlQCHp.js +1 -0
  76. package/web/dist/assets/Switch-DOi0EFHj.js +1 -0
  77. package/web/dist/assets/Table-BxbnOSbq.js +1 -0
  78. package/web/dist/assets/TaskDetail-DjmmnldI.js +2 -0
  79. package/web/dist/assets/Work-CvESHC3Y.js +1 -0
  80. package/web/dist/assets/index-BFmC20R2.js +52 -0
  81. package/web/dist/assets/index-CaocwyO8.css +2 -0
  82. package/web/dist/assets/{vendor-icons-ZPvC5PUS.js → vendor-icons-CkI4-NxL.js} +1 -1
  83. package/web/dist/assets/{vendor-react--nRVf2Ep.js → vendor-react-DLRtONKt.js} +1 -1
  84. package/web/dist/assets/vendor-state-B_-GdGNJ.js +1 -0
  85. package/web/dist/index.html +5 -5
  86. package/dist/App-SCPYTYGQ.js +0 -9
  87. package/dist/adam-tools-FNJJT7AA.js +0 -1
  88. package/dist/approval-handler-UDWAC5MF.js +0 -4
  89. package/dist/audit-manager-SCX53YJT.js +0 -1
  90. package/dist/bree-engine-2DB2QECM.js +0 -1
  91. package/dist/channels-PQCV74ZI.js +0 -1
  92. package/dist/chunk-3TIHZZMK.js +0 -1
  93. package/dist/chunk-7KCBFM2C.js +0 -52
  94. package/dist/chunk-FXFHGIY6.js +0 -8
  95. package/dist/chunk-IZQI6QQ7.js +0 -1
  96. package/dist/chunk-NQHTOFQP.js +0 -1
  97. package/dist/chunk-REKCZ3GY.js +0 -1
  98. package/dist/chunk-U3XVAAXA.js +0 -17
  99. package/dist/config-L4R273R3.js +0 -1
  100. package/dist/engine-E67UAI3G.js +0 -1
  101. package/dist/memory-service-5QHTKIUU.js +0 -1
  102. package/dist/outbound-gateway-ZFKSN2UT.js +0 -1
  103. package/dist/role-presets-OTU2M37Y.js +0 -1
  104. package/dist/runtime-UCOE6LNN.js +0 -1
  105. package/dist/session-manager-RPXFZKMY.js +0 -1
  106. package/web/dist/assets/Card-BecEmnPW.js +0 -1
  107. package/web/dist/assets/ChannelDetail-BajTUEU0.js +0 -1
  108. package/web/dist/assets/Channels-Bhy6rP_t.js +0 -12
  109. package/web/dist/assets/Chat-Dvt_Oo7d.js +0 -1
  110. package/web/dist/assets/Dashboard-DlrAor-C.js +0 -1
  111. package/web/dist/assets/Evolution-Dlsnnr4G.js +0 -6
  112. package/web/dist/assets/GoalDetail-BuUxwYdd.js +0 -1
  113. package/web/dist/assets/Goals-CkPQOev6.js +0 -1
  114. package/web/dist/assets/Logs-D33PqDAd.js +0 -1
  115. package/web/dist/assets/Memories-D31dbUM6.js +0 -1
  116. package/web/dist/assets/Plugins-XlBr07x8.js +0 -1
  117. package/web/dist/assets/RoleDetail-rZFlgXzh.js +0 -33
  118. package/web/dist/assets/Roles-d29AC6Kh.js +0 -1
  119. package/web/dist/assets/Settings-Bjh_RXYf.js +0 -1
  120. package/web/dist/assets/Strategies-Cf4ghknk.js +0 -1
  121. package/web/dist/assets/Switch-CxzUYL49.js +0 -1
  122. package/web/dist/assets/Table-tkJ-cuiE.js +0 -1
  123. package/web/dist/assets/TaskDetail-jMBJbaRU.js +0 -2
  124. package/web/dist/assets/Work-CCLTkitf.js +0 -1
  125. package/web/dist/assets/index-CVubgAlC.css +0 -2
  126. package/web/dist/assets/index-Ds41VvOC.js +0 -52
  127. package/web/dist/assets/vendor-state-CH64feAE.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{h as t,nt as n,t as r,v as i}from"./vendor-icons-CkI4-NxL.js";import{r as a,t as o}from"./vendor-react-DLRtONKt.js";import{C as s,f as c,t as l,w as u}from"./index-BFmC20R2.js";import{t as d}from"./Card-4mOZntHG.js";import{a as f}from"./format-DvtQjPZn.js";import{t as p}from"./EmptyState-BlgMMAr-.js";import{a as m,i as h,n as g,o as _,r as v,t as y}from"./Table-BxbnOSbq.js";var b=e(n(),1),x=o();function S(){let e=s(e=>e.roles),n=s(e=>e.fetchRoles),o=s(e=>e.createRole),[S,C]=(0,b.useState)(!1),[w,T]=(0,b.useState)(!1),[E,D]=(0,b.useState)(``),[O,k]=(0,b.useState)(``),[A,j]=(0,b.useState)(!1),[M,N]=(0,b.useState)(null),P=(0,b.useCallback)(async()=>{C(!0),await n(),C(!1)},[n]),F=()=>{D(``),k(``),N(null),j(!1)},I=async()=>{let e=E.trim();if(!e){N(`Name is required.`);return}j(!0),N(null);try{await o({name:e,cagPrompt:O.trim()}),await n(),T(!1),F(),u.success(`Role created`)}catch(e){N(e instanceof Error?e.message:`Failed to create role`)}finally{j(!1)}};(0,b.useEffect)(()=>{P()},[P]);let L=e=>e===`active`?`success`:e===`inactive`?`secondary`:e===`retired`?`destructive`:e===`probation`?`warning`:`secondary`;return(0,x.jsxs)(`div`,{className:`space-y-4`,children:[(0,x.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,x.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Roles`}),(0,x.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,x.jsx)(c,{variant:`ghost`,size:`sm`,onClick:()=>void P(),disabled:S,children:(0,x.jsx)(t,{size:14,className:S?`animate-spin`:``})}),(0,x.jsx)(c,{size:`sm`,onClick:()=>T(!0),children:(0,x.jsx)(i,{size:14})})]})]}),e.length===0&&!S?(0,x.jsx)(d,{children:(0,x.jsx)(p,{title:`No roles yet`,description:`Create a role to define agent behavior and bind plugins.`})}):(0,x.jsx)(d,{padding:!1,children:(0,x.jsxs)(y,{children:[(0,x.jsx)(m,{children:(0,x.jsxs)(_,{children:[(0,x.jsx)(h,{children:`Name`}),(0,x.jsx)(h,{children:`Status`}),(0,x.jsx)(h,{children:`Score`}),(0,x.jsx)(h,{children:`Memories`}),(0,x.jsx)(h,{children:`Created`})]})}),(0,x.jsx)(g,{children:e.map(e=>(0,x.jsxs)(_,{children:[(0,x.jsx)(v,{children:(0,x.jsx)(a,{to:`/roles/${e.id}`,className:`font-medium text-blue-400 hover:text-blue-300`,children:e.name})}),(0,x.jsx)(v,{children:(0,x.jsx)(l,{variant:L(e.status),children:e.status})}),(0,x.jsx)(v,{children:e.performanceScore==null?(0,x.jsx)(`span`,{className:`text-slate-500`,children:`—`}):(0,x.jsxs)(`span`,{className:`font-mono text-xs text-slate-300`,children:[(e.performanceScore*100).toFixed(0),`%`]})}),(0,x.jsx)(v,{children:(0,x.jsx)(`span`,{className:`text-sm text-slate-400`,children:e.memoryStreamId?e.memoryStreamId.slice(0,8):`—`})}),(0,x.jsx)(v,{className:`text-xs text-slate-500`,children:f(e.createdAt)})]},e.id))})]})}),w&&(0,x.jsx)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60`,onClick:e=>{e.target===e.currentTarget&&(T(!1),F())},children:(0,x.jsxs)(`div`,{className:`w-full max-w-md rounded-lg border border-slate-700 bg-slate-900 p-6 shadow-lg`,children:[(0,x.jsxs)(`div`,{className:`mb-4 flex items-center justify-between`,children:[(0,x.jsx)(`h2`,{className:`text-lg font-semibold text-slate-100`,children:`Create Role`}),(0,x.jsx)(`button`,{className:`text-slate-400 hover:text-slate-200`,onClick:()=>{T(!1),F()},children:(0,x.jsx)(r,{size:16})})]}),(0,x.jsxs)(`div`,{className:`space-y-4`,children:[(0,x.jsxs)(`div`,{children:[(0,x.jsxs)(`label`,{className:`mb-1 block text-sm font-medium text-slate-300`,htmlFor:`role-name`,children:[`Name `,(0,x.jsx)(`span`,{className:`text-red-400`,children:`*`})]}),(0,x.jsx)(`input`,{id:`role-name`,className:`w-full rounded border border-slate-700 bg-slate-800 px-3 py-2 text-sm text-slate-200 placeholder-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`e.g. Engineer, Reviewer`,value:E,onChange:e=>D(e.target.value),onKeyDown:e=>{e.key===`Enter`&&I()},autoFocus:!0})]}),(0,x.jsxs)(`div`,{children:[(0,x.jsx)(`label`,{className:`mb-1 block text-sm font-medium text-slate-300`,htmlFor:`role-cag-prompt`,children:`CAG Prompt`}),(0,x.jsx)(`textarea`,{id:`role-cag-prompt`,className:`w-full rounded border border-slate-700 bg-slate-800 px-3 py-2 text-sm text-slate-200 placeholder-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Character and Guidance prompt for this role...`,rows:5,value:O,onChange:e=>k(e.target.value)})]}),M&&(0,x.jsx)(`p`,{className:`text-sm text-red-400`,children:M}),(0,x.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,x.jsx)(c,{variant:`ghost`,size:`sm`,onClick:()=>{T(!1),F()},children:`Cancel`}),(0,x.jsx)(c,{size:`sm`,onClick:()=>void I(),disabled:A,children:A?`Creating...`:`Create`})]})]})]})})]})}export{S as Roles};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{D as t,h as n,nt as r,p as i,u as a}from"./vendor-icons-CkI4-NxL.js";import{l as o,t as s}from"./vendor-react-DLRtONKt.js";import{r as c}from"./dist-HyCSN_hp.js";import{C as l,a as u,c as d,f,i as p,l as m,o as h,r as g,s as _,u as v}from"./index-BFmC20R2.js";import{t as y}from"./Card-4mOZntHG.js";import{i as b}from"./format-DvtQjPZn.js";import{t as x}from"./EmptyState-BlgMMAr-.js";import{t as S}from"./EnvVarEditor-C8kRWejV.js";var C=e(r(),1),w=s(),T={anthropic:{label:`Anthropic`,paths:[`anthropic.apiKey`,`anthropic.baseUrl`,`anthropic.model`,`anthropic.defaultOpusModel`,`anthropic.defaultSonnetModel`,`anthropic.defaultHaikuModel`,`anthropic.smallFastModel`]},defaults:{label:`Defaults`,paths:[`defaults.model`,`defaults.effort`,`defaults.maxTurns`,`defaults.maxBudgetUsd`,`defaults.timeout`,`defaults.approvalTimeout`]},server:{label:`Server`,paths:[`server.port`,`server.host`,`server.apiKey`],mutablePaths:[`server.timezone`]},logging:{label:`Logging`,paths:[`logging.level`]},evolution:{label:`Evolution`,paths:[`roles.evolution.triggerEvery`,`roles.evolution.reflectionThreshold`]},chat:{label:`Chat`,paths:[`chat.sessionTimeoutMinutes`,`chat.maxSessionTurns`,`chat.autoTitle`,`chat.archiveExtractMemory`]}},E=[`defaults.deniedReadPaths`,`defaults.approvalRequired`],D=new Set([`anthropic.apiKey`,`server.apiKey`]),O={"anthropic.apiKey":`API Key`,"anthropic.baseUrl":`Base URL`,"anthropic.model":`Model`,"anthropic.defaultOpusModel":`Default Opus Model`,"anthropic.defaultSonnetModel":`Default Sonnet Model`,"anthropic.defaultHaikuModel":`Default Haiku Model`,"anthropic.smallFastModel":`Small Fast Model`,"defaults.model":`Default Model`,"defaults.effort":`Effort Level`,"defaults.maxTurns":`Max Turns`,"defaults.maxBudgetUsd":`Max Budget (USD)`,"defaults.timeout":`Timeout (seconds)`,"defaults.approvalTimeout":`Approval Timeout (seconds)`,"server.port":`Port`,"server.host":`Host`,"server.apiKey":`API Key (server auth)`,"server.timezone":`Timezone`,"logging.level":`Log Level`,"roles.evolution.triggerEvery":`Evolution Trigger Every (tasks)`,"roles.evolution.reflectionThreshold":`Reflection Threshold (tokens)`,"chat.sessionTimeoutMinutes":`Session Timeout (minutes)`,"chat.maxSessionTurns":`Max Session Turns`,"chat.autoTitle":`Auto-generate Session Title`,"chat.archiveExtractMemory":`Extract Memory on Archive`},k={"defaults.effort":[`low`,`medium`,`high`,`max`],"logging.level":[`debug`,`info`,`warn`,`error`],"server.timezone":[`system`,`Asia/Shanghai`,`Asia/Tokyo`,`Asia/Singapore`,`America/New_York`,`America/Los_Angeles`,`America/Chicago`,`Europe/London`,`Europe/Berlin`,`Europe/Paris`,`UTC`]};function A(){let[e,r]=(0,C.useState)({}),[s,A]=(0,C.useState)([]),[M,N]=(0,C.useState)({}),[P,F]=(0,C.useState)(new Set),[I,L]=(0,C.useState)(!1),[R,z]=(0,C.useState)(null),[B,V]=(0,C.useState)(!0),[H,U]=(0,C.useState)(null),[W,G]=(0,C.useState)({}),[K,q]=(0,C.useState)(new Set),[J,Y]=(0,C.useState)({}),X=l(e=>e.configVersion);(0,C.useEffect)(()=>{if(P.size===0)return;let e=e=>{e.preventDefault()};return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[P.size]);let Z=o(({currentLocation:e,nextLocation:t})=>P.size>0&&e.pathname!==t.pathname),Q=(0,C.useCallback)(async()=>{try{let e=await c(`/config`);r(e.config),A(e.mutable);let t={};for(let[n,r]of Object.entries(e.config))t[n]=String(r.value??``);N(t),F(new Set);let n=e.config[`server.timezone`]?.value;n&&b(n);let i={};for(let t of E){let n=e.config[t];n&&(i[t]=Array.isArray(n.value)?n.value:[])}G(i),q(new Set),U(await c(`/config/env-diff`)),Y((await c(`/config/env`)).env)}catch(e){z({type:`error`,text:e instanceof Error?e.message:`Failed to load config`})}finally{V(!1)}},[]);(0,C.useEffect)(()=>{Q()},[Q]),(0,C.useEffect)(()=>{X>0&&Q()},[X,Q]);let ee=async()=>{await c(`/config/sync-to-env`,{method:`POST`}),z({type:`success`,text:`Synced DB values to .env`}),U(null)},te=async()=>{await c(`/config/load-from-env`,{method:`POST`}),z({type:`success`,text:`Loaded .env values to DB`}),Q()},$=(e,t)=>{N(n=>({...n,[e]:t})),F(t=>new Set(t).add(e)),z(null)},ne=async()=>{if(P.size!==0){L(!0),z(null);try{let t={};for(let n of P){let r=e[n],i=M[n];if(r&&typeof r.value==`number`&&(i=Number(i),isNaN(i))){z({type:`error`,text:`"${O[n]??n}" must be a number`}),L(!1);return}t[n]=i}let n=await c(`/config`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...t,...Object.fromEntries(Array.from(K).map(e=>[e,W[e]??[]]))})});if(n.updated.length>0&&(z({type:`success`,text:`Updated ${n.updated.length} setting(s)`}),n.updated.includes(`server.timezone`))){let e=M[`server.timezone`];b(e)}n.errors.length>0&&z({type:`error`,text:n.errors.join(`; `)}),F(new Set),Q()}catch(e){z({type:`error`,text:e instanceof Error?e.message:`Save failed`})}finally{L(!1)}}};return B?(0,w.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,w.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-2 border-slate-700 border-t-blue-500`})}):Object.keys(e).length===0?(0,w.jsx)(x,{icon:(0,w.jsx)(a,{size:32}),title:`No configuration`,description:`Config API not available`}):(0,w.jsxs)(`div`,{className:`space-y-4`,children:[(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Settings`}),(0,w.jsxs)(`div`,{className:`flex gap-2`,children:[(0,w.jsx)(f,{variant:`ghost`,size:`sm`,onClick:()=>void Q(),children:(0,w.jsx)(n,{size:14})}),P.size>0&&(0,w.jsxs)(f,{size:`sm`,onClick:()=>void ne(),disabled:I,children:[(0,w.jsx)(i,{size:14}),I?`Saving...`:`Save (${P.size})`]})]})]}),R&&(0,w.jsx)(`div`,{className:`rounded px-3 py-2 text-sm ${R.type===`success`?`bg-green-900/30 text-green-400`:`bg-red-900/30 text-red-400`}`,children:R.text}),H&&H.diffs.length>0&&(0,w.jsx)(y,{children:(0,w.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`p`,{className:`text-sm font-medium text-yellow-400`,children:[`.env and DB have `,H.diffs.length,` different value(s)`]}),(0,w.jsx)(`p`,{className:`mt-1 text-xs text-slate-500`,children:H.diffs.map(e=>e.envKey).join(`, `)})]}),(0,w.jsxs)(`div`,{className:`flex gap-2`,children:[(0,w.jsx)(f,{variant:`ghost`,size:`sm`,onClick:ee,children:`Sync DB → .env`}),(0,w.jsx)(f,{variant:`ghost`,size:`sm`,onClick:te,children:`Load .env → DB`})]})]})}),Object.entries(T).map(([n,{label:r,paths:i,mutablePaths:a}])=>{let o=[...i,...a??[]];return(0,w.jsxs)(y,{children:[(0,w.jsx)(`h2`,{className:`mb-3 text-sm font-medium text-slate-300`,children:r}),(0,w.jsx)(`div`,{className:`space-y-3`,children:o.map(n=>{let r=e[n];if(!r)return null;let i=s.includes(n),a=O[n]??n,o=M[n]??String(r.value??``),c=P.has(n),l=k[n];return(0,w.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,w.jsxs)(`div`,{className:`w-56 flex items-center gap-1.5`,children:[!i&&(0,w.jsx)(t,{size:12,className:`text-slate-600`}),(0,w.jsx)(`label`,{className:`text-sm text-slate-400`,children:a}),!i&&(0,w.jsx)(`span`,{className:`text-[10px] text-slate-600`,children:`restart required`})]}),(0,w.jsx)(`div`,{className:`flex-1`,children:l?(0,w.jsx)(`select`,{className:`w-full rounded border border-slate-700 bg-slate-900 px-2 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none disabled:opacity-50`,value:o,onChange:e=>$(n,e.target.value),disabled:!i,children:l.map(e=>(0,w.jsx)(`option`,{value:e,children:e},e))}):(0,w.jsx)(`input`,{className:`w-full rounded border border-slate-700 bg-slate-900 px-2 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none disabled:opacity-50`,type:D.has(n)?`password`:`text`,value:o,onChange:e=>$(n,e.target.value),disabled:!i,placeholder:D.has(n)?`Enter to update`:void 0})}),(0,w.jsx)(`div`,{className:`w-16 text-right`,children:c&&i&&(0,w.jsx)(`span`,{className:`text-[10px] text-yellow-500`,children:`modified`})})]},n)})})]},n)}),(0,w.jsx)(S,{envVars:J,onSave:()=>void Q(),mode:`global`,title:`Environment Variables`}),(0,w.jsx)(j,{mutablePaths:s,listValues:W,listDirty:K,setListValues:G,setListDirty:e=>q(e),dirty:P}),(0,w.jsx)(g,{open:Z.state===`blocked`,children:(0,w.jsxs)(h,{children:[(0,w.jsxs)(m,{children:[(0,w.jsx)(v,{children:`Unsaved Changes`}),(0,w.jsxs)(_,{children:[`You have `,P.size+K.size,` unsaved change(s). Discard and leave?`]})]}),(0,w.jsxs)(d,{children:[(0,w.jsx)(u,{onClick:()=>Z.reset?.(),children:`Stay`}),(0,w.jsx)(p,{onClick:()=>Z.proceed?.(),children:`Discard`})]})]})})]})}function j({mutablePaths:e,listValues:n,listDirty:r,setListValues:i,setListDirty:a,dirty:o}){let[s,c]=(0,C.useState)(``),[l,u]=(0,C.useState)(``),d=e.includes(`defaults.deniedReadPaths`),p=e.includes(`defaults.approvalRequired`),m=n[`defaults.deniedReadPaths`]??[],h=n[`defaults.approvalRequired`]??[],g=[`~/.ssh`,`~/.aws`,`~/.gnupg`,`/etc/shadow`],_=[`rm -rf *`,`git push*`,`git reset*`,`curl * -X POST*`,`curl * --request POST*`],v=e=>g.some(t=>e===(t.startsWith(`~/`),t)||e===t),b=e=>_.includes(e),x=()=>{let e=s.trim();!e||m.includes(e)||(i(t=>({...t,"defaults.deniedReadPaths":[...m,e]})),a(e=>new Set(e).add(`defaults.deniedReadPaths`)),c(``))},S=e=>{v(e)||(i(t=>({...t,"defaults.deniedReadPaths":m.filter(t=>t!==e)})),a(e=>new Set(e).add(`defaults.deniedReadPaths`)))},T=()=>{let e=l.trim();!e||h.includes(e)||(i(t=>({...t,"defaults.approvalRequired":[...h,e]})),a(e=>new Set(e).add(`defaults.approvalRequired`)),u(``))},E=e=>{b(e)||(i(t=>({...t,"defaults.approvalRequired":h.filter(t=>t!==e)})),a(e=>new Set(e).add(`defaults.approvalRequired`)))},D=o.size+r.size;return(0,w.jsxs)(y,{children:[(0,w.jsxs)(`div`,{className:`mb-3 flex items-center justify-between`,children:[(0,w.jsx)(`h2`,{className:`text-sm font-medium text-slate-300`,children:`Advanced`}),D>0&&(0,w.jsxs)(`span`,{className:`text-[10px] text-yellow-500`,children:[r.size,` modified`]})]}),(0,w.jsxs)(`div`,{className:`mb-6`,children:[(0,w.jsxs)(`div`,{className:`mb-2 flex items-center gap-2`,children:[(0,w.jsx)(`h3`,{className:`text-xs font-medium text-slate-400`,children:`Denied Read Paths`}),!d&&(0,w.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px] text-slate-600`,children:[(0,w.jsx)(t,{size:10}),` restart required`]})]}),(0,w.jsxs)(`p`,{className:`mb-2 text-xs text-slate-500`,children:[`Paths blocked at both the SDK and OS layer for all roles. System defaults (locked) cannot be removed. Uses `,(0,w.jsx)(`code`,{className:`text-slate-400`,children:`*`}),` as wildcard.`]}),(0,w.jsx)(`div`,{className:`mb-2 flex flex-wrap gap-1.5`,children:m.map(e=>{let n=v(e);return(0,w.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded border px-2 py-0.5 text-xs ${n?`border-slate-700 bg-slate-800 text-slate-500`:`border-red-800 bg-red-950 text-red-300`}`,children:[n&&(0,w.jsx)(t,{size:9}),e,!n&&d&&(0,w.jsx)(`button`,{type:`button`,className:`ml-0.5 text-red-500 hover:text-red-300`,onClick:()=>S(e),children:`×`})]},e)})}),d&&(0,w.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,w.jsx)(`input`,{className:`flex-1 rounded border border-slate-700 bg-slate-900 px-2 py-1 text-xs text-slate-200 focus:border-blue-500 focus:outline-none`,placeholder:`/absolute/path or ~/path`,value:s,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),x())}}),(0,w.jsx)(f,{variant:`ghost`,size:`sm`,className:`scale-75`,onClick:()=>x(),children:`Add`})]})]}),(0,w.jsxs)(`div`,{children:[(0,w.jsxs)(`div`,{className:`mb-2 flex items-center gap-2`,children:[(0,w.jsx)(`h3`,{className:`text-xs font-medium text-slate-400`,children:`Approval Required Patterns`}),!p&&(0,w.jsxs)(`span`,{className:`flex items-center gap-1 text-[10px] text-slate-600`,children:[(0,w.jsx)(t,{size:10}),` restart required`]})]}),(0,w.jsxs)(`p`,{className:`mb-2 text-xs text-slate-500`,children:[`Operations matching these glob patterns require user approval before execution. Uses SDK Permission Rule glob syntax (`,(0,w.jsx)(`code`,{className:`text-slate-400`,children:`*`}),` = wildcard, e.g.,`,` `,(0,w.jsx)(`code`,{className:`text-slate-400`,children:`rm -rf *`}),`).`]}),(0,w.jsx)(`div`,{className:`mb-2 flex flex-wrap gap-1.5`,children:h.map(e=>{let n=b(e);return(0,w.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded border px-2 py-0.5 text-xs ${n?`border-slate-700 bg-slate-800 text-slate-500`:`border-amber-800 bg-amber-950 text-amber-300`}`,children:[n&&(0,w.jsx)(t,{size:9}),e,!n&&p&&(0,w.jsx)(`button`,{type:`button`,className:`ml-0.5 text-amber-500 hover:text-amber-300`,onClick:()=>E(e),children:`×`})]},e)})}),p&&(0,w.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,w.jsx)(`input`,{className:`flex-1 rounded border border-slate-700 bg-slate-900 px-2 py-1 text-xs text-slate-200 focus:border-blue-500 focus:outline-none`,placeholder:`e.g. "curl * --request POST *"`,value:l,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),T())}}),(0,w.jsx)(f,{variant:`ghost`,size:`sm`,className:`scale-75`,onClick:()=>T(),children:`Add`})]})]})]})}export{A as Settings};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{A as t,h as n,nt as r}from"./vendor-icons-CkI4-NxL.js";import{t as i}from"./vendor-react-DLRtONKt.js";import{C as a,f as o,t as s}from"./index-BFmC20R2.js";import{t as c}from"./Card-4mOZntHG.js";import{a as l}from"./format-DvtQjPZn.js";import{t as u}from"./EmptyState-BlgMMAr-.js";import{a as d,i as f,n as p,o as m,r as h,t as g}from"./Table-BxbnOSbq.js";var _=e(r(),1),v=i(),y={engineer:`info`,analyst:`warning`,content_creator:`success`,reviewer:`muted`};function b(){let e=a(e=>e.strategies),r=a(e=>e.fetchStrategies);(0,_.useEffect)(()=>{r()},[r]);let i=new Map;for(let t of e){let e=i.get(t.roleId)??[];e.push(t),i.set(t.roleId,e)}return(0,v.jsxs)(`div`,{className:`space-y-4`,children:[(0,v.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,v.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Strategies`}),(0,v.jsx)(o,{variant:`ghost`,size:`sm`,onClick:()=>void r(),children:(0,v.jsx)(n,{size:14})})]}),e.length===0?(0,v.jsx)(u,{icon:(0,v.jsx)(t,{size:32}),title:`No strategies`,description:`Strategies are created by the Thompson Sampling engine as agents process tasks`}):Array.from(i.entries()).map(([e,t])=>(0,v.jsxs)(`div`,{className:`space-y-2`,children:[(0,v.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,v.jsx)(s,{variant:y[e]??`muted`,children:e}),(0,v.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[t.length,` strategies`]})]}),(0,v.jsx)(c,{padding:!1,children:(0,v.jsxs)(g,{children:[(0,v.jsx)(d,{children:(0,v.jsxs)(m,{children:[(0,v.jsx)(f,{children:`Name`}),(0,v.jsx)(f,{children:`Task Type`}),(0,v.jsx)(f,{children:`Alpha`}),(0,v.jsx)(f,{children:`Beta`}),(0,v.jsx)(f,{children:`Trials`}),(0,v.jsx)(f,{children:`Avg Reward`}),(0,v.jsx)(f,{children:`Created`})]})}),(0,v.jsx)(p,{children:t.map(e=>(0,v.jsxs)(m,{children:[(0,v.jsx)(h,{className:`font-medium text-slate-200`,children:e.name}),(0,v.jsx)(h,{children:(0,v.jsx)(`span`,{className:`rounded bg-slate-800 px-1.5 py-0.5 font-mono text-[10px] text-slate-400`,children:e.taskType})}),(0,v.jsx)(h,{className:`font-mono text-xs`,children:e.alpha.toFixed(2)}),(0,v.jsx)(h,{className:`font-mono text-xs`,children:e.beta.toFixed(2)}),(0,v.jsx)(h,{className:`font-mono text-xs`,children:e.totalTrials}),(0,v.jsx)(h,{className:`font-mono text-xs`,children:e.avgReward==null?`—`:e.avgReward.toFixed(3)}),(0,v.jsx)(h,{className:`text-xs text-slate-500`,children:l(e.createdAt)})]},e.id))})]})})]},e))]})}export{b as Strategies};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{nt as t}from"./vendor-icons-CkI4-NxL.js";import{t as n}from"./vendor-react-DLRtONKt.js";import{n as r}from"./dist-HyCSN_hp.js";import{S as i,_ as a,b as o,h as s,x as c,y as l}from"./index-BFmC20R2.js";var u=e(t(),1);function d(e){let t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function f(e){let[t,n]=u.useState(void 0);return l(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}else n(void 0)},[e]),t}var p=n(),m=`Switch`,[h,g]=i(m),[_,v]=h(m),y=u.forwardRef((e,t)=>{let{__scopeSwitch:n,name:r,checked:i,defaultChecked:l,required:d,disabled:f,value:h=`on`,onCheckedChange:g,form:v,...y}=e,[b,x]=u.useState(null),S=c(t,e=>x(e)),T=u.useRef(!1),E=b?v||!!b.closest(`form`):!0,[D,O]=a({prop:i,defaultProp:l??!1,onChange:g,caller:m});return(0,p.jsxs)(_,{scope:n,checked:D,disabled:f,children:[(0,p.jsx)(s.button,{type:`button`,role:`switch`,"aria-checked":D,"aria-required":d,"data-state":w(D),"data-disabled":f?``:void 0,disabled:f,value:h,...y,ref:S,onClick:o(e.onClick,e=>{O(e=>!e),E&&(T.current=e.isPropagationStopped(),T.current||e.stopPropagation())})}),E&&(0,p.jsx)(C,{control:b,bubbles:!T.current,name:r,value:h,checked:D,required:d,disabled:f,form:v,style:{transform:`translateX(-100%)`}})]})});y.displayName=m;var b=`SwitchThumb`,x=u.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,i=v(b,n);return(0,p.jsx)(s.span,{"data-state":w(i.checked),"data-disabled":i.disabled?``:void 0,...r,ref:t})});x.displayName=b;var S=`SwitchBubbleInput`,C=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...i},a)=>{let o=u.useRef(null),s=c(o,a),l=d(n),m=f(t);return u.useEffect(()=>{let e=o.current;if(!e)return;let t=window.HTMLInputElement.prototype,i=Object.getOwnPropertyDescriptor(t,`checked`).set;if(l!==n&&i){let t=new Event(`click`,{bubbles:r});i.call(e,n),e.dispatchEvent(t)}},[l,n,r]),(0,p.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:n,...i,tabIndex:-1,ref:s,style:{...i.style,...m,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});C.displayName=S;function w(e){return e?`checked`:`unchecked`}var T=y,E=x,D=u.forwardRef(({className:e,...t},n)=>(0,p.jsx)(T,{className:r(`peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-900 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-blue-600 data-[state=unchecked]:bg-slate-700`,e),...t,ref:n,children:(0,p.jsx)(E,{className:r(`pointer-events-none block h-4 w-4 rounded-full bg-white shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0`)})}));D.displayName=T.displayName;export{D as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{nt as t}from"./vendor-icons-CkI4-NxL.js";import{t as n}from"./vendor-react-DLRtONKt.js";import{n as r}from"./dist-HyCSN_hp.js";var i=e(t(),1),a=n(),o=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`div`,{className:`overflow-x-auto`,children:(0,a.jsx)(`table`,{ref:n,className:r(`w-full text-sm`,e),...t})}));o.displayName=`Table`;var s=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`thead`,{ref:n,className:r(`border-b border-slate-800`,e),...t}));s.displayName=`TableHeader`;var c=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tbody`,{ref:n,className:r(`divide-y divide-slate-800/50`,e),...t}));c.displayName=`TableBody`;var l=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`tr`,{ref:n,className:r(`transition-colors hover:bg-slate-800/30`,e),...t}));l.displayName=`TableRow`;var u=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`th`,{ref:n,className:r(`px-3 py-2.5 text-left text-xs font-medium uppercase tracking-wider text-slate-500`,e),...t}));u.displayName=`TableHead`;var d=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`td`,{ref:n,className:r(`px-3 py-2.5 text-slate-300`,e),...t}));d.displayName=`TableCell`;var f=i.forwardRef(({className:e,...t},n)=>(0,a.jsx)(`caption`,{ref:n,className:r(`mt-2 text-xs text-slate-500`,e),...t}));f.displayName=`TableCaption`;var p=s,m=c,h=l,g=u,_=d;export{p as a,g as i,m as n,h as o,_ as r,o as t};
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{$ as t,B as n,H as r,M as i,N as a,U as o,i as s,nt as c}from"./vendor-icons-CkI4-NxL.js";import{d as l,r as u,t as d}from"./vendor-react-DLRtONKt.js";import{i as f,r as p}from"./dist-HyCSN_hp.js";import{f as m,n as h,t as g}from"./index-BFmC20R2.js";import{n as _,r as v,t as y}from"./Card-4mOZntHG.js";import{a as b,n as x,r as S,t as C}from"./format-DvtQjPZn.js";var w=e(c(),1),T=d(),E={reasoning:`bg-blue-500`,tool_call:`bg-blue-400`,tool_result:`bg-green-500`,approval_request:`bg-yellow-500`,approval_response:`bg-yellow-400`,permission_denied:`bg-orange-500`,error:`bg-red-500`,plugin_error:`bg-red-600`};function D({logs:e}){let[t,n]=(0,w.useState)(new Set);return e.length===0?(0,T.jsx)(`p`,{className:`text-sm text-slate-500`,children:`No execution steps yet.`}):(0,T.jsx)(`div`,{className:`space-y-0`,children:e.map((r,i)=>{let a=i>0?e[i-1].timestamp:null,o=a?r.timestamp-a:null,s=r.type===`plugin_error`,c=t.has(i)?r.content:r.content.length>200?r.content.slice(0,200)+`...`:r.content;return(0,T.jsxs)(`div`,{className:`flex gap-3`,children:[(0,T.jsxs)(`div`,{className:`flex flex-col items-center`,children:[(0,T.jsx)(`div`,{className:`w-2.5 h-2.5 rounded-full mt-1.5 flex-shrink-0 ${E[r.type]??`bg-slate-500`} ${s?`ring-2 ring-red-400`:``}`}),i<e.length-1&&(0,T.jsx)(`div`,{className:`w-0.5 flex-1 bg-slate-700 mt-0.5`})]}),(0,T.jsxs)(`div`,{className:`flex-1 pb-4 ${s?`border border-red-500/40 rounded-md bg-red-950/10 p-2`:``}`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,r.index]}),(0,T.jsx)(`span`,{className:`text-sm font-medium text-slate-200`,children:r.toolName??r.type}),s&&(0,T.jsx)(g,{variant:`destructive`,children:`Plugin Error`}),(0,T.jsx)(`span`,{className:`text-xs text-slate-500`,children:b(r.timestamp)}),o!=null&&o>0&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-600`,children:[`+`,o,`ms`]}),r.truncated&&(0,T.jsx)(g,{variant:`outline`,children:`truncated`})]}),c&&(0,T.jsx)(`button`,{className:`mt-1 text-xs text-slate-400 hover:text-slate-300 text-left w-full font-mono`,onClick:()=>{n(e=>{let t=new Set(e);return t.has(i)?t.delete(i):t.add(i),t})},children:c})]})]},r.id)})})}function O(){let{id:e}=l(),[c,d]=(0,w.useState)(null),[b,E]=(0,w.useState)([]),[O,j]=(0,w.useState)([]),[M,N]=(0,w.useState)([]),[P,F]=(0,w.useState)(null),[I,L]=(0,w.useState)(null),[R,z]=(0,w.useState)(!1);(0,w.useEffect)(()=>{if(!e)return;let t=async()=>{try{d((await p(`/tasks/${e}`)).task),L(null)}catch(e){L(e instanceof Error?e.message:`Failed to load task`)}};t(),p(`/tasks/${e}/plan`).then(e=>E(e.plans)).catch(()=>E([])),p(`/tasks/${e}/logs?limit=200`).then(e=>j(e.logs)).catch(()=>j([])),f(e).then(e=>N(e)).catch(()=>N([]));let n=setInterval(t,3e3);return()=>clearInterval(n)},[e]),(0,w.useEffect)(()=>{if(!c?.roleId||!e)return;let t=!1;return p(`/roles/${c.roleId}/scores?limit=100`).then(n=>{t||F(n.scores.find(t=>t.taskId===e)??null)}).catch(()=>{t||F(null)}),()=>{t=!0}},[c?.roleId,e]);let B=async()=>{if(e){z(!0);try{await p(`/tasks/${e}/cancel`,{method:`POST`}),d(e=>e&&{...e,status:`cancelled`})}finally{z(!1)}}};if(I)return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),(0,T.jsx)(y,{className:`text-center text-red-400`,children:I})]});if(!c)return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),(0,T.jsx)(y,{className:`text-center text-slate-500`,children:`Loading...`})]});let V=[`running`,`queued`,`pending`,`paused`].includes(c.status);return(0,T.jsxs)(`div`,{className:`space-y-4`,children:[(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsxs)(u,{to:`/work`,className:`flex items-center gap-1.5 text-sm text-slate-400 hover:text-slate-200`,children:[(0,T.jsx)(t,{size:14}),` Back to Tasks`]}),V&&(0,T.jsxs)(m,{variant:`destructive`,size:`sm`,onClick:()=>void B(),disabled:R,children:[(0,T.jsx)(o,{size:14}),R?`Cancelling...`:`Cancel Task`]})]}),(0,T.jsx)(y,{children:(0,T.jsx)(`div`,{className:`flex items-start justify-between gap-4`,children:(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,T.jsx)(g,{variant:h(c.status),children:c.status}),(0,T.jsx)(`span`,{className:`font-mono text-xs text-slate-500`,children:c.id})]}),(0,T.jsx)(`p`,{className:`text-sm text-slate-200 whitespace-pre-wrap`,children:c.prompt})]})})}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,T.jsx)(A,{icon:r,label:`Created`,value:x(c.createdAt)}),(0,T.jsx)(A,{icon:r,label:`Duration`,value:c.totalDurationMs?S(c.totalDurationMs):c.startedAt?S(Date.now()-c.startedAt):`—`}),(0,T.jsx)(A,{icon:n,label:`Cost`,value:c.costUsd==null?`—`:C(c.costUsd)}),(0,T.jsx)(A,{icon:a,label:`Turns`,value:String(c.numTurns??`—`)})]}),(0,T.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 lg:grid-cols-4`,children:[(0,T.jsx)(A,{icon:s,label:`Role`,value:c.roleId??`—`,mono:!0}),(0,T.jsx)(A,{icon:i,label:`Parent`,value:c.parentId??`—`,mono:!0}),c.templateId?(0,T.jsxs)(u,{to:`/work`,className:`block`,children:[(0,T.jsx)(A,{icon:i,label:`Template`,value:c.templateId,mono:!0}),(0,T.jsx)(`span`,{className:`mt-0.5 block text-xs text-blue-400 hover:text-blue-300`,children:`View in Automations →`})]}):(0,T.jsx)(A,{icon:i,label:`Template`,value:`—`,mono:!0}),c.sourceSessionId&&(0,T.jsx)(A,{icon:a,label:`Source Session`,value:c.sourceSessionId.slice(0,8),mono:!0})]}),(c.deliverTo||c.reportTo)&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Delivery Targets`})}),(0,T.jsxs)(`div`,{className:`space-y-3`,children:[c.deliverTo&&c.deliverTo.length>0&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs text-slate-500 mb-1`,children:`Output`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:c.deliverTo.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-slate-300`,children:[(0,T.jsx)(g,{variant:`outline`,children:e.type===`channel`?`Channel`:`Session`}),e.type===`channel`?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs`,children:e.channelId.slice(0,8)}),e.chatId&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[`chat: `,e.chatId.slice(0,8)]})]}):(0,T.jsxs)(`span`,{className:`text-xs text-slate-400`,children:[`session `,e.sessionId?.slice(0,8)]})]},`d-${t}`))})]}),c.reportTo&&c.reportTo.length>0&&(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`p`,{className:`text-xs text-slate-500 mb-1`,children:`Status Reports`}),(0,T.jsx)(`div`,{className:`space-y-1`,children:c.reportTo.map((e,t)=>(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-sm text-slate-300`,children:[(0,T.jsx)(g,{variant:`outline`,children:e.type===`channel`?`Channel`:`Session`}),e.type===`channel`?(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(`span`,{className:`font-mono text-xs`,children:e.channelId.slice(0,8)}),e.chatId&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-500`,children:[`chat: `,e.chatId.slice(0,8)]})]}):(0,T.jsxs)(`span`,{className:`text-xs text-slate-400`,children:[`session `,e.sessionId?.slice(0,8)]})]},`r-${t}`))})]})]})]}),P&&(c.status===`completed`||c.status===`failed`)&&(0,T.jsx)(k,{score:P}),c.tokenUsage&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Token Usage`})}),(0,T.jsxs)(`div`,{className:`flex gap-6 text-sm`,children:[(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-slate-500`,children:`Input:`}),` `,(0,T.jsx)(`span`,{className:`font-mono text-slate-200`,children:c.tokenUsage.input.toLocaleString()})]}),(0,T.jsxs)(`div`,{children:[(0,T.jsx)(`span`,{className:`text-slate-500`,children:`Output:`}),` `,(0,T.jsx)(`span`,{className:`font-mono text-slate-200`,children:c.tokenUsage.output.toLocaleString()})]})]})]}),b.length>0&&(()=>{let e=b[0],t=e.plan.overallRisk===`high`?`destructive`:e.plan.overallRisk===`medium`?`warning`:`secondary`;return(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(v,{children:`Execution Plan`}),(0,T.jsxs)(g,{variant:t,children:[e.plan.overallRisk.toUpperCase(),` RISK`]}),(0,T.jsx)(g,{variant:`outline`,children:e.status})]})}),(0,T.jsxs)(`h4`,{className:`text-sm font-medium text-slate-300 mb-2`,children:[`Plan Steps (`,e.plan.steps.length,`)`]}),(0,T.jsx)(`div`,{className:`space-y-2`,children:e.plan.steps.map(e=>(0,T.jsxs)(`div`,{className:`rounded-md border border-slate-700 bg-slate-800/50 p-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,e.index]}),(0,T.jsx)(`span`,{className:`text-sm text-slate-200`,children:e.description})]}),(0,T.jsx)(g,{variant:e.riskLevel===`high`?`destructive`:e.riskLevel===`medium`?`warning`:`secondary`,children:e.riskLevel})]}),(0,T.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]}),e.expectedOutput&&(0,T.jsxs)(`div`,{className:`mt-0.5 text-xs text-slate-500`,children:[`Expected: `,e.expectedOutput]})]},e.index))}),Object.keys(e.plan.requiredPermissions).length>0&&(0,T.jsxs)(`div`,{className:`mt-2`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-slate-300 mb-1`,children:`Required Permissions`}),(0,T.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(e.plan.requiredPermissions).map(e=>(0,T.jsx)(g,{variant:`secondary`,children:e},e))})]}),e.deviationReport&&(0,T.jsxs)(`div`,{className:`mt-3 rounded-md border border-amber-900/50 bg-amber-950/20 p-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-amber-400 mb-2`,children:`Deviation Report`}),(0,T.jsxs)(`div`,{className:`text-xs text-slate-400 mb-2`,children:[`Planned: `,e.deviationReport.stepsPlanned,` | Executed: `,e.deviationReport.stepsExecuted,` | Accuracy: `,(e.deviationReport.overallAccuracy*100).toFixed(0),`%`]}),e.deviationReport.deviations.length>0&&(0,T.jsx)(`div`,{className:`space-y-1`,children:e.deviationReport.deviations.map((e,t)=>(0,T.jsxs)(`div`,{className:`text-xs`,children:[(0,T.jsxs)(`span`,{className:`text-amber-400 font-mono`,children:[`[`,e.deviationType,`]`]}),(0,T.jsxs)(`span`,{className:`text-slate-400`,children:[` Step `,e.stepIndex,`: `]}),(0,T.jsx)(`span`,{className:`text-slate-300`,children:e.actual})]},t))})]}),e.learnedRules&&e.learnedRules.length>0&&(0,T.jsxs)(`div`,{className:`mt-3`,children:[(0,T.jsx)(`p`,{className:`text-sm font-medium text-slate-300 mb-2`,children:`Learned Rules`}),(0,T.jsx)(`ul`,{className:`space-y-1`,children:e.learnedRules.map((e,t)=>(0,T.jsxs)(`li`,{className:`text-xs text-slate-400 flex items-start gap-1.5`,children:[(0,T.jsx)(`span`,{className:`text-blue-400 mt-0.5`,children:`*`}),e]},t))})]})]})})(),O.length>0&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(v,{children:[`Execution Timeline (`,O.length,` steps)`]})}),(0,T.jsx)(D,{logs:O})]}),c.result&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Result`})}),(0,T.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap rounded-md bg-slate-800 p-3 font-mono text-xs text-slate-300`,children:c.result})]}),c.error&&(()=>{let e=[`plugin`,`--plugin-dir`,`failed to load plugin`],t=c.error.toLowerCase(),n=e.some(e=>t.includes(e)),r=n?c.error.split(`
2
+ `).find(t=>e.some(e=>t.toLowerCase().includes(e))):null;return(0,T.jsxs)(y,{className:n?`border-red-500`:``,children:[(0,T.jsx)(_,{children:(0,T.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,T.jsx)(v,{children:`Error`}),n&&(0,T.jsx)(g,{variant:`warning`,children:`Plugin Issue`})]})}),n&&r&&(0,T.jsx)(`div`,{className:`mb-2 rounded bg-amber-950/30 px-2 py-1 text-xs text-amber-400`,children:r}),(0,T.jsx)(`pre`,{className:`max-h-96 overflow-auto whitespace-pre-wrap rounded-md bg-red-950/30 p-3 font-mono text-xs text-red-400`,children:c.error})]})})(),M.length>0&&(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsxs)(v,{children:[`Delivery Status (`,M.length,`)`]})}),(0,T.jsx)(`div`,{className:`space-y-2`,children:M.map(e=>{let t=e.status===`delivered`?`default`:e.status===`pending`?`secondary`:`destructive`,n=e.target.type===`webhook`?e.target.webhookUrl:e.target.type===`channel`?`channel ${e.target.channelId.slice(0,8)}`:`session ${e.target.sessionId?.slice(0,8)}`;return(0,T.jsxs)(`div`,{className:`flex items-start gap-3 text-sm`,children:[(0,T.jsx)(g,{variant:t,className:`mt-0.5 shrink-0`,children:e.status}),(0,T.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-2 text-slate-400`,children:[(0,T.jsx)(`span`,{className:`text-xs font-mono truncate`,children:n}),e.messageType&&(0,T.jsxs)(`span`,{className:`text-xs text-slate-600`,children:[`(`,e.messageType,`)`]})]}),e.error&&(0,T.jsx)(`p`,{className:`text-xs text-red-400 mt-0.5`,children:e.error}),(0,T.jsxs)(`p`,{className:`text-xs text-slate-600 mt-0.5`,children:[x(e.createdAt),e.deliveredAt&&` \u2192 ${x(e.deliveredAt)}`]})]})]},e.id)})})]})]})}function k({score:e}){let t=[{label:`Task Success`,value:e.scores.taskSuccess,weight:`30%`},{label:`Plan Accuracy`,value:e.scores.planAccuracy,weight:`25%`},{label:`Permission Compliance`,value:e.scores.permissionCompliance,weight:`25%`},{label:`Efficiency`,value:e.scores.efficiency,weight:`20%`}];return(0,T.jsxs)(y,{children:[(0,T.jsx)(_,{children:(0,T.jsx)(v,{children:`Quality Score`})}),(0,T.jsxs)(`div`,{className:`space-y-3`,children:[t.map(e=>(0,T.jsxs)(`div`,{children:[(0,T.jsxs)(`div`,{className:`mb-1 flex items-center justify-between text-xs`,children:[(0,T.jsxs)(`span`,{className:`text-slate-400`,children:[e.label,` `,(0,T.jsxs)(`span`,{className:`text-slate-600`,children:[`(`,e.weight,`)`]})]}),(0,T.jsxs)(`span`,{className:`font-mono text-slate-300`,children:[(e.value*100).toFixed(0),`%`]})]}),(0,T.jsx)(`div`,{className:`h-1.5 w-full rounded-full bg-slate-800`,children:(0,T.jsx)(`div`,{className:`h-full rounded-full ${e.value<.4?`bg-red-500`:`bg-blue-600`}`,style:{width:`${e.value*100}%`}})})]},e.label)),(0,T.jsxs)(`div`,{className:`mt-2 flex items-center justify-between border-t border-slate-800 pt-2`,children:[(0,T.jsx)(`span`,{className:`text-sm text-slate-300`,children:`Weighted Score`}),(0,T.jsxs)(`span`,{className:`font-mono text-sm font-semibold text-slate-100`,children:[(e.scores.weighted*100).toFixed(0),`%`]})]}),(0,T.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,T.jsx)(`span`,{className:`text-sm text-slate-300`,children:`EMA (after this task)`}),(0,T.jsxs)(`span`,{className:`font-mono text-sm font-semibold ${e.emaScore<.4?`text-red-400`:`text-emerald-400`}`,children:[(e.emaScore*100).toFixed(0),`%`]})]})]})]})}function A({icon:e,label:t,value:n,mono:r}){return(0,T.jsxs)(y,{className:`flex flex-col gap-1`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-1.5 text-slate-500`,children:[(0,T.jsx)(e,{size:12}),(0,T.jsx)(`span`,{className:`text-xs`,children:t})]}),(0,T.jsx)(`span`,{className:`text-sm text-slate-200 truncate ${r?`font-mono text-xs`:``}`,children:n})]})}export{O as TaskDetail};
@@ -0,0 +1 @@
1
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{I as t,S as n,U as r,X as i,h as a,k as o,nt as s,o as c,v as l,x as u}from"./vendor-icons-CkI4-NxL.js";import{r as d,t as f}from"./vendor-react-DLRtONKt.js";import{n as p,r as m}from"./dist-HyCSN_hp.js";import{C as h,S as g,_,a as v,b as y,c as b,f as x,g as S,h as C,i as w,l as T,m as ee,n as E,o as D,p as O,r as te,s as ne,t as re,u as ie,v as k,w as A,x as j}from"./index-BFmC20R2.js";import{t as M}from"./Card-4mOZntHG.js";import{a as ae,o as oe,t as se}from"./format-DvtQjPZn.js";import{t as ce}from"./EmptyState-BlgMMAr-.js";import{a as le,i as N,n as ue,o as P,r as F,t as de}from"./Table-BxbnOSbq.js";import{Goals as I,t as fe}from"./Goals-DynDtpMC.js";import{t as pe}from"./Switch-DOi0EFHj.js";var L=e(s(),1),R=f();function z(e){let t=e+`CollectionProvider`,[n,r]=g(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=L.useRef(null),a=L.useRef(new Map).current;return(0,R.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=S(s),l=L.forwardRef((e,t)=>{let{scope:n,children:r}=e;return(0,R.jsx)(c,{ref:j(t,a(s,n).collectionRef),children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=S(u),p=L.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=L.useRef(null),s=j(t,o),c=a(u,n);return L.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,R.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return L.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}var B=L.createContext(void 0);function V(e){let t=L.useContext(B);return e||t||`ltr`}var H=`rovingFocusGroup.onEntryFocus`,U={bubbles:!1,cancelable:!0},W=`RovingFocusGroup`,[G,K,me]=z(W),[q,he]=g(W,[me]),[ge,_e]=q(W),J=L.forwardRef((e,t)=>(0,R.jsx)(G.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(G.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,R.jsx)(ve,{...e,ref:t})})}));J.displayName=W;var ve=L.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=L.useRef(null),p=j(t,f),m=V(a),[h,g]=_({prop:o,defaultProp:s??null,onChange:c,caller:W}),[v,b]=L.useState(!1),x=ee(l),S=K(n),w=L.useRef(!1),[T,E]=L.useState(0);return L.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(H,x),()=>e.removeEventListener(H,x)},[x]),(0,R.jsx)(ge,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:L.useCallback(e=>g(e),[g]),onItemShiftTab:L.useCallback(()=>b(!0),[]),onFocusableItemAdd:L.useCallback(()=>E(e=>e+1),[]),onFocusableItemRemove:L.useCallback(()=>E(e=>e-1),[]),children:(0,R.jsx)(C.div,{tabIndex:v||T===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:y(e.onMouseDown,()=>{w.current=!0}),onFocus:y(e.onFocus,e=>{let t=!w.current;if(e.target===e.currentTarget&&t&&!v){let t=new CustomEvent(H,U);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=S().filter(e=>e.focusable);Z([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}w.current=!1}),onBlur:y(e.onBlur,()=>b(!1))})})}),ye=`RovingFocusGroupItem`,be=L.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=k(),l=a||c,u=_e(ye,n),d=u.currentTabStopId===l,f=K(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return L.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,R.jsx)(G.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,R.jsx)(C.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:y(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:y(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:y(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=X(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Se(n,r+1):n.slice(r+1)}setTimeout(()=>Z(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});be.displayName=ye;var Y={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function xe(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function X(e,t,n){let r=xe(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Y[r]}function Z(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Se(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ce=J,we=be,Q=`Tabs`,[Te,Ee]=g(Q,[he]),De=he(),[Oe,ke]=Te(Q),Ae=L.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=V(s),[d,f]=_({prop:r,onChange:i,defaultProp:a??``,caller:Q});return(0,R.jsx)(Oe,{scope:n,baseId:k(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,R.jsx)(C.div,{dir:u,"data-orientation":o,...l,ref:t})})});Ae.displayName=Q;var je=`TabsList`,Me=L.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=ke(je,n),o=De(n);return(0,R.jsx)(Ce,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,R.jsx)(C.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});Me.displayName=je;var Ne=`TabsTrigger`,Pe=L.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=ke(Ne,n),s=De(n),c=Le(o.baseId,r),l=Re(o.baseId,r),u=r===o.value;return(0,R.jsx)(we,{asChild:!0,...s,focusable:!i,active:u,children:(0,R.jsx)(C.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:y(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:y(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:y(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});Pe.displayName=Ne;var Fe=`TabsContent`,Ie=L.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=ke(Fe,n),c=Le(s.baseId,r),l=Re(s.baseId,r),u=r===s.value,d=L.useRef(u);return L.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,R.jsx)(O,{present:i||u,children:({present:n})=>(0,R.jsx)(C.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});Ie.displayName=Fe;function Le(e,t){return`${e}-trigger-${t}`}function Re(e,t){return`${e}-content-${t}`}var ze=Ae,Be=Me,Ve=Pe,He=Ie,Ue=ze,We=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(Be,{ref:n,className:p(`inline-flex h-9 items-center justify-center rounded-lg bg-slate-800/50 p-1 text-slate-400`,e),...t}));We.displayName=Be.displayName;var Ge=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(Ve,{ref:n,className:p(`inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-slate-950 transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-slate-900 data-[state=active]:text-slate-100 data-[state=active]:shadow`,e),...t}));Ge.displayName=Ve.displayName;var Ke=L.forwardRef(({className:e,...t},n)=>(0,R.jsx)(He,{ref:n,className:p(`mt-2 ring-offset-slate-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2`,e),...t}));Ke.displayName=He.displayName;var qe=[{label:`All`,value:`all`},{label:`Running`,value:`running`},{label:`Pending`,value:`pending`},{label:`Completed`,value:`completed`},{label:`Failed`,value:`failed`},{label:`Cancelled`,value:`cancelled`}],$=new Set([`pending`,`queued`,`running`,`paused`]);function Je(){let e=h(e=>e.tasks),t=h(e=>e.fetchTasks),[n,s]=(0,L.useState)(`all`),[c,u]=(0,L.useState)(!1),[f,p]=(0,L.useState)(``),[g,_]=(0,L.useState)(!1),[v,y]=(0,L.useState)(new Set),[b,S]=(0,L.useState)(!1);(0,L.useEffect)(()=>{let e=n===`all`?void 0:n;t(e);let r=setInterval(()=>void t(e),5e3);return()=>clearInterval(r)},[t,n]),(0,L.useEffect)(()=>{y(new Set)},[n]);let C=async()=>{if(f.trim()){_(!0);try{await m(`/tasks`,{method:`POST`,body:JSON.stringify({prompt:f.trim()})}),p(``),u(!1),t(n===`all`?void 0:n)}finally{_(!1)}}},w=e=>{y(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},T=()=>{let e=D.filter(e=>$.has(e.status)).map(e=>e.id);y(new Set(e))},ee=async()=>{if(v.size!==0){S(!0);try{await m(`/tasks/batch-cancel`,{method:`POST`,body:JSON.stringify({taskIds:Array.from(v)})}),y(new Set),t(n===`all`?void 0:n)}finally{S(!1)}}},D=[...e].sort((e,t)=>t.createdAt-e.createdAt),O=Array.from(v).filter(t=>{let n=e.find(e=>e.id===t);return n&&$.has(n.status)});return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Tasks`}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[v.size>0&&(0,R.jsxs)(x,{variant:`destructive`,size:`sm`,onClick:()=>void ee(),disabled:b||O.length===0,children:[(0,R.jsx)(r,{size:14}),b?`Cancelling...`:`Cancel ${O.length} task${O.length===1?``:`s`}`]}),(0,R.jsx)(x,{variant:`ghost`,size:`sm`,onClick:()=>void t(n===`all`?void 0:n),children:(0,R.jsx)(a,{size:14})}),(0,R.jsxs)(x,{size:`sm`,onClick:()=>u(!c),children:[(0,R.jsx)(l,{size:14}),`New Task`]})]})]}),c&&(0,R.jsxs)(M,{className:`flex gap-2`,children:[(0,R.jsx)(`input`,{className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Enter task prompt...`,value:f,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Enter`&&C()}}),(0,R.jsx)(x,{onClick:()=>void C(),disabled:g||!f.trim(),children:g?`Creating...`:`Create`}),(0,R.jsx)(x,{variant:`ghost`,onClick:()=>u(!1),children:`Cancel`})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,R.jsx)(`div`,{className:`flex gap-1.5`,children:qe.map(e=>(0,R.jsx)(`button`,{onClick:()=>s(e.value),className:`rounded-md px-2.5 py-1 text-xs font-medium transition-colors ${n===e.value?`bg-slate-800 text-slate-100`:`text-slate-500 hover:text-slate-300`}`,children:e.label},e.value))}),D.some(e=>$.has(e.status))&&(0,R.jsx)(`button`,{onClick:T,className:`text-xs text-slate-500 hover:text-slate-300`,children:`Select all cancellable`}),v.size>0&&(0,R.jsxs)(`button`,{onClick:()=>y(new Set),className:`text-xs text-slate-500 hover:text-slate-300`,children:[`Clear selection (`,v.size,`)`]})]}),(0,R.jsx)(M,{padding:!1,children:D.length===0?(0,R.jsx)(ce,{icon:(0,R.jsx)(o,{size:32}),title:`No tasks found`,description:n===`all`?`Create a task to get started`:`No tasks with status "${n}"`}):(0,R.jsxs)(de,{children:[(0,R.jsx)(le,{children:(0,R.jsxs)(P,{children:[(0,R.jsx)(N,{className:`w-8`,children:(0,R.jsx)(`button`,{onClick:()=>{v.size>0&&v.size===D.filter(e=>$.has(e.status)).length?y(new Set):T()},className:`flex h-4 w-4 items-center justify-center rounded border transition-colors ${v.size>0&&v.size===D.filter(e=>$.has(e.status)).length?`border-blue-600 bg-blue-600 text-white`:`border-slate-600 bg-transparent hover:border-slate-400`}`,children:v.size>0&&v.size===D.filter(e=>$.has(e.status)).length&&(0,R.jsx)(i,{size:12})})}),(0,R.jsx)(N,{children:`ID`}),(0,R.jsx)(N,{children:`Prompt`}),(0,R.jsx)(N,{children:`Status`}),(0,R.jsx)(N,{children:`Role`}),(0,R.jsx)(N,{children:`Cost`}),(0,R.jsx)(N,{children:`Created`})]})}),(0,R.jsx)(ue,{children:D.map(e=>(0,R.jsxs)(P,{className:v.has(e.id)?`bg-slate-800/50`:``,children:[(0,R.jsx)(F,{children:$.has(e.status)?(0,R.jsx)(`button`,{onClick:()=>w(e.id),className:`flex h-4 w-4 items-center justify-center rounded border transition-colors ${v.has(e.id)?`border-blue-600 bg-blue-600 text-white`:`border-slate-600 bg-transparent hover:border-slate-400`}`,children:v.has(e.id)&&(0,R.jsx)(i,{size:12})}):(0,R.jsx)(`span`,{className:`inline-block w-4`})}),(0,R.jsx)(F,{children:(0,R.jsx)(d,{to:`/tasks/${e.id}`,className:`font-mono text-xs text-blue-400 hover:text-blue-300`,children:e.id.slice(0,8)})}),(0,R.jsx)(F,{children:oe(e.prompt,80)}),(0,R.jsx)(F,{children:(0,R.jsx)(re,{variant:E(e.status),children:e.status})}),(0,R.jsx)(F,{children:(0,R.jsx)(`span`,{className:`font-mono text-xs text-slate-500`,children:e.roleId?e.roleId.slice(0,12):`—`})}),(0,R.jsx)(F,{className:`font-mono text-xs`,children:e.costUsd==null?`—`:se(e.costUsd)}),(0,R.jsx)(F,{className:`text-xs text-slate-500`,children:ae(e.createdAt)})]},e.id))})]})})]})}function Ye(){let e=h(e=>e.templates),r=h(e=>e.fetchTemplates),i=h(e=>e.goals),o=h(e=>e.fetchGoals),[s,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(``),[g,_]=(0,L.useState)(`manual`),[y,S]=(0,L.useState)(``),[C,ee]=(0,L.useState)(``),[E,O]=(0,L.useState)(``),[k,j]=(0,L.useState)(!1),[oe,se]=(0,L.useState)(null),[I,z]=(0,L.useState)(null),[B,V]=(0,L.useState)(null),[H,U]=(0,L.useState)(null),[W,G]=(0,L.useState)(``),[K,me]=(0,L.useState)(`manual`),[q,he]=(0,L.useState)(``),[ge,_e]=(0,L.useState)(``),[J,ve]=(0,L.useState)(``),[ye,be]=(0,L.useState)(!1),[Y,xe]=(0,L.useState)(`prompt`),[X,Z]=(0,L.useState)([]),[Se,Ce]=(0,L.useState)([]),[we,Q]=(0,L.useState)([]);(0,L.useEffect)(()=>{r(),o()},[r,o]);let Te=async()=>{if(f.trim()&&!(Y===`prompt`&&!E.trim())&&!(Y===`goal`&&X.length===0)){j(!0);try{let e={name:f.trim(),trigger:{type:g,...g===`cron`&&y?{cron:y}:{},...g===`once`&&C?{runAt:new Date(C).toISOString()}:{}},enabled:!0,...Se.length>0?{deliverTo:Se}:{}};Y===`prompt`?e.steps=[{id:`step-1`,prompt:E.trim()}]:(e.goalIds=X,e.steps=[]),await m(`/task-templates`,{method:`POST`,body:JSON.stringify(e)}),p(``),O(``),S(``),ee(``),Z([]),Ce([]),d(!1),r()}finally{j(!1)}}},Ee=async t=>{let n=e.find(e=>e.id===t);se(t);try{await m(`/task-templates/${t}/run`,{method:`POST`}),A.success(`Triggered: ${n?.name??t}`)}catch(e){let t=e instanceof Error?e.message:`Failed to trigger template`;A.error(`Trigger failed: ${t}`)}finally{se(null)}},De=async t=>{let n=e.find(e=>e.id===t);try{await m(`/task-templates/${t}`,{method:`DELETE`}),A.success(`Deleted: ${n?.name??t}`),r()}catch(e){let t=e instanceof Error?e.message:`Failed to delete template`;A.error(`Delete failed: ${t}`)}},Oe=async t=>{let n=e.find(e=>e.id===t);if(!n)return;if(n.trigger.type!==`cron`&&n.trigger.type!==`event`&&n.trigger.type!==`once`){A.error(`Toggle not applicable for manual triggers`);return}let i=!n.enabled;try{await m(`/task-templates/${t}`,{method:`PATCH`,body:JSON.stringify({enabled:i})}),A.success(`${n.name} ${i?`enabled`:`disabled`}`),r()}catch(e){let t=e instanceof Error?e.message:`Failed to toggle template`;A.error(`Toggle failed: ${t}`)}},ke=e=>{U(e.id),G(e.name),me(e.trigger.type),he(e.trigger.cron??``),_e(e.trigger.runAt?new Date(e.trigger.runAt).toISOString().slice(0,16):``),ve(e.steps[0]?.prompt??``),Q(e.deliverTo??[])},Ae=async()=>{if(!(!H||!W.trim()||!J.trim())){be(!0);try{await m(`/task-templates/${H}`,{method:`PATCH`,body:JSON.stringify({name:W.trim(),trigger:{type:K,...K===`cron`&&q?{cron:q}:{},...K===`once`&&ge?{runAt:new Date(ge).toISOString()}:{}},steps:[{id:`step-1`,prompt:J.trim()}],enabled:e.find(e=>e.id===H)?.enabled??!0,deliverTo:we.length>0?we:void 0})}),U(null),r(),A.success(`Template updated`)}catch(e){let t=e instanceof Error?e.message:`Failed to update template`;A.error(t)}finally{be(!1)}}},je=e.find(e=>e.id===I),Me=e.find(e=>e.id===B);return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,R.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Automations`}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(x,{variant:`ghost`,size:`sm`,onClick:()=>void r(),children:(0,R.jsx)(a,{size:14})}),(0,R.jsxs)(x,{size:`sm`,onClick:()=>d(!s),children:[(0,R.jsx)(l,{size:14}),`New Automation`]})]})]}),s&&(0,R.jsxs)(M,{className:`space-y-3`,children:[(0,R.jsx)(`input`,{className:`w-full rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Template name`,value:f,onChange:e=>p(e.target.value)}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsxs)(`select`,{className:`rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:g,onChange:e=>_(e.target.value),children:[(0,R.jsx)(`option`,{value:`manual`,children:`Manual`}),(0,R.jsx)(`option`,{value:`cron`,children:`Cron`}),(0,R.jsx)(`option`,{value:`event`,children:`Event`}),(0,R.jsx)(`option`,{value:`once`,children:`Once`})]}),g===`cron`&&(0,R.jsx)(`input`,{className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Cron expression (e.g. */5 * * * *)`,value:y,onChange:e=>S(e.target.value)}),g===`once`&&(0,R.jsx)(`input`,{type:`datetime-local`,className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:C,onChange:e=>ee(e.target.value)})]}),(0,R.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,R.jsx)(`span`,{className:`text-xs text-slate-400`,children:`Action type:`}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(`button`,{type:`button`,onClick:()=>xe(`prompt`),className:`rounded px-2 py-1 text-xs ${Y===`prompt`?`bg-blue-600 text-white`:`bg-slate-800 text-slate-400 hover:text-slate-300`}`,children:`Custom Prompt`}),(0,R.jsx)(`button`,{type:`button`,onClick:()=>xe(`goal`),className:`rounded px-2 py-1 text-xs ${Y===`goal`?`bg-blue-600 text-white`:`bg-slate-800 text-slate-400 hover:text-slate-300`}`,children:`Goal Reference`})]})]}),Y===`prompt`?(0,R.jsx)(`textarea`,{className:`w-full rounded-md border border-slate-700 bg-slate-800 px-3 py-2 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Step prompt`,rows:3,value:E,onChange:e=>O(e.target.value)}):(0,R.jsx)(`div`,{className:`space-y-1`,children:i.length===0?(0,R.jsx)(`p`,{className:`text-xs text-slate-500`,children:`No goals available`}):i.map(e=>(0,R.jsxs)(`label`,{className:`flex items-center gap-2 text-xs text-slate-300 hover:text-slate-100 cursor-pointer`,children:[(0,R.jsx)(`input`,{type:`checkbox`,checked:X.includes(e.id),onChange:t=>{t.target.checked?Z([...X,e.id]):Z(X.filter(t=>t!==e.id))},className:`rounded border-slate-600 bg-slate-800`}),(0,R.jsx)(`span`,{className:`truncate`,children:e.name}),(0,R.jsx)(re,{variant:`muted`,className:`text-[10px]`,children:e.status})]},e.id))}),(0,R.jsx)(fe,{value:Se,onChange:Ce}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(x,{onClick:()=>void Te(),disabled:k||!f.trim()||Y===`prompt`&&!E.trim()||Y===`goal`&&X.length===0,children:k?`Creating...`:`Create`}),(0,R.jsx)(x,{variant:`ghost`,onClick:()=>d(!1),children:`Cancel`})]})]}),H!==null&&(0,R.jsxs)(M,{className:`space-y-3`,children:[(0,R.jsx)(`span`,{className:`text-sm font-medium text-slate-200`,children:`Edit Automation`}),(0,R.jsx)(`input`,{className:`w-full rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Template name`,value:W,onChange:e=>G(e.target.value)}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsxs)(`select`,{className:`rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:K,onChange:e=>me(e.target.value),children:[(0,R.jsx)(`option`,{value:`manual`,children:`Manual`}),(0,R.jsx)(`option`,{value:`cron`,children:`Cron`}),(0,R.jsx)(`option`,{value:`event`,children:`Event`}),(0,R.jsx)(`option`,{value:`once`,children:`Once`})]}),K===`cron`&&(0,R.jsx)(`input`,{className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Cron expression`,value:q,onChange:e=>he(e.target.value)}),K===`once`&&(0,R.jsx)(`input`,{type:`datetime-local`,className:`flex-1 rounded-md border border-slate-700 bg-slate-800 px-3 py-1.5 text-sm text-slate-200 focus:border-blue-500 focus:outline-none`,value:ge,onChange:e=>_e(e.target.value)})]}),(0,R.jsx)(`textarea`,{className:`w-full rounded-md border border-slate-700 bg-slate-800 px-3 py-2 text-sm text-slate-200 placeholder:text-slate-500 focus:border-blue-500 focus:outline-none`,placeholder:`Step prompt`,rows:3,value:J,onChange:e=>ve(e.target.value)}),(0,R.jsx)(fe,{value:we,onChange:Q}),(0,R.jsxs)(`div`,{className:`flex gap-2`,children:[(0,R.jsx)(x,{onClick:()=>void Ae(),disabled:ye||!W.trim()||!J.trim(),children:ye?`Saving...`:`Save`}),(0,R.jsx)(x,{variant:`ghost`,onClick:()=>U(null),children:`Cancel`})]})]}),(0,R.jsx)(M,{padding:!1,children:e.length===0?(0,R.jsx)(ce,{icon:(0,R.jsx)(t,{size:32}),title:`No automations`,description:`Create an automation to run recurring tasks`}):(0,R.jsxs)(de,{children:[(0,R.jsx)(le,{children:(0,R.jsxs)(P,{children:[(0,R.jsx)(N,{children:`Name`}),(0,R.jsx)(N,{children:`Trigger`}),(0,R.jsx)(N,{children:`Schedule`}),(0,R.jsx)(N,{children:`Steps`}),(0,R.jsx)(N,{children:`Enabled`}),(0,R.jsx)(N,{children:`Created`}),(0,R.jsx)(N,{children:`Webhook URL`}),(0,R.jsx)(N,{children:`Actions`})]})}),(0,R.jsx)(ue,{children:e.map(e=>(0,R.jsxs)(P,{children:[(0,R.jsx)(F,{className:`font-medium text-slate-200`,children:e.name}),(0,R.jsx)(F,{children:(0,R.jsx)(re,{variant:e.trigger.type===`cron`?`info`:e.trigger.type===`event`?`warning`:(e.trigger.type,`muted`),children:e.trigger.type})}),(0,R.jsx)(F,{className:`font-mono text-xs`,children:e.trigger.type===`once`&&e.trigger.runAt?new Date(e.trigger.runAt).toLocaleString():e.trigger.cron??`—`}),(0,R.jsx)(F,{className:`font-mono text-xs`,children:e.goalIds&&e.goalIds.length>0?`Goals: ${e.goalIds.length}`:e.steps.length}),(0,R.jsx)(F,{children:e.trigger.type!==`cron`&&e.trigger.type!==`event`&&e.trigger.type!==`once`?(0,R.jsx)(`span`,{className:`text-xs text-slate-500`,children:`—`}):(0,R.jsx)(pe,{checked:e.enabled,onCheckedChange:()=>void Oe(e.id),"aria-label":`Toggle ${e.name}`})}),(0,R.jsx)(F,{className:`text-xs text-slate-500`,children:e.createdAt?ae(e.createdAt):`—`}),(0,R.jsx)(F,{className:`font-mono text-xs text-slate-400`,children:e.enabled?`POST /webhooks/${e.id}`:`—`}),(0,R.jsx)(F,{children:(0,R.jsxs)(`div`,{className:`flex gap-1`,children:[(0,R.jsx)(x,{variant:`ghost`,size:`sm`,onClick:()=>ke(e),title:`Edit`,children:(0,R.jsx)(n,{size:12})}),(0,R.jsx)(x,{variant:`ghost`,size:`sm`,onClick:()=>z(e.id),disabled:oe===e.id,title:`Run now`,children:(0,R.jsx)(u,{size:12})}),(0,R.jsx)(x,{variant:`ghost`,size:`sm`,onClick:()=>V(e.id),title:`Delete`,children:(0,R.jsx)(c,{size:12,className:`text-red-400`})})]})})]},e.id))})]})}),(0,R.jsx)(te,{open:I!==null,onOpenChange:e=>{e||z(null)},children:(0,R.jsxs)(D,{children:[(0,R.jsxs)(T,{children:[(0,R.jsx)(ie,{children:`Run Template`}),(0,R.jsxs)(ne,{children:[`Run “`,je?.name,`” now? This will execute the template immediately.`]})]}),(0,R.jsxs)(b,{children:[(0,R.jsx)(v,{children:`Cancel`}),(0,R.jsx)(w,{onClick:()=>{I&&Ee(I),z(null)},children:`Run Now`})]})]})}),(0,R.jsx)(te,{open:B!==null,onOpenChange:e=>{e||V(null)},children:(0,R.jsxs)(D,{children:[(0,R.jsxs)(T,{children:[(0,R.jsx)(ie,{children:`Delete Template`}),(0,R.jsxs)(ne,{children:[`Delete “`,Me?.name,`”? This action cannot be undone.`]})]}),(0,R.jsxs)(b,{children:[(0,R.jsx)(v,{children:`Cancel`}),(0,R.jsx)(w,{className:`bg-red-600 hover:bg-red-500`,onClick:()=>{B&&De(B),V(null)},children:`Delete`})]})]})})]})}function Xe(){return(0,R.jsxs)(`div`,{className:`space-y-4`,children:[(0,R.jsx)(`h1`,{className:`text-lg font-semibold text-slate-100`,children:`Work`}),(0,R.jsxs)(Ue,{defaultValue:`tasks`,children:[(0,R.jsxs)(We,{children:[(0,R.jsx)(Ge,{value:`tasks`,children:`Tasks`}),(0,R.jsx)(Ge,{value:`automations`,children:`Automations`}),(0,R.jsx)(Ge,{value:`goals`,children:`Goals`})]}),(0,R.jsx)(Ke,{value:`tasks`,children:(0,R.jsx)(Je,{})}),(0,R.jsx)(Ke,{value:`automations`,children:(0,R.jsx)(Ye,{})}),(0,R.jsx)(Ke,{value:`goals`,children:(0,R.jsx)(I,{})})]})]})}export{Xe as Work};
@@ -0,0 +1,52 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-B4rL_ePs.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-react-DLRtONKt.js","assets/vendor-icons-CkI4-NxL.js","assets/Card-4mOZntHG.js","assets/dist-HyCSN_hp.js","assets/Table-BxbnOSbq.js","assets/format-DvtQjPZn.js","assets/Chat-hTZdEwyE.js","assets/vendor-state-B_-GdGNJ.js","assets/Work-CvESHC3Y.js","assets/Switch-DOi0EFHj.js","assets/EmptyState-BlgMMAr-.js","assets/Goals-DynDtpMC.js","assets/TaskDetail-DjmmnldI.js","assets/Plugins-SNOQNNcL.js","assets/Strategies-DZWlQCHp.js","assets/Logs-CyJFouE6.js","assets/Settings-C9Kuz-6D.js","assets/EnvVarEditor-C8kRWejV.js","assets/Memories-ClcFD7OG.js","assets/Evolution-BGwFCo7X.js","assets/Channels-DJvZPKer.js","assets/GoalDetail-BH2ku-0t.js","assets/ChannelDetail-e6rVX_y8.js","assets/Roles-CFcuHIvA.js","assets/RoleDetail-vlTPiYwY.js","assets/NotFound-CSjhzSGa.js"])))=>i.map(i=>d[i]);
2
+ import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{A as t,E as n,F as r,Q as i,T as a,W as o,_ as s,g as c,j as l,k as u,n as d,nt as f,r as p,s as m,t as h,u as g}from"./vendor-icons-CkI4-NxL.js";import{a as _,c as v,f as y,i as b,m as x,n as S,o as C,p as w,s as ee,t as T}from"./vendor-react-DLRtONKt.js";import{a as te,n as E,r as D,t as O}from"./dist-HyCSN_hp.js";import{t as ne}from"./vendor-state-B_-GdGNJ.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var k=w(),A=e(f(),1),j=T(),re=class extends A.Component{constructor(e){super(e),this.state={hasError:!1,error:null}}static getDerivedStateFromError(e){return{hasError:!0,error:e}}componentDidCatch(e,t){console.error(`[ErrorBoundary] Uncaught error:`,e,t.componentStack)}render(){return this.state.hasError?(0,j.jsx)(`div`,{className:`flex h-screen items-center justify-center bg-slate-950 p-6`,children:(0,j.jsxs)(`div`,{className:`w-full max-w-md rounded-lg border border-slate-800 bg-slate-900 p-8 text-center`,children:[(0,j.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-red-500/10`,children:(0,j.jsx)(`svg`,{className:`h-6 w-6 text-red-500`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,j.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M12 9v2m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z`})})}),(0,j.jsx)(`h1`,{className:`mb-2 text-lg font-semibold text-slate-100`,children:`Something went wrong`}),(0,j.jsx)(`p`,{className:`mb-6 text-sm text-slate-400`,children:`An unexpected error occurred. Try reloading the page.`}),this.state.error&&(0,j.jsx)(`pre`,{className:`mb-6 max-h-32 overflow-auto rounded bg-slate-950 p-3 text-left text-xs text-red-400`,children:this.state.error.message}),(0,j.jsx)(`button`,{onClick:()=>window.location.reload(),className:`rounded-md bg-blue-600 px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-blue-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-slate-900`,children:`Reload`})]})}):this.props.children}},M=[{to:`/`,icon:l,label:`Dashboard`},{to:`/chat`,icon:a,label:`Chat`},{to:`/work`,icon:u,label:`Work`},{to:`/roles`,icon:o,label:`Roles`},{to:`/strategies`,icon:t,label:`Strategies`},{to:`/channels`,icon:c,label:`Channels`},{to:`/memories`,icon:i,label:`Memories`},{to:`/evolution`,icon:r,label:`Evolution`},{to:`/plugins`,icon:s,label:`Plugins`},{to:`/logs`,icon:m,label:`Logs`},{to:`/settings`,icon:g,label:`Settings`}];function N({onNavigate:e}){return(0,j.jsxs)(`aside`,{className:`flex h-full w-60 flex-col border-r border-slate-800 bg-slate-950`,children:[(0,j.jsxs)(`div`,{className:`flex h-14 items-center gap-2.5 border-b border-slate-800 px-5`,children:[(0,j.jsx)(`div`,{className:`flex h-7 w-7 items-center justify-center rounded-md bg-blue-600 text-xs font-bold text-white`,children:`A`}),(0,j.jsx)(`span`,{className:`text-sm font-semibold text-slate-100 tracking-wide`,children:`Adam`}),(0,j.jsx)(`span`,{className:`ml-auto rounded bg-slate-800 px-1.5 py-0.5 font-mono text-[10px] text-slate-500`,children:`v2.0`})]}),(0,j.jsx)(`nav`,{role:`navigation`,"aria-label":`Main navigation`,className:`flex-1 space-y-0.5 px-3 py-4`,children:M.map(({to:t,icon:n,label:r})=>(0,j.jsx)(b,{to:t,end:t===`/`,onClick:e,className:({isActive:e})=>te(`flex items-center gap-2.5 rounded-md px-2.5 py-2 text-sm font-medium transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950`,e?`bg-slate-800 text-slate-100`:`text-slate-400 hover:bg-slate-900 hover:text-slate-200`),children:({isActive:e})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(n,{size:16}),r,e&&(0,j.jsx)(`span`,{className:`sr-only`,children:`(current page)`})]})},t))})]})}var ie=e(x(),1);function ae(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var oe=e=>{switch(e){case`success`:return le;case`info`:return de;case`warning`:return ue;case`error`:return fe;default:return null}},se=Array(12).fill(0),ce=({visible:e,className:t})=>A.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},A.createElement(`div`,{className:`sonner-spinner`},se.map((e,t)=>A.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),le=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),ue=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),de=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),fe=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},A.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),pe=A.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},A.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),A.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),me=()=>{let[e,t]=A.useState(document.hidden);return A.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},P=1,F=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{let{message:t,...n}=e,r=typeof e?.id==`number`||e.id?.length>0?e.id:P++,i=this.toasts.find(e=>e.id===r),a=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(r)&&this.dismissedToasts.delete(r),i?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:a,title:t}):n):this.addToast({title:t,...n,dismissible:a,id:r}),r},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],A.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(he(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!A.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=t?.id||P++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},I=(e,t)=>{let n=t?.id||P++;return F.addToast({title:e,...t,id:n}),n},he=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,ge=Object.assign(I,{success:F.success,info:F.info,warning:F.warning,error:F.error,custom:F.custom,message:F.message,promise:F.promise,dismiss:F.dismiss,loading:F.loading},{getHistory:()=>F.toasts,getToasts:()=>F.getActiveToasts()});ae(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function _e(e){return e.label!==void 0}var L=3,R=`24px`,ve=`16px`,ye=4e3,be=356,xe=14,Se=45,Ce=200;function z(...e){return e.filter(Boolean).join(` `)}function we(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Te=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:ee=`Close toast`}=e,[T,te]=A.useState(null),[E,D]=A.useState(null),[O,ne]=A.useState(!1),[k,j]=A.useState(!1),[re,M]=A.useState(!1),[N,ie]=A.useState(!1),[ae,se]=A.useState(!1),[le,ue]=A.useState(0),[de,fe]=A.useState(0),P=A.useRef(n.duration||y||ye),F=A.useRef(null),I=A.useRef(null),he=c===0,ge=c+1<=o,L=n.type,R=n.dismissible!==!1,ve=n.className||``,be=n.descriptionClassName||``,xe=A.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),Te=A.useMemo(()=>n.closeButton??p,[n.closeButton,p]),Ee=A.useMemo(()=>n.duration||y||ye,[n.duration,y]),De=A.useRef(0),B=A.useRef(0),Oe=A.useRef(0),V=A.useRef(null),[H,ke]=b.split(`-`),Ae=A.useMemo(()=>s.reduce((e,t,n)=>n>=xe?e:e+t.height,0),[s,xe]),je=me(),Me=n.invert||t,Ne=L===`loading`;B.current=A.useMemo(()=>xe*x+Ae,[xe,Ae]),A.useEffect(()=>{P.current=Ee},[Ee]),A.useEffect(()=>{ne(!0)},[]),A.useEffect(()=>{let e=I.current;if(e){let t=e.getBoundingClientRect().height;return fe(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),A.useLayoutEffect(()=>{if(!O)return;let e=I.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,fe(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[O,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let U=A.useCallback(()=>{j(!0),ue(B.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},Ce)},[n,d,a,B]);A.useEffect(()=>{if(n.promise&&L===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||je?(()=>{if(Oe.current<De.current){let e=new Date().getTime()-De.current;P.current-=e}Oe.current=new Date().getTime()})():P.current!==1/0&&(De.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),U()},P.current)),()=>clearTimeout(e)},[u,i,n,L,je,U]),A.useEffect(()=>{n.delete&&(U(),n.onDismiss==null||n.onDismiss.call(n,n))},[U,n.delete]);function Pe(){return w?.loading?A.createElement(`div`,{className:z(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":L===`loading`},w.loading):A.createElement(ce,{className:z(C?.loader,n?.classNames?.loader),visible:L===`loading`})}let W=n.icon||w?.[L]||oe(L);return A.createElement(`li`,{tabIndex:0,ref:I,className:z(_,ve,C?.toast,n?.classNames?.toast,C?.default,C?.[L],n?.classNames?.[L]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":O,"data-promise":!!n.promise,"data-swiped":ae,"data-removed":k,"data-visible":ge,"data-y-position":H,"data-x-position":ke,"data-index":c,"data-front":he,"data-swiping":re,"data-dismissible":R,"data-type":L,"data-invert":Me,"data-swipe-out":N,"data-swipe-direction":E,"data-expanded":!!(u||S&&O),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${k?le:B.current}px`,"--initial-height":S?`auto`:`${de}px`,...m,...n.style},onDragEnd:()=>{M(!1),te(null),V.current=null},onPointerDown:e=>{e.button!==2&&(Ne||!R||(F.current=new Date,ue(B.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(M(!0),V.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(N||!R)return;V.current=null;let e=Number(I.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(I.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-F.current?.getTime(),i=T===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Se||a>.11){ue(B.current),n.onDismiss==null||n.onDismiss.call(n,n),D(T===`x`?e>0?`right`:`left`:t>0?`down`:`up`),U(),ie(!0);return}else{var o,s;(o=I.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=I.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`)}se(!1),M(!1),te(null)},onPointerMove:t=>{var n,r;if(!V.current||!R||window.getSelection()?.toString().length>0)return;let i=t.clientY-V.current.y,a=t.clientX-V.current.x,o=e.swipeDirections??we(b);!T&&(Math.abs(a)>1||Math.abs(i)>1)&&te(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(T===`y`){if(o.includes(`top`)||o.includes(`bottom`))if(o.includes(`top`)&&i<0||o.includes(`bottom`)&&i>0)s.y=i;else{let e=i*c(i);s.y=Math.abs(e)<Math.abs(i)?e:i}}else if(T===`x`&&(o.includes(`left`)||o.includes(`right`)))if(o.includes(`left`)&&a<0||o.includes(`right`)&&a>0)s.x=a;else{let e=a*c(a);s.x=Math.abs(e)<Math.abs(a)?e:a}(Math.abs(s.x)>0||Math.abs(s.y)>0)&&se(!0),(n=I.current)==null||n.style.setProperty(`--swipe-amount-x`,`${s.x}px`),(r=I.current)==null||r.style.setProperty(`--swipe-amount-y`,`${s.y}px`)}},Te&&!n.jsx&&L!==`loading`?A.createElement(`button`,{"aria-label":ee,"data-disabled":Ne,"data-close-button":!0,onClick:Ne||!R?()=>{}:()=>{U(),n.onDismiss==null||n.onDismiss.call(n,n)},className:z(C?.closeButton,n?.classNames?.closeButton)},w?.close??pe):null,(L||n.icon||n.promise)&&n.icon!==null&&(w?.[L]!==null||n.icon)?A.createElement(`div`,{"data-icon":``,className:z(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Pe():null,n.type===`loading`?null:W):null,A.createElement(`div`,{"data-content":``,className:z(C?.content,n?.classNames?.content)},A.createElement(`div`,{"data-title":``,className:z(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?A.createElement(`div`,{"data-description":``,className:z(v,be,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),A.isValidElement(n.cancel)?n.cancel:n.cancel&&_e(n.cancel)?A.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{_e(n.cancel)&&R&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),U())},className:z(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,A.isValidElement(n.action)?n.action:n.action&&_e(n.action)?A.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{_e(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&U())},className:z(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Ee(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function De(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?ve:R;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var B=A.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=L,toastOptions:g,dir:_=Ee(),gap:v=xe,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=A.useState([]),C=A.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=A.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[ee,T]=A.useState([]),[te,E]=A.useState(!1),[D,O]=A.useState(!1),[ne,k]=A.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),j=A.useRef(null),re=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),M=A.useRef(null),N=A.useRef(!1),ae=A.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||F.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return A.useEffect(()=>F.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{ie.flushSync(()=>{S(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[x]),A.useEffect(()=>{if(d!==`system`){k(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?k(`dark`):k(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{k(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{k(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),A.useEffect(()=>{x.length<=1&&E(!1)},[x]),A.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;E(!0),(t=j.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===j.current||j.current?.contains(document.activeElement))&&E(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),A.useEffect(()=>{if(j.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,N.current=!1)}},[j.current]),A.createElement(`section`,{ref:t,"aria-label":`${b} ${re}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0},w.map((t,n)=>{let[i,a]=t.split(`-`);return C.length?A.createElement(`ol`,{key:t,dir:_===`auto`?Ee():_,tabIndex:-1,ref:j,className:c,"data-sonner-toaster":!0,"data-sonner-theme":ne,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${ee[0]?.height||0}px`,"--width":`${be}px`,"--gap":`${v}px`,...m,...De(l,u)},onBlur:e=>{N.current&&!e.currentTarget.contains(e.relatedTarget)&&(N.current=!1,M.current&&=(M.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||N.current||(N.current=!0,M.current=e.relatedTarget)},onMouseEnter:()=>E(!0),onMouseMove:()=>E(!0),onMouseLeave:()=>{D||E(!1)},onDragEnd:()=>E(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||O(!0)},onPointerUp:()=>O(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>A.createElement(Te,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:D,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ae,toasts:C.filter(e=>e.position==n.position),heights:ee.filter(e=>e.position==n.position),setHeights:T,expandByDefault:o,gap:v,expanded:te,swipeDirections:e.swipeDirections}))):null}))}),Oe=({...e})=>(0,j.jsx)(B,{theme:`dark`,className:`toaster group`,toastOptions:{classNames:{toast:`group toast group-[.toaster]:bg-slate-900 group-[.toaster]:text-slate-200 group-[.toaster]:border-slate-800 group-[.toaster]:shadow-lg`,description:`group-[.toast]:text-slate-400`,actionButton:`group-[.toast]:bg-blue-600 group-[.toast]:text-white`,cancelButton:`group-[.toast]:bg-slate-800 group-[.toast]:text-slate-200`}},...e}),V=500,H=ne((e,t)=>({tasks:[],goals:[],strategies:[],templates:[],readiness:null,stats:{activeTasks:0,queuedTasks:0,totalCostToday:0},logs:[],configVersion:0,pendingPlanApproval:null,planTimeoutNotice:null,roles:[],executionPool:{active:0,max:5,queued:0},deliveryLog:[],wsConnected:!1,_ws:null,_wsReconnectDelay:1e3,fetchTasks:async t=>{let n=new URLSearchParams({limit:`100`});t&&n.set(`status`,t),e({tasks:(await D(`/tasks?${n}`)).tasks})},fetchGoals:async()=>{e({goals:(await D(`/goals`)).goals})},updateGoal:async(t,n)=>{let r=await D(`/goals/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});return e(e=>({goals:e.goals.map(e=>e.id===t?r.goal:e)})),r.goal},deleteGoal:async t=>{await D(`/goals/${t}`,{method:`DELETE`}),e(e=>({goals:e.goals.filter(e=>e.id!==t)}))},fetchStrategies:async()=>{e({strategies:(await D(`/strategies`)).strategies})},fetchTemplates:async()=>{e({templates:(await D(`/task-templates`)).templates})},fetchExecutionPool:async()=>{try{e({executionPool:(await D(`/stats`)).executionPool})}catch{}},fetchReadiness:async()=>{try{e({readiness:await(await fetch(`/readyz`)).json()})}catch{e({readiness:{status:`not_ready`,checks:{database:!1,config:!1}}})}},connectWebSocket:()=>{let n=t()._ws;if(n&&n.readyState<=1)return;let r=window.location.protocol===`https:`?`wss:`:`ws:`,i=localStorage.getItem(`adam_api_key`),a=new URL(`${r}//${window.location.host}/events`);i&&a.searchParams.set(`api_key`,i);let o=new WebSocket(a.toString());o.onopen=()=>{e({wsConnected:!0,_ws:o,_wsReconnectDelay:1e3})},o.onclose=()=>{let n=t()._wsReconnectDelay;e({wsConnected:!1,_ws:null,_wsReconnectDelay:Math.min(n*2,1e4)}),setTimeout(()=>{t().connectWebSocket()},n)},o.onerror=()=>{o.close()},o.onmessage=n=>{try{ke(JSON.parse(n.data),e,t)}catch{}},e({_ws:o})},disconnectWebSocket:()=>{let n=t()._ws;n&&(n.close(),e({_ws:null,wsConnected:!1}))},addLog:t=>{e(e=>({logs:[...e.logs.slice(-(V-1)),t]}))},addDeliveryLogEntry:t=>{e(e=>({deliveryLog:[t,...e.deliveryLog].slice(0,100)}))},approvePlan:async(t,n,r)=>{await D(`/tasks/${t}/approve-plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({planId:n,decision:`allow`,approvalType:r})}),e({pendingPlanApproval:null})},denyPlan:async(t,n,r)=>{await D(`/tasks/${t}/approve-plan`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({planId:n,decision:`deny`,reason:r??`rejected by user`})}),e({pendingPlanApproval:null})},clearPlanTimeoutNotice:()=>{e({planTimeoutNotice:null})},fetchRoles:async()=>{let{roles:t}=await D(`/roles`);e({roles:t})},createRole:async t=>{let n=await D(`/roles`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});return e(e=>({roles:[...e.roles,n.role]})),n.role},updateRole:async(t,n)=>{let r=await D(`/roles/${t}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify(n)});return e(e=>({roles:e.roles.map(e=>e.id===t?{...e,...r.role}:e)})),r.role},deleteRole:async t=>{await D(`/roles/${t}`,{method:`DELETE`}),e(e=>({roles:e.roles.filter(e=>e.id!==t)}))}}));function ke(e,t,n){switch(e.type){case`task_status_change`:t(t=>({tasks:t.tasks.map(t=>t.id===e.taskId?{...t,status:e.newStatus}:t)}));break;case`stats_update`:t(()=>({stats:{activeTasks:e.activeTasks,queuedTasks:e.queuedTasks,totalCostToday:e.totalCostToday}}));break;case`log_event`:n().addLog(e);break;case`goal_status_change`:t(t=>({goals:t.goals.map(t=>t.id===e.goalId?{...t,status:e.newStatus}:t)}));break;case`config_changed`:t(e=>({configVersion:e.configVersion+1}));break;case`execution_slot_change`:t(()=>({executionPool:{active:e.active,max:e.max,queued:e.queued}}));break;case`plan_approval_request`:t(()=>({pendingPlanApproval:{taskId:e.taskId,planId:e.planId,plan:e.plan}}));break;case`plan_approval_decision`:n().pendingPlanApproval?.planId===e.planId&&t(()=>({pendingPlanApproval:null}));break;case`delivery_status_change`:n().addDeliveryLogEntry(e);break}}function Ae(){let[e,t]=(0,A.useState)(!1),r=H(e=>e.wsConnected),i=H(e=>e.connectWebSocket),a=H(e=>e.fetchReadiness);(0,A.useEffect)(()=>{i(),a();let e=setInterval(a,3e4);return()=>clearInterval(e)},[i,a]);let o=(0,A.useCallback)(()=>t(!1),[]);return(0,j.jsxs)(`div`,{className:`flex h-screen overflow-hidden bg-slate-950`,children:[(0,j.jsx)(`a`,{href:`#main-content`,className:`sr-only focus:not-sr-only focus:fixed focus:left-4 focus:top-4 focus:z-50 focus:rounded-md focus:bg-blue-600 focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-white focus:outline-none`,children:`Skip to content`}),(0,j.jsx)(`div`,{className:`hidden lg:block`,children:(0,j.jsx)(N,{})}),e&&(0,j.jsxs)(`div`,{className:`fixed inset-0 z-40 lg:hidden`,children:[(0,j.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:o}),(0,j.jsx)(`div`,{className:`relative z-50 h-full w-60`,children:(0,j.jsx)(N,{onNavigate:o})})]}),(0,j.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,j.jsxs)(`header`,{className:`flex h-14 items-center gap-3 border-b border-slate-800 px-4`,children:[(0,j.jsx)(`button`,{className:`lg:hidden text-slate-400 hover:text-slate-200`,onClick:()=>t(!e),"aria-label":e?`Close menu`:`Open menu`,children:e?(0,j.jsx)(h,{size:20}):(0,j.jsx)(n,{size:20})}),(0,j.jsx)(`div`,{className:`flex-1`}),(0,j.jsx)(`div`,{className:`flex items-center gap-1.5 text-xs`,"aria-live":`polite`,children:r?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(d,{size:14,className:`text-emerald-500`}),(0,j.jsx)(`span`,{className:`text-emerald-400`,children:`Connected`})]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(p,{size:14,className:`text-red-500`}),(0,j.jsx)(`span`,{className:`text-red-400`,children:`Disconnected`})]})})]}),(0,j.jsx)(`main`,{id:`main-content`,role:`main`,className:`flex-1 overflow-y-auto p-4 lg:p-6`,children:(0,j.jsx)(_,{})})]}),(0,j.jsx)(Oe,{position:`bottom-center`})]})}function je(e,t){let n=A.createContext(t),r=e=>{let{children:t,...r}=e,i=A.useMemo(()=>r,Object.values(r));return(0,j.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=A.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function Me(e,t=[]){let n=[];function r(t,r){let i=A.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=A.useMemo(()=>o,Object.values(o));return(0,j.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=A.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>A.createContext(e));return function(n){let r=n?.[e]||t;return A.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,Ne(i,...t)]}function Ne(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return A.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function U(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function Pe(...e){return t=>{let n=!1,r=e.map(e=>{let r=U(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():U(e[t],null)}}}}function W(...e){return A.useCallback(Pe(...e),e)}typeof window<`u`&&window.document&&window.document.createElement;function G(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}var K=globalThis?.document?A.useLayoutEffect:()=>{},Fe=A.useId||(()=>void 0),Ie=0;function Le(e){let[t,n]=A.useState(Fe());return K(()=>{e||n(e=>e??String(Ie++))},[e]),e||(t?`radix-${t}`:``)}var Re=A.useInsertionEffect||K;function ze({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=Be({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=A.useRef(e!==void 0);A.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,A.useCallback(t=>{if(s){let n=Ve(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function Be({defaultProp:e,onChange:t}){let[n,r]=A.useState(e),i=A.useRef(n),a=A.useRef(t);return Re(()=>{a.current=t},[t]),A.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Ve(e){return typeof e==`function`}function He(e){let t=Ue(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e,a=A.Children.toArray(r),o=a.find(Ke);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,j.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,j.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function Ue(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(A.isValidElement(n)){let e=Je(n),i=qe(r,n.props);return n.type!==A.Fragment&&(i.ref=t?Pe(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var We=Symbol(`radix.slottable`);function Ge(e){let t=({children:e})=>(0,j.jsx)(j.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=We,t}function Ke(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===We}function qe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Je(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=He(`Primitive.${t}`),r=A.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,j.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ye(e,t){e&&ie.flushSync(()=>e.dispatchEvent(t))}function Xe(e){let t=A.useRef(e);return A.useEffect(()=>{t.current=e}),A.useMemo(()=>(...e)=>t.current?.(...e),[])}function Ze(e,t=globalThis?.document){let n=Xe(e);A.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var Qe=`DismissableLayer`,$e=`dismissableLayer.update`,et=`dismissableLayer.pointerDownOutside`,tt=`dismissableLayer.focusOutside`,nt,rt=A.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),it=A.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=A.useContext(rt),[u,d]=A.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=A.useState({}),m=W(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,b=v>=_,x=st(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!b||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),S=ct(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return Ze(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),A.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(nt=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),lt(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=nt)}},[u,f,n,l]),A.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),lt())},[u,l]),A.useEffect(()=>{let e=()=>p({});return document.addEventListener($e,e),()=>document.removeEventListener($e,e)},[]),(0,j.jsx)(q.div,{...c,ref:m,style:{pointerEvents:y?b?`auto`:`none`:void 0,...e.style},onFocusCapture:G(e.onFocusCapture,S.onFocusCapture),onBlurCapture:G(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:G(e.onPointerDownCapture,x.onPointerDownCapture)})});it.displayName=Qe;var at=`DismissableLayerBranch`,ot=A.forwardRef((e,t)=>{let n=A.useContext(rt),r=A.useRef(null),i=W(t,r);return A.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,j.jsx)(q.div,{...e,ref:i})});ot.displayName=at;function st(e,t=globalThis?.document){let n=Xe(e),r=A.useRef(!1),i=A.useRef(()=>{});return A.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ut(et,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ct(e,t=globalThis?.document){let n=Xe(e),r=A.useRef(!1);return A.useEffect(()=>{let e=e=>{e.target&&!r.current&&ut(tt,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function lt(){let e=new CustomEvent($e);document.dispatchEvent(e)}function ut(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Ye(i,a):i.dispatchEvent(a)}var dt=`focusScope.autoFocusOnMount`,ft=`focusScope.autoFocusOnUnmount`,pt={bubbles:!1,cancelable:!0},mt=`FocusScope`,ht=A.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=A.useState(null),l=Xe(i),u=Xe(a),d=A.useRef(null),f=W(t,e=>c(e)),p=A.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;A.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:J(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||J(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&J(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),A.useEffect(()=>{if(s){St.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(dt,pt);s.addEventListener(dt,l),s.dispatchEvent(t),t.defaultPrevented||(gt(Tt(vt(s)),{select:!0}),document.activeElement===e&&J(s))}return()=>{s.removeEventListener(dt,l),setTimeout(()=>{let t=new CustomEvent(ft,pt);s.addEventListener(ft,u),s.dispatchEvent(t),t.defaultPrevented||J(e??document.body,{select:!0}),s.removeEventListener(ft,u),St.remove(p)},0)}}},[s,l,u,p]);let m=A.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=_t(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&J(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&J(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,j.jsx)(q.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});ht.displayName=mt;function gt(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(J(r,{select:t}),document.activeElement!==n)return}function _t(e){let t=vt(e);return[yt(t,e),yt(t.reverse(),e)]}function vt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function yt(e,t){for(let n of e)if(!bt(n,{upTo:t}))return n}function bt(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function xt(e){return e instanceof HTMLInputElement&&`select`in e}function J(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&xt(e)&&t&&e.select()}}var St=Ct();function Ct(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=wt(e,t),e.unshift(t)},remove(t){e=wt(e,t),e[0]?.resume()}}}function wt(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Tt(e){return e.filter(e=>e.tagName!==`A`)}var Et=`Portal`,Dt=A.forwardRef((e,t)=>{let{container:n,...r}=e,[i,a]=A.useState(!1);K(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ie.createPortal((0,j.jsx)(q.div,{...r,ref:t}),o):null});Dt.displayName=Et;function Ot(e,t){return A.useReducer((e,n)=>t[e][n]??e,e)}var kt=e=>{let{present:t,children:n}=e,r=At(t),i=typeof n==`function`?n({present:r.isPresent}):A.Children.only(n),a=W(r.ref,Mt(i));return typeof n==`function`||r.isPresent?A.cloneElement(i,{ref:a}):null};kt.displayName=`Presence`;function At(e){let[t,n]=A.useState(),r=A.useRef(null),i=A.useRef(e),a=A.useRef(`none`),[o,s]=Ot(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return A.useEffect(()=>{let e=jt(r.current);a.current=o===`mounted`?e:`none`},[o]),K(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=jt(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),K(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=jt(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=jt(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}else s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:A.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function jt(e){return e?.animationName||`none`}function Mt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Nt=0;function Pt(){A.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??Ft()),document.body.insertAdjacentElement(`beforeend`,e[1]??Ft()),Nt++,()=>{Nt===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),Nt--}},[])}function Ft(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var Y=function(){return Y=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Y.apply(this,arguments)};function It(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Lt(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Rt=`right-scroll-bar-position`,zt=`width-before-scroll-bar`,Bt=`with-scroll-bars-hidden`,Vt=`--removed-body-scroll-bar-size`;function Ht(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ut(e,t){var n=(0,A.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Wt=typeof window<`u`?A.useLayoutEffect:A.useEffect,Gt=new WeakMap;function Kt(e,t){var n=Ut(t||null,function(t){return e.forEach(function(e){return Ht(e,t)})});return Wt(function(){var t=Gt.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ht(e,null)}),i.forEach(function(e){r.has(e)||Ht(e,a)})}Gt.set(n,e)},[e]),n}function qt(e){return e}function Jt(e,t){t===void 0&&(t=qt);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Yt(e){e===void 0&&(e={});var t=Jt(null);return t.options=Y({async:!0,ssr:!1},e),t}var Xt=function(e){var t=e.sideCar,n=It(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return A.createElement(r,Y({},n))};Xt.isSideCarExport=!0;function Zt(e,t){return e.useMedium(t),Xt}var Qt=Yt(),$t=function(){},en=A.forwardRef(function(e,t){var n=A.useRef(null),r=A.useState({onScrollCapture:$t,onWheelCapture:$t,onTouchMoveCapture:$t}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=It(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Kt([n,t]),C=Y(Y({},b),i);return A.createElement(A.Fragment,null,u&&A.createElement(x,{sideCar:Qt,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?A.cloneElement(A.Children.only(s),Y(Y({},C),{ref:S})):A.createElement(v,Y({},C,{className:c,ref:S}),s))});en.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},en.classNames={fullWidth:zt,zeroRight:Rt};var tn,nn=function(){if(tn)return tn;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function rn(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=nn();return t&&e.setAttribute(`nonce`,t),e}function an(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function on(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var sn=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rn())&&(an(t,n),on(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cn=function(){var e=sn();return function(t,n){A.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ln=function(){var e=cn();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},un={left:0,top:0,right:0,gap:0},dn=function(e){return parseInt(e||``,10)||0},fn=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[dn(n),dn(r),dn(i)]},pn=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return un;var t=fn(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},mn=ln(),hn=`data-scroll-locked`,gn=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
3
+ .${Bt} {
4
+ overflow: hidden ${r};
5
+ padding-right: ${s}px ${r};
6
+ }
7
+ body[${hn}] {
8
+ overflow: hidden ${r};
9
+ overscroll-behavior: contain;
10
+ ${[t&&`position: relative ${r};`,n===`margin`&&`
11
+ padding-left: ${i}px;
12
+ padding-top: ${a}px;
13
+ padding-right: ${o}px;
14
+ margin-left:0;
15
+ margin-top:0;
16
+ margin-right: ${s}px ${r};
17
+ `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
18
+ }
19
+
20
+ .${Rt} {
21
+ right: ${s}px ${r};
22
+ }
23
+
24
+ .${zt} {
25
+ margin-right: ${s}px ${r};
26
+ }
27
+
28
+ .${Rt} .${Rt} {
29
+ right: 0 ${r};
30
+ }
31
+
32
+ .${zt} .${zt} {
33
+ margin-right: 0 ${r};
34
+ }
35
+
36
+ body[${hn}] {
37
+ ${Vt}: ${s}px;
38
+ }
39
+ `},_n=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},vn=function(){A.useEffect(function(){return document.body.setAttribute(hn,(_n()+1).toString()),function(){var e=_n()-1;e<=0?document.body.removeAttribute(hn):document.body.setAttribute(hn,e.toString())}},[])},yn=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;vn();var a=A.useMemo(function(){return pn(i)},[i]);return A.createElement(mn,{styles:gn(a,!t,i,n?``:`!important`)})},bn=!1;if(typeof window<`u`)try{var xn=Object.defineProperty({},`passive`,{get:function(){return bn=!0,!0}});window.addEventListener(`test`,xn,xn),window.removeEventListener(`test`,xn,xn)}catch{bn=!1}var Sn=bn?{passive:!1}:!1,Cn=function(e){return e.tagName===`TEXTAREA`},wn=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Cn(e)&&n[t]===`visible`)},Tn=function(e){return wn(e,`overflowY`)},En=function(e){return wn(e,`overflowX`)},Dn=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),An(e,r)){var i=jn(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},On=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},kn=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},An=function(e,t){return e===`v`?Tn(t):En(t)},jn=function(e,t){return e===`v`?On(t):kn(t)},Mn=function(e,t){return e===`h`&&t===`rtl`?-1:1},Nn=function(e,t,n,r,i){var a=Mn(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=jn(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&An(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Pn=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Fn=function(e){return[e.deltaX,e.deltaY]},In=function(e){return e&&`current`in e?e.current:e},Ln=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Rn=function(e){return`
40
+ .block-interactivity-${e} {pointer-events: none;}
41
+ .allow-interactivity-${e} {pointer-events: all;}
42
+ `},zn=0,Bn=[];function Vn(e){var t=A.useRef([]),n=A.useRef([0,0]),r=A.useRef(),i=A.useState(zn++)[0],a=A.useState(ln)[0],o=A.useRef(e);A.useEffect(function(){o.current=e},[e]),A.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Lt([e.lockRef.current],(e.shards||[]).map(In),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=A.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Pn(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Dn(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Dn(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Nn(h,t,e,h===`h`?s:c,!0)},[]),c=A.useCallback(function(e){var n=e;if(!(!Bn.length||Bn[Bn.length-1]!==a)){var r=`deltaY`in n?Fn(n):Pn(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Ln(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(In).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=A.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Hn(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=A.useCallback(function(e){n.current=Pn(e),r.current=void 0},[]),d=A.useCallback(function(t){l(t.type,Fn(t),t.target,s(t,e.lockRef.current))},[]),f=A.useCallback(function(t){l(t.type,Pn(t),t.target,s(t,e.lockRef.current))},[]);A.useEffect(function(){return Bn.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Sn),document.addEventListener(`touchmove`,c,Sn),document.addEventListener(`touchstart`,u,Sn),function(){Bn=Bn.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Sn),document.removeEventListener(`touchmove`,c,Sn),document.removeEventListener(`touchstart`,u,Sn)}},[]);var p=e.removeScrollBar,m=e.inert;return A.createElement(A.Fragment,null,m?A.createElement(a,{styles:Rn(i)}):null,p?A.createElement(yn,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Hn(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Un=Zt(Qt,Vn),Wn=A.forwardRef(function(e,t){return A.createElement(en,Y({},e,{ref:t,sideCar:Un}))});Wn.classNames=en.classNames;var Gn=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Kn=new WeakMap,qn=new WeakMap,Jn={},Yn=0,Xn=function(e){return e&&(e.host||Xn(e.parentNode))},Zn=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Xn(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Qn=function(e,t,n,r){var i=Zn(t,Array.isArray(e)?e:[e]);Jn[n]||(Jn[n]=new WeakMap);var a=Jn[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Kn.get(e)||0)+1,l=(a.get(e)||0)+1;Kn.set(e,c),a.set(e,l),o.push(e),c===1&&i&&qn.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Yn++,function(){o.forEach(function(e){var t=Kn.get(e)-1,i=a.get(e)-1;Kn.set(e,t),a.set(e,i),t||(qn.has(e)||e.removeAttribute(r),qn.delete(e)),i||e.removeAttribute(n)}),Yn--,Yn||(Kn=new WeakMap,Kn=new WeakMap,qn=new WeakMap,Jn={})}},$n=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Gn(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Qn(r,i,n,`aria-hidden`)):function(){return null}},er=`Dialog`,[tr,nr]=Me(er),[rr,X]=tr(er),ir=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=A.useRef(null),c=A.useRef(null),[l,u]=ze({prop:r,defaultProp:i??!1,onChange:a,caller:er});return(0,j.jsx)(rr,{scope:t,triggerRef:s,contentRef:c,contentId:Le(),titleId:Le(),descriptionId:Le(),open:l,onOpenChange:u,onOpenToggle:A.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};ir.displayName=er;var ar=`DialogTrigger`,or=A.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(ar,n),a=W(t,i.triggerRef);return(0,j.jsx)(q.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Tr(i.open),...r,ref:a,onClick:G(e.onClick,i.onOpenToggle)})});or.displayName=ar;var sr=`DialogPortal`,[cr,lr]=tr(sr,{forceMount:void 0}),ur=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=X(sr,t);return(0,j.jsx)(cr,{scope:t,forceMount:n,children:A.Children.map(r,e=>(0,j.jsx)(kt,{present:n||a.open,children:(0,j.jsx)(Dt,{asChild:!0,container:i,children:e})}))})};ur.displayName=sr;var dr=`DialogOverlay`,fr=A.forwardRef((e,t)=>{let n=lr(dr,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=X(dr,e.__scopeDialog);return a.modal?(0,j.jsx)(kt,{present:r||a.open,children:(0,j.jsx)(mr,{...i,ref:t})}):null});fr.displayName=dr;var pr=He(`DialogOverlay.RemoveScroll`),mr=A.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(dr,n);return(0,j.jsx)(Wn,{as:pr,allowPinchZoom:!0,shards:[i.contentRef],children:(0,j.jsx)(q.div,{"data-state":Tr(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Z=`DialogContent`,hr=A.forwardRef((e,t)=>{let n=lr(Z,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=X(Z,e.__scopeDialog);return(0,j.jsx)(kt,{present:r||a.open,children:a.modal?(0,j.jsx)(gr,{...i,ref:t}):(0,j.jsx)(_r,{...i,ref:t})})});hr.displayName=Z;var gr=A.forwardRef((e,t)=>{let n=X(Z,e.__scopeDialog),r=A.useRef(null),i=W(t,n.contentRef,r);return A.useEffect(()=>{let e=r.current;if(e)return $n(e)},[]),(0,j.jsx)(vr,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:G(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:G(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:G(e.onFocusOutside,e=>e.preventDefault())})}),_r=A.forwardRef((e,t)=>{let n=X(Z,e.__scopeDialog),r=A.useRef(!1),i=A.useRef(!1);return(0,j.jsx)(vr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),vr=A.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=X(Z,n),c=A.useRef(null),l=W(t,c);return Pt(),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ht,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,j.jsx)(it,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Tr(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(kr,{titleId:s.titleId}),(0,j.jsx)(jr,{contentRef:c,descriptionId:s.descriptionId})]})]})}),yr=`DialogTitle`,br=A.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(yr,n);return(0,j.jsx)(q.h2,{id:i.titleId,...r,ref:t})});br.displayName=yr;var xr=`DialogDescription`,Sr=A.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(xr,n);return(0,j.jsx)(q.p,{id:i.descriptionId,...r,ref:t})});Sr.displayName=xr;var Cr=`DialogClose`,wr=A.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=X(Cr,n);return(0,j.jsx)(q.button,{type:`button`,...r,ref:t,onClick:G(e.onClick,()=>i.onOpenChange(!1))})});wr.displayName=Cr;function Tr(e){return e?`open`:`closed`}var Er=`DialogTitleWarning`,[Dr,Or]=je(Er,{contentName:Z,titleName:yr,docsSlug:`dialog`}),kr=({titleId:e})=>{let t=Or(Er),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
43
+
44
+ If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
45
+
46
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return A.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Ar=`DialogDescriptionWarning`,jr=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Or(Ar).contentName}}.`;return A.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},Mr=ir,Nr=or,Pr=ur,Fr=fr,Ir=hr,Lr=br,Rr=Sr,zr=wr,Br=`AlertDialog`,[Vr,Hr]=Me(Br,[nr]),Q=nr(),Ur=e=>{let{__scopeAlertDialog:t,...n}=e,r=Q(t);return(0,j.jsx)(Mr,{...r,...n,modal:!0})};Ur.displayName=Br;var Wr=`AlertDialogTrigger`,Gr=A.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Q(n);return(0,j.jsx)(Nr,{...i,...r,ref:t})});Gr.displayName=Wr;var Kr=`AlertDialogPortal`,qr=e=>{let{__scopeAlertDialog:t,...n}=e,r=Q(t);return(0,j.jsx)(Pr,{...r,...n})};qr.displayName=Kr;var Jr=`AlertDialogOverlay`,Yr=A.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Q(n);return(0,j.jsx)(Fr,{...i,...r,ref:t})});Yr.displayName=Jr;var $=`AlertDialogContent`,[Xr,Zr]=Vr($),Qr=Ge(`AlertDialogContent`),$r=A.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=Q(n),o=A.useRef(null),s=W(t,o),c=A.useRef(null);return(0,j.jsx)(Dr,{contentName:$,titleName:ei,docsSlug:`alert-dialog`,children:(0,j.jsx)(Xr,{scope:n,cancelRef:c,children:(0,j.jsxs)(Ir,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:G(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,j.jsx)(Qr,{children:r}),(0,j.jsx)(ci,{contentRef:o})]})})})});$r.displayName=$;var ei=`AlertDialogTitle`,ti=A.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Q(n);return(0,j.jsx)(Lr,{...i,...r,ref:t})});ti.displayName=ei;var ni=`AlertDialogDescription`,ri=A.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Q(n);return(0,j.jsx)(Rr,{...i,...r,ref:t})});ri.displayName=ni;var ii=`AlertDialogAction`,ai=A.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=Q(n);return(0,j.jsx)(zr,{...i,...r,ref:t})});ai.displayName=ii;var oi=`AlertDialogCancel`,si=A.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=Zr(oi,n),a=Q(n),o=W(t,i);return(0,j.jsx)(zr,{...a,...r,ref:o})});si.displayName=oi;var ci=({contentRef:e})=>{let t=`\`${$}\` requires a description for the component to be accessible for screen reader users.
47
+
48
+ You can add a description to the \`${$}\` by passing a \`${ni}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
49
+
50
+ Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${$}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
51
+
52
+ For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return A.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},li=Ur,ui=Gr,di=qr,fi=Yr,pi=$r,mi=ai,hi=si,gi=ti,_i=ri,vi=Symbol.for(`react.lazy`),yi=A.use;function bi(e){return typeof e==`object`&&!!e&&`then`in e}function xi(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===vi&&`_payload`in e&&bi(e._payload)}function Si(e){let t=wi(e),n=A.forwardRef((e,n)=>{let{children:r,...i}=e;xi(r)&&typeof yi==`function`&&(r=yi(r._payload));let a=A.Children.toArray(r),o=a.find(Ei);if(o){let e=o.props.children,r=a.map(t=>t===o?A.Children.count(e)>1?A.Children.only(null):A.isValidElement(e)?e.props.children:null:t);return(0,j.jsx)(t,{...i,ref:n,children:A.isValidElement(e)?A.cloneElement(e,void 0,r):null})}return(0,j.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Ci=Si(`Slot`);function wi(e){let t=A.forwardRef((e,t)=>{let{children:n,...r}=e;if(xi(n)&&typeof yi==`function`&&(n=yi(n._payload)),A.isValidElement(n)){let e=Oi(n),i=Di(r,n.props);return n.type!==A.Fragment&&(i.ref=t?Pe(t,e):e),A.cloneElement(n,i)}return A.Children.count(n)>1?A.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ti=Symbol(`radix.slottable`);function Ei(e){return A.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ti}function Di(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Oi(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var ki=O(`inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-slate-950 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-blue-600 text-white hover:bg-blue-500 active:bg-blue-700`,secondary:`bg-slate-800 text-slate-200 hover:bg-slate-700 active:bg-slate-600 border border-slate-700`,destructive:`bg-red-600 text-white hover:bg-red-500 active:bg-red-700`,ghost:`text-slate-400 hover:text-slate-200 hover:bg-slate-800`,outline:`border border-slate-700 bg-transparent text-slate-200 hover:bg-slate-800 hover:text-slate-100`,link:`text-blue-500 underline-offset-4 hover:underline`},size:{default:`px-3.5 py-1.5`,sm:`px-2.5 py-1 text-xs`,lg:`px-5 py-2`,icon:`h-8 w-8`}},defaultVariants:{variant:`default`,size:`default`}}),Ai=A.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,j.jsx)(r?Ci:`button`,{className:E(ki({variant:t,size:n,className:e})),ref:a,...i}));Ai.displayName=`Button`;var ji=li,Mi=ui,Ni=di,Pi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(fi,{ref:n,className:E(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));Pi.displayName=fi.displayName;var Fi=A.forwardRef(({className:e,...t},n)=>(0,j.jsxs)(Ni,{children:[(0,j.jsx)(Pi,{}),(0,j.jsx)(pi,{ref:n,className:E(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-slate-800 bg-slate-900 p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...t})]}));Fi.displayName=pi.displayName;var Ii=({className:e,...t})=>(0,j.jsx)(`div`,{className:E(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});Ii.displayName=`AlertDialogHeader`;var Li=({className:e,...t})=>(0,j.jsx)(`div`,{className:E(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Li.displayName=`AlertDialogFooter`;var Ri=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(gi,{ref:n,className:E(`text-lg font-semibold text-slate-100`,e),...t}));Ri.displayName=gi.displayName;var zi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(_i,{ref:n,className:E(`text-sm text-slate-400`,e),...t}));zi.displayName=_i.displayName;var Bi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(mi,{ref:n,className:E(ki(),e),...t}));Bi.displayName=mi.displayName;var Vi=A.forwardRef(({className:e,...t},n)=>(0,j.jsx)(hi,{ref:n,className:E(ki({variant:`ghost`}),`mt-2 sm:mt-0`,e),...t}));Vi.displayName=hi.displayName;var Hi=O(`inline-flex items-center rounded-md px-2 py-0.5 text-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2`,{variants:{variant:{default:`bg-slate-700 text-slate-200`,secondary:`bg-slate-800 text-slate-400`,destructive:`bg-red-900/50 text-red-400 border border-red-800`,outline:`border border-slate-700 text-slate-300`,success:`bg-emerald-900/50 text-emerald-400 border border-emerald-800`,warning:`bg-amber-900/50 text-amber-400 border border-amber-800`,info:`bg-blue-900/50 text-blue-400 border border-blue-800`,muted:`bg-slate-800 text-slate-500`}},defaultVariants:{variant:`default`}});function Ui({className:e,variant:t=`default`,...n}){return(0,j.jsx)(`span`,{className:E(Hi({variant:t}),e),...n})}function Wi(e){switch(e){case`completed`:case`ready`:case`idle`:return`success`;case`running`:case`busy`:case`executing`:case`planning`:case`evaluating`:case`replanning`:return`info`;case`pending`:case`queued`:case`paused`:case`degraded`:return`warning`;case`failed`:case`cancelled`:case`dead`:case`not_ready`:return`destructive`;default:return`muted`}}var Gi=300;function Ki(e){return e===`high`?`destructive`:e===`medium`?`outline`:`secondary`}function qi(){let e=H(e=>e.pendingPlanApproval),t=H(e=>e.approvePlan),n=H(e=>e.denyPlan),r=H(e=>e.planTimeoutNotice),i=H(e=>e.clearPlanTimeoutNotice),[a,o]=(0,A.useState)(Gi),[s,c]=(0,A.useState)(!1);(0,A.useEffect)(()=>{if(!e){o(Gi),c(!1);return}let t=setInterval(()=>{o(e=>e<=1?(clearInterval(t),0):e-1)},1e3);return()=>clearInterval(t)},[e?.planId]),(0,A.useEffect)(()=>{a===0&&e&&!s&&(c(!0),n(e.taskId,e.planId,`timeout`).catch(()=>{}))},[a,e,s,n]);let l=async n=>{if(e){c(!0);try{await t(e.taskId,e.planId,n)}catch{c(!1)}}},u=async()=>{if(e){c(!0);try{await n(e.taskId,e.planId)}catch{c(!1)}}},d=e?.plan;return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(ji,{open:!!e,children:(0,j.jsxs)(Fi,{className:`max-w-2xl max-h-[80vh] overflow-y-auto`,children:[(0,j.jsxs)(Ii,{children:[(0,j.jsxs)(Ri,{className:`flex items-center gap-2`,children:[`Execution Plan — Approval Required`,d&&(0,j.jsxs)(Ui,{variant:Ki(d.overallRisk),children:[d.overallRisk.toUpperCase(),` RISK`]})]}),(0,j.jsxs)(zi,{className:`text-xs text-slate-400`,children:[`Plan `,e?.planId,` | Task `,e?.taskId,` | `,a,`s remaining`]})]}),d&&(0,j.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,j.jsxs)(`div`,{children:[(0,j.jsxs)(`h4`,{className:`text-sm font-medium text-slate-300 mb-2`,children:[`Plan Steps (`,d.steps.length,`)`]}),(0,j.jsx)(`div`,{className:`space-y-2`,children:d.steps.map(e=>(0,j.jsxs)(`div`,{className:`rounded-md border border-slate-700 bg-slate-800/50 p-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsxs)(`span`,{className:`text-xs font-mono text-slate-500`,children:[`#`,e.index]}),(0,j.jsx)(`span`,{className:`text-sm text-slate-200`,children:e.description})]}),(0,j.jsx)(Ui,{variant:Ki(e.riskLevel),children:e.riskLevel})]}),(0,j.jsxs)(`div`,{className:`mt-1 text-xs text-slate-400`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]})]},e.index))})]}),Object.keys(d.requiredPermissions).length>0&&(0,j.jsxs)(`div`,{children:[(0,j.jsx)(`h4`,{className:`text-sm font-medium text-slate-300 mb-1`,children:`Required Permissions`}),(0,j.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(d.requiredPermissions).map(e=>(0,j.jsx)(Ui,{variant:`secondary`,children:e},e))})]})]}),(0,j.jsxs)(Li,{children:[(0,j.jsx)(Ai,{variant:`destructive`,onClick:u,disabled:s,children:`Deny`}),(0,j.jsx)(Ai,{variant:`outline`,onClick:()=>l(`permanent`),disabled:s,children:`Allow Permanent`}),(0,j.jsx)(Ai,{onClick:()=>l(`once`),disabled:s,children:`Allow Once`})]})]})}),r&&(0,j.jsxs)(`div`,{className:`fixed bottom-4 right-4 z-50 rounded-md border border-amber-700 bg-amber-950 px-4 py-2 text-sm text-amber-200 shadow-lg`,children:[r,(0,j.jsx)(`button`,{className:`ml-3 text-amber-400 hover:text-amber-200`,onClick:i,children:`Dismiss`})]})]})}var Ji=(0,A.lazy)(()=>y(()=>import(`./Dashboard-B4rL_ePs.js`).then(e=>({default:e.Dashboard})),__vite__mapDeps([0,1,2,3,4,5,6,7]))),Yi=(0,A.lazy)(()=>y(()=>import(`./Chat-hTZdEwyE.js`).then(e=>({default:e.Chat})),__vite__mapDeps([8,1,2,3,5,9,7]))),Xi=(0,A.lazy)(()=>y(()=>import(`./Work-CvESHC3Y.js`).then(e=>({default:e.Work})),__vite__mapDeps([10,1,2,3,11,5,4,12,13,7,6]))),Zi=(0,A.lazy)(()=>y(()=>import(`./TaskDetail-DjmmnldI.js`).then(e=>({default:e.TaskDetail})),__vite__mapDeps([14,1,2,3,5,4,7]))),Qi=(0,A.lazy)(()=>y(()=>import(`./Plugins-SNOQNNcL.js`).then(e=>({default:e.Plugins})),__vite__mapDeps([15,1,2,3,5,4,12,6,7]))),$i=(0,A.lazy)(()=>y(()=>import(`./Strategies-DZWlQCHp.js`).then(e=>({default:e.Strategies})),__vite__mapDeps([16,1,2,3,4,5,12,6,7]))),ea=(0,A.lazy)(()=>y(()=>import(`./Goals-DynDtpMC.js`).then(e=>({default:e.Goals})),__vite__mapDeps([13,1,2,3,5,4,12,7]))),ta=(0,A.lazy)(()=>y(()=>import(`./Logs-CyJFouE6.js`).then(e=>({default:e.Logs})),__vite__mapDeps([17,1,2,3,4,5,12]))),na=(0,A.lazy)(()=>y(()=>import(`./Settings-C9Kuz-6D.js`).then(e=>({default:e.Settings})),__vite__mapDeps([18,1,2,3,5,19,4,12,7]))),ra=(0,A.lazy)(()=>y(()=>import(`./Memories-ClcFD7OG.js`).then(e=>({default:e.Memories})),__vite__mapDeps([20,1,2,3,5,4,12,7]))),ia=(0,A.lazy)(()=>y(()=>import(`./Evolution-BGwFCo7X.js`).then(e=>({default:e.Evolution})),__vite__mapDeps([21,1,2,3,5,4,12,7]))),aa=(0,A.lazy)(()=>y(()=>import(`./Channels-DJvZPKer.js`).then(e=>({default:e.Channels})),__vite__mapDeps([22,1,2,3,5,4,12]))),oa=(0,A.lazy)(()=>y(()=>import(`./GoalDetail-BH2ku-0t.js`).then(e=>({default:e.GoalDetail})),__vite__mapDeps([23,1,2,3,5,4,7]))),sa=(0,A.lazy)(()=>y(()=>import(`./ChannelDetail-e6rVX_y8.js`).then(e=>({default:e.ChannelDetail})),__vite__mapDeps([24,1,2,3,5,4,7]))),ca=(0,A.lazy)(()=>y(()=>import(`./Roles-CFcuHIvA.js`).then(e=>({default:e.Roles})),__vite__mapDeps([25,1,2,3,4,5,12,6,7]))),la=(0,A.lazy)(()=>y(()=>import(`./RoleDetail-vlTPiYwY.js`).then(e=>({default:e.RoleDetail})),__vite__mapDeps([26,1,2,3,11,5,19,4,6,7]))),ua=(0,A.lazy)(()=>y(()=>import(`./NotFound-CSjhzSGa.js`),__vite__mapDeps([27,2,1,3])));function da(){return(0,j.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,j.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-2 border-slate-700 border-t-blue-500`})})}function fa(){return(0,j.jsxs)(A.Suspense,{fallback:(0,j.jsx)(da,{}),children:[(0,j.jsx)(ee,{children:(0,j.jsxs)(C,{element:(0,j.jsx)(Ae,{}),children:[(0,j.jsx)(C,{index:!0,element:(0,j.jsx)(Ji,{})}),(0,j.jsx)(C,{path:`chat`,element:(0,j.jsx)(Yi,{})}),(0,j.jsx)(C,{path:`work`,element:(0,j.jsx)(Xi,{})}),(0,j.jsx)(C,{path:`tasks/:id`,element:(0,j.jsx)(Zi,{})}),(0,j.jsx)(C,{path:`plugins`,element:(0,j.jsx)(Qi,{})}),(0,j.jsx)(C,{path:`roles`,element:(0,j.jsx)(ca,{})}),(0,j.jsx)(C,{path:`roles/:id`,element:(0,j.jsx)(la,{})}),(0,j.jsx)(C,{path:`channels`,element:(0,j.jsx)(aa,{})}),(0,j.jsx)(C,{path:`channels/:id`,element:(0,j.jsx)(sa,{})}),(0,j.jsx)(C,{path:`strategies`,element:(0,j.jsx)($i,{})}),(0,j.jsx)(C,{path:`goals`,element:(0,j.jsx)(ea,{})}),(0,j.jsx)(C,{path:`goals/:id`,element:(0,j.jsx)(oa,{})}),(0,j.jsx)(C,{path:`logs`,element:(0,j.jsx)(ta,{})}),(0,j.jsx)(C,{path:`settings`,element:(0,j.jsx)(na,{})}),(0,j.jsx)(C,{path:`memories`,element:(0,j.jsx)(ra,{})}),(0,j.jsx)(C,{path:`evolution`,element:(0,j.jsx)(ia,{})}),(0,j.jsx)(C,{path:`*`,element:(0,j.jsx)(ua,{})})]})}),(0,j.jsx)(qi,{})]})}var pa=v([{path:`*`,element:(0,j.jsx)(fa,{})}],{basename:`/ui`});(0,k.createRoot)(document.getElementById(`root`)).render((0,j.jsx)(A.StrictMode,{children:(0,j.jsx)(re,{children:(0,j.jsx)(S,{router:pa})})}));export{H as C,Me as S,ze as _,Vi as a,G as b,Li as c,Mi as d,Ai as f,He as g,q as h,Bi as i,Ii as l,Xe as m,Wi as n,Fi as o,kt as p,ji as r,zi as s,Ui as t,Ri as u,Le as v,ge as w,W as x,K as y};
@@ -0,0 +1,2 @@
1
+ /*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
2
+ @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-space-x-reverse:0}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace;--color-red-300:oklch(80.8% .114 19.571);--color-red-400:oklch(70.4% .191 22.216);--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-red-800:oklch(44.4% .177 26.899);--color-red-900:oklch(39.6% .141 25.723);--color-red-950:oklch(25.8% .092 26.042);--color-orange-400:oklch(75% .183 55.934);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-200:oklch(92.4% .12 95.746);--color-amber-300:oklch(87.9% .169 91.605);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-amber-700:oklch(55.5% .163 48.998);--color-amber-800:oklch(47.3% .137 46.201);--color-amber-900:oklch(41.4% .112 45.904);--color-amber-950:oklch(27.9% .077 45.635);--color-yellow-300:oklch(90.5% .182 98.111);--color-yellow-400:oklch(85.2% .199 91.936);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-yellow-800:oklch(47.6% .114 61.907);--color-yellow-900:oklch(42.1% .095 57.708);--color-yellow-950:oklch(28.6% .066 53.813);--color-green-300:oklch(87.1% .15 154.449);--color-green-400:oklch(79.2% .209 151.711);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-green-800:oklch(44.8% .119 151.328);--color-green-900:oklch(39.3% .095 152.535);--color-green-950:oklch(26.6% .065 152.934);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-emerald-800:oklch(43.2% .095 166.913);--color-emerald-900:oklch(37.8% .077 168.94);--color-teal-400:oklch(77.7% .152 181.912);--color-cyan-400:oklch(78.9% .154 211.53);--color-blue-200:oklch(88.2% .059 254.128);--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:oklch(70.7% .165 254.624);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-blue-700:oklch(48.8% .243 264.376);--color-blue-800:oklch(42.4% .199 265.638);--color-blue-900:oklch(37.9% .146 265.522);--color-purple-400:oklch(71.4% .203 305.504);--color-pink-400:oklch(71.8% .202 349.761);--color-slate-100:oklch(96.8% .007 247.896);--color-slate-200:oklch(92.9% .013 255.508);--color-slate-300:oklch(86.9% .022 252.894);--color-slate-400:oklch(70.4% .04 256.788);--color-slate-500:oklch(55.4% .046 257.417);--color-slate-600:oklch(44.6% .043 257.281);--color-slate-700:oklch(37.2% .044 257.287);--color-slate-800:oklch(27.9% .041 260.031);--color-slate-900:oklch(20.8% .042 265.755);--color-slate-950:oklch(12.9% .042 264.695);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--container-md:28rem;--container-lg:32rem;--container-2xl:42rem;--container-3xl:48rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-relaxed:1.625;--animate-spin:spin 1s linear infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.end{inset-inline-end:var(--spacing)}.top-1\/2{top:50%}.top-2{top:calc(var(--spacing) * 2)}.top-\[50\%\]{top:50%}.top-full{top:100%}.right-0{right:calc(var(--spacing) * 0)}.right-2{right:calc(var(--spacing) * 2)}.right-4{right:calc(var(--spacing) * 4)}.bottom-4{bottom:calc(var(--spacing) * 4)}.left-2{left:calc(var(--spacing) * 2)}.left-2\.5{left:calc(var(--spacing) * 2.5)}.left-\[50\%\]{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (width>=40rem){.container{max-width:40rem}}@media (width>=48rem){.container{max-width:48rem}}@media (width>=64rem){.container{max-width:64rem}}@media (width>=80rem){.container{max-width:80rem}}@media (width>=96rem){.container{max-width:96rem}}.-mx-1{margin-inline:calc(var(--spacing) * -1)}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:calc(var(--spacing) * 1)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-0\.5{margin-left:calc(var(--spacing) * .5)}.ml-1{margin-left:calc(var(--spacing) * 1)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-3{margin-left:calc(var(--spacing) * 3)}.ml-auto{margin-left:auto}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-64{height:calc(var(--spacing) * 64)}.h-full{height:100%}.h-px{height:1px}.h-screen{height:100vh}.max-h-32{max-height:calc(var(--spacing) * 32)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-64{max-height:calc(var(--spacing) * 64)}.max-h-96{max-height:calc(var(--spacing) * 96)}.max-h-\[80vh\]{max-height:80vh}.max-h-\[calc\(100vh-280px\)\]{max-height:calc(100vh - 280px)}.min-h-0{min-height:calc(var(--spacing) * 0)}.w-0\.5{width:calc(var(--spacing) * .5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-4{width:calc(var(--spacing) * 4)}.w-6{width:calc(var(--spacing) * 6)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-20{width:calc(var(--spacing) * 20)}.w-28{width:calc(var(--spacing) * 28)}.w-48{width:calc(var(--spacing) * 48)}.w-56{width:calc(var(--spacing) * 56)}.w-60{width:calc(var(--spacing) * 60)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[80\%\]{max-width:80%}.max-w-\[120px\]{max-width:120px}.max-w-\[180px\]{max-width:180px}.max-w-\[280px\]{max-width:280px}.max-w-\[300px\]{max-width:300px}.max-w-lg{max-width:var(--container-lg)}.max-w-md{max-width:var(--container-md)}.max-w-sm{max-width:var(--container-sm)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-\[8rem\]{min-width:8rem}.min-w-\[140px\]{min-width:140px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.translate-x-\[-50\%\]{--tw-translate-x:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-y-1\/2{--tw-translate-y:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-y-\[-50\%\]{--tw-translate-y:-50%;translate:var(--tw-translate-x) var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x) var(--tw-scale-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.resize-none{resize:none}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-6{gap:calc(var(--spacing) * 6)}:where(.space-y-0>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 0) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 0) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-6>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 6) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-slate-800\/50>:not(:last-child)){border-color:#1d293d80}@supports (color:color-mix(in lab, red, red)){:where(.divide-slate-800\/50>:not(:last-child)){border-color:color-mix(in oklab, var(--color-slate-800) 50%, transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) * .8)}.rounded-sm{border-radius:calc(var(--radius) * .6)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-amber-700{border-color:var(--color-amber-700)}.border-amber-800{border-color:var(--color-amber-800)}.border-amber-900\/50{border-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.border-amber-900\/50{border-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.border-blue-600{border-color:var(--color-blue-600)}.border-blue-800{border-color:var(--color-blue-800)}.border-blue-800\/50{border-color:#193cb880}@supports (color:color-mix(in lab, red, red)){.border-blue-800\/50{border-color:color-mix(in oklab, var(--color-blue-800) 50%, transparent)}}.border-emerald-800{border-color:var(--color-emerald-800)}.border-green-600{border-color:var(--color-green-600)}.border-green-800{border-color:var(--color-green-800)}.border-red-500{border-color:var(--color-red-500)}.border-red-500\/40{border-color:#fb2c3666}@supports (color:color-mix(in lab, red, red)){.border-red-500\/40{border-color:color-mix(in oklab, var(--color-red-500) 40%, transparent)}}.border-red-800{border-color:var(--color-red-800)}.border-slate-600{border-color:var(--color-slate-600)}.border-slate-700{border-color:var(--color-slate-700)}.border-slate-800{border-color:var(--color-slate-800)}.border-transparent{border-color:#0000}.border-yellow-600{border-color:var(--color-yellow-600)}.border-yellow-800{border-color:var(--color-yellow-800)}.border-t-blue-500{border-top-color:var(--color-blue-500)}.bg-amber-900\/50{background-color:#7b330680}@supports (color:color-mix(in lab, red, red)){.bg-amber-900\/50{background-color:color-mix(in oklab, var(--color-amber-900) 50%, transparent)}}.bg-amber-950{background-color:var(--color-amber-950)}.bg-amber-950\/20{background-color:#46190133}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/20{background-color:color-mix(in oklab, var(--color-amber-950) 20%, transparent)}}.bg-amber-950\/30{background-color:#4619014d}@supports (color:color-mix(in lab, red, red)){.bg-amber-950\/30{background-color:color-mix(in oklab, var(--color-amber-950) 30%, transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab, red, red)){.bg-black\/60{background-color:color-mix(in oklab, var(--color-black) 60%, transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab, red, red)){.bg-black\/80{background-color:color-mix(in oklab, var(--color-black) 80%, transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-blue-600{background-color:var(--color-blue-600)}.bg-blue-900\/30{background-color:#1c398e4d}@supports (color:color-mix(in lab, red, red)){.bg-blue-900\/30{background-color:color-mix(in oklab, var(--color-blue-900) 30%, transparent)}}.bg-blue-900\/50{background-color:#1c398e80}@supports (color:color-mix(in lab, red, red)){.bg-blue-900\/50{background-color:color-mix(in oklab, var(--color-blue-900) 50%, transparent)}}.bg-emerald-500{background-color:var(--color-emerald-500)}.bg-emerald-900\/50{background-color:#004e3b80}@supports (color:color-mix(in lab, red, red)){.bg-emerald-900\/50{background-color:color-mix(in oklab, var(--color-emerald-900) 50%, transparent)}}.bg-green-500{background-color:var(--color-green-500)}.bg-green-900\/30{background-color:#0d542b4d}@supports (color:color-mix(in lab, red, red)){.bg-green-900\/30{background-color:color-mix(in oklab, var(--color-green-900) 30%, transparent)}}.bg-green-950{background-color:var(--color-green-950)}.bg-orange-500{background-color:var(--color-orange-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-red-500\/10{background-color:#fb2c361a}@supports (color:color-mix(in lab, red, red)){.bg-red-500\/10{background-color:color-mix(in oklab, var(--color-red-500) 10%, transparent)}}.bg-red-600{background-color:var(--color-red-600)}.bg-red-900\/30{background-color:#82181a4d}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/30{background-color:color-mix(in oklab, var(--color-red-900) 30%, transparent)}}.bg-red-900\/50{background-color:#82181a80}@supports (color:color-mix(in lab, red, red)){.bg-red-900\/50{background-color:color-mix(in oklab, var(--color-red-900) 50%, transparent)}}.bg-red-950{background-color:var(--color-red-950)}.bg-red-950\/10{background-color:#4608091a}@supports (color:color-mix(in lab, red, red)){.bg-red-950\/10{background-color:color-mix(in oklab, var(--color-red-950) 10%, transparent)}}.bg-red-950\/30{background-color:#4608094d}@supports (color:color-mix(in lab, red, red)){.bg-red-950\/30{background-color:color-mix(in oklab, var(--color-red-950) 30%, transparent)}}.bg-slate-500{background-color:var(--color-slate-500)}.bg-slate-700{background-color:var(--color-slate-700)}.bg-slate-800{background-color:var(--color-slate-800)}.bg-slate-800\/30{background-color:#1d293d4d}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/30{background-color:color-mix(in oklab, var(--color-slate-800) 30%, transparent)}}.bg-slate-800\/50{background-color:#1d293d80}@supports (color:color-mix(in lab, red, red)){.bg-slate-800\/50{background-color:color-mix(in oklab, var(--color-slate-800) 50%, transparent)}}.bg-slate-900{background-color:var(--color-slate-900)}.bg-slate-900\/50{background-color:#0f172b80}@supports (color:color-mix(in lab, red, red)){.bg-slate-900\/50{background-color:color-mix(in oklab, var(--color-slate-900) 50%, transparent)}}.bg-slate-950{background-color:var(--color-slate-950)}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-400{background-color:var(--color-yellow-400)}.bg-yellow-500{background-color:var(--color-yellow-500)}.bg-yellow-950{background-color:var(--color-yellow-950)}.bg-yellow-950\/50{background-color:#43200480}@supports (color:color-mix(in lab, red, red)){.bg-yellow-950\/50{background-color:color-mix(in oklab, var(--color-yellow-950) 50%, transparent)}}.fill-current{fill:currentColor}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:calc(var(--spacing) * 1)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-6{padding:calc(var(--spacing) * 6)}.p-8{padding:calc(var(--spacing) * 8)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-16{padding-block:calc(var(--spacing) * 16)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pr-2{padding-right:calc(var(--spacing) * 2)}.pr-3{padding-right:calc(var(--spacing) * 3)}.pr-8{padding-right:calc(var(--spacing) * 8)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pl-2{padding-left:calc(var(--spacing) * 2)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.leading-5{--tw-leading:calc(var(--spacing) * 5);line-height:calc(var(--spacing) * 5)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-amber-200{color:var(--color-amber-200)}.text-amber-300{color:var(--color-amber-300)}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-blue-200\/60{color:#bedbff99}@supports (color:color-mix(in lab, red, red)){.text-blue-200\/60{color:color-mix(in oklab, var(--color-blue-200) 60%, transparent)}}.text-blue-300{color:var(--color-blue-300)}.text-blue-400{color:var(--color-blue-400)}.text-blue-500{color:var(--color-blue-500)}.text-cyan-400{color:var(--color-cyan-400)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-500{color:var(--color-emerald-500)}.text-green-300{color:var(--color-green-300)}.text-green-400{color:var(--color-green-400)}.text-green-500{color:var(--color-green-500)}.text-orange-400{color:var(--color-orange-400)}.text-pink-400{color:var(--color-pink-400)}.text-purple-400{color:var(--color-purple-400)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-red-500{color:var(--color-red-500)}.text-slate-100{color:var(--color-slate-100)}.text-slate-200{color:var(--color-slate-200)}.text-slate-300{color:var(--color-slate-300)}.text-slate-400{color:var(--color-slate-400)}.text-slate-500{color:var(--color-slate-500)}.text-slate-600{color:var(--color-slate-600)}.text-teal-400{color:var(--color-teal-400)}.text-white{color:var(--color-white)}.text-yellow-300{color:var(--color-yellow-300)}.text-yellow-400{color:var(--color-yellow-400)}.text-yellow-500{color:var(--color-yellow-500)}.capitalize{text-transform:capitalize}.uppercase{text-transform:uppercase}.italic{font-style:italic}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.placeholder-slate-500::placeholder{color:var(--color-slate-500)}.placeholder-slate-600::placeholder{color:var(--color-slate-600)}.opacity-0{opacity:0}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a), 0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-0{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-red-400{--tw-ring-color:var(--color-red-400)}.ring-offset-slate-950{--tw-ring-offset-color:var(--color-slate-950)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.animate-in{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.duration-200{animation-duration:.2s}.fade-in-0{--tw-enter-opacity:0}.paused{animation-play-state:paused}.running{animation-play-state:running}.slide-in-from-left-1\/2{--tw-enter-translate-x:-50%}.slide-in-from-top-\[48\%\]{--tw-enter-translate-y:-48%}.slide-out-to-left-1\/2{--tw-exit-translate-x:-50%}.slide-out-to-top-\[48\%\]{--tw-exit-translate-y:-48%}.zoom-in-95{--tw-enter-scale:.95}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}.group-hover\/install\:block:is(:where(.group\/install):hover *){display:block}}.group-\[\.toast\]\:bg-blue-600:is(:where(.group).toast *){background-color:var(--color-blue-600)}.group-\[\.toast\]\:bg-slate-800:is(:where(.group).toast *){background-color:var(--color-slate-800)}.group-\[\.toast\]\:text-slate-200:is(:where(.group).toast *){color:var(--color-slate-200)}.group-\[\.toast\]\:text-slate-400:is(:where(.group).toast *){color:var(--color-slate-400)}.group-\[\.toast\]\:text-white:is(:where(.group).toast *){color:var(--color-white)}.group-\[\.toaster\]\:border-slate-800:is(:where(.group).toaster *){border-color:var(--color-slate-800)}.group-\[\.toaster\]\:bg-slate-900:is(:where(.group).toaster *){background-color:var(--color-slate-900)}.group-\[\.toaster\]\:text-slate-200:is(:where(.group).toaster *){color:var(--color-slate-200)}.group-\[\.toaster\]\:shadow-lg:is(:where(.group).toaster *){--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.placeholder\:text-slate-500::placeholder{color:var(--color-slate-500)}.placeholder\:text-slate-600::placeholder{color:var(--color-slate-600)}@media (hover:hover){.hover\:border-slate-400:hover{border-color:var(--color-slate-400)}.hover\:border-slate-600:hover{border-color:var(--color-slate-600)}.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-green-900:hover{background-color:var(--color-green-900)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-red-700:hover{background-color:var(--color-red-700)}.hover\:bg-slate-700:hover{background-color:var(--color-slate-700)}.hover\:bg-slate-800:hover{background-color:var(--color-slate-800)}.hover\:bg-slate-800\/30:hover{background-color:#1d293d4d}@supports (color:color-mix(in lab, red, red)){.hover\:bg-slate-800\/30:hover{background-color:color-mix(in oklab, var(--color-slate-800) 30%, transparent)}}.hover\:bg-slate-800\/50:hover{background-color:#1d293d80}@supports (color:color-mix(in lab, red, red)){.hover\:bg-slate-800\/50:hover{background-color:color-mix(in oklab, var(--color-slate-800) 50%, transparent)}}.hover\:bg-slate-900:hover{background-color:var(--color-slate-900)}.hover\:bg-yellow-900:hover{background-color:var(--color-yellow-900)}.hover\:text-amber-200:hover{color:var(--color-amber-200)}.hover\:text-amber-300:hover{color:var(--color-amber-300)}.hover\:text-amber-400:hover{color:var(--color-amber-400)}.hover\:text-blue-300:hover{color:var(--color-blue-300)}.hover\:text-emerald-400:hover{color:var(--color-emerald-400)}.hover\:text-green-300:hover{color:var(--color-green-300)}.hover\:text-red-300:hover{color:var(--color-red-300)}.hover\:text-red-400:hover{color:var(--color-red-400)}.hover\:text-slate-100:hover{color:var(--color-slate-100)}.hover\:text-slate-200:hover{color:var(--color-slate-200)}.hover\:text-slate-300:hover{color:var(--color-slate-300)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:fixed:focus{position:fixed}.focus\:top-4:focus{top:calc(var(--spacing) * 4)}.focus\:left-4:focus{left:calc(var(--spacing) * 4)}.focus\:z-50:focus{z-index:50}.focus\:rounded-md:focus{border-radius:calc(var(--radius) * .8)}.focus\:border-blue-500:focus{border-color:var(--color-blue-500)}.focus\:bg-blue-600:focus{background-color:var(--color-blue-600)}.focus\:bg-slate-800:focus{background-color:var(--color-slate-800)}.focus\:px-4:focus{padding-inline:calc(var(--spacing) * 4)}.focus\:py-2:focus{padding-block:calc(var(--spacing) * 2)}.focus\:text-sm:focus{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.focus\:font-medium:focus{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.focus\:text-slate-100:focus{color:var(--color-slate-100)}.focus\:text-white:focus{color:var(--color-white)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-2:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-blue-500:focus{--tw-ring-color:var(--color-blue-500)}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus\:ring-offset-slate-900:focus{--tw-ring-offset-color:var(--color-slate-900)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.focus-visible\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\:ring-offset-slate-900:focus-visible{--tw-ring-offset-color:var(--color-slate-900)}.focus-visible\:ring-offset-slate-950:focus-visible{--tw-ring-offset-color:var(--color-slate-950)}.focus-visible\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\:bg-blue-700:active{background-color:var(--color-blue-700)}.active\:bg-red-700:active{background-color:var(--color-red-700)}.active\:bg-slate-600:active{background-color:var(--color-slate-600)}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:.5rem}.data-\[state\=active\]\:bg-slate-900[data-state=active]{background-color:var(--color-slate-900)}.data-\[state\=active\]\:text-slate-100[data-state=active]{color:var(--color-slate-100)}.data-\[state\=active\]\:shadow[data-state=active]{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.data-\[state\=checked\]\:translate-x-4[data-state=checked]{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=checked\]\:bg-blue-600[data-state=checked]{background-color:var(--color-blue-600)}.data-\[state\=closed\]\:animate-out[data-state=closed]{--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial;animation-name:exit;animation-duration:.15s}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:bg-slate-800[data-state=open]{background-color:var(--color-slate-800)}.data-\[state\=open\]\:animate-in[data-state=open]{--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial;animation-name:enter;animation-duration:.15s}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity:0}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked]{--tw-translate-x:calc(var(--spacing) * 0);translate:var(--tw-translate-x) var(--tw-translate-y)}.data-\[state\=unchecked\]\:bg-slate-700[data-state=unchecked]{background-color:var(--color-slate-700)}@media (width>=40rem){.sm\:mt-0{margin-top:calc(var(--spacing) * 0)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:justify-end{justify-content:flex-end}:where(.sm\:space-x-2>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-start:calc(calc(var(--spacing) * 2) * var(--tw-space-x-reverse));margin-inline-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}}@media (width>=48rem){.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}}@media (width>=64rem){.lg\:block{display:block}.lg\:hidden{display:none}.lg\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.lg\:p-6{padding:calc(var(--spacing) * 6)}}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}}:root{--background:oklch(100% 0 0);--foreground:oklch(14.5% 0 0);--card:oklch(100% 0 0);--card-foreground:oklch(14.5% 0 0);--popover:oklch(100% 0 0);--popover-foreground:oklch(14.5% 0 0);--primary:oklch(20.5% 0 0);--primary-foreground:oklch(98.5% 0 0);--secondary:oklch(97% 0 0);--secondary-foreground:oklch(20.5% 0 0);--muted:oklch(97% 0 0);--muted-foreground:oklch(55.6% 0 0);--accent:oklch(97% 0 0);--accent-foreground:oklch(20.5% 0 0);--destructive:oklch(57.7% .245 27.325);--border:oklch(92.2% 0 0);--input:oklch(92.2% 0 0);--ring:oklch(70.8% 0 0);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--radius:.625rem;--sidebar:oklch(98.5% 0 0);--sidebar-foreground:oklch(14.5% 0 0);--sidebar-primary:oklch(20.5% 0 0);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(97% 0 0);--sidebar-accent-foreground:oklch(20.5% 0 0);--sidebar-border:oklch(92.2% 0 0);--sidebar-ring:oklch(70.8% 0 0)}.dark{--background:oklch(14.5% 0 0);--foreground:oklch(98.5% 0 0);--card:oklch(20.5% 0 0);--card-foreground:oklch(98.5% 0 0);--popover:oklch(20.5% 0 0);--popover-foreground:oklch(98.5% 0 0);--primary:oklch(92.2% 0 0);--primary-foreground:oklch(20.5% 0 0);--secondary:oklch(26.9% 0 0);--secondary-foreground:oklch(98.5% 0 0);--muted:oklch(26.9% 0 0);--muted-foreground:oklch(70.8% 0 0);--accent:oklch(26.9% 0 0);--accent-foreground:oklch(98.5% 0 0);--destructive:oklch(70.4% .191 22.216);--border:oklch(100% 0 0/.1);--input:oklch(100% 0 0/.15);--ring:oklch(55.6% 0 0);--chart-1:oklch(87% 0 0);--chart-2:oklch(55.6% 0 0);--chart-3:oklch(43.9% 0 0);--chart-4:oklch(37.1% 0 0);--chart-5:oklch(26.9% 0 0);--sidebar:oklch(20.5% 0 0);--sidebar-foreground:oklch(98.5% 0 0);--sidebar-primary:oklch(48.8% .243 264.376);--sidebar-primary-foreground:oklch(98.5% 0 0);--sidebar-accent:oklch(26.9% 0 0);--sidebar-accent-foreground:oklch(98.5% 0 0);--sidebar-border:oklch(100% 0 0/.1);--sidebar-ring:oklch(55.6% 0 0)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif}::-webkit-scrollbar{width:6px;height:6px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-slate-700);border-radius:3px}::-webkit-scrollbar-thumb:hover{background:var(--color-slate-600)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0), var(--tw-enter-translate-y,0), 0) scale3d(var(--tw-enter-scale,1), var(--tw-enter-scale,1), var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0), var(--tw-exit-translate-y,0), 0) scale3d(var(--tw-exit-scale,1), var(--tw-exit-scale,1), var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-space-x-reverse{syntax:"*";inherits:false;initial-value:0}@keyframes spin{to{transform:rotate(360deg)}}