@smartmemory/compose 0.2.5-beta → 0.2.7-beta

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 (63) hide show
  1. package/bin/compose.js +7 -0
  2. package/bin/git-hooks/pre-push.template +41 -13
  3. package/dist/assets/{App-j8fWZcGr.js → App-D3ehVPvi.js} +4 -4
  4. package/dist/assets/{arc-BFqOo_jJ.js → arc-Dmf69iHG.js} +1 -1
  5. package/dist/assets/{architectureDiagram-3BPJPVTR-D722w0RE.js → architectureDiagram-3BPJPVTR-xYo993Yw.js} +1 -1
  6. package/dist/assets/{blockDiagram-GPEHLZMM-B4w0mOAJ.js → blockDiagram-GPEHLZMM-UX4EF98O.js} +1 -1
  7. package/dist/assets/{c4Diagram-AAUBKEIU-D6LE8-j8.js → c4Diagram-AAUBKEIU-DaP9CGWb.js} +1 -1
  8. package/dist/assets/channel-D_RXsFFT.js +1 -0
  9. package/dist/assets/{chunk-2J33WTMH-CrazA7xu.js → chunk-2J33WTMH-CKk_RN3A.js} +1 -1
  10. package/dist/assets/{chunk-4BX2VUAB-Cp90GiCM.js → chunk-4BX2VUAB-DboAwYKw.js} +1 -1
  11. package/dist/assets/{chunk-55IACEB6-Bnais1SK.js → chunk-55IACEB6-Dsy9RYvI.js} +1 -1
  12. package/dist/assets/{chunk-727SXJPM-kD07Sqp5.js → chunk-727SXJPM-fAH0QO9v.js} +1 -1
  13. package/dist/assets/{chunk-AQP2D5EJ-DmIxhJc8.js → chunk-AQP2D5EJ-DyZYerFP.js} +1 -1
  14. package/dist/assets/{chunk-FMBD7UC4-Jti_und8.js → chunk-FMBD7UC4-BnboGO5t.js} +1 -1
  15. package/dist/assets/{chunk-ND2GUHAM-Ipx3noKz.js → chunk-ND2GUHAM-Di9tYXme.js} +1 -1
  16. package/dist/assets/{chunk-QZHKN3VN-CeblRnPF.js → chunk-QZHKN3VN-zRPRlAIL.js} +1 -1
  17. package/dist/assets/classDiagram-4FO5ZUOK-K6wdB4ic.js +1 -0
  18. package/dist/assets/classDiagram-v2-Q7XG4LA2-K6wdB4ic.js +1 -0
  19. package/dist/assets/{cose-bilkent-S5V4N54A-fNQlSmHt.js → cose-bilkent-S5V4N54A-C7Hqukaf.js} +1 -1
  20. package/dist/assets/{dagre-BM42HDAG-D27D6YAL.js → dagre-BM42HDAG-B-cR-BjI.js} +1 -1
  21. package/dist/assets/{diagram-2AECGRRQ-CtXeohzN.js → diagram-2AECGRRQ-B6-5onDk.js} +1 -1
  22. package/dist/assets/{diagram-5GNKFQAL-C_BqZkx0.js → diagram-5GNKFQAL-DoZZgFAM.js} +1 -1
  23. package/dist/assets/{diagram-KO2AKTUF-B29ynQz4.js → diagram-KO2AKTUF-77jEGlJh.js} +1 -1
  24. package/dist/assets/{diagram-LMA3HP47-DAYJMc2I.js → diagram-LMA3HP47-D3S7XDRD.js} +1 -1
  25. package/dist/assets/{diagram-OG6HWLK6-CBJMis3l.js → diagram-OG6HWLK6-KbYL9aCY.js} +1 -1
  26. package/dist/assets/{erDiagram-TEJ5UH35-nd3GWiPn.js → erDiagram-TEJ5UH35-DezFbJP-.js} +1 -1
  27. package/dist/assets/{flowDiagram-I6XJVG4X-HFUno_nV.js → flowDiagram-I6XJVG4X-4x31cK9j.js} +1 -1
  28. package/dist/assets/{ganttDiagram-6RSMTGT7-CPPAAjwR.js → ganttDiagram-6RSMTGT7-FopfSTyZ.js} +1 -1
  29. package/dist/assets/{gitGraphDiagram-PVQCEYII-NBq1F6K2.js → gitGraphDiagram-PVQCEYII-DSiQGKbN.js} +1 -1
  30. package/dist/assets/graph-Cs_vqCR0.js +331 -0
  31. package/dist/assets/{index-uHKnp74B.js → index-ClX6LVAf.js} +2 -2
  32. package/dist/assets/{infoDiagram-5YYISTIA-D-TOBtCq.js → infoDiagram-5YYISTIA-DE6BqzK_.js} +1 -1
  33. package/dist/assets/{ishikawaDiagram-YF4QCWOH-nXOztZiZ.js → ishikawaDiagram-YF4QCWOH-Dml8NwQI.js} +1 -1
  34. package/dist/assets/{journeyDiagram-JHISSGLW-Bko3tTdh.js → journeyDiagram-JHISSGLW-CwWeJgjE.js} +1 -1
  35. package/dist/assets/{kanban-definition-UN3LZRKU-1e-7i8st.js → kanban-definition-UN3LZRKU-DnG956Wh.js} +1 -1
  36. package/dist/assets/{linear-Dx5ZJB7F.js → linear-CA3N7Rpi.js} +1 -1
  37. package/dist/assets/{mindmap-definition-RKZ34NQL-CNwNkDqN.js → mindmap-definition-RKZ34NQL-CxfIOjLX.js} +1 -1
  38. package/dist/assets/{pieDiagram-4H26LBE5-C5fvCej-.js → pieDiagram-4H26LBE5-O7aIwy1x.js} +1 -1
  39. package/dist/assets/{quadrantDiagram-W4KKPZXB-4NoQsF61.js → quadrantDiagram-W4KKPZXB-CPQ2qq7c.js} +1 -1
  40. package/dist/assets/{requirementDiagram-4Y6WPE33-q5WxB9LO.js → requirementDiagram-4Y6WPE33-C23horL4.js} +1 -1
  41. package/dist/assets/{sankeyDiagram-5OEKKPKP-DlQNB367.js → sankeyDiagram-5OEKKPKP-DPY04kOW.js} +1 -1
  42. package/dist/assets/{sequenceDiagram-3UESZ5HK-BzHclOKt.js → sequenceDiagram-3UESZ5HK-BKaTfIvo.js} +1 -1
  43. package/dist/assets/{stateDiagram-AJRCARHV-BvWRI9zK.js → stateDiagram-AJRCARHV-B9na_6mY.js} +1 -1
  44. package/dist/assets/stateDiagram-v2-BHNVJYJU-Cf84VDiH.js +1 -0
  45. package/dist/assets/{timeline-definition-PNZ67QCA-j2wKjAti.js → timeline-definition-PNZ67QCA-BBWPqd7X.js} +1 -1
  46. package/dist/assets/{vennDiagram-CIIHVFJN-B77g7htC.js → vennDiagram-CIIHVFJN-tWqiHsOZ.js} +1 -1
  47. package/dist/assets/{wardley-L42UT6IY-83Im2mo2.js → wardley-L42UT6IY-DorxG6os.js} +1 -1
  48. package/dist/assets/{wardleyDiagram-YWT4CUSO-CK-XB-bO.js → wardleyDiagram-YWT4CUSO-B49f8GzW.js} +1 -1
  49. package/dist/assets/{xychartDiagram-2RQKCTM6-D42FcVOY.js → xychartDiagram-2RQKCTM6-BgKSj8Qb.js} +1 -1
  50. package/dist/index.html +1 -1
  51. package/lib/build.js +4 -1
  52. package/lib/result-normalizer.js +5 -1
  53. package/package.json +2 -2
  54. package/server/agent-spawn.js +7 -1
  55. package/server/compose-mcp-tools.js +103 -1
  56. package/server/compose-mcp.js +34 -4
  57. package/server/design-routes.js +4 -1
  58. package/server/mcp-tool-policy.js +112 -0
  59. package/dist/assets/channel-BD-5_hPW.js +0 -1
  60. package/dist/assets/classDiagram-4FO5ZUOK-mSW5R7DY.js +0 -1
  61. package/dist/assets/classDiagram-v2-Q7XG4LA2-mSW5R7DY.js +0 -1
  62. package/dist/assets/graph-CJVNlri5.js +0 -331
  63. package/dist/assets/stateDiagram-v2-BHNVJYJU-CDlF0VA8.js +0 -1
package/bin/compose.js CHANGED
@@ -1654,6 +1654,13 @@ Exit codes:
1654
1654
  else if (a === '--code') code = args[++i]
1655
1655
  else if (a.startsWith('--block-on=')) blockOn = a.slice('--block-on='.length)
1656
1656
  else if (a === '--block-on') blockOn = args[++i]
