@bkm016/basalt 0.1.0 → 0.1.1

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 (174) hide show
  1. package/chunk-09vr609h.js +2 -0
  2. package/chunk-0qqb6v41.js +3753 -0
  3. package/{chunk-1egbcp85.js → chunk-0yytz0r1.js} +7 -7
  4. package/{chunk-rjdhaasf.js → chunk-1aspj1hn.js} +2 -2
  5. package/chunk-1b7gbe8g.js +10 -0
  6. package/{chunk-665jzf2w.js → chunk-1v7st27a.js} +11 -11
  7. package/{chunk-5fdgy0q2.js → chunk-2bb01ddq.js} +10 -10
  8. package/{chunk-kjr81mrd.js → chunk-2wkaw73s.js} +3 -3
  9. package/{chunk-xhk54h2q.js → chunk-3m7qwfm3.js} +4 -4
  10. package/{chunk-0tdv0t5q.js → chunk-44ek81ad.js} +2 -2
  11. package/{chunk-wc5j0hfw.js → chunk-45cz26ap.js} +2 -2
  12. package/{chunk-0rya8cxe.js → chunk-6e49xsf5.js} +2 -2
  13. package/{chunk-bj14jshr.js → chunk-6qertm2t.js} +2 -2
  14. package/chunk-8dxzqwq3.js +2 -0
  15. package/chunk-9mmz6wt3.js +2 -0
  16. package/{chunk-3jz9g8ab.js → chunk-a3tqx584.js} +3 -3
  17. package/{chunk-y9xe9ct2.js → chunk-a8nyk4k9.js} +1 -1
  18. package/{chunk-qffb7een.js → chunk-bhqyxyap.js} +2 -2
  19. package/chunk-bpw6q7g0.js +3 -0
  20. package/{chunk-tnrqkc7b.js → chunk-cv5wsd9m.js} +1 -1
  21. package/{chunk-5wp4egky.js → chunk-dhm42y04.js} +2 -2
  22. package/{chunk-913tfr9c.js → chunk-exnn1867.js} +1 -1
  23. package/{chunk-7yw8aa5j.js → chunk-f7egr55n.js} +4 -4
  24. package/{chunk-kgdrjqsy.js → chunk-g2t6t8fk.js} +2 -2
  25. package/{chunk-qbf8x2ft.js → chunk-h6sw8fbt.js} +1 -1
  26. package/chunk-jhd54p1b.js +3 -0
  27. package/{chunk-x9982ek7.js → chunk-kf8hq21a.js} +2 -2
  28. package/{chunk-zt1wvkyf.js → chunk-kfq8wyd3.js} +1 -1
  29. package/chunk-nt2gntad.js +2 -0
  30. package/{chunk-wd9zxhza.js → chunk-pmc3y1z8.js} +1 -1
  31. package/{chunk-3p7q2pyp.js → chunk-pvncysbb.js} +1 -1
  32. package/chunk-q8zx3kt6.js +2 -0
  33. package/{chunk-sf13azm4.js → chunk-qczbfccb.js} +3 -3
  34. package/chunk-qx0m82rw.js +2 -0
  35. package/chunk-ry0z4ev6.js +2 -0
  36. package/{chunk-g2k3yhgh.js → chunk-s37s3k24.js} +3 -3
  37. package/{chunk-y8ced1jm.js → chunk-sh74qzvt.js} +1 -1
  38. package/{chunk-9y69ywyg.js → chunk-szat3vp4.js} +2 -2
  39. package/chunk-tvm4zmgj.js +3 -0
  40. package/{chunk-8wjgbd9k.js → chunk-vgvq3q12.js} +2 -2
  41. package/{chunk-d913kpyw.js → chunk-vv7fp27r.js} +2 -2
  42. package/{chunk-97kjn55j.js → chunk-wjd9fr23.js} +1 -1
  43. package/{chunk-6gyhajhx.js → chunk-x3dnb9sz.js} +2 -2
  44. package/chunk-xysny0ve.js +3 -0
  45. package/{chunk-qcwnkr5y.js → chunk-yskm0hsy.js} +1 -1
  46. package/{chunk-sytpmbfp.js → chunk-zef13k3h.js} +36 -36
  47. package/cli.js +89 -0
  48. package/compiled.js +12 -3762
  49. package/package.json +4 -3
  50. package/ui-test-worker.js +31 -31
  51. package/web/{chunk-rkesqprv.js → chunk-05w4fyzc.js} +1 -1
  52. package/web/{chunk-ev1g5cqw.js → chunk-0vt9fg48.js} +1 -1
  53. package/web/{chunk-55kw67nv.js → chunk-22a4ety5.js} +1 -1
  54. package/web/{chunk-hryhthxr.js → chunk-2m12wyrb.js} +1 -1
  55. package/web/{chunk-svmhj9hd.js → chunk-2msj52w6.js} +1 -1
  56. package/web/{chunk-rsn8j7xv.js → chunk-2ps6mepk.js} +1 -1
  57. package/web/chunk-2pver6r4.js +1 -0
  58. package/web/{chunk-1t760bg0.js → chunk-2scce33n.js} +1 -1
  59. package/web/chunk-37ajk6zg.js +2 -0
  60. package/web/{chunk-haphmhz8.js → chunk-3ee04tmm.js} +1 -1
  61. package/web/{chunk-c85wxnpw.js → chunk-3jhyzmnf.js} +1 -1
  62. package/web/{chunk-pz934t6t.js → chunk-45fzdcgz.js} +1 -1
  63. package/web/{chunk-ea9swkkt.js → chunk-4ks96e4r.js} +1 -1
  64. package/web/{chunk-0k0hvh59.js → chunk-4v8en1yw.js} +1 -1
  65. package/web/chunk-4wkm9fda.js +1 -0
  66. package/web/{chunk-zk2f7x5e.js → chunk-5vw9rs4r.js} +1 -1
  67. package/web/{chunk-mq92vqb1.js → chunk-70qwwwak.js} +1 -1
  68. package/web/{chunk-4b5mt5pd.js → chunk-8p4tc9f4.js} +1 -1
  69. package/web/{chunk-3pm4645m.js → chunk-90kp4pnz.js} +1 -1
  70. package/web/{chunk-ytpwz01r.js → chunk-9an7cjd9.js} +1 -1
  71. package/web/{chunk-29e1trsq.js → chunk-9dxjafp2.js} +1 -1
  72. package/web/{chunk-ykxpb3wv.js → chunk-9p12mgs6.js} +1 -1
  73. package/web/{chunk-sc63gh9d.js → chunk-9yakxvjb.js} +1 -1
  74. package/web/{chunk-fdkp6tzq.js → chunk-a1z5qx1r.js} +1 -1
  75. package/web/{chunk-v6v831tc.js → chunk-a3verqw9.js} +1 -1
  76. package/web/{chunk-vqjs551t.js → chunk-a5x2zveg.js} +1 -1
  77. package/web/chunk-amzgyy1k.js +1 -0
  78. package/web/{chunk-e5rmr47n.js → chunk-b1pe46zz.js} +1 -1
  79. package/web/{chunk-1v3d60pp.js → chunk-b4wbk7vc.js} +1 -1
  80. package/web/{chunk-3bqh2dkw.js → chunk-bc78qf1m.js} +1 -1
  81. package/web/{chunk-tfyxp2qs.js → chunk-bgnnrpna.js} +1 -1
  82. package/web/{chunk-vadqkz3x.js → chunk-bj90t5gh.js} +1 -1
  83. package/web/{chunk-mdsgekpk.js → chunk-bjkc94mv.js} +1 -1
  84. package/web/{chunk-3cfabjey.js → chunk-ca682sm6.js} +1 -1
  85. package/web/chunk-cff5hcm8.js +8 -0
  86. package/web/{chunk-942prjb6.js → chunk-dt462hk9.js} +1 -1
  87. package/web/{chunk-bwyw10wx.js → chunk-dzwxgqgm.js} +1 -1
  88. package/web/{chunk-bhe4jzha.js → chunk-e32y85kx.js} +1 -1
  89. package/web/{chunk-v47rhg7b.js → chunk-e53wfgb8.js} +1 -1
  90. package/web/{chunk-ezyvv4ab.js → chunk-e6jxqbv7.js} +1 -1
  91. package/web/chunk-esp1mmgr.js +1 -0
  92. package/web/chunk-ew3cgdtd.js +1 -0
  93. package/web/{chunk-svdzmaxb.js → chunk-f26smjjf.js} +1 -1
  94. package/web/{chunk-jvhmna7z.js → chunk-fk0dh93x.js} +1 -1
  95. package/web/{chunk-3pf33xsm.js → chunk-fm2ybfj5.js} +1 -1
  96. package/web/{chunk-6r912gfj.js → chunk-fscafg24.js} +1 -1
  97. package/web/{chunk-canbct9d.js → chunk-fz06t6km.js} +1 -1
  98. package/web/{chunk-rz6wwdd5.js → chunk-g4azyef7.js} +1 -1
  99. package/web/chunk-gjq1pxw3.js +1 -0
  100. package/web/{chunk-0xck277j.js → chunk-gqw3f02j.js} +1 -1
  101. package/web/chunk-h5ejbf6e.js +1 -0
  102. package/web/{chunk-kbtbbarw.js → chunk-hev4hq89.js} +1 -1
  103. package/web/chunk-jjh5jvva.js +1 -0
  104. package/web/{chunk-a3xt6840.js → chunk-jrcyc9s9.js} +1 -1
  105. package/web/{chunk-4y2td14d.js → chunk-jwzd9tzk.js} +1 -1
  106. package/web/chunk-k5btcvbg.js +1 -0
  107. package/web/{chunk-z1jtv4c0.js → chunk-kdyjnwdx.js} +1 -1
  108. package/web/chunk-kpvgecwy.js +1 -0
  109. package/web/chunk-kq40ss39.js +1 -0
  110. package/web/{chunk-ghxe4gam.js → chunk-p3b9crsa.js} +1 -1
  111. package/web/{chunk-zakv2xdf.js → chunk-pf2ab8p8.js} +1 -1
  112. package/web/{chunk-d4d3mnak.js → chunk-q0p5xqe1.js} +1 -1
  113. package/web/{chunk-5hex8g0y.js → chunk-q5ke7a33.js} +1 -1
  114. package/web/chunk-q7dsnvpf.js +1 -0
  115. package/web/{chunk-vfqe8298.js → chunk-qd8bxxdj.js} +1 -1
  116. package/web/{chunk-3ahpr030.js → chunk-qefasa1j.js} +1 -1
  117. package/web/{chunk-x9q4kh67.js → chunk-qh7265qw.js} +1 -1
  118. package/web/{chunk-hejz98gw.js → chunk-qnaqf0cr.js} +1 -1
  119. package/web/chunk-rg426vkf.js +1 -0
  120. package/web/{chunk-s8vapqgr.js → chunk-rpmpttbk.js} +1 -1
  121. package/web/chunk-scpwc9ev.js +1 -0
  122. package/web/{chunk-b5brnfv9.js → chunk-ss1bcb0n.js} +1 -1
  123. package/web/chunk-ssy07dd2.js +1 -0
  124. package/web/{chunk-gxn0bey7.js → chunk-taynqrgq.js} +2 -2
  125. package/web/chunk-tgpbhzn9.js +1 -0
  126. package/web/{chunk-ejd43q75.js → chunk-tmvakq7n.js} +2 -2
  127. package/web/{chunk-nerx2q12.js → chunk-tqmwd9qp.js} +1 -1
  128. package/web/{chunk-n5fn9khr.js → chunk-v28fx2nd.js} +1 -1
  129. package/web/{chunk-32ezm0ry.js → chunk-vt40e1kp.js} +39 -39
  130. package/web/chunk-w53rba6g.js +1 -0
  131. package/web/chunk-w86n42dy.js +1 -0
  132. package/web/{chunk-ktqt87qw.js → chunk-w880psmw.js} +1 -1
  133. package/web/{chunk-p8y0hjx9.js → chunk-wptv8atc.js} +1 -1
  134. package/web/{chunk-g9qv15hq.js → chunk-xbty0rv7.js} +1 -1
  135. package/web/{chunk-7f0m2yrd.js → chunk-xjxv8dg8.js} +1 -1
  136. package/web/{chunk-x3zwjkwg.js → chunk-xrxne80b.js} +1 -1
  137. package/web/{chunk-jtwhjp20.js → chunk-y0m8hrwz.js} +2 -2
  138. package/web/{chunk-6atq9qtt.js → chunk-y49fhfda.js} +1 -1
  139. package/web/{chunk-1x8fn8w9.js → chunk-yd46jhqv.js} +1 -1
  140. package/web/{chunk-ngpq43vn.js → chunk-z7dcbxws.js} +1 -1
  141. package/web/chunk-zde7mj43.js +1 -0
  142. package/web/index.html +1 -1
  143. package/worker.js +1 -1
  144. package/chunk-1fv27j4b.js +0 -3
  145. package/chunk-356q8e0y.js +0 -10
  146. package/chunk-b9bg5fhd.js +0 -2
  147. package/chunk-j2x0g1vg.js +0 -2
  148. package/chunk-k0t23cmx.js +0 -2
  149. package/chunk-m38ber71.js +0 -2
  150. package/chunk-rad3dm0q.js +0 -2
  151. package/chunk-tjpvayr1.js +0 -2
  152. package/chunk-ve7qx8wm.js +0 -3
  153. package/chunk-yb1jxgnk.js +0 -2
  154. package/web/chunk-00mq7bhx.js +0 -1
  155. package/web/chunk-0atfn8jf.js +0 -1
  156. package/web/chunk-310yey4q.js +0 -1
  157. package/web/chunk-3hvgs5aw.js +0 -1
  158. package/web/chunk-3kh6zefg.js +0 -1
  159. package/web/chunk-401v5ht6.js +0 -8
  160. package/web/chunk-5r5kv4gh.js +0 -1
  161. package/web/chunk-95q1bwxn.js +0 -1
  162. package/web/chunk-9s7c178f.js +0 -1
  163. package/web/chunk-benmmqt2.js +0 -1
  164. package/web/chunk-bgqdcnke.js +0 -1
  165. package/web/chunk-eqegxtdt.js +0 -1
  166. package/web/chunk-gmfp7fg4.js +0 -1
  167. package/web/chunk-gxay64d5.js +0 -1
  168. package/web/chunk-jg6nzn6q.js +0 -1
  169. package/web/chunk-kx2xk3bb.js +0 -1
  170. package/web/chunk-vfqdy860.js +0 -1
  171. package/web/chunk-x59p8sg2.js +0 -1
  172. package/web/chunk-y7z144e3.js +0 -1
  173. package/web/chunk-ydgqrfvw.js +0 -2
  174. package/web/chunk-yj1a2d37.js +0 -1
