elanous 0.3.3 → 0.3.5

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 (708) hide show
  1. package/apps/pwa/out/404/index.html +1 -1
  2. package/apps/pwa/out/404.html +1 -1
  3. package/apps/pwa/out/_next/static/chunks/{6fa80ede.7b05276e6be12b1d.js → 01af03c4.71e22e1e1aca813e.js} +1 -1
  4. package/apps/pwa/out/_next/static/chunks/0e3e9261.84afa98360d3b889.js +1 -0
  5. package/apps/pwa/out/_next/static/chunks/1163.de587836684ae0e8.js +74 -0
  6. package/apps/pwa/out/_next/static/chunks/124-5c8fb000f2fef6fd.js +1 -0
  7. package/apps/pwa/out/_next/static/chunks/147.48bf376824f7df0a.js +8 -0
  8. package/apps/pwa/out/_next/static/chunks/1623-0cd4aabb94e3fc0d.js +1 -0
  9. package/apps/pwa/out/_next/static/chunks/1689-5ee3c3dd16ab8667.js +1 -0
  10. package/apps/pwa/out/_next/static/chunks/1783.708de9a0182ac571.js +41 -0
  11. package/apps/pwa/out/_next/static/chunks/1807-778f3031dc089a09.js +1 -0
  12. package/apps/pwa/out/_next/static/chunks/{5892-6f0a1ee3c6c38173.js → 1911-bc30f2d39d2b318e.js} +3 -3
  13. package/apps/pwa/out/_next/static/chunks/1968.4f77d6f940c26d94.js +1 -0
  14. package/apps/pwa/out/_next/static/chunks/1985.ab97a36d1b3a9458.js +36 -0
  15. package/apps/pwa/out/_next/static/chunks/2169.709268f6190a67e4.js +1 -0
  16. package/apps/pwa/out/_next/static/chunks/2215.90b2a595c9880580.js +1 -0
  17. package/apps/pwa/out/_next/static/chunks/2233.061c80f2a79abb24.js +1 -0
  18. package/apps/pwa/out/_next/static/chunks/2466.ff652b24ae9dee2a.js +32 -0
  19. package/apps/pwa/out/_next/static/chunks/2541-70d25b112ae1960d.js +1 -0
  20. package/apps/pwa/out/_next/static/chunks/2556-14a3c1858511d4b2.js +1 -0
  21. package/apps/pwa/out/_next/static/chunks/{6764.ec2d2cf14278c473.js → 259.ff45e655e5e41a4d.js} +16 -16
  22. package/apps/pwa/out/_next/static/chunks/2592.cc0b9dc547aca123.js +104 -0
  23. package/apps/pwa/out/_next/static/chunks/2708-f51dd5bc56aed2a7.js +1 -0
  24. package/apps/pwa/out/_next/static/chunks/2845ea08.c590f5c7ddc06b98.js +122 -0
  25. package/apps/pwa/out/_next/static/chunks/2856-d3c6d2706d6cc45e.js +1 -0
  26. package/apps/pwa/out/_next/static/chunks/2883-5b4aaa3950d416c2.js +1 -0
  27. package/apps/pwa/out/_next/static/chunks/{6355.34fd60aca3e95acf.js → 2999.c462d95ab66dba3a.js} +1 -1
  28. package/apps/pwa/out/_next/static/chunks/{d7c7394d.c015f14113d7faef.js → 2c8c2385.34ce9456dac99420.js} +1 -1
  29. package/apps/pwa/out/_next/static/chunks/3085.59001f746a9a2e8c.js +1 -0
  30. package/apps/pwa/out/_next/static/chunks/3162-94995e3e8f1524f3.js +1 -0
  31. package/apps/pwa/out/_next/static/chunks/3176.fcf82fd6b3fcfff5.js +1 -0
  32. package/apps/pwa/out/_next/static/chunks/{1695-e63446cc38743225.js → 3177-151f3b49f3b2d2ef.js} +1 -1
  33. package/apps/pwa/out/_next/static/chunks/3196.4d0730f411899434.js +1 -0
  34. package/apps/pwa/out/_next/static/chunks/{4935.7f5b0bd162f201cc.js → 3235.7b9c3e9c55ea6d98.js} +1 -1
  35. package/apps/pwa/out/_next/static/chunks/3414-037ce9f127904fe2.js +1 -0
  36. package/apps/pwa/out/_next/static/chunks/348.b77e8e6b6ed5230c.js +1 -0
  37. package/apps/pwa/out/_next/static/chunks/3483-f7f5f9a66e1780ad.js +1 -0
  38. package/apps/pwa/out/_next/static/chunks/3501.d2b92806ac1d949e.js +287 -0
  39. package/apps/pwa/out/_next/static/chunks/3552.e6be7ac885976039.js +1 -0
  40. package/apps/pwa/out/_next/static/chunks/366-eb724714d15eb3f4.js +1 -0
  41. package/apps/pwa/out/_next/static/chunks/3700.422355522e15e182.js +2 -0
  42. package/apps/pwa/out/_next/static/chunks/3789.443ac3d6037b503c.js +1 -0
  43. package/apps/pwa/out/_next/static/chunks/4278.5624379f0c23ee3d.js +1 -0
  44. package/apps/pwa/out/_next/static/chunks/4365-9e2bea90e6243b8e.js +1 -0
  45. package/apps/pwa/out/_next/static/chunks/4388.42598a55da8c47cf.js +1 -0
  46. package/apps/pwa/out/_next/static/chunks/4530.3a14a074896302f2.js +1 -0
  47. package/apps/pwa/out/_next/static/chunks/4557-3b576c4706df592d.js +1 -0
  48. package/apps/pwa/out/_next/static/chunks/{2538.f7b0fd1f3b0c2bff.js → 4647.a6e02754d5dcf398.js} +1 -1
  49. package/apps/pwa/out/_next/static/chunks/4793-a77c3acf9ffc4454.js +1 -0
  50. package/apps/pwa/out/_next/static/chunks/4806.d7a41078ec5f9e6f.js +1 -0
  51. package/apps/pwa/out/_next/static/chunks/4881.ad56fcbdcfb39a23.js +1 -0
  52. package/apps/pwa/out/_next/static/chunks/4983.cb812be748dd07e5.js +1 -0
  53. package/apps/pwa/out/_next/static/chunks/5054.cef07be26f74f202.js +1 -0
  54. package/apps/pwa/out/_next/static/chunks/5075.b30af8ae9aadc959.js +226 -0
  55. package/apps/pwa/out/_next/static/chunks/{8108.2cd332dff4f07acd.js → 5323.277ad337906fe70a.js} +3 -3
  56. package/apps/pwa/out/_next/static/chunks/5464-5837a4fba34df983.js +1 -0
  57. package/apps/pwa/out/_next/static/chunks/5535-3d077c5296902ba6.js +1 -0
  58. package/apps/pwa/out/_next/static/chunks/{1549.81d2a59aa303b629.js → 5640.b32a01e556340532.js} +2 -2
  59. package/apps/pwa/out/_next/static/chunks/5654.1b52dfa2ffb08352.js +1 -0
  60. package/apps/pwa/out/_next/static/chunks/6.aa2a99e9454c9a8d.js +1 -0
  61. package/apps/pwa/out/_next/static/chunks/6208.70eba139a9c68af3.js +1 -0
  62. package/apps/pwa/out/_next/static/chunks/{448.26b198f3b58cbcf9.js → 6251.a547705e850c5149.js} +2 -2
  63. package/apps/pwa/out/_next/static/chunks/6253.d4f0940b616f889d.js +1 -0
  64. package/apps/pwa/out/_next/static/chunks/6281-8492f70e843316fa.js +1 -0
  65. package/apps/pwa/out/_next/static/chunks/6289-3c8732cbeeeb62a2.js +1 -0
  66. package/apps/pwa/out/_next/static/chunks/6332-d5edcc5c35500524.js +1 -0
  67. package/apps/pwa/out/_next/static/chunks/6433.e0006a1e924a2131.js +1 -0
  68. package/apps/pwa/out/_next/static/chunks/6437.3cd4d04efb8ab871.js +286 -0
  69. package/apps/pwa/out/_next/static/chunks/6461-5584cf24a661817a.js +1 -0
  70. package/apps/pwa/out/_next/static/chunks/6618-9b8d9a46ede0c41e.js +1 -0
  71. package/apps/pwa/out/_next/static/chunks/6715-f1316dd169ff9f50.js +1 -0
  72. package/apps/pwa/out/_next/static/chunks/6735-e62669175cce8686.js +1 -0
  73. package/apps/pwa/out/_next/static/chunks/{4578.04c77c13e3c62361.js → 6841.ed452e7d06f598ee.js} +1 -1
  74. package/apps/pwa/out/_next/static/chunks/6937.0bdc3185f2ace9e4.js +79 -0
  75. package/apps/pwa/out/_next/static/chunks/{922c23f1.797bdf68f73f0488.js → 6c25ab46.9d19c4994d7f5495.js} +1 -1
  76. package/apps/pwa/out/_next/static/chunks/7015-6abc8f1809ff071f.js +1 -0
  77. package/apps/pwa/out/_next/static/chunks/7056-c994bfc3e3701439.js +1 -0
  78. package/apps/pwa/out/_next/static/chunks/712-4496b0c3ac3e4b75.js +1 -0
  79. package/apps/pwa/out/_next/static/chunks/7151.d2511e5f23155242.js +1 -0
  80. package/apps/pwa/out/_next/static/chunks/7228.8cb7ac9d98e331d5.js +34 -0
  81. package/apps/pwa/out/_next/static/chunks/725.63b4017563b04379.js +93 -0
  82. package/apps/pwa/out/_next/static/chunks/{5456-e9f9027af2bb4799.js → 7250-70e47260b60cd47e.js} +1 -1
  83. package/apps/pwa/out/_next/static/chunks/7263-34fefd269746719c.js +1 -0
  84. package/apps/pwa/out/_next/static/chunks/{3130.69315cfa410b3cc7.js → 7663.e4ea6f8c14df314c.js} +1 -1
  85. package/apps/pwa/out/_next/static/chunks/77.b432098b663eb23e.js +1 -0
  86. package/apps/pwa/out/_next/static/chunks/{2987.f36195bfacdbcc4e.js → 770.f7b4481b25fe01c4.js} +2 -2
  87. package/apps/pwa/out/_next/static/chunks/7746.c8b9b75e18472c54.js +115 -0
  88. package/apps/pwa/out/_next/static/chunks/{1004.b334bd3d776bd455.js → 7923.35fed012b66d1420.js} +3 -3
  89. package/apps/pwa/out/_next/static/chunks/7959.4e02edd1fdf86b05.js +1 -0
  90. package/apps/pwa/out/_next/static/chunks/7974-b134a047264b1e55.js +1 -0
  91. package/apps/pwa/out/_next/static/chunks/8089-c13a0ed6973e7490.js +1 -0
  92. package/apps/pwa/out/_next/static/chunks/8101.31728c5a01a6167b.js +77 -0
  93. package/apps/pwa/out/_next/static/chunks/8231.297058c760d62aee.js +1 -0
  94. package/apps/pwa/out/_next/static/chunks/8389.af75612ea24ceba6.js +24 -0
  95. package/apps/pwa/out/_next/static/chunks/8427.085d79f7afbb3825.js +149 -0
  96. package/apps/pwa/out/_next/static/chunks/8473.20a465ef76441b50.js +1 -0
  97. package/apps/pwa/out/_next/static/chunks/8541.3a501dabd3140fd0.js +1 -0
  98. package/apps/pwa/out/_next/static/chunks/8739-f0deba2b3e06427c.js +1 -0
  99. package/apps/pwa/out/_next/static/chunks/8818.02938c951b1000d1.js +94 -0
  100. package/apps/pwa/out/_next/static/chunks/8846.3103ace634243ee8.js +64 -0
  101. package/apps/pwa/out/_next/static/chunks/8847.72b1b3e33bcad95a.js +1 -0
  102. package/apps/pwa/out/_next/static/chunks/8883-30b5a763ec36eafa.js +1 -0
  103. package/apps/pwa/out/_next/static/chunks/{7644.bdbfed1da174219e.js → 9052.0be41f794a5fb029.js} +2 -2
  104. package/apps/pwa/out/_next/static/chunks/9086.b691a72402d521d5.js +27 -0
  105. package/apps/pwa/out/_next/static/chunks/9133.0be4ebb6c50cd78a.js +1 -0
  106. package/apps/pwa/out/_next/static/chunks/916.3a04c642f0e5ff90.js +1 -0
  107. package/apps/pwa/out/_next/static/chunks/9240.1637f5e69335d06b.js +62 -0
  108. package/apps/pwa/out/_next/static/chunks/9298-cd7b117f1a5be480.js +1 -0
  109. package/apps/pwa/out/_next/static/chunks/9340-c2ac8651b03e94b2.js +1 -0
  110. package/apps/pwa/out/_next/static/chunks/9376.35941fbddcbfe1d4.js +1 -0
  111. package/apps/pwa/out/_next/static/chunks/9424.9062e8119fae997a.js +24 -0
  112. package/apps/pwa/out/_next/static/chunks/9486.8ef4e64969908842.js +1 -0
  113. package/apps/pwa/out/_next/static/chunks/9488.98d1b3c092da470a.js +23 -0
  114. package/apps/pwa/out/_next/static/chunks/{4055-90325ff209cd557e.js → 9648-42f1d4648cfa7eb8.js} +1 -1
  115. package/apps/pwa/out/_next/static/chunks/9781-946d591f1e66da8d.js +1 -0
  116. package/apps/pwa/out/_next/static/chunks/9844.72bbf73fd214af65.js +90 -0
  117. package/apps/pwa/out/_next/static/chunks/9850.90badc8e9b213e5a.js +1 -0
  118. package/apps/pwa/out/_next/static/chunks/9868.027b845025f57183.js +1 -0
  119. package/apps/pwa/out/_next/static/chunks/9948-dbde92fff6625cad.js +1 -0
  120. package/apps/pwa/out/_next/static/chunks/9951-b903d4a257c01657.js +1 -0
  121. package/apps/pwa/out/_next/static/chunks/9ccc18c7-87a6c1410d97d560.js +1 -0
  122. package/apps/pwa/out/_next/static/chunks/{6cd6be76.9d27e7414d939d53.js → abec6764.4a84c474be416fb7.js} +1 -1
  123. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-a76e282302331a47.js +1 -0
  124. package/apps/pwa/out/_next/static/chunks/app/approvals/page-9c79d56c52c3b39c.js +1 -0
  125. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-cd45c61031d63214.js +1 -0
  126. package/apps/pwa/out/_next/static/chunks/app/board/page-e133c057c3c62663.js +1 -0
  127. package/apps/pwa/out/_next/static/chunks/app/botlab/{page-a447a17fd887c68e.js → page-89ff7827ff5f449f.js} +1 -1
  128. package/apps/pwa/out/_next/static/chunks/app/bots/page-0cd71686fa026045.js +1 -0
  129. package/apps/pwa/out/_next/static/chunks/app/ceo/page-a0b329a1295e9704.js +1 -0
  130. package/apps/pwa/out/_next/static/chunks/app/chat/page-f4b64283a86189e3.js +1 -0
  131. package/apps/pwa/out/_next/static/chunks/app/consult/page-c6567da3170d92b7.js +1 -0
  132. package/apps/pwa/out/_next/static/chunks/app/control/page-90bff14d4d1104a9.js +1 -0
  133. package/apps/pwa/out/_next/static/chunks/app/decisions/{page-79f9d6ae042c07b4.js → page-bc7f2d53539f1599.js} +1 -1
  134. package/apps/pwa/out/_next/static/chunks/app/design-check/page-51dd1cfa869e3e9e.js +1 -0
  135. package/apps/pwa/out/_next/static/chunks/app/editor/page-734e98ce83fcb338.js +1 -0
  136. package/apps/pwa/out/_next/static/chunks/app/exec/page-0dbd78003825005e.js +1 -0
  137. package/apps/pwa/out/_next/static/chunks/app/field/page-d716d9e3eebe01c9.js +1 -0
  138. package/apps/pwa/out/_next/static/chunks/app/healthz/route-a76e282302331a47.js +1 -0
  139. package/apps/pwa/out/_next/static/chunks/app/inside/page-35ac985a392a23da.js +1 -0
  140. package/apps/pwa/out/_next/static/chunks/app/intake/{page-66f0dc569bce5230.js → page-8169a6d36aca9d00.js} +1 -1
  141. package/apps/pwa/out/_next/static/chunks/app/layout-c07319ebc55c858f.js +1 -0
  142. package/apps/pwa/out/_next/static/chunks/app/live/page-e74b1236e3318957.js +1 -0
  143. package/apps/pwa/out/_next/static/chunks/app/live-run/{page-2a7c714e7f65229d.js → page-f2d9e65f2fa34919.js} +1 -1
  144. package/apps/pwa/out/_next/static/chunks/app/loops/page-e44e85553f3d1747.js +1 -0
  145. package/apps/pwa/out/_next/static/chunks/app/market/page-9786452dd87449f8.js +1 -0
  146. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-c01f73b8ca382e89.js +1 -0
  147. package/apps/pwa/out/_next/static/chunks/app/morning/page-4ba4b24fc4aa2262.js +1 -0
  148. package/apps/pwa/out/_next/static/chunks/app/not-found-e4f1cff672c21cf5.js +1 -0
  149. package/apps/pwa/out/_next/static/chunks/app/observatory/page-7408295e90c5f3da.js +1 -0
  150. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-5145d13713aa12ba.js +1 -0
  151. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-4b40d62f2182addf.js +1 -0
  152. package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-cbf974b1f9c988e2.js +1 -0
  153. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-e63ff6bd28f8c0c9.js +1 -0
  154. package/apps/pwa/out/_next/static/chunks/app/outputs/page-a9dd827a1ab83e4f.js +1 -0
  155. package/apps/pwa/out/_next/static/chunks/app/page-367850708c52c660.js +1 -0
  156. package/apps/pwa/out/_next/static/chunks/app/reflection/page-b1456fb9b51a4fd7.js +1 -0
  157. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-26867b3d37b1e7a8.js +1 -0
  158. package/apps/pwa/out/_next/static/chunks/app/sessions/{page-43c5d7004582f888.js → page-82c9de5c8c37b051.js} +1 -1
  159. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-7f03bb1e52c1a43d.js +1 -0
  160. package/apps/pwa/out/_next/static/chunks/app/settings/page-8b9f729cfc8ebc14.js +1 -0
  161. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-f2dec730b93abfab.js +1 -0
  162. package/apps/pwa/out/_next/static/chunks/app/setup/layout-a76e282302331a47.js +1 -0
  163. package/apps/pwa/out/_next/static/chunks/app/setup/page-fa6f33a05e473556.js +1 -0
  164. package/apps/pwa/out/_next/static/chunks/app/share/page-5e0e3113bfda415d.js +1 -0
  165. package/apps/pwa/out/_next/static/chunks/app/showroom/page-7864eff18ce702ba.js +1 -0
  166. package/apps/pwa/out/_next/static/chunks/app/tasks/page-e29cc254c3ee0054.js +1 -0
  167. package/apps/pwa/out/_next/static/chunks/app/term/page-cd2f7856a7dc4849.js +1 -0
  168. package/apps/pwa/out/_next/static/chunks/app/today/page-2de3d35eb5a86aae.js +1 -0
  169. package/apps/pwa/out/_next/static/chunks/app/trace/page-cdb70038ead4a184.js +1 -0
  170. package/apps/pwa/out/_next/static/chunks/app/vault/page-e093c97ee87aca70.js +1 -0
  171. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-fb97121241bc7cfc.js +1 -0
  172. package/apps/pwa/out/_next/static/chunks/app/workflows/page-3072b3b9e14ea04d.js +1 -0
  173. package/apps/pwa/out/_next/static/chunks/app/workspace/page-a976e10f6c3f82bd.js +1 -0
  174. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-dfbc7268ba631190.js +1 -0
  175. package/apps/pwa/out/_next/static/chunks/{49263d14.0a995d745de3f818.js → c9c445f7.15a7d747f61c56e6.js} +1 -1
  176. package/apps/pwa/out/_next/static/chunks/{57af6223.b79d56584a040f84.js → d1dc888b.cc6ca4afda9a5ef8.js} +1 -1
  177. package/apps/pwa/out/_next/static/chunks/dc5145c8.9547e252e2e1d3d1.js +1 -0
  178. package/apps/pwa/out/_next/static/chunks/e5a2a050-4b51c1f86f5cc4bb.js +1 -0
  179. package/apps/pwa/out/_next/static/chunks/framework-5a93f9a572271e1c.js +1 -0
  180. package/apps/pwa/out/_next/static/chunks/main-1c2ba214755ef1d0.js +1 -0
  181. package/apps/pwa/out/_next/static/chunks/main-app-55b1247a78f22727.js +1 -0
  182. package/apps/pwa/out/_next/static/chunks/pages/_app-239264d5fa7469e1.js +1 -0
  183. package/apps/pwa/out/_next/static/chunks/pages/_error-8184168567215c6b.js +1 -0
  184. package/apps/pwa/out/_next/static/chunks/webpack-0144ea4a99833df5.js +1 -0
  185. package/apps/pwa/out/_next/static/{K-ckEB9hu9tXQ6iqnl27L → iXeJzCRg0ENSSl_RTbGIN}/_buildManifest.js +1 -1
  186. package/apps/pwa/out/approvals/index.html +1 -1
  187. package/apps/pwa/out/approvals/index.txt +22 -22
  188. package/apps/pwa/out/autopilot/index.html +1 -1
  189. package/apps/pwa/out/autopilot/index.txt +22 -22
  190. package/apps/pwa/out/board/index.html +1 -1
  191. package/apps/pwa/out/board/index.txt +22 -22
  192. package/apps/pwa/out/botlab/index.html +1 -1
  193. package/apps/pwa/out/botlab/index.txt +21 -21
  194. package/apps/pwa/out/bots/index.html +1 -1
  195. package/apps/pwa/out/bots/index.txt +21 -21
  196. package/apps/pwa/out/ceo/index.html +1 -1
  197. package/apps/pwa/out/ceo/index.txt +22 -22
  198. package/apps/pwa/out/chat/index.html +1 -1
  199. package/apps/pwa/out/chat/index.txt +21 -21
  200. package/apps/pwa/out/consult/index.html +1 -1
  201. package/apps/pwa/out/consult/index.txt +22 -22
  202. package/apps/pwa/out/control/index.html +1 -1
  203. package/apps/pwa/out/control/index.txt +22 -22
  204. package/apps/pwa/out/decisions/index.html +1 -1
  205. package/apps/pwa/out/decisions/index.txt +21 -21
  206. package/apps/pwa/out/design-check/index.html +1 -1
  207. package/apps/pwa/out/design-check/index.txt +22 -22
  208. package/apps/pwa/out/editor/index.html +1 -1
  209. package/apps/pwa/out/editor/index.txt +22 -22
  210. package/apps/pwa/out/exec/index.html +1 -1
  211. package/apps/pwa/out/exec/index.txt +22 -22
  212. package/apps/pwa/out/field/index.html +1 -1
  213. package/apps/pwa/out/field/index.txt +22 -22
  214. package/apps/pwa/out/healthz +1 -1
  215. package/apps/pwa/out/index.html +1 -1
  216. package/apps/pwa/out/index.txt +21 -21
  217. package/apps/pwa/out/inside/index.html +1 -1
  218. package/apps/pwa/out/inside/index.txt +21 -21
  219. package/apps/pwa/out/intake/index.html +1 -1
  220. package/apps/pwa/out/intake/index.txt +22 -22
  221. package/apps/pwa/out/live/index.html +1 -1
  222. package/apps/pwa/out/live/index.txt +22 -22
  223. package/apps/pwa/out/live-run/index.html +1 -1
  224. package/apps/pwa/out/live-run/index.txt +22 -22
  225. package/apps/pwa/out/loops/index.html +1 -1
  226. package/apps/pwa/out/loops/index.txt +21 -21
  227. package/apps/pwa/out/market/index.html +1 -1
  228. package/apps/pwa/out/market/index.txt +21 -21
  229. package/apps/pwa/out/missions/placeholder/index.html +1 -1
  230. package/apps/pwa/out/missions/placeholder/index.txt +21 -21
  231. package/apps/pwa/out/morning/index.html +1 -1
  232. package/apps/pwa/out/morning/index.txt +22 -22
  233. package/apps/pwa/out/observatory/index.html +1 -1
  234. package/apps/pwa/out/observatory/index.txt +22 -22
  235. package/apps/pwa/out/ops/checklist/index.html +1 -1
  236. package/apps/pwa/out/ops/checklist/index.txt +21 -21
  237. package/apps/pwa/out/ops/release/index.html +1 -1
  238. package/apps/pwa/out/ops/release/index.txt +21 -21
  239. package/apps/pwa/out/ops/resources/index.html +1 -1
  240. package/apps/pwa/out/ops/resources/index.txt +21 -21
  241. package/apps/pwa/out/ops/seats/index.html +1 -1
  242. package/apps/pwa/out/ops/seats/index.txt +21 -21
  243. package/apps/pwa/out/outputs/index.html +1 -1
  244. package/apps/pwa/out/outputs/index.txt +21 -21
  245. package/apps/pwa/out/reflection/index.html +1 -1
  246. package/apps/pwa/out/reflection/index.txt +22 -22
  247. package/apps/pwa/out/scheduler/index.html +1 -1
  248. package/apps/pwa/out/scheduler/index.txt +22 -22
  249. package/apps/pwa/out/sessions/index.html +1 -1
  250. package/apps/pwa/out/sessions/index.txt +21 -21
  251. package/apps/pwa/out/settings/devices/index.html +1 -1
  252. package/apps/pwa/out/settings/devices/index.txt +22 -22
  253. package/apps/pwa/out/settings/index.html +1 -1
  254. package/apps/pwa/out/settings/index.txt +22 -22
  255. package/apps/pwa/out/setup/done/index.html +1 -1
  256. package/apps/pwa/out/setup/done/index.txt +22 -22
  257. package/apps/pwa/out/setup/index.html +1 -1
  258. package/apps/pwa/out/setup/index.txt +22 -22
  259. package/apps/pwa/out/share/index.html +1 -1
  260. package/apps/pwa/out/share/index.txt +22 -22
  261. package/apps/pwa/out/showroom/index.html +1 -1
  262. package/apps/pwa/out/showroom/index.txt +21 -21
  263. package/apps/pwa/out/tasks/index.html +1 -1
  264. package/apps/pwa/out/tasks/index.txt +22 -22
  265. package/apps/pwa/out/term/index.html +1 -1
  266. package/apps/pwa/out/term/index.txt +22 -22
  267. package/apps/pwa/out/today/index.html +1 -1
  268. package/apps/pwa/out/today/index.txt +22 -22
  269. package/apps/pwa/out/trace/index.html +1 -1
  270. package/apps/pwa/out/trace/index.txt +22 -22
  271. package/apps/pwa/out/vault/index.html +1 -1
  272. package/apps/pwa/out/vault/index.txt +22 -22
  273. package/apps/pwa/out/workflows/chat-ui/index.html +1 -1
  274. package/apps/pwa/out/workflows/chat-ui/index.txt +22 -22
  275. package/apps/pwa/out/workflows/index.html +1 -1
  276. package/apps/pwa/out/workflows/index.txt +22 -22
  277. package/apps/pwa/out/workspace/index.html +1 -1
  278. package/apps/pwa/out/workspace/index.txt +22 -22
  279. package/apps/pwa/out/worktrees/index.html +1 -1
  280. package/apps/pwa/out/worktrees/index.txt +22 -22
  281. package/bin/elanous.cjs +268 -64
  282. package/docs/goal-context/05-authoring-lessons.jsonl +5 -0
  283. package/graphs/implement-loop.yaml +1 -0
  284. package/graphs/natural-language-research.yaml +22 -1
  285. package/package.json +4 -3
  286. package/scripts/audit-test-state-writes.ts +2 -2
  287. package/scripts/data-diet-14d-gc.ts +568 -0
  288. package/scripts/generate-sim-world-device-catalogs.ts +28 -0
  289. package/scripts/install.sh +9 -12
  290. package/scripts/npm-postinstall.cjs +68 -0
  291. package/scripts/public-export.ts +63 -7
  292. package/scripts/release-loop/cut-branch.ts +2 -1
  293. package/scripts/release-loop/export-check-node.ts +7 -1
  294. package/scripts/release-loop/gate-node.ts +47 -31
  295. package/scripts/release-loop/gate-pr-cache.ts +7 -2
  296. package/scripts/release-loop/gate-radius-live.ts +19 -5
  297. package/scripts/release-loop/node-verdict.ts +3 -1
  298. package/scripts/release-loop/pwa-scenarios-node.ts +3 -3
  299. package/scripts/release-loop/resume-release.ts +18 -1
  300. package/scripts/review-model-ab.ts +48 -4
  301. package/scripts/sim-world-runner.ts +2 -1
  302. package/scripts/test-deterministic.ts +32 -3
  303. package/scripts/tree-sync-decide.ts +3 -1
  304. package/scripts/triage-open-drafts.py +41 -8
  305. package/scripts/ux-sim-merge-driver.mjs +28 -60
  306. package/scripts/ux-sim.ts +8 -1
  307. package/scripts/warm-pool-provider-config.ts +11 -1
  308. package/src/acp/core-turn-bridge.ts +4 -4
  309. package/src/acp/multi-llm-bridge.ts +2 -4
  310. package/src/acp/server.ts +105 -107
  311. package/src/ad-pipeline/higgsfield-backend.ts +4 -1
  312. package/src/agent/agent-output-tool.ts +3 -0
  313. package/src/agent/monad-agent-turn.ts +1 -1
  314. package/src/agent-mission/driver.ts +31 -5
  315. package/src/aside/remote-targets.ts +234 -0
  316. package/src/auto-research/research-turn.ts +2 -0
  317. package/src/autopilot/elanous-builtin-runner.ts +1 -1
  318. package/src/autopilot/mission-hitl-callback.ts +6 -1
  319. package/src/autopilot/pr-manager.ts +23 -4
  320. package/src/boot/daemon-prompt-turn.ts +1 -1
  321. package/src/boot/daemon-runtime.ts +1 -1
  322. package/src/boot/daemon-tools/self-implement.ts +75 -13
  323. package/src/capture/encoders/png.ts +2 -1
  324. package/src/chat/index.ts +0 -1
  325. package/src/cli/app-cli.ts +40 -0
  326. package/src/cli/doctor-cli.ts +77 -2
  327. package/src/cli/doctor-readiness.ts +3 -0
  328. package/src/cli/log-event-names.ts +1 -0
  329. package/src/cli/logs-cli.ts +11 -0
  330. package/src/cli/logs-warm-reuse-stats.ts +76 -0
  331. package/src/cli/msg-cli.ts +13 -7
  332. package/src/cli/pr-cli.ts +312 -17
  333. package/src/cli/pr-land-conflict-merge.ts +253 -0
  334. package/src/cli/pr-land-drift-repair.ts +298 -0
  335. package/src/cli/pr-land-heavy-remote.ts +99 -0
  336. package/src/cli/pr-land-overlap-evidence.ts +207 -13
  337. package/src/cli/pr-land-refusal.ts +21 -8
  338. package/src/cli/release-cli.ts +4 -3
  339. package/src/cli/repo-cli.ts +3 -2
  340. package/src/cli/resource-ledger-cli.ts +10 -1
  341. package/src/cli/review-typefix-carry.ts +452 -0
  342. package/src/cli/secret-cli.test-helpers.ts +9 -0
  343. package/src/cli/secret-cli.ts +294 -1
  344. package/src/cli/sim-cli.ts +94 -0
  345. package/src/cli/tasks-cli.ts +23 -8
  346. package/src/compact/archive.ts +6 -0
  347. package/src/compact/tool-output-budget.ts +33 -24
  348. package/src/control-plane/ledger.ts +47 -0
  349. package/src/control-plane/server.ts +32 -2
  350. package/src/core-turn/run-goal-loop.ts +1 -1
  351. package/src/dashboard/acp-boot.ts +8 -8
  352. package/src/dashboard/index.ts +7 -337
  353. package/src/dashboard/slash-runtime/dashboard-handlers.ts +2 -18
  354. package/src/dashboard/slash-runtime/help-groups.ts +1 -1
  355. package/src/dashboard/slash-runtime/index.ts +0 -6
  356. package/src/dashboard/turn-preamble.ts +4 -5
  357. package/src/debug/log.ts +4 -2
  358. package/src/extractors.ts +4 -2
  359. package/src/hq/promote.ts +12 -0
  360. package/src/hq/seats.ts +173 -3
  361. package/src/hq/transfer.ts +18 -0
  362. package/src/image/utils.ts +7 -1
  363. package/src/index.ts +27 -12
  364. package/src/kgp/pipeline.ts +2 -1
  365. package/src/llm.ts +86 -2
  366. package/src/loops/orchestrator/inbox-once.ts +2 -3
  367. package/src/maturity/feature-maturity.ts +2 -3
  368. package/src/mcp/server.ts +4 -4
  369. package/src/msg/msg-store.ts +98 -12
  370. package/src/nexus/api/agent-cli.ts +1 -1
  371. package/src/nexus/api/bot-commands.ts +1 -1
  372. package/src/nexus/api/chat-backend-detection.ts +1 -1
  373. package/src/nexus/api/config.ts +1 -1
  374. package/src/nexus/api/connect-info.ts +1 -1
  375. package/src/nexus/api/dispatch-runs.ts +1 -1
  376. package/src/nexus/api/edit-in-pwa.ts +1 -1
  377. package/src/nexus/api/errors.ts +1 -1
  378. package/src/nexus/api/grid.ts +88 -1
  379. package/src/nexus/api/harness-api.ts +17 -2
  380. package/src/nexus/api/health.ts +1 -1
  381. package/src/nexus/api/hitl-pushcut-settings.ts +1 -1
  382. package/src/nexus/api/http-server.ts +20 -6
  383. package/src/nexus/api/intake-pipeline-commit.ts +1 -1
  384. package/src/nexus/api/intake-pipeline-preview.ts +1 -1
  385. package/src/nexus/api/intake-runs.ts +1 -1
  386. package/src/nexus/api/log-fabric.ts +1 -1
  387. package/src/nexus/api/logs.ts +1 -1
  388. package/src/nexus/api/loop-edges.ts +255 -6
  389. package/src/nexus/api/meta-api.ts +2 -2
  390. package/src/nexus/api/missions.ts +1 -1
  391. package/src/nexus/api/platforms.ts +1 -1
  392. package/src/nexus/api/registry-catalog.ts +1 -1
  393. package/src/nexus/api/registry-discovery.ts +1 -1
  394. package/src/nexus/api/registry-resolved.ts +1 -1
  395. package/src/nexus/api/registry.ts +1 -1
  396. package/src/nexus/api/research-run-observer.ts +7 -1
  397. package/src/nexus/api/schedules-action.ts +1 -1
  398. package/src/nexus/api/schedules-read.ts +1 -1
  399. package/src/nexus/api/sessions-store.ts +1 -1
  400. package/src/nexus/api/showroom-layouts.ts +1 -1
  401. package/src/nexus/api/skill-router.ts +1 -1
  402. package/src/nexus/api/tabs-mutations.ts +1 -1
  403. package/src/nexus/api/tabs.ts +1 -1
  404. package/src/nexus/api/tasks-create.ts +1 -1
  405. package/src/nexus/api/tasks-scheduler.ts +1 -1
  406. package/src/nexus/api/templates.ts +1 -1
  407. package/src/nexus/api/terminals.ts +1 -1
  408. package/src/nexus/api/triggers.ts +1 -1
  409. package/src/nexus/api/workflow-events.ts +1 -1
  410. package/src/nexus/api/workflow-lifecycle.ts +1 -1
  411. package/src/nexus/api/workflow-pins.ts +1 -1
  412. package/src/nexus/api/workflow-router.ts +1 -1
  413. package/src/nexus/api/workflow-templates.ts +1 -1
  414. package/src/nexus/api/workflows.ts +1 -1
  415. package/src/nexus/api/worktrees.ts +1 -1
  416. package/src/nexus/apps/app-contract.ts +310 -0
  417. package/src/nexus/apps/app-host.ts +309 -0
  418. package/src/nexus/apps/app-openapi.ts +141 -0
  419. package/src/nexus/apps/app-simulate.ts +188 -0
  420. package/src/nexus/apps/backend-tier.ts +42 -0
  421. package/src/nexus/boot/register-mcp-clients.ts +132 -10
  422. package/src/nexus/config/secrets/env-import.ts +42 -0
  423. package/src/nexus/config/secrets/file-backend.ts +25 -0
  424. package/src/nexus/config/secrets/index.ts +12 -0
  425. package/src/nexus/config/secrets/transfer.ts +94 -0
  426. package/src/nexus/index.ts +10 -0
  427. package/src/oauth/codex-account-store.ts +8 -2
  428. package/src/oauth/codex-owner-mirror.ts +30 -0
  429. package/src/onboarding.ts +1 -1
  430. package/src/plugins/core/manifest.ts +8 -5
  431. package/src/plugins/install/plugin-install.ts +4 -2
  432. package/src/pr-tool/census.ts +29 -8
  433. package/src/release-loop/rehearsal.ts +31 -10
  434. package/src/repl/agent-turn.ts +2 -1
  435. package/src/resource-ledger/resource-ledger.ts +18 -0
  436. package/src/self-dev/dev-cli.ts +22 -2
  437. package/src/self-dev/dev-pipeline.ts +13 -9
  438. package/src/self-dev/orchestrate.ts +18 -0
  439. package/src/self-dev/run-supervisor.ts +4 -2
  440. package/src/self-dev/run-types.ts +5 -0
  441. package/src/self-implement/comment-only-source.ts +11 -10
  442. package/src/self-implement/evidence-command-budget.ts +9 -8
  443. package/src/self-implement/executor-contract.ts +3 -3
  444. package/src/self-implement/gate-cli.ts +5 -2
  445. package/src/self-implement/gate-remote.ts +27 -3
  446. package/src/self-implement/goal-author-clarification.ts +15 -14
  447. package/src/self-implement/goal-author-text.ts +180 -0
  448. package/src/self-implement/goal-author.ts +2 -218
  449. package/src/self-implement/graph-authority.ts +18 -17
  450. package/src/self-implement/graph-templates.ts +13 -12
  451. package/src/self-implement/headless-elanous-driver.ts +3 -0
  452. package/src/self-implement/importer-test-index.ts +21 -20
  453. package/src/self-implement/knowhow-pack.ts +66 -5
  454. package/src/self-implement/l8-merge-queue.ts +26 -12
  455. package/src/self-implement/lazy-typescript.ts +15 -0
  456. package/src/self-implement/merge-train.ts +195 -17
  457. package/src/self-implement/off-diff-evidence.ts +48 -47
  458. package/src/self-implement/orchestrator.ts +2 -18
  459. package/src/self-implement/pwa-import-graph.ts +28 -27
  460. package/src/self-implement/readable-text.ts +18 -0
  461. package/src/self-implement/route-consumer-test-index.ts +18 -17
  462. package/src/self-implement/run-ledger.ts +1 -1
  463. package/src/self-implement/scoped-typecheck-config.ts +5 -4
  464. package/src/self-implement/seams.ts +3 -0
  465. package/src/self-implement/self-implement-cli.ts +19 -2
  466. package/src/self-implement/self-implement-runtime.ts +4 -6
  467. package/src/self-implement/soft-stop-observer.ts +6 -0
  468. package/src/self-implement/wiring-check.ts +74 -73
  469. package/src/session/chat.ts +20 -14
  470. package/src/session/compact-session.ts +7 -1
  471. package/src/session/request-size-guard.ts +146 -2
  472. package/src/sim-world-device-catalogs.json +311 -0
  473. package/src/skills/runner.ts +10 -3
  474. package/src/skills/tools/dev-harness.ts +7 -4
  475. package/src/skills/tools/mermaid.ts +5 -2
  476. package/src/skills/tools/persistent-grounding.ts +3 -1
  477. package/src/task-agent/parent-host.ts +29 -2
  478. package/src/task-agent/repair-branch-cas.ts +2 -1
  479. package/src/task-agent/repair-cycle.ts +5 -1
  480. package/src/task-orchestrator/surfaces/pod-lease.ts +78 -1
  481. package/src/task-orchestrator/surfaces/pod-si-warm-host.ts +68 -4
  482. package/src/task-orchestrator/surfaces/pod-si-warm-protocol.ts +26 -1
  483. package/src/task-orchestrator/surfaces/pod-si-warm-provider.ts +6 -4
  484. package/src/task-orchestrator/surfaces/pod-si-warm-transport.ts +2 -1
  485. package/src/task-orchestrator/surfaces/pod-warm-worker-pod.ts +98 -1
  486. package/src/task-orchestrator/surfaces/pod-warm-worker-provider.ts +393 -41
  487. package/src/task-orchestrator/surfaces/self-implement-pod.ts +77 -6
  488. package/src/task-orchestrator/surfaces/warm-reuse-evidence.ts +39 -3
  489. package/src/task-orchestrator/surfaces/warm-reuse-stats.ts +84 -0
  490. package/src/telegram-report.ts +3 -1
  491. package/src/tool-runtime/aside-selection-runtime.ts +24 -5
  492. package/src/tool-runtime/browser-hand-runtime.ts +19 -9
  493. package/src/tool-runtime/elanous-linear-issue-runtime.ts +13 -3
  494. package/src/tool-runtime/mcp-proxy-bootstrap.ts +6 -3
  495. package/src/tui/entry.ts +8 -92
  496. package/src/tui/slash/new-session.ts +2 -2
  497. package/src/tui-key.ts +545 -0
  498. package/src/tui-render-cache.ts +157 -0
  499. package/src/tui-string-width.ts +273 -0
  500. package/src/tui.ts +20 -988
  501. package/src/user-config.ts +66 -3
  502. package/src/ux-sim/author-reviewer-precheck-device.ts +2 -2
  503. package/src/ux-sim/backend-tier-device.ts +13 -0
  504. package/src/ux-sim/chain-land.ts +158 -0
  505. package/src/ux-sim/device-fidelity.ts +261 -0
  506. package/src/ux-sim/event-monkey.ts +48 -0
  507. package/src/ux-sim/fake-app-auth.ts +236 -0
  508. package/src/ux-sim/fake-app-host.ts +107 -0
  509. package/src/ux-sim/fake-app-realtime.ts +372 -0
  510. package/src/ux-sim/fake-app-storage.ts +477 -0
  511. package/src/ux-sim/fake-app-traffic.ts +375 -0
  512. package/src/ux-sim/fake-bin-install-helper.mjs +119 -0
  513. package/src/ux-sim/fake-bin.ts +49 -5
  514. package/src/ux-sim/fake-dns-cert.ts +295 -0
  515. package/src/ux-sim/fake-elevenlabs.ts +144 -0
  516. package/src/ux-sim/fake-fetch.ts +158 -0
  517. package/src/ux-sim/fake-gh.ts +45 -1
  518. package/src/ux-sim/fake-higgsfield.ts +106 -0
  519. package/src/ux-sim/fake-kubectl.ts +34 -6
  520. package/src/ux-sim/fake-land-queue.ts +5 -2
  521. package/src/ux-sim/fake-payment.ts +201 -0
  522. package/src/ux-sim/fake-ps.ts +82 -0
  523. package/src/ux-sim/fake-stt.ts +101 -0
  524. package/src/ux-sim/fault-nexus-stall.ts +225 -0
  525. package/src/ux-sim/fault-pod-child-result.ts +2 -2
  526. package/src/ux-sim/fault-pod-reuse-residue.ts +73 -0
  527. package/src/ux-sim/fault-pool-cap.ts +5 -2
  528. package/src/ux-sim/hq-move-sim.ts +293 -0
  529. package/src/ux-sim/install-consent-device.ts +52 -0
  530. package/src/ux-sim/mock-scenario-catalog.json +3552 -2618
  531. package/src/ux-sim/next-tui-seat-scenarios.ts +12 -8
  532. package/src/ux-sim/release-sim-rig.ts +208 -7
  533. package/src/ux-sim/secret-canary.ts +416 -0
  534. package/src/ux-sim/sim-coverage.ts +299 -0
  535. package/src/ux-sim/subagent-tools-device.ts +31 -2
  536. package/src/ux-sim/temp-git-repo.ts +95 -0
  537. package/src/ux-sim/tool-async-fail-loop.ts +165 -0
  538. package/src/ux-sim/warm-pool-reuse-sim.ts +201 -13
  539. package/src/ux-sim/warm-pool-reuse-switch-sim.ts +76 -0
  540. package/src/ux-sim/warm-si-reuse-sim.ts +234 -0
  541. package/src/ux-sim/world-chaos-runtime.ts +312 -0
  542. package/src/ux-sim/world-host-chaos.ts +124 -0
  543. package/src/ux-sim/world-schema.ts +271 -5
  544. package/src/ux-sim/world-snapshot.ts +307 -0
  545. package/src/ux-sim/world.ts +673 -47
  546. package/src/ux-sim/worlds/secret-export-import.yaml +27 -0
  547. package/src/ux-sim/worlds/secret-zsh-keys-absorb.yaml +26 -0
  548. package/src/version/packed-revision.json +1 -1
  549. package/apps/pwa/out/_next/static/chunks/001d1d30.3b264a3a5834784b.js +0 -1
  550. package/apps/pwa/out/_next/static/chunks/1044.f780ef30fbeec1d2.js +0 -1
  551. package/apps/pwa/out/_next/static/chunks/106.ef1dcdfef46b0b72.js +0 -1
  552. package/apps/pwa/out/_next/static/chunks/1207.912f5869bdf13244.js +0 -1
  553. package/apps/pwa/out/_next/static/chunks/1226-29248177d8e43df5.js +0 -1
  554. package/apps/pwa/out/_next/static/chunks/128757ea.677175b2ad79b371.js +0 -1
  555. package/apps/pwa/out/_next/static/chunks/1469.157ee10170c461ab.js +0 -1
  556. package/apps/pwa/out/_next/static/chunks/1475-f4208d07b2b41e44.js +0 -1
  557. package/apps/pwa/out/_next/static/chunks/1525.9fd05c15746d77c8.js +0 -1
  558. package/apps/pwa/out/_next/static/chunks/1596-80cc66168f6a520b.js +0 -1
  559. package/apps/pwa/out/_next/static/chunks/224.0585d01ba7f4f898.js +0 -226
  560. package/apps/pwa/out/_next/static/chunks/2277.80d00b0a6fe67cad.js +0 -94
  561. package/apps/pwa/out/_next/static/chunks/2287.6a4cce8ac8897fda.js +0 -1
  562. package/apps/pwa/out/_next/static/chunks/2378.0805bd9972a241f3.js +0 -24
  563. package/apps/pwa/out/_next/static/chunks/25600806.42d40cb74fdc4bf3.js +0 -122
  564. package/apps/pwa/out/_next/static/chunks/2785-33003c356341fab5.js +0 -1
  565. package/apps/pwa/out/_next/static/chunks/280-53fe7ab5dbd19607.js +0 -1
  566. package/apps/pwa/out/_next/static/chunks/29.135cc356bdf1a8be.js +0 -1
  567. package/apps/pwa/out/_next/static/chunks/3111-f3c2382dc49d4719.js +0 -1
  568. package/apps/pwa/out/_next/static/chunks/3135-4f30d19149be541d.js +0 -1
  569. package/apps/pwa/out/_next/static/chunks/336.dd6c1b81512124e6.js +0 -74
  570. package/apps/pwa/out/_next/static/chunks/337.35019dda0819a283.js +0 -64
  571. package/apps/pwa/out/_next/static/chunks/3393.cbbe17ef7aeee5e7.js +0 -2
  572. package/apps/pwa/out/_next/static/chunks/3394.8a08fac56ac2f941.js +0 -1
  573. package/apps/pwa/out/_next/static/chunks/3461-113eb7d3afb5969e.js +0 -1
  574. package/apps/pwa/out/_next/static/chunks/3603-473956ca996d5b03.js +0 -1
  575. package/apps/pwa/out/_next/static/chunks/3687.55335796604accd0.js +0 -1
  576. package/apps/pwa/out/_next/static/chunks/3692-ed2cebf0d6c4e273.js +0 -1
  577. package/apps/pwa/out/_next/static/chunks/3702-d50492fee8529bd7.js +0 -1
  578. package/apps/pwa/out/_next/static/chunks/3782.3ead96e62c8ac5c5.js +0 -1
  579. package/apps/pwa/out/_next/static/chunks/3849-59a5a66baa48998b.js +0 -1
  580. package/apps/pwa/out/_next/static/chunks/3965.1ae261de91a7507b.js +0 -115
  581. package/apps/pwa/out/_next/static/chunks/3985-432efaf9bc4e4123.js +0 -1
  582. package/apps/pwa/out/_next/static/chunks/4174.d97cc593a5cf01bc.js +0 -1
  583. package/apps/pwa/out/_next/static/chunks/4276.863502da440e095f.js +0 -1
  584. package/apps/pwa/out/_next/static/chunks/4450-ea0ec552f18d799d.js +0 -1
  585. package/apps/pwa/out/_next/static/chunks/4495.2fbef8546af0792c.js +0 -1
  586. package/apps/pwa/out/_next/static/chunks/4674.e41c0f9b62fed6e2.js +0 -36
  587. package/apps/pwa/out/_next/static/chunks/482.52b487cbac96db29.js +0 -93
  588. package/apps/pwa/out/_next/static/chunks/4841.b78af1deed2d3d3f.js +0 -23
  589. package/apps/pwa/out/_next/static/chunks/4869.839bacfaab182108.js +0 -1
  590. package/apps/pwa/out/_next/static/chunks/500-57c24ef4341cdb21.js +0 -1
  591. package/apps/pwa/out/_next/static/chunks/5017-e079ea96feddbe85.js +0 -1
  592. package/apps/pwa/out/_next/static/chunks/5135.7b73d384c46dc26b.js +0 -1
  593. package/apps/pwa/out/_next/static/chunks/5359-7aa498ded308ea17.js +0 -1
  594. package/apps/pwa/out/_next/static/chunks/5457-5459ae7638b42dff.js +0 -1
  595. package/apps/pwa/out/_next/static/chunks/5521-16fb56b15c809e4a.js +0 -1
  596. package/apps/pwa/out/_next/static/chunks/5616-33de319a016180cd.js +0 -1
  597. package/apps/pwa/out/_next/static/chunks/5646.41a48aad446799fa.js +0 -1
  598. package/apps/pwa/out/_next/static/chunks/5716.ad2c840320ab9472.js +0 -41
  599. package/apps/pwa/out/_next/static/chunks/5730-ca5565abe3d360ad.js +0 -1
  600. package/apps/pwa/out/_next/static/chunks/5841.26bcfac34b5889b4.js +0 -1
  601. package/apps/pwa/out/_next/static/chunks/586.658dedb3bc558b22.js +0 -1
  602. package/apps/pwa/out/_next/static/chunks/5894-7d90af46a43f80d2.js +0 -1
  603. package/apps/pwa/out/_next/static/chunks/5927-88cbc16437430987.js +0 -1
  604. package/apps/pwa/out/_next/static/chunks/5960.0dfb8bd3d27e1063.js +0 -1
  605. package/apps/pwa/out/_next/static/chunks/597-9bf9f66dba4ccae9.js +0 -1
  606. package/apps/pwa/out/_next/static/chunks/6064.f425ee61836bb5c7.js +0 -1
  607. package/apps/pwa/out/_next/static/chunks/6074.39f84a90284749de.js +0 -1
  608. package/apps/pwa/out/_next/static/chunks/61.cbbe643a52cf53ab.js +0 -62
  609. package/apps/pwa/out/_next/static/chunks/6184.4c0ba455eb3d27a1.js +0 -79
  610. package/apps/pwa/out/_next/static/chunks/6224.cd0ca2a16727e9a9.js +0 -1
  611. package/apps/pwa/out/_next/static/chunks/6229-a83289910e01869b.js +0 -1
  612. package/apps/pwa/out/_next/static/chunks/6243.61e6f450a70a8d91.js +0 -90
  613. package/apps/pwa/out/_next/static/chunks/6295-4f1a1386f8667fd1.js +0 -1
  614. package/apps/pwa/out/_next/static/chunks/6310.5fb57ba0781bc476.js +0 -286
  615. package/apps/pwa/out/_next/static/chunks/6653.f3f30affdbe694aa.js +0 -32
  616. package/apps/pwa/out/_next/static/chunks/6657.f57e1d8511e510ce.js +0 -1
  617. package/apps/pwa/out/_next/static/chunks/6672-bc0f317b72f0bbd2.js +0 -1
  618. package/apps/pwa/out/_next/static/chunks/6761-2143fe6fe3578118.js +0 -1
  619. package/apps/pwa/out/_next/static/chunks/6955-75b2659eafd27893.js +0 -1
  620. package/apps/pwa/out/_next/static/chunks/7051-406b0538949c932f.js +0 -1
  621. package/apps/pwa/out/_next/static/chunks/7222.df77e48936e60d2e.js +0 -1
  622. package/apps/pwa/out/_next/static/chunks/7242-08db87893cf792b7.js +0 -1
  623. package/apps/pwa/out/_next/static/chunks/7307-3172df9d07acb8e0.js +0 -1
  624. package/apps/pwa/out/_next/static/chunks/7613.4523dc082005e359.js +0 -1
  625. package/apps/pwa/out/_next/static/chunks/7648-7c7346c2a73503f9.js +0 -1
  626. package/apps/pwa/out/_next/static/chunks/7788.ffd9f4d57647a354.js +0 -149
  627. package/apps/pwa/out/_next/static/chunks/7793.4d3de6ce591fbc21.js +0 -34
  628. package/apps/pwa/out/_next/static/chunks/7816.4b8c0fa1e5b4ec4f.js +0 -1
  629. package/apps/pwa/out/_next/static/chunks/7988-bbcd506079ceceb6.js +0 -1
  630. package/apps/pwa/out/_next/static/chunks/8066.32863fb9dd2dc278.js +0 -1
  631. package/apps/pwa/out/_next/static/chunks/8073-cdf4607b80d127fe.js +0 -1
  632. package/apps/pwa/out/_next/static/chunks/8414-77dbc0c35bc85f42.js +0 -1
  633. package/apps/pwa/out/_next/static/chunks/849.fe241354322a97e9.js +0 -27
  634. package/apps/pwa/out/_next/static/chunks/8665.900daf2473f7032a.js +0 -1
  635. package/apps/pwa/out/_next/static/chunks/8713.11d79e4e023ab74f.js +0 -1
  636. package/apps/pwa/out/_next/static/chunks/8718.137b7ce2c3cae66b.js +0 -8
  637. package/apps/pwa/out/_next/static/chunks/8764.39400f626e015e79.js +0 -287
  638. package/apps/pwa/out/_next/static/chunks/8803.d3504166481bc91e.js +0 -24
  639. package/apps/pwa/out/_next/static/chunks/8939.a14783a0a81e5e62.js +0 -1
  640. package/apps/pwa/out/_next/static/chunks/8963.928e777871d1d637.js +0 -104
  641. package/apps/pwa/out/_next/static/chunks/8987-372a6317aaf83fa9.js +0 -1
  642. package/apps/pwa/out/_next/static/chunks/9039.03e40d9f9fd90920.js +0 -1
  643. package/apps/pwa/out/_next/static/chunks/9546.3a0afc5d5fa0851d.js +0 -1
  644. package/apps/pwa/out/_next/static/chunks/9671.d935d274b65718e4.js +0 -1
  645. package/apps/pwa/out/_next/static/chunks/9756.24e020ddf99f7020.js +0 -77
  646. package/apps/pwa/out/_next/static/chunks/9777-6b21b6f1989ea7b1.js +0 -1
  647. package/apps/pwa/out/_next/static/chunks/9947.7a8d89554e873316.js +0 -1
  648. package/apps/pwa/out/_next/static/chunks/9980.fd66776b3782eeb4.js +0 -1
  649. package/apps/pwa/out/_next/static/chunks/app/_not-found/page-2c29b6716055aa54.js +0 -1
  650. package/apps/pwa/out/_next/static/chunks/app/approvals/page-c9e997416c86c8dd.js +0 -1
  651. package/apps/pwa/out/_next/static/chunks/app/autopilot/page-4e24912975188223.js +0 -1
  652. package/apps/pwa/out/_next/static/chunks/app/board/page-b117b7ee316afe86.js +0 -1
  653. package/apps/pwa/out/_next/static/chunks/app/bots/page-2b3e0df385eba76f.js +0 -1
  654. package/apps/pwa/out/_next/static/chunks/app/ceo/page-409ed1d2f2c5f706.js +0 -1
  655. package/apps/pwa/out/_next/static/chunks/app/chat/page-1e90543da0a66b63.js +0 -1
  656. package/apps/pwa/out/_next/static/chunks/app/consult/page-f68c84b50dee9796.js +0 -1
  657. package/apps/pwa/out/_next/static/chunks/app/control/page-afefb7fac0047855.js +0 -1
  658. package/apps/pwa/out/_next/static/chunks/app/design-check/page-9726864cd21303a2.js +0 -1
  659. package/apps/pwa/out/_next/static/chunks/app/editor/page-ab0febcc6695f4e4.js +0 -1
  660. package/apps/pwa/out/_next/static/chunks/app/exec/page-6f6b157c52869db0.js +0 -1
  661. package/apps/pwa/out/_next/static/chunks/app/field/page-78aef36734ddd588.js +0 -1
  662. package/apps/pwa/out/_next/static/chunks/app/healthz/route-2c29b6716055aa54.js +0 -1
  663. package/apps/pwa/out/_next/static/chunks/app/inside/page-6a634383e6247c6b.js +0 -1
  664. package/apps/pwa/out/_next/static/chunks/app/layout-fda2f39e4d21744c.js +0 -1
  665. package/apps/pwa/out/_next/static/chunks/app/live/page-a6fd7cb710d80092.js +0 -1
  666. package/apps/pwa/out/_next/static/chunks/app/loops/page-a71ad5f5b075be8d.js +0 -1
  667. package/apps/pwa/out/_next/static/chunks/app/market/page-df7f2d252ff836b5.js +0 -1
  668. package/apps/pwa/out/_next/static/chunks/app/missions/[id]/page-7f38deb0998488bf.js +0 -1
  669. package/apps/pwa/out/_next/static/chunks/app/morning/page-7e80f3b354be205e.js +0 -1
  670. package/apps/pwa/out/_next/static/chunks/app/not-found-5ea0e042882e87de.js +0 -1
  671. package/apps/pwa/out/_next/static/chunks/app/observatory/page-f3df76408c930b99.js +0 -1
  672. package/apps/pwa/out/_next/static/chunks/app/ops/checklist/page-88996ccc31edf06c.js +0 -1
  673. package/apps/pwa/out/_next/static/chunks/app/ops/release/page-d95db9df4a907fe1.js +0 -1
  674. package/apps/pwa/out/_next/static/chunks/app/ops/resources/page-5a518950f4136aad.js +0 -1
  675. package/apps/pwa/out/_next/static/chunks/app/ops/seats/page-d9e070e009e1a521.js +0 -1
  676. package/apps/pwa/out/_next/static/chunks/app/outputs/page-167c44a8ff378706.js +0 -1
  677. package/apps/pwa/out/_next/static/chunks/app/page-4763cf1b0e52e28b.js +0 -1
  678. package/apps/pwa/out/_next/static/chunks/app/reflection/page-a5bcd883385064d4.js +0 -1
  679. package/apps/pwa/out/_next/static/chunks/app/scheduler/page-f9ef43f59ba98937.js +0 -1
  680. package/apps/pwa/out/_next/static/chunks/app/settings/devices/page-20dfe2b5bca855eb.js +0 -1
  681. package/apps/pwa/out/_next/static/chunks/app/settings/page-7c022f7edf3203d5.js +0 -1
  682. package/apps/pwa/out/_next/static/chunks/app/setup/done/page-adc6daed842128e6.js +0 -1
  683. package/apps/pwa/out/_next/static/chunks/app/setup/layout-2c29b6716055aa54.js +0 -1
  684. package/apps/pwa/out/_next/static/chunks/app/setup/page-683c175da53e9ec3.js +0 -1
  685. package/apps/pwa/out/_next/static/chunks/app/share/page-a91d9cbaf50cc8b4.js +0 -1
  686. package/apps/pwa/out/_next/static/chunks/app/showroom/page-376f3a03f4d31706.js +0 -1
  687. package/apps/pwa/out/_next/static/chunks/app/tasks/page-256d83e84ed55191.js +0 -1
  688. package/apps/pwa/out/_next/static/chunks/app/term/page-5e1fb7a8e0927cf6.js +0 -1
  689. package/apps/pwa/out/_next/static/chunks/app/today/page-95994b2b507ee120.js +0 -1
  690. package/apps/pwa/out/_next/static/chunks/app/trace/page-486b1d3605dbd5f3.js +0 -1
  691. package/apps/pwa/out/_next/static/chunks/app/vault/page-0159591688c45cae.js +0 -1
  692. package/apps/pwa/out/_next/static/chunks/app/workflows/chat-ui/page-e640489e459c2789.js +0 -1
  693. package/apps/pwa/out/_next/static/chunks/app/workflows/page-89c00bebfb27b5d5.js +0 -1
  694. package/apps/pwa/out/_next/static/chunks/app/workspace/page-edf90eaa6d354fee.js +0 -1
  695. package/apps/pwa/out/_next/static/chunks/app/worktrees/page-2f2bd38085305ef0.js +0 -1
  696. package/apps/pwa/out/_next/static/chunks/db2f0161-8781ed841c51137a.js +0 -1
  697. package/apps/pwa/out/_next/static/chunks/f6a577ab-4b799b8c69e49cfd.js +0 -1
  698. package/apps/pwa/out/_next/static/chunks/framework-01d45c12f1bce665.js +0 -1
  699. package/apps/pwa/out/_next/static/chunks/main-0a9bbda118d4e9dc.js +0 -1
  700. package/apps/pwa/out/_next/static/chunks/main-app-7f817b9fe2a360cc.js +0 -1
  701. package/apps/pwa/out/_next/static/chunks/pages/_app-f953b3d6c9ece48e.js +0 -1
  702. package/apps/pwa/out/_next/static/chunks/pages/_error-1a3e6e3f0aa99004.js +0 -1
  703. package/apps/pwa/out/_next/static/chunks/webpack-090556529ba4efb6.js +0 -1
  704. package/src/autopilot/mission-tui-watch.ts +0 -380
  705. package/src/dashboard/plugin-wizard-runtime.ts +0 -111
  706. package/src/dashboard/plugin-wizard-tool.ts +0 -69
  707. package/src/tui/slash/mission.ts +0 -492
  708. /package/apps/pwa/out/_next/static/{K-ckEB9hu9tXQ6iqnl27L → iXeJzCRg0ENSSl_RTbGIN}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1924],{68944:(t,e,a)=>{a.d(e,{DA:()=>R,FA:()=>F,I7:()=>B,Zk:()=>w,aP:()=>ez,lC:()=>m,nM:()=>A,nq:()=>e_});var r=a(74571),l=a(98016),i=a(43756),n=a(389),s=a(84445),o=a(13315),h=a(4117),d=a(68331),c=a(76148),g=a(62201);async function y(t){let e=t.getElementsByTagName("img");if(!e||0===e.length)return;let a=!u(t);await Promise.all([...e].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",a){let e=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=o.UI.fontSize]=(0,s.I5)(e),r=5*a+"px";t.style.minWidth=r,t.style.maxWidth=r}else t.style.width="100%";e(t)}(0,d.K)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}function u(t){return 3===t.nodeType?t.textContent?.trim()!=="":1===t.nodeType&&"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(u)}(0,d.K)(y,"configureLabelImages"),(0,d.K)(u,"hasTextBesidesImages");var p=(0,d.K)(async(t,e,a)=>{let r=(0,o.D7)(),i=t.insert("g").attr("class",a??"node default").attr("id",e.domId||e.id),n=i.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),d=e.width?Math.max(e.width-2*(e.padding??0),32):(0,o.D7)().flowchart?.wrappingWidth??200,g=r.c4?.wrap??!0?d:1/0,y=await Promise.all(h.map(async t=>{let a=n.append("g").attr("class",t.cssClass),i=await (0,l.GZ)(a,(0,o.jZ)((0,s.Sm)(t.text??""),r),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:g,style:e.labelStyle},r);return(0,c.Ltv)(i).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,c.Ltv)(i).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:a,box:a.node().getBBox()}})),u=Math.max(...y.map(({box:t})=>t.width),0),p=0;for(let{el:t,box:e}of y)t.attr("transform",`translate(${u/2-e.x-e.width/2}, ${p-e.y})`),p+=e.height+3;let f=y.length>0?p-3:0;return n.insert("rect",":first-child"),n.attr("transform",`translate(${-u/2}, ${-f/2})`),{shapeSvg:i,bbox:n.node().getBBox(),halfPadding:(e.padding??0)/2,label:n}},"c4LabelHelper"),f=(0,d.K)((t,e)=>{let{x:a,y:r,width:l,height:i}=t;return l>=e?t:"left"in t?{x:a,y:r,width:e,height:i,top:r,left:a,bottom:r+i,right:a+e,toJSON:(0,d.K)(()=>({}),"toJSON")}:{x:a-(e-l)/2,y:r,width:e,height:i}},"withMinWidth"),w=(0,d.K)(async(t,e,a)=>{let r,i,n;if(void 0!==e.stereotype)return p(t,e,a);let h=e.useHtmlLabels||(0,o._3)((0,o.D7)()?.htmlLabels);r=a||"node default";let d=t.insert("g").attr("class",r).attr("id",e.domId||e.id),g=d.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));i=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let u=!!e.icon||!!e.img,w="markdown"===e.labelType,x=i&&!e.width?e.minWidth??0:0,m=await (0,l.GZ)(g,(0,o.jZ)((0,s.Sm)(i),(0,o.D7)()),{useHtmlLabels:h,width:e.width||e.wrappingWidth||(0,o.D7)().flowchart?.wrappingWidth,minWidth:x,classes:w?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:w},(0,o.D7)()),b=(e?.padding??0)/2;if(h){let t=m.children[0],e=(0,c.Ltv)(m);await y(t),n=f(n=await l.lT.measure(()=>t.getBoundingClientRect()),x),e.attr("width",n.width),e.attr("height",n.height)}else n=f(n=await l.lT.measure(()=>m.getBBox()),x);return h?g.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):g.attr("transform","translate(0, "+-n.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:d,bbox:n,halfPadding:b,label:g}},"labelHelper"),x=(0,d.K)(async(t,e,a)=>{let r,i=a.useHtmlLabels??(0,o.E)((0,o.D7)()),n=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,l.GZ)(n,(0,o.jZ)((0,s.Sm)(e),(0,o.D7)()),{useHtmlLabels:i,width:a.width||(0,o.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=a.padding/2;if((0,o.E)((0,o.D7)())){let t=h.children[0],e=(0,c.Ltv)(h);r=await l.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",r.width),e.attr("height",r.height)}else r=await l.lT.measure(()=>h.getBBox());return i?n.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"):n.attr("transform","translate(0, "+-r.height/2+")"),a.centerLabel&&n.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:r,halfPadding:d,label:n}},"insertLabel"),m=(0,d.K)((t,e,a)=>{if(a){t.width=a.width,t.height=a.height;return}let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),b=(0,d.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function $(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function k(t,e,a,r,l,i){let n=[],s=a-t,o=2*Math.PI/(s/i),h=e+(r-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,r=h+l*Math.sin(o*(a-t));n.push({x:a,y:r})}return n}function M(t,e,a,r,l,i){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:-i,y:-h})}return n}function D(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),r=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",r);let l=e.find(t=>"none"!==t.getAttribute("fill")),i=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,d.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");l&&Object.entries({fill:n(l,"fill"),"fill-opacity":n(l,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),i&&Object.entries({stroke:n(i,"stroke"),"stroke-width":n(i,"stroke-width")??"1","stroke-opacity":n(i,"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)($,"createPathFromPoints"),(0,d.K)(k,"generateFullSineWavePoints"),(0,d.K)(M,"generateCirclePoints"),(0,d.K)(D,"mergePaths");var A=(0,d.K)((t,e)=>{var a,r,l=t.x,i=t.y,n=e.x-l,s=e.y-i,o=t.width/2,h=t.height/2;return Math.abs(s)*o>Math.abs(n)*h?(s<0&&(h=-h),a=0===s?0:h*n/s,r=h):(n<0&&(o=-o),a=o,r=0===n?0:o*s/n),{x:l+a,y:i+r}},"intersectRect");function S(t,e){return t.intersect(e)}function v(t,e,a,r){var l=t.x,i=t.y,n=l-r.x,s=i-r.y,o=Math.sqrt(e*e*s*s+a*a*n*n),h=Math.abs(e*a*n/o);r.x<l&&(h=-h);var d=Math.abs(e*a*s/o);return r.y<i&&(d=-d),{x:l+h,y:i+d}}function K(t,e,a){return v(t,e,e,a)}function C(t,e,a,r){{let l=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=l*a.x+i*a.y+n,o=l*r.x+i*r.y+n;if(0!==s&&0!==o&&L(s,o))return;let h=r.y-a.y,d=a.x-r.x,c=r.x*a.y-a.x*r.y,g=h*t.x+d*t.y+c,y=h*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&L(g,y))return;let u=l*d-h*i;if(0===u)return;return{x:(i*c-d*n)/u,y:(h*n-l*c)/u}}}function L(t,e){return t*e>0}function N(t,e,a){let r=t.x,l=t.y,i=[],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 o=r-t.width/2-n,h=l-t.height/2-s;for(let r=0;r<e.length;r++){let l=e[r],n=e[r<e.length-1?r+1:0],s=C(t,a,{x:o+l.x,y:h+l.y},{x:o+n.x,y:h+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let r=t.x-a.x,l=t.y-a.y,i=Math.sqrt(r*r+l*l),n=e.x-a.x,s=e.y-a.y,o=Math.sqrt(n*n+s*s);return i<o?-1:+(i!==o)}),i[0]):t}(0,d.K)(S,"intersectNode"),(0,d.K)(v,"intersectEllipse"),(0,d.K)(K,"intersectCircle"),(0,d.K)(C,"intersectLine"),(0,d.K)(L,"sameSign"),(0,d.K)(N,"intersectPolygon");var B={node:S,circle:K,ellipse:v,polygon:N,rect:A},F=(0,d.K)((t,e,a,r,l)=>["M",t+l,e,"H",t+a-l,"A",l,l,"0 0 1",t+a,e+l,"V",e+r-l,"A",l,l,"0 0 1",t+a-l,e+r,"H",t+l,"A",l,l,"0 0 1",t,e+r-l,"V",e+l,"A",l,l,"0 0 1",t+l,e,"Z"].join(" "),"createRoundedRectPathD"),R=(0,d.K)(async(t,e,a,r=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let s=(0,o.D7)(),h=(0,o.E)(s);return await (0,l.GZ)(t,n,{style:a,isTitle:r,useHtmlLabels:h,markdown:!1,isNode:i,width:1/0},s)},"createLabel");function P(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=b(e),i=l;l||(i="anchor");let n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,d=g.A.svg(n),c=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let y=d.circle(0,0,2,c),u=n.insert(()=>y,":first-child");return u.attr("class","anchor").attr("style",(0,s.KL)(o)),m(e,u),e.intersect=function(t){return h.R.info("Circle intersect",e,1,t),B.circle(e,1,t)},n}function X(t,e,a,r,l,i,n){let s=Math.atan2(r-e,a-t),o=Math.sqrt(((a-t)/2/l)**2+((r-e)/2/i)**2);if(o>1)throw Error("The given radii are too small to create an arc between the points.");let h=Math.sqrt(1-o**2),d=(t+a)/2+h*i*Math.sin(s)*(n?-1:1),c=(e+r)/2-h*l*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/l),y=Math.atan2((r-c)/i,(a-d)/l)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let u=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+l*Math.cos(e),r=c+i*Math.sin(e);u.push({x:a,y:r})}return u}function G(t,e,a){let[r,l]=[e,a].sort((t,e)=>e-t);return l*(1-Math.sqrt(1-(t/r/2)**2))}async function I(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,o=(0,d.K)(t=>t+s,"calcTotalHeight"),h=(0,d.K)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:c,bbox:y}=await w(t,e,b(e)),u=o(e?.height?e?.height:y.height),[p,f]=h(u),x=G(u,p,f),k=(e?.width?e?.width:y.width)+2*n+x-x,{cssStyles:M}=e,D=[{x:k/2,y:-u/2},{x:-k/2,y:-u/2},...X(-k/2,-u/2,-k/2,u/2,p,f,!1),{x:k/2,y:u/2},...X(k/2,u/2,k/2,-u/2,p,f,!0)],A=g.A.svg(c),S=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let v=$(D),K=A.path(v,S),C=c.insert(()=>K,":first-child");return C.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${p/2}, 0)`),m(e,C),e.intersect=function(t){return B.polygon(e,D,t)},c}async function W(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",c=e.padding??12,y=Math.max(s.width+2*c,e.width??0,80),u=Math.max(Math.min(.08*y,12),5),p=Math.max(s.height+2*c+u,e.height??0),f=-p/2+u,x=p/2,$=.72*y,k=`M${-y/2},${f} L${-$/2},${x} A${$/2},${u} 0 0 0 ${$/2},${x} L${y/2},${f} A${y/2},${u} 0 0 0 ${-y/2},${f} Z`,{cssStyles:M}=e,D=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(k,(0,r.Fr)(e,{}));D.node()?.appendChild(t),M&&D.attr("style",M)}else D.append("path").attr("d",k).attr("style",i);D.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",y/2).attr("ry",u).attr("style",`fill:none;stroke:${h};stroke-width:1px`),m(e,D);let A=f+(x-f)/2;o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${A-s.height/2-(s.y-(s.top??0))})`);let S=(0,d.K)((t,e,a)=>Array.from({length:13},(r,l)=>{let i=Math.PI-l*Math.PI/12;return{x:t*Math.cos(i),y:e+a*u*Math.sin(i)}}),"arc"),v=[...S(y/2,f,-1),...S($/2,x,1).reverse()];return e.intersect=function(t){return B.polygon(e,v,t)},n}function H(t){let{themeVariables:e}=(0,o.D7)(),a=e.clusterBkg,r=e.clusterBorder;return"flow"===t?{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"}:{rx:8,fill:a,stroke:r,cssClass:"collapsed-group"}}async function T(t,e){let a,l=H(e.metadata?.containerType),{fill:i,stroke:h}=l,{nodeStyles:d}=(0,r.GX)(e),{shapeSvg:c,bbox:y}=await w(t,e,b(e)),{theme:u,themeVariables:p}=(0,o.D7)();(0,n.XE)(c,e.colorIndex,u,p.borderColorArray);let f=e.padding??8,x=y.height,$=Math.max(y.width+2*f,80,e?.width??0),k=Math.max(x+8+20+2*f,e?.height??0),M=-$/2,D=-k/2,A=c.select(".label");if(A&&(e.useHtmlLabels??(0,o.E)((0,o.D7)())?A.attr("transform",`translate(${-y.width/2}, ${-y.height/2+-14})`):A.attr("transform",`translate(0, ${-y.height/2+-14})`)),"handDrawn"===e.look){let t=g.A.svg(c),n=(0,r.Fr)(e,{fill:i,stroke:h,...void 0===l.strokeWidth?{}:{strokeWidth:l.strokeWidth},..."none"===i?{fillWeight:0}:{fillStyle:"solid"}}),o=t.path(F(M,D,$,k,l.rx),n);(a=c.insert(()=>o,":first-child")).attr("class","basic label-container "+l.cssClass).attr("style",(0,s.KL)(e.cssStyles))}else(a=c.insert("rect",":first-child")).attr("class","basic label-container "+l.cssClass).attr("style",d).attr("rx",l.rx).attr("ry",l.rx).attr("x",M).attr("y",D).attr("width",$).attr("height",k).attr("fill",i).attr("stroke",h),void 0!==l.strokeWidth&&a.attr("stroke-width",l.strokeWidth+"px");let S=D+f+x+8;c.append("line").attr("class","collapsed-separator").attr("x1",M+8).attr("y1",S).attr("x2",M+$-8).attr("y2",S).attr("stroke",h).attr("stroke-dasharray","3, 3");let v=S+10;for(let t=-1;t<=1;t++)c.append("circle").attr("class","collapsed-indicator").attr("cx",10*t).attr("cy",v).attr("r",2.5).attr("fill",h);return m(e,a),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return B.rect(e,t)},c}function E(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}(0,d.K)(P,"anchor"),(0,d.K)(X,"generateArcPoints"),(0,d.K)(G,"calculateArcSagitta"),(0,d.K)(I,"bowTieRect"),(0,d.K)(W,"bucket"),(0,d.K)(H,"getCollapsedStyle"),(0,d.K)(T,"collapsedGroup"),(0,d.K)(E,"insertPolygonShape");var j=["right","left","up","down"],q="point",Z=(0,d.K)(t=>{let e=new Set;for(let a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e},"expandAndDeduplicateDirections"),_=(0,d.K)(t=>j.filter(e=>t.has(e)).join("|")||q,"getDirectionKey"),z={"right|left|up|down":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:0,y:0},{x:e,y:0},{x:r/2,y:2*a},{x:r-e,y:0},{x:r,y:0},{x:r,y:-t/3},{x:r+2*a,y:-t/2},{x:r,y:-2*t/3},{x:r,y:-t},{x:r-e,y:-t},{x:r/2,y:-t-2*a},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*a,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:e,y:0},{x:a-e,y:0},{x:a,y:-t/2},{x:a-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:e,y:-t},{x:a-e,y:-t},{x:a,y:0}],"right|left|down"),"right|up|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:a,y:-e},{x:a,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:a,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:a,y:-t}],"left|up|down"),"right|left":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:0},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:r/2,y:0},{x:0,y:-a},{x:e,y:-a},{x:e,y:-t+a},{x:0,y:-t+a},{x:r/2,y:-t},{x:r,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a},{x:r,y:-a}],"up|down"),"right|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:a,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,d.K)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:a,y:0},{x:0,y:-e},{x:a,y:-t}],"left|up"),"left|down":(0,d.K)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:-a},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t+a}],"right"),left:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:0},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:-a},{x:e,y:-t+a},{x:0,y:-t+a},{x:r/2,y:-t},{x:r,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a}],"up"),down:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:r/2,y:0},{x:0,y:-a},{x:e,y:-a},{x:e,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a},{x:r,y:-a}],"down"),[q]:()=>[{x:0,y:0}]},O=(0,d.K)((t,e,a,r)=>{let l=Z(t),i=(a.padding??0)/2,n=e.height+4*i,s=n/2,o=r??e.width+2*s+2*i;return(z[_(l)]??z[q])({height:n,midpoint:s,padding:i,width:o})},"getArrowPoints");async function V(t,e){let{shapeSvg:a,bbox:r}=await w(t,e,b(e)),l=e.padding??0,i=r.height+2*l,n=i/2,s=r.width+2*n+l,o=e.width??0,h=e.positioned&&(e.widthInColumns??1)>1&&o>s?o:s,d=O(e.directions??[],r,e,h),c=E(a,h,i,d);return c.attr("style",e.style??null),m(e,c),e.intersect=function(t){return B.polygon(e,d,t)},a}async function Y(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",d=e.padding??12,c=Math.max(s.width+2*d,e.width??0,90),y=Math.max(s.height+2*d+18,e.height??0),u=-y/2,{cssStyles:p}=e,f=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(F(-c/2,u,c,y,12),(0,r.Fr)(e,{}));f.node()?.appendChild(t),p&&f.attr("style",p)}else f.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",y).attr("rx",12).attr("ry",12).attr("style",i);f.append("line").attr("x1",-c/2).attr("y1",u+18).attr("x2",c/2).attr("y2",u+18).attr("style",`stroke:${h};stroke-width:1px`);for(let t=0;t<3;t++)f.append("circle").attr("cx",-c/2+12+9*t).attr("cy",u+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);f.append("rect").attr("class","browser-address-bar").attr("x",-c/2+44).attr("y",u+4).attr("width",Math.max(c-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),m(e,f);let x=u+18+(y-18)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.rect(e,t)},n}async function J(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,o="neo"===e.look?24:n,{shapeSvg:h,bbox:d}=await w(t,e,b(e)),c=(e?.width??d.width)+("neo"===e.look?2*s:s+12),y=(e?.height??d.height)+("neo"===e.look?2*o:o),u=-y,p=[{x:12,y:u},{x:c,y:u},{x:c,y:0},{x:0,y:0},{x:0,y:u+12},{x:12,y:u}],{cssStyles:f}=e;if("handDrawn"===e.look){let t=g.A.svg(h),l=(0,r.Fr)(e,{}),i=$(p),n=t.path(i,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${y/2})`),f&&a.attr("style",f)}else a=E(h,c,y,p);return i&&a.attr("style",i),m(e,a),e.intersect=function(t){return B.polygon(e,p,t)},h}function U(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:i}=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}],o=g.A.svg(l),h=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let d=$(s),c=o.path(d,h),y=l.insert(()=>c,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return B.polygon(e,s,t)},l}async function Q(t,e,a){let l,{labelStyles:i,nodeStyles:n}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:d,halfPadding:c}=await w(t,e,b(e)),y=a?.padding??c,u=Math.sqrt(d.width**2+d.height**2)/2,p="neo"===e.look?u+32:u+y,{cssStyles:f}=e;if("handDrawn"===e.look){let t=g.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*p,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(f))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0);return m(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return B.circle(t,a,e)},e.intersect=function(t){return h.R.info("Circle intersect",e,p,t),B.circle(e,p,t)},o}async function tt(t,e){let a=["node",e.cssClasses,e.class].filter(Boolean).join(" "),{shapeSvg:r,bbox:l,halfPadding:i}=await w(t,e,a),n=r.insert("rect",":first-child"),s=e.padding??0,o=e.positioned?e.width??0:l.width+s,h=e.positioned?e.height??0:l.height+s,d=e.positioned?-o/2:-l.width/2-i,c=e.positioned?-h/2:-l.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",e.style??null).attr("rx",e.rx??null).attr("ry",e.ry??null).attr("x",d).attr("y",c).attr("width",o).attr("height",h),m(e,n),e.intersect=function(t){return B.rect(e,t)},r}async function te(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",d=e.padding??12,c=Math.max(s.width+2*d,e.width??0,90),y=Math.max(s.height+2*d+20,e.height??0),u=-y/2,{cssStyles:p}=e,f=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(F(-c/2,u,c,y,12),(0,r.Fr)(e,{}));f.node()?.appendChild(t),p&&f.attr("style",p)}else f.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",y).attr("rx",12).attr("ry",12).attr("style",i);f.append("text").attr("x",-c/2+12).attr("y",u+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),m(e,f);let x=u+20+(y-20)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.rect(e,t)},n}function ta(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),r=2*t,l={x:r/2*e,y:r/2*a},i={x:-(r/2)*e,y:r/2*a},n={x:-(r/2)*e,y:-(r/2)*a},s={x:r/2*e,y:-(r/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
1
+ "use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6017],{37083:(t,e,a)=>{a.d(e,{DA:()=>R,FA:()=>F,I7:()=>B,Zk:()=>w,aP:()=>ez,lC:()=>m,nM:()=>A,nq:()=>e_});var r=a(3008),l=a(53841),i=a(31317),n=a(44322),s=a(30356),o=a(77500),h=a(89098),d=a(86396),c=a(18889),g=a(77700);async function y(t){let e=t.getElementsByTagName("img");if(!e||0===e.length)return;let a=!u(t);await Promise.all([...e].map(t=>new Promise(e=>{function r(){if(t.style.display="flex",t.style.flexDirection="column",a){let e=(0,o.D7)().fontSize?(0,o.D7)().fontSize:window.getComputedStyle(document.body).fontSize,[a=o.UI.fontSize]=(0,s.I5)(e),r=5*a+"px";t.style.minWidth=r,t.style.maxWidth=r}else t.style.width="100%";e(t)}(0,d.K)(r,"setupImage"),setTimeout(()=>{t.complete&&r()}),t.addEventListener("error",r),t.addEventListener("load",r)})))}function u(t){return 3===t.nodeType?t.textContent?.trim()!=="":1===t.nodeType&&"img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(u)}(0,d.K)(y,"configureLabelImages"),(0,d.K)(u,"hasTextBesidesImages");var p=(0,d.K)(async(t,e,a)=>{let r=(0,o.D7)(),i=t.insert("g").attr("class",a??"node default").attr("id",e.domId||e.id),n=i.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),d=e.width?Math.max(e.width-2*(e.padding??0),32):(0,o.D7)().flowchart?.wrappingWidth??200,g=r.c4?.wrap??!0?d:1/0,y=await Promise.all(h.map(async t=>{let a=n.append("g").attr("class",t.cssClass),i=await (0,l.GZ)(a,(0,o.jZ)((0,s.Sm)(t.text??""),r),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:g,style:e.labelStyle},r);return(0,c.Ltv)(i).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,c.Ltv)(i).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:a,box:a.node().getBBox()}})),u=Math.max(...y.map(({box:t})=>t.width),0),p=0;for(let{el:t,box:e}of y)t.attr("transform",`translate(${u/2-e.x-e.width/2}, ${p-e.y})`),p+=e.height+3;let f=y.length>0?p-3:0;return n.insert("rect",":first-child"),n.attr("transform",`translate(${-u/2}, ${-f/2})`),{shapeSvg:i,bbox:n.node().getBBox(),halfPadding:(e.padding??0)/2,label:n}},"c4LabelHelper"),f=(0,d.K)((t,e)=>{let{x:a,y:r,width:l,height:i}=t;return l>=e?t:"left"in t?{x:a,y:r,width:e,height:i,top:r,left:a,bottom:r+i,right:a+e,toJSON:(0,d.K)(()=>({}),"toJSON")}:{x:a-(e-l)/2,y:r,width:e,height:i}},"withMinWidth"),w=(0,d.K)(async(t,e,a)=>{let r,i,n;if(void 0!==e.stereotype)return p(t,e,a);let h=e.useHtmlLabels||(0,o._3)((0,o.D7)()?.htmlLabels);r=a||"node default";let d=t.insert("g").attr("class",r).attr("id",e.domId||e.id),g=d.insert("g").attr("class","label").attr("style",(0,s.KL)(e.labelStyle));i=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let u=!!e.icon||!!e.img,w="markdown"===e.labelType,x=i&&!e.width?e.minWidth??0:0,m=await (0,l.GZ)(g,(0,o.jZ)((0,s.Sm)(i),(0,o.D7)()),{useHtmlLabels:h,width:e.width||e.wrappingWidth||(0,o.D7)().flowchart?.wrappingWidth,minWidth:x,classes:w?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:u,markdown:w},(0,o.D7)()),b=(e?.padding??0)/2;if(h){let t=m.children[0],e=(0,c.Ltv)(m);await y(t),n=f(n=await l.lT.measure(()=>t.getBoundingClientRect()),x),e.attr("width",n.width),e.attr("height",n.height)}else n=f(n=await l.lT.measure(()=>m.getBBox()),x);return h?g.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):g.attr("transform","translate(0, "+-n.height/2+")"),e.centerLabel&&g.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),g.insert("rect",":first-child"),{shapeSvg:d,bbox:n,halfPadding:b,label:g}},"labelHelper"),x=(0,d.K)(async(t,e,a)=>{let r,i=a.useHtmlLabels??(0,o.E)((0,o.D7)()),n=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),h=await (0,l.GZ)(n,(0,o.jZ)((0,s.Sm)(e),(0,o.D7)()),{useHtmlLabels:i,width:a.width||(0,o.D7)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=a.padding/2;if((0,o.E)((0,o.D7)())){let t=h.children[0],e=(0,c.Ltv)(h);r=await l.lT.measure(()=>t.getBoundingClientRect()),e.attr("width",r.width),e.attr("height",r.height)}else r=await l.lT.measure(()=>h.getBBox());return i?n.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"):n.attr("transform","translate(0, "+-r.height/2+")"),a.centerLabel&&n.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),n.insert("rect",":first-child"),{shapeSvg:t,bbox:r,halfPadding:d,label:n}},"insertLabel"),m=(0,d.K)((t,e,a)=>{if(a){t.width=a.width,t.height=a.height;return}let r=e.node().getBBox();t.width=r.width,t.height=r.height},"updateNodeBounds"),b=(0,d.K)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function $(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function k(t,e,a,r,l,i){let n=[],s=a-t,o=2*Math.PI/(s/i),h=e+(r-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,r=h+l*Math.sin(o*(a-t));n.push({x:a,y:r})}return n}function M(t,e,a,r,l,i){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:-i,y:-h})}return n}function D(t){let e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),a=document.createElementNS("http://www.w3.org/2000/svg","path"),r=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");a.setAttribute("d",r);let l=e.find(t=>"none"!==t.getAttribute("fill")),i=e.find(t=>"none"!==t.getAttribute("stroke")),n=(0,d.K)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");l&&Object.entries({fill:n(l,"fill"),"fill-opacity":n(l,"fill-opacity")??"1"}).forEach(([t,e])=>{e&&a.setAttribute(t,e)}),i&&Object.entries({stroke:n(i,"stroke"),"stroke-width":n(i,"stroke-width")??"1","stroke-opacity":n(i,"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)($,"createPathFromPoints"),(0,d.K)(k,"generateFullSineWavePoints"),(0,d.K)(M,"generateCirclePoints"),(0,d.K)(D,"mergePaths");var A=(0,d.K)((t,e)=>{var a,r,l=t.x,i=t.y,n=e.x-l,s=e.y-i,o=t.width/2,h=t.height/2;return Math.abs(s)*o>Math.abs(n)*h?(s<0&&(h=-h),a=0===s?0:h*n/s,r=h):(n<0&&(o=-o),a=o,r=0===n?0:o*s/n),{x:l+a,y:i+r}},"intersectRect");function S(t,e){return t.intersect(e)}function v(t,e,a,r){var l=t.x,i=t.y,n=l-r.x,s=i-r.y,o=Math.sqrt(e*e*s*s+a*a*n*n),h=Math.abs(e*a*n/o);r.x<l&&(h=-h);var d=Math.abs(e*a*s/o);return r.y<i&&(d=-d),{x:l+h,y:i+d}}function K(t,e,a){return v(t,e,e,a)}function C(t,e,a,r){{let l=e.y-t.y,i=t.x-e.x,n=e.x*t.y-t.x*e.y,s=l*a.x+i*a.y+n,o=l*r.x+i*r.y+n;if(0!==s&&0!==o&&L(s,o))return;let h=r.y-a.y,d=a.x-r.x,c=r.x*a.y-a.x*r.y,g=h*t.x+d*t.y+c,y=h*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(y)&&L(g,y))return;let u=l*d-h*i;if(0===u)return;return{x:(i*c-d*n)/u,y:(h*n-l*c)/u}}}function L(t,e){return t*e>0}function N(t,e,a){let r=t.x,l=t.y,i=[],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 o=r-t.width/2-n,h=l-t.height/2-s;for(let r=0;r<e.length;r++){let l=e[r],n=e[r<e.length-1?r+1:0],s=C(t,a,{x:o+l.x,y:h+l.y},{x:o+n.x,y:h+n.y});s&&i.push(s)}return i.length?(i.length>1&&i.sort(function(t,e){let r=t.x-a.x,l=t.y-a.y,i=Math.sqrt(r*r+l*l),n=e.x-a.x,s=e.y-a.y,o=Math.sqrt(n*n+s*s);return i<o?-1:+(i!==o)}),i[0]):t}(0,d.K)(S,"intersectNode"),(0,d.K)(v,"intersectEllipse"),(0,d.K)(K,"intersectCircle"),(0,d.K)(C,"intersectLine"),(0,d.K)(L,"sameSign"),(0,d.K)(N,"intersectPolygon");var B={node:S,circle:K,ellipse:v,polygon:N,rect:A},F=(0,d.K)((t,e,a,r,l)=>["M",t+l,e,"H",t+a-l,"A",l,l,"0 0 1",t+a,e+l,"V",e+r-l,"A",l,l,"0 0 1",t+a-l,e+r,"H",t+l,"A",l,l,"0 0 1",t,e+r-l,"V",e+l,"A",l,l,"0 0 1",t+l,e,"Z"].join(" "),"createRoundedRectPathD"),R=(0,d.K)(async(t,e,a,r=!1,i=!1)=>{let n=e||"";"object"==typeof n&&(n=n[0]);let s=(0,o.D7)(),h=(0,o.E)(s);return await (0,l.GZ)(t,n,{style:a,isTitle:r,useHtmlLabels:h,markdown:!1,isNode:i,width:1/0},s)},"createLabel");function P(t,e){let{labelStyles:a}=(0,r.GX)(e);e.labelStyle=a;let l=b(e),i=l;l||(i="anchor");let n=t.insert("g").attr("class",i).attr("id",e.domId||e.id),{cssStyles:o}=e,d=g.A.svg(n),c=(0,r.Fr)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let y=d.circle(0,0,2,c),u=n.insert(()=>y,":first-child");return u.attr("class","anchor").attr("style",(0,s.KL)(o)),m(e,u),e.intersect=function(t){return h.R.info("Circle intersect",e,1,t),B.circle(e,1,t)},n}function X(t,e,a,r,l,i,n){let s=Math.atan2(r-e,a-t),o=Math.sqrt(((a-t)/2/l)**2+((r-e)/2/i)**2);if(o>1)throw Error("The given radii are too small to create an arc between the points.");let h=Math.sqrt(1-o**2),d=(t+a)/2+h*i*Math.sin(s)*(n?-1:1),c=(e+r)/2-h*l*Math.cos(s)*(n?-1:1),g=Math.atan2((e-c)/i,(t-d)/l),y=Math.atan2((r-c)/i,(a-d)/l)-g;n&&y<0&&(y+=2*Math.PI),!n&&y>0&&(y-=2*Math.PI);let u=[];for(let t=0;t<20;t++){let e=g+t/19*y,a=d+l*Math.cos(e),r=c+i*Math.sin(e);u.push({x:a,y:r})}return u}function G(t,e,a){let[r,l]=[e,a].sort((t,e)=>e-t);return l*(1-Math.sqrt(1-(t/r/2)**2))}async function I(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,o=(0,d.K)(t=>t+s,"calcTotalHeight"),h=(0,d.K)(t=>{let e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:c,bbox:y}=await w(t,e,b(e)),u=o(e?.height?e?.height:y.height),[p,f]=h(u),x=G(u,p,f),k=(e?.width?e?.width:y.width)+2*n+x-x,{cssStyles:M}=e,D=[{x:k/2,y:-u/2},{x:-k/2,y:-u/2},...X(-k/2,-u/2,-k/2,u/2,p,f,!1),{x:k/2,y:u/2},...X(k/2,u/2,k/2,-u/2,p,f,!0)],A=g.A.svg(c),S=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let v=$(D),K=A.path(v,S),C=c.insert(()=>K,":first-child");return C.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&C.selectAll("path").attr("style",l),C.attr("transform",`translate(${p/2}, 0)`),m(e,C),e.intersect=function(t){return B.polygon(e,D,t)},c}async function W(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",c=e.padding??12,y=Math.max(s.width+2*c,e.width??0,80),u=Math.max(Math.min(.08*y,12),5),p=Math.max(s.height+2*c+u,e.height??0),f=-p/2+u,x=p/2,$=.72*y,k=`M${-y/2},${f} L${-$/2},${x} A${$/2},${u} 0 0 0 ${$/2},${x} L${y/2},${f} A${y/2},${u} 0 0 0 ${-y/2},${f} Z`,{cssStyles:M}=e,D=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(k,(0,r.Fr)(e,{}));D.node()?.appendChild(t),M&&D.attr("style",M)}else D.append("path").attr("d",k).attr("style",i);D.append("ellipse").attr("cx",0).attr("cy",f).attr("rx",y/2).attr("ry",u).attr("style",`fill:none;stroke:${h};stroke-width:1px`),m(e,D);let A=f+(x-f)/2;o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${A-s.height/2-(s.y-(s.top??0))})`);let S=(0,d.K)((t,e,a)=>Array.from({length:13},(r,l)=>{let i=Math.PI-l*Math.PI/12;return{x:t*Math.cos(i),y:e+a*u*Math.sin(i)}}),"arc"),v=[...S(y/2,f,-1),...S($/2,x,1).reverse()];return e.intersect=function(t){return B.polygon(e,v,t)},n}function H(t){let{themeVariables:e}=(0,o.D7)(),a=e.clusterBkg,r=e.clusterBorder;return"flow"===t?{rx:10,fill:"none",stroke:e.flowContainerStroke||e.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"}:{rx:8,fill:a,stroke:r,cssClass:"collapsed-group"}}async function T(t,e){let a,l=H(e.metadata?.containerType),{fill:i,stroke:h}=l,{nodeStyles:d}=(0,r.GX)(e),{shapeSvg:c,bbox:y}=await w(t,e,b(e)),{theme:u,themeVariables:p}=(0,o.D7)();(0,n.XE)(c,e.colorIndex,u,p.borderColorArray);let f=e.padding??8,x=y.height,$=Math.max(y.width+2*f,80,e?.width??0),k=Math.max(x+8+20+2*f,e?.height??0),M=-$/2,D=-k/2,A=c.select(".label");if(A&&(e.useHtmlLabels??(0,o.E)((0,o.D7)())?A.attr("transform",`translate(${-y.width/2}, ${-y.height/2+-14})`):A.attr("transform",`translate(0, ${-y.height/2+-14})`)),"handDrawn"===e.look){let t=g.A.svg(c),n=(0,r.Fr)(e,{fill:i,stroke:h,...void 0===l.strokeWidth?{}:{strokeWidth:l.strokeWidth},..."none"===i?{fillWeight:0}:{fillStyle:"solid"}}),o=t.path(F(M,D,$,k,l.rx),n);(a=c.insert(()=>o,":first-child")).attr("class","basic label-container "+l.cssClass).attr("style",(0,s.KL)(e.cssStyles))}else(a=c.insert("rect",":first-child")).attr("class","basic label-container "+l.cssClass).attr("style",d).attr("rx",l.rx).attr("ry",l.rx).attr("x",M).attr("y",D).attr("width",$).attr("height",k).attr("fill",i).attr("stroke",h),void 0!==l.strokeWidth&&a.attr("stroke-width",l.strokeWidth+"px");let S=D+f+x+8;c.append("line").attr("class","collapsed-separator").attr("x1",M+8).attr("y1",S).attr("x2",M+$-8).attr("y2",S).attr("stroke",h).attr("stroke-dasharray","3, 3");let v=S+10;for(let t=-1;t<=1;t++)c.append("circle").attr("class","collapsed-indicator").attr("cx",10*t).attr("cy",v).attr("r",2.5).attr("fill",h);return m(e,a),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return B.rect(e,t)},c}function E(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}(0,d.K)(P,"anchor"),(0,d.K)(X,"generateArcPoints"),(0,d.K)(G,"calculateArcSagitta"),(0,d.K)(I,"bowTieRect"),(0,d.K)(W,"bucket"),(0,d.K)(H,"getCollapsedStyle"),(0,d.K)(T,"collapsedGroup"),(0,d.K)(E,"insertPolygonShape");var j=["right","left","up","down"],q="point",Z=(0,d.K)(t=>{let e=new Set;for(let a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e},"expandAndDeduplicateDirections"),_=(0,d.K)(t=>j.filter(e=>t.has(e)).join("|")||q,"getDirectionKey"),z={"right|left|up|down":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:0,y:0},{x:e,y:0},{x:r/2,y:2*a},{x:r-e,y:0},{x:r,y:0},{x:r,y:-t/3},{x:r+2*a,y:-t/2},{x:r,y:-2*t/3},{x:r,y:-t},{x:r-e,y:-t},{x:r/2,y:-t-2*a},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*a,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:e,y:0},{x:a-e,y:0},{x:a,y:-t/2},{x:a-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:e,y:-t},{x:a-e,y:-t},{x:a,y:0}],"right|left|down"),"right|up|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:a,y:-e},{x:a,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:a,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:a,y:-t}],"left|up|down"),"right|left":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:0},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:r/2,y:0},{x:0,y:-a},{x:e,y:-a},{x:e,y:-t+a},{x:0,y:-t+a},{x:r/2,y:-t},{x:r,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a},{x:r,y:-a}],"up|down"),"right|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:0,y:0},{x:a,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,d.K)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,d.K)(({height:t,midpoint:e,width:a})=>[{x:a,y:0},{x:0,y:-e},{x:a,y:-t}],"left|up"),"left|down":(0,d.K)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:-a},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t+a}],"right"),left:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:0},{x:e,y:-a},{x:r-e,y:-a},{x:r-e,y:-t+a},{x:e,y:-t+a},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:e,y:-a},{x:e,y:-t+a},{x:0,y:-t+a},{x:r/2,y:-t},{x:r,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a}],"up"),down:(0,d.K)(({height:t,midpoint:e,padding:a,width:r})=>[{x:r/2,y:0},{x:0,y:-a},{x:e,y:-a},{x:e,y:-t+a},{x:r-e,y:-t+a},{x:r-e,y:-a},{x:r,y:-a}],"down"),[q]:()=>[{x:0,y:0}]},O=(0,d.K)((t,e,a,r)=>{let l=Z(t),i=(a.padding??0)/2,n=e.height+4*i,s=n/2,o=r??e.width+2*s+2*i;return(z[_(l)]??z[q])({height:n,midpoint:s,padding:i,width:o})},"getArrowPoints");async function V(t,e){let{shapeSvg:a,bbox:r}=await w(t,e,b(e)),l=e.padding??0,i=r.height+2*l,n=i/2,s=r.width+2*n+l,o=e.width??0,h=e.positioned&&(e.widthInColumns??1)>1&&o>s?o:s,d=O(e.directions??[],r,e,h),c=E(a,h,i,d);return c.attr("style",e.style??null),m(e,c),e.intersect=function(t){return B.polygon(e,d,t)},a}async function Y(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",d=e.padding??12,c=Math.max(s.width+2*d,e.width??0,90),y=Math.max(s.height+2*d+18,e.height??0),u=-y/2,{cssStyles:p}=e,f=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(F(-c/2,u,c,y,12),(0,r.Fr)(e,{}));f.node()?.appendChild(t),p&&f.attr("style",p)}else f.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",y).attr("rx",12).attr("ry",12).attr("style",i);f.append("line").attr("x1",-c/2).attr("y1",u+18).attr("x2",c/2).attr("y2",u+18).attr("style",`stroke:${h};stroke-width:1px`);for(let t=0;t<3;t++)f.append("circle").attr("cx",-c/2+12+9*t).attr("cy",u+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);f.append("rect").attr("class","browser-address-bar").attr("x",-c/2+44).attr("y",u+4).attr("width",Math.max(c-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),m(e,f);let x=u+18+(y-18)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.rect(e,t)},n}async function J(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?28:n,o="neo"===e.look?24:n,{shapeSvg:h,bbox:d}=await w(t,e,b(e)),c=(e?.width??d.width)+("neo"===e.look?2*s:s+12),y=(e?.height??d.height)+("neo"===e.look?2*o:o),u=-y,p=[{x:12,y:u},{x:c,y:u},{x:c,y:0},{x:0,y:0},{x:0,y:u+12},{x:12,y:u}],{cssStyles:f}=e;if("handDrawn"===e.look){let t=g.A.svg(h),l=(0,r.Fr)(e,{}),i=$(p),n=t.path(i,l);a=h.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${y/2})`),f&&a.attr("style",f)}else a=E(h,c,y,p);return i&&a.attr("style",i),m(e,a),e.intersect=function(t){return B.polygon(e,p,t)},h}function U(t,e){let{nodeStyles:a}=(0,r.GX)(e);e.label="";let l=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:i}=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}],o=g.A.svg(l),h=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let d=$(s),c=o.path(d,h),y=l.insert(()=>c,":first-child");return i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),a&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",a),e.width=28,e.height=28,e.intersect=function(t){return B.polygon(e,s,t)},l}async function Q(t,e,a){let l,{labelStyles:i,nodeStyles:n}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:d,halfPadding:c}=await w(t,e,b(e)),y=a?.padding??c,u=Math.sqrt(d.width**2+d.height**2)/2,p="neo"===e.look?u+32:u+y,{cssStyles:f}=e;if("handDrawn"===e.look){let t=g.A.svg(o),a=(0,r.Fr)(e,{}),i=t.circle(0,0,2*p,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(f))}else l=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0);return m(e,l),e.calcIntersect=function(t,e){let a=t.width/2;return B.circle(t,a,e)},e.intersect=function(t){return h.R.info("Circle intersect",e,p,t),B.circle(e,p,t)},o}async function tt(t,e){let a=["node",e.cssClasses,e.class].filter(Boolean).join(" "),{shapeSvg:r,bbox:l,halfPadding:i}=await w(t,e,a),n=r.insert("rect",":first-child"),s=e.padding??0,o=e.positioned?e.width??0:l.width+s,h=e.positioned?e.height??0:l.height+s,d=e.positioned?-o/2:-l.width/2-i,c=e.positioned?-h/2:-l.height/2-i;return n.attr("class","basic cluster composite label-container").attr("style",e.style??null).attr("rx",e.rx??null).attr("ry",e.ry??null).attr("x",d).attr("y",c).attr("width",o).attr("height",h),m(e,n),e.intersect=function(t){return B.rect(e,t)},r}async function te(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=a?.nodeBorder??a?.lineColor??"currentColor",d=e.padding??12,c=Math.max(s.width+2*d,e.width??0,90),y=Math.max(s.height+2*d+20,e.height??0),u=-y/2,{cssStyles:p}=e,f=n.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){let t=g.A.svg(n).path(F(-c/2,u,c,y,12),(0,r.Fr)(e,{}));f.node()?.appendChild(t),p&&f.attr("style",p)}else f.append("rect").attr("x",-c/2).attr("y",u).attr("width",c).attr("height",y).attr("rx",12).attr("ry",12).attr("style",i);f.append("text").attr("x",-c/2+12).attr("y",u+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),m(e,f);let x=u+20+(y-20)/2;return o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.rect(e,t)},n}function ta(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),r=2*t,l={x:r/2*e,y:r/2*a},i={x:-(r/2)*e,y:r/2*a},n={x:-(r/2)*e,y:-(r/2)*a},s={x:r/2*e,y:-(r/2)*a};return`M ${i.x},${i.y} L ${s.x},${s.y}
2
2
  M ${l.x},${l.y} L ${n.x},${n.y}`}function tr(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a,e.label="";let i=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),n=Math.max(30,e?.width??0),{cssStyles:s}=e,o=g.A.svg(i),d=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let c=o.circle(0,0,2*n,d),y=ta(n),u=o.path(y,d),p=i.insert(()=>c,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),s&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),m(e,p),e.intersect=function(t){return h.R.info("crossedCircle intersect",e,{radius:n,point:t}),B.circle(e,n,t)},i}function tl(t,e,a,r=100,l=0,i=180){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:-i,y:-h})}return n}async function ti(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,d=n.width+o,c=n.height+h,y=Math.max(5,.1*c),{cssStyles:u}=e,p=[...tl(d/2,-c/2,y,30,-90,0),{x:-d/2-y,y:y},...tl(d/2+2*y,-y,y,20,-180,-270),...tl(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:-c/2},...tl(d/2,c/2,y,20,0,90)],f=[{x:d/2,y:-c/2-y},{x:-d/2,y:-c/2-y},...tl(d/2,-c/2,y,20,-90,0),{x:-d/2-y,y:-y},...tl(d/2+.1*d,-y,y,20,-180,-270),...tl(d/2+.1*d,y,y,20,-90,-180),{x:-d/2-y,y:c/2},...tl(d/2,c/2,y,20,0,90),{x:-d/2,y:c/2+y},{x:d/2,y:c/2+y}],x=g.A.svg(i),k=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$(p).replace("Z",""),D=x.path(M,k),A=$(f),S=x.path(A,{...k}),v=i.insert("g",":first-child");return v.insert(()=>S,":first-child").attr("stroke-opacity",0),v.insert(()=>D,":first-child"),v.attr("class","text"),u&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${y}, 0)`),s.attr("transform",`translate(${-d/2+y-(n.x-(n.left??0))},${-c/2+(e.padding??0)/2-(n.y-(n.top??0))})`),m(e,v),e.intersect=function(t){return B.polygon(e,f,t)},i}function tn(t,e,a,r=100,l=0,i=180){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:i,y:h})}return n}async function ts(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,d=n.width+("neo"===e.look?2*o:o),c=n.height+("neo"===e.look?2*h:h),y=Math.max(5,.1*c),{cssStyles:u}=e,p=[...tn(d/2,-c/2,y,20,-90,0),{x:d/2+y,y:-y},...tn(d/2+2*y,-y,y,20,-180,-270),...tn(d/2+2*y,y,y,20,-90,-180),{x:d/2+y,y:c/2},...tn(d/2,c/2,y,20,0,90)],f=[{x:-d/2,y:-c/2-y},{x:d/2,y:-c/2-y},...tn(d/2,-c/2,y,20,-90,0),{x:d/2+y,y:-y},...tn(d/2+2*y,-y,y,20,-180,-270),...tn(d/2+2*y,y,y,20,-90,-180),{x:d/2+y,y:c/2},...tn(d/2,c/2,y,20,0,90),{x:d/2,y:c/2+y},{x:-d/2,y:c/2+y}],x=g.A.svg(i),k=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$(p).replace("Z",""),D=x.path(M,k),A=$(f),S=x.path(A,{...k}),v=i.insert("g",":first-child");return v.insert(()=>S,":first-child").attr("stroke-opacity",0),v.insert(()=>D,":first-child"),v.attr("class","text"),u&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-y}, 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))})`),m(e,v),e.intersect=function(t){return B.polygon(e,f,t)},i}function to(t,e,a,r=100,l=0,i=180){let n=[],s=l*Math.PI/180,o=(i*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*o,i=t+a*Math.cos(r),h=e+a*Math.sin(r);n.push({x:-i,y:-h})}return n}async function th(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,d=n.width+("neo"===e.look?2*o:o),c=n.height+("neo"===e.look?2*h:h),y=Math.max(5,.1*c),{cssStyles:u}=e,p=[...to(d/2,-c/2,y,30,-90,0),{x:-d/2-y,y:y},...to(d/2+2*y,-y,y,20,-180,-270),...to(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:-c/2},...to(d/2,c/2,y,20,0,90)],f=[...to(-d/2+y+y/2,-c/2,y,20,-90,-180),{x:d/2-y/2,y:y},...to(-d/2-y/2,-y,y,20,0,90),...to(-d/2-y/2,y,y,20,-90,0),{x:d/2-y/2,y:-y},...to(-d/2+y+y/2,c/2,y,30,-180,-270)],x=[{x:d/2,y:-c/2-y},{x:-d/2,y:-c/2-y},...to(d/2,-c/2,y,20,-90,0),{x:-d/2-y,y:-y},...to(d/2+2*y,-y,y,20,-180,-270),...to(d/2+2*y,y,y,20,-90,-180),{x:-d/2-y,y:c/2},...to(d/2,c/2,y,20,0,90),{x:-d/2,y:c/2+y},{x:d/2-y-y/2,y:c/2+y},...to(-d/2+y+y/2,-c/2,y,20,-90,-180),{x:d/2-y/2,y:y},...to(-d/2-y/2,-y,y,20,0,90),...to(-d/2-y/2,y,y,20,-90,0),{x:d/2-y/2,y:-y},...to(-d/2+y+y/2,c/2,y,30,-180,-270)],k=g.A.svg(i),M=(0,r.Fr)(e,{fill:"none"});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=$(p).replace("Z",""),A=k.path(D,M),S=$(f).replace("Z",""),v=k.path(S,M),K=$(x),C=k.path(K,{...M}),L=i.insert("g",":first-child");return L.insert(()=>C,":first-child").attr("stroke-opacity",0),L.insert(()=>A,":first-child"),L.insert(()=>v,":first-child"),L.attr("class","text"),u&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&L.selectAll("path").attr("style",l),L.attr("transform",`translate(${y-y/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))})`),m(e,L),e.intersect=function(t){return B.polygon(e,x,t)},i}async function td(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(5,h.height+2*s,e?.height??0),c=d/2,y=Math.max(d/4,c-Math.sqrt(Math.max(0,c**2-(h.height/2)**2))),u=Math.max(20,h.width+2*n+2*y,(h.width+2*n)*1.25,e?.width??0),{cssStyles:p}=e,f=g.A.svg(o),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let k=u-c,D=d/4,A=[{x:k,y:0},{x:D,y:0},{x:0,y:d/2},{x:D,y:d},{x:k,y:d},...M(-k,-d/2,c,50,270,90)],S=$(A),v=f.path(S,x),K=o.insert(()=>v,":first-child");return K.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&K.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&K.selectChildren("path").attr("style",l),K.attr("transform",`translate(${-u/2}, ${-d/2})`),m(e,K),e.intersect=function(t){return B.polygon(e,A,t)},o}async function tc(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o=e.padding??20,h=Math.max(n.width+2*o,e.width??0,100),d=Math.min(Math.max(.23*h,16),56),c=.27*d,y=Math.max(n.height+2*o,e.height?e.height-(2*d-c):0),u=Math.min(.177*h,.45*y),p=y+2*d-c,f=-p/2,x=f+2*d-c,$=i.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:k}=e;if("handDrawn"===e.look){let t=g.A.svg(i),a=(0,r.Fr)(e,{}),l=t.path(F(-h/2,x,h,y,u),a),n=t.circle(0,f+d,2*d,a);$.insert(()=>n,":first-child"),$.insert(()=>l,":first-child"),k&&$.attr("style",k)}else $.append("rect").attr("x",-h/2).attr("y",x).attr("width",h).attr("height",y).attr("rx",u).attr("ry",u).attr("style",l),$.append("circle").attr("cx",0).attr("cy",f+d).attr("r",d).attr("style",l);m(e,$);let D=x+y/2;s.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${D-n.height/2-(n.y-(n.top??0))})`);let A=f+d,S=180*Math.asin(Math.min(1,(x-A)/d))/Math.PI,v=[...M(0,-A,d,24,180+S,-S),...M(-(-h/2+u),-(x+u),u,12,90,0),...M(-(-h/2+u),-(p/2-u),u,12,360,270),...M(-(h/2-u),-(p/2-u),u,12,270,180),...M(-(h/2-u),-(x+u),u,12,180,90)];return e.intersect=function(t){return B.polygon(e,v,t)},i}(0,d.K)(V,"block_arrow"),(0,d.K)(Y,"browser"),(0,d.K)(J,"card"),(0,d.K)(U,"choice"),(0,d.K)(Q,"circle"),(0,d.K)(tt,"composite"),(0,d.K)(te,"consoleWindow"),(0,d.K)(ta,"createLine"),(0,d.K)(tr,"crossedCircle"),(0,d.K)(tl,"generateCirclePoints"),(0,d.K)(ti,"curlyBraceLeft"),(0,d.K)(tn,"generateCirclePoints"),(0,d.K)(ts,"curlyBraceRight"),(0,d.K)(to,"generateCirclePoints"),(0,d.K)(th,"curlyBraces"),(0,d.K)(td,"curvedTrapezoid"),(0,d.K)(tc,"person");var tg=(0,d.K)((t,e,a,r,l,i)=>`M${t},${e+i} a${l},${i} 0,0,0 ${a},0 a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r}`,"createCylinderPathD"),ty=(0,d.K)((t,e,a,r,l,i)=>`M${t},${e+i} M${t+a},${e+i} a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r}`,"createOuterCylinderPathD"),tu=(0,d.K)((t,e,a,r,l,i)=>`M${t-a/2},${-r/2} a${l},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tp(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,o="neo"===e.look?24:n,h="neo"===e.look?24:n,d=e.width??0;e.width&&(e.width=e.width-h,e.width<8&&(e.width=8)),e.height&&(e.height=e.height-o-d/2/(2.5+d/50)*3,e.height<8&&(e.height=8));let{shapeSvg:c,bbox:y,label:u}=await w(t,e,b(e)),p=Math.max(e.width??0,y.width)+h,f=p/2,x=f/(2.5+p/50),$=Math.max(e.height??0,y.height)+o+x,{cssStyles:k}=e;if("handDrawn"===e.look){let t=g.A.svg(c),l=ty(0,0,p,$,f,x),i=tu(0,x,p,$,f,x),n=(0,r.Fr)(e,{}),s=t.path(l,n),o=t.path(i,(0,r.Fr)(e,{fill:"none"}));a=c.insert(()=>o,":first-child"),(a=c.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=tg(0,0,p,$,f,x);a=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)).attr("style",i)}return a.attr("label-offset-y",x),a.attr("transform",`translate(${-p/2}, ${-($/2+x)})`),m(e,a),u.attr("transform",`translate(${-(y.width/2)-(y.x-(y.left??0))}, ${-(y.height/2)+(e.padding??0)/1.5-(y.y-(y.top??0))})`),e.intersect=function(t){let a=B.rect(e,t),r=a.x-(e.x??0);if(0!=f&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-x)){let l=x*x*(1-r*r/(f*f));l>0&&(l=Math.sqrt(l)),l=x-l,t.y-(e.y??0)>0&&(l=-l),a.y+=l}return a},c}async function tf(t,e,a){let l,{labelStyles:i,nodeStyles:n}=(0,r.GX)(e);e.labelStyle=i;let{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.width+2*a.labelPaddingX,e?.width||0),c=Math.max(h.height+2*a.labelPaddingY,e?.height||0),y=-d/2,u=-c/2,{rx:p,ry:f}=e,{cssStyles:x}=e;if(a?.rx&&a.ry&&(p=a.rx,f=a.ry),"handDrawn"===e.look){let t=g.A.svg(o),a=(0,r.Fr)(e,{}),i=p||f?t.path(F(y,u,d,c,p||0),a):t.rectangle(y,u,d,c,a);(l=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,s.KL)(x))}else(l=o.insert("rect",":first-child")).attr("class","basic label-container").attr("style",n).attr("rx",(0,s.KL)(p)).attr("ry",(0,s.KL)(f)).attr("x",y).attr("y",u).attr("width",d).attr("height",c);return m(e,l,"handDrawn"===e.look?void 0:{width:d,height:c}),e.calcIntersect=function(t,e){return B.rect(t,e)},e.intersect=function(t){return B.rect(e,t)},o}async function tw(t,e){let{cssClasses:a,labelPaddingX:l,labelPaddingY:i,padding:n,width:s,height:o}=e,h=await tf(t,e,{rx:0,ry:0,classes:a??"",labelPaddingX:l??(n??0)*2,labelPaddingY:i??n??0});if("handDrawn"===e.look){let t=g.A.svg(h),a=(0,r.Fr)(e,{}),l=h.select(".basic.label-container > path:nth-child(2)"),i=l.node();if(!i)return h;let n=null;return i instanceof SVGGraphicsElement&&(n=i.getBBox(),h.insert(()=>t.line(n.x,n.y,n.x+n.width,n.y,a),".basic.label-container g.label"),h.insert(()=>t.line(n.x,n.y+n.height,n.x+n.width,n.y+n.height,a),".basic.label-container g.label"),l.remove()),h}let d=h.select(".basic.label-container"),c=(Number(d.attr("width"))||s)??0,y=(Number(d.attr("height"))||o)??0;return c>0&&y>0&&d.attr("stroke-dasharray",`${c} ${y}`),h}async function tx(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i="neo"===e.look?16:e.padding??0,n="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:o,label:h}=await w(t,e,b(e)),d=o.width+i,c=o.height+n,y=.2*c,u=-d/2,p=-c/2-y/2,{cssStyles:f}=e,x=g.A.svg(s),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let k=x.polygon([{x:u,y:p+y},{x:-u,y:p+y},{x:-u,y:-p},{x:u,y:-p},{x:u,y:p},{x:-u,y:p},{x:-u,y:p+y}].map(t=>[t.x,t.y]),$),M=s.insert(()=>k,":first-child");return M.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),h.attr("transform",`translate(${u+(e.padding??0)/2-(o.x-(o.left??0))}, ${p+y+(e.padding??0)/2-(o.y-(o.top??0))})`),m(e,M),e.intersect=function(t){return B.rect(e,t)},s}async function tm(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e),n="neo"===e.look?12:5;e.labelStyle=l;let o=e.padding??0,d="neo"===e.look?16:o,{shapeSvg:c,bbox:y}=await w(t,e,b(e)),u=Math.sqrt(y.width**2+y.height**2)/2,p=(e?.width?e?.width/2:u)+(d??0),f=p+n,{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(c),l=(0,r.Fr)(e,{roughness:.2,strokeWidth:2.5}),i=(0,r.Fr)(e,{roughness:.2,strokeWidth:1.5}),n=t.circle(0,0,2*f,l),o=t.circle(0,0,2*p,i);(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(o)}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",i),t.attr("class","outer-circle").attr("style",i).attr("r",f).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",p).attr("cx",0).attr("cy",0)}return m(e,a),e.intersect=function(t){return h.R.info("DoubleCircle intersect",e,f,t),B.circle(e,f,t)},c}async function tb(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:s,bbox:h,halfPadding:d}=await w(t,e,b(e)),{theme:c,themeVariables:y}=(0,o.D7)();(0,n.XE)(s,e.colorIndex,c,y.borderColorArray);let u=d??10,p=h.width/2+2*u,f=h.height/2+2*u,{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(s),l=(0,r.Fr)(e,{}),i=t.ellipse(0,0,2*p,2*f,l);(a=s.insert(()=>i,":first-child")).attr("class","basic label-container"),x&&a.attr("style",x)}else a=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",p).attr("ry",f).attr("cx",0).attr("cy",0);return e.width=2*p,e.height=2*f,m(e,a),e.calcIntersect=function(t,e){let a=t.width/2,r=t.height/2;return B.ellipse(t,a,r,e)},e.intersect=function(t){return B.ellipse(e,p,f,t)},s}function t$(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.label="",e.labelStyle=l;let n=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,o=g.A.svg(n),{nodeBorder:d}=a,c=(0,r.Fr)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let y=o.circle(0,0,14,c),u=n.insert(()=>y,":first-child");return u.selectAll("path").attr("style",`fill: ${d} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",s),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),m(e,u),e.intersect=function(t){return h.R.info("filledCircle intersect",e,{radius:7,point:t}),B.circle(e,7,t)},n}async function tk(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?2*i:i;(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:o,label:d}=await w(t,e,b(e)),c=(e?.width?e?.width:o.width)+(n??0),y=e?.height?e?.height:c+o.height,u=[{x:0,y:-y},{x:y,y:-y},{x:y/2,y:0}],{cssStyles:p}=e,f=g.A.svg(s),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let k=$(u),M=f.path(k,x),D=s.insert(()=>M,":first-child").attr("transform",`translate(${-y/2}, ${y/2})`).attr("class","outer-path");return p&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&D.selectChildren("path").attr("style",l),e.width=c,e.height=y,m(e,D),d.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-y/2+(e.padding??0)/2+(o.y-(o.top??0))})`),e.intersect=function(t){return h.R.info("Triangle intersect",e,u,t),B.polygon(e,u,t)},s}async function tM(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e)),h=e.padding??12,d=Math.max(s.width+2*h,e.width??0,90),c=s.height+2*h,y=Math.max(Math.min(.16*c,14),8),u=Math.max(c+y,e.height??0),p=u-y,f=Math.max(.38*d,28),x=-u/2,$=[{x:-d/2,y:x},{x:-d/2+f,y:x},{x:-d/2+f,y:x+y},{x:d/2,y:x+y},{x:d/2,y:u/2},{x:-d/2,y:u/2}],k=[`M${$[0].x},${$[0].y}`,...$.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:M}=e;if("handDrawn"===e.look){let t=g.A.svg(n).path(k,(0,r.Fr)(e,{}));a=n.insert(()=>t,":first-child").attr("class","basic label-container"),M&&a.attr("style",M)}else a=n.insert("path",":first-child").attr("d",k).attr("class","basic label-container").attr("style",i);return"handDrawn"===e.look?m(e,a):m(e,a,{width:d,height:u}),o.attr("transform",`translate(${-(s.width/2)-(s.x-(s.left??0))}, ${x+y+p/2-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return B.polygon(e,$,t)},n}function tD(t,e,{dir:a,config:{state:l,themeVariables:i}}){let{nodeStyles:n}=(0,r.GX)(e);e.label="";let s=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,h=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);("LR"===a||"RL"===a)&&(h=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0));let c=-1*h/2,y=-1*d/2,u=g.A.svg(s),p=(0,r.Fr)(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let f=u.rectangle(c,y,h,d,p),w=s.insert(()=>f,":first-child");o&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",o),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),m(e,w);let x=l?.padding??0;return e.width&&e.height&&(e.width+=x/2||0,e.height+=x/2||0),e.intersect=function(t){return B.rect(e,t)},s}async function tA(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i="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*i,e.width<15&&(e.width=15));let{shapeSvg:s,bbox:o}=await w(t,e,b(e)),d=(e?.height?e?.height:Math.max(10,o.height))+2*n,c=d/2,y=c-Math.sqrt(Math.max(0,c**2-(o.height/2)**2)),u=(e?.width?e?.width:Math.max(15,o.width)+2*y)+2*i,{cssStyles:p}=e,f=g.A.svg(s),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let k=[{x:-u/2,y:-d/2},{x:u/2-c,y:-d/2},...M(-u/2+c,0,c,50,90,270),{x:u/2-c,y:d/2},{x:-u/2,y:d/2}],D=$(k),A=f.path(D,x),S=s.insert(()=>A,":first-child");return S.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),m(e,S),e.intersect=function(t){return h.R.info("Pill intersect",e,{radius:c,point:t}),B.polygon(e,k,t)},s}(0,d.K)(tp,"cylinder"),(0,d.K)(tf,"drawRect"),(0,d.K)(tw,"datastore"),(0,d.K)(tx,"dividedRectangle"),(0,d.K)(tm,"doublecircle"),(0,d.K)(tb,"usecaseEllipse"),(0,d.K)(t$,"filledCircle"),(0,d.K)(tk,"flippedTriangle"),(0,d.K)(tM,"folder"),(0,d.K)(tD,"forkJoin"),(0,d.K)(tA,"halfRoundedRectangle");var tS=(0,d.K)((t,e,a,r,l)=>`M${t+l},${e} L${t+a-l},${e} L${t+a},${e-r/2} L${t+a-l},${e-r} L${t+l},${e-r} L${t},${e-r/2} Z`,"createHexagonPathD");async function tv(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e),n="neo"===e.look?3.5:4;e.labelStyle=l;let s=e.padding??0,o="neo"===e.look?70:s,h="neo"===e.look?32:s;if(e.width||e.height){let t=e.height??0;e.width=(e?.width??0)-t/n*2-h,e.height=(e.height??0)-o}let{shapeSvg:d,bbox:c}=await w(t,e,b(e)),y=(e?.height?e?.height:c.height)+o,u=y/n,p=(e?.width?e?.width:c.width)+2*u+h,f=[{x:u,y:0},{x:p-u,y:0},{x:p,y:-y/2},{x:p-u,y:-y},{x:u,y:-y},{x:0,y:-y/2}],{cssStyles:x}=e;if("handDrawn"===e.look){let t=g.A.svg(d),l=(0,r.Fr)(e,{}),i=tS(0,0,p,y,u),n=t.path(i,l);a=d.insert(()=>n,":first-child").attr("transform",`translate(${-p/2}, ${y/2})`),x&&a.attr("style",x)}else a=E(d,p,y,f);return i&&a.attr("style",i),e.width=p,e.height=y,m(e,a),e.intersect=function(t){return B.polygon(e,f,t)},d}async function tK(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let{shapeSvg:i}=await w(t,e,b(e)),n=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:o}=e,d=g.A.svg(i),c=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let y=[{x:0,y:0},{x:n,y:0},{x:0,y:s},{x:n,y:s}],u=$(y),p=d.path(u,c),f=i.insert(()=>p,":first-child");return f.attr("class","basic label-container outer-path"),o&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",l),f.attr("transform",`translate(${-n/2}, ${-s/2})`),m(e,f),e.intersect=function(t){return h.R.info("Pill intersect",e,{points:y}),B.polygon(e,y,t)},i}async function tC(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,label:c}=await w(t,e,"icon-shape default"),y="t"===e.pos,{nodeBorder:u}=a,{stylesMap:p}=(0,r.WW)(e),f=-s/2,x=-s/2,b=8*!!e.label,$=g.A.svg(o),k=(0,r.Fr)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.rectangle(f,x,s,s,k),D=Math.max(s,d.width),A=s+d.height+b,S=$.rectangle(-D/2,-A/2,D,A,{...k,fill:"transparent",stroke:"none"}),v=o.insert(()=>M,":first-child"),K=o.insert(()=>S);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),r=a.width,l=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-r/2-n},${y?d.height/2+b/2-l/2-h:-d.height/2-b/2-l/2-h})`),t.attr("style",`color: ${p.get("stroke")??u};`)}return c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${y?-A/2:A/2-d.height})`),v.attr("transform",`translate(0,${y?d.height/2+b/2:-d.height/2-b/2})`),m(e,K),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=y?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+b},{x:a+s/2,y:r-l/2+d.height+b},{x:a+s/2,y:r+l/2},{x:a-s/2,y:r+l/2},{x:a-s/2,y:r-l/2+d.height+b},{x:a-d.width/2,y:r-l/2+d.height+b}]:[{x:a-s/2,y:r-l/2},{x:a+s/2,y:r-l/2},{x:a+s/2,y:r-l/2+s},{x:a+d.width/2,y:r-l/2+s},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+s},{x:a-s/2,y:r-l/2+s}],B.polygon(e,i,t)},o}async function tL(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,label:c}=await w(t,e,"icon-shape default"),y=8*!!e.label,u="t"===e.pos,{nodeBorder:p,mainBkg:f}=a,{stylesMap:x}=(0,r.WW)(e),b=g.A.svg(o),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid"),$.stroke=x.get("fill")??f;let k=o.append("g");e.icon&&k.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let M=k.node().getBBox(),D=M.width,A=M.height,S=M.x,v=M.y,K=Math.max(D,A)*Math.SQRT2+40,C=b.circle(0,0,K,$),L=Math.max(K,d.width),N=K+d.height+y,F=b.rectangle(-L/2,-N/2,L,N,{...$,fill:"transparent",stroke:"none"}),R=o.insert(()=>C,":first-child"),P=o.insert(()=>F);return k.attr("transform",`translate(${-D/2-S},${u?d.height/2+y/2-A/2-v:-d.height/2-y/2-A/2-v})`),k.attr("style",`color: ${x.get("stroke")??p};`),c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-N/2:N/2-d.height})`),R.attr("transform",`translate(0,${u?d.height/2+y/2:-d.height/2-y/2})`),m(e,P),e.intersect=function(t){return h.R.info("iconSquare intersect",e,t),B.rect(e,t)},o}async function tN(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,halfPadding:c,label:y}=await w(t,e,"icon-shape default"),u="t"===e.pos,p=s+2*c,f=s+2*c,{nodeBorder:x,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),k=8*!!e.label,M=g.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=M.path(F(-f/2,-p/2,f,p,5),D),S=Math.max(f,d.width),v=p+d.height+k,K=M.rectangle(-S/2,-v/2,S,v,{...D,fill:"transparent",stroke:"none"}),C=o.insert(()=>A,":first-child").attr("class","icon-shape2"),L=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),r=a.width,l=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-r/2-n},${u?d.height/2+k/2-l/2-h:-d.height/2-k/2-l/2-h})`),t.attr("style",`color: ${$.get("stroke")??x};`)}return y.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-v/2:v/2-d.height})`),C.attr("transform",`translate(0,${u?d.height/2+k/2:-d.height/2-k/2})`),m(e,L),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=u?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+k},{x:a+f/2,y:r-l/2+d.height+k},{x:a+f/2,y:r+l/2},{x:a-f/2,y:r+l/2},{x:a-f/2,y:r-l/2+d.height+k},{x:a-d.width/2,y:r-l/2+d.height+k}]:[{x:a-f/2,y:r-l/2},{x:a+f/2,y:r-l/2},{x:a+f/2,y:r-l/2+p},{x:a+d.width/2,y:r-l/2+p},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+p},{x:a-f/2,y:r-l/2+p}],B.polygon(e,i,t)},o}async function tB(t,e,{config:{themeVariables:a,flowchart:l}}){let{labelStyles:n}=(0,r.GX)(e);e.labelStyle=n;let s=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(s,l?.wrappingWidth??0);let{shapeSvg:o,bbox:d,halfPadding:c,label:y}=await w(t,e,"icon-shape default"),u="t"===e.pos,p=s+2*c,f=s+2*c,{nodeBorder:x,mainBkg:b}=a,{stylesMap:$}=(0,r.WW)(e),k=8*!!e.label,M=g.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid"),D.stroke=$.get("fill")??b;let A=M.path(F(-f/2,-p/2,f,p,.1),D),S=Math.max(f,d.width),v=p+d.height+k,K=M.rectangle(-S/2,-v/2,S,v,{...D,fill:"transparent",stroke:"none"}),C=o.insert(()=>A,":first-child"),L=o.insert(()=>K);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,i.WY)(e.icon,{height:s,width:s,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),r=a.width,l=a.height,n=a.x,h=a.y;t.attr("transform",`translate(${-r/2-n},${u?d.height/2+k/2-l/2-h:-d.height/2-k/2-l/2-h})`),t.attr("style",`color: ${$.get("stroke")??x};`)}return y.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-v/2:v/2-d.height})`),C.attr("transform",`translate(0,${u?d.height/2+k/2:-d.height/2-k/2})`),m(e,L),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=u?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+k},{x:a+f/2,y:r-l/2+d.height+k},{x:a+f/2,y:r+l/2},{x:a-f/2,y:r+l/2},{x:a-f/2,y:r-l/2+d.height+k},{x:a-d.width/2,y:r-l/2+d.height+k}]:[{x:a-f/2,y:r-l/2},{x:a+f/2,y:r-l/2},{x:a+f/2,y:r-l/2+p},{x:a+d.width/2,y:r-l/2+p},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+p},{x:a-f/2,y:r-l/2+p}],B.polygon(e,i,t)},o}async function tF(t,e,{config:{flowchart:a}}){let l=new Image;l.src=e?.img??"",await l.decode();let i=Number(l.naturalWidth.toString().replace("px","")),n=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=i/n;let{labelStyles:s}=(0,r.GX)(e);e.labelStyle=s;let o=a?.wrappingWidth;e.defaultWidth=a?.wrappingWidth;let d=Math.max(e.label?o??0:0,e?.assetWidth??i),c="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,y="on"===e.constraint?c/e.imageAspectRatio:e?.assetHeight??n;e.width=Math.max(c,o??0);let{shapeSvg:u,bbox:p,label:f}=await w(t,e,"image-shape default"),x="t"===e.pos,b=-c/2,$=8*!!e.label,k=g.A.svg(u),M=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");let D=k.rectangle(b,-y/2,c,y,M),A=Math.max(c,p.width),S=y+p.height+$,v=k.rectangle(-A/2,-S/2,A,S,{...M,fill:"none",stroke:"none"}),K=u.insert(()=>D,":first-child"),C=u.insert(()=>v);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",c),t.attr("height",y),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-c/2},${x?S/2-y:-S/2})`)}return f.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-y/2-p.height/2-$/2:y/2-p.height/2+$/2})`),K.attr("transform",`translate(0,${x?p.height/2+$/2:-p.height/2-$/2})`),m(e,C),e.intersect=function(t){if(h.R.info("iconSquare intersect",e,t),!e.label)return B.rect(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,i=[];return i=x?[{x:a-p.width/2,y:r-l/2},{x:a+p.width/2,y:r-l/2},{x:a+p.width/2,y:r-l/2+p.height+$},{x:a+c/2,y:r-l/2+p.height+$},{x:a+c/2,y:r+l/2},{x:a-c/2,y:r+l/2},{x:a-c/2,y:r-l/2+p.height+$},{x:a-p.width/2,y:r-l/2+p.height+$}]:[{x:a-c/2,y:r-l/2},{x:a+c/2,y:r-l/2},{x:a+c/2,y:r-l/2+y},{x:a+p.width/2,y:r-l/2+y},{x:a+p.width/2/2,y:r+l/2},{x:a-p.width/2,y:r+l/2},{x:a-p.width/2,y:r-l/2+y},{x:a-c/2,y:r-l/2+y}],B.polygon(e,i,t)},u}async function tR(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.height+2*n,e.height??0),c=Math.max(h.width+2*s,(e.width??0)-d),y=[{x:0,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:-3*d/6,y:-d}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=g.A.svg(o),l=(0,r.Fr)(e,{}),i=$(y),n=t.path(i,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),u&&a.attr("style",u)}else a=E(o,c,d,y);return i&&a.attr("style",i),e.width=c,e.height=d,m(e,a),e.intersect=function(t){return B.polygon(e,y,t)},o}async function tP(t,e){let{shapeSvg:a,bbox:r,label:l}=await w(t,e,"label"),i=a.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),m(e,i),e.intersect=function(t){return B.rect(e,t)},a}async function tX(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.height+n,e.height??0),c=Math.max(h.width+s,(e.width??0)-d),y=[{x:0,y:0},{x:c+3*d/6,y:0},{x:c,y:-d},{x:-(3*d)/6,y:-d}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=g.A.svg(o),l=(0,r.Fr)(e,{}),i=$(y),n=t.path(i,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),u&&a.attr("style",u)}else a=E(o,c,d,y);return i&&a.attr("style",i),e.width=c,e.height=d,m(e,a),e.intersect=function(t){return B.polygon(e,y,t)},o}async function tG(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,s="neo"===e.look?2*n:n,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),d=Math.max(h.height+n,e.height??0),c=Math.max(h.width+s,(e.width??0)-d),y=[{x:-3*d/6,y:0},{x:c,y:0},{x:c+3*d/6,y:-d},{x:0,y:-d}],{cssStyles:u}=e;if("handDrawn"===e.look){let t=g.A.svg(o),l=(0,r.Fr)(e,{}),i=$(y),n=t.path(i,l);a=o.insert(()=>n,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),u&&a.attr("style",u)}else a=E(o,c,d,y);return i&&a.attr("style",i),e.width=c,e.height=d,m(e,a),e.intersect=function(t){return B.polygon(e,y,t)},o}function tI(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.label="",e.labelStyle=a;let i=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,s=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),d=[{x:s,y:0},{x:0,y:o+3.5},{x:s-14,y:o+3.5},{x:0,y:2*o},{x:s,y:o-3.5},{x:14,y:o-3.5}],c=g.A.svg(i),y=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let u=$(d),p=c.path(u,y),f=i.insert(()=>p,":first-child");return f.attr("class","outer-path"),n&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",n),l&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",l),f.attr("transform",`translate(-${s/2},${-o})`),m(e,f),e.intersect=function(t){return h.R.info("lightningBolt intersect",e,t),B.polygon(e,d,t)},i}(0,d.K)(tv,"hexagon"),(0,d.K)(tK,"hourglass"),(0,d.K)(tC,"icon"),(0,d.K)(tL,"iconCircle"),(0,d.K)(tN,"iconRounded"),(0,d.K)(tB,"iconSquare"),(0,d.K)(tF,"imageSquare"),(0,d.K)(tR,"inv_trapezoid"),(0,d.K)(tP,"labelRect"),(0,d.K)(tX,"lean_left"),(0,d.K)(tG,"lean_right"),(0,d.K)(tI,"lightningBolt");var tW=(0,d.K)((t,e,a,r,l,i,n)=>`M${t},${e+i} a${l},${i} 0,0,0 ${a},0 a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r} M${t},${e+i+n} a${l},${i} 0,0,0 ${a},0`,"createCylinderPathD"),tH=(0,d.K)((t,e,a,r,l,i,n)=>`M${t},${e+i} M${t+a},${e+i} a${l},${i} 0,0,0 ${-a},0 l0,${r} a${l},${i} 0,0,0 ${a},0 l0,${-r} M${t},${e+i+n} a${l},${i} 0,0,0 ${a},0`,"createOuterCylinderPathD"),tT=(0,d.K)((t,e,a,r,l,i)=>`M${t-a/2},${-r/2} a${l},${i} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tE(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let n=e.padding??0,o="neo"===e.look?16:n,h="neo"===e.look?24:n;if(e.width||e.height){let t=e.width??0;e.width=(e.width??0)-o,e.width<10&&(e.width=10),e.height=(e.height??0)-h-t/2/(2.5+t/50)*3,e.height<10&&(e.height=10)}let{shapeSvg:d,bbox:c,label:y}=await w(t,e,b(e)),u=(e?.width?e?.width:c.width)+2*o,p=u/2,f=p/(2.5+u/50),x=(e?.height?e?.height:c.height)+f+2*h,$=.1*x,{cssStyles:k}=e;if("handDrawn"===e.look){let t=g.A.svg(d),l=tH(0,0,u,x,p,f,$),i=tT(0,f,u,x,p,f),n=(0,r.Fr)(e,{}),s=t.path(l,n),o=t.path(i,n);d.insert(()=>o,":first-child").attr("class","line"),(a=d.insert(()=>s,":first-child")).attr("class","basic label-container"),k&&a.attr("style",k)}else{let t=tW(0,0,u,x,p,f,$);a=d.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,s.KL)(k)).attr("style",i)}return a.attr("label-offset-y",f),a.attr("transform",`translate(${-u/2}, ${-(x/2+f)})`),m(e,a),y.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),e.intersect=function(t){let a=B.rect(e,t),r=a.x-(e.x??0);if(0!=p&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-f)){let l=f*f*(1-r*r/(p*p));l>0&&(l=Math.sqrt(l)),l=f-l,t.y-(e.y??0)>0&&(l=-l),a.y+=l}return a},d}async function tj(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i;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:o,bbox:h,label:d}=await w(t,e,b(e)),c=(e?.width?e?.width:h.width)+(n??0)*2,y=(e?.height?e?.height:h.height)+(s??0)*2,u="neo"===e.look?y/4:y/8,p=y+u,{cssStyles:f}=e,x=g.A.svg(o),$=(0,r.Fr)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid");let M=[{x:-c/2-c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:p/2},...k(-c/2-c/2*.1,p/2,c/2+c/2*.1,p/2,u,.8),{x:c/2+c/2*.1,y:-p/2},{x:-c/2-c/2*.1,y:-p/2},{x:-c/2,y:-p/2},{x:-c/2,y:p/2*1.1},{x:-c/2,y:-p/2}],D=x.polygon(M.map(t=>[t.x,t.y]),$),A=o.insert(()=>D,":first-child");return A.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",l),A.attr("transform",`translate(0,${-u/2})`),d.attr("transform",`translate(${-c/2+(e.padding??0)+c/2*.1/2-(h.x-(h.left??0))},${-y/2+(e.padding??0)-u-(h.y-(h.top??0))})`),m(e,A),e.intersect=function(t){return B.polygon(e,M,t)},o}(0,d.K)(tE,"linedCylinder"),(0,d.K)(tj,"linedWaveEdgedRect");var tq={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},tZ=Math.PI/3,t_=(0,d.K)((t,e)=>{let a=.6*e,r=e*Math.sqrt(.64),l=Math.cos(tZ),i=-Math.sin(tZ),n=-(a*i),s=t+a*l,o=r*l,h=r*i;return`M ${n-o} ${s-h} L ${n+o} ${s+h}`},"businessMarkerPathForCircle"),tz={normal:t_(-24,12),hollow:t_(-23,9),awesome:t_(-21,13),icon:"M 12 -8 L 26 -26"},tO=(0,d.K)((t,e,a)=>{let r=(e.x??0)-(e.left??0),l=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-r},${a-e.height/2-l})`)},"positionLabel"),tV=(0,d.K)((t,e,a,l,i=!1)=>{if("handDrawn"===e.look){let n=g.A.svg(t).path(a,(0,r.Fr)(e,i?{fill:"none"}:{}));return t.insert(()=>n,":first-child").attr("class",l)}let n=t.append("path").attr("class",l).attr("d",a);return i&&n.attr("fill","none"),n},"appendActorPath"),tY=(0,d.K)((t,e,a,l,i,n,s=!1)=>{if("handDrawn"===e.look){let o=g.A.svg(t).circle(a,l,2*i,(0,r.Fr)(e,s?{fill:"none"}:{}));return t.insert(()=>o,":first-child").attr("class",n)}let o=t.append("circle").attr("class",n).attr("cx",a).attr("cy",l).attr("r",i);return s&&o.attr("fill","none"),o},"appendActorCircle"),tJ=(0,d.K)((t,e,a)=>{e.business&&t.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",tz[a]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function tU(t,e,a,l){let i,s,{labelStyles:h,nodeStyles:d}=(0,r.GX)(e);e.labelStyle=h;let c="icon"===a||void 0!==e.stereotype?{...e,icon:"icon"===a?void 0:e.icon,stereotype:void 0}:e,{shapeSvg:g,bbox:y,label:u}=await w(t,c,b(e,`usecase-actor-variant usecase-actor-${a}`)),p=e.accessibleName??e.label;p&&g.attr("role","img").attr("aria-label",p),u.attr("class","label actor-label usecase-actor-label");let{theme:f,themeVariables:$}=(0,o.D7)();if((0,n.XE)(g,e.colorIndex,f,$.borderColorArray),e.stereotype){let t=await x(g,`\xab${e.stereotype}\xbb`,{labelStyle:h,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});i=t.label.attr("class","label usecase-stereotype"),s=t.bbox}let k=g.append("g").attr("class",`usecase-actor-glyph ${tq[a]}`).attr("style",d||null);await l(k,e),tJ(k,e,a);let M=e.padding??8,D=s?.height??0,A=80+y.height+(s?D+2:0),S=Math.max(56,y.width,s?.width??0)+2*M,v=A+2*M,K=-A/2;k.attr("transform",`translate(0,${K+36})`);let C=K+72+8;return i&&s&&(tO(i,s,C+=D/2),C+=D/2+2),tO(u,y,C+y.height/2),m(e,g.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-S/2).attr("y",-v/2).attr("width",S).attr("height",v).attr("opacity",0).attr("aria-hidden","true")),e.intersect=t=>B.rect(e,t),g}async function tQ(t,e){return tU(t,e,"normal",(t,e)=>{tV(t,e,"M 0 -12 C 6.627 -12 12 -17.373 12 -24 C 12 -30.627 6.627 -36 0 -36 C -6.627 -36 -12 -30.627 -12 -24 C -12 -17.373 -6.627 -12 0 -12 Z M 0 -12 V 8 M -17 -5 H 17 M 0 8 L -15 28 M 0 8 L 15 28","usecase-actor-stick")})}async function t0(t,e){return tU(t,e,"awesome",(t,e)=>{tV(t,e,"M 0 -34 C 7.18 -34 13 -28.18 13 -21 C 13 -13.82 7.18 -8 0 -8 C -7.18 -8 -13 -13.82 -13 -21 C -13 -28.18 -7.18 -34 0 -34 Z M -24 25 C -24 7 -14 -3 0 -3 C 14 -3 24 7 24 25 C 24 28 21 30 18 30 H -18 C -21 30 -24 28 -24 25 Z","usecase-actor-awesome-silhouette")})}async function t2(t,e){return tU(t,e,"hollow",(t,e)=>{tY(t,e,0,-23,9,"usecase-actor-hollow-head",!0),tV(t,e,"M -22 -10 H 22 V 0 H 6 L 22 17 L 13 28 L 0 13 L -13 28 L -22 17 L -6 0 H -22 Z","usecase-actor-hollow-body",!0)})}(0,d.K)(tU,"renderUsecaseActor"),(0,d.K)(tQ,"usecaseActor"),(0,d.K)(t0,"usecaseActorAwesome"),(0,d.K)(t2,"usecaseActorHollow");var t1=(0,d.K)(async(t,e)=>{if("handDrawn"===e.look){let a=g.A.svg(t).rectangle(-26,-28,52,52,(0,r.Fr)(e,{}));t.insert(()=>a,":first-child").attr("class","usecase-actor-icon-frame")}else t.append("rect").attr("class","usecase-actor-icon-frame").attr("x",-26).attr("y",-28).attr("width",52).attr("height",52).attr("rx",4).attr("ry",4);let a=e.icon??"",l=await (0,i.dn)(a.includes(":")?a:`fa:${a}`),n=await (0,i.WY)(a,{height:42,width:42,fallbackPrefix:"fa"}),s=t.append("g").attr("class",`usecase-actor-icon-symbol${l?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${n}</g>`),o=s.node()?.getBBox();o&&s.attr("transform",`translate(${-o.width/2-o.x},${-2-o.height/2-o.y})`)},"drawIconActor");async function t5(t,e){return tU(t,e,"icon",t1)}(0,d.K)(t5,"usecaseActorIcon");var t8=(0,d.K)((t,e,a)=>{let r=(e.x??0)-(e.left??0),l=(e.y??0)-(e.top??0);t.attr("transform",`translate(${-e.width/2-r},${a-e.height/2-l})`)},"positionLabel");async function t3(t,e){let a,l,i,{labelStyles:s,nodeStyles:h}=(0,r.GX)(e);e.labelStyle=s;let d=e.stereotype?{...e,stereotype:void 0}:e,{shapeSvg:c,bbox:y,halfPadding:u,label:p}=await w(t,d,b(e,"usecase-business-shape"));p.attr("class","label usecase-label");let{theme:f,themeVariables:$}=(0,o.D7)();if((0,n.XE)(c,e.colorIndex,f,$.borderColorArray),e.stereotype){let t=await x(c,`\xab${e.stereotype}\xbb`,{labelStyle:s,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0,width:e.wrappingWidth});a=t.label.attr("class","label usecase-stereotype"),l=t.bbox}let k=2*!!l,M=y.height+(l?.height??0)+k,D=Math.max(y.width,l?.width??0),A=u??10,S=D/2+2*A,v=M/2+2*A,K=Math.min(Math.max(A/5,1),A/2),C=D/2+K,L=S-K,N=C/S,F=L/S,R=v*Math.sqrt(Math.max(0,1-N*N)),P=-v*Math.sqrt(Math.max(0,1-F*F));if(a&&l&&t8(a,l,-M/2+l.height/2),t8(p,y,M/2-y.height/2),"handDrawn"===e.look){let t=g.A.svg(c).ellipse(0,0,2*S,2*v,(0,r.Fr)(e,{}));i=c.insert(()=>t,":first-child").attr("class","basic label-container usecase-business-ellipse")}else i=c.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",h).attr("rx",S).attr("ry",v).attr("cx",0).attr("cy",0);c.append("path").attr("class","usecase-business-marker").attr("d",`M ${C} ${R} L ${L} ${P}`).attr("fill","none").attr("style",h||null);let X=e.accessibleName??e.label;return X&&c.attr("role","img").attr("aria-label",X),m(e,i),e.calcIntersect=(t,e)=>B.ellipse(t,t.width/2,t.height/2,e),e.intersect=t=>B.ellipse(e,S,v,t),c}(0,d.K)(t3,"usecaseBusiness");var t4=(0,d.K)((t,e,a,r)=>{let l=(e.x??0)-(e.left??0),i=(e.y??0)-(e.top??0);t.attr("transform",`translate(${a-e.width/2-l},${r-e.height/2-i})`)},"positionLabel"),t7=(0,d.K)(t=>{let e=Number.parseFloat(t??"");return Number.isFinite(e)&&e>=0?e:1},"numericStrokeWidth");async function t6(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e),{stylesMap:i}=(0,r.WW)(e);e.labelStyle=a;let{shapeSvg:n,bbox:s,label:o}=await w(t,e,b(e,"usecase-json-table"));n.attr("role","img"),e.accessibleName&&n.attr("aria-label",e.accessibleName),o.attr("class","label usecase-json-title");let h=n.append("g").attr("class","usecase-json-table-grid"),c=[];for(let t of e.jsonRows??[]){let r=await x(h,t.key,{labelStyle:a,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0}),l=await x(h,t.value,{labelStyle:a,useHtmlLabels:e.useHtmlLabels,padding:0,centerLabel:!0});c.push({key:{label:r.label.attr("class","label usecase-json-key"),bbox:r.bbox},value:{label:l.label.attr("class","label usecase-json-value"),bbox:l.bbox}})}let y=Math.max(0,...c.map(({key:t})=>t.bbox.width))+16,u=Math.max(0,...c.map(({value:t})=>t.bbox.width))+16,p=Math.max(s.width+16,y+u),f=u+Math.max(0,p-y-u),$=s.height+8,k=c.map(({key:t,value:e})=>Math.max(t.bbox.height,e.bbox.height)+8),M=$+k.reduce((t,e)=>t+e,0),D=t7(i.get("stroke-width")),A=p+2*D,S=M+2*D,v=-p/2,K=-M/2,C="handDrawn"===e.look?g.A.svg(n):void 0,L=C?(0,r.Fr)(e,{}):void 0,N=(0,d.K)((t,e,a,r,i,n)=>{if(C&&L){let l=C.rectangle(a,r,i,n,L);return t.insert(()=>l,":first-child").attr("class",e)}return t.insert("rect",":first-child").attr("class",e).attr("x",a).attr("y",r).attr("width",i).attr("height",n).attr("style",l)},"insertCell"),F=N(n,"label-container usecase-json-border",-A/2,-S/2,A,S);N(h,"usecase-json-cell usecase-json-title-cell",v,K,p,$),h.node()?.append(o.node()),t4(o,s,0,K+$/2);let R=K+$;return c.forEach(({key:t,value:e},a)=>{let r=k[a],l=h.append("g").attr("class","usecase-json-row").attr("data-row-index",a).attr("transform",`translate(0,${R})`);N(l,"usecase-json-cell usecase-json-key-cell",v,0,y,r),N(l,"usecase-json-cell usecase-json-value-cell",v+y,0,f,r),l.node()?.append(t.label.node(),e.label.node()),t4(t.label,t.bbox,v+y/2,r/2),t4(e.label,e.bbox,v+y+f/2,r/2),R+=r}),m(e,F),e.intersect=t=>B.rect(e,t),n}async function t9(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i,o="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*n-2*o,10),e.height=Math.max((e?.height??0)-2*s-2*o,10));let{shapeSvg:h,bbox:d,label:c}=await w(t,e,b(e)),y=(e?.width?e?.width:d.width)+2*n+2*o,u=(e?.height?e?.height:d.height)+2*s+2*o,p=y-2*o,f=u-2*o,x=-p/2,k=-f/2,{cssStyles:M}=e,A=g.A.svg(h),S=(0,r.Fr)(e,{}),v=[{x:x-o,y:k+o},{x:x-o,y:k+f+o},{x:x+p-o,y:k+f+o},{x:x+p-o,y:k+f},{x:x+p,y:k+f},{x:x+p,y:k+f-o},{x:x+p+o,y:k+f-o},{x:x+p+o,y:k-o},{x:x+o,y:k-o},{x:x+o,y:k},{x,y:k},{x,y:k+o}];"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");let K=$(v),C=A.path(K,S),L=$([{x,y:k+o},{x:x+p-o,y:k+o},{x:x+p-o,y:k+f},{x:x+p,y:k+f},{x:x+p,y:k},{x,y:k}]),N=A.path(L,S);"handDrawn"!==e.look&&(C=D(C),N=D(N));let F=h.insert("g",":first-child");return F.insert(()=>C),F.insert(()=>N),F.attr("class","basic label-container outer-path"),M&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",M),l&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",l),c.attr("transform",`translate(${-(d.width/2)-o-(d.x-(d.left??0))}, ${-(d.height/2)+o-(d.y-(d.top??0))})`),m(e,F),e.intersect=function(t){return B.polygon(e,v,t)},h}async function et(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o=e.padding??0,h="neo"===e.look?16:o,d="neo"===e.look?12:o,c=!0;(e.width||e.height)&&(c=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*d);let y=Math.max(n.width,e?.width??0)+2*h,u=Math.max(n.height,e?.height??0)+3*d,p="neo"===e.look?u/4:u/8,f=u+(c?p/2:-p/2),x=-y/2,M=-f/2,{cssStyles:D}=e,A=k(x-10,M+f+10,x+y-10,M+f+10,p,.8),S=A?.[A.length-1],v=[{x:x-10,y:M+10},{x:x-10,y:M+f+10},...A,{x:x+y-10,y:S.y-10},{x:x+y,y:S.y-10},{x:x+y,y:S.y-20},{x:x+y+10,y:S.y-20},{x:x+y+10,y:M-10},{x:x+10,y:M-10},{x:x+10,y:M},{x,y:M},{x,y:M+10}],K=[{x,y:M+10},{x:x+y-10,y:M+10},{x:x+y-10,y:S.y-10},{x:x+y,y:S.y-10},{x:x+y,y:M},{x,y:M}],C=g.A.svg(i),L=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(L.roughness=0,L.fillStyle="solid");let N=$(v),F=C.path(N,L),R=$(K),P=C.path(R,L),X=i.insert(()=>F,":first-child");return X.insert(()=>P),X.attr("class","basic label-container outer-path"),D&&"handDrawn"!==e.look&&X.selectAll("path").attr("style",D),l&&"handDrawn"!==e.look&&X.selectAll("path").attr("style",l),X.attr("transform",`translate(0,${-p/2})`),s.attr("transform",`translate(${-(n.width/2)-10-(n.x-(n.left??0))}, ${-(n.height/2)+10-p-(n.y-(n.top??0))})`),m(e,X),e.intersect=function(t){return B.polygon(e,v,t)},i}async function ee(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l,e.useHtmlLabels||(0,o.E)((0,o.zj)())||(e.centerLabel=!0);let{shapeSvg:n,bbox:s,label:h}=await w(t,e,b(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:y}=e,u=g.A.svg(n),p=(0,r.Fr)(e,{fill:a.noteBkgColor,stroke:a.noteBorderColor});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let f=u.rectangle(-d/2,-c/2,d,c,p),x=n.insert(()=>f,":first-child");return x.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),y&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",y),i&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",i),h.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),m(e,x),e.intersect=function(t){return B.rect(e,t)},n}(0,d.K)(t6,"usecaseJsonTable"),(0,d.K)(t9,"multiRect"),(0,d.K)(et,"multiWaveEdgedRectangle"),(0,d.K)(ee,"note");var ea=(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 er(t,e){let a,{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{shapeSvg:n,bbox:s}=await w(t,e,b(e)),o=s.width+(e.padding??0)+(s.height+(e.padding??0)),h=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],{cssStyles:d}=e;if("handDrawn"===e.look){let t=g.A.svg(n),l=(0,r.Fr)(e,{}),i=ea(0,0,o),s=t.path(i,l);a=n.insert(()=>s,":first-child").attr("transform",`translate(${-o/2+.5}, ${o/2})`),d&&a.attr("style",d)}else(a=E(n,o,o,h)).attr("transform",`translate(${-o/2+.5}, ${o/2})`);return i&&a.attr("style",i),m(e,a),e.calcIntersect=function(t,e){let a=t.width;return B.polygon(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e)},e.intersect=function(t){return this.calcIntersect(e,t)},n}async function el(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?21:i??0,s="neo"===e.look?12:i??0,{shapeSvg:o,bbox:h,label:d}=await w(t,e,b(e)),c=h.width+("neo"===e.look?2*n:n),y=Math.max(h.height+("neo"===e.look?2*s:s),e.height??0),u=-Math.max(c,(e.width??0)-y/4)/2,p=-y/2,f=p/2,x=[{x:u+f,y:p},{x:u,y:0},{x:u+f,y:-p},{x:-u,y:-p},{x:-u,y:p}],{cssStyles:k}=e,M=g.A.svg(o),D=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(D.roughness=0,D.fillStyle="solid");let A=$(x),S=M.path(A,D),v=o.insert(()=>S,":first-child");return v.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",k),l&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",l),v.attr("transform",`translate(${-f/2},0)`),d.attr("transform",`translate(${-f/2-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),m(e,v),e.intersect=function(t){return B.polygon(e,x,t)},o}async function ei(t,e){let a,l,i,{labelStyles:n,nodeStyles:s}=(0,r.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"),u=d.insert("g").attr("class","label").attr("style",s),p=e.description,f=e.label,w=await R(u,f,e.labelStyle,!0,!0),x={width:0,height:0};if((0,o.E)((0,o.D7)())){let t=w.children[0],e=(0,c.Ltv)(w);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}h.R.info("Text 2",p);let b=p||[],$=w.getBBox(),k=await R(u,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),M=k.children[0],D=(0,c.Ltv)(k);x=M.getBoundingClientRect(),D.attr("width",x.width),D.attr("height",x.height);let A=(e.padding||0)/2;(0,c.Ltv)(k).attr("transform","translate( "+(x.width>$.width?0:($.width-x.width)/2)+", "+($.height+A+5)+")"),(0,c.Ltv)(w).attr("transform","translate( "+(x.width<$.width?0:-($.width-x.width)/2)+", 0)"),x=u.node().getBBox(),u.attr("transform","translate("+-x.width/2+", "+(-x.height/2-A+3)+")");let S=x.width+(e.padding||0),v=x.height+(e.padding||0),K=-x.width/2-A,C=-x.height/2-A;if("handDrawn"===e.look){let t=g.A.svg(d),a=(0,r.Fr)(e,{}),n=t.path(F(K,C,S,v,e.rx||0),a),s=t.line(-x.width/2-A,-x.height/2-A+$.height+A,x.width/2+A,-x.height/2-A+$.height+A,a);i=d.insert(()=>(h.R.debug("Rough node insert CXC",n),s),":first-child"),l=d.insert(()=>(h.R.debug("Rough node insert CXC",n),n),":first-child")}else l=y.insert("rect",":first-child"),i=y.insert("line"),l.attr("class","outer title-state").attr("style",s).attr("x",-x.width/2-A).attr("y",-x.height/2-A).attr("width",x.width+(e.padding||0)).attr("height",x.height+(e.padding||0)),i.attr("class","divider").attr("x1",-x.width/2-A).attr("x2",x.width/2+A).attr("y1",-x.height/2-A+$.height+A).attr("y2",-x.height/2-A+$.height+A);return m(e,l),e.intersect=function(t){return B.rect(e,t)},d}async function en(t,e,{config:{themeVariables:a}}){let r=a?.radius??5,l={rx:r,ry:r,classes:"",labelPaddingX:(e?.padding??0)*1,labelPaddingY:(e?.padding??0)*1};return tf(t,e,l)}async function es(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i="neo"===e.look?16:e.padding??0,n="neo"===e.look?12:e.padding??0,{shapeSvg:o,bbox:h,label:d}=await w(t,e,b(e)),c=(e?.width??h.width)+2*i+("neo"===e.look?8:16),y=(e?.height??h.height)+2*n,u=c-8,p=8-c/2,f=-y/2,{cssStyles:x}=e,$=g.A.svg(o),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=$.polygon([{x:p,y:f},{x:p+u,y:f},{x:p+u,y:f+y},{x:p-8,y:f+y},{x:p-8,y:f},{x:p,y:f},{x:p,y:f+y}].map(t=>[t.x,t.y]),k),D=o.insert(()=>M,":first-child");return D.attr("class","basic label-container outer-path").attr("style",(0,s.KL)(x)),l&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),x&&"handDrawn"!==e.look&&D.selectAll("path").attr("style",l),d.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),m(e,D),e.intersect=function(t){return B.rect(e,t)},o}async function eo(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i;(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:o,bbox:h,label:d}=await w(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*n,y=((e?.height?e?.height:h.height)+2*s)*1.5/1.5,u=-c/2,p=-y/2,{cssStyles:f}=e,x=g.A.svg(o),k=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let M=[{x:u,y:p},{x:u,y:p+y},{x:u+c,y:p+y},{x:u+c,y:p-y/2}],D=$(M),A=x.path(D,k),S=o.insert(()=>A,":first-child");return S.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",f),l&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",l),S.attr("transform",`translate(0, ${y/4})`),d.attr("transform",`translate(${-c/2+(e.padding??0)-(h.x-(h.left??0))}, ${-y/4+(e.padding??0)-(h.y-(h.top??0))})`),m(e,S),e.intersect=function(t){return B.polygon(e,M,t)},o}async function eh(t,e){let a=e.padding??0,r="neo"===e.look?16:2*a,l="neo"===e.look?12:a,i={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??r,labelPaddingY:l},s=await tf(t,e,i);if(void 0!==e.colorIndex){let{theme:t,themeVariables:a}=(0,o.D7)();(0,n.XE)(s,e.colorIndex,t,a.borderColorArray)}return s}(0,d.K)(er,"question"),(0,d.K)(el,"rect_left_inv_arrow"),(0,d.K)(ei,"rectWithTitle"),(0,d.K)(en,"roundedRect"),(0,d.K)(es,"shadedProcess"),(0,d.K)(eo,"slopedRect"),(0,d.K)(eh,"squareRect");var ed=(0,d.K)((t,e,a)=>{let r=t.height+a,l=r*Math.cos(Math.PI/98),i=Math.sqrt(Math.max(0,l**2-t.height**2));return{w:Math.max(t.width+r/4+e,1.5*r+(r-l),t.width+e+r-i),h:r}},"stadiumDimensions");async function ec(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?40:i,s="neo"===e.look?24:i,{shapeSvg:o,bbox:h}=await w(t,e,b(e)),{w:d,h:c}=ed(h,n,s),y=c/2,{cssStyles:u}=e,p=g.A.svg(o),f=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let x=[{x:-d/2+y,y:-c/2},{x:d/2-y,y:-c/2},...M(-d/2+y,0,y,50,90,270),{x:d/2-y,y:c/2},...M(d/2-y,0,y,50,270,450)],k=$(x),D=p.path(k,f),A=o.insert(()=>D,":first-child");return A.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&A.selectChildren("path").attr("style",l),m(e,A),e.intersect=function(t){return B.polygon(e,x,t)},o}async function eg(t,e){let a={rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"};return tf(t,e,a)}function ey(t,e,{config:{themeVariables:a}}){let{labelStyles:l,nodeStyles:i}=(0,r.GX)(e);e.labelStyle=l;let{cssStyles:n}=e,{lineColor:s,stateBorder:o,nodeBorder:h,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),u=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let p=y.circle(0,0,e.width,{...u,stroke:s,strokeWidth:2}),f=o??h,w=(e.width??0)*5/14,x=y.circle(0,0,w,{...u,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),b=c.insert(()=>p,":first-child");if(b.insert(()=>x),"handDrawn"!==e.look&&b.attr("class","outer-path"),n&&b.selectAll("path").attr("style",n),i&&b.selectAll("path").attr("style",i),e.width<25&&d&&"handDrawn"!==e.look){let e=t.node()?.ownerSVGElement?.id??"",a=e?`${e}-drop-shadow-small`:"drop-shadow-small";b.attr("style",`filter:url(#${a})`)}return m(e,b),e.intersect=function(t){return B.circle(e,(e.width??0)/2,t)},c}function eu(t,e,{config:{themeVariables:a}}){let l,{lineColor:i,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,r.ue)(i));(l=s.insert(()=>t)).attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else(l=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";l.attr("style",`filter:url(#${a})`)}return m(e,l),e.intersect=function(t){return B.circle(e,(e.width??7)/2,t)},s}async function ep(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e?.padding??8,n="neo"===e.look?28:i,o="neo"===e.look?12:i,{shapeSvg:h,bbox:d}=await w(t,e,b(e)),c=Math.max(d.width+16+n,e.width??0),y=Math.max(d.height+o,e.height??0),u=c-16,p=-c/2,f=-y/2,x=[{x:0,y:0},{x:u,y:0},{x:u,y:-y},{x:0,y:-y},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-y},{x:-8,y:-y},{x:-8,y:0}];if("handDrawn"===e.look){let t=g.A.svg(h),a=(0,r.Fr)(e,{}),l=t.rectangle(p,f,u+16,y,a),i=t.line(p+8,f,p+8,f+y,a),n=t.line(p+8+u,f,p+8+u,f+y,a);h.insert(()=>i,":first-child"),h.insert(()=>n,":first-child");let o=h.insert(()=>l,":first-child"),{cssStyles:d}=e;o.attr("class","basic label-container").attr("style",(0,s.KL)(d)),m(e,o)}else{let t=E(h,u,y,x);l&&t.attr("style",l),m(e,t)}return e.intersect=function(t){return B.polygon(e,x,t)},h}async function ef(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let i=e.padding??0,n="neo"===e.look?16:i,s="neo"===e.look?12:i;(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:o,bbox:h}=await w(t,e,b(e)),d=(e?.height?e?.height:h.height)+2*s,c=.2*d,y=(e?.width?e?.width:h.width)+2*n+c-c,u=-y/2,p=-d/2,{cssStyles:f}=e,x=g.A.svg(o),k=(0,r.Fr)(e,{}),M=[{x:u-c/2,y:p},{x:u+y+c/2,y:p},{x:u+y+c/2,y:p+d},{x:u-c/2,y:p+d}];"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");let D=$(M),A=x.path(D,k),S=$([{x:u+y-c/2,y:p+d},{x:u+y+c/2,y:p+d},{x:u+y+c/2,y:p+d-.2*d}]),v=x.path(S,{...k,fillStyle:"solid"}),K=o.insert(()=>v,":first-child");return K.insert(()=>A,":first-child"),K.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&K.selectAll("path").attr("style",l),m(e,K),e.intersect=function(t){return B.polygon(e,M,t)},o}async function ew(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n,label:s}=await w(t,e,b(e)),o=Math.max(n.width+(e.padding??0)*2,e?.width??0),h=Math.max(n.height+(e.padding??0)*2,e?.height??0),d=h/8,c=.2*o,y=.2*h,u=h+d,{cssStyles:p}=e,f=g.A.svg(i),x=(0,r.Fr)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid");let M=[{x:-o/2-o/2*.1,y:u/2},...k(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,d,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2}],D=-o/2+o/2*.1,A=-u/2-.4*y,S=[{x:D+o-c,y:(A+h)*1.3},{x:D+o,y:A+h-y},{x:D+o,y:(A+h)*.9},...k(D+o,(A+h)*1.25,D+o-c,(A+h)*1.3,-(.02*h),.5)],v=$(M),K=f.path(v,x),C=$(S),L=f.path(C,{...x,fillStyle:"solid"}),N=i.insert(()=>L,":first-child");return N.insert(()=>K,":first-child"),N.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",p),l&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",l),N.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-o/2+(e.padding??0)-(n.x-(n.left??0))},${-h/2+(e.padding??0)-d/2-(n.y-(n.top??0))})`),m(e,N),e.intersect=function(t){return B.polygon(e,M,t)},i}async function ex(t,e){let{labelStyles:a,nodeStyles:l}=(0,r.GX)(e);e.labelStyle=a;let{shapeSvg:i,bbox:n}=await w(t,e,b(e)),s=Math.max(n.width+(e.padding??0),e?.width||0),o=Math.max(n.height+(e.padding??0),e?.height||0),h=i.insert("rect",":first-child");return h.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-o/2).attr("width",s).attr("height",o),m(e,h),e.intersect=function(t){return B.rect(e,t)},i}(0,d.K)(ec,"stadium"),(0,d.K)(eg,"state"),(0,d.K)(ey,"stateEnd"),(0,d.K)(eu,"stateStart"),(0,d.K)(ep,"subroutine"),(0,d.K)(ef,"taggedRect"),(0,d.K)(ew,"taggedWaveEdgedRectangle"),(0,d.K)(ex,"text");var em=(0,d.K)((t,e,a,r,l,i)=>`M${t},${e}
