dev-process-kit 0.3.0-beta.1 → 0.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/boards.js +1 -1
- package/dist/chunks/{shared-dnY35u9q.js → shared-B-DAJvq3.js} +1 -1
- package/dist/chunks/{shared-qk9TB_UM.js → shared-BT5Ayp_z.js} +1 -1
- package/dist/chunks/shared-BTf38OnF.js +1 -0
- package/dist/chunks/{shared-DdpMqkAH.js → shared-BXejn2ZQ.js} +1 -1
- package/dist/chunks/{shared-Cas88qVh.js → shared-BdIN9A6O.js} +1 -1
- package/dist/chunks/{shared-CnPCm4bJ.js → shared-C7wOrDIL.js} +1 -1
- package/dist/chunks/{shared-e9ia12Uz.js → shared-CE8X9qCv.js} +1 -1
- package/dist/chunks/{shared-Cejw83eH.js → shared-CPNa9lTa.js} +1 -1
- package/dist/chunks/{shared-df9XN7ns.js → shared-CPwjSgu0.js} +1 -1
- package/dist/chunks/{shared-DHVDag3x.js → shared-CpJDPnHA.js} +1 -1
- package/dist/chunks/{shared-a9QCZpxj.js → shared-D2qgtKhc.js} +1 -1
- package/dist/chunks/{shared-C-M2Nfmu.js → shared-DOKOFdYm.js} +1 -1
- package/dist/chunks/{shared-CfVpKPRY.js → shared-DgexE4u1.js} +20 -2
- package/dist/chunks/{shared-BX1EnRfr.js → shared-Dgse8blZ.js} +1 -1
- package/dist/chunks/{shared-D7VtCoY6.js → shared-DnJcdL52.js} +1 -1
- package/dist/chunks/{shared-D1iBuYZV.js → shared-HdOOfyqP.js} +1 -1
- package/dist/components.js +1 -1
- package/dist/index.js +1 -1
- package/dist/views/delegation-poker.js +1 -1
- package/dist/views/plain.js +1 -1
- package/dist/views/prototype.js +1 -1
- package/dist/views/slides.js +1 -1
- package/dist/views/task-board.js +1 -1
- package/dist/views/usm.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/shared-EYOAbLSo.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{ax as f,bj as va,ac as h,av as W,aU as we,a_ as We,ad as Ee,az as _e,bi as je,bD as ka,bE as wa,aV as yt,bF as vt,au as Ea,bk as Sa,aL as _,ay as k,aw as G,aa as Y,aM as L,aN as Ae,p as b,a8 as kt,a9 as g,t as ee,aO as H,aB as $a,N as xa,e as Ta,a5 as _a,S as A,P as v,a$ as U,ah as j,as as l,ai as m,aj as N,ak as Xe,al as Ze,B as Aa,j as Ia,b9 as wt,bm as Ma,bn as La,bp as Da,z as Et,l as J,aH as C,aS as Ie,aP as Q,H as Ra,bG as St,I as Je,bH as Oa,bc as Qe,y as et,bd as Na,V as $t,ag as Ca,aE as Ba,aF as xt,aG as tt,aT as Ya,aK as Ua,bI as Pa}from"./shared-DdpMqkAH.js";import{c as za,a as Fa}from"./shared-qk9TB_UM.js";import{w as Tt,C as _t,h as At,q as It,r as Mt,g as Lt,a as Va,x as Ga}from"./shared-df9XN7ns.js";import{L as Ha}from"./shared-CjW1DhGL.js";import{o as Me}from"./shared-EYOAbLSo.js";const Ka=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],qa=[["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"}]],Wa=[["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"}]],ja=[["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"}]],Xa=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Za=[["circle",{cx:"12",cy:"12",r:"10"}]],Ja=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Qa=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],en=[["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"}]],tn=[["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"}]],sn=[["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"}]],an=[["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"}]],nn=[["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"}]],rn=[["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"}]],Dt=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),st=(e,t,s)=>{const a=Dt(e),n=new Set,i=[...a.get(t)??[]];for(;i.length>0;){const r=i.pop();if(!(r===void 0||n.has(r))){if(r===s)return!0;n.add(r),i.push(...a.get(r)??[])}}return!1},on=e=>{const t=Dt(e),s=new Set,a=(n,i)=>{const r=i.indexOf(n);if(r>=0)return[...i.slice(r),n];if(s.has(n))return null;for(const o of t.get(n)??[]){const d=a(o,[...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},Le=["gray","blue","violet","green","amber","accent"],Rt=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],De=["estimates","assignees"],Ot=["stories","points","weighted"],Nt=f(h(),ka(),je(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")),Ct=f(Ee(),We(),we(0)),at=f(Ee(),We(),we(0)),Bt=W({milestoneId:_(f(h(),k(1))),statusId:_(f(h(),k(1))),stories:f(Ee(),yt(),we(0)),points:f(Ee(),We(),we(0))}),Re=f(h(),va()),dn=W({id:f(h(),k(1)),name:f(h(),k(1)),questions:Ae}),ln=W({id:L,name:f(h(),k(1)),actor:_(h()),steps:G(Y(dn),[]),questions:Ae}),pn=W({id:f(h(),k(1)),name:f(h(),k(1)),timeframe:_(h()),description:_(h()),dueDate:_(Nt),questions:Ae}),ae=_e(Le),nt=_e(Rt),it=f(h(),wa(),je(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),cn=W({url:it,label:_(f(h(),k(1)))}),un=W({id:L,name:f(h(),k(1)),tone:G(ae),icon:G(nt),weight:_(Ct)}),mn=W({id:L,name:f(h(),k(1)),tone:G(ae)}),Yt=f(h(),je(e=>e.trim()!=="","a comment needs some text")),hn=W({id:L,body:Yt,createdAt:_(Re)}),Ut=f(Ee(),yt(),we(1)),bn=W({id:L,number:_(Ut),name:f(h(),k(1)),description:_(h()),activityId:f(h(),k(1)),stepId:f(h(),k(1)),milestoneId:_(h()),statusId:_(h()),links:_(Y(cn)),labelIds:_(Y(f(h(),k(1)))),blockedBy:_(Y(f(h(),k(1)))),estimateId:_(f(h(),k(1))),assigneeId:_(f(h(),k(1))),comments:_(Y(hn)),questions:Ae}),gn=W({id:L,name:f(h(),k(1)),tone:G(ae)}),Pt=_e(De),zt=_e(Ot),fn=W({id:L,name:f(h(),k(1)),points:at}),yn=W({id:L,at:Re,tally:Y(Bt)}),vn=W({title:_(h()),features:G(Y(Pt),[]),measure:_(zt),doneStatusId:_(f(h(),k(1))),activities:G(Y(ln),[]),milestones:G(Y(pn),[]),statuses:G(Y(un),[]),labels:G(Y(mn),[]),members:G(Y(gn),[]),estimates:G(Y(fn),[]),stories:G(Y(bn),[]),snapshots:G(Y(yn),[])}),rt=e=>Le[e%Le.length]??"gray",Oe=e=>rt(e+1),Ft=e=>{const t=Ea(vn,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 r={...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??rt(T),icon:c.icon??"progress"})),labels:t.labels.map((c,T)=>({...c,tone:c.tone??Oe(T)})),members:t.members.map((c,T)=>({...c,tone:c.tone??Oe(T)})),features:De.filter(c=>t.features.includes(c))},o=new Map;for(const c of r.activities)for(const T of c.steps)o.set(T.id,c.id);const d=new Set(r.milestones.map(c=>c.id)),p=new Set(r.statuses.map(c=>c.id)),u=new Set(r.labels.map(c=>c.id));if(r.doneStatusId!==void 0&&!p.has(r.doneStatusId))throw new Error(`the base references unknown doneStatusId "${r.doneStatusId}"`);const w=new Set,E=(c,T)=>{if(w.has(T))throw new Error(`duplicate id "${T}" in ${c}`);w.add(T)};for(const c of r.activities){E("activities",c.id);for(const T of c.steps)E("steps",T.id)}for(const c of r.milestones)E("milestones",c.id);for(const c of r.statuses)E("statuses",c.id);for(const c of r.labels)E("labels",c.id);for(const c of r.members)E("members",c.id);for(const c of r.estimates)E("estimates",c.id);for(const c of r.snapshots)E("snapshots",c.id);const S=new Set(r.estimates.map(c=>c.id)),M=new Set(r.members.map(c=>c.id));for(const c of r.stories){E("stories",c.id);for(const ke of c.comments??[])E("story comments",ke.id);const T=o.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 ft=ve.find(ke=>!u.has(ke));if(ft!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${ft}"`);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&&!M.has(c.assigneeId))throw new Error(`story "${c.id}" references unknown assigneeId "${c.assigneeId}"`)}for(const c of r.snapshots){const T=Vt(r,c.tally);if(T!==null)throw new Error(`snapshot "${c.id}" ${T}`)}const $=new Set(r.stories.map(c=>c.id));for(const c of r.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 O=on(r.stories);if(O!==null)throw new Error(`stories block one another in a cycle: ${O.join(" \u2192 ")}`);return r},Vt=(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=Ne(a);if(s.has(n))return`tallies "${n}" twice`;s.add(n)}return null},Ne=e=>`${e.milestoneId??""}/${e.statusId??""}`,Gt=()=>({features:[],activities:[],milestones:[],statuses:[],labels:[],members:[],estimates:[],stories:[],snapshots:[]}),te=(e,t)=>{if(t!==void 0)return e.activities.find(s=>s.id===t)},le=(e,t)=>`${e}.${t}`,B=(e,t)=>{if(t===void 0)return;const s=Sa(t,2);if(s){const[a,n]=s;if(a===void 0||n===void 0)return;const i=e.activities.find(o=>o.id===a),r=i?.steps.find(o=>o.id===n);return i&&r?{activity:i,step:r}: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)},Ht=(e,t)=>K(e,t.assigneeId),F=(e,t)=>{if(t!==void 0)return e.estimates.find(s=>s.id===t)},Se=(e,t)=>{if(t!==void 0)return e.snapshots.find(s=>s.id===t)},Kt=(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)},Ce=e=>e.activities.flatMap(t=>t.steps.map(s=>({activity:t,step:s}))),kn=e=>({...e,stories:vt(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Be=(e,t,s)=>e.stories.filter(a=>a.stepId===t&&(a.milestoneId??void 0)===s),qt=(e,t,s)=>e.stories.filter(a=>a.activityId===t&&(a.milestoneId??void 0)===s),X=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)],Wt=(e,t)=>e.stories.filter(s=>s.stepId===t).length,jt=g({feature:Pt,enabled:$a()}),y={SET_ACTIVITY_NAME:b("SET_ACTIVITY_NAME","activity",g({name:f(h(),k(1))})),SET_ACTIVITY_ACTOR:b("SET_ACTIVITY_ACTOR","activity",g({actor:h()})),SET_STEP_NAME:b("SET_STEP_NAME","step",g({name:f(h(),k(1))})),REORDER_STEP:b("REORDER_STEP","step",g({after:H(h())}),{mode:"sequence"}),REORDER_ACTIVITY:b("REORDER_ACTIVITY","activity",g({after:H(h())}),{mode:"sequence"}),ADD_ACTIVITY:b("ADD_ACTIVITY","page",g({id:L,name:f(h(),k(1))}),{dedupeKey:ee}),ADD_STEP:b("ADD_STEP","activity",g({id:L,name:f(h(),k(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(),k(1))})),SET_STORY_DESCRIPTION:b("SET_STORY_DESCRIPTION","story",g({description:h()})),SET_STORY_MILESTONE:b("SET_STORY_MILESTONE","story",g({milestoneId:H(h())})),MOVE_STORY:b("MOVE_STORY","story",g({activityId:f(h(),k(1)),stepId:f(h(),k(1)),milestoneId:H(h()),after:H(h())}),{mode:"sequence"}),REORDER_STORY:b("REORDER_STORY","story",g({after:H(h())}),{mode:"sequence"}),ADD_STORY:b("ADD_STORY","step",g({id:L,name:f(h(),k(1)),activityId:f(h(),k(1)),milestoneId:_(h()),number:_(Ut)}),{dedupeKey:ee}),DELETE_STORY:b("DELETE_STORY","story",g({})),ADD_STORY_LINK:b("ADD_STORY_LINK","story",g({url:it,label:_(f(h(),k(1)))})),REMOVE_STORY_LINK:b("REMOVE_STORY_LINK","story",g({url:h()})),ADD_STORY_COMMENT:b("ADD_STORY_COMMENT","story",g({id:L,body:Yt,createdAt:_(Re)}),{dedupeKey:ee}),DELETE_STORY_COMMENT:b("DELETE_STORY_COMMENT","story",g({commentId:f(h(),k(1))})),SET_STORY_STATUS:b("SET_STORY_STATUS","story",g({statusId:f(h(),k(1))})),SET_MILESTONE_NAME:b("SET_MILESTONE_NAME","milestone",g({name:f(h(),k(1))})),ADD_MILESTONE:b("ADD_MILESTONE","page",g({id:L,name:f(h(),k(1))}),{dedupeKey:ee}),DELETE_MILESTONE:b("DELETE_MILESTONE","milestone",g({})),REORDER_MILESTONE:b("REORDER_MILESTONE","milestone",g({after:H(h())}),{mode:"sequence"}),SET_MILESTONE_DUE_DATE:b("SET_MILESTONE_DUE_DATE","milestone",g({dueDate:H(Nt)})),ADD_STATUS:b("ADD_STATUS","page",g({id:L,name:f(h(),k(1)),tone:ae,icon:_(nt)}),{dedupeKey:ee}),SET_STATUS_NAME:b("SET_STATUS_NAME","status",g({name:f(h(),k(1))})),SET_STATUS_TONE:b("SET_STATUS_TONE","status",g({tone:ae})),SET_STATUS_ICON:b("SET_STATUS_ICON","status",g({icon:nt})),SET_STATUS_WEIGHT:b("SET_STATUS_WEIGHT","status",g({weight:Ct})),SET_MEASURE:b("SET_MEASURE","page",g({measure:zt})),SET_DONE_STATUS:b("SET_DONE_STATUS","status",g({})),DELETE_STATUS:b("DELETE_STATUS","status",g({})),REORDER_STATUS:b("REORDER_STATUS","status",g({after:H(h())}),{mode:"sequence"}),ADD_LABEL:b("ADD_LABEL","page",g({id:L,name:f(h(),k(1)),tone:ae}),{dedupeKey:ee}),SET_LABEL_NAME:b("SET_LABEL_NAME","label",g({name:f(h(),k(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:H(h())}),{mode:"sequence"}),ADD_STORY_LABEL:b("ADD_STORY_LABEL","story",g({labelId:f(h(),k(1))})),REMOVE_STORY_LABEL:b("REMOVE_STORY_LABEL","story",g({labelId:f(h(),k(1))})),ADD_STORY_BLOCKER:b("ADD_STORY_BLOCKER","story",g({blockerId:f(h(),k(1))})),REMOVE_STORY_BLOCKER:b("REMOVE_STORY_BLOCKER","story",g({blockerId:f(h(),k(1))})),ADD_MEMBER:b("ADD_MEMBER","page",g({id:L,name:f(h(),k(1)),tone:ae}),{dedupeKey:ee}),SET_MEMBER_NAME:b("SET_MEMBER_NAME","member",g({name:f(h(),k(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:H(h())}),{mode:"sequence"}),SET_STORY_ASSIGNEE:b("SET_STORY_ASSIGNEE","story",g({memberId:H(f(h(),k(1)))})),ADD_ESTIMATE:b("ADD_ESTIMATE","page",g({id:L,name:f(h(),k(1)),points:at}),{dedupeKey:ee}),SET_ESTIMATE_NAME:b("SET_ESTIMATE_NAME","estimate",g({name:f(h(),k(1))})),SET_ESTIMATE_POINTS:b("SET_ESTIMATE_POINTS","estimate",g({points:at})),DELETE_ESTIMATE:b("DELETE_ESTIMATE","estimate",g({})),REORDER_ESTIMATE:b("REORDER_ESTIMATE","estimate",g({after:H(h())}),{mode:"sequence"}),SET_STORY_ESTIMATE:b("SET_STORY_ESTIMATE","story",g({estimateId:H(f(h(),k(1)))})),RECORD_SNAPSHOT:b("RECORD_SNAPSHOT","page",g({id:L,at:Re,tally:Y(Bt)}),{dedupeKey:ee}),DELETE_SNAPSHOT:b("DELETE_SNAPSHOT","snapshot",g({})),SET_FEATURE:b("SET_FEATURE","page",jt,{dedupeKey:e=>{const t=kt(jt,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},wn={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}})},he=e=>{const t=e.statuses.findIndex(s=>s.id===e.doneStatusId);return t>=0?t:e.statuses.length-1},Xt=e=>e.statuses[he(e)],Zt=(e,t)=>{if(t===void 0)return!1;const s=e.statuses.findIndex(a=>a.id===t);return s>=0&&s>=he(e)},Jt=e=>e.statuses.slice(0,he(e)+1),En=(e,t)=>e.milestones.find(s=>s.id===t.milestone)??e.milestones.find(s=>s.dueDate!==void 0)??e.milestones[0],be=e=>z(e,"estimates")?e.measure??(e.estimates.length>0?"points":"stories"):"stories",Qt=e=>e.weight??1,se=10,es=e=>{const{statuses:t}=e,s=he(e);if(be(e)!=="weighted")return t.map((r,o)=>o<s?1:0);const a=t.slice(0,s).map(Qt),n=Ye(a),i=a.map(r=>n>0?r/n:1/a.length);return t.map((r,o)=>Ye(i.slice(o)))},Sn=1,ts=(e,t)=>F(e,t.estimateId)?.points??Sn,ss=e=>{const t=new Map;for(const n of e.stories){const i={...n.milestoneId===void 0?{}:{milestoneId:n.milestoneId},...n.statusId===void 0?{}:{statusId:n.statusId}},r=Ne(i),o=t.get(r)??{...i,stories:0,points:0};t.set(r,{...o,stories:o.stories+1,points:o.points+ts(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 r=t.get(Ne({milestoneId:n,statusId:i}));return r?[r]:[]}))},$n=(e,t,s)=>{const a=be(e),i=[...vt(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:s,tally:ss(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:xn(e.statuses,d.tally,t,a)})),r=es(e),o=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:Tn(e.milestones.find(d=>d.id===t)?.dueDate),combined:i.map(d=>o(d,d.values.reduce((p,u,w)=>p+u*(r[w]??0),0))),byStatus:e.statuses.slice(1).map((d,p)=>({status:d,points:i.map(u=>o(u,Ye(u.values.slice(0,p+1))))}))}},xn=(e,t,s,a)=>e.map(n=>Ye(t.filter(i=>i.milestoneId===s&&i.statusId===n.id).map(i=>a==="stories"?i.stories:i.points))),Tn=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()},pe=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())}`},Ye=e=>e.reduce((t,s)=>t+s,0),as="STORY-",ge=e=>`${as}${e.number}`,ns=(...e)=>Math.max(0,...e.flatMap(t=>t.stories.map(s=>s.number)))+1,_n=(e,t)=>{if(t===void 0)return;const s=x(e,t);if(s)return s;const a=new RegExp(`^${as}([1-9]\\d*)$`,"i").exec(t.trim());if(!a)return;const n=Number(a[1]);return e.stories.find(i=>i.number===n)},is=(e,t)=>{const s=xa(y,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:r,...o}=i;return n===""?o:{...o,actor:n}})}:null}case"SET_STEP_NAME":{const{name:n}=s.payload,i=B(e,a);return i?{...e,activities:e.activities.map(r=>r.id===i.activity.id?{...r,steps:r.steps.map(o=>o.id===i.step.id?{...o,name:n}:o)}:r)}:null}case"REORDER_STEP":{const{after:n}=s.payload,i=B(e,a);if(!i)return null;const r=n===null?null:B(e,n);if(n!==null&&(!r||r.activity.id!==i.activity.id))return null;const o=ce(i.activity.steps,i.step.id,r?.step.id??null);return o===null?null:{...e,activities:e.activities.map(d=>d.id===i.activity.id?{...d,steps:o}:d)}}case"REORDER_ACTIVITY":{const{after:n}=s.payload,i=ce(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(r=>r.id===a);return i?i.steps.some(r=>r.id===n.id)?e:{...e,activities:e.activities.map(r=>r.id===a?{...r,steps:[...r.steps,{id:n.id,name:n.name}]}:r)}:null}case"DELETE_ACTIVITY":{const n=e.activities.find(r=>r.id===a);if(!n)return null;const i=new Set(n.steps.map(r=>r.id));return dt({...e,activities:e.activities.filter(r=>r.id!==a)},r=>r.activityId===a||i.has(r.stepId))}case"DELETE_STEP":{const n=B(e,a);return n?dt({...e,activities:e.activities.map(i=>i.id===n.activity.id?{...i,steps:i.steps.filter(r=>r.id!==n.step.id)}:i)},i=>i.activityId===n.activity.id&&i.stepId===n.step.id):null}case"SET_STORY_NAME":{const{name:n}=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?ot(i):{...i,milestoneId:n})}case"MOVE_STORY":{const n=s.payload,i=x(e,a);if(!i)return null;const r=B(e,n.stepId);if(!r||r.activity.id!==n.activityId||n.milestoneId!==null&&!P(e,n.milestoneId))return null;const o=n.milestoneId??void 0,d=o===void 0?{...ot(i),activityId:r.activity.id,stepId:r.step.id}:{...i,activityId:r.activity.id,stepId:r.step.id,milestoneId:o};return ds(e,d,n.after)}case"REORDER_STORY":{const{after:n}=s.payload,i=x(e,a);return i?ds(e,i,n,!0):null}case"ADD_STORY":{const n=s.payload,i=B(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 r=n.number!==void 0&&e.stories.some(d=>d.number===n.number),o={id:n.id,number:n.number===void 0||r?ns(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,o]}}case"DELETE_STORY":return e.stories.some(n=>n.id===a)?dt(e,n=>n.id===a):null;case"ADD_STORY_LINK":{const{url:n,label:i}=s.payload,r=x(e,a);if(!r)return null;if(r.links?.some(d=>d.url===n))return e;const o=i===void 0?{url:n}:{url:n,label:i};return q(e,a,d=>({...d,links:[...d.links??[],o]}))}case"REMOVE_STORY_LINK":{const{url:n}=s.payload;return x(e,a)?.links?.some(r=>r.url===n)?q(e,a,r=>{const o=(r.links??[]).filter(u=>u.url!==n),{links:d,...p}=r;return o.length===0?p:{...p,links:o}}):null}case"ADD_STORY_COMMENT":{const{id:n,body:i,createdAt:r}=s.payload,o=x(e,a);if(!o)return null;if(o.comments?.some(p=>p.id===n))return e;if(X(e).includes(n))return null;const d=r===void 0?{id:n,body:i}:{id:n,body:i,createdAt:r};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(r=>r.id===n)?q(e,a,r=>{const o=(r.comments??[]).filter(u=>u.id!==n),{comments:d,...p}=r;return o.length===0?p:{...p,comments:o}}):null}case"SET_STORY_STATUS":{const{statusId:n}=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?ot(n):n),snapshots:lt(e,n=>n.milestoneId===a?oe(n,"milestoneId"):n)}:null;case"REORDER_MILESTONE":{const{after:n}=s.payload,i=ce(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?oe(i,"dueDate"):{...i,dueDate:n})}:null}case"ADD_STATUS":{const{id:n,name:i,tone:r,icon:o}=s.payload;if(e.statuses.some(p=>p.id===n))return e;const d=[...e.statuses,{id:n,name:i,tone:r,icon:o??"progress"}];return e.statuses.length===0?{...e,statuses:d,stories:e.stories.map(p=>({...p,statusId:n})),snapshots:lt(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 be(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(r=>r.id!==a),i=n[0]?.id;return{...e.doneStatusId===a?oe(e,"doneStatusId"):e,statuses:n,stories:e.stories.map(r=>r.statusId!==a?r:i===void 0?An(r):{...r,statusId:i}),snapshots:lt(e,r=>r.statusId!==a?r:i===void 0?oe(r,"statusId"):{...r,statusId:i})}}case"REORDER_STATUS":{const{after:n}=s.payload,i=ce(e.statuses,a,n);return i===null?null:{...e,statuses:i}}case"ADD_LABEL":{const{id:n,name:i,tone:r}=s.payload;return Z(e,n)?e:{...e,labels:[...e.labels,{id:n,name:i,tone:r}]}}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)?rs(n,a):n)}:null;case"REORDER_LABEL":{const{after:n}=s.payload,i=ce(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,r=>({...r,labelIds:[...r.labelIds??[],n]}))}case"REMOVE_STORY_LABEL":{const{labelId:n}=s.payload;return x(e,a)?.labelIds?.includes(n)?q(e,a,i=>rs(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||st(e.stories,n,a)?null:q(e,a,r=>({...r,blockedBy:[...r.blockedBy??[],n]}))}case"REMOVE_STORY_BLOCKER":{const{blockerId:n}=s.payload;return x(e,a)?.blockedBy?.includes(n)?q(e,a,i=>os(i,new Set([n]))):null}case"ADD_MEMBER":{const{id:n,name:i,tone:r}=s.payload;return K(e,n)?e:{...e,members:[...e.members,{id:n,name:i,tone:r}]}}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?oe(n,"assigneeId"):n)}:null;case"REORDER_MEMBER":{const{after:n}=s.payload,i=ce(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?oe(i,"assigneeId"):{...i,assigneeId:n})}case"ADD_ESTIMATE":{const{id:n,name:i,points:r}=s.payload;return F(e,n)?e:{...e,estimates:[...e.estimates,{id:n,name:i,points:r}]}}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?oe(n,"estimateId"):n)}:null;case"REORDER_ESTIMATE":{const{after:n}=s.payload,i=ce(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?oe(i,"estimateId"):{...i,estimateId:n})}case"RECORD_SNAPSHOT":{const{id:n,at:i,tally:r}=s.payload;return Se(e,n)?e:Vt(e,r)!==null?null:{...e,snapshots:[...e.snapshots,{id:n,at:i,tally:r}]}}case"DELETE_SNAPSHOT":return Se(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 r=De.filter(o=>o===n?i:e.features.includes(o));return{...e,features:r}}default:return Ta(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,ot=e=>{const{milestoneId:t,...s}=e;return s},rs=(e,t)=>{const{labelIds:s=[],...a}=e,n=s.filter(i=>i!==t);return n.length===0?a:{...a,labelIds:n}},os=(e,t)=>{const{blockedBy:s=[],...a}=e,n=s.filter(i=>!t.has(i));return n.length===0?a:{...a,blockedBy:n}},dt=(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))?os(a,s):a)}},oe=(e,t)=>{const{[t]:s,...a}=e;return a},lt=(e,t)=>e.snapshots.map(s=>{const a=new Map;for(const n of s.tally.map(t)){const i=Ne(n),r=a.get(i);a.set(i,r?{...r,stories:r.stories+n.stories,points:r.points+n.points}:n)}return{...s,tally:[...a.values()]}}),An=e=>{const{statusId:t,...s}=e;return s},ds=(e,t,s,a=!1)=>{const n=t.milestoneId??void 0,i=e.stories.filter(S=>S.id!==t.id),r=i.filter(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n);if(s!==null){const S=i.find(M=>M.id===s);if(!S||S.stepId!==t.stepId||(S.milestoneId??void 0)!==n)return null;if(a){const M=x(e,t.id);if(!M||S.stepId!==M.stepId||(S.milestoneId??void 0)!==(M.milestoneId??void 0))return null}}const o=s===null?[t,...r]:ls(r,t,s),d=i.findIndex(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n),p=new Set(r.map(S=>S.id)),u=i.filter(S=>!p.has(S.id)),w=d<0?u.length:Math.min(d,u.length),E=[...u.slice(0,w),...o,...u.slice(w)];return{...e,stories:E}},ce=(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 ls(n,a,s)},ls=(e,t,s)=>{const a=[...e],n=s===null?-1:a.findIndex(i=>i.id===s);return a.splice(n+1,0,t),a},ue=_a({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",statusesTab:"Statuses",labelsTab:"Labels",burndownTab:"Burndown",shareOfStories:e=>`${e}% of all stories`,coverageLabel:"Backbone coverage",coverage:(e,t)=>`${e} / ${t} steps`,storiesLabel:"Stories",timeframeUnset:"Timing not set",milestoneNoDescription:"No description yet.",noMilestonesTitle:"No milestones yet",noMilestonesBody:"Add a milestone to slice the map into releases.",commentCountAria:e=>e===1?"1 comment":`${e} comments`,reviewCountAria:e=>e===1?"1 review comment":`${e} review comments`,statusNameLabel:"Status name",statusToneLabel:"Color",toneName:e=>({gray:"Gray",blue:"Blue",violet:"Violet",green:"Green",amber:"Amber",accent:"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)=>ps("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",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",membersTab:"Members",memberNameLabel:"Member name",noMembersTitle:"No members yet",noMembersBody:"Add the people on the team, then assign each story to the one who takes it on.",newMemberButton:"+ Member",deleteMemberAria:"Delete this member",storyAssigneeLabel:"Assignee",noAssignee:"No one",storyNoMembers:"No members yet.",manageMembers:"Manage members",assigneeChipTitle:e=>`Assigned to ${e}`,noAssigneeFilter:"Unassigned",moreTabsLabel:"More tabs",enableFeature:"Turn on feature",disableFeature:"Turn off feature",featureName:e=>({estimates:"Estimates & burndown",assignees:"Members & assignees"})[e],featureHint:e=>({estimates:"An estimate scale for the stories and a burndown per milestone.",assignees:"The members of the team and who each story is assigned to."})[e],featuresNote:"Turning a feature off only hides it: what it holds is kept.",newActivityName:"New activity",newStepName:"New step",newMilestoneName:"New milestone",newStoryName:"New story",newStatusName:"New status",newLabelName:"New label",newMemberName:"New member",newEstimateName:"New"},ja:{renameActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D\u3092\u5909\u66F4",changeActivityActor:"\u4F53\u9A13\u3059\u308B\u4EBA\u3092\u5909\u66F4",renameStep:"\u30B9\u30C6\u30C3\u30D7\u540D\u3092\u5909\u66F4",reorderStep:"\u30B9\u30C6\u30C3\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",reorderActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",addActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u8FFD\u52A0",addStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",deleteActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u524A\u9664",deleteStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u524A\u9664",renameStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u540D\u3092\u5909\u66F4",updateStoryDescription:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u8AAC\u660E\u3092\u66F4\u65B0",changeMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u5909\u66F4",moveStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u79FB\u52D5",reorderStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",deleteStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",renameMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D\u3092\u5909\u66F4",addMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0",deleteMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u524A\u9664",reorderMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u9806\u5E8F\u3092\u5909\u66F4",changeStoryStatus:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0",renameStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D\u3092\u5909\u66F4",changeStatusTone:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u8272\u3092\u5909\u66F4",changeStatusIcon:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30A2\u30A4\u30B3\u30F3\u3092\u5909\u66F4",addStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30EA\u30F3\u30AF\u3092\u8FFD\u52A0",removeStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30EA\u30F3\u30AF\u3092\u524A\u9664",addStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",deleteStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",reorderStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u9806\u5E8F\u3092\u5909\u66F4",addLabel:"\u30E9\u30D9\u30EB\u3092\u8FFD\u52A0",renameLabel:"\u30E9\u30D9\u30EB\u540D\u3092\u5909\u66F4",changeLabelTone:"\u30E9\u30D9\u30EB\u306E\u8272\u3092\u5909\u66F4",deleteLabel:"\u30E9\u30D9\u30EB\u3092\u524A\u9664",reorderLabel:"\u30E9\u30D9\u30EB\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30E9\u30D9\u30EB\u3092\u4ED8\u4E0E",removeStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30E9\u30D9\u30EB\u3092\u5916\u3059",addStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u8FFD\u52A0",removeStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u5916\u3059",changeMilestoneDueDate:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u671F\u65E5\u3092\u5909\u66F4",changeStatusWeight:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F\u3092\u5909\u66F4",setDoneStatus:"\u5B8C\u4E86\u3068\u3059\u308B\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u8FFD\u52A0",renameEstimate:"\u898B\u7A4D\u3082\u308A\u540D\u3092\u5909\u66F4",changeEstimatePoints:"\u898B\u7A4D\u3082\u308A\u306E\u30DD\u30A4\u30F3\u30C8\u3092\u5909\u66F4",deleteEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u524A\u9664",reorderEstimate:"\u898B\u7A4D\u3082\u308A\u306E\u9806\u5E8F\u3092\u5909\u66F4",setStoryEstimate:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u898B\u7A4D\u3082\u308B",recordSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332",deleteSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u524A\u9664",toValue:e=>`\u2192 \u300C${e}\u300D`,fromTo:(e,t)=>`\u300C${e}\u300D\u2192\u300C${t}\u300D`,added:e=>`+ \u300C${e}\u300D`,removed:e=>`\u2212 \u300C${e}\u300D`,toFront:"\u2192 \u5148\u982D\u3078",afterName:e=>`\u2192 \u300C${e}\u300D\u306E\u76F4\u5F8C\u3078`,toUnassigned:"\u2192 \u672A\u5272\u5F53\u3078",toName:e=>`\u2192 ${e}`,snapshotSummary:(e,t)=>`${e} \xB7 ${t} \u30B9\u30C8\u30FC\u30EA\u30FC`,activityGroup:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",stepGroup:"\u30B9\u30C6\u30C3\u30D7",storyGroup:"\u30B9\u30C8\u30FC\u30EA\u30FC",milestoneGroup:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusGroup:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelGroup:"\u30E9\u30D9\u30EB",estimateGroup:"\u898B\u7A4D\u3082\u308A",snapshotGroup:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8",mapGroup:"\u30DE\u30C3\u30D7",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"\u30DE\u30C3\u30D7\u5168\u4F53",unassigned:"\u672A\u5272\u5F53",emptyTitle:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",emptyBody:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3068\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u3053\u3053\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u30DE\u30C3\u30D7\u304C\u73FE\u308C\u307E\u3059\u3002",firstActivityButton:"+ \u6700\u521D\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",groupingLabel:"\u307E\u3068\u3081\u308B\u5358\u4F4D",groupViewTab:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7",groupAxisHeader:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7 \u2192",activityAxis:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 \u2192",milestoneAxis:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3 \u2193",stepNameLabel:"\u30B9\u30C6\u30C3\u30D7\u540D",activityNameLabel:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D",milestoneNameLabel:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D",addStepAria:"\u3053\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306B\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",newActivityButton:"+ \u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newMilestoneButton:"+ \u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",addCellButton:"+ \u8FFD\u52A0",addStoryCellAria:"\u3053\u306E\u30DE\u30B9\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",storyCount:e=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC`,pageTabsLabel:"\u30DA\u30FC\u30B8",mapTab:"User Story Mapping",tableTab:"\u30C6\u30FC\u30D6\u30EB",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusesTab:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelsTab:"\u30E9\u30D9\u30EB",burndownTab:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",shareOfStories:e=>`\u5168\u30B9\u30C8\u30FC\u30EA\u30FC\u306E ${e}%`,coverageLabel:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u306E\u7DB2\u7F85",coverage:(e,t)=>`${e} / ${t} \u30B9\u30C6\u30C3\u30D7`,storiesLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC",timeframeUnset:"\u6642\u671F\u672A\u5B9A",milestoneNoDescription:"\u8AAC\u660E\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",noMilestonesTitle:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noMilestonesBody:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u3092\u30EA\u30EA\u30FC\u30B9\u3054\u3068\u306B\u533A\u5207\u308C\u307E\u3059\u3002",commentCountAria:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,reviewCountAria:e=>`\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,statusNameLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D",statusToneLabel:"\u8272",toneName:e=>({gray:"\u30B0\u30EC\u30FC",blue:"\u9752",violet:"\u7D2B",green:"\u7DD1",amber:"\u9EC4",accent:"\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)=>ps("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",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",membersTab:"\u30E1\u30F3\u30D0\u30FC",memberNameLabel:"\u30E1\u30F3\u30D0\u30FC\u540D",noMembersTitle:"\u30E1\u30F3\u30D0\u30FC\u304C\u307E\u3060\u3044\u307E\u305B\u3093",noMembersBody:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u8FFD\u52A0\u3057\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F15\u304D\u53D7\u3051\u308B\u4EBA\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002",newMemberButton:"+ \u30E1\u30F3\u30D0\u30FC",deleteMemberAria:"\u3053\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u524A\u9664",storyAssigneeLabel:"\u62C5\u5F53\u8005",noAssignee:"\u306A\u3057",storyNoMembers:"\u30E1\u30F3\u30D0\u30FC\u306F\u307E\u3060\u3044\u307E\u305B\u3093\u3002",manageMembers:"\u30E1\u30F3\u30D0\u30FC\u3092\u7BA1\u7406",assigneeChipTitle:e=>`\u62C5\u5F53: ${e}`,noAssigneeFilter:"\u62C5\u5F53\u8005\u306A\u3057",moreTabsLabel:"\u307B\u304B\u306E\u30BF\u30D6",enableFeature:"\u6A5F\u80FD\u3092\u6709\u52B9\u5316",disableFeature:"\u6A5F\u80FD\u3092\u7121\u52B9\u5316",featureName:e=>({estimates:"\u898B\u7A4D\u3082\u308A\u3068\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",assignees:"\u30E1\u30F3\u30D0\u30FC\u3068\u62C5\u5F53\u8005"})[e],featureHint:e=>({estimates:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u898B\u7A4D\u3082\u308A\u3068\u3001\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3054\u3068\u306E\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u3002",assignees:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3068\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u62C5\u5F53\u8005\u3002"})[e],featuresNote:"\u7121\u52B9\u306B\u3057\u3066\u3082\u96A0\u3059\u3060\u3051\u3067\u3001\u5165\u529B\u3057\u305F\u5185\u5BB9\u306F\u6B8B\u308A\u307E\u3059\u3002",newActivityName:"\u65B0\u3057\u3044\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newStepName:"\u65B0\u3057\u3044\u30B9\u30C6\u30C3\u30D7",newMilestoneName:"\u65B0\u3057\u3044\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",newStoryName:"\u65B0\u3057\u3044\u30B9\u30C8\u30FC\u30EA\u30FC",newStatusName:"\u65B0\u3057\u3044\u30B9\u30C6\u30FC\u30BF\u30B9",newLabelName:"\u65B0\u3057\u3044\u30E9\u30D9\u30EB",newMemberName:"\u65B0\u3057\u3044\u30E1\u30F3\u30D0\u30FC",newEstimateName:"\u65B0\u898F"}}),ps=(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)}},pt=/^[A-Z][A-Z0-9]+-\d+$/,cs=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},In=(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 r=`${s}/${a}`;return(n==="issues"||n==="pull"||n==="discussions")&&i&&/^\d+$/.test(i)?{kind:"github",text:`#${i}`,title:`${r}#${i}`}:n==="commit"&&i?{kind:"github",text:i.slice(0,7),title:`${r}@${i}`}:{kind:"github",text:r,title:r}},Mn=(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}},Ln=(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=>pt.test(n));return a&&pt.test(a)?{kind:"jira",text:a,title:`${t} ${a}`}:{kind:"jira",text:"Jira",title:t}},Dn=(e,t)=>{if(e!=="linear.app")return null;const s=t[1]==="issue"?t[2]?.toUpperCase():void 0;return s&&pt.test(s)?{kind:"linear",text:s,title:s}:{kind:"linear",text:"Linear",title:e}},Rn=(e,t)=>{if(e!=="figma.com")return null;const[s,,a]=t;if((s==="file"||s==="design"||s==="proto"||s==="board")&&a){const n=cs(a);return{kind:"figma",text:n,title:n}}return{kind:"figma",text:"Figma",title:e}},On=(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":cs(a);return{kind:"notion",text:n,title:n}},Ue=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 In(s,a)??Mn(s,a)??Ln(t,s,a)??Dn(s,a)??Rn(s,a)??On(s,a)??{kind:"web",text:s,title:e}},Nn=["map","table","milestones","statuses","labels","members","burndown"],Cn={members:"assignees",burndown:"estimates"},us=e=>Nn.filter(t=>{const s=Cn[t];return s===void 0||z(e,s)}),ms=(e,t)=>us(e).find(s=>s===t.tab)??"map",$e=(e,t)=>Zt(e,t.statusId),hs=(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)}},Bn=(e,t)=>{const s=new Set(x(e,t)?.blockedBy??[]);return e.stories.filter(a=>a.id!==t&&!s.has(a.id)&&!st(e.stories,a.id,t))},Yn=(e,t)=>e.stories.filter(s=>s.id!==t&&!s.blockedBy?.includes(t)&&!st(e.stories,t,s.id)),Un=["critical-path"],Pe=e=>Un.find(t=>t===e.highlight)??null,Pn=(e,t)=>{if($e(e,t))return 0;const s=be(e)==="stories"?1:ts(e,t),a=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return s*(es(e)[a]??1)},zn=(e,t)=>Pe(t)==="critical-path"?bs(e).ids:null,Fn=1e-9,bs=e=>{const t=new Map(e.stories.map(d=>[d.id,Pn(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=gs(t,s),i=gs(t,a),r=[...t].map(([d,p])=>[d,n(d)+i(d)-p]),o=Math.max(0,...r.map(([,d])=>d));return{ids:new Set(r.filter(([,d])=>o-d<Fn).map(([d])=>d)),work:o}},gs=(e,t)=>{const s=new Map,a=n=>{const i=s.get(n);if(i!==void 0)return i;const r=(e.get(n)??0)+Math.max(0,...(t.get(n)??[]).map(a));return s.set(n,r),r};return a},xe=["status","label","estimate","assignee"],ne="~none",ie={key:"done",value:"show"},fs=(e,t)=>t[ie.key]===ie.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(s=>Zt(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),ne];case"estimate":return!z(e,"estimates")||e.estimates.length===0?[]:[...e.estimates.map(s=>s.id),ne];case"assignee":return!z(e,"assignees")||e.members.length===0?[]:[...e.members.map(s=>s.id),ne]}},ze=(e,t)=>{const s=fs(e,t),a=n=>{const i=t[n];if(i===void 0||i==="")return new Set;const r=new Set(i.split(","));return new Set(fe(e,n).filter(o=>r.has(o)&&!s.has(o)))};return{status:a("status"),label:a("label"),estimate:a("estimate"),assignee:a("assignee"),hiddenStatusIds:s}},ys=(e,t,s)=>{const a=fe(e,t).filter(n=>s.has(n));return a.length===0?null:a.join(",")},Vn=(e,t)=>{const s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s},Gn=e=>xe.some(t=>e[t].size>0),vs=(e,t)=>{const s=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&Fe(e.status,t.statusId===void 0?[]:[t.statusId])&&Fe(e.label,s.length===0?[ne]:s)&&Fe(e.estimate,[t.estimateId??ne])&&Fe(e.assignee,[t.assigneeId??ne])},Fe=(e,t)=>e.size===0||t.some(s=>e.has(s)),R=(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)},de=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,Hn={SET_ACTIVITY_NAME:(e,t,s)=>({title:e.renameActivity,tone:"update",body:R(e,te(s,t.target.id)?.name,v(y.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,s)=>{const a=v(y.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:a===""?e.removed(te(s,t.target.id)?.actor??""):R(e,te(s,t.target.id)?.actor,a)}},SET_STEP_NAME:(e,t,s)=>({title:e.renameStep,tone:"update",body:R(e,B(s,t.target.id)?.step.name,v(y.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:de(e,v(y.REORDER_STEP,t).after)}),REORDER_ACTIVITY:(e,t,s)=>{const a=v(y.REORDER_ACTIVITY,t).after;return{title:e.reorderActivity,tone:"move",body:de(e,a===null?null:te(s,a)?.name??a)}},ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(v(y.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(v(y.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(B(s,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,s)=>({title:e.renameStory,tone:"update",body:R(e,x(s,t.target.id)?.name,v(y.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(v(y.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,s)=>{const a=v(y.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(B(s,String(v(y.MOVE_STORY,t).stepId))?.step.name??String(v(y.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:de(e,v(y.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(v(y.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:R(e,P(s,t.target.id)?.name,v(y.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(v(y.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:de(e,v(y.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:s,label:a}=v(y.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(a??Ue(s).title)}},REMOVE_STORY_LINK:(e,t,s)=>{const{url:a}=v(y.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??Ue(a).title)}},ADD_STORY_COMMENT:(e,t)=>({title:e.addStoryComment,tone:"create",body:e.added(v(y.ADD_STORY_COMMENT,t).body)}),DELETE_STORY_COMMENT:(e,t,s)=>{const{commentId:a}=v(y.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=v(y.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(v(y.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,s)=>({title:e.renameStatus,tone:"update",body:R(e,D(s,t.target.id)?.name,v(y.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,s)=>{const a=D(s,t.target.id)?.tone,n=v(y.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:R(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=v(y.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:R(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:de(e,v(y.REORDER_STATUS,t).after)}),ADD_LABEL:(e,t)=>({title:e.addLabel,tone:"create",body:e.added(v(y.ADD_LABEL,t).name)}),SET_LABEL_NAME:(e,t,s)=>({title:e.renameLabel,tone:"update",body:R(e,Z(s,t.target.id)?.name,v(y.SET_LABEL_NAME,t).name)}),SET_LABEL_TONE:(e,t,s)=>{const a=Z(s,t.target.id)?.tone,n=v(y.SET_LABEL_TONE,t).tone;return{title:e.changeLabelTone,tone:"update",body:R(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:de(e,v(y.REORDER_LABEL,t).after)}),ADD_STORY_LABEL:(e,t,s)=>{const a=v(y.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=v(y.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=v(y.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=v(y.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=v(y.SET_MILESTONE_DUE_DATE,t).dueDate;return{title:e.changeMilestoneDueDate,tone:a===null?"delete":"update",body:a===null?e.noDueDate:R(e,P(s,t.target.id)?.dueDate,a)}},SET_STATUS_WEIGHT:(e,t,s)=>{const a=D(s,t.target.id)?.weight,n=v(y.SET_STATUS_WEIGHT,t).weight;return{title:e.changeStatusWeight,tone:"update",body:R(e,a===void 0?void 0:String(a),String(n))}},SET_DONE_STATUS:(e,t,s)=>({title:e.setDoneStatus,tone:"update",body:R(e,Xt(s)?.name,D(s,t.target.id)?.name??t.target.id)}),SET_MEASURE:(e,t,s)=>({title:e.setMeasure,tone:"update",body:R(e,e.measureName(be(s)),e.measureName(v(y.SET_MEASURE,t).measure))}),ADD_MEMBER:(e,t)=>({title:e.addMember,tone:"create",body:e.added(v(y.ADD_MEMBER,t).name)}),SET_MEMBER_NAME:(e,t,s)=>({title:e.renameMember,tone:"update",body:R(e,K(s,t.target.id)?.name,v(y.SET_MEMBER_NAME,t).name)}),SET_MEMBER_TONE:(e,t,s)=>{const a=K(s,t.target.id)?.tone,n=v(y.SET_MEMBER_TONE,t).tone;return{title:e.changeMemberTone,tone:"update",body:R(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:de(e,v(y.REORDER_MEMBER,t).after)}),SET_STORY_ASSIGNEE:(e,t,s)=>{const a=v(y.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}=v(y.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:R(e,F(s,t.target.id)?.name,v(y.SET_ESTIMATE_NAME,t).name)}),SET_ESTIMATE_POINTS:(e,t,s)=>{const a=F(s,t.target.id)?.points,n=v(y.SET_ESTIMATE_POINTS,t).points;return{title:e.changeEstimatePoints,tone:"update",body:R(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:de(e,v(y.REORDER_ESTIMATE,t).after)}),SET_STORY_ESTIMATE:(e,t,s)=>{const a=v(y.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}=v(y.RECORD_SNAPSHOT,t),n=a.reduce((i,r)=>i+r.stories,0);return{title:e.recordSnapshot,tone:"create",body:e.snapshotSummary(pe(s),n)}},DELETE_SNAPSHOT:(e,t,s)=>{const a=Se(s,t.target.id);return{title:e.deleteSnapshot,tone:"delete",body:e.removed(a?pe(a.at):t.target.id)}},SET_FEATURE:(e,t)=>{const{feature:s,enabled:a}=v(y.SET_FEATURE,t);return{title:a?e.enableFeature:e.disableFeature,tone:a?"create":"delete",body:e.featureName(s)}}},ks=(e,t,s,a)=>{let n;try{const i=Hn[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:Es(e,s,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},ws=e=>`${e.type} ${A(e.target)} ${JSON.stringify(e.payload)}`,Es=(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=B(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=Se(t,s.id);return a?e.targetLabel(e.snapshotGroup,pe(a.at)):e.targetMissing(e.snapshotGroup,s.id)}case"page":return e.targetLabel(e.mapGroup,ct(t));default:return`${s.type} \xB7 ${s.id}`}}catch{return`${s.type} \xB7 ${s.id}`}},Ss=(e,t,s)=>{const a=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const n of t.activities){a.push({value:A({type:"activity",id:n.id}),label:n.name,group:e.activityGroup});for(const i of n.steps)a.push({value:A({type:"step",id:le(n.id,i.id)}),label:`${n.name} \u203A ${i.name}`,group:e.stepGroup})}for(const n of t.milestones)a.push({value:A({type:"milestone",id:n.id}),label:n.name,group:e.milestoneGroup});for(const n of t.statuses)a.push({value:A({type:"status",id:n.id}),label:n.name,group:e.statusGroup});for(const n of t.labels)a.push({value:A({type:"label",id:n.id}),label:n.name,group:e.labelGroup});for(const n of t.members)a.push({value:A({type:"member",id:n.id}),label:n.name,group:e.memberGroup});for(const n of t.estimates)a.push({value:A({type:"estimate",id:n.id}),label:e.estimateText(n.name,n.points),group:e.estimateGroup});for(const n of t.snapshots)a.push({value:A({type:"snapshot",id:n.id}),label:pe(n.at),group:e.snapshotGroup});for(const n of t.stories)a.push({value:A({type:"story",id:n.id}),label:n.name,group:e.storyGroup});return a},$s=(e,t,s)=>{const a=t.stories.find(n=>n.id===s.story);if(a)return{value:A({type:"story",id:a.id}),label:a.name,group:e.storyGroup};for(const n of t.activities){const i=n.steps.find(r=>r.id===s.step);if(i)return{value:A({type:"step",id:le(n.id,i.id)}),label:i.name,group:e.stepGroup}}return null},ct=e=>e.title??"User Story Mapping",Kn=(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)?{[ie.key]:ie.value}:{}}}case"step":case"activity":return{tab:null,view:null};case"milestone":return{tab:"milestones"};case"status":return{tab:"statuses"};case"label":return{tab:"labels"};case"member":return z(e,"assignees")?{tab:"members"}:null;case"estimate":case"snapshot":return z(e,"estimates")?{tab:"burndown"}:null;default:return null}},xs=(e,t)=>{const s=B(e,t.step),a=s?.activity??te(e,t.activity)??e.activities[0],n=s?.step??a?.steps.find(u=>u.id===t.step)??a?.steps[0],i=_n(e,t.story),r={...t};a?r.activity=a.id:delete r.activity,n?r.step=n.id:delete r.step,i?r.story=i.id:delete r.story,r.view=t.view==="group"?"group":"activity";const o=ze(e,t);for(const u of xe){const w=ys(e,u,o[u]);w===null?delete r[u]:r[u]=w}t[ie.key]!==ie.value&&delete r[ie.key];const d=ms(e,t);d==="map"?delete r.tab:r.tab=d,P(e,t.milestone)||delete r.milestone;const p=Pe(t);return p===null?delete r.highlight:r.highlight=p,r},Ts=(e,t)=>{switch(t.type){case"activity":return te(e,t.id)!==void 0;case"step":return B(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 Se(e,t.id)!==void 0;case"page":return!0;default:return!1}},_s=e=>{const t=ue(e);return{kind:"view",name:"usm",label:"User Story Mapping",parseBase:Ft,emptyBase:Gt,actions:y,apply:is,canonicalState:kn,hasTarget:Ts,canonicalTarget:(s,a)=>{if(a.type!=="step")return a;const n=B(s,a.id);return n?{...a,id:le(n.activity.id,n.step.id)}:a},describe:(s,a,n)=>ks(t,s,a,n),serialize:ws,resolveNavigation:xs,navigationFor:Kn,commentTargets:(s,a)=>Ss(t,s),currentTarget:(s,a)=>$s(t,s,a),settings:s=>({items:De.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:ct}},As=.5,qn=({widths:e,available:t,gap:s,moreWidth:a,keep:n})=>{if(e.reduce((u,w)=>u+w,0)+s*Math.max(0,e.length-1)<=t+As)return[];const r=t-a+As,o=new Set;let d=0;const p=u=>{d+=(o.size===0?0:s)+(e[u]??0),o.add(u)};n>=0&&n<e.length&&p(n);for(const[u,w]of e.entries())if(!o.has(u)){if(d+(o.size===0?0:s)+w>r)break;p(u)}return e.flatMap((u,w)=>o.has(w)?[]:[w])},Is=new Set;class Wn{#i;#e;#a=Is;#n=0;#s=null;#t=null;constructor(t,s){this.#i=t,this.#e=s,t.addController(this)}get hidden(){return this.#a}get minimum(){return this.#n}hostConnected(){typeof ResizeObserver>"u"||(this.#s=new ResizeObserver(()=>this.#r()))}hostUpdated(){const t=this.#e.row();t!==this.#t&&(this.#t&&this.#s?.unobserve(this.#t),t&&this.#s?.observe(t),this.#t=t),this.#r()}hostDisconnected(){this.#s?.disconnect(),this.#s=null,this.#t=null}#r(){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,r=i?Ms(i):0,o=this.#e.more(t),d=o?o.getBoundingClientRect().width+Ms(t):0,p=qn({widths:a,available:t.getBoundingClientRect().width,gap:r,moreWidth:d,keep:n}),u=new Set(p.flatMap(E=>{const S=s[E];return S?[this.#e.keyOf(S)]:[]})),w=Math.ceil((a[n]??0)+d);jn(u,this.#a)&&w===this.#n||(this.#a=u.size===0?Is:u,this.#n=w,this.#i.requestUpdate())}}const Ms=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,jn=(e,t)=>e.size===t.size&&[...e].every(s=>t.has(s)),ut=1440*60*1e3,Xn=48,Zn=8,Jn=(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 r=Math.min(...i),o=Math.max(...i);o-r<ut&&(r-=ut/2,o+=ut/2);const d=Qn(Math.max(0,...e.map($=>$.value))),p=d.at(-1)??1,u=$=>n.left+($-r)/(o-r)*(n.right-n.left),w=$=>n.bottom-$/p*(n.bottom-n.top),E=e.map($=>({x:u($.at),y:w($.value),at:$.at,value:$.value,...$.snapshotId===void 0?{}:{snapshotId:$.snapshotId}})),S=E[0],M=ti(r,o,Math.floor((n.right-n.left)/Xn));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:u(t),y2:w(0)},nowX:u(s),dueX:t===null?null:u(t),yTicks:d.map($=>({y:w($),value:$})),valueTop:p,xUnit:M.unit,xTicks:M.ats.map($=>({x:u($),at:$})),domain:{start:r,end:o},idealSpan:t===null||!S?null:{at:S.at,value:S.value,due:t}}},Qn=e=>{const t=ei(e/4),s=Math.max(1,Math.ceil(e/t));return Array.from({length:s+1},(a,n)=>n*t)},ei=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,ti=(e,t,s)=>{const a=Math.max(1,s),n=["day","week","biweek","month","quarter"];for(const i of n){const r=Ls(i,e,t,a);if(r!==null)return{unit:i,ats:r}}return{unit:"year",ats:Ls("year",e,t,1/0)??[]}},Ls=(e,t,s,a)=>{const n=[];for(let i=si(e,t);i<=s;i=ai(e,i)){if(n.length===a)return null;n.push(i)}return n},si=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],r=(o,d)=>o.getTime()>=t?o.getTime():d().getTime();switch(e){case"day":return r(new Date(a,n,i),()=>new Date(a,n,i+1));case"week":case"biweek":{const o=r(new Date(a,n,i),()=>new Date(a,n,i+1)),d=new Date(o),p=(8-d.getDay())%7;return new Date(d.getFullYear(),d.getMonth(),d.getDate()+p).getTime()}case"month":return r(new Date(a,n,1),()=>new Date(a,n+1,1));case"quarter":{const o=n-n%3;return r(new Date(a,o,1),()=>new Date(a,o+3,1))}case"year":return r(new Date(a,0,1),()=>new Date(a+1,0,1))}},ai=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],r={day:1,week:7,biweek:14},o={month:1,quarter:3,year:12};return e==="day"||e==="week"||e==="biweek"?new Date(a,n,i+r[e]).getTime():new Date(a,n+o[e],1).getTime()},Ds=(e,t)=>{const{plot:s,domain:a,dots:n}=e,i=Math.min(s.right,Math.max(s.left,t)),r=n.reduce((E,S)=>E===null||Math.abs(S.x-i)<Math.abs(E.x-i)?S:E,null),o=r!==null&&Math.abs(r.x-i)<=Zn?r:null,d=o?.at??a.start+(i-s.left)/(s.right-s.left)*(a.end-a.start),p=o?.value??ni(n,d),u=ii(e,d),w=E=>E===null?null:Te(s.bottom-E/e.valueTop*(s.bottom-s.top));return{x:o?.x??i,at:d,actual:p,ideal:u,actualY:w(p),idealY:w(u),dot:o}},ni=(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},ii=(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))},I=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,Rs={circle:U(Za),lightbulb:U(sn),flag:U(tn),play:U(ja),clock:U(Ja),eye:U(en),pause:U(Wa),check:U(Ka),x:U(Xa)},ri=U(qa),oi=e=>{if(e>=1)return Rs.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">
|
|
1
|
+
import{ax as f,bj as va,ac as h,av as W,aU as we,a_ as We,ad as Ee,az as _e,bi as je,bD as ka,bE as wa,aV as yt,bF as vt,au as Ea,bk as Sa,aL as _,ay as k,aw as G,aa as Y,aM as L,aN as Ae,p as b,a8 as kt,a9 as g,t as ee,aO as H,aB as $a,N as xa,e as Ta,a5 as _a,S as A,P as v,a$ as U,ah as j,as as l,ai as m,aj as N,ak as Xe,al as Ze,B as Aa,j as Ia,b9 as wt,bm as Ma,bn as La,bp as Da,z as Et,l as J,aH as C,aS as Ie,aP as Q,H as Ra,bG as St,I as Je,bH as Oa,bc as Qe,y as et,bd as Na,V as $t,ag as Ca,aE as Ba,aF as xt,aG as tt,aT as Ya,aK as Ua,bI as Pa}from"./shared-BXejn2ZQ.js";import{c as za,a as Fa}from"./shared-BT5Ayp_z.js";import{w as Tt,C as _t,h as At,q as It,r as Mt,g as Lt,a as Va,x as Ga}from"./shared-CPwjSgu0.js";import{L as Ha}from"./shared-CjW1DhGL.js";import{o as Me}from"./shared-BTf38OnF.js";const Ka=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m16 9-5.5 5.5L8 12"}]],qa=[["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"}]],Wa=[["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"}]],ja=[["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"}]],Xa=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]],Za=[["circle",{cx:"12",cy:"12",r:"10"}]],Ja=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 6v6l4 2"}]],Qa=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]],en=[["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"}]],tn=[["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"}]],sn=[["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"}]],an=[["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"}]],nn=[["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"}]],rn=[["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"}]],Dt=e=>new Map(e.map(t=>[t.id,t.blockedBy??[]])),st=(e,t,s)=>{const a=Dt(e),n=new Set,i=[...a.get(t)??[]];for(;i.length>0;){const r=i.pop();if(!(r===void 0||n.has(r))){if(r===s)return!0;n.add(r),i.push(...a.get(r)??[])}}return!1},on=e=>{const t=Dt(e),s=new Set,a=(n,i)=>{const r=i.indexOf(n);if(r>=0)return[...i.slice(r),n];if(s.has(n))return null;for(const o of t.get(n)??[]){const d=a(o,[...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},Le=["gray","blue","violet","green","amber","accent"],Rt=["progress","circle","lightbulb","flag","play","clock","eye","pause","check","x"],De=["estimates","assignees"],Ot=["stories","points","weighted"],Nt=f(h(),ka(),je(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")),Ct=f(Ee(),We(),we(0)),at=f(Ee(),We(),we(0)),Bt=W({milestoneId:_(f(h(),k(1))),statusId:_(f(h(),k(1))),stories:f(Ee(),yt(),we(0)),points:f(Ee(),We(),we(0))}),Re=f(h(),va()),dn=W({id:f(h(),k(1)),name:f(h(),k(1)),questions:Ae}),ln=W({id:L,name:f(h(),k(1)),actor:_(h()),steps:G(Y(dn),[]),questions:Ae}),pn=W({id:f(h(),k(1)),name:f(h(),k(1)),timeframe:_(h()),description:_(h()),dueDate:_(Nt),questions:Ae}),ae=_e(Le),nt=_e(Rt),it=f(h(),wa(),je(e=>/^https?:\/\//i.test(e),"a link must be an http(s) URL")),cn=W({url:it,label:_(f(h(),k(1)))}),un=W({id:L,name:f(h(),k(1)),tone:G(ae),icon:G(nt),weight:_(Ct)}),mn=W({id:L,name:f(h(),k(1)),tone:G(ae)}),Yt=f(h(),je(e=>e.trim()!=="","a comment needs some text")),hn=W({id:L,body:Yt,createdAt:_(Re)}),Ut=f(Ee(),yt(),we(1)),bn=W({id:L,number:_(Ut),name:f(h(),k(1)),description:_(h()),activityId:f(h(),k(1)),stepId:f(h(),k(1)),milestoneId:_(h()),statusId:_(h()),links:_(Y(cn)),labelIds:_(Y(f(h(),k(1)))),blockedBy:_(Y(f(h(),k(1)))),estimateId:_(f(h(),k(1))),assigneeId:_(f(h(),k(1))),comments:_(Y(hn)),questions:Ae}),gn=W({id:L,name:f(h(),k(1)),tone:G(ae)}),Pt=_e(De),zt=_e(Ot),fn=W({id:L,name:f(h(),k(1)),points:at}),yn=W({id:L,at:Re,tally:Y(Bt)}),vn=W({title:_(h()),features:G(Y(Pt),[]),measure:_(zt),doneStatusId:_(f(h(),k(1))),activities:G(Y(ln),[]),milestones:G(Y(pn),[]),statuses:G(Y(un),[]),labels:G(Y(mn),[]),members:G(Y(gn),[]),estimates:G(Y(fn),[]),stories:G(Y(bn),[]),snapshots:G(Y(yn),[])}),rt=e=>Le[e%Le.length]??"gray",Oe=e=>rt(e+1),Ft=e=>{const t=Ea(vn,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 r={...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??rt(T),icon:c.icon??"progress"})),labels:t.labels.map((c,T)=>({...c,tone:c.tone??Oe(T)})),members:t.members.map((c,T)=>({...c,tone:c.tone??Oe(T)})),features:De.filter(c=>t.features.includes(c))},o=new Map;for(const c of r.activities)for(const T of c.steps)o.set(T.id,c.id);const d=new Set(r.milestones.map(c=>c.id)),p=new Set(r.statuses.map(c=>c.id)),u=new Set(r.labels.map(c=>c.id));if(r.doneStatusId!==void 0&&!p.has(r.doneStatusId))throw new Error(`the base references unknown doneStatusId "${r.doneStatusId}"`);const w=new Set,E=(c,T)=>{if(w.has(T))throw new Error(`duplicate id "${T}" in ${c}`);w.add(T)};for(const c of r.activities){E("activities",c.id);for(const T of c.steps)E("steps",T.id)}for(const c of r.milestones)E("milestones",c.id);for(const c of r.statuses)E("statuses",c.id);for(const c of r.labels)E("labels",c.id);for(const c of r.members)E("members",c.id);for(const c of r.estimates)E("estimates",c.id);for(const c of r.snapshots)E("snapshots",c.id);const S=new Set(r.estimates.map(c=>c.id)),M=new Set(r.members.map(c=>c.id));for(const c of r.stories){E("stories",c.id);for(const ke of c.comments??[])E("story comments",ke.id);const T=o.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 ft=ve.find(ke=>!u.has(ke));if(ft!==void 0)throw new Error(`story "${c.id}" references unknown labelId "${ft}"`);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&&!M.has(c.assigneeId))throw new Error(`story "${c.id}" references unknown assigneeId "${c.assigneeId}"`)}for(const c of r.snapshots){const T=Vt(r,c.tally);if(T!==null)throw new Error(`snapshot "${c.id}" ${T}`)}const $=new Set(r.stories.map(c=>c.id));for(const c of r.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 O=on(r.stories);if(O!==null)throw new Error(`stories block one another in a cycle: ${O.join(" \u2192 ")}`);return r},Vt=(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=Ne(a);if(s.has(n))return`tallies "${n}" twice`;s.add(n)}return null},Ne=e=>`${e.milestoneId??""}/${e.statusId??""}`,Gt=()=>({features:[],activities:[],milestones:[],statuses:[],labels:[],members:[],estimates:[],stories:[],snapshots:[]}),te=(e,t)=>{if(t!==void 0)return e.activities.find(s=>s.id===t)},le=(e,t)=>`${e}.${t}`,B=(e,t)=>{if(t===void 0)return;const s=Sa(t,2);if(s){const[a,n]=s;if(a===void 0||n===void 0)return;const i=e.activities.find(o=>o.id===a),r=i?.steps.find(o=>o.id===n);return i&&r?{activity:i,step:r}: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)},Ht=(e,t)=>K(e,t.assigneeId),F=(e,t)=>{if(t!==void 0)return e.estimates.find(s=>s.id===t)},Se=(e,t)=>{if(t!==void 0)return e.snapshots.find(s=>s.id===t)},Kt=(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)},Ce=e=>e.activities.flatMap(t=>t.steps.map(s=>({activity:t,step:s}))),kn=e=>({...e,stories:vt(e.stories,[t=>`${t.activityId}/${t.stepId}/${t.milestoneId??""}`])}),Be=(e,t,s)=>e.stories.filter(a=>a.stepId===t&&(a.milestoneId??void 0)===s),qt=(e,t,s)=>e.stories.filter(a=>a.activityId===t&&(a.milestoneId??void 0)===s),X=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)],Wt=(e,t)=>e.stories.filter(s=>s.stepId===t).length,jt=g({feature:Pt,enabled:$a()}),y={SET_ACTIVITY_NAME:b("SET_ACTIVITY_NAME","activity",g({name:f(h(),k(1))})),SET_ACTIVITY_ACTOR:b("SET_ACTIVITY_ACTOR","activity",g({actor:h()})),SET_STEP_NAME:b("SET_STEP_NAME","step",g({name:f(h(),k(1))})),REORDER_STEP:b("REORDER_STEP","step",g({after:H(h())}),{mode:"sequence"}),REORDER_ACTIVITY:b("REORDER_ACTIVITY","activity",g({after:H(h())}),{mode:"sequence"}),ADD_ACTIVITY:b("ADD_ACTIVITY","page",g({id:L,name:f(h(),k(1))}),{dedupeKey:ee}),ADD_STEP:b("ADD_STEP","activity",g({id:L,name:f(h(),k(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(),k(1))})),SET_STORY_DESCRIPTION:b("SET_STORY_DESCRIPTION","story",g({description:h()})),SET_STORY_MILESTONE:b("SET_STORY_MILESTONE","story",g({milestoneId:H(h())})),MOVE_STORY:b("MOVE_STORY","story",g({activityId:f(h(),k(1)),stepId:f(h(),k(1)),milestoneId:H(h()),after:H(h())}),{mode:"sequence"}),REORDER_STORY:b("REORDER_STORY","story",g({after:H(h())}),{mode:"sequence"}),ADD_STORY:b("ADD_STORY","step",g({id:L,name:f(h(),k(1)),activityId:f(h(),k(1)),milestoneId:_(h()),number:_(Ut)}),{dedupeKey:ee}),DELETE_STORY:b("DELETE_STORY","story",g({})),ADD_STORY_LINK:b("ADD_STORY_LINK","story",g({url:it,label:_(f(h(),k(1)))})),REMOVE_STORY_LINK:b("REMOVE_STORY_LINK","story",g({url:h()})),ADD_STORY_COMMENT:b("ADD_STORY_COMMENT","story",g({id:L,body:Yt,createdAt:_(Re)}),{dedupeKey:ee}),DELETE_STORY_COMMENT:b("DELETE_STORY_COMMENT","story",g({commentId:f(h(),k(1))})),SET_STORY_STATUS:b("SET_STORY_STATUS","story",g({statusId:f(h(),k(1))})),SET_MILESTONE_NAME:b("SET_MILESTONE_NAME","milestone",g({name:f(h(),k(1))})),ADD_MILESTONE:b("ADD_MILESTONE","page",g({id:L,name:f(h(),k(1))}),{dedupeKey:ee}),DELETE_MILESTONE:b("DELETE_MILESTONE","milestone",g({})),REORDER_MILESTONE:b("REORDER_MILESTONE","milestone",g({after:H(h())}),{mode:"sequence"}),SET_MILESTONE_DUE_DATE:b("SET_MILESTONE_DUE_DATE","milestone",g({dueDate:H(Nt)})),ADD_STATUS:b("ADD_STATUS","page",g({id:L,name:f(h(),k(1)),tone:ae,icon:_(nt)}),{dedupeKey:ee}),SET_STATUS_NAME:b("SET_STATUS_NAME","status",g({name:f(h(),k(1))})),SET_STATUS_TONE:b("SET_STATUS_TONE","status",g({tone:ae})),SET_STATUS_ICON:b("SET_STATUS_ICON","status",g({icon:nt})),SET_STATUS_WEIGHT:b("SET_STATUS_WEIGHT","status",g({weight:Ct})),SET_MEASURE:b("SET_MEASURE","page",g({measure:zt})),SET_DONE_STATUS:b("SET_DONE_STATUS","status",g({})),DELETE_STATUS:b("DELETE_STATUS","status",g({})),REORDER_STATUS:b("REORDER_STATUS","status",g({after:H(h())}),{mode:"sequence"}),ADD_LABEL:b("ADD_LABEL","page",g({id:L,name:f(h(),k(1)),tone:ae}),{dedupeKey:ee}),SET_LABEL_NAME:b("SET_LABEL_NAME","label",g({name:f(h(),k(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:H(h())}),{mode:"sequence"}),ADD_STORY_LABEL:b("ADD_STORY_LABEL","story",g({labelId:f(h(),k(1))})),REMOVE_STORY_LABEL:b("REMOVE_STORY_LABEL","story",g({labelId:f(h(),k(1))})),ADD_STORY_BLOCKER:b("ADD_STORY_BLOCKER","story",g({blockerId:f(h(),k(1))})),REMOVE_STORY_BLOCKER:b("REMOVE_STORY_BLOCKER","story",g({blockerId:f(h(),k(1))})),ADD_MEMBER:b("ADD_MEMBER","page",g({id:L,name:f(h(),k(1)),tone:ae}),{dedupeKey:ee}),SET_MEMBER_NAME:b("SET_MEMBER_NAME","member",g({name:f(h(),k(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:H(h())}),{mode:"sequence"}),SET_STORY_ASSIGNEE:b("SET_STORY_ASSIGNEE","story",g({memberId:H(f(h(),k(1)))})),ADD_ESTIMATE:b("ADD_ESTIMATE","page",g({id:L,name:f(h(),k(1)),points:at}),{dedupeKey:ee}),SET_ESTIMATE_NAME:b("SET_ESTIMATE_NAME","estimate",g({name:f(h(),k(1))})),SET_ESTIMATE_POINTS:b("SET_ESTIMATE_POINTS","estimate",g({points:at})),DELETE_ESTIMATE:b("DELETE_ESTIMATE","estimate",g({})),REORDER_ESTIMATE:b("REORDER_ESTIMATE","estimate",g({after:H(h())}),{mode:"sequence"}),SET_STORY_ESTIMATE:b("SET_STORY_ESTIMATE","story",g({estimateId:H(f(h(),k(1)))})),RECORD_SNAPSHOT:b("RECORD_SNAPSHOT","page",g({id:L,at:Re,tally:Y(Bt)}),{dedupeKey:ee}),DELETE_SNAPSHOT:b("DELETE_SNAPSHOT","snapshot",g({})),SET_FEATURE:b("SET_FEATURE","page",jt,{dedupeKey:e=>{const t=kt(jt,e.payload);return`SET_FEATURE|${t.success?t.output.feature:JSON.stringify(e.payload)}`}})},wn={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}})},he=e=>{const t=e.statuses.findIndex(s=>s.id===e.doneStatusId);return t>=0?t:e.statuses.length-1},Xt=e=>e.statuses[he(e)],Zt=(e,t)=>{if(t===void 0)return!1;const s=e.statuses.findIndex(a=>a.id===t);return s>=0&&s>=he(e)},Jt=e=>e.statuses.slice(0,he(e)+1),En=(e,t)=>e.milestones.find(s=>s.id===t.milestone)??e.milestones.find(s=>s.dueDate!==void 0)??e.milestones[0],be=e=>z(e,"estimates")?e.measure??(e.estimates.length>0?"points":"stories"):"stories",Qt=e=>e.weight??1,se=10,es=e=>{const{statuses:t}=e,s=he(e);if(be(e)!=="weighted")return t.map((r,o)=>o<s?1:0);const a=t.slice(0,s).map(Qt),n=Ye(a),i=a.map(r=>n>0?r/n:1/a.length);return t.map((r,o)=>Ye(i.slice(o)))},Sn=1,ts=(e,t)=>F(e,t.estimateId)?.points??Sn,ss=e=>{const t=new Map;for(const n of e.stories){const i={...n.milestoneId===void 0?{}:{milestoneId:n.milestoneId},...n.statusId===void 0?{}:{statusId:n.statusId}},r=Ne(i),o=t.get(r)??{...i,stories:0,points:0};t.set(r,{...o,stories:o.stories+1,points:o.points+ts(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 r=t.get(Ne({milestoneId:n,statusId:i}));return r?[r]:[]}))},$n=(e,t,s)=>{const a=be(e),i=[...vt(e.snapshots.map(d=>({at:Date.parse(d.at),tally:d.tally,snapshotId:d.id})),[d=>d.at]),{at:s,tally:ss(e)}].map(d=>({at:d.at,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId},values:xn(e.statuses,d.tally,t,a)})),r=es(e),o=(d,p)=>({at:d.at,value:Math.round(p*100)/100,...d.snapshotId===void 0?{}:{snapshotId:d.snapshotId}});return{due:Tn(e.milestones.find(d=>d.id===t)?.dueDate),combined:i.map(d=>o(d,d.values.reduce((p,u,w)=>p+u*(r[w]??0),0))),byStatus:e.statuses.slice(1).map((d,p)=>({status:d,points:i.map(u=>o(u,Ye(u.values.slice(0,p+1))))}))}},xn=(e,t,s,a)=>e.map(n=>Ye(t.filter(i=>i.milestoneId===s&&i.statusId===n.id).map(i=>a==="stories"?i.stories:i.points))),Tn=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()},pe=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())}`},Ye=e=>e.reduce((t,s)=>t+s,0),as="STORY-",ge=e=>`${as}${e.number}`,ns=(...e)=>Math.max(0,...e.flatMap(t=>t.stories.map(s=>s.number)))+1,_n=(e,t)=>{if(t===void 0)return;const s=x(e,t);if(s)return s;const a=new RegExp(`^${as}([1-9]\\d*)$`,"i").exec(t.trim());if(!a)return;const n=Number(a[1]);return e.stories.find(i=>i.number===n)},is=(e,t)=>{const s=xa(y,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:r,...o}=i;return n===""?o:{...o,actor:n}})}:null}case"SET_STEP_NAME":{const{name:n}=s.payload,i=B(e,a);return i?{...e,activities:e.activities.map(r=>r.id===i.activity.id?{...r,steps:r.steps.map(o=>o.id===i.step.id?{...o,name:n}:o)}:r)}:null}case"REORDER_STEP":{const{after:n}=s.payload,i=B(e,a);if(!i)return null;const r=n===null?null:B(e,n);if(n!==null&&(!r||r.activity.id!==i.activity.id))return null;const o=ce(i.activity.steps,i.step.id,r?.step.id??null);return o===null?null:{...e,activities:e.activities.map(d=>d.id===i.activity.id?{...d,steps:o}:d)}}case"REORDER_ACTIVITY":{const{after:n}=s.payload,i=ce(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(r=>r.id===a);return i?i.steps.some(r=>r.id===n.id)?e:{...e,activities:e.activities.map(r=>r.id===a?{...r,steps:[...r.steps,{id:n.id,name:n.name}]}:r)}:null}case"DELETE_ACTIVITY":{const n=e.activities.find(r=>r.id===a);if(!n)return null;const i=new Set(n.steps.map(r=>r.id));return dt({...e,activities:e.activities.filter(r=>r.id!==a)},r=>r.activityId===a||i.has(r.stepId))}case"DELETE_STEP":{const n=B(e,a);return n?dt({...e,activities:e.activities.map(i=>i.id===n.activity.id?{...i,steps:i.steps.filter(r=>r.id!==n.step.id)}:i)},i=>i.activityId===n.activity.id&&i.stepId===n.step.id):null}case"SET_STORY_NAME":{const{name:n}=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?ot(i):{...i,milestoneId:n})}case"MOVE_STORY":{const n=s.payload,i=x(e,a);if(!i)return null;const r=B(e,n.stepId);if(!r||r.activity.id!==n.activityId||n.milestoneId!==null&&!P(e,n.milestoneId))return null;const o=n.milestoneId??void 0,d=o===void 0?{...ot(i),activityId:r.activity.id,stepId:r.step.id}:{...i,activityId:r.activity.id,stepId:r.step.id,milestoneId:o};return ds(e,d,n.after)}case"REORDER_STORY":{const{after:n}=s.payload,i=x(e,a);return i?ds(e,i,n,!0):null}case"ADD_STORY":{const n=s.payload,i=B(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 r=n.number!==void 0&&e.stories.some(d=>d.number===n.number),o={id:n.id,number:n.number===void 0||r?ns(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,o]}}case"DELETE_STORY":return e.stories.some(n=>n.id===a)?dt(e,n=>n.id===a):null;case"ADD_STORY_LINK":{const{url:n,label:i}=s.payload,r=x(e,a);if(!r)return null;if(r.links?.some(d=>d.url===n))return e;const o=i===void 0?{url:n}:{url:n,label:i};return q(e,a,d=>({...d,links:[...d.links??[],o]}))}case"REMOVE_STORY_LINK":{const{url:n}=s.payload;return x(e,a)?.links?.some(r=>r.url===n)?q(e,a,r=>{const o=(r.links??[]).filter(u=>u.url!==n),{links:d,...p}=r;return o.length===0?p:{...p,links:o}}):null}case"ADD_STORY_COMMENT":{const{id:n,body:i,createdAt:r}=s.payload,o=x(e,a);if(!o)return null;if(o.comments?.some(p=>p.id===n))return e;if(X(e).includes(n))return null;const d=r===void 0?{id:n,body:i}:{id:n,body:i,createdAt:r};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(r=>r.id===n)?q(e,a,r=>{const o=(r.comments??[]).filter(u=>u.id!==n),{comments:d,...p}=r;return o.length===0?p:{...p,comments:o}}):null}case"SET_STORY_STATUS":{const{statusId:n}=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?ot(n):n),snapshots:lt(e,n=>n.milestoneId===a?oe(n,"milestoneId"):n)}:null;case"REORDER_MILESTONE":{const{after:n}=s.payload,i=ce(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?oe(i,"dueDate"):{...i,dueDate:n})}:null}case"ADD_STATUS":{const{id:n,name:i,tone:r,icon:o}=s.payload;if(e.statuses.some(p=>p.id===n))return e;const d=[...e.statuses,{id:n,name:i,tone:r,icon:o??"progress"}];return e.statuses.length===0?{...e,statuses:d,stories:e.stories.map(p=>({...p,statusId:n})),snapshots:lt(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 be(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(r=>r.id!==a),i=n[0]?.id;return{...e.doneStatusId===a?oe(e,"doneStatusId"):e,statuses:n,stories:e.stories.map(r=>r.statusId!==a?r:i===void 0?An(r):{...r,statusId:i}),snapshots:lt(e,r=>r.statusId!==a?r:i===void 0?oe(r,"statusId"):{...r,statusId:i})}}case"REORDER_STATUS":{const{after:n}=s.payload,i=ce(e.statuses,a,n);return i===null?null:{...e,statuses:i}}case"ADD_LABEL":{const{id:n,name:i,tone:r}=s.payload;return Z(e,n)?e:{...e,labels:[...e.labels,{id:n,name:i,tone:r}]}}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)?rs(n,a):n)}:null;case"REORDER_LABEL":{const{after:n}=s.payload,i=ce(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,r=>({...r,labelIds:[...r.labelIds??[],n]}))}case"REMOVE_STORY_LABEL":{const{labelId:n}=s.payload;return x(e,a)?.labelIds?.includes(n)?q(e,a,i=>rs(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||st(e.stories,n,a)?null:q(e,a,r=>({...r,blockedBy:[...r.blockedBy??[],n]}))}case"REMOVE_STORY_BLOCKER":{const{blockerId:n}=s.payload;return x(e,a)?.blockedBy?.includes(n)?q(e,a,i=>os(i,new Set([n]))):null}case"ADD_MEMBER":{const{id:n,name:i,tone:r}=s.payload;return K(e,n)?e:{...e,members:[...e.members,{id:n,name:i,tone:r}]}}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?oe(n,"assigneeId"):n)}:null;case"REORDER_MEMBER":{const{after:n}=s.payload,i=ce(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?oe(i,"assigneeId"):{...i,assigneeId:n})}case"ADD_ESTIMATE":{const{id:n,name:i,points:r}=s.payload;return F(e,n)?e:{...e,estimates:[...e.estimates,{id:n,name:i,points:r}]}}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?oe(n,"estimateId"):n)}:null;case"REORDER_ESTIMATE":{const{after:n}=s.payload,i=ce(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?oe(i,"estimateId"):{...i,estimateId:n})}case"RECORD_SNAPSHOT":{const{id:n,at:i,tally:r}=s.payload;return Se(e,n)?e:Vt(e,r)!==null?null:{...e,snapshots:[...e.snapshots,{id:n,at:i,tally:r}]}}case"DELETE_SNAPSHOT":return Se(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 r=De.filter(o=>o===n?i:e.features.includes(o));return{...e,features:r}}default:return Ta(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,ot=e=>{const{milestoneId:t,...s}=e;return s},rs=(e,t)=>{const{labelIds:s=[],...a}=e,n=s.filter(i=>i!==t);return n.length===0?a:{...a,labelIds:n}},os=(e,t)=>{const{blockedBy:s=[],...a}=e,n=s.filter(i=>!t.has(i));return n.length===0?a:{...a,blockedBy:n}},dt=(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))?os(a,s):a)}},oe=(e,t)=>{const{[t]:s,...a}=e;return a},lt=(e,t)=>e.snapshots.map(s=>{const a=new Map;for(const n of s.tally.map(t)){const i=Ne(n),r=a.get(i);a.set(i,r?{...r,stories:r.stories+n.stories,points:r.points+n.points}:n)}return{...s,tally:[...a.values()]}}),An=e=>{const{statusId:t,...s}=e;return s},ds=(e,t,s,a=!1)=>{const n=t.milestoneId??void 0,i=e.stories.filter(S=>S.id!==t.id),r=i.filter(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n);if(s!==null){const S=i.find(M=>M.id===s);if(!S||S.stepId!==t.stepId||(S.milestoneId??void 0)!==n)return null;if(a){const M=x(e,t.id);if(!M||S.stepId!==M.stepId||(S.milestoneId??void 0)!==(M.milestoneId??void 0))return null}}const o=s===null?[t,...r]:ls(r,t,s),d=i.findIndex(S=>S.stepId===t.stepId&&(S.milestoneId??void 0)===n),p=new Set(r.map(S=>S.id)),u=i.filter(S=>!p.has(S.id)),w=d<0?u.length:Math.min(d,u.length),E=[...u.slice(0,w),...o,...u.slice(w)];return{...e,stories:E}},ce=(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 ls(n,a,s)},ls=(e,t,s)=>{const a=[...e],n=s===null?-1:a.findIndex(i=>i.id===s);return a.splice(n+1,0,t),a},ue=_a({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",statusesTab:"Statuses",labelsTab:"Labels",burndownTab:"Burndown",shareOfStories:e=>`${e}% of all stories`,coverageLabel:"Backbone coverage",coverage:(e,t)=>`${e} / ${t} steps`,storiesLabel:"Stories",timeframeUnset:"Timing not set",milestoneNoDescription:"No description yet.",noMilestonesTitle:"No milestones yet",noMilestonesBody:"Add a milestone to slice the map into releases.",commentCountAria:e=>e===1?"1 comment":`${e} comments`,reviewCountAria:e=>e===1?"1 review comment":`${e} review comments`,statusNameLabel:"Status name",statusToneLabel:"Color",toneName:e=>({gray:"Gray",blue:"Blue",violet:"Violet",green:"Green",amber:"Amber",accent:"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)=>ps("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",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",membersTab:"Members",memberNameLabel:"Member name",noMembersTitle:"No members yet",noMembersBody:"Add the people on the team, then assign each story to the one who takes it on.",newMemberButton:"+ Member",deleteMemberAria:"Delete this member",storyAssigneeLabel:"Assignee",noAssignee:"No one",storyNoMembers:"No members yet.",manageMembers:"Manage members",assigneeChipTitle:e=>`Assigned to ${e}`,noAssigneeFilter:"Unassigned",moreTabsLabel:"More tabs",enableFeature:"Turn on feature",disableFeature:"Turn off feature",featureName:e=>({estimates:"Estimates & burndown",assignees:"Members & assignees"})[e],featureHint:e=>({estimates:"An estimate scale for the stories and a burndown per milestone.",assignees:"The members of the team and who each story is assigned to."})[e],featuresNote:"Turning a feature off only hides it: what it holds is kept.",newActivityName:"New activity",newStepName:"New step",newMilestoneName:"New milestone",newStoryName:"New story",newStatusName:"New status",newLabelName:"New label",newMemberName:"New member",newEstimateName:"New"},ja:{renameActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D\u3092\u5909\u66F4",changeActivityActor:"\u4F53\u9A13\u3059\u308B\u4EBA\u3092\u5909\u66F4",renameStep:"\u30B9\u30C6\u30C3\u30D7\u540D\u3092\u5909\u66F4",reorderStep:"\u30B9\u30C6\u30C3\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",reorderActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7\u306E\u9806\u5E8F\u3092\u5909\u66F4",addActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u8FFD\u52A0",addStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",deleteActivity:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u524A\u9664",deleteStep:"\u30B9\u30C6\u30C3\u30D7\u3092\u524A\u9664",renameStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u540D\u3092\u5909\u66F4",updateStoryDescription:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u8AAC\u660E\u3092\u66F4\u65B0",changeMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u5909\u66F4",moveStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u79FB\u52D5",reorderStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",deleteStory:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u524A\u9664",renameMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D\u3092\u5909\u66F4",addMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0",deleteMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u524A\u9664",reorderMilestone:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u9806\u5E8F\u3092\u5909\u66F4",changeStoryStatus:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u8FFD\u52A0",renameStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D\u3092\u5909\u66F4",changeStatusTone:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u8272\u3092\u5909\u66F4",changeStatusIcon:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u30A2\u30A4\u30B3\u30F3\u3092\u5909\u66F4",addStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30EA\u30F3\u30AF\u3092\u8FFD\u52A0",removeStoryLink:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30EA\u30F3\u30AF\u3092\u524A\u9664",addStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteStoryComment:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",deleteStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u524A\u9664",reorderStatus:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u9806\u5E8F\u3092\u5909\u66F4",addLabel:"\u30E9\u30D9\u30EB\u3092\u8FFD\u52A0",renameLabel:"\u30E9\u30D9\u30EB\u540D\u3092\u5909\u66F4",changeLabelTone:"\u30E9\u30D9\u30EB\u306E\u8272\u3092\u5909\u66F4",deleteLabel:"\u30E9\u30D9\u30EB\u3092\u524A\u9664",reorderLabel:"\u30E9\u30D9\u30EB\u306E\u9806\u5E8F\u3092\u5909\u66F4",addStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306B\u30E9\u30D9\u30EB\u3092\u4ED8\u4E0E",removeStoryLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u30E9\u30D9\u30EB\u3092\u5916\u3059",addStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u8FFD\u52A0",removeStoryBlocker:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u4F9D\u5B58\u5148\u3092\u5916\u3059",changeMilestoneDueDate:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u306E\u671F\u65E5\u3092\u5909\u66F4",changeStatusWeight:"\u30B9\u30C6\u30FC\u30BF\u30B9\u306E\u91CD\u307F\u3092\u5909\u66F4",setDoneStatus:"\u5B8C\u4E86\u3068\u3059\u308B\u30B9\u30C6\u30FC\u30BF\u30B9\u3092\u5909\u66F4",addEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u8FFD\u52A0",renameEstimate:"\u898B\u7A4D\u3082\u308A\u540D\u3092\u5909\u66F4",changeEstimatePoints:"\u898B\u7A4D\u3082\u308A\u306E\u30DD\u30A4\u30F3\u30C8\u3092\u5909\u66F4",deleteEstimate:"\u898B\u7A4D\u3082\u308A\u3092\u524A\u9664",reorderEstimate:"\u898B\u7A4D\u3082\u308A\u306E\u9806\u5E8F\u3092\u5909\u66F4",setStoryEstimate:"\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u898B\u7A4D\u3082\u308B",recordSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u8A18\u9332",deleteSnapshot:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u306E\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8\u3092\u524A\u9664",toValue:e=>`\u2192 \u300C${e}\u300D`,fromTo:(e,t)=>`\u300C${e}\u300D\u2192\u300C${t}\u300D`,added:e=>`+ \u300C${e}\u300D`,removed:e=>`\u2212 \u300C${e}\u300D`,toFront:"\u2192 \u5148\u982D\u3078",afterName:e=>`\u2192 \u300C${e}\u300D\u306E\u76F4\u5F8C\u3078`,toUnassigned:"\u2192 \u672A\u5272\u5F53\u3078",toName:e=>`\u2192 ${e}`,snapshotSummary:(e,t)=>`${e} \xB7 ${t} \u30B9\u30C8\u30FC\u30EA\u30FC`,activityGroup:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",stepGroup:"\u30B9\u30C6\u30C3\u30D7",storyGroup:"\u30B9\u30C8\u30FC\u30EA\u30FC",milestoneGroup:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusGroup:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelGroup:"\u30E9\u30D9\u30EB",estimateGroup:"\u898B\u7A4D\u3082\u308A",snapshotGroup:"\u30B9\u30CA\u30C3\u30D7\u30B7\u30E7\u30C3\u30C8",mapGroup:"\u30DE\u30C3\u30D7",targetLabel:(e,t)=>`${e} \xB7 ${t}`,targetMissing:(e,t)=>`${e} \xB7 ${t} (missing)`,wholeMap:"\u30DE\u30C3\u30D7\u5168\u4F53",unassigned:"\u672A\u5272\u5F53",emptyTitle:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",emptyBody:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3068\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u3053\u3053\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u30DE\u30C3\u30D7\u304C\u73FE\u308C\u307E\u3059\u3002",firstActivityButton:"+ \u6700\u521D\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",groupingLabel:"\u307E\u3068\u3081\u308B\u5358\u4F4D",groupViewTab:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7",groupAxisHeader:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u30B0\u30EB\u30FC\u30D7 \u2192",activityAxis:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3 \u2192",milestoneAxis:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3 \u2193",stepNameLabel:"\u30B9\u30C6\u30C3\u30D7\u540D",activityNameLabel:"\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u540D",milestoneNameLabel:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u540D",addStepAria:"\u3053\u306E\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u306B\u30B9\u30C6\u30C3\u30D7\u3092\u8FFD\u52A0",newActivityButton:"+ \u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newMilestoneButton:"+ \u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",addCellButton:"+ \u8FFD\u52A0",addStoryCellAria:"\u3053\u306E\u30DE\u30B9\u306B\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u8FFD\u52A0",storyCount:e=>`${e} \u30B9\u30C8\u30FC\u30EA\u30FC`,pageTabsLabel:"\u30DA\u30FC\u30B8",mapTab:"User Story Mapping",tableTab:"\u30C6\u30FC\u30D6\u30EB",milestonesTab:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",statusesTab:"\u30B9\u30C6\u30FC\u30BF\u30B9",labelsTab:"\u30E9\u30D9\u30EB",burndownTab:"\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",shareOfStories:e=>`\u5168\u30B9\u30C8\u30FC\u30EA\u30FC\u306E ${e}%`,coverageLabel:"\u30D0\u30C3\u30AF\u30DC\u30FC\u30F3\u306E\u7DB2\u7F85",coverage:(e,t)=>`${e} / ${t} \u30B9\u30C6\u30C3\u30D7`,storiesLabel:"\u30B9\u30C8\u30FC\u30EA\u30FC",timeframeUnset:"\u6642\u671F\u672A\u5B9A",milestoneNoDescription:"\u8AAC\u660E\u306F\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002",noMilestonesTitle:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noMilestonesBody:"\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3092\u8FFD\u52A0\u3059\u308B\u3068\u3001\u30DE\u30C3\u30D7\u3092\u30EA\u30EA\u30FC\u30B9\u3054\u3068\u306B\u533A\u5207\u308C\u307E\u3059\u3002",commentCountAria:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,reviewCountAria:e=>`\u30EC\u30D3\u30E5\u30FC\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,statusNameLabel:"\u30B9\u30C6\u30FC\u30BF\u30B9\u540D",statusToneLabel:"\u8272",toneName:e=>({gray:"\u30B0\u30EC\u30FC",blue:"\u9752",violet:"\u7D2B",green:"\u7DD1",amber:"\u9EC4",accent:"\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)=>ps("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",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",membersTab:"\u30E1\u30F3\u30D0\u30FC",memberNameLabel:"\u30E1\u30F3\u30D0\u30FC\u540D",noMembersTitle:"\u30E1\u30F3\u30D0\u30FC\u304C\u307E\u3060\u3044\u307E\u305B\u3093",noMembersBody:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u8FFD\u52A0\u3057\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u3092\u5F15\u304D\u53D7\u3051\u308B\u4EBA\u306B\u5272\u308A\u5F53\u3066\u307E\u3059\u3002",newMemberButton:"+ \u30E1\u30F3\u30D0\u30FC",deleteMemberAria:"\u3053\u306E\u30E1\u30F3\u30D0\u30FC\u3092\u524A\u9664",storyAssigneeLabel:"\u62C5\u5F53\u8005",noAssignee:"\u306A\u3057",storyNoMembers:"\u30E1\u30F3\u30D0\u30FC\u306F\u307E\u3060\u3044\u307E\u305B\u3093\u3002",manageMembers:"\u30E1\u30F3\u30D0\u30FC\u3092\u7BA1\u7406",assigneeChipTitle:e=>`\u62C5\u5F53: ${e}`,noAssigneeFilter:"\u62C5\u5F53\u8005\u306A\u3057",moreTabsLabel:"\u307B\u304B\u306E\u30BF\u30D6",enableFeature:"\u6A5F\u80FD\u3092\u6709\u52B9\u5316",disableFeature:"\u6A5F\u80FD\u3092\u7121\u52B9\u5316",featureName:e=>({estimates:"\u898B\u7A4D\u3082\u308A\u3068\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3",assignees:"\u30E1\u30F3\u30D0\u30FC\u3068\u62C5\u5F53\u8005"})[e],featureHint:e=>({estimates:"\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u898B\u7A4D\u3082\u308A\u3068\u3001\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3\u3054\u3068\u306E\u30D0\u30FC\u30F3\u30C0\u30A6\u30F3\u3002",assignees:"\u30C1\u30FC\u30E0\u306E\u30E1\u30F3\u30D0\u30FC\u3068\u3001\u5404\u30B9\u30C8\u30FC\u30EA\u30FC\u306E\u62C5\u5F53\u8005\u3002"})[e],featuresNote:"\u7121\u52B9\u306B\u3057\u3066\u3082\u96A0\u3059\u3060\u3051\u3067\u3001\u5165\u529B\u3057\u305F\u5185\u5BB9\u306F\u6B8B\u308A\u307E\u3059\u3002",newActivityName:"\u65B0\u3057\u3044\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3",newStepName:"\u65B0\u3057\u3044\u30B9\u30C6\u30C3\u30D7",newMilestoneName:"\u65B0\u3057\u3044\u30DE\u30A4\u30EB\u30B9\u30C8\u30FC\u30F3",newStoryName:"\u65B0\u3057\u3044\u30B9\u30C8\u30FC\u30EA\u30FC",newStatusName:"\u65B0\u3057\u3044\u30B9\u30C6\u30FC\u30BF\u30B9",newLabelName:"\u65B0\u3057\u3044\u30E9\u30D9\u30EB",newMemberName:"\u65B0\u3057\u3044\u30E1\u30F3\u30D0\u30FC",newEstimateName:"\u65B0\u898F"}}),ps=(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)}},pt=/^[A-Z][A-Z0-9]+-\d+$/,cs=e=>{let t=e;try{t=decodeURIComponent(e)}catch{}return t.replace(/[-_+]+/g," ").trim()},In=(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 r=`${s}/${a}`;return(n==="issues"||n==="pull"||n==="discussions")&&i&&/^\d+$/.test(i)?{kind:"github",text:`#${i}`,title:`${r}#${i}`}:n==="commit"&&i?{kind:"github",text:i.slice(0,7),title:`${r}@${i}`}:{kind:"github",text:r,title:r}},Mn=(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}},Ln=(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=>pt.test(n));return a&&pt.test(a)?{kind:"jira",text:a,title:`${t} ${a}`}:{kind:"jira",text:"Jira",title:t}},Dn=(e,t)=>{if(e!=="linear.app")return null;const s=t[1]==="issue"?t[2]?.toUpperCase():void 0;return s&&pt.test(s)?{kind:"linear",text:s,title:s}:{kind:"linear",text:"Linear",title:e}},Rn=(e,t)=>{if(e!=="figma.com")return null;const[s,,a]=t;if((s==="file"||s==="design"||s==="proto"||s==="board")&&a){const n=cs(a);return{kind:"figma",text:n,title:n}}return{kind:"figma",text:"Figma",title:e}},On=(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":cs(a);return{kind:"notion",text:n,title:n}},Ue=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 In(s,a)??Mn(s,a)??Ln(t,s,a)??Dn(s,a)??Rn(s,a)??On(s,a)??{kind:"web",text:s,title:e}},Nn=["map","table","milestones","statuses","labels","members","burndown"],Cn={members:"assignees",burndown:"estimates"},us=e=>Nn.filter(t=>{const s=Cn[t];return s===void 0||z(e,s)}),ms=(e,t)=>us(e).find(s=>s===t.tab)??"map",$e=(e,t)=>Zt(e,t.statusId),hs=(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)}},Bn=(e,t)=>{const s=new Set(x(e,t)?.blockedBy??[]);return e.stories.filter(a=>a.id!==t&&!s.has(a.id)&&!st(e.stories,a.id,t))},Yn=(e,t)=>e.stories.filter(s=>s.id!==t&&!s.blockedBy?.includes(t)&&!st(e.stories,t,s.id)),Un=["critical-path"],Pe=e=>Un.find(t=>t===e.highlight)??null,Pn=(e,t)=>{if($e(e,t))return 0;const s=be(e)==="stories"?1:ts(e,t),a=Math.max(0,e.statuses.findIndex(n=>n.id===t.statusId));return s*(es(e)[a]??1)},zn=(e,t)=>Pe(t)==="critical-path"?bs(e).ids:null,Fn=1e-9,bs=e=>{const t=new Map(e.stories.map(d=>[d.id,Pn(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=gs(t,s),i=gs(t,a),r=[...t].map(([d,p])=>[d,n(d)+i(d)-p]),o=Math.max(0,...r.map(([,d])=>d));return{ids:new Set(r.filter(([,d])=>o-d<Fn).map(([d])=>d)),work:o}},gs=(e,t)=>{const s=new Map,a=n=>{const i=s.get(n);if(i!==void 0)return i;const r=(e.get(n)??0)+Math.max(0,...(t.get(n)??[]).map(a));return s.set(n,r),r};return a},xe=["status","label","estimate","assignee"],ne="~none",ie={key:"done",value:"show"},fs=(e,t)=>t[ie.key]===ie.value||e.statuses.length<2?new Set:new Set(e.statuses.filter(s=>Zt(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),ne];case"estimate":return!z(e,"estimates")||e.estimates.length===0?[]:[...e.estimates.map(s=>s.id),ne];case"assignee":return!z(e,"assignees")||e.members.length===0?[]:[...e.members.map(s=>s.id),ne]}},ze=(e,t)=>{const s=fs(e,t),a=n=>{const i=t[n];if(i===void 0||i==="")return new Set;const r=new Set(i.split(","));return new Set(fe(e,n).filter(o=>r.has(o)&&!s.has(o)))};return{status:a("status"),label:a("label"),estimate:a("estimate"),assignee:a("assignee"),hiddenStatusIds:s}},ys=(e,t,s)=>{const a=fe(e,t).filter(n=>s.has(n));return a.length===0?null:a.join(",")},Vn=(e,t)=>{const s=new Set(e);return s.has(t)?s.delete(t):s.add(t),s},Gn=e=>xe.some(t=>e[t].size>0),vs=(e,t)=>{const s=t.labelIds??[];return(t.statusId===void 0||!e.hiddenStatusIds.has(t.statusId))&&Fe(e.status,t.statusId===void 0?[]:[t.statusId])&&Fe(e.label,s.length===0?[ne]:s)&&Fe(e.estimate,[t.estimateId??ne])&&Fe(e.assignee,[t.assigneeId??ne])},Fe=(e,t)=>e.size===0||t.some(s=>e.has(s)),R=(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)},de=(e,t)=>typeof t=="string"?e.afterName(t):e.toFront,Hn={SET_ACTIVITY_NAME:(e,t,s)=>({title:e.renameActivity,tone:"update",body:R(e,te(s,t.target.id)?.name,v(y.SET_ACTIVITY_NAME,t).name??"")}),SET_ACTIVITY_ACTOR:(e,t,s)=>{const a=v(y.SET_ACTIVITY_ACTOR,t).actor.trim();return{title:e.changeActivityActor,tone:"update",body:a===""?e.removed(te(s,t.target.id)?.actor??""):R(e,te(s,t.target.id)?.actor,a)}},SET_STEP_NAME:(e,t,s)=>({title:e.renameStep,tone:"update",body:R(e,B(s,t.target.id)?.step.name,v(y.SET_STEP_NAME,t).name??"")}),REORDER_STEP:(e,t)=>({title:e.reorderStep,tone:"move",body:de(e,v(y.REORDER_STEP,t).after)}),REORDER_ACTIVITY:(e,t,s)=>{const a=v(y.REORDER_ACTIVITY,t).after;return{title:e.reorderActivity,tone:"move",body:de(e,a===null?null:te(s,a)?.name??a)}},ADD_ACTIVITY:(e,t)=>({title:e.addActivity,tone:"create",body:e.added(String(v(y.ADD_ACTIVITY,t).name??""))}),ADD_STEP:(e,t)=>({title:e.addStep,tone:"create",body:e.added(String(v(y.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(B(s,t.target.id)?.step.name??t.target.id)}),SET_STORY_NAME:(e,t,s)=>({title:e.renameStory,tone:"update",body:R(e,x(s,t.target.id)?.name,v(y.SET_STORY_NAME,t).name??"")}),SET_STORY_DESCRIPTION:(e,t)=>({title:e.updateStoryDescription,tone:"update",body:e.toValue(String(v(y.SET_STORY_DESCRIPTION,t).description??"").slice(0,90))}),SET_STORY_MILESTONE:(e,t,s)=>{const a=v(y.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(B(s,String(v(y.MOVE_STORY,t).stepId))?.step.name??String(v(y.MOVE_STORY,t).stepId??""))}),REORDER_STORY:(e,t)=>({title:e.reorderStory,tone:"move",body:de(e,v(y.REORDER_STORY,t).after)}),ADD_STORY:(e,t)=>({title:e.addStory,tone:"create",body:e.added(String(v(y.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:R(e,P(s,t.target.id)?.name,v(y.SET_MILESTONE_NAME,t).name??"")}),ADD_MILESTONE:(e,t)=>({title:e.addMilestone,tone:"create",body:e.added(String(v(y.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:de(e,v(y.REORDER_MILESTONE,t).after)}),ADD_STORY_LINK:(e,t)=>{const{url:s,label:a}=v(y.ADD_STORY_LINK,t);return{title:e.addStoryLink,tone:"create",body:e.added(a??Ue(s).title)}},REMOVE_STORY_LINK:(e,t,s)=>{const{url:a}=v(y.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??Ue(a).title)}},ADD_STORY_COMMENT:(e,t)=>({title:e.addStoryComment,tone:"create",body:e.added(v(y.ADD_STORY_COMMENT,t).body)}),DELETE_STORY_COMMENT:(e,t,s)=>{const{commentId:a}=v(y.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=v(y.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(v(y.ADD_STATUS,t).name)}),SET_STATUS_NAME:(e,t,s)=>({title:e.renameStatus,tone:"update",body:R(e,D(s,t.target.id)?.name,v(y.SET_STATUS_NAME,t).name)}),SET_STATUS_TONE:(e,t,s)=>{const a=D(s,t.target.id)?.tone,n=v(y.SET_STATUS_TONE,t).tone;return{title:e.changeStatusTone,tone:"update",body:R(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=v(y.SET_STATUS_ICON,t).icon;return{title:e.changeStatusIcon,tone:"update",body:R(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:de(e,v(y.REORDER_STATUS,t).after)}),ADD_LABEL:(e,t)=>({title:e.addLabel,tone:"create",body:e.added(v(y.ADD_LABEL,t).name)}),SET_LABEL_NAME:(e,t,s)=>({title:e.renameLabel,tone:"update",body:R(e,Z(s,t.target.id)?.name,v(y.SET_LABEL_NAME,t).name)}),SET_LABEL_TONE:(e,t,s)=>{const a=Z(s,t.target.id)?.tone,n=v(y.SET_LABEL_TONE,t).tone;return{title:e.changeLabelTone,tone:"update",body:R(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:de(e,v(y.REORDER_LABEL,t).after)}),ADD_STORY_LABEL:(e,t,s)=>{const a=v(y.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=v(y.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=v(y.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=v(y.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=v(y.SET_MILESTONE_DUE_DATE,t).dueDate;return{title:e.changeMilestoneDueDate,tone:a===null?"delete":"update",body:a===null?e.noDueDate:R(e,P(s,t.target.id)?.dueDate,a)}},SET_STATUS_WEIGHT:(e,t,s)=>{const a=D(s,t.target.id)?.weight,n=v(y.SET_STATUS_WEIGHT,t).weight;return{title:e.changeStatusWeight,tone:"update",body:R(e,a===void 0?void 0:String(a),String(n))}},SET_DONE_STATUS:(e,t,s)=>({title:e.setDoneStatus,tone:"update",body:R(e,Xt(s)?.name,D(s,t.target.id)?.name??t.target.id)}),SET_MEASURE:(e,t,s)=>({title:e.setMeasure,tone:"update",body:R(e,e.measureName(be(s)),e.measureName(v(y.SET_MEASURE,t).measure))}),ADD_MEMBER:(e,t)=>({title:e.addMember,tone:"create",body:e.added(v(y.ADD_MEMBER,t).name)}),SET_MEMBER_NAME:(e,t,s)=>({title:e.renameMember,tone:"update",body:R(e,K(s,t.target.id)?.name,v(y.SET_MEMBER_NAME,t).name)}),SET_MEMBER_TONE:(e,t,s)=>{const a=K(s,t.target.id)?.tone,n=v(y.SET_MEMBER_TONE,t).tone;return{title:e.changeMemberTone,tone:"update",body:R(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:de(e,v(y.REORDER_MEMBER,t).after)}),SET_STORY_ASSIGNEE:(e,t,s)=>{const a=v(y.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}=v(y.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:R(e,F(s,t.target.id)?.name,v(y.SET_ESTIMATE_NAME,t).name)}),SET_ESTIMATE_POINTS:(e,t,s)=>{const a=F(s,t.target.id)?.points,n=v(y.SET_ESTIMATE_POINTS,t).points;return{title:e.changeEstimatePoints,tone:"update",body:R(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:de(e,v(y.REORDER_ESTIMATE,t).after)}),SET_STORY_ESTIMATE:(e,t,s)=>{const a=v(y.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}=v(y.RECORD_SNAPSHOT,t),n=a.reduce((i,r)=>i+r.stories,0);return{title:e.recordSnapshot,tone:"create",body:e.snapshotSummary(pe(s),n)}},DELETE_SNAPSHOT:(e,t,s)=>{const a=Se(s,t.target.id);return{title:e.deleteSnapshot,tone:"delete",body:e.removed(a?pe(a.at):t.target.id)}},SET_FEATURE:(e,t)=>{const{feature:s,enabled:a}=v(y.SET_FEATURE,t);return{title:a?e.enableFeature:e.disableFeature,tone:a?"create":"delete",body:e.featureName(s)}}},ks=(e,t,s,a)=>{let n;try{const i=Hn[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:Es(e,s,t.target),tone:n.tone,...n.body===void 0?{}:{summary:n.body}}},ws=e=>`${e.type} ${A(e.target)} ${JSON.stringify(e.payload)}`,Es=(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=B(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=Se(t,s.id);return a?e.targetLabel(e.snapshotGroup,pe(a.at)):e.targetMissing(e.snapshotGroup,s.id)}case"page":return e.targetLabel(e.mapGroup,ct(t));default:return`${s.type} \xB7 ${s.id}`}}catch{return`${s.type} \xB7 ${s.id}`}},Ss=(e,t,s)=>{const a=[{value:"page:usm",label:e.wholeMap,group:e.mapGroup}];for(const n of t.activities){a.push({value:A({type:"activity",id:n.id}),label:n.name,group:e.activityGroup});for(const i of n.steps)a.push({value:A({type:"step",id:le(n.id,i.id)}),label:`${n.name} \u203A ${i.name}`,group:e.stepGroup})}for(const n of t.milestones)a.push({value:A({type:"milestone",id:n.id}),label:n.name,group:e.milestoneGroup});for(const n of t.statuses)a.push({value:A({type:"status",id:n.id}),label:n.name,group:e.statusGroup});for(const n of t.labels)a.push({value:A({type:"label",id:n.id}),label:n.name,group:e.labelGroup});for(const n of t.members)a.push({value:A({type:"member",id:n.id}),label:n.name,group:e.memberGroup});for(const n of t.estimates)a.push({value:A({type:"estimate",id:n.id}),label:e.estimateText(n.name,n.points),group:e.estimateGroup});for(const n of t.snapshots)a.push({value:A({type:"snapshot",id:n.id}),label:pe(n.at),group:e.snapshotGroup});for(const n of t.stories)a.push({value:A({type:"story",id:n.id}),label:n.name,group:e.storyGroup});return a},$s=(e,t,s)=>{const a=t.stories.find(n=>n.id===s.story);if(a)return{value:A({type:"story",id:a.id}),label:a.name,group:e.storyGroup};for(const n of t.activities){const i=n.steps.find(r=>r.id===s.step);if(i)return{value:A({type:"step",id:le(n.id,i.id)}),label:i.name,group:e.stepGroup}}return null},ct=e=>e.title??"User Story Mapping",Kn=(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)?{[ie.key]:ie.value}:{}}}case"step":case"activity":return{tab:null,view:null};case"milestone":return{tab:"milestones"};case"status":return{tab:"statuses"};case"label":return{tab:"labels"};case"member":return z(e,"assignees")?{tab:"members"}:null;case"estimate":case"snapshot":return z(e,"estimates")?{tab:"burndown"}:null;default:return null}},xs=(e,t)=>{const s=B(e,t.step),a=s?.activity??te(e,t.activity)??e.activities[0],n=s?.step??a?.steps.find(u=>u.id===t.step)??a?.steps[0],i=_n(e,t.story),r={...t};a?r.activity=a.id:delete r.activity,n?r.step=n.id:delete r.step,i?r.story=i.id:delete r.story,r.view=t.view==="group"?"group":"activity";const o=ze(e,t);for(const u of xe){const w=ys(e,u,o[u]);w===null?delete r[u]:r[u]=w}t[ie.key]!==ie.value&&delete r[ie.key];const d=ms(e,t);d==="map"?delete r.tab:r.tab=d,P(e,t.milestone)||delete r.milestone;const p=Pe(t);return p===null?delete r.highlight:r.highlight=p,r},Ts=(e,t)=>{switch(t.type){case"activity":return te(e,t.id)!==void 0;case"step":return B(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 Se(e,t.id)!==void 0;case"page":return!0;default:return!1}},_s=e=>{const t=ue(e);return{kind:"view",name:"usm",label:"User Story Mapping",parseBase:Ft,emptyBase:Gt,actions:y,apply:is,canonicalState:kn,hasTarget:Ts,canonicalTarget:(s,a)=>{if(a.type!=="step")return a;const n=B(s,a.id);return n?{...a,id:le(n.activity.id,n.step.id)}:a},describe:(s,a,n)=>ks(t,s,a,n),serialize:ws,resolveNavigation:xs,navigationFor:Kn,commentTargets:(s,a)=>Ss(t,s),currentTarget:(s,a)=>$s(t,s,a),settings:s=>({items:De.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:ct}},As=.5,qn=({widths:e,available:t,gap:s,moreWidth:a,keep:n})=>{if(e.reduce((u,w)=>u+w,0)+s*Math.max(0,e.length-1)<=t+As)return[];const r=t-a+As,o=new Set;let d=0;const p=u=>{d+=(o.size===0?0:s)+(e[u]??0),o.add(u)};n>=0&&n<e.length&&p(n);for(const[u,w]of e.entries())if(!o.has(u)){if(d+(o.size===0?0:s)+w>r)break;p(u)}return e.flatMap((u,w)=>o.has(w)?[]:[w])},Is=new Set;class Wn{#i;#e;#a=Is;#n=0;#s=null;#t=null;constructor(t,s){this.#i=t,this.#e=s,t.addController(this)}get hidden(){return this.#a}get minimum(){return this.#n}hostConnected(){typeof ResizeObserver>"u"||(this.#s=new ResizeObserver(()=>this.#r()))}hostUpdated(){const t=this.#e.row();t!==this.#t&&(this.#t&&this.#s?.unobserve(this.#t),t&&this.#s?.observe(t),this.#t=t),this.#r()}hostDisconnected(){this.#s?.disconnect(),this.#s=null,this.#t=null}#r(){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,r=i?Ms(i):0,o=this.#e.more(t),d=o?o.getBoundingClientRect().width+Ms(t):0,p=qn({widths:a,available:t.getBoundingClientRect().width,gap:r,moreWidth:d,keep:n}),u=new Set(p.flatMap(E=>{const S=s[E];return S?[this.#e.keyOf(S)]:[]})),w=Math.ceil((a[n]??0)+d);jn(u,this.#a)&&w===this.#n||(this.#a=u.size===0?Is:u,this.#n=w,this.#i.requestUpdate())}}const Ms=e=>Number.parseFloat(getComputedStyle(e).columnGap)||0,jn=(e,t)=>e.size===t.size&&[...e].every(s=>t.has(s)),ut=1440*60*1e3,Xn=48,Zn=8,Jn=(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 r=Math.min(...i),o=Math.max(...i);o-r<ut&&(r-=ut/2,o+=ut/2);const d=Qn(Math.max(0,...e.map($=>$.value))),p=d.at(-1)??1,u=$=>n.left+($-r)/(o-r)*(n.right-n.left),w=$=>n.bottom-$/p*(n.bottom-n.top),E=e.map($=>({x:u($.at),y:w($.value),at:$.at,value:$.value,...$.snapshotId===void 0?{}:{snapshotId:$.snapshotId}})),S=E[0],M=ti(r,o,Math.floor((n.right-n.left)/Xn));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:u(t),y2:w(0)},nowX:u(s),dueX:t===null?null:u(t),yTicks:d.map($=>({y:w($),value:$})),valueTop:p,xUnit:M.unit,xTicks:M.ats.map($=>({x:u($),at:$})),domain:{start:r,end:o},idealSpan:t===null||!S?null:{at:S.at,value:S.value,due:t}}},Qn=e=>{const t=ei(e/4),s=Math.max(1,Math.ceil(e/t));return Array.from({length:s+1},(a,n)=>n*t)},ei=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,ti=(e,t,s)=>{const a=Math.max(1,s),n=["day","week","biweek","month","quarter"];for(const i of n){const r=Ls(i,e,t,a);if(r!==null)return{unit:i,ats:r}}return{unit:"year",ats:Ls("year",e,t,1/0)??[]}},Ls=(e,t,s,a)=>{const n=[];for(let i=si(e,t);i<=s;i=ai(e,i)){if(n.length===a)return null;n.push(i)}return n},si=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],r=(o,d)=>o.getTime()>=t?o.getTime():d().getTime();switch(e){case"day":return r(new Date(a,n,i),()=>new Date(a,n,i+1));case"week":case"biweek":{const o=r(new Date(a,n,i),()=>new Date(a,n,i+1)),d=new Date(o),p=(8-d.getDay())%7;return new Date(d.getFullYear(),d.getMonth(),d.getDate()+p).getTime()}case"month":return r(new Date(a,n,1),()=>new Date(a,n+1,1));case"quarter":{const o=n-n%3;return r(new Date(a,o,1),()=>new Date(a,o+3,1))}case"year":return r(new Date(a,0,1),()=>new Date(a+1,0,1))}},ai=(e,t)=>{const s=new Date(t),[a,n,i]=[s.getFullYear(),s.getMonth(),s.getDate()],r={day:1,week:7,biweek:14},o={month:1,quarter:3,year:12};return e==="day"||e==="week"||e==="biweek"?new Date(a,n,i+r[e]).getTime():new Date(a,n+o[e],1).getTime()},Ds=(e,t)=>{const{plot:s,domain:a,dots:n}=e,i=Math.min(s.right,Math.max(s.left,t)),r=n.reduce((E,S)=>E===null||Math.abs(S.x-i)<Math.abs(E.x-i)?S:E,null),o=r!==null&&Math.abs(r.x-i)<=Zn?r:null,d=o?.at??a.start+(i-s.left)/(s.right-s.left)*(a.end-a.start),p=o?.value??ni(n,d),u=ii(e,d),w=E=>E===null?null:Te(s.bottom-E/e.valueTop*(s.bottom-s.top));return{x:o?.x??i,at:d,actual:p,ideal:u,actualY:w(p),idealY:w(u),dot:o}},ni=(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},ii=(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))},I=e=>`--usm-tone: var(--dpk-${e==null||e==="gray"?"ink-faint":e})`,Rs={circle:U(Za),lightbulb:U(sn),flag:U(tn),play:U(ja),clock:U(Ja),eye:U(en),pause:U(Wa),check:U(Ka),x:U(Xa)},ri=U(qa),oi=e=>{if(e>=1)return Rs.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
2
|
<circle cx="12" cy="12" r="10"></circle>
|
|
3
3
|
${e>0?N`<circle
|
|
4
4
|
class="si-pie"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a4 as ja,S as Xi,a5 as le,a6 as Va,a7 as Qa,a8 as Oe,a9 as A,aa as F,ab as ce,ac as x,ad as pe,ae as Za,af as Ja,X as ed,j as Gi,ag as Ki,ah as re,ai as $,aj as U,ak as Wi,al as ji,am as td,an as nd,D as id,ao as od,U as sd,ap as An,aq as rd,ar as Vi,as as y,C as ad,at as dd,au as he,av as z,aw as T,ax as E,ay as M,az as H,aA as Xe,aB as mt,aC as On,aD as ld,aE as Qi,aF as Zi,aG as cd,aH as Te,aI as Ji,B as eo,aJ as pd,G as to,H as Dn,I as qt,aK as hd,aL as G,aM as te,aN as Qe,p as N,t as Se,aO as ue,aP as Nn,aQ as gt,aR as ud,N as Pt,e as zn,P as B,aS as Ft,aT as md,l as fe,aU as qn,aV as gd,aW as fd,aX as no,aY as bd,aZ as io,a_ as Bt,a$ as Me,b0 as xd,b1 as yd,b2 as kd}from"./shared-DdpMqkAH.js";import{Q as vd,A as wd,H as $d,R as Ed,S as Td,T as be,U as Ie,V as oo,W as Sd,X as xe,Y as Md,Z as Pn,_ as so,$ as Id}from"./shared-dnY35u9q.js";import{o as Cd}from"./shared-TrlnHjrJ.js";import{E as Ld,t as Ce,u as Rd,v as Ge,B as Ut,w as Ht,x as _d}from"./shared-df9XN7ns.js";import{a as Ad,c as Od}from"./shared-qk9TB_UM.js";import{o as Yt}from"./shared-EYOAbLSo.js";const Dd=[["rect",{x:"8",y:"8",width:"8",height:"8",rx:"2"}],["path",{d:"M4 10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2"}],["path",{d:"M14 20a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2"}]],Nd=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]],zd=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}]],qd=[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1"}]],Pd=[["circle",{cx:"19",cy:"5",r:"2"}],["circle",{cx:"5",cy:"19",r:"2"}],["path",{d:"M5 17A12 12 0 0 1 17 5"}]];function Fd(t,e){let n=0;for(let i=0;i<t.length;i++)n+=e(t[i],i);return n}function ro(t){if(t.length===0)return NaN;const e=t.slice().sort((i,o)=>i-o),n=Math.floor(e.length/2);return e.length%2===0?(e[n-1]+e[n])/2:e[n]}const ao={},lo=t=>{const e={kind:"board",name:t.name,label:t.label,addable:t.addable??!1,parseBase:()=>ao,emptyBase:()=>ao,actions:{},apply:()=>null,hasTarget:()=>!1,describe:o=>({title:o.type,targetLabel:Xi(o.target),tone:"meta"}),serialize:o=>`${o.type} ${Xi(o.target)} ${JSON.stringify(o.payload)}`,resolveNavigation:()=>({}),commentTargets:()=>[],title:()=>t.label},n=t.commentTargets?.()??[],i=new Map((t.elementActionResults?.()??[]).map(o=>[o.id,o]));return ja(e,n,i)},ft={nodeSpacing:34,layerSpacing:84,padding:28,sweeps:4,coordinatePasses:6,groupSpacing:34,superGroupSpacing:34,superGroupRowGap:0,superGroupColumnGap:0,superGroupRowCount:0},bt=t=>{const e=[...t].sort((i,o)=>i-o);if(e.length===0)return 0;const n=Math.floor(e.length/2);return e.length%2===1?e[n]??0:((e[n-1]??0)+(e[n]??0))/2},Fn=(t,e)=>{const n=new Map;for(const r of t)n.set(r.id,[]);for(const r of e)n.get(r.from)?.push(r);const i=new Map,o=new Set,s=r=>{i.set(r,"open");for(const a of n.get(r)??[]){const d=i.get(a.to)??"new";d==="open"?o.add(a.id):d==="new"&&s(a.to)}i.set(r,"done")};for(const r of t)(i.get(r.id)??"new")==="new"&&s(r.id);return{reversed:o,forward:e.filter(r=>!o.has(r.id))}},co=(t,e)=>{const n=new Map,i=new Map;for(const a of t)n.set(a.id,[]),i.set(a.id,[]);for(const a of e)i.get(a.from)?.push(a),n.get(a.to)?.push(a);const o=new Map(t.map(a=>[a.id,0])),s=new Map(t.map(a=>[a.id,(n.get(a.id)??[]).length])),r=t.filter(a=>(s.get(a.id)??0)===0).map(a=>a.id);for(const a of r)for(const d of i.get(a)??[]){const l=o.get(d.to)??0;o.set(d.to,Math.max(l,(o.get(a)??0)+1));const c=(s.get(d.to)??0)-1;s.set(d.to,c),c===0&&r.push(d.to)}return o},po=(t,e,n,i)=>{const o=[...t.keys()].sort((s,r)=>s-r);for(let s=0;s<i;s++){const r=s%2===0;for(const a of r?o:[...o].reverse()){const d=t.get(a)??[],l=new Map(d.map((p,u)=>[p,u])),c=p=>{const u=l.get(p);return u===void 0?null:u},h=d.map(p=>{const u=(e.get(p)??[]).filter(m=>(n.get(m)??a)===a+(r?-1:1)).map(c).filter(m=>m!==null);return{id:p,want:u.length>0?bt(u):l.get(p)??0}});h.sort((p,u)=>p.want-u.want||(l.get(p.id)??0)-(l.get(u.id)??0)),t.set(a,h.map(p=>p.id))}}},ho=(t,e,n,i)=>{const o=t.map((r,a)=>({id:r,want:n.get(r)??a*100,index:a}));o.sort((r,a)=>r.want-a.want||r.index-a.index);let s=0;for(const r of o){const a=e.get(r.id);a&&(a.y=s,s+=a.spec.height+i)}return{height:Math.max(0,s-i)}},Bd=(t,e,n,i,o)=>{const s=[...t.keys()].sort((l,c)=>l-c),r=new Map;for(const l of s)r.set(l,ho(t.get(l)??[],e,new Map,o.nodeSpacing).height);const a=Math.max(0,...r.values());for(const l of s){const c=(a-(r.get(l)??0))/2;for(const h of t.get(l)??[]){const p=e.get(h);p&&(p.y+=c)}}const d=(l,c)=>{const h=(n.get(l)??[]).filter(p=>i.get(p)===c).flatMap(p=>{const u=e.get(p);return u?[u.y+u.spec.height/2]:[]});return h.length>0?bt(h):null};for(let l=0;l<o.coordinatePasses;l++){const c=l%2===0;for(const h of c?s:[...s].reverse()){const p=t.get(h)??[],u=new Map;for(const b of p){const k=d(b,h+(c?-1:1)),v=e.get(b);v!==void 0&&u.set(b,k===null?v.y+v.spec.height/2:k)}const m=p.map(b=>e.get(b)?.y??0);ho(p,e,u,o.nodeSpacing);const f=p.map(b=>e.get(b)?.y??0),g=bt(m)-bt(f);for(const b of p){const k=e.get(b);k&&(k.y+=g)}}}},uo=(t,e,n,i,o,s,r)=>{for(const a of o){const d=t.filter(h=>i.get(h)===a);if(d.length===0)continue;const l=d.map((h,p)=>({id:h,want:n.get(h)??p,index:p})).sort((h,p)=>h.want-p.want||h.index-p.index);let c=s.get(a)??0;for(const h of l){const p=e.get(h.id);p&&(p.y=c,c+=p.spec.height+r)}}},Ud=(t,e,n,i,o)=>{let s=0;for(const r of t.values()){const a=r.filter(l=>n.get(l)===i);if(a.length===0)continue;const d=a.reduce((l,c)=>l+(e.get(c)?.spec.height??0),0)+o*(a.length-1);d>s&&(s=d)}return s},Hd=(t,e,n,i,o,s,r)=>{const a=new Map(t.map(S=>[S.id,S.group??S.id])),d=new Set(t.flatMap(S=>S.group===void 0?[]:[S.group])),l=t.some(S=>S.superGroup!==void 0),c=new Map;for(const S of t){const w=a.get(S.id)??S.id;S.superGroup!==void 0&&!c.has(w)&&c.set(w,S.superGroup)}const h=S=>c.get(S)??S,p=[...e.keys()].sort((S,w)=>S-w),u=S=>{const w=o.get(S)??0,L=(e.get(w)??[]).length,O=s.get(S)??0;return L<=1?0:O/(L-1)},m=[...new Set(a.values())],f=S=>{const w=t.filter(L=>(a.get(L.id)??L.id)===S).map(L=>L.id);return w.length===0?0:w.reduce((L,O)=>L+u(O),0)/w.length},g=[...new Set(m.map(h))],b=S=>{const w=t.filter(L=>h(a.get(L.id)??L.id)===S).map(L=>L.id);return w.length===0?0:w.reduce((L,O)=>L+u(O),0)/w.length},v=g.sort((S,w)=>b(S)-b(w)).flatMap(S=>m.filter(w=>h(w)===S).sort((w,L)=>f(w)-f(L))),_=new Map(v.map(S=>[S,Ud(e,n,a,S,r.nodeSpacing)])),I=new Map;let R=0;for(const[S,w]of v.entries()){I.set(w,R),R+=_.get(w)??0;const L=v[S+1];if(L!==void 0){const O=l&&h(w)!==h(L);R+=O?r.superGroupSpacing:d.has(w)||d.has(L)?r.groupSpacing:r.nodeSpacing}}for(const S of p){const w=e.get(S)??[];uo(w,n,new Map(w.map(L=>[L,s.get(L)??0])),a,v,I,r.nodeSpacing)}const C=(S,w)=>{const L=(i.get(S)??[]).filter(O=>o.get(O)===w).flatMap(O=>{const P=n.get(O);return P?[P.y+P.spec.height/2]:[]});return L.length>0?bt(L):null};for(let S=0;S<r.coordinatePasses;S++){const w=S%2===0;for(const L of w?p:[...p].reverse()){const O=e.get(L)??[],P=new Map;for(const X of O){const V=C(X,L+(w?-1:1)),q=n.get(X);q!==void 0&&P.set(X,V===null?q.y+q.spec.height/2:V)}uo(O,n,P,a,v,I,r.nodeSpacing)}}},mo=(t,e,n)=>{const i=e===void 0?void 0:t.spec.ports?.[e];return i?{x:t.x+i.x,y:t.y+i.y}:n==="out"?{x:t.x+t.spec.width,y:t.y+t.spec.height/2}:{x:t.x,y:t.y+t.spec.height/2}},Xt=(t,e,n)=>{let i=0;const o=[];for(const s of t){const r=n.byId.get(s.from),a=n.byId.get(s.to);if(!r||!a)continue;const d=mo(r,s.fromPort,"out"),l=mo(a,s.toPort,"in");if(s.from===s.to){const m=r.x+r.spec.width,f=r.y+r.spec.height,g=Math.max(n.padding/2,f+18);o.push({id:s.id,points:[d,{x:m+20,y:d.y},{x:m+20,y:g},{x:r.x-20,y:g},{x:r.x-20,y:l.y},l]});continue}if(!e.has(s.id)&&(r.layer<a.layer||r.layer===a.layer&&l.x>d.x+12)){if(Math.abs(d.y-l.y)<.5){o.push({id:s.id,points:[d,l]});continue}const f=r.layer<a.layer?Math.max(d.x+14,a.x-Math.max(12,n.layerSpacing/2)):(d.x+l.x)/2;o.push({id:s.id,points:[d,{x:f,y:d.y},{x:f,y:l.y},l]});continue}const c=s.fromPort===void 0?{x:r.x+r.spec.width/2,y:r.y+r.spec.height}:d,h=s.toPort===void 0?{x:a.x+a.spec.width/2,y:a.y+a.spec.height}:l,p=Math.max(c.y,h.y)+18+i*14;i+=1;const u=[d,c,{x:c.x,y:p},{x:h.x,y:p},h,l].filter((m,f,g)=>f===0||m.x!==g[f-1]?.x||m.y!==g[f-1]?.y);o.push({id:s.id,points:u})}return o},Bn=(t,e,n)=>{const i=e.flatMap(p=>[...p.points]),o=[...t.map(p=>p.x),...t.map(p=>p.x+p.spec.width),...i.map(p=>p.x)],s=[...t.map(p=>p.y),...t.map(p=>p.y+p.spec.height),...i.map(p=>p.y)],r=Math.min(0,...o),a=Math.min(0,...s),d=Math.max(0,...o),l=Math.max(0,...s),c=n-r,h=n-a;return{width:d-r+n*2,height:l-a+n*2,nodes:t.map(p=>({id:p.spec.id,x:p.x+c,y:p.y+h,width:p.spec.width,height:p.spec.height,layer:p.layer,order:p.order})),routes:e.map(p=>({id:p.id,points:p.points.map(u=>({x:u.x+c,y:u.y+h}))}))}},Gt=(t,e)=>{const n=new Map(t.map(i=>[i.id,[]]));for(const i of e)i.from!==i.to&&(n.get(i.from)?.push(i.to),n.get(i.to)?.push(i.from));return n},go=(t,e,n,i)=>t.map(o=>({spec:o,layer:e.get(o.id)??0,order:n.get(o.id)??0,...i(o)})),fo=(t,e)=>{const n=new Map;for(const i of t){const o=e.get(i.id)??0,s=n.get(o);s?s.push(i.id):n.set(o,[i.id])}return n},bo=(t,e,n={})=>{if(t.some(f=>f.superGroup!==void 0))return nl(t,e,n);const i={...ft,...n};if(t.length===0)return{width:0,height:0,nodes:[],routes:[]};const o=new Set(t.map(f=>f.id)),s=e.filter(f=>o.has(f.from)&&o.has(f.to)),{forward:r,reversed:a}=Fn(t,s),d=co(t,r),l=fo(t,d);po(l,Gt(t,s),d,i.sweeps);const c=new Map;for(const f of l.values())f.forEach((g,b)=>c.set(g,b));const h=go(t,d,c,()=>({x:0,y:0})),p=new Map(h.map(f=>[f.spec.id,f]));t.some(f=>f.group!==void 0||f.superGroup!==void 0)?Hd(t,l,p,Gt(t,s),d,c,i):Bd(l,p,Gt(t,s),d,i);const u=[...l.keys()].sort((f,g)=>f-g);let m=0;for(const f of u){const g=Math.max(...(l.get(f)??[]).map(b=>p.get(b)?.spec.width??0));for(const b of l.get(f)??[]){const k=p.get(b);k&&(k.x=m)}m+=g+i.layerSpacing}return Bn(h,Xt(s,a,{byId:p,layerSpacing:i.layerSpacing,padding:i.padding}),i.padding)},Ze=12,xo=t=>({x:t.x+t.width/2,y:t.y+t.height/2}),yo=(t,e)=>{const n=xo(t),i=xo(e),o=i.x-n.x,s=i.y-n.y;return Math.abs(o)>=Math.abs(s)?o>=0?"right":"left":s>=0?"bottom":"top"},ko=(t,e,n)=>Math.min(n,Math.max(e,t)),vo=(t,e,n)=>{const i=ko(n.y-t.y,Ze,Math.max(Ze,t.height-Ze)),o=t.height<=0?.5:i/t.height,s=t.x+ko(o*t.width,Ze,Math.max(Ze,t.width-Ze));switch(e){case"left":return{x:t.x,y:t.y+i};case"right":return{x:t.x+t.width,y:t.y+i};case"top":return{x:s,y:t.y};case"bottom":return{x:s,y:t.y+t.height};default:return{x:t.x+t.width,y:t.y+i}}},Yd=(t,e,n)=>{if(t.length<=1)return t.map(c=>c.id);const i=t.map(c=>({id:c.id,width:c.width,height:c.height})),o=new Set(i.map(c=>c.id)),s=e.filter(c=>o.has(c.from)&&o.has(c.to)&&c.from!==c.to),{forward:r}=Fn(i,s),a=co(i,r),d=fo(i,a);return po(d,Gt(i,s),a,n),[...d.keys()].sort((c,h)=>c-h).flatMap(c=>d.get(c)??[])},Xd=(t,e,n,i)=>{let o=0;for(let s=e;s<n;s++)o+=t[s].width;return o+i*Math.max(0,n-e-1)},Un=(t,e,n)=>{const i=t.length,o=Math.max(1,Math.min(n,i)),s=Number.POSITIVE_INFINITY,r=Array.from({length:i+1},()=>Array.from({length:o+1},()=>s)),a=Array.from({length:i+1},()=>Array.from({length:o+1},()=>0));r[0][0]=0;for(let u=1;u<=o;u++)for(let m=u;m<=i;m++)for(let f=u-1;f<m;f++){const g=r[f][u-1];if(g===s)continue;const b=Math.max(g,Xd(t,f,m,e));b<r[m][u]&&(r[m][u]=b,a[m][u]=f)}const d=[];let l=i;for(let u=o;u>0;u--){const m=a[l][u];d.unshift(t.slice(m,l)),l=m}const c=new Map;let h=0,p=0;for(const u of d){let m=0;const f=Math.max(...u.map(g=>g.height));for(const g of u)c.set(g.id,{x:m,y:h}),m+=g.width+e;p=Math.max(p,m-e),h+=f+e}return{positions:c,width:p,height:Math.max(0,h-e)}},Ke=1e-6,Kt=(t,e)=>Math.abs(t.x-e.x)<Ke&&Math.abs(t.y-e.y)<Ke,Wt=(t,e,n)=>{const i=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return Math.abs(i)<Ke?0:i>0?1:-1},jt=(t,e,n)=>Math.min(t.x,n.x)-Ke<=e.x&&e.x<=Math.max(t.x,n.x)+Ke&&Math.min(t.y,n.y)-Ke<=e.y&&e.y<=Math.max(t.y,n.y)+Ke,wo=(t,e)=>{const[n,i]=t,[o,s]=e;if(Kt(n,o)||Kt(n,s)||Kt(i,o)||Kt(i,s))return!1;const r=Wt(n,i,o),a=Wt(n,i,s),d=Wt(o,s,n),l=Wt(o,s,i);return r!==a&&d!==l||r===0&&jt(n,o,i)||a===0&&jt(n,s,i)||d===0&&jt(o,n,s)?!0:l===0&&jt(o,i,s)},$o=(t,e)=>{const n=t.x+t.width/2,i=t.y+t.height/2,o=e.x+e.width/2,s=e.y+e.height/2,r=o-n,a=s-i;return Math.abs(r)>=Math.abs(a)?{x:r>=0?t.x+t.width:t.x,y:i}:{x:n,y:a>=0?t.y+t.height:t.y}},Gd=(t,e,n)=>{const i=r=>{const a=t.positions.get(r),d=e.get(r);return!a||!d?null:{id:r,x:a.x,y:a.y,width:d.width,height:d.height}},o=[];let s=0;for(const r of n){if(r.from===r.to)continue;const a=i(r.from),d=i(r.to);if(!a||!d)continue;const l=$o(a,d),c=$o(d,a);if(l.x===c.x||l.y===c.y){const m=[l,c];s+=o.filter(f=>wo(m,f)).length,o.push(m);continue}const h=[[[l,{x:c.x,y:l.y}],[{x:c.x,y:l.y},c]],[[l,{x:l.x,y:c.y}],[{x:l.x,y:c.y},c]]];let p=h[0],u=Number.POSITIVE_INFINITY;for(const m of h){const f=m.reduce((g,b)=>g+o.filter(k=>wo(b,k)).length,0);f<u&&(u=f,p=m)}s+=u,o.push(...p)}return s},Kd=(t,e,n)=>{const i=s=>{const r=t.positions.get(s),a=e.get(s);return!r||!a?null:{x:r.x+a.width/2,y:r.y+a.height/2}};let o=0;for(const s of n){if(s.from===s.to)continue;const r=i(s.from),a=i(s.to);r&&a&&(o+=Math.hypot(r.x-a.x,r.y-a.y))}return o},Eo=(t,e)=>{const n=t[0].x===t[1].x,i=e[0].x===e[1].x;if(n===i)return!1;const[o,s,r,a]=n?[t[0],t[1],e[0],e[1]]:[e[0],e[1],t[0],t[1]],d=o.x,l=r.y;return d>Math.min(r.x,a.x)&&d<Math.max(r.x,a.x)&&l>Math.min(o.y,s.y)&&l<Math.max(o.y,s.y)},To=(t,e,n,i)=>{const o=n===void 0?void 0:t.ports?.[n];return o!==void 0?{x:e.x+o.x,y:e.y+o.y}:i==="out"?{x:e.x+t.width,y:e.y+t.height/2}:{x:e.x,y:e.y+t.height/2}},Wd=(t,e,n)=>{const i=new Map(t.map(r=>[r.id,r])),o=[];let s=0;for(const r of e){if(r.from===r.to)continue;const a=i.get(r.from),d=i.get(r.to),l=n.get(r.from),c=n.get(r.to);if(a===void 0||d===void 0||l===void 0||c===void 0)continue;const h={x:l.x,y:l.y,width:a.width,height:a.height},p={x:c.x,y:c.y,width:d.width,height:d.height},u=vo(h,yo(h,p),To(a,l,r.fromPort,"out")),m=vo(p,yo(p,h),To(d,c,r.toPort,"in")),f=v=>v.slice(1).map((_,I)=>[v[I],_]);if(u.x===m.x||u.y===m.y){const v=[u,m];s+=o.filter(_=>Eo(v,_)).length,o.push(v);continue}const g=[[u,{x:m.x,y:u.y},m],[u,{x:u.x,y:m.y},m]];let b=g[0],k=Number.POSITIVE_INFINITY;for(const v of g){const _=f(v).reduce((I,R)=>I+o.filter(C=>Eo(R,C)).length,0);_<k&&(b=v,k=_)}s+=k,o.push(...f(b))}return s},Vt={crossings:1e4,edgeLength:1,aspectDeviation:50},So=50,jd=Vt.aspectDeviation,Hn=(t,e,n,i,o)=>{const s=t.width<=0||t.height<=0?0:Math.abs(Math.log(t.width/t.height/i));return Gd(t,e,n)*Vt.crossings+Kd(t,e,n)*Vt.edgeLength+s*o},Vd=function*(t){const e=[...t],n=e.length;if(yield[...e],n<=1)return;const i=Array.from({length:n}).fill(0);let o=0;for(;o<n;)if(i[o]<o){const s=o%2===0?0:i[o],r=e[s];e[s]=e[o],e[o]=r,yield[...e],i[o]=i[o]+1,o=0}else i[o]=0,o++},Qd=7,Zd=400,Jd=1e-6,Yn=(t,e,n,i,o=ft.sweeps,s=0,r=Vt.aspectDeviation,a=Zd)=>{if(t.length===0)return{positions:new Map,width:0,height:0};if(t.length===1){const I=t[0];return{positions:new Map([[I.id,{x:0,y:0}]]),width:I.width,height:I.height}}const d=new Map(t.map(I=>[I.id,{width:I.width,height:I.height}])),l=e.filter(I=>d.has(I.from)&&d.has(I.to)&&I.from!==I.to),c=I=>{const R=I.map(P=>({id:P,...d.get(P)}));let C=Un(R,n,1),S=Number.POSITIVE_INFINITY,w=1;const L=s>0?Math.min(s,R.length):1,O=s>0?L:R.length;for(let P=L;P<=O;P++){const X=Un(R,n,P);if(X.width<=0||X.height<=0)continue;const V=Hn(X,d,l,i,r);V<S&&(S=V,C=X,w=P)}return{packed:C,cost:S,rowCount:w}},h=(I,R)=>Un(I.map(C=>({id:C,...d.get(C)})),n,R),p=t.map(I=>I.id);if(p.length<=Qd){let I=c(p);for(const R of Vd(p)){const C=c(R);C.cost<I.cost&&(I=C)}return I.packed}const u=s>0?Math.min(a,50):a;let m=Yd(t,l,o);const f=c(m),g=s>0?Math.min(s,m.length):f.rowCount;let b=s>0?h(m,g):f.packed,k=s>0?Hn(b,d,l,i,r):f.cost,v=0,_=!0;for(;_&&v<u;){_=!1;for(let I=0;I<m.length-1&&v<u;I++){v++;const R=[...m],C=R[I];R[I]=R[I+1],R[I+1]=C;const S=h(R,g);if(S.width<=0||S.height<=0)continue;const w=Hn(S,d,l,i,r);w<k-Jd&&(k=w,b=S,m=R,_=!0)}}return b},el=(t,e,n,i,o)=>{if(n<=0&&i<=0||t.positions.size<=1)return t;const s=new Map;for(const[p,u]of t.positions){const m=s.get(u.y);m?m.push(p):s.set(u.y,[p])}const a=[...s.keys()].sort((p,u)=>p-u).map(p=>[...s.get(p)??[]].sort((u,m)=>(t.positions.get(u)?.x??0)-(t.positions.get(m)?.x??0))),d=new Map;let l=0,c=0,h=0;return a.forEach((p,u)=>{const m=a[u-1];if(m!==void 0){const g=p.some(o)||m.some(o);h+=g?n:0}let f=0;p.forEach((g,b)=>{const k=p[b-1];k!==void 0&&(f+=o(k)||o(g)?i:0);const v=t.positions.get(g),_=e.get(g);if(!v||!_)return;const I={x:v.x+f,y:v.y+h};d.set(g,I),l=Math.max(l,I.x+_.width),c=Math.max(c,I.y+_.height)})}),{positions:d,width:l,height:c}},Mo=1.3,tl=1.45,nl=(t,e,n={})=>{const i={...ft,...n};if(t.length===0)return{width:0,height:0,nodes:[],routes:[]};const o=new Set(t.map(w=>w.id)),s=e.filter(w=>o.has(w.from)&&o.has(w.to)),r=w=>w.group??`__loose:${w.id}`,a=w=>w.superGroup??`__top:${w.id}`,d=new Map(t.map(w=>[w.id,r(w)])),l=new Map(t.map(w=>[w.id,a(w)])),c=new Map;for(const w of t){const L=r(w),O=c.get(L);O?O.push(w):c.set(L,[w])}const h=new Map;for(const[w,L]of c){const O=L[0];if(L.length===1&&O!==void 0){h.set(w,{size:{width:O.width,height:O.height},relative:new Map([[O.id,{x:0,y:0}]])});continue}const P=new Set(L.map(q=>q.id)),X=s.filter(q=>P.has(q.from)&&P.has(q.to)),V=Yn(L.map(q=>({id:q.id,width:q.width,height:q.height})),X,i.nodeSpacing,Mo,i.sweeps,0,So);h.set(w,{size:{width:V.width,height:V.height},relative:V.positions})}const p=new Map;for(const[w,L]of c){const O=L[0];O!==void 0&&p.set(w,a(O))}const u=new Map;for(const[w,L]of p){const O=u.get(L);O?O.push(w):u.set(L,[w])}const m=new Map;for(const[w,L]of u){const O=L[0];if(L.length===1&&O!==void 0){const q=h.get(O);q&&m.set(w,{size:q.size,relative:new Map([[O,{x:0,y:0}]])});continue}const P=new Map(L.flatMap(q=>h.has(q)?[[q,h.get(q).size]]:[])),X=s.flatMap(q=>{const oe=d.get(q.from),ee=d.get(q.to);return oe===void 0||ee===void 0||oe===ee?[]:!L.includes(oe)||!L.includes(ee)?[]:[{id:q.id,from:oe,to:ee}]}),V=Yn(L.flatMap(q=>P.has(q)?[{id:q,...P.get(q)}]:[]),X,i.groupSpacing,Mo,i.sweeps,0,So);m.set(w,{size:{width:V.width,height:V.height},relative:V.positions})}const f=new Map([...m].map(([w,L])=>[w,L.size])),g=[...m.keys()],b=new Set(t.flatMap(w=>w.superGroup===void 0?[]:[w.superGroup])),k=w=>{const L=new Map;for(const[O,P]of u){const X=w.get(O)??{x:0,y:0},V=m.get(O);for(const q of P){const oe=V?.relative.get(q)??{x:0,y:0},ee=h.get(q);if(ee)for(const[j,Z]of ee.relative)L.set(j,{x:X.x+oe.x+Z.x,y:X.y+oe.y+Z.y})}}return L};let v=new Map;if(g.length<=1)for(const w of g)v.set(w,{x:0,y:0});else{const w=s.flatMap(j=>{const Z=l.get(j.from),de=l.get(j.to);return Z===void 0||de===void 0||Z===de?[]:[{id:j.id,from:Z,to:de}]}),L=j=>Yn(g.map(Z=>({id:Z,...f.get(Z)})),w,i.superGroupSpacing,tl,i.sweeps,j,jd),O=L(i.superGroupRowCount),P=i.superGroupRowCount>0?[]:[1,2,3,4].filter(j=>j<=g.length),X=[O,...P.map(j=>L(j))],V=j=>{const Z=el(j,f,i.superGroupRowGap,i.superGroupColumnGap,Y=>b.has(Y)),de=Wd(t,s,k(Z.positions)),D=Math.min(1180/Math.max(1,Z.width),900/Math.max(1,Z.height),1);return{offsets:Z.positions,crossings:de,fit:D}},q=X.map(V),oe=q[0];let ee=oe;for(const j of q.slice(1))j.crossings>oe.crossings*.8||j.fit<oe.fit*.9||(j.crossings<ee.crossings||j.crossings===ee.crossings&&j.fit>ee.fit)&&(ee=j);v=new Map(ee.offsets)}const _=k(v),I=Fn(t,s).reversed,R=t.map((w,L)=>{const O=_.get(w.id)??{x:0,y:0};return{spec:w,layer:0,order:L,x:O.x,y:O.y}}),C=new Map(R.map(w=>[w.spec.id,w])),S=Xt(s,I,{byId:C,layerSpacing:i.layerSpacing,padding:i.padding});return Bn(R,S,i.padding)},il=(t,e,n,i,o={})=>{if(e.size===0)return t;const s={...ft,...o},r=new Map(n.map(g=>[g.id,g])),a=t.nodes.map(g=>{const b=e.get(g.id);return b===void 0?g:{...g,x:b.x,y:b.y}}),d=new Map(a.map(g=>[g.id,{spec:r.get(g.id)??{id:g.id,width:g.width,height:g.height},layer:g.layer,order:g.order,x:g.x,y:g.y}])),l=new Set(a.map(g=>g.id)),c=i.filter(g=>l.has(g.from)&&l.has(g.to)),h=Xt(c,new Set,{byId:d,layerSpacing:s.layerSpacing,padding:s.padding}),p=[...a.map(g=>g.x+g.width),...h.flatMap(g=>g.points.map(b=>b.x))],u=[...a.map(g=>g.y+g.height),...h.flatMap(g=>g.points.map(b=>b.y))],m=Math.max(t.width,Math.max(0,...p)+s.padding),f=Math.max(t.height,Math.max(0,...u)+s.padding);return{width:m,height:f,nodes:a,routes:h}},Io=(t,e,n={})=>{const i={...ft,...n};if(t.length===0)return{width:0,height:0,nodes:[],routes:[]};const o=new Set(t.map(d=>d.id)),s=e.filter(d=>o.has(d.from)&&o.has(d.to)),r=go(t,new Map,new Map,d=>d.position??{x:0,y:0}),a=new Map(r.map(d=>[d.spec.id,d]));return Bn(r,Xt(s,new Set,{byId:a,layerSpacing:i.layerSpacing,padding:i.padding}),i.padding)},Co={kind:"idle"},ol=t=>({kind:"node",...t,moved:!1,preview:null}),sl=t=>({kind:"group",...t,moved:!1,preview:null}),rl=(t,e,n,i)=>{if(t.kind==="idle")return t;const o=e.screenX-t.origin.screenX,s=e.screenY-t.origin.screenY;if(!t.moved&&Math.hypot(o,s)<=i)return t;const r=o/n,a=s/n;if(t.kind==="node"){const l={x:Math.max(0,t.start.x+r),y:Math.max(0,t.start.y+a)};return{...t,moved:!0,preview:l}}const d=new Map;for(const[l,c]of t.starts)d.set(l,{x:Math.max(0,c.x+r),y:Math.max(0,c.y+a)});return{...t,moved:!0,preview:d}},Lo=le({en:{tagFilter:"Filter by tag",tagMatch:"Tag matching",clearTags:"Clear",zoomOut:"Zoom out",fit:"Fit to view",zoomIn:"Zoom in",sendFailed:"Could not send. Please try again.",commentOn:t=>`Comment on ${t}`,noMatches:"No matching elements.",maximize:"Maximize",restore:"Restore size",canvas:"Diagram. Arrow keys pan, plus and minus zoom, 0 fits the view.",dataError:"Could not load the data.",nodes:"elements",edges:"relations",change:(t,e)=>`\u201C${t}\u201D \u2192 \u201C${e}\u201D`},ja:{tagFilter:"\u30BF\u30B0\u306E\u7D5E\u308A\u8FBC\u307F",tagMatch:"\u30BF\u30B0\u306E\u4E00\u81F4\u6761\u4EF6",clearTags:"\u89E3\u9664",zoomOut:"\u7E2E\u5C0F",fit:"\u5168\u4F53\u3092\u8868\u793A",zoomIn:"\u62E1\u5927",sendFailed:"\u9001\u4FE1\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",commentOn:t=>`${t}\u306B\u30B3\u30E1\u30F3\u30C8`,noMatches:"\u8A72\u5F53\u3059\u308B\u8981\u7D20\u306F\u3042\u308A\u307E\u305B\u3093\u3002",maximize:"\u6700\u5927\u5316",restore:"\u5143\u306E\u30B5\u30A4\u30BA\u306B\u623B\u3059",canvas:"\u56F3\u3002\u77E2\u5370\u30AD\u30FC\u3067\u30D1\u30F3\u3001\u30D7\u30E9\u30B9\u30FB\u30DE\u30A4\u30CA\u30B9\u3067\u30BA\u30FC\u30E0\u30010\u3067\u5168\u4F53\u8868\u793A\u3002",dataError:"\u30C7\u30FC\u30BF\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",nodes:"\u8981\u7D20",edges:"\u95A2\u9023",change:(t,e)=>`\u300C${t}\u300D\u2192\u300C${e}\u300D`}}),Ro={v:1,overrides:[]},Xn="dpk-layout-change",al=(t,e)=>t.board===e.board&&t.diagram===e.diagram&&t.node===e.node,_o=(t,e,n)=>({...t,overrides:[...t.overrides.filter(i=>!al(i,e)),{...e,position:n}]}),dl=(t,e)=>e.reduce((n,i)=>_o(n,i,i.position),t),ll=(t,e,n)=>new Map(t.overrides.filter(i=>i.board===e&&i.diagram===n).map(i=>[i.node,i.position])),cl=(t,e,n)=>t.overrides.some(i=>i.board===e&&i.diagram===n),pl=(t,e,n)=>{const i=t.overrides.filter(o=>!(o.board===e&&o.diagram===n));return i.length===t.overrides.length?t:{...t,overrides:i}},hl=(t,e,n,i)=>{const o=t.overrides.filter(s=>!(s.board===e&&s.diagram===n)||i.has(s.node));return o.length===t.overrides.length?t:{...t,overrides:o}},ul=A({x:pe(),y:pe()}),ml=A({board:x(),diagram:x(),node:x(),position:ul}),gl=A({v:ce(1),overrides:F(ml)}),Ao=t=>{const e=Oe(gl,t);return e.success?e.output:null},fl=t=>`dev-process-kit:layout-positions:${t}`,bl=()=>{const t=typeof location>"u"?"local":`${location.pathname}${location.search}`;return fl(t)},xl=()=>Qa(Ao),yl=()=>Va(Ao),kl=t=>t.closest(Za)?.getAttribute(Ja)??"";class vl{#n;#o;#e=null;#t="";#i=Ro;#a=()=>this.#l();constructor(e,n){this.#n=e,this.#o=n,e.addController(this)}hostConnected(){this.#e=this.#o.persist===!1?yl():xl(),this.#t=bl(),this.#i=this.#e.read(this.#t)??Ro,window.addEventListener(Xn,this.#a)}hostDisconnected(){window.removeEventListener(Xn,this.#a)}get#r(){return kl(this.#o.host())}get#s(){return this.#o.diagram()}overrides(){return ll(this.#i,this.#r,this.#s)}hasOverrides(){return cl(this.#i,this.#r,this.#s)}commit(e,n){this.#i=_o(this.#i,{board:this.#r,diagram:this.#s,node:e},n),this.#d()}commitMany(e){if(e.size===0)return;const n=[...e].map(([i,o])=>({board:this.#r,diagram:this.#s,node:i,position:o}));this.#i=dl(this.#i,n),this.#d()}prune(e){const n=hl(this.#i,this.#r,this.#s,e);n!==this.#i&&(this.#i=n,this.#d())}reset(){const e=pl(this.#i,this.#r,this.#s);e!==this.#i&&(this.#i=e,this.#d())}#d(){this.#e?.write(this.#t,this.#i),this.#n.requestUpdate(),window.dispatchEvent(new CustomEvent(Xn))}#l(){this.#i=this.#e?.read(this.#t)??this.#i,this.#n.requestUpdate()}}const wl=(t,e,n)=>`${t} ${n.node} \xB7 ${e} ${n.edge}`,Je=[ed,Gi,Ki,re`
|
|
1
|
+
import{a4 as ja,S as Xi,a5 as le,a6 as Va,a7 as Qa,a8 as Oe,a9 as A,aa as F,ab as ce,ac as x,ad as pe,ae as Za,af as Ja,X as ed,j as Gi,ag as Ki,ah as re,ai as $,aj as U,ak as Wi,al as ji,am as td,an as nd,D as id,ao as od,U as sd,ap as An,aq as rd,ar as Vi,as as y,C as ad,at as dd,au as he,av as z,aw as T,ax as E,ay as M,az as H,aA as Xe,aB as mt,aC as On,aD as ld,aE as Qi,aF as Zi,aG as cd,aH as Te,aI as Ji,B as eo,aJ as pd,G as to,H as Dn,I as qt,aK as hd,aL as G,aM as te,aN as Qe,p as N,t as Se,aO as ue,aP as Nn,aQ as gt,aR as ud,N as Pt,e as zn,P as B,aS as Ft,aT as md,l as fe,aU as qn,aV as gd,aW as fd,aX as no,aY as bd,aZ as io,a_ as Bt,a$ as Me,b0 as xd,b1 as yd,b2 as kd}from"./shared-BXejn2ZQ.js";import{Q as vd,A as wd,H as $d,R as Ed,S as Td,T as be,U as Ie,V as oo,W as Sd,X as xe,Y as Md,Z as Pn,_ as so,$ as Id}from"./shared-B-DAJvq3.js";import{o as Cd}from"./shared-TrlnHjrJ.js";import{E as Ld,t as Ce,u as Rd,v as Ge,B as Ut,w as Ht,x as _d}from"./shared-CPwjSgu0.js";import{a as Ad,c as Od}from"./shared-BT5Ayp_z.js";import{o as Yt}from"./shared-BTf38OnF.js";const Dd=[["rect",{x:"8",y:"8",width:"8",height:"8",rx:"2"}],["path",{d:"M4 10a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2"}],["path",{d:"M14 20a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2v-4a2 2 0 0 0-2-2"}]],Nd=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]],zd=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}]],qd=[["rect",{x:"14",y:"14",width:"8",height:"8",rx:"2"}],["rect",{x:"2",y:"2",width:"8",height:"8",rx:"2"}],["path",{d:"M7 14v1a2 2 0 0 0 2 2h1"}],["path",{d:"M14 7h1a2 2 0 0 1 2 2v1"}]],Pd=[["circle",{cx:"19",cy:"5",r:"2"}],["circle",{cx:"5",cy:"19",r:"2"}],["path",{d:"M5 17A12 12 0 0 1 17 5"}]];function Fd(t,e){let n=0;for(let i=0;i<t.length;i++)n+=e(t[i],i);return n}function ro(t){if(t.length===0)return NaN;const e=t.slice().sort((i,o)=>i-o),n=Math.floor(e.length/2);return e.length%2===0?(e[n-1]+e[n])/2:e[n]}const ao={},lo=t=>{const e={kind:"board",name:t.name,label:t.label,addable:t.addable??!1,parseBase:()=>ao,emptyBase:()=>ao,actions:{},apply:()=>null,hasTarget:()=>!1,describe:o=>({title:o.type,targetLabel:Xi(o.target),tone:"meta"}),serialize:o=>`${o.type} ${Xi(o.target)} ${JSON.stringify(o.payload)}`,resolveNavigation:()=>({}),commentTargets:()=>[],title:()=>t.label},n=t.commentTargets?.()??[],i=new Map((t.elementActionResults?.()??[]).map(o=>[o.id,o]));return ja(e,n,i)},ft={nodeSpacing:34,layerSpacing:84,padding:28,sweeps:4,coordinatePasses:6,groupSpacing:34,superGroupSpacing:34,superGroupRowGap:0,superGroupColumnGap:0,superGroupRowCount:0},bt=t=>{const e=[...t].sort((i,o)=>i-o);if(e.length===0)return 0;const n=Math.floor(e.length/2);return e.length%2===1?e[n]??0:((e[n-1]??0)+(e[n]??0))/2},Fn=(t,e)=>{const n=new Map;for(const r of t)n.set(r.id,[]);for(const r of e)n.get(r.from)?.push(r);const i=new Map,o=new Set,s=r=>{i.set(r,"open");for(const a of n.get(r)??[]){const d=i.get(a.to)??"new";d==="open"?o.add(a.id):d==="new"&&s(a.to)}i.set(r,"done")};for(const r of t)(i.get(r.id)??"new")==="new"&&s(r.id);return{reversed:o,forward:e.filter(r=>!o.has(r.id))}},co=(t,e)=>{const n=new Map,i=new Map;for(const a of t)n.set(a.id,[]),i.set(a.id,[]);for(const a of e)i.get(a.from)?.push(a),n.get(a.to)?.push(a);const o=new Map(t.map(a=>[a.id,0])),s=new Map(t.map(a=>[a.id,(n.get(a.id)??[]).length])),r=t.filter(a=>(s.get(a.id)??0)===0).map(a=>a.id);for(const a of r)for(const d of i.get(a)??[]){const l=o.get(d.to)??0;o.set(d.to,Math.max(l,(o.get(a)??0)+1));const c=(s.get(d.to)??0)-1;s.set(d.to,c),c===0&&r.push(d.to)}return o},po=(t,e,n,i)=>{const o=[...t.keys()].sort((s,r)=>s-r);for(let s=0;s<i;s++){const r=s%2===0;for(const a of r?o:[...o].reverse()){const d=t.get(a)??[],l=new Map(d.map((p,u)=>[p,u])),c=p=>{const u=l.get(p);return u===void 0?null:u},h=d.map(p=>{const u=(e.get(p)??[]).filter(m=>(n.get(m)??a)===a+(r?-1:1)).map(c).filter(m=>m!==null);return{id:p,want:u.length>0?bt(u):l.get(p)??0}});h.sort((p,u)=>p.want-u.want||(l.get(p.id)??0)-(l.get(u.id)??0)),t.set(a,h.map(p=>p.id))}}},ho=(t,e,n,i)=>{const o=t.map((r,a)=>({id:r,want:n.get(r)??a*100,index:a}));o.sort((r,a)=>r.want-a.want||r.index-a.index);let s=0;for(const r of o){const a=e.get(r.id);a&&(a.y=s,s+=a.spec.height+i)}return{height:Math.max(0,s-i)}},Bd=(t,e,n,i,o)=>{const s=[...t.keys()].sort((l,c)=>l-c),r=new Map;for(const l of s)r.set(l,ho(t.get(l)??[],e,new Map,o.nodeSpacing).height);const a=Math.max(0,...r.values());for(const l of s){const c=(a-(r.get(l)??0))/2;for(const h of t.get(l)??[]){const p=e.get(h);p&&(p.y+=c)}}const d=(l,c)=>{const h=(n.get(l)??[]).filter(p=>i.get(p)===c).flatMap(p=>{const u=e.get(p);return u?[u.y+u.spec.height/2]:[]});return h.length>0?bt(h):null};for(let l=0;l<o.coordinatePasses;l++){const c=l%2===0;for(const h of c?s:[...s].reverse()){const p=t.get(h)??[],u=new Map;for(const b of p){const k=d(b,h+(c?-1:1)),v=e.get(b);v!==void 0&&u.set(b,k===null?v.y+v.spec.height/2:k)}const m=p.map(b=>e.get(b)?.y??0);ho(p,e,u,o.nodeSpacing);const f=p.map(b=>e.get(b)?.y??0),g=bt(m)-bt(f);for(const b of p){const k=e.get(b);k&&(k.y+=g)}}}},uo=(t,e,n,i,o,s,r)=>{for(const a of o){const d=t.filter(h=>i.get(h)===a);if(d.length===0)continue;const l=d.map((h,p)=>({id:h,want:n.get(h)??p,index:p})).sort((h,p)=>h.want-p.want||h.index-p.index);let c=s.get(a)??0;for(const h of l){const p=e.get(h.id);p&&(p.y=c,c+=p.spec.height+r)}}},Ud=(t,e,n,i,o)=>{let s=0;for(const r of t.values()){const a=r.filter(l=>n.get(l)===i);if(a.length===0)continue;const d=a.reduce((l,c)=>l+(e.get(c)?.spec.height??0),0)+o*(a.length-1);d>s&&(s=d)}return s},Hd=(t,e,n,i,o,s,r)=>{const a=new Map(t.map(S=>[S.id,S.group??S.id])),d=new Set(t.flatMap(S=>S.group===void 0?[]:[S.group])),l=t.some(S=>S.superGroup!==void 0),c=new Map;for(const S of t){const w=a.get(S.id)??S.id;S.superGroup!==void 0&&!c.has(w)&&c.set(w,S.superGroup)}const h=S=>c.get(S)??S,p=[...e.keys()].sort((S,w)=>S-w),u=S=>{const w=o.get(S)??0,L=(e.get(w)??[]).length,O=s.get(S)??0;return L<=1?0:O/(L-1)},m=[...new Set(a.values())],f=S=>{const w=t.filter(L=>(a.get(L.id)??L.id)===S).map(L=>L.id);return w.length===0?0:w.reduce((L,O)=>L+u(O),0)/w.length},g=[...new Set(m.map(h))],b=S=>{const w=t.filter(L=>h(a.get(L.id)??L.id)===S).map(L=>L.id);return w.length===0?0:w.reduce((L,O)=>L+u(O),0)/w.length},v=g.sort((S,w)=>b(S)-b(w)).flatMap(S=>m.filter(w=>h(w)===S).sort((w,L)=>f(w)-f(L))),_=new Map(v.map(S=>[S,Ud(e,n,a,S,r.nodeSpacing)])),I=new Map;let R=0;for(const[S,w]of v.entries()){I.set(w,R),R+=_.get(w)??0;const L=v[S+1];if(L!==void 0){const O=l&&h(w)!==h(L);R+=O?r.superGroupSpacing:d.has(w)||d.has(L)?r.groupSpacing:r.nodeSpacing}}for(const S of p){const w=e.get(S)??[];uo(w,n,new Map(w.map(L=>[L,s.get(L)??0])),a,v,I,r.nodeSpacing)}const C=(S,w)=>{const L=(i.get(S)??[]).filter(O=>o.get(O)===w).flatMap(O=>{const P=n.get(O);return P?[P.y+P.spec.height/2]:[]});return L.length>0?bt(L):null};for(let S=0;S<r.coordinatePasses;S++){const w=S%2===0;for(const L of w?p:[...p].reverse()){const O=e.get(L)??[],P=new Map;for(const X of O){const V=C(X,L+(w?-1:1)),q=n.get(X);q!==void 0&&P.set(X,V===null?q.y+q.spec.height/2:V)}uo(O,n,P,a,v,I,r.nodeSpacing)}}},mo=(t,e,n)=>{const i=e===void 0?void 0:t.spec.ports?.[e];return i?{x:t.x+i.x,y:t.y+i.y}:n==="out"?{x:t.x+t.spec.width,y:t.y+t.spec.height/2}:{x:t.x,y:t.y+t.spec.height/2}},Xt=(t,e,n)=>{let i=0;const o=[];for(const s of t){const r=n.byId.get(s.from),a=n.byId.get(s.to);if(!r||!a)continue;const d=mo(r,s.fromPort,"out"),l=mo(a,s.toPort,"in");if(s.from===s.to){const m=r.x+r.spec.width,f=r.y+r.spec.height,g=Math.max(n.padding/2,f+18);o.push({id:s.id,points:[d,{x:m+20,y:d.y},{x:m+20,y:g},{x:r.x-20,y:g},{x:r.x-20,y:l.y},l]});continue}if(!e.has(s.id)&&(r.layer<a.layer||r.layer===a.layer&&l.x>d.x+12)){if(Math.abs(d.y-l.y)<.5){o.push({id:s.id,points:[d,l]});continue}const f=r.layer<a.layer?Math.max(d.x+14,a.x-Math.max(12,n.layerSpacing/2)):(d.x+l.x)/2;o.push({id:s.id,points:[d,{x:f,y:d.y},{x:f,y:l.y},l]});continue}const c=s.fromPort===void 0?{x:r.x+r.spec.width/2,y:r.y+r.spec.height}:d,h=s.toPort===void 0?{x:a.x+a.spec.width/2,y:a.y+a.spec.height}:l,p=Math.max(c.y,h.y)+18+i*14;i+=1;const u=[d,c,{x:c.x,y:p},{x:h.x,y:p},h,l].filter((m,f,g)=>f===0||m.x!==g[f-1]?.x||m.y!==g[f-1]?.y);o.push({id:s.id,points:u})}return o},Bn=(t,e,n)=>{const i=e.flatMap(p=>[...p.points]),o=[...t.map(p=>p.x),...t.map(p=>p.x+p.spec.width),...i.map(p=>p.x)],s=[...t.map(p=>p.y),...t.map(p=>p.y+p.spec.height),...i.map(p=>p.y)],r=Math.min(0,...o),a=Math.min(0,...s),d=Math.max(0,...o),l=Math.max(0,...s),c=n-r,h=n-a;return{width:d-r+n*2,height:l-a+n*2,nodes:t.map(p=>({id:p.spec.id,x:p.x+c,y:p.y+h,width:p.spec.width,height:p.spec.height,layer:p.layer,order:p.order})),routes:e.map(p=>({id:p.id,points:p.points.map(u=>({x:u.x+c,y:u.y+h}))}))}},Gt=(t,e)=>{const n=new Map(t.map(i=>[i.id,[]]));for(const i of e)i.from!==i.to&&(n.get(i.from)?.push(i.to),n.get(i.to)?.push(i.from));return n},go=(t,e,n,i)=>t.map(o=>({spec:o,layer:e.get(o.id)??0,order:n.get(o.id)??0,...i(o)})),fo=(t,e)=>{const n=new Map;for(const i of t){const o=e.get(i.id)??0,s=n.get(o);s?s.push(i.id):n.set(o,[i.id])}return n},bo=(t,e,n={})=>{if(t.some(f=>f.superGroup!==void 0))return nl(t,e,n);const i={...ft,...n};if(t.length===0)return{width:0,height:0,nodes:[],routes:[]};const o=new Set(t.map(f=>f.id)),s=e.filter(f=>o.has(f.from)&&o.has(f.to)),{forward:r,reversed:a}=Fn(t,s),d=co(t,r),l=fo(t,d);po(l,Gt(t,s),d,i.sweeps);const c=new Map;for(const f of l.values())f.forEach((g,b)=>c.set(g,b));const h=go(t,d,c,()=>({x:0,y:0})),p=new Map(h.map(f=>[f.spec.id,f]));t.some(f=>f.group!==void 0||f.superGroup!==void 0)?Hd(t,l,p,Gt(t,s),d,c,i):Bd(l,p,Gt(t,s),d,i);const u=[...l.keys()].sort((f,g)=>f-g);let m=0;for(const f of u){const g=Math.max(...(l.get(f)??[]).map(b=>p.get(b)?.spec.width??0));for(const b of l.get(f)??[]){const k=p.get(b);k&&(k.x=m)}m+=g+i.layerSpacing}return Bn(h,Xt(s,a,{byId:p,layerSpacing:i.layerSpacing,padding:i.padding}),i.padding)},Ze=12,xo=t=>({x:t.x+t.width/2,y:t.y+t.height/2}),yo=(t,e)=>{const n=xo(t),i=xo(e),o=i.x-n.x,s=i.y-n.y;return Math.abs(o)>=Math.abs(s)?o>=0?"right":"left":s>=0?"bottom":"top"},ko=(t,e,n)=>Math.min(n,Math.max(e,t)),vo=(t,e,n)=>{const i=ko(n.y-t.y,Ze,Math.max(Ze,t.height-Ze)),o=t.height<=0?.5:i/t.height,s=t.x+ko(o*t.width,Ze,Math.max(Ze,t.width-Ze));switch(e){case"left":return{x:t.x,y:t.y+i};case"right":return{x:t.x+t.width,y:t.y+i};case"top":return{x:s,y:t.y};case"bottom":return{x:s,y:t.y+t.height};default:return{x:t.x+t.width,y:t.y+i}}},Yd=(t,e,n)=>{if(t.length<=1)return t.map(c=>c.id);const i=t.map(c=>({id:c.id,width:c.width,height:c.height})),o=new Set(i.map(c=>c.id)),s=e.filter(c=>o.has(c.from)&&o.has(c.to)&&c.from!==c.to),{forward:r}=Fn(i,s),a=co(i,r),d=fo(i,a);return po(d,Gt(i,s),a,n),[...d.keys()].sort((c,h)=>c-h).flatMap(c=>d.get(c)??[])},Xd=(t,e,n,i)=>{let o=0;for(let s=e;s<n;s++)o+=t[s].width;return o+i*Math.max(0,n-e-1)},Un=(t,e,n)=>{const i=t.length,o=Math.max(1,Math.min(n,i)),s=Number.POSITIVE_INFINITY,r=Array.from({length:i+1},()=>Array.from({length:o+1},()=>s)),a=Array.from({length:i+1},()=>Array.from({length:o+1},()=>0));r[0][0]=0;for(let u=1;u<=o;u++)for(let m=u;m<=i;m++)for(let f=u-1;f<m;f++){const g=r[f][u-1];if(g===s)continue;const b=Math.max(g,Xd(t,f,m,e));b<r[m][u]&&(r[m][u]=b,a[m][u]=f)}const d=[];let l=i;for(let u=o;u>0;u--){const m=a[l][u];d.unshift(t.slice(m,l)),l=m}const c=new Map;let h=0,p=0;for(const u of d){let m=0;const f=Math.max(...u.map(g=>g.height));for(const g of u)c.set(g.id,{x:m,y:h}),m+=g.width+e;p=Math.max(p,m-e),h+=f+e}return{positions:c,width:p,height:Math.max(0,h-e)}},Ke=1e-6,Kt=(t,e)=>Math.abs(t.x-e.x)<Ke&&Math.abs(t.y-e.y)<Ke,Wt=(t,e,n)=>{const i=(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y);return Math.abs(i)<Ke?0:i>0?1:-1},jt=(t,e,n)=>Math.min(t.x,n.x)-Ke<=e.x&&e.x<=Math.max(t.x,n.x)+Ke&&Math.min(t.y,n.y)-Ke<=e.y&&e.y<=Math.max(t.y,n.y)+Ke,wo=(t,e)=>{const[n,i]=t,[o,s]=e;if(Kt(n,o)||Kt(n,s)||Kt(i,o)||Kt(i,s))return!1;const r=Wt(n,i,o),a=Wt(n,i,s),d=Wt(o,s,n),l=Wt(o,s,i);return r!==a&&d!==l||r===0&&jt(n,o,i)||a===0&&jt(n,s,i)||d===0&&jt(o,n,s)?!0:l===0&&jt(o,i,s)},$o=(t,e)=>{const n=t.x+t.width/2,i=t.y+t.height/2,o=e.x+e.width/2,s=e.y+e.height/2,r=o-n,a=s-i;return Math.abs(r)>=Math.abs(a)?{x:r>=0?t.x+t.width:t.x,y:i}:{x:n,y:a>=0?t.y+t.height:t.y}},Gd=(t,e,n)=>{const i=r=>{const a=t.positions.get(r),d=e.get(r);return!a||!d?null:{id:r,x:a.x,y:a.y,width:d.width,height:d.height}},o=[];let s=0;for(const r of n){if(r.from===r.to)continue;const a=i(r.from),d=i(r.to);if(!a||!d)continue;const l=$o(a,d),c=$o(d,a);if(l.x===c.x||l.y===c.y){const m=[l,c];s+=o.filter(f=>wo(m,f)).length,o.push(m);continue}const h=[[[l,{x:c.x,y:l.y}],[{x:c.x,y:l.y},c]],[[l,{x:l.x,y:c.y}],[{x:l.x,y:c.y},c]]];let p=h[0],u=Number.POSITIVE_INFINITY;for(const m of h){const f=m.reduce((g,b)=>g+o.filter(k=>wo(b,k)).length,0);f<u&&(u=f,p=m)}s+=u,o.push(...p)}return s},Kd=(t,e,n)=>{const i=s=>{const r=t.positions.get(s),a=e.get(s);return!r||!a?null:{x:r.x+a.width/2,y:r.y+a.height/2}};let o=0;for(const s of n){if(s.from===s.to)continue;const r=i(s.from),a=i(s.to);r&&a&&(o+=Math.hypot(r.x-a.x,r.y-a.y))}return o},Eo=(t,e)=>{const n=t[0].x===t[1].x,i=e[0].x===e[1].x;if(n===i)return!1;const[o,s,r,a]=n?[t[0],t[1],e[0],e[1]]:[e[0],e[1],t[0],t[1]],d=o.x,l=r.y;return d>Math.min(r.x,a.x)&&d<Math.max(r.x,a.x)&&l>Math.min(o.y,s.y)&&l<Math.max(o.y,s.y)},To=(t,e,n,i)=>{const o=n===void 0?void 0:t.ports?.[n];return o!==void 0?{x:e.x+o.x,y:e.y+o.y}:i==="out"?{x:e.x+t.width,y:e.y+t.height/2}:{x:e.x,y:e.y+t.height/2}},Wd=(t,e,n)=>{const i=new Map(t.map(r=>[r.id,r])),o=[];let s=0;for(const r of e){if(r.from===r.to)continue;const a=i.get(r.from),d=i.get(r.to),l=n.get(r.from),c=n.get(r.to);if(a===void 0||d===void 0||l===void 0||c===void 0)continue;const h={x:l.x,y:l.y,width:a.width,height:a.height},p={x:c.x,y:c.y,width:d.width,height:d.height},u=vo(h,yo(h,p),To(a,l,r.fromPort,"out")),m=vo(p,yo(p,h),To(d,c,r.toPort,"in")),f=v=>v.slice(1).map((_,I)=>[v[I],_]);if(u.x===m.x||u.y===m.y){const v=[u,m];s+=o.filter(_=>Eo(v,_)).length,o.push(v);continue}const g=[[u,{x:m.x,y:u.y},m],[u,{x:u.x,y:m.y},m]];let b=g[0],k=Number.POSITIVE_INFINITY;for(const v of g){const _=f(v).reduce((I,R)=>I+o.filter(C=>Eo(R,C)).length,0);_<k&&(b=v,k=_)}s+=k,o.push(...f(b))}return s},Vt={crossings:1e4,edgeLength:1,aspectDeviation:50},So=50,jd=Vt.aspectDeviation,Hn=(t,e,n,i,o)=>{const s=t.width<=0||t.height<=0?0:Math.abs(Math.log(t.width/t.height/i));return Gd(t,e,n)*Vt.crossings+Kd(t,e,n)*Vt.edgeLength+s*o},Vd=function*(t){const e=[...t],n=e.length;if(yield[...e],n<=1)return;const i=Array.from({length:n}).fill(0);let o=0;for(;o<n;)if(i[o]<o){const s=o%2===0?0:i[o],r=e[s];e[s]=e[o],e[o]=r,yield[...e],i[o]=i[o]+1,o=0}else i[o]=0,o++},Qd=7,Zd=400,Jd=1e-6,Yn=(t,e,n,i,o=ft.sweeps,s=0,r=Vt.aspectDeviation,a=Zd)=>{if(t.length===0)return{positions:new Map,width:0,height:0};if(t.length===1){const I=t[0];return{positions:new Map([[I.id,{x:0,y:0}]]),width:I.width,height:I.height}}const d=new Map(t.map(I=>[I.id,{width:I.width,height:I.height}])),l=e.filter(I=>d.has(I.from)&&d.has(I.to)&&I.from!==I.to),c=I=>{const R=I.map(P=>({id:P,...d.get(P)}));let C=Un(R,n,1),S=Number.POSITIVE_INFINITY,w=1;const L=s>0?Math.min(s,R.length):1,O=s>0?L:R.length;for(let P=L;P<=O;P++){const X=Un(R,n,P);if(X.width<=0||X.height<=0)continue;const V=Hn(X,d,l,i,r);V<S&&(S=V,C=X,w=P)}return{packed:C,cost:S,rowCount:w}},h=(I,R)=>Un(I.map(C=>({id:C,...d.get(C)})),n,R),p=t.map(I=>I.id);if(p.length<=Qd){let I=c(p);for(const R of Vd(p)){const C=c(R);C.cost<I.cost&&(I=C)}return I.packed}const u=s>0?Math.min(a,50):a;let m=Yd(t,l,o);const f=c(m),g=s>0?Math.min(s,m.length):f.rowCount;let b=s>0?h(m,g):f.packed,k=s>0?Hn(b,d,l,i,r):f.cost,v=0,_=!0;for(;_&&v<u;){_=!1;for(let I=0;I<m.length-1&&v<u;I++){v++;const R=[...m],C=R[I];R[I]=R[I+1],R[I+1]=C;const S=h(R,g);if(S.width<=0||S.height<=0)continue;const w=Hn(S,d,l,i,r);w<k-Jd&&(k=w,b=S,m=R,_=!0)}}return b},el=(t,e,n,i,o)=>{if(n<=0&&i<=0||t.positions.size<=1)return t;const s=new Map;for(const[p,u]of t.positions){const m=s.get(u.y);m?m.push(p):s.set(u.y,[p])}const a=[...s.keys()].sort((p,u)=>p-u).map(p=>[...s.get(p)??[]].sort((u,m)=>(t.positions.get(u)?.x??0)-(t.positions.get(m)?.x??0))),d=new Map;let l=0,c=0,h=0;return a.forEach((p,u)=>{const m=a[u-1];if(m!==void 0){const g=p.some(o)||m.some(o);h+=g?n:0}let f=0;p.forEach((g,b)=>{const k=p[b-1];k!==void 0&&(f+=o(k)||o(g)?i:0);const v=t.positions.get(g),_=e.get(g);if(!v||!_)return;const I={x:v.x+f,y:v.y+h};d.set(g,I),l=Math.max(l,I.x+_.width),c=Math.max(c,I.y+_.height)})}),{positions:d,width:l,height:c}},Mo=1.3,tl=1.45,nl=(t,e,n={})=>{const i={...ft,...n};if(t.length===0)return{width:0,height:0,nodes:[],routes:[]};const o=new Set(t.map(w=>w.id)),s=e.filter(w=>o.has(w.from)&&o.has(w.to)),r=w=>w.group??`__loose:${w.id}`,a=w=>w.superGroup??`__top:${w.id}`,d=new Map(t.map(w=>[w.id,r(w)])),l=new Map(t.map(w=>[w.id,a(w)])),c=new Map;for(const w of t){const L=r(w),O=c.get(L);O?O.push(w):c.set(L,[w])}const h=new Map;for(const[w,L]of c){const O=L[0];if(L.length===1&&O!==void 0){h.set(w,{size:{width:O.width,height:O.height},relative:new Map([[O.id,{x:0,y:0}]])});continue}const P=new Set(L.map(q=>q.id)),X=s.filter(q=>P.has(q.from)&&P.has(q.to)),V=Yn(L.map(q=>({id:q.id,width:q.width,height:q.height})),X,i.nodeSpacing,Mo,i.sweeps,0,So);h.set(w,{size:{width:V.width,height:V.height},relative:V.positions})}const p=new Map;for(const[w,L]of c){const O=L[0];O!==void 0&&p.set(w,a(O))}const u=new Map;for(const[w,L]of p){const O=u.get(L);O?O.push(w):u.set(L,[w])}const m=new Map;for(const[w,L]of u){const O=L[0];if(L.length===1&&O!==void 0){const q=h.get(O);q&&m.set(w,{size:q.size,relative:new Map([[O,{x:0,y:0}]])});continue}const P=new Map(L.flatMap(q=>h.has(q)?[[q,h.get(q).size]]:[])),X=s.flatMap(q=>{const oe=d.get(q.from),ee=d.get(q.to);return oe===void 0||ee===void 0||oe===ee?[]:!L.includes(oe)||!L.includes(ee)?[]:[{id:q.id,from:oe,to:ee}]}),V=Yn(L.flatMap(q=>P.has(q)?[{id:q,...P.get(q)}]:[]),X,i.groupSpacing,Mo,i.sweeps,0,So);m.set(w,{size:{width:V.width,height:V.height},relative:V.positions})}const f=new Map([...m].map(([w,L])=>[w,L.size])),g=[...m.keys()],b=new Set(t.flatMap(w=>w.superGroup===void 0?[]:[w.superGroup])),k=w=>{const L=new Map;for(const[O,P]of u){const X=w.get(O)??{x:0,y:0},V=m.get(O);for(const q of P){const oe=V?.relative.get(q)??{x:0,y:0},ee=h.get(q);if(ee)for(const[j,Z]of ee.relative)L.set(j,{x:X.x+oe.x+Z.x,y:X.y+oe.y+Z.y})}}return L};let v=new Map;if(g.length<=1)for(const w of g)v.set(w,{x:0,y:0});else{const w=s.flatMap(j=>{const Z=l.get(j.from),de=l.get(j.to);return Z===void 0||de===void 0||Z===de?[]:[{id:j.id,from:Z,to:de}]}),L=j=>Yn(g.map(Z=>({id:Z,...f.get(Z)})),w,i.superGroupSpacing,tl,i.sweeps,j,jd),O=L(i.superGroupRowCount),P=i.superGroupRowCount>0?[]:[1,2,3,4].filter(j=>j<=g.length),X=[O,...P.map(j=>L(j))],V=j=>{const Z=el(j,f,i.superGroupRowGap,i.superGroupColumnGap,Y=>b.has(Y)),de=Wd(t,s,k(Z.positions)),D=Math.min(1180/Math.max(1,Z.width),900/Math.max(1,Z.height),1);return{offsets:Z.positions,crossings:de,fit:D}},q=X.map(V),oe=q[0];let ee=oe;for(const j of q.slice(1))j.crossings>oe.crossings*.8||j.fit<oe.fit*.9||(j.crossings<ee.crossings||j.crossings===ee.crossings&&j.fit>ee.fit)&&(ee=j);v=new Map(ee.offsets)}const _=k(v),I=Fn(t,s).reversed,R=t.map((w,L)=>{const O=_.get(w.id)??{x:0,y:0};return{spec:w,layer:0,order:L,x:O.x,y:O.y}}),C=new Map(R.map(w=>[w.spec.id,w])),S=Xt(s,I,{byId:C,layerSpacing:i.layerSpacing,padding:i.padding});return Bn(R,S,i.padding)},il=(t,e,n,i,o={})=>{if(e.size===0)return t;const s={...ft,...o},r=new Map(n.map(g=>[g.id,g])),a=t.nodes.map(g=>{const b=e.get(g.id);return b===void 0?g:{...g,x:b.x,y:b.y}}),d=new Map(a.map(g=>[g.id,{spec:r.get(g.id)??{id:g.id,width:g.width,height:g.height},layer:g.layer,order:g.order,x:g.x,y:g.y}])),l=new Set(a.map(g=>g.id)),c=i.filter(g=>l.has(g.from)&&l.has(g.to)),h=Xt(c,new Set,{byId:d,layerSpacing:s.layerSpacing,padding:s.padding}),p=[...a.map(g=>g.x+g.width),...h.flatMap(g=>g.points.map(b=>b.x))],u=[...a.map(g=>g.y+g.height),...h.flatMap(g=>g.points.map(b=>b.y))],m=Math.max(t.width,Math.max(0,...p)+s.padding),f=Math.max(t.height,Math.max(0,...u)+s.padding);return{width:m,height:f,nodes:a,routes:h}},Io=(t,e,n={})=>{const i={...ft,...n};if(t.length===0)return{width:0,height:0,nodes:[],routes:[]};const o=new Set(t.map(d=>d.id)),s=e.filter(d=>o.has(d.from)&&o.has(d.to)),r=go(t,new Map,new Map,d=>d.position??{x:0,y:0}),a=new Map(r.map(d=>[d.spec.id,d]));return Bn(r,Xt(s,new Set,{byId:a,layerSpacing:i.layerSpacing,padding:i.padding}),i.padding)},Co={kind:"idle"},ol=t=>({kind:"node",...t,moved:!1,preview:null}),sl=t=>({kind:"group",...t,moved:!1,preview:null}),rl=(t,e,n,i)=>{if(t.kind==="idle")return t;const o=e.screenX-t.origin.screenX,s=e.screenY-t.origin.screenY;if(!t.moved&&Math.hypot(o,s)<=i)return t;const r=o/n,a=s/n;if(t.kind==="node"){const l={x:Math.max(0,t.start.x+r),y:Math.max(0,t.start.y+a)};return{...t,moved:!0,preview:l}}const d=new Map;for(const[l,c]of t.starts)d.set(l,{x:Math.max(0,c.x+r),y:Math.max(0,c.y+a)});return{...t,moved:!0,preview:d}},Lo=le({en:{tagFilter:"Filter by tag",tagMatch:"Tag matching",clearTags:"Clear",zoomOut:"Zoom out",fit:"Fit to view",zoomIn:"Zoom in",sendFailed:"Could not send. Please try again.",commentOn:t=>`Comment on ${t}`,noMatches:"No matching elements.",maximize:"Maximize",restore:"Restore size",canvas:"Diagram. Arrow keys pan, plus and minus zoom, 0 fits the view.",dataError:"Could not load the data.",nodes:"elements",edges:"relations",change:(t,e)=>`\u201C${t}\u201D \u2192 \u201C${e}\u201D`},ja:{tagFilter:"\u30BF\u30B0\u306E\u7D5E\u308A\u8FBC\u307F",tagMatch:"\u30BF\u30B0\u306E\u4E00\u81F4\u6761\u4EF6",clearTags:"\u89E3\u9664",zoomOut:"\u7E2E\u5C0F",fit:"\u5168\u4F53\u3092\u8868\u793A",zoomIn:"\u62E1\u5927",sendFailed:"\u9001\u4FE1\u3067\u304D\u307E\u305B\u3093\u3067\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",commentOn:t=>`${t}\u306B\u30B3\u30E1\u30F3\u30C8`,noMatches:"\u8A72\u5F53\u3059\u308B\u8981\u7D20\u306F\u3042\u308A\u307E\u305B\u3093\u3002",maximize:"\u6700\u5927\u5316",restore:"\u5143\u306E\u30B5\u30A4\u30BA\u306B\u623B\u3059",canvas:"\u56F3\u3002\u77E2\u5370\u30AD\u30FC\u3067\u30D1\u30F3\u3001\u30D7\u30E9\u30B9\u30FB\u30DE\u30A4\u30CA\u30B9\u3067\u30BA\u30FC\u30E0\u30010\u3067\u5168\u4F53\u8868\u793A\u3002",dataError:"\u30C7\u30FC\u30BF\u3092\u8AAD\u307F\u8FBC\u3081\u307E\u305B\u3093\u3067\u3057\u305F\u3002",nodes:"\u8981\u7D20",edges:"\u95A2\u9023",change:(t,e)=>`\u300C${t}\u300D\u2192\u300C${e}\u300D`}}),Ro={v:1,overrides:[]},Xn="dpk-layout-change",al=(t,e)=>t.board===e.board&&t.diagram===e.diagram&&t.node===e.node,_o=(t,e,n)=>({...t,overrides:[...t.overrides.filter(i=>!al(i,e)),{...e,position:n}]}),dl=(t,e)=>e.reduce((n,i)=>_o(n,i,i.position),t),ll=(t,e,n)=>new Map(t.overrides.filter(i=>i.board===e&&i.diagram===n).map(i=>[i.node,i.position])),cl=(t,e,n)=>t.overrides.some(i=>i.board===e&&i.diagram===n),pl=(t,e,n)=>{const i=t.overrides.filter(o=>!(o.board===e&&o.diagram===n));return i.length===t.overrides.length?t:{...t,overrides:i}},hl=(t,e,n,i)=>{const o=t.overrides.filter(s=>!(s.board===e&&s.diagram===n)||i.has(s.node));return o.length===t.overrides.length?t:{...t,overrides:o}},ul=A({x:pe(),y:pe()}),ml=A({board:x(),diagram:x(),node:x(),position:ul}),gl=A({v:ce(1),overrides:F(ml)}),Ao=t=>{const e=Oe(gl,t);return e.success?e.output:null},fl=t=>`dev-process-kit:layout-positions:${t}`,bl=()=>{const t=typeof location>"u"?"local":`${location.pathname}${location.search}`;return fl(t)},xl=()=>Qa(Ao),yl=()=>Va(Ao),kl=t=>t.closest(Za)?.getAttribute(Ja)??"";class vl{#n;#o;#e=null;#t="";#i=Ro;#a=()=>this.#l();constructor(e,n){this.#n=e,this.#o=n,e.addController(this)}hostConnected(){this.#e=this.#o.persist===!1?yl():xl(),this.#t=bl(),this.#i=this.#e.read(this.#t)??Ro,window.addEventListener(Xn,this.#a)}hostDisconnected(){window.removeEventListener(Xn,this.#a)}get#r(){return kl(this.#o.host())}get#s(){return this.#o.diagram()}overrides(){return ll(this.#i,this.#r,this.#s)}hasOverrides(){return cl(this.#i,this.#r,this.#s)}commit(e,n){this.#i=_o(this.#i,{board:this.#r,diagram:this.#s,node:e},n),this.#d()}commitMany(e){if(e.size===0)return;const n=[...e].map(([i,o])=>({board:this.#r,diagram:this.#s,node:i,position:o}));this.#i=dl(this.#i,n),this.#d()}prune(e){const n=hl(this.#i,this.#r,this.#s,e);n!==this.#i&&(this.#i=n,this.#d())}reset(){const e=pl(this.#i,this.#r,this.#s);e!==this.#i&&(this.#i=e,this.#d())}#d(){this.#e?.write(this.#t,this.#i),this.#n.requestUpdate(),window.dispatchEvent(new CustomEvent(Xn))}#l(){this.#i=this.#e?.read(this.#t)??this.#i,this.#n.requestUpdate()}}const wl=(t,e,n)=>`${t} ${n.node} \xB7 ${e} ${n.edge}`,Je=[ed,Gi,Ki,re`
|
|
2
2
|
:host {
|
|
3
3
|
display: block;
|
|
4
4
|
container-type: inline-size;
|