dev-process-kit 0.0.8 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/README.md +2 -1
  2. package/dist/THIRD_PARTY_LICENSES.md +47 -0
  3. package/dist/chunks/shared-BQFDKhM1.js +2402 -0
  4. package/dist/chunks/shared-Bd9pmv5a.js +30 -0
  5. package/dist/chunks/{shared-Dn4XK7mS.js → shared-BdUyaZo-.js} +26 -16
  6. package/dist/chunks/shared-C2ytkQtn.js +1094 -0
  7. package/dist/chunks/shared-CDUEK_Mh.js +599 -0
  8. package/dist/chunks/{shared-DEdm-PCj.js → shared-CNbKTeSv.js} +1 -1
  9. package/dist/chunks/{shared-DNk3phV5.js → shared-COrrbgIn.js} +1 -1
  10. package/dist/chunks/{shared-CwwZhA40.js → shared-CQXKAPdi.js} +336 -268
  11. package/dist/chunks/shared-CmNWTIOz.js +1 -0
  12. package/dist/chunks/{shared-BTlCV660.js → shared-DkFF4haI.js} +8 -8
  13. package/dist/chunks/shared-Dmq-C6h3.js +2239 -0
  14. package/dist/chunks/shared-Ds5vLeFk.js +556 -0
  15. package/dist/chunks/shared-FtbePk3S.js +1252 -0
  16. package/dist/chunks/{shared-CupreHTH.js → shared-qb0tjbw2.js} +7 -7
  17. package/dist/components.js +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/templates/delegation-poker.js +1 -1
  20. package/dist/templates/event-storming.js +1 -1
  21. package/dist/templates/example-mapping.js +1 -1
  22. package/dist/templates/grill.js +1 -1
  23. package/dist/templates/plain.js +1 -1
  24. package/dist/templates/prototype.js +1 -1
  25. package/dist/templates/slides.js +1 -1
  26. package/dist/templates/task-board.js +1 -1
  27. package/dist/templates/usm.js +1 -1
  28. package/dist/templates/whiteboard.js +1 -0
  29. package/package.json +3 -2
  30. package/dist/chunks/shared-1AA-0t4O.js +0 -29
  31. package/dist/chunks/shared-BAePwoKi.js +0 -679
  32. package/dist/chunks/shared-BYZoeQ97.js +0 -1963
  33. package/dist/chunks/shared-CSV1HkB2.js +0 -1
  34. package/dist/chunks/shared-CaLe76va.js +0 -576
  35. package/dist/chunks/shared-Csmm_KdH.js +0 -761
  36. package/dist/chunks/shared-VNSWugEg.js +0 -556
