dev-process-kit 0.0.17 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/README.md +1 -1
  2. package/dist/chunks/shared-B5lBiq5s.js +1 -0
  3. package/dist/chunks/shared-BDka-8DG.js +3720 -0
  4. package/dist/chunks/shared-BWk3i0ft.js +2774 -0
  5. package/dist/chunks/{shared-XCFMpX43.js → shared-BZK_cqqQ.js} +12 -12
  6. package/dist/chunks/{shared-3uutHtJD.js → shared-Bhrkz9uX.js} +22 -25
  7. package/dist/chunks/{shared-D7TEJdR2.js → shared-BqL8W-G6.js} +1 -1
  8. package/dist/chunks/shared-BqvHpTHr.js +572 -0
  9. package/dist/chunks/shared-CjW1DhGL.js +1 -0
  10. package/dist/chunks/{shared-B_MRyp8K.js → shared-CqjOqXJ3.js} +32 -50
  11. package/dist/chunks/shared-D1W4I3eq.js +4143 -0
  12. package/dist/chunks/{shared-C_Ru__JO.js → shared-D6pr-dx0.js} +1 -1
  13. package/dist/chunks/{shared-DG16QEdg.js → shared-DRzfRsiJ.js} +173 -203
  14. package/dist/chunks/{shared-Bnqz77V3.js → shared-XXW1oBnj.js} +15 -13
  15. package/dist/chunks/{shared-QJPpnJIO.js → shared-gytWODMC.js} +2 -2
  16. package/dist/chunks/shared-k9bZPE_p.js +49 -0
  17. package/dist/components.js +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/templates/delegation-poker.js +1 -1
  20. package/dist/templates/event-storming.js +1 -1
  21. package/dist/templates/example-mapping.js +1 -1
  22. package/dist/templates/plain.js +1 -1
  23. package/dist/templates/prototype.js +1 -1
  24. package/dist/templates/slides.js +1 -1
  25. package/dist/templates/task-board.js +1 -1
  26. package/dist/templates/usm.js +1 -1
  27. package/dist/templates/whiteboard.js +1 -1
  28. package/package.json +1 -2
  29. package/dist/chunks/shared-B9XMvOh-.js +0 -1027
  30. package/dist/chunks/shared-BnGxP2qu.js +0 -2560
  31. package/dist/chunks/shared-CLSKGVCT.js +0 -572
  32. package/dist/chunks/shared-CjhDJ2vV.js +0 -2766
  33. package/dist/chunks/shared-CtHWU02m.js +0 -1
  34. package/dist/chunks/shared-D4K7KsfJ.js +0 -1
  35. package/dist/chunks/shared-DdefS1nG.js +0 -1
  36. package/dist/chunks/shared-DmOHk6B_.js +0 -3457
  37. package/dist/chunks/shared-OIF3QVAa.js +0 -30
  38. package/dist/chunks/shared-ml5h7U5L.js +0 -1
  39. package/dist/templates/grill.js +0 -1
@@ -0,0 +1,4143 @@
1
+ import{ak as k,aO as is,ai as h,af as V,az as $e,b8 as Ve,am as Ee,aj as Se,aN as Ke,b9 as rs,ba as os,aM as ht,ae as ds,aP as ls,aA as ps,aC as A,al as $,ag as U,ah as N,aB as L,p as f,au as gt,av as v,v as J,ay as z,aq as cs,P as us,e as ms,a0 as hs,V as _,R as x,aU as C,a2 as K,a4 as l,a3 as m,a7 as R,a9 as qe,ab as We,G as gs,j as bs,aS as fs,aT as vs,aZ as ys,A as bt,l as j,a5 as B,B as je,aF as X,J as ks,bb as ft,K as Te,bc as ws,aG as xs,b5 as vt,aJ as $s,z as Xe,T as yt,a1 as Es,aa as Ss,a$ as Ze,aK as Ts,bd as As,be as _s}from"./shared-BDka-8DG.js";import{r as fe,D as Is}from"./shared-B5lBiq5s.js";import{L as Ms}from"./shared-CjW1DhGL.js";const Ls=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],Ds=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7"}]],Rs=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9"}]],Os=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z"}],["circle",{cx:"12",cy:"12",r:"10"}]],Ns=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Cs=[["circle",{cx:"12",cy:"12",r:"10"}]],Bs=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Ys=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],Us=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]],zs=[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528"}]],Ps=[["path",{d:"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"}],["path",{d:"M9 18h6"}],["path",{d:"M10 22h4"}]],Fs=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]],Gs=[["circle",{cx:"6",cy:"19",r:"3"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15"}],["circle",{cx:"18",cy:"5",r:"3"}]],Hs=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12 9v4"}],["path",{d:"M12 17h.01"}]],kt=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),Je=(e,t,a)=>{const s=kt(e),n=new Set,i=[...s.get(t)??[]];for(;i.length>0;){const r=i.pop();if(!(r===void 0||n.has(r))){if(r===a)return!0;n.add(r),i.push(...s.get(r)??[])}}return!1},Vs=e=>{const t=kt(e),a=new Set,s=(n,i)=>{const r=i.indexOf(n);if(r>=0)return[...i.slice(r),n];if(a.has(n))return null;for(const o of t.get(n)??[]){const d=s(o,[...i,n]);if(d)return d}return a.add(n),null};for(const n of e){const i=s(n.id,[]);if(i)return i}return null},Ae=["gray","blue","violet","green","amber","accent"],wt=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],_e=["estimates","assignees"],xt=["stories","points","weighted"],$t=k(h(),rs(),Ke(e=>{const[t=0,a=0,s=0]=e.split("-").map(Number),n=new Date(Date.UTC(t,a-1,s));return n.getUTCMonth()===a-1&&n.getUTCDate()===s},"a due date must be a calendar day")),Et=k(Ee(),Ve(),$e(0)),Qe=k(Ee(),Ve(),$e(0)),St=V({milestoneId:A(k(h(),$(1))),statusId:A(k(h(),$(1))),stories:k(Ee(),ps(),$e(0)),points:k(Ee(),Ve(),$e(0))}),Ie=k(h(),is()),Ks=V({id:k(h(),$(1)),name:k(h(),$(1))}),qs=V({id:L,name:k(h(),$(1)),actor:A(h()),steps:U(N(Ks),[])}),Ws=V({id:k(h(),$(1)),name:k(h(),$(1)),timeframe:A(h()),description:A(h()),dueDate:A($t)}),se=Se(Ae),et=Se(wt),tt=k(h(),os(),Ke(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),js=V({url:tt,label:A(k(h(),$(1)))}),Xs=V({id:L,name:k(h(),$(1)),tone:U(se),icon:U(et),weight:A(Et)}),Zs=V({id:L,name:k(h(),$(1)),tone:U(se)}),Tt=k(h(),Ke(e=>e.trim()!=="","a comment needs some text")),Js=V({id:L,body:Tt,createdAt:A(Ie)}),Qs=V({id:L,name:k(h(),$(1)),description:A(h()),activityId:k(h(),$(1)),stepId:k(h(),$(1)),milestoneId:A(h()),statusId:A(h()),links:A(N(js)),labelIds:A(N(k(h(),$(1)))),blockedBy:A(N(k(h(),$(1)))),estimateId:A(k(h(),$(1))),assigneeId:A(k(h(),$(1))),comments:A(N(Js))}),en=V({id:L,name:k(h(),$(1)),tone:U(se)}),At=Se(_e),_t=Se(xt),tn=V({id:L,name:k(h(),$(1)),points:Qe}),an=V({id:L,at:Ie,tally:N(St)}),sn=V({title:A(h()),features:U(N(At),[]),measure:A(_t),doneStatusId:A(k(h(),$(1))),activities:U(N(qs),[]),milestones:U(N(Ws),[]),statuses:U(N(Xs),[]),labels:U(N(Zs),[]),members:U(N(en),[]),estimates:U(N(tn),[]),stories:U(N(Qs),[]),snapshots:U(N(an),[])}),at=e=>Ae[e%Ae.length]??"gray",Me=e=>at(e+1),It=e=>{const t=ds(sn,e);if(new Set(t.features).size!==t.features.length)throw new Error("the base turns a feature on twice");const a=t.statuses[0]?.id,s={...t,stories:a===void 0?t.stories:t.stories.map(c=>c.statusId===void 0?{...c,statusId:a}:c),statuses:t.statuses.map((c,g)=>({...c,tone:c.tone??at(g),icon:c.icon??"progress"})),labels:t.labels.map((c,g)=>({...c,tone:c.tone??Me(g)})),members:t.members.map((c,g)=>({...c,tone:c.tone??Me(g)})),features:_e.filter(c=>t.features.includes(c))},n=new Map;for(const c of s.activities)for(const g of c.steps)n.set(g.id,c.id);const i=new Set(s.milestones.map(c=>c.id)),r=new Set(s.statuses.map(c=>c.id)),o=new Set(s.labels.map(c=>c.id));if(s.doneStatusId!==void 0&&!r.has(s.doneStatusId))throw new Error(`the base references unknown doneStatusId "${s.doneStatusId}"`);const d=new Set,p=(c,g)=>{if(d.has(g))throw new Error(`duplicate id "${g}" in ${c}`);d.add(g)};for(const c of s.activities){p("activities",c.id);for(const g of c.steps)p("steps",g.id)}for(const c of s.milestones)p("milestones",c.id);for(const c of s.statuses)p("statuses",c.id);for(const c of s.labels)p("labels",c.id);for(const c of s.members)p("members",c.id);for(const c of s.estimates)p("estimates",c.id);for(const c of s.snapshots)p("snapshots",c.id);const u=new Set(s.estimates.map(c=>c.id)),y=new Set(s.members.map(c=>c.id));for(const c of s.stories){p("stories",c.id);for(const be of c.comments??[])p("story comments",be.id);const g=n.get(c.stepId);if(g===void 0||g!==c.activityId)throw new Error(`story "${c.id}" references unknown activityId/stepId`);if(c.milestoneId!==void 0&&!i.has(c.milestoneId))throw new Error(`story "${c.id}" references unknown milestoneId "${c.milestoneId}"`);const ae=(c.links??[]).map(be=>be.url);if(new Set(ae).size!==ae.length)throw new Error(`story "${c.id}" links the same URL twice`);if(c.statusId!==void 0&&!r.has(c.statusId))throw new Error(`story "${c.id}" references unknown statusId "${c.statusId}"`);const T=c.labelIds??[];if(new Set(T).size!==T.length)throw new Error(`story "${c.id}" has a label twice`);const xe=T.find(be=>!o.has(be));if(xe!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${xe}"`);if(c.estimateId!==void 0&&!u.has(c.estimateId))throw new Error(`story "${c.id}" references unknown estimateId "${c.estimateId}"`);if(c.assigneeId!==void 0&&!y.has(c.assigneeId))throw new Error(`story "${c.id}" references unknown assigneeId "${c.assigneeId}"`)}for(const c of s.snapshots){const g=Mt(s,c.tally);if(g!==null)throw new Error(`snapshot "${c.id}" ${g}`)}const E=new Set(s.stories.map(c=>c.id));for(const c of s.stories){const g=c.blockedBy??[];if(g.includes(c.id))throw new Error(`story "${c.id}" is blocked by itself`);if(new Set(g).size!==g.length)throw new Error(`story "${c.id}" has a blocker twice`);const ae=g.find(T=>!E.has(T));if(ae!==void 0)throw new Error(`story "${c.id}" references unknown blocker "${ae}"`)}const b=Vs(s.stories);if(b!==null)throw new Error(`stories block one another in a cycle: ${b.join(" \u2192 ")}`);return s},Mt=(e,t)=>{const a=new Set;for(const s of t){if(s.milestoneId!==void 0&&!P(e,s.milestoneId))return`references unknown milestoneId "${s.milestoneId}"`;if(s.statusId!==void 0&&!O(e,s.statusId))return`references unknown statusId "${s.statusId}"`;const n=Le(s);if(a.has(n))return`tallies "${n}" twice`;a.add(n)}return null},Le=e=>`${e.milestoneId??""}/${e.statusId??""}`,Lt=()=>({features:[],activities:[],milestones:[],statuses:[],labels:[],members:[],estimates:[],stories:[],snapshots:[]}),Q=(e,t)=>{if(t!==void 0)return e.activities.find(a=>a.id===t)},ee=(e,t)=>`${e}.${t}`,M=(e,t)=>{if(t===void 0)return;const a=ls(t,2);if(a){const[s,n]=a;if(s===void 0||n===void 0)return;const i=e.activities.find(o=>o.id===s),r=i?.steps.find(o=>o.id===n);return i&&r?{activity:i,step:r}:void 0}if(!t.includes("."))for(const s of e.activities){const n=s.steps.find(i=>i.id===t);if(n)return{activity:s,step:n}}},P=(e,t)=>{if(t!==void 0)return e.milestones.find(a=>a.id===t)},O=(e,t)=>{if(t!==void 0)return e.statuses.find(a=>a.id===t)},W=(e,t)=>{if(t!==void 0)return e.labels.find(a=>a.id===t)},Z=(e,t)=>e.features.includes(t),F=(e,t)=>{if(t!==void 0)return e.members.find(a=>a.id===t)},nn=(e,t)=>F(e,t.assigneeId),G=(e,t)=>{if(t!==void 0)return e.estimates.find(a=>a.id===t)},ve=(e,t)=>{if(t!==void 0)return e.snapshots.find(a=>a.id===t)},rn=(e,t)=>{const a=new Set(t.labelIds??[]);return e.labels.filter(s=>a.has(s.id))},S=(e,t)=>{if(t!==void 0)return e.stories.find(a=>a.id===t)},De=e=>e.activities.flatMap(t=>t.steps.map(a=>({activity:t,step:a}))),on=e=>({...e,stories:ht(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Re=(e,t,a)=>e.stories.filter(s=>s.stepId===t&&(s.milestoneId??void 0)===a),Dt=(e,t,a)=>e.stories.filter(s=>s.activityId===t&&(s.milestoneId??void 0)===a),q=e=>[...e.activities.map(t=>t.id),...e.activities.flatMap(t=>t.steps.map(a=>a.id)),...e.milestones.map(t=>t.id),...e.statuses.map(t=>t.id),...e.labels.map(t=>t.id),...e.members.map(t=>t.id),...e.estimates.map(t=>t.id),...e.stories.map(t=>t.id),...e.stories.flatMap(t=>(t.comments??[]).map(a=>a.id)),...e.snapshots.map(t=>t.id)],Rt=(e,t)=>e.stories.filter(a=>a.stepId===t).length,Ot=v({feature:At,enabled:cs()}),w={SET_ACTIVITY_NAME:f("SET_ACTIVITY_NAME","activity",v({name:k(h(),$(1))})),SET_ACTIVITY_ACTOR:f("SET_ACTIVITY_ACTOR","activity",v({actor:h()})),SET_STEP_NAME:f("SET_STEP_NAME","step",v({name:k(h(),$(1))})),REORDER_STEP:f("REORDER_STEP","step",v({after:z(h())}),{mode:"sequence"}),REORDER_ACTIVITY:f("REORDER_ACTIVITY","activity",v({after:z(h())}),{mode:"sequence"}),ADD_ACTIVITY:f("ADD_ACTIVITY","page",v({id:L,name:k(h(),$(1))}),{dedupeKey:J}),ADD_STEP:f("ADD_STEP","activity",v({id:L,name:k(h(),$(1))}),{dedupeKey:J}),DELETE_ACTIVITY:f("DELETE_ACTIVITY","activity",v({})),DELETE_STEP:f("DELETE_STEP","step",v({})),SET_STORY_NAME:f("SET_STORY_NAME","story",v({name:k(h(),$(1))})),SET_STORY_DESCRIPTION:f("SET_STORY_DESCRIPTION","story",v({description:h()})),SET_STORY_MILESTONE:f("SET_STORY_MILESTONE","story",v({milestoneId:z(h())})),MOVE_STORY:f("MOVE_STORY","story",v({activityId:k(h(),$(1)),stepId:k(h(),$(1)),milestoneId:z(h()),after:z(h())}),{mode:"sequence"}),REORDER_STORY:f("REORDER_STORY","story",v({after:z(h())}),{mode:"sequence"}),ADD_STORY:f("ADD_STORY","step",v({id:L,name:k(h(),$(1)),activityId:k(h(),$(1)),milestoneId:A(h())}),{dedupeKey:J}),DELETE_STORY:f("DELETE_STORY","story",v({})),ADD_STORY_LINK:f("ADD_STORY_LINK","story",v({url:tt,label:A(k(h(),$(1)))})),REMOVE_STORY_LINK:f("REMOVE_STORY_LINK","story",v({url:h()})),ADD_STORY_COMMENT:f("ADD_STORY_COMMENT","story",v({id:L,body:Tt,createdAt:A(Ie)}),{dedupeKey:J}),DELETE_STORY_COMMENT:f("DELETE_STORY_COMMENT","story",v({commentId:k(h(),$(1))})),SET_STORY_STATUS:f("SET_STORY_STATUS","story",v({statusId:k(h(),$(1))})),SET_MILESTONE_NAME:f("SET_MILESTONE_NAME","milestone",v({name:k(h(),$(1))})),ADD_MILESTONE:f("ADD_MILESTONE","page",v({id:L,name:k(h(),$(1))}),{dedupeKey:J}),DELETE_MILESTONE:f("DELETE_MILESTONE","milestone",v({})),REORDER_MILESTONE:f("REORDER_MILESTONE","milestone",v({after:z(h())}),{mode:"sequence"}),SET_MILESTONE_DUE_DATE:f("SET_MILESTONE_DUE_DATE","milestone",v({dueDate:z($t)})),ADD_STATUS:f("ADD_STATUS","page",v({id:L,name:k(h(),$(1)),tone:se,icon:A(et)}),{dedupeKey:J}),SET_STATUS_NAME:f("SET_STATUS_NAME","status",v({name:k(h(),$(1))})),SET_STATUS_TONE:f("SET_STATUS_TONE","status",v({tone:se})),SET_STATUS_ICON:f("SET_STATUS_ICON","status",v({icon:et})),SET_STATUS_WEIGHT:f("SET_STATUS_WEIGHT","status",v({weight:Et})),SET_MEASURE:f("SET_MEASURE","page",v({measure:_t})),SET_DONE_STATUS:f("SET_DONE_STATUS","status",v({})),DELETE_STATUS:f("DELETE_STATUS","status",v({})),REORDER_STATUS:f("REORDER_STATUS","status",v({after:z(h())}),{mode:"sequence"}),ADD_LABEL:f("ADD_LABEL","page",v({id:L,name:k(h(),$(1)),tone:se}),{dedupeKey:J}),SET_LABEL_NAME:f("SET_LABEL_NAME","label",v({name:k(h(),$(1))})),SET_LABEL_TONE:f("SET_LABEL_TONE","label",v({tone:se})),DELETE_LABEL:f("DELETE_LABEL","label",v({})),REORDER_LABEL:f("REORDER_LABEL","label",v({after:z(h())}),{mode:"sequence"}),ADD_STORY_LABEL:f("ADD_STORY_LABEL","story",v({labelId:k(h(),$(1))})),REMOVE_STORY_LABEL:f("REMOVE_STORY_LABEL","story",v({labelId:k(h(),$(1))})),ADD_STORY_BLOCKER:f("ADD_STORY_BLOCKER","story",v({blockerId:k(h(),$(1))})),REMOVE_STORY_BLOCKER:f("REMOVE_STORY_BLOCKER","story",v({blockerId:k(h(),$(1))})),ADD_MEMBER:f("ADD_MEMBER","page",v({id:L,name:k(h(),$(1)),tone:se}),{dedupeKey:J}),SET_MEMBER_NAME:f("SET_MEMBER_NAME","member",v({name:k(h(),$(1))})),SET_MEMBER_TONE:f("SET_MEMBER_TONE","member",v({tone:se})),DELETE_MEMBER:f("DELETE_MEMBER","member",v({})),REORDER_MEMBER:f("REORDER_MEMBER","member",v({after:z(h())}),{mode:"sequence"}),SET_STORY_ASSIGNEE:f("SET_STORY_ASSIGNEE","story",v({memberId:z(k(h(),$(1)))})),ADD_ESTIMATE:f("ADD_ESTIMATE","page",v({id:L,name:k(h(),$(1)),points:Qe}),{dedupeKey:J}),SET_ESTIMATE_NAME:f("SET_ESTIMATE_NAME","estimate",v({name:k(h(),$(1))})),SET_ESTIMATE_POINTS:f("SET_ESTIMATE_POINTS","estimate",v({points:Qe})),DELETE_ESTIMATE:f("DELETE_ESTIMATE","estimate",v({})),REORDER_ESTIMATE:f("REORDER_ESTIMATE","estimate",v({after:z(h())}),{mode:"sequence"}),SET_STORY_ESTIMATE:f("SET_STORY_ESTIMATE","story",v({estimateId:z(k(h(),$(1)))})),RECORD_SNAPSHOT:f("RECORD_SNAPSHOT","page",v({id:L,at:Ie,tally:N(St)}),{dedupeKey:J}),DELETE_SNAPSHOT:f("DELETE_SNAPSHOT","snapshot",v({})),SET_FEATURE:f("SET_FEATURE","page",Ot,{dedupeKey:e=>{const t=gt(Ot,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},dn={setActivityName:(e,t)=>({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:e},payload:{name:t}}),setStepName:(e,t)=>({type:"SET_STEP_NAME",target:{type:"step",id:e},payload:{name:t}})},ue=e=>{const t=e.statuses.findIndex(a=>a.id===e.doneStatusId);return t>=0?t:e.statuses.length-1},Nt=e=>e.statuses[ue(e)],Ct=(e,t)=>{if(t===void 0)return!1;const a=e.statuses.findIndex(s=>s.id===t);return a>=0&&a>=ue(e)},Bt=e=>e.statuses.slice(0,ue(e)+1),ln=(e,t)=>e.milestones.find(a=>a.id===t.milestone)??e.milestones.find(a=>a.dueDate!==void 0)??e.milestones[0],me=e=>Z(e,"estimates")?e.measure??(e.estimates.length>0?"points":"stories"):"stories",Yt=e=>e.weight??1,te=10,Ut=e=>{const{statuses:t}=e,a=ue(e);if(me(e)!=="weighted")return t.map((r,o)=>o<a?1:0);const s=t.slice(0,a).map(Yt),n=Oe(s),i=s.map(r=>n>0?r/n:1/s.length);return t.map((r,o)=>Oe(i.slice(o)))},pn=1,zt=(e,t)=>G(e,t.estimateId)?.points??pn,Pt=e=>{const t=new Map;for(const n of e.stories){const i={...n.milestoneId===void 0?{}:{milestoneId:n.milestoneId},...n.statusId===void 0?{}:{statusId:n.statusId}},r=Le(i),o=t.get(r)??{...i,stories:0,points:0};t.set(r,{...o,stories:o.stories+1,points:o.points+zt(e,n)})}const a=[...e.milestones.map(n=>n.id),void 0],s=e.statuses.length===0?[void 0]:e.statuses.map(n=>n.id);return a.flatMap(n=>s.flatMap(i=>{const r=t.get(Le({milestoneId:n,statusId:i}));return r?[r]:[]}))},cn=(e,t,a)=>{const s=me(e),i=[...ht(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:a,tally:Pt(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:un(e.statuses,d.tally,t,s)})),r=Ut(e),o=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:mn(e.milestones.find(d=>d.id===t)?.dueDate),combined:i.map(d=>o(d,d.values.reduce((p,u,y)=>p+u*(r[y]??0),0))),byStatus:e.statuses.slice(1).map((d,p)=>({status:d,points:i.map(u=>o(u,Oe(u.values.slice(0,p+1))))}))}},un=(e,t,a,s)=>e.map(n=>Oe(t.filter(i=>i.milestoneId===a&&i.statusId===n.id).map(i=>s==="stories"?i.stories:i.points))),mn=e=>{if(e===void 0)return null;const[t=0,a=1,s=1]=e.split("-").map(Number);return new Date(t,a-1,s,23,59,59).getTime()},le=e=>{const t=new Date(e),a=s=>String(s).padStart(2,"0");return`${t.getFullYear()}-${a(t.getMonth()+1)}-${a(t.getDate())} ${a(t.getHours())}:${a(t.getMinutes())}`},Oe=e=>e.reduce((t,a)=>t+a,0),Ft=(e,t)=>{const a=us(w,t);if(a===null)return null;const s=a.target.id;switch(a.type){case"SET_ACTIVITY_NAME":{const{name:n}=a.payload;return e.activities.some(i=>i.id===s)?{...e,activities:e.activities.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_ACTIVITY_ACTOR":{const n=a.payload.actor.trim();return e.activities.some(i=>i.id===s)?{...e,activities:e.activities.map(i=>{if(i.id!==s)return i;const{actor:r,...o}=i;return n===""?o:{...o,actor:n}})}:null}case"SET_STEP_NAME":{const{name:n}=a.payload,i=M(e,s);return i?{...e,activities:e.activities.map(r=>r.id===i.activity.id?{...r,steps:r.steps.map(o=>o.id===i.step.id?{...o,name:n}:o)}:r)}:null}case"REORDER_STEP":{const{after:n}=a.payload,i=M(e,s);if(!i)return null;const r=n===null?null:M(e,n);if(n!==null&&(!r||r.activity.id!==i.activity.id))return null;const o=pe(i.activity.steps,i.step.id,r?.step.id??null);return o===null?null:{...e,activities:e.activities.map(d=>d.id===i.activity.id?{...d,steps:o}:d)}}case"REORDER_ACTIVITY":{const{after:n}=a.payload,i=pe(e.activities,s,n);return i===null?null:{...e,activities:i}}case"ADD_ACTIVITY":{const n=a.payload;return e.activities.some(i=>i.id===n.id)?e:{...e,activities:[...e.activities,{id:n.id,name:n.name,steps:[]}]}}case"ADD_STEP":{const n=a.payload,i=e.activities.find(r=>r.id===s);return i?i.steps.some(r=>r.id===n.id)?e:{...e,activities:e.activities.map(r=>r.id===s?{...r,steps:[...r.steps,{id:n.id,name:n.name}]}:r)}:null}case"DELETE_ACTIVITY":{const n=e.activities.find(r=>r.id===s);if(!n)return null;const i=new Set(n.steps.map(r=>r.id));return nt({...e,activities:e.activities.filter(r=>r.id!==s)},r=>r.activityId===s||i.has(r.stepId))}case"DELETE_STEP":{const n=M(e,s);return n?nt({...e,activities:e.activities.map(i=>i.id===n.activity.id?{...i,steps:i.steps.filter(r=>r.id!==n.step.id)}:i)},i=>i.activityId===n.activity.id&&i.stepId===n.step.id):null}case"SET_STORY_NAME":{const{name:n}=a.payload;return H(e,s,i=>({...i,name:n}))}case"SET_STORY_DESCRIPTION":{const{description:n}=a.payload;return H(e,s,i=>({...i,description:n}))}case"SET_STORY_MILESTONE":{const{milestoneId:n}=a.payload;return n!==null&&!P(e,n)?null:H(e,s,i=>n===null?st(i):{...i,milestoneId:n})}case"MOVE_STORY":{const n=a.payload,i=S(e,s);if(!i)return null;const r=M(e,n.stepId);if(!r||r.activity.id!==n.activityId||n.milestoneId!==null&&!P(e,n.milestoneId))return null;const o=n.milestoneId??void 0,d=o===void 0?{...st(i),activityId:r.activity.id,stepId:r.step.id}:{...i,activityId:r.activity.id,stepId:r.step.id,milestoneId:o};return Vt(e,d,n.after)}case"REORDER_STORY":{const{after:n}=a.payload,i=S(e,s);return i?Vt(e,i,n,!0):null}case"ADD_STORY":{const n=a.payload,i=M(e,t.target.id);if(!i||i.activity.id!==n.activityId||n.milestoneId!==void 0&&!P(e,n.milestoneId))return null;if(e.stories.some(o=>o.id===n.id))return e;const r={id:n.id,name:n.name,activityId:n.activityId,stepId:i.step.id,...n.milestoneId===void 0?{}:{milestoneId:n.milestoneId},...e.statuses[0]===void 0?{}:{statusId:e.statuses[0].id}};return{...e,stories:[...e.stories,r]}}case"DELETE_STORY":return e.stories.some(n=>n.id===s)?nt(e,n=>n.id===s):null;case"ADD_STORY_LINK":{const{url:n,label:i}=a.payload,r=S(e,s);if(!r)return null;if(r.links?.some(d=>d.url===n))return e;const o=i===void 0?{url:n}:{url:n,label:i};return H(e,s,d=>({...d,links:[...d.links??[],o]}))}case"REMOVE_STORY_LINK":{const{url:n}=a.payload;return S(e,s)?.links?.some(r=>r.url===n)?H(e,s,r=>{const o=(r.links??[]).filter(u=>u.url!==n),{links:d,...p}=r;return o.length===0?p:{...p,links:o}}):null}case"ADD_STORY_COMMENT":{const{id:n,body:i,createdAt:r}=a.payload,o=S(e,s);if(!o)return null;if(o.comments?.some(p=>p.id===n))return e;if(q(e).includes(n))return null;const d=r===void 0?{id:n,body:i}:{id:n,body:i,createdAt:r};return H(e,s,p=>({...p,comments:[...p.comments??[],d]}))}case"DELETE_STORY_COMMENT":{const{commentId:n}=a.payload;return S(e,s)?.comments?.some(r=>r.id===n)?H(e,s,r=>{const o=(r.comments??[]).filter(u=>u.id!==n),{comments:d,...p}=r;return o.length===0?p:{...p,comments:o}}):null}case"SET_STORY_STATUS":{const{statusId:n}=a.payload;return O(e,n)?H(e,s,i=>({...i,statusId:n})):null}case"SET_MILESTONE_NAME":{const{name:n}=a.payload;return e.milestones.some(i=>i.id===s)?{...e,milestones:e.milestones.map(i=>i.id===s?{...i,name:n}:i)}:null}case"ADD_MILESTONE":{const n=a.payload;return e.milestones.some(i=>i.id===n.id)?e:{...e,milestones:[...e.milestones,{id:n.id,name:n.name}]}}case"DELETE_MILESTONE":return e.milestones.some(n=>n.id===s)?{...e,milestones:e.milestones.filter(n=>n.id!==s),stories:e.stories.map(n=>n.milestoneId===s?st(n):n),snapshots:it(e,n=>n.milestoneId===s?oe(n,"milestoneId"):n)}:null;case"REORDER_MILESTONE":{const{after:n}=a.payload,i=pe(e.milestones,s,n);return i===null?null:{...e,milestones:i}}case"SET_MILESTONE_DUE_DATE":{const{dueDate:n}=a.payload;return P(e,s)?{...e,milestones:e.milestones.map(i=>i.id!==s?i:n===null?oe(i,"dueDate"):{...i,dueDate:n})}:null}case"ADD_STATUS":{const{id:n,name:i,tone:r,icon:o}=a.payload;if(e.statuses.some(p=>p.id===n))return e;const d=[...e.statuses,{id:n,name:i,tone:r,icon:o??"progress"}];return e.statuses.length===0?{...e,statuses:d,stories:e.stories.map(p=>({...p,statusId:n})),snapshots:it(e,p=>({...p,statusId:n}))}:{...e,statuses:d}}case"SET_STATUS_NAME":{const{name:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_STATUS_TONE":{const{tone:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"SET_STATUS_ICON":{const{icon:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,icon:n}:i)}:null}case"SET_STATUS_WEIGHT":{const{weight:n}=a.payload;return O(e,s)?{...e,statuses:e.statuses.map(i=>i.id===s?{...i,weight:n}:i)}:null}case"SET_MEASURE":{const{measure:n}=a.payload;return me(e)===n?e:{...e,measure:n}}case"SET_DONE_STATUS":return O(e,s)?e.doneStatusId===s?e:{...e,doneStatusId:s}:null;case"DELETE_STATUS":{if(!O(e,s))return null;const n=e.statuses.filter(r=>r.id!==s),i=n[0]?.id;return{...e.doneStatusId===s?oe(e,"doneStatusId"):e,statuses:n,stories:e.stories.map(r=>r.statusId!==s?r:i===void 0?hn(r):{...r,statusId:i}),snapshots:it(e,r=>r.statusId!==s?r:i===void 0?oe(r,"statusId"):{...r,statusId:i})}}case"REORDER_STATUS":{const{after:n}=a.payload,i=pe(e.statuses,s,n);return i===null?null:{...e,statuses:i}}case"ADD_LABEL":{const{id:n,name:i,tone:r}=a.payload;return W(e,n)?e:{...e,labels:[...e.labels,{id:n,name:i,tone:r}]}}case"SET_LABEL_NAME":{const{name:n}=a.payload;return W(e,s)?{...e,labels:e.labels.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_LABEL_TONE":{const{tone:n}=a.payload;return W(e,s)?{...e,labels:e.labels.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"DELETE_LABEL":return W(e,s)?{...e,labels:e.labels.filter(n=>n.id!==s),stories:e.stories.map(n=>n.labelIds?.includes(s)?Gt(n,s):n)}:null;case"REORDER_LABEL":{const{after:n}=a.payload,i=pe(e.labels,s,n);return i===null?null:{...e,labels:i}}case"ADD_STORY_LABEL":{const{labelId:n}=a.payload,i=S(e,s);return!i||!W(e,n)?null:i.labelIds?.includes(n)?e:H(e,s,r=>({...r,labelIds:[...r.labelIds??[],n]}))}case"REMOVE_STORY_LABEL":{const{labelId:n}=a.payload;return S(e,s)?.labelIds?.includes(n)?H(e,s,i=>Gt(i,n)):null}case"ADD_STORY_BLOCKER":{const{blockerId:n}=a.payload,i=S(e,s);return!i||!S(e,n)?null:i.blockedBy?.includes(n)?e:n===s||Je(e.stories,n,s)?null:H(e,s,r=>({...r,blockedBy:[...r.blockedBy??[],n]}))}case"REMOVE_STORY_BLOCKER":{const{blockerId:n}=a.payload;return S(e,s)?.blockedBy?.includes(n)?H(e,s,i=>Ht(i,new Set([n]))):null}case"ADD_MEMBER":{const{id:n,name:i,tone:r}=a.payload;return F(e,n)?e:{...e,members:[...e.members,{id:n,name:i,tone:r}]}}case"SET_MEMBER_NAME":{const{name:n}=a.payload;return F(e,s)?{...e,members:e.members.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_MEMBER_TONE":{const{tone:n}=a.payload;return F(e,s)?{...e,members:e.members.map(i=>i.id===s?{...i,tone:n}:i)}:null}case"DELETE_MEMBER":return F(e,s)?{...e,members:e.members.filter(n=>n.id!==s),stories:e.stories.map(n=>n.assigneeId===s?oe(n,"assigneeId"):n)}:null;case"REORDER_MEMBER":{const{after:n}=a.payload,i=pe(e.members,s,n);return i===null?null:{...e,members:i}}case"SET_STORY_ASSIGNEE":{const{memberId:n}=a.payload;return n!==null&&!F(e,n)?null:H(e,s,i=>n===null?oe(i,"assigneeId"):{...i,assigneeId:n})}case"ADD_ESTIMATE":{const{id:n,name:i,points:r}=a.payload;return G(e,n)?e:{...e,estimates:[...e.estimates,{id:n,name:i,points:r}]}}case"SET_ESTIMATE_NAME":{const{name:n}=a.payload;return G(e,s)?{...e,estimates:e.estimates.map(i=>i.id===s?{...i,name:n}:i)}:null}case"SET_ESTIMATE_POINTS":{const{points:n}=a.payload;return G(e,s)?{...e,estimates:e.estimates.map(i=>i.id===s?{...i,points:n}:i)}:null}case"DELETE_ESTIMATE":return G(e,s)?{...e,estimates:e.estimates.filter(n=>n.id!==s),stories:e.stories.map(n=>n.estimateId===s?oe(n,"estimateId"):n)}:null;case"REORDER_ESTIMATE":{const{after:n}=a.payload,i=pe(e.estimates,s,n);return i===null?null:{...e,estimates:i}}case"SET_STORY_ESTIMATE":{const{estimateId:n}=a.payload;return n!==null&&!G(e,n)?null:H(e,s,i=>n===null?oe(i,"estimateId"):{...i,estimateId:n})}case"RECORD_SNAPSHOT":{const{id:n,at:i,tally:r}=a.payload;return ve(e,n)?e:Mt(e,r)!==null?null:{...e,snapshots:[...e.snapshots,{id:n,at:i,tally:r}]}}case"DELETE_SNAPSHOT":return ve(e,s)?{...e,snapshots:e.snapshots.filter(n=>n.id!==s)}:null;case"SET_FEATURE":{const{feature:n,enabled:i}=a.payload;if(e.features.includes(n)===i)return e;const r=_e.filter(o=>o===n?i:e.features.includes(o));return{...e,features:r}}default:return ms(a)}},H=(e,t,a)=>e.stories.some(s=>s.id===t)?{...e,stories:e.stories.map(s=>s.id===t?a(s):s)}:null,st=e=>{const{milestoneId:t,...a}=e;return a},Gt=(e,t)=>{const{labelIds:a=[],...s}=e,n=a.filter(i=>i!==t);return n.length===0?s:{...s,labelIds:n}},Ht=(e,t)=>{const{blockedBy:a=[],...s}=e,n=a.filter(i=>!t.has(i));return n.length===0?s:{...s,blockedBy:n}},nt=(e,t)=>{const a=new Set(e.stories.filter(t).map(s=>s.id));return{...e,stories:e.stories.filter(s=>!a.has(s.id)).map(s=>s.blockedBy?.some(n=>a.has(n))?Ht(s,a):s)}},oe=(e,t)=>{const{[t]:a,...s}=e;return s},it=(e,t)=>e.snapshots.map(a=>{const s=new Map;for(const n of a.tally.map(t)){const i=Le(n),r=s.get(i);s.set(i,r?{...r,stories:r.stories+n.stories,points:r.points+n.points}:n)}return{...a,tally:[...s.values()]}}),hn=e=>{const{statusId:t,...a}=e;return a},Vt=(e,t,a,s=!1)=>{const n=t.milestoneId??void 0,i=e.stories.filter(b=>b.id!==t.id),r=i.filter(b=>b.stepId===t.stepId&&(b.milestoneId??void 0)===n);if(a!==null){const b=i.find(c=>c.id===a);if(!b||b.stepId!==t.stepId||(b.milestoneId??void 0)!==n)return null;if(s){const c=S(e,t.id);if(!c||b.stepId!==c.stepId||(b.milestoneId??void 0)!==(c.milestoneId??void 0))return null}}const o=a===null?[t,...r]:Kt(r,t,a),d=i.findIndex(b=>b.stepId===t.stepId&&(b.milestoneId??void 0)===n),p=new Set(r.map(b=>b.id)),u=i.filter(b=>!p.has(b.id)),y=d<0?u.length:Math.min(d,u.length),E=[...u.slice(0,y),...o,...u.slice(y)];return{...e,stories:E}},pe=(e,t,a)=>{if(!e.some(i=>i.id===t)||a!==null&&!e.some(i=>i.id===a))return null;if(a===t)return[...e];const s=e.find(i=>i.id===t);if(s===void 0)return null;const n=e.filter(i=>i.id!==t);return Kt(n,s,a)},Kt=(e,t,a)=>{const s=[...e],n=a===null?-1:s.findIndex(i=>i.id===a);return s.splice(n+1,0,t),s},he=hs({en:{renameActivity:"Rename activity",changeActivityActor:"Change whose experience",renameStep:"Rename step",reorderStep:"Reorder step",reorderActivity:"Reorder activity group",addActivity:"Add activity",addStep:"Add step",deleteActivity:"Delete activity",deleteStep:"Delete step",renameStory:"Rename story",updateStoryDescription:"Update story description",changeMilestone:"Change milestone",moveStory:"Move story",reorderStory:"Reorder story",addStory:"Add story",deleteStory:"Delete story",renameMilestone:"Rename milestone",addMilestone:"Add milestone",deleteMilestone:"Delete milestone",reorderMilestone:"Reorder milestone",changeStoryStatus:"Change story status",addStatus:"Add status",renameStatus:"Rename status",changeStatusTone:"Change status color",changeStatusIcon:"Change status icon",addStoryLink:"Link to story",removeStoryLink:"Unlink from story",addStoryComment:"Comment on story",deleteStoryComment:"Delete story comment",deleteStatus:"Delete status",reorderStatus:"Reorder status",addLabel:"Add label",renameLabel:"Rename label",changeLabelTone:"Change label color",deleteLabel:"Delete label",reorderLabel:"Reorder label",addStoryLabel:"Label story",removeStoryLabel:"Unlabel story",addStoryBlocker:"Make story wait on",removeStoryBlocker:"Stop story waiting on",changeMilestoneDueDate:"Change milestone due date",changeStatusWeight:"Change status weight",setDoneStatus:"Change done status",addEstimate:"Add estimate",renameEstimate:"Rename estimate",changeEstimatePoints:"Change estimate points",deleteEstimate:"Delete estimate",reorderEstimate:"Reorder estimate",setStoryEstimate:"Estimate story",recordSnapshot:"Record burndown snapshot",deleteSnapshot:"Delete burndown snapshot",toValue:e=>`\u2192 \u201C${e}\u201D`,fromTo:(e,t)=>`\u201C${e}\u201D \u2192 \u201C${t}\u201D`,added:e=>`+ \u201C${e}\u201D`,removed:e=>`\u2212 \u201C${e}\u201D`,toFront:"\u2192 To the front",afterName:e=>`\u2192 Right after \u201C${e}\u201D`,toUnassigned:"\u2192 Unassigned",toName:e=>`\u2192 ${e}`,snapshotSummary:(e,t)=>`${e} \xB7 ${t===1?"1 story":`${t} stories`}`,activityGroup:"Activity",stepGroup:"Step",storyGroup:"Story",milestoneGroup:"Milestone",statusGroup:"Status",labelGroup:"Label",estimateGroup:"Estimate",snapshotGroup:"Snapshot",mapGroup:"Map",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"Whole map",unassigned:"Unassigned",emptyTitle:"No backbone yet",emptyBody:"Add activities and steps, and the story map appears here.",firstActivityButton:"+ First activity",groupingLabel:"Group by",groupViewTab:"Activity group",groupAxisHeader:"Activity group \u2192",activityAxis:"Activity \u2192",milestoneAxis:"Milestone \u2193",stepNameLabel:"Step name",activityNameLabel:"Activity name",milestoneNameLabel:"Milestone name",addStepAria:"Add a step to this activity",newActivityButton:"+ Activity",newMilestoneButton:"+ Milestone",addCellButton:"+ Add",addStoryCellAria:"Add a story to this cell",storyCount:e=>e===1?"1 story":`${e} stories`,pageTabsLabel:"Page",mapTab:"User Story Mapping",milestonesTab:"Milestones",statusesTab:"Statuses",labelsTab:"Labels",burndownTab:"Burndown",shareOfStories:e=>`${e}% of all stories`,coverageLabel:"Backbone coverage",coverage:(e,t)=>`${e} / ${t} steps`,storiesLabel:"Stories",timeframeUnset:"Timing not set",milestoneNoDescription:"No description yet.",noMilestonesTitle:"No milestones yet",noMilestonesBody:"Add a milestone to slice the map into releases.",commentCountAria:e=>e===1?"1 comment":`${e} comments`,reviewCountAria:e=>e===1?"1 review comment":`${e} review comments`,statusNameLabel:"Status name",statusToneLabel:"Color",toneName:e=>({gray:"Gray",blue:"Blue",violet:"Violet",green:"Green",amber:"Amber",accent:"Orange"})[e],statusIconLabel:"Icon",iconName:e=>({progress:"Progress ring",circle:"Circle",lightbulb:"Light bulb",flag:"Flag",play:"Play",clock:"Clock",eye:"Eye",pause:"Pause",check:"Check",x:"Cross"})[e],statusShare:(e,t)=>`${e===1?"1 story":`${e} stories`} \xB7 ${t}%`,filterLabel:"Filter",filterKeyLabel:e=>({status:"Status",label:"Label",estimate:"Estimate",assignee:"Assignee"})[e],filterAll:"All",noLabel:"No label",unestimatedFilter:"Not estimated",clearFilter:"Clear",showFinished:e=>`Show ${e}`,criticalPathButton:"Critical path",criticalPathHint:"Highlight the chain of waiting stories with the most work left, from their estimates and dependencies. If it slips, the whole map slips.",criticalPathCount:e=>e===1?"1 story":`${e} stories`,progressAria:e=>`Progress: ${e}`,activityActorLabel:"Who",noStatusesTitle:"No statuses yet",noStatusesBody:"Add statuses such as Idea / Ready / Done, and the map colors each story by where it stands.",newStatusButton:"+ Status",moveUpAria:"Move up",moveDownAria:"Move down",deleteStatusAria:"Delete this status",doneStatusMark:"Done",doneStatusAria:e=>`Count ${e} as done`,statusWeightLabel:"Status weights",statusWeightHint:"Counts a story partly done by the statuses it has passed.",weightsNeedStatuses:"With two statuses or more before the done one, a story\u2019s work can be shared out between them.",setMeasure:"Change how the work left is measured",weightLineLabel:(e,t)=>`Between ${e} and ${t}`,weightLineValue:(e,t,a,s)=>`${e} ${t}, ${a} ${s}`,labelNameLabel:"Label name",noLabelsTitle:"No labels yet",noLabelsBody:"You can add labels here.",newLabelButton:"+ Label",deleteLabelAria:"Delete this label",burndownMilestoneLabel:"Milestone",dueDateLabel:"Due",noDueDate:"No due date",measureLabel:"Measure by",measureName:e=>({stories:"Stories",points:"Story points",weighted:"Points \xD7 status"})[e],measureSettingsLabel:"Measure settings",recordSnapshotButton:"Record snapshot",recordSnapshotHint:"Keeps today\u2019s totals per milestone and status, so the lines have a point to start from.",combinedChartTitle:e=>e?"Weighted burndown":"Burndown",combinedChartHint:e=>({stories:"The number of stories not done yet.",points:"The points of the stories not done yet.",weighted:"The points of each story \xD7 the share of it the status weights leave ahead."})[e]+" It reaches 0 when every story is done.",statusChartTitle:e=>`Left to reach \u201C${e}\u201D`,statusChartsLabel:"By status",chartNow:"Now",chartToday:"Today",chartDue:"Due",chartIdeal:"Ideal",chartActual:"Actual",chartAbout:"How this chart is counted",axisDate:(e,t)=>Wt("en-US",e,t),commentDate:e=>qt("en-US",e),chartAria:(e,t)=>`${e}: ${t} now`,chartLatest:e=>`Now ${e}`,chartNeedsSnapshot:"Record a snapshot to draw the line from.",snapshotsLabel:"Snapshots",noSnapshots:"No snapshot yet.",deleteSnapshotAria:e=>`Delete the snapshot of ${e}`,noMilestonesForBurndown:"Add a milestone on the Milestones tab to see its burndown.",unestimatedNote:e=>`${e===1?"1 story has":`${e} stories have`} no estimate and count as 1 point each.`,estimatesLabel:"Estimate scale",estimatesHint:"Name and points of each size a story can be estimated at (1, 2, 3 \u2026 or S, M, L).",estimateNameLabel:"Estimate name",estimatePointsLabel:"Points",newEstimateButton:"+ Estimate",deleteEstimateAria:"Delete this estimate",noEstimates:"No estimate scale yet: the burndown counts stories.",moveDialogLabel:"Step to move to",moveDialogSelectLabel:"Destination",moveConfirm:"Move",moveCancel:"Cancel",storyStatusLabel:"Status",panelLabel:e=>`Story: ${e}`,closePanelAria:"Close",storyTitleLabel:"Title",storyDescriptionLabel:"Description",storyLinksLabel:"Links",storyLabelsLabel:"Labels",storyNoLabels:"No labels yet.",manageLabels:"Manage labels",storyDependenciesLabel:"Dependencies",storyBlockersLabel:"Waits on",storyDependentsLabel:"Holds up",storyNoBlockers:"Nothing to wait on.",storyNoDependents:"No story waits on this one.",addBlockerPlaceholder:"Search for a story to wait on\u2026",addDependentPlaceholder:"Search for a story to wait on this\u2026",noDependencyMatch:"No story matches.",blockerFinished:"Done",removeBlockerAria:e=>`Stop waiting on ${e}`,removeDependentAria:e=>`Stop ${e} waiting on this`,blocksChip:e=>`Blocks ${e}`,waitsChip:e=>`Waits on ${e}`,blocksChipTitle:e=>`${e} ${e===1?"story waits":"stories wait"} on this one`,waitsChipTitle:e=>`Waits on ${e} unfinished ${e===1?"story":"stories"}`,storyEstimateLabel:"Estimate",unestimated:"None",estimateText:(e,t)=>e===String(t)?e:`${e} (${t} pt)`,estimateChipTitle:e=>`Estimate: ${e}`,manageEstimates:"Manage the scale",linkUrlLabel:"URL",addLinkButton:"Add",removeLinkAria:e=>`Remove ${e}`,deleteStoryButton:"Delete story",storyCommentsLabel:"Comments",storyCommentsHint:"Kept on the story as part of the map. To ask the agent for a change, write a review comment.",commentSubmit:"Add comment",deleteStoryCommentAria:"Delete comment",reviewStoryButton:"Review comment",reviewStoryTitle:"Write a review comment on this story, asking the agent for a change",storyStatusAria:e=>`Status: ${e}`,addMember:"Add member",renameMember:"Rename member",changeMemberTone:"Change member color",deleteMember:"Delete member",reorderMember:"Reorder member",setStoryAssignee:"Assign story",memberGroup:"Member",membersTab:"Members",memberNameLabel:"Member name",noMembersTitle:"No members yet",noMembersBody:"Add the people on the team, then assign each story to the one who takes it on.",newMemberButton:"+ Member",deleteMemberAria:"Delete this member",storyAssigneeLabel:"Assignee",noAssignee:"No one",storyNoMembers:"No members yet.",manageMembers:"Manage members",assigneeChipTitle:e=>`Assigned to ${e}`,noAssigneeFilter:"Unassigned",moreTabsLabel:"More tabs",enableFeature:"Turn on feature",disableFeature:"Turn off feature",featureName:e=>({estimates:"Estimates & burndown",assignees:"Members & assignees"})[e],featureHint:e=>({estimates:"An estimate scale for the stories and a burndown per milestone.",assignees:"The members of the team and who each story is assigned to."})[e],featuresNote:"Turning a feature off only hides it: what it holds is kept.",newActivityName:"New activity",newStepName:"New step",newMilestoneName:"New milestone",newStoryName:"New story",newStatusName:"New status",newLabelName:"New label",newMemberName:"New member",newEstimateName:"New"},ja:{renameActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D\u3092\u5909\u66F4",changeActivityActor:"\u4F53\u9A13\u3059\u308B\u4EBA\u3092\u5909\u66F4",renameStep:"\u30B9\u30C6\u30C3\u30D7\u540D\u3092\u5909\u66F4",reorderStep:"\u30B9\u30C6\u30C3\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",reorderActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",addActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u8FFD\u52A0",addStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",deleteActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u524A\u9664",deleteStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u524A\u9664",renameStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u540D\u3092\u5909\u66F4",updateStoryDescription:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u8AAC\u660E\u3092\u66F4\u65B0",changeMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u5909\u66F4",moveStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u79FB\u52D5",reorderStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",deleteStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",renameMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D\u3092\u5909\u66F4",addMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0",deleteMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u524A\u9664",reorderMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u9806\u5E8F\u3092\u5909\u66F4",changeStoryStatus:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0",renameStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D\u3092\u5909\u66F4",changeStatusTone:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u8272\u3092\u5909\u66F4",changeStatusIcon:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30A2\u30A4\u30B3\u30F3\u3092\u5909\u66F4",addStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30EA\u30F3\u30AF\u3092\u8FFD\u52A0",removeStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30EA\u30F3\u30AF\u3092\u524A\u9664",addStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",deleteStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",reorderStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u9806\u5E8F\u3092\u5909\u66F4",addLabel:"\u30E9\u30D9\u30EB\u3092\u8FFD\u52A0",renameLabel:"\u30E9\u30D9\u30EB\u540D\u3092\u5909\u66F4",changeLabelTone:"\u30E9\u30D9\u30EB\u306E\u8272\u3092\u5909\u66F4",deleteLabel:"\u30E9\u30D9\u30EB\u3092\u524A\u9664",reorderLabel:"\u30E9\u30D9\u30EB\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30E9\u30D9\u30EB\u3092\u4ED8\u4E0E",removeStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30E9\u30D9\u30EB\u3092\u5916\u3059",addStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u8FFD\u52A0",removeStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u5916\u3059",changeMilestoneDueDate:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u671F\u65E5\u3092\u5909\u66F4",changeStatusWeight:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F\u3092\u5909\u66F4",setDoneStatus:"\u5B8C\u4E86\u3068\u3059\u308B\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u8FFD\u52A0",renameEstimate:"\u898B\u7A4D\u3082\u308A\u540D\u3092\u5909\u66F4",changeEstimatePoints:"\u898B\u7A4D\u3082\u308A\u306E\u30DD\u30A4\u30F3\u30C8\u3092\u5909\u66F4",deleteEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u524A\u9664",reorderEstimate:"\u898B\u7A4D\u3082\u308A\u306E\u9806\u5E8F\u3092\u5909\u66F4",setStoryEstimate:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u898B\u7A4D\u3082\u308B",recordSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332",deleteSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u524A\u9664",toValue:e=>`\u2192 \u300C${e}\u300D`,fromTo:(e,t)=>`\u300C${e}\u300D\u2192\u300C${t}\u300D`,added:e=>`+ \u300C${e}\u300D`,removed:e=>`\u2212 \u300C${e}\u300D`,toFront:"\u2192 \u5148\u982D\u3078",afterName:e=>`\u2192 \u300C${e}\u300D\u306E\u76F4\u5F8C\u3078`,toUnassigned:"\u2192 \u672A\u5272\u5F53\u3078",toName:e=>`\u2192 ${e}`,snapshotSummary:(e,t)=>`${e} \xB7 ${t} \u30B9\u30C8\u30FC\u30EA\u30FC`,activityGroup:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",stepGroup:"\u30B9\u30C6\u30C3\u30D7",storyGroup:"\u30B9\u30C8\u30FC\u30EA\u30FC",milestoneGroup:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusGroup:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelGroup:"\u30E9\u30D9\u30EB",estimateGroup:"\u898B\u7A4D\u3082\u308A",snapshotGroup:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8",mapGroup:"\u30DE\u30C3\u30D7",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"\u30DE\u30C3\u30D7\u5168\u4F53",unassigned:"\u672A\u5272\u5F53",emptyTitle:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",emptyBody:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3068\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u3053\u3053\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u30DE\u30C3\u30D7\u304C\u73FE\u308C\u307E\u3059\u3002",firstActivityButton:"+ \u6700\u521D\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",groupingLabel:"\u307E\u3068\u3081\u308B\u5358\u4F4D",groupViewTab:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7",groupAxisHeader:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7 \u2192",activityAxis:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 \u2192",milestoneAxis:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3 \u2193",stepNameLabel:"\u30B9\u30C6\u30C3\u30D7\u540D",activityNameLabel:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D",milestoneNameLabel:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D",addStepAria:"\u3053\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306B\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",newActivityButton:"+ \u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newMilestoneButton:"+ \u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",addCellButton:"+ \u8FFD\u52A0",addStoryCellAria:"\u3053\u306E\u30DE\u30B9\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",storyCount:e=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC`,pageTabsLabel:"\u30DA\u30FC\u30B8",mapTab:"User Story Mapping",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusesTab:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelsTab:"\u30E9\u30D9\u30EB",burndownTab:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",shareOfStories:e=>`\u5168\u30B9\u30C8\u30FC\u30EA\u30FC\u306E ${e}%`,coverageLabel:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u306E\u7DB2\u7F85",coverage:(e,t)=>`${e} / ${t} \u30B9\u30C6\u30C3\u30D7`,storiesLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC",timeframeUnset:"\u6642\u671F\u672A\u5B9A",milestoneNoDescription:"\u8AAC\u660E\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",noMilestonesTitle:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noMilestonesBody:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u3092\u30EA\u30EA\u30FC\u30B9\u3054\u3068\u306B\u533A\u5207\u308C\u307E\u3059\u3002",commentCountAria:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,reviewCountAria:e=>`\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,statusNameLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D",statusToneLabel:"\u8272",toneName:e=>({gray:"\u30B0\u30EC\u30FC",blue:"\u9752",violet:"\u7D2B",green:"\u7DD1",amber:"\u9EC4",accent:"\u30AA\u30EC\u30F3\u30B8"})[e],statusIconLabel:"\u30A2\u30A4\u30B3\u30F3",iconName:e=>({progress:"\u9032\u6357\u30EA\u30F3\u30B0",circle:"\u5186",lightbulb:"\u96FB\u7403",flag:"\u65D7",play:"\u518D\u751F",clock:"\u6642\u8A08",eye:"\u76EE",pause:"\u4E00\u6642\u505C\u6B62",check:"\u30C1\u30A7\u30C3\u30AF",x:"\u30D0\u30C4"})[e],statusShare:(e,t)=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC \xB7 ${t}%`,filterLabel:"\u30D5\u30A3\u30EB\u30BF\u30FC",filterKeyLabel:e=>({status:"\u30B9\u30C6\u30FC\u30BF\u30B9",label:"\u30E9\u30D9\u30EB",estimate:"\u898B\u7A4D\u3082\u308A",assignee:"\u62C5\u5F53\u8005"})[e],filterAll:"\u3059\u3079\u3066",noLabel:"\u30E9\u30D9\u30EB\u306A\u3057",unestimatedFilter:"\u898B\u7A4D\u3082\u308A\u306A\u3057",clearFilter:"\u30AF\u30EA\u30A2",showFinished:e=>`${e}\u3082\u8868\u793A`,criticalPathButton:"\u30AF\u30EA\u30C6\u30A3\u30AB\u30EB\u30D1\u30B9",criticalPathHint:"\u898B\u7A4D\u3082\u308A\u3068\u4F9D\u5B58\u95A2\u4FC2\u304B\u3089\u3001\u6B8B\u308A\u306E\u4F5C\u696D\u304C\u6700\u3082\u591A\u3044\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u9023\u306A\u308A\u3092\u5F37\u8ABF\u3057\u307E\u3059\u3002\u3053\u3053\u304C\u9045\u308C\u308B\u3068\u30DE\u30C3\u30D7\u5168\u4F53\u304C\u9045\u308C\u307E\u3059\u3002",criticalPathCount:e=>`${e} \u4EF6`,progressAria:e=>`\u9032\u307F\u5177\u5408: ${e}`,activityActorLabel:"\u8AB0\u306E\u4F53\u9A13",noStatusesTitle:"\u30B9\u30C6\u30FC\u30BF\u30B9\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noStatusesBody:"Idea / Ready / Done \u306E\u3088\u3046\u306A\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u306E\u30AB\u30FC\u30C9\u304C\u9032\u307F\u5177\u5408\u3067\u8272\u5206\u3051\u3055\u308C\u307E\u3059\u3002",newStatusButton:"+ \u30B9\u30C6\u30FC\u30BF\u30B9",moveUpAria:"\u4E0A\u3078\u79FB\u52D5",moveDownAria:"\u4E0B\u3078\u79FB\u52D5",deleteStatusAria:"\u3053\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",doneStatusMark:"\u5B8C\u4E86",doneStatusAria:e=>`${e}\u3092\u5B8C\u4E86\u3068\u3059\u308B`,statusWeightLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F",statusWeightHint:"\u901A\u308A\u904E\u304E\u305F\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u5206\u3060\u3051\u3001\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u9014\u4E2D\u307E\u3067\u9032\u3093\u3060\u3082\u306E\u3068\u3057\u3066\u6570\u3048\u307E\u3059\u3002",weightsNeedStatuses:"\u5B8C\u4E86\u3068\u3059\u308B\u30B9\u30C6\u30FC\u30BF\u30B9\u3088\u308A\u524D\u306B\u30B9\u30C6\u30FC\u30BF\u30B9\u304C 2 \u3064\u4EE5\u4E0A\u3042\u308B\u3068\u3001\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F5C\u696D\u3092\u305D\u306E\u9593\u3067\u5206\u3051\u3089\u308C\u307E\u3059\u3002",setMeasure:"\u6B8B\u308A\u306E\u4F5C\u696D\u91CF\u306E\u8A08\u6E2C\u65B9\u6CD5\u3092\u5909\u66F4",weightLineLabel:(e,t)=>`${e}\u3068${t}\u306E\u5883\u76EE`,weightLineValue:(e,t,a,s)=>`${e} ${t}\u3001${a} ${s}`,labelNameLabel:"\u30E9\u30D9\u30EB\u540D",noLabelsTitle:"\u30E9\u30D9\u30EB\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noLabelsBody:"\u30E9\u30D9\u30EB\u3092\u8FFD\u52A0\u3067\u304D\u307E\u3059\u3002",newLabelButton:"+ \u30E9\u30D9\u30EB",deleteLabelAria:"\u3053\u306E\u30E9\u30D9\u30EB\u3092\u524A\u9664",burndownMilestoneLabel:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",dueDateLabel:"\u671F\u65E5",noDueDate:"\u671F\u65E5\u306A\u3057",measureLabel:"\u8A08\u6E2C\u65B9\u6CD5",measureName:e=>({stories:"\u30B9\u30C8\u30FC\u30EA\u30FC\u6570",points:"\u30B9\u30C8\u30FC\u30EA\u30FC\u30DD\u30A4\u30F3\u30C8",weighted:"\u30DD\u30A4\u30F3\u30C8 \xD7 \u30B9\u30C6\u30FC\u30BF\u30B9"})[e],measureSettingsLabel:"\u8A08\u6E2C\u306E\u8A2D\u5B9A",recordSnapshotButton:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332",recordSnapshotHint:"\u4ECA\u306E\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3 \xD7 \u30B9\u30C6\u30FC\u30BF\u30B9\u3054\u3068\u306E\u96C6\u8A08\u3092\u6B8B\u3057\u3001\u7DDA\u306E\u8D77\u70B9\u306B\u3057\u307E\u3059\u3002",combinedChartTitle:e=>e?"\u91CD\u307F\u4ED8\u304D\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u30C1\u30E3\u30FC\u30C8":"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u30C1\u30E3\u30FC\u30C8",combinedChartHint:e=>({stories:"\u307E\u3060 Done \u3067\u306A\u3044\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u6570\u3002",points:"\u307E\u3060 Done \u3067\u306A\u3044\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30DD\u30A4\u30F3\u30C8\u3002",weighted:"\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30DD\u30A4\u30F3\u30C8 \xD7 \u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F\u3067\u6C7A\u307E\u308B\u6B8B\u308A\u306E\u5272\u5408\u3002"})[e]+"\u3059\u3079\u3066 Done \u306B\u306A\u308B\u3068 0 \u3067\u3059\u3002",statusChartTitle:e=>`\u300C${e}\u300D\u306B\u5C4A\u304F\u307E\u3067\u306E\u6B8B\u308A`,statusChartsLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u5225",chartNow:"\u73FE\u5728",chartToday:"\u4ECA\u65E5",chartDue:"\u671F\u65E5",chartIdeal:"\u7406\u60F3",chartActual:"\u5B9F\u7E3E",chartAbout:"\u3053\u306E\u30C1\u30E3\u30FC\u30C8\u306E\u6570\u3048\u65B9",axisDate:(e,t)=>Wt("ja-JP",e,t),commentDate:e=>qt("ja-JP",e),chartAria:(e,t)=>`${e}: \u73FE\u5728 ${t}`,chartLatest:e=>`\u73FE\u5728 ${e}`,chartNeedsSnapshot:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332\u3059\u308B\u3068\u7DDA\u304C\u5F15\u304B\u308C\u307E\u3059\u3002",snapshotsLabel:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8",noSnapshots:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",deleteSnapshotAria:e=>`${e} \u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u524A\u9664`,noMilestonesForBurndown:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u30BF\u30D6\u3067\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u305D\u306E\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u304C\u898B\u3089\u308C\u307E\u3059\u3002",unestimatedNote:e=>`${e} \u4EF6\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u306F\u898B\u7A4D\u3082\u308A\u304C\u306A\u304F\u30011 \u4EF6 1 \u30DD\u30A4\u30F3\u30C8\u3068\u3057\u3066\u6570\u3048\u3066\u3044\u307E\u3059\u3002`,estimatesLabel:"\u898B\u7A4D\u3082\u308A\u306E\u76EE\u76DB\u308A",estimatesHint:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u4ED8\u3051\u3089\u308C\u308B\u898B\u7A4D\u3082\u308A\u306E\u540D\u524D\u3068\u30DD\u30A4\u30F3\u30C8\uFF081, 2, 3 \u2026 \u3084 S, M, L\uFF09\u3002",estimateNameLabel:"\u898B\u7A4D\u3082\u308A\u540D",estimatePointsLabel:"\u30DD\u30A4\u30F3\u30C8",newEstimateButton:"+ \u898B\u7A4D\u3082\u308A",deleteEstimateAria:"\u3053\u306E\u898B\u7A4D\u3082\u308A\u3092\u524A\u9664",noEstimates:"\u898B\u7A4D\u3082\u308A\u306E\u76EE\u76DB\u308A\u304C\u307E\u3060\u306A\u3044\u305F\u3081\u3001\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306F\u30B9\u30C8\u30FC\u30EA\u30FC\u6570\u3067\u6570\u3048\u307E\u3059\u3002",moveDialogLabel:"\u79FB\u52D5\u5148\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",moveDialogSelectLabel:"\u79FB\u52D5\u5148",moveConfirm:"\u79FB\u52D5\u3059\u308B",moveCancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",storyStatusLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9",panelLabel:e=>`\u30B9\u30C8\u30FC\u30EA\u30FC: ${e}`,closePanelAria:"\u9589\u3058\u308B",storyTitleLabel:"\u30BF\u30A4\u30C8\u30EB",storyDescriptionLabel:"\u8AAC\u660E",storyLinksLabel:"\u30EA\u30F3\u30AF",storyLabelsLabel:"\u30E9\u30D9\u30EB",storyNoLabels:"\u30E9\u30D9\u30EB\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",manageLabels:"\u30E9\u30D9\u30EB\u3092\u7BA1\u7406",storyDependenciesLabel:"\u4F9D\u5B58\u95A2\u4FC2",storyBlockersLabel:"\u4F9D\u5B58\u5148\uFF08\u5148\u306B\u7D42\u3048\u308B\uFF09",storyDependentsLabel:"\u4F9D\u5B58\u5143\uFF08\u3053\u308C\u3092\u5F85\u3064\uFF09",storyNoBlockers:"\u5F85\u3063\u3066\u3044\u308B\u30B9\u30C8\u30FC\u30EA\u30FC\u306F\u3042\u308A\u307E\u305B\u3093\u3002",storyNoDependents:"\u3053\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F85\u3064\u3082\u306E\u306F\u3042\u308A\u307E\u305B\u3093\u3002",addBlockerPlaceholder:"\u4F9D\u5B58\u5148\u3092\u691C\u7D22\u3057\u3066\u8FFD\u52A0\u2026",addDependentPlaceholder:"\u3053\u308C\u3092\u5F85\u3064\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u691C\u7D22\u3057\u3066\u8FFD\u52A0\u2026",noDependencyMatch:"\u4E00\u81F4\u3059\u308B\u30B9\u30C8\u30FC\u30EA\u30FC\u306F\u3042\u308A\u307E\u305B\u3093\u3002",blockerFinished:"\u5B8C\u4E86",removeBlockerAria:e=>`${e} \u3078\u306E\u4F9D\u5B58\u3092\u5916\u3059`,removeDependentAria:e=>`${e} \u304B\u3089\u306E\u4F9D\u5B58\u3092\u5916\u3059`,blocksChip:e=>`${e} \u4EF6\u3092\u30D6\u30ED\u30C3\u30AF`,waitsChip:e=>`${e} \u4EF6\u5F85\u3061`,blocksChipTitle:e=>`${e} \u4EF6\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u304C\u3053\u308C\u3092\u5F85\u3063\u3066\u3044\u307E\u3059`,waitsChipTitle:e=>`\u672A\u5B8C\u4E86\u306E ${e} \u4EF6\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F85\u3063\u3066\u3044\u307E\u3059`,storyEstimateLabel:"\u898B\u7A4D\u3082\u308A",unestimated:"\u306A\u3057",estimateText:(e,t)=>e===String(t)?e:`${e}\uFF08${t} pt\uFF09`,estimateChipTitle:e=>`\u898B\u7A4D\u3082\u308A: ${e}`,manageEstimates:"\u76EE\u76DB\u308A\u3092\u7BA1\u7406",linkUrlLabel:"URL",addLinkButton:"\u8FFD\u52A0",removeLinkAria:e=>`${e} \u3092\u5916\u3059`,deleteStoryButton:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",storyCommentsLabel:"\u30B3\u30E1\u30F3\u30C8",storyCommentsHint:"\u30DE\u30C3\u30D7\u306E\u4E00\u90E8\u3068\u3057\u3066\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u6B8B\u308A\u307E\u3059\u3002Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068\u306F\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u306B\u66F8\u304D\u307E\u3059\u3002",commentSubmit:"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteStoryCommentAria:"\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",reviewStoryButton:"\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8",reviewStoryTitle:"\u3053\u306E\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u3064\u3044\u3066 Agent \u306B\u76F4\u3057\u3066\u307B\u3057\u3044\u3053\u3068\u3092\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8\u306B\u66F8\u304F",storyStatusAria:e=>`\u30B9\u30C6\u30FC\u30BF\u30B9: ${e}`,addMember:"\u30E1\u30F3\u30D0\u30FC\u3092\u8FFD\u52A0",renameMember:"\u30E1\u30F3\u30D0\u30FC\u540D\u3092\u5909\u66F4",changeMemberTone:"\u30E1\u30F3\u30D0\u30FC\u306E\u8272\u3092\u5909\u66F4",deleteMember:"\u30E1\u30F3\u30D0\u30FC\u3092\u524A\u9664",reorderMember:"\u30E1\u30F3\u30D0\u30FC\u306E\u9806\u5E8F\u3092\u5909\u66F4",setStoryAssignee:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u62C5\u5F53\u8005\u3092\u5909\u66F4",memberGroup:"\u30E1\u30F3\u30D0\u30FC",membersTab:"\u30E1\u30F3\u30D0\u30FC",memberNameLabel:"\u30E1\u30F3\u30D0\u30FC\u540D",noMembersTitle:"\u30E1\u30F3\u30D0\u30FC\u304C\u307E\u3060\u3044\u307E\u305B\u3093",noMembersBody:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u8FFD\u52A0\u3057\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F15\u304D\u53D7\u3051\u308B\u4EBA\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002",newMemberButton:"+ \u30E1\u30F3\u30D0\u30FC",deleteMemberAria:"\u3053\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u524A\u9664",storyAssigneeLabel:"\u62C5\u5F53\u8005",noAssignee:"\u306A\u3057",storyNoMembers:"\u30E1\u30F3\u30D0\u30FC\u306F\u307E\u3060\u3044\u307E\u305B\u3093\u3002",manageMembers:"\u30E1\u30F3\u30D0\u30FC\u3092\u7BA1\u7406",assigneeChipTitle:e=>`\u62C5\u5F53: ${e}`,noAssigneeFilter:"\u62C5\u5F53\u8005\u306A\u3057",moreTabsLabel:"\u307B\u304B\u306E\u30BF\u30D6",enableFeature:"\u6A5F\u80FD\u3092\u6709\u52B9\u5316",disableFeature:"\u6A5F\u80FD\u3092\u7121\u52B9\u5316",featureName:e=>({estimates:"\u898B\u7A4D\u3082\u308A\u3068\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",assignees:"\u30E1\u30F3\u30D0\u30FC\u3068\u62C5\u5F53\u8005"})[e],featureHint:e=>({estimates:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u898B\u7A4D\u3082\u308A\u3068\u3001\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3054\u3068\u306E\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u3002",assignees:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3068\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u62C5\u5F53\u8005\u3002"})[e],featuresNote:"\u7121\u52B9\u306B\u3057\u3066\u3082\u96A0\u3059\u3060\u3051\u3067\u3001\u5165\u529B\u3057\u305F\u5185\u5BB9\u306F\u6B8B\u308A\u307E\u3059\u3002",newActivityName:"\u65B0\u3057\u3044\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newStepName:"\u65B0\u3057\u3044\u30B9\u30C6\u30C3\u30D7",newMilestoneName:"\u65B0\u3057\u3044\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",newStoryName:"\u65B0\u3057\u3044\u30B9\u30C8\u30FC\u30EA\u30FC",newStatusName:"\u65B0\u3057\u3044\u30B9\u30C6\u30FC\u30BF\u30B9",newLabelName:"\u65B0\u3057\u3044\u30E9\u30D9\u30EB",newMemberName:"\u65B0\u3057\u3044\u30E1\u30F3\u30D0\u30FC",newEstimateName:"\u65B0\u898F"}}),qt=(e,t)=>new Intl.DateTimeFormat(e,{dateStyle:"medium",timeStyle:"short"}).format(new Date(t)),Wt=(e,t,a)=>{const s=new Date(t);switch(a){case"day":case"week":case"biweek":return`${s.getMonth()+1}/${s.getDate()}`;case"month":case"quarter":return new Intl.DateTimeFormat(e,{month:"short",...s.getMonth()===0?{year:"numeric"}:{}}).format(s);case"year":return new Intl.DateTimeFormat(e,{year:"numeric"}).format(s)}},rt=/^[A-Z][A-Z0-9]+-\d+$/,jt=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},gn=(e,t)=>{if(e!=="github.com")return null;const[a,s,n,i]=t;if(a===void 0)return{kind:"github",text:"GitHub",title:"github.com"};if(s===void 0)return{kind:"github",text:a,title:a};const r=`${a}/${s}`;return(n==="issues"||n==="pull"||n==="discussions")&&i&&/^\d+$/.test(i)?{kind:"github",text:`#${i}`,title:`${r}#${i}`}:n==="commit"&&i?{kind:"github",text:i.slice(0,7),title:`${r}@${i}`}:{kind:"github",text:r,title:r}},bn=(e,t)=>{if(e!=="gitlab.com")return null;const a=t.indexOf("-"),s=(a<0?t:t.slice(0,a)).join("/"),n=a<0?void 0:t[a+1],i=a<0?void 0:t[a+2];if(i&&/^\d+$/.test(i)){if(n==="issues")return{kind:"gitlab",text:`#${i}`,title:`${s}#${i}`};if(n==="merge_requests")return{kind:"gitlab",text:`!${i}`,title:`${s}!${i}`}}return{kind:"gitlab",text:s||"GitLab",title:s||e}},fn=(e,t,a)=>{if(!t.endsWith(".atlassian.net")&&!t.startsWith("jira."))return null;const s=(a[0]==="browse"?a[1]:void 0)??e.searchParams.get("selectedIssue")??a.find(n=>rt.test(n));return s&&rt.test(s)?{kind:"jira",text:s,title:`${t} ${s}`}:{kind:"jira",text:"Jira",title:t}},vn=(e,t)=>{if(e!=="linear.app")return null;const a=t[1]==="issue"?t[2]?.toUpperCase():void 0;return a&&rt.test(a)?{kind:"linear",text:a,title:a}:{kind:"linear",text:"Linear",title:e}},yn=(e,t)=>{if(e!=="figma.com")return null;const[a,,s]=t;if((a==="file"||a==="design"||a==="proto"||a==="board")&&s){const n=jt(s);return{kind:"figma",text:n,title:n}}return{kind:"figma",text:"Figma",title:e}},kn=(e,t)=>{if(e!=="notion.so"&&!e.endsWith(".notion.site"))return null;const s=(t.at(-1)??"").replace(/-?[0-9a-f]{32}$/i,""),n=s===""?"Notion":jt(s);return{kind:"notion",text:n,title:n}},Ne=e=>{let t;try{t=new URL(e)}catch{return{kind:"web",text:e,title:e}}const a=t.hostname.replace(/^www\./,""),s=t.pathname.split("/").filter(n=>n!=="");return gn(a,s)??bn(a,s)??fn(t,a,s)??vn(a,s)??yn(a,s)??kn(a,s)??{kind:"web",text:a,title:e}},wn=["map","milestones","statuses","labels","members","burndown"],xn={members:"assignees",burndown:"estimates"},Xt=e=>wn.filter(t=>{const a=xn[t];return a===void 0||Z(e,a)}),Zt=(e,t)=>Xt(e).find(a=>a===t.tab)??"map",ye=(e,t)=>Ct(e,t.statusId),Jt=(e,t)=>{const a=S(e,t)?.blockedBy??[];return{blockers:a,openBlockers:a.filter(s=>{const n=S(e,s);return n!==void 0&&!ye(e,n)}).length,dependents:e.stories.filter(s=>s.blockedBy?.includes(t)).map(s=>s.id)}},$n=(e,t)=>{const a=new Set(S(e,t)?.blockedBy??[]);return e.stories.filter(s=>s.id!==t&&!a.has(s.id)&&!Je(e.stories,s.id,t))},En=(e,t)=>e.stories.filter(a=>a.id!==t&&!a.blockedBy?.includes(t)&&!Je(e.stories,t,a.id)),Sn=["critical-path"],Ce=e=>Sn.find(t=>t===e.highlight)??null,Tn=(e,t)=>{if(ye(e,t))return 0;const a=me(e)==="stories"?1:zt(e,t),s=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return a*(Ut(e)[s]??1)},An=(e,t)=>Ce(t)==="critical-path"?Qt(e).ids:null,_n=1e-9,Qt=e=>{const t=new Map(e.stories.map(d=>[d.id,Tn(e,d)]).filter(([,d])=>d>0)),a=new Map,s=new Map;for(const d of e.stories)if(t.has(d.id))for(const p of d.blockedBy??[])t.has(p)&&(a.set(d.id,[...a.get(d.id)??[],p]),s.set(p,[...s.get(p)??[],d.id]));const n=ea(t,a),i=ea(t,s),r=[...t].map(([d,p])=>[d,n(d)+i(d)-p]),o=Math.max(0,...r.map(([,d])=>d));return{ids:new Set(r.filter(([,d])=>o-d<_n).map(([d])=>d)),work:o}},ea=(e,t)=>{const a=new Map,s=n=>{const i=a.get(n);if(i!==void 0)return i;const r=(e.get(n)??0)+Math.max(0,...(t.get(n)??[]).map(s));return a.set(n,r),r};return s},ke=["status","label","estimate","assignee"],ne="~none",ie={key:"done",value:"show"},ta=(e,t)=>t[ie.key]===ie.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(a=>Ct(e,a.id)).map(a=>a.id)),ge=(e,t)=>{switch(t){case"status":return e.statuses.map(a=>a.id);case"label":return e.labels.length===0?[]:[...e.labels.map(a=>a.id),ne];case"estimate":return!Z(e,"estimates")||e.estimates.length===0?[]:[...e.estimates.map(a=>a.id),ne];case"assignee":return!Z(e,"assignees")||e.members.length===0?[]:[...e.members.map(a=>a.id),ne]}},Be=(e,t)=>{const a=ta(e,t),s=n=>{const i=t[n];if(i===void 0||i==="")return new Set;const r=new Set(i.split(","));return new Set(ge(e,n).filter(o=>r.has(o)&&!a.has(o)))};return{status:s("status"),label:s("label"),estimate:s("estimate"),assignee:s("assignee"),hiddenStatusIds:a}},aa=(e,t,a)=>{const s=ge(e,t).filter(n=>a.has(n));return s.length===0?null:s.join(",")},In=(e,t)=>{const a=new Set(e);return a.has(t)?a.delete(t):a.add(t),a},Mn=e=>ke.some(t=>e[t].size>0),sa=(e,t)=>{const a=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&Ye(e.status,t.statusId===void 0?[]:[t.statusId])&&Ye(e.label,a.length===0?[ne]:a)&&Ye(e.estimate,[t.estimateId??ne])&&Ye(e.assignee,[t.assigneeId??ne])},Ye=(e,t)=>e.size===0||t.some(a=>e.has(a)),D=(e,t,a)=>{const s=typeof a=="string"?a:"",n=typeof t=="string"?t:void 0;return n===void 0?e.toValue(s):e.fromTo(n,s)},de=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,Ln={SET_ACTIVITY_NAME:(e,t,a)=>({title:e.renameActivity,tone:"update",body:D(e,Q(a,t.target.id)?.name,x(w.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,a)=>{const s=x(w.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:s===""?e.removed(Q(a,t.target.id)?.actor??""):D(e,Q(a,t.target.id)?.actor,s)}},SET_STEP_NAME:(e,t,a)=>({title:e.renameStep,tone:"update",body:D(e,M(a,t.target.id)?.step.name,x(w.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:de(e,x(w.REORDER_STEP,t).after)}),REORDER_ACTIVITY:(e,t,a)=>{const s=x(w.REORDER_ACTIVITY,t).after;return{title:e.reorderActivity,tone:"move",body:de(e,s===null?null:Q(a,s)?.name??s)}},ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(x(w.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(x(w.ADD_STEP,t).name??""))}),DELETE_ACTIVITY:(e,t,a)=>({title:e.deleteActivity,tone:"delete",body:e.removed(Q(a,t.target.id)?.name??t.target.id)}),DELETE_STEP:(e,t,a)=>({title:e.deleteStep,tone:"delete",body:e.removed(M(a,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,a)=>({title:e.renameStory,tone:"update",body:D(e,S(a,t.target.id)?.name,x(w.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(x(w.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,a)=>{const s=x(w.SET_STORY_MILESTONE,t).milestoneId;return{title:e.changeMilestone,tone:"move",body:s==null?e.toUnassigned:e.toName(P(a,String(s))?.name??String(s))}},MOVE_STORY:(e,t,a)=>({title:e.moveStory,tone:"move",body:e.toName(M(a,String(x(w.MOVE_STORY,t).stepId))?.step.name??String(x(w.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:de(e,x(w.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(x(w.ADD_STORY,t).name??""))}),DELETE_STORY:(e,t,a)=>({title:e.deleteStory,tone:"delete",body:e.removed(S(a,t.target.id)?.name??t.target.id)}),SET_MILESTONE_NAME:(e,t,a)=>({title:e.renameMilestone,tone:"update",body:D(e,P(a,t.target.id)?.name,x(w.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(x(w.ADD_MILESTONE,t).name??""))}),DELETE_MILESTONE:(e,t,a)=>({title:e.deleteMilestone,tone:"delete",body:e.removed(P(a,t.target.id)?.name??t.target.id)}),REORDER_MILESTONE:(e,t)=>({title:e.reorderMilestone,tone:"move",body:de(e,x(w.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:a,label:s}=x(w.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(s??Ne(a).title)}},REMOVE_STORY_LINK:(e,t,a)=>{const{url:s}=x(w.REMOVE_STORY_LINK,t),n=S(a,t.target.id)?.links?.find(i=>i.url===s);return{title:e.removeStoryLink,tone:"delete",body:e.removed(n?.label??Ne(s).title)}},ADD_STORY_COMMENT:(e,t)=>({title:e.addStoryComment,tone:"create",body:e.added(x(w.ADD_STORY_COMMENT,t).body)}),DELETE_STORY_COMMENT:(e,t,a)=>{const{commentId:s}=x(w.DELETE_STORY_COMMENT,t),n=S(a,t.target.id)?.comments?.find(i=>i.id===s);return{title:e.deleteStoryComment,tone:"delete",body:e.removed(n?.body??s)}},SET_STORY_STATUS:(e,t,a)=>{const s=x(w.SET_STORY_STATUS,t).statusId;return{title:e.changeStoryStatus,tone:"update",body:e.toName(O(a,s)?.name??s)}},ADD_STATUS:(e,t)=>({title:e.addStatus,tone:"create",body:e.added(x(w.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,a)=>({title:e.renameStatus,tone:"update",body:D(e,O(a,t.target.id)?.name,x(w.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,a)=>{const s=O(a,t.target.id)?.tone,n=x(w.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:D(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},SET_STATUS_ICON:(e,t,a)=>{const s=O(a,t.target.id)?.icon,n=x(w.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:D(e,s===void 0?void 0:e.iconName(s),e.iconName(n))}},DELETE_STATUS:(e,t,a)=>({title:e.deleteStatus,tone:"delete",body:e.removed(O(a,t.target.id)?.name??t.target.id)}),REORDER_STATUS:(e,t)=>({title:e.reorderStatus,tone:"move",body:de(e,x(w.REORDER_STATUS,t).after)}),ADD_LABEL:(e,t)=>({title:e.addLabel,tone:"create",body:e.added(x(w.ADD_LABEL,t).name)}),SET_LABEL_NAME:(e,t,a)=>({title:e.renameLabel,tone:"update",body:D(e,W(a,t.target.id)?.name,x(w.SET_LABEL_NAME,t).name)}),SET_LABEL_TONE:(e,t,a)=>{const s=W(a,t.target.id)?.tone,n=x(w.SET_LABEL_TONE,t).tone;return{title:e.changeLabelTone,tone:"update",body:D(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},DELETE_LABEL:(e,t,a)=>({title:e.deleteLabel,tone:"delete",body:e.removed(W(a,t.target.id)?.name??t.target.id)}),REORDER_LABEL:(e,t)=>({title:e.reorderLabel,tone:"move",body:de(e,x(w.REORDER_LABEL,t).after)}),ADD_STORY_LABEL:(e,t,a)=>{const s=x(w.ADD_STORY_LABEL,t).labelId;return{title:e.addStoryLabel,tone:"create",body:e.added(W(a,s)?.name??s)}},REMOVE_STORY_LABEL:(e,t,a)=>{const s=x(w.REMOVE_STORY_LABEL,t).labelId;return{title:e.removeStoryLabel,tone:"delete",body:e.removed(W(a,s)?.name??s)}},ADD_STORY_BLOCKER:(e,t,a)=>{const s=x(w.ADD_STORY_BLOCKER,t).blockerId;return{title:e.addStoryBlocker,tone:"create",body:e.added(S(a,s)?.name??s)}},REMOVE_STORY_BLOCKER:(e,t,a)=>{const s=x(w.REMOVE_STORY_BLOCKER,t).blockerId;return{title:e.removeStoryBlocker,tone:"delete",body:e.removed(S(a,s)?.name??s)}},SET_MILESTONE_DUE_DATE:(e,t,a)=>{const s=x(w.SET_MILESTONE_DUE_DATE,t).dueDate;return{title:e.changeMilestoneDueDate,tone:s===null?"delete":"update",body:s===null?e.noDueDate:D(e,P(a,t.target.id)?.dueDate,s)}},SET_STATUS_WEIGHT:(e,t,a)=>{const s=O(a,t.target.id)?.weight,n=x(w.SET_STATUS_WEIGHT,t).weight;return{title:e.changeStatusWeight,tone:"update",body:D(e,s===void 0?void 0:String(s),String(n))}},SET_DONE_STATUS:(e,t,a)=>({title:e.setDoneStatus,tone:"update",body:D(e,Nt(a)?.name,O(a,t.target.id)?.name??t.target.id)}),SET_MEASURE:(e,t,a)=>({title:e.setMeasure,tone:"update",body:D(e,e.measureName(me(a)),e.measureName(x(w.SET_MEASURE,t).measure))}),ADD_MEMBER:(e,t)=>({title:e.addMember,tone:"create",body:e.added(x(w.ADD_MEMBER,t).name)}),SET_MEMBER_NAME:(e,t,a)=>({title:e.renameMember,tone:"update",body:D(e,F(a,t.target.id)?.name,x(w.SET_MEMBER_NAME,t).name)}),SET_MEMBER_TONE:(e,t,a)=>{const s=F(a,t.target.id)?.tone,n=x(w.SET_MEMBER_TONE,t).tone;return{title:e.changeMemberTone,tone:"update",body:D(e,s===void 0?void 0:e.toneName(s),e.toneName(n))}},DELETE_MEMBER:(e,t,a)=>({title:e.deleteMember,tone:"delete",body:e.removed(F(a,t.target.id)?.name??t.target.id)}),REORDER_MEMBER:(e,t)=>({title:e.reorderMember,tone:"move",body:de(e,x(w.REORDER_MEMBER,t).after)}),SET_STORY_ASSIGNEE:(e,t,a)=>{const s=x(w.SET_STORY_ASSIGNEE,t).memberId;if(s===null){const n=F(a,S(a,t.target.id)?.assigneeId);return{title:e.setStoryAssignee,tone:"delete",body:e.removed(n?.name??e.noAssignee)}}return{title:e.setStoryAssignee,tone:"update",body:e.toValue(F(a,s)?.name??s)}},ADD_ESTIMATE:(e,t)=>{const{name:a,points:s}=x(w.ADD_ESTIMATE,t);return{title:e.addEstimate,tone:"create",body:e.added(e.estimateText(a,s))}},SET_ESTIMATE_NAME:(e,t,a)=>({title:e.renameEstimate,tone:"update",body:D(e,G(a,t.target.id)?.name,x(w.SET_ESTIMATE_NAME,t).name)}),SET_ESTIMATE_POINTS:(e,t,a)=>{const s=G(a,t.target.id)?.points,n=x(w.SET_ESTIMATE_POINTS,t).points;return{title:e.changeEstimatePoints,tone:"update",body:D(e,s===void 0?void 0:String(s),String(n))}},DELETE_ESTIMATE:(e,t,a)=>({title:e.deleteEstimate,tone:"delete",body:e.removed(G(a,t.target.id)?.name??t.target.id)}),REORDER_ESTIMATE:(e,t)=>({title:e.reorderEstimate,tone:"move",body:de(e,x(w.REORDER_ESTIMATE,t).after)}),SET_STORY_ESTIMATE:(e,t,a)=>{const s=x(w.SET_STORY_ESTIMATE,t).estimateId;return s===null?{title:e.setStoryEstimate,tone:"delete",body:e.toValue(e.unestimated)}:{title:e.setStoryEstimate,tone:"update",body:e.toValue(G(a,s)?.name??s)}},RECORD_SNAPSHOT:(e,t)=>{const{at:a,tally:s}=x(w.RECORD_SNAPSHOT,t),n=s.reduce((i,r)=>i+r.stories,0);return{title:e.recordSnapshot,tone:"create",body:e.snapshotSummary(le(a),n)}},DELETE_SNAPSHOT:(e,t,a)=>{const s=ve(a,t.target.id);return{title:e.deleteSnapshot,tone:"delete",body:e.removed(s?le(s.at):t.target.id)}},SET_FEATURE:(e,t)=>{const{feature:a,enabled:s}=x(w.SET_FEATURE,t);return{title:s?e.enableFeature:e.disableFeature,tone:s?"create":"delete",body:e.featureName(a)}}},na=(e,t,a,s)=>{let n;try{const i=Ln[t.type];n=i?i(e,t,s??a):{title:t.type,tone:"meta"}}catch{n={title:t.type,tone:"meta"}}return{title:n.title,targetLabel:ra(e,a,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},ia=e=>`${e.type} ${_(e.target)} ${JSON.stringify(e.payload)}`,ra=(e,t,a)=>{try{switch(a.type){case"activity":{const s=Q(t,a.id);return s?e.targetLabel(e.activityGroup,s.name):e.targetMissing(e.activityGroup,a.id)}case"step":{const s=M(t,a.id)?.step;return s?e.targetLabel(e.stepGroup,s.name):e.targetMissing(e.stepGroup,a.id)}case"story":{const s=S(t,a.id);return s?e.targetLabel(e.storyGroup,s.name):e.targetMissing(e.storyGroup,a.id)}case"milestone":{const s=P(t,a.id);return s?e.targetLabel(e.milestoneGroup,s.name):e.targetMissing(e.milestoneGroup,a.id)}case"status":{const s=O(t,a.id);return s?e.targetLabel(e.statusGroup,s.name):e.targetMissing(e.statusGroup,a.id)}case"label":{const s=W(t,a.id);return s?e.targetLabel(e.labelGroup,s.name):e.targetMissing(e.labelGroup,a.id)}case"member":{const s=F(t,a.id);return s?e.targetLabel(e.memberGroup,s.name):e.targetMissing(e.memberGroup,a.id)}case"estimate":{const s=G(t,a.id);return s?e.targetLabel(e.estimateGroup,s.name):e.targetMissing(e.estimateGroup,a.id)}case"snapshot":{const s=ve(t,a.id);return s?e.targetLabel(e.snapshotGroup,le(s.at)):e.targetMissing(e.snapshotGroup,a.id)}case"page":return e.targetLabel(e.mapGroup,ot(t));default:return`${a.type} \xB7 ${a.id}`}}catch{return`${a.type} \xB7 ${a.id}`}},oa=(e,t,a)=>{const s=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const n of t.activities){s.push({value:_({type:"activity",id:n.id}),label:n.name,group:e.activityGroup});for(const i of n.steps)s.push({value:_({type:"step",id:ee(n.id,i.id)}),label:`${n.name} \u203A ${i.name}`,group:e.stepGroup})}for(const n of t.milestones)s.push({value:_({type:"milestone",id:n.id}),label:n.name,group:e.milestoneGroup});for(const n of t.statuses)s.push({value:_({type:"status",id:n.id}),label:n.name,group:e.statusGroup});for(const n of t.labels)s.push({value:_({type:"label",id:n.id}),label:n.name,group:e.labelGroup});for(const n of t.members)s.push({value:_({type:"member",id:n.id}),label:n.name,group:e.memberGroup});for(const n of t.estimates)s.push({value:_({type:"estimate",id:n.id}),label:e.estimateText(n.name,n.points),group:e.estimateGroup});for(const n of t.snapshots)s.push({value:_({type:"snapshot",id:n.id}),label:le(n.at),group:e.snapshotGroup});for(const n of t.stories)s.push({value:_({type:"story",id:n.id}),label:n.name,group:e.storyGroup});return s},da=(e,t,a)=>{const s=t.stories.find(n=>n.id===a.story);if(s)return{value:_({type:"story",id:s.id}),label:s.name,group:e.storyGroup};for(const n of t.activities){const i=n.steps.find(r=>r.id===a.step);if(i)return{value:_({type:"step",id:ee(n.id,i.id)}),label:i.name,group:e.stepGroup}}return null},ot=e=>e.title??"User Story Mapping",Dn=(e,t)=>{switch(t.type){case"story":{const a=S(e,t.id);return{tab:null,highlight:null,...Object.fromEntries(ke.map(s=>[s,null])),...a&&ye(e,a)?{[ie.key]:ie.value}:{}}}case"step":case"activity":return{tab:null,view:null};case"milestone":return{tab:"milestones"};case"status":return{tab:"statuses"};case"label":return{tab:"labels"};case"member":return Z(e,"assignees")?{tab:"members"}:null;case"estimate":case"snapshot":return Z(e,"estimates")?{tab:"burndown"}:null;default:return null}},la=(e,t)=>{const a=M(e,t.step),s=a?.activity??Q(e,t.activity)??e.activities[0],n=a?.step??s?.steps.find(u=>u.id===t.step)??s?.steps[0],i=S(e,t.story),r={...t};s?r.activity=s.id:delete r.activity,n?r.step=n.id:delete r.step,i?r.story=i.id:delete r.story,r.view=t.view==="group"?"group":"activity";const o=Be(e,t);for(const u of ke){const y=aa(e,u,o[u]);y===null?delete r[u]:r[u]=y}t[ie.key]!==ie.value&&delete r[ie.key];const d=Zt(e,t);d==="map"?delete r.tab:r.tab=d,P(e,t.milestone)||delete r.milestone;const p=Ce(t);return p===null?delete r.highlight:r.highlight=p,r},pa=(e,t)=>{switch(t.type){case"activity":return Q(e,t.id)!==void 0;case"step":return M(e,t.id)!==void 0;case"story":return S(e,t.id)!==void 0;case"milestone":return P(e,t.id)!==void 0;case"status":return O(e,t.id)!==void 0;case"label":return W(e,t.id)!==void 0;case"member":return F(e,t.id)!==void 0;case"estimate":return G(e,t.id)!==void 0;case"snapshot":return ve(e,t.id)!==void 0;case"page":return!0;default:return!1}},ca=e=>{const t=he(e);return{name:"usm",label:"User Story Mapping",parseBase:It,emptyBase:Lt,actions:w,apply:Ft,canonicalState:on,hasTarget:pa,canonicalTarget:(a,s)=>{if(s.type!=="step")return s;const n=M(a,s.id);return n?{...s,id:ee(n.activity.id,n.step.id)}:s},describe:(a,s,n)=>na(t,a,s,n),serialize:ia,resolveNavigation:la,navigationFor:Dn,commentTargets:(a,s)=>oa(t,a),currentTarget:(a,s)=>da(t,a,s),settings:a=>({items:_e.map(s=>{const n=Z(a,s);return{key:s,label:t.featureName(s),hint:t.featureHint(s),on:n,toggle:{type:"SET_FEATURE",target:{type:"page",id:"usm"},payload:{feature:s,enabled:!n}}}}),note:t.featuresNote}),title:ot}},ua=.5,Rn=({widths:e,available:t,gap:a,moreWidth:s,keep:n})=>{if(e.reduce((u,y)=>u+y,0)+a*Math.max(0,e.length-1)<=t+ua)return[];const r=t-s+ua,o=new Set;let d=0;const p=u=>{d+=(o.size===0?0:a)+(e[u]??0),o.add(u)};n>=0&&n<e.length&&p(n);for(const[u,y]of e.entries())if(!o.has(u)){if(d+(o.size===0?0:a)+y>r)break;p(u)}return e.flatMap((u,y)=>o.has(y)?[]:[y])},ma=new Set;class On{#n;#e;#a=ma;#s=0;#t=null;#i=null;constructor(t,a){this.#n=t,this.#e=a,t.addController(this)}get hidden(){return this.#a}get minimum(){return this.#s}hostConnected(){typeof ResizeObserver>"u"||(this.#t=new ResizeObserver(()=>this.#r()))}hostUpdated(){const t=this.#e.row();t!==this.#i&&(this.#i&&this.#t?.unobserve(this.#i),t&&this.#t?.observe(t),this.#i=t),this.#r()}hostDisconnected(){this.#t?.disconnect(),this.#t=null,this.#i=null}#r(){const t=this.#e.row();if(!t)return;const a=this.#e.items(t),s=a.map(E=>E.getBoundingClientRect().width),n=a.findIndex(E=>this.#e.kept(E)),i=a[0]?.parentElement,r=i?ha(i):0,o=this.#e.more(t),d=o?o.getBoundingClientRect().width+ha(t):0,p=Rn({widths:s,available:t.getBoundingClientRect().width,gap:r,moreWidth:d,keep:n}),u=new Set(p.flatMap(E=>{const b=a[E];return b?[this.#e.keyOf(b)]:[]})),y=Math.ceil((s[n]??0)+d);Nn(u,this.#a)&&y===this.#s||(this.#a=u.size===0?ma:u,this.#s=y,this.#n.requestUpdate())}}const ha=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,Nn=(e,t)=>e.size===t.size&&[...e].every(a=>t.has(a)),dt=1440*60*1e3,Cn=48,Bn=8,Yn=(e,t,a,s)=>{const n={left:s.inset.left,top:s.inset.top,right:s.width-s.inset.right,bottom:s.height-s.inset.bottom},i=[...e.map(g=>g.at),a,...t===null?[]:[t]];let r=Math.min(...i),o=Math.max(...i);o-r<dt&&(r-=dt/2,o+=dt/2);const d=Un(Math.max(0,...e.map(g=>g.value))),p=d.at(-1)??1,u=g=>n.left+(g-r)/(o-r)*(n.right-n.left),y=g=>n.bottom-g/p*(n.bottom-n.top),E=e.map(g=>({x:u(g.at),y:y(g.value),at:g.at,value:g.value,...g.snapshotId===void 0?{}:{snapshotId:g.snapshotId}})),b=E[0],c=Pn(r,o,Math.floor((n.right-n.left)/Cn));return{size:s,plot:n,line:E.map(g=>`${we(g.x)},${we(g.y)}`).join(" "),dots:E,ideal:t===null||!b?null:{x1:b.x,y1:b.y,x2:u(t),y2:y(0)},nowX:u(a),dueX:t===null?null:u(t),yTicks:d.map(g=>({y:y(g),value:g})),valueTop:p,xUnit:c.unit,xTicks:c.ats.map(g=>({x:u(g),at:g})),domain:{start:r,end:o},idealSpan:t===null||!b?null:{at:b.at,value:b.value,due:t}}},Un=e=>{const t=zn(e/4),a=Math.max(1,Math.ceil(e/t));return Array.from({length:a+1},(s,n)=>n*t)},zn=e=>{if(e<=1)return 1;const t=10**Math.floor(Math.log10(e));return([1,2,2.5,5,10].find(s=>Number.isInteger(s*t)&&s*t>=e)??10)*t},we=e=>Math.round(e*100)/100,Pn=(e,t,a)=>{const s=Math.max(1,a),n=["day","week","biweek","month","quarter"];for(const i of n){const r=ga(i,e,t,s);if(r!==null)return{unit:i,ats:r}}return{unit:"year",ats:ga("year",e,t,1/0)??[]}},ga=(e,t,a,s)=>{const n=[];for(let i=Fn(e,t);i<=a;i=Gn(e,i)){if(n.length===s)return null;n.push(i)}return n},Fn=(e,t)=>{const a=new Date(t),[s,n,i]=[a.getFullYear(),a.getMonth(),a.getDate()],r=(o,d)=>o.getTime()>=t?o.getTime():d().getTime();switch(e){case"day":return r(new Date(s,n,i),()=>new Date(s,n,i+1));case"week":case"biweek":{const o=r(new Date(s,n,i),()=>new Date(s,n,i+1)),d=new Date(o),p=(8-d.getDay())%7;return new Date(d.getFullYear(),d.getMonth(),d.getDate()+p).getTime()}case"month":return r(new Date(s,n,1),()=>new Date(s,n+1,1));case"quarter":{const o=n-n%3;return r(new Date(s,o,1),()=>new Date(s,o+3,1))}case"year":return r(new Date(s,0,1),()=>new Date(s+1,0,1))}},Gn=(e,t)=>{const a=new Date(t),[s,n,i]=[a.getFullYear(),a.getMonth(),a.getDate()],r={day:1,week:7,biweek:14},o={month:1,quarter:3,year:12};return e==="day"||e==="week"||e==="biweek"?new Date(s,n,i+r[e]).getTime():new Date(s,n+o[e],1).getTime()},ba=(e,t)=>{const{plot:a,domain:s,dots:n}=e,i=Math.min(a.right,Math.max(a.left,t)),r=n.reduce((E,b)=>E===null||Math.abs(b.x-i)<Math.abs(E.x-i)?b:E,null),o=r!==null&&Math.abs(r.x-i)<=Bn?r:null,d=o?.at??s.start+(i-a.left)/(a.right-a.left)*(s.end-s.start),p=o?.value??Hn(n,d),u=Vn(e,d),y=E=>E===null?null:we(a.bottom-E/e.valueTop*(a.bottom-a.top));return{x:o?.x??i,at:d,actual:p,ideal:u,actualY:y(p),idealY:y(u),dot:o}},Hn=(e,t)=>{const a=e.findIndex(i=>i.at>=t),s=e[a];if(!s)return null;if(s.at===t)return s.value;const n=e[a-1];return n?we(n.value+(s.value-n.value)*(t-n.at)/(s.at-n.at)):null},Vn=(e,t)=>{const a=e.idealSpan;return a===null||t<a.at||t>a.due?null:we(a.value*(a.due-t)/(a.due-a.at))},I=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,fa={circle:C(Cs),lightbulb:C(Ps),flag:C(zs),play:C(Os),clock:C(Bs),eye:C(Us),pause:C(Rs),check:C(Ls),x:C(Ns)},Kn=C(Ds),qn=e=>{if(e>=1)return fa.check();const t=2*Math.PI*4.5;return l`<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true">
2
+ <circle cx="12" cy="12" r="10"></circle>
3
+ ${e>0?R`<circle
4
+ class="si-pie"
5
+ cx="12"
6
+ cy="12"
7
+ r="4.5"
8
+ stroke-dasharray=${`${e*t} ${t}`}
9
+ transform="rotate(-90 12 12)"
10
+ ></circle>`:m}
11
+ </svg>`},re=e=>{const t=e===void 0?Kn():e.icon==="progress"?qn(e.progress??1):fa[e.icon]();return l`<span class="status-icon">${t}</span>`},va=(e,t)=>e.length===0?m:l`<span class="status-bar" role="img" aria-label=${t}>
12
+ ${e.map(a=>l`<span
13
+ class="status-bar-part"
14
+ data-status=${a.id}
15
+ title=${`${a.name}: ${a.count}`}
16
+ style=${`${I(a.tone)};flex-grow:${a.count}`}
17
+ ></span>`)}
18
+ </span>`,lt=K`
19
+ .status-icon {
20
+ display: block;
21
+ flex: none;
22
+ width: 16px;
23
+ height: 16px;
24
+ color: var(--usm-tone);
25
+ }
26
+ .status-icon svg {
27
+ display: block;
28
+ width: 100%;
29
+ height: 100%;
30
+ }
31
+ .status-icon .si-pie {
32
+ stroke-width: 9;
33
+ }
34
+ .status-bar {
35
+ display: flex;
36
+ gap: 2px;
37
+ height: 6px;
38
+ min-width: 0;
39
+ }
40
+ .status-bar-part {
41
+ min-width: 4px;
42
+ border-radius: 3px;
43
+ background: var(--usm-tone);
44
+ }
45
+ .status-bar-part[data-status=''] {
46
+ background: color-mix(in srgb, var(--dpk-ink-faint) 30%, transparent);
47
+ }
48
+ `,Wn=K`
49
+ :host {
50
+ position: relative;
51
+ display: block;
52
+ }
53
+ .bd-plot {
54
+ position: relative;
55
+ border-radius: var(--dpk-radius-sm);
56
+ outline: none;
57
+ }
58
+ .bd-plot:focus-visible {
59
+ box-shadow: var(--dpk-focus);
60
+ }
61
+ .bd-svg {
62
+ display: block;
63
+ width: 100%;
64
+ height: auto;
65
+ overflow: visible;
66
+ touch-action: pan-y;
67
+ }
68
+ .bd-grid-line {
69
+ stroke: var(--dpk-rule);
70
+ stroke-width: 1;
71
+ }
72
+ .bd-grid-line[data-axis='x'] {
73
+ stroke-dasharray: 1 3;
74
+ }
75
+ .bd-tick,
76
+ .bd-marker {
77
+ fill: var(--dpk-ink-faint);
78
+ font-family: var(--dpk-mono);
79
+ font-size: 10px;
80
+ }
81
+ .bd-marker {
82
+ font-weight: 650;
83
+ }
84
+ .bd-marker[data-marker='due'] {
85
+ fill: var(--dpk-amber);
86
+ }
87
+ .bd-marker[data-marker='today'] {
88
+ fill: var(--dpk-blue);
89
+ }
90
+ .bd-due {
91
+ stroke: var(--dpk-amber);
92
+ stroke-width: 1.5;
93
+ }
94
+ .bd-now {
95
+ stroke: var(--dpk-blue);
96
+ stroke-width: 1;
97
+ stroke-dasharray: 2 3;
98
+ }
99
+ .bd-ideal {
100
+ stroke: var(--dpk-ink-faint);
101
+ stroke-width: 1.25;
102
+ stroke-dasharray: 5 4;
103
+ }
104
+ .bd-line {
105
+ fill: none;
106
+ stroke: var(--usm-tone);
107
+ stroke-width: 2.25;
108
+ stroke-linejoin: round;
109
+ stroke-linecap: round;
110
+ }
111
+ .bd-dot {
112
+ fill: var(--dpk-paper-raised);
113
+ stroke: var(--usm-tone);
114
+ stroke-width: 2;
115
+ }
116
+ .bd-dot[data-now] {
117
+ fill: var(--usm-tone);
118
+ }
119
+ .bd-cross {
120
+ stroke: var(--dpk-ink-soft);
121
+ stroke-width: 1;
122
+ pointer-events: none;
123
+ }
124
+ .bd-mark {
125
+ stroke: var(--dpk-paper-raised);
126
+ stroke-width: 2;
127
+ pointer-events: none;
128
+ }
129
+ .bd-mark[data-line='actual'] {
130
+ fill: var(--usm-tone);
131
+ }
132
+ .bd-mark[data-line='ideal'] {
133
+ fill: var(--dpk-ink-faint);
134
+ }
135
+ .bd-tip {
136
+ position: absolute;
137
+ z-index: 1;
138
+ display: grid;
139
+ gap: 3px;
140
+ min-width: 116px;
141
+ padding: 7px 10px;
142
+ border: 1px solid var(--dpk-rule-strong);
143
+ border-radius: var(--dpk-radius-sm);
144
+ background: var(--dpk-paper-raised);
145
+ box-shadow: var(--dpk-shadow-sm);
146
+ font-size: 11.5px;
147
+ pointer-events: none;
148
+ white-space: nowrap;
149
+ transform: translateX(10px);
150
+ }
151
+ .bd-tip[data-side='left'] {
152
+ transform: translateX(calc(-100% - 10px));
153
+ }
154
+ .bd-tip-at {
155
+ color: var(--dpk-ink-soft);
156
+ font-family: var(--dpk-mono);
157
+ font-size: 10.5px;
158
+ }
159
+ .bd-tip-row {
160
+ display: flex;
161
+ align-items: center;
162
+ gap: 6px;
163
+ color: var(--dpk-ink-soft);
164
+ }
165
+ .bd-tip-row b {
166
+ margin-left: auto;
167
+ padding-left: 12px;
168
+ color: var(--dpk-ink);
169
+ font-family: var(--dpk-mono);
170
+ font-variant-numeric: tabular-nums;
171
+ }
172
+ .bd-swatch {
173
+ flex: none;
174
+ width: 12px;
175
+ height: 0;
176
+ border-top: 2.25px solid var(--usm-tone);
177
+ }
178
+ .bd-swatch[data-line='ideal'] {
179
+ border-top: 1.5px dashed var(--dpk-ink-faint);
180
+ }
181
+ `;class jn extends qe{static{this.styles=[Wn]}static{this.properties={points:{attribute:!1},due:{attribute:!1},now:{attribute:!1},size:{attribute:!1},tone:{attribute:!1},label:{attribute:!1},readout:{state:!0}}}#n=new We(this);constructor(){super(),this.points=[],this.due=null,this.now=0,this.size={width:320,height:160,inset:{top:12,right:12,bottom:24,left:32}},this.tone="accent",this.label="",this.readout=null}render(){const t=he(this.#n.locale),a=Yn(this.points,this.due,this.now,this.size),{size:s}=a,n=this.points.at(-1)?.value??0;return l`<div
182
+ class="bd-plot"
183
+ tabindex="0"
184
+ role="img"
185
+ aria-label=${t.chartAria(this.label,n)}
186
+ style=${I(this.tone)}
187
+ @pointermove=${i=>this.#e(a,i)}
188
+ @pointerleave=${()=>this.readout=null}
189
+ @focus=${()=>this.#a(a,a.dots.length-1)}
190
+ @blur=${()=>this.readout=null}
191
+ @keydown=${i=>this.#s(a,i)}
192
+ >
193
+ <svg class="bd-svg" viewBox=${`0 0 ${s.width} ${s.height}`} aria-hidden="true">
194
+ ${Xn(t,a)} ${Zn(a)} ${this.readout?Jn(a,this.readout):m}
195
+ </svg>
196
+ ${this.readout?Qn(t,a,this.readout):m}
197
+ </div>`}#e(t,a){const s=this.renderRoot.querySelector("svg")?.getBoundingClientRect();!s||s.width===0||(this.readout=ba(t,(a.clientX-s.left)/s.width*t.size.width))}#a(t,a){const s=t.dots[a];this.readout=s?ba(t,s.x):null}#s(t,a){const s=t.dots.length-1,n=t.dots.findIndex(r=>r===this.readout?.dot),i=(()=>{switch(a.key){case"ArrowLeft":return Math.max(0,(n===-1?s:n)-1);case"ArrowRight":return Math.min(s,(n===-1?s:n)+1);case"Home":return 0;case"End":return s;default:return null}})();i!==null&&(a.preventDefault(),this.#a(t,i))}}const Xn=(e,t)=>{const{plot:a,size:s}=t,n=s.height-8;return R`
198
+ ${t.yTicks.map(i=>R`<line class="bd-grid-line" x1=${a.left} x2=${a.right} y1=${i.y} y2=${i.y}></line>
199
+ <text class="bd-tick" x=${a.left-6} y=${i.y} text-anchor="end" dominant-baseline="middle">${i.value}</text>`)}
200
+ ${t.xTicks.map(i=>R`<line class="bd-grid-line" data-axis="x" x1=${i.x} x2=${i.x} y1=${a.top} y2=${a.bottom}></line>
201
+ <text class="bd-tick" data-axis="x" x=${i.x} y=${n} text-anchor="middle">${e.axisDate(i.at,t.xUnit)}</text>`)}
202
+ ${t.dueX===null||t.idealSpan===null?m:R`<line class="bd-due" x1=${t.dueX} x2=${t.dueX} y1=${a.top} y2=${a.bottom}></line>
203
+ <text class="bd-marker" data-marker="due" x=${t.dueX-4} y=${a.top+10} text-anchor="end">${`${e.chartDue} ${e.axisDate(t.idealSpan.due,"day")}`}</text>`}
204
+ <line class="bd-now" x1=${t.nowX} x2=${t.nowX} y1=${a.top} y2=${a.bottom}></line>
205
+ <text class="bd-marker" data-marker="today" x=${t.nowX+4} y=${a.top+10} text-anchor="start">${e.chartToday}</text>
206
+ `},Zn=e=>R`
207
+ ${e.ideal?R`<line class="bd-ideal" x1=${e.ideal.x1} y1=${e.ideal.y1} x2=${e.ideal.x2} y2=${e.ideal.y2}></line>`:m}
208
+ <polyline class="bd-line" points=${e.line}></polyline>
209
+ ${e.dots.map(t=>R`<circle class="bd-dot" data-now=${t.snapshotId===void 0?"true":m} cx=${t.x} cy=${t.y} r="3.5"></circle>`)}
210
+ `,Jn=(e,t)=>R`
211
+ <line class="bd-cross" x1=${t.x} x2=${t.x} y1=${e.plot.top} y2=${e.plot.bottom}></line>
212
+ ${t.idealY===null?m:R`<circle class="bd-mark" data-line="ideal" cx=${t.x} cy=${t.idealY} r="3.5"></circle>`}
213
+ ${t.actualY===null?m:R`<circle class="bd-mark" data-line="actual" cx=${t.x} cy=${t.actualY} r="4.5"></circle>`}
214
+ `,Qn=(e,t,a)=>{const{size:s,plot:n}=t,i=a.x>s.width*.6?"left":"right",r=a.dot?a.dot.snapshotId===void 0?`${e.chartNow} \xB7 ${le(a.dot.at)}`:le(a.dot.at):e.axisDate(a.at,"day");return l`<div
215
+ class="bd-tip"
216
+ data-testid="usm-chart-readout"
217
+ data-side=${i}
218
+ style=${`left: ${a.x/s.width*100}%; top: calc(${n.top/s.height*100}% + 20px)`}
219
+ >
220
+ <span class="bd-tip-at">${r}</span>
221
+ ${a.actual===null?m:l`<span class="bd-tip-row" data-line="actual"
222
+ ><span class="bd-swatch" data-line="actual"></span>${e.chartActual}<b>${a.actual}</b></span
223
+ >`}
224
+ ${a.ideal===null?m:l`<span class="bd-tip-row" data-line="ideal"
225
+ ><span class="bd-swatch" data-line="ideal"></span>${e.chartIdeal}<b>${a.ideal}</b></span
226
+ >`}
227
+ </div>`},ei=()=>{customElements.get("dpk-internal-usm-burndown-chart")||customElements.define("dpk-internal-usm-burndown-chart",jn)},ti=new Intl.Segmenter(void 0,{granularity:"grapheme"}),pt=e=>{const[t]=ti.segment(e.trim());return t?t.segment.toUpperCase():"?"},ai={github:R`<path fill-rule="evenodd" d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path>`,gitlab:R`<path d="M8 15 1.2 9.9a.7.7 0 0 1-.25-.78L2.7 2.6a.35.35 0 0 1 .66 0L5.1 7.6h5.8l1.74-5a.35.35 0 0 1 .66 0l1.75 6.52a.7.7 0 0 1-.25.78z"></path>`,jira:R`<path d="M14.6 7.4 8.6 1.4 8 .8 3.5 5.3 1.4 7.4a.85.85 0 0 0 0 1.2l4.1 4.1L8 15.2l4.5-4.5.07-.07 2.03-2.03a.85.85 0 0 0 0-1.2zM8 9.9 5.9 8 8 5.9 10.1 8z"></path>`,linear:R`<path d="M1.2 9.4a6.9 6.9 0 0 0 5.4 5.4zM1 7.3l7.7 7.7a7 7 0 0 0 1.9-.5L1.5 5.4a7 7 0 0 0-.5 1.9zm1.2-3.1 9.6 9.6a7 7 0 0 0 1.2-1.1L3.3 3a7 7 0 0 0-1.1 1.2zM4.3 2.3a7 7 0 1 1 9.4 9.4z"></path>`,figma:R`<path d="M5.5 1h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm2.3 0h2.3a2.3 2.3 0 1 1 0 4.6H7.8zm2.3 4.6a2.3 2.3 0 1 1 0 4.6 2.3 2.3 0 0 1 0-4.6zM5.5 5.6h2.3v4.6H5.5a2.3 2.3 0 1 1 0-4.6zm0 4.6h2.3v2.3a2.3 2.3 0 1 1-2.3-2.3z"></path>`,notion:R`<path fill-rule="evenodd" d="M2.5 1.6 11 1c1 0 1.3.1 2 .6l2.1 1.5c.4.3.5.4.5.7v9.6c0 .7-.3 1.1-1.1 1.2l-9.4.6c-.6 0-.9-.1-1.2-.5L1.9 12c-.3-.5-.5-.8-.5-1.3V2.8c0-.6.3-1.1 1.1-1.2zM5 4.4v8.9l8.6-.5V4zm1 1.2 2.9-.2 3 4.7V5.6l-.8-.1v-.5l2-.1v.6l-.6.1v6.1l-.9.1-3.5-5.4v4.9l.8.2v.5l-2.3.1v-.5l.6-.2V6.4l-.8-.1z"></path>`},ya=e=>e==="web"?gs():l`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${ai[e]}</svg>`,ka=K`
228
+ .link-mark {
229
+ fill: currentColor;
230
+ }
231
+ .link-chip {
232
+ display: inline-flex;
233
+ align-items: center;
234
+ gap: 5px;
235
+ min-width: 0;
236
+ max-width: 100%;
237
+ padding: 1px 8px 1px 6px;
238
+ border: 1px solid var(--dpk-rule-strong);
239
+ border-radius: 999px;
240
+ background: var(--dpk-paper-raised);
241
+ color: var(--dpk-ink-soft);
242
+ font-family: var(--dpk-mono);
243
+ font-size: 10.5px;
244
+ font-weight: 600;
245
+ line-height: 18px;
246
+ text-decoration: none;
247
+ transition:
248
+ color 140ms var(--dpk-ease),
249
+ border-color 140ms var(--dpk-ease);
250
+ }
251
+ .link-chip:hover {
252
+ border-color: var(--dpk-ink-faint);
253
+ color: var(--dpk-ink);
254
+ }
255
+ .link-chip:focus-visible {
256
+ outline: none;
257
+ box-shadow: var(--dpk-focus);
258
+ }
259
+ .link-chip svg {
260
+ flex: none;
261
+ width: 12px;
262
+ height: 12px;
263
+ }
264
+ .link-chip span {
265
+ overflow: hidden;
266
+ text-overflow: ellipsis;
267
+ white-space: nowrap;
268
+ }
269
+ `,ce=e=>{const t=ue(e);return e.statuses.map((a,s)=>({id:a.id,name:a.name,tone:a.tone,icon:a.icon,progress:wa(s,t)}))},wa=(e,t)=>t<=0?1:Math.min(1,e/t),xa=(e,t)=>e.find(a=>a.id===t.statusId),$a=(e,t)=>ce(e).map(a=>({...a,count:t.filter(s=>s.statusId===a.id).length})).filter(a=>a.count>0),si=C(Fs),ni=C(Ms),ii=3,ri=K`
270
+ /*
271
+ * The card wears its status's color the way a modern board does: a flat,
272
+ * barely tinted face and a hairline edge in that hue, with a neutral, soft
273
+ * elevation. Tints are mixed in OKLab so every hue stays clean instead of
274
+ * turning muddy.
275
+ */
276
+ :host {
277
+ --card-tone: var(--usm-tone, var(--dpk-ink-faint));
278
+ position: relative;
279
+ display: grid;
280
+ gap: 8px;
281
+ padding: 12px 13px;
282
+ border: 1px solid color-mix(in oklab, var(--card-tone) 24%, var(--dpk-rule));
283
+ border-radius: 12px;
284
+ background: color-mix(in oklab, var(--card-tone) 6%, var(--dpk-paper-raised));
285
+ box-shadow:
286
+ 0 1px 1px var(--dpk-shade-1),
287
+ 0 2px 6px -3px var(--dpk-shade-2);
288
+ cursor: pointer;
289
+ transition:
290
+ box-shadow 180ms var(--dpk-ease),
291
+ transform 180ms var(--dpk-ease),
292
+ border-color 180ms var(--dpk-ease),
293
+ opacity 180ms var(--dpk-ease),
294
+ filter 180ms var(--dpk-ease);
295
+ }
296
+
297
+ :host(:hover) {
298
+ border-color: color-mix(in oklab, var(--card-tone) 45%, var(--dpk-rule));
299
+ box-shadow:
300
+ 0 1px 2px var(--dpk-shade-1),
301
+ 0 8px 20px -10px var(--dpk-shade-3);
302
+ transform: translateY(-1px);
303
+ }
304
+
305
+ :host([focused]) {
306
+ border-color: var(--dpk-blue);
307
+ box-shadow:
308
+ 0 0 0 3px color-mix(in oklab, var(--dpk-blue) 20%, transparent),
309
+ 0 8px 20px -10px var(--dpk-shade-3);
310
+ }
311
+
312
+ /* The card is the button that opens its story; the keyboard ring is the focused look. */
313
+ :host(:focus-visible) {
314
+ outline: none;
315
+ border-color: var(--dpk-blue);
316
+ box-shadow: var(--dpk-focus);
317
+ }
318
+
319
+ /* A highlight on the map (the critical path): the cards on it stand out, the rest step back. */
320
+ :host([data-highlight='on']) {
321
+ border-color: color-mix(in oklab, var(--dpk-accent) 70%, var(--dpk-rule));
322
+ box-shadow:
323
+ 0 0 0 2px color-mix(in oklab, var(--dpk-accent) 28%, transparent),
324
+ 0 8px 20px -10px var(--dpk-shade-3);
325
+ }
326
+
327
+ :host([data-highlight='dimmed']) {
328
+ opacity: 0.4;
329
+ filter: saturate(0.4);
330
+ }
331
+
332
+ :host([data-highlight='dimmed']:hover),
333
+ :host([data-highlight='dimmed']:focus-visible),
334
+ :host([data-highlight='dimmed'][focused]) {
335
+ opacity: 0.85;
336
+ filter: none;
337
+ }
338
+
339
+ :host([dragging]) {
340
+ opacity: 0.45;
341
+ transform: none;
342
+ }
343
+
344
+ .card-head {
345
+ display: flex;
346
+ align-items: flex-start;
347
+ gap: 8px;
348
+ min-width: 0;
349
+ }
350
+
351
+ /* The estimate and the assignee sit at the end of the head, small, like a ticket's size and owner. */
352
+ .card-meta {
353
+ flex: none;
354
+ display: inline-flex;
355
+ align-items: center;
356
+ gap: 4px;
357
+ margin-left: auto;
358
+ }
359
+ .estimate-chip {
360
+ padding: 0 6px;
361
+ border: 1px solid color-mix(in oklab, var(--card-tone) 30%, var(--dpk-rule-strong));
362
+ border-radius: 5px;
363
+ background: var(--dpk-paper-raised);
364
+ color: var(--dpk-ink-soft);
365
+ font-family: var(--dpk-mono);
366
+ font-size: 10.5px;
367
+ font-weight: 650;
368
+ line-height: 17px;
369
+ font-variant-numeric: tabular-nums;
370
+ white-space: nowrap;
371
+ }
372
+
373
+ .assignee-avatar {
374
+ display: inline-grid;
375
+ place-items: center;
376
+ width: 18px;
377
+ height: 18px;
378
+ border-radius: 50%;
379
+ background: var(--usm-tone);
380
+ color: var(--dpk-paper-raised);
381
+ font-size: 10px;
382
+ font-weight: 700;
383
+ line-height: 1;
384
+ }
385
+
386
+ .card-status {
387
+ flex: none;
388
+ display: inline-flex;
389
+ margin-top: 1.5px;
390
+ }
391
+
392
+ .card-name {
393
+ flex: 1 1 auto;
394
+ min-width: 0;
395
+ color: var(--dpk-ink);
396
+ font-size: 13px;
397
+ font-weight: 600;
398
+ letter-spacing: -0.01em;
399
+ line-height: 1.45;
400
+ overflow-wrap: anywhere;
401
+ }
402
+
403
+ /* The description, rendered from Markdown and cut after three lines. */
404
+ .card-text {
405
+ display: -webkit-box;
406
+ -webkit-box-orient: vertical;
407
+ -webkit-line-clamp: 3;
408
+ overflow: hidden;
409
+ color: var(--dpk-ink-soft);
410
+ font-size: 12px;
411
+ line-height: 1.55;
412
+ overflow-wrap: anywhere;
413
+ }
414
+
415
+ .card-text > * {
416
+ margin: 0;
417
+ }
418
+
419
+ /* A heading in the description reads as a line of the preview, not a title over the card. */
420
+ .card-text :is(h1, h2, h3, h4, h5, h6) {
421
+ font-size: inherit;
422
+ font-weight: 650;
423
+ }
424
+
425
+ .card-text ul,
426
+ .card-text ol {
427
+ padding-left: 1.2em;
428
+ }
429
+
430
+ .card-text code {
431
+ padding: 0 3px;
432
+ border-radius: 4px;
433
+ background: var(--dpk-paper-inset);
434
+ font-family: var(--dpk-mono);
435
+ font-size: 0.92em;
436
+ }
437
+
438
+ .card-text a {
439
+ color: var(--dpk-blue);
440
+ }
441
+
442
+ /* Where the story sits and what was said about it. */
443
+ .card-foot {
444
+ display: flex;
445
+ align-items: center;
446
+ gap: 6px;
447
+ min-width: 0;
448
+ }
449
+
450
+ .card-chip {
451
+ display: inline-flex;
452
+ align-items: center;
453
+ gap: 4px;
454
+ min-width: 0;
455
+ padding: 1px 7px;
456
+ border-radius: 6px;
457
+ background: color-mix(in oklab, var(--card-tone) 10%, var(--dpk-paper-sunken));
458
+ color: var(--dpk-ink-soft);
459
+ font-size: 10.5px;
460
+ font-weight: 600;
461
+ line-height: 18px;
462
+ }
463
+
464
+ .card-chip span {
465
+ overflow: hidden;
466
+ text-overflow: ellipsis;
467
+ white-space: nowrap;
468
+ }
469
+
470
+ .card-chip[data-kind='comments'],
471
+ .card-chip[data-kind='review'] {
472
+ background: transparent;
473
+ color: var(--dpk-ink-faint);
474
+ font-family: var(--dpk-mono);
475
+ font-variant-numeric: tabular-nums;
476
+ }
477
+
478
+ /* The counts sit at the right end of the foot, the kept comments first. */
479
+ .card-chip[data-kind='comments'],
480
+ .card-chip[data-kind='review']:first-child,
481
+ .card-chip[data-kind='step'] + .card-chip[data-kind='review'] {
482
+ margin-left: auto;
483
+ }
484
+
485
+ /* Review comments ask the agent for a change: they take the accent, like the header's toggle. */
486
+ .card-chip[data-kind='review'] {
487
+ color: var(--dpk-accent);
488
+ }
489
+
490
+ .card-chip svg {
491
+ flex: none;
492
+ width: 12px;
493
+ height: 12px;
494
+ }
495
+
496
+ /* The labels the story carries, each in its own color. */
497
+ .card-labels {
498
+ display: flex;
499
+ flex-wrap: wrap;
500
+ gap: 4px;
501
+ min-width: 0;
502
+ }
503
+
504
+ .label-chip {
505
+ display: inline-flex;
506
+ align-items: center;
507
+ gap: 5px;
508
+ min-width: 0;
509
+ max-width: 100%;
510
+ padding: 0 7px;
511
+ border: 1px solid color-mix(in oklab, var(--usm-tone) 35%, transparent);
512
+ border-radius: 999px;
513
+ background: color-mix(in oklab, var(--usm-tone) 12%, var(--dpk-paper-raised));
514
+ color: var(--dpk-ink);
515
+ font-size: 10.5px;
516
+ font-weight: 600;
517
+ line-height: 17px;
518
+ overflow: hidden;
519
+ text-overflow: ellipsis;
520
+ white-space: nowrap;
521
+ }
522
+
523
+ .label-chip::before {
524
+ content: '';
525
+ flex: none;
526
+ width: 6px;
527
+ height: 6px;
528
+ border-radius: 50%;
529
+ background: var(--usm-tone);
530
+ }
531
+
532
+ /*
533
+ * Where the story sits among the others. A story that holds others up is
534
+ * work to pull forward (a spike), so its chip is the loud one; one still
535
+ * waiting reads quieter and goes away once its blockers are done.
536
+ */
537
+ .card-deps {
538
+ display: flex;
539
+ flex-wrap: wrap;
540
+ gap: 4px;
541
+ }
542
+
543
+ .dep-chip {
544
+ display: inline-flex;
545
+ align-items: center;
546
+ gap: 4px;
547
+ padding: 0 7px;
548
+ border-radius: 6px;
549
+ font-size: 10.5px;
550
+ font-weight: 650;
551
+ line-height: 18px;
552
+ white-space: nowrap;
553
+ }
554
+
555
+ .dep-chip svg {
556
+ flex: none;
557
+ width: 12px;
558
+ height: 12px;
559
+ }
560
+
561
+ .dep-chip[data-kind='blocks'] {
562
+ background: var(--dpk-amber);
563
+ color: var(--dpk-paper-raised);
564
+ }
565
+
566
+ .dep-chip[data-kind='waits'] {
567
+ border: 1px dashed color-mix(in oklab, var(--dpk-ink-faint) 60%, transparent);
568
+ color: var(--dpk-ink-soft);
569
+ }
570
+
571
+ /* With a story open, the cards it waits on and the cards waiting on it stand out. */
572
+ :host([data-relation]) {
573
+ outline: 2px dashed var(--relation-tone);
574
+ outline-offset: 2px;
575
+ }
576
+
577
+ :host([data-relation='blocker']) {
578
+ --relation-tone: var(--dpk-amber);
579
+ }
580
+
581
+ :host([data-relation='dependent']) {
582
+ --relation-tone: var(--dpk-violet);
583
+ }
584
+
585
+ .card-links {
586
+ display: flex;
587
+ flex-wrap: wrap;
588
+ gap: 4px;
589
+ min-width: 0;
590
+ }
591
+
592
+ .card-links .link-chip {
593
+ border-color: color-mix(in oklab, var(--card-tone) 16%, var(--dpk-rule));
594
+ background: var(--dpk-paper-raised);
595
+ }
596
+ `;class oi extends qe{static{this.styles=[bs,lt,ka,ri]}static{this.properties={story:{attribute:!1},stepName:{attribute:!1},statuses:{attribute:!1},labels:{attribute:!1},reviewCount:{type:Number},estimate:{attribute:!1},assignee:{attribute:!1},blocks:{type:Number},waits:{type:Number},focused:{type:Boolean,reflect:!0},dragging:{type:Boolean,reflect:!0}}}#n=new We(this);constructor(){super(),this.story=null,this.stepName="",this.statuses=[],this.labels=[],this.reviewCount=0,this.estimate=null,this.assignee=null,this.blocks=0,this.waits=0,this.focused=!1,this.dragging=!1}render(){const t=this.story;if(!t)return m;const a=he(this.#n.locale),s=t.comments?.length??0,n=this.stepName!==""||s>0||this.reviewCount>0;return l`
597
+ <div class="card-head">
598
+ ${this.statuses.length===0?m:this.#e(a,t)}
599
+ <div class="card-name"><span>${t.name}</span></div>
600
+ ${this.estimate||this.assignee?this.#a(a):m}
601
+ </div>
602
+ ${t.description?l`<div class="card-text" @click=${li}>${fs(vs(t.description))}</div>`:m}
603
+ ${this.blocks>0||this.waits>0?this.#s(a):m}
604
+ ${this.labels.length>0?di(this.labels):m}
605
+ ${t.links&&t.links.length>0?this.#t(t.links):m}
606
+ ${n?l`<div class="card-foot">
607
+ ${this.stepName===""?m:l`<span class="card-chip" data-kind="step"><span>${this.stepName}</span></span>`}
608
+ ${s>0?l`<span class="card-chip" data-kind="comments" aria-label=${a.commentCountAria(s)}>
609
+ ${ys()}<span>${s}</span>
610
+ </span>`:m}
611
+ ${this.reviewCount>0?l`<span class="card-chip" data-kind="review" aria-label=${a.reviewCountAria(this.reviewCount)}>
612
+ ${bt()}<span>${this.reviewCount}</span>
613
+ </span>`:m}
614
+ </div>`:m}
615
+ `}#e(t,a){const s=xa(this.statuses,a);if(!s)return m;const n=s.name;return l`<span class="card-status" role="img" aria-label=${t.storyStatusAria(n)} title=${n}>
616
+ ${re(s)}
617
+ </span>`}#a(t){const{estimate:a,assignee:s}=this;return l`<span class="card-meta">
618
+ ${a?l`<span
619
+ class="estimate-chip"
620
+ title=${t.estimateChipTitle(t.estimateText(a.name,a.points))}
621
+ >${a.name}</span
622
+ >`:m}
623
+ ${s?l`<span
624
+ class="assignee-avatar"
625
+ style=${I(s.tone)}
626
+ title=${t.assigneeChipTitle(s.name)}
627
+ >${pt(s.name)}</span
628
+ >`:m}
629
+ </span>`}#s(t){return l`<div class="card-deps">
630
+ ${this.blocks>0?l`<span class="dep-chip" data-kind="blocks" title=${t.blocksChipTitle(this.blocks)}
631
+ >${si()}${t.blocksChip(this.blocks)}</span
632
+ >`:m}
633
+ ${this.waits>0?l`<span class="dep-chip" data-kind="waits" title=${t.waitsChipTitle(this.waits)}
634
+ >${ni()}${t.waitsChip(this.waits)}</span
635
+ >`:m}
636
+ </div>`}#t(t){const a=t.slice(0,ii);return l`<div class="card-links">
637
+ ${a.map(s=>{const n=Ne(s.url);return l`<a
638
+ class="link-chip"
639
+ data-kind=${n.kind}
640
+ href=${s.url}
641
+ target="_blank"
642
+ rel="noopener noreferrer"
643
+ title=${s.label??n.title}
644
+ draggable="false"
645
+ tabindex="-1"
646
+ @click=${i=>i.stopPropagation()}
647
+ >${ya(n.kind)}<span>${s.label??n.text}</span></a
648
+ >`})}
649
+ ${t.length>a.length?l`<span class="link-chip">+${t.length-a.length}</span>`:m}
650
+ </div>`}}const di=e=>l`<div class="card-labels">
651
+ ${e.map(t=>l`<span class="label-chip" data-label=${t.id} style=${I(t.tone)}>${t.name}</span>`)}
652
+ </div>`,li=e=>{e.target instanceof Element&&e.target.closest("a")&&e.stopPropagation()},pi=()=>{customElements.get("dpk-internal-usm-story-card")||customElements.define("dpk-internal-usm-story-card",oi)},Ea=e=>{const t=e.slice(0,-1).map(Yt),a=t.reduce((n,i)=>n+i,0),s=t.map(n=>a>0?n/a*te:te/t.length);return s.slice(0,-1).map((n,i)=>s.slice(0,i+1).reduce((r,o)=>r+o,0))},Sa=(e,t,a)=>{if(t<0||t>=e.length)return e;const s=e[t-1]??0,n=e[t+1]??te;return e.map((i,r)=>r===t?Math.min(n,Math.max(s,Math.round(a))):i)},Ue=e=>[...e,te].map((t,a)=>t-(e[a-1]??0)),ci=(e,t)=>{const a=Ue(t.map(s=>Math.round(s)));return e.slice(0,-1).flatMap((s,n)=>{const i=a[n]??0;return s.weight===i?[]:[{statusId:s.id,weight:i}]})},ui=K`
653
+ :host {
654
+ display: block;
655
+ }
656
+ .wb {
657
+ display: grid;
658
+ grid-template-columns: minmax(0, 1fr) auto;
659
+ column-gap: 10px;
660
+ row-gap: 4px;
661
+ align-items: center;
662
+ }
663
+ .wb-track {
664
+ position: relative;
665
+ height: 36px;
666
+ border-radius: var(--dpk-radius-sm);
667
+ background: var(--dpk-paper-sunken);
668
+ touch-action: none;
669
+ }
670
+ .wb-part {
671
+ position: absolute;
672
+ top: 0;
673
+ bottom: 0;
674
+ display: flex;
675
+ align-items: center;
676
+ gap: 6px;
677
+ min-width: 0;
678
+ padding: 0 10px;
679
+ overflow: hidden;
680
+ background: color-mix(in oklab, var(--usm-tone) 16%, var(--dpk-paper-raised));
681
+ color: var(--dpk-ink);
682
+ font-size: 12px;
683
+ font-weight: 600;
684
+ white-space: nowrap;
685
+ transition:
686
+ left 120ms ease-out,
687
+ width 120ms ease-out;
688
+ }
689
+ .wb-track[data-dragging] .wb-part {
690
+ transition: none;
691
+ }
692
+ .wb-parts {
693
+ position: absolute;
694
+ inset: 0;
695
+ overflow: hidden;
696
+ border-radius: inherit;
697
+ }
698
+ .wb-name {
699
+ min-width: 0;
700
+ overflow: hidden;
701
+ text-overflow: ellipsis;
702
+ }
703
+ .wb-value {
704
+ flex: none;
705
+ color: var(--usm-tone);
706
+ font-family: var(--dpk-mono);
707
+ font-variant-numeric: tabular-nums;
708
+ }
709
+ .wb-line {
710
+ position: absolute;
711
+ top: -4px;
712
+ bottom: -4px;
713
+ z-index: 1;
714
+ width: 14px;
715
+ margin-left: -7px;
716
+ border-radius: var(--dpk-radius-sm);
717
+ outline: none;
718
+ cursor: col-resize;
719
+ }
720
+ .wb-line::before {
721
+ content: '';
722
+ position: absolute;
723
+ top: 0;
724
+ bottom: 0;
725
+ left: 6px;
726
+ width: 2px;
727
+ border-radius: 1px;
728
+ background: var(--dpk-ink-soft);
729
+ transition: background 120ms ease-out;
730
+ }
731
+ /* The grip says the line can be taken hold of. */
732
+ .wb-line::after {
733
+ content: '';
734
+ position: absolute;
735
+ top: 50%;
736
+ left: 2px;
737
+ width: 10px;
738
+ height: 20px;
739
+ margin-top: -10px;
740
+ border: 1px solid var(--dpk-rule-strong);
741
+ border-radius: 5px;
742
+ background: var(--dpk-paper-raised);
743
+ box-shadow: var(--dpk-shadow-xs);
744
+ transition: border-color 120ms ease-out;
745
+ }
746
+ .wb-line:hover::before,
747
+ .wb-line[data-active]::before {
748
+ background: var(--dpk-ink);
749
+ }
750
+ .wb-line:hover::after,
751
+ .wb-line[data-active]::after {
752
+ border-color: var(--dpk-ink-soft);
753
+ }
754
+ .wb-line:focus-visible {
755
+ box-shadow: var(--dpk-focus);
756
+ }
757
+ .wb-end {
758
+ display: flex;
759
+ align-items: center;
760
+ gap: 6px;
761
+ color: var(--dpk-ink-faint);
762
+ font-size: 12px;
763
+ font-weight: 600;
764
+ white-space: nowrap;
765
+ }
766
+ .wb-scale {
767
+ position: relative;
768
+ height: 12px;
769
+ color: var(--dpk-ink-faint);
770
+ font-family: var(--dpk-mono);
771
+ font-size: 10px;
772
+ }
773
+ .wb-tick {
774
+ position: absolute;
775
+ top: 0;
776
+ width: 1px;
777
+ height: 3px;
778
+ background: var(--dpk-rule-strong);
779
+ }
780
+ .wb-scale-end {
781
+ position: absolute;
782
+ top: 0;
783
+ line-height: 12px;
784
+ }
785
+ .wb-scale-end[data-at='0'] {
786
+ left: 0;
787
+ }
788
+ .wb-scale-end[data-at='max'] {
789
+ right: 0;
790
+ }
791
+ @media (prefers-reduced-motion: reduce) {
792
+ .wb-part,
793
+ .wb-line::before,
794
+ .wb-line::after {
795
+ transition: none;
796
+ }
797
+ }
798
+ `;class mi extends qe{static{this.styles=[lt,ui]}static{this.properties={statuses:{attribute:!1},dividers:{attribute:!1},commit:{attribute:!1},drag:{state:!0}}}#n=new We(this);constructor(){super(),this.statuses=[],this.dividers=[],this.commit=()=>{},this.drag=null}disconnectedCallback(){super.disconnectedCallback(),this.#o()}render(){const t=he(this.#n.locale),a=this.statuses.slice(0,-1),s=this.statuses.at(-1);if(!s||a.length===0)return m;const n=this.drag?.dividers??this.dividers,i=Ue(n),r=o=>`${o/te*100}%`;return l`<div class="wb">
799
+ <div class="wb-track" role="group" aria-label=${t.statusWeightLabel} ?data-dragging=${this.drag!==null}>
800
+ <div class="wb-parts">
801
+ ${a.map((o,d)=>{const p=n[d-1]??0,u=i[d]??0;return l`<span
802
+ class="wb-part"
803
+ data-part=${o.id}
804
+ title=${`${o.name} ${ze(u)}`}
805
+ style=${`${I(o.tone)}; left: ${r(p)}; width: ${r(u)}`}
806
+ >
807
+ <span class="wb-name">${o.name}</span><span class="wb-value">${ze(u)}</span>
808
+ </span>`})}
809
+ </div>
810
+ ${n.map((o,d)=>this.#e(t,a,n,d,r(o)))}
811
+ </div>
812
+ <span class="wb-end" data-end style=${I(s.tone)}>${re(s)}${s.name}</span>
813
+ <div class="wb-scale" aria-hidden="true">
814
+ ${Array.from({length:te-1},(o,d)=>l`<span class="wb-tick" style=${`left: ${r(d+1)}`}></span>`)}
815
+ <span class="wb-scale-end" data-at="0">0</span>
816
+ <span class="wb-scale-end" data-at="max">${te}</span>
817
+ </div>
818
+ </div>`}#e(t,a,s,n,i){const r=a[n]?.name??"",o=a[n+1]?.name??"",d=Ue(s),p=s[n]??0;return l`<span
819
+ class="wb-line"
820
+ role="slider"
821
+ tabindex="0"
822
+ style=${`left: ${i}`}
823
+ aria-label=${t.weightLineLabel(r,o)}
824
+ aria-valuemin=${String(s[n-1]??0)}
825
+ aria-valuemax=${String(s[n+1]??te)}
826
+ aria-valuenow=${String(p)}
827
+ aria-valuetext=${t.weightLineValue(r,ze(d[n]??0),o,ze(d[n+1]??0))}
828
+ ?data-active=${this.drag?.index===n}
829
+ @keydown=${u=>this.#a(u,n)}
830
+ @pointerdown=${u=>this.#s(u,n)}
831
+ ></span>`}#a(t,a){const s=this.dividers[a]??0,n=(()=>{switch(t.key){case"ArrowLeft":case"ArrowDown":return s-1;case"ArrowRight":case"ArrowUp":return s+1;case"Home":return 0;case"End":return te;default:return null}})();n!==null&&(t.preventDefault(),this.#d(Sa(this.dividers,a,n)))}#s(t,a){t.button===0&&(t.preventDefault(),t.currentTarget instanceof HTMLElement&&t.currentTarget.focus({preventScroll:!0}),this.drag={index:a,dividers:this.dividers},document.addEventListener("pointermove",this.#t),document.addEventListener("pointerup",this.#i),document.addEventListener("pointercancel",this.#r))}#t=t=>{const a=this.renderRoot.querySelector(".wb-track")?.getBoundingClientRect();if(!this.drag||!a||a.width===0)return;const s=(t.clientX-a.left)/a.width*te;this.drag={...this.drag,dividers:Sa(this.drag.dividers,this.drag.index,s)}};#i=()=>{const t=this.drag?.dividers;this.#o(),t&&this.#d(t)};#r=()=>this.#o();#o(){this.drag=null,document.removeEventListener("pointermove",this.#t),document.removeEventListener("pointerup",this.#i),document.removeEventListener("pointercancel",this.#r)}#d(t){t.some((a,s)=>a!==this.dividers[s])&&this.commit(t)}}const ze=e=>String(Math.round(e*10)/10),hi=()=>{customElements.get("dpk-internal-usm-weight-bar")||customElements.define("dpk-internal-usm-weight-bar",mi)},gi=(e,t,a)=>{const s=e.at(-1)??null;if(t===null||a==="end")return s;const n=e.indexOf(t);return n<0?s:a==="after"?t:n===0?null:e.at(n-1)??null},Ta=(e,t,a,s,n)=>{const i=Re(e,t.stepId,t.milestoneId).map(r=>r.id);return{type:"MOVE_STORY",target:{type:"story",id:a},payload:{activityId:t.activityId,stepId:t.stepId,milestoneId:t.milestoneId??null,after:fe(i,a,s,n)}}},Aa=(e,t,a,s,n,i)=>{const r=S(e,s);if(!r||r.activityId!==t)return null;const o=Dt(e,t,a).map(d=>d.id);return{type:"MOVE_STORY",target:{type:"story",id:s},payload:{activityId:t,stepId:r.stepId,milestoneId:a??null,after:fe(o,s,n,i)}}},_a=(e,t,a,s,n)=>{const i=Re(e,s,n).filter(r=>r.id!==t);return{type:"MOVE_STORY",target:{type:"story",id:t},payload:{activityId:a,stepId:s,milestoneId:n??null,after:i.at(-1)?.id??null}}},Ia=(e,t,a,s)=>e.includes(t)?{type:"REORDER_MILESTONE",target:{type:"milestone",id:t},payload:{after:fe(e,t,a,s)}}:null,bi=(e,t,a,s)=>e.includes(t)?{type:"REORDER_ACTIVITY",target:{type:"activity",id:t},payload:{after:fe(e,t,a,s)}}:null,fi=(e,t,a,s)=>{const n=M(e,t);if(!n)return null;const i=a===null?void 0:M(e,a);if(a!==null&&i?.activity.id!==n.activity.id)return null;const r=n.activity.id,o=n.activity.steps.map(u=>ee(r,u.id)),d=ee(r,n.step.id),p=i?ee(r,i.step.id):null;return{type:"REORDER_STEP",target:{type:"step",id:d},payload:{after:fe(o,d,p,s)}}},vi=e=>{const t=e.stories.length;return{rows:e.labels.map((s,n)=>{const i=e.stories.filter(r=>r.labelIds?.includes(s.id)).length;return{id:s.id,name:s.name,tone:s.tone,previousId:e.labels[n-1]?.id??null,nextId:e.labels[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},yi=e=>{const t=e.stories.length;return{rows:e.members.map((s,n)=>{const i=e.stories.filter(r=>r.assigneeId===s.id).length;return{id:s.id,name:s.name,tone:s.tone,previousId:e.members[n-1]?.id??null,nextId:e.members[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},ki=e=>{const t=e.stories.length,a=De(e);return e.milestones.map((s,n)=>{const i=e.stories.filter(o=>o.milestoneId===s.id),r=new Set(i.map(o=>o.stepId));return{id:s.id,ordinal:n+1,name:s.name,timeframe:s.timeframe?.trim()??"",description:s.description?.trim()??"",storyCount:i.length,share:t===0?0:i.length/t,coverage:{covered:a.filter(({step:o})=>r.has(o.id)).length,total:a.length},progress:$a(e,i)}})},Ma=(e,t)=>{const a=Math.max(e.left,t.left),s=Math.max(e.top,t.top),n=Math.min(e.left+e.width,t.left+t.width),i=Math.min(e.top+e.height,t.top+t.height);return n>a&&i>s?{left:a,top:s,width:n-a,height:i-s}:null},wi=(e,t)=>{const a=t.flatMap(d=>{const p=Ma(e,d);return p?[p]:[]});if(!a[0])return null;const n=Math.min(...a.map(d=>d.left)),i=Math.min(...a.map(d=>d.top)),r=Math.max(...a.map(d=>d.left+d.width)),o=Math.max(...a.map(d=>d.top+d.height));return{box:{left:n,top:i,width:r-n,height:o-i},parts:t.map(d=>Ma(e,d)?{left:d.left-n,top:d.top-i,width:d.width,height:d.height}:null)}},xi=(e,t,a)=>{const s=e.dataTransfer;if(!s)return;const n=wi(a.getBoundingClientRect(),t.map(d=>d.getBoundingClientRect()));if(!n)return;const{box:i}=n,r=document.createElement("div");r.style.cssText=["position: fixed",`left: ${i.left}px`,`top: ${i.top}px`,`width: ${i.width}px`,`height: ${i.height}px`,"overflow: hidden","pointer-events: none","z-index: 2147483647",`background: ${getComputedStyle(a).backgroundColor}`].join("; ");for(const[d,p]of t.entries()){const u=n.parts[d],y=Pe(p);!u||!(y instanceof HTMLElement)||(y.style.position="absolute",y.style.left=`${u.left}px`,y.style.top=`${u.top}px`,y.style.width=`${u.width}px`,y.style.height=`${u.height}px`,y.style.margin="0",y.style.boxSizing="border-box",r.append(y))}const o=a.getRootNode();(o instanceof ShadowRoot?o:document.body).append(r),s.setDragImage(r,e.clientX-i.left,e.clientY-i.top),setTimeout(()=>r.remove(),0)},Pe=e=>{if(e instanceof Element&&e.shadowRoot)return $i(e,e.shadowRoot);const t=e.cloneNode(!1);t instanceof Element&&t.removeAttribute("id");for(const a of e.childNodes)t.appendChild(Pe(a));return t},$i=(e,t)=>{const a=document.createElement("span");for(const r of e.attributes)r.name!=="id"&&a.setAttribute(r.name,r.value);const s=getComputedStyle(e),n=e.getBoundingClientRect();a.style.display=s.display==="inline"?"inline-block":s.display,a.style.width=`${n.width}px`,a.style.height=`${n.height}px`,a.style.boxSizing="border-box",a.style.flex="none",a.style.verticalAlign=s.verticalAlign;const i=a.attachShadow({mode:"open"});"adoptedStyleSheets"in t&&(i.adoptedStyleSheets=t.adoptedStyleSheets);for(const r of t.childNodes)i.appendChild(Pe(r));for(const r of e.childNodes)a.appendChild(Pe(r));return a},La=(e,t)=>{const a=j("new-activity",q(t.state));if(!t.dispatch({type:"ADD_ACTIVITY",target:{type:"page",id:"usm"},payload:{id:a,name:e.newActivityName}}).ok)return;const n=j("new-step",[...q(t.state),a]);t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:n,name:e.newStepName}}),t.navigate({activity:a,step:null,story:null})},Ei=(e,t,a)=>{const s=j("new-step",q(t.state));t.dispatch({type:"ADD_STEP",target:{type:"activity",id:a},payload:{id:s,name:e.newStepName}})},Da=(e,t)=>{const a=j("new-milestone",q(t.state));t.dispatch({type:"ADD_MILESTONE",target:{type:"page",id:"usm"},payload:{id:a,name:e.newMilestoneName}})},Ra=(e,t,a,s,n)=>{const i=j("new-story",q(t.state));t.dispatch({type:"ADD_STORY",target:{type:"step",id:s},payload:{id:i,name:e.newStoryName,activityId:a,...n===void 0?{}:{milestoneId:n}}}).ok&&t.navigate({activity:a,step:s,story:i})},Si=(e,t)=>{const a=j("new-status",q(t.state));t.dispatch({type:"ADD_STATUS",target:{type:"page",id:"usm"},payload:{id:a,name:e.newStatusName,tone:at(t.state.statuses.length)}})},Ti=(e,t)=>{const a=j("new-label",q(t.state));t.dispatch({type:"ADD_LABEL",target:{type:"page",id:"usm"},payload:{id:a,name:e.newLabelName,tone:Me(t.state.labels.length)}})},Ai=(e,t)=>{const a=j("new-member",q(t.state));t.dispatch({type:"ADD_MEMBER",target:{type:"page",id:"usm"},payload:{id:a,name:e.newMemberName,tone:Me(t.state.members.length)}})},_i=(e,t)=>{const a=j("new-estimate",q(t.state)),s=Math.max(0,...t.state.estimates.map(n=>n.points))+1;t.dispatch({type:"ADD_ESTIMATE",target:{type:"page",id:"usm"},payload:{id:a,name:e.newEstimateName,points:s}})},Ii=(e,t)=>{const a=j(`snapshot-${t.toISOString().slice(0,10)}`,q(e.state));e.dispatch({type:"RECORD_SNAPSHOT",target:{type:"page",id:"usm"},payload:{id:a,at:t.toISOString(),tally:Pt(e.state)}})},Oa=(e,t)=>{const a=s=>t.stories.filter(n=>n.milestoneId===s).length;return[...t.milestones.map(({id:s,name:n,timeframe:i})=>({id:s,name:n,timeframe:i?.trim()??"",storyCount:a(s)})),{id:void 0,name:e.unassigned,timeframe:"",storyCount:a(void 0)}]},Mi=(e,t)=>l`
832
+ <div class="empty">
833
+ <h2>${e.emptyTitle}</h2>
834
+ <p>${e.emptyBody}</p>
835
+ <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>La(e,t)}>
836
+ ${e.firstActivityButton}
837
+ </button>
838
+ </div>
839
+ `,Li=e=>{const{m:t,context:a}=e,s=De(a.state);return s.length===0?Mi(t,a):Na(a)==="activity"?Ri(e,s):Oi(e)},Na=e=>e.navigation.view==="group"?"group":"activity",Di=(e,t)=>{const a=Na(t);return l`<div class="segmented view-tabs" role="tablist" aria-label=${e.groupingLabel}>
840
+ ${Ca(t,"activity",a,e.activityGroup)}
841
+ ${Ca(t,"group",a,e.groupViewTab)}
842
+ </div>`},Ca=(e,t,a,s)=>{const n=t===a;return l`<a
843
+ class="tab"
844
+ role="tab"
845
+ data-current=${String(n)}
846
+ aria-selected=${n?"true":"false"}
847
+ href=${e.hashFor({view:t})}
848
+ >${s}</a
849
+ >`},Ri=(e,t)=>{const{m:a,context:s}=e,{state:n}=s,i=Oa(a,n);return l`
850
+ <div class="map-scroll">
851
+ <div class="map" style=${`--cols:${t.length+1}`} data-testid="usm-map">
852
+ <div class="map-head">
853
+ <div class="map-row">
854
+ <div class="corner">
855
+ <span class="dpk-label">${a.groupAxisHeader}</span>
856
+ </div>
857
+ ${B(n.activities,r=>r.id,r=>Ya(e,r.id,`grid-column: span ${Math.max(r.steps.length,1)}`))}
858
+ ${za(a,s)}
859
+ </div>
860
+ <div class="map-row">
861
+ ${Ba(a)}
862
+ ${B(t,({activity:r,step:o})=>`${r.id}.${o.id}`,({activity:r,step:o})=>Ni(e,r.id,o))}
863
+ <div class="corner"><span class="dpk-label">—</span></div>
864
+ </div>
865
+ </div>
866
+ ${B(i,r=>r.id,r=>Fa(e,r,l`${B(t,({activity:o,step:d})=>`${o.id}.${d.id}`,({activity:o,step:d})=>Bi(e,{activityId:o.id,stepId:d.id,milestoneId:r.id}))}`))}
867
+ ${Pa(a,s,t.length)}
868
+ </div>
869
+ </div>
870
+ `},Oi=e=>{const{m:t,context:a}=e,{state:s}=a,n=Oa(t,s);return l`
871
+ <div class="map-scroll">
872
+ <div class="map" style=${`--cols:${s.activities.length+1}`} data-testid="usm-map-group">
873
+ <div class="map-head">
874
+ <div class="map-row">
875
+ ${Ba(t)}
876
+ ${B(s.activities,i=>i.id,i=>Ya(e,i.id,void 0,!0))}
877
+ ${za(t,a)}
878
+ </div>
879
+ </div>
880
+ ${B(n,i=>i.id,i=>Fa(e,i,l`${B(s.activities,r=>r.id,r=>Yi(e,r.id,i.id))}`))}
881
+ ${Pa(t,a,s.activities.length)}
882
+ </div>
883
+ </div>
884
+ `},Ba=e=>l`<div class="corner">
885
+ <span class="dpk-label">${e.activityAxis}</span>
886
+ <span class="dpk-label">${e.milestoneAxis}</span>
887
+ </div>`,Ya=(e,t,a,s=!1)=>{const{m:n,context:i,drag:r}=e,{state:o}=i,d=o.activities.find(b=>b.id===t);if(!d)return l`<div class="act-head"></div>`;const p=o.stories.filter(b=>b.activityId===d.id),u=$a(o,p),y=r.combine("activity",Fe(e,d.id)),E=r.source({type:"activity",id:d.id});return l`
888
+ <div
889
+ class="act-head"
890
+ style=${a??""}
891
+ data-activity=${d.id}
892
+ data-column=${d.id}
893
+ data-dpk-target=${_({type:"activity",id:d.id})}
894
+ draggable="true"
895
+ data-col-dragging=${String(r.isDragging("activity",d.id))}
896
+ data-col-drop=${Ge(r,d.id)}
897
+ @dragstart=${b=>{qa(b,d.id),E.dragstart(b)}}
898
+ @dragend=${E.dragend}
899
+ @dragenter=${y.dragenter}
900
+ @dragover=${y.dragover}
901
+ @dragleave=${y.dragleave}
902
+ @drop=${y.drop}
903
+ >
904
+ <div class="act-title">
905
+ <span class="col-grip" aria-hidden="true">${je()}</span>
906
+ <span class="act-name">
907
+ <dpk-component-inline-edit
908
+ draggable="false"
909
+ .value=${d.name}
910
+ .label=${n.activityNameLabel}
911
+ @dpk-commit=${X(b=>i.dispatch({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:d.id},payload:{name:b}}))}
912
+ ></dpk-component-inline-edit>
913
+ <span class="act-actor" data-empty=${String(d.actor===void 0)}>
914
+ <dpk-component-inline-edit
915
+ draggable="false"
916
+ truncate
917
+ .value=${d.actor??""}
918
+ .label=${n.activityActorLabel}
919
+ .placeholder=${n.activityActorLabel}
920
+ @dpk-commit=${X(b=>i.dispatch({type:"SET_ACTIVITY_ACTOR",target:{type:"activity",id:d.id},payload:{actor:b}}))}
921
+ ></dpk-component-inline-edit>
922
+ </span>
923
+ </span>
924
+ <span class="count">${p.length}</span>
925
+ <button
926
+ class="dpk-icon-btn"
927
+ type="button"
928
+ aria-label=${n.addStepAria}
929
+ @click=${()=>Ei(n,i,d.id)}
930
+ >
931
+ ${ks()}
932
+ </button>
933
+ </div>
934
+ ${va(u,n.progressAria(u.map(b=>`${b.name} ${b.count}`).join(", ")))}
935
+ ${s&&d.steps.length>0?l`<ol class="act-steps">
936
+ ${d.steps.map(b=>l`<li>${b.name}</li>`)}
937
+ </ol>`:m}
938
+ </div>
939
+ `},Ni=(e,t,a)=>{const{m:s,context:n,drag:i}=e,r=ee(t,a.id),o=i.combine("step",Fe(e,t,a.id)),d=i.source({type:"step",id:r});return l`
940
+ <div
941
+ class="col-head"
942
+ data-step=${r}
943
+ data-column=${t}
944
+ data-column-step=${a.id}
945
+ data-current=${String(n.navigation.step===a.id)}
946
+ data-dpk-target=${_({type:"step",id:r})}
947
+ draggable="true"
948
+ data-col-dragging=${String(ct(i,t,a.id))}
949
+ data-col-drop=${Ge(i,t,a.id)}
950
+ data-step-edge=${Ua(n.state,t,a.id)}
951
+ @dragstart=${p=>{qa(p,t,a.id),d.dragstart(p)}}
952
+ @dragend=${d.dragend}
953
+ @dragenter=${o.dragenter}
954
+ @dragover=${o.dragover}
955
+ @dragleave=${o.dragleave}
956
+ @drop=${o.drop}
957
+ >
958
+ <span class="col-grip" aria-hidden="true">${je()}</span>
959
+ <h4>
960
+ <dpk-component-inline-edit
961
+ draggable="false"
962
+ .value=${a.name}
963
+ .label=${s.stepNameLabel}
964
+ @dpk-commit=${X(p=>n.dispatch({type:"SET_STEP_NAME",target:{type:"step",id:a.id},payload:{name:p}}))}
965
+ @click=${p=>p.stopPropagation()}
966
+ ></dpk-component-inline-edit>
967
+ </h4>
968
+ <span class="count">${Rt(n.state,a.id)}</span>
969
+ </div>
970
+ `},Fe=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=n.target({key:`activity:${t}`,accepts:"activity",hovered:Ka(t),onDrop:y=>i.dropOnActivity(y)});if(a===void 0)return[["activity",r]];const o=n.item;if(o?.type==="step"&&M(s.state,o.id)?.activity.id!==t)return[["activity",r]];const p=ee(t,a),u=n.target({key:`step:${p}`,accepts:"step",hovered:Ka(p),onDrop:y=>i.dropOnStep(y)});return[["activity",r],["step",u]]},Ge=(e,t,a)=>e.isOver(`activity:${t}`)?"activity":a!==void 0&&e.isOver(`step:${ee(t,a)}`)?"step":"none",Ua=(e,t,a)=>{const s=e.activities.find(n=>n.id===t)?.steps??[];return[s[0]?.id===a?"first":"",s.at(-1)?.id===a?"last":""].filter(n=>n!=="").join(" ")},ct=(e,t,a)=>e.isDragging("activity",t)||a!==void 0&&e.isDragging("step",ee(t,a)),za=(e,t)=>l`<div class="act-head">
971
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>La(e,t)}>
972
+ ${e.newActivityButton}
973
+ </button>
974
+ </div>`,Pa=(e,t,a)=>l`<div class="map-row">
975
+ <div class="row-lead">
976
+ <div class="row-head">
977
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Da(e,t)}>
978
+ ${e.newMilestoneButton}
979
+ </button>
980
+ </div>
981
+ </div>
982
+ ${Array.from({length:a+1},()=>l`<div class="cell"></div>`)}
983
+ </div>`,Fa=(e,t,a)=>{const{m:s,context:n,drag:i,handlers:r}=e,o=t.id;if(o===void 0)return l`<div
984
+ class="map-row"
985
+ data-unassigned="true"
986
+ data-draggable="false"
987
+ data-row-dragging="false"
988
+ data-row-drop="false"
989
+ >
990
+ <div class="row-lead">
991
+ <div class="row-head" data-milestone="" draggable="false"><span>${t.name}</span></div>
992
+ ${Ga(s,t)}
993
+ </div>
994
+ ${a}
995
+ <div class="cell"></div>
996
+ </div>`;const d=Ci(s,n,o,t.name),p=`row:${o}`,u=i.target({key:p,accepts:"milestone",hovered:Fi,onDrop:E=>r.dropOnMilestoneRow(o,E)}),y=i.source({type:"milestone",id:o});return l`
997
+ <div
998
+ class="map-row"
999
+ data-draggable="true"
1000
+ data-row-dragging=${String(i.isDragging("milestone",o))}
1001
+ data-row-drop=${String(i.isOver(p))}
1002
+ @dragenter=${u.dragenter}
1003
+ @dragover=${u.dragover}
1004
+ @dragleave=${u.dragleave}
1005
+ @drop=${u.drop}
1006
+ >
1007
+ <div class="row-lead">
1008
+ <div
1009
+ class="row-head"
1010
+ data-milestone=${o}
1011
+ data-dpk-target=${_({type:"milestone",id:o})}
1012
+ draggable="true"
1013
+ @dragstart=${E=>{Pi(E),y.dragstart(E)}}
1014
+ @dragend=${y.dragend}
1015
+ >
1016
+ <span class="row-grip" aria-hidden="true">${je()}</span>${d}
1017
+ </div>
1018
+ ${Ga(s,t)}
1019
+ </div>
1020
+ ${a}
1021
+ <div class="cell"></div>
1022
+ </div>
1023
+ `},Ga=(e,t)=>l`<div class="row-meta">
1024
+ ${t.timeframe===""?m:l`<span class="row-timeframe">${t.timeframe}</span>`}
1025
+ <span class="row-count">${e.storyCount(t.storyCount)}</span>
1026
+ </div>`,Ci=(e,t,a,s)=>l`<dpk-component-inline-edit
1027
+ draggable="false"
1028
+ .value=${s}
1029
+ .label=${e.milestoneNameLabel}
1030
+ @dpk-commit=${X(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:a},payload:{name:n}}))}
1031
+ ></dpk-component-inline-edit>`,Bi=(e,t)=>{const{m:a,context:s,drag:n,handlers:i}=e,r=Be(s.state,s.navigation),o=Re(s.state,t.stepId,t.milestoneId).filter(u=>sa(r,u)),d=`cell:${t.stepId}:${t.milestoneId??""}`,p=n.combine("story",[["story",n.target({key:d,accepts:"story",hovered:Va,onDrop:u=>i.dropOnCell(t,u)})],...Fe(e,t.activityId,t.stepId)]);return l`
1032
+ <div
1033
+ class="cell"
1034
+ data-step=${t.stepId}
1035
+ data-milestone=${t.milestoneId??""}
1036
+ data-column=${t.activityId}
1037
+ data-column-step=${t.stepId}
1038
+ data-drop=${String(n.isOver(d))}
1039
+ data-col-dragging=${String(ct(n,t.activityId,t.stepId))}
1040
+ data-col-drop=${Ge(n,t.activityId,t.stepId)}
1041
+ data-step-edge=${Ua(s.state,t.activityId,t.stepId)}
1042
+ @dragenter=${p.dragenter}
1043
+ @dragover=${p.dragover}
1044
+ @dragleave=${p.dragleave}
1045
+ @drop=${p.drop}
1046
+ >
1047
+ <div class="card-list" data-testid=${`cell-${t.stepId}-${t.milestoneId??"unassigned"}`}>
1048
+ ${B(o,u=>u.id,u=>Ha(e,u,""))}
1049
+ </div>
1050
+ <button
1051
+ class="dpk-btn dpk-btn--ghost add-cell"
1052
+ type="button"
1053
+ title=${a.addStoryCellAria}
1054
+ @click=${()=>Ra(a,s,t.activityId,t.stepId,t.milestoneId)}
1055
+ >
1056
+ ${a.addCellButton}
1057
+ </button>
1058
+ </div>
1059
+ `},Yi=(e,t,a)=>{const{m:s,context:n,drag:i,handlers:r}=e,{state:o}=n,d=Be(o,n.navigation),p=Dt(o,t,a).filter(g=>sa(d,g)),u=o.activities.find(g=>g.id===t)?.steps??[],y=u[0],E=g=>u.find(ae=>ae.id===g)?.name??"",b=`group:${t}:${a??""}`,c=i.combine("story",[["story",i.target({key:b,accepts:"story",hovered:Va,onDrop:g=>r.dropOnGroupCell(t,a,g)})],...Fe(e,t)]);return l`
1060
+ <div
1061
+ class="cell"
1062
+ data-activity=${t}
1063
+ data-milestone=${a??""}
1064
+ data-column=${t}
1065
+ data-drop=${String(i.isOver(b))}
1066
+ data-col-dragging=${String(ct(i,t))}
1067
+ data-col-drop=${Ge(i,t)}
1068
+ @dragenter=${c.dragenter}
1069
+ @dragover=${c.dragover}
1070
+ @dragleave=${c.dragleave}
1071
+ @drop=${c.drop}
1072
+ >
1073
+ <div class="card-list" data-testid=${`group-cell-${t}-${a??"unassigned"}`}>
1074
+ ${B(p,g=>g.id,g=>Ha(e,g,E(g.stepId)))}
1075
+ </div>
1076
+ ${y?l`<button
1077
+ class="dpk-btn dpk-btn--ghost add-cell"
1078
+ type="button"
1079
+ aria-label=${s.addStoryCellAria}
1080
+ @click=${()=>Ra(s,n,t,y.id,a)}
1081
+ >
1082
+ ${s.addCellButton}
1083
+ </button>`:m}
1084
+ </div>
1085
+ `},Ha=(e,t,a)=>{const{context:s,drag:n,handlers:i}=e,r=ce(s.state),o=n.source({type:"story",id:t.id}),d=Jt(s.state,t.id);return l`<dpk-internal-usm-story-card
1086
+ data-story=${t.id}
1087
+ data-status=${t.statusId??""}
1088
+ data-relation=${zi(s.state,s.navigation.story,t)??m}
1089
+ data-highlight=${Ui(e.highlighted,t.id)??m}
1090
+ data-dpk-target=${_({type:"story",id:t.id})}
1091
+ draggable="true"
1092
+ tabindex="0"
1093
+ role="button"
1094
+ aria-haspopup="dialog"
1095
+ aria-label=${t.name}
1096
+ style=${I(xa(r,t)?.tone)}
1097
+ .story=${t}
1098
+ .stepName=${a}
1099
+ .statuses=${r}
1100
+ .labels=${rn(s.state,t)}
1101
+ .reviewCount=${s.commentCount({type:"story",id:t.id})}
1102
+ .estimate=${Z(s.state,"estimates")?G(s.state,t.estimateId)??null:null}
1103
+ .assignee=${Z(s.state,"assignees")?nn(s.state,t)??null:null}
1104
+ .blocks=${d.dependents.length}
1105
+ .waits=${d.openBlockers}
1106
+ @click=${()=>i.selectStory(t.id)}
1107
+ @keydown=${p=>{p.composedPath()[0]!==p.currentTarget||p.key!=="Enter"&&p.key!==" "||(p.preventDefault(),i.selectStory(t.id))}}
1108
+ ?focused=${s.navigation.story===t.id}
1109
+ ?dragging=${n.isDragging("story",t.id)}
1110
+ @dragstart=${o.dragstart}
1111
+ @dragend=${o.dragend}
1112
+ ></dpk-internal-usm-story-card>`},Ui=(e,t)=>{if(e!==null)return e.has(t)?"on":"dimmed"},zi=(e,t,a)=>{if(!(t===void 0||t===a.id))return a.blockedBy?.includes(t)?"dependent":e.stories.find(s=>s.id===t)?.blockedBy?.includes(a.id)?"blocker":void 0},Va=e=>{const t=e.target instanceof Element?e.target.closest("dpk-internal-usm-story-card"):null;return t?{id:t.getAttribute("data-story"),element:t}:null},Pi=e=>{const a=(e.currentTarget instanceof Element?e.currentTarget:null)?.closest(".map-row");if(!a||!e.dataTransfer)return;const s=a.getBoundingClientRect();e.dataTransfer.setDragImage(a,e.clientX-s.left,e.clientY-s.top)},Ka=e=>t=>t.currentTarget instanceof Element?{id:e,element:t.currentTarget}:null,qa=(e,t,a)=>{const n=(e.currentTarget instanceof Element?e.currentTarget:null)?.closest(".map-scroll");if(!n)return;const i=[...n.querySelectorAll("[data-column]")].filter(d=>d.getAttribute("data-column")===t&&(a===void 0||d.getAttribute("data-column-step")===a)),r=i.filter(d=>d.closest(".map-head")),o=i.filter(d=>!d.closest(".map-head"));xi(e,[...o,...r],n)},Fi=e=>{const t=e.target instanceof Element?e.target.closest(".map-row"):null,a=t?.querySelector(".row-head[data-milestone]");if(!t||!a)return null;const s=a.getAttribute("data-milestone");return{id:s===""?null:s,element:t}},Gi=(e,t)=>ft((a,s)=>{const n=a.trim()===""?Number.NaN:Number(a);if(!Number.isFinite(n)||n<0){s.value=String(e);return}n!==e&&t(n)}),Hi=(e,t,a,s)=>l`
1113
+ <section class="st-overview" data-testid="usm-statuses">
1114
+ ${a.rows.length===0?l`<div class="empty">
1115
+ <h2>${e.noStatusesTitle}</h2>
1116
+ <p>${e.noStatusesBody}</p>
1117
+ </div>`:m}
1118
+ <ol class="st-list">
1119
+ ${B(a.rows,n=>n.id,n=>Vi(e,t,n,s))}
1120
+ </ol>
1121
+ <div>
1122
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Si(e,t)}>
1123
+ ${e.newStatusButton}
1124
+ </button>
1125
+ </div>
1126
+ </section>
1127
+ `,Vi=(e,t,a,s)=>{const n=s.openFor===a.id,i={type:"status",id:a.id},r=o=>{t.dispatch({type:"REORDER_STATUS",target:i,payload:{after:o}})};return l`
1128
+ <li
1129
+ class="st-row st-row--status"
1130
+ data-status=${a.id}
1131
+ data-dpk-target=${_(i)}
1132
+ style=${I(a.tone)}
1133
+ >
1134
+ <button
1135
+ class="st-icon-trigger"
1136
+ type="button"
1137
+ data-icon-trigger=${a.id}
1138
+ aria-haspopup="menu"
1139
+ aria-expanded=${String(n)}
1140
+ aria-label=${`${e.statusIconLabel}: ${e.iconName(a.icon)}`}
1141
+ title=${e.iconName(a.icon)}
1142
+ @click=${()=>s.toggle(a.id)}
1143
+ >
1144
+ ${re(a)}
1145
+ </button>
1146
+ ${n?Ki(e,t,a,s):m}
1147
+ <span class="st-name">
1148
+ <dpk-component-inline-edit
1149
+ .value=${a.name}
1150
+ .label=${e.statusNameLabel}
1151
+ @dpk-commit=${X(o=>t.dispatch({type:"SET_STATUS_NAME",target:i,payload:{name:o}}))}
1152
+ ></dpk-component-inline-edit>
1153
+ </span>
1154
+ ${mt(e,a.storyCount,a.share)}
1155
+ ${ut(e,a.tone,o=>t.dispatch({type:"SET_STATUS_TONE",target:i,payload:{tone:o}}))}
1156
+ <label class="st-done" title=${e.doneStatusAria(a.name)}>
1157
+ <input
1158
+ type="radio"
1159
+ name="usm-done-status"
1160
+ data-role="done"
1161
+ aria-label=${e.doneStatusAria(a.name)}
1162
+ .checked=${a.done}
1163
+ @change=${()=>t.dispatch({type:"SET_DONE_STATUS",target:i,payload:{}})}
1164
+ />
1165
+ <span aria-hidden="true">${e.doneStatusMark}</span>
1166
+ </label>
1167
+ ${He(e,{ids:t.state.statuses.map(o=>o.id),row:a,deleteLabel:e.deleteStatusAria,reorder:r,remove:()=>t.dispatch({type:"DELETE_STATUS",target:i,payload:{}})})}
1168
+ </li>
1169
+ `},Ki=(e,t,a,s)=>l`<div
1170
+ id="icon-menu"
1171
+ class="comment-pop icon-menu"
1172
+ popover="manual"
1173
+ role="menu"
1174
+ aria-label=${e.statusIconLabel}
1175
+ style=${I(a.tone)}
1176
+ @keydown=${n=>{n.key==="Escape"&&(n.preventDefault(),s.close())}}
1177
+ >
1178
+ ${wt.map(n=>l`<button
1179
+ class="icon-option"
1180
+ type="button"
1181
+ role="menuitemradio"
1182
+ data-icon=${n}
1183
+ title=${e.iconName(n)}
1184
+ aria-label=${e.iconName(n)}
1185
+ aria-checked=${String(n===a.icon)}
1186
+ @click=${()=>{n!==a.icon&&t.dispatch({type:"SET_STATUS_ICON",target:{type:"status",id:a.id},payload:{icon:n}}),s.close()}}
1187
+ >
1188
+ ${re({icon:n,progress:a.progress})}
1189
+ </button>`)}
1190
+ </div>`,ut=(e,t,a)=>l`<span class="st-tones" role="radiogroup" aria-label=${e.statusToneLabel}>
1191
+ ${Ae.map(s=>l`<button
1192
+ class="st-tone"
1193
+ type="button"
1194
+ role="radio"
1195
+ data-tone=${s}
1196
+ style=${I(s)}
1197
+ title=${e.toneName(s)}
1198
+ aria-label=${e.toneName(s)}
1199
+ aria-checked=${s===t?"true":"false"}
1200
+ @click=${()=>{s!==t&&a(s)}}
1201
+ ></button>`)}
1202
+ </span>`,He=(e,t)=>l`<span class="st-tools">
1203
+ <button
1204
+ class="dpk-icon-btn"
1205
+ type="button"
1206
+ aria-label=${e.moveUpAria}
1207
+ ?disabled=${t.row.previousId===null}
1208
+ @click=${()=>t.reorder(qi(t.ids,t.row.previousId))}
1209
+ >
1210
+ ↑
1211
+ </button>
1212
+ <button
1213
+ class="dpk-icon-btn"
1214
+ type="button"
1215
+ aria-label=${e.moveDownAria}
1216
+ ?disabled=${t.row.nextId===null}
1217
+ @click=${()=>t.reorder(t.row.nextId)}
1218
+ >
1219
+ ↓
1220
+ </button>
1221
+ <button class="dpk-icon-btn" type="button" data-role="delete" aria-label=${t.deleteLabel} @click=${t.remove}>
1222
+ ${Te()}
1223
+ </button>
1224
+ </span>`,qi=(e,t)=>{const a=t===null?-1:e.indexOf(t);return a<=0?null:e[a-1]??null},mt=(e,t,a)=>l`
1225
+ <span class="st-share">
1226
+ <span class="st-share-text">${e.statusShare(t,Math.round(a*100))}</span>
1227
+ <span class="st-meter" aria-hidden="true"><span style=${`width:${a*100}%`}></span></span>
1228
+ </span>
1229
+ `,Wi=C(ws),ji=C(Hs),Xi={width:720,height:240,inset:{top:16,right:20,bottom:26,left:40}},Zi={width:340,height:150,inset:{top:12,right:14,bottom:24,left:32}},Ji=(e,t,a)=>{const{state:s,navigation:n}=t,i=ln(s,n),r=me(s);return l`
1230
+ <section class="bd-overview" data-testid="usm-burndown">
1231
+ <header class="bd-bar">
1232
+ ${i?Qi(e,t,i):m} ${er(e,t,r)}
1233
+ ${i?l`<span class="bd-record">
1234
+ <button
1235
+ class="dpk-btn dpk-btn--primary"
1236
+ type="button"
1237
+ data-role="record-snapshot"
1238
+ title=${e.recordSnapshotHint}
1239
+ @click=${()=>Ii(t,new Date)}
1240
+ >
1241
+ ${e.recordSnapshotButton}
1242
+ </button>
1243
+ </span>`:m}
1244
+ </header>
1245
+ ${r==="stories"?m:tr(e,t,r)}
1246
+ ${i?ar(e,t,i,r,a):l`<div class="empty">
1247
+ <h2>${e.burndownTab}</h2>
1248
+ <p>${e.noMilestonesForBurndown}</p>
1249
+ </div>`}
1250
+ <div class="bd-side">${sr(e,t)}</div>
1251
+ </section>
1252
+ `},Qi=(e,t,a)=>{const{state:s}=t;return l`<label class="bd-control">
1253
+ <span>${e.burndownMilestoneLabel}</span>
1254
+ <select
1255
+ class="dpk-select"
1256
+ data-role="milestone"
1257
+ @change=${xs(n=>t.navigate({milestone:n}))}
1258
+ >
1259
+ ${s.milestones.map(n=>l`<option value=${n.id} ?selected=${n.id===a.id}>${n.name}</option>`)}
1260
+ </select>
1261
+ </label>
1262
+ <label class="bd-control" data-dpk-target=${_({type:"milestone",id:a.id})}>
1263
+ <span>${e.dueDateLabel}</span>
1264
+ <input
1265
+ class="dpk-input"
1266
+ type="date"
1267
+ data-role="due-date"
1268
+ .value=${a.dueDate??""}
1269
+ @change=${ft(n=>{const i=n===""?null:n;i!==(a.dueDate??null)&&t.dispatch({type:"SET_MILESTONE_DUE_DATE",target:{type:"milestone",id:a.id},payload:{dueDate:i}})})}
1270
+ />
1271
+ </label>`},er=(e,t,a)=>l`<span class="bd-control">
1272
+ <span id="bd-measure-label">${e.measureLabel}</span>
1273
+ <span class="bd-measures" role="radiogroup" aria-labelledby="bd-measure-label">
1274
+ ${xt.map(s=>l`<label class="bd-measure"
1275
+ ><input
1276
+ type="radio"
1277
+ name="bd-measure"
1278
+ value=${s}
1279
+ .checked=${s===a}
1280
+ @change=${()=>t.dispatch({type:"SET_MEASURE",target:{type:"page",id:"usm"},payload:{measure:s}})}
1281
+ />${e.measureName(s)}</label
1282
+ >`)}
1283
+ </span>
1284
+ </span>`,tr=(e,t,a)=>{const{state:s}=t,n=Bt(s),i=Ea(n),r=s.estimates.map(d=>`${d.name} ${d.points}`).join(" \xB7 "),o=Ue(i).map((d,p)=>`${n[p]?.name??""} ${Math.round(d*10)/10}`).join(" \xB7 ");return l`<details class="bd-settings" data-testid="usm-measure-settings" open>
1285
+ <summary class="bd-settings-summary">
1286
+ <span class="bd-settings-chevron" aria-hidden="true"></span>
1287
+ <span class="bd-settings-title">${e.measureSettingsLabel}</span>
1288
+ <span class="bd-settings-gist">
1289
+ <span>${e.estimatesLabel}: ${r===""?"\u2014":`${r} pt`}</span>
1290
+ ${a==="weighted"?l`<span>${e.statusWeightLabel}: ${i.length===0?"\u2014":o}</span>`:m}
1291
+ </span>
1292
+ </summary>
1293
+ <div class="bd-settings-body">
1294
+ ${nr(e,t)} ${a==="weighted"?rr(e,t):m}
1295
+ </div>
1296
+ </details>`},ar=(e,t,a,s,n)=>{const{state:i}=t,r=cn(i,a.id,n.getTime()),o=s==="weighted",d=i.stories.filter(p=>p.milestoneId===a.id&&p.estimateId===void 0).length;return l`
1297
+ ${s!=="stories"&&d>0?l`<p class="bd-warning" role="note" data-testid="usm-unestimated-warning">
1298
+ ${ji()}<span>${e.unestimatedNote(d)}</span>
1299
+ </p>`:m}
1300
+ <figure class="bd-chart bd-chart--combined">
1301
+ <figcaption>
1302
+ <span class="bd-chart-title">${e.combinedChartTitle(o)}</span>
1303
+ <span class="bd-about">
1304
+ <button class="bd-about-btn" type="button" aria-label=${e.chartAbout} aria-describedby="bd-about-tip">
1305
+ ${Wi()}
1306
+ </button>
1307
+ <span class="bd-about-tip" id="bd-about-tip" role="tooltip">${e.combinedChartHint(s)}</span>
1308
+ </span>
1309
+ <span class="bd-chart-latest">${e.chartLatest(ja(r.combined))}</span>
1310
+ </figcaption>
1311
+ ${Wa({chart:"combined",title:e.combinedChartTitle(o),points:r.combined,due:r.due,now:n.getTime(),size:Xi,tone:"accent"})}
1312
+ </figure>
1313
+ ${r.byStatus.length===0?m:l`<section class="bd-multiples" aria-label=${e.statusChartsLabel}>
1314
+ <h3>${e.statusChartsLabel}</h3>
1315
+ <div class="bd-grid">
1316
+ ${r.byStatus.map(({status:p,points:u})=>l`<figure class="bd-chart" data-status=${p.id}>
1317
+ <figcaption>
1318
+ <span class="bd-chart-title">${e.statusChartTitle(p.name)}</span>
1319
+ <span class="bd-chart-latest">${e.chartLatest(ja(u))}</span>
1320
+ </figcaption>
1321
+ ${Wa({chart:"status",statusId:p.id,title:e.statusChartTitle(p.name),points:u,due:r.due,now:n.getTime(),size:Zi,tone:p.tone})}
1322
+ </figure>`)}
1323
+ </div>
1324
+ </section>`}
1325
+ `},Wa=e=>l`<dpk-internal-usm-burndown-chart
1326
+ data-chart=${e.chart}
1327
+ data-status=${e.statusId??m}
1328
+ .points=${e.points}
1329
+ .due=${e.due}
1330
+ .now=${e.now}
1331
+ .size=${e.size}
1332
+ .tone=${e.tone}
1333
+ .label=${e.title}
1334
+ ></dpk-internal-usm-burndown-chart>`,sr=(e,t)=>{const a=[...t.state.snapshots].reverse();return l`<section class="bd-panel">
1335
+ <h3>${e.snapshotsLabel}<span class="bd-count">${a.length}</span></h3>
1336
+ ${a.length===0?l`<p class="bd-empty">${e.noSnapshots} ${e.chartNeedsSnapshot}</p>`:l`<ol class="bd-snapshots">
1337
+ ${B(a,s=>s.id,s=>{const n={type:"snapshot",id:s.id},i=le(s.at),r=s.tally.reduce((o,d)=>o+d.stories,0);return l`<li data-snapshot=${s.id} data-dpk-target=${_(n)}>
1338
+ <span class="bd-snapshot-at">${i}</span>
1339
+ <span class="bd-snapshot-sum">${e.storyCount(r)}</span>
1340
+ <button
1341
+ class="dpk-icon-btn"
1342
+ type="button"
1343
+ data-role="delete-snapshot"
1344
+ aria-label=${e.deleteSnapshotAria(i)}
1345
+ @click=${()=>t.dispatch({type:"DELETE_SNAPSHOT",target:n,payload:{}})}
1346
+ >
1347
+ ${Te()}
1348
+ </button>
1349
+ </li>`})}
1350
+ </ol>`}
1351
+ </section>`},nr=(e,t)=>{const{estimates:a}=t.state;return l`<section class="bd-panel" data-testid="usm-estimates">
1352
+ <h3>${e.estimatesLabel}<span class="bd-count">${a.length}</span></h3>
1353
+ <p class="bd-empty">${e.estimatesHint}</p>
1354
+ ${a.length===0?m:l`<ol class="bd-estimates">
1355
+ ${B(a,s=>s.id,(s,n)=>ir(e,t,s,n))}
1356
+ </ol>`}
1357
+ <div>
1358
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>_i(e,t)}>
1359
+ ${e.newEstimateButton}
1360
+ </button>
1361
+ </div>
1362
+ </section>`},ir=(e,t,a,s)=>{const{estimates:n}=t.state,i={type:"estimate",id:a.id};return l`<li data-estimate=${a.id} data-dpk-target=${_(i)}>
1363
+ <span class="bd-estimate-name">
1364
+ <dpk-component-inline-edit
1365
+ .value=${a.name}
1366
+ .label=${e.estimateNameLabel}
1367
+ @dpk-commit=${X(r=>t.dispatch({type:"SET_ESTIMATE_NAME",target:i,payload:{name:r}}))}
1368
+ ></dpk-component-inline-edit>
1369
+ </span>
1370
+ <label class="bd-estimate-points">
1371
+ <input
1372
+ class="dpk-input"
1373
+ type="number"
1374
+ min="0"
1375
+ step="any"
1376
+ inputmode="decimal"
1377
+ data-role="points"
1378
+ aria-label=${e.estimatePointsLabel}
1379
+ .value=${String(a.points)}
1380
+ @change=${Gi(a.points,r=>t.dispatch({type:"SET_ESTIMATE_POINTS",target:i,payload:{points:r}}))}
1381
+ />
1382
+ <span>pt</span>
1383
+ </label>
1384
+ ${He(e,{ids:n.map(r=>r.id),row:{previousId:n[s-1]?.id??null,nextId:n[s+1]?.id??null},deleteLabel:e.deleteEstimateAria,reorder:r=>t.dispatch({type:"REORDER_ESTIMATE",target:i,payload:{after:r}}),remove:()=>t.dispatch({type:"DELETE_ESTIMATE",target:i,payload:{}})})}
1385
+ </li>`},rr=(e,t)=>{const{state:a}=t,s=Bt(a),n=Ea(s);return l`<section class="bd-panel" data-testid="usm-weights">
1386
+ <h3>${e.statusWeightLabel}</h3>
1387
+ <p class="bd-empty">${e.statusWeightHint}</p>
1388
+ ${n.length>0?l`<dpk-internal-usm-weight-bar
1389
+ .statuses=${ce(a).slice(0,s.length)}
1390
+ .dividers=${n}
1391
+ .commit=${i=>{for(const{statusId:r,weight:o}of ci(s,i))t.dispatch({type:"SET_STATUS_WEIGHT",target:{type:"status",id:r},payload:{weight:o}})}}
1392
+ ></dpk-internal-usm-weight-bar>`:l`<p class="bd-empty">${e.weightsNeedStatuses}</p>`}
1393
+ </section>`},ja=e=>e.at(-1)?.value??0,or=K`
1394
+ .bd-overview {
1395
+ display: grid;
1396
+ gap: 18px;
1397
+ max-width: 1040px;
1398
+ padding: 28px 0 40px;
1399
+ }
1400
+ .bd-bar {
1401
+ display: flex;
1402
+ flex-wrap: wrap;
1403
+ align-items: flex-end;
1404
+ gap: 12px 16px;
1405
+ }
1406
+ .bd-control {
1407
+ display: grid;
1408
+ gap: 4px;
1409
+ min-width: 0;
1410
+ }
1411
+ .bd-control > span:first-child {
1412
+ color: var(--dpk-ink-faint);
1413
+ font-size: 11px;
1414
+ font-weight: 600;
1415
+ }
1416
+ .bd-control .dpk-select {
1417
+ min-width: 160px;
1418
+ }
1419
+ .bd-control .dpk-input {
1420
+ width: 160px;
1421
+ font-family: var(--dpk-mono);
1422
+ font-variant-numeric: tabular-nums;
1423
+ }
1424
+ /* One row at any width: on a narrow screen each option wraps its own name instead of the row wrapping. */
1425
+ .bd-measures {
1426
+ display: inline-flex;
1427
+ max-width: 100%;
1428
+ padding: 2px;
1429
+ border: 1px solid var(--dpk-rule-strong);
1430
+ border-radius: var(--dpk-radius-sm);
1431
+ background: var(--dpk-paper-sunken);
1432
+ }
1433
+ .bd-measure {
1434
+ position: relative;
1435
+ display: grid;
1436
+ flex: 1 1 auto;
1437
+ place-items: center;
1438
+ min-width: 0;
1439
+ padding: 4px 12px;
1440
+ text-align: center;
1441
+ border-radius: calc(var(--dpk-radius-sm) - 2px);
1442
+ color: var(--dpk-ink-soft);
1443
+ font-size: 12.5px;
1444
+ font-weight: 600;
1445
+ cursor: pointer;
1446
+ }
1447
+ /* The radio stays in the page for the keyboard and the reader; the label is what shows. */
1448
+ .bd-measure input {
1449
+ position: absolute;
1450
+ inset: 0;
1451
+ margin: 0;
1452
+ opacity: 0;
1453
+ cursor: pointer;
1454
+ }
1455
+ .bd-measure:has(input:checked) {
1456
+ background: var(--dpk-paper-raised);
1457
+ color: var(--dpk-ink);
1458
+ box-shadow: var(--dpk-shadow-xs);
1459
+ }
1460
+ .bd-measure:has(input:focus-visible) {
1461
+ box-shadow: var(--dpk-focus);
1462
+ }
1463
+ .bd-settings {
1464
+ display: grid;
1465
+ gap: 10px;
1466
+ }
1467
+ .bd-settings-summary {
1468
+ display: flex;
1469
+ flex-wrap: wrap;
1470
+ align-items: center;
1471
+ gap: 4px 10px;
1472
+ justify-self: start;
1473
+ padding: 4px 10px 4px 6px;
1474
+ border-radius: var(--dpk-radius-sm);
1475
+ color: var(--dpk-ink-soft);
1476
+ font-size: 12px;
1477
+ list-style: none;
1478
+ cursor: pointer;
1479
+ user-select: none;
1480
+ }
1481
+ .bd-settings-summary::-webkit-details-marker {
1482
+ display: none;
1483
+ }
1484
+ .bd-settings-summary:hover {
1485
+ background: var(--dpk-paper-sunken);
1486
+ color: var(--dpk-ink);
1487
+ }
1488
+ .bd-settings-summary:focus-visible {
1489
+ outline: none;
1490
+ box-shadow: var(--dpk-focus);
1491
+ }
1492
+ .bd-settings-chevron {
1493
+ width: 6px;
1494
+ height: 6px;
1495
+ margin: 0 3px;
1496
+ border-right: 1.5px solid currentColor;
1497
+ border-bottom: 1.5px solid currentColor;
1498
+ transform: rotate(-45deg);
1499
+ transition: transform 160ms var(--dpk-ease);
1500
+ }
1501
+ .bd-settings[open] .bd-settings-chevron {
1502
+ transform: rotate(45deg);
1503
+ }
1504
+ .bd-settings-title {
1505
+ font-weight: 650;
1506
+ }
1507
+ .bd-settings-gist {
1508
+ display: inline-flex;
1509
+ flex-wrap: wrap;
1510
+ gap: 2px 14px;
1511
+ color: var(--dpk-ink-faint);
1512
+ font-family: var(--dpk-mono);
1513
+ font-size: 11.5px;
1514
+ font-variant-numeric: tabular-nums;
1515
+ }
1516
+ /* Side by side while both fit; the scale alone takes the row. */
1517
+ .bd-settings-body {
1518
+ display: grid;
1519
+ grid-template-columns: repeat(auto-fit, minmax(max(300px, calc((100% - 12px) / 2)), 1fr));
1520
+ gap: 12px;
1521
+ align-items: start;
1522
+ }
1523
+ .bd-record {
1524
+ margin-left: auto;
1525
+ }
1526
+ .bd-warning {
1527
+ display: flex;
1528
+ align-items: flex-start;
1529
+ gap: 8px;
1530
+ margin: 0;
1531
+ padding: 8px 12px;
1532
+ border: 1px solid color-mix(in oklab, var(--dpk-amber) 40%, var(--dpk-rule));
1533
+ border-radius: var(--dpk-radius-sm);
1534
+ background: color-mix(in oklab, var(--dpk-amber) 10%, var(--dpk-paper-raised));
1535
+ color: var(--dpk-ink);
1536
+ font-size: 12.5px;
1537
+ line-height: 1.5;
1538
+ }
1539
+ .bd-warning svg {
1540
+ flex: none;
1541
+ width: 15px;
1542
+ height: 15px;
1543
+ margin-top: 2px;
1544
+ color: var(--dpk-amber);
1545
+ }
1546
+ .bd-empty {
1547
+ margin: 0;
1548
+ color: var(--dpk-ink-faint);
1549
+ font-size: 12px;
1550
+ line-height: 1.5;
1551
+ }
1552
+ .bd-chart {
1553
+ display: grid;
1554
+ gap: 8px;
1555
+ margin: 0;
1556
+ padding: 14px 16px 10px;
1557
+ border: 1px solid var(--dpk-rule);
1558
+ border-radius: var(--dpk-radius-lg);
1559
+ background: var(--dpk-paper-raised);
1560
+ box-shadow: var(--dpk-shadow-xs);
1561
+ }
1562
+ .bd-chart figcaption {
1563
+ display: flex;
1564
+ flex-wrap: wrap;
1565
+ align-items: baseline;
1566
+ gap: 4px 12px;
1567
+ }
1568
+ .bd-chart-title {
1569
+ font-size: 13.5px;
1570
+ font-weight: 650;
1571
+ }
1572
+ .bd-chart-latest {
1573
+ margin-left: auto;
1574
+ color: var(--dpk-ink-soft);
1575
+ font-family: var(--dpk-mono);
1576
+ font-size: 12px;
1577
+ font-variant-numeric: tabular-nums;
1578
+ }
1579
+ .bd-about {
1580
+ position: relative;
1581
+ display: inline-flex;
1582
+ align-self: center;
1583
+ }
1584
+ .bd-about-btn {
1585
+ display: inline-grid;
1586
+ place-items: center;
1587
+ width: 20px;
1588
+ height: 20px;
1589
+ padding: 0;
1590
+ border: 0;
1591
+ border-radius: 50%;
1592
+ background: none;
1593
+ color: var(--dpk-ink-faint);
1594
+ cursor: help;
1595
+ }
1596
+ .bd-about-btn:hover,
1597
+ .bd-about-btn:focus-visible {
1598
+ outline: none;
1599
+ color: var(--dpk-ink);
1600
+ }
1601
+ .bd-about-btn:focus-visible {
1602
+ box-shadow: var(--dpk-focus);
1603
+ }
1604
+ .bd-about-btn svg {
1605
+ width: 15px;
1606
+ height: 15px;
1607
+ }
1608
+ .bd-about-tip {
1609
+ position: absolute;
1610
+ top: calc(100% + 6px);
1611
+ left: -8px;
1612
+ z-index: 2;
1613
+ width: max-content;
1614
+ max-width: 360px;
1615
+ padding: 8px 10px;
1616
+ border: 1px solid var(--dpk-rule-strong);
1617
+ border-radius: var(--dpk-radius-sm);
1618
+ background: var(--dpk-paper-raised);
1619
+ box-shadow: var(--dpk-shadow-sm);
1620
+ color: var(--dpk-ink-soft);
1621
+ font-size: 12px;
1622
+ font-weight: 400;
1623
+ line-height: 1.5;
1624
+ visibility: hidden;
1625
+ opacity: 0;
1626
+ transition: opacity 120ms var(--dpk-ease);
1627
+ }
1628
+ .bd-about:hover .bd-about-tip,
1629
+ .bd-about-btn:focus-visible + .bd-about-tip {
1630
+ visibility: visible;
1631
+ opacity: 1;
1632
+ }
1633
+ .bd-multiples {
1634
+ display: grid;
1635
+ gap: 10px;
1636
+ }
1637
+ .bd-multiples h3,
1638
+ .bd-panel h3 {
1639
+ display: flex;
1640
+ align-items: center;
1641
+ gap: 8px;
1642
+ margin: 0;
1643
+ color: var(--dpk-ink-soft);
1644
+ font-size: 12px;
1645
+ font-weight: 650;
1646
+ letter-spacing: 0.02em;
1647
+ }
1648
+ .bd-grid {
1649
+ display: grid;
1650
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
1651
+ gap: 12px;
1652
+ }
1653
+ .bd-side {
1654
+ display: grid;
1655
+ gap: 12px;
1656
+ align-items: start;
1657
+ }
1658
+ .bd-panel {
1659
+ display: grid;
1660
+ gap: 10px;
1661
+ padding: 14px 16px;
1662
+ border: 1px solid var(--dpk-rule);
1663
+ border-radius: var(--dpk-radius-lg);
1664
+ background: var(--dpk-paper-raised);
1665
+ box-shadow: var(--dpk-shadow-xs);
1666
+ }
1667
+ .bd-count {
1668
+ color: var(--dpk-ink-faint);
1669
+ font-family: var(--dpk-mono);
1670
+ font-weight: 500;
1671
+ }
1672
+ .bd-snapshots,
1673
+ .bd-estimates {
1674
+ display: grid;
1675
+ margin: 0;
1676
+ padding: 0;
1677
+ list-style: none;
1678
+ }
1679
+ .bd-snapshots li,
1680
+ .bd-estimates li {
1681
+ display: grid;
1682
+ align-items: center;
1683
+ gap: 10px;
1684
+ min-height: 34px;
1685
+ }
1686
+ .bd-snapshots li {
1687
+ grid-template-columns: minmax(0, 1fr) auto 26px;
1688
+ }
1689
+ .bd-estimates li {
1690
+ grid-template-columns: minmax(0, 1fr) 96px auto;
1691
+ }
1692
+ .bd-snapshots li + li,
1693
+ .bd-estimates li + li {
1694
+ border-top: 1px solid var(--dpk-rule);
1695
+ }
1696
+ .bd-snapshot-at,
1697
+ .bd-snapshot-sum {
1698
+ font-family: var(--dpk-mono);
1699
+ font-size: 12px;
1700
+ font-variant-numeric: tabular-nums;
1701
+ }
1702
+ .bd-snapshot-sum {
1703
+ color: var(--dpk-ink-faint);
1704
+ }
1705
+ .bd-snapshots .dpk-icon-btn {
1706
+ width: 26px;
1707
+ height: 26px;
1708
+ }
1709
+ .bd-estimate-name {
1710
+ min-width: 0;
1711
+ font-family: var(--dpk-mono);
1712
+ font-size: 13px;
1713
+ font-weight: 650;
1714
+ }
1715
+ .bd-estimate-points {
1716
+ display: inline-flex;
1717
+ align-items: center;
1718
+ gap: 5px;
1719
+ color: var(--dpk-ink-faint);
1720
+ font-size: 11px;
1721
+ }
1722
+ .bd-estimate-points .dpk-input {
1723
+ min-height: 28px;
1724
+ padding: 3px 8px;
1725
+ font-family: var(--dpk-mono);
1726
+ font-size: 12px;
1727
+ font-variant-numeric: tabular-nums;
1728
+ }
1729
+ @media (prefers-reduced-motion: reduce) {
1730
+ .bd-settings-chevron {
1731
+ transition: none;
1732
+ }
1733
+ }
1734
+ @media (max-width: 640px) {
1735
+ .bd-record {
1736
+ margin-left: 0;
1737
+ }
1738
+ .bd-control .dpk-select,
1739
+ .bd-control .dpk-input {
1740
+ width: 100%;
1741
+ min-width: 0;
1742
+ }
1743
+ }
1744
+ `,dr=/[ァ-ヶ]/g,Xa=e=>e.normalize("NFKC").toLowerCase().replace(dr,t=>String.fromCharCode(t.charCodeAt(0)-96)),lr=(e,t)=>{const a=Xa(t).split(/\s+/).filter(Boolean),s=Xa(e);return a.every(n=>s.includes(n))},Za=(e,t,a,s)=>(a==="blocker"?$n(e,t):En(e,t)).flatMap(i=>{const r=M(e,`${i.activityId}.${i.stepId}`),o=r?[r.activity.name,r.step.name]:[];return lr([i.name,...o].join(" "),s)?[{story:i,place:o}]:[]}),Ja=(e,t,a,s,n,i)=>{const{state:r}=t;if(Za(r,a,s,"").length===0)return m;const o=n.search?.side===s?n.search:null,d=o?Za(r,a,s,o.query):[],p=Math.max(0,Math.min(o?.active??0,d.length-1)),u=o?d[p]:void 0,y=s==="blocker"?e.addBlockerPlaceholder:e.addDependentPlaceholder,E=`dep-${s}-choices`,b=T=>`dep-${s}-${T.story.id}`,c=T=>{o||!(T.currentTarget instanceof HTMLInputElement)||n.set({side:s,query:T.currentTarget.value,active:0})},g=T=>{i(T.story.id),n.set(null)},ae=T=>{if(!T.isComposing)switch(Qa(T)){case"ArrowDown":case"ArrowUp":{if(T.preventDefault(),!o){c(T);return}if(d.length===0)return;const xe=Qa(T)==="ArrowDown"?1:-1;n.set({...o,active:(p+xe+d.length)%d.length});return}case"Enter":if(!u)return;T.preventDefault(),g(u);return;case"Escape":if(!o)return;T.preventDefault(),n.set(null);return}};return l`<div class="sp-dep-picker">
1745
+ <input
1746
+ class="dpk-input sp-dep-search"
1747
+ type="text"
1748
+ role="combobox"
1749
+ data-role=${`add-${s}`}
1750
+ aria-label=${y}
1751
+ placeholder=${y}
1752
+ autocomplete="off"
1753
+ spellcheck="false"
1754
+ aria-autocomplete="list"
1755
+ aria-expanded=${String(d.length>0)}
1756
+ aria-controls=${E}
1757
+ aria-activedescendant=${u?b(u):m}
1758
+ .value=${o?.query??""}
1759
+ @focus=${c}
1760
+ @click=${c}
1761
+ @input=${T=>{T.currentTarget instanceof HTMLInputElement&&n.set({side:s,query:T.currentTarget.value,active:0})}}
1762
+ @keydown=${ae}
1763
+ @blur=${()=>{o&&n.set(null)}}
1764
+ />
1765
+ ${o?d.length===0?l`<p class="sp-dep-none" role="status">${e.noDependencyMatch}</p>`:l`<ul id=${E} class="sp-dep-choices" role="listbox" aria-label=${y}>
1766
+ ${d.map(T=>pr(r,T,b(T),T===u,g))}
1767
+ </ul>`:m}
1768
+ </div>`},Qa=e=>!e.ctrlKey||e.altKey||e.metaKey||e.shiftKey?e.key:e.key==="n"?"ArrowDown":e.key==="p"?"ArrowUp":e.key,pr=(e,t,a,s,n)=>{const i=ce(e).find(r=>r.id===t.story.statusId);return l`<li
1769
+ id=${a}
1770
+ role="option"
1771
+ data-story=${t.story.id}
1772
+ aria-selected=${String(s)}
1773
+ @pointerdown=${r=>r.preventDefault()}
1774
+ @click=${()=>n(t)}
1775
+ >
1776
+ <span class="sp-dep-choice-name" style=${I(i?.tone)}>
1777
+ ${i?re(i):m}<span>${t.story.name}</span>
1778
+ </span>
1779
+ ${t.place.length===0?m:l`<span class="sp-dep-choice-place">${t.place.map(r=>l`<span>${r}</span>`)}</span>`}
1780
+ </li>`},cr=K`
1781
+ .sp-dep-picker {
1782
+ display: grid;
1783
+ gap: 4px;
1784
+ }
1785
+ /* The choices push the panel's content down rather than float: the panel
1786
+ scrolls, and a list hanging out of it would be cut. */
1787
+ .sp-dep-choices {
1788
+ display: grid;
1789
+ gap: 1px;
1790
+ max-height: 240px;
1791
+ margin: 0;
1792
+ padding: 4px;
1793
+ overflow-y: auto;
1794
+ overscroll-behavior: contain;
1795
+ border: 1px solid var(--dpk-rule-strong);
1796
+ border-radius: var(--dpk-radius-sm);
1797
+ background: var(--dpk-paper-raised);
1798
+ box-shadow: var(--dpk-shadow-xs);
1799
+ list-style: none;
1800
+ }
1801
+ .sp-dep-choices [role='option'] {
1802
+ display: grid;
1803
+ gap: 1px;
1804
+ padding: 5px 8px;
1805
+ border-radius: var(--dpk-radius-sm);
1806
+ cursor: pointer;
1807
+ }
1808
+ .sp-dep-choices [role='option']:hover,
1809
+ .sp-dep-choices [role='option'][aria-selected='true'] {
1810
+ background: var(--dpk-paper-sunken);
1811
+ }
1812
+ .sp-dep-choice-name {
1813
+ display: flex;
1814
+ align-items: center;
1815
+ gap: 8px;
1816
+ min-width: 0;
1817
+ color: var(--dpk-ink);
1818
+ font-size: 12.5px;
1819
+ font-weight: 600;
1820
+ }
1821
+ .sp-dep-choice-name > span,
1822
+ .sp-dep-choice-place {
1823
+ overflow: hidden;
1824
+ text-overflow: ellipsis;
1825
+ white-space: nowrap;
1826
+ }
1827
+ .sp-dep-choice-place {
1828
+ padding-left: 22px;
1829
+ color: var(--dpk-ink-faint);
1830
+ font-size: 11px;
1831
+ }
1832
+ .sp-dep-choice-place span + span::before {
1833
+ content: ' / ';
1834
+ }
1835
+ .sp-dep-none {
1836
+ margin: 0;
1837
+ padding: 6px 2px;
1838
+ color: var(--dpk-ink-faint);
1839
+ font-size: 12px;
1840
+ }
1841
+ `,ur=C(Gs),mr=(e,t)=>{const a=Ce(t.navigation)==="critical-path",s=a?Qt(t.state).ids.size:null;return l`<button
1842
+ class="dpk-btn dpk-btn--ghost highlight-toggle"
1843
+ type="button"
1844
+ data-highlight-toggle="critical-path"
1845
+ aria-pressed=${String(a)}
1846
+ title=${e.criticalPathHint}
1847
+ @click=${()=>t.navigate({highlight:a?null:"critical-path"})}
1848
+ >
1849
+ ${ur()}<span>${e.criticalPathButton}</span>
1850
+ ${s===null?m:l`<span class="highlight-count">${e.criticalPathCount(s)}</span>`}
1851
+ </button>`},hr=K`
1852
+ .highlight-toggle {
1853
+ gap: 6px;
1854
+ margin-left: auto;
1855
+ }
1856
+ .highlight-toggle svg {
1857
+ width: 14px;
1858
+ height: 14px;
1859
+ }
1860
+ .highlight-toggle[aria-pressed='true'] {
1861
+ border-color: color-mix(in oklab, var(--dpk-accent) 55%, var(--dpk-rule-strong));
1862
+ background: color-mix(in oklab, var(--dpk-accent) 12%, var(--dpk-paper-raised));
1863
+ color: var(--dpk-ink);
1864
+ }
1865
+ .highlight-toggle[aria-pressed='true'] svg {
1866
+ color: var(--dpk-accent);
1867
+ }
1868
+ .highlight-count {
1869
+ color: var(--dpk-ink-soft);
1870
+ font-family: var(--dpk-mono);
1871
+ font-size: 10.5px;
1872
+ font-variant-numeric: tabular-nums;
1873
+ }
1874
+ `,gr=(e,t,a)=>l`
1875
+ <section class="st-overview" data-testid="usm-labels">
1876
+ ${a.rows.length===0?l`<div class="empty">
1877
+ <h2>${e.noLabelsTitle}</h2>
1878
+ <p>${e.noLabelsBody}</p>
1879
+ </div>`:m}
1880
+ <ol class="st-list">
1881
+ ${B(a.rows,s=>s.id,s=>br(e,t,s))}
1882
+ </ol>
1883
+ <div>
1884
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ti(e,t)}>
1885
+ ${e.newLabelButton}
1886
+ </button>
1887
+ </div>
1888
+ </section>
1889
+ `,br=(e,t,a)=>{const s={type:"label",id:a.id};return l`
1890
+ <li class="st-row" data-label=${a.id} data-dpk-target=${_(s)} style=${I(a.tone)}>
1891
+ <span class="label-swatch" aria-hidden="true"></span>
1892
+ <span class="st-name">
1893
+ <dpk-component-inline-edit
1894
+ .value=${a.name}
1895
+ .label=${e.labelNameLabel}
1896
+ @dpk-commit=${X(n=>t.dispatch({type:"SET_LABEL_NAME",target:s,payload:{name:n}}))}
1897
+ ></dpk-component-inline-edit>
1898
+ </span>
1899
+ ${mt(e,a.storyCount,a.share)}
1900
+ ${ut(e,a.tone,n=>t.dispatch({type:"SET_LABEL_TONE",target:s,payload:{tone:n}}))}
1901
+ ${He(e,{ids:t.state.labels.map(n=>n.id),row:a,deleteLabel:e.deleteLabelAria,reorder:n=>t.dispatch({type:"REORDER_LABEL",target:s,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_LABEL",target:s,payload:{}})})}
1902
+ </li>
1903
+ `},fr=(e,t,a)=>{const{state:s}=t,n=ke.filter(o=>ge(s,o).length>0);if(n.length===0)return m;const i=Be(s,t.navigation),r=Object.fromEntries(ke.map(o=>[o,null]));return l`<div class="map-filter" role="group" aria-label=${e.filterLabel} data-testid="usm-map-filter">
1904
+ ${n.map(o=>yr(e,t,i,o,a))} ${vr(e,t)}
1905
+ ${Mn(i)?l`<a class="filter-clear" href=${t.hashFor(r)}>${e.clearFilter}</a>`:m}
1906
+ </div>`},vr=(e,t)=>{const{state:a}=t,s=Nt(a);if(!s||a.statuses.length<2)return m;const n=ta(a,t.navigation).size===0,i=a.stories.filter(r=>ye(a,r)).length;return l`<label class="show-finished">
1907
+ <input
1908
+ type="checkbox"
1909
+ data-show-finished
1910
+ .checked=${n}
1911
+ @change=${r=>{const o=r.currentTarget instanceof HTMLInputElement&&r.currentTarget.checked;t.navigate({[ie.key]:o?ie.value:null})}}
1912
+ />
1913
+ <span>${e.showFinished(s.name)}</span>
1914
+ <span class="show-finished-count">${i}</span>
1915
+ </label>`},yr=(e,t,a,s,n)=>{const i=a[s],r=xr(e,t.state,a.hiddenStatusIds,s),o=r.filter(p=>i.has(p.id)),d=n.openFor===s;return l`<span class="filter-field">
1916
+ <button
1917
+ class="dpk-select filter-select"
1918
+ type="button"
1919
+ data-filter-trigger=${s}
1920
+ data-active=${String(o.length>0)}
1921
+ aria-haspopup="menu"
1922
+ aria-expanded=${String(d)}
1923
+ @click=${()=>n.toggle(s)}
1924
+ >
1925
+ <span class="filter-key">${e.filterKeyLabel(s)}</span>
1926
+ <span class="filter-value">${kr(e,o)}</span>
1927
+ </button>
1928
+ ${d?wr(e,t,s,i,r,n):m}
1929
+ </span>`},kr=(e,t)=>{const[a]=t;return a?t.length===1?a.name:`${a.name} +${t.length-1}`:e.filterAll},wr=(e,t,a,s,n,i)=>l`<div
1930
+ id="filter-menu"
1931
+ class="comment-pop filter-menu"
1932
+ popover="manual"
1933
+ role="menu"
1934
+ aria-label=${e.filterKeyLabel(a)}
1935
+ data-filter=${a}
1936
+ @keydown=${r=>{r.key==="Escape"&&(r.preventDefault(),i.close())}}
1937
+ >
1938
+ <a
1939
+ class="filter-option"
1940
+ role="menuitemcheckbox"
1941
+ data-option=""
1942
+ aria-checked=${String(s.size===0)}
1943
+ href=${t.hashFor({[a]:null})}
1944
+ >
1945
+ <span class="filter-check">${s.size===0?vt():m}</span>
1946
+ <span class="filter-name">${e.filterAll}</span>
1947
+ </a>
1948
+ ${n.map(r=>{const o=s.has(r.id);return l`<a
1949
+ class="filter-option"
1950
+ role="menuitemcheckbox"
1951
+ data-option=${r.id}
1952
+ data-none=${r.id===ne?"true":m}
1953
+ aria-checked=${String(o)}
1954
+ style=${r.style}
1955
+ href=${t.hashFor({[a]:aa(t.state,a,In(s,r.id))})}
1956
+ >
1957
+ <span class="filter-check">${o?vt():m}</span>
1958
+ ${r.mark}
1959
+ <span class="filter-name" title=${r.name}>${r.name}</span>
1960
+ <span class="filter-count">${r.count}</span>
1961
+ </a>`})}
1962
+ </div>`,xr=(e,t,a,s)=>{const n=i=>t.stories.filter(r=>r.statusId===void 0||!a.has(r.statusId)).filter(i).length;switch(s){case"status":return ce(t).filter(i=>!a.has(i.id)).map(i=>({id:i.id,name:i.name,count:n(r=>r.statusId===i.id),mark:re(i),style:I(i.tone)}));case"label":return ge(t,s).map(i=>{const r=t.labels.find(o=>o.id===i);return{id:i,name:r?.name??e.noLabel,count:n(o=>r?(o.labelIds??[]).includes(i):(o.labelIds??[]).length===0),mark:l`<span class="filter-dot"></span>`,style:I(r?.tone)}});case"estimate":return ge(t,s).map(i=>{const r=G(t,i);return{id:i,name:r?.name??e.unestimatedFilter,count:n(o=>(o.estimateId??ne)===i),mark:r?l`<span class="filter-points">${r.points}pt</span>`:m,style:""}});case"assignee":return ge(t,s).map(i=>{const r=F(t,i);return{id:i,name:r?.name??e.noAssigneeFilter,count:n(o=>(o.assigneeId??ne)===i),mark:l`<span class="filter-dot"></span>`,style:I(r?.tone)}})}},$r=K`
1963
+ .show-finished {
1964
+ display: inline-flex;
1965
+ align-items: center;
1966
+ gap: 6px;
1967
+ padding: 0 4px;
1968
+ color: var(--dpk-ink-soft);
1969
+ font-size: 12px;
1970
+ font-weight: 600;
1971
+ cursor: pointer;
1972
+ user-select: none;
1973
+ }
1974
+ .show-finished input {
1975
+ margin: 0;
1976
+ accent-color: var(--dpk-blue);
1977
+ }
1978
+ .show-finished-count {
1979
+ color: var(--dpk-ink-faint);
1980
+ font-family: var(--dpk-mono);
1981
+ font-size: 10.5px;
1982
+ font-variant-numeric: tabular-nums;
1983
+ }
1984
+ .map-filter {
1985
+ display: flex;
1986
+ flex-wrap: wrap;
1987
+ align-items: center;
1988
+ gap: 8px;
1989
+ min-width: 0;
1990
+ }
1991
+ .filter-field {
1992
+ min-width: 0;
1993
+ }
1994
+ .filter-select {
1995
+ display: inline-flex;
1996
+ align-items: baseline;
1997
+ gap: 6px;
1998
+ width: auto;
1999
+ max-width: 260px;
2000
+ text-align: left;
2001
+ }
2002
+ .filter-select[data-active='true'] {
2003
+ border-color: color-mix(in oklab, var(--dpk-blue) 55%, var(--dpk-rule-strong));
2004
+ background-color: color-mix(in oklab, var(--dpk-blue) 8%, var(--dpk-paper-raised));
2005
+ }
2006
+ .filter-key {
2007
+ flex: none;
2008
+ color: var(--dpk-ink-faint);
2009
+ font-size: 11.5px;
2010
+ font-weight: 600;
2011
+ }
2012
+ .filter-value {
2013
+ min-width: 0;
2014
+ overflow: hidden;
2015
+ color: var(--dpk-ink);
2016
+ font-weight: 600;
2017
+ text-overflow: ellipsis;
2018
+ white-space: nowrap;
2019
+ }
2020
+ .filter-clear {
2021
+ margin-left: 2px;
2022
+ color: var(--dpk-blue);
2023
+ font-size: 12px;
2024
+ font-weight: 600;
2025
+ text-decoration: none;
2026
+ }
2027
+ .filter-clear:hover {
2028
+ text-decoration: underline;
2029
+ }
2030
+ .comment-pop.filter-menu {
2031
+ gap: 1px;
2032
+ padding: 6px;
2033
+ }
2034
+ .filter-option {
2035
+ display: flex;
2036
+ align-items: center;
2037
+ gap: 8px;
2038
+ min-height: 30px;
2039
+ padding: 4px 8px;
2040
+ border-radius: var(--dpk-radius-sm);
2041
+ color: var(--dpk-ink);
2042
+ font-size: 12.5px;
2043
+ font-weight: 550;
2044
+ text-decoration: none;
2045
+ }
2046
+ .filter-option[data-none] .filter-name {
2047
+ color: var(--dpk-ink-soft);
2048
+ font-style: italic;
2049
+ }
2050
+ .filter-option:hover,
2051
+ .filter-option:focus-visible {
2052
+ outline: none;
2053
+ background: var(--dpk-paper-sunken);
2054
+ }
2055
+ .filter-option:focus-visible {
2056
+ box-shadow: var(--dpk-focus);
2057
+ }
2058
+ .filter-check {
2059
+ flex: none;
2060
+ display: inline-grid;
2061
+ place-items: center;
2062
+ width: 16px;
2063
+ height: 16px;
2064
+ color: var(--dpk-blue);
2065
+ }
2066
+ .filter-check svg {
2067
+ width: 14px;
2068
+ height: 14px;
2069
+ }
2070
+ .filter-name {
2071
+ flex: 1;
2072
+ min-width: 0;
2073
+ overflow: hidden;
2074
+ text-overflow: ellipsis;
2075
+ white-space: nowrap;
2076
+ }
2077
+ .filter-dot {
2078
+ flex: none;
2079
+ width: 8px;
2080
+ height: 8px;
2081
+ border-radius: 50%;
2082
+ background: var(--usm-tone, var(--dpk-ink-faint));
2083
+ }
2084
+ .filter-points,
2085
+ .filter-count {
2086
+ color: var(--dpk-ink-faint);
2087
+ font-family: var(--dpk-mono);
2088
+ font-size: 10.5px;
2089
+ font-variant-numeric: tabular-nums;
2090
+ }
2091
+ `,Er=(e,t,a)=>l`<div class="map-toolbar" data-testid="usm-map-toolbar">
2092
+ ${fr(e,t,a)} ${mr(e,t)}
2093
+ </div>`,Sr=K`
2094
+ .map-toolbar {
2095
+ display: flex;
2096
+ flex-wrap: wrap;
2097
+ align-items: center;
2098
+ gap: 8px 12px;
2099
+ padding: 5px 24px;
2100
+ border-bottom: 1px solid var(--dpk-rule);
2101
+ }
2102
+ `,Tr=(e,t,a)=>l`
2103
+ <section class="st-overview" data-testid="usm-members">
2104
+ ${a.rows.length===0?l`<div class="empty">
2105
+ <h2>${e.noMembersTitle}</h2>
2106
+ <p>${e.noMembersBody}</p>
2107
+ </div>`:m}
2108
+ <ol class="st-list">
2109
+ ${B(a.rows,s=>s.id,s=>Ar(e,t,s))}
2110
+ </ol>
2111
+ <div>
2112
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ai(e,t)}>
2113
+ ${e.newMemberButton}
2114
+ </button>
2115
+ </div>
2116
+ </section>
2117
+ `,Ar=(e,t,a)=>{const s={type:"member",id:a.id};return l`
2118
+ <li class="st-row" data-member=${a.id} data-dpk-target=${_(s)} style=${I(a.tone)}>
2119
+ <span class="member-avatar" aria-hidden="true">${pt(a.name)}</span>
2120
+ <span class="st-name">
2121
+ <dpk-component-inline-edit
2122
+ .value=${a.name}
2123
+ .label=${e.memberNameLabel}
2124
+ @dpk-commit=${X(n=>t.dispatch({type:"SET_MEMBER_NAME",target:s,payload:{name:n}}))}
2125
+ ></dpk-component-inline-edit>
2126
+ </span>
2127
+ ${mt(e,a.storyCount,a.share)}
2128
+ ${ut(e,a.tone,n=>t.dispatch({type:"SET_MEMBER_TONE",target:s,payload:{tone:n}}))}
2129
+ ${He(e,{ids:t.state.members.map(n=>n.id),row:a,deleteLabel:e.deleteMemberAria,reorder:n=>t.dispatch({type:"REORDER_MEMBER",target:s,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_MEMBER",target:s,payload:{}})})}
2130
+ </li>
2131
+ `},_r=(e,t,a)=>l`
2132
+ <section class="ms-overview" data-testid="usm-milestones">
2133
+ ${a.length===0?l`<div class="empty">
2134
+ <h2>${e.noMilestonesTitle}</h2>
2135
+ <p>${e.noMilestonesBody}</p>
2136
+ </div>`:m}
2137
+ <ol class="ms-timeline">
2138
+ ${B(a,s=>s.id,s=>Ir(e,t,s))}
2139
+ <li class="ms-add">
2140
+ <span class="ms-when" aria-hidden="true"></span>
2141
+ <span class="ms-rail" aria-hidden="true"><span class="ms-node ms-node--add"></span></span>
2142
+ <div class="ms-body">
2143
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Da(e,t)}>
2144
+ ${e.newMilestoneButton}
2145
+ </button>
2146
+ </div>
2147
+ </li>
2148
+ </ol>
2149
+ </section>
2150
+ `,Ir=(e,t,a)=>{const s=a.id;return l`
2151
+ <li class="ms-entry" data-milestone-card=${s} data-dpk-target=${_({type:"milestone",id:s})}>
2152
+ <div class="ms-when">
2153
+ ${a.timeframe===""?l`<span class="ms-timeframe" data-empty="true">${e.timeframeUnset}</span>`:l`<span class="ms-timeframe">${a.timeframe}</span>`}
2154
+ </div>
2155
+ <span class="ms-rail" aria-hidden="true"><span class="ms-node">${a.ordinal}</span></span>
2156
+ <article class="ms-body">
2157
+ <h3 class="ms-name">
2158
+ <dpk-component-inline-edit
2159
+ .value=${a.name}
2160
+ .label=${e.milestoneNameLabel}
2161
+ @dpk-commit=${X(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:s},payload:{name:n}}))}
2162
+ ></dpk-component-inline-edit>
2163
+ </h3>
2164
+ ${a.description===""?l`<p class="ms-description" data-empty="true">${e.milestoneNoDescription}</p>`:l`<p class="ms-description">${a.description}</p>`}
2165
+ <dl class="ms-facts">
2166
+ <div>
2167
+ <dt>${e.storiesLabel}</dt>
2168
+ <dd>
2169
+ <strong>${a.storyCount}</strong>
2170
+ <span>${e.shareOfStories(Math.round(a.share*100))}</span>
2171
+ </dd>
2172
+ </div>
2173
+ <div>
2174
+ <dt>${e.coverageLabel}</dt>
2175
+ <dd>
2176
+ <strong>${e.coverage(a.coverage.covered,a.coverage.total)}</strong>
2177
+ <span class="ms-meter" aria-hidden="true">
2178
+ <span
2179
+ style=${`width:${a.coverage.total===0?0:a.coverage.covered/a.coverage.total*100}%`}
2180
+ ></span>
2181
+ </span>
2182
+ </dd>
2183
+ </div>
2184
+ </dl>
2185
+ ${a.progress.length===0?m:Mr(e,a)}
2186
+ </article>
2187
+ </li>
2188
+ `},Mr=(e,t)=>l`
2189
+ <div class="ms-breakdown">
2190
+ ${va(t.progress,e.progressAria(t.progress.map(a=>`${a.name} ${a.count}`).join(", ")))}
2191
+ <ul class="ms-legend" aria-hidden="true">
2192
+ ${t.progress.map(a=>l`<li data-status=${a.id} style=${I(a.tone)}>
2193
+ ${re(a)}
2194
+ <span class="ms-breakdown-name">${a.name}</span>
2195
+ <span class="ms-breakdown-count">${a.count}</span>
2196
+ </li>`)}
2197
+ </ul>
2198
+ </div>
2199
+ `,Lr=(e,t,a,s)=>{if(a.kind!=="picking-step")return m;const n=S(t.state,a.storyId),i=Q(t.state,a.activityId);if(!n||!i)return m;const r=i.steps[0]?.id;return l`<div class="comment-pop move-dialog" id="move-dialog" popover="manual">
2200
+ <span class="dpk-label">${e.moveDialogLabel}</span>
2201
+ <select class="dpk-select" aria-label=${e.moveDialogSelectLabel} data-move-dialog>
2202
+ ${i.steps.map(o=>l`<option value=${o.id} ?selected=${o.id===r}>${o.name}</option>`)}
2203
+ </select>
2204
+ <div class="pop-actions">
2205
+ <button
2206
+ class="dpk-btn dpk-btn--accent"
2207
+ type="button"
2208
+ @click=${o=>{const p=($s(o.currentTarget,HTMLElement)?.closest("#move-dialog")??null)?.querySelector("select")?.value??r;p?s.confirm(p):s.cancel()}}
2209
+ >
2210
+ ${e.moveConfirm}
2211
+ </button>
2212
+ <button class="dpk-btn" type="button" @click=${s.cancel}>${e.moveCancel}</button>
2213
+ </div>
2214
+ </div>`},Dr=(e,t)=>l`<div class="board-head" data-testid="usm-board-head">${e}${t}</div>`,Rr=C(Ys),Or=(e,t,a,s)=>{const{state:n}=t,i=Xt(n),r=i.filter(o=>s.folded.has(o));return l`
2215
+ <div class="board-bar">
2216
+ <div class="page-nav" style=${`min-width: ${s.minimum}px`}>
2217
+ <div class="page-tabs" role="tablist" aria-label=${e.pageTabsLabel}>
2218
+ ${i.map(o=>Nr(t,o,a,es(e,o),ts(n,o),s.folded.has(o)))}
2219
+ </div>
2220
+ <button
2221
+ class="dpk-btn dpk-btn--ghost tabs-more"
2222
+ type="button"
2223
+ data-tabs-more-trigger
2224
+ data-unused=${String(r.length===0)}
2225
+ aria-label=${e.moreTabsLabel}
2226
+ aria-haspopup="menu"
2227
+ aria-expanded=${String(s.open)}
2228
+ @click=${s.toggle}
2229
+ >
2230
+ ${Rr()}
2231
+ </button>
2232
+ ${s.open&&r.length>0?l`<div
2233
+ id="tabs-menu"
2234
+ class="comment-pop tabs-menu"
2235
+ popover="manual"
2236
+ role="menu"
2237
+ aria-label=${e.moreTabsLabel}
2238
+ @keydown=${o=>{o.key==="Escape"&&(o.preventDefault(),s.close())}}
2239
+ >
2240
+ ${r.map(o=>l`<a
2241
+ class="tabs-menu-item"
2242
+ role="menuitem"
2243
+ data-tab=${o}
2244
+ href=${t.hashFor({tab:o==="map"?null:o})}
2245
+ @click=${s.close}
2246
+ >${es(e,o)}<span class="page-tab-count">${ts(n,o)}</span></a
2247
+ >`)}
2248
+ </div>`:m}
2249
+ </div>
2250
+ ${a==="map"&&n.activities.some(o=>o.steps.length>0)?Di(e,t):m}
2251
+ </div>
2252
+ `},es=(e,t)=>{switch(t){case"map":return e.mapTab;case"milestones":return e.milestonesTab;case"statuses":return e.statusesTab;case"labels":return e.labelsTab;case"members":return e.membersTab;case"burndown":return e.burndownTab}},ts=(e,t)=>{switch(t){case"map":return e.stories.length;case"milestones":return e.milestones.length;case"statuses":return e.statuses.length;case"labels":return e.labels.length;case"members":return e.members.length;case"burndown":return e.snapshots.length}},Nr=(e,t,a,s,n,i)=>l`<a
2253
+ role="tab"
2254
+ data-tab=${t}
2255
+ data-overflow=${i?"":m}
2256
+ aria-hidden=${i?"true":m}
2257
+ tabindex=${i?"-1":m}
2258
+ aria-selected=${t===a?"true":"false"}
2259
+ href=${e.hashFor({tab:t==="map"?null:t})}
2260
+ >${s}<span class="page-tab-count">${n}</span></a
2261
+ >`,Cr=36,Br=12,Yr=220,Ur=K`
2262
+ /* The tabs and their more button share what the bar's line leaves; the line
2263
+ wraps only when even the current tab and the button do not fit. */
2264
+ .page-nav {
2265
+ display: flex;
2266
+ flex: 1 1 0;
2267
+ align-items: center;
2268
+ gap: 4px;
2269
+ max-width: 100%;
2270
+ }
2271
+ /* A folded tab stays laid out, out of sight, so it can still be measured. */
2272
+ .page-tabs [role='tab'][data-overflow] {
2273
+ position: absolute;
2274
+ top: 0;
2275
+ left: 0;
2276
+ visibility: hidden;
2277
+ pointer-events: none;
2278
+ }
2279
+ .tabs-more {
2280
+ flex: none;
2281
+ padding: 6px 8px;
2282
+ }
2283
+ .tabs-more svg {
2284
+ width: 16px;
2285
+ height: 16px;
2286
+ }
2287
+ .tabs-more[aria-expanded='true'] {
2288
+ background: var(--dpk-paper-inset);
2289
+ color: var(--dpk-ink);
2290
+ }
2291
+ .tabs-more[data-unused='true'] {
2292
+ position: absolute;
2293
+ visibility: hidden;
2294
+ pointer-events: none;
2295
+ }
2296
+ .comment-pop.tabs-menu {
2297
+ gap: 2px;
2298
+ padding: 6px;
2299
+ }
2300
+ .tabs-menu-item {
2301
+ display: flex;
2302
+ align-items: center;
2303
+ justify-content: space-between;
2304
+ gap: 10px;
2305
+ padding: 8px 10px;
2306
+ border-radius: var(--dpk-radius-sm);
2307
+ color: var(--dpk-ink);
2308
+ font-size: 13px;
2309
+ font-weight: 600;
2310
+ text-decoration: none;
2311
+ }
2312
+ .tabs-menu-item:hover,
2313
+ .tabs-menu-item:focus-visible {
2314
+ outline: none;
2315
+ background: var(--dpk-paper-sunken);
2316
+ }
2317
+ `,zr=e=>S(e.state,e.navigation.story),Pr=(e,t,a,s)=>{const{state:n}=t,i={type:"story",id:a.id},r=()=>t.navigate({story:null}),o=M(n,`${a.activityId}.${a.stepId}`),d=P(n,a.milestoneId);return l`<aside
2318
+ class="story-panel"
2319
+ role="dialog"
2320
+ aria-label=${e.panelLabel(a.name)}
2321
+ data-testid="usm-story-panel"
2322
+ data-story=${a.id}
2323
+ tabindex="-1"
2324
+ >
2325
+ <header class="sp-head">
2326
+ <span class="sp-where">
2327
+ ${o?l`<span>${o.activity.name}</span><span>${o.step.name}</span>`:m}
2328
+ <span>${d?.name??e.unassigned}</span>
2329
+ </span>
2330
+ ${Wr(e,t,a)}
2331
+ <button class="dpk-icon-btn" type="button" data-role="close" aria-label=${e.closePanelAria} @click=${r}>
2332
+ ${Xe()}
2333
+ </button>
2334
+ </header>
2335
+ <div class="sp-body">
2336
+ <h2 class="sp-title">
2337
+ <dpk-component-inline-edit
2338
+ wrap
2339
+ .value=${a.name}
2340
+ .label=${e.storyTitleLabel}
2341
+ @dpk-commit=${X(p=>t.dispatch({type:"SET_STORY_NAME",target:i,payload:{name:p}}))}
2342
+ ></dpk-component-inline-edit>
2343
+ </h2>
2344
+ ${n.statuses.length===0?m:Fr(e,t,a)}
2345
+ ${Z(n,"estimates")?Gr(e,t,a):m}
2346
+ ${Z(n,"assignees")?Hr(e,t,a):m}
2347
+ ${Vr(e,t,a)} ${Kr(e,t,a,s)}
2348
+ <section class="sp-field">
2349
+ <h3>${e.storyDescriptionLabel}</h3>
2350
+ <dpk-component-inline-edit
2351
+ multiline
2352
+ markdown
2353
+ class="sp-description"
2354
+ .value=${a.description??""}
2355
+ .label=${e.storyDescriptionLabel}
2356
+ @dpk-commit=${X(p=>t.dispatch({type:"SET_STORY_DESCRIPTION",target:i,payload:{description:p}}))}
2357
+ ></dpk-component-inline-edit>
2358
+ </section>
2359
+ ${qr(e,t,a)} ${jr(e,t,a)}
2360
+ </div>
2361
+ <footer class="sp-foot">
2362
+ <button
2363
+ class="dpk-btn dpk-btn--ghost sp-delete"
2364
+ type="button"
2365
+ @click=${()=>{t.dispatch({type:"DELETE_STORY",target:i,payload:{}}).ok&&r()}}
2366
+ >
2367
+ ${Te()}<span>${e.deleteStoryButton}</span>
2368
+ </button>
2369
+ </footer>
2370
+ </aside>`},Fr=(e,t,a)=>{const s=ce(t.state),n=a.statusId;return l`<section class="sp-field">
2371
+ <h3 id="sp-status-label">${e.storyStatusLabel}</h3>
2372
+ <div class="sp-statuses" role="radiogroup" aria-labelledby="sp-status-label">
2373
+ ${s.map(i=>l`<button
2374
+ class="sp-status"
2375
+ type="button"
2376
+ role="radio"
2377
+ data-status=${i.id}
2378
+ aria-checked=${String(i.id===n)}
2379
+ style=${I(i.tone)}
2380
+ @click=${()=>{i.id!==n&&t.dispatch({type:"SET_STORY_STATUS",target:{type:"story",id:a.id},payload:{statusId:i.id}})}}
2381
+ >
2382
+ ${re(i)}<span>${i.name}</span>
2383
+ </button>`)}
2384
+ </div>
2385
+ </section>`},Gr=(e,t,a)=>{const s=a.estimateId??null,n=r=>()=>{r!==s&&t.dispatch({type:"SET_STORY_ESTIMATE",target:{type:"story",id:a.id},payload:{estimateId:r}})},i=[{id:null,name:e.unestimated,title:e.unestimated},...t.state.estimates.map(r=>({id:r.id,name:r.name,title:e.estimateText(r.name,r.points)}))];return l`<section class="sp-field">
2386
+ <h3 id="sp-estimate-label" class="sp-field-head">
2387
+ <span>${e.storyEstimateLabel}</span>
2388
+ <a class="sp-manage" href=${t.hashFor({tab:"burndown",story:null})}>${e.manageEstimates}</a>
2389
+ </h3>
2390
+ ${t.state.estimates.length===0?l`<p class="sp-empty">${e.noEstimates}</p>`:l`<div class="sp-estimates" role="radiogroup" aria-labelledby="sp-estimate-label">
2391
+ ${i.map(r=>l`<button
2392
+ class="sp-estimate"
2393
+ type="button"
2394
+ role="radio"
2395
+ data-estimate=${r.id??""}
2396
+ title=${r.title}
2397
+ aria-checked=${String(r.id===s)}
2398
+ @click=${n(r.id)}
2399
+ >
2400
+ ${r.name}
2401
+ </button>`)}
2402
+ </div>`}
2403
+ </section>`},Hr=(e,t,a)=>{const s=a.assigneeId??null,n=i=>()=>{i!==s&&t.dispatch({type:"SET_STORY_ASSIGNEE",target:{type:"story",id:a.id},payload:{memberId:i}})};return l`<section class="sp-field">
2404
+ <h3 id="sp-assignee-label" class="sp-field-head">
2405
+ <span>${e.storyAssigneeLabel}</span>
2406
+ <a class="sp-manage" href=${t.hashFor({tab:"members",story:null})}>${e.manageMembers}</a>
2407
+ </h3>
2408
+ ${t.state.members.length===0?l`<p class="sp-empty">${e.storyNoMembers}</p>`:l`<div class="sp-assignees" role="radiogroup" aria-labelledby="sp-assignee-label">
2409
+ <button
2410
+ class="sp-assignee"
2411
+ type="button"
2412
+ role="radio"
2413
+ data-assignee=""
2414
+ aria-checked=${String(s===null)}
2415
+ @click=${n(null)}
2416
+ >
2417
+ ${e.noAssignee}
2418
+ </button>
2419
+ ${t.state.members.map(i=>l`<button
2420
+ class="sp-assignee"
2421
+ type="button"
2422
+ role="radio"
2423
+ data-assignee=${i.id}
2424
+ aria-checked=${String(i.id===s)}
2425
+ style=${I(i.tone)}
2426
+ @click=${n(i.id)}
2427
+ >
2428
+ <span class="sp-avatar" aria-hidden="true">${pt(i.name)}</span>${i.name}
2429
+ </button>`)}
2430
+ </div>`}
2431
+ </section>`},Vr=(e,t,a)=>{const s={type:"story",id:a.id},n=new Set(a.labelIds??[]);return l`<section class="sp-field">
2432
+ <h3 id="sp-labels-label" class="sp-field-head">
2433
+ <span>${e.storyLabelsLabel}</span>
2434
+ <a class="sp-manage" href=${t.hashFor({tab:"labels",story:null})}>${e.manageLabels}</a>
2435
+ </h3>
2436
+ ${t.state.labels.length===0?l`<p class="sp-empty">${e.storyNoLabels}</p>`:l`<div class="sp-labels" role="group" aria-labelledby="sp-labels-label">
2437
+ ${t.state.labels.map(i=>{const r=n.has(i.id);return l`<button
2438
+ class="sp-label"
2439
+ type="button"
2440
+ data-label=${i.id}
2441
+ aria-pressed=${String(r)}
2442
+ style=${I(i.tone)}
2443
+ @click=${()=>t.dispatch({type:r?"REMOVE_STORY_LABEL":"ADD_STORY_LABEL",target:s,payload:{labelId:i.id}})}
2444
+ >
2445
+ <span class="sp-label-dot" aria-hidden="true"></span><span>${i.name}</span>
2446
+ </button>`})}
2447
+ </div>`}
2448
+ </section>`},Kr=(e,t,a,s)=>{const{state:n}=t,i=Jt(n,a.id),r=(d,p,u)=>t.dispatch({type:d,target:{type:"story",id:p},payload:{blockerId:u}}),o=(d,p,u,y)=>{const E=S(n,p);if(!E)return m;const b=ce(n).find(c=>c.id===E.statusId);return l`<li
2449
+ data-blocker=${d==="data-blocker"?p:m}
2450
+ data-dependent=${d==="data-dependent"?p:m}
2451
+ data-finished=${String(ye(n,E))}
2452
+ >
2453
+ <a class="sp-dep-name" href=${t.hashFor({story:p})} style=${I(b?.tone)}>
2454
+ ${b?re(b):m}<span>${E.name}</span>
2455
+ </a>
2456
+ <button
2457
+ class="dpk-icon-btn"
2458
+ type="button"
2459
+ data-role="remove"
2460
+ aria-label=${u(E.name)}
2461
+ @click=${y}
2462
+ >
2463
+ ${Xe()}
2464
+ </button>
2465
+ </li>`};return l`<section class="sp-field sp-deps">
2466
+ <h3>${e.storyDependenciesLabel}</h3>
2467
+ <div class="sp-dep-side">
2468
+ <h4>${e.storyBlockersLabel}</h4>
2469
+ ${i.blockers.length===0?l`<p class="sp-empty">${e.storyNoBlockers}</p>`:l`<ul class="sp-dep-list">
2470
+ ${i.blockers.map(d=>o("data-blocker",d,e.removeBlockerAria,()=>r("REMOVE_STORY_BLOCKER",a.id,d)))}
2471
+ </ul>`}
2472
+ ${Ja(e,t,a.id,"blocker",s,d=>r("ADD_STORY_BLOCKER",a.id,d))}
2473
+ </div>
2474
+ <div class="sp-dep-side">
2475
+ <h4>${e.storyDependentsLabel}</h4>
2476
+ ${i.dependents.length===0?l`<p class="sp-empty">${e.storyNoDependents}</p>`:l`<ul class="sp-dep-list">
2477
+ ${i.dependents.map(d=>o("data-dependent",d,e.removeDependentAria,()=>r("REMOVE_STORY_BLOCKER",d,a.id)))}
2478
+ </ul>`}
2479
+ ${Ja(e,t,a.id,"dependent",s,d=>r("ADD_STORY_BLOCKER",d,a.id))}
2480
+ </div>
2481
+ </section>`},qr=(e,t,a)=>{const s={type:"story",id:a.id},n=a.links??[],i=r=>{r.preventDefault();const o=r.currentTarget instanceof HTMLFormElement?r.currentTarget:null,d=o?.querySelector("input");if(!o||!d)return;const p=d.value.trim();if(!gt(tt,p).success){d.setAttribute("aria-invalid","true");return}t.dispatch({type:"ADD_STORY_LINK",target:s,payload:{url:p}}).ok&&(d.removeAttribute("aria-invalid"),o.reset())};return l`<section class="sp-field">
2482
+ <h3>${e.storyLinksLabel}</h3>
2483
+ ${n.length===0?m:l`<ul class="sp-links">
2484
+ ${n.map(r=>{const o=Ne(r.url),d=r.label??o.text;return l`<li data-kind=${o.kind}>
2485
+ <a class="sp-link" href=${r.url} target="_blank" rel="noopener noreferrer" title=${r.url}>
2486
+ ${ya(o.kind)}
2487
+ <span class="sp-link-text">${d}</span>
2488
+ <span class="sp-link-url">${o.title===d?r.url:o.title}</span>
2489
+ </a>
2490
+ <button
2491
+ class="dpk-icon-btn"
2492
+ type="button"
2493
+ aria-label=${e.removeLinkAria(d)}
2494
+ @click=${()=>t.dispatch({type:"REMOVE_STORY_LINK",target:s,payload:{url:r.url}})}
2495
+ >
2496
+ ${Xe()}
2497
+ </button>
2498
+ </li>`})}
2499
+ </ul>`}
2500
+ <form class="sp-add-link" @submit=${i}>
2501
+ <input
2502
+ class="dpk-input"
2503
+ type="url"
2504
+ inputmode="url"
2505
+ placeholder="https://"
2506
+ aria-label=${e.linkUrlLabel}
2507
+ @input=${r=>{r.currentTarget instanceof HTMLInputElement&&r.currentTarget.removeAttribute("aria-invalid")}}
2508
+ />
2509
+ <button class="dpk-btn" type="submit">${e.addLinkButton}</button>
2510
+ </form>
2511
+ </section>`},Wr=(e,t,a)=>{const s=t.commentCount({type:"story",id:a.id});return l`<button
2512
+ class="sp-review"
2513
+ type="button"
2514
+ data-role="review-story"
2515
+ title=${e.reviewStoryTitle}
2516
+ aria-label=${s>0?`${e.reviewStoryButton} (${s})`:e.reviewStoryButton}
2517
+ @click=${()=>t.requestComment({type:"story",id:a.id})}
2518
+ >
2519
+ ${bt()}<span>${e.reviewStoryButton}</span>${s>0?l`<span class="sp-review-count">${s}</span>`:m}
2520
+ </button>`},jr=(e,t,a)=>{const s={type:"story",id:a.id},n=a.comments??[],i=r=>{const o=r.querySelector("textarea"),d=o?.value.trim()??"";if(!o||d==="")return;const p=j("comment",q(t.state));t.dispatch({type:"ADD_STORY_COMMENT",target:s,payload:{id:p,body:d,createdAt:new Date().toISOString()}}).ok&&(o.value="")};return l`<section class="sp-field sp-comments">
2521
+ <h3>
2522
+ ${e.storyCommentsLabel}${n.length>0?l`<span class="sp-count">${n.length}</span>`:m}
2523
+ </h3>
2524
+ ${n.length===0?m:l`<ol class="sp-comment-list">
2525
+ ${n.map(r=>l`<li data-id=${r.id}>
2526
+ <div class="sp-comment-main">
2527
+ <p class="sp-comment-body">${r.body}</p>
2528
+ ${r.createdAt===void 0?m:l`<time class="sp-comment-time" datetime=${r.createdAt}
2529
+ >${e.commentDate(r.createdAt)}</time
2530
+ >`}
2531
+ </div>
2532
+ <button
2533
+ class="dpk-icon-btn"
2534
+ type="button"
2535
+ data-role="delete-comment"
2536
+ aria-label=${e.deleteStoryCommentAria}
2537
+ @click=${()=>t.dispatch({type:"DELETE_STORY_COMMENT",target:s,payload:{commentId:r.id}})}
2538
+ >
2539
+ ${Te()}
2540
+ </button>
2541
+ </li>`)}
2542
+ </ol>`}
2543
+ <form
2544
+ class="sp-comment-form"
2545
+ @submit=${r=>{r.preventDefault(),r.currentTarget instanceof HTMLFormElement&&i(r.currentTarget)}}
2546
+ >
2547
+ <textarea
2548
+ class="dpk-textarea"
2549
+ rows="3"
2550
+ aria-label=${e.storyCommentsLabel}
2551
+ aria-describedby="sp-comments-hint"
2552
+ data-dpk-text-key=${`story-comment:${a.id}`}
2553
+ @keydown=${r=>{if(r.isComposing||r.key!=="Enter"||!(r.ctrlKey||r.metaKey))return;r.preventDefault();const o=r.currentTarget instanceof HTMLElement?r.currentTarget.closest("form"):null;o&&i(o)}}
2554
+ ></textarea>
2555
+ <div class="sp-comment-actions">
2556
+ <span class="sp-comment-hint" id="sp-comments-hint">${e.storyCommentsHint}</span>
2557
+ <button class="dpk-btn dpk-btn--accent" type="submit">${e.commentSubmit}</button>
2558
+ </div>
2559
+ </form>
2560
+ </section>`},Xr=K`
2561
+ /* Over the main column's edge, below the header: the page's own controls stay in reach. */
2562
+ .story-panel {
2563
+ position: absolute;
2564
+ top: 0;
2565
+ right: 0;
2566
+ bottom: 0;
2567
+ z-index: 20;
2568
+ display: grid;
2569
+ grid-template-rows: auto minmax(0, 1fr) auto;
2570
+ width: min(420px, 100%);
2571
+ border-left: 1px solid var(--dpk-rule-strong);
2572
+ background: var(--dpk-paper-raised);
2573
+ box-shadow: var(--dpk-shadow-lg);
2574
+ animation: sp-slide-in 220ms var(--dpk-ease);
2575
+ }
2576
+ /* The panel takes the focus when it opens; the ring belongs to its controls. */
2577
+ .story-panel:focus {
2578
+ outline: none;
2579
+ }
2580
+ @keyframes sp-slide-in {
2581
+ from {
2582
+ opacity: 0;
2583
+ transform: translateX(24px);
2584
+ }
2585
+ }
2586
+ .sp-head {
2587
+ display: flex;
2588
+ align-items: center;
2589
+ gap: 10px;
2590
+ padding: 14px 22px 12px;
2591
+ min-height: 60px;
2592
+ box-sizing: border-box;
2593
+ border-bottom: 1px solid var(--dpk-rule);
2594
+ }
2595
+ .sp-where {
2596
+ display: flex;
2597
+ flex-wrap: wrap;
2598
+ gap: 2px 0;
2599
+ flex: 1 1 auto;
2600
+ min-width: 0;
2601
+ color: var(--dpk-ink-faint);
2602
+ font-size: 11.5px;
2603
+ font-weight: 600;
2604
+ }
2605
+ .sp-where > span + span::before {
2606
+ content: '›';
2607
+ margin: 0 6px;
2608
+ color: var(--dpk-rule-strong);
2609
+ }
2610
+ .sp-body {
2611
+ display: grid;
2612
+ align-content: start;
2613
+ gap: 22px;
2614
+ overflow: auto;
2615
+ padding: 18px 22px 24px;
2616
+ }
2617
+ .sp-title {
2618
+ margin: 0;
2619
+ font-size: 19px;
2620
+ font-weight: 700;
2621
+ letter-spacing: -0.015em;
2622
+ line-height: 1.35;
2623
+ }
2624
+ .sp-title dpk-component-inline-edit {
2625
+ display: block;
2626
+ margin: 0 -4px;
2627
+ }
2628
+ .sp-field {
2629
+ display: grid;
2630
+ gap: 8px;
2631
+ }
2632
+ .sp-field h3 {
2633
+ margin: 0;
2634
+ color: var(--dpk-ink-faint);
2635
+ font-size: 11px;
2636
+ font-weight: 650;
2637
+ letter-spacing: 0.04em;
2638
+ text-transform: uppercase;
2639
+ }
2640
+ .sp-statuses {
2641
+ display: flex;
2642
+ flex-wrap: wrap;
2643
+ gap: 6px;
2644
+ }
2645
+ .sp-status {
2646
+ display: inline-flex;
2647
+ align-items: center;
2648
+ gap: 7px;
2649
+ padding: 5px 12px 5px 9px;
2650
+ border: 1px solid var(--dpk-rule-strong);
2651
+ border-radius: 999px;
2652
+ background: var(--dpk-paper-raised);
2653
+ color: var(--dpk-ink);
2654
+ font: inherit;
2655
+ font-size: 12.5px;
2656
+ font-weight: 600;
2657
+ cursor: pointer;
2658
+ transition:
2659
+ background 140ms var(--dpk-ease),
2660
+ border-color 140ms var(--dpk-ease);
2661
+ }
2662
+ .sp-status:hover {
2663
+ border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
2664
+ }
2665
+ .sp-status:focus-visible {
2666
+ outline: none;
2667
+ box-shadow: var(--dpk-focus);
2668
+ }
2669
+ .sp-status[aria-checked='true'] {
2670
+ border-color: var(--usm-tone);
2671
+ background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
2672
+ box-shadow: inset 0 0 0 1px var(--usm-tone);
2673
+ }
2674
+ .sp-estimates {
2675
+ display: flex;
2676
+ flex-wrap: wrap;
2677
+ gap: 4px;
2678
+ }
2679
+ .sp-estimate {
2680
+ min-width: 34px;
2681
+ padding: 4px 10px;
2682
+ border: 1px solid var(--dpk-rule-strong);
2683
+ border-radius: var(--dpk-radius-sm);
2684
+ background: var(--dpk-paper-raised);
2685
+ color: var(--dpk-ink-soft);
2686
+ font: inherit;
2687
+ font-family: var(--dpk-mono);
2688
+ font-size: 12px;
2689
+ font-weight: 650;
2690
+ font-variant-numeric: tabular-nums;
2691
+ cursor: pointer;
2692
+ transition:
2693
+ background 140ms var(--dpk-ease),
2694
+ border-color 140ms var(--dpk-ease);
2695
+ }
2696
+ .sp-estimate[data-estimate=''] {
2697
+ font-family: inherit;
2698
+ font-weight: 550;
2699
+ }
2700
+ .sp-estimate:hover {
2701
+ border-color: var(--dpk-rule-hover);
2702
+ }
2703
+ .sp-estimate:focus-visible {
2704
+ outline: none;
2705
+ box-shadow: var(--dpk-focus);
2706
+ }
2707
+ .sp-estimate[aria-checked='true'] {
2708
+ border-color: var(--dpk-ink);
2709
+ background: var(--dpk-ink);
2710
+ color: var(--dpk-paper-raised);
2711
+ }
2712
+ .sp-assignees {
2713
+ display: flex;
2714
+ flex-wrap: wrap;
2715
+ gap: 4px;
2716
+ }
2717
+ .sp-assignee {
2718
+ display: inline-flex;
2719
+ align-items: center;
2720
+ gap: 6px;
2721
+ padding: 3px 10px 3px 4px;
2722
+ border: 1px solid var(--dpk-rule-strong);
2723
+ border-radius: 999px;
2724
+ background: var(--dpk-paper-raised);
2725
+ color: var(--dpk-ink-soft);
2726
+ font: inherit;
2727
+ font-size: 12px;
2728
+ font-weight: 600;
2729
+ cursor: pointer;
2730
+ transition:
2731
+ background 140ms var(--dpk-ease),
2732
+ border-color 140ms var(--dpk-ease);
2733
+ }
2734
+ .sp-assignee[data-assignee=''] {
2735
+ padding-left: 10px;
2736
+ }
2737
+ .sp-assignee:hover {
2738
+ border-color: var(--dpk-rule-hover);
2739
+ }
2740
+ .sp-assignee:focus-visible {
2741
+ outline: none;
2742
+ box-shadow: var(--dpk-focus);
2743
+ }
2744
+ .sp-assignee[aria-checked='true'] {
2745
+ border-color: var(--usm-tone, var(--dpk-ink));
2746
+ background: color-mix(in oklab, var(--usm-tone, var(--dpk-ink)) 12%, var(--dpk-paper-raised));
2747
+ color: var(--dpk-ink);
2748
+ }
2749
+ .sp-avatar {
2750
+ display: inline-grid;
2751
+ place-items: center;
2752
+ width: 18px;
2753
+ height: 18px;
2754
+ border-radius: 50%;
2755
+ background: var(--usm-tone);
2756
+ color: var(--dpk-paper-raised);
2757
+ font-size: 10px;
2758
+ font-weight: 700;
2759
+ line-height: 1;
2760
+ }
2761
+ .sp-field-head {
2762
+ display: flex;
2763
+ align-items: baseline;
2764
+ justify-content: space-between;
2765
+ gap: 8px;
2766
+ }
2767
+ .sp-manage {
2768
+ color: var(--dpk-ink-faint);
2769
+ font-size: 11px;
2770
+ font-weight: 600;
2771
+ letter-spacing: 0;
2772
+ text-transform: none;
2773
+ }
2774
+ .sp-manage:hover {
2775
+ color: var(--dpk-blue);
2776
+ }
2777
+ .sp-empty {
2778
+ margin: 0;
2779
+ color: var(--dpk-ink-faint);
2780
+ font-size: 12.5px;
2781
+ }
2782
+ .sp-labels {
2783
+ display: flex;
2784
+ flex-wrap: wrap;
2785
+ gap: 6px;
2786
+ }
2787
+ .sp-label {
2788
+ display: inline-flex;
2789
+ align-items: center;
2790
+ gap: 6px;
2791
+ padding: 3px 10px 3px 8px;
2792
+ border: 1px dashed var(--dpk-rule-strong);
2793
+ border-radius: 999px;
2794
+ background: transparent;
2795
+ color: var(--dpk-ink-soft);
2796
+ font: inherit;
2797
+ font-size: 12px;
2798
+ font-weight: 600;
2799
+ cursor: pointer;
2800
+ transition:
2801
+ background 140ms var(--dpk-ease),
2802
+ border-color 140ms var(--dpk-ease);
2803
+ }
2804
+ .sp-label:hover {
2805
+ border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
2806
+ }
2807
+ .sp-label:focus-visible {
2808
+ outline: none;
2809
+ box-shadow: var(--dpk-focus);
2810
+ }
2811
+ .sp-label[aria-pressed='true'] {
2812
+ border-style: solid;
2813
+ border-color: color-mix(in oklab, var(--usm-tone) 55%, transparent);
2814
+ background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
2815
+ color: var(--dpk-ink);
2816
+ }
2817
+ .sp-label-dot {
2818
+ width: 7px;
2819
+ height: 7px;
2820
+ border-radius: 50%;
2821
+ background: var(--usm-tone);
2822
+ opacity: 0.5;
2823
+ }
2824
+ .sp-label[aria-pressed='true'] .sp-label-dot {
2825
+ opacity: 1;
2826
+ }
2827
+ .sp-deps {
2828
+ gap: 12px;
2829
+ }
2830
+ .sp-dep-side {
2831
+ display: grid;
2832
+ gap: 6px;
2833
+ }
2834
+ .sp-dep-side h4 {
2835
+ margin: 0;
2836
+ color: var(--dpk-ink-soft);
2837
+ font-size: 11.5px;
2838
+ font-weight: 650;
2839
+ }
2840
+ .sp-dep-list {
2841
+ display: grid;
2842
+ gap: 4px;
2843
+ margin: 0;
2844
+ padding: 0;
2845
+ list-style: none;
2846
+ }
2847
+ .sp-dep-list li {
2848
+ display: flex;
2849
+ align-items: center;
2850
+ gap: 4px;
2851
+ border: 1px solid var(--dpk-rule);
2852
+ border-radius: var(--dpk-radius-sm);
2853
+ background: var(--dpk-paper-sunken);
2854
+ }
2855
+ .sp-dep-name {
2856
+ display: flex;
2857
+ align-items: center;
2858
+ gap: 8px;
2859
+ flex: 1 1 auto;
2860
+ min-width: 0;
2861
+ padding: 6px 4px 6px 10px;
2862
+ color: var(--dpk-ink);
2863
+ font-size: 12.5px;
2864
+ font-weight: 600;
2865
+ text-decoration: none;
2866
+ }
2867
+ .sp-dep-name span {
2868
+ overflow: hidden;
2869
+ text-overflow: ellipsis;
2870
+ white-space: nowrap;
2871
+ }
2872
+ .sp-dep-name:hover span {
2873
+ text-decoration: underline;
2874
+ }
2875
+ .sp-dep-list li[data-finished='true'] .sp-dep-name span {
2876
+ color: var(--dpk-ink-faint);
2877
+ text-decoration: line-through;
2878
+ }
2879
+ .sp-description {
2880
+ display: block;
2881
+ margin: 0 -4px;
2882
+ color: var(--dpk-ink-soft);
2883
+ font-size: 13px;
2884
+ line-height: 1.65;
2885
+ }
2886
+ .sp-links {
2887
+ display: grid;
2888
+ gap: 4px;
2889
+ margin: 0;
2890
+ padding: 0;
2891
+ list-style: none;
2892
+ }
2893
+ .sp-links li {
2894
+ display: flex;
2895
+ align-items: center;
2896
+ gap: 4px;
2897
+ border: 1px solid var(--dpk-rule);
2898
+ border-radius: var(--dpk-radius-sm);
2899
+ background: var(--dpk-paper-sunken);
2900
+ }
2901
+ .sp-link {
2902
+ display: grid;
2903
+ grid-template-columns: 16px minmax(0, 1fr);
2904
+ column-gap: 9px;
2905
+ align-items: center;
2906
+ flex: 1 1 auto;
2907
+ min-width: 0;
2908
+ padding: 7px 4px 7px 10px;
2909
+ color: var(--dpk-ink);
2910
+ text-decoration: none;
2911
+ }
2912
+ .sp-link:hover .sp-link-text {
2913
+ text-decoration: underline;
2914
+ }
2915
+ .sp-link svg {
2916
+ grid-row: span 2;
2917
+ width: 16px;
2918
+ height: 16px;
2919
+ color: var(--dpk-ink-soft);
2920
+ }
2921
+ .sp-link-text {
2922
+ overflow: hidden;
2923
+ font-family: var(--dpk-mono);
2924
+ font-size: 12.5px;
2925
+ font-weight: 650;
2926
+ text-overflow: ellipsis;
2927
+ white-space: nowrap;
2928
+ }
2929
+ .sp-link-url {
2930
+ overflow: hidden;
2931
+ color: var(--dpk-ink-faint);
2932
+ font-size: 11px;
2933
+ text-overflow: ellipsis;
2934
+ white-space: nowrap;
2935
+ }
2936
+ .sp-add-link {
2937
+ display: flex;
2938
+ gap: 6px;
2939
+ }
2940
+ .sp-add-link input {
2941
+ flex: 1 1 auto;
2942
+ min-width: 0;
2943
+ }
2944
+ .sp-add-link input[aria-invalid='true'] {
2945
+ border-color: var(--dpk-accent);
2946
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--dpk-accent) 22%, transparent);
2947
+ }
2948
+ /* The handoff dock floats at the bottom right, so the footer keeps left. */
2949
+ .sp-field h3 .sp-count {
2950
+ margin-left: 6px;
2951
+ font-family: var(--dpk-mono);
2952
+ letter-spacing: 0;
2953
+ }
2954
+ .sp-comment-list {
2955
+ display: grid;
2956
+ gap: 6px;
2957
+ margin: 0;
2958
+ padding: 0;
2959
+ list-style: none;
2960
+ }
2961
+ .sp-comment-list li {
2962
+ display: flex;
2963
+ align-items: flex-start;
2964
+ gap: 4px;
2965
+ padding: 8px 4px 8px 11px;
2966
+ border: 1px solid var(--dpk-rule);
2967
+ border-radius: var(--dpk-radius-sm);
2968
+ background: var(--dpk-paper-sunken);
2969
+ }
2970
+ .sp-comment-main {
2971
+ display: grid;
2972
+ gap: 2px;
2973
+ flex: 1 1 auto;
2974
+ min-width: 0;
2975
+ }
2976
+ .sp-comment-body {
2977
+ margin: 0;
2978
+ color: var(--dpk-ink);
2979
+ font-size: 12.5px;
2980
+ line-height: 1.6;
2981
+ white-space: pre-wrap;
2982
+ overflow-wrap: anywhere;
2983
+ }
2984
+ .sp-comment-time {
2985
+ color: var(--dpk-ink-faint);
2986
+ font-family: var(--dpk-mono);
2987
+ font-size: 10.5px;
2988
+ }
2989
+ .sp-comment-form {
2990
+ display: grid;
2991
+ gap: 6px;
2992
+ }
2993
+ .sp-comment-form textarea {
2994
+ resize: vertical;
2995
+ min-height: 64px;
2996
+ }
2997
+ .sp-comment-actions {
2998
+ display: flex;
2999
+ align-items: flex-start;
3000
+ justify-content: space-between;
3001
+ gap: 10px;
3002
+ }
3003
+ .sp-comment-hint {
3004
+ color: var(--dpk-ink-faint);
3005
+ font-size: 11px;
3006
+ line-height: 1.5;
3007
+ }
3008
+ .sp-comment-actions .dpk-btn {
3009
+ flex: none;
3010
+ }
3011
+ /* A request to the agent, not part of the story: it carries the review rail's comment icon. */
3012
+ .sp-review {
3013
+ display: inline-flex;
3014
+ flex: none;
3015
+ align-items: center;
3016
+ gap: 6px;
3017
+ height: 28px;
3018
+ padding: 0 10px;
3019
+ border: 1px solid var(--dpk-rule-strong);
3020
+ border-radius: 999px;
3021
+ background: var(--dpk-paper-raised);
3022
+ color: var(--dpk-ink-soft);
3023
+ font: inherit;
3024
+ font-size: 11.5px;
3025
+ font-weight: 600;
3026
+ cursor: pointer;
3027
+ }
3028
+ .sp-review:hover {
3029
+ color: var(--dpk-accent);
3030
+ border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
3031
+ }
3032
+ .sp-review:focus-visible {
3033
+ outline: none;
3034
+ box-shadow: var(--dpk-focus);
3035
+ }
3036
+ .sp-review svg {
3037
+ width: 14px;
3038
+ height: 14px;
3039
+ }
3040
+ .sp-review-count {
3041
+ min-width: 16px;
3042
+ padding: 0 4px;
3043
+ border-radius: 999px;
3044
+ background: var(--dpk-accent-soft);
3045
+ color: var(--dpk-accent);
3046
+ font-family: var(--dpk-mono);
3047
+ font-size: 10px;
3048
+ line-height: 16px;
3049
+ text-align: center;
3050
+ }
3051
+ .sp-foot {
3052
+ display: flex;
3053
+ justify-content: flex-start;
3054
+ padding: 12px 22px;
3055
+ border-top: 1px solid var(--dpk-rule);
3056
+ }
3057
+ .sp-delete {
3058
+ display: inline-flex;
3059
+ align-items: center;
3060
+ gap: 6px;
3061
+ color: var(--dpk-ink-soft);
3062
+ }
3063
+ .sp-delete svg {
3064
+ width: 14px;
3065
+ height: 14px;
3066
+ }
3067
+ `,Zr=e=>{const t=e.stories.length,a=r=>t===0?0:r/t,s=r=>e.stories.filter(o=>o.statusId===r).length,n=ue(e);return{rows:e.statuses.map((r,o)=>{const d=s(r.id);return{id:r.id,name:r.name,tone:r.tone,icon:r.icon,progress:wa(o,n),done:o===n,previousId:e.statuses[o-1]?.id??null,nextId:e.statuses[o+1]?.id??null,storyCount:d,share:a(d)}})}},Jr=K`
3068
+ :host {
3069
+ --dpk-usm-accent: var(--dpk-blue);
3070
+ }
3071
+ /*
3072
+ * A wide table must scroll inside itself and never widen the template shell.
3073
+ * It scrolls both ways so the backbone can stick to its top and the
3074
+ * milestone column to its left: a box that scrolls only sideways still
3075
+ * becomes the sticky ancestor, and its top would never move. It takes the
3076
+ * height left under the board head (tabs and toolbar), down to the page's
3077
+ * bottom edge: the hand-off dock floats over its corner, and the map's own
3078
+ * padding lets the last row scroll clear of it, so the page body keeps no
3079
+ * second clearance under it. On a short screen it keeps 320px and the page
3080
+ * scrolls instead.
3081
+ */
3082
+ .dpk-main-body:has(> .map-scroll) {
3083
+ flex: 1 1 0;
3084
+ min-height: 0;
3085
+ grid-template-rows: auto minmax(320px, 1fr);
3086
+ padding-bottom: 16px;
3087
+ }
3088
+ .map-scroll {
3089
+ min-width: 0;
3090
+ max-width: 100%;
3091
+ overflow: auto;
3092
+ overscroll-behavior-x: contain;
3093
+ border: 1px solid var(--dpk-rule);
3094
+ border-radius: var(--dpk-radius-lg);
3095
+ background: var(--dpk-paper-sunken);
3096
+ box-shadow: var(--dpk-shadow);
3097
+ }
3098
+ .map {
3099
+ display: grid;
3100
+ gap: 0;
3101
+ min-width: max-content;
3102
+ /* The map scrolls on its own: its last row clears the hand-off dock at the end of that scroll. */
3103
+ padding-bottom: var(--dpk-dock-clearance, 0px);
3104
+ }
3105
+ .map-row {
3106
+ display: grid;
3107
+ grid-template-columns: 140px repeat(var(--cols), minmax(180px, 240px));
3108
+ }
3109
+ .map-row + .map-row {
3110
+ border-top: 1px solid var(--dpk-rule);
3111
+ }
3112
+
3113
+ /* The backbone (activities and steps) stays at the top while the rows scroll. */
3114
+ .map-head {
3115
+ position: sticky;
3116
+ top: 0;
3117
+ z-index: 3;
3118
+ border-bottom: 1px solid var(--dpk-rule-strong);
3119
+ box-shadow: 0 8px 14px -12px var(--dpk-shade-3);
3120
+ }
3121
+
3122
+ /* The leading column (axis corners and milestone labels) stays at the left
3123
+ while the steps scroll sideways; it is opaque so cards pass under it. */
3124
+ .corner:first-child,
3125
+ .row-lead {
3126
+ position: sticky;
3127
+ left: 0;
3128
+ z-index: 2;
3129
+ box-shadow: 1px 0 0 var(--dpk-rule);
3130
+ }
3131
+ .row-lead {
3132
+ display: flex;
3133
+ flex-direction: column;
3134
+ align-items: flex-start;
3135
+ justify-content: center;
3136
+ gap: 2px;
3137
+ min-width: 0;
3138
+ padding: 8px 6px 8px 4px;
3139
+ background: var(--dpk-paper-sunken);
3140
+ }
3141
+ /* Row names and their meta line share one column: past the grip (15px), its
3142
+ gap (6px) and the inline edit's own padding (4px). */
3143
+ .row-lead {
3144
+ --usm-row-indent: 25px;
3145
+ }
3146
+ .row-meta {
3147
+ display: flex;
3148
+ flex-wrap: wrap;
3149
+ gap: 2px 8px;
3150
+ padding-left: var(--usm-row-indent);
3151
+ font-size: 10.5px;
3152
+ color: var(--dpk-ink-faint);
3153
+ }
3154
+ .row-timeframe {
3155
+ color: var(--dpk-ink-soft);
3156
+ font-weight: 600;
3157
+ }
3158
+ .row-count {
3159
+ font-family: var(--dpk-mono);
3160
+ font-variant-numeric: tabular-nums;
3161
+ }
3162
+ .corner,
3163
+ .act-head,
3164
+ .col-head,
3165
+ .row-head,
3166
+ .cell {
3167
+ padding: 10px;
3168
+ }
3169
+ .corner {
3170
+ background: var(--dpk-paper-sunken);
3171
+ display: grid;
3172
+ gap: 3px;
3173
+ align-content: start;
3174
+ }
3175
+ /* The backbone is read on every scroll, so its rows are kept short: the
3176
+ axis labels sit tight and the step names get a single slim line. */
3177
+ .map-head .corner {
3178
+ gap: 1px;
3179
+ padding: 7px 10px;
3180
+ line-height: 1.3;
3181
+ text-wrap: balance;
3182
+ }
3183
+
3184
+ /* Above the content: the page tabs (map / milestones) and, on the map, the
3185
+ unit toggle (group band vs one column per activity). */
3186
+
3187
+ /* The board bar and the map's toolbar stay on top together while a long
3188
+ milestone list or the map scrolls under them. */
3189
+ .board-head {
3190
+ position: sticky;
3191
+ top: 0;
3192
+ z-index: 5;
3193
+ margin: -24px -24px 0;
3194
+ background: var(--dpk-glass);
3195
+ backdrop-filter: saturate(1.6) blur(14px);
3196
+ min-width: 0;
3197
+ }
3198
+
3199
+ .board-bar {
3200
+ --usm-bar-pad: 6px;
3201
+ border-bottom: 1px solid var(--dpk-rule);
3202
+ padding: var(--usm-bar-pad) 24px;
3203
+ display: flex;
3204
+ flex-wrap: wrap;
3205
+ align-items: center;
3206
+ gap: 10px 14px;
3207
+ min-width: 0;
3208
+ }
3209
+
3210
+ /* The pages: an underlined tab strip, heavier than the view toggle. The
3211
+ tabs that do not fit fold behind the more button beside it (\`.page-nav\`);
3212
+ the bottom padding keeps the selected tab's underline, which sits on the
3213
+ bar's bottom rule, inside the clip. */
3214
+ .page-tabs {
3215
+ position: relative;
3216
+ display: inline-flex;
3217
+ gap: 4px;
3218
+ min-width: 0;
3219
+ margin-bottom: calc(-1 * var(--usm-bar-pad) - 1px);
3220
+ padding-bottom: calc(var(--usm-bar-pad) + 1px);
3221
+ overflow: hidden;
3222
+ }
3223
+ .page-tabs [role='tab'] {
3224
+ position: relative;
3225
+ display: inline-flex;
3226
+ align-items: center;
3227
+ gap: 8px;
3228
+ padding: 5px 10px;
3229
+ border-radius: var(--dpk-radius-sm);
3230
+ color: var(--dpk-ink-soft);
3231
+ font-size: 13.5px;
3232
+ font-weight: 600;
3233
+ letter-spacing: -0.005em;
3234
+ text-decoration: none;
3235
+ white-space: nowrap;
3236
+ transition:
3237
+ color 160ms var(--dpk-ease),
3238
+ background 160ms var(--dpk-ease);
3239
+ }
3240
+ .page-tabs [role='tab']:hover {
3241
+ color: var(--dpk-ink);
3242
+ background: var(--dpk-paper-inset);
3243
+ }
3244
+ .page-tabs [role='tab']:focus-visible {
3245
+ outline: none;
3246
+ box-shadow: var(--dpk-focus);
3247
+ }
3248
+ .page-tabs [role='tab'][aria-selected='true'] {
3249
+ color: var(--dpk-ink);
3250
+ font-weight: 700;
3251
+ }
3252
+ .page-tabs [role='tab'][aria-selected='true']::after {
3253
+ content: '';
3254
+ position: absolute;
3255
+ left: 10px;
3256
+ right: 10px;
3257
+ bottom: calc(-1 * var(--usm-bar-pad) - 1px);
3258
+ height: 2px;
3259
+ border-radius: 2px;
3260
+ background: var(--dpk-usm-accent);
3261
+ }
3262
+ .page-tab-count {
3263
+ min-width: 18px;
3264
+ padding: 0 6px;
3265
+ border-radius: 999px;
3266
+ background: var(--dpk-rule);
3267
+ color: var(--dpk-ink-soft);
3268
+ font-family: var(--dpk-mono);
3269
+ font-size: 10.5px;
3270
+ font-weight: 650;
3271
+ font-variant-numeric: tabular-nums;
3272
+ line-height: 17px;
3273
+ text-align: center;
3274
+ }
3275
+ [role='tab'][aria-selected='true'] .page-tab-count {
3276
+ background: var(--dpk-blue-soft);
3277
+ color: var(--dpk-blue);
3278
+ }
3279
+
3280
+ /* A sunken track with the selected segment raised on top of it. */
3281
+ .segmented {
3282
+ display: inline-flex;
3283
+ gap: 2px;
3284
+ padding: 2px;
3285
+ max-width: 100%;
3286
+ overflow-x: auto;
3287
+ scrollbar-width: none;
3288
+ border: 1px solid var(--dpk-rule);
3289
+ border-radius: 999px;
3290
+ background: var(--dpk-paper-sunken);
3291
+ box-shadow: inset 0 1px 3px var(--dpk-shade-1);
3292
+ }
3293
+
3294
+ .tab {
3295
+ padding: 4px 12px;
3296
+ border-radius: 999px;
3297
+ font-size: 12px;
3298
+ font-weight: 550;
3299
+ text-decoration: none;
3300
+ color: var(--dpk-ink-soft);
3301
+ white-space: nowrap;
3302
+ transition:
3303
+ background 160ms var(--dpk-ease),
3304
+ color 160ms var(--dpk-ease),
3305
+ box-shadow 160ms var(--dpk-ease);
3306
+ }
3307
+
3308
+ .tab:hover {
3309
+ color: var(--dpk-ink);
3310
+ background: var(--dpk-paper-inset);
3311
+ }
3312
+
3313
+ .tab[data-current='true'] {
3314
+ background: var(--dpk-paper-raised);
3315
+ color: var(--dpk-ink);
3316
+ font-weight: 650;
3317
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
3318
+ }
3319
+
3320
+ /* Activity band: raised above the working canvas. A head spans its steps,
3321
+ so its contents stay in view beside the sticky column while the map
3322
+ scrolls sideways. */
3323
+ .act-head {
3324
+ position: relative;
3325
+ display: grid;
3326
+ align-content: start;
3327
+ gap: 4px;
3328
+ padding: 7px 10px 11px;
3329
+ border-left: 1px solid var(--dpk-rule);
3330
+ background: var(--dpk-paper-raised);
3331
+ box-shadow:
3332
+ var(--dpk-bevel),
3333
+ inset 0 -1px 0 var(--dpk-rule-strong);
3334
+ font-size: 13px;
3335
+ font-weight: 650;
3336
+ letter-spacing: -0.005em;
3337
+ }
3338
+ .act-title,
3339
+ .act-steps {
3340
+ position: sticky;
3341
+ left: 150px;
3342
+ width: min(100%, 340px);
3343
+ min-width: 0;
3344
+ }
3345
+ .act-title {
3346
+ display: flex;
3347
+ align-items: center;
3348
+ gap: 8px;
3349
+ }
3350
+ /* The name keeps its whole line while it fits; the actor beside it gives
3351
+ way (truncates) first, down to an ellipsis. */
3352
+ .act-name {
3353
+ display: flex;
3354
+ flex: 1 1 auto;
3355
+ align-items: center;
3356
+ gap: 8px;
3357
+ min-width: 0;
3358
+ }
3359
+ .act-name > dpk-component-inline-edit {
3360
+ flex: none;
3361
+ max-width: calc(100% - 32px);
3362
+ }
3363
+ /* How far the group's stories have come: a strip along the head's bottom
3364
+ edge, as wide as the steps it spans, so it costs the band no line. */
3365
+ .act-head > .status-bar {
3366
+ position: absolute;
3367
+ left: 0;
3368
+ right: 0;
3369
+ bottom: 0;
3370
+ height: 4px;
3371
+ gap: 1px;
3372
+ }
3373
+ .act-head > .status-bar .status-bar-part {
3374
+ border-radius: 0;
3375
+ }
3376
+ /* Whose experience the activity is: a label beside the name, editable in place. */
3377
+ .act-actor {
3378
+ display: flex;
3379
+ flex: 0 1 auto;
3380
+ min-width: 24px;
3381
+ max-width: 60%;
3382
+ padding: 0 4px;
3383
+ border-radius: 999px;
3384
+ background: var(--dpk-blue-soft);
3385
+ color: var(--dpk-blue);
3386
+ font-size: 11px;
3387
+ font-weight: 650;
3388
+ line-height: 20px;
3389
+ }
3390
+ .act-actor > dpk-component-inline-edit {
3391
+ min-width: 0;
3392
+ }
3393
+ .act-actor[data-empty='true'] {
3394
+ background: transparent;
3395
+ opacity: 0;
3396
+ transition: opacity 150ms ease;
3397
+ }
3398
+ .act-head:hover .act-actor[data-empty='true'],
3399
+ .act-actor[data-empty='true']:focus-within {
3400
+ opacity: 1;
3401
+ }
3402
+ /* The group view gives the steps no columns; the head lists them instead. */
3403
+ .act-steps {
3404
+ display: grid;
3405
+ gap: 3px;
3406
+ margin: 0;
3407
+ padding: 0 0 0 18px;
3408
+ color: var(--dpk-ink-soft);
3409
+ font-size: 11.5px;
3410
+ font-weight: 500;
3411
+ line-height: 1.45;
3412
+ }
3413
+ .act-steps li::marker {
3414
+ color: var(--dpk-ink-faint);
3415
+ font-family: var(--dpk-mono);
3416
+ font-size: 10px;
3417
+ }
3418
+ .act-head .count,
3419
+ .col-head .count {
3420
+ flex: 0 0 auto;
3421
+ padding: 0 6px;
3422
+ border-radius: 999px;
3423
+ background: var(--dpk-rule);
3424
+ line-height: 16px;
3425
+ }
3426
+ .col-head {
3427
+ display: flex;
3428
+ align-items: center;
3429
+ gap: 6px;
3430
+ padding-block: 5px;
3431
+ border-left: 1px solid var(--dpk-rule);
3432
+ background: var(--dpk-paper-sunken);
3433
+ transition: background 160ms var(--dpk-ease);
3434
+ }
3435
+ .col-head h4 {
3436
+ flex: 1 1 auto;
3437
+ min-width: 0;
3438
+ }
3439
+ .col-head[data-current='true'] {
3440
+ background: color-mix(in srgb, var(--dpk-usm-accent) 8%, var(--dpk-paper-sunken));
3441
+ }
3442
+ .col-head h4 {
3443
+ font-size: 13px;
3444
+ font-weight: 600;
3445
+ margin: 0;
3446
+ }
3447
+
3448
+ .row-head {
3449
+ display: flex;
3450
+ align-items: center;
3451
+ gap: 6px;
3452
+ }
3453
+
3454
+ /* Milestone row label: plain text with a grip, not a chip. The "add
3455
+ milestone" row reuses \`.row-head\` for its ghost button. */
3456
+ .row-head[data-milestone] {
3457
+ align-self: stretch;
3458
+ margin: 0;
3459
+ padding: 0 6px 0 0;
3460
+ color: var(--dpk-ink);
3461
+ font-size: 12.5px;
3462
+ font-weight: 650;
3463
+ max-width: 100%;
3464
+ }
3465
+
3466
+ .row-head[draggable='true'] {
3467
+ cursor: grab;
3468
+ -webkit-user-select: none;
3469
+ user-select: none;
3470
+ }
3471
+
3472
+ .row-head[draggable='true'] dpk-component-inline-edit {
3473
+ -webkit-user-drag: none;
3474
+ }
3475
+
3476
+ .row-head[draggable='true']:active {
3477
+ cursor: grabbing;
3478
+ }
3479
+
3480
+ .row-grip {
3481
+ flex: 0 0 auto;
3482
+ display: inline-flex;
3483
+ color: var(--dpk-ink-faint);
3484
+ }
3485
+
3486
+ .row-grip svg {
3487
+ display: block;
3488
+ width: 15px;
3489
+ height: 15px;
3490
+ }
3491
+
3492
+ /* Row-level drag affordance: only the grip answers the hover. */
3493
+ .map-row[data-draggable='true']:hover .row-grip {
3494
+ color: var(--dpk-blue);
3495
+ }
3496
+ .map-row[data-draggable='true'] {
3497
+ cursor: grab;
3498
+ }
3499
+ .map-row[data-draggable='true']:active {
3500
+ cursor: grabbing;
3501
+ }
3502
+
3503
+ /*
3504
+ * Dragging state: entire row fades. Never disable pointer events on the
3505
+ * source here: Lit applies this state in the microtask right after
3506
+ * \`dragstart\`, and Blink then re-hit-tests the pointer and aborts the drag
3507
+ * when the source is no longer under it.
3508
+ */
3509
+ .map-row[data-row-dragging='true'] {
3510
+ opacity: 0.45;
3511
+ }
3512
+
3513
+ /* Drop target: entire row highlights. */
3514
+ .map-row[data-row-drop='true'] {
3515
+ outline: 2px dashed var(--dpk-blue);
3516
+ outline-offset: -2px;
3517
+ }
3518
+
3519
+ /* Column drag: a group's head or a step's head is its column's handle, the
3520
+ way a row head is a milestone's. The grip answers the hover. */
3521
+ .act-head[draggable='true'],
3522
+ .col-head[draggable='true'] {
3523
+ cursor: grab;
3524
+ -webkit-user-select: none;
3525
+ user-select: none;
3526
+ }
3527
+ .act-head[draggable='true']:active,
3528
+ .col-head[draggable='true']:active {
3529
+ cursor: grabbing;
3530
+ }
3531
+ .act-head[draggable='true'] dpk-component-inline-edit,
3532
+ .col-head[draggable='true'] dpk-component-inline-edit {
3533
+ -webkit-user-drag: none;
3534
+ }
3535
+ .col-grip {
3536
+ flex: none;
3537
+ display: inline-flex;
3538
+ color: var(--dpk-ink-faint);
3539
+ }
3540
+ .col-grip svg {
3541
+ display: block;
3542
+ width: 13px;
3543
+ height: 13px;
3544
+ }
3545
+ .act-head[draggable='true']:hover .col-grip,
3546
+ .col-head[draggable='true']:hover .col-grip {
3547
+ color: var(--dpk-blue);
3548
+ }
3549
+ /* The dragged column fades from head to last cell, like a dragged row. */
3550
+ .act-head[data-col-dragging='true'],
3551
+ .col-head[data-col-dragging='true'],
3552
+ .cell[data-col-dragging='true'] {
3553
+ opacity: 0.45;
3554
+ }
3555
+ /* The column a dragged one would land in lights up from head to last cell,
3556
+ the way a row does: its sides run down every part and its head caps it.
3557
+ A group's column spans its steps, so only its outer steps draw its sides. */
3558
+ .act-head:is([data-col-drop='activity'], [data-col-drop='step']),
3559
+ .col-head:is([data-col-drop='activity'], [data-col-drop='step']),
3560
+ .cell:is([data-col-drop='activity'], [data-col-drop='step']) {
3561
+ --usm-col-left: 2px;
3562
+ --usm-col-right: 2px;
3563
+ --usm-col-top: 0px;
3564
+ box-shadow:
3565
+ inset var(--usm-col-left) 0 0 var(--dpk-blue),
3566
+ inset calc(var(--usm-col-right) * -1) 0 0 var(--dpk-blue),
3567
+ inset 0 var(--usm-col-top) 0 var(--dpk-blue);
3568
+ }
3569
+ [data-col-drop='activity'][data-step-edge]:not([data-step-edge~='first']) {
3570
+ --usm-col-left: 0px;
3571
+ }
3572
+ [data-col-drop='activity'][data-step-edge]:not([data-step-edge~='last']) {
3573
+ --usm-col-right: 0px;
3574
+ }
3575
+ .act-head[data-col-drop='activity'],
3576
+ .col-head[data-col-drop='step'] {
3577
+ --usm-col-top: 2px;
3578
+ }
3579
+ .cell:is([data-col-drop='activity'], [data-col-drop='step']) {
3580
+ background: linear-gradient(var(--dpk-blue-soft), var(--dpk-blue-soft)), var(--dpk-dots), var(--dpk-paper-sunken);
3581
+ }
3582
+ /* The heads stay opaque: the cells scroll under them. */
3583
+ .act-head:is([data-col-drop='activity'], [data-col-drop='step']),
3584
+ .col-head:is([data-col-drop='activity'], [data-col-drop='step']) {
3585
+ background-image: linear-gradient(var(--dpk-blue-soft), var(--dpk-blue-soft));
3586
+ }
3587
+
3588
+ /* Unassigned is a holding area, not a release: its label is quieter. */
3589
+ .map-row[data-unassigned='true'] .row-head {
3590
+ padding-left: var(--usm-row-indent);
3591
+ color: var(--dpk-ink-soft);
3592
+ }
3593
+
3594
+ /* Cells are the working canvas: sunken, with a quiet dot lattice, so raised
3595
+ story cards read as things placed on the board. */
3596
+ .cell {
3597
+ border-left: 1px solid var(--dpk-rule);
3598
+ border-top: 1px solid var(--dpk-rule);
3599
+ display: flex;
3600
+ flex-direction: column;
3601
+ gap: 8px;
3602
+ min-height: 100px;
3603
+ background: var(--dpk-dots), var(--dpk-paper-sunken);
3604
+ transition: background 160ms var(--dpk-ease);
3605
+ }
3606
+ .cell[data-drop='true'] {
3607
+ outline: 2px dashed var(--dpk-blue);
3608
+ outline-offset: -2px;
3609
+ }
3610
+ .card-list {
3611
+ display: grid;
3612
+ gap: 10px;
3613
+ align-content: start;
3614
+ flex: 1 1 auto;
3615
+ }
3616
+ .add-cell {
3617
+ margin-top: auto;
3618
+ opacity: 0;
3619
+ transition:
3620
+ opacity 180ms var(--dpk-ease),
3621
+ background 160ms var(--dpk-ease),
3622
+ border-color 160ms var(--dpk-ease),
3623
+ color 160ms var(--dpk-ease);
3624
+ border: 1px dashed var(--dpk-rule-strong);
3625
+ border-radius: var(--dpk-radius-sm);
3626
+ background: transparent;
3627
+ color: var(--dpk-ink-faint);
3628
+ padding: 4px 8px;
3629
+ font-size: 11.5px;
3630
+ }
3631
+ .add-cell:hover {
3632
+ background: var(--dpk-blue-soft);
3633
+ border-color: var(--dpk-blue);
3634
+ color: var(--dpk-blue);
3635
+ }
3636
+ .cell:hover .add-cell {
3637
+ opacity: 1;
3638
+ }
3639
+ .empty {
3640
+ border: 1px dashed var(--dpk-rule-strong);
3641
+ border-radius: var(--dpk-radius-lg);
3642
+ padding: 28px 24px;
3643
+ background: var(--dpk-dots), var(--dpk-paper-sunken);
3644
+ max-width: 620px;
3645
+ display: grid;
3646
+ gap: 10px;
3647
+ }
3648
+ .count {
3649
+ font-family: var(--dpk-mono);
3650
+ font-variant-numeric: tabular-nums;
3651
+ font-size: 10px;
3652
+ color: var(--dpk-ink-faint);
3653
+ }
3654
+
3655
+ /* ------------------------------------------------------ milestones tab */
3656
+
3657
+ /* The release slices as a timeline, like the experience section of a
3658
+ portfolio: when on the left, one node per slice on a single rail, what
3659
+ and how big on the right. Nothing is boxed; the rail carries the order. */
3660
+ .ms-overview {
3661
+ --ms-node: 30px;
3662
+ --ms-when: 132px;
3663
+ --ms-gap: 44px;
3664
+ display: grid;
3665
+ gap: 28px;
3666
+ max-width: 920px;
3667
+ padding: 28px 0 40px;
3668
+ }
3669
+ .ms-timeline {
3670
+ margin: 0;
3671
+ padding: 0;
3672
+ list-style: none;
3673
+ }
3674
+ .ms-entry,
3675
+ .ms-add {
3676
+ display: grid;
3677
+ grid-template-columns: var(--ms-when) var(--ms-node) minmax(0, 1fr);
3678
+ grid-template-areas: 'when rail body';
3679
+ column-gap: 24px;
3680
+ }
3681
+ .ms-entry {
3682
+ padding-bottom: var(--ms-gap);
3683
+ }
3684
+ .ms-when {
3685
+ grid-area: when;
3686
+ display: flex;
3687
+ justify-content: flex-end;
3688
+ padding-top: 5px;
3689
+ }
3690
+ .ms-timeframe {
3691
+ color: var(--dpk-ink);
3692
+ font-size: 13px;
3693
+ font-weight: 650;
3694
+ font-variant-numeric: tabular-nums;
3695
+ letter-spacing: 0.01em;
3696
+ text-align: right;
3697
+ }
3698
+ .ms-timeframe[data-empty='true'] {
3699
+ color: var(--dpk-ink-faint);
3700
+ font-weight: 500;
3701
+ }
3702
+
3703
+ /* The rail runs through every entry's padding, so the nodes read as one line;
3704
+ it starts at the first node and fades out into the add node. */
3705
+ .ms-rail {
3706
+ grid-area: rail;
3707
+ position: relative;
3708
+ display: flex;
3709
+ justify-content: center;
3710
+ }
3711
+ .ms-rail::before {
3712
+ content: '';
3713
+ position: absolute;
3714
+ top: 0;
3715
+ bottom: calc(-1 * var(--ms-gap));
3716
+ left: calc(50% - 1px);
3717
+ width: 2px;
3718
+ border-radius: 1px;
3719
+ background: var(--dpk-rule-strong);
3720
+ }
3721
+ .ms-entry:first-child .ms-rail::before {
3722
+ top: calc(var(--ms-node) / 2);
3723
+ }
3724
+ .ms-add .ms-rail::before {
3725
+ bottom: auto;
3726
+ height: calc(var(--ms-node) / 2);
3727
+ background: repeating-linear-gradient(to bottom, var(--dpk-rule-strong) 0 3px, transparent 3px 7px);
3728
+ }
3729
+ .ms-node {
3730
+ position: relative;
3731
+ display: grid;
3732
+ place-items: center;
3733
+ width: var(--ms-node);
3734
+ height: var(--ms-node);
3735
+ box-sizing: border-box;
3736
+ border: 1px solid var(--dpk-rule-strong);
3737
+ border-radius: 50%;
3738
+ background: var(--dpk-paper-raised);
3739
+ color: var(--dpk-ink);
3740
+ font-family: var(--dpk-mono);
3741
+ font-size: 12px;
3742
+ font-weight: 700;
3743
+ font-variant-numeric: tabular-nums;
3744
+ /* A ring of page color cuts the rail around the node. */
3745
+ box-shadow:
3746
+ 0 0 0 5px var(--dpk-paper),
3747
+ var(--dpk-bevel),
3748
+ var(--dpk-shadow-xs);
3749
+ transition:
3750
+ border-color 160ms var(--dpk-ease),
3751
+ color 160ms var(--dpk-ease);
3752
+ }
3753
+ .ms-entry:hover .ms-node,
3754
+ .ms-entry:focus-within .ms-node {
3755
+ border-color: var(--dpk-blue);
3756
+ color: var(--dpk-blue-strong);
3757
+ }
3758
+ .ms-node--add {
3759
+ border-style: dashed;
3760
+ background: var(--dpk-paper);
3761
+ box-shadow: 0 0 0 5px var(--dpk-paper);
3762
+ }
3763
+ .ms-node--add::before,
3764
+ .ms-node--add::after {
3765
+ content: '';
3766
+ position: absolute;
3767
+ left: 50%;
3768
+ top: 50%;
3769
+ width: 10px;
3770
+ height: 1.5px;
3771
+ border-radius: 1px;
3772
+ background: var(--dpk-ink-faint);
3773
+ transform: translate(-50%, -50%);
3774
+ }
3775
+ .ms-node--add::after {
3776
+ transform: translate(-50%, -50%) rotate(90deg);
3777
+ }
3778
+ .ms-add .ms-body {
3779
+ display: flex;
3780
+ align-items: center;
3781
+ min-height: var(--ms-node);
3782
+ }
3783
+ /* The label lines up with the names above; the button's padding hangs out. */
3784
+ .ms-add .dpk-btn {
3785
+ margin-left: -12px;
3786
+ }
3787
+
3788
+ .ms-body {
3789
+ grid-area: body;
3790
+ display: grid;
3791
+ gap: 10px;
3792
+ min-width: 0;
3793
+ justify-items: start;
3794
+ }
3795
+ .ms-name {
3796
+ justify-self: stretch;
3797
+ min-width: 0;
3798
+ margin: 0;
3799
+ padding-top: 1px;
3800
+ font-size: 19px;
3801
+ font-weight: 700;
3802
+ line-height: 1.4;
3803
+ letter-spacing: -0.015em;
3804
+ }
3805
+ /* The field pads its text by 4px; pull it out by as much so the name lines
3806
+ up with the description and keeps its place when editing starts. */
3807
+ .ms-name dpk-component-inline-edit {
3808
+ display: block;
3809
+ margin: 0 -4px;
3810
+ }
3811
+ .ms-description {
3812
+ margin: 0;
3813
+ max-width: 64ch;
3814
+ color: var(--dpk-ink-soft);
3815
+ font-size: 14px;
3816
+ line-height: 1.75;
3817
+ white-space: pre-wrap;
3818
+ }
3819
+ .ms-description[data-empty='true'] {
3820
+ color: var(--dpk-ink-faint);
3821
+ font-size: 13px;
3822
+ }
3823
+ .ms-facts {
3824
+ display: flex;
3825
+ flex-wrap: wrap;
3826
+ gap: 10px 36px;
3827
+ margin: 6px 0 0;
3828
+ }
3829
+ .ms-facts dt {
3830
+ margin-bottom: 3px;
3831
+ color: var(--dpk-ink-faint);
3832
+ font-size: 11px;
3833
+ font-weight: 600;
3834
+ letter-spacing: 0.02em;
3835
+ }
3836
+ .ms-facts dd {
3837
+ display: flex;
3838
+ align-items: center;
3839
+ gap: 10px;
3840
+ margin: 0;
3841
+ color: var(--dpk-ink-faint);
3842
+ font-size: 12px;
3843
+ }
3844
+ .ms-facts strong {
3845
+ color: var(--dpk-ink);
3846
+ font-size: 15px;
3847
+ font-weight: 650;
3848
+ font-variant-numeric: tabular-nums;
3849
+ }
3850
+ .ms-meter {
3851
+ display: block;
3852
+ width: 72px;
3853
+ height: 4px;
3854
+ border-radius: 2px;
3855
+ background: var(--dpk-paper-inset);
3856
+ overflow: hidden;
3857
+ }
3858
+ .ms-meter > span {
3859
+ display: block;
3860
+ height: 100%;
3861
+ border-radius: inherit;
3862
+ background: var(--dpk-blue);
3863
+ }
3864
+
3865
+ /* Where the slice's stories sit across the backbone, in activity tones. */
3866
+ .ms-breakdown {
3867
+ display: grid;
3868
+ gap: 10px;
3869
+ width: min(100%, 460px);
3870
+ margin-top: 4px;
3871
+ }
3872
+ .ms-breakdown .status-bar {
3873
+ height: 8px;
3874
+ }
3875
+ .ms-legend {
3876
+ display: flex;
3877
+ flex-wrap: wrap;
3878
+ gap: 6px 16px;
3879
+ margin: 0;
3880
+ padding: 0;
3881
+ list-style: none;
3882
+ }
3883
+ .ms-legend li {
3884
+ display: inline-flex;
3885
+ align-items: center;
3886
+ gap: 6px;
3887
+ color: var(--dpk-ink-soft);
3888
+ font-size: 12px;
3889
+ }
3890
+ .ms-breakdown-count {
3891
+ color: var(--dpk-ink-faint);
3892
+ font-family: var(--dpk-mono);
3893
+ font-size: 11px;
3894
+ font-variant-numeric: tabular-nums;
3895
+ }
3896
+
3897
+ /* Narrow: the date moves above the name, the rail stays on the left. */
3898
+ @media (max-width: 640px) {
3899
+ .ms-overview {
3900
+ --ms-node: 26px;
3901
+ }
3902
+ .ms-entry,
3903
+ .ms-add {
3904
+ grid-template-columns: var(--ms-node) minmax(0, 1fr);
3905
+ grid-template-areas:
3906
+ 'rail when'
3907
+ 'rail body';
3908
+ column-gap: 16px;
3909
+ }
3910
+ .ms-add {
3911
+ grid-template-areas: 'rail body';
3912
+ }
3913
+ .ms-add .ms-when {
3914
+ display: none;
3915
+ }
3916
+ .ms-when {
3917
+ justify-content: flex-start;
3918
+ padding: 4px 0 2px;
3919
+ }
3920
+ .ms-timeframe {
3921
+ text-align: left;
3922
+ }
3923
+ }
3924
+
3925
+ /* ------------------------------------------------------- statuses tab */
3926
+
3927
+ /* The statuses in order, one row each: color, name, how many stories stand
3928
+ there, the palette to recolor it, and the order / delete tools. */
3929
+ .st-overview {
3930
+ display: grid;
3931
+ gap: 20px;
3932
+ max-width: 1040px;
3933
+ padding: 28px 0 40px;
3934
+ }
3935
+ .st-list {
3936
+ display: grid;
3937
+ margin: 0;
3938
+ padding: 0;
3939
+ list-style: none;
3940
+ border: 1px solid var(--dpk-rule);
3941
+ border-radius: var(--dpk-radius-lg);
3942
+ background: var(--dpk-paper-raised);
3943
+ box-shadow: var(--dpk-shadow-xs);
3944
+ }
3945
+ .st-row {
3946
+ display: grid;
3947
+ /* Fixed tool columns keep the unset row, which has no tools, in line. */
3948
+ grid-template-columns: 16px minmax(120px, 1fr) minmax(140px, 200px) 150px 84px;
3949
+ align-items: center;
3950
+ gap: 14px;
3951
+ padding: 12px 16px;
3952
+ }
3953
+ /* A status also says whether stories are done there, before its tools. */
3954
+ .st-row--status {
3955
+ grid-template-columns: 16px minmax(120px, 1fr) minmax(140px, 200px) 150px auto 84px;
3956
+ }
3957
+ .st-row + .st-row {
3958
+ border-top: 1px solid var(--dpk-rule);
3959
+ }
3960
+ .st-done {
3961
+ display: inline-flex;
3962
+ align-items: center;
3963
+ gap: 6px;
3964
+ color: var(--dpk-ink-faint);
3965
+ font-size: 12px;
3966
+ font-weight: 600;
3967
+ white-space: nowrap;
3968
+ cursor: pointer;
3969
+ user-select: none;
3970
+ transition: color 140ms var(--dpk-ease);
3971
+ }
3972
+ .st-done:hover,
3973
+ .st-done:has(:checked) {
3974
+ color: var(--dpk-ink);
3975
+ }
3976
+ .st-done input {
3977
+ margin: 0;
3978
+ accent-color: var(--usm-tone);
3979
+ cursor: inherit;
3980
+ }
3981
+ .st-name {
3982
+ min-width: 0;
3983
+ font-size: 14px;
3984
+ font-weight: 650;
3985
+ }
3986
+ .st-share {
3987
+ display: grid;
3988
+ gap: 5px;
3989
+ }
3990
+ .st-share-text {
3991
+ color: var(--dpk-ink-faint);
3992
+ font-family: var(--dpk-mono);
3993
+ font-size: 11px;
3994
+ font-variant-numeric: tabular-nums;
3995
+ }
3996
+ .st-meter {
3997
+ height: 5px;
3998
+ border-radius: 3px;
3999
+ background: var(--dpk-paper-sunken);
4000
+ overflow: hidden;
4001
+ }
4002
+ .st-meter > span {
4003
+ display: block;
4004
+ height: 100%;
4005
+ border-radius: 3px;
4006
+ background: var(--usm-tone);
4007
+ }
4008
+ .st-tones {
4009
+ display: inline-flex;
4010
+ flex-wrap: wrap;
4011
+ gap: 5px;
4012
+ }
4013
+ /* The status's own icon opens the menu of icons. */
4014
+ .st-icon-trigger {
4015
+ display: inline-grid;
4016
+ place-items: center;
4017
+ width: 30px;
4018
+ height: 30px;
4019
+ margin: -7px;
4020
+ padding: 0;
4021
+ border: 1px solid transparent;
4022
+ border-radius: var(--dpk-radius-sm);
4023
+ background: transparent;
4024
+ cursor: pointer;
4025
+ transition:
4026
+ background 140ms var(--dpk-ease),
4027
+ border-color 140ms var(--dpk-ease);
4028
+ }
4029
+ .st-icon-trigger:hover,
4030
+ .st-icon-trigger[aria-expanded='true'] {
4031
+ border-color: var(--dpk-rule-strong);
4032
+ background: var(--dpk-paper-raised);
4033
+ box-shadow: var(--dpk-shadow-xs);
4034
+ }
4035
+ .st-icon-trigger:focus-visible {
4036
+ outline: none;
4037
+ box-shadow: var(--dpk-focus);
4038
+ }
4039
+ .comment-pop.icon-menu {
4040
+ grid-template-columns: repeat(5, 36px);
4041
+ gap: 4px;
4042
+ padding: 8px;
4043
+ }
4044
+ .icon-option {
4045
+ display: inline-grid;
4046
+ place-items: center;
4047
+ width: 36px;
4048
+ height: 36px;
4049
+ padding: 0;
4050
+ border: 1px solid transparent;
4051
+ border-radius: var(--dpk-radius-sm);
4052
+ background: transparent;
4053
+ cursor: pointer;
4054
+ }
4055
+ .icon-option .status-icon {
4056
+ width: 18px;
4057
+ height: 18px;
4058
+ }
4059
+ .icon-option:hover,
4060
+ .icon-option:focus-visible {
4061
+ outline: none;
4062
+ background: var(--dpk-paper-inset);
4063
+ }
4064
+ .icon-option[aria-checked='true'] {
4065
+ border-color: color-mix(in oklab, var(--usm-tone) 55%, transparent);
4066
+ background: color-mix(in oklab, var(--usm-tone) 12%, transparent);
4067
+ }
4068
+ .st-tone {
4069
+ width: 18px;
4070
+ height: 18px;
4071
+ padding: 0;
4072
+ border: 2px solid var(--dpk-paper-raised);
4073
+ border-radius: 50%;
4074
+ background: var(--usm-tone);
4075
+ box-shadow: 0 0 0 1px var(--dpk-rule-strong);
4076
+ cursor: pointer;
4077
+ transition: box-shadow 150ms ease;
4078
+ }
4079
+ .st-tone:hover {
4080
+ box-shadow: 0 0 0 1px var(--usm-tone);
4081
+ }
4082
+ .st-tone[aria-checked='true'] {
4083
+ box-shadow: 0 0 0 2px var(--usm-tone);
4084
+ }
4085
+ .st-tone:focus-visible {
4086
+ outline: none;
4087
+ box-shadow: var(--dpk-focus);
4088
+ }
4089
+ /* A label's color, where a status shows its icon. */
4090
+ .label-swatch {
4091
+ width: 12px;
4092
+ height: 12px;
4093
+ border-radius: 4px;
4094
+ background: var(--usm-tone);
4095
+ }
4096
+ /* A member's initial in their color, where a label shows its swatch. */
4097
+ .member-avatar {
4098
+ display: inline-grid;
4099
+ place-items: center;
4100
+ width: 22px;
4101
+ height: 22px;
4102
+ border-radius: 50%;
4103
+ background: var(--usm-tone);
4104
+ color: var(--dpk-paper-raised);
4105
+ font-size: 11px;
4106
+ font-weight: 700;
4107
+ line-height: 1;
4108
+ }
4109
+ .st-tools {
4110
+ display: inline-flex;
4111
+ gap: 2px;
4112
+ }
4113
+ .st-tools .dpk-icon-btn {
4114
+ width: 26px;
4115
+ height: 26px;
4116
+ font-size: 13px;
4117
+ }
4118
+ @media (max-width: 640px) {
4119
+ .st-row {
4120
+ grid-template-columns: 16px minmax(0, 1fr) auto;
4121
+ row-gap: 8px;
4122
+ }
4123
+ .st-share,
4124
+ .st-tones,
4125
+ .st-done {
4126
+ grid-column: 2 / -1;
4127
+ }
4128
+ /* The tools stay on the name's row, so the rows below are the name's width. */
4129
+ .st-tools {
4130
+ grid-column: 3;
4131
+ grid-row: 1;
4132
+ }
4133
+ }
4134
+
4135
+ /* Step picker shown after a cross-activity drop. */
4136
+ .move-dialog {
4137
+ min-width: 220px;
4138
+ }
4139
+ `,Y={kind:"idle"},Qr={width:300,height:240},eo={width:228,height:116},to=240,ao=31,so=14,as=160;class ss extends yt{static{this.styles=[yt.styles,Jr,lt,ka,Xr,cr,or,Sr,$r,hr,Ur,Es]}definitionFor(t){return ca(t)}static{this.properties={mode:{state:!0}}}#n=new Is(this);#e=new Ss(this);#a=null;#s=new On(this,{row:()=>this.renderRoot.querySelector(".page-nav"),items:t=>[...t.querySelectorAll('.page-tabs [role="tab"]')],keyOf:t=>t.getAttribute("data-tab")??"",kept:t=>t.getAttribute("aria-selected")==="true",more:t=>t.querySelector("[data-tabs-more-trigger]")});#t=!1;constructor(){super(),this.mode=Y,new Ze(this,{open:()=>this.#r()!==null,closesOn:t=>this.#o(t),ownsEscape:t=>this.mode.kind==="idle"&&(t.includes(this)||t[0]===document.body||t[0]===document.documentElement),dismiss:()=>this.context().navigate({story:null})}),new Ze(this,{open:()=>this.mode.kind==="filtering",closesOn:t=>!t.some(a=>a instanceof Element&&(a.id==="filter-menu"||a.hasAttribute("data-filter-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=Y}),new Ze(this,{open:()=>this.mode.kind==="choosing-tab",closesOn:t=>!t.some(a=>a instanceof Element&&(a.id==="tabs-menu"||a.hasAttribute("data-tabs-more-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=Y})}renderRegions(t){return{main:this.#p(t)}}updated(){if(super.updated(),this.#l(),this.#d(),this.mode.kind==="picking-dependency"){this.#i();return}if(this.mode.kind==="picking-icon"){const a=this.renderRoot.querySelector("#icon-menu"),s=this.renderRoot.querySelector(`[data-icon-trigger="${CSS.escape(this.mode.statusId)}"]`);a&&s&&this.#e.open(a,s,eo);return}if(this.mode.kind==="filtering"){const a=this.renderRoot.querySelector("#filter-menu"),s=this.renderRoot.querySelector(`[data-filter-trigger="${CSS.escape(this.mode.key)}"]`),n=(a?.childElementCount??0)*ao+so;a&&s&&this.#e.open(a,s,{width:to,height:n});return}if(this.mode.kind==="choosing-tab"){const a=this.renderRoot.querySelector("#tabs-menu"),s=this.renderRoot.querySelector("[data-tabs-more-trigger]");if(!a){this.mode=Y;return}const n=a.childElementCount*Cr+Br;s&&this.#e.open(a,s,{width:Yr,height:n},{placement:"bottom-start"});return}if(this.mode.kind!=="picking-step")return;const t=this.renderRoot.querySelector("#move-dialog");t&&this.#e.open(t,Ts(this.mode.point.x,this.mode.point.y),Qr)}#i(){const t=this.renderRoot instanceof ShadowRoot?this.renderRoot.activeElement:null;if(!t?.matches(".sp-dep-search")){this.mode=Y;return}const a=t.getAttribute("aria-activedescendant");a&&this.renderRoot.querySelector(`#${CSS.escape(a)}`)?.scrollIntoView?.({block:"nearest"})}#r(){return this.renderRoot.querySelector(".story-panel")}#o(t){const a=this.#r(),s=this.renderRoot.querySelector(".dpk-main");return!a||!s||t.includes(a)||!t.includes(s)?!1:!t.some(n=>n instanceof Element&&(n.localName==="dpk-internal-usm-story-card"||n.hasAttribute("popover")))}#d(){const t=this.#r(),a=t?.dataset.story??null,s=this.#a;if(a===s)return;this.#a=a;const n=this.shadowRoot?.activeElement??null;if(t){(!n||!t.contains(n))&&t.focus({preventScroll:!0});return}s===null||n!==null&&n.isConnected||this.renderRoot.querySelector(`dpk-internal-usm-story-card[data-story="${CSS.escape(s)}"]`)?.focus({preventScroll:!0})}#l(){if(!(Ce(this.navigation)!==null)){this.#t=!1;return}const a=this.renderRoot.querySelector(".map-scroll"),s=a?.querySelector('dpk-internal-usm-story-card[data-highlight="on"]');this.#t||!a||!s||(this.#t=!0,As(a,s,as),_s(a,s,as))}#p(t){const a=he(this.locale),s=Zt(t.state,t.navigation);return l`
4140
+ ${Dr(Or(a,t,s,{folded:this.#s.hidden,minimum:this.#s.minimum,open:this.mode.kind==="choosing-tab",toggle:()=>this.mode=this.mode.kind==="choosing-tab"?Y:{kind:"choosing-tab"},close:()=>this.mode=Y}),this.#c(a,t,s))}
4141
+ ${this.#m(a,t,s)} ${this.#u(a,t,s)}
4142
+ ${Lr(a,t,this.mode,{confirm:n=>this.#w(n),cancel:()=>this.mode=Y})}
4143
+ `}#c(t,a,s){return s!=="map"||De(a.state).length===0?m:Er(t,a,{openFor:this.mode.kind==="filtering"?this.mode.key:null,toggle:n=>{const i=this.mode.kind==="filtering"&&this.mode.key===n;this.mode=i?Y:{kind:"filtering",key:n}},close:()=>this.mode=Y})}#u(t,a,s){if(s!=="map")return m;const n=zr(a);if(!n)return m;const i={search:this.mode.kind==="picking-dependency"?this.mode.search:null,set:r=>this.mode=r?{kind:"picking-dependency",search:r}:Y};return Pr(t,a,n,i)}#m(t,a,s){switch(s){case"milestones":return _r(t,a,ki(a.state));case"statuses":return Hi(t,a,Zr(a.state),{openFor:this.mode.kind==="picking-icon"?this.mode.statusId:null,toggle:n=>{const i=this.mode.kind==="picking-icon"&&this.mode.statusId===n;this.mode=i?Y:{kind:"picking-icon",statusId:n}},close:()=>this.mode=Y});case"labels":return gr(t,a,vi(a.state));case"members":return Tr(t,a,yi(a.state));case"burndown":return Ji(t,a,new Date);case"map":return this.#h(t,a)}}#h(t,a){return Li({m:t,context:a,drag:this.#n,handlers:{selectStory:s=>this.#g(s),dropOnCell:(s,n)=>this.#b(s,n),dropOnGroupCell:(s,n,i)=>this.#f(s,n,i),dropOnMilestoneRow:(s,n)=>this.#v(s,n),dropOnActivity:s=>this.#y(s),dropOnStep:s=>this.#k(s)},highlighted:An(a.state,a.navigation)})}#g(t){const a=this.context(),s=S(a.state,t);s&&a.navigate({step:s.stepId,story:s.id})}#b(t,a){const s=this.context();s.dispatch(Ta(s.state,t,a.item.id,a.hoveredId,a.place))}#f(t,a,s){const n=this.context(),i=S(n.state,s.item.id);if(!i)return;if(i.activityId!==t){this.mode={kind:"picking-step",storyId:i.id,activityId:t,milestoneId:a,point:{x:s.event.clientX,y:s.event.clientY}};return}const r=Aa(n.state,t,a,i.id,s.hoveredId,s.place);r&&n.dispatch(r)}#v(t,a){const s=this.context(),n=s.state.milestones.map(r=>r.id),i=Ia(n,a.item.id,a.hoveredId,a.place);i&&s.dispatch(i)}#y(t){const a=this.context(),s=a.state.activities.map(i=>i.id),n=bi(s,t.item.id,t.hoveredId,t.place);n&&a.dispatch(n)}#k(t){const a=this.context(),s=fi(a.state,t.item.id,t.hoveredId,t.place);s&&a.dispatch(s)}#w(t){const a=this.mode;if(a.kind!=="picking-step")return;const s=this.context();s.dispatch(_a(s.state,a.storyId,a.activityId,t,a.milestoneId)),this.mode=Y}}const ns=()=>{pi(),ei(),hi(),customElements.get("dpk-template-usm")||customElements.define("dpk-template-usm",ss)},no=Object.freeze(Object.defineProperty({__proto__:null,DpkTemplateUsm:ss,IDLE_MODE:Y,allUsmIds:q,applyUsmAction:Ft,defineUsmElement:ns,describeUsmAction:na,dropAfter:gi,emptyUsmBase:Lt,findActivity:Q,findMilestone:P,findStep:M,findStory:S,flatSteps:De,parseUsmBase:It,resolveCellDrop:Ta,resolveGroupDrop:Aa,resolveMilestoneDrop:Ia,resolvePickedStepMove:_a,resolveUsmNavigation:la,serializeUsmAction:ia,storiesInCell:Re,storyCountForStep:Rt,usmAction:dn,usmActions:w,usmCommentTargets:oa,usmCurrentTarget:da,usmDefinitionFor:ca,usmHasTarget:pa,usmMessages:he,usmTargetLabel:ra,usmTitle:ot},Symbol.toStringTag,{value:"Module"}));export{ns as d,no as i};