dev-process-kit 0.3.0-beta.2 → 0.3.0-beta.3

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 (34) hide show
  1. package/dist/boards.js +1 -1
  2. package/dist/chunks/{shared-C7wOrDIL.js → shared-BLzPmv14.js} +1 -1
  3. package/dist/chunks/{shared-DOKOFdYm.js → shared-BYcLqnFV.js} +3 -3
  4. package/dist/chunks/shared-BYr9ZouD.js +1864 -0
  5. package/dist/chunks/{shared-B-DAJvq3.js → shared-BhUEVKpO.js} +34 -34
  6. package/dist/chunks/{shared-CE8X9qCv.js → shared-Bt5HGgX9.js} +17 -17
  7. package/dist/chunks/{shared-D2qgtKhc.js → shared-BzKZc8e7.js} +1 -1
  8. package/dist/chunks/{shared-BdIN9A6O.js → shared-CJnwvCXE.js} +1 -1
  9. package/dist/chunks/{shared-Dgse8blZ.js → shared-CO-HhC8m.js} +1 -1
  10. package/dist/chunks/shared-CXefnQqJ.js +5222 -0
  11. package/dist/chunks/shared-D4PPk0Dk.js +1 -0
  12. package/dist/chunks/{shared-CPNa9lTa.js → shared-D6X_HEJN.js} +1 -1
  13. package/dist/chunks/shared-D9js0mlL.js +6322 -0
  14. package/dist/chunks/{shared-CPwjSgu0.js → shared-DEco37gW.js} +1 -1
  15. package/dist/chunks/shared-DIHtcDps.js +1 -0
  16. package/dist/chunks/shared-DXPlz1s4.js +767 -0
  17. package/dist/chunks/{shared-BT5Ayp_z.js → shared-NkccEMPc.js} +1 -1
  18. package/dist/chunks/shared-naTB_LaU.js +3662 -0
  19. package/dist/components.js +1 -1
  20. package/dist/index.js +1 -1
  21. package/dist/views/delegation-poker.js +1 -1
  22. package/dist/views/plain.js +1 -1
  23. package/dist/views/prototype.js +1 -1
  24. package/dist/views/slides.js +1 -1
  25. package/dist/views/task-board.js +1 -1
  26. package/dist/views/usm.js +1 -1
  27. package/package.json +1 -1
  28. package/dist/chunks/shared-BTf38OnF.js +0 -1
  29. package/dist/chunks/shared-BXejn2ZQ.js +0 -4928
  30. package/dist/chunks/shared-CpJDPnHA.js +0 -573
  31. package/dist/chunks/shared-DgexE4u1.js +0 -1862
  32. package/dist/chunks/shared-DnJcdL52.js +0 -3586
  33. package/dist/chunks/shared-HdOOfyqP.js +0 -6208
  34. package/dist/chunks/shared-TrlnHjrJ.js +0 -1
