adam-agent-server 1.18.0 → 1.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{App-SIQUVFJY.js → App-522DTURQ.js} +10 -10
- package/dist/approval-handler-S3NV7OPO.js +1 -0
- package/dist/{artifacts-MAYKOTA2.js → artifacts-NFMM3ORE.js} +1 -1
- package/dist/audit-diagnostics-IHU3CJYZ.js +1 -0
- package/dist/audit-manager-MUMEEP3C.js +1 -0
- package/dist/bree-engine-EEKUQA3U.js +1 -0
- package/dist/channels-IDBWHLLE.js +1 -0
- package/dist/{channels-2TWTBE6Y.js → channels-ZHCTFSDA.js} +1 -1
- package/dist/chat-tool-calls-4BQWZCJH.js +1 -0
- package/dist/{chunk-Z2APBKIT.js → chunk-2JM3URDG.js} +1 -1
- package/dist/{chunk-OBD4245G.js → chunk-4G4CKAXY.js} +1 -1
- package/dist/{chunk-2CE2WUUZ.js → chunk-4ZESWP3J.js} +1 -1
- package/dist/{chunk-QYI44EP6.js → chunk-4ZG4UMAK.js} +1 -1
- package/dist/{chunk-BE653A45.js → chunk-6GYNUTPP.js} +1 -1
- package/dist/{chunk-JROGEBP5.js → chunk-76MMY2XC.js} +1 -1
- package/dist/{chunk-BMCNQGUH.js → chunk-7QT2ZX3K.js} +1 -1
- package/dist/{chunk-SGLZAIVL.js → chunk-A3YUIWLK.js} +1 -1
- package/dist/{chunk-HL373H4P.js → chunk-AMJJ2WGU.js} +1 -1
- package/dist/{chunk-NUOTFUNF.js → chunk-CN5NEJXG.js} +1 -1
- package/dist/{chunk-O6L4UVLV.js → chunk-DFTRUOT6.js} +1 -1
- package/dist/{chunk-JYZTIE2J.js → chunk-DRS5NOAA.js} +1 -1
- package/dist/{chunk-6WQFYV3N.js → chunk-EBZCHLYS.js} +1 -1
- package/dist/{chunk-SKHMWKJT.js → chunk-EPLSB63A.js} +1 -1
- package/dist/{chunk-V2MMQ3SH.js → chunk-FN64ZULV.js} +1 -1
- package/dist/chunk-FQHGIY3E.js +1 -0
- package/dist/{chunk-NSUXJ2VA.js → chunk-GQS3ED3B.js} +1 -1
- package/dist/{chunk-LKGYQJMS.js → chunk-HEHST2E2.js} +1 -1
- package/dist/chunk-IAGTZGGV.js +32 -0
- package/dist/chunk-ITVCPC7G.js +1 -0
- package/dist/{chunk-NXGR3PRY.js → chunk-J2VSAXVU.js} +1 -1
- package/dist/{chunk-5G64P4KE.js → chunk-JRRNGKDK.js} +1 -1
- package/dist/{chunk-KS24764D.js → chunk-JVYSSJKT.js} +2 -2
- package/dist/chunk-JXZCQ5XW.js +1 -0
- package/dist/{chunk-LCD5DVS6.js → chunk-KM4EFB4N.js} +1 -1
- package/dist/chunk-KQMKRRYW.js +143 -0
- package/dist/{chunk-4JHACUZY.js → chunk-L4APYD5A.js} +1 -1
- package/dist/{chunk-WY5BOCQP.js → chunk-LMQPGVM7.js} +16 -16
- package/dist/chunk-MMVDXKYS.js +14 -0
- package/dist/chunk-NKS7LEA7.js +182 -0
- package/dist/{chunk-VWX2B6OM.js → chunk-ORFLN4BF.js} +1 -1
- package/dist/{chunk-2JIQT2CI.js → chunk-PO66F7UQ.js} +1 -1
- package/dist/{chunk-XAPJJAJQ.js → chunk-QJXV4SQE.js} +1 -1
- package/dist/{chunk-UCUELFCS.js → chunk-R7Q6FSV4.js} +1 -1
- package/dist/{chunk-47HJPIUA.js → chunk-T7EKW3B7.js} +1 -1
- package/dist/{chunk-JZBXLN7M.js → chunk-VOH52UDS.js} +1 -1
- package/dist/{chunk-HRPMRWHD.js → chunk-VZL2DGC4.js} +1 -1
- package/dist/{chunk-IEBAOZED.js → chunk-WDMSZS4W.js} +1 -1
- package/dist/{chunk-2A2TXYT3.js → chunk-WG3C43QS.js} +3 -3
- package/dist/{chunk-TA5PFK5C.js → chunk-YEGUFMLJ.js} +1 -1
- package/dist/{chunk-ZQN6JZIJ.js → chunk-ZGA52HRD.js} +1 -1
- package/dist/cli.js +2 -2
- package/dist/{config-U624HJKI.js → config-GOJLI3X2.js} +1 -1
- package/dist/config-Z6KFEFJO.js +1 -0
- package/dist/db-ROXIYW5B.js +1 -0
- package/dist/{delivery-log-QMQQHES4.js → delivery-log-TGJZ5HU7.js} +1 -1
- package/dist/engine-GN7PJPGQ.js +1 -0
- package/dist/{evolution-audit-XF4KZZMP.js → evolution-audit-TFJF666X.js} +1 -1
- package/dist/execution-tools-BQD2O25X.js +1 -0
- package/dist/{external-api-435WH6V3.js → external-api-DSLQDRZ2.js} +1 -1
- package/dist/index.js +41 -39
- package/dist/{learner-4CJ7BSCN.js → learner-ACBX3GI7.js} +1 -1
- package/dist/{memories-NJFKSOL5.js → memories-RAIR5O2F.js} +1 -1
- package/dist/{memory-extractor-UQI75BBK.js → memory-extractor-A6CAOFOX.js} +1 -1
- package/dist/{memory-gc-NTZVUGJX.js → memory-gc-W63MGSDH.js} +1 -1
- package/dist/memory-service-H4OFUNCF.js +1 -0
- package/dist/outbound-gateway-LKRQYPA2.js +1 -0
- package/dist/presets-FO6RSGDN.js +1 -0
- package/dist/{reflection-job-F4BZA2E3.js → reflection-job-XC2F7GTT.js} +1 -1
- package/dist/role-presets-SDA664QG.js +1 -0
- package/dist/role-workspace-NGJEJG3H.js +1 -0
- package/dist/{roles-WDMUBWQP.js → roles-LZCJ7QFS.js} +1 -1
- package/dist/{session-manager-XFUKWEC7.js → session-manager-PU4GH3E4.js} +1 -1
- package/dist/skill-registry-XKLE2LXU.js +1 -0
- package/dist/{task-templates-BIVCRNXA.js → task-templates-52LAC6OA.js} +1 -1
- package/dist/template-dispatch-PJFSWEO2.js +1 -0
- package/package.json +1 -1
- package/web/dist/assets/{ChannelDetail-D0FBZoAX.js → ChannelDetail-CSq9o5fq.js} +1 -1
- package/web/dist/assets/{Channels-Cztxvsa2.js → Channels-CAxTh1Bp.js} +1 -1
- package/web/dist/assets/Chat-PUz41HFr.js +2 -0
- package/web/dist/assets/{Cost-K8-4xqBe.js → Cost-BHcsPz5T.js} +1 -1
- package/web/dist/assets/{Dashboard-BXqFb_Vr.js → Dashboard-BT39_iWc.js} +1 -1
- package/web/dist/assets/{EnvVarEditor-FiiJazzp.js → EnvVarEditor-D_1d7bTJ.js} +1 -1
- package/web/dist/assets/{EventDefDetail-C3S1G0K8.js → EventDefDetail-jKN3gO_7.js} +1 -1
- package/web/dist/assets/{Events-BKxqZ9j6.js → Events-CpeHg3fh.js} +1 -1
- package/web/dist/assets/{Evolution-DFcSm6Rw.js → Evolution-DsWyv2_a.js} +1 -1
- package/web/dist/assets/{ExtensionDetail-C8aPpyLv.js → ExtensionDetail-CJHNaNii.js} +1 -1
- package/web/dist/assets/{Extensions-MLZk05j0.js → Extensions-Pg2vx_ZK.js} +1 -1
- package/web/dist/assets/{FeatureRequests-D_4XaQ7F.js → FeatureRequests-3Yl8wTNT.js} +1 -1
- package/web/dist/assets/{GoalDetail-DVU7c0aR.js → GoalDetail-L3T1zqqs.js} +1 -1
- package/web/dist/assets/{Goals-D3h4WMjU.js → Goals-B-__r-Yq.js} +1 -1
- package/web/dist/assets/{Logs-D5MQv6Yw.js → Logs-CMkjUkmu.js} +1 -1
- package/web/dist/assets/{Memories-Dls71I2i.js → Memories-Q1eKfPQ2.js} +1 -1
- package/web/dist/assets/{Mistakes-BZcTg0vP.js → Mistakes-BROkixt_.js} +1 -1
- package/web/dist/assets/{Plugins-CwCHGzI6.js → Plugins-v17MyPVe.js} +1 -1
- package/web/dist/assets/{RoleDetail-B2M6ALSl.js → RoleDetail-DCGFBLP1.js} +2 -2
- package/web/dist/assets/{Roles-FEHqm_Jf.js → Roles-C7SNebvY.js} +1 -1
- package/web/dist/assets/{Settings-rdVQMfqX.js → Settings-QuKwKbKg.js} +1 -1
- package/web/dist/assets/{Strategies-CwJ9JQ-X.js → Strategies-CXQYvCkc.js} +1 -1
- package/web/dist/assets/{Switch-1JjR4Imr.js → Switch--h1rqagh.js} +1 -1
- package/web/dist/assets/{TaskDetail-h12WxjfG.js → TaskDetail-B0G5ZjDD.js} +1 -1
- package/web/dist/assets/{Work-CfzFRSZX.js → Work-DbFst_9-.js} +1 -1
- package/web/dist/assets/index-D35OGE0z.css +2 -0
- package/web/dist/assets/{index-CXEJd-0s.js → index-Dd3NDYZR.js} +2 -2
- package/web/dist/assets/{usePluginsWithUsage-4iLJAPjH.js → usePluginsWithUsage-DpTxJuFQ.js} +1 -1
- package/web/dist/index.html +2 -2
- package/dist/approval-handler-BWA7UIKN.js +0 -1
- package/dist/audit-diagnostics-K3LUWXTI.js +0 -1
- package/dist/audit-manager-6WL2V6JG.js +0 -1
- package/dist/bree-engine-KYD4GKQK.js +0 -1
- package/dist/channels-PWDSTYNR.js +0 -1
- package/dist/chat-tool-calls-WJDFQ54U.js +0 -1
- package/dist/chunk-3UFEOB6P.js +0 -143
- package/dist/chunk-MTRLUW7Z.js +0 -1
- package/dist/chunk-QTGAK62Z.js +0 -14
- package/dist/chunk-TWOJVEO7.js +0 -32
- package/dist/chunk-VO24C673.js +0 -1
- package/dist/chunk-VPMHZJS2.js +0 -1
- package/dist/chunk-ZJ3TS4FL.js +0 -182
- package/dist/config-X7A6NA73.js +0 -1
- package/dist/db-XODNIJSJ.js +0 -1
- package/dist/engine-OQXDHA2R.js +0 -1
- package/dist/execution-tools-BR4T4MMW.js +0 -1
- package/dist/memory-service-3RLVOF2C.js +0 -1
- package/dist/outbound-gateway-NJNSN2ZX.js +0 -1
- package/dist/presets-SUJRFRJC.js +0 -1
- package/dist/role-presets-VEYTGYA4.js +0 -1
- package/dist/role-workspace-AIVHPX5P.js +0 -1
- package/dist/skill-registry-LARMNUT5.js +0 -1
- package/dist/template-dispatch-6FPJQN6A.js +0 -1
- package/web/dist/assets/Chat-Ce72TtUi.js +0 -2
- package/web/dist/assets/index-CarTGiGO.css +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/Dashboard-BT39_iWc.js","assets/rolldown-runtime-Dw2cE7zH.js","assets/vendor-react-bQ_cvNuA.js","assets/vendor-icons-Bc_e_XXa.js","assets/vendor-state-BMVR_B0I.js","assets/PageHeader-acLQTYct.js","assets/dist-CgGno8kE.js","assets/SectionHeader-NZWZgoOs.js","assets/Card-Cwvv0An8.js","assets/format-ZWN4JNj-.js","assets/Chat-PUz41HFr.js","assets/Button-CRNb8sD3.js","assets/EmptyState-BvQA1o5K.js","assets/api-BP4ZP9kk.js","assets/ui-D1crlGpt.js","assets/useIsMobileLayout-BogOiFTv.js","assets/Work-DbFst_9-.js","assets/es2015-BkFSNOYE.js","assets/Tabs-DWk9HyNd.js","assets/Switch--h1rqagh.js","assets/Goals-B-__r-Yq.js","assets/Table-CvSmzzkm.js","assets/TaskDetail-B0G5ZjDD.js","assets/ArtifactDetail-DDTEAl2E.js","assets/Plugins-v17MyPVe.js","assets/usePluginsWithUsage-DpTxJuFQ.js","assets/Strategies-CXQYvCkc.js","assets/Logs-CMkjUkmu.js","assets/Settings-QuKwKbKg.js","assets/EnvVarEditor-D_1d7bTJ.js","assets/Memories-Q1eKfPQ2.js","assets/Evolution-DsWyv2_a.js","assets/Channels-CAxTh1Bp.js","assets/GoalDetail-L3T1zqqs.js","assets/ChannelDetail-CSq9o5fq.js","assets/Roles-C7SNebvY.js","assets/RoleDetail-DCGFBLP1.js","assets/LineChart-Ck1vfYHs.js","assets/FeatureRequests-3Yl8wTNT.js","assets/Mistakes-BROkixt_.js","assets/NotFound-t66RIvqO.js","assets/Events-CpeHg3fh.js","assets/EventDefDetail-jKN3gO_7.js","assets/Extensions-Pg2vx_ZK.js","assets/ExtensionDetail-CJHNaNii.js","assets/Artifacts-BrhnC1Ef.js","assets/Cost-BHcsPz5T.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{B as t,E as n,H as r,I as i,L as a,N as o,T as s,V as c,c as l,ct as u,gt as d,h as f,i as p,lt as m,m as h,n as g,p as _,q as v,r as y,t as b,xt as x,y as S,yt as C}from"./vendor-icons-Bc_e_XXa.js";import{a as w,c as T,h as E,i as D,m as O,n as k,o as A,p as j,s as M,t as N,u as ee}from"./vendor-react-bQ_cvNuA.js";import{n as P,r as te,t as ne}from"./dist-CgGno8kE.js";import{_ as re,a as ie,c as ae,d as oe,f as F,g as se,h as ce,i as le,l as I,m as ue,n as de,o as L,r as fe,s as pe,t as me,u as he,v as R}from"./es2015-BkFSNOYE.js";import{i as z,n as ge,t as _e}from"./Button-CRNb8sD3.js";import{n as ve}from"./vendor-state-BMVR_B0I.js";import{T as ye,a as be,b as xe,d as Se,t as B,v as Ce}from"./api-BP4ZP9kk.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 we=O(),V=e(x(),1),H=N(),Te=class extends V.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,H.jsx)(`div`,{className:`flex h-screen items-center justify-center bg-[var(--app-canvas)] p-6`,children:(0,H.jsxs)(`div`,{className:`w-full max-w-md rounded-lg border border-[var(--app-border)] bg-[var(--app-panel)] p-8 text-center`,children:[(0,H.jsx)(`div`,{className:`mx-auto mb-4 flex h-12 w-12 items-center justify-center rounded-full bg-[var(--app-danger)]/10`,children:(0,H.jsx)(`svg`,{className:`h-6 w-6 text-[var(--app-danger)]`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,H.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,H.jsx)(`h1`,{className:`mb-2 text-lg font-semibold text-[var(--app-text)]`,children:`Something went wrong`}),(0,H.jsx)(`p`,{className:`mb-6 text-sm text-[var(--app-text-muted)]`,children:`An unexpected error occurred. Try reloading the page.`}),this.state.error&&(0,H.jsx)(`pre`,{className:`mb-6 max-h-32 overflow-auto rounded bg-[var(--app-canvas)] p-3 text-left text-xs text-[var(--app-danger)]`,children:this.state.error.message}),(0,H.jsx)(`button`,{onClick:()=>window.location.reload(),className:`rounded-md bg-[var(--app-accent)] px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-[var(--app-accent)] focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 focus:ring-offset-[var(--app-canvas)]`,children:`Reload`})]})}):this.props.children}},Ee=[{to:`/`,icon:r,label:`Dashboard`,description:`Live system overview and operational focus.`},{to:`/chat`,icon:i,label:`Chat`,description:`Start a session, monitor execution, and review responses.`},{to:`/work`,icon:t,label:`Work`,description:`Tasks, automations, and goals in one work surface.`},{to:`/roles`,icon:u,label:`Roles`,description:`Role definitions, prompts, permissions, and health.`},{to:`/events`,icon:b,label:`Events`,description:`Event definitions that trigger automations.`},{to:`/strategies`,icon:c,label:`Strategies`,description:`Evaluate and adjust strategy records.`},{to:`/channels`,icon:s,label:`Channels`,description:`Delivery targets, sessions, and routing rules.`},{to:`/artifacts`,icon:C,label:`Artifacts`,description:`All files produced by tasks.`},{to:`/goals`,icon:h,label:`Goals`,description:`Long-running outcomes, budgets, and delivery targets.`},{to:`/feature-requests`,icon:f,label:`Feature Requests`,description:`Unmet needs extracted from chat sessions.`},{to:`/mistakes`,icon:l,label:`Mistakes`,description:`Cross-role failure patterns extracted from audit data.`},{to:`/memories`,icon:d,label:`Memories`,description:`Query memory records and retention patterns.`},{to:`/evolution`,icon:v,label:`Evolution`,description:`Review learning history and rule updates.`},{to:`/cost`,icon:m,label:`Cost`,description:`Platform LLM spend by model, role, source, and date.`},{to:`/plugins`,icon:n,label:`Plugins`,description:`Installed plugins, scope, and activation state.`},{to:`/extensions`,icon:o,label:`Extensions`,description:`MCP extension packages, manifests, and Role bindings.`},{to:`/logs`,icon:_,label:`Logs`,description:`Observe runtime events and system diagnostics.`},{to:`/settings`,icon:S,label:`Settings`,description:`Server, model, and environment configuration.`}],De=[{test:e=>/^\/tasks\/[^/]+$/.test(e),meta:{title:`Task Detail`,description:`Summary, execution, results, and diagnostics for a single task.`,section:`Work`}},{test:e=>/^\/roles\/[^/]+$/.test(e),meta:{title:`Role Detail`,description:`Role configuration, memory, scores, and activity history.`,section:`Identities`}},{test:e=>/^\/channels\/[^/]+$/.test(e),meta:{title:`Channel Detail`,description:`Channel delivery rules, bindings, and recent activity.`,section:`Delivery`}},{test:e=>/^\/goals\/[^/]+$/.test(e),meta:{title:`Goal Detail`,description:`Goal progress, budgets, and related orchestration state.`,section:`Operations`}}];function Oe(e){let t=Ee.find(t=>t.to===e);if(t)return{title:t.label,description:t.description,section:{"/":`Overview`,"/chat":`Sessions`,"/work":`Operations`,"/roles":`Identities`,"/events":`Control Plane`,"/strategies":`Decision Engine`,"/channels":`Delivery`,"/artifacts":`Delivery`,"/goals":`Operations`,"/feature-requests":`Intelligence`,"/mistakes":`Intelligence`,"/memories":`Knowledge`,"/evolution":`Learning`,"/cost":`Cost`,"/plugins":`Capabilities`,"/extensions":`Capabilities`,"/logs":`Diagnostics`,"/settings":`Configuration`}[e]??`Control Plane`};let n=De.find(t=>t.test(e));return n?n.meta:{title:`Adam`,description:`Control plane for tasks, roles, channels, and delivery.`,section:`Control Plane`}}var ke=[`top`,`right`,`bottom`,`left`],Ae=Math.min,U=Math.max,je=Math.round,Me=Math.floor,W=e=>({x:e,y:e}),Ne={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Pe(e,t,n){return U(e,Ae(t,n))}function Fe(e,t){return typeof e==`function`?e(t):e}function Ie(e){return e.split(`-`)[0]}function Le(e){return e.split(`-`)[1]}function Re(e){return e===`x`?`y`:`x`}function ze(e){return e===`y`?`height`:`width`}function G(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Be(e){return Re(G(e))}function Ve(e,t,n){n===void 0&&(n=!1);let r=Le(e),i=Be(e),a=ze(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Xe(o)),[o,Xe(o)]}function He(e){let t=Xe(e);return[Ue(e),t,Ue(t)]}function Ue(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var We=[`left`,`right`],Ge=[`right`,`left`],Ke=[`top`,`bottom`],qe=[`bottom`,`top`];function Je(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Ge:We:t?We:Ge;case`left`:case`right`:return t?Ke:qe;default:return[]}}function Ye(e,t,n,r){let i=Le(e),a=Je(Ie(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ue)))),a}function Xe(e){let t=Ie(e);return Ne[t]+e.slice(t.length)}function Ze(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qe(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ze(e)}function $e(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function et(e,t,n){let{reference:r,floating:i}=e,a=G(t),o=Be(t),s=ze(o),c=Ie(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Le(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1);break}return p}async function tt(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Fe(t,e),p=Qe(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=$e(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=$e(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var nt=50,rt=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:tt},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=et(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<nt&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=et(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},it=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Fe(e,t)||{};if(l==null)return{};let d=Qe(u),f={x:n,y:r},p=Be(i),m=ze(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Ae(d[_],T),D=Ae(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=Pe(O,A,k),M=!c.arrow&&Le(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),at=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Fe(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Ie(r),_=G(o),v=Ie(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Xe(o)]:He(o)),x=p!==`none`;!d&&x&&b.push(...Ye(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Ve(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(!(u===`alignment`&&_!==G(t))||T.every(e=>G(e.placement)===_?e.overflows[0]>0:!0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=G(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o;break}if(r!==n)return{reset:{placement:n}}}return{}}}};function ot(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function st(e){return ke.some(t=>e[t]>=0)}var ct=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Fe(e,t);switch(i){case`referenceHidden`:{let e=ot(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:st(e)}}}case`escaped`:{let e=ot(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:st(e)}}}default:return{}}}}},lt=new Set([`left`,`top`]);async function ut(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Ie(n),s=Le(n),c=G(n)===`y`,l=lt.has(o)?-1:1,u=a&&c?-1:1,d=Fe(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var dt=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await ut(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},ft=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Fe(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=G(Ie(i)),p=Re(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=Pe(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=Pe(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},pt=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Fe(e,t),u={x:n,y:r},d=G(i),f=Re(d),p=u[f],m=u[d],h=Fe(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=lt.has(Ie(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},mt=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=Fe(e,t),u=await o.detectOverflow(t,l),d=Ie(i),f=Le(i),p=G(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=Ae(h-u[g],v),x=Ae(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=U(u.left,0),t=U(u.right,0),n=U(u.top,0),r=U(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:U(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:U(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function ht(){return typeof window<`u`}function gt(e){return _t(e)?(e.nodeName||``).toLowerCase():`#document`}function K(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function q(e){return((_t(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function _t(e){return ht()?e instanceof Node||e instanceof K(e).Node:!1}function J(e){return ht()?e instanceof Element||e instanceof K(e).Element:!1}function vt(e){return ht()?e instanceof HTMLElement||e instanceof K(e).HTMLElement:!1}function yt(e){return!ht()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof K(e).ShadowRoot}function bt(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Y(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function xt(e){return/^(table|td|th)$/.test(gt(e))}function St(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ct=/transform|translate|scale|rotate|perspective|filter/,wt=/paint|layout|strict|content/,Tt=e=>!!e&&e!==`none`,Et;function Dt(e){let t=J(e)?Y(e):e;return Tt(t.transform)||Tt(t.translate)||Tt(t.scale)||Tt(t.rotate)||Tt(t.perspective)||!kt()&&(Tt(t.backdropFilter)||Tt(t.filter))||Ct.test(t.willChange||``)||wt.test(t.contain||``)}function Ot(e){let t=Mt(e);for(;vt(t)&&!At(t);){if(Dt(t))return t;if(St(t))return null;t=Mt(t)}return null}function kt(){return Et??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Et}function At(e){return/^(html|body|#document)$/.test(gt(e))}function Y(e){return K(e).getComputedStyle(e)}function jt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Mt(e){if(gt(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||yt(e)&&e.host||q(e);return yt(t)?t.host:t}function Nt(e){let t=Mt(e);return At(t)?e.ownerDocument?e.ownerDocument.body:e.body:vt(t)&&bt(t)?t:Nt(t)}function Pt(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Nt(e),i=r===e.ownerDocument?.body,a=K(r);if(i){let e=Ft(a);return t.concat(a,a.visualViewport||[],bt(r)?r:[],e&&n?Pt(e):[])}else return t.concat(r,Pt(r,[],n))}function Ft(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function It(e){let t=Y(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=vt(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=je(n)!==a||je(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Lt(e){return J(e)?e:e.contextElement}function Rt(e){let t=Lt(e);if(!vt(t))return W(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=It(t),o=(a?je(n.width):n.width)/r,s=(a?je(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var zt=W(0);function Bt(e){let t=K(e);return!kt()||!t.visualViewport?zt:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vt(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==K(e)?!1:t}function Ht(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Lt(e),o=W(1);t&&(r?J(r)&&(o=Rt(r)):o=Rt(e));let s=Vt(a,n,r)?Bt(a):W(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=K(a),t=r&&J(r)?K(r):r,n=e,i=Ft(n);for(;i&&r&&t!==n;){let e=Rt(i),t=i.getBoundingClientRect(),r=Y(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=K(i),i=Ft(n)}}return $e({width:u,height:d,x:c,y:l})}function Ut(e,t){let n=jt(e).scrollLeft;return t?t.left+n:Ht(q(e)).left+n}function Wt(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Ut(e,n),y:n.top+t.scrollTop}}function Gt(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=q(r),s=t?St(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=W(1),u=W(0),d=vt(r);if((d||!d&&!a)&&((gt(r)!==`body`||bt(o))&&(c=jt(r)),d)){let e=Ht(r);l=Rt(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Wt(o,c):W(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Kt(e){return Array.from(e.getClientRects())}function qt(e){let t=q(e),n=jt(e),r=e.ownerDocument.body,i=U(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=U(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Ut(e),s=-n.scrollTop;return Y(r).direction===`rtl`&&(o+=U(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Jt=25;function Yt(e,t){let n=K(e),r=q(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=kt();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Ut(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Jt&&(a-=o)}else l<=Jt&&(a+=l);return{width:a,height:o,x:s,y:c}}function Xt(e,t){let n=Ht(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=vt(e)?Rt(e):W(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Zt(e,t,n){let r;if(t===`viewport`)r=Yt(e,n);else if(t===`document`)r=qt(q(e));else if(J(t))r=Xt(t,n);else{let n=Bt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return $e(r)}function Qt(e,t){let n=Mt(e);return n===t||!J(n)||At(n)?!1:Y(n).position===`fixed`||Qt(n,t)}function $t(e,t){let n=t.get(e);if(n)return n;let r=Pt(e,[],!1).filter(e=>J(e)&>(e)!==`body`),i=null,a=Y(e).position===`fixed`,o=a?Mt(e):e;for(;J(o)&&!At(o);){let t=Y(o),n=Dt(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&(i.position===`absolute`||i.position===`fixed`)||bt(o)&&!n&&Qt(e,o))?r=r.filter(e=>e!==o):i=t,o=Mt(o)}return t.set(e,r),r}function en(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?St(t)?[]:$t(t,this._c):[].concat(n),r],o=Zt(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Zt(t,a[e],i);s=U(n.top,s),c=Ae(n.right,c),l=Ae(n.bottom,l),u=U(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function tn(e){let{width:t,height:n}=It(e);return{width:t,height:n}}function nn(e,t,n){let r=vt(t),i=q(t),a=n===`fixed`,o=Ht(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=W(0);function l(){c.x=Ut(i)}if(r||!r&&!a)if((gt(t)!==`body`||bt(i))&&(s=jt(t)),r){let e=Ht(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Wt(i,s):W(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function rn(e){return Y(e).position===`static`}function an(e,t){if(!vt(e)||Y(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return q(e)===n&&(n=n.ownerDocument.body),n}function on(e,t){let n=K(e);if(St(e))return n;if(!vt(e)){let t=Mt(e);for(;t&&!At(t);){if(J(t)&&!rn(t))return t;t=Mt(t)}return n}let r=an(e,t);for(;r&&xt(r)&&rn(r);)r=an(r,t);return r&&At(r)&&rn(r)&&!Dt(r)?n:r||Ot(e)||n}var sn=async function(e){let t=this.getOffsetParent||on,n=this.getDimensions,r=await n(e.floating);return{reference:nn(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cn(e){return Y(e).direction===`rtl`}var ln={convertOffsetParentRelativeRectToViewportRelativeRect:Gt,getDocumentElement:q,getClippingRect:en,getOffsetParent:on,getElementRects:sn,getClientRects:Kt,getDimensions:tn,getScale:Rt,isElement:J,isRTL:cn};function un(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function dn(e,t){let n=null,r,i=q(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=Me(d),h=Me(i.clientWidth-(u+f)),g=Me(i.clientHeight-(d+p)),_=Me(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:U(0,Ae(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!un(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function fn(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Lt(e),u=i||a?[...l?Pt(l):[],...t?Pt(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?dn(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?Ht(e):null;c&&g();function g(){let t=Ht(e);h&&!un(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var pn=dt,mn=ft,hn=at,gn=mt,_n=ct,vn=it,yn=pt,bn=(e,t,n)=>{let r=new Map,i={platform:ln,...n},a={...i.platform,_c:r};return rt(e,t,{...i,platform:a})},xn=e(E(),1),Sn=typeof document<`u`?V.useLayoutEffect:function(){};function Cn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Cn(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Cn(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function wn(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Tn(e,t){let n=wn(e);return Math.round(t*n)/n}function En(e){let t=V.useRef(e);return Sn(()=>{t.current=e}),t}function Dn(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=V.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=V.useState(r);Cn(f,r)||p(r);let[m,h]=V.useState(null),[g,_]=V.useState(null),v=V.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=V.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=V.useRef(null),C=V.useRef(null),w=V.useRef(u),T=c!=null,E=En(c),D=En(i),O=En(l),k=V.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),bn(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Cn(w.current,t)&&(w.current=t,xn.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Sn(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=V.useRef(!1);Sn(()=>(A.current=!0,()=>{A.current=!1}),[]),Sn(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=V.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=V.useMemo(()=>({reference:b,floating:x}),[b,x]),N=V.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Tn(M.floating,u.x),r=Tn(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...wn(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return V.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var On=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:vn({element:r.current,padding:i}).fn(n):r?vn({element:r,padding:i}).fn(n):{}}}},kn=(e,t)=>{let n=pn(e);return{name:n.name,fn:n.fn,options:[e,t]}},An=(e,t)=>{let n=mn(e);return{name:n.name,fn:n.fn,options:[e,t]}},jn=(e,t)=>({fn:yn(e).fn,options:[e,t]}),Mn=(e,t)=>{let n=hn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Nn=(e,t)=>{let n=gn(e);return{name:n.name,fn:n.fn,options:[e,t]}},Pn=(e,t)=>{let n=_n(e);return{name:n.name,fn:n.fn,options:[e,t]}},Fn=(e,t)=>{let n=On(e);return{name:n.name,fn:n.fn,options:[e,t]}},In=`Arrow`,Ln=V.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,H.jsx)(F.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,H.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});Ln.displayName=In;var Rn=Ln;function zn(e){let[t,n]=V.useState(void 0);return I(()=>{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 Bn=`Popper`,[Vn,Hn]=re(Bn),[Un,Wn]=Vn(Bn),Gn=e=>{let{__scopePopper:t,children:n}=e,[r,i]=V.useState(null);return(0,H.jsx)(Un,{scope:t,anchor:r,onAnchorChange:i,children:n})};Gn.displayName=Bn;var Kn=`PopperAnchor`,qn=V.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=Wn(Kn,n),o=V.useRef(null),s=z(t,o),c=V.useRef(null);return V.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,H.jsx)(F.div,{...i,ref:s})});qn.displayName=Kn;var Jn=`PopperContent`,[Yn,Xn]=Vn(Jn),Zn=V.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=Wn(Jn,n),[_,v]=V.useState(null),y=z(t,e=>v(e)),[b,x]=V.useState(null),S=zn(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(tr),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:N,middlewareData:ee}=Dn({strategy:`fixed`,placement:T,whileElementsMounted:(...e)=>fn(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[kn({mainAxis:i+w,alignmentAxis:o}),c&&An({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?jn():void 0,...k}),c&&Mn({...k}),Nn({...k,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),b&&Fn({element:b,padding:s}),nr({arrowWidth:C,arrowHeight:w}),f&&Pn({strategy:`referenceHidden`,...k})]}),[P,te]=rr(M),ne=oe(m);I(()=>{N&&ne?.()},[N,ne]);let re=ee.arrow?.x,ie=ee.arrow?.y,ae=ee.arrow?.centerOffset!==0,[se,ce]=V.useState();return I(()=>{_&&ce(window.getComputedStyle(_).zIndex)},[_]),(0,H.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:N?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:se,"--radix-popper-transform-origin":[ee.transformOrigin?.x,ee.transformOrigin?.y].join(` `),...ee.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,H.jsx)(Yn,{scope:n,placedSide:P,onArrowChange:x,arrowX:re,arrowY:ie,shouldHideArrow:ae,children:(0,H.jsx)(F.div,{"data-side":P,"data-align":te,...h,ref:y,style:{...h.style,animation:N?void 0:`none`}})})})});Zn.displayName=Jn;var Qn=`PopperArrow`,$n={top:`bottom`,right:`left`,bottom:`top`,left:`right`},er=V.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=Xn(Qn,n),a=$n[i.placedSide];return(0,H.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,H.jsx)(Rn,{...r,ref:t,style:{...r.style,display:`block`}})})});er.displayName=Qn;function tr(e){return e!==null}var nr=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=rr(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function rr(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var ir=Gn,ar=qn,or=Zn,sr=er,cr=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),lr=`VisuallyHidden`,ur=V.forwardRef((e,t)=>(0,H.jsx)(F.span,{...e,ref:t,style:{...cr,...e.style}}));ur.displayName=lr;var dr=ur,[fr,pr]=re(`Tooltip`,[Hn]),mr=Hn(),hr=`TooltipProvider`,gr=700,_r=`tooltip.open`,[vr,yr]=fr(hr),br=e=>{let{__scopeTooltip:t,delayDuration:n=gr,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:a}=e,o=V.useRef(!0),s=V.useRef(!1),c=V.useRef(0);return V.useEffect(()=>{let e=c.current;return()=>window.clearTimeout(e)},[]),(0,H.jsx)(vr,{scope:t,isOpenDelayedRef:o,delayDuration:n,onOpen:V.useCallback(()=>{window.clearTimeout(c.current),o.current=!1},[]),onClose:V.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:V.useCallback(e=>{s.current=e},[]),disableHoverableContent:i,children:a})};br.displayName=hr;var xr=`Tooltip`,[Sr,Cr]=fr(xr),wr=e=>{let{__scopeTooltip:t,children:n,open:r,defaultOpen:i,onOpenChange:a,disableHoverableContent:o,delayDuration:s}=e,c=yr(xr,e.__scopeTooltip),l=mr(t),[u,d]=V.useState(null),f=ae(),p=V.useRef(0),m=o??c.disableHoverableContent,h=s??c.delayDuration,g=V.useRef(!1),[_,v]=ie({prop:r,defaultProp:i??!1,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(_r))):c.onClose(),a?.(e)},caller:xr}),y=V.useMemo(()=>_?g.current?`delayed-open`:`instant-open`:`closed`,[_]),b=V.useCallback(()=>{window.clearTimeout(p.current),p.current=0,g.current=!1,v(!0)},[v]),x=V.useCallback(()=>{window.clearTimeout(p.current),p.current=0,v(!1)},[v]),S=V.useCallback(()=>{window.clearTimeout(p.current),p.current=window.setTimeout(()=>{g.current=!0,v(!0),p.current=0},h)},[h,v]);return V.useEffect(()=>()=>{p.current&&=(window.clearTimeout(p.current),0)},[]),(0,H.jsx)(ir,{...l,children:(0,H.jsx)(Sr,{scope:t,contentId:f,open:_,stateAttribute:y,trigger:u,onTriggerChange:d,onTriggerEnter:V.useCallback(()=>{c.isOpenDelayedRef.current?S():b()},[c.isOpenDelayedRef,S,b]),onTriggerLeave:V.useCallback(()=>{m?x():(window.clearTimeout(p.current),p.current=0)},[x,m]),onOpen:b,onClose:x,disableHoverableContent:m,children:n})})};wr.displayName=xr;var Tr=`TooltipTrigger`,Er=V.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=Cr(Tr,n),a=yr(Tr,n),o=mr(n),s=z(t,V.useRef(null),i.onTriggerChange),c=V.useRef(!1),l=V.useRef(!1),u=V.useCallback(()=>c.current=!1,[]);return V.useEffect(()=>()=>document.removeEventListener(`pointerup`,u),[u]),(0,H.jsx)(ar,{asChild:!0,...o,children:(0,H.jsx)(F.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:s,onPointerMove:R(e.onPointerMove,e=>{e.pointerType!==`touch`&&!l.current&&!a.isPointerInTransitRef.current&&(i.onTriggerEnter(),l.current=!0)}),onPointerLeave:R(e.onPointerLeave,()=>{i.onTriggerLeave(),l.current=!1}),onPointerDown:R(e.onPointerDown,()=>{i.open&&i.onClose(),c.current=!0,document.addEventListener(`pointerup`,u,{once:!0})}),onFocus:R(e.onFocus,()=>{c.current||i.onOpen()}),onBlur:R(e.onBlur,i.onClose),onClick:R(e.onClick,i.onClose)})})});Er.displayName=Tr;var Dr=`TooltipPortal`,[Or,kr]=fr(Dr,{forceMount:void 0}),Ar=e=>{let{__scopeTooltip:t,forceMount:n,children:r,container:i}=e,a=Cr(Dr,t);return(0,H.jsx)(Or,{scope:t,forceMount:n,children:(0,H.jsx)(L,{present:n||a.open,children:(0,H.jsx)(pe,{asChild:!0,container:i,children:r})})})};Ar.displayName=Dr;var jr=`TooltipContent`,Mr=V.forwardRef((e,t)=>{let n=kr(jr,e.__scopeTooltip),{forceMount:r=n.forceMount,side:i=`top`,...a}=e,o=Cr(jr,e.__scopeTooltip);return(0,H.jsx)(L,{present:r||o.open,children:o.disableHoverableContent?(0,H.jsx)(Lr,{side:i,...a,ref:t}):(0,H.jsx)(Nr,{side:i,...a,ref:t})})}),Nr=V.forwardRef((e,t)=>{let n=Cr(jr,e.__scopeTooltip),r=yr(jr,e.__scopeTooltip),i=V.useRef(null),a=z(t,i),[o,s]=V.useState(null),{trigger:c,onClose:l}=n,u=i.current,{onPointerInTransitChange:d}=r,f=V.useCallback(()=>{s(null),d(!1)},[d]),p=V.useCallback((e,t)=>{let n=e.currentTarget,r={x:e.clientX,y:e.clientY},i=Vr(r,Br(r,n.getBoundingClientRect())),a=Hr(t.getBoundingClientRect());s(Wr([...i,...a])),d(!0)},[d]);return V.useEffect(()=>()=>f(),[f]),V.useEffect(()=>{if(c&&u){let e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener(`pointerleave`,e),u.addEventListener(`pointerleave`,t),()=>{c.removeEventListener(`pointerleave`,e),u.removeEventListener(`pointerleave`,t)}}},[c,u,p,f]),V.useEffect(()=>{if(o){let e=e=>{let t=e.target,n={x:e.clientX,y:e.clientY},r=c?.contains(t)||u?.contains(t),i=!Ur(n,o);r?f():i&&(f(),l())};return document.addEventListener(`pointermove`,e),()=>document.removeEventListener(`pointermove`,e)}},[c,u,o,l,f]),(0,H.jsx)(Lr,{...e,ref:a})}),[Pr,Fr]=fr(xr,{isInside:!1}),Ir=ce(`TooltipContent`),Lr=V.forwardRef((e,t)=>{let{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:a,onPointerDownOutside:o,...s}=e,c=Cr(jr,n),l=mr(n),{onClose:u}=c;return V.useEffect(()=>(document.addEventListener(_r,u),()=>document.removeEventListener(_r,u)),[u]),V.useEffect(()=>{if(c.trigger){let e=e=>{e.target?.contains(c.trigger)&&u()};return window.addEventListener(`scroll`,e,{capture:!0}),()=>window.removeEventListener(`scroll`,e,{capture:!0})}},[c.trigger,u]),(0,H.jsx)(he,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:u,children:(0,H.jsxs)(or,{"data-state":c.stateAttribute,...l,...s,ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-tooltip-content-available-width":`var(--radix-popper-available-width)`,"--radix-tooltip-content-available-height":`var(--radix-popper-available-height)`,"--radix-tooltip-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-tooltip-trigger-height":`var(--radix-popper-anchor-height)`},children:[(0,H.jsx)(Ir,{children:r}),(0,H.jsx)(Pr,{scope:n,isInside:!0,children:(0,H.jsx)(dr,{id:c.contentId,role:`tooltip`,children:i||r})})]})})});Mr.displayName=jr;var Rr=`TooltipArrow`,zr=V.forwardRef((e,t)=>{let{__scopeTooltip:n,...r}=e,i=mr(n);return Fr(Rr,n).isInside?null:(0,H.jsx)(sr,{...i,...r,ref:t})});zr.displayName=Rr;function Br(e,t){let n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),i=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,i,a)){case a:return`left`;case i:return`right`;case n:return`top`;case r:return`bottom`;default:throw Error(`unreachable`)}}function Vr(e,t,n=5){let r=[];switch(t){case`top`:r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case`bottom`:r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case`left`:r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case`right`:r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function Hr(e){let{top:t,right:n,bottom:r,left:i}=e;return[{x:i,y:t},{x:n,y:t},{x:n,y:r},{x:i,y:r}]}function Ur(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function Wr(e){let t=e.slice();return t.sort((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0),Gr(t)}function Gr(e){if(e.length<=1)return e.slice();let t=[];for(let n=0;n<e.length;n++){let r=e[n];for(;t.length>=2;){let e=t[t.length-1],n=t[t.length-2];if((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x))t.pop();else break}t.push(r)}t.pop();let n=[];for(let t=e.length-1;t>=0;t--){let r=e[t];for(;n.length>=2;){let e=n[n.length-1],t=n[n.length-2];if((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var Kr=br,qr=wr,Jr=Er,Yr=Ar,Xr=Mr,Zr=Kr,Qr=qr,$r=Jr,ei=V.forwardRef(({className:e,sideOffset:t=4,...n},r)=>(0,H.jsx)(Yr,{children:(0,H.jsx)(Xr,{ref:r,sideOffset:t,className:P(`surface-panel z-50 max-w-xs overflow-hidden rounded-md px-3 py-1.5 text-xs text-[var(--app-text)] shadow-[var(--app-shadow-md)] animate-in fade-in-0 zoom-in-95`,e),...n})}));ei.displayName=Xr.displayName;function ti({onNavigate:e}){return(0,H.jsxs)(`aside`,{className:`flex h-full w-64 flex-col border-r border-[var(--app-border)] bg-[var(--app-sidebar-bg)]`,children:[(0,H.jsxs)(`div`,{className:`flex h-16 items-center gap-3 border-b border-[var(--app-border)] px-5`,children:[(0,H.jsx)(`div`,{className:`surface-accent flex h-10 w-10 items-center justify-center rounded-lg text-sm font-bold text-white`,children:`A`}),(0,H.jsxs)(`div`,{className:`min-w-0`,children:[(0,H.jsx)(`div`,{className:`text-sm font-semibold tracking-wide text-[var(--app-text)]`,children:`Adam`}),(0,H.jsx)(`div`,{className:`text-[11px] text-[var(--app-text-subtle)]`,children:`Operator workspace`})]}),(0,H.jsx)(`span`,{className:`ml-auto rounded-full border border-[var(--app-border)] bg-white/[0.04] px-2 py-0.5 font-mono text-[10px] text-[var(--app-text-subtle)]`,children:`v2.0`})]}),(0,H.jsx)(Zr,{delayDuration:300,children:(0,H.jsx)(`nav`,{role:`navigation`,"aria-label":`Main navigation`,className:`flex-1 space-y-1 px-3 py-4`,children:Ee.map(({to:t,icon:n,label:r,description:i})=>(0,H.jsxs)(Qr,{children:[(0,H.jsx)($r,{asChild:!0,children:(0,H.jsx)(D,{to:t,end:t===`/`,onClick:e,className:({isActive:e})=>te(`group flex items-center gap-3 rounded-lg px-3 py-2 transition-colors`,`focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--app-canvas)]`,e?`surface-panel-elevated text-[var(--app-text)]`:`text-[var(--app-text-muted)] hover:bg-white/[0.04] hover:text-[var(--app-text)]`),children:({isActive:e})=>(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(n,{size:16,className:`flex-shrink-0`}),(0,H.jsx)(`span`,{className:`text-sm font-medium`,children:r}),e&&(0,H.jsx)(`span`,{className:`sr-only`,children:`(current page)`})]})})}),(0,H.jsx)(ei,{side:`right`,children:(0,H.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,H.jsx)(`div`,{className:`font-medium text-[var(--app-text)]`,children:r}),(0,H.jsx)(`div`,{className:`text-[var(--app-text-muted)]`,children:i})]})})]},t))})})]})}function ni(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 ri=e=>{switch(e){case`success`:return oi;case`info`:return ci;case`warning`:return si;case`error`:return li;default:return null}},ii=Array(12).fill(0),ai=({visible:e,className:t})=>V.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},V.createElement(`div`,{className:`sonner-spinner`},ii.map((e,t)=>V.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),oi=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},V.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`})),si=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`},V.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`})),ci=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},V.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`})),li=V.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`},V.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`})),ui=V.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`},V.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),V.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),di=()=>{let[e,t]=V.useState(document.hidden);return V.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>window.removeEventListener(`visibilitychange`,e)},[]),e},fi=1,X=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:fi++,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],V.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(mi(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`&&!V.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`&&!V.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`&&!V.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`&&!V.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||fi++;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}},pi=(e,t)=>{let n=t?.id||fi++;return X.addToast({title:e,...t,id:n}),n},mi=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,hi=Object.assign(pi,{success:X.success,info:X.info,warning:X.warning,error:X.error,custom:X.custom,message:X.message,promise:X.promise,dismiss:X.dismiss,loading:X.loading},{getHistory:()=>X.toasts,getToasts:()=>X.getActiveToasts()});ni(`[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 gi(e){return e.label!==void 0}var _i=3,vi=`24px`,yi=`16px`,bi=4e3,xi=356,Si=14,Ci=45,wi=200;function Z(...e){return e.filter(Boolean).join(` `)}function Ti(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var Ei=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:T=`Close toast`}=e,[E,D]=V.useState(null),[O,k]=V.useState(null),[A,j]=V.useState(!1),[M,N]=V.useState(!1),[ee,P]=V.useState(!1),[te,ne]=V.useState(!1),[re,ie]=V.useState(!1),[ae,oe]=V.useState(0),[F,se]=V.useState(0),ce=V.useRef(n.duration||y||bi),le=V.useRef(null),I=V.useRef(null),ue=c===0,de=c+1<=o,L=n.type,fe=n.dismissible!==!1,pe=n.className||``,me=n.descriptionClassName||``,he=V.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),R=V.useMemo(()=>n.closeButton??p,[n.closeButton,p]),z=V.useMemo(()=>n.duration||y||bi,[n.duration,y]),ge=V.useRef(0),_e=V.useRef(0),ve=V.useRef(0),ye=V.useRef(null),[be,xe]=b.split(`-`),Se=V.useMemo(()=>s.reduce((e,t,n)=>n>=he?e:e+t.height,0),[s,he]),B=di(),Ce=n.invert||t,we=L===`loading`;_e.current=V.useMemo(()=>he*x+Se,[he,Se]),V.useEffect(()=>{ce.current=z},[z]),V.useEffect(()=>{j(!0)},[]),V.useEffect(()=>{let e=I.current;if(e){let t=e.getBoundingClientRect().height;return se(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),V.useLayoutEffect(()=>{if(!A)return;let e=I.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,se(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])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let H=V.useCallback(()=>{N(!0),oe(_e.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},wi)},[n,d,a,_e]);V.useEffect(()=>{if(n.promise&&L===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||B?(()=>{if(ve.current<ge.current){let e=new Date().getTime()-ge.current;ce.current-=e}ve.current=new Date().getTime()})():ce.current!==1/0&&(ge.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),H()},ce.current)),()=>clearTimeout(e)},[u,i,n,L,B,H]),V.useEffect(()=>{n.delete&&(H(),n.onDismiss==null||n.onDismiss.call(n,n))},[H,n.delete]);function Te(){return w?.loading?V.createElement(`div`,{className:Z(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":L===`loading`},w.loading):V.createElement(ai,{className:Z(C?.loader,n?.classNames?.loader),visible:L===`loading`})}let Ee=n.icon||w?.[L]||ri(L);return V.createElement(`li`,{tabIndex:0,ref:I,className:Z(_,pe,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":A,"data-promise":!!n.promise,"data-swiped":re,"data-removed":M,"data-visible":de,"data-y-position":be,"data-x-position":xe,"data-index":c,"data-front":ue,"data-swiping":ee,"data-dismissible":fe,"data-type":L,"data-invert":Ce,"data-swipe-out":te,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?ae:_e.current}px`,"--initial-height":S?`auto`:`${F}px`,...m,...n.style},onDragEnd:()=>{P(!1),D(null),ye.current=null},onPointerDown:e=>{e.button!==2&&(we||!fe||(le.current=new Date,oe(_e.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),ye.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(te||!fe)return;ye.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()-le.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if(Math.abs(i)>=Ci||a>.11){oe(_e.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),H(),ne(!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`)}ie(!1),P(!1),D(null)},onPointerMove:t=>{var n,r;if(!ye.current||!fe||window.getSelection()?.toString().length>0)return;let i=t.clientY-ye.current.y,a=t.clientX-ye.current.x,o=e.swipeDirections??Ti(b);!E&&(Math.abs(a)>1||Math.abs(i)>1)&&D(Math.abs(a)>Math.abs(i)?`x`:`y`);let s={x:0,y:0},c=e=>1/(1.5+Math.abs(e)/20);if(E===`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(E===`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)&&ie(!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`)}},R&&!n.jsx&&L!==`loading`?V.createElement(`button`,{"aria-label":T,"data-disabled":we,"data-close-button":!0,onClick:we||!fe?()=>{}:()=>{H(),n.onDismiss==null||n.onDismiss.call(n,n)},className:Z(C?.closeButton,n?.classNames?.closeButton)},w?.close??ui):null,(L||n.icon||n.promise)&&n.icon!==null&&(w?.[L]!==null||n.icon)?V.createElement(`div`,{"data-icon":``,className:Z(C?.icon,n?.classNames?.icon)},n.promise||n.type===`loading`&&!n.icon?n.icon||Te():null,n.type===`loading`?null:Ee):null,V.createElement(`div`,{"data-content":``,className:Z(C?.content,n?.classNames?.content)},V.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?V.createElement(`div`,{"data-description":``,className:Z(v,me,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),V.isValidElement(n.cancel)?n.cancel:n.cancel&&gi(n.cancel)?V.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{gi(n.cancel)&&fe&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),H())},className:Z(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,V.isValidElement(n.action)?n.action:n.action&&gi(n.action)?V.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{gi(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&H())},className:Z(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Di(){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 Oi(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?yi:vi;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 ki=V.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=_i,toastOptions:g,dir:_=Di(),gap:v=Si,icons:y,containerAriaLabel:b=`Notifications`}=e,[x,S]=V.useState([]),C=V.useMemo(()=>n?x.filter(e=>e.toasterId===n):x.filter(e=>!e.toasterId),[x,n]),w=V.useMemo(()=>Array.from(new Set([i].concat(C.filter(e=>e.position).map(e=>e.position)))),[C,i]),[T,E]=V.useState([]),[D,O]=V.useState(!1),[k,A]=V.useState(!1),[j,M]=V.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),N=V.useRef(null),ee=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),P=V.useRef(null),te=V.useRef(!1),ne=V.useCallback(e=>{S(t=>(t.find(t=>t.id===e.id)?.delete||X.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return V.useEffect(()=>X.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{S(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{xn.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]),V.useEffect(()=>{if(d!==`system`){M(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?M(`dark`):M(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{M(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{M(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),V.useEffect(()=>{x.length<=1&&O(!1)},[x]),V.useEffect(()=>{let e=e=>{if(a.every(t=>e[t]||e.code===t)){var t;O(!0),(t=N.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===N.current||N.current?.contains(document.activeElement))&&O(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),V.useEffect(()=>{if(N.current)return()=>{P.current&&(P.current.focus({preventScroll:!0}),P.current=null,te.current=!1)}},[N.current]),V.createElement(`section`,{ref:t,"aria-label":`${b} ${ee}`,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?V.createElement(`ol`,{key:t,dir:_===`auto`?Di():_,tabIndex:-1,ref:N,className:c,"data-sonner-toaster":!0,"data-sonner-theme":j,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${T[0]?.height||0}px`,"--width":`${xi}px`,"--gap":`${v}px`,...m,...Oi(l,u)},onBlur:e=>{te.current&&!e.currentTarget.contains(e.relatedTarget)&&(te.current=!1,P.current&&=(P.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||te.current||(te.current=!0,P.current=e.relatedTarget)},onMouseEnter:()=>O(!0),onMouseMove:()=>O(!0),onMouseLeave:()=>{k||O(!1)},onDragEnd:()=>O(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||A(!0)},onPointerUp:()=>A(!1)},C.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>V.createElement(Ei,{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:k,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:ne,toasts:C.filter(e=>e.position==n.position),heights:T.filter(e=>e.position==n.position),setHeights:E,expandByDefault:o,gap:v,expanded:D,swipeDirections:e.swipeDirections}))):null}))}),Ai=({...e})=>(0,H.jsx)(ki,{theme:`dark`,className:`toaster group`,toastOptions:{classNames:{toast:`group toast group-[.toaster]:bg-[var(--app-panel)] group-[.toaster]:text-[var(--app-text)] group-[.toaster]:border-[var(--app-border)] group-[.toaster]:shadow-lg`,description:`group-[.toast]:text-[var(--app-text-muted)]`,actionButton:`group-[.toast]:bg-[var(--app-accent)] group-[.toast]:text-white`,cancelButton:`group-[.toast]:bg-[var(--app-panel-elevated)] group-[.toast]:text-[var(--app-text)]`}},...e}),ji=500,Mi=ve((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 B(`/tasks?${n}`)).tasks})},fetchGoals:async()=>{e({goals:(await B(`/goals`)).goals})},updateGoal:async(t,n)=>{let r=await B(`/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 B(`/goals/${t}`,{method:`DELETE`}),e(e=>({goals:e.goals.filter(e=>e.id!==t)}))},fetchStrategies:async()=>{e({strategies:(await B(`/strategies`)).strategies})},fetchTemplates:async()=>{e({templates:(await B(`/task-templates`)).templates})},fetchExecutionPool:async()=>{try{e({executionPool:(await B(`/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=Se(),a=new URL(`${r}//${window.location.host}/events`);i&&a.searchParams.set(`api_key`,i);let o=new WebSocket(a.toString()),s=!1;o.onopen=()=>{s=!0,e({wsConnected:!0,_ws:o,_wsReconnectDelay:1e3})},o.onclose=async()=>{if(!s&&i&&!await ye(i).catch(()=>!0)){be(),Ce();return}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{Ni(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(-(ji-1)),t]}))},addDeliveryLogEntry:t=>{e(e=>({deliveryLog:[t,...e.deliveryLog].slice(0,100)}))},approvePlan:async(t,n,r)=>{await B(`/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 B(`/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 B(`/roles`);e({roles:t})},createRole:async t=>{let n=await B(`/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 B(`/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,n=!1)=>{let r=localStorage.getItem(`adam_api_key`)??``,i=n?`/roles/${t}?force=true`:`/roles/${t}`,a=await fetch(i,{method:`DELETE`,headers:{"x-api-key":r}});if(a.status===409){let e=await a.json(),t=Error(e.message);throw t.status=409,t.code=e.code,t.roleId=e.roleId,t.activeTaskCount=e.activeTaskCount,t.taskStatuses=e.taskStatuses,t}if(!a.ok)throw Error(`Failed to delete role: ${a.status}`);e(e=>({roles:e.roles.filter(e=>e.id!==t)}))}}));function Ni(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 Pi(){let[e,t]=(0,V.useState)(!1),n=ee(),r=Mi(e=>e.wsConnected),i=Mi(e=>e.connectWebSocket),o=Mi(e=>e.fetchReadiness),s=Oe(n.pathname);(0,V.useEffect)(()=>{i(),o();let e=setInterval(o,3e4);return()=>clearInterval(e)},[i,o]);let c=(0,V.useCallback)(()=>t(!1),[]);return(0,H.jsxs)(`div`,{className:`flex h-screen overflow-hidden`,children:[(0,H.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-[var(--app-accent)] focus:px-4 focus:py-2 focus:text-sm focus:font-medium focus:text-white focus:outline-none`,children:`Skip to content`}),(0,H.jsx)(`div`,{className:`hidden lg:block`,children:(0,H.jsx)(ti,{})}),e&&(0,H.jsxs)(`div`,{className:`fixed inset-0 z-40 lg:hidden`,children:[(0,H.jsx)(`div`,{className:`absolute inset-0 bg-black/60`,onClick:c}),(0,H.jsx)(`div`,{className:`relative z-50 h-full w-60`,children:(0,H.jsx)(ti,{onNavigate:c})})]}),(0,H.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden`,children:[(0,H.jsx)(`header`,{className:`border-b border-[var(--app-border)] bg-[var(--app-header-bg)] px-4 py-2.5 lg:px-6`,children:(0,H.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,H.jsx)(`button`,{className:`text-[var(--app-text-subtle)] transition-colors hover:text-[var(--app-text)] lg:hidden`,onClick:()=>t(!e),"aria-label":e?`Close menu`:`Open menu`,children:e?(0,H.jsx)(g,{size:20}):(0,H.jsx)(a,{size:20})}),(0,H.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,H.jsxs)(`p`,{className:`text-sm text-[var(--app-text-muted)]`,children:[(0,H.jsx)(`span`,{className:`text-[var(--app-text)]`,children:s.section}),(0,H.jsx)(`span`,{className:`mx-1.5 text-[var(--app-text-subtle)]`,children:`/`}),(0,H.jsx)(`span`,{className:`font-medium text-[var(--app-text)]`,children:s.title})]})}),(0,H.jsx)(`div`,{className:`surface-panel-muted flex items-center gap-2 rounded-full px-3 py-1 text-xs`,"aria-live":`polite`,children:r?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(y,{size:14,className:`text-[var(--app-success)]`}),(0,H.jsx)(`span`,{className:`text-[var(--app-text)]`,children:`Connected`})]}):(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(p,{size:14,className:`text-[var(--app-danger)]`}),(0,H.jsx)(`span`,{className:`text-[var(--app-text)]`,children:`Disconnected`})]})})]})}),(0,H.jsx)(`main`,{id:`main-content`,role:`main`,className:`flex-1 overflow-y-auto p-4 lg:p-5`,children:(0,H.jsx)(w,{})})]}),(0,H.jsx)(Ai,{position:`bottom-center`})]})}var Fi=`Dialog`,[Ii,Li]=re(Fi),[Ri,Q]=Ii(Fi),zi=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=V.useRef(null),c=V.useRef(null),[l,u]=ie({prop:r,defaultProp:i??!1,onChange:a,caller:Fi});return(0,H.jsx)(Ri,{scope:t,triggerRef:s,contentRef:c,contentId:ae(),titleId:ae(),descriptionId:ae(),open:l,onOpenChange:u,onOpenToggle:V.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};zi.displayName=Fi;var Bi=`DialogTrigger`,Vi=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Q(Bi,n),a=z(t,i.triggerRef);return(0,H.jsx)(F.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":sa(i.open),...r,ref:a,onClick:R(e.onClick,i.onOpenToggle)})});Vi.displayName=Bi;var Hi=`DialogPortal`,[Ui,Wi]=Ii(Hi,{forceMount:void 0}),Gi=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Q(Hi,t);return(0,H.jsx)(Ui,{scope:t,forceMount:n,children:V.Children.map(r,e=>(0,H.jsx)(L,{present:n||a.open,children:(0,H.jsx)(pe,{asChild:!0,container:i,children:e})}))})};Gi.displayName=Hi;var Ki=`DialogOverlay`,qi=V.forwardRef((e,t)=>{let n=Wi(Ki,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Q(Ki,e.__scopeDialog);return a.modal?(0,H.jsx)(L,{present:r||a.open,children:(0,H.jsx)(Yi,{...i,ref:t})}):null});qi.displayName=Ki;var Ji=ue(`DialogOverlay.RemoveScroll`),Yi=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Q(Ki,n);return(0,H.jsx)(de,{as:Ji,allowPinchZoom:!0,shards:[i.contentRef],children:(0,H.jsx)(F.div,{"data-state":sa(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),Xi=`DialogContent`,Zi=V.forwardRef((e,t)=>{let n=Wi(Xi,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Q(Xi,e.__scopeDialog);return(0,H.jsx)(L,{present:r||a.open,children:a.modal?(0,H.jsx)(Qi,{...i,ref:t}):(0,H.jsx)($i,{...i,ref:t})})});Zi.displayName=Xi;var Qi=V.forwardRef((e,t)=>{let n=Q(Xi,e.__scopeDialog),r=V.useRef(null),i=z(t,n.contentRef,r);return V.useEffect(()=>{let e=r.current;if(e)return me(e)},[]),(0,H.jsx)(ea,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault())})}),$i=V.forwardRef((e,t)=>{let n=Q(Xi,e.__scopeDialog),r=V.useRef(!1),i=V.useRef(!1);return(0,H.jsx)(ea,{...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()}})}),ea=V.forwardRef((e,t)=>{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Q(Xi,n),c=V.useRef(null),l=z(t,c);return fe(),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(le,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,H.jsx)(he,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":sa(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(da,{titleId:s.titleId}),(0,H.jsx)(pa,{contentRef:c,descriptionId:s.descriptionId})]})]})}),ta=`DialogTitle`,na=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Q(ta,n);return(0,H.jsx)(F.h2,{id:i.titleId,...r,ref:t})});na.displayName=ta;var ra=`DialogDescription`,ia=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Q(ra,n);return(0,H.jsx)(F.p,{id:i.descriptionId,...r,ref:t})});ia.displayName=ra;var aa=`DialogClose`,oa=V.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=Q(aa,n);return(0,H.jsx)(F.button,{type:`button`,...r,ref:t,onClick:R(e.onClick,()=>i.onOpenChange(!1))})});oa.displayName=aa;function sa(e){return e?`open`:`closed`}var ca=`DialogTitleWarning`,[la,ua]=se(ca,{contentName:Xi,titleName:ta,docsSlug:`dialog`}),da=({titleId:e})=>{let t=ua(ca),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
3
3
|
|
|
4
4
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -9,4 +9,4 @@ You can add a description to the \`${Na}\` by passing a \`${Ba}\` component as a
|
|
|
9
9
|
|
|
10
10
|
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 \`${Na}\`. 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.
|
|
11
11
|
|
|
12
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return V.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},qa=Ea,Ja=Oa,Ya=Aa,Xa=Ma,Za=La,Qa=Ua,$a=Ga,eo=za,to=Va,no=qa,ro=Ja,io=Ya,ao=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Xa,{ref:n,className:P(`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}));ao.displayName=Xa.displayName;var oo=V.forwardRef(({className:e,...t},n)=>(0,H.jsxs)(io,{children:[(0,H.jsx)(ao,{}),(0,H.jsx)(Za,{ref:n,className:P(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-[var(--app-border)] bg-[var(--app-panel)] 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})]}));oo.displayName=Za.displayName;var so=({className:e,...t})=>(0,H.jsx)(`div`,{className:P(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});so.displayName=`AlertDialogHeader`;var co=({className:e,...t})=>(0,H.jsx)(`div`,{className:P(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});co.displayName=`AlertDialogFooter`;var lo=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(eo,{ref:n,className:P(`text-lg font-semibold text-[var(--app-text)]`,e),...t}));lo.displayName=eo.displayName;var uo=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(to,{ref:n,className:P(`text-sm text-[var(--app-text-muted)]`,e),...t}));uo.displayName=to.displayName;var fo=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Qa,{ref:n,className:P(ge(),e),...t}));fo.displayName=Qa.displayName;var po=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)($a,{ref:n,className:P(ge({variant:`ghost`}),`mt-2 sm:mt-0`,e),...t}));po.displayName=$a.displayName;var mo=ne(`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-[var(--app-panel-muted)] text-[var(--app-text)]`,secondary:`bg-[var(--app-panel-elevated)] text-[var(--app-text-muted)]`,destructive:`bg-[var(--app-danger-soft-bg)] text-[var(--app-danger)] border border-[var(--app-danger-soft-border)]`,outline:`border border-[var(--app-border)] text-[var(--app-text)]`,success:`bg-[var(--app-success-soft-bg)] text-[var(--app-success)] border border-[var(--app-success-soft-border)]`,warning:`bg-[var(--app-warning-soft-bg)] text-[var(--app-warning)] border border-[var(--app-warning-soft-border)]`,info:`bg-[var(--app-accent-soft-bg)] text-[var(--app-accent)] border border-[var(--app-accent-soft-border)]`,muted:`bg-[var(--app-panel-elevated)] text-[var(--app-text-subtle)]`}},defaultVariants:{variant:`default`}});function ho({className:e,variant:t=`default`,...n}){return(0,H.jsx)(`span`,{className:P(mo({variant:t}),e),...n})}function go(e){switch(e){case`blocked`:return`warning`;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 _o=300;function vo(e){return e===`high`?`destructive`:e===`medium`?`outline`:`secondary`}function yo(){let e=Mi(e=>e.pendingPlanApproval),t=Mi(e=>e.approvePlan),n=Mi(e=>e.denyPlan),r=Mi(e=>e.planTimeoutNotice),i=Mi(e=>e.clearPlanTimeoutNotice),[a,o]=(0,V.useState)(_o),[s,c]=(0,V.useState)(!1);(0,V.useEffect)(()=>{if(!e){o(_o),c(!1);return}let t=setInterval(()=>{o(e=>e<=1?(clearInterval(t),0):e-1)},1e3);return()=>clearInterval(t)},[e?.planId]),(0,V.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,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(no,{open:!!e,children:(0,H.jsxs)(oo,{className:`max-w-2xl max-h-[80vh] overflow-y-auto`,children:[(0,H.jsxs)(so,{children:[(0,H.jsxs)(lo,{className:`flex items-center gap-2`,children:[`Execution Plan — Approval Required`,d&&(0,H.jsxs)(ho,{variant:vo(d.overallRisk),children:[d.overallRisk.toUpperCase(),` RISK`]})]}),(0,H.jsxs)(uo,{className:`text-xs text-[var(--app-text-muted)]`,children:[`Plan `,e?.planId,` | Task `,e?.taskId,` | `,a,`s remaining`]})]}),d&&(0,H.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`h4`,{className:`text-sm font-medium text-[var(--app-text)] mb-2`,children:[`Plan Steps (`,d.steps.length,`)`]}),(0,H.jsx)(`div`,{className:`space-y-2`,children:d.steps.map(e=>(0,H.jsxs)(`div`,{className:`rounded-md border border-[var(--app-border)] bg-[var(--app-panel-elevated)]/50 p-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(`span`,{className:`text-xs font-mono text-[var(--app-text-subtle)]`,children:[`#`,e.index]}),(0,H.jsx)(`span`,{className:`text-sm text-[var(--app-text)]`,children:e.description})]}),(0,H.jsx)(ho,{variant:vo(e.riskLevel),children:e.riskLevel})]}),(0,H.jsxs)(`div`,{className:`mt-1 text-xs text-[var(--app-text-muted)]`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]})]},e.index))})]}),Object.keys(d.requiredPermissions).length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h4`,{className:`text-sm font-medium text-[var(--app-text)] mb-1`,children:`Required Permissions`}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(d.requiredPermissions).map(e=>(0,H.jsx)(ho,{variant:`secondary`,children:e},e))})]})]}),(0,H.jsxs)(co,{children:[(0,H.jsx)(_e,{variant:`destructive`,onClick:u,disabled:s,children:`Deny`}),(0,H.jsx)(_e,{variant:`outline`,onClick:()=>l(`permanent`),disabled:s,children:`Allow Permanent`}),(0,H.jsx)(_e,{onClick:()=>l(`once`),disabled:s,children:`Allow Once`})]})]})}),r&&(0,H.jsxs)(`div`,{className:`fixed bottom-4 right-4 z-50 rounded-md border border-[var(--app-warning-soft-border)] bg-[var(--app-warning-soft-bg)] px-4 py-2 text-sm text-[var(--app-warning-soft-text)] shadow-[var(--app-shadow-lg)]`,children:[r,(0,H.jsx)(`button`,{className:`ml-3 text-[var(--app-warning)] hover:text-[var(--app-warning-soft-text)]`,onClick:i,children:`Dismiss`})]})]})}function $(e){return(0,V.lazy)(()=>e().catch(e=>{let t=`chunk-reload-`+window.location.pathname;if(!sessionStorage.getItem(t))return sessionStorage.setItem(t,`1`),window.location.reload(),new Promise(()=>{});throw sessionStorage.removeItem(t),e}))}function bo(){let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(!1),o=new URLSearchParams(window.location.search).get(`returnTo`)??`/ui`;async function s(t){t.preventDefault();let n=e.trim();if(!n){r(`API key is required`);return}r(null),a(!0);try{if(!await ye(n)){r(`Invalid API key`),a(!1);return}xe(n),window.location.href=o}catch(e){r(e instanceof Error?e.message:`Verification failed`),a(!1)}}return(0,H.jsx)(`div`,{className:`flex h-screen items-center justify-center bg-[var(--app-bg)] text-[var(--app-fg)]`,children:(0,H.jsxs)(`form`,{onSubmit:s,className:`w-full max-w-md rounded-lg border border-[var(--app-border)] bg-[var(--app-panel)] p-8 shadow-lg`,children:[(0,H.jsx)(`h1`,{className:`mb-2 text-2xl font-semibold`,children:`Adam — Sign in`}),(0,H.jsx)(`p`,{className:`mb-6 text-sm text-[var(--app-muted)]`,children:`Paste your API key to continue.`}),(0,H.jsx)(`label`,{className:`mb-1 block text-sm font-medium`,children:`API key`}),(0,H.jsx)(`input`,{type:`password`,value:e,onChange:e=>t(e.target.value),placeholder:`64-character hex string`,className:`mb-4 w-full rounded border border-[var(--app-border)] bg-[var(--app-bg)] px-3 py-2 font-mono text-sm outline-none focus:border-[var(--app-accent)]`,autoFocus:!0,disabled:i}),n&&(0,H.jsx)(`div`,{className:`mb-4 rounded border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-400`,children:n}),(0,H.jsx)(`button`,{type:`submit`,disabled:i,className:`w-full rounded bg-[var(--app-accent)] px-4 py-2 font-medium text-[var(--app-accent-fg)] transition hover:opacity-90 disabled:opacity-50`,children:i?`Verifying...`:`Sign in`}),(0,H.jsxs)(`details`,{className:`mt-6 text-xs text-[var(--app-muted)]`,children:[(0,H.jsx)(`summary`,{className:`cursor-pointer select-none`,children:`Where do I find my API key?`}),(0,H.jsxs)(`div`,{className:`mt-2 space-y-1 leading-relaxed`,children:[(0,H.jsxs)(`p`,{children:[`Adam generates a random API key on first boot and stores it at`,` `,(0,H.jsx)(`code`,{className:`rounded bg-[var(--app-bg)] px-1`,children:`~/.adam/adam.key`}),`.`]}),(0,H.jsxs)(`p`,{children:[`Local: `,(0,H.jsx)(`code`,{className:`rounded bg-[var(--app-bg)] px-1`,children:`cat ~/.adam/adam.key`})]}),(0,H.jsxs)(`p`,{children:[`Remote (VPS): `,(0,H.jsx)(`code`,{className:`rounded bg-[var(--app-bg)] px-1`,children:`ssh <host> cat ~/.adam/adam.key`})]}),(0,H.jsx)(`p`,{children:`Rotation resets all logged-in sessions. Do it from Settings → API Key.`})]})]})]})})}var xo=$(()=>j(()=>import(`./Dashboard-BXqFb_Vr.js`).then(e=>({default:e.Dashboard})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),So=$(()=>j(()=>import(`./Chat-Ce72TtUi.js`).then(e=>({default:e.Chat})),__vite__mapDeps([10,1,2,3,11,6,4,5,12,13,9,14,15]))),Co=$(()=>j(()=>import(`./Work-CfzFRSZX.js`).then(e=>({default:e.Work})),__vite__mapDeps([16,1,2,3,17,11,6,18,19,4,5,7,8,12,20,13,9,21,14,15]))),wo=$(()=>j(()=>import(`./TaskDetail-h12WxjfG.js`).then(e=>({default:e.TaskDetail})),__vite__mapDeps([22,1,2,3,11,6,23,13,5,7,8,9,14]))),To=$(()=>j(()=>import(`./Plugins-CwCHGzI6.js`).then(e=>({default:e.Plugins})),__vite__mapDeps([24,1,2,3,17,11,6,18,5,7,25,12,13,14,8,21,9]))),Eo=$(()=>j(()=>import(`./Strategies-CwJ9JQ-X.js`).then(e=>({default:e.Strategies})),__vite__mapDeps([26,1,2,3,11,6,5,8,12,21,9]))),Do=$(()=>j(()=>import(`./Goals-D3h4WMjU.js`).then(e=>({default:e.Goals})),__vite__mapDeps([20,1,2,3,17,11,6,5,8,12,13,9]))),Oo=$(()=>j(()=>import(`./Logs-D5MQv6Yw.js`).then(e=>({default:e.Logs})),__vite__mapDeps([27,1,2,3,11,6,5,8,12,14]))),ko=$(()=>j(()=>import(`./Settings-rdVQMfqX.js`).then(e=>({default:e.Settings})),__vite__mapDeps([28,1,2,3,17,11,6,29,8,13,14,5,7,12,9]))),Ao=$(()=>j(()=>import(`./Memories-Dls71I2i.js`).then(e=>({default:e.Memories})),__vite__mapDeps([30,1,2,3,11,6,5,7,8,12,13,9]))),jo=$(()=>j(()=>import(`./Evolution-DFcSm6Rw.js`).then(e=>({default:e.Evolution})),__vite__mapDeps([31,1,2,3,11,6,5,8,12,13,9]))),Mo=$(()=>j(()=>import(`./Channels-Cztxvsa2.js`).then(e=>({default:e.Channels})),__vite__mapDeps([32,1,2,3,11,6,5,7,8,12,13,14]))),No=$(()=>j(()=>import(`./GoalDetail-DVU7c0aR.js`).then(e=>({default:e.GoalDetail})),__vite__mapDeps([33,1,2,3,5,6,7,8,13,9]))),Po=$(()=>j(()=>import(`./ChannelDetail-D0FBZoAX.js`).then(e=>({default:e.ChannelDetail})),__vite__mapDeps([34,1,2,3,5,6,7,8,13,9]))),Fo=$(()=>j(()=>import(`./Roles-FEHqm_Jf.js`).then(e=>({default:e.Roles})),__vite__mapDeps([35,1,2,3,11,6,5,7,8,12,21,9,15]))),Io=$(()=>j(()=>import(`./RoleDetail-B2M6ALSl.js`).then(e=>({default:e.RoleDetail})),__vite__mapDeps([36,1,2,3,17,11,6,19,37,29,8,13,14,5,7,25,12,21,9,15]))),Lo=$(()=>j(()=>import(`./FeatureRequests-D_4XaQ7F.js`).then(e=>({default:e.FeatureRequests})),__vite__mapDeps([38,1,2,3,11,6,7,8,12,13]))),Ro=$(()=>j(()=>import(`./Mistakes-BZcTg0vP.js`).then(e=>({default:e.Mistakes})),__vite__mapDeps([39,1,2,3,11,6,7,8,12,13]))),zo=$(()=>j(()=>import(`./NotFound-t66RIvqO.js`),__vite__mapDeps([40,2,1,3]))),Bo=$(()=>j(()=>import(`./Events-BKxqZ9j6.js`).then(e=>({default:e.Events})),__vite__mapDeps([41,1,2,3,17,11,6,19,7,8,12,21,13,9]))),Vo=$(()=>j(()=>import(`./EventDefDetail-C3S1G0K8.js`).then(e=>({default:e.EventDefDetail})),__vite__mapDeps([42,1,2,3,11,6,7,8,12,21,13]))),Ho=$(()=>j(()=>import(`./Extensions-MLZk05j0.js`).then(e=>({default:e.Extensions})),__vite__mapDeps([43,1,2,3,11,6,5,8,12,13,14]))),Uo=$(()=>j(()=>import(`./ExtensionDetail-C8aPpyLv.js`).then(e=>({default:e.ExtensionDetail})),__vite__mapDeps([44,1,2,3,11,6,5,8,13,14]))),Wo=$(()=>j(()=>import(`./Artifacts-BrhnC1Ef.js`).then(e=>({default:e.Artifacts})),__vite__mapDeps([45,1,2,3,23,13,4]))),Go=$(()=>j(()=>import(`./Cost-K8-4xqBe.js`).then(e=>({default:e.Cost})),__vite__mapDeps([46,1,2,3,11,6,37,5,8,12,13])));function Ko(){return(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,H.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-2 border-[var(--app-border)] border-t-[var(--app-accent)]`})})}function qo(){let e=window.location.pathname,t=Se();return e===`/ui/login`||!t?(0,H.jsx)(bo,{}):(0,H.jsxs)(V.Suspense,{fallback:(0,H.jsx)(Ko,{}),children:[(0,H.jsxs)(M,{children:[(0,H.jsx)(A,{path:`login`,element:(0,H.jsx)(bo,{})}),(0,H.jsxs)(A,{element:(0,H.jsx)(Pi,{}),children:[(0,H.jsx)(A,{index:!0,element:(0,H.jsx)(xo,{})}),(0,H.jsx)(A,{path:`chat`,element:(0,H.jsx)(So,{})}),(0,H.jsx)(A,{path:`work`,element:(0,H.jsx)(Co,{})}),(0,H.jsx)(A,{path:`tasks/:id`,element:(0,H.jsx)(wo,{})}),(0,H.jsx)(A,{path:`plugins`,element:(0,H.jsx)(To,{})}),(0,H.jsx)(A,{path:`extensions`,element:(0,H.jsx)(Ho,{})}),(0,H.jsx)(A,{path:`extensions/:name`,element:(0,H.jsx)(Uo,{})}),(0,H.jsx)(A,{path:`roles`,element:(0,H.jsx)(Fo,{})}),(0,H.jsx)(A,{path:`roles/:id`,element:(0,H.jsx)(Io,{})}),(0,H.jsx)(A,{path:`feature-requests`,element:(0,H.jsx)(Lo,{})}),(0,H.jsx)(A,{path:`mistakes`,element:(0,H.jsx)(Ro,{})}),(0,H.jsx)(A,{path:`events`,element:(0,H.jsx)(Bo,{})}),(0,H.jsx)(A,{path:`events/:id`,element:(0,H.jsx)(Vo,{})}),(0,H.jsx)(A,{path:`channels`,element:(0,H.jsx)(Mo,{})}),(0,H.jsx)(A,{path:`channels/:id`,element:(0,H.jsx)(Po,{})}),(0,H.jsx)(A,{path:`artifacts`,element:(0,H.jsx)(Wo,{})}),(0,H.jsx)(A,{path:`strategies`,element:(0,H.jsx)(Eo,{})}),(0,H.jsx)(A,{path:`goals`,element:(0,H.jsx)(Do,{})}),(0,H.jsx)(A,{path:`goals/:id`,element:(0,H.jsx)(No,{})}),(0,H.jsx)(A,{path:`logs`,element:(0,H.jsx)(Oo,{})}),(0,H.jsx)(A,{path:`settings`,element:(0,H.jsx)(ko,{})}),(0,H.jsx)(A,{path:`memories`,element:(0,H.jsx)(Ao,{})}),(0,H.jsx)(A,{path:`evolution`,element:(0,H.jsx)(jo,{})}),(0,H.jsx)(A,{path:`cost`,element:(0,H.jsx)(Go,{})}),(0,H.jsx)(A,{path:`*`,element:(0,H.jsx)(zo,{})})]})]}),(0,H.jsx)(yo,{})]})}var Jo=T([{path:`*`,element:(0,H.jsx)(qo,{})}],{basename:`/ui`});(0,we.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(Te,{children:(0,H.jsx)(k,{router:Jo})})}));export{zn as C,Hn as S,$r as _,po as a,or as b,co as c,ro as d,Mi as f,Zr as g,ei as h,fo as i,so as l,Qr as m,go as n,oo as o,hi as p,no as r,uo as s,ho as t,lo as u,ar as v,ir as x,sr as y};
|
|
12
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return V.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},qa=Ea,Ja=Oa,Ya=Aa,Xa=Ma,Za=La,Qa=Ua,$a=Ga,eo=za,to=Va,no=qa,ro=Ja,io=Ya,ao=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Xa,{ref:n,className:P(`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}));ao.displayName=Xa.displayName;var oo=V.forwardRef(({className:e,...t},n)=>(0,H.jsxs)(io,{children:[(0,H.jsx)(ao,{}),(0,H.jsx)(Za,{ref:n,className:P(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border border-[var(--app-border)] bg-[var(--app-panel)] 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})]}));oo.displayName=Za.displayName;var so=({className:e,...t})=>(0,H.jsx)(`div`,{className:P(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});so.displayName=`AlertDialogHeader`;var co=({className:e,...t})=>(0,H.jsx)(`div`,{className:P(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});co.displayName=`AlertDialogFooter`;var lo=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(eo,{ref:n,className:P(`text-lg font-semibold text-[var(--app-text)]`,e),...t}));lo.displayName=eo.displayName;var uo=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(to,{ref:n,className:P(`text-sm text-[var(--app-text-muted)]`,e),...t}));uo.displayName=to.displayName;var fo=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)(Qa,{ref:n,className:P(ge(),e),...t}));fo.displayName=Qa.displayName;var po=V.forwardRef(({className:e,...t},n)=>(0,H.jsx)($a,{ref:n,className:P(ge({variant:`ghost`}),`mt-2 sm:mt-0`,e),...t}));po.displayName=$a.displayName;var mo=ne(`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-[var(--app-panel-muted)] text-[var(--app-text)]`,secondary:`bg-[var(--app-panel-elevated)] text-[var(--app-text-muted)]`,destructive:`bg-[var(--app-danger-soft-bg)] text-[var(--app-danger)] border border-[var(--app-danger-soft-border)]`,outline:`border border-[var(--app-border)] text-[var(--app-text)]`,success:`bg-[var(--app-success-soft-bg)] text-[var(--app-success)] border border-[var(--app-success-soft-border)]`,warning:`bg-[var(--app-warning-soft-bg)] text-[var(--app-warning)] border border-[var(--app-warning-soft-border)]`,info:`bg-[var(--app-accent-soft-bg)] text-[var(--app-accent)] border border-[var(--app-accent-soft-border)]`,muted:`bg-[var(--app-panel-elevated)] text-[var(--app-text-subtle)]`}},defaultVariants:{variant:`default`}});function ho({className:e,variant:t=`default`,...n}){return(0,H.jsx)(`span`,{className:P(mo({variant:t}),e),...n})}function go(e){switch(e){case`blocked`:return`warning`;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 _o=300;function vo(e){return e===`high`?`destructive`:e===`medium`?`outline`:`secondary`}function yo(){let e=Mi(e=>e.pendingPlanApproval),t=Mi(e=>e.approvePlan),n=Mi(e=>e.denyPlan),r=Mi(e=>e.planTimeoutNotice),i=Mi(e=>e.clearPlanTimeoutNotice),[a,o]=(0,V.useState)(_o),[s,c]=(0,V.useState)(!1);(0,V.useEffect)(()=>{if(!e){o(_o),c(!1);return}let t=setInterval(()=>{o(e=>e<=1?(clearInterval(t),0):e-1)},1e3);return()=>clearInterval(t)},[e?.planId]),(0,V.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,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(no,{open:!!e,children:(0,H.jsxs)(oo,{className:`max-w-2xl max-h-[80vh] overflow-y-auto`,children:[(0,H.jsxs)(so,{children:[(0,H.jsxs)(lo,{className:`flex items-center gap-2`,children:[`Execution Plan — Approval Required`,d&&(0,H.jsxs)(ho,{variant:vo(d.overallRisk),children:[d.overallRisk.toUpperCase(),` RISK`]})]}),(0,H.jsxs)(uo,{className:`text-xs text-[var(--app-text-muted)]`,children:[`Plan `,e?.planId,` | Task `,e?.taskId,` | `,a,`s remaining`]})]}),d&&(0,H.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsxs)(`h4`,{className:`text-sm font-medium text-[var(--app-text)] mb-2`,children:[`Plan Steps (`,d.steps.length,`)`]}),(0,H.jsx)(`div`,{className:`space-y-2`,children:d.steps.map(e=>(0,H.jsxs)(`div`,{className:`rounded-md border border-[var(--app-border)] bg-[var(--app-panel-elevated)]/50 p-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-start justify-between gap-2`,children:[(0,H.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,H.jsxs)(`span`,{className:`text-xs font-mono text-[var(--app-text-subtle)]`,children:[`#`,e.index]}),(0,H.jsx)(`span`,{className:`text-sm text-[var(--app-text)]`,children:e.description})]}),(0,H.jsx)(ho,{variant:vo(e.riskLevel),children:e.riskLevel})]}),(0,H.jsxs)(`div`,{className:`mt-1 text-xs text-[var(--app-text-muted)]`,children:[`Tools: `,e.toolsNeeded.join(`, `)||`none`]})]},e.index))})]}),Object.keys(d.requiredPermissions).length>0&&(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`h4`,{className:`text-sm font-medium text-[var(--app-text)] mb-1`,children:`Required Permissions`}),(0,H.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:Object.keys(d.requiredPermissions).map(e=>(0,H.jsx)(ho,{variant:`secondary`,children:e},e))})]})]}),(0,H.jsxs)(co,{children:[(0,H.jsx)(_e,{variant:`destructive`,onClick:u,disabled:s,children:`Deny`}),(0,H.jsx)(_e,{variant:`outline`,onClick:()=>l(`permanent`),disabled:s,children:`Allow Permanent`}),(0,H.jsx)(_e,{onClick:()=>l(`once`),disabled:s,children:`Allow Once`})]})]})}),r&&(0,H.jsxs)(`div`,{className:`fixed bottom-4 right-4 z-50 rounded-md border border-[var(--app-warning-soft-border)] bg-[var(--app-warning-soft-bg)] px-4 py-2 text-sm text-[var(--app-warning-soft-text)] shadow-[var(--app-shadow-lg)]`,children:[r,(0,H.jsx)(`button`,{className:`ml-3 text-[var(--app-warning)] hover:text-[var(--app-warning-soft-text)]`,onClick:i,children:`Dismiss`})]})]})}function $(e){return(0,V.lazy)(()=>e().catch(e=>{let t=`chunk-reload-`+window.location.pathname;if(!sessionStorage.getItem(t))return sessionStorage.setItem(t,`1`),window.location.reload(),new Promise(()=>{});throw sessionStorage.removeItem(t),e}))}function bo(){let[e,t]=(0,V.useState)(``),[n,r]=(0,V.useState)(null),[i,a]=(0,V.useState)(!1),o=new URLSearchParams(window.location.search).get(`returnTo`)??`/ui`;async function s(t){t.preventDefault();let n=e.trim();if(!n){r(`API key is required`);return}r(null),a(!0);try{if(!await ye(n)){r(`Invalid API key`),a(!1);return}xe(n),window.location.href=o}catch(e){r(e instanceof Error?e.message:`Verification failed`),a(!1)}}return(0,H.jsx)(`div`,{className:`flex h-screen items-center justify-center bg-[var(--app-bg)] text-[var(--app-fg)]`,children:(0,H.jsxs)(`form`,{onSubmit:s,className:`w-full max-w-md rounded-lg border border-[var(--app-border)] bg-[var(--app-panel)] p-8 shadow-lg`,children:[(0,H.jsx)(`h1`,{className:`mb-2 text-2xl font-semibold`,children:`Adam — Sign in`}),(0,H.jsx)(`p`,{className:`mb-6 text-sm text-[var(--app-muted)]`,children:`Paste your API key to continue.`}),(0,H.jsx)(`label`,{className:`mb-1 block text-sm font-medium`,children:`API key`}),(0,H.jsx)(`input`,{type:`password`,value:e,onChange:e=>t(e.target.value),placeholder:`64-character hex string`,className:`mb-4 w-full rounded border border-[var(--app-border)] bg-[var(--app-bg)] px-3 py-2 font-mono text-sm outline-none focus:border-[var(--app-accent)]`,autoFocus:!0,disabled:i}),n&&(0,H.jsx)(`div`,{className:`mb-4 rounded border border-red-500/30 bg-red-500/10 px-3 py-2 text-sm text-red-400`,children:n}),(0,H.jsx)(`button`,{type:`submit`,disabled:i,className:`w-full rounded bg-[var(--app-accent)] px-4 py-2 font-medium text-[var(--app-accent-fg)] transition hover:opacity-90 disabled:opacity-50`,children:i?`Verifying...`:`Sign in`}),(0,H.jsxs)(`details`,{className:`mt-6 text-xs text-[var(--app-muted)]`,children:[(0,H.jsx)(`summary`,{className:`cursor-pointer select-none`,children:`Where do I find my API key?`}),(0,H.jsxs)(`div`,{className:`mt-2 space-y-1 leading-relaxed`,children:[(0,H.jsxs)(`p`,{children:[`Adam generates a random API key on first boot and stores it at`,` `,(0,H.jsx)(`code`,{className:`rounded bg-[var(--app-bg)] px-1`,children:`~/.adam/adam.key`}),`.`]}),(0,H.jsxs)(`p`,{children:[`Local: `,(0,H.jsx)(`code`,{className:`rounded bg-[var(--app-bg)] px-1`,children:`cat ~/.adam/adam.key`})]}),(0,H.jsxs)(`p`,{children:[`Remote (VPS): `,(0,H.jsx)(`code`,{className:`rounded bg-[var(--app-bg)] px-1`,children:`ssh <host> cat ~/.adam/adam.key`})]}),(0,H.jsx)(`p`,{children:`Rotation resets all logged-in sessions. Do it from Settings → API Key.`})]})]})]})})}var xo=$(()=>j(()=>import(`./Dashboard-BT39_iWc.js`).then(e=>({default:e.Dashboard})),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))),So=$(()=>j(()=>import(`./Chat-PUz41HFr.js`).then(e=>({default:e.Chat})),__vite__mapDeps([10,1,2,3,11,6,4,5,12,13,9,14,15]))),Co=$(()=>j(()=>import(`./Work-DbFst_9-.js`).then(e=>({default:e.Work})),__vite__mapDeps([16,1,2,3,17,11,6,18,19,4,5,7,8,12,20,13,9,21,14,15]))),wo=$(()=>j(()=>import(`./TaskDetail-B0G5ZjDD.js`).then(e=>({default:e.TaskDetail})),__vite__mapDeps([22,1,2,3,11,6,23,13,5,7,8,9,14]))),To=$(()=>j(()=>import(`./Plugins-v17MyPVe.js`).then(e=>({default:e.Plugins})),__vite__mapDeps([24,1,2,3,17,11,6,18,5,7,25,12,13,14,8,21,9]))),Eo=$(()=>j(()=>import(`./Strategies-CXQYvCkc.js`).then(e=>({default:e.Strategies})),__vite__mapDeps([26,1,2,3,11,6,5,8,12,21,9]))),Do=$(()=>j(()=>import(`./Goals-B-__r-Yq.js`).then(e=>({default:e.Goals})),__vite__mapDeps([20,1,2,3,17,11,6,5,8,12,13,9]))),Oo=$(()=>j(()=>import(`./Logs-CMkjUkmu.js`).then(e=>({default:e.Logs})),__vite__mapDeps([27,1,2,3,11,6,5,8,12,14]))),ko=$(()=>j(()=>import(`./Settings-QuKwKbKg.js`).then(e=>({default:e.Settings})),__vite__mapDeps([28,1,2,3,17,11,6,29,8,13,14,5,7,12,9]))),Ao=$(()=>j(()=>import(`./Memories-Q1eKfPQ2.js`).then(e=>({default:e.Memories})),__vite__mapDeps([30,1,2,3,11,6,5,7,8,12,13,9]))),jo=$(()=>j(()=>import(`./Evolution-DsWyv2_a.js`).then(e=>({default:e.Evolution})),__vite__mapDeps([31,1,2,3,11,6,5,8,12,13,9]))),Mo=$(()=>j(()=>import(`./Channels-CAxTh1Bp.js`).then(e=>({default:e.Channels})),__vite__mapDeps([32,1,2,3,11,6,5,7,8,12,13,14]))),No=$(()=>j(()=>import(`./GoalDetail-L3T1zqqs.js`).then(e=>({default:e.GoalDetail})),__vite__mapDeps([33,1,2,3,5,6,7,8,13,9]))),Po=$(()=>j(()=>import(`./ChannelDetail-CSq9o5fq.js`).then(e=>({default:e.ChannelDetail})),__vite__mapDeps([34,1,2,3,5,6,7,8,13,9]))),Fo=$(()=>j(()=>import(`./Roles-C7SNebvY.js`).then(e=>({default:e.Roles})),__vite__mapDeps([35,1,2,3,11,6,5,7,8,12,21,9,15]))),Io=$(()=>j(()=>import(`./RoleDetail-DCGFBLP1.js`).then(e=>({default:e.RoleDetail})),__vite__mapDeps([36,1,2,3,17,11,6,19,37,29,8,13,14,5,7,25,12,21,9,15]))),Lo=$(()=>j(()=>import(`./FeatureRequests-3Yl8wTNT.js`).then(e=>({default:e.FeatureRequests})),__vite__mapDeps([38,1,2,3,11,6,7,8,12,13]))),Ro=$(()=>j(()=>import(`./Mistakes-BROkixt_.js`).then(e=>({default:e.Mistakes})),__vite__mapDeps([39,1,2,3,11,6,7,8,12,13]))),zo=$(()=>j(()=>import(`./NotFound-t66RIvqO.js`),__vite__mapDeps([40,2,1,3]))),Bo=$(()=>j(()=>import(`./Events-CpeHg3fh.js`).then(e=>({default:e.Events})),__vite__mapDeps([41,1,2,3,17,11,6,19,7,8,12,21,13,9]))),Vo=$(()=>j(()=>import(`./EventDefDetail-jKN3gO_7.js`).then(e=>({default:e.EventDefDetail})),__vite__mapDeps([42,1,2,3,11,6,7,8,12,21,13]))),Ho=$(()=>j(()=>import(`./Extensions-Pg2vx_ZK.js`).then(e=>({default:e.Extensions})),__vite__mapDeps([43,1,2,3,11,6,5,8,12,13,14]))),Uo=$(()=>j(()=>import(`./ExtensionDetail-CJHNaNii.js`).then(e=>({default:e.ExtensionDetail})),__vite__mapDeps([44,1,2,3,11,6,5,8,13,14]))),Wo=$(()=>j(()=>import(`./Artifacts-BrhnC1Ef.js`).then(e=>({default:e.Artifacts})),__vite__mapDeps([45,1,2,3,23,13,4]))),Go=$(()=>j(()=>import(`./Cost-BHcsPz5T.js`).then(e=>({default:e.Cost})),__vite__mapDeps([46,1,2,3,11,6,37,5,8,12,13])));function Ko(){return(0,H.jsx)(`div`,{className:`flex h-full items-center justify-center`,children:(0,H.jsx)(`div`,{className:`h-8 w-8 animate-spin rounded-full border-2 border-[var(--app-border)] border-t-[var(--app-accent)]`})})}function qo(){let e=window.location.pathname,t=Se();return e===`/ui/login`||!t?(0,H.jsx)(bo,{}):(0,H.jsxs)(V.Suspense,{fallback:(0,H.jsx)(Ko,{}),children:[(0,H.jsxs)(M,{children:[(0,H.jsx)(A,{path:`login`,element:(0,H.jsx)(bo,{})}),(0,H.jsxs)(A,{element:(0,H.jsx)(Pi,{}),children:[(0,H.jsx)(A,{index:!0,element:(0,H.jsx)(xo,{})}),(0,H.jsx)(A,{path:`chat`,element:(0,H.jsx)(So,{})}),(0,H.jsx)(A,{path:`work`,element:(0,H.jsx)(Co,{})}),(0,H.jsx)(A,{path:`tasks/:id`,element:(0,H.jsx)(wo,{})}),(0,H.jsx)(A,{path:`plugins`,element:(0,H.jsx)(To,{})}),(0,H.jsx)(A,{path:`extensions`,element:(0,H.jsx)(Ho,{})}),(0,H.jsx)(A,{path:`extensions/:name`,element:(0,H.jsx)(Uo,{})}),(0,H.jsx)(A,{path:`roles`,element:(0,H.jsx)(Fo,{})}),(0,H.jsx)(A,{path:`roles/:id`,element:(0,H.jsx)(Io,{})}),(0,H.jsx)(A,{path:`feature-requests`,element:(0,H.jsx)(Lo,{})}),(0,H.jsx)(A,{path:`mistakes`,element:(0,H.jsx)(Ro,{})}),(0,H.jsx)(A,{path:`events`,element:(0,H.jsx)(Bo,{})}),(0,H.jsx)(A,{path:`events/:id`,element:(0,H.jsx)(Vo,{})}),(0,H.jsx)(A,{path:`channels`,element:(0,H.jsx)(Mo,{})}),(0,H.jsx)(A,{path:`channels/:id`,element:(0,H.jsx)(Po,{})}),(0,H.jsx)(A,{path:`artifacts`,element:(0,H.jsx)(Wo,{})}),(0,H.jsx)(A,{path:`strategies`,element:(0,H.jsx)(Eo,{})}),(0,H.jsx)(A,{path:`goals`,element:(0,H.jsx)(Do,{})}),(0,H.jsx)(A,{path:`goals/:id`,element:(0,H.jsx)(No,{})}),(0,H.jsx)(A,{path:`logs`,element:(0,H.jsx)(Oo,{})}),(0,H.jsx)(A,{path:`settings`,element:(0,H.jsx)(ko,{})}),(0,H.jsx)(A,{path:`memories`,element:(0,H.jsx)(Ao,{})}),(0,H.jsx)(A,{path:`evolution`,element:(0,H.jsx)(jo,{})}),(0,H.jsx)(A,{path:`cost`,element:(0,H.jsx)(Go,{})}),(0,H.jsx)(A,{path:`*`,element:(0,H.jsx)(zo,{})})]})]}),(0,H.jsx)(yo,{})]})}var Jo=T([{path:`*`,element:(0,H.jsx)(qo,{})}],{basename:`/ui`});(0,we.createRoot)(document.getElementById(`root`)).render((0,H.jsx)(V.StrictMode,{children:(0,H.jsx)(Te,{children:(0,H.jsx)(k,{router:Jo})})}));export{zn as C,Hn as S,$r as _,po as a,or as b,co as c,ro as d,Mi as f,Zr as g,ei as h,fo as i,so as l,Qr as m,go as n,oo as o,hi as p,no as r,uo as s,ho as t,lo as u,ar as v,ir as x,sr as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{xt as t,z as n}from"./vendor-icons-Bc_e_XXa.js";import{t as r}from"./vendor-react-bQ_cvNuA.js";import{t as i}from"./Button-CRNb8sD3.js";import{t as a}from"./api-BP4ZP9kk.js";import{p as o,t as s}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-Dw2cE7zH.js";import{xt as t,z as n}from"./vendor-icons-Bc_e_XXa.js";import{t as r}from"./vendor-react-bQ_cvNuA.js";import{t as i}from"./Button-CRNb8sD3.js";import{t as a}from"./api-BP4ZP9kk.js";import{p as o,t as s}from"./index-Dd3NDYZR.js";import{t as c}from"./EmptyState-BvQA1o5K.js";import{t as l}from"./ui-D1crlGpt.js";var u=r();function d({plugin:e,workspacePath:t,onUninstall:r,onUpdate:a,operatingKey:o}){let c=o===`${e.pluginId}:${t}`;return(0,u.jsxs)(`div`,{className:`flex items-center justify-between rounded border border-[var(--app-border)] px-3 py-2`,children:[(0,u.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,u.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,u.jsx)(`span`,{className:`text-sm font-medium text-[var(--app-text)]`,children:e.name}),(0,u.jsxs)(`span`,{className:`text-xs text-[var(--app-text-muted)]`,children:[`v`,e.version]}),e.isRoleOnly?(0,u.jsx)(s,{variant:`muted`,className:`text-[10px]`,children:`Role-only`}):e.isOutdated?(0,u.jsx)(s,{variant:`warning`,className:`text-[10px]`,children:`⚠ behind user (v${e.userScopeVersion})`}):null]}),(0,u.jsx)(`p`,{className:`truncate font-mono text-[11px] text-[var(--app-text-subtle)]`,title:e.installPath,children:e.installPath})]}),(0,u.jsxs)(`div`,{className:`ml-3 flex items-center gap-1`,children:[e.isOutdated&&a?(0,u.jsx)(i,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-xs`,disabled:c,onClick:()=>void a(e.pluginId,t),children:c?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n,{size:l.xs,className:`animate-spin`}),`Update`]}):`Update`}):null,(0,u.jsx)(i,{variant:`ghost`,size:`sm`,className:`h-6 px-2 text-xs text-[var(--app-danger)]`,disabled:c,onClick:()=>void r(e.pluginId,t),children:c?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(n,{size:l.xs,className:`animate-spin`}),`Uninstall`]}):`Uninstall`})]})]})}function f({groups:e,layout:t=`full`,singleRoleId:n,onUninstall:r,onUpdate:i,operatingKey:a}){let o=t===`single-role`?e.filter(e=>e.roleId===n):e;return o.length===0?(0,u.jsx)(c,{title:t===`full`?`All Roles use the user-scope defaults`:`This Role uses the user-scope defaults`,className:`py-4`}):(0,u.jsx)(u.Fragment,{children:o.map(e=>{let n=e.workspacePath;return(0,u.jsxs)(`section`,{className:`space-y-2`,children:[t===`full`?(0,u.jsx)(`h4`,{className:`text-xs font-semibold uppercase tracking-[0.12em] text-[var(--app-text-muted)]`,children:e.roleName}):null,(0,u.jsx)(`div`,{className:`space-y-2`,children:e.plugins.map(e=>(0,u.jsx)(d,{plugin:e,workspacePath:n,onUninstall:r,onUpdate:i,operatingKey:a},e.pluginId))})]},e.roleId)})})}var p=e(t(),1);function m(e){let[t,n]=(0,p.useState)(null);return{operatingKey:t,installToRole:(0,p.useCallback)(async(t,r)=>{n(`${t}:${r}`);try{await a(`/plugins/install/${encodeURIComponent(t)}`,{method:`POST`,body:JSON.stringify({scope:`project`,cwd:r})}),o.success(`Installed ${t.split(`@`)[0]}`)}catch(e){o.error(e instanceof Error?e.message:`Install failed`)}finally{await e(),n(null)}},[e]),uninstallFromRole:(0,p.useCallback)(async(t,r)=>{n(`${t}:${r}`);try{await a(`/plugins/uninstall/${encodeURIComponent(t)}`,{method:`POST`,body:JSON.stringify({scope:`project`,cwd:r})}),o.success(`Uninstalled from Role`)}catch(e){o.error(e instanceof Error?e.message:`Uninstall failed`)}finally{await e(),n(null)}},[e]),updateRoleVersion:(0,p.useCallback)(async(t,r)=>{n(`${t}:${r}`);let i=!1;try{await a(`/plugins/uninstall/${encodeURIComponent(t)}`,{method:`POST`,body:JSON.stringify({scope:`project`,cwd:r})}),i=!0,await a(`/plugins/install/${encodeURIComponent(t)}`,{method:`POST`,body:JSON.stringify({scope:`project`,cwd:r})}),o.success(`Role updated to latest`)}catch(e){let t=e instanceof Error?e.message:`Update failed`;i?o.error(`Update failed after uninstall: ${t}. Role reverted to user-scope; re-install manually if needed.`,{duration:8e3}):o.error(`Update failed: ${t}`)}finally{await e(),n(null)}},[e])}}function h(e){let t=e.indexOf(`@`);return t===-1?``:e.slice(t+1)}function g(e,t){let n=e.split(`.`).map(e=>parseInt(e,10)||0),r=t.split(`.`).map(e=>parseInt(e,10)||0),i=Math.max(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e]??0,i=r[e]??0;if(t!==i)return t-i}return 0}function _(e,t){let n=e.filter(e=>e.scope===`user`),r=e.filter(e=>e.scope===`project`&&e.projectPath),i=new Map;for(let e of n)i.set(e.id,e);let a=new Map;for(let e of t)a.set(e.workspacePath,e);let o=n.map(e=>{let t=r.filter(t=>t.id===e.id&&a.has(t.projectPath)).map(t=>{let n=a.get(t.projectPath);return{roleId:n.id,roleName:n.name,workspacePath:n.workspacePath,version:t.version,installPath:t.installPath,isOutdated:g(t.version,e.version)<0,userScopeVersion:e.version}});return{id:e.id,name:e.id.split(`@`)[0],version:e.version,marketplace:h(e.id),scope:`user`,globalEnabled:e.globalEnabled,installPath:e.installPath,manifest:e.manifest,usedByRoles:t}}),s=new Map;for(let e of r){let t=a.get(e.projectPath);if(!t)continue;let n=i.get(e.id),r=n?.version??null,o=r?g(e.version,r)<0:!1,c=!n;if(n&&n.version===e.version)continue;let l=s.get(t.id)??[];l.push({pluginId:e.id,name:e.id.split(`@`)[0],version:e.version,installPath:e.installPath,userScopeVersion:r,isOutdated:o,isRoleOnly:c}),s.set(t.id,l)}return{userScope:o,projectScope:t.filter(e=>s.has(e.id)).map(e=>({roleId:e.id,roleName:e.name,workspacePath:e.workspacePath,plugins:s.get(e.id)}))}}function v(){let[e,t]=(0,p.useState)([]),[n,r]=(0,p.useState)([]),[i,o]=(0,p.useState)(!0),[s,c]=(0,p.useState)(null),l=(0,p.useCallback)(async()=>{o(!0),c(null);try{let[e,n]=await Promise.all([a(`/plugins`),a(`/roles`)]);t(e.plugins),r(n.roles)}catch(e){c(e instanceof Error?e.message:`Failed to load plugins`)}finally{o(!1)}},[]);(0,p.useEffect)(()=>{l()},[l]);let{userScope:u,projectScope:d}=_(e,n);return{userScope:u,projectScope:d,loading:i,error:s,refresh:l,rawPlugins:e,roles:n}}export{m as n,f as r,v as t};
|
package/web/dist/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/ui/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Adam</title>
|
|
8
|
-
<script type="module" crossorigin src="/ui/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/ui/assets/index-Dd3NDYZR.js"></script>
|
|
9
9
|
<link rel="modulepreload" crossorigin href="/ui/assets/rolldown-runtime-Dw2cE7zH.js">
|
|
10
10
|
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-icons-Bc_e_XXa.js">
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-react-bQ_cvNuA.js">
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/ui/assets/es2015-BkFSNOYE.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/ui/assets/vendor-state-BMVR_B0I.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/ui/assets/api-BP4ZP9kk.js">
|
|
17
|
-
<link rel="stylesheet" crossorigin href="/ui/assets/index-
|
|
17
|
+
<link rel="stylesheet" crossorigin href="/ui/assets/index-D35OGE0z.css">
|
|
18
18
|
</head>
|
|
19
19
|
<body class="bg-slate-950 text-slate-100">
|
|
20
20
|
<div id="root"></div>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as a,d as b,e as c,f as d,g as e}from"./chunk-JROGEBP5.js";import"./chunk-TWOJVEO7.js";import"./chunk-JYZTIE2J.js";import"./chunk-HRPMRWHD.js";import"./chunk-TA5PFK5C.js";import"./chunk-OBD4245G.js";import"./chunk-4JHACUZY.js";import"./chunk-VWX2B6OM.js";import"./chunk-L7JP7DUO.js";import"./chunk-2A2TXYT3.js";import"./chunk-6WQFYV3N.js";import"./chunk-NUOTFUNF.js";import"./chunk-NXGR3PRY.js";import"./chunk-3MROEPGR.js";import"./chunk-BE653A45.js";import"./chunk-WY5BOCQP.js";import"./chunk-VO24C673.js";import"./chunk-EZLBMUQD.js";import"./chunk-5M6IGE5G.js";import"./chunk-5PELJRUQ.js";export{b as formatPlanForChannel,e as getPendingApprovalRequestIds,d as handleInboundForApproval,a as parseApprovalReply,c as sendApprovalToChannel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,d as c}from"./chunk-OBD4245G.js";import"./chunk-WY5BOCQP.js";import"./chunk-VO24C673.js";import"./chunk-EZLBMUQD.js";import"./chunk-5M6IGE5G.js";import"./chunk-5PELJRUQ.js";c();export{b as listAuditDiagnostics,a as recordAuditDiagnostic};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{L as a,M as b,N as c,O as d,P as e,Q as f,R as g}from"./chunk-ZJ3TS4FL.js";import"./chunk-QMW7VEPC.js";import"./chunk-UCUELFCS.js";import"./chunk-XAPJJAJQ.js";import"./chunk-SKHMWKJT.js";import"./chunk-LCD5DVS6.js";import"./chunk-SGLZAIVL.js";import"./chunk-IEBAOZED.js";import"./chunk-JYZTIE2J.js";import"./chunk-O6L4UVLV.js";import"./chunk-QTGAK62Z.js";import"./chunk-MTRLUW7Z.js";import"./chunk-Z2APBKIT.js";import"./chunk-4JHACUZY.js";import"./chunk-NSUXJ2VA.js";import"./chunk-VWX2B6OM.js";import"./chunk-L7JP7DUO.js";import"./chunk-LKGYQJMS.js";import"./chunk-2JIQT2CI.js";import"./chunk-QYI44EP6.js";import"./chunk-T2Z2JDPY.js";import"./chunk-V2MMQ3SH.js";import"./chunk-2A2TXYT3.js";import"./chunk-AUSR5JYV.js";import"./chunk-NUOTFUNF.js";import"./chunk-NXGR3PRY.js";import"./chunk-3MROEPGR.js";import"./chunk-BE653A45.js";import"./chunk-WY5BOCQP.js";import"./chunk-VO24C673.js";import"./chunk-EZLBMUQD.js";import"./chunk-5M6IGE5G.js";import"./chunk-5PELJRUQ.js";export{e as auditAssistantCommitment,f as auditDeliveryClaims,a as evaluateTaskCompletion,g as getSecurityPosture,d as reportViolation,b as startAuditManager,c as stopAuditManager};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c}from"./chunk-BMCNQGUH.js";import"./chunk-3UFEOB6P.js";import"./chunk-UCUELFCS.js";import"./chunk-XAPJJAJQ.js";import"./chunk-SKHMWKJT.js";import"./chunk-LCD5DVS6.js";import"./chunk-2CE2WUUZ.js";import"./chunk-4N5G7ND2.js";import"./chunk-IEBAOZED.js";import"./chunk-NNMQGISW.js";import"./chunk-TWOJVEO7.js";import"./chunk-JYZTIE2J.js";import"./chunk-HRPMRWHD.js";import"./chunk-TA5PFK5C.js";import"./chunk-OBD4245G.js";import"./chunk-MTRLUW7Z.js";import"./chunk-Z2APBKIT.js";import"./chunk-4JHACUZY.js";import"./chunk-NSUXJ2VA.js";import"./chunk-VWX2B6OM.js";import"./chunk-L7JP7DUO.js";import"./chunk-T2Z2JDPY.js";import"./chunk-V2MMQ3SH.js";import"./chunk-2A2TXYT3.js";import"./chunk-6WQFYV3N.js";import"./chunk-NUOTFUNF.js";import"./chunk-47HJPIUA.js";import"./chunk-NXGR3PRY.js";import"./chunk-5G64P4KE.js";import"./chunk-3MROEPGR.js";import"./chunk-BE653A45.js";import"./chunk-WY5BOCQP.js";import"./chunk-VO24C673.js";import"./chunk-EZLBMUQD.js";import"./chunk-5M6IGE5G.js";import"./chunk-5PELJRUQ.js";export{a as BreeEngine,b as getBreeEngine,c as setBreeEngine};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as a,j as b,k as c}from"./chunk-VPMHZJS2.js";import"./chunk-IEBAOZED.js";import"./chunk-NNMQGISW.js";import"./chunk-HRPMRWHD.js";import"./chunk-TA5PFK5C.js";import"./chunk-OBD4245G.js";import"./chunk-6WQFYV3N.js";import"./chunk-NXGR3PRY.js";import"./chunk-3MROEPGR.js";import"./chunk-WY5BOCQP.js";import"./chunk-VO24C673.js";import"./chunk-EZLBMUQD.js";import"./chunk-5M6IGE5G.js";import"./chunk-5PELJRUQ.js";export{c as channelRoutes,b as getChannelManager,a as setChannelManager};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a,b,c}from"./chunk-JZBXLN7M.js";import"./chunk-WY5BOCQP.js";import"./chunk-VO24C673.js";import"./chunk-EZLBMUQD.js";import"./chunk-5PELJRUQ.js";export{c as hasAnyToolCallInTurn,b as listChatToolCallsByTrace,a as recordChatToolCall};
|