@bkm016/basalt 0.1.7 → 0.1.9

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 (290) hide show
  1. package/README.md +1 -1
  2. package/{chunk-0039s4jt.js → chunk-02d3x4mj.js} +3 -3
  3. package/{chunk-sjjtxpg2.js → chunk-0xd9mnc2.js} +394 -341
  4. package/{chunk-npez1492.js → chunk-13gvs0ax.js} +2 -2
  5. package/{chunk-n981vx1t.js → chunk-1n7dat03.js} +6 -6
  6. package/{chunk-6ptv4g5e.js → chunk-1zj3zvw5.js} +3 -3
  7. package/{chunk-zxkq9m8e.js → chunk-29qrxygd.js} +2 -2
  8. package/{chunk-y8dkfpmj.js → chunk-30rjf7my.js} +4 -4
  9. package/{chunk-39vwrg8n.js → chunk-38g3gctw.js} +2 -2
  10. package/{chunk-benrzwea.js → chunk-4dw43syb.js} +1 -1
  11. package/{chunk-w67dvqtb.js → chunk-4gtgqcct.js} +2 -2
  12. package/chunk-66h5qpc6.js +479 -0
  13. package/{chunk-8wj32837.js → chunk-755sy11p.js} +1 -1
  14. package/chunk-7zkswxvk.js +2 -0
  15. package/{chunk-ebpyvs1d.js → chunk-82v8jh1h.js} +2 -2
  16. package/chunk-95964592.js +25 -0
  17. package/{chunk-gv7wqkey.js → chunk-9as0p561.js} +2 -2
  18. package/{chunk-fx7f4m3c.js → chunk-a1352w87.js} +1 -1
  19. package/{chunk-8wv5t0w6.js → chunk-a1rb1a48.js} +6 -6
  20. package/{chunk-bdy4jksd.js → chunk-a98wma9j.js} +1 -1
  21. package/{chunk-peja51xv.js → chunk-asyr3gnq.js} +2 -2
  22. package/{chunk-7hr6zw2m.js → chunk-ax04trym.js} +1 -1
  23. package/chunk-b2bxqeb4.js +2 -0
  24. package/{chunk-6kdgk70p.js → chunk-bdjr0kfr.js} +4 -4
  25. package/{chunk-dnx91jrd.js → chunk-bk4rpnm8.js} +2 -2
  26. package/{chunk-8x21n7y9.js → chunk-c0zfefq8.js} +1 -1
  27. package/{chunk-pg5nkf1y.js → chunk-c6q04xrd.js} +2 -2
  28. package/chunk-c71173py.js +25 -0
  29. package/{chunk-c7rcw9fb.js → chunk-cmwdjes8.js} +5 -5
  30. package/{chunk-j7yvh0ae.js → chunk-d0a1jxk5.js} +1 -1
  31. package/{chunk-0javrjcm.js → chunk-d5j74pcp.js} +22 -22
  32. package/{chunk-ca982n62.js → chunk-dfh9m9n7.js} +1 -1
  33. package/{chunk-s6dejhfj.js → chunk-dq01v5eq.js} +1 -1
  34. package/{chunk-ecf896fz.js → chunk-e1x629v0.js} +2 -2
  35. package/{chunk-053vb71h.js → chunk-en218k4y.js} +1 -1
  36. package/{chunk-ey15ye2h.js → chunk-fgwda4m0.js} +1 -1
  37. package/chunk-gbjn6d81.js +2 -0
  38. package/{chunk-n85qs7cs.js → chunk-gkf5jwvj.js} +1 -1
  39. package/{chunk-d48bfd2e.js → chunk-h1kb8b49.js} +2 -2
  40. package/{chunk-whj87h4r.js → chunk-hb4f2v34.js} +3 -3
  41. package/{chunk-10p3mb40.js → chunk-hbnmymaq.js} +1 -1
  42. package/{chunk-818nd6s1.js → chunk-jj4hqbrx.js} +2 -2
  43. package/{chunk-r8vvcp6c.js → chunk-jn5pqy5v.js} +1 -1
  44. package/{chunk-f544p9rh.js → chunk-jtsve11b.js} +10 -10
  45. package/chunk-m1eam0s5.js +2 -0
  46. package/{chunk-g0t9c3gv.js → chunk-mbpb5c7w.js} +1 -1
  47. package/{chunk-prgm07j4.js → chunk-msm9hmk9.js} +2 -2
  48. package/{chunk-dpz4hwqb.js → chunk-n0ybj4h9.js} +2 -2
  49. package/{chunk-z02sj1je.js → chunk-n2jcx65v.js} +2 -2
  50. package/{chunk-x4874m8e.js → chunk-nrsd810j.js} +2 -2
  51. package/chunk-pnspvnyd.js +2 -0
  52. package/chunk-pz2afna8.js +2 -0
  53. package/{chunk-f156y565.js → chunk-q9f4xb0w.js} +3 -3
  54. package/{chunk-arcqjt91.js → chunk-qaeyhe65.js} +1 -1
  55. package/chunk-qnkrrwmg.js +2 -0
  56. package/{chunk-063vbmtp.js → chunk-r4ttdkrz.js} +2 -2
  57. package/{chunk-r9aatvwm.js → chunk-stj493dn.js} +2 -2
  58. package/{chunk-q9dd6fhj.js → chunk-tevejprz.js} +4 -4
  59. package/{chunk-75434aay.js → chunk-v3ee9z3f.js} +1 -1
  60. package/chunk-vtqr7dm8.js +3 -0
  61. package/chunk-xh444pfn.js +16 -0
  62. package/{chunk-y69ewdn2.js → chunk-ypqjfv3a.js} +2 -2
  63. package/{chunk-d6p2hgxh.js → chunk-zc9ar0r4.js} +1 -1
  64. package/{chunk-s7skpgm2.js → chunk-zyyzk5ha.js} +1 -1
  65. package/compiled.js +9 -9
  66. package/package.json +1 -1
  67. package/ui-test-worker.js +19 -19
  68. package/web/chunk-08sq3cwm.js +1 -0
  69. package/web/chunk-0pghpg4y.js +2 -0
  70. package/web/{chunk-z1geewdf.js → chunk-0zwc2rvh.js} +2 -2
  71. package/web/chunk-12qf1r6m.js +1 -0
  72. package/web/chunk-24fjnnee.js +1 -0
  73. package/web/chunk-24jhbz82.js +24 -0
  74. package/web/{chunk-5wbnjjhg.js → chunk-2dvbeqt0.js} +1 -1
  75. package/web/chunk-2hrswh3d.js +2 -0
  76. package/web/chunk-2j2atyjw.js +1 -0
  77. package/web/{chunk-n754s8xd.js → chunk-2x4g9t37.js} +8 -8
  78. package/web/{chunk-tfn0rqg9.js → chunk-3ak5dg10.js} +25 -25
  79. package/web/chunk-3ecrkvr3.js +106 -0
  80. package/web/chunk-3h3g3ca3.js +1 -0
  81. package/web/chunk-3hr3ew9w.js +1 -0
  82. package/web/chunk-3pcrxg6m.js +1 -0
  83. package/web/{chunk-xckxtfp8.js → chunk-3pd0qt83.js} +72 -72
  84. package/web/chunk-3txxt0a7.js +1 -0
  85. package/web/chunk-43g4wd7a.js +1 -0
  86. package/web/chunk-4a6gdrbs.js +1 -0
  87. package/web/{chunk-twdy2f67.js → chunk-5a4mj3qz.js} +1 -1
  88. package/web/{chunk-q97hn4j5.js → chunk-5baeh8q7.js} +38 -38
  89. package/web/{chunk-4fm55fgb.js → chunk-5dr4tkem.js} +7 -7
  90. package/web/{chunk-wqsczy57.js → chunk-5jdrev9p.js} +9 -9
  91. package/web/{chunk-dg3p8db5.js → chunk-5v2c0aqk.js} +1 -1
  92. package/web/chunk-5z2n4z9x.css +1 -0
  93. package/web/{chunk-pjz30xcp.js → chunk-601k823s.js} +23 -23
  94. package/web/{chunk-2cem4sv7.js → chunk-60axh4sa.js} +25 -25
  95. package/web/chunk-66wb0p6e.js +62 -0
  96. package/web/{chunk-qcge7d6s.js → chunk-6e87m0nm.js} +2 -2
  97. package/web/chunk-6y55gk1n.js +1 -0
  98. package/web/chunk-79e08rk1.js +2 -0
  99. package/web/chunk-7qkav30b.js +2 -0
  100. package/web/chunk-7qq1ypvj.js +1 -0
  101. package/web/{chunk-h6k1x096.js → chunk-7tkgbbf9.js} +2 -2
  102. package/web/chunk-814kkkmq.js +8 -0
  103. package/web/chunk-8jcvdd5d.js +2 -0
  104. package/web/{chunk-gksf7cek.js → chunk-8w7fyb3v.js} +7 -7
  105. package/web/chunk-8w8atrdh.js +1 -0
  106. package/web/{chunk-czjk218p.js → chunk-8z0r0wtk.js} +62 -62
  107. package/web/chunk-935mjq1c.js +39 -0
  108. package/web/chunk-942g3eqn.js +1 -0
  109. package/web/{chunk-ht4mx2dt.js → chunk-98y92vmh.js} +9 -9
  110. package/web/chunk-9ctg0f30.js +3 -0
  111. package/web/chunk-9fnr00kv.js +4 -0
  112. package/web/{chunk-5nda24gv.js → chunk-9yfftz38.js} +1 -1
  113. package/web/chunk-a0ryzdnp.js +7 -0
  114. package/web/chunk-a61zrp66.js +1 -0
  115. package/web/{chunk-nfvqjzz5.js → chunk-af9evdza.js} +1 -1
  116. package/web/chunk-arnzrqnm.js +1 -0
  117. package/web/chunk-avxk6jpc.js +2 -0
  118. package/web/{chunk-c01176kn.js → chunk-awkdw9rw.js} +2 -2
  119. package/web/{chunk-sy7e4dmq.js → chunk-b5h52neg.js} +1 -1
  120. package/web/chunk-bwy3e58v.js +1 -0
  121. package/web/{chunk-ja7w629n.js → chunk-c57f714b.js} +2 -2
  122. package/web/chunk-c6yacwbc.js +30 -0
  123. package/web/chunk-ctzkqx2g.js +169 -0
  124. package/web/chunk-db3twjvk.js +21 -0
  125. package/web/{chunk-femhej5w.js → chunk-ddyyc20r.js} +57 -57
  126. package/web/chunk-dnv8dx72.js +1 -0
  127. package/web/chunk-dwjmr0zj.js +2 -0
  128. package/web/chunk-dz7g1gnv.js +2 -0
  129. package/web/chunk-eadfxfkw.js +1 -0
  130. package/web/{chunk-d9wdsjkk.js → chunk-eqndhs21.js} +2 -2
  131. package/web/chunk-ewx42c11.js +55 -0
  132. package/web/chunk-f7jpakwh.js +1 -0
  133. package/web/{chunk-4sve9xrj.js → chunk-ff1pmd3g.js} +1 -1
  134. package/web/chunk-fjb3ksfd.js +78 -0
  135. package/web/chunk-fpb2dd2d.js +2 -0
  136. package/web/{chunk-fv6vm14n.js → chunk-frnh4zqf.js} +2 -2
  137. package/web/chunk-gn8kyz76.js +7 -0
  138. package/web/chunk-gv99c8zv.js +1 -0
  139. package/web/chunk-h0767tjv.js +1 -0
  140. package/web/chunk-hqynf99g.js +1 -0
  141. package/web/{chunk-jam45rqg.js → chunk-jccz14ye.js} +2 -2
  142. package/web/chunk-kcjz03h5.js +2 -0
  143. package/web/chunk-ket6g0yd.js +1 -0
  144. package/web/chunk-m9q5nr8f.js +1 -0
  145. package/web/chunk-mbwwj216.js +1 -0
  146. package/web/chunk-mdfksj61.js +1 -0
  147. package/web/chunk-me7dza1c.js +1 -0
  148. package/web/{chunk-gyp6v7jd.js → chunk-myd6sc76.js} +2 -2
  149. package/web/{chunk-sf101c23.js → chunk-mykrm8ba.js} +2 -2
  150. package/web/chunk-mzzaet63.js +1 -0
  151. package/web/chunk-n0wazxgz.js +1 -0
  152. package/web/chunk-nnyc889n.js +292 -0
  153. package/web/{chunk-e8yj05t1.js → chunk-nvpp0ghj.js} +6 -6
  154. package/web/chunk-nvt9tkt4.js +1139 -0
  155. package/web/{chunk-sn3tkwme.js → chunk-p9hfcamx.js} +37 -37
  156. package/web/chunk-ph1dgffm.js +1 -0
  157. package/web/chunk-q34as3v6.js +1 -0
  158. package/web/{chunk-sd3cdqcm.js → chunk-qh62nkem.js} +2 -2
  159. package/web/{chunk-j1bw5v1g.js → chunk-qq6m2my8.js} +2 -2
  160. package/web/{chunk-tmndcktk.js → chunk-qsqtwf34.js} +15 -15
  161. package/web/chunk-qz6r9v1z.js +1 -0
  162. package/web/chunk-rad2s9ha.js +1 -0
  163. package/web/{chunk-y99ed8rd.js → chunk-rasjtvsb.js} +16 -16
  164. package/web/chunk-rayf24gy.js +370 -0
  165. package/web/chunk-rrpn5r5w.js +2 -0
  166. package/web/chunk-s37beysw.js +1 -0
  167. package/web/chunk-s60s09mb.js +1 -0
  168. package/web/chunk-sk1wkgjw.js +4 -0
  169. package/web/chunk-spbs56wz.js +34 -0
  170. package/web/chunk-t893141g.js +2 -0
  171. package/web/chunk-tftc5v89.js +24 -0
  172. package/web/chunk-tfvcs2xx.js +1 -0
  173. package/web/chunk-tj1fn8v2.js +1 -0
  174. package/web/chunk-ts6jsfdk.js +41 -0
  175. package/web/chunk-v1exk5wd.js +324 -0
  176. package/web/chunk-veam6vk4.js +303 -0
  177. package/web/chunk-vqmj6peg.js +1 -0
  178. package/web/{chunk-t6sq85s6.js → chunk-vsjpnwsr.js} +2 -2
  179. package/web/{chunk-0whceqes.js → chunk-vvvd3grf.js} +2 -2
  180. package/web/{chunk-svh4n157.js → chunk-w3w18stt.js} +5 -5
  181. package/web/chunk-wdq2tp9e.js +1 -0
  182. package/web/chunk-wkf5xfyr.js +1 -0
  183. package/web/{chunk-4q7wf0wd.js → chunk-wzd2a4k5.js} +9 -9
  184. package/web/chunk-xa43ndfj.js +2 -0
  185. package/web/chunk-xh4xn1az.js +1 -0
  186. package/web/chunk-xx11yv61.js +89 -0
  187. package/web/chunk-xzwxcxb4.js +1 -0
  188. package/web/chunk-y1qty77a.js +1 -0
  189. package/web/{chunk-da7m1kva.js → chunk-y2rzeb4v.js} +2 -2
  190. package/web/chunk-ys2tns0p.js +1 -0
  191. package/web/chunk-z05x9cbm.js +1 -0
  192. package/web/chunk-zb2bkr7f.js +2 -0
  193. package/web/{chunk-aangfjqc.js → chunk-zdyys4ar.js} +38 -38
  194. package/web/chunk-zgavhnt8.js +1 -0
  195. package/web/index.html +1 -1
  196. package/worker.js +1 -1
  197. package/chunk-654cny9a.js +0 -480
  198. package/chunk-8gw5bvh3.js +0 -25
  199. package/chunk-8saewt61.js +0 -3
  200. package/chunk-a0c989ky.js +0 -2
  201. package/chunk-a5apjjcn.js +0 -16
  202. package/chunk-a81p46j7.js +0 -2
  203. package/chunk-agsfy9w7.js +0 -2
  204. package/chunk-d20p02ny.js +0 -2
  205. package/chunk-ejsneb6f.js +0 -2
  206. package/chunk-fmq3zwzk.js +0 -2
  207. package/chunk-rfb85nj7.js +0 -2
  208. package/chunk-rfdt992v.js +0 -25
  209. package/web/chunk-079091ar.js +0 -39
  210. package/web/chunk-083r4f80.js +0 -1
  211. package/web/chunk-0cng7r2x.js +0 -2
  212. package/web/chunk-0k0ande6.js +0 -1
  213. package/web/chunk-14deqqhr.js +0 -2
  214. package/web/chunk-1s53190z.js +0 -303
  215. package/web/chunk-2b63adsj.js +0 -89
  216. package/web/chunk-3baypnwn.js +0 -4
  217. package/web/chunk-4067nwjp.js +0 -19
  218. package/web/chunk-4vjnrz87.js +0 -34
  219. package/web/chunk-59678wmg.js +0 -1
  220. package/web/chunk-5k8sv4f5.js +0 -1
  221. package/web/chunk-5vjhvw1m.js +0 -2
  222. package/web/chunk-6bwgdvf6.js +0 -1
  223. package/web/chunk-6ft5pz3c.js +0 -1
  224. package/web/chunk-7c8rwqtx.js +0 -1
  225. package/web/chunk-7qzz025k.js +0 -1
  226. package/web/chunk-7xbaqqd7.css +0 -1
  227. package/web/chunk-80eyv2mk.js +0 -1
  228. package/web/chunk-89paytbk.js +0 -4
  229. package/web/chunk-8ceej2g7.js +0 -1
  230. package/web/chunk-8nyhy122.js +0 -1
  231. package/web/chunk-8r0s8tx7.js +0 -1
  232. package/web/chunk-989jq2h8.js +0 -2
  233. package/web/chunk-9w5tf22s.js +0 -1
  234. package/web/chunk-ahztazsg.js +0 -1
  235. package/web/chunk-bdydzbqk.js +0 -324
  236. package/web/chunk-c3nn0vvc.js +0 -1
  237. package/web/chunk-cpwtt6ny.js +0 -1
  238. package/web/chunk-d22wq71s.js +0 -1
  239. package/web/chunk-dsw5t58p.js +0 -1
  240. package/web/chunk-dv72fat3.js +0 -1
  241. package/web/chunk-dvvs1jjq.js +0 -3
  242. package/web/chunk-e131rg6p.js +0 -2
  243. package/web/chunk-ekw54h1q.js +0 -1
  244. package/web/chunk-geh05ghh.js +0 -55
  245. package/web/chunk-hwsvhst3.js +0 -1
  246. package/web/chunk-jfvxxp5c.js +0 -1
  247. package/web/chunk-k02b36g1.js +0 -62
  248. package/web/chunk-kjacapzd.js +0 -7
  249. package/web/chunk-kkfrs7d1.js +0 -41
  250. package/web/chunk-kkyn8yhj.js +0 -106
  251. package/web/chunk-mh4rx5cf.js +0 -1
  252. package/web/chunk-mz9b5bsa.js +0 -1
  253. package/web/chunk-n448vaba.js +0 -1
  254. package/web/chunk-n8j88qxy.js +0 -1
  255. package/web/chunk-nmpbsvwb.js +0 -2
  256. package/web/chunk-nws1s56b.js +0 -1
  257. package/web/chunk-p7126wwy.js +0 -7
  258. package/web/chunk-phnqnhj9.js +0 -1
  259. package/web/chunk-q3jevm51.js +0 -292
  260. package/web/chunk-qg31p6cn.js +0 -1
  261. package/web/chunk-qhm3cfq9.js +0 -1
  262. package/web/chunk-qsd595b9.js +0 -1
  263. package/web/chunk-r7frwjqx.js +0 -2
  264. package/web/chunk-rddft5ce.js +0 -1139
  265. package/web/chunk-rgbdf2m9.js +0 -370
  266. package/web/chunk-rsbkbg6x.js +0 -78
  267. package/web/chunk-s2bs5vxh.js +0 -2
  268. package/web/chunk-sgwccs54.js +0 -1
  269. package/web/chunk-sjh8gtm9.js +0 -30
  270. package/web/chunk-t3658ehb.js +0 -2
  271. package/web/chunk-t81p4wqc.js +0 -24
  272. package/web/chunk-tewmsd7t.js +0 -1
  273. package/web/chunk-tf57s7ry.js +0 -1
  274. package/web/chunk-thbqwq6b.js +0 -1
  275. package/web/chunk-tqr80b5w.js +0 -2
  276. package/web/chunk-tz4twwmw.js +0 -2
  277. package/web/chunk-v282r683.js +0 -24
  278. package/web/chunk-v4vjjtn7.js +0 -1
  279. package/web/chunk-vbwdwcdp.js +0 -1
  280. package/web/chunk-vjngfh0q.js +0 -1
  281. package/web/chunk-vnt34mkb.js +0 -1
  282. package/web/chunk-wbgkwxrc.js +0 -1
  283. package/web/chunk-wjbk50hn.js +0 -2
  284. package/web/chunk-wjy848e2.js +0 -1
  285. package/web/chunk-wvfmmw1v.js +0 -8
  286. package/web/chunk-x1jm4zsg.js +0 -1
  287. package/web/chunk-xbpc6x9m.js +0 -169
  288. package/web/chunk-xce8n339.js +0 -1
  289. package/web/chunk-xmsb2g71.js +0 -1
  290. package/web/chunk-xtss82z2.js +0 -1
