loomrail 0.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +4 -0
  3. package/README.md +266 -0
  4. package/apps/cli/dist/index.js +11154 -0
  5. package/apps/cli/migrations/0001_initial.sql +99 -0
  6. package/apps/cli/migrations/0002_mock_workflow.sql +169 -0
  7. package/apps/cli/migrations/0003_budget_pause_recovery.sql +154 -0
  8. package/apps/cli/migrations/0004_pipeline_started_budget_backfill.sql +72 -0
  9. package/apps/cli/migrations/0005_acceptance_evidence.sql +129 -0
  10. package/apps/cli/migrations/0006_session_handoff.sql +166 -0
  11. package/apps/cli/migrations/0007_pack_share_backoff.sql +11 -0
  12. package/apps/cli/migrations/0008_stage_attempt_counter_backfill.sql +169 -0
  13. package/apps/cli/migrations/0009_session_window_occupancy.sql +44 -0
  14. package/apps/cli/migrations/0010_provider_session_pid.sql +5 -0
  15. package/apps/cli/migrations/0011_work_item_workspaces.sql +94 -0
  16. package/apps/cli/migrations/0012_registered_repository_projects.sql +54 -0
  17. package/apps/cli/migrations/0013_stage_attempt_result_tree.sql +166 -0
  18. package/apps/cli/migrations/0014_live_evidence_provider.sql +49 -0
  19. package/apps/web/dist/assets/index-DjwvCSSY.js +5 -0
  20. package/apps/web/dist/assets/index-DjwvCSSY.js.map +1 -0
  21. package/apps/web/dist/assets/index-Z88TqCIf.css +1 -0
  22. package/apps/web/dist/assets/radix-vendor-CRdHXIPR.js +42 -0
  23. package/apps/web/dist/assets/radix-vendor-CRdHXIPR.js.map +1 -0
  24. package/apps/web/dist/assets/react-vendor-BicOiEU0.js +10 -0
  25. package/apps/web/dist/assets/react-vendor-BicOiEU0.js.map +1 -0
  26. package/apps/web/dist/assets/rolldown-runtime-CbXtAM7H.js +1 -0
  27. package/apps/web/dist/assets/tanstack-vendor-ec08LVZ_.js +2 -0
  28. package/apps/web/dist/assets/tanstack-vendor-ec08LVZ_.js.map +1 -0
  29. package/apps/web/dist/assets/validation-vendor-CGrOSWd3.js +65 -0
  30. package/apps/web/dist/assets/validation-vendor-CGrOSWd3.js.map +1 -0
  31. package/apps/web/dist/favicon.svg +5 -0
  32. package/apps/web/dist/index.html +60 -0
  33. package/apps/web/dist/theme-bootstrap.js +46 -0
  34. package/fixtures/projects/api-service-b/README.md +3 -0
  35. package/fixtures/projects/api-service-b/loomrail-fixture.json +6 -0
  36. package/fixtures/projects/web-app-a/README.md +3 -0
  37. package/fixtures/projects/web-app-a/loomrail-fixture.json +6 -0
  38. package/package.json +46 -0
