@calmabacus/pi-web 1.1.0 → 1.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 (301) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +9 -9
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/next-server.js.nft.json +1 -1
  5. package/.next/prerender-manifest.json +3 -3
  6. package/.next/react-loadable-manifest.json +215 -224
  7. package/.next/required-server-files.js +3 -2
  8. package/.next/required-server-files.json +3 -2
  9. package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  10. package/.next/server/app/_global-error.html +1 -1
  11. package/.next/server/app/_global-error.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  14. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  15. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/_not-found.html +1 -1
  17. package/.next/server/app/_not-found.rsc +3 -3
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
  19. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  20. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/.next/server/app/api/app-update/route.js +1 -1
  22. package/.next/server/app/api/sessions/[id]/auto-name/route.js.nft.json +1 -1
  23. package/.next/server/app/api/sessions/[id]/route.js +1 -1
  24. package/.next/server/app/index.html +1 -1
  25. package/.next/server/app/index.rsc +5 -5
  26. package/.next/server/app/index.segments/__PAGE__.segment.rsc +5 -5
  27. package/.next/server/app/index.segments/_full.segment.rsc +5 -5
  28. package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  29. package/.next/server/app/login/page_client-reference-manifest.js +1 -1
  30. package/.next/server/app/login.html +1 -1
  31. package/.next/server/app/login.rsc +3 -3
  32. package/.next/server/app/login.segments/_full.segment.rsc +3 -3
  33. package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
  34. package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
  35. package/.next/server/app/page.js +21 -21
  36. package/.next/server/app/page.js.nft.json +1 -1
  37. package/.next/server/app/page_client-reference-manifest.js +1 -1
  38. package/.next/server/app-paths-manifest.json +9 -9
  39. package/.next/server/chunks/102.js +90 -0
  40. package/.next/server/chunks/11.js +1 -0
  41. package/.next/server/chunks/1286.js +1 -0
  42. package/.next/server/chunks/{4563.js → 1412.js} +1 -1
  43. package/.next/server/chunks/1605.js +1 -0
  44. package/.next/server/chunks/169.js +1 -0
  45. package/.next/server/chunks/{3186.js → 18.js} +1 -1
  46. package/.next/server/chunks/2022.js +1 -0
  47. package/.next/server/chunks/{4267.js → 2156.js} +1 -1
  48. package/.next/server/chunks/2157.js +1 -0
  49. package/.next/server/chunks/2325.js +3 -3
  50. package/.next/server/chunks/2838.js +1 -0
  51. package/.next/server/chunks/2897.js +79 -0
  52. package/.next/server/chunks/3227.js +1 -0
  53. package/.next/server/chunks/3266.js +1 -0
  54. package/.next/server/chunks/3379.js +1 -1
  55. package/.next/server/chunks/3428.js +32 -0
  56. package/.next/server/chunks/3479.js +1 -0
  57. package/.next/server/chunks/367.js +115 -0
  58. package/.next/server/chunks/3698.js +93 -0
  59. package/.next/server/chunks/{8713.js → 3709.js} +4 -4
  60. package/.next/server/chunks/4107.js +62 -0
  61. package/.next/server/chunks/426.js +10 -10
  62. package/.next/server/chunks/{7799.js → 4569.js} +1 -1
  63. package/.next/server/chunks/{8782.js → 4755.js} +2 -2
  64. package/.next/server/chunks/5002.js +1 -0
  65. package/.next/server/chunks/5112.js +1 -0
  66. package/.next/server/chunks/5289.js +8 -0
  67. package/.next/server/chunks/5452.js +23 -0
  68. package/.next/server/chunks/5453.js +1 -0
  69. package/.next/server/chunks/5582.js +2 -2
  70. package/.next/server/chunks/5749.js +27 -0
  71. package/.next/server/chunks/5782.js +36 -0
  72. package/.next/server/chunks/{6253.js → 6163.js} +1 -1
  73. package/.next/server/chunks/6169.js +64 -0
  74. package/.next/server/chunks/{1094.js → 6208.js} +17 -5
  75. package/.next/server/chunks/6399.js +24 -0
  76. package/.next/server/chunks/6429.js +3 -3
  77. package/.next/server/chunks/6496.js +1 -0
  78. package/.next/server/chunks/6823.js +215 -0
  79. package/.next/server/chunks/{4548.js → 6888.js} +1 -1
  80. package/.next/server/chunks/7245.js +77 -0
  81. package/.next/server/chunks/7307.js +1 -1
  82. package/.next/server/chunks/7372.js +287 -0
  83. package/.next/server/chunks/7384.js +226 -0
  84. package/.next/server/chunks/7516.js +1 -0
  85. package/.next/server/chunks/7531.js +24 -0
  86. package/.next/server/chunks/7591.js +1 -0
  87. package/.next/server/chunks/7755.js +138 -0
  88. package/.next/server/chunks/7916.js +1 -0
  89. package/.next/server/chunks/8078.js +94 -0
  90. package/.next/server/chunks/8253.js +41 -0
  91. package/.next/server/chunks/8635.js +1 -0
  92. package/.next/server/chunks/8688.js +1 -0
  93. package/.next/server/chunks/8872.js +1 -0
  94. package/.next/server/chunks/9006.js +1 -0
  95. package/.next/server/chunks/9018.js +1 -0
  96. package/.next/server/chunks/9047.js +1 -0
  97. package/.next/server/chunks/9108.js +1 -0
  98. package/.next/server/chunks/9280.js +91 -90
  99. package/.next/server/chunks/9419.js +1 -0
  100. package/.next/server/chunks/9430.js +1 -0
  101. package/.next/server/chunks/9586.js +1 -0
  102. package/.next/server/chunks/9775.js +1 -0
  103. package/.next/server/chunks/992.js +1 -0
  104. package/.next/server/chunks/9926.js +1 -0
  105. package/.next/server/middleware-build-manifest.js +1 -1
  106. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  107. package/.next/server/next-font-manifest.js +1 -1
  108. package/.next/server/next-font-manifest.json +1 -1
  109. package/.next/server/pages/404.html +1 -1
  110. package/.next/server/pages/500.html +1 -1
  111. package/.next/server/server-reference-manifest.json +1 -1
  112. package/.next/static/chunks/1213.e5c6e70a79b5f7e6.js +24 -0
  113. package/.next/static/chunks/1519.2f596e5f5af9ef57.js +62 -0
  114. package/.next/static/chunks/1974.9f7176c5854f9939.js +32 -0
  115. package/.next/static/chunks/2280.e03ab3748922284c.js +1 -0
  116. package/.next/static/chunks/{398.ffa02af9062a3950.js → 2521.7f745f50d30076e7.js} +1 -1
  117. package/.next/static/chunks/2585.4d6aa847c780c666.js +1 -0
  118. package/.next/static/chunks/2589.e456c324416f9615.js +1 -0
  119. package/.next/static/chunks/2600.45ba17a0f756fc31.js +1 -0
  120. package/.next/static/chunks/26d302b2.b77b53a34ca944aa.js +122 -0
  121. package/.next/static/chunks/2768.1a75ba9e2be767cf.js +1 -0
  122. package/.next/static/chunks/2931.c2acdbf72808b646.js +41 -0
  123. package/.next/static/chunks/3016.406e568aa95ff867.js +1 -0
  124. package/.next/static/chunks/{4004.74b9bcf5478b1663.js → 3022.972047558a20553a.js} +30 -18
  125. package/.next/static/chunks/3064.3a2a1e7cd4fdca5f.js +1 -0
  126. package/.next/static/chunks/3174.03fbed7b7d7a8256.js +1 -0
  127. package/.next/static/chunks/3189.b048866768087750.js +1 -0
  128. package/.next/static/chunks/3217.1a053843c58b70b5.js +24 -0
  129. package/.next/static/chunks/3308.b58803a5e26a56d8.js +74 -0
  130. package/.next/static/chunks/331.fc5d78e1e91daf43.js +1 -0
  131. package/.next/static/chunks/3510.5d4d1c79533e080c.js +1 -0
  132. package/.next/static/chunks/364.ce5400a9dd70b9dc.js +1 -0
  133. package/.next/static/chunks/3658-625de9bc05634c7f.js +7 -0
  134. package/.next/static/chunks/{9793.4567af813117ad25.js → 3789.c418b69121761983.js} +1 -1
  135. package/.next/static/chunks/3831.25ae62d10dccc27a.js +1 -0
  136. package/.next/static/chunks/395.3621e96c2bdfec18.js +90 -0
  137. package/.next/static/chunks/{da12927c.476aa688a637649c.js → 3a7aa434.280905293fc59b77.js} +3 -3
  138. package/.next/static/chunks/4020.3cc19c463c49f969.js +23 -0
  139. package/.next/static/chunks/{1063.775c442bdbeef08b.js → 4035.0acc428926d5c8dd.js} +1 -1
  140. package/.next/static/chunks/405.0902e4f6eb7bd9a2.js +215 -0
  141. package/.next/static/chunks/4159.bb7124776cbd5f2d.js +138 -0
  142. package/.next/static/chunks/{4405.7a19458960a1058e.js → 4208.8ea72bb20afa959e.js} +2 -2
  143. package/.next/static/chunks/4263.ffa8d9bd8a0faaae.js +1 -0
  144. package/.next/static/chunks/4561.d1a3aaca8bae3224.js +34 -0
  145. package/.next/static/chunks/4592.507c41f345e21bee.js +93 -0
  146. package/.next/static/chunks/4799.3c6182ded3f32244.js +1 -0
  147. package/.next/static/chunks/514.b804c51b26f5e126.js +1 -0
  148. package/.next/static/chunks/{3336.a76f9485fe7cb762.js → 5270.28592864d38e881c.js} +1 -1
  149. package/.next/static/chunks/52733464.b343531c2f886252.js +1 -0
  150. package/.next/static/chunks/5354.b559c717a607dc5c.js +1 -0
  151. package/.next/static/chunks/{3995.eca0f5bef1fc3ae5.js → 5448.d3972d9fb464b54f.js} +2 -2
  152. package/.next/static/chunks/587.d52737d7288c11b4.js +1 -0
  153. package/.next/static/chunks/5909.9e37f7b495b11995.js +115 -0
  154. package/.next/static/chunks/{7331.2add3c4e125a2dba.js → 5949.5504b3545fcc3d34.js} +1 -1
  155. package/.next/static/chunks/{9698.4d09a99b9d99f3e5.js → 6361.893d04ac34fa1b49.js} +3 -3
  156. package/.next/static/chunks/{5526.ff46471041fdcb79.js → 6774.8cd53427dbf32cac.js} +1 -1
  157. package/.next/static/chunks/6968.b80277c724dbc96e.js +1 -0
  158. package/.next/static/chunks/{973.88e865b52eff479a.js → 7113.93146ac5e46c1859.js} +1 -1
  159. package/.next/static/chunks/7236.55a9728d35f5b8a6.js +1 -0
  160. package/.next/static/chunks/7390.bc7f4ed9f76fe9e1.js +1 -0
  161. package/.next/static/chunks/7806.a903780fcfa3a30e.js +1 -0
  162. package/.next/static/chunks/7997.517120d5fcd77d6b.js +1 -0
  163. package/.next/static/chunks/8216.64a72d4d35ea7be0.js +1 -0
  164. package/.next/static/chunks/830.a6da04c322e3204a.js +1 -0
  165. package/.next/static/chunks/{4202.8440832386f023c7.js → 8378.fa91de3406f554c9.js} +1 -1
  166. package/.next/static/chunks/8501.c34c2a9170eb458d.js +79 -0
  167. package/.next/static/chunks/8663.6ec5792fb4952e45.js +27 -0
  168. package/.next/static/chunks/872.96937e758ddce860.js +1 -0
  169. package/.next/static/chunks/8803.75bde095fe3613f5.js +1 -0
  170. package/.next/static/chunks/8863.72f5dbb820a0e4c3.js +1 -0
  171. package/.next/static/chunks/90542734.90283a0c0c838d51.js +1 -0
  172. package/.next/static/chunks/9379.5bc9c9343ec5a16c.js +64 -0
  173. package/.next/static/chunks/9389.906fe7aa9cd6a170.js +1 -0
  174. package/.next/static/chunks/9472.8d21dc4771024c26.js +94 -0
  175. package/.next/static/chunks/966.50e905df30903189.js +1 -0
  176. package/.next/static/chunks/{2703.495a65ed14b2f094.js → 9884.c6cac4659c50ebfa.js} +3 -3
  177. package/.next/static/chunks/app/{layout-6f28a6ca96b468e4.js → layout-900d990b4229e169.js} +1 -1
  178. package/.next/static/chunks/app/page-6e8e4795e738ba8b.js +232 -0
  179. package/.next/static/chunks/{1ba63609.b2ae90f43319a29e.js → e413bedd.3a12a8cb02e28fdf.js} +1 -1
  180. package/.next/static/chunks/ea233666.ebaeaf2eb673ecfa.js +62 -0
  181. package/.next/static/chunks/framework-3a41051109d8ea39.js +1 -0
  182. package/.next/static/chunks/webpack-d022bdbc1a873e3c.js +1 -0
  183. package/.next/static/css/be8ae7904992a245.css +1 -0
  184. package/.next/trace +7 -7
  185. package/.next/trace-build +1 -1
  186. package/next.config.ts +1 -0
  187. package/package.json +5 -5
  188. package/.next/server/chunks/1515.js +0 -1
  189. package/.next/server/chunks/1555.js +0 -1
  190. package/.next/server/chunks/1601.js +0 -24
  191. package/.next/server/chunks/1625.js +0 -1
  192. package/.next/server/chunks/1800.js +0 -1
  193. package/.next/server/chunks/1860.js +0 -1
  194. package/.next/server/chunks/2075.js +0 -23
  195. package/.next/server/chunks/2106.js +0 -1
  196. package/.next/server/chunks/2169.js +0 -36
  197. package/.next/server/chunks/2190.js +0 -1
  198. package/.next/server/chunks/2408.js +0 -1
  199. package/.next/server/chunks/2452.js +0 -93
  200. package/.next/server/chunks/2744.js +0 -1
  201. package/.next/server/chunks/2903.js +0 -1
  202. package/.next/server/chunks/295.js +0 -1
  203. package/.next/server/chunks/3012.js +0 -1
  204. package/.next/server/chunks/3383.js +0 -27
  205. package/.next/server/chunks/3569.js +0 -1
  206. package/.next/server/chunks/3869.js +0 -8
  207. package/.next/server/chunks/3894.js +0 -1
  208. package/.next/server/chunks/4315.js +0 -1
  209. package/.next/server/chunks/4367.js +0 -1
  210. package/.next/server/chunks/4372.js +0 -1
  211. package/.next/server/chunks/4538.js +0 -24
  212. package/.next/server/chunks/4674.js +0 -1
  213. package/.next/server/chunks/4980.js +0 -1
  214. package/.next/server/chunks/5029.js +0 -1
  215. package/.next/server/chunks/5974.js +0 -77
  216. package/.next/server/chunks/6052.js +0 -141
  217. package/.next/server/chunks/611.js +0 -1
  218. package/.next/server/chunks/6337.js +0 -1
  219. package/.next/server/chunks/6366.js +0 -80
  220. package/.next/server/chunks/673.js +0 -287
  221. package/.next/server/chunks/6916.js +0 -226
  222. package/.next/server/chunks/703.js +0 -1
  223. package/.next/server/chunks/7233.js +0 -1
  224. package/.next/server/chunks/7265.js +0 -215
  225. package/.next/server/chunks/7561.js +0 -1
  226. package/.next/server/chunks/7710.js +0 -1
  227. package/.next/server/chunks/7744.js +0 -64
  228. package/.next/server/chunks/7790.js +0 -1
  229. package/.next/server/chunks/7872.js +0 -1
  230. package/.next/server/chunks/8106.js +0 -1
  231. package/.next/server/chunks/8294.js +0 -1
  232. package/.next/server/chunks/8333.js +0 -79
  233. package/.next/server/chunks/835.js +0 -1
  234. package/.next/server/chunks/8397.js +0 -41
  235. package/.next/server/chunks/8604.js +0 -115
  236. package/.next/server/chunks/8920.js +0 -62
  237. package/.next/server/chunks/922.js +0 -5
  238. package/.next/server/chunks/9486.js +0 -1
  239. package/.next/server/chunks/9509.js +0 -1
  240. package/.next/server/chunks/9510.js +0 -90
  241. package/.next/static/chunks/103.23142a67b02246a8.js +0 -215
  242. package/.next/static/chunks/1032.12b382a9096ab2a4.js +0 -1
  243. package/.next/static/chunks/1327.09252bb80616cc3a.js +0 -1
  244. package/.next/static/chunks/1708.d029f8776e4578de.js +0 -1
  245. package/.next/static/chunks/1781.866132cea8e77cd0.js +0 -1
  246. package/.next/static/chunks/2081.47b6e9391094055f.js +0 -1
  247. package/.next/static/chunks/2181.ba21239d3ac39f81.js +0 -1
  248. package/.next/static/chunks/2258.4defa30121ef44a5.js +0 -1
  249. package/.next/static/chunks/2325.23caf22075e51aa5.js +0 -1
  250. package/.next/static/chunks/2356.523277bb8c6bf72a.js +0 -23
  251. package/.next/static/chunks/2418.b5d9e177e10a686e.js +0 -1
  252. package/.next/static/chunks/2480.cf27ca02e5b19761.js +0 -24
  253. package/.next/static/chunks/2539.c5a4f2fd8e421c70.js +0 -41
  254. package/.next/static/chunks/268.72794ee2773c2060.js +0 -80
  255. package/.next/static/chunks/2695.6f49435bae1e6f33.js +0 -90
  256. package/.next/static/chunks/2821.934bcf60fbdc28c6.js +0 -1
  257. package/.next/static/chunks/3251.0dce7a0a0ff67235.js +0 -1
  258. package/.next/static/chunks/3308.be8762955e7155d1.js +0 -73
  259. package/.next/static/chunks/3716.72bf4c9d7325debd.js +0 -1
  260. package/.next/static/chunks/4238.6f102dcbcf2ae339.js +0 -141
  261. package/.next/static/chunks/4424.fd0c93a807a333e1.js +0 -1
  262. package/.next/static/chunks/4866.d1060b4faf2ae1e2.js +0 -1
  263. package/.next/static/chunks/4970.8a63b4953b0e4946.js +0 -1
  264. package/.next/static/chunks/5020.9ac8d0dc8390bb6e.js +0 -1
  265. package/.next/static/chunks/5137.f163e94c74a94d01.js +0 -1
  266. package/.next/static/chunks/5242.7b643c6b3394cac1.js +0 -1
  267. package/.next/static/chunks/5361.afc00ab2626bacbf.js +0 -1
  268. package/.next/static/chunks/5521.cfdf2cfc6db31407.js +0 -1
  269. package/.next/static/chunks/5681.dd0e66b0de16e54b.js +0 -27
  270. package/.next/static/chunks/6121.eb9023b1cbc78ee2.js +0 -1
  271. package/.next/static/chunks/6161.4836cd7d031026bf.js +0 -1
  272. package/.next/static/chunks/6195.1153369f5f8b13a2.js +0 -24
  273. package/.next/static/chunks/6294.24f510c0c3e3714c.js +0 -1
  274. package/.next/static/chunks/6654.16f727522ec47f5a.js +0 -1
  275. package/.next/static/chunks/6794.f746d8fbbf248ecf.js +0 -93
  276. package/.next/static/chunks/7256.e07cf52d87d40252.js +0 -1
  277. package/.next/static/chunks/7268.236544be8e242c16.js +0 -1
  278. package/.next/static/chunks/7543.89f7b805ed0f2901.js +0 -1
  279. package/.next/static/chunks/8200.a36b9f8c983c6b9e.js +0 -5
  280. package/.next/static/chunks/869.7152372b662e31af.js +0 -1
  281. package/.next/static/chunks/8863.fa0320ea586efb3b.js +0 -1
  282. package/.next/static/chunks/8885.cf60cac98bf8b70c.js +0 -79
  283. package/.next/static/chunks/8901.e117d206a917bda0.js +0 -1
  284. package/.next/static/chunks/90542734.ae439f2382f58c51.js +0 -1
  285. package/.next/static/chunks/918.6a9bbe564e4a2d0f.js +0 -115
  286. package/.next/static/chunks/934.9006461bd0548660.js +0 -1
  287. package/.next/static/chunks/9445-fde6feabcb39142c.js +0 -7
  288. package/.next/static/chunks/9522.c7c6e9c330f9ba6b.js +0 -1
  289. package/.next/static/chunks/9614.3221013d7f0af27f.js +0 -64
  290. package/.next/static/chunks/9705.40a82b97f214e28b.js +0 -1
  291. package/.next/static/chunks/9764.2669775c6e107a01.js +0 -62
  292. package/.next/static/chunks/993e5495.8797001fcfcf2889.js +0 -62
  293. package/.next/static/chunks/9974.9a0f79beca65e8c4.js +0 -34
  294. package/.next/static/chunks/app/page-1b94cf40b6b9c77e.js +0 -232
  295. package/.next/static/chunks/bf2ff291.3a109dffc1fe84af.js +0 -122
  296. package/.next/static/chunks/db9d41be.e72ce090a86a3691.js +0 -1
  297. package/.next/static/chunks/framework-b33a8f5d57cd8d87.js +0 -1
  298. package/.next/static/chunks/webpack-25464d90fe89e601.js +0 -1
  299. package/.next/static/css/3afba5dcf1fc15ed.css +0 -1
  300. /package/.next/static/{CAfXUwq4b0HP5p-fE011j → gQm9NqajOt7lJ9sjH6Hab}/_buildManifest.js +0 -0
  301. /package/.next/static/{CAfXUwq4b0HP5p-fE011j → gQm9NqajOt7lJ9sjH6Hab}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9522],{59522:(e,s,a)=>{a.d(s,{createGitGraphServices:()=>c.b});var c=a(47237);a(11176)}}]);
