@stigmer/server-slim 3.17.0 → 3.18.0

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 (581) hide show
  1. package/console/404.html +1 -1
  2. package/console/__next.__PAGE__.txt +2 -2
  3. package/console/__next._full.txt +16 -16
  4. package/console/__next._head.txt +4 -4
  5. package/console/__next._index.txt +10 -10
  6. package/console/__next._tree.txt +2 -2
  7. package/console/_next/static/chunks/{04hrkprhk3cjo.js → 0.cr0e7bzkpoi.js} +3 -3
  8. package/console/_next/static/chunks/0.ocu5b3uajbn.js +1 -0
  9. package/console/_next/static/chunks/{16ukgtm3fhab~.js → 06qoer~dl1svs.js} +2 -2
  10. package/console/_next/static/chunks/071fdr3kvata1.js +1 -0
  11. package/console/_next/static/chunks/{0s5t77.~jqey1.js → 0_3utrn1at0vi.js} +1 -1
  12. package/console/_next/static/chunks/0_j8~rfb.1ufy.js +1 -0
  13. package/console/_next/static/chunks/0auyo62rglco8.js +1 -0
  14. package/console/_next/static/chunks/{0xp6mamoqde.n.js → 0fgcvnc-b_oz_.js} +1 -1
  15. package/console/_next/static/chunks/0gz8yljnjzsmu.js +1 -0
  16. package/console/_next/static/chunks/{107065384mt73.js → 0hc-53ypd.8xp.js} +1 -1
  17. package/console/_next/static/chunks/0hca-f9-nua.e.js +1 -0
  18. package/console/_next/static/chunks/0j~6628v9z3k-.js +1 -0
  19. package/console/_next/static/chunks/0pxd7smgb31vs.js +1 -0
  20. package/console/_next/static/chunks/0rs1tuslqwnz3.js +1 -0
  21. package/console/_next/static/chunks/0s6bm1sujua~8.css +1 -0
  22. package/console/_next/static/chunks/0xq42ojv80jqz.js +1 -0
  23. package/console/_next/static/chunks/{0dmmn-x2crcuv.js → 0xs_3fux3hsk3.js} +2 -2
  24. package/console/_next/static/chunks/{127-4s-8utcan.js → 0yheev3nzjrip.js} +1 -1
  25. package/console/_next/static/chunks/0yuo~koxf.2fn.js +1 -0
  26. package/console/_next/static/chunks/0zzf3a9srn32x.js +1 -0
  27. package/console/_next/static/chunks/110bry9pdkk8s.js +5 -0
  28. package/console/_next/static/chunks/17pusweun3t84.js +1 -0
  29. package/console/_not-found/__next._full.txt +16 -16
  30. package/console/_not-found/__next._head.txt +4 -4
  31. package/console/_not-found/__next._index.txt +10 -10
  32. package/console/_not-found/__next._not-found.__PAGE__.txt +3 -3
  33. package/console/_not-found/__next._not-found.txt +3 -3
  34. package/console/_not-found/__next._tree.txt +2 -2
  35. package/console/_not-found.html +1 -1
  36. package/console/_not-found.txt +16 -16
  37. package/console/auth/callback/__next._full.txt +18 -18
  38. package/console/auth/callback/__next._head.txt +4 -4
  39. package/console/auth/callback/__next._index.txt +10 -10
  40. package/console/auth/callback/__next._tree.txt +2 -2
  41. package/console/auth/callback/__next.auth.callback.__PAGE__.txt +4 -4
  42. package/console/auth/callback/__next.auth.callback.txt +3 -3
  43. package/console/auth/callback/__next.auth.txt +3 -3
  44. package/console/auth/callback.html +1 -1
  45. package/console/auth/callback.txt +18 -18
  46. package/console/auth/github/callback/__next._full.txt +18 -18
  47. package/console/auth/github/callback/__next._head.txt +4 -4
  48. package/console/auth/github/callback/__next._index.txt +10 -10
  49. package/console/auth/github/callback/__next._tree.txt +2 -2
  50. package/console/auth/github/callback/__next.auth.github.callback.__PAGE__.txt +4 -4
  51. package/console/auth/github/callback/__next.auth.github.callback.txt +3 -3
  52. package/console/auth/github/callback/__next.auth.github.txt +3 -3
  53. package/console/auth/github/callback/__next.auth.txt +3 -3
  54. package/console/auth/github/callback.html +1 -1
  55. package/console/auth/github/callback.txt +18 -18
  56. package/console/auth/oauth/callback/__next._full.txt +18 -18
  57. package/console/auth/oauth/callback/__next._head.txt +4 -4
  58. package/console/auth/oauth/callback/__next._index.txt +10 -10
  59. package/console/auth/oauth/callback/__next._tree.txt +2 -2
  60. package/console/auth/oauth/callback/__next.auth.oauth.callback.__PAGE__.txt +4 -4
  61. package/console/auth/oauth/callback/__next.auth.oauth.callback.txt +3 -3
  62. package/console/auth/oauth/callback/__next.auth.oauth.txt +3 -3
  63. package/console/auth/oauth/callback/__next.auth.txt +3 -3
  64. package/console/auth/oauth/callback.html +1 -1
  65. package/console/auth/oauth/callback.txt +18 -18
  66. package/console/chat/__placeholder__/__placeholder__/__next._full.txt +17 -17
  67. package/console/chat/__placeholder__/__placeholder__/__next._head.txt +4 -4
  68. package/console/chat/__placeholder__/__placeholder__/__next._index.txt +10 -10
  69. package/console/chat/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  70. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.__PAGE__.txt +3 -3
  71. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.txt +3 -3
  72. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.txt +3 -3
  73. package/console/chat/__placeholder__/__placeholder__/__next.chat.txt +3 -3
  74. package/console/chat/__placeholder__/__placeholder__.html +1 -1
  75. package/console/chat/__placeholder__/__placeholder__.txt +17 -17
  76. package/console/conversations/__next._full.txt +17 -17
  77. package/console/conversations/__next._head.txt +4 -4
  78. package/console/conversations/__next._index.txt +10 -10
  79. package/console/conversations/__next._tree.txt +2 -2
  80. package/console/conversations/__next.conversations.__PAGE__.txt +3 -3
  81. package/console/conversations/__next.conversations.txt +3 -3
  82. package/console/conversations/__placeholder__/__placeholder__/__next._full.txt +17 -17
  83. package/console/conversations/__placeholder__/__placeholder__/__next._head.txt +4 -4
  84. package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +10 -10
  85. package/console/conversations/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  86. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.__PAGE__.txt +3 -3
  87. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.txt +3 -3
  88. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.txt +3 -3
  89. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.txt +3 -3
  90. package/console/conversations/__placeholder__/__placeholder__.html +1 -1
  91. package/console/conversations/__placeholder__/__placeholder__.txt +17 -17
  92. package/console/conversations.html +1 -1
  93. package/console/conversations.txt +17 -17
  94. package/console/dashboard/__next._full.txt +17 -17
  95. package/console/dashboard/__next._head.txt +4 -4
  96. package/console/dashboard/__next._index.txt +10 -10
  97. package/console/dashboard/__next._tree.txt +2 -2
  98. package/console/dashboard/__next.dashboard.__PAGE__.txt +3 -3
  99. package/console/dashboard/__next.dashboard.txt +3 -3
  100. package/console/dashboard.html +1 -1
  101. package/console/dashboard.txt +17 -17
  102. package/console/executions/__placeholder__/__next._full.txt +16 -16
  103. package/console/executions/__placeholder__/__next._head.txt +4 -4
  104. package/console/executions/__placeholder__/__next._index.txt +10 -10
  105. package/console/executions/__placeholder__/__next._tree.txt +2 -2
  106. package/console/executions/__placeholder__/__next.executions.$d$id.__PAGE__.txt +2 -2
  107. package/console/executions/__placeholder__/__next.executions.$d$id.txt +3 -3
  108. package/console/executions/__placeholder__/__next.executions.txt +3 -3
  109. package/console/executions/__placeholder__.html +1 -1
  110. package/console/executions/__placeholder__.txt +16 -16
  111. package/console/index.html +1 -1
  112. package/console/index.txt +16 -16
  113. package/console/invite/__placeholder__/__next._full.txt +17 -17
  114. package/console/invite/__placeholder__/__next._head.txt +4 -4
  115. package/console/invite/__placeholder__/__next._index.txt +10 -10
  116. package/console/invite/__placeholder__/__next._tree.txt +2 -2
  117. package/console/invite/__placeholder__/__next.invite.$d$token.__PAGE__.txt +3 -3
  118. package/console/invite/__placeholder__/__next.invite.$d$token.txt +3 -3
  119. package/console/invite/__placeholder__/__next.invite.txt +3 -3
  120. package/console/invite/__placeholder__.html +1 -1
  121. package/console/invite/__placeholder__.txt +17 -17
  122. package/console/library/__next._full.txt +21 -21
  123. package/console/library/__next._head.txt +4 -4
  124. package/console/library/__next._index.txt +10 -10
  125. package/console/library/__next._tree.txt +2 -2
  126. package/console/library/__next.library.__PAGE__.txt +3 -3
  127. package/console/library/__next.library.txt +5 -5
  128. package/console/library/agents/__next._full.txt +21 -21
  129. package/console/library/agents/__next._head.txt +4 -4
  130. package/console/library/agents/__next._index.txt +10 -10
  131. package/console/library/agents/__next._tree.txt +2 -2
  132. package/console/library/agents/__next.library.agents.__PAGE__.txt +3 -3
  133. package/console/library/agents/__next.library.agents.txt +3 -3
  134. package/console/library/agents/__next.library.txt +5 -5
  135. package/console/library/agents/__placeholder__/__placeholder__/__next._full.txt +20 -20
  136. package/console/library/agents/__placeholder__/__placeholder__/__next._head.txt +4 -4
  137. package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +10 -10
  138. package/console/library/agents/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  139. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.__PAGE__.txt +3 -3
  140. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.txt +3 -3
  141. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.txt +3 -3
  142. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.txt +3 -3
  143. package/console/library/agents/__placeholder__/__placeholder__/__next.library.txt +5 -5
  144. package/console/library/agents/__placeholder__/__placeholder__.html +1 -1
  145. package/console/library/agents/__placeholder__/__placeholder__.txt +20 -20
  146. package/console/library/agents/new/__next._full.txt +21 -21
  147. package/console/library/agents/new/__next._head.txt +4 -4
  148. package/console/library/agents/new/__next._index.txt +10 -10
  149. package/console/library/agents/new/__next._tree.txt +2 -2
  150. package/console/library/agents/new/__next.library.agents.new.__PAGE__.txt +4 -4
  151. package/console/library/agents/new/__next.library.agents.new.txt +3 -3
  152. package/console/library/agents/new/__next.library.agents.txt +3 -3
  153. package/console/library/agents/new/__next.library.txt +5 -5
  154. package/console/library/agents/new.html +1 -1
  155. package/console/library/agents/new.txt +21 -21
  156. package/console/library/agents.html +1 -1
  157. package/console/library/agents.txt +21 -21
  158. package/console/library/mcp-servers/__next._full.txt +21 -21
  159. package/console/library/mcp-servers/__next._head.txt +4 -4
  160. package/console/library/mcp-servers/__next._index.txt +10 -10
  161. package/console/library/mcp-servers/__next._tree.txt +2 -2
  162. package/console/library/mcp-servers/__next.library.mcp-servers.__PAGE__.txt +3 -3
  163. package/console/library/mcp-servers/__next.library.mcp-servers.txt +3 -3
  164. package/console/library/mcp-servers/__next.library.txt +5 -5
  165. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._full.txt +20 -20
  166. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._head.txt +4 -4
  167. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._index.txt +10 -10
  168. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  169. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.__PAGE__.txt +3 -3
  170. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.txt +3 -3
  171. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.txt +3 -3
  172. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.txt +3 -3
  173. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.txt +5 -5
  174. package/console/library/mcp-servers/__placeholder__/__placeholder__.html +1 -1
  175. package/console/library/mcp-servers/__placeholder__/__placeholder__.txt +20 -20
  176. package/console/library/mcp-servers/new/__next._full.txt +21 -21
  177. package/console/library/mcp-servers/new/__next._head.txt +4 -4
  178. package/console/library/mcp-servers/new/__next._index.txt +10 -10
  179. package/console/library/mcp-servers/new/__next._tree.txt +2 -2
  180. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.__PAGE__.txt +4 -4
  181. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.txt +3 -3
  182. package/console/library/mcp-servers/new/__next.library.mcp-servers.txt +3 -3
  183. package/console/library/mcp-servers/new/__next.library.txt +5 -5
  184. package/console/library/mcp-servers/new.html +1 -1
  185. package/console/library/mcp-servers/new.txt +21 -21
  186. package/console/library/mcp-servers.html +1 -1
  187. package/console/library/mcp-servers.txt +21 -21
  188. package/console/library/plugins/__next._full.txt +21 -21
  189. package/console/library/plugins/__next._head.txt +4 -4
  190. package/console/library/plugins/__next._index.txt +10 -10
  191. package/console/library/plugins/__next._tree.txt +2 -2
  192. package/console/library/plugins/__next.library.plugins.__PAGE__.txt +3 -3
  193. package/console/library/plugins/__next.library.plugins.txt +3 -3
  194. package/console/library/plugins/__next.library.txt +5 -5
  195. package/console/library/plugins/__placeholder__/__placeholder__/__next._full.txt +20 -20
  196. package/console/library/plugins/__placeholder__/__placeholder__/__next._head.txt +4 -4
  197. package/console/library/plugins/__placeholder__/__placeholder__/__next._index.txt +10 -10
  198. package/console/library/plugins/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  199. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.__PAGE__.txt +3 -3
  200. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.txt +3 -3
  201. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.txt +3 -3
  202. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.txt +3 -3
  203. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.txt +5 -5
  204. package/console/library/plugins/__placeholder__/__placeholder__.html +1 -1
  205. package/console/library/plugins/__placeholder__/__placeholder__.txt +20 -20
  206. package/console/library/plugins/upload/__next._full.txt +41 -0
  207. package/console/library/plugins/upload/__next._head.txt +6 -0
  208. package/console/library/plugins/upload/__next._index.txt +17 -0
  209. package/console/library/plugins/{install → upload}/__next._tree.txt +2 -2
  210. package/console/library/plugins/upload/__next.library.plugins.txt +5 -0
  211. package/console/library/plugins/upload/__next.library.plugins.upload.__PAGE__.txt +9 -0
  212. package/console/library/plugins/upload/__next.library.plugins.upload.txt +5 -0
  213. package/console/library/plugins/upload/__next.library.txt +7 -0
  214. package/console/library/plugins/upload.html +1 -0
  215. package/console/library/plugins/upload.txt +41 -0
  216. package/console/library/plugins.html +1 -1
  217. package/console/library/plugins.txt +21 -21
  218. package/console/library/schedules/__next._full.txt +20 -20
  219. package/console/library/schedules/__next._head.txt +4 -4
  220. package/console/library/schedules/__next._index.txt +10 -10
  221. package/console/library/schedules/__next._tree.txt +2 -2
  222. package/console/library/schedules/__next.library.schedules.__PAGE__.txt +3 -3
  223. package/console/library/schedules/__next.library.schedules.txt +3 -3
  224. package/console/library/schedules/__next.library.txt +5 -5
  225. package/console/library/schedules/__placeholder__/__placeholder__/__next._full.txt +20 -20
  226. package/console/library/schedules/__placeholder__/__placeholder__/__next._head.txt +4 -4
  227. package/console/library/schedules/__placeholder__/__placeholder__/__next._index.txt +10 -10
  228. package/console/library/schedules/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  229. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.__PAGE__.txt +3 -3
  230. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.txt +3 -3
  231. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.txt +3 -3
  232. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.txt +3 -3
  233. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.txt +5 -5
  234. package/console/library/schedules/__placeholder__/__placeholder__.html +1 -1
  235. package/console/library/schedules/__placeholder__/__placeholder__.txt +20 -20
  236. package/console/library/schedules/new/__next._full.txt +21 -21
  237. package/console/library/schedules/new/__next._head.txt +4 -4
  238. package/console/library/schedules/new/__next._index.txt +10 -10
  239. package/console/library/schedules/new/__next._tree.txt +2 -2
  240. package/console/library/schedules/new/__next.library.schedules.new.__PAGE__.txt +4 -4
  241. package/console/library/schedules/new/__next.library.schedules.new.txt +3 -3
  242. package/console/library/schedules/new/__next.library.schedules.txt +3 -3
  243. package/console/library/schedules/new/__next.library.txt +5 -5
  244. package/console/library/schedules/new.html +1 -1
  245. package/console/library/schedules/new.txt +21 -21
  246. package/console/library/schedules.html +1 -1
  247. package/console/library/schedules.txt +20 -20
  248. package/console/library/skills/__next._full.txt +20 -20
  249. package/console/library/skills/__next._head.txt +4 -4
  250. package/console/library/skills/__next._index.txt +10 -10
  251. package/console/library/skills/__next._tree.txt +2 -2
  252. package/console/library/skills/__next.library.skills.__PAGE__.txt +3 -3
  253. package/console/library/skills/__next.library.skills.txt +3 -3
  254. package/console/library/skills/__next.library.txt +5 -5
  255. package/console/library/skills/__placeholder__/__placeholder__/__next._full.txt +20 -20
  256. package/console/library/skills/__placeholder__/__placeholder__/__next._head.txt +4 -4
  257. package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +10 -10
  258. package/console/library/skills/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  259. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.__PAGE__.txt +3 -3
  260. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.txt +3 -3
  261. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.txt +3 -3
  262. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.txt +3 -3
  263. package/console/library/skills/__placeholder__/__placeholder__/__next.library.txt +5 -5
  264. package/console/library/skills/__placeholder__/__placeholder__.html +1 -1
  265. package/console/library/skills/__placeholder__/__placeholder__.txt +20 -20
  266. package/console/library/skills/new/__next._full.txt +22 -22
  267. package/console/library/skills/new/__next._head.txt +4 -4
  268. package/console/library/skills/new/__next._index.txt +10 -10
  269. package/console/library/skills/new/__next._tree.txt +2 -2
  270. package/console/library/skills/new/__next.library.skills.new.__PAGE__.txt +4 -4
  271. package/console/library/skills/new/__next.library.skills.new.txt +3 -3
  272. package/console/library/skills/new/__next.library.skills.txt +3 -3
  273. package/console/library/skills/new/__next.library.txt +5 -5
  274. package/console/library/skills/new.html +1 -1
  275. package/console/library/skills/new.txt +22 -22
  276. package/console/library/skills.html +1 -1
  277. package/console/library/skills.txt +20 -20
  278. package/console/library/workflows/__next._full.txt +21 -21
  279. package/console/library/workflows/__next._head.txt +4 -4
  280. package/console/library/workflows/__next._index.txt +10 -10
  281. package/console/library/workflows/__next._tree.txt +2 -2
  282. package/console/library/workflows/__next.library.txt +5 -5
  283. package/console/library/workflows/__next.library.workflows.__PAGE__.txt +3 -3
  284. package/console/library/workflows/__next.library.workflows.txt +3 -3
  285. package/console/library/workflows/__placeholder__/__placeholder__/__next._full.txt +20 -20
  286. package/console/library/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
  287. package/console/library/workflows/__placeholder__/__placeholder__/__next._index.txt +10 -10
  288. package/console/library/workflows/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  289. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.txt +5 -5
  290. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
  291. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.txt +3 -3
  292. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.txt +3 -3
  293. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.txt +3 -3
  294. package/console/library/workflows/__placeholder__/__placeholder__.html +1 -1
  295. package/console/library/workflows/__placeholder__/__placeholder__.txt +20 -20
  296. package/console/library/workflows/executions/__next._full.txt +20 -20
  297. package/console/library/workflows/executions/__next._head.txt +4 -4
  298. package/console/library/workflows/executions/__next._index.txt +10 -10
  299. package/console/library/workflows/executions/__next._tree.txt +2 -2
  300. package/console/library/workflows/executions/__next.library.txt +5 -5
  301. package/console/library/workflows/executions/__next.library.workflows.executions.__PAGE__.txt +3 -3
  302. package/console/library/workflows/executions/__next.library.workflows.executions.txt +3 -3
  303. package/console/library/workflows/executions/__next.library.workflows.txt +3 -3
  304. package/console/library/workflows/executions.html +1 -1
  305. package/console/library/workflows/executions.txt +20 -20
  306. package/console/library/workflows/new/__next._full.txt +22 -22
  307. package/console/library/workflows/new/__next._head.txt +4 -4
  308. package/console/library/workflows/new/__next._index.txt +10 -10
  309. package/console/library/workflows/new/__next._tree.txt +2 -2
  310. package/console/library/workflows/new/__next.library.txt +5 -5
  311. package/console/library/workflows/new/__next.library.workflows.new.__PAGE__.txt +4 -4
  312. package/console/library/workflows/new/__next.library.workflows.new.txt +3 -3
  313. package/console/library/workflows/new/__next.library.workflows.txt +3 -3
  314. package/console/library/workflows/new.html +1 -1
  315. package/console/library/workflows/new.txt +22 -22
  316. package/console/library/workflows.html +1 -1
  317. package/console/library/workflows.txt +21 -21
  318. package/console/library.html +1 -1
  319. package/console/library.txt +21 -21
  320. package/console/login/__next._full.txt +18 -18
  321. package/console/login/__next._head.txt +4 -4
  322. package/console/login/__next._index.txt +10 -10
  323. package/console/login/__next._tree.txt +2 -2
  324. package/console/login/__next.login.__PAGE__.txt +4 -4
  325. package/console/login/__next.login.txt +3 -3
  326. package/console/login.html +1 -1
  327. package/console/login.txt +18 -18
  328. package/console/marketplace/__next._full.txt +32 -0
  329. package/console/marketplace/__next._head.txt +6 -0
  330. package/console/marketplace/__next._index.txt +17 -0
  331. package/console/marketplace/__next._tree.txt +5 -0
  332. package/console/marketplace/__next.marketplace.__PAGE__.txt +6 -0
  333. package/console/marketplace/__next.marketplace.txt +5 -0
  334. package/console/marketplace.html +1 -0
  335. package/console/marketplace.txt +32 -0
  336. package/console/oauth/slack/callback/__next._full.txt +18 -18
  337. package/console/oauth/slack/callback/__next._head.txt +4 -4
  338. package/console/oauth/slack/callback/__next._index.txt +10 -10
  339. package/console/oauth/slack/callback/__next._tree.txt +2 -2
  340. package/console/oauth/slack/callback/__next.oauth.slack.callback.__PAGE__.txt +4 -4
  341. package/console/oauth/slack/callback/__next.oauth.slack.callback.txt +3 -3
  342. package/console/oauth/slack/callback/__next.oauth.slack.txt +3 -3
  343. package/console/oauth/slack/callback/__next.oauth.txt +3 -3
  344. package/console/oauth/slack/callback.html +1 -1
  345. package/console/oauth/slack/callback.txt +18 -18
  346. package/console/sessions/__placeholder__/__next._full.txt +16 -16
  347. package/console/sessions/__placeholder__/__next._head.txt +4 -4
  348. package/console/sessions/__placeholder__/__next._index.txt +10 -10
  349. package/console/sessions/__placeholder__/__next._tree.txt +2 -2
  350. package/console/sessions/__placeholder__/__next.sessions.$d$id.__PAGE__.txt +2 -2
  351. package/console/sessions/__placeholder__/__next.sessions.$d$id.txt +3 -3
  352. package/console/sessions/__placeholder__/__next.sessions.txt +3 -3
  353. package/console/sessions/__placeholder__.html +1 -1
  354. package/console/sessions/__placeholder__.txt +16 -16
  355. package/console/settings/__next._full.txt +20 -20
  356. package/console/settings/__next._head.txt +4 -4
  357. package/console/settings/__next._index.txt +10 -10
  358. package/console/settings/__next._tree.txt +2 -2
  359. package/console/settings/__next.settings.__PAGE__.txt +4 -4
  360. package/console/settings/__next.settings.txt +5 -5
  361. package/console/settings/account-preferences/__next._full.txt +19 -19
  362. package/console/settings/account-preferences/__next._head.txt +4 -4
  363. package/console/settings/account-preferences/__next._index.txt +10 -10
  364. package/console/settings/account-preferences/__next._tree.txt +2 -2
  365. package/console/settings/account-preferences/__next.settings.account-preferences.__PAGE__.txt +3 -3
  366. package/console/settings/account-preferences/__next.settings.account-preferences.txt +3 -3
  367. package/console/settings/account-preferences/__next.settings.txt +5 -5
  368. package/console/settings/account-preferences.html +1 -1
  369. package/console/settings/account-preferences.txt +19 -19
  370. package/console/settings/api-keys/__next._full.txt +19 -19
  371. package/console/settings/api-keys/__next._head.txt +4 -4
  372. package/console/settings/api-keys/__next._index.txt +10 -10
  373. package/console/settings/api-keys/__next._tree.txt +2 -2
  374. package/console/settings/api-keys/__next.settings.api-keys.__PAGE__.txt +3 -3
  375. package/console/settings/api-keys/__next.settings.api-keys.txt +3 -3
  376. package/console/settings/api-keys/__next.settings.txt +5 -5
  377. package/console/settings/api-keys.html +1 -1
  378. package/console/settings/api-keys.txt +19 -19
  379. package/console/settings/billing/__next._full.txt +20 -20
  380. package/console/settings/billing/__next._head.txt +4 -4
  381. package/console/settings/billing/__next._index.txt +10 -10
  382. package/console/settings/billing/__next._tree.txt +2 -2
  383. package/console/settings/billing/__next.settings.billing.__PAGE__.txt +4 -4
  384. package/console/settings/billing/__next.settings.billing.txt +3 -3
  385. package/console/settings/billing/__next.settings.txt +5 -5
  386. package/console/settings/billing.html +1 -1
  387. package/console/settings/billing.txt +20 -20
  388. package/console/settings/channel-apps/__next._full.txt +19 -19
  389. package/console/settings/channel-apps/__next._head.txt +4 -4
  390. package/console/settings/channel-apps/__next._index.txt +10 -10
  391. package/console/settings/channel-apps/__next._tree.txt +2 -2
  392. package/console/settings/channel-apps/__next.settings.channel-apps.__PAGE__.txt +3 -3
  393. package/console/settings/channel-apps/__next.settings.channel-apps.txt +3 -3
  394. package/console/settings/channel-apps/__next.settings.txt +5 -5
  395. package/console/settings/channel-apps.html +1 -1
  396. package/console/settings/channel-apps.txt +19 -19
  397. package/console/settings/cursor-accounts/__next._full.txt +20 -20
  398. package/console/settings/cursor-accounts/__next._head.txt +4 -4
  399. package/console/settings/cursor-accounts/__next._index.txt +10 -10
  400. package/console/settings/cursor-accounts/__next._tree.txt +2 -2
  401. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.__PAGE__.txt +4 -4
  402. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.txt +3 -3
  403. package/console/settings/cursor-accounts/__next.settings.txt +5 -5
  404. package/console/settings/cursor-accounts.html +1 -1
  405. package/console/settings/cursor-accounts.txt +20 -20
  406. package/console/settings/environments/__next._full.txt +19 -19
  407. package/console/settings/environments/__next._head.txt +4 -4
  408. package/console/settings/environments/__next._index.txt +10 -10
  409. package/console/settings/environments/__next._tree.txt +2 -2
  410. package/console/settings/environments/__next.settings.environments.__PAGE__.txt +3 -3
  411. package/console/settings/environments/__next.settings.environments.txt +3 -3
  412. package/console/settings/environments/__next.settings.txt +5 -5
  413. package/console/settings/environments.html +1 -1
  414. package/console/settings/environments.txt +19 -19
  415. package/console/settings/identity-providers/__next._full.txt +19 -19
  416. package/console/settings/identity-providers/__next._head.txt +4 -4
  417. package/console/settings/identity-providers/__next._index.txt +10 -10
  418. package/console/settings/identity-providers/__next._tree.txt +2 -2
  419. package/console/settings/identity-providers/__next.settings.identity-providers.__PAGE__.txt +3 -3
  420. package/console/settings/identity-providers/__next.settings.identity-providers.txt +3 -3
  421. package/console/settings/identity-providers/__next.settings.txt +5 -5
  422. package/console/settings/identity-providers.html +1 -1
  423. package/console/settings/identity-providers.txt +19 -19
  424. package/console/settings/invitations/__next._full.txt +19 -19
  425. package/console/settings/invitations/__next._head.txt +4 -4
  426. package/console/settings/invitations/__next._index.txt +10 -10
  427. package/console/settings/invitations/__next._tree.txt +2 -2
  428. package/console/settings/invitations/__next.settings.invitations.__PAGE__.txt +3 -3
  429. package/console/settings/invitations/__next.settings.invitations.txt +3 -3
  430. package/console/settings/invitations/__next.settings.txt +5 -5
  431. package/console/settings/invitations.html +1 -1
  432. package/console/settings/invitations.txt +19 -19
  433. package/console/settings/members/__next._full.txt +19 -19
  434. package/console/settings/members/__next._head.txt +4 -4
  435. package/console/settings/members/__next._index.txt +10 -10
  436. package/console/settings/members/__next._tree.txt +2 -2
  437. package/console/settings/members/__next.settings.members.__PAGE__.txt +3 -3
  438. package/console/settings/members/__next.settings.members.txt +3 -3
  439. package/console/settings/members/__next.settings.txt +5 -5
  440. package/console/settings/members.html +1 -1
  441. package/console/settings/members.txt +19 -19
  442. package/console/settings/memory/__next._full.txt +19 -19
  443. package/console/settings/memory/__next._head.txt +4 -4
  444. package/console/settings/memory/__next._index.txt +10 -10
  445. package/console/settings/memory/__next._tree.txt +2 -2
  446. package/console/settings/memory/__next.settings.memory.__PAGE__.txt +3 -3
  447. package/console/settings/memory/__next.settings.memory.txt +3 -3
  448. package/console/settings/memory/__next.settings.txt +5 -5
  449. package/console/settings/memory.html +1 -1
  450. package/console/settings/memory.txt +19 -19
  451. package/console/settings/oauth-apps/__next._full.txt +19 -19
  452. package/console/settings/oauth-apps/__next._head.txt +4 -4
  453. package/console/settings/oauth-apps/__next._index.txt +10 -10
  454. package/console/settings/oauth-apps/__next._tree.txt +2 -2
  455. package/console/settings/oauth-apps/__next.settings.oauth-apps.__PAGE__.txt +3 -3
  456. package/console/settings/oauth-apps/__next.settings.oauth-apps.txt +3 -3
  457. package/console/settings/oauth-apps/__next.settings.txt +5 -5
  458. package/console/settings/oauth-apps.html +1 -1
  459. package/console/settings/oauth-apps.txt +19 -19
  460. package/console/settings/org-preferences/__next._full.txt +19 -19
  461. package/console/settings/org-preferences/__next._head.txt +4 -4
  462. package/console/settings/org-preferences/__next._index.txt +10 -10
  463. package/console/settings/org-preferences/__next._tree.txt +2 -2
  464. package/console/settings/org-preferences/__next.settings.org-preferences.__PAGE__.txt +3 -3
  465. package/console/settings/org-preferences/__next.settings.org-preferences.txt +3 -3
  466. package/console/settings/org-preferences/__next.settings.txt +5 -5
  467. package/console/settings/org-preferences.html +1 -1
  468. package/console/settings/org-preferences.txt +19 -19
  469. package/console/settings/org-profile/__next._full.txt +19 -19
  470. package/console/settings/org-profile/__next._head.txt +4 -4
  471. package/console/settings/org-profile/__next._index.txt +10 -10
  472. package/console/settings/org-profile/__next._tree.txt +2 -2
  473. package/console/settings/org-profile/__next.settings.org-profile.__PAGE__.txt +3 -3
  474. package/console/settings/org-profile/__next.settings.org-profile.txt +3 -3
  475. package/console/settings/org-profile/__next.settings.txt +5 -5
  476. package/console/settings/org-profile.html +1 -1
  477. package/console/settings/org-profile.txt +19 -19
  478. package/console/settings/platform-clients/__next._full.txt +19 -19
  479. package/console/settings/platform-clients/__next._head.txt +4 -4
  480. package/console/settings/platform-clients/__next._index.txt +10 -10
  481. package/console/settings/platform-clients/__next._tree.txt +2 -2
  482. package/console/settings/platform-clients/__next.settings.platform-clients.__PAGE__.txt +3 -3
  483. package/console/settings/platform-clients/__next.settings.platform-clients.txt +3 -3
  484. package/console/settings/platform-clients/__next.settings.txt +5 -5
  485. package/console/settings/platform-clients.html +1 -1
  486. package/console/settings/platform-clients.txt +19 -19
  487. package/console/settings/pricing-governance/__next._full.txt +20 -20
  488. package/console/settings/pricing-governance/__next._head.txt +4 -4
  489. package/console/settings/pricing-governance/__next._index.txt +10 -10
  490. package/console/settings/pricing-governance/__next._tree.txt +2 -2
  491. package/console/settings/pricing-governance/__next.settings.pricing-governance.__PAGE__.txt +4 -4
  492. package/console/settings/pricing-governance/__next.settings.pricing-governance.txt +3 -3
  493. package/console/settings/pricing-governance/__next.settings.txt +5 -5
  494. package/console/settings/pricing-governance.html +1 -1
  495. package/console/settings/pricing-governance.txt +20 -20
  496. package/console/settings/provider-standing/__next._full.txt +20 -20
  497. package/console/settings/provider-standing/__next._head.txt +4 -4
  498. package/console/settings/provider-standing/__next._index.txt +10 -10
  499. package/console/settings/provider-standing/__next._tree.txt +2 -2
  500. package/console/settings/provider-standing/__next.settings.provider-standing.__PAGE__.txt +4 -4
  501. package/console/settings/provider-standing/__next.settings.provider-standing.txt +3 -3
  502. package/console/settings/provider-standing/__next.settings.txt +5 -5
  503. package/console/settings/provider-standing.html +1 -1
  504. package/console/settings/provider-standing.txt +20 -20
  505. package/console/settings/usage/__next._full.txt +19 -19
  506. package/console/settings/usage/__next._head.txt +4 -4
  507. package/console/settings/usage/__next._index.txt +10 -10
  508. package/console/settings/usage/__next._tree.txt +2 -2
  509. package/console/settings/usage/__next.settings.txt +5 -5
  510. package/console/settings/usage/__next.settings.usage.__PAGE__.txt +3 -3
  511. package/console/settings/usage/__next.settings.usage.txt +3 -3
  512. package/console/settings/usage.html +1 -1
  513. package/console/settings/usage.txt +19 -19
  514. package/console/settings.html +1 -1
  515. package/console/settings.txt +20 -20
  516. package/console/workflows/__next._full.txt +16 -16
  517. package/console/workflows/__next._head.txt +4 -4
  518. package/console/workflows/__next._index.txt +10 -10
  519. package/console/workflows/__next._tree.txt +2 -2
  520. package/console/workflows/__next.workflows.__PAGE__.txt +2 -2
  521. package/console/workflows/__next.workflows.txt +3 -3
  522. package/console/workflows/__placeholder__/__placeholder__/__next._full.txt +17 -17
  523. package/console/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
  524. package/console/workflows/__placeholder__/__placeholder__/__next._index.txt +10 -10
  525. package/console/workflows/__placeholder__/__placeholder__/__next._tree.txt +2 -2
  526. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
  527. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.txt +3 -3
  528. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.txt +3 -3
  529. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.txt +3 -3
  530. package/console/workflows/__placeholder__/__placeholder__.html +1 -1
  531. package/console/workflows/__placeholder__/__placeholder__.txt +17 -17
  532. package/console/workflows/executions/__next._full.txt +16 -16
  533. package/console/workflows/executions/__next._head.txt +4 -4
  534. package/console/workflows/executions/__next._index.txt +10 -10
  535. package/console/workflows/executions/__next._tree.txt +2 -2
  536. package/console/workflows/executions/__next.workflows.executions.__PAGE__.txt +2 -2
  537. package/console/workflows/executions/__next.workflows.executions.txt +3 -3
  538. package/console/workflows/executions/__next.workflows.txt +3 -3
  539. package/console/workflows/executions/__placeholder__/__next._full.txt +17 -17
  540. package/console/workflows/executions/__placeholder__/__next._head.txt +4 -4
  541. package/console/workflows/executions/__placeholder__/__next._index.txt +10 -10
  542. package/console/workflows/executions/__placeholder__/__next._tree.txt +2 -2
  543. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.__PAGE__.txt +3 -3
  544. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.txt +3 -3
  545. package/console/workflows/executions/__placeholder__/__next.workflows.executions.txt +3 -3
  546. package/console/workflows/executions/__placeholder__/__next.workflows.txt +3 -3
  547. package/console/workflows/executions/__placeholder__.html +1 -1
  548. package/console/workflows/executions/__placeholder__.txt +17 -17
  549. package/console/workflows/executions.html +1 -1
  550. package/console/workflows/executions.txt +16 -16
  551. package/console/workflows.html +1 -1
  552. package/console/workflows.txt +16 -16
  553. package/main.js +6 -6
  554. package/package.json +6 -6
  555. package/workflow-bundle-agent-execution.js +1 -1
  556. package/workflow-bundle-workflow-execution.js +1 -1
  557. package/console/_next/static/chunks/0-rl_~-k4zneu.js +0 -1
  558. package/console/_next/static/chunks/00d~s.n2ue-_h.js +0 -1
  559. package/console/_next/static/chunks/03y0rf3oc7s.8.js +0 -1
  560. package/console/_next/static/chunks/05hwz_mbqzf1o.js +0 -1
  561. package/console/_next/static/chunks/08tdiho~eajic.js +0 -1
  562. package/console/_next/static/chunks/0h5_gexj.8ede.js +0 -1
  563. package/console/_next/static/chunks/0hb.-vcj2w6kf.js +0 -1
  564. package/console/_next/static/chunks/0n_eq4ve3k9iw.js +0 -5
  565. package/console/_next/static/chunks/0uvbqsa~x3_x6.js +0 -1
  566. package/console/_next/static/chunks/0~t6-khw6kbrz.js +0 -1
  567. package/console/_next/static/chunks/148.037r-t498.js +0 -1
  568. package/console/_next/static/chunks/16ql-tt25wyl~.css +0 -1
  569. package/console/_next/static/chunks/17h3h-dhcyv24.js +0 -1
  570. package/console/library/plugins/install/__next._full.txt +0 -41
  571. package/console/library/plugins/install/__next._head.txt +0 -6
  572. package/console/library/plugins/install/__next._index.txt +0 -17
  573. package/console/library/plugins/install/__next.library.plugins.install.__PAGE__.txt +0 -9
  574. package/console/library/plugins/install/__next.library.plugins.install.txt +0 -5
  575. package/console/library/plugins/install/__next.library.plugins.txt +0 -5
  576. package/console/library/plugins/install/__next.library.txt +0 -7
  577. package/console/library/plugins/install.html +0 -1
  578. package/console/library/plugins/install.txt +0 -41
  579. /package/console/_next/static/{nsysxL2UYvxTUeX1Z93Nk → 0d4BawxHa-jMy4WgCDP1P}/_buildManifest.js +0 -0
  580. /package/console/_next/static/{nsysxL2UYvxTUeX1Z93Nk → 0d4BawxHa-jMy4WgCDP1P}/_clientMiddlewareManifest.js +0 -0
  581. /package/console/_next/static/{nsysxL2UYvxTUeX1Z93Nk → 0d4BawxHa-jMy4WgCDP1P}/_ssgManifest.js +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,174886,e=>{"use strict";let t=(0,e.i(475254).default)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],174886)},107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",0,t],107233)},254450,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(893976),s=e.i(188482);let a=[{value:"org",label:"Org",ariaLabel:"Organization only",icon:function({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("rect",{x:"4",y:"2",width:"8",height:"12",rx:"1"}),(0,t.jsx)("path",{d:"M6.5 5h3M6.5 8h3M6.5 11h3"})]})}},{value:"all",label:"All",ariaLabel:"All including public",icon:function({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,t.jsx)("path",{d:"M2 8h12"}),(0,t.jsx)("path",{d:"M8 2c1.66 1.46 2.6 3.63 2.6 6s-.94 4.54-2.6 6c-1.66-1.46-2.6-3.63-2.6-6s.94-4.54 2.6-6Z"})]})}}];e.s(["ScopeToggle",0,function({value:e,onChange:i,disabled:o=!1,className:l,compact:c=!1}){let u=(0,r.useRef)([]),d=(0,r.useCallback)(t=>{t!==e&&i(t)},[e,i]),g=(0,r.useCallback)((e,t)=>{let r=null;"ArrowRight"===e.key||"ArrowDown"===e.key?(e.preventDefault(),r=(t+1)%a.length):("ArrowLeft"===e.key||"ArrowUp"===e.key)&&(e.preventDefault(),r=(t-1+a.length)%a.length),null!==r&&(u.current[r]?.focus(),d(a[r].value))},[d]);return(0,t.jsx)("div",{role:"radiogroup","aria-label":"Resource scope","aria-disabled":o||void 0,className:(0,n.cn)("stg:inline-flex stg:rounded-md stg:bg-muted stg:p-0.5",o&&"stg:pointer-events-none stg:opacity-50",l),children:a.map((r,a)=>{let i=e===r.value,l=r.icon,h=(0,t.jsxs)("button",{ref:e=>{u.current[a]=e},type:"button",role:"radio","aria-checked":i,"aria-label":r.ariaLabel,tabIndex:i?0:-1,disabled:o,onClick:()=>d(r.value),onKeyDown:e=>g(e,a),className:(0,n.cn)("stg:inline-flex stg:cursor-pointer stg:items-center stg:gap-1 stg:rounded-sm stg:px-2 stg:py-1 stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",i?"stg:bg-background stg:text-foreground stg:shadow-sm":"stg:text-muted-foreground stg:hover:text-foreground"),children:[(0,t.jsx)(l,{className:"stg:size-3"}),!c&&r.label]},r.value);return c?(0,t.jsxs)(s.Tooltip,{children:[(0,t.jsx)(s.TooltipTrigger,{render:h}),(0,t.jsx)(s.TooltipContent,{side:"top",children:r.ariaLabel})]},r.value):h})})}])},195057,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={formatUrl:function(){return o},formatWithValidation:function(){return c},urlObjectKeys:function(){return l}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(190809)._(e.r(998183)),i=/https?|ftp|gopher|file/;function o(e){let{auth:t,hostname:r}=e,n=e.protocol||"",s=e.pathname||"",o=e.hash||"",l=e.query||"",c=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?c=t+e.host:r&&(c=t+(~r.indexOf(":")?`[${r}]`:r),e.port&&(c+=":"+e.port)),l&&"object"==typeof l&&(l=String(a.urlQueryToSearchParams(l)));let u=e.search||l&&`?${l}`||"";return n&&!n.endsWith(":")&&(n+=":"),e.slashes||(!n||i.test(n))&&!1!==c?(c="//"+(c||""),s&&"/"!==s[0]&&(s="/"+s)):c||(c=""),o&&"#"!==o[0]&&(o="#"+o),u&&"?"!==u[0]&&(u="?"+u),s=s.replace(/[?#]/g,encodeURIComponent),u=u.replace("#","%23"),`${n}${c}${s}${u}${o}`}let l=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function c(e){return o(e)}},818581,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"useMergedRef",{enumerable:!0,get:function(){return s}});let n=e.r(271645);function s(e,t){let r=(0,n.useRef)(null),s=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=s.current;t&&(s.current=null,t())}else e&&(r.current=a(e,n)),t&&(s.current=a(t,n))},[e,t])}function a(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},573668,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=e.r(718967),s=e.r(652817);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,s.hasBasePath)(r.pathname)}catch(e){return!1}}},284508,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"errorOnce",{enumerable:!0,get:function(){return n}});let n=e=>{}},522016,(e,t,r)=>{"use strict";Object.defineProperty(r,"__esModule",{value:!0});var n={default:function(){return b},useLinkStatus:function(){return x}};for(var s in n)Object.defineProperty(r,s,{enumerable:!0,get:n[s]});let a=e.r(190809),i=e.r(843476),o=a._(e.r(271645)),l=e.r(195057),c=e.r(8372),u=e.r(818581),d=e.r(718967),g=e.r(405550);e.r(233525);let h=e.r(388540),p=e.r(91949),m=e.r(573668),f=e.r(509396);function b(t){var r,n;let s,a,b,[x,y]=(0,o.useOptimistic)(p.IDLE_LINK_STATUS),k=(0,o.useRef)(null),{href:w,as:A,children:S,prefetch:C=null,passHref:E,replace:j,shallow:W,scroll:R,onClick:_,onMouseEnter:N,onTouchStart:M,legacyBehavior:I=!1,onNavigate:Z,transitionTypes:L,ref:V,unstable_dynamicOnHover:Y,...F}=t;s=S,I&&("string"==typeof s||"number"==typeof s)&&(s=(0,i.jsx)("a",{children:s}));let G=o.default.useContext(c.AppRouterContext),B=!1!==C,T=!1!==C?null===(n=C)||"auto"===n?f.FetchStrategy.PPR:f.FetchStrategy.Full:f.FetchStrategy.PPR,X="string"==typeof(r=A||w)?r:(0,l.formatUrl)(r);if(I){if(s?.$$typeof===Symbol.for("react.lazy"))throw Object.defineProperty(Error("`<Link legacyBehavior>` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's `<a>` tag."),"__NEXT_ERROR_CODE",{value:"E863",enumerable:!1,configurable:!0});a=o.default.Children.only(s)}let O=I?a&&"object"==typeof a&&a.ref:V,D=o.default.useCallback(e=>(null!==G&&(k.current=(0,p.mountLinkInstance)(e,X,G,T,B,y)),()=>{k.current&&((0,p.unmountLinkForCurrentNavigation)(k.current),k.current=null),(0,p.unmountPrefetchableInstance)(e)}),[B,X,G,T,y]),P={ref:(0,u.useMergedRef)(D,O),onClick(t){I||"function"!=typeof _||_(t),I&&a.props&&"function"==typeof a.props.onClick&&a.props.onClick(t),!G||t.defaultPrevented||function(t,r,n,s,a,i,l){if("u">typeof window){let c,{nodeName:u}=t.currentTarget;if("A"===u.toUpperCase()&&((c=t.currentTarget.getAttribute("target"))&&"_self"!==c||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.nativeEvent&&2===t.nativeEvent.which)||t.currentTarget.hasAttribute("download"))return;if(!(0,m.isLocalURL)(r)){s&&(t.preventDefault(),location.replace(r));return}if(t.preventDefault(),i){let e=!1;if(i({preventDefault:()=>{e=!0}}),e)return}let{dispatchNavigateAction:d}=e.r(699781);o.default.startTransition(()=>{d(r,s?"replace":"push",!1===a?h.ScrollBehavior.NoScroll:h.ScrollBehavior.Default,n.current,l)})}}(t,X,k,j,R,Z,L)},onMouseEnter(e){I||"function"!=typeof N||N(e),I&&a.props&&"function"==typeof a.props.onMouseEnter&&a.props.onMouseEnter(e),G&&B&&(0,p.onNavigationIntent)(e.currentTarget,!0===Y)},onTouchStart:function(e){I||"function"!=typeof M||M(e),I&&a.props&&"function"==typeof a.props.onTouchStart&&a.props.onTouchStart(e),G&&B&&(0,p.onNavigationIntent)(e.currentTarget,!0===Y)}};return(0,d.isAbsoluteUrl)(X)?P.href=X:I&&!E&&("a"!==a.type||"href"in a.props)||(P.href=(0,g.addBasePath)(X)),b=I?o.default.cloneElement(a,P):(0,i.jsx)("a",{...F,...P,children:s}),(0,i.jsx)(v.Provider,{value:x,children:b})}e.r(284508);let v=(0,o.createContext)(p.IDLE_LINK_STATUS),x=()=>(0,o.useContext)(v);("function"==typeof r.default||"object"==typeof r.default&&null!==r.default)&&void 0===r.default.__esModule&&(Object.defineProperty(r.default,"__esModule",{value:!0}),Object.assign(r.default,r),t.exports=r.default)},297629,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(586108),s=e.i(941693);let a=(0,r.createContext)(null),i="stigmer:activeOrgSlug";function o(e){try{localStorage.setItem(i,e)}catch{}}function l(){let e=(0,r.useContext)(a);if(!e)throw Error("useOrg must be used within <OrgProvider>. Wrap your component tree with <OrgProvider> inside a <StigmerProvider>.");return e}e.s(["OrgProvider",0,function({children:e}){let l=(0,n.useStigmer)(),c=(0,s.useFetchCache)(),[u,d]=(0,r.useState)([]),[g,h]=(0,r.useState)(null),[p,m]=(0,r.useState)(!0),[f,b]=(0,r.useState)(null),v=(0,r.useRef)(0),x=(0,r.useCallback)(async e=>{let t=++v.current;m(!0),b(null);try{let r=(await l.organization.findMyOrganizations()).entries;if(t!==v.current)return;if(d(r),0===r.length)return void h(null);let n=e??function(){try{return localStorage.getItem(i)}catch{return null}}(),s=(n?r.find(e=>e.metadata?.slug===n):void 0)??r[0];h(s),s.metadata?.slug&&o(s.metadata.slug)}catch(e){if(t!==v.current)return;b(e instanceof Error?e.message:"Failed to load organizations"),d([]),h(null)}finally{t===v.current&&m(!1)}},[l]);(0,r.useEffect)(()=>{x()},[x]);let y=(0,r.useCallback)(e=>{h(e),e.metadata?.slug&&o(e.metadata.slug)},[]),k=(0,r.useRef)(null),w=g?.metadata?.slug??null;(0,r.useEffect)(()=>{let e=k.current;k.current=w,null!==e&&null!==w&&e!==w&&c?.clear()},[w,c]);let A=(0,r.useMemo)(()=>({orgs:u,activeOrg:g,setActiveOrg:y,isLoading:p,error:f,retry:x,refresh:x}),[u,g,y,p,f,x]);return(0,t.jsx)(a.Provider,{value:A,children:e})},"useActiveOrgId",0,function(){let{activeOrg:e}=l();return e?.metadata?.id??""},"useActiveOrgSlug",0,function(){let{activeOrg:e}=l();return e?.metadata?.slug??""},"useOrg",0,l])},618566,(e,t,r)=>{t.exports=e.r(976562)},63209,e=>{"use strict";let t=(0,e.i(475254).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},367539,e=>{"use strict";e.s(["generateSlug",0,function(e){return e.toLowerCase().replace(/[ .]/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-{2,}/g,"-").replace(/^-+|-+$/g,"")},"generateSlugSuffix",0,function(){return crypto.randomUUID().replace(/-/g,"").slice(0,8)}])},348990,e=>{"use strict";var t=e.i(271645),r=e.i(891287),n=e.i(95265),s=e.i(586108),a=e.i(583093);e.s(["useEnvironmentList",0,function(e,i){let o=(0,s.useStigmer)(),l=(0,t.useRef)(i);i!==l.current&&JSON.stringify(i)!==JSON.stringify(l.current)&&(l.current=i);let c=l.current,u=e?async()=>{let t=await o.environment.list((0,r.create)(n.ListEnvironmentsRequestSchema,{org:e,labels:c??{}}));return{environments:t.items,totalCount:t.totalCount}}:null,{data:d,isLoading:g,isRefetching:h,error:p,refetch:m}=(0,a.useFetch)(u,[e,c,o],{environments:[],totalCount:0});return{environments:d.environments,totalCount:d.totalCount,isLoading:g,isRefetching:h,error:p,refetch:m}}])},207344,e=>{"use strict";var t=e.i(271645),r=e.i(891287),n=e.i(95265),s=e.i(621559),a=e.i(586108),i=e.i(367539),o=e.i(326283),l=e.i(348990);let c={"stigmer.ai/personal":"true"};e.s(["usePersonalEnvironment",0,function(e){let u=(0,a.useStigmer)(),{environments:d,isLoading:g,error:h,refetch:p}=(0,l.useEnvironmentList)(e,c),m=(0,t.useMemo)(()=>d[0]??null,[d]),[f,b]=(0,t.useState)(!1),[v,x]=(0,t.useState)(null),y=(0,t.useRef)(m);y.current=m;let k=(0,t.useRef)(g);k.current=g;let w=(0,t.useCallback)(async t=>{if(y.current)return y.current;if(!e)throw Error("usePersonalEnvironment: cannot call getOrCreate when org is null.");if(k.current)throw Error("usePersonalEnvironment: cannot call getOrCreate while the environment list is loading. Wait for isLoading to become false before calling getOrCreate().");b(!0),x(null);try{let r;t&&Object.keys(t).length>0&&(r=t);let n=await u.environment.create({name:"Personal Environment",slug:`env-personal-${(0,i.generateSlugSuffix)()}`,org:e,labels:c,data:r});return y.current=n,p(),n}catch(e){throw x((0,o.toError)(e)),e}finally{b(!1)}},[e,u,p]),A=(0,t.useCallback)(async e=>{let t=y.current;if(!t)throw Error("usePersonalEnvironment: personal environment does not exist. Call getOrCreate() before addVariables().");b(!0),x(null);try{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(0,r.create)(s.EnvironmentValueSchema,{value:t.value,isSecret:t.isSecret,description:t.description})])),i=(0,r.create)(n.UpdateEnvironmentVariablesRequestSchema,{environmentId:t.metadata.id,variables:a}),o=await u.environment.updateVariables(i);return p(),o}catch(e){throw x((0,o.toError)(e)),e}finally{b(!1)}},[u,p]),S=(0,t.useCallback)(async e=>{let t=y.current;if(!t)throw Error("usePersonalEnvironment: personal environment does not exist. Call getOrCreate() before removeVariables().");b(!0),x(null);try{let s=(0,r.create)(n.RemoveEnvironmentVariablesRequestSchema,{environmentId:t.metadata.id,keys:e}),a=await u.environment.removeVariables(s);return p(),a}catch(e){throw x((0,o.toError)(e)),e}finally{b(!1)}},[u,p]);return{environment:m,isLoading:g,error:v??h,refetch:p,getOrCreate:w,addVariables:A,removeVariables:S,isMutating:f}}])},903198,e=>{"use strict";let t="stigmer:oauth:callback",r="stigmer:oauth:broadcast";function n(e){try{e?.close()}catch{}}e.s(["OAUTH_BROADCAST_CHANNEL",0,r,"OAUTH_CALLBACK_MESSAGE_TYPE",0,t,"closeOAuthPopup",0,n,"openOAuthPopup",0,function(){let e=window.screenX+(window.outerWidth-600)/2,t=window.screenY+(window.outerHeight-700)/2;return window.open("about:blank","stigmer_oauth",`width=600,height=700,left=${e},top=${t},popup=yes`)},"popupBlockedError",0,function(){return Error("Your browser blocked the authentication popup. Please allow popups for this site and try again.")},"waitForOAuthCallback",0,function(e,s,a){return new Promise((i,o)=>{let l,c,u=!1,d=null,g=!1;function h(e){if(!u){u=!0,l&&clearTimeout(l),c&&clearInterval(c),window.removeEventListener("message",m);try{d?.close()}catch{}e instanceof Error?o(e):i(e)}}function p(e){if(e?.type===t){if(e.state!==s)return void h(Error("OAuth state mismatch — the callback did not match the initiated flow. Please try again."));if(!e.code)return void h(Error("No authorization code received from the OAuth provider."));h({code:e.code,state:e.state})}}function m(e){e.origin===window.location.origin&&p(e.data)}a(()=>{h(Error("OAuth flow was cancelled.")),n(e)}),window.addEventListener("message",m);try{d=new BroadcastChannel(r),g=!0,d.onmessage=e=>{p(e.data)}}catch{}l=setTimeout(()=>{h(Error("OAuth authentication timed out. Ensure your callback page renders <OAuthCallbackHandler /> from @stigmer/react at the URL configured as your OAuth redirect URI.")),n(e)},12e4);let f=null;c=setInterval(()=>{!g&&(e.closed?null===f?f=Date.now():Date.now()-f>5e3&&h(Error("The authentication window was closed before completing sign-in.")):f=null)},500)})}])},230849,4144,e=>{"use strict";var t=e.i(271645);e.s(["useScrollShadows",0,function(){let e=(0,t.useRef)(null),[r,n]=(0,t.useState)(!1),[s,a]=(0,t.useState)(!1),i=(0,t.useCallback)(()=>{let t=e.current;t&&(n(t.scrollTop>0),a(t.scrollTop+t.clientHeight<t.scrollHeight-1))},[]);return(0,t.useEffect)(()=>{let t=e.current;if(!t)return;t.addEventListener("scroll",i,{passive:!0});let r=new ResizeObserver(i);return r.observe(t),i(),()=>{t.removeEventListener("scroll",i),r.disconnect()}},[i]),{scrollRef:e,canScrollUp:r,canScrollDown:s}}],230849);var r=e.i(843476);e.s(["ScrollFade",0,function({position:e}){let t="top"===e;return(0,r.jsx)("div",{className:["stg:pointer-events-none stg:absolute stg:inset-x-0 stg:z-10 stg:h-3",t?"stg:top-0":"stg:bottom-0"].join(" "),style:{background:t?"linear-gradient(to bottom, var(--color-popover, hsl(0 0% 9%)), transparent)":"linear-gradient(to top, var(--color-popover, hsl(0 0% 9%)), transparent)"},"aria-hidden":"true"})}],4144)},351240,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(893976),s=e.i(230849),a=e.i(4144),i=e.i(379410);function o(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M1.5 8s2.5-4.5 6.5-4.5S14.5 8 14.5 8s-2.5 4.5-6.5 4.5S1.5 8 1.5 8z"}),(0,t.jsx)("circle",{cx:"8",cy:"8",r:"2"})]})}function l(){return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M6.59 6.59a2 2 0 0 0 2.82 2.82"}),(0,t.jsx)("path",{d:"M10.73 10.73A6.5 6.5 0 0 1 8 12.5c-4 0-6.5-4.5-6.5-4.5a11.5 11.5 0 0 1 3.77-3.73"}),(0,t.jsx)("path",{d:"M5.71 3.56A6.3 6.3 0 0 1 8 3.5c4 0 6.5 4.5 6.5 4.5a11.5 11.5 0 0 1-1.28 1.73"}),(0,t.jsx)("path",{d:"M2 2l12 12"})]})}e.s(["EnvVarForm",0,function({variables:e,onSubmit:c,onCancel:u,isSubmitting:d,disabled:g,title:h,description:p,submitLabel:m,cancelLabel:f="Back",defaultSaveForFuture:b=!0,hideSaveToggle:v=!1,poolValues:x,className:y,ariaLabel:k}){let[w,A]=(0,r.useState)(()=>Object.fromEntries(e.map(e=>{let t=x?.(e.key);return[e.key,t?.value??""]}))),[S]=(0,r.useState)(()=>{if(!x)return new Set;let t=new Set;for(let r of e)x(r.key)&&t.add(r.key);return t}),[C,E]=(0,r.useState)(new Set),[j,W]=(0,r.useState)(b),R=(0,r.useRef)(null),_=(0,s.useScrollShadows)(),N=(0,r.useId)(),M=`${N}-save-toggle`,I=g||d,Z=e.every(e=>w[e.key]?.trim()!==""),L=(0,r.useCallback)((e,t)=>{A(r=>({...r,[e]:t}))},[]),V=(0,r.useCallback)(e=>{E(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),Y=(0,r.useCallback)(t=>{if(t.preventDefault(),!Z||I)return;let r={};for(let t of e)r[t.key]={value:w[t.key],isSecret:t.isSecret,...t.description&&{description:t.description}};c(r,{saveForFuture:j})},[Z,I,w,e,c,j]),F=k??(h?`Configure ${h}`:"Configure environment variables"),G=m??(j?"Save":"Use once");return(0,t.jsxs)("form",{onSubmit:Y,className:(0,n.cn)("stg:w-72 stg:space-y-3",y),"aria-label":F,children:[h&&(0,t.jsxs)("div",{className:"stg:space-y-0.5",children:[(0,t.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:h}),p&&(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:p})]}),(0,t.jsxs)("div",{className:"stg:relative",children:[_.canScrollUp&&(0,t.jsx)(a.ScrollFade,{position:"top"}),(0,t.jsx)("div",{ref:_.scrollRef,className:"stg:max-h-64 stg:space-y-2.5 stg:overflow-y-auto",children:e.map((e,r)=>{let s=`${N}-env-${e.key}`,a=e.description?`${s}-desc`:void 0,i=C.has(e.key);return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsxs)("label",{htmlFor:s,className:"stg:flex stg:items-baseline stg:gap-1.5 stg:text-[0.65rem] stg:font-medium stg:text-muted-foreground",children:[(0,t.jsx)("span",{className:"stg:font-mono",children:e.key}),e.isSecret&&(0,t.jsx)("span",{className:"stg:text-[0.55rem] stg:uppercase stg:tracking-wider stg:text-muted-foreground-subtle",children:"secret"})]}),(0,t.jsxs)("div",{className:"stg:relative",children:[(0,t.jsx)("input",{ref:0===r?R:void 0,id:s,type:e.isSecret&&!i?"password":"text",value:w[e.key],onChange:t=>L(e.key,t.target.value),disabled:I,required:!0,"aria-required":!0,"aria-describedby":a,autoComplete:"off",autoFocus:0===r,className:(0,n.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground","stg:placeholder:text-muted-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50",e.isSecret&&"stg:pr-8")}),e.isSecret&&(0,t.jsx)("button",{type:"button",onClick:()=>V(e.key),disabled:I,className:(0,n.cn)("stg:absolute stg:right-2 stg:top-1/2 stg:-translate-y-1/2","stg:text-muted-foreground stg:hover:text-foreground","stg:disabled:pointer-events-none stg:disabled:opacity-50"),"aria-label":i?`Hide ${e.key}`:`Show ${e.key}`,tabIndex:-1,children:i?(0,t.jsx)(l,{}):(0,t.jsx)(o,{})})]}),e.description&&(0,t.jsx)("p",{id:a,className:"stg:text-[0.6rem] stg:leading-relaxed stg:text-muted-foreground-subtle",children:e.description}),S.has(e.key)&&(0,t.jsx)("p",{className:"stg:text-[0.55rem] stg:text-primary-muted",children:"Pre-filled from session variables"})]},e.key)})}),_.canScrollDown&&(0,t.jsx)(a.ScrollFade,{position:"bottom"})]}),!v&&(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:pt-0.5",children:[(0,t.jsx)("button",{id:M,type:"button",role:"switch","aria-checked":j,onClick:()=>W(e=>!e),disabled:I,className:(0,n.cn)("stg:relative stg:mt-0.5 stg:inline-flex stg:h-4 stg:w-7 stg:shrink-0 stg:cursor-pointer stg:rounded-full stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-2","stg:disabled:pointer-events-none stg:disabled:opacity-50",j?"stg:bg-primary":"stg:bg-input"),children:(0,t.jsx)("span",{className:(0,n.cn)("stg:pointer-events-none stg:block stg:h-3 stg:w-3 stg:translate-y-0.5 stg:rounded-full stg:bg-background stg:shadow-sm stg:ring-0 stg:transition-transform",j?"stg:translate-x-3.5":"stg:translate-x-0.5")})}),(0,t.jsxs)("label",{htmlFor:M,className:"stg:cursor-pointer stg:select-none stg:space-y-0.5",children:[(0,t.jsx)("span",{className:"stg:block stg:text-[0.65rem] stg:font-medium stg:text-muted-foreground",children:"Save for future runs"}),!j&&(0,t.jsx)("span",{className:"stg:block stg:text-[0.6rem] stg:leading-relaxed stg:text-muted-foreground-subtle",children:"These values will only be used for this run."})]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-end stg:gap-2 stg:pt-1",children:[u&&(0,t.jsx)("button",{type:"button",onClick:u,disabled:I,className:(0,n.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:f}),(0,t.jsxs)("button",{type:"submit",disabled:!Z||I,"data-cursor-target":"env-form-submit",className:(0,n.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground","stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-40"),children:[d&&(0,t.jsx)(i.SpinnerIcon,{size:12}),G]})]})]})}])},793907,e=>{"use strict";var t=e.i(843476),r=e.i(893976);function n({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M8 1.5 1 14h14L8 1.5Z"}),(0,t.jsx)("path",{d:"M8 6v3.5"}),(0,t.jsx)("circle",{cx:"8",cy:"11.5",r:"0.5",fill:"currentColor",stroke:"none"})]})}function s({className:e}){return(0,t.jsxs)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M12 8.667v4A1.333 1.333 0 0 1 10.667 14H3.333A1.333 1.333 0 0 1 2 12.667V5.333A1.333 1.333 0 0 1 3.333 4h4"}),(0,t.jsx)("path",{d:"M10 2h4v4"}),(0,t.jsx)("path",{d:"M6.667 9.333 14 2"})]})}e.s(["VendorApprovalBlockedNotice",0,function({blocked:e,pending:a,manualEntrySupported:i,canBringOwnApp:o,docsUrl:l,onBringOwnApp:c,compact:u,className:d}){if(!e)return null;let g=a?"The platform's OAuth app is awaiting vendor approval.":"The platform's OAuth app was not approved by the vendor.",h=o?i?"You can use your own OAuth app or enter a token manually.":"You can use your own OAuth app.":i?"You can still connect by entering your own token manually.":"OAuth sign-in is temporarily unavailable for this server.",p=o&&c,m=!!l&&!o;return u?(0,t.jsxs)("div",{className:(0,r.cn)("stg:text-[0.65rem] stg:text-amber-700 stg:dark:text-amber-300",d),children:[(0,t.jsxs)("p",{children:[g," ",h]}),p&&(0,t.jsx)("button",{type:"button",onClick:c,className:"stg:mt-1 stg:inline-flex stg:items-center stg:gap-1 stg:rounded stg:bg-amber-600 stg:px-2 stg:py-0.5 stg:text-[0.6rem] stg:font-medium stg:text-white stg:hover:bg-amber-700 stg:dark:bg-amber-500 stg:dark:text-amber-950 stg:dark:hover:bg-amber-400",children:"Use your own OAuth app"}),m&&(0,t.jsx)("a",{href:l??void 0,target:"_blank",rel:"noopener noreferrer",className:"stg:underline stg:decoration-amber-600/40 stg:underline-offset-2 stg:hover:decoration-amber-600 stg:dark:decoration-amber-400/40 stg:dark:hover:decoration-amber-400",children:"Learn how to bring your own token"})]}):(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:flex stg:items-start stg:gap-2 stg:bg-amber-500/5 stg:px-3 stg:py-2",d),children:[(0,t.jsx)(n,{className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-amber-600 stg:dark:text-amber-400"}),(0,t.jsxs)("div",{className:"stg:flex-1 stg:text-xs stg:text-amber-700 stg:dark:text-amber-300",children:[(0,t.jsxs)("p",{children:[g," ",h]}),p&&(0,t.jsx)("button",{type:"button",onClick:c,"data-cursor-target":"byoa-cta-button",className:"stg:mt-1.5 stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:bg-amber-600 stg:px-2.5 stg:py-1 stg:text-[11px] stg:font-medium stg:text-white stg:hover:bg-amber-700 stg:dark:bg-amber-500 stg:dark:text-amber-950 stg:dark:hover:bg-amber-400",children:"Use your own OAuth app"}),m&&(0,t.jsxs)("a",{href:l??void 0,target:"_blank",rel:"noopener noreferrer",className:"stg:mt-1 stg:inline-flex stg:items-center stg:gap-1 stg:underline stg:decoration-amber-600/40 stg:underline-offset-2 stg:hover:decoration-amber-600 stg:dark:decoration-amber-400/40 stg:dark:hover:decoration-amber-400",children:["Learn how to bring your own token",(0,t.jsx)(s,{className:"stg:size-3 stg:shrink-0"})]})]})]})}])},20883,e=>{"use strict";var t=e.i(939910),r=e.i(167937),n=e.i(498931),s=e.i(910304);class a extends Error{mcpServerId;constructor(e,t){super(`the connect of MCP server '${e}' is still running server-side after ${Math.round(t/1e3)}s — it will persist its result on its own; re-read the server to observe the outcome`),this.name="ConnectStillRunningError",this.mcpServerId=e}}async function i(e,i,l){let c,u=l?.pollIntervalMs??2500,d=Math.min(l?.deadlineMs??39e5,39e5);try{c=await e.startConnect(i)}catch(t){if(!(0,s.isUnimplemented)(t))throw t;return o(e,i,d)}l?.onStarted?.(c);let g=Date.now()+d;for(;;){if(Date.now()>=g)throw new a(i.mcpServerId,d);await function(e){return new Promise(t=>setTimeout(t,e))}(Math.min(u,Math.max(1,g-Date.now())));let o=await e.get(i.mcpServerId),l=o.status?.connectStatus;if(l?.phase===n.ConnectPhase.succeeded)return o;if(l?.phase===n.ConnectPhase.failed)throw function(e,n){let a=t.Code[e];return(0,s.wrapError)(new r.ConnectError(n,"number"==typeof a?a:t.Code.Unknown))}(l.failureCode,l.failureMessage)}}async function o(e,t,r){let n,s=e.connect(t);s.catch(()=>{});let i=new Promise((e,s)=>{n=setTimeout(()=>s(new a(t.mcpServerId,r)),r)});try{return await Promise.race([s,i])}finally{void 0!==n&&clearTimeout(n)}}e.s(["connectAndWait",0,i])},139666,e=>{"use strict";let t="STIGMER_SERVER_ADDRESS",r="STIGMER_API_KEY",n=new Set([t,r]);async function s(e){var n;let s=await e.getAuthCredential();return n=e.baseUrl,{[t]:{value:function(e){try{let t=new URL(e),r=t.hostname,n=t.port||("https:"===t.protocol?"443":"80");return`${r}:${n}`}catch{return e}}(n),isSecret:!1,description:"Auto-resolved from the current Stigmer connection."},[r]:{value:s||"unused",isSecret:!0,description:"Auto-resolved from the current Stigmer auth context."}}}async function a(e,t){let r=t instanceof Set?t:new Set(t);if(![...n].some(e=>r.has(e)))return{};let a=await s(e),i={};for(let[e,t]of Object.entries(a))r.has(e)&&(i[e]=t);return i}e.s(["SYSTEM_ENV_VAR_KEYS",0,n,"resolveDeclaredSystemEnvVars",0,a,"resolveSystemEnvVarValues",0,s])},168197,e=>{"use strict";var t=e.i(271645),r=e.i(891287),n=e.i(20883),s=e.i(610595),a=e.i(336973),i=e.i(586108),o=e.i(139666),l=e.i(326283),c=e.i(903198);e.s(["getOAuthConnectErrorMessage",0,function(e,t){let r=(0,s.getUserMessage)(e);return"connecting"===t?`Signed in successfully, but tool discovery failed: ${r}`:r},"useMcpServerOAuthConnect",0,function(){let e=(0,i.useStigmer)(),[s,u]=(0,t.useState)("idle"),[d,g]=(0,t.useState)(null),[h,p]=(0,t.useState)(null),m=(0,t.useRef)(null),f=(0,t.useRef)(null),b=(0,t.useRef)(!1),v=(0,t.useRef)("idle"),x=(0,t.useCallback)(e=>{v.current=e,u(e)},[]);(0,t.useEffect)(()=>()=>{f.current?.()},[]);let y=(0,t.useCallback)(()=>{(f.current||m.current)&&(b.current=!0,f.current?.(),(0,c.closeOAuthPopup)(m.current),m.current=null,f.current=null),x("idle"),g(null),p(null)},[x]);return{startOAuth:(0,t.useCallback)(async(t,s,i)=>{x("initiating"),g(null),p(null),b.current=!1,f.current?.();let u=(0,c.openOAuthPopup)();if(!u){let e=(0,c.popupBlockedError)();throw g(e),p("initiating"),x("idle"),e}m.current=u;try{let l=await e.mcpServer.initiateOAuthConnect((0,r.create)(a.InitiateOAuthConnectInputSchema,{mcpServerId:t,org:s}));u.location.href=l.authorizationUrl,x("awaiting-callback");let{code:d,state:g}=await (0,c.waitForOAuthCallback)(u,l.state,e=>{f.current=e});x("completing"),await e.mcpServer.completeOAuthConnect((0,r.create)(a.CompleteOAuthConnectInputSchema,{mcpServerId:t,authorizationCode:d,state:g})),x("connecting");let h=i?await (0,o.resolveDeclaredSystemEnvVars)(e,i):{},p={};for(let[e,t]of Object.entries(h))p[e]={value:t.value,isSecret:t.isSecret??!1};let m=(0,r.create)(a.ConnectInputSchema,{mcpServerId:t,org:s,...Object.keys(p).length>0?{runtimeEnv:p}:{}}),b=await (0,n.connectAndWait)(e.mcpServer,m);return x("done"),b}catch(t){let e=(0,l.toError)(t);throw b.current||(g(e),p(v.current),x("idle"),(0,c.closeOAuthPopup)(u)),b.current=!1,e}finally{m.current=null,f.current=null}},[e,x]),isInProgress:"idle"!==s&&"done"!==s,phase:s,error:d,failedPhase:h,clearError:y}}])},862645,e=>{"use strict";var t=e.i(271645),r=e.i(891287),n=e.i(336973),s=e.i(20883),a=e.i(586108),i=e.i(139666),o=e.i(326283);e.s(["useMcpServerConnect",0,function(){let e=(0,a.useStigmer)(),[l,c]=(0,t.useState)(!1),[u,d]=(0,t.useState)(null),g=(0,t.useCallback)(()=>d(null),[]);return{connect:(0,t.useCallback)(async(t,a,l,u)=>{c(!0),d(null);try{let o={...u?await (0,i.resolveDeclaredSystemEnvVars)(e,u):{},...l??{}},c={};for(let[e,t]of Object.entries(o))c[e]={value:t.value,isSecret:t.isSecret??!1};let d=(0,r.create)(n.ConnectInputSchema,{mcpServerId:t,org:a,...Object.keys(c).length>0?{runtimeEnv:c}:{}});return await (0,s.connectAndWait)(e.mcpServer,d)}catch(t){let e=(0,o.toError)(t);throw d(e),e}finally{c(!1)}},[e]),isConnecting:l,error:u,clearError:g}}])},288270,e=>{"use strict";e.s(["diffEnv",0,function(e,t,r){let n=[];for(let[s,a]of Object.entries(e))!t.has(s)&&(r?.has(s)||n.push({key:s,isSecret:a.isSecret,...a.description&&{description:a.description},...a.optional&&{optional:!0}}));return n}])},102508,e=>{"use strict";let t,r;var n=e.i(843476);e.i(247167);var s=e.i(271645),a=e.i(991730),i=e.i(327601);let o=s.forwardRef(function(e,t){let{render:r,className:n,disabled:s=!1,focusableWhenDisabled:o=!1,nativeButton:l=!0,...c}=e,{getButtonProps:u,buttonRef:d}=(0,a.useButton)({disabled:s,focusableWhenDisabled:o,native:l});return(0,i.useRenderElement)("button",e,{state:{disabled:s},ref:[t,d],props:[c,u]})});var l=e.i(207670);let c=e=>"boolean"==typeof e?`${e}`:0===e?"0":e,u=l.clsx;var d=e.i(893976);let g=(t="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: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",r={variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary-hover",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-subtle",destructive:"bg-destructive-subtle text-destructive hover:bg-accent hover:text-destructive focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:hover:bg-accent 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-3 has-data-[icon=inline-start]:pl-3",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"}},e=>{var n;if((null==r?void 0:r.variants)==null)return u(t,null==e?void 0:e.class,null==e?void 0:e.className);let{variants:s,defaultVariants:a}=r,i=Object.keys(s).map(t=>{let r=null==e?void 0:e[t],n=null==a?void 0:a[t];if(null===r)return null;let i=c(r)||c(n);return s[t][i]}),o=e&&Object.entries(e).reduce((e,t)=>{let[r,n]=t;return void 0===n||(e[r]=n),e},{});return u(t,i,null==r||null==(n=r.compoundVariants)?void 0:n.reduce((e,t)=>{let{class:r,className:n,...s}=t;return Object.entries(s).every(e=>{let[t,r]=e;return Array.isArray(r)?r.includes({...a,...o}[t]):({...a,...o})[t]===r})?[...e,r,n]:e},[]),null==e?void 0:e.class,null==e?void 0:e.className)});e.s(["Button",0,function({className:e,variant:t="default",size:r="default",...s}){return(0,n.jsx)(o,{"data-slot":"button",className:(0,d.cn)(g({variant:t,size:r,className:e})),...s})}],102508)},768079,e=>{"use strict";let t=(0,e.i(271645).createContext)(null);e.s(["AuthContext",0,t])},531278,e=>{"use strict";let t=(0,e.i(475254).default)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);e.s(["Loader2",0,t],531278)},55389,e=>{"use strict";var t=e.i(271645),r=e.i(891287),n=e.i(95265),s=e.i(586108),a=e.i(207344);let i="stigmer:github:oauth-state",o="GITHUB_TOKEN",l="stigmer:github:callback-success";async function c(e){try{let t=await fetch("https://api.github.com/user",{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)return null;let r=await t.json();return{login:r.login,avatarUrl:r.avatar_url,name:r.name??null}}catch{return null}}function u(e,t){return e?.spec?.data!=null&&t in e.spec.data}e.s(["GITHUB_CALLBACK_MESSAGE_TYPE",0,l,"useGitHubConnection",0,function(e,d){let g=(0,s.useStigmer)(),[h,p]=(0,t.useState)(null),[m,f]=(0,t.useState)(null),[b,v]=(0,t.useState)(!0),[x,y]=(0,t.useState)(!1),[k,w]=(0,t.useState)(!1),A=(0,a.usePersonalEnvironment)(e||null),S=(0,t.useRef)(A);S.current=A;let C=(0,t.useRef)(!1),E=(0,t.useRef)(null),j=(0,t.useRef)(null),[W,R]=(0,t.useState)(e);e!==W&&(R(e),v(!!e),C.current=!1),(0,t.useEffect)(()=>{if(!e||A.isLoading||C.current)return;C.current=!0;let t=A.environment;if(!u(t,o)||!t)return void v(!1);let s=!1;return async function(){try{let e=await g.environment.getSecretValue((0,r.create)(n.EnvironmentSecretValueInputSchema,{environmentId:t.metadata.id,key:o}));if(s)return;let a=e.value;if(a){let e=await c(a);if(s)return;if(e)p(a),f(e);else{try{await S.current.removeVariables([o])}catch{}p(null),f(null)}}}catch{}s||v(!1)}(),()=>{s=!0}},[e,A.isLoading,A.environment,g]),(0,t.useEffect)(()=>{function e(e){e.origin!==window.location.origin||e.data?.type===l&&(j.current&&(clearInterval(j.current),j.current=null),E.current=null,y(!1),v(!0),C.current=!1,S.current.refetch())}return window.addEventListener("message",e),()=>window.removeEventListener("message",e)},[]),(0,t.useEffect)(()=>()=>{j.current&&clearInterval(j.current)},[]);let _=(0,t.useCallback)(async(e,t)=>{let r=d?.callbackUrl??e,{authorizeUrl:n,state:s}=await g.github.getOAuthAuthorizeUrl({redirectUri:r});if(sessionStorage.setItem(i,s),!t?.popup){window.location.href=n;return}if(d?.openUrl){y(!0),await d.openUrl(n);return}if(E.current&&!E.current.closed)return void E.current.focus();let a=window.screenX+(window.outerWidth-600)/2,o=window.screenY+(window.outerHeight-700)/2,l=window.open(n,"stigmer-github-auth",`width=600,height=700,left=${a},top=${o},popup=yes`);if(!l||l.closed)return void w(!0);w(!1),y(!0),E.current=l;let c=setInterval(()=>{l.closed&&(clearInterval(c),j.current===c&&(j.current=null,E.current=null,y(!1),v(!0),C.current=!1,S.current.refetch()))},500);j.current=c},[g,d?.openUrl,d?.callbackUrl]),N=(0,t.useCallback)(async(e,t,r)=>{let n=function(){try{if(window.opener&&!window.opener.closed){let e=window.opener.sessionStorage.getItem(i);if(e)return e}}catch{}return sessionStorage.getItem(i)}();if(n&&n!==t)throw Error("OAuth state mismatch — possible CSRF attack");sessionStorage.removeItem(i);try{window.opener?.sessionStorage?.removeItem(i)}catch{}try{let{accessToken:n}=await g.github.exchangeOAuthCode({code:e,state:t,redirectUri:r});await S.current.getOrCreate(),await S.current.addVariables({[o]:{value:n,isSecret:!0}}),p(n);let s=await c(n);f(s)}finally{y(!1)}},[g]),M=(0,t.useCallback)(()=>{y(!1),v(!0),C.current=!1,S.current.refetch()},[]),I=(0,t.useCallback)(()=>{sessionStorage.removeItem(i),p(null),f(null),E.current&&!E.current.closed&&E.current.close(),E.current=null,j.current&&(clearInterval(j.current),j.current=null),y(!1);let e=S.current.environment;e&&u(e,o)&&S.current.removeVariables([o]).catch(()=>{})},[]),Z=null!==h;return(0,t.useMemo)(()=>({isConnected:Z,isLoading:b,isConnecting:x,popupBlocked:k,user:m,token:h,connect:_,handleCallback:N,reconcile:M,disconnect:I}),[Z,b,x,k,m,h,_,N,M,I])}])},536907,879049,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(893976),s=e.i(869803);let a={js:"code",jsx:"code",mjs:"code",cjs:"code",ts:"code",tsx:"code",py:"code",rb:"code",go:"code",rs:"code",java:"code",kt:"code",c:"code",h:"code",cpp:"code",cc:"code",hpp:"code",cs:"code",php:"code",swift:"code",sh:"code",bash:"code",zsh:"code",lua:"code",dart:"code",scala:"code",proto:"code",html:"markup",htm:"markup",xml:"markup",vue:"markup",svelte:"markup",css:"style",scss:"style",sass:"style",less:"style",json:"data",jsonc:"data",yaml:"data",yml:"data",toml:"data",ini:"data",env:"data",csv:"data",tsv:"data",md:"markdown",mdx:"markdown",markdown:"markdown",png:"image",jpg:"image",jpeg:"image",gif:"image",webp:"image",svg:"image",ico:"image",bmp:"image"};function i({fileName:e}){let r,n=(r=e.lastIndexOf("."))<0||r===e.length-1?"generic":a[e.slice(r+1).toLowerCase()]??"generic";return(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M9.5 1.5H4.5C3.95 1.5 3.5 1.95 3.5 2.5V13.5C3.5 14.05 3.95 14.5 4.5 14.5H11.5C12.05 14.5 12.5 14.05 12.5 13.5V4.5L9.5 1.5Z"}),(0,t.jsx)("path",{d:"M9.3 1.7V4.5H12.3"}),o[n]]})}let o={code:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M7 8.5L5.75 9.75L7 11"}),(0,t.jsx)("path",{d:"M9 8.5L10.25 9.75L9 11"})]}),markup:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M6.5 8.5L5.5 9.9L6.5 11.3"}),(0,t.jsx)("path",{d:"M9.5 8.5L10.5 9.9L9.5 11.3"})]}),style:(0,t.jsx)("path",{d:"M5.5 9.3H10.5M5.5 11.1H8.5"}),data:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("path",{d:"M7 8.4C6.2 8.4 6.2 9.3 6.2 9.9C6.2 10.5 6.2 11.4 5.4 11.4"}),(0,t.jsx)("path",{d:"M9 8.4C9.8 8.4 9.8 9.3 9.8 9.9C9.8 10.5 9.8 11.4 10.6 11.4"})]}),markdown:(0,t.jsx)("path",{d:"M5.4 11.3V8.6L6.9 10.1L8.4 8.6V11.3M10.4 8.7V11.1M9.5 10.2L10.4 11.2L11.3 10.2"}),image:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("circle",{cx:"6.4",cy:"9",r:"0.7"}),(0,t.jsx)("path",{d:"M5.2 11.4L7.3 9.9L10.6 11.6"})]}),generic:(0,t.jsx)("path",{d:"M5.5 9.3H10.5M5.5 11.1H10.5"})};function l({open:e=!1}){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round",className:"stg:shrink-0","aria-hidden":"true",children:e?(0,t.jsx)("path",{d:"M1.8 5.5V12A1 1 0 002.8 13H12.6L14.5 7.5H4.2L2.8 11"}):(0,t.jsx)("path",{d:"M1.8 4.5A1 1 0 012.8 3.5H6L7.3 5H13.2A1 1 0 0114.2 6V12A1 1 0 0113.2 13H2.8A1 1 0 011.8 12V4.5Z"})})}e.s(["FileTypeIcon",0,i,"FolderTypeIcon",0,l],879049);let c="application/x-stigmer-file-ref";e.s(["FILE_REF_MIME",0,c,"FileTreeNode",0,function e({node:a,selectedPath:o,onSelect:u,onActivate:d,depth:g,enableDrag:h=!1,showIcons:p=!1,indentGuides:m=!1,maxInitialDepth:f}){let[b,v]=(0,r.useState)(void 0===f||g<f),x=!!a.children,y=a.path===o,k=h&&!x,w=(0,r.useCallback)(()=>{x?v(e=>!e):u(a.path)},[x,a.path,u]),A=(0,r.useCallback)(()=>{x||d?.(a.path)},[x,a.path,d]),S=(0,r.useCallback)(e=>{e.dataTransfer.setData(c,JSON.stringify({path:a.path})),e.dataTransfer.effectAllowed="link"},[a.path]);return(0,t.jsxs)("li",{role:"treeitem","aria-level":g+1,"aria-expanded":x?b:void 0,children:[(0,t.jsxs)("button",{type:"button",onClick:w,onDoubleClick:d?A:void 0,draggable:k,onDragStart:k?S:void 0,className:(0,n.cn)("stg:flex stg:w-full stg:items-center stg:gap-1.5 stg:py-1 stg:text-left stg:text-xs stg:transition-colors","stg:hover:bg-muted","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring",y&&!x&&"stg:bg-muted stg:text-foreground stg:font-medium",!y&&"stg:text-muted-foreground",k&&"stg:cursor-grab stg:active:cursor-grabbing"),style:{paddingLeft:m?"8px":`${12+12*g}px`,paddingRight:"8px"},"aria-current":y?"true":void 0,children:[x&&(0,t.jsx)("span",{"aria-hidden":"true",className:"stg:text-[10px] stg:text-muted-foreground-subtle",children:b?"▼":"▶"}),p&&(x?(0,t.jsx)(l,{open:b}):(0,t.jsx)(i,{fileName:a.name})),(0,t.jsx)("span",{className:(0,n.cn)("stg:truncate",x&&"stg:font-medium stg:text-foreground"),children:a.name})]}),x&&b&&a.children&&(0,t.jsx)("ul",{role:"group",className:(0,n.cn)(s.UNSTYLED_LIST,m&&"stg:ml-3 stg:border-l stg:border-border"),children:a.children.map(r=>(0,t.jsx)(e,{node:r,selectedPath:o,onSelect:u,onActivate:d,depth:g+1,enableDrag:h,showIcons:p,indentGuides:m,maxInitialDepth:f},r.path))})]})}],536907)},469196,e=>{"use strict";e.s(["buildFileTree",0,function(e){let t=[];for(let r of[...e].sort((e,t)=>e.path.localeCompare(t.path))){let e=r.path.split("/");if(1===e.length)t.push({name:e[0],path:r.path});else{let n=t;for(let t=0;t<e.length-1;t++){let r=e[t],s=n.find(e=>e.name===r&&e.children);s||(s={name:r,path:e.slice(0,t+1).join("/")+"/",children:[]},n.push(s)),n=s.children}n.push({name:e[e.length-1],path:r.path})}}return t}])},488479,e=>{"use strict";var t=e.i(843476),r=e.i(893976);function n({changeType:e}){return(0,t.jsx)("span",{className:(0,r.cn)("stg:shrink-0 stg:font-mono stg:text-[10px] stg:font-bold","modified"===e?"stg:text-diff-hunk-header-fg":"added"===e?"stg:text-diff-added-fg":"stg:text-diff-removed-fg"),"aria-label":e,children:"modified"===e?"M":"added"===e?"A":"D"})}function s({additions:e,deletions:r}){return(0,t.jsxs)("span",{className:"stg:shrink-0 stg:font-mono stg:text-[10px]",children:[e>0&&(0,t.jsxs)("span",{className:"stg:text-diff-added-fg",children:["+",e]}),e>0&&r>0&&" ",r>0&&(0,t.jsxs)("span",{className:"stg:text-diff-removed-fg",children:["-",r]})]})}e.s(["DiffFileList",0,function({files:e,selectedPath:a,onSelect:i,className:o}){return 0===e.length?null:(0,t.jsx)("nav",{"aria-label":"Changed files",className:(0,r.cn)("stg:flex stg:flex-col stg:overflow-auto",o),children:e.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>i(e.path),"aria-current":e.path===a?"true":void 0,className:(0,r.cn)("stg:flex stg:items-center stg:gap-2 stg:px-3 stg:py-1.5 stg:text-left stg:text-xs stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-inset",e.path===a?"stg:bg-accent-hover stg:text-foreground":"stg:text-muted-foreground stg:hover:bg-accent-hover stg:hover:text-foreground"),children:[(0,t.jsx)(n,{changeType:e.changeType}),(0,t.jsx)("span",{className:"stg:min-w-0 stg:flex-1 stg:truncate stg:font-mono",children:e.path}),(0,t.jsx)(s,{additions:e.additions,deletions:e.deletions})]},e.path))})}])},745176,e=>{"use strict";e.s(["downloadTextFile",0,function(e,t,r){let n=new Blob([e],{type:`${r};charset=utf-8;`}),s=URL.createObjectURL(n),a=document.createElement("a");a.href=s,a.download=t,a.style.display="none",document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(s)}])},926059,e=>{"use strict";e.i(222258);var t=e.i(967785),r=e.i(735922);function n(e){var t;let r={name:e.name,kind:(t=e.kind,s.get(t)??`unknown_${t}`)};return e.taskConfig&&Object.keys(e.taskConfig).length>0&&(r.task_config=function e(t){if(null==t)return t;if("bigint"==typeof t)return Number(t);if("object"!=typeof t)return t;if(Array.isArray(t))return t.map(e);let r={};for(let[n,s]of Object.entries(t))r[n]=e(s);return r}(e.taskConfig)),e.export?.as&&(r.export={as:e.export.as}),e.flow?.then&&(r.flow={then:e.flow.then}),r}let s=new Map(Object.entries(r.WorkflowTaskKind).filter(e=>"number"==typeof e[1]&&e[1]!==r.WorkflowTaskKind.workflow_task_kind_unspecified).map(([e,t])=>[t,e])),a=new Map(Array.from(s.entries()).map(([e,t])=>[t,e])),i=new Map([[r.BudgetExceededPolicy.budget_exceeded_terminate,"budget_exceeded_terminate"],[r.BudgetExceededPolicy.budget_exceeded_human_review,"budget_exceeded_human_review"],[r.BudgetExceededPolicy.budget_exceeded_warn,"budget_exceeded_warn"]]),o=new Map(Array.from(i.entries()).map(([e,t])=>[t,e]));function l(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function c(e,t,r){let n=e[t];if("string"!=typeof n||0===n.length)throw Error(`Workflow YAML is missing required field: ${r}.`);return n}function u(e,t){let r=e[t];return"string"==typeof r&&r.length>0?r:void 0}function d(e){if("bigint"==typeof e)return e;if("number"==typeof e&&Number.isFinite(e))return BigInt(Math.round(e));if("string"==typeof e)try{return BigInt(e)}catch{}}e.s(["parseWorkflowYaml",0,function(e,r){let n=function(e){let r;try{r=(0,t.parse)(e)}catch{throw Error("Failed to parse content as YAML.")}if(!l(r))throw Error("YAML must be a mapping document, not a scalar or list.");return r}(e);var s=n;let i=s.kind;if("string"==typeof i&&"Workflow"!==i)throw Error(`Expected resource kind "Workflow", got "${i}".`);if(!l(s.metadata))throw Error("Workflow YAML is missing required field: metadata.");if(!l(s.spec))throw Error("Workflow YAML is missing required field: spec.");let g=n.metadata,h=n.spec,p=c(g,"name","metadata.name"),m=u(g,"slug"),f=function(e,t){let r=e[t];if(!l(r))return;let n={},s=!1;for(let[e,t]of Object.entries(r))"string"==typeof t&&(n[e]=t,s=!0);return s?n:void 0}(g,"labels"),b=function(e){let t=e.document;if(!l(t))throw Error("Workflow YAML is missing required field: spec.document.");return{dsl:u(t,"dsl")??"1.0.0",namespace:c(t,"namespace","spec.document.namespace"),name:c(t,"name","spec.document.name"),version:c(t,"version","spec.document.version"),...t.description&&"string"==typeof t.description?{description:t.description}:{}}}(h),v=function(e){let t=e.tasks;if(!Array.isArray(t)||0===t.length)throw Error("Workflow YAML is missing required field: spec.tasks (must be a non-empty list).");return t.filter(l).map((e,t)=>{var r;let n=e.name;if("string"!=typeof n||0===n.length)throw Error(`Workflow YAML: task at index ${t} is missing required field: name.`);let s=e.kind;if("string"!=typeof s||0===s.length)throw Error(`Workflow YAML: task "${n}" is missing required field: kind.`);let i=(r=s,a.get(r));if(void 0===i)throw Error(`Workflow YAML: task "${n}" has unknown kind "${s}".`);let o=e.task_config??e.taskConfig;if(!l(o))throw Error(`Workflow YAML: task "${n}" is missing required field: task_config.`);let c=e.export??e.export,u=e.flow,d={name:n,kind:i,taskConfig:o};if(l(c)){let e=c.as;"string"==typeof e&&e.length>0&&(d.export={as:e})}if(l(u)){let e=u.then;"string"==typeof e&&e.length>0&&(d.flow={then:e})}return d})}(h),x=function(e){let t=e.env;if(!l(t))return;let r={},n=!1;for(let[e,s]of Object.entries(t)){if(!l(s))continue;let t=s.is_secret??s.isSecret,a=s.description,i=s.optional;r[e]={..."boolean"==typeof t&&{isSecret:t},..."string"==typeof a&&{description:a},..."boolean"==typeof i&&{optional:i}},n=!0}return n?r:void 0}(h),y=function(e){var t;let r=e.budget;if(!l(r))return;let n=d(r.max_cost_micros??r.maxCostMicros),s=d(r.max_total_tokens??r.maxTotalTokens),a=function(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){let t=Number(e);return Number.isFinite(t)?t:void 0}}(r.max_duration_seconds??r.maxDurationSeconds),i=r.on_exceeded??r.onExceeded,c="string"==typeof i?(t=i,o.get(t)):void 0;if(void 0!==n&&n>BigInt(0)||void 0!==s&&s>BigInt(0)||void 0!==a&&a>0)return{...void 0!==n&&{maxCostMicros:n},...void 0!==s&&{maxTotalTokens:s},...void 0!==a&&{maxDurationSeconds:a},...void 0!==c&&{onExceeded:c}}}(h),k=u(h,"description");return{name:p,org:r,...void 0!==m&&{slug:m},...void 0!==f&&{labels:f},...void 0!==k&&{description:k},document:b,tasks:v,...void 0!==x&&{env:x},...void 0!==y&&{budget:y}}},"serializeWorkflowYaml",0,function(e){let s={apiVersion:e.apiVersion||"agentic.stigmer.ai/v1",kind:e.kind||"Workflow",metadata:function(e){let t=e.metadata;if(!t)return{};let r={name:t.name};return t.org&&(r.org=t.org),t.slug&&t.slug!==t.name&&(r.slug=t.slug),t.labels&&Object.keys(t.labels).length>0&&(r.labels={...t.labels}),r}(e),spec:function(e){var t,s,a,o;let l,c,u,d;if(!e)return{};let g={};return e.description&&(g.description=e.description),e.document&&(t=e.document,l={},t.dsl&&(l.dsl=t.dsl),t.namespace&&(l.namespace=t.namespace),t.name&&(l.name=t.name),t.version&&(l.version=t.version),t.description&&(l.description=t.description),g.document=l),e.tasks.length>0&&(g.tasks=e.tasks.map(n)),e.env&&Object.keys(e.env).length>0&&(g.env=function(e){let t={};for(let[r,n]of Object.entries(e)){let e={};n.isSecret&&(e.is_secret=!0),n.description&&(e.description=n.description),n.optional&&(e.optional=!0),t[r]=e}return t}(e.env)),e.budget&&(Number((s=e.budget).maxCostMicros)>0||Number(s.maxTotalTokens)>0||s.maxDurationSeconds>0)&&(a=e.budget,c={},u=Number(a.maxCostMicros),d=Number(a.maxTotalTokens),u>0&&(c.max_cost_micros=u),d>0&&(c.max_total_tokens=d),a.maxDurationSeconds>0&&(c.max_duration_seconds=a.maxDurationSeconds),a.onExceeded!==r.BudgetExceededPolicy.budget_exceeded_policy_unspecified&&(o=a.onExceeded,c.on_exceeded=i.get(o)??"budget_exceeded_policy_unspecified"),g.budget=c),g}(e.spec)};return(0,t.stringify)(s,{lineWidth:0,blockQuote:"literal"})}])},312056,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566);let s=(0,r.createContext)(null);function a(){return window.location.pathname}e.s(["AppNavigationProvider",0,function({children:e}){let[i,o]=(0,r.useState)(a),l=(0,r.useRef)(i);(0,r.useEffect)(()=>{l.current=i},[i]);let c=(0,n.usePathname)(),[u,d]=(0,r.useState)(c);c!==u&&(d(c),c!==i&&o(c));let g=(0,r.useCallback)(e=>{e!==l.current&&(o(e),window.history.pushState(null,"",e))},[]);(0,r.useEffect)(()=>{function e(){o(window.location.pathname)}return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]);let h=(0,r.useMemo)(()=>({currentPath:i,navigate:g}),[i,g]);return(0,t.jsx)(s.Provider,{value:h,children:e})},"useAppNavigation",0,function(){let e=(0,r.useContext)(s);if(!e)throw Error("useAppNavigation must be used within <AppNavigationProvider>");return e}])},635549,e=>{"use strict";var t=e.i(271645),r=e.i(312056);let n=/^\/executions\/(.+)/;e.s(["useExecutionNavigation",0,function(){let{currentPath:e,navigate:s}=(0,r.useAppNavigation)(),a=n.test(e);return{activeExecutionId:a?e.match(n)?.[1]??null:null,isExecutionZone:a,navigateToExecution:(0,t.useCallback)(e=>{s(`/executions/${e}`)},[s])}}])},244686,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(566022),s=e.i(893976);let a=new Map([[n.ExecutionPhase.EXECUTION_PENDING,{label:"Pending",icon:o,colorClass:"stg:text-muted-foreground"}],[n.ExecutionPhase.EXECUTION_IN_PROGRESS,{label:"Running",icon:o,colorClass:"stg:text-foreground"}],[n.ExecutionPhase.EXECUTION_COMPLETED,{label:"Completed",icon:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M2.5 6L5 8.5L9.5 3.5"})})},colorClass:"stg:text-success"}],[n.ExecutionPhase.EXECUTION_FAILED,{label:"Failed",icon:l,colorClass:"stg:text-destructive"}],[n.ExecutionPhase.EXECUTION_CANCELLED,{label:"Cancelled",icon:l,colorClass:"stg:text-muted-foreground"}],[n.ExecutionPhase.EXECUTION_TERMINATED,{label:"Terminated",icon:function(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:(0,t.jsx)("rect",{x:"2",y:"2",width:"8",height:"8",rx:"1"})})},colorClass:"stg:text-destructive"}],[n.ExecutionPhase.EXECUTION_PAUSED,{label:"Paused",icon:function(){return(0,t.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"currentColor",children:[(0,t.jsx)("rect",{x:"2.5",y:"2",width:"2.5",height:"8",rx:"0.5"}),(0,t.jsx)("rect",{x:"7",y:"2",width:"2.5",height:"8",rx:"0.5"})]})},colorClass:"stg:text-muted-foreground"}]]),i=(0,r.memo)(function({phase:e,className:r}){let n=a.get(e);if(!n)return null;let i=n.icon;return(0,t.jsxs)("span",{role:"status","aria-label":n.label,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:text-xs stg:font-medium",n.colorClass,r),children:[(0,t.jsx)("span",{"aria-hidden":"true",children:(0,t.jsx)(i,{})}),n.label]})});function o(){return(0,t.jsxs)("span",{className:"stg:relative stg:flex stg:h-2 stg:w-2",children:[(0,t.jsx)("span",{className:"stg:absolute stg:inline-flex stg:h-full stg:w-full stg:animate-ping stg:rounded-full stg:bg-current stg:opacity-75"}),(0,t.jsx)("span",{className:"stg:relative stg:inline-flex stg:h-2 stg:w-2 stg:rounded-full stg:bg-current"})]})}function l(){return(0,t.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M3 3L9 9M9 3L3 9"})})}e.s(["WorkflowExecutionPhaseBadge",0,i])},879738,e=>{"use strict";var t=e.i(891287),r=e.i(218766),n=e.i(586108),s=e.i(583093);let a={executions:[],totalPages:0};e.s(["useWorkflowExecutionList",0,function(e){let i=(0,n.useStigmer)(),o=e?.pageSize??20,l=e?.pageToken??"",c=e?.workflowId??null,u=e?.org??"",d=async()=>{if(c){let e=await i.workflowExecution.listByWorkflow((0,t.create)(r.ListWorkflowExecutionsByWorkflowRequestSchema,{workflowId:c,pageSize:o,pageToken:l}));return{executions:[...e.entries],totalPages:e.totalPages}}let e=await i.workflowExecution.list((0,t.create)(r.ListWorkflowExecutionsRequestSchema,{pageSize:o,pageToken:l,org:u}));return{executions:[...e.entries],totalPages:e.totalPages}},{data:g,isLoading:h,isRefetching:p,error:m,refetch:f}=(0,s.useFetch)(d,[i,c,u,o,l],a);return{executions:g.executions,totalPages:g.totalPages,isLoading:h,isRefetching:p,error:m,refetch:f}}])},267460,e=>{"use strict";let t=BigInt(0);function r(e){if(e<1e3)return`${e}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let r=Math.floor(t/60),n=Math.round(t%60);if(r<60)return n>0?`${r}m ${n}s`:`${r}m`;let s=Math.floor(r/60),a=r%60;return a>0?`${s}h ${a}m`:`${s}h`}function n(e){let t=Number(e)/1e6;return t<.01?`$${t.toFixed(4)}`:`$${t.toFixed(2)}`}e.s(["formatDuration",0,r,"formatDurationSec",0,function(e){if(e<60)return`${Math.round(e)}s`;if(e<3600){let t=Math.floor(e/60),r=Math.round(e%60);return r>0?`${t}m ${r}s`:`${t}m`}let t=Math.floor(e/3600),r=Math.floor(e%3600/60);return r>0?`${t}h ${r}m`:`${t}h`},"formatMetaChips",0,function(e){let s=[];return e.durationMs&&e.durationMs>0&&s.push(r(e.durationMs)),e.costMicros&&e.costMicros>t&&s.push(n(e.costMicros)),e.tokens&&e.tokens>t&&s.push(`${e.tokens.toLocaleString()} tok`),s.length>0?s.join(" · "):null},"formatMicroUsd",0,n,"formatTimestamp",0,function(e){if(!e)return"";try{let t=new Date(e);if(Number.isNaN(t.getTime()))return e;return t.toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1})}catch{return e}},"formatTokenCount",0,function(e){let t=Number(e);return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()}])},911237,e=>{"use strict";var t=e.i(566022);BigInt(0);let r=new Set([t.WorkflowTaskStatus.WORKFLOW_TASK_COMPLETED,t.WorkflowTaskStatus.WORKFLOW_TASK_FAILED,t.WorkflowTaskStatus.WORKFLOW_TASK_SKIPPED]);function n(e){if(!e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?null:t}function s(e){let s=e.metadata,a=e.status,i=a?.tasks??[],o=n(a?.startedAt),l=n(a?.completedAt),c=null;o&&l?c=l.getTime()-o.getTime():o&&a?.phase===t.ExecutionPhase.EXECUTION_IN_PROGRESS&&(c=Date.now()-o.getTime());let u=null,d=null,g=0,h=0,p=!1;for(let e of i)r.has(e.status)&&g++,u||e.status!==t.WorkflowTaskStatus.WORKFLOW_TASK_FAILED||(u=e.taskName||null),d||e.status!==t.WorkflowTaskStatus.WORKFLOW_TASK_IN_PROGRESS||(d=e.taskName||null),e.status===t.WorkflowTaskStatus.WORKFLOW_TASK_WAITING_APPROVAL&&(p=!0,d||(d=e.taskName||null)),h+=function(e){if(!e?.fields)return 0;let t=e.fields.retry_count??e.fields.retryCount;return t&&"object"==typeof t&&null!==t&&"numberValue"in t?Math.max(0,Math.floor(t.numberValue??0)):0}(e.metadata);let m=BigInt(a?.totalCostMicros??0),f=BigInt(a?.totalInputTokens??0),b=BigInt(a?.totalOutputTokens??0);return{id:s?.id??"",name:s?.name||s?.slug||"",phase:a?.phase??t.ExecutionPhase.EXECUTION_PHASE_UNSPECIFIED,startedAt:o,completedAt:l,durationMs:c,costMicros:m,inputTokens:f,outputTokens:b,totalTokens:f+b,taskCount:i.length,completedTaskCount:g,failedTaskName:u,currentTaskName:d,retryCount:h,hasHumanWait:p,error:a?.error||null,_source:e}}let a={name:(e,t)=>e.name.localeCompare(t.name),phase:(e,t)=>e.phase-t.phase,startedAt:(e,t)=>(e.startedAt?.getTime()??0)-(t.startedAt?.getTime()??0),duration:(e,t)=>(e.durationMs??-1)-(t.durationMs??-1),cost:(e,t)=>Number(e.costMicros-t.costMicros),tokens:(e,t)=>Number(e.totalTokens-t.totalTokens),tasks:(e,t)=>e.taskCount-t.taskCount};e.s(["deriveExecutionRow",0,s,"deriveExecutionRows",0,function(e){return e.map(s)},"filterExecutionRows",0,function(e,t){return e.filter(e=>(!t.phases?.length||!!t.phases.includes(e.phase))&&(null==t.minDurationMs||!((e.durationMs??-1)<t.minDurationMs))&&(null==t.maxDurationMs||!((e.durationMs??1/0)>t.maxDurationMs))&&(null==t.minCostMicros||!(e.costMicros<t.minCostMicros))&&(null==t.maxCostMicros||!(e.costMicros>t.maxCostMicros))&&(!t.failedTaskName||e.failedTaskName===t.failedTaskName)&&(!t.hasRetries||0!==e.retryCount)&&!0)},"sortExecutionRows",0,function(e,t,r){let n=a[t],s="desc"===r?-1:1;return[...e].sort((e,t)=>s*n(e,t))}])},12556,913668,215133,e=>{"use strict";e.i(113024);var t,r,n,s,a,i,o,l,c,u,d,g,h,p,m,f,b=e.i(424407),v=e.i(304532),x=e.i(732303);let y=(0,b.fileDesc)("CjFhaS9zdGlnbWVyL2FnZW50aWMvYWdlbnRjaGFubmVsL3YxL2RlbGl2ZXJ5LnByb3RvEiJhaS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxIvwFCg9DaGFubmVsRGVsaXZlcnkSEwoLZGVsaXZlcnlfaWQYASABKAkSGAoQYWdlbnRfY2hhbm5lbF9pZBgCIAEoCRILCgNvcmcYAyABKAkSFAoMZXhlY3V0aW9uX2lkGAQgASgJEhIKCnNlc3Npb25faWQYBSABKAkSGAoQY29udmVyc2F0aW9uX2tleRgGIAEoCRIZChFleHRlcm5hbF91c2VyX2tleRgHIAEoCRJJCgZzdGF0dXMYCCABKA4yOS5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNoYW5uZWxEZWxpdmVyeVN0YXR1cxIQCghhdHRlbXB0cxgJIAEoBRISCgpsYXN0X2Vycm9yGAogASgJEhcKD2lkZW1wb3RlbmN5X2tleRgLIAEoCRJJCgVzbGFjaxgMIAEoCzI4LmFpLnN0aWdtZXIuYWdlbnRpYy5hZ2VudGNoYW5uZWwudjEuU2xhY2tEZWxpdmVyeUNvbnRleHRIABJPCgh3aGF0c2FwcBgQIAEoCzI7LmFpLnN0aWdtZXIuYWdlbnRpYy5hZ2VudGNoYW5uZWwudjEuV2hhdHNBcHBEZWxpdmVyeUNvbnRleHRIABIuCgpjcmVhdGVkX2F0GA0gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgp1cGRhdGVkX2F0GA4gASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIzCg9uZXh0X2F0dGVtcHRfYXQYDyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhIKCnJlcGx5X3RleHQYESABKAkSUwoMZmFpbHVyZV9raW5kGBIgASgOMj0uYWkuc3RpZ21lci5hZ2VudGljLmFnZW50Y2hhbm5lbC52MS5DaGFubmVsQXR0ZW1wdEZhaWx1cmVLaW5kEhYKDmF0dGVtcHRfZGV0YWlsGBMgASgJQhIKEGRlbGl2ZXJ5X2NvbnRleHQiVQoUU2xhY2tEZWxpdmVyeUNvbnRleHQSEgoKY2hhbm5lbF9pZBgBIAEoCRIRCgl0aHJlYWRfdHMYAiABKAkSFgoOcGxhY2Vob2xkZXJfdHMYAyABKAkiSwoXV2hhdHNBcHBEZWxpdmVyeUNvbnRleHQSFwoPcGhvbmVfbnVtYmVyX2lkGAEgASgJEhcKD3JlY2lwaWVudF93YV9pZBgCIAEoCSqIAQoVQ2hhbm5lbERlbGl2ZXJ5U3RhdHVzEicKI2NoYW5uZWxfZGVsaXZlcnlfc3RhdHVzX3Vuc3BlY2lmaWVkEAASCwoHcGVuZGluZxABEg4KCmRlbGl2ZXJpbmcQAhINCglkZWxpdmVyZWQQAxIKCgZmYWlsZWQQBBIOCgpzdXBwcmVzc2VkEAUqfQoZQ2hhbm5lbEF0dGVtcHRGYWlsdXJlS2luZBIfChthdHRlbXB0X2ZhaWx1cmVfdW5zcGVjaWZpZWQQABITCg9hdHRlbXB0X3JlZnVzZWQQARITCg9hdHRlbXB0X2Vycm9yZWQQAhIVChFhdHRlbXB0X3dpdGhkcmF3bhADYgZwcm90bzM",[x.file_google_protobuf_timestamp]);(t=c||(c={}))[t.channel_delivery_status_unspecified=0]="channel_delivery_status_unspecified",t[t.pending=1]="pending",t[t.delivering=2]="delivering",t[t.delivered=3]="delivered",t[t.failed=4]="failed",t[t.suppressed=5]="suppressed",(r=u||(u={}))[r.attempt_failure_unspecified=0]="attempt_failure_unspecified",r[r.attempt_refused=1]="attempt_refused",r[r.attempt_errored=2]="attempt_errored",r[r.attempt_withdrawn=3]="attempt_withdrawn",e.s(["ChannelAttemptFailureKind",0,u,"ChannelDeliveryStatus",0,c,"file_ai_stigmer_agentic_agentchannel_v1_delivery",0,y],913668);var k=e.i(730938);let w=(0,b.fileDesc)("CjFhaS9zdGlnbWVyL2FnZW50aWMvYWdlbnRjaGFubmVsL3YxL291dGJvdW5kLnByb3RvEiJhaS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxIo8HChZDaGFubmVsT3V0Ym91bmRNZXNzYWdlEhsKE291dGJvdW5kX21lc3NhZ2VfaWQYASABKAkSGAoQYWdlbnRfY2hhbm5lbF9pZBgCIAEoCRILCgNvcmcYAyABKAkSEgoKc2Vzc2lvbl9pZBgEIAEoCRJJCgZvcmlnaW4YBSABKA4yOS5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNoYW5uZWxPdXRib3VuZE9yaWdpbhIRCglyZWNpcGllbnQYBiABKAkSSwoHcGF5bG9hZBgHIAEoCzI6LmFpLnN0aWdtZXIuYWdlbnRpYy5hZ2VudGNoYW5uZWwudjEuQ2hhbm5lbE91dGJvdW5kUGF5bG9hZBJJCgZzdGF0dXMYCCABKA4yOS5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNoYW5uZWxEZWxpdmVyeVN0YXR1cxIQCghhdHRlbXB0cxgJIAEoBRISCgpsYXN0X2Vycm9yGAogASgJEhcKD2lkZW1wb3RlbmN5X2tleRgLIAEoCRIbChNwcm92aWRlcl9tZXNzYWdlX2lkGAwgASgJEi4KCmNyZWF0ZWRfYXQYDSABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEi4KCnVwZGF0ZWRfYXQYDiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEjMKD25leHRfYXR0ZW1wdF9hdBgPIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASTgoNcmVjZWlwdF9zdGF0ZRgQIAEoDjI3LmFpLnN0aWdtZXIuYWdlbnRpYy5hZ2VudGNoYW5uZWwudjEuQ2hhbm5lbFJlY2VpcHRTdGF0ZRIWCg5yZWNlaXB0X2RldGFpbBgRIAEoCRIaChJyZWNlaXB0X2Vycm9yX2NvZGUYEiABKAUSLgoKcmVjZWlwdF9hdBgTIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASFQoNcmVuZGVyZWRfYm9keRgUIAEoCRJTCgxmYWlsdXJlX2tpbmQYFSABKA4yPS5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNoYW5uZWxBdHRlbXB0RmFpbHVyZUtpbmQSFgoOYXR0ZW1wdF9kZXRhaWwYFiABKAkqgwEKE0NoYW5uZWxSZWNlaXB0U3RhdGUSHQoZcmVjZWlwdF9zdGF0ZV91bnNwZWNpZmllZBAAEhAKDHJlY2VpcHRfc2VudBABEhUKEXJlY2VpcHRfZGVsaXZlcmVkEAISEAoMcmVjZWlwdF9yZWFkEAMSEgoOcmVjZWlwdF9mYWlsZWQQBCqHAQoVQ2hhbm5lbE91dGJvdW5kT3JpZ2luEicKI2NoYW5uZWxfb3V0Ym91bmRfb3JpZ2luX3Vuc3BlY2lmaWVkEAASGAoUY2hhbm5lbF9jb252ZXJzYXRpb24QARIMCghvcGVyYXRvchACEgwKCHBsYXRmb3JtEAMSDwoLcGFydGljaXBhbnQQBGIGcHJvdG8z",[y,k.file_ai_stigmer_agentic_agentchannel_v1_message_io,x.file_google_protobuf_timestamp]);(n=d||(d={}))[n.receipt_state_unspecified=0]="receipt_state_unspecified",n[n.receipt_sent=1]="receipt_sent",n[n.receipt_delivered=2]="receipt_delivered",n[n.receipt_read=3]="receipt_read",n[n.receipt_failed=4]="receipt_failed",(s=g||(g={}))[s.channel_outbound_origin_unspecified=0]="channel_outbound_origin_unspecified",s[s.channel_conversation=1]="channel_conversation",s[s.operator=2]="operator",s[s.platform=3]="platform",s[s.participant=4]="participant",e.s(["ChannelReceiptState",0,d,"file_ai_stigmer_agentic_agentchannel_v1_outbound",0,w],215133);var A=e.i(85849),S=e.i(761867);let C=(0,b.fileDesc)("CjhhaS9zdGlnbWVyL2FnZW50aWMvYWdlbnRjaGFubmVsL3YxL2NvbnZlcnNhdGlvbl9pby5wcm90bxIiYWkuc3RpZ21lci5hZ2VudGljLmFnZW50Y2hhbm5lbC52MSL+AwoTQ2hhbm5lbENvbnZlcnNhdGlvbhIYChBhZ2VudF9jaGFubmVsX2lkGAEgASgJEhgKEGNvbnZlcnNhdGlvbl9rZXkYAiABKAkSCwoDb3JnGAMgASgJEkgKB2NvbnRyb2wYBCABKA4yNy5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNvbnZlcnNhdGlvbkNvbnRyb2wSFQoNY29udHJvbGxlZF9ieRgFIAEoCRI2ChJjb250cm9sX2NoYW5nZWRfYXQYBiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEhcKD25lZWRzX2F0dGVudGlvbhgHIAEoCBIYChBhdHRlbnRpb25fcmVhc29uGAggASgJEjgKFGF0dGVudGlvbl9jaGFuZ2VkX2F0GAkgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIUCgxkaXNwbGF5X25hbWUYCiABKAkSPAoYbGFzdF9jdXN0b21lcl9tZXNzYWdlX2F0GAsgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBI0ChBsYXN0X2FjdGl2aXR5X2F0GAwgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIWCg5hd2FpdGluZ19yZXBseRgNIAEoCCKGBgoYQ29udmVyc2F0aW9uVGltZWxpbmVJdGVtEg8KB2l0ZW1faWQYASABKAkSQgoEbGFuZRgCIAEoDjI0LmFpLnN0aWdtZXIuYWdlbnRpYy5hZ2VudGNoYW5uZWwudjEuQ29udmVyc2F0aW9uTGFuZRJKCgZhdXRob3IYAyABKA4yOi5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNvbnZlcnNhdGlvbkl0ZW1BdXRob3ISEwoLYXV0aG9yZWRfYnkYBCABKAkSDAoEdGV4dBgFIAEoCRIdChVwcm92aWRlcl9tZXNzYWdlX3R5cGUYBiABKAkSJgoCYXQYByABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wElIKD2RlbGl2ZXJ5X3N0YXR1cxgIIAEoDjI5LmFpLnN0aWdtZXIuYWdlbnRpYy5hZ2VudGNoYW5uZWwudjEuQ2hhbm5lbERlbGl2ZXJ5U3RhdHVzEk4KDXJlY2VpcHRfc3RhdGUYCSABKA4yNy5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNoYW5uZWxSZWNlaXB0U3RhdGUSSQoGb3JpZ2luGAogASgOMjkuYWkuc3RpZ21lci5hZ2VudGljLmFnZW50Y2hhbm5lbC52MS5DaGFubmVsT3V0Ym91bmRPcmlnaW4SFgoOcmVjZWlwdF9kZXRhaWwYCyABKAkSGgoScmVjZWlwdF9lcnJvcl9jb2RlGAwgASgFEkcKBW1lZGlhGA0gASgLMjguYWkuc3RpZ21lci5hZ2VudGljLmFnZW50Y2hhbm5lbC52MS5Db252ZXJzYXRpb25NZWRpYVJlZhIWCg5hdHRlbXB0X2RldGFpbBgOIAEoCRJbChRhdHRlbXB0X2ZhaWx1cmVfa2luZBgPIAEoDjI9LmFpLnN0aWdtZXIuYWdlbnRpYy5hZ2VudGNoYW5uZWwudjEuQ2hhbm5lbEF0dGVtcHRGYWlsdXJlS2luZCJSChRDb252ZXJzYXRpb25NZWRpYVJlZhIQCghmaWxlbmFtZRgBIAEoCRIUCgxjb250ZW50X3R5cGUYAiABKAkSEgoKc2l6ZV9ieXRlcxgDIAEoAyLjAQodTGlzdENoYW5uZWxDb252ZXJzYXRpb25zSW5wdXQSFgoDb3JnGAEgASgJQgm6SAZyBBABGD8SIgoQYWdlbnRfY2hhbm5lbF9pZBgCIAEoCUIIukgFcgMYgAESMwoJcGFnZV9pbmZvGAMgASgLMiAuYWkuc3RpZ21lci5jb21tb25zLnJwYy5QYWdlSW5mbxJRCgZmaWx0ZXIYBCABKA4yQS5haS5zdGlnbWVyLmFnZW50aWMuYWdlbnRjaGFubmVsLnYxLkNoYW5uZWxDb252ZXJzYXRpb25MaXN0RmlsdGVyInYKF0NoYW5uZWxDb252ZXJzYXRpb25MaXN0EhMKC3RvdGFsX2NvdW50GAEgASgFEkYKBWl0ZW1zGAIgAygLMjcuYWkuc3RpZ21lci5hZ2VudGljLmFnZW50Y2hhbm5lbC52MS5DaGFubmVsQ29udmVyc2F0aW9uImkKG0dldENoYW5uZWxDb252ZXJzYXRpb25JbnB1dBIkChBhZ2VudF9jaGFubmVsX2lkGAEgASgJQgq6SAdyBRABGIABEiQKEGNvbnZlcnNhdGlvbl9rZXkYAiABKAlCCrpIB3IFEAEYgAEikQEKHEdldENvbnZlcnNhdGlvblRpbWVsaW5lSW5wdXQSJAoQYWdlbnRfY2hhbm5lbF9pZBgBIAEoCUIKukgHcgUQARiAARIkChBjb252ZXJzYXRpb25fa2V5GAIgASgJQgq6SAdyBRABGIABEhEKCXBhZ2Vfc2l6ZRgDIAEoBRISCgpwYWdlX3Rva2VuGAQgASgJInwKFENvbnZlcnNhdGlvblRpbWVsaW5lEksKBWl0ZW1zGAEgAygLMjwuYWkuc3RpZ21lci5hZ2VudGljLmFnZW50Y2hhbm5lbC52MS5Db252ZXJzYXRpb25UaW1lbGluZUl0ZW0SFwoPbmV4dF9wYWdlX3Rva2VuGAIgASgJIo8BCiRHZXRDb252ZXJzYXRpb25NZWRpYURvd25sb2FkVXJsSW5wdXQSJAoQYWdlbnRfY2hhbm5lbF9pZBgBIAEoCUIKukgHcgUQARiAARIkChBjb252ZXJzYXRpb25fa2V5GAIgASgJQgq6SAdyBRABGIABEhsKB2l0ZW1faWQYAyABKAlCCrpIB3IFEAEYgAIiWwocQ29udmVyc2F0aW9uTWVkaWFEb3dubG9hZFVybBILCgN1cmwYASABKAkSLgoKZXhwaXJlc19hdBgCIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXAiZgoYQ29udmVyc2F0aW9uQ29udHJvbElucHV0EiQKEGFnZW50X2NoYW5uZWxfaWQYASABKAlCCrpIB3IFEAEYgAESJAoQY29udmVyc2F0aW9uX2tleRgCIAEoCUIKukgHcgUQARiAASK7AQoYUmVwbHlUb0NvbnZlcnNhdGlvbklucHV0EiQKEGFnZW50X2NoYW5uZWxfaWQYASABKAlCCrpIB3IFEAEYgAESJAoQY29udmVyc2F0aW9uX2tleRgCIAEoCUIKukgHcgUQARiAARJTCgdwYXlsb2FkGAMgASgLMjouYWkuc3RpZ21lci5hZ2VudGljLmFnZW50Y2hhbm5lbC52MS5DaGFubmVsT3V0Ym91bmRQYXlsb2FkQga6SAPIAQEiNwoZRXNjYWxhdGVDb252ZXJzYXRpb25JbnB1dBIaCgZyZWFzb24YASABKAlCCrpIB3IFEAEYgAgqYQoTQ29udmVyc2F0aW9uQ29udHJvbBIkCiBjb252ZXJzYXRpb25fY29udHJvbF91bnNwZWNpZmllZBAAEhEKDWNvbnRyb2xfYWdlbnQQARIRCg1jb250cm9sX2h1bWFuEAIqWQoQQ29udmVyc2F0aW9uTGFuZRIhCh1jb252ZXJzYXRpb25fbGFuZV91bnNwZWNpZmllZBAAEg8KC2xhbmVfcHVibGljEAESEQoNbGFuZV9pbnRlcm5hbBACKpMBChZDb252ZXJzYXRpb25JdGVtQXV0aG9yEigKJGNvbnZlcnNhdGlvbl9pdGVtX2F1dGhvcl91bnNwZWNpZmllZBAAEhMKD2F1dGhvcl9jdXN0b21lchABEhAKDGF1dGhvcl9hZ2VudBACEhMKD2F1dGhvcl90ZWFtbWF0ZRADEhMKD2F1dGhvcl9wbGF0Zm9ybRAEKmkKHUNoYW5uZWxDb252ZXJzYXRpb25MaXN0RmlsdGVyEjAKLGNoYW5uZWxfY29udmVyc2F0aW9uX2xpc3RfZmlsdGVyX3Vuc3BlY2lmaWVkEAASFgoSZmlsdGVyX3dhbnRzX2h1bWFuEAFiBnByb3RvMw",[y,k.file_ai_stigmer_agentic_agentchannel_v1_message_io,w,A.file_ai_stigmer_commons_rpc_pagination,S.file_buf_validate_validate,x.file_google_protobuf_timestamp]),E=(0,v.messageDesc)(C,0),j=(0,v.messageDesc)(C,1),W=(0,v.messageDesc)(C,3),R=(0,v.messageDesc)(C,5),_=(0,v.messageDesc)(C,6),N=(0,v.messageDesc)(C,8),M=(0,v.messageDesc)(C,10),I=(0,v.messageDesc)(C,11);(a=h||(h={}))[a.conversation_control_unspecified=0]="conversation_control_unspecified",a[a.control_agent=1]="control_agent",a[a.control_human=2]="control_human",(i=p||(p={}))[i.conversation_lane_unspecified=0]="conversation_lane_unspecified",i[i.lane_public=1]="lane_public",i[i.lane_internal=2]="lane_internal",(o=m||(m={}))[o.conversation_item_author_unspecified=0]="conversation_item_author_unspecified",o[o.author_customer=1]="author_customer",o[o.author_agent=2]="author_agent",o[o.author_teammate=3]="author_teammate",o[o.author_platform=4]="author_platform",(l=f||(f={}))[l.channel_conversation_list_filter_unspecified=0]="channel_conversation_list_filter_unspecified",l[l.filter_wants_human=1]="filter_wants_human",e.s(["ChannelConversationListFilter",0,f,"ChannelConversationSchema",0,E,"ConversationControl",0,h,"ConversationControlInputSchema",0,M,"ConversationItemAuthor",0,m,"ConversationLane",0,p,"ConversationTimelineItemSchema",0,j,"GetChannelConversationInputSchema",0,R,"GetConversationMediaDownloadUrlInputSchema",0,N,"GetConversationTimelineInputSchema",0,_,"ListChannelConversationsInputSchema",0,W,"ReplyToConversationInputSchema",0,I,"file_ai_stigmer_agentic_agentchannel_v1_conversation_io",0,C],12556)},973621,711364,945850,e=>{"use strict";var t=e.i(271645);e.s(["useComposer",0,function({onSubmit:e,disabled:r=!1,maxHeight:n=240,autoFocusOnEnable:s=!0}){let a=(0,t.useRef)(null),[i,o]=(0,t.useState)(""),l=(0,t.useRef)(r),c=i.trim().length>0&&!r;(0,t.useEffect)(()=>{s&&l.current&&!r&&a.current?.focus(),l.current=r},[r,s]);let u=(0,t.useCallback)(()=>{let e=a.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,n)}px`)},[n]),d=(0,t.useCallback)(()=>{let e=a.current;e&&(e.style.height="auto")},[]),g=(0,t.useCallback)(()=>{o(""),d()},[d]),h=(0,t.useCallback)(()=>{let t=i.trim();t&&!r&&(e(t),g())},[i,r,e,g]),p=(0,t.useCallback)(e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),h())},[h]),m=(0,t.useCallback)(e=>{o(e.target.value),u()},[u]);return{message:i,setMessage:o,textareaRef:a,textareaProps:{ref:a,value:i,onChange:m,onKeyDown:p,disabled:r},canSubmit:c,submit:h,clear:g}}],973621);let r={".md":"text/markdown",".markdown":"text/markdown",".yaml":"application/x-yaml",".yml":"application/x-yaml",".json":"application/json",".csv":"text/csv",".tsv":"text/tab-separated-values",".xml":"application/xml",".html":"text/html",".htm":"text/html",".css":"text/css",".js":"application/javascript",".ts":"application/typescript",".py":"text/x-python",".go":"text/x-go",".rs":"text/x-rust",".java":"text/x-java",".rb":"text/x-ruby",".sh":"application/x-sh",".bash":"application/x-sh",".sql":"application/sql",".toml":"application/toml",".ini":"text/plain",".cfg":"text/plain",".conf":"text/plain",".env":"text/plain",".txt":"text/plain",".log":"text/plain",".pdf":"application/pdf",".zip":"application/zip",".gz":"application/gzip",".tar":"application/x-tar",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".svg":"image/svg+xml",".webp":"image/webp"},n=["B","KB","MB","GB"];function s(e){if(0===e)return"0 B";let t=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1),r=e/Math.pow(1024,t);return 0===t?`${e} B`:`${r.toFixed(1)} ${n[t]}`}e.s(["detectContentType",0,function(e){if(e.type&&"application/octet-stream"!==e.type)return e.type;let t=e.name.lastIndexOf(".");if(-1!==t){let n=r[e.name.slice(t).toLowerCase()];if(n)return n}return"application/octet-stream"},"formatFileSize",0,s,"uniquifyFilename",0,function(e,t){if(!t.has(e))return e;let r=e.lastIndexOf("."),n=r>0?e.slice(0,r):e,s=r>0?e.slice(r):"";for(let e=2;;e++){let r=`${n}-${e}${s}`;if(!t.has(r))return r}},"validateAttachmentSize",0,function(e){return e.size>0xa00000?`${e.name} exceeds the 10 MB attachment limit (${s(e.size)})`:null}],711364);var a=e.i(326283);let i=new Set,o=new Map;e.s(["useKeyedSubmission",0,function(){let[e,r]=(0,t.useState)(i),[n,s]=(0,t.useState)(o),l=(0,t.useCallback)(()=>s(o),[]),c=(0,t.useCallback)(async(e,t)=>{r(t=>{let r=new Set(t);return r.add(e),r}),s(t=>{if(!t.has(e))return t;let r=new Map(t);return r.delete(e),r});try{return await t()}catch(r){let t=(0,a.toError)(r);throw s(r=>new Map(r).set(e,t)),r}finally{r(t=>{if(!t.has(e))return t;let r=new Set(t);return r.delete(e),r})}},[]);return(0,t.useMemo)(()=>({submittingKeys:e,errorsByKey:n,run:c,clearErrors:l}),[e,n,c,l])}],945850)},217127,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(893976),s=e.i(590150),a=e.i(213149);function i(){return(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"12",cy:"3.5",r:"1.75"}),(0,t.jsx)("circle",{cx:"4",cy:"8",r:"1.75"}),(0,t.jsx)("circle",{cx:"12",cy:"12.5",r:"1.75"}),(0,t.jsx)("path",{d:"M5.5 7.1l5-2.7M5.5 8.9l5 2.7"})]})}e.s(["ManageAccessButton",0,function({resource:e,visibility:o,extraSection:l,label:c="Manage access",className:u}){let[d,g]=(0,r.useState)(!1);return(0,t.jsxs)(s.PermissionGate,{resource:{kind:e.kindString,id:e.id},relation:"can_view_access",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>g(!0),className:(0,n.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:border stg:border-border stg:text-foreground stg:hover:bg-accent-hover","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring",u),children:[(0,t.jsx)(i,{}),c]}),(0,t.jsx)(a.ManageAccessDialog,{open:d,onOpenChange:g,resource:e,visibility:o,extraSection:l})]})}])},766354,799190,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);e.s(["ArrowLeft",0,t],766354),e.s(["CONVERSATION_BADGE_POLL_INTERVAL_MS",0,6e4,"CONVERSATION_DETAIL_POLL_INTERVAL_MS",0,5e3,"CONVERSATION_LIST_POLL_INTERVAL_MS",0,2e4],799190)},981997,e=>{"use strict";let t=(0,e.i(475254).default)("messages-square",[["path",{d:"M16 10a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 14.286V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z",key:"1n2ejm"}],["path",{d:"M20 9a2 2 0 0 1 2 2v10.286a.71.71 0 0 1-1.212.502l-2.202-2.202A2 2 0 0 0 17.172 19H10a2 2 0 0 1-2-2v-1",key:"1qfcsi"}]]);e.s(["MessagesSquare",0,t],981997)},465261,649582,e=>{"use strict";var t=e.i(475254);let r=(0,t.default)("key-round",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);e.s(["KeyRound",0,r],465261);let n=(0,t.default)("sliders-horizontal",[["path",{d:"M10 5H3",key:"1qgfaw"}],["path",{d:"M12 19H3",key:"yhmn1j"}],["path",{d:"M14 3v4",key:"1sua03"}],["path",{d:"M16 17v4",key:"1q0r14"}],["path",{d:"M21 12h-9",key:"1o4lsq"}],["path",{d:"M21 19h-5",key:"1rlt1p"}],["path",{d:"M21 5h-7",key:"1oszz2"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M8 12H3",key:"a7s4jb"}]]);e.s(["SlidersHorizontal",0,n],649582)},287237,e=>{"use strict";var t=e.i(972992);let r={native:{label:"Stigmer",description:"Stigmer's native agent runtime"},cursor:{label:"Cursor",description:"Cursor IDE agent with codebase indexing"},copilot:{label:"GitHub Copilot",description:"GitHub-native sub-agent orchestration"},claude_code:{label:"Claude Agent SDK",description:"Anthropic's agent SDK with built-in tools"},codex:{label:"OpenAI Codex",description:"Thread-based execution with structured output"},devin:{label:"Devin",description:"Full autonomous engineer, session-based"}},n=Object.fromEntries(Object.entries(r).map(([e,t])=>[e,t.label]));e.s(["DEFAULT_HARNESS",0,"native","HARNESS_LABELS",0,n,"HARNESS_META",0,r,"HARNESS_OPTIONS",0,["native","cursor","copilot","claude_code","codex","devin"],"fromProtoHarness",0,function(e){switch(e){case t.Harness.CURSOR:return"cursor";case t.Harness.NATIVE:case t.Harness.UNSPECIFIED:default:return"native"}},"toProtoHarness",0,function(e){return"cursor"===e?t.Harness.CURSOR:t.Harness.NATIVE}])},444857,766817,e=>{"use strict";var t=e.i(661438);e.s(["FAST_SERVICE_TIER",0,"fast","fromProtoServiceTier",0,function(e){switch(e){case t.ServiceTier.STANDARD:return"standard";case t.ServiceTier.FAST:return"fast";default:return}},"toProtoServiceTier",0,function(e){return"fast"===e?t.ServiceTier.FAST:t.ServiceTier.STANDARD}],444857),e.s(["fromProtoThinkingMode",0,function(e){switch(e){case t.ThinkingMode.DISABLED:return"disabled";case t.ThinkingMode.ENABLED:return"enabled";default:return}},"toProtoThinkingMode",0,function(e){return"enabled"===e?t.ThinkingMode.ENABLED:t.ThinkingMode.DISABLED}],766817)},383406,e=>{"use strict";var t=e.i(271645);let r=(0,t.createContext)({models:[],isLoading:!0,error:null,refetch:()=>{}});e.s(["ModelRegistryContext",0,r,"useModelRegistryContext",0,function(){return(0,t.useContext)(r)}])},614920,e=>{"use strict";let t=new Set(["ollama"]),r=new Set(["economy","standard","premium"]),n=new Set(["fastest","fast","balanced","slow"]),s=new Set(["native","cursor","copilot","claude_code","codex","devin"]);function a(e){return"string"==typeof e.id&&"string"==typeof e.displayName&&"string"==typeof e.provider&&"string"==typeof e.harness&&s.has(e.harness)&&"string"==typeof e.costTier&&r.has(e.costTier)}async function i(e,t,r){let s=r??globalThis.fetch,i={};t&&(i.Authorization=`Bearer ${t}`);let o=await s(`${e}/v1/proxy/model-registry`,{headers:i});if(!o.ok)throw Error(`Model registry fetch failed: ${o.status}`);var l=await o.json();if(!l||"object"!=typeof l)return{models:[]};let c=l.models;if(!Array.isArray(c))return{models:[]};let u=c.filter(a).map(e=>{let t=function(e){if(!e||"object"!=typeof e)return;let t=e.vision;return"boolean"==typeof t?t:void 0}(e.capabilities),r=function(e){if(!e||"object"!=typeof e)return;let t=e.thinking;return"boolean"==typeof t?t:void 0}(e.capabilities);return{modelId:e.id,provider:e.provider,displayName:e.displayName,shortDescription:e.shortDescription??"",speedTier:n.has(e.speedTier??"")?e.speedTier:"fast",costTier:e.costTier,harness:e.harness,featured:e.featured??!1,serviceTiers:e.pricingVariants&&"object"==typeof e.pricingVariants?Object.keys(e.pricingVariants).sort():[],...void 0!==t?{visionCapability:t}:{},...void 0!==r?{thinkingCapable:r}:{}}}),d=function(e){let t=e.limits;if(!t||"object"!=typeof t)return;let r=t.vision;if(!r||"object"!=typeof r)return;let{maxImageBytes:n,maxTotalBytes:s,maxImages:a}=r;if("number"==typeof n&&!(n<=0)&&"number"==typeof s&&!(s<=0)&&"number"==typeof a&&!(a<=0))return{maxImageBytes:n,maxTotalBytes:s,maxImages:a}}(l);return{models:u,...void 0!==d?{visionLimits:d}:{}}}let o="claude-sonnet-4.6",l="default";e.s(["DEFAULT_MODEL_ID",0,o,"DISABLED_PROVIDERS",0,t,"fetchModelRegistryDocument",0,i,"modelKey",0,function(e,t){return`${e}/${t}`},"parseModelKey",0,function(e){let t=e.indexOf("/");if(t<1)return;let r=e.slice(0,t);if("native"===r||"cursor"===r)return{harness:r,modelId:e.slice(t+1)}},"resolveDefaultModelId",0,function(e,t,r){if(r?.userPreference){let n=t.find(t=>t.harness===e&&t.modelId===r.userPreference);if(n)return{modelId:n.modelId,source:"user_preference"}}if(r?.orgDefault){let n=t.find(t=>t.harness===e&&t.modelId===r.orgDefault);if(n)return{modelId:n.modelId,source:"org_default"}}if(r?.agentDefault){let n=t.find(t=>t.harness===e&&t.modelId===r.agentDefault);if(n)return{modelId:n.modelId,source:"agent_default"}}if("cursor"===e){let r=t.find(t=>t.harness===e&&t.modelId===l);if(r)return{modelId:r.modelId,source:"harness_default"}}else{let r=t.find(t=>t.harness===e&&t.featured&&"standard"===t.costTier)??t.find(t=>t.harness===e&&"standard"===t.costTier);if(r)return{modelId:r.modelId,source:"harness_default"}}let n=t.find(t=>t.harness===e&&t.featured);return n?{modelId:n.modelId,source:"harness_default"}:{modelId:"cursor"===e?l:o,source:"platform_fallback"}}])},934197,e=>{"use strict";var t=e.i(843476),r=e.i(893976);e.s(["Switch",0,function({checked:e,onCheckedChange:n,disabled:s,"aria-label":a,"aria-labelledby":i,"aria-describedby":o,id:l,className:c}){return(0,t.jsx)("button",{type:"button",role:"switch",id:l,"aria-checked":e,"aria-label":a,"aria-labelledby":i,"aria-describedby":o,disabled:s,onClick:()=>n(!e),className:(0,r.cn)("stg:relative stg:inline-flex stg:h-5 stg:w-9 stg:shrink-0 stg:items-center stg:rounded-full stg:transition-colors","stg:motion-reduce:transition-none",e?"stg:bg-primary":"stg:bg-input","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-2","stg:disabled:pointer-events-none stg:disabled:opacity-50","stg:after:absolute stg:after:-inset-3 stg:after:content-['']",c),children:(0,t.jsx)("span",{"aria-hidden":"true",className:(0,r.cn)("stg:pointer-events-none stg:block stg:size-4 stg:rounded-full stg:bg-background stg:shadow-sm stg:transition-transform","stg:motion-reduce:transition-none",e?"stg:translate-x-[18px]":"stg:translate-x-0.5")})})}])},557702,e=>{"use strict";var t=e.i(271645),r=e.i(614920),n=e.i(383406);e.s(["useModelRegistry",0,function(e){let s=e?.harness,{models:a,visionLimits:i,isLoading:o,error:l,refetch:c}=(0,n.useModelRegistryContext)();return(0,t.useMemo)(()=>{let e,t=void 0===s,{modelId:n}=s?(0,r.resolveDefaultModelId)(s,a):{modelId:r.DEFAULT_MODEL_ID},u=new Map,d=new Map,g=new Map,h=[],p=[];for(let i of a){if(t){if(r.DISABLED_PROVIDERS.has(i.provider))continue}else if(i.harness!==s||r.DISABLED_PROVIDERS.has(i.provider))continue;h.push(i),g.set((0,r.modelKey)(i.harness,i.modelId),i),d.has(i.modelId)||d.set(i.modelId,i);let a=u.get(i.provider);a?a.push(i):u.set(i.provider,[i]),i.modelId===n&&(e??=i),i.featured&&p.push(i)}let m=Array.from(u.keys());return{models:h,byProvider:u,defaultModel:e??h[0],getModel:e=>d.get(e),providers:m,featured:p,getByKey:e=>g.get(e),visionLimits:i,isLoading:o,error:l,refetch:c}},[s,a,i,o,l,c])}])},216386,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(506213),s=e.i(893976),a=e.i(364354),i=e.i(934197),o=e.i(557702),l=e.i(287237),c=e.i(444857);let u={economy:"$",standard:"$$",premium:"$$$"},d={fastest:"Fastest",fast:"Fast",balanced:"Balanced",slow:"Powerful"};function g(e){return"cursor"===e.harness&&!0===e.thinkingCapable}function h({model:e,isSelected:r,isHighlighted:n,showDescription:a,showSpeedBadge:i,onClick:o,onMouseEnter:l}){return(0,t.jsxs)("button",{"data-model-option":"",role:"option","aria-selected":r,type:"button",className:(0,s.cn)("stg:flex stg:w-full stg:cursor-pointer stg:flex-col stg:rounded-md stg:px-2 stg:py-1.5 stg:text-xs stg:outline-none","stg:transition-colors",n&&"stg:bg-accent stg:text-accent-foreground",!n&&"stg:hover:bg-accent-hover"),onClick:o,onMouseEnter:l,children:[(0,t.jsxs)("div",{className:"stg:flex stg:w-full stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:flex-1 stg:truncate stg:text-left stg:font-medium",children:e.displayName}),!1===e.visionCapability&&(0,t.jsxs)("span",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-0.5 stg:text-[0.6rem] stg:text-muted-foreground",children:[(0,t.jsx)(f,{}),"No image input"]}),(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-[0.6rem] stg:text-muted-foreground",children:i?`${d[e.speedTier]} ${u[e.costTier]}`:u[e.costTier]}),r&&(0,t.jsx)(m,{className:"stg:shrink-0 stg:text-primary"})]}),a&&e.shortDescription&&(0,t.jsx)("span",{className:"stg:mt-0.5 stg:block stg:text-left stg:text-[0.65rem] stg:text-muted-foreground",children:e.shortDescription})]})}function p(){return(0,t.jsx)("svg",{className:"stg:shrink-0 stg:text-muted-foreground",width:"10",height:"10",viewBox:"0 0 10 10",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M2.5 3.75L5 6.25L7.5 3.75"})})}function m({className:e}){return(0,t.jsx)("svg",{className:e,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:"M2 6L5 9L10 3"})})}function f(){return(0,t.jsxs)("svg",{width:"11",height:"11",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[(0,t.jsx)("rect",{x:"1.5",y:"2",width:"9",height:"8",rx:"1.2"}),(0,t.jsx)("path",{d:"M1.5 8L4.2 5.6L6.4 7.6"}),(0,t.jsx)("circle",{cx:"7.6",cy:"4.6",r:"0.8",fill:"currentColor",stroke:"none"}),(0,t.jsx)("path",{d:"M1 1L11 11"})]})}function b(){return(0,t.jsx)("svg",{className:"stg:shrink-0",width:"8",height:"10",viewBox:"0 0 8 10",fill:"currentColor","aria-hidden":!0,children:(0,t.jsx)("path",{d:"M4.9 0.2L0.6 5.6h2.6L3.1 9.8l4.3-5.4H4.8L4.9 0.2z"})})}e.s(["ModelSelector",0,function({value:e,onValueChange:u,harness:d,initialHarness:f,onHarnessChange:v,onHarnessResolved:x,availableHarnesses:y,curatedModels:k,groupBy:w="provider",showSpeedBadge:A=!0,showDescriptions:S=!0,compact:C=!1,className:E,disabled:j,placeholderLabel:W,serviceTier:R="standard",onServiceTierChange:_,thinkingMode:N="disabled",onThinkingModeChange:M}){let I=(0,a.useStigmerPortalContainer)(),Z=void 0!==d,[L,V]=(0,r.useState)(d??f??"native"),Y=d??L;(0,r.useEffect)(()=>{Z||void 0===f||V(f)},[f,Z]);let{models:F,featured:G,defaultModel:B,getModel:T,byProvider:X,isLoading:O,error:D,refetch:P}=(0,o.useModelRegistry)({harness:Y}),[K,z]=(0,r.useState)(!1),[H,U]=(0,r.useState)(!1),[J,Q]=(0,r.useState)(""),[$,q]=(0,r.useState)(!1),[ee,et]=(0,r.useState)(-1),er=(0,r.useRef)(null),en=(0,r.useRef)(null),es=(0,r.useMemo)(()=>y||l.HARNESS_OPTIONS.filter(e=>"native"===e||"cursor"===e),[y]),ea=(e?T(e):void 0)??B??void 0,ei=J.length>0,eo=J.toLowerCase(),el=(0,r.useMemo)(()=>k?new Set(k):null,[k]),ec=(0,r.useMemo)(()=>el?F.filter(e=>el.has(e.modelId)):G,[F,G,el]),eu=(0,r.useMemo)(()=>ei?F.filter(e=>e.displayName.toLowerCase().includes(eo)||e.modelId.toLowerCase().includes(eo)||e.shortDescription.toLowerCase().includes(eo)):$?F:ec.length>0?ec:F,[F,ec,ei,$,eo]),ed=(0,r.useMemo)(()=>{if(!$||"none"===w||ei)return null;let e=new Map;for(let t of F){let r="provider"===w?t.provider:t.costTier,n=e.get(r);n?n.push(t):e.set(r,[t])}return e},[F,$,w,ei]);(0,r.useEffect)(()=>{et(-1)},[eu]),(0,r.useEffect)(()=>{K||(Q(""),q(!1),et(-1),U(!1))},[K]),(0,r.useEffect)(()=>{K&&requestAnimationFrame(()=>er.current?.focus())},[K]);let eg=(0,r.useCallback)(e=>{V(e),v?.(e),x?.(e),q(!1),Q("")},[v,x]),eh=(0,r.useCallback)(e=>{u(e.modelId),"fast"===R&&_&&!e.serviceTiers.includes(c.FAST_SERVICE_TIER)&&_("standard"),"enabled"===N&&M&&!g(e)&&M("disabled"),z(!1)},[u,R,_,N,M]),ep=(0,r.useCallback)(e=>{let t=en.current;if(!t)return;let r=t.querySelectorAll("[data-model-option]");r[e]?.scrollIntoView({block:"nearest"})},[]),em=(0,r.useCallback)(e=>{let t=eu.length;if(0!==t)switch(e.key){case"ArrowDown":{e.preventDefault();let r=ee<t-1?ee+1:0;et(r),ep(r);break}case"ArrowUp":{e.preventDefault();let r=ee>0?ee-1:t-1;et(r),ep(r);break}case"Enter":{e.preventDefault();let t=ee>=0?eu[ee]:eu[0];t&&eh(t);break}case"Escape":e.preventDefault(),z(!1)}},[eu,ee,eh,ep]),ef=!ei&&!$&&ec.length>0&&ec.length<F.length,eb=void 0!==_&&void 0!==ea&&ea.serviceTiers.includes(c.FAST_SERVICE_TIER),ev="fast"===R&&(ea?.serviceTiers.includes(c.FAST_SERVICE_TIER)??!1),ex=void 0!==M&&void 0!==ea&&g(ea),ey="enabled"===N&&void 0!==ea&&g(ea),ek=!e&&void 0!==W,ew=ek?W:ea?.displayName??"Select model",eA=Z||ek?void 0:l.HARNESS_META[Y].label;return(0,t.jsxs)(n.Popover.Root,{open:K,onOpenChange:z,children:[(0,t.jsxs)(n.Popover.Trigger,{disabled:j,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:border stg:border-border","stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground","stg:hover:bg-accent-hover stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50","stg:transition-colors stg:max-w-[20rem] stg:max-sm:max-w-[12rem]",E),children:[eA&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-muted-foreground",children:eA}),eA&&(0,t.jsx)("span",{className:"stg:shrink-0 stg:text-border","aria-hidden":!0,children:"·"}),(0,t.jsx)("span",{className:"stg:truncate",children:ew}),ev&&(0,t.jsxs)("span",{className:(0,s.cn)("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-0.5 stg:rounded-full stg:border stg:border-primary stg:px-1.5 stg:py-px","stg:text-[0.6rem] stg:font-medium stg:uppercase stg:tracking-wider stg:text-primary"),children:[(0,t.jsx)(b,{}),"Fast"]}),ey&&(0,t.jsx)("span",{className:(0,s.cn)("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-0.5 stg:rounded-full stg:border stg:border-primary stg:px-1.5 stg:py-px","stg:text-[0.6rem] stg:font-medium stg:uppercase stg:tracking-wider stg:text-primary"),children:"Thinking"}),(0,t.jsx)(p,{})]}),(0,t.jsx)(n.Popover.Portal,{container:I,children:(0,t.jsx)(n.Popover.Positioner,{sideOffset:4,children:(0,t.jsxs)(n.Popover.Popup,{role:"dialog","aria-label":"Model selector",className:(0,s.cn)("stg:z-popover stg:w-72 stg:rounded-lg stg:border stg:border-border stg:bg-popover stg:shadow-md","stg:text-popover-foreground"),children:[(0,t.jsxs)("div",{className:"stg:relative stg:flex stg:items-center stg:justify-between stg:border-b stg:border-border stg:px-3 stg:py-2",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:"Harness"}),(0,t.jsxs)("button",{type:"button","aria-haspopup":"listbox","aria-expanded":H,"aria-label":"Select harness",disabled:Z,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:border stg:border-border","stg:bg-background stg:px-2.5 stg:py-1.5 stg:text-xs stg:text-foreground","stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",Z?"stg:cursor-not-allowed stg:opacity-50":"stg:hover:bg-accent-hover"),onClick:()=>{Z||U(!H)},onKeyDown:e=>{"Escape"===e.key&&H&&(e.stopPropagation(),U(!1))},children:[(0,t.jsx)("span",{children:l.HARNESS_META[Y].label}),!Z&&(0,t.jsx)(p,{})]}),!Z&&H&&(0,t.jsx)("div",{role:"listbox","aria-label":"Available harnesses",className:(0,s.cn)("stg:absolute stg:right-3 stg:top-full stg:z-10 stg:mt-1 stg:overflow-hidden stg:rounded-md stg:border stg:border-border","stg:bg-popover stg:shadow-md"),children:es.map(e=>{let r=e===Y;return(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":r,className:(0,s.cn)("stg:flex stg:w-full stg:items-center stg:gap-2 stg:px-2.5 stg:py-1.5 stg:text-xs stg:transition-colors","stg:hover:bg-accent-hover",r&&"stg:font-medium"),onClick:()=>{eg(e),U(!1)},children:[(0,t.jsx)("span",{className:"stg:flex-1 stg:text-left",children:l.HARNESS_META[e].label}),r&&(0,t.jsx)(m,{className:"stg:shrink-0 stg:text-primary"})]},e)})})]}),eb&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:border-b stg:border-border stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:text-foreground",children:"Fast tier"}),(0,t.jsx)("span",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Faster responses at higher per-token rates"})]}),(0,t.jsx)(i.Switch,{checked:ev,onCheckedChange:e=>_?.(e?"fast":"standard"),"aria-label":"Fast tier"})]}),ex&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:border-b stg:border-border stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:text-foreground",children:"Thinking"}),(0,t.jsx)("span",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Extended reasoning; uses more output tokens"})]}),(0,t.jsx)(i.Switch,{checked:ey,onCheckedChange:e=>M?.(e?"enabled":"disabled"),"aria-label":"Thinking"})]}),(0,t.jsx)("div",{className:"stg:border-b stg:border-border stg:px-3 stg:py-1.5",children:(0,t.jsx)("input",{ref:er,role:"searchbox","aria-label":"Search models",placeholder:"Search models…",value:J,onChange:e=>Q(e.target.value),onKeyDown:em,className:(0,s.cn)("stg:w-full stg:bg-transparent stg:text-xs stg:text-foreground stg:placeholder:text-muted-foreground","stg:outline-none")})}),(0,t.jsxs)("div",{ref:en,role:"listbox","aria-label":"Available models",className:"stg:max-h-72 stg:overflow-y-auto stg:p-1",children:[0===eu.length&&O&&(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-center stg:gap-2 stg:px-2 stg:py-3",children:[(0,t.jsx)("div",{className:"stg:size-3 stg:animate-spin stg:rounded-full stg:border stg:border-muted stg:border-t-primary"}),(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:"Loading models…"})]}),0===eu.length&&!O&&null!=D&&(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:items-center stg:gap-1.5 stg:px-2 stg:py-3",children:[(0,t.jsx)("span",{className:"stg:text-xs stg:text-muted-foreground",children:"Failed to load models"}),(0,t.jsx)("button",{type:"button",className:(0,s.cn)("stg:rounded-md stg:border stg:border-border stg:bg-background stg:px-2.5 stg:py-1 stg:text-xs stg:text-foreground","stg:hover:bg-accent-hover stg:transition-colors stg:cursor-pointer"),onClick:P,children:"Retry"})]}),0===eu.length&&!O&&null==D&&(0,t.jsx)("div",{className:"stg:px-2 stg:py-3 stg:text-center stg:text-xs stg:text-muted-foreground",children:"No models found"}),ed?Array.from(ed.entries()).map(([e,r])=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"stg:px-2 stg:pb-0.5 stg:pt-2 stg:text-[0.6rem] stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:e}),r.map(e=>(0,t.jsx)(h,{model:e,isSelected:e.modelId===ea?.modelId,showDescription:!1,showSpeedBadge:A,onClick:()=>eh(e)},e.modelId))]},e)):eu.map((e,r)=>(0,t.jsx)(h,{model:e,isSelected:e.modelId===ea?.modelId,isHighlighted:r===ee,showDescription:S&&!C&&!ei&&!$,showSpeedBadge:A,onClick:()=>eh(e),onMouseEnter:()=>et(r)},e.modelId)),ef&&(0,t.jsx)("button",{type:"button",className:(0,s.cn)("stg:mt-1 stg:flex stg:w-full stg:items-center stg:justify-center stg:rounded-md stg:border stg:border-dashed stg:border-border","stg:px-2 stg:py-1.5 stg:text-xs stg:text-muted-foreground","stg:hover:bg-accent-hover stg:hover:text-foreground stg:transition-colors stg:cursor-pointer"),onClick:()=>q(!0),children:"Show all models"})]})]})})})]})}])},526025,e=>{"use strict";e.s(["channelSessionExternalUserKey",0,function(e){return e?.metadata?.labels?.["stigmer.ai/channel-external-user-key"]},"isChannelOriginSession",0,function(e){return!!e?.metadata?.labels?.["stigmer.ai/channel-id"]}])},640524,e=>{"use strict";let t=(0,e.i(475254).default)("workflow",[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]]);e.s(["Workflow",0,t],640524)},615987,e=>{"use strict";var t=e.i(586108),r=e.i(583093);e.s(["useMyIdentityAccount",0,function(e){let n=(0,t.useStigmer)(),s=e?.enabled??!0,{data:a,isLoading:i,isRefetching:o,error:l,refetch:c}=(0,r.useFetch)(s?()=>n.identityAccount.whoAmI():null,[n,s],null,{cacheKey:s?"identity-account:me":void 0});return{account:a,isLoading:i,isRefetching:o,error:l,refetch:c}}])},223945,e=>{"use strict";let t=(0,e.i(475254).default)("store",[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]]);e.s(["Store",0,t],223945)},230374,e=>{"use strict";var t=e.i(271645),r=e.i(472402);e.s(["useDeploymentMode",0,function(e){let[n,s]=(0,t.useState)(()=>({mode:function(){try{let e=new URL((0,r.getApiBaseUrl)()).hostname;if("localhost"===e||"127.0.0.1"===e||"::1"===e)return"local"}catch{return"local"}return"cloud"}(),resolved:!1})),a=(0,t.useMemo)(()=>e,[e]);return(0,t.useEffect)(()=>{if(!a)return;let e=!1;return a.platform.getServerInfo().then(t=>{e||s({mode:t.deploymentMode,resolved:!0})},()=>{e||s(e=>({mode:e.mode,resolved:!0}))}),()=>{e=!0}},[a]),n}])},21218,e=>{"use strict";let t=(0,e.i(475254).default)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);e.s(["Activity",0,t],21218)},607486,e=>{"use strict";let t=(0,e.i(475254).default)("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);e.s(["Building2",0,t],607486)},20753,e=>{"use strict";var t=e.i(271645),r=e.i(981922),n=e.i(21218),s=e.i(475254);let a=(0,s.default)("app-window",[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]),i=(0,s.default)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),o=(0,s.default)("box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]),l=(0,s.default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);var c=e.i(607486);let u=(0,s.default)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var d=e.i(465261);let g=(0,s.default)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var h=e.i(686311);let p=(0,s.default)("mouse-pointer-click",[["path",{d:"M14 4.1 12 6",key:"ita8i4"}],["path",{d:"m5.1 8-2.9-.8",key:"1go3kf"}],["path",{d:"m6 12-1.9 2",key:"mnht97"}],["path",{d:"M7.2 2.2 8 5.1",key:"1cfko1"}],["path",{d:"M9.037 9.69a.498.498 0 0 1 .653-.653l11 4.5a.5.5 0 0 1-.074.949l-4.349 1.041a1 1 0 0 0-.74.739l-1.04 4.35a.5.5 0 0 1-.95.074z",key:"s0h3yz"}]]),m=(0,s.default)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]),f=(0,s.default)("scale",[["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"m19 8 3 8a5 5 0 0 1-6 0zV7",key:"zcdpyk"}],["path",{d:"M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1",key:"1yorad"}],["path",{d:"m5 8 3 8a5 5 0 0 1-6 0zV7",key:"eua70x"}],["path",{d:"M7 21h10",key:"1b0cd5"}]]),b=(0,s.default)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var v=e.i(649582);let x=(0,s.default)("user-cog",[["path",{d:"M10 15H6a4 4 0 0 0-4 4v2",key:"1nfge6"}],["path",{d:"m14.305 16.53.923-.382",key:"1itpsq"}],["path",{d:"m15.228 13.852-.923-.383",key:"eplpkm"}],["path",{d:"m16.852 12.228-.383-.923",key:"13v3q0"}],["path",{d:"m16.852 17.772-.383.924",key:"1i8mnm"}],["path",{d:"m19.148 12.228.383-.923",key:"1q8j1v"}],["path",{d:"m19.53 18.696-.382-.924",key:"vk1qj3"}],["path",{d:"m20.772 13.852.924-.383",key:"n880s0"}],["path",{d:"m20.772 16.148.924.383",key:"1g6xey"}],["circle",{cx:"18",cy:"15",r:"3",key:"gjjjvw"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),y=(0,s.default)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]]),k=[{label:"Organization",description:"Manage your team, organization identity, and identity providers.",items:[{href:"/settings/org-profile",label:"Org Profile",icon:c.Building2},{href:"/settings/org-preferences",label:"Preferences",icon:v.SlidersHorizontal},{href:"/settings/members",label:"Members",icon:y},{href:"/settings/invitations",label:"Invitations",icon:g},{href:"/settings/identity-providers",label:"Identity Providers",icon:b}]},{label:"Configuration",description:"API keys, environment variables, and OAuth app credentials for your integrations.",items:[{href:"/settings/api-keys",label:"API Keys",icon:d.KeyRound},{href:"/settings/platform-clients",label:"Platform Clients",icon:m},{href:"/settings/environments",label:"Environments",icon:o},{href:"/settings/oauth-apps",label:"OAuth Apps",icon:a},{href:"/settings/channel-apps",label:"Channel Apps",icon:h.MessageSquare}]},{label:"Billing & Usage",description:"Credit management and usage metrics.",items:[{href:"/settings/billing",label:"Billing",icon:u},{href:"/settings/usage",label:"Usage",icon:i}]},{label:"Account",description:"Personal settings that apply to you across the platform.",items:[{href:"/settings/account-preferences",label:"Preferences",icon:x},{href:"/settings/memory",label:"Memory",icon:l}]}],w={label:"Platform",description:"Stigmer-internal operations. Visible to platform operators only.",items:[{href:"/settings/pricing-governance",label:"Pricing Governance",icon:f,requiredPermission:"can_manage_model_pricing"},{href:"/settings/cursor-accounts",label:"Cursor Accounts",icon:p,requiredPermission:"can_manage_cursor_accounts"},{href:"/settings/provider-standing",label:"Provider Standing",icon:n.Activity,requiredPermission:"can_view_provider_standing"}]},A={kind:"platform",id:"stigmer"};e.s(["useSettingsNavGroups",0,function(){let e=(0,r.useCheckPermission)(A,"can_manage_model_pricing",{fail:"closed"}),n=(0,r.useCheckPermission)(A,"can_manage_cursor_accounts",{fail:"closed"}),s=(0,r.useCheckPermission)(A,"can_view_provider_standing",{fail:"closed"}),a=e.allowed,i=n.allowed,o=s.allowed;return(0,t.useMemo)(()=>{let e={can_manage_model_pricing:a,can_manage_cursor_accounts:i,can_view_provider_standing:o},t=w.items.filter(t=>void 0!==t.requiredPermission&&!0===e[t.requiredPermission]);return 0===t.length?k:[...k,{...w,items:t}]},[a,i,o])}],20753)},781195,e=>{e.v(t=>Promise.all(["static/chunks/033ax6lji-tes.js","static/chunks/0cu7jpps89qek.js"].map(t=>e.l(t))).then(()=>t(791738)))},769781,e=>{e.v(t=>Promise.all(["static/chunks/06huuay3x3z07.js"].map(t=>e.l(t))).then(()=>t(347442)))},321591,e=>{e.v(t=>Promise.all(["static/chunks/01.9x7hzkgv7j.js"].map(t=>e.l(t))).then(()=>t(236863)))},695802,e=>{e.v(t=>Promise.all(["static/chunks/0hhe78mplcj67.js","static/chunks/0hq~c-~dp2g~1.js","static/chunks/15wc.2zpsy4wc.js","static/chunks/06o.rsm2b~dht.js","static/chunks/0_mhv9_2_g.-d.js","static/chunks/0lp.du_t-~cqs.js","static/chunks/0ed3hfv95qark.js","static/chunks/03v0v690_bw8u.js"].map(t=>e.l(t))).then(()=>t(876913)))},714587,e=>{e.v(t=>Promise.all(["static/chunks/0jxlubusvmdjm.js"].map(t=>e.l(t))).then(()=>t(777094)))}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,658653,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),l=e.i(468806),a=e.i(869803),i=e.i(846696),n=e.i(774079),o=e.i(901501),c=e.i(864652),d=e.i(586108),g=e.i(326283);let u=(0,s.lazy)(()=>e.A(573374).then(e=>({default:e.YamlEditor})));function m(){return(0,t.jsx)("div",{className:"stg:flex stg:h-56 stg:items-center stg:justify-center stg:rounded-md stg:border stg:border-border stg:bg-muted stg:text-sm stg:text-muted-foreground",children:"Loading editor…"})}function p({entry:e}){return(0,t.jsxs)("li",{className:"stg:rounded-md stg:border stg:border-border stg:bg-card stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:inline-flex stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium stg:text-muted-foreground",children:e.document.handler.displayName}),(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:e.document.name}),(0,t.jsx)(h,{entry:e}),(0,t.jsx)("span",{className:"stg:ml-auto stg:text-xs stg:text-muted-foreground",children:e.document.org})]}),e.document.warning&&(0,t.jsx)("p",{className:"stg:mt-1 stg:text-xs stg:text-muted-foreground",children:e.document.warning}),"failed"===e.status&&e.errorMessage&&(0,t.jsx)("p",{role:"alert",className:"stg:mt-1 stg:text-xs stg:text-destructive",children:e.errorMessage})]})}function h({entry:e}){let s=function(e){switch(e.status){case"applying":return"Applying…";case"applied":return"Applied";case"failed":return"Failed";case"skipped":return"Skipped";case"pending":switch(e.action){case"create":return"Will create";case"update":return"Will update";case"unknown":return"Create or update"}}}(e);return(0,t.jsx)("span",{className:(0,r.cn)("stg:inline-flex stg:rounded stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium","failed"===e.status?"stg:bg-card stg:text-destructive stg:border stg:border-destructive":"stg:bg-muted stg:text-muted-foreground"),children:s})}e.s(["ApplyManifestDialog",0,function({open:e,onOpenChange:h,org:f,onApplied:x}){var b;let y=(0,s.useRef)(null),v=function(e){let t=(0,d.useStigmer)(),[r,l]=(0,s.useState)(""),[a,i]=(0,s.useState)(null),[n,u]=(0,s.useState)(null),[m,p]=(0,s.useState)(!1),[h,f]=(0,s.useState)(!1),x=(0,s.useRef)(e);x.current=e;let b=(0,s.useCallback)(e=>{l(e)},[]),y=(0,s.useCallback)(async e=>{let t;try{t=await e.text()}catch{l(""),i(null),u(`Failed to read ${e.name}.`);return}l(t)},[]),v=(0,s.useCallback)(()=>{l(""),i(null),u(null),p(!1),f(!1)},[]),k=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(h)return;let e=++k.current;if(!r.trim()){i(null),u(null),p(!1);return}p(!0);let s=setTimeout(async()=>{let s;try{s=(0,c.parseManifest)(r,{org:x.current})}catch(t){k.current===e&&(i(null),u((0,g.toError)(t).message),p(!1));return}let l=await Promise.all(s.map(async e=>{let s;try{let r=await t.manifest.getByReference(e.handler.yamlKind,e.org,e.slug);s=null!==r?"update":"create"}catch{s="unknown"}return{document:e,action:s,status:"pending"}}));k.current===e&&(i(l),u(null),p(!1))},500);return()=>clearTimeout(s)},[r,t,h]);let j=(0,s.useCallback)(async()=>{if(!a||0===a.length)return[];k.current++,f(!0);let e=a.map(e=>({...e,status:"pending"})),s=()=>i([...e]),r=!1;for(let l=0;l<e.length;l++){if(r){e[l]={...e[l],status:"skipped"};continue}e[l]={...e[l],status:"applying"},s();try{let s=await t.manifest.apply(e[l].document);e[l]={...e[l],status:"applied",result:s}}catch(t){e[l]={...e[l],status:"failed",errorMessage:(0,g.toError)(t).message},r=!0}s()}return s(),f(!1),e},[a,t]),N=(0,s.useMemo)(()=>(0,o.containsRedactedSecrets)(r),[r]);return(0,s.useMemo)(()=>({content:r,setContent:b,readFile:y,entries:a,validationError:n,isValidating:m,hasRedactedSecrets:N,applyAll:j,isApplying:h,reset:v}),[r,b,y,a,n,m,N,j,h,v])}(f),{reset:k}=v;(0,s.useEffect)(()=>{e&&(k(),y.current&&(y.current.value=""))},[e,k]);let j=(0,s.useCallback)(()=>{h(!1);let e=(v.entries??[]).filter(e=>"applied"===e.status);e.length>0&&x?.(e)},[h,v.entries,x]),N=(0,s.useCallback)(e=>{e||j()},[j]),w=(0,s.useCallback)(e=>{let t=e.target.files?.[0];t&&v.readFile(t)},[v]),C=(0,s.useCallback)(async()=>{let e=await v.applyAll(),t=e.filter(e=>"applied"===e.status);e.length>0&&t.length===e.length&&(i.toast.success(1===t.length?"Resource applied":`${t.length} resources applied`),h(!1),x?.(t))},[v,h,x]),S=null!==v.entries&&v.entries.length>0&&!v.isValidating&&!v.isApplying;return(0,t.jsx)(l.DialogShell,{open:e,onOpenChange:N,width:"3xl","aria-label":"Apply YAML",children:(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-4 stg:p-6",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsx)("h3",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Apply YAML"}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:"Paste a resource manifest or upload a file. Resources are created when new and updated when they already exist."})]}),(0,t.jsx)("input",{ref:y,type:"file",accept:".yaml,.yml,.json",onChange:w,className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-3 stg:py-2 stg:text-sm stg:text-foreground","stg:file:mr-3 stg:file:rounded-md stg:file:border-0 stg:file:bg-primary stg:file:px-2.5 stg:file:py-1 stg:file:text-xs stg:file:font-medium stg:file:text-primary-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),"aria-label":"Select manifest file"}),(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(m,{}),children:(0,t.jsx)(u,{value:v.content,onChange:v.setContent,className:"stg:h-56"})}),v.hasRedactedSecrets&&(0,t.jsx)(n.RedactedSecretsNotice,{}),v.validationError&&(0,t.jsx)("div",{role:"alert",className:"stg:rounded-md stg:border stg:border-destructive stg:bg-card stg:px-3 stg:py-2.5 stg:text-sm stg:text-destructive",children:v.validationError}),v.entries&&v.entries.length>0&&(0,t.jsx)("ul",{className:(0,r.cn)(a.UNSTYLED_LIST,"stg:flex stg:max-h-48 stg:flex-col stg:gap-2 stg:overflow-y-auto"),"aria-label":"Resources to apply",children:v.entries.map((e,s)=>(0,t.jsx)(p,{entry:e},`${e.document.handler.yamlKind}/${e.document.org}/${e.document.slug}/${s}`))}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground","aria-live":"polite",children:v.isValidating?"Validating…":""}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:j,disabled:v.isApplying,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:border stg:border-input stg:bg-background stg:text-foreground","stg:hover:bg-accent stg:hover:text-accent-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:C,disabled:!S,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:v.isApplying?"Applying…":(b=v.entries?.length??0)<=1?"Apply":`Apply ${b} resources`})]})]})]})})}],658653)},531245,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],531245)},618393,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],618393)},961888,e=>{"use strict";let t=(0,e.i(475254).default)("blocks",[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]]);e.s(["Blocks",0,t],961888)},283086,e=>{"use strict";let t=(0,e.i(475254).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],283086)},959208,437632,e=>{"use strict";let t=(0,e.i(475254).default)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["CalendarClock",0,t],959208);var s=e.i(891287),r=e.i(695682);async function l(e,t,a={}){let i=a.size&&a.size>0?a.size:20,n=a.num&&a.num>0?a.num:1,o=await e.schedule.list((0,s.create)(r.ListSchedulesRequestSchema,{org:t,pageInfo:{num:n,size:i}}));return{items:o.items.length>i?o.items.slice((n-1)*i,n*i):o.items,totalCount:o.totalCount,totalPages:Math.ceil(o.totalCount/i)}}e.s(["createScheduleListFn",0,function(e){return async t=>{let{items:s,totalCount:r,totalPages:a}=await l(e,t.org,t.page??{});return{entries:s,totalCount:r,totalPages:a}}}],437632)},774764,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(522016),l=e.i(618566),a=e.i(961888),i=e.i(531245),n=e.i(959208),o=e.i(862749),c=e.i(107233),d=e.i(283086),g=e.i(618393),u=e.i(640524),m=e.i(506213),p=e.i(893976),h=e.i(658653),f=e.i(586108),x=e.i(583093);function b(e,t,s){let r=s?.query,l=s?.scope??"org",a=s?.refetchToken,{data:i,isLoading:n,isRefetching:o,error:c,refetch:d}=(0,x.useFetch)(t?async()=>(await e({org:t,query:r||void 0,excludePublic:!1,crossOrgPublic:"all"===l,page:{num:1,size:1}})).totalCount:null,[e,t,r,l,a],void 0);return{count:i,isLoading:n,isRefetching:o,error:c,refetch:d}}var y=e.i(437632);function v({icon:e,label:s,count:r,isLoading:l=!1,href:a,onClick:i,className:n}){let o=l&&void 0===r,c=(0,p.cn)("stg:flex stg:flex-col stg:rounded-lg stg:border stg:border-border stg:bg-card stg:p-4 stg:text-left stg:no-underline",(!!a||!!i)&&["stg:cursor-pointer stg:transition-colors stg:hover:bg-accent-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"],n),d=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"stg:text-muted-foreground",children:e}),o?(0,t.jsx)("div",{className:"stg:mt-3 stg:h-7 stg:w-12 stg:animate-pulse stg:rounded stg:bg-muted","aria-hidden":"true"}):(0,t.jsx)("div",{className:"stg:mt-3 stg:text-2xl stg:font-semibold stg:tabular-nums stg:text-foreground",children:void 0!==r?r.toLocaleString():"—"}),(0,t.jsx)("div",{className:"stg:mt-1 stg:text-sm stg:text-muted-foreground",children:s})]});return a?(0,t.jsx)("a",{href:a,onClick:i,"aria-label":k(s,r,l),className:c,children:d}):i?(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":k(s,r,l),className:c,children:d}):(0,t.jsx)("div",{className:c,children:d})}function k(e,t,s){return void 0!==t?`${e}: ${t.toLocaleString()}`:s?`${e}: loading`:e}var j=e.i(297629);let N=[{key:"agents",label:"Agents",href:"/library/agents",icon:(0,t.jsx)(i.Bot,{className:"size-5","aria-hidden":"true"})},{key:"workflows",label:"Workflows",href:"/library/workflows",icon:(0,t.jsx)(u.Workflow,{className:"size-5","aria-hidden":"true"})},{key:"skills",label:"Skills",href:"/library/skills",icon:(0,t.jsx)(d.Sparkles,{className:"size-5","aria-hidden":"true"})},{key:"mcp-servers",label:"MCP Servers",href:"/library/mcp-servers",icon:(0,t.jsx)(g.Server,{className:"size-5","aria-hidden":"true"})},{key:"schedules",label:"Schedules",href:"/library/schedules",icon:(0,t.jsx)(n.CalendarClock,{className:"size-5","aria-hidden":"true"})},{key:"plugins",label:"Plugins",href:"/library/plugins",icon:(0,t.jsx)(a.Blocks,{className:"size-5","aria-hidden":"true"})}],w=[{label:"Agent",icon:(0,t.jsx)(i.Bot,{className:"size-4","aria-hidden":"true"}),href:"/library/agents/new"},{label:"Workflow",icon:(0,t.jsx)(u.Workflow,{className:"size-4","aria-hidden":"true"}),href:"/library/workflows/new"},{label:"Skill",icon:(0,t.jsx)(d.Sparkles,{className:"size-4","aria-hidden":"true"}),href:"/library/skills/new"},{label:"MCP Server",icon:(0,t.jsx)(g.Server,{className:"size-4","aria-hidden":"true"}),href:"/library/mcp-servers/new"},{label:"Schedule",icon:(0,t.jsx)(n.CalendarClock,{className:"size-4","aria-hidden":"true"}),href:"/library/schedules/new"},{label:"Install plugin",icon:(0,t.jsx)(a.Blocks,{className:"size-4","aria-hidden":"true"}),href:"/library/plugins/install"}];function C(){let[e,l]=(0,s.useState)(!1);return(0,t.jsxs)(m.Popover.Root,{open:e,onOpenChange:l,children:[(0,t.jsxs)(m.Popover.Trigger,{className:(0,p.cn)("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Add a new resource",children:[(0,t.jsx)(c.Plus,{className:"size-3.5","aria-hidden":"true"}),"Add"]}),(0,t.jsx)(m.Popover.Portal,{children:(0,t.jsx)(m.Popover.Positioner,{sideOffset:4,align:"start",children:(0,t.jsx)(m.Popover.Popup,{className:(0,p.cn)("z-popover min-w-[10rem] overflow-hidden rounded-lg","border border-border bg-popover shadow-md text-popover-foreground"),children:(0,t.jsx)("div",{className:"py-1",role:"menu",children:w.map(e=>(0,t.jsxs)(r.default,{href:e.href,role:"menuitem",onClick:()=>l(!1),className:(0,p.cn)("flex w-full items-center gap-2.5 px-3 py-2 text-sm","text-foreground transition-colors hover:bg-accent"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground",children:e.icon}),(0,t.jsx)("span",{children:e.label})]},e.label))})})})})]})}e.s(["LibraryLanding",0,function(){var e,r,a,i,n,c,d;let g,u,m,x,k,w,S,M,A,z,P=(0,j.useActiveOrgSlug)(),T=(0,l.useRouter)(),[R,L]=(0,s.useReducer)(e=>e+1,0),B=(e=P||null,r={refetchToken:R},g=(0,f.useStigmer)(),u=b((0,s.useCallback)(e=>g.agent.list(e),[g]),e,r),a={refetchToken:R},m=(0,f.useStigmer)(),x=b((0,s.useCallback)(e=>m.workflow.list(e),[m]),e,a),i={refetchToken:R},k=(0,f.useStigmer)(),w=b((0,s.useCallback)(e=>k.skill.list(e),[k]),e,i),n={refetchToken:R},S=(0,f.useStigmer)(),M=b((0,s.useCallback)(e=>S.mcpServer.list(e),[S]),e,n),c={refetchToken:R},A=(0,f.useStigmer)(),{agents:u,workflows:x,skills:w,"mcp-servers":M,schedules:b((0,s.useMemo)(()=>(0,y.createScheduleListFn)(A),[A]),e,{refetchToken:c?.refetchToken}),plugins:(d={refetchToken:R},z=(0,f.useStigmer)(),b((0,s.useCallback)(e=>z.plugin.list(e),[z]),e,d))}),[$,q]=(0,s.useState)(!1),F=(0,s.useCallback)(e=>t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button||(t.preventDefault(),T.push(e))},[T]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:"text-foreground mb-1 text-xl font-semibold",children:"Library"}),(0,t.jsx)("p",{className:"text-muted-foreground mb-8 text-sm",children:"Browse and manage your agents, workflows, skills, and MCP servers."}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:N.map(e=>{let{count:s,isLoading:r}=B[e.key];return(0,t.jsx)(v,{icon:e.icon,label:e.label,count:s,isLoading:r,href:e.href,onClick:F(e.href)},e.key)})}),(0,t.jsxs)("div",{className:"mt-6 flex items-center gap-2",children:[(0,t.jsx)(C,{}),(0,t.jsxs)("button",{type:"button",onClick:()=>q(!0),className:(0,p.cn)("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[(0,t.jsx)(o.FileCode2,{className:"size-3.5","aria-hidden":"true"}),"Apply YAML"]})]}),(0,t.jsx)(h.ApplyManifestDialog,{open:$,onOpenChange:q,org:P??"",onApplied:L})]})}],774764)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,658653,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),l=e.i(468806),a=e.i(869803),i=e.i(846696),n=e.i(774079),o=e.i(901501),c=e.i(864652),u=e.i(586108),g=e.i(326283);let d=(0,s.lazy)(()=>e.A(573374).then(e=>({default:e.YamlEditor})));function p(){return(0,t.jsx)("div",{className:"stg:flex stg:h-56 stg:items-center stg:justify-center stg:rounded-md stg:border stg:border-border stg:bg-muted stg:text-sm stg:text-muted-foreground",children:"Loading editor…"})}function m({entry:e}){return(0,t.jsxs)("li",{className:"stg:rounded-md stg:border stg:border-border stg:bg-card stg:px-3 stg:py-2",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{className:"stg:inline-flex stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium stg:text-muted-foreground",children:e.document.handler.displayName}),(0,t.jsx)("span",{className:"stg:text-sm stg:font-medium stg:text-foreground",children:e.document.name}),(0,t.jsx)(h,{entry:e}),(0,t.jsx)("span",{className:"stg:ml-auto stg:text-xs stg:text-muted-foreground",children:e.document.org})]}),e.document.warning&&(0,t.jsx)("p",{className:"stg:mt-1 stg:text-xs stg:text-muted-foreground",children:e.document.warning}),"failed"===e.status&&e.errorMessage&&(0,t.jsx)("p",{role:"alert",className:"stg:mt-1 stg:text-xs stg:text-destructive",children:e.errorMessage})]})}function h({entry:e}){let s=function(e){switch(e.status){case"applying":return"Applying…";case"applied":return"Applied";case"failed":return"Failed";case"skipped":return"Skipped";case"pending":switch(e.action){case"create":return"Will create";case"update":return"Will update";case"unknown":return"Create or update"}}}(e);return(0,t.jsx)("span",{className:(0,r.cn)("stg:inline-flex stg:rounded stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium","failed"===e.status?"stg:bg-card stg:text-destructive stg:border stg:border-destructive":"stg:bg-muted stg:text-muted-foreground"),children:s})}e.s(["ApplyManifestDialog",0,function({open:e,onOpenChange:h,org:f,onApplied:x}){var b;let y=(0,s.useRef)(null),v=function(e){let t=(0,u.useStigmer)(),[r,l]=(0,s.useState)(""),[a,i]=(0,s.useState)(null),[n,d]=(0,s.useState)(null),[p,m]=(0,s.useState)(!1),[h,f]=(0,s.useState)(!1),x=(0,s.useRef)(e);x.current=e;let b=(0,s.useCallback)(e=>{l(e)},[]),y=(0,s.useCallback)(async e=>{let t;try{t=await e.text()}catch{l(""),i(null),d(`Failed to read ${e.name}.`);return}l(t)},[]),v=(0,s.useCallback)(()=>{l(""),i(null),d(null),m(!1),f(!1)},[]),k=(0,s.useRef)(0);(0,s.useEffect)(()=>{if(h)return;let e=++k.current;if(!r.trim()){i(null),d(null),m(!1);return}m(!0);let s=setTimeout(async()=>{let s;try{s=(0,c.parseManifest)(r,{org:x.current})}catch(t){k.current===e&&(i(null),d((0,g.toError)(t).message),m(!1));return}let l=await Promise.all(s.map(async e=>{let s;try{let r=await t.manifest.getByReference(e.handler.yamlKind,e.org,e.slug);s=null!==r?"update":"create"}catch{s="unknown"}return{document:e,action:s,status:"pending"}}));k.current===e&&(i(l),d(null),m(!1))},500);return()=>clearTimeout(s)},[r,t,h]);let j=(0,s.useCallback)(async()=>{if(!a||0===a.length)return[];k.current++,f(!0);let e=a.map(e=>({...e,status:"pending"})),s=()=>i([...e]),r=!1;for(let l=0;l<e.length;l++){if(r){e[l]={...e[l],status:"skipped"};continue}e[l]={...e[l],status:"applying"},s();try{let s=await t.manifest.apply(e[l].document);e[l]={...e[l],status:"applied",result:s}}catch(t){e[l]={...e[l],status:"failed",errorMessage:(0,g.toError)(t).message},r=!0}s()}return s(),f(!1),e},[a,t]),C=(0,s.useMemo)(()=>(0,o.containsRedactedSecrets)(r),[r]);return(0,s.useMemo)(()=>({content:r,setContent:b,readFile:y,entries:a,validationError:n,isValidating:p,hasRedactedSecrets:C,applyAll:j,isApplying:h,reset:v}),[r,b,y,a,n,p,C,j,h,v])}(f),{reset:k}=v;(0,s.useEffect)(()=>{e&&(k(),y.current&&(y.current.value=""))},[e,k]);let j=(0,s.useCallback)(()=>{h(!1);let e=(v.entries??[]).filter(e=>"applied"===e.status);e.length>0&&x?.(e)},[h,v.entries,x]),C=(0,s.useCallback)(e=>{e||j()},[j]),w=(0,s.useCallback)(e=>{let t=e.target.files?.[0];t&&v.readFile(t)},[v]),N=(0,s.useCallback)(async()=>{let e=await v.applyAll(),t=e.filter(e=>"applied"===e.status);e.length>0&&t.length===e.length&&(i.toast.success(1===t.length?"Resource applied":`${t.length} resources applied`),h(!1),x?.(t))},[v,h,x]),S=null!==v.entries&&v.entries.length>0&&!v.isValidating&&!v.isApplying;return(0,t.jsx)(l.DialogShell,{open:e,onOpenChange:C,width:"3xl","aria-label":"Apply YAML",children:(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-4 stg:p-6",children:[(0,t.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1",children:[(0,t.jsx)("h3",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Apply YAML"}),(0,t.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:"Paste a resource manifest or upload a file. Resources are created when new and updated when they already exist."})]}),(0,t.jsx)("input",{ref:y,type:"file",accept:".yaml,.yml,.json",onChange:w,className:(0,r.cn)("stg:w-full stg:rounded-md stg:border stg:border-input stg:bg-background stg:px-3 stg:py-2 stg:text-sm stg:text-foreground","stg:file:mr-3 stg:file:rounded-md stg:file:border-0 stg:file:bg-primary stg:file:px-2.5 stg:file:py-1 stg:file:text-xs stg:file:font-medium stg:file:text-primary-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),"aria-label":"Select manifest file"}),(0,t.jsx)(s.Suspense,{fallback:(0,t.jsx)(p,{}),children:(0,t.jsx)(d,{value:v.content,onChange:v.setContent,className:"stg:h-56"})}),v.hasRedactedSecrets&&(0,t.jsx)(n.RedactedSecretsNotice,{}),v.validationError&&(0,t.jsx)("div",{role:"alert",className:"stg:rounded-md stg:border stg:border-destructive stg:bg-card stg:px-3 stg:py-2.5 stg:text-sm stg:text-destructive",children:v.validationError}),v.entries&&v.entries.length>0&&(0,t.jsx)("ul",{className:(0,r.cn)(a.UNSTYLED_LIST,"stg:flex stg:max-h-48 stg:flex-col stg:gap-2 stg:overflow-y-auto"),"aria-label":"Resources to apply",children:v.entries.map((e,s)=>(0,t.jsx)(m,{entry:e},`${e.document.handler.yamlKind}/${e.document.org}/${e.document.slug}/${s}`))}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between stg:gap-3",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground","aria-live":"polite",children:v.isValidating?"Validating…":""}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,t.jsx)("button",{type:"button",onClick:j,disabled:v.isApplying,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:border stg:border-input stg:bg-background stg:text-foreground","stg:hover:bg-accent stg:hover:text-accent-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:N,disabled:!S,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:v.isApplying?"Applying…":(b=v.entries?.length??0)<=1?"Apply":`Apply ${b} resources`})]})]})]})})}],658653)},531245,e=>{"use strict";let t=(0,e.i(475254).default)("bot",[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]]);e.s(["Bot",0,t],531245)},618393,e=>{"use strict";let t=(0,e.i(475254).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],618393)},961888,e=>{"use strict";let t=(0,e.i(475254).default)("blocks",[["path",{d:"M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2",key:"1ah6g2"}],["rect",{x:"14",y:"2",width:"8",height:"8",rx:"1",key:"88lufb"}]]);e.s(["Blocks",0,t],961888)},283086,e=>{"use strict";let t=(0,e.i(475254).default)("sparkles",[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]]);e.s(["Sparkles",0,t],283086)},959208,437632,e=>{"use strict";let t=(0,e.i(475254).default)("calendar-clock",[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]]);e.s(["CalendarClock",0,t],959208);var s=e.i(891287),r=e.i(695682);async function l(e,t,a={}){let i=a.size&&a.size>0?a.size:20,n=a.num&&a.num>0?a.num:1,o=await e.schedule.list((0,s.create)(r.ListSchedulesRequestSchema,{org:t,pageInfo:{num:n,size:i}}));return{items:o.items.length>i?o.items.slice((n-1)*i,n*i):o.items,totalCount:o.totalCount,totalPages:Math.ceil(o.totalCount/i)}}e.s(["createScheduleListFn",0,function(e){return async t=>{let{items:s,totalCount:r,totalPages:a}=await l(e,t.org,t.page??{});return{entries:s,totalCount:r,totalPages:a}}}],437632)},524728,248747,e=>{"use strict";var t=e.i(271645),s=e.i(586108),r=e.i(583093);function l(e,t,s){let l=s?.query,a=s?.scope??"org",i=s?.refetchToken,{data:n,isLoading:o,isRefetching:c,error:u,refetch:g}=(0,r.useFetch)(t?async()=>(await e({org:t,query:l||void 0,excludePublic:!1,crossOrgPublic:"all"===a,page:{num:1,size:1}})).totalCount:null,[e,t,l,a,i],void 0);return{count:n,isLoading:o,isRefetching:c,error:u,refetch:g}}e.s(["useResourceCount",0,l],248747);let a={entries:[],totalCount:0,totalPages:0};e.s(["usePluginCount",0,function(e,r){let a=(0,s.useStigmer)();return l((0,t.useCallback)(e=>a.plugin.list(e),[a]),e,r)},"usePluginList",0,function(e,l){let i=(0,s.useStigmer)(),{entries:n,totalCount:o,totalPages:c,currentPage:u,isLoading:g,error:d,refetch:p}=function(e,t,s){let l=s?.pageSize??20,i=s?.page??1,n=s?.query,o=s?.scope??"org",{data:c,isLoading:u,isRefetching:g,error:d,refetch:p}=(0,r.useFetch)(t?async()=>{let s=await e({org:t,query:n||void 0,excludePublic:!1,crossOrgPublic:"all"===o,page:{num:i,size:l}});return{entries:[...s.entries],totalCount:s.totalCount,totalPages:s.totalPages}}:null,[e,t,n,o,i,l],a);return{entries:c.entries,totalCount:c.totalCount,totalPages:c.totalPages,currentPage:i,isLoading:u,isRefetching:g,error:d,refetch:p}}((0,t.useCallback)(e=>i.plugin.list(e),[i]),e,l);return{plugins:n,totalCount:o,totalPages:c,currentPage:u,isLoading:g,error:d,refetch:p}}],524728)},774764,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(522016),l=e.i(618566),a=e.i(961888),i=e.i(531245),n=e.i(959208),o=e.i(862749),c=e.i(107233),u=e.i(283086),g=e.i(618393),d=e.i(640524),p=e.i(506213),m=e.i(893976),h=e.i(658653),f=e.i(586108),x=e.i(248747),b=e.i(437632),y=e.i(524728);function v({icon:e,label:s,count:r,isLoading:l=!1,href:a,onClick:i,className:n}){let o=l&&void 0===r,c=(0,m.cn)("stg:flex stg:flex-col stg:rounded-lg stg:border stg:border-border stg:bg-card stg:p-4 stg:text-left stg:no-underline",(!!a||!!i)&&["stg:cursor-pointer stg:transition-colors stg:hover:bg-accent-hover","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"],n),u=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"stg:text-muted-foreground",children:e}),o?(0,t.jsx)("div",{className:"stg:mt-3 stg:h-7 stg:w-12 stg:animate-pulse stg:rounded stg:bg-muted","aria-hidden":"true"}):(0,t.jsx)("div",{className:"stg:mt-3 stg:text-2xl stg:font-semibold stg:tabular-nums stg:text-foreground",children:void 0!==r?r.toLocaleString():"—"}),(0,t.jsx)("div",{className:"stg:mt-1 stg:text-sm stg:text-muted-foreground",children:s})]});return a?(0,t.jsx)("a",{href:a,onClick:i,"aria-label":k(s,r,l),className:c,children:u}):i?(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":k(s,r,l),className:c,children:u}):(0,t.jsx)("div",{className:c,children:u})}function k(e,t,s){return void 0!==t?`${e}: ${t.toLocaleString()}`:s?`${e}: loading`:e}var j=e.i(297629);let C=[{key:"agents",label:"Agents",href:"/library/agents",icon:(0,t.jsx)(i.Bot,{className:"size-5","aria-hidden":"true"})},{key:"workflows",label:"Workflows",href:"/library/workflows",icon:(0,t.jsx)(d.Workflow,{className:"size-5","aria-hidden":"true"})},{key:"skills",label:"Skills",href:"/library/skills",icon:(0,t.jsx)(u.Sparkles,{className:"size-5","aria-hidden":"true"})},{key:"mcp-servers",label:"MCP Servers",href:"/library/mcp-servers",icon:(0,t.jsx)(g.Server,{className:"size-5","aria-hidden":"true"})},{key:"schedules",label:"Schedules",href:"/library/schedules",icon:(0,t.jsx)(n.CalendarClock,{className:"size-5","aria-hidden":"true"})},{key:"plugins",label:"Plugins",href:"/library/plugins",icon:(0,t.jsx)(a.Blocks,{className:"size-5","aria-hidden":"true"})}],w=[{label:"Agent",icon:(0,t.jsx)(i.Bot,{className:"size-4","aria-hidden":"true"}),href:"/library/agents/new"},{label:"Workflow",icon:(0,t.jsx)(d.Workflow,{className:"size-4","aria-hidden":"true"}),href:"/library/workflows/new"},{label:"Skill",icon:(0,t.jsx)(u.Sparkles,{className:"size-4","aria-hidden":"true"}),href:"/library/skills/new"},{label:"MCP Server",icon:(0,t.jsx)(g.Server,{className:"size-4","aria-hidden":"true"}),href:"/library/mcp-servers/new"},{label:"Schedule",icon:(0,t.jsx)(n.CalendarClock,{className:"size-4","aria-hidden":"true"}),href:"/library/schedules/new"},{label:"Upload plugin",icon:(0,t.jsx)(a.Blocks,{className:"size-4","aria-hidden":"true"}),href:"/library/plugins/upload"}];function N(){let[e,l]=(0,s.useState)(!1);return(0,t.jsxs)(p.Popover.Root,{open:e,onOpenChange:l,children:[(0,t.jsxs)(p.Popover.Trigger,{className:(0,m.cn)("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),"aria-label":"Add a new resource",children:[(0,t.jsx)(c.Plus,{className:"size-3.5","aria-hidden":"true"}),"Add"]}),(0,t.jsx)(p.Popover.Portal,{children:(0,t.jsx)(p.Popover.Positioner,{sideOffset:4,align:"start",children:(0,t.jsx)(p.Popover.Popup,{className:(0,m.cn)("z-popover min-w-[10rem] overflow-hidden rounded-lg","border border-border bg-popover shadow-md text-popover-foreground"),children:(0,t.jsx)("div",{className:"py-1",role:"menu",children:w.map(e=>(0,t.jsxs)(r.default,{href:e.href,role:"menuitem",onClick:()=>l(!1),className:(0,m.cn)("flex w-full items-center gap-2.5 px-3 py-2 text-sm","text-foreground transition-colors hover:bg-accent"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground",children:e.icon}),(0,t.jsx)("span",{children:e.label})]},e.label))})})})})]})}e.s(["LibraryLanding",0,function(){var e,r,a,i,n,c;let u,g,d,p,k,w,S,P,M,z,A,R,T,L,q=(0,j.useActiveOrgSlug)(),B=(0,l.useRouter)(),[F,$]=(0,s.useReducer)(e=>e+1,0),O=(e=q||null,r={refetchToken:F},u=(0,f.useStigmer)(),g=(0,s.useCallback)(e=>u.agent.list(e),[u]),d=(0,x.useResourceCount)(g,e,r),a={refetchToken:F},p=(0,f.useStigmer)(),k=(0,s.useCallback)(e=>p.workflow.list(e),[p]),w=(0,x.useResourceCount)(k,e,a),i={refetchToken:F},S=(0,f.useStigmer)(),P=(0,s.useCallback)(e=>S.skill.list(e),[S]),M=(0,x.useResourceCount)(P,e,i),n={refetchToken:F},z=(0,f.useStigmer)(),A=(0,s.useCallback)(e=>z.mcpServer.list(e),[z]),R=(0,x.useResourceCount)(A,e,n),c={refetchToken:F},T=(0,f.useStigmer)(),L=(0,s.useMemo)(()=>(0,b.createScheduleListFn)(T),[T]),{agents:d,workflows:w,skills:M,"mcp-servers":R,schedules:(0,x.useResourceCount)(L,e,{refetchToken:c?.refetchToken}),plugins:(0,y.usePluginCount)(e,{refetchToken:F})}),[E,K]=(0,s.useState)(!1),V=(0,s.useCallback)(e=>t=>{t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||0!==t.button||(t.preventDefault(),B.push(e))},[B]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("h1",{className:"text-foreground mb-1 text-xl font-semibold",children:"Library"}),(0,t.jsx)("p",{className:"text-muted-foreground mb-8 text-sm",children:"Browse and manage your agents, workflows, skills, and MCP servers."}),(0,t.jsx)("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",children:C.map(e=>{let{count:s,isLoading:r}=O[e.key];return(0,t.jsx)(v,{icon:e.icon,label:e.label,count:s,isLoading:r,href:e.href,onClick:V(e.href)},e.key)})}),(0,t.jsxs)("div",{className:"mt-6 flex items-center gap-2",children:[(0,t.jsx)(N,{}),(0,t.jsxs)("button",{type:"button",onClick:()=>K(!0),className:(0,m.cn)("inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm","text-muted-foreground transition-colors","hover:bg-accent hover:text-accent-foreground","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"),children:[(0,t.jsx)(o.FileCode2,{className:"size-3.5","aria-hidden":"true"}),"Apply YAML"]})]}),(0,t.jsx)(h.ApplyManifestDialog,{open:E,onOpenChange:K,org:q??"",onApplied:$})]})}],774764)}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,196716,e=>{"use strict";var t=e.i(910304),r=e.i(586108),n=e.i(583093);e.s(["useAgent",0,function(e,o){let s=(0,r.useStigmer)(),i=e&&o?async()=>{try{return await s.agent.getByReference({org:e,slug:o})}catch(e){if((0,t.isNotFound)(e))return null;throw e}}:null,{data:a,isLoading:d,isRefetching:l,error:h,refetch:u}=(0,n.useFetch)(i,[e,o,s],null);return{agent:a,isLoading:d,isRefetching:l,error:h,refetch:u}}])},59309,e=>{"use strict";var t=e.i(271645),r=e.i(155917),n=e.i(586108),o=e.i(326283),s=e.i(287237),i=e.i(159877),a=e.i(433732);e.s(["useCreateSession",0,function(){let e=(0,n.useStigmer)(),d=(0,a.useExecutionTarget)(),[l,h]=(0,t.useState)(!1),[u,c]=(0,t.useState)(null),g=(0,t.useCallback)(()=>c(null),[]);return{create:(0,t.useCallback)(async t=>{h(!0),c(null);try{let n;if(t.agentInstanceId)n=t.agentInstanceId;else if(t.agentRef){let r=await e.agent.getByReference(t.agentRef),o=r.status?.defaultInstanceId;if(!o)throw Error(`Agent "${t.agentRef.org}/${t.agentRef.slug}" does not have a default instance. Pass an explicit agentInstanceId instead.`);n=o}else throw Error("useCreateSession requires either agentInstanceId or agentRef. Provide one to specify which agent this session should use.");let o=t.executionTarget??d;return{sessionId:(await e.session.create({name:`session-${Date.now()}`,org:t.org,subject:t.subject??r.PENDING_SUBJECT,workspaceEntries:t.workspaceEntries,mcpServerUsages:t.mcpServerUsages,skillRefs:t.skillRefs,metadata:(0,r.mergeSessionContext)(t.metadata,t.sessionContext),agentInstanceId:n,harness:t.harness?(0,s.toProtoHarness)(t.harness):void 0,executionTarget:o?(0,i.toProtoExecutionTarget)(o):void 0})).metadata.id}}catch(e){throw c((0,o.toError)(e)),e}finally{h(!1)}},[e,d]),isCreating:l,error:u,clearError:g}}])},145995,e=>{"use strict";var t=e.i(661438);let r=/```ya?ml\s*\n([\s\S]*?)```/g;e.s(["extractWorkflowYaml",0,function(e){if(!e?.status?.messages?.length)return null;let n=e.status.messages;for(let e=n.length-1;e>=0;e--){let o=n[e];if(o.type!==t.MessageType.MESSAGE_AI)continue;let s=o.content;if(!s)continue;let i=function(e){let t,n=[],o=RegExp(r.source,"g");for(;null!==(t=o.exec(e));)t[1]&&n.push(t[1]);return n}(s);if(0===i.length)continue;let a=i[i.length-1],d=function(e,t){let r=e;for(let e of t){let t=RegExp("```ya?ml\\s*\\n"+e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"```","g");r=r.replace(t,"")}return r.split("\n").map(e=>e.trim()).filter(e=>e.length>0).join("\n")}(s,i);return{yaml:a.trim(),explanation:d.trim()}}return null}])},839329,154813,953520,e=>{"use strict";e.s(["WORKFLOW_ARCHITECT_RESPONSE_SCHEMA",0,{type:"object",properties:{action:{type:"string",enum:["generated_yaml","clarification","no_changes"]},yaml:{type:"string"},explanation:{type:"string"}},required:["action","explanation"]},"WORKFLOW_DIAGNOSIS_RESPONSE_SCHEMA",0,{type:"object",properties:{action:{type:"string",enum:["diagnosis","fix_yaml","clarification"]},diagnosis:{type:"string"},yaml:{type:"string"},explanation:{type:"string"}},required:["action","explanation"]}],839329);var t=e.i(271645),r=e.i(196716);let n="workflow-architect";e.s(["useWorkflowArchitect",0,function(e){let{agent:o,isLoading:s,error:i}=(0,r.useAgent)(e??null,n);return(0,t.useMemo)(()=>null!==o?{availability:"available",agent:o,error:null}:s?{availability:"loading",agent:null,error:null}:{availability:"absent",agent:null,error:i},[o,s,i])},"workflowArchitectRef",0,function(e){return{org:e,slug:n}}],154813),e.s(["computeUnifiedDiff",0,function(e,t){return(function(e,t){let r=e.length,n=t.length,o=r+n;if(0===o)return[];let s=new Int32Array(2*o+1);s.fill(-1);let i=[],a=e=>e+o;s[a(1)]=0;e:for(let d=0;d<=o;d++){i.push(s.slice());for(let o=-d;o<=d;o+=2){let i,l=(i=o===-d||o!==d&&s[a(o-1)]<s[a(o+1)]?s[a(o+1)]:s[a(o-1)]+1)-o;for(;i<r&&l<n&&e[i]===t[l];)i++,l++;if(s[a(o)]=i,i>=r&&l>=n)break e}}return function(e,t,r,n){let o=e=>e+n,s=[],i=t.length,a=r.length;for(let n=e.length-1;n>=0;n--){let d,l=e[n],h=i-a;d=h===-n||h!==n&&l[o(h-1)]<l[o(h+1)]?h+1:h-1;let u=l[o(d)],c=u-d;for(;i>u&&a>c;)i--,a--,s.push(["equal",t[i]]);n>0&&(i===u?(a--,s.push(["added",r[a]])):(i--,s.push(["removed",t[i]])))}return s.reverse()}(i,e,t,o)})(e.split("\n"),t.split("\n")).map(([e,t])=>({type:e,content:t}))}],953520)},575621,(e,t,r)=>{"use strict";function n(e,t){e[t]?e[t]++:e[t]=1}function o(e,t){--e[t]||delete e[t]}function s(e,t,r,n){var o=""+t,s=""+r;if(!e&&o>s){var i=o;o=s,s=i}return o+"\x01"+s+"\x01"+(void 0===n?"\0":n)}function i(e,t){return s(e,t.v,t.w,t.name)}t.exports=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,"directed")||e.directed,this._isMultigraph=!!Object.hasOwn(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.hasOwn(e,"compound")&&e.compound),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,"function"!=typeof e&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._in[t]).length)}sinks(){var e=this;return this.nodes().filter(t=>0===Object.keys(e._out[t]).length)}setNodes(e,t){var r=arguments,n=this;return e.forEach(function(e){r.length>1?n.setNode(e,t):n.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){var t=this;if(Object.hasOwn(this._nodes,e)){var r=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(function(e){t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(r),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(r),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(void 0===t)t="\0";else{t+="";for(var r=t;void 0!==r;r=this.parent(r))if(r===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e="\0"){if(this._isCompound){var t=this._children[e];if(t)return Object.keys(t)}else if("\0"===e)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return Object.keys(t)}successors(e){var t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){var t=this.predecessors(e);if(t){let n=new Set(t);for(var r of this.successors(e))n.add(r);return Array.from(n.values())}}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var r=this;Object.entries(this._nodes).forEach(function([r,n]){e(r)&&t.setNode(r,n)}),Object.values(this._edgeObjs).forEach(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,r.edge(e))});var n={};return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,function e(o){var s=r.parent(o);return void 0===s||t.hasNode(s)?(n[o]=s,s):s in n?n[s]:e(s)}(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,"function"!=typeof e&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){var r=this,n=arguments;return e.reduce(function(e,o){return n.length>1?r.setEdge(e,o,t):r.setEdge(e,o),o}),this}setEdge(){var e,t,r,o,i=!1,a=arguments[0];"object"==typeof a&&null!==a&&"v"in a?(e=a.v,t=a.w,r=a.name,2==arguments.length&&(o=arguments[1],i=!0)):(e=a,t=arguments[1],r=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,void 0!==r&&(r=""+r);var d=s(this._isDirected,e,t,r);if(Object.hasOwn(this._edgeLabels,d))return i&&(this._edgeLabels[d]=o),this;if(void 0!==r&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=i?o:this._defaultEdgeLabelFn(e,t,r);var l=function(e,t,r,n){var o=""+t,s=""+r;if(!e&&o>s){var i=o;o=s,s=i}var a={v:o,w:s};return n&&(a.name=n),a}(this._isDirected,e,t,r);return e=l.v,t=l.w,Object.freeze(l),this._edgeObjs[d]=l,n(this._preds[t],e),n(this._sucs[e],t),this._in[t][d]=l,this._out[e][d]=l,this._edgeCount++,this}edge(e,t,r){var n=1==arguments.length?i(this._isDirected,arguments[0]):s(this._isDirected,e,t,r);return this._edgeLabels[n]}edgeAsObj(){let e=this.edge(...arguments);return"object"!=typeof e?{label:e}:e}hasEdge(e,t,r){var n=1==arguments.length?i(this._isDirected,arguments[0]):s(this._isDirected,e,t,r);return Object.hasOwn(this._edgeLabels,n)}removeEdge(e,t,r){var n=1==arguments.length?i(this._isDirected,arguments[0]):s(this._isDirected,e,t,r),a=this._edgeObjs[n];return a&&(e=a.v,t=a.w,delete this._edgeLabels[n],delete this._edgeObjs[n],o(this._preds[t],e),o(this._sucs[e],t),delete this._in[t][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,t){var r=this._in[e];if(r){var n=Object.values(r);return t?n.filter(e=>e.v===t):n}}outEdges(e,t){var r=this._out[e];if(r){var n=Object.values(r);return t?n.filter(e=>e.w===t):n}}nodeEdges(e,t){var r=this.inEdges(e,t);if(r)return r.concat(this.outEdges(e,t))}}},595446,(e,t,r)=>{t.exports="2.2.4"},696950,(e,t,r)=>{t.exports={Graph:e.r(575621),version:e.r(595446)}},171636,(e,t,r)=>{var n=e.r(575621);t.exports={write:function(e){var t,r,n={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:(t=e).nodes().map(function(e){var r=t.node(e),n=t.parent(e),o={v:e};return void 0!==r&&(o.value=r),void 0!==n&&(o.parent=n),o}),edges:(r=e).edges().map(function(e){var t=r.edge(e),n={v:e.v,w:e.w};return void 0!==e.name&&(n.name=e.name),void 0!==t&&(n.value=t),n})};return void 0!==e.graph()&&(n.value=structuredClone(e.graph())),n},read:function(e){var t=new n(e.options).setGraph(e.value);return e.nodes.forEach(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)}),e.edges.forEach(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)}),t}}},316131,(e,t,r)=>{t.exports=function(e){var t,r={},n=[];return e.nodes().forEach(function(o){t=[],function n(o){Object.hasOwn(r,o)||(r[o]=!0,t.push(o),e.successors(o).forEach(n),e.predecessors(o).forEach(n))}(o),t.length&&n.push(t)}),n}},388532,(e,t,r)=>{t.exports=class{_arr=[];_keyIndices={};size(){return this._arr.length}keys(){return this._arr.map(function(e){return e.key})}has(e){return Object.hasOwn(this._keyIndices,e)}priority(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority}min(){if(0===this.size())throw Error("Queue underflow");return this._arr[0].key}add(e,t){var r=this._keyIndices;if(!Object.hasOwn(r,e=String(e))){var n=this._arr,o=n.length;return r[e]=o,n.push({key:e,priority:t}),this._decrease(o),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){var r=this._keyIndices[e];if(t>this._arr[r].priority)throw Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[r].priority+" New: "+t);this._arr[r].priority=t,this._decrease(r)}_heapify(e){var t=this._arr,r=2*e,n=r+1,o=e;r<t.length&&(o=t[r].priority<t[o].priority?r:o,n<t.length&&(o=t[n].priority<t[o].priority?n:o),o!==e&&(this._swap(e,o),this._heapify(o)))}_decrease(e){for(var t,r=this._arr,n=r[e].priority;0!==e&&!(r[t=e>>1].priority<n);)this._swap(e,t),e=t}_swap(e,t){var r=this._arr,n=this._keyIndices,o=r[e],s=r[t];r[e]=s,r[t]=o,n[s.key]=e,n[o.key]=t}}},28998,(e,t,r)=>{var n=e.r(388532);t.exports=function(e,t,r,s){return function(e,t,r,o){var s,i,a={},d=new n,l=function(e){var t=e.v!==s?e.v:e.w,n=a[t],o=r(e),l=i.distance+o;if(o<0)throw Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);l<n.distance&&(n.distance=l,n.predecessor=s,d.decrease(t,l))};for(e.nodes().forEach(function(e){var r=e===t?0:1/0;a[e]={distance:r},d.add(e,r)});d.size()>0&&(i=a[s=d.removeMin()]).distance!==1/0;)o(s).forEach(l);return a}(e,String(t),r||o,s||function(t){return e.outEdges(t)})};var o=()=>1},630492,(e,t,r)=>{var n=e.r(28998);t.exports=function(e,t,r){return e.nodes().reduce(function(o,s){return o[s]=n(e,s,t,r),o},{})}},892771,(e,t,r)=>{t.exports=function(e){var t=0,r=[],n={},o=[];return e.nodes().forEach(function(s){Object.hasOwn(n,s)||function s(i){var a=n[i]={onStack:!0,lowlink:t,index:t++};if(r.push(i),e.successors(i).forEach(function(e){Object.hasOwn(n,e)?n[e].onStack&&(a.lowlink=Math.min(a.lowlink,n[e].index)):(s(e),a.lowlink=Math.min(a.lowlink,n[e].lowlink))}),a.lowlink===a.index){var d,l=[];do n[d=r.pop()].onStack=!1,l.push(d);while(i!==d)o.push(l)}}(s)}),o}},548327,(e,t,r)=>{var n=e.r(892771);t.exports=function(e){return n(e).filter(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])})}},202975,(e,t,r)=>{t.exports=function(e,t,r){var o,s,i,a,d;return o=e,s=t||n,i=r||function(t){return e.outEdges(t)},a={},(d=o.nodes()).forEach(function(e){a[e]={},a[e][e]={distance:0},d.forEach(function(t){e!==t&&(a[e][t]={distance:1/0})}),i(e).forEach(function(t){var r=t.v===e?t.w:t.v,n=s(t);a[e][r]={distance:n,predecessor:e}})}),d.forEach(function(e){var t=a[e];d.forEach(function(r){var n=a[r];d.forEach(function(r){var o=n[e],s=t[r],i=n[r],a=o.distance+s.distance;a<i.distance&&(i.distance=a,i.predecessor=s.predecessor)})})}),a};var n=()=>1},348251,(e,t,r)=>{function n(e){var t={},r={},n=[];if(e.sinks().forEach(function s(i){if(Object.hasOwn(r,i))throw new o;Object.hasOwn(t,i)||(r[i]=!0,t[i]=!0,e.predecessors(i).forEach(s),delete r[i],n.push(i))}),Object.keys(t).length!==e.nodeCount())throw new o;return n}class o extends Error{constructor(){super(...arguments)}}t.exports=n,n.CycleException=o},200622,(e,t,r)=>{var n=e.r(348251);t.exports=function(e){try{n(e)}catch(e){if(e instanceof n.CycleException)return!1;throw e}return!0}},582493,(e,t,r)=>{function n(e,t,r,n){for(var o=[[e,!1]];o.length>0;){var i=o.pop();i[1]?n.push(i[0]):Object.hasOwn(r,i[0])||(r[i[0]]=!0,o.push([i[0],!0]),s(t(i[0]),e=>o.push([e,!1])))}}function o(e,t,r,n){for(var o=[e];o.length>0;){var i=o.pop();Object.hasOwn(r,i)||(r[i]=!0,n.push(i),s(t(i),e=>o.push(e)))}}function s(e,t){for(var r=e.length;r--;)t(e[r],r,e);return e}t.exports=function(e,t,r){Array.isArray(t)||(t=[t]);var s=e.isDirected()?t=>e.successors(t):t=>e.neighbors(t),i="post"===r?n:o,a=[],d={};return t.forEach(t=>{if(!e.hasNode(t))throw Error("Graph does not have node: "+t);i(t,s,d,a)}),a}},988994,(e,t,r)=>{var n=e.r(582493);t.exports=function(e,t){return n(e,t,"post")}},660947,(e,t,r)=>{var n=e.r(582493);t.exports=function(e,t){return n(e,t,"pre")}},358646,(e,t,r)=>{var n=e.r(575621),o=e.r(388532);t.exports=function(e,t){var r,s=new n,i={},a=new o;function d(e){var n=e.v===r?e.w:e.v,o=a.priority(n);if(void 0!==o){var s=t(e);s<o&&(i[n]=r,a.decrease(n,s))}}if(0===e.nodeCount())return s;e.nodes().forEach(function(e){a.add(e,1/0),s.setNode(e)}),a.decrease(e.nodes()[0],0);for(var l=!1;a.size()>0;){if(Object.hasOwn(i,r=a.removeMin()))s.setEdge(r,i[r]);else if(l)throw Error("Input graph is not connected: "+e);else l=!0;e.nodeEdges(r).forEach(d)}return s}},469527,(e,t,r)=>{t.exports={components:e.r(316131),dijkstra:e.r(28998),dijkstraAll:e.r(630492),findCycles:e.r(548327),floydWarshall:e.r(202975),isAcyclic:e.r(200622),postorder:e.r(988994),preorder:e.r(660947),prim:e.r(358646),tarjan:e.r(892771),topsort:e.r(348251)}},892353,(e,t,r)=>{var n=e.r(696950);t.exports={Graph:n.Graph,json:e.r(171636),alg:e.r(469527),version:n.version}},916370,(e,t,r)=>{function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function o(e,t){if("_next"!==e&&"_prev"!==e)return t}t.exports=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return n(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,r=t._prev;for(;r!==t;)e.push(JSON.stringify(r,o)),r=r._prev;return"["+e.join(", ")+"]"}}},850395,(e,t,r)=>{let n=e.r(892353).Graph,o=e.r(916370);t.exports=function(e,t){var r,d;let l,h,u,c,g;if(1>=e.nodeCount())return[];let f=(r=e,d=t||s,l=new n,h=0,u=0,r.nodes().forEach(e=>{l.setNode(e,{v:e,in:0,out:0})}),r.edges().forEach(e=>{let t=l.edge(e.v,e.w)||0,r=d(e);l.setEdge(e.v,e.w,t+r),u=Math.max(u,l.node(e.v).out+=r),h=Math.max(h,l.node(e.w).in+=r)}),c=(function(e){let t=[];for(let r=0;r<e;r++)t.push(r);return t})(u+h+3).map(()=>new o),g=h+1,l.nodes().forEach(e=>{a(c,g,l.node(e))}),{graph:l,buckets:c,zeroIdx:g});return(function(e,t,r){let n,o=[],s=t[t.length-1],a=t[0];for(;e.nodeCount();){for(;n=a.dequeue();)i(e,t,r,n);for(;n=s.dequeue();)i(e,t,r,n);if(e.nodeCount()){for(let s=t.length-2;s>0;--s)if(n=t[s].dequeue()){o=o.concat(i(e,t,r,n,!0));break}}}return o})(f.graph,f.buckets,f.zeroIdx).flatMap(t=>e.outEdges(t.v,t.w))};let s=()=>1;function i(e,t,r,n,o){let s=o?[]:void 0;return e.inEdges(n.v).forEach(n=>{let i=e.edge(n),d=e.node(n.v);o&&s.push({v:n.v,w:n.w}),d.out-=i,a(t,r,d)}),e.outEdges(n.v).forEach(n=>{let o=e.edge(n),s=n.w,i=e.node(s);i.in-=o,a(t,r,i)}),e.removeNode(n.v),s}function a(e,t,r){r.out?r.in?e[r.out-r.in+t].enqueue(r):e[e.length-1].enqueue(r):e[0].enqueue(r)}},698298,(e,t,r)=>{"use strict";let n=e.r(892353).Graph;function o(e,t,r,n){for(var o=n;e.hasNode(o);)o=d(n);return r.dummy=t,e.setNode(o,r),o}t.exports={addBorderNode:function(e,t,r,n){let s={width:0,height:0};return arguments.length>=4&&(s.rank=r,s.order=n),o(e,"border",s,t)},addDummyNode:o,applyWithChunking:s,asNonCompoundGraph:function(e){let t=new n({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(r=>{e.children(r).length||t.setNode(r,e.node(r))}),e.edges().forEach(r=>{t.setEdge(r,e.edge(r))}),t},buildLayerMatrix:function(e){let t=l(i(e)+1).map(()=>[]);return e.nodes().forEach(r=>{let n=e.node(r),o=n.rank;void 0!==o&&(t[o][n.order]=r)}),t},intersectRect:function(e,t){let r,n,o=e.x,s=e.y,i=t.x-o,a=t.y-s,d=e.width/2,l=e.height/2;if(!i&&!a)throw Error("Not possible to find intersection inside of the rectangle");return Math.abs(a)*d>Math.abs(i)*l?(a<0&&(l=-l),r=l*i/a,n=l):(i<0&&(d=-d),r=d,n=d*a/i),{x:o+r,y:s+n}},mapValues:function(e,t){let r=t;return"string"==typeof t&&(r=e=>e[t]),Object.entries(e).reduce((e,[t,n])=>(e[t]=r(n,t),e),{})},maxRank:i,normalizeRanks:function(e){let t=s(Math.min,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?Number.MAX_VALUE:r}));e.nodes().forEach(r=>{let n=e.node(r);Object.hasOwn(n,"rank")&&(n.rank-=t)})},notime:function(e,t){return t()},partition:function(e,t){let r={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?r.lhs.push(e):r.rhs.push(e)}),r},pick:function(e,t){let r={};for(let n of t)void 0!==e[n]&&(r[n]=e[n]);return r},predecessorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.inEdges(t).forEach(t=>{r[t.v]=(r[t.v]||0)+e.edge(t).weight}),r});return h(e.nodes(),t)},range:l,removeEmptyRanks:function(e){let t=s(Math.min,e.nodes().map(t=>e.node(t).rank)),r=[];e.nodes().forEach(n=>{let o=e.node(n).rank-t;r[o]||(r[o]=[]),r[o].push(n)});let n=0,o=e.graph().nodeRankFactor;Array.from(r).forEach((t,r)=>{void 0===t&&r%o!=0?--n:void 0!==t&&n&&t.forEach(t=>e.node(t).rank+=n)})},simplify:function(e){let t=new n().setGraph(e.graph());return e.nodes().forEach(r=>t.setNode(r,e.node(r))),e.edges().forEach(r=>{let n=t.edge(r.v,r.w)||{weight:0,minlen:1},o=e.edge(r);t.setEdge(r.v,r.w,{weight:n.weight+o.weight,minlen:Math.max(n.minlen,o.minlen)})}),t},successorWeights:function(e){let t=e.nodes().map(t=>{let r={};return e.outEdges(t).forEach(t=>{r[t.w]=(r[t.w]||0)+e.edge(t).weight}),r});return h(e.nodes(),t)},time:function(e,t){let r=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-r)+"ms")}},uniqueId:d,zipObject:h};function s(e,t){if(!(t.length>65535))return e.apply(null,t);{let r=function(e,t=65535){let r=[];for(let n=0;n<e.length;n+=t){let o=e.slice(n,n+t);r.push(o)}return r}(t);return e.apply(null,r.map(t=>e.apply(null,t)))}}function i(e){return s(Math.max,e.nodes().map(t=>{let r=e.node(t).rank;return void 0===r?5e-324:r}))}let a=0;function d(e){return e+""+ ++a}function l(e,t,r=1){null==t&&(t=e,e=0);let n=e=>e<t;r<0&&(n=e=>t<e);let o=[];for(let t=e;n(t);t+=r)o.push(t);return o}function h(e,t){return e.reduce((e,r,n)=>(e[r]=t[n],e),{})}},196218,(e,t,r)=>{"use strict";let n=e.r(850395),o=e.r(698298).uniqueId;t.exports={run:function(e){var t,r;let s,i,a;("greedy"===e.graph().acyclicer?n(e,(t=e,e=>t.edge(e).weight)):(s=[],i={},a={},(r=e).nodes().forEach(function e(t){Object.hasOwn(a,t)||(a[t]=!0,i[t]=!0,r.outEdges(t).forEach(t=>{Object.hasOwn(i,t.w)?s.push(t):e(t.w)}),delete i[t])}),s)).forEach(t=>{let r=e.edge(t);e.removeEdge(t),r.forwardName=t.name,r.reversed=!0,e.setEdge(t.w,t.v,r,o("rev"))})},undo:function(e){e.edges().forEach(t=>{let r=e.edge(t);if(r.reversed){e.removeEdge(t);let n=r.forwardName;delete r.reversed,delete r.forwardName,e.setEdge(t.w,t.v,r,n)}})}}},360908,(e,t,r)=>{"use strict";let n=e.r(698298);t.exports={run:function(e){e.graph().dummyChains=[],e.edges().forEach(t=>(function(e,t){let r,o,s,i=t.v,a=e.node(i).rank,d=t.w,l=e.node(d).rank,h=t.name,u=e.edge(t),c=u.labelRank;if(l!==a+1){for(e.removeEdge(t),s=0,++a;a<l;++s,++a)u.points=[],o={width:0,height:0,edgeLabel:u,edgeObj:t,rank:a},r=n.addDummyNode(e,"edge",o,"_d"),a===c&&(o.width=u.width,o.height=u.height,o.dummy="edge-label",o.labelpos=u.labelpos),e.setEdge(i,r,{weight:u.weight},h),0===s&&e.graph().dummyChains.push(r),i=r;e.setEdge(i,d,{weight:u.weight},h)}})(e,t))},undo:function(e){e.graph().dummyChains.forEach(t=>{let r,n=e.node(t),o=n.edgeLabel;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),"edge-label"===n.dummy&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)})}}},200570,(e,t,r)=>{"use strict";let{applyWithChunking:n}=e.r(698298);t.exports={longestPath:function(e){var t={};e.sources().forEach(function r(o){var s=e.node(o);if(Object.hasOwn(t,o))return s.rank;t[o]=!0;var i=n(Math.min,e.outEdges(o).map(t=>null==t?1/0:r(t.w)-e.edge(t).minlen));return i===1/0&&(i=0),s.rank=i})},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},348438,(e,t,r)=>{"use strict";var n=e.r(892353).Graph,o=e.r(200570).slack;t.exports=function(e){var t,r,s,i,a=new n({directed:!1}),d=e.nodes()[0],l=e.nodeCount();for(a.setNode(d,{});t=a,r=e,t.nodes().forEach(function e(n){r.nodeEdges(n).forEach(s=>{var i=s.v,a=n===i?s.w:i;t.hasNode(a)||o(r,s)||(t.setNode(a,{}),t.setEdge(n,a,{}),e(a))})}),t.nodeCount()<l;)s=function(e,t){return t.edges().reduce((r,n)=>{let s=1/0;return(e.hasNode(n.v)!==e.hasNode(n.w)&&(s=o(t,n)),s<r[0])?[s,n]:r},[1/0,null])[1]}(a,e),i=a.hasNode(s.v)?o(e,s):-o(e,s),function(e,t,r){e.nodes().forEach(e=>t.node(e).rank+=r)}(a,e,i);return a}},6654,(e,t,r)=>{"use strict";var n=e.r(348438),o=e.r(200570).slack,s=e.r(200570).longestPath,i=e.r(892353).alg.preorder,a=e.r(892353).alg.postorder,d=e.r(698298).simplify;function l(e){s(e=d(e));var t,r,o=n(e);for(c(o),h(o,e);t=g(o);)r=f(o,e,t),p(o,e,t,r)}function h(e,t){var r=a(e,e.nodes());(r=r.slice(0,r.length-1)).forEach(r=>{var n,o,s,i;return n=e,o=t,s=r,i=n.node(s).parent,void(n.edge(s,i).cutvalue=u(n,o,s))})}function u(e,t,r){var n=e.node(r).parent,o=!0,s=t.edge(r,n),i=0;return s||(o=!1,s=t.edge(n,r)),i=s.weight,t.nodeEdges(r).forEach(s=>{var a=s.v===r,d=a?s.w:s.v;if(d!==n){var l,h,u,c=a===o,g=t.edge(s).weight;if(i+=c?g:-g,l=e,h=r,u=d,l.hasEdge(h,u)){var f=e.edge(r,d).cutvalue;i+=c?-f:f}}}),i}function c(e,t){arguments.length<2&&(t=e.nodes()[0]),function e(t,r,n,o,s){var i=n,a=t.node(o);return r[o]=!0,t.neighbors(o).forEach(s=>{Object.hasOwn(r,s)||(n=e(t,r,n,s,o))}),a.low=i,a.lim=n++,s?a.parent=s:delete a.parent,n}(e,{},1,t)}function g(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function f(e,t,r){var n=r.v,s=r.w;t.hasEdge(n,s)||(n=r.w,s=r.v);var i=e.node(n),a=e.node(s),d=i,l=!1;return i.lim>a.lim&&(d=a,l=!0),t.edges().filter(t=>l===m(e,e.node(t.v),d)&&l!==m(e,e.node(t.w),d)).reduce((e,r)=>o(t,r)<o(t,e)?r:e)}function p(e,t,r,n){var o,s,a,d,l=r.v,u=r.w;e.removeEdge(l,u),e.setEdge(n.v,n.w,{}),c(e),h(e,t),o=e,s=t,a=o.nodes().find(e=>!s.node(e).parent),(d=(d=i(o,a)).slice(1)).forEach(e=>{var t=o.node(e).parent,r=s.edge(e,t),n=!1;r||(r=s.edge(t,e),n=!0),s.node(e).rank=s.node(t).rank+(n?r.minlen:-r.minlen)})}function m(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}t.exports=l,l.initLowLimValues=c,l.initCutValues=h,l.calcCutValue=u,l.leaveEdge=g,l.enterEdge=f,l.exchangeEdges=p},393534,(e,t,r)=>{"use strict";var n=e.r(200570).longestPath,o=e.r(348438),s=e.r(6654);t.exports=function(e){var t,r=e.graph().ranker;if(r instanceof Function)return r(e);switch(e.graph().ranker){case"network-simplex":default:s(e);break;case"tight-tree":n(t=e),o(t);break;case"longest-path":i(e);case"none":}};var i=n},284179,(e,t,r)=>{t.exports=function(e){var t;let r,n,o=(r={},n=0,(t=e).children().forEach(function e(o){let s=n;t.children(o).forEach(e),r[o]={low:s,lim:n++}}),r);e.graph().dummyChains.forEach(t=>{let r=e.node(t),n=r.edgeObj,s=function(e,t,r,n){let o,s,i=[],a=[],d=Math.min(t[r].low,t[n].low),l=Math.max(t[r].lim,t[n].lim);o=r;do i.push(o=e.parent(o));while(o&&(t[o].low>d||l>t[o].lim))for(s=o,o=n;(o=e.parent(o))!==s;)a.push(o);return{path:i.concat(a.reverse()),lca:s}}(e,o,n.v,n.w),i=s.path,a=s.lca,d=0,l=i[0],h=!0;for(;t!==n.w;){if(r=e.node(t),h){for(;(l=i[d])!==a&&e.node(l).maxRank<r.rank;)d++;l===a&&(h=!1)}if(!h){for(;d<i.length-1&&e.node(l=i[d+1]).minRank<=r.rank;)d++;l=i[d]}e.setParent(t,l),t=e.successors(t)[0]}})}},245128,(e,t,r)=>{let n=e.r(698298);t.exports={run:function(e){var t,r,o;let s=n.addDummyNode(e,"root",{},"_root"),i=(r={},(t=e).children().forEach(e=>(function e(n,o){var s=t.children(n);s&&s.length&&s.forEach(t=>e(t,o+1)),r[n]=o})(e,1)),r),a=Object.values(i),d=n.applyWithChunking(Math.max,a)-1,l=2*d+1;e.graph().nestingRoot=s,e.edges().forEach(t=>e.edge(t).minlen*=l);let h=(o=e).edges().reduce((e,t)=>e+o.edge(t).weight,0)+1;e.children().forEach(t=>(function e(t,r,o,s,i,a,d){let l=t.children(d);if(!l.length){d!==r&&t.setEdge(r,d,{weight:0,minlen:o});return}let h=n.addBorderNode(t,"_bt"),u=n.addBorderNode(t,"_bb"),c=t.node(d);t.setParent(h,d),c.borderTop=h,t.setParent(u,d),c.borderBottom=u,l.forEach(n=>{e(t,r,o,s,i,a,n);let l=t.node(n),c=l.borderTop?l.borderTop:n,g=l.borderBottom?l.borderBottom:n,f=l.borderTop?s:2*s,p=c!==g?1:i-a[d]+1;t.setEdge(h,c,{weight:f,minlen:p,nestingEdge:!0}),t.setEdge(g,u,{weight:f,minlen:p,nestingEdge:!0})}),t.parent(d)||t.setEdge(r,h,{weight:0,minlen:i+a[d]})})(e,s,l,h,d,i,t)),e.graph().nodeRankFactor=l},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}}},436561,(e,t,r)=>{let n=e.r(698298);function o(e,t,r,o,s,i){let a=s[t][i-1],d=n.addDummyNode(e,"border",{width:0,height:0,rank:i,borderType:t},r);s[t][i]=d,e.setParent(d,o),a&&e.setEdge(a,d,{weight:1})}t.exports=function(e){e.children().forEach(function t(r){let n=e.children(r),s=e.node(r);if(n.length&&n.forEach(t),Object.hasOwn(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(let t=s.minRank,n=s.maxRank+1;t<n;++t)o(e,"borderLeft","_bl",r,s,t),o(e,"borderRight","_br",r,s,t)}})}},614872,(e,t,r)=>{"use strict";function n(e){e.nodes().forEach(t=>o(e.node(t))),e.edges().forEach(t=>o(e.edge(t)))}function o(e){let t=e.width;e.width=e.height,e.height=t}function s(e){e.y=-e.y}function i(e){let t=e.x;e.x=e.y,e.y=t}t.exports={adjust:function(e){let t=e.graph().rankdir.toLowerCase();("lr"===t||"rl"===t)&&n(e)},undo:function(e){var t,r;let o=e.graph().rankdir.toLowerCase();("bt"===o||"rl"===o)&&((t=e).nodes().forEach(e=>s(t.node(e))),t.edges().forEach(e=>{let r=t.edge(e);r.points.forEach(s),Object.hasOwn(r,"y")&&s(r)})),("lr"===o||"rl"===o)&&((r=e).nodes().forEach(e=>i(r.node(e))),r.edges().forEach(e=>{let t=r.edge(e);t.points.forEach(i),Object.hasOwn(t,"x")&&i(t)}),n(e))}}},255396,(e,t,r)=>{"use strict";let n=e.r(698298);t.exports=function(e){let t={},r=e.nodes().filter(t=>!e.children(t).length),o=r.map(t=>e.node(t).rank),s=n.applyWithChunking(Math.max,o),i=n.range(s+1).map(()=>[]);return r.sort((t,r)=>e.node(t).rank-e.node(r).rank).forEach(function r(n){t[n]||(t[n]=!0,i[e.node(n).rank].push(n),e.successors(n).forEach(r))}),i}},705762,(e,t,r)=>{"use strict";let n=e.r(698298).zipObject;t.exports=function(e,t){let r=0;for(let o=1;o<t.length;++o)r+=function(e,t,r){let o=n(r,r.map((e,t)=>t)),s=t.flatMap(t=>e.outEdges(t).map(t=>({pos:o[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),i=1;for(;i<r.length;)i<<=1;let a=2*i-1;i-=1;let d=Array(a).fill(0),l=0;return s.forEach(e=>{let t=e.pos+i;d[t]+=e.weight;let r=0;for(;t>0;)t%2&&(r+=d[t+1]),t=t-1>>1,d[t]+=e.weight;l+=e.weight*r}),l}(e,t[o-1],t[o]);return r}},893763,(e,t,r)=>{t.exports=function(e,t=[]){return t.map(t=>{let r=e.inEdges(t);if(!r.length)return{v:t};{let n=r.reduce((t,r)=>{let n=e.edge(r),o=e.node(r.v);return{sum:t.sum+n.weight*o.order,weight:t.weight+n.weight}},{sum:0,weight:0});return{v:t,barycenter:n.sum/n.weight,weight:n.weight}}})}},354053,(e,t,r)=>{"use strict";let n=e.r(698298);t.exports=function(e,t){let r={};return e.forEach((e,t)=>{let n=r[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};void 0!==e.barycenter&&(n.barycenter=e.barycenter,n.weight=e.weight)}),t.edges().forEach(e=>{let t=r[e.v],n=r[e.w];void 0!==t&&void 0!==n&&(n.indegree++,t.out.push(r[e.w]))}),function(e){let t=[];for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(function(e){return t=>{!t.merged&&(void 0===t.barycenter||void 0===e.barycenter||t.barycenter>=e.barycenter)&&function(e,t){let r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}(r)),r.out.forEach(function(t){return r=>{r.in.push(t),0==--r.indegree&&e.push(r)}}(r))}return t.filter(e=>!e.merged).map(e=>n.pick(e,["vs","i","barycenter","weight"]))}(Object.values(r).filter(e=>!e.indegree))}},299139,(e,t,r)=>{let n=e.r(698298);function o(e,t,r){let n;for(;t.length&&(n=t[t.length-1]).i<=r;)t.pop(),e.push(n.vs),r++;return r}t.exports=function(e,t){var r;let s=n.partition(e,e=>Object.hasOwn(e,"barycenter")),i=s.lhs,a=s.rhs.sort((e,t)=>t.i-e.i),d=[],l=0,h=0,u=0;i.sort((r=!!t,(e,t)=>e.barycenter<t.barycenter?-1:e.barycenter>t.barycenter?1:r?t.i-e.i:e.i-t.i)),u=o(d,a,u),i.forEach(e=>{u+=e.vs.length,d.push(e.vs),l+=e.barycenter*e.weight,h+=e.weight,u=o(d,a,u)});let c={vs:d.flat(!0)};return h&&(c.barycenter=l/h,c.weight=h),c}},768818,(e,t,r)=>{let n=e.r(893763),o=e.r(354053),s=e.r(299139);t.exports=function e(t,r,i,a){var d,l;let h=t.children(r),u=t.node(r),c=u?u.borderLeft:void 0,g=u?u.borderRight:void 0,f={};c&&(h=h.filter(e=>e!==c&&e!==g));let p=n(t,h);p.forEach(r=>{if(t.children(r.v).length){var n,o;let s=e(t,r.v,i,a);f[r.v]=s,Object.hasOwn(s,"barycenter")&&(n=r,o=s,void 0!==n.barycenter?(n.barycenter=(n.barycenter*n.weight+o.barycenter*o.weight)/(n.weight+o.weight),n.weight+=o.weight):(n.barycenter=o.barycenter,n.weight=o.weight))}});let m=o(p,i);d=m,l=f,d.forEach(e=>{e.vs=e.vs.flatMap(e=>l[e]?l[e].vs:e)});let v=s(m,a);if(c&&(v.vs=[c,v.vs,g].flat(!0),t.predecessors(c).length)){let e=t.node(t.predecessors(c)[0]),r=t.node(t.predecessors(g)[0]);Object.hasOwn(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+e.order+r.order)/(v.weight+2),v.weight+=2}return v}},862782,(e,t,r)=>{let n=e.r(892353).Graph,o=e.r(698298);t.exports=function(e,t,r,s){s||(s=e.nodes());let i=function(e){for(var t;e.hasNode(t=o.uniqueId("_root")););return t}(e),a=new n({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return s.forEach(n=>{let o=e.node(n),s=e.parent(n);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(a.setNode(n),a.setParent(n,s||i),e[r](n).forEach(t=>{let r=t.v===n?t.w:t.v,o=a.edge(r,n),s=void 0!==o?o.weight:0;a.setEdge(r,n,{weight:e.edge(t).weight+s})}),Object.hasOwn(o,"minRank")&&a.setNode(n,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),a}},735403,(e,t,r)=>{t.exports=function(e,t,r){let n={},o;r.forEach(r=>{let s=e.parent(r),i,a;for(;s;){if((i=e.parent(s))?(a=n[i],n[i]=s):(a=o,o=s),a&&a!==s)return void t.setEdge(a,s);s=i}})}},205461,(e,t,r)=>{"use strict";let n=e.r(255396),o=e.r(705762),s=e.r(768818),i=e.r(862782),a=e.r(735403),d=e.r(892353).Graph,l=e.r(698298);function h(e,t,r){let n=new Map,o=(e,t)=>{n.has(e)||n.set(e,[]),n.get(e).push(t)};for(let t of e.nodes()){let r=e.node(t);if("number"==typeof r.rank&&o(r.rank,t),"number"==typeof r.minRank&&"number"==typeof r.maxRank)for(let e=r.minRank;e<=r.maxRank;e++)e!==r.rank&&o(e,t)}return t.map(function(t){return i(e,t,r,n.get(t)||[])})}function u(e,t){Object.values(t).forEach(t=>t.forEach((t,r)=>e.node(t).order=r))}t.exports=function e(t,r){if(r&&"function"==typeof r.customOrder)return void r.customOrder(t,e);let i=l.maxRank(t),c=h(t,l.range(1,i+1),"inEdges"),g=h(t,l.range(i-1,-1,-1),"outEdges"),f=n(t);if(u(t,f),r&&r.disableOptimalOrderHeuristic)return;let p=1/0,m;for(let e=0,r=0;r<4;++e,++r){(function(e,t){let r=new d;e.forEach(function(e){let n=e.graph().root,o=s(e,n,r,t);o.vs.forEach((t,r)=>e.node(t).order=r),a(e,r,o.vs)})})(e%2?c:g,e%4>=2),f=l.buildLayerMatrix(t);let n=o(t,f);n<p&&(r=0,m=Object.assign({},f),p=n)}u(t,m)}},190741,(e,t,r)=>{"use strict";let n=e.r(892353).Graph,o=e.r(698298);function s(e,t){let r={};return t.length&&t.reduce(function(t,n){let o=0,s=0,i=t.length,d=n[n.length-1];return n.forEach((t,l)=>{let h=function(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}(e,t),u=h?e.node(h).order:i;(h||t===d)&&(n.slice(s,l+1).forEach(t=>{e.predecessors(t).forEach(n=>{let s=e.node(n),i=s.order;(i<o||u<i)&&!(s.dummy&&e.node(t).dummy)&&a(r,n,t)})}),s=l+1,o=u)}),n}),r}function i(e,t){let r={};function n(t,n,s,i,d){let l;o.range(n,s).forEach(n=>{l=t[n],e.node(l).dummy&&e.predecessors(l).forEach(t=>{let n=e.node(t);n.dummy&&(n.order<i||n.order>d)&&a(r,t,l)})})}return t.length&&t.reduce(function(t,r){let o=-1,s,i=0;return r.forEach((a,d)=>{if("border"===e.node(a).dummy){let t=e.predecessors(a);t.length&&(s=e.node(t[0]).order,n(r,i,d,o,s),i=d,o=s)}n(r,i,r.length,s,t.length)}),r}),r}function a(e,t,r){if(t>r){let e=t;t=r,r=e}let n=e[t];n||(e[t]=n={}),n[r]=!0}function d(e,t,r){if(t>r){let e=t;t=r,r=e}return!!e[t]&&Object.hasOwn(e[t],r)}function l(e,t,r,n){let o={},s={},i={};return t.forEach(e=>{e.forEach((e,t)=>{o[e]=e,s[e]=e,i[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let a=n(e);if(a.length){let n=((a=a.sort((e,t)=>i[e]-i[t])).length-1)/2;for(let l=Math.floor(n),h=Math.ceil(n);l<=h;++l){let n=a[l];s[e]===e&&t<i[n]&&!d(r,e,n)&&(s[n]=e,s[e]=o[e]=o[n],t=i[n])}}})}),{root:o,align:s}}function h(e,t,r,o,s){var i,a,d,l,h,u,c;let g,f,p,m={},v=(i=e,a=t,d=r,l=s,g=new n,p=(h=(f=i.graph()).nodesep,u=f.edgesep,c=l,(e,t,r)=>{let n,o,s=e.node(t),i=e.node(r);if(n=0+s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":o=-s.width/2;break;case"r":o=s.width/2}if(o&&(n+=c?o:-o),o=0,n+=(s.dummy?u:h)/2,n+=(i.dummy?u:h)/2,n+=i.width/2,Object.hasOwn(i,"labelpos"))switch(i.labelpos.toLowerCase()){case"l":o=i.width/2;break;case"r":o=-i.width/2}return o&&(n+=c?o:-o),o=0,n}),a.forEach(e=>{let t;e.forEach(e=>{let r=d[e];if(g.setNode(r),t){var n=d[t],o=g.edge(n,r);g.setEdge(n,r,Math.max(p(i,e,t),o||0))}t=e})}),g),w=s?"borderLeft":"borderRight";function b(e,t){let r=v.nodes(),n=r.pop(),o={};for(;n;)o[n]?e(n):(o[n]=!0,r.push(n),r=r.concat(t(n))),n=r.pop()}return b(function(e){m[e]=v.inEdges(e).reduce((e,t)=>Math.max(e,m[t.v]+v.edge(t)),0)},v.predecessors.bind(v)),b(function(t){let r=v.outEdges(t).reduce((e,t)=>Math.min(e,m[t.w]-v.edge(t)),1/0),n=e.node(t);r!==1/0&&n.borderType!==w&&(m[t]=Math.max(m[t],r))},v.successors.bind(v)),Object.keys(o).forEach(e=>m[e]=m[r[e]]),m}function u(e,t){return Object.values(t).reduce((t,r)=>{let n=-1/0,o=1/0;Object.entries(r).forEach(([t,r])=>{var s,i;let a=(s=e,i=t,s.node(i).width/2);n=Math.max(r+a,n),o=Math.min(r-a,o)});let s=n-o;return s<t[0]&&(t=[s,r]),t},[1/0,null])[1]}function c(e,t){let r=Object.values(t),n=o.applyWithChunking(Math.min,r),s=o.applyWithChunking(Math.max,r);["u","d"].forEach(r=>{["l","r"].forEach(i=>{let a=r+i,d=e[a];if(d===t)return;let l=Object.values(d),h=n-o.applyWithChunking(Math.min,l);"l"!==i&&(h=s-o.applyWithChunking(Math.max,l)),h&&(e[a]=o.mapValues(d,e=>e+h))})})}function g(e,t){return o.mapValues(e.ul,(r,n)=>{if(t)return e[t.toLowerCase()][n];{let t=Object.values(e).map(e=>e[n]).sort((e,t)=>e-t);return(t[1]+t[2])/2}})}t.exports={positionX:function(e){let t,r=o.buildLayerMatrix(e),n=Object.assign(s(e,r),i(e,r)),a={};["u","d"].forEach(s=>{t="u"===s?r:Object.values(r).reverse(),["l","r"].forEach(r=>{"r"===r&&(t=t.map(e=>Object.values(e).reverse()));let i=("u"===s?e.predecessors:e.successors).bind(e),d=l(e,t,n,i),u=h(e,t,d.root,d.align,"r"===r);"r"===r&&(u=o.mapValues(u,e=>-e)),a[s+r]=u})});let d=u(e,a);return c(a,d),g(a,e.graph().align)},findType1Conflicts:s,findType2Conflicts:i,addConflict:a,hasConflict:d,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:c,findSmallestWidthAlignment:u,balance:g}},914314,(e,t,r)=>{"use strict";let n=e.r(698298),o=e.r(190741).positionX;t.exports=function(e){var t;let r,s,i;t=e=n.asNonCompoundGraph(e),r=n.buildLayerMatrix(t),s=t.graph().ranksep,i=0,r.forEach(e=>{let r=e.reduce((e,r)=>{let n=t.node(r).height;return e>n?e:n},0);e.forEach(e=>t.node(e).y=i+r/2),i+=r+s}),Object.entries(o(e)).forEach(([t,r])=>e.node(t).x=r)}},752654,(e,t,r)=>{"use strict";let n=e.r(196218),o=e.r(360908),s=e.r(393534),i=e.r(698298).normalizeRanks,a=e.r(284179),d=e.r(698298).removeEmptyRanks,l=e.r(245128),h=e.r(436561),u=e.r(614872),c=e.r(205461),g=e.r(914314),f=e.r(698298),p=e.r(892353).Graph;t.exports=function(e,t){let r=t&&t.debugTiming?f.time:f.notime;r("layout",()=>{let j=r(" buildLayoutGraph",()=>{var t;let r,n;return t=e,r=new p({multigraph:!0,compound:!0}),n=O(t.graph()),r.setGraph(Object.assign({},v,k(n,m),f.pick(n,w))),t.nodes().forEach(e=>{let n=k(O(t.node(e)),b);Object.keys(E).forEach(e=>{void 0===n[e]&&(n[e]=E[e])}),r.setNode(e,n),r.setParent(e,t.parent(e))}),t.edges().forEach(e=>{let n=O(t.edge(e));r.setEdge(e,Object.assign({},x,k(n,y),f.pick(n,_)))}),r});r(" runLayout",()=>{var e,p,m;return e=j,p=r,m=t,void(p(" makeSpaceForEdgeLabels",()=>{var t;let r;return r=(t=e).graph(),void(r.ranksep/=2,t.edges().forEach(e=>{let n=t.edge(e);n.minlen*=2,"c"!==n.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?n.width+=n.labeloffset:n.height+=n.labeloffset)}))}),p(" removeSelfEdges",()=>{var t;(t=e).edges().forEach(e=>{if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}),p(" acyclic",()=>n.run(e)),p(" nestingGraph.run",()=>l.run(e)),p(" rank",()=>s(f.asNonCompoundGraph(e))),p(" injectEdgeLabelProxies",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(r.width&&r.height){let r=t.node(e.v),n={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};f.addDummyNode(t,"edge-proxy",n,"_ep")}})}),p(" removeEmptyRanks",()=>d(e)),p(" nestingGraph.cleanup",()=>l.cleanup(e)),p(" normalizeRanks",()=>i(e)),p(" assignRankMinMax",()=>{var t;let r;return r=0,void((t=e).nodes().forEach(e=>{let n=t.node(e);n.borderTop&&(n.minRank=t.node(n.borderTop).rank,n.maxRank=t.node(n.borderBottom).rank,r=Math.max(r,n.maxRank))}),t.graph().maxRank=r)}),p(" removeEdgeLabelProxies",()=>{var t;(t=e).nodes().forEach(e=>{let r=t.node(e);"edge-proxy"===r.dummy&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}),p(" normalize.run",()=>o.run(e)),p(" parentDummyChains",()=>a(e)),p(" addBorderSegments",()=>h(e)),p(" order",()=>c(e,m)),p(" insertSelfEdges",()=>{var t;return t=e,void f.buildLayerMatrix(t).forEach(e=>{var r=0;e.forEach((e,n)=>{var o=t.node(e);o.order=n+r,(o.selfEdges||[]).forEach(e=>{f.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:o.rank,order:n+ ++r,e:e.e,label:e.label},"_se")}),delete o.selfEdges})})}),p(" adjustCoordinateSystem",()=>u.adjust(e)),p(" position",()=>g(e)),p(" positionSelfEdges",()=>{var t;(t=e).nodes().forEach(e=>{var r=t.node(e);if("selfedge"===r.dummy){var n=t.node(r.e.v),o=n.x+n.width/2,s=n.y,i=r.x-o,a=n.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:o+2*i/3,y:s-a},{x:o+5*i/6,y:s-a},{x:o+i,y:s},{x:o+5*i/6,y:s+a},{x:o+2*i/3,y:s+a}],r.label.x=r.x,r.label.y=r.y}})}),p(" removeBorderNodes",()=>{var t;(t=e).nodes().forEach(e=>{if(t.children(e).length){let r=t.node(e),n=t.node(r.borderTop),o=t.node(r.borderBottom),s=t.node(r.borderLeft[r.borderLeft.length-1]),i=t.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(i.x-s.x),r.height=Math.abs(o.y-n.y),r.x=s.x+r.width/2,r.y=n.y+r.height/2}}),t.nodes().forEach(e=>{"border"===t.node(e).dummy&&t.removeNode(e)})}),p(" normalize.undo",()=>o.undo(e)),p(" fixupEdgeLabelCoords",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);if(Object.hasOwn(r,"x"))switch(("l"===r.labelpos||"r"===r.labelpos)&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset}})}),p(" undoCoordinateSystem",()=>u.undo(e)),p(" translateGraph",()=>(function(e){let t=1/0,r=0,n=1/0,o=0,s=e.graph(),i=s.marginx||0,a=s.marginy||0;function d(e){let s=e.x,i=e.y,a=e.width,d=e.height;t=Math.min(t,s-a/2),r=Math.max(r,s+a/2),n=Math.min(n,i-d/2),o=Math.max(o,i+d/2)}e.nodes().forEach(t=>d(e.node(t))),e.edges().forEach(t=>{let r=e.edge(t);Object.hasOwn(r,"x")&&d(r)}),t-=i,n-=a,e.nodes().forEach(r=>{let o=e.node(r);o.x-=t,o.y-=n}),e.edges().forEach(r=>{let o=e.edge(r);o.points.forEach(e=>{e.x-=t,e.y-=n}),Object.hasOwn(o,"x")&&(o.x-=t),Object.hasOwn(o,"y")&&(o.y-=n)}),s.width=r-t+i,s.height=o-n+a})(e)),p(" assignNodeIntersects",()=>{var t;(t=e).edges().forEach(e=>{let r,n,o=t.edge(e),s=t.node(e.v),i=t.node(e.w);o.points?(r=o.points[0],n=o.points[o.points.length-1]):(o.points=[],r=i,n=s),o.points.unshift(f.intersectRect(s,r)),o.points.push(f.intersectRect(i,n))})}),p(" reversePoints",()=>{var t;(t=e).edges().forEach(e=>{let r=t.edge(e);r.reversed&&r.points.reverse()})}),p(" acyclic.undo",()=>n.undo(e)))}),r(" updateInputGraph",()=>{var t,r;return t=e,r=j,void(t.nodes().forEach(e=>{let n=t.node(e),o=r.node(e);n&&(n.x=o.x,n.y=o.y,n.rank=o.rank,r.children(e).length&&(n.width=o.width,n.height=o.height))}),t.edges().forEach(e=>{let n=t.edge(e),o=r.edge(e);n.points=o.points,Object.hasOwn(o,"x")&&(n.x=o.x,n.y=o.y)}),t.graph().width=r.graph().width,t.graph().height=r.graph().height)})})};let m=["nodesep","edgesep","ranksep","marginx","marginy"],v={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},w=["acyclicer","ranker","rankdir","align"],b=["width","height","rank"],E={width:0,height:0},y=["minlen","weight","width","height","labeloffset"],x={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},_=["labelpos"];function k(e,t){return f.mapValues(f.pick(e,t),Number)}function O(e){var t={};return e&&Object.entries(e).forEach(([e,r])=>{"string"==typeof e&&(e=e.toLowerCase()),t[e]=r}),t}},513515,(e,t,r)=>{let n=e.r(698298),o=e.r(892353).Graph;t.exports={debugOrdering:function(e){let t=n.buildLayerMatrix(e),r=new o({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(t=>{r.setNode(t,{label:t}),r.setParent(t,"layer"+e.node(t).rank)}),e.edges().forEach(e=>r.setEdge(e.v,e.w,{},e.name)),t.forEach((e,t)=>{r.setNode("layer"+t,{rank:"same"}),e.reduce((e,t)=>(r.setEdge(e,t,{style:"invis"}),t))}),r}}},922596,(e,t,r)=>{t.exports="1.1.8"},165825,(e,t,r)=>{t.exports={graphlib:e.r(892353),layout:e.r(752654),debug:e.r(513515),util:{time:e.r(698298).time,notime:e.r(698298).notime},version:e.r(922596)}},286872,455665,e=>{"use strict";var t=e.i(165825),r=e.i(207425),n=e.i(549139),o=e.i(714028);function s(e){let t=(0,n.getVisualSpec)((0,o.graphNodeKindString)(e));return{width:t.defaultWidth,height:t.defaultHeight+t.captionHeight}}e.s(["registryNodeDimensions",0,s],455665),e.s(["applyDagreLayout",0,function(e,n=r.DAGRE_CONFIG){let o=new t.default.graphlib.Graph;for(let t of(o.setGraph({rankdir:n.rankdir,ranksep:n.ranksep,nodesep:n.nodesep}),o.setDefaultEdgeLabel(()=>({})),e.nodes)){let{width:e,height:r}=s(t);o.setNode(t.id,{width:e,height:r})}for(let t of e.edges)o.setEdge(t.source,t.target);t.default.layout(o);let i=e.nodes.map(e=>{let t=o.node(e.id),{width:r,height:n}=s(e);return{...e,position:{x:(t?.x??0)-r/2,y:(t?.y??0)-n/2}}});return{...e,nodes:i}}],286872)},163732,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(154548),o=e.i(30590),s=e.i(893976),i=e.i(882267),a=e.i(144905),d=e.i(714028),l=e.i(678321),h=e.i(286872),u=e.i(242792);function c(e,t){if(e===t)return!0;if(null===e||null===t||typeof e!=typeof t)return!1;if("bigint"==typeof e||"bigint"==typeof t)return String(e)===String(t);if("object"!=typeof e)return!1;if(Array.isArray(e))return!!Array.isArray(t)&&e.length===t.length&&e.every((e,r)=>c(e,t[r]));if(Array.isArray(t))return!1;let r=Object.keys(e),n=Object.keys(t);return r.length===n.length&&r.every(r=>r in t&&c(e[r],t[r]))}function g(e,t,r){return r?`${e}|${t}|${r}`:`${e}|${t}`}function f(e,t){let r=new Set([u.START_NODE_ID,u.END_NODE_ID]),n=new Map(e.nodes.filter(e=>!r.has(e.id)).map(e=>[e.id,e])),o=new Map(t.nodes.filter(e=>!r.has(e.id)).map(e=>[e.id,e])),s=new Map,i=0,a=0,d=0;for(let[e,t]of o){let r=n.get(e);if(r){var l,h;let n=(l=r,h=t,l.kind===h.kind&&c(l.config,h.config)&&(l.export?.as??"")===(h.export?.as??"")?"unchanged":"modified"),o="modified"===n?function(e,t){let r=new Set([...Object.keys(e),...Object.keys(t)]),n=[];for(let o of r)c(e[o],t[o])||n.push(o);return n}(r.config,t.config):void 0;s.set(e,{taskName:t.taskName,status:n,beforeNode:r,afterNode:t,changedFields:o}),"modified"===n&&d++}else s.set(e,{taskName:t.taskName,status:"added",afterNode:t}),i++}for(let[e,t]of n)!o.has(e)&&(s.set(e,{taskName:t.taskName,status:"removed",beforeNode:t}),a++);let f=new Map(e.edges.map(e=>[g(e.source,e.target,e.sourceHandle),e])),p=new Map(t.edges.map(e=>[g(e.source,e.target,e.sourceHandle),e])),m=new Map;for(let[e]of p){let t=f.has(e)?"unchanged":"added";m.set(e,{edgeKey:e,status:t})}for(let[e]of f)p.has(e)||m.set(e,{edgeKey:e,status:"removed"});return{nodes:s,edges:m,summary:{added:i,removed:a,modified:d}}}function p(e,t,r){let n=new Set(t.nodes.map(e=>e.id)),o=[...t.nodes];for(let[e,t]of r.nodes)"removed"===t.status&&t.beforeNode&&!n.has(e)&&o.push(t.beforeNode);let s=new Set(t.edges.map(e=>m(e.source,e.target,e.sourceHandle))),i=[...t.edges],a=t.edges.length;for(let[t,n]of r.edges)if("removed"===n.status){let r=e.edges.find(e=>m(e.source,e.target,e.sourceHandle)===t);r&&!s.has(t)&&i.push({...r,id:`diff_removed_${a++}`})}return{document:t.document,description:t.description,env:t.env,budget:t.budget,nodes:o,edges:i}}function m(e,t,r){return r?`${e}|${t}|${r}`:`${e}|${t}`}let v=[],w=[];function b(e,t){return{nodes:e.nodes.map(e=>{let r=e.data,n=t.nodes.get(e.id);return n?{...e,data:{...r,diffState:{status:n.status,changedFields:n.changedFields}},draggable:!1,connectable:!1,deletable:!1}:e}),edges:e.edges.map(e=>{let r=e.data??{},n=e.data?.sourceHandle?`${e.source}|${e.target}|${e.sourceHandle}`:`${e.source}|${e.target}`,o=t.edges.get(n);return o?{...e,data:{...r,diffState:o.status}}:e})}}let E=(0,r.memo)(function({diff:e,className:r}){let{added:n,removed:o,modified:i}=e.summary;return 0===n&&0===o&&0===i?(0,t.jsx)("div",{className:(0,s.cn)("stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:border stg:border-[var(--stgm-border,#e5e5e5)] stg:bg-[var(--stgm-card,var(--stgm-background,#fff))] stg:px-3 stg:py-1.5 stg:text-xs stg:text-[var(--stgm-muted-foreground,#737373)] stg:shadow-sm",r),children:"No changes detected"}):(0,t.jsxs)("div",{className:(0,s.cn)("stg:flex stg:items-center stg:gap-3 stg:rounded-md stg:border stg:border-[var(--stgm-border,#e5e5e5)] stg:bg-[var(--stgm-card,var(--stgm-background,#fff))] stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium stg:shadow-sm",r),role:"status","aria-label":`Diff summary: ${n} added, ${o} removed, ${i} modified`,children:[n>0&&(0,t.jsxs)("span",{className:"stg:flex stg:items-center stg:gap-1 stg:text-[var(--stgm-success,#22c55e)]",children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"+"}),n," added"]}),o>0&&(0,t.jsxs)("span",{className:"stg:flex stg:items-center stg:gap-1 stg:text-[var(--stgm-destructive,#ef4444)]",children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"−"}),o," removed"]}),i>0&&(0,t.jsxs)("span",{className:"stg:flex stg:items-center stg:gap-1 stg:text-[var(--stgm-warning,#f59e0b)]",children:[(0,t.jsx)("span",{"aria-hidden":"true",children:"~"}),i," modified"]})]})}),y={[d.CANVAS_TASK_NODE_TYPE]:i.WorkflowNode},x={[d.CANVAS_TRANSITION_EDGE_TYPE]:a.CanvasTransitionEdge},_={markerEnd:{type:o.MarkerType.ArrowClosed,width:16,height:16}},k=(0,r.memo)(function(e){return(0,t.jsx)(n.ReactFlowProvider,{children:(0,t.jsx)(O,{...e})})});function O({beforeYaml:e,afterYaml:o,onTaskClick:i,className:a}){let u=(0,r.useId)(),{nodes:c,edges:g,diff:m,error:k,selectedTaskName:j,setSelectedTaskName:N}=function(e){let{beforeYaml:t,afterYaml:n}=e,[o,s]=(0,r.useState)(null),i=(0,r.useMemo)(()=>{if(!n.trim())return{nodes:v,edges:w,diff:null,error:null};try{let e=(0,d.yamlToGraph)(n);if(!t.trim()){let t={document:e.document,nodes:[],edges:[]},r=f(t,e),n=p(t,e,r),o=(0,h.applyDagreLayout)(n),s=(0,d.toReactFlowElements)(o);return{...b(s,r),diff:r,error:null}}let r=(0,d.yamlToGraph)(t),o=f(r,e),s=p(r,e,o),i=(0,h.applyDagreLayout)(s),a=(0,d.toReactFlowElements)(i);return{...b(a,o),diff:o,error:null}}catch(e){return{nodes:v,edges:w,diff:null,error:e instanceof Error?e.message:"Failed to compute diff"}}},[t,n]);return{nodes:i.nodes,edges:i.edges,diff:i.diff,error:i.error,selectedTaskName:o,setSelectedTaskName:s}}({beforeYaml:e,afterYaml:o}),{fitView:C}=(0,n.useReactFlow)(),M=(0,r.useRef)(!1);(0,r.useEffect)(()=>{c.length>0&&!M.current&&(M.current=!0,setTimeout(()=>C({padding:.15,duration:300}),50))},[c.length,C]);let R=(0,r.useCallback)((e,t)=>{let r=t.data;if(r.isSentinel)return;let n=r.taskName,o=n===j?null:n;if(N(o),o&&i&&m){let e=m.nodes.get(t.id);e&&i(o,e)}},[j,N,i,m]),L=(0,r.useCallback)(()=>{N(null)},[N]),S=(0,r.useMemo)(()=>c.map(e=>({...e,selected:e.data.taskName===j})),[c,j]);return k?(0,t.jsx)("div",{className:(0,s.cn)("stg:flex stg:h-full stg:flex-col stg:items-center stg:justify-center stg:gap-2 stg:px-6 stg:text-center",a),children:(0,t.jsx)("p",{className:"stg:text-sm stg:text-[var(--stgm-muted-foreground,#737373)]",children:k})}):0===c.length?(0,t.jsx)("div",{className:(0,s.cn)("stg:flex stg:h-full stg:items-center stg:justify-center stg:text-sm stg:text-[var(--stgm-muted-foreground,#737373)]",a),children:"No changes to display"}):(0,t.jsx)(l.WorkflowGraphModeProvider,{mode:"diff",children:(0,t.jsxs)("div",{className:(0,s.cn)("stg:relative stg:h-full stg:w-full",a),children:[m&&(0,t.jsx)("div",{className:"stg:absolute stg:left-3 stg:top-3 stg:z-50",children:(0,t.jsx)(E,{diff:m})}),(0,t.jsxs)(n.ReactFlow,{id:u,nodes:S,edges:g,nodeTypes:y,edgeTypes:x,defaultEdgeOptions:_,onNodeClick:R,onPaneClick:L,nodesDraggable:!1,nodesConnectable:!1,elementsSelectable:!0,panOnDrag:!0,zoomOnScroll:!0,fitView:!1,minZoom:.2,maxZoom:2,proOptions:{hideAttribution:!0},children:[(0,t.jsx)(n.Background,{variant:n.BackgroundVariant.Dots,gap:16,size:1}),(0,t.jsx)(n.Controls,{showInteractive:!1})]})]})})}e.s(["WorkflowDiffGraph",0,k],163732)}]);