3
3
  a${l},${i} 0,0,1 0,${-r}
4
4
  l${a},0
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3787,6815,9492],{54131:()=>{}},_=>{_.O(0,[6396,5535,7358],()=>_(_.s=54131)),_N_E=_.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6605],{16169:(e,t,a)=>{"use strict";a.d(t,{A:()=>i});var r=a(64297);let n=function(){for(var e=arguments.length,t=Array(e),a=0;a<e;a++)t[a]=arguments[a];return t.filter((e,t,a)=>!!e&&""!==e.trim()&&a.indexOf(e)===t).join(" ").trim()},s=e=>{let t=e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,a)=>a?a.toUpperCase():t.toLowerCase());return t.charAt(0).toUpperCase()+t.slice(1)};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let o=(0,r.createContext)({}),c=(0,r.forwardRef)((e,t)=>{var a,s,c;let{color:i,size:d,strokeWidth:u,absoluteStrokeWidth:m,className:p="",children:h,iconNode:b,...x}=e,{size:f=24,strokeWidth:g=2,absoluteStrokeWidth:w=!1,color:y="currentColor",className:v=""}=null!=(a=(0,r.useContext)(o))?a:{},N=(null!=m?m:w)?24*Number(null!=u?u:g)/Number(null!=d?d:f):null!=u?u:g;return(0,r.createElement)("svg",{ref:t,...l,width:null!=(s=null!=d?d:f)?s:l.width,height:null!=(c=null!=d?d:f)?c:l.height,stroke:null!=i?i:y,strokeWidth:N,className:n("lucide",v,p),...!h&&!(e=>{for(let t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0;return!1})(x)&&{"aria-hidden":"true"},...x},[...b.map(e=>{let[t,a]=e;return(0,r.createElement)(t,a)}),...Array.isArray(h)?h:[h]])}),i=(e,t)=>{let a=(0,r.forwardRef)((a,l)=>{let{className:o,...i}=a;return(0,r.createElement)(c,{ref:l,iconNode:t,className:n("lucide-".concat(s(e).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()),"lucide-".concat(e),o),...i})});return a.displayName=s(e),a}},17096:(e,t,a)=>{"use strict";a.d(t,{A:()=>r});let r=(0,a(16169).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},24331:(e,t,a)=>{"use strict";a.d(t,{GM:()=>o,J3:()=>l,WF:()=>r,bR:()=>s,m:()=>c,r5:()=>n});let r="/v1/devices",n="/v1/approvals/merges",s="/v1/templates/capability-preview",l="/v1/idle-nudge/preview",o="/v1/morning-digest/showroom",c="/v1/next-fluent/dispatch"},28604:(e,t,a)=>{"use strict";function r(e){return{slides:e.slides.map(e=>{let{image:t,caption:a,include:r}=e;return{image:t,caption:a,include:r}}),caption:{hook:e.caption.hook,body:e.caption.body},hashtags:[...e.hashtags],cover:{text:e.cover.text,sub:e.cover.sub},location:e.location}}a.d(t,{$Y:()=>l,LP:()=>c,Mz:()=>r,ll:()=>d,rH:()=>o});class n extends Error{constructor(e,t){super(t),this.status=e,this.name="GraphApprovalsApiError"}}let s={list:"목록을 보려면",decide:"승인하려면",save:"초안을 저장하려면"},l="/app/settings/#bearer-token";function o(e){return e instanceof n&&(401===e.status||403===e.status)}function c(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"decide";return e instanceof n?401===e.status||403===e.status?"".concat(s[t]," 이 기기를 데몬에 연결해야 합니다 — 설정 › 데몬 연결 › 연결 토큰 칸에 토큰을 넣어 주세요."):404===e.status?"이 실행을 찾지 못했습니다. 목록을 다시 확인해 주세요.":409===e.status?"이미 결정된 실행입니다. 목록을 다시 확인해 주세요.":400===e.status?"결정 내용을 확인한 뒤 다시 시도해 주세요.":"승인 요청을 처리하지 못했습니다. 잠시 뒤 다시 시도해 주세요.":e instanceof TypeError?"서버에 연결하지 못했습니다. 연결 상태를 확인해 주세요.":"승인 요청을 처리하지 못했습니다. 잠시 뒤 다시 시도해 주세요."}let i="/v1/graph-approvals";function d(e){var t,a;let r=(null!=(t=e.baseUrl)?t:"").replace(/\/+$/,""),s=null!=(a=e.fetchImpl)?a:fetch;async function l(t,a){let l={...a,headers:{"content-type":"application/json",...e.authHeader?{authorization:e.authHeader}:{}}},o=e.client?await e.client.fetchResponse(t,l):await s("".concat(r).concat(t),l),c=await o.json().catch(()=>null);if(!o.ok){let e=c&&"object"==typeof c&&"error"in c&&"string"==typeof c.error?c.error:"request-failed";throw new n(o.status,e)}return c}return{list:()=>l(i),decide:(e,t,a)=>l("".concat(i,"/").concat(encodeURIComponent(e),"/").concat(encodeURIComponent(t)),{method:"POST",body:JSON.stringify({decision:a})}),saveFeedDraft:(e,t,a)=>l("".concat(i,"/").concat(encodeURIComponent(e),"/").concat(encodeURIComponent(t),"/feed-draft"),{method:"PUT",body:JSON.stringify(a)}),feedMedia:async(t,a,l)=>{let o="".concat(i,"/").concat(encodeURIComponent(t),"/").concat(encodeURIComponent(a),"/media?path=").concat(encodeURIComponent(l)),c={headers:e.authHeader?{authorization:e.authHeader}:{}},d=e.client?await e.client.fetchResponse(o,c):await s("".concat(r).concat(o),c);if(!d.ok)throw new n(d.status,"media-failed");return d.blob()}}}},30233:(e,t,a)=>{Promise.resolve().then(a.bind(a,82105))},75117:(e,t,a)=>{"use strict";a.d(t,{Zr:()=>l,f6:()=>n,oD:()=>s});let r="elanous.daemon.sessionId";function n(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function s(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(r,e),e):localStorage.getItem(r)}();if(e)return e;let t=n();return localStorage.setItem(r,t),t}function l(){let e=n();return localStorage.setItem(r,e),e}},79836:(e,t,a)=>{"use strict";a.d(t,{C:()=>i,DaemonProvider:()=>d,Q:()=>u});var r=a(65245),n=a(64297),s=a(67890),l=a(75117),o=a(79948),c=a(62391);let i=(0,n.createContext)(null);function d(e){let{children:t}=e,a={baseUrl:"",token:"",provider:""},[d,u]=(0,n.useState)(a),[m,p]=(0,n.useState)(""),[h]=(0,n.useState)(()=>new o.ki(a));(0,n.useEffect)(()=>{let e=(0,s.Fp)();u(e),h.updateConfig(e),p((0,l.oD)()),(0,c.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[h]),(0,n.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,s.Fp)();h.updateConfig(t),u(t),(0,c.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&p(t=>t===e.newValue?t:((0,c.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[h]);let b=e=>{u(t=>{let a={...t,...e};return(0,s.Qc)(e),h.updateConfig(a),(0,c.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),a})},x=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,c.cY)("webterm.provider.daemon.session-set",{sessionId:e})},f=(0,n.useMemo)(()=>({config:d,setConfig:b,client:h,sessionId:m,setSessionId:x}),[d,h,m]);return(0,r.jsx)(i.Provider,{value:f,children:t})}function u(){let e=(0,n.useContext)(i);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},82105:(e,t,a)=>{"use strict";a.r(t),a.d(t,{default:()=>j});var r=a(65245),n=a(64297),s=a(51190),l=a(55433),o=a(79836),c=a(94087),i=a(89356);function d(e,t){return"UNKNOWN"===t&&e<3?3e3:null}async function u(e,t){let a,r=0,n=d(0,"UNKNOWN");for(;null!==n;){var s,l,o;if(await t.sleep(n),t.isActive&&!t.isActive())break;r++;try{a=await e(),null==(l=t.onDetail)||l.call(t,a)}catch(e){}null==(s=t.onAttempt)||s.call(t),n=d(r,null!=(o=null==a?void 0:a.mergeable)?o:"UNKNOWN")}return{attempts:r,...a?{last:a}:{}}}var m=a(17096);function p(e){let{view:t,target:a}=e,[s]=(0,n.useState)(()=>Date.now()),[l,o]=(0,n.useState)(s);(0,n.useEffect)(()=>{let e=window.setInterval(()=>o(Date.now()),100);return()=>window.clearInterval(e)},[]);let c=function(e,t,a){let r="".concat((Math.max(0,e)/1e3).toFixed(1),"초");return{title:"merged"===t?"GitHub 에서 반영된 코드 변경을 읽고 있습니다":a?"GitHub 에서 승인을 기다리는 코드 변경과 #".concat(a," 카드를 읽고 있습니다"):"GitHub 에서 승인을 기다리는 코드 변경을 읽고 있습니다",clock:r,hint:e>=8e3?"평소(2~5초)보다 오래 걸립니다 — GitHub 응답을 기다리는 중이며 멈추지 않았습니다.":null}}(l-s,t,a);return(0,r.jsxs)("section",{role:"status","aria-live":"polite","aria-busy":"true",className:"space-y-3","data-approvals-loading":!0,children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 rounded-xl border border-blue-500/40 bg-blue-500/5 p-4",children:[(0,r.jsx)(m.A,{className:"h-6 w-6 shrink-0 text-blue-500 motion-safe:animate-spin","aria-hidden":!0}),(0,r.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,r.jsx)("p",{className:"font-medium",children:c.title}),c.hint&&(0,r.jsx)("p",{className:"mt-1 text-sm text-amber-600 dark:text-amber-400",children:c.hint})]}),(0,r.jsx)("span",{className:"font-mono text-lg tabular-nums text-blue-600 dark:text-blue-300","aria-label":"경과 시간",children:c.clock})]}),(0,r.jsx)("div",{className:"h-1 overflow-hidden rounded-full bg-muted","aria-hidden":!0,children:(0,r.jsx)("div",{className:"h-full w-1/3 rounded-full bg-blue-500 motion-safe:animate-[approvals-slide_1.2s_ease-in-out_infinite]"})}),(0,r.jsx)("style",{children:"@keyframes approvals-slide{0%{transform:translateX(-100%)}100%{transform:translateX(300%)}}"}),[0,1].map(e=>(0,r.jsxs)("div",{className:"space-y-3 rounded-xl border border-border bg-card p-5 motion-safe:animate-pulse","aria-hidden":!0,children:[(0,r.jsx)("div",{className:"h-4 w-2/3 rounded bg-muted"}),(0,r.jsx)("div",{className:"h-3 w-full rounded bg-muted"}),(0,r.jsx)("div",{className:"h-3 w-5/6 rounded bg-muted"})]},e))]})}function h(e){let{view:t,onChange:a}=e,n=(e,n)=>(0,r.jsx)("button",{type:"button",role:"tab","aria-selected":t===e,onClick:()=>a(e),className:"rounded-md px-3 py-1 text-sm ".concat(t===e?"bg-foreground text-background":"bg-muted text-foreground"),children:n});return(0,r.jsxs)("div",{role:"tablist","aria-label":"승인 목록 보기",className:"flex gap-2",children:[n("open","승인 대기"),n("merged","완료")]})}function b(e){let{brief:t,lineage:a,summary:n}=e;return(0,r.jsxs)(r.Fragment,{children:[null!==t?(0,r.jsx)("section",{"aria-label":"승인 요약",className:"mt-3 break-words text-sm leading-relaxed [&_a]:text-blue-600 [&_a]:underline [&_blockquote]:border-l-2 [&_blockquote]:pl-3 [&_h3]:mt-3 [&_h3]:font-semibold [&_li]:ml-5 [&_li]:list-disc [&_p]:my-2 [&_table]:block [&_table]:overflow-x-auto",children:(0,r.jsx)(s.oz,{remarkPlugins:[l.A],components:{a:e=>{let{href:t,children:a}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noreferrer",children:a})}},children:t})}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("p",{className:"mt-3 rounded border border-amber-500/40 bg-amber-500/15 p-3 text-sm text-amber-800 dark:text-amber-300",children:"승인 요약 내용이 없습니다 — GitHub 본문을 보거나 발사자에게 요청하세요"}),(0,r.jsx)("p",{className:"mt-3 whitespace-pre-wrap text-sm",children:n})]}),a&&(0,r.jsxs)("p",{className:"mt-3 text-sm text-muted-foreground",children:["아이디어 원장: ",a]})]})}function x(e){var t;let{gate:a,busy:n,blocked:s,mergeLabel:l,onCheck:o,onMerge:c}=e;return(0,r.jsxs)("div",{className:"mt-3 space-y-2","aria-label":"머지 전 검사",children:["none"===a.status&&(0,r.jsx)("button",{type:"button",onClick:o,disabled:n,className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:"머지 전 검사 시작"}),"running"===a.status&&(0,r.jsx)("p",{role:"status",className:"text-sm",children:"검사 중…"}),"passed"===a.status&&(0,r.jsxs)("p",{className:"text-sm text-green-700 dark:text-green-400",children:["검사 통과 (",null!=(t=a.os)?t:"unknown",")",a.baseDrifted?" \xb7 검사 뒤 main 이 움직였다 — 머지 때 겹치는 파일이 있으면 다시 검사를 요구한다":""]}),("failed"===a.status||"unmeasured"===a.status)&&(0,r.jsxs)("div",{role:"alert",className:"text-sm text-red-600",children:[(0,r.jsx)("p",{children:"failed"===a.status?"검사 실패":"검사 측정 불가"}),(0,r.jsx)("ul",{className:"list-inside list-disc",children:a.failures.map((e,t)=>(0,r.jsx)("li",{children:e},t))}),(0,r.jsx)("button",{type:"button",onClick:o,disabled:n,className:"mt-2 rounded-lg border px-3 py-2 disabled:opacity-50",children:"머지 전 검사 다시 시작"})]}),(0,r.jsx)("button",{type:"button",onClick:c,disabled:n||s||"passed"!==a.status,className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white disabled:cursor-not-allowed disabled:opacity-50",children:null!=l?l:"승인하고 머지"})]})}function f(e){let{card:t,api:a,attempt:r,onAttempt:s,onUpdate:l}=e,o="UNKNOWN"===t.mergeable&&!t.merged&&"OPEN"===t.state;return(0,n.useEffect)(()=>{if(!o||r>0)return;let e=!0,n=[];return u(()=>a.get(t.number),{sleep:e=>new Promise(t=>{n.push(window.setTimeout(t,e))}),isActive:()=>e,onDetail:a=>{e&&l(a,t.headSha)},onAttempt:()=>{e&&s(t.number)}}),()=>{for(let t of(e=!1,n))window.clearTimeout(t)}},[a,t.number,o,r,s,l]),null}function g(){let e=(0,c.In)(),{client:t}=(0,o.Q)(),a=(0,n.useMemo)(()=>(0,i.tV)({client:t}),[t]),[s,l]=(0,n.useState)([]),[u,m]=(0,n.useState)(!0),[g,w]=(0,n.useState)(null),[y,v]=(0,n.useState)(null),[N,j]=(0,n.useState)({}),[k,S]=(0,n.useState)({}),[C,I]=(0,n.useState)(null),[E,U]=(0,n.useState)("open"),L=(0,n.useCallback)(e=>{S(t=>{var a;return{...t,[e]:(null!=(a=t[e])?a:0)+1}})},[]),R=(0,n.useCallback)((e,t)=>{l(a=>a.map(a=>a.number!==e.number||a.headSha!==t?a:{...e,gate:e.headSha===t?e.gate:{status:"none",failures:[]},merged:a.merged}))},[]);async function O(e){v(e.number),j(t=>({...t,[e.number]:""}));try{let{gate:t}=await a.check(e.number,e.headSha);l(a=>a.map(a=>a.number===e.number&&a.headSha===e.headSha?{...a,gate:t}:a))}catch(t){j(a=>({...a,[e.number]:(0,i.V5)(t,"검사를 시작하지 못했습니다.").text}))}finally{v(null)}}async function M(e){if(window.confirm("#".concat(e.number," ").concat(e.title,"\n현재 확인한 변경을 승인하고 머지할까요?"))){v(e.number),j(t=>({...t,[e.number]:""}));try{await a.merge(e.number,e.headSha),l(t=>t.map(t=>t.number===e.number?{...t,merged:!0,state:"MERGED"}:t))}catch(t){j(a=>({...a,[e.number]:(0,i.V5)(t,"머지하지 못했습니다.").text}))}finally{v(null)}}}return((0,n.useEffect)(()=>{let e=s.filter(e=>"OPEN"===e.state&&("running"===e.gate.status||"passed"===e.gate.status));if("open"!==E||!e.length)return;let t=!0,r=window.setInterval(()=>{for(let r of e)a.get(r.number).then(e=>{t&&R(e,r.headSha)}).catch(e=>{t&&j(t=>({...t,[r.number]:(0,i.V5)(e,"검사 상태를 불러오지 못했습니다.").text}))})},1e4);return()=>{t=!1,window.clearInterval(r)}},[a,s,R,E]),(0,n.useEffect)(()=>{let e=!0,t=Number(new URLSearchParams(window.location.search).get("pr")),r=Number.isSafeInteger(t)&&t>0?t:null;return(m(!0),w(null),I(r),"merged"===E)?(a.list("merged").then(t=>{let{items:a}=t;e&&l(a)}).catch(t=>{e&&w((0,i.V5)(t,"목록을 불러오지 못했습니다."))}).finally(()=>{e&&m(!1)}),()=>{e=!1}):(a.list().then(async t=>{let{items:n}=t;if(!e)return;let s=n.find(e=>e.number===r);if(r&&!s)try{let t=await a.get(r);e&&l([t,...n])}catch(t){e&&w((0,i.V5)(t,"PR 을 불러오지 못했습니다.")),e&&l(n)}else l(r?[...n].sort((e,t)=>Number(t.number===r)-Number(e.number===r)):n)}).catch(t=>{e&&w((0,i.V5)(t,"목록을 불러오지 못했습니다."))}).finally(()=>{e&&m(!1)}),()=>{e=!1})},[a,E]),"owner"===e||"open"!==E||u||s.length||g)?(0,r.jsxs)("main",{className:"mx-auto max-w-3xl space-y-5 p-4 pb-20 text-foreground sm:p-8",children:[(0,r.jsxs)("header",{children:[(0,r.jsx)("h1",{className:"text-2xl font-semibold",children:"코드 변경 승인"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"자동으로 만든 코드 변경(PR)을 확인하고 승인합니다."})]}),(0,r.jsx)(h,{view:E,onChange:e=>{l([]),U(e)}}),u&&(0,r.jsx)(p,{view:E,target:C}),g&&(0,r.jsxs)("p",{role:"alert",className:"text-red-600","data-approvals-error":!0,children:[g.text,g.href&&(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)("a",{href:g.href,className:"font-semibold underline underline-offset-2","data-approvals-settings":!0,children:"설정 열기 →"})]})]}),!u&&!s.length&&!g&&(0,r.jsx)("p",{children:"merged"===E?"승인해 반영된 코드 변경이 아직 없습니다.":"승인을 기다리는 코드 변경이 없습니다."}),s.map(e=>{var t,n;let s=e.merged||"MERGED"===e.state,l="OPEN"!==e.state&&!s,o=e.draft?"초안 PR 은 머지할 수 없습니다. GitHub에서 초안을 해제한 뒤 다시 확인하세요.":e.checks.failure>0?"실패한 검사가 있습니다.":e.checks.pending>0?"검사가 아직 끝나지 않았습니다.":"CONFLICTING"===e.mergeable?"머지 충돌이 있습니다.":"MERGEABLE"!==e.mergeable?"머지 가능 여부가 아직 확인되지 않았습니다.":"main"!==e.base?"대상 브랜치가 main 이 아닙니다.":"",c=C===e.number,i=null!=(t=k[e.number])?t:0;return(0,r.jsxs)("article",{className:"rounded-xl border bg-card p-5 shadow-sm ".concat(c?"border-blue-500 ring-2 ring-blue-500/30":"border-border"),children:[(0,r.jsx)(f,{card:e,api:a,attempt:i,onAttempt:L,onUpdate:R}),(0,r.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-2",children:[(0,r.jsxs)("h2",{className:"font-semibold",children:["#",e.number," \xb7 ",e.title]}),(0,r.jsx)("span",{className:"rounded bg-muted px-2 py-1 text-xs",children:s?function(e){if(!e)return"머지됨";let t=new Date(e);if(Number.isNaN(t.getTime()))return"머지됨";let a=new Date(t.getTime()+324e5).toISOString();return"머지됨 ".concat(a.slice(5,10)," ").concat(a.slice(11,16)," KST")}(e.mergedAt):l?"닫힘":e.draft?"초안":"열림"})]}),(0,r.jsx)(b,{brief:e.brief,lineage:e.lineage,summary:e.summary}),(0,r.jsxs)("p",{className:"mt-3 text-sm text-muted-foreground",children:["+",e.additions," 추가 / −",e.deletions," 삭제 \xb7 파일 ",e.changedFiles]}),(0,r.jsxs)("div",{className:"mt-2 flex flex-wrap gap-2 text-xs","aria-label":"검사 상태",children:[(0,r.jsxs)("span",{className:"rounded bg-green-500/15 px-2 py-1",children:["성공 ",e.checks.success]}),(0,r.jsxs)("span",{className:"rounded bg-red-500/15 px-2 py-1",children:["실패 ",e.checks.failure]}),(0,r.jsxs)("span",{className:"rounded bg-yellow-500/15 px-2 py-1",children:["대기 ",e.checks.pending]}),e.checks.success+e.checks.failure+e.checks.pending===0&&(0,r.jsx)("span",{className:"rounded bg-slate-500/15 px-2 py-1",children:"GitHub 검사 없음 — 머지 전 검사는 아래에서 별도로 실행"})]}),(0,r.jsxs)("details",{open:c,className:"mt-3 text-sm",children:[(0,r.jsx)("summary",{className:"cursor-pointer",children:"바뀐 파일 보기"}),(0,r.jsx)("ul",{className:"mt-2 list-inside list-disc break-all",children:e.files.map(e=>(0,r.jsx)("li",{children:e},e))})]}),(0,r.jsxs)("div",{className:"mt-4 flex flex-wrap items-center gap-4",children:[(0,r.jsx)("a",{className:"text-sm text-blue-600 underline",href:e.url,target:"_blank",rel:"noopener noreferrer",children:"GitHub 에서 보기"}),!s&&!l&&(0,r.jsx)(x,{gate:e.gate,busy:null!==y,blocked:!!o,mergeLabel:y===e.number?"머지 중…":"UNKNOWN"!==(n=e.mergeable)?"승인하고 머지":null===d(i,n)?"확인 종료":"확인 중…",onCheck:()=>O(e),onMerge:()=>M(e)})]}),o&&!s&&!l&&(0,r.jsxs)("p",{className:"mt-2 text-sm text-amber-600",children:[o,"UNKNOWN"===e.mergeable&&i>=3?" 자동 확인이 끝났습니다. 최신 상태는 페이지를 새로고침하세요.":""]}),N[e.number]&&(0,r.jsx)("p",{role:"alert",className:"mt-2 text-sm text-red-600",children:N[e.number]})]},e.number)})]}):null}var w=a(28604);function y(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now(),a="release-loop"===e.graphId?"릴리스 발행":"announce-loop"===e.graphId?"공지":e.graphId,r=Date.parse(e.since),n=Number.isNaN(r)?0:Math.max(0,Math.floor((t-r)/6e4)),s=n<1?"방금 전":n<60?"".concat(n,"분 전"):n<1440?"".concat(Math.floor(n/60),"시간 전"):"".concat(Math.floor(n/1440),"일 전");return{title:a,nodeId:e.nodeId,waiting:s,message:e.message,recent:e.recent.map(e=>"".concat(e.ok&&"fail"!==e.outcome&&"error"!==e.outcome?"✓":"✗"," ").concat(e.nodeId).concat(e.outcome?" \xb7 ".concat(e.outcome):"").concat(e.summary?" \xb7 ".concat(e.summary):""))}}function v(e){var t,a,s,l,o,c,i;let{item:d,api:u,onDecided:m,confirm:p}=e,[h,b]=(0,n.useState)(d.feed),[x,f]=(0,n.useState)(()=>(0,w.Mz)(d.feed)),[g,y]=(0,n.useState)(!1),[v,N]=(0,n.useState)(0),[j,k]=(0,n.useState)(!1),[S,C]=(0,n.useState)(!1),[I,E]=(0,n.useState)(""),[U,L]=(0,n.useState)(""),[R,O]=(0,n.useState)(!1),M=(e,t)=>{L((0,w.LP)(e,t)),O((0,w.rH)(e))},[D,A]=(0,n.useState)({}),P=(0,n.useRef)(null),_=null!=p?p:e=>window.confirm(e),H=(i=(0,w.Mz)(h),JSON.stringify(x)!==JSON.stringify(i)),G=(0,n.useMemo)(()=>(function(e,t){let a=[];for(let r of(e.cover.image&&a.push({image:e.cover.image,isCover:!0}),t.slides))r.include&&a.push({image:r.image,caption:r.caption});return a})(h,x),[h,x]),T=G[Math.min(v,Math.max(0,G.length-1))],F=(0,n.useMemo)(()=>[h.cover.image,...h.slides.map(e=>e.image)].filter(e=>!!e),[h]);function V(e){N(t=>Math.max(0,Math.min(G.length-1,t+e)))}function z(e,t){f(a=>({...a,slides:a.slides.map((a,r)=>r===e?{...a,...t}:a)}))}function W(e,t){f(a=>{let r=e+t;if(r<0||r>=a.slides.length)return a;let n=[...a.slides];return[n[e],n[r]]=[n[r],n[e]],{...a,slides:n}})}async function Y(){C(!0),L(""),O(!1),E("");try{let e=await u.saveFeedDraft(d.graphId,d.runId,x);return b(e.feed),f((0,w.Mz)(e.feed)),E("저장했어요 \xb7 수정 ".concat(e.feed.revision," \xb7 아직 게시 전입니다")),!0}catch(e){return M(e,"save"),!1}finally{C(!1)}}async function J(){if(_("게시할까요? 승인하면 이 초안으로 게시 준비 묶음이 텔레그램으로 갑니다.")&&(!H||await Y())){C(!0),L("");try{await u.decide(d.graphId,d.runId,"approved"),m()}catch(e){M(e,"decide")}finally{C(!1)}}}async function K(){if(_("이 게시 초안을 거절할까요?")){C(!0),L("");try{await u.decide(d.graphId,d.runId,"rejected"),m()}catch(e){M(e,"decide")}finally{C(!1)}}}(0,n.useEffect)(()=>{let e=!0,t=[],a="undefined"!=typeof URL&&"function"==typeof URL.createObjectURL;return Promise.all(F.map(async r=>{try{let n=await u.feedMedia(d.graphId,d.runId,r);if(!e||!a)return null;let s=URL.createObjectURL(n);return t.push(s),[r,s]}catch(e){return null}})).then(t=>{e&&A(Object.fromEntries(t.filter(e=>!!e)))}),()=>{e=!1,a&&"function"==typeof URL.revokeObjectURL&&t.forEach(e=>URL.revokeObjectURL(e))}},[u,d.graphId,d.runId,F]);let $=(null==(t=h.brand)?void 0:t.name)||"브랜드",q=$.trim().charAt(0).toUpperCase()||"\xb7",Q=x.hashtags.join(" "),X=x.cover.text!==(null!=(s=h.cover.renderedText)?s:h.cover.text)||x.cover.sub!==(null!=(l=h.cover.renderedSub)?l:h.cover.sub);return(0,r.jsxs)("article",{"aria-label":"피드 미리보기","data-feed-revision":h.revision,className:"mx-auto w-full max-w-md overflow-hidden rounded-xl border border-border bg-card text-foreground shadow-sm",children:[(0,r.jsxs)("header",{className:"flex items-center gap-3 px-3 py-2",children:[(0,r.jsx)("span",{"aria-hidden":!0,className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-muted text-sm font-semibold",children:q}),(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"truncate text-sm font-semibold",children:$}),(null==(a=h.brand)?void 0:a.handle)&&(0,r.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:h.brand.handle})]}),(0,r.jsxs)("span",{className:"ml-auto shrink-0 text-xs text-muted-foreground",children:["수정 ",h.revision,H?" \xb7 저장 안 됨":""]})]}),(0,r.jsxs)("div",{className:"relative aspect-[4/5] w-full touch-pan-y select-none overflow-hidden bg-muted",onTouchStart:e=>{var t,a;P.current=null!=(a=null==(t=e.touches[0])?void 0:t.clientX)?a:null},onTouchEnd:e=>{var t;let a=P.current;P.current=null;let r=null==(t=e.changedTouches[0])?void 0:t.clientX;null==a||null==r||40>Math.abs(r-a)||V(r<a?1:-1)},children:[(null==T?void 0:T.image)&&D[T.image]?(0,r.jsx)("img",{src:D[T.image],alt:T.isCover?x.cover.text:null!=(o=T.caption)?o:"",className:"h-full w-full object-cover"}):(0,r.jsx)("div",{className:"flex h-full w-full items-center justify-center text-sm text-muted-foreground",children:"이미지 불러오는 중"}),G.length>1&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{type:"button","aria-label":"이전 장",disabled:0===v,onClick:()=>V(-1),className:"absolute left-2 top-1/2 -translate-y-1/2 rounded-full bg-black/40 px-2 py-1 text-white disabled:opacity-0",children:"‹"}),(0,r.jsx)("button",{type:"button","aria-label":"다음 장",disabled:v>=G.length-1,onClick:()=>V(1),className:"absolute right-2 top-1/2 -translate-y-1/2 rounded-full bg-black/40 px-2 py-1 text-white disabled:opacity-0",children:"›"})]})]}),G.length>1&&(0,r.jsx)("div",{"aria-label":"장 표시",className:"flex justify-center gap-1.5 py-2",children:G.map((e,t)=>(0,r.jsx)("span",{"data-dot":t===v?"on":"off",className:"h-1.5 w-1.5 rounded-full ".concat(t===v?"bg-primary":"bg-muted-foreground/40")},t))}),X&&(0,r.jsxs)("p",{"data-cover-pending":!0,className:"mx-3 mb-2 rounded border border-dashed border-border px-2 py-1 text-xs text-muted-foreground",children:["커버 문구 변경 — \xab",x.cover.text,x.cover.sub?" \xb7 ".concat(x.cover.sub):"","\xbb \xb7 게시 때 커버를 다시 그립니다"]}),(0,r.jsxs)("div",{className:"space-y-2 px-3 pb-3 text-sm",children:[(0,r.jsxs)("p",{className:"break-words",children:[(0,r.jsx)("span",{className:"font-semibold",children:$})," ",x.caption.hook]}),x.caption.body&&(j?(0,r.jsx)("p",{className:"whitespace-pre-wrap break-words",children:x.caption.body}):(0,r.jsx)("button",{type:"button",onClick:()=>k(!0),className:"text-muted-foreground",children:"더 보기"})),x.hashtags.length>0&&(0,r.jsx)("p",{className:"flex flex-wrap gap-x-1.5 text-primary",children:x.hashtags.map((e,t)=>(0,r.jsx)("span",{className:"whitespace-nowrap",children:e},"".concat(e,"-").concat(t)))}),x.location&&(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["\uD83D\uDCCD ",x.location]})]}),g&&(0,r.jsxs)("section",{"aria-label":"초안 편집",className:"space-y-3 border-t border-border px-3 py-3 text-sm",children:[(0,r.jsxs)("label",{className:"block",children:["커버 문구",(0,r.jsx)("input",{value:x.cover.text,onChange:e=>f({...x,cover:{...x.cover,text:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["커버 부제",(0,r.jsx)("input",{value:x.cover.sub,onChange:e=>f({...x,cover:{...x.cover,sub:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["첫 줄",(0,r.jsx)("input",{value:x.caption.hook,onChange:e=>f({...x,caption:{...x.caption,hook:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["본문",(0,r.jsx)("textarea",{value:x.caption.body,rows:4,onChange:e=>f({...x,caption:{...x.caption,body:e.target.value}}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["해시태그(띄어쓰기로 구분)",(0,r.jsx)("input",{value:Q,onChange:e=>f({...x,hashtags:e.target.value.split(/\s+/).filter(Boolean)}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("label",{className:"block",children:["위치(비우면 없음)",(0,r.jsx)("input",{value:null!=(c=x.location)?c:"",onChange:e=>f({...x,location:e.target.value.trim()?e.target.value:null}),className:"mt-1 w-full rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsx)("ol",{"aria-label":"사진 순서",className:"space-y-2",children:x.slides.map((e,t)=>(0,r.jsxs)("li",{"data-slide":e.image,className:"rounded border border-border p-2 ".concat(e.include?"":"opacity-50"),children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"w-6 shrink-0 text-xs text-muted-foreground",children:t+1}),(0,r.jsx)("input",{"aria-label":"".concat(t+1,"번 사진 설명"),value:e.caption,onChange:e=>z(t,{caption:e.target.value}),className:"min-w-0 flex-1 rounded border border-border bg-background px-2 py-1"})]}),(0,r.jsxs)("div",{className:"mt-2 flex gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:0===t,onClick:()=>W(t,-1),className:"rounded border px-2 py-0.5 disabled:opacity-40",children:"앞으로"}),(0,r.jsx)("button",{type:"button",disabled:t===x.slides.length-1,onClick:()=>W(t,1),className:"rounded border px-2 py-0.5 disabled:opacity-40",children:"뒤로"}),(0,r.jsx)("button",{type:"button",onClick:()=>z(t,{include:!e.include}),className:"rounded border px-2 py-0.5",children:e.include?"빼기":"되살리기"})]})]},e.image))})]}),(I||U)&&(0,r.jsx)("p",{role:U?"alert":"status",className:"px-3 pb-2 text-sm ".concat(U?"text-red-600":"text-muted-foreground"),children:U||I}),U&&R&&(0,r.jsx)("p",{className:"px-3 pb-2 text-sm",children:(0,r.jsx)("a",{href:w.$Y,className:"font-medium underline","data-connect-token-link":!0,children:"연결 토큰 칸 열기 →"})}),(0,r.jsxs)("footer",{className:"flex flex-wrap gap-2 border-t border-border px-3 py-3",children:[(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>y(e=>!e),className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:g?"편집 닫기":"편집"}),(0,r.jsx)("button",{type:"button",disabled:S||!H,onClick:()=>{Y()},className:"rounded-lg border px-3 py-2 text-sm disabled:opacity-50",children:"수정 저장"}),(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>{J()},className:"rounded-lg bg-blue-600 px-3 py-2 text-sm font-medium text-white disabled:opacity-50",children:"최종 게시"}),(0,r.jsx)("button",{type:"button",disabled:S,onClick:()=>{K()},className:"ml-auto rounded-lg px-3 py-2 text-sm text-muted-foreground disabled:opacity-50",children:"거절"})]})]})}function N(){let e,{client:t}=(0,o.Q)(),a=(0,n.useMemo)(()=>(0,w.ll)({client:t}),[t]),[s,l]=(0,n.useState)([]),[c,i]=(0,n.useState)(""),[d,u]=(0,n.useState)(!1),[m,p]=(0,n.useState)(!1),h=(0,n.useRef)((e=0,{begin:()=>e+=1,isLatest:t=>t===e})).current,b=(0,n.useCallback)(async()=>{let e=h.begin();try{let t=await a.list();if(!h.isLatest(e))return;l(t.items),i(""),u(!1)}catch(t){h.isLatest(e)&&(i((0,w.LP)(t,"list")),u((0,w.rH)(t)))}},[a,h]);async function x(e,t){if("rejected"!==t||window.confirm("".concat(y(e).title," 실행을 거절할까요?"))){p(!0),i(""),h.begin();try{await a.decide(e.graphId,e.runId,t),await b()}catch(e){i((0,w.LP)(e,"decide")),u((0,w.rH)(e))}finally{p(!1)}}}(0,n.useEffect)(()=>{b();let e=window.setInterval(()=>{b()},3e4);return()=>window.clearInterval(e)},[b]);let f=s.filter(e=>!!e.feed),g=s.filter(e=>!e.feed);return s.length||c?(0,r.jsxs)(r.Fragment,{children:[f.length>0&&(0,r.jsxs)("section",{"aria-label":"게시 대기",className:"mx-auto max-w-3xl space-y-4 px-4 pt-6 text-foreground sm:px-8",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"게시 대기"}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"고쳐서 저장해도 대기열에 남습니다. \xab최종 게시\xbb를 눌러야만 올라갑니다."}),f.map(e=>(0,r.jsx)(v,{item:e,api:a,onDecided:()=>{h.begin(),b()}},"".concat(e.graphId,"/").concat(e.runId)))]}),(g.length>0||c)&&(0,r.jsxs)("section",{"aria-label":"실행 승인",className:"mx-auto max-w-3xl space-y-4 px-4 pt-6 text-foreground sm:px-8",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold",children:"실행 승인"}),c&&(0,r.jsx)("p",{role:"alert",className:"text-sm text-red-600",children:c}),c&&d&&(0,r.jsx)("p",{className:"text-sm",children:(0,r.jsx)("a",{href:w.$Y,className:"font-medium underline","data-connect-token-link":!0,children:"연결 토큰 칸 열기 →"})}),g.map(e=>{let t=y(e);return(0,r.jsxs)("article",{className:"rounded-xl border border-border bg-card p-5 shadow-sm",children:[(0,r.jsx)("h3",{className:"font-semibold",children:t.title}),(0,r.jsxs)("p",{className:"mt-1 text-sm text-muted-foreground",children:["멈춘 단계: ",t.nodeId," \xb7 ",t.waiting,"부터 대기 중"]}),(0,r.jsx)("p",{className:"mt-3 whitespace-pre-wrap break-words text-sm",children:t.message}),t.recent.length>0&&(0,r.jsxs)("div",{className:"mt-3 text-sm",children:[(0,r.jsx)("p",{className:"font-medium",children:"최근 단계"}),(0,r.jsx)("ul",{className:"mt-1 space-y-1",children:t.recent.map((e,t)=>(0,r.jsx)("li",{className:"break-words",children:e},t))})]}),(0,r.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,r.jsx)("button",{type:"button",disabled:m,onClick:()=>{x(e,"approved")},className:"rounded-lg bg-blue-600 px-4 py-2 text-sm font-medium text-white disabled:opacity-50",children:"승인"}),(0,r.jsx)("button",{type:"button",disabled:m,onClick:()=>{x(e,"rejected")},className:"rounded-lg border px-4 py-2 text-sm disabled:opacity-50",children:"거절"})]})]},"".concat(e.graphId,"/").concat(e.runId))})]})]}):null}function j(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(N,{}),(0,r.jsx)(g,{})]})}},89356:(e,t,a)=>{"use strict";a.d(t,{V5:()=>s,tV:()=>l});var r=a(24331);class n extends Error{constructor(e,t,a){super(a||t),this.status=e,this.error=t,this.reason=a,this.name="MergeApprovalsApiError"}}function s(e,t){return e instanceof n?401===e.status||"unauthorized"===e.error?{text:"이 기기에 소유자 토큰이 없어 승인 목록을 못 읽었습니다 — 이미 연결된 기기의 설정 › 연결 토큰 만들기 에서 토큰을 만들어, 이 기기의 설정 › 데몬 연결 › 연결 토큰 칸에 붙이면 바로 보입니다.",href:"/app/settings/#bearer-token"}:"gh-failed"===e.error?{text:"데몬이 GitHub 를 읽지 못했습니다(데몬 기계의 gh 로그인\xb7네트워크) — 잠시 뒤 다시 열어 보세요.".concat(e.reason?" 사유: ".concat(e.reason.split("\n")[0].slice(0,160)):"")}:"gh-invalid-response"===e.error?{text:"GitHub 응답을 해석하지 못했습니다 — 잠시 뒤 다시 열어 보세요."}:"approvals-repo-unknown"===e.error?{text:"승인할 저장소를 모릅니다 — 데몬 설정 intake.approvals.repo(예: owner/repo)를 채워 주세요.",href:"/app/settings/"}:e.reason?{text:e.reason}:{text:"".concat(t," (").concat(e.status," ").concat(e.error,")")}:e instanceof TypeError?{text:"데몬에 닿지 못했습니다 — 데몬이 켜져 있는지, 이 기기가 같은 네트워크(tailnet)에 있는지 확인하세요."}:{text:e instanceof Error&&e.message?e.message:t}}function l(e){var t,a;let s=null!=(t=e.fetchImpl)?t:fetch,l=(null!=(a=e.baseUrl)?a:"").replace(/\/+$/,"");async function o(t,a){let r={...a,headers:{"content-type":"application/json",...e.authHeader?{authorization:e.authHeader}:{}}},o=e.client?await e.client.fetchResponse(t,r):await s("".concat(l).concat(t),r),c=await o.json().catch(()=>null);if(!o.ok){var i;let e=c&&"object"==typeof c?c:{};throw new n(o.status,null!=(i=e.error)?i:"request-failed",e.reason)}return c}return{list:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"open";return o("merged"===e?"".concat(r.r5,"?state=merged"):r.r5)},get:e=>o("".concat(r.r5,"/").concat(e)),check:(e,t)=>o("".concat(r.r5,"/").concat(e,"/check"),{method:"POST",body:JSON.stringify({headSha:t})}),merge:(e,t)=>o("".concat(r.r5,"/").concat(e,"/merge"),{method:"POST",body:JSON.stringify({headSha:t})})}}},94087:(e,t,a)=>{"use strict";a.d(t,{GC:()=>n,In:()=>i,OG:()=>o});var r=a(64297);let n="elanous.pwa.role",s="elanous:pwa-role";function l(){try{let e=window.localStorage.getItem(n);if("owner"===e||"contributor"===e||"general"===e)return e}catch(e){}return"general"}function o(e){try{window.localStorage.setItem(n,e)}catch(e){}"function"==typeof window.dispatchEvent&&window.dispatchEvent(new Event(s))}function c(e){if("function"!=typeof window.addEventListener)return()=>{};window.addEventListener(s,e);let t=t=>{(t.key===n||null===t.key)&&e()};return window.addEventListener("storage",t),()=>{window.removeEventListener(s,e),window.removeEventListener("storage",t)}}function i(){return(0,r.useSyncExternalStore)(c,l,()=>"general")}}},e=>{e.O(0,[5464,9948,6396,5535,7358],()=>e(e.s=30233)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2922],{342:(e,t,n)=>{"use strict";function r(e){let t=e.filter(e=>"cron"===e.kind&&e.id).map(e=>e.id);return t.length?"/scheduler?ids=".concat(t.map(encodeURIComponent).join(",")):null}n.d(t,{NE:()=>l,Yt:()=>o,on:()=>r});let s=["task","goal-loop","single-shot"],a=["scheduler","monitor-trigger"];function i(e){var t,n,r,i,o,l,d;let c=e.autopilot,u=null!=(t=null==c?void 0:c.executionModel)?t:null;return{id:e.id,goal:e.title||e.description||e.id,source:null!=(n=null==c?void 0:c.origin)?n:"human",status:null!=(r=null==c?void 0:c.apmStatus)?r:e.status,model:u,tier:null!=(i=null==c?void 0:c.tier)?i:null,engine:null!=(o=null==c?void 0:c.engine)?o:null,kind:(d=null!=(l=null==c?void 0:c.executionModel)?l:null)&&s.includes(d)?"finite":d&&a.includes(d)?"continuous":"other",reviewDue:!1,createdAt:new Date(e.createdAt).toISOString(),updatedAt:e.updatedAt,derived:e.derived,isAutopilot:null!=c,toxStatus:e.status,taskCount:e.taskCount,taskCounts:e.taskStatusCounts}}class o{async triagePreview(e,t){return this.client.fetchJson("/v1/autopilot/triage-preview",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({goal:e,...t?{category:t}:{}})})}async commitMission(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"intake",n=arguments.length>2?arguments[2]:void 0;return this.client.fetchJson("/v1/autopilot/triage-preview",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({goal:e,commit:!0,source:t,...n?{category:n}:{}})})}async missionsUnified(e){var t,n;let r=new URLSearchParams({...e?{status:e}:{}}).toString(),s=await this.client.fetchJson("/v1/missions".concat(r?"?".concat(r):"")),a=null!=(t=s.missions)?t:[];return{ok:!0,total:null!=(n=s.total)?n:a.length,missions:a.map(i)}}async trace(e){return this.client.fetchJson("/v1/autopilot/trace?id=".concat(encodeURIComponent(e)))}async missionArcMap(){var e,t,n;let r=await this.client.fetchJson("/v1/missions"),s=new Map;for(let a of null!=(e=r.missions)?e:[]){let e=null==(t=a.autopilot)?void 0:t.arcs;e&&e.length>0&&s.set(a.id,{apmStatus:null==(n=a.autopilot)?void 0:n.apmStatus,arcs:e})}return s}async missionAction(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.client.fetchJson("/v1/autopilot/mission-action",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({id:e,action:t,...n})})}async autonomy(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=arguments.length>1?arguments[1]:void 0,n=new URLSearchParams({limit:String(e),...t?{loop:t}:{}});return this.client.fetchJson("/v1/autopilot/autonomy?".concat(n.toString()))}async arming(){return this.client.fetchJson("/v1/autopilot/arming")}constructor(e){this.client=e}}let l={task:{label:"작업 분해",tone:"bg-sky-500/15 text-sky-200 ring-sky-500/30"},"goal-loop":{label:"목표 루프",tone:"bg-violet-500/15 text-violet-200 ring-violet-500/30"},scheduler:{label:"스케줄러",tone:"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30"},"monitor-trigger":{label:"감시 트리거",tone:"bg-amber-500/15 text-amber-200 ring-amber-500/30"},hybrid:{label:"하이브리드",tone:"bg-fuchsia-500/15 text-fuchsia-200 ring-fuchsia-500/30"},fanout:{label:"병렬 팬아웃",tone:"bg-cyan-500/15 text-cyan-200 ring-cyan-500/30"},"single-shot":{label:"즉답",tone:"bg-muted text-muted-foreground ring-border"},"hitl-delegate":{label:"HITL 위임",tone:"bg-rose-500/15 text-rose-200 ring-rose-500/30"}}},39622:(e,t,n)=>{"use strict";n.d(t,{$:()=>l});var r=n(65245),s=n(49928),a=n(73783),i=n(43285);let o=(0,a.F)("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function l(e){let{className:t,variant:n="default",size:a="default",...l}=e;return(0,r.jsx)(s.$,{"data-slot":"button",className:(0,i.cn)(o({variant:n,size:a,className:t})),...l})}},43285:(e,t,n)=>{"use strict";n.d(t,{cn:()=>a});var r=n(89675),s=n(56335);function a(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return(0,s.QP)((0,r.$)(t))}},59112:(e,t,n)=>{"use strict";n.d(t,{r:()=>o});var r=n(65245),s=n(42541),a=n.n(s);let i=[{key:"autopilot",href:"/autopilot",num:"①",label:"미션",sub:"Autopilot"},{key:"tasks",href:"/tasks",num:"②",label:"작업",sub:"Tasks"},{key:"scheduler",href:"/scheduler",num:"③",label:"스케줄",sub:"Schedules"}];function o(e){let{active:t}=e;return(0,r.jsxs)("nav",{"aria-label":"Mission Fabric 파이프라인","data-testid":"fabric-stage-header",className:"flex flex-wrap items-center gap-1 text-xs",children:[(0,r.jsx)("span",{className:"mr-1 text-muted-foreground",children:"Missions"}),i.map((e,n)=>(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsxs)(a(),{href:e.href,"aria-current":e.key===t?"page":void 0,className:["rounded px-2 py-1 ring-1 transition-colors",e.key===t?"bg-primary/15 font-medium text-foreground ring-primary/40":"text-muted-foreground ring-border hover:bg-muted hover:text-foreground"].join(" "),children:[(0,r.jsx)("span",{className:"mr-1",children:e.num}),e.label,(0,r.jsx)("span",{className:"ml-1 text-[10px] opacity-70",children:e.sub})]}),n<i.length-1&&(0,r.jsx)("span",{className:"text-muted-foreground/50","aria-hidden":!0,children:"→"})]},e.key))]})}},67598:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>I});var r=n(65245),s=n(64297),a=n(79836),i=n(39622);let o=["dig","backtest","trade","retro","replay","delegate","autopilot"],l={trade:"bg-rose-500/15 text-rose-300 ring-rose-500/30",dig:"bg-sky-500/15 text-sky-200 ring-sky-500/30",backtest:"bg-violet-500/15 text-violet-200 ring-violet-500/30",retro:"bg-amber-500/15 text-amber-200 ring-amber-500/30",replay:"bg-indigo-500/15 text-indigo-200 ring-indigo-500/30",delegate:"bg-emerald-500/15 text-emerald-200 ring-emerald-500/30",autopilot:"bg-fuchsia-500/15 text-fuchsia-200 ring-fuchsia-500/30"};function d(e){let{api:t}=e,[n,a]=(0,s.useState)([]),[d,c]=(0,s.useState)(null),[u,m]=(0,s.useState)(!0),x=(0,s.useCallback)(async()=>{m(!0);try{var e;let n=await t.autonomy(80,null!=d?d:void 0);a(null!=(e=n.actions)?e:[])}catch(e){}finally{m(!1)}},[t,d]);return(0,s.useEffect)(()=>{x()},[x]),(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)("button",{type:"button",onClick:()=>c(null),className:["rounded px-2 py-0.5 text-xs ring-1",null===d?"bg-primary/20 text-foreground ring-primary/40":"bg-muted text-muted-foreground ring-border"].join(" "),children:"전체"}),o.map(e=>{var t;return(0,r.jsx)("button",{type:"button",onClick:()=>c(e),className:["rounded px-2 py-0.5 text-xs ring-1",d===e?null!=(t=l[e])?t:"bg-primary/20 ring-primary/40":"bg-muted text-muted-foreground ring-border"].join(" "),children:e},e)}),(0,r.jsx)(i.$,{size:"sm",variant:"outline",className:"ml-auto",onClick:()=>void x(),children:"새로고침"})]}),u?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"불러오는 중…"}):0===n.length?(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"아직 기록된 자율행동이 없습니다. 자율루프가 돌면 여기에 “무엇을 왜 했나”가 쌓입니다."}):(0,r.jsx)("ul",{className:"space-y-2",children:n.map((e,t)=>{var n;return(0,r.jsxs)("li",{className:"rounded-lg border border-border bg-card/50 p-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:["rounded px-2 py-0.5 text-xs ring-1",null!=(n=l[e.loop])?n:"bg-muted text-muted-foreground ring-border"].join(" "),children:e.loop}),(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:function(e){try{return new Intl.DateTimeFormat("ko-KR",{timeZone:"Asia/Seoul",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"}).format(new Date(e))}catch(t){return e.slice(5,16)}}(e.ts)}),e.importance>=8&&(0,r.jsx)("span",{className:"rounded bg-rose-500/15 px-1.5 text-[10px] text-rose-300 ring-1 ring-rose-500/30",children:"중요"})]}),(0,r.jsx)("pre",{className:"mt-1.5 whitespace-pre-wrap font-sans text-sm text-foreground/90",children:e.text})]},"".concat(e.ts,"-").concat(t))})})]})}var c=n(42541),u=n.n(c),m=n(342);let x=new Set(["done","failed","disarmed","rejected","completed","cancelled"]);function p(e){return x.has(null!=e?e:"")}function g(){return"갱신이 ".concat(14,"일 넘게 없으면 \xab멈춤\xbb으로 본다 — 마지막 갱신 이후 진행 흔적이 없다는 뜻이다.")}function h(e){return null==e?"파생 미측정":"파생 ".concat(e.total)}let b={ok:{icon:"✅",tone:"text-emerald-300",label:"정상"},done:{icon:"✅",tone:"text-emerald-300",label:"완료"},stale:{icon:"⏰",tone:"text-amber-300",label:"밀림"},error:{icon:"❌",tone:"text-rose-400",label:"실패"},active:{icon:"\uD83D\uDD35",tone:"text-sky-300",label:"실행중"},pending:{icon:"⏳",tone:"text-muted-foreground",label:"대기"}},f={cron:"크론",task:"태스크",action:"자율행동"};function v(e){var t;let{counts:n,total:s}=e,a=Object.entries(null!=n?n:{}).filter(e=>{let[,t]=e;return t>0});if(!s||0===s)return(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:"태스크 0"});let i=null!=(t=null==n?void 0:n.done)?t:0;return(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("span",{className:"text-xs text-muted-foreground",children:["태스크 ",i,"/",s]}),a.map(e=>{let[t,n]=e;return(0,r.jsxs)("span",{className:"text-[11px] text-muted-foreground",children:[t,":",n]},t)})]})}function y(e){let{r:t}=e;if(!t||0===t.total)return(0,r.jsx)("span",{className:"text-xs text-muted-foreground",...t?{}:{title:"서버가 파생 롤업을 싣지 않았다 — \xab파생 0\xbb이 아니라 \xab못 잰\xbb 값이다(구 서버 \xb7 집계 실패)."},children:h(t)});let n=(e,t)=>e>0?(0,r.jsxs)("span",{className:["text-xs",b[t].tone].join(" "),children:[b[t].icon,e]},t):null;return(0,r.jsxs)("span",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:h(t)}),n(t.ok,"ok"),n(t.stale,"stale"),n(t.error,"error"),n(t.active,"active"),n(t.pending,"pending")]})}function j(e){let{api:t,m:n,onDone:a}=e,o="scheduler"===n.model,l="task"===n.model,[d,c]=(0,s.useState)(""),[u,m]=(0,s.useState)(""),[x,p]=(0,s.useState)(""),[g,h]=(0,s.useState)(null),[b,f]=(0,s.useState)(null);if(!o&&!l)return(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["이 실행모델(",n.model,")은 지속 잡을 만들지 않아 구체화 대상이 아닙니다."]});let v=async e=>{h(e),f(null);let r=o?{command:d.trim(),...u.trim()?{cron:u.trim()}:{}}:{...x.trim()?{prompt:x.trim()}:{}};try{let i=await t.missionAction(n.id,e,r);if(i.error)f("오류: ".concat(i.error));else{var s;f("arm"===e?"승인\xb7arming ON 시 자동 실행":"구체화 완료(".concat(null!=(s=i.engine)?s:"",")")),a()}}catch(e){f(e instanceof Error?e.message:String(e))}finally{h(null)}};return(0,r.jsxs)("div",{className:"mt-3 space-y-2 rounded-md border border-border bg-background/50 p-2.5",children:[o&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("input",{value:d,onChange:e=>c(e.target.value),placeholder:"실행할 명령 (예: scripts/foo.ts) — 필수",className:"w-full rounded border border-border bg-background px-2 py-1 text-xs"}),(0,r.jsx)("input",{value:u,onChange:e=>m(e.target.value),placeholder:"cron (선택 \xb7 비우면 골에서 추론)",className:"w-full rounded border border-border bg-background px-2 py-1 font-mono text-xs"})]}),l&&(0,r.jsx)("input",{value:x,onChange:e=>p(e.target.value),placeholder:"태스크 내용 (선택 \xb7 비우면 골 사용)",className:"w-full rounded border border-border bg-background px-2 py-1 text-xs"}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(i.$,{size:"sm",disabled:!!g||o&&!d.trim(),onClick:()=>void v("materialize"),children:"materialize"===g?"…":"지금 구체화"}),(0,r.jsx)(i.$,{size:"sm",variant:"outline",disabled:!!g||o&&!d.trim(),onClick:()=>void v("arm"),children:"arm"===g?"…":"승인(arm)"}),b&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:b})]})]})}function N(e){let{api:t,m:n,onMutate:a}=e,o=!1===n.isAutopilot,[l,d]=(0,s.useState)(!1),[c,x]=(0,s.useState)(null),[h,N]=(0,s.useState)(!1),k=n.model?m.NE[n.model]:null,w=function(e,t,n){var r;if(void 0===e||!Number.isFinite(e)||!Number.isFinite(t))return null;let s=new Date(e);if(!Number.isFinite(s.getTime()))return null;let a=new Intl.DateTimeFormat("en-CA",{timeZone:null==n?void 0:n.timeZone,year:"numeric",month:"2-digit",day:"2-digit"}).formatToParts(s),i=e=>{var t;return null==(t=a.find(t=>t.type===e))?void 0:t.value},o="".concat(i("year"),"-").concat(i("month"),"-").concat(i("day")),l=Math.floor((t-e)/864e5);return{stale:!p(null==n?void 0:n.status)&&l>=(null!=(r=null==n?void 0:n.thresholdDays)?r:14),days:l,lastUpdated:o}}(n.updatedAt,Date.now(),{status:n.status}),S=(null==w?void 0:w.stale)?w:null,[C,z]=(0,s.useState)(!1),A=(0,s.useCallback)(async()=>{N(!0);try{x(await t.trace(n.id))}catch(e){}finally{N(!1)}},[t,n.id]),[E,D]=(0,s.useState)(!1),[I,O]=(0,s.useState)(!1),[P,U]=(0,s.useState)(null),M=!o&&"proposed"===n.status,T=(0,s.useCallback)(async()=>{let e=!l;d(e),!e||c||o||await A()},[l,c,A,o]),$=(0,s.useCallback)(async()=>{D(!0),U(null);try{await t.missionAction(n.id,"cancel"),z(!1),await A(),a()}catch(e){}finally{D(!1)}},[t,n.id,A,a]),J=(0,s.useCallback)(async()=>{O(!0),U(null);try{var e;let r=await t.missionAction(n.id,"approve");r.error?U("오류: ".concat(r.error)):U("✅ 승인 — 태스크 ".concat(null!=(e=r.activated)?e:0,"건 실행 시작(ready). 미션 running.")),await A()}catch(e){U(e instanceof Error?e.message:String(e))}finally{O(!1)}},[t,n.id,A]);return(0,r.jsxs)("div",{className:"rounded-lg border border-border bg-card/50",children:[(0,r.jsxs)("div",{className:"flex items-start",children:[(0,r.jsxs)("button",{type:"button",onClick:()=>void T(),className:"flex min-w-0 flex-1 items-start gap-3 p-3 text-left",children:[(0,r.jsx)("span",{className:"mt-0.5 text-muted-foreground",children:l?"▾":"▸"}),(0,r.jsxs)("div",{className:"min-w-0 flex-1 space-y-1.5",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[o?(0,r.jsx)("span",{className:"rounded bg-slate-500/15 px-2 py-0.5 text-xs font-medium text-slate-300 ring-1 ring-slate-500/30",children:"사람 \xb7 intake"}):k&&(0,r.jsx)("span",{className:["rounded px-2 py-0.5 text-xs font-medium ring-1",k.tone].join(" "),children:k.label}),!o&&"continuous"===n.kind&&(0,r.jsx)("span",{className:"rounded bg-sky-500/15 px-1.5 py-0.5 text-[11px] text-sky-300 ring-1 ring-sky-500/30",children:"상시"}),!o&&"finite"===n.kind&&(0,r.jsx)("span",{className:"rounded bg-violet-500/15 px-1.5 py-0.5 text-[11px] text-violet-300 ring-1 ring-violet-500/30",children:"유한"}),(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground ring-1 ring-border",children:n.source}),M?(0,r.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] font-medium text-amber-300 ring-1 ring-amber-500/40",children:"승인 대기"}):(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[11px] text-muted-foreground ring-1 ring-border",children:n.status}),n.reviewDue&&(0,r.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] text-amber-300 ring-1 ring-amber-500/30",children:"⚠ 30일+ 리뷰"}),o?(0,r.jsx)(v,{counts:n.taskCounts,total:n.taskCount}):(0,r.jsx)(y,{r:n.derived}),S&&(0,r.jsx)("span",{className:"rounded bg-amber-500/15 px-1.5 py-0.5 text-[11px] font-medium text-amber-300 ring-1 ring-amber-500/30",title:g(),children:"".concat(S.days,"일 멈춤 \xb7 마지막 갱신 ").concat(S.lastUpdated)})]}),(0,r.jsx)("p",{className:"truncate text-sm text-foreground/90",children:n.goal}),(0,r.jsx)("p",{className:"font-mono text-[10px] text-muted-foreground",children:n.id})]})]}),S&&!o&&(0,r.jsxs)("div",{className:"mr-3 mt-3 flex shrink-0 flex-col items-end gap-1.5",children:[(0,r.jsx)(i.$,{size:"sm",variant:"outline",disabled:E,onClick:()=>z(e=>!e),"aria-expanded":C,"aria-controls":"mission-close-confirm-".concat(n.id),className:"border-amber-500/40 text-amber-300 hover:text-amber-200",children:E?"종료 중…":"닫기 제안"}),C&&(0,r.jsxs)("div",{id:"mission-close-confirm-".concat(n.id),role:"group","aria-label":"미션 종료 확인",className:"w-60 space-y-1.5 rounded-md border border-amber-500/40 bg-amber-500/5 p-2",children:[(0,r.jsx)("p",{className:"text-[11px] leading-snug text-amber-200/90",children:g()}),(0,r.jsxs)("p",{className:"text-[11px] leading-snug text-muted-foreground",children:[S.days,"일째 갱신 없음 \xb7 파생 잡까지 release 되며 되돌릴 수 없다."]}),(0,r.jsxs)("div",{className:"flex items-center justify-end gap-1.5",children:[(0,r.jsx)(i.$,{size:"sm",variant:"ghost",disabled:E,className:"h-7 px-2 text-[11px] text-muted-foreground",onClick:()=>z(!1),children:"취소"}),(0,r.jsx)(i.$,{size:"sm",variant:"outline",disabled:E,className:"h-7 border-rose-500/50 px-2 text-[11px] text-rose-300 hover:text-rose-200",onClick:()=>void $(),children:E?"종료 중…":"종료 확인"})]})]})]}),S&&o&&(0,r.jsxs)("div",{className:"mr-3 mt-3 flex shrink-0 flex-col items-end gap-1.5",children:[(0,r.jsx)(u(),{href:"/tasks",title:"".concat(S.days,"일째 갱신 없음 \xb7 ").concat(g()),className:"inline-flex h-8 items-center rounded-md border border-amber-500/40 px-3 text-xs font-medium text-amber-300 hover:text-amber-200",children:"닫기 제안 — 작업 보드"}),(0,r.jsxs)("span",{className:"max-w-[15rem] text-right text-[11px] leading-snug text-muted-foreground",children:[S.days,"일째 갱신 없음 \xb7 사람 미션은 작업 보드에서 닫습니다"]})]})]}),l&&o&&(0,r.jsxs)("div",{className:"border-t border-border px-4 py-3 space-y-2",children:[(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"사람이 Intake 로 만든 미션입니다. 실행은 Task 보드에서 진행됩니다."}),(0,r.jsx)(v,{counts:n.taskCounts,total:n.taskCount}),(0,r.jsx)(u(),{href:"/tasks",className:"inline-block text-xs text-primary hover:underline",children:"② 작업 보드에서 보기 →"})]}),l&&!o&&(0,r.jsxs)("div",{className:"border-t border-border px-4 py-3",children:[M&&(0,r.jsxs)("div",{className:"mb-3 space-y-2 rounded-md border border-amber-500/30 bg-amber-500/5 p-3",children:[(0,r.jsx)("p",{className:"text-sm font-medium text-amber-200",children:"자동 분해 완료 \xb7 승인 대기"}),(0,r.jsxs)("p",{className:"text-xs text-muted-foreground",children:["골을 태스크로 자동 구체화했습니다(아직 ",(0,r.jsx)("b",{children:"실행 안 함"}),"). 승인하면 실행이 시작됩니다.","scheduler"===n.model&&" 반복 스케줄은 승인 후 배선됩니다."]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(i.$,{size:"sm",disabled:I||E,onClick:()=>void J(),children:I?"승인 중…":"✅ 승인(실행 시작)"}),(0,r.jsx)(i.$,{size:"sm",variant:"ghost",disabled:I||E,onClick:()=>void $(),className:"text-rose-400 hover:text-rose-300",children:E?"거절 중…":"거절"}),P&&(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:P})]})]}),h&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:"계보 조회 중…"}),c&&0===c.derived.length&&(0,r.jsx)("p",{className:"text-xs text-muted-foreground",children:c.note}),c&&(0,m.on)(c.derived)&&(0,r.jsxs)(u(),{href:(0,m.on)(c.derived),className:"mb-2 inline-block text-xs text-primary hover:underline","data-mission-schedules":!0,children:["이 미션을 부르는 스케줄 ",c.derived.filter(e=>"cron"===e.kind&&e.id).length," →"]}),c&&c.derived.length>0&&(0,r.jsx)("ul",{className:"space-y-1.5",children:c.derived.map((e,t)=>{let n=b[e.status];return(0,r.jsxs)("li",{className:"flex items-start gap-2 text-sm",children:[(0,r.jsx)("span",{className:n.tone,children:n.icon}),(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-[10px] text-muted-foreground ring-1 ring-border",children:f[e.kind]}),(0,r.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,r.jsx)("span",{className:"text-foreground/90",children:e.name}),e.detail&&(0,r.jsx)("span",{className:"ml-2 text-xs text-muted-foreground",children:e.detail})]})]},t)})}),c&&!p(n.status)&&!M&&(0,r.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,r.jsx)(i.$,{size:"sm",variant:"ghost",disabled:E,onClick:()=>void $(),className:"text-rose-400 hover:text-rose-300",children:E?"종료 중…":"미션 종료(파생 잡 release)"}),"continuous"===n.kind&&(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"상시 미션 — 종료 전까지 계속 실행"})]}),c&&!M&&(0,r.jsx)(j,{api:t,m:n,onDone:()=>void A()})]})]})}function k(e){let{api:t,onCommitted:n}=e,[a,o]=(0,s.useState)(""),[l,d]=(0,s.useState)(null),[c,u]=(0,s.useState)(!1),[x,p]=(0,s.useState)(!1),[g,h]=(0,s.useState)(null),b=(0,s.useCallback)(async()=>{let e=a.trim();if(e){u(!0),h(null);try{d((await t.triagePreview(e)).triage)}catch(e){h(e instanceof Error?e.message:String(e))}finally{u(!1)}}},[t,a]),f=(0,s.useCallback)(async()=>{let e=a.trim();if(e){p(!0),h(null);try{(await t.commitMission(e,"intake")).missionId?(o(""),d(null),n()):h("미션 생성 실패")}catch(e){h(e instanceof Error?e.message:String(e))}finally{p(!1)}}},[t,a,n]),v=l?m.NE[l.executionModel]:null;return(0,r.jsxs)("div",{className:"space-y-2 rounded-lg border border-border bg-card/40 p-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("span",{className:"text-sm font-medium",children:["골 던지기 ",(0,r.jsx)("span",{className:"text-xs font-normal text-muted-foreground",children:"— 소망을 말하면 미션이 됩니다"})]}),(0,r.jsx)("span",{className:"text-[11px] text-muted-foreground",children:"텔레그램에선 “미션:” 마커로"})]}),(0,r.jsx)("textarea",{value:a,onChange:e=>o(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&b()},placeholder:"예: 삼성전자 급락하면 매매 검토 / 이 주제 끝까지 파봐 / 매일 아침 반도체 뉴스 정리",className:"min-h-[60px] w-full resize-y rounded-md border border-border bg-background px-3 py-2 text-sm"}),(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,r.jsx)(i.$,{onClick:()=>void b(),disabled:c||!a.trim(),size:"sm",variant:"outline",children:c?"분류 중…":"Triage (⌘↵)"}),(0,r.jsx)(i.$,{onClick:()=>void f(),disabled:x||!a.trim(),size:"sm",children:x?"커밋 중…":"미션 커밋 →"}),l&&v&&(0,r.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[(0,r.jsx)("span",{className:["rounded px-2 py-0.5 ring-1",v.tone].join(" "),children:v.label}),(0,r.jsx)("span",{className:"rounded bg-muted px-1.5 py-0.5 text-muted-foreground ring-1 ring-border",children:"heavy"===l.tier?"무거움":"가벼움"}),(0,r.jsx)("span",{className:"text-muted-foreground",children:l.rationale})]}),g&&(0,r.jsx)("span",{className:"text-xs text-rose-400",children:g})]})]})}function w(e){var t,n;let{api:a}=e,[o,l]=(0,s.useState)(null),[d,c]=(0,s.useState)(null),[u,m]=(0,s.useState)(!1),x=(0,s.useCallback)(async()=>{m(!0),c(null);try{let e=[...(await a.missionsUnified()).missions].sort((e,t)=>e.createdAt<t.createdAt?1:-1);l(e)}catch(e){c(e instanceof Error?e.message:String(e))}finally{m(!1)}},[a]);(0,s.useEffect)(()=>{x()},[x]);let p=(0,s.useCallback)(()=>{x()},[x]),g=null!=(t=null==o?void 0:o.filter(e=>e.isAutopilot).length)?t:0,h=(null!=(n=null==o?void 0:o.length)?n:0)-g;return(0,r.jsxs)("div",{className:"space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("p",{className:"text-sm text-muted-foreground",children:["모든 미션(사람 intake + 자율)의 계보\xb7실행 상태.",o&&(0,r.jsxs)("span",{className:"ml-1 text-[11px]",children:["자율 ",g," \xb7 사람 ",h]})]}),(0,r.jsx)(i.$,{onClick:()=>void x(),disabled:u,size:"sm",variant:"outline",children:u?"…":"새로고침"})]}),(0,r.jsx)(k,{api:a,onCommitted:()=>void x()}),d&&(0,r.jsx)("p",{className:"text-xs text-rose-400",children:d}),o&&0===o.length&&(0,r.jsx)("p",{className:"rounded-lg border border-dashed border-border p-6 text-center text-sm text-muted-foreground",children:"아직 미션이 없습니다. 위 “골 던지기”로 자율 미션을 만들거나, Intake 에서 메모를 포착하세요."}),o&&o.length>0&&(0,r.jsx)("div",{className:"space-y-2",children:o.map(e=>(0,r.jsx)(N,{api:a,m:e,onMutate:p},e.id))})]})}var S=n(86746);function C(e){let{client:t}=e,[n,a]=(0,s.useState)({total:0,items:[],error:null,loading:!0});return(0,s.useEffect)(()=>{let e=!0;return a({total:0,items:[],error:null,loading:!0}),(0,S.qK)(t).then(t=>{let n=[...t].sort((e,t)=>{var n,r;return(e.dueAt?Date.parse(e.dueAt):1/0)-(t.dueAt?Date.parse(t.dueAt):1/0)||(null!=(n=e.raisedAt)?n:"").localeCompare(null!=(r=t.raisedAt)?r:"")});e&&a({total:n.length,items:n.slice(0,3),error:null,loading:!1})}).catch(t=>{e&&a({total:0,items:[],error:t instanceof Error?t.message:String(t),loading:!1})}),()=>{e=!1}},[t]),(0,r.jsxs)("section",{"aria-label":"결정 대기",className:"mb-4 rounded-xl border border-border bg-card p-4",children:[n.loading?(0,r.jsx)("p",{role:"status",children:"결정 대기 읽는 중"}):n.error?(0,r.jsxs)("p",{role:"alert",children:["결정 대기 못 읽음 \xb7 ",n.error]}):0===n.total?(0,r.jsx)("p",{children:"열린 결정 없음"}):(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-medium",children:"결정 대기 ".concat(n.total,"건").concat(n.total>n.items.length?" \xb7 상위 3건 표시":"")}),(0,r.jsx)("ol",{className:"mt-2 space-y-1",children:n.items.map(e=>(0,r.jsx)("li",{className:"text-sm break-words",children:(0,r.jsx)("span",{"aria-label":e.title,children:"".concat(e.title).concat(e.dueAt?" \xb7 기한 ".concat(e.dueAt):"")})},e.id))})]}),(0,r.jsx)("a",{href:"/decisions",className:"mt-2 inline-block text-sm underline",children:"결정 대기 카드 열기"})]})}var z=n(59112);let A=[{id:"missions",label:"Missions"},{id:"autonomy",label:"자율행동"}];function E(e){var t;let{arming:n}=e;if(!n)return null;let s=(e,t)=>(0,r.jsxs)("span",{className:["rounded px-2 py-0.5 text-xs ring-1",e?"bg-emerald-500/15 text-emerald-300 ring-emerald-500/30":"bg-muted text-muted-foreground ring-border"].join(" "),children:[t," ",e?"ON":"OFF"]});return(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[(0,r.jsx)("span",{children:"자율 경계:"}),s(n.absorb,"흡수 PR초안(".concat(n.absorbBackend,")")),s(n.merge,"mandate merge"),s(n.reboot,"재부팅"),s(null!=(t=n.materialize)&&t,"자율 구체화"),(0,r.jsx)("span",{className:"text-[11px]",children:"\xb7 재부팅은 항상 HITL \xb7 기본 disarmed(fail-closed)"})]})}function D(){let{client:e}=(0,a.Q)(),t=(0,s.useMemo)(()=>new m.Yt(e),[e]),[n,i]=(0,s.useState)("missions"),[o,l]=(0,s.useState)(null);return(0,s.useEffect)(()=>{let e=!0;return t.arming().then(t=>{e&&l(t.arming)}).catch(()=>{}),()=>{e=!1}},[t]),(0,r.jsxs)("div",{className:"mx-auto max-w-[1400px] px-4 pt-4",children:[(0,r.jsx)("div",{className:"mb-3",children:(0,r.jsx)(z.r,{active:"autopilot"})}),(0,r.jsxs)("div",{className:"mb-3 space-y-2",children:[(0,r.jsxs)("h1",{className:"text-lg font-semibold",children:["Missions ",(0,r.jsx)("span",{className:"text-sm font-normal text-muted-foreground",children:"미션 지휘 센터 \xb7 Autopilot"})]}),(0,r.jsx)("p",{className:"text-sm text-muted-foreground",children:"미션(사람 + 자율)의 계보\xb7상태\xb7자율행동. 아래 “골 던지기” 또는 텔레그램 “미션:” 마커로 소망을 던지면 미션이 됩니다."}),(0,r.jsx)(E,{arming:o})]}),(0,r.jsx)(C,{client:e}),(0,r.jsx)("div",{className:"flex gap-1 border-b border-border",children:A.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>i(e.id),className:["-mb-px border-b-2 px-4 py-2 text-sm font-medium transition-colors",n===e.id?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"].join(" "),children:e.label},e.id))}),(0,r.jsxs)("div",{className:"py-4",children:["missions"===n&&(0,r.jsx)(w,{api:t}),"autonomy"===n&&(0,r.jsx)(d,{api:t})]})]})}function I(){return(0,r.jsx)(D,{})}},75117:(e,t,n)=>{"use strict";n.d(t,{Zr:()=>i,f6:()=>s,oD:()=>a});let r="elanous.daemon.sessionId";function s(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function a(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(r,e),e):localStorage.getItem(r)}();if(e)return e;let t=s();return localStorage.setItem(r,t),t}function i(){let e=s();return localStorage.setItem(r,e),e}},79596:(e,t,n)=>{Promise.resolve().then(n.bind(n,67598))},79836:(e,t,n)=>{"use strict";n.d(t,{C:()=>d,DaemonProvider:()=>c,Q:()=>u});var r=n(65245),s=n(64297),a=n(67890),i=n(75117),o=n(79948),l=n(62391);let d=(0,s.createContext)(null);function c(e){let{children:t}=e,n={baseUrl:"",token:"",provider:""},[c,u]=(0,s.useState)(n),[m,x]=(0,s.useState)(""),[p]=(0,s.useState)(()=>new o.ki(n));(0,s.useEffect)(()=>{let e=(0,a.Fp)();u(e),p.updateConfig(e),x((0,i.oD)()),(0,l.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[p]),(0,s.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,a.Fp)();p.updateConfig(t),u(t),(0,l.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&x(t=>t===e.newValue?t:((0,l.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[p]);let g=e=>{u(t=>{let n={...t,...e};return(0,a.Qc)(e),p.updateConfig(n),(0,l.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),n})},h=e=>{x(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,l.cY)("webterm.provider.daemon.session-set",{sessionId:e})},b=(0,s.useMemo)(()=>({config:c,setConfig:g,client:p,sessionId:m,setSessionId:h}),[c,p,m]);return(0,r.jsx)(d.Provider,{value:b,children:t})}function u(){let e=(0,s.useContext)(d);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},86746:(e,t,n)=>{"use strict";async function r(e){let t=await e.fetchResponse("/v1/ops-board/notices");if(!t.ok)throw Error("notices list failed: ".concat(t.status));return(await t.json()).notices}async function s(e,t,n){let r=await e.fetchResponse("/v1/ops-board/notices",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({noticeId:t,body:n})});if(!r.ok)throw Error("notice reply failed: ".concat(r.status));return(await r.json()).reply}async function a(e){let t=await e.fetchResponse("/v1/decisions?status=open");if(!t.ok)throw Error("decisions list failed: ".concat(t.status));return(await t.json()).decisions}async function i(e,t,n,r){let s=await e.fetchResponse("/v1/decisions/".concat(encodeURIComponent(t),"/decide"),{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({choice:n,...void 0===r?{}:{note:r}})});if(!s.ok)throw Error("decision failed: ".concat(s.status));return s.json()}n.d(t,{LD:()=>i,aj:()=>s,kh:()=>r,qK:()=>a})}},e=>{e.O(0,[3177,3162,2541,9948,6396,5535,7358],()=>e(e.s=79596)),_N_E=e.O()}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7081],{44917:(e,t,s)=>{Promise.resolve().then(s.bind(s,88619))},75117:(e,t,s)=>{"use strict";s.d(t,{Zr:()=>l,f6:()=>r,oD:()=>n});let a="elanous.daemon.sessionId";function r(){return"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?crypto.randomUUID():"s-".concat(Date.now().toString(36),"-").concat(Math.random().toString(36).slice(2,10))}function n(){let e=function(){let e=new URLSearchParams(window.location.search).get("session");return e?(localStorage.setItem(a,e),e):localStorage.getItem(a)}();if(e)return e;let t=r();return localStorage.setItem(a,t),t}function l(){let e=r();return localStorage.setItem(a,e),e}},79836:(e,t,s)=>{"use strict";s.d(t,{C:()=>c,DaemonProvider:()=>d,Q:()=>u});var a=s(65245),r=s(64297),n=s(67890),l=s(75117),o=s(79948),i=s(62391);let c=(0,r.createContext)(null);function d(e){let{children:t}=e,s={baseUrl:"",token:"",provider:""},[d,u]=(0,r.useState)(s),[m,p]=(0,r.useState)(""),[f]=(0,r.useState)(()=>new o.ki(s));(0,r.useEffect)(()=>{let e=(0,n.Fp)();u(e),f.updateConfig(e),p((0,l.oD)()),(0,i.cY)("webterm.provider.daemon.init",{baseUrl:e.baseUrl,hasToken:!!e.token})},[f]),(0,r.useEffect)(()=>{let e=e=>{if("elanous.daemon.token"===e.key||"elanous.nexus.baseUrl"===e.key){let t=(0,n.Fp)();f.updateConfig(t),u(t),(0,i.cY)("webterm.provider.daemon.config-cross-tab",{key:e.key,hasToken:!!t.token});return}"elanous.daemon.sessionId"===e.key&&e.newValue&&p(t=>t===e.newValue?t:((0,i.cY)("webterm.provider.daemon.session-cross-tab",{previous:t||"(empty)",next:e.newValue}),e.newValue))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[f]);let h=e=>{u(t=>{let s={...t,...e};return(0,n.Qc)(e),f.updateConfig(s),(0,i.cY)("webterm.provider.daemon.config-update",{keys:Object.keys(e)}),s})},x=e=>{p(e),localStorage.setItem("elanous.daemon.sessionId",e),(0,i.cY)("webterm.provider.daemon.session-set",{sessionId:e})},g=(0,r.useMemo)(()=>({config:d,setConfig:h,client:f,sessionId:m,setSessionId:x}),[d,f,m]);return(0,a.jsx)(c.Provider,{value:g,children:t})}function u(){let e=(0,r.useContext)(c);if(!e)throw Error("useDaemon must be used inside <DaemonProvider>");return e}},87680:(e,t,s)=>{"use strict";s.d(t,{Er:()=>r,cj:()=>c,dc:()=>l,yR:()=>i});let a=/^(oauth\.|harness\.decision|llm\.router)/;function r(e){let t=[],s=e=>{"string"==typeof e&&e.trim()&&!t.includes(e.trim())&&t.push(e.trim())};for(let t of e){var r;let e=null!=(r=t.data)?r:{};if(t.category.startsWith("oauth.")){for(let t of["from","to","name","account"])s(e[t]);if(Array.isArray(e.usage))for(let t of e.usage)s(null==t?void 0:t.name);continue}if(a.test(t.category))for(let t of(s(e.account),["what","why","reason"])){let a=e[t];if("string"==typeof a)for(let e of a.matchAll(/계정\s+([A-Za-z0-9][\w.-]*)/g))s(e[1])}}return t}function n(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function l(e){let t=new Map(e.map((e,t)=>[e,"account-".concat(t+1)])),s=e.length?RegExp("(^|[^\\w-])(".concat(e.map(n).sort((e,t)=>t.length-e.length).join("|"),")(?![\\w-])"),"g"):null,a=new Map;return(e,r)=>{let n=e.replace(/\b[a-z0-9-]+\.tail[0-9a-f]+\.ts\.net\b/gi,"tailnet-host").replace(/\bmsb\d+\b/gi,e=>(e=>{let t=e.toLowerCase();a.has(t)||a.set(t,"remote-".concat(a.size+1));let s=a.get(t);return e===e.toUpperCase()?s.toUpperCase():s})(e)).replace(/\bmbp\b/gi,e=>e===e.toUpperCase()?"LOCAL":"local").replace(/\/Users\/[^/\s"']+/g,"~").replace(/(크레딧|credits?|💳)(\s*[:=]?\s*)[\d][\d,.]*/gi,"$1$2•••").replace(/[\d][\d,.]*(\s*)(크레딧|credits?)/gi,"•••$1$2").replace(/\$\s?[\d][\d,.]*/g,"$•••").replace(/(잔량?|remaining|left)(\s*[:=]?\s*)(?:[A-Za-z0-9][\w.-]*\s+)?\d+(?:\.\d+)?\s?%/gi,"$1$2•••");return r&&s&&(n=n.replace(s,(e,s,a)=>{var r;return"".concat(s).concat(null!=(r=t.get(a))?r:"account")})),n}}function o(e,t){if("string"==typeof e)return t(e);if(Array.isArray(e))return e.map(e=>o(e,t));if(e&&"object"==typeof e){let s={};for(let[a,r]of Object.entries(e))"apiEquivalentUsd"===a||"usd"===a||/credit(s|Balance)?$/i.test(a)||(s[a]=o(r,t));return s}return e}function i(e){let t=l(r(e));return e.map(e=>{let s=a.test(e.category);return{...e,event:t(e.event,!1),data:e.data?o(e.data,e=>t(e,s)):e.data}})}function c(e,t){let s=l(t);return o(e,e=>s(e,!0))}},88619:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>k});var a=s(65245),r=s(87680);function n(e){return e.map(e=>({...(0,r.cj)(e,[]),taskId:e.taskId,...e.wishReply?{wishReply:{surface:e.wishReply.surface,address:null}}:{}}))}var l=s(64297),o=s(79836);function i(e){var t;for(let t of[e.sections.triage,e.sections.intake]){let e=null==t?void 0:t.data.title;if("string"==typeof e&&e.trim())return e.trim()}return(null==(t=e.apiTitle)?void 0:t.trim())||e.taskId}var c=s(1807);let d={green:"순항",yellow:"진행 중",red:"막힘",done:"완료"},u=["intake","triage","gates","relations","memory","workspace","run","landing","release"];function m(e){return null==e?"—":"string"==typeof e?e:JSON.stringify(e)}function p(e){let{entry:t}=e;return(0,a.jsxs)("details",{className:"mt-2 text-xs",children:[(0,a.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"JSON"}),(0,a.jsx)("pre",{className:"mt-2 max-h-64 overflow-auto rounded-lg bg-muted p-2 text-xs whitespace-pre-wrap break-all",children:JSON.stringify(t.data,null,2)})]})}function f(e){let{entry:t}=e,s=new Date(t.ts).toISOString();return(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[(0,a.jsxs)("span",{children:["Owner: ",t.owner]}),(0,a.jsx)("time",{dateTime:s,children:s})]})}function h(e){var t,s,r;let{card:n,placements:o,onClose:c,publicCapture:h=!1}=e,[x,g]=(0,l.useState)(""),[b,y]=(0,l.useState)(!1),[w,k]=(0,l.useState)(null),v=async e=>{if(e.preventDefault(),!(!c||!x.trim()||/[\r\n]/.test(x))&&!b){y(!0),k(null);try{await c(x.trim())}catch(e){k(e instanceof Error?e.message:String(e))}finally{y(!1)}}},j=null==(t=n.sections.gates)?void 0:t.data;return(0,a.jsxs)("section",{"aria-label":"Task card detail",className:"min-w-0 space-y-4 rounded-2xl border border-border bg-card p-4",children:[(0,a.jsxs)("header",{children:[(0,a.jsx)("h2",{className:"text-lg font-semibold",children:i(n)}),(0,a.jsx)("p",{className:"break-all text-xs text-muted-foreground",children:n.taskId}),"closed"===n.status?(0,a.jsxs)("p",{role:"status",children:["닫힘 \xb7 ",null!=(s=n.closedReason)?s:"사유 없음"]}):!h&&c?(0,a.jsxs)("form",{onSubmit:v,className:"mt-3 flex flex-wrap items-end gap-2",children:[(0,a.jsxs)("label",{className:"text-sm",children:["닫기 사유 (한 줄)",(0,a.jsx)("input",{type:"text",required:!0,value:x,onChange:e=>g(e.target.value),className:"block rounded-md border border-border bg-background px-2 py-1"})]}),(0,a.jsx)("button",{type:"submit",disabled:b||!x.trim()||/[\r\n]/.test(x),className:"rounded-md border border-border px-3 py-1 text-sm",children:b?"닫는 중…":"닫기"}),w&&(0,a.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:w})]}):null]}),void 0!==n.wishReply&&(0,a.jsxs)("section",{"aria-label":"Wish reply destination",className:"rounded-xl border border-border p-3 text-sm",children:[(0,a.jsx)("h3",{className:"mb-1 font-semibold",children:"어디로 회신하나"}),(0,a.jsx)("p",{className:"break-all",children:n.wishReply?"".concat(null!=(r=({telegram:"텔레그램 대화",pwa:"PWA",tui:"TUI",linear:"Linear"})[n.wishReply.surface])?r:n.wishReply.surface).concat(n.wishReply.address?" \xb7 ".concat(n.wishReply.address):""):"회신 주소 없음"})]}),void 0!==n.wishReply&&(0,a.jsxs)("section",{"aria-label":"Wish reply history",className:"rounded-xl border border-border p-3 text-sm",children:[(0,a.jsx)("h3",{className:"mb-1 font-semibold",children:"회신 이력"}),(0,a.jsx)("p",{className:"text-muted-foreground",children:"카드 원장에는 회신 발송 이력이 기록되지 않습니다"})]}),o&&(0,a.jsxs)("p",{className:"overflow-x-auto whitespace-nowrap text-sm","aria-label":"Wish placement and progress",children:["배치 \xb7 ",o.length?o.map(e=>{let{cellId:t,cellTitle:s,version:a,status:r}=e;return"".concat(t," ").concat(s," \xb7 ").concat(a,"판 \xb7 ").concat(d[r])}).join(" / "):"아직 배치되지 않음"]}),j&&(0,a.jsxs)("p",{className:"overflow-x-auto whitespace-nowrap text-sm","aria-label":"Gate decisions",children:["Gate \xb7 budget: ",m(j.budget)," \xb7 location: ",m(j.location)]}),u.map(e=>{let t=n.sections[e];return t?(0,a.jsxs)("section",{"aria-label":"".concat(e," section"),className:"rounded-xl border border-border p-3",children:[(0,a.jsx)("h3",{className:"mb-1 text-sm font-semibold capitalize",children:e}),(0,a.jsx)(f,{entry:t}),(0,a.jsx)(p,{entry:t})]},e):null}),(0,a.jsxs)("section",{"aria-label":"Incidents",className:"space-y-2",children:[(0,a.jsxs)("h3",{className:"text-sm font-semibold",children:["Incidents (",n.incidents.length,")"]}),n.incidents.length?(0,a.jsx)("ol",{className:"space-y-2",children:n.incidents.map(e=>(0,a.jsxs)("li",{className:"rounded-xl border border-border p-3",children:[(0,a.jsx)(f,{entry:e}),(0,a.jsx)(p,{entry:e})]},e.key))}):(0,a.jsx)("p",{className:"text-xs text-muted-foreground",children:"No incidents."})]})]})}let x=["steward","execution","landing","release","done"],g=new Set(["intake","triage","gates","relations","memory","workspace","run","landing","release","incidents"]);function b(e){let t=[],s=Date.parse(e.createdAt),a=e.sections.find(e=>"intake:reply:0"===e.key),r=null;if(a)try{let e=JSON.parse(a.content);if(e&&"object"==typeof e&&!Array.isArray(e)){let{surface:t,address:s}=e;"string"==typeof t&&("string"==typeof s||null===s)&&(r={surface:t,address:s})}}catch(e){}for(let a of e.sections){let r;if(!g.has(a.key))continue;try{let e=JSON.parse(a.content);r=e&&"object"==typeof e&&!Array.isArray(e)?e:{content:a.content}}catch(e){r={content:a.content}}let n=Date.parse(a.createdAt);t.push({taskId:e.id,section:a.key,key:"".concat(a.key,":").concat(a.createdAt,":").concat(t.length),owner:a.owner,ts:Number.isFinite(n)?n:s,data:r,..."string"==typeof r.runId?{runId:r.runId}:{}})}if(0===t.length&&t.push({taskId:e.id,section:"triage",key:"api:title",owner:"task-card API",ts:s,data:{title:e.title}}),"closed"===e.status){let a=t.filter(e=>"release"===e.section).sort((e,t)=>t.ts-e.ts)[0];t.push({taskId:e.id,section:"release",key:"api:closed",owner:"task-card API",ts:Math.max(s,...t.map(e=>e.ts)),data:{...null==a?void 0:a.data,status:"done"}})}return{...function(e){let t,s=e[0];if(!s)return null;let a={},r=[],n=new Set,l=s.ts,o=-1/0;for(let i of e)if(!(i.taskId!==s.taskId||n.has(i.key)))if(n.add(i.key),l=Math.max(l,i.ts),i.runId&&i.ts>=o&&(t=i.runId,o=i.ts),"incidents"===i.section)r.push(i);else{let e=a[i.section];(!e||i.ts>=e.ts)&&(a[i.section]=i)}return{taskId:s.taskId,sections:a,incidents:r,updatedAt:l,...t?{runId:t}:{}}}(t),apiTitle:e.title,status:e.status,...void 0===e.closedReason?{}:{closedReason:e.closedReason},...e.goalId.startsWith("wish:")?{wishReply:r}:{}}}function y(e){let{cards:t,selectedId:s,onSelect:r,selectedCard:n,detailError:l,placements:o,onCloseCard:c,publicCapture:d}=e,u=(null==n?void 0:n.taskId)===s?n:null;return(0,a.jsxs)("div",{className:"space-y-4 p-4",children:[(0,a.jsx)("h1",{className:"text-xl font-semibold",children:"보드"}),(0,a.jsx)("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-5",children:x.map(e=>(0,a.jsxs)("section",{"aria-label":"".concat(e," column"),className:"min-w-0 space-y-2 rounded-xl border border-border p-3",children:[(0,a.jsx)("h2",{className:"text-sm font-semibold capitalize",children:e}),t.filter(t=>(function(e){var t;let s=null==(t=e.sections.release)?void 0:t.data;return(null==s?void 0:s.status)==="done"||(null==s?void 0:s.status)==="completed"?"done":s?"release":e.sections.landing?"landing":e.sections.run||e.sections.workspace||e.sections.gates||e.sections.relations||e.sections.memory?"execution":"steward"})(t)===e).map(e=>{var t,n;return(0,a.jsxs)("button",{type:"button",onClick:()=>r(e.taskId),"aria-pressed":s===e.taskId,className:"w-full rounded-lg border border-border bg-card p-3 text-left text-sm hover:bg-accent/40",children:[(0,a.jsx)("span",{className:"block font-medium",children:i(e)}),(0,a.jsx)("span",{className:"block text-xs text-muted-foreground",children:(0,a.jsx)("time",{dateTime:new Date(e.updatedAt).toISOString(),title:new Date(e.updatedAt).toLocaleString(),children:(t=function(e){let t=new Map;for(let a of e.incidents){var s;let e=null!=(s=a.data.incidentId)?s:a.data.id,r="string"==typeof e&&e.trim()?e:a.key,n=t.get(r);(!n||a.ts>=n.ts)&&t.set(r,a)}return Array.from(t.values()).filter(e=>"closed"!==e.data.status&&"resolved"!==e.data.status).length}(e),n=Date.now(),[...t>0?["사고 ".concat(t)]:[],...e.runId?["런 ".concat(e.runId.replace(/^run-/,"").slice(0,8))]:[],function(e,t,s){let a=Math.floor((t-e)/6e4);if(!Number.isFinite(a)||a<1)return"방금";if(a<60)return"".concat(a,"분 전");if(a<1440)return"".concat(Math.floor(a/60),"시간 전");let r=new Intl.DateTimeFormat("ko-KR",{month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,...s?{timeZone:s}:{}}).formatToParts(new Date(e)),n=e=>{var t,s;return null!=(s=null==(t=r.find(t=>t.type===e))?void 0:t.value)?s:""};return"".concat(n("month"),"/").concat(n("day")," ").concat(n("hour"),":").concat(n("minute"))}(e.updatedAt,n,void 0)]).join(" \xb7 ")})})]},e.taskId)})]},e))}),s&&(0,a.jsxs)("aside",{className:"max-w-3xl space-y-2","aria-label":"Selected card",children:[(0,a.jsx)("button",{type:"button",onClick:()=>r(null),"aria-label":"Close card detail",className:"text-sm text-muted-foreground",children:"Close"}),u?(0,a.jsx)(h,{card:u,placements:o,onClose:c,publicCapture:d}):(0,a.jsx)("p",{role:"status",children:null!=l?l:"Loading card detail…"})]})]})}function w(){let{config:e}=(0,o.Q)(),t=(0,l.useMemo)(()=>e.baseUrl?(0,c.xX)({baseUrl:e.baseUrl,...e.token?{token:e.token}:{}}):null,[e.baseUrl,e.token]),[s,i]=(0,l.useState)([]),[d,u]=(0,l.useState)(null),[m,p]=(0,l.useState)(null),[f,h]=(0,l.useState)(void 0),[x,g]=(0,l.useState)(null),[w,k]=(0,l.useState)(null),[v,j]=(0,l.useState)(!1);(0,l.useEffect)(()=>{"public"===new URLSearchParams(window.location.search).get("capture")&&j(!0)},[]);let N=(0,l.useMemo)(()=>v?n(s):s,[s,v]),I=v&&m?n([m])[0]:m,S=v&&f?(0,r.cj)(f,[]):f;(0,l.useEffect)(()=>{let e=!1;if(i([]),u(null),p(null),h(void 0),g(null),!t)return void k("Connect to NEXUS to load task cards.");k(null);let s=()=>t.getTaskCards().then(t=>{let{cards:s}=t;e||(i(s.map(b)),k(null))}).catch(t=>{e||k(t instanceof c.Iu&&404===t.status?"Task cards are not available yet (pre-E1).":t instanceof Error?t.message:String(t))});s();let a=setInterval(()=>{s()},1e4);return()=>{e=!0,clearInterval(a)}},[t]),(0,l.useEffect)(()=>{if(!t||!d)return;let e=!1;return p(null),h(void 0),g(null),t.getTaskCard(d).then(t=>{let{card:s,placements:a}=t;e||(h(a),p(b(s)))}).catch(t=>{e||g(t instanceof Error?t.message:String(t))}),()=>{e=!0}},[t,d]);let C=async e=>{if(!t||!d||v)throw Error("Card close unavailable");let{card:s}=await t.closeTaskCard(d,e);p(e=>(null==e?void 0:e.taskId)===d?b(s):e),i(e=>e.map(e=>e.taskId===s.id?b(s):e))};return(0,a.jsxs)(a.Fragment,{children:[w&&(0,a.jsx)("p",{role:"status",className:"p-4 text-sm text-muted-foreground",children:w}),(0,a.jsx)(y,{cards:N,selectedId:d,selectedCard:I,detailError:x,placements:S,onSelect:e=>{(null===e||d!==e)&&(p(null),h(void 0),g(null),u(e))},onCloseCard:C,publicCapture:v})]})}function k(){return(0,a.jsx)(w,{})}}},e=>{e.O(0,[9948,1807,6396,5535,7358],()=>e(e.s=44917)),_N_E=e.O()}]);