@@ -1,64 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9614],{19614:(t,e,i)=>{i.d(e,{diagram:()=>$});var s=i(56174),n=i(86305),a=i(37325);i(56037);var r=i(89851),h=i(94529),l=function(){var t=(0,r.K)(function(t,e,i,s){for(i=i||{},s=t.length;s--;i[t[s]]=e);return i},"o"),e=[1,4],i=[1,14],s=[1,12],n=[1,13],a=[6,7,8],h=[1,20],l=[1,18],o=[1,19],c=[6,7,11],u=[1,6,13,14],d=[1,23],y=[1,24],p=[1,6,7,11,13,14],g={trace:(0,r.K)(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:(0,r.K)(function(t,e,i,s,n,a,r){var h=a.length-1;switch(n){case 6:case 7:return s;case 15:s.addNode(a[h-1].length,a[h].trim());break;case 16:s.addNode(0,a[h].trim())}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:e},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:e},{6:i,7:[1,10],9:9,12:11,13:s,14:n},t(a,[2,3]),{1:[2,2]},t(a,[2,4]),t(a,[2,5]),{1:[2,6],6:i,12:15,13:s,14:n},{6:i,9:16,12:11,13:s,14:n},{6:h,7:l,10:17,11:o},t(c,[2,18],{14:[1,21]}),t(c,[2,16]),t(c,[2,17]),{6:h,7:l,10:22,11:o},{1:[2,7],6:i,12:15,13:s,14:n},t(u,[2,14],{7:d,11:y}),t(p,[2,8]),t(p,[2,9]),t(p,[2,10]),t(c,[2,15]),t(u,[2,13],{7:d,11:y}),t(p,[2,11]),t(p,[2,12])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,r.K)(function(t,e){if(e.recoverable)this.trace(t);else{var i=Error(t);throw i.hash=e,i}},"parseError"),parse:(0,r.K)(function(t){var e=this,i=[0],s=[],n=[null],a=[],h=this.table,l="",o=0,c=0,u=0,d=a.slice.call(arguments,1),y=Object.create(this.lexer),p={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p[g]=this.yy[g]);y.setInput(t,p),p.lexer=y,p.parser=this,void 0===y.yylloc&&(y.yylloc={});var f=y.yylloc;a.push(f);var k=y.options&&y.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||y.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,r.K)(function(t){i.length=i.length-2*t,n.length=n.length-t,a.length=a.length-t},"popStack"),(0,r.K)(m,"lex");for(var w,x,_,b,v,S,K,$,I,E={};;){if(_=i[i.length-1],this.defaultActions[_]?b=this.defaultActions[_]:(null==w&&(w=m()),b=h[_]&&h[_][w]),void 0===b||!b.length||!b[0]){var A="";for(S in I=[],h[_])this.terminals_[S]&&S>2&&I.push("'"+this.terminals_[S]+"'");A=y.showPosition?"Parse error on line "+(o+1)+":\n"+y.showPosition()+"\nExpecting "+I.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==w?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(A,{text:y.match,token:this.terminals_[w]||w,line:y.yylineno,loc:f,expected:I})}if(b[0]instanceof Array&&b.length>1)throw Error("Parse Error: multiple actions possible at state: "+_+", token: "+w);switch(b[0]){case 1:i.push(w),n.push(y.yytext),a.push(y.yylloc),i.push(b[1]),w=null,x?(w=x,x=null):(c=y.yyleng,l=y.yytext,o=y.yylineno,f=y.yylloc,u>0&&u--);break;case 2:if(K=this.productions_[b[1]][1],E.$=n[n.length-K],E._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},k&&(E._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),void 0!==(v=this.performAction.apply(E,[l,c,o,p,b[1],n,a].concat(d))))return v;K&&(i=i.slice(0,-1*K*2),n=n.slice(0,-1*K),a=a.slice(0,-1*K)),i.push(this.productions_[b[1]][0]),n.push(E.$),a.push(E._$),$=h[i[i.length-2]][i[i.length-1]],i.push($);break;case 3:return!0}}return!0},"parse")};function f(){this.yy={}}return g.lexer={EOF:1,parseError:(0,r.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,r.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,r.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,r.K)(function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===s.length?this.yylloc.first_column:0)+s[s.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,r.K)(function(){return this._more=!0,this},"more"),reject:(0,r.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,r.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,r.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,r.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,r.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,r.K)(function(t,e){var i,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack)for(var a in n)this[a]=n[a];return!1},"test_match"),next:(0,r.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,i,s,n=this._currentRules(),a=0;a<n.length;a++)if((i=this._input.match(this.rules[n[a]]))&&(!e||i[0].length>e[0].length)){if(e=i,s=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,n[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,r.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,r.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,r.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,r.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,r.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,r.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,r.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,r.K)(function(t,e,i,s){switch(i){case 0:case 3:return 6;case 1:case 2:return 8;case 4:return 7;case 5:return 13;case 6:return 14;case 7:return 11}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:ishikawa-beta\b)/i,/^(?:ishikawa\b)/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:[^\n]+)/i,/^(?:$)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7],inclusive:!0}}},(0,r.K)(f,"Parser"),f.prototype=g,g.Parser=f,new f}();l.parser=l;var o=class{constructor(){this.stack=[],this.clear=this.clear.bind(this),this.addNode=this.addNode.bind(this),this.getRoot=this.getRoot.bind(this)}static{(0,r.K)(this,"IshikawaDB")}clear(){this.root=void 0,this.stack=[],this.baseLevel=void 0,(0,a.IU)()}getRoot(){return this.root}addNode(t,e){let i=a.Y2.sanitizeText(e,(0,a.D7)());if(!this.root){this.root={text:i,children:[]},this.stack=[{level:0,node:this.root}],(0,a.ke)(i);return}this.baseLevel??=t;let s=t-this.baseLevel+1;for(s<=0&&(s=1);this.stack.length>1&&this.stack[this.stack.length-1].level>=s;)this.stack.pop();let n=this.stack[this.stack.length-1].node,r={text:i,children:[]};n.children.push(r),this.stack.push({level:s,node:r})}getAccTitle(){return(0,a.iN)()}setAccTitle(t){(0,a.SV)(t)}getAccDescription(){return(0,a.m7)()}setAccDescription(t){(0,a.EI)(t)}getDiagramTitle(){return(0,a.ab)()}setDiagramTitle(t){(0,a.ke)(t)}},c=82*Math.PI/180,u=Math.cos(c),d=Math.sin(c),y=(0,r.K)((t,e,i)=>{let s=t.node().getBBox(),n=s.width+2*e,r=s.height+2*e;(0,a.a$)(t,r,n,i),t.attr("viewBox",`${s.x-e} ${s.y-e} ${n} ${r}`)},"applyPaddedViewBox"),p=(0,r.K)((t,e,i,r)=>{let l=r.db.getRoot();if(!l)return;let o=(0,a.D7)(),{look:c,handDrawnSeed:u,themeVariables:d}=o,p=(0,n.I5)(o.fontSize)[0]??14,k="handDrawn"===c,m=l.children??[],w=o.ishikawa?.diagramPadding??20,_=o.ishikawa?.useMaxWidth??!1,b=(0,s.D)(e),v=b.append("g").attr("class","ishikawa"),S=k?h.A.svg(b.node()):void 0,$=S?{roughSvg:S,seed:u??0,lineColor:d?.lineColor??"#333",fillColor:d?.mainBkg??"#fff"}:void 0,I=`ishikawa-arrow-${e}`;k||v.append("defs").append("marker").attr("id",I).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 Z").attr("class","ishikawa-arrow");let E=0,A=250,C=k?void 0:K(v,E,A,E,A,"ishikawa-spine");if(f(v,E,A,l.text,p,$),!m.length){k&&K(v,E,A,E,A,"ishikawa-spine",$),y(b,w,_);return}E-=20;let L=m.filter((t,e)=>e%2==0),M=m.filter((t,e)=>e%2==1),P=g(L),T=g(M),B=P.total+T.total,N=250,D=250;B>0&&(N=Math.max(75,500*(P.total/B)),D=Math.max(75,500*(T.total/B)));let O=2*p;N=Math.max(N,P.max*O),D=Math.max(D,T.max*O),A=Math.max(N,250),C&&C.attr("y1",A).attr("y2",A),v.select(".ishikawa-head-group").attr("transform",`translate(0,${A})`);let W=Math.ceil(m.length/2);for(let t=0;t<W;t++){let e=v.append("g").attr("class","ishikawa-pair");for(let[i,s,n]of[[m[2*t],-1,N],[m[2*t+1],1,D]])i&&x(e,i,E,A,s,n,p,$);E=e.selectAll("text").nodes().reduce((t,e)=>Math.min(t,e.getBBox().x),1/0)}if(k)K(v,E,A,0,A,"ishikawa-spine",$);else{C.attr("x1",E);let t=`url(#${I})`;v.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start",t)}y(b,w,_)},"draw"),g=(0,r.K)(t=>{let e=(0,r.K)(t=>t.children.reduce((t,i)=>t+1+e(i),0),"countDescendants");return t.reduce((t,i)=>{let s=e(i);return t.total+=s,t.max=Math.max(t.max,s),t},{total:0,max:0})},"sideStats"),f=(0,r.K)((t,e,i,s,n,a)=>{let r=Math.max(6,Math.floor(110/(.6*n))),h=t.append("g").attr("class","ishikawa-head-group").attr("transform",`translate(${e},${i})`),l=v(h,b(s,r),0,0,"ishikawa-head-label","start",n),o=l.node().getBBox(),c=Math.max(60,o.width+6),u=Math.max(40,2*o.height+40),d=`M 0 ${-u/2} L 0 ${u/2} Q ${2.4*c} 0 0 ${-u/2} Z`;if(a){let t=a.roughSvg.path(d,{roughness:1.5,seed:a.seed,fill:a.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:a.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-head")}else h.insert("path",":first-child").attr("class","ishikawa-head").attr("d",d);l.attr("transform",`translate(${(c-o.width)/2-o.x+3},${-o.y-o.height/2})`)},"drawHead"),k=(0,r.K)((t,e)=>{let i=[],s=[],n=(0,r.K)((t,a,r)=>{for(let h of -1===e?[...t].reverse():t){let t=i.length,e=h.children??[];i.push({depth:r,text:b(h.text,15),parentIndex:a,childCount:e.length}),r%2==0?(s.push(t),e.length&&n(e,t,r+1)):(e.length&&n(e,t,r+1),s.push(t))}},"walk");return n(t,-1,2),{entries:i,yOrder:s}},"flattenTree"),m=(0,r.K)((t,e,i,s,n,a,r)=>{let h=t.append("g").attr("class","ishikawa-label-group"),l=v(h,e,i,s+11*n,"ishikawa-label cause","middle",a).node().getBBox();if(r){let t=r.roughSvg.rectangle(l.x-20,l.y-2,l.width+40,l.height+4,{roughness:1.5,seed:r.seed,fill:r.fillColor,fillStyle:"hachure",fillWeight:2.5,hachureGap:5,stroke:r.lineColor,strokeWidth:2});h.insert(()=>t,":first-child").attr("class","ishikawa-label-box")}else h.insert("rect",":first-child").attr("class","ishikawa-label-box").attr("x",l.x-20).attr("y",l.y-2).attr("width",l.width+40).attr("height",l.height+4)},"drawCauseLabel"),w=(0,r.K)((t,e,i,s,n,a)=>{let r=Math.sqrt(s*s+n*n);if(0===r)return;let h=s/r,l=n/r,o=-(6*l),c=6*h,u=`M ${e} ${i} L ${e-6*h*2+o} ${i-6*l*2+c} L ${e-6*h*2-o} ${i-6*l*2-c} Z`,d=a.roughSvg.path(u,{roughness:1,seed:a.seed,fill:a.lineColor,fillStyle:"solid",stroke:a.lineColor,strokeWidth:1});t.append(()=>d)},"drawArrowMarker"),x=(0,r.K)((t,e,i,s,n,a,r,h)=>{let l=e.children??[],o=a*(l.length?1:.2),c=d*o*n,y=i+-u*o,p=s+c;if(K(t,i,s,y,p,"ishikawa-branch",h),h&&w(t,i,s,i-y,s-p,h),m(t,e.text,y,p,n,r,h),!l.length)return;let{entries:g,yOrder:f}=k(l,n),x=g.length,_=Array(x);for(let[t,e]of f.entries())_[e]=s+(t+1)/(x+1)*c;let b=new Map;b.set(-1,{x0:i,y0:s,x1:y,y1:p,childCount:l.length,childrenDrawn:0});let $=-u,I=d*n,E=n<0?"ishikawa-label up":"ishikawa-label down";for(let[e,i]of g.entries()){let s=_[e],n=b.get(i.parentIndex),a=t.append("g").attr("class","ishikawa-sub-group"),l=0,o=0,c=0;if(i.depth%2==0){let t=n.y1-n.y0;l=S(n.x0,n.x1,t?(s-n.y0)/t:.5),o=s,c=l-(i.childCount>0?60+5*i.childCount:30),K(a,l,s,c,s,"ishikawa-sub-branch",h),h&&w(a,l,s,1,0,h),v(a,i.text,c,s,"ishikawa-label align","end",r)}else{let t=n.childrenDrawn++;c=(l=S(n.x0,n.x1,(n.childCount-t)/(n.childCount+1)))+(s-(o=n.y0))/I*$,K(a,l,o,c,s,"ishikawa-sub-branch",h),h&&w(a,l,o,l-c,o-s,h),v(a,i.text,c,s,E,"end",r)}i.childCount>0&&b.set(e,{x0:l,y0:o,x1:c,y1:s,childCount:i.childCount,childrenDrawn:0})}},"drawBranch"),_=(0,r.K)(t=>t.split(/<br\s*\/?>|\n/),"splitLines"),b=(0,r.K)((t,e)=>{if(t.length<=e)return t;let i=[];for(let s of t.split(/\s+/)){let t=i.length-1;t>=0&&i[t].length+1+s.length<=e?i[t]+=" "+s:i.push(s)}return i.join("\n")},"wrapText"),v=(0,r.K)((t,e,i,s,n,a,r)=>{let h=_(e),l=1.05*r,o=t.append("text").attr("class",n).attr("text-anchor",a).attr("x",i).attr("y",s-(h.length-1)*l/2);for(let[t,e]of h.entries())o.append("tspan").attr("x",i).attr("dy",0===t?0:l).text(e);return o},"drawMultilineText"),S=(0,r.K)((t,e,i)=>t+(e-t)*i,"lerp"),K=(0,r.K)((t,e,i,s,n,a,r)=>{if(r){let h=r.roughSvg.line(e,i,s,n,{roughness:1.5,seed:r.seed,stroke:r.lineColor,strokeWidth:2});t.append(()=>h).attr("class",a);return}return t.append("line").attr("class",a).attr("x1",e).attr("y1",i).attr("x2",s).attr("y2",n)},"drawLine"),$={parser:l,get db(){return new o},renderer:{draw:p},styles:(0,r.K)(t=>`
2
- .ishikawa .ishikawa-spine,
3
- .ishikawa .ishikawa-branch,
4
- .ishikawa .ishikawa-sub-branch {
5
- stroke: ${t.lineColor};
6
- stroke-width: 2;
7
- fill: none;
8
- }
9
-
10
- .ishikawa .ishikawa-sub-branch {
11
- stroke-width: 1;
12
- }
13
-
14
- .ishikawa .ishikawa-arrow {
15
- fill: ${t.lineColor};
16
- }
17
-
18
- .ishikawa .ishikawa-head {
19
- fill: ${t.mainBkg};
20
- stroke: ${t.lineColor};
21
- stroke-width: 2;
22
- }
23
-
24
- .ishikawa .ishikawa-label-box {
25
- fill: ${t.mainBkg};
26
- stroke: ${t.lineColor};
27
- stroke-width: 2;
28
- }
29
-
30
- .ishikawa text {
31
- font-family: ${t.fontFamily};
32
- font-size: ${t.fontSize};
33
- fill: ${t.textColor};
34
- }
35
-
36
- .ishikawa .ishikawa-head-label {
37
- font-weight: 600;
38
- text-anchor: middle;
39
- dominant-baseline: middle;
40
- font-size: 14px;
41
- }
42
-
43
- .ishikawa .ishikawa-label {
44
- text-anchor: end;
45
- }
46
-
47
- .ishikawa .ishikawa-label.cause {
48
- text-anchor: middle;
49
- dominant-baseline: middle;
50
- }
51
-
52
- .ishikawa .ishikawa-label.align {
53
- text-anchor: end;
54
- dominant-baseline: middle;
55
- }
56
-
57
- .ishikawa .ishikawa-label.up {
58
- dominant-baseline: baseline;
59
- }
60
-
61
- .ishikawa .ishikawa-label.down {
62
- dominant-baseline: hanging;
63
- }
64
- `,"getStyles")}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9705],{79705:(e,c,s)=>{s.d(c,{createPacketServices:()=>a.$});var a=s(74409);s(11176)}}]);
@@ -1,62 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9764],{79764:(t,e,a)=>{a.d(e,{diagram:()=>B});var n=a(80650),r=a(56174),i=a(86305),o=a(37325),l=a(56037),c=a(89851),s=a(88863),d=(0,c.K)(()=>({domains:new Map,transitions:[]}),"createDefaultData"),f=d(),p=(0,c.K)(()=>f.domains,"getDomains"),y={getDomains:p,getTransitions:(0,c.K)(()=>f.transitions,"getTransitions"),setDomains:(0,c.K)(t=>{if(t)for(let e of t){let t=e.domain,a=(e.items??[]).map(t=>({label:t.label}));f.domains.set(t,{name:t,items:a})}},"setDomains"),setTransitions:(0,c.K)(t=>{t&&(f.transitions=t.filter(t=>t.from!==t.to||(l.R.warn(`Cynefin: self-loop transition on domain "${t.from}" is not meaningful and will be skipped.`),!1)).map(t=>({from:t.from,to:t.to,label:t.label||void 0})))},"setTransitions"),getConfig:(0,c.K)(()=>(0,i.$t)({...o.UI.cynefin,...(0,o.zj)().cynefin}),"getConfig"),clear:(0,c.K)(()=>{(0,o.IU)(),f=d()},"clear"),setAccTitle:o.SV,getAccTitle:o.iN,setDiagramTitle:o.ke,getDiagramTitle:o.ab,getAccDescription:o.m7,setAccDescription:o.EI},m=(0,c.K)(t=>{(0,n.S)(t,y),y.setDomains(t.domains),y.setTransitions(t.transitions)},"populate"),x={parse:(0,c.K)(async t=>{let e=await (0,s.qg)("cynefin",t);l.R.debug(e),m(e)},"parse")};function h(t){let e=t+0x6d2b79f5|0;return e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/0x100000000}function $(t){let e=0;for(let a=0;a<t.length;a++)e=(e<<5)-e+t.charCodeAt(a)|0;return e}function g(t,e){return"number"==typeof t&&Number.isFinite(t)&&0!==t?t:$(e)}function u(t,e,a,n){let r=t/2,i=n??.015*t,o=e/7,l=[];for(let t=0;t<=7;t++){let e=h(a+17*t)*i*2-i;l.push({x:r+e,y:t*o})}let c=`M${l[0].x},${l[0].y}`;for(let t=0;t<l.length-1;t++){let e=l[t],n=l[t+1],r=(e.y+n.y)/2,o=1.5*i*(t%2==0?1:-1)*h(a+31*t+7),s=e.x+o,d=n.x-o;c+=` C${s},${r} ${d},${r} ${n.x},${n.y}`}return c}function b(t,e,a,n){let r=e/2,i=n??.015*e,o=t/7,l=[];for(let t=0;t<=7;t++){let e=h(a+23*t)*i*2-i;l.push({x:t*o,y:r+e})}let c=`M${l[0].x},${l[0].y}`;for(let t=0;t<l.length-1;t++){let e=l[t],n=l[t+1],r=(e.x+n.x)/2,o=1.5*i*(t%2==0?1:-1)*h(a+37*t+11),s=e.y+o,d=n.y-o;c+=` C${r},${s} ${r},${d} ${n.x},${n.y}`}return c}function w(t,e){let a=t/2,n=.5*e,r=.03*t;return`M${a},${n} C${a+r},${n+(e-n)*.2} ${a-1.5*r},${n+(e-n)*.55} ${a+.5*r},${n+(e-n)*.75} C${a-r},${n+(e-n)*.85} ${a+.3*r},${n+(e-n)*.95} ${a},${e}`}function C(t,e,a,n){return`M${t-a},${e} A${a},${n} 0 1,1 ${t+a},${e} A${a},${n} 0 1,1 ${t-a},${e} Z`}(0,c.K)(h,"seededRandom"),(0,c.K)($,"hashString"),(0,c.K)(g,"resolveSeed"),(0,c.K)(u,"generateFoldPath"),(0,c.K)(b,"generateHorizontalBoundary"),(0,c.K)(w,"generateCliffPath"),(0,c.K)(C,"generateConfusionPath");var k={complex:{model:"Probe → Sense → Respond",practice:"Emergent Practices"},complicated:{model:"Sense → Analyse → Respond",practice:"Good Practices"},clear:{model:"Sense → Categorise → Respond",practice:"Best Practices"},chaotic:{model:"Act → Sense → Respond",practice:"Novel Practices"},confusion:{model:"",practice:"Disorder"}},D=(0,c.K)((t,e)=>{let a=t/2,n=e/2;return{complex:{cx:a/2,cy:n/2,x:0,y:0,w:a,h:n},complicated:{cx:a+a/2,cy:n/2,x:a,y:0,w:a,h:n},chaotic:{cx:a/2,cy:n+n/2,x:0,y:n,w:a,h:n},clear:{cx:a+a/2,cy:n+n/2,x:a,y:n,w:a,h:n},confusion:{cx:a,cy:n,x:.7*a,y:.7*n,w:.6*a,h:.6*n}}},"getDomainLayouts"),K=(0,c.K)(()=>{let t=(0,o.P$)(),e=(0,o.zj)();return(0,i.$t)(t,e.themeVariables).cynefin},"getCynefinDomainColors"),T=(0,c.K)((t,e,a,n)=>{let i=n.db,c=i.getDomains(),s=i.getTransitions(),d=i.getDiagramTitle(),f=i.getAccTitle(),p=i.getAccDescription(),y=i.getConfig(),m=K();l.R.debug("Rendering Cynefin diagram");let x=y.width,h=y.height,$=y.padding,T=y.showDomainDescriptions,A=y.boundaryAmplitude,B=x+2*$,S=h+2*$,z={complex:m.complexBg,complicated:m.complicatedBg,clear:m.clearBg,chaotic:m.chaoticBg,confusion:m.confusionBg},v=(0,r.D)(e);(0,o.a$)(v,S,B,y.useMaxWidth??!0),v.attr("viewBox",`0 0 ${B} ${S}`),f&&v.append("title").text(f),p&&v.append("desc").text(p);let M=v.append("g").attr("transform",`translate(${$}, ${$})`),I=D(x,h),L=g(y.seed,e),P=M.append("g").attr("class","cynefin-backgrounds"),R=["complex","complicated","chaotic","clear"];for(let t of R){let e=I[t];P.append("rect").attr("class","cynefinDomain").attr("x",e.x).attr("y",e.y).attr("width",e.w).attr("height",e.h).attr("fill",z[t]).attr("fill-opacity",.4).attr("stroke","none")}let F=M.append("g").attr("class","cynefin-boundaries");F.append("path").attr("class","cynefinBoundary").attr("d",u(x,h,L,A)).attr("fill","none"),F.append("path").attr("class","cynefinBoundary").attr("d",b(x,h,L+100,A)).attr("fill","none"),F.append("path").attr("class","cynefinCliff").attr("d",w(x,h)).attr("fill","none");let E=.15*x,N=.15*h;M.append("path").attr("class","cynefinConfusion").attr("d",C(x/2,h/2,E,N)).attr("fill",z.confusion).attr("fill-opacity",.5);let W=M.append("g").attr("class","cynefin-labels");for(let t of R){let e=I[t];W.append("text").attr("class","cynefinDomainLabel").attr("x",e.cx).attr("y",T?e.cy-30:e.cy).attr("text-anchor","middle").attr("dominant-baseline","middle").text(t.charAt(0).toUpperCase()+t.slice(1))}if(W.append("text").attr("class","cynefinDomainLabel").attr("x",x/2).attr("y",T?h/2-10:h/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text("Confusion"),T){let t=M.append("g").attr("class","cynefin-subtitles");for(let e of R){let a=I[e],n=k[e];t.append("text").attr("class","cynefinSubtitle").attr("x",a.cx).attr("y",a.cy-10).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n.model),t.append("text").attr("class","cynefinSubtitle").attr("x",a.cx).attr("y",a.cy+5).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n.practice)}t.append("text").attr("class","cynefinSubtitle").attr("x",x/2).attr("y",h/2+8).attr("text-anchor","middle").attr("dominant-baseline","middle").text(k.confusion.practice)}let H=M.append("g").attr("class","cynefin-items");for(let t of["complex","complicated","chaotic","clear","confusion"]){let e,a=c.get(t);if(!a||0===a.items.length)continue;let n=I[t],r="confusion"===t,i=a.items,o=0;if(r&&a.items.length>3&&(o=a.items.length-3,i=a.items.slice(0,3)),r){let t=T?22:14;e=n.cy+t}else e=n.cy+(T?25:15);if([...i].forEach((a,r)=>{let i=e+30*r,o=H.append("g"),l=o.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(a.label),c=7*a.label.length,s=l.node();if(s&&"function"==typeof s.getBBox){let t=s.getBBox();t.width>0&&(c=t.width)}let d=c+20,f=n.cx-d/2;o.attr("transform",`translate(${f}, ${i})`),o.insert("rect","text").attr("class","cynefinItem").attr("x",0).attr("y",0).attr("width",d).attr("height",26).attr("rx",4).attr("ry",4).attr("fill",z[t]).attr("fill-opacity",.95),l.attr("x",d/2).attr("y",13)}),o>0){let a=e+30*i.length,r=`+${o} more`,l=H.append("g"),c=l.append("text").attr("class","cynefinItemText").attr("x",0).attr("y",13).attr("text-anchor","middle").attr("dominant-baseline","central").text(r),s=7*r.length,d=c.node();if(d&&"function"==typeof d.getBBox){let t=d.getBBox();t.width>0&&(s=t.width)}let f=s+20,p=n.cx-f/2;l.attr("transform",`translate(${p}, ${a})`),l.insert("rect","text").attr("class","cynefinItemOverflow").attr("x",0).attr("y",0).attr("width",f).attr("height",26).attr("rx",4).attr("ry",4).attr("fill",z[t]).attr("fill-opacity",.6),c.attr("x",f/2).attr("y",13)}}if(s.length>0){let t=v.select("defs").empty()?v.append("defs"):v.select("defs"),a=`cynefin-arrow-${e}`;t.append("marker").attr("id",a).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("class","cynefinArrowHead");let n=M.append("g").attr("class","cynefin-arrows");s.forEach(t=>{let e=I[t.from],r=I[t.to];if(!e||!r)return;if(t.from===t.to)return void l.R.warn(`Cynefin renderer: skipping self-loop on domain "${t.from}"`);let i=e.cx,o=e.cy,c=r.cx,s=r.cy,d=c-i,f=s-o,p=Math.sqrt(d*d+f*f),y=.15*p,m=(i+c)/2+-f/p*y,x=(o+s)/2+d/p*y;n.append("path").attr("class","cynefinArrowLine").attr("d",`M${i},${o} Q${m},${x} ${c},${s}`).attr("fill","none").attr("marker-end",`url(#${a})`),t.label&&n.append("text").attr("class","cynefinArrowLabel").attr("x",m).attr("y",x-6).attr("text-anchor","middle").attr("dominant-baseline","auto").text(t.label)})}d&&M.append("text").attr("class","cynefinTitle").attr("x",x/2).attr("y",-$/2).attr("text-anchor","middle").attr("dominant-baseline","middle").text(d)},"draw"),A=(0,c.K)(()=>{let t=(0,o.P$)(),e=(0,o.zj)();return(0,i.$t)(t,e.themeVariables).cynefin},"getCynefinTheme"),B={parser:x,db:y,renderer:{draw:T},styles:(0,c.K)(()=>{let t=A();return`
2
- .cynefinDomain {
3
- stroke: none;
4
- }
5
- .cynefinDomainLabel {
6
- font-size: ${t.domainFontSize}px;
7
- font-weight: bold;
8
- fill: ${t.labelColor};
9
- }
10
- .cynefinSubtitle {
11
- font-size: ${t.itemFontSize-1}px;
12
- fill: ${t.textColor};
13
- font-style: italic;
14
- }
15
- .cynefinItem {
16
- fill-opacity: 0.95;
17
- stroke: ${t.boundaryColor};
18
- stroke-width: 1;
19
- }
20
- .cynefinItemText {
21
- font-size: ${t.itemFontSize}px;
22
- fill: ${t.textColor};
23
- }
24
- .cynefinItemOverflow {
25
- fill-opacity: 0.6;
26
- stroke: ${t.boundaryColor};
27
- stroke-width: 1;
28
- stroke-dasharray: 3 2;
29
- }
30
- .cynefinBoundary {
31
- stroke: ${t.boundaryColor};
32
- stroke-width: ${t.boundaryWidth};
33
- stroke-dasharray: 6 3;
34
- }
35
- .cynefinCliff {
36
- stroke: ${t.cliffColor};
37
- stroke-width: ${t.cliffWidth};
38
- }
39
- .cynefinConfusion {
40
- stroke: ${t.boundaryColor};
41
- stroke-width: 1.5;
42
- stroke-dasharray: 4 2;
43
- }
44
- .cynefinArrowLine {
45
- stroke: ${t.arrowColor};
46
- stroke-width: ${t.arrowWidth};
47
- fill: none;
48
- }
49
- .cynefinArrowHead {
50
- fill: ${t.arrowColor};
51
- stroke: none;
52
- }
53
- .cynefinArrowLabel {
54
- font-size: ${t.itemFontSize-1}px;
55
- fill: ${t.textColor};
56
- }
57
- .cynefinTitle {
58
- font-size: ${t.domainFontSize+2}px;
59
- font-weight: bold;
60
- fill: ${t.labelColor};
61
- }
62
- `},"styles")}},80650:(t,e,a)=>{function n(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}a.d(e,{S:()=>n}),(0,a(89851).K)(n,"populateCommonDb")}}]);
@@ -1,62 +0,0 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[988],{94340:(t,e,a)=>{a.d(e,{DA:()=>k,IU:()=>R,U:()=>N,U7:()=>ep,U_:()=>ex,Zk:()=>y,aP:()=>ef,gh:()=>em,lC:()=>w,on:()=>eu});var l=a(23462),i=a(77809),r=a(19836),n=a(39457),s=a(86305),h=a(37325),o=a(56037),d=a(89851),c=a(33948),g=a(94529),y=(0,d.K)(async(t,e,a)=>{let l,n=e.useHtmlLabels||(0,h._3)((0,h.D7)()?.htmlLabels),o=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),d=o.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));l=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=!!e.icon||!!e.img,y="markdown"===e.labelType,f=await (0,r.G)(d,(0,h.jZ)((0,s.Sm)(l),(0,h.D7)()),{useHtmlLabels:n,width:e.width||(0,h.D7)().flowchart?.wrappingWidth,classes:y?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:g,markdown:y},(0,h.D7)()),w=f.getBBox(),u=(e?.padding??0)/2;if(n){let t=f.children[0],e=(0,c.Ltv)(f);await (0,i.X)(t,l),w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}return n?d.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"):d.attr("transform","translate(0, "+-w.height/2+")"),e.centerLabel&&d.attr("transform","translate("+-w.width/2+", "+-w.height/2+")"),d.insert("rect",":first-child"),{shapeSvg:o,bbox:w,halfPadding:u,label:d}},"labelHelper"),f=(0,d.K)(async(t,e,a)=>{let l=a.useHtmlLabels??(0,h.E)((0,h.D7)()),i=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),n=await (0,r.G)(i,(0,h.jZ)((0,s.Sm)(e),(0,h.D7)()),{useHtmlLabels:l,width:a.width||(0,h.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),o=n.getBBox(),d=a.padding/2;if((0,h.E)((0,h.D7)())){let t=n.children[0],e=(0,c.Ltv)(n);o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}return l?i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):i.attr("transform","translate(0, "+-o.height/2+")"),a.centerLabel&&i.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:o,halfPadding:d,label:i}},"insertLabel"),w=(0,d.K)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),u=(0,d.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function p(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function m(t,e,a,l,i,r){let n=[],s=a-t,h=2*Math.PI/(s/r),o=e+(l-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,l=o+i*Math.sin(h*(a-t));n.push({x:a,y:l})}return n}function x(t,e,a,l,i,r){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}function $(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),l=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",l);let i=e.find(t=>"none"!==t.getAttribute("fill")),r=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,d.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");i&&Object.entries({fill:n(i,"fill"),"fill-opacity":n(i,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),r&&Object.entries({stroke:n(r,"stroke"),"stroke-width":n(r,"stroke-width")??"1","stroke-opacity":n(r,"stroke-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)});let s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(a),s}(0,d.K)(p,"createPathFromPoints"),(0,d.K)(m,"generateFullSineWavePoints"),(0,d.K)(x,"generateCirclePoints"),(0,d.K)($,"mergePaths");var b=(0,d.K)((t,e)=>{var a,l,i=t.x,r=t.y,n=e.x-i,s=e.y-r,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(n)*o?(s<0&&(o=-o),a=0===s?0:o*n/s,l=o):(n<0&&(h=-h),a=h,l=0===n?0:h*s/n),{x:i+a,y:r+l}},"intersectRect"),k=(0,d.K)(async(t,e,a,l=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let s=(0,h.D7)(),o=(0,h.E)(s);return await (0,r.G)(t,n,{style:a,isTitle:l,useHtmlLabels:o,markdown:!1,isNode:i,width:1/0},s)},"createLabel"),D=(0,d.K)((t,e,a,l,i)=>["M",t+i,e,"H",t+a-i,"A",i,i,"0 0 1",t+a,e+i,"V",e+l-i,"A",i,i,"0 0 1",t+a-i,e+l,"H",t+i,"A",i,i,"0 0 1",t,e+l-i,"V",e+i,"A",i,i,"0 0 1",t+i,e,"Z"].join(" "),"createRoundedRectPathD"),S=(0,d.K)(async(t,e)=>{let a,i,n=(0,h.D7)(),{themeVariables:s,handDrawnSeed:d}=n,{clusterBkg:y,clusterBorder:f}=s,{labelStyles:w,nodeStyles:u,borderStyles:p,backgroundStyles:m}=(0,l.GX)(e),x=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),$=(0,h._3)(n.flowchart.htmlLabels),k="LR"===e.direction,D=x.insert("g").attr("class","cluster-label swimlane-label"),S=await (0,r.G)(D,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),M=S.getBBox();if($){let t=S.children[0],e=(0,c.Ltv)(S);M=t.getBoundingClientRect(),e.attr("width",M.width),e.attr("height",M.height)}let A=e.padding??0,v=e.width<=M.width+A?M.width+A:e.width;e.width<=M.width+A?e.diff=(v-e.width)/2-A:e.diff=-A;let K=e.height,B=e.y-K/2,C=e.y+K/2,N=e.x-v/2,R=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:B+K/3,L=4*!!k,F=M.height+2*L;if(k){let t=Math.max(F,M.height+2*L),r=N+t,n=Math.max(0,v-t);if("handDrawn"===e.look){let s=g.A.svg(x),h=(0,l.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:d}),o=(0,l.Fr)(e,{roughness:.7,fill:"none",stroke:f,seed:d}),c=s.rectangle(N,B,t,K,h);a=x.insert(()=>c,":first-child");let w=s.rectangle(r,B,n,K,o);i=x.insert(()=>w,":first-child"),a.select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else a=x.insert("rect",":first-child"),i=x.insert("rect",":first-child"),a.attr("class","swimlane-title").attr("style",u).attr("x",N).attr("y",B).attr("width",t).attr("height",K).attr("fill",y).attr("stroke",f),i.attr("class","swimlane-body").attr("style",u).attr("x",r).attr("y",B).attr("width",n).attr("height",K).attr("fill","none").attr("stroke",f);let s=N+t/2,h=e.y;D.attr("transform",`translate(${s}, ${h}) rotate(-90) translate(${-M.width/2}, ${-M.height/2})`)}else{let t=Math.min(F,Math.max(0,R-B)),r=B+t,n=Math.max(0,C-r),s=e.x-v/2;if("handDrawn"===e.look){let h=g.A.svg(x),o=(0,l.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:3,seed:d}),c=(0,l.Fr)(e,{roughness:.7,fill:"none",stroke:f,seed:d}),w=h.rectangle(s,B,v,t,o);a=x.insert(()=>w,":first-child");let u=h.rectangle(s,r,v,n,c);i=x.insert(()=>u,":first-child"),a.select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else a=x.insert("rect",":first-child"),i=x.insert("rect",":first-child"),a.attr("class","swimlane-title").attr("style",u).attr("x",s).attr("y",B).attr("width",v).attr("height",t).attr("fill",y).attr("stroke",f),i.attr("class","swimlane-body").attr("style",u).attr("x",s).attr("y",r).attr("width",v).attr("height",n).attr("fill","none").attr("stroke",f);let h=e.x-M.width/2,o=B+(t-M.height)/2;D.attr("transform",`translate(${h}, ${o})`)}if(o.R.trace("Swimlane data ",e,JSON.stringify(e)),w){let t=D.select("span");t&&t.attr("style",w)}return e.offsetX=0,e.width=v,e.height=K,e.offsetY=M.height-A/2,e.intersect=function(t){return b(e,t)},{cluster:x,labelBBox:M}},"swimlane"),M=(0,d.K)(async(t,e)=>{let a,n;o.R.info("Creating subgraph rect for ",e.id,e);let s=(0,h.D7)(),{themeVariables:d,handDrawnSeed:y}=s,{clusterBkg:f,clusterBorder:w}=d,{labelStyles:u,nodeStyles:p,borderStyles:m,backgroundStyles:x}=(0,l.GX)(e),$=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),S=(0,h.E)(s),M=$.insert("g").attr("class","cluster-label "),A=(a="markdown"===e.labelType?await (0,r.G)(M,e.label,{style:e.labelStyle,useHtmlLabels:S,isNode:!0,width:e.width}):await k(M,e.label,e.labelStyle||"",!1,!0)).getBBox();if((0,h.E)(s)){let t=a.children[0],e=(0,c.Ltv)(a);A=t.getBoundingClientRect(),e.attr("width",A.width),e.attr("height",A.height)}let v=e.width<=A.width+e.padding?A.width+e.padding:e.width;e.width<=A.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;let K=e.height,B=e.x-v/2,C=e.y-K/2;if(o.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=g.A.svg($),a=(0,l.Fr)(e,{roughness:.7,fill:f,stroke:w,fillWeight:3,seed:y}),i=t.path(D(B,C,v,K,0),a);(n=$.insert(()=>(o.R.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",m.join(";")),n.select("path").attr("style",x.join(";").replace("fill","stroke"))}else(n=$.insert("rect",":first-child")).attr("style",p).attr("rx",e.rx).attr("ry",e.ry).attr("x",B).attr("y",C).attr("width",v).attr("height",K);let{subGraphTitleTopMargin:N}=(0,i.O)(s);if(M.attr("transform",`translate(${e.x-A.width/2}, ${e.y-e.height/2+N})`),u){let t=M.select("span");t&&t.attr("style",u)}let R=n.node().getBBox();return e.offsetX=0,e.width=R.width,e.height=R.height,e.offsetY=A.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:$,labelBBox:A}},"rect"),A=(0,d.K)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.domId),l=a.insert("rect",":first-child"),i=0*e.padding,r=i/2;l.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-r).attr("y",e.y-e.height/2-r).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");let n=l.node().getBBox();return e.width=n.width,e.height=n.height,e.intersect=function(t){return b(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),v=(0,d.K)(async(t,e)=>{let a,l=(0,h.D7)(),{themeVariables:i,handDrawnSeed:r}=l,{altBackground:n,compositeBackground:s,compositeTitleBackground:o,nodeBorder:d}=i,y=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),f=y.insert("g",":first-child"),w=y.insert("g").attr("class","cluster-label"),u=y.append("rect"),p=await k(w,e.label,e.labelStyle,void 0,!0),m=p.getBBox();if((0,h.E)(l)){let t=p.children[0],e=(0,c.Ltv)(p);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let x=0*e.padding,$=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+x;e.width<=m.width+e.padding?e.diff=($-e.width)/2-e.padding:e.diff=-e.padding;let S=e.height+x,M=e.height+x-m.height-6,A=e.x-$/2,v=e.y-S/2;e.width=$;let K=e.y-e.height/2-x/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),l=g.A.svg(y),i=e.rx||e.ry?l.path(D(A,v,$,S,10),{roughness:.7,fill:o,fillStyle:"solid",stroke:d,seed:r}):l.rectangle(A,v,$,S,{seed:r});a=y.insert(()=>i,":first-child");let h=l.rectangle(A,K,$,M,{fill:t?n:s,fillStyle:t?"hachure":"solid",stroke:d,seed:r});a=y.insert(()=>i,":first-child"),u=y.insert(()=>h)}else(a=f.insert("rect",":first-child")).attr("class","outer").attr("x",A).attr("y",v).attr("width",$).attr("height",S).attr("data-look",e.look),u.attr("class","inner").attr("x",A).attr("y",K).attr("width",$).attr("height",M);return w.attr("transform",`translate(${e.x-m.width/2}, ${v+1-3*!(0,h.E)(l)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return b(e,t)},{cluster:y,labelBBox:m}},"roundedWithTitle"),K=(0,d.K)(async(t,e)=>{let a;o.R.info("Creating subgraph rect for ",e.id,e);let n=(0,h.D7)(),{themeVariables:s,handDrawnSeed:d}=n,{clusterBkg:y,clusterBorder:f}=s,{labelStyles:w,nodeStyles:u,borderStyles:p,backgroundStyles:m}=(0,l.GX)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),$=(0,h.E)(n),k=x.insert("g").attr("class","cluster-label "),S=await (0,r.G)(k,e.label,{style:e.labelStyle,useHtmlLabels:$,isNode:!0,width:e.width}),M=S.getBBox();if((0,h.E)(n)){let t=S.children[0],e=(0,c.Ltv)(S);M=t.getBoundingClientRect(),e.attr("width",M.width),e.attr("height",M.height)}let A=e.width<=M.width+e.padding?M.width+e.padding:e.width;e.width<=M.width+e.padding?e.diff=(A-e.width)/2-e.padding:e.diff=-e.padding;let v=e.height,K=e.x-A/2,B=e.y-v/2;if(o.R.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){let t=g.A.svg(x),i=(0,l.Fr)(e,{roughness:.7,fill:y,stroke:f,fillWeight:4,seed:d}),r=t.path(D(K,B,A,v,e.rx),i);(a=x.insert(()=>(o.R.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",p.join(";")),a.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(a=x.insert("rect",":first-child")).attr("style",u).attr("rx",e.rx).attr("ry",e.ry).attr("x",K).attr("y",B).attr("width",A).attr("height",v);let{subGraphTitleTopMargin:C}=(0,i.O)(n);if(k.attr("transform",`translate(${e.x-M.width/2}, ${e.y-e.height/2+C})`),w){let t=k.select("span");t&&t.attr("style",w)}let N=a.node().getBBox();return e.offsetX=0,e.width=N.width,e.height=N.height,e.offsetY=M.height-e.padding/2,e.intersect=function(t){return b(e,t)},{cluster:x,labelBBox:M}},"kanbanSection"),B={rect:M,squareRect:M,roundedWithTitle:v,noteGroup:A,divider:(0,d.K)((t,e)=>{let a,{themeVariables:l,handDrawnSeed:i}=(0,h.D7)(),{nodeBorder:r}=l,n=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),s=n.insert("g",":first-child"),o=0*e.padding,d=e.width+o;e.diff=-e.padding;let c=e.height+o,y=e.x-d/2,f=e.y-c/2;if(e.width=d,"handDrawn"===e.look){let t=g.A.svg(n).rectangle(y,f,d,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:r,seed:i});a=n.insert(()=>t,":first-child")}else{a=s.insert("rect",":first-child");let t="outer";e.look,t="divider",a.attr("class",t).attr("x",y).attr("y",f).attr("width",d).attr("height",c).attr("data-look",e.look)}return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return b(e,t)},{cluster:n,labelBBox:{}}},"divider"),kanbanSection:K,swimlane:S},C=new Map,N=(0,d.K)(async(t,e)=>{let a=e.shape||"rect",l=await B[a](t,e);return C.set(e.id,l),l},"insertCluster"),R=(0,d.K)(()=>{C=new Map},"clear");function L(t,e,a,l){var i=t.x,r=t.y,n=i-l.x,s=r-l.y,h=Math.sqrt(e*e*s*s+a*a*n*n),o=Math.abs(e*a*n/h);l.x<i&&(o=-o);var d=Math.abs(e*a*s/h);return l.y<r&&(d=-d),{x:i+o,y:r+d}}function F(t,e,a){return L(t,e,e,a)}function P(t,e,a,l){{let i=e.y-t.y,r=t.x-e.x,n=e.x*t.y-t.x*e.y,s=i*a.x+r*a.y+n,h=i*l.x+r*l.y+n;if(0!==s&&0!==h&&X(s,h))return;let o=l.y-a.y,d=a.x-l.x,c=l.x*a.y-a.x*l.y,g=o*t.x+d*t.y+c,y=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&X(g,y))return;let f=i*d-o*r;if(0===f)return;let w=Math.abs(f/2),u=r*c-d*n;return{x:u<0?(u-w)/f:(u+w)/f,y:(u=o*n-i*c)<0?(u-w)/f:(u+w)/f}}}function X(t,e){return t*e>0}function G(t,e,a){let l=t.x,i=t.y,r=[],n=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),s=Math.min(s,t.y)}):(n=Math.min(n,e.x),s=Math.min(s,e.y));let h=l-t.width/2-n,o=i-t.height/2-s;for(let l=0;l<e.length;l++){let i=e[l],n=e[l<e.length-1?l+1:0],s=P(t,a,{x:h+i.x,y:o+i.y},{x:h+n.x,y:o+n.y});s&&r.push(s)}return r.length?(r.length>1&&r.sort(function(t,e){let l=t.x-a.x,i=t.y-a.y,r=Math.sqrt(l*l+i*i),n=e.x-a.x,s=e.y-a.y,h=Math.sqrt(n*n+s*s);return r<h?-1:+(r!==h)}),r[0]):t}(0,d.K)(function(t,e){return t.intersect(e)},"intersectNode"),(0,d.K)(L,"intersectEllipse"),(0,d.K)(F,"intersectCircle"),(0,d.K)(P,"intersectLine"),(0,d.K)(X,"sameSign"),(0,d.K)(G,"intersectPolygon");function I(t,e){let{labelStyles:a}=(0,l.GX)(e);e.labelStyle=a;let i=u(e),r=i;i||(r="anchor");let n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),{cssStyles:h}=e,d=g.A.svg(n),c=(0,l.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let y=d.circle(0,0,2,c),f=n.insert(()=>y,":first-child");return f.attr("class","anchor").attr("style",(0,s.KL)(h)),w(e,f),e.intersect=function(t){return o.R.info("Circle intersect",e,1,t),F(e,1,t)},n}function E(t,e,a,l,i,r,n){let s=Math.atan2(l-e,a-t),h=Math.sqrt(((a-t)/2/i)**2+((l-e)/2/r)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*r*Math.sin(s)*(n?-1:1),c=(e+l)/2-o*i*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/r,(t-d)/i),y=Math.atan2((l-c)/r,(a-d)/i)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+i*Math.cos(e),l=c+r*Math.sin(e);f.push({x:a,y:l})}return f}function T(t,e,a){let[l,i]=[e,a].sort((t,e)=>e-t);return i*(1-Math.sqrt(1-(t/l/2)**2))}async function W(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h=(0,d.K)(t=>t+s,"calcTotalHeight"),o=(0,d.K)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:c,bbox:f}=await y(t,e,u(e)),m=h(e?.height?e?.height:f.height),[x,$]=o(m),b=T(m,x,$),k=(e?.width?e?.width:f.width)+2*n+b-b,{cssStyles:D}=e,S=[{x:k/2,y:-m/2},{x:-k/2,y:-m/2},...E(-k/2,-m/2,-k/2,m/2,x,$,!1),{x:k/2,y:m/2},...E(k/2,m/2,k/2,-m/2,x,$,!0)],M=g.A.svg(c),A=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=p(S),K=M.path(v,A),B=c.insert(()=>K,":first-child");return B.attr("class","basic label-container outer-path"),D&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",D),i&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",i),B.attr("transform",`translate(${x/2}, 0)`),w(e,B),e.intersect=function(t){return G(e,S,t)},c}function H(t,e,a,l){return t.insert("polygon",":first-child").attr("points",l.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function j(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?28:n,h="neo"===e.look?24:n,{shapeSvg:o,bbox:d}=await y(t,e,u(e)),c=(e?.width??d.width)+("neo"===e.look?2*s:s+12),f=(e?.height??d.height)+("neo"===e.look?2*h:h),m=-f,x=[{x:12,y:m},{x:c,y:m},{x:c,y:0},{x:0,y:0},{x:0,y:m+12},{x:12,y:m}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=g.A.svg(o),i=(0,l.Fr)(e,{}),r=p(x),n=t.path(r,i);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${f/2})`),$&&a.attr("style",$)}else a=H(o,c,f,x);return r&&a.attr("style",r),w(e,a),e.intersect=function(t){return G(e,x,t)},o}function q(t,e){let{nodeStyles:a}=(0,l.GX)(e);e.label="";let i=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:r}=e,n=Math.max(28,e.width??0),s=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}],h=g.A.svg(i),o=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let d=p(s),c=h.path(d,o),y=i.insert(()=>c,":first-child");return r&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",r),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return G(e,s,t)},i}async function _(t,e,a){let i,{labelStyles:r,nodeStyles:n}=(0,l.GX)(e);e.labelStyle=r;let{shapeSvg:h,bbox:d,halfPadding:c}=await y(t,e,u(e)),f=a?.padding??c,p="neo"===e.look?d.width/2+32:d.width/2+f,{cssStyles:m}=e;if("handDrawn"===e.look){let t=g.A.svg(h),a=(0,l.Fr)(e,{}),r=t.circle(0,0,2*p,a);(i=h.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(m))}else i=h.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0);return w(e,i),e.calcIntersect=function(t,e){let a=t.width/2;return F(t,a,e)},e.intersect=function(t){return o.R.info("Circle intersect",e,p,t),F(e,p,t)},h}function z(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),l=2*t,i={x:l/2*e,y:l/2*a},r={x:-(l/2)*e,y:l/2*a},n={x:-(l/2)*e,y:-(l/2)*a},s={x:l/2*e,y:-(l/2)*a};return`M ${r.x},${r.y} L ${s.x},${s.y}
2
- M ${i.x},${i.y} L ${n.x},${n.y}`}function O(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a,e.label="";let r=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,h=g.A.svg(r),d=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let c=h.circle(0,0,2*n,d),y=z(n),f=h.path(y,d),p=r.insert(()=>c,":first-child");return p.insert(()=>f),p.attr("class","outer-path"),s&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",i),w(e,p),e.intersect=function(t){return o.R.info("crossedCircle intersect",e,{radius:n,point:t}),F(e,n,t)},r}function Z(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function Y(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await y(t,e,u(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,d=n.width+h,c=n.height+o,f=Math.max(5,.1*c),{cssStyles:m}=e,x=[...Z(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...Z(d/2+2*f,-f,f,20,-180,-270),...Z(d/2+2*f,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...Z(d/2,c/2,f,20,0,90)],$=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...Z(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...Z(d/2+.1*d,-f,f,20,-180,-270),...Z(d/2+.1*d,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...Z(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2,y:c/2+f}],b=g.A.svg(r),k=(0,l.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=p(x).replace("Z",""),S=b.path(D,k),M=p($),A=b.path(M,{...k}),v=r.insert("g",":first-child");return v.insert(()=>A,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${f}, 0)`),s.attr("transform",`translate(${-d/2+f-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),w(e,v),e.intersect=function(t){return G(e,$,t)},r}function V(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:r,y:o})}return n}async function U(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await y(t,e,u(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,d=n.width+("neo"===e.look?2*h:h),c=n.height+("neo"===e.look?2*o:o),f=Math.max(5,.1*c),{cssStyles:m}=e,x=[...V(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...V(d/2+2*f,-f,f,20,-180,-270),...V(d/2+2*f,f,f,20,-90,-180),{x:d/2+f,y:c/2},...V(d/2,c/2,f,20,0,90)],$=[{x:-d/2,y:-c/2-f},{x:d/2,y:-c/2-f},...V(d/2,-c/2,f,20,-90,0),{x:d/2+f,y:-f},...V(d/2+2*f,-f,f,20,-180,-270),...V(d/2+2*f,f,f,20,-90,-180),{x:d/2+f,y:c/2},...V(d/2,c/2,f,20,0,90),{x:d/2,y:c/2+f},{x:-d/2,y:c/2+f}],b=g.A.svg(r),k=(0,l.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=p(x).replace("Z",""),S=b.path(D,k),M=p($),A=b.path(M,{...k}),v=r.insert("g",":first-child");return v.insert(()=>A,":first-child").attr("stroke-opacity",0),v.insert(()=>S,":first-child"),v.attr("class","text"),m&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-f}, 0)`),s.attr("transform",`translate(${-d/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),w(e,v),e.intersect=function(t){return G(e,$,t)},r}function J(t,e,a,l=100,i=0,r=180){let n=[],s=i*Math.PI/180,h=(r*Math.PI/180-s)/(l-1);for(let i=0;i<l;i++){let l=s+i*h,r=t+a*Math.cos(l),o=e+a*Math.sin(l);n.push({x:-r,y:-o})}return n}async function Q(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await y(t,e,u(e)),h="neo"===e.look?18:e.padding??0,o="neo"===e.look?12:e.padding??0,d=n.width+("neo"===e.look?2*h:h),c=n.height+("neo"===e.look?2*o:o),f=Math.max(5,.1*c),{cssStyles:m}=e,x=[...J(d/2,-c/2,f,30,-90,0),{x:-d/2-f,y:f},...J(d/2+2*f,-f,f,20,-180,-270),...J(d/2+2*f,f,f,20,-90,-180),{x:-d/2-f,y:-c/2},...J(d/2,c/2,f,20,0,90)],$=[...J(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...J(-d/2-f/2,-f,f,20,0,90),...J(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...J(-d/2+f+f/2,c/2,f,30,-180,-270)],b=[{x:d/2,y:-c/2-f},{x:-d/2,y:-c/2-f},...J(d/2,-c/2,f,20,-90,0),{x:-d/2-f,y:-f},...J(d/2+2*f,-f,f,20,-180,-270),...J(d/2+2*f,f,f,20,-90,-180),{x:-d/2-f,y:c/2},...J(d/2,c/2,f,20,0,90),{x:-d/2,y:c/2+f},{x:d/2-f-f/2,y:c/2+f},...J(-d/2+f+f/2,-c/2,f,20,-90,-180),{x:d/2-f/2,y:f},...J(-d/2-f/2,-f,f,20,0,90),...J(-d/2-f/2,f,f,20,-90,0),{x:d/2-f/2,y:-f},...J(-d/2+f+f/2,c/2,f,30,-180,-270)],k=g.A.svg(r),D=(0,l.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=p(x).replace("Z",""),M=k.path(S,D),A=p($).replace("Z",""),v=k.path(A,D),K=p(b),B=k.path(K,{...D}),C=r.insert("g",":first-child");return C.insert(()=>B,":first-child").attr("stroke-opacity",0),C.insert(()=>M,":first-child"),C.insert(()=>v,":first-child"),C.attr("class","text"),m&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",m),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(${f-f/4}, 0)`),s.attr("transform",`translate(${-d/2+(e.padding??0)/2-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),w(e,C),e.intersect=function(t){return G(e,b,t)},r}async function tt(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=Math.max(20,(o.width+2*n)*1.25,e?.width??0),c=Math.max(5,o.height+2*s,e?.height??0),f=c/2,{cssStyles:m}=e,$=g.A.svg(h),b=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=d-f,D=c/4,S=[{x:k,y:0},{x:D,y:0},{x:0,y:c/2},{x:D,y:c},{x:k,y:c},...x(-k,-c/2,f,50,270,90)],M=p(S),A=$.path(M,b),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",i),v.attr("transform",`translate(${-d/2}, ${-c/2})`),w(e,v),e.intersect=function(t){return G(e,S,t)},h}(0,d.K)(I,"anchor"),(0,d.K)(E,"generateArcPoints"),(0,d.K)(T,"calculateArcSagitta"),(0,d.K)(W,"bowTieRect"),(0,d.K)(H,"insertPolygonShape"),(0,d.K)(j,"card"),(0,d.K)(q,"choice"),(0,d.K)(_,"circle"),(0,d.K)(z,"createLine"),(0,d.K)(O,"crossedCircle"),(0,d.K)(Z,"generateCirclePoints"),(0,d.K)(Y,"curlyBraceLeft"),(0,d.K)(V,"generateCirclePoints"),(0,d.K)(U,"curlyBraceRight"),(0,d.K)(J,"generateCirclePoints"),(0,d.K)(Q,"curlyBraces"),(0,d.K)(tt,"curvedTrapezoid");var te=(0,d.K)((t,e,a,l,i,r)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createCylinderPathD"),ta=(0,d.K)((t,e,a,l,i,r)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l}`,"createOuterCylinderPathD"),tl=(0,d.K)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function ti(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,h="neo"===e.look?24:n,o="neo"===e.look?24:n;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-o,e.width<8&&(e.width=8),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<8&&(e.height=8)}let{shapeSvg:d,bbox:c,label:f}=await y(t,e,u(e)),p=(e.width?e.width:c.width)+o,m=p/2,x=m/(2.5+p/50),$=(e.height?e.height:c.height)+h+x,{cssStyles:k}=e;if("handDrawn"===e.look){let t=g.A.svg(d),i=ta(0,0,p,$,m,x),r=tl(0,x,p,$,m,x),n=(0,l.Fr)(e,{}),s=t.path(i,n),h=t.path(r,(0,l.Fr)(e,{fill:"none"}));a=d.insert(()=>h,":first-child"),(a=d.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=te(0,0,p,$,m,x);a=d.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),w(e,a),f.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(e.padding??0)/1.5-(c.y-(c.top??0))})`),e.intersect=function(t){let a=b(e,t),l=a.x-(e.x??0);if(0!=m&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},d}async function tr(t,e,a){let i,{labelStyles:r,nodeStyles:n}=(0,l.GX)(e);e.labelStyle=r;let{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=Math.max(o.width+2*a.labelPaddingX,e?.width||0),c=Math.max(o.height+2*a.labelPaddingY,e?.height||0),f=-d/2,p=-c/2,{rx:m,ry:x}=e,{cssStyles:$}=e;if(a?.rx&&a.ry&&(m=a.rx,x=a.ry),"handDrawn"===e.look){let t=g.A.svg(h),a=(0,l.Fr)(e,{}),r=m||x?t.path(D(f,p,d,c,m||0),a):t.rectangle(f,p,d,c,a);(i=h.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)($))}else(i=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",(0,s.KL)(m)).attr("ry",(0,s.KL)(x)).attr("x",f).attr("y",p).attr("width",d).attr("height",c);return w(e,i),e.calcIntersect=function(t,e){return b(t,e)},e.intersect=function(t){return b(e,t)},h}async function tn(t,e){let{cssClasses:a,labelPaddingX:i,labelPaddingY:r,padding:n,width:s,height:h}=e,o=await tr(t,e,{rx:0,ry:0,classes:a??"",labelPaddingX:i??(n??0)*2,labelPaddingY:r??n??0});if("handDrawn"===e.look){let t=g.A.svg(o),a=(0,l.Fr)(e,{}),i=o.select(".basic.label-container > path:nth-child(2)"),r=i.node();if(!r)return o;let n=null;return r instanceof SVGGraphicsElement&&(n=r.getBBox(),o.insert(()=>t.line(n.x,n.y,n.x+n.width,n.y,a),".basic.label-container g.label"),o.insert(()=>t.line(n.x,n.y+n.height,n.x+n.width,n.y+n.height,a),".basic.label-container g.label"),i.remove()),o}let d=o.select(".basic.label-container"),c=(Number(d.attr("width"))||s)??0,y=(Number(d.attr("height"))||h)??0;return c>0&&y>0&&d.attr("stroke-dasharray",`${c} ${y}`),o}async function ts(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:h,label:o}=await y(t,e,u(e)),d=h.width+r,c=h.height+n,f=.2*c,p=-d/2,m=-c/2-f/2,{cssStyles:x}=e,$=g.A.svg(s),k=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=$.polygon([{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}].map(t=>[t.x,t.y]),k),S=s.insert(()=>D,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),i&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",i),o.attr("transform",`translate(${p+(e.padding??0)/2-(h.x-(h.left??0))}, ${m+f+(e.padding??0)/2-(h.y-(h.top??0))})`),w(e,S),e.intersect=function(t){return b(e,t)},s}async function th(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e),n="neo"===e.look?12:5;e.labelStyle=i;let h=e.padding??0,d="neo"===e.look?16:h,{shapeSvg:c,bbox:f}=await y(t,e,u(e)),p=(e?.width?e?.width/2:f.width/2)+(d??0),m=p-n,{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(c),i=(0,l.Fr)(e,{roughness:.2,strokeWidth:2.5}),r=(0,l.Fr)(e,{roughness:.2,strokeWidth:1.5}),n=t.circle(0,0,2*p,i),h=t.circle(0,0,2*m,r);(a=c.insert("g",":first-child")).attr("class",(0,s.KL)(e.cssClasses)).attr("style",(0,s.KL)(x)),a.node()?.appendChild(n),a.node()?.appendChild(h)}else{let t=(a=c.insert("g",":first-child")).insert("circle",":first-child"),e=a.insert("circle");a.attr("class","basic label-container").attr("style",r),t.attr("class","outer-circle").attr("style",r).attr("r",p).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",r).attr("r",m).attr("cx",0).attr("cy",0)}return w(e,a),e.intersect=function(t){return o.R.info("DoubleCircle intersect",e,p,t),F(e,p,t)},c}function to(t,e,{config:{themeVariables:a}}){let{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.label="",e.labelStyle=i;let n=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,h=g.A.svg(n),{nodeBorder:d}=a,c=(0,l.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let y=h.circle(0,0,14,c),f=n.insert(()=>y,":first-child");return f.selectAll("path").attr("style",`fill: ${d} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",s),r&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",r),w(e,f),e.intersect=function(t){return o.R.info("filledCircle intersect",e,{radius:7,point:t}),F(e,7,t)},n}async function td(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-n-n/2,e.width<10&&(e.width=10));let{shapeSvg:s,bbox:h,label:d}=await y(t,e,u(e)),c=(e?.width?e?.width:h.width)+(n??0),f=e?.height?e?.height:c+h.height,m=[{x:0,y:-f},{x:f,y:-f},{x:f/2,y:0}],{cssStyles:x}=e,$=g.A.svg(s),b=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=p(m),D=$.path(k,b),S=s.insert(()=>D,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return x&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",x),i&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",i),e.width=c,e.height=f,w(e,S),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(t){return o.R.info("Triangle intersect",e,m,t),G(e,m,t)},s}function tc(t,e,{dir:a,config:{state:i,themeVariables:r}}){let{nodeStyles:n}=(0,l.GX)(e);e.label="";let s=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);"LR"===a&&(o=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0));let c=-1*o/2,y=-1*d/2,f=g.A.svg(s),p=(0,l.Fr)(e,{stroke:r.lineColor,fill:r.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let m=f.rectangle(c,y,o,d,p),x=s.insert(()=>m,":first-child");h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),w(e,x);let $=i?.padding??0;return e.width&&e.height&&(e.width+=$/2||0,e.height+=$/2||0),e.intersect=function(t){return b(e,t)},s}async function tg(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*n,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*r,e.width<15&&(e.width=15));let{shapeSvg:s,bbox:h}=await y(t,e,u(e)),d=(e?.width?e?.width:Math.max(15,h.width))+2*r,c=(e?.height?e?.height:Math.max(10,h.height))+2*n,f=c/2,{cssStyles:m}=e,$=g.A.svg(s),b=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-d/2,y:-c/2},{x:d/2-f,y:-c/2},...x(-d/2+f,0,f,50,90,270),{x:d/2-f,y:c/2},{x:-d/2,y:c/2}],D=p(k),S=$.path(D,b),M=s.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",i),w(e,M),e.intersect=function(t){return o.R.info("Pill intersect",e,{radius:f,point:t}),G(e,k,t)},s}(0,d.K)(ti,"cylinder"),(0,d.K)(tr,"drawRect"),(0,d.K)(tn,"datastore"),(0,d.K)(ts,"dividedRectangle"),(0,d.K)(th,"doublecircle"),(0,d.K)(to,"filledCircle"),(0,d.K)(td,"flippedTriangle"),(0,d.K)(tc,"forkJoin"),(0,d.K)(tg,"halfRoundedRectangle");var ty=(0,d.K)((t,e,a,l,i)=>`M${t+i},${e} L${t+a-i},${e} L${t+a},${e-l/2} L${t+a-i},${e-l} L${t+i},${e-l} L${t},${e-l/2} Z`,"createHexagonPathD");async function tf(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=i;let s=e.padding??0,h="neo"===e.look?70:s,o="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-o,e.height=(e.height??0)-h}let{shapeSvg:d,bbox:c}=await y(t,e,u(e)),f=(e?.height?e?.height:c.height)+h,p=f/n,m=(e?.width?e?.width:c.width)+2*p+o,x=[{x:p,y:0},{x:m-p,y:0},{x:m,y:-f/2},{x:m-p,y:-f},{x:p,y:-f},{x:0,y:-f/2}],{cssStyles:$}=e;if("handDrawn"===e.look){let t=g.A.svg(d),i=(0,l.Fr)(e,{}),r=ty(0,0,m,f,p),n=t.path(r,i);a=d.insert(()=>n,":first-child").attr("transform",`translate(${-m/2}, ${f/2})`),$&&a.attr("style",$)}else a=H(d,m,f,x);return r&&a.attr("style",r),e.width=m,e.height=f,w(e,a),e.intersect=function(t){return G(e,x,t)},d}async function tw(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:r}=await y(t,e,u(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:h}=e,d=g.A.svg(r),c=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let f=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],m=p(f),x=d.path(m,c),$=r.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",h),i&&"handDrawn"!==e.look&&$.selectChildren("path").attr("style",i),$.attr("transform",`translate(${-n/2}, ${-s/2})`),w(e,$),e.intersect=function(t){return o.R.info("Pill intersect",e,{points:f}),G(e,f,t)},r}async function tu(t,e,{config:{themeVariables:a,flowchart:i}}){let{labelStyles:r}=(0,l.GX)(e);e.labelStyle=r;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,i?.wrappingWidth??0);let{shapeSvg:h,bbox:d,label:c}=await y(t,e,"icon-shape default"),f="t"===e.pos,{nodeBorder:u}=a,{stylesMap:p}=(0,l.WW)(e),m=-s/2,x=-s/2,$=8*!!e.label,k=g.A.svg(h),D=(0,l.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=k.rectangle(m,x,s,s,D),M=Math.max(s,d.width),A=s+d.height+$,v=k.rectangle(-M/2,-A/2,M,A,{...D,fill:"transparent",stroke:"none"}),K=h.insert(()=>S,":first-child"),B=h.insert(()=>v);if(e.icon){let t=h.append("g");t.html(`<g>${await (0,n.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,r=a.x,o=a.y;t.attr("transform",`translate(${-l/2-r},${f?d.height/2+$/2-i/2-o:-d.height/2-$/2-i/2-o})`),t.attr("style",`color: ${p.get("stroke")??u};`)}return c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${f?-A/2:A/2-d.height})`),K.attr("transform",`translate(0,${f?d.height/2+$/2:-d.height/2-$/2})`),w(e,B),e.intersect=function(t){if(o.R.info("iconSquare intersect",e,t),!e.label)return b(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return G(e,r=f?[{x:a-d.width/2,y:l-i/2},{x:a+d.width/2,y:l-i/2},{x:a+d.width/2,y:l-i/2+d.height+$},{x:a+s/2,y:l-i/2+d.height+$},{x:a+s/2,y:l+i/2},{x:a-s/2,y:l+i/2},{x:a-s/2,y:l-i/2+d.height+$},{x:a-d.width/2,y:l-i/2+d.height+$}]:[{x:a-s/2,y:l-i/2},{x:a+s/2,y:l-i/2},{x:a+s/2,y:l-i/2+s},{x:a+d.width/2,y:l-i/2+s},{x:a+d.width/2/2,y:l+i/2},{x:a-d.width/2,y:l+i/2},{x:a-d.width/2,y:l-i/2+s},{x:a-s/2,y:l-i/2+s}],t)},h}async function tp(t,e,{config:{themeVariables:a,flowchart:i}}){let{labelStyles:r}=(0,l.GX)(e);e.labelStyle=r;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,i?.wrappingWidth??0);let{shapeSvg:h,bbox:d,label:c}=await y(t,e,"icon-shape default"),f=8*!!e.label,u="t"===e.pos,{nodeBorder:p,mainBkg:m}=a,{stylesMap:x}=(0,l.WW)(e),$=g.A.svg(h),k=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid"),k.stroke=x.get("fill")??m;let D=h.append("g");e.icon&&D.html(`<g>${await (0,n.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let S=D.node().getBBox(),M=S.width,A=S.height,v=S.x,K=S.y,B=Math.max(M,A)*Math.SQRT2+40,C=$.circle(0,0,B,k),N=Math.max(B,d.width),R=B+d.height+f,L=$.rectangle(-N/2,-R/2,N,R,{...k,fill:"transparent",stroke:"none"}),F=h.insert(()=>C,":first-child"),P=h.insert(()=>L);return D.attr("transform",`translate(${-M/2-v},${u?d.height/2+f/2-A/2-K:-d.height/2-f/2-A/2-K})`),D.attr("style",`color: ${x.get("stroke")??p};`),c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-R/2:R/2-d.height})`),F.attr("transform",`translate(0,${u?d.height/2+f/2:-d.height/2-f/2})`),w(e,P),e.intersect=function(t){return o.R.info("iconSquare intersect",e,t),b(e,t)},h}async function tm(t,e,{config:{themeVariables:a,flowchart:i}}){let{labelStyles:r}=(0,l.GX)(e);e.labelStyle=r;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,i?.wrappingWidth??0);let{shapeSvg:h,bbox:d,halfPadding:c,label:f}=await y(t,e,"icon-shape default"),u="t"===e.pos,p=s+2*c,m=s+2*c,{nodeBorder:x,mainBkg:$}=a,{stylesMap:k}=(0,l.WW)(e),S=8*!!e.label,M=g.A.svg(h),A=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid"),A.stroke=k.get("fill")??$;let v=M.path(D(-m/2,-p/2,m,p,5),A),K=Math.max(m,d.width),B=p+d.height+S,C=M.rectangle(-K/2,-B/2,K,B,{...A,fill:"transparent",stroke:"none"}),N=h.insert(()=>v,":first-child").attr("class","icon-shape2"),R=h.insert(()=>C);if(e.icon){let t=h.append("g");t.html(`<g>${await (0,n.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,r=a.x,o=a.y;t.attr("transform",`translate(${-l/2-r},${u?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),t.attr("style",`color: ${k.get("stroke")??x};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-B/2:B/2-d.height})`),N.attr("transform",`translate(0,${u?d.height/2+S/2:-d.height/2-S/2})`),w(e,R),e.intersect=function(t){if(o.R.info("iconSquare intersect",e,t),!e.label)return b(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return G(e,r=u?[{x:a-d.width/2,y:l-i/2},{x:a+d.width/2,y:l-i/2},{x:a+d.width/2,y:l-i/2+d.height+S},{x:a+m/2,y:l-i/2+d.height+S},{x:a+m/2,y:l+i/2},{x:a-m/2,y:l+i/2},{x:a-m/2,y:l-i/2+d.height+S},{x:a-d.width/2,y:l-i/2+d.height+S}]:[{x:a-m/2,y:l-i/2},{x:a+m/2,y:l-i/2},{x:a+m/2,y:l-i/2+p},{x:a+d.width/2,y:l-i/2+p},{x:a+d.width/2/2,y:l+i/2},{x:a-d.width/2,y:l+i/2},{x:a-d.width/2,y:l-i/2+p},{x:a-m/2,y:l-i/2+p}],t)},h}async function tx(t,e,{config:{themeVariables:a,flowchart:i}}){let{labelStyles:r}=(0,l.GX)(e);e.labelStyle=r;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,i?.wrappingWidth??0);let{shapeSvg:h,bbox:d,halfPadding:c,label:f}=await y(t,e,"icon-shape default"),u="t"===e.pos,p=s+2*c,m=s+2*c,{nodeBorder:x,mainBkg:$}=a,{stylesMap:k}=(0,l.WW)(e),S=8*!!e.label,M=g.A.svg(h),A=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid"),A.stroke=k.get("fill")??$;let v=M.path(D(-m/2,-p/2,m,p,.1),A),K=Math.max(m,d.width),B=p+d.height+S,C=M.rectangle(-K/2,-B/2,K,B,{...A,fill:"transparent",stroke:"none"}),N=h.insert(()=>v,":first-child"),R=h.insert(()=>C);if(e.icon){let t=h.append("g");t.html(`<g>${await (0,n.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,i=a.height,r=a.x,o=a.y;t.attr("transform",`translate(${-l/2-r},${u?d.height/2+S/2-i/2-o:-d.height/2-S/2-i/2-o})`),t.attr("style",`color: ${k.get("stroke")??x};`)}return f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-B/2:B/2-d.height})`),N.attr("transform",`translate(0,${u?d.height/2+S/2:-d.height/2-S/2})`),w(e,R),e.intersect=function(t){if(o.R.info("iconSquare intersect",e,t),!e.label)return b(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return G(e,r=u?[{x:a-d.width/2,y:l-i/2},{x:a+d.width/2,y:l-i/2},{x:a+d.width/2,y:l-i/2+d.height+S},{x:a+m/2,y:l-i/2+d.height+S},{x:a+m/2,y:l+i/2},{x:a-m/2,y:l+i/2},{x:a-m/2,y:l-i/2+d.height+S},{x:a-d.width/2,y:l-i/2+d.height+S}]:[{x:a-m/2,y:l-i/2},{x:a+m/2,y:l-i/2},{x:a+m/2,y:l-i/2+p},{x:a+d.width/2,y:l-i/2+p},{x:a+d.width/2/2,y:l+i/2},{x:a-d.width/2,y:l+i/2},{x:a-d.width/2,y:l-i/2+p},{x:a-m/2,y:l-i/2+p}],t)},h}async function t$(t,e,{config:{flowchart:a}}){let i=new Image;i.src=e?.img??"",await i.decode();let r=Number(i.naturalWidth.toString().replace("px","")),n=Number(i.naturalHeight.toString().replace("px",""));e.imageAspectRatio=r/n;let{labelStyles:s}=(0,l.GX)(e);e.labelStyle=s;let h=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let d=Math.max(e.label?h??0:0,e?.assetWidth??r),c="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,f="on"===e.constraint?c/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(c,h??0);let{shapeSvg:u,bbox:p,label:m}=await y(t,e,"image-shape default"),x="t"===e.pos,$=-c/2,k=8*!!e.label,D=g.A.svg(u),S=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=D.rectangle($,-f/2,c,f,S),A=Math.max(c,p.width),v=f+p.height+k,K=D.rectangle(-A/2,-v/2,A,v,{...S,fill:"none",stroke:"none"}),B=u.insert(()=>M,":first-child"),C=u.insert(()=>K);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",c),t.attr("height",f),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-c/2},${x?v/2-f:-v/2})`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-f/2-p.height/2-k/2:f/2-p.height/2+k/2})`),B.attr("transform",`translate(0,${x?p.height/2+k/2:-p.height/2-k/2})`),w(e,C),e.intersect=function(t){if(o.R.info("iconSquare intersect",e,t),!e.label)return b(e,t);let a=e.x??0,l=e.y??0,i=e.height??0,r=[];return G(e,r=x?[{x:a-p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2},{x:a+p.width/2,y:l-i/2+p.height+k},{x:a+c/2,y:l-i/2+p.height+k},{x:a+c/2,y:l+i/2},{x:a-c/2,y:l+i/2},{x:a-c/2,y:l-i/2+p.height+k},{x:a-p.width/2,y:l-i/2+p.height+k}]:[{x:a-c/2,y:l-i/2},{x:a+c/2,y:l-i/2},{x:a+c/2,y:l-i/2+f},{x:a+p.width/2,y:l-i/2+f},{x:a+p.width/2/2,y:l+i/2},{x:a-p.width/2,y:l+i/2},{x:a-p.width/2,y:l-i/2+f},{x:a-c/2,y:l-i/2+f}],t)},u}async function tb(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=Math.max(o.width+(s??0)*2,e?.width??0),c=Math.max(o.height+(n??0)*2,e?.height??0),f=[{x:0,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:-3*c/6,y:-c}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=g.A.svg(h),i=(0,l.Fr)(e,{}),r=p(f),n=t.path(r,i);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),m&&a.attr("style",m)}else a=H(h,d,c,f);return r&&a.attr("style",r),e.width=d,e.height=c,w(e,a),e.intersect=function(t){return G(e,f,t)},h}async function tk(t,e){let{shapeSvg:a,bbox:l,label:i}=await y(t,e,"label"),r=a.insert("rect",":first-child");return r.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),i.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),w(e,r),e.intersect=function(t){return b(e,t)},a}async function tD(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=(e?.height??o.height)+n,c=(e?.width??o.width)+s,f=[{x:0,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:-(3*d)/6,y:-d}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=g.A.svg(h),i=(0,l.Fr)(e,{}),r=p(f),n=t.path(r,i);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),m&&a.attr("style",m)}else a=H(h,c,d,f);return r&&a.attr("style",r),e.width=c,e.height=d,w(e,a),e.intersect=function(t){return G(e,f,t)},h}async function tS(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=(e?.height??o.height)+n,c=(e?.width??o.width)+s,f=[{x:-3*d/6,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:0,y:-d}],{cssStyles:m}=e;if("handDrawn"===e.look){let t=g.A.svg(h),i=(0,l.Fr)(e,{}),r=p(f),n=t.path(r,i);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),m&&a.attr("style",m)}else a=H(h,c,d,f);return r&&a.attr("style",r),e.width=c,e.height=d,w(e,a),e.intersect=function(t){return G(e,f,t)},h}function tM(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.label="",e.labelStyle=a;let r=t.insert("g").attr("class",u(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),d=[{x:s,y:0},{x:0,y:h+3.5},{x:s-14,y:h+3.5},{x:0,y:2*h},{x:s,y:h-3.5},{x:14,y:h-3.5}],c=g.A.svg(r),y=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let f=p(d),m=c.path(f,y),x=r.insert(()=>m,":first-child");return x.attr("class","outer-path"),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),x.attr("transform",`translate(-${s/2},${-h})`),w(e,x),e.intersect=function(t){return o.R.info("lightningBolt intersect",e,t),G(e,d,t)},r}(0,d.K)(tf,"hexagon"),(0,d.K)(tw,"hourglass"),(0,d.K)(tu,"icon"),(0,d.K)(tp,"iconCircle"),(0,d.K)(tm,"iconRounded"),(0,d.K)(tx,"iconSquare"),(0,d.K)(t$,"imageSquare"),(0,d.K)(tb,"inv_trapezoid"),(0,d.K)(tk,"labelRect"),(0,d.K)(tD,"lean_left"),(0,d.K)(tS,"lean_right"),(0,d.K)(tM,"lightningBolt");var tA=(0,d.K)((t,e,a,l,i,r,n)=>`M${t},${e+r} a${i},${r} 0,0,0 ${a},0 a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createCylinderPathD"),tv=(0,d.K)((t,e,a,l,i,r,n)=>`M${t},${e+r} M${t+a},${e+r} a${i},${r} 0,0,0 ${-a},0 l0,${l} a${i},${r} 0,0,0 ${a},0 l0,${-l} M${t},${e+r+n} a${i},${r} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tK=(0,d.K)((t,e,a,l,i,r)=>`M${t-a/2},${-l/2} a${i},${r} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tB(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,h="neo"===e.look?16:n,o="neo"===e.look?24:n;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-h,e.width<10&&(e.width=10),e.height=(e.height??0)-o-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:d,bbox:c,label:f}=await y(t,e,u(e)),p=(e?.width?e?.width:c.width)+2*h,m=p/2,x=m/(2.5+p/50),$=(e?.height?e?.height:c.height)+x+2*o,k=.1*$,{cssStyles:D}=e;if("handDrawn"===e.look){let t=g.A.svg(d),i=tv(0,0,p,$,m,x,k),r=tK(0,x,p,$,m,x),n=(0,l.Fr)(e,{}),s=t.path(i,n),h=t.path(r,n);d.insert(()=>h,":first-child").attr("class","line"),(a=d.insert(()=>s,":first-child")).attr("class","basic label-container"),D&&a.attr("style",D)}else{let t=tA(0,0,p,$,m,x,k);a=d.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(D)).attr("style",r)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),w(e,a),f.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+x-(c.y-(c.top??0))})`),e.intersect=function(t){let a=b(e,t),l=a.x-(e.x??0);if(0!=m&&(Math.abs(l)<(e.width??0)/2||Math.abs(l)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let i=x*x*(1-l*l/(m*m));i>0&&(i=Math.sqrt(i)),i=x-i,t.y-(e.y??0)>0&&(i=-i),a.y+=i}return a},d}async function tC(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;if(e.width||e.height){let t=e.width;e.width=(t??0)*10/11-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}let{shapeSvg:h,bbox:o,label:d}=await y(t,e,u(e)),c=(e?.width?e?.width:o.width)+(n??0)*2,f=(e?.height?e?.height:o.height)+(s??0)*2,p="neo"===e.look?f/4:f/8,x=f+p,{cssStyles:$}=e,b=g.A.svg(h),k=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:-c/2-c/2*.1,y:-x/2},{x:-c/2-c/2*.1,y:x/2},...m(-c/2-c/2*.1,x/2,c/2+c/2*.1,x/2,p,.8),{x:c/2+c/2*.1,y:-x/2},{x:-c/2-c/2*.1,y:-x/2},{x:-c/2,y:-x/2},{x:-c/2,y:x/2*1.1},{x:-c/2,y:-x/2}],S=b.polygon(D.map(t=>[t.x,t.y]),k),M=h.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),M.attr("transform",`translate(0,${-p/2})`),d.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*.1/2-(o.x-(o.left??0))},${-f/2+(e.padding??0)-p/2-(o.y-(o.top??0))})`),w(e,M),e.intersect=function(t){return G(e,D,t)},h}async function tN(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*h,10),e.height=Math.max((e?.height??0)-2*s-2*h,10));let{shapeSvg:o,bbox:d,label:c}=await y(t,e,u(e)),f=(e?.width?e?.width:d.width)+2*n+2*h,m=(e?.height?e?.height:d.height)+2*s+2*h,x=f-2*h,b=m-2*h,k=-x/2,D=-b/2,{cssStyles:S}=e,M=g.A.svg(o),A=(0,l.Fr)(e,{}),v=[{x:k-h,y:D+h},{x:k-h,y:D+b+h},{x:k+x-h,y:D+b+h},{x:k+x-h,y:D+b},{x:k+x,y:D+b},{x:k+x,y:D+b-h},{x:k+x+h,y:D+b-h},{x:k+x+h,y:D-h},{x:k+h,y:D-h},{x:k+h,y:D},{x:k,y:D},{x:k,y:D+h}];"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let K=p(v),B=M.path(K,A),C=p([{x:k,y:D+h},{x:k+x-h,y:D+h},{x:k+x-h,y:D+b},{x:k+x,y:D+b},{x:k+x,y:D},{x:k,y:D}]),N=M.path(C,A);"handDrawn"!==e.look&&(B=$(B),N=$(N));let R=o.insert("g",":first-child");return R.insert(()=>B),R.insert(()=>N),R.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",S),i&&"handDrawn"!==e.look&&R.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(d.width/2)-h-(d.x-(d.left??0))}, ${-(d.height/2)+h-(d.y-(d.top??0))})`),w(e,R),e.intersect=function(t){return G(e,v,t)},o}async function tR(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await y(t,e,u(e)),h=e.padding??0,o="neo"===e.look?16:h,d="neo"===e.look?12:h,c=!0;(e.width||e.height)&&(c=!1,e.width=(e?.width??0)-2*o,e.height=(e?.height??0)-3*d);let f=Math.max(n.width,e?.width??0)+2*o,x=Math.max(n.height,e?.height??0)+3*d,$="neo"===e.look?x/4:x/8,b=x+(c?$/2:-$/2),k=-f/2,D=-b/2,{cssStyles:S}=e,M=m(k-10,D+b+10,k+f-10,D+b+10,$,.8),A=M?.[M.length-1],v=[{x:k-10,y:D+10},{x:k-10,y:D+b+10},...M,{x:k+f-10,y:A.y-10},{x:k+f,y:A.y-10},{x:k+f,y:A.y-20},{x:k+f+10,y:A.y-20},{x:k+f+10,y:D-10},{x:k+10,y:D-10},{x:k+10,y:D},{x:k,y:D},{x:k,y:D+10}],K=[{x:k,y:D+10},{x:k+f-10,y:D+10},{x:k+f-10,y:A.y-10},{x:k+f,y:A.y-10},{x:k+f,y:D},{x:k,y:D}],B=g.A.svg(r),C=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=p(v),R=B.path(N,C),L=p(K),F=B.path(L,C),P=r.insert(()=>R,":first-child");return P.insert(()=>F),P.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&P.selectAll("path").attr("style",S),i&&"handDrawn"!==e.look&&P.selectAll("path").attr("style",i),P.attr("transform",`translate(0,${-$/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-$/2-(n.y-(n.top??0))})`),w(e,P),e.intersect=function(t){return G(e,v,t)},r}async function tL(t,e,{config:{themeVariables:a}}){let{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i,e.useHtmlLabels||(0,h.E)((0,h.zj)())||(e.centerLabel=!0);let{shapeSvg:n,bbox:s,label:o}=await y(t,e,u(e)),d=Math.max(s.width+(e.padding??0)*2,e?.width??0),c=Math.max(s.height+(e.padding??0)*2,e?.height??0),{cssStyles:f}=e,p=g.A.svg(n),m=(0,l.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=p.rectangle(-d/2,-c/2,d,c,m),$=n.insert(()=>x,":first-child");return $.attr("class","basic label-container outer-path"),o.attr("class","label noteLabel"),f&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",f),r&&"handDrawn"!==e.look&&$.selectAll("path").attr("style",r),o.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),w(e,$),e.intersect=function(t){return b(e,t)},n}(0,d.K)(tB,"linedCylinder"),(0,d.K)(tC,"linedWaveEdgedRect"),(0,d.K)(tN,"multiRect"),(0,d.K)(tR,"multiWaveEdgedRectangle"),(0,d.K)(tL,"note");var tF=(0,d.K)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function tP(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let{shapeSvg:n,bbox:s}=await y(t,e,u(e)),h=s.width+(e.padding??0)+(s.height+(e.padding??0)),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:d}=e;if("handDrawn"===e.look){let t=g.A.svg(n),i=(0,l.Fr)(e,{}),r=tF(0,0,h),s=t.path(r,i);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),d&&a.attr("style",d)}else(a=H(n,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return r&&a.attr("style",r),w(e,a),e.calcIntersect=function(t,e){let a=t.width,l=G(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:l.x-.5,y:l.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function tX(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?21:r??0,s="neo"===e.look?12:r??0,{shapeSvg:h,bbox:o,label:d}=await y(t,e,u(e)),c=(e?.width??o.width)+("neo"===e.look?2*n:n),f=(e?.height??o.height)+("neo"===e.look?2*s:s),m=-c/2,x=-f/2,$=x/2,b=[{x:m+$,y:x},{x:m,y:0},{x:m+$,y:-x},{x:-m,y:-x},{x:-m,y:x}],{cssStyles:k}=e,D=g.A.svg(h),S=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let M=p(b),A=D.path(M,S),v=h.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-$/2},0)`),d.attr("transform",`translate(${-$/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),w(e,v),e.intersect=function(t){return G(e,b,t)},h}async function tG(t,e){let a,i,r,{labelStyles:n,nodeStyles:s}=(0,l.GX)(e);e.labelStyle=n,a=e.cssClasses?"node "+e.cssClasses:"node default";let d=t.insert("g").attr("class",a).attr("id",e.domId||e.id),y=d.insert("g"),f=d.insert("g").attr("class","label").attr("style",s),u=e.description,p=e.label,m=await k(f,p,e.labelStyle,!0,!0),x={width:0,height:0};if((0,h.E)((0,h.D7)())){let t=m.children[0],e=(0,c.Ltv)(m);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}o.R.info("Text 2",u);let $=u||[],S=m.getBBox(),M=await k(f,Array.isArray($)?$.join("<br/>"):$,e.labelStyle,!0,!0),A=M.children[0],v=(0,c.Ltv)(M);x=A.getBoundingClientRect(),v.attr("width",x.width),v.attr("height",x.height);let K=(e.padding||0)/2;(0,c.Ltv)(M).attr("transform","translate( "+(x.width>S.width?0:(S.width-x.width)/2)+", "+(S.height+K+5)+")"),(0,c.Ltv)(m).attr("transform","translate( "+(x.width<S.width?0:-(S.width-x.width)/2)+", 0)"),x=f.node().getBBox(),f.attr("transform","translate("+-x.width/2+", "+(-x.height/2-K+3)+")");let B=x.width+(e.padding||0),C=x.height+(e.padding||0),N=-x.width/2-K,R=-x.height/2-K;if("handDrawn"===e.look){let t=g.A.svg(d),a=(0,l.Fr)(e,{}),n=t.path(D(N,R,B,C,e.rx||0),a),s=t.line(-x.width/2-K,-x.height/2-K+S.height+K,x.width/2+K,-x.height/2-K+S.height+K,a);r=d.insert(()=>(o.R.debug("Rough node insert CXC",n),s),":first-child"),i=d.insert(()=>(o.R.debug("Rough node insert CXC",n),n),":first-child")}else i=y.insert("rect",":first-child"),r=y.insert("line"),i.attr("class","outer title-state").attr("style",s).attr("x",-x.width/2-K).attr("y",-x.height/2-K).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),r.attr("class","divider").attr("x1",-x.width/2-K).attr("x2",x.width/2+K).attr("y1",-x.height/2-K+S.height+K).attr("y2",-x.height/2-K+S.height+K);return w(e,i),e.intersect=function(t){return b(e,t)},d}async function tI(t,e,{config:{themeVariables:a}}){let l=a?.radius??5,i={rx:l,ry:l,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tr(t,e,i)}async function tE(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0,{shapeSvg:h,bbox:o,label:d}=await y(t,e,u(e)),c=(e?.width??o.width)+2*r+("neo"===e.look?8:16),f=(e?.height??o.height)+2*n,p=c-8,m=8-c/2,x=-f/2,{cssStyles:$}=e,k=g.A.svg(h),D=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=k.polygon([{x:m,y:x},{x:m+p,y:x},{x:m+p,y:x+f},{x:m-8,y:x+f},{x:m-8,y:x},{x:m,y:x},{x:m,y:x+f}].map(t=>[t.x,t.y]),D),M=h.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path").attr("style",(0,s.KL)($)),i&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),$&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",i),d.attr("transform",`translate(${4-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),w(e,M),e.intersect=function(t){return b(e,t)},h}async function tT(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));let{shapeSvg:h,bbox:o,label:d}=await y(t,e,u(e)),c=(e?.width?e?.width:o.width)+2*n,f=((e?.height?e?.height:o.height)+2*s)*1.5/1.5,m=-c/2,x=-f/2,{cssStyles:$}=e,b=g.A.svg(h),k=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:m,y:x},{x:m,y:x+f},{x:m+c,y:x+f},{x:m+c,y:x-f/2}],S=p(D),M=b.path(S,k),A=h.insert(()=>M,":first-child");return A.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",$),i&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(0, ${f/4})`),d.attr("transform",`translate(${-c/2+(e.padding??0)-(o.x-(o.left??0))}, ${-f/4+(e.padding??0)-(o.y-(o.top??0))})`),w(e,A),e.intersect=function(t){return G(e,D,t)},h}async function tW(t,e){let a=e.padding??0,l="neo"===e.look?16:2*a,i="neo"===e.look?12:a,r={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??l,labelPaddingY:i};return tr(t,e,r)}async function tH(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?20:r,s="neo"===e.look?12:r,{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=o.height+("neo"===e.look?2*s:s),c=o.width+d/4+("neo"===e.look?2*n:n),f=d/2,{cssStyles:m}=e,$=g.A.svg(h),b=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let k=[{x:-c/2+f,y:-d/2},{x:c/2-f,y:-d/2},...x(-c/2+f,0,f,50,90,270),{x:c/2-f,y:d/2},...x(c/2-f,0,f,50,270,450)],D=p(k),S=$.path(D,b),M=h.insert(()=>S,":first-child");return M.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",m),i&&"handDrawn"!==e.look&&M.selectChildren("path").attr("style",i),w(e,M),e.intersect=function(t){return G(e,k,t)},h}async function tj(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tr(t,e,a)}function tq(t,e,{config:{themeVariables:a}}){let{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let{cssStyles:n}=e,{lineColor:s,stateBorder:h,nodeBorder:o,nodeShadow:d}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let c=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),y=g.A.svg(c),f=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let u=y.circle(0,0,e.width,{...f,stroke:s,strokeWidth:2}),p=h??o,m=(e.width??0)*5/14,x=y.circle(0,0,m,{...f,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),$=c.insert(()=>u,":first-child");if($.insert(()=>x),"handDrawn"!==e.look&&$.attr("class","outer-path"),n&&$.selectAll("path").attr("style",n),r&&$.selectAll("path").attr("style",r),e.width<25&&d&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";$.attr("style",`filter:url(#${a})`)}return w(e,$),e.intersect=function(t){return F(e,(e.width??0)/2,t)},c}function t_(t,e,{config:{themeVariables:a}}){let i,{lineColor:r,nodeShadow:n}=a;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);let s=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=g.A.svg(s).circle(0,0,e.width,(0,l.ue)(r));(i=s.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(i=s.insert("circle",":first-child")).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&n&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";i.attr("style",`filter:url(#${a})`)}return w(e,i),e.intersect=function(t){return F(e,(e.width??7)/2,t)},s}async function tz(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e?.padding??8,n="neo"===e.look?28:r,h="neo"===e.look?12:r,{shapeSvg:o,bbox:d}=await y(t,e,u(e)),c=(e?.width??d.width)+16+n,f=(e?.height??d.height)+h,p=c-16,m=-c/2,x=-f/2,$=[{x:0,y:0},{x:p,y:0},{x:p,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if("handDrawn"===e.look){let t=g.A.svg(o),a=(0,l.Fr)(e,{}),i=t.rectangle(m,x,p+16,f,a),r=t.line(m+8,x,m+8,x+f,a),n=t.line(m+8+p,x,m+8+p,x+f,a);o.insert(()=>r,":first-child"),o.insert(()=>n,":first-child");let h=o.insert(()=>i,":first-child"),{cssStyles:d}=e;h.attr("class","basic label-container").attr("style",(0,s.KL)(d)),w(e,h)}else{let t=H(o,p,f,$);i&&t.attr("style",i),w(e,t)}return e.intersect=function(t){return G(e,$,t)},o}async function tO(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*n-.2*(e.height+2*s),10));let{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=(e?.height?e?.height:o.height)+2*s,c=.2*d,f=(e?.width?e?.width:o.width)+2*n+c-c,m=-f/2,x=-d/2,{cssStyles:$}=e,b=g.A.svg(h),k=(0,l.Fr)(e,{}),D=[{x:m-c/2,y:x},{x:m+f+c/2,y:x},{x:m+f+c/2,y:x+d},{x:m-c/2,y:x+d}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let S=p(D),M=b.path(S,k),A=p([{x:m+f-c/2,y:x+d},{x:m+f+c/2,y:x+d},{x:m+f+c/2,y:x+d-.2*d}]),v=b.path(A,{...k,fillStyle:"solid"}),K=h.insert(()=>v,":first-child");return K.insert(()=>M,":first-child"),K.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",i),w(e,K),e.intersect=function(t){return G(e,D,t)},h}async function tZ(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,label:s}=await y(t,e,u(e)),h=Math.max(n.width+(e.padding??0)*2,e?.width??0),o=Math.max(n.height+(e.padding??0)*2,e?.height??0),d=o/8,c=.2*h,f=.2*o,x=o+d,{cssStyles:$}=e,b=g.A.svg(r),k=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:-h/2-h/2*.1,y:x/2},...m(-h/2-h/2*.1,x/2,h/2+h/2*.1,x/2,d,.8),{x:h/2+h/2*.1,y:-x/2},{x:-h/2-h/2*.1,y:-x/2}],S=-h/2+h/2*.1,M=-x/2-.4*f,A=[{x:S+h-c,y:(M+o)*1.3},{x:S+h,y:M+o-f},{x:S+h,y:(M+o)*.9},...m(S+h,(M+o)*1.25,S+h-c,(M+o)*1.3,-(.02*o),.5)],v=p(D),K=b.path(v,k),B=p(A),C=b.path(B,{...k,fillStyle:"solid"}),N=r.insert(()=>C,":first-child");return N.insert(()=>K,":first-child"),N.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(n.x-(n.left??0))},${-o/2+(e.padding??0)-d/2-(n.y-(n.top??0))})`),w(e,N),e.intersect=function(t){return G(e,D,t)},r}async function tY(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n}=await y(t,e,u(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),h=Math.max(n.height+(e.padding??0),e?.height||0),o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),w(e,o),e.intersect=function(t){return b(e,t)},r}(0,d.K)(tP,"question"),(0,d.K)(tX,"rect_left_inv_arrow"),(0,d.K)(tG,"rectWithTitle"),(0,d.K)(tI,"roundedRect"),(0,d.K)(tE,"shadedProcess"),(0,d.K)(tT,"slopedRect"),(0,d.K)(tW,"squareRect"),(0,d.K)(tH,"stadium"),(0,d.K)(tj,"state"),(0,d.K)(tq,"stateEnd"),(0,d.K)(t_,"stateStart"),(0,d.K)(tz,"subroutine"),(0,d.K)(tO,"taggedRect"),(0,d.K)(tZ,"taggedWaveEdgedRectangle"),(0,d.K)(tY,"text");var tV=(0,d.K)((t,e,a,l,i,r)=>`M${t},${e}
3
- a${i},${r} 0,0,1 0,${-l}
4
- l${a},0
5
- a${i},${r} 0,0,1 0,${l}
6
- M${a},${-l}
7
- a${i},${r} 0,0,0 0,${l}
8
- l${-a},0`,"createCylinderPathD"),tU=(0,d.K)((t,e,a,l,i,r)=>`M${t},${e} M${t+a},${e} a${i},${r} 0,0,0 0,${-l} l${-a},0 a${i},${r} 0,0,0 0,${l} l${a},0`,"createOuterCylinderPathD"),tJ=(0,d.K)((t,e,a,l,i,r)=>`M${t+a/2},${-l/2} a${i},${r} 0,0,0 0,${l}`,"createInnerCylinderPathD");async function tQ(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,h="neo"===e.look?12:n/2;if(e.width||e.height){let t=e.height??0;e.height=(e.height??0)-h,e.height<5&&(e.height=5),e.width=(e.width??0)-h-t/2/(2.5+t/50)*3,e.width<10&&(e.width=10)}let{shapeSvg:o,bbox:d,label:c}=await y(t,e,u(e)),f=(e.height?e.height:d.height)+h,p=f/2,m=p/(2.5+f/50),x=(e.width?e.width:d.width)+m+h,{cssStyles:$}=e;if("handDrawn"===e.look){let t=g.A.svg(o),i=tU(0,0,x,f,m,p),r=tJ(0,0,x,f,m,p),n=t.path(i,(0,l.Fr)(e,{})),s=t.path(r,(0,l.Fr)(e,{fill:"none"}));a=o.insert(()=>s,":first-child"),(a=o.insert(()=>n,":first-child")).attr("class","basic label-container"),$&&a.attr("style",$)}else{let t=tV(0,0,x,f,m,p);(a=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,s.KL)($)).attr("style",r)).attr("class","basic label-container outer-path"),$&&a.selectAll("path").attr("style",$),r&&a.selectAll("path").attr("style",r)}return a.attr("label-offset-x",m),a.attr("transform",`translate(${-x/2}, ${f/2} )`),c.attr("transform",`translate(${-(d.width/2)-m-(d.x-(d.left??0))}, ${-(d.height/2)-(d.y-(d.top??0))})`),w(e,a),e.intersect=function(t){let a=b(e,t),l=a.y-(e.y??0);if(0!=p&&(Math.abs(l)<(e.height??0)/2||Math.abs(l)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-m)){let i=m*m*(1-l*l/(p*p));0!=i&&(i=Math.sqrt(Math.abs(i))),i=m-i,t.x-(e.x??0)>0&&(i=-i),a.x+=i}return a},o}async function t0(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n=e.padding??0,s=(e.look,n),h="neo"===e.look?2*n:n,{shapeSvg:o,bbox:d}=await y(t,e,u(e)),c=(e?.height??d.height)+s,f=(e?.width??d.width)+h,m=[{x:-3*c/6,y:0},{x:f+3*c/6,y:0},{x:f,y:-c},{x:0,y:-c}],{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(o),i=(0,l.Fr)(e,{}),r=p(m),n=t.path(r,i);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-f/2}, ${c/2})`),x&&a.attr("style",x)}else a=H(o,f,c,m);return r&&a.attr("style",r),e.width=f,e.height=c,w(e,a),e.intersect=function(t){return G(e,m,t)},o}async function t2(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*n,e.width<15&&(e.width=15));let{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=(e?.width?e?.width:o.width)+2*n,c=(e?.height?e?.height:o.height)+2*s,{cssStyles:f}=e,m=g.A.svg(h),x=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=[{x:-d/2*.8,y:-c/2},{x:d/2*.8,y:-c/2},{x:d/2,y:-c/2*.6},{x:d/2,y:c/2},{x:-d/2,y:c/2},{x:-d/2,y:-c/2*.6}],b=p($),k=m.path(b,x),D=h.insert(()=>k,":first-child");return D.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",f),i&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",i),w(e,D),e.intersect=function(t){return G(e,$,t)},h}async function t1(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?2*r:r;(e.width||e.height)&&(e.width=((e?.width??0)-n)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));let{shapeSvg:s,bbox:d,label:c}=await y(t,e,u(e)),f=(0,h._3)((0,h.D7)().flowchart?.htmlLabels),m=(e?.width?e?.width:d.width)+n,x=e?.height?e?.height:m+d.height,$=[{x:0,y:0},{x:x,y:0},{x:x/2,y:-x}],{cssStyles:b}=e,k=g.A.svg(s),D=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let S=p($),M=k.path(S,D),A=s.insert(()=>M,":first-child").attr("transform",`translate(${-x/2}, ${x/2})`).attr("class","outer-path");return b&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",b),i&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",i),e.width=m,e.height=x,w(e,A),c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${x/2-(d.height+(e.padding??0)/(f?2:1)-(d.y-(d.top??0)))})`),e.intersect=function(t){return o.R.info("Triangle intersect",e,$,t),G(e,$,t)},s}async function t5(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?12:r,h=!0;(e.width||e.height)&&(h=!1,e.width=(e?.width??0)-2*n,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));let{shapeSvg:o,bbox:d,label:c}=await y(t,e,u(e)),f=(e?.width?e?.width:d.width)+(n??0)*2,x=(e?.height?e?.height:d.height)+(s??0)*2,$="neo"===e.look?x/4:x/8,b=x+(h?$:-$),{cssStyles:k}=e,D=14-f,S=D>0?D/2:0,M=g.A.svg(o),A=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");let v=[{x:-f/2-S,y:b/2},...m(-f/2-S,b/2,f/2+S,b/2,$,.8),{x:f/2+S,y:-b/2},{x:-f/2-S,y:-b/2}],K=p(v),B=M.path(K,A),C=o.insert(()=>B,":first-child");return C.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",k),i&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",i),C.attr("transform",`translate(0,${-$/2})`),c.attr("transform",`translate(${-f/2+(e.padding??0)-(d.x-(d.left??0))},${-x/2+(e.padding??0)-$-(d.y-(d.top??0))})`),w(e,C),e.intersect=function(t){return G(e,v,t)},o}async function t8(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r=e.padding??0,n="neo"===e.look?16:r,s="neo"===e.look?20:r;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);let t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-20/9*t),e.width=e.width-2*n}let{shapeSvg:h,bbox:o}=await y(t,e,u(e)),d=(e?.width?e?.width:o.width)+2*n,c=(e?.height?e?.height:o.height)+s,f=c/8,x=c+2*f,{cssStyles:$}=e,b=g.A.svg(h),k=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=[{x:-d/2,y:x/2},...m(-d/2,x/2,d/2,x/2,f,1),{x:d/2,y:-x/2},...m(d/2,-x/2,-d/2,-x/2,f,-1)],S=p(D),M=b.path(S,k),A=h.insert(()=>M,":first-child");return A.attr("class","basic label-container"),$&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),w(e,A),e.intersect=function(t){return G(e,D,t)},h}async function t3(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let r="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*r-10,10),e.height=Math.max((e?.height??0)-2*n-10,10));let{shapeSvg:s,bbox:h,label:o}=await y(t,e,u(e)),d=(e?.width?e?.width:h.width)+2*r+10,c=(e?.height?e?.height:h.height)+2*n+10,f=d-10,p=c-10,m=-f/2,x=-p/2,{cssStyles:$}=e,b=g.A.svg(s),k=(0,l.Fr)(e,{}),D=[{x:m-10,y:x-10},{x:m-10,y:x+p},{x:m+f,y:x+p},{x:m+f,y:x-10}],S=`M${m-10},${x-10} L${m+f},${x-10} L${m+f},${x+p} L${m-10},${x+p} L${m-10},${x-10}
9
- M${m-10},${x} L${m+f},${x}
10
- M${m},${x-10} L${m},${x+p}`;"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=b.path(S,k),A=s.insert(()=>M,":first-child");return A.attr("transform","translate(5, 5)"),A.attr("class","basic label-container outer-path"),$&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",$),i&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",i),o.attr("transform",`translate(${-(h.width/2)+5-(h.x-(h.left??0))}, ${-(h.height/2)+5-(h.y-(h.top??0))})`),w(e,A),e.intersect=function(t){return G(e,D,t)},s}(0,d.K)(tQ,"tiltedCylinder"),(0,d.K)(t0,"trapezoid"),(0,d.K)(t2,"trapezoidalPentagon"),(0,d.K)(t1,"triangle"),(0,d.K)(t5,"waveEdgedRectangle"),(0,d.K)(t8,"waveRectangle"),(0,d.K)(t3,"windowPane");var t4=new Set(["redux-color","redux-dark-color"]),t7=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function t6(t,e){e.alias&&(e.label=e.alias);let{theme:a,themeVariables:i}=(0,h.zj)(),{rowEven:r,rowOdd:n,nodeBorder:o,borderColorArray:d}=i;if("handDrawn"===e.look){let{themeVariables:a}=(0,h.zj)(),{background:l}=a,i={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${l}`]};await t6(t,i)}let y=(0,h.zj)();e.useHtmlLabels=y.htmlLabels;let f=y.er?.diagramPadding??10,p=y.er?.entityPadding??6,{cssStyles:m}=e,{labelStyles:x,nodeStyles:$}=(0,l.GX)(e);if(0===e.attributes.length&&e.label){let l={rx:0,ry:0,labelPaddingX:f,labelPaddingY:1.5*f,classes:""};(0,s.Un)(e.label,y)+2*l.labelPaddingX<y.er.minEntityWidth&&(e.width=y.er.minEntityWidth);let i=await tr(t,e,l);if(null!=a&&t4.has(a)){let t=e.colorIndex??0;i.attr("data-color-id",`color-${t%d.length}`)}if(!(0,h._3)(y.htmlLabels)){let t=i.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return i}y.htmlLabels||(f*=1.25,p*=1.25);let k=u(e);k||(k="node default");let D=t.insert("g").attr("class",k).attr("id",e.domId||e.id),S=await t9(D,e.label??"",y,0,0,["name"],x);S.height+=p;let M=0,A=[],v=[],K=0,B=0,C=0,N=0,R=!0,L=!0;for(let t of e.attributes){let e=await t9(D,t.type,y,0,M,["attribute-type"],x);K=Math.max(K,e.width+f);let a=await t9(D,t.name,y,0,M,["attribute-name"],x);B=Math.max(B,a.width+f);let l=await t9(D,t.keys.join(),y,0,M,["attribute-keys"],x);C=Math.max(C,l.width+f);let i=await t9(D,t.comment,y,0,M,["attribute-comment"],x);N=Math.max(N,i.width+f);let r=Math.max(e.height,a.height,l.height,i.height)+p;v.push({yOffset:M,rowHeight:r}),M+=r}let F=4;C<=f&&(R=!1,C=0,F--),N<=f&&(L=!1,N=0,F--);let P=D.node().getBBox();if(S.width+2*f-(K+B+C+N)>0){let t=S.width+2*f-(K+B+C+N);K+=t/F,B+=t/F,C>0&&(C+=t/F),N>0&&(N+=t/F)}let X=K+B+C+N,G=g.A.svg(D),I=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(I.roughness=0,I.fillStyle="solid");let E=0;v.length>0&&(E=v.reduce((t,e)=>t+(e?.rowHeight??0),0));let T=Math.max(P.width+2*f,e?.width||0,X),W=Math.max((E??0)+S.height,e?.height||0),H=-T/2,j=-W/2;if(D.selectAll("g:not(:first-child)").each((t,e,a)=>{let l=(0,c.Ltv)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]),l.attr("class").includes("attribute-name")?r+=K:l.attr("class").includes("attribute-keys")?r+=K+B:l.attr("class").includes("attribute-comment")&&(r+=K+B+C))}l.attr("transform",`translate(${H+f/2+r}, ${n+j+S.height+p/2})`)}),D.select(".name").attr("transform","translate("+-S.width/2+", "+(j+p/2)+")"),null!=a&&t4.has(a)){let t=e.colorIndex??0;D.attr("data-color-id",`color-${t%d.length}`)}let q=G.rectangle(H,j,T,W,I),_=D.insert(()=>q,":first-child").attr("class","outer-path").attr("style",m.join(""));for(let[t,e]of(A.push(0),v.entries())){let a=(t+1)%2==0&&0!==e.yOffset,l=G.rectangle(H,S.height+j+e?.yOffset,T,e?.rowHeight,{...I,fill:a?r:n,stroke:o});D.insert(()=>l,"g.label").attr("style",m.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let z=et(H,S.height+j,T+H,S.height+j,1e-4),O=G.polygon(z.map(t=>[t.x,t.y]),I);if(D.insert(()=>O).attr("class","divider"),z=et(K+H,S.height+j,K+H,W+j,1e-4),O=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>O).attr("class","divider"),R){let t=K+B+H;z=et(t,S.height+j,t,W+j,1e-4),O=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>O).attr("class","divider")}if(L){let t=K+B+C+H;z=et(t,S.height+j,t,W+j,1e-4),O=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>O).attr("class","divider")}for(let t of A){let e=S.height+j+t;z=et(H,e,T+H,e,1e-4),O=G.polygon(z.map(t=>[t.x,t.y]),I),D.insert(()=>O).attr("class","divider")}if(w(e,_),$&&"handDrawn"!==e.look)if(null!=a&&t7.has(a))D.selectAll("path").attr("style",$);else{let t=$.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");D.selectAll("path").attr("style",e??""),D.selectAll(".row-rect-even path").attr("style",$)}return e.intersect=function(t){return b(e,t)},D}async function t9(t,e,a,l=0,i=0,n=[],o=""){let d=t.insert("g").attr("class",`label ${n.join(" ")}`).attr("transform",`translate(${l}, ${i})`).attr("style",o);e!==(0,h.QO)(e)&&(e=(e=(0,h.QO)(e)).replaceAll("<","&lt;").replaceAll(">","&gt;"));let g=d.node().appendChild(await (0,r.G)(d,e,{width:(0,s.Un)(e,a)+100,style:o,useHtmlLabels:a.htmlLabels},a));if(e.includes("&lt;")||e.includes("&gt;")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("&lt;","<").replaceAll("&gt;",">")}let y=g.getBBox();if((0,h._3)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,c.Ltv)(g);y=t.getBoundingClientRect(),e.attr("width",y.width),e.attr("height",y.height)}return y}function et(t,e,a,l,i){return t===a?[{x:t-i/2,y:e},{x:t+i/2,y:e},{x:a+i/2,y:l},{x:a-i/2,y:l}]:[{x:t,y:e-i/2},{x:t,y:e+i/2},{x:a,y:l+i/2},{x:a,y:l-i/2}]}async function ee(t,e,a,l,i=a.class.padding??12){let r=3*!l,n=t.insert("g").attr("class",u(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,y=0;if(s=n.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await ea(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=n.insert("g").attr("class","label-group text"),await ea(h,e,0,["font-weight: bolder"]);let f=h.node().getBBox();g=f.height,o=n.insert("g").attr("class","members-group text");let w=0;for(let t of e.members){let e=await ea(o,t,w,[t.parseClassifier()]);w+=e+r}(y=o.node().getBBox().height)<=0&&(y=i/2),d=n.insert("g").attr("class","methods-group text");let p=0;for(let t of e.methods){let e=await ea(d,t,p,[t.parseClassifier()]);p+=e+r}let m=n.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-f.width/2}, ${c})`),m=n.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*i})`),m=n.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(y?y+4*i:2*i)})`),m=n.node().getBBox(),{shapeSvg:n,bbox:m}}async function ea(t,e,a,l=[]){let i,n=t.insert("g").attr("class","label").attr("style",l.join("; ")),o=(0,h.zj)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,h._3)(o.htmlLabels)??!0,y="";y="text"in e?e.text:e.label,!g&&y.startsWith("\\")&&(y=y.substring(1)),(0,h.Wi)(y)&&(g=!0);let f=await (0,r.G)(n,(0,h.oB)((0,s.Sm)(y)),{width:(0,s.Un)(y,o)+50,classes:"markdown-node-label",useHtmlLabels:g},o),w=1;if(g){let t=f.children[0],e=(0,c.Ltv)(f);w=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(w+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===y.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function l(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(o.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,d.K)(l,"setupImage"),setTimeout(()=>{e.complete&&l()}),e.addEventListener("error",l),e.addEventListener("load",l)})))}i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}else{l.includes("font-weight: bolder")&&(0,c.Ltv)(f).selectAll("tspan").attr("font-weight",""),w=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes("&gt"))&&(t.textContent=y[0]+y.substring(1).replaceAll("&gt;",">").replaceAll("&lt;","<").trim()," "===y[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),i=f.getBBox()}return n.attr("transform","translate(0,"+(-i.height/(2*w)+a)+")"),i.height}async function el(t,e){let a=(0,h.D7)(),{themeVariables:i}=a,{useGradient:r}=i,n=a.class.padding??12,s=e.useHtmlLabels??(0,h._3)(a.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:o,bbox:d}=await ee(t,e,a,s,n),{labelStyles:y,nodeStyles:f}=(0,l.GX)(e);e.labelStyle=y,e.cssStyles=e.styles||"";let u=e.styles?.join(";")||f||"";e.cssStyles||(e.cssStyles=u.replaceAll("!important","").split(";"));let p=0===e.members.length&&0===e.methods.length&&!a.class?.hideEmptyMembersBox,m=g.A.svg(o),x=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let $=Math.max(e.width??0,d.width),k=Math.max(e.height??0,d.height),D=(e.height??0)>d.height;0===e.members.length&&0===e.methods.length?k+=n:e.members.length>0&&0===e.methods.length&&(k+=2*n);let S=-$/2,M=-k/2,A=p?2*n:0===e.members.length&&0===e.methods.length?-n:0;D&&(A=2*n);let v=m.rectangle(S-n,M-n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0),$+2*n,k+2*n+A,x),K=o.insert(()=>v,":first-child");K.attr("class","basic label-container outer-path");let B=K.node().getBBox(),C=o.select(".annotation-group").node().getBBox().height-(p?n/2:0)||0,N=o.select(".label-group").node().getBBox().height-(p?n/2:0)||0,R=o.select(".members-group").node().getBBox().height-(p?n/2:0)||0,L=(C+N+M+n-(M-n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0)))/2;if(o.selectAll(".text").each((t,l,i)=>{let r=(0,c.Ltv)(i[l]),h=r.attr("transform"),d=0;if(h){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(h);t&&(d=parseFloat(t[2]))}let g=d+M+n-(p?n:0===e.members.length&&0===e.methods.length?-n/2:0);if(r.attr("class").includes("methods-group")){let t=Math.max(R,n/2);g=D?Math.max(L,C+N+t+M+2*n+n)+2*n:C+N+t+M+4*n+n}0===e.members.length&&0===e.methods.length&&a.class?.hideEmptyMembersBox&&(g=e.annotations.length>0?d-n:d),s||(g-=4);let y=S;(r.attr("class").includes("label-group")||r.attr("class").includes("annotation-group"))&&(y=-r.node()?.getBBox().width/2||0,o.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(y=0)})),r.attr("transform",`translate(${y}, ${g})`)}),e.members.length>0||e.methods.length>0||p){let t=C+N+M+n,a=m.line(B.x,t,B.x+B.width,t+.001,x);o.insert(()=>a).attr("class",`divider${"neo"===e.look&&!r?" neo-line":""}`).attr("style",u)}if(p||e.members.length>0||e.methods.length>0){let t=C+N+R+M+2*n+n,a=m.line(B.x,D?Math.max(L,t):t,B.x+B.width,(D?Math.max(L,t):t)+.001,x);o.insert(()=>a).attr("class",`divider${"neo"===e.look&&!r?" neo-line":""}`).attr("style",u)}if("handDrawn"!==e.look&&o.selectAll("path").attr("style",u),K.select(":nth-child(2)").attr("style",u),o.selectAll(".divider").select("path").attr("style",u),e.labelStyle?o.selectAll("span").attr("style",e.labelStyle):o.selectAll("span").attr("style",u),!s){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(u);if(e){let t=e[0].replace("color","fill");o.selectAll("tspan").attr("style",t)}else if(y){let e=t.exec(y);if(e){let t=e[0].replace("color","fill");o.selectAll("tspan").attr("style",t)}}}return w(e,K),e.intersect=function(t){return b(e,t)},o}async function ei(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let n="verifyMethod"in e,s=u(e),{themeVariables:o}=(0,h.D7)(),{borderColorArray:d,requirementEdgeLabelBackground:y}=o,f=t.insert("g").attr("class",s).attr("id",e.domId??e.id),p=a=n?await er(f,`&lt;&lt;${e.type}&gt;&gt;`,0,e.labelStyle):await er(f,"&lt;&lt;Element&gt;&gt;",0,e.labelStyle),m=await er(f,e.name,p,e.labelStyle+"; font-weight: bold;");if(p+=m+20,n){let t=await er(f,`${e.requirementId?`ID: ${e.requirementId}`:""}`,p,e.labelStyle);p+=t;let a=await er(f,`${e.text?`Text: ${e.text}`:""}`,p,e.labelStyle);p+=a;let l=await er(f,`${e.risk?`Risk: ${e.risk}`:""}`,p,e.labelStyle);p+=l,await er(f,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,p,e.labelStyle)}else{let t=await er(f,`${e.type?`Type: ${e.type}`:""}`,p,e.labelStyle);p+=t,await er(f,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,p,e.labelStyle)}let x=(f.node()?.getBBox().width??200)+20,$=(f.node()?.getBBox().height??200)+20,k=-x/2,D=-$/2,S=g.A.svg(f),M=(0,l.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let A=S.rectangle(k,D,x,$,M),v=f.insert(()=>A,":first-child");if(v.attr("class","basic label-container outer-path").attr("style",r),d?.length){let t=e.colorIndex??0;f.attr("data-color-id",`color-${t%d.length}`)}if(f.selectAll(".label").each((t,e,a)=>{let l=(0,c.Ltv)(a[e]),i=l.attr("transform"),r=0,n=0;if(i){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);t&&(r=parseFloat(t[1]),n=parseFloat(t[2]))}let s=n-$/2,h=k+10;(0===e||1===e)&&(h=r),l.attr("transform",`translate(${h}, ${s+20})`)}),p>a+m+20){let t,l=D+a+m+20;if("neo"===e.look){let e=[[k,l],[k+x,l],[k+x,l+.001],[k,l+.001]];t=S.polygon(e,M)}else t=S.line(k,l,k+x,l,M);f.insert(()=>t).attr("class","divider")}return w(e,v),e.intersect=function(t){return b(e,t)},r&&"handDrawn"!==e.look&&(y||d?.length)&&f.selectAll("path").attr("style",r),f}async function er(t,e,a,l=""){let i;if(""===e)return 0;let n=t.insert("g").attr("class","label").attr("style",l),o=(0,h.D7)(),d=o.htmlLabels??!0,g=await (0,r.G)(n,(0,h.oB)((0,s.Sm)(e)),{width:(0,s.Un)(e,o)+50,classes:"markdown-node-label",useHtmlLabels:d,style:l},o);if(d){let t=g.children[0],e=(0,c.Ltv)(g);i=t.getBoundingClientRect(),e.attr("width",i.width),e.attr("height",i.height)}else{for(let t of g.children[0].children)l&&t.setAttribute("style",l);i=g.getBBox(),i.height+=6}return n.attr("transform",`translate(${-i.width/2},${-i.height/2+a})`),i.height}(0,d.K)(t6,"erBox"),(0,d.K)(t9,"addText"),(0,d.K)(et,"lineToPolygon"),(0,d.K)(ee,"textHelper"),(0,d.K)(ea,"addText"),(0,d.K)(el,"classBox"),(0,d.K)(ei,"requirementBox"),(0,d.K)(er,"addText");var en=(0,d.K)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function es(t,e,{config:a}){let i,r,n,s,{labelStyles:h,nodeStyles:o}=(0,l.GX)(e);e.labelStyle=h||"";let d=e.width;e.width=(e.width??200)-10;let{shapeSvg:c,bbox:p,label:m}=await y(t,e,u(e)),x=e.padding||10,$="";"ticket"in e&&e.ticket&&a?.kanban?.ticketBaseUrl&&($=a?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),i=c.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",$).attr("target","_blank"));let k={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};i?{label:r,bbox:n}=await f(i,"ticket"in e&&e.ticket||"",k):{label:r,bbox:n}=await f(c,"ticket"in e&&e.ticket||"",k);let{label:S,bbox:M}=await f(c,"assigned"in e&&e.assigned||"",k);e.width=d;let A=e?.width||0,v=Math.max(n.height,M.height)/2,K=Math.max(p.height+20,e?.height||0)+v,B=-A/2,C=-K/2;m.attr("transform","translate("+(x-A/2)+", "+(-v-p.height/2)+")"),r.attr("transform","translate("+(x-A/2)+", "+(-v+p.height/2)+")"),S.attr("transform","translate("+(x+A/2-M.width-20)+", "+(-v+p.height/2)+")");let{rx:N,ry:R}=e,{cssStyles:L}=e;if("handDrawn"===e.look){let t=g.A.svg(c),a=(0,l.Fr)(e,{}),i=N||R?t.path(D(B,C,A,K,N||0),a):t.rectangle(B,C,A,K,a);(s=c.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",L||null)}else{(s=c.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",N??5).attr("ry",R??5).attr("x",B).attr("y",C).attr("width",A).attr("height",K);let t="priority"in e&&e.priority;if(t){let e=c.append("line"),a=B+2,l=C+Math.floor((N??0)/2),i=C+K-Math.floor((N??0)/2);e.attr("x1",a).attr("y1",l).attr("x2",a).attr("y2",i).attr("stroke-width","4").attr("stroke",en(t))}}return w(e,s),e.height=K,e.intersect=function(t){return b(e,t)},c}async function eh(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let{shapeSvg:n,bbox:h,halfPadding:d,label:c}=await y(t,e,u(e)),f=h.width+10*d,p=h.height+8*d,m=.15*f,{cssStyles:x}=e,$=h.width+20,k=h.height+20,D=Math.max(f,$),S=Math.max(p,k);c.attr("transform",`translate(${-h.width/2}, ${-h.height/2})`);let M=`M0 0
11
- a${m},${m} 1 0,0 ${.25*D},${-1*S*.1}
12
- a${m},${m} 1 0,0 ${.25*D},0
13
- a${m},${m} 1 0,0 ${.25*D},0
14
- a${m},${m} 1 0,0 ${.25*D},${.1*S}
15
-
16
- a${m},${m} 1 0,0 ${.15*D},${.33*S}
17
- a${.8*m},${.8*m} 1 0,0 0,${.34*S}
18
- a${m},${m} 1 0,0 ${-1*D*.15},${.33*S}
19
-
20
- a${m},${m} 1 0,0 ${-1*D*.25},${.15*S}
21
- a${m},${m} 1 0,0 ${-1*D*.25},0
22
- a${m},${m} 1 0,0 ${-1*D*.25},0
23
- a${m},${m} 1 0,0 ${-1*D*.25},${-1*S*.15}
24
-
25
- a${m},${m} 1 0,0 ${-1*D*.1},${-1*S*.33}
26
- a${.8*m},${.8*m} 1 0,0 0,${-1*S*.34}
27
- a${m},${m} 1 0,0 ${.1*D},${-1*S*.33}
28
- H0 V0 Z`;if("handDrawn"===e.look){let t=g.A.svg(n),i=(0,l.Fr)(e,{}),r=t.path(M,i);(a=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(x))}else a=n.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",M);return a.attr("transform",`translate(${-D/2}, ${-S/2})`),w(e,a),e.calcIntersect=function(t,e){return b(t,e)},e.intersect=function(t){return o.R.info("Bang intersect",e,t),b(e,t)},n}async function eo(t,e){let a,{labelStyles:i,nodeStyles:r}=(0,l.GX)(e);e.labelStyle=i;let{shapeSvg:n,bbox:h,halfPadding:d,label:c}=await y(t,e,u(e)),f=h.width+2*d,p=h.height+2*d,m=.15*f,x=.25*f,$=.35*f,k=.2*f,{cssStyles:D}=e,S=`M0 0
29
- a${m},${m} 0 0,1 ${.25*f},${-1*f*.1}
30
- a${$},${$} 1 0,1 ${.4*f},${-1*f*.1}
31
- a${x},${x} 1 0,1 ${.35*f},${.2*f}
32
-
33
- a${m},${m} 1 0,1 ${.15*f},${.35*p}
34
- a${k},${k} 1 0,1 ${-1*f*.15},${.65*p}
35
-
36
- a${x},${m} 1 0,1 ${-1*f*.25},${.15*f}
37
- a${$},${$} 1 0,1 ${-1*f*.5},0
38
- a${m},${m} 1 0,1 ${-1*f*.25},${-1*f*.15}
39
-
40
- a${m},${m} 1 0,1 ${-1*f*.1},${-1*p*.35}
41
- a${k},${k} 1 0,1 ${.1*f},${-1*p*.65}
42
- H0 V0 Z`;if("handDrawn"===e.look){let t=g.A.svg(n),i=(0,l.Fr)(e,{}),r=t.path(S,i);(a=n.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(D))}else a=n.insert("path",":first-child").attr("class","basic label-container").attr("style",r).attr("d",S);return c.attr("transform",`translate(${-h.width/2}, ${-h.height/2})`),a.attr("transform",`translate(${-f/2}, ${-p/2})`),w(e,a),e.calcIntersect=function(t,e){return b(t,e)},e.intersect=function(t){return o.R.info("Cloud intersect",e,t),b(e,t)},n}async function ed(t,e){let{labelStyles:a,nodeStyles:i}=(0,l.GX)(e);e.labelStyle=a;let{shapeSvg:r,bbox:n,halfPadding:s,label:h}=await y(t,e,u(e)),o=n.width+8*s,d=n.height+2*s,c="neo"===e.look?`
43
- M${-o/2} ${d/2-5}
44
- v${-d+10}
45
- q0,-5 5,-5
46
- h${o-10}
47
- q5,0 5,5
48
- v${d-5}
49
- H${-o/2}
50
- Z
51
- `:`
52
- M${-o/2} ${d/2-5}
53
- v${-d+10}
54
- q0,-5 5,-5
55
- h${o-10}
56
- q5,0 5,5
57
- v${d-10}
58
- q0,5 -5,5
59
- h${-(o-10)}
60
- q-5,0 -5,-5
61
- Z
62
- `;if(!e.domId)throw Error(`defaultMindmapNode: node "${e.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let g=r.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",i).attr("d",c);return r.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-n.width/2}, ${-n.height/2})`),r.append(()=>h.node()),w(e,g),e.calcIntersect=function(t,e){return b(t,e)},e.intersect=function(t){return b(e,t)},r}async function ec(t,e){let a={padding:e.padding??0};return _(t,e,a)}(0,d.K)(es,"kanbanItem"),(0,d.K)(eh,"bang"),(0,d.K)(eo,"cloud"),(0,d.K)(ed,"defaultMindmapNode"),(0,d.K)(ec,"mindmapCircle");var eg=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:tW},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:tI},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:tH},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:tz},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:ti},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:tn},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:_},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:eh},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:eo},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:tP},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tf},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:tS},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:tD},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:t0},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:tb},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:th},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:tY},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:j},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tE},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:t_},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:tq},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tc},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tw},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Y},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:U},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Q},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:tM},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:t5},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:tg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:tQ},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tB},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tt},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:ts},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:t1},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:t3},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:to},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:t2},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:td},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:tT},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:tR},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:tN},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:W},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:O},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:tZ},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:tO},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:t8},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:tX},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:tC}],ey=(0,d.K)(()=>Object.fromEntries([...Object.entries({state:tj,choice:q,note:tL,rectWithTitle:tG,labelRect:tk,iconSquare:tx,iconCircle:tp,icon:tu,iconRounded:tm,imageSquare:t$,anchor:I,kanbanItem:es,mindmapCircle:ec,defaultMindmapNode:ed,classBox:el,erBox:t6,requirementBox:ei}),...eg.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function ef(t){return t in ey}(0,d.K)(ef,"isValidShape");var ew=new Map;async function eu(t,e,a){let l,i;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let r=e.shape?ey[e.shape]:void 0;if(!r)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let n;"sandbox"===a.config.securityLevel?n="_top":e.linkTarget&&(n=e.linkTarget||"_blank"),l=t.insert("svg:a").attr("xlink:href",e.link).attr("target",n??null),i=await r(l,e,a)}else l=i=await r(t,e,a);return l.attr("data-look",(0,s.KL)(e.look)),e.tooltip&&i.attr("title",e.tooltip),ew.set(e.id,l),e.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,d.K)(eu,"insertNode");var ep=(0,d.K)((t,e)=>{ew.set(e.id,t)},"setNodeElem"),em=(0,d.K)(()=>{ew.clear()},"clear"),ex=(0,d.K)(t=>{let e=ew.get(t.id);o.R.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode")}}]);