@@ -0,0 +1 @@
1
+ import{ui}from"./chunk-c57f714b.js";export{ui as default};
@@ -1 +1 @@
1
- import{e,a,p}from"./chunk-1s53190z.js";import{ut,lr}from"./chunk-gksf7cek.js";import{Se,Te}from"./chunk-rddft5ce.js";var k=Te(function(F,Y){(function(g,r){if(typeof F==="object"&&typeof Y==="object")Y.exports=r(lr());else if(typeof define==="function"&&define.amd)define(["cose-base"],r);else if(typeof F==="object")F.cytoscapeCoseBilkent=r(lr());else g.cytoscapeCoseBilkent=r(g.coseBase)})(F,function(u){return function(g){var r={};function n(o){if(r[o])return r[o].exports;var d=r[o]={i:o,l:!1,exports:{}};return g[o].call(d.exports,d,d.exports,n),d.l=!0,d.exports}return n.m=g,n.c=r,n.i=function(o){return o},n.d=function(o,d,l){if(!n.o(o,d))Object.defineProperty(o,d,{configurable:!1,enumerable:!0,get:l})},n.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(d,"a",d),d},n.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},n.p="",n(n.s=1)}([function(g,r){g.exports=u},function(g,r,n){var o=n(0).layoutBase.LayoutConstants,d=n(0).layoutBase.FDLayoutConstants,l=n(0).CoSEConstants,L=n(0).CoSELayout,b=n(0).CoSENode,H=n(0).layoutBase.PointD,v=n(0).layoutBase.DimensionD,_={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:0.45,nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.5};function D(E,t){var f={};for(var s in E)f[s]=E[s];for(var s in t)f[s]=t[s];return f}function I(E){this.options=D(_,E),U(this.options)}var U=function(t){if(t.nodeRepulsion!=null)l.DEFAULT_REPULSION_STRENGTH=d.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion;if(t.idealEdgeLength!=null)l.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=t.idealEdgeLength;if(t.edgeElasticity!=null)l.DEFAULT_SPRING_STRENGTH=d.DEFAULT_SPRING_STRENGTH=t.edgeElasticity;if(t.nestingFactor!=null)l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor;if(t.gravity!=null)l.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=t.gravity;if(t.numIter!=null)l.MAX_ITERATIONS=d.MAX_ITERATIONS=t.numIter;if(t.gravityRange!=null)l.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange;if(t.gravityCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound;if(t.gravityRangeCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound;if(t.initialEnergyOnIncremental!=null)l.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental;if(t.quality=="draft")o.QUALITY=0;else if(t.quality=="proof")o.QUALITY=2;else o.QUALITY=1;l.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!t.randomize,l.ANIMATE=d.ANIMATE=o.ANIMATE=t.animate,l.TILE=t.tile,l.TILING_PADDING_VERTICAL=typeof t.tilingPaddingVertical==="function"?t.tilingPaddingVertical.call():t.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof t.tilingPaddingHorizontal==="function"?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal};I.prototype.run=function(){var E,t,f=this.options,s=this.idToLNode={},c=this.layout=new L,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var y=c.newGraphManager();this.gm=y;var T=this.options.eles.nodes(),m=this.options.eles.edges();this.root=y.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(T),c);for(var h=0;h<m.length;h++){var P=m[h],x=this.idToLNode[P.data("source")],O=this.idToLNode[P.data("target")];if(x!==O&&x.getEdgesBetween(O).length==0){var et=y.add(c.newEdge(),x,O);et.id=P.id()}}var V=function(R,B){if(typeof R==="number")R=B;var C=R.data("id"),G=i.idToLNode[C];return{x:G.getRect().getCenterX(),y:G.getRect().getCenterY()}},nt=function X(){var R=function(){if(f.fit)f.cy.fit(f.eles,f.padding);if(!E)E=!0,i.cy.one("layoutready",f.ready),i.cy.trigger({type:"layoutready",layout:i})},B=i.options.refresh,C;for(var G=0;G<B&&!C;G++)C=i.stopped||i.layout.tick();if(C){if(c.checkLayoutSuccess()&&!c.isSubLayout)c.doPostLayout();if(c.tilingPostLayout)c.tilingPostLayout();if(c.isLayoutFinished=!0,i.options.eles.nodes().positions(V),R(),i.cy.one("layoutstop",i.options.stop),i.cy.trigger({type:"layoutstop",layout:i}),t)cancelAnimationFrame(t);E=!1;return}var M=i.layout.getPositionsData();f.eles.nodes().positions(function(A,it){if(typeof A==="number")A=it;if(!A.isParent()){var j=A.id(),N=M[j],w=A;while(N==null)if(N=M[w.data("parent")]||M["DummyCompound_"+w.data("parent")],M[j]=N,w=w.parent()[0],w==null)break;if(N!=null)return{x:N.x,y:N.y};else return{x:A.position("x"),y:A.position("y")}}}),R(),t=requestAnimationFrame(X)};if(c.addListener("layoutstarted",function(){if(i.options.animate==="during")t=requestAnimationFrame(nt)}),c.runLayout(),this.options.animate!=="during")i.options.eles.nodes().not(":parent").layoutPositions(i,i.options,V),E=!1;return this},I.prototype.getTopMostNodes=function(E){var t={};for(var f=0;f<E.length;f++)t[E[f].id()]=!0;var s=E.filter(function(c,i){if(typeof c==="number")c=i;var y=c.parent()[0];while(y!=null){if(t[y.id()])return!1;y=y.parent()[0]}return!0});return s},I.prototype.processChildrenList=function(E,t,f){var s=t.length;for(var c=0;c<s;c++){var i=t[c],y=i.children(),T,m=i.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(i.outerWidth()!=null&&i.outerHeight()!=null)T=E.add(new b(f.graphManager,new H(i.position("x")-m.w/2,i.position("y")-m.h/2),new v(parseFloat(m.w),parseFloat(m.h))));else T=E.add(new b(this.graphManager));if(T.id=i.data("id"),T.paddingLeft=parseInt(i.css("padding")),T.paddingTop=parseInt(i.css("padding")),T.paddingRight=parseInt(i.css("padding")),T.paddingBottom=parseInt(i.css("padding")),this.options.nodeDimensionsIncludeLabels){if(i.isParent()){var h=i.boundingBox({includeLabels:!0,includeNodes:!1}).w,P=i.boundingBox({includeLabels:!0,includeNodes:!1}).h,x=i.css("text-halign");T.labelWidth=h,T.labelHeight=P,T.labelPos=x}}if(this.idToLNode[i.data("id")]=T,isNaN(T.rect.x))T.rect.x=0;if(isNaN(T.rect.y))T.rect.y=0;if(y!=null&&y.length>0){var O=f.getGraphManager().add(f.newGraph(),T);this.processChildrenList(O,y,f)}}},I.prototype.stop=function(){return this.stopped=!0,this};var S=function(t){t("layout","cose-bilkent",I)};if(typeof cytoscape<"u")S(cytoscape);g.exports=S}])})});var z=Se(k(),1);ut.use(z.default);function q(u,g){u.forEach((r)=>{let n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach((o)=>{if(!["id","label","height","width","padding","x","y"].includes(o))n[o]=r[o]}),g.add({group:"nodes",data:n,position:{x:r.x??0,y:r.y??0}})})}e(q,"addNodes");function W(u,g){u.forEach((r)=>{let n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach((o)=>{if(!["id","start","end"].includes(o))n[o]=r[o]}),g.add({group:"edges",data:n})})}e(W,"addEdges");function Q(u){return new Promise((g)=>{let r=p("body").append("div").attr("id","cy").attr("style","display:none"),n=ut({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),q(u.nodes,n),W(u.edges,n),n.nodes().forEach(function(d){d.layoutDimensions=()=>{let l=d.data();return{w:l.width,h:l.height}}});let o={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(o).run(),n.ready((d)=>{a.info("Cytoscape ready",d),g(n)})})}e(Q,"createCytoscapeInstance");function Z(u){return u.nodes().map((g)=>{let r=g.data(),n=g.position(),o={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach((d)=>{if(d!=="id")o[d]=r[d]}),o})}e(Z,"extractPositionedNodes");function J(u){return u.edges().map((g)=>{let r=g.data(),n=g._private.rscratch,o={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach((d)=>{if(!["id","source","target"].includes(d))o[d]=r[d]}),o})}e(J,"extractPositionedEdges");async function K(u,g){a.debug("Starting cose-bilkent layout algorithm");try{tt(u);let r=await Q(u),n=Z(r),o=J(r);return a.debug(`Layout completed: ${n.length} nodes, ${o.length} edges`),{nodes:n,edges:o}}catch(r){throw a.error("Error in cose-bilkent layout algorithm:",r),r}}e(K,"executeCoseBilkentLayout");function tt(u){if(!u)throw Error("Layout data is required");if(!u.config)throw Error("Configuration is required in layout data");if(!u.rootNode)throw Error("Root node is required");if(!u.nodes||!Array.isArray(u.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(u.edges))throw Error("Edges array is required in layout data");return!0}e(tt,"validateLayoutData");var at=e(async(u,g,{insertCluster:r,insertEdge:n,insertEdgeLabel:o,insertMarkers:d,insertNode:l,log:L,positionEdgeLabel:b},{algorithm:H})=>{let v={},_={},D=g.select("g");d(D,u.markers,u.type,u.diagramId);let I=D.insert("g").attr("class","subgraphs"),U=D.insert("g").attr("class","edgePaths"),S=D.insert("g").attr("class","edgeLabels"),E=D.insert("g").attr("class","nodes");L.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(u.nodes.map(async(s)=>{if(s.isGroup){let c={...s};_[s.id]=c,v[s.id]=c,await r(I,s)}else{let c={...s};v[s.id]=c;let i=await l(E,s,{config:u.config,dir:u.direction||"TB"}),y=i.node().getBBox();c.width=y.width,c.height=y.height,c.domId=i,L.debug(`Node ${s.id} dimensions: ${y.width}x${y.height}`)}})),L.debug("Running cose-bilkent layout algorithm");let t={...u,nodes:u.nodes.map((s)=>{let c=v[s.id];return{...s,width:c.width,height:c.height}})},f=await K(t,u.config);L.debug("Positioning nodes based on layout results"),f.nodes.forEach((s)=>{let c=v[s.id];if(c?.domId)c.domId.attr("transform",`translate(${s.x}, ${s.y})`),c.x=s.x,c.y=s.y,L.debug(`Positioned node ${c.id} at center (${s.x}, ${s.y})`)}),f.edges.forEach((s)=>{let c=u.edges.find((i)=>i.id===s.id);if(c)c.points=[{x:s.startX,y:s.startY},{x:s.midX,y:s.midY},{x:s.endX,y:s.endY}]}),L.debug("Inserting and positioning edges"),await Promise.all(u.edges.map(async(s)=>{let c=await o(S,s),i=v[s.start??""],y=v[s.end??""];if(i&&y){let T=f.edges.find((m)=>m.id===s.id);if(T){L.debug("APA01 positionedEdge",T);let m={...s},h=n(U,m,_,u.type,i,y,u.diagramId);b(m,h)}else{let m={...s,points:[{x:i.x||0,y:i.y||0},{x:y.x||0,y:y.y||0}]},h=n(U,m,_,u.type,i,y,u.diagramId);b(m,h)}}})),L.debug("Cose-bilkent rendering completed")},"render"),ct=at;export{ct as render};
1
+ import{t,a,p}from"./chunk-veam6vk4.js";import{mt,vr}from"./chunk-8w7fyb3v.js";import{Se,Te}from"./chunk-nvt9tkt4.js";var k=Te(function(F,Y){(function(g,r){if(typeof F==="object"&&typeof Y==="object")Y.exports=r(vr());else if(typeof define==="function"&&define.amd)define(["cose-base"],r);else if(typeof F==="object")F.cytoscapeCoseBilkent=r(vr());else g.cytoscapeCoseBilkent=r(g.coseBase)})(F,function(u){return function(g){var r={};function n(o){if(r[o])return r[o].exports;var d=r[o]={i:o,l:!1,exports:{}};return g[o].call(d.exports,d,d.exports,n),d.l=!0,d.exports}return n.m=g,n.c=r,n.i=function(o){return o},n.d=function(o,d,l){if(!n.o(o,d))Object.defineProperty(o,d,{configurable:!1,enumerable:!0,get:l})},n.n=function(o){var d=o&&o.__esModule?function(){return o.default}:function(){return o};return n.d(d,"a",d),d},n.o=function(o,d){return Object.prototype.hasOwnProperty.call(o,d)},n.p="",n(n.s=1)}([function(g,r){g.exports=u},function(g,r,n){var o=n(0).layoutBase.LayoutConstants,d=n(0).layoutBase.FDLayoutConstants,l=n(0).CoSEConstants,L=n(0).CoSELayout,b=n(0).CoSENode,H=n(0).layoutBase.PointD,v=n(0).layoutBase.DimensionD,_={ready:function(){},stop:function(){},quality:"default",nodeDimensionsIncludeLabels:!1,refresh:30,fit:!0,padding:10,randomize:!0,nodeRepulsion:4500,idealEdgeLength:50,edgeElasticity:0.45,nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,animate:"end",animationDuration:500,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.5};function D(E,e){var f={};for(var s in E)f[s]=E[s];for(var s in e)f[s]=e[s];return f}function I(E){this.options=D(_,E),U(this.options)}var U=function(e){if(e.nodeRepulsion!=null)l.DEFAULT_REPULSION_STRENGTH=d.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion;if(e.idealEdgeLength!=null)l.DEFAULT_EDGE_LENGTH=d.DEFAULT_EDGE_LENGTH=e.idealEdgeLength;if(e.edgeElasticity!=null)l.DEFAULT_SPRING_STRENGTH=d.DEFAULT_SPRING_STRENGTH=e.edgeElasticity;if(e.nestingFactor!=null)l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=d.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor;if(e.gravity!=null)l.DEFAULT_GRAVITY_STRENGTH=d.DEFAULT_GRAVITY_STRENGTH=e.gravity;if(e.numIter!=null)l.MAX_ITERATIONS=d.MAX_ITERATIONS=e.numIter;if(e.gravityRange!=null)l.DEFAULT_GRAVITY_RANGE_FACTOR=d.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange;if(e.gravityCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_STRENGTH=d.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound;if(e.gravityRangeCompound!=null)l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=d.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound;if(e.initialEnergyOnIncremental!=null)l.DEFAULT_COOLING_FACTOR_INCREMENTAL=d.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental;if(e.quality=="draft")o.QUALITY=0;else if(e.quality=="proof")o.QUALITY=2;else o.QUALITY=1;l.NODE_DIMENSIONS_INCLUDE_LABELS=d.NODE_DIMENSIONS_INCLUDE_LABELS=o.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,l.DEFAULT_INCREMENTAL=d.DEFAULT_INCREMENTAL=o.DEFAULT_INCREMENTAL=!e.randomize,l.ANIMATE=d.ANIMATE=o.ANIMATE=e.animate,l.TILE=e.tile,l.TILING_PADDING_VERTICAL=typeof e.tilingPaddingVertical==="function"?e.tilingPaddingVertical.call():e.tilingPaddingVertical,l.TILING_PADDING_HORIZONTAL=typeof e.tilingPaddingHorizontal==="function"?e.tilingPaddingHorizontal.call():e.tilingPaddingHorizontal};I.prototype.run=function(){var E,e,f=this.options,s=this.idToLNode={},c=this.layout=new L,i=this;i.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this});var y=c.newGraphManager();this.gm=y;var T=this.options.eles.nodes(),m=this.options.eles.edges();this.root=y.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(T),c);for(var h=0;h<m.length;h++){var P=m[h],x=this.idToLNode[P.data("source")],O=this.idToLNode[P.data("target")];if(x!==O&&x.getEdgesBetween(O).length==0){var et=y.add(c.newEdge(),x,O);et.id=P.id()}}var V=function(R,B){if(typeof R==="number")R=B;var C=R.data("id"),G=i.idToLNode[C];return{x:G.getRect().getCenterX(),y:G.getRect().getCenterY()}},nt=function X(){var R=function(){if(f.fit)f.cy.fit(f.eles,f.padding);if(!E)E=!0,i.cy.one("layoutready",f.ready),i.cy.trigger({type:"layoutready",layout:i})},B=i.options.refresh,C;for(var G=0;G<B&&!C;G++)C=i.stopped||i.layout.tick();if(C){if(c.checkLayoutSuccess()&&!c.isSubLayout)c.doPostLayout();if(c.tilingPostLayout)c.tilingPostLayout();if(c.isLayoutFinished=!0,i.options.eles.nodes().positions(V),R(),i.cy.one("layoutstop",i.options.stop),i.cy.trigger({type:"layoutstop",layout:i}),e)cancelAnimationFrame(e);E=!1;return}var M=i.layout.getPositionsData();f.eles.nodes().positions(function(A,it){if(typeof A==="number")A=it;if(!A.isParent()){var j=A.id(),N=M[j],w=A;while(N==null)if(N=M[w.data("parent")]||M["DummyCompound_"+w.data("parent")],M[j]=N,w=w.parent()[0],w==null)break;if(N!=null)return{x:N.x,y:N.y};else return{x:A.position("x"),y:A.position("y")}}}),R(),e=requestAnimationFrame(X)};if(c.addListener("layoutstarted",function(){if(i.options.animate==="during")e=requestAnimationFrame(nt)}),c.runLayout(),this.options.animate!=="during")i.options.eles.nodes().not(":parent").layoutPositions(i,i.options,V),E=!1;return this},I.prototype.getTopMostNodes=function(E){var e={};for(var f=0;f<E.length;f++)e[E[f].id()]=!0;var s=E.filter(function(c,i){if(typeof c==="number")c=i;var y=c.parent()[0];while(y!=null){if(e[y.id()])return!1;y=y.parent()[0]}return!0});return s},I.prototype.processChildrenList=function(E,e,f){var s=e.length;for(var c=0;c<s;c++){var i=e[c],y=i.children(),T,m=i.layoutDimensions({nodeDimensionsIncludeLabels:this.options.nodeDimensionsIncludeLabels});if(i.outerWidth()!=null&&i.outerHeight()!=null)T=E.add(new b(f.graphManager,new H(i.position("x")-m.w/2,i.position("y")-m.h/2),new v(parseFloat(m.w),parseFloat(m.h))));else T=E.add(new b(this.graphManager));if(T.id=i.data("id"),T.paddingLeft=parseInt(i.css("padding")),T.paddingTop=parseInt(i.css("padding")),T.paddingRight=parseInt(i.css("padding")),T.paddingBottom=parseInt(i.css("padding")),this.options.nodeDimensionsIncludeLabels){if(i.isParent()){var h=i.boundingBox({includeLabels:!0,includeNodes:!1}).w,P=i.boundingBox({includeLabels:!0,includeNodes:!1}).h,x=i.css("text-halign");T.labelWidth=h,T.labelHeight=P,T.labelPos=x}}if(this.idToLNode[i.data("id")]=T,isNaN(T.rect.x))T.rect.x=0;if(isNaN(T.rect.y))T.rect.y=0;if(y!=null&&y.length>0){var O=f.getGraphManager().add(f.newGraph(),T);this.processChildrenList(O,y,f)}}},I.prototype.stop=function(){return this.stopped=!0,this};var S=function(e){e("layout","cose-bilkent",I)};if(typeof cytoscape<"u")S(cytoscape);g.exports=S}])})});var z=Se(k(),1);mt.use(z.default);function q(u,g){u.forEach((r)=>{let n={id:r.id,labelText:r.label,height:r.height,width:r.width,padding:r.padding??0};Object.keys(r).forEach((o)=>{if(!["id","label","height","width","padding","x","y"].includes(o))n[o]=r[o]}),g.add({group:"nodes",data:n,position:{x:r.x??0,y:r.y??0}})})}t(q,"addNodes");function W(u,g){u.forEach((r)=>{let n={id:r.id,source:r.start,target:r.end};Object.keys(r).forEach((o)=>{if(!["id","start","end"].includes(o))n[o]=r[o]}),g.add({group:"edges",data:n})})}t(W,"addEdges");function Q(u){return new Promise((g)=>{let r=p("body").append("div").attr("id","cy").attr("style","display:none"),n=mt({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});r.remove(),q(u.nodes,n),W(u.edges,n),n.nodes().forEach(function(d){d.layoutDimensions=()=>{let l=d.data();return{w:l.width,h:l.height}}});let o={name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1};n.layout(o).run(),n.ready((d)=>{a.info("Cytoscape ready",d),g(n)})})}t(Q,"createCytoscapeInstance");function Z(u){return u.nodes().map((g)=>{let r=g.data(),n=g.position(),o={id:r.id,x:n.x,y:n.y};return Object.keys(r).forEach((d)=>{if(d!=="id")o[d]=r[d]}),o})}t(Z,"extractPositionedNodes");function J(u){return u.edges().map((g)=>{let r=g.data(),n=g._private.rscratch,o={id:r.id,source:r.source,target:r.target,startX:n.startX,startY:n.startY,midX:n.midX,midY:n.midY,endX:n.endX,endY:n.endY};return Object.keys(r).forEach((d)=>{if(!["id","source","target"].includes(d))o[d]=r[d]}),o})}t(J,"extractPositionedEdges");async function K(u,g){a.debug("Starting cose-bilkent layout algorithm");try{tt(u);let r=await Q(u),n=Z(r),o=J(r);return a.debug(`Layout completed: ${n.length} nodes, ${o.length} edges`),{nodes:n,edges:o}}catch(r){throw a.error("Error in cose-bilkent layout algorithm:",r),r}}t(K,"executeCoseBilkentLayout");function tt(u){if(!u)throw Error("Layout data is required");if(!u.config)throw Error("Configuration is required in layout data");if(!u.rootNode)throw Error("Root node is required");if(!u.nodes||!Array.isArray(u.nodes))throw Error("No nodes found in layout data");if(!Array.isArray(u.edges))throw Error("Edges array is required in layout data");return!0}t(tt,"validateLayoutData");var at=t(async(u,g,{insertCluster:r,insertEdge:n,insertEdgeLabel:o,insertMarkers:d,insertNode:l,log:L,positionEdgeLabel:b},{algorithm:H})=>{let v={},_={},D=g.select("g");d(D,u.markers,u.type,u.diagramId);let I=D.insert("g").attr("class","subgraphs"),U=D.insert("g").attr("class","edgePaths"),S=D.insert("g").attr("class","edgeLabels"),E=D.insert("g").attr("class","nodes");L.debug("Inserting nodes into DOM for dimension calculation"),await Promise.all(u.nodes.map(async(s)=>{if(s.isGroup){let c={...s};_[s.id]=c,v[s.id]=c,await r(I,s)}else{let c={...s};v[s.id]=c;let i=await l(E,s,{config:u.config,dir:u.direction||"TB"}),y=i.node().getBBox();c.width=y.width,c.height=y.height,c.domId=i,L.debug(`Node ${s.id} dimensions: ${y.width}x${y.height}`)}})),L.debug("Running cose-bilkent layout algorithm");let e={...u,nodes:u.nodes.map((s)=>{let c=v[s.id];return{...s,width:c.width,height:c.height}})},f=await K(e,u.config);L.debug("Positioning nodes based on layout results"),f.nodes.forEach((s)=>{let c=v[s.id];if(c?.domId)c.domId.attr("transform",`translate(${s.x}, ${s.y})`),c.x=s.x,c.y=s.y,L.debug(`Positioned node ${c.id} at center (${s.x}, ${s.y})`)}),f.edges.forEach((s)=>{let c=u.edges.find((i)=>i.id===s.id);if(c)c.points=[{x:s.startX,y:s.startY},{x:s.midX,y:s.midY},{x:s.endX,y:s.endY}]}),L.debug("Inserting and positioning edges"),await Promise.all(u.edges.map(async(s)=>{let c=await o(S,s),i=v[s.start??""],y=v[s.end??""];if(i&&y){let T=f.edges.find((m)=>m.id===s.id);if(T){L.debug("APA01 positionedEdge",T);let m={...s},h=n(U,m,_,u.type,i,y,u.diagramId);b(m,h)}else{let m={...s,points:[{x:i.x||0,y:i.y||0},{x:y.x||0,y:y.y||0}]},h=n(U,m,_,u.type,i,y,u.diagramId);b(m,h)}}})),L.debug("Cose-bilkent rendering completed")},"render"),ct=at;export{ct as render};
@@ -0,0 +1,78 @@
1
+ import{G}from"./chunk-dwjmr0zj.js";import{t,a,ke,x,F,C,S,E,T,A,L,R,l,V,U}from"./chunk-veam6vk4.js";import{J}from"./chunk-60axh4sa.js";var ot=t((r,i)=>{let n=r<=1?r*100:r;if(n<0||n>100)throw Error(`${i} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${r}`);return n},"toPercent"),q=t((r,i,n)=>({x:ot(i,`${n} evolution`),y:ot(r,`${n} visibility`)}),"toCoordinates"),pt=t((r)=>{if(!r)return;if(r==="+<>")return"bidirectional";if(r==="+<")return"backward";if(r==="+>")return"forward";return},"getFlowFromPort"),Bt=t((r)=>{if(!r?.startsWith("+"))return{};let n=/^\+'([^']*)'/.exec(r)?.[1];if(r.includes("<>"))return{flow:"bidirectional",label:n};if(r.includes("<"))return{flow:"backward",label:n};if(r.includes(">"))return{flow:"forward",label:n};return{label:n}},"extractFlowFromArrow"),Ft=t((r,i)=>{if(G(r,i),r.size)i.setSize(r.size.width,r.size.height);if(r.evolution){let n=r.evolution.stages.map((o)=>{if(o.secondName)return`${o.name.trim()} / ${o.secondName.trim()}`;return o.name.trim()}),u=r.evolution.stages.filter((o)=>o.boundary!==void 0).map((o)=>o.boundary);i.updateAxes({stages:n,stageBoundaries:u})}if(r.anchors.forEach((n)=>{let u=q(n.visibility,n.evolution,`Anchor "${n.name}"`);i.addNode(n.name,n.name,u.x,u.y,"anchor")}),r.components.forEach((n)=>{let u=q(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,b=n.decorator?.strategy;i.addNode(n.name,n.name,u.x,u.y,"component",o,p,n.inertia,b)}),r.notes.forEach((n)=>{let u=q(n.visibility,n.evolution,`Note "${n.text}"`);i.addNote(n.text,u.x,u.y)}),r.pipelines.forEach((n)=>{let u=i.getNode(n.parent);if(!u||typeof u.y!=="number")throw Error(`Pipeline "${n.parent}" must reference an existing component with coordinates.`);let o=u.y;i.startPipeline(n.parent),n.components.forEach((p)=>{let b=`${n.parent}_${p.name}`,X=p.label?(p.label.negX?-1:1)*p.label.offsetX:void 0,m=p.label?(p.label.negY?-1:1)*p.label.offsetY:void 0,tt=ot(p.evolution,`Pipeline component "${p.name}" evolution`);i.addNode(b,p.name,tt,o,"pipeline-component",X,m),i.addPipelineComponent(n.parent,b)})}),r.links.forEach((n)=>{let u=!!n.arrow&&(n.arrow.includes("-.->")||n.arrow.includes(".-.")),o=pt(n.fromPort)??pt(n.toPort),{flow:p,label:b}=Bt(n.arrow);if(!o&&p)o=p;let X=n.linkLabel,m=b??X;i.addLink(i.resolveNodeId(n.from),i.resolveNodeId(n.to),u,m,o)}),r.evolves.forEach((n)=>{let u=i.getNode(n.component);if(u?.y!==void 0){let o=ot(n.target,`Evolve target for "${n.component}"`);i.addTrend(n.component,o,u.y)}}),r.annotations.length>0){let n=r.annotations[0],u=q(n.x,n.y,"Annotations box");i.setAnnotationsBox(u.x,u.y)}r.annotation.forEach((n)=>{let u=q(n.x,n.y,`Annotation ${n.number}`);i.addAnnotation(n.number,[{x:u.x,y:u.y}],n.text)}),r.accelerators.forEach((n)=>{let u=q(n.x,n.y,`Accelerator "${n.name}"`);i.addAccelerator(n.name,u.x,u.y)}),r.deaccelerators.forEach((n)=>{let u=q(n.x,n.y,`Deaccelerator "${n.name}"`);i.addDeaccelerator(n.name,u.x,u.y)})},"populateDb"),ht={parser:{yy:void 0},parse:t(async(r)=>{let i=await J("wardley",r);a.debug(i);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(i,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{t(this,"WardleyBuilder")}addNode(r){let i=this.nodes.get(r.id)??{id:r.id,label:r.label},n={...i,...r,className:r.className??i.className,labelOffsetX:r.labelOffsetX??i.labelOffsetX,labelOffsetY:r.labelOffsetY??i.labelOffsetY};this.nodes.set(r.id,n)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});let i=this.nodes.get(r);if(i)i.isPipelineParent=!0}addPipelineComponent(r,i){let n=this.pipelines.get(r);if(n)n.componentIds.push(i);let u=this.nodes.get(i);if(u)u.inPipeline=!0}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,i){this.annotationsBox={x:r,y:i}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,i){this.size={width:r,height:i}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(let[i,n]of this.nodes)if(n.label===r)return i;return r}build(){let r=[];for(let i of this.nodes.values()){if(typeof i.x!=="number"||typeof i.y!=="number")throw Error(`Node "${i.label}" is missing coordinates`);r.push(i)}return{nodes:r,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 l()["wardley-beta"]}t(ft,"getConfig");function xt(r,i,n,u,o,p,b,X,m){P.addNode({id:r,label:i,x:n,y:u,className:o,labelOffsetX:p,labelOffsetY:b,inertia:X,sourceStrategy:m})}t(xt,"addNode");function gt(r,i,n=!1,u,o){P.addLink({source:r,target:i,dashed:n,label:u,flow:o})}t(gt,"addLink");function yt(r,i,n){P.addTrend({nodeId:r,targetX:i,targetY:n})}t(yt,"addTrend");function ut(r,i,n){P.addAnnotation({number:r,coordinates:i,text:n})}t(ut,"addAnnotation");function wt(r,i,n){P.addNote({text:r,x:i,y:n})}t(wt,"addNote");function mt(r,i,n){P.addAccelerator({name:r,x:i,y:n})}t(mt,"addAccelerator");function kt(r,i,n){P.addDeaccelerator({name:r,x:i,y:n})}t(kt,"addDeaccelerator");function bt(r,i){P.setAnnotationsBox(r,i)}t(bt,"setAnnotationsBox");function $t(r,i){P.setSize(r,i)}t($t,"setSize");function vt(r){P.startPipeline(r)}t(vt,"startPipeline");function Pt(r,i){P.addPipelineComponent(r,i)}t(Pt,"addPipelineComponent");function Ct(r){P.setAxes(r)}t(Ct,"updateAxes");function St(r){return P.getNode(r)}t(St,"getNode");function Mt(r){return P.resolveNodeId(r)}t(Mt,"resolveNodeId");function Nt(){return P.build()}t(Nt,"getWardleyData");function zt(){P.clear(),C()}t(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:L,getDiagramTitle:R,getAccDescription:A,setAccDescription:T},Dt=["Genesis","Custom Built","Product","Commodity"],Gt=t(()=>{let{themeVariables:r}=l();return{backgroundColor:r.wardley?.backgroundColor??r.background??"#fff",axisColor:r.wardley?.axisColor??"#000",axisTextColor:r.wardley?.axisTextColor??r.primaryTextColor??"#222",gridColor:r.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:r.wardley?.componentFill??"#fff",componentStroke:r.wardley?.componentStroke??"#000",componentLabelColor:r.wardley?.componentLabelColor??r.primaryTextColor??"#222",linkStroke:r.wardley?.linkStroke??"#000",evolutionStroke:r.wardley?.evolutionStroke??"#dc3545",annotationStroke:r.wardley?.annotationStroke??"#000",annotationTextColor:r.wardley?.annotationTextColor??r.primaryTextColor??"#222",annotationFill:r.wardley?.annotationFill??r.background??"#fff"}},"getTheme"),qt=t(()=>{let r=l()["wardley-beta"];return{width:r?.width??900,height:r?.height??600,padding:r?.padding??48,nodeRadius:r?.nodeRadius??6,nodeLabelOffset:r?.nodeLabelOffset??8,axisFontSize:r?.axisFontSize??12,labelFontSize:r?.labelFontSize??10,showGrid:r?.showGrid??!1,useMaxWidth:r?.useMaxWidth??!0}},"getConfigValues"),jt=t((r,i,n,u)=>{a.debug(`Rendering Wardley map
2
+ `+r);let o=qt(),p=Gt(),b=o.nodeRadius*1.6,X=u.db,m=X.getWardleyData(),tt=X.getDiagramTitle(),H=m.size?.width??o.width,M=m.size?.height??o.height,_=V(i);_.selectAll("*").remove(),F(_,M,H,o.useMaxWidth),_.attr("viewBox",`0 0 ${H} ${M}`);let z=_.append("g").attr("class","wardley-map"),nt=_.append("defs");nt.append("marker").attr("id",`arrow-${i}`).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-${i}`).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-${i}`).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",H).attr("height",M).attr("fill",p.backgroundColor);let Z=H-o.padding*2,K=M-o.padding*2;if(tt)z.append("text").attr("class","wardley-title").attr("x",H/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 B=t((e)=>o.padding+e/100*Z,"projectX"),O=t((e)=>M-o.padding-e/100*K,"projectY"),et=z.append("g").attr("class","wardley-axes");et.append("line").attr("x1",o.padding).attr("x2",H-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=m.axes.xLabel??"Evolution",Tt=m.axes.yLabel??"Visibility";et.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+Z/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=m.axes.stages&&m.axes.stages.length>0?m.axes.stages:Dt;if(Q.length>0){let e=z.append("g").attr("class","wardley-stages"),d=m.axes.stageBoundaries,s=[];if(d&&d.length===Q.length){let c=0;d.forEach((f)=>{s.push({start:c,end:f}),c=f})}else{let c=1/Q.length;Q.forEach((f,g)=>{s.push({start:g*c,end:(g+1)*c})})}Q.forEach((c,f)=>{let g=s[f],w=o.padding+g.start*Z,y=o.padding+g.end*Z,k=(w+y)/2;if(f>0)e.append("line").attr("x1",w).attr("x2",w).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);e.append("text").attr("class","wardley-stage-label").attr("x",k).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 e=z.append("g").attr("class","wardley-grid");for(let d=1;d<4;d++){let s=d/4,c=o.padding+Z*s;e.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"),e.append("line").attr("x1",o.padding).attr("x2",H-o.padding).attr("y1",M-o.padding-K*s).attr("y2",M-o.padding-K*s).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6")}}let h=new Map;if(m.nodes.forEach((e)=>{h.set(e.id,{x:B(e.x),y:O(e.y),node:e})}),m.pipelines.length>0){let e=z.append("g").attr("class","wardley-pipelines"),d=z.append("g").attr("class","wardley-pipeline-links");m.pipelines.forEach((s)=>{if(s.componentIds.length===0)return;let c=s.componentIds.map((y)=>({id:y,pos:h.get(y),node:m.nodes.find((k)=>k.id===y)})).filter((y)=>y.pos&&y.node).sort((y,k)=>y.node.x-k.node.x);for(let y=0;y<c.length-1;y++){let k=c[y],v=c[y+1];d.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",k.pos.x).attr("y1",k.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,g=-1/0,w=0;if(s.componentIds.forEach((y)=>{let k=h.get(y);if(k)f=Math.min(f,k.x),g=Math.max(g,k.x),w=k.y}),f!==1/0&&g!==-1/0){let k=o.nodeRadius*4,v=w-k/2,W=h.get(s.nodeId);if(W){let I=(f+g)/2;W.x=I,W.y=v-b/6}e.append("rect").attr("class","wardley-pipeline-box").attr("x",f-15).attr("y",v).attr("width",g-f+30).attr("height",k).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;m.pipelines.forEach((e)=>{lt.set(e.nodeId,new Set(e.componentIds))});let ct=m.links.filter((e)=>{if(!h.has(e.source)||!h.has(e.target))return!1;if(lt.get(e.target)?.has(e.source))return!1;return!0});dt.selectAll("line").data(ct).enter().append("line").attr("class",(e)=>`wardley-link${e.dashed?" wardley-link--dashed":""}`).attr("x1",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.source).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=s.x-d.x,w=s.y-d.y,y=Math.sqrt(g*g+w*w);return d.x+g/y*f}).attr("y1",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.source).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=s.x-d.x,w=s.y-d.y,y=Math.sqrt(g*g+w*w);return d.y+w/y*f}).attr("x2",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.target).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=d.x-s.x,w=d.y-s.y,y=Math.sqrt(g*g+w*w);return s.x+g/y*f}).attr("y2",(e)=>{let d=h.get(e.source),s=h.get(e.target),f=m.nodes.find((k)=>k.id===e.target).isPipelineParent?b/Math.sqrt(2):o.nodeRadius,g=d.x-s.x,w=d.y-s.y,y=Math.sqrt(g*g+w*w);return s.y+w/y*f}).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(e)=>e.dashed?"6 6":null).attr("marker-end",(e)=>{if(e.flow==="forward"||e.flow==="bidirectional")return`url(#link-arrow-end-${i})`;return null}).attr("marker-start",(e)=>{if(e.flow==="backward"||e.flow==="bidirectional")return`url(#link-arrow-start-${i})`;return null}),dt.selectAll("text").data(ct.filter((e)=>e.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(e)=>{let d=h.get(e.source),s=h.get(e.target),c=(d.x+s.x)/2,f=s.y-d.y,g=s.x-d.x,w=Math.sqrt(g*g+f*f),y=8,k=f/w;return c+k*8}).attr("y",(e)=>{let d=h.get(e.source),s=h.get(e.target),c=(d.y+s.y)/2,f=s.x-d.x,g=s.y-d.y,w=Math.sqrt(f*f+g*g),y=8,k=-f/w;return c+k*8}).attr("fill",p.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(e)=>{let d=h.get(e.source),s=h.get(e.target),c=(d.x+s.x)/2,f=(d.y+s.y)/2,g=s.x-d.x,w=s.y-d.y,y=Math.sqrt(g*g+w*w),k=8,v=w/y,W=-g/y,I=c+v*8,at=f+W*8,j=Math.atan2(w,g)*180/Math.PI;if(j>90||j<-90)j+=180;return`rotate(${j} ${I} ${at})`}).text((e)=>e.label);let Wt=z.append("g").attr("class","wardley-trends"),At=m.trends.map((e)=>{let d=h.get(e.nodeId);if(!d)return null;let s=B(e.targetX),c=O(e.targetY),f=s-d.x,g=c-d.y,w=Math.sqrt(f*f+g*g),y=o.nodeRadius+2,k=w>y?s-f/w*y:s,v=w>y?c-g/w*y:c;return{origin:d,targetX:s,targetY:c,adjustedX2:k,adjustedY2:v}}).filter((e)=>e!==null);Wt.selectAll("line").data(At).enter().append("line").attr("class","wardley-trend").attr("x1",(e)=>e.origin.x).attr("y1",(e)=>e.origin.y).attr("x2",(e)=>e.adjustedX2).attr("y2",(e)=>e.adjustedY2).attr("stroke",p.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${i})`);let Y=z.append("g").attr("class","wardley-nodes").selectAll("g").data(m.nodes).enter().append("g").attr("class",(e)=>["wardley-node",e.className?`wardley-node--${e.className}`:""].filter(Boolean).join(" "));Y.filter((e)=>e.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>e.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>e.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let D=Y.filter((e)=>e.sourceStrategy==="market");D.append("circle").attr("class","wardley-market-overlay").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>!e.isPipelineParent&&e.sourceStrategy!=="market"&&e.className!=="anchor").append("circle").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.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(D.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x).attr("y1",(e)=>h.get(e.id).y-N).attr("x2",(e)=>h.get(e.id).x-N*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),D.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x-N*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x+N*Math.cos(Math.PI/6)).attr("y2",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),D.append("line").attr("class","wardley-market-line").attr("x1",(e)=>h.get(e.id).x+N*Math.cos(Math.PI/6)).attr("y1",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("x2",(e)=>h.get(e.id).x).attr("y2",(e)=>h.get(e.id).y-N).attr("stroke",p.componentStroke).attr("stroke-width",1),D.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x).attr("cy",(e)=>h.get(e.id).y-N).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),D.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x-N*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),D.append("circle").attr("class","wardley-market-dot").attr("cx",(e)=>h.get(e.id).x+N*Math.cos(Math.PI/6)).attr("cy",(e)=>h.get(e.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),Y.filter((e)=>e.isPipelineParent===!0).append("rect").attr("x",(e)=>h.get(e.id).x-b/2).attr("y",(e)=>h.get(e.id).y-b/2).attr("width",b).attr("height",b).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),Y.filter((e)=>e.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b/2+15:o.nodeRadius+15;if(e.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y1",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b:o.nodeRadius*2;return d.y-s/2}).attr("x2",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b/2+15:o.nodeRadius+15;if(e.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y2",(e)=>{let d=h.get(e.id),s=e.isPipelineParent?b:o.nodeRadius*2;return d.y+s/2}).attr("stroke",p.componentStroke).attr("stroke-width",6),Y.append("text").attr("x",(e)=>{let d=h.get(e.id);if(e.className==="anchor")return e.labelOffsetX!==void 0?d.x+e.labelOffsetX:d.x;let s=o.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetX===void 0)s+=10;let c=e.labelOffsetX??s;return d.x+c}).attr("y",(e)=>{let d=h.get(e.id);if(e.className==="anchor")return e.labelOffsetY!==void 0?d.y+e.labelOffsetY:d.y-3;let s=-o.nodeLabelOffset;if(e.sourceStrategy&&e.labelOffsetY===void 0)s-=10;let c=e.labelOffsetY??s;return d.y+c}).attr("class","wardley-node-label").attr("fill",(e)=>{if(e.className==="evolved")return p.evolutionStroke;if(e.className==="anchor")return"#000";return p.componentLabelColor}).attr("font-size",o.labelFontSize).attr("font-weight",(e)=>e.className==="anchor"?"bold":"normal").attr("text-anchor",(e)=>e.className==="anchor"?"middle":"start").attr("dominant-baseline",(e)=>e.className==="anchor"?"middle":"auto").text((e)=>e.label),m.annotations.length>0){let e=z.append("g").attr("class","wardley-annotations");if(m.annotations.forEach((d)=>{let s=d.coordinates.map((c)=>({x:B(c.x),y:O(c.y)}));if(s.length>1)for(let c=0;c<s.length-1;c++)e.append("line").attr("class","wardley-annotation-line").attr("x1",s[c].x).attr("y1",s[c].y).attr("x2",s[c+1].x).attr("y2",s[c+1].y).attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach((c)=>{let f=e.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(d.number)})}),m.annotationsBox){let d=B(m.annotationsBox.x),s=O(m.annotationsBox.y),c=10,f=16,g=11,w=e.append("g").attr("class","wardley-annotations-box"),y=[...m.annotations].filter((v)=>v.text).sort((v,W)=>v.number-W.number),k=[];if(y.forEach((v,W)=>{let I=w.append("text").attr("x",d+c).attr("y",s+c+(W+1)*f).attr("font-size",g).attr("fill",p.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${v.number}. ${v.text}`);k.push(I)}),k.length>0){let v=0,W=0;k.forEach((it)=>{let rt=it.node(),Yt=rt.getComputedTextLength();v=Math.max(v,Yt);let It=rt.getBBox();W=Math.max(W,It.height)});let I=v+c*2+105,at=y.length*f+c*2+W/2,j=o.padding,Xt=H-o.padding-I,Et=o.padding,Ht=M-o.padding-at;d=Math.max(j,Math.min(d,Xt)),s=Math.max(Et,Math.min(s,Ht)),k.forEach((it,rt)=>{it.attr("x",d+c).attr("y",s+c+(rt+1)*f)}),w.insert("rect","text").attr("x",d).attr("y",s).attr("width",I).attr("height",at).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(m.notes.length>0){let e=z.append("g").attr("class","wardley-notes");m.notes.forEach((d)=>{let s=B(d.x),c=O(d.y);e.append("text").attr("x",s).attr("y",c).attr("text-anchor","start").attr("font-size",11).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.text)})}if(m.accelerators.length>0){let e=z.append("g").attr("class","wardley-accelerators");m.accelerators.forEach((d)=>{let s=B(d.x),c=O(d.y),f=60,g=30,w=20,y=`
3
+ M ${s} ${c-15}
4
+ L ${s+60-20} ${c-15}
5
+ L ${s+60-20} ${c-15-8}
6
+ L ${s+60} ${c}
7
+ L ${s+60-20} ${c+15+8}
8
+ L ${s+60-20} ${c+15}
9
+ L ${s} ${c+15}
10
+ Z
11
+ `;e.append("path").attr("d",y).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),e.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}if(m.deaccelerators.length>0){let e=z.append("g").attr("class","wardley-deaccelerators");m.deaccelerators.forEach((d)=>{let s=B(d.x),c=O(d.y),f=60,g=30,w=20,y=`
12
+ M ${s+60} ${c-15}
13
+ L ${s+20} ${c-15}
14
+ L ${s+20} ${c-15-8}
15
+ L ${s} ${c}
16
+ L ${s+20} ${c+15+8}
17
+ L ${s+20} ${c+15}
18
+ L ${s+60} ${c+15}
19
+ Z
20
+ `;e.append("path").attr("d",y).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),e.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}},"draw"),Vt={draw:jt},_t=t(({wardley:r}={})=>{let i=ke(),n=x(),u=U(i,n.themeVariables),o=U(u.wardley,r);return`
21
+ .wardley-background {
22
+ fill: ${o.backgroundColor};
23
+ }
24
+ .wardley-axes line, .wardley-axes path {
25
+ stroke: ${o.axisColor};
26
+ }
27
+ .wardley-axis-label {
28
+ fill: ${o.axisTextColor};
29
+ }
30
+ .wardley-stage-label {
31
+ fill: ${o.axisTextColor};
32
+ }
33
+ .wardley-grid line {
34
+ stroke: ${o.gridColor};
35
+ }
36
+ .wardley-node circle {
37
+ fill: ${o.componentFill};
38
+ stroke: ${o.componentStroke};
39
+ }
40
+ .wardley-node-label {
41
+ fill: ${o.componentLabelColor};
42
+ }
43
+ .wardley-link {
44
+ stroke: ${o.linkStroke};
45
+ }
46
+ .wardley-link--dashed {
47
+ stroke-dasharray: 4 4;
48
+ }
49
+ .wardley-link-label {
50
+ fill: ${o.axisTextColor};
51
+ }
52
+ .wardley-trend line {
53
+ stroke: ${o.evolutionStroke};
54
+ }
55
+ .wardley-annotation-line {
56
+ stroke: ${o.annotationStroke};
57
+ }
58
+ .wardley-annotation circle {
59
+ fill: ${o.annotationFill};
60
+ stroke: ${o.annotationStroke};
61
+ }
62
+ .wardley-annotation text {
63
+ fill: ${o.annotationTextColor};
64
+ }
65
+ .wardley-annotations-box rect {
66
+ fill: ${o.annotationFill};
67
+ stroke: ${o.annotationStroke};
68
+ }
69
+ .wardley-annotations-box text {
70
+ fill: ${o.annotationTextColor};
71
+ }
72
+ .wardley-pipeline-box {
73
+ stroke: ${o.componentStroke};
74
+ }
75
+ .wardley-notes text {
76
+ fill: ${o.axisTextColor};
77
+ }
78
+ `},"styles"),re={parser:ht,db:Ot,renderer:Vt,styles:_t};export{re as diagram};
@@ -0,0 +1,2 @@
1
+ import{e,n,y,be}from"./chunk-nvt9tkt4.js";function Or(a){if(!a.length)return[];return[{label:"项目",options:a.map((l)=>({value:l.id,label:l.name,description:l.directory}))}]}function $r(a){let{Input:l}=y();return n("div",{className:"relative mb-3 min-w-0",children:[e(be,{"aria-hidden":!0,className:"pointer-events-none absolute top-3 left-3 size-4 text-faint"}),e(l,{type:"search","aria-label":a.label,placeholder:a.placeholder,value:a.value,onChange:(i)=>a.onChange(i.target.value),className:"h-10 min-w-0 pl-9"})]})}function Br(){return e("div",{role:"status","aria-label":"正在加载",className:"divide-y divide-line",children:[0,1,2].map((a)=>n("div",{className:"h-16 space-y-2 px-4 py-3",children:[e("div",{className:"h-3 w-24 animate-pulse rounded bg-raised"}),e("div",{className:"h-3 w-2/3 animate-pulse rounded bg-raised"})]},a))})}
2
+ export{Or,$r,Br};