@@ -0,0 +1,599 @@
1
+ import{ab as se,ag as le,ac as b,ad as w,ae as E,aw as D,ay as l,af as p,ah as A,ai as L,p as v,aq as f,v as ce,P as pe,e as R,a0 as ue,V as B,R as $,az as ge,aA as me,a3 as c,A as be,a4 as s,a5 as ve,aB as he,K as ye,aC as ke,aD as fe,a2 as $e,T as z,l as xe}from"./shared-BQFDKhM1.js";const h=[1,2,3,4,5,6,7],y=le(h,"a delegation level is an integer from 1 to 7"),k=A(p(),L(1)),we=b({player:k,level:y,reason:l(p())}),K=b({title:l(p()),parties:l(b({delegator:l(k),delegate:l(k)})),players:w(E(b({id:D,name:k})),[]),decisions:w(E(b({id:D,name:k,description:l(p()),cards:w(E(we),[]),agreed:l(y)})),[])}),M=e=>{const a=se(K,e),r=new Set;for(const t of a.players){if(r.has(t.id))throw new Error(`duplicate id "${t.id}" in players`);r.add(t.id)}const o=new Set;for(const t of a.decisions){if(o.has(t.id))throw new Error(`duplicate id "${t.id}" in decisions`);o.add(t.id);const i=new Set;for(const d of t.cards){if(!r.has(d.player))throw new Error(`decision "${t.id}" has a card from unknown player "${d.player}"`);if(i.has(d.player))throw new Error(`player "${d.player}" played more than one card on decision "${t.id}"`);i.add(d.player)}}return a},F=()=>({players:[],decisions:[]}),u=(e,a)=>{if(a!==void 0)return e.decisions.find(r=>r.id===a)},V=(e,a)=>e.players.find(r=>r.id===a),T=e=>[...e.players.map(a=>a.id),...e.decisions.map(a=>a.id)],x="delegation-poker",g={PLAY_CARD:v("PLAY_CARD","decision",b({level:y})),AGREE_LEVEL:v("AGREE_LEVEL","decision",f({level:y})),ADD_DECISION:v("ADD_DECISION","page",f({id:D,name:A(p(),L(1)),description:l(p())}),{dedupeKey:ce}),SET_DECISION_NAME:v("SET_DECISION_NAME","decision",f({name:A(p(),L(1))})),DELETE_DECISION:v("DELETE_DECISION","decision",f({}))},m={playCard:(e,a)=>({type:"PLAY_CARD",target:{type:"decision",id:e},payload:{level:a}}),agreeLevel:(e,a)=>({type:"AGREE_LEVEL",target:{type:"decision",id:e},payload:{level:a}}),addDecision:(e,a)=>({type:"ADD_DECISION",target:{type:"page",id:x},payload:{id:e,name:a}}),setDecisionName:(e,a)=>({type:"SET_DECISION_NAME",target:{type:"decision",id:e},payload:{name:a}}),deleteDecision:e=>({type:"DELETE_DECISION",target:{type:"decision",id:e},payload:{}})},j=(e,a)=>{const r=pe(g,a);if(r===null)return null;const o=r.target.id;switch(r.type){case"PLAY_CARD":return C(e,o,t=>({...t,yours:r.payload.level}));case"AGREE_LEVEL":return C(e,o,t=>({...t,agreed:r.payload.level}));case"ADD_DECISION":{const t=r.payload;return e.decisions.some(i=>i.id===t.id)?e:T(e).includes(t.id)?null:{...e,decisions:[...e.decisions,{id:t.id,name:t.name,...t.description===void 0?{}:{description:t.description},cards:[]}]}}case"SET_DECISION_NAME":return C(e,o,t=>({...t,name:r.payload.name}));case"DELETE_DECISION":return e.decisions.some(t=>t.id===o)?{...e,decisions:e.decisions.filter(t=>t.id!==o)}:null;default:return R(r)}},C=(e,a,r)=>e.decisions.some(o=>o.id===a)?{...e,decisions:e.decisions.map(o=>o.id===a?r(o):o)}:null,q={1:"Tell",2:"Sell",3:"Consult",4:"Agree",5:"Advise",6:"Inquire",7:"Delegate"},Y={1:"\u547D\u4EE4\u3059\u308B",2:"\u8AAC\u5F97\u3059\u308B",3:"\u76F8\u8AC7\u3059\u308B",4:"\u5408\u610F\u3059\u308B",5:"\u52A9\u8A00\u3059\u308B",6:"\u5C0B\u306D\u308B",7:"\u59D4\u4EFB\u3059\u308B"},Ee={1:(e,a)=>`${e} decide and tell ${a}`,2:(e,a)=>`${e} decide and convince ${a}`,3:(e,a)=>`${e} decide after hearing ${a}`,4:(e,a)=>`${e} and ${a} decide together`,5:(e,a)=>`${a} decides after ${e} advise`,6:(e,a)=>`${a} decides, then ${e} ask why`,7:(e,a)=>`${a} decides; ${e} need not know`},De={1:(e,a)=>`${e}\u304C\u6C7A\u3081\u3066\u3001${a}\u306B\u4F1D\u3048\u308B`,2:(e,a)=>`${e}\u304C\u6C7A\u3081\u3066\u3001${a}\u306B\u7D0D\u5F97\u3057\u3066\u3082\u3089\u3046`,3:(e,a)=>`${e}\u304C${a}\u306E\u610F\u898B\u3092\u805E\u3044\u3066\u304B\u3089\u6C7A\u3081\u308B`,4:(e,a)=>`${e}\u3068${a}\u304C\u4E00\u7DD2\u306B\u6C7A\u3081\u308B`,5:(e,a)=>`${e}\u304C\u52A9\u8A00\u3057\u3001${a}\u304C\u6C7A\u3081\u308B`,6:(e,a)=>`${a}\u304C\u6C7A\u3081\u3001\u3042\u3068\u3067${e}\u304C\u7406\u7531\u3092\u5C0B\u306D\u308B`,7:(e,a)=>`${a}\u304C\u6C7A\u3081\u308B\u3002${e}\u306F\u77E5\u3089\u306A\u304F\u3066\u3088\u3044`},Ae={"to-play":"Your card",discuss:"Discuss",consensus:"Same card",agreed:"Agreed"},Le={"to-play":"\u30AB\u30FC\u30C9\u5F85\u3061",discuss:"\u8981\u8B70\u8AD6",consensus:"\u4E00\u81F4",agreed:"\u5408\u610F\u6E08\u307F"},S=ue({en:{levelName:e=>q[e],levelPhrase:(e,a,r)=>Ee[e](a,r),levelLabel:e=>`${e} ${q[e]}`,statusLabel:e=>Ae[e],defaultDelegator:"Leaders",defaultDelegate:"Team",you:"You",progress:(e,a,r)=>`Played ${e}/${r} \xB7 Agreed ${a}/${r}`,partiesLabel:"Who delegates to whom",board:"Delegation board",boardHint:e=>e==="strict"?"Click a cell to play your card for that decision area. The other cards on a row stay face down until you play on it, and your card cannot be changed afterwards.":"Click a cell to play your card for that decision area. The other cards on a row stay face down until you play on it; you can still change your card afterwards.",modeLabel:e=>e==="strict"?"One card only":"Card can be changed",modeTitle:e=>e==="strict"?"Strict mode: a card, once played, is final":"Lax mode: you may change your card after seeing the others",locked:"Final",confirmTitle:"Your card is final",confirmBody:(e,a)=>`You are playing ${e} on \u201C${a}\u201D. On this board a card cannot be changed once played, even after you see the others.`,confirmSkip:"Don\u2019t ask again",confirmPlay:"Play this card",confirmCancel:"Cancel",decisionColumn:"Decision area",agreeColumn:"Agreed",notAgreed:"Not yet",agreeLabel:e=>`Agreed level for \u201C${e}\u201D`,playAt:(e,a)=>`Play ${e} on \u201C${a}\u201D`,hiddenCards:e=>`${e} face down`,addDecision:"+ Decision area",newDecision:"New decision area",noDecisionsTitle:"No decision areas yet",noDecisionsBody:"List the key decisions whose ownership is unclear. For each one, everyone plays one of seven cards, from 1 (the delegator decides alone) to 7 (fully delegated), and then settles on one level.",firstDecision:"+ First decision area",commentCount:e=>`${e} comments`,decisionNameLabel:"Decision area name",commentButton:"Comment",deleteButton:"Delete",cardPlayedTitle:"Played a card",levelAgreedTitle:"Agreed on a level",decisionAddedTitle:"Added a decision area",decisionRenamedTitle:"Renamed the decision area",decisionDeletedTitle:"Deleted the decision area",arrowTo:e=>`\u2192 ${e}`,arrowFrom:(e,a)=>`${e} \u2192 ${a}`,quotedArrowTo:e=>`\u2192 \u201C${e}\u201D`,quotedArrowFrom:(e,a)=>`\u201C${e}\u201D \u2192 \u201C${a}\u201D`,added:e=>`+ \u201C${e}\u201D`,deleted:e=>`\u2212 \u201C${e}\u201D`,decisionKind:"Decision area",boardKind:"Board",wholeBoard:"Whole board"},ja:{levelName:e=>Y[e],levelPhrase:(e,a,r)=>De[e](a,r),levelLabel:e=>`${e} ${Y[e]}`,statusLabel:e=>Le[e],defaultDelegator:"\u30EA\u30FC\u30C0\u30FC",defaultDelegate:"\u30C1\u30FC\u30E0",you:"\u3042\u306A\u305F",progress:(e,a,r)=>`\u63D0\u51FA ${e}/${r} \xB7 \u5408\u610F ${a}/${r}`,partiesLabel:"\u8AB0\u304C\u8AB0\u306B\u4EFB\u305B\u308B\u304B",board:"\u30C7\u30EA\u30B2\u30FC\u30B7\u30E7\u30F3\u30DC\u30FC\u30C9",boardHint:e=>e==="strict"?"\u30BB\u30EB\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u305D\u306E\u5224\u65AD\u9818\u57DF\u306B\u3042\u306A\u305F\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u307E\u3067\u305D\u306E\u884C\u306E\u4ED6\u306E\u30AB\u30FC\u30C9\u306F\u4F0F\u305B\u305F\u307E\u307E\u3067\u3059\u3002\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u3042\u3068\u304B\u3089\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002":"\u30BB\u30EB\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3068\u3001\u305D\u306E\u5224\u65AD\u9818\u57DF\u306B\u3042\u306A\u305F\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u307E\u3067\u305D\u306E\u884C\u306E\u4ED6\u306E\u30AB\u30FC\u30C9\u306F\u4F0F\u305B\u305F\u307E\u307E\u3067\u3059\u3002\u51FA\u3057\u305F\u3042\u3068\u3082\u5909\u66F4\u3067\u304D\u307E\u3059\u3002",modeLabel:e=>e==="strict"?"\u51FA\u3057\u76F4\u3057\u4E0D\u53EF":"\u51FA\u3057\u76F4\u3057\u53EF",modeTitle:e=>e==="strict"?"strict \u30E2\u30FC\u30C9: \u4E00\u5EA6\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u5909\u66F4\u3067\u304D\u307E\u305B\u3093":"lax \u30E2\u30FC\u30C9: \u4ED6\u306E\u4EBA\u306E\u30AB\u30FC\u30C9\u3092\u898B\u305F\u3042\u3068\u3067\u3082\u30AB\u30FC\u30C9\u3092\u5909\u66F4\u3067\u304D\u307E\u3059",locked:"\u78BA\u5B9A",confirmTitle:"\u30AB\u30FC\u30C9\u3092\u51FA\u3059\u3068\u5909\u66F4\u3067\u304D\u307E\u305B\u3093",confirmBody:(e,a)=>`\u300C${a}\u300D\u306B\u300C${e}\u300D\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u307E\u3059\u3002\u3053\u306E\u30DC\u30FC\u30C9\u3067\u306F\u3001\u4E00\u5EA6\u51FA\u3057\u305F\u30AB\u30FC\u30C9\u306F\u4ED6\u306E\u4EBA\u306E\u30AB\u30FC\u30C9\u3092\u898B\u305F\u3042\u3068\u3067\u3082\u5909\u66F4\u3067\u304D\u307E\u305B\u3093\u3002`,confirmSkip:"\u6B21\u56DE\u304B\u3089\u78BA\u8A8D\u3057\u306A\u3044",confirmPlay:"\u3053\u306E\u30AB\u30FC\u30C9\u3092\u51FA\u3059",confirmCancel:"\u30AD\u30E3\u30F3\u30BB\u30EB",decisionColumn:"\u5224\u65AD\u9818\u57DF",agreeColumn:"\u5408\u610F",notAgreed:"\u672A\u5408\u610F",agreeLabel:e=>`\u300C${e}\u300D\u306E\u5408\u610F\u30EC\u30D9\u30EB`,playAt:(e,a)=>`\u300C${a}\u300D\u306B ${e} \u3092\u51FA\u3059`,hiddenCards:e=>`\u4F0F\u305B\u672D ${e} \u679A`,addDecision:"+ \u5224\u65AD\u9818\u57DF",newDecision:"\u65B0\u3057\u3044\u5224\u65AD\u9818\u57DF",noDecisionsTitle:"\u5224\u65AD\u9818\u57DF\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093",noDecisionsBody:"\u8AB0\u304C\u6C7A\u3081\u308B\u306E\u304B\u304C\u66D6\u6627\u306A\u5224\u65AD\u3092\u4E26\u3079\u307E\u3059\u3002\u5224\u65AD\u3054\u3068\u306B\u5168\u54E1\u304C 1\uFF08\u4EFB\u305B\u308B\u5074\u3060\u3051\u3067\u6C7A\u3081\u308B\uFF09\u301C 7\uFF08\u5B8C\u5168\u306B\u4EFB\u305B\u308B\uFF09\u306E\u30AB\u30FC\u30C9\u3092 1 \u679A\u51FA\u3057\u3001\u8A71\u3057\u5408\u3063\u3066 1 \u3064\u306E\u30EC\u30D9\u30EB\u306B\u5408\u610F\u3057\u307E\u3059\u3002",firstDecision:"+ \u6700\u521D\u306E\u5224\u65AD\u9818\u57DF",commentCount:e=>`\u30B3\u30E1\u30F3\u30C8 ${e} \u4EF6`,decisionNameLabel:"\u5224\u65AD\u9818\u57DF\u306E\u540D\u524D",commentButton:"\u30B3\u30E1\u30F3\u30C8",deleteButton:"\u524A\u9664",cardPlayedTitle:"\u30AB\u30FC\u30C9\u3092\u51FA\u3057\u305F",levelAgreedTitle:"\u30EC\u30D9\u30EB\u306B\u5408\u610F",decisionAddedTitle:"\u5224\u65AD\u9818\u57DF\u3092\u8FFD\u52A0",decisionRenamedTitle:"\u5224\u65AD\u9818\u57DF\u306E\u540D\u524D\u3092\u5909\u66F4",decisionDeletedTitle:"\u5224\u65AD\u9818\u57DF\u3092\u524A\u9664",arrowTo:e=>`\u2192 ${e}`,arrowFrom:(e,a)=>`${e} \u2192 ${a}`,quotedArrowTo:e=>`\u2192 \u300C${e}\u300D`,quotedArrowFrom:(e,a)=>`\u300C${e}\u300D\u2192\u300C${a}\u300D`,added:e=>`+ \u300C${e}\u300D`,deleted:e=>`\u2212 \u300C${e}\u300D`,decisionKind:"\u5224\u65AD\u9818\u57DF",boardKind:"\u30DC\u30FC\u30C9",wholeBoard:"\u30DC\u30FC\u30C9\u5168\u4F53"}}),_=e=>e==="strict"?"strict":"lax",P=(e,a)=>e==="strict"&&a.yours!==void 0,G=(e,a,r)=>e==="lax"?{kind:"play"}:P(e,a)?{kind:"locked"}:r?{kind:"play"}:{kind:"confirm"},N=(e,a)=>({delegator:a.parties?.delegator??e.defaultDelegator,delegate:a.parties?.delegate??e.defaultDelegate}),H=e=>e.yours!==void 0||e.agreed!==void 0,Te=(e,a,r)=>[...r.yours===void 0?[]:[{label:e.you,kind:"you",level:r.yours}],...r.cards.map(t=>({label:V(a,t.player)?.name??t.player,kind:"player",level:t.level,...t.reason===void 0?{}:{reason:t.reason}}))],Ce=(e,a)=>e.agreed!==void 0?"agreed":e.yours===void 0?"to-play":a.every(r=>r.level===e.yours)?"consensus":"discuss",Se=(e,a,r,o)=>{const t=Te(e,a,o),i=H(o)?t:[];return{id:o.id,name:o.name,...o.description===void 0?{}:{description:o.description},status:Ce(o,t),hidden:H(o)?0:o.cards.length,...o.agreed===void 0?{}:{agreed:o.agreed},locked:P(r,o),cells:h.map(d=>({level:d,chips:i.filter(n=>n.level===d).map(({level:n,...ne})=>ne),yours:o.yours===d,agreed:o.agreed===d}))}},I=(e,a,r)=>{const{delegator:o,delegate:t}=N(e,a);return{levels:h.map(i=>({level:i,name:e.levelName(i),label:e.levelLabel(i),phrase:e.levelPhrase(i,o,t)})),rows:a.decisions.map(i=>Se(e,a,r,i)),progress:{played:a.decisions.filter(i=>i.yours!==void 0).length,agreed:a.decisions.filter(i=>i.agreed!==void 0).length,total:a.decisions.length}}},J=(e,a,r)=>{const o=r===void 0?"":e.levelLabel(r);return a===void 0?e.arrowTo(o):e.arrowFrom(e.levelLabel(a),o)},_e=(e,a,r)=>a===void 0?e.quotedArrowTo(r):e.quotedArrowFrom(a,r),U={PLAY_CARD:(e,a,r)=>{const o=$(g.PLAY_CARD,a);return{title:e.cardPlayedTitle,tone:"update",body:J(e,u(r,a.target.id)?.yours,o.level)}},AGREE_LEVEL:(e,a,r)=>({title:e.levelAgreedTitle,tone:"update",body:J(e,u(r,a.target.id)?.agreed,$(g.AGREE_LEVEL,a).level)}),ADD_DECISION:(e,a)=>({title:e.decisionAddedTitle,tone:"create",body:e.added(String($(g.ADD_DECISION,a).name??""))}),SET_DECISION_NAME:(e,a,r)=>({title:e.decisionRenamedTitle,tone:"update",body:_e(e,u(r,a.target.id)?.name,String($(g.SET_DECISION_NAME,a).name??""))}),DELETE_DECISION:(e,a,r)=>({title:e.decisionDeletedTitle,tone:"delete",body:e.deleted(u(r,a.target.id)?.name??a.target.id)})},W=(e,a,r,o)=>{let t;try{const i=Object.hasOwn(U,a.type)?U[a.type]:void 0;t=i?i(e,a,o??r):{title:a.type,tone:"meta"}}catch{t={title:a.type,tone:"meta"}}return{title:t.title,targetLabel:X(e,r,a.target),tone:t.tone,...t.body===void 0?{}:{summary:t.body}}},Q=e=>`${e.type} ${B(e.target)} ${JSON.stringify(e.payload)}`,X=(e,a,r)=>{switch(r.type){case"decision":{const o=u(a,r.id);return o?`${e.decisionKind} \xB7 ${o.name}`:`${e.decisionKind} \xB7 ${r.id} (missing)`}case"page":return`${e.boardKind} \xB7 ${O(a)}`;default:return`${r.type} \xB7 ${r.id}`}},Z=(e,a,r)=>[{value:`page:${x}`,label:e.wholeBoard,group:e.boardKind},...a.decisions.map(o=>({value:B({type:"decision",id:o.id}),label:o.name,group:e.decisionKind}))],O=e=>e.title??"Delegation Poker",ee=(e,a)=>a,ae=(e,a)=>{switch(a.type){case"decision":return u(e,a.id)!==void 0;case"page":return a.id===x;default:return!1}},re=e=>{const a=S(e);return{name:"delegation-poker",label:"Delegation Poker",parseBase:M,emptyBase:F,actions:g,apply:j,hasTarget:ae,describe:(r,o,t)=>W(a,r,o,t),serialize:Q,resolveNavigation:ee,commentTargets:(r,o)=>Z(a,r),title:O}},oe="dev-process-kit:delegation-poker:skip-strict-confirm",te=e=>e===!0?!0:null,Pe=e=>{const a=e?ge(te):me(te);return{read:()=>a.read(oe)===!0,remember:()=>a.write(oe,!0)}},Ne=(e,a,r,o)=>s`
2
+ <button
3
+ class="dpk-icon-btn"
4
+ type="button"
5
+ data-comment=${e}
6
+ aria-label=${a}
7
+ title=${a}
8
+ @click=${()=>o.comment(e)}
9
+ >
10
+ ${be()} ${r>0?s`<span class="dpk-icon-badge">${r}</span>`:c}
11
+ </button>
12
+ `,Ie=e=>{const{context:a,m:r,mode:o}=e,{progress:t}=I(r,a.state,o),{delegator:i,delegate:d}=N(r,a.state);return s`<div class="summary">
13
+ <span class="summary-chip" title=${r.partiesLabel}>${i} → ${d}</span>
14
+ <span class="summary-chip" data-testid="mode" data-mode=${o} title=${r.modeTitle(o)}
15
+ >${r.modeLabel(o)}</span
16
+ >
17
+ <span class="summary-chip" data-testid="progress"
18
+ >${r.progress(t.played,t.agreed,t.total)}</span
19
+ >
20
+ </div>`},Oe=e=>{const{handlers:a,m:r}=e;return s`<div class="empty">
21
+ <h2>${r.noDecisionsTitle}</h2>
22
+ <p>${r.noDecisionsBody}</p>
23
+ <button class="dpk-btn dpk-btn--accent" type="button" data-testid="add-decision" @click=${a.addDecision}>
24
+ ${r.firstDecision}
25
+ </button>
26
+ </div>`},Re=e=>{const{context:a,handlers:r,m:o,mode:t}=e,i=I(o,a.state,t);return s`<section class="board-panel" aria-labelledby="dp-board-title">
27
+ <header class="board-head">
28
+ <h2 id="dp-board-title">${o.board}</h2>
29
+ <p class="board-hint">${o.boardHint(t)}</p>
30
+ </header>
31
+ <div class="board" role="table" aria-labelledby="dp-board-title" data-testid="board">
32
+ <div class="board-head-scroll" role="rowgroup">
33
+ <div class="board-row board-row--head" role="row">
34
+ <span class="cell-name" role="columnheader">${o.decisionColumn}</span>
35
+ ${i.levels.map(ze)}
36
+ <span class="cell-agree" role="columnheader">${o.agreeColumn}</span>
37
+ </div>
38
+ </div>
39
+ <div class="board-scroll" role="rowgroup" @scroll=${Be}>
40
+ ${ve(i.rows,d=>d.id,d=>Ke(e,i.levels,d))}
41
+ </div>
42
+ </div>
43
+ <button class="add-decision" type="button" data-testid="add-decision" @click=${r.addDecision}>
44
+ ${o.addDecision}
45
+ </button>
46
+ </section>`},Be=e=>{const a=e.currentTarget;if(!(a instanceof HTMLElement))return;const r=a.previousElementSibling;r instanceof HTMLElement&&(r.scrollLeft=a.scrollLeft)},ze=e=>s`<span
47
+ class="cell cell--head"
48
+ role="columnheader"
49
+ data-level=${e.level}
50
+ >
51
+ <b>${e.level}</b>
52
+ <span class="level-name">${e.name}</span>
53
+ <small class="level-phrase">${e.phrase}</small>
54
+ </span>`,Ke=(e,a,r)=>{const{context:o,handlers:t,m:i}=e,d=`decision:${r.id}`;return s`<div
55
+ class="board-row"
56
+ role="row"
57
+ data-decision=${r.id}
58
+ data-status=${r.status}
59
+ ?data-locked=${r.locked}
60
+ >
61
+ <div class="cell-name" role="rowheader">
62
+ <div class="row-title">
63
+ <dpk-component-inline-edit
64
+ class="row-name"
65
+ .value=${r.name}
66
+ .label=${i.decisionNameLabel}
67
+ @dpk-commit=${he(n=>t.rename(r.id,n))}
68
+ ></dpk-component-inline-edit>
69
+ <span class="row-tools">
70
+ ${Ne(d,i.commentButton,o.commentCount(d),t)}
71
+ <button
72
+ class="dpk-icon-btn"
73
+ type="button"
74
+ data-testid="delete-decision"
75
+ aria-label=${i.deleteButton}
76
+ title=${i.deleteButton}
77
+ @click=${()=>t.deleteDecision(r.id)}
78
+ >
79
+ ${ye()}
80
+ </button>
81
+ </span>
82
+ </div>
83
+ ${r.description===void 0?c:s`<p class="row-description">${r.description}</p>`}
84
+ <div class="row-meta">
85
+ <span class="status" data-status=${r.status}>${i.statusLabel(r.status)}</span>
86
+ ${r.locked?s`<span class="locked" data-testid="locked">${i.locked}</span>`:c}
87
+ ${r.hidden>0?s`<small>${i.hiddenCards(r.hidden)}</small>`:c}
88
+ </div>
89
+ </div>
90
+ ${r.cells.map(n=>Me(e,r,a,n))}
91
+ <div class="cell-agree" role="cell">${Fe(e,a,r)}</div>
92
+ </div>`},Me=(e,a,r,o)=>{const{handlers:t,m:i}=e,d=r.find(n=>n.level===o.level)?.label??String(o.level);return s`<div class="cell" role="cell" data-level=${o.level} ?data-agreed=${o.agreed}>
93
+ <button
94
+ class="cell-play"
95
+ type="button"
96
+ data-level=${o.level}
97
+ aria-pressed=${o.yours?"true":"false"}
98
+ aria-disabled=${a.locked?"true":c}
99
+ aria-label=${i.playAt(d,a.name)}
100
+ @click=${()=>t.play(a.id,o.level)}
101
+ >
102
+ ${o.chips.map(n=>s`<span
103
+ class="chip"
104
+ data-kind=${n.kind}
105
+ ?data-reason=${n.reason!==void 0}
106
+ title=${n.reason??c}
107
+ >${n.label}</span
108
+ >`)}
109
+ </button>
110
+ </div>`},Fe=(e,a,r)=>{const{handlers:o,m:t}=e;return s`<select
111
+ class="dpk-select agree-select"
112
+ data-testid="agree"
113
+ aria-label=${t.agreeLabel(r.name)}
114
+ @change=${ke(i=>{const d=h.find(n=>String(n)===i);d!==void 0&&d!==r.agreed&&o.agree(r.id,d)})}
115
+ >
116
+ ${r.agreed===void 0?s`<option value="" disabled selected>${t.notAgreed}</option>`:c}
117
+ ${a.map(i=>s`<option value=${i.level} ?selected=${i.level===r.agreed}>${i.label}</option>`)}
118
+ </select>`},Ve=(e,a,r)=>a===null?c:s`<div class="confirm-backdrop" @click=${r.cancel}>
119
+ <div
120
+ class="confirm"
121
+ role="alertdialog"
122
+ aria-modal="true"
123
+ aria-labelledby="dp-confirm-title"
124
+ aria-describedby="dp-confirm-body"
125
+ data-testid="confirm-play"
126
+ @click=${o=>o.stopPropagation()}
127
+ @keydown=${o=>{o.key==="Escape"&&r.cancel()}}
128
+ >
129
+ <h2 id="dp-confirm-title">${e.confirmTitle}</h2>
130
+ <p id="dp-confirm-body">${e.confirmBody(e.levelLabel(a.level),a.decisionName)}</p>
131
+ <label class="confirm-skip">
132
+ <input type="checkbox" .checked=${a.skip} @change=${fe(r.toggleSkip)} />
133
+ ${e.confirmSkip}
134
+ </label>
135
+ <div class="confirm-actions">
136
+ <button class="dpk-btn" type="button" data-testid="confirm-play-cancel" @click=${r.cancel}>
137
+ ${e.confirmCancel}
138
+ </button>
139
+ <button
140
+ class="dpk-btn dpk-btn--accent"
141
+ type="button"
142
+ data-testid="confirm-play-ok"
143
+ data-level=${a.level}
144
+ @click=${r.confirm}
145
+ >
146
+ ${e.confirmPlay}
147
+ </button>
148
+ </div>
149
+ </div>
150
+ </div>`,je=$e`
151
+ [data-level='1'] {
152
+ --lv: var(--dpk-blue);
153
+ }
154
+ [data-level='2'] {
155
+ --lv: color-mix(in oklab, var(--dpk-blue) 83%, var(--dpk-green));
156
+ }
157
+ [data-level='3'] {
158
+ --lv: color-mix(in oklab, var(--dpk-blue) 67%, var(--dpk-green));
159
+ }
160
+ [data-level='4'] {
161
+ --lv: color-mix(in oklab, var(--dpk-blue) 50%, var(--dpk-green));
162
+ }
163
+ [data-level='5'] {
164
+ --lv: color-mix(in oklab, var(--dpk-blue) 33%, var(--dpk-green));
165
+ }
166
+ [data-level='6'] {
167
+ --lv: color-mix(in oklab, var(--dpk-blue) 17%, var(--dpk-green));
168
+ }
169
+ [data-level='7'] {
170
+ --lv: var(--dpk-green);
171
+ }
172
+
173
+ /* ---------------------------------------------------------- summary */
174
+
175
+ .summary {
176
+ display: flex;
177
+ flex-wrap: wrap;
178
+ gap: 6px;
179
+ font-size: 12px;
180
+ color: var(--dpk-ink-soft);
181
+ }
182
+
183
+ .summary-chip {
184
+ padding: 4px 10px;
185
+ border: 1px solid var(--dpk-rule);
186
+ border-radius: 999px;
187
+ background: var(--dpk-paper-raised);
188
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-xs);
189
+ font-variant-numeric: tabular-nums;
190
+ }
191
+
192
+ /* ----------------------------------------------------------- status */
193
+
194
+ .status {
195
+ display: inline-block;
196
+ padding: 2px 9px;
197
+ border-radius: 999px;
198
+ font-size: 11.5px;
199
+ font-weight: 600;
200
+ white-space: nowrap;
201
+ background: var(--dpk-paper-sunken);
202
+ color: var(--dpk-ink-soft);
203
+ }
204
+
205
+ .status[data-status='discuss'] {
206
+ background: var(--dpk-amber-soft);
207
+ color: var(--dpk-amber);
208
+ }
209
+
210
+ .status[data-status='consensus'] {
211
+ background: var(--dpk-blue-soft);
212
+ color: var(--dpk-blue);
213
+ }
214
+
215
+ .status[data-status='agreed'] {
216
+ background: var(--dpk-green-soft);
217
+ color: var(--dpk-green);
218
+ }
219
+
220
+ .locked {
221
+ display: inline-flex;
222
+ align-items: center;
223
+ gap: 3px;
224
+ padding: 2px 8px;
225
+ border: 1px solid var(--dpk-rule);
226
+ border-radius: 999px;
227
+ font-size: 11px;
228
+ color: var(--dpk-ink-soft);
229
+ }
230
+
231
+ .locked::before {
232
+ content: '';
233
+ width: 6px;
234
+ height: 6px;
235
+ border-radius: 1px;
236
+ background: currentColor;
237
+ }
238
+
239
+ .summary-chip[data-mode='strict'] {
240
+ border-color: color-mix(in srgb, var(--dpk-amber) 45%, var(--dpk-rule));
241
+ color: var(--dpk-amber);
242
+ }
243
+
244
+ /* ----------------------------------------------------------- confirm */
245
+
246
+ .confirm-backdrop {
247
+ position: fixed;
248
+ inset: 0;
249
+ z-index: 20;
250
+ display: grid;
251
+ place-items: center;
252
+ padding: 16px;
253
+ background: color-mix(in srgb, var(--dpk-ink) 28%, transparent);
254
+ animation: dp-fade-in 140ms var(--dpk-ease);
255
+ }
256
+
257
+ .confirm {
258
+ box-sizing: border-box;
259
+ display: grid;
260
+ gap: 12px;
261
+ width: min(420px, 100%);
262
+ padding: 20px;
263
+ border: 1px solid var(--dpk-rule-strong);
264
+ border-radius: var(--dpk-radius-lg);
265
+ background: var(--dpk-paper-raised);
266
+ box-shadow: var(--dpk-bevel), var(--dpk-shadow-lg);
267
+ color: var(--dpk-ink);
268
+ }
269
+
270
+ .confirm h2 {
271
+ margin: 0;
272
+ font-size: 15px;
273
+ }
274
+
275
+ .confirm p {
276
+ margin: 0;
277
+ color: var(--dpk-ink-soft);
278
+ font-size: 13px;
279
+ line-height: 1.6;
280
+ }
281
+
282
+ .confirm-skip {
283
+ display: flex;
284
+ align-items: center;
285
+ gap: 6px;
286
+ font-size: 12.5px;
287
+ color: var(--dpk-ink-soft);
288
+ cursor: pointer;
289
+ }
290
+
291
+ .confirm-actions {
292
+ display: flex;
293
+ justify-content: flex-end;
294
+ gap: 8px;
295
+ }
296
+
297
+ @keyframes dp-fade-in {
298
+ from {
299
+ opacity: 0;
300
+ }
301
+ }
302
+
303
+ /* ------------------------------------------------------------- board */
304
+
305
+ .board-panel {
306
+ display: grid;
307
+ gap: 12px;
308
+ align-content: start;
309
+ }
310
+
311
+ .board-head {
312
+ display: grid;
313
+ gap: 4px;
314
+ }
315
+
316
+ .board-head h2 {
317
+ margin: 0;
318
+ font-size: 16px;
319
+ }
320
+
321
+ .board-hint {
322
+ margin: 0;
323
+ font-size: 12.5px;
324
+ line-height: 1.6;
325
+ color: var(--dpk-ink-soft);
326
+ }
327
+
328
+ .board {
329
+ display: grid;
330
+ border: 1px solid var(--dpk-rule);
331
+ border-radius: var(--dpk-radius-lg);
332
+ background: var(--dpk-paper-raised);
333
+ box-shadow: var(--dpk-shadow-sm);
334
+ }
335
+
336
+ /* The level heads stay in sight while the decisions scroll under them. */
337
+ .board-head-scroll {
338
+ position: sticky;
339
+ top: 0;
340
+ z-index: 2;
341
+ overflow: hidden;
342
+ border-bottom: 1px solid var(--dpk-rule);
343
+ border-radius: var(--dpk-radius-lg) var(--dpk-radius-lg) 0 0;
344
+ background: var(--dpk-paper-raised);
345
+ box-shadow: 0 6px 14px -12px var(--dpk-shade-3);
346
+ }
347
+
348
+ .board-scroll {
349
+ overflow-x: auto;
350
+ border-radius: 0 0 var(--dpk-radius-lg) var(--dpk-radius-lg);
351
+ }
352
+
353
+ .board-head-scroll > .board-row,
354
+ .board-scroll > .board-row {
355
+ min-width: 980px;
356
+ }
357
+
358
+ .board-scroll > .board-row:first-child {
359
+ border-top: 0;
360
+ }
361
+
362
+ .board-row {
363
+ display: grid;
364
+ grid-template-columns: minmax(220px, 2fr) repeat(7, minmax(84px, 1fr)) minmax(132px, 1fr);
365
+ align-items: stretch;
366
+ border-top: 1px solid var(--dpk-rule);
367
+ }
368
+
369
+ .board-row--head {
370
+ border-top: 0;
371
+ font-size: 11.5px;
372
+ color: var(--dpk-ink-soft);
373
+ }
374
+
375
+ .board-row:not(.board-row--head):hover {
376
+ background: color-mix(in srgb, var(--dpk-paper-sunken) 60%, transparent);
377
+ }
378
+
379
+ .board-row--head .cell-name,
380
+ .board-row--head .cell-agree {
381
+ align-content: end;
382
+ font-weight: 600;
383
+ }
384
+
385
+ /* Decision area: its name, description, where it stands and its tools. */
386
+ .cell-name {
387
+ display: grid;
388
+ align-content: center;
389
+ gap: 4px;
390
+ padding: 10px 12px;
391
+ min-width: 0;
392
+ }
393
+
394
+ .row-title {
395
+ display: flex;
396
+ align-items: flex-start;
397
+ gap: 6px;
398
+ }
399
+
400
+ .row-name {
401
+ flex: 1;
402
+ min-width: 0;
403
+ font-size: 13.5px;
404
+ font-weight: 600;
405
+ line-height: 1.4;
406
+ }
407
+
408
+ .row-tools {
409
+ display: flex;
410
+ gap: 2px;
411
+ opacity: 0;
412
+ transition: opacity 120ms ease;
413
+ }
414
+
415
+ .board-row:hover .row-tools,
416
+ .row-tools:focus-within {
417
+ opacity: 1;
418
+ }
419
+
420
+ .row-description {
421
+ margin: 0;
422
+ font-size: 11.5px;
423
+ line-height: 1.5;
424
+ color: var(--dpk-ink-soft);
425
+ }
426
+
427
+ .row-meta {
428
+ display: flex;
429
+ flex-wrap: wrap;
430
+ align-items: center;
431
+ gap: 6px;
432
+ font-size: 11px;
433
+ color: var(--dpk-ink-faint);
434
+ }
435
+
436
+ /* Level columns. */
437
+ .cell {
438
+ display: grid;
439
+ border-left: 1px solid var(--dpk-rule);
440
+ background: color-mix(in srgb, var(--lv) 5%, transparent);
441
+ }
442
+
443
+ .cell--head {
444
+ align-content: end;
445
+ justify-items: center;
446
+ gap: 2px;
447
+ padding: 10px 6px;
448
+ background: color-mix(in srgb, var(--lv) 10%, transparent);
449
+ text-align: center;
450
+ }
451
+
452
+ .cell--head b {
453
+ font-size: 16px;
454
+ line-height: 1;
455
+ color: var(--lv);
456
+ }
457
+
458
+ .level-name {
459
+ font-weight: 600;
460
+ color: var(--dpk-ink);
461
+ }
462
+
463
+ .level-phrase {
464
+ font-size: 10.5px;
465
+ line-height: 1.45;
466
+ color: var(--dpk-ink-faint);
467
+ }
468
+
469
+ .cell[data-agreed] {
470
+ background: color-mix(in srgb, var(--lv) 26%, var(--dpk-paper-raised));
471
+ box-shadow: inset 0 0 0 2px var(--lv);
472
+ }
473
+
474
+ /* The whole cell is the button that plays the reader's card at its level. */
475
+ .cell-play {
476
+ display: flex;
477
+ flex-wrap: wrap;
478
+ gap: 3px;
479
+ align-content: center;
480
+ justify-content: center;
481
+ min-height: 56px;
482
+ margin: 0;
483
+ padding: 6px 4px;
484
+ border: 0;
485
+ background: transparent;
486
+ color: inherit;
487
+ font: inherit;
488
+ cursor: pointer;
489
+ }
490
+
491
+ .cell-play:hover {
492
+ background: color-mix(in srgb, var(--lv) 14%, transparent);
493
+ }
494
+
495
+ /* strict mode: the reader's card is final, so the row no longer takes clicks. */
496
+ .cell-play[aria-disabled='true'] {
497
+ cursor: default;
498
+ }
499
+
500
+ .cell-play[aria-disabled='true']:hover {
501
+ background: transparent;
502
+ }
503
+
504
+ .cell-play:focus-visible {
505
+ outline: none;
506
+ box-shadow: inset var(--dpk-focus);
507
+ }
508
+
509
+ .chip {
510
+ max-width: 100%;
511
+ padding: 1px 7px;
512
+ overflow: hidden;
513
+ border-radius: 999px;
514
+ background: var(--dpk-paper-raised);
515
+ border: 1px solid color-mix(in srgb, var(--lv) 45%, var(--dpk-rule));
516
+ font-size: 10.5px;
517
+ white-space: nowrap;
518
+ text-overflow: ellipsis;
519
+ }
520
+
521
+ /* A chip with a reason: hover it to read why. */
522
+ .chip[data-reason] {
523
+ text-decoration: underline dotted color-mix(in srgb, var(--dpk-ink-faint) 70%, transparent);
524
+ text-underline-offset: 2px;
525
+ cursor: help;
526
+ }
527
+
528
+ .chip[data-kind='you'] {
529
+ border-color: var(--dpk-accent);
530
+ background: var(--dpk-accent);
531
+ color: var(--dpk-accent-ink);
532
+ font-weight: 600;
533
+ }
534
+
535
+ /* The settled level. */
536
+ .cell-agree {
537
+ display: grid;
538
+ align-content: center;
539
+ padding: 8px 10px;
540
+ border-left: 1px solid var(--dpk-rule);
541
+ }
542
+
543
+ .agree-select {
544
+ width: 100%;
545
+ min-width: 0;
546
+ font-size: 12px;
547
+ }
548
+
549
+ .board-row[data-status='agreed'] .agree-select {
550
+ border-color: color-mix(in srgb, var(--dpk-green) 55%, var(--dpk-rule));
551
+ }
552
+
553
+ .add-decision {
554
+ justify-self: start;
555
+ padding: 8px 14px;
556
+ border: 1px dashed var(--dpk-rule-strong);
557
+ border-radius: var(--dpk-radius);
558
+ background: transparent;
559
+ color: var(--dpk-ink-soft);
560
+ font: inherit;
561
+ cursor: pointer;
562
+ }
563
+
564
+ .add-decision:hover {
565
+ border-color: var(--dpk-accent);
566
+ color: var(--dpk-accent);
567
+ }
568
+
569
+ .add-decision:focus-visible {
570
+ outline: none;
571
+ box-shadow: var(--dpk-focus);
572
+ }
573
+
574
+ /* ------------------------------------------------------------- empty */
575
+
576
+ .empty {
577
+ display: grid;
578
+ gap: 10px;
579
+ max-width: 620px;
580
+ padding: 28px 24px;
581
+ border: 1px dashed var(--dpk-rule-strong);
582
+ border-radius: var(--dpk-radius-lg);
583
+ background: var(--dpk-dots), var(--dpk-paper-sunken);
584
+ }
585
+
586
+ .empty h2 {
587
+ margin: 0;
588
+ }
589
+
590
+ .empty p {
591
+ margin: 0;
592
+ color: var(--dpk-ink-soft);
593
+ line-height: 1.7;
594
+ }
595
+
596
+ .empty .dpk-btn {
597
+ justify-self: start;
598
+ }
599
+ `;class ie extends z{static{this.styles=[z.styles,je]}static{this.properties={mode:{type:String},pending:{state:!0},skipConfirm:{state:!0}}}#a=null;#e=null;constructor(){super(),this.mode=null,this.pending=null,this.skipConfirm=!1}connectedCallback(){super.connectedCallback(),this.#a=Pe(this.storage!=="off"&&this.storage!=="memory"),this.skipConfirm=this.#a.read()}definitionFor(a){return re(a)}renderRegions(a){const r=S(this.locale),o=this.#r(a,r),t={context:a,handlers:o,m:r,mode:_(this.mode)},i=a.state.decisions.length===0?Oe(t):Re(t);return{header:Ie(t),main:s`${i}${Ve(r,this.pending,this.#o(a))}`}}updated(){super.updated();const a=this.#e;if(a!==null){if(this.#e=null,a==="dialog"){this.renderRoot.querySelector('[data-testid="confirm-play-ok"]')?.focus();return}this.renderRoot.querySelector(`[data-decision="${a.decisionId}"] .cell-play[data-level="${a.level}"]`)?.focus()}}#r(a,r){return{play:(o,t)=>{const i=a.state.decisions.find(n=>n.id===o);if(i===void 0)return;const d=G(_(this.mode),i,this.skipConfirm);switch(d.kind){case"play":a.dispatch(m.playCard(o,t));return;case"confirm":this.pending={decisionId:o,decisionName:i.name,level:t,skip:!1},this.#e="dialog";return;case"locked":return;default:R(d)}},agree:(o,t)=>{a.dispatch(m.agreeLevel(o,t))},addDecision:()=>{const o=xe("decision",T(a.state));a.dispatch(m.addDecision(o,r.newDecision))},rename:(o,t)=>{a.dispatch(m.setDecisionName(o,t))},deleteDecision:o=>{a.dispatch(m.deleteDecision(o))},comment:o=>this.requestComment(o)}}#o(a){const r=o=>{this.pending=null,this.#e={decisionId:o.decisionId,level:o.level}};return{toggleSkip:o=>{this.pending!==null&&(this.pending={...this.pending,skip:o})},confirm:()=>{const o=this.pending;o!==null&&(o.skip&&(this.#a?.remember(),this.skipConfirm=!0),a.dispatch(m.playCard(o.decisionId,o.level)),r(o))},cancel:()=>{this.pending!==null&&r(this.pending)}}}}const de=()=>{customElements.get("dpk-template-delegation-poker")||customElements.define("dpk-template-delegation-poker",ie)},qe=Object.freeze(Object.defineProperty({__proto__:null,DELEGATION_LEVELS:h,DELEGATION_POKER_PAGE:x,DpkTemplateDelegationPoker:ie,allDelegationPokerIds:T,applyDelegationPokerAction:j,defineDelegationPokerElement:de,delegationLevelSchema:y,delegationParties:N,delegationPokerAction:m,delegationPokerActions:g,delegationPokerBaseSchema:K,delegationPokerCommentTargets:Z,delegationPokerDefinitionFor:re,delegationPokerHasTarget:ae,delegationPokerMessages:S,delegationPokerTargetLabel:X,delegationPokerTitle:O,describeDelegationPokerAction:W,emptyDelegationPokerBase:F,findDecision:u,findPlayer:V,isLocked:P,parseDelegationPokerBase:M,parsePlayMode:_,playIntent:G,presentBoard:I,resolveDelegationPokerNavigation:ee,serializeDelegationPokerAction:Q},Symbol.toStringTag,{value:"Module"}));export{de as d,qe as i};
@@ -1,4 +1,4 @@
1
- import{_,a9 as N,aa as f,ab as c,ac as k,ad as p,at as R,af as G,ag as Y,ae as I,V as u,C as v,i as U,a3 as x,a1 as l,a2 as d,aJ as J,au as V,a7 as W,z as Q,a0 as X,T as w}from"./shared-BYZoeQ97.js";const m=_({en:{wholeDeck:"Whole deck",slideGroup:"Slide",outline:"Slides",previous:"Previous slide",next:"Next slide",position:(t,e)=>`Slide ${t} of ${e}`,commentOnSlide:"Comment on this slide",commentPlaceholder:"A question, or what should change (passed to the agent)",addComment:"Add comment",deleteComment:"Delete this comment",submitHint:"\u2318 / Ctrl + Enter",fullscreen:"Full screen",fullscreenHint:"\u2190 \u2192 to move \xB7 Esc to leave",noSlidesBefore:"There are no slides yet. Add them to ",noSlidesAfter:" in the base data."},ja:{wholeDeck:"\u30C7\u30C3\u30AD\u5168\u4F53",slideGroup:"\u30B9\u30E9\u30A4\u30C9",outline:"\u30B9\u30E9\u30A4\u30C9",previous:"\u524D\u306E\u30B9\u30E9\u30A4\u30C9",next:"\u6B21\u306E\u30B9\u30E9\u30A4\u30C9",position:(t,e)=>`${e} \u679A\u4E2D ${t} \u679A\u76EE`,commentOnSlide:"\u3053\u306E\u30B9\u30E9\u30A4\u30C9\u306B\u30B3\u30E1\u30F3\u30C8",commentPlaceholder:"\u8CEA\u554F\u3084\u3001\u5909\u3048\u3066\u307B\u3057\u3044\u3053\u3068\uFF08Agent \u306B\u6E21\u308B\uFF09",addComment:"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteComment:"\u3053\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",submitHint:"\u2318 / Ctrl + Enter",fullscreen:"\u5168\u753B\u9762\u8868\u793A",fullscreenHint:"\u2190 \u2192 \u3067\u79FB\u52D5 \xB7 Esc \u3067\u623B\u308B",noSlidesBefore:"\u30B9\u30E9\u30A4\u30C9\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002base data \u306E ",noSlidesAfter:" \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}}),y=["title","section","content"],Z=f({id:R,layout:c(I(y),"content"),title:G(p(),Y(1)),subtitle:c(p(),""),points:c(k(p()),[])}),$=f({title:c(p(),""),slides:c(k(Z),[])}),S=t=>{const e=N($,t),i=new Set;for(const n of e.slides){if(i.has(n.id))throw new Error(`duplicate slide id: ${n.id}`);i.add(n.id)}return{title:e.title,slides:e.slides}},C=()=>({title:"",slides:[]}),r=(t,e)=>e===void 0?-1:t.slides.findIndex(i=>i.id===e),T=(t,e)=>t.slides[r(t,e)],q=t=>t.title===""?"Slides":t.title,h=(t,e)=>`${e+1}. ${t.title}`,E=(t,e,i)=>{switch(i.type){case"slide":{const n=r(e,i.id),s=e.slides[n];return s===void 0?i.id:h(s,n)}case"page":return t.wholeDeck;default:return i.id}},A=(t,e,i)=>({title:e.type,targetLabel:E(t,i,e.target),tone:"meta"}),z=t=>`${t.type} ${u(t.target)} ${JSON.stringify(t.payload)}`,D=(t,e)=>e.slides.map((i,n)=>({value:u({type:"slide",id:i.id}),label:h(i,n),group:t.slideGroup})),M=(t,e,i)=>{const n=r(e,i.slide),s=e.slides[n];return s===void 0?null:{value:u({type:"slide",id:s.id}),label:h(s,n),group:t.slideGroup}},H=(t,e)=>{const i=t.slides[r(t,e.slide)]??t.slides[0],n={...e};return i?n.slide=i.id:delete n.slide,n},L=(t,e)=>{const i=r(t,e.slide),n=i===-1?0:i,s=t.slides[n];return s===void 0?null:{slide:s,index:n,total:t.slides.length,previous:t.slides[n-1],next:t.slides[n+1]}},ee=(t,e)=>t.filter(i=>i.type===v&&i.target.type==="slide"&&i.target.id===e).map(i=>({id:i.id,body:U(i)})).filter(i=>i.body!==""),P=(t,e)=>{switch(e.type){case"slide":return T(t,e.id)!==void 0;case"page":return!0;default:return!1}},F=t=>{const e=m(t);return{name:"slides",label:"Slides",parseBase:S,emptyBase:C,actions:{},apply:()=>null,hasTarget:P,describe:(i,n)=>A(e,i,n),serialize:z,resolveNavigation:H,commentTargets:i=>D(e,i),currentTarget:(i,n)=>M(e,i,n),title:q}},te={ArrowRight:"next",PageDown:"next",ArrowLeft:"previous",PageUp:"previous",Home:"first",End:"last"},O=t=>t.altKey===!0||t.ctrlKey===!0||t.metaKey===!0||t.shiftKey===!0?null:te[t.key]??null,j=(t,e,i)=>{const n=t.slides.length-1;if(n<0)return;const s=Math.max(r(t,e),0),o={next:Math.min(s+1,n),previous:Math.max(s-1,0),first:0,last:n}[i];return t.slides[o]?.id},ie=(t,e)=>{const{state:i,navigation:n}=t,s=n.slide;return d`
1
+ import{a0 as N,ab as _,ac as f,ad as c,ae as k,af as p,aw as R,ah as G,ai as Y,ag as I,V as u,C as v,h as U,a5 as x,a3 as l,a4 as d,aS as J,ax as V,a9 as W,z as Q,a2 as X,T as w}from"./shared-BQFDKhM1.js";const m=N({en:{wholeDeck:"Whole deck",slideGroup:"Slide",outline:"Slides",previous:"Previous slide",next:"Next slide",position:(t,e)=>`Slide ${t} of ${e}`,commentOnSlide:"Comment on this slide",commentPlaceholder:"A question, or what should change (passed to the agent)",addComment:"Add comment",deleteComment:"Delete this comment",submitHint:"\u2318 / Ctrl + Enter",fullscreen:"Full screen",fullscreenHint:"\u2190 \u2192 to move \xB7 Esc to leave",noSlidesBefore:"There are no slides yet. Add them to ",noSlidesAfter:" in the base data."},ja:{wholeDeck:"\u30C7\u30C3\u30AD\u5168\u4F53",slideGroup:"\u30B9\u30E9\u30A4\u30C9",outline:"\u30B9\u30E9\u30A4\u30C9",previous:"\u524D\u306E\u30B9\u30E9\u30A4\u30C9",next:"\u6B21\u306E\u30B9\u30E9\u30A4\u30C9",position:(t,e)=>`${e} \u679A\u4E2D ${t} \u679A\u76EE`,commentOnSlide:"\u3053\u306E\u30B9\u30E9\u30A4\u30C9\u306B\u30B3\u30E1\u30F3\u30C8",commentPlaceholder:"\u8CEA\u554F\u3084\u3001\u5909\u3048\u3066\u307B\u3057\u3044\u3053\u3068\uFF08Agent \u306B\u6E21\u308B\uFF09",addComment:"\u30B3\u30E1\u30F3\u30C8\u3092\u8FFD\u52A0",deleteComment:"\u3053\u306E\u30B3\u30E1\u30F3\u30C8\u3092\u524A\u9664",submitHint:"\u2318 / Ctrl + Enter",fullscreen:"\u5168\u753B\u9762\u8868\u793A",fullscreenHint:"\u2190 \u2192 \u3067\u79FB\u52D5 \xB7 Esc \u3067\u623B\u308B",noSlidesBefore:"\u30B9\u30E9\u30A4\u30C9\u304C\u307E\u3060\u3042\u308A\u307E\u305B\u3093\u3002base data \u306E ",noSlidesAfter:" \u306B\u8FFD\u52A0\u3057\u3066\u304F\u3060\u3055\u3044\u3002"}}),y=["title","section","content"],Z=f({id:R,layout:c(I(y),"content"),title:G(p(),Y(1)),subtitle:c(p(),""),points:c(k(p()),[])}),$=f({title:c(p(),""),slides:c(k(Z),[])}),S=t=>{const e=_($,t),i=new Set;for(const n of e.slides){if(i.has(n.id))throw new Error(`duplicate slide id: ${n.id}`);i.add(n.id)}return{title:e.title,slides:e.slides}},C=()=>({title:"",slides:[]}),r=(t,e)=>e===void 0?-1:t.slides.findIndex(i=>i.id===e),T=(t,e)=>t.slides[r(t,e)],q=t=>t.title===""?"Slides":t.title,h=(t,e)=>`${e+1}. ${t.title}`,E=(t,e,i)=>{switch(i.type){case"slide":{const n=r(e,i.id),s=e.slides[n];return s===void 0?i.id:h(s,n)}case"page":return t.wholeDeck;default:return i.id}},A=(t,e,i)=>({title:e.type,targetLabel:E(t,i,e.target),tone:"meta"}),z=t=>`${t.type} ${u(t.target)} ${JSON.stringify(t.payload)}`,D=(t,e)=>e.slides.map((i,n)=>({value:u({type:"slide",id:i.id}),label:h(i,n),group:t.slideGroup})),M=(t,e,i)=>{const n=r(e,i.slide),s=e.slides[n];return s===void 0?null:{value:u({type:"slide",id:s.id}),label:h(s,n),group:t.slideGroup}},H=(t,e)=>{const i=t.slides[r(t,e.slide)]??t.slides[0],n={...e};return i?n.slide=i.id:delete n.slide,n},L=(t,e)=>{const i=r(t,e.slide),n=i===-1?0:i,s=t.slides[n];return s===void 0?null:{slide:s,index:n,total:t.slides.length,previous:t.slides[n-1],next:t.slides[n+1]}},ee=(t,e)=>t.filter(i=>i.type===v&&i.target.type==="slide"&&i.target.id===e).map(i=>({id:i.id,body:U(i)})).filter(i=>i.body!==""),P=(t,e)=>{switch(e.type){case"slide":return T(t,e.id)!==void 0;case"page":return!0;default:return!1}},F=t=>{const e=m(t);return{name:"slides",label:"Slides",parseBase:S,emptyBase:C,actions:{},apply:()=>null,hasTarget:P,describe:(i,n)=>A(e,i,n),serialize:z,resolveNavigation:H,commentTargets:i=>D(e,i),currentTarget:(i,n)=>M(e,i,n),title:q}},te={ArrowRight:"next",PageDown:"next",ArrowLeft:"previous",PageUp:"previous",Home:"first",End:"last"},O=t=>t.altKey===!0||t.ctrlKey===!0||t.metaKey===!0||t.shiftKey===!0?null:te[t.key]??null,j=(t,e,i)=>{const n=t.slides.length-1;if(n<0)return;const s=Math.max(r(t,e),0),o={next:Math.min(s+1,n),previous:Math.max(s-1,0),first:0,last:n}[i];return t.slides[o]?.id},ie=(t,e)=>{const{state:i,navigation:n}=t,s=n.slide;return d`
2
2
  <nav class="outline" aria-label=${e.outline}>
3
3
  <div class="outline-head">
4
4
  <span class="dpk-label">${e.outline}</span>
@@ -1 +1 @@
1
- import{aG as t,aH as a,a1 as i,aI as n}from"./shared-BYZoeQ97.js";const o=t(class extends a{constructor(){super(...arguments),this.key=i}render(s,e){return this.key=s,e}update(s,[e,r]){return e!==this.key&&(n(s),this.key=e),r}});export{o as i};
1
+ import{aP as t,aQ as a,a3 as i,aR as n}from"./shared-BQFDKhM1.js";const o=t(class extends a{constructor(){super(...arguments),this.key=i}render(s,e){return this.key=s,e}update(s,[e,r]){return e!==this.key&&(n(s),this.key=e),r}});export{o as i};