1657
+ else if (a === '--workspace' || a.startsWith('--workspace=')) {
1658
+ // --workspace is a valid global flag consumed by resolveCwdWithWorkspace(args)
1659
+ // below; skip it here so the unknown-flag guard doesn't reject it. Don't
1660
+ // consume the next token: a bare `--workspace <id>` leaves <id> as a
1661
+ // positional (harmlessly ignored by this loop, parsed by resolveCwdWith-
1662
+ // Workspace), so `--workspace --help` still resolves --help correctly.
1663
+ }
1657
1664
  else if (a.startsWith('--')) {
1658
1665
  console.error(`Unknown flag: ${a}`)
1659
1666
  process.exit(2)
@@ -1,7 +1,9 @@
1
1
  #!/usr/bin/env bash
2
- # Compose pre-push hook — runs `compose validate` and blocks the push on
3
- # any error-severity drift finding. Installed by `compose hooks install --pre-push`;
4
- # placeholders below are substituted at install time.
2
+ # Compose pre-push hook — blocks the push on a red `npm test` suite (HARD gate) and
3
+ # runs `compose validate` as an ADVISORY drift check (prints findings, does not
4
+ # block re-enable strict drift-blocking once the repo's drift backlog is
5
+ # reconciled). Installed by `compose hooks install --pre-push`; placeholders
6
+ # below are substituted at install time.
5
7
  #
6
8
  # External-reference (xref) resolution is OFF here by default: github xref:
7
9
  # citations / kind:"external" links emit XREF_RESOLUTION_SKIPPED (warning,
@@ -18,18 +20,44 @@ COMPOSE_WORKSPACE_ID="__COMPOSE_WORKSPACE_ID__"
18
20
  LOG="${COMPOSE_HOOK_LOG:-.compose/data/pre-push.log}"
19
21
  mkdir -p "$(dirname "$LOG")" 2>/dev/null || true
20
22
 
23
+ # Drift check (ADVISORY — COMP-RESUME follow-up): print findings for visibility,
24
+ # never block. The repo carries pre-existing error-severity drift (much from the
25
+ # COMP-MCP-ENFORCE lifecycle-as-truth projection); hard-blocking on it would make
26
+ # the whole hook unusable, so the TEST gate below is the hard blocker. Re-enable
27
+ # strict drift-blocking once the backlog is reconciled (tracked separately).
21
28
  OUTPUT=$("$COMPOSE_NODE" "$COMPOSE_BIN" validate --scope=project --block-on=error --workspace="$COMPOSE_WORKSPACE_ID" 2>&1)
22
- EXIT_CODE=$?
23
-
24
- if [ "$EXIT_CODE" -ne 0 ]; then
25
- echo "$OUTPUT" | tee -a "$LOG" >&2
29
+ VALIDATE_EXIT=$?
30
+ echo "$OUTPUT"
31
+ if [ "$VALIDATE_EXIT" -ne 0 ]; then
26
32
  echo "" >&2
27
- echo "compose validate found error-severity drift. Push aborted." >&2
28
- echo "Run \`compose validate\` to see findings, then fix and retry." >&2
29
- echo "Bypass at your own risk: git push --no-verify" >&2
30
- exit "$EXIT_CODE"
33
+ echo "pre-push: compose validate reported drift (ADVISORY — not blocking). Review with \`compose validate\`." >&2
34
+ fi
35
+
36
+ # ── Test gate (COMP-RESUME follow-up) ───────────────────────────────────────
37
+ # Block the push if the suite is red. This is the gate whose absence let a broken
38
+ # integration test (and a stale-schema consumer bug) reach main — nothing ran the
39
+ # suite before push. Heavy (full `npm test`) but authoritative. Auto-skips in a
40
+ # repo with no npm `test` script. Emergency bypass (sparingly): git push --no-verify
41
+ if [ -f package.json ]; then
42
+ # Probe scripts.test: exit 0 = present, 1 = definitively absent, anything else
43
+ # = could not read package.json. Skip ONLY on a definitive "absent" (1); on
44
+ # ambiguity run the suite anyway so a broken/unreadable package.json fails
45
+ # CLOSED (blocks), never open (silently skips the gate).
46
+ "$COMPOSE_NODE" -e "let s={};try{s=require(process.cwd()+'/package.json').scripts||{}}catch(e){process.exit(3)};process.exit(s.test?0:1)" 2>/dev/null
47
+ PROBE=$?
48
+ if [ "$PROBE" -ne 1 ]; then
49
+ echo "pre-push: running full test suite (npm test)…" >&2
50
+ PATH="$(dirname "$COMPOSE_NODE"):$PATH" npm test >> "$LOG" 2>&1
51
+ TEST_EXIT=$?
52
+ if [ "$TEST_EXIT" -ne 0 ]; then
53
+ tail -n 40 "$LOG" >&2
54
+ echo "" >&2
55
+ echo "npm test failed — push aborted (full log: $LOG)." >&2
56
+ echo "Bypass at your own risk: git push --no-verify" >&2
57
+ exit "$TEST_EXIT"
58
+ fi
59
+ echo "pre-push: test suite green." >&2
60
+ fi
31
61
  fi
32
62
 
33
- # Below-threshold findings (warnings/info) are still printed for visibility.
34
- echo "$OUTPUT"
35
63
  exit 0
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-D27D6YAL.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/mobile-CG5tLa2S.js","assets/mobile-5PV1E6OC.css","assets/index-uHKnp74B.js","assets/index-jqUffYBL.css","assets/graph-CJVNlri5.js","assets/cose-bilkent-S5V4N54A-fNQlSmHt.js","assets/c4Diagram-AAUBKEIU-D6LE8-j8.js","assets/chunk-ND2GUHAM-Ipx3noKz.js","assets/flowDiagram-I6XJVG4X-HFUno_nV.js","assets/chunk-FMBD7UC4-Jti_und8.js","assets/chunk-55IACEB6-Bnais1SK.js","assets/chunk-2J33WTMH-CrazA7xu.js","assets/channel-BD-5_hPW.js","assets/erDiagram-TEJ5UH35-nd3GWiPn.js","assets/gitGraphDiagram-PVQCEYII-NBq1F6K2.js","assets/chunk-4BX2VUAB-Cp90GiCM.js","assets/chunk-QZHKN3VN-CeblRnPF.js","assets/wardley-L42UT6IY-83Im2mo2.js","assets/ganttDiagram-6RSMTGT7-CPPAAjwR.js","assets/linear-Dx5ZJB7F.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-D-TOBtCq.js","assets/pieDiagram-4H26LBE5-C5fvCej-.js","assets/arc-BFqOo_jJ.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-4NoQsF61.js","assets/xychartDiagram-2RQKCTM6-D42FcVOY.js","assets/requirementDiagram-4Y6WPE33-q5WxB9LO.js","assets/sequenceDiagram-3UESZ5HK-BzHclOKt.js","assets/classDiagram-4FO5ZUOK-mSW5R7DY.js","assets/chunk-727SXJPM-kD07Sqp5.js","assets/classDiagram-v2-Q7XG4LA2-mSW5R7DY.js","assets/stateDiagram-AJRCARHV-BvWRI9zK.js","assets/chunk-AQP2D5EJ-DmIxhJc8.js","assets/stateDiagram-v2-BHNVJYJU-CDlF0VA8.js","assets/journeyDiagram-JHISSGLW-Bko3tTdh.js","assets/timeline-definition-PNZ67QCA-j2wKjAti.js","assets/mindmap-definition-RKZ34NQL-CNwNkDqN.js","assets/kanban-definition-UN3LZRKU-1e-7i8st.js","assets/sankeyDiagram-5OEKKPKP-DlQNB367.js","assets/diagram-LMA3HP47-DAYJMc2I.js","assets/diagram-2AECGRRQ-CtXeohzN.js","assets/blockDiagram-GPEHLZMM-B4w0mOAJ.js","assets/diagram-5GNKFQAL-C_BqZkx0.js","assets/architectureDiagram-3BPJPVTR-D722w0RE.js","assets/diagram-KO2AKTUF-B29ynQz4.js","assets/ishikawaDiagram-YF4QCWOH-nXOztZiZ.js","assets/vennDiagram-CIIHVFJN-B77g7htC.js","assets/diagram-OG6HWLK6-CBJMis3l.js","assets/wardleyDiagram-YWT4CUSO-CK-XB-bO.js"])))=>i.map(i=>d[i]);
2
- var d_=Object.defineProperty;var f_=(t,e,r)=>e in t?d_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ie=(t,e,r)=>f_(t,typeof e!="symbol"?e+"":e,r);import{a as C,j as h,R as Yt,b as p_,g as Ac,w as zt,d as m_,e as cf,f as ds}from"./mobile-CG5tLa2S.js";import{r as g_,_ as Jt,u as x_}from"./index-uHKnp74B.js";import{c as ma,b as ay,f as y_}from"./graph-CJVNlri5.js";const gr={feature:"#3b82f6",bug:"#ef4444",track:"#06b6d4",decision:"#22c55e",task:"#94a3b8",spec:"#8b5cf6",idea:"#f59e0b",question:"#ec4899",evaluation:"#f97316",thread:"#64748b",artifact:"#a855f7"},Vn={planned:"#64748b",ready:"#0ea5e9",in_progress:"#3b82f6",review:"#f59e0b",complete:"#22c55e",blocked:"#ef4444",parked:"#475569",killed:"#1e293b"},b_=["planned","ready","in_progress","review","complete","blocked","parked","killed"],ly=["vision","specification","planning","implementation","verification","release"],Fl={vision:"Vision",specification:"Specification",planning:"Planning",implementation:"Implementation",verification:"Verification",release:"Release"},hf=["Untested","Low","Moderate","High","Crystallized"],Te={explore_design:"Design",prd:"PRD",architecture:"Architecture",blueprint:"Blueprint",verification:"Verification",plan:"Plan",execute:"Execute",report:"Report",docs:"Docs",ship:"Ship",complete:"Complete",killed:"Killed"},cy={explore_design:"design.md",prd:"prd.md",architecture:"architecture.md",blueprint:"blueprint.md",plan:"plan.md",report:"report.md"},hy=["claude","codex","gemini","human","unassigned"],tm={building:"bg-blue-500/10 text-blue-400",debugging:"bg-rose-500/10 text-rose-400",testing:"bg-amber-500/10 text-amber-400",exploring:"bg-purple-500/10 text-purple-400",thinking:"bg-cyan-500/10 text-cyan-400",reviewing:"bg-emerald-500/10 text-emerald-400"},bh=[{id:"explore_design",name:"Explore Design",agent:"claude",phase:"design",hasGate:!1},{id:"design_review",name:"Design Review",agent:"codex",phase:"design",hasGate:!1},{id:"design_gate",name:"Design Gate",agent:"human",phase:"design",hasGate:!0},{id:"prd",name:"PRD",agent:"claude",phase:"design",hasGate:!1},{id:"prd_review",name:"PRD Review",agent:"codex",phase:"design",hasGate:!1},{id:"prd_gate",name:"PRD Gate",agent:"human",phase:"design",hasGate:!0},{id:"architecture",name:"Architecture",agent:"claude",phase:"design",hasGate:!1},{id:"architecture_review",name:"Arch Review",agent:"codex",phase:"design",hasGate:!1},{id:"architecture_gate",name:"Arch Gate",agent:"human",phase:"design",hasGate:!0},{id:"blueprint",name:"Blueprint",agent:"claude",phase:"blueprint",hasGate:!1},{id:"verification",name:"Verification",agent:"claude",phase:"blueprint",hasGate:!1},{id:"blueprint_review",name:"BP Review",agent:"codex",phase:"blueprint",hasGate:!1},{id:"plan",name:"Plan",agent:"claude",phase:"implementation",hasGate:!1},{id:"plan_review",name:"Plan Review",agent:"codex",phase:"implementation",hasGate:!1},{id:"plan_gate",name:"Plan Gate",agent:"human",phase:"implementation",hasGate:!0},{id:"execute",name:"Execute",agent:"claude",phase:"implementation",hasGate:!1},{id:"review",name:"Review Loop",agent:"codex",phase:"implementation",hasGate:!1},{id:"coverage",name:"Coverage Sweep",agent:"claude",phase:"implementation",hasGate:!1},{id:"report",name:"Report",agent:"claude",phase:"ship",hasGate:!1},{id:"report_review",name:"Report Review",agent:"codex",phase:"ship",hasGate:!1},{id:"report_gate",name:"Report Gate",agent:"human",phase:"ship",hasGate:!0},{id:"docs",name:"Docs",agent:"claude",phase:"ship",hasGate:!1},{id:"ship",name:"Ship",agent:"claude",phase:"ship",hasGate:!1},{id:"ship_gate",name:"Ship Gate",agent:"human",phase:"ship",hasGate:!0}],wn={design_gate:"Review Design",prd_gate:"Review PRD",architecture_gate:"Review Architecture",plan_gate:"Review Plan",report_gate:"Review Report",ship_gate:"Approve for Ship"};function Jo(t,e){const r=wn[t.stepId]??(t.fromPhase&&t.toPhase?`${Te[t.fromPhase]??t.fromPhase} → ${Te[t.toPhase]??t.toPhase}`:"Gate"),n=(e==null?void 0:e.title)||t.featureCode||null;return n?`${r} — ${n}`:r}const em={design:{label:"Phase 1: Design",color:"border-blue-500/30 bg-blue-500/5"},blueprint:{label:"Phase 2: Blueprint",color:"border-violet-500/30 bg-violet-500/5"},implementation:{label:"Phase 3: Implement",color:"border-amber-500/30 bg-amber-500/5"},ship:{label:"Phase 4: Ship",color:"border-emerald-500/30 bg-emerald-500/5"}},C_={reading:"hsl(210 70% 60%)",writing:"hsl(142 60% 50%)",executing:"hsl(38 90% 60%)",searching:"hsl(270 60% 65%)",fetching:"hsl(190 70% 55%)",delegating:"hsl(330 60% 65%)",thinking:"hsl(240 30% 70%)"},rm={complete:"hsl(var(--success, 160 60% 45%))",active:"hsl(var(--accent))",failed:"hsl(var(--destructive))",pending:"hsl(var(--muted-foreground) / 0.3)"},k_={development:"border-blue-500/30 bg-blue-500/5 text-blue-400",quality:"border-emerald-500/30 bg-emerald-500/5 text-emerald-400",maintenance:"border-amber-500/30 bg-amber-500/5 text-amber-400",documentation:"border-violet-500/30 bg-violet-500/5 text-violet-400",exploration:"border-cyan-500/30 bg-cyan-500/5 text-cyan-400"},v_={explore_design:{bg:"bg-blue-500/5",border:"border-blue-500/40",text:"text-blue-300"},prd:{bg:"bg-purple-500/5",border:"border-purple-500/40",text:"text-purple-300"},architecture:{bg:"bg-cyan-500/5",border:"border-cyan-500/40",text:"text-cyan-300"},blueprint:{bg:"bg-violet-500/5",border:"border-violet-500/40",text:"text-violet-300"},plan:{bg:"bg-amber-500/5",border:"border-amber-500/40",text:"text-amber-300"},report:{bg:"bg-emerald-500/5",border:"border-emerald-500/40",text:"text-emerald-300"},ship:{bg:"bg-green-500/5",border:"border-green-500/40",text:"text-green-300"}},w_={bg:"bg-muted/30",border:"border-border",text:"text-muted-foreground"},nm=["bg-slate-600","bg-rose-500","bg-amber-500","bg-emerald-500","bg-emerald-500"],S_={info:"text-zinc-400",success:"text-emerald-400",warning:"text-amber-400",error:"text-red-400"},T_={phase:"text-blue-400",gate:"text-purple-400",session:"text-zinc-400",iteration:"text-blue-300",error:"text-red-400"},__={"compose-explorer":"#06b6d4","compose-architect":"#a855f7",codex:"#10b981",claude:"#3b82f6"},im={reading:"var(--color-category-reading)",writing:"var(--color-category-writing)",executing:"var(--color-category-executing)",searching:"var(--color-category-searching)",fetching:"var(--color-category-fetching)",delegating:"var(--color-category-delegating)",thinking:"hsl(var(--muted-foreground))"},uy={branch:{label:"Branch",icon:"⑂",color:"text-purple-400"},phase_transition:{label:"Phase",icon:"→",color:"text-blue-400"},iteration:{label:"Iteration",icon:"↻",color:"text-cyan-400"},gate:{label:"Gate",icon:"◈",color:"text-amber-400"},drift_threshold:{label:"Drift",icon:"⚠",color:"text-rose-400"}};function E_(t,e){return!Array.isArray(t)||t.length===0?"hidden":e?"expanded":"collapsed"}function N_(t){return`violations (${Array.isArray(t)?t.length:0})`}function j_(t){return t?"▾":"▸"}function L_({violations:t=[],expanded:e,onToggle:r}){const[n,i]=C.useState(!1),s=e!==void 0,o=s?e:n,a=E_(t,o);if(a==="hidden")return null;function l(){s?r==null||r():i(d=>!d)}const c=j_(o),u=N_(t);return h.jsxs("div",{style:{background:"hsl(38 90% 50% / 0.06)",borderLeft:"2px solid hsl(38 90% 50% / 0.3)",borderRadius:"3px",marginTop:"4px"},children:[h.jsxs("div",{onClick:l,style:{display:"flex",alignItems:"center",gap:"4px",padding:"3px 8px",cursor:"pointer",color:"hsl(38 90% 70%)",fontSize:"10px",fontFamily:"monospace",userSelect:"none"},children:[h.jsx("span",{style:{opacity:.7},children:c}),h.jsx("span",{children:u})]}),a==="expanded"&&h.jsx("ul",{style:{listStyle:"none",margin:0,padding:"0 8px 6px 16px"},children:t.map((d,p)=>h.jsx("li",{style:{color:"hsl(38 50% 60%)",fontSize:"10px",fontFamily:"monospace",lineHeight:"1.5"},children:d},p))})]})}function B_({msg:t,mode:e="stream"}){const[r,n]=C.useState(!1),i=t.retries??0,s=t.violations??[],o=s.length>0;return e==="strip"?i===0?null:h.jsx("span",{style:{background:"hsl(38 90% 50% / 0.2)",color:"hsl(38 90% 60%)",padding:"0 5px",borderRadius:"9999px",fontSize:"9px"},children:i}):h.jsxs("div",{className:"text-[10px] py-0.5",children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[h.jsxs("span",{style:{color:"hsl(var(--success, 142 60% 50%))",opacity:.7},children:["step complete -- ",t.stepId]}),i>0&&h.jsxs("span",{onClick:()=>n(a=>!a),style:{background:"hsl(38 90% 50% / 0.15)",color:"hsl(38 90% 60%)",padding:"1px 6px",borderRadius:"9999px",fontSize:"10px",cursor:"pointer"},children:[i," ",i===1?"retry":"retries"]}),o?h.jsxs("span",{onClick:()=>n(a=>!a),style:{color:"hsl(38 90% 60%)",fontSize:"10px",cursor:"pointer"},children:[s.length," ",s.length===1?"violation":"violations"]}):h.jsx("span",{style:{color:"hsl(var(--success, 142 60% 50%))",opacity:.4,fontSize:"10px"},children:"✓ checks passed"})]}),r&&o&&h.jsx(L_,{violations:s,expanded:!0,onToggle:()=>n(!1)})]})}const A_=/\b(Error|error:|Traceback|FAILED|ENOENT|Cannot find)\b/,sm=20;function M_({summary:t,output:e}){const[r,n]=C.useState(!1),[i,s]=C.useState(!1),o=e?A_.test(e):!1,a=e!=null&&e.length>0,l=a?e.split(`
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/dagre-BM42HDAG-B-cR-BjI.js","assets/graph-CAnANduQ.js","assets/layout-DGIYPm2g.js","assets/mobile-CG5tLa2S.js","assets/mobile-5PV1E6OC.css","assets/index-ClX6LVAf.js","assets/index-jqUffYBL.css","assets/graph-Cs_vqCR0.js","assets/cose-bilkent-S5V4N54A-C7Hqukaf.js","assets/c4Diagram-AAUBKEIU-DaP9CGWb.js","assets/chunk-ND2GUHAM-Di9tYXme.js","assets/flowDiagram-I6XJVG4X-4x31cK9j.js","assets/chunk-FMBD7UC4-BnboGO5t.js","assets/chunk-55IACEB6-Dsy9RYvI.js","assets/chunk-2J33WTMH-CKk_RN3A.js","assets/channel-D_RXsFFT.js","assets/erDiagram-TEJ5UH35-DezFbJP-.js","assets/gitGraphDiagram-PVQCEYII-DSiQGKbN.js","assets/chunk-4BX2VUAB-DboAwYKw.js","assets/chunk-QZHKN3VN-zRPRlAIL.js","assets/wardley-L42UT6IY-DorxG6os.js","assets/ganttDiagram-6RSMTGT7-FopfSTyZ.js","assets/linear-CA3N7Rpi.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-DX6XiGOO.js","assets/infoDiagram-5YYISTIA-DE6BqzK_.js","assets/pieDiagram-4H26LBE5-O7aIwy1x.js","assets/arc-Dmf69iHG.js","assets/ordinal-Cboi1Yqb.js","assets/quadrantDiagram-W4KKPZXB-CPQ2qq7c.js","assets/xychartDiagram-2RQKCTM6-BgKSj8Qb.js","assets/requirementDiagram-4Y6WPE33-C23horL4.js","assets/sequenceDiagram-3UESZ5HK-BKaTfIvo.js","assets/classDiagram-4FO5ZUOK-K6wdB4ic.js","assets/chunk-727SXJPM-fAH0QO9v.js","assets/classDiagram-v2-Q7XG4LA2-K6wdB4ic.js","assets/stateDiagram-AJRCARHV-B9na_6mY.js","assets/chunk-AQP2D5EJ-DyZYerFP.js","assets/stateDiagram-v2-BHNVJYJU-Cf84VDiH.js","assets/journeyDiagram-JHISSGLW-CwWeJgjE.js","assets/timeline-definition-PNZ67QCA-BBWPqd7X.js","assets/mindmap-definition-RKZ34NQL-CxfIOjLX.js","assets/kanban-definition-UN3LZRKU-DnG956Wh.js","assets/sankeyDiagram-5OEKKPKP-DPY04kOW.js","assets/diagram-LMA3HP47-D3S7XDRD.js","assets/diagram-2AECGRRQ-B6-5onDk.js","assets/blockDiagram-GPEHLZMM-UX4EF98O.js","assets/diagram-5GNKFQAL-DoZZgFAM.js","assets/architectureDiagram-3BPJPVTR-xYo993Yw.js","assets/diagram-KO2AKTUF-77jEGlJh.js","assets/ishikawaDiagram-YF4QCWOH-Dml8NwQI.js","assets/vennDiagram-CIIHVFJN-tWqiHsOZ.js","assets/diagram-OG6HWLK6-KbYL9aCY.js","assets/wardleyDiagram-YWT4CUSO-B49f8GzW.js"])))=>i.map(i=>d[i]);
2
+ var d_=Object.defineProperty;var f_=(t,e,r)=>e in t?d_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var ie=(t,e,r)=>f_(t,typeof e!="symbol"?e+"":e,r);import{a as C,j as h,R as Yt,b as p_,g as Ac,w as zt,d as m_,e as cf,f as ds}from"./mobile-CG5tLa2S.js";import{r as g_,_ as Jt,u as x_}from"./index-ClX6LVAf.js";import{c as ma,b as ay,f as y_}from"./graph-Cs_vqCR0.js";const gr={feature:"#3b82f6",bug:"#ef4444",track:"#06b6d4",decision:"#22c55e",task:"#94a3b8",spec:"#8b5cf6",idea:"#f59e0b",question:"#ec4899",evaluation:"#f97316",thread:"#64748b",artifact:"#a855f7"},Vn={planned:"#64748b",ready:"#0ea5e9",in_progress:"#3b82f6",review:"#f59e0b",complete:"#22c55e",blocked:"#ef4444",parked:"#475569",killed:"#1e293b"},b_=["planned","ready","in_progress","review","complete","blocked","parked","killed"],ly=["vision","specification","planning","implementation","verification","release"],Fl={vision:"Vision",specification:"Specification",planning:"Planning",implementation:"Implementation",verification:"Verification",release:"Release"},hf=["Untested","Low","Moderate","High","Crystallized"],Te={explore_design:"Design",prd:"PRD",architecture:"Architecture",blueprint:"Blueprint",verification:"Verification",plan:"Plan",execute:"Execute",report:"Report",docs:"Docs",ship:"Ship",complete:"Complete",killed:"Killed"},cy={explore_design:"design.md",prd:"prd.md",architecture:"architecture.md",blueprint:"blueprint.md",plan:"plan.md",report:"report.md"},hy=["claude","codex","gemini","human","unassigned"],tm={building:"bg-blue-500/10 text-blue-400",debugging:"bg-rose-500/10 text-rose-400",testing:"bg-amber-500/10 text-amber-400",exploring:"bg-purple-500/10 text-purple-400",thinking:"bg-cyan-500/10 text-cyan-400",reviewing:"bg-emerald-500/10 text-emerald-400"},bh=[{id:"explore_design",name:"Explore Design",agent:"claude",phase:"design",hasGate:!1},{id:"design_review",name:"Design Review",agent:"codex",phase:"design",hasGate:!1},{id:"design_gate",name:"Design Gate",agent:"human",phase:"design",hasGate:!0},{id:"prd",name:"PRD",agent:"claude",phase:"design",hasGate:!1},{id:"prd_review",name:"PRD Review",agent:"codex",phase:"design",hasGate:!1},{id:"prd_gate",name:"PRD Gate",agent:"human",phase:"design",hasGate:!0},{id:"architecture",name:"Architecture",agent:"claude",phase:"design",hasGate:!1},{id:"architecture_review",name:"Arch Review",agent:"codex",phase:"design",hasGate:!1},{id:"architecture_gate",name:"Arch Gate",agent:"human",phase:"design",hasGate:!0},{id:"blueprint",name:"Blueprint",agent:"claude",phase:"blueprint",hasGate:!1},{id:"verification",name:"Verification",agent:"claude",phase:"blueprint",hasGate:!1},{id:"blueprint_review",name:"BP Review",agent:"codex",phase:"blueprint",hasGate:!1},{id:"plan",name:"Plan",agent:"claude",phase:"implementation",hasGate:!1},{id:"plan_review",name:"Plan Review",agent:"codex",phase:"implementation",hasGate:!1},{id:"plan_gate",name:"Plan Gate",agent:"human",phase:"implementation",hasGate:!0},{id:"execute",name:"Execute",agent:"claude",phase:"implementation",hasGate:!1},{id:"review",name:"Review Loop",agent:"codex",phase:"implementation",hasGate:!1},{id:"coverage",name:"Coverage Sweep",agent:"claude",phase:"implementation",hasGate:!1},{id:"report",name:"Report",agent:"claude",phase:"ship",hasGate:!1},{id:"report_review",name:"Report Review",agent:"codex",phase:"ship",hasGate:!1},{id:"report_gate",name:"Report Gate",agent:"human",phase:"ship",hasGate:!0},{id:"docs",name:"Docs",agent:"claude",phase:"ship",hasGate:!1},{id:"ship",name:"Ship",agent:"claude",phase:"ship",hasGate:!1},{id:"ship_gate",name:"Ship Gate",agent:"human",phase:"ship",hasGate:!0}],wn={design_gate:"Review Design",prd_gate:"Review PRD",architecture_gate:"Review Architecture",plan_gate:"Review Plan",report_gate:"Review Report",ship_gate:"Approve for Ship"};function Jo(t,e){const r=wn[t.stepId]??(t.fromPhase&&t.toPhase?`${Te[t.fromPhase]??t.fromPhase} → ${Te[t.toPhase]??t.toPhase}`:"Gate"),n=(e==null?void 0:e.title)||t.featureCode||null;return n?`${r} — ${n}`:r}const em={design:{label:"Phase 1: Design",color:"border-blue-500/30 bg-blue-500/5"},blueprint:{label:"Phase 2: Blueprint",color:"border-violet-500/30 bg-violet-500/5"},implementation:{label:"Phase 3: Implement",color:"border-amber-500/30 bg-amber-500/5"},ship:{label:"Phase 4: Ship",color:"border-emerald-500/30 bg-emerald-500/5"}},C_={reading:"hsl(210 70% 60%)",writing:"hsl(142 60% 50%)",executing:"hsl(38 90% 60%)",searching:"hsl(270 60% 65%)",fetching:"hsl(190 70% 55%)",delegating:"hsl(330 60% 65%)",thinking:"hsl(240 30% 70%)"},rm={complete:"hsl(var(--success, 160 60% 45%))",active:"hsl(var(--accent))",failed:"hsl(var(--destructive))",pending:"hsl(var(--muted-foreground) / 0.3)"},k_={development:"border-blue-500/30 bg-blue-500/5 text-blue-400",quality:"border-emerald-500/30 bg-emerald-500/5 text-emerald-400",maintenance:"border-amber-500/30 bg-amber-500/5 text-amber-400",documentation:"border-violet-500/30 bg-violet-500/5 text-violet-400",exploration:"border-cyan-500/30 bg-cyan-500/5 text-cyan-400"},v_={explore_design:{bg:"bg-blue-500/5",border:"border-blue-500/40",text:"text-blue-300"},prd:{bg:"bg-purple-500/5",border:"border-purple-500/40",text:"text-purple-300"},architecture:{bg:"bg-cyan-500/5",border:"border-cyan-500/40",text:"text-cyan-300"},blueprint:{bg:"bg-violet-500/5",border:"border-violet-500/40",text:"text-violet-300"},plan:{bg:"bg-amber-500/5",border:"border-amber-500/40",text:"text-amber-300"},report:{bg:"bg-emerald-500/5",border:"border-emerald-500/40",text:"text-emerald-300"},ship:{bg:"bg-green-500/5",border:"border-green-500/40",text:"text-green-300"}},w_={bg:"bg-muted/30",border:"border-border",text:"text-muted-foreground"},nm=["bg-slate-600","bg-rose-500","bg-amber-500","bg-emerald-500","bg-emerald-500"],S_={info:"text-zinc-400",success:"text-emerald-400",warning:"text-amber-400",error:"text-red-400"},T_={phase:"text-blue-400",gate:"text-purple-400",session:"text-zinc-400",iteration:"text-blue-300",error:"text-red-400"},__={"compose-explorer":"#06b6d4","compose-architect":"#a855f7",codex:"#10b981",claude:"#3b82f6"},im={reading:"var(--color-category-reading)",writing:"var(--color-category-writing)",executing:"var(--color-category-executing)",searching:"var(--color-category-searching)",fetching:"var(--color-category-fetching)",delegating:"var(--color-category-delegating)",thinking:"hsl(var(--muted-foreground))"},uy={branch:{label:"Branch",icon:"⑂",color:"text-purple-400"},phase_transition:{label:"Phase",icon:"→",color:"text-blue-400"},iteration:{label:"Iteration",icon:"↻",color:"text-cyan-400"},gate:{label:"Gate",icon:"◈",color:"text-amber-400"},drift_threshold:{label:"Drift",icon:"⚠",color:"text-rose-400"}};function E_(t,e){return!Array.isArray(t)||t.length===0?"hidden":e?"expanded":"collapsed"}function N_(t){return`violations (${Array.isArray(t)?t.length:0})`}function j_(t){return t?"▾":"▸"}function L_({violations:t=[],expanded:e,onToggle:r}){const[n,i]=C.useState(!1),s=e!==void 0,o=s?e:n,a=E_(t,o);if(a==="hidden")return null;function l(){s?r==null||r():i(d=>!d)}const c=j_(o),u=N_(t);return h.jsxs("div",{style:{background:"hsl(38 90% 50% / 0.06)",borderLeft:"2px solid hsl(38 90% 50% / 0.3)",borderRadius:"3px",marginTop:"4px"},children:[h.jsxs("div",{onClick:l,style:{display:"flex",alignItems:"center",gap:"4px",padding:"3px 8px",cursor:"pointer",color:"hsl(38 90% 70%)",fontSize:"10px",fontFamily:"monospace",userSelect:"none"},children:[h.jsx("span",{style:{opacity:.7},children:c}),h.jsx("span",{children:u})]}),a==="expanded"&&h.jsx("ul",{style:{listStyle:"none",margin:0,padding:"0 8px 6px 16px"},children:t.map((d,p)=>h.jsx("li",{style:{color:"hsl(38 50% 60%)",fontSize:"10px",fontFamily:"monospace",lineHeight:"1.5"},children:d},p))})]})}function B_({msg:t,mode:e="stream"}){const[r,n]=C.useState(!1),i=t.retries??0,s=t.violations??[],o=s.length>0;return e==="strip"?i===0?null:h.jsx("span",{style:{background:"hsl(38 90% 50% / 0.2)",color:"hsl(38 90% 60%)",padding:"0 5px",borderRadius:"9999px",fontSize:"9px"},children:i}):h.jsxs("div",{className:"text-[10px] py-0.5",children:[h.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8},children:[h.jsxs("span",{style:{color:"hsl(var(--success, 142 60% 50%))",opacity:.7},children:["step complete -- ",t.stepId]}),i>0&&h.jsxs("span",{onClick:()=>n(a=>!a),style:{background:"hsl(38 90% 50% / 0.15)",color:"hsl(38 90% 60%)",padding:"1px 6px",borderRadius:"9999px",fontSize:"10px",cursor:"pointer"},children:[i," ",i===1?"retry":"retries"]}),o?h.jsxs("span",{onClick:()=>n(a=>!a),style:{color:"hsl(38 90% 60%)",fontSize:"10px",cursor:"pointer"},children:[s.length," ",s.length===1?"violation":"violations"]}):h.jsx("span",{style:{color:"hsl(var(--success, 142 60% 50%))",opacity:.4,fontSize:"10px"},children:"✓ checks passed"})]}),r&&o&&h.jsx(L_,{violations:s,expanded:!0,onToggle:()=>n(!1)})]})}const A_=/\b(Error|error:|Traceback|FAILED|ENOENT|Cannot find)\b/,sm=20;function M_({summary:t,output:e}){const[r,n]=C.useState(!1),[i,s]=C.useState(!1),o=e?A_.test(e):!1,a=e!=null&&e.length>0,l=a?e.split(`
3
3
  `):[],c=l.length>sm,u=r&&!i&&c?l.slice(0,sm):l,d=o?"hsl(var(--destructive, 0 84% 60%))":"hsl(215 20% 20%)";return a?h.jsxs("div",{style:{marginLeft:8,borderLeft:`1px solid ${d}`,paddingLeft:8,marginTop:2},children:[h.jsxs("div",{onClick:()=>n(p=>!p),style:{opacity:.6,fontSize:"10px",cursor:"pointer",color:"hsl(var(--muted-foreground))",fontFamily:"ui-monospace, monospace",userSelect:"none",display:"flex",alignItems:"center",gap:4},children:[h.jsx("span",{style:{fontSize:9},children:r?"▾":"▸"}),t]}),r&&h.jsxs("pre",{style:{margin:"4px 0 0 0",padding:0,fontSize:"10px",fontFamily:"ui-monospace, monospace",color:o?"hsl(var(--destructive, 0 84% 60%))":"hsl(var(--muted-foreground))",opacity:o?.9:.7,whiteSpace:"pre-wrap",wordBreak:"break-word",lineHeight:1.5},children:[u.join(`
4
4
  `),!i&&c&&h.jsxs(h.Fragment,{children:[`
5
5
  `,h.jsxs("span",{onClick:p=>{p.stopPropagation(),s(!0)},style:{color:"hsl(var(--accent))",cursor:"pointer",textDecoration:"underline",fontSize:"10px"},children:["Show all (",l.length," lines)"]})]})]})]}):h.jsx("div",{style:{marginLeft:8,opacity:.6,fontSize:"10px",padding:"2px 0",color:"hsl(var(--muted-foreground))",fontFamily:"ui-monospace, monospace"},children:t})}const I_={Read:"reading",Glob:"searching",Grep:"searching",Write:"writing",Edit:"writing",NotebookEdit:"writing",Bash:"executing",Task:"delegating",Skill:"delegating",WebFetch:"fetching",WebSearch:"searching",TodoRead:"reading",TodoWrite:"writing"};function F_(t){return C_[I_[t]||"thinking"]}function P_(t){return t?t<1e3?`${t}ms`:`${(t/1e3).toFixed(1)}s`:""}function D_(t){return t==null?"":t<.001?"<$0.001":`$${t.toFixed(3)}`}function O_({input:t}){const[e,r]=C.useState(!1);if(!t||Object.keys(t).length===0)return null;const n=Object.keys(t)[0],i=String(t[n]??""),s=i.length>60?i.slice(0,57)+"…":i;return h.jsxs("div",{className:"mt-1",children:[h.jsxs("button",{onClick:()=>r(o=>!o),className:"text-[10px] font-mono flex items-center gap-1",style:{color:"hsl(var(--muted-foreground))",background:"none",border:"none",cursor:"pointer",padding:0},children:[h.jsx("span",{style:{opacity:.6},children:e?"▾":"▸"}),!e&&h.jsxs("span",{style:{opacity:.6},children:[n,": ",s]}),e&&h.jsx("span",{style:{opacity:.6},children:"collapse"})]}),e&&h.jsx("pre",{className:"mt-1 text-[10px] font-mono rounded p-2 overflow-x-auto",style:{background:"hsl(var(--muted) / 0.4)",color:"hsl(var(--muted-foreground))",maxHeight:"200px",overflowY:"auto"},children:JSON.stringify(t,null,2)})]})}function R_({block:t}){const e=F_(t.name);return h.jsxs("div",{className:"rounded px-2 py-1.5 my-1",style:{background:"hsl(var(--muted) / 0.3)",borderLeft:`2px solid ${e}`},children:[h.jsx("div",{className:"flex items-center gap-1.5",children:h.jsx("span",{className:"text-[11px] font-semibold font-mono",style:{color:e},children:t.name})}),h.jsx(O_,{input:t.input})]})}function $_({msg:t}){var r;const e=((r=t.message)==null?void 0:r.content)??[];return h.jsx("div",{className:"flex flex-col gap-1 py-1",children:e.map((n,i)=>{if(n.type==="text")return h.jsx("p",{className:"text-sm leading-relaxed whitespace-pre-wrap",style:{color:"hsl(var(--foreground))"},children:n.text},i);if(n.type==="tool_use"){const s=!e.slice(i+1).some(o=>o.type==="tool_use");return h.jsxs(Yt.Fragment,{children:[h.jsx(R_,{block:n}),s&&t._toolResult&&h.jsx(M_,{summary:t._toolResult.summary,output:t._toolResult.output})]},i)}return null})})}function z_({msg:t}){const e=t.subtype!=="success",r=e?"hsl(var(--destructive))":"hsl(var(--success, 142 60% 50%))";return h.jsxs("div",{className:"rounded px-3 py-2 text-xs font-mono flex items-center gap-3 flex-wrap",style:{background:"hsl(var(--muted) / 0.4)",borderLeft:`2px solid ${r}`,color:r},children:[h.jsx("span",{children:e?"✗ error":"✓ done"}),!e&&t.num_turns!=null&&h.jsxs("span",{style:{color:"hsl(var(--muted-foreground))"},children:[t.num_turns," turn",t.num_turns!==1?"s":""]}),t.duration_ms!=null&&h.jsx("span",{style:{color:"hsl(var(--muted-foreground))"},children:P_(t.duration_ms)}),t.total_cost_usd!=null&&h.jsx("span",{style:{color:"hsl(var(--muted-foreground))"},children:D_(t.total_cost_usd)}),e&&t.errors&&h.jsx("span",{style:{color:"hsl(var(--destructive))"},children:t.errors.join("; ")})]})}function W_({msg:t}){var r,n,i,s;const e=typeof((r=t.message)==null?void 0:r.content)=="string"?t.message.content:((s=(i=(n=t.message)==null?void 0:n.content)==null?void 0:i[0])==null?void 0:s.text)??"";return!e||t.isSynthetic?null:h.jsx("div",{className:"flex justify-end py-1",children:h.jsx("div",{className:"rounded-lg px-3 py-2 text-sm max-w-[80%] whitespace-pre-wrap",style:{background:"hsl(var(--accent) / 0.15)",color:"hsl(var(--foreground))",border:"1px solid hsl(var(--accent) / 0.3)"},children:e})})}function q_({msg:t}){var e,r;if(t.type==="stream_event"||!t.verbose&&t.type==="tool_progress"||!t.verbose&&t.type==="tool_use_summary")return null;if(t.verbose){const n=t.type==="tool_progress"?`${t.tool||"tool"} · ${t.elapsed!=null?t.elapsed+"s":""}`:t.summary||"summary",i=t.type==="tool_progress"?"progress":"summary";return h.jsxs("div",{style:{opacity:.6,fontSize:"10px",padding:"2px 0",paddingLeft:4,borderLeft:"1px solid hsl(215 20% 20%)",color:"hsl(var(--muted-foreground))",fontFamily:"ui-monospace, monospace"},children:[h.jsx("span",{style:{color:"hsl(210 40% 45%)",background:"hsl(210 40% 45% / 0.1)",padding:"0 4px",borderRadius:2,fontSize:"10px"},children:i})," ",n]})}if(t.type==="system"&&t.subtype==="init")return h.jsxs("div",{className:"text-[10px] uppercase tracking-wider py-1 flex gap-3 flex-wrap",style:{color:"hsl(var(--muted-foreground))",opacity:.6},children:[h.jsxs("span",{children:["session ",(e=t.session_id)==null?void 0:e.slice(0,8)]}),h.jsx("span",{children:t.model}),h.jsx("span",{children:t.permissionMode})]});if(t.type==="system"&&t.subtype==="connected")return h.jsxs("div",{className:"text-[10px] py-0.5",style:{color:"hsl(var(--muted-foreground))",opacity:.5},children:["reconnected · session ",(r=t.sessionId)==null?void 0:r.slice(0,8)]});if(t.type==="system"&&(t.subtype==="build_start"||t.subtype==="build_resume")){const n=t.subtype==="build_resume"?"build resumed":"build started";return h.jsxs("div",{className:"text-[10px] uppercase tracking-wider py-1",style:{color:"hsl(var(--accent))",opacity:.8},children:[n," -- ",t.featureCode]})}if(t.type==="system"&&t.subtype==="build_step")return h.jsxs("div",{className:"text-[10px] uppercase tracking-wider py-1 flex gap-2",style:{color:"hsl(var(--muted-foreground))"},children:[h.jsxs("span",{children:["step ",t.stepNum,"/",t.totalSteps]}),h.jsx("span",{className:"font-mono",children:t.stepId}),h.jsx("span",{style:{opacity:.5},children:t.agent})]});if(t.type==="system"&&t.subtype==="build_step_done")return h.jsx(B_,{msg:t,mode:"stream"});if(t.type==="system"&&t.subtype==="build_gate")return h.jsxs("div",{className:"text-[10px] uppercase tracking-wider py-1",style:{color:"hsl(38 90% 60%)"},children:["gate -- ",t.stepId]});if(t.type==="system"&&t.subtype==="build_gate_resolved"){const n=t.outcome==="approved"||t.outcome==="approve"?"hsl(var(--success, 142 60% 50%))":t.outcome==="revise"?"hsl(38 90% 60%)":"hsl(var(--destructive))";return h.jsxs("div",{className:"text-[10px] py-0.5",style:{color:n,opacity:.8},children:["gate ",t.outcome," -- ",t.stepId]})}if(t.type==="system"&&t.subtype==="build_end"){const n=t.status==="complete"?"hsl(var(--success, 142 60% 50%))":"hsl(var(--destructive))";return h.jsxs("div",{className:"text-[10px] uppercase tracking-wider py-1",style:{color:n},children:["build ",t.status," -- ",t.featureCode]})}return t.type==="assistant"?h.jsx($_,{msg:t}):t.type==="user"?h.jsx(W_,{msg:t}):t.type==="result"?h.jsx(z_,{msg:t}):t.type==="error"?h.jsx("div",{className:"text-xs rounded px-2 py-1.5 font-mono",style:{background:"hsl(var(--destructive) / 0.1)",color:"hsl(var(--destructive))",borderLeft:"2px solid hsl(var(--destructive))"},children:t.message}):null}function H_({onSend:t,disabled:e=!1,placeholder:r="Message Claude…"}){const n=C.useRef(null);C.useEffect(()=>{!e&&n.current&&n.current.focus()},[e]);function i(){const a=n.current;a&&(a.style.height="auto",a.style.height=`${Math.min(a.scrollHeight,160)}px`)}function s(a){a.key==="Enter"&&!a.shiftKey&&(a.preventDefault(),o())}function o(){const a=n.current;if(!a)return;const l=a.value.trim();l&&(t(l),a.value="",i())}return h.jsxs("div",{className:"flex items-end gap-2 px-3 py-2",style:{borderTop:"1px solid hsl(var(--border))"},children:[h.jsx("textarea",{ref:n,rows:1,disabled:e,placeholder:r,onKeyDown:s,onInput:i,className:"flex-1 resize-none bg-transparent text-sm outline-none font-mono leading-relaxed",style:{color:"hsl(var(--foreground))",caretColor:"hsl(var(--accent))",maxHeight:"160px",overflowY:"auto",opacity:e?.4:1,transition:"opacity 0.15s"}}),h.jsx("button",{onClick:o,disabled:e,title:"Send (Enter)",className:"shrink-0 rounded px-2 py-1 text-xs font-mono",style:{background:"hsl(var(--accent) / 0.15)",color:"hsl(var(--accent))",border:"1px solid hsl(var(--accent) / 0.3)",cursor:e?"not-allowed":"pointer",opacity:e?.4:1,transition:"opacity 0.15s"},children:"↵"})]})}const dy="compose:verboseStream",Pl={verboseStream:!1};function fy(){return Pl.verboseStream}function U_(t,e){Pl.verboseStream=!!t;const r=typeof localStorage<"u"?localStorage:null;if(r)try{r.setItem(dy,String(Pl.verboseStream))}catch{}}function G_(t){const e=typeof localStorage<"u"?localStorage:null;if(e)try{const r=e.getItem(dy);r!==null&&(Pl.verboseStream=r==="true")}catch{}}function V_(t,e){return t.type==="stream_event"?{include:!1,msg:t}:t.type==="tool_progress"||t.type==="tool_use_summary"?e?{include:!0,msg:{...t,verbose:!0}}:{include:!1,msg:t}:{include:!0,msg:t}}function Y_(t){var r,n;const e=[];for(let i=0;i<t.length;i++){const s=t[i],o=t[i+1],a=s.type==="assistant"&&((n=(r=s.message)==null?void 0:r.content)==null?void 0:n.some(c=>c.type==="tool_use")),l=o&&(o.type==="tool_use_summary"||o.type==="assistant"&&o.subtype==="tool_use_summary");a&&l?(e.push({...s,_toolResult:o}),i++):e.push(s)}return e}const py=parseInt("4002",10),X_="compose-agent-session",om=500,K_=8,Z_=2e3,my=3e4,am={Read:"reading",Glob:"searching",Grep:"searching",Write:"writing",Edit:"writing",NotebookEdit:"writing",Bash:"executing",Task:"delegating",Skill:"delegating",WebFetch:"fetching",WebSearch:"searching",TodoRead:"reading",TodoWrite:"writing"},Q_={reading:"Reading",writing:"Writing",executing:"Running",searching:"Searching",fetching:"Fetching",delegating:"Delegating",thinking:"Thinking",waiting:"Waiting for gate approval"};G_();const Z={es:null,connected:!1,connecting:!1,reconnectTimer:null,reconnectAttempts:0,sessionId:null,messages:[],agentStatus:"idle",agentTool:null,agentCategory:null,currentActivity:null,activityLog:[],_idleTimer:null,sourceStatus:{build:null,interactive:null},parallelTasks:null,streamError:null,retryInfo:null,stalled:!1,onConnectedChange:null,onMessagesChange:null,onAgentStatusChange:null,onStreamErrorChange:null};function J_(t){var e,r;if(t._source==="build"){if(t.type==="system"){if(t.subtype==="build_step"||t.subtype==="build_step_done"||t.subtype==="build_gate_resolved")return{status:"working",tool:null,category:"thinking",_source:"build"};if(t.subtype==="build_gate")return{status:"working",tool:null,category:"waiting",_source:"build"};if(t.subtype==="build_end")return{status:"idle",tool:null,category:null,_source:"build"}}if(t.type==="error"&&t.source==="build")return{status:"working",tool:null,category:"thinking",_source:"build"};if(t.type==="assistant"){const n=((e=t.message)==null?void 0:e.content)??[];for(const i of n)if(i.type==="tool_use"){const s=am[i.name]||"thinking";return{status:"working",tool:i.name,category:s,_source:"build"}}if(n.some(i=>i.type==="text"))return{status:"working",tool:null,category:"thinking",_source:"build"}}return null}if(t.type==="assistant"){const n=((r=t.message)==null?void 0:r.content)??[];for(const i of n)if(i.type==="tool_use"){const s=am[i.name]||"thinking";return{status:"working",tool:i.name,category:s}}if(n.some(i=>i.type==="text"))return{status:"working",tool:null,category:"thinking"}}return t.type==="result"?{status:"idle",tool:null,category:null}:null}function Ch(t,e,r){const n=Date.now(),i=Z.agentStatus,s=Z.agentTool;if(Z._idleTimer&&(clearTimeout(Z._idleTimer),Z._idleTimer=null),i==="working"&&(t==="idle"||e!==s)){const a=Z.currentActivity;a&&(a.endTime=n,a.duration=n-a.startTime,Z.activityLog.push(a),Z.activityLog.length>K_&&Z.activityLog.shift())}t==="working"&&e!==s?Z.currentActivity={tool:e,category:r,startTime:n,endTime:null,duration:null}:t==="idle"&&(Z.currentActivity=null),Z.agentStatus=t,Z.agentTool=e,Z.agentCategory=r;const o={status:t,tool:e,category:r,activityLog:Z.activityLog,currentActivity:Z.currentActivity,parallelTasks:Z.parallelTasks};Z.onAgentStatusChange&&Z.onAgentStatusChange({...o}),window.dispatchEvent(new CustomEvent("compose:agent-status",{detail:o}))}function lm(){const t=Z.sourceStatus.build,e=Z.sourceStatus.interactive;(e==null?void 0:e.status)==="working"?Ch(e.status,e.tool,e.category):(t==null?void 0:t.status)==="working"?Ch(t.status,t.tool,t.category):Z._idleTimer=setTimeout(()=>{Z._idleTimer=null,Ch("idle",null,null)},Z_)}function Du(t){var i,s,o,a,l,c;t._source==="build"&&t.type==="system"&&t.parallel&&(t.subtype==="build_step"&&((i=t.stepNum)!=null&&i.toString().startsWith("∥"))?(Z.parallelTasks||(Z.parallelTasks={total:0,completed:0,failed:0,active:0,tasks:{}}),Z.parallelTasks.total++,Z.parallelTasks.active++,Z.parallelTasks.tasks[t.stepId]="working"):t.subtype==="build_step_done"&&((o=(s=Z.parallelTasks)==null?void 0:s.tasks)!=null&&o[t.stepId])?(Z.parallelTasks.active=Math.max(0,Z.parallelTasks.active-1),Z.parallelTasks.completed++,Z.parallelTasks.tasks[t.stepId]="complete"):t.subtype==="build_step_done"&&Z.parallelTasks&&!((a=t.stepNum)!=null&&a.toString().startsWith("∥"))&&(Z.parallelTasks=null)),t._source==="build"&&t.type==="error"&&((c=(l=Z.parallelTasks)==null?void 0:l.tasks)!=null&&c[t.stepId])&&(Z.parallelTasks.active=Math.max(0,Z.parallelTasks.active-1),Z.parallelTasks.failed++,Z.parallelTasks.tasks[t.stepId]="failed");const e=J_(t);if(e){const u=e._source==="build"?"build":"interactive";Z.sourceStatus[u]=e,e.status==="idle"?(Z.parallelTasks=null,lm()):(Z._idleTimer&&(clearTimeout(Z._idleTimer),Z._idleTimer=null),lm())}t.type==="system"&&t.subtype==="init"&&t.session_id&&(Z.sessionId=t.session_id,sessionStorage.setItem(X_,t.session_id));const{include:r,msg:n}=V_(t,fy());r&&(Z.messages=[...Z.messages,n],Z.messages.length>om&&(Z.messages=Z.messages.slice(-om)),Z.onMessagesChange&&Z.onMessagesChange(Z.messages))}function kh(){if(Z.es)return;const t=`${window.location.protocol}//${window.location.hostname}:${py}/api/agent/stream`,e=p_({url:t,namedEvents:["hydrate"],onOpen:()=>{Z.connected=!0,Z.streamError=null,Z.retryInfo=null,Z.stalled=!1,Z.sourceStatus.build=null,Z.onConnectedChange&&Z.onConnectedChange(!0),Z.onStreamErrorChange&&Z.onStreamErrorChange({error:null,retryInfo:null,stalled:!1})},onClose:()=>{Z.connected=!1,Z.onConnectedChange&&Z.onConnectedChange(!1)},onError:r=>{Z.streamError=(r==null?void 0:r.message)||"Connection error",Z.onStreamErrorChange&&Z.onStreamErrorChange({error:Z.streamError,retryInfo:Z.retryInfo,stalled:Z.stalled})},onRetry:r=>{Z.retryInfo=r,Z.onStreamErrorChange&&Z.onStreamErrorChange({error:Z.streamError,retryInfo:r,stalled:Z.stalled})},onStall:()=>{Z.stalled=!0,Z.onStreamErrorChange&&Z.onStreamErrorChange({error:Z.streamError,retryInfo:Z.retryInfo,stalled:!0})},onExhausted:()=>{Z.es=null,Z.retryInfo=null,Z.onStreamErrorChange&&Z.onStreamErrorChange({error:Z.streamError,retryInfo:null,stalled:Z.stalled})},onEvent:(r,n)=>{if((Z.stalled||Z.streamError)&&(Z.stalled=!1,Z.streamError=null,Z.retryInfo=null,Z.onStreamErrorChange&&Z.onStreamErrorChange({error:null,retryInfo:null,stalled:!1})),n==="hydrate"){if(Array.isArray(r))for(const i of r)Du(i);return}Du(r)},maxBackoffMs:8e3,maxRetries:5,stallTimeoutMs:my});Z.es=e}async function vh(t,e){const r=await fetch(`${window.location.protocol}//${window.location.hostname}:${py}${t}`,{method:"POST",headers:{"Content-Type":"application/json","x-compose-token":""},body:JSON.stringify(e)});if(!r.ok){const n=await r.json().catch(()=>({error:r.statusText}));throw new Error(n.error||r.statusText)}return r.json()}function cm(t){if(!t)return"";if(t<1e3)return"<1s";const e=Math.floor(t/1e3);return e<60?`${e}s`:`${Math.floor(e/60)}m ${e%60}s`}function gy(){var L;const[t,e]=C.useState(Z.connected),[r,n]=C.useState(Z.messages),[i,s]=C.useState({status:Z.agentStatus,tool:Z.agentTool,category:Z.agentCategory,activityLog:Z.activityLog,currentActivity:Z.currentActivity}),[o,a]=C.useState(!1),[l,c]=C.useState(null),[u,d]=C.useState({error:Z.streamError,retryInfo:Z.retryInfo,stalled:Z.stalled}),p=C.useRef(null),f=C.useRef(null),m=C.useRef(!1),x=r.length===0||r.every(M=>M.type==="system"&&(M.subtype==="init"||M.subtype==="connected"));C.useEffect(()=>(Z.onConnectedChange=e,Z.onMessagesChange=n,Z.onAgentStatusChange=s,Z.onStreamErrorChange=d,()=>{Z.onConnectedChange=null,Z.onMessagesChange=null,Z.onAgentStatusChange=null,Z.onStreamErrorChange=null}),[]),C.useEffect(()=>{kh()},[]);const g=C.useCallback(()=>{const M=f.current;if(!M)return;const N=M.scrollHeight-M.scrollTop-M.clientHeight<48;m.current=!N},[]);C.useEffect(()=>{var M;m.current||(M=p.current)==null||M.scrollIntoView({behavior:"smooth"})},[r.length]),C.useEffect(()=>{if(i.status!=="working"||!i.currentActivity){c(null);return}const M=i.currentActivity.startTime,N=()=>c(Date.now()-M);N();const P=setInterval(N,1e3);return()=>clearInterval(P)},[i.status,(L=i.currentActivity)==null?void 0:L.startTime]);const y=C.useCallback(async M=>{a(!0);const N=M.match(/[A-Z]+-\d+/);N&&window.dispatchEvent(new CustomEvent("compose:select-feature",{detail:{featureCode:N[0]}}));try{x||!Z.sessionId?await vh("/api/agent/session",{prompt:M}):await vh("/api/agent/message",{prompt:M})}catch(P){Du({type:"error",message:`Failed to send: ${P.message}`})}finally{a(!1)}},[x]),b=C.useCallback(async()=>{try{await vh("/api/agent/interrupt",{})}catch{}},[]),k=t&&(i.status==="working"||o),T=t?k?"#fbbf24":"hsl(var(--success, 142 60% 50%))":"hsl(var(--destructive))",_=i.category?Q_[i.category]:null,w=t?k?_||"working":"ready":"offline",E=i.activityLog||[];return h.jsxs("div",{className:"relative w-full h-full flex flex-col",style:{background:"hsl(var(--background))"},children:[h.jsxs("div",{className:"shrink-0 flex items-center justify-between px-3 py-1.5",style:{borderBottom:"1px solid hsl(var(--border) / 0.5)"},children:[h.jsx("div",{className:"flex items-center gap-0.5",children:t&&E.length>0&&E.slice(-5).map((M,N)=>h.jsx("div",{className:"h-1 rounded-full",title:`${M.tool||"thinking"} — ${cm(M.duration)}`,style:{width:Math.max(6,Math.min(20,(M.duration||0)/1e3*2)),background:"hsl(var(--muted-foreground))",opacity:.25+N/5*.5}},N))}),h.jsxs("div",{className:"flex items-center gap-1.5",children:[k&&h.jsx("button",{onClick:b,title:"Interrupt",className:"text-[10px] px-1.5 py-0.5 rounded",style:{background:"hsl(var(--destructive) / 0.15)",color:"hsl(var(--destructive))",border:"1px solid hsl(var(--destructive) / 0.3)",cursor:"pointer"},children:"stop"}),h.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{background:T,animation:k?"pulse 1.5s ease-in-out infinite":"none"}}),h.jsx("span",{className:"text-[10px] uppercase tracking-wider",style:{color:k?"#fbbf24":"hsl(var(--muted-foreground))"},children:w}),k&&i.tool&&h.jsx("span",{className:"text-[10px] font-mono",style:{color:"hsl(var(--muted-foreground))"},children:i.tool}),k&&l!=null&&h.jsx("span",{className:"text-[10px] tabular-nums",style:{color:"hsl(var(--muted-foreground))",opacity:.6},children:cm(l)})]})]}),h.jsxs("div",{ref:f,onScroll:g,className:"flex-1 min-h-0 overflow-y-auto px-3 py-2",style:{scrollBehavior:"smooth"},children:[r.length===0&&h.jsxs("div",{className:"flex flex-col items-center justify-center h-full gap-3 opacity-40",children:[h.jsx("span",{className:"text-2xl",children:"⬡"}),h.jsx("span",{className:"text-xs uppercase tracking-widest",style:{color:"hsl(var(--muted-foreground))"},children:t?"ready":"connecting…"})]}),Y_(r).map((M,N)=>h.jsx(q_,{msg:M},M.uuid||N)),h.jsx("div",{ref:p})]}),!t&&h.jsx("div",{className:"absolute inset-0 z-20 flex items-center justify-center pointer-events-none",style:{background:"hsl(var(--background) / 0.7)",backdropFilter:"blur(2px)"},children:h.jsxs("div",{className:"flex flex-col items-center gap-3",role:"status","aria-live":"polite",children:[h.jsx("div",{className:"w-5 h-5 rounded-full animate-spin",style:{border:"2px solid hsl(var(--accent) / 0.2)",borderTopColor:"hsl(var(--accent))"}}),h.jsx("span",{className:"text-xs",style:{color:"hsl(var(--muted-foreground))"},children:u.retryInfo?`Retrying… ${u.retryInfo.attempt}/${u.retryInfo.maxRetries}`:"connecting to agent server…"}),u.error&&h.jsx("span",{className:"text-[10px]",style:{color:"hsl(var(--destructive))"},children:u.error}),!Z.es&&u.error&&h.jsx("button",{onClick:()=>{Z.streamError=null,Z.retryInfo=null,Z.stalled=!1,d({error:null,retryInfo:null,stalled:!1}),kh()},className:"pointer-events-auto px-3 py-1 rounded text-[11px] font-medium",style:{background:"hsl(var(--accent) / 0.15)",border:"1px solid hsl(var(--accent) / 0.3)",color:"hsl(var(--accent-foreground))",cursor:"pointer"},children:"Reconnect"})]})}),t&&(u.error||u.stalled)&&h.jsx("div",{role:"status","aria-live":"polite",className:"shrink-0 flex items-center gap-2 px-3 py-1.5 text-[11px]",style:{background:u.stalled?"hsl(45 93% 47% / 0.1)":"hsl(var(--destructive) / 0.1)",borderBottom:`1px solid ${u.stalled?"hsl(45 93% 47% / 0.2)":"hsl(var(--destructive) / 0.2)"}`,color:u.stalled?"hsl(45 93% 47%)":"hsl(var(--destructive))"},children:u.stalled?h.jsxs(h.Fragment,{children:[h.jsxs("span",{children:["No data received for ",my/1e3,"s — connection may be stalled."]}),h.jsx("button",{onClick:()=>{Z.es&&(Z.es.close(),Z.es=null),Z.connected=!1,Z.onConnectedChange&&Z.onConnectedChange(!1),Z.streamError=null,Z.retryInfo=null,Z.stalled=!1,d({error:null,retryInfo:null,stalled:!1}),kh()},className:"ml-auto px-2 py-0.5 rounded text-[10px] font-medium",style:{background:"hsl(45 93% 47% / 0.15)",border:"1px solid hsl(45 93% 47% / 0.3)",cursor:"pointer"},children:"Reconnect"})]}):h.jsx("span",{children:u.error})}),h.jsx(H_,{onSend:y,disabled:k||!t,placeholder:k?"Working…":"Message Claude…"})]})}function tE(t,e){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const eE=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rE=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,nE={};function hm(t,e){return(nE.jsx?rE:eE).test(t)}const iE=/[ \t\n\f\r]/g;function sE(t){return typeof t=="object"?t.type==="text"?um(t.value):!1:um(t)}function um(t){return t.replace(iE,"")===""}class ga{constructor(e,r,n){this.normal=r,this.property=e,n&&(this.space=n)}}ga.prototype.normal={};ga.prototype.property={};ga.prototype.space=void 0;function xy(t,e){const r={},n={};for(const i of t)Object.assign(r,i.property),Object.assign(n,i.normal);return new ga(r,n,e)}function Ou(t){return t.toLowerCase()}class xr{constructor(e,r){this.attribute=r,this.property=e}}xr.prototype.attribute="";xr.prototype.booleanish=!1;xr.prototype.boolean=!1;xr.prototype.commaOrSpaceSeparated=!1;xr.prototype.commaSeparated=!1;xr.prototype.defined=!1;xr.prototype.mustUseProperty=!1;xr.prototype.number=!1;xr.prototype.overloadedBoolean=!1;xr.prototype.property="";xr.prototype.spaceSeparated=!1;xr.prototype.space=void 0;let oE=0;const Wt=Mi(),Ne=Mi(),Ru=Mi(),ct=Mi(),ce=Mi(),Ci=Mi(),vr=Mi();function Mi(){return 2**++oE}const $u=Object.freeze(Object.defineProperty({__proto__:null,boolean:Wt,booleanish:Ne,commaOrSpaceSeparated:vr,commaSeparated:Ci,number:ct,overloadedBoolean:Ru,spaceSeparated:ce},Symbol.toStringTag,{value:"Module"})),wh=Object.keys($u);class uf extends xr{constructor(e,r,n,i){let s=-1;if(super(e,r),dm(this,"space",i),typeof n=="number")for(;++s<wh.length;){const o=wh[s];dm(this,wh[s],(n&$u[o])===$u[o])}}}uf.prototype.defined=!0;function dm(t,e,r){r&&(t[e]=r)}function Gs(t){const e={},r={};for(const[n,i]of Object.entries(t.properties)){const s=new uf(n,t.transform(t.attributes||{},n),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(n)&&(s.mustUseProperty=!0),e[n]=s,r[Ou(n)]=n,r[Ou(s.attribute)]=n}return new ga(e,r,t.space)}const yy=Gs({properties:{ariaActiveDescendant:null,ariaAtomic:Ne,ariaAutoComplete:null,ariaBusy:Ne,ariaChecked:Ne,ariaColCount:ct,ariaColIndex:ct,ariaColSpan:ct,ariaControls:ce,ariaCurrent:null,ariaDescribedBy:ce,ariaDetails:null,ariaDisabled:Ne,ariaDropEffect:ce,ariaErrorMessage:null,ariaExpanded:Ne,ariaFlowTo:ce,ariaGrabbed:Ne,ariaHasPopup:null,ariaHidden:Ne,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ce,ariaLevel:ct,ariaLive:null,ariaModal:Ne,ariaMultiLine:Ne,ariaMultiSelectable:Ne,ariaOrientation:null,ariaOwns:ce,ariaPlaceholder:null,ariaPosInSet:ct,ariaPressed:Ne,ariaReadOnly:Ne,ariaRelevant:null,ariaRequired:Ne,ariaRoleDescription:ce,ariaRowCount:ct,ariaRowIndex:ct,ariaRowSpan:ct,ariaSelected:Ne,ariaSetSize:ct,ariaSort:null,ariaValueMax:ct,ariaValueMin:ct,ariaValueNow:ct,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function by(t,e){return e in t?t[e]:e}function Cy(t,e){return by(t,e.toLowerCase())}const aE=Gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ci,acceptCharset:ce,accessKey:ce,action:null,allow:null,allowFullScreen:Wt,allowPaymentRequest:Wt,allowUserMedia:Wt,alpha:Wt,alt:null,as:null,async:Wt,autoCapitalize:null,autoComplete:ce,autoFocus:Wt,autoPlay:Wt,blocking:ce,capture:null,charSet:null,checked:Wt,cite:null,className:ce,closedBy:null,colorSpace:null,cols:ct,colSpan:ct,command:null,commandFor:null,content:null,contentEditable:Ne,controls:Wt,controlsList:ce,coords:ct|Ci,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Wt,defer:Wt,dir:null,dirName:null,disabled:Wt,download:Ru,draggable:Ne,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Wt,formTarget:null,headers:ce,height:ct,hidden:Ru,high:ct,href:null,hrefLang:null,htmlFor:ce,httpEquiv:ce,id:null,imageSizes:null,imageSrcSet:null,inert:Wt,inputMode:null,integrity:null,is:null,isMap:Wt,itemId:null,itemProp:ce,itemRef:ce,itemScope:Wt,itemType:ce,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Wt,low:ct,manifest:null,max:null,maxLength:ct,media:null,method:null,min:null,minLength:ct,multiple:Wt,muted:Wt,name:null,nonce:null,noModule:Wt,noValidate:Wt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Wt,optimum:ct,pattern:null,ping:ce,placeholder:null,playsInline:Wt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Wt,referrerPolicy:null,rel:ce,required:Wt,reversed:Wt,rows:ct,rowSpan:ct,sandbox:ce,scope:null,scoped:Wt,seamless:Wt,selected:Wt,shadowRootClonable:Wt,shadowRootCustomElementRegistry:Wt,shadowRootDelegatesFocus:Wt,shadowRootMode:null,shadowRootSerializable:Wt,shape:null,size:ct,sizes:null,slot:null,span:ct,spellCheck:Ne,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ct,step:null,style:null,tabIndex:ct,target:null,title:null,translate:null,type:null,typeMustMatch:Wt,useMap:null,value:Ne,width:ct,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ce,axis:null,background:null,bgColor:null,border:ct,borderColor:null,bottomMargin:ct,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Wt,declare:Wt,event:null,face:null,frame:null,frameBorder:null,hSpace:ct,leftMargin:ct,link:null,longDesc:null,lowSrc:null,marginHeight:ct,marginWidth:ct,noResize:Wt,noHref:Wt,noShade:Wt,noWrap:Wt,object:null,profile:null,prompt:null,rev:null,rightMargin:ct,rules:null,scheme:null,scrolling:Ne,standby:null,summary:null,text:null,topMargin:ct,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ct,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Wt,disablePictureInPicture:Wt,disableRemotePlayback:Wt,exportParts:Ci,part:ce,prefix:null,property:null,results:ct,security:null,unselectable:null},space:"html",transform:Cy}),lE=Gs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:vr,accentHeight:ct,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ct,amplitude:ct,arabicForm:null,ascent:ct,attributeName:null,attributeType:null,azimuth:ct,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ct,by:null,calcMode:null,capHeight:ct,className:ce,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ct,diffuseConstant:ct,direction:null,display:null,dur:null,divisor:ct,dominantBaseline:null,download:Wt,dx:null,dy:null,edgeMode:null,editable:null,elevation:ct,enableBackground:null,end:null,event:null,exponent:ct,externalResourcesRequired:null,fill:null,fillOpacity:ct,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ci,g2:Ci,glyphName:Ci,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ct,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ct,horizOriginX:ct,horizOriginY:ct,id:null,ideographic:ct,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ct,k:ct,k1:ct,k2:ct,k3:ct,k4:ct,kernelMatrix:vr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ct,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ct,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ct,overlineThickness:ct,paintOrder:null,panose1:null,path:null,pathLength:ct,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ce,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ct,pointsAtY:ct,pointsAtZ:ct,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vr,rev:vr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vr,requiredFeatures:vr,requiredFonts:vr,requiredFormats:vr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ct,specularExponent:ct,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ct,strikethroughThickness:ct,string:null,stroke:null,strokeDashArray:vr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ct,strokeOpacity:ct,strokeWidth:null,style:null,surfaceScale:ct,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vr,tabIndex:ct,tableValues:null,target:null,targetX:ct,targetY:ct,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ct,underlineThickness:ct,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ct,values:null,vAlphabetic:ct,vMathematical:ct,vectorEffect:null,vHanging:ct,vIdeographic:ct,version:null,vertAdvY:ct,vertOriginX:ct,vertOriginY:ct,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ct,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:by}),ky=Gs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),vy=Gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Cy}),wy=Gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),cE={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},hE=/[A-Z]/g,fm=/-[a-z]/g,uE=/^data[-\w.:]+$/i;function dE(t,e){const r=Ou(e);let n=e,i=xr;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&uE.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(fm,pE);n="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!fm.test(s)){let o=s.replace(hE,fE);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}i=uf}return new i(n,e)}function fE(t){return"-"+t.toLowerCase()}function pE(t){return t.charAt(1).toUpperCase()}const mE=xy([yy,aE,ky,vy,wy],"html"),df=xy([yy,lE,ky,vy,wy],"svg");function gE(t){return t.join(" ").trim()}var qi={},Sh,pm;function xE(){if(pm)return Sh;pm=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,r=/^\s*/,n=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,a=/^\s+|\s+$/g,l=`
@@ -641,8 +641,8 @@ Please report this to https://github.com/markedjs/marked.`,e){let i="<p>An error
641
641
  L0,20`)},"requirement_arrow"),S9=v((t,e,r)=>{const n=be(),{themeVariables:i}=n,{strokeWidth:s}=i;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${s}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
642
642
  L20,10
643
643
  M20,10
644
- L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),T9=v((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),_9=v((t,e,r)=>{const n=be(),{themeVariables:i}=n,{strokeWidth:s}=i,o=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),E9={extension:s9,composition:o9,aggregation:a9,dependency:l9,lollipop:c9,point:h9,circle:u9,cross:d9,barb:f9,barbNeo:p9,only_one:m9,zero_or_one:g9,one_or_more:x9,zero_or_more:y9,only_one_neo:b9,zero_or_one_neo:C9,one_or_more_neo:k9,zero_or_more_neo:v9,requirement_arrow:w9,requirement_contains:T9,requirement_arrow_neo:S9,requirement_contains_neo:_9},N9=i9,j9={common:wa,getConfig:be,insertCluster:_8,insertEdge:n9,insertEdgeLabel:Z8,insertMarkers:N9,insertNode:$2,interpolateToCurve:vp,labelHelper:Mt,log:tt,positionEdgeLabel:Q8},da={},H2=v(t=>{for(const e of t)da[e.name]=e},"registerLayoutLoaders"),L9=v(()=>{H2([{name:"dagre",loader:v(async()=>await Jt(()=>import("./dagre-BM42HDAG-D27D6YAL.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:v(async()=>await Jt(()=>import("./cose-bilkent-S5V4N54A-fNQlSmHt.js"),__vite__mapDeps([8,7,3,4,5,6])),"loader")}])},"registerDefaultLayoutLoaders");L9();var qZ=v(async(t,e)=>{if(!(t.layoutAlgorithm in da))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const u of t.nodes){const d=u.domId||u.id;u.domId=`${t.diagramId}-${d}`}const r=da[t.layoutAlgorithm],n=await r.loader(),{theme:i,themeVariables:s}=t.config,{useGradient:o,gradientStart:a,gradientStop:l}=s,c=e.attr("id");if(e.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i!=null&&i.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i!=null&&i.includes("dark")?"#FFFFFF":"#000000"}`),o){const u=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return n.render(t,e,j9,{algorithm:r.algorithm})},"render"),HZ=v((t="",{fallback:e="dagre"}={})=>{if(t in da)return t;if(e in da)return tt.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),qp="comm",U2="rule",G2="decl",B9="@media",A9="@import",M9="@supports",I9="@namespace",Ud="@keyframes",V2="@layer",F9="@scope",P9=Math.abs,Ko=String.fromCharCode;function Y2(t){return t.trim()}function Gd(t,e,r){return t.replace(e,r)}function gs(t,e){return t.charCodeAt(e)|0}function Hs(t,e,r){return t.slice(e,r)}function nn(t){return t.length}function X2(t){return t.length}function nl(t,e){return e.push(t),t}var ah=1,Us=1,K2=0,Mr=0,je=0,Qs="";function Hp(t,e,r,n,i,s,o,a){return{value:t,root:e,parent:r,type:n,props:i,children:s,line:ah,column:Us,length:o,return:"",siblings:a}}function D9(){return je}function O9(){return je=Mr>0?gs(Qs,--Mr):0,Us--,je===10&&(Us=1,ah--),je}function Ur(){return je=Mr<K2?gs(Qs,Mr++):0,Us++,je===10&&(Us=1,ah++),je}function qn(){return gs(Qs,Mr)}function Ll(){return Mr}function lh(t,e){return Hs(Qs,t,e)}function fa(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R9(t){return ah=Us=1,K2=nn(Qs=t),Mr=0,[]}function $9(t){return Qs="",t}function pu(t){return Y2(lh(Mr-1,Vd(t===91?t+2:t===40?t+1:t)))}function z9(t){for(;(je=qn())&&je<33;)Ur();return fa(t)>2||fa(je)>3?"":" "}function W9(t,e){for(;--e&&Ur()&&!(je<48||je>102||je>57&&je<65||je>70&&je<97););return lh(t,Ll()+(e<6&&qn()==32&&Ur()==32))}function Vd(t){for(;Ur();)switch(je){case t:return Mr;case 34:case 39:t!==34&&t!==39&&Vd(je);break;case 40:t===41&&Vd(t);break;case 92:Ur();break}return Mr}function q9(t,e){for(;Ur()&&t+je!==57;)if(t+je===84&&qn()===47)break;return"/*"+lh(e,Mr-1)+"*"+Ko(t===47?t:Ur())}function H9(t){for(;!fa(qn());)Ur();return lh(t,Mr)}function U9(t){return $9(Bl("",null,null,null,[""],t=R9(t),0,[0],t))}function Bl(t,e,r,n,i,s,o,a,l){for(var c=0,u=0,d=o,p=0,f=0,m=0,x=1,g=1,y=1,b=0,k=0,T="",_=i,w=s,E=n,L=T;g;)switch(m=k,k=Ur()){case 40:m!=108&&gs(L,d-1)==58?(b++,L+="("):L+=pu(k);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=pu(k);break;case 9:case 10:case 13:case 32:if(b>0){L+=Ko(k);break}L+=z9(m);break;case 92:L+=W9(Ll()-1,7);continue;case 47:switch(qn()){case 42:case 47:nl(G9(q9(Ur(),Ll()),e,r,l),l),(fa(m||1)==5||fa(qn()||1)==5)&&nn(L)&&Hs(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*x:a[c++]=nn(L)*y;case 125*x:case 59:case 0:if(b>0&&k){L+=Ko(k);break}switch(k){case 0:case 125:g=0;case 59+u:y==-1&&(L=Gd(L,/\f/g,"")),f>0&&(nn(L)-d||x===0)&&nl(f>32?t0(L+";",n,r,d-1,l):t0(Gd(L," ","")+";",n,r,d-2,l),l);break;case 59:L+=";";default:if(nl(E=Jx(L,e,r,c,u,i,a,T,_=[],w=[],d,s),s),k===123)if(u===0)Bl(L,e,E,E,_,s,d,a,w);else{switch(p){case 99:if(gs(L,3)===110)break;case 108:if(gs(L,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Bl(t,E,E,n&&nl(Jx(t,E,E,0,0,i,a,T,i,_=[],d,w),w),i,w,d,a,n?_:w):Bl(L,E,E,E,[""],w,0,a,w)}}c=u=f=0,x=y=1,T=L="",d=o;break;case 58:d=1+nn(L),f=m;default:if(x<1){if(k==123)--x;else if(k==125&&x++==0&&O9()==125)continue}switch(L+=Ko(k),k*x){case 38:y=u>0?1:(L+="\f",-1);break;case 44:if(b>0)break;a[c++]=(nn(L)-1)*y,y=1;break;case 64:qn()===45&&(L+=pu(Ur())),p=qn(),u=d=nn(T=L+=H9(Ll())),k++;break;case 45:m===45&&nn(L)==2&&(x=0)}}return s}function Jx(t,e,r,n,i,s,o,a,l,c,u,d){for(var p=i-1,f=i===0?s:[""],m=X2(f),x=0,g=0,y=0;x<n;++x)for(var b=0,k=Hs(t,p+1,p=P9(g=o[x])),T=t;b<m;++b)(T=Y2(g>0?f[b]+" "+k:Gd(k,/&\f/g,f[b])))&&(l[y++]=T);return Hp(t,e,r,i===0?U2:a,l,c,u,d)}function G9(t,e,r,n){return Hp(t,e,r,qp,Ko(D9()),Hs(t,2,-2),0,n)}function t0(t,e,r,n,i){return Hp(t,e,r,G2,Hs(t,0,n),Hs(t,n+1,-1),n,i)}function Yd(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function V9(t,e,r,n){switch(t.type){case V2:if(t.children.length)break;case A9:case I9:case G2:return t.return=t.return||t.value;case qp:return"";case Ud:return t.return=t.value+"{"+Yd(t.children,n)+"}";case U2:if(!nn(t.value=t.props.join(",")))return""}return nn(r=Yd(t.children,n))?t.return=t.value+"{"+r+"}":""}function Y9(t){var e=X2(t);return function(r,n,i,s){for(var o="",a=0;a<e;a++)o+=t[a](r,n,i,s)||"";return o}}var Z2="c4",X9=v(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),K9=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./c4Diagram-AAUBKEIU-D6LE8-j8.js");return{diagram:e}},__vite__mapDeps([9,10,3,4,5,6,7]));return{id:Z2,diagram:t}},"loader"),Z9={id:Z2,detector:X9,loader:K9},Q9=Z9,Q2="flowchart",J9=v((t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),t7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-HFUno_nV.js");return{diagram:e}},__vite__mapDeps([11,12,10,13,14,15,3,4,5,6,7]));return{id:Q2,diagram:t}},"loader"),e7={id:Q2,detector:J9,loader:t7},r7=e7,J2="flowchart-v2",n7=v((t,e)=>{var r,n,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),i7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-HFUno_nV.js");return{diagram:e}},__vite__mapDeps([11,12,10,13,14,15,3,4,5,6,7]));return{id:J2,diagram:t}},"loader"),s7={id:J2,detector:n7,loader:i7},o7=s7,tS="er",a7=v(t=>/^\s*erDiagram/.test(t),"detector"),l7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./erDiagram-TEJ5UH35-nd3GWiPn.js");return{diagram:e}},__vite__mapDeps([16,13,14,15,3,4,5,6,7]));return{id:tS,diagram:t}},"loader"),c7={id:tS,detector:a7,loader:l7},h7=c7,eS="gitGraph",u7=v(t=>/^\s*gitGraph/.test(t),"detector"),d7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./gitGraphDiagram-PVQCEYII-NBq1F6K2.js");return{diagram:e}},__vite__mapDeps([17,18,19,20,5,3,4,6,7]));return{id:eS,diagram:t}},"loader"),f7={id:eS,detector:u7,loader:d7},p7=f7,rS="gantt",m7=v(t=>/^\s*gantt/.test(t),"detector"),g7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./ganttDiagram-6RSMTGT7-CPPAAjwR.js");return{diagram:e}},__vite__mapDeps([21,3,4,22,23,24,5,6,7]));return{id:rS,diagram:t}},"loader"),x7={id:rS,detector:m7,loader:g7},y7=x7,nS="info",b7=v(t=>/^\s*info/.test(t),"detector"),C7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./infoDiagram-5YYISTIA-D-TOBtCq.js");return{diagram:e}},__vite__mapDeps([25,20,5,3,4,6,7]));return{id:nS,diagram:t}},"loader"),k7={id:nS,detector:b7,loader:C7},iS="pie",v7=v(t=>/^\s*pie/.test(t),"detector"),w7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./pieDiagram-4H26LBE5-C5fvCej-.js");return{diagram:e}},__vite__mapDeps([26,18,20,5,3,4,6,27,28,23,7]));return{id:iS,diagram:t}},"loader"),S7={id:iS,detector:v7,loader:w7},sS="quadrantChart",T7=v(t=>/^\s*quadrantChart/.test(t),"detector"),_7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./quadrantDiagram-W4KKPZXB-4NoQsF61.js");return{diagram:e}},__vite__mapDeps([29,22,23,24,3,4,5,6,7]));return{id:sS,diagram:t}},"loader"),E7={id:sS,detector:T7,loader:_7},N7=E7,oS="xychart",j7=v(t=>/^\s*xychart(-beta)?/.test(t),"detector"),L7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./xychartDiagram-2RQKCTM6-D42FcVOY.js");return{diagram:e}},__vite__mapDeps([30,23,28,22,24,3,4,5,6,7]));return{id:oS,diagram:t}},"loader"),B7={id:oS,detector:j7,loader:L7},A7=B7,aS="requirement",M7=v(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),I7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./requirementDiagram-4Y6WPE33-q5WxB9LO.js");return{diagram:e}},__vite__mapDeps([31,13,14,3,4,5,6,7]));return{id:aS,diagram:t}},"loader"),F7={id:aS,detector:M7,loader:I7},P7=F7,lS="sequence",D7=v(t=>/^\s*sequenceDiagram/.test(t),"detector"),O7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./sequenceDiagram-3UESZ5HK-BzHclOKt.js");return{diagram:e}},__vite__mapDeps([32,10,19,3,4,5,6,7]));return{id:lS,diagram:t}},"loader"),R7={id:lS,detector:D7,loader:O7},$7=R7,cS="class",z7=v((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),W7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./classDiagram-4FO5ZUOK-mSW5R7DY.js");return{diagram:e}},__vite__mapDeps([33,34,12,10,13,14,3,4,5,6,7]));return{id:cS,diagram:t}},"loader"),q7={id:cS,detector:z7,loader:W7},H7=q7,hS="classDiagram",U7=v((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),G7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./classDiagram-v2-Q7XG4LA2-mSW5R7DY.js");return{diagram:e}},__vite__mapDeps([35,34,12,10,13,14,3,4,5,6,7]));return{id:hS,diagram:t}},"loader"),V7={id:hS,detector:U7,loader:G7},Y7=V7,uS="state",X7=v((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),K7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./stateDiagram-AJRCARHV-BvWRI9zK.js");return{diagram:e}},__vite__mapDeps([36,37,13,14,1,2,3,4,5,6,7]));return{id:uS,diagram:t}},"loader"),Z7={id:uS,detector:X7,loader:K7},Q7=Z7,dS="stateDiagram",J7=v((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),tW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./stateDiagram-v2-BHNVJYJU-CDlF0VA8.js");return{diagram:e}},__vite__mapDeps([38,37,13,14,3,4,5,6,7]));return{id:dS,diagram:t}},"loader"),eW={id:dS,detector:J7,loader:tW},rW=eW,fS="journey",nW=v(t=>/^\s*journey/.test(t),"detector"),iW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./journeyDiagram-JHISSGLW-Bko3tTdh.js");return{diagram:e}},__vite__mapDeps([39,12,10,27,3,4,5,6,7]));return{id:fS,diagram:t}},"loader"),sW={id:fS,detector:nW,loader:iW},oW=sW,aW=v((t,e,r)=>{tt.debug(`rendering svg for syntax error
645
- `);const n=WR(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),U1(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),pS={draw:aW},lW=pS,cW={db:{},renderer:pS,parser:{parse:v(()=>{},"parse")}},hW=cW,mS="flowchart-elk",uW=v((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),dW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-HFUno_nV.js");return{diagram:e}},__vite__mapDeps([11,12,10,13,14,15,3,4,5,6,7]));return{id:mS,diagram:t}},"loader"),fW={id:mS,detector:uW,loader:dW},pW=fW,gS="timeline",mW=v(t=>/^\s*timeline/.test(t),"detector"),gW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./timeline-definition-PNZ67QCA-j2wKjAti.js");return{diagram:e}},__vite__mapDeps([40,27,3,4,5,6,7]));return{id:gS,diagram:t}},"loader"),xW={id:gS,detector:mW,loader:gW},yW=xW,xS="mindmap",bW=v(t=>/^\s*mindmap/.test(t),"detector"),CW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./mindmap-definition-RKZ34NQL-CNwNkDqN.js");return{diagram:e}},__vite__mapDeps([41,13,14,3,4,5,6,7]));return{id:xS,diagram:t}},"loader"),kW={id:xS,detector:bW,loader:CW},vW=kW,yS="kanban",wW=v(t=>/^\s*kanban/.test(t),"detector"),SW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./kanban-definition-UN3LZRKU-1e-7i8st.js");return{diagram:e}},__vite__mapDeps([42,12,3,4,5,6,7]));return{id:yS,diagram:t}},"loader"),TW={id:yS,detector:wW,loader:SW},_W=TW,bS="sankey",EW=v(t=>/^\s*sankey(-beta)?/.test(t),"detector"),NW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./sankeyDiagram-5OEKKPKP-DlQNB367.js");return{diagram:e}},__vite__mapDeps([43,28,23,3,4,5,6,7]));return{id:bS,diagram:t}},"loader"),jW={id:bS,detector:EW,loader:NW},LW=jW,CS="packet",BW=v(t=>/^\s*packet(-beta)?/.test(t),"detector"),AW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-LMA3HP47-DAYJMc2I.js");return{diagram:e}},__vite__mapDeps([44,18,20,5,3,4,6,7]));return{id:CS,diagram:t}},"loader"),MW={id:CS,detector:BW,loader:AW},kS="radar",IW=v(t=>/^\s*radar-beta/.test(t),"detector"),FW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-2AECGRRQ-CtXeohzN.js");return{diagram:e}},__vite__mapDeps([45,18,20,5,3,4,6,7]));return{id:kS,diagram:t}},"loader"),PW={id:kS,detector:IW,loader:FW},vS="block",DW=v(t=>/^\s*block(-beta)?/.test(t),"detector"),OW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./blockDiagram-GPEHLZMM-B4w0mOAJ.js");return{diagram:e}},__vite__mapDeps([46,12,1,15,3,4,5,6,7]));return{id:vS,diagram:t}},"loader"),RW={id:vS,detector:DW,loader:OW},$W=RW,wS="treeView",zW=v(t=>/^\s*treeView-beta/.test(t),"detector"),WW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-5GNKFQAL-C_BqZkx0.js");return{diagram:e}},__vite__mapDeps([47,18,19,20,5,3,4,6,7]));return{id:wS,diagram:t}},"loader"),qW={id:wS,detector:zW,loader:WW},HW=qW,SS="architecture",UW=v(t=>/^\s*architecture/.test(t),"detector"),GW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./architectureDiagram-3BPJPVTR-D722w0RE.js");return{diagram:e}},__vite__mapDeps([48,18,20,5,3,4,6,7]));return{id:SS,diagram:t}},"loader"),VW={id:SS,detector:UW,loader:GW},YW=VW,TS="eventmodeling",XW=v(t=>/^\s*eventmodeling/.test(t),"detector"),KW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-KO2AKTUF-B29ynQz4.js");return{diagram:e}},__vite__mapDeps([49,18,20,5,3,4,6,7]));return{id:TS,diagram:t}},"loader"),ZW={id:TS,detector:XW,loader:KW},QW=ZW,_S="ishikawa",JW=v(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),tq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./ishikawaDiagram-YF4QCWOH-nXOztZiZ.js");return{diagram:e}},__vite__mapDeps([50,3,4,5,6,7]));return{id:_S,diagram:t}},"loader"),eq={id:_S,detector:JW,loader:tq},ES="venn",rq=v(t=>/^\s*venn-beta/.test(t),"detector"),nq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./vennDiagram-CIIHVFJN-B77g7htC.js");return{diagram:e}},__vite__mapDeps([51,3,4,5,6,7]));return{id:ES,diagram:t}},"loader"),iq={id:ES,detector:rq,loader:nq},sq=iq,NS="treemap",oq=v(t=>/^\s*treemap/.test(t),"detector"),aq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-OG6HWLK6-CBJMis3l.js");return{diagram:e}},__vite__mapDeps([52,14,18,20,5,3,4,6,24,28,23,7]));return{id:NS,diagram:t}},"loader"),lq={id:NS,detector:oq,loader:aq},jS="wardley-beta",cq=v(t=>/^\s*wardley-beta/i.test(t),"detector"),hq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./wardleyDiagram-YWT4CUSO-CK-XB-bO.js");return{diagram:e}},__vite__mapDeps([53,18,20,5,3,4,6,7]));return{id:jS,diagram:t}},"loader"),uq={id:jS,detector:cq,loader:hq},dq=uq,e0=!1,ch=v(()=>{e0||(e0=!0,Jl("error",hW,t=>t.toLowerCase().trim()==="error"),Jl("---",{db:{clear:v(()=>{},"clear")},styles:{},renderer:{draw:v(()=>{},"draw")},parser:{parse:v(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:v(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Ju(pW,vW,YW),Ju(Q9,_W,Y7,H7,h7,y7,k7,S7,P7,$7,o7,r7,yW,p7,rW,Q7,oW,N7,LW,MW,A7,$W,QW,HW,PW,eq,lq,sq,dq))},"addDiagrams"),fq=v(async()=>{tt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Ti).map(async([r,{detector:n,loader:i}])=>{if(i)try{id(r)}catch{try{const{diagram:s,id:o}=await i();Jl(o,s,n)}catch(s){throw tt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ti[r],s}}}))).filter(r=>r.status==="rejected");if(e.length>0){tt.error(`Failed to load ${e.length} external diagrams`);for(const r of e)tt.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),pq="graphics-document document";function LS(t,e){t.attr("role",pq),e!==""&&t.attr("aria-roledescription",e)}v(LS,"setA11yDiagramInfo");function BS(t,e,r,n){if(t.insert!==void 0){if(r){const i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}v(BS,"addSVGa11yTitleDescription");var vi,Xd=(vi=class{constructor(e,r,n,i,s){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=s}static async fromText(e,r={}){var c,u;const n=be(),i=Gf(e,n);e=G6(e)+`
644
+ L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),T9=v((t,e,r)=>{const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),_9=v((t,e,r)=>{const n=be(),{themeVariables:i}=n,{strokeWidth:s}=i,o=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${s}`)},"requirement_contains_neo"),E9={extension:s9,composition:o9,aggregation:a9,dependency:l9,lollipop:c9,point:h9,circle:u9,cross:d9,barb:f9,barbNeo:p9,only_one:m9,zero_or_one:g9,one_or_more:x9,zero_or_more:y9,only_one_neo:b9,zero_or_one_neo:C9,one_or_more_neo:k9,zero_or_more_neo:v9,requirement_arrow:w9,requirement_contains:T9,requirement_arrow_neo:S9,requirement_contains_neo:_9},N9=i9,j9={common:wa,getConfig:be,insertCluster:_8,insertEdge:n9,insertEdgeLabel:Z8,insertMarkers:N9,insertNode:$2,interpolateToCurve:vp,labelHelper:Mt,log:tt,positionEdgeLabel:Q8},da={},H2=v(t=>{for(const e of t)da[e.name]=e},"registerLayoutLoaders"),L9=v(()=>{H2([{name:"dagre",loader:v(async()=>await Jt(()=>import("./dagre-BM42HDAG-B-cR-BjI.js"),__vite__mapDeps([0,1,2,3,4,5,6,7])),"loader")},{name:"cose-bilkent",loader:v(async()=>await Jt(()=>import("./cose-bilkent-S5V4N54A-C7Hqukaf.js"),__vite__mapDeps([8,7,3,4,5,6])),"loader")}])},"registerDefaultLayoutLoaders");L9();var qZ=v(async(t,e)=>{if(!(t.layoutAlgorithm in da))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const u of t.nodes){const d=u.domId||u.id;u.domId=`${t.diagramId}-${d}`}const r=da[t.layoutAlgorithm],n=await r.loader(),{theme:i,themeVariables:s}=t.config,{useGradient:o,gradientStart:a,gradientStop:l}=s,c=e.attr("id");if(e.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i!=null&&i.includes("dark")?"#FFFFFF":"#000000"}`),e.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i!=null&&i.includes("dark")?"#FFFFFF":"#000000"}`),o){const u=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");u.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),u.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return n.render(t,e,j9,{algorithm:r.algorithm})},"render"),HZ=v((t="",{fallback:e="dagre"}={})=>{if(t in da)return t;if(e in da)return tt.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm"),qp="comm",U2="rule",G2="decl",B9="@media",A9="@import",M9="@supports",I9="@namespace",Ud="@keyframes",V2="@layer",F9="@scope",P9=Math.abs,Ko=String.fromCharCode;function Y2(t){return t.trim()}function Gd(t,e,r){return t.replace(e,r)}function gs(t,e){return t.charCodeAt(e)|0}function Hs(t,e,r){return t.slice(e,r)}function nn(t){return t.length}function X2(t){return t.length}function nl(t,e){return e.push(t),t}var ah=1,Us=1,K2=0,Mr=0,je=0,Qs="";function Hp(t,e,r,n,i,s,o,a){return{value:t,root:e,parent:r,type:n,props:i,children:s,line:ah,column:Us,length:o,return:"",siblings:a}}function D9(){return je}function O9(){return je=Mr>0?gs(Qs,--Mr):0,Us--,je===10&&(Us=1,ah--),je}function Ur(){return je=Mr<K2?gs(Qs,Mr++):0,Us++,je===10&&(Us=1,ah++),je}function qn(){return gs(Qs,Mr)}function Ll(){return Mr}function lh(t,e){return Hs(Qs,t,e)}function fa(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function R9(t){return ah=Us=1,K2=nn(Qs=t),Mr=0,[]}function $9(t){return Qs="",t}function pu(t){return Y2(lh(Mr-1,Vd(t===91?t+2:t===40?t+1:t)))}function z9(t){for(;(je=qn())&&je<33;)Ur();return fa(t)>2||fa(je)>3?"":" "}function W9(t,e){for(;--e&&Ur()&&!(je<48||je>102||je>57&&je<65||je>70&&je<97););return lh(t,Ll()+(e<6&&qn()==32&&Ur()==32))}function Vd(t){for(;Ur();)switch(je){case t:return Mr;case 34:case 39:t!==34&&t!==39&&Vd(je);break;case 40:t===41&&Vd(t);break;case 92:Ur();break}return Mr}function q9(t,e){for(;Ur()&&t+je!==57;)if(t+je===84&&qn()===47)break;return"/*"+lh(e,Mr-1)+"*"+Ko(t===47?t:Ur())}function H9(t){for(;!fa(qn());)Ur();return lh(t,Mr)}function U9(t){return $9(Bl("",null,null,null,[""],t=R9(t),0,[0],t))}function Bl(t,e,r,n,i,s,o,a,l){for(var c=0,u=0,d=o,p=0,f=0,m=0,x=1,g=1,y=1,b=0,k=0,T="",_=i,w=s,E=n,L=T;g;)switch(m=k,k=Ur()){case 40:m!=108&&gs(L,d-1)==58?(b++,L+="("):L+=pu(k);break;case 41:b--,L+=")";break;case 34:case 39:case 91:L+=pu(k);break;case 9:case 10:case 13:case 32:if(b>0){L+=Ko(k);break}L+=z9(m);break;case 92:L+=W9(Ll()-1,7);continue;case 47:switch(qn()){case 42:case 47:nl(G9(q9(Ur(),Ll()),e,r,l),l),(fa(m||1)==5||fa(qn()||1)==5)&&nn(L)&&Hs(L,-1,void 0)!==" "&&(L+=" ");break;default:L+="/"}break;case 123*x:a[c++]=nn(L)*y;case 125*x:case 59:case 0:if(b>0&&k){L+=Ko(k);break}switch(k){case 0:case 125:g=0;case 59+u:y==-1&&(L=Gd(L,/\f/g,"")),f>0&&(nn(L)-d||x===0)&&nl(f>32?t0(L+";",n,r,d-1,l):t0(Gd(L," ","")+";",n,r,d-2,l),l);break;case 59:L+=";";default:if(nl(E=Jx(L,e,r,c,u,i,a,T,_=[],w=[],d,s),s),k===123)if(u===0)Bl(L,e,E,E,_,s,d,a,w);else{switch(p){case 99:if(gs(L,3)===110)break;case 108:if(gs(L,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Bl(t,E,E,n&&nl(Jx(t,E,E,0,0,i,a,T,i,_=[],d,w),w),i,w,d,a,n?_:w):Bl(L,E,E,E,[""],w,0,a,w)}}c=u=f=0,x=y=1,T=L="",d=o;break;case 58:d=1+nn(L),f=m;default:if(x<1){if(k==123)--x;else if(k==125&&x++==0&&O9()==125)continue}switch(L+=Ko(k),k*x){case 38:y=u>0?1:(L+="\f",-1);break;case 44:if(b>0)break;a[c++]=(nn(L)-1)*y,y=1;break;case 64:qn()===45&&(L+=pu(Ur())),p=qn(),u=d=nn(T=L+=H9(Ll())),k++;break;case 45:m===45&&nn(L)==2&&(x=0)}}return s}function Jx(t,e,r,n,i,s,o,a,l,c,u,d){for(var p=i-1,f=i===0?s:[""],m=X2(f),x=0,g=0,y=0;x<n;++x)for(var b=0,k=Hs(t,p+1,p=P9(g=o[x])),T=t;b<m;++b)(T=Y2(g>0?f[b]+" "+k:Gd(k,/&\f/g,f[b])))&&(l[y++]=T);return Hp(t,e,r,i===0?U2:a,l,c,u,d)}function G9(t,e,r,n){return Hp(t,e,r,qp,Ko(D9()),Hs(t,2,-2),0,n)}function t0(t,e,r,n,i){return Hp(t,e,r,G2,Hs(t,0,n),Hs(t,n+1,-1),n,i)}function Yd(t,e){for(var r="",n=0;n<t.length;n++)r+=e(t[n],n,t,e)||"";return r}function V9(t,e,r,n){switch(t.type){case V2:if(t.children.length)break;case A9:case I9:case G2:return t.return=t.return||t.value;case qp:return"";case Ud:return t.return=t.value+"{"+Yd(t.children,n)+"}";case U2:if(!nn(t.value=t.props.join(",")))return""}return nn(r=Yd(t.children,n))?t.return=t.value+"{"+r+"}":""}function Y9(t){var e=X2(t);return function(r,n,i,s){for(var o="",a=0;a<e;a++)o+=t[a](r,n,i,s)||"";return o}}var Z2="c4",X9=v(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),K9=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./c4Diagram-AAUBKEIU-DaP9CGWb.js");return{diagram:e}},__vite__mapDeps([9,10,3,4,5,6,7]));return{id:Z2,diagram:t}},"loader"),Z9={id:Z2,detector:X9,loader:K9},Q9=Z9,Q2="flowchart",J9=v((t,e)=>{var r,n;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"?!1:/^\s*graph/.test(t)},"detector"),t7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-4x31cK9j.js");return{diagram:e}},__vite__mapDeps([11,12,10,13,14,15,3,4,5,6,7]));return{id:Q2,diagram:t}},"loader"),e7={id:Q2,detector:J9,loader:t7},r7=e7,J2="flowchart-v2",n7=v((t,e)=>{var r,n,i;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((n=e==null?void 0:e.flowchart)==null?void 0:n.defaultRenderer)==="elk"&&(e.layout="elk"),/^\s*graph/.test(t)&&((i=e==null?void 0:e.flowchart)==null?void 0:i.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(t))},"detector"),i7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-4x31cK9j.js");return{diagram:e}},__vite__mapDeps([11,12,10,13,14,15,3,4,5,6,7]));return{id:J2,diagram:t}},"loader"),s7={id:J2,detector:n7,loader:i7},o7=s7,tS="er",a7=v(t=>/^\s*erDiagram/.test(t),"detector"),l7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./erDiagram-TEJ5UH35-DezFbJP-.js");return{diagram:e}},__vite__mapDeps([16,13,14,15,3,4,5,6,7]));return{id:tS,diagram:t}},"loader"),c7={id:tS,detector:a7,loader:l7},h7=c7,eS="gitGraph",u7=v(t=>/^\s*gitGraph/.test(t),"detector"),d7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./gitGraphDiagram-PVQCEYII-DSiQGKbN.js");return{diagram:e}},__vite__mapDeps([17,18,19,20,5,3,4,6,7]));return{id:eS,diagram:t}},"loader"),f7={id:eS,detector:u7,loader:d7},p7=f7,rS="gantt",m7=v(t=>/^\s*gantt/.test(t),"detector"),g7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./ganttDiagram-6RSMTGT7-FopfSTyZ.js");return{diagram:e}},__vite__mapDeps([21,3,4,22,23,24,5,6,7]));return{id:rS,diagram:t}},"loader"),x7={id:rS,detector:m7,loader:g7},y7=x7,nS="info",b7=v(t=>/^\s*info/.test(t),"detector"),C7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./infoDiagram-5YYISTIA-DE6BqzK_.js");return{diagram:e}},__vite__mapDeps([25,20,5,3,4,6,7]));return{id:nS,diagram:t}},"loader"),k7={id:nS,detector:b7,loader:C7},iS="pie",v7=v(t=>/^\s*pie/.test(t),"detector"),w7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./pieDiagram-4H26LBE5-O7aIwy1x.js");return{diagram:e}},__vite__mapDeps([26,18,20,5,3,4,6,27,28,23,7]));return{id:iS,diagram:t}},"loader"),S7={id:iS,detector:v7,loader:w7},sS="quadrantChart",T7=v(t=>/^\s*quadrantChart/.test(t),"detector"),_7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./quadrantDiagram-W4KKPZXB-CPQ2qq7c.js");return{diagram:e}},__vite__mapDeps([29,22,23,24,3,4,5,6,7]));return{id:sS,diagram:t}},"loader"),E7={id:sS,detector:T7,loader:_7},N7=E7,oS="xychart",j7=v(t=>/^\s*xychart(-beta)?/.test(t),"detector"),L7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./xychartDiagram-2RQKCTM6-BgKSj8Qb.js");return{diagram:e}},__vite__mapDeps([30,23,28,22,24,3,4,5,6,7]));return{id:oS,diagram:t}},"loader"),B7={id:oS,detector:j7,loader:L7},A7=B7,aS="requirement",M7=v(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),I7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./requirementDiagram-4Y6WPE33-C23horL4.js");return{diagram:e}},__vite__mapDeps([31,13,14,3,4,5,6,7]));return{id:aS,diagram:t}},"loader"),F7={id:aS,detector:M7,loader:I7},P7=F7,lS="sequence",D7=v(t=>/^\s*sequenceDiagram/.test(t),"detector"),O7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./sequenceDiagram-3UESZ5HK-BKaTfIvo.js");return{diagram:e}},__vite__mapDeps([32,10,19,3,4,5,6,7]));return{id:lS,diagram:t}},"loader"),R7={id:lS,detector:D7,loader:O7},$7=R7,cS="class",z7=v((t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(t)},"detector"),W7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./classDiagram-4FO5ZUOK-K6wdB4ic.js");return{diagram:e}},__vite__mapDeps([33,34,12,10,13,14,3,4,5,6,7]));return{id:cS,diagram:t}},"loader"),q7={id:cS,detector:z7,loader:W7},H7=q7,hS="classDiagram",U7=v((t,e)=>{var r;return/^\s*classDiagram/.test(t)&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(t)},"detector"),G7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./classDiagram-v2-Q7XG4LA2-K6wdB4ic.js");return{diagram:e}},__vite__mapDeps([35,34,12,10,13,14,3,4,5,6,7]));return{id:hS,diagram:t}},"loader"),V7={id:hS,detector:U7,loader:G7},Y7=V7,uS="state",X7=v((t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(t)},"detector"),K7=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./stateDiagram-AJRCARHV-B9na_6mY.js");return{diagram:e}},__vite__mapDeps([36,37,13,14,1,2,3,4,5,6,7]));return{id:uS,diagram:t}},"loader"),Z7={id:uS,detector:X7,loader:K7},Q7=Z7,dS="stateDiagram",J7=v((t,e)=>{var r;return!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),tW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./stateDiagram-v2-BHNVJYJU-Cf84VDiH.js");return{diagram:e}},__vite__mapDeps([38,37,13,14,3,4,5,6,7]));return{id:dS,diagram:t}},"loader"),eW={id:dS,detector:J7,loader:tW},rW=eW,fS="journey",nW=v(t=>/^\s*journey/.test(t),"detector"),iW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./journeyDiagram-JHISSGLW-CwWeJgjE.js");return{diagram:e}},__vite__mapDeps([39,12,10,27,3,4,5,6,7]));return{id:fS,diagram:t}},"loader"),sW={id:fS,detector:nW,loader:iW},oW=sW,aW=v((t,e,r)=>{tt.debug(`rendering svg for syntax error
645
+ `);const n=WR(e),i=n.append("g");n.attr("viewBox","0 0 2412 512"),U1(n,100,512,!0),i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),pS={draw:aW},lW=pS,cW={db:{},renderer:pS,parser:{parse:v(()=>{},"parse")}},hW=cW,mS="flowchart-elk",uW=v((t,e={})=>{var r;return/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(e.layout="elk",!0):!1},"detector"),dW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./flowDiagram-I6XJVG4X-4x31cK9j.js");return{diagram:e}},__vite__mapDeps([11,12,10,13,14,15,3,4,5,6,7]));return{id:mS,diagram:t}},"loader"),fW={id:mS,detector:uW,loader:dW},pW=fW,gS="timeline",mW=v(t=>/^\s*timeline/.test(t),"detector"),gW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./timeline-definition-PNZ67QCA-BBWPqd7X.js");return{diagram:e}},__vite__mapDeps([40,27,3,4,5,6,7]));return{id:gS,diagram:t}},"loader"),xW={id:gS,detector:mW,loader:gW},yW=xW,xS="mindmap",bW=v(t=>/^\s*mindmap/.test(t),"detector"),CW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./mindmap-definition-RKZ34NQL-CxfIOjLX.js");return{diagram:e}},__vite__mapDeps([41,13,14,3,4,5,6,7]));return{id:xS,diagram:t}},"loader"),kW={id:xS,detector:bW,loader:CW},vW=kW,yS="kanban",wW=v(t=>/^\s*kanban/.test(t),"detector"),SW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./kanban-definition-UN3LZRKU-DnG956Wh.js");return{diagram:e}},__vite__mapDeps([42,12,3,4,5,6,7]));return{id:yS,diagram:t}},"loader"),TW={id:yS,detector:wW,loader:SW},_W=TW,bS="sankey",EW=v(t=>/^\s*sankey(-beta)?/.test(t),"detector"),NW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./sankeyDiagram-5OEKKPKP-DPY04kOW.js");return{diagram:e}},__vite__mapDeps([43,28,23,3,4,5,6,7]));return{id:bS,diagram:t}},"loader"),jW={id:bS,detector:EW,loader:NW},LW=jW,CS="packet",BW=v(t=>/^\s*packet(-beta)?/.test(t),"detector"),AW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-LMA3HP47-D3S7XDRD.js");return{diagram:e}},__vite__mapDeps([44,18,20,5,3,4,6,7]));return{id:CS,diagram:t}},"loader"),MW={id:CS,detector:BW,loader:AW},kS="radar",IW=v(t=>/^\s*radar-beta/.test(t),"detector"),FW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-2AECGRRQ-B6-5onDk.js");return{diagram:e}},__vite__mapDeps([45,18,20,5,3,4,6,7]));return{id:kS,diagram:t}},"loader"),PW={id:kS,detector:IW,loader:FW},vS="block",DW=v(t=>/^\s*block(-beta)?/.test(t),"detector"),OW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./blockDiagram-GPEHLZMM-UX4EF98O.js");return{diagram:e}},__vite__mapDeps([46,12,1,15,3,4,5,6,7]));return{id:vS,diagram:t}},"loader"),RW={id:vS,detector:DW,loader:OW},$W=RW,wS="treeView",zW=v(t=>/^\s*treeView-beta/.test(t),"detector"),WW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-5GNKFQAL-DoZZgFAM.js");return{diagram:e}},__vite__mapDeps([47,18,19,20,5,3,4,6,7]));return{id:wS,diagram:t}},"loader"),qW={id:wS,detector:zW,loader:WW},HW=qW,SS="architecture",UW=v(t=>/^\s*architecture/.test(t),"detector"),GW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./architectureDiagram-3BPJPVTR-xYo993Yw.js");return{diagram:e}},__vite__mapDeps([48,18,20,5,3,4,6,7]));return{id:SS,diagram:t}},"loader"),VW={id:SS,detector:UW,loader:GW},YW=VW,TS="eventmodeling",XW=v(t=>/^\s*eventmodeling/.test(t),"detector"),KW=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-KO2AKTUF-77jEGlJh.js");return{diagram:e}},__vite__mapDeps([49,18,20,5,3,4,6,7]));return{id:TS,diagram:t}},"loader"),ZW={id:TS,detector:XW,loader:KW},QW=ZW,_S="ishikawa",JW=v(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),tq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./ishikawaDiagram-YF4QCWOH-Dml8NwQI.js");return{diagram:e}},__vite__mapDeps([50,3,4,5,6,7]));return{id:_S,diagram:t}},"loader"),eq={id:_S,detector:JW,loader:tq},ES="venn",rq=v(t=>/^\s*venn-beta/.test(t),"detector"),nq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./vennDiagram-CIIHVFJN-tWqiHsOZ.js");return{diagram:e}},__vite__mapDeps([51,3,4,5,6,7]));return{id:ES,diagram:t}},"loader"),iq={id:ES,detector:rq,loader:nq},sq=iq,NS="treemap",oq=v(t=>/^\s*treemap/.test(t),"detector"),aq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./diagram-OG6HWLK6-KbYL9aCY.js");return{diagram:e}},__vite__mapDeps([52,14,18,20,5,3,4,6,24,28,23,7]));return{id:NS,diagram:t}},"loader"),lq={id:NS,detector:oq,loader:aq},jS="wardley-beta",cq=v(t=>/^\s*wardley-beta/i.test(t),"detector"),hq=v(async()=>{const{diagram:t}=await Jt(async()=>{const{diagram:e}=await import("./wardleyDiagram-YWT4CUSO-B49f8GzW.js");return{diagram:e}},__vite__mapDeps([53,18,20,5,3,4,6,7]));return{id:jS,diagram:t}},"loader"),uq={id:jS,detector:cq,loader:hq},dq=uq,e0=!1,ch=v(()=>{e0||(e0=!0,Jl("error",hW,t=>t.toLowerCase().trim()==="error"),Jl("---",{db:{clear:v(()=>{},"clear")},styles:{},renderer:{draw:v(()=>{},"draw")},parser:{parse:v(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:v(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Ju(pW,vW,YW),Ju(Q9,_W,Y7,H7,h7,y7,k7,S7,P7,$7,o7,r7,yW,p7,rW,Q7,oW,N7,LW,MW,A7,$W,QW,HW,PW,eq,lq,sq,dq))},"addDiagrams"),fq=v(async()=>{tt.debug("Loading registered diagrams");const e=(await Promise.allSettled(Object.entries(Ti).map(async([r,{detector:n,loader:i}])=>{if(i)try{id(r)}catch{try{const{diagram:s,id:o}=await i();Jl(o,s,n)}catch(s){throw tt.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Ti[r],s}}}))).filter(r=>r.status==="rejected");if(e.length>0){tt.error(`Failed to load ${e.length} external diagrams`);for(const r of e)tt.error(r);throw new Error(`Failed to load ${e.length} external diagrams`)}},"loadRegisteredDiagrams"),pq="graphics-document document";function LS(t,e){t.attr("role",pq),e!==""&&t.attr("aria-roledescription",e)}v(LS,"setA11yDiagramInfo");function BS(t,e,r,n){if(t.insert!==void 0){if(r){const i=`chart-desc-${n}`;t.attr("aria-describedby",i),t.insert("desc",":first-child").attr("id",i).text(r)}if(e){const i=`chart-title-${n}`;t.attr("aria-labelledby",i),t.insert("title",":first-child").attr("id",i).text(e)}}}v(BS,"addSVGa11yTitleDescription");var vi,Xd=(vi=class{constructor(e,r,n,i,s){this.type=e,this.text=r,this.db=n,this.parser=i,this.renderer=s}static async fromText(e,r={}){var c,u;const n=be(),i=Gf(e,n);e=G6(e)+`
646
646
  `;try{id(i)}catch{const d=l4(i);if(!d)throw new L1(`Diagram ${i} not found.`);const{id:p,diagram:f}=await d();Jl(p,f)}const{db:s,parser:o,renderer:a,init:l}=id(i);return o.parser&&(o.parser.yy=s),(c=s.clear)==null||c.call(s),l==null||l(n),r.title&&((u=s.setDiagramTitle)==null||u.call(s,r.title)),await o.parse(e),new vi(i,e,s,o,a)}async render(e,r){await this.renderer.draw(this.text,e,r,this)}getParser(){return this.parser}getType(){return this.type}},v(vi,"Diagram"),vi),r0=[],mq=v(()=>{r0.forEach(t=>{t()}),r0=[]},"attachFunctions"),gq=v(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function AS(t){const e=t.match(j1);if(!e)return{text:t,metadata:{}};let r=X$(e[1],{schema:Y$})??{};r=typeof r=="object"&&!Array.isArray(r)?r:{};const n={};return r.displayMode&&(n.displayMode=r.displayMode.toString()),r.title&&(n.title=r.title.toString()),r.config&&(n.config=r.config),{text:t.slice(e[0].length),metadata:n}}v(AS,"extractFrontMatter");var xq=v(t=>t.replace(/\r\n?/g,`
647
647
  `).replace(/<(\w+)([^>]*)>/g,(e,r,n)=>"<"+r+n.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),yq=v(t=>{const{text:e,metadata:r}=AS(t),{displayMode:n,title:i,config:s={}}=r;return n&&(s.gantt||(s.gantt={}),s.gantt.displayMode=n),{title:i,config:s,text:e}},"processFrontmatter"),bq=v(t=>{const e=Wr.detectInit(t)??{},r=Wr.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:n})=>n==="wrap"):(r==null?void 0:r.type)==="wrap"&&(e.wrap=!0),{text:M6(t),directive:e}},"processDirectives");function Up(t){const e=xq(t),r=yq(e),n=bq(r.text),i=Ep(r.config,n.directive);return t=gq(n.text),{code:t,title:r.title,config:i}}v(Up,"preprocessDiagram");function MS(t){const e=new TextEncoder().encode(t),r=Array.from(e,n=>String.fromCodePoint(n)).join("");return btoa(r)}v(MS,"toBase64");var Cq=5e4,kq="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",vq="sandbox",wq="loose",Sq="http://www.w3.org/2000/svg",Tq="http://www.w3.org/1999/xlink",_q="http://www.w3.org/1999/xhtml",Eq="100%",Nq="100%",jq="border:0;margin:0;",Lq="margin:0",Bq="allow-top-navigation-by-user-activation allow-popups",Aq='The "iframe" tag is not supported by your browser.',Mq=["foreignobject"],Iq=["dominant-baseline"];function Gp(t){const e=Up(t);return Zl(),F4(e.config??{}),e}v(Gp,"processAndSetConfigs");async function IS(t,e){ch();try{const{code:r,config:n}=Gp(t);return{diagramType:(await PS(r)).type,config:n}}catch(r){if(e!=null&&e.suppressErrors)return!1;throw r}}v(IS,"parse");var n0=v((t,e,r=[])=>{const n=F1(`{ ${r.join(" !important; ")} !important; }`);return`.${t} ${e} ${n}`},"cssImportantStyles"),Fq=v((t,e=new Map)=>{const r=new CSSStyleSheet;if(t.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),t.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const a=or(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(l=>{xx(l.styles)||a.forEach(c=>{r.insertRule(n0(l.id,c,l.styles),r.cssRules.length)}),xx(l.textStyles)||r.insertRule(n0(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let n="";if(t.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const i=new CSSStyleSheet;i.replaceSync(t.themeCSS),n=nd(i)+`
648
648
  `}else n+=`${t.themeCSS}
@@ -1 +1 @@
1
- import{a0 as ln,a1 as an,a2 as H,a3 as q,a4 as B,a5 as un,a6 as y,a7 as tn,a8 as L,a9 as _,aa as rn,ab as o,ac as on,ad as sn,ae as fn}from"./App-j8fWZcGr.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function W(l,h,I,D,v,A,C){var a=l-I,O=h-D,i=(C?A:-A)/L(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,F=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*L(on(0,T*T*R-P*P)),j=(P*g-m*S)/R,z=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=j-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(F<an)if(E=pn(J,K,X,Y,U,V,N,Q)){var Z=J-E[0],$=K-E[1],b=U-E[0],k=V-E[1],nn=1/q(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,g,!t)):a.moveTo(J,K),!(u>y)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[H(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:B(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:B(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{a0 as ln,a1 as an,a2 as H,a3 as q,a4 as B,a5 as un,a6 as y,a7 as tn,a8 as L,a9 as _,aa as rn,ab as o,ac as on,ad as sn,ae as fn}from"./App-D3ehVPvi.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,C,a){var O=I-l,i=D-h,n=C-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function W(l,h,I,D,v,A,C){var a=l-I,O=h-D,i=(C?A:-A)/L(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,F=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*L(on(0,T*T*R-P*P)),j=(P*g-m*S)/R,z=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=j-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(j=w,z=p),{cx:j,cy:z,x01:-n,y01:-d,x11:j*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=yn,I=B(0),D=null,v=gn,A=dn,C=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,F=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(F>tn-y)a.moveTo(s*H(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*H(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=F,S=F,j=C.apply(this,arguments)/2,z=j>y&&(D?+D.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(z>y){var G=sn(z/u*q(j)),M=sn(z/s*q(j));(P-=G*2)>y?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(S-=M*2)>y?(M*=t?1:-1,m+=M,g-=M):(S=0,m=g=(f+c)/2)}var J=s*H(m),K=s*q(m),N=u*H(T),Q=u*q(T);if(w>y){var U=s*H(g),V=s*q(g),X=u*H(R),Y=u*q(R),E;if(F<an)if(E=pn(J,K,X,Y,U,V,N,Q)){var Z=J-E[0],$=K-E[1],b=U-E[0],k=V-E[1],nn=1/q(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(J,K),a.arc(0,0,s,m,g,!t)):a.moveTo(J,K),!(u>y)||!(P>y)?a.lineTo(N,Q):p>y?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[H(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:B(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:B(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
@@ -1,4 +1,4 @@
1
- import{_ as f,I as ht,Y as gt,l as K,b as ut,a as pt,p as mt,q as yt,g as wt,s as kt,z as xt,F as bt,D as vt,G as $t,c as J,ak as Z,al as N,i as Et,d as St,x as Dt,am as Tt,an as At}from"./App-j8fWZcGr.js";import{p as Ct}from"./chunk-4BX2VUAB-Cp90GiCM.js";import{p as Bt}from"./wardley-L42UT6IY-83Im2mo2.js";import{c as tt,f as It}from"./graph-CJVNlri5.js";import"./mobile-CG5tLa2S.js";import"./index-uHKnp74B.js";var W={L:"left",R:"right",T:"top",B:"bottom"},Q={L:f(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:f(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:f(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:f(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},X={L:f((e,t)=>e-t+2,"L"),R:f((e,t)=>e-2,"R"),T:f((e,t)=>e-t+2,"T"),B:f((e,t)=>e-2,"B")},Lt=f(function(e){return T(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),U=f(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),T=f(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=f(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),V=f(function(e,t){const i=T(e)&&z(t),r=z(e)&&T(t);return i||r},"isArchitectureDirectionXY"),jt=f(function(e){const t=e[0],i=e[1],r=T(t)&&z(i),n=z(t)&&T(i);return r||n},"isArchitecturePairXY"),zt=f(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),_=f(function(e,t){const i=`${e}${t}`;return zt(i)?i:void 0},"getArchitectureDirectionPair"),Ft=f(function([e,t],i){const r=i[0],n=i[1];return T(r)?z(n)?[e+(r==="L"?-1:1),t+(n==="T"?1:-1)]:[e+(r==="L"?-1:1),t]:T(n)?[e+(n==="L"?1:-1),t+(r==="T"?1:-1)]:[e,t+(r==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Pt=f(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Yt=f(function(e,t){return V(e,t)?"bend":T(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Rt=f(function(e){return e.type==="service"},"isArchitectureService"),Xt=f(function(e){return e.type==="junction"},"isArchitectureJunction"),et=f(e=>e.data(),"edgeData"),P=f(e=>e.data(),"nodeData"),Ot=$t.architecture,Y,it=(Y=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=ut,this.getAccTitle=pt,this.setDiagramTitle=mt,this.getDiagramTitle=yt,this.getAccDescription=wt,this.setAccDescription=kt,this.clear()}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",xt()}addService({id:t,icon:i,in:r,title:n,iconText:c}){if(this.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:i,iconText:c,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(Rt)}addJunction({id:t,in:i}){if(this.registeredIds[t]!==void 0)throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(i!==void 0){if(t===i)throw new Error(`The junction [${t}] cannot be placed within itself`);if(this.registeredIds[i]===void 0)throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[i]==="node")throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:i}}getJunctions(){return Object.values(this.nodes).filter(Xt)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:i,in:r,title:n}){var c,u,d;if(((c=this.registeredIds)==null?void 0:c[t])!==void 0)throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(((u=this.registeredIds)==null?void 0:u[r])===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(((d=this.registeredIds)==null?void 0:d[r])==="node")throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:i,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:i,lhsDir:r,rhsDir:n,lhsInto:c,rhsInto:u,lhsGroup:d,rhsGroup:l,title:s}){if(!U(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(r)}`);if(!U(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(n)}`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[i]===void 0&&this.groups[i]===void 0)throw new Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);const o=this.nodes[t].in,a=this.nodes[i].in;if(d&&o&&a&&o==a)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&o&&a&&o==a)throw new Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:t,lhsDir:r,lhsInto:c,lhsGroup:d,rhsId:i,rhsDir:n,rhsInto:u,rhsGroup:l,title:s};this.edges.push(g),this.nodes[t]&&this.nodes[i]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[i].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const t={},i=Object.entries(this.nodes).reduce((l,[s,o])=>(l[s]=o.edges.reduce((a,g)=>{var p,k;const h=(p=this.getNode(g.lhsId))==null?void 0:p.in,y=(k=this.getNode(g.rhsId))==null?void 0:k.in;if(h&&y&&h!==y){const w=Yt(g.lhsDir,g.rhsDir);w!=="bend"&&(t[h]??(t[h]={}),t[h][y]=w,t[y]??(t[y]={}),t[y][h]=w)}if(g.lhsId===s){const w=_(g.lhsDir,g.rhsDir);w&&(a[w]=g.rhsId)}else{const w=_(g.rhsDir,g.lhsDir);w&&(a[w]=g.lhsId)}return a},{}),l),{}),r=Object.keys(i)[0],n={[r]:1},c=Object.keys(i).reduce((l,s)=>s===r?l:{...l,[s]:1},{}),u=f(l=>{const s={[l]:[0,0]},o=[l];for(;o.length>0;){const a=o.shift();if(a){n[a]=1,delete c[a];const g=i[a],[h,y]=s[a];Object.entries(g).forEach(([p,k])=>{n[k]||(s[k]=Ft([h,y],p),o.push(k))})}}return s},"BFS"),d=[u(r)];for(;Object.keys(c).length>0;)d.push(u(Object.keys(c)[0]));this.dataStructures={adjList:i,spatialMaps:d,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements[t]=i}getElementById(t){return this.elements[t]}getConfig(){return bt({...Ot,...vt().architecture})}getConfigField(t){return this.getConfig()[t]}},f(Y,"ArchitectureDB"),Y),Mt=f((e,t)=>{Ct(e,t),e.groups.map(i=>t.addGroup(i)),e.services.map(i=>t.addService({...i,type:"service"})),e.junctions.map(i=>t.addJunction({...i,type:"junction"})),e.edges.map(i=>t.addEdge(i))},"populateDb"),rt={parser:{yy:void 0},parse:f(async e=>{var r;const t=await Bt("architecture",e);K.debug(t);const i=(r=rt.parser)==null?void 0:r.yy;if(!(i instanceof it))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Mt(t,i)},"parse")},Gt=f(e=>`
1
+ import{_ as f,I as ht,Y as gt,l as K,b as ut,a as pt,p as mt,q as yt,g as wt,s as kt,z as xt,F as bt,D as vt,G as $t,c as J,ak as Z,al as N,i as Et,d as St,x as Dt,am as Tt,an as At}from"./App-D3ehVPvi.js";import{p as Ct}from"./chunk-4BX2VUAB-DboAwYKw.js";import{p as Bt}from"./wardley-L42UT6IY-DorxG6os.js";import{c as tt,f as It}from"./graph-Cs_vqCR0.js";import"./mobile-CG5tLa2S.js";import"./index-ClX6LVAf.js";var W={L:"left",R:"right",T:"top",B:"bottom"},Q={L:f(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:f(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:f(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:f(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},X={L:f((e,t)=>e-t+2,"L"),R:f((e,t)=>e-2,"R"),T:f((e,t)=>e-t+2,"T"),B:f((e,t)=>e-2,"B")},Lt=f(function(e){return T(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),U=f(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),T=f(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=f(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),V=f(function(e,t){const i=T(e)&&z(t),r=z(e)&&T(t);return i||r},"isArchitectureDirectionXY"),jt=f(function(e){const t=e[0],i=e[1],r=T(t)&&z(i),n=z(t)&&T(i);return r||n},"isArchitecturePairXY"),zt=f(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),_=f(function(e,t){const i=`${e}${t}`;return zt(i)?i:void 0},"getArchitectureDirectionPair"),Ft=f(function([e,t],i){const r=i[0],n=i[1];return T(r)?z(n)?[e+(r==="L"?-1:1),t+(n==="T"?1:-1)]:[e+(r==="L"?-1:1),t]:T(n)?[e+(n==="L"?1:-1),t+(r==="T"?1:-1)]:[e,t+(r==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Pt=f(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Yt=f(function(e,t){return V(e,t)?"bend":T(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Rt=f(function(e){return e.type==="service"},"isArchitectureService"),Xt=f(function(e){return e.type==="junction"},"isArchitectureJunction"),et=f(e=>e.data(),"edgeData"),P=f(e=>e.data(),"nodeData"),Ot=$t.architecture,Y,it=(Y=class{constructor(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.elements={},this.diagramId="",this.setAccTitle=ut,this.getAccTitle=pt,this.setDiagramTitle=mt,this.getDiagramTitle=yt,this.getAccDescription=wt,this.setAccDescription=kt,this.clear()}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes={},this.groups={},this.edges=[],this.registeredIds={},this.dataStructures=void 0,this.elements={},this.diagramId="",xt()}addService({id:t,icon:i,in:r,title:n,iconText:c}){if(this.registeredIds[t]!==void 0)throw new Error(`The service id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(this.registeredIds[r]===void 0)throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds[r]==="node")throw new Error(`The service [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"service",icon:i,iconText:c,title:n,edges:[],in:r}}getServices(){return Object.values(this.nodes).filter(Rt)}addJunction({id:t,in:i}){if(this.registeredIds[t]!==void 0)throw new Error(`The junction id [${t}] is already in use by another ${this.registeredIds[t]}`);if(i!==void 0){if(t===i)throw new Error(`The junction [${t}] cannot be placed within itself`);if(this.registeredIds[i]===void 0)throw new Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds[i]==="node")throw new Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds[t]="node",this.nodes[t]={id:t,type:"junction",edges:[],in:i}}getJunctions(){return Object.values(this.nodes).filter(Xt)}getNodes(){return Object.values(this.nodes)}getNode(t){return this.nodes[t]??null}addGroup({id:t,icon:i,in:r,title:n}){var c,u,d;if(((c=this.registeredIds)==null?void 0:c[t])!==void 0)throw new Error(`The group id [${t}] is already in use by another ${this.registeredIds[t]}`);if(r!==void 0){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(((u=this.registeredIds)==null?void 0:u[r])===void 0)throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(((d=this.registeredIds)==null?void 0:d[r])==="node")throw new Error(`The group [${t}]'s parent is not a group`)}this.registeredIds[t]="group",this.groups[t]={id:t,icon:i,title:n,in:r}}getGroups(){return Object.values(this.groups)}addEdge({lhsId:t,rhsId:i,lhsDir:r,rhsDir:n,lhsInto:c,rhsInto:u,lhsGroup:d,rhsGroup:l,title:s}){if(!U(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(r)}`);if(!U(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(n)}`);if(this.nodes[t]===void 0&&this.groups[t]===void 0)throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(this.nodes[i]===void 0&&this.groups[i]===void 0)throw new Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);const o=this.nodes[t].in,a=this.nodes[i].in;if(d&&o&&a&&o==a)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(l&&o&&a&&o==a)throw new Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const g={lhsId:t,lhsDir:r,lhsInto:c,lhsGroup:d,rhsId:i,rhsDir:n,rhsInto:u,rhsGroup:l,title:s};this.edges.push(g),this.nodes[t]&&this.nodes[i]&&(this.nodes[t].edges.push(this.edges[this.edges.length-1]),this.nodes[i].edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}getDataStructures(){if(this.dataStructures===void 0){const t={},i=Object.entries(this.nodes).reduce((l,[s,o])=>(l[s]=o.edges.reduce((a,g)=>{var p,k;const h=(p=this.getNode(g.lhsId))==null?void 0:p.in,y=(k=this.getNode(g.rhsId))==null?void 0:k.in;if(h&&y&&h!==y){const w=Yt(g.lhsDir,g.rhsDir);w!=="bend"&&(t[h]??(t[h]={}),t[h][y]=w,t[y]??(t[y]={}),t[y][h]=w)}if(g.lhsId===s){const w=_(g.lhsDir,g.rhsDir);w&&(a[w]=g.rhsId)}else{const w=_(g.rhsDir,g.lhsDir);w&&(a[w]=g.lhsId)}return a},{}),l),{}),r=Object.keys(i)[0],n={[r]:1},c=Object.keys(i).reduce((l,s)=>s===r?l:{...l,[s]:1},{}),u=f(l=>{const s={[l]:[0,0]},o=[l];for(;o.length>0;){const a=o.shift();if(a){n[a]=1,delete c[a];const g=i[a],[h,y]=s[a];Object.entries(g).forEach(([p,k])=>{n[k]||(s[k]=Ft([h,y],p),o.push(k))})}}return s},"BFS"),d=[u(r)];for(;Object.keys(c).length>0;)d.push(u(Object.keys(c)[0]));this.dataStructures={adjList:i,spatialMaps:d,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements[t]=i}getElementById(t){return this.elements[t]}getConfig(){return bt({...Ot,...vt().architecture})}getConfigField(t){return this.getConfig()[t]}},f(Y,"ArchitectureDB"),Y),Mt=f((e,t)=>{Ct(e,t),e.groups.map(i=>t.addGroup(i)),e.services.map(i=>t.addService({...i,type:"service"})),e.junctions.map(i=>t.addJunction({...i,type:"junction"})),e.edges.map(i=>t.addEdge(i))},"populateDb"),rt={parser:{yy:void 0},parse:f(async e=>{var r;const t=await Bt("architecture",e);K.debug(t);const i=(r=rt.parser)==null?void 0:r.yy;if(!(i instanceof it))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Mt(t,i)},"parse")},Gt=f(e=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};
@@ -1,4 +1,4 @@
1
- import{g as ye}from"./chunk-FMBD7UC4-Jti_und8.js";import{ar as xe,as as Vt,at as be,au as we,av as me,aw as Se,ax as Le,ay as ve,az as Ee,aA as _e,aB as ke,aC as Te,aD as De,aE as Ne,aF as Ie,aG as Ce,aH as Be,aI as Oe,aJ as Re,aK as Ae,aL as ze,aM as Me,aN as Pe,aO as Fe,aP as We,_ as u,D as ct,d as O,e as Ye,l as v,z as He,B as Ke,aQ as Ue,R as Xe,S as Ve,c as M,O as je,aR as H,ak as Et,aS as at,aT as Ge,u as st,k as Ze,aU as qe,i as Ot,aV as Rt,aW as Je}from"./App-j8fWZcGr.js";import{G as Qe}from"./graph-CAnANduQ.js";import{c as $e}from"./channel-BD-5_hPW.js";import"./mobile-CG5tLa2S.js";import"./index-uHKnp74B.js";import"./graph-CJVNlri5.js";function tr(e){return Array.isArray(e)}function er(e){if(xe(e))return e;const t=Vt(e);if(!rr(e))return{};if(tr(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(be(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?sr(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ir(a,e),xt(a,e),ar(a,e),a}function rr(e){switch(Vt(e)){case We:case Fe:case Pe:case Me:case ze:case Ae:case Re:case Oe:case Be:case Ce:case Ie:case Ne:case De:case Te:case ke:case _e:case Ee:case ve:case Le:case Se:case me:case we:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function ar(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s<a.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function sr(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=a)&&(e[s]=t[s])}function ir(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=(function(){var e=u(function(N,x,p,f){for(p=p||{},f=N.length;f--;p[N[f]]=x);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],d=[8,30],g=[8,10,21,28,29,30,31,39,43,46],y=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],L={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(x,p,f,S,E,o,k){var h=o.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",o[h-1]),S.setHierarchy(o[h-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",o[h]),typeof o[h].length=="number"?this.$=o[h]:this.$=[o[h]];break;case 13:S.getLogger().debug("Rule: statement #2: ",o[h-1]),this.$=[o[h-1]].concat(o[h]);break;case 14:S.getLogger().debug("Rule: link: ",o[h],x),this.$={edgeTypeStr:o[h],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",o[h-3],o[h-1],o[h]),this.$={edgeTypeStr:o[h],label:o[h-1]};break;case 18:const T=parseInt(o[h]),D=S.generateId();this.$={id:D,type:"space",label:"",width:T,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",o[h-2],o[h-1],o[h]," typestr: ",o[h-1].edgeTypeStr);const U=S.edgeStrToEdgeData(o[h-1].edgeTypeStr),F=S.edgeStrToEdgeStartData(o[h-1].edgeTypeStr),J=S.edgeStrToThickness(o[h-1].edgeTypeStr),B=S.edgeStrToPattern(o[h-1].edgeTypeStr);this.$=[{id:o[h-2].id,label:o[h-2].label,type:o[h-2].type,directions:o[h-2].directions},{id:o[h-2].id+"-"+o[h].id,start:o[h-2].id,end:o[h].id,label:o[h-1].label,type:"edge",thickness:J,pattern:B,directions:o[h].directions,arrowTypeEnd:U,arrowTypeStart:F},{id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[h-1],o[h]),this.$={id:o[h-1].id,label:o[h-1].label,type:S.typeStr2Type(o[h-1].typeStr),directions:o[h-1].directions,widthInColumns:parseInt(o[h],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",o[h]),this.$={id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",o[h]),this.$={type:"column-setting",columns:o[h]==="auto"?-1:parseInt(o[h])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",o[h-2],o[h-1]),S.generateId(),this.$={...o[h-2],type:"composite",children:o[h-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",o[h-2],o[h-1],o[h]);const Y=S.generateId();this.$={id:Y,type:"composite",label:"",children:o[h-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",o[h]),this.$={id:o[h]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[h-1],o[h]),this.$={id:o[h-1],label:o[h].label,typeStr:o[h].typeStr,directions:o[h].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",o[h]),this.$=[o[h]];break;case 32:S.getLogger().debug("Rule: dirList: ",o[h-1],o[h]),this.$=[o[h-1]].concat(o[h]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",o[h-2],o[h-1],o[h]),this.$={typeStr:o[h-2]+o[h],label:o[h-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[h-3],o[h-2]," #3:",o[h-1],o[h]),this.$={typeStr:o[h-3]+o[h],label:o[h-2],directions:o[h-1]};break;case 35:case 36:this.$={type:"classDef",id:o[h-1].trim(),css:o[h].trim()};break;case 37:this.$={type:"applyClass",id:o[h-1].trim(),styleClass:o[h].trim()};break;case 38:this.$={type:"applyStyles",id:o[h-1].trim(),stylesStr:o[h].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(g,[2,16],{14:22,15:y,16:w}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(b,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:y,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(g,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(x,p){if(p.recoverable)this.trace(x);else{var f=new Error(x);throw f.hash=p,f}},"parseError"),parse:u(function(x){var p=this,f=[0],S=[],E=[null],o=[],k=this.table,h="",T=0,D=0,U=2,F=1,J=o.slice.call(arguments,1),B=Object.create(this.lexer),Y={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(Y.yy[et]=this.yy[et]);B.setInput(x,Y.yy),Y.yy.lexer=B,Y.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var rt=B.yylloc;o.push(rt);var pe=B.options&&B.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fe(X){f.length=f.length-2*X,E.length=E.length-X,o.length=o.length-X}u(fe,"popStack");function Ct(){var X;return X=S.pop()||B.lex()||F,typeof X!="number"&&(X instanceof Array&&(S=X,X=S.pop()),X=p.symbols_[X]||X),X}u(Ct,"lex");for(var K,$,j,ft,tt={},lt,Q,Bt,ot;;){if($=f[f.length-1],this.defaultActions[$]?j=this.defaultActions[$]:((K===null||typeof K>"u")&&(K=Ct()),j=k[$]&&k[$][K]),typeof j>"u"||!j.length||!j[0]){var yt="";ot=[];for(lt in k[$])this.terminals_[lt]&&lt>U&&ot.push("'"+this.terminals_[lt]+"'");B.showPosition?yt="Parse error on line "+(T+1)+`:
1
+ import{g as ye}from"./chunk-FMBD7UC4-BnboGO5t.js";import{ar as xe,as as Vt,at as be,au as we,av as me,aw as Se,ax as Le,ay as ve,az as Ee,aA as _e,aB as ke,aC as Te,aD as De,aE as Ne,aF as Ie,aG as Ce,aH as Be,aI as Oe,aJ as Re,aK as Ae,aL as ze,aM as Me,aN as Pe,aO as Fe,aP as We,_ as u,D as ct,d as O,e as Ye,l as v,z as He,B as Ke,aQ as Ue,R as Xe,S as Ve,c as M,O as je,aR as H,ak as Et,aS as at,aT as Ge,u as st,k as Ze,aU as qe,i as Ot,aV as Rt,aW as Je}from"./App-D3ehVPvi.js";import{G as Qe}from"./graph-CAnANduQ.js";import{c as $e}from"./channel-D_RXsFFT.js";import"./mobile-CG5tLa2S.js";import"./index-ClX6LVAf.js";import"./graph-Cs_vqCR0.js";function tr(e){return Array.isArray(e)}function er(e){if(xe(e))return e;const t=Vt(e);if(!rr(e))return{};if(tr(e)){const s=Array.from(e);return e.length>0&&typeof e[0]=="string"&&Object.hasOwn(e,"index")&&(s.index=e.index,s.input=e.input),s}if(be(e)){const s=e,i=s.constructor;return new i(s.buffer,s.byteOffset,s.length)}if(t==="[object ArrayBuffer]")return new ArrayBuffer(e.byteLength);if(t==="[object DataView]"){const s=e,i=s.buffer,c=s.byteOffset,r=s.byteLength,n=new ArrayBuffer(r),l=new Uint8Array(i,c,r);return new Uint8Array(n).set(l),new DataView(n)}if(t==="[object Boolean]"||t==="[object Number]"||t==="[object String]"){const s=e.constructor,i=new s(e.valueOf());return t==="[object String]"?sr(i,e):xt(i,e),i}if(t==="[object Date]")return new Date(Number(e));if(t==="[object RegExp]"){const s=e,i=new RegExp(s.source,s.flags);return i.lastIndex=s.lastIndex,i}if(t==="[object Symbol]")return Object(Symbol.prototype.valueOf.call(e));if(t==="[object Map]"){const s=e,i=new Map;return s.forEach((c,r)=>{i.set(r,c)}),i}if(t==="[object Set]"){const s=e,i=new Set;return s.forEach(c=>{i.add(c)}),i}if(t==="[object Arguments]"){const s=e,i={};return xt(i,s),i.length=s.length,i[Symbol.iterator]=s[Symbol.iterator],i}const a={};return ir(a,e),xt(a,e),ar(a,e),a}function rr(e){switch(Vt(e)){case We:case Fe:case Pe:case Me:case ze:case Ae:case Re:case Oe:case Be:case Ce:case Ie:case Ne:case De:case Te:case ke:case _e:case Ee:case ve:case Le:case Se:case me:case we:return!0;default:return!1}}function xt(e,t){for(const a in t)Object.hasOwn(t,a)&&(e[a]=t[a])}function ar(e,t){const a=Object.getOwnPropertySymbols(t);for(let s=0;s<a.length;s++){const i=a[s];Object.prototype.propertyIsEnumerable.call(t,i)&&(e[i]=t[i])}}function sr(e,t){const a=t.valueOf().length;for(const s in t)Object.hasOwn(t,s)&&(Number.isNaN(Number(s))||Number(s)>=a)&&(e[s]=t[s])}function ir(e,t){const a=Object.getPrototypeOf(t);a!==null&&typeof t.constructor=="function"&&Object.setPrototypeOf(e,a)}var wt=(function(){var e=u(function(N,x,p,f){for(p=p||{},f=N.length;f--;p[N[f]]=x);return p},"o"),t=[1,15],a=[1,7],s=[1,13],i=[1,14],c=[1,19],r=[1,16],n=[1,17],l=[1,18],d=[8,30],g=[8,10,21,28,29,30,31,39,43,46],y=[1,23],w=[1,24],b=[8,10,15,16,21,28,29,30,31,39,43,46],m=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],L={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(x,p,f,S,E,o,k){var h=o.length-1;switch(E){case 4:S.getLogger().debug("Rule: separator (NL) ");break;case 5:S.getLogger().debug("Rule: separator (Space) ");break;case 6:S.getLogger().debug("Rule: separator (EOF) ");break;case 7:S.getLogger().debug("Rule: hierarchy: ",o[h-1]),S.setHierarchy(o[h-1]);break;case 8:S.getLogger().debug("Stop NL ");break;case 9:S.getLogger().debug("Stop EOF ");break;case 10:S.getLogger().debug("Stop NL2 ");break;case 11:S.getLogger().debug("Stop EOF2 ");break;case 12:S.getLogger().debug("Rule: statement: ",o[h]),typeof o[h].length=="number"?this.$=o[h]:this.$=[o[h]];break;case 13:S.getLogger().debug("Rule: statement #2: ",o[h-1]),this.$=[o[h-1]].concat(o[h]);break;case 14:S.getLogger().debug("Rule: link: ",o[h],x),this.$={edgeTypeStr:o[h],label:""};break;case 15:S.getLogger().debug("Rule: LABEL link: ",o[h-3],o[h-1],o[h]),this.$={edgeTypeStr:o[h],label:o[h-1]};break;case 18:const T=parseInt(o[h]),D=S.generateId();this.$={id:D,type:"space",label:"",width:T,children:[]};break;case 23:S.getLogger().debug("Rule: (nodeStatement link node) ",o[h-2],o[h-1],o[h]," typestr: ",o[h-1].edgeTypeStr);const U=S.edgeStrToEdgeData(o[h-1].edgeTypeStr),F=S.edgeStrToEdgeStartData(o[h-1].edgeTypeStr),J=S.edgeStrToThickness(o[h-1].edgeTypeStr),B=S.edgeStrToPattern(o[h-1].edgeTypeStr);this.$=[{id:o[h-2].id,label:o[h-2].label,type:o[h-2].type,directions:o[h-2].directions},{id:o[h-2].id+"-"+o[h].id,start:o[h-2].id,end:o[h].id,label:o[h-1].label,type:"edge",thickness:J,pattern:B,directions:o[h].directions,arrowTypeEnd:U,arrowTypeStart:F},{id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions}];break;case 24:S.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[h-1],o[h]),this.$={id:o[h-1].id,label:o[h-1].label,type:S.typeStr2Type(o[h-1].typeStr),directions:o[h-1].directions,widthInColumns:parseInt(o[h],10)};break;case 25:S.getLogger().debug("Rule: nodeStatement (node) ",o[h]),this.$={id:o[h].id,label:o[h].label,type:S.typeStr2Type(o[h].typeStr),directions:o[h].directions,widthInColumns:1};break;case 26:S.getLogger().debug("APA123",this?this:"na"),S.getLogger().debug("COLUMNS: ",o[h]),this.$={type:"column-setting",columns:o[h]==="auto"?-1:parseInt(o[h])};break;case 27:S.getLogger().debug("Rule: id-block statement : ",o[h-2],o[h-1]),S.generateId(),this.$={...o[h-2],type:"composite",children:o[h-1]};break;case 28:S.getLogger().debug("Rule: blockStatement : ",o[h-2],o[h-1],o[h]);const Y=S.generateId();this.$={id:Y,type:"composite",label:"",children:o[h-1]};break;case 29:S.getLogger().debug("Rule: node (NODE_ID separator): ",o[h]),this.$={id:o[h]};break;case 30:S.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[h-1],o[h]),this.$={id:o[h-1],label:o[h].label,typeStr:o[h].typeStr,directions:o[h].directions};break;case 31:S.getLogger().debug("Rule: dirList: ",o[h]),this.$=[o[h]];break;case 32:S.getLogger().debug("Rule: dirList: ",o[h-1],o[h]),this.$=[o[h-1]].concat(o[h]);break;case 33:S.getLogger().debug("Rule: nodeShapeNLabel: ",o[h-2],o[h-1],o[h]),this.$={typeStr:o[h-2]+o[h],label:o[h-1]};break;case 34:S.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[h-3],o[h-2]," #3:",o[h-1],o[h]),this.$={typeStr:o[h-3]+o[h],label:o[h-2],directions:o[h-1]};break;case 35:case 36:this.$={type:"classDef",id:o[h-1].trim(),css:o[h].trim()};break;case 37:this.$={type:"applyClass",id:o[h-1].trim(),styleClass:o[h].trim()};break;case 38:this.$={type:"applyStyles",id:o[h-1].trim(),stylesStr:o[h].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{8:[1,20]},e(d,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:s,29:i,31:c,39:r,43:n,46:l}),e(g,[2,16],{14:22,15:y,16:w}),e(g,[2,17]),e(g,[2,18]),e(g,[2,19]),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(b,[2,25],{27:[1,25]}),e(g,[2,26]),{19:26,26:12,31:c},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(m,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(d,[2,13]),{26:35,31:c},{31:[2,14]},{17:[1,36]},e(b,[2,24]),{10:t,11:37,13:4,14:22,15:y,16:w,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:s,29:i,31:c,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(m,[2,30]),{18:[1,43]},{18:[1,44]},e(b,[2,23]),{18:[1,45]},{30:[1,46]},e(g,[2,28]),e(g,[2,35]),e(g,[2,36]),e(g,[2,37]),e(g,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(g,[2,27]),e(m,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(m,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(x,p){if(p.recoverable)this.trace(x);else{var f=new Error(x);throw f.hash=p,f}},"parseError"),parse:u(function(x){var p=this,f=[0],S=[],E=[null],o=[],k=this.table,h="",T=0,D=0,U=2,F=1,J=o.slice.call(arguments,1),B=Object.create(this.lexer),Y={yy:{}};for(var et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,et)&&(Y.yy[et]=this.yy[et]);B.setInput(x,Y.yy),Y.yy.lexer=B,Y.yy.parser=this,typeof B.yylloc>"u"&&(B.yylloc={});var rt=B.yylloc;o.push(rt);var pe=B.options&&B.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function fe(X){f.length=f.length-2*X,E.length=E.length-X,o.length=o.length-X}u(fe,"popStack");function Ct(){var X;return X=S.pop()||B.lex()||F,typeof X!="number"&&(X instanceof Array&&(S=X,X=S.pop()),X=p.symbols_[X]||X),X}u(Ct,"lex");for(var K,$,j,ft,tt={},lt,Q,Bt,ot;;){if($=f[f.length-1],this.defaultActions[$]?j=this.defaultActions[$]:((K===null||typeof K>"u")&&(K=Ct()),j=k[$]&&k[$][K]),typeof j>"u"||!j.length||!j[0]){var yt="";ot=[];for(lt in k[$])this.terminals_[lt]&&lt>U&&ot.push("'"+this.terminals_[lt]+"'");B.showPosition?yt="Parse error on line "+(T+1)+`:
2
2
  `+B.showPosition()+`
3
3
  Expecting `+ot.join(", ")+", got '"+(this.terminals_[K]||K)+"'":yt="Parse error on line "+(T+1)+": Unexpected "+(K==F?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(yt,{text:B.match,token:this.terminals_[K]||K,line:B.yylineno,loc:rt,expected:ot})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+K);switch(j[0]){case 1:f.push(K),E.push(B.yytext),o.push(B.yylloc),f.push(j[1]),K=null,D=B.yyleng,h=B.yytext,T=B.yylineno,rt=B.yylloc;break;case 2:if(Q=this.productions_[j[1]][1],tt.$=E[E.length-Q],tt._$={first_line:o[o.length-(Q||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(Q||1)].first_column,last_column:o[o.length-1].last_column},pe&&(tt._$.range=[o[o.length-(Q||1)].range[0],o[o.length-1].range[1]]),ft=this.performAction.apply(tt,[h,D,T,Y.yy,j[1],E,o].concat(J)),typeof ft<"u")return ft;Q&&(f=f.slice(0,-1*Q*2),E=E.slice(0,-1*Q),o=o.slice(0,-1*Q)),f.push(this.productions_[j[1]][0]),E.push(tt.$),o.push(tt._$),Bt=k[f[f.length-2]][f[f.length-1]],f.push(Bt);break;case 3:return!0}}return!0},"parse")},C=(function(){var N={EOF:1,parseError:u(function(p,f){if(this.yy.parser)this.yy.parser.parseError(p,f);else throw new Error(p)},"parseError"),setInput:u(function(x,p){return this.yy=p||this.yy||{},this._input=x,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var x=this._input[0];this.yytext+=x,this.yyleng++,this.offset++,this.match+=x,this.matched+=x;var p=x.match(/(?:\r\n?|\n).*/g);return p?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),x},"input"),unput:u(function(x){var p=x.length,f=x.split(/(?:\r\n?|\n)/g);this._input=x+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-p),this.offset-=p;var S=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),f.length-1&&(this.yylineno-=f.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:f?(f.length===S.length?this.yylloc.first_column:0)+S[S.length-f.length].length-f[0].length:this.yylloc.first_column-p},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-p]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(x){this.unput(this.match.slice(x))},"less"),pastInput:u(function(){var x=this.matched.substr(0,this.matched.length-this.match.length);return(x.length>20?"...":"")+x.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var x=this.match;return x.length<20&&(x+=this._input.substr(0,20-x.length)),(x.substr(0,20)+(x.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var x=this.pastInput(),p=new Array(x.length+1).join("-");return x+this.upcomingInput()+`