@@ -0,0 +1,3662 @@
1
+ import{ax as f,bj as Aa,ac as h,av as W,aU as we,a$ as Je,ad as Se,az as _e,bi as Qe,bD as Ma,bE as La,aV as $t,bk as Da,bF as xt,au as Ra,aL as _,ay as w,aw as V,aa as Y,aM as R,aN as Ie,p as b,a8 as Tt,a9 as g,t as ee,aO as G,aB as Oa,N as Na,e as Ca,a5 as Ba,S as I,P as k,b0 as O,ah as H,as as l,ai as u,aj as B,ak as Ae,al as et,l as J,aH as U,aP as Q,I as tt,X as Ua,ag as _t,aE as It,B as Ya,j as Pa,aW as Me,bm as za,bn as Fa,bp as Va,z as At,aS as Le,H as Ga,bG as Mt,bH as Ha,bc as De,bI as Ka,y as st,bd as qa,V as Lt,aF as Dt,aG as at,aT as Wa,aK as ja,bJ as Xa}from"./shared-CXefnQqJ.js";import{a as Rt,c as Za}from"./shared-NkccEMPc.js";import{w as Ot,C as Nt,h as Ct,q as Bt,r as Ut,g as Yt,a as Ja,x as Qa}from"./shared-DEco37gW.js";import{L as en}from"./shared-CjW1DhGL.js";import{o as Re}from"./shared-DIHtcDps.js";const tn=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],sn=[["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"}]],an=[["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"}]],nn=[["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"}]],on=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],rn=[["circle",{cx:"12",cy:"12",r:"10"}]],dn=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],ln=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],pn=[["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"}]],cn=[["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"}]],un=[["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"}]],mn=[["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"}]],hn=[["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"}]],bn=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor"}]],gn=[["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"}]],Pt=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),nt=(e,t,s)=>{const a=Pt(e),n=new Set,i=[...a.get(t)??[]];for(;i.length>0;){const o=i.pop();if(!(o===void 0||n.has(o))){if(o===s)return!0;n.add(o),i.push(...a.get(o)??[])}}return!1},fn=e=>{const t=Pt(e),s=new Set,a=(n,i)=>{const o=i.indexOf(n);if(o>=0)return[...i.slice(o),n];if(s.has(n))return null;for(const r of t.get(n)??[]){const d=a(r,[...i,n]);if(d)return d}return s.add(n),null};for(const n of e){const i=a(n.id,[]);if(i)return i}return null},Oe=["gray","blue","violet","green","amber","accent"],zt=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],Ne=["estimates","assignees"],Ft=["stories","points","weighted"],Vt=f(h(),Ma(),Qe(e=>{const[t=0,s=0,a=0]=e.split("-").map(Number),n=new Date(Date.UTC(t,s-1,a));return n.getUTCMonth()===s-1&&n.getUTCDate()===a},"a due date must be a calendar day")),Gt=f(Se(),Je(),we(0)),it=f(Se(),Je(),we(0)),Ht=W({milestoneId:_(f(h(),w(1))),statusId:_(f(h(),w(1))),stories:f(Se(),$t(),we(0)),points:f(Se(),Je(),we(0))}),Ce=f(h(),Aa()),yn=W({id:f(h(),w(1)),name:f(h(),w(1)),questions:Ie}),vn=W({id:R,name:f(h(),w(1)),actor:_(h()),steps:V(Y(yn),[]),questions:Ie}),kn=W({id:f(h(),w(1)),name:f(h(),w(1)),timeframe:_(h()),description:_(h()),dueDate:_(Vt),questions:Ie}),ae=_e(Oe),ot=_e(zt),rt=f(h(),La(),Qe(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),wn=W({url:rt,label:_(f(h(),w(1)))}),Sn=W({id:R,name:f(h(),w(1)),tone:V(ae),icon:V(ot),weight:_(Gt)}),En=W({id:R,name:f(h(),w(1)),tone:V(ae)}),Kt=f(h(),Qe(e=>e.trim()!=="","a comment needs some text")),$n=W({id:R,body:Kt,createdAt:_(Ce)}),qt=f(Se(),$t(),we(1)),xn=W({id:R,number:_(qt),name:f(h(),w(1)),description:_(h()),activityId:f(h(),w(1)),stepId:f(h(),w(1)),milestoneId:_(h()),statusId:_(h()),links:_(Y(wn)),labelIds:_(Y(f(h(),w(1)))),blockedBy:_(Y(f(h(),w(1)))),estimateId:_(f(h(),w(1))),assigneeId:_(f(h(),w(1))),comments:_(Y($n)),questions:Ie}),Tn=W({id:R,name:f(h(),w(1)),tone:V(ae)}),Wt=_e(Ne),jt=_e(Ft),_n=W({id:R,name:f(h(),w(1)),points:it}),In=W({id:R,at:Ce,tally:Y(Ht)}),An=W({title:_(h()),features:V(Y(Wt),[]),measure:_(jt),doneStatusId:_(f(h(),w(1))),activities:V(Y(vn),[]),milestones:V(Y(kn),[]),statuses:V(Y(Sn),[]),labels:V(Y(En),[]),members:V(Y(Tn),[]),estimates:V(Y(_n),[]),stories:V(Y(xn),[]),snapshots:V(Y(In),[])}),dt=e=>Oe[e%Oe.length]??"gray",Be=e=>dt(e+1),Xt=e=>{const t=Ra(An,e);if(new Set(t.features).size!==t.features.length)throw new Error("the base turns a feature on twice");const s=t.statuses[0]?.id,a=t.stories.flatMap(c=>c.number===void 0?[]:[c.number]),n=a.find((c,T)=>a.indexOf(c)!==T);if(n!==void 0)throw new Error(`two stories share the number ${n}`);let i=Math.max(0,...a);const o={...t,stories:t.stories.map(c=>({...c,number:c.number??++i,...s===void 0||c.statusId!==void 0?{}:{statusId:s}})),statuses:t.statuses.map((c,T)=>({...c,tone:c.tone??dt(T),icon:c.icon??"progress"})),labels:t.labels.map((c,T)=>({...c,tone:c.tone??Be(T)})),members:t.members.map((c,T)=>({...c,tone:c.tone??Be(T)})),features:Ne.filter(c=>t.features.includes(c))},r=new Map;for(const c of o.activities)for(const T of c.steps)r.set(T.id,c.id);const d=new Set(o.milestones.map(c=>c.id)),p=new Set(o.statuses.map(c=>c.id)),m=new Set(o.labels.map(c=>c.id));if(o.doneStatusId!==void 0&&!p.has(o.doneStatusId))throw new Error(`the base references unknown doneStatusId "${o.doneStatusId}"`);const y=new Set,E=(c,T)=>{if(y.has(T))throw new Error(`duplicate id "${T}" in ${c}`);y.add(T)};for(const c of o.activities){E("activities",c.id);for(const T of c.steps)E("steps",T.id)}for(const c of o.milestones)E("milestones",c.id);for(const c of o.statuses)E("statuses",c.id);for(const c of o.labels)E("labels",c.id);for(const c of o.members)E("members",c.id);for(const c of o.estimates)E("estimates",c.id);for(const c of o.snapshots)E("snapshots",c.id);const S=new Set(o.estimates.map(c=>c.id)),A=new Set(o.members.map(c=>c.id));for(const c of o.stories){E("stories",c.id);for(const ke of c.comments??[])E("story comments",ke.id);const T=r.get(c.stepId);if(T===void 0||T!==c.activityId)throw new Error(`story "${c.id}" references unknown activityId/stepId`);if(c.milestoneId!==void 0&&!d.has(c.milestoneId))throw new Error(`story "${c.id}" references unknown milestoneId "${c.milestoneId}"`);const ye=(c.links??[]).map(ke=>ke.url);if(new Set(ye).size!==ye.length)throw new Error(`story "${c.id}" links the same URL twice`);if(c.statusId!==void 0&&!p.has(c.statusId))throw new Error(`story "${c.id}" references unknown statusId "${c.statusId}"`);const ve=c.labelIds??[];if(new Set(ve).size!==ve.length)throw new Error(`story "${c.id}" has a label twice`);const Et=ve.find(ke=>!m.has(ke));if(Et!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${Et}"`);if(c.estimateId!==void 0&&!S.has(c.estimateId))throw new Error(`story "${c.id}" references unknown estimateId "${c.estimateId}"`);if(c.assigneeId!==void 0&&!A.has(c.assigneeId))throw new Error(`story "${c.id}" references unknown assigneeId "${c.assigneeId}"`)}for(const c of o.snapshots){const T=Zt(o,c.tally);if(T!==null)throw new Error(`snapshot "${c.id}" ${T}`)}const $=new Set(o.stories.map(c=>c.id));for(const c of o.stories){const T=c.blockedBy??[];if(T.includes(c.id))throw new Error(`story "${c.id}" is blocked by itself`);if(new Set(T).size!==T.length)throw new Error(`story "${c.id}" has a blocker twice`);const ye=T.find(ve=>!$.has(ve));if(ye!==void 0)throw new Error(`story "${c.id}" references unknown blocker "${ye}"`)}const L=fn(o.stories);if(L!==null)throw new Error(`stories block one another in a cycle: ${L.join(" \u2192 ")}`);return o},Zt=(e,t)=>{const s=new Set;for(const a of t){if(a.milestoneId!==void 0&&!P(e,a.milestoneId))return`references unknown milestoneId "${a.milestoneId}"`;if(a.statusId!==void 0&&!D(e,a.statusId))return`references unknown statusId "${a.statusId}"`;const n=Ue(a);if(s.has(n))return`tallies "${n}" twice`;s.add(n)}return null},Ue=e=>`${e.milestoneId??""}/${e.statusId??""}`,lt=()=>({features:[],activities:[],milestones:[],statuses:[],labels:[],members:[],estimates:[],stories:[],snapshots:[]}),te=(e,t)=>{if(t!==void 0)return e.activities.find(s=>s.id===t)},ce=(e,t)=>`${e}.${t}`,N=(e,t)=>{if(t===void 0)return;const s=Da(t,2);if(s){const[a,n]=s;if(a===void 0||n===void 0)return;const i=e.activities.find(r=>r.id===a),o=i?.steps.find(r=>r.id===n);return i&&o?{activity:i,step:o}:void 0}if(!t.includes("."))for(const a of e.activities){const n=a.steps.find(i=>i.id===t);if(n)return{activity:a,step:n}}},P=(e,t)=>{if(t!==void 0)return e.milestones.find(s=>s.id===t)},D=(e,t)=>{if(t!==void 0)return e.statuses.find(s=>s.id===t)},Z=(e,t)=>{if(t!==void 0)return e.labels.find(s=>s.id===t)},z=(e,t)=>e.features.includes(t),K=(e,t)=>{if(t!==void 0)return e.members.find(s=>s.id===t)},pt=(e,t)=>K(e,t.assigneeId),F=(e,t)=>{if(t!==void 0)return e.estimates.find(s=>s.id===t)},Ee=(e,t)=>{if(t!==void 0)return e.snapshots.find(s=>s.id===t)},ct=(e,t)=>{const s=new Set(t.labelIds??[]);return e.labels.filter(a=>s.has(a.id))},x=(e,t)=>{if(t!==void 0)return e.stories.find(s=>s.id===t)},Ye=e=>e.activities.flatMap(t=>t.steps.map(s=>({activity:t,step:s}))),Mn=e=>({...e,stories:xt(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Pe=(e,t,s)=>e.stories.filter(a=>a.stepId===t&&(a.milestoneId??void 0)===s),Jt=(e,t,s)=>e.stories.filter(a=>a.activityId===t&&(a.milestoneId??void 0)===s),j=e=>[...e.activities.map(t=>t.id),...e.activities.flatMap(t=>t.steps.map(s=>s.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(s=>s.id)),...e.snapshots.map(t=>t.id)],Qt=(e,t)=>e.stories.filter(s=>s.stepId===t).length,es=g({feature:Wt,enabled:Oa()}),v={SET_ACTIVITY_NAME:b("SET_ACTIVITY_NAME","activity",g({name:f(h(),w(1))})),SET_ACTIVITY_ACTOR:b("SET_ACTIVITY_ACTOR","activity",g({actor:h()})),SET_STEP_NAME:b("SET_STEP_NAME","step",g({name:f(h(),w(1))})),REORDER_STEP:b("REORDER_STEP","step",g({after:G(h())}),{mode:"sequence"}),REORDER_ACTIVITY:b("REORDER_ACTIVITY","activity",g({after:G(h())}),{mode:"sequence"}),ADD_ACTIVITY:b("ADD_ACTIVITY","page",g({id:R,name:f(h(),w(1))}),{dedupeKey:ee}),ADD_STEP:b("ADD_STEP","activity",g({id:R,name:f(h(),w(1))}),{dedupeKey:ee}),DELETE_ACTIVITY:b("DELETE_ACTIVITY","activity",g({})),DELETE_STEP:b("DELETE_STEP","step",g({})),SET_STORY_NAME:b("SET_STORY_NAME","story",g({name:f(h(),w(1))})),SET_STORY_DESCRIPTION:b("SET_STORY_DESCRIPTION","story",g({description:h()})),SET_STORY_MILESTONE:b("SET_STORY_MILESTONE","story",g({milestoneId:G(h())})),MOVE_STORY:b("MOVE_STORY","story",g({activityId:f(h(),w(1)),stepId:f(h(),w(1)),milestoneId:G(h()),after:G(h())}),{mode:"sequence"}),REORDER_STORY:b("REORDER_STORY","story",g({after:G(h())}),{mode:"sequence"}),ADD_STORY:b("ADD_STORY","step",g({id:R,name:f(h(),w(1)),activityId:f(h(),w(1)),milestoneId:_(h()),number:_(qt)}),{dedupeKey:ee}),DELETE_STORY:b("DELETE_STORY","story",g({})),ADD_STORY_LINK:b("ADD_STORY_LINK","story",g({url:rt,label:_(f(h(),w(1)))})),REMOVE_STORY_LINK:b("REMOVE_STORY_LINK","story",g({url:h()})),ADD_STORY_COMMENT:b("ADD_STORY_COMMENT","story",g({id:R,body:Kt,createdAt:_(Ce)}),{dedupeKey:ee}),DELETE_STORY_COMMENT:b("DELETE_STORY_COMMENT","story",g({commentId:f(h(),w(1))})),SET_STORY_STATUS:b("SET_STORY_STATUS","story",g({statusId:f(h(),w(1))})),SET_MILESTONE_NAME:b("SET_MILESTONE_NAME","milestone",g({name:f(h(),w(1))})),ADD_MILESTONE:b("ADD_MILESTONE","page",g({id:R,name:f(h(),w(1))}),{dedupeKey:ee}),DELETE_MILESTONE:b("DELETE_MILESTONE","milestone",g({})),REORDER_MILESTONE:b("REORDER_MILESTONE","milestone",g({after:G(h())}),{mode:"sequence"}),SET_MILESTONE_DUE_DATE:b("SET_MILESTONE_DUE_DATE","milestone",g({dueDate:G(Vt)})),ADD_STATUS:b("ADD_STATUS","page",g({id:R,name:f(h(),w(1)),tone:ae,icon:_(ot)}),{dedupeKey:ee}),SET_STATUS_NAME:b("SET_STATUS_NAME","status",g({name:f(h(),w(1))})),SET_STATUS_TONE:b("SET_STATUS_TONE","status",g({tone:ae})),SET_STATUS_ICON:b("SET_STATUS_ICON","status",g({icon:ot})),SET_STATUS_WEIGHT:b("SET_STATUS_WEIGHT","status",g({weight:Gt})),SET_MEASURE:b("SET_MEASURE","page",g({measure:jt})),SET_DONE_STATUS:b("SET_DONE_STATUS","status",g({})),DELETE_STATUS:b("DELETE_STATUS","status",g({})),REORDER_STATUS:b("REORDER_STATUS","status",g({after:G(h())}),{mode:"sequence"}),ADD_LABEL:b("ADD_LABEL","page",g({id:R,name:f(h(),w(1)),tone:ae}),{dedupeKey:ee}),SET_LABEL_NAME:b("SET_LABEL_NAME","label",g({name:f(h(),w(1))})),SET_LABEL_TONE:b("SET_LABEL_TONE","label",g({tone:ae})),DELETE_LABEL:b("DELETE_LABEL","label",g({})),REORDER_LABEL:b("REORDER_LABEL","label",g({after:G(h())}),{mode:"sequence"}),ADD_STORY_LABEL:b("ADD_STORY_LABEL","story",g({labelId:f(h(),w(1))})),REMOVE_STORY_LABEL:b("REMOVE_STORY_LABEL","story",g({labelId:f(h(),w(1))})),ADD_STORY_BLOCKER:b("ADD_STORY_BLOCKER","story",g({blockerId:f(h(),w(1))})),REMOVE_STORY_BLOCKER:b("REMOVE_STORY_BLOCKER","story",g({blockerId:f(h(),w(1))})),ADD_MEMBER:b("ADD_MEMBER","page",g({id:R,name:f(h(),w(1)),tone:ae}),{dedupeKey:ee}),SET_MEMBER_NAME:b("SET_MEMBER_NAME","member",g({name:f(h(),w(1))})),SET_MEMBER_TONE:b("SET_MEMBER_TONE","member",g({tone:ae})),DELETE_MEMBER:b("DELETE_MEMBER","member",g({})),REORDER_MEMBER:b("REORDER_MEMBER","member",g({after:G(h())}),{mode:"sequence"}),SET_STORY_ASSIGNEE:b("SET_STORY_ASSIGNEE","story",g({memberId:G(f(h(),w(1)))})),ADD_ESTIMATE:b("ADD_ESTIMATE","page",g({id:R,name:f(h(),w(1)),points:it}),{dedupeKey:ee}),SET_ESTIMATE_NAME:b("SET_ESTIMATE_NAME","estimate",g({name:f(h(),w(1))})),SET_ESTIMATE_POINTS:b("SET_ESTIMATE_POINTS","estimate",g({points:it})),DELETE_ESTIMATE:b("DELETE_ESTIMATE","estimate",g({})),REORDER_ESTIMATE:b("REORDER_ESTIMATE","estimate",g({after:G(h())}),{mode:"sequence"}),SET_STORY_ESTIMATE:b("SET_STORY_ESTIMATE","story",g({estimateId:G(f(h(),w(1)))})),RECORD_SNAPSHOT:b("RECORD_SNAPSHOT","page",g({id:R,at:Ce,tally:Y(Ht)}),{dedupeKey:ee}),DELETE_SNAPSHOT:b("DELETE_SNAPSHOT","snapshot",g({})),SET_FEATURE:b("SET_FEATURE","page",es,{dedupeKey:e=>{const t=Tt(es,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},Ln={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}})},be=e=>{const t=e.statuses.findIndex(s=>s.id===e.doneStatusId);return t>=0?t:e.statuses.length-1},ts=e=>e.statuses[be(e)],ss=(e,t)=>{if(t===void 0)return!1;const s=e.statuses.findIndex(a=>a.id===t);return s>=0&&s>=be(e)},as=e=>e.statuses.slice(0,be(e)+1),Dn=(e,t)=>e.milestones.find(s=>s.id===t.milestone)??e.milestones.find(s=>s.dueDate!==void 0)??e.milestones[0],ge=e=>z(e,"estimates")?e.measure??(e.estimates.length>0?"points":"stories"):"stories",ns=e=>e.weight??1,se=10,is=e=>{const{statuses:t}=e,s=be(e);if(ge(e)!=="weighted")return t.map((o,r)=>r<s?1:0);const a=t.slice(0,s).map(ns),n=ze(a),i=a.map(o=>n>0?o/n:1/a.length);return t.map((o,r)=>ze(i.slice(r)))},Rn=1,os=(e,t)=>F(e,t.estimateId)?.points??Rn,rs=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}},o=Ue(i),r=t.get(o)??{...i,stories:0,points:0};t.set(o,{...r,stories:r.stories+1,points:r.points+os(e,n)})}const s=[...e.milestones.map(n=>n.id),void 0],a=e.statuses.length===0?[void 0]:e.statuses.map(n=>n.id);return s.flatMap(n=>a.flatMap(i=>{const o=t.get(Ue({milestoneId:n,statusId:i}));return o?[o]:[]}))},On=(e,t,s)=>{const a=ge(e),i=[...xt(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:s,tally:rs(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:Nn(e.statuses,d.tally,t,a)})),o=is(e),r=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:Cn(e.milestones.find(d=>d.id===t)?.dueDate),combined:i.map(d=>r(d,d.values.reduce((p,m,y)=>p+m*(o[y]??0),0))),byStatus:e.statuses.slice(1).map((d,p)=>({status:d,points:i.map(m=>r(m,ze(m.values.slice(0,p+1))))}))}},Nn=(e,t,s,a)=>e.map(n=>ze(t.filter(i=>i.milestoneId===s&&i.statusId===n.id).map(i=>a==="stories"?i.stories:i.points))),Cn=e=>{if(e===void 0)return null;const[t=0,s=1,a=1]=e.split("-").map(Number);return new Date(t,s-1,a,23,59,59).getTime()},ue=e=>{const t=new Date(e),s=a=>String(a).padStart(2,"0");return`${t.getFullYear()}-${s(t.getMonth()+1)}-${s(t.getDate())} ${s(t.getHours())}:${s(t.getMinutes())}`},ze=e=>e.reduce((t,s)=>t+s,0),ds="STORY-",de=e=>`${ds}${e.number}`,ls=(...e)=>Math.max(0,...e.flatMap(t=>t.stories.map(s=>s.number)))+1,Bn=(e,t)=>{if(t===void 0)return;const s=x(e,t);if(s)return s;const a=new RegExp(`^${ds}([1-9]\\d*)$`,"i").exec(t.trim());if(!a)return;const n=Number(a[1]);return e.stories.find(i=>i.number===n)},ps=(e,t)=>{const s=Na(v,t);if(s===null)return null;const a=s.target.id;switch(s.type){case"SET_ACTIVITY_NAME":{const{name:n}=s.payload;return e.activities.some(i=>i.id===a)?{...e,activities:e.activities.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_ACTIVITY_ACTOR":{const n=s.payload.actor.trim();return e.activities.some(i=>i.id===a)?{...e,activities:e.activities.map(i=>{if(i.id!==a)return i;const{actor:o,...r}=i;return n===""?r:{...r,actor:n}})}:null}case"SET_STEP_NAME":{const{name:n}=s.payload,i=N(e,a);return i?{...e,activities:e.activities.map(o=>o.id===i.activity.id?{...o,steps:o.steps.map(r=>r.id===i.step.id?{...r,name:n}:r)}:o)}:null}case"REORDER_STEP":{const{after:n}=s.payload,i=N(e,a);if(!i)return null;const o=n===null?null:N(e,n);if(n!==null&&(!o||o.activity.id!==i.activity.id))return null;const r=me(i.activity.steps,i.step.id,o?.step.id??null);return r===null?null:{...e,activities:e.activities.map(d=>d.id===i.activity.id?{...d,steps:r}:d)}}case"REORDER_ACTIVITY":{const{after:n}=s.payload,i=me(e.activities,a,n);return i===null?null:{...e,activities:i}}case"ADD_ACTIVITY":{const n=s.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=s.payload,i=e.activities.find(o=>o.id===a);return i?i.steps.some(o=>o.id===n.id)?e:{...e,activities:e.activities.map(o=>o.id===a?{...o,steps:[...o.steps,{id:n.id,name:n.name}]}:o)}:null}case"DELETE_ACTIVITY":{const n=e.activities.find(o=>o.id===a);if(!n)return null;const i=new Set(n.steps.map(o=>o.id));return mt({...e,activities:e.activities.filter(o=>o.id!==a)},o=>o.activityId===a||i.has(o.stepId))}case"DELETE_STEP":{const n=N(e,a);return n?mt({...e,activities:e.activities.map(i=>i.id===n.activity.id?{...i,steps:i.steps.filter(o=>o.id!==n.step.id)}:i)},i=>i.activityId===n.activity.id&&i.stepId===n.step.id):null}case"SET_STORY_NAME":{const{name:n}=s.payload;return q(e,a,i=>({...i,name:n}))}case"SET_STORY_DESCRIPTION":{const{description:n}=s.payload;return q(e,a,i=>({...i,description:n}))}case"SET_STORY_MILESTONE":{const{milestoneId:n}=s.payload;return n!==null&&!P(e,n)?null:q(e,a,i=>n===null?ut(i):{...i,milestoneId:n})}case"MOVE_STORY":{const n=s.payload,i=x(e,a);if(!i)return null;const o=N(e,n.stepId);if(!o||o.activity.id!==n.activityId||n.milestoneId!==null&&!P(e,n.milestoneId))return null;const r=n.milestoneId??void 0,d=r===void 0?{...ut(i),activityId:o.activity.id,stepId:o.step.id}:{...i,activityId:o.activity.id,stepId:o.step.id,milestoneId:r};return ms(e,d,n.after)}case"REORDER_STORY":{const{after:n}=s.payload,i=x(e,a);return i?ms(e,i,n,!0):null}case"ADD_STORY":{const n=s.payload,i=N(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(d=>d.id===n.id))return e;const o=n.number!==void 0&&e.stories.some(d=>d.number===n.number),r={id:n.id,number:n.number===void 0||o?ls(e):n.number,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===a)?mt(e,n=>n.id===a):null;case"ADD_STORY_LINK":{const{url:n,label:i}=s.payload,o=x(e,a);if(!o)return null;if(o.links?.some(d=>d.url===n))return e;const r=i===void 0?{url:n}:{url:n,label:i};return q(e,a,d=>({...d,links:[...d.links??[],r]}))}case"REMOVE_STORY_LINK":{const{url:n}=s.payload;return x(e,a)?.links?.some(o=>o.url===n)?q(e,a,o=>{const r=(o.links??[]).filter(m=>m.url!==n),{links:d,...p}=o;return r.length===0?p:{...p,links:r}}):null}case"ADD_STORY_COMMENT":{const{id:n,body:i,createdAt:o}=s.payload,r=x(e,a);if(!r)return null;if(r.comments?.some(p=>p.id===n))return e;if(j(e).includes(n))return null;const d=o===void 0?{id:n,body:i}:{id:n,body:i,createdAt:o};return q(e,a,p=>({...p,comments:[...p.comments??[],d]}))}case"DELETE_STORY_COMMENT":{const{commentId:n}=s.payload;return x(e,a)?.comments?.some(o=>o.id===n)?q(e,a,o=>{const r=(o.comments??[]).filter(m=>m.id!==n),{comments:d,...p}=o;return r.length===0?p:{...p,comments:r}}):null}case"SET_STORY_STATUS":{const{statusId:n}=s.payload;return D(e,n)?q(e,a,i=>({...i,statusId:n})):null}case"SET_MILESTONE_NAME":{const{name:n}=s.payload;return e.milestones.some(i=>i.id===a)?{...e,milestones:e.milestones.map(i=>i.id===a?{...i,name:n}:i)}:null}case"ADD_MILESTONE":{const n=s.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===a)?{...e,milestones:e.milestones.filter(n=>n.id!==a),stories:e.stories.map(n=>n.milestoneId===a?ut(n):n),snapshots:ht(e,n=>n.milestoneId===a?le(n,"milestoneId"):n)}:null;case"REORDER_MILESTONE":{const{after:n}=s.payload,i=me(e.milestones,a,n);return i===null?null:{...e,milestones:i}}case"SET_MILESTONE_DUE_DATE":{const{dueDate:n}=s.payload;return P(e,a)?{...e,milestones:e.milestones.map(i=>i.id!==a?i:n===null?le(i,"dueDate"):{...i,dueDate:n})}:null}case"ADD_STATUS":{const{id:n,name:i,tone:o,icon:r}=s.payload;if(e.statuses.some(p=>p.id===n))return e;const d=[...e.statuses,{id:n,name:i,tone:o,icon:r??"progress"}];return e.statuses.length===0?{...e,statuses:d,stories:e.stories.map(p=>({...p,statusId:n})),snapshots:ht(e,p=>({...p,statusId:n}))}:{...e,statuses:d}}case"SET_STATUS_NAME":{const{name:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_STATUS_TONE":{const{tone:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,tone:n}:i)}:null}case"SET_STATUS_ICON":{const{icon:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,icon:n}:i)}:null}case"SET_STATUS_WEIGHT":{const{weight:n}=s.payload;return D(e,a)?{...e,statuses:e.statuses.map(i=>i.id===a?{...i,weight:n}:i)}:null}case"SET_MEASURE":{const{measure:n}=s.payload;return ge(e)===n?e:{...e,measure:n}}case"SET_DONE_STATUS":return D(e,a)?e.doneStatusId===a?e:{...e,doneStatusId:a}:null;case"DELETE_STATUS":{if(!D(e,a))return null;const n=e.statuses.filter(o=>o.id!==a),i=n[0]?.id;return{...e.doneStatusId===a?le(e,"doneStatusId"):e,statuses:n,stories:e.stories.map(o=>o.statusId!==a?o:i===void 0?Un(o):{...o,statusId:i}),snapshots:ht(e,o=>o.statusId!==a?o:i===void 0?le(o,"statusId"):{...o,statusId:i})}}case"REORDER_STATUS":{const{after:n}=s.payload,i=me(e.statuses,a,n);return i===null?null:{...e,statuses:i}}case"ADD_LABEL":{const{id:n,name:i,tone:o}=s.payload;return Z(e,n)?e:{...e,labels:[...e.labels,{id:n,name:i,tone:o}]}}case"SET_LABEL_NAME":{const{name:n}=s.payload;return Z(e,a)?{...e,labels:e.labels.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_LABEL_TONE":{const{tone:n}=s.payload;return Z(e,a)?{...e,labels:e.labels.map(i=>i.id===a?{...i,tone:n}:i)}:null}case"DELETE_LABEL":return Z(e,a)?{...e,labels:e.labels.filter(n=>n.id!==a),stories:e.stories.map(n=>n.labelIds?.includes(a)?cs(n,a):n)}:null;case"REORDER_LABEL":{const{after:n}=s.payload,i=me(e.labels,a,n);return i===null?null:{...e,labels:i}}case"ADD_STORY_LABEL":{const{labelId:n}=s.payload,i=x(e,a);return!i||!Z(e,n)?null:i.labelIds?.includes(n)?e:q(e,a,o=>({...o,labelIds:[...o.labelIds??[],n]}))}case"REMOVE_STORY_LABEL":{const{labelId:n}=s.payload;return x(e,a)?.labelIds?.includes(n)?q(e,a,i=>cs(i,n)):null}case"ADD_STORY_BLOCKER":{const{blockerId:n}=s.payload,i=x(e,a);return!i||!x(e,n)?null:i.blockedBy?.includes(n)?e:n===a||nt(e.stories,n,a)?null:q(e,a,o=>({...o,blockedBy:[...o.blockedBy??[],n]}))}case"REMOVE_STORY_BLOCKER":{const{blockerId:n}=s.payload;return x(e,a)?.blockedBy?.includes(n)?q(e,a,i=>us(i,new Set([n]))):null}case"ADD_MEMBER":{const{id:n,name:i,tone:o}=s.payload;return K(e,n)?e:{...e,members:[...e.members,{id:n,name:i,tone:o}]}}case"SET_MEMBER_NAME":{const{name:n}=s.payload;return K(e,a)?{...e,members:e.members.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_MEMBER_TONE":{const{tone:n}=s.payload;return K(e,a)?{...e,members:e.members.map(i=>i.id===a?{...i,tone:n}:i)}:null}case"DELETE_MEMBER":return K(e,a)?{...e,members:e.members.filter(n=>n.id!==a),stories:e.stories.map(n=>n.assigneeId===a?le(n,"assigneeId"):n)}:null;case"REORDER_MEMBER":{const{after:n}=s.payload,i=me(e.members,a,n);return i===null?null:{...e,members:i}}case"SET_STORY_ASSIGNEE":{const{memberId:n}=s.payload;return n!==null&&!K(e,n)?null:q(e,a,i=>n===null?le(i,"assigneeId"):{...i,assigneeId:n})}case"ADD_ESTIMATE":{const{id:n,name:i,points:o}=s.payload;return F(e,n)?e:{...e,estimates:[...e.estimates,{id:n,name:i,points:o}]}}case"SET_ESTIMATE_NAME":{const{name:n}=s.payload;return F(e,a)?{...e,estimates:e.estimates.map(i=>i.id===a?{...i,name:n}:i)}:null}case"SET_ESTIMATE_POINTS":{const{points:n}=s.payload;return F(e,a)?{...e,estimates:e.estimates.map(i=>i.id===a?{...i,points:n}:i)}:null}case"DELETE_ESTIMATE":return F(e,a)?{...e,estimates:e.estimates.filter(n=>n.id!==a),stories:e.stories.map(n=>n.estimateId===a?le(n,"estimateId"):n)}:null;case"REORDER_ESTIMATE":{const{after:n}=s.payload,i=me(e.estimates,a,n);return i===null?null:{...e,estimates:i}}case"SET_STORY_ESTIMATE":{const{estimateId:n}=s.payload;return n!==null&&!F(e,n)?null:q(e,a,i=>n===null?le(i,"estimateId"):{...i,estimateId:n})}case"RECORD_SNAPSHOT":{const{id:n,at:i,tally:o}=s.payload;return Ee(e,n)?e:Zt(e,o)!==null?null:{...e,snapshots:[...e.snapshots,{id:n,at:i,tally:o}]}}case"DELETE_SNAPSHOT":return Ee(e,a)?{...e,snapshots:e.snapshots.filter(n=>n.id!==a)}:null;case"SET_FEATURE":{const{feature:n,enabled:i}=s.payload;if(e.features.includes(n)===i)return e;const o=Ne.filter(r=>r===n?i:e.features.includes(r));return{...e,features:o}}default:return Ca(s)}},q=(e,t,s)=>e.stories.some(a=>a.id===t)?{...e,stories:e.stories.map(a=>a.id===t?s(a):a)}:null,ut=e=>{const{milestoneId:t,...s}=e;return s},cs=(e,t)=>{const{labelIds:s=[],...a}=e,n=s.filter(i=>i!==t);return n.length===0?a:{...a,labelIds:n}},us=(e,t)=>{const{blockedBy:s=[],...a}=e,n=s.filter(i=>!t.has(i));return n.length===0?a:{...a,blockedBy:n}},mt=(e,t)=>{const s=new Set(e.stories.filter(t).map(a=>a.id));return{...e,stories:e.stories.filter(a=>!s.has(a.id)).map(a=>a.blockedBy?.some(n=>s.has(n))?us(a,s):a)}},le=(e,t)=>{const{[t]:s,...a}=e;return a},ht=(e,t)=>e.snapshots.map(s=>{const a=new Map;for(const n of s.tally.map(t)){const i=Ue(n),o=a.get(i);a.set(i,o?{...o,stories:o.stories+n.stories,points:o.points+n.points}:n)}return{...s,tally:[...a.values()]}}),Un=e=>{const{statusId:t,...s}=e;return s},ms=(e,t,s,a=!1)=>{const n=t.milestoneId??void 0,i=e.stories.filter(S=>S.id!==t.id),o=i.filter(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n);if(s!==null){const S=i.find(A=>A.id===s);if(!S||S.stepId!==t.stepId||(S.milestoneId??void 0)!==n)return null;if(a){const A=x(e,t.id);if(!A||S.stepId!==A.stepId||(S.milestoneId??void 0)!==(A.milestoneId??void 0))return null}}const r=s===null?[t,...o]:hs(o,t,s),d=i.findIndex(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n),p=new Set(o.map(S=>S.id)),m=i.filter(S=>!p.has(S.id)),y=d<0?m.length:Math.min(d,m.length),E=[...m.slice(0,y),...r,...m.slice(y)];return{...e,stories:E}},me=(e,t,s)=>{if(!e.some(i=>i.id===t)||s!==null&&!e.some(i=>i.id===s))return null;if(s===t)return[...e];const a=e.find(i=>i.id===t);if(a===void 0)return null;const n=e.filter(i=>i.id!==t);return hs(n,a,s)},hs=(e,t,s)=>{const a=[...e],n=s===null?-1:a.findIndex(i=>i.id===s);return a.splice(n+1,0,t),a},ne=Ba({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",tableTab:"Table",milestonesTab:"Milestones",burndownTab:"Burndown",statusesSection:"Statuses",labelsSection:"Labels",membersSection:"Members",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:"Indigo"})[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,s,a)=>`${e} ${t}, ${s} ${a}`,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)=>bs("en-US",e,t),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",copyStoryKey:e=>`Copy ${e}`,storyKeyCopied:"Copied",storyKeyColumn:"Key",copyId:"Copy ID",copyIdTitle:"Copy ID + title",copyStoryInfo:"Copy card as Markdown",copyInfoStep:"Step",copyInfoBlocks:"Blocks",copyInfoWaitsOn:"Waits on",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",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",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",tableTab:"\u30C6\u30FC\u30D6\u30EB",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",burndownTab:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",statusesSection:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelsSection:"\u30E9\u30D9\u30EB",membersSection:"\u30E1\u30F3\u30D0\u30FC",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:"\u30A4\u30F3\u30C7\u30A3\u30B4"})[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,s,a)=>`${e} ${t}\u3001${s} ${a}`,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)=>bs("ja-JP",e,t),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",copyStoryKey:e=>`${e} \u3092\u30B3\u30D4\u30FC`,storyKeyCopied:"\u30B3\u30D4\u30FC\u3057\u307E\u3057\u305F",storyKeyColumn:"\u30AD\u30FC",copyId:"ID\u3092\u30B3\u30D4\u30FC",copyIdTitle:"ID + Title \u3092\u30B3\u30D4\u30FC",copyStoryInfo:"\u30AB\u30FC\u30C9\u60C5\u5831\u3092\u30B3\u30D4\u30FC",copyInfoStep:"\u30B9\u30C6\u30C3\u30D7",copyInfoBlocks:"\u30D6\u30ED\u30C3\u30AF",copyInfoWaitsOn:"\u4F9D\u5B58\u5148",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",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",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"}}),bs=(e,t,s)=>{const a=new Date(t);switch(s){case"day":case"week":case"biweek":return`${a.getMonth()+1}/${a.getDate()}`;case"month":case"quarter":return new Intl.DateTimeFormat(e,{month:"short",...a.getMonth()===0?{year:"numeric"}:{}}).format(a);case"year":return new Intl.DateTimeFormat(e,{year:"numeric"}).format(a)}},bt=/^[A-Z][A-Z0-9]+-\d+$/,gs=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},Yn=(e,t)=>{if(e!=="github.com")return null;const[s,a,n,i]=t;if(s===void 0)return{kind:"github",text:"GitHub",title:"github.com"};if(a===void 0)return{kind:"github",text:s,title:s};const o=`${s}/${a}`;return(n==="issues"||n==="pull"||n==="discussions")&&i&&/^\d+$/.test(i)?{kind:"github",text:`#${i}`,title:`${o}#${i}`}:n==="commit"&&i?{kind:"github",text:i.slice(0,7),title:`${o}@${i}`}:{kind:"github",text:o,title:o}},Pn=(e,t)=>{if(e!=="gitlab.com")return null;const s=t.indexOf("-"),a=(s<0?t:t.slice(0,s)).join("/"),n=s<0?void 0:t[s+1],i=s<0?void 0:t[s+2];if(i&&/^\d+$/.test(i)){if(n==="issues")return{kind:"gitlab",text:`#${i}`,title:`${a}#${i}`};if(n==="merge_requests")return{kind:"gitlab",text:`!${i}`,title:`${a}!${i}`}}return{kind:"gitlab",text:a||"GitLab",title:a||e}},zn=(e,t,s)=>{if(!t.endsWith(".atlassian.net")&&!t.startsWith("jira."))return null;const a=(s[0]==="browse"?s[1]:void 0)??e.searchParams.get("selectedIssue")??s.find(n=>bt.test(n));return a&&bt.test(a)?{kind:"jira",text:a,title:`${t} ${a}`}:{kind:"jira",text:"Jira",title:t}},Fn=(e,t)=>{if(e!=="linear.app")return null;const s=t[1]==="issue"?t[2]?.toUpperCase():void 0;return s&&bt.test(s)?{kind:"linear",text:s,title:s}:{kind:"linear",text:"Linear",title:e}},Vn=(e,t)=>{if(e!=="figma.com")return null;const[s,,a]=t;if((s==="file"||s==="design"||s==="proto"||s==="board")&&a){const n=gs(a);return{kind:"figma",text:n,title:n}}return{kind:"figma",text:"Figma",title:e}},Gn=(e,t)=>{if(e!=="notion.so"&&!e.endsWith(".notion.site"))return null;const a=(t.at(-1)??"").replace(/-?[0-9a-f]{32}$/i,""),n=a===""?"Notion":gs(a);return{kind:"notion",text:n,title:n}},Fe=e=>{let t;try{t=new URL(e)}catch{return{kind:"web",text:e,title:e}}const s=t.hostname.replace(/^www\./,""),a=t.pathname.split("/").filter(n=>n!=="");return Yn(s,a)??Pn(s,a)??zn(t,s,a)??Fn(s,a)??Vn(s,a)??Gn(s,a)??{kind:"web",text:s,title:e}},Hn=["map","table","milestones","burndown"],Kn={burndown:"estimates"},fs=e=>Hn.filter(t=>{const s=Kn[t];return s===void 0||z(e,s)}),ys=(e,t)=>fs(e).find(s=>s===t.tab)??"map",$e=(e,t)=>ss(e,t.statusId),vs=(e,t)=>{const s=x(e,t)?.blockedBy??[];return{blockers:s,openBlockers:s.filter(a=>{const n=x(e,a);return n!==void 0&&!$e(e,n)}).length,dependents:e.stories.filter(a=>a.blockedBy?.includes(t)).map(a=>a.id)}},qn=(e,t)=>{const s=new Set(x(e,t)?.blockedBy??[]);return e.stories.filter(a=>a.id!==t&&!s.has(a.id)&&!nt(e.stories,a.id,t))},Wn=(e,t)=>e.stories.filter(s=>s.id!==t&&!s.blockedBy?.includes(t)&&!nt(e.stories,t,s.id)),jn=["critical-path"],Ve=e=>jn.find(t=>t===e.highlight)??null,Xn=(e,t)=>{if($e(e,t))return 0;const s=ge(e)==="stories"?1:os(e,t),a=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return s*(is(e)[a]??1)},Zn=(e,t)=>Ve(t)==="critical-path"?ks(e).ids:null,Jn=1e-9,ks=e=>{const t=new Map(e.stories.map(d=>[d.id,Xn(e,d)]).filter(([,d])=>d>0)),s=new Map,a=new Map;for(const d of e.stories)if(t.has(d.id))for(const p of d.blockedBy??[])t.has(p)&&(s.set(d.id,[...s.get(d.id)??[],p]),a.set(p,[...a.get(p)??[],d.id]));const n=ws(t,s),i=ws(t,a),o=[...t].map(([d,p])=>[d,n(d)+i(d)-p]),r=Math.max(0,...o.map(([,d])=>d));return{ids:new Set(o.filter(([,d])=>r-d<Jn).map(([d])=>d)),work:r}},ws=(e,t)=>{const s=new Map,a=n=>{const i=s.get(n);if(i!==void 0)return i;const o=(e.get(n)??0)+Math.max(0,...(t.get(n)??[]).map(a));return s.set(n,o),o};return a},xe=["status","label","estimate","assignee"],ie="~none",oe={key:"done",value:"show"},Ss=(e,t)=>t[oe.key]===oe.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(s=>ss(e,s.id)).map(s=>s.id)),fe=(e,t)=>{switch(t){case"status":return e.statuses.map(s=>s.id);case"label":return e.labels.length===0?[]:[...e.labels.map(s=>s.id),ie];case"estimate":return!z(e,"estimates")||e.estimates.length===0?[]:[...e.estimates.map(s=>s.id),ie];case"assignee":return!z(e,"assignees")||e.members.length===0?[]:[...e.members.map(s=>s.id),ie]}},Ge=(e,t)=>{const s=Ss(e,t),a=n=>{const i=t[n];if(i===void 0||i==="")return new Set;const o=new Set(i.split(","));return new Set(fe(e,n).filter(r=>o.has(r)&&!s.has(r)))};return{status:a("status"),label:a("label"),estimate:a("estimate"),assignee:a("assignee"),hiddenStatusIds:s}},Es=(e,t,s)=>{const a=fe(e,t).filter(n=>s.has(n));return a.length===0?null:a.join(",")},Qn=(e,t)=>{const s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s},ei=e=>xe.some(t=>e[t].size>0),$s=(e,t)=>{const s=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&He(e.status,t.statusId===void 0?[]:[t.statusId])&&He(e.label,s.length===0?[ie]:s)&&He(e.estimate,[t.estimateId??ie])&&He(e.assignee,[t.assigneeId??ie])},He=(e,t)=>e.size===0||t.some(s=>e.has(s)),C=(e,t,s)=>{const a=typeof s=="string"?s:"",n=typeof t=="string"?t:void 0;return n===void 0?e.toValue(a):e.fromTo(n,a)},pe=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,ti={SET_ACTIVITY_NAME:(e,t,s)=>({title:e.renameActivity,tone:"update",body:C(e,te(s,t.target.id)?.name,k(v.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,s)=>{const a=k(v.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:a===""?e.removed(te(s,t.target.id)?.actor??""):C(e,te(s,t.target.id)?.actor,a)}},SET_STEP_NAME:(e,t,s)=>({title:e.renameStep,tone:"update",body:C(e,N(s,t.target.id)?.step.name,k(v.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:pe(e,k(v.REORDER_STEP,t).after)}),REORDER_ACTIVITY:(e,t,s)=>{const a=k(v.REORDER_ACTIVITY,t).after;return{title:e.reorderActivity,tone:"move",body:pe(e,a===null?null:te(s,a)?.name??a)}},ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(k(v.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(k(v.ADD_STEP,t).name??""))}),DELETE_ACTIVITY:(e,t,s)=>({title:e.deleteActivity,tone:"delete",body:e.removed(te(s,t.target.id)?.name??t.target.id)}),DELETE_STEP:(e,t,s)=>({title:e.deleteStep,tone:"delete",body:e.removed(N(s,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,s)=>({title:e.renameStory,tone:"update",body:C(e,x(s,t.target.id)?.name,k(v.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(k(v.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,s)=>{const a=k(v.SET_STORY_MILESTONE,t).milestoneId;return{title:e.changeMilestone,tone:"move",body:a==null?e.toUnassigned:e.toName(P(s,String(a))?.name??String(a))}},MOVE_STORY:(e,t,s)=>({title:e.moveStory,tone:"move",body:e.toName(N(s,String(k(v.MOVE_STORY,t).stepId))?.step.name??String(k(v.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:pe(e,k(v.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(k(v.ADD_STORY,t).name??""))}),DELETE_STORY:(e,t,s)=>({title:e.deleteStory,tone:"delete",body:e.removed(x(s,t.target.id)?.name??t.target.id)}),SET_MILESTONE_NAME:(e,t,s)=>({title:e.renameMilestone,tone:"update",body:C(e,P(s,t.target.id)?.name,k(v.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(k(v.ADD_MILESTONE,t).name??""))}),DELETE_MILESTONE:(e,t,s)=>({title:e.deleteMilestone,tone:"delete",body:e.removed(P(s,t.target.id)?.name??t.target.id)}),REORDER_MILESTONE:(e,t)=>({title:e.reorderMilestone,tone:"move",body:pe(e,k(v.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:s,label:a}=k(v.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(a??Fe(s).title)}},REMOVE_STORY_LINK:(e,t,s)=>{const{url:a}=k(v.REMOVE_STORY_LINK,t),n=x(s,t.target.id)?.links?.find(i=>i.url===a);return{title:e.removeStoryLink,tone:"delete",body:e.removed(n?.label??Fe(a).title)}},ADD_STORY_COMMENT:(e,t)=>({title:e.addStoryComment,tone:"create",body:e.added(k(v.ADD_STORY_COMMENT,t).body)}),DELETE_STORY_COMMENT:(e,t,s)=>{const{commentId:a}=k(v.DELETE_STORY_COMMENT,t),n=x(s,t.target.id)?.comments?.find(i=>i.id===a);return{title:e.deleteStoryComment,tone:"delete",body:e.removed(n?.body??a)}},SET_STORY_STATUS:(e,t,s)=>{const a=k(v.SET_STORY_STATUS,t).statusId;return{title:e.changeStoryStatus,tone:"update",body:e.toName(D(s,a)?.name??a)}},ADD_STATUS:(e,t)=>({title:e.addStatus,tone:"create",body:e.added(k(v.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,s)=>({title:e.renameStatus,tone:"update",body:C(e,D(s,t.target.id)?.name,k(v.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,s)=>{const a=D(s,t.target.id)?.tone,n=k(v.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:C(e,a===void 0?void 0:e.toneName(a),e.toneName(n))}},SET_STATUS_ICON:(e,t,s)=>{const a=D(s,t.target.id)?.icon,n=k(v.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:C(e,a===void 0?void 0:e.iconName(a),e.iconName(n))}},DELETE_STATUS:(e,t,s)=>({title:e.deleteStatus,tone:"delete",body:e.removed(D(s,t.target.id)?.name??t.target.id)}),REORDER_STATUS:(e,t)=>({title:e.reorderStatus,tone:"move",body:pe(e,k(v.REORDER_STATUS,t).after)}),ADD_LABEL:(e,t)=>({title:e.addLabel,tone:"create",body:e.added(k(v.ADD_LABEL,t).name)}),SET_LABEL_NAME:(e,t,s)=>({title:e.renameLabel,tone:"update",body:C(e,Z(s,t.target.id)?.name,k(v.SET_LABEL_NAME,t).name)}),SET_LABEL_TONE:(e,t,s)=>{const a=Z(s,t.target.id)?.tone,n=k(v.SET_LABEL_TONE,t).tone;return{title:e.changeLabelTone,tone:"update",body:C(e,a===void 0?void 0:e.toneName(a),e.toneName(n))}},DELETE_LABEL:(e,t,s)=>({title:e.deleteLabel,tone:"delete",body:e.removed(Z(s,t.target.id)?.name??t.target.id)}),REORDER_LABEL:(e,t)=>({title:e.reorderLabel,tone:"move",body:pe(e,k(v.REORDER_LABEL,t).after)}),ADD_STORY_LABEL:(e,t,s)=>{const a=k(v.ADD_STORY_LABEL,t).labelId;return{title:e.addStoryLabel,tone:"create",body:e.added(Z(s,a)?.name??a)}},REMOVE_STORY_LABEL:(e,t,s)=>{const a=k(v.REMOVE_STORY_LABEL,t).labelId;return{title:e.removeStoryLabel,tone:"delete",body:e.removed(Z(s,a)?.name??a)}},ADD_STORY_BLOCKER:(e,t,s)=>{const a=k(v.ADD_STORY_BLOCKER,t).blockerId;return{title:e.addStoryBlocker,tone:"create",body:e.added(x(s,a)?.name??a)}},REMOVE_STORY_BLOCKER:(e,t,s)=>{const a=k(v.REMOVE_STORY_BLOCKER,t).blockerId;return{title:e.removeStoryBlocker,tone:"delete",body:e.removed(x(s,a)?.name??a)}},SET_MILESTONE_DUE_DATE:(e,t,s)=>{const a=k(v.SET_MILESTONE_DUE_DATE,t).dueDate;return{title:e.changeMilestoneDueDate,tone:a===null?"delete":"update",body:a===null?e.noDueDate:C(e,P(s,t.target.id)?.dueDate,a)}},SET_STATUS_WEIGHT:(e,t,s)=>{const a=D(s,t.target.id)?.weight,n=k(v.SET_STATUS_WEIGHT,t).weight;return{title:e.changeStatusWeight,tone:"update",body:C(e,a===void 0?void 0:String(a),String(n))}},SET_DONE_STATUS:(e,t,s)=>({title:e.setDoneStatus,tone:"update",body:C(e,ts(s)?.name,D(s,t.target.id)?.name??t.target.id)}),SET_MEASURE:(e,t,s)=>({title:e.setMeasure,tone:"update",body:C(e,e.measureName(ge(s)),e.measureName(k(v.SET_MEASURE,t).measure))}),ADD_MEMBER:(e,t)=>({title:e.addMember,tone:"create",body:e.added(k(v.ADD_MEMBER,t).name)}),SET_MEMBER_NAME:(e,t,s)=>({title:e.renameMember,tone:"update",body:C(e,K(s,t.target.id)?.name,k(v.SET_MEMBER_NAME,t).name)}),SET_MEMBER_TONE:(e,t,s)=>{const a=K(s,t.target.id)?.tone,n=k(v.SET_MEMBER_TONE,t).tone;return{title:e.changeMemberTone,tone:"update",body:C(e,a===void 0?void 0:e.toneName(a),e.toneName(n))}},DELETE_MEMBER:(e,t,s)=>({title:e.deleteMember,tone:"delete",body:e.removed(K(s,t.target.id)?.name??t.target.id)}),REORDER_MEMBER:(e,t)=>({title:e.reorderMember,tone:"move",body:pe(e,k(v.REORDER_MEMBER,t).after)}),SET_STORY_ASSIGNEE:(e,t,s)=>{const a=k(v.SET_STORY_ASSIGNEE,t).memberId;if(a===null){const n=K(s,x(s,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(K(s,a)?.name??a)}},ADD_ESTIMATE:(e,t)=>{const{name:s,points:a}=k(v.ADD_ESTIMATE,t);return{title:e.addEstimate,tone:"create",body:e.added(e.estimateText(s,a))}},SET_ESTIMATE_NAME:(e,t,s)=>({title:e.renameEstimate,tone:"update",body:C(e,F(s,t.target.id)?.name,k(v.SET_ESTIMATE_NAME,t).name)}),SET_ESTIMATE_POINTS:(e,t,s)=>{const a=F(s,t.target.id)?.points,n=k(v.SET_ESTIMATE_POINTS,t).points;return{title:e.changeEstimatePoints,tone:"update",body:C(e,a===void 0?void 0:String(a),String(n))}},DELETE_ESTIMATE:(e,t,s)=>({title:e.deleteEstimate,tone:"delete",body:e.removed(F(s,t.target.id)?.name??t.target.id)}),REORDER_ESTIMATE:(e,t)=>({title:e.reorderEstimate,tone:"move",body:pe(e,k(v.REORDER_ESTIMATE,t).after)}),SET_STORY_ESTIMATE:(e,t,s)=>{const a=k(v.SET_STORY_ESTIMATE,t).estimateId;return a===null?{title:e.setStoryEstimate,tone:"delete",body:e.toValue(e.unestimated)}:{title:e.setStoryEstimate,tone:"update",body:e.toValue(F(s,a)?.name??a)}},RECORD_SNAPSHOT:(e,t)=>{const{at:s,tally:a}=k(v.RECORD_SNAPSHOT,t),n=a.reduce((i,o)=>i+o.stories,0);return{title:e.recordSnapshot,tone:"create",body:e.snapshotSummary(ue(s),n)}},DELETE_SNAPSHOT:(e,t,s)=>{const a=Ee(s,t.target.id);return{title:e.deleteSnapshot,tone:"delete",body:e.removed(a?ue(a.at):t.target.id)}},SET_FEATURE:(e,t)=>{const{feature:s,enabled:a}=k(v.SET_FEATURE,t);return{title:a?e.enableFeature:e.disableFeature,tone:a?"create":"delete",body:e.featureName(s)}}},xs=(e,t,s,a)=>{let n;try{const i=ti[t.type];n=i?i(e,t,a??s):{title:t.type,tone:"meta"}}catch{n={title:t.type,tone:"meta"}}return{title:n.title,targetLabel:_s(e,s,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},Ts=e=>`${e.type} ${I(e.target)} ${JSON.stringify(e.payload)}`,_s=(e,t,s)=>{try{switch(s.type){case"activity":{const a=te(t,s.id);return a?e.targetLabel(e.activityGroup,a.name):e.targetMissing(e.activityGroup,s.id)}case"step":{const a=N(t,s.id)?.step;return a?e.targetLabel(e.stepGroup,a.name):e.targetMissing(e.stepGroup,s.id)}case"story":{const a=x(t,s.id);return a?e.targetLabel(e.storyGroup,a.name):e.targetMissing(e.storyGroup,s.id)}case"milestone":{const a=P(t,s.id);return a?e.targetLabel(e.milestoneGroup,a.name):e.targetMissing(e.milestoneGroup,s.id)}case"status":{const a=D(t,s.id);return a?e.targetLabel(e.statusGroup,a.name):e.targetMissing(e.statusGroup,s.id)}case"label":{const a=Z(t,s.id);return a?e.targetLabel(e.labelGroup,a.name):e.targetMissing(e.labelGroup,s.id)}case"member":{const a=K(t,s.id);return a?e.targetLabel(e.memberGroup,a.name):e.targetMissing(e.memberGroup,s.id)}case"estimate":{const a=F(t,s.id);return a?e.targetLabel(e.estimateGroup,a.name):e.targetMissing(e.estimateGroup,s.id)}case"snapshot":{const a=Ee(t,s.id);return a?e.targetLabel(e.snapshotGroup,ue(a.at)):e.targetMissing(e.snapshotGroup,s.id)}case"page":return e.targetLabel(e.mapGroup,gt(t));default:return`${s.type} \xB7 ${s.id}`}}catch{return`${s.type} \xB7 ${s.id}`}},Is=(e,t,s)=>{const a=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const n of t.activities){a.push({value:I({type:"activity",id:n.id}),label:n.name,group:e.activityGroup});for(const i of n.steps)a.push({value:I({type:"step",id:ce(n.id,i.id)}),label:`${n.name} \u203A ${i.name}`,group:e.stepGroup})}for(const n of t.milestones)a.push({value:I({type:"milestone",id:n.id}),label:n.name,group:e.milestoneGroup});for(const n of t.statuses)a.push({value:I({type:"status",id:n.id}),label:n.name,group:e.statusGroup});for(const n of t.labels)a.push({value:I({type:"label",id:n.id}),label:n.name,group:e.labelGroup});for(const n of t.members)a.push({value:I({type:"member",id:n.id}),label:n.name,group:e.memberGroup});for(const n of t.estimates)a.push({value:I({type:"estimate",id:n.id}),label:e.estimateText(n.name,n.points),group:e.estimateGroup});for(const n of t.snapshots)a.push({value:I({type:"snapshot",id:n.id}),label:ue(n.at),group:e.snapshotGroup});for(const n of t.stories)a.push({value:I({type:"story",id:n.id}),label:n.name,group:e.storyGroup});return a},As=(e,t,s)=>{const a=t.stories.find(n=>n.id===s.story);if(a)return{value:I({type:"story",id:a.id}),label:a.name,group:e.storyGroup};for(const n of t.activities){const i=n.steps.find(o=>o.id===s.step);if(i)return{value:I({type:"step",id:ce(n.id,i.id)}),label:i.name,group:e.stepGroup}}return null},gt=e=>e.title??"User Story Mapping",si=(e,t)=>{switch(t.type){case"story":{const s=x(e,t.id);return{tab:null,highlight:null,...Object.fromEntries(xe.map(a=>[a,null])),...s&&$e(e,s)?{[oe.key]:oe.value}:{}}}case"step":case"activity":return{tab:null,view:null};case"milestone":return{tab:"milestones"};case"status":case"label":case"member":return null;case"estimate":case"snapshot":return z(e,"estimates")?{tab:"burndown"}:null;default:return null}},Ms=(e,t)=>{const s=N(e,t.step),a=s?.activity??te(e,t.activity)??e.activities[0],n=s?.step??a?.steps.find(m=>m.id===t.step)??a?.steps[0],i=Bn(e,t.story),o={...t};a?o.activity=a.id:delete o.activity,n?o.step=n.id:delete o.step,i?o.story=i.id:delete o.story,o.view=t.view==="group"?"group":"activity";const r=Ge(e,t);for(const m of xe){const y=Es(e,m,r[m]);y===null?delete o[m]:o[m]=y}t[oe.key]!==oe.value&&delete o[oe.key];const d=ys(e,t);d==="map"?delete o.tab:o.tab=d,P(e,t.milestone)||delete o.milestone;const p=Ve(t);return p===null?delete o.highlight:o.highlight=p,o},Ls=(e,t)=>{switch(t.type){case"activity":return te(e,t.id)!==void 0;case"step":return N(e,t.id)!==void 0;case"story":return x(e,t.id)!==void 0;case"milestone":return P(e,t.id)!==void 0;case"status":return D(e,t.id)!==void 0;case"label":return Z(e,t.id)!==void 0;case"member":return K(e,t.id)!==void 0;case"estimate":return F(e,t.id)!==void 0;case"snapshot":return Ee(e,t.id)!==void 0;case"page":return!0;default:return!1}},Ds=e=>{const t=ne(e);return{kind:"view",name:"usm",label:"User Story Mapping",parseBase:Xt,emptyBase:lt,actions:v,apply:ps,canonicalState:Mn,hasTarget:Ls,canonicalTarget:(s,a)=>{if(a.type!=="step")return a;const n=N(s,a.id);return n?{...a,id:ce(n.activity.id,n.step.id)}:a},describe:(s,a,n)=>xs(t,s,a,n),serialize:Ts,resolveNavigation:Ms,navigationFor:si,commentTargets:(s,a)=>Is(t,s),currentTarget:(s,a)=>As(t,s,a),settings:s=>({items:Ne.map(a=>{const n=z(s,a);return{key:a,label:t.featureName(a),hint:t.featureHint(a),on:n,toggle:{type:"SET_FEATURE",target:{type:"page",id:"usm"},payload:{feature:a,enabled:!n}}}}),note:t.featuresNote}),title:gt}},Rs=.5,ai=({widths:e,available:t,gap:s,moreWidth:a,keep:n})=>{if(e.reduce((m,y)=>m+y,0)+s*Math.max(0,e.length-1)<=t+Rs)return[];const o=t-a+Rs,r=new Set;let d=0;const p=m=>{d+=(r.size===0?0:s)+(e[m]??0),r.add(m)};n>=0&&n<e.length&&p(n);for(const[m,y]of e.entries())if(!r.has(m)){if(d+(r.size===0?0:s)+y>o)break;p(m)}return e.flatMap((m,y)=>r.has(y)?[]:[y])},Os=new Set;class ni{#t;#e;#n=Os;#i=0;#a=null;#s=null;constructor(t,s){this.#t=t,this.#e=s,t.addController(this)}get hidden(){return this.#n}get minimum(){return this.#i}hostConnected(){typeof ResizeObserver>"u"||(this.#a=new ResizeObserver(()=>this.#o()))}hostUpdated(){const t=this.#e.row();t!==this.#s&&(this.#s&&this.#a?.unobserve(this.#s),t&&this.#a?.observe(t),this.#s=t),this.#o()}hostDisconnected(){this.#a?.disconnect(),this.#a=null,this.#s=null}#o(){const t=this.#e.row();if(!t)return;const s=this.#e.items(t),a=s.map(E=>E.getBoundingClientRect().width),n=s.findIndex(E=>this.#e.kept(E)),i=s[0]?.parentElement,o=i?Ns(i):0,r=this.#e.more(t),d=r?r.getBoundingClientRect().width+Ns(t):0,p=ai({widths:a,available:t.getBoundingClientRect().width,gap:o,moreWidth:d,keep:n}),m=new Set(p.flatMap(E=>{const S=s[E];return S?[this.#e.keyOf(S)]:[]})),y=Math.ceil((a[n]??0)+d);ii(m,this.#n)&&y===this.#i||(this.#n=m.size===0?Os:m,this.#i=y,this.#t.requestUpdate())}}const Ns=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,ii=(e,t)=>e.size===t.size&&[...e].every(s=>t.has(s)),ft=1440*60*1e3,oi=48,ri=8,di=(e,t,s,a)=>{const n={left:a.inset.left,top:a.inset.top,right:a.width-a.inset.right,bottom:a.height-a.inset.bottom},i=[...e.map($=>$.at),s,...t===null?[]:[t]];let o=Math.min(...i),r=Math.max(...i);r-o<ft&&(o-=ft/2,r+=ft/2);const d=li(Math.max(0,...e.map($=>$.value))),p=d.at(-1)??1,m=$=>n.left+($-o)/(r-o)*(n.right-n.left),y=$=>n.bottom-$/p*(n.bottom-n.top),E=e.map($=>({x:m($.at),y:y($.value),at:$.at,value:$.value,...$.snapshotId===void 0?{}:{snapshotId:$.snapshotId}})),S=E[0],A=ci(o,r,Math.floor((n.right-n.left)/oi));return{size:a,plot:n,line:E.map($=>`${Te($.x)},${Te($.y)}`).join(" "),dots:E,ideal:t===null||!S?null:{x1:S.x,y1:S.y,x2:m(t),y2:y(0)},nowX:m(s),dueX:t===null?null:m(t),yTicks:d.map($=>({y:y($),value:$})),valueTop:p,xUnit:A.unit,xTicks:A.ats.map($=>({x:m($),at:$})),domain:{start:o,end:r},idealSpan:t===null||!S?null:{at:S.at,value:S.value,due:t}}},li=e=>{const t=pi(e/4),s=Math.max(1,Math.ceil(e/t));return Array.from({length:s+1},(a,n)=>n*t)},pi=e=>{if(e<=1)return 1;const t=10**Math.floor(Math.log10(e));return([1,2,2.5,5,10].find(a=>Number.isInteger(a*t)&&a*t>=e)??10)*t},Te=e=>Math.round(e*100)/100,ci=(e,t,s)=>{const a=Math.max(1,s),n=["day","week","biweek","month","quarter"];for(const i of n){const o=Cs(i,e,t,a);if(o!==null)return{unit:i,ats:o}}return{unit:"year",ats:Cs("year",e,t,1/0)??[]}},Cs=(e,t,s,a)=>{const n=[];for(let i=ui(e,t);i<=s;i=mi(e,i)){if(n.length===a)return null;n.push(i)}return n},ui=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],o=(r,d)=>r.getTime()>=t?r.getTime():d().getTime();switch(e){case"day":return o(new Date(a,n,i),()=>new Date(a,n,i+1));case"week":case"biweek":{const r=o(new Date(a,n,i),()=>new Date(a,n,i+1)),d=new Date(r),p=(8-d.getDay())%7;return new Date(d.getFullYear(),d.getMonth(),d.getDate()+p).getTime()}case"month":return o(new Date(a,n,1),()=>new Date(a,n+1,1));case"quarter":{const r=n-n%3;return o(new Date(a,r,1),()=>new Date(a,r+3,1))}case"year":return o(new Date(a,0,1),()=>new Date(a+1,0,1))}},mi=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],o={day:1,week:7,biweek:14},r={month:1,quarter:3,year:12};return e==="day"||e==="week"||e==="biweek"?new Date(a,n,i+o[e]).getTime():new Date(a,n+r[e],1).getTime()},Bs=(e,t)=>{const{plot:s,domain:a,dots:n}=e,i=Math.min(s.right,Math.max(s.left,t)),o=n.reduce((E,S)=>E===null||Math.abs(S.x-i)<Math.abs(E.x-i)?S:E,null),r=o!==null&&Math.abs(o.x-i)<=ri?o:null,d=r?.at??a.start+(i-s.left)/(s.right-s.left)*(a.end-a.start),p=r?.value??hi(n,d),m=bi(e,d),y=E=>E===null?null:Te(s.bottom-E/e.valueTop*(s.bottom-s.top));return{x:r?.x??i,at:d,actual:p,ideal:m,actualY:y(p),idealY:y(m),dot:r}},hi=(e,t)=>{const s=e.findIndex(i=>i.at>=t),a=e[s];if(!a)return null;if(a.at===t)return a.value;const n=e[s-1];return n?Te(n.value+(a.value-n.value)*(t-n.at)/(a.at-n.at)):null},bi=(e,t)=>{const s=e.idealSpan;return s===null||t<s.at||t>s.due?null:Te(s.value*(s.due-t)/(s.due-s.at))},M=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,Us={circle:O(rn),lightbulb:O(un),flag:O(cn),play:O(nn),clock:O(dn),eye:O(pn),pause:O(an),check:O(tn),x:O(on)},gi=O(sn),fi=e=>{if(e>=1)return Us.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?B`<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>`:u}
11
+ </svg>`},re=e=>{const t=e===void 0?gi():e.icon==="progress"?fi(e.progress??1):Us[e.icon]();return l`<span class="status-icon">${t}</span>`},Ys=(e,t)=>e.length===0?u:l`<span class="status-bar" role="img" aria-label=${t}>
12
+ ${e.map(s=>l`<span
13
+ class="status-bar-part"
14
+ data-status=${s.id}
15
+ title=${`${s.name}: ${s.count}`}
16
+ style=${`${M(s.tone)};flex-grow:${s.count}`}
17
+ ></span>`)}
18
+ </span>`,Ke=H`
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
+ `,yi=H`
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 vi extends Ae{static{this.styles=[yi]}static{this.properties={points:{attribute:!1},due:{attribute:!1},now:{attribute:!1},size:{attribute:!1},tone:{attribute:!1},label:{attribute:!1},readout:{state:!0}}}#t=new et(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=ne(this.#t.locale),s=di(this.points,this.due,this.now,this.size),{size:a}=s,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=${M(this.tone)}
187
+ @pointermove=${i=>this.#e(s,i)}
188
+ @pointerleave=${()=>this.readout=null}
189
+ @focus=${()=>this.#n(s,s.dots.length-1)}
190
+ @blur=${()=>this.readout=null}
191
+ @keydown=${i=>this.#i(s,i)}
192
+ >
193
+ <svg class="bd-svg" viewBox=${`0 0 ${a.width} ${a.height}`} aria-hidden="true">
194
+ ${ki(t,s)} ${wi(s)} ${this.readout?Si(s,this.readout):u}
195
+ </svg>
196
+ ${this.readout?Ei(t,s,this.readout):u}
197
+ </div>`}#e(t,s){const a=this.renderRoot.querySelector("svg")?.getBoundingClientRect();!a||a.width===0||(this.readout=Bs(t,(s.clientX-a.left)/a.width*t.size.width))}#n(t,s){const a=t.dots[s];this.readout=a?Bs(t,a.x):null}#i(t,s){const a=t.dots.length-1,n=t.dots.findIndex(o=>o===this.readout?.dot),i=(()=>{switch(s.key){case"ArrowLeft":return Math.max(0,(n===-1?a:n)-1);case"ArrowRight":return Math.min(a,(n===-1?a:n)+1);case"Home":return 0;case"End":return a;default:return null}})();i!==null&&(s.preventDefault(),this.#n(t,i))}}const ki=(e,t)=>{const{plot:s,size:a}=t,n=a.height-8;return B`
198
+ ${t.yTicks.map(i=>B`<line class="bd-grid-line" x1=${s.left} x2=${s.right} y1=${i.y} y2=${i.y}></line>
199
+ <text class="bd-tick" x=${s.left-6} y=${i.y} text-anchor="end" dominant-baseline="middle">${i.value}</text>`)}
200
+ ${t.xTicks.map(i=>B`<line class="bd-grid-line" data-axis="x" x1=${i.x} x2=${i.x} y1=${s.top} y2=${s.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?u:B`<line class="bd-due" x1=${t.dueX} x2=${t.dueX} y1=${s.top} y2=${s.bottom}></line>
203
+ <text class="bd-marker" data-marker="due" x=${t.dueX-4} y=${s.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=${s.top} y2=${s.bottom}></line>
205
+ <text class="bd-marker" data-marker="today" x=${t.nowX+4} y=${s.top+10} text-anchor="start">${e.chartToday}</text>
206
+ `},wi=e=>B`
207
+ ${e.ideal?B`<line class="bd-ideal" x1=${e.ideal.x1} y1=${e.ideal.y1} x2=${e.ideal.x2} y2=${e.ideal.y2}></line>`:u}
208
+ <polyline class="bd-line" points=${e.line}></polyline>
209
+ ${e.dots.map(t=>B`<circle class="bd-dot" data-now=${t.snapshotId===void 0?"true":u} cx=${t.x} cy=${t.y} r="3.5"></circle>`)}
210
+ `,Si=(e,t)=>B`
211
+ <line class="bd-cross" x1=${t.x} x2=${t.x} y1=${e.plot.top} y2=${e.plot.bottom}></line>
212
+ ${t.idealY===null?u:B`<circle class="bd-mark" data-line="ideal" cx=${t.x} cy=${t.idealY} r="3.5"></circle>`}
213
+ ${t.actualY===null?u:B`<circle class="bd-mark" data-line="actual" cx=${t.x} cy=${t.actualY} r="4.5"></circle>`}
214
+ `,Ei=(e,t,s)=>{const{size:a,plot:n}=t,i=s.x>a.width*.6?"left":"right",o=s.dot?s.dot.snapshotId===void 0?`${e.chartNow} \xB7 ${ue(s.dot.at)}`:ue(s.dot.at):e.axisDate(s.at,"day");return l`<div
215
+ class="bd-tip"
216
+ data-testid="usm-chart-readout"
217
+ data-side=${i}
218
+ style=${`left: ${s.x/a.width*100}%; top: calc(${n.top/a.height*100}% + 20px)`}
219
+ >
220
+ <span class="bd-tip-at">${o}</span>
221
+ ${s.actual===null?u:l`<span class="bd-tip-row" data-line="actual"
222
+ ><span class="bd-swatch" data-line="actual"></span>${e.chartActual}<b>${s.actual}</b></span
223
+ >`}
224
+ ${s.ideal===null?u:l`<span class="bd-tip-row" data-line="ideal"
225
+ ><span class="bd-swatch" data-line="ideal"></span>${e.chartIdeal}<b>${s.ideal}</b></span
226
+ >`}
227
+ </div>`},$i=()=>{customElements.get("dpk-internal-usm-burndown-chart")||customElements.define("dpk-internal-usm-burndown-chart",vi)},xi=e=>{const t=e.stories.length;return{rows:e.labels.map((a,n)=>{const i=e.stories.filter(o=>o.labelIds?.includes(a.id)).length;return{id:a.id,name:a.name,tone:a.tone,previousId:e.labels[n-1]?.id??null,nextId:e.labels[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},Ti=e=>{const t=e.stories.length;return{rows:e.members.map((a,n)=>{const i=e.stories.filter(o=>o.assigneeId===a.id).length;return{id:a.id,name:a.name,tone:a.tone,previousId:e.members[n-1]?.id??null,nextId:e.members[n+1]?.id??null,storyCount:i,share:t===0?0:i/t}})}},Ps=(e,t)=>{const s=J("new-activity",j(t.state));if(!t.dispatch({type:"ADD_ACTIVITY",target:{type:"page",id:"usm"},payload:{id:s,name:e.newActivityName}}).ok)return;const n=J("new-step",[...j(t.state),s]);t.dispatch({type:"ADD_STEP",target:{type:"activity",id:s},payload:{id:n,name:e.newStepName}}),t.navigate({activity:s,step:null,story:null})},_i=(e,t,s)=>{const a=J("new-step",j(t.state));t.dispatch({type:"ADD_STEP",target:{type:"activity",id:s},payload:{id:a,name:e.newStepName}})},zs=(e,t)=>{const s=J("new-milestone",j(t.state));t.dispatch({type:"ADD_MILESTONE",target:{type:"page",id:"usm"},payload:{id:s,name:e.newMilestoneName}})},Fs=(e,t,s,a,n)=>{const i=J("new-story",j(t.state));t.dispatch({type:"ADD_STORY",target:{type:"step",id:a},payload:{id:i,name:e.newStoryName,activityId:s,...n===void 0?{}:{milestoneId:n},number:ls(t.base,t.state)}}).ok&&t.navigate({activity:s,step:a,story:i})},Ii=(e,t)=>{const s=J("new-status",j(t.state));t.dispatch({type:"ADD_STATUS",target:{type:"page",id:"usm"},payload:{id:s,name:e.newStatusName,tone:dt(t.state.statuses.length)}})},Ai=(e,t)=>{const s=J("new-label",j(t.state));t.dispatch({type:"ADD_LABEL",target:{type:"page",id:"usm"},payload:{id:s,name:e.newLabelName,tone:Be(t.state.labels.length)}})},Mi=(e,t)=>{const s=J("new-member",j(t.state));t.dispatch({type:"ADD_MEMBER",target:{type:"page",id:"usm"},payload:{id:s,name:e.newMemberName,tone:Be(t.state.members.length)}})},Li=(e,t)=>{const s=J("new-estimate",j(t.state)),a=Math.max(0,...t.state.estimates.map(n=>n.points))+1;t.dispatch({type:"ADD_ESTIMATE",target:{type:"page",id:"usm"},payload:{id:s,name:e.newEstimateName,points:a}})},Di=(e,t)=>{const s=J(`snapshot-${t.toISOString().slice(0,10)}`,j(e.state));e.dispatch({type:"RECORD_SNAPSHOT",target:{type:"page",id:"usm"},payload:{id:s,at:t.toISOString(),tally:rs(e.state)}})},Ri=(e,t,s,a)=>l`
228
+ <section class="st-overview" data-testid="usm-statuses">
229
+ ${s.rows.length===0?l`<div class="empty">
230
+ <h2>${e.noStatusesTitle}</h2>
231
+ <p>${e.noStatusesBody}</p>
232
+ </div>`:u}
233
+ <ol class="st-list">
234
+ ${U(s.rows,n=>n.id,n=>Oi(e,t,n,a))}
235
+ </ol>
236
+ <div>
237
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ii(e,t)}>
238
+ ${e.newStatusButton}
239
+ </button>
240
+ </div>
241
+ </section>
242
+ `,Oi=(e,t,s,a)=>{const n=a.openFor===s.id,i={type:"status",id:s.id},o=r=>{t.dispatch({type:"REORDER_STATUS",target:i,payload:{after:r}})};return l`
243
+ <li
244
+ class="st-row st-row--status"
245
+ data-status=${s.id}
246
+ data-dpk-target=${I(i)}
247
+ style=${M(s.tone)}
248
+ >
249
+ <button
250
+ class="st-icon-trigger"
251
+ type="button"
252
+ data-icon-trigger=${s.id}
253
+ aria-haspopup="menu"
254
+ aria-expanded=${String(n)}
255
+ aria-label=${`${e.statusIconLabel}: ${e.iconName(s.icon)}`}
256
+ title=${e.iconName(s.icon)}
257
+ @click=${()=>a.toggle(s.id)}
258
+ >
259
+ ${re(s)}
260
+ </button>
261
+ ${n?Ni(e,t,s,a):u}
262
+ <span class="st-name">
263
+ <dpk-inline-edit
264
+ .value=${s.name}
265
+ .label=${e.statusNameLabel}
266
+ @dpk-commit=${Q(r=>t.dispatch({type:"SET_STATUS_NAME",target:i,payload:{name:r}}))}
267
+ ></dpk-inline-edit>
268
+ </span>
269
+ ${vt(e,s.storyCount,s.share)}
270
+ ${yt(e,s.tone,r=>t.dispatch({type:"SET_STATUS_TONE",target:i,payload:{tone:r}}))}
271
+ <label class="st-done" title=${e.doneStatusAria(s.name)}>
272
+ <input
273
+ type="radio"
274
+ name="usm-done-status"
275
+ data-role="done"
276
+ aria-label=${e.doneStatusAria(s.name)}
277
+ .checked=${s.done}
278
+ @change=${()=>t.dispatch({type:"SET_DONE_STATUS",target:i,payload:{}})}
279
+ />
280
+ <span aria-hidden="true">${e.doneStatusMark}</span>
281
+ </label>
282
+ ${qe(e,{ids:t.state.statuses.map(r=>r.id),row:s,deleteLabel:e.deleteStatusAria,reorder:o,remove:()=>t.dispatch({type:"DELETE_STATUS",target:i,payload:{}})})}
283
+ </li>
284
+ `},Ni=(e,t,s,a)=>l`<div
285
+ id="icon-menu"
286
+ class="comment-pop icon-menu"
287
+ popover="manual"
288
+ role="menu"
289
+ aria-label=${e.statusIconLabel}
290
+ style=${M(s.tone)}
291
+ @keydown=${n=>{n.key==="Escape"&&(n.preventDefault(),a.close())}}
292
+ >
293
+ ${zt.map(n=>l`<button
294
+ class="icon-option"
295
+ type="button"
296
+ role="menuitemradio"
297
+ data-icon=${n}
298
+ title=${e.iconName(n)}
299
+ aria-label=${e.iconName(n)}
300
+ aria-checked=${String(n===s.icon)}
301
+ @click=${()=>{n!==s.icon&&t.dispatch({type:"SET_STATUS_ICON",target:{type:"status",id:s.id},payload:{icon:n}}),a.close()}}
302
+ >
303
+ ${re({icon:n,progress:s.progress})}
304
+ </button>`)}
305
+ </div>`,yt=(e,t,s)=>l`<span class="st-tones" role="radiogroup" aria-label=${e.statusToneLabel}>
306
+ ${Oe.map(a=>l`<button
307
+ class="st-tone"
308
+ type="button"
309
+ role="radio"
310
+ data-tone=${a}
311
+ style=${M(a)}
312
+ title=${e.toneName(a)}
313
+ aria-label=${e.toneName(a)}
314
+ aria-checked=${a===t?"true":"false"}
315
+ @click=${()=>{a!==t&&s(a)}}
316
+ ></button>`)}
317
+ </span>`,qe=(e,t)=>l`<span class="st-tools">
318
+ <button
319
+ class="dpk-icon-btn"
320
+ type="button"
321
+ aria-label=${e.moveUpAria}
322
+ ?disabled=${t.row.previousId===null}
323
+ @click=${()=>t.reorder(Ci(t.ids,t.row.previousId))}
324
+ >
325
+ ↑
326
+ </button>
327
+ <button
328
+ class="dpk-icon-btn"
329
+ type="button"
330
+ aria-label=${e.moveDownAria}
331
+ ?disabled=${t.row.nextId===null}
332
+ @click=${()=>t.reorder(t.row.nextId)}
333
+ >
334
+ ↓
335
+ </button>
336
+ <button class="dpk-icon-btn" type="button" data-role="delete" aria-label=${t.deleteLabel} @click=${t.remove}>
337
+ ${tt()}
338
+ </button>
339
+ </span>`,Ci=(e,t)=>{const s=t===null?-1:e.indexOf(t);return s<=0?null:e[s-1]??null},vt=(e,t,s)=>l`
340
+ <span class="st-share">
341
+ <span class="st-share-text">${e.statusShare(t,Math.round(s*100))}</span>
342
+ <span class="st-meter" aria-hidden="true"><span style=${`width:${s*100}%`}></span></span>
343
+ </span>
344
+ `,Bi=(e,t,s)=>l`
345
+ <section class="st-overview" data-testid="usm-labels">
346
+ ${s.rows.length===0?l`<div class="empty">
347
+ <h2>${e.noLabelsTitle}</h2>
348
+ <p>${e.noLabelsBody}</p>
349
+ </div>`:u}
350
+ <ol class="st-list">
351
+ ${U(s.rows,a=>a.id,a=>Ui(e,t,a))}
352
+ </ol>
353
+ <div>
354
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ai(e,t)}>
355
+ ${e.newLabelButton}
356
+ </button>
357
+ </div>
358
+ </section>
359
+ `,Ui=(e,t,s)=>{const a={type:"label",id:s.id};return l`
360
+ <li class="st-row" data-label=${s.id} data-dpk-target=${I(a)} style=${M(s.tone)}>
361
+ <span class="label-swatch" aria-hidden="true"></span>
362
+ <span class="st-name">
363
+ <dpk-inline-edit
364
+ .value=${s.name}
365
+ .label=${e.labelNameLabel}
366
+ @dpk-commit=${Q(n=>t.dispatch({type:"SET_LABEL_NAME",target:a,payload:{name:n}}))}
367
+ ></dpk-inline-edit>
368
+ </span>
369
+ ${vt(e,s.storyCount,s.share)}
370
+ ${yt(e,s.tone,n=>t.dispatch({type:"SET_LABEL_TONE",target:a,payload:{tone:n}}))}
371
+ ${qe(e,{ids:t.state.labels.map(n=>n.id),row:s,deleteLabel:e.deleteLabelAria,reorder:n=>t.dispatch({type:"REORDER_LABEL",target:a,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_LABEL",target:a,payload:{}})})}
372
+ </li>
373
+ `},Yi=new Intl.Segmenter(void 0,{granularity:"grapheme"}),kt=e=>{const[t]=Yi.segment(e.trim());return t?t.segment.toUpperCase():"?"},Pi=(e,t,s)=>l`
374
+ <section class="st-overview" data-testid="usm-members">
375
+ ${s.rows.length===0?l`<div class="empty">
376
+ <h2>${e.noMembersTitle}</h2>
377
+ <p>${e.noMembersBody}</p>
378
+ </div>`:u}
379
+ <ol class="st-list">
380
+ ${U(s.rows,a=>a.id,a=>zi(e,t,a))}
381
+ </ol>
382
+ <div>
383
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Mi(e,t)}>
384
+ ${e.newMemberButton}
385
+ </button>
386
+ </div>
387
+ </section>
388
+ `,zi=(e,t,s)=>{const a={type:"member",id:s.id};return l`
389
+ <li class="st-row" data-member=${s.id} data-dpk-target=${I(a)} style=${M(s.tone)}>
390
+ <span class="member-avatar" aria-hidden="true">${kt(s.name)}</span>
391
+ <span class="st-name">
392
+ <dpk-inline-edit
393
+ .value=${s.name}
394
+ .label=${e.memberNameLabel}
395
+ @dpk-commit=${Q(n=>t.dispatch({type:"SET_MEMBER_NAME",target:a,payload:{name:n}}))}
396
+ ></dpk-inline-edit>
397
+ </span>
398
+ ${vt(e,s.storyCount,s.share)}
399
+ ${yt(e,s.tone,n=>t.dispatch({type:"SET_MEMBER_TONE",target:a,payload:{tone:n}}))}
400
+ ${qe(e,{ids:t.state.members.map(n=>n.id),row:s,deleteLabel:e.deleteMemberAria,reorder:n=>t.dispatch({type:"REORDER_MEMBER",target:a,payload:{after:n}}),remove:()=>t.dispatch({type:"DELETE_MEMBER",target:a,payload:{}})})}
401
+ </li>
402
+ `},he=e=>{const t=be(e);return e.statuses.map((s,a)=>({id:s.id,name:s.name,tone:s.tone,icon:s.icon,progress:Vs(a,t)}))},Vs=(e,t)=>t<=0?1:Math.min(1,e/t),Gs=(e,t)=>e.find(s=>s.id===t.statusId),Hs=(e,t)=>he(e).map(s=>({...s,count:t.filter(a=>a.statusId===s.id).length})).filter(s=>s.count>0),Fi=e=>{const t=e.stories.length,s=o=>t===0?0:o/t,a=o=>e.stories.filter(r=>r.statusId===o).length,n=be(e);return{rows:e.statuses.map((o,r)=>{const d=a(o.id);return{id:o.id,name:o.name,tone:o.tone,icon:o.icon,progress:Vs(r,n),done:r===n,previousId:e.statuses[r-1]?.id??null,nextId:e.statuses[r+1]?.id??null,storyCount:d,share:s(d)}})}},Vi={width:228,height:116},Gi=H`
403
+ :host {
404
+ display: block;
405
+ }
406
+
407
+ .st-overview {
408
+ display: grid;
409
+ gap: 20px;
410
+ max-width: none;
411
+ padding: 0;
412
+ }
413
+
414
+ /* The panel already is a frame: the list itself draws none. */
415
+ .st-list {
416
+ display: grid;
417
+ margin: 0;
418
+ padding: 0;
419
+ list-style: none;
420
+ border: 0;
421
+ background: none;
422
+ box-shadow: none;
423
+ }
424
+
425
+ .st-row {
426
+ display: flex;
427
+ flex-wrap: wrap;
428
+ align-items: center;
429
+ gap: 8px 12px;
430
+ padding: 10px 0;
431
+ }
432
+
433
+ .st-row + .st-row {
434
+ border-top: 1px solid var(--dpk-rule);
435
+ }
436
+
437
+ .st-name {
438
+ flex: 1 1 120px;
439
+ min-width: 0;
440
+ font-size: 14px;
441
+ font-weight: 650;
442
+ }
443
+
444
+ .st-share {
445
+ flex: 1 1 140px;
446
+ display: grid;
447
+ gap: 5px;
448
+ }
449
+
450
+ .st-share-text {
451
+ color: var(--dpk-ink-faint);
452
+ font-family: var(--dpk-mono);
453
+ font-size: 11px;
454
+ font-variant-numeric: tabular-nums;
455
+ }
456
+
457
+ .st-meter {
458
+ height: 5px;
459
+ border-radius: 3px;
460
+ background: var(--dpk-paper-sunken);
461
+ overflow: hidden;
462
+ }
463
+
464
+ .st-meter > span {
465
+ display: block;
466
+ height: 100%;
467
+ border-radius: 3px;
468
+ background: var(--usm-tone);
469
+ }
470
+
471
+ .st-done {
472
+ display: inline-flex;
473
+ align-items: center;
474
+ gap: 6px;
475
+ color: var(--dpk-ink-faint);
476
+ font-size: 12px;
477
+ font-weight: 600;
478
+ white-space: nowrap;
479
+ cursor: pointer;
480
+ user-select: none;
481
+ transition: color 140ms var(--dpk-ease);
482
+ }
483
+
484
+ .st-done:hover,
485
+ .st-done:has(:checked) {
486
+ color: var(--dpk-ink);
487
+ }
488
+
489
+ .st-done input {
490
+ margin: 0;
491
+ accent-color: var(--usm-tone);
492
+ cursor: inherit;
493
+ }
494
+
495
+ .st-tones {
496
+ display: inline-flex;
497
+ flex-wrap: wrap;
498
+ gap: 5px;
499
+ }
500
+
501
+ .st-tone {
502
+ width: 18px;
503
+ height: 18px;
504
+ padding: 0;
505
+ border: 2px solid var(--dpk-paper-raised);
506
+ border-radius: 50%;
507
+ background: var(--usm-tone);
508
+ box-shadow: 0 0 0 1px var(--dpk-rule-strong);
509
+ cursor: pointer;
510
+ transition: box-shadow 150ms ease;
511
+ }
512
+
513
+ .st-tone:hover {
514
+ box-shadow: 0 0 0 1px var(--usm-tone);
515
+ }
516
+
517
+ .st-tone[aria-checked='true'] {
518
+ box-shadow: 0 0 0 2px var(--usm-tone);
519
+ }
520
+
521
+ .st-tone:focus-visible {
522
+ outline: none;
523
+ box-shadow: var(--dpk-focus);
524
+ }
525
+
526
+ /* A status's own icon opens the menu of icons. */
527
+ .st-icon-trigger {
528
+ display: inline-grid;
529
+ place-items: center;
530
+ width: 30px;
531
+ height: 30px;
532
+ margin: -7px;
533
+ padding: 0;
534
+ border: 1px solid transparent;
535
+ border-radius: var(--dpk-radius-sm);
536
+ background: transparent;
537
+ cursor: pointer;
538
+ transition:
539
+ background 140ms var(--dpk-ease),
540
+ border-color 140ms var(--dpk-ease);
541
+ }
542
+
543
+ .st-icon-trigger:hover,
544
+ .st-icon-trigger[aria-expanded='true'] {
545
+ border-color: var(--dpk-rule-strong);
546
+ background: var(--dpk-paper-raised);
547
+ box-shadow: var(--dpk-shadow-xs);
548
+ }
549
+
550
+ .st-icon-trigger:focus-visible {
551
+ outline: none;
552
+ box-shadow: var(--dpk-focus);
553
+ }
554
+
555
+ .comment-pop.icon-menu {
556
+ grid-template-columns: repeat(5, 36px);
557
+ gap: 4px;
558
+ padding: 8px;
559
+ }
560
+
561
+ .icon-option {
562
+ display: inline-grid;
563
+ place-items: center;
564
+ width: 36px;
565
+ height: 36px;
566
+ padding: 0;
567
+ border: 1px solid transparent;
568
+ border-radius: var(--dpk-radius-sm);
569
+ background: transparent;
570
+ cursor: pointer;
571
+ }
572
+
573
+ .icon-option .status-icon {
574
+ width: 18px;
575
+ height: 18px;
576
+ }
577
+
578
+ .icon-option:hover,
579
+ .icon-option:focus-visible {
580
+ outline: none;
581
+ background: var(--dpk-paper-inset);
582
+ }
583
+
584
+ .icon-option[aria-checked='true'] {
585
+ border-color: color-mix(in oklab, var(--usm-tone) 55%, transparent);
586
+ background: color-mix(in oklab, var(--usm-tone) 12%, transparent);
587
+ }
588
+
589
+ /* A label's color, where a status shows its icon. */
590
+ .label-swatch {
591
+ width: 12px;
592
+ height: 12px;
593
+ border-radius: 4px;
594
+ background: var(--usm-tone);
595
+ }
596
+
597
+ /* A member's initial in their color, where a label shows its swatch. */
598
+ .member-avatar {
599
+ display: inline-grid;
600
+ place-items: center;
601
+ width: 22px;
602
+ height: 22px;
603
+ border-radius: 50%;
604
+ background: var(--usm-tone);
605
+ color: var(--dpk-paper-raised);
606
+ font-size: 11px;
607
+ font-weight: 700;
608
+ line-height: 1;
609
+ }
610
+
611
+ /* The tools stay at the end of whatever line the row's content ends on. */
612
+ .st-tools {
613
+ display: inline-flex;
614
+ gap: 2px;
615
+ margin-left: auto;
616
+ }
617
+
618
+ .st-tools .dpk-icon-btn {
619
+ width: 26px;
620
+ height: 26px;
621
+ font-size: 13px;
622
+ }
623
+
624
+ /* The same empty state the map's pages use, repeated here because a section
625
+ does not inherit the page's CSS (see the file header). */
626
+ .empty {
627
+ border: 1px dashed var(--dpk-rule-strong);
628
+ border-radius: var(--dpk-radius-lg);
629
+ padding: 28px 24px;
630
+ background: var(--dpk-dots), var(--dpk-paper-sunken);
631
+ max-width: 620px;
632
+ display: grid;
633
+ gap: 10px;
634
+ }
635
+ `;class Hi extends Ae{static{this.styles=[Ua,Rt,Ke,_t,Gi]}static{this.properties={kind:{type:String},locale:{type:String},context:{attribute:!1}}}#t=null;#e=new It(this);render(){const t=this.context;if(t===null)return u;const s=ne(this.locale??"ja"),a=t.state;if(this.kind==="labels")return Bi(s,t,xi(a));if(this.kind==="members")return Pi(s,t,Ti(a));const n={openFor:this.#t,toggle:i=>{this.#t=this.#t===i?null:i,this.requestUpdate()},close:()=>{this.#t=null,this.requestUpdate()}};return Ri(s,t,Fi(a),n)}updated(){const t=this.renderRoot.querySelector("#icon-menu"),s=this.#t===null?null:this.renderRoot.querySelector(`[data-icon-trigger="${CSS.escape(this.#t)}"]`);t===null||s===null||this.#e.open(t,s,Vi)}}const Ki=()=>{customElements.get("dpk-internal-usm-settings-section")||customElements.define("dpk-internal-usm-settings-section",Hi)},qi={github:B`<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:B`<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:B`<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:B`<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:B`<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:B`<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>`},Ks=e=>e==="web"?Ya():l`<svg class="link-mark" viewBox="0 0 16 16" aria-hidden="true">${qi[e]}</svg>`,qs=H`
636
+ .link-mark {
637
+ fill: currentColor;
638
+ }
639
+ .link-chip {
640
+ display: inline-flex;
641
+ align-items: center;
642
+ gap: 5px;
643
+ min-width: 0;
644
+ max-width: 100%;
645
+ padding: 1px 8px 1px 6px;
646
+ border: 1px solid var(--dpk-rule-strong);
647
+ border-radius: 999px;
648
+ background: var(--dpk-paper-raised);
649
+ color: var(--dpk-ink-soft);
650
+ font-family: var(--dpk-mono);
651
+ font-size: 10.5px;
652
+ font-weight: 600;
653
+ line-height: 18px;
654
+ text-decoration: none;
655
+ transition:
656
+ color 140ms var(--dpk-ease),
657
+ border-color 140ms var(--dpk-ease);
658
+ }
659
+ .link-chip:hover {
660
+ border-color: var(--dpk-ink-faint);
661
+ color: var(--dpk-ink);
662
+ }
663
+ .link-chip:focus-visible {
664
+ outline: none;
665
+ box-shadow: var(--dpk-focus);
666
+ }
667
+ .link-chip svg {
668
+ flex: none;
669
+ width: 12px;
670
+ height: 12px;
671
+ }
672
+ .link-chip span {
673
+ overflow: hidden;
674
+ text-overflow: ellipsis;
675
+ white-space: nowrap;
676
+ }
677
+ `,wt=e=>`${de(e)} ${e.name}`,Wi=(e,t)=>{const s=N(e,`${t.activityId}.${t.stepId}`);if(!s)return;const a=P(e,t.milestoneId),n=`${s.activity.name} \u203A ${s.step.name}`;return a?`${n} (${a.name})`:n},ji=(e,t)=>e.stories.filter(s=>(s.blockedBy??[]).includes(t.id)).map(s=>de(s)),Xi=(e,t)=>(t.blockedBy??[]).flatMap(s=>{const a=x(e,s);return a?[de(a)]:[]}),Zi=e=>`[${e.label??e.url}](${e.url})`,Ws=(e,t,s)=>{const a=[],n=($,L)=>{a.push(`- ${$}: ${L}`)},i=D(t,s.statusId);i&&n(e.storyStatusLabel,i.name);const o=Wi(t,s);o&&n(e.copyInfoStep,o);const r=F(t,s.estimateId);r&&n(e.storyEstimateLabel,`${r.name} (${r.points})`);const d=pt(t,s);d&&n(e.storyAssigneeLabel,d.name);const p=ct(t,s).map($=>$.name);p.length>0&&n(e.storyLabelsLabel,p.join(", "));const m=ji(t,s);m.length>0&&n(e.copyInfoBlocks,m.join(", "));const y=Xi(t,s);y.length>0&&n(e.copyInfoWaitsOn,y.join(", "));const E=(s.links??[]).map(Zi);E.length>0&&n(e.storyLinksLabel,E.join(", "));const S=[`### ${wt(s)}`];a.length>0&&S.push("",...a);const A=(s.description??"").replace(/\s+$/,"");return A!==""&&S.push("",A),`${S.join(`
678
+ `).replace(/[ \t]+$/gm,"").trimEnd()}
679
+ `},Ji=O(mn),Qi=O(en),eo=3,to=H`
680
+ /*
681
+ * The card is the kit's card atom (it was back-ported from this one); what
682
+ * stays here is the map's own: the status icon, the dependency chips and the
683
+ * host's states mapped onto the card.
684
+ */
685
+ :host {
686
+ --dpk-card-tone: var(--usm-tone, var(--dpk-ink-faint));
687
+ display: block;
688
+ }
689
+
690
+ :host(:focus-visible) {
691
+ outline: none;
692
+ }
693
+
694
+ /* The card is the button that opens its story; the keyboard ring is the focused look. */
695
+ :host(:focus-visible) .dpk-card {
696
+ border-color: var(--dpk-blue);
697
+ box-shadow: var(--dpk-focus);
698
+ }
699
+
700
+ :host(:focus-visible) .dpk-card[data-state~='dimmed'] {
701
+ opacity: 0.85;
702
+ filter: none;
703
+ }
704
+
705
+ /* With a story open, the cards it waits on and the cards waiting on it stand out. */
706
+ :host([data-relation='blocker']) {
707
+ --dpk-card-mark: var(--dpk-amber);
708
+ }
709
+
710
+ :host([data-relation='dependent']) {
711
+ --dpk-card-mark: var(--dpk-violet);
712
+ }
713
+
714
+ .card-status {
715
+ flex: none;
716
+ display: inline-flex;
717
+ margin-top: 1.5px;
718
+ }
719
+
720
+ /*
721
+ * Where the story sits among the others. A story that holds others up is
722
+ * work to pull forward (a spike), so its chip is the loud one; one still
723
+ * waiting reads quieter and goes away once its blockers are done.
724
+ */
725
+ .dep-chip {
726
+ display: inline-flex;
727
+ align-items: center;
728
+ gap: 4px;
729
+ padding: 0 7px;
730
+ border-radius: 6px;
731
+ font-size: 10.5px;
732
+ font-weight: 650;
733
+ line-height: 18px;
734
+ white-space: nowrap;
735
+ }
736
+
737
+ .dep-chip svg {
738
+ flex: none;
739
+ width: 12px;
740
+ height: 12px;
741
+ }
742
+
743
+ .dep-chip[data-kind='blocks'] {
744
+ background: var(--dpk-amber);
745
+ color: var(--dpk-paper-raised);
746
+ }
747
+
748
+ .dep-chip[data-kind='waits'] {
749
+ border: 1px dashed color-mix(in oklab, var(--dpk-ink-faint) 60%, transparent);
750
+ color: var(--dpk-ink-soft);
751
+ }
752
+
753
+ .dpk-pill,
754
+ .dpk-avatar {
755
+ --tone: var(--usm-tone);
756
+ }
757
+
758
+ .card-links .link-chip {
759
+ border-color: color-mix(in oklab, var(--dpk-card-tone) 16%, var(--dpk-rule));
760
+ background: var(--dpk-paper-raised);
761
+ }
762
+ `;class so extends Ae{static{this.styles=[Pa,Za,Ke,qs,to]}static{this.properties={story:{attribute:!1},map:{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},highlight:{attribute:"data-highlight"},relation:{attribute:"data-relation"}}}#t=new et(this);constructor(){super(),this.story=null,this.map=lt(),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,this.highlight=null,this.relation=null}getContextMenuItems(t){const s=this.story;if(!s)return null;const a=ne(this.#t.locale),n=de(s);return[{id:"usm-story-card",entries:[{kind:"item",id:"copy-story-id",label:a.copyId,run:()=>{Me(n)}},{kind:"item",id:"copy-story-id-title",label:a.copyIdTitle,run:()=>{Me(wt(s))}},{kind:"item",id:"copy-story-info",label:a.copyStoryInfo,run:()=>{Me(Ws(a,this.map,s))}}]}]}render(){const t=this.story;if(!t)return u;const s=ne(this.#t.locale),a=t.comments?.length??0;return l`<div class="dpk-card" data-interactive data-state=${this.#e()}>
763
+ <div class="dpk-card-head">
764
+ ${this.statuses.length===0?u:this.#n(s,t)}
765
+ <div class="dpk-card-title"><span>${t.name}</span></div>
766
+ ${this.estimate||this.assignee?this.#i(s):u}
767
+ </div>
768
+ ${t.description?l`<div class="dpk-card-text" @click=${no}>
769
+ ${za(Fa(t.description))}
770
+ </div>`:u}
771
+ ${this.blocks>0||this.waits>0?this.#a(s):u}
772
+ ${this.labels.length>0?ao(this.labels):u}
773
+ ${t.links&&t.links.length>0?this.#s(t.links):u}
774
+ <div class="dpk-card-foot">
775
+ <span class="dpk-card-key">${de(t)}</span>
776
+ ${this.stepName===""?u:l`<span class="dpk-card-chip" data-kind="step"><span>${this.stepName}</span></span>`}
777
+ ${a>0?l`<span
778
+ class="dpk-card-chip"
779
+ data-variant="count"
780
+ data-kind="comments"
781
+ aria-label=${s.commentCountAria(a)}
782
+ >
783
+ ${Va()}<span>${a}</span>
784
+ </span>`:u}
785
+ ${this.reviewCount>0?l`<span
786
+ class="dpk-card-chip"
787
+ data-variant="count"
788
+ data-tone="accent"
789
+ data-kind="review"
790
+ aria-label=${s.reviewCountAria(this.reviewCount)}
791
+ >
792
+ ${At()}<span>${this.reviewCount}</span>
793
+ </span>`:u}
794
+ </div>
795
+ </div>`}#e(){const t=[this.focused?"selected":"",this.highlight==="on"?"highlight":this.highlight==="dimmed"?"dimmed":"",this.dragging?"dragging":"",this.relation?"marked":""].filter(s=>s!=="");return t.length===0?u:t.join(" ")}#n(t,s){const a=Gs(this.statuses,s);if(!a)return u;const n=a.name;return l`<span class="card-status" role="img" aria-label=${t.storyStatusAria(n)} title=${n}>
796
+ ${re(a)}
797
+ </span>`}#i(t){const{estimate:s,assignee:a}=this;return l`<span class="dpk-card-meta">
798
+ ${s?l`<span
799
+ class="dpk-card-chip"
800
+ data-variant="outline"
801
+ data-kind="estimate"
802
+ title=${t.estimateChipTitle(t.estimateText(s.name,s.points))}
803
+ >${s.name}</span
804
+ >`:u}
805
+ ${a?l`<span
806
+ class="dpk-avatar"
807
+ data-kind="assignee"
808
+ style=${M(a.tone)}
809
+ title=${t.assigneeChipTitle(a.name)}
810
+ >${kt(a.name)}</span
811
+ >`:u}
812
+ </span>`}#a(t){return l`<div class="dpk-card-row card-deps">
813
+ ${this.blocks>0?l`<span class="dep-chip" data-kind="blocks" title=${t.blocksChipTitle(this.blocks)}
814
+ >${Ji()}${t.blocksChip(this.blocks)}</span
815
+ >`:u}
816
+ ${this.waits>0?l`<span class="dep-chip" data-kind="waits" title=${t.waitsChipTitle(this.waits)}
817
+ >${Qi()}${t.waitsChip(this.waits)}</span
818
+ >`:u}
819
+ </div>`}#s(t){const s=t.slice(0,eo);return l`<div class="dpk-card-row card-links">
820
+ ${s.map(a=>{const n=Fe(a.url);return l`<a
821
+ class="link-chip"
822
+ data-kind=${n.kind}
823
+ href=${a.url}
824
+ target="_blank"
825
+ rel="noopener noreferrer"
826
+ title=${a.label??n.title}
827
+ draggable="false"
828
+ tabindex="-1"
829
+ @click=${i=>i.stopPropagation()}
830
+ >${Ks(n.kind)}<span>${a.label??n.text}</span></a
831
+ >`})}
832
+ ${t.length>s.length?l`<span class="link-chip">+${t.length-s.length}</span>`:u}
833
+ </div>`}}const ao=e=>l`<div class="dpk-card-row card-labels">
834
+ ${e.map(t=>l`<span class="dpk-pill" data-label=${t.id} style=${M(t.tone)}>${t.name}</span>`)}
835
+ </div>`,no=e=>{e.target instanceof Element&&e.target.closest("a")&&e.stopPropagation()},io=()=>{customElements.get("dpk-internal-usm-story-card")||customElements.define("dpk-internal-usm-story-card",so)},js=e=>{const t=e.slice(0,-1).map(ns),s=t.reduce((n,i)=>n+i,0),a=t.map(n=>s>0?n/s*se:se/t.length);return a.slice(0,-1).map((n,i)=>a.slice(0,i+1).reduce((o,r)=>o+r,0))},Xs=(e,t,s)=>{if(t<0||t>=e.length)return e;const a=e[t-1]??0,n=e[t+1]??se;return e.map((i,o)=>o===t?Math.min(n,Math.max(a,Math.round(s))):i)},We=e=>[...e,se].map((t,s)=>t-(e[s-1]??0)),oo=(e,t)=>{const s=We(t.map(a=>Math.round(a)));return e.slice(0,-1).flatMap((a,n)=>{const i=s[n]??0;return a.weight===i?[]:[{statusId:a.id,weight:i}]})},ro=H`
836
+ :host {
837
+ display: block;
838
+ }
839
+ .wb {
840
+ display: grid;
841
+ grid-template-columns: minmax(0, 1fr) auto;
842
+ column-gap: 10px;
843
+ row-gap: 4px;
844
+ align-items: center;
845
+ }
846
+ .wb-track {
847
+ position: relative;
848
+ height: 36px;
849
+ border-radius: var(--dpk-radius-sm);
850
+ background: var(--dpk-paper-sunken);
851
+ touch-action: none;
852
+ }
853
+ .wb-part {
854
+ position: absolute;
855
+ top: 0;
856
+ bottom: 0;
857
+ display: flex;
858
+ align-items: center;
859
+ gap: 6px;
860
+ min-width: 0;
861
+ padding: 0 10px;
862
+ overflow: hidden;
863
+ background: color-mix(in oklab, var(--usm-tone) 16%, var(--dpk-paper-raised));
864
+ color: var(--dpk-ink);
865
+ font-size: 12px;
866
+ font-weight: 600;
867
+ white-space: nowrap;
868
+ transition:
869
+ left 120ms ease-out,
870
+ width 120ms ease-out;
871
+ }
872
+ .wb-track[data-dragging] .wb-part {
873
+ transition: none;
874
+ }
875
+ .wb-parts {
876
+ position: absolute;
877
+ inset: 0;
878
+ overflow: hidden;
879
+ border-radius: inherit;
880
+ }
881
+ .wb-name {
882
+ min-width: 0;
883
+ overflow: hidden;
884
+ text-overflow: ellipsis;
885
+ }
886
+ .wb-value {
887
+ flex: none;
888
+ color: var(--usm-tone);
889
+ font-family: var(--dpk-mono);
890
+ font-variant-numeric: tabular-nums;
891
+ }
892
+ .wb-line {
893
+ position: absolute;
894
+ top: -4px;
895
+ bottom: -4px;
896
+ z-index: 1;
897
+ width: 14px;
898
+ margin-left: -7px;
899
+ border-radius: var(--dpk-radius-sm);
900
+ outline: none;
901
+ cursor: col-resize;
902
+ }
903
+ .wb-line::before {
904
+ content: '';
905
+ position: absolute;
906
+ top: 0;
907
+ bottom: 0;
908
+ left: 6px;
909
+ width: 2px;
910
+ border-radius: 1px;
911
+ background: var(--dpk-ink-soft);
912
+ transition: background 120ms ease-out;
913
+ }
914
+ /* The grip says the line can be taken hold of. */
915
+ .wb-line::after {
916
+ content: '';
917
+ position: absolute;
918
+ top: 50%;
919
+ left: 2px;
920
+ width: 10px;
921
+ height: 20px;
922
+ margin-top: -10px;
923
+ border: 1px solid var(--dpk-rule-strong);
924
+ border-radius: 5px;
925
+ background: var(--dpk-paper-raised);
926
+ box-shadow: var(--dpk-shadow-xs);
927
+ transition: border-color 120ms ease-out;
928
+ }
929
+ .wb-line:hover::before,
930
+ .wb-line[data-active]::before {
931
+ background: var(--dpk-ink);
932
+ }
933
+ .wb-line:hover::after,
934
+ .wb-line[data-active]::after {
935
+ border-color: var(--dpk-ink-soft);
936
+ }
937
+ .wb-line:focus-visible {
938
+ box-shadow: var(--dpk-focus);
939
+ }
940
+ .wb-end {
941
+ display: flex;
942
+ align-items: center;
943
+ gap: 6px;
944
+ color: var(--dpk-ink-faint);
945
+ font-size: 12px;
946
+ font-weight: 600;
947
+ white-space: nowrap;
948
+ }
949
+ .wb-scale {
950
+ position: relative;
951
+ height: 12px;
952
+ color: var(--dpk-ink-faint);
953
+ font-family: var(--dpk-mono);
954
+ font-size: 10px;
955
+ }
956
+ .wb-tick {
957
+ position: absolute;
958
+ top: 0;
959
+ width: 1px;
960
+ height: 3px;
961
+ background: var(--dpk-rule-strong);
962
+ }
963
+ .wb-scale-end {
964
+ position: absolute;
965
+ top: 0;
966
+ line-height: 12px;
967
+ }
968
+ .wb-scale-end[data-at='0'] {
969
+ left: 0;
970
+ }
971
+ .wb-scale-end[data-at='max'] {
972
+ right: 0;
973
+ }
974
+ @media (prefers-reduced-motion: reduce) {
975
+ .wb-part,
976
+ .wb-line::before,
977
+ .wb-line::after {
978
+ transition: none;
979
+ }
980
+ }
981
+ `;class lo extends Ae{static{this.styles=[Ke,ro]}static{this.properties={statuses:{attribute:!1},dividers:{attribute:!1},commit:{attribute:!1},drag:{state:!0}}}#t=new et(this);constructor(){super(),this.statuses=[],this.dividers=[],this.commit=()=>{},this.drag=null}disconnectedCallback(){super.disconnectedCallback(),this.#r()}render(){const t=ne(this.#t.locale),s=this.statuses.slice(0,-1),a=this.statuses.at(-1);if(!a||s.length===0)return u;const n=this.drag?.dividers??this.dividers,i=We(n),o=r=>`${r/se*100}%`;return l`<div class="wb">
982
+ <div class="wb-track" role="group" aria-label=${t.statusWeightLabel} ?data-dragging=${this.drag!==null}>
983
+ <div class="wb-parts">
984
+ ${s.map((r,d)=>{const p=n[d-1]??0,m=i[d]??0;return l`<span
985
+ class="wb-part"
986
+ data-part=${r.id}
987
+ title=${`${r.name} ${je(m)}`}
988
+ style=${`${M(r.tone)}; left: ${o(p)}; width: ${o(m)}`}
989
+ >
990
+ <span class="wb-name">${r.name}</span><span class="wb-value">${je(m)}</span>
991
+ </span>`})}
992
+ </div>
993
+ ${n.map((r,d)=>this.#e(t,s,n,d,o(r)))}
994
+ </div>
995
+ <span class="wb-end" data-end style=${M(a.tone)}>${re(a)}${a.name}</span>
996
+ <div class="wb-scale" aria-hidden="true">
997
+ ${Array.from({length:se-1},(r,d)=>l`<span class="wb-tick" style=${`left: ${o(d+1)}`}></span>`)}
998
+ <span class="wb-scale-end" data-at="0">0</span>
999
+ <span class="wb-scale-end" data-at="max">${se}</span>
1000
+ </div>
1001
+ </div>`}#e(t,s,a,n,i){const o=s[n]?.name??"",r=s[n+1]?.name??"",d=We(a),p=a[n]??0;return l`<span
1002
+ class="wb-line"
1003
+ role="slider"
1004
+ tabindex="0"
1005
+ style=${`left: ${i}`}
1006
+ aria-label=${t.weightLineLabel(o,r)}
1007
+ aria-valuemin=${String(a[n-1]??0)}
1008
+ aria-valuemax=${String(a[n+1]??se)}
1009
+ aria-valuenow=${String(p)}
1010
+ aria-valuetext=${t.weightLineValue(o,je(d[n]??0),r,je(d[n+1]??0))}
1011
+ ?data-active=${this.drag?.index===n}
1012
+ @keydown=${m=>this.#n(m,n)}
1013
+ @pointerdown=${m=>this.#i(m,n)}
1014
+ ></span>`}#n(t,s){const a=this.dividers[s]??0,n=(()=>{switch(t.key){case"ArrowLeft":case"ArrowDown":return a-1;case"ArrowRight":case"ArrowUp":return a+1;case"Home":return 0;case"End":return se;default:return null}})();n!==null&&(t.preventDefault(),this.#l(Xs(this.dividers,s,n)))}#i(t,s){t.button===0&&(t.preventDefault(),t.currentTarget instanceof HTMLElement&&t.currentTarget.focus({preventScroll:!0}),this.drag={index:s,dividers:this.dividers},document.addEventListener("pointermove",this.#a),document.addEventListener("pointerup",this.#s),document.addEventListener("pointercancel",this.#o))}#a=t=>{const s=this.renderRoot.querySelector(".wb-track")?.getBoundingClientRect();if(!this.drag||!s||s.width===0)return;const a=(t.clientX-s.left)/s.width*se;this.drag={...this.drag,dividers:Xs(this.drag.dividers,this.drag.index,a)}};#s=()=>{const t=this.drag?.dividers;this.#r(),t&&this.#l(t)};#o=()=>this.#r();#r(){this.drag=null,document.removeEventListener("pointermove",this.#a),document.removeEventListener("pointerup",this.#s),document.removeEventListener("pointercancel",this.#o)}#l(t){t.some((s,a)=>s!==this.dividers[a])&&this.commit(t)}}const je=e=>String(Math.round(e*10)/10),po=()=>{customElements.get("dpk-internal-usm-weight-bar")||customElements.define("dpk-internal-usm-weight-bar",lo)},co=(e,t,s)=>{const a=e.at(-1)??null;if(t===null||s==="end")return a;const n=e.indexOf(t);return n<0?a:s==="after"?t:n===0?null:e.at(n-1)??null},Zs=(e,t,s,a,n)=>{const i=Pe(e,t.stepId,t.milestoneId).map(o=>o.id);return{type:"MOVE_STORY",target:{type:"story",id:s},payload:{activityId:t.activityId,stepId:t.stepId,milestoneId:t.milestoneId??null,after:Ot(i,s,a,n)}}},Js=(e,t,s,a,n,i)=>{const o=x(e,a);if(!o||o.activityId!==t)return null;const r=Jt(e,t,s).map(d=>d.id);return{type:"MOVE_STORY",target:{type:"story",id:a},payload:{activityId:t,stepId:o.stepId,milestoneId:s??null,after:Ot(r,a,n,i)}}},Qs=(e,t,s,a,n)=>{const i=Pe(e,a,n).filter(o=>o.id!==t);return{type:"MOVE_STORY",target:{type:"story",id:t},payload:{activityId:s,stepId:a,milestoneId:n??null,after:i.at(-1)?.id??null}}},uo=e=>{const t=e.stories.length,s=Ye(e);return e.milestones.map((a,n)=>{const i=e.stories.filter(r=>r.milestoneId===a.id),o=new Set(i.map(r=>r.stepId));return{id:a.id,ordinal:n+1,name:a.name,timeframe:a.timeframe?.trim()??"",description:a.description?.trim()??"",storyCount:i.length,share:t===0?0:i.length/t,coverage:{covered:s.filter(({step:r})=>o.has(r.id)).length,total:s.length},progress:Hs(e,i)}})},mo="__unassigned__",ea="__add-milestone__",Xe="__add-activity__",ta="__add-activity-step__",sa=(e,t)=>{const s=a=>t.stories.filter(n=>n.milestoneId===a).length;return[...t.milestones.map(({id:a,name:n,timeframe:i,questions:o})=>({id:a,name:n,timeframe:i?.trim()??"",storyCount:s(a),...o===void 0?{}:{questions:o}})),{id:void 0,name:e.unassigned,timeframe:"",storyCount:s(void 0)}]},Ze=e=>e.id??mo,aa=e=>[...e.map(t=>({id:Ze(t),draggable:t.id!==void 0})),{id:ea,draggable:!1}],ho=e=>[...e.activities.map(t=>({id:t.id,subColumns:t.steps.map(s=>({id:s.id}))})),{id:Xe,draggable:!1,subColumns:[{id:ta,draggable:!1}]}],bo=e=>[...e.activities.map(t=>({id:t.id})),{id:Xe,draggable:!1}],go=(e,t)=>l`
1015
+ <div class="empty">
1016
+ <h2>${e.emptyTitle}</h2>
1017
+ <p>${e.emptyBody}</p>
1018
+ <button class="dpk-btn dpk-btn--accent" type="button" @click=${()=>Ps(e,t)}>
1019
+ ${e.firstActivityButton}
1020
+ </button>
1021
+ </div>
1022
+ `,fo=e=>{const{m:t,context:s}=e,a=Ye(s.state);return a.length===0?go(t,s):na(s)==="activity"?vo(e,a):ko(e)},na=e=>e.navigation.view==="group"?"group":"activity",yo=(e,t)=>{const s=na(t);return l`<div class="dpk-segmented view-tabs" role="tablist" aria-label=${e.groupingLabel}>
1023
+ ${ia(t,"activity",s,e.activityGroup)}
1024
+ ${ia(t,"group",s,e.groupViewTab)}
1025
+ </div>`},ia=(e,t,s,a)=>l`<a role="tab" aria-selected=${t===s?"true":"false"} href=${e.hashFor({view:t})}
1026
+ >${a}</a
1027
+ >`,vo=(e,t)=>{const{m:s,context:a,handlers:n}=e,{state:i}=a,o=sa(s,i);return l`
1028
+ <dpk-matrix
1029
+ data-testid="usm-map"
1030
+ .rows=${aa(o)}
1031
+ .columns=${ho(i)}
1032
+ @dpk-matrix-reorder-row=${r=>n.reorderMilestone(r.detail)}
1033
+ @dpk-matrix-reorder-column=${r=>n.reorderActivity(r.detail)}
1034
+ @dpk-matrix-reorder-sub-column=${r=>n.reorderStep(r.detail)}
1035
+ >
1036
+ <div class="corner" slot=${Nt}><span class="dpk-label">${s.groupAxisHeader}</span></div>
1037
+ ${U(i.activities,r=>r.id,r=>ra(e,r.id))}
1038
+ ${da(s,a)} ${oa(s,Ja)}
1039
+ ${U(t,({activity:r,step:d})=>`${r.id}.${d.id}`,({activity:r,step:d})=>wo(e,r.id,d))}
1040
+ ${So()}
1041
+ ${U(o,r=>r.id,r=>pa(e,r))}
1042
+ ${U(o,r=>r.id,r=>l`${U(t,({activity:d,step:p})=>`${d.id}.${p.id}`,({activity:d,step:p})=>$o(e,Ze(r),{activityId:d.id,stepId:p.id,milestoneId:r.id}))}`)}
1043
+ ${la(s,a)}
1044
+ </dpk-matrix>
1045
+ `},ko=e=>{const{m:t,context:s,handlers:a}=e,{state:n}=s,i=sa(t,n);return l`
1046
+ <dpk-matrix
1047
+ data-testid="usm-map-group"
1048
+ .rows=${aa(i)}
1049
+ .columns=${bo(n)}
1050
+ @dpk-matrix-reorder-row=${o=>a.reorderMilestone(o.detail)}
1051
+ @dpk-matrix-reorder-column=${o=>a.reorderActivity(o.detail)}
1052
+ >
1053
+ ${oa(t,Nt)}
1054
+ ${U(n.activities,o=>o.id,o=>ra(e,o.id,!0))}
1055
+ ${da(t,s)}
1056
+ ${U(i,o=>o.id,o=>pa(e,o))}
1057
+ ${U(i,o=>o.id,o=>l`${U(n.activities,r=>r.id,r=>xo(e,Ze(o),r.id,o.id))}`)}
1058
+ ${la(t,s)}
1059
+ </dpk-matrix>
1060
+ `},oa=(e,t)=>l`<div class="corner" slot=${t}>
1061
+ <span class="dpk-label">${e.activityAxis}</span>
1062
+ <span class="dpk-label">${e.milestoneAxis}</span>
1063
+ </div>`,ra=(e,t,s=!1)=>{const{m:a,context:n}=e,{state:i}=n,o=i.activities.find(p=>p.id===t);if(!o)return l`<div class="act-head"></div>`;const r=i.stories.filter(p=>p.activityId===o.id),d=Hs(i,r);return l`
1064
+ <div
1065
+ class="act-head"
1066
+ data-activity=${o.id}
1067
+ data-column=${o.id}
1068
+ data-dpk-target=${I({type:"activity",id:o.id})}
1069
+ data-dpk-check="off"
1070
+ data-grill-questions=${Re(Le(o.questions))}
1071
+ slot=${Ct(o.id)}
1072
+ >
1073
+ <div class="act-title">
1074
+ <span class="act-name">
1075
+ <dpk-inline-edit
1076
+ draggable="false"
1077
+ .value=${o.name}
1078
+ .label=${a.activityNameLabel}
1079
+ @dpk-commit=${Q(p=>n.dispatch({type:"SET_ACTIVITY_NAME",target:{type:"activity",id:o.id},payload:{name:p}}))}
1080
+ ></dpk-inline-edit>
1081
+ <span class="act-actor" data-empty=${String(o.actor===void 0)}>
1082
+ <dpk-inline-edit
1083
+ draggable="false"
1084
+ truncate
1085
+ .value=${o.actor??""}
1086
+ .label=${a.activityActorLabel}
1087
+ .placeholder=${a.activityActorLabel}
1088
+ @dpk-commit=${Q(p=>n.dispatch({type:"SET_ACTIVITY_ACTOR",target:{type:"activity",id:o.id},payload:{actor:p}}))}
1089
+ ></dpk-inline-edit>
1090
+ </span>
1091
+ </span>
1092
+ <span class="dpk-count" data-size="sm">${r.length}</span>
1093
+ <button
1094
+ class="dpk-icon-btn"
1095
+ type="button"
1096
+ aria-label=${a.addStepAria}
1097
+ @click=${()=>_i(a,n,o.id)}
1098
+ >
1099
+ ${Ga()}
1100
+ </button>
1101
+ </div>
1102
+ ${Ys(d,a.progressAria(d.map(p=>`${p.name} ${p.count}`).join(", ")))}
1103
+ ${s&&o.steps.length>0?l`<ol class="act-steps">
1104
+ ${o.steps.map(p=>l`<li>${p.name}</li>`)}
1105
+ </ol>`:u}
1106
+ </div>
1107
+ `},wo=(e,t,s)=>{const{m:a,context:n}=e,i=ce(t,s.id);return l`
1108
+ <div
1109
+ class="col-head"
1110
+ data-step=${i}
1111
+ data-column=${t}
1112
+ data-column-step=${s.id}
1113
+ data-current=${String(n.navigation.step===s.id)}
1114
+ data-dpk-target=${I({type:"step",id:i})}
1115
+ data-dpk-check="off"
1116
+ data-grill-questions=${Re(Le(s.questions))}
1117
+ slot=${Bt(t,s.id)}
1118
+ >
1119
+ <h4>
1120
+ <dpk-inline-edit
1121
+ draggable="false"
1122
+ .value=${s.name}
1123
+ .label=${a.stepNameLabel}
1124
+ @dpk-commit=${Q(o=>n.dispatch({type:"SET_STEP_NAME",target:{type:"step",id:s.id},payload:{name:o}}))}
1125
+ @click=${o=>o.stopPropagation()}
1126
+ ></dpk-inline-edit>
1127
+ </h4>
1128
+ <span class="dpk-count" data-size="sm">${Qt(n.state,s.id)}</span>
1129
+ </div>
1130
+ `},da=(e,t)=>l`<div class="act-head" slot=${Ct(Xe)}>
1131
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Ps(e,t)}>
1132
+ ${e.newActivityButton}
1133
+ </button>
1134
+ </div>`,So=()=>l`<div class="corner" slot=${Bt(Xe,ta)}>
1135
+ <span class="dpk-label">—</span>
1136
+ </div>`,la=(e,t)=>l`<div class="row-lead" slot=${Ut(ea)}>
1137
+ <div class="row-head">
1138
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>zs(e,t)}>
1139
+ ${e.newMilestoneButton}
1140
+ </button>
1141
+ </div>
1142
+ </div>`,pa=(e,t)=>{const{m:s,context:a}=e,n=t.id,i=Ut(Ze(t));if(n===void 0)return l`<div class="row-lead" slot=${i}>
1143
+ <div class="row-head" data-unassigned="true" data-milestone=""><span>${t.name}</span></div>
1144
+ ${ca(s,t)}
1145
+ </div>`;const o=Eo(s,a,n,t.name);return l`
1146
+ <div class="row-lead" slot=${i}>
1147
+ <div
1148
+ class="row-head"
1149
+ data-milestone=${n}
1150
+ data-dpk-target=${I({type:"milestone",id:n})}
1151
+ data-dpk-check="off"
1152
+ data-grill-questions=${Re(Le(t.questions))}
1153
+ >
1154
+ ${o}
1155
+ </div>
1156
+ ${ca(s,t)}
1157
+ </div>
1158
+ `},ca=(e,t)=>l`<div class="row-meta">
1159
+ ${t.timeframe===""?u:l`<span class="row-timeframe">${t.timeframe}</span>`}
1160
+ <span class="row-count">${e.storyCount(t.storyCount)}</span>
1161
+ </div>`,Eo=(e,t,s,a)=>l`<dpk-inline-edit
1162
+ draggable="false"
1163
+ .value=${a}
1164
+ .label=${e.milestoneNameLabel}
1165
+ @dpk-commit=${Q(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:s},payload:{name:n}}))}
1166
+ ></dpk-inline-edit>`,$o=(e,t,s)=>{const{m:a,context:n,drag:i,handlers:o}=e,r=Ge(n.state,n.navigation),d=Pe(n.state,s.stepId,s.milestoneId).filter(y=>$s(r,y)),p=`cell:${s.stepId}:${s.milestoneId??""}`,m=i.target({key:p,accepts:"story",hovered:ma,onDrop:y=>o.dropOnCell(s,y)});return l`
1167
+ <div
1168
+ class="cell"
1169
+ data-step=${s.stepId}
1170
+ data-milestone=${s.milestoneId??""}
1171
+ data-column=${s.activityId}
1172
+ data-column-step=${s.stepId}
1173
+ data-drop=${String(i.isOver(p))}
1174
+ slot=${Yt(t,{columnId:s.activityId,subColumnId:s.stepId})}
1175
+ @dragenter=${m.dragenter}
1176
+ @dragover=${m.dragover}
1177
+ @dragleave=${m.dragleave}
1178
+ @drop=${m.drop}
1179
+ >
1180
+ <div class="card-list" data-testid=${`cell-${s.stepId}-${s.milestoneId??"unassigned"}`}>
1181
+ ${U(d,y=>y.id,y=>ua(e,y,""))}
1182
+ </div>
1183
+ <button
1184
+ class="dpk-add add-cell"
1185
+ type="button"
1186
+ title=${a.addStoryCellAria}
1187
+ @click=${()=>Fs(a,n,s.activityId,s.stepId,s.milestoneId)}
1188
+ >
1189
+ ${a.addCellButton}
1190
+ </button>
1191
+ </div>
1192
+ `},xo=(e,t,s,a)=>{const{m:n,context:i,drag:o,handlers:r}=e,{state:d}=i,p=Ge(d,i.navigation),m=Jt(d,s,a).filter(L=>$s(p,L)),y=d.activities.find(L=>L.id===s)?.steps??[],E=y[0],S=L=>y.find(c=>c.id===L)?.name??"",A=`group:${s}:${a??""}`,$=o.target({key:A,accepts:"story",hovered:ma,onDrop:L=>r.dropOnGroupCell(s,a,L)});return l`
1193
+ <div
1194
+ class="cell"
1195
+ data-activity=${s}
1196
+ data-milestone=${a??""}
1197
+ data-column=${s}
1198
+ data-drop=${String(o.isOver(A))}
1199
+ slot=${Yt(t,{columnId:s})}
1200
+ @dragenter=${$.dragenter}
1201
+ @dragover=${$.dragover}
1202
+ @dragleave=${$.dragleave}
1203
+ @drop=${$.drop}
1204
+ >
1205
+ <div class="card-list" data-testid=${`group-cell-${s}-${a??"unassigned"}`}>
1206
+ ${U(m,L=>L.id,L=>ua(e,L,S(L.stepId)))}
1207
+ </div>
1208
+ ${E?l`<button
1209
+ class="dpk-add add-cell"
1210
+ type="button"
1211
+ aria-label=${n.addStoryCellAria}
1212
+ @click=${()=>Fs(n,i,s,E.id,a)}
1213
+ >
1214
+ ${n.addCellButton}
1215
+ </button>`:u}
1216
+ </div>
1217
+ `},ua=(e,t,s)=>{const{context:a,drag:n,handlers:i}=e,o=he(a.state),r=n.source({type:"story",id:t.id}),d=vs(a.state,t.id);return l`<dpk-internal-usm-story-card
1218
+ data-story=${t.id}
1219
+ data-status=${t.statusId??""}
1220
+ data-relation=${_o(a.state,a.navigation.story,t)??u}
1221
+ data-highlight=${To(e.highlighted,t.id)??u}
1222
+ data-dpk-target=${I({type:"story",id:t.id})}
1223
+ data-grill-questions=${Re(Le(t.questions))}
1224
+ draggable="true"
1225
+ tabindex="0"
1226
+ role="button"
1227
+ aria-haspopup="dialog"
1228
+ aria-label=${t.name}
1229
+ style=${M(Gs(o,t)?.tone)}
1230
+ .story=${t}
1231
+ .map=${a.state}
1232
+ .stepName=${s}
1233
+ .statuses=${o}
1234
+ .labels=${ct(a.state,t)}
1235
+ .reviewCount=${a.commentCount({type:"story",id:t.id})}
1236
+ .estimate=${z(a.state,"estimates")?F(a.state,t.estimateId)??null:null}
1237
+ .assignee=${z(a.state,"assignees")?pt(a.state,t)??null:null}
1238
+ .blocks=${d.dependents.length}
1239
+ .waits=${d.openBlockers}
1240
+ @click=${()=>i.selectStory(t.id)}
1241
+ @keydown=${p=>{p.composedPath()[0]!==p.currentTarget||p.key!=="Enter"&&p.key!==" "||(p.preventDefault(),i.selectStory(t.id))}}
1242
+ ?focused=${a.navigation.story===t.id}
1243
+ ?dragging=${n.isDragging("story",t.id)}
1244
+ @dragstart=${r.dragstart}
1245
+ @dragend=${r.dragend}
1246
+ ></dpk-internal-usm-story-card>`},To=(e,t)=>{if(e!==null)return e.has(t)?"on":"dimmed"},_o=(e,t,s)=>{if(!(t===void 0||t===s.id))return s.blockedBy?.includes(t)?"dependent":e.stories.find(a=>a.id===t)?.blockedBy?.includes(s.id)?"blocker":void 0},ma=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},Io=(e,t)=>Mt((s,a)=>{const n=s.trim()===""?Number.NaN:Number(s);if(!Number.isFinite(n)||n<0){a.value=String(e);return}n!==e&&t(n)}),Ao=O(Ha),Mo=O(gn),Lo={width:720,height:240,inset:{top:16,right:20,bottom:26,left:40}},Do={width:340,height:150,inset:{top:12,right:14,bottom:24,left:32}},Ro=(e,t,s,a)=>{const{state:n,navigation:i}=t,o=Dn(n,i),r=ge(n);return l`
1247
+ <section class="bd-overview" data-testid="usm-burndown">
1248
+ <header class="bd-bar">
1249
+ ${o?Oo(e,t,o,a):u}
1250
+ ${No(e,t,r)}
1251
+ ${o?l`<span class="bd-record">
1252
+ <button
1253
+ class="dpk-btn dpk-btn--primary"
1254
+ type="button"
1255
+ data-role="record-snapshot"
1256
+ title=${e.recordSnapshotHint}
1257
+ @click=${()=>Di(t,new Date)}
1258
+ >
1259
+ ${e.recordSnapshotButton}
1260
+ </button>
1261
+ </span>`:u}
1262
+ </header>
1263
+ ${r==="stories"?u:Co(e,t,r)}
1264
+ ${o?Bo(e,t,o,r,s):l`<div class="empty">
1265
+ <h2>${e.burndownTab}</h2>
1266
+ <p>${e.noMilestonesForBurndown}</p>
1267
+ </div>`}
1268
+ <div class="bd-side">${Uo(e,t)}</div>
1269
+ </section>
1270
+ `},Oo=(e,t,s,a)=>{const{state:n}=t;return l`<label class="bd-control">
1271
+ <span>${e.burndownMilestoneLabel}</span>
1272
+ ${a.render({options:n.milestones.map(i=>({value:i.id,label:i.name})),value:s.id,onChange:i=>t.navigate({milestone:i}),ariaLabel:e.burndownMilestoneLabel,className:"bd-milestone-select"})}
1273
+ </label>
1274
+ <label class="bd-control" data-dpk-target=${I({type:"milestone",id:s.id})}>
1275
+ <span>${e.dueDateLabel}</span>
1276
+ <input
1277
+ class="dpk-input"
1278
+ type="date"
1279
+ data-role="due-date"
1280
+ .value=${s.dueDate??""}
1281
+ @change=${Mt(i=>{const o=i===""?null:i;o!==(s.dueDate??null)&&t.dispatch({type:"SET_MILESTONE_DUE_DATE",target:{type:"milestone",id:s.id},payload:{dueDate:o}})})}
1282
+ />
1283
+ </label>`},No=(e,t,s)=>l`<span class="bd-control">
1284
+ <span id="bd-measure-label">${e.measureLabel}</span>
1285
+ <span class="bd-measures" role="radiogroup" aria-labelledby="bd-measure-label">
1286
+ ${Ft.map(a=>l`<label class="bd-measure"
1287
+ ><input
1288
+ type="radio"
1289
+ name="bd-measure"
1290
+ value=${a}
1291
+ .checked=${a===s}
1292
+ @change=${()=>t.dispatch({type:"SET_MEASURE",target:{type:"page",id:"usm"},payload:{measure:a}})}
1293
+ />${e.measureName(a)}</label
1294
+ >`)}
1295
+ </span>
1296
+ </span>`,Co=(e,t,s)=>{const{state:a}=t,n=as(a),i=js(n),o=a.estimates.map(d=>`${d.name} ${d.points}`).join(" \xB7 "),r=We(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>
1297
+ <summary class="bd-settings-summary">
1298
+ <span class="bd-settings-chevron" aria-hidden="true"></span>
1299
+ <span class="bd-settings-title">${e.measureSettingsLabel}</span>
1300
+ <span class="bd-settings-gist">
1301
+ <span>${e.estimatesLabel}: ${o===""?"\u2014":`${o} pt`}</span>
1302
+ ${s==="weighted"?l`<span>${e.statusWeightLabel}: ${i.length===0?"\u2014":r}</span>`:u}
1303
+ </span>
1304
+ </summary>
1305
+ <div class="bd-settings-body">
1306
+ ${Yo(e,t)} ${s==="weighted"?zo(e,t):u}
1307
+ </div>
1308
+ </details>`},Bo=(e,t,s,a,n)=>{const{state:i}=t,o=On(i,s.id,n.getTime()),r=a==="weighted",d=i.stories.filter(p=>p.milestoneId===s.id&&p.estimateId===void 0).length;return l`
1309
+ ${a!=="stories"&&d>0?l`<p class="bd-warning" role="note" data-testid="usm-unestimated-warning">
1310
+ ${Mo()}<span>${e.unestimatedNote(d)}</span>
1311
+ </p>`:u}
1312
+ <figure class="bd-chart bd-chart--combined">
1313
+ <figcaption>
1314
+ <span class="bd-chart-title">${e.combinedChartTitle(r)}</span>
1315
+ <span class="bd-about">
1316
+ <button class="bd-about-btn" type="button" aria-label=${e.chartAbout} aria-describedby="bd-about-tip">
1317
+ ${Ao()}
1318
+ </button>
1319
+ <span class="bd-about-tip" id="bd-about-tip" role="tooltip">${e.combinedChartHint(a)}</span>
1320
+ </span>
1321
+ <span class="bd-chart-latest">${e.chartLatest(ba(o.combined))}</span>
1322
+ </figcaption>
1323
+ ${ha({chart:"combined",title:e.combinedChartTitle(r),points:o.combined,due:o.due,now:n.getTime(),size:Lo,tone:"accent"})}
1324
+ </figure>
1325
+ ${o.byStatus.length===0?u:l`<section class="bd-multiples" aria-label=${e.statusChartsLabel}>
1326
+ <h3>${e.statusChartsLabel}</h3>
1327
+ <div class="bd-grid">
1328
+ ${o.byStatus.map(({status:p,points:m})=>l`<figure class="bd-chart" data-status=${p.id}>
1329
+ <figcaption>
1330
+ <span class="bd-chart-title">${e.statusChartTitle(p.name)}</span>
1331
+ <span class="bd-chart-latest">${e.chartLatest(ba(m))}</span>
1332
+ </figcaption>
1333
+ ${ha({chart:"status",statusId:p.id,title:e.statusChartTitle(p.name),points:m,due:o.due,now:n.getTime(),size:Do,tone:p.tone})}
1334
+ </figure>`)}
1335
+ </div>
1336
+ </section>`}
1337
+ `},ha=e=>l`<dpk-internal-usm-burndown-chart
1338
+ data-chart=${e.chart}
1339
+ data-status=${e.statusId??u}
1340
+ .points=${e.points}
1341
+ .due=${e.due}
1342
+ .now=${e.now}
1343
+ .size=${e.size}
1344
+ .tone=${e.tone}
1345
+ .label=${e.title}
1346
+ ></dpk-internal-usm-burndown-chart>`,Uo=(e,t)=>{const s=[...t.state.snapshots].reverse();return l`<section class="bd-panel">
1347
+ <h3>${e.snapshotsLabel}<span class="bd-count">${s.length}</span></h3>
1348
+ ${s.length===0?l`<p class="bd-empty">${e.noSnapshots} ${e.chartNeedsSnapshot}</p>`:l`<ol class="bd-snapshots">
1349
+ ${U(s,a=>a.id,a=>{const n={type:"snapshot",id:a.id},i=ue(a.at),o=a.tally.reduce((r,d)=>r+d.stories,0);return l`<li data-snapshot=${a.id} data-dpk-target=${I(n)}>
1350
+ <span class="bd-snapshot-at">${i}</span>
1351
+ <span class="bd-snapshot-sum">${e.storyCount(o)}</span>
1352
+ <button
1353
+ class="dpk-icon-btn"
1354
+ type="button"
1355
+ data-role="delete-snapshot"
1356
+ aria-label=${e.deleteSnapshotAria(i)}
1357
+ @click=${()=>t.dispatch({type:"DELETE_SNAPSHOT",target:n,payload:{}})}
1358
+ >
1359
+ ${tt()}
1360
+ </button>
1361
+ </li>`})}
1362
+ </ol>`}
1363
+ </section>`},Yo=(e,t)=>{const{estimates:s}=t.state;return l`<section class="bd-panel" data-testid="usm-estimates">
1364
+ <h3>${e.estimatesLabel}<span class="bd-count">${s.length}</span></h3>
1365
+ <p class="bd-empty">${e.estimatesHint}</p>
1366
+ ${s.length===0?u:l`<ol class="bd-estimates">
1367
+ ${U(s,a=>a.id,(a,n)=>Po(e,t,a,n))}
1368
+ </ol>`}
1369
+ <div>
1370
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>Li(e,t)}>
1371
+ ${e.newEstimateButton}
1372
+ </button>
1373
+ </div>
1374
+ </section>`},Po=(e,t,s,a)=>{const{estimates:n}=t.state,i={type:"estimate",id:s.id};return l`<li data-estimate=${s.id} data-dpk-target=${I(i)}>
1375
+ <span class="bd-estimate-name">
1376
+ <dpk-inline-edit
1377
+ .value=${s.name}
1378
+ .label=${e.estimateNameLabel}
1379
+ @dpk-commit=${Q(o=>t.dispatch({type:"SET_ESTIMATE_NAME",target:i,payload:{name:o}}))}
1380
+ ></dpk-inline-edit>
1381
+ </span>
1382
+ <label class="bd-estimate-points">
1383
+ <input
1384
+ class="dpk-input"
1385
+ type="number"
1386
+ min="0"
1387
+ step="any"
1388
+ inputmode="decimal"
1389
+ data-role="points"
1390
+ aria-label=${e.estimatePointsLabel}
1391
+ .value=${String(s.points)}
1392
+ @change=${Io(s.points,o=>t.dispatch({type:"SET_ESTIMATE_POINTS",target:i,payload:{points:o}}))}
1393
+ />
1394
+ <span>pt</span>
1395
+ </label>
1396
+ ${qe(e,{ids:n.map(o=>o.id),row:{previousId:n[a-1]?.id??null,nextId:n[a+1]?.id??null},deleteLabel:e.deleteEstimateAria,reorder:o=>t.dispatch({type:"REORDER_ESTIMATE",target:i,payload:{after:o}}),remove:()=>t.dispatch({type:"DELETE_ESTIMATE",target:i,payload:{}})})}
1397
+ </li>`},zo=(e,t)=>{const{state:s}=t,a=as(s),n=js(a);return l`<section class="bd-panel" data-testid="usm-weights">
1398
+ <h3>${e.statusWeightLabel}</h3>
1399
+ <p class="bd-empty">${e.statusWeightHint}</p>
1400
+ ${n.length>0?l`<dpk-internal-usm-weight-bar
1401
+ .statuses=${he(s).slice(0,a.length)}
1402
+ .dividers=${n}
1403
+ .commit=${i=>{for(const{statusId:o,weight:r}of oo(a,i))t.dispatch({type:"SET_STATUS_WEIGHT",target:{type:"status",id:o},payload:{weight:r}})}}
1404
+ ></dpk-internal-usm-weight-bar>`:l`<p class="bd-empty">${e.weightsNeedStatuses}</p>`}
1405
+ </section>`},ba=e=>e.at(-1)?.value??0,Fo=H`
1406
+ .bd-overview {
1407
+ display: grid;
1408
+ gap: 18px;
1409
+ max-width: 1040px;
1410
+ padding: 28px 0 40px;
1411
+ }
1412
+ .bd-bar {
1413
+ display: flex;
1414
+ flex-wrap: wrap;
1415
+ align-items: flex-end;
1416
+ gap: 12px 16px;
1417
+ }
1418
+ .bd-control {
1419
+ display: grid;
1420
+ gap: 4px;
1421
+ min-width: 0;
1422
+ }
1423
+ .bd-control > span:first-child {
1424
+ color: var(--dpk-ink-faint);
1425
+ font-size: 11px;
1426
+ font-weight: 600;
1427
+ }
1428
+ .bd-control .dpk-rich-select {
1429
+ min-width: 160px;
1430
+ }
1431
+ .bd-control .dpk-input {
1432
+ width: 160px;
1433
+ font-family: var(--dpk-mono);
1434
+ font-variant-numeric: tabular-nums;
1435
+ }
1436
+ /* One row at any width: on a narrow screen each option wraps its own name instead of the row wrapping. */
1437
+ .bd-measures {
1438
+ display: inline-flex;
1439
+ max-width: 100%;
1440
+ padding: 2px;
1441
+ border: 1px solid var(--dpk-rule-strong);
1442
+ border-radius: var(--dpk-radius-sm);
1443
+ background: var(--dpk-paper-sunken);
1444
+ }
1445
+ .bd-measure {
1446
+ position: relative;
1447
+ display: grid;
1448
+ flex: 1 1 auto;
1449
+ place-items: center;
1450
+ min-width: 0;
1451
+ padding: 4px 12px;
1452
+ text-align: center;
1453
+ border-radius: calc(var(--dpk-radius-sm) - 2px);
1454
+ color: var(--dpk-ink-soft);
1455
+ font-size: 12.5px;
1456
+ font-weight: 600;
1457
+ cursor: pointer;
1458
+ }
1459
+ /* The radio stays in the page for the keyboard and the reader; the label is what shows. */
1460
+ .bd-measure input {
1461
+ position: absolute;
1462
+ inset: 0;
1463
+ margin: 0;
1464
+ opacity: 0;
1465
+ cursor: pointer;
1466
+ }
1467
+ .bd-measure:has(input:checked) {
1468
+ background: var(--dpk-paper-raised);
1469
+ color: var(--dpk-ink);
1470
+ box-shadow: var(--dpk-shadow-xs);
1471
+ }
1472
+ .bd-measure:has(input:focus-visible) {
1473
+ box-shadow: var(--dpk-focus);
1474
+ }
1475
+ .bd-settings {
1476
+ display: grid;
1477
+ gap: 10px;
1478
+ }
1479
+ .bd-settings-summary {
1480
+ display: flex;
1481
+ flex-wrap: wrap;
1482
+ align-items: center;
1483
+ gap: 4px 10px;
1484
+ justify-self: start;
1485
+ padding: 4px 10px 4px 6px;
1486
+ border-radius: var(--dpk-radius-sm);
1487
+ color: var(--dpk-ink-soft);
1488
+ font-size: 12px;
1489
+ list-style: none;
1490
+ cursor: pointer;
1491
+ user-select: none;
1492
+ }
1493
+ .bd-settings-summary::-webkit-details-marker {
1494
+ display: none;
1495
+ }
1496
+ .bd-settings-summary:hover {
1497
+ background: var(--dpk-paper-sunken);
1498
+ color: var(--dpk-ink);
1499
+ }
1500
+ .bd-settings-summary:focus-visible {
1501
+ outline: none;
1502
+ box-shadow: var(--dpk-focus);
1503
+ }
1504
+ .bd-settings-chevron {
1505
+ width: 6px;
1506
+ height: 6px;
1507
+ margin: 0 3px;
1508
+ border-right: 1.5px solid currentColor;
1509
+ border-bottom: 1.5px solid currentColor;
1510
+ transform: rotate(-45deg);
1511
+ transition: transform 160ms var(--dpk-ease);
1512
+ }
1513
+ .bd-settings[open] .bd-settings-chevron {
1514
+ transform: rotate(45deg);
1515
+ }
1516
+ .bd-settings-title {
1517
+ font-weight: 650;
1518
+ }
1519
+ .bd-settings-gist {
1520
+ display: inline-flex;
1521
+ flex-wrap: wrap;
1522
+ gap: 2px 14px;
1523
+ color: var(--dpk-ink-faint);
1524
+ font-family: var(--dpk-mono);
1525
+ font-size: 11.5px;
1526
+ font-variant-numeric: tabular-nums;
1527
+ }
1528
+ /* Side by side while both fit; the scale alone takes the row. */
1529
+ .bd-settings-body {
1530
+ display: grid;
1531
+ grid-template-columns: repeat(auto-fit, minmax(max(300px, calc((100% - 12px) / 2)), 1fr));
1532
+ gap: 12px;
1533
+ align-items: start;
1534
+ }
1535
+ .bd-record {
1536
+ margin-left: auto;
1537
+ }
1538
+ .bd-warning {
1539
+ display: flex;
1540
+ align-items: flex-start;
1541
+ gap: 8px;
1542
+ margin: 0;
1543
+ padding: 8px 12px;
1544
+ border: 1px solid color-mix(in oklab, var(--dpk-amber) 40%, var(--dpk-rule));
1545
+ border-radius: var(--dpk-radius-sm);
1546
+ background: color-mix(in oklab, var(--dpk-amber) 10%, var(--dpk-paper-raised));
1547
+ color: var(--dpk-ink);
1548
+ font-size: 12.5px;
1549
+ line-height: 1.5;
1550
+ }
1551
+ .bd-warning svg {
1552
+ flex: none;
1553
+ width: 15px;
1554
+ height: 15px;
1555
+ margin-top: 2px;
1556
+ color: var(--dpk-amber);
1557
+ }
1558
+ .bd-empty {
1559
+ margin: 0;
1560
+ color: var(--dpk-ink-faint);
1561
+ font-size: 12px;
1562
+ line-height: 1.5;
1563
+ }
1564
+ .bd-chart {
1565
+ display: grid;
1566
+ gap: 8px;
1567
+ margin: 0;
1568
+ padding: 14px 16px 10px;
1569
+ border: 1px solid var(--dpk-rule);
1570
+ border-radius: var(--dpk-radius-lg);
1571
+ background: var(--dpk-paper-raised);
1572
+ box-shadow: var(--dpk-shadow-xs);
1573
+ }
1574
+ .bd-chart figcaption {
1575
+ display: flex;
1576
+ flex-wrap: wrap;
1577
+ align-items: baseline;
1578
+ gap: 4px 12px;
1579
+ }
1580
+ .bd-chart-title {
1581
+ font-size: 13.5px;
1582
+ font-weight: 650;
1583
+ }
1584
+ .bd-chart-latest {
1585
+ margin-left: auto;
1586
+ color: var(--dpk-ink-soft);
1587
+ font-family: var(--dpk-mono);
1588
+ font-size: 12px;
1589
+ font-variant-numeric: tabular-nums;
1590
+ }
1591
+ .bd-about {
1592
+ position: relative;
1593
+ display: inline-flex;
1594
+ align-self: center;
1595
+ }
1596
+ .bd-about-btn {
1597
+ display: inline-grid;
1598
+ place-items: center;
1599
+ width: 20px;
1600
+ height: 20px;
1601
+ padding: 0;
1602
+ border: 0;
1603
+ border-radius: 50%;
1604
+ background: none;
1605
+ color: var(--dpk-ink-faint);
1606
+ cursor: help;
1607
+ }
1608
+ .bd-about-btn:hover,
1609
+ .bd-about-btn:focus-visible {
1610
+ outline: none;
1611
+ color: var(--dpk-ink);
1612
+ }
1613
+ .bd-about-btn:focus-visible {
1614
+ box-shadow: var(--dpk-focus);
1615
+ }
1616
+ .bd-about-btn svg {
1617
+ width: 15px;
1618
+ height: 15px;
1619
+ }
1620
+ .bd-about-tip {
1621
+ position: absolute;
1622
+ top: calc(100% + 6px);
1623
+ left: -8px;
1624
+ z-index: 2;
1625
+ width: max-content;
1626
+ max-width: 360px;
1627
+ padding: 8px 10px;
1628
+ border: 1px solid var(--dpk-rule-strong);
1629
+ border-radius: var(--dpk-radius-sm);
1630
+ background: var(--dpk-paper-raised);
1631
+ box-shadow: var(--dpk-shadow-sm);
1632
+ color: var(--dpk-ink-soft);
1633
+ font-size: 12px;
1634
+ font-weight: 400;
1635
+ line-height: 1.5;
1636
+ visibility: hidden;
1637
+ opacity: 0;
1638
+ transition: opacity 120ms var(--dpk-ease);
1639
+ }
1640
+ .bd-about:hover .bd-about-tip,
1641
+ .bd-about-btn:focus-visible + .bd-about-tip {
1642
+ visibility: visible;
1643
+ opacity: 1;
1644
+ }
1645
+ .bd-multiples {
1646
+ display: grid;
1647
+ gap: 10px;
1648
+ }
1649
+ .bd-multiples h3,
1650
+ .bd-panel h3 {
1651
+ display: flex;
1652
+ align-items: center;
1653
+ gap: 8px;
1654
+ margin: 0;
1655
+ color: var(--dpk-ink-soft);
1656
+ font-size: 12px;
1657
+ font-weight: 650;
1658
+ letter-spacing: 0.02em;
1659
+ }
1660
+ .bd-grid {
1661
+ display: grid;
1662
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
1663
+ gap: 12px;
1664
+ }
1665
+ .bd-side {
1666
+ display: grid;
1667
+ gap: 12px;
1668
+ align-items: start;
1669
+ }
1670
+ .bd-panel {
1671
+ display: grid;
1672
+ gap: 10px;
1673
+ padding: 14px 16px;
1674
+ border: 1px solid var(--dpk-rule);
1675
+ border-radius: var(--dpk-radius-lg);
1676
+ background: var(--dpk-paper-raised);
1677
+ box-shadow: var(--dpk-shadow-xs);
1678
+ }
1679
+ .bd-count {
1680
+ color: var(--dpk-ink-faint);
1681
+ font-family: var(--dpk-mono);
1682
+ font-weight: 500;
1683
+ }
1684
+ .bd-snapshots,
1685
+ .bd-estimates {
1686
+ display: grid;
1687
+ margin: 0;
1688
+ padding: 0;
1689
+ list-style: none;
1690
+ }
1691
+ .bd-snapshots li,
1692
+ .bd-estimates li {
1693
+ display: grid;
1694
+ align-items: center;
1695
+ gap: 10px;
1696
+ min-height: 34px;
1697
+ }
1698
+ .bd-snapshots li {
1699
+ grid-template-columns: minmax(0, 1fr) auto 26px;
1700
+ }
1701
+ .bd-estimates li {
1702
+ grid-template-columns: minmax(0, 1fr) 96px auto;
1703
+ }
1704
+ .bd-snapshots li + li,
1705
+ .bd-estimates li + li {
1706
+ border-top: 1px solid var(--dpk-rule);
1707
+ }
1708
+ .bd-snapshot-at,
1709
+ .bd-snapshot-sum {
1710
+ font-family: var(--dpk-mono);
1711
+ font-size: 12px;
1712
+ font-variant-numeric: tabular-nums;
1713
+ }
1714
+ .bd-snapshot-sum {
1715
+ color: var(--dpk-ink-faint);
1716
+ }
1717
+ .bd-snapshots .dpk-icon-btn {
1718
+ width: 26px;
1719
+ height: 26px;
1720
+ }
1721
+ .bd-estimate-name {
1722
+ min-width: 0;
1723
+ font-family: var(--dpk-mono);
1724
+ font-size: 13px;
1725
+ font-weight: 650;
1726
+ }
1727
+ .bd-estimate-points {
1728
+ display: inline-flex;
1729
+ align-items: center;
1730
+ gap: 5px;
1731
+ color: var(--dpk-ink-faint);
1732
+ font-size: 11px;
1733
+ }
1734
+ .bd-estimate-points .dpk-input {
1735
+ min-height: 28px;
1736
+ padding: 3px 8px;
1737
+ font-family: var(--dpk-mono);
1738
+ font-size: 12px;
1739
+ font-variant-numeric: tabular-nums;
1740
+ }
1741
+ @media (prefers-reduced-motion: reduce) {
1742
+ .bd-settings-chevron {
1743
+ transition: none;
1744
+ }
1745
+ }
1746
+ @media (max-width: 640px) {
1747
+ .bd-record {
1748
+ margin-left: 0;
1749
+ }
1750
+ .bd-control .dpk-rich-select,
1751
+ .bd-control .dpk-input {
1752
+ width: 100%;
1753
+ min-width: 0;
1754
+ }
1755
+ }
1756
+ `,Vo=/[ァ-ヶ]/g,ga=e=>e.normalize("NFKC").toLowerCase().replace(Vo,t=>String.fromCharCode(t.charCodeAt(0)-96)),Go=(e,t)=>{const s=ga(t).split(/\s+/).filter(Boolean),a=ga(e);return s.every(n=>a.includes(n))},fa=(e,t,s,a)=>(s==="blocker"?qn(e,t):Wn(e,t)).flatMap(i=>{const o=N(e,`${i.activityId}.${i.stepId}`),r=o?[o.activity.name,o.step.name]:[];return Go([de(i),i.name,...r].join(" "),a)?[{story:i,place:r}]:[]}),ya=(e,t,s,a,n,i)=>{const{state:o}=t;if(fa(o,s,a,"").length===0)return u;const r=n.search?.side===a?n.search:null,d=r?fa(o,s,a,r.query):[],p=Math.max(0,Math.min(r?.active??0,d.length-1)),m=r?d[p]:void 0,y=a==="blocker"?e.addBlockerPlaceholder:e.addDependentPlaceholder,E=`dep-${a}-choices`,S=c=>`dep-${a}-${c.story.id}`,A=c=>{r||!(c.currentTarget instanceof HTMLInputElement)||n.set({side:a,query:c.currentTarget.value,active:0})},$=c=>{i(c.story.id),n.set(null)},L=c=>{if(!c.isComposing)switch(va(c)){case"ArrowDown":case"ArrowUp":{if(c.preventDefault(),!r){A(c);return}if(d.length===0)return;const T=va(c)==="ArrowDown"?1:-1;n.set({...r,active:(p+T+d.length)%d.length});return}case"Enter":if(!m)return;c.preventDefault(),$(m);return;case"Escape":if(!r)return;c.preventDefault(),n.set(null);return}};return l`<div class="sp-dep-picker">
1757
+ <input
1758
+ class="dpk-input sp-dep-search"
1759
+ type="text"
1760
+ role="combobox"
1761
+ data-role=${`add-${a}`}
1762
+ aria-label=${y}
1763
+ placeholder=${y}
1764
+ autocomplete="off"
1765
+ spellcheck="false"
1766
+ aria-autocomplete="list"
1767
+ aria-expanded=${String(d.length>0)}
1768
+ aria-controls=${E}
1769
+ aria-activedescendant=${m?S(m):u}
1770
+ .value=${r?.query??""}
1771
+ @focus=${A}
1772
+ @click=${A}
1773
+ @input=${c=>{c.currentTarget instanceof HTMLInputElement&&n.set({side:a,query:c.currentTarget.value,active:0})}}
1774
+ @keydown=${L}
1775
+ @blur=${()=>{r&&n.set(null)}}
1776
+ />
1777
+ ${r?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}>
1778
+ ${d.map(c=>Ho(o,c,S(c),c===m,$))}
1779
+ </ul>`:u}
1780
+ </div>`},va=e=>!e.ctrlKey||e.altKey||e.metaKey||e.shiftKey?e.key:e.key==="n"?"ArrowDown":e.key==="p"?"ArrowUp":e.key,Ho=(e,t,s,a,n)=>{const i=he(e).find(o=>o.id===t.story.statusId);return l`<li
1781
+ id=${s}
1782
+ role="option"
1783
+ data-story=${t.story.id}
1784
+ aria-selected=${String(a)}
1785
+ @pointerdown=${o=>o.preventDefault()}
1786
+ @click=${()=>n(t)}
1787
+ >
1788
+ <span class="sp-dep-choice-name" style=${M(i?.tone)}>
1789
+ ${i?re(i):u}<span>${t.story.name}</span>
1790
+ </span>
1791
+ ${t.place.length===0?u:l`<span class="sp-dep-choice-place">${t.place.map(o=>l`<span>${o}</span>`)}</span>`}
1792
+ </li>`},Ko=H`
1793
+ .sp-dep-picker {
1794
+ display: grid;
1795
+ gap: 4px;
1796
+ }
1797
+ /* The choices push the panel's content down rather than float: the panel
1798
+ scrolls, and a list hanging out of it would be cut. */
1799
+ .sp-dep-choices {
1800
+ display: grid;
1801
+ gap: 1px;
1802
+ max-height: 240px;
1803
+ margin: 0;
1804
+ padding: 4px;
1805
+ overflow-y: auto;
1806
+ overscroll-behavior: contain;
1807
+ border: 1px solid var(--dpk-rule-strong);
1808
+ border-radius: var(--dpk-radius-sm);
1809
+ background: var(--dpk-paper-raised);
1810
+ box-shadow: var(--dpk-shadow-xs);
1811
+ list-style: none;
1812
+ }
1813
+ .sp-dep-choices [role='option'] {
1814
+ display: grid;
1815
+ gap: 1px;
1816
+ padding: 5px 8px;
1817
+ border-radius: var(--dpk-radius-sm);
1818
+ cursor: pointer;
1819
+ }
1820
+ .sp-dep-choices [role='option']:hover,
1821
+ .sp-dep-choices [role='option'][aria-selected='true'] {
1822
+ background: var(--dpk-paper-sunken);
1823
+ }
1824
+ .sp-dep-choice-name {
1825
+ display: flex;
1826
+ align-items: center;
1827
+ gap: 8px;
1828
+ min-width: 0;
1829
+ color: var(--dpk-ink);
1830
+ font-size: 12.5px;
1831
+ font-weight: 600;
1832
+ }
1833
+ .sp-dep-choice-name > span,
1834
+ .sp-dep-choice-place {
1835
+ overflow: hidden;
1836
+ text-overflow: ellipsis;
1837
+ white-space: nowrap;
1838
+ }
1839
+ .sp-dep-choice-place {
1840
+ padding-left: 22px;
1841
+ color: var(--dpk-ink-faint);
1842
+ font-size: 11px;
1843
+ }
1844
+ .sp-dep-choice-place span + span::before {
1845
+ content: ' / ';
1846
+ }
1847
+ .sp-dep-none {
1848
+ margin: 0;
1849
+ padding: 6px 2px;
1850
+ color: var(--dpk-ink-faint);
1851
+ font-size: 12px;
1852
+ }
1853
+ `,qo=O(hn),Wo=(e,t)=>{const s=Ve(t.navigation)==="critical-path",a=s?ks(t.state).ids.size:null;return l`<button
1854
+ class="dpk-btn dpk-btn--ghost highlight-toggle"
1855
+ type="button"
1856
+ data-highlight-toggle="critical-path"
1857
+ aria-pressed=${String(s)}
1858
+ title=${e.criticalPathHint}
1859
+ @click=${()=>t.navigate({highlight:s?null:"critical-path"})}
1860
+ >
1861
+ ${qo()}<span>${e.criticalPathButton}</span>
1862
+ ${a===null?u:l`<span class="highlight-count">${e.criticalPathCount(a)}</span>`}
1863
+ </button>`},jo=H`
1864
+ .highlight-toggle {
1865
+ gap: 6px;
1866
+ margin-left: auto;
1867
+ }
1868
+ .highlight-toggle svg {
1869
+ width: 14px;
1870
+ height: 14px;
1871
+ }
1872
+ .highlight-toggle[aria-pressed='true'] {
1873
+ border-color: color-mix(in oklab, var(--dpk-accent) 55%, var(--dpk-rule-strong));
1874
+ background: color-mix(in oklab, var(--dpk-accent) 12%, var(--dpk-paper-raised));
1875
+ color: var(--dpk-ink);
1876
+ }
1877
+ .highlight-toggle[aria-pressed='true'] svg {
1878
+ color: var(--dpk-accent);
1879
+ }
1880
+ .highlight-count {
1881
+ color: var(--dpk-ink-soft);
1882
+ font-family: var(--dpk-mono);
1883
+ font-size: 10.5px;
1884
+ font-variant-numeric: tabular-nums;
1885
+ }
1886
+ `,Xo=(e,t,s)=>{const{state:a}=t,n=xe.filter(r=>fe(a,r).length>0);if(n.length===0)return u;const i=Ge(a,t.navigation),o=Object.fromEntries(xe.map(r=>[r,null]));return l`<div class="map-filter" role="group" aria-label=${e.filterLabel} data-testid="usm-map-filter">
1887
+ ${n.map(r=>Jo(e,t,i,r,s))} ${Zo(e,t)}
1888
+ ${ei(i)?l`<a class="filter-clear" href=${t.hashFor(o)}>${e.clearFilter}</a>`:u}
1889
+ </div>`},Zo=(e,t)=>{const{state:s}=t,a=ts(s);if(!a||s.statuses.length<2)return u;const n=Ss(s,t.navigation).size===0,i=s.stories.filter(o=>$e(s,o)).length;return l`<label class="show-finished">
1890
+ <input
1891
+ type="checkbox"
1892
+ data-show-finished
1893
+ .checked=${n}
1894
+ @change=${o=>{const r=o.currentTarget instanceof HTMLInputElement&&o.currentTarget.checked;t.navigate({[oe.key]:r?oe.value:null})}}
1895
+ />
1896
+ <span>${e.showFinished(a.name)}</span>
1897
+ <span class="show-finished-count">${i}</span>
1898
+ </label>`},Jo=(e,t,s,a,n)=>{const i=s[a],o=tr(e,t.state,s.hiddenStatusIds,a),r=o.filter(p=>i.has(p.id)),d=n.openFor===a;return l`<span class="filter-field">
1899
+ <button
1900
+ class="dpk-filter"
1901
+ type="button"
1902
+ data-filter-trigger=${a}
1903
+ data-active=${String(r.length>0)}
1904
+ aria-haspopup="menu"
1905
+ aria-expanded=${String(d)}
1906
+ @click=${()=>n.toggle(a)}
1907
+ >
1908
+ <span class="filter-key">${e.filterKeyLabel(a)}</span>
1909
+ <span class="filter-value">${Qo(e,r)}</span>
1910
+ </button>
1911
+ ${d?er(e,t,a,i,o,n):u}
1912
+ </span>`},Qo=(e,t)=>{const[s]=t;return s?t.length===1?s.name:`${s.name} +${t.length-1}`:e.filterAll},er=(e,t,s,a,n,i)=>l`<div
1913
+ id="filter-menu"
1914
+ class="comment-pop filter-menu"
1915
+ popover="manual"
1916
+ role="menu"
1917
+ aria-label=${e.filterKeyLabel(s)}
1918
+ data-filter=${s}
1919
+ @keydown=${o=>{o.key==="Escape"&&(o.preventDefault(),i.close())}}
1920
+ >
1921
+ <a
1922
+ class="filter-option"
1923
+ role="menuitemcheckbox"
1924
+ data-option=""
1925
+ aria-checked=${String(a.size===0)}
1926
+ href=${t.hashFor({[s]:null})}
1927
+ >
1928
+ <span class="filter-check">${a.size===0?De():u}</span>
1929
+ <span class="filter-name">${e.filterAll}</span>
1930
+ </a>
1931
+ ${n.map(o=>{const r=a.has(o.id);return l`<a
1932
+ class="filter-option"
1933
+ role="menuitemcheckbox"
1934
+ data-option=${o.id}
1935
+ data-none=${o.id===ie?"true":u}
1936
+ aria-checked=${String(r)}
1937
+ style=${o.style}
1938
+ href=${t.hashFor({[s]:Es(t.state,s,Qn(a,o.id))})}
1939
+ >
1940
+ <span class="filter-check">${r?De():u}</span>
1941
+ ${o.mark}
1942
+ <span class="filter-name" title=${o.name}>${o.name}</span>
1943
+ <span class="filter-count">${o.count}</span>
1944
+ </a>`})}
1945
+ </div>`,tr=(e,t,s,a)=>{const n=i=>t.stories.filter(o=>o.statusId===void 0||!s.has(o.statusId)).filter(i).length;switch(a){case"status":return he(t).filter(i=>!s.has(i.id)).map(i=>({id:i.id,name:i.name,count:n(o=>o.statusId===i.id),mark:re(i),style:M(i.tone)}));case"label":return fe(t,a).map(i=>{const o=t.labels.find(r=>r.id===i);return{id:i,name:o?.name??e.noLabel,count:n(r=>o?(r.labelIds??[]).includes(i):(r.labelIds??[]).length===0),mark:l`<span class="filter-dot"></span>`,style:M(o?.tone)}});case"estimate":return fe(t,a).map(i=>{const o=F(t,i);return{id:i,name:o?.name??e.unestimatedFilter,count:n(r=>(r.estimateId??ie)===i),mark:o?l`<span class="filter-points">${o.points}pt</span>`:u,style:""}});case"assignee":return fe(t,a).map(i=>{const o=K(t,i);return{id:i,name:o?.name??e.noAssigneeFilter,count:n(r=>(r.assigneeId??ie)===i),mark:l`<span class="filter-dot"></span>`,style:M(o?.tone)}})}},sr=H`
1946
+ .show-finished {
1947
+ display: inline-flex;
1948
+ align-items: center;
1949
+ gap: 6px;
1950
+ padding: 0 4px;
1951
+ color: var(--dpk-ink-soft);
1952
+ font-size: 12px;
1953
+ font-weight: 600;
1954
+ cursor: pointer;
1955
+ user-select: none;
1956
+ }
1957
+ .show-finished input {
1958
+ margin: 0;
1959
+ accent-color: var(--dpk-blue);
1960
+ }
1961
+ .show-finished-count {
1962
+ color: var(--dpk-ink-faint);
1963
+ font-family: var(--dpk-mono);
1964
+ font-size: 10.5px;
1965
+ font-variant-numeric: tabular-nums;
1966
+ }
1967
+ .map-filter {
1968
+ display: flex;
1969
+ flex-wrap: wrap;
1970
+ align-items: center;
1971
+ gap: 8px;
1972
+ min-width: 0;
1973
+ }
1974
+ .filter-field {
1975
+ min-width: 0;
1976
+ }
1977
+ .filter-clear {
1978
+ margin-left: 2px;
1979
+ color: var(--dpk-blue);
1980
+ font-size: 12px;
1981
+ font-weight: 600;
1982
+ text-decoration: none;
1983
+ }
1984
+ .filter-clear:hover {
1985
+ text-decoration: underline;
1986
+ }
1987
+ .comment-pop.filter-menu {
1988
+ gap: 1px;
1989
+ padding: 6px;
1990
+ }
1991
+ .filter-option {
1992
+ display: flex;
1993
+ align-items: center;
1994
+ gap: 8px;
1995
+ min-height: 30px;
1996
+ padding: 4px 8px;
1997
+ border-radius: var(--dpk-radius-sm);
1998
+ color: var(--dpk-ink);
1999
+ font-size: 12.5px;
2000
+ font-weight: 550;
2001
+ text-decoration: none;
2002
+ }
2003
+ .filter-option[data-none] .filter-name {
2004
+ color: var(--dpk-ink-soft);
2005
+ font-style: italic;
2006
+ }
2007
+ .filter-option:hover,
2008
+ .filter-option:focus-visible {
2009
+ outline: none;
2010
+ background: var(--dpk-paper-sunken);
2011
+ }
2012
+ .filter-option:focus-visible {
2013
+ box-shadow: var(--dpk-focus);
2014
+ }
2015
+ .filter-check {
2016
+ flex: none;
2017
+ display: inline-grid;
2018
+ place-items: center;
2019
+ width: 16px;
2020
+ height: 16px;
2021
+ color: var(--dpk-blue);
2022
+ }
2023
+ .filter-check svg {
2024
+ width: 14px;
2025
+ height: 14px;
2026
+ }
2027
+ .filter-name {
2028
+ flex: 1;
2029
+ min-width: 0;
2030
+ overflow: hidden;
2031
+ text-overflow: ellipsis;
2032
+ white-space: nowrap;
2033
+ }
2034
+ .filter-dot {
2035
+ flex: none;
2036
+ width: 8px;
2037
+ height: 8px;
2038
+ border-radius: 50%;
2039
+ background: var(--usm-tone, var(--dpk-ink-faint));
2040
+ }
2041
+ .filter-points,
2042
+ .filter-count {
2043
+ color: var(--dpk-ink-faint);
2044
+ font-family: var(--dpk-mono);
2045
+ font-size: 10.5px;
2046
+ font-variant-numeric: tabular-nums;
2047
+ }
2048
+ `,ar=(e,t,s)=>l`<div class="map-toolbar" data-testid="usm-map-toolbar">
2049
+ ${Xo(e,t,s)} ${Wo(e,t)}
2050
+ </div>`,nr=H`
2051
+ .map-toolbar {
2052
+ display: flex;
2053
+ flex-wrap: wrap;
2054
+ align-items: center;
2055
+ gap: 8px 12px;
2056
+ padding: 5px 24px;
2057
+ border-bottom: 1px solid var(--dpk-rule);
2058
+ }
2059
+ `,ir=(e,t,s)=>l`
2060
+ <section class="ms-overview" data-testid="usm-milestones">
2061
+ ${s.length===0?l`<div class="empty">
2062
+ <h2>${e.noMilestonesTitle}</h2>
2063
+ <p>${e.noMilestonesBody}</p>
2064
+ </div>`:u}
2065
+ <ol class="ms-timeline">
2066
+ ${U(s,a=>a.id,a=>or(e,t,a))}
2067
+ <li class="ms-add">
2068
+ <span class="ms-when" aria-hidden="true"></span>
2069
+ <span class="ms-rail" aria-hidden="true"><span class="ms-node ms-node--add"></span></span>
2070
+ <div class="ms-body">
2071
+ <button class="dpk-btn dpk-btn--ghost" type="button" @click=${()=>zs(e,t)}>
2072
+ ${e.newMilestoneButton}
2073
+ </button>
2074
+ </div>
2075
+ </li>
2076
+ </ol>
2077
+ </section>
2078
+ `,or=(e,t,s)=>{const a=s.id;return l`
2079
+ <li class="ms-entry" data-milestone-card=${a} data-dpk-target=${I({type:"milestone",id:a})}>
2080
+ <div class="ms-when">
2081
+ ${s.timeframe===""?l`<span class="ms-timeframe" data-empty="true">${e.timeframeUnset}</span>`:l`<span class="ms-timeframe">${s.timeframe}</span>`}
2082
+ </div>
2083
+ <span class="ms-rail" aria-hidden="true"><span class="ms-node">${s.ordinal}</span></span>
2084
+ <article class="ms-body">
2085
+ <h3 class="ms-name">
2086
+ <dpk-inline-edit
2087
+ .value=${s.name}
2088
+ .label=${e.milestoneNameLabel}
2089
+ @dpk-commit=${Q(n=>t.dispatch({type:"SET_MILESTONE_NAME",target:{type:"milestone",id:a},payload:{name:n}}))}
2090
+ ></dpk-inline-edit>
2091
+ </h3>
2092
+ ${s.description===""?l`<p class="ms-description" data-empty="true">${e.milestoneNoDescription}</p>`:l`<p class="ms-description">${s.description}</p>`}
2093
+ <dl class="ms-facts">
2094
+ <div>
2095
+ <dt>${e.storiesLabel}</dt>
2096
+ <dd>
2097
+ <strong>${s.storyCount}</strong>
2098
+ <span>${e.shareOfStories(Math.round(s.share*100))}</span>
2099
+ </dd>
2100
+ </div>
2101
+ <div>
2102
+ <dt>${e.coverageLabel}</dt>
2103
+ <dd>
2104
+ <strong>${e.coverage(s.coverage.covered,s.coverage.total)}</strong>
2105
+ <span class="ms-meter" aria-hidden="true">
2106
+ <span
2107
+ style=${`width:${s.coverage.total===0?0:s.coverage.covered/s.coverage.total*100}%`}
2108
+ ></span>
2109
+ </span>
2110
+ </dd>
2111
+ </div>
2112
+ </dl>
2113
+ ${s.progress.length===0?u:rr(e,s)}
2114
+ </article>
2115
+ </li>
2116
+ `},rr=(e,t)=>l`
2117
+ <div class="ms-breakdown">
2118
+ ${Ys(t.progress,e.progressAria(t.progress.map(s=>`${s.name} ${s.count}`).join(", ")))}
2119
+ <ul class="ms-legend" aria-hidden="true">
2120
+ ${t.progress.map(s=>l`<li data-status=${s.id} style=${M(s.tone)}>
2121
+ ${re(s)}
2122
+ <span class="ms-breakdown-name">${s.name}</span>
2123
+ <span class="ms-breakdown-count">${s.count}</span>
2124
+ </li>`)}
2125
+ </ul>
2126
+ </div>
2127
+ `,dr=(e,t,s,a,n,i)=>{if(s.kind!=="picking-step")return u;const o=x(t.state,s.storyId),r=te(t.state,s.activityId);if(!o||!r)return u;const d=r.steps[0]?.id??null,p=n??d;return l`<div class="comment-pop move-dialog" id="move-dialog" popover="manual">
2128
+ <span class="dpk-label">${e.moveDialogLabel}</span>
2129
+ ${a.render({options:r.steps.map(m=>({value:m.id,label:m.name})),value:p??"",onChange:i.pick,ariaLabel:e.moveDialogSelectLabel})}
2130
+ <div class="pop-actions">
2131
+ <button
2132
+ class="dpk-btn dpk-btn--accent"
2133
+ type="button"
2134
+ @click=${()=>{p?i.confirm(p):i.cancel()}}
2135
+ >
2136
+ ${e.moveConfirm}
2137
+ </button>
2138
+ <button class="dpk-btn" type="button" @click=${i.cancel}>${e.moveCancel}</button>
2139
+ </div>
2140
+ </div>`},lr=(e,t)=>l`<div class="board-head" data-testid="usm-board-head">${e}${t}</div>`,pr=O(ln),cr=(e,t,s,a)=>{const{state:n}=t,i=fs(n),o=i.filter(r=>a.folded.has(r));return l`
2141
+ <div class="board-bar">
2142
+ <div class="page-nav" style=${`min-width: ${a.minimum}px`}>
2143
+ <div class="page-tabs dpk-tabstrip" role="tablist" aria-label=${e.pageTabsLabel}>
2144
+ ${i.map(r=>ur(t,r,s,ka(e,r),wa(n,r),a.folded.has(r)))}
2145
+ </div>
2146
+ <button
2147
+ class="dpk-btn dpk-btn--ghost tabs-more"
2148
+ type="button"
2149
+ data-tabs-more-trigger
2150
+ data-unused=${String(o.length===0)}
2151
+ aria-label=${e.moreTabsLabel}
2152
+ aria-haspopup="menu"
2153
+ aria-expanded=${String(a.open)}
2154
+ @click=${a.toggle}
2155
+ >
2156
+ ${pr()}
2157
+ </button>
2158
+ ${a.open&&o.length>0?l`<div
2159
+ id="tabs-menu"
2160
+ class="comment-pop tabs-menu"
2161
+ popover="manual"
2162
+ role="menu"
2163
+ aria-label=${e.moreTabsLabel}
2164
+ @keydown=${r=>{r.key==="Escape"&&(r.preventDefault(),a.close())}}
2165
+ >
2166
+ ${o.map(r=>l`<a
2167
+ class="tabs-menu-item"
2168
+ role="menuitem"
2169
+ data-tab=${r}
2170
+ href=${t.hashFor({tab:r==="map"?null:r})}
2171
+ @click=${a.close}
2172
+ >${ka(e,r)}<span class="dpk-count">${wa(n,r)}</span></a
2173
+ >`)}
2174
+ </div>`:u}
2175
+ </div>
2176
+ ${s==="map"&&n.activities.some(r=>r.steps.length>0)?yo(e,t):u}
2177
+ </div>
2178
+ `},ka=(e,t)=>{switch(t){case"map":return e.mapTab;case"table":return e.tableTab;case"milestones":return e.milestonesTab;case"burndown":return e.burndownTab}},wa=(e,t)=>{switch(t){case"map":return e.stories.length;case"table":return e.stories.length;case"milestones":return e.milestones.length;case"burndown":return e.snapshots.length}},ur=(e,t,s,a,n,i)=>l`<a
2179
+ role="tab"
2180
+ data-tab=${t}
2181
+ data-overflow=${i?"":u}
2182
+ aria-hidden=${i?"true":u}
2183
+ tabindex=${i?"-1":u}
2184
+ aria-selected=${t===s?"true":"false"}
2185
+ href=${e.hashFor({tab:t==="map"?null:t})}
2186
+ >${a}<span class="dpk-count">${n}</span></a
2187
+ >`,mr=36,hr=12,br=220,gr=H`
2188
+ /* The tabs and their more button share what the bar's line leaves; the line
2189
+ wraps only when even the current tab and the button do not fit. */
2190
+ .page-nav {
2191
+ display: flex;
2192
+ flex: 1 1 0;
2193
+ align-items: center;
2194
+ gap: 4px;
2195
+ max-width: 100%;
2196
+ }
2197
+ /* A folded tab stays laid out, out of sight, so it can still be measured. */
2198
+ .page-tabs [role='tab'][data-overflow] {
2199
+ position: absolute;
2200
+ top: 0;
2201
+ left: 0;
2202
+ visibility: hidden;
2203
+ pointer-events: none;
2204
+ }
2205
+ .tabs-more {
2206
+ flex: none;
2207
+ padding: 6px 8px;
2208
+ }
2209
+ .tabs-more svg {
2210
+ width: 16px;
2211
+ height: 16px;
2212
+ }
2213
+ .tabs-more[aria-expanded='true'] {
2214
+ background: var(--dpk-paper-inset);
2215
+ color: var(--dpk-ink);
2216
+ }
2217
+ .tabs-more[data-unused='true'] {
2218
+ position: absolute;
2219
+ visibility: hidden;
2220
+ pointer-events: none;
2221
+ }
2222
+ .comment-pop.tabs-menu {
2223
+ gap: 2px;
2224
+ padding: 6px;
2225
+ }
2226
+ .tabs-menu-item {
2227
+ display: flex;
2228
+ align-items: center;
2229
+ justify-content: space-between;
2230
+ gap: 10px;
2231
+ padding: 8px 10px;
2232
+ border-radius: var(--dpk-radius-sm);
2233
+ color: var(--dpk-ink);
2234
+ font-size: 13px;
2235
+ font-weight: 600;
2236
+ text-decoration: none;
2237
+ }
2238
+ .tabs-menu-item:hover,
2239
+ .tabs-menu-item:focus-visible {
2240
+ outline: none;
2241
+ background: var(--dpk-paper-sunken);
2242
+ }
2243
+ `,St=(e,t,s,a)=>({id:e,label:t,render:n=>l`<div class="dpk-dialog-section" data-dialog-section=${e}>
2244
+ <dpk-internal-usm-settings-section
2245
+ .kind=${s}
2246
+ .locale=${a}
2247
+ .context=${n}
2248
+ ></dpk-internal-usm-settings-section>
2249
+ </div>`}),fr=O(bn),yr=O(Ka),vr=e=>x(e.state,e.navigation.story),kr=(e,t,s,a,n,i)=>{const{state:o}=t,r={type:"story",id:s.id},d=()=>t.navigate({story:null}),p=N(o,`${s.activityId}.${s.stepId}`),m=P(o,s.milestoneId);return l`<aside
2250
+ class="story-panel"
2251
+ role="dialog"
2252
+ aria-label=${e.panelLabel(s.name)}
2253
+ data-testid="usm-story-panel"
2254
+ data-story=${s.id}
2255
+ tabindex="-1"
2256
+ >
2257
+ <header class="sp-head">
2258
+ <span class="sp-where">
2259
+ ${p?l`<span>${p.activity.name}</span><span>${p.step.name}</span>`:u}
2260
+ <span>${m?.name??e.unassigned}</span>
2261
+ </span>
2262
+ ${Ir(e,t,s)}
2263
+ <button class="dpk-icon-btn" type="button" data-role="close" aria-label=${e.closePanelAria} @click=${d}>
2264
+ ${st()}
2265
+ </button>
2266
+ </header>
2267
+ <div class="sp-body">
2268
+ <div class="sp-heading">
2269
+ <div class="sp-copy-row">
2270
+ ${wr(e,s,n)}
2271
+ ${Sa(e,n,{role:"copy-id-title",label:e.copyIdTitle,text:wt(s),icon:fr})}
2272
+ ${Sa(e,n,{role:"copy-info",label:e.copyStoryInfo,text:Ws(e,o,s),icon:yr})}
2273
+ </div>
2274
+ <h2 class="sp-title">
2275
+ <dpk-inline-edit
2276
+ wrap
2277
+ .value=${s.name}
2278
+ .label=${e.storyTitleLabel}
2279
+ @dpk-commit=${Q(y=>t.dispatch({type:"SET_STORY_NAME",target:r,payload:{name:y}}))}
2280
+ ></dpk-inline-edit>
2281
+ </h2>
2282
+ </div>
2283
+ ${o.statuses.length===0?u:Sr(e,t,s)}
2284
+ ${z(o,"estimates")?Er(e,t,s):u}
2285
+ ${z(o,"assignees")?$r(e,t,s,i):u}
2286
+ ${xr(e,t,s,i)} ${Tr(e,t,s,a)}
2287
+ <section class="sp-field">
2288
+ <h3>${e.storyDescriptionLabel}</h3>
2289
+ <dpk-inline-edit
2290
+ multiline
2291
+ markdown
2292
+ class="sp-description"
2293
+ .value=${s.description??""}
2294
+ .label=${e.storyDescriptionLabel}
2295
+ @dpk-commit=${Q(y=>t.dispatch({type:"SET_STORY_DESCRIPTION",target:r,payload:{description:y}}))}
2296
+ ></dpk-inline-edit>
2297
+ </section>
2298
+ ${_r(e,t,s)} ${Ar(e,t,s)}
2299
+ </div>
2300
+ <footer class="sp-foot">
2301
+ <button
2302
+ class="dpk-btn dpk-btn--ghost sp-delete"
2303
+ type="button"
2304
+ @click=${()=>{t.dispatch({type:"DELETE_STORY",target:r,payload:{}}).ok&&d()}}
2305
+ >
2306
+ ${tt()}<span>${e.deleteStoryButton}</span>
2307
+ </button>
2308
+ </footer>
2309
+ </aside>`},wr=(e,t,s)=>{const a=de(t),n=s.copied===a,i=n?e.storyKeyCopied:e.copyStoryKey(a);return l`<button
2310
+ class="sp-key"
2311
+ type="button"
2312
+ data-role="copy-key"
2313
+ data-copied=${n?"true":"false"}
2314
+ title=${i}
2315
+ aria-label=${i}
2316
+ @click=${()=>s.copy(a)}
2317
+ >
2318
+ <span>${a}</span>${n?De():qa()}
2319
+ </button>`},Sa=(e,t,s)=>{const a=t.copied===s.text,n=a?e.storyKeyCopied:s.label;return l`<button
2320
+ class="dpk-icon-btn sp-copy"
2321
+ type="button"
2322
+ data-role=${s.role}
2323
+ data-copied=${a?"true":"false"}
2324
+ title=${n}
2325
+ aria-label=${n}
2326
+ @click=${()=>t.copy(s.text)}
2327
+ >
2328
+ ${a?De():s.icon()}
2329
+ </button>`},Sr=(e,t,s)=>{const a=he(t.state),n=s.statusId;return l`<section class="sp-field">
2330
+ <h3 id="sp-status-label">${e.storyStatusLabel}</h3>
2331
+ <div class="sp-statuses" role="radiogroup" aria-labelledby="sp-status-label">
2332
+ ${a.map(i=>l`<button
2333
+ class="sp-status"
2334
+ type="button"
2335
+ role="radio"
2336
+ data-status=${i.id}
2337
+ aria-checked=${String(i.id===n)}
2338
+ style=${M(i.tone)}
2339
+ @click=${()=>{i.id!==n&&t.dispatch({type:"SET_STORY_STATUS",target:{type:"story",id:s.id},payload:{statusId:i.id}})}}
2340
+ >
2341
+ ${re(i)}<span>${i.name}</span>
2342
+ </button>`)}
2343
+ </div>
2344
+ </section>`},Er=(e,t,s)=>{const a=s.estimateId??null,n=o=>()=>{o!==a&&t.dispatch({type:"SET_STORY_ESTIMATE",target:{type:"story",id:s.id},payload:{estimateId:o}})},i=[{id:null,name:e.unestimated,title:e.unestimated},...t.state.estimates.map(o=>({id:o.id,name:o.name,title:e.estimateText(o.name,o.points)}))];return l`<section class="sp-field">
2345
+ <h3 id="sp-estimate-label" class="sp-field-head">
2346
+ <span>${e.storyEstimateLabel}</span>
2347
+ <a class="sp-manage" href=${t.hashFor({tab:"burndown",story:null})}>${e.manageEstimates}</a>
2348
+ </h3>
2349
+ ${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">
2350
+ ${i.map(o=>l`<button
2351
+ class="sp-estimate"
2352
+ type="button"
2353
+ role="radio"
2354
+ data-estimate=${o.id??""}
2355
+ title=${o.title}
2356
+ aria-checked=${String(o.id===a)}
2357
+ @click=${n(o.id)}
2358
+ >
2359
+ ${o.name}
2360
+ </button>`)}
2361
+ </div>`}
2362
+ </section>`},$r=(e,t,s,a)=>{const n=s.assigneeId??null,i=o=>()=>{o!==n&&t.dispatch({type:"SET_STORY_ASSIGNEE",target:{type:"story",id:s.id},payload:{memberId:o}})};return l`<section class="sp-field">
2363
+ <h3 id="sp-assignee-label" class="sp-field-head">
2364
+ <span>${e.storyAssigneeLabel}</span>
2365
+ <button class="sp-manage" type="button" @click=${()=>a.open("members")}>${e.manageMembers}</button>
2366
+ </h3>
2367
+ ${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">
2368
+ <button
2369
+ class="sp-assignee"
2370
+ type="button"
2371
+ role="radio"
2372
+ data-assignee=""
2373
+ aria-checked=${String(n===null)}
2374
+ @click=${i(null)}
2375
+ >
2376
+ ${e.noAssignee}
2377
+ </button>
2378
+ ${t.state.members.map(o=>l`<button
2379
+ class="sp-assignee"
2380
+ type="button"
2381
+ role="radio"
2382
+ data-assignee=${o.id}
2383
+ aria-checked=${String(o.id===n)}
2384
+ style=${M(o.tone)}
2385
+ @click=${i(o.id)}
2386
+ >
2387
+ <span class="sp-avatar" aria-hidden="true">${kt(o.name)}</span>${o.name}
2388
+ </button>`)}
2389
+ </div>`}
2390
+ </section>`},xr=(e,t,s,a)=>{const n={type:"story",id:s.id},i=new Set(s.labelIds??[]);return l`<section class="sp-field">
2391
+ <h3 id="sp-labels-label" class="sp-field-head">
2392
+ <span>${e.storyLabelsLabel}</span>
2393
+ <button class="sp-manage" type="button" @click=${()=>a.open("labels")}>${e.manageLabels}</button>
2394
+ </h3>
2395
+ ${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">
2396
+ ${t.state.labels.map(o=>{const r=i.has(o.id);return l`<button
2397
+ class="sp-label"
2398
+ type="button"
2399
+ data-label=${o.id}
2400
+ aria-pressed=${String(r)}
2401
+ style=${M(o.tone)}
2402
+ @click=${()=>t.dispatch({type:r?"REMOVE_STORY_LABEL":"ADD_STORY_LABEL",target:n,payload:{labelId:o.id}})}
2403
+ >
2404
+ <span class="sp-label-dot" aria-hidden="true"></span><span>${o.name}</span>
2405
+ </button>`})}
2406
+ </div>`}
2407
+ </section>`},Tr=(e,t,s,a)=>{const{state:n}=t,i=vs(n,s.id),o=(d,p,m)=>t.dispatch({type:d,target:{type:"story",id:p},payload:{blockerId:m}}),r=(d,p,m,y)=>{const E=x(n,p);if(!E)return u;const S=he(n).find(A=>A.id===E.statusId);return l`<li
2408
+ data-blocker=${d==="data-blocker"?p:u}
2409
+ data-dependent=${d==="data-dependent"?p:u}
2410
+ data-finished=${String($e(n,E))}
2411
+ >
2412
+ <a class="sp-dep-name" href=${t.hashFor({story:p})} style=${M(S?.tone)}>
2413
+ ${S?re(S):u}<span>${E.name}</span>
2414
+ </a>
2415
+ <button
2416
+ class="dpk-icon-btn"
2417
+ type="button"
2418
+ data-role="remove"
2419
+ aria-label=${m(E.name)}
2420
+ @click=${y}
2421
+ >
2422
+ ${st()}
2423
+ </button>
2424
+ </li>`};return l`<section class="sp-field sp-deps">
2425
+ <h3>${e.storyDependenciesLabel}</h3>
2426
+ <div class="sp-dep-side">
2427
+ <h4>${e.storyBlockersLabel}</h4>
2428
+ ${i.blockers.length===0?l`<p class="sp-empty">${e.storyNoBlockers}</p>`:l`<ul class="sp-dep-list">
2429
+ ${i.blockers.map(d=>r("data-blocker",d,e.removeBlockerAria,()=>o("REMOVE_STORY_BLOCKER",s.id,d)))}
2430
+ </ul>`}
2431
+ ${ya(e,t,s.id,"blocker",a,d=>o("ADD_STORY_BLOCKER",s.id,d))}
2432
+ </div>
2433
+ <div class="sp-dep-side">
2434
+ <h4>${e.storyDependentsLabel}</h4>
2435
+ ${i.dependents.length===0?l`<p class="sp-empty">${e.storyNoDependents}</p>`:l`<ul class="sp-dep-list">
2436
+ ${i.dependents.map(d=>r("data-dependent",d,e.removeDependentAria,()=>o("REMOVE_STORY_BLOCKER",d,s.id)))}
2437
+ </ul>`}
2438
+ ${ya(e,t,s.id,"dependent",a,d=>o("ADD_STORY_BLOCKER",d,s.id))}
2439
+ </div>
2440
+ </section>`},_r=(e,t,s)=>{const a={type:"story",id:s.id},n=s.links??[],i=o=>{o.preventDefault();const r=o.currentTarget instanceof HTMLFormElement?o.currentTarget:null,d=r?.querySelector("input");if(!r||!d)return;const p=d.value.trim();if(!Tt(rt,p).success){d.setAttribute("aria-invalid","true");return}t.dispatch({type:"ADD_STORY_LINK",target:a,payload:{url:p}}).ok&&(d.removeAttribute("aria-invalid"),r.reset())};return l`<section class="sp-field">
2441
+ <h3>${e.storyLinksLabel}</h3>
2442
+ ${n.length===0?u:l`<ul class="sp-links">
2443
+ ${n.map(o=>{const r=Fe(o.url),d=o.label??r.text;return l`<li data-kind=${r.kind}>
2444
+ <a class="sp-link" href=${o.url} target="_blank" rel="noopener noreferrer" title=${o.url}>
2445
+ ${Ks(r.kind)}
2446
+ <span class="sp-link-text">${d}</span>
2447
+ <span class="sp-link-url">${r.title===d?o.url:r.title}</span>
2448
+ </a>
2449
+ <button
2450
+ class="dpk-icon-btn"
2451
+ type="button"
2452
+ aria-label=${e.removeLinkAria(d)}
2453
+ @click=${()=>t.dispatch({type:"REMOVE_STORY_LINK",target:a,payload:{url:o.url}})}
2454
+ >
2455
+ ${st()}
2456
+ </button>
2457
+ </li>`})}
2458
+ </ul>`}
2459
+ <form class="sp-add-link" @submit=${i}>
2460
+ <input
2461
+ class="dpk-input"
2462
+ type="url"
2463
+ inputmode="url"
2464
+ placeholder="https://"
2465
+ aria-label=${e.linkUrlLabel}
2466
+ @input=${o=>{o.currentTarget instanceof HTMLInputElement&&o.currentTarget.removeAttribute("aria-invalid")}}
2467
+ />
2468
+ <button class="dpk-btn" type="submit">${e.addLinkButton}</button>
2469
+ </form>
2470
+ </section>`},Ir=(e,t,s)=>{const a=t.commentCount({type:"story",id:s.id});return l`<button
2471
+ class="sp-review"
2472
+ type="button"
2473
+ data-role="review-story"
2474
+ title=${e.reviewStoryTitle}
2475
+ aria-label=${a>0?`${e.reviewStoryButton} (${a})`:e.reviewStoryButton}
2476
+ @click=${()=>t.requestComment({type:"story",id:s.id})}
2477
+ >
2478
+ ${At()}<span>${e.reviewStoryButton}</span>${a>0?l`<span class="sp-review-count">${a}</span>`:u}
2479
+ </button>`},Ar=(e,t,s)=>{const a={type:"story",id:s.id};return l`<section class="sp-field sp-comments">
2480
+ <h3>${e.storyCommentsLabel}</h3>
2481
+ <dpk-comment-thread
2482
+ inline
2483
+ .comments=${s.comments??[]}
2484
+ draft-key=${`story-comment:${s.id}`}
2485
+ @dpk-thread-comment-add=${n=>{const i=J("comment",j(t.state));t.dispatch({type:"ADD_STORY_COMMENT",target:a,payload:{id:i,body:n.detail.body,createdAt:new Date().toISOString()}}).ok&&n.preventDefault()}}
2486
+ @dpk-thread-comment-delete=${n=>{t.dispatch({type:"DELETE_STORY_COMMENT",target:a,payload:{commentId:n.detail.id}})}}
2487
+ ></dpk-comment-thread>
2488
+ </section>`},Mr=H`
2489
+ /* Over the main column's edge, below the header: the page's own controls stay in reach. */
2490
+ .story-panel {
2491
+ position: absolute;
2492
+ top: 0;
2493
+ right: 0;
2494
+ bottom: 0;
2495
+ z-index: 20;
2496
+ display: grid;
2497
+ grid-template-rows: auto minmax(0, 1fr) auto;
2498
+ width: min(420px, 100%);
2499
+ border-left: 1px solid var(--dpk-rule-strong);
2500
+ background: var(--dpk-paper-raised);
2501
+ box-shadow: var(--dpk-shadow-lg);
2502
+ animation: sp-slide-in 220ms var(--dpk-ease);
2503
+ }
2504
+ /* The panel takes the focus when it opens; the ring belongs to its controls. */
2505
+ .story-panel:focus {
2506
+ outline: none;
2507
+ }
2508
+ @keyframes sp-slide-in {
2509
+ from {
2510
+ opacity: 0;
2511
+ transform: translateX(24px);
2512
+ }
2513
+ }
2514
+ .sp-head {
2515
+ display: flex;
2516
+ align-items: center;
2517
+ gap: 10px;
2518
+ padding: 14px 22px 12px;
2519
+ min-height: 60px;
2520
+ box-sizing: border-box;
2521
+ border-bottom: 1px solid var(--dpk-rule);
2522
+ }
2523
+ .sp-heading {
2524
+ display: grid;
2525
+ justify-items: start;
2526
+ gap: 6px;
2527
+ }
2528
+ .sp-heading .sp-title {
2529
+ justify-self: stretch;
2530
+ }
2531
+ /* The three copy buttons sit on one line, the key's chip first. */
2532
+ .sp-copy-row {
2533
+ display: flex;
2534
+ align-items: center;
2535
+ gap: 4px;
2536
+ }
2537
+ .sp-copy {
2538
+ width: 22px;
2539
+ height: 22px;
2540
+ }
2541
+ .sp-copy svg {
2542
+ width: 13px;
2543
+ height: 13px;
2544
+ }
2545
+ .sp-copy[data-copied='true'] {
2546
+ color: var(--dpk-green);
2547
+ }
2548
+ .sp-key {
2549
+ display: inline-flex;
2550
+ align-items: center;
2551
+ gap: 5px;
2552
+ padding: 2px 7px;
2553
+ border: 1px solid var(--dpk-rule);
2554
+ border-radius: 6px;
2555
+ background: var(--dpk-paper-sunken);
2556
+ color: var(--dpk-ink-soft);
2557
+ font: inherit;
2558
+ font-family: var(--dpk-mono);
2559
+ font-size: 11px;
2560
+ font-weight: 650;
2561
+ line-height: 18px;
2562
+ font-variant-numeric: tabular-nums;
2563
+ cursor: pointer;
2564
+ }
2565
+ .sp-key:hover {
2566
+ border-color: var(--dpk-rule-strong);
2567
+ color: var(--dpk-ink);
2568
+ }
2569
+ .sp-key:focus-visible {
2570
+ outline: none;
2571
+ box-shadow: var(--dpk-focus);
2572
+ }
2573
+ .sp-key[data-copied='true'] {
2574
+ color: var(--dpk-green);
2575
+ }
2576
+ .sp-key svg {
2577
+ flex: none;
2578
+ width: 12px;
2579
+ height: 12px;
2580
+ }
2581
+ .sp-where {
2582
+ display: flex;
2583
+ flex-wrap: wrap;
2584
+ gap: 2px 0;
2585
+ flex: 1 1 auto;
2586
+ min-width: 0;
2587
+ color: var(--dpk-ink-faint);
2588
+ font-size: 11.5px;
2589
+ font-weight: 600;
2590
+ }
2591
+ .sp-where > span + span::before {
2592
+ content: '›';
2593
+ margin: 0 6px;
2594
+ color: var(--dpk-rule-strong);
2595
+ }
2596
+ .sp-body {
2597
+ display: grid;
2598
+ align-content: start;
2599
+ gap: 22px;
2600
+ overflow: auto;
2601
+ padding: 18px 22px 24px;
2602
+ }
2603
+ .sp-title {
2604
+ margin: 0;
2605
+ font-size: 19px;
2606
+ font-weight: 700;
2607
+ letter-spacing: -0.015em;
2608
+ line-height: 1.35;
2609
+ }
2610
+ .sp-title dpk-inline-edit {
2611
+ display: block;
2612
+ margin: 0 -4px;
2613
+ }
2614
+ .sp-field {
2615
+ display: grid;
2616
+ gap: 8px;
2617
+ }
2618
+ .sp-field h3 {
2619
+ margin: 0;
2620
+ color: var(--dpk-ink-faint);
2621
+ font-size: 11px;
2622
+ font-weight: 650;
2623
+ letter-spacing: 0.04em;
2624
+ text-transform: uppercase;
2625
+ }
2626
+ .sp-statuses {
2627
+ display: flex;
2628
+ flex-wrap: wrap;
2629
+ gap: 6px;
2630
+ }
2631
+ .sp-status {
2632
+ display: inline-flex;
2633
+ align-items: center;
2634
+ gap: 7px;
2635
+ padding: 5px 12px 5px 9px;
2636
+ border: 1px solid var(--dpk-rule-strong);
2637
+ border-radius: 999px;
2638
+ background: var(--dpk-paper-raised);
2639
+ color: var(--dpk-ink);
2640
+ font: inherit;
2641
+ font-size: 12.5px;
2642
+ font-weight: 600;
2643
+ cursor: pointer;
2644
+ transition:
2645
+ background 140ms var(--dpk-ease),
2646
+ border-color 140ms var(--dpk-ease);
2647
+ }
2648
+ .sp-status:hover {
2649
+ border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
2650
+ }
2651
+ .sp-status:focus-visible {
2652
+ outline: none;
2653
+ box-shadow: var(--dpk-focus);
2654
+ }
2655
+ .sp-status[aria-checked='true'] {
2656
+ border-color: var(--usm-tone);
2657
+ background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
2658
+ box-shadow: inset 0 0 0 1px var(--usm-tone);
2659
+ }
2660
+ .sp-estimates {
2661
+ display: flex;
2662
+ flex-wrap: wrap;
2663
+ gap: 4px;
2664
+ }
2665
+ .sp-estimate {
2666
+ min-width: 34px;
2667
+ padding: 4px 10px;
2668
+ border: 1px solid var(--dpk-rule-strong);
2669
+ border-radius: var(--dpk-radius-sm);
2670
+ background: var(--dpk-paper-raised);
2671
+ color: var(--dpk-ink-soft);
2672
+ font: inherit;
2673
+ font-family: var(--dpk-mono);
2674
+ font-size: 12px;
2675
+ font-weight: 650;
2676
+ font-variant-numeric: tabular-nums;
2677
+ cursor: pointer;
2678
+ transition:
2679
+ background 140ms var(--dpk-ease),
2680
+ border-color 140ms var(--dpk-ease);
2681
+ }
2682
+ .sp-estimate[data-estimate=''] {
2683
+ font-family: inherit;
2684
+ font-weight: 550;
2685
+ }
2686
+ .sp-estimate:hover {
2687
+ border-color: var(--dpk-rule-hover);
2688
+ }
2689
+ .sp-estimate:focus-visible {
2690
+ outline: none;
2691
+ box-shadow: var(--dpk-focus);
2692
+ }
2693
+ .sp-estimate[aria-checked='true'] {
2694
+ border-color: var(--dpk-ink);
2695
+ background: var(--dpk-ink);
2696
+ color: var(--dpk-paper-raised);
2697
+ }
2698
+ .sp-assignees {
2699
+ display: flex;
2700
+ flex-wrap: wrap;
2701
+ gap: 4px;
2702
+ }
2703
+ .sp-assignee {
2704
+ display: inline-flex;
2705
+ align-items: center;
2706
+ gap: 6px;
2707
+ padding: 3px 10px 3px 4px;
2708
+ border: 1px solid var(--dpk-rule-strong);
2709
+ border-radius: 999px;
2710
+ background: var(--dpk-paper-raised);
2711
+ color: var(--dpk-ink-soft);
2712
+ font: inherit;
2713
+ font-size: 12px;
2714
+ font-weight: 600;
2715
+ cursor: pointer;
2716
+ transition:
2717
+ background 140ms var(--dpk-ease),
2718
+ border-color 140ms var(--dpk-ease);
2719
+ }
2720
+ .sp-assignee[data-assignee=''] {
2721
+ padding-left: 10px;
2722
+ }
2723
+ .sp-assignee:hover {
2724
+ border-color: var(--dpk-rule-hover);
2725
+ }
2726
+ .sp-assignee:focus-visible {
2727
+ outline: none;
2728
+ box-shadow: var(--dpk-focus);
2729
+ }
2730
+ .sp-assignee[aria-checked='true'] {
2731
+ border-color: var(--usm-tone, var(--dpk-ink));
2732
+ background: color-mix(in oklab, var(--usm-tone, var(--dpk-ink)) 12%, var(--dpk-paper-raised));
2733
+ color: var(--dpk-ink);
2734
+ }
2735
+ .sp-avatar {
2736
+ display: inline-grid;
2737
+ place-items: center;
2738
+ width: 18px;
2739
+ height: 18px;
2740
+ border-radius: 50%;
2741
+ background: var(--usm-tone);
2742
+ color: var(--dpk-paper-raised);
2743
+ font-size: 10px;
2744
+ font-weight: 700;
2745
+ line-height: 1;
2746
+ }
2747
+ .sp-field-head {
2748
+ display: flex;
2749
+ align-items: baseline;
2750
+ justify-content: space-between;
2751
+ gap: 8px;
2752
+ }
2753
+ .sp-manage {
2754
+ /* A button, since it opens the settings dialog rather than moving the page. */
2755
+ padding: 0;
2756
+ border: 0;
2757
+ background: none;
2758
+ color: var(--dpk-ink-faint);
2759
+ font: inherit;
2760
+ font-size: 11px;
2761
+ font-weight: 600;
2762
+ letter-spacing: 0;
2763
+ text-transform: none;
2764
+ cursor: pointer;
2765
+ }
2766
+ .sp-manage:hover {
2767
+ color: var(--dpk-blue);
2768
+ }
2769
+ .sp-empty {
2770
+ margin: 0;
2771
+ color: var(--dpk-ink-faint);
2772
+ font-size: 12.5px;
2773
+ }
2774
+ .sp-labels {
2775
+ display: flex;
2776
+ flex-wrap: wrap;
2777
+ gap: 6px;
2778
+ }
2779
+ .sp-label {
2780
+ display: inline-flex;
2781
+ align-items: center;
2782
+ gap: 6px;
2783
+ padding: 3px 10px 3px 8px;
2784
+ border: 1px dashed var(--dpk-rule-strong);
2785
+ border-radius: 999px;
2786
+ background: transparent;
2787
+ color: var(--dpk-ink-soft);
2788
+ font: inherit;
2789
+ font-size: 12px;
2790
+ font-weight: 600;
2791
+ cursor: pointer;
2792
+ transition:
2793
+ background 140ms var(--dpk-ease),
2794
+ border-color 140ms var(--dpk-ease);
2795
+ }
2796
+ .sp-label:hover {
2797
+ border-color: color-mix(in oklab, var(--usm-tone) 60%, var(--dpk-rule-strong));
2798
+ }
2799
+ .sp-label:focus-visible {
2800
+ outline: none;
2801
+ box-shadow: var(--dpk-focus);
2802
+ }
2803
+ .sp-label[aria-pressed='true'] {
2804
+ border-style: solid;
2805
+ border-color: color-mix(in oklab, var(--usm-tone) 55%, transparent);
2806
+ background: color-mix(in oklab, var(--usm-tone) 14%, var(--dpk-paper-raised));
2807
+ color: var(--dpk-ink);
2808
+ }
2809
+ .sp-label-dot {
2810
+ width: 7px;
2811
+ height: 7px;
2812
+ border-radius: 50%;
2813
+ background: var(--usm-tone);
2814
+ opacity: 0.5;
2815
+ }
2816
+ .sp-label[aria-pressed='true'] .sp-label-dot {
2817
+ opacity: 1;
2818
+ }
2819
+ .sp-deps {
2820
+ gap: 12px;
2821
+ }
2822
+ .sp-dep-side {
2823
+ display: grid;
2824
+ gap: 6px;
2825
+ }
2826
+ .sp-dep-side h4 {
2827
+ margin: 0;
2828
+ color: var(--dpk-ink-soft);
2829
+ font-size: 11.5px;
2830
+ font-weight: 650;
2831
+ }
2832
+ .sp-dep-list {
2833
+ display: grid;
2834
+ gap: 4px;
2835
+ margin: 0;
2836
+ padding: 0;
2837
+ list-style: none;
2838
+ }
2839
+ .sp-dep-list li {
2840
+ display: flex;
2841
+ align-items: center;
2842
+ gap: 4px;
2843
+ border: 1px solid var(--dpk-rule);
2844
+ border-radius: var(--dpk-radius-sm);
2845
+ background: var(--dpk-paper-sunken);
2846
+ }
2847
+ .sp-dep-name {
2848
+ display: flex;
2849
+ align-items: center;
2850
+ gap: 8px;
2851
+ flex: 1 1 auto;
2852
+ min-width: 0;
2853
+ padding: 6px 4px 6px 10px;
2854
+ color: var(--dpk-ink);
2855
+ font-size: 12.5px;
2856
+ font-weight: 600;
2857
+ text-decoration: none;
2858
+ }
2859
+ .sp-dep-name span {
2860
+ overflow: hidden;
2861
+ text-overflow: ellipsis;
2862
+ white-space: nowrap;
2863
+ }
2864
+ .sp-dep-name:hover span {
2865
+ text-decoration: underline;
2866
+ }
2867
+ .sp-dep-list li[data-finished='true'] .sp-dep-name span {
2868
+ color: var(--dpk-ink-faint);
2869
+ text-decoration: line-through;
2870
+ }
2871
+ .sp-description {
2872
+ display: block;
2873
+ margin: 0 -4px;
2874
+ color: var(--dpk-ink-soft);
2875
+ font-size: 13px;
2876
+ line-height: 1.65;
2877
+ }
2878
+ .sp-links {
2879
+ display: grid;
2880
+ gap: 4px;
2881
+ margin: 0;
2882
+ padding: 0;
2883
+ list-style: none;
2884
+ }
2885
+ .sp-links li {
2886
+ display: flex;
2887
+ align-items: center;
2888
+ gap: 4px;
2889
+ border: 1px solid var(--dpk-rule);
2890
+ border-radius: var(--dpk-radius-sm);
2891
+ background: var(--dpk-paper-sunken);
2892
+ }
2893
+ .sp-link {
2894
+ display: grid;
2895
+ grid-template-columns: 16px minmax(0, 1fr);
2896
+ column-gap: 9px;
2897
+ align-items: center;
2898
+ flex: 1 1 auto;
2899
+ min-width: 0;
2900
+ padding: 7px 4px 7px 10px;
2901
+ color: var(--dpk-ink);
2902
+ text-decoration: none;
2903
+ }
2904
+ .sp-link:hover .sp-link-text {
2905
+ text-decoration: underline;
2906
+ }
2907
+ .sp-link svg {
2908
+ grid-row: span 2;
2909
+ width: 16px;
2910
+ height: 16px;
2911
+ color: var(--dpk-ink-soft);
2912
+ }
2913
+ .sp-link-text {
2914
+ overflow: hidden;
2915
+ font-family: var(--dpk-mono);
2916
+ font-size: 12.5px;
2917
+ font-weight: 650;
2918
+ text-overflow: ellipsis;
2919
+ white-space: nowrap;
2920
+ }
2921
+ .sp-link-url {
2922
+ overflow: hidden;
2923
+ color: var(--dpk-ink-faint);
2924
+ font-size: 11px;
2925
+ text-overflow: ellipsis;
2926
+ white-space: nowrap;
2927
+ }
2928
+ .sp-add-link {
2929
+ display: flex;
2930
+ gap: 6px;
2931
+ }
2932
+ .sp-add-link input {
2933
+ flex: 1 1 auto;
2934
+ min-width: 0;
2935
+ }
2936
+ .sp-add-link input[aria-invalid='true'] {
2937
+ border-color: var(--dpk-accent);
2938
+ box-shadow: 0 0 0 2px color-mix(in srgb, var(--dpk-accent) 22%, transparent);
2939
+ }
2940
+ .sp-comments dpk-comment-thread {
2941
+ margin-top: 6px;
2942
+ }
2943
+ /* A request to the agent, not part of the story: it carries the review rail's comment icon. */
2944
+ .sp-review {
2945
+ display: inline-flex;
2946
+ flex: none;
2947
+ align-items: center;
2948
+ gap: 6px;
2949
+ height: 28px;
2950
+ padding: 0 10px;
2951
+ border: 1px solid var(--dpk-rule-strong);
2952
+ border-radius: 999px;
2953
+ background: var(--dpk-paper-raised);
2954
+ color: var(--dpk-ink-soft);
2955
+ font: inherit;
2956
+ font-size: 11.5px;
2957
+ font-weight: 600;
2958
+ cursor: pointer;
2959
+ }
2960
+ .sp-review:hover {
2961
+ color: var(--dpk-accent);
2962
+ border-color: color-mix(in srgb, var(--dpk-accent) 45%, transparent);
2963
+ }
2964
+ .sp-review:focus-visible {
2965
+ outline: none;
2966
+ box-shadow: var(--dpk-focus);
2967
+ }
2968
+ .sp-review svg {
2969
+ width: 14px;
2970
+ height: 14px;
2971
+ }
2972
+ .sp-review-count {
2973
+ min-width: 16px;
2974
+ padding: 0 4px;
2975
+ border-radius: 999px;
2976
+ background: var(--dpk-accent-soft);
2977
+ color: var(--dpk-accent);
2978
+ font-family: var(--dpk-mono);
2979
+ font-size: 10px;
2980
+ line-height: 16px;
2981
+ text-align: center;
2982
+ }
2983
+ .sp-foot {
2984
+ display: flex;
2985
+ justify-content: flex-start;
2986
+ padding: 12px 22px;
2987
+ border-top: 1px solid var(--dpk-rule);
2988
+ }
2989
+ .sp-delete {
2990
+ display: inline-flex;
2991
+ align-items: center;
2992
+ gap: 6px;
2993
+ color: var(--dpk-ink-soft);
2994
+ }
2995
+ .sp-delete svg {
2996
+ width: 14px;
2997
+ height: 14px;
2998
+ }
2999
+ `,Lr="usm-story-table",Dr=e=>e==="accent"?"violet":e,Rr=(e,t)=>{const s=[{id:"key",label:e.storyKeyColumn,type:"text",sortable:!0},{id:"name",label:e.storyTitleLabel,type:"text",sortable:!0},{id:"activity",label:e.activityNameLabel,type:"text",sortable:!0},{id:"step",label:e.stepNameLabel,type:"text",sortable:!0},{id:"milestone",label:e.burndownMilestoneLabel,type:"text",sortable:!0},...t.statuses.length===0?[]:[{id:"status",label:e.storyStatusLabel,type:"status",sortable:!0}],...z(t,"assignees")?[{id:"assignee",label:e.storyAssigneeLabel,type:"person",sortable:!0}]:[],...z(t,"estimates")?[{id:"estimate",label:e.storyEstimateLabel,type:"number",sortable:!0}]:[],...t.labels.length===0?[]:[{id:"labels",label:e.storyLabelsLabel,type:"tag",sortable:!1}]],a=t.stories.map(n=>{const i=N(t,ce(n.activityId,n.stepId)),o=P(t,n.milestoneId),r=D(t,n.statusId),d=F(t,n.estimateId),p=pt(t,n),m=ct(t,n);return{id:n.id,cells:{key:{type:"text",value:de(n)},name:{type:"text",value:n.name},activity:{type:"text",value:i?.activity.name??null},step:{type:"text",value:i?.step.name??null},milestone:{type:"text",value:o?.name??null},...r===void 0?{}:{status:{type:"status",value:{label:r.name,tone:Dr(r.tone)}}},...z(t,"assignees")?{assignee:{type:"person",value:p?.name??null}}:{},...z(t,"estimates")?{estimate:{type:"number",value:d?.points??null}}:{},...t.labels.length===0?{}:{labels:{type:"tag",value:m.map(y=>y.name)}}},...n.questions===void 0?{}:{questions:n.questions}}});return{columns:s,rows:a}},Or=(e,t)=>{const s=Rr(e,t.state);return l`
3000
+ <section class="story-table" data-testid="usm-table">
3001
+ <dpk-table
3002
+ id=${Lr}
3003
+ readonly
3004
+ .data=${s}
3005
+ @dpk-table-select=${a=>{const n=t.state.stories.find(i=>i.id===a.detail.id);n&&t.navigate({step:n.stepId,story:n.id})}}
3006
+ ></dpk-table>
3007
+ </section>
3008
+ `},Nr=H`
3009
+ :host {
3010
+ --dpk-usm-accent: var(--dpk-blue);
3011
+ }
3012
+ /*
3013
+ * A wide table must scroll inside itself and never widen the template shell.
3014
+ * It scrolls both ways so the backbone can stick to its top and the
3015
+ * milestone column to its left: a box that scrolls only sideways still
3016
+ * becomes the sticky ancestor, and its top would never move. It takes the
3017
+ * height left under the board head (tabs and toolbar), down to the page's
3018
+ * bottom edge: the hand-off dock floats over its corner, and the map's own
3019
+ * padding lets the last row scroll clear of it, so the page body keeps no
3020
+ * second clearance under it.
3021
+ *
3022
+ * The map's row is the space that is actually left, never a fixed minimum:
3023
+ * the supplements bar at the foot of the column is sticky and takes its own
3024
+ * height out of the column, so a floor taller than what remains would push the
3025
+ * map's last rows under that bar — off screen, with nothing left to scroll
3026
+ * them into view. The map itself scrolls; it does not need to be tall.
3027
+ */
3028
+ .dpk-main-body:has(> dpk-matrix) {
3029
+ flex: 1 1 0;
3030
+ min-height: 0;
3031
+ grid-template-rows: auto minmax(0, 1fr);
3032
+ padding-bottom: 16px;
3033
+ }
3034
+ /* The grid, its scroll, its sticky head and lead column are \`<dpk-matrix>\`'s
3035
+ own; this only wires the hand-off dock's clearance through to matrix's
3036
+ own variable, which it does not otherwise know about. Every head here
3037
+ (\`.corner\`, \`.act-head\`, \`.col-head\`, \`.row-lead\`) already carries its
3038
+ own full padding, so matrix's own generic head padding is kept to a
3039
+ small edge buffer rather than stack a second full inset around each
3040
+ one — just enough room that a grip never sits flush against the
3041
+ column/row rule it's next to, the way every head had before this board
3042
+ moved its padding onto \`<dpk-matrix>\`; the cell keeps matrix's own
3043
+ padding and paper surface, now that \`.cell\` no longer sets either
3044
+ itself. */
3045
+ dpk-matrix {
3046
+ --dpk-matrix-dock-clearance: var(--dpk-dock-clearance, 0px);
3047
+ --dpk-matrix-head-pad: 4px;
3048
+ /* A grid item will not shrink below its own content unless told to; the map
3049
+ is a scroll frame, so it may be exactly as tall as the row it was given. */
3050
+ min-height: 0;
3051
+ }
3052
+ .row-lead {
3053
+ display: flex;
3054
+ flex-direction: column;
3055
+ align-items: flex-start;
3056
+ justify-content: center;
3057
+ gap: 2px;
3058
+ min-width: 0;
3059
+ padding: 8px 6px 8px 4px;
3060
+ background: var(--dpk-paper-sunken);
3061
+ }
3062
+ /* Row names and their meta line share one column: past \`<dpk-matrix>\`'s own
3063
+ grip and gap (its exposed span) and the inline edit's own padding (4px). */
3064
+ .row-lead {
3065
+ --usm-row-indent: calc(var(--dpk-matrix-grip-span, 22px) + 4px);
3066
+ }
3067
+ /* \`<dpk-matrix>\`'s own grip bleed (\`margin-inline-start: -grip-span\` plus a
3068
+ matching \`padding-inline-start\`) lands on this box, the slot's direct
3069
+ child — but this box's own left padding above (4px, for the ungripped
3070
+ case) is a physical property on the same side, so it wins the cascade
3071
+ over the matrix's logical one and leaves the title undercompensated,
3072
+ pulled in under the grip instead of past it. Matching the matrix's own
3073
+ target value here, rather than fighting over which side wins, keeps the
3074
+ title's start exactly where the grip's own gap ends (the same inset a
3075
+ column head's flat, ungrouped slot node gets for free). The column heads
3076
+ below carry the identical fix, for the identical reason. */
3077
+ .row-lead[draggable='true'] {
3078
+ padding-inline-start: var(--dpk-matrix-grip-span, 22px);
3079
+ }
3080
+ .row-meta {
3081
+ display: flex;
3082
+ flex-wrap: wrap;
3083
+ gap: 2px 8px;
3084
+ padding-left: var(--usm-row-indent);
3085
+ font-size: 10.5px;
3086
+ color: var(--dpk-ink-faint);
3087
+ }
3088
+ .row-timeframe {
3089
+ color: var(--dpk-ink-soft);
3090
+ font-weight: 600;
3091
+ }
3092
+ .row-count {
3093
+ font-family: var(--dpk-mono);
3094
+ font-variant-numeric: tabular-nums;
3095
+ }
3096
+ .corner {
3097
+ display: grid;
3098
+ gap: 3px;
3099
+ align-content: start;
3100
+ }
3101
+ /* The backbone is read on every scroll, so its rows are kept short: the
3102
+ axis labels sit tight and the step names get a single slim line. */
3103
+ .corner {
3104
+ gap: 1px;
3105
+ padding: 7px 10px;
3106
+ line-height: 1.3;
3107
+ text-wrap: balance;
3108
+ }
3109
+
3110
+ /* Above the content: the page tabs (map / milestones) and, on the map, the
3111
+ unit toggle (group band vs one column per activity). */
3112
+
3113
+ /* The board bar and the map's toolbar stay on top together while a long
3114
+ milestone list or the map scrolls under them. */
3115
+ .board-head {
3116
+ position: sticky;
3117
+ top: 0;
3118
+ z-index: 5;
3119
+ margin: -24px -24px 0;
3120
+ background: var(--dpk-glass);
3121
+ backdrop-filter: saturate(1.6) blur(14px);
3122
+ min-width: 0;
3123
+ }
3124
+
3125
+ .board-bar {
3126
+ --usm-bar-pad: 6px;
3127
+ border-bottom: 1px solid var(--dpk-rule);
3128
+ padding: var(--usm-bar-pad) 24px;
3129
+ display: flex;
3130
+ flex-wrap: wrap;
3131
+ align-items: center;
3132
+ gap: 10px 14px;
3133
+ min-width: 0;
3134
+ }
3135
+
3136
+ /* The pages: an underlined tab strip, heavier than the view toggle. The
3137
+ tabs that do not fit fold behind the more button beside it (\`.page-nav\`);
3138
+ the bottom padding keeps the selected tab's underline, which sits on the
3139
+ bar's bottom rule, inside the clip. */
3140
+ .page-tabs {
3141
+ --dpk-tabstrip-pad: var(--usm-bar-pad);
3142
+ --dpk-tabstrip-accent: var(--dpk-usm-accent);
3143
+ display: inline-flex;
3144
+ margin-bottom: calc(-1 * var(--usm-bar-pad) - 1px);
3145
+ padding-bottom: calc(var(--usm-bar-pad) + 1px);
3146
+ border-bottom: none;
3147
+ overflow: hidden;
3148
+ }
3149
+
3150
+ /* Activity band: raised above the working canvas. A head spans its steps,
3151
+ so its contents stay in view beside the sticky column while the map
3152
+ scrolls sideways. */
3153
+ .act-head {
3154
+ position: relative;
3155
+ display: grid;
3156
+ align-content: start;
3157
+ gap: 4px;
3158
+ padding: 7px 10px 11px;
3159
+ background: var(--dpk-paper-raised);
3160
+ box-shadow:
3161
+ var(--dpk-bevel),
3162
+ inset 0 -1px 0 var(--dpk-rule-strong);
3163
+ font-size: 13px;
3164
+ font-weight: 650;
3165
+ letter-spacing: -0.005em;
3166
+ }
3167
+ /* Same undercompensation as \`.row-lead\` above, same fix: this box's own
3168
+ left padding (10px, physical) otherwise wins over \`<dpk-matrix>\`'s grip
3169
+ bleed compensation (logical), leaving the title pulled in under the
3170
+ grip. */
3171
+ .act-head[draggable='true'] {
3172
+ padding-inline-start: var(--dpk-matrix-grip-span, 22px);
3173
+ }
3174
+ .act-title,
3175
+ .act-steps {
3176
+ position: sticky;
3177
+ left: 150px;
3178
+ width: min(100%, 340px);
3179
+ min-width: 0;
3180
+ }
3181
+ .act-title {
3182
+ display: flex;
3183
+ align-items: center;
3184
+ gap: 8px;
3185
+ }
3186
+ /* The name keeps its whole line while it fits; the actor beside it gives
3187
+ way (truncates) first, down to an ellipsis. */
3188
+ .act-name {
3189
+ display: flex;
3190
+ flex: 1 1 auto;
3191
+ align-items: center;
3192
+ gap: 8px;
3193
+ min-width: 0;
3194
+ }
3195
+ .act-name > dpk-inline-edit {
3196
+ flex: none;
3197
+ max-width: calc(100% - 32px);
3198
+ }
3199
+ /* How far the group's stories have come: a strip along the head's bottom
3200
+ edge, as wide as the steps it spans, so it costs the band no line. */
3201
+ .act-head > .status-bar {
3202
+ position: absolute;
3203
+ left: 0;
3204
+ right: 0;
3205
+ bottom: 0;
3206
+ height: 4px;
3207
+ gap: 1px;
3208
+ }
3209
+ .act-head > .status-bar .status-bar-part {
3210
+ border-radius: 0;
3211
+ }
3212
+ /* Whose experience the activity is: a label beside the name, editable in place. */
3213
+ .act-actor {
3214
+ display: flex;
3215
+ flex: 0 1 auto;
3216
+ min-width: 24px;
3217
+ max-width: 60%;
3218
+ padding: 0 4px;
3219
+ border-radius: 999px;
3220
+ background: var(--dpk-blue-soft);
3221
+ color: var(--dpk-blue);
3222
+ font-size: 11px;
3223
+ font-weight: 650;
3224
+ line-height: 20px;
3225
+ }
3226
+ .act-actor > dpk-inline-edit {
3227
+ min-width: 0;
3228
+ }
3229
+ .act-actor[data-empty='true'] {
3230
+ background: transparent;
3231
+ opacity: 0;
3232
+ transition: opacity 150ms ease;
3233
+ }
3234
+ .act-head:hover .act-actor[data-empty='true'],
3235
+ .act-actor[data-empty='true']:focus-within {
3236
+ opacity: 1;
3237
+ }
3238
+ /* The group view gives the steps no columns; the head lists them instead. */
3239
+ .act-steps {
3240
+ display: grid;
3241
+ gap: 3px;
3242
+ margin: 0;
3243
+ padding: 0 0 0 18px;
3244
+ color: var(--dpk-ink-soft);
3245
+ font-size: 11.5px;
3246
+ font-weight: 500;
3247
+ line-height: 1.45;
3248
+ }
3249
+ .act-steps li::marker {
3250
+ color: var(--dpk-ink-faint);
3251
+ font-family: var(--dpk-mono);
3252
+ font-size: 10px;
3253
+ }
3254
+ .col-head {
3255
+ display: flex;
3256
+ align-items: center;
3257
+ gap: 6px;
3258
+ padding: 5px 10px;
3259
+ background: var(--dpk-paper-sunken);
3260
+ transition: background 160ms var(--dpk-ease);
3261
+ }
3262
+ .col-head h4 {
3263
+ flex: 1 1 auto;
3264
+ min-width: 0;
3265
+ }
3266
+ .col-head[data-current='true'] {
3267
+ background: color-mix(in srgb, var(--dpk-usm-accent) 8%, var(--dpk-paper-sunken));
3268
+ }
3269
+ /* Same undercompensation as \`.row-lead\` above, same fix. */
3270
+ .col-head[draggable='true'] {
3271
+ padding-inline-start: var(--dpk-matrix-grip-span, 22px);
3272
+ }
3273
+ .col-head h4 {
3274
+ font-size: 13px;
3275
+ font-weight: 600;
3276
+ margin: 0;
3277
+ }
3278
+
3279
+ .row-head {
3280
+ display: flex;
3281
+ align-items: center;
3282
+ gap: 6px;
3283
+ padding: 10px;
3284
+ }
3285
+
3286
+ /* Milestone row label: plain text with a grip, not a chip. The "add
3287
+ milestone" row reuses \`.row-head\` for its ghost button. */
3288
+ .row-head[data-milestone] {
3289
+ align-self: stretch;
3290
+ margin: 0;
3291
+ padding: 0 6px 0 0;
3292
+ color: var(--dpk-ink);
3293
+ font-size: 12.5px;
3294
+ font-weight: 650;
3295
+ max-width: 100%;
3296
+ }
3297
+
3298
+ /* \`<dpk-matrix>\` is the row's drag handle, grip and cursor now; this only
3299
+ keeps a browser-native drag affordance off the name editor inside it. */
3300
+ .row-head dpk-inline-edit {
3301
+ -webkit-user-drag: none;
3302
+ }
3303
+
3304
+ /* Column drag: a group's head or a step's head is its column's handle, the
3305
+ way a row head is a milestone's; \`<dpk-matrix>\` is the handle, grip and
3306
+ cursor now. This only keeps native drag off the editors inside. */
3307
+ .act-head dpk-inline-edit,
3308
+ .col-head dpk-inline-edit {
3309
+ -webkit-user-drag: none;
3310
+ }
3311
+
3312
+ /* Unassigned is a holding area, not a release: its label is quieter. */
3313
+ .row-head[data-unassigned='true'] {
3314
+ padding-left: var(--usm-row-indent);
3315
+ color: var(--dpk-ink-soft);
3316
+ }
3317
+
3318
+ /* Cells are the working canvas: sunken, with a quiet dot lattice, so raised
3319
+ story cards read as things placed on the board. */
3320
+ /* The padding and the sunken dot surface are \`<dpk-matrix>\`'s own now; this
3321
+ only stacks cards inside the cell it already gives us. */
3322
+ .cell {
3323
+ display: flex;
3324
+ flex-direction: column;
3325
+ gap: 8px;
3326
+ min-height: 100px;
3327
+ }
3328
+ .cell[data-drop='true'] {
3329
+ outline: 2px dashed var(--dpk-blue);
3330
+ outline-offset: -2px;
3331
+ }
3332
+ .card-list {
3333
+ display: grid;
3334
+ gap: 10px;
3335
+ align-content: start;
3336
+ flex: 1 1 auto;
3337
+ }
3338
+ /* The add button (the kit's add atom) shows on the cell's hover only. */
3339
+ .add-cell {
3340
+ margin-top: auto;
3341
+ opacity: 0;
3342
+ transition:
3343
+ opacity 180ms var(--dpk-ease),
3344
+ background 160ms var(--dpk-ease),
3345
+ border-color 160ms var(--dpk-ease),
3346
+ color 160ms var(--dpk-ease);
3347
+ }
3348
+ .add-cell:focus-visible {
3349
+ opacity: 1;
3350
+ }
3351
+ .cell:hover .add-cell {
3352
+ opacity: 1;
3353
+ }
3354
+ .empty {
3355
+ border: 1px dashed var(--dpk-rule-strong);
3356
+ border-radius: var(--dpk-radius-lg);
3357
+ padding: 28px 24px;
3358
+ background: var(--dpk-dots), var(--dpk-paper-sunken);
3359
+ max-width: 620px;
3360
+ display: grid;
3361
+ gap: 10px;
3362
+ }
3363
+
3364
+ /* ------------------------------------------------------ milestones tab */
3365
+
3366
+ /* The release slices as a timeline, like the experience section of a
3367
+ portfolio: when on the left, one node per slice on a single rail, what
3368
+ and how big on the right. Nothing is boxed; the rail carries the order. */
3369
+ .ms-overview {
3370
+ --ms-node: 30px;
3371
+ --ms-when: 132px;
3372
+ --ms-gap: 44px;
3373
+ display: grid;
3374
+ gap: 28px;
3375
+ max-width: 920px;
3376
+ padding: 28px 0 40px;
3377
+ }
3378
+ .ms-timeline {
3379
+ margin: 0;
3380
+ padding: 0;
3381
+ list-style: none;
3382
+ }
3383
+ .ms-entry,
3384
+ .ms-add {
3385
+ display: grid;
3386
+ grid-template-columns: var(--ms-when) var(--ms-node) minmax(0, 1fr);
3387
+ grid-template-areas: 'when rail body';
3388
+ column-gap: 24px;
3389
+ }
3390
+ .ms-entry {
3391
+ padding-bottom: var(--ms-gap);
3392
+ }
3393
+ .ms-when {
3394
+ grid-area: when;
3395
+ display: flex;
3396
+ justify-content: flex-end;
3397
+ padding-top: 5px;
3398
+ }
3399
+ .ms-timeframe {
3400
+ color: var(--dpk-ink);
3401
+ font-size: 13px;
3402
+ font-weight: 650;
3403
+ font-variant-numeric: tabular-nums;
3404
+ letter-spacing: 0.01em;
3405
+ text-align: right;
3406
+ }
3407
+ .ms-timeframe[data-empty='true'] {
3408
+ color: var(--dpk-ink-faint);
3409
+ font-weight: 500;
3410
+ }
3411
+
3412
+ /* The rail runs through every entry's padding, so the nodes read as one line;
3413
+ it starts at the first node and fades out into the add node. */
3414
+ .ms-rail {
3415
+ grid-area: rail;
3416
+ position: relative;
3417
+ display: flex;
3418
+ justify-content: center;
3419
+ }
3420
+ .ms-rail::before {
3421
+ content: '';
3422
+ position: absolute;
3423
+ top: 0;
3424
+ bottom: calc(-1 * var(--ms-gap));
3425
+ left: calc(50% - 1px);
3426
+ width: 2px;
3427
+ border-radius: 1px;
3428
+ background: var(--dpk-rule-strong);
3429
+ }
3430
+ .ms-entry:first-child .ms-rail::before {
3431
+ top: calc(var(--ms-node) / 2);
3432
+ }
3433
+ .ms-add .ms-rail::before {
3434
+ bottom: auto;
3435
+ height: calc(var(--ms-node) / 2);
3436
+ background: repeating-linear-gradient(to bottom, var(--dpk-rule-strong) 0 3px, transparent 3px 7px);
3437
+ }
3438
+ .ms-node {
3439
+ position: relative;
3440
+ display: grid;
3441
+ place-items: center;
3442
+ width: var(--ms-node);
3443
+ height: var(--ms-node);
3444
+ box-sizing: border-box;
3445
+ border: 1px solid var(--dpk-rule-strong);
3446
+ border-radius: 50%;
3447
+ background: var(--dpk-paper-raised);
3448
+ color: var(--dpk-ink);
3449
+ font-family: var(--dpk-mono);
3450
+ font-size: 12px;
3451
+ font-weight: 700;
3452
+ font-variant-numeric: tabular-nums;
3453
+ /* A ring of page color cuts the rail around the node. */
3454
+ box-shadow:
3455
+ 0 0 0 5px var(--dpk-paper),
3456
+ var(--dpk-bevel),
3457
+ var(--dpk-shadow-xs);
3458
+ transition:
3459
+ border-color 160ms var(--dpk-ease),
3460
+ color 160ms var(--dpk-ease);
3461
+ }
3462
+ .ms-entry:hover .ms-node,
3463
+ .ms-entry:focus-within .ms-node {
3464
+ border-color: var(--dpk-blue);
3465
+ color: var(--dpk-blue-strong);
3466
+ }
3467
+ .ms-node--add {
3468
+ border-style: dashed;
3469
+ background: var(--dpk-paper);
3470
+ box-shadow: 0 0 0 5px var(--dpk-paper);
3471
+ }
3472
+ .ms-node--add::before,
3473
+ .ms-node--add::after {
3474
+ content: '';
3475
+ position: absolute;
3476
+ left: 50%;
3477
+ top: 50%;
3478
+ width: 10px;
3479
+ height: 1.5px;
3480
+ border-radius: 1px;
3481
+ background: var(--dpk-ink-faint);
3482
+ transform: translate(-50%, -50%);
3483
+ }
3484
+ .ms-node--add::after {
3485
+ transform: translate(-50%, -50%) rotate(90deg);
3486
+ }
3487
+ .ms-add .ms-body {
3488
+ display: flex;
3489
+ align-items: center;
3490
+ min-height: var(--ms-node);
3491
+ }
3492
+ /* The label lines up with the names above; the button's padding hangs out. */
3493
+ .ms-add .dpk-btn {
3494
+ margin-left: -12px;
3495
+ }
3496
+
3497
+ .ms-body {
3498
+ grid-area: body;
3499
+ display: grid;
3500
+ gap: 10px;
3501
+ min-width: 0;
3502
+ justify-items: start;
3503
+ }
3504
+ .ms-name {
3505
+ justify-self: stretch;
3506
+ min-width: 0;
3507
+ margin: 0;
3508
+ padding-top: 1px;
3509
+ font-size: 19px;
3510
+ font-weight: 700;
3511
+ line-height: 1.4;
3512
+ letter-spacing: -0.015em;
3513
+ }
3514
+ /* The field pads its text by 4px; pull it out by as much so the name lines
3515
+ up with the description and keeps its place when editing starts. */
3516
+ .ms-name dpk-inline-edit {
3517
+ display: block;
3518
+ margin: 0 -4px;
3519
+ }
3520
+ .ms-description {
3521
+ margin: 0;
3522
+ max-width: 64ch;
3523
+ color: var(--dpk-ink-soft);
3524
+ font-size: 14px;
3525
+ line-height: 1.75;
3526
+ white-space: pre-wrap;
3527
+ }
3528
+ .ms-description[data-empty='true'] {
3529
+ color: var(--dpk-ink-faint);
3530
+ font-size: 13px;
3531
+ }
3532
+ .ms-facts {
3533
+ display: flex;
3534
+ flex-wrap: wrap;
3535
+ gap: 10px 36px;
3536
+ margin: 6px 0 0;
3537
+ }
3538
+ .ms-facts dt {
3539
+ margin-bottom: 3px;
3540
+ color: var(--dpk-ink-faint);
3541
+ font-size: 11px;
3542
+ font-weight: 600;
3543
+ letter-spacing: 0.02em;
3544
+ }
3545
+ .ms-facts dd {
3546
+ display: flex;
3547
+ align-items: center;
3548
+ gap: 10px;
3549
+ margin: 0;
3550
+ color: var(--dpk-ink-faint);
3551
+ font-size: 12px;
3552
+ }
3553
+ .ms-facts strong {
3554
+ color: var(--dpk-ink);
3555
+ font-size: 15px;
3556
+ font-weight: 650;
3557
+ font-variant-numeric: tabular-nums;
3558
+ }
3559
+ .ms-meter {
3560
+ display: block;
3561
+ width: 72px;
3562
+ height: 4px;
3563
+ border-radius: 2px;
3564
+ background: var(--dpk-paper-inset);
3565
+ overflow: hidden;
3566
+ }
3567
+ .ms-meter > span {
3568
+ display: block;
3569
+ height: 100%;
3570
+ border-radius: inherit;
3571
+ background: var(--dpk-blue);
3572
+ }
3573
+
3574
+ /* Where the slice's stories sit across the backbone, in activity tones. */
3575
+ .ms-breakdown {
3576
+ display: grid;
3577
+ gap: 10px;
3578
+ width: min(100%, 460px);
3579
+ margin-top: 4px;
3580
+ }
3581
+ .ms-breakdown .status-bar {
3582
+ height: 8px;
3583
+ }
3584
+ .ms-legend {
3585
+ display: flex;
3586
+ flex-wrap: wrap;
3587
+ gap: 6px 16px;
3588
+ margin: 0;
3589
+ padding: 0;
3590
+ list-style: none;
3591
+ }
3592
+ .ms-legend li {
3593
+ display: inline-flex;
3594
+ align-items: center;
3595
+ gap: 6px;
3596
+ color: var(--dpk-ink-soft);
3597
+ font-size: 12px;
3598
+ }
3599
+ .ms-breakdown-count {
3600
+ color: var(--dpk-ink-faint);
3601
+ font-family: var(--dpk-mono);
3602
+ font-size: 11px;
3603
+ font-variant-numeric: tabular-nums;
3604
+ }
3605
+
3606
+ /* Narrow: the date moves above the name, the rail stays on the left. */
3607
+ @media (max-width: 640px) {
3608
+ .ms-overview {
3609
+ --ms-node: 26px;
3610
+ }
3611
+ .ms-entry,
3612
+ .ms-add {
3613
+ grid-template-columns: var(--ms-node) minmax(0, 1fr);
3614
+ grid-template-areas:
3615
+ 'rail when'
3616
+ 'rail body';
3617
+ column-gap: 16px;
3618
+ }
3619
+ .ms-add {
3620
+ grid-template-areas: 'rail body';
3621
+ }
3622
+ .ms-add .ms-when {
3623
+ display: none;
3624
+ }
3625
+ .ms-when {
3626
+ justify-content: flex-start;
3627
+ padding: 4px 0 2px;
3628
+ }
3629
+ .ms-timeframe {
3630
+ text-align: left;
3631
+ }
3632
+ }
3633
+
3634
+ /*
3635
+ * The statuses, labels and members overviews are no longer styled here: they
3636
+ * are rendered by <dpk-usm-settings-section>, which carries its own copy of
3637
+ * that CSS in its own shadow root, because the settings dialog may be drawn
3638
+ * by the element that owns the page's chrome (see that file).
3639
+ */
3640
+
3641
+ /* Step picker shown after a cross-activity drop. */
3642
+ .move-dialog {
3643
+ min-width: 220px;
3644
+ }
3645
+ .move-dialog .dpk-rich-select {
3646
+ width: 100%;
3647
+ }
3648
+
3649
+ /* ----------------------------------------------------------- table tab */
3650
+
3651
+ /* The flat view of every story: dpk-table supplies its own
3652
+ chrome, this just gives it the page's margins. */
3653
+ .story-table {
3654
+ display: block;
3655
+ max-width: 1200px;
3656
+ padding: 28px 0 40px;
3657
+ }
3658
+ `,X={kind:"idle"},Cr={width:300,height:240},Ea="statuses",$a="labels",xa="members",Br={status:Ea,label:$a,member:xa},Ur=240,Yr=31,Pr=14,Ta=160,zr=1500;class _a extends Lt{static{this.styles=[Lt.styles,Rt,Nr,Ke,qs,Mr,Ko,Fo,nr,sr,jo,gr,_t]}definitionFor(t){return Ds(t)}static{this.properties={mode:{state:!0}}}#t=new Qa(this);#e=new It(this);#n=null;#i=new ni(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]")});#a=!1;#s=null;#o;#r=new Dt(this);#l=new Dt(this);#d=null;constructor(){super(),this.mode=X,new at(this,{open:()=>this.#p()!==null,closesOn:t=>this.#u(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 at(this,{open:()=>this.mode.kind==="filtering",closesOn:t=>!t.some(s=>s instanceof Element&&(s.id==="filter-menu"||s.hasAttribute("data-filter-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=X}),new at(this,{open:()=>this.mode.kind==="choosing-tab",closesOn:t=>!t.some(s=>s instanceof Element&&(s.id==="tabs-menu"||s.hasAttribute("data-tabs-more-trigger"))),ownsEscape:()=>!0,dismiss:()=>this.mode=X})}disconnectedCallback(){super.disconnectedCallback(),clearTimeout(this.#o),this.#s=null}renderRegions(t){return{main:this.#b(t)}}renderSettingsSections(t){const s=ne(this.locale),a=[St(Ea,s.statusesSection,"statuses",this.locale),St($a,s.labelsSection,"labels",this.locale)];return z(t.state,"assignees")&&a.push(St(xa,s.membersSection,"members",this.locale)),a}showTarget(t){const s=Br[t.type];s!==void 0&&(t.type==="member"&&!z(this.context().state,"assignees")||this.openSettings(s))}updated(){if(super.updated(),this.#h(),this.#m(),this.mode.kind==="picking-dependency"){this.#c();return}if(this.mode.kind==="filtering"){const s=this.renderRoot.querySelector("#filter-menu"),a=this.renderRoot.querySelector(`[data-filter-trigger="${CSS.escape(this.mode.key)}"]`),n=(s?.childElementCount??0)*Yr+Pr;s&&a&&this.#e.open(s,a,{width:Ur,height:n});return}if(this.mode.kind==="choosing-tab"){const s=this.renderRoot.querySelector("#tabs-menu"),a=this.renderRoot.querySelector("[data-tabs-more-trigger]");if(!s){this.mode=X;return}const n=s.childElementCount*mr+hr;a&&this.#e.open(s,a,{width:br,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,Wa(this.mode.point.x,this.mode.point.y),Cr)}#c(){const t=this.renderRoot instanceof ShadowRoot?this.renderRoot.activeElement:null;if(!t?.matches(".sp-dep-search")){this.mode=X;return}const s=t.getAttribute("aria-activedescendant");s&&this.renderRoot.querySelector(`#${CSS.escape(s)}`)?.scrollIntoView?.({block:"nearest"})}#p(){return this.renderRoot.querySelector(".story-panel")}#u(t){const s=this.#p(),a=this.renderRoot.querySelector(".dpk-main");return!s||!a||t.includes(s)||!t.includes(a)?!1:!t.some(n=>n instanceof Element&&(n.localName==="dpk-internal-usm-story-card"||n.hasAttribute("popover")))}#m(){const t=this.#p(),s=t?.dataset.story??null,a=this.#n;if(s===a)return;this.#n=s;const n=this.shadowRoot?.activeElement??null;if(t){(!n||!t.contains(n))&&t.focus({preventScroll:!0});return}a===null||n!==null&&n.isConnected||this.renderRoot.querySelector(`dpk-internal-usm-story-card[data-story="${CSS.escape(a)}"]`)?.focus({preventScroll:!0})}#h(){if(!(Ve(this.navigation)!==null)){this.#a=!1;return}const a=this.renderRoot.querySelector("dpk-matrix")?.shadowRoot?.querySelector(".matrix-scroll")??null,n=this.renderRoot.querySelector('dpk-internal-usm-story-card[data-highlight="on"]');this.#a||!a||!n||(this.#a=!0,ja(a,n,Ta),Xa(a,n,Ta))}#b(t){const s=ne(this.locale),a=ys(t.state,t.navigation);return l`
3659
+ ${lr(cr(s,t,a,{folded:this.#i.hidden,minimum:this.#i.minimum,open:this.mode.kind==="choosing-tab",toggle:()=>this.mode=this.mode.kind==="choosing-tab"?X:{kind:"choosing-tab"},close:()=>this.mode=X}),this.#g(s,t,a))}
3660
+ ${this.#v(s,t,a)} ${this.#f(s,t,a)}
3661
+ ${dr(s,t,this.mode,this.#l,this.#d,{pick:n=>{this.#d=n,this.requestUpdate()},confirm:n=>this.#_(n),cancel:()=>{this.#d=null,this.mode=X}})}
3662
+ `}#g(t,s,a){return a!=="map"||Ye(s.state).length===0?u:ar(t,s,{openFor:this.mode.kind==="filtering"?this.mode.key:null,toggle:n=>{const i=this.mode.kind==="filtering"&&this.mode.key===n;this.mode=i?X:{kind:"filtering",key:n}},close:()=>this.mode=X})}#f(t,s,a){if(a!=="map"&&a!=="table")return u;const n=vr(s);if(!n)return u;const i={search:this.mode.kind==="picking-dependency"?this.mode.search:null,set:d=>this.mode=d?{kind:"picking-dependency",search:d}:X},o={copied:this.#s,copy:d=>{this.#y(d)}};return kr(t,s,n,i,o,{open:d=>this.openSettings(d)})}async#y(t){await Me(t)&&(clearTimeout(this.#o),this.#s=t,this.requestUpdate(),this.#o=setTimeout(()=>{this.#s=null,this.requestUpdate()},zr))}#v(t,s,a){switch(a){case"table":return Or(t,s);case"milestones":return ir(t,s,uo(s.state));case"burndown":return Ro(t,s,new Date,this.#r);case"map":return this.#k(t,s)}}#k(t,s){return fo({m:t,context:s,drag:this.#t,handlers:{selectStory:a=>this.#w(a),dropOnCell:(a,n)=>this.#S(a,n),dropOnGroupCell:(a,n,i)=>this.#E(a,n,i),reorderMilestone:a=>this.#$(a),reorderActivity:a=>this.#x(a),reorderStep:a=>this.#T(a)},highlighted:Zn(s.state,s.navigation)})}#w(t){const s=this.context(),a=x(s.state,t);a&&s.navigate({step:a.stepId,story:a.id})}#S(t,s){const a=this.context();a.dispatch(Zs(a.state,t,s.item.id,s.hoveredId,s.place))}#E(t,s,a){const n=this.context(),i=x(n.state,a.item.id);if(!i)return;if(i.activityId!==t){this.#d=null,this.mode={kind:"picking-step",storyId:i.id,activityId:t,milestoneId:s,point:{x:a.event.clientX,y:a.event.clientY}};return}const o=Js(n.state,t,s,i.id,a.hoveredId,a.place);o&&n.dispatch(o)}#$(t){this.context().dispatch({type:"REORDER_MILESTONE",target:{type:"milestone",id:t.rowId},payload:{after:t.after}})}#x(t){this.context().dispatch({type:"REORDER_ACTIVITY",target:{type:"activity",id:t.columnId},payload:{after:t.after}})}#T(t){const s=t.columnId;this.context().dispatch({type:"REORDER_STEP",target:{type:"step",id:ce(s,t.subColumnId)},payload:{after:t.after===null?null:ce(s,t.after)}})}#_(t){const s=this.mode;if(s.kind!=="picking-step")return;const a=this.context();a.dispatch(Qs(a.state,s.storyId,s.activityId,t,s.milestoneId)),this.#d=null,this.mode=X}}const Ia=()=>{io(),Ki(),$i(),po(),customElements.get("dpk-view-usm")||customElements.define("dpk-view-usm",_a)},Fr=Object.freeze(Object.defineProperty({__proto__:null,DpkViewUsm:_a,IDLE_MODE:X,allUsmIds:j,applyUsmAction:ps,defineUsmElement:Ia,describeUsmAction:xs,dropAfter:co,emptyUsmBase:lt,findActivity:te,findMilestone:P,findStep:N,findStory:x,flatSteps:Ye,parseUsmBase:Xt,resolveCellDrop:Zs,resolveGroupDrop:Js,resolvePickedStepMove:Qs,resolveUsmNavigation:Ms,serializeUsmAction:Ts,storiesInCell:Pe,storyCountForStep:Qt,usmAction:Ln,usmActions:v,usmCommentTargets:Is,usmCurrentTarget:As,usmDefinitionFor:Ds,usmHasTarget:Ls,usmMessages:ne,usmTargetLabel:_s,usmTitle:gt},Symbol.toStringTag,{value:"Module"}));export{Ia as d,Fr as i};