@@ -1,4 +1,4 @@
1
- import{z,o,g,i,a,v,t,n,_,V,li,bo,Hi,Mr,tr,xo,Yi,_o,Jr,ea,Pn,ci,ui}from"./chunk-32ezm0ry.js";var M={sealed:"已封存",folded:"已折叠",archived:"已移出"},T=["bg-accent","bg-accent-strong","bg-warning","bg-success"];function P(e,d){if(e.startsWith("recent-"))return"json";let c=d.trimStart();if(!c)return"markdown";if(c.startsWith("{")||c.startsWith("["))return"json";if(/^<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>/.test(c))return"xml";return"markdown"}function W(e){if(!e||e.length>32000)return e;if(!e.trimStart().startsWith("<"))return e;let c=[],m=0,s=(p)=>" ".repeat(p),l=/(<([a-zA-Z_][\w.-]*)(?:\s+[^>]*)?>([^\r\n<]*)<\/\2>)|(<\/[a-zA-Z_][\w.-]*>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?\/>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>)|([^<]+)/g,u;while((u=l.exec(e))!==null){let[,p,,,f,r,x,y]=u;if(p)c.push(`${s(m)}${p.trim()}`);else if(f)m=Math.max(0,m-1),c.push(`${s(m)}${f.trim()}`);else if(x)c.push(`${s(m)}${x.trim()}`),m++;else if(r)c.push(`${s(m)}${r.trim()}`);else if(y){let h=y.trim();if(h)for(let w of h.split(/\r?\n/)){let E=w.trim();if(E)c.push(`${s(m)}${E}`)}}}return c.length>0?c.join(`
1
+ import{z,o,g,i,a,v,t,n,_,V,li,bo,Hi,Mr,tr,xo,Yi,_o,Jr,ea,Pn,ci,ui}from"./chunk-vt40e1kp.js";var M={sealed:"已封存",folded:"已折叠",archived:"已移出"},T=["bg-accent","bg-accent-strong","bg-warning","bg-success"];function P(e,d){if(e.startsWith("recent-"))return"json";let c=d.trimStart();if(!c)return"markdown";if(c.startsWith("{")||c.startsWith("["))return"json";if(/^<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>/.test(c))return"xml";return"markdown"}function W(e){if(!e||e.length>32000)return e;if(!e.trimStart().startsWith("<"))return e;let c=[],m=0,s=(p)=>" ".repeat(p),l=/(<([a-zA-Z_][\w.-]*)(?:\s+[^>]*)?>([^\r\n<]*)<\/\2>)|(<\/[a-zA-Z_][\w.-]*>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?\/>)|(<[a-zA-Z_][\w.-]*(?:\s+[^>]*)?>)|([^<]+)/g,u;while((u=l.exec(e))!==null){let[,p,,,f,r,x,y]=u;if(p)c.push(`${s(m)}${p.trim()}`);else if(f)m=Math.max(0,m-1),c.push(`${s(m)}${f.trim()}`);else if(x)c.push(`${s(m)}${x.trim()}`),m++;else if(r)c.push(`${s(m)}${r.trim()}`);else if(y){let h=y.trim();if(h)for(let w of h.split(/\r?\n/)){let E=w.trim();if(E)c.push(`${s(m)}${E}`)}}}return c.length>0?c.join(`
2
2
  `):e}function R(){return n("div",{role:"status","aria-busy":"true","aria-label":"正在加载上下文",className:"space-y-2 animate-pulse",children:[t("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),t("div",{className:"h-10 rounded-xl border border-line bg-panel/40"}),t("div",{className:"h-10 rounded-xl border border-line bg-panel/40"})]})}function k(e){let{style:d}=_();return t("p",{className:d("surface.empty"),children:e.children})}function B(e){let{cn:d}=_();if(!e.items.length)return t(k,{children:"新会话还没有上下文。发送第一条消息后,这里会显示构成。"});let c=e.items.reduce((m,s)=>m+s.tokens,0)||1;return n("div",{className:"space-y-2.5",children:[t("div",{className:"flex h-2 overflow-hidden rounded-full bg-raised",children:e.items.map((m,s)=>t("span",{className:d(T[s%T.length],"transition-[width] duration-300 ease-out-quint"),title:`${m.label}:${m.tokens.toLocaleString()} token`,style:{width:`${m.tokens/c*100}%`}},m.id))}),t("div",{className:"space-y-1.5",children:e.items.map((m,s)=>t(Z,{item:m,total:c,index:s,color:T[s%T.length]??"bg-accent"},m.id))})]})}function Z(e){let{cn:d,Chevron:c,CopyButton:m,Code:s,style:l,useTheme:u}=_();u();let[p,f]=a(!1),r=(e.item.tokens/e.total*100).toFixed(1),x=g(()=>p&&e.item.detail?tr(e.item.detail):"",[p,e.item.detail]),y=g(()=>x?P(e.item.id,x):"markdown",[x,e.item.id]),h=g(()=>{if(!x)return"";return y==="xml"?W(x):x},[x,y]);return n("div",{"data-state":p?"open":"closed",className:l("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":p,onClick:()=>f((w)=>!w),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs",children:[t("span",{className:d("size-2 shrink-0 rounded-full",e.color),"aria-hidden":!0}),t("span",{className:"min-w-0 flex-1 truncate font-medium text-ink",children:e.item.label}),e.item.state&&t("span",{className:l("control.badge","text-[10px]"),children:M[e.item.state]}),t("span",{className:"font-mono tabular-nums text-dim",children:e.item.tokens.toLocaleString()}),n("span",{className:"w-10 text-right font-mono text-[11px] tabular-nums text-faint",children:[r,"%"]}),t(c,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),p&&n("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2 text-xs text-dim",children:[t("div",{className:"mb-2 h-1 overflow-hidden rounded-full bg-raised",children:t("div",{className:d("h-full",e.color),style:{width:`${r}%`}})}),h?n("div",{className:l("surface.subtle","group/detail relative overflow-hidden rounded-lg bg-panel/70 p-2.5"),children:[t("div",{className:"absolute right-1.5 top-1.5 z-10",children:t(m,{text:e.item.detail,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),t("div",{className:"max-h-80 overflow-y-auto pr-6 text-dim",children:t(s,{code:h,lang:y,className:"text-[11px]! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})})]}):t("p",{className:"py-2 text-center text-xs text-faint",children:"(空)"})]})]})}var I=40,K={accent:"bg-accent/15 text-accent",success:"bg-success/15 text-success",warning:"bg-warning/15 text-warning",danger:"bg-danger/15 text-danger",neutral:"bg-raised text-dim"};function A(e){let{Button:d,CopyButton:c,style:m,useTheme:s}=_();s();let[l,u]=a(I),p=i(null),f=l<e.entries.length;o(()=>{let x=p.current;if(!x||!f||typeof IntersectionObserver>"u")return;let y=new IntersectionObserver((h)=>{if(h.some((w)=>w.isIntersecting))u((w)=>Math.min(e.entries.length,w+I))},{rootMargin:"480px"});return y.observe(x),()=>y.disconnect()},[f,e.entries.length]);let r=g(()=>e.entries.slice(-l).reverse(),[e.entries,l]);if(!e.entries.length)return t(k,{children:"还没有消息。"});return n("div",{className:"space-y-1.5",children:[n("div",{className:m("surface.subtle","flex items-center justify-between px-3 py-1.5 text-xs text-faint"),children:[n("span",{children:["共 ",e.entries.length," 条记录"]}),t(c,{text:()=>e.entries.map((x)=>JSON.stringify(x,null,2)).join(`
3
3
 
4
4
  `),size:"icon-xs",label:"复制全部原始 JSON",className:"hover:bg-raised text-faint hover:text-ink"})]}),r.map((x)=>t(H,{entry:x},x.seq)),f&&n("div",{ref:p,className:m("surface.subtle","flex items-center justify-between bg-panel/40 px-3 py-2 text-xs text-faint"),children:[n("span",{children:["已显示 ",r.length," / ",e.entries.length," 条"]}),n("div",{className:"flex items-center gap-1.5",children:[t(d,{size:"sm",variant:"ghost",onClick:()=>u((x)=>Math.min(e.entries.length,x+I)),children:"加载更多"}),t(d,{size:"sm",variant:"ghost",onClick:()=>u(e.entries.length),children:"显示全部"})]})]})]})}var H=z(function(d){let{Chevron:c,CopyButton:m,style:s,useTheme:l}=_();l();let[u,p]=a(!1),f=xo(d.entry),r=g(()=>bo(d.entry.time),[d.entry.time]);return n("div",{"data-state":u?"open":"closed",className:s("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":u,onClick:()=>p((x)=>!x),className:"flex w-full items-center gap-2 px-3 py-2 text-left text-xs",children:[n("span",{className:"shrink-0 font-mono text-[10.5px] tabular-nums text-faint",children:["#",d.entry.seq]}),t("span",{className:s("control.badge","shrink-0 font-medium text-[10px]",K[f.tone]),children:f.badge}),t("span",{className:"min-w-0 flex-1 truncate text-ink",children:f.title}),f.meta&&t("span",{className:s("control.badge","shrink-0 font-mono text-[10px] text-faint"),children:f.meta}),t("span",{className:"shrink-0 font-mono text-[10.5px] tabular-nums text-faint",children:r}),t(c,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),u&&t("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2.5 text-xs text-dim",children:n("div",{className:"space-y-2",children:[n("div",{className:"flex items-center justify-between text-[11px] text-faint",children:[n("span",{className:"font-mono",children:[d.entry.type," · #",d.entry.seq]}),t(m,{text:()=>JSON.stringify(d.entry,null,2),size:"icon-xs",label:"复制此条 JSON",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink"})]}),t(X,{entry:d.entry})]})})]})});function X(e){let{Code:d,style:c,useTheme:m}=_();m();let s=e.entry;if(s.type==="user")return n("div",{className:"space-y-2",children:[s.text&&t("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:Mr(s.text)}),s.attachments&&s.attachments.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-[10.5px] font-medium text-faint",children:["附件(",s.attachments.length,")"]}),t("div",{className:"flex flex-wrap gap-1.5",children:s.attachments.map((l,u)=>{let p=l.kind==="image"?Math.floor(l.data.length*0.75):l.data.length;return n("div",{className:c("surface.subtle","inline-flex items-center gap-1.5 px-2 py-1 text-[11px]"),children:[t("span",{className:c("control.badge","text-[10px] text-faint"),children:l.kind==="image"?"图片":l.kind==="path"?"路径":"文本"}),t("span",{className:"max-w-40 truncate font-medium text-ink",children:l.name}),n("span",{className:"font-mono text-[10px] text-faint",children:[l.mimeType," · ",Hi(p)]})]},`${l.name}-${u}`)})})]}),s.notices&&s.notices.length>0&&n("div",{className:"space-y-1",children:[n("div",{className:"text-[10.5px] font-medium text-faint",children:["通知来源(",s.notices.length,")"]}),s.notices.map((l)=>n("div",{className:c("surface.subtle","flex items-center justify-between px-2.5 py-1.5 font-mono text-[11px]"),children:[n("span",{className:"truncate text-ink",children:[l.sourceKind,"/",l.sourceID]}),t("span",{className:"text-faint",children:l.state})]},l.dedupeKey))]})]});if(s.type==="assistant")return n("div",{className:"space-y-2",children:[n("div",{className:"font-mono text-[11px] text-faint",children:["模型:",s.model]}),s.error&&t("div",{className:"rounded-lg border border-danger/30 bg-danger/8 px-2.5 py-2 text-xs text-danger",children:s.error}),s.parts.map((l,u)=>{if(l.type==="thinking")return n("div",{className:c("surface.subtle","p-2.5 space-y-1"),children:[t("div",{className:"text-[10.5px] font-medium text-faint",children:"思考"}),t("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs italic leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:Mr(l.text)})]},`thinking-${u}`);if(l.type==="text")return n("div",{className:c("surface.subtle","p-2.5 space-y-1"),children:[t("div",{className:"text-[10.5px] font-medium text-faint",children:"回复"}),t("pre",{className:"max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-ink whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:Mr(l.text)})]},`text-${u}`);return n("div",{className:c("surface.subtle","p-2.5 space-y-1.5"),children:[n("div",{className:"flex items-center justify-between gap-2 text-[11px]",children:[n("span",{className:"font-mono font-medium text-ink",children:["工具调用 · ",l.name]}),t("span",{className:"truncate font-mono text-[10px] text-faint",children:l.id})]}),t("div",{className:"max-h-60 overflow-y-auto text-dim",children:t(d,{code:tr(JSON.stringify(l.input,Yi,2)),lang:"json",className:"text-[11px]! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})})]},l.id||`tool-${u}`)})]});if(s.type==="tool_result")return n("div",{className:"space-y-2",children:[n("div",{className:"flex flex-wrap items-center gap-2 font-mono text-[11px] text-faint",children:[t("span",{className:"text-ink",children:s.name}),t("span",{children:"·"}),t("span",{className:"truncate",children:s.callID}),t("span",{className:c("control.badge","ml-auto font-sans text-[10px]",s.isError?"bg-danger/15 text-danger":"text-dim"),children:s.isError?"执行失败":"执行完成"})]}),s.images&&s.images.length>0&&t("div",{className:"flex flex-wrap gap-1.5",children:s.images.map((l,u)=>n("span",{className:c("surface.subtle","px-2 py-1 font-mono text-[10.5px] text-faint"),children:["图片 #",u+1," · ",l.mimeType," · ",Hi(Math.floor(l.data.length*0.75))]},`${l.mimeType}-${u}`))}),li(s.output)?t("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-[11px] leading-relaxed whitespace-pre-wrap break-words [overflow-wrap:anywhere]",s.isError?"text-danger":"text-dim"),children:Mr(s.output)}):t("p",{className:"py-1 text-faint",children:"(无文本输出)"})]});return t("pre",{className:c("surface.subtle","max-h-72 overflow-y-auto p-2.5 font-mono text-[11px] leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]"),children:_o(s)})}function L(e){let{cn:d,style:c,useTheme:m}=_();if(m(),!e.todos.length)return t(k,{children:"暂无待办。"});return t("ul",{className:"space-y-1.5",children:e.todos.map((s)=>n("li",{className:c("surface.interactive","flex items-start gap-2.5 px-3 py-2 text-xs"),children:[n("span",{className:d("mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full border transition-colors duration-300",s.status==="completed"&&"border-success bg-success text-panel",s.status==="in_progress"&&"border-accent",s.status==="pending"&&"border-line-strong"),children:[s.status==="completed"&&t(V,{className:"size-2.5 animate-pop",strokeWidth:3.5}),s.status==="in_progress"&&t("span",{className:"size-1.5 animate-pulse rounded-full bg-accent"})]}),t("span",{className:d("min-w-0 flex-1 break-words leading-relaxed [overflow-wrap:anywhere]",s.status==="completed"&&"text-faint line-through decoration-faint/60",s.status==="in_progress"&&"font-medium text-ink",s.status==="pending"&&"text-dim"),children:s.content})]},`${s.status}-${s.content}`))})}function O(e){let{cn:d,style:c,useTheme:m}=_();m();let[s,l]=a("all"),u=g(()=>e.tools.filter((r)=>r.deferred).length,[e.tools]),p=e.tools.length-u,f=g(()=>{if(s==="deferred")return e.tools.filter((r)=>r.deferred);if(s==="active")return e.tools.filter((r)=>!r.deferred);return e.tools},[e.tools,s]);if(!e.tools.length)return t(k,{children:"当前会话没有可用工具。"});return n("div",{className:"space-y-2",children:[u>0&&n("div",{className:"flex items-center gap-1 text-[11px]",children:[n("button",{type:"button",onClick:()=>l("all"),className:d("rounded-lg px-2 py-1 transition-colors",s==="all"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["全部 (",e.tools.length,")"]}),n("button",{type:"button",onClick:()=>l("active"),className:d("rounded-lg px-2 py-1 transition-colors",s==="active"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["常驻 (",p,")"]}),n("button",{type:"button",onClick:()=>l("deferred"),className:d("rounded-lg px-2 py-1 transition-colors",s==="deferred"?"bg-raised font-medium text-ink":"text-faint hover:text-dim"),children:["延迟加载 (",u,")"]})]}),t("div",{className:"space-y-1.5",children:f.map((r)=>t(G,{tool:r},`${r.group}-${r.name}`))})]})}function G(e){let{Chevron:d,CopyButton:c,Code:m,style:s,useTheme:l}=_();l();let[u,p]=a(!1),f=g(()=>u?JSON.stringify(e.tool.schema,null,2):"",[u,e.tool.schema]);return n("div",{"data-state":u?"open":"closed",className:s("surface.interactive","group/collapsible"),children:[n("button",{type:"button","aria-expanded":u,onClick:()=>p((r)=>!r),className:"flex w-full items-center justify-between px-3 py-2 text-left text-xs",children:[n("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 truncate font-mono text-ink",children:[t("span",{className:"truncate",children:e.tool.name}),e.tool.group&&t("span",{className:s("control.badge","font-sans text-[10px]"),children:e.tool.group}),e.tool.deferred&&t("span",{className:s("control.badge","font-sans text-[10px]"),children:"延迟加载"})]}),t(d,{className:"-rotate-90 text-faint group-data-[state=open]/collapsible:rotate-90"})]}),u&&n("div",{className:"border-t border-line/60 bg-raised/20 px-3 py-2 text-xs text-dim",children:[e.tool.deferred&&t("div",{className:s("surface.subtle","mb-2 px-2.5 py-1.5 text-[11px] text-faint"),children:"延迟加载:此工具默认以精简描述挂载,模型通过 toolsearch 取回定义后才向上下文注入完整参数 Schema。"}),e.tool.description&&t("pre",{className:"mb-2 max-h-60 overflow-y-auto font-sans text-xs leading-relaxed text-dim whitespace-pre-wrap break-words [overflow-wrap:anywhere]",children:tr(e.tool.description)}),n("div",{className:s("surface.subtle","group/schema relative overflow-hidden rounded-lg p-2.5"),children:[t("div",{className:"absolute right-1.5 top-1.5 z-10",children:t(c,{text:f,size:"icon-xs",className:"bg-raised/60 hover:bg-raised text-faint hover:text-ink backdrop-blur-sm"})}),t("div",{className:"max-h-72 overflow-y-auto pr-6 text-dim",children:t(m,{code:tr(f),lang:"json",className:"text-[11px]! leading-relaxed! [&_pre]:whitespace-pre-wrap [&_pre]:break-words [&_pre]:[overflow-wrap:anywhere]"})})]})]})]})}function Q(){try{let e=localStorage.getItem("basalt.contextSidebar.tab");if(e==="tools"||e==="todos"||e==="raw")return e}catch{}return"breakdown"}function Y(e){let{style:d,useTheme:c}=_();return c(),n("div",{className:d("surface.panel","bg-panel/70 px-3 py-2"),children:[t("div",{className:"text-[10px] font-medium uppercase tracking-wider text-faint",children:e.label}),t("div",{className:"mt-0.5 truncate font-mono text-xs font-semibold tabular-nums text-ink",children:e.value})]})}function Pe(e){let{Button:d,StatusChip:c,Segmented:m,cn:s,style:l,useTheme:u}=_();u();let[p,f]=a(Q),[r,x]=a(()=>Pn.get(e.session.id)),[y,h]=a(!1),[w,E]=a(0),[D,j]=a(!1);o(()=>{let b=setTimeout(()=>j(!0),140);return()=>clearTimeout(b)},[]),o(()=>{let b=Pn.get(e.session.id);if(b)x(b);return ci((C,F)=>{if(C===e.session.id)x(F)})},[e.session.id]),o(()=>{let b=new AbortController;return h(!1),e.connection.request(`/api/sessions/${encodeURIComponent(e.session.id)}/context`,{signal:AbortSignal.any([b.signal,AbortSignal.timeout(15000)])}).then((C)=>{if(!b.signal.aborted)ui(e.session.id,C),x(C)},()=>{if(!b.signal.aborted)h(!0)}),()=>b.abort()},[e.connection,e.session.id,e.session.updated,e.entries.length,w]);let N=Jr(r?.items??[],r?.usableWindow,r?.calibratedTokens,r?.lastInputTokens,r?.hasPendingOutput),S=ea(N.percent),U=(b)=>{f(b);try{localStorage.setItem("basalt.contextSidebar.tab",b)}catch{}},J=[{value:"breakdown",label:"构成"},{value:"tools",label:n("span",{className:"inline-flex items-center gap-1",children:["工具",r&&t("span",{className:"text-[10px] text-faint tabular-nums",children:r.tools.length})]})},{value:"todos",label:n("span",{className:"inline-flex items-center gap-1",children:["待办",e.session.todos.length>0&&t("span",{className:"text-[10px] text-faint tabular-nums",children:e.session.todos.length})]})},{value:"raw",label:"原始消息"}],q=n("div",{className:"border-b border-line px-3.5 py-3",children:[n("div",{className:"flex items-start justify-between gap-3",children:[n("div",{children:[t("div",{className:"text-[10.5px] font-medium uppercase tracking-wider text-faint",children:"上下文用量"}),n("div",{className:"mt-0.5 flex items-baseline gap-1.5",children:[t("span",{className:"font-mono text-xl font-semibold tabular-nums text-ink",children:r?N.totalTokens.toLocaleString():"—"}),n("span",{className:"font-mono text-xs text-dim",children:["/ ",r?.usableWindow.toLocaleString()??"—"]})]})]}),t(c,{tone:S==="overflow"||S==="near_limit"?"danger":S==="sealing"?"warning":"success",children:S==="overflow"?"预计超限":S==="near_limit"?"接近上限":S==="sealing"?"接近封存":"正常"})]}),N.percent!==null&&t("meter",{className:"sr-only","aria-label":"可用上下文窗口占比",min:0,max:100,value:Math.min(100,N.percent)}),t("div",{"aria-hidden":!0,className:s("relative mt-2.5 h-2 w-full overflow-hidden rounded-full bg-raised",!r&&"animate-pulse"),children:t("div",{className:"h-full rounded-full bg-accent transition-[width] duration-500 ease-out-quint",style:{width:`${Math.min(100,N.percent??0)}%`}})}),n("div",{className:"mt-2 flex items-center justify-between text-[11px]",children:[t("span",{className:"text-dim",children:N.percent===null?"暂无窗口数据":`${N.percent.toFixed(1)}% 可用窗口`}),n("span",{className:"text-faint",children:["总窗口 ",r?.contextWindow.toLocaleString()??"—"," · 80% 封存 · 97% 折叠"]})]}),r?.usage&&(r.usage.input>0||r.usage.output>0||r.usage.cacheRead>0||r.usage.cacheWrite>0||r.usage.cost>0)&&t("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[["Input",r.usage.input.toLocaleString()],["Output",r.usage.output.toLocaleString()],["Cache",`${r.usage.cacheRead.toLocaleString()} / ${r.usage.cacheWrite.toLocaleString()}`],["平均 TPS",r.usage.tps!==void 0?`${r.usage.tps.toFixed(1)} tok/s`:"—"]].map(([b,C])=>t(Y,{label:b,value:C},b))})]});return n(v,{children:[q,t("div",{className:"border-b border-line px-3 py-2",children:t(m,{value:p,onChange:U,options:J,className:"w-full grid grid-cols-4"})}),n("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[y&&!r&&n("div",{role:"alert",className:"flex items-center justify-between rounded-xl border border-danger/30 bg-danger/8 px-3 py-2 text-xs text-danger",children:[t("span",{children:"上下文加载失败。"}),t(d,{size:"sm",variant:"ghost",onClick:()=>E((b)=>b+1),children:"重试"})]}),t("div",{children:!D?t(R,{}):n(v,{children:[p==="raw"&&t(A,{entries:e.entries}),p==="todos"&&t(L,{todos:e.session.todos}),p==="breakdown"&&(r?t(B,{items:N.items}):!y?t(R,{}):null),p==="tools"&&(r?t(O,{tools:r.tools??[]}):!y?t(R,{}):null)]})},p)]})]})}export{Pe as ContextSidebar};
@@ -1,2 +1,2 @@
1
- import{a,v,t,n,_,l,Z,ce,Jn}from"./chunk-32ezm0ry.js";var u=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],s=l("code-xml",u);function Fr(e){let o=_();o.useTheme();let[m,c]=a("preview"),r=e.streaming&&!e.rendered,d=!e.streaming&&!e.rendered&&Boolean(e.error),i=m==="code"||r;return n(o.Panel,{"aria-label":e.title,"data-render-pending":e.pending&&!d?"true":void 0,className:"group/graph relative my-4 font-sans not-italic first:mt-0 last:mb-0",children:[t("div",{role:"toolbar","aria-label":`${e.title}操作`,className:r?"absolute top-2 right-2 z-10 flex items-center":o.style("surface.toolbarFloating","absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 group-hover/graph:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-70"),children:r?n("span",{className:o.style("control.badge","gap-1.5 rounded-full px-2 py-0.5 text-[11px]"),children:[t(ce,{className:"size-3 animate-spin"}),"生成",e.title]}):n(v,{children:[t("button",{type:"button","aria-label":i?"查看图表":"查看代码",title:i?"查看图表":"查看代码",onClick:()=>c(i?"preview":"code"),className:"flex size-6 items-center justify-center rounded-md text-dim hover:bg-raised hover:text-ink [&_svg]:size-3.5",children:i?t(Jn,{}):t(s,{})}),t(o.CopyButton,{text:e.code,size:"icon-sm",label:"复制代码"})]})}),i&&t(o.Code,{code:e.code,lang:e.codeLang,className:"px-4 py-3"}),d&&!i&&n("div",{role:"alert",className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[t(Z,{className:"size-5 text-warning"}),t("p",{className:"max-w-full text-xs break-words text-dim",children:e.error}),t("button",{type:"button",onClick:()=>c("code"),className:"text-xs text-accent-strong underline underline-offset-2",children:"查看代码"})]}),t("div",{hidden:i||d,children:e.children})]})}
1
+ import{a,v,t,n,_,l,Z,ce,Jn}from"./chunk-vt40e1kp.js";var u=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],s=l("code-xml",u);function Fr(e){let o=_();o.useTheme();let[m,c]=a("preview"),r=e.streaming&&!e.rendered,d=!e.streaming&&!e.rendered&&Boolean(e.error),i=m==="code"||r;return n(o.Panel,{"aria-label":e.title,"data-render-pending":e.pending&&!d?"true":void 0,className:"group/graph relative my-4 font-sans not-italic first:mt-0 last:mb-0",children:[t("div",{role:"toolbar","aria-label":`${e.title}操作`,className:r?"absolute top-2 right-2 z-10 flex items-center":o.style("surface.toolbarFloating","absolute top-2 right-2 z-10 opacity-0 transition-opacity duration-150 group-hover/graph:opacity-100 focus-within:opacity-100 [@media(hover:none)]:opacity-70"),children:r?n("span",{className:o.style("control.badge","gap-1.5 rounded-full px-2 py-0.5 text-[11px]"),children:[t(ce,{className:"size-3 animate-spin"}),"生成",e.title]}):n(v,{children:[t("button",{type:"button","aria-label":i?"查看图表":"查看代码",title:i?"查看图表":"查看代码",onClick:()=>c(i?"preview":"code"),className:"flex size-6 items-center justify-center rounded-md text-dim hover:bg-raised hover:text-ink [&_svg]:size-3.5",children:i?t(Jn,{}):t(s,{})}),t(o.CopyButton,{text:e.code,size:"icon-sm",label:"复制代码"})]})}),i&&t(o.Code,{code:e.code,lang:e.codeLang,className:"px-4 py-3"}),d&&!i&&n("div",{role:"alert",className:"flex flex-col items-center gap-2 px-4 py-8 text-center",children:[t(Z,{className:"size-5 text-warning"}),t("p",{className:"max-w-full text-xs break-words text-dim",children:e.error}),t("button",{type:"button",onClick:()=>c("code"),className:"text-xs text-accent-strong underline underline-offset-2",children:"查看代码"})]}),t("div",{hidden:i||d,children:e.children})]})}
2
2
  export{Fr};
@@ -1,4 +1,4 @@
1
- import{e,y,B,C,S,E,T,A,I,L,s,q,Ge,m}from"./chunk-jtwhjp20.js";var dt=function(){var t=e(function(z,i,a,n){for(a=a||{},n=z.length;n--;a[z[n]]=i);return a},"o"),f=[1,4],l=[1,14],o=[1,12],h=[1,13],p=[6,7,8],k=[1,20],d=[1,18],x=[1,19],u=[6,7,11],_=[1,6,13,14],b=[1,23],M=[1,24],P=[1,6,7,11,13,14],U={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(i,a,n,c,g,r,N){var v=r.length-1;switch(g){case 6:case 7:return c;case 15:c.addNode(r[v-1].length,r[v].trim());break;case 16:c.addNode(0,r[v].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:l,7:[1,10],9:9,12:11,13:o,14:h},t(p,[2,3]),{1:[2,2]},t(p,[2,4]),t(p,[2,5]),{1:[2,6],6:l,12:15,13:o,14:h},{6:l,9:16,12:11,13:o,14:h},{6:k,7:d,10:17,11:x},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:k,7:d,10:22,11:x},{1:[2,7],6:l,12:15,13:o,14:h},t(_,[2,14],{7:b,11:M}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(u,[2,15]),t(_,[2,13],{7:b,11:M}),t(P,[2,11]),t(P,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(i,a){if(a.recoverable)this.trace(i);else{var n=Error(i);throw n.hash=a,n}},"parseError"),parse:e(function(i){var a=this,n=[0],c=[],g=[null],r=[],N=this.table,v="",W=0,D=0,R=0,F=2,X=1,rt=r.slice.call(arguments,1),w=Object.create(this.lexer),O={yy:{}};for(var K in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,K))O.yy[K]=this.yy[K];if(w.setInput(i,O.yy),O.yy.lexer=w,O.yy.parser=this,typeof w.yylloc>"u")w.yylloc={};var Q=w.yylloc;r.push(Q);var lt=w.options&&w.options.ranges;if(typeof O.yy.parseError==="function")this.parseError=O.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(G){n.length=n.length-2*G,g.length=g.length-G,r.length=r.length-G}e(xt,"popStack");function yt(){var G=c.pop()||w.lex()||X;if(typeof G!=="number"){if(G instanceof Array)c=G,G=c.pop();G=a.symbols_[G]||G}return G}e(yt,"lex");var j,ot,J,H,Vt,ht,tt={},st,Y,ft,nt;while(!0){if(J=n[n.length-1],this.defaultActions[J])H=this.defaultActions[J];else{if(j===null||typeof j>"u")j=yt();H=N[J]&&N[J][j]}if(typeof H>"u"||!H.length||!H[0]){var ct="";nt=[];for(st in N[J])if(this.terminals_[st]&&st>F)nt.push("'"+this.terminals_[st]+"'");if(w.showPosition)ct="Parse error on line "+(W+1)+`:
1
+ import{e,y,B,C,S,E,T,A,I,L,s,q,Ge,m}from"./chunk-y0m8hrwz.js";var dt=function(){var t=e(function(z,i,a,n){for(a=a||{},n=z.length;n--;a[z[n]]=i);return a},"o"),f=[1,4],l=[1,14],o=[1,12],h=[1,13],p=[6,7,8],k=[1,20],d=[1,18],x=[1,19],u=[6,7,11],_=[1,6,13,14],b=[1,23],M=[1,24],P=[1,6,7,11,13,14],U={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ishikawa:4,spaceLines:5,SPACELINE:6,NL:7,ISHIKAWA:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,TEXT:14,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"ISHIKAWA",11:"EOF",13:"SPACELIST",14:"TEXT"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,1],[12,1],[12,1]],performAction:e(function(i,a,n,c,g,r,N){var v=r.length-1;switch(g){case 6:case 7:return c;case 15:c.addNode(r[v-1].length,r[v].trim());break;case 16:c.addNode(0,r[v].trim());break}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:f},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:f},{6:l,7:[1,10],9:9,12:11,13:o,14:h},t(p,[2,3]),{1:[2,2]},t(p,[2,4]),t(p,[2,5]),{1:[2,6],6:l,12:15,13:o,14:h},{6:l,9:16,12:11,13:o,14:h},{6:k,7:d,10:17,11:x},t(u,[2,18],{14:[1,21]}),t(u,[2,16]),t(u,[2,17]),{6:k,7:d,10:22,11:x},{1:[2,7],6:l,12:15,13:o,14:h},t(_,[2,14],{7:b,11:M}),t(P,[2,8]),t(P,[2,9]),t(P,[2,10]),t(u,[2,15]),t(_,[2,13],{7:b,11:M}),t(P,[2,11]),t(P,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:e(function(i,a){if(a.recoverable)this.trace(i);else{var n=Error(i);throw n.hash=a,n}},"parseError"),parse:e(function(i){var a=this,n=[0],c=[],g=[null],r=[],N=this.table,v="",W=0,D=0,R=0,F=2,X=1,rt=r.slice.call(arguments,1),w=Object.create(this.lexer),O={yy:{}};for(var K in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,K))O.yy[K]=this.yy[K];if(w.setInput(i,O.yy),O.yy.lexer=w,O.yy.parser=this,typeof w.yylloc>"u")w.yylloc={};var Q=w.yylloc;r.push(Q);var lt=w.options&&w.options.ranges;if(typeof O.yy.parseError==="function")this.parseError=O.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function xt(G){n.length=n.length-2*G,g.length=g.length-G,r.length=r.length-G}e(xt,"popStack");function yt(){var G=c.pop()||w.lex()||X;if(typeof G!=="number"){if(G instanceof Array)c=G,G=c.pop();G=a.symbols_[G]||G}return G}e(yt,"lex");var j,ot,J,H,Vt,ht,tt={},st,Y,ft,nt;while(!0){if(J=n[n.length-1],this.defaultActions[J])H=this.defaultActions[J];else{if(j===null||typeof j>"u")j=yt();H=N[J]&&N[J][j]}if(typeof H>"u"||!H.length||!H[0]){var ct="";nt=[];for(st in N[J])if(this.terminals_[st]&&st>F)nt.push("'"+this.terminals_[st]+"'");if(w.showPosition)ct="Parse error on line "+(W+1)+`:
2
2
  `+w.showPosition()+`
3
3
  Expecting `+nt.join(", ")+", got '"+(this.terminals_[j]||j)+"'";else ct="Parse error on line "+(W+1)+": Unexpected "+(j==X?"end of input":"'"+(this.terminals_[j]||j)+"'");this.parseError(ct,{text:w.match,token:this.terminals_[j]||j,line:w.yylineno,loc:Q,expected:nt})}if(H[0]instanceof Array&&H.length>1)throw Error("Parse Error: multiple actions possible at state: "+J+", token: "+j);switch(H[0]){case 1:if(n.push(j),g.push(w.yytext),r.push(w.yylloc),n.push(H[1]),j=null,!ot){if(D=w.yyleng,v=w.yytext,W=w.yylineno,Q=w.yylloc,R>0)R--}else j=ot,ot=null;break;case 2:if(Y=this.productions_[H[1]][1],tt.$=g[g.length-Y],tt._$={first_line:r[r.length-(Y||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(Y||1)].first_column,last_column:r[r.length-1].last_column},lt)tt._$.range=[r[r.length-(Y||1)].range[0],r[r.length-1].range[1]];if(ht=this.performAction.apply(tt,[v,D,W,O.yy,H[1],g,r].concat(rt)),typeof ht<"u")return ht;if(Y)n=n.slice(0,-1*Y*2),g=g.slice(0,-1*Y),r=r.slice(0,-1*Y);n.push(this.productions_[H[1]][0]),g.push(tt.$),r.push(tt._$),ft=N[n[n.length-2]][n[n.length-1]],n.push(ft);break;case 3:return!0}}return!0},"parse")},Z=function(){var z={EOF:1,parseError:e(function(a,n){if(this.yy.parser)this.yy.parser.parseError(a,n);else throw Error(a)},"parseError"),setInput:e(function(i,a){if(this.yy=a||this.yy||{},this._input=i,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];return this.offset=0,this},"setInput"),input:e(function(){var i=this._input[0];this.yytext+=i,this.yyleng++,this.offset++,this.match+=i,this.matched+=i;var a=i.match(/(?:\r\n?|\n).*/g);if(a)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),i},"input"),unput:e(function(i){var a=i.length,n=i.split(/(?:\r\n?|\n)/g);this._input=i+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var c=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1)this.yylineno-=n.length-1;var g=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===c.length?this.yylloc.first_column:0)+c[c.length-n.length].length-n[0].length:this.yylloc.first_column-a},this.options.ranges)this.yylloc.range=[g[0],g[0]+this.yyleng-a];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(i){this.unput(this.match.slice(i))},"less"),pastInput:e(function(){var i=this.matched.substr(0,this.matched.length-this.match.length);return(i.length>20?"...":"")+i.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var i=this.match;if(i.length<20)i+=this._input.substr(0,20-i.length);return(i.substr(0,20)+(i.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var i=this.pastInput(),a=Array(i.length+1).join("-");return i+this.upcomingInput()+`
@@ -1,2 +1,2 @@
1
- import{Rt,fn,Dt,ra}from"./chunk-0mrkjnte.js";import{Nt}from"./chunk-ry9256r7.js";import{$t,Cr,Fn,$e,Sr}from"./chunk-jtwhjp20.js";function s(r,n){return r==null||n==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function x(r,n){return r==null||n==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function nr(r){let n,e,t;if(r.length!==2)n=s,e=(f,c)=>s(r(f),c),t=(f,c)=>r(f)-c;else n=r===s||r===x?r:O,e=r,t=r;function o(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<0)i=l+1;else p=l}while(i<p)}return i}function a(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<=0)i=l+1;else p=l}while(i<p)}return i}function u(f,c,i=0,p=f.length){let l=o(f,c,i,p-1);return l>i&&t(f[l-1],c)>-t(f[l],c)?l-1:l}return{left:o,center:u,right:a}}function O(){return 0}function y(r){return r===null?NaN:+r}var V=nr(s),{right:T,left:or}=V,ur=nr(y).center,z=T;var E=Math.sqrt(50),G=Math.sqrt(10),H=Math.sqrt(2);function g(r,n,e){let t=(n-r)/Math.max(0,e),o=Math.floor(Math.log10(t)),a=t/Math.pow(10,o),u=a>=E?10:a>=G?5:a>=H?2:1,f,c,i;if(o<0){if(i=Math.pow(10,-o)/u,f=Math.round(r*i),c=Math.round(n*i),f/i<r)++f;if(c/i>n)--c;i=-i}else{if(i=Math.pow(10,o)*u,f=Math.round(r/i),c=Math.round(n/i),f*i<r)++f;if(c*i>n)--c}if(c<f&&0.5<=e&&e<2)return g(r,n,e*2);return[f,c,i]}function v(r,n,e){if(n=+n,r=+r,e=+e,!(e>0))return[];if(r===n)return[r];let t=n<r,[o,a,u]=t?g(n,r,e):g(r,n,e);if(!(a>=o))return[];let f=a-o+1,c=Array(f);if(t)if(u<0)for(let i=0;i<f;++i)c[i]=(a-i)/-u;else for(let i=0;i<f;++i)c[i]=(a-i)*u;else if(u<0)for(let i=0;i<f;++i)c[i]=(o+i)/-u;else for(let i=0;i<f;++i)c[i]=(o+i)*u;return c}function M(r,n,e){return n=+n,r=+r,e=+e,g(r,n,e)[2]}function Pr(r,n,e){n=+n,r=+r,e=+e;let t=n<r,o=t?M(n,r,e):M(r,n,e);return(t?-1:1)*(o<0?1/-o:o)}function N(r,n){if(!n)n=[];var e=r?Math.min(n.length,r.length):0,t=n.slice(),o;return function(a){for(o=0;o<e;++o)t[o]=r[o]*(1-a)+n[o]*a;return t}}function B(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function P(r,n){var e=n?n.length:0,t=r?Math.min(e,r.length):0,o=Array(t),a=Array(e),u;for(u=0;u<t;++u)o[u]=h(r[u],n[u]);for(;u<e;++u)a[u]=n[u];return function(f){for(u=0;u<t;++u)a[u]=o[u](f);return a}}function w(r,n){var e=new Date;return r=+r,n=+n,function(t){return e.setTime(r*(1-t)+n*t),e}}function k(r,n){var e={},t={},o;if(r===null||typeof r!=="object")r={};if(n===null||typeof n!=="object")n={};for(o in n)if(o in r)e[o]=h(r[o],n[o]);else t[o]=n[o];return function(a){for(o in e)t[o]=e[o](a);return t}}function h(r,n){var e=typeof n,t;return n==null||e==="boolean"?Cr(n):(e==="number"?$e:e==="string"?(t=$t(n))?(n=t,Fn):Sr:n instanceof $t?Fn:n instanceof Date?w:B(n)?N:Array.isArray(n)?P:typeof n.valueOf!=="function"&&typeof n.toString!=="function"||isNaN(n)?k:$e)(r,n)}function A(r,n){return r=+r,n=+n,function(e){return Math.round(r*(1-e)+n*e)}}function R(r){return Math.max(0,-Rt(Math.abs(r)))}function S(r,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Rt(n)/3)))*3-Rt(Math.abs(r)))}function j(r,n){return r=Math.abs(r),n=Math.abs(n)-r,Math.max(0,Rt(n)-Rt(r))+1}function F(r){return function(){return r}}function q(r){return+r}var C=[0,1];function d(r){return r}function D(r,n){return(n-=r=+r)?function(e){return(e-r)/n}:F(isNaN(n)?NaN:0.5)}function J(r,n){var e;if(r>n)e=r,r=n,n=e;return function(t){return Math.max(r,Math.min(n,t))}}function K(r,n,e){var t=r[0],o=r[1],a=n[0],u=n[1];if(o<t)t=D(o,t),a=e(u,a);else t=D(t,o),a=e(a,u);return function(f){return a(t(f))}}function Q(r,n,e){var t=Math.min(r.length,n.length)-1,o=Array(t),a=Array(t),u=-1;if(r[t]<r[0])r=r.slice().reverse(),n=n.slice().reverse();while(++u<t)o[u]=D(r[u],r[u+1]),a[u]=e(n[u],n[u+1]);return function(f){var c=z(r,f,1,t)-1;return a[c](o[c](f))}}function na(r,n){return n.domain(r.domain()).range(r.range()).interpolate(r.interpolate()).clamp(r.clamp()).unknown(r.unknown())}function U(){var r=C,n=C,e=h,t,o,a,u=d,f,c,i;function p(){var m=Math.min(r.length,n.length);if(u!==d)u=J(r[0],r[m-1]);return f=m>2?Q:K,c=i=null,l}function l(m){return m==null||isNaN(m=+m)?a:(c||(c=f(r.map(t),n,e)))(t(u(m)))}return l.invert=function(m){return u(o((i||(i=f(n,r.map(t),$e)))(m)))},l.domain=function(m){return arguments.length?(r=Array.from(m,q),p()):r.slice()},l.range=function(m){return arguments.length?(n=Array.from(m),p()):n.slice()},l.rangeRound=function(m){return n=Array.from(m),e=A,p()},l.clamp=function(m){return arguments.length?(u=m?!0:d,p()):u!==d},l.interpolate=function(m){return arguments.length?(e=m,p()):e},l.unknown=function(m){return arguments.length?(a=m,l):a},function(m,L){return t=m,o=L,p()}}function Or(){return U()(d,d)}function I(r,n,e,t){var o=Pr(r,n,e),a;switch(t=fn(t==null?",f":t),t.type){case"s":{var u=Math.max(Math.abs(r),Math.abs(n));if(t.precision==null&&!isNaN(a=S(o,u)))t.precision=a;return ra(t,u)}case"":case"e":case"g":case"p":case"r":{if(t.precision==null&&!isNaN(a=j(o,Math.max(Math.abs(r),Math.abs(n)))))t.precision=a-(t.type==="e");break}case"f":case"%":{if(t.precision==null&&!isNaN(a=R(o)))t.precision=a-(t.type==="%")*2;break}}return Dt(t)}function W(r){var n=r.domain;return r.ticks=function(e){var t=n();return v(t[0],t[t.length-1],e==null?10:e)},r.tickFormat=function(e,t){var o=n();return I(o[0],o[o.length-1],e==null?10:e,t)},r.nice=function(e){if(e==null)e=10;var t=n(),o=0,a=t.length-1,u=t[o],f=t[a],c,i,p=10;if(f<u)i=u,u=f,f=i,i=o,o=a,a=i;while(p-- >0){if(i=M(u,f,e),i===c)return t[o]=u,t[a]=f,n(t);else if(i>0)u=Math.floor(u/i)*i,f=Math.ceil(f/i)*i;else if(i<0)u=Math.ceil(u*i)/i,f=Math.floor(f*i)/i;else break;c=i}return r},r}function xt(){var r=Or();return r.copy=function(){return na(r,xt())},Nt.apply(r,arguments),W(r)}
1
+ import{Rt,fn,Dt,ra}from"./chunk-0mrkjnte.js";import{Nt}from"./chunk-ry9256r7.js";import{$t,Cr,Fn,$e,Sr}from"./chunk-y0m8hrwz.js";function s(r,n){return r==null||n==null?NaN:r<n?-1:r>n?1:r>=n?0:NaN}function x(r,n){return r==null||n==null?NaN:n<r?-1:n>r?1:n>=r?0:NaN}function nr(r){let n,e,t;if(r.length!==2)n=s,e=(f,c)=>s(r(f),c),t=(f,c)=>r(f)-c;else n=r===s||r===x?r:O,e=r,t=r;function o(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<0)i=l+1;else p=l}while(i<p)}return i}function a(f,c,i=0,p=f.length){if(i<p){if(n(c,c)!==0)return p;do{let l=i+p>>>1;if(e(f[l],c)<=0)i=l+1;else p=l}while(i<p)}return i}function u(f,c,i=0,p=f.length){let l=o(f,c,i,p-1);return l>i&&t(f[l-1],c)>-t(f[l],c)?l-1:l}return{left:o,center:u,right:a}}function O(){return 0}function y(r){return r===null?NaN:+r}var V=nr(s),{right:T,left:or}=V,ur=nr(y).center,z=T;var E=Math.sqrt(50),G=Math.sqrt(10),H=Math.sqrt(2);function g(r,n,e){let t=(n-r)/Math.max(0,e),o=Math.floor(Math.log10(t)),a=t/Math.pow(10,o),u=a>=E?10:a>=G?5:a>=H?2:1,f,c,i;if(o<0){if(i=Math.pow(10,-o)/u,f=Math.round(r*i),c=Math.round(n*i),f/i<r)++f;if(c/i>n)--c;i=-i}else{if(i=Math.pow(10,o)*u,f=Math.round(r/i),c=Math.round(n/i),f*i<r)++f;if(c*i>n)--c}if(c<f&&0.5<=e&&e<2)return g(r,n,e*2);return[f,c,i]}function v(r,n,e){if(n=+n,r=+r,e=+e,!(e>0))return[];if(r===n)return[r];let t=n<r,[o,a,u]=t?g(n,r,e):g(r,n,e);if(!(a>=o))return[];let f=a-o+1,c=Array(f);if(t)if(u<0)for(let i=0;i<f;++i)c[i]=(a-i)/-u;else for(let i=0;i<f;++i)c[i]=(a-i)*u;else if(u<0)for(let i=0;i<f;++i)c[i]=(o+i)/-u;else for(let i=0;i<f;++i)c[i]=(o+i)*u;return c}function M(r,n,e){return n=+n,r=+r,e=+e,g(r,n,e)[2]}function Pr(r,n,e){n=+n,r=+r,e=+e;let t=n<r,o=t?M(n,r,e):M(r,n,e);return(t?-1:1)*(o<0?1/-o:o)}function N(r,n){if(!n)n=[];var e=r?Math.min(n.length,r.length):0,t=n.slice(),o;return function(a){for(o=0;o<e;++o)t[o]=r[o]*(1-a)+n[o]*a;return t}}function B(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function P(r,n){var e=n?n.length:0,t=r?Math.min(e,r.length):0,o=Array(t),a=Array(e),u;for(u=0;u<t;++u)o[u]=h(r[u],n[u]);for(;u<e;++u)a[u]=n[u];return function(f){for(u=0;u<t;++u)a[u]=o[u](f);return a}}function w(r,n){var e=new Date;return r=+r,n=+n,function(t){return e.setTime(r*(1-t)+n*t),e}}function k(r,n){var e={},t={},o;if(r===null||typeof r!=="object")r={};if(n===null||typeof n!=="object")n={};for(o in n)if(o in r)e[o]=h(r[o],n[o]);else t[o]=n[o];return function(a){for(o in e)t[o]=e[o](a);return t}}function h(r,n){var e=typeof n,t;return n==null||e==="boolean"?Cr(n):(e==="number"?$e:e==="string"?(t=$t(n))?(n=t,Fn):Sr:n instanceof $t?Fn:n instanceof Date?w:B(n)?N:Array.isArray(n)?P:typeof n.valueOf!=="function"&&typeof n.toString!=="function"||isNaN(n)?k:$e)(r,n)}function A(r,n){return r=+r,n=+n,function(e){return Math.round(r*(1-e)+n*e)}}function R(r){return Math.max(0,-Rt(Math.abs(r)))}function S(r,n){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Rt(n)/3)))*3-Rt(Math.abs(r)))}function j(r,n){return r=Math.abs(r),n=Math.abs(n)-r,Math.max(0,Rt(n)-Rt(r))+1}function F(r){return function(){return r}}function q(r){return+r}var C=[0,1];function d(r){return r}function D(r,n){return(n-=r=+r)?function(e){return(e-r)/n}:F(isNaN(n)?NaN:0.5)}function J(r,n){var e;if(r>n)e=r,r=n,n=e;return function(t){return Math.max(r,Math.min(n,t))}}function K(r,n,e){var t=r[0],o=r[1],a=n[0],u=n[1];if(o<t)t=D(o,t),a=e(u,a);else t=D(t,o),a=e(a,u);return function(f){return a(t(f))}}function Q(r,n,e){var t=Math.min(r.length,n.length)-1,o=Array(t),a=Array(t),u=-1;if(r[t]<r[0])r=r.slice().reverse(),n=n.slice().reverse();while(++u<t)o[u]=D(r[u],r[u+1]),a[u]=e(n[u],n[u+1]);return function(f){var c=z(r,f,1,t)-1;return a[c](o[c](f))}}function na(r,n){return n.domain(r.domain()).range(r.range()).interpolate(r.interpolate()).clamp(r.clamp()).unknown(r.unknown())}function U(){var r=C,n=C,e=h,t,o,a,u=d,f,c,i;function p(){var m=Math.min(r.length,n.length);if(u!==d)u=J(r[0],r[m-1]);return f=m>2?Q:K,c=i=null,l}function l(m){return m==null||isNaN(m=+m)?a:(c||(c=f(r.map(t),n,e)))(t(u(m)))}return l.invert=function(m){return u(o((i||(i=f(n,r.map(t),$e)))(m)))},l.domain=function(m){return arguments.length?(r=Array.from(m,q),p()):r.slice()},l.range=function(m){return arguments.length?(n=Array.from(m),p()):n.slice()},l.rangeRound=function(m){return n=Array.from(m),e=A,p()},l.clamp=function(m){return arguments.length?(u=m?!0:d,p()):u!==d},l.interpolate=function(m){return arguments.length?(e=m,p()):e},l.unknown=function(m){return arguments.length?(a=m,l):a},function(m,L){return t=m,o=L,p()}}function Or(){return U()(d,d)}function I(r,n,e,t){var o=Pr(r,n,e),a;switch(t=fn(t==null?",f":t),t.type){case"s":{var u=Math.max(Math.abs(r),Math.abs(n));if(t.precision==null&&!isNaN(a=S(o,u)))t.precision=a;return ra(t,u)}case"":case"e":case"g":case"p":case"r":{if(t.precision==null&&!isNaN(a=j(o,Math.max(Math.abs(r),Math.abs(n)))))t.precision=a-(t.type==="e");break}case"f":case"%":{if(t.precision==null&&!isNaN(a=R(o)))t.precision=a-(t.type==="%")*2;break}}return Dt(t)}function W(r){var n=r.domain;return r.ticks=function(e){var t=n();return v(t[0],t[t.length-1],e==null?10:e)},r.tickFormat=function(e,t){var o=n();return I(o[0],o[o.length-1],e==null?10:e,t)},r.nice=function(e){if(e==null)e=10;var t=n(),o=0,a=t.length-1,u=t[o],f=t[a],c,i,p=10;if(f<u)i=u,u=f,f=i,i=o,o=a,a=i;while(p-- >0){if(i=M(u,f,e),i===c)return t[o]=u,t[a]=f,n(t);else if(i>0)u=Math.floor(u/i)*i,f=Math.ceil(f/i)*i;else if(i<0)u=Math.ceil(u*i)/i,f=Math.floor(f*i)/i;else break;c=i}return r},r}function xt(){var r=Or();return r.copy=function(){return na(r,xt())},Nt.apply(r,arguments),W(r)}
2
2
  export{nr,Pr,na,Or,xt};
@@ -1,4 +1,4 @@
1
- import{e,r,Le,y,C,S,E,T,A,I,L,s,p,zi,N,le,ae,ie,ft,he,ge}from"./chunk-jtwhjp20.js";import{Mt}from"./chunk-ghxe4gam.js";import{fe}from"./chunk-b5brnfv9.js";import{oe}from"./chunk-kbtbbarw.js";var Pt=function(){var t=e(function(Q,h,g,o){for(g=g||{},o=Q.length;o--;g[Q[o]]=h);return g},"o"),i=[1,2],c=[1,3],a=[1,4],u=[2,4],f=[1,9],b=[1,11],k=[1,16],l=[1,17],D=[1,18],x=[1,19],Y=[1,33],V=[1,20],j=[1,21],F=[1,22],m=[1,23],M=[1,24],P=[1,26],z=[1,27],W=[1,28],K=[1,29],R=[1,30],st=[1,31],St=[1,32],gt=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],rt=[1,34],_=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(h,g,o,v,w,n,it){var d=n.length-1;switch(w){case 3:return v.setRootDoc(n[d]),n[d];break;case 4:this.$=[];break;case 5:if(n[d]!="nl")n[d-1].push(n[d]),this.$=n[d-1];break;case 6:case 7:this.$=n[d];break;case 8:this.$="nl";break;case 12:this.$=n[d];break;case 13:let Et=n[d-1];Et.description=v.trimColon(n[d]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:n[d-2],state2:n[d]};break;case 15:let _t=v.trimColon(n[d]);this.$={stmt:"relation",state1:n[d-3],state2:n[d-1],description:_t};break;case 19:this.$={stmt:"state",id:n[d-3],type:"default",description:"",doc:n[d-1]};break;case 20:var X=n[d],J=n[d-2].trim();if(n[d].match(":")){var lt=n[d].split(":");X=lt[0],J=[J,lt[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:n[d-3],type:"default",description:n[d-5],doc:n[d-1]};break;case 22:this.$={stmt:"state",id:n[d],type:"fork"};break;case 23:this.$={stmt:"state",id:n[d],type:"join"};break;case 24:this.$={stmt:"state",id:n[d],type:"choice"};break;case 25:this.$={stmt:"state",id:v.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:n[d-1].trim(),note:{position:n[d-2].trim(),text:n[d].trim()}};break;case 29:this.$=n[d].trim(),v.setAccTitle(this.$);break;case 30:case 31:this.$=n[d].trim(),v.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:n[d-3],url:n[d-2],tooltip:n[d-1]};break;case 33:this.$={stmt:"click",id:n[d-3],url:n[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:n[d-1].trim(),classes:n[d].trim()};break;case 36:this.$={stmt:"style",id:n[d-1].trim(),styleClass:n[d].trim()};break;case 37:this.$={stmt:"applyClass",id:n[d-1].trim(),styleClass:n[d].trim()};break;case 38:v.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:v.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:v.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:v.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:n[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:n[d-2].trim(),classes:[n[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:n[d-2].trim(),classes:[n[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:i,5:c,6:a},{1:[3]},{3:5,4:i,5:c,6:a},{3:6,4:i,5:c,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:k,17:l,19:D,22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,7]),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(_,[2,11]),t(_,[2,12],{14:[1,40],15:[1,41]}),t(_,[2,16]),{18:[1,42]},t(_,[2,18],{20:[1,43]}),{23:[1,44]},t(_,[2,22]),t(_,[2,23]),t(_,[2,24]),t(_,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(_,[2,28]),{34:[1,49]},{36:[1,50]},t(_,[2,31]),{13:51,24:Y,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(kt,[2,44],{58:[1,56]}),t(kt,[2,45],{58:[1,57]}),t(_,[2,38]),t(_,[2,39]),t(_,[2,40]),t(_,[2,41]),t(_,[2,6]),t(_,[2,13]),{13:58,24:Y,57:rt},t(_,[2,17]),t(Vt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(_,[2,29]),t(_,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(_,[2,14],{14:[1,71]}),{4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,21:[1,72],22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(kt,[2,46]),t(kt,[2,47]),t(_,[2,15]),t(_,[2,19]),t(Vt,u,{7:78}),t(_,[2,26]),t(_,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,21:[1,81],22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,32]),t(_,[2,33]),t(_,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(h,g){if(g.recoverable)this.trace(h);else{var o=Error(h);throw o.hash=g,o}},"parseError"),parse:e(function(h){var g=this,o=[0],v=[],w=[null],n=[],it=this.table,d="",X=0,J=0,lt=0,Et=2,_t=1,be=n.slice.call(arguments,1),O=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(O.setInput(h,tt.yy),tt.yy.lexer=O,tt.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var It=O.yylloc;n.push(It);var ke=O.options&&O.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Te(H){o.length=o.length-2*H,w.length=w.length-H,n.length=n.length-H}e(Te,"popStack");function Wt(){var H=v.pop()||O.lex()||_t;if(typeof H!=="number"){if(H instanceof Array)v=H,H=v.pop();H=g.symbols_[H]||H}return H}e(Wt,"lex");var B,Nt,et,U,ts,Ot,at={},vt,q,jt,Dt;while(!0){if(et=o[o.length-1],this.defaultActions[et])U=this.defaultActions[et];else{if(B===null||typeof B>"u")B=Wt();U=it[et]&&it[et][B]}if(typeof U>"u"||!U.length||!U[0]){var Rt="";Dt=[];for(vt in it[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(O.showPosition)Rt="Parse error on line "+(X+1)+`:
1
+ import{e,r,Le,y,C,S,E,T,A,I,L,s,p,zi,N,le,ae,ie,ft,he,ge}from"./chunk-y0m8hrwz.js";import{Mt}from"./chunk-p3b9crsa.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";var Pt=function(){var t=e(function(Q,h,g,o){for(g=g||{},o=Q.length;o--;g[Q[o]]=h);return g},"o"),i=[1,2],c=[1,3],a=[1,4],u=[2,4],f=[1,9],b=[1,11],k=[1,16],l=[1,17],D=[1,18],x=[1,19],Y=[1,33],V=[1,20],j=[1,21],F=[1,22],m=[1,23],M=[1,24],P=[1,26],z=[1,27],W=[1,28],K=[1,29],R=[1,30],st=[1,31],St=[1,32],gt=[1,35],yt=[1,36],mt=[1,37],bt=[1,38],rt=[1,34],_=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],kt=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,39,40,41,45,48,51,52,53,54,57],Vt=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],Lt={trace:e(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,classDefStatement:10,styleStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,CLICK:38,STRING:39,HREF:40,classDef:41,CLASSDEF_ID:42,CLASSDEF_STYLEOPTS:43,DEFAULT:44,style:45,STYLE_IDS:46,STYLEDEF_STYLEOPTS:47,class:48,CLASSENTITY_IDS:49,STYLECLASS:50,direction_tb:51,direction_bt:52,direction_rl:53,direction_lr:54,eol:55,";":56,EDGE_STATE:57,STYLE_SEPARATOR:58,left_of:59,right_of:60,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"CLICK",39:"STRING",40:"HREF",41:"classDef",42:"CLASSDEF_ID",43:"CLASSDEF_STYLEOPTS",44:"DEFAULT",45:"style",46:"STYLE_IDS",47:"STYLEDEF_STYLEOPTS",48:"class",49:"CLASSENTITY_IDS",50:"STYLECLASS",51:"direction_tb",52:"direction_bt",53:"direction_rl",54:"direction_lr",56:";",57:"EDGE_STATE",58:"STYLE_SEPARATOR",59:"left_of",60:"right_of"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,3],[9,4],[9,1],[9,2],[9,1],[9,4],[9,3],[9,6],[9,1],[9,1],[9,1],[9,1],[9,4],[9,4],[9,1],[9,2],[9,2],[9,1],[9,5],[9,5],[10,3],[10,3],[11,3],[12,3],[32,1],[32,1],[32,1],[32,1],[55,1],[55,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1]],performAction:e(function(h,g,o,v,w,n,it){var d=n.length-1;switch(w){case 3:return v.setRootDoc(n[d]),n[d];break;case 4:this.$=[];break;case 5:if(n[d]!="nl")n[d-1].push(n[d]),this.$=n[d-1];break;case 6:case 7:this.$=n[d];break;case 8:this.$="nl";break;case 12:this.$=n[d];break;case 13:let Et=n[d-1];Et.description=v.trimColon(n[d]),this.$=Et;break;case 14:this.$={stmt:"relation",state1:n[d-2],state2:n[d]};break;case 15:let _t=v.trimColon(n[d]);this.$={stmt:"relation",state1:n[d-3],state2:n[d-1],description:_t};break;case 19:this.$={stmt:"state",id:n[d-3],type:"default",description:"",doc:n[d-1]};break;case 20:var X=n[d],J=n[d-2].trim();if(n[d].match(":")){var lt=n[d].split(":");X=lt[0],J=[J,lt[1]]}this.$={stmt:"state",id:X,type:"default",description:J};break;case 21:this.$={stmt:"state",id:n[d-3],type:"default",description:n[d-5],doc:n[d-1]};break;case 22:this.$={stmt:"state",id:n[d],type:"fork"};break;case 23:this.$={stmt:"state",id:n[d],type:"join"};break;case 24:this.$={stmt:"state",id:n[d],type:"choice"};break;case 25:this.$={stmt:"state",id:v.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:n[d-1].trim(),note:{position:n[d-2].trim(),text:n[d].trim()}};break;case 29:this.$=n[d].trim(),v.setAccTitle(this.$);break;case 30:case 31:this.$=n[d].trim(),v.setAccDescription(this.$);break;case 32:this.$={stmt:"click",id:n[d-3],url:n[d-2],tooltip:n[d-1]};break;case 33:this.$={stmt:"click",id:n[d-3],url:n[d-1],tooltip:""};break;case 34:case 35:this.$={stmt:"classDef",id:n[d-1].trim(),classes:n[d].trim()};break;case 36:this.$={stmt:"style",id:n[d-1].trim(),styleClass:n[d].trim()};break;case 37:this.$={stmt:"applyClass",id:n[d-1].trim(),styleClass:n[d].trim()};break;case 38:v.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:v.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:v.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:v.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:n[d].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:n[d-2].trim(),classes:[n[d].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:n[d-2].trim(),classes:[n[d].trim()],type:"default",description:""};break}},"anonymous"),table:[{3:1,4:i,5:c,6:a},{1:[3]},{3:5,4:i,5:c,6:a},{3:6,4:i,5:c,6:a},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,41,45,48,51,52,53,54,57],u,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,5]),{9:39,10:12,11:13,12:14,13:15,16:k,17:l,19:D,22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,7]),t(_,[2,8]),t(_,[2,9]),t(_,[2,10]),t(_,[2,11]),t(_,[2,12],{14:[1,40],15:[1,41]}),t(_,[2,16]),{18:[1,42]},t(_,[2,18],{20:[1,43]}),{23:[1,44]},t(_,[2,22]),t(_,[2,23]),t(_,[2,24]),t(_,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(_,[2,28]),{34:[1,49]},{36:[1,50]},t(_,[2,31]),{13:51,24:Y,57:rt},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},t(kt,[2,44],{58:[1,56]}),t(kt,[2,45],{58:[1,57]}),t(_,[2,38]),t(_,[2,39]),t(_,[2,40]),t(_,[2,41]),t(_,[2,6]),t(_,[2,13]),{13:58,24:Y,57:rt},t(_,[2,17]),t(Vt,u,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(_,[2,29]),t(_,[2,30]),{39:[1,63],40:[1,64]},{43:[1,65]},{43:[1,66]},{47:[1,67]},{50:[1,68]},{24:[1,69]},{24:[1,70]},t(_,[2,14],{14:[1,71]}),{4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,21:[1,72],22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(_,[2,34]),t(_,[2,35]),t(_,[2,36]),t(_,[2,37]),t(kt,[2,46]),t(kt,[2,47]),t(_,[2,15]),t(_,[2,19]),t(Vt,u,{7:78}),t(_,[2,26]),t(_,[2,27]),{5:[1,79]},{5:[1,80]},{4:f,5:b,8:8,9:10,10:12,11:13,12:14,13:15,16:k,17:l,19:D,21:[1,81],22:x,24:Y,25:V,26:j,27:F,28:m,29:M,32:25,33:P,35:z,37:W,38:K,41:R,45:st,48:St,51:gt,52:yt,53:mt,54:bt,57:rt},t(_,[2,32]),t(_,[2,33]),t(_,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:e(function(h,g){if(g.recoverable)this.trace(h);else{var o=Error(h);throw o.hash=g,o}},"parseError"),parse:e(function(h){var g=this,o=[0],v=[],w=[null],n=[],it=this.table,d="",X=0,J=0,lt=0,Et=2,_t=1,be=n.slice.call(arguments,1),O=Object.create(this.lexer),tt={yy:{}};for(var wt in this.yy)if(Object.prototype.hasOwnProperty.call(this.yy,wt))tt.yy[wt]=this.yy[wt];if(O.setInput(h,tt.yy),tt.yy.lexer=O,tt.yy.parser=this,typeof O.yylloc>"u")O.yylloc={};var It=O.yylloc;n.push(It);var ke=O.options&&O.options.ranges;if(typeof tt.yy.parseError==="function")this.parseError=tt.yy.parseError;else this.parseError=Object.getPrototypeOf(this).parseError;function Te(H){o.length=o.length-2*H,w.length=w.length-H,n.length=n.length-H}e(Te,"popStack");function Wt(){var H=v.pop()||O.lex()||_t;if(typeof H!=="number"){if(H instanceof Array)v=H,H=v.pop();H=g.symbols_[H]||H}return H}e(Wt,"lex");var B,Nt,et,U,ts,Ot,at={},vt,q,jt,Dt;while(!0){if(et=o[o.length-1],this.defaultActions[et])U=this.defaultActions[et];else{if(B===null||typeof B>"u")B=Wt();U=it[et]&&it[et][B]}if(typeof U>"u"||!U.length||!U[0]){var Rt="";Dt=[];for(vt in it[et])if(this.terminals_[vt]&&vt>Et)Dt.push("'"+this.terminals_[vt]+"'");if(O.showPosition)Rt="Parse error on line "+(X+1)+`:
2
2
  `+O.showPosition()+`
3
3
  Expecting `+Dt.join(", ")+", got '"+(this.terminals_[B]||B)+"'";else Rt="Parse error on line "+(X+1)+": Unexpected "+(B==_t?"end of input":"'"+(this.terminals_[B]||B)+"'");this.parseError(Rt,{text:O.match,token:this.terminals_[B]||B,line:O.yylineno,loc:It,expected:Dt})}if(U[0]instanceof Array&&U.length>1)throw Error("Parse Error: multiple actions possible at state: "+et+", token: "+B);switch(U[0]){case 1:if(o.push(B),w.push(O.yytext),n.push(O.yylloc),o.push(U[1]),B=null,!Nt){if(J=O.yyleng,d=O.yytext,X=O.yylineno,It=O.yylloc,lt>0)lt--}else B=Nt,Nt=null;break;case 2:if(q=this.productions_[U[1]][1],at.$=w[w.length-q],at._$={first_line:n[n.length-(q||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(q||1)].first_column,last_column:n[n.length-1].last_column},ke)at._$.range=[n[n.length-(q||1)].range[0],n[n.length-1].range[1]];if(Ot=this.performAction.apply(at,[d,J,X,tt.yy,U[1],w,n].concat(be)),typeof Ot<"u")return Ot;if(q)o=o.slice(0,-1*q*2),w=w.slice(0,-1*q),n=n.slice(0,-1*q);o.push(this.productions_[U[1]][0]),w.push(at.$),n.push(at._$),jt=it[o[o.length-2]][o[o.length-1]],o.push(jt);break;case 3:return!0}}return!0},"parse")},me=function(){var Q={EOF:1,parseError:e(function(g,o){if(this.yy.parser)this.yy.parser.parseError(g,o);else throw Error(g)},"parseError"),setInput:e(function(h,g){if(this.yy=g||this.yy||{},this._input=h,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];return this.offset=0,this},"setInput"),input:e(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var g=h.match(/(?:\r\n?|\n).*/g);if(g)this.yylineno++,this.yylloc.last_line++;else this.yylloc.last_column++;if(this.options.ranges)this.yylloc.range[1]++;return this._input=this._input.slice(1),h},"input"),unput:e(function(h){var g=h.length,o=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-g),this.offset-=g;var v=this.match.split(/(?:\r\n?|\n)/g);if(this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1)this.yylineno-=o.length-1;var w=this.yylloc.range;if(this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===v.length?this.yylloc.first_column:0)+v[v.length-o.length].length-o[0].length:this.yylloc.first_column-g},this.options.ranges)this.yylloc.range=[w[0],w[0]+this.yyleng-g];return this.yyleng=this.yytext.length,this},"unput"),more:e(function(){return this._more=!0,this},"more"),reject:e(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:e(function(h){this.unput(this.match.slice(h))},"less"),pastInput:e(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:e(function(){var h=this.match;if(h.length<20)h+=this._input.substr(0,20-h.length);return(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:e(function(){var h=this.pastInput(),g=Array(h.length+1).join("-");return h+this.upcomingInput()+`
@@ -1,4 +1,4 @@
1
- import{W}from"./chunk-e5rmr47n.js";import{e,r,we,b,B,C,S,E,T,A,I,L,s,q,U}from"./chunk-jtwhjp20.js";import{X}from"./chunk-gxn0bey7.js";var ot=e((a,d)=>{let n=a<=1?a*100:a;if(n<0||n>100)throw Error(`${d} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return n},"toPercent"),V=e((a,d,n)=>({x:ot(d,`${n} evolution`),y:ot(a,`${n} visibility`)}),"toCoordinates"),pt=e((a)=>{if(!a)return;if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward";return},"getFlowFromPort"),Bt=e((a)=>{if(!a?.startsWith("+"))return{};let n=/^\+'([^']*)'/.exec(a)?.[1];if(a.includes("<>"))return{flow:"bidirectional",label:n};if(a.includes("<"))return{flow:"backward",label:n};if(a.includes(">"))return{flow:"forward",label:n};return{label:n}},"extractFlowFromArrow"),Ft=e((a,d)=>{if(W(a,d),a.size)d.setSize(a.size.width,a.size.height);if(a.evolution){let n=a.evolution.stages.map((o)=>{if(o.secondName)return`${o.name.trim()} / ${o.secondName.trim()}`;return o.name.trim()}),y=a.evolution.stages.filter((o)=>o.boundary!==void 0).map((o)=>o.boundary);d.updateAxes({stages:n,stageBoundaries:y})}if(a.anchors.forEach((n)=>{let y=V(n.visibility,n.evolution,`Anchor "${n.name}"`);d.addNode(n.name,n.name,y.x,y.y,"anchor")}),a.components.forEach((n)=>{let y=V(n.visibility,n.evolution,`Component "${n.name}"`),o=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,p=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,k=n.decorator?.strategy;d.addNode(n.name,n.name,y.x,y.y,"component",o,p,n.inertia,k)}),a.notes.forEach((n)=>{let y=V(n.visibility,n.evolution,`Note "${n.text}"`);d.addNote(n.text,y.x,y.y)}),a.pipelines.forEach((n)=>{let y=d.getNode(n.parent);if(!y||typeof y.y!=="number")throw Error(`Pipeline "${n.parent}" must reference an existing component with coordinates.`);let o=y.y;d.startPipeline(n.parent),n.components.forEach((p)=>{let k=`${n.parent}_${p.name}`,Y=p.label?(p.label.negX?-1:1)*p.label.offsetX:void 0,w=p.label?(p.label.negY?-1:1)*p.label.offsetY:void 0,tt=ot(p.evolution,`Pipeline component "${p.name}" evolution`);d.addNode(k,p.name,tt,o,"pipeline-component",Y,w),d.addPipelineComponent(n.parent,k)})}),a.links.forEach((n)=>{let y=!!n.arrow&&(n.arrow.includes("-.->")||n.arrow.includes(".-.")),o=pt(n.fromPort)??pt(n.toPort),{flow:p,label:k}=Bt(n.arrow);if(!o&&p)o=p;let Y=n.linkLabel,w=k??Y;d.addLink(d.resolveNodeId(n.from),d.resolveNodeId(n.to),y,w,o)}),a.evolves.forEach((n)=>{let y=d.getNode(n.component);if(y?.y!==void 0){let o=ot(n.target,`Evolve target for "${n.component}"`);d.addTrend(n.component,o,y.y)}}),a.annotations.length>0){let n=a.annotations[0],y=V(n.x,n.y,"Annotations box");d.setAnnotationsBox(y.x,y.y)}a.annotation.forEach((n)=>{let y=V(n.x,n.y,`Annotation ${n.number}`);d.addAnnotation(n.number,[{x:y.x,y:y.y}],n.text)}),a.accelerators.forEach((n)=>{let y=V(n.x,n.y,`Accelerator "${n.name}"`);d.addAccelerator(n.name,y.x,y.y)}),a.deaccelerators.forEach((n)=>{let y=V(n.x,n.y,`Deaccelerator "${n.name}"`);d.addDeaccelerator(n.name,y.x,y.y)})},"populateDb"),ht={parser:{yy:void 0},parse:e(async(a)=>{let d=await X("wardley",a);r.debug(d);let n=ht.parser?.yy;if(!n||typeof n.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ft(d,n)},"parse")},Rt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,"WardleyBuilder")}addNode(a){let d=this.nodes.get(a.id)??{id:a.id,label:a.label},n={...d,...a,className:a.className??d.className,labelOffsetX:a.labelOffsetX??d.labelOffsetX,labelOffsetY:a.labelOffsetY??d.labelOffsetY};this.nodes.set(a.id,n)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let d=this.nodes.get(a);if(d)d.isPipelineParent=!0}addPipelineComponent(a,d){let n=this.pipelines.get(a);if(n)n.componentIds.push(d);let y=this.nodes.get(d);if(y)y.inPipeline=!0}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,d){this.annotationsBox={x:a,y:d}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,d){this.size={width:a,height:d}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[d,n]of this.nodes)if(n.label===a)return d;return a}build(){let a=[];for(let d of this.nodes.values()){if(typeof d.x!=="number"||typeof d.y!=="number")throw Error(`Node "${d.label}" is missing coordinates`);a.push(d)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},P=new Rt;function ft(){return s()["wardley-beta"]}e(ft,"getConfig");function xt(a,d,n,y,o,p,k,Y,w){P.addNode({id:a,label:d,x:n,y,className:o,labelOffsetX:p,labelOffsetY:k,inertia:Y,sourceStrategy:w})}e(xt,"addNode");function gt(a,d,n=!1,y,o){P.addLink({source:a,target:d,dashed:n,label:y,flow:o})}e(gt,"addLink");function yt(a,d,n){P.addTrend({nodeId:a,targetX:d,targetY:n})}e(yt,"addTrend");function ut(a,d,n){P.addAnnotation({number:a,coordinates:d,text:n})}e(ut,"addAnnotation");function wt(a,d,n){P.addNote({text:a,x:d,y:n})}e(wt,"addNote");function mt(a,d,n){P.addAccelerator({name:a,x:d,y:n})}e(mt,"addAccelerator");function kt(a,d,n){P.addDeaccelerator({name:a,x:d,y:n})}e(kt,"addDeaccelerator");function bt(a,d){P.setAnnotationsBox(a,d)}e(bt,"setAnnotationsBox");function $t(a,d){P.setSize(a,d)}e($t,"setSize");function vt(a){P.startPipeline(a)}e(vt,"startPipeline");function Pt(a,d){P.addPipelineComponent(a,d)}e(Pt,"addPipelineComponent");function Ct(a){P.setAxes(a)}e(Ct,"updateAxes");function St(a){return P.getNode(a)}e(St,"getNode");function Mt(a){return P.resolveNodeId(a)}e(Mt,"resolveNodeId");function Nt(){return P.build()}e(Nt,"getWardleyData");function zt(){P.clear(),C()}e(zt,"clear");var Ot={getConfig:ft,addNode:xt,addLink:gt,addTrend:yt,addAnnotation:ut,addNote:wt,addAccelerator:mt,addDeaccelerator:kt,setAnnotationsBox:bt,setSize:$t,startPipeline:vt,addPipelineComponent:Pt,updateAxes:Ct,getNode:St,resolveNodeId:Mt,getWardleyData:Nt,clear:zt,setAccTitle:S,getAccTitle:E,setDiagramTitle:I,getDiagramTitle:L,getAccDescription:A,setAccDescription:T},Dt=["Genesis","Custom Built","Product","Commodity"],Gt=e(()=>{let{themeVariables:a}=s();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),qt=e(()=>{let a=s()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),jt=e((a,d,n,y)=>{r.debug(`Rendering Wardley map
1
+ import{W}from"./chunk-b1pe46zz.js";import{e,r,we,b,B,C,S,E,T,A,I,L,s,q,U}from"./chunk-y0m8hrwz.js";import{X}from"./chunk-taynqrgq.js";var ot=e((a,d)=>{let n=a<=1?a*100:a;if(n<0||n>100)throw Error(`${d} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return n},"toPercent"),V=e((a,d,n)=>({x:ot(d,`${n} evolution`),y:ot(a,`${n} visibility`)}),"toCoordinates"),pt=e((a)=>{if(!a)return;if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward";return},"getFlowFromPort"),Bt=e((a)=>{if(!a?.startsWith("+"))return{};let n=/^\+'([^']*)'/.exec(a)?.[1];if(a.includes("<>"))return{flow:"bidirectional",label:n};if(a.includes("<"))return{flow:"backward",label:n};if(a.includes(">"))return{flow:"forward",label:n};return{label:n}},"extractFlowFromArrow"),Ft=e((a,d)=>{if(W(a,d),a.size)d.setSize(a.size.width,a.size.height);if(a.evolution){let n=a.evolution.stages.map((o)=>{if(o.secondName)return`${o.name.trim()} / ${o.secondName.trim()}`;return o.name.trim()}),y=a.evolution.stages.filter((o)=>o.boundary!==void 0).map((o)=>o.boundary);d.updateAxes({stages:n,stageBoundaries:y})}if(a.anchors.forEach((n)=>{let y=V(n.visibility,n.evolution,`Anchor "${n.name}"`);d.addNode(n.name,n.name,y.x,y.y,"anchor")}),a.components.forEach((n)=>{let y=V(n.visibility,n.evolution,`Component "${n.name}"`),o=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,p=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,k=n.decorator?.strategy;d.addNode(n.name,n.name,y.x,y.y,"component",o,p,n.inertia,k)}),a.notes.forEach((n)=>{let y=V(n.visibility,n.evolution,`Note "${n.text}"`);d.addNote(n.text,y.x,y.y)}),a.pipelines.forEach((n)=>{let y=d.getNode(n.parent);if(!y||typeof y.y!=="number")throw Error(`Pipeline "${n.parent}" must reference an existing component with coordinates.`);let o=y.y;d.startPipeline(n.parent),n.components.forEach((p)=>{let k=`${n.parent}_${p.name}`,Y=p.label?(p.label.negX?-1:1)*p.label.offsetX:void 0,w=p.label?(p.label.negY?-1:1)*p.label.offsetY:void 0,tt=ot(p.evolution,`Pipeline component "${p.name}" evolution`);d.addNode(k,p.name,tt,o,"pipeline-component",Y,w),d.addPipelineComponent(n.parent,k)})}),a.links.forEach((n)=>{let y=!!n.arrow&&(n.arrow.includes("-.->")||n.arrow.includes(".-.")),o=pt(n.fromPort)??pt(n.toPort),{flow:p,label:k}=Bt(n.arrow);if(!o&&p)o=p;let Y=n.linkLabel,w=k??Y;d.addLink(d.resolveNodeId(n.from),d.resolveNodeId(n.to),y,w,o)}),a.evolves.forEach((n)=>{let y=d.getNode(n.component);if(y?.y!==void 0){let o=ot(n.target,`Evolve target for "${n.component}"`);d.addTrend(n.component,o,y.y)}}),a.annotations.length>0){let n=a.annotations[0],y=V(n.x,n.y,"Annotations box");d.setAnnotationsBox(y.x,y.y)}a.annotation.forEach((n)=>{let y=V(n.x,n.y,`Annotation ${n.number}`);d.addAnnotation(n.number,[{x:y.x,y:y.y}],n.text)}),a.accelerators.forEach((n)=>{let y=V(n.x,n.y,`Accelerator "${n.name}"`);d.addAccelerator(n.name,y.x,y.y)}),a.deaccelerators.forEach((n)=>{let y=V(n.x,n.y,`Deaccelerator "${n.name}"`);d.addDeaccelerator(n.name,y.x,y.y)})},"populateDb"),ht={parser:{yy:void 0},parse:e(async(a)=>{let d=await X("wardley",a);r.debug(d);let n=ht.parser?.yy;if(!n||typeof n.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ft(d,n)},"parse")},Rt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,"WardleyBuilder")}addNode(a){let d=this.nodes.get(a.id)??{id:a.id,label:a.label},n={...d,...a,className:a.className??d.className,labelOffsetX:a.labelOffsetX??d.labelOffsetX,labelOffsetY:a.labelOffsetY??d.labelOffsetY};this.nodes.set(a.id,n)}addLink(a){this.links.push(a)}addTrend(a){this.trends.set(a.nodeId,a)}startPipeline(a){this.pipelines.set(a,{nodeId:a,componentIds:[]});let d=this.nodes.get(a);if(d)d.isPipelineParent=!0}addPipelineComponent(a,d){let n=this.pipelines.get(a);if(n)n.componentIds.push(d);let y=this.nodes.get(d);if(y)y.inPipeline=!0}addAnnotation(a){this.annotations.push(a)}addNote(a){this.notes.push(a)}addAccelerator(a){this.accelerators.push(a)}addDeaccelerator(a){this.deaccelerators.push(a)}setAnnotationsBox(a,d){this.annotationsBox={x:a,y:d}}setAxes(a){this.axes={...this.axes,...a}}setSize(a,d){this.size={width:a,height:d}}getNode(a){return this.nodes.get(a)}resolveNodeId(a){if(this.nodes.has(a))return a;for(let[d,n]of this.nodes)if(n.label===a)return d;return a}build(){let a=[];for(let d of this.nodes.values()){if(typeof d.x!=="number"||typeof d.y!=="number")throw Error(`Node "${d.label}" is missing coordinates`);a.push(d)}return{nodes:a,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},P=new Rt;function ft(){return s()["wardley-beta"]}e(ft,"getConfig");function xt(a,d,n,y,o,p,k,Y,w){P.addNode({id:a,label:d,x:n,y,className:o,labelOffsetX:p,labelOffsetY:k,inertia:Y,sourceStrategy:w})}e(xt,"addNode");function gt(a,d,n=!1,y,o){P.addLink({source:a,target:d,dashed:n,label:y,flow:o})}e(gt,"addLink");function yt(a,d,n){P.addTrend({nodeId:a,targetX:d,targetY:n})}e(yt,"addTrend");function ut(a,d,n){P.addAnnotation({number:a,coordinates:d,text:n})}e(ut,"addAnnotation");function wt(a,d,n){P.addNote({text:a,x:d,y:n})}e(wt,"addNote");function mt(a,d,n){P.addAccelerator({name:a,x:d,y:n})}e(mt,"addAccelerator");function kt(a,d,n){P.addDeaccelerator({name:a,x:d,y:n})}e(kt,"addDeaccelerator");function bt(a,d){P.setAnnotationsBox(a,d)}e(bt,"setAnnotationsBox");function $t(a,d){P.setSize(a,d)}e($t,"setSize");function vt(a){P.startPipeline(a)}e(vt,"startPipeline");function Pt(a,d){P.addPipelineComponent(a,d)}e(Pt,"addPipelineComponent");function Ct(a){P.setAxes(a)}e(Ct,"updateAxes");function St(a){return P.getNode(a)}e(St,"getNode");function Mt(a){return P.resolveNodeId(a)}e(Mt,"resolveNodeId");function Nt(){return P.build()}e(Nt,"getWardleyData");function zt(){P.clear(),C()}e(zt,"clear");var Ot={getConfig:ft,addNode:xt,addLink:gt,addTrend:yt,addAnnotation:ut,addNote:wt,addAccelerator:mt,addDeaccelerator:kt,setAnnotationsBox:bt,setSize:$t,startPipeline:vt,addPipelineComponent:Pt,updateAxes:Ct,getNode:St,resolveNodeId:Mt,getWardleyData:Nt,clear:zt,setAccTitle:S,getAccTitle:E,setDiagramTitle:I,getDiagramTitle:L,getAccDescription:A,setAccDescription:T},Dt=["Genesis","Custom Built","Product","Commodity"],Gt=e(()=>{let{themeVariables:a}=s();return{backgroundColor:a.wardley?.backgroundColor??a.background??"#fff",axisColor:a.wardley?.axisColor??"#000",axisTextColor:a.wardley?.axisTextColor??a.primaryTextColor??"#222",gridColor:a.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:a.wardley?.componentFill??"#fff",componentStroke:a.wardley?.componentStroke??"#000",componentLabelColor:a.wardley?.componentLabelColor??a.primaryTextColor??"#222",linkStroke:a.wardley?.linkStroke??"#000",evolutionStroke:a.wardley?.evolutionStroke??"#dc3545",annotationStroke:a.wardley?.annotationStroke??"#000",annotationTextColor:a.wardley?.annotationTextColor??a.primaryTextColor??"#222",annotationFill:a.wardley?.annotationFill??a.background??"#fff"}},"getTheme"),qt=e(()=>{let a=s()["wardley-beta"];return{width:a?.width??900,height:a?.height??600,padding:a?.padding??48,nodeRadius:a?.nodeRadius??6,nodeLabelOffset:a?.nodeLabelOffset??8,axisFontSize:a?.axisFontSize??12,labelFontSize:a?.labelFontSize??10,showGrid:a?.showGrid??!1,useMaxWidth:a?.useMaxWidth??!0}},"getConfigValues"),jt=e((a,d,n,y)=>{r.debug(`Rendering Wardley map
2
2
  `+a);let o=qt(),p=Gt(),k=o.nodeRadius*1.6,Y=y.db,w=Y.getWardleyData(),tt=Y.getDiagramTitle(),F=w.size?.width??o.width,M=w.size?.height??o.height,Z=q(d);Z.selectAll("*").remove(),B(Z,M,F,o.useMaxWidth),Z.attr("viewBox",`0 0 ${F} ${M}`);let z=Z.append("g").attr("class","wardley-map"),nt=Z.append("defs");nt.append("marker").attr("id",`arrow-${d}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.evolutionStroke).attr("stroke","none"),nt.append("marker").attr("id",`link-arrow-end-${d}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.linkStroke).attr("stroke","none"),nt.append("marker").attr("id",`link-arrow-start-${d}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",p.linkStroke).attr("stroke","none"),z.append("rect").attr("class","wardley-background").attr("width",F).attr("height",M).attr("fill",p.backgroundColor);let J=F-o.padding*2,K=M-o.padding*2;if(tt)z.append("text").attr("class","wardley-title").attr("x",F/2).attr("y",o.padding/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(tt);let D=e((t)=>o.padding+t/100*J,"projectX"),G=e((t)=>M-o.padding-t/100*K,"projectY"),et=z.append("g").attr("class","wardley-axes");et.append("line").attr("x1",o.padding).attr("x2",F-o.padding).attr("y1",M-o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1),et.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1);let Lt=w.axes.xLabel??"Evolution",Tt=w.axes.yLabel??"Visibility";et.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+J/2).attr("y",M-o.padding/4).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Lt),et.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+K/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+K/2})`).text(Tt);let Q=w.axes.stages&&w.axes.stages.length>0?w.axes.stages:Dt;if(Q.length>0){let t=z.append("g").attr("class","wardley-stages"),l=w.axes.stageBoundaries,i=[];if(l&&l.length===Q.length){let c=0;l.forEach((f)=>{i.push({start:c,end:f}),c=f})}else{let c=1/Q.length;Q.forEach((f,x)=>{i.push({start:x*c,end:(x+1)*c})})}Q.forEach((c,f)=>{let x=i[f],u=o.padding+x.start*J,g=o.padding+x.end*J,m=(u+g)/2;if(f>0)t.append("line").attr("x1",u).attr("x2",u).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);t.append("text").attr("class","wardley-stage-label").attr("x",m).attr("y",M-o.padding/1.5).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(c)})}if(o.showGrid){let t=z.append("g").attr("class","wardley-grid");for(let l=1;l<4;l++){let i=l/4,c=o.padding+J*i;t.append("line").attr("x1",c).attr("x2",c).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",F-o.padding).attr("y1",M-o.padding-K*i).attr("y2",M-o.padding-K*i).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6")}}let h=new Map;if(w.nodes.forEach((t)=>{h.set(t.id,{x:D(t.x),y:G(t.y),node:t})}),w.pipelines.length>0){let t=z.append("g").attr("class","wardley-pipelines"),l=z.append("g").attr("class","wardley-pipeline-links");w.pipelines.forEach((i)=>{if(i.componentIds.length===0)return;let c=i.componentIds.map((g)=>({id:g,pos:h.get(g),node:w.nodes.find((m)=>m.id===g)})).filter((g)=>g.pos&&g.node).sort((g,m)=>g.node.x-m.node.x);for(let g=0;g<c.length-1;g++){let m=c[g],v=c[g+1];l.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",m.pos.x).attr("y1",m.pos.y).attr("x2",v.pos.x).attr("y2",v.pos.y).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let f=1/0,x=-1/0,u=0;if(i.componentIds.forEach((g)=>{let m=h.get(g);if(m)f=Math.min(f,m.x),x=Math.max(x,m.x),u=m.y}),f!==1/0&&x!==-1/0){let m=o.nodeRadius*4,v=u-m/2,H=h.get(i.nodeId);if(H){let O=(f+x)/2;H.x=O,H.y=v-k/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",f-15).attr("y",v).attr("width",x-f+30).attr("height",m).attr("fill","none").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let dt=z.append("g").attr("class","wardley-links"),lt=new Map;w.pipelines.forEach((t)=>{lt.set(t.nodeId,new Set(t.componentIds))});let ct=w.links.filter((t)=>{if(!h.has(t.source)||!h.has(t.target))return!1;if(lt.get(t.target)?.has(t.source))return!1;return!0});dt.selectAll("line").data(ct).enter().append("line").attr("class",(t)=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",(t)=>{let l=h.get(t.source),i=h.get(t.target),f=w.nodes.find((m)=>m.id===t.source).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=i.x-l.x,u=i.y-l.y,g=Math.sqrt(x*x+u*u);return l.x+x/g*f}).attr("y1",(t)=>{let l=h.get(t.source),i=h.get(t.target),f=w.nodes.find((m)=>m.id===t.source).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=i.x-l.x,u=i.y-l.y,g=Math.sqrt(x*x+u*u);return l.y+u/g*f}).attr("x2",(t)=>{let l=h.get(t.source),i=h.get(t.target),f=w.nodes.find((m)=>m.id===t.target).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=l.x-i.x,u=l.y-i.y,g=Math.sqrt(x*x+u*u);return i.x+x/g*f}).attr("y2",(t)=>{let l=h.get(t.source),i=h.get(t.target),f=w.nodes.find((m)=>m.id===t.target).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=l.x-i.x,u=l.y-i.y,g=Math.sqrt(x*x+u*u);return i.y+u/g*f}).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(t)=>t.dashed?"6 6":null).attr("marker-end",(t)=>{if(t.flow==="forward"||t.flow==="bidirectional")return`url(#link-arrow-end-${d})`;return null}).attr("marker-start",(t)=>{if(t.flow==="backward"||t.flow==="bidirectional")return`url(#link-arrow-start-${d})`;return null}),dt.selectAll("text").data(ct.filter((t)=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(t)=>{let l=h.get(t.source),i=h.get(t.target),c=(l.x+i.x)/2,f=i.y-l.y,x=i.x-l.x,u=Math.sqrt(x*x+f*f),g=8,m=f/u;return c+m*8}).attr("y",(t)=>{let l=h.get(t.source),i=h.get(t.target),c=(l.y+i.y)/2,f=i.x-l.x,x=i.y-l.y,u=Math.sqrt(f*f+x*x),g=8,m=-f/u;return c+m*8}).attr("fill",p.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(t)=>{let l=h.get(t.source),i=h.get(t.target),c=(l.x+i.x)/2,f=(l.y+i.y)/2,x=i.x-l.x,u=i.y-l.y,g=Math.sqrt(x*x+u*u),m=8,v=u/g,H=-x/g,O=c+v*8,at=f+H*8,_=Math.atan2(u,x)*180/Math.PI;if(_>90||_<-90)_+=180;return`rotate(${_} ${O} ${at})`}).text((t)=>t.label);let Wt=z.append("g").attr("class","wardley-trends"),At=w.trends.map((t)=>{let l=h.get(t.nodeId);if(!l)return null;let i=D(t.targetX),c=G(t.targetY),f=i-l.x,x=c-l.y,u=Math.sqrt(f*f+x*x),g=o.nodeRadius+2,m=u>g?i-f/u*g:i,v=u>g?c-x/u*g:c;return{origin:l,targetX:i,targetY:c,adjustedX2:m,adjustedY2:v}}).filter((t)=>t!==null);Wt.selectAll("line").data(At).enter().append("line").attr("class","wardley-trend").attr("x1",(t)=>t.origin.x).attr("y1",(t)=>t.origin.y).attr("x2",(t)=>t.adjustedX2).attr("y2",(t)=>t.adjustedY2).attr("stroke",p.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${d})`);let R=z.append("g").attr("class","wardley-nodes").selectAll("g").data(w.nodes).enter().append("g").attr("class",(t)=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));R.filter((t)=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",p.componentStroke).attr("stroke-width",1),R.filter((t)=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",p.componentStroke).attr("stroke-width",1),R.filter((t)=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let j=R.filter((t)=>t.sourceStrategy==="market");j.append("circle").attr("class","wardley-market-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),R.filter((t)=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1);let st=o.nodeRadius*0.7,N=o.nodeRadius*1.2;if(j.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x).attr("y1",(t)=>h.get(t.id).y-N).attr("x2",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("y2",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),j.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("y1",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("x2",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("y2",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),j.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("y1",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("x2",(t)=>h.get(t.id).x).attr("y2",(t)=>h.get(t.id).y-N).attr("stroke",p.componentStroke).attr("stroke-width",1),j.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y-N).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),j.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("cy",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),j.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("cy",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),R.filter((t)=>t.isPipelineParent===!0).append("rect").attr("x",(t)=>h.get(t.id).x-k/2).attr("y",(t)=>h.get(t.id).y-k/2).attr("width",k).attr("height",k).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),R.filter((t)=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(t)=>{let l=h.get(t.id),i=t.isPipelineParent?k/2+15:o.nodeRadius+15;if(t.sourceStrategy)i+=o.nodeRadius+10;return l.x+i}).attr("y1",(t)=>{let l=h.get(t.id),i=t.isPipelineParent?k:o.nodeRadius*2;return l.y-i/2}).attr("x2",(t)=>{let l=h.get(t.id),i=t.isPipelineParent?k/2+15:o.nodeRadius+15;if(t.sourceStrategy)i+=o.nodeRadius+10;return l.x+i}).attr("y2",(t)=>{let l=h.get(t.id),i=t.isPipelineParent?k:o.nodeRadius*2;return l.y+i/2}).attr("stroke",p.componentStroke).attr("stroke-width",6),R.append("text").attr("x",(t)=>{let l=h.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?l.x+t.labelOffsetX:l.x;let i=o.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetX===void 0)i+=10;let c=t.labelOffsetX??i;return l.x+c}).attr("y",(t)=>{let l=h.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?l.y+t.labelOffsetY:l.y-3;let i=-o.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetY===void 0)i-=10;let c=t.labelOffsetY??i;return l.y+c}).attr("class","wardley-node-label").attr("fill",(t)=>{if(t.className==="evolved")return p.evolutionStroke;if(t.className==="anchor")return"#000";return p.componentLabelColor}).attr("font-size",o.labelFontSize).attr("font-weight",(t)=>t.className==="anchor"?"bold":"normal").attr("text-anchor",(t)=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",(t)=>t.className==="anchor"?"middle":"auto").text((t)=>t.label),w.annotations.length>0){let t=z.append("g").attr("class","wardley-annotations");if(w.annotations.forEach((l)=>{let i=l.coordinates.map((c)=>({x:D(c.x),y:G(c.y)}));if(i.length>1)for(let c=0;c<i.length-1;c++)t.append("line").attr("class","wardley-annotation-line").attr("x1",i[c].x).attr("y1",i[c].y).attr("x2",i[c+1].x).attr("y2",i[c+1].y).attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");i.forEach((c)=>{let f=t.append("g").attr("class","wardley-annotation");f.append("circle").attr("cx",c.x).attr("cy",c.y).attr("r",10).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5),f.append("text").attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(l.number)})}),w.annotationsBox){let l=D(w.annotationsBox.x),i=G(w.annotationsBox.y),c=10,f=16,x=11,u=t.append("g").attr("class","wardley-annotations-box"),g=[...w.annotations].filter((v)=>v.text).sort((v,H)=>v.number-H.number),m=[];if(g.forEach((v,H)=>{let O=u.append("text").attr("x",l+c).attr("y",i+c+(H+1)*f).attr("font-size",x).attr("fill",p.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${v.number}. ${v.text}`);m.push(O)}),m.length>0){let v=0,H=0;m.forEach((it)=>{let rt=it.node(),Yt=rt.getComputedTextLength();v=Math.max(v,Yt);let It=rt.getBBox();H=Math.max(H,It.height)});let O=v+c*2+105,at=g.length*f+c*2+H/2,_=o.padding,Xt=F-o.padding-O,Et=o.padding,Ht=M-o.padding-at;l=Math.max(_,Math.min(l,Xt)),i=Math.max(Et,Math.min(i,Ht)),m.forEach((it,rt)=>{it.attr("x",l+c).attr("y",i+c+(rt+1)*f)}),u.insert("rect","text").attr("x",l).attr("y",i).attr("width",O).attr("height",at).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(w.notes.length>0){let t=z.append("g").attr("class","wardley-notes");w.notes.forEach((l)=>{let i=D(l.x),c=G(l.y);t.append("text").attr("x",i).attr("y",c).attr("text-anchor","start").attr("font-size",11).attr("fill",p.axisTextColor).attr("font-weight","bold").text(l.text)})}if(w.accelerators.length>0){let t=z.append("g").attr("class","wardley-accelerators");w.accelerators.forEach((l)=>{let i=D(l.x),c=G(l.y),f=60,x=30,u=20,g=`
3
3
  M ${i} ${c-15}
4
4
  L ${i+60-20} ${c-15}
@@ -1,2 +1,2 @@
1
- import{e}from"./chunk-jtwhjp20.js";var hn=class{constructor(t){this.init=t,this.records=this.init()}static{e(this,"ImperativeState")}reset(){this.records=this.init()}};
1
+ import{e}from"./chunk-y0m8hrwz.js";var hn=class{constructor(t){this.init=t,this.records=this.init()}static{e(this,"ImperativeState")}reset(){this.records=this.init()}};
2
2
  export{hn};
@@ -1,2 +1,2 @@
1
- import{e,r,B,q}from"./chunk-jtwhjp20.js";import{X}from"./chunk-gxn0bey7.js";var i={parse:e(async(t)=>{let a=await X("info",t);r.debug(a)},"parse")},s={version:"12.2.0"},p=e(()=>s.version,"getVersion"),g={getVersion:p},m=e((t,a,n)=>{r.debug(`rendering info diagram
1
+ import{e,r,B,q}from"./chunk-y0m8hrwz.js";import{X}from"./chunk-taynqrgq.js";var i={parse:e(async(t)=>{let a=await X("info",t);r.debug(a)},"parse")},s={version:"12.2.0"},p=e(()=>s.version,"getVersion"),g={getVersion:p},m=e((t,a,n)=>{r.debug(`rendering info diagram
2
2
  `+t);let o=q(a);B(o,100,400,!0),o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)},"draw"),v={draw:m},y={parser:i,db:g,renderer:v};export{y as diagram};
@@ -1,4 +1,4 @@
1
- import{W}from"./chunk-e5rmr47n.js";import{e,r,D,b,O,mt,C,S,E,T,A,I,L,s,p,q,Bi,In,nt,U,Fe,Ie}from"./chunk-jtwhjp20.js";import{X}from"./chunk-gxn0bey7.js";import{lt,sr}from"./chunk-942prjb6.js";import{Ce,Se}from"./chunk-32ezm0ry.js";var ut=Se(function(rt,st){(function(n,l){if(typeof rt==="object"&&typeof st==="object")st.exports=l(sr());else if(typeof define==="function"&&define.amd)define(["cose-base"],l);else if(typeof rt==="object")rt.cytoscapeFcose=l(sr());else n.cytoscapeFcose=l(n.coseBase)})(rt,function(t){return(()=>{var n={658:(k)=>{k.exports=Object.assign!=null?Object.assign.bind(Object):function(z){for(var v=arguments.length,N=Array(v>1?v-1:0),c=1;c<v;c++)N[c-1]=arguments[c];return N.forEach(function(y){Object.keys(y).forEach(function(d){return z[d]=y[d]})}),z}},548:(k,z,v)=>{var N=function(){function d(f,u){var g=[],i=!0,B=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(i=(h=o.next()).done);i=!0)if(g.push(h.value),u&&g.length===u)break}catch(R){B=!0,F=R}finally{try{if(!i&&o.return)o.return()}finally{if(B)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(i,B){if(typeof i==="number")i=B;var F=i.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var i=new c,B=new Set,F=[],o=void 0,h=void 0,R=void 0,a=!1,P=1,H=[],M=[],V=function(){var x=d.collection();M.push(x);var Y=u[0],Z=d.collection();Z.merge(Y).merge(Y.descendants().intersection(f)),F.push(Y),Z.forEach(function(re){i.push(re),B.add(re),x.merge(re)});var Q=function(){Y=i.shift();var ue=d.collection();Y.neighborhood().nodes().forEach(function(j){if(f.intersection(Y.edgesWith(j)).length>0)ue.merge(j)});for(var Ae=0;Ae<ue.length;Ae++){var Pe=ue[Ae];if(o=u.intersection(Pe.union(Pe.ancestors())),o!=null&&!B.has(o[0])){var de=o.union(o.descendants());de.forEach(function(j){if(i.push(j),B.add(j),x.merge(j),u.has(j))F.push(j)})}}};while(i.length!=0)Q();if(x.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(x.has(ue.source())&&x.has(ue.target()))x.merge(ue)})}),F.length==u.length)a=!0;if(!a||a&&P>1){h=F[0],R=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<R)R=re.connectedEdges().length,h=re}),H.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do V();while(!a);if(g){if(H.length>0)g.set("dummy"+(g.size+1),H)}return M},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:i,POSITIVE_INFINITY:B,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,R=void 0;try{for(var a=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=a.next()).done);o=!0){var H=P.value,M=N(H,2),V=M[0],_=M[1],x=u.cy.getElementById(V);if(x){var Y=x.boundingBox(),Z=f.xCoords[_]-Y.w/2,Q=f.xCoords[_]+Y.w/2,se=f.yCoords[_]-Y.h/2,re=f.yCoords[_]+Y.h/2;if(Z<g)g=Z;if(Q>i)i=Q;if(se<B)B=se;if(re>F)F=re}}}catch(j){h=!0,R=j}finally{try{if(!o&&a.return)a.return()}finally{if(h)throw R}}var ue=d.x-(i+g)/2,Ae=d.y-(F+B)/2;f.xCoords=f.xCoords.map(function(j){return j+ue}),f.yCoords=f.yCoords.map(function(j){return j+Ae})}else{Object.keys(f).forEach(function(j){var oe=f[j],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>i)i=ke;if(De<B)B=De;if(xe>F)F=xe});var Pe=d.x-(i+g)/2,de=d.y-(F+B)/2;Object.keys(f).forEach(function(j){var oe=f[j];oe.setCenter(oe.getCenterX()+Pe,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:i,MIN_SAFE_INTEGER:B,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,R=void 0,a=void 0,P=void 0,H=d.descendants().not(":parent"),M=H.length;for(var V=0;V<M;V++){var _=H[V];if(h=f[g.get(_.id())]-_.width()/2,R=f[g.get(_.id())]+_.width()/2,a=u[g.get(_.id())]-_.height()/2,P=u[g.get(_.id())]+_.height()/2,i>h)i=h;if(B<R)B=R;if(F>a)F=a;if(o<P)o=P}var x={};return x.topLeftX=i,x.topLeftY=F,x.width=B-i,x.height=o-F,x},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var i=!1;if(g.children().forEach(function(B){if(B.css("display")!="none")i=!0}),!i)u.merge(g)}),u},k.exports=y},816:(k,z,v)=>{var N=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,i=v(140).CoSEConstants,B=function(o,h){var{cy:R,eles:a}=o,P=a.nodes(),H=a.edges(),M=void 0,V=void 0,_=void 0,x={};if(o.randomize)M=h.nodeIndexes,V=h.xCoords,_=h.yCoords;var Y=function(j){return typeof j==="function"},Z=function(j,oe){if(Y(j))return j(oe);else return j},Q=N.calcParentsWithoutChildren(R,a),se=function de(j,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var J=oe[xe],Te=null;if(J.intersection(Q).length==0)Te=J.children();var ie=void 0,ve=J.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(J.outerWidth()!=null&&J.outerHeight()!=null)if(ke.randomize)if(!J.isParent())ie=j.add(new y(Ne.graphManager,new d(V[M.get(J.id())]-ve.w/2,_[M.get(J.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=N.calcBoundingBox(J,V,_,M);if(J.intersection(Q).length==0)ie=j.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=j.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=j.add(new y(Ne.graphManager,new d(J.position("x")-ve.w/2,J.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=j.add(new y(this.graphManager));if(ie.id=J.data("id"),ie.nodeRepulsion=Z(ke.nodeRepulsion,J),ie.paddingLeft=parseInt(J.css("padding")),ie.paddingTop=parseInt(J.css("padding")),ie.paddingRight=parseInt(J.css("padding")),ie.paddingBottom=parseInt(J.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=J.css("text-valign"),ie.labelPosHorizontal=J.css("text-halign");if(x[J.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Te!=null&&Te.length>0){var ze=void 0;ze=Ne.getGraphManager().add(Ne.newGraph(),ie),de(ze,Te,Ne,ke)}}},re=function(j,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var J=Ne[xe],Te=x[J.data("source")],ie=x[J.data("target")];if(Te&&ie&&Te!==ie&&Te.getEdgesBetween(ie).length==0){var ve=oe.add(j.newEdge(),Te,ie);ve.id=J.id(),ve.idealLength=Z(o.idealEdgeLength,J),ve.edgeElasticity=Z(o.edgeElasticity,J),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)i.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!Y(o.idealEdgeLength))i.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else i.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;i.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,i.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(j,oe){if(oe.fixedNodeConstraint)j.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)j.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)j.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)i.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)i.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)i.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)i.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)i.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(i.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,i.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,i.TILE=o.tile,i.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,i.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,i.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!1;if(o.step=="enforced")i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!1;if(o.step=="cose")i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)i.TREE_REDUCTION_ON_INCREMENTAL=!1;else i.TREE_REDUCTION_ON_INCREMENTAL=!0;var Ae=new c,Pe=Ae.newGraphManager();return se(Pe.addRoot(),N.getTopMostNodes(P),Ae,o),re(Ae,Pe,H),ue(Ae,o),Ae.runLayout(),x};k.exports={coseLayout:B}},212:(k,z,v)=>{var N=function(){function o(h,R){for(var a=0;a<R.length;a++){var P=R[a];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,R,a){if(R)o(h.prototype,R);if(a)o(h,a);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),i=g.coseLayout,B=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},B,h)}return N(o,[{key:"run",value:function(){var R=this,a=this.options,{cy:P,eles:H}=a,M=[],V=void 0,_=void 0,x=[],Y=void 0,Z=[];if(a.fixedNodeConstraint&&(!Array.isArray(a.fixedNodeConstraint)||a.fixedNodeConstraint.length==0))a.fixedNodeConstraint=void 0;if(a.alignmentConstraint){if(a.alignmentConstraint.vertical&&(!Array.isArray(a.alignmentConstraint.vertical)||a.alignmentConstraint.vertical.length==0))a.alignmentConstraint.vertical=void 0;if(a.alignmentConstraint.horizontal&&(!Array.isArray(a.alignmentConstraint.horizontal)||a.alignmentConstraint.horizontal.length==0))a.alignmentConstraint.horizontal=void 0}if(a.relativePlacementConstraint&&(!Array.isArray(a.relativePlacementConstraint)||a.relativePlacementConstraint.length==0))a.relativePlacementConstraint=void 0;var Q=a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint;if(Q)a.tile=!1,a.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&a.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(H.nodes().length>0)if(!re){var ue=a.eles.boundingBox();if(Z.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),a.randomize){var Ae=u(a);M.push(Ae)}if(a.quality=="default"||a.quality=="proof")x.push(i(a,M[0])),d.relocateComponent(Z[0],x[0],a);else d.relocateComponent(Z[0],M[0],a)}else{var Pe=d.getTopMostNodes(a.eles.nodes());if(Y=d.connectComponents(P,a.eles,Pe),Y.forEach(function(K){var G=K.boundingBox();Z.push({x:G.x1+G.w/2,y:G.y1+G.h/2})}),a.randomize)Y.forEach(function(K){a.eles=K,M.push(u(a))});if(a.quality=="default"||a.quality=="proof"){var de=P.collection();if(a.tile){var j=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:j,xCoords:oe,yCoords:Ne},xe=[];if(Y.forEach(function(K,G){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(G)}),de.length>1){var J=de.boundingBox();Z.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),Y.push(de),M.push(De);for(var Te=xe.length-1;Te>=0;Te--)Y.splice(xe[Te],1),M.splice(xe[Te],1),Z.splice(xe[Te],1)}}Y.forEach(function(K,G){a.eles=K,x.push(i(a,M[G])),d.relocateComponent(Z[G],x[G],a)})}else Y.forEach(function(K,G){d.relocateComponent(Z[G],M[G],a)});var ie=new Set;if(Y.length>1){var ve=[],Me=H.filter(function(K){return K.css("display")=="none"});Y.forEach(function(K,G){var pe=void 0;if(a.quality=="draft")pe=M[G].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(a.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:M[G].xCoords[me]-fe.boundingbox().w/2,y:M[G].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,M[G].xCoords,M[G].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(x[G][fe.id()])le.nodes.push({x:x[G][fe.id()].getLeft(),y:x[G][fe.id()].getTop(),width:x[G][fe.id()].getWidth(),height:x[G][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(a.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Oe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,M[G].xCoords,M[G].yCoords,pe);Oe.push(We.topLeftX+We.width/2),Oe.push(We.topLeftY+We.height/2)}else Oe.push(M[G].xCoords[Be]),Oe.push(M[G].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,M[G].xCoords,M[G].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(M[G].xCoords[et]),Ye.push(M[G].yCoords[et]);le.edges.push({startX:Oe[0],startY:Oe[1],endX:Ye[0],endY:Ye[1]})}else if(x[G][he.id()]&&x[G][Ee.id()])le.edges.push({startX:x[G][he.id()].getCenterX(),startY:x[G][he.id()].getCenterY(),endX:x[G][Ee.id()].getCenterX(),endY:x[G][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(G)}});var ze=se.packComponents(ve,a.randomize).shifts;if(a.quality=="draft")M.forEach(function(K,G){var pe=K.xCoords.map(function(me){return me+ze[G].dx}),le=K.yCoords.map(function(me){return me+ze[G].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(x[K]).forEach(function(G){var pe=x[K][G];pe.setCenter(pe.getCenterX()+ze[Ke].dx,pe.getCenterY()+ze[Ke].dy)}),Ke++})}}}var je=function(G,pe){if(a.quality=="default"||a.quality=="proof"){if(typeof G==="number")G=pe;var le=void 0,me=void 0,fe=G.data("id");if(x.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),a.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:G.position("x"),y:G.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(M.forEach(function(Ee){var Be=Ee.nodeIndexes.get(G.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:G.position("x"),y:G.position("y")};return{x:he.x,y:he.y}}};if(a.quality=="default"||a.quality=="proof"||a.randomize){var at=d.calcParentsWithoutChildren(P,H),qe=H.filter(function(K){return K.css("display")=="none"});if(a.eles=H.not(qe),H.nodes().not(":parent").not(qe).layoutPositions(R,a,je),at.length>0)at.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();k.exports=F},657:(k,z,v)=>{var N=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:i}=u,B=i.nodes(),F=i.nodes(":parent"),o=new Map,h=new Map,R=new Map,a=[],P=[],H=[],M=[],V=[],_=[],x=[],Y=[],Z=void 0,Q=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Ae,nodeSeparation:Pe}=u,de=void 0,j=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Q),ne=!1;for(var ae=0;ae<te;ae++)if(M[ae]==ee){ne=!0;break}if(!ne)M[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Le=void 0,be=[],$e=0,_e=1;for(var Ue=0;Ue<Q;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=a[ce];for(var He=0;He<Xe.length;He++)if(Le=h.get(Xe[He]),be[Le]==se)be[Le]=be[ce]+1,ae[++ge]=Le;_[ce][te]=be[ce]*Pe}if(ne){for(var Ge=0;Ge<Q;Ge++)if(_[Ge][te]<V[Ge])V[Ge]=_[Ge][te];for(var tt=0;tt<Q;tt++)if(V[tt]>$e)$e=V[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){j();for(var ne=0;ne<de;ne++)oe(M[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Q),Z=te;for(var ae=0;ae<Q;ae++)V[ae]=se;for(var we=0;we<de;we++)M[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Q;ge++)for(var ce=0;ce<de;ce++)_[ge][ce]*=_[ge][ce];for(var Le=0;Le<de;Le++)x[Le]=[];for(var be=0;be<de;be++)for(var $e=0;$e<de;$e++)x[be][$e]=_[M[$e]][be]},ke=function(){var ee=y.svd(x),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Le=0;Le<de;Le++)if(ge[ce][Le]=0,ce==Le)ge[ce][Le]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}Y=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Q;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Le=0,be=re,$e=re,_e=void 0;while(!0){Le++;for(var Ue=0;Ue<Q;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),_,Y)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Xe=0;Xe<Q;Xe++)we[Xe]=ne[Xe];Le=0,$e=re;while(!0){Le++;for(var He=0;He<Q;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),_,Y)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Ge=0;Ge<Q;Ge++)ge[Ge]=ae[Ge];P=c.multCons(we,Math.sqrt(Math.abs(ee))),H=c.multCons(ge,Math.sqrt(Math.abs(te)))};N.connectComponents(g,i,N.getTopMostNodes(B),o),F.forEach(function(ye){N.connectComponents(g,i,N.getTopMostNodes(ye.descendants().intersection(i)),o)});var xe=0;for(var J=0;J<B.length;J++)if(!B[J].isParent())h.set(B[J].id(),xe++);var Te=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),ze;!(Te=(ze=Me.next()).done);Te=!0){var Ke=ze.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Te&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)a[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(i);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(i);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),R.set(ye.id(),ee.nodes(":childless")[te].id())}),B.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(R.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(i.intersection(ye.edgesWith(te)).length>0)if(te.isParent())a[ee].push(R.get(te.id()));else a[ee].push(te.id())})});var at=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=R.get(ae);else ne=ae;a[te].push(ne),a[h.get(ne)].push(ee)})},qe=!0,K=!1,G=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;at(me)}}catch(ye){K=!0,G=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw G}}Q=h.size;var fe=void 0;if(Q>2){de=Q<u.sampleSize?Q:u.sampleSize;for(var he=0;he<Q;he++)_[he]=[];for(var Ee=0;Ee<de;Ee++)Y[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Ae),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:H};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),H.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:H};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Oe=et.position(),Ye=et.outerWidth();if(P.push(Oe.x),H.push(Oe.y),Q==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Oe.x+Ye/2+Je/2+u.idealEdgeLength),H.push(Oe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:H},fe}};k.exports={spectralLayout:d}},579:(k,z,v)=>{var N=v(212),c=function(d){if(!d)return;d("layout","fcose",N)};if(typeof cytoscape<"u")c(cytoscape);k.exports=c},140:(k)=>{k.exports=t}},l={};function w(k){var z=l[k];if(z!==void 0)return z.exports;var v=l[k]={exports:{}};return n[k](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Ce(ut(),1);var gt={L:"left",R:"right",T:"top",B:"bottom"},ht={L:e((t)=>`${t},${t/2} 0,${t} 0,0`,"L"),R:e((t)=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:e((t)=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:e((t)=>`${t/2},0 ${t},${t} 0,${t}`,"B")},ot={L:e((t,n)=>t-n+2,"L"),R:e((t,n)=>t-2,"R"),T:e((t,n)=>t-n+2,"T"),B:e((t,n)=>t-2,"B")},kt=e(function(t){if(Re(t))return t==="L"?"R":"L";else return t==="T"?"B":"T"},"getOppositeArchitectureDirection"),vt=e(function(t){let n=t;return n==="L"||n==="R"||n==="T"||n==="B"},"isArchitectureDirection"),Re=e(function(t){let n=t;return n==="L"||n==="R"},"isArchitectureDirectionX"),Ve=e(function(t){let n=t;return n==="T"||n==="B"},"isArchitectureDirectionY"),ft=e(function(t,n){let l=Re(t)&&Ve(n),w=Ve(t)&&Re(n);return l||w},"isArchitectureDirectionXY"),Dt=e(function(t){let n=t[0],l=t[1],w=Re(n)&&Ve(l),m=Ve(n)&&Re(l);return w||m},"isArchitecturePairXY"),Rt=e(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),ct=e(function(t,n){let l=`${t}${n}`;return Rt(l)?l:void 0},"getArchitectureDirectionPair"),Mt=e(function([t,n],l){let w=l[0],m=l[1];if(Re(w))if(Ve(m))return[t+(w==="L"?-1:1),n+(m==="T"?1:-1)];else return[t+(w==="L"?-1:1),n];else if(Re(m))return[t+(m==="L"?1:-1),n+(w==="T"?1:-1)];else return[t,n+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=e(function(t){if(t==="LT"||t==="TL")return[1,1];else if(t==="BL"||t==="LB")return[1,-1];else if(t==="BR"||t==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=e(function(t,n){if(ft(t,n))return"bend";else if(Re(t))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=e(function(t){return t.type==="service"},"isArchitectureService"),Ot=e(function(t){return t.type==="junction"},"isArchitectureJunction"),pt=e((t,n)=>{let[l,w]=[t,n].sort();return`${JSON.stringify(l)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=e((t)=>t.data(),"edgeData"),Qe=e((t)=>t.data(),"nodeData"),Gt=D.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:t,icon:n,in:l,title:w,iconText:m}){if(this.registeredIds.has(t))throw Error(`The service id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(l!==void 0){if(t===l)throw Error(`The service [${t}] cannot be placed within itself`);if(!this.registeredIds.has(l))throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(l)==="node")throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"service",icon:n,iconText:m,title:w,edges:[],in:l})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:t,in:n}){if(this.registeredIds.has(t))throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(n!==void 0){if(t===n)throw Error(`The junction [${t}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(n)==="node")throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"junction",edges:[],in:n})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(t){return this.nodes.get(t)??null}addGroup({id:t,icon:n,in:l,title:w}){if(this.registeredIds.has(t))throw Error(`The group id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(l!==void 0){if(t===l)throw Error(`The group [${t}] cannot be placed within itself`);if(!this.registeredIds.has(l))throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(l)==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds.set(t,"group"),this.groups.set(t,{id:t,icon:n,title:w,in:l})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:t,rhsId:n,lhsDir:l,rhsDir:w,lhsInto:m,rhsInto:k,lhsGroup:z,rhsGroup:v,title:N}){if(!vt(l))throw Error(`Invalid direction given for left hand side of edge ${t}--${n}. Expected (L,R,T,B) got ${String(l)}`);if(!vt(w))throw Error(`Invalid direction given for right hand side of edge ${t}--${n}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(n)&&!this.groups.has(n))throw Error(`The right-hand id [${n}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(t).in,y=this.nodes.get(n).in;if(z&&c&&y&&c==y)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${n}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:t,lhsDir:l,lhsInto:m,lhsGroup:z,rhsId:n,rhsDir:w,rhsInto:k,rhsGroup:v,title:N};this.edges.push(d);let f=this.nodes.get(t),u=this.nodes.get(n);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw Error(`An align directive requires at least two members; got ${t.members.length}`);let n=new Set;t.members.forEach((l)=>{if(this.registeredIds.get(l)!=="node")throw Error(`align ${t.direction} references [${l}], which is not a service or junction`);if(n.has(l))throw Error(`align ${t.direction} lists [${l}] more than once`);n.add(l)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let t=new Map,n=new Map;for(let[z,v]of this.nodes.entries()){let N=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")t.set(pt(y,d),f)}if(c.lhsId===z){let f=ct(c.lhsDir,c.rhsDir);if(f)N.set(f,c.rhsId)}else{let f=ct(c.rhsDir,c.lhsDir);if(f)N.set(f,c.lhsId)}}n.set(z,N)}let l=new Set,w=new Set(n.keys()),m=e((z)=>{let v=new Map([[z,[0,0]]]),N=[z];while(N.length>0){let c=N.shift();if(c){l.add(c),w.delete(c);let y=n.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,i)=>{if(!l.has(g))v.set(g,Mt([f,u],i)),N.push(g)})}}return v},"BFS"),k=[];while(w.size>0){let z=w.values().next().value;k.push(m(z))}this.dataStructures={adjList:n,spatialMaps:k,groupAlignments:t}}return this.dataStructures}setElementForId(t,n){this.elements.set(t,n)}getElementById(t){return this.elements.get(t)}getConfig(){return U({...Gt,...b().architecture})}getConfigField(t){return this.getConfig()[t]}},zt=e((t,n)=>{W(t,n),t.groups.map((l)=>n.addGroup(l)),t.services.map((l)=>n.addService({...l,type:"service"})),t.junctions.map((l)=>n.addJunction({...l,type:"junction"})),t.edges.map((l)=>n.addEdge(l)),t.alignments?.map((l)=>n.addLayoutHint({direction:l.direction,members:[...l.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:e(async(t)=>{let n=await X("architecture",t);r.debug(n);let l=wt.parser?.yy;if(!(l instanceof Et))throw 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.");zt(n,l)},"parse")},Bt=e((t)=>`
1
+ import{W}from"./chunk-b1pe46zz.js";import{e,r,D,b,O,mt,C,S,E,T,A,I,L,s,p,q,Bi,In,nt,U,Fe,Ie}from"./chunk-y0m8hrwz.js";import{X}from"./chunk-taynqrgq.js";import{lt,sr}from"./chunk-dt462hk9.js";import{Ce,Se}from"./chunk-vt40e1kp.js";var ut=Se(function(rt,st){(function(n,l){if(typeof rt==="object"&&typeof st==="object")st.exports=l(sr());else if(typeof define==="function"&&define.amd)define(["cose-base"],l);else if(typeof rt==="object")rt.cytoscapeFcose=l(sr());else n.cytoscapeFcose=l(n.coseBase)})(rt,function(t){return(()=>{var n={658:(k)=>{k.exports=Object.assign!=null?Object.assign.bind(Object):function(z){for(var v=arguments.length,N=Array(v>1?v-1:0),c=1;c<v;c++)N[c-1]=arguments[c];return N.forEach(function(y){Object.keys(y).forEach(function(d){return z[d]=y[d]})}),z}},548:(k,z,v)=>{var N=function(){function d(f,u){var g=[],i=!0,B=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(i=(h=o.next()).done);i=!0)if(g.push(h.value),u&&g.length===u)break}catch(R){B=!0,F=R}finally{try{if(!i&&o.return)o.return()}finally{if(B)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(i,B){if(typeof i==="number")i=B;var F=i.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var i=new c,B=new Set,F=[],o=void 0,h=void 0,R=void 0,a=!1,P=1,H=[],M=[],V=function(){var x=d.collection();M.push(x);var Y=u[0],Z=d.collection();Z.merge(Y).merge(Y.descendants().intersection(f)),F.push(Y),Z.forEach(function(re){i.push(re),B.add(re),x.merge(re)});var Q=function(){Y=i.shift();var ue=d.collection();Y.neighborhood().nodes().forEach(function(j){if(f.intersection(Y.edgesWith(j)).length>0)ue.merge(j)});for(var Ae=0;Ae<ue.length;Ae++){var Pe=ue[Ae];if(o=u.intersection(Pe.union(Pe.ancestors())),o!=null&&!B.has(o[0])){var de=o.union(o.descendants());de.forEach(function(j){if(i.push(j),B.add(j),x.merge(j),u.has(j))F.push(j)})}}};while(i.length!=0)Q();if(x.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(x.has(ue.source())&&x.has(ue.target()))x.merge(ue)})}),F.length==u.length)a=!0;if(!a||a&&P>1){h=F[0],R=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<R)R=re.connectedEdges().length,h=re}),H.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do V();while(!a);if(g){if(H.length>0)g.set("dummy"+(g.size+1),H)}return M},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:i,POSITIVE_INFINITY:B,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,R=void 0;try{for(var a=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=a.next()).done);o=!0){var H=P.value,M=N(H,2),V=M[0],_=M[1],x=u.cy.getElementById(V);if(x){var Y=x.boundingBox(),Z=f.xCoords[_]-Y.w/2,Q=f.xCoords[_]+Y.w/2,se=f.yCoords[_]-Y.h/2,re=f.yCoords[_]+Y.h/2;if(Z<g)g=Z;if(Q>i)i=Q;if(se<B)B=se;if(re>F)F=re}}}catch(j){h=!0,R=j}finally{try{if(!o&&a.return)a.return()}finally{if(h)throw R}}var ue=d.x-(i+g)/2,Ae=d.y-(F+B)/2;f.xCoords=f.xCoords.map(function(j){return j+ue}),f.yCoords=f.yCoords.map(function(j){return j+Ae})}else{Object.keys(f).forEach(function(j){var oe=f[j],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>i)i=ke;if(De<B)B=De;if(xe>F)F=xe});var Pe=d.x-(i+g)/2,de=d.y-(F+B)/2;Object.keys(f).forEach(function(j){var oe=f[j];oe.setCenter(oe.getCenterX()+Pe,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:i,MIN_SAFE_INTEGER:B,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,R=void 0,a=void 0,P=void 0,H=d.descendants().not(":parent"),M=H.length;for(var V=0;V<M;V++){var _=H[V];if(h=f[g.get(_.id())]-_.width()/2,R=f[g.get(_.id())]+_.width()/2,a=u[g.get(_.id())]-_.height()/2,P=u[g.get(_.id())]+_.height()/2,i>h)i=h;if(B<R)B=R;if(F>a)F=a;if(o<P)o=P}var x={};return x.topLeftX=i,x.topLeftY=F,x.width=B-i,x.height=o-F,x},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var i=!1;if(g.children().forEach(function(B){if(B.css("display")!="none")i=!0}),!i)u.merge(g)}),u},k.exports=y},816:(k,z,v)=>{var N=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,i=v(140).CoSEConstants,B=function(o,h){var{cy:R,eles:a}=o,P=a.nodes(),H=a.edges(),M=void 0,V=void 0,_=void 0,x={};if(o.randomize)M=h.nodeIndexes,V=h.xCoords,_=h.yCoords;var Y=function(j){return typeof j==="function"},Z=function(j,oe){if(Y(j))return j(oe);else return j},Q=N.calcParentsWithoutChildren(R,a),se=function de(j,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var J=oe[xe],Te=null;if(J.intersection(Q).length==0)Te=J.children();var ie=void 0,ve=J.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(J.outerWidth()!=null&&J.outerHeight()!=null)if(ke.randomize)if(!J.isParent())ie=j.add(new y(Ne.graphManager,new d(V[M.get(J.id())]-ve.w/2,_[M.get(J.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=N.calcBoundingBox(J,V,_,M);if(J.intersection(Q).length==0)ie=j.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=j.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=j.add(new y(Ne.graphManager,new d(J.position("x")-ve.w/2,J.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=j.add(new y(this.graphManager));if(ie.id=J.data("id"),ie.nodeRepulsion=Z(ke.nodeRepulsion,J),ie.paddingLeft=parseInt(J.css("padding")),ie.paddingTop=parseInt(J.css("padding")),ie.paddingRight=parseInt(J.css("padding")),ie.paddingBottom=parseInt(J.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=J.css("text-valign"),ie.labelPosHorizontal=J.css("text-halign");if(x[J.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Te!=null&&Te.length>0){var ze=void 0;ze=Ne.getGraphManager().add(Ne.newGraph(),ie),de(ze,Te,Ne,ke)}}},re=function(j,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var J=Ne[xe],Te=x[J.data("source")],ie=x[J.data("target")];if(Te&&ie&&Te!==ie&&Te.getEdgesBetween(ie).length==0){var ve=oe.add(j.newEdge(),Te,ie);ve.id=J.id(),ve.idealLength=Z(o.idealEdgeLength,J),ve.edgeElasticity=Z(o.edgeElasticity,J),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)i.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!Y(o.idealEdgeLength))i.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else i.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;i.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,i.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(j,oe){if(oe.fixedNodeConstraint)j.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)j.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)j.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)i.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)i.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)i.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)i.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)i.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(i.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,i.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,i.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,i.TILE=o.tile,i.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,i.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,i.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,i.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!1;if(o.step=="enforced")i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!1;if(o.step=="cose")i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,i.ENFORCE_CONSTRAINTS=!1,i.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)i.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else i.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;i.ENFORCE_CONSTRAINTS=!0,i.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)i.TREE_REDUCTION_ON_INCREMENTAL=!1;else i.TREE_REDUCTION_ON_INCREMENTAL=!0;var Ae=new c,Pe=Ae.newGraphManager();return se(Pe.addRoot(),N.getTopMostNodes(P),Ae,o),re(Ae,Pe,H),ue(Ae,o),Ae.runLayout(),x};k.exports={coseLayout:B}},212:(k,z,v)=>{var N=function(){function o(h,R){for(var a=0;a<R.length;a++){var P=R[a];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,R,a){if(R)o(h.prototype,R);if(a)o(h,a);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),i=g.coseLayout,B=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},B,h)}return N(o,[{key:"run",value:function(){var R=this,a=this.options,{cy:P,eles:H}=a,M=[],V=void 0,_=void 0,x=[],Y=void 0,Z=[];if(a.fixedNodeConstraint&&(!Array.isArray(a.fixedNodeConstraint)||a.fixedNodeConstraint.length==0))a.fixedNodeConstraint=void 0;if(a.alignmentConstraint){if(a.alignmentConstraint.vertical&&(!Array.isArray(a.alignmentConstraint.vertical)||a.alignmentConstraint.vertical.length==0))a.alignmentConstraint.vertical=void 0;if(a.alignmentConstraint.horizontal&&(!Array.isArray(a.alignmentConstraint.horizontal)||a.alignmentConstraint.horizontal.length==0))a.alignmentConstraint.horizontal=void 0}if(a.relativePlacementConstraint&&(!Array.isArray(a.relativePlacementConstraint)||a.relativePlacementConstraint.length==0))a.relativePlacementConstraint=void 0;var Q=a.fixedNodeConstraint||a.alignmentConstraint||a.relativePlacementConstraint;if(Q)a.tile=!1,a.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&a.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(H.nodes().length>0)if(!re){var ue=a.eles.boundingBox();if(Z.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),a.randomize){var Ae=u(a);M.push(Ae)}if(a.quality=="default"||a.quality=="proof")x.push(i(a,M[0])),d.relocateComponent(Z[0],x[0],a);else d.relocateComponent(Z[0],M[0],a)}else{var Pe=d.getTopMostNodes(a.eles.nodes());if(Y=d.connectComponents(P,a.eles,Pe),Y.forEach(function(K){var G=K.boundingBox();Z.push({x:G.x1+G.w/2,y:G.y1+G.h/2})}),a.randomize)Y.forEach(function(K){a.eles=K,M.push(u(a))});if(a.quality=="default"||a.quality=="proof"){var de=P.collection();if(a.tile){var j=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:j,xCoords:oe,yCoords:Ne},xe=[];if(Y.forEach(function(K,G){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(G)}),de.length>1){var J=de.boundingBox();Z.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),Y.push(de),M.push(De);for(var Te=xe.length-1;Te>=0;Te--)Y.splice(xe[Te],1),M.splice(xe[Te],1),Z.splice(xe[Te],1)}}Y.forEach(function(K,G){a.eles=K,x.push(i(a,M[G])),d.relocateComponent(Z[G],x[G],a)})}else Y.forEach(function(K,G){d.relocateComponent(Z[G],M[G],a)});var ie=new Set;if(Y.length>1){var ve=[],Me=H.filter(function(K){return K.css("display")=="none"});Y.forEach(function(K,G){var pe=void 0;if(a.quality=="draft")pe=M[G].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(a.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:M[G].xCoords[me]-fe.boundingbox().w/2,y:M[G].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,M[G].xCoords,M[G].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(x[G][fe.id()])le.nodes.push({x:x[G][fe.id()].getLeft(),y:x[G][fe.id()].getTop(),width:x[G][fe.id()].getWidth(),height:x[G][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(a.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Oe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,M[G].xCoords,M[G].yCoords,pe);Oe.push(We.topLeftX+We.width/2),Oe.push(We.topLeftY+We.height/2)}else Oe.push(M[G].xCoords[Be]),Oe.push(M[G].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,M[G].xCoords,M[G].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(M[G].xCoords[et]),Ye.push(M[G].yCoords[et]);le.edges.push({startX:Oe[0],startY:Oe[1],endX:Ye[0],endY:Ye[1]})}else if(x[G][he.id()]&&x[G][Ee.id()])le.edges.push({startX:x[G][he.id()].getCenterX(),startY:x[G][he.id()].getCenterY(),endX:x[G][Ee.id()].getCenterX(),endY:x[G][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(G)}});var ze=se.packComponents(ve,a.randomize).shifts;if(a.quality=="draft")M.forEach(function(K,G){var pe=K.xCoords.map(function(me){return me+ze[G].dx}),le=K.yCoords.map(function(me){return me+ze[G].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(x[K]).forEach(function(G){var pe=x[K][G];pe.setCenter(pe.getCenterX()+ze[Ke].dx,pe.getCenterY()+ze[Ke].dy)}),Ke++})}}}var je=function(G,pe){if(a.quality=="default"||a.quality=="proof"){if(typeof G==="number")G=pe;var le=void 0,me=void 0,fe=G.data("id");if(x.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),a.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:G.position("x"),y:G.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(M.forEach(function(Ee){var Be=Ee.nodeIndexes.get(G.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:G.position("x"),y:G.position("y")};return{x:he.x,y:he.y}}};if(a.quality=="default"||a.quality=="proof"||a.randomize){var at=d.calcParentsWithoutChildren(P,H),qe=H.filter(function(K){return K.css("display")=="none"});if(a.eles=H.not(qe),H.nodes().not(":parent").not(qe).layoutPositions(R,a,je),at.length>0)at.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();k.exports=F},657:(k,z,v)=>{var N=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:i}=u,B=i.nodes(),F=i.nodes(":parent"),o=new Map,h=new Map,R=new Map,a=[],P=[],H=[],M=[],V=[],_=[],x=[],Y=[],Z=void 0,Q=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Ae,nodeSeparation:Pe}=u,de=void 0,j=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Q),ne=!1;for(var ae=0;ae<te;ae++)if(M[ae]==ee){ne=!0;break}if(!ne)M[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Le=void 0,be=[],$e=0,_e=1;for(var Ue=0;Ue<Q;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=a[ce];for(var He=0;He<Xe.length;He++)if(Le=h.get(Xe[He]),be[Le]==se)be[Le]=be[ce]+1,ae[++ge]=Le;_[ce][te]=be[ce]*Pe}if(ne){for(var Ge=0;Ge<Q;Ge++)if(_[Ge][te]<V[Ge])V[Ge]=_[Ge][te];for(var tt=0;tt<Q;tt++)if(V[tt]>$e)$e=V[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){j();for(var ne=0;ne<de;ne++)oe(M[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Q),Z=te;for(var ae=0;ae<Q;ae++)V[ae]=se;for(var we=0;we<de;we++)M[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Q;ge++)for(var ce=0;ce<de;ce++)_[ge][ce]*=_[ge][ce];for(var Le=0;Le<de;Le++)x[Le]=[];for(var be=0;be<de;be++)for(var $e=0;$e<de;$e++)x[be][$e]=_[M[$e]][be]},ke=function(){var ee=y.svd(x),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Le=0;Le<de;Le++)if(ge[ce][Le]=0,ce==Le)ge[ce][Le]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}Y=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Q;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Le=0,be=re,$e=re,_e=void 0;while(!0){Le++;for(var Ue=0;Ue<Q;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),_,Y)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Xe=0;Xe<Q;Xe++)we[Xe]=ne[Xe];Le=0,$e=re;while(!0){Le++;for(var He=0;He<Q;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),_,Y)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/$e),_e<=1+ue&&_e>=1)break;$e=be}for(var Ge=0;Ge<Q;Ge++)ge[Ge]=ae[Ge];P=c.multCons(we,Math.sqrt(Math.abs(ee))),H=c.multCons(ge,Math.sqrt(Math.abs(te)))};N.connectComponents(g,i,N.getTopMostNodes(B),o),F.forEach(function(ye){N.connectComponents(g,i,N.getTopMostNodes(ye.descendants().intersection(i)),o)});var xe=0;for(var J=0;J<B.length;J++)if(!B[J].isParent())h.set(B[J].id(),xe++);var Te=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),ze;!(Te=(ze=Me.next()).done);Te=!0){var Ke=ze.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Te&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)a[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(i);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(i);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),R.set(ye.id(),ee.nodes(":childless")[te].id())}),B.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(R.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(i.intersection(ye.edgesWith(te)).length>0)if(te.isParent())a[ee].push(R.get(te.id()));else a[ee].push(te.id())})});var at=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=R.get(ae);else ne=ae;a[te].push(ne),a[h.get(ne)].push(ee)})},qe=!0,K=!1,G=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;at(me)}}catch(ye){K=!0,G=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw G}}Q=h.size;var fe=void 0;if(Q>2){de=Q<u.sampleSize?Q:u.sampleSize;for(var he=0;he<Q;he++)_[he]=[];for(var Ee=0;Ee<de;Ee++)Y[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Ae),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:H};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),H.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:H};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Oe=et.position(),Ye=et.outerWidth();if(P.push(Oe.x),H.push(Oe.y),Q==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Oe.x+Ye/2+Je/2+u.idealEdgeLength),H.push(Oe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:H},fe}};k.exports={spectralLayout:d}},579:(k,z,v)=>{var N=v(212),c=function(d){if(!d)return;d("layout","fcose",N)};if(typeof cytoscape<"u")c(cytoscape);k.exports=c},140:(k)=>{k.exports=t}},l={};function w(k){var z=l[k];if(z!==void 0)return z.exports;var v=l[k]={exports:{}};return n[k](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Ce(ut(),1);var gt={L:"left",R:"right",T:"top",B:"bottom"},ht={L:e((t)=>`${t},${t/2} 0,${t} 0,0`,"L"),R:e((t)=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:e((t)=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:e((t)=>`${t/2},0 ${t},${t} 0,${t}`,"B")},ot={L:e((t,n)=>t-n+2,"L"),R:e((t,n)=>t-2,"R"),T:e((t,n)=>t-n+2,"T"),B:e((t,n)=>t-2,"B")},kt=e(function(t){if(Re(t))return t==="L"?"R":"L";else return t==="T"?"B":"T"},"getOppositeArchitectureDirection"),vt=e(function(t){let n=t;return n==="L"||n==="R"||n==="T"||n==="B"},"isArchitectureDirection"),Re=e(function(t){let n=t;return n==="L"||n==="R"},"isArchitectureDirectionX"),Ve=e(function(t){let n=t;return n==="T"||n==="B"},"isArchitectureDirectionY"),ft=e(function(t,n){let l=Re(t)&&Ve(n),w=Ve(t)&&Re(n);return l||w},"isArchitectureDirectionXY"),Dt=e(function(t){let n=t[0],l=t[1],w=Re(n)&&Ve(l),m=Ve(n)&&Re(l);return w||m},"isArchitecturePairXY"),Rt=e(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),ct=e(function(t,n){let l=`${t}${n}`;return Rt(l)?l:void 0},"getArchitectureDirectionPair"),Mt=e(function([t,n],l){let w=l[0],m=l[1];if(Re(w))if(Ve(m))return[t+(w==="L"?-1:1),n+(m==="T"?1:-1)];else return[t+(w==="L"?-1:1),n];else if(Re(m))return[t+(m==="L"?1:-1),n+(w==="T"?1:-1)];else return[t,n+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=e(function(t){if(t==="LT"||t==="TL")return[1,1];else if(t==="BL"||t==="LB")return[1,-1];else if(t==="BR"||t==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=e(function(t,n){if(ft(t,n))return"bend";else if(Re(t))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=e(function(t){return t.type==="service"},"isArchitectureService"),Ot=e(function(t){return t.type==="junction"},"isArchitectureJunction"),pt=e((t,n)=>{let[l,w]=[t,n].sort();return`${JSON.stringify(l)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=e((t)=>t.data(),"edgeData"),Qe=e((t)=>t.data(),"nodeData"),Gt=D.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=I,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:t,icon:n,in:l,title:w,iconText:m}){if(this.registeredIds.has(t))throw Error(`The service id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(l!==void 0){if(t===l)throw Error(`The service [${t}] cannot be placed within itself`);if(!this.registeredIds.has(l))throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(l)==="node")throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"service",icon:n,iconText:m,title:w,edges:[],in:l})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:t,in:n}){if(this.registeredIds.has(t))throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(n!==void 0){if(t===n)throw Error(`The junction [${t}] cannot be placed within itself`);if(!this.registeredIds.has(n))throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(n)==="node")throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"junction",edges:[],in:n})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(t){return this.nodes.get(t)??null}addGroup({id:t,icon:n,in:l,title:w}){if(this.registeredIds.has(t))throw Error(`The group id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(l!==void 0){if(t===l)throw Error(`The group [${t}] cannot be placed within itself`);if(!this.registeredIds.has(l))throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(l)==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds.set(t,"group"),this.groups.set(t,{id:t,icon:n,title:w,in:l})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:t,rhsId:n,lhsDir:l,rhsDir:w,lhsInto:m,rhsInto:k,lhsGroup:z,rhsGroup:v,title:N}){if(!vt(l))throw Error(`Invalid direction given for left hand side of edge ${t}--${n}. Expected (L,R,T,B) got ${String(l)}`);if(!vt(w))throw Error(`Invalid direction given for right hand side of edge ${t}--${n}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(n)&&!this.groups.has(n))throw Error(`The right-hand id [${n}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(t).in,y=this.nodes.get(n).in;if(z&&c&&y&&c==y)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${n}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:t,lhsDir:l,lhsInto:m,lhsGroup:z,rhsId:n,rhsDir:w,rhsInto:k,rhsGroup:v,title:N};this.edges.push(d);let f=this.nodes.get(t),u=this.nodes.get(n);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw Error(`An align directive requires at least two members; got ${t.members.length}`);let n=new Set;t.members.forEach((l)=>{if(this.registeredIds.get(l)!=="node")throw Error(`align ${t.direction} references [${l}], which is not a service or junction`);if(n.has(l))throw Error(`align ${t.direction} lists [${l}] more than once`);n.add(l)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let t=new Map,n=new Map;for(let[z,v]of this.nodes.entries()){let N=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")t.set(pt(y,d),f)}if(c.lhsId===z){let f=ct(c.lhsDir,c.rhsDir);if(f)N.set(f,c.rhsId)}else{let f=ct(c.rhsDir,c.lhsDir);if(f)N.set(f,c.lhsId)}}n.set(z,N)}let l=new Set,w=new Set(n.keys()),m=e((z)=>{let v=new Map([[z,[0,0]]]),N=[z];while(N.length>0){let c=N.shift();if(c){l.add(c),w.delete(c);let y=n.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,i)=>{if(!l.has(g))v.set(g,Mt([f,u],i)),N.push(g)})}}return v},"BFS"),k=[];while(w.size>0){let z=w.values().next().value;k.push(m(z))}this.dataStructures={adjList:n,spatialMaps:k,groupAlignments:t}}return this.dataStructures}setElementForId(t,n){this.elements.set(t,n)}getElementById(t){return this.elements.get(t)}getConfig(){return U({...Gt,...b().architecture})}getConfigField(t){return this.getConfig()[t]}},zt=e((t,n)=>{W(t,n),t.groups.map((l)=>n.addGroup(l)),t.services.map((l)=>n.addService({...l,type:"service"})),t.junctions.map((l)=>n.addJunction({...l,type:"junction"})),t.edges.map((l)=>n.addEdge(l)),t.alignments?.map((l)=>n.addLayoutHint({direction:l.direction,members:[...l.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:e(async(t)=>{let n=await X("architecture",t);r.debug(n);let l=wt.parser?.yy;if(!(l instanceof Et))throw 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.");zt(n,l)},"parse")},Bt=e((t)=>`
2
2
  .edge {
3
3
  stroke-width: ${t.archEdgeWidth};
4
4
  stroke: ${t.archEdgeColor};
@@ -1,4 +1,4 @@
1
- import{e,r,se,Le,y,C,S,E,T,A,I,L,s,an,Tn,p,et,tt,N,Fe,le,ae,ie,Ye,Dr,he,ge}from"./chunk-jtwhjp20.js";import{Mt}from"./chunk-ghxe4gam.js";import{je}from"./chunk-hryhthxr.js";import{Pt}from"./chunk-ydgqrfvw.js";import{fe}from"./chunk-b5brnfv9.js";import{oe}from"./chunk-kbtbbarw.js";var A1="flowchart-",m1=class{constructor(){this.vertexCounter=0,this.config=s(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=S,this.setAccDescription=T,this.setDiagramTitle=I,this.getAccTitle=E,this.getAccDescription=A,this.getDiagramTitle=L,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{e(this,"FlowDB")}sanitizeText(t){return y.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let n of this.vertices.values())if(n.id===t)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,n,u,o,c,g,d={},D){if(!t||t.trim().length===0)return;let f;if(D!==void 0){let _;if(!D.includes(`
1
+ import{e,r,se,Le,y,C,S,E,T,A,I,L,s,an,Tn,p,et,tt,N,Fe,le,ae,ie,Ye,Dr,he,ge}from"./chunk-y0m8hrwz.js";import{Mt}from"./chunk-p3b9crsa.js";import{je}from"./chunk-2m12wyrb.js";import{Pt}from"./chunk-37ajk6zg.js";import{fe}from"./chunk-ss1bcb0n.js";import{oe}from"./chunk-hev4hq89.js";var A1="flowchart-",m1=class{constructor(){this.vertexCounter=0,this.config=s(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=S,this.setAccDescription=T,this.setDiagramTitle=I,this.getAccTitle=E,this.getAccDescription=A,this.getDiagramTitle=L,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{e(this,"FlowDB")}sanitizeText(t){return y.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let n of this.vertices.values())if(n.id===t)return this.diagramId?`${this.diagramId}-${n.domId}`:n.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,n,u,o,c,g,d={},D){if(!t||t.trim().length===0)return;let f;if(D!==void 0){let _;if(!D.includes(`
2
2
  `))_=`{
3
3
  `+D+`
4
4
  }`;else _=D+`