@@ -0,0 +1,5 @@
1
+ import{n as e}from"./rolldown-runtime-CbXtAM7H.js";import{i as t,n,t as r}from"./react-vendor-BicOiEU0.js";import{a as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as ee,u as v}from"./tanstack-vendor-ec08LVZ_.js";import{a as y,c as b,d as te,f as x,i as S,l as ne,n as C,o as w,p as T,r as E,s as D,t as O,u as k}from"./validation-vendor-CGrOSWd3.js";import{A as re,B as ie,C as ae,D as oe,E as se,F as ce,I as le,L as ue,M as de,N as fe,O as pe,P as me,R as he,S as ge,T as _e,V as ve,_ as ye,a as be,b as xe,c as Se,d as Ce,f as we,g as Te,h as Ee,i as De,j as Oe,k as ke,l as Ae,m as je,n as Me,o as Ne,p as Pe,r as Fe,s as Ie,t as Le,u as Re,v as ze,w as Be,x as Ve,y as He,z as Ue}from"./radix-vendor-CRdHXIPR.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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var A=e(t(),1),We=n(),Ge={direction:`desc`,ordering:`priority`,showEmptyColumns:!0},Ke=[`priority`,`created`,`updated`,`title`],qe=e=>typeof e==`string`&&Ke.some(t=>t===e),Je=e=>e===`asc`||e===`desc`,Ye={LOW:0,MEDIUM:1,HIGH:2,URGENT:3},Xe=(e,t,n)=>e===`priority`?Ye[t.priority]-Ye[n.priority]:e===`created`?t.createdAt.localeCompare(n.createdAt):e===`updated`?t.updatedAt.localeCompare(n.updatedAt):t.title.localeCompare(n.title),Ze=(e,{direction:t,ordering:n})=>{let r=t===`asc`?1:-1;return[...e].sort((e,t)=>{let i=Xe(n,e,t);if(i!==0)return i*r;let a=e.createdAt.localeCompare(t.createdAt);return a===0?e.id.localeCompare(t.id):a*r})},Qe={active:[`BACKLOG`,`READY`,`IN_PROGRESS`,`BLOCKED`],backlog:[`BACKLOG`],all:[`BACKLOG`,`READY`,`IN_PROGRESS`,`BLOCKED`,`DONE`,`CANCELLED`]},$e=e=>e===`active`||e===`backlog`||e===`all`,et=(e,t)=>Qe[e].includes(t),j=y(1),tt=y(`v1`),M=k().trim().min(1).max(128).regex(/^[a-zA-Z0-9][a-zA-Z0-9._:-]*$/),nt=M,N=T({offset:!0}),P=b({type:O([`HUMAN`,`SYSTEM`]),id:M}).strict(),rt=b({projectId:M,aggregateType:O([`PROJECT`,`WORK_ITEM`]),aggregateId:M}).strict();b({status:O([`live`,`ready`]),apiVersion:tt,timestamp:N}).strict(),b({bootstrapToken:k().min(43).max(128)}).strict();var it=b({authenticated:y(!0),csrfToken:k().min(43).max(128),expiresAt:N}).strict(),at=b({apiVersion:tt,authenticated:y(!0),daemon:b({status:y(`online`),version:k(),mode:y(`local`),startedAt:N,platform:O([`darwin`,`win32`,`linux`,`other`])}).strict(),foundation:b({phase:y(`phase-0`),milestone:O([`M1`,`M2`,`M3`,`M4`,`M5`,`M6`]),providers:y(`mock-only`),persistence:O([`not-enabled`,`sqlite`])}).strict()}).strict(),ot=b({error:b({code:k(),message:k(),correlationId:nt,details:ne(k(),x()).optional()}).strict()}).strict(),st=k().regex(/^[0-9a-f]{40}$/),ct=k().trim().min(1).max(255),lt=k().trim().min(1).max(4e3),ut=C(k().trim().min(1).max(4096)).max(500),dt=O([`READY`,`ORPHANED`,`REMOVED`]),ft=b({schemaVersion:j,id:M,projectId:M,workItemId:M,branch:ct,worktreePath:lt,baseCommit:st.nullable(),snapshotCommit:st.nullable(),status:dt,leaseHolder:M.nullable(),createdAt:N,version:D().int().positive()}).strict(),pt=b({schemaVersion:j,sequence:D().int().positive(),id:M,aggregateId:M,projectId:M,actor:P,occurredAt:N,correlationId:nt}).strict(),mt=pt.extend({type:y(`WORK_ITEM_WORKSPACE_CREATED`),aggregateType:y(`WORK_ITEM`),data:b({workspace:ft,carriedPaths:ut}).strict()}),ht=pt.extend({type:y(`WORK_ITEM_WORKSPACE_ORPHANED`),aggregateType:y(`WORK_ITEM`),data:b({workspace:ft,previousStatus:dt}).strict()}),gt=b({schemaVersion:j,commandId:M,correlationId:nt,actor:P}).strict(),_t=gt.extend({type:y(`CREATE_WORK_ITEM_WORKSPACE`),payload:b({workItemId:M,projectId:M,branch:ct,worktreePath:lt,baseCommit:st.nullable(),snapshotCommit:st.nullable(),carriedPaths:ut}).strict()}),vt=gt.extend({type:y(`ACQUIRE_WORKSPACE_LEASE`),payload:b({workspaceId:M,stageAttemptId:M,expectedVersion:D().int().positive()}).strict()}),yt=gt.extend({type:y(`RELEASE_WORKSPACE_LEASE`),payload:b({workspaceId:M,stageAttemptId:M,expectedVersion:D().int().positive()}).strict()}),bt=gt.extend({type:y(`MARK_WORKSPACE_ORPHANED`),payload:b({workspaceId:M,expectedVersion:D().int().positive()}).strict()}),xt=b({schemaVersion:j,type:y(`WORK_ITEM_WORKSPACE_CREATED`),replayed:E(),workItemId:M,workspace:ft,event:mt}).strict(),St=b({schemaVersion:j,type:y(`WORKSPACE_LEASE_ACQUIRED`),replayed:E(),workItemId:M,workspace:ft,events:C(w())}).strict(),Ct=b({schemaVersion:j,type:y(`WORKSPACE_LEASE_RELEASED`),replayed:E(),workItemId:M,workspace:ft,events:C(w())}).strict(),wt=b({schemaVersion:j,type:y(`WORK_ITEM_WORKSPACE_ORPHANED`),replayed:E(),workItemId:M,workspace:ft,event:ht}).strict(),Tt=ft.omit({leaseHolder:!0,id:!0,projectId:!0,workItemId:!0,createdAt:!0,version:!0}),Et=b({schemaVersion:j,workspace:Tt.nullable()}).strict(),Dt=O([`ADDED`,`MODIFIED`,`DELETED`,`RENAMED`]),Ot=k().min(1).max(4096),kt=D().int().nonnegative().nullable(),At=b({path:Ot,previousPath:Ot.nullable(),status:Dt,insertions:kt,deletions:kt,binary:E()}).strict(),jt=b({schemaVersion:j,baseline:st,files:C(At),truncated:E()}).strict(),Mt=b({schemaVersion:j,path:Ot,baseline:st,binary:E(),patch:k().nullable(),truncated:E(),omittedBytes:D().int().nonnegative()}).strict(),Nt=b({schemaVersion:j,changes:jt.nullable()}).strict(),Pt=b({schemaVersion:j,diff:Mt.nullable()}).strict(),Ft=k().regex(/^[0-9a-f]{40}$/),It=O([`DISCOVERY`,`PLAN`,`IMPLEMENT`,`REVIEW`,`QA`,`ACCEPTANCE`]),Lt=O([`MOCK`,`CODEX`,`CLAUDE_CODE`]),Rt=O([`RUNNING`,`WAITING_HUMAN`,`SOFT_PAUSED`,`HARD_PAUSED`,`INTERRUPTED`,`SUCCEEDED`,`FAILED`,`CANCELLED`]),zt=O([`PENDING`,`QUEUED`,`RUNNING`,`WAITING_HUMAN`,`SOFT_PAUSED`,`HARD_PAUSED`,`SUCCEEDED`,`FAILED`,`CANCELLED`,`INTERRUPTED`,`RECOVERING`,`STALE`]),Bt=O([`SINGLE_CHOICE`,`MULTIPLE_CHOICE`,`CONFIRMATION`,`FREE_TEXT`]),Vt=O([`OPEN`,`CLAIMED`,`SNOOZED`,`RESOLVED`,`EXPIRED`,`CANCELLED`]),Ht=O([`START`,`RESUME`]),Ut=O([`PENDING`,`COMPLETED`,`FAILED`]),Wt=O([`ACTUAL`,`PROVIDER_ESTIMATE`,`LOOMRAIL_ESTIMATE`]),Gt=y(`ESTIMATED_TOKENS`),Kt=O([`SOFT`,`HARD`]),qt=y(`DAEMON_RESTART`),Jt=O([`REVIEW_REPORT`,`QA_REPORT`]),Yt=y(`PASSED`),Xt=O([`PENDING`,`ACCEPTED`,`RETURNED`,`REJECTED`]),Zt=O([`ACCEPT`,`RETURN_TO_WORK`,`REJECT`]),Qt=O([`RUNNING`,`ENDED`]),$t=O([`COMPLETED`,`HANDOFF`,`CONTEXT_EXHAUSTED`,`INTERRUPTED`,`CANCELLED`]),en=O([`WORK_ITEM`,`DECISION`,`CHECKPOINT`,`EVIDENCE`,`ACTIVITY`]),tn=y(`WORKFLOW_TEMPLATE`),nn=y(`CONTEXT_BUDGET`),rn=k().trim().min(1).max(200),F=k().trim().min(1).max(4e3),an=D().positive().max(1),on=O([`WORK_ITEM_BRIEF`,`WORKFLOW_POSITION`,`DECISIONS`,`LATEST_CHECKPOINT`,`EVIDENCE`,`ACTIVITY`]),sn=b({id:on,ordinal:D().int().nonnegative(),required:E()}).strict(),cn=b({schemaVersion:j,sections:C(sn).min(1).max(20)}).strict();b({schemaVersion:j,text:k(),contentHash:k().regex(/^sha256:[0-9a-f]{64}$/)}).strict();var ln=b({kind:en,id:M,version:D().int().positive()}).strict(),un=b({id:on,sources:C(ln).max(200),bytes:D().int().nonnegative()}).strict(),dn=b({id:on,reason:nn}).strict(),fn=b({schemaVersion:j,id:M,providerSessionId:M,templateId:M,templateVersion:D().int().positive(),specSource:tn,sections:C(un).min(1).max(20),omitted:C(dn).max(20),contentHash:k().regex(/^sha256:[0-9a-f]{64}$/),estimatedTokens:D().int().nonnegative(),budgetTokens:D().int().positive(),estimateQuality:Wt,createdAt:N}).strict(),pn=D().int().positive(),I=b({schemaVersion:j,id:M,stageAttemptId:M,ordinal:D().int().positive(),status:Qt,endReason:$t.nullable(),handoffRequestedAt:N.nullable(),startedAt:N,endedAt:N.nullable(),version:D().int().positive(),pid:pn.nullable()}).strict().refine(e=>e.status===`ENDED`==(e.endReason!==null),`An ended session must carry an end reason and a running one must not`).refine(e=>e.status===`ENDED`==(e.endedAt!==null),`An ended session must carry an end timestamp and a running one must not`),mn=b({summary:F,completed:C(k().trim().min(1).max(500)).max(50),remaining:C(k().trim().min(1).max(500)).max(50),deadEnds:C(k().trim().min(1).max(500)).max(50),openQuestions:C(k().trim().min(1).max(500)).max(50)}).strict(),hn=mn.extend({schemaVersion:j,id:M,stageAttemptId:M,providerSessionId:M,ordinal:D().int().positive(),createdAt:N}).strict(),gn=b({usedTokens:D().int().nonnegative(),windowTokens:D().int().positive(),quality:Wt}).strict().refine(e=>e.usedTokens<=e.windowTokens,`Usage cannot exceed the window`);b({inputTokens:D().int().nonnegative(),outputTokens:D().int().nonnegative(),cachedInputTokens:D().int().nonnegative().optional(),reasoningOutputTokens:D().int().nonnegative().optional(),costUsd:D().nonnegative().optional(),quality:Wt}).strict();var _n=b({stage:It,ordinal:D().int().nonnegative(),contextPack:cn}).strict(),vn=b({schemaVersion:j,id:M,version:D().int().positive(),name:rn,stages:C(_n).min(1).max(20)}).strict(),L=b({schemaVersion:j,id:M,projectId:M,workItemId:M,workflowTemplateId:M,workflowVersion:D().int().positive(),status:Rt,currentStageAttemptId:M,version:D().int().positive(),createdAt:N,updatedAt:N,finishedAt:N.nullable()}).strict(),R=b({schemaVersion:j,id:M,pipelineRunId:M,projectId:M,workItemId:M,stage:It,attempt:D().int().positive(),status:zt,version:D().int().positive(),startedAt:N.nullable(),finishedAt:N.nullable(),failureCode:k().trim().min(1).max(100).nullable(),unproductiveSessions:D().int().nonnegative(),packShareBackoffs:D().int().nonnegative(),resultTree:Ft.nullable()}).strict(),yn=[`NO_PROGRESS`,`CONTEXT_FLOOR_EXCEEDED`,`PROVIDER_REJECTED_PACK`,`PROVIDER_START_FAILED`,`SESSION_LIMIT_REACHED`],bn=e=>e!==null&&yn.includes(e),xn=b({schemaVersion:j,id:M,projectId:M,workItemId:M,pipelineRunId:M,revision:D().int().positive(),maxEstimatedTokens:D().int().positive(),warningThresholds:C(an).min(1).max(10),createdBy:P,createdAt:N}).strict(),Sn=b({schemaVersion:j,id:M,projectId:M,workItemId:M,pipelineRunId:M,stageAttemptId:M,budgetPolicyId:M,kind:Gt,amount:D().int().positive(),quality:Wt,recordedAt:N}).strict(),Cn=b({schemaVersion:j,id:M,projectId:M,workItemId:M,pipelineRunId:M,stageAttemptId:M,previousStatus:y(`RUNNING`),recoveredStatus:y(`INTERRUPTED`),reason:qt,createdAt:N}).strict(),wn=b({kind:Jt,title:rn,summary:F,checks:C(k().trim().min(1).max(500)).min(1).max(20)}).strict(),Tn=wn.extend({schemaVersion:j,id:M,projectId:M,workItemId:M,pipelineRunId:M,stageAttemptId:M,stage:O([`REVIEW`,`QA`]),status:Yt,provider:Lt,createdAt:N}).strict(),En=b({criterion:k().trim().min(1).max(500),implementation:F,reviewArtifactId:M,qaArtifactId:M,verification:F,knownRisk:F.nullable()}).strict(),Dn=b({schemaVersion:j,id:M,projectId:M,workItemId:M,pipelineRunId:M,stageAttemptId:M,humanRequestId:M,status:Xt,criteria:C(En).max(50),artifactIds:C(M).min(2).max(20),releaseNote:F,verifyInstructions:C(F).min(1).max(20),version:D().int().positive(),createdAt:N,resolvedAt:N.nullable(),resolvedBy:P.nullable(),resolutionReason:F.nullable()}).strict(),On=b({id:M,label:rn,consequence:F,recommended:E()}).strict(),z=b({schemaVersion:j,id:M,projectId:M,workItemId:M,stageAttemptId:M,kind:Bt,blocking:E(),title:rn,context:F,recommendation:F.nullable(),options:C(On).max(20),allowOther:E(),status:Vt,version:D().int().positive(),createdAt:N,resolvedAt:N.nullable()}).strict(),kn=S(`type`,[b({type:y(`OPTION`),optionIds:C(M).min(1).max(20)}).strict(),b({type:y(`OTHER`),text:k().trim().min(1).max(2e3)}).strict()]),An=b({schemaVersion:j,id:M,projectId:M,workItemId:M,humanRequestId:M,answer:kn,actor:P,reason:k().trim().min(1).max(2e3).nullable(),createdAt:N}).strict(),jn=b({schemaVersion:j,id:M,projectId:M,workItemId:M,pipelineRunId:M,stageAttemptId:M,mode:Ht,status:Ut,createdAt:N,completedAt:N.nullable()}).strict(),Mn=z.pick({blocking:!0,title:!0,context:!0,recommendation:!0}).strict(),Nn=e=>Mn.extend({kind:y(e),options:C(On).min(1).max(20),allowOther:E()}).strict(),Pn=te([Nn(`SINGLE_CHOICE`),Nn(`MULTIPLE_CHOICE`),Nn(`CONFIRMATION`),Mn.extend({kind:y(`FREE_TEXT`),options:C(On).max(0),allowOther:y(!0)}).strict()]),Fn=S(`type`,[b({type:y(`NEEDS_HUMAN`),request:Pn}).strict(),b({type:y(`COMPLETED`),summary:k().trim().min(1).max(4e3),artifacts:C(wn).max(5).optional()}).strict(),b({type:y(`READY_FOR_ACCEPTANCE`),releaseNote:F,verifyInstructions:C(F).min(1).max(20)}).strict(),b({type:y(`BUDGET_LIMIT_REACHED`),usageIncrements:C(D().int().positive()).min(1).max(100),quality:Wt}).strict(),b({type:y(`HANDED_OFF`),checkpoint:mn}).strict(),b({type:y(`CONTEXT_EXHAUSTED`),checkpoint:mn.optional()}).strict()]),B=b({schemaVersion:j,sequence:D().int().positive(),id:M,aggregateId:M,projectId:M,actor:P,occurredAt:N,correlationId:nt}).strict(),In=B.extend({type:y(`PIPELINE_STARTED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,stageAttempt:R,budgetPolicy:xn}).strict()}),Ln=B.extend({type:y(`STAGE_ATTEMPT_CHANGED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,stageAttempt:R,previousStatus:zt}).strict()}),Rn=B.extend({type:y(`HUMAN_REQUEST_OPENED`),aggregateType:y(`WORK_ITEM`),data:b({request:z}).strict()}),zn=B.extend({type:y(`HUMAN_REQUEST_RESOLVED`),aggregateType:y(`WORK_ITEM`),data:b({request:z,decision:An}).strict()}),Bn=B.extend({type:y(`USAGE_RECORDED`),aggregateType:y(`WORK_ITEM`),data:b({usageRecord:Sn,cumulativeAmount:D().int().positive()}).strict()}),Vn=B.extend({type:y(`BUDGET_THRESHOLD_REACHED`),aggregateType:y(`WORK_ITEM`),data:b({budgetPolicy:xn,threshold:an,cumulativeAmount:D().int().nonnegative()}).strict()}),Hn=B.extend({type:y(`PIPELINE_PAUSED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,stageAttempt:R,kind:Kt,reason:F}).strict()}),Un=B.extend({type:y(`PIPELINE_RESUMED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,stageAttempt:R}).strict()}),Wn=B.extend({type:y(`PIPELINE_CANCELLED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,stageAttempt:R}).strict()}),Gn=B.extend({type:y(`BUDGET_OVERRIDE_APPROVED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,previousStageAttempt:R,stageAttempt:R,budgetPolicy:xn}).strict()}),Kn=B.extend({type:y(`RECOVERY_REPORT_CREATED`),aggregateType:y(`WORK_ITEM`),data:b({report:Cn,run:L,stageAttempt:R}).strict()}),qn=B.extend({type:y(`EVIDENCE_ARTIFACT_RECORDED`),aggregateType:y(`WORK_ITEM`),data:b({artifact:Tn}).strict()}),Jn=B.extend({type:y(`ACCEPTANCE_REQUESTED`),aggregateType:y(`WORK_ITEM`),data:b({acceptancePackage:Dn,request:z,run:L,stageAttempt:R}).strict()}),Yn=B.extend({type:y(`ACCEPTANCE_RESOLVED`),aggregateType:y(`WORK_ITEM`),data:b({action:Zt,acceptancePackage:Dn,request:z,decision:An,run:L,stageAttempt:R}).strict()}),Xn=B.extend({type:y(`PIPELINE_COMPLETED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,stageAttempt:R}).strict()}),Zn=B.extend({type:y(`PROVIDER_SESSION_STARTED`),aggregateType:y(`WORK_ITEM`),data:b({session:I,recipe:fn}).strict()}),Qn=B.extend({type:y(`CHECKPOINT_PUBLISHED`),aggregateType:y(`WORK_ITEM`),data:b({checkpoint:hn}).strict()}),$n=B.extend({type:y(`CONTEXT_HANDOFF_REQUESTED`),aggregateType:y(`WORK_ITEM`),data:b({session:I,usage:gn}).strict()}),er=B.extend({type:y(`PROVIDER_SESSION_ENDED`),aggregateType:y(`WORK_ITEM`),data:b({session:I}).strict()}),tr=B.extend({type:y(`CONTEXT_FLOOR_EXCEEDED`),aggregateType:y(`WORK_ITEM`),data:b({run:L,stageAttempt:R,sessionOrdinal:D().int().positive(),requiredBytes:D().int().nonnegative(),budgetBytes:D().int().nonnegative(),budgetTokens:D().int().positive()}).strict()}),V=b({schemaVersion:j,commandId:M,correlationId:nt,actor:P}).strict(),nr=V.extend({type:y(`START_MOCK_PIPELINE`),payload:b({workItemId:M,expectedVersion:D().int().positive(),template:vn,budget:b({maxEstimatedTokens:D().int().positive(),warningThresholds:C(an).min(1).max(10)}).strict()}).strict()}),rr=V.extend({type:y(`MARK_WORKFLOW_DISPATCH_STARTED`),payload:b({dispatchId:M}).strict()}),ir=b({dispatchId:M,provider:Lt.optional(),outcome:Fn,template:vn,resultTree:Ft.nullable()}).strict(),ar=V.extend({type:y(`APPLY_PROVIDER_OUTCOME`),payload:ir}),or=V.extend({type:y(`APPLY_MOCK_PROVIDER_OUTCOME`),payload:ir}),sr=V.extend({type:y(`ANSWER_HUMAN_REQUEST`),payload:b({humanRequestId:M,expectedVersion:D().int().positive(),answer:kn}).strict()}),cr=b({pipelineRunId:M,expectedVersion:D().int().positive()}).strict(),lr=V.extend({type:y(`PAUSE_PIPELINE`),payload:cr}),ur=V.extend({type:y(`RESUME_PIPELINE`),payload:cr}),dr=V.extend({type:y(`CANCEL_PIPELINE`),payload:cr}),fr=V.extend({type:y(`APPROVE_BUDGET_OVERRIDE`),payload:cr.extend({maxEstimatedTokens:D().int().positive()})}),pr=V.extend({type:y(`RECONCILE_WORKFLOWS`),payload:b({}).strict()}),mr=V.extend({type:y(`RESOLVE_ACCEPTANCE`),payload:b({acceptancePackageId:M,expectedVersion:D().int().positive(),expectedRunVersion:D().int().positive(),action:Zt,reason:F.nullable()}).strict()}),hr=fn.omit({id:!0,providerSessionId:!0,createdAt:!0}),gr=V.extend({type:y(`START_PROVIDER_SESSION`),payload:b({stageAttemptId:M,recipe:hr,pid:pn.nullable().optional()}).strict()}),_r=V.extend({type:y(`RECORD_PROVIDER_SESSION_PROCESS`),payload:b({providerSessionId:M,pid:pn}).strict()}),vr=V.extend({type:y(`PUBLISH_CHECKPOINT`),payload:b({providerSessionId:M,checkpoint:mn}).strict()}),yr=V.extend({type:y(`END_PROVIDER_SESSION`),payload:b({providerSessionId:M,endReason:$t,providerStarted:E()}).strict().refine(e=>e.providerStarted||e.endReason===`INTERRUPTED`,`A session the provider never started can only have ended as INTERRUPTED`)}),br=V.extend({type:y(`REQUEST_CONTEXT_HANDOFF`),payload:b({providerSessionId:M,usage:gn,handoffThreshold:an}).strict()}),xr=S(`type`,[b({type:y(`CONTEXT_FLOOR_EXCEEDED`),sessionOrdinal:D().int().positive(),requiredBytes:D().int().nonnegative(),budgetBytes:D().int().nonnegative(),budgetTokens:D().int().positive()}).strict(),b({type:y(`PROVIDER_REJECTED_PACK`),sessionOrdinal:D().int().positive()}).strict(),b({type:y(`PROVIDER_START_FAILED`),sessionOrdinal:D().int().positive()}).strict(),b({type:y(`SESSION_LIMIT_REACHED`),sessionOrdinal:D().int().positive(),maxSessions:D().int().positive()}).strict()]),Sr=V.extend({type:y(`REDUCE_CONTEXT_PACK_SHARE`),payload:b({stageAttemptId:M}).strict()}),Cr=V.extend({type:y(`HARD_PAUSE_STAGE_ATTEMPT`),payload:b({stageAttemptId:M,reason:xr}).strict()}),wr=b({schemaVersion:j,type:y(`PIPELINE_STARTED`),replayed:E(),workItemId:M,run:L,stageAttempt:R,budgetPolicy:xn,dispatch:jn,events:C(In)}).strict(),Tr=b({schemaVersion:j,type:y(`WORKFLOW_DISPATCH_STARTED`),replayed:E(),workItemId:M,run:L,stageAttempt:R,dispatch:jn,events:C(Ln)}).strict(),Er=S(`type`,[Ln,Rn,Bn,Vn,Hn,qn,Jn,Xn]),Dr=b({schemaVersion:j,type:y(`MOCK_PROVIDER_OUTCOME_APPLIED`),replayed:E(),workItemId:M,run:L,stageAttempt:R,usageRecords:C(Sn),artifacts:C(Tn),acceptancePackage:Dn.nullable(),events:C(Er)}).strict(),Or=b({schemaVersion:j,type:y(`HUMAN_REQUEST_ANSWERED`),replayed:E(),workItemId:M,request:z,decision:An,dispatch:jn,events:C(zn)}).strict(),kr=S(`type`,[Hn,Un,Wn]),Ar=b({schemaVersion:j,type:y(`PIPELINE_CONTROL_APPLIED`),replayed:E(),action:O([`PAUSE`,`RESUME`,`CANCEL`]),workItemId:M,run:L,stageAttempt:R,dispatch:jn.nullable(),events:C(kr)}).strict(),jr=b({schemaVersion:j,type:y(`BUDGET_OVERRIDE_APPROVED`),replayed:E(),workItemId:M,run:L,previousStageAttempt:R,stageAttempt:R,budgetPolicy:xn,dispatch:jn,events:C(Gn)}).strict(),Mr=b({schemaVersion:j,type:y(`WORKFLOWS_RECONCILED`),replayed:E(),recoveryReports:C(Cn),interruptedSessions:C(I),orphanedWorkspaces:C(ft),events:C(S(`type`,[Kn,er,ht]))}).strict(),Nr=S(`type`,[zn,Yn,Xn]),Pr=b({schemaVersion:j,type:y(`ACCEPTANCE_RESOLVED`),replayed:E(),action:Zt,workItemId:M,run:L,stageAttempt:R,acceptancePackage:Dn,request:z,decision:An,events:C(Nr)}).strict(),Fr=b({schemaVersion:j,type:y(`PROVIDER_SESSION_STARTED`),replayed:E(),workItemId:M,session:I,recipe:fn,events:C(Zn)}).strict(),Ir=b({schemaVersion:j,type:y(`PROVIDER_SESSION_PROCESS_RECORDED`),replayed:E(),workItemId:M,session:I,events:C(w())}).strict(),Lr=b({schemaVersion:j,type:y(`CHECKPOINT_PUBLISHED`),replayed:E(),workItemId:M,checkpoint:hn,events:C(Qn)}).strict(),Rr=b({schemaVersion:j,type:y(`PROVIDER_SESSION_ENDED`),replayed:E(),workItemId:M,session:I,stageAttempt:R,request:z.nullable(),nextSessionOrdinal:D().int().positive().nullable(),events:C(S(`type`,[er,Ln,Hn,Rn]))}).strict(),zr=b({schemaVersion:j,type:y(`CONTEXT_HANDOFF_REQUESTED`),replayed:E(),workItemId:M,session:I,requested:E(),events:C($n)}).strict(),Br=b({schemaVersion:j,type:y(`CONTEXT_PACK_SHARE_REDUCED`),replayed:E(),workItemId:M,stageAttempt:R,events:C(Ln)}).strict(),Vr=b({schemaVersion:j,type:y(`STAGE_ATTEMPT_HARD_PAUSED`),replayed:E(),workItemId:M,run:L,stageAttempt:R,request:z,events:C(S(`type`,[tr,Ln,Hn,Rn]))}).strict();b({schemaVersion:j,commandId:M,expectedVersion:D().int().positive()}).strict(),b({schemaVersion:j,commandId:M,expectedVersion:D().int().positive(),answer:kn}).strict(),b({schemaVersion:j,commandId:M,expectedVersion:D().int().positive()}).strict().extend({maxEstimatedTokens:D().int().positive()}),b({schemaVersion:j,commandId:M,expectedVersion:D().int().positive(),expectedRunVersion:D().int().positive(),action:Zt,reason:F.nullable().default(null)}).strict();var Hr=b({schemaVersion:j,run:L.nullable(),stageAttempts:C(R),humanRequests:C(z),decisions:C(An),budgetPolicies:C(xn),usageRecords:C(Sn),recoveryReports:C(Cn),artifacts:C(Tn),acceptancePackage:Dn.nullable()}).strict(),Ur=b({schemaVersion:j,humanRequests:C(z)}).strict(),Wr=b({schemaVersion:j,sessions:C(I),checkpoints:C(hn),peakContextWindowUsage:ne(M,gn)}).strict(),Gr=b({schemaVersion:j,provider:k().trim().min(1).max(50),start:E(),stages:C(It).min(1).max(20),checkpointOnRequest:E(),contextWindowReporting:E(),costReporting:E()}).strict(),Kr=O([`web-app-a`,`api-service-b`]),qr=O([`ACTIVE`,`ARCHIVED`]),Jr=O([`EPIC`,`FEATURE`,`TASK`,`BUG`,`SPIKE`,`SUBTASK`]),Yr=O([`BACKLOG`,`READY`,`IN_PROGRESS`,`BLOCKED`,`DONE`,`CANCELLED`]),Xr=O([`LOW`,`MEDIUM`,`HIGH`,`URGENT`]),Zr=O([`LOW`,`MEDIUM`,`HIGH`,`CRITICAL`]),Qr=k().trim().min(1).max(200),$r=k().trim().max(2e4),ei=k().min(1).max(4096),ti=ei.regex(/^(?:[/\\]|[A-Za-z]:[/\\])/,`A repository path must be absolute`),ni=C(k().trim().min(1).max(500)).max(50),ri=b({schemaVersion:j,id:M,workspaceId:M,fixtureId:Kr.nullable(),name:Qr,repositoryPath:ti,status:qr,version:D().int().positive(),createdAt:N,updatedAt:N}).strict(),ii=b({schemaVersion:j,id:M,projectId:M,parentId:M.nullable(),type:Jr,title:Qr,description:$r,state:Yr,currentStage:It.nullable(),priority:Xr,risk:Zr,acceptanceCriteria:ni,version:D().int().positive(),createdAt:N,updatedAt:N}).strict(),ai=b({schemaVersion:j,sequence:D().int().positive(),id:M,aggregateId:M,projectId:M,actor:P,occurredAt:N,correlationId:nt}).strict(),oi=ai.extend({type:y(`PROJECT_REGISTERED`),aggregateType:y(`PROJECT`),data:b({project:ri}).strict()}),si=ai.extend({type:y(`WORK_ITEM_CREATED`),aggregateType:y(`WORK_ITEM`),data:b({workItem:ii}).strict()}),ci=O([`title`,`description`,`priority`,`risk`,`acceptanceCriteria`]),li=ai.extend({type:y(`WORK_ITEM_UPDATED`),aggregateType:y(`WORK_ITEM`),data:b({workItem:ii,changedFields:C(ci).min(1)}).strict()}),ui=ai.extend({type:y(`WORK_ITEM_STATE_CHANGED`),aggregateType:y(`WORK_ITEM`),data:b({workItem:ii,previousState:Yr}).strict()}),di=S(`type`,[oi,si,li,ui,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,$n,er,tr,mt,ht]),fi=b({schemaVersion:j,commandId:M,correlationId:nt,actor:P}).strict(),pi=fi.extend({type:y(`REGISTER_PROJECT`),payload:b({id:M,fixtureId:Kr.nullable(),name:Qr,repositoryPath:ti}).strict()}),mi=fi.extend({type:y(`REPOINT_FIXTURE_PROJECT`),payload:b({projectId:M,fixtureId:Kr,expectedRepositoryPath:ti,repositoryPath:ti}).strict()}),hi=fi.extend({type:y(`CREATE_WORK_ITEM`),payload:b({projectId:M,parentId:M.nullable().default(null),type:Jr,title:Qr,description:$r.default(``),priority:Xr.default(`MEDIUM`),risk:Zr.default(`MEDIUM`),acceptanceCriteria:ni.default([])}).strict()}),gi=b({title:Qr.optional(),description:$r.optional(),priority:Xr.optional(),risk:Zr.optional(),acceptanceCriteria:ni.optional()}).strict().refine(e=>Object.keys(e).length>0,{message:`At least one field must be updated`}),_i=fi.extend({type:y(`UPDATE_WORK_ITEM`),payload:b({workItemId:M,expectedVersion:D().int().positive(),patch:gi}).strict()}),vi=fi.extend({type:y(`MOVE_WORK_ITEM`),payload:b({workItemId:M,expectedVersion:D().int().positive(),targetState:Yr}).strict()});S(`type`,[pi,mi,hi,_i,vi,nr,rr,ar,or,sr,lr,ur,dr,fr,pr,mr,gr,_r,vr,yr,br,Cr,Sr,_t,vt,yt,bt]);var yi=b({schemaVersion:j,replayed:E()}).strict(),bi=yi.extend({type:y(`PROJECT_REGISTERED`),project:ri,event:oi}),xi=yi.extend({type:y(`WORK_ITEM_CREATED`),workItem:ii,event:si}),Si=yi.extend({type:y(`WORK_ITEM_UPDATED`),workItem:ii,event:li}),Ci=yi.extend({type:y(`WORK_ITEM_MOVED`),workItem:ii,event:ui}),wi=S(`type`,[bi,xi,Si,Ci,wr,Tr,Dr,Or,Ar,jr,Mr,Pr,Fr,Ir,Lr,Rr,zr,Vr,Br,xt,St,Ct,wt]);b({schemaVersion:j,commandId:M,fixtureId:Kr}).strict(),b({schemaVersion:j,commandId:M,repositoryPath:ei}).strict(),hi.shape.payload.omit({projectId:!0}).extend({schemaVersion:j,commandId:M,projectId:M}).strict(),b({schemaVersion:j,commandId:M,expectedVersion:D().int().positive(),patch:gi}).strict(),b({schemaVersion:j,commandId:M,expectedVersion:D().int().positive(),targetState:Yr}).strict();var Ti=O([`READY`,`UNUSABLE`]),Ei=ri.extend({repositoryStatus:Ti}).strict(),Di=b({schemaVersion:j,projects:C(Ei)}).strict();b({schemaVersion:j,workItem:ii}).strict();var Oi=b({schemaVersion:j,workItems:C(ii)}).strict();O([`ASC`,`DESC`]);var ki=b({schemaVersion:j,events:C(di),nextSequence:D().int().nonnegative(),hasMore:E()}).strict(),H=r(),Ai={add:[`M12 5v14`,`M5 12h14`],agents:[`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,`M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8`,`M22 21v-2a4 4 0 0 0-3-3.87`,`M16 3.13a4 4 0 0 1 0 7.75`],board:[`M1 2.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C1.76 1 2.04 1 2.6 1h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C7 1.76 7 2.04 7 2.6v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C6.24 5 5.96 5 5.4 5H2.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C1 4.24 1 3.96 1 3.4v-.8ZM9 2.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 1 10.04 1 10.6 1h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 1.76 15 2.04 15 2.6v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C14.24 5 13.96 5 13.4 5h-2.8c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C9 4.24 9 3.96 9 3.4v-.8ZM1 7.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C1.76 6 2.04 6 2.6 6h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C7 6.76 7 7.04 7 7.6v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C6.24 10 5.96 10 5.4 10H2.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C1 9.24 1 8.96 1 8.4v-.8ZM9 7.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 6 10.04 6 10.6 6h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 6.76 15 7.04 15 7.6v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C14.24 10 13.96 10 13.4 10h-2.8c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C9 9.24 9 8.96 9 8.4v-.8ZM1 12.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C1.76 11 2.04 11 2.6 11h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C7 11.76 7 12.04 7 12.6v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C6.24 15 5.96 15 5.4 15H2.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C1 14.24 1 13.96 1 13.4v-.8ZM9 12.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C9.76 11 10.04 11 10.6 11h2.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C15 11.76 15 12.04 15 12.6v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C14.24 15 13.96 15 13.4 15h-2.8c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C9 14.24 9 13.96 9 13.4v-.8Z`],branch:[`M6 3v12`,`M18 9a6 6 0 0 1-6 6H6`,`M6 3a2 2 0 1 0 0 4 2 2 0 0 0 0-4`,`M18 5a2 2 0 1 0 0 4 2 2 0 0 0 0-4`,`M18 17a2 2 0 1 0 0 4 2 2 0 0 0 0-4`],budget:[`M12 2v20`,`M17 5H9.5a3.5 3.5 0 0 0 0 7H14a3.5 3.5 0 0 1 0 7H6`],check:[`m5 12 4 4L19 6`],chevronDown:[`m6 9 6 6 6-6`],chevronLeft:[`m15 18-6-6 6-6`],chevronRight:[`m9 18 6-6-6-6`],clock:[`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20`,`M12 6v6l4 2`],close:[`M6 6l12 12`,`M18 6 6 18`],code:[`m8 9-4 3 4 3`,`m16 9 4 3-4 3`,`m14 5-4 14`],command:[`M18 9h-9a3 3 0 1 1 3-3v12a3 3 0 1 1-3-3h9a3 3 0 1 1-3 3V6a3 3 0 1 1 3 3Z`],error:[`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20`,`m15 9-6 6`,`m9 9 6 6`],edit:[`M12 20h9`,`M16.5 3.5a2.12 2.12 0 0 1 3 3L8 18l-4 1 1-4Z`],external:[`M14 3h7v7`,`m10 14 11-11`,`M21 14v5a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5`],filter:[`M4 6h16`,`M7 12h10`,`M10 18h4`],inbox:[`M4 4h16v16H4z`,`M4 14h4l2 3h4l2-3h4`],info:[`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20`,`M12 11v6`,`M12 7h.01`],layers:[`m12 2 9 5-9 5-9-5 9-5Z`,`m3 12 9 5 9-5`,`m3 17 9 5 9-5`],link:[`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`],list:[`M1 1.8c0-.28 0-.42.054-.527a.5.5 0 0 1 .219-.218C1.38 1 1.52 1 1.8 1h12.4c.28 0 .42 0 .527.054a.5.5 0 0 1 .218.219C15 1.38 15 1.52 15 1.8v.4c0 .28 0 .42-.055.527a.5.5 0 0 1-.218.219C14.62 3 14.48 3 14.2 3H1.8c-.28 0-.42 0-.527-.054a.5.5 0 0 1-.218-.219C1 2.62 1 2.48 1 2.2v-.4ZM1 13.8c0-.28 0-.42.054-.527a.5.5 0 0 1 .219-.218C1.38 13 1.52 13 1.8 13h12.4c.28 0 .42 0 .527.055a.5.5 0 0 1 .218.218c.055.107.055.247.055.527v.4c0 .28 0 .42-.055.527a.5.5 0 0 1-.218.218C14.62 15 14.48 15 14.2 15H1.8c-.28 0-.42 0-.527-.055a.5.5 0 0 1-.218-.218C1 14.62 1 14.48 1 14.2v-.4ZM1 9.8c0-.28 0-.42.054-.527a.5.5 0 0 1 .219-.218C1.38 9 1.52 9 1.8 9h12.4c.28 0 .42 0 .527.055a.5.5 0 0 1 .218.218C15 9.38 15 9.52 15 9.8v.4c0 .28 0 .42-.055.527a.5.5 0 0 1-.218.218C14.62 11 14.48 11 14.2 11H1.8c-.28 0-.42 0-.527-.055a.5.5 0 0 1-.218-.218C1 10.62 1 10.48 1 10.2v-.4ZM1 5.8c0-.28 0-.42.054-.527a.5.5 0 0 1 .219-.218C1.38 5 1.52 5 1.8 5h12.4c.28 0 .42 0 .527.054a.5.5 0 0 1 .218.219C15 5.38 15 5.52 15 5.8v.4c0 .28 0 .42-.055.527a.5.5 0 0 1-.218.218C14.62 7 14.48 7 14.2 7H1.8c-.28 0-.42 0-.527-.054a.5.5 0 0 1-.218-.219C1 6.62 1 6.48 1 6.2v-.4Z`],menu:[`M4 7h16`,`M4 12h16`,`M4 17h16`],minus:[`M5 12h14`],monitor:[`M3 4h18v12H3z`,`M8 20h8`,`M12 16v4`],moon:[`M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8Z`],more:[`M5 12h.01`,`M12 12h.01`,`M19 12h.01`],pause:[`M8 5v14`,`M16 5v14`],person:[`M20 21a8 8 0 0 0-16 0`,`M12 13a5 5 0 1 0 0-10 5 5 0 0 0 0 10`],play:[`m7 4 13 8-13 8V4Z`],projects:[`M4 4h6l2 3h8v13H4z`],question:[`M9.1 9a3 3 0 1 1 5.83 1c0 2-3 2-3 4`,`M12 18h.01`,`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20`],search:[`M11 19a8 8 0 1 1 0-16 8 8 0 0 1 0 16`,`m21 21-4.35-4.35`],sessions:[`M4 4h16v16H4z`,`M8 8h8`,`M8 12h5`,`M8 16h3`],settings:[`M4 7h10`,`M18 7h2`,`M4 17h2`,`M10 17h10`,`M14 4v6`,`M7 14v6`],sortAscending:[`M8.23 3.674a.75.75 0 0 1-.961 1.152l-1.77-1.475V14.25a.75.75 0 0 1-1.5 0V3.351L2.23 4.826a.75.75 0 1 1-.96-1.152l3-2.5a.75.75 0 0 1 .96 0z`,`M6.999 7.25a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75M6.999 10.25a.75.75 0 0 1 .75-.75h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1-.75-.75M6.999 13.25a.75.75 0 0 1 .75-.75h1.5a.75.75 0 0 1 0 1.5h-1.5a.75.75 0 0 1-.75-.75`],star:[`m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8-6.2-3.2L5.8 21 7 14.2 2 9.3l6.9-1L12 2Z`],success:[`M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20`,`m8 12 3 3 5-6`],sun:[`M12 4V2`,`M12 22v-2`,`m4.93 4.93-1.42-1.42`,`m20.49 20.49-1.42-1.42`,`M4 12H2`,`M22 12h-2`,`m6.34 17.66-1.41 1.41`,`m19.07 4.93-1.41 1.41`,`M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10`],terminal:[`m4 6 4 4-4 4`,`M10 16h6`,`M3 3h18v18H3z`],test:[`M9 2v6l-5 9a3 3 0 0 0 2.6 4.5h10.8A3 3 0 0 0 20 17l-5-9V2`,`M7 14h10`,`M8 2h8`],views:[`m12 3 9 5-9 5-9-5 9-5Z`,`m3 13 9 5 9-5`],viewAdd:[`M6.97358 1.34476C7.57022.885624 8.41055.885024 9.00788 1.3433L14.5499 5.59521C15.15 6.05565 15.15 6.94435 14.5499 7.40478L9.00788 11.6567C8.41055 12.115 7.57022 12.1144 6.97358 11.6552L1.44875 7.40374C.850417 6.94331.850415 6.05669 1.44875 5.59625L6.97358 1.34476ZM8 3.25c.41421 0 .75.33579.75.75v1.75h1.75a.75.75 0 0 1 0 1.5H8.75V9a.75.75 0 0 1-1.5 0V7.25H5.5a.75.75 0 0 1 0-1.5h1.75V4c0-.41421.33579-.75.75-.75Z`,`M1.15024 9.79849c.24384-.33474.69848-.39736 1.01548-.13987l4.34409 3.33628c.78087.6343 1.8682.6343 2.64907 0l4.67552-3.33628c.3169-.25749.7716-.19487 1.0154.13987.2439.33471.1846.81481-.1324 1.07231l-4.6755 3.3363c-1.30145 1.0572-3.11366 1.0572-4.41512 0l-4.34409-3.3363c-.316992-.2575-.376293-.7376-.13245-1.07231Z`],warning:[`m12 3 10 18H2L12 3Z`,`M12 9v4`,`M12 17h.01`]},U=({name:e,size:t=16,...n})=>{if(e===`spinner`)return(0,H.jsxs)(`svg`,{"aria-hidden":`true`,className:`lr-icon lr-icon--spinner`,fill:`none`,height:t,viewBox:`0 0 24 24`,width:t,...n,children:[(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,opacity:`0.25`,r:`9`,stroke:`currentColor`,strokeWidth:`2`}),(0,H.jsx)(`path`,{d:`M21 12a9 9 0 0 0-9-9`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`2`})]});if(e===`more`)return(0,H.jsxs)(`svg`,{"aria-hidden":`true`,className:`lr-icon`,fill:`currentColor`,height:t,viewBox:`0 0 24 24`,width:t,...n,children:[(0,H.jsx)(`circle`,{cx:`5`,cy:`12`,r:`1.5`}),(0,H.jsx)(`circle`,{cx:`12`,cy:`12`,r:`1.5`}),(0,H.jsx)(`circle`,{cx:`19`,cy:`12`,r:`1.5`})]});if(e===`board`||e===`list`||e===`sortAscending`||e===`viewAdd`)return(0,H.jsx)(`svg`,{"aria-hidden":`true`,className:`lr-icon`,fill:`currentColor`,height:t,viewBox:`0 0 16 16`,width:t,...n,children:Ai[e].map(e=>(0,H.jsx)(`path`,{d:e},e))});let r=e===`add`||e===`filter`||e===`settings`?2.1:1.7;return(0,H.jsx)(`svg`,{"aria-hidden":`true`,className:`lr-icon`,fill:`none`,height:t,viewBox:`0 0 24 24`,width:t,...n,children:Ai[e].map(e=>(0,H.jsx)(`path`,{d:e,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:r},e))})},W=(...e)=>e.filter(Boolean).join(` `),G=(0,A.forwardRef)(({children:e,className:t,disabled:n,icon:r,loading:i=!1,shape:a=`rounded`,size:o=`md`,trailingIcon:s,variant:c=`ghost`,...l},u)=>(0,H.jsxs)(`button`,{"aria-busy":i,className:W(`lr-button`,`lr-button--${c}`,`lr-button--${a}`,`lr-control--${o}`,i&&`is-loading`,t),disabled:i||n===!0,ref:u,...l,children:[r?(0,H.jsx)(U,{name:i?`spinner`:r}):null,(0,H.jsx)(`span`,{className:W(`lr-button__content`,!r&&i&&`is-visually-loading`),children:e}),s?(0,H.jsx)(U,{name:s}):null,!r&&i?(0,H.jsx)(U,{name:`spinner`}):null]}));G.displayName=`Button`;var K=(0,A.forwardRef)(({className:e,disabled:t,label:n,loading:r=!1,name:i,size:a=`md`,variant:o=`ghost`,...s},c)=>(0,H.jsx)(`button`,{"aria-busy":r,"aria-label":n,className:W(`lr-icon-button`,`lr-button--${o}`,`lr-control--${a}`,e),disabled:r||t===!0,ref:c,...s,children:(0,H.jsx)(U,{name:r?`spinner`:i})}));K.displayName=`IconButton`;var ji=({className:e,tone:t=`neutral`,...n})=>(0,H.jsx)(`span`,{className:W(`lr-badge`,`lr-badge--${t}`,e),...n}),Mi=({className:e,label:t,tone:n,...r})=>(0,H.jsxs)(`span`,{className:W(`lr-status`,`lr-status--${n}`,e),...r,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`lr-status__icon`}),(0,H.jsx)(`span`,{children:t})]}),Ni=({className:e,label:t,tone:n=`neutral`,...r})=>(0,H.jsx)(`span`,{"aria-label":t,className:W(`lr-avatar`,`lr-avatar--${n}`,e),role:`img`,...r,children:t.split(/\s+/).slice(0,2).map(e=>e[0]).join(``).toUpperCase()}),q=({className:e,width:t,...n})=>(0,H.jsx)(`span`,{className:W(`lr-skeleton`,e),style:t?{width:t}:void 0,...n}),Pi={empty:`inbox`,error:`error`,offline:`monitor`,success:`success`},Fi=({action:e,className:t,description:n,title:r,tone:i=`empty`,...a})=>(0,H.jsxs)(`div`,{className:W(`lr-feedback`,`lr-feedback--${i}`,t),...a,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`lr-feedback__icon`,children:(0,H.jsx)(U,{name:Pi[i],size:18})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`strong`,{children:r}),(0,H.jsx)(`p`,{children:n})]}),e?(0,H.jsx)(`div`,{className:`lr-feedback__action`,children:e}):null]}),Ii=({className:e,...t})=>(0,H.jsx)(`kbd`,{className:W(`lr-kbd`,e),...t}),J=({children:e,description:t,error:n,htmlFor:r,label:i,required:a=!1})=>(0,H.jsxs)(`div`,{className:W(`lr-field`,n&&`has-error`),children:[(0,H.jsxs)(`label`,{className:`lr-field__label`,htmlFor:r,children:[i,a?(0,H.jsx)(`span`,{"aria-hidden":`true`,children:` *`}):null]}),e,n?(0,H.jsxs)(`span`,{className:`lr-field__error`,id:`${r}-error`,role:`alert`,children:[(0,H.jsx)(U,{name:`error`,size:13}),n]}):t?(0,H.jsx)(`span`,{className:`lr-field__description`,id:`${r}-description`,children:t}):null]}),Li=(0,A.forwardRef)(({className:e,icon:t,invalid:n=!1,size:r=`lg`,...i},a)=>(0,H.jsxs)(`span`,{className:W(`lr-text-field`,`lr-control--${r}`,n&&`has-error`,e),children:[t?(0,H.jsx)(U,{name:t}):null,(0,H.jsx)(`input`,{"aria-invalid":n,ref:a,...i})]}));Li.displayName=`TextField`;var Ri=(0,A.forwardRef)(({className:e,invalid:t=!1,...n},r)=>(0,H.jsx)(`textarea`,{"aria-invalid":t,className:W(`lr-textarea`,t&&`has-error`,e),ref:r,...n}));Ri.displayName=`Textarea`;var zi=({className:e,description:t,id:n,label:r,...i})=>{let a=(0,A.useId)(),o=n??a;return(0,H.jsxs)(`label`,{className:`lr-check-row`,htmlFor:o,children:[(0,H.jsx)(de,{className:W(`lr-checkbox`,e),id:o,...i,children:(0,H.jsx)(fe,{children:(0,H.jsx)(U,{name:`check`,size:12})})}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{children:r}),t?(0,H.jsx)(`small`,{children:t}):null]})]})},Bi=({className:e,description:t,id:n,label:r,...i})=>{let a=(0,A.useId)(),o=n??a;return(0,H.jsxs)(`label`,{className:`lr-switch-row`,htmlFor:o,children:[(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{children:r}),t?(0,H.jsx)(`small`,{children:t}):null]}),(0,H.jsx)(Ie,{className:W(`lr-switch`,e),id:o,...i,children:(0,H.jsx)(Se,{className:`lr-switch__thumb`})})]})},Vi=({className:e,options:t,...n})=>(0,H.jsx)(He,{className:W(`lr-radio-group`,e),...n,children:t.map(e=>(0,H.jsxs)(`label`,{className:`lr-radio-row`,children:[(0,H.jsx)(Ve,{className:`lr-radio`,value:e.value,children:(0,H.jsx)(xe,{className:`lr-radio__indicator`})}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{children:e.label}),e.description?(0,H.jsx)(`small`,{children:e.description}):null]})]},e.value))}),Hi=({ariaLabel:e,contentClassName:t,defaultValue:n,disabled:r=!1,id:i,onValueChange:a,options:o,placeholder:s=`Select…`,size:c=`lg`,value:l,variant:u=`default`})=>{let d={...n===void 0?{}:{defaultValue:n},...a===void 0?{}:{onValueChange:a},...l===void 0?{}:{value:l}};return(0,H.jsxs)(Ae,{disabled:r,...d,children:[(0,H.jsxs)(Te,{"aria-label":e,className:W(`lr-select-trigger`,`lr-control--${c}`,u===`compact`&&`lr-select-trigger--compact`),id:i,children:[(0,H.jsx)(ye,{placeholder:s}),(0,H.jsx)(Ce,{children:(0,H.jsx)(U,{name:`chevronDown`,size:13})})]}),(0,H.jsx)(Ee,{children:(0,H.jsx)(Re,{className:W(`lr-select-content`,u===`compact`&&`lr-select-content--compact`,t),position:`popper`,sideOffset:4,children:(0,H.jsx)(ze,{className:`lr-select-viewport`,children:o.map(e=>(0,H.jsxs)(we,{className:`lr-select-item`,value:e.value,...e.disabled===void 0?{}:{disabled:e.disabled},children:[(0,H.jsxs)(`span`,{className:`lr-select-item__copy`,children:[(0,H.jsx)(je,{children:e.label}),e.description?(0,H.jsx)(`small`,{children:e.description}):null]}),(0,H.jsx)(Pe,{className:`lr-select-item__indicator`,children:(0,H.jsx)(U,{name:`check`,size:13})})]},e.value))})})})]})},Ui=e=>e.length===0?`root`:e.join(`/`),Wi=e=>e.trim().toLocaleLowerCase(),Gi=e=>(e.children?.length??0)>0,Ki=(e,t)=>`${e.label} ${e.description??``}`.toLocaleLowerCase().includes(t),qi=(e,t,n=!1)=>{let r=Wi(t);if(r===``)return e.map(e=>({node:e}));let i=(e,t)=>e.flatMap(e=>Ki(e,r)?t?[{node:e,parent:t}]:[{node:e}]:!n||!Gi(e)?[]:i(e.children??[],e));return i(e,void 0)},Ji=(e,t,n)=>{let r=[],i=e;for(let e of t){let t=[...r],a=qi(i,n[Ui(t)]??``,t.length===0).find(t=>t.node.id===e&&!t.parent)?.node;if(!a||!Gi(a))break;r.push(e),i=a.children??[]}return r},Y=({children:e,label:t,side:n=`bottom`})=>(0,H.jsx)(De,{delayDuration:350,skipDelayDuration:150,children:(0,H.jsxs)(be,{children:[(0,H.jsx)(Ne,{asChild:!0,onFocus:e=>{e.currentTarget.matches(`:focus-visible`)||e.preventDefault()},children:e}),(0,H.jsx)(Fe,{children:(0,H.jsxs)(Me,{className:`lr-tooltip`,side:n,sideOffset:6,children:[t,(0,H.jsx)(Le,{className:`lr-tooltip__arrow`})]})})]})}),Yi=({align:e=`start`,contentClassName:t,groups:n,side:r=`bottom`,trigger:i,triggerTooltip:a})=>(0,H.jsxs)(ke,{children:[a?(0,H.jsx)(Y,{label:a,children:(0,H.jsx)(Oe,{asChild:!0,children:i})}):(0,H.jsx)(Oe,{asChild:!0,children:i}),(0,H.jsx)(pe,{children:(0,H.jsx)(se,{align:e,className:W(`lr-menu`,t),collisionPadding:8,side:r,sideOffset:5,children:n.map((e,t)=>(0,H.jsxs)(`div`,{className:`lr-menu__group`,children:[e.map(e=>(0,H.jsxs)(oe,{className:W(`lr-menu__item`,e.icon&&`has-icon`,e.danger&&`is-danger`),disabled:e.disabled===!0||e.onSelect===void 0,...e.onSelect===void 0?{}:{onSelect:e.onSelect},children:[e.icon?(0,H.jsx)(`span`,{className:`lr-menu__item-icon`,children:(0,H.jsx)(U,{name:e.icon,size:14})}):null,(0,H.jsx)(`span`,{children:e.label}),e.shortcut?(0,H.jsx)(Ii,{children:e.shortcut}):null]},e.label)),t<n.length-1?(0,H.jsx)(re,{className:`lr-menu__separator`}):null]},e.map(e=>e.label).join(`-`)))})})]}),Xi=({align:e=`end`,children:t,className:n,label:r,side:i=`bottom`,trigger:a,triggerTooltip:o})=>{let s=(0,A.useRef)(null),[c,l]=(0,A.useState)(!1);return(0,H.jsxs)(Be,{onOpenChange:l,open:c,children:[o?(0,H.jsx)(Y,{label:o,children:(0,H.jsx)(_e,{asChild:!0,children:a})}):(0,H.jsx)(_e,{asChild:!0,children:a}),(0,H.jsx)(ae,{children:(0,H.jsx)(ge,{align:e,"aria-label":r,className:W(`lr-popover`,n),collisionPadding:8,onKeyDown:e=>{e.key===`Escape`&&e.target instanceof Node&&e.currentTarget.contains(e.target)&&l(!1)},onOpenAutoFocus:e=>{e.preventDefault(),s.current?.focus()},ref:s,side:i,sideOffset:6,children:t})})]})},Zi=({children:e,className:t,closeLabel:n=`Close dialog`,description:r,footer:i,onOpenChange:a,open:o,size:s=`md`,title:c,trigger:l,triggerTooltip:u})=>{let d=(0,A.useRef)(null),f={...a===void 0?{}:{onOpenChange:a},...o===void 0?{}:{open:o}};return(0,H.jsxs)(me,{...f,children:[l?u?(0,H.jsx)(Y,{label:u,children:(0,H.jsx)(ve,{asChild:!0,children:l})}):(0,H.jsx)(ve,{asChild:!0,children:l}):null,(0,H.jsxs)(Ue,{children:[(0,H.jsx)(he,{className:`lr-dialog-overlay`}),(0,H.jsxs)(le,{className:W(`lr-dialog`,`lr-dialog--${s}`,t),onOpenAutoFocus:e=>{e.preventDefault(),d.current?.focus()},ref:d,tabIndex:-1,children:[(0,H.jsxs)(`header`,{className:`lr-dialog__header`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(ie,{children:c}),r?(0,H.jsx)(ue,{children:r}):null]}),(0,H.jsx)(Y,{label:n,children:(0,H.jsx)(ce,{asChild:!0,children:(0,H.jsx)(K,{label:n,name:`close`,size:`lg`})})})]}),(0,H.jsx)(`div`,{className:`lr-dialog__body`,children:e}),i?(0,H.jsx)(`footer`,{className:`lr-dialog__footer`,children:i}):null]})]})]})},Qi={add:`Add`,addFilterPlaceholder:`Add Filter…`,backTo:`Back to`,clear:`Clear`,close:`Close filters`,description:`Choose one or more task properties. Each selection is applied immediately.`,edit:`Edit`,filterPlaceholder:`Filter…`,is:`is`,isAnyOf:`is any of`,noMatchingProperties:`No matching properties`,noMatchingValues:`No matching values`,oneValue:`1 value`,options:`options`,remove:`Remove`,rootTitle:`Filters`,search:`Search`,selectedValues:`selected values`},$i=`(max-width: 760px)`,ea=80,ta=187,na=197,ra=e=>{if(typeof window>`u`||typeof window.matchMedia!=`function`)return()=>void 0;let t=window.matchMedia($i);return t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)}},ia=()=>typeof window<`u`&&typeof window.matchMedia==`function`&&window.matchMedia($i).matches,aa=()=>!1,oa=(e,t,n)=>{let r=[{key:`root`,nodes:e,path:[],title:n}],i=e;for(let[e,n]of t.entries()){let a=i.find(e=>e.id===n);if(!a?.children||a.children.length===0)break;let o=t.slice(0,e+1);r.push({key:Ui(o),nodes:a.children,path:o,title:a.label}),i=a.children}return r},sa=e=>Math.min(707,50+e.reduce((e,t)=>e+(t.dividerBefore?12:0)+(t.description?46:32),0)),ca=e=>e.flatMap(e=>e.children&&e.children.length>0?ca(e.children):[e.id]),la=(e,t)=>ca(e).filter(e=>t.includes(e)),ua=(e,t)=>{let n=new Map,r=(e,i)=>{e.forEach(e=>{if(e.children&&e.children.length>0){r(e.children,e);return}if(!t.includes(e.id))return;let a=i??e,o=n.get(a.id);n.set(a.id,{icon:a.icon,id:a.id,label:a.label,options:a.children??[e],selected:o?[...o.selected,e]:[e]})})};return r(e,void 0),[...n.values()]},da=(e,t)=>{let n=e.currentTarget.closest(`.lr-filter-list`);if(!n)return;let r=Array.from(n.querySelectorAll(`[data-filter-item]`));r[(r.indexOf(e.currentTarget)+t+r.length)%r.length]?.focus()},fa=(e,t)=>{let n=e.currentTarget.closest(`.lr-filter-list`);if(!n)return;let r=Array.from(n.querySelectorAll(`[data-filter-item]`));(t===`first`?r[0]:r.at(-1))?.focus()},pa=({activeChildId:e,column:t,floatingPosition:n,mobile:r=!1,messages:i,onBack:a,onOpenBranch:o,onQueryChange:s,onToggle:c,query:l,searchRef:u,selected:d})=>{let f=t.path.length===0,p=Wi(l)!==``,m=qi(t.nodes,l,f);return(0,H.jsxs)(`section`,{"aria-label":t.title,className:W(`lr-filter-level`,r&&`lr-filter-level--mobile`),"data-filter-column":t.key,"data-filter-depth":t.path.length,style:n,children:[(0,H.jsxs)(`label`,{className:`lr-filter-search`,children:[(0,H.jsxs)(`span`,{className:`lr-visually-hidden`,children:[i.search,` `,t.title]}),(0,H.jsx)(`input`,{"aria-label":`${i.search} ${t.title}`,onChange:e=>{s(t.key,e.currentTarget.value)},onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),e.currentTarget.closest(`.lr-filter-level`)?.querySelector(`[data-filter-item]`)?.focus())},placeholder:t.path.length===0?i.addFilterPlaceholder:i.filterPlaceholder,ref:u,spellCheck:!1,type:`search`,value:l})]}),(0,H.jsxs)(`div`,{"aria-label":`${t.title} ${i.options}`,className:`lr-filter-list`,role:`menu`,children:[m.map(({node:n,parent:s})=>{let l=!!(n.children&&n.children.length>0),u=l&&e===n.id,f=!l&&d.includes(n.id),m=s?`${s.id}/${n.id}`:n.id,h=s?`${s.label}: ${n.label}`:n.label,g=n.dividerBefore&&!p?(0,H.jsx)(`div`,{className:`lr-filter-separator`,role:`separator`}):null;return l?(0,H.jsxs)(A.Fragment,{children:[g,(0,H.jsxs)(`button`,{"aria-expanded":u,"aria-haspopup":`menu`,className:`lr-filter-item`,"data-active":u,"data-filter-item":!0,"data-filter-node":n.id,onClick:e=>{o(n,t,!0,e.currentTarget)},onPointerEnter:e=>{r||o(n,t,!1,e.currentTarget)},onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),da(e,1)):e.key===`ArrowUp`?(e.preventDefault(),da(e,-1)):e.key===`Home`?(e.preventDefault(),fa(e,`first`)):e.key===`End`?(e.preventDefault(),fa(e,`last`)):e.key===`ArrowRight`?(e.preventDefault(),o(n,t,!0,e.currentTarget)):e.key===`ArrowLeft`&&t.path.length>0&&(e.preventDefault(),a())},role:`menuitem`,type:`button`,children:[(0,H.jsx)(`span`,{className:`lr-filter-item__icon`,children:n.icon?(0,H.jsx)(U,{name:n.icon,size:14}):null}),(0,H.jsxs)(`span`,{className:`lr-filter-item__copy`,children:[(0,H.jsx)(`span`,{children:n.label}),n.description?(0,H.jsx)(`small`,{children:n.description}):null]}),(0,H.jsx)(`span`,{className:`lr-filter-item__meta`,children:(0,H.jsx)(U,{name:`chevronRight`,size:12})})]})]},m):(0,H.jsxs)(A.Fragment,{children:[g,(0,H.jsxs)(`div`,{className:`lr-filter-choice`,role:`none`,children:[(0,H.jsx)(`button`,{"aria-label":`${f?i.remove:i.add} ${h}`,"aria-pressed":f,className:`lr-filter-choice__checkbox`,onClick:()=>{c(n.id,!1)},type:`button`,children:f?(0,H.jsx)(U,{name:`check`,size:10}):null}),(0,H.jsxs)(`button`,{"aria-checked":f,"aria-label":s?h:void 0,className:`lr-filter-item lr-filter-item--choice`,"data-filter-item":!0,"data-filter-node":n.id,onClick:()=>{c(n.id,!0)},onKeyDown:e=>{e.key===`ArrowDown`?(e.preventDefault(),da(e,1)):e.key===`ArrowUp`?(e.preventDefault(),da(e,-1)):e.key===`Home`?(e.preventDefault(),fa(e,`first`)):e.key===`End`?(e.preventDefault(),fa(e,`last`)):e.key===`ArrowLeft`&&t.path.length>0&&(e.preventDefault(),a())},role:`menuitemcheckbox`,type:`button`,children:[(0,H.jsxs)(`span`,{className:`lr-filter-item__copy`,children:[(0,H.jsxs)(`span`,{children:[s?(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`lr-filter-item__context`,children:s.label}):null,n.label]}),n.description?(0,H.jsx)(`small`,{children:n.description}):null]}),n.count!==void 0&&!s?(0,H.jsx)(`span`,{className:`lr-filter-item__meta`,children:(0,H.jsx)(`small`,{children:n.count})}):null]})]})]},m)}),m.length===0?(0,H.jsx)(`p`,{className:`lr-filter-empty`,children:f?i.noMatchingProperties:i.noMatchingValues}):null]})]})},ma=({ariaLabel:e,defaultValue:t=[],messages:n,onValueChange:r,options:i,trigger:a,triggerTooltip:o,value:s})=>{let c={...Qi,...n},l=(0,A.useSyncExternalStore)(ra,ia,aa),[u,d]=(0,A.useState)(!1),[f,p]=(0,A.useState)(t),m=s??f,[h,g]=(0,A.useState)([]),[_,ee]=(0,A.useState)({}),[v,y]=(0,A.useState)({}),b=(0,A.useRef)(null),te=(0,A.useRef)(!1),x=(0,A.useRef)(void 0),S=(0,A.useRef)(null),ne=(0,A.useRef)(null),C=(0,A.cloneElement)(a,{ref:ne}),w=oa(i,h,c.rootTitle),T=w.at(-1)??{key:`root`,nodes:i,path:[],title:c.rootTitle},E=()=>{x.current!==void 0&&(window.clearTimeout(x.current),x.current=void 0)};(0,A.useEffect)(()=>()=>{x.current!==void 0&&window.clearTimeout(x.current)},[]);let D=e=>{E(),e&&(te.current=!1,g([]),ee({}),y({})),d(e)},O=(e,t)=>{E();let n=la(i,m.includes(e)?m.filter(t=>t!==e):[...m,e]);s===void 0&&p(n),r?.(n),t&&d(!1)},k=(e,t,n=!0,r)=>{E();let i=()=>{x.current=void 0;let i=[...t.path,e.id],a=Ui(i);if(!l&&r){let t=r.closest(`.lr-filter-popover`);if(t){let n=t.getBoundingClientRect(),i=r.getBoundingClientRect(),o=sa(e.children??[]),s=window.innerHeight-n.top-8,c=Math.max(0,s-o),l=Math.min(Math.max(0,i.top-n.top-1),c);ee(e=>({...e,[a]:l}))}}g(i),n&&window.requestAnimationFrame(()=>{(l?S.current:document.querySelector(`.lr-filter-level[data-filter-depth="${i.length.toString()}"] input`))?.focus()})};if(!n&&!l){x.current=window.setTimeout(i,ea);return}i()},re=()=>{let e=h.at(-1),t=h.slice(0,-1);g(t),window.requestAnimationFrame(()=>{if(l){S.current?.focus();return}e&&document.querySelector(`[data-filter-node="${e}"]`)?.focus()})},oe=(e,t)=>{E();let n={...v,[e]:t};y(n),g(e=>Ji(i,e,n))};if(l){let t=w.at(-2)?.title??e;return(0,H.jsxs)(me,{onOpenChange:D,open:u,children:[o?(0,H.jsx)(Y,{label:o,children:(0,H.jsx)(ve,{asChild:!0,children:C})}):(0,H.jsx)(ve,{asChild:!0,children:C}),(0,H.jsxs)(Ue,{children:[(0,H.jsx)(he,{className:`lr-dialog-overlay`}),(0,H.jsxs)(le,{className:`lr-filter-dialog`,onOpenAutoFocus:e=>{e.preventDefault(),S.current?.focus()},onCloseAutoFocus:e=>{e.preventDefault(),ne.current?.focus()},children:[(0,H.jsxs)(`header`,{className:`lr-filter-dialog__header`,children:[(0,H.jsxs)(`div`,{className:`lr-filter-dialog__heading`,children:[h.length>0?(0,H.jsx)(Y,{label:`${c.backTo} ${t}`,children:(0,H.jsx)(K,{label:`${c.backTo} ${t}`,name:`chevronLeft`,onClick:re,size:`lg`})}):null,(0,H.jsx)(ie,{children:h.length===0?e:T.title})]}),(0,H.jsx)(Y,{label:c.close,children:(0,H.jsx)(ce,{asChild:!0,children:(0,H.jsx)(K,{label:c.close,name:`close`,size:`lg`})})})]}),(0,H.jsx)(ue,{className:`lr-visually-hidden`,children:c.description}),(0,H.jsx)(`div`,{className:`lr-filter-dialog__body`,children:(0,H.jsx)(pa,{activeChildId:void 0,column:T,mobile:!0,messages:c,onBack:re,onOpenBranch:k,onQueryChange:oe,onToggle:O,query:v[T.key]??``,searchRef:S,selected:m},T.key)})]})]})]})}return(0,H.jsxs)(Be,{onOpenChange:D,open:u,children:[o?(0,H.jsx)(Y,{label:o,children:(0,H.jsx)(_e,{asChild:!0,children:C})}):(0,H.jsx)(_e,{asChild:!0,children:C}),(0,H.jsx)(ae,{children:(0,H.jsxs)(ge,{align:`start`,"aria-label":e,className:`lr-filter-popover`,collisionPadding:8,onOpenAutoFocus:e=>{e.preventDefault(),b.current?.focus()},onCloseAutoFocus:e=>{e.preventDefault(),te.current||ne.current?.focus(),te.current=!1},onEscapeKeyDown:()=>{te.current=!1},onPointerDownOutside:()=>{te.current=!0},sideOffset:6,children:[(0,H.jsx)(`div`,{className:`lr-filter-main-panel`,children:(0,H.jsx)(pa,{activeChildId:h[0],column:w[0]??{key:`root`,nodes:i,path:[],title:c.rootTitle},messages:c,onBack:re,onOpenBranch:k,onQueryChange:oe,onToggle:O,query:v.root??``,searchRef:b,selected:m})}),(0,H.jsx)(`div`,{className:`lr-filter-submenus`,children:w.slice(1).map(e=>(0,H.jsx)(pa,{activeChildId:h[e.path.length],column:e,floatingPosition:{height:sa(e.nodes),right:ta+(e.path.length-1)*na,top:_[e.key]??0},messages:c,onBack:re,onOpenBranch:k,onQueryChange:oe,onToggle:O,query:v[e.key]??``,searchRef:void 0,selected:m},e.path.length))})]})})]})},ha=({group:e,messages:t,onValueChange:n,options:r,value:i})=>{let[a,o]=(0,A.useState)(!1),[s,c]=(0,A.useState)(``),l=(0,A.useRef)(null),u=s.trim().toLocaleLowerCase(),d=e.options.filter(e=>`${e.label} ${e.description??``}`.toLocaleLowerCase().includes(u)),f=e.selected.map(e=>e.id),p=e.selected.length===1?e.selected[0]?.label??t.oneValue:`${e.selected[0]?.label??e.selected.length.toString()} +${(e.selected.length-1).toString()}`,m=(e,t)=>{n(la(r,i.includes(e)?i.filter(t=>t!==e):[...i,e])),t&&o(!1)};return(0,H.jsxs)(Be,{onOpenChange:e=>{e&&c(``),o(e)},open:a,children:[(0,H.jsxs)(`div`,{className:`lr-applied-filter`,children:[(0,H.jsx)(_e,{asChild:!0,children:(0,H.jsxs)(`button`,{"aria-label":`${t.edit} ${e.label}`,className:`lr-applied-filter__editor`,type:`button`,children:[(0,H.jsxs)(`span`,{className:`lr-applied-filter__property`,children:[(0,H.jsx)(U,{name:e.icon??`filter`,size:12}),e.label]}),(0,H.jsx)(`span`,{className:`lr-applied-filter__operator`,children:e.selected.length===1?t.is:t.isAnyOf}),(0,H.jsx)(`span`,{className:`lr-applied-filter__value`,children:p})]})}),(0,H.jsx)(`button`,{"aria-label":`${t.remove} ${e.label}`,className:`lr-applied-filter__remove`,onClick:()=>{n(i.filter(e=>!f.includes(e)))},type:`button`,children:(0,H.jsx)(U,{name:`close`,size:12})})]}),(0,H.jsx)(ae,{children:(0,H.jsxs)(ge,{align:`start`,"aria-label":`${t.edit} ${e.label}`,className:`lr-applied-filter-popover`,collisionPadding:8,onOpenAutoFocus:e=>{e.preventDefault(),l.current?.focus()},sideOffset:6,children:[(0,H.jsxs)(`label`,{className:`lr-filter-search lr-applied-filter-popover__search`,children:[(0,H.jsxs)(`span`,{className:`lr-visually-hidden`,children:[t.search,` `,e.label]}),(0,H.jsx)(`input`,{"aria-label":`${t.search} ${e.label}`,onChange:e=>{c(e.currentTarget.value)},placeholder:t.filterPlaceholder,ref:l,spellCheck:!1,type:`search`,value:s})]}),(0,H.jsxs)(`div`,{"aria-label":`${e.label} ${t.selectedValues}`,className:`lr-filter-list`,role:`menu`,children:[d.map(e=>{let n=i.includes(e.id);return(0,H.jsxs)(`div`,{className:`lr-filter-choice`,role:`none`,children:[(0,H.jsx)(`button`,{"aria-label":`${n?t.remove:t.add} ${e.label}`,"aria-pressed":n,className:`lr-filter-choice__checkbox`,onClick:()=>{m(e.id,!1)},type:`button`,children:n?(0,H.jsx)(U,{name:`check`,size:12}):null}),(0,H.jsxs)(`button`,{"aria-checked":n,className:`lr-filter-item lr-filter-item--choice`,"data-filter-item":!0,onClick:()=>{m(e.id,!0)},onKeyDown:e=>{e.key===`ArrowDown`&&(e.preventDefault(),da(e,1)),e.key===`ArrowUp`&&(e.preventDefault(),da(e,-1)),e.key===`Home`&&(e.preventDefault(),fa(e,`first`)),e.key===`End`&&(e.preventDefault(),fa(e,`last`))},role:`menuitemcheckbox`,type:`button`,children:[(0,H.jsxs)(`span`,{className:`lr-filter-item__copy`,children:[(0,H.jsx)(`span`,{children:e.label}),e.description?(0,H.jsx)(`small`,{children:e.description}):null]}),(0,H.jsx)(`span`,{className:`lr-filter-item__meta`,children:e.count===void 0?null:(0,H.jsx)(`small`,{children:e.count})})]})]},e.id)}),d.length===0?(0,H.jsx)(`p`,{className:`lr-filter-empty`,children:t.noMatchingValues}):null]})]})})]})},ga=({addFilter:e,ariaLabel:t,className:n,messages:r,onClear:i,onValueChange:a,options:o,supplementalConditions:s,value:c})=>{let l={...Qi,...r},u=ua(o,c);return(0,H.jsxs)(`div`,{"aria-label":t,className:W(`lr-applied-filter-bar`,n),role:`region`,children:[(0,H.jsxs)(`div`,{className:`lr-applied-filter-bar__conditions`,children:[s,u.map(e=>(0,H.jsx)(ha,{group:e,messages:l,onValueChange:a,options:o,value:c},e.id)),(0,H.jsx)(`div`,{className:`lr-applied-filter-bar__add`,children:e})]}),c.length>0||s?(0,H.jsx)(G,{className:`lr-applied-filter-bar__clear`,onClick:()=>{if(i){i();return}a([])},shape:`pill`,children:l.clear}):null]})},_a=({agent:e,badge:t,className:n,description:r,id:i,meta:a,selected:o=!1,title:s,...c})=>(0,H.jsxs)(`article`,{className:W(`lr-task-card`,o&&`is-selected`,n),...c,children:[(0,H.jsxs)(`div`,{className:`lr-task-card__header`,children:[(0,H.jsx)(`span`,{children:i}),t?(0,H.jsx)(ji,{tone:t.tone??`neutral`,children:t.label}):null]}),(0,H.jsx)(`strong`,{className:`lr-task-card__title`,children:s}),r?(0,H.jsx)(`p`,{children:r}):null,(0,H.jsx)(`footer`,{children:(0,H.jsxs)(`span`,{className:`lr-task-card__agent`,children:[e?(0,H.jsx)(Ni,{label:e}):null,a]})})]}),va=({addLabel:e,children:t,count:n,label:r,onAdd:i,tone:a})=>(0,H.jsxs)(`section`,{className:`lr-kanban-column`,children:[(0,H.jsxs)(`header`,{children:[(0,H.jsx)(Mi,{label:r,tone:a}),(0,H.jsx)(`span`,{className:`lr-kanban-column__count`,children:n}),i?(0,H.jsx)(G,{"aria-label":e??`Add task to ${r}`,className:`lr-kanban-column__add`,onClick:i,size:`sm`,children:(0,H.jsx)(U,{name:`add`,size:13})}):null]}),(0,H.jsx)(`div`,{className:`lr-kanban-column__stack`,children:t})]}),ya=({detail:e,icon:t=`check`,label:n,time:r,tone:i=`neutral`})=>(0,H.jsxs)(`div`,{className:W(`lr-timeline-event`,`lr-timeline-event--${i}`),children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`lr-timeline-event__icon`,children:(0,H.jsx)(U,{name:t,size:12})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`strong`,{children:n}),e?(0,H.jsx)(`span`,{children:e}):null]}),(0,H.jsx)(`time`,{children:r})]}),ba=({action:e,children:t,title:n})=>(0,H.jsxs)(`section`,{className:`lr-inspector-section`,children:[(0,H.jsxs)(`header`,{children:[(0,H.jsx)(`strong`,{children:n}),e]}),(0,H.jsx)(`div`,{className:`lr-inspector-section__body`,children:t})]}),xa=({properties:e})=>(0,H.jsx)(`dl`,{className:`lr-run-summary`,children:e.map(e=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`dt`,{children:e.label}),(0,H.jsx)(`dd`,{children:e.value})]},e.label))}),Sa=({attempt:e,note:t,sessions:n,title:r})=>(0,H.jsxs)(`div`,{className:`lr-session-timeline-panel`,children:[e?(0,H.jsxs)(`div`,{className:`lr-session-timeline__row`,children:[(0,H.jsx)(`strong`,{className:`lr-session-timeline-panel__title`,children:e.heading}),(0,H.jsx)(Mi,{label:e.statusLabel,tone:e.tone})]}):null,(0,H.jsx)(`strong`,{className:e?`lr-session-timeline-panel__subtitle`:`lr-session-timeline-panel__title`,children:r}),t?(0,H.jsx)(`p`,{className:`lr-session-timeline-panel__note`,children:t}):null,(0,H.jsx)(`ol`,{className:`lr-session-timeline`,children:n.map(e=>(0,H.jsxs)(`li`,{"aria-label":e.ariaLabel,className:`lr-session-timeline__item`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`lr-session-timeline__ordinal`,children:e.ordinal}),(0,H.jsxs)(`div`,{className:`lr-session-timeline__body`,children:[(0,H.jsxs)(`div`,{className:`lr-session-timeline__row`,children:[(0,H.jsx)(Mi,{label:e.statusLabel,tone:e.tone}),e.handoffRequestedLabel?(0,H.jsx)(ji,{tone:`warning`,children:e.handoffRequestedLabel}):null]}),e.occupancyPercent!==void 0&&e.occupancyLabel!==void 0?(0,H.jsxs)(`div`,{className:`lr-session-timeline__occupancy`,children:[(0,H.jsx)(`progress`,{"aria-hidden":`true`,max:100,value:e.occupancyPercent}),(0,H.jsxs)(`p`,{className:`lr-session-timeline__occupancy-text`,children:[(0,H.jsx)(`span`,{children:e.occupancyLabel}),e.occupancyQualityLabel===void 0?null:(0,H.jsx)(`span`,{className:`lr-session-timeline__occupancy-quality`,children:e.occupancyQualityLabel})]})]}):null,e.checkpoints.length>0?(0,H.jsx)(`ul`,{className:`lr-session-timeline__checkpoints`,children:e.checkpoints.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsxs)(`details`,{className:`lr-checkpoint-card`,open:e.defaultOpen,children:[(0,H.jsxs)(`summary`,{children:[(0,H.jsx)(U,{"aria-hidden":`true`,className:`lr-checkpoint-card__chevron`,name:`chevronRight`,size:12}),(0,H.jsx)(`span`,{children:e.summary}),(0,H.jsx)(`time`,{children:e.timeLabel})]}),(0,H.jsx)(`div`,{className:`lr-checkpoint-card__body`,children:e.groups.map(e=>e.items.length>0?(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`strong`,{children:e.label}),(0,H.jsx)(`ul`,{children:e.items.map((e,t)=>(0,H.jsx)(`li`,{children:e},`${t.toString()}-${e}`))})]},e.label):null)})]})},e.id))}):e.emptyCheckpointsLabel?(0,H.jsx)(`p`,{className:`lr-session-timeline__empty`,children:e.emptyCheckpointsLabel}):null]})]},e.id))})]}),Ca=({className:e,size:t=24})=>(0,H.jsxs)(`svg`,{"aria-hidden":`true`,className:e,focusable:`false`,height:t,viewBox:`0 0 96 96`,width:t,children:[(0,H.jsx)(`rect`,{fill:`#5e6ad2`,height:`96`,rx:`24`,width:`96`}),(0,H.jsx)(`path`,{d:`M27 23v46h46`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`10`}),(0,H.jsx)(`path`,{d:`M48 23v25h25`,fill:`none`,stroke:`#fff`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`10`})]}),wa=`loomrail.locale`,Ta={en:{"settings.open":`Open settings`,"settings.title":`Settings`,"settings.description":`Preferences stored in this browser.`,"settings.appearance":`Appearance`,"settings.density":`Board density`,"settings.density.description":`Compact tightens the spacing inside and between cards.`,"settings.density.comfortable":`Comfortable`,"settings.density.compact":`Compact`,"layout.resize.sidebar":`Resize the sidebar`,"layout.resize.inspector":`Resize the task inspector`,"settings.layout":`Layout`,"settings.layout.description":`Drag a panel edge to resize it, or nudge it with the arrow keys.`,"settings.layout.reset":`Reset panel widths`,"settings.projects":`Projects`,"settings.projects.register.label":`Register a local repository`,"settings.projects.register.description":`The absolute path to a Git repository on this machine. Its directory name becomes the project name.`,"settings.projects.register.placeholder":`/absolute/path/to/your-repository`,"settings.projects.register.action":`Register repository`,"settings.projects.repositoryLabel":`Repository`,"settings.projects.unusable":`This path is not a Git repository right now, so any stage that changes files is refused here.`,"settings.projects.repair":`Repair demo repository`,"language.change":`Change language`,"language.english":`English`,"language.russian":`Русский`,"nav.humanRequests":`Human requests`,"nav.workspace":`Workspace`,"nav.open":`Open navigation`,"nav.yourProjects":`Your projects`,"nav.currentWork":`Current work`,"connection.connecting":`Connecting…`,"connection.local":`Local daemon`,"connection.offline":`Offline`,"connection.recovery.retryTitle":`Loomrail is temporarily unreachable`,"connection.recovery.retryDescription":`Check that the local process is still running. You can retry without losing saved work.`,"connection.recovery.reopenTitle":`This local session has ended`,"connection.recovery.reopenDescription":`Stop the old process if needed, then start Loomrail from the repository. A fresh authenticated tab will open automatically.`,"connection.recovery.command":`Run in a terminal`,"connection.recovery.retryAction":`Try again`,"theme.change":`Change color theme`,"theme.light":`Light`,"theme.dark":`Dark`,"theme.system":`System`,"project.switch":`Switch project`,"project.loading":`Loading…`,"project.none":`No projects`,"project.noneSingle":`No project`,search:`Search`,"task.new":`New task`,"task.create.description":`Create the work item first. Loomrail will propose the delivery pipeline after the brief is clear.`,"task.create.title":`Title`,"task.create.titlePlaceholder":`What should the team deliver?`,"task.create.brief":`Brief`,"task.create.briefDescription":`Enough context for the planning agents to ask useful questions.`,"task.create.briefPlaceholder":`Outcome, constraints, relevant files…`,"task.create.project":`Project`,"task.create.priority":`Priority`,"task.create.submit":`Create task`,"task.edit":`Edit task`,"task.edit.description":`Update the persisted brief and planning properties for this WorkItem.`,"task.edit.criteriaDescription":`Write one acceptance criterion per line, up to 50.`,"task.edit.criteriaError":`Use no more than 50 lines and 500 characters per criterion.`,"task.edit.submit":`Save changes`,"action.cancel":`Cancel`,"action.closeDialog":`Close dialog`,"view.active":`Active`,"view.backlog":`Backlog`,"view.allIssues":`All issues`,"view.filter":`Filter tasks`,"view.display":`Display settings`,"view.ordering":`Ordering`,"view.orderBy":`Order tasks by`,"view.boardOptions":`Board options`,"view.showEmptyColumns":`Show empty columns`,"view.direction.asc":`Sort ascending`,"view.direction.desc":`Sort descending`,"view.title":`Title`,"view.updated":`Updated`,"view.created":`Created`,"property.priority":`Priority`,"work.current":`Current work`,"work.boardLabel":`Current work board`,"work.summary.needsYou":`Needs you`,"work.summary.filter":`Quick filter`,"work.summary.clear":`Clear quick filter`,"view.actions":`Open view actions`,"view.copyLink":`Copy view link`,"filter.status":`Status`,"filter.priority":`Priority`,"filter.risk":`Risk`,"filter.rootTitle":`Filters`,"filter.search":`Search`,"filter.addPlaceholder":`Add Filter…`,"filter.placeholder":`Filter…`,"filter.noProperties":`No matching properties`,"filter.noValues":`No matching values`,"filter.add":`Add`,"filter.remove":`Remove`,"filter.options":`options`,"filter.backTo":`Back to`,"filter.close":`Close filters`,"filter.description":`Choose one or more task properties. Each selection is applied immediately.`,"filter.edit":`Edit`,"filter.is":`is`,"filter.isAnyOf":`is any of`,"filter.oneValue":`1 value`,"filter.selectedValues":`selected values`,"filter.clear":`Clear`,"state.BACKLOG":`Backlog`,"state.READY":`Ready`,"state.IN_PROGRESS":`Running`,"state.BLOCKED":`Blocked`,"state.DONE":`Done`,"state.CANCELLED":`Cancelled`,"priority.LOW":`Low`,"priority.MEDIUM":`Medium`,"priority.HIGH":`High`,"priority.URGENT":`Urgent`,"risk.LOW":`Low`,"risk.MEDIUM":`Medium`,"risk.HIGH":`High`,"risk.CRITICAL":`Critical`,"type.EPIC":`Epic`,"type.FEATURE":`Feature`,"type.TASK":`Task`,"type.BUG":`Bug`,"type.SPIKE":`Spike`,"type.SUBTASK":`Subtask`,"stage.DISCOVERY":`Discovery`,"stage.PLAN":`Plan`,"stage.IMPLEMENT":`Implementation`,"stage.REVIEW":`Review`,"stage.QA":`QA`,"stage.ACCEPTANCE":`Acceptance`,"empty.noProjects.title":`No local projects yet`,"empty.noProjects.description":`Register the two bundled, non-executable fixture projects to start a persisted board.`,"empty.noProjects.action":`Initialize demo workspace`,"loading.board.title":`Loading board…`,"loading.inspector.title":`Loading task details…`,"error.board.title":`The local board could not be loaded`,"error.unknown":`Unknown error`,"empty.active.title":`No active tasks`,"empty.active.description":`Create a task, or switch to All issues to see finished work.`,"empty.backlog.title":`The backlog is empty`,"empty.backlog.description":`New tasks wait here until someone moves them to Ready.`,"empty.all.title":`No tasks yet`,"empty.all.description":`Create a task to start tracking delivery in this project.`,"empty.filters.title":`No tasks match these filters`,"empty.filters.description":`Edit a condition above or clear the filter bar.`,"empty.noSelection.title":`No task selected`,"empty.noSelection.description":`Choose a card on the board to inspect its persisted state and activity.`,"task.move":`Move`,"task.moveTo":`Move to {state}`,"task.moveToShort":`To {state}`,"task.overview":`Overview`,"task.state":`State`,"task.stage":`Stage`,"task.type":`Type`,"task.priority":`Priority`,"task.risk":`Risk`,"task.noBrief":`No brief has been added yet.`,"task.acceptanceCriteria":`Acceptance criteria`,"task.noAcceptanceCriteria":`No acceptance criteria have been recorded.`,"task.activity":`Activity`,"task.loadingActivity":`Loading activity…`,"task.noActivity":`No activity recorded.`,"task.activityCountMore":`{count}+`,"task.loadMoreActivity":`Show more`,"workflow.title":`Workflow`,"workflow.mockName":`Delivery workflow`,"workflow.start":`Start workflow`,"workflow.startDescription":`Run the bounded Discovery → Acceptance workflow. It may stop for a durable question or owner decision before continuing.`,"workflow.readyRequired":`Move this task to Ready before starting its workflow.`,"workflow.loading":`Loading workflow…`,"workflow.status.RUNNING":`Running`,"workflow.status.WAITING_HUMAN":`Waiting for you`,"workflow.status.SOFT_PAUSED":`Paused`,"workflow.status.HARD_PAUSED":`Budget paused`,"workflow.status.INTERRUPTED":`Interrupted`,"workflow.status.SUCCEEDED":`Completed`,"workflow.status.FAILED":`Failed`,"workflow.status.CANCELLED":`Cancelled`,"workflow.completed":`The bounded delivery workflow completed from its recorded decisions.`,"workflow.stage.QUEUED":`Queued`,"workflow.stage.RUNNING":`Running`,"workflow.stage.WAITING_HUMAN":`Waiting`,"workflow.stage.SOFT_PAUSED":`Paused`,"workflow.stage.HARD_PAUSED":`Budget paused`,"workflow.stage.INTERRUPTED":`Interrupted`,"workflow.stage.CANCELLED":`Cancelled`,"workflow.stage.SUCCEEDED":`Completed`,"workflow.stage.other":`In progress`,"workflow.action.pause":`Pause`,"workflow.action.resume":`Resume`,"workflow.action.cancel":`Cancel run`,"workflow.action.override":`Approve {limit} token budget`,"workflow.budget.title":`Estimated token budget`,"workflow.budget.usage":`{used} of {limit}`,"workflow.budget.revision":`Policy revision {revision}`,"workflow.recovery.title":`Recovery report`,"workflow.recovery.description":`A running attempt was interrupted safely after the local daemon restarted.`,"workflow.hardPause.noProgress":`Paused: no progress`,"workflow.hardPause.contextFloor":`Paused: context too large`,"workflow.hardPause.providerRejected":`Paused: provider rejected input`,"workflow.hardPause.providerStartFailed":`Paused: provider unavailable`,"workflow.hardPause.sessionLimit":`Paused: session limit reached`,"workflow.sessions.title":`Sessions`,"workflow.sessions.attemptHeading":`Attempt {attempt}`,"workflow.sessions.ordinal":`Session {ordinal}`,"workflow.sessions.status.RUNNING":`Running`,"workflow.sessions.status.COMPLETED":`Completed`,"workflow.sessions.status.HANDOFF":`Handed off`,"workflow.sessions.status.CONTEXT_EXHAUSTED":`Context exhausted`,"workflow.sessions.status.INTERRUPTED":`Interrupted`,"workflow.sessions.status.CANCELLED":`Cancelled`,"workflow.sessions.handoffRequested":`Handoff requested`,"workflow.sessions.occupancyPeak":`Peaked at {percent}% of the window`,"workflow.sessions.occupancyAtHandoff":`{percent}% of the window at handoff`,"workflow.sessions.usageQuality.ACTUAL":`(measured)`,"workflow.sessions.usageQuality.PROVIDER_ESTIMATE":`(provider estimate)`,"workflow.sessions.usageQuality.LOOMRAIL_ESTIMATE":`(Loomrail estimate)`,"workflow.sessions.noCheckpointOnRequest":`This provider cannot wind down on request — losing recent work when a session is cut is expected for it.`,"workflow.checkpoints.empty":`No checkpoint was published in this session.`,"workflow.checkpoints.completed":`Completed`,"workflow.checkpoints.remaining":`Remaining`,"workflow.checkpoints.deadEnds":`Dead ends`,"workflow.checkpoints.openQuestions":`Open questions`,"workspace.title":`Workspace`,"workspace.state":`State`,"workspace.status.READY":`Ready`,"workspace.status.ORPHANED":`Worktree gone`,"workspace.status.REMOVED":`Removed`,"workspace.repository":`Repository`,"workspace.branch":`Branch`,"workspace.worktree":`Worktree`,"workspace.baseCommit":`Base commit`,"workspace.baseCommit.none":`No commit yet`,"workspace.notReady":`The worktree for this task is no longer on disk. Loomrail does not cut a second one, and nothing returns this workspace to service — the branch still holds whatever was committed to it.`,"workspace.uncommitted":`Loomrail has committed nothing. The work sits in this worktree, on this branch, until you keep it or discard it.`,"changes.title":`Changes`,"changes.empty":`This task has changed nothing in its worktree yet.`,"changes.truncated":`Only the first {count} changed files are listed. This worktree holds more than Loomrail prints here.`,"changes.binary":`Binary`,"changes.binaryNoPatch":`This is a binary file, so there is no text diff to show for it.`,"changes.renamedFrom":`Renamed from {path}`,"changes.lineCounts":`Lines added: {insertions}; removed: {deletions}`,"changes.diffPending":`Reading this file’s diff…`,"changes.diffUnavailable":`This diff cannot be read: the task no longer has a workspace.`,"changes.patchTruncated":`Loomrail prints only the first part of this diff — {bytes} more bytes are not shown here.`,"changes.status.ADDED":`Added`,"changes.status.MODIFIED":`Modified`,"changes.status.DELETED":`Deleted`,"changes.status.RENAMED":`Renamed`,"changes.error.WORKSPACE_WORKTREE_MISSING":`The worktree for this task is no longer on disk, so there is nothing left to read its changes from.`,"changes.error.WORKSPACE_WORKTREE_UNREADABLE":`Loomrail cannot enter this task’s worktree, so it cannot say what changed. It may still hold the agent’s work, but Loomrail cannot verify that from here.`,"changes.error.WORKSPACE_HAS_NO_BASELINE":`This workspace records no commit to compare against, so there is nothing to measure its changes from.`,"changes.error.CHANGES_UNREADABLE":`Loomrail could not read this worktree against the commit it was cut from, so it is not showing a file list it cannot stand behind.`,"changes.error.GIT_UNAVAILABLE":`Loomrail could not start git on this machine, so it cannot read what this task changed.`,"changes.error.PATH_OUTSIDE_WORKSPACE":`That path lies outside this task’s worktree, so Loomrail did not read it.`,"changes.error.PATH_NOT_A_FILE":`That path does not name a changed file in this worktree.`,"changes.error.PATH_UNRESOLVABLE":`Loomrail could not resolve that path inside this worktree.`,"changes.error.other":`Loomrail could not read what this task changed.`,"acceptance.eyebrow":`Owner gate`,"acceptance.title":`Acceptance package`,"acceptance.evidence":`Recorded evidence`,"acceptance.reviewEvidence":`Review report`,"acceptance.qaEvidence":`QA report`,"acceptance.checks":`{count} verified checks`,"acceptance.evidenceCount":`{count} evidence records`,"acceptance.matrix":`Criterion matrix`,"acceptance.noCriteria":`No explicit criteria were recorded; review the evidence and release note.`,"acceptance.accept":`Accept delivery`,"acceptance.return":`Return to work`,"acceptance.reject":`Reject`,"acceptance.status.PENDING":`Needs decision`,"acceptance.status.ACCEPTED":`Accepted`,"acceptance.status.RETURNED":`Returned`,"acceptance.status.REJECTED":`Rejected`,"humanRequest.blocking":`Blocking request`,"humanRequest.recommendation":`Recommendation`,"humanRequest.recommended":`Recommended`,"humanRequest.other":`Other`,"humanRequest.otherPlaceholder":`Describe the direction to use…`,"humanRequest.answerResume":`Answer & resume`,"humanRequest.chooseAnswer":`Choose an answer before resuming.`,"attention.title":`Needs your decision`,"attention.count":`{count} blocking request`,"attention.countMany":`{count} blocking requests`,"event.created":`Task created`,"event.createdDetail":`Added to the project backlog.`,"event.updated":`Task updated`,"event.updatedDetail":`Changed {fields}.`,"event.stateChanged":`State changed`,"event.stateChangedDetail":`{from} → {to}`,"event.projectRegistered":`Project registered`,"event.pipelineStarted":`Workflow started`,"event.pipelineStartedDetail":`Delivery workflow entered {stage}.`,"event.stageChanged":`Stage updated`,"event.stageChangedDetail":`{stage}: {status}`,"event.humanRequestOpened":`Decision requested`,"event.humanRequestOpenedDetail":`{title}`,"event.humanRequestResolved":`Decision recorded`,"event.humanRequestResolvedDetail":`The owner's answer was recorded durably.`,"event.usageRecorded":`Usage recorded`,"event.usageRecordedDetail":`+{amount} estimated tokens · {total} total`,"event.budgetThreshold":`Budget threshold reached`,"event.budgetThresholdDetail":`{threshold}% · {total} estimated tokens`,"event.pipelinePaused":`Workflow paused`,"event.pipelinePausedDetail":`{kind} pause at {stage}`,"event.pipelineResumed":`Workflow resumed`,"event.pipelineResumedDetail":`Resumed {stage}`,"event.pipelineCancelled":`Workflow cancelled`,"event.pipelineCancelledDetail":`Execution stopped at {stage}`,"event.budgetOverride":`Budget override approved`,"event.budgetOverrideDetail":`Revision {revision} · {limit} estimated tokens`,"event.recoveryCreated":`Workflow recovered`,"event.recoveryCreatedDetail":`The orphaned {stage} attempt was marked interrupted.`,"event.evidenceRecorded":`Evidence recorded`,"event.evidenceRecordedDetail":`{title}`,"event.acceptanceRequested":`Owner acceptance requested`,"event.acceptanceRequestedDetail":`Review and QA evidence are ready for a final decision.`,"event.acceptanceResolved":`Acceptance resolved`,"event.acceptanceResolvedDetail":`Owner action: {action}`,"event.pipelineCompleted":`Workflow completed`,"event.pipelineCompletedDetail":`The bounded delivery workflow finished.`,"event.providerSessionStarted":`Agent session started`,"event.providerSessionStartedDetail":`Session {ordinal}`,"event.checkpointPublished":`Checkpoint published`,"event.checkpointPublishedDetail":`{summary}`,"event.contextHandoffRequested":`Handoff requested`,"event.contextHandoffRequestedDetail":`Session {ordinal} is wrapping up`,"event.providerSessionEnded":`Agent session ended`,"event.providerSessionEndedDetail":`{reason}`,"event.contextFloorExceeded":`Required context did not fit`,"event.contextFloorExceededDetail":`Session {ordinal} needed {requiredBytes} bytes of {budgetBytes}`,"event.workspaceCreated":`Workspace created`,"event.workspaceCreatedDetail":`Branch {branch}`,"event.workspaceOrphaned":`Workspace orphaned`,"event.workspaceOrphanedDetail":`The worktree is gone or prunable`,"field.title":`title`,"field.description":`description`,"field.priority":`priority`,"field.risk":`risk`,"field.acceptanceCriteria":`acceptance criteria`},ru:{"settings.open":`Открыть настройки`,"settings.title":`Настройки`,"settings.description":`Параметры, сохранённые в этом браузере.`,"settings.appearance":`Внешний вид`,"settings.density":`Плотность доски`,"settings.density.description":`Компактный режим уменьшает отступы внутри карточек и между ними.`,"settings.density.comfortable":`Обычная`,"settings.density.compact":`Компактная`,"layout.resize.sidebar":`Изменить ширину сайдбара`,"layout.resize.inspector":`Изменить ширину инспектора`,"settings.layout":`Расположение`,"settings.layout.description":`Потяните край панели или подвиньте его стрелками на клавиатуре.`,"settings.layout.reset":`Сбросить ширину панелей`,"settings.projects":`Проекты`,"settings.projects.register.label":`Подключить локальный репозиторий`,"settings.projects.register.description":`Абсолютный путь к Git-репозиторию на этой машине. Имя каталога станет именем проекта.`,"settings.projects.register.placeholder":`/absolute/path/to/your-repository`,"settings.projects.register.action":`Подключить репозиторий`,"settings.projects.repositoryLabel":`Репозиторий`,"settings.projects.unusable":`Сейчас по этому пути нет Git-репозитория, поэтому любая стадия, изменяющая файлы, здесь отклоняется.`,"settings.projects.repair":`Починить demo-репозиторий`,"language.change":`Сменить язык`,"language.english":`English`,"language.russian":`Русский`,"nav.humanRequests":`Запросы человеку`,"nav.workspace":`Пространство`,"nav.open":`Открыть навигацию`,"nav.yourProjects":`Ваши проекты`,"nav.currentWork":`Текущая работа`,"connection.connecting":`Подключение…`,"connection.local":`Local daemon`,"connection.offline":`Нет подключения`,"connection.recovery.retryTitle":`Loomrail временно недоступен`,"connection.recovery.retryDescription":`Проверьте, что локальный процесс ещё работает. Повторная попытка не затронет сохранённые данные.`,"connection.recovery.reopenTitle":`Эта локальная сессия завершилась`,"connection.recovery.reopenDescription":`При необходимости остановите старый процесс, затем запустите Loomrail из репозитория. Новая авторизованная вкладка откроется автоматически.`,"connection.recovery.command":`Выполните в терминале`,"connection.recovery.retryAction":`Повторить`,"theme.change":`Сменить тему`,"theme.light":`Светлая`,"theme.dark":`Тёмная`,"theme.system":`Системная`,"project.switch":`Сменить проект`,"project.loading":`Загрузка…`,"project.none":`Проектов нет`,"project.noneSingle":`Нет проекта`,search:`Поиск`,"task.new":`Новая задача`,"task.create.description":`Сначала создайте задачу. Loomrail предложит конвейер доставки, когда описание станет достаточно ясным.`,"task.create.title":`Название`,"task.create.titlePlaceholder":`Какой результат должна получить команда?`,"task.create.brief":`Описание`,"task.create.briefDescription":`Добавьте контекст, чтобы планирующие агенты могли задать полезные вопросы.`,"task.create.briefPlaceholder":`Результат, ограничения, важные файлы…`,"task.create.project":`Проект`,"task.create.priority":`Приоритет`,"task.create.submit":`Создать задачу`,"task.edit":`Редактировать задачу`,"task.edit.description":`Обновите сохранённое описание и параметры планирования WorkItem.`,"task.edit.criteriaDescription":`Один критерий приёмки на строку, не более 50.`,"task.edit.criteriaError":`Не более 50 строк и 500 символов в каждом критерии.`,"task.edit.submit":`Сохранить изменения`,"action.cancel":`Отмена`,"action.closeDialog":`Закрыть окно`,"view.active":`Активные`,"view.backlog":`Бэклог`,"view.allIssues":`Все задачи`,"view.filter":`Фильтровать задачи`,"view.display":`Настройки отображения`,"view.ordering":`Сортировка`,"view.orderBy":`Сортировать задачи по`,"view.boardOptions":`Настройки доски`,"view.showEmptyColumns":`Показывать пустые колонки`,"view.direction.asc":`Сортировать по возрастанию`,"view.direction.desc":`Сортировать по убыванию`,"view.title":`Название`,"view.updated":`Обновлено`,"view.created":`Создано`,"property.priority":`Приоритет`,"work.current":`Текущая работа`,"work.boardLabel":`Доска текущей работы`,"work.summary.needsYou":`Ждут вас`,"work.summary.filter":`Быстрый фильтр`,"work.summary.clear":`Убрать быстрый фильтр`,"view.actions":`Действия представления`,"view.copyLink":`Копировать ссылку`,"filter.status":`Статус`,"filter.priority":`Приоритет`,"filter.risk":`Риск`,"filter.rootTitle":`Фильтры`,"filter.search":`Поиск`,"filter.addPlaceholder":`Добавить фильтр…`,"filter.placeholder":`Фильтр…`,"filter.noProperties":`Подходящих свойств нет`,"filter.noValues":`Подходящих значений нет`,"filter.add":`Добавить`,"filter.remove":`Убрать`,"filter.options":`варианты`,"filter.backTo":`Назад к`,"filter.close":`Закрыть фильтры`,"filter.description":`Выберите одно или несколько свойств задачи. Изменения применяются сразу.`,"filter.edit":`Изменить`,"filter.is":`равно`,"filter.isAnyOf":`одно из`,"filter.oneValue":`1 значение`,"filter.selectedValues":`выбранные значения`,"filter.clear":`Очистить`,"state.BACKLOG":`Бэклог`,"state.READY":`Готово к работе`,"state.IN_PROGRESS":`В работе`,"state.BLOCKED":`Заблокировано`,"state.DONE":`Завершено`,"state.CANCELLED":`Отменено`,"priority.LOW":`Низкий`,"priority.MEDIUM":`Средний`,"priority.HIGH":`Высокий`,"priority.URGENT":`Срочный`,"risk.LOW":`Низкий`,"risk.MEDIUM":`Средний`,"risk.HIGH":`Высокий`,"risk.CRITICAL":`Критический`,"type.EPIC":`Эпик`,"type.FEATURE":`Функция`,"type.TASK":`Задача`,"type.BUG":`Ошибка`,"type.SPIKE":`Исследование`,"type.SUBTASK":`Подзадача`,"stage.DISCOVERY":`Исследование`,"stage.PLAN":`План`,"stage.IMPLEMENT":`Реализация`,"stage.REVIEW":`Проверка`,"stage.QA":`QA`,"stage.ACCEPTANCE":`Приёмка`,"empty.noProjects.title":`Локальных проектов пока нет`,"empty.noProjects.description":`Зарегистрируйте два встроенных безопасных demo-проекта, чтобы получить сохраняемую доску.`,"empty.noProjects.action":`Инициализировать demo-пространство`,"loading.board.title":`Загружаем доску…`,"loading.inspector.title":`Загружаем детали задачи…`,"error.board.title":`Не удалось загрузить локальную доску`,"error.unknown":`Неизвестная ошибка`,"empty.active.title":`Активных задач нет`,"empty.active.description":`Создайте задачу или откройте «Все задачи», чтобы увидеть завершённые.`,"empty.backlog.title":`Бэклог пуст`,"empty.backlog.description":`Новые задачи ждут здесь, пока их не переведут в «Готово к работе».`,"empty.all.title":`Задач пока нет`,"empty.all.description":`Создайте задачу, чтобы начать вести доставку в этом проекте.`,"empty.filters.title":`Нет задач с такими фильтрами`,"empty.filters.description":`Измените условие выше или очистите строку фильтров.`,"empty.noSelection.title":`Задача не выбрана`,"empty.noSelection.description":`Выберите карточку на доске, чтобы посмотреть её состояние и историю.`,"task.move":`Переместить`,"task.moveTo":`Переместить в «{state}»`,"task.moveToShort":`В «{state}»`,"task.overview":`Обзор`,"task.state":`Состояние`,"task.stage":`Этап`,"task.type":`Тип`,"task.priority":`Приоритет`,"task.risk":`Риск`,"task.noBrief":`Описание ещё не добавлено.`,"task.acceptanceCriteria":`Критерии приёмки`,"task.noAcceptanceCriteria":`Критерии приёмки ещё не записаны.`,"task.activity":`История`,"task.loadingActivity":`Загружаем историю…`,"task.noActivity":`История пока пуста.`,"task.activityCountMore":`{count}+`,"task.loadMoreActivity":`Показать ещё`,"workflow.title":`Процесс`,"workflow.mockName":`Процесс поставки`,"workflow.start":`Запустить процесс`,"workflow.startDescription":`Запустить ограниченный процесс «Исследование → Приёмка». Перед продолжением он может остановиться на сохранённом вопросе или решении владельца.`,"workflow.readyRequired":`Перед запуском переведите задачу в состояние «Готово к работе».`,"workflow.loading":`Загружаем процесс…`,"workflow.status.RUNNING":`Выполняется`,"workflow.status.WAITING_HUMAN":`Ждёт вас`,"workflow.status.SOFT_PAUSED":`Приостановлен`,"workflow.status.HARD_PAUSED":`Остановлен лимитом`,"workflow.status.INTERRUPTED":`Прерван`,"workflow.status.SUCCEEDED":`Завершён`,"workflow.status.FAILED":`Ошибка`,"workflow.status.CANCELLED":`Отменён`,"workflow.completed":`Ограниченный процесс поставки завершён на основе сохранённых решений.`,"workflow.stage.QUEUED":`В очереди`,"workflow.stage.RUNNING":`Выполняется`,"workflow.stage.WAITING_HUMAN":`Ожидает`,"workflow.stage.SOFT_PAUSED":`Приостановлен`,"workflow.stage.HARD_PAUSED":`Остановлен лимитом`,"workflow.stage.INTERRUPTED":`Прерван`,"workflow.stage.CANCELLED":`Отменён`,"workflow.stage.SUCCEEDED":`Завершено`,"workflow.stage.other":`Выполняется`,"workflow.action.pause":`Приостановить`,"workflow.action.resume":`Продолжить`,"workflow.action.cancel":`Отменить запуск`,"workflow.action.override":`Одобрить лимит {limit} токенов`,"workflow.budget.title":`Лимит оценочных токенов`,"workflow.budget.usage":`{used} из {limit}`,"workflow.budget.revision":`Ревизия политики {revision}`,"workflow.recovery.title":`Отчёт о восстановлении`,"workflow.recovery.description":`Выполнявшаяся попытка безопасно прервана после перезапуска локального демона.`,"workflow.hardPause.noProgress":`Остановлен: нет прогресса`,"workflow.hardPause.contextFloor":`Остановлен: контекст не помещается`,"workflow.hardPause.providerRejected":`Остановлен: провайдер отклонил вход`,"workflow.hardPause.providerStartFailed":`Остановлен: провайдер недоступен`,"workflow.hardPause.sessionLimit":`Остановлен: достигнут предел сессий`,"workflow.sessions.title":`Сессии`,"workflow.sessions.attemptHeading":`Попытка {attempt}`,"workflow.sessions.ordinal":`Сессия {ordinal}`,"workflow.sessions.status.RUNNING":`Выполняется`,"workflow.sessions.status.COMPLETED":`Завершена`,"workflow.sessions.status.HANDOFF":`Передана дальше`,"workflow.sessions.status.CONTEXT_EXHAUSTED":`Контекст исчерпан`,"workflow.sessions.status.INTERRUPTED":`Прервана`,"workflow.sessions.status.CANCELLED":`Отменена`,"workflow.sessions.handoffRequested":`Запрошена передача`,"workflow.sessions.occupancyPeak":`Пик — {percent}% окна`,"workflow.sessions.occupancyAtHandoff":`{percent}% окна на момент передачи`,"workflow.sessions.usageQuality.ACTUAL":`(измерено)`,"workflow.sessions.usageQuality.PROVIDER_ESTIMATE":`(оценка провайдера)`,"workflow.sessions.usageQuality.LOOMRAIL_ESTIMATE":`(оценка Loomrail)`,"workflow.sessions.noCheckpointOnRequest":`Этот провайдер не умеет сворачиваться по запросу — для него штатно терять недавнюю работу при обрыве сессии.`,"workflow.checkpoints.empty":`В этой сессии checkpoint не публиковался.`,"workflow.checkpoints.completed":`Сделано`,"workflow.checkpoints.remaining":`Осталось`,"workflow.checkpoints.deadEnds":`Тупики`,"workflow.checkpoints.openQuestions":`Открытые вопросы`,"workspace.title":`Рабочая область`,"workspace.state":`Состояние`,"workspace.status.READY":`Готова`,"workspace.status.ORPHANED":`Worktree исчез`,"workspace.status.REMOVED":`Удалена`,"workspace.repository":`Репозиторий`,"workspace.branch":`Ветка`,"workspace.worktree":`Worktree`,"workspace.baseCommit":`Базовый коммит`,"workspace.baseCommit.none":`Коммитов ещё не было`,"workspace.notReady":`Каталога worktree этой задачи больше нет на диске. Loomrail не создаёт второй, и вернуть эту рабочую область в строй нечем — ветка по-прежнему хранит всё, что в неё закоммичено.`,"workspace.uncommitted":`Loomrail ничего не коммитил. Работа лежит в этом worktree, на этой ветке, пока вы её не сохраните или не удалите.`,"changes.title":`Изменения`,"changes.empty":`Задача пока ничего не изменила в своей рабочей области.`,"changes.truncated":`Показаны только первые {count} изменённых файлов. В этом worktree их больше, чем Loomrail выводит здесь.`,"changes.binary":`Бинарный`,"changes.binaryNoPatch":`Это бинарный файл — текстового диффа для него нет.`,"changes.renamedFrom":`Переименован из {path}`,"changes.lineCounts":`Добавлено строк: {insertions}, удалено: {deletions}`,"changes.diffPending":`Читаем дифф этого файла…`,"changes.diffUnavailable":`Этот дифф прочитать нечем: у задачи больше нет рабочей области.`,"changes.patchTruncated":`Loomrail выводит только начало этого диффа — ещё {bytes} байт здесь не показано.`,"changes.status.ADDED":`Добавлен`,"changes.status.MODIFIED":`Изменён`,"changes.status.DELETED":`Удалён`,"changes.status.RENAMED":`Переименован`,"changes.error.WORKSPACE_WORKTREE_MISSING":`Каталога worktree этой задачи больше нет на диске — читать изменения больше не из чего.`,"changes.error.WORKSPACE_WORKTREE_UNREADABLE":`Loomrail не может войти в worktree этой задачи и поэтому не может сказать, что изменилось. Возможно, работа агента всё ещё там, но Loomrail не может проверить это отсюда.`,"changes.error.WORKSPACE_HAS_NO_BASELINE":`У этой рабочей области не записан коммит для сравнения, поэтому измерять изменения не от чего.`,"changes.error.CHANGES_UNREADABLE":`Loomrail не смог прочитать этот worktree относительно коммита, от которого он отрезан, и не показывает список, за который не может отвечать.`,"changes.error.GIT_UNAVAILABLE":`Loomrail не смог запустить git на этой машине и поэтому не может прочитать, что изменила задача.`,"changes.error.PATH_OUTSIDE_WORKSPACE":`Этот путь лежит за пределами рабочей области задачи, и Loomrail его не читал.`,"changes.error.PATH_NOT_A_FILE":`Этот путь не именует изменённый файл в этом worktree.`,"changes.error.PATH_UNRESOLVABLE":`Loomrail не смог разрешить этот путь внутри этого worktree.`,"changes.error.other":`Loomrail не смог прочитать, что изменила эта задача.`,"acceptance.eyebrow":`Решение владельца`,"acceptance.title":`Пакет приёмки`,"acceptance.evidence":`Сохранённые доказательства`,"acceptance.reviewEvidence":`Отчёт ревью`,"acceptance.qaEvidence":`Отчёт QA`,"acceptance.checks":`Проверок: {count}`,"acceptance.evidenceCount":`Отчётов: {count}`,"acceptance.matrix":`Матрица критериев`,"acceptance.noCriteria":`Явные критерии не заданы — проверьте отчёты и описание релиза.`,"acceptance.accept":`Принять результат`,"acceptance.return":`Вернуть в работу`,"acceptance.reject":`Отклонить`,"acceptance.status.PENDING":`Нужно решение`,"acceptance.status.ACCEPTED":`Принято`,"acceptance.status.RETURNED":`Возвращено`,"acceptance.status.REJECTED":`Отклонено`,"humanRequest.blocking":`Блокирующий запрос`,"humanRequest.recommendation":`Рекомендация`,"humanRequest.recommended":`Рекомендуется`,"humanRequest.other":`Другое`,"humanRequest.otherPlaceholder":`Опишите, какое направление использовать…`,"humanRequest.answerResume":`Ответить и продолжить`,"humanRequest.chooseAnswer":`Выберите ответ, чтобы продолжить.`,"attention.title":`Нужно ваше решение`,"attention.count":`{count} блокирующий запрос`,"attention.countMany":`{count} блокирующих запросов`,"event.created":`Задача создана`,"event.createdDetail":`Добавлена в бэклог проекта.`,"event.updated":`Задача обновлена`,"event.updatedDetail":`Изменено: {fields}.`,"event.stateChanged":`Состояние изменено`,"event.stateChangedDetail":`{from} → {to}`,"event.projectRegistered":`Проект зарегистрирован`,"event.pipelineStarted":`Процесс запущен`,"event.pipelineStartedDetail":`Процесс поставки перешёл к этапу «{stage}».`,"event.stageChanged":`Этап обновлён`,"event.stageChangedDetail":`{stage}: {status}`,"event.humanRequestOpened":`Требуется решение`,"event.humanRequestOpenedDetail":`{title}`,"event.humanRequestResolved":`Решение сохранено`,"event.humanRequestResolvedDetail":`Ответ владельца сохранён в журнале.`,"event.usageRecorded":`Расход записан`,"event.usageRecordedDetail":`+{amount} оценочных токенов · всего {total}`,"event.budgetThreshold":`Достигнут порог бюджета`,"event.budgetThresholdDetail":`{threshold}% · {total} оценочных токенов`,"event.pipelinePaused":`Процесс приостановлен`,"event.pipelinePausedDetail":`Пауза {kind} на этапе «{stage}»`,"event.pipelineResumed":`Процесс продолжен`,"event.pipelineResumedDetail":`Продолжен этап «{stage}»`,"event.pipelineCancelled":`Процесс отменён`,"event.pipelineCancelledDetail":`Выполнение остановлено на этапе «{stage}»`,"event.budgetOverride":`Новый бюджет одобрен`,"event.budgetOverrideDetail":`Ревизия {revision} · {limit} оценочных токенов`,"event.recoveryCreated":`Процесс восстановлен`,"event.recoveryCreatedDetail":`Незавершённая попытка этапа «{stage}» помечена прерванной.`,"event.evidenceRecorded":`Доказательство сохранено`,"event.evidenceRecordedDetail":`{title}`,"event.acceptanceRequested":`Требуется приёмка владельца`,"event.acceptanceRequestedDetail":`Отчёты ревью и QA готовы для финального решения.`,"event.acceptanceResolved":`Приёмка завершена`,"event.acceptanceResolvedDetail":`Решение владельца: {action}`,"event.pipelineCompleted":`Процесс завершён`,"event.pipelineCompletedDetail":`Ограниченный процесс поставки завершён.`,"event.providerSessionStarted":`Сессия агента начата`,"event.providerSessionStartedDetail":`Сессия {ordinal}`,"event.checkpointPublished":`Checkpoint опубликован`,"event.checkpointPublishedDetail":`{summary}`,"event.contextHandoffRequested":`Запрошена передача`,"event.contextHandoffRequestedDetail":`Сессия {ordinal} сворачивается`,"event.providerSessionEnded":`Сессия агента завершена`,"event.providerSessionEndedDetail":`{reason}`,"event.contextFloorExceeded":`Обязательный контекст не поместился`,"event.contextFloorExceededDetail":`Сессии {ordinal} нужно {requiredBytes} байт из {budgetBytes}`,"event.workspaceCreated":`Рабочая область создана`,"event.workspaceCreatedDetail":`Ветка {branch}`,"event.workspaceOrphaned":`Рабочая область осиротела`,"event.workspaceOrphanedDetail":`Worktree отсутствует или может быть удалён`,"field.title":`название`,"field.description":`описание`,"field.priority":`приоритет`,"field.risk":`риск`,"field.acceptanceCriteria":`критерии приёмки`}},Ea=e=>e===`en`||e===`ru`,Da=()=>{let e=window.localStorage.getItem(wa);return Ea(e)?e:window.navigator.language.toLowerCase().startsWith(`ru`)?`ru`:`en`},Oa=e=>{window.localStorage.setItem(wa,e),document.documentElement.lang=e},ka=(e,t,n={})=>Object.entries(n).reduce((e,[t,n])=>e.replaceAll(`{${t}}`,String(n)),Ta[e][t]),Aa=(0,A.createContext)(null),ja=({children:e})=>{let[t,n]=(0,A.useState)(()=>{let e=Da();return Oa(e),e}),r=(0,A.useMemo)(()=>({locale:t,setLocale:e=>{Oa(e),n(e)},t:(e,n)=>ka(t,e,n)}),[t]);return(0,H.jsx)(Aa.Provider,{value:r,children:e})},X=()=>{let e=(0,A.useContext)(Aa);if(!e)throw Error(`useI18n must be rendered inside I18nProvider`);return e},Ma=[`sidebar`,`inspector`],Na={sidebar:{defaultWidth:240,max:360,min:200,property:`--lr-size-sidebar`},inspector:{defaultWidth:344,max:520,min:280,property:`--lr-size-inspector`}},Pa=e=>`loomrail-panel-${e}`,Fa=(e,t)=>{let{max:n,min:r}=Na[e];return Number.isFinite(t)?Math.min(n,Math.max(r,Math.round(t))):Na[e].defaultWidth},Ia=e=>{let t=window.localStorage.getItem(Pa(e));return t===null?Na[e].defaultWidth:Fa(e,Number(t))},La=(e,t)=>{let{defaultWidth:n,property:r}=Na[e],i=Fa(e,t);if(i===n){document.documentElement.style.removeProperty(r),window.localStorage.removeItem(Pa(e));return}document.documentElement.style.setProperty(r,`${i.toString()}px`),window.localStorage.setItem(Pa(e),i.toString())},Ra=()=>{for(let e of Ma)La(e,Na[e].defaultWidth)},za=()=>Ma.some(e=>window.localStorage.getItem(Pa(e))!==null),Ba=16,Va=({edge:e,panel:t})=>{let{t:n}=X(),[r,i]=(0,A.useState)(()=>Ia(t)),[a,o]=(0,A.useState)(!1),{max:s,min:c}=Na[t];(0,A.useEffect)(()=>{if(!a)return;let n=n=>{let r=Fa(t,e===`start`?n.clientX:window.innerWidth-n.clientX);i(r),La(t,r)},r=()=>{o(!1)};return document.body.classList.add(`is-resizing`),window.addEventListener(`pointermove`,n),window.addEventListener(`pointerup`,r),()=>{document.body.classList.remove(`is-resizing`),window.removeEventListener(`pointermove`,n),window.removeEventListener(`pointerup`,r)}},[a,e,t]);let l=e=>{let n=Fa(t,r+e);i(n),La(t,n)};return(0,H.jsx)(`div`,{"aria-label":n(`layout.resize.${t}`),"aria-orientation":`vertical`,"aria-valuemax":s,"aria-valuemin":c,"aria-valuenow":r,className:`panel-resizer`,onDoubleClick:()=>{let{defaultWidth:e}=Na[t];i(e),La(t,e)},onKeyDown:t=>{let n=e===`start`?`ArrowRight`:`ArrowLeft`,r=e===`start`?`ArrowLeft`:`ArrowRight`;(t.key===n||t.key===r)&&(t.preventDefault(),l(t.key===n?Ba:-16))},onPointerDown:e=>{e.preventDefault(),i(Ia(t)),o(!0)},role:`separator`,tabIndex:0})},Ha=`loomrail.csrf-token`,Ua=class extends Error{code;correlationId;recovery;status;constructor({code:e,correlationId:t,message:n,recovery:r,status:i}){super(n),this.name=`LocalApiError`,this.code=e,this.correlationId=t,this.recovery=r,this.status=i}},Wa=(e,t)=>[`BOOTSTRAP_REJECTED`,`CSRF_REJECTED`,`SESSION_REQUIRED`].includes(e)?`reopen`:t===0||t>=500?`retry`:`none`,Ga=async e=>{let t=await e.json().catch(()=>void 0),n=ot.safeParse(t);return n.success?new Ua({code:n.data.error.code,correlationId:n.data.error.correlationId,message:n.data.error.message,recovery:Wa(n.data.error.code,e.status),status:e.status}):new Ua({code:`LOCAL_API_ERROR`,message:`Local daemon returned HTTP ${e.status.toString()}`,recovery:Wa(`LOCAL_API_ERROR`,e.status),status:e.status})},Ka=e=>e instanceof Ua,qa=()=>new Ua({code:`LOCAL_DAEMON_UNAVAILABLE`,message:`The local Loomrail daemon could not be reached`,recovery:`retry`,status:0}),Ja=()=>window.sessionStorage.getItem(Ha)??void 0,Ya=e=>{window.sessionStorage.setItem(Ha,e)},Z=async(e,t,n={})=>{let r=(n.method??`GET`).toUpperCase(),i=new Headers(n.headers);if(i.set(`accept`,`application/json`),n.body!==void 0&&i.set(`content-type`,`application/json`),![`GET`,`HEAD`,`OPTIONS`].includes(r)){let e=Ja();if(!e)throw new Ua({code:`LOCAL_SESSION_REQUIRED`,message:`The local session must be reopened before changing data`,recovery:`reopen`,status:0});i.set(`x-loomrail-csrf`,e)}let a;try{a=await fetch(e,{...n,credentials:`same-origin`,headers:i})}catch{throw qa()}if(!a.ok)throw await Ga(a);return t.parse(await a.json())},Xa=async()=>Z(`/api/v1/projects`,Di),Za=async e=>Z(`/api/v1/projects/${encodeURIComponent(e)}/work-items`,Oi),Qa=async(e,t,n)=>Z(`/api/v1/events?${new URLSearchParams({aggregateId:t,limit:`30`,order:`DESC`,projectId:e,...n===void 0?{}:{before:n.toString()}}).toString()}`,ki),$a=async e=>Z(`/api/v1/work-items/${encodeURIComponent(e)}/workflow`,Hr),eo=async e=>Z(`/api/v1/work-items/${encodeURIComponent(e)}/workspace`,Et),to=async e=>Z(`/api/v1/work-items/${encodeURIComponent(e)}/changes`,Nt),no=async(e,t)=>Z(`/api/v1/work-items/${encodeURIComponent(e)}/changes/diff?path=${encodeURIComponent(t)}`,Pt),ro=async e=>Z(`/api/v1/stage-attempts/${encodeURIComponent(e)}/sessions`,Wr),io=async()=>Z(`/api/v1/provider/capabilities`,Gr),ao=async e=>Z(`/api/v1/human-requests?${new URLSearchParams({projectId:e,status:`OPEN`}).toString()}`,Ur),oo=async e=>{await Z(`/api/v1/projects/fixtures/register`,wi,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),fixtureId:e})})},so=async e=>{await Z(`/api/v1/projects/register`,wi,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),repositoryPath:e})})},co=async e=>{let t=await Z(`/api/v1/work-items`,wi,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),projectId:e.projectId,parentId:null,type:e.type,title:e.title,description:e.description,priority:e.priority,risk:e.risk,acceptanceCriteria:[]})});if(t.type!==`WORK_ITEM_CREATED`)throw Error(`The local daemon returned an unexpected create result`);return t.workItem},lo=async(e,t)=>{let n=await Z(`/api/v1/work-items/${encodeURIComponent(e.id)}/move`,wi,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),expectedVersion:e.version,targetState:t})});if(n.type!==`WORK_ITEM_MOVED`)throw Error(`The local daemon returned an unexpected move result`);return n.workItem},uo=async(e,t)=>{let n=await Z(`/api/v1/work-items/${encodeURIComponent(e.id)}`,wi,{method:`PATCH`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),expectedVersion:e.version,patch:t})});if(n.type!==`WORK_ITEM_UPDATED`)throw Error(`The local daemon returned an unexpected update result`);return n.workItem},fo=async e=>Z(`/api/v1/work-items/${encodeURIComponent(e.id)}/pipeline/start`,Hr,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),expectedVersion:e.version})}),po=async(e,t)=>Z(`/api/v1/human-requests/${encodeURIComponent(e.id)}/answer`,Hr,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),expectedVersion:e.version,answer:t})}),mo=async(e,t,n)=>Z(`/api/v1/work-items/${encodeURIComponent(e)}/pipeline/${n}`,Hr,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),expectedVersion:t.version})}),ho=async(e,t,n)=>Z(`/api/v1/work-items/${encodeURIComponent(e)}/pipeline/budget-override`,Hr,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),expectedVersion:t.version,maxEstimatedTokens:n})}),go=async(e,t,n,r,i=null)=>Z(`/api/v1/work-items/${encodeURIComponent(e)}/acceptance/${encodeURIComponent(n.id)}/resolve`,Hr,{method:`POST`,body:JSON.stringify({schemaVersion:1,commandId:crypto.randomUUID(),expectedVersion:n.version,expectedRunVersion:t.version,action:r,reason:i})}),_o=e=>e instanceof Error?e.message:`The local operation could not be completed`,vo=({error:e,onRetry:t,retrying:n=!1})=>{let{t:r}=X(),i=Ka(e)?e.recovery:`none`;if(i===`none`)return(0,H.jsx)(`p`,{className:`local-operation-error`,role:`alert`,children:_o(e)});let a=i===`reopen`;return(0,H.jsxs)(`section`,{className:`local-connection-recovery`,role:`alert`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`,className:`local-connection-recovery__icon`,children:(0,H.jsx)(U,{name:a?`terminal`:`warning`,size:16})}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`strong`,{children:r(a?`connection.recovery.reopenTitle`:`connection.recovery.retryTitle`)}),(0,H.jsx)(`p`,{children:r(a?`connection.recovery.reopenDescription`:`connection.recovery.retryDescription`)}),a?(0,H.jsxs)(`div`,{className:`local-connection-recovery__command`,children:[(0,H.jsx)(`span`,{children:r(`connection.recovery.command`)}),(0,H.jsx)(`code`,{children:`pnpm dev`})]}):null]}),!a&&t?(0,H.jsx)(G,{loading:n,onClick:t,size:`sm`,variant:`secondary`,children:r(`connection.recovery.retryAction`)}):null]})},yo=[`comfortable`,`compact`],bo=`loomrail-density`,xo=e=>e!==null&&yo.some(t=>t===e),So=()=>{let e=window.localStorage.getItem(bo);return xo(e)?e:`comfortable`},Co=e=>{if(e===`comfortable`){document.documentElement.removeAttribute(`data-density`),window.localStorage.removeItem(bo);return}document.documentElement.dataset.density=e,window.localStorage.setItem(bo,e)},wo=[`light`,`dark`,`system`],To=`loomrail-theme`,Eo=e=>e!==null&&wo.some(t=>t===e),Do=()=>{let e=window.localStorage.getItem(To);return Eo(e)?e:`system`},Oo=e=>{if(e===`system`){document.documentElement.removeAttribute(`data-theme`),window.localStorage.removeItem(To);return}document.documentElement.dataset.theme=e,window.localStorage.setItem(To,e)},ko=null,Ao=async e=>{let t;try{t=await fetch(`/api/session/exchange`,{method:`POST`,credentials:`same-origin`,headers:{"content-type":`application/json`},body:JSON.stringify({bootstrapToken:e})})}catch{throw qa()}if(!t.ok)throw await Ga(t);Ya(it.parse(await t.json()).csrfToken)},jo=async()=>Z(`/api/v1/status`,at),Mo=s({queryKey:[`local-daemon`,`connection`],queryFn:async()=>{try{let e=new URLSearchParams(window.location.hash.slice(1)).get(`bootstrap`);return e&&(ko=e,window.history.replaceState(null,``,`${window.location.pathname}${window.location.search}`)),ko&&=(await Ao(ko),null),{status:`connected`,daemon:await jo()}}catch(e){Ka(e)&&e.recovery===`reopen`&&(ko=null);let t=e instanceof Error?e:Error(`Could not connect to Loomrail`);return{status:`error`,error:t,message:t.message}}},staleTime:1/0}),No=1600,Po=(e,t=No)=>{let n,r=(()=>{n??=setTimeout(()=>{n=void 0,Promise.resolve().then(e).catch(()=>void 0)},t)});return r.dispose=()=>{n!==void 0&&clearTimeout(n),n=void 0},r},Fo={ADDED:`changes.status.ADDED`,MODIFIED:`changes.status.MODIFIED`,DELETED:`changes.status.DELETED`,RENAMED:`changes.status.RENAMED`},Io={ADDED:`success`,MODIFIED:`info`,DELETED:`danger`,RENAMED:`accent`},Lo={WORKSPACE_WORKTREE_MISSING:`changes.error.WORKSPACE_WORKTREE_MISSING`,WORKSPACE_WORKTREE_UNREADABLE:`changes.error.WORKSPACE_WORKTREE_UNREADABLE`,WORKSPACE_HAS_NO_BASELINE:`changes.error.WORKSPACE_HAS_NO_BASELINE`,CHANGES_UNREADABLE:`changes.error.CHANGES_UNREADABLE`,GIT_UNAVAILABLE:`changes.error.GIT_UNAVAILABLE`,PATH_OUTSIDE_WORKSPACE:`changes.error.PATH_OUTSIDE_WORKSPACE`,PATH_NOT_A_FILE:`changes.error.PATH_NOT_A_FILE`,PATH_UNRESOLVABLE:`changes.error.PATH_UNRESOLVABLE`},Ro=e=>(Ka(e)?Lo[e.code]:void 0)??`changes.error.other`,zo=e=>{switch(e.aggregateType){case`WORK_ITEM`:return[[`projects`,e.projectId],[`work-items`,e.aggregateId],[`stage-attempts`]];case`PROJECT`:return[[`projects`,e.projectId],[`projects`]];default:{let t=e.aggregateType;throw Error(`Unhandled event signal aggregate type: ${String(t)}`)}}},Bo=(e,t=50)=>{let n=new Map,r,i=()=>{r=void 0;let t=[...n.values()];n.clear(),t.length>0&&e(t)};return{push:e=>{for(let t of zo(e))n.set(t.join(`/`),t);r??=setTimeout(i,t)},dispose:()=>{r!==void 0&&clearTimeout(r),r=void 0,n.clear()}}},Vo=2,Ho=[`local-daemon`,`connection`],Uo=e=>e===`closed`?[Ho]:[],Wo=e=>{let t=Bo(e.invalidateScopes,e.windowMs),n=t=>{let n=Uo(t);n.length>0&&e.invalidateScopes(n)};return e.source.onopen=()=>{n(`live`),e.invalidateAll()},e.source.onmessage=e=>{let n;try{n=JSON.parse(e.data)}catch{return}let r=rt.safeParse(n);r.success&&t.push(r.data)},e.source.onerror=()=>{n(e.source.readyState===Vo?`closed`:`connecting`)},()=>{t.dispose(),e.source.close()}},Go=(e,t)=>t.every((t,n)=>e[n]===t),Ko=(e,t)=>e[0]===`work-items`&&e[1]===t&&e[2]===`changes`,qo=(e,t)=>{if(!Go(e,t))return!1;let n=t.length===2&&t[0]===`work-items`?t[1]:void 0;return n===void 0||!Ko(e,n)},Jo=(e,t=No)=>{let n=new Map,r=()=>{for(let e of n.values())e.dispose();n.clear()},i=r=>{let i=n.get(r);i||(i=Po(async()=>{n.delete(r),await e.invalidateQueries({queryKey:[`work-items`,r,`changes`],refetchType:`active`})},t),n.set(r,i)),i()};return{invalidateAll:()=>{r(),e.invalidateQueries()},invalidateScopes:t=>{for(let n of t){let t=n.length===2&&n[0]===`work-items`?n[1]:void 0;if(t!==void 0){e.invalidateQueries({predicate:e=>qo(e.queryKey,n)}),i(t);continue}e.invalidateQueries({queryKey:n})}},dispose:r}},Yo=e=>{let t=l();(0,A.useEffect)(()=>{if(!e)return;let n=new EventSource(`/api/v1/stream`),r=Jo(t),i=Wo({source:n,invalidateAll:r.invalidateAll,invalidateScopes:r.invalidateScopes});return()=>{i(),r.dispose()}},[e,t])},Xo=[`projects`],Q=e=>[`projects`,e,`work-items`],Zo=(e,t)=>[`projects`,e,`work-items`,t,`events`],Qo=e=>[`work-items`,e,`workflow`],$o=e=>[`work-items`,e,`workspace`],es=e=>[`work-items`,e,`changes`],ts=(e,t)=>[`work-items`,e,`changes`,`diff`,t],ns=e=>[`projects`,e,`human-requests`,`OPEN`],rs=e=>[`stage-attempts`,e,`sessions`],is=[`provider`,`capabilities`],as=(0,A.createContext)(null),os=({children:e})=>{let t=h(Mo),n=t.data?.status===`connected`,r=h({queryKey:Xo,queryFn:Xa,enabled:n}),[i,a]=(0,A.useState)(null),o=r.data?.projects??[],s=o.find(e=>e.id===i)??o.at(0)??null;Yo(n);let c=(0,A.useMemo)(()=>({connection:t.data,connectionPending:t.isPending,error:t.data?.status===`error`?t.data.error:t.error instanceof Error?t.error:r.error instanceof Error?r.error:null,projects:o,projectsPending:n&&r.isPending,retryConnection:()=>{t.refetch().then(e=>{e.data?.status===`connected`&&r.refetch()})},selectedProject:s,selectProject:a}),[n,t.data,t.error,t.isPending,t.refetch,o,r.error,r.isPending,r.refetch,s]);return(0,H.jsx)(as.Provider,{value:c,children:e})},ss=()=>{let e=(0,A.useContext)(as);if(!e)throw Error(`useWorkspace must be rendered inside WorkspaceProvider`);return e},cs=e=>h({queryKey:e?Q(e):[`projects`,`none`,`work-items`],queryFn:()=>{if(!e)throw Error(`A project is required to list work items`);return Za(e)},enabled:e!==void 0}),ls=(e,t)=>v({queryKey:e&&t?Zo(e,t):[`projects`,`none`,`work-items`,`none`,`events`],queryFn:({pageParam:n})=>{if(!e||!t)throw Error(`A project and work item are required to list activity`);return Qa(e,t,n)},initialPageParam:void 0,getNextPageParam:e=>e.hasMore?e.nextSequence:void 0,enabled:e!==void 0&&t!==void 0}),us=e=>h({queryKey:e?Qo(e):[`work-items`,`none`,`workflow`],queryFn:()=>{if(!e)throw Error(`A work item is required to load its workflow`);return $a(e)},enabled:e!==void 0}),ds=e=>h({queryKey:e?$o(e):[`work-items`,`none`,`workspace`],queryFn:()=>{if(!e)throw Error(`A work item is required to load its workspace`);return eo(e)},enabled:e!==void 0}),fs=e=>h({queryKey:es(e),queryFn:()=>to(e)}),ps=(e,t)=>h({queryKey:ts(e,t),queryFn:()=>no(e,t)}),ms=e=>h({queryKey:e?rs(e):[`stage-attempts`,`none`,`sessions`],queryFn:()=>{if(!e)throw Error(`A stage attempt is required to list its sessions`);return ro(e)},enabled:e!==void 0}),hs=()=>h({queryKey:is,queryFn:io}),gs=e=>h({queryKey:e?ns(e):[`projects`,`none`,`human-requests`,`OPEN`],queryFn:()=>{if(!e)throw Error(`A project is required to list HumanRequests`);return ao(e)},enabled:e!==void 0}),_s=()=>{let e=l(),{projects:t}=ss();return o({mutationFn:async()=>{let e=new Set(t.filter(({repositoryStatus:e})=>e===`READY`).map(({fixtureId:e})=>e));e.has(`web-app-a`)||await oo(`web-app-a`),e.has(`api-service-b`)||await oo(`api-service-b`)},onSuccess:async()=>{await e.invalidateQueries({queryKey:Xo})}})},vs=()=>{let e=l();return o({mutationFn:e=>oo(e),onSuccess:async()=>{await e.invalidateQueries({queryKey:Xo})}})},ys=()=>{let e=l();return o({mutationFn:e=>so(e),onSuccess:async()=>{await e.invalidateQueries({queryKey:Xo})}})},bs=()=>{let e=l();return o({mutationFn:e=>co(e),onSuccess:async t=>{await e.invalidateQueries({queryKey:Q(t.projectId)})}})},xs=()=>{let e=l();return o({mutationFn:({targetState:e,workItem:t})=>lo(t,e),onSuccess:async t=>{await Promise.all([e.invalidateQueries({queryKey:Q(t.projectId)}),e.invalidateQueries({queryKey:Zo(t.projectId,t.id)})])}})},Ss=()=>{let e=l();return o({mutationFn:({patch:e,workItem:t})=>uo(t,e),onSuccess:async t=>{await Promise.all([e.invalidateQueries({queryKey:Q(t.projectId)}),e.invalidateQueries({queryKey:Zo(t.projectId,t.id)})])}})},Cs=()=>{let e=l();return o({mutationFn:e=>fo(e),onSuccess:async(t,n)=>{await Promise.all([e.invalidateQueries({queryKey:Q(n.projectId)}),e.invalidateQueries({queryKey:Qo(n.id)}),e.invalidateQueries({queryKey:Zo(n.projectId,n.id)}),e.invalidateQueries({queryKey:ns(n.projectId)})])}})},ws=()=>{let e=l();return o({mutationFn:({answer:e,request:t})=>po(t,e),onSuccess:async(t,{request:n})=>{await Promise.all([e.invalidateQueries({queryKey:Q(n.projectId)}),e.invalidateQueries({queryKey:Qo(n.workItemId)}),e.invalidateQueries({queryKey:Zo(n.projectId,n.workItemId)}),e.invalidateQueries({queryKey:ns(n.projectId)}),e.invalidateQueries({queryKey:rs(n.stageAttemptId)})])}})},Ts=()=>{let e=l();return o({mutationFn:({action:e,run:t,workItem:n})=>mo(n.id,t,e),onSuccess:async(t,{run:n,workItem:r})=>{await Promise.all([e.invalidateQueries({queryKey:Q(r.projectId)}),e.invalidateQueries({queryKey:Qo(r.id)}),e.invalidateQueries({queryKey:Zo(r.projectId,r.id)}),e.invalidateQueries({queryKey:ns(r.projectId)}),e.invalidateQueries({queryKey:rs(n.currentStageAttemptId)})])}})},Es=()=>{let e=l();return o({mutationFn:({maxEstimatedTokens:e,run:t,workItem:n})=>ho(n.id,t,e),onSuccess:async(t,{run:n,workItem:r})=>{await Promise.all([e.invalidateQueries({queryKey:Q(r.projectId)}),e.invalidateQueries({queryKey:Qo(r.id)}),e.invalidateQueries({queryKey:Zo(r.projectId,r.id)}),e.invalidateQueries({queryKey:ns(r.projectId)}),e.invalidateQueries({queryKey:rs(n.currentStageAttemptId)})])}})},Ds=()=>{let e=l();return o({mutationFn:({acceptancePackage:e,action:t,run:n,workItem:r})=>go(r.id,n,e,t),onSuccess:async(t,{workItem:n})=>{await Promise.all([e.invalidateQueries({queryKey:Q(n.projectId)}),e.invalidateQueries({queryKey:Qo(n.id)}),e.invalidateQueries({queryKey:Zo(n.projectId,n.id)}),e.invalidateQueries({queryKey:ns(n.projectId)})])}})},Os=()=>{let{t:e}=X(),[t,n]=(0,A.useState)(!1),r=(0,A.useRef)(null),{projects:i,selectedProject:a}=ss(),o=bs(),[s,c]=(0,A.useState)(null),[l,u]=(0,A.useState)(`MEDIUM`),[d,f]=(0,A.useState)(``),p=i.find(e=>e.id===s)?.id??a?.id??``;return(0,H.jsx)(Zi,{closeLabel:e(`action.closeDialog`),description:e(`task.create.description`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(G,{disabled:o.isPending,onClick:()=>{n(!1)},children:e(`action.cancel`)}),(0,H.jsx)(G,{disabled:!d.trim()||!p,loading:o.isPending,onClick:()=>{r.current?.requestSubmit()},type:`button`,variant:`primary`,children:e(`task.create.submit`)})]}),onOpenChange:n,open:t,title:e(`task.new`),trigger:(0,H.jsx)(G,{disabled:!a,icon:`add`,variant:`primary`,children:e(`task.new`)}),children:(0,H.jsxs)(`form`,{className:`new-task-form`,id:`new-task-form`,onSubmit:e=>{e.preventDefault();let t=e.currentTarget,r=new FormData(t),i=r.get(`title`),a=r.get(`description`),s=typeof i==`string`?i.trim():``,c=typeof a==`string`?a.trim():``;!s||!p||o.mutate({description:c,priority:l,projectId:p,risk:`MEDIUM`,title:s,type:`TASK`},{onSuccess:()=>{t.reset(),f(``),n(!1)}})},ref:r,children:[o.error?(0,H.jsx)(vo,{error:o.error,onRetry:()=>{r.current?.requestSubmit()},retrying:o.isPending}):null,(0,H.jsx)(J,{htmlFor:`new-task-title`,label:e(`task.create.title`),required:!0,children:(0,H.jsx)(Li,{autoFocus:!0,id:`new-task-title`,name:`title`,onChange:e=>{f(e.currentTarget.value)},placeholder:e(`task.create.titlePlaceholder`),required:!0,value:d})}),(0,H.jsx)(J,{description:e(`task.create.briefDescription`),htmlFor:`new-task-brief`,label:e(`task.create.brief`),children:(0,H.jsx)(Ri,{"aria-describedby":`new-task-brief-description`,id:`new-task-brief`,name:`description`,placeholder:e(`task.create.briefPlaceholder`),rows:5})}),(0,H.jsxs)(`div`,{className:`new-task-form__row`,children:[(0,H.jsx)(J,{htmlFor:`new-task-project`,label:e(`task.create.project`),children:(0,H.jsx)(Hi,{ariaLabel:e(`task.create.project`),id:`new-task-project`,onValueChange:c,options:i.map(e=>({label:e.name,value:e.id})),value:p})}),(0,H.jsx)(J,{htmlFor:`new-task-priority`,label:e(`task.create.priority`),children:(0,H.jsx)(Hi,{ariaLabel:e(`task.create.priority`),id:`new-task-priority`,onValueChange:e=>{u(Xr.parse(e))},options:[{label:e(`priority.LOW`),value:`LOW`},{label:e(`priority.MEDIUM`),value:`MEDIUM`},{label:e(`priority.HIGH`),value:`HIGH`},{label:e(`priority.URGENT`),value:`URGENT`}],value:l})})]})]})})},ks=({description:e,label:t,onChange:n,options:r,value:i})=>{let a=(0,A.useId)();return(0,H.jsxs)(`div`,{className:`setting`,children:[(0,H.jsx)(`span`,{className:`setting__label`,id:a,children:t}),(0,H.jsx)(`div`,{"aria-labelledby":a,className:`setting__choices`,role:`group`,children:r.map(e=>(0,H.jsxs)(`button`,{"aria-pressed":i===e.value,onClick:()=>{n(e.value)},type:`button`,children:[e.icon?(0,H.jsx)(U,{name:e.icon,size:15}):null,(0,H.jsx)(`span`,{children:e.label})]},e.value))}),e?(0,H.jsx)(`small`,{className:`setting__hint`,children:e}):null]})},As=({project:e})=>{let{t}=X(),n=vs(),r=e.fixtureId,i=n.error instanceof Error?n.error.message:null;return(0,H.jsxs)(`div`,{className:`settings__project-repair`,children:[(0,H.jsx)(`p`,{className:`settings__note`,role:`note`,children:t(`settings.projects.unusable`)}),r===null?null:(0,H.jsx)(G,{loading:n.isPending,onClick:()=>{n.mutate(r)},children:t(`settings.projects.repair`)}),i===null?null:(0,H.jsx)(`p`,{className:`settings__project-error`,role:`alert`,children:i})]})},js=()=>{let{t:e}=X(),t=(0,A.useId)(),[n,r]=(0,A.useState)(``),i=ys(),a=i.error instanceof Error?i.error.message:null,o=n.trim();return(0,H.jsxs)(`form`,{className:`settings__register`,onSubmit:e=>{e.preventDefault(),o!==``&&i.mutate(o,{onSuccess:()=>{r(``)}})},children:[(0,H.jsx)(J,{description:e(`settings.projects.register.description`),htmlFor:t,label:e(`settings.projects.register.label`),...a===null?{}:{error:a},children:(0,H.jsx)(Li,{autoComplete:`off`,id:t,invalid:a!==null,onChange:e=>{r(e.target.value)},placeholder:e(`settings.projects.register.placeholder`),size:`md`,spellCheck:!1,value:n})}),(0,H.jsx)(G,{disabled:o===``,loading:i.isPending,type:`submit`,children:e(`settings.projects.register.action`)})]})},Ms=({onOpenChange:e,open:t})=>{let{locale:n,setLocale:r,t:i}=X(),{projects:a,selectedProject:o,selectProject:s}=ss(),[c,l]=(0,A.useState)(Do),[u,d]=(0,A.useState)(So),[f,p]=(0,A.useState)(za);return(0,A.useEffect)(()=>{t&&p(za())},[t]),(0,H.jsx)(Zi,{closeLabel:i(`action.closeDialog`),description:i(`settings.description`),onOpenChange:e,open:t,title:i(`settings.title`),children:(0,H.jsxs)(`div`,{className:`settings`,children:[(0,H.jsxs)(`section`,{className:`settings__section`,children:[(0,H.jsx)(`h3`,{children:i(`settings.appearance`)}),(0,H.jsx)(ks,{label:i(`theme.change`),onChange:e=>{l(e),Oo(e)},options:[{icon:`monitor`,label:i(`theme.system`),value:`system`},{icon:`sun`,label:i(`theme.light`),value:`light`},{icon:`moon`,label:i(`theme.dark`),value:`dark`}],value:c}),(0,H.jsx)(ks,{description:i(`settings.density.description`),label:i(`settings.density`),onChange:e=>{d(e),Co(e)},options:[{icon:`list`,label:i(`settings.density.comfortable`),value:`comfortable`},{icon:`layers`,label:i(`settings.density.compact`),value:`compact`}],value:u}),(0,H.jsx)(ks,{label:i(`language.change`),onChange:r,options:[{label:i(`language.english`),value:`en`},{label:i(`language.russian`),value:`ru`}],value:n})]}),(0,H.jsxs)(`section`,{className:`settings__section`,children:[(0,H.jsx)(`h3`,{children:i(`settings.layout`)}),(0,H.jsx)(`p`,{className:`settings__note`,children:i(`settings.layout.description`)}),(0,H.jsx)(G,{disabled:!f,onClick:()=>{Ra(),p(!1)},children:i(`settings.layout.reset`)})]}),(0,H.jsxs)(`section`,{className:`settings__section`,children:[(0,H.jsx)(`h3`,{children:i(`settings.projects`)}),a.length>0?(0,H.jsx)(`ul`,{className:`settings__projects`,children:a.map(e=>(0,H.jsxs)(`li`,{children:[(0,H.jsxs)(`button`,{"aria-pressed":e.id===o?.id,onClick:()=>{s(e.id)},type:`button`,children:[(0,H.jsx)(`span`,{children:e.name.slice(0,1).toUpperCase()}),(0,H.jsxs)(`span`,{className:`settings__project-copy`,children:[(0,H.jsx)(`strong`,{children:e.name}),(0,H.jsxs)(`small`,{className:`settings__project-path`,title:e.repositoryPath,children:[i(`settings.projects.repositoryLabel`),`: `,e.repositoryPath]})]}),e.id===o?.id?(0,H.jsx)(U,{name:`check`,size:14}):null]}),e.repositoryStatus===`UNUSABLE`?(0,H.jsx)(As,{project:e}):null]},e.id))}):(0,H.jsx)(`p`,{className:`settings__note`,children:i(`project.none`)}),(0,H.jsx)(js,{})]})]})})},Ns=({active:e,count:t,icon:n,label:r,search:i})=>(0,H.jsxs)(_,{className:W(`app-nav-link`,e&&`is-active`),search:i,to:`/`,children:[(0,H.jsx)(U,{name:n,size:15}),(0,H.jsx)(`span`,{children:r}),t!==void 0&&t>0?(0,H.jsx)(`em`,{className:`app-nav-link__count`,children:t}):null]}),Ps=e=>{let[t,n]=(0,A.useState)(null),[r,i]=(0,A.useState)(!1);return(0,A.useEffect)(()=>{if(t===null)return;let e=()=>{i(t.scrollWidth>t.clientWidth||t.clientWidth===0)};e();let n=new ResizeObserver(e);return n.observe(t),()=>{n.disconnect()}},[e,t]),{clipped:r,ref:n}},Fs=({onNavigate:e,onOpenSettings:t})=>{let{t:n}=X(),{connection:r,projects:i,selectedProject:a,selectProject:o}=ss(),s=gs(a?.id),c=ee({select:e=>e.search}),l=r?.status===`connected`,u=a?.name.slice(0,1).toUpperCase()??`–`,d=a?.name??``,{clipped:f,ref:p}=Ps(d),m=s.data?.humanRequests.filter(({blocking:e})=>e).length??0,h=c.summary===`needsYou`;return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsxs)(`div`,{className:`app-sidebar__workspace`,children:[(0,H.jsx)(Ca,{className:`app-brand-mark`,size:22}),(0,H.jsx)(`strong`,{children:`Loomrail`})]}),(0,H.jsxs)(`div`,{className:`app-nav-group`,children:[(0,H.jsx)(`span`,{children:n(`nav.yourProjects`)}),i.length>0?(0,H.jsx)(Yi,{groups:[i.map(t=>({label:t.name,onSelect:()=>{o(t.id),e?.()},shortcut:t.id===a?.id?`✓`:``}))],trigger:(0,H.jsxs)(`button`,{"aria-label":n(`project.switch`),className:`app-project-label`,type:`button`,children:[(0,H.jsx)(`span`,{children:u}),(0,H.jsx)(`strong`,{ref:p,children:d}),(0,H.jsx)(U,{name:`chevronDown`,size:12})]}),...f?{triggerTooltip:d}:{}}):(0,H.jsxs)(`div`,{className:`app-project-label is-empty`,children:[(0,H.jsx)(`span`,{children:`–`}),(0,H.jsx)(`strong`,{children:n(`project.none`)})]}),(0,H.jsxs)(`nav`,{"aria-label":n(`nav.workspace`),className:`app-nav app-nav--nested`,onClick:e,children:[(0,H.jsx)(Ns,{active:!h,icon:`board`,label:n(`nav.currentWork`),search:{}}),(0,H.jsx)(Ns,{active:h,count:m,icon:`question`,label:n(`nav.humanRequests`),search:{summary:`needsYou`}})]})]}),(0,H.jsxs)(`div`,{className:`app-sidebar__footer`,children:[(0,H.jsxs)(`span`,{className:l?`app-connection is-online`:`app-connection is-offline`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`}),n(l?`connection.local`:`connection.offline`)]}),(0,H.jsx)(Y,{label:n(`settings.open`),children:(0,H.jsx)(K,{label:n(`settings.open`),name:`settings`,onClick:()=>{t()}})})]})]})},Is=()=>{let{t:e}=X(),{connectionPending:t,projectsPending:n,selectedProject:r}=ss(),[i,a]=(0,A.useState)(!1),[o,s]=(0,A.useState)(!1),c=r?.name.slice(0,1).toUpperCase()??`–`;return t||n?(0,H.jsxs)(`div`,{"aria-busy":`true`,className:`app-shell app-shell--loading`,children:[(0,H.jsx)(`aside`,{"aria-hidden":`true`,className:`app-sidebar app-sidebar--loading`}),(0,H.jsx)(`section`,{className:`app-surface app-surface--loading`,children:(0,H.jsx)(`span`,{"aria-label":e(`connection.connecting`),className:`app-loading-mark`,role:`status`,children:(0,H.jsx)(Ca,{className:`app-brand-mark`,size:40})})})]}):(0,H.jsxs)(`div`,{className:`app-shell`,children:[(0,H.jsxs)(`aside`,{className:`app-sidebar`,children:[(0,H.jsx)(Fs,{onOpenSettings:()=>{s(!0)}}),(0,H.jsx)(Va,{edge:`start`,panel:`sidebar`})]}),(0,H.jsxs)(`section`,{className:`app-surface`,children:[(0,H.jsxs)(`header`,{className:`app-topbar`,children:[(0,H.jsxs)(`div`,{className:`app-breadcrumbs`,children:[(0,H.jsx)(Zi,{className:`app-navigation-drawer`,closeLabel:e(`action.closeDialog`),onOpenChange:a,open:i,title:e(`nav.workspace`),trigger:(0,H.jsx)(K,{className:`app-navigation-trigger`,label:e(`nav.open`),name:`menu`,size:`sm`}),children:(0,H.jsx)(Fs,{onNavigate:()=>{a(!1)},onOpenSettings:()=>{a(!1),s(!0)}})}),(0,H.jsx)(`span`,{className:`app-project-icon`,children:c}),(0,H.jsx)(`span`,{className:`app-breadcrumbs__project`,children:r?.name??e(`project.noneSingle`)}),(0,H.jsx)(U,{name:`chevronRight`,size:12}),(0,H.jsx)(`strong`,{children:e(`work.current`)})]}),(0,H.jsx)(`div`,{className:`app-topbar__actions`,children:(0,H.jsx)(Os,{})})]}),(0,H.jsx)(`main`,{className:`app-content`,id:`main-content`,children:(0,H.jsx)(u,{})})]}),(0,H.jsx)(Ms,{onOpenChange:s,open:o})]})},Ls=({file:e,t})=>(0,H.jsxs)(`span`,{className:`changes-row`,children:[(0,H.jsxs)(`span`,{className:`changes-row__head`,children:[(0,H.jsx)(ji,{tone:Io[e.status],children:t(Fo[e.status])}),(0,H.jsx)(`code`,{className:`changes-row__path`,children:e.path})]}),(0,H.jsxs)(`span`,{className:`changes-row__meta`,children:[e.previousPath===null?null:(0,H.jsx)(`span`,{className:`changes-row__previous`,children:t(`changes.renamedFrom`,{path:e.previousPath})}),e.binary?(0,H.jsx)(ji,{tone:`neutral`,children:t(`changes.binary`)}):null,e.insertions===null||e.deletions===null?null:(0,H.jsxs)(`span`,{"aria-label":t(`changes.lineCounts`,{insertions:e.insertions,deletions:e.deletions}),className:`changes-row__counts`,children:[(0,H.jsxs)(`span`,{className:`changes-row__insertions`,children:[`+`,e.insertions]}),(0,H.jsxs)(`span`,{className:`changes-row__deletions`,children:[`−`,e.deletions]})]})]})]}),Rs=({path:e,workItemId:t})=>{let{locale:n,t:r}=X(),i=ps(t,e);if(i.error)return(0,H.jsx)(`p`,{className:`changes-diff__note`,role:`status`,children:r(Ro(i.error))});if(i.isPending)return(0,H.jsx)(`p`,{className:`changes-diff__note`,role:`status`,children:r(`changes.diffPending`)});let a=i.data.diff;return a===null?(0,H.jsx)(`p`,{className:`changes-diff__note`,role:`status`,children:r(`changes.diffUnavailable`)}):a.binary||a.patch===null?(0,H.jsx)(`p`,{className:`changes-diff__note`,children:r(`changes.binaryNoPatch`)}):(0,H.jsxs)(`div`,{className:`changes-diff`,children:[(0,H.jsx)(`pre`,{className:`changes-diff__patch`,children:(0,H.jsx)(`code`,{children:a.patch})}),a.truncated?(0,H.jsx)(`p`,{className:`changes-diff__note`,children:r(`changes.patchTruncated`,{bytes:a.omittedBytes.toLocaleString(n)})}):null]})},zs=({workItemId:e})=>{let{t}=X(),[n,r]=(0,A.useState)(null),i=fs(e);if(i.error)return(0,H.jsx)(ba,{title:t(`changes.title`),children:(0,H.jsx)(`p`,{className:`changes__refusal`,role:`status`,children:t(Ro(i.error))})});let a=i.data?.changes??null;return a===null?null:(0,H.jsx)(ba,{title:t(`changes.title`),children:a.files.length===0?(0,H.jsx)(`p`,{className:`inspector-copy`,children:t(`changes.empty`)}):(0,H.jsxs)(`div`,{className:`changes`,children:[a.truncated?(0,H.jsx)(`p`,{className:`changes__note`,children:t(`changes.truncated`,{count:a.files.length})}):null,(0,H.jsx)(`ul`,{className:`changes-list`,children:a.files.map(i=>{let a=n===i.path;return(0,H.jsxs)(`li`,{className:`changes-list__item`,children:[i.binary?(0,H.jsx)(`div`,{className:`changes-list__row`,children:(0,H.jsx)(Ls,{file:i,t})}):(0,H.jsxs)(`button`,{"aria-expanded":a,className:`changes-list__row changes-list__toggle`,onClick:()=>{r(a?null:i.path)},type:`button`,children:[(0,H.jsx)(U,{"aria-hidden":`true`,className:`changes-list__chevron`,name:a?`chevronDown`:`chevronRight`,size:12}),(0,H.jsx)(Ls,{file:i,t})]}),a?(0,H.jsx)(Rs,{path:i.path,workItemId:e}):null]},i.path)})})]})})},Bs={BACKLOG:[`READY`,`CANCELLED`],READY:[`BACKLOG`,`IN_PROGRESS`,`BLOCKED`,`CANCELLED`],IN_PROGRESS:[`READY`,`BLOCKED`,`CANCELLED`],BLOCKED:[`READY`,`IN_PROGRESS`,`CANCELLED`],DONE:[],CANCELLED:[]},Vs={BACKLOG:{primary:`READY`,secondary:null},READY:{primary:`IN_PROGRESS`,secondary:`BACKLOG`},IN_PROGRESS:{primary:null,secondary:`BLOCKED`},BLOCKED:{primary:`IN_PROGRESS`,secondary:`READY`},DONE:{primary:null,secondary:null},CANCELLED:{primary:null,secondary:null}},Hs=(e,t)=>t!==null&&Bs[e].includes(t)?t:null,Us=(e,t)=>{if(t)return{primary:null,secondary:null};let{primary:n,secondary:r}=Vs[e];return{primary:Hs(e,n),secondary:Hs(e,r)}},Ws=e=>[{label:e(`property.priority`),value:`priority`},{label:e(`view.created`),value:`created`},{label:e(`view.updated`),value:`updated`},{label:e(`view.title`),value:`title`}],Gs=({onViewChange:e,view:t})=>{let{t:n}=X(),r=t.direction===`asc`?`desc`:`asc`;return(0,H.jsxs)(`div`,{className:`view-settings`,children:[(0,H.jsx)(`div`,{className:`view-settings__controls`,children:(0,H.jsxs)(`div`,{className:`view-settings__row`,children:[(0,H.jsx)(`span`,{children:n(`view.ordering`)}),(0,H.jsxs)(`div`,{className:`view-settings__ordering`,children:[(0,H.jsx)(Y,{label:n(`view.direction.${r}`),children:(0,H.jsx)(K,{className:W(`view-settings__direction`,t.direction===`desc`&&`is-descending`),label:n(`view.direction.${r}`),name:`sortAscending`,onClick:()=>{e({...t,direction:r})},size:`sm`})}),(0,H.jsx)(Hi,{ariaLabel:n(`view.orderBy`),onValueChange:n=>{qe(n)&&e({...t,ordering:n})},options:Ws(n),size:`sm`,value:t.ordering,variant:`compact`})]})]})}),(0,H.jsxs)(`div`,{className:`view-settings__section`,children:[(0,H.jsx)(`span`,{className:`view-settings__section-title`,children:n(`view.boardOptions`)}),(0,H.jsx)(Bi,{checked:t.showEmptyColumns,label:n(`view.showEmptyColumns`),onCheckedChange:n=>{e({...t,showEmptyColumns:n})}})]})]})},Ks=({filters:e,onClearFilters:t,onFiltersChange:n,onScopeChange:r,onSummaryFilterChange:i,onViewChange:a,options:o,scope:s,summaryFilter:c,view:l})=>{let{t:u}=X(),d=e.length>0||c!==null,f=c?u(`work.summary.${c}`):null,p={add:u(`filter.add`),addFilterPlaceholder:u(`filter.addPlaceholder`),backTo:u(`filter.backTo`),clear:u(`filter.clear`),close:u(`filter.close`),description:u(`filter.description`),edit:u(`filter.edit`),filterPlaceholder:u(`filter.placeholder`),is:u(`filter.is`),isAnyOf:u(`filter.isAnyOf`),noMatchingProperties:u(`filter.noProperties`),noMatchingValues:u(`filter.noValues`),oneValue:u(`filter.oneValue`),options:u(`filter.options`),remove:u(`filter.remove`),rootTitle:u(`filter.rootTitle`),search:u(`filter.search`),selectedValues:u(`filter.selectedValues`)};return(0,H.jsxs)(`div`,{className:`board-toolbar-stack`,children:[(0,H.jsxs)(`div`,{className:`board-toolbar`,children:[(0,H.jsx)(`div`,{className:`board-view-tabs`,children:[{labelKey:`view.active`,value:`active`},{labelKey:`view.backlog`,value:`backlog`},{labelKey:`view.allIssues`,value:`all`}].map(({labelKey:e,value:t})=>(0,H.jsx)(G,{"aria-pressed":s===t,onClick:()=>{r(t)},shape:`pill`,variant:`surface`,children:u(e)},t))}),(0,H.jsxs)(`div`,{className:`board-toolbar__actions`,children:[(0,H.jsx)(ma,{ariaLabel:u(`view.filter`),messages:p,onValueChange:n,options:o,trigger:(0,H.jsx)(K,{label:u(`view.filter`),name:`filter`,variant:`surface`}),triggerTooltip:u(`view.filter`),value:e}),(0,H.jsx)(Xi,{className:`view-settings-popover`,label:u(`view.display`),trigger:(0,H.jsx)(K,{label:u(`view.display`),name:`settings`,variant:`surface`}),triggerTooltip:u(`view.display`),children:(0,H.jsx)(Gs,{onViewChange:a,view:l})}),(0,H.jsx)(Yi,{align:`end`,groups:[[{icon:`link`,label:u(`view.copyLink`),onSelect:()=>{navigator.clipboard.writeText(window.location.href)}}]],trigger:(0,H.jsx)(K,{label:u(`view.actions`),name:`more`,variant:`surface`}),triggerTooltip:u(`view.actions`)})]})]}),d?(0,H.jsx)(ga,{addFilter:(0,H.jsx)(ma,{ariaLabel:u(`view.filter`),messages:p,onValueChange:n,options:o,trigger:(0,H.jsx)(K,{className:`board-add-filter`,label:u(`view.filter`),name:`add`,size:`sm`}),triggerTooltip:u(`view.filter`),value:e}),ariaLabel:u(`view.filter`),className:`board-applied-filters`,messages:p,onClear:t,onValueChange:n,options:o,supplementalConditions:c&&f?(0,H.jsxs)(`div`,{className:`lr-applied-filter board-summary-filter`,children:[(0,H.jsxs)(`span`,{className:`lr-applied-filter__property`,children:[(0,H.jsx)(U,{name:`filter`,size:12}),u(`work.summary.filter`)]}),(0,H.jsx)(`span`,{className:`lr-applied-filter__value`,children:f}),(0,H.jsx)(Y,{label:u(`work.summary.clear`),children:(0,H.jsx)(`button`,{"aria-label":u(`work.summary.clear`),className:`lr-applied-filter__remove`,onClick:()=>{i(null)},type:`button`,children:(0,H.jsx)(U,{name:`close`,size:12})})})]}):null,value:e}):null]})},qs=[{labelKey:`state.BACKLOG`,state:`BACKLOG`,tone:`queued`},{labelKey:`state.READY`,state:`READY`,tone:`ready`},{labelKey:`state.IN_PROGRESS`,state:`IN_PROGRESS`,tone:`running`},{labelKey:`state.BLOCKED`,state:`BLOCKED`,tone:`waiting`},{labelKey:`state.DONE`,state:`DONE`,tone:`complete`},{labelKey:`state.CANCELLED`,state:`CANCELLED`,tone:`paused`}],Js=e=>qs.filter(t=>et(e,t.state)),Ys={BACKLOG:`state.BACKLOG`,READY:`state.READY`,IN_PROGRESS:`state.IN_PROGRESS`,BLOCKED:`state.BLOCKED`,DONE:`state.DONE`,CANCELLED:`state.CANCELLED`},$=(e,t)=>t(Ys[e]),Xs={LOW:`priority.LOW`,MEDIUM:`priority.MEDIUM`,HIGH:`priority.HIGH`,URGENT:`priority.URGENT`},Zs={LOW:`risk.LOW`,MEDIUM:`risk.MEDIUM`,HIGH:`risk.HIGH`,CRITICAL:`risk.CRITICAL`},Qs={EPIC:`type.EPIC`,FEATURE:`type.FEATURE`,TASK:`type.TASK`,BUG:`type.BUG`,SPIKE:`type.SPIKE`,SUBTASK:`type.SUBTASK`},$s={DISCOVERY:`stage.DISCOVERY`,PLAN:`stage.PLAN`,IMPLEMENT:`stage.IMPLEMENT`,REVIEW:`stage.REVIEW`,QA:`stage.QA`,ACCEPTANCE:`stage.ACCEPTANCE`},ec={BACKLOG:`queued`,READY:`ready`,IN_PROGRESS:`running`,BLOCKED:`waiting`,DONE:`complete`,CANCELLED:`paused`},tc=e=>e===`URGENT`?`danger`:e===`HIGH`?`warning`:`neutral`,nc=e=>{let t=e.split(`-`).at(-1)??e;return t.length>10?t.slice(0,8).toUpperCase():t.toUpperCase()},rc=(e,t,n)=>{let r=t=>e.filter(t).length;return[{id:`status`,label:n(`filter.status`),icon:`clock`,children:t.map(e=>({id:`status-${e.state.toLowerCase()}`,label:n(e.labelKey),count:r(t=>t.state===e.state)}))},{id:`priority`,label:n(`filter.priority`),icon:`filter`,children:[`URGENT`,`HIGH`,`MEDIUM`,`LOW`].map(e=>({id:`priority-${e.toLowerCase()}`,label:n(Xs[e]),count:r(t=>t.priority===e)}))},{id:`risk`,label:n(`filter.risk`),icon:`warning`,children:[`CRITICAL`,`HIGH`,`MEDIUM`,`LOW`].map(e=>({id:`risk-${e.toLowerCase()}`,label:n(Zs[e]),count:r(t=>t.risk===e)}))}]},ic=(e,t)=>t.every(t=>t.startsWith(`status-`)?t===`status-${e.state.toLowerCase()}`:t.startsWith(`priority-`)?t===`priority-${e.priority.toLowerCase()}`:!t.startsWith(`risk-`)||t===`risk-${e.risk.toLowerCase()}`),ac={title:`field.title`,description:`field.description`,priority:`field.priority`,risk:`field.risk`,acceptanceCriteria:`field.acceptanceCriteria`},oc={ACTUAL:`workflow.sessions.usageQuality.ACTUAL`,PROVIDER_ESTIMATE:`workflow.sessions.usageQuality.PROVIDER_ESTIMATE`,LOOMRAIL_ESTIMATE:`workflow.sessions.usageQuality.LOOMRAIL_ESTIMATE`},sc={NO_PROGRESS:`workflow.hardPause.noProgress`,CONTEXT_FLOOR_EXCEEDED:`workflow.hardPause.contextFloor`,PROVIDER_REJECTED_PACK:`workflow.hardPause.providerRejected`,PROVIDER_START_FAILED:`workflow.hardPause.providerStartFailed`,SESSION_LIMIT_REACHED:`workflow.hardPause.sessionLimit`},cc=(e,t,n)=>bn(e)?n(sc[e]):n(t),lc=(e,t)=>e.status===`QUEUED`?t(`workflow.stage.QUEUED`):e.status===`RUNNING`?t(`workflow.stage.RUNNING`):e.status===`WAITING_HUMAN`?t(`workflow.stage.WAITING_HUMAN`):e.status===`SOFT_PAUSED`?t(`workflow.stage.SOFT_PAUSED`):e.status===`HARD_PAUSED`?cc(e.failureCode,`workflow.stage.HARD_PAUSED`,t):e.status===`INTERRUPTED`?t(`workflow.stage.INTERRUPTED`):e.status===`CANCELLED`?t(`workflow.stage.CANCELLED`):e.status===`SUCCEEDED`?t(`workflow.stage.SUCCEEDED`):t(`workflow.stage.other`),uc={PENDING:`queued`,QUEUED:`queued`,RUNNING:`running`,WAITING_HUMAN:`waiting`,SOFT_PAUSED:`paused`,HARD_PAUSED:`waiting`,SUCCEEDED:`complete`,FAILED:`paused`,CANCELLED:`paused`,INTERRUPTED:`paused`,RECOVERING:`running`,STALE:`waiting`},dc={RUNNING:`workflow.status.RUNNING`,WAITING_HUMAN:`workflow.status.WAITING_HUMAN`,SOFT_PAUSED:`workflow.status.SOFT_PAUSED`,HARD_PAUSED:`workflow.status.HARD_PAUSED`,INTERRUPTED:`workflow.status.INTERRUPTED`,SUCCEEDED:`workflow.status.SUCCEEDED`,FAILED:`workflow.status.FAILED`,CANCELLED:`workflow.status.CANCELLED`},fc={RUNNING:`running`,WAITING_HUMAN:`waiting`,SOFT_PAUSED:`paused`,HARD_PAUSED:`waiting`,INTERRUPTED:`paused`,SUCCEEDED:`complete`,FAILED:`paused`,CANCELLED:`paused`},pc={PENDING:`acceptance.status.PENDING`,ACCEPTED:`acceptance.status.ACCEPTED`,RETURNED:`acceptance.status.RETURNED`,REJECTED:`acceptance.status.REJECTED`},mc={PENDING:`waiting`,ACCEPTED:`complete`,RETURNED:`paused`,REJECTED:`paused`},hc=(e,t)=>{switch(e.type){case`WORK_ITEM_CREATED`:return{detail:t(`event.createdDetail`),icon:`add`,label:t(`event.created`),tone:`success`};case`WORK_ITEM_UPDATED`:return{detail:t(`event.updatedDetail`,{fields:e.data.changedFields.map(e=>t(ac[e])).join(`, `)}),icon:`settings`,label:t(`event.updated`)};case`WORK_ITEM_STATE_CHANGED`:return{detail:t(`event.stateChangedDetail`,{from:$(e.data.previousState,t),to:$(e.data.workItem.state,t)}),icon:e.data.workItem.state===`BLOCKED`?`pause`:`play`,label:t(`event.stateChanged`),tone:e.data.workItem.state===`BLOCKED`?`warning`:`accent`};case`PROJECT_REGISTERED`:return{detail:e.data.project.name,icon:`projects`,label:t(`event.projectRegistered`)};case`PIPELINE_STARTED`:return{detail:t(`event.pipelineStartedDetail`,{stage:t($s[e.data.stageAttempt.stage])}),icon:`play`,label:t(`event.pipelineStarted`),tone:`accent`};case`STAGE_ATTEMPT_CHANGED`:return{detail:t(`event.stageChangedDetail`,{stage:t($s[e.data.stageAttempt.stage]),status:lc(e.data.stageAttempt,t)}),icon:e.data.stageAttempt.status===`SUCCEEDED`?`check`:`clock`,label:t(`event.stageChanged`),tone:e.data.stageAttempt.status===`SUCCEEDED`?`success`:`accent`};case`HUMAN_REQUEST_OPENED`:return{detail:t(`event.humanRequestOpenedDetail`,{title:e.data.request.title}),icon:`question`,label:t(`event.humanRequestOpened`),tone:`warning`};case`HUMAN_REQUEST_RESOLVED`:return{detail:t(`event.humanRequestResolvedDetail`),icon:`check`,label:t(`event.humanRequestResolved`),tone:`success`};case`USAGE_RECORDED`:return{detail:t(`event.usageRecordedDetail`,{amount:e.data.usageRecord.amount,total:e.data.cumulativeAmount}),icon:`clock`,label:t(`event.usageRecorded`)};case`BUDGET_THRESHOLD_REACHED`:return{detail:t(`event.budgetThresholdDetail`,{threshold:Math.round(e.data.threshold*100),total:e.data.cumulativeAmount}),icon:`filter`,label:t(`event.budgetThreshold`),tone:e.data.threshold>=1?`warning`:`accent`};case`PIPELINE_PAUSED`:return{detail:t(`event.pipelinePausedDetail`,{kind:e.data.kind,stage:t($s[e.data.stageAttempt.stage])}),icon:`pause`,label:t(`event.pipelinePaused`),tone:`warning`};case`PIPELINE_RESUMED`:return{detail:t(`event.pipelineResumedDetail`,{stage:t($s[e.data.stageAttempt.stage])}),icon:`play`,label:t(`event.pipelineResumed`),tone:`accent`};case`PIPELINE_CANCELLED`:return{detail:t(`event.pipelineCancelledDetail`,{stage:t($s[e.data.stageAttempt.stage])}),icon:`pause`,label:t(`event.pipelineCancelled`),tone:`warning`};case`BUDGET_OVERRIDE_APPROVED`:return{detail:t(`event.budgetOverrideDetail`,{revision:e.data.budgetPolicy.revision,limit:e.data.budgetPolicy.maxEstimatedTokens}),icon:`settings`,label:t(`event.budgetOverride`),tone:`accent`};case`RECOVERY_REPORT_CREATED`:return{detail:t(`event.recoveryCreatedDetail`,{stage:t($s[e.data.stageAttempt.stage])}),icon:`clock`,label:t(`event.recoveryCreated`),tone:`warning`};case`EVIDENCE_ARTIFACT_RECORDED`:return{detail:t(`event.evidenceRecordedDetail`,{title:e.data.artifact.title}),icon:`check`,label:t(`event.evidenceRecorded`),tone:`success`};case`ACCEPTANCE_REQUESTED`:return{detail:t(`event.acceptanceRequestedDetail`),icon:`question`,label:t(`event.acceptanceRequested`),tone:`warning`};case`ACCEPTANCE_RESOLVED`:return{detail:t(`event.acceptanceResolvedDetail`,{action:e.data.action}),icon:e.data.action===`ACCEPT`?`check`:`pause`,label:t(`event.acceptanceResolved`),tone:e.data.action===`ACCEPT`?`success`:`warning`};case`PIPELINE_COMPLETED`:return{detail:t(`event.pipelineCompletedDetail`),icon:`check`,label:t(`event.pipelineCompleted`),tone:`success`};case`PROVIDER_SESSION_STARTED`:return{detail:t(`event.providerSessionStartedDetail`,{ordinal:e.data.session.ordinal}),icon:`sessions`,label:t(`event.providerSessionStarted`),tone:`accent`};case`CHECKPOINT_PUBLISHED`:return{detail:t(`event.checkpointPublishedDetail`,{summary:e.data.checkpoint.summary}),icon:`check`,label:t(`event.checkpointPublished`),tone:`success`};case`CONTEXT_HANDOFF_REQUESTED`:return{detail:t(`event.contextHandoffRequestedDetail`,{ordinal:e.data.session.ordinal}),icon:`clock`,label:t(`event.contextHandoffRequested`),tone:`warning`};case`PROVIDER_SESSION_ENDED`:return{detail:t(`event.providerSessionEndedDetail`,{reason:e.data.session.endReason??``}),icon:`sessions`,label:t(`event.providerSessionEnded`),tone:e.data.session.endReason===`COMPLETED`?`success`:`neutral`};case`CONTEXT_FLOOR_EXCEEDED`:return{detail:t(`event.contextFloorExceededDetail`,{ordinal:e.data.sessionOrdinal,requiredBytes:e.data.requiredBytes,budgetBytes:e.data.budgetBytes}),icon:`pause`,label:t(`event.contextFloorExceeded`),tone:`warning`};case`WORK_ITEM_WORKSPACE_CREATED`:return{detail:t(`event.workspaceCreatedDetail`,{branch:e.data.workspace.branch}),icon:`branch`,label:t(`event.workspaceCreated`),tone:`success`};case`WORK_ITEM_WORKSPACE_ORPHANED`:return{detail:t(`event.workspaceOrphanedDetail`),icon:`warning`,label:t(`event.workspaceOrphaned`),tone:`warning`}}},gc=(e,t)=>new Intl.DateTimeFormat(t===`ru`?`ru-RU`:`en-US`,{hour:`2-digit`,minute:`2-digit`}).format(new Date(e)),_c=({item:e,onSelect:t,selected:n})=>{let{t:r}=X(),i=(0,A.useRef)(null);return(0,A.useEffect)(()=>{n&&i.current?.scrollIntoView({block:`nearest`,inline:`nearest`})},[n]),(0,H.jsx)(`button`,{"aria-label":e.title,"aria-pressed":n,className:`task-card-button`,onClick:()=>{t(e.id)},ref:i,type:`button`,children:(0,H.jsx)(_a,{agent:r(Qs[e.type]),badge:{label:r(Xs[e.priority]),tone:tc(e.priority)},description:e.description,id:nc(e.id),meta:$(e.state,r),selected:n,title:e.title})})},vc=e=>e.split(`
2
+ `).map(e=>e.trim()).filter(Boolean),yc=({item:e})=>{let{t}=X(),n=Ss(),r=(0,A.useRef)(null),[i,a]=(0,A.useState)(!1),[o,s]=(0,A.useState)(e.title),[c,l]=(0,A.useState)(e.description),[u,d]=(0,A.useState)(e.priority),[f,p]=(0,A.useState)(e.risk),[m,h]=(0,A.useState)(e.acceptanceCriteria.join(`
3
+ `)),g=vc(m),_=g.length<=50&&g.every(e=>e.length<=500),ee=o.trim()!==e.title||c.trim()!==e.description||u!==e.priority||f!==e.risk||g.length!==e.acceptanceCriteria.length||g.some((t,n)=>t!==e.acceptanceCriteria[n]),v=()=>{s(e.title),l(e.description),d(e.priority),p(e.risk),h(e.acceptanceCriteria.join(`
4
+ `)),n.reset()};return(0,H.jsx)(Zi,{closeLabel:t(`action.closeDialog`),description:t(`task.edit.description`),footer:(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(G,{disabled:n.isPending,onClick:()=>{a(!1),v()},children:t(`action.cancel`)}),(0,H.jsx)(G,{disabled:!o.trim()||!_||!ee,loading:n.isPending,onClick:()=>{r.current?.requestSubmit()},type:`button`,variant:`primary`,children:t(`task.edit.submit`)})]}),onOpenChange:e=>{e&&v(),a(e)},open:i,size:`lg`,title:t(`task.edit`),trigger:(0,H.jsx)(K,{label:t(`task.edit`),name:`edit`,size:`sm`,variant:`surface`}),triggerTooltip:t(`task.edit`),children:(0,H.jsxs)(`form`,{className:`edit-task-form`,onSubmit:t=>{t.preventDefault();let r=o.trim(),i=c.trim();if(!r||!_||!ee)return;let s={...r===e.title?{}:{title:r},...i===e.description?{}:{description:i},...u===e.priority?{}:{priority:u},...f===e.risk?{}:{risk:f},...g.length===e.acceptanceCriteria.length&&g.every((t,n)=>t===e.acceptanceCriteria[n])?{}:{acceptanceCriteria:[...g]}};n.mutate({patch:s,workItem:e},{onSuccess:()=>{a(!1)}})},ref:r,children:[n.error?(0,H.jsx)(vo,{error:n.error,onRetry:()=>{r.current?.requestSubmit()},retrying:n.isPending}):null,(0,H.jsx)(J,{htmlFor:`edit-task-title`,label:t(`task.create.title`),required:!0,children:(0,H.jsx)(Li,{autoFocus:!0,id:`edit-task-title`,maxLength:200,onChange:e=>{s(e.currentTarget.value)},required:!0,value:o})}),(0,H.jsx)(J,{htmlFor:`edit-task-description`,label:t(`task.create.brief`),children:(0,H.jsx)(Ri,{id:`edit-task-description`,maxLength:2e4,onChange:e=>{l(e.currentTarget.value)},rows:5,value:c})}),(0,H.jsxs)(`div`,{className:`edit-task-form__row`,children:[(0,H.jsx)(J,{htmlFor:`edit-task-priority`,label:t(`task.priority`),children:(0,H.jsx)(Hi,{ariaLabel:t(`task.priority`),id:`edit-task-priority`,onValueChange:e=>{d(Xr.parse(e))},options:Object.keys(Xs).map(e=>({label:t(Xs[e]),value:e})),value:u})}),(0,H.jsx)(J,{htmlFor:`edit-task-risk`,label:t(`task.risk`),children:(0,H.jsx)(Hi,{ariaLabel:t(`task.risk`),id:`edit-task-risk`,onValueChange:e=>{p(Zr.parse(e))},options:Object.keys(Zs).map(e=>({label:t(Zs[e]),value:e})),value:f})})]}),(0,H.jsx)(J,{description:t(`task.edit.criteriaDescription`),htmlFor:`edit-work-item-criteria`,label:t(`task.acceptanceCriteria`),..._?{}:{error:t(`task.edit.criteriaError`)},children:(0,H.jsx)(Ri,{"aria-describedby":`edit-work-item-criteria-description`,id:`edit-work-item-criteria`,invalid:!_,onChange:e=>{h(e.currentTarget.value)},rows:5,value:m})})]})})},bc=({request:e})=>{let{t}=X(),n=ws(),[r,i]=(0,A.useState)(``),[a,o]=(0,A.useState)(``),s=r===`__other__`,c=s?a.trim().length>0:r.length>0,l=()=>{c&&n.mutate({request:e,answer:s?{type:`OTHER`,text:a.trim()}:{type:`OPTION`,optionIds:[r]}})};return(0,H.jsxs)(`div`,{className:`human-request-card`,children:[(0,H.jsxs)(`div`,{className:`human-request-card__eyebrow`,children:[(0,H.jsx)(U,{name:`question`,size:13}),(0,H.jsx)(`span`,{children:t(`humanRequest.blocking`)})]}),(0,H.jsx)(`h3`,{children:e.title}),(0,H.jsx)(`p`,{children:e.context}),e.recommendation?(0,H.jsxs)(`div`,{className:`human-request-card__recommendation`,children:[(0,H.jsx)(`strong`,{children:t(`humanRequest.recommendation`)}),(0,H.jsx)(`span`,{children:e.recommendation})]}):null,(0,H.jsx)(Vi,{"aria-label":e.title,onValueChange:i,options:[...e.options.map(e=>({value:e.id,label:e.recommended?`${e.label} · ${t(`humanRequest.recommended`)}`:e.label,description:e.consequence})),...e.allowOther?[{value:`__other__`,label:t(`humanRequest.other`)}]:[]],value:r}),s?(0,H.jsx)(Li,{"aria-label":t(`humanRequest.other`),autoFocus:!0,maxLength:2e3,onChange:e=>{o(e.currentTarget.value)},placeholder:t(`humanRequest.otherPlaceholder`),value:a}):null,!c&&r?(0,H.jsx)(`span`,{className:`human-request-card__hint`,children:t(`humanRequest.chooseAnswer`)}):null,n.error?(0,H.jsx)(vo,{error:n.error,onRetry:l,retrying:n.isPending}):null,(0,H.jsx)(G,{disabled:!c,loading:n.isPending,onClick:l,variant:`primary`,children:t(`humanRequest.answerResume`)})]})},xc=({acceptancePackage:e,artifacts:t,item:n,run:r})=>{let{t:i}=X(),a=Ds(),[o,s]=(0,A.useState)(null),c=t=>{s(t),a.mutate({acceptancePackage:e,action:t,run:r,workItem:n})};return(0,H.jsxs)(`div`,{className:`acceptance-package`,children:[(0,H.jsxs)(`div`,{className:`acceptance-package__heading`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`span`,{children:i(`acceptance.eyebrow`)}),(0,H.jsx)(`h3`,{children:i(`acceptance.title`)})]}),(0,H.jsx)(Mi,{label:i(pc[e.status]),tone:mc[e.status]})]}),(0,H.jsx)(`p`,{children:e.releaseNote}),(0,H.jsx)(`div`,{className:`acceptance-evidence`,"aria-label":i(`acceptance.evidence`),children:t.map(e=>(0,H.jsxs)(`article`,{children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(U,{name:`check`,size:13}),(0,H.jsx)(`strong`,{children:e.kind===`REVIEW_REPORT`?i(`acceptance.reviewEvidence`):i(`acceptance.qaEvidence`)})]}),(0,H.jsx)(`span`,{children:e.summary}),(0,H.jsx)(`small`,{children:i(`acceptance.checks`,{count:e.checks.length})})]},e.id))}),(0,H.jsxs)(`div`,{className:`acceptance-matrix`,children:[(0,H.jsx)(`strong`,{children:i(`acceptance.matrix`)}),e.criteria.length>0?(0,H.jsx)(`ol`,{children:e.criteria.map(e=>(0,H.jsxs)(`li`,{children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(U,{name:`check`,size:13}),(0,H.jsx)(`strong`,{children:e.criterion})]}),(0,H.jsx)(`span`,{children:e.verification})]},e.criterion))}):(0,H.jsx)(`span`,{children:i(`acceptance.noCriteria`)})]}),a.error?(0,H.jsx)(vo,{error:a.error,onRetry:()=>{o&&c(o)},retrying:a.isPending}):null,e.status===`PENDING`?(0,H.jsxs)(`div`,{className:`acceptance-package__actions`,children:[(0,H.jsx)(G,{disabled:a.isPending,loading:a.isPending&&o===`ACCEPT`,onClick:()=>{c(`ACCEPT`)},variant:`primary`,children:i(`acceptance.accept`)}),(0,H.jsx)(G,{disabled:a.isPending,loading:a.isPending&&o===`RETURN_TO_WORK`,onClick:()=>{c(`RETURN_TO_WORK`)},children:i(`acceptance.return`)}),(0,H.jsx)(G,{disabled:a.isPending,loading:a.isPending&&o===`REJECT`,onClick:()=>{c(`REJECT`)},children:i(`acceptance.reject`)})]}):null]})},Sc=({label:e})=>(0,H.jsxs)(`div`,{"aria-label":e,className:`inspector-workflow-skeleton`,role:e===void 0?void 0:`status`,children:[(0,H.jsxs)(`div`,{className:`inspector-workflow-skeleton__status`,children:[(0,H.jsx)(q,{width:`42%`}),(0,H.jsx)(q,{width:`68px`})]}),(0,H.jsxs)(`div`,{className:`inspector-workflow-skeleton__panel`,children:[(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{width:`48%`}),(0,H.jsx)(q,{width:`54px`})]}),(0,H.jsx)(q,{className:`inspector-workflow-skeleton__meter`,width:`100%`}),(0,H.jsx)(q,{width:`36%`})]}),(0,H.jsxs)(`div`,{className:`inspector-workflow-skeleton__steps`,children:[(0,H.jsx)(q,{width:`58%`}),(0,H.jsx)(q,{width:`44%`})]})]}),Cc=(e,t)=>{if(e.status===`RUNNING`)return{label:t(`workflow.sessions.status.RUNNING`),tone:`running`};switch(e.endReason){case`COMPLETED`:return{label:t(`workflow.sessions.status.COMPLETED`),tone:`complete`};case`HANDOFF`:return{label:t(`workflow.sessions.status.HANDOFF`),tone:`waiting`};case`CONTEXT_EXHAUSTED`:return{label:t(`workflow.sessions.status.CONTEXT_EXHAUSTED`),tone:`paused`};case`INTERRUPTED`:return{label:t(`workflow.sessions.status.INTERRUPTED`),tone:`paused`};case`CANCELLED`:return{label:t(`workflow.sessions.status.CANCELLED`),tone:`queued`};case null:return{label:t(`workflow.stage.other`),tone:`queued`}}},wc=(e,t)=>[{label:t(`workflow.checkpoints.completed`),items:e.completed},{label:t(`workflow.checkpoints.remaining`),items:e.remaining},{label:t(`workflow.checkpoints.deadEnds`),items:e.deadEnds},{label:t(`workflow.checkpoints.openQuestions`),items:e.openQuestions}],Tc=({attempt:e})=>{let{locale:t,t:n}=X(),r=ms(e.id),i=hs(),a=r.data?.sessions??[],o=r.data?.checkpoints??[],s=r.data?.peakContextWindowUsage??{};if(a.length===0)return null;let c=o.reduce((e,t)=>e===null||t.createdAt>e.createdAt?{id:t.id,createdAt:t.createdAt}:e,null)?.id,l=[...a].sort((e,t)=>e.ordinal-t.ordinal).map(e=>{let r=Cc(e,n),i=s[e.id],a=i?Math.round(i.usedTokens/i.windowTokens*100):void 0,l=o.filter(t=>t.providerSessionId===e.id).sort((e,t)=>e.ordinal-t.ordinal).map(e=>({id:e.id,summary:e.summary,timeLabel:gc(e.createdAt,t),defaultOpen:e.id===c,groups:wc(e,n)}));return{id:e.id,ordinal:e.ordinal,ariaLabel:n(`workflow.sessions.ordinal`,{ordinal:e.ordinal}),statusLabel:r.label,tone:r.tone,checkpoints:l,...e.handoffRequestedAt===null?{}:{handoffRequestedLabel:n(`workflow.sessions.handoffRequested`)},...a===void 0||i===void 0?{}:{occupancyPercent:a,occupancyLabel:n(e.handoffRequestedAt===null?`workflow.sessions.occupancyPeak`:`workflow.sessions.occupancyAtHandoff`,{percent:a}),occupancyQualityLabel:n(oc[i.quality])},...l.length===0?{emptyCheckpointsLabel:n(`workflow.checkpoints.empty`)}:{}}}),u={heading:n(`workflow.sessions.attemptHeading`,{attempt:e.attempt}),statusLabel:lc(e,n),tone:uc[e.status]};return(0,H.jsx)(Sa,{attempt:u,...i.data?.checkpointOnRequest===!1?{note:n(`workflow.sessions.noCheckpointOnRequest`)}:{},sessions:l,title:n(`workflow.sessions.title`)})},Ec={READY:`workspace.status.READY`,ORPHANED:`workspace.status.ORPHANED`,REMOVED:`workspace.status.REMOVED`},Dc={READY:`ready`,ORPHANED:`paused`,REMOVED:`queued`},Oc=12,kc=({item:e})=>{let{t}=X(),{projects:n}=ss(),r=ds(e.id).data?.workspace??null;if(!r)return null;let i=n.find(t=>t.id===e.projectId)??null;return(0,H.jsx)(ba,{title:t(`workspace.title`),children:(0,H.jsxs)(`div`,{className:`workspace-identity`,children:[(0,H.jsx)(xa,{properties:[{label:t(`workspace.state`),value:(0,H.jsx)(Mi,{label:t(Ec[r.status]),tone:Dc[r.status]})},{label:t(`workspace.baseCommit`),value:r.baseCommit===null?t(`workspace.baseCommit.none`):(0,H.jsx)(`code`,{className:`workspace-identity__sha`,title:r.baseCommit,children:r.baseCommit.slice(0,Oc)})}]}),(0,H.jsxs)(`dl`,{className:`workspace-identity__locations`,children:[i?(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`dt`,{children:t(`workspace.repository`)}),(0,H.jsx)(`dd`,{children:i.repositoryPath})]}):null,(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`dt`,{children:t(`workspace.branch`)}),(0,H.jsx)(`dd`,{children:r.branch})]}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`dt`,{children:t(`workspace.worktree`)}),(0,H.jsx)(`dd`,{children:r.worktreePath})]})]}),r.status===`READY`?null:(0,H.jsx)(`p`,{className:`workspace-identity__note`,role:`status`,children:t(`workspace.notReady`)}),(0,H.jsx)(`p`,{className:`inspector-copy`,children:t(`workspace.uncommitted`)})]})})},Ac=({item:e})=>{let{t}=X(),n=us(e.id),r=Cs(),i=Ts(),a=Es(),[o,s]=(0,A.useState)(null),c=n.data,l=c?.humanRequests.find(({id:e,status:t})=>t===`OPEN`&&e!==c.acceptancePackage?.humanRequestId)??null;if(n.isPending)return(0,H.jsx)(Sc,{label:t(`workflow.loading`)});if(!c?.run)return(0,H.jsxs)(`div`,{className:`workflow-start`,children:[(0,H.jsx)(`p`,{className:`inspector-copy`,children:e.state===`READY`?t(`workflow.startDescription`):t(`workflow.readyRequired`)}),r.error?(0,H.jsx)(vo,{error:r.error,onRetry:()=>{r.mutate(e)},retrying:r.isPending}):null,(0,H.jsx)(G,{disabled:e.state!==`READY`,loading:r.isPending,onClick:()=>{r.mutate(e)},variant:`primary`,children:t(`workflow.start`)})]});let u=c.run,d=c.stageAttempts.find(e=>e.id===u.currentStageAttemptId)??null,f=c.budgetPolicies.at(-1)??null,p=c.usageRecords.reduce((e,t)=>e+t.amount,0),m=f?Math.min(100,Math.round(p/f.maxEstimatedTokens*100)):0,h=f?Math.max(f.maxEstimatedTokens*2,p+100):p+100,g=i.isPending||a.isPending,_=t=>{i.reset(),a.reset(),s(t),i.mutate({action:t,run:u,workItem:e})},ee=()=>{i.reset(),a.reset(),s(`override`),a.mutate({maxEstimatedTokens:h,run:u,workItem:e})};return(0,H.jsxs)(`div`,{className:`workflow-panel`,children:[(0,H.jsxs)(`div`,{className:`workflow-panel__status`,children:[(0,H.jsx)(`span`,{children:t(`workflow.mockName`)}),(0,H.jsx)(Mi,{label:c.run.status===`HARD_PAUSED`?cc(d?.failureCode??null,`workflow.status.HARD_PAUSED`,t):t(dc[c.run.status]),tone:fc[c.run.status]})]}),f?(0,H.jsxs)(`div`,{className:`workflow-budget`,children:[(0,H.jsxs)(`div`,{className:`workflow-budget__heading`,children:[(0,H.jsx)(`span`,{children:t(`workflow.budget.title`)}),(0,H.jsx)(`strong`,{children:t(`workflow.budget.usage`,{used:p,limit:f.maxEstimatedTokens})})]}),(0,H.jsx)(`progress`,{"aria-label":t(`workflow.budget.title`),max:f.maxEstimatedTokens,value:Math.min(p,f.maxEstimatedTokens)}),(0,H.jsxs)(`div`,{className:`workflow-budget__meta`,children:[(0,H.jsx)(`span`,{children:t(`workflow.budget.revision`,{revision:f.revision})}),(0,H.jsxs)(`span`,{children:[m,`%`]})]})]}):null,(0,H.jsx)(`ol`,{className:`workflow-stage-list`,children:c.stageAttempts.map(e=>(0,H.jsxs)(`li`,{className:`is-${e.status.toLowerCase()}`,children:[(0,H.jsx)(`span`,{"aria-hidden":`true`}),(0,H.jsxs)(`div`,{children:[(0,H.jsx)(`strong`,{children:t($s[e.stage])}),(0,H.jsx)(`small`,{children:lc(e,t)})]})]},e.id))}),d?(0,H.jsx)(Tc,{attempt:d}):null,c.acceptancePackage?(0,H.jsx)(xc,{acceptancePackage:c.acceptancePackage,artifacts:c.artifacts,item:e,run:u}):c.artifacts.length>0?(0,H.jsxs)(`div`,{className:`workflow-artifact-summary`,children:[(0,H.jsx)(`strong`,{children:t(`acceptance.evidence`)}),(0,H.jsx)(`span`,{children:t(`acceptance.evidenceCount`,{count:c.artifacts.length})})]}):null,l?(0,H.jsx)(bc,{request:l}):null,c.recoveryReports.at(-1)?(0,H.jsxs)(`div`,{className:`workflow-recovery`,role:`status`,children:[(0,H.jsx)(`strong`,{children:t(`workflow.recovery.title`)}),(0,H.jsx)(`span`,{children:t(`workflow.recovery.description`)})]}):null,i.error||a.error?(0,H.jsx)(vo,{error:i.error??a.error,onRetry:()=>{o===`override`?ee():o&&_(o)},retrying:g}):null,[`RUNNING`,`WAITING_HUMAN`,`SOFT_PAUSED`,`HARD_PAUSED`,`INTERRUPTED`].includes(u.status)&&c.acceptancePackage?.status!==`PENDING`?(0,H.jsxs)(`div`,{className:`workflow-panel__actions`,children:[u.status===`RUNNING`?(0,H.jsx)(G,{disabled:g,loading:i.isPending&&o===`pause`,onClick:()=>{_(`pause`)},children:t(`workflow.action.pause`)}):null,u.status===`SOFT_PAUSED`||u.status===`INTERRUPTED`?(0,H.jsx)(G,{disabled:g,loading:i.isPending&&o===`resume`,onClick:()=>{_(`resume`)},variant:`primary`,children:t(`workflow.action.resume`)}):null,u.status===`HARD_PAUSED`&&!bn(d?.failureCode??null)?(0,H.jsx)(G,{disabled:g,loading:a.isPending,onClick:ee,variant:`primary`,children:t(`workflow.action.override`,{limit:h})}):null,(0,H.jsx)(G,{disabled:g,loading:i.isPending&&o===`cancel`,onClick:()=>{_(`cancel`)},variant:`secondary`,children:t(`workflow.action.cancel`)})]}):null,c.run.status===`SUCCEEDED`?(0,H.jsx)(`p`,{className:`workflow-panel__completed`,children:t(`workflow.completed`)}):null]})},jc=({label:e})=>(0,H.jsx)(`div`,{"aria-label":e,className:`inspector-activity-skeleton`,role:e===void 0?void 0:`status`,children:[`first`,`second`,`third`].map((e,t)=>(0,H.jsxs)(`div`,{className:`inspector-activity-skeleton__row`,children:[(0,H.jsx)(q,{className:`inspector-activity-skeleton__icon`}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(q,{width:t===1?`52%`:`68%`}),(0,H.jsx)(q,{width:t===2?`64%`:`82%`})]}),(0,H.jsx)(q,{width:`28px`})]},e))}),Mc=({item:e})=>{let{locale:t,t:n}=X(),r=ls(e.projectId,e.id),i=r.data?.pages.flatMap(e=>e.events)??[];return(0,H.jsxs)(ba,{action:r.data?(0,H.jsx)(`span`,{className:`inspector-step-count`,children:r.hasNextPage?n(`task.activityCountMore`,{count:i.length}):i.length}):void 0,title:n(`task.activity`),children:[i.length>0?(0,H.jsx)(`ol`,{"aria-busy":r.isFetchingNextPage,className:`inspector-activity`,children:i.map(e=>(0,H.jsx)(`li`,{children:(0,H.jsx)(ya,{...hc(e,n),time:gc(e.occurredAt,t)})},e.id))}):null,r.hasNextPage?(0,H.jsx)(G,{className:`inspector-activity__more`,disabled:r.isFetchingNextPage,loading:r.isFetchingNextPage,onClick:()=>{r.fetchNextPage()},size:`sm`,children:n(`task.loadMoreActivity`)}):null,r.isPending?(0,H.jsx)(jc,{label:n(`task.loadingActivity`)}):null,r.data&&i.length===0?(0,H.jsx)(`p`,{className:`inspector-copy`,children:n(`task.noActivity`)}):null]})},Nc=()=>{let{t:e}=X();return(0,H.jsxs)(`aside`,{"aria-busy":`true`,"aria-label":e(`loading.inspector.title`),className:`task-inspector`,role:`status`,children:[(0,H.jsxs)(`div`,{className:`task-inspector__header`,children:[(0,H.jsxs)(`div`,{className:`task-inspector__identity`,children:[(0,H.jsx)(q,{width:`68px`}),(0,H.jsxs)(`div`,{className:`inspector-skeleton__actions`,children:[(0,H.jsx)(q,{className:`inspector-skeleton__control`,width:`28px`}),(0,H.jsx)(q,{className:`inspector-skeleton__control`,width:`112px`})]})]}),(0,H.jsx)(q,{className:`inspector-skeleton__title`,width:`72%`})]}),(0,H.jsxs)(`section`,{className:`lr-inspector-section`,children:[(0,H.jsx)(`header`,{children:(0,H.jsx)(q,{width:`64px`})}),(0,H.jsxs)(`div`,{className:`lr-inspector-section__body`,children:[(0,H.jsx)(`div`,{className:`inspector-skeleton__summary`,children:[`state`,`stage`,`type`,`priority`,`risk`].map((e,t)=>(0,H.jsxs)(`div`,{children:[(0,H.jsx)(q,{width:`48%`}),(0,H.jsx)(q,{width:t%2==0?`74%`:`56%`})]},e))}),(0,H.jsxs)(`div`,{className:`inspector-skeleton__copy`,children:[(0,H.jsx)(q,{width:`100%`}),(0,H.jsx)(q,{width:`84%`})]})]})]}),(0,H.jsxs)(`section`,{className:`lr-inspector-section`,children:[(0,H.jsxs)(`header`,{children:[(0,H.jsx)(q,{width:`76px`}),(0,H.jsx)(q,{width:`20px`})]}),(0,H.jsx)(`div`,{className:`lr-inspector-section__body`,children:(0,H.jsx)(Sc,{})})]}),(0,H.jsxs)(`section`,{className:`lr-inspector-section`,children:[(0,H.jsxs)(`header`,{children:[(0,H.jsx)(q,{width:`120px`}),(0,H.jsx)(q,{width:`16px`})]}),(0,H.jsx)(`div`,{className:`lr-inspector-section__body`,children:(0,H.jsx)(jc,{})})]})]})},Pc=({item:e})=>{let{t}=X(),n=xs(),r=us(e?.id),[i,a]=(0,A.useState)(null);if(!e)return(0,H.jsx)(`aside`,{className:`task-inspector is-empty`,"aria-label":t(`empty.noSelection.title`),children:(0,H.jsx)(Fi,{className:`inspector-empty-feedback`,description:t(`empty.noSelection.description`),title:t(`empty.noSelection.title`)})});let o=[`RUNNING`,`WAITING_HUMAN`,`SOFT_PAUSED`,`HARD_PAUSED`,`INTERRUPTED`].includes(r.data?.run?.status??``),s=o?[]:Bs[e.state],c=t=>{a(t),n.mutate({targetState:t,workItem:e})},{primary:l,secondary:u}=Us(e.state,o);return(0,H.jsxs)(`aside`,{className:`task-inspector`,"aria-label":e.title,children:[(0,H.jsxs)(`header`,{className:`task-inspector__header`,children:[(0,H.jsxs)(`div`,{className:`task-inspector__identity`,children:[(0,H.jsx)(`span`,{className:`task-inspector__id`,children:nc(e.id)}),(0,H.jsxs)(`div`,{className:`task-inspector__actions`,children:[(0,H.jsx)(yc,{item:e},`${e.id}-${e.version.toString()}`),(0,H.jsx)(Yi,{align:`end`,groups:[s.map(e=>({danger:e===`CANCELLED`,label:t(`task.moveTo`,{state:$(e,t)}),onSelect:()=>{c(e)}}))],trigger:(0,H.jsx)(G,{disabled:s.length===0,shape:`pill`,trailingIcon:`chevronDown`,children:t(`task.move`)})})]})]}),(0,H.jsx)(`h2`,{children:e.title})]}),(0,H.jsxs)(ba,{title:t(`task.overview`),children:[(0,H.jsx)(xa,{properties:[{label:t(`task.state`),value:(0,H.jsx)(Mi,{label:$(e.state,t),tone:ec[e.state]})},{label:t(`task.stage`),value:e.currentStage?t($s[e.currentStage]):`—`},{label:t(`task.type`),value:t(Qs[e.type])},{label:t(`task.priority`),value:t(Xs[e.priority])},{label:t(`task.risk`),value:t(Zs[e.risk])}]}),(0,H.jsx)(`p`,{className:`inspector-copy`,children:e.description||t(`task.noBrief`)})]}),(0,H.jsx)(ba,{action:r.data?.run?(0,H.jsx)(`span`,{className:`inspector-step-count`,children:r.data.stageAttempts.length.toString().padStart(2,`0`)}):void 0,title:t(`workflow.title`),children:(0,H.jsx)(Ac,{item:e})}),(0,H.jsx)(kc,{item:e}),(0,H.jsx)(zs,{workItemId:e.id},e.id),(0,H.jsx)(ba,{title:t(`task.acceptanceCriteria`),children:e.acceptanceCriteria.length>0?(0,H.jsx)(`div`,{className:`inspector-checklist`,children:e.acceptanceCriteria.map(e=>(0,H.jsx)(zi,{disabled:!0,label:e},e))}):(0,H.jsx)(`p`,{className:`inspector-copy`,children:t(`task.noAcceptanceCriteria`)})}),(0,H.jsx)(Mc,{item:e}),n.error?(0,H.jsx)(`div`,{className:`task-inspector__error`,children:(0,H.jsx)(vo,{error:n.error,onRetry:()=>{i&&c(i)},retrying:n.isPending})}):null,l!==null||u!==null?(0,H.jsxs)(`footer`,{className:`task-inspector__footer`,children:[u?(0,H.jsx)(G,{"aria-label":t(`task.moveTo`,{state:$(u,t)}),loading:n.isPending,onClick:()=>{c(u)},variant:`secondary`,children:t(`task.moveToShort`,{state:$(u,t)})}):null,l?(0,H.jsx)(G,{"aria-label":t(`task.moveTo`,{state:$(l,t)}),loading:n.isPending,onClick:()=>{c(l)},variant:`primary`,children:t(`task.moveToShort`,{state:$(l,t)})}):null]}):null]})},Fc=()=>{let{t:e}=X(),t=a({from:`/`}),n=d({from:`/`}),{connectionPending:r,error:i,projectsPending:o,retryConnection:s,selectedProject:c}=ss(),l=cs(c?.id),u=gs(c?.id),f=_s(),[p,m]=(0,A.useState)(null),h=n.filters?.split(`,`)??[],g=n.summary??null,_=e=>{t({replace:!0,resetScroll:!1,search:t=>({...t,filters:e.length>0?e.join(`,`):void 0})})},ee=e=>{t({replace:!0,resetScroll:!1,search:t=>({...t,summary:e??void 0})})},v={direction:n.dir??Ge.direction,ordering:n.order??Ge.ordering,showEmptyColumns:n.hideEmpty!==!0},y=e=>{t({replace:!0,resetScroll:!1,search:t=>({...t,dir:e.direction===Ge.direction?void 0:e.direction,order:e.ordering===Ge.ordering?void 0:e.ordering,hideEmpty:!e.showEmptyColumns||void 0})})},b=n.scope??`active`,te=e=>{t({replace:!0,resetScroll:!1,search:t=>({...t,scope:e===`active`?void 0:e,filters:void 0})})},x=()=>{t({replace:!0,resetScroll:!1,search:e=>({...e,filters:void 0,summary:void 0})})},S=o||c!==null&&l.isPending,ne=l.data?.workItems??[],C=Js(b),w=ne.filter(e=>et(b,e.state)),T=u.data?.humanRequests.filter(({blocking:e})=>e)??[],E=new Set(T.map(({workItemId:e})=>e)),D=Ze(w.filter(e=>g!==`needsYou`||E.has(e.id)).filter(e=>ic(e,h)),v),O=D.find(e=>e.id===p)??D.at(0)??null,k=rc(w,C,e);return(0,H.jsxs)(`div`,{className:`workbench`,children:[(0,H.jsxs)(`section`,{"aria-label":e(`work.boardLabel`),className:`workbench-board`,"aria-labelledby":`current-work-title`,children:[(0,H.jsx)(`h1`,{className:`lr-visually-hidden`,id:`current-work-title`,children:e(`work.current`)}),(0,H.jsx)(Ks,{filters:h,onClearFilters:x,onFiltersChange:_,onScopeChange:te,onSummaryFilterChange:ee,onViewChange:y,options:k,scope:b,summaryFilter:g,view:v}),T[0]?(0,H.jsxs)(`button`,{className:`attention-banner`,onClick:()=>{x(),m(T[0]?.workItemId??null)},type:`button`,children:[(0,H.jsx)(`span`,{className:`attention-banner__icon`,children:(0,H.jsx)(U,{name:`question`,size:14})}),(0,H.jsxs)(`span`,{children:[(0,H.jsx)(`strong`,{children:e(`attention.title`)}),(0,H.jsx)(`small`,{children:T[0].title})]}),(0,H.jsx)(`span`,{className:`attention-banner__count`,children:e(T.length===1?`attention.count`:`attention.countMany`,{count:T.length})}),(0,H.jsx)(U,{name:`chevronRight`,size:14})]}):null,!c&&!o&&!i?(0,H.jsxs)(`div`,{className:`workbench-state`,children:[(0,H.jsx)(Fi,{action:(0,H.jsx)(G,{loading:f.isPending,onClick:()=>{f.mutate()},variant:`primary`,children:e(`empty.noProjects.action`)}),description:e(`empty.noProjects.description`),title:e(`empty.noProjects.title`)}),f.error instanceof Error?(0,H.jsx)(`p`,{className:`workbench-state__error`,role:`alert`,children:f.error.message}):null]}):null,S?(0,H.jsx)(`div`,{"aria-busy":`true`,"aria-label":e(`loading.board.title`),className:`board-skeleton`,role:`status`,children:C.map(e=>(0,H.jsxs)(`div`,{className:`board-skeleton__column`,children:[(0,H.jsxs)(`header`,{children:[(0,H.jsx)(q,{width:`72px`}),(0,H.jsx)(q,{width:`16px`})]}),[0,1].map(e=>(0,H.jsxs)(`div`,{className:`board-skeleton__card`,children:[(0,H.jsx)(q,{width:`54px`}),(0,H.jsx)(q,{width:e===0?`88%`:`64%`}),(0,H.jsx)(q,{width:`46%`})]},e))]},e.labelKey))}):null,i||l.error?(0,H.jsx)(`div`,{className:`workbench-state`,children:(0,H.jsx)(vo,{error:l.error??i??Error(e(`error.unknown`)),onRetry:()=>{l.error?l.refetch():s()},retrying:r||l.isFetching})}):null,c&&l.data?(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)(`div`,{className:`kanban-board-scroll`,children:(0,H.jsx)(`div`,{className:`kanban-board`,children:C.map(t=>{let n=D.filter(e=>e.state===t.state);return n.length===0&&!v.showEmptyColumns?null:(0,H.jsx)(va,{count:n.length,label:e(t.labelKey),tone:t.tone,children:n.map(e=>(0,H.jsx)(_c,{item:e,onSelect:m,selected:O?.id===e.id},e.id))},t.labelKey)})})}),w.length===0?(0,H.jsxs)(`div`,{className:`board-filter-empty`,role:`status`,children:[(0,H.jsx)(`span`,{children:(0,H.jsx)(U,{name:`inbox`,size:18})}),(0,H.jsx)(`strong`,{children:e(`empty.${b}.title`)}),(0,H.jsx)(`p`,{children:e(`empty.${b}.description`)})]}):null,(h.length>0||g!==null)&&D.length===0?(0,H.jsxs)(`div`,{className:`board-filter-empty`,role:`status`,children:[(0,H.jsx)(`span`,{children:(0,H.jsx)(U,{name:`filter`,size:18})}),(0,H.jsx)(`strong`,{children:e(`empty.filters.title`)}),(0,H.jsx)(`p`,{children:e(`empty.filters.description`)})]}):null]}):null]}),(0,H.jsx)(Va,{edge:`end`,panel:`inspector`}),S?(0,H.jsx)(Nc,{}):(0,H.jsx)(Pc,{item:O},O?.id??`empty`)]})},Ic=i({component:Is}),Lc=new Set([`needsYou`]),Rc=new Set([`priority-high`,`priority-low`,`priority-medium`,`priority-urgent`,`risk-critical`,`risk-high`,`risk-low`,`risk-medium`,`status-backlog`,`status-blocked`,`status-cancelled`,`status-done`,`status-in_progress`,`status-ready`]),zc=m({getParentRoute:()=>Ic,path:`/`,component:Fc,validateSearch:e=>{let t=e.filters,n=e.summary,r=typeof t==`string`?t.split(`,`).filter(e=>Rc.has(e)).join(`,`):``,i=typeof n==`string`&&Lc.has(n)?n:void 0,a=e.order,o=e.dir,s=qe(a)&&a!==Ge.ordering?a:void 0,c=Je(o)&&o!==Ge.direction?o:void 0,l=e.hideEmpty===!0||e.hideEmpty===`true`||void 0,u=e.scope,d=$e(u)&&u!==`active`?u:void 0;return{...r.length>0?{filters:r}:{},...i===void 0?{}:{summary:i},...s===void 0?{}:{order:s},...c===void 0?{}:{dir:c},...l===void 0?{}:{hideEmpty:l},...d===void 0?{}:{scope:d}}}}),Bc=Ic.addChildren([zc]),Vc=g({routeTree:Bc,defaultPreload:`intent`,scrollRestoration:!0}),Hc=new c({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:!1,staleTime:3e4}}}),Uc=()=>(0,H.jsx)(f,{client:Hc,children:(0,H.jsx)(ja,{children:(0,H.jsx)(os,{children:(0,H.jsx)(p,{router:Vc})})})}),Wc=document.getElementById(`root`);if(!Wc)throw Error(`Loomrail root element is missing`);Oo(Do()),(0,We.createRoot)(Wc).render((0,H.jsx)(A.StrictMode,{children:(0,H.jsx)(Uc,{})}));
5
+ //# sourceMappingURL=index-DjwvCSSY.js.map