@stigmer/server-slim 3.27.1 → 3.28.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 (571) hide show
  1. package/console/404.html +1 -1
  2. package/console/__next.__PAGE__.txt +2 -2
  3. package/console/__next._full.txt +14 -14
  4. package/console/__next._head.txt +4 -4
  5. package/console/__next._index.txt +9 -9
  6. package/console/__next._tree.txt +1 -1
  7. package/console/_next/static/chunks/01t5bq-0-a_i1.js +1 -0
  8. package/console/_next/static/chunks/{0ecjlb.bunt.1.js → 02-y8.0mij3oo.js} +1 -1
  9. package/console/_next/static/chunks/{0heeg7tjg-ble.js → 02w~ksp-5svw1.js} +1 -1
  10. package/console/_next/static/chunks/{0.qu8zg6yocro.js → 09ofg.rr49784.js} +1 -1
  11. package/console/_next/static/chunks/0a0wj-awx7rg..js +1 -0
  12. package/console/_next/static/chunks/0dk4r7ihxt.wk.js +1 -0
  13. package/console/_next/static/chunks/0it9gag-6iroy.js +1 -0
  14. package/console/_next/static/chunks/0k.09v5itlmei.js +1 -0
  15. package/console/_next/static/chunks/0m94l3p58m6us.js +1 -0
  16. package/console/_next/static/chunks/107k.7sfwlnvt.js +1 -0
  17. package/console/_next/static/chunks/{00r~itj4ekq5y.js → 16wp_e52o23tz.js} +1 -1
  18. package/console/_not-found/__next._full.txt +14 -14
  19. package/console/_not-found/__next._head.txt +4 -4
  20. package/console/_not-found/__next._index.txt +9 -9
  21. package/console/_not-found/__next._not-found.__PAGE__.txt +3 -3
  22. package/console/_not-found/__next._not-found.txt +3 -3
  23. package/console/_not-found/__next._tree.txt +1 -1
  24. package/console/_not-found.html +1 -1
  25. package/console/_not-found.txt +14 -14
  26. package/console/auth/callback/__next._full.txt +16 -16
  27. package/console/auth/callback/__next._head.txt +4 -4
  28. package/console/auth/callback/__next._index.txt +9 -9
  29. package/console/auth/callback/__next._tree.txt +1 -1
  30. package/console/auth/callback/__next.auth.callback.__PAGE__.txt +4 -4
  31. package/console/auth/callback/__next.auth.callback.txt +3 -3
  32. package/console/auth/callback/__next.auth.txt +3 -3
  33. package/console/auth/callback.html +1 -1
  34. package/console/auth/callback.txt +16 -16
  35. package/console/auth/github/callback/__next._full.txt +16 -16
  36. package/console/auth/github/callback/__next._head.txt +4 -4
  37. package/console/auth/github/callback/__next._index.txt +9 -9
  38. package/console/auth/github/callback/__next._tree.txt +1 -1
  39. package/console/auth/github/callback/__next.auth.github.callback.__PAGE__.txt +4 -4
  40. package/console/auth/github/callback/__next.auth.github.callback.txt +3 -3
  41. package/console/auth/github/callback/__next.auth.github.txt +3 -3
  42. package/console/auth/github/callback/__next.auth.txt +3 -3
  43. package/console/auth/github/callback.html +1 -1
  44. package/console/auth/github/callback.txt +16 -16
  45. package/console/auth/oauth/callback/__next._full.txt +16 -16
  46. package/console/auth/oauth/callback/__next._head.txt +4 -4
  47. package/console/auth/oauth/callback/__next._index.txt +9 -9
  48. package/console/auth/oauth/callback/__next._tree.txt +1 -1
  49. package/console/auth/oauth/callback/__next.auth.oauth.callback.__PAGE__.txt +4 -4
  50. package/console/auth/oauth/callback/__next.auth.oauth.callback.txt +3 -3
  51. package/console/auth/oauth/callback/__next.auth.oauth.txt +3 -3
  52. package/console/auth/oauth/callback/__next.auth.txt +3 -3
  53. package/console/auth/oauth/callback.html +1 -1
  54. package/console/auth/oauth/callback.txt +16 -16
  55. package/console/chat/__placeholder__/__placeholder__/__next._full.txt +15 -15
  56. package/console/chat/__placeholder__/__placeholder__/__next._head.txt +4 -4
  57. package/console/chat/__placeholder__/__placeholder__/__next._index.txt +9 -9
  58. package/console/chat/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  59. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.__PAGE__.txt +3 -3
  60. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.$d$slug.txt +3 -3
  61. package/console/chat/__placeholder__/__placeholder__/__next.chat.$d$org.txt +3 -3
  62. package/console/chat/__placeholder__/__placeholder__/__next.chat.txt +3 -3
  63. package/console/chat/__placeholder__/__placeholder__.html +1 -1
  64. package/console/chat/__placeholder__/__placeholder__.txt +15 -15
  65. package/console/conversations/__next._full.txt +15 -15
  66. package/console/conversations/__next._head.txt +4 -4
  67. package/console/conversations/__next._index.txt +9 -9
  68. package/console/conversations/__next._tree.txt +1 -1
  69. package/console/conversations/__next.conversations.__PAGE__.txt +3 -3
  70. package/console/conversations/__next.conversations.txt +3 -3
  71. package/console/conversations/__placeholder__/__placeholder__/__next._full.txt +15 -15
  72. package/console/conversations/__placeholder__/__placeholder__/__next._head.txt +4 -4
  73. package/console/conversations/__placeholder__/__placeholder__/__next._index.txt +9 -9
  74. package/console/conversations/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  75. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.__PAGE__.txt +3 -3
  76. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.$d$key.txt +3 -3
  77. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.$d$channelId.txt +3 -3
  78. package/console/conversations/__placeholder__/__placeholder__/__next.conversations.txt +3 -3
  79. package/console/conversations/__placeholder__/__placeholder__.html +1 -1
  80. package/console/conversations/__placeholder__/__placeholder__.txt +15 -15
  81. package/console/conversations.html +1 -1
  82. package/console/conversations.txt +15 -15
  83. package/console/dashboard/__next._full.txt +15 -15
  84. package/console/dashboard/__next._head.txt +4 -4
  85. package/console/dashboard/__next._index.txt +9 -9
  86. package/console/dashboard/__next._tree.txt +1 -1
  87. package/console/dashboard/__next.dashboard.__PAGE__.txt +3 -3
  88. package/console/dashboard/__next.dashboard.txt +3 -3
  89. package/console/dashboard.html +1 -1
  90. package/console/dashboard.txt +15 -15
  91. package/console/executions/__placeholder__/__next._full.txt +14 -14
  92. package/console/executions/__placeholder__/__next._head.txt +4 -4
  93. package/console/executions/__placeholder__/__next._index.txt +9 -9
  94. package/console/executions/__placeholder__/__next._tree.txt +1 -1
  95. package/console/executions/__placeholder__/__next.executions.$d$id.__PAGE__.txt +2 -2
  96. package/console/executions/__placeholder__/__next.executions.$d$id.txt +3 -3
  97. package/console/executions/__placeholder__/__next.executions.txt +3 -3
  98. package/console/executions/__placeholder__.html +1 -1
  99. package/console/executions/__placeholder__.txt +14 -14
  100. package/console/index.html +1 -1
  101. package/console/index.txt +14 -14
  102. package/console/invite/__placeholder__/__next._full.txt +15 -15
  103. package/console/invite/__placeholder__/__next._head.txt +4 -4
  104. package/console/invite/__placeholder__/__next._index.txt +9 -9
  105. package/console/invite/__placeholder__/__next._tree.txt +1 -1
  106. package/console/invite/__placeholder__/__next.invite.$d$token.__PAGE__.txt +3 -3
  107. package/console/invite/__placeholder__/__next.invite.$d$token.txt +3 -3
  108. package/console/invite/__placeholder__/__next.invite.txt +3 -3
  109. package/console/invite/__placeholder__.html +1 -1
  110. package/console/invite/__placeholder__.txt +15 -15
  111. package/console/library/__next._full.txt +17 -17
  112. package/console/library/__next._head.txt +4 -4
  113. package/console/library/__next._index.txt +9 -9
  114. package/console/library/__next._tree.txt +1 -1
  115. package/console/library/__next.library.__PAGE__.txt +3 -3
  116. package/console/library/__next.library.txt +5 -5
  117. package/console/library/agents/__next._full.txt +17 -17
  118. package/console/library/agents/__next._head.txt +4 -4
  119. package/console/library/agents/__next._index.txt +9 -9
  120. package/console/library/agents/__next._tree.txt +1 -1
  121. package/console/library/agents/__next.library.agents.__PAGE__.txt +3 -3
  122. package/console/library/agents/__next.library.agents.txt +3 -3
  123. package/console/library/agents/__next.library.txt +5 -5
  124. package/console/library/agents/__placeholder__/__placeholder__/__next._full.txt +17 -17
  125. package/console/library/agents/__placeholder__/__placeholder__/__next._head.txt +4 -4
  126. package/console/library/agents/__placeholder__/__placeholder__/__next._index.txt +9 -9
  127. package/console/library/agents/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  128. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.__PAGE__.txt +3 -3
  129. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.$d$slug.txt +3 -3
  130. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.$d$org.txt +3 -3
  131. package/console/library/agents/__placeholder__/__placeholder__/__next.library.agents.txt +3 -3
  132. package/console/library/agents/__placeholder__/__placeholder__/__next.library.txt +5 -5
  133. package/console/library/agents/__placeholder__/__placeholder__.html +1 -1
  134. package/console/library/agents/__placeholder__/__placeholder__.txt +17 -17
  135. package/console/library/agents/new/__next._full.txt +18 -18
  136. package/console/library/agents/new/__next._head.txt +4 -4
  137. package/console/library/agents/new/__next._index.txt +9 -9
  138. package/console/library/agents/new/__next._tree.txt +1 -1
  139. package/console/library/agents/new/__next.library.agents.new.__PAGE__.txt +4 -4
  140. package/console/library/agents/new/__next.library.agents.new.txt +3 -3
  141. package/console/library/agents/new/__next.library.agents.txt +3 -3
  142. package/console/library/agents/new/__next.library.txt +5 -5
  143. package/console/library/agents/new.html +1 -1
  144. package/console/library/agents/new.txt +18 -18
  145. package/console/library/agents.html +1 -1
  146. package/console/library/agents.txt +17 -17
  147. package/console/library/mcp-servers/__next._full.txt +17 -17
  148. package/console/library/mcp-servers/__next._head.txt +4 -4
  149. package/console/library/mcp-servers/__next._index.txt +9 -9
  150. package/console/library/mcp-servers/__next._tree.txt +1 -1
  151. package/console/library/mcp-servers/__next.library.mcp-servers.__PAGE__.txt +3 -3
  152. package/console/library/mcp-servers/__next.library.mcp-servers.txt +3 -3
  153. package/console/library/mcp-servers/__next.library.txt +5 -5
  154. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._full.txt +17 -17
  155. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._head.txt +4 -4
  156. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._index.txt +9 -9
  157. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  158. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.__PAGE__.txt +3 -3
  159. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.$d$slug.txt +3 -3
  160. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.$d$org.txt +3 -3
  161. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.mcp-servers.txt +3 -3
  162. package/console/library/mcp-servers/__placeholder__/__placeholder__/__next.library.txt +5 -5
  163. package/console/library/mcp-servers/__placeholder__/__placeholder__.html +1 -1
  164. package/console/library/mcp-servers/__placeholder__/__placeholder__.txt +17 -17
  165. package/console/library/mcp-servers/new/__next._full.txt +18 -18
  166. package/console/library/mcp-servers/new/__next._head.txt +4 -4
  167. package/console/library/mcp-servers/new/__next._index.txt +9 -9
  168. package/console/library/mcp-servers/new/__next._tree.txt +1 -1
  169. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.__PAGE__.txt +4 -4
  170. package/console/library/mcp-servers/new/__next.library.mcp-servers.new.txt +3 -3
  171. package/console/library/mcp-servers/new/__next.library.mcp-servers.txt +3 -3
  172. package/console/library/mcp-servers/new/__next.library.txt +5 -5
  173. package/console/library/mcp-servers/new.html +1 -1
  174. package/console/library/mcp-servers/new.txt +18 -18
  175. package/console/library/mcp-servers.html +1 -1
  176. package/console/library/mcp-servers.txt +17 -17
  177. package/console/library/plugins/__next._full.txt +17 -17
  178. package/console/library/plugins/__next._head.txt +4 -4
  179. package/console/library/plugins/__next._index.txt +9 -9
  180. package/console/library/plugins/__next._tree.txt +1 -1
  181. package/console/library/plugins/__next.library.plugins.__PAGE__.txt +3 -3
  182. package/console/library/plugins/__next.library.plugins.txt +3 -3
  183. package/console/library/plugins/__next.library.txt +5 -5
  184. package/console/library/plugins/__placeholder__/__placeholder__/__next._full.txt +17 -17
  185. package/console/library/plugins/__placeholder__/__placeholder__/__next._head.txt +4 -4
  186. package/console/library/plugins/__placeholder__/__placeholder__/__next._index.txt +9 -9
  187. package/console/library/plugins/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  188. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.__PAGE__.txt +3 -3
  189. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.$d$slug.txt +3 -3
  190. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.$d$org.txt +3 -3
  191. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.plugins.txt +3 -3
  192. package/console/library/plugins/__placeholder__/__placeholder__/__next.library.txt +5 -5
  193. package/console/library/plugins/__placeholder__/__placeholder__.html +1 -1
  194. package/console/library/plugins/__placeholder__/__placeholder__.txt +17 -17
  195. package/console/library/plugins/upload/__next._full.txt +18 -18
  196. package/console/library/plugins/upload/__next._head.txt +4 -4
  197. package/console/library/plugins/upload/__next._index.txt +9 -9
  198. package/console/library/plugins/upload/__next._tree.txt +1 -1
  199. package/console/library/plugins/upload/__next.library.plugins.txt +3 -3
  200. package/console/library/plugins/upload/__next.library.plugins.upload.__PAGE__.txt +4 -4
  201. package/console/library/plugins/upload/__next.library.plugins.upload.txt +3 -3
  202. package/console/library/plugins/upload/__next.library.txt +5 -5
  203. package/console/library/plugins/upload.html +1 -1
  204. package/console/library/plugins/upload.txt +18 -18
  205. package/console/library/plugins.html +1 -1
  206. package/console/library/plugins.txt +17 -17
  207. package/console/library/schedules/__next._full.txt +17 -17
  208. package/console/library/schedules/__next._head.txt +4 -4
  209. package/console/library/schedules/__next._index.txt +9 -9
  210. package/console/library/schedules/__next._tree.txt +1 -1
  211. package/console/library/schedules/__next.library.schedules.__PAGE__.txt +3 -3
  212. package/console/library/schedules/__next.library.schedules.txt +3 -3
  213. package/console/library/schedules/__next.library.txt +5 -5
  214. package/console/library/schedules/__placeholder__/__placeholder__/__next._full.txt +17 -17
  215. package/console/library/schedules/__placeholder__/__placeholder__/__next._head.txt +4 -4
  216. package/console/library/schedules/__placeholder__/__placeholder__/__next._index.txt +9 -9
  217. package/console/library/schedules/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  218. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.__PAGE__.txt +3 -3
  219. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.$d$slug.txt +3 -3
  220. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.$d$org.txt +3 -3
  221. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.schedules.txt +3 -3
  222. package/console/library/schedules/__placeholder__/__placeholder__/__next.library.txt +5 -5
  223. package/console/library/schedules/__placeholder__/__placeholder__.html +1 -1
  224. package/console/library/schedules/__placeholder__/__placeholder__.txt +17 -17
  225. package/console/library/schedules/new/__next._full.txt +18 -18
  226. package/console/library/schedules/new/__next._head.txt +4 -4
  227. package/console/library/schedules/new/__next._index.txt +9 -9
  228. package/console/library/schedules/new/__next._tree.txt +1 -1
  229. package/console/library/schedules/new/__next.library.schedules.new.__PAGE__.txt +4 -4
  230. package/console/library/schedules/new/__next.library.schedules.new.txt +3 -3
  231. package/console/library/schedules/new/__next.library.schedules.txt +3 -3
  232. package/console/library/schedules/new/__next.library.txt +5 -5
  233. package/console/library/schedules/new.html +1 -1
  234. package/console/library/schedules/new.txt +18 -18
  235. package/console/library/schedules.html +1 -1
  236. package/console/library/schedules.txt +17 -17
  237. package/console/library/skills/__next._full.txt +17 -17
  238. package/console/library/skills/__next._head.txt +4 -4
  239. package/console/library/skills/__next._index.txt +9 -9
  240. package/console/library/skills/__next._tree.txt +1 -1
  241. package/console/library/skills/__next.library.skills.__PAGE__.txt +3 -3
  242. package/console/library/skills/__next.library.skills.txt +3 -3
  243. package/console/library/skills/__next.library.txt +5 -5
  244. package/console/library/skills/__placeholder__/__placeholder__/__next._full.txt +17 -17
  245. package/console/library/skills/__placeholder__/__placeholder__/__next._head.txt +4 -4
  246. package/console/library/skills/__placeholder__/__placeholder__/__next._index.txt +9 -9
  247. package/console/library/skills/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  248. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.__PAGE__.txt +3 -3
  249. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.$d$slug.txt +3 -3
  250. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.$d$org.txt +3 -3
  251. package/console/library/skills/__placeholder__/__placeholder__/__next.library.skills.txt +3 -3
  252. package/console/library/skills/__placeholder__/__placeholder__/__next.library.txt +5 -5
  253. package/console/library/skills/__placeholder__/__placeholder__.html +1 -1
  254. package/console/library/skills/__placeholder__/__placeholder__.txt +17 -17
  255. package/console/library/skills/new/__next._full.txt +18 -18
  256. package/console/library/skills/new/__next._head.txt +4 -4
  257. package/console/library/skills/new/__next._index.txt +9 -9
  258. package/console/library/skills/new/__next._tree.txt +1 -1
  259. package/console/library/skills/new/__next.library.skills.new.__PAGE__.txt +4 -4
  260. package/console/library/skills/new/__next.library.skills.new.txt +3 -3
  261. package/console/library/skills/new/__next.library.skills.txt +3 -3
  262. package/console/library/skills/new/__next.library.txt +5 -5
  263. package/console/library/skills/new.html +1 -1
  264. package/console/library/skills/new.txt +18 -18
  265. package/console/library/skills.html +1 -1
  266. package/console/library/skills.txt +17 -17
  267. package/console/library/workflows/__next._full.txt +17 -17
  268. package/console/library/workflows/__next._head.txt +4 -4
  269. package/console/library/workflows/__next._index.txt +9 -9
  270. package/console/library/workflows/__next._tree.txt +1 -1
  271. package/console/library/workflows/__next.library.txt +5 -5
  272. package/console/library/workflows/__next.library.workflows.__PAGE__.txt +3 -3
  273. package/console/library/workflows/__next.library.workflows.txt +3 -3
  274. package/console/library/workflows/__placeholder__/__placeholder__/__next._full.txt +17 -17
  275. package/console/library/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
  276. package/console/library/workflows/__placeholder__/__placeholder__/__next._index.txt +9 -9
  277. package/console/library/workflows/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  278. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.txt +5 -5
  279. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
  280. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.$d$slug.txt +3 -3
  281. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.$d$org.txt +3 -3
  282. package/console/library/workflows/__placeholder__/__placeholder__/__next.library.workflows.txt +3 -3
  283. package/console/library/workflows/__placeholder__/__placeholder__.html +1 -1
  284. package/console/library/workflows/__placeholder__/__placeholder__.txt +17 -17
  285. package/console/library/workflows/executions/__next._full.txt +17 -17
  286. package/console/library/workflows/executions/__next._head.txt +4 -4
  287. package/console/library/workflows/executions/__next._index.txt +9 -9
  288. package/console/library/workflows/executions/__next._tree.txt +1 -1
  289. package/console/library/workflows/executions/__next.library.txt +5 -5
  290. package/console/library/workflows/executions/__next.library.workflows.executions.__PAGE__.txt +3 -3
  291. package/console/library/workflows/executions/__next.library.workflows.executions.txt +3 -3
  292. package/console/library/workflows/executions/__next.library.workflows.txt +3 -3
  293. package/console/library/workflows/executions.html +1 -1
  294. package/console/library/workflows/executions.txt +17 -17
  295. package/console/library/workflows/new/__next._full.txt +18 -18
  296. package/console/library/workflows/new/__next._head.txt +4 -4
  297. package/console/library/workflows/new/__next._index.txt +9 -9
  298. package/console/library/workflows/new/__next._tree.txt +1 -1
  299. package/console/library/workflows/new/__next.library.txt +5 -5
  300. package/console/library/workflows/new/__next.library.workflows.new.__PAGE__.txt +4 -4
  301. package/console/library/workflows/new/__next.library.workflows.new.txt +3 -3
  302. package/console/library/workflows/new/__next.library.workflows.txt +3 -3
  303. package/console/library/workflows/new.html +1 -1
  304. package/console/library/workflows/new.txt +18 -18
  305. package/console/library/workflows.html +1 -1
  306. package/console/library/workflows.txt +17 -17
  307. package/console/library.html +1 -1
  308. package/console/library.txt +17 -17
  309. package/console/login/__next._full.txt +16 -16
  310. package/console/login/__next._head.txt +4 -4
  311. package/console/login/__next._index.txt +9 -9
  312. package/console/login/__next._tree.txt +1 -1
  313. package/console/login/__next.login.__PAGE__.txt +4 -4
  314. package/console/login/__next.login.txt +3 -3
  315. package/console/login.html +1 -1
  316. package/console/login.txt +16 -16
  317. package/console/marketplace/__next._full.txt +15 -15
  318. package/console/marketplace/__next._head.txt +4 -4
  319. package/console/marketplace/__next._index.txt +9 -9
  320. package/console/marketplace/__next._tree.txt +1 -1
  321. package/console/marketplace/__next.marketplace.__PAGE__.txt +3 -3
  322. package/console/marketplace/__next.marketplace.txt +3 -3
  323. package/console/marketplace.html +1 -1
  324. package/console/marketplace.txt +15 -15
  325. package/console/oauth/slack/callback/__next._full.txt +16 -16
  326. package/console/oauth/slack/callback/__next._head.txt +4 -4
  327. package/console/oauth/slack/callback/__next._index.txt +9 -9
  328. package/console/oauth/slack/callback/__next._tree.txt +1 -1
  329. package/console/oauth/slack/callback/__next.oauth.slack.callback.__PAGE__.txt +4 -4
  330. package/console/oauth/slack/callback/__next.oauth.slack.callback.txt +3 -3
  331. package/console/oauth/slack/callback/__next.oauth.slack.txt +3 -3
  332. package/console/oauth/slack/callback/__next.oauth.txt +3 -3
  333. package/console/oauth/slack/callback.html +1 -1
  334. package/console/oauth/slack/callback.txt +16 -16
  335. package/console/sessions/__placeholder__/__next._full.txt +14 -14
  336. package/console/sessions/__placeholder__/__next._head.txt +4 -4
  337. package/console/sessions/__placeholder__/__next._index.txt +9 -9
  338. package/console/sessions/__placeholder__/__next._tree.txt +1 -1
  339. package/console/sessions/__placeholder__/__next.sessions.$d$id.__PAGE__.txt +2 -2
  340. package/console/sessions/__placeholder__/__next.sessions.$d$id.txt +3 -3
  341. package/console/sessions/__placeholder__/__next.sessions.txt +3 -3
  342. package/console/sessions/__placeholder__.html +1 -1
  343. package/console/sessions/__placeholder__.txt +14 -14
  344. package/console/settings/__next._full.txt +18 -18
  345. package/console/settings/__next._head.txt +4 -4
  346. package/console/settings/__next._index.txt +9 -9
  347. package/console/settings/__next._tree.txt +1 -1
  348. package/console/settings/__next.settings.__PAGE__.txt +4 -4
  349. package/console/settings/__next.settings.txt +5 -5
  350. package/console/settings/account-preferences/__next._full.txt +17 -17
  351. package/console/settings/account-preferences/__next._head.txt +4 -4
  352. package/console/settings/account-preferences/__next._index.txt +9 -9
  353. package/console/settings/account-preferences/__next._tree.txt +1 -1
  354. package/console/settings/account-preferences/__next.settings.account-preferences.__PAGE__.txt +3 -3
  355. package/console/settings/account-preferences/__next.settings.account-preferences.txt +3 -3
  356. package/console/settings/account-preferences/__next.settings.txt +5 -5
  357. package/console/settings/account-preferences.html +1 -1
  358. package/console/settings/account-preferences.txt +17 -17
  359. package/console/settings/api-keys/__next._full.txt +17 -17
  360. package/console/settings/api-keys/__next._head.txt +4 -4
  361. package/console/settings/api-keys/__next._index.txt +9 -9
  362. package/console/settings/api-keys/__next._tree.txt +1 -1
  363. package/console/settings/api-keys/__next.settings.api-keys.__PAGE__.txt +3 -3
  364. package/console/settings/api-keys/__next.settings.api-keys.txt +3 -3
  365. package/console/settings/api-keys/__next.settings.txt +5 -5
  366. package/console/settings/api-keys.html +1 -1
  367. package/console/settings/api-keys.txt +17 -17
  368. package/console/settings/billing/__next._full.txt +18 -18
  369. package/console/settings/billing/__next._head.txt +4 -4
  370. package/console/settings/billing/__next._index.txt +9 -9
  371. package/console/settings/billing/__next._tree.txt +1 -1
  372. package/console/settings/billing/__next.settings.billing.__PAGE__.txt +4 -4
  373. package/console/settings/billing/__next.settings.billing.txt +3 -3
  374. package/console/settings/billing/__next.settings.txt +5 -5
  375. package/console/settings/billing.html +1 -1
  376. package/console/settings/billing.txt +18 -18
  377. package/console/settings/channel-apps/__next._full.txt +17 -17
  378. package/console/settings/channel-apps/__next._head.txt +4 -4
  379. package/console/settings/channel-apps/__next._index.txt +9 -9
  380. package/console/settings/channel-apps/__next._tree.txt +1 -1
  381. package/console/settings/channel-apps/__next.settings.channel-apps.__PAGE__.txt +3 -3
  382. package/console/settings/channel-apps/__next.settings.channel-apps.txt +3 -3
  383. package/console/settings/channel-apps/__next.settings.txt +5 -5
  384. package/console/settings/channel-apps.html +1 -1
  385. package/console/settings/channel-apps.txt +17 -17
  386. package/console/settings/cursor-accounts/__next._full.txt +18 -18
  387. package/console/settings/cursor-accounts/__next._head.txt +4 -4
  388. package/console/settings/cursor-accounts/__next._index.txt +9 -9
  389. package/console/settings/cursor-accounts/__next._tree.txt +1 -1
  390. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.__PAGE__.txt +4 -4
  391. package/console/settings/cursor-accounts/__next.settings.cursor-accounts.txt +3 -3
  392. package/console/settings/cursor-accounts/__next.settings.txt +5 -5
  393. package/console/settings/cursor-accounts.html +1 -1
  394. package/console/settings/cursor-accounts.txt +18 -18
  395. package/console/settings/environments/__next._full.txt +17 -17
  396. package/console/settings/environments/__next._head.txt +4 -4
  397. package/console/settings/environments/__next._index.txt +9 -9
  398. package/console/settings/environments/__next._tree.txt +1 -1
  399. package/console/settings/environments/__next.settings.environments.__PAGE__.txt +3 -3
  400. package/console/settings/environments/__next.settings.environments.txt +3 -3
  401. package/console/settings/environments/__next.settings.txt +5 -5
  402. package/console/settings/environments.html +1 -1
  403. package/console/settings/environments.txt +17 -17
  404. package/console/settings/identity-providers/__next._full.txt +18 -18
  405. package/console/settings/identity-providers/__next._head.txt +4 -4
  406. package/console/settings/identity-providers/__next._index.txt +9 -9
  407. package/console/settings/identity-providers/__next._tree.txt +1 -1
  408. package/console/settings/identity-providers/__next.settings.identity-providers.__PAGE__.txt +3 -3
  409. package/console/settings/identity-providers/__next.settings.identity-providers.txt +3 -3
  410. package/console/settings/identity-providers/__next.settings.txt +5 -5
  411. package/console/settings/identity-providers.html +1 -1
  412. package/console/settings/identity-providers.txt +18 -18
  413. package/console/settings/invitations/__next._full.txt +18 -18
  414. package/console/settings/invitations/__next._head.txt +4 -4
  415. package/console/settings/invitations/__next._index.txt +9 -9
  416. package/console/settings/invitations/__next._tree.txt +1 -1
  417. package/console/settings/invitations/__next.settings.invitations.__PAGE__.txt +3 -3
  418. package/console/settings/invitations/__next.settings.invitations.txt +3 -3
  419. package/console/settings/invitations/__next.settings.txt +5 -5
  420. package/console/settings/invitations.html +1 -1
  421. package/console/settings/invitations.txt +18 -18
  422. package/console/settings/licenses/__next._full.txt +18 -18
  423. package/console/settings/licenses/__next._head.txt +4 -4
  424. package/console/settings/licenses/__next._index.txt +9 -9
  425. package/console/settings/licenses/__next._tree.txt +1 -1
  426. package/console/settings/licenses/__next.settings.licenses.__PAGE__.txt +4 -4
  427. package/console/settings/licenses/__next.settings.licenses.txt +3 -3
  428. package/console/settings/licenses/__next.settings.txt +5 -5
  429. package/console/settings/licenses.html +1 -1
  430. package/console/settings/licenses.txt +18 -18
  431. package/console/settings/members/__next._full.txt +17 -17
  432. package/console/settings/members/__next._head.txt +4 -4
  433. package/console/settings/members/__next._index.txt +9 -9
  434. package/console/settings/members/__next._tree.txt +1 -1
  435. package/console/settings/members/__next.settings.members.__PAGE__.txt +3 -3
  436. package/console/settings/members/__next.settings.members.txt +3 -3
  437. package/console/settings/members/__next.settings.txt +5 -5
  438. package/console/settings/members.html +1 -1
  439. package/console/settings/members.txt +17 -17
  440. package/console/settings/memory/__next._full.txt +17 -17
  441. package/console/settings/memory/__next._head.txt +4 -4
  442. package/console/settings/memory/__next._index.txt +9 -9
  443. package/console/settings/memory/__next._tree.txt +1 -1
  444. package/console/settings/memory/__next.settings.memory.__PAGE__.txt +3 -3
  445. package/console/settings/memory/__next.settings.memory.txt +3 -3
  446. package/console/settings/memory/__next.settings.txt +5 -5
  447. package/console/settings/memory.html +1 -1
  448. package/console/settings/memory.txt +17 -17
  449. package/console/settings/oauth-apps/__next._full.txt +17 -17
  450. package/console/settings/oauth-apps/__next._head.txt +4 -4
  451. package/console/settings/oauth-apps/__next._index.txt +9 -9
  452. package/console/settings/oauth-apps/__next._tree.txt +1 -1
  453. package/console/settings/oauth-apps/__next.settings.oauth-apps.__PAGE__.txt +3 -3
  454. package/console/settings/oauth-apps/__next.settings.oauth-apps.txt +3 -3
  455. package/console/settings/oauth-apps/__next.settings.txt +5 -5
  456. package/console/settings/oauth-apps.html +1 -1
  457. package/console/settings/oauth-apps.txt +17 -17
  458. package/console/settings/org-preferences/__next._full.txt +17 -17
  459. package/console/settings/org-preferences/__next._head.txt +4 -4
  460. package/console/settings/org-preferences/__next._index.txt +9 -9
  461. package/console/settings/org-preferences/__next._tree.txt +1 -1
  462. package/console/settings/org-preferences/__next.settings.org-preferences.__PAGE__.txt +3 -3
  463. package/console/settings/org-preferences/__next.settings.org-preferences.txt +3 -3
  464. package/console/settings/org-preferences/__next.settings.txt +5 -5
  465. package/console/settings/org-preferences.html +1 -1
  466. package/console/settings/org-preferences.txt +17 -17
  467. package/console/settings/org-profile/__next._full.txt +18 -18
  468. package/console/settings/org-profile/__next._head.txt +4 -4
  469. package/console/settings/org-profile/__next._index.txt +9 -9
  470. package/console/settings/org-profile/__next._tree.txt +1 -1
  471. package/console/settings/org-profile/__next.settings.org-profile.__PAGE__.txt +3 -3
  472. package/console/settings/org-profile/__next.settings.org-profile.txt +3 -3
  473. package/console/settings/org-profile/__next.settings.txt +5 -5
  474. package/console/settings/org-profile.html +1 -1
  475. package/console/settings/org-profile.txt +18 -18
  476. package/console/settings/platform-clients/__next._full.txt +17 -17
  477. package/console/settings/platform-clients/__next._head.txt +4 -4
  478. package/console/settings/platform-clients/__next._index.txt +9 -9
  479. package/console/settings/platform-clients/__next._tree.txt +1 -1
  480. package/console/settings/platform-clients/__next.settings.platform-clients.__PAGE__.txt +3 -3
  481. package/console/settings/platform-clients/__next.settings.platform-clients.txt +3 -3
  482. package/console/settings/platform-clients/__next.settings.txt +5 -5
  483. package/console/settings/platform-clients.html +1 -1
  484. package/console/settings/platform-clients.txt +17 -17
  485. package/console/settings/pricing-governance/__next._full.txt +18 -18
  486. package/console/settings/pricing-governance/__next._head.txt +4 -4
  487. package/console/settings/pricing-governance/__next._index.txt +9 -9
  488. package/console/settings/pricing-governance/__next._tree.txt +1 -1
  489. package/console/settings/pricing-governance/__next.settings.pricing-governance.__PAGE__.txt +4 -4
  490. package/console/settings/pricing-governance/__next.settings.pricing-governance.txt +3 -3
  491. package/console/settings/pricing-governance/__next.settings.txt +5 -5
  492. package/console/settings/pricing-governance.html +1 -1
  493. package/console/settings/pricing-governance.txt +18 -18
  494. package/console/settings/provider-standing/__next._full.txt +18 -18
  495. package/console/settings/provider-standing/__next._head.txt +4 -4
  496. package/console/settings/provider-standing/__next._index.txt +9 -9
  497. package/console/settings/provider-standing/__next._tree.txt +1 -1
  498. package/console/settings/provider-standing/__next.settings.provider-standing.__PAGE__.txt +4 -4
  499. package/console/settings/provider-standing/__next.settings.provider-standing.txt +3 -3
  500. package/console/settings/provider-standing/__next.settings.txt +5 -5
  501. package/console/settings/provider-standing.html +1 -1
  502. package/console/settings/provider-standing.txt +18 -18
  503. package/console/settings/teams/__next._full.txt +17 -17
  504. package/console/settings/teams/__next._head.txt +4 -4
  505. package/console/settings/teams/__next._index.txt +9 -9
  506. package/console/settings/teams/__next._tree.txt +1 -1
  507. package/console/settings/teams/__next.settings.teams.__PAGE__.txt +3 -3
  508. package/console/settings/teams/__next.settings.teams.txt +3 -3
  509. package/console/settings/teams/__next.settings.txt +5 -5
  510. package/console/settings/teams.html +1 -1
  511. package/console/settings/teams.txt +17 -17
  512. package/console/settings/usage/__next._full.txt +17 -17
  513. package/console/settings/usage/__next._head.txt +4 -4
  514. package/console/settings/usage/__next._index.txt +9 -9
  515. package/console/settings/usage/__next._tree.txt +1 -1
  516. package/console/settings/usage/__next.settings.txt +5 -5
  517. package/console/settings/usage/__next.settings.usage.__PAGE__.txt +3 -3
  518. package/console/settings/usage/__next.settings.usage.txt +3 -3
  519. package/console/settings/usage.html +1 -1
  520. package/console/settings/usage.txt +17 -17
  521. package/console/settings.html +1 -1
  522. package/console/settings.txt +18 -18
  523. package/console/workflows/__next._full.txt +14 -14
  524. package/console/workflows/__next._head.txt +4 -4
  525. package/console/workflows/__next._index.txt +9 -9
  526. package/console/workflows/__next._tree.txt +1 -1
  527. package/console/workflows/__next.workflows.__PAGE__.txt +2 -2
  528. package/console/workflows/__next.workflows.txt +3 -3
  529. package/console/workflows/__placeholder__/__placeholder__/__next._full.txt +15 -15
  530. package/console/workflows/__placeholder__/__placeholder__/__next._head.txt +4 -4
  531. package/console/workflows/__placeholder__/__placeholder__/__next._index.txt +9 -9
  532. package/console/workflows/__placeholder__/__placeholder__/__next._tree.txt +1 -1
  533. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.__PAGE__.txt +3 -3
  534. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.$d$slug.txt +3 -3
  535. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.$d$org.txt +3 -3
  536. package/console/workflows/__placeholder__/__placeholder__/__next.workflows.txt +3 -3
  537. package/console/workflows/__placeholder__/__placeholder__.html +1 -1
  538. package/console/workflows/__placeholder__/__placeholder__.txt +15 -15
  539. package/console/workflows/executions/__next._full.txt +14 -14
  540. package/console/workflows/executions/__next._head.txt +4 -4
  541. package/console/workflows/executions/__next._index.txt +9 -9
  542. package/console/workflows/executions/__next._tree.txt +1 -1
  543. package/console/workflows/executions/__next.workflows.executions.__PAGE__.txt +2 -2
  544. package/console/workflows/executions/__next.workflows.executions.txt +3 -3
  545. package/console/workflows/executions/__next.workflows.txt +3 -3
  546. package/console/workflows/executions/__placeholder__/__next._full.txt +15 -15
  547. package/console/workflows/executions/__placeholder__/__next._head.txt +4 -4
  548. package/console/workflows/executions/__placeholder__/__next._index.txt +9 -9
  549. package/console/workflows/executions/__placeholder__/__next._tree.txt +1 -1
  550. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.__PAGE__.txt +3 -3
  551. package/console/workflows/executions/__placeholder__/__next.workflows.executions.$d$id.txt +3 -3
  552. package/console/workflows/executions/__placeholder__/__next.workflows.executions.txt +3 -3
  553. package/console/workflows/executions/__placeholder__/__next.workflows.txt +3 -3
  554. package/console/workflows/executions/__placeholder__.html +1 -1
  555. package/console/workflows/executions/__placeholder__.txt +15 -15
  556. package/console/workflows/executions.html +1 -1
  557. package/console/workflows/executions.txt +14 -14
  558. package/console/workflows.html +1 -1
  559. package/console/workflows.txt +14 -14
  560. package/main.js +64 -64
  561. package/package.json +6 -6
  562. package/console/_next/static/chunks/0-zcgxw8vt51~.js +0 -1
  563. package/console/_next/static/chunks/01_egbwaa3b.d.js +0 -1
  564. package/console/_next/static/chunks/05uzu4-_sp1yp.js +0 -1
  565. package/console/_next/static/chunks/0io-wgdji~5d0.js +0 -1
  566. package/console/_next/static/chunks/0rihzw4w1wzg3.js +0 -1
  567. package/console/_next/static/chunks/0xy23zns071f6.js +0 -1
  568. package/console/_next/static/chunks/189scd957oqn5.js +0 -1
  569. /package/console/_next/static/{nfAUAfaA7Rib4kBQkLcv6 → T9vVebjeEOLHQ-8r2xUtD}/_buildManifest.js +0 -0
  570. /package/console/_next/static/{nfAUAfaA7Rib4kBQkLcv6 → T9vVebjeEOLHQ-8r2xUtD}/_clientMiddlewareManifest.js +0 -0
  571. /package/console/_next/static/{nfAUAfaA7Rib4kBQkLcv6 → T9vVebjeEOLHQ-8r2xUtD}/_ssgManifest.js +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stigmer/server-slim",
3
- "version": "3.27.1",
3
+ "version": "3.28.0",
4
4
  "description": "Self-contained build of the Stigmer TypeScript control plane, launched by the stigmer CLI's local stack",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -11,11 +11,11 @@
11
11
  "@grpc/grpc-js": "^1.14.4"
12
12
  },
13
13
  "optionalDependencies": {
14
- "@stigmer/server-slim-darwin-arm64": "3.27.1",
15
- "@stigmer/server-slim-darwin-x64": "3.27.1",
16
- "@stigmer/server-slim-linux-x64": "3.27.1",
17
- "@stigmer/server-slim-linux-arm64": "3.27.1",
18
- "@stigmer/server-slim-win32-x64": "3.27.1"
14
+ "@stigmer/server-slim-darwin-arm64": "3.28.0",
15
+ "@stigmer/server-slim-darwin-x64": "3.28.0",
16
+ "@stigmer/server-slim-linux-x64": "3.28.0",
17
+ "@stigmer/server-slim-linux-arm64": "3.28.0",
18
+ "@stigmer/server-slim-win32-x64": "3.28.0"
19
19
  },
20
20
  "repository": {
21
21
  "type": "git",
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,750567,t=>{"use strict";var e=t.i(891287),s=t.i(725842),r=t.i(586108),a=t.i(583093);t.s(["useIdentityProviderList",0,function(t){let i=(0,r.useStigmer)(),{data:n,isLoading:g,isRefetching:o,error:d,refetch:l}=(0,a.useFetch)(t?()=>i.identityProvider.listByOrg((0,e.create)(s.ListIdentityProvidersByOrgInputSchema,{org:t})).then(t=>[...t.entries]):null,[t,i],[]);return{identityProviders:n,isLoading:g,isRefetching:o,error:d,refetch:l}}])},313488,333259,t=>{"use strict";var e=t.i(586108),s=t.i(583093);t.s(["useOrganization",0,function(t){let r=(0,e.useStigmer)(),{data:a,isLoading:i,isRefetching:n,error:g,refetch:o}=(0,s.useFetch)(t?()=>r.organization.get(t):null,[t,r],null);return{organization:a,isLoading:i,isRefetching:n,error:g,refetch:o}}],313488);var r=t.i(271645),a=t.i(326283);t.s(["useUpdateOrganization",0,function(){let t=(0,e.useStigmer)(),[s,i]=(0,r.useState)(!1),[n,g]=(0,r.useState)(null),o=(0,r.useCallback)(()=>g(null),[]);return{update:(0,r.useCallback)(async e=>{i(!0),g(null);try{return await t.organization.update(e)}catch(t){throw g((0,a.toError)(t)),t}finally{i(!1)}},[t]),isUpdating:s,error:n,clearError:o}}],333259)},780268,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976),a=t.i(610595),i=t.i(785767),n=t.i(313488),g=t.i(333259),o=t.i(750567),d=t.i(597744),l=t.i(170255),c=t.i(379410),u=t.i(193799);function m({orgId:t,onUpdated:o,className:d}){let l=(0,s.useId)(),{organization:u,isLoading:p,error:f,refetch:y}=(0,n.useOrganization)(t||null),{update:v,isUpdating:j,error:N,clearError:k}=(0,g.useUpdateOrganization)(),[S,z]=(0,s.useState)(""),[C,w]=(0,s.useState)(""),[L,O]=(0,s.useState)(""),U=u?.metadata?.name??"",P=u?.spec?.description??"",I=u?.spec?.logoUrl??"",$=u?.metadata?.slug??"",A=u?.metadata?.id??"",F=u?.spec?.isPersonal??!1;(0,s.useEffect)(()=>{u&&(z(u.metadata?.name??""),w(u.spec?.description??""),O(u.spec?.logoUrl??""))},[u]);let R=(0,s.useMemo)(()=>S.trim()!==U||C.trim()!==P||L.trim()!==I,[S,C,L,U,P,I]),M=S.trim().length>0&&!j&&R,T=(0,s.useCallback)(()=>{z(U),w(P),O(I),k()},[U,P,I,k]),B=(0,s.useCallback)(async t=>{if(t.preventDefault(),M&&u){k();try{let t=await v({...(0,i.toOrganizationUpdateInput)(u),name:S.trim(),description:C.trim()||void 0,logoUrl:L.trim()||void 0});y(),o?.(t)}catch{}}},[M,u,S,C,L,v,k,y,o]);return p&&!u?(0,e.jsx)("div",{className:(0,r.cn)("stg:space-y-4",d),"aria-busy":"true","aria-label":"Loading organization profile",children:Array.from({length:4},(t,s)=>(0,e.jsx)("div",{className:"stg:bg-muted-subtle stg:h-10 stg:animate-pulse stg:rounded",style:{width:`${90-12*s}%`}},s))}):f?(0,e.jsxs)("div",{className:(0,r.cn)("stg:space-y-3",d),role:"alert",children:[(0,e.jsx)("p",{className:"stg:text-destructive stg:text-sm",children:(0,a.getUserMessage)(f)}),(0,e.jsx)("button",{type:"button",onClick:y,className:(0,r.cn)("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"),children:"Retry"})]}):u?(0,e.jsxs)("form",{onSubmit:B,className:(0,r.cn)("stg:space-y-6",d),children:[(0,e.jsxs)("div",{className:"stg:space-y-3",children:[(0,e.jsx)(h,{label:"Slug",value:$,mono:!0}),(0,e.jsx)(h,{label:"Organization ID",value:A}),F&&(0,e.jsx)("div",{children:(0,e.jsx)("span",{className:"stg:bg-primary-subtle stg:text-primary stg:rounded-full stg:px-2 stg:py-0.5 stg:text-[0.6rem] stg:font-medium stg:uppercase stg:tracking-wider",children:"Personal"})})]}),(0,e.jsx)("hr",{className:"stg:border-border"}),(0,e.jsxs)("div",{className:"stg:space-y-4",children:[(0,e.jsxs)("div",{className:"stg:space-y-1",children:[(0,e.jsx)("label",{htmlFor:`${l}-name`,className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Name"}),(0,e.jsx)("input",{id:`${l}-name`,type:"text",value:S,onChange:t=>z(t.target.value),disabled:j,required:!0,className:(0,r.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-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),(0,e.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"The display name shown in the sidebar and across the platform."})]}),(0,e.jsxs)("div",{className:"stg:space-y-1",children:[(0,e.jsx)("label",{htmlFor:`${l}-desc`,className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Description"}),(0,e.jsx)("textarea",{id:`${l}-desc`,value:C,onChange:t=>w(t.target.value),maxLength:500,rows:3,disabled:j,placeholder:"What is this organization for?",className:(0,r.cn)("stg:w-full stg:resize-y 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-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),(0,e.jsxs)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:[C.length,"/",500," characters"]})]}),(0,e.jsxs)("div",{className:"stg:space-y-1",children:[(0,e.jsx)("label",{htmlFor:`${l}-logo`,className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Logo URL"}),(0,e.jsx)("input",{id:`${l}-logo`,type:"url",value:L,onChange:t=>O(t.target.value),maxLength:2048,disabled:j,placeholder:"https://example.com/logo.png",className:(0,r.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-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),(0,e.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"A public URL to your organization's logo image."}),(0,e.jsx)(b,{url:L.trim()})]})]}),N&&(0,e.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,a.getUserMessage)(N)}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,e.jsxs)("button",{type:"submit",disabled:!M,className:(0,r.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:[j&&(0,e.jsx)(c.SpinnerIcon,{size:12}),"Save changes"]}),R&&!j&&(0,e.jsx)("button",{type:"button",onClick:T,className:(0,r.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"),children:"Discard"})]}),(0,e.jsx)(x,{orgSlug:$})]}):null}function x({orgSlug:t}){let s=(0,d.useResourceAvailable)(l.ApiResourceKind.identity_provider),{identityProviders:r,isLoading:a}=(0,o.useIdentityProviderList)(s&&t?t:null);return s&&t?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("hr",{className:"stg:border-border"}),(0,e.jsxs)("div",{className:"stg:space-y-2",children:[(0,e.jsx)("p",{className:"stg:text-[0.65rem] stg:font-medium stg:text-muted-foreground stg:uppercase stg:tracking-wider",children:"Identity Providers"}),a?(0,e.jsx)("div",{className:"stg:bg-muted-subtle stg:h-8 stg:animate-pulse stg:rounded"}):0===r.length?(0,e.jsxs)("p",{className:"stg:text-xs stg:text-muted-foreground",children:["No identity providers configured."," ",(0,e.jsx)("a",{href:"/settings/identity-providers",className:"stg:text-primary stg:hover:text-primary-hover stg:underline stg:underline-offset-2",children:"Set up federated authentication"})]}):(0,e.jsxs)("div",{className:"stg:space-y-1.5",children:[r.map(t=>{let s=t.spec,r=s?.displayName||t.metadata?.name||"Unnamed",a=s?.isSsoProvider,i=!a&&s?.autoProvisionAccounts;return(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:text-xs",children:[(0,e.jsx)(p,{}),(0,e.jsx)("span",{className:"stg:text-foreground stg:truncate",children:r}),a&&(0,e.jsx)("span",{className:"stg:rounded-full stg:border stg:border-primary/30 stg:bg-primary-subtle stg:px-1.5 stg:py-px stg:text-[0.6rem] stg:font-medium stg:text-primary",children:"SSO"}),i&&(0,e.jsx)("span",{className:"stg:rounded-full stg:border stg:border-primary/30 stg:bg-primary-subtle stg:px-1.5 stg:py-px stg:text-[0.6rem] stg:font-medium stg:text-primary",children:"JIT"})]},t.metadata?.id)}),(0,e.jsx)("a",{href:"/settings/identity-providers",className:"stg:inline-block stg:text-[0.65rem] stg:text-primary stg:hover:text-primary-hover stg:underline stg:underline-offset-2",children:"Manage"})]})]})]}):null}function p(){return(0,e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:shrink-0 stg:text-muted-foreground",children:(0,e.jsx)("path",{d:"M8 1.5L2 4v4c0 3.5 2.5 5.5 6 7 3.5-1.5 6-3.5 6-7V4L8 1.5z"})})}function h({label:t,value:s,mono:a}){let{copy:i,copied:n}=(0,u.useCopyFeedback)();return s?(0,e.jsxs)("div",{className:"stg:space-y-0.5",children:[(0,e.jsx)("p",{className:"stg:text-[0.65rem] stg:font-medium stg:text-muted-foreground stg:uppercase stg:tracking-wider",children:t}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,e.jsx)("span",{className:(0,r.cn)("stg:text-xs stg:text-foreground stg:select-all",a&&"stg:font-mono"),children:s}),(0,e.jsx)("button",{type:"button",onClick:()=>void i(s),className:(0,r.cn)("stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[0.6rem]","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:transition-colors"),"aria-label":`Copy ${t}`,children:n?"Copied":"Copy"})]})]}):null}function b({url:t}){let[a,i]=(0,s.useState)("idle");return((0,s.useEffect)(()=>{i("idle")},[t]),t&&"error"!==a)?(0,e.jsx)("div",{className:"stg:mt-2",children:(0,e.jsx)("img",{src:t,alt:"Organization logo preview",onLoad:()=>i("loaded"),onError:()=>i("error"),className:(0,r.cn)("stg:h-10 stg:w-10 stg:rounded-md stg:border stg:border-border stg:object-contain stg:bg-background","idle"===a&&"stg:opacity-0","loaded"===a&&"stg:opacity-100")})}):null}var f=t.i(297629);t.s(["OrgProfileSection",0,function(){let t=(0,s.useId)(),{activeOrg:r,refresh:a}=(0,f.useOrg)(),i=r?.metadata?.id??"",n=(0,s.useCallback)(t=>{a(t.metadata?.slug)},[a]);return(0,e.jsxs)("section",{"aria-labelledby":t,children:[(0,e.jsx)("h2",{id:t,className:"stg:text-foreground stg:mb-1 stg:text-sm stg:font-semibold",children:"Organization Profile"}),(0,e.jsx)("p",{className:"stg:text-muted-foreground stg:mb-6 stg:text-xs",children:"Manage your organization's display name, description, and logo."}),i?(0,e.jsx)(m,{orgId:i,onUpdated:n}):(0,e.jsx)("p",{className:"stg:text-muted-foreground stg:py-4 stg:text-center stg:text-xs",children:"Select an organization to view its profile."})]})}],780268)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,146312,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976),n=t.i(869803),i=t.i(818094),a=t.i(691444);t.s(["RoleSelector",0,function({kind:t,onSelect:g,selected:l,defaultRole:o,disabled:c=!1,granteeKind:d="identity_account",className:u}){let m=(0,s.useId)(),{options:x,selected:f,select:h}=function(t,e,r="identity_account"){let[n,g]=(0,s.useState)(e??null),l=(0,s.useMemo)(()=>null===t?[]:("team"===r?(0,i.getTeamGrantableRoles)(t):(0,i.getGrantableRoles)(t)).map(t=>({role:t,label:(0,a.iamRoleDisplayName)(t),description:(0,a.iamRoleDescription)(t),value:(0,a.iamRoleToString)(t)})),[t,r]),o=(0,s.useMemo)(()=>null!==n?(0,a.iamRoleToString)(n):"",[n]),c=(0,s.useCallback)(t=>g(t),[]),d=(0,s.useCallback)(()=>g(null),[]);return(0,s.useMemo)(()=>({options:l,selected:n,selectedValue:o,select:c,clear:d,hasOptions:l.length>0}),[l,n,o,c,d])}(t,o,d),p=void 0!==l?l:f;return 0===x.length?null:(0,e.jsxs)("fieldset",{className:(0,r.cn)(n.UNSTYLED_FIELDSET,"stg:space-y-1.5",u),children:[(0,e.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Role"}),(0,e.jsx)("div",{className:"stg:flex stg:flex-wrap stg:gap-2",children:x.map(t=>{let s=p===t.role;return(0,e.jsxs)("label",{className:(0,r.cn)("stg:inline-flex stg:cursor-pointer stg:flex-col stg:rounded-md stg:border stg:px-3 stg:py-1.5 stg:text-xs stg:transition-colors",s?"stg:border-primary stg:bg-primary-subtle stg:text-primary stg:font-medium":"stg:border-input stg:bg-background stg:text-muted-foreground stg:hover:border-border stg:hover:text-foreground",c&&"stg:pointer-events-none stg:opacity-50"),children:[(0,e.jsx)("input",{type:"radio",name:m,value:t.value,checked:s,disabled:c,onChange:()=>{var e;h(e=t.role),g?.(e)},className:"stg:sr-only"}),(0,e.jsx)("span",{children:t.label}),(0,e.jsx)("span",{className:"stg:text-[0.625rem] stg:text-muted-foreground stg:font-normal stg:mt-0.5",children:t.description})]},t.value)})})]})}],146312)},213149,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976),n=t.i(468806),i=t.i(170255),a=t.i(818094),g=t.i(597744),l=t.i(610595),o=t.i(884561),c=t.i(869803),d=t.i(681094),u=t.i(540279),m=t.i(891287),x=t.i(632897),f=t.i(691444),h=t.i(288441),p=t.i(146312),b=t.i(982943),v=t.i(379410);function j({resourceKind:t,resourceKindString:n,resourceId:i,orgId:g,includeTeams:c=!1,excludeGrantees:d,onGranted:u,onCancel:y,className:N}){let{create:k,isCreating:w,error:C,clearError:M}=(0,h.useCreateIamPolicy)(),[S,R]=(0,s.useState)(null),[A,T]=(0,s.useState)(null),L=(0,s.useCallback)(e=>{R(e),T(s=>null===s||null===e||("team"===e.kind?(0,a.isRoleTeamGrantable)(t,s):(0,a.isRoleGrantable)(t,s))?s:null)},[t]),I=null!==S&&null!==A&&!w,z=(0,s.useCallback)(async t=>{if(t.preventDefault(),I&&null!==A&&null!==S){M();try{let t=(0,m.create)(x.IamPolicySpecSchema,{principal:(0,o.granteeRef)(S.grantee),resource:(0,m.create)(x.ApiResourceRefSchema,{kind:n,id:i}),relation:(0,f.iamRoleToString)(A)}),e=await k(t);u?.(e)}catch{}}},[I,A,S,n,i,k,M,u]);return(0,e.jsxs)("form",{onSubmit:z,className:(0,r.cn)("stg:space-y-3",N),children:[(0,e.jsxs)("div",{className:"stg:space-y-3",children:[(0,e.jsx)(b.PrincipalPicker,{orgId:g,value:S,onChange:L,includeTeams:c,excludeGrantees:d,disabled:w}),(0,e.jsx)(p.RoleSelector,{kind:t,granteeKind:S?.kind??"identity_account",selected:A,onSelect:T,disabled:w})]}),C&&(0,e.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(C)}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,e.jsxs)("button",{type:"submit",disabled:!I,className:(0,r.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:[w&&(0,e.jsx)(v.SpinnerIcon,{size:12}),"Grant access"]}),y&&(0,e.jsx)("button",{type:"button",onClick:y,disabled:w,className:(0,r.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:"Cancel"})]})]})}var y=t.i(590150);function N({resource:t,resourceKindString:n,resourceKind:i,orgId:a,className:m}){let{accessList:x,isLoading:f,fetchError:h,revoke:p,isRevoking:b,revokeError:v,refetch:k,hasGrantableRoles:w,canShareWithTeams:C}=(0,d.useShareFlow)(t),M=(0,g.useDeploymentMode)(),[S,R]=(0,s.useState)(!1),A=(0,s.useMemo)(()=>x.flatMap(t=>{let e=t.principal?(0,o.granteeFromView)(t.principal):void 0;return e?[e]:[]}),[x]);if("local"===M&&"organization"!==t.kind)return(0,e.jsxs)("p",{className:(0,r.cn)("stg:text-xs stg:text-muted-foreground",m),children:["This edition does not share ",n.replaceAll("_"," "),"s with individual people. Sharing with specific people is available in Stigmer Enterprise and Cloud."]});let T={kind:n,id:t.id};return(0,e.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-4",m),children:[(0,e.jsxs)("div",{className:"stg:space-y-1",children:[(0,e.jsx)("p",{className:"stg:text-xs stg:text-muted-foreground",children:f?"Loading access list...":`${x.length} with access`}),h&&(0,e.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(h)}),!f&&x.length>0&&(0,e.jsx)("ul",{className:(0,r.cn)(c.UNSTYLED_LIST,"stg:space-y-1 stg:mt-2"),"aria-label":"Who has access",children:x.map(t=>(0,e.jsx)(u.AccessRow,{entry:t,grantGate:T,onRemove:p,isRemoving:b},(0,u.accessEntryKey)(t)))}),v&&(0,e.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,l.getUserMessage)(v)})]}),w&&(0,e.jsx)(y.PermissionGate,{resource:T,relation:"can_grant_access",children:(0,e.jsx)("div",{className:"stg:border-t stg:border-border stg:pt-3",children:S?(0,e.jsx)(j,{resourceKind:i,resourceKindString:n,resourceId:t.id,orgId:a,includeTeams:C,excludeGrantees:A,onGranted:()=>{R(!1),k()},onCancel:()=>R(!1)}):(0,e.jsx)("button",{type:"button",onClick:()=>R(!0),className:(0,r.cn)("stg:w-full stg:rounded-md stg:px-3 stg:py-1.5 stg:text-xs stg:font-medium stg:text-center","stg:border stg:border-dashed stg:border-border","stg:text-muted-foreground stg:hover:text-foreground stg:hover:border-border-prominent","stg:hover:bg-accent-hover stg:transition-colors"),children:C?"+ Add people or teams":"+ Add people"})})})]})}var k=t.i(388023);function w({title:t,description:s,children:r}){return(0,e.jsxs)("section",{className:"stg:px-6 stg:py-4",children:[(0,e.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:text-muted-foreground",children:t}),s&&(0,e.jsx)("p",{className:"stg:mt-0.5 stg:text-[0.65rem] stg:text-muted-foreground",children:s}),(0,e.jsx)("div",{className:"stg:mt-2.5",children:r})]})}function C(){return(0,e.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M4 4l8 8M12 4l-8 8",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}t.s(["ManageAccessDialog",0,function({open:t,onOpenChange:l,resource:o,visibility:c,extraSection:d}){let u=(0,s.useId)(),m=(0,s.useCallback)(()=>{l(!1)},[l]),x=(0,a.hasGrantableRoles)(o.kind),f=(0,g.useResourceAvailable)(i.ApiResourceKind.team)&&(0,a.hasTeamGrantableRoles)(o.kind)?"People and teams with access":"People with access";return(0,e.jsx)(n.DialogShell,{open:t,onOpenChange:l,width:"md","aria-labelledby":u,children:t&&(0,e.jsxs)("div",{className:"stg:flex stg:flex-col",children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:border-b stg:border-border stg:px-6 stg:py-4",children:[(0,e.jsxs)("div",{className:"stg:min-w-0",children:[(0,e.jsx)("h2",{id:u,className:"stg:text-base stg:font-semibold stg:text-foreground",children:"Manage access"}),o.name&&(0,e.jsx)("p",{className:"stg:mt-0.5 stg:truncate stg:text-xs stg:text-muted-foreground",children:o.name})]}),(0,e.jsx)("button",{type:"button",onClick:m,"aria-label":"Close",className:(0,r.cn)("stg:rounded-md stg:p-1 stg:text-muted-foreground","stg:hover:text-foreground stg:hover:bg-accent-hover","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring"),children:(0,e.jsx)(C,{})})]}),(0,e.jsxs)("div",{className:"stg:flex stg:flex-col stg:divide-y stg:divide-border",children:[c&&(0,e.jsx)(w,{title:"General access",description:"Who can find and open this resource.",children:(0,e.jsx)(k.ResourceVisibilityControl,{kind:c.kind,resourceId:o.id,visibility:c.current,org:c.org,onChanged:c.onChanged})}),x&&(0,e.jsx)(w,{title:f,children:(0,e.jsx)(N,{resource:{kind:o.kindString,id:o.id,resourceKind:o.kind},resourceKindString:o.kindString,resourceKind:o.kind,orgId:o.org})}),d&&(0,e.jsx)(w,{title:d.title,description:d.description,children:d.content})]}),(0,e.jsx)("div",{className:"stg:flex stg:items-center stg:justify-end stg:border-t stg:border-border stg:px-6 stg:py-3",children:(0,e.jsx)("button",{type:"button",onClick:m,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring stg:focus:ring-offset-2"),children:"Done"})})]})})}],213149)},10337,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976),n=t.i(468806);t.s(["ConfirmDialog",0,function({state:t,onConfirm:i,onCancel:a}){let g=(0,s.useCallback)(t=>{t||a()},[a]);if(!t)return null;let l="destructive"===t.variant;return(0,e.jsx)(n.DialogShell,{open:!0,onOpenChange:g,width:"sm","aria-label":t.title,children:(0,e.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-4 stg:p-6",children:[(0,e.jsxs)("div",{className:"stg:flex stg:flex-col stg:gap-1.5",children:[(0,e.jsx)("h3",{className:"stg:text-base stg:font-semibold stg:text-foreground",children:t.title}),(0,e.jsx)("p",{className:"stg:text-sm stg:text-muted-foreground",children:t.description})]}),(0,e.jsxs)("div",{className:"stg:flex stg:justify-end stg:gap-2",children:[(0,e.jsx)("button",{type:"button",onClick:a,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"),children:t.cancelLabel??"Cancel"}),(0,e.jsx)("button",{type:"button",onClick:i,className:(0,r.cn)("stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",l?"stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover":"stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover"),children:t.confirmLabel??"Confirm"})]})]})})}])},966205,t=>{"use strict";var e=t.i(271645);t.s(["useConfirmAction",0,function(){let[t,s]=(0,e.useState)(null),r=(0,e.useCallback)(t=>new Promise(e=>{s({...t,resolve:e})}),[]),n=(0,e.useCallback)(()=>{t?.resolve(!0),s(null)},[t]),i=(0,e.useCallback)(()=>{t?.resolve(!1),s(null)},[t]);return(0,e.useMemo)(()=>({confirmState:t,confirm:r,handleConfirm:n,handleCancel:i}),[t,r,n,i])}])},475254,t=>{"use strict";var e=t.i(271645);let s=(...t)=>t.filter((t,e,s)=>!!t&&""!==t.trim()&&s.indexOf(t)===e).join(" ").trim(),r=t=>{let e=t.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,e,s)=>s?s.toUpperCase():e.toLowerCase());return e.charAt(0).toUpperCase()+e.slice(1)};var n={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=(0,e.forwardRef)(({color:t="currentColor",size:r=24,strokeWidth:i=2,absoluteStrokeWidth:a,className:g="",children:l,iconNode:o,...c},d)=>(0,e.createElement)("svg",{ref:d,...n,width:r,height:r,stroke:t,strokeWidth:a?24*Number(i)/Number(r):i,className:s("lucide",g),...!l&&!(t=>{for(let e in t)if(e.startsWith("aria-")||"role"===e||"title"===e)return!0;return!1})(c)&&{"aria-hidden":"true"},...c},[...o.map(([t,s])=>(0,e.createElement)(t,s)),...Array.isArray(l)?l:[l]]));t.s(["default",0,(t,n)=>{let a=(0,e.forwardRef)(({className:a,...g},l)=>(0,e.createElement)(i,{ref:l,iconNode:n,className:s(`lucide-${r(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${t}`,a),...g}));return a.displayName=r(t),a}],475254)},678745,t=>{"use strict";let e=(0,t.i(475254).default)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);t.s(["default",0,e])},845132,678784,916624,t=>{"use strict";var e=t.i(843476),s=t.i(893976),r=t.i(704077),n=t.i(678745);t.s(["CheckIcon",()=>n.default],678784);var n=n,i=t.i(364354);function a(t){return(0,e.jsx)(r.Menu.Root,{...t})}function g(t){return(0,e.jsx)(r.Menu.Trigger,{...t})}function l({align:t="start",alignOffset:n=0,side:a="bottom",sideOffset:g=4,className:o,...c}){let d=(0,i.useStigmerPortalContainer)();return(0,e.jsx)(r.Menu.Portal,{container:d,children:(0,e.jsx)(r.Menu.Positioner,{className:"stg:isolate stg:z-50 stg:outline-none",align:t,alignOffset:n,side:a,sideOffset:g,children:(0,e.jsx)(r.Menu.Popup,{className:(0,s.cn)("stg:bg-popover stg:text-popover-foreground stg:ring-foreground/10","stg:data-[side=bottom]:slide-in-from-top-2 stg:data-[side=inline-end]:slide-in-from-left-2 stg:data-[side=inline-start]:slide-in-from-right-2 stg:data-[side=left]:slide-in-from-right-2 stg:data-[side=right]:slide-in-from-left-2 stg:data-[side=top]:slide-in-from-bottom-2","stg:data-open:animate-in stg:data-open:fade-in-0 stg:data-open:zoom-in-95","stg:data-closed:animate-out stg:data-closed:fade-out-0 stg:data-closed:zoom-out-95","stg:z-50 stg:max-h-(--available-height) stg:w-(--anchor-width) stg:min-w-32 stg:origin-(--transform-origin) stg:overflow-x-hidden stg:overflow-y-auto stg:rounded-lg stg:p-1 stg:shadow-md stg:ring-1 stg:duration-100 stg:outline-none stg:data-closed:overflow-hidden",o),...c})})})}function o({className:t,variant:n="default",...i}){return(0,e.jsx)(r.Menu.Item,{"data-variant":n,className:(0,s.cn)("stg:focus:bg-accent stg:focus:text-accent-foreground stg:not-data-[variant=destructive]:focus:**:text-accent-foreground","stg:data-[variant=destructive]:text-destructive stg:data-[variant=destructive]:focus:bg-destructive-subtle stg:data-[variant=destructive]:focus:text-destructive stg:data-[variant=destructive]:*:[svg]:text-destructive","stg:relative stg:flex stg:cursor-default stg:items-center stg:gap-1.5 stg:rounded-md stg:px-1.5 stg:py-1 stg:text-sm stg:outline-hidden stg:select-none","stg:data-disabled:pointer-events-none stg:data-disabled:opacity-50","stg:[&_svg]:pointer-events-none stg:[&_svg]:shrink-0 stg:[&_svg:not([class*='size-'])]:size-4",t),...i})}function c({className:t,...n}){return(0,e.jsx)(r.Menu.Separator,{className:(0,s.cn)("stg:bg-border stg:-mx-1 stg:my-1 stg:h-px",t),...n})}function d({className:t,...s}){return(0,e.jsx)("div",{role:"group",className:t,...s})}function u({className:t,...r}){return(0,e.jsx)("span",{className:(0,s.cn)("stg:text-muted-foreground stg:block stg:px-1.5 stg:py-1 stg:text-[11px] stg:font-medium stg:uppercase stg:tracking-wider stg:select-none",t),...r})}t.s(["Menu",0,a,"MenuContent",0,l,"MenuGroup",0,d,"MenuItem",0,o,"MenuLabel",0,u,"MenuRadioGroup",0,function(t){return(0,e.jsx)(r.Menu.RadioGroup,{...t})},"MenuRadioItem",0,function({className:t,children:i,...a}){return(0,e.jsxs)(r.Menu.RadioItem,{className:(0,s.cn)("stg:focus:bg-accent stg:focus:text-accent-foreground stg:focus:**:text-accent-foreground","stg:relative stg:flex stg:cursor-default stg:items-center stg:gap-1.5 stg:rounded-md stg:py-1 stg:pr-8 stg:pl-1.5 stg:text-sm stg:outline-hidden stg:select-none","stg:data-disabled:pointer-events-none stg:data-disabled:opacity-50","stg:[&_svg]:pointer-events-none stg:[&_svg]:shrink-0 stg:[&_svg:not([class*='size-'])]:size-4",t),...a,children:[(0,e.jsx)("span",{className:"stg:pointer-events-none stg:absolute stg:right-2 stg:flex stg:items-center stg:justify-center",children:(0,e.jsx)(r.Menu.RadioItemIndicator,{children:(0,e.jsx)(n.default,{})})}),i]})},"MenuSeparator",0,c,"MenuTrigger",0,g],916624);let m=Object.assign(function({children:t}){return(0,e.jsx)(a,{children:t})},{Trigger:function({children:t,className:r,"aria-label":n="Actions"}){return(0,e.jsx)(g,{className:(0,s.cn)("stg:inline-flex stg:items-center stg:justify-center stg:rounded-md stg:p-1","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:data-popup-open:bg-accent stg:data-popup-open:text-foreground",r),"aria-label":n,children:t})},Content:function({children:t,align:r="end",className:n}){return(0,e.jsx)(l,{align:r,className:(0,s.cn)("stg:min-w-44",n),children:t})},Item:function({children:t,onSelect:r,icon:n,shortcut:i,variant:a="default",disabled:g,className:l}){return(0,e.jsxs)(o,{variant:a,disabled:g,onClick:r,className:(0,s.cn)("stg:justify-between",l),children:[(0,e.jsxs)("span",{className:"stg:flex stg:items-center stg:gap-2",children:[n,(0,e.jsx)("span",{children:t})]}),i&&(0,e.jsx)("kbd",{className:"stg:ml-auto stg:text-[11px] stg:tracking-widest stg:text-muted-foreground-subtle",children:i})]})},Separator:function({className:t}){return(0,e.jsx)(c,{className:t})},Group:function({children:t,label:s,className:r}){return(0,e.jsxs)(d,{className:r,children:[s&&(0,e.jsx)(u,{children:s}),t]})}});t.s(["ActionMenu",0,m],845132)},476007,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(610595),n=t.i(893976);let i={auth:"Authentication required",permission:"Access denied","not-found":"Not found",validation:"Invalid request",server:"Server error",unavailable:"Service unavailable",cancelled:"Request cancelled",unknown:"Something went wrong"};function a({className:t}){return(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M7.13 2.5a1 1 0 0 1 1.74 0l5.5 9.5A1 1 0 0 1 13.5 13.5h-11a1 1 0 0 1-.87-1.5l5.5-9.5z"}),(0,e.jsx)("path",{d:"M8 6v3"}),(0,e.jsx)("circle",{cx:"8",cy:"11",r:"0.5",fill:"currentColor",stroke:"none"})]})}function g({className:t}){return(0,e.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M8 1.5l5 2v4c0 3.5-2.5 5.5-5 6.5-2.5-1-5-3-5-6.5v-4l5-2z"}),(0,e.jsx)("path",{d:"M6 6.5l4 4M10 6.5l-4 4"})]})}function l({className:t}){return(0,e.jsx)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:(0,e.jsx)("path",{d:"M4 6l4 4 4-4"})})}function o({className:t}){return(0,e.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:t,"aria-hidden":"true",children:[(0,e.jsx)("path",{d:"M2 6.5h4v-4"}),(0,e.jsx)("path",{d:"M3.5 11.5a5.5 5.5 0 1 0 .5-6l-2 1"})]})}t.s(["ErrorMessage",0,function({error:t,title:c,retry:d,className:u}){let[m,x]=(0,s.useState)(!1);if(!t)return null;let f=(0,r.classifyError)(t),h=(0,r.getUserMessage)(t),p=(0,r.getRpcMetadata)(t),b=(0,r.isRetryableError)(t);return(0,e.jsx)("div",{role:"alert",className:(0,n.cn)("stg:bg-destructive-subtle stg:border-destructive/20 stg:text-destructive stg:rounded-lg stg:border stg:p-4",u),children:(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-3",children:["auth"===f||"permission"===f?(0,e.jsx)(g,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}):(0,e.jsx)(a,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,e.jsxs)("div",{className:"stg:min-w-0 stg:flex-1 stg:space-y-1",children:[(0,e.jsx)("p",{className:"stg:text-sm stg:font-medium",children:c??i[f]}),(0,e.jsx)("p",{className:"stg:text-destructive-muted stg:text-sm",children:h}),p&&(0,e.jsxs)("div",{className:"stg:pt-1",children:[(0,e.jsxs)("button",{type:"button",onClick:()=>x(t=>!t),className:"stg:text-destructive-muted stg:hover:text-destructive-muted stg:inline-flex stg:items-center stg:gap-1 stg:text-xs stg:transition-colors",children:[(0,e.jsx)(l,{className:(0,n.cn)("stg:size-3 stg:transition-transform",m&&"stg:rotate-180")}),"Technical details"]}),m&&(0,e.jsxs)("dl",{className:"stg:text-destructive-muted stg:mt-1.5 stg:space-y-0.5 stg:font-mono stg:text-xs",children:[(0,e.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,e.jsx)("dt",{className:"stg:shrink-0",children:"Method:"}),(0,e.jsx)("dd",{className:"stg:truncate",children:p.method})]}),(0,e.jsxs)("div",{className:"stg:flex stg:gap-2",children:[(0,e.jsx)("dt",{className:"stg:shrink-0",children:"Path:"}),(0,e.jsx)("dd",{className:"stg:truncate",children:p.path})]})]})]})]}),d&&b&&(0,e.jsxs)("button",{type:"button",onClick:d,className:(0,n.cn)("stg:inline-flex stg:shrink-0 stg:items-center stg:gap-1.5 stg:rounded-md stg:border stg:px-2.5 stg:py-1.5 stg:text-xs stg:font-medium","stg:border-destructive/20 stg:text-destructive stg:hover:bg-destructive-subtle","stg:transition-colors"),children:[(0,e.jsx)(o,{className:"stg:size-3"}),"Retry"]})]})})}])},266442,t=>{"use strict";var e=t.i(843476),s=t.i(893976),r=t.i(188482);let n={ready:"Ready",running:"Running",pending:"Pending",degraded:"Degraded",failed:"Failed",disabled:"Disabled",draft:"Draft"};t.s(["StatusBadge",0,function({phase:t,label:i,tooltip:a,className:g}){let l=i??n[t],o=(0,e.jsxs)("span",{className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-full stg:px-2 stg:py-0.5 stg:text-[11px] stg:font-medium stg:leading-none",function(t){switch(t){case"ready":return"stg:bg-[var(--stgm-status-ready-subtle)] stg:text-[var(--stgm-status-ready)]";case"running":return"stg:bg-[var(--stgm-status-running-subtle)] stg:text-[var(--stgm-status-running)]";case"pending":return"stg:bg-[var(--stgm-status-pending-subtle)] stg:text-[var(--stgm-status-pending)]";case"degraded":return"stg:bg-[var(--stgm-status-degraded-subtle)] stg:text-[var(--stgm-status-degraded)]";case"failed":return"stg:bg-[var(--stgm-status-failed-subtle)] stg:text-[var(--stgm-status-failed)]";case"disabled":return"stg:bg-[var(--stgm-status-disabled-subtle)] stg:text-[var(--stgm-status-disabled)]";case"draft":return"stg:bg-[var(--stgm-status-draft-subtle)] stg:text-[var(--stgm-status-draft)]"}}(t),g),children:[(0,e.jsx)("span",{className:(0,s.cn)("stg:size-1.5 stg:shrink-0 stg:rounded-full",function(t){switch(t){case"ready":return"stg:bg-[var(--stgm-status-ready)]";case"running":return"stg:bg-[var(--stgm-status-running)]";case"pending":return"stg:bg-[var(--stgm-status-pending)]";case"degraded":return"stg:bg-[var(--stgm-status-degraded)]";case"failed":return"stg:bg-[var(--stgm-status-failed)]";case"disabled":return"stg:bg-[var(--stgm-status-disabled)]";case"draft":return"stg:bg-[var(--stgm-status-draft)]"}}(t)),"aria-hidden":"true"}),l]});return a?(0,e.jsxs)(r.Tooltip,{children:[(0,e.jsx)(r.TooltipTrigger,{render:(0,e.jsx)("span",{className:"stg:inline-flex"}),children:o}),(0,e.jsx)(r.TooltipContent,{side:"top",children:a})]}):o}])},193799,t=>{"use strict";var e=t.i(271645);t.s(["useCopyFeedback",0,function(){let[t,s]=(0,e.useState)(!1),r=(0,e.useRef)(null);(0,e.useEffect)(()=>()=>{null!==r.current&&clearTimeout(r.current)},[]);let n=(0,e.useCallback)(async t=>{try{await navigator.clipboard.writeText(t)}catch{return!1}return s(!0),null!==r.current&&clearTimeout(r.current),r.current=setTimeout(()=>s(!1),2e3),!0},[]);return(0,e.useMemo)(()=>({copy:n,copied:t}),[n,t])}])},927056,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976);t.s(["Tabs",0,function({tabs:t,activeTab:n,onTabChange:i,children:a,"aria-label":g,className:l}){let o=(0,s.useId)(),c=(0,s.useRef)(new Map),d=t=>`${o}-tab-${t}`,u=t=>`${o}-panel-${t}`,m=(0,s.useCallback)(t=>{c.current.get(t)?.focus(),i(t)},[i]),x=(0,s.useCallback)(e=>{let s=t.findIndex(t=>t.id===n);if(-1===s)return;let r=null;switch(e.key){case"ArrowRight":r=(s+1)%t.length;break;case"ArrowLeft":r=(s-1+t.length)%t.length;break;case"Home":r=0;break;case"End":r=t.length-1;break;default:return}e.preventDefault(),m(t[r].id)},[t,n,m]);return(0,e.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col",l),children:[(0,e.jsx)("div",{role:"tablist","aria-label":g,onKeyDown:x,className:"stg:flex stg:border-b stg:border-border",children:t.map(t=>{let s=t.id===n;return(0,e.jsxs)("button",{ref:e=>{e?c.current.set(t.id,e):c.current.delete(t.id)},id:d(t.id),role:"tab",type:"button","aria-selected":s,"aria-controls":u(t.id),tabIndex:s?0:-1,onClick:()=>i(t.id),"data-cursor-target":`tab-${t.id}`,className:(0,r.cn)("stg:relative stg:inline-flex stg:items-center stg:gap-1.5 stg:px-3 stg:py-2 stg:text-xs stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring stg:focus-visible:ring-offset-1",s?"stg:text-foreground":"stg:text-muted-foreground stg:hover:text-foreground"),children:[t.icon,t.label,null!=t.badge&&t.badge>0&&(0,e.jsx)("span",{"aria-hidden":"true",className:(0,r.cn)("stg:inline-flex stg:min-w-[1.25rem] stg:items-center stg:justify-center stg:rounded-full stg:px-1 stg:py-px stg:text-[10px] stg:font-medium stg:leading-none",s?"stg:bg-primary-subtle stg:text-primary":"stg:bg-muted stg:text-muted-foreground"),children:t.badge}),s&&(0,e.jsx)("span",{className:"stg:absolute stg:inset-x-0 stg:-bottom-px stg:h-0.5 stg:bg-primary","aria-hidden":"true"})]},t.id)})}),(0,e.jsx)("div",{id:u(n),role:"tabpanel","aria-labelledby":d(n),tabIndex:0,className:"stg:min-h-0 stg:flex-1 stg:pt-4 stg:focus-visible:outline-none",children:a})]})}])},107141,t=>{"use strict";var e=t.i(271645),s=t.i(618566);let r="__placeholder__";t.s(["useStaticRouteParam",0,function(t,n=1){let i=(0,s.useParams)()[t];return(0,e.useMemo)(()=>{if(i!==r)return i;let t=window.location.pathname.split("/").filter(Boolean),e=t[t.length-n];return e&&e!==r?e:null},[i,n])}])},668093,652337,t=>{"use strict";var e=t.i(843476),s=t.i(893976),r=t.i(266442),n=t.i(927056),i=t.i(271645),a=t.i(845132);function g({primaryAction:t,actions:r,className:n}){let i=null!=r&&r.length>0;return t||i?(0,e.jsxs)("div",{className:(0,s.cn)("stg:flex stg:items-center stg:gap-2",n),children:[t&&(0,e.jsxs)("button",{type:"button",onClick:t.onAction,disabled:t.disabled,className:(0,s.cn)("stg:inline-flex stg:items-center stg:gap-1.5 stg:rounded-md stg:px-3 stg:py-1.5 stg:text-sm stg:font-medium stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[t.icon,t.label]}),i&&(0,e.jsx)(l,{actions:r})]}):null}function l({actions:t}){var s;let r=(s=t,(0,i.useMemo)(()=>{let t=new Map;for(let e of s){let s=e.group??"__default",r=t.get(s);r?r.push(e):t.set(s,[e])}return Array.from(t.entries()).map(([t,e])=>({key:t,items:e}))},[s]));return(0,e.jsxs)(a.ActionMenu,{children:[(0,e.jsx)(a.ActionMenu.Trigger,{"aria-label":"More actions",children:(0,e.jsx)(o,{className:"stg:size-4"})}),(0,e.jsx)(a.ActionMenu.Content,{children:r.map((t,s)=>(0,e.jsxs)(a.ActionMenu.Group,{children:[s>0&&(0,e.jsx)(a.ActionMenu.Separator,{}),t.items.map(t=>(0,e.jsx)(a.ActionMenu.Item,{icon:t.icon,shortcut:t.shortcut,variant:t.variant,disabled:t.disabled,onSelect:t.onAction,children:t.label},t.id))]},t.key))})]})}function o({className:t}){return(0,e.jsxs)("svg",{className:t,viewBox:"0 0 16 16",fill:"currentColor","aria-hidden":"true",children:[(0,e.jsx)("circle",{cx:"8",cy:"3",r:"1.25"}),(0,e.jsx)("circle",{cx:"8",cy:"8",r:"1.25"}),(0,e.jsx)("circle",{cx:"8",cy:"13",r:"1.25"})]})}function c({header:t,visibilityControl:s,metaExtra:n}){let{name:i,nameElement:a,org:g,slug:l,qualifiedSlug:o,description:m,iconUrl:x,icon:f,createdAt:h,updatedAt:p,status:b,statusLabel:v}=t,j=l&&l!==i&&!o;return(0,e.jsxs)("div",{className:"stg:flex stg:min-w-0 stg:items-start stg:gap-3",children:[x?(0,e.jsx)("img",{src:x,alt:"",className:"stg:mt-0.5 stg:size-8 stg:shrink-0 stg:rounded stg:object-cover"}):f?(0,e.jsx)("span",{className:"stg:mt-1 stg:shrink-0",children:f}):null,(0,e.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[a??(0,e.jsx)("h2",{className:"stg:truncate stg:text-lg stg:font-semibold stg:text-foreground",children:i}),j&&(0,e.jsx)("code",{className:"stg:shrink-0 stg:rounded stg:bg-muted stg:px-1.5 stg:py-0.5 stg:text-xs stg:font-medium stg:text-muted-foreground",children:l}),b&&(0,e.jsx)(r.StatusBadge,{phase:b,label:v}),s]}),o&&(0,e.jsx)("span",{className:"stg:mt-0.5 stg:block stg:truncate stg:font-mono stg:text-xs stg:text-muted-foreground",children:o}),(0,e.jsxs)("div",{className:"stg:mt-0.5 stg:flex stg:flex-wrap stg:items-center stg:gap-x-1.5 stg:text-xs stg:text-muted-foreground",children:[g&&(0,e.jsx)("span",{children:g}),n,h&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(d,{}),(0,e.jsxs)("span",{children:["Created ",u(h)]})]}),p&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(d,{}),(0,e.jsxs)("span",{children:["Updated ",u(p)]})]})]}),m&&(0,e.jsx)("p",{className:"stg:mt-2 stg:text-sm stg:text-muted-foreground",children:m})]})]})}function d(){return(0,e.jsx)("span",{className:"stg:shrink-0","aria-hidden":"true",children:"·"})}function u(t){return t.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}function m({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z"})})}t.s(["ResourceDetailShell",0,function({header:t,visibilityControl:r,headerMetaExtra:i,headerBanner:a,primaryAction:l,actions:o,tabs:d,activeTab:u,onTabChange:m,tabsAriaLabel:x,children:f,className:h}){let p=null!=d&&d.length>0;return(0,e.jsxs)("div",{className:(0,s.cn)("stg:flex stg:flex-col stg:gap-6",h),children:[a,(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-4",children:[(0,e.jsx)(c,{header:t,visibilityControl:r,metaExtra:i}),(0,e.jsx)(g,{primaryAction:l,actions:o,className:"stg:shrink-0"})]}),p&&u&&m?(0,e.jsx)(n.Tabs,{tabs:d,activeTab:u,onTabChange:m,"aria-label":x,children:f}):f]})}],668093),t.s(["Section",0,function({title:t,count:r,headerActions:n,onEdit:i,scrollTarget:a,children:g,className:l}){return(0,e.jsxs)("section",{className:l,"data-scroll-target":a,children:[(0,e.jsxs)("div",{className:"stg:mb-2 stg:flex stg:items-center stg:gap-2",children:[(0,e.jsx)("h3",{className:"stg:text-xs stg:font-medium stg:uppercase stg:tracking-wider stg:text-muted-foreground",children:t}),null!=r&&r>0&&(0,e.jsx)("span",{className:"stg:inline-flex stg:size-5 stg:items-center stg:justify-center stg:rounded-full stg:bg-muted stg:text-[10px] stg:font-semibold stg:text-muted-foreground",children:r}),(n||i)&&(0,e.jsxs)("div",{className:"stg:ml-auto stg:flex stg:items-center stg:gap-1",children:[n,i&&(0,e.jsx)("button",{type:"button",onClick:i,"aria-label":`Edit ${t.toLowerCase()}`,className:(0,s.cn)("stg:inline-flex stg:size-6 stg:items-center stg:justify-center stg:rounded-md stg:text-muted-foreground","stg:hover:bg-accent-hover stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring","stg:transition-colors"),children:(0,e.jsx)(m,{className:"stg:size-3.5"})})]})]}),(0,e.jsx)("div",{className:"stg:overflow-hidden stg:rounded-lg stg:border stg:border-border",children:g})]})}],652337)},261722,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(893976);function n({className:t}){return(0,e.jsx)("svg",{className:t,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z"})})}function i(){return(0,e.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",className:"stg:animate-spin","aria-hidden":"true",children:(0,e.jsx)("path",{d:"M8 2a6 6 0 1 0 6 6"})})}t.s(["InlineEditTextarea",0,function({value:t,onSave:a,placeholder:g="Click to edit",validate:l,minRows:o=3,disabled:c,isSaving:d,error:u,className:m}){let[x,f]=(0,s.useState)(!1),[h,p]=(0,s.useState)(t),[b,v]=(0,s.useState)(null),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{x&&(p(t),v(null),requestAnimationFrame(()=>{let t=j.current;t&&(t.focus(),t.selectionStart=t.value.length)}))},[x,t]),(0,s.useEffect)(()=>{let t=j.current;t&&(t.style.height="auto",t.style.height=`${t.scrollHeight}px`)},[h,x]);let y=(0,s.useCallback)(async()=>{if(h===t)return void f(!1);if(l){let t=l(h);if(t)return void v(t)}await a(h)&&f(!1)},[h,t,l,a]),N=(0,s.useCallback)(()=>{f(!1),p(t),v(null)},[t]),k=(0,s.useCallback)(t=>{"Enter"===t.key&&(t.ctrlKey||t.metaKey)?(t.preventDefault(),y()):"Escape"===t.key&&N()},[y,N]),w=b||u;return c||!x?(0,e.jsx)("div",{className:(0,r.cn)("stg:group/inline-edit",m),children:(0,e.jsx)("button",{type:"button",onClick:()=>{c||f(!0)},disabled:c,className:(0,r.cn)("stg:w-full stg:rounded-md stg:px-2 stg:py-1.5 stg:text-left stg:transition-colors",!c&&"stg:hover:bg-accent-hover stg:cursor-pointer",c&&"stg:cursor-default","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-inset stg:focus-visible:ring-ring"),children:(0,e.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-2",children:[(0,e.jsx)("pre",{className:(0,r.cn)("stg:min-w-0 stg:whitespace-pre-wrap stg:break-words stg:font-mono stg:text-sm stg:text-foreground",!t&&"stg:text-muted-foreground stg:italic stg:font-sans"),children:t||g}),!c&&(0,e.jsx)(n,{className:"stg:mt-0.5 stg:size-3 stg:shrink-0 stg:text-muted-foreground stg:opacity-0 stg:transition-opacity stg:group-hover/inline-edit:opacity-100"})]})})}):(0,e.jsxs)("div",{className:(0,r.cn)("stg:flex stg:flex-col stg:gap-1.5",m),children:[(0,e.jsx)("textarea",{ref:j,value:h,onChange:t=>{p(t.target.value),v(null)},onKeyDown:k,disabled:d,placeholder:g,rows:o,className:(0,r.cn)("stg:w-full stg:resize-y stg:rounded-md stg:border stg:border-border stg:bg-input-bg stg:px-3 stg:py-2 stg:font-mono stg:text-sm stg:text-foreground","stg:focus:outline-none stg:focus:ring-2 stg:focus:ring-ring","stg:disabled:opacity-50",w&&"stg:border-destructive")}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:justify-between",children:[(0,e.jsx)("span",{className:"stg:text-[10px] stg:text-muted-foreground",children:d?"Saving...":"Ctrl+Enter to save, Escape to cancel"}),(0,e.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-1.5",children:[(0,e.jsx)("button",{type:"button",onClick:N,disabled:d,className:(0,r.cn)("stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:border stg:border-border stg:bg-background stg:text-foreground stg:hover:bg-accent stg:hover:text-accent-foreground","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:"Cancel"}),(0,e.jsxs)("button",{type:"button",onClick:y,disabled:d,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-primary stg:text-primary-foreground stg:hover:bg-primary-hover","stg:disabled:opacity-50","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring"),children:[d&&(0,e.jsx)(i,{}),"Save"]})]})]}),w&&(0,e.jsx)("p",{className:"stg:px-1 stg:text-xs stg:text-destructive",role:"alert",children:w})]})}])},484763,t=>{"use strict";var e=t.i(843476),s=t.i(271645),r=t.i(981922),n=t.i(213149);t.s(["useManageAccess",0,function({resource:t,visibility:i,extraSection:a,label:g="Manage access"}){let[l,o]=(0,s.useState)(!1),{allowed:c}=(0,r.useCheckPermission)(t?{kind:t.kindString,id:t.id}:null,"can_view_access"),d=(0,s.useCallback)(()=>o(!0),[]);return{action:t&&c?{id:"manage-access",label:g,group:"sharing",onAction:d}:null,dialog:t?(0,e.jsx)(n.ManageAccessDialog,{open:l,onOpenChange:o,resource:t,visibility:i,extraSection:a}):null,open:d,isOpen:l}}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,506213,e=>{"use strict";e.s([],593742),e.i(593742);var t,n=e.i(271645),r=e.i(66196),s=e.i(58509),i=e.i(933605),o=e.i(789633),a=e.i(926665),l=e.i(151665),u=e.i(206157);e.i(247167);var c=e.i(367805);let d=n.createContext(void 0);function g(e){let t=n.useContext(d);if(void 0===t&&!e)throw Error((0,c.default)(47));return t}var p=e.i(174080),f=e.i(598263),v=e.i(783921),b=e.i(566745),m=e.i(630628),h=e.i(294365),x=e.i(803404),S=e.i(600628),k=e.i(769375),y=e.i(607335);let R={...S.popupStoreSelectors,disabled:(0,v.createSelector)(e=>e.disabled),instantType:(0,v.createSelector)(e=>e.instantType),openMethod:(0,v.createSelector)(e=>e.openMethod),openChangeReason:(0,v.createSelector)(e=>e.openChangeReason),modal:(0,v.createSelector)(e=>e.modal),stickIfOpen:(0,v.createSelector)(e=>e.stickIfOpen),titleElementId:(0,v.createSelector)(e=>e.titleElementId),descriptionElementId:(0,v.createSelector)(e=>e.descriptionElementId),openOnHover:(0,v.createSelector)(e=>e.openOnHover),closeDelay:(0,v.createSelector)(e=>e.closeDelay),hasViewport:(0,v.createSelector)(e=>e.hasViewport)};class C extends f.ReactStore{constructor(e){const t={...(0,S.createInitialPopupStoreState)(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1,...e};t.open&&e?.mounted===void 0&&(t.mounted=!0),super(t,{popupRef:n.createRef(),backdropRef:n.createRef(),internalBackdropRef:n.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:n.createRef(),beforeContentFocusGuardRef:n.createRef(),stickIfOpenTimeout:new b.Timeout,triggerElements:new k.PopupTriggerMap},R)}setOpen=(e,t)=>{let n=t.reason===x.REASONS.triggerHover,r=t.reason===x.REASONS.triggerPress&&0===t.event.detail,s=!e&&(t.reason===x.REASONS.escapeKey||null==t.reason);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;let i={open:e,nativeEvent:t.event,reason:t.reason,nested:this.state.nested,triggerElement:t.trigger},o=this.state.floatingRootContext.context.events;o?.emit("openchange",i);let a=()=>{let n={open:e,openChangeReason:t.reason},r=t.trigger?.id??null;(r||e)&&(n.activeTriggerId=r,n.activeTriggerElement=t.trigger??null),this.update(n)};n?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(y.PATIENT_CLICK_THRESHOLD,()=>{this.set("stickIfOpen",!1)}),p.flushSync(a)):a(),r||s?this.set("instantType",r?"click":"dismiss"):t.reason===x.REASONS.focusOut?this.set("instantType","focus"):this.set("instantType",void 0)};static useStore(e,t){let n=(0,m.useRefWithInit)(()=>new C(t)).current,r=e??n;return(0,h.useOnMount)(n.disposeEffect),r}disposeEffect=()=>this.context.stickIfOpenTimeout.disposeEffect()}var E=e.i(5963),w=e.i(258642),O=e.i(450091),j=e.i(843476);function I({props:e}){let{children:t,open:c,defaultOpen:g=!1,onOpenChange:p,onOpenChangeComplete:f,modal:v=!1,handle:b,triggerId:m,defaultTriggerId:h=null}=e,S=C.useStore(b?.store,{modal:v,open:g,openProp:c,activeTriggerId:h,triggerIdProp:m});(0,s.useOnFirstRender)(()=>{void 0===c&&!1===S.state.open&&!0===g&&S.update({open:!0,activeTriggerId:h})}),S.useControlledProp("openProp",c),S.useControlledProp("triggerIdProp",m);let k=S.useState("open"),y=S.useState("positionerElement"),R=S.useState("payload"),T=S.useState("openChangeReason");S.useContextCallback("onOpenChange",p),S.useContextCallback("onOpenChangeComplete",f);let{openMethod:P,triggerProps:M}=(0,O.useOpenInteractionType)(k);(0,w.useImplicitActiveTrigger)(S);let{forceUnmount:A}=(0,w.useOpenStateTransitions)(k,S,()=>{S.update({stickIfOpen:!0,openChangeReason:null})});(0,r.useScrollLock)(k&&!0===v&&T!==x.REASONS.triggerHover&&"touch"!==P,y),n.useEffect(()=>{k||S.context.stickIfOpenTimeout.clear()},[S,k]);let N=n.useCallback(e=>{let t=(0,E.createChangeEventDetails)(e);return t.preventUnmountOnClose=()=>{S.set("preventUnmountingOnClose",!0)},t},[S]),F=n.useCallback(()=>{S.setOpen(!1,N(x.REASONS.imperativeAction))},[S,N]);n.useImperativeHandle(e.actionsRef,()=>({unmount:A,close:F}),[A,F]);let V=(0,u.useSyncedFloatingRootContext)({popupStore:S,onOpenChange:S.setOpen}),D=(0,i.useDismiss)(V,{outsidePressEvent:{mouse:"trap-focus"===v?"sloppy":"intentional",touch:"sloppy"}}),L=(0,a.useRole)(V),{getReferenceProps:H,getFloatingProps:B,getTriggerProps:_}=(0,o.useInteractions)([D,L]),z=n.useMemo(()=>H(M),[H,M]),U=n.useMemo(()=>_(M),[_,M]),K=n.useMemo(()=>B(),[B]);S.useSyncedValues({modal:v,openMethod:P,activeTriggerProps:z,inactiveTriggerProps:U,popupProps:K,floatingRootContext:V,nested:null!=(0,l.useFloatingParentNodeId)()});let W=n.useMemo(()=>({store:S}),[S]);return(0,j.jsx)(d.Provider,{value:W,children:"function"==typeof t?t({payload:R}):t})}var T=e.i(676477),P=e.i(991730),M=e.i(383590),A=e.i(327601),N=e.i(437287),F=e.i(804012),V=e.i(397254),D=e.i(189879),L=e.i(672408),H=e.i(247857),B=e.i(559266);let _=n.forwardRef(function(e,t){let{render:r,className:s,disabled:i=!1,nativeButton:a=!0,handle:l,payload:u,openOnHover:d=!1,delay:f=300,closeDelay:v=0,id:b,...m}=e,h=g(!0),S=l?.store??h?.store;if(!S)throw Error((0,c.default)(74));let k=(0,D.useBaseUiId)(b),R=S.useState("isTriggerActive",k),C=S.useState("floatingRootContext"),O=S.useState("isOpenedByTrigger",k),I=n.useRef(null),{registerTrigger:_,isMountedByThisTrigger:z}=(0,w.useTriggerDataForwarding)(k,I,S,{payload:u,disabled:i,openOnHover:d,closeDelay:v}),U=S.useState("openChangeReason"),K=S.useState("stickIfOpen"),W=S.useState("openMethod"),G=(0,V.useHoverReferenceInteraction)(C,{enabled:null!=C&&d&&("touch"!==W||U!==x.REASONS.triggerPress),mouseOnly:!0,move:!1,handleClose:(0,N.safePolygon)(),restMs:f,delay:{close:v},triggerElementRef:I,isActiveTrigger:R}),$=(0,F.useClick)(C,{enabled:null!=C,stickIfOpen:K}),Y=(0,o.useInteractions)([$]),q=S.useState("triggerProps",z),{getButtonProps:Z,buttonRef:J}=(0,P.useButton)({disabled:i,native:a}),Q=n.useMemo(()=>({open:e=>e&&U===x.REASONS.triggerPress?M.pressableTriggerOpenStateMapping.open(e):M.triggerOpenStateMapping.open(e)}),[U]),X=(0,A.useRenderElement)("button",e,{state:{disabled:i,open:O},ref:[J,t,_,I],props:[Y.getReferenceProps(),G,q,{[y.CLICK_TRIGGER_IDENTIFIER]:"",id:k},m,Z],stateAttributesMapping:Q}),ee=n.useRef(null),et=(0,T.useStableCallback)(e=>{p.flushSync(()=>{S.setOpen(!1,(0,E.createChangeEventDetails)(x.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let t=(0,B.getTabbableBeforeElement)(ee.current);t?.focus()}),en=(0,T.useStableCallback)(e=>{let t=S.select("positionerElement");if(t&&(0,B.isOutsideEvent)(e,t))S.context.beforeContentFocusGuardRef.current?.focus();else{p.flushSync(()=>{S.setOpen(!1,(0,E.createChangeEventDetails)(x.REASONS.focusOut,e.nativeEvent,e.currentTarget))});let n=(0,B.getTabbableAfterElement)(S.context.triggerFocusTargetRef.current||I.current);for(;null!==n&&(0,H.contains)(t,n);){let e=n;if((n=(0,B.getNextTabbable)(n))===e)break}n?.focus()}});return R?(0,j.jsxs)(n.Fragment,{children:[(0,j.jsx)(L.FocusGuard,{ref:ee,onFocus:et}),(0,j.jsx)(n.Fragment,{children:X},k),(0,j.jsx)(L.FocusGuard,{ref:S.context.triggerFocusTargetRef,onFocus:en})]}):(0,j.jsx)(n.Fragment,{children:X},k)});var z=e.i(937692);let U=n.createContext(void 0),K=n.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,{store:s}=g();return s.useState("mounted")||n?(0,j.jsx)(U.Provider,{value:n,children:(0,j.jsx)(z.FloatingPortal,{ref:t,...r})}):null});var W=e.i(658130),G=e.i(500977);let $=n.createContext(void 0);function Y(){let e=n.useContext($);if(!e)throw Error((0,c.default)(46));return e}var q=e.i(56590),Z=e.i(536893),J=e.i(177817),Q=e.i(767569),X=e.i(418847);let ee=n.forwardRef(function(e,t){let{render:r,className:s,anchor:i,positionMethod:o="absolute",side:a="bottom",align:u="center",sideOffset:d=0,alignOffset:p=0,collisionBoundary:f="clipping-ancestors",collisionPadding:v=5,arrowPadding:b=5,sticky:m=!1,disableAnchorTracking:h=!1,collisionAvoidance:S=y.POPUP_COLLISION_AVOIDANCE,...k}=e,{store:R}=g(),C=function(){let e=n.useContext(U);if(void 0===e)throw Error((0,c.default)(45));return e}(),E=(0,l.useFloatingNodeId)(),w=R.useState("floatingRootContext"),O=R.useState("mounted"),I=R.useState("open"),T=R.useState("openChangeReason"),P=R.useState("activeTriggerElement"),N=R.useState("modal"),F=R.useState("positionerElement"),V=R.useState("instantType"),D=R.useState("transitionStatus"),L=R.useState("hasViewport"),H=n.useRef(null),B=(0,J.useAnimationsFinished)(F,!1,!1),_=(0,q.useAnchorPositioning)({anchor:i,floatingRootContext:w,positionMethod:o,mounted:O,side:a,sideOffset:d,align:u,alignOffset:p,arrowPadding:b,collisionBoundary:f,collisionPadding:v,sticky:m,disableAnchorTracking:h,keepMounted:C,nodeId:E,collisionAvoidance:S,adaptiveOrigin:L?Q.adaptiveOrigin:void 0}),z=n.useMemo(()=>{let e={};return I||(e.pointerEvents="none"),{role:"presentation",hidden:!O,style:{..._.positionerStyles,...e}}},[I,O,_.positionerStyles]),K=n.useMemo(()=>({props:z,..._}),[z,_]),Y=w.useState("domReferenceElement");(0,G.useIsoLayoutEffect)(()=>{let e=H.current;if(Y&&(H.current=Y),e&&Y&&Y!==e){R.set("instantType",void 0);let e=new AbortController;return B(()=>{R.set("instantType","trigger-change")},e.signal),()=>{e.abort()}}},[Y,B,R]);let ee={open:I,side:K.side,align:K.align,anchorHidden:K.anchorHidden,instant:V},et=n.useCallback(e=>{R.set("positionerElement",e)},[R]),en=(0,A.useRenderElement)("div",e,{state:ee,props:[K.props,(0,X.getDisabledMountTransitionStyles)(D),k],ref:[t,et],stateAttributesMapping:M.popupStateMapping});return(0,j.jsxs)($.Provider,{value:K,children:[O&&!0===N&&T!==x.REASONS.triggerHover&&(0,j.jsx)(Z.InternalBackdrop,{ref:R.context.internalBackdropRef,inert:(0,W.inertValue)(!I),cutout:P}),(0,j.jsx)(l.FloatingNode,{id:E,children:en})]})});var et=e.i(229315),en=e.i(488306),er=e.i(761896),es=e.i(284759),ei=e.i(889269),eo=e.i(992238),ea=e.i(560752);let el=n.createContext(void 0);function eu(e){let{value:t,children:n}=e;return(0,j.jsx)(el.Provider,{value:t,children:n})}let ec={...M.popupStateMapping,...es.transitionStatusMapping},ed=n.forwardRef(function(e,t){let{className:r,render:s,initialFocus:i,finalFocus:o,...a}=e,{store:l}=g(),u=Y(),c=null!=(0,ea.useToolbarRootContext)(!0),{context:d,hasClosePart:p}=function(){let[e,t]=n.useState(0),r=(0,T.useStableCallback)(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:n.useMemo(()=>({register:r}),[r]),hasClosePart:e>0}}(),f=l.useState("open"),v=l.useState("openMethod"),b=l.useState("instantType"),m=l.useState("transitionStatus"),h=l.useState("popupProps"),S=l.useState("titleElementId"),k=l.useState("descriptionElementId"),y=l.useState("modal"),R=l.useState("mounted"),C=l.useState("openChangeReason"),E=l.useState("activeTriggerElement"),w=l.useState("floatingRootContext");(0,ei.useOpenChangeComplete)({open:f,ref:l.context.popupRef,onComplete(){f&&l.context.onOpenChangeComplete?.(!0)}});let O=l.useState("disabled"),I=l.useState("openOnHover"),P=l.useState("closeDelay");(0,er.useHoverFloatingInteraction)(w,{enabled:I&&!O,closeDelay:P});let M=void 0===i?function(e){return"touch"!==e||l.context.popupRef.current}:i,N={open:f,side:u.side,align:u.align,instant:b,transitionStatus:m},F=n.useCallback(e=>{l.set("popupElement",e)},[l]),V=(0,A.useRenderElement)("div",e,{state:N,ref:[t,l.context.popupRef,F],props:[h,{"aria-labelledby":S,"aria-describedby":k,onKeyDown(e){c&&eo.COMPOSITE_KEYS.has(e.key)&&e.stopPropagation()}},(0,X.getDisabledMountTransitionStyles)(m),a],stateAttributesMapping:ec});return(0,j.jsx)(en.FloatingFocusManager,{context:w,openInteractionType:v,modal:!1!==y&&p,disabled:!R||C===x.REASONS.triggerHover,initialFocus:M,returnFocus:o,restoreFocus:"popup",previousFocusableElement:(0,et.isHTMLElement)(E)?E:void 0,nextFocusableElement:l.context.triggerFocusTargetRef,beforeContentFocusGuardRef:l.context.beforeContentFocusGuardRef,children:(0,j.jsx)(eu,{value:d,children:V})})}),eg=n.forwardRef(function(e,t){let{className:n,render:r,...s}=e,{store:i}=g(),o=i.useState("open"),{arrowRef:a,side:l,align:u,arrowUncentered:c,arrowStyles:d}=Y();return(0,A.useRenderElement)("div",e,{state:{open:o,side:l,align:u,uncentered:c},ref:[t,a],props:[{style:d,"aria-hidden":!0},s],stateAttributesMapping:M.popupStateMapping})}),ep={...M.popupStateMapping,...es.transitionStatusMapping},ef=n.forwardRef(function(e,t){let{className:n,render:r,...s}=e,{store:i}=g(),o=i.useState("open"),a=i.useState("mounted"),l=i.useState("transitionStatus"),u=i.useState("openChangeReason");return(0,A.useRenderElement)("div",e,{state:{open:o,transitionStatus:l},ref:[i.context.backdropRef,t],props:[{role:"presentation",hidden:!a,style:{pointerEvents:u===x.REASONS.triggerHover?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},s],stateAttributesMapping:ep})}),ev=n.forwardRef(function(e,t){let{render:n,className:r,...s}=e,{store:i}=g(),o=(0,D.useBaseUiId)(s.id);return(0,G.useIsoLayoutEffect)(()=>(i.set("titleElementId",o),()=>{i.set("titleElementId",void 0)}),[i,o]),(0,A.useRenderElement)("h2",e,{ref:t,props:[{id:o},s]})}),eb=n.forwardRef(function(e,t){let{render:n,className:r,...s}=e,{store:i}=g(),o=(0,D.useBaseUiId)(s.id);return(0,G.useIsoLayoutEffect)(()=>(i.set("descriptionElementId",o),()=>{i.set("descriptionElementId",void 0)}),[i,o]),(0,A.useRenderElement)("p",e,{ref:t,props:[{id:o},s]})}),em=n.forwardRef(function(e,t){let r,{render:s,className:i,disabled:o=!1,nativeButton:a=!0,...l}=e,{buttonRef:u,getButtonProps:c}=(0,P.useButton)({disabled:o,focusableWhenDisabled:!1,native:a}),{store:d}=g();return r=n.useContext(el),(0,G.useIsoLayoutEffect)(()=>r?.register(),[r]),(0,A.useRenderElement)("button",e,{ref:[t,u],props:[{onClick(e){d.setOpen(!1,(0,E.createChangeEventDetails)(x.REASONS.closePress,e.nativeEvent,e.currentTarget))}},l,c]})}),eh=((t={}).popupWidth="--popup-width",t.popupHeight="--popup-height",t);var ex=e.i(712666);let eS={activationDirection:e=>e?{"data-activation-direction":e}:null},ek=n.forwardRef(function(e,t){let{render:n,className:r,children:s,...i}=e,{store:o}=g(),{side:a}=Y(),l=o.useState("instantType"),{children:u,state:c}=(0,ex.usePopupViewport)({store:o,side:a,cssVars:eh,children:s}),d={activationDirection:c.activationDirection,transitioning:c.transitioning,instant:l};return(0,A.useRenderElement)("div",e,{state:d,ref:t,props:[i,{children:u}],stateAttributesMapping:eS})});class ey{constructor(){this.store=new C}open(e){let t=e?this.store.context.triggerElements.getById(e)??void 0:void 0;if(e&&!t)throw Error((0,c.default)(80,e));this.store.setOpen(!0,(0,E.createChangeEventDetails)(x.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,E.createChangeEventDetails)(x.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,eg,"Backdrop",0,ef,"Close",0,em,"Description",0,eb,"Handle",0,ey,"Popup",0,ed,"Portal",0,K,"Positioner",0,ee,"Root",0,function(e){return g(!0)?(0,j.jsx)(I,{props:e}):(0,j.jsx)(l.FloatingTree,{children:(0,j.jsx)(I,{props:e})})},"Title",0,ev,"Trigger",0,_,"Viewport",0,ek,"createHandle",0,function(){return new ey}],307311);var eR=e.i(307311);e.s(["Popover",0,eR],506213)},575407,e=>{"use strict";var t=e.i(271645),n=e.i(891287),r=e.i(725842),s=e.i(910304),i=e.i(586108),o=e.i(326283);e.s(["useSsoProvider",0,function(e){let a=(0,i.useStigmer)(),[l,u]=(0,t.useState)(null),[c,d]=(0,t.useState)(!1),[g,p]=(0,t.useState)(null);return(0,t.useEffect)(()=>{if(!e){u(null),d(!1),p(null);return}let t={current:!1};return d(!0),p(null),a.identityProvider.getSsoProvider((0,n.create)(r.OrganizationSsoLookupSchema,{org:e})).then(e=>{t.current||(u(e),d(!1))},e=>{t.current||((0,s.isNotFound)(e)?u(null):p((0,o.toError)(e)),d(!1))}),()=>{t.current=!0}},[e,a]),{ssoProvider:l,isLoading:c,error:g}}])},388023,853793,758960,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(170255),s=e.i(597744),i=e.i(590150),o=e.i(575407),a=e.i(506213),l=e.i(893976),u=e.i(364354),c=e.i(188482),d=e.i(10337),g=e.i(966205);let p="stg:inline-flex stg:shrink-0 stg:items-center stg:gap-1 stg:rounded-full stg:bg-muted stg:px-2 stg:py-0.5 stg:text-[10px] stg:font-medium stg:text-muted-foreground",f=(0,n.forwardRef)(function({option:e,isSelected:n,role:r,isHighlighted:s,disabled:i,tabIndex:o,onSelect:a,onMouseEnter:u,onKeyDown:c},d){let g=void 0!==e.lockedReason,p="radio"===r?{"aria-checked":n}:{"aria-selected":n};return(0,t.jsxs)("button",{ref:d,type:"button",role:r,...p,"aria-disabled":g||void 0,tabIndex:o,disabled:i||g,onClick:a,onMouseEnter:u,onKeyDown:c,className:(0,l.cn)("stg:flex stg:w-full stg:items-start stg:gap-2 stg:rounded-md stg:px-2.5 stg:py-2 stg:text-left stg:transition-colors","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",g?"stg:disabled:pointer-events-none stg:cursor-default":"stg:disabled:pointer-events-none stg:disabled:opacity-50",!g&&(s?"stg:bg-accent stg:text-foreground":"stg:hover:bg-accent-hover")),children:[(0,t.jsx)(b,{tone:e.tone,className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-muted-foreground"}),(0,t.jsxs)("span",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsx)("span",{className:(0,l.cn)("stg:block stg:text-xs stg:font-medium",g?"stg:text-muted-foreground":"stg:text-foreground"),children:e.label}),(0,t.jsx)("span",{className:"stg:block stg:text-[0.65rem] stg:leading-snug stg:text-muted-foreground",children:g?e.lockedReason:e.description})]}),g?(0,t.jsx)(m,{className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-muted-foreground"}):n&&(0,t.jsx)(k,{className:"stg:mt-0.5 stg:size-3.5 stg:shrink-0 stg:text-primary"})]})}),v={private:{container:"stg:border-amber-200 stg:bg-amber-50 stg:dark:border-amber-800/50 stg:dark:bg-amber-950/30",text:"stg:text-amber-800 stg:dark:text-amber-200",confirm:"stg:bg-amber-600 stg:hover:bg-amber-700 stg:dark:bg-amber-600 stg:dark:hover:bg-amber-500",cancel:"stg:text-amber-700 stg:hover:text-amber-900 stg:dark:text-amber-300 stg:dark:hover:text-amber-100"},org:{container:"stg:border-blue-200 stg:bg-blue-50 stg:dark:border-blue-800/50 stg:dark:bg-blue-950/30",text:"stg:text-blue-800 stg:dark:text-blue-200",confirm:"stg:bg-blue-600 stg:hover:bg-blue-700 stg:dark:bg-blue-600 stg:dark:hover:bg-blue-500",cancel:"stg:text-blue-700 stg:hover:text-blue-900 stg:dark:text-blue-300 stg:dark:hover:text-blue-100"},platform:{container:"stg:border-violet-200 stg:bg-violet-50 stg:dark:border-violet-800/50 stg:dark:bg-violet-950/30",text:"stg:text-violet-800 stg:dark:text-violet-200",confirm:"stg:bg-violet-600 stg:hover:bg-violet-700 stg:dark:bg-violet-600 stg:dark:hover:bg-violet-500",cancel:"stg:text-violet-700 stg:hover:text-violet-900 stg:dark:text-violet-300 stg:dark:hover:text-violet-100"},public:{container:"stg:border-emerald-200 stg:bg-emerald-50 stg:dark:border-emerald-800/50 stg:dark:bg-emerald-950/30",text:"stg:text-emerald-800 stg:dark:text-emerald-200",confirm:"stg:bg-emerald-600 stg:hover:bg-emerald-700 stg:dark:bg-emerald-600 stg:dark:hover:bg-emerald-500",cancel:"stg:text-emerald-700 stg:hover:text-emerald-900 stg:dark:text-emerald-300 stg:dark:hover:text-emerald-100"}};function b({tone:e,className:n}){switch(e){case"org":return(0,t.jsx)(h,{className:n});case"platform":return(0,t.jsx)(x,{className:n});case"public":return(0,t.jsx)(S,{className:n});default:return(0,t.jsx)(m,{className:n})}}function m({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:"3.5",y:"7",width:"9",height:"7",rx:"1.5"}),(0,t.jsx)("path",{d:"M5.5 7V5a2.5 2.5 0 0 1 5 0v2"})]})}function h({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:"6",cy:"5",r:"2.5"}),(0,t.jsx)("path",{d:"M2 13c0-2.21 1.79-4 4-4s4 1.79 4 4"}),(0,t.jsx)("circle",{cx:"11.5",cy:"5.5",r:"2"}),(0,t.jsx)("path",{d:"M14 13c0-1.66-1.12-3-2.5-3-.5 0-1 .14-1.4.4"})]})}function x({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:"M2 14V4.5L6.5 2v12"}),(0,t.jsx)("path",{d:"M6.5 6.5 14 8.5V14"}),(0,t.jsx)("path",{d:"M2 14h12"}),(0,t.jsx)("path",{d:"M4.25 6h.01M4.25 8.5h.01M4.25 11h.01M10.5 10.5h.01M10.5 12.5h.01"})]})}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)("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"})]})}function k({className:e}){return(0,t.jsx)("svg",{className:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3 8.5 6.5 12 13 4.5"})})}var y=e.i(302933);let R={value:y.ApiResourceVisibility.visibility_private,label:"Private",description:"Only you can access",tone:"private"},C={value:y.ApiResourceVisibility.visibility_org,label:"Organization",description:"All members of your organization",confirmPrompt:"Make visible to all org members?",tone:"org"},E={value:y.ApiResourceVisibility.visibility_platform,label:"Platform",description:"All organizations managed by your platform",confirmDialog:{title:"Share with your whole platform?",description:"Every organization managed by your platform will be able to view and use this resource. You can return it to a narrower visibility at any time."},tone:"platform"},w={value:y.ApiResourceVisibility.visibility_public,label:"Public",description:"Retired level — this resource becomes visible to your organization on upgrade",tone:"public"};function O(e){return e.hasIdentityProvider?[R,C,E]:[R,C]}function j(){return[R,{...C,description:"All org members can view executions"}]}function I(e){return"local"===e?[R]:[{...R,description:"Only you can view and use these credentials"},{...C,description:"Agents run in your org — including shared-agent visitors — can use these credentials. Members see names only; secret values stay hidden.",confirmPrompt:"Let agents run in your org use these credentials?"}]}function T(e){switch(e){case y.ApiResourceVisibility.visibility_org:return C;case y.ApiResourceVisibility.visibility_platform:return E;case y.ApiResourceVisibility.visibility_public:return w;default:return R}}function P({visibility:e,options:r,onVisibilityChange:s,mode:i="manage",isPending:o=!1,disabled:c=!1,ariaLabel:m="Resource visibility",className:h}){let x=(0,u.useStigmerPortalContainer)(),{confirmState:S,confirm:k,handleConfirm:y,handleCancel:R}=(0,g.useConfirmAction)(),[C,E]=(0,n.useState)(!1),[w,O]=(0,n.useState)(null),[j,I]=(0,n.useState)(-1),A=(0,n.useRef)([]),N=c||o,F=(0,n.useMemo)(()=>r.some(t=>t.value===e)?r:[...r,T(e)],[r,e]),V=(0,n.useCallback)(t=>{let n=F.map(e=>e.value);return n.indexOf(t)>n.indexOf(e)},[F,e]),D=(0,n.useCallback)(e=>{E(!1),O(null),s(e)},[s]),L=(0,n.useCallback)(t=>{if(void 0!==t.lockedReason)return;let n=t.value;if(n===e){O(null),E(!1);return}if("create"===i||!V(n))return void D(n);if(t.confirmDialog){E(!1),O(null),k({title:t.confirmDialog.title,description:t.confirmDialog.description,confirmLabel:`Make ${t.label}`,variant:"default"}).then(e=>{e&&s(n)});return}t.confirmPrompt?O(n):D(n)},[e,i,V,D,k,s]),H=(0,n.useCallback)((e,t)=>{let n=F.length,r=e;for(let e=0;e<n&&(r=(r+t+n)%n,F[r]?.lockedReason!==void 0);e++);I(r),A.current[r]?.focus()},[F]),B=(0,n.useCallback)((e,t)=>{switch(e.key){case"ArrowDown":case"ArrowRight":e.preventDefault(),H(t,1);break;case"ArrowUp":case"ArrowLeft":e.preventDefault(),H(t,-1);break;case"Home":e.preventDefault(),I(0),A.current[0]?.focus();break;case"End":{e.preventDefault();let t=F.length-1;I(t),A.current[t]?.focus()}}},[H,F.length]);(0,n.useEffect)(()=>{if(!C){O(null),I(-1);return}let t=F.findIndex(t=>t.value===e),n=t>=0?t:0;I(n);let r=requestAnimationFrame(()=>A.current[n]?.focus());return()=>cancelAnimationFrame(r)},[C,F,e]);let _=(0,t.jsx)(d.ConfirmDialog,{state:S,onConfirm:y,onCancel:R}),z=n=>F.map((r,s)=>(0,t.jsx)(f,{ref:e=>{A.current[s]=e},option:r,role:n,isSelected:e===r.value,isHighlighted:"option"===n&&j===s,tabIndex:"radio"===n?e===r.value?0:-1:j===s?0:-1,disabled:N,onSelect:()=>L(r),onMouseEnter:"option"===n?()=>I(s):void 0,onKeyDown:e=>B(e,s)},r.value));if("create"===i)return(0,t.jsx)("div",{role:"radiogroup","aria-label":m,"aria-disabled":N||void 0,className:(0,l.cn)("stg:flex stg:flex-col stg:gap-0.5 stg:rounded-md stg:border stg:border-border stg:p-1",N&&"stg:pointer-events-none stg:opacity-50",h),children:z("radio")});let U=T(e),K=null!==w?F.find(e=>e.value===w):void 0;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(a.Popover.Root,{open:C,onOpenChange:E,children:[(0,t.jsxs)(a.Popover.Trigger,{disabled:N,"aria-label":`${m}: ${U.label}`,className:(0,l.cn)(p,"stg:transition-colors stg:hover:bg-accent-hover stg:hover:text-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",h),children:[o?(0,t.jsx)("span",{className:"stg:inline-block stg:size-2.5 stg:animate-spin stg:rounded-full stg:border-2 stg:border-current stg:border-t-transparent","aria-hidden":"true"}):(0,t.jsx)(b,{tone:U.tone,className:"stg:size-2.5"}),U.label,(0,t.jsx)(M,{})]}),(0,t.jsx)(a.Popover.Portal,{container:x,children:(0,t.jsx)(a.Popover.Positioner,{sideOffset:4,align:"start",children:(0,t.jsxs)(a.Popover.Popup,{role:"listbox","aria-label":m,className:(0,l.cn)("stg:z-popover stg:w-72 stg:rounded-lg stg:border stg:border-border stg:bg-popover stg:p-1 stg:shadow-md","stg:text-popover-foreground stg:animate-in stg:fade-in-0 stg:zoom-in-95"),children:[z("option"),K?.confirmPrompt&&(0,t.jsxs)("div",{role:"alert",className:(0,l.cn)("stg:mt-1 stg:flex stg:items-center stg:gap-2 stg:rounded-md stg:border stg:px-2.5 stg:py-1.5",v[K.tone].container),children:[(0,t.jsx)("span",{className:(0,l.cn)("stg:flex-1 stg:text-[0.65rem] stg:leading-snug",v[K.tone].text),children:K.confirmPrompt}),(0,t.jsx)("button",{type:"button",onClick:()=>O(null),className:(0,l.cn)("stg:rounded stg:px-2 stg:py-0.5 stg:text-[0.65rem] stg:font-medium","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",v[K.tone].cancel),children:"Cancel"}),(0,t.jsx)("button",{type:"button",onClick:()=>D(K.value),className:(0,l.cn)("stg:rounded stg:px-2 stg:py-0.5 stg:text-[0.65rem] stg:font-medium stg:text-white","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",v[K.tone].confirm),children:"Confirm"})]})]})})})]}),_]})}function M(){return(0,t.jsx)("svg",{className:"stg:size-2.5 stg:shrink-0 stg:text-muted-foreground",viewBox:"0 0 12 12",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,t.jsx)("path",{d:"M3 4.5 6 7.5 9 4.5"})})}function A({visibility:e,className:n,onClick:r}){let s=T(e),i=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(b,{tone:s.tone,className:"stg:size-2.5"}),s.label]});return r?(0,t.jsxs)(c.Tooltip,{children:[(0,t.jsx)(c.TooltipTrigger,{render:(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":`${s.label} visibility — manage access`,className:(0,l.cn)(p,"stg:transition-colors stg:hover:bg-accent-hover stg:hover:text-foreground","stg:focus-visible:outline-none stg:focus-visible:ring-2 stg:focus-visible:ring-ring",n)}),children:i}),(0,t.jsx)(c.TooltipContent,{side:"top",children:"Manage access"})]}):(0,t.jsx)("span",{className:(0,l.cn)(p,n),children:i})}e.s(["blueprintVisibilityLevels",0,O,"environmentVisibilityLevels",0,I,"instanceVisibilityLevels",0,j,"visibilityOption",0,T],853793),e.s(["VisibilityBadge",0,A,"VisibilitySelector",0,P],758960);var N=e.i(891287),F=e.i(459153),V=e.i(586108),D=e.i(326283);let L={agent:"agent",workflow:"workflow",plugin:"plugin",skill:"skill",mcpServer:"mcp_server",agentInstance:"agent_instance",workflowInstance:"workflow_instance",environment:"environment"},H=new Set(["agentInstance","workflowInstance"]);e.s(["ResourceVisibilityControl",0,function({kind:e,resourceId:a,visibility:l,org:u,onChanged:c,className:d}){let{updateVisibility:g,isPending:p}=function(e,t){let r=(0,V.useStigmer)(),[s,i]=(0,n.useState)(!1),[o,a]=(0,n.useState)(null);return{updateVisibility:(0,n.useCallback)(async n=>{if(t){i(!0),a(null);try{let s=(0,N.create)(F.UpdateVisibilityInputSchema,{resourceId:t,visibility:n});switch(e){case"skill":await r.skill.updateVisibility(s);break;case"agent":await r.agent.updateVisibility(s);break;case"mcpServer":await r.mcpServer.updateVisibility(s);break;case"workflow":await r.workflow.updateVisibility(s);break;case"plugin":await r.plugin.updateVisibility(s);break;case"agentInstance":await r.agentInstance.updateVisibility(s);break;case"workflowInstance":await r.workflowInstance.updateVisibility(s);break;case"environment":await r.environment.updateVisibility(s)}}catch(e){throw a((0,D.toError)(e)),e}finally{i(!1)}}},[e,t,r]),isPending:s,error:o}}(e,a),f=(0,s.useDeploymentMode)(),v=(0,s.useResourceAvailable)(r.ApiResourceKind.identity_provider),b=H.has(e),m="environment"===e,{ssoProvider:h}=(0,o.useSsoProvider)(b||m||!v?null:u??null),x=m?I(f):b?j():O({hasIdentityProvider:null!==h}),S=(0,n.useCallback)(async e=>{try{await g(e),c?.()}catch{}},[g,c]),k=(0,t.jsx)(A,{visibility:l,className:d});if(x.length<2)return k;let y=(0,t.jsx)(P,{visibility:l,options:x,onVisibilityChange:S,isPending:p,ariaLabel:b?"Instance visibility":"Resource visibility",className:d});return(0,t.jsx)(i.PermissionGate,{resource:{kind:L[e],id:a},relation:"can_edit",fallback:k,loading:k,children:y})}],388023)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,23280,e=>{"use strict";var t=e.i(843476),s=e.i(271645),r=e.i(893976),n=e.i(610595),i=e.i(17616),a=e.i(188482),o=e.i(750567),l=e.i(586108),d=e.i(326283),g=e.i(379410);function c({org:e,onEdit:i,onRefetchRef:a,className:l}){let{identityProviders:d,isLoading:g,error:m,refetch:x}=(0,o.useIdentityProviderList)(e),[p,h]=(0,s.useState)(null);return(a&&a(x),g)?(0,t.jsx)("div",{className:(0,r.cn)("stg:space-y-2",l),"aria-busy":"true","aria-label":"Loading identity providers",children:Array.from({length:2},(e,s)=>(0,t.jsx)("div",{className:"stg:bg-muted-subtle stg:h-14 stg:animate-pulse stg:rounded-lg"},s))}):m?(0,t.jsx)("p",{className:(0,r.cn)("stg:text-destructive stg:text-xs",l),role:"alert",children:(0,n.getUserMessage)(m)}):0===d.length?(0,t.jsx)("p",{className:(0,r.cn)("stg:text-muted-foreground stg:py-4 stg:text-center stg:text-xs",l),children:"No identity providers configured."}):(0,t.jsx)("div",{className:(0,r.cn)("stg:space-y-2",l),role:"list","aria-label":"Identity providers",children:d.map(e=>{let s=e.metadata?.id??"";return(0,t.jsx)(u,{identityProvider:e,isConfirming:p===s,onEdit:i?()=>i(e):void 0,onConfirmDelete:()=>h(s),onCancelDelete:()=>h(null),onDeleted:()=>{h(null),x()}},s)})})}function u({identityProvider:e,isConfirming:o,onEdit:c,onConfirmDelete:h,onCancelDelete:b,onDeleted:f}){let{deleteProvider:v,isDeleting:j,error:y}=function(){let e=(0,l.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,i]=(0,s.useState)(null),a=(0,s.useCallback)(()=>i(null),[]);return{deleteProvider:(0,s.useCallback)(async t=>{r(!0),i(null);try{return await e.identityProvider.delete(t)}catch(e){throw i((0,d.toError)(e)),e}finally{r(!1)}},[e]),isDeleting:t,error:n,clearError:a}}(),k=e.metadata?.id??"",C=e.spec,w=C?.displayName||e.metadata?.name||"Unnamed provider",N=e.metadata?.slug,S=C?.isSsoProvider,I=!S&&C?.autoProvisionAccounts,A=e.status?.audit?.specAudit?.createdAt,O=(0,s.useCallback)(async()=>{try{await v({resourceId:k}),f()}catch{}},[k,v,f]);return o?(0,t.jsxs)("div",{role:"listitem",className:"stg:flex stg:items-center stg:justify-between stg:rounded-lg stg:border stg:border-destructive/30 stg:bg-destructive-subtle stg:px-3 stg:py-2.5",children:[(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsxs)("p",{className:"stg:text-xs stg:text-foreground",children:["Delete ",(0,t.jsx)("span",{className:"stg:font-medium",children:w}),"?"]}),y&&(0,t.jsx)("p",{className:"stg:mt-0.5 stg:text-[0.65rem] stg:text-destructive",children:(0,n.getUserMessage)(y)})]}),(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-1.5",children:[(0,t.jsxs)("button",{type:"button",onClick:O,disabled:j,className:(0,r.cn)("stg:inline-flex stg:items-center stg:gap-1 stg:rounded-md stg:px-2.5 stg:py-1 stg:text-xs stg:font-medium","stg:bg-destructive stg:text-destructive-foreground stg:hover:bg-destructive-hover","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:[j&&(0,t.jsx)(g.SpinnerIcon,{size:12}),"Delete"]}),(0,t.jsx)("button",{type:"button",onClick:b,disabled:j,className:(0,r.cn)("stg:rounded-md stg:px-2.5 stg:py-1 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:"Cancel"})]})]}):(0,t.jsxs)("div",{role:"listitem",className:"stg:flex stg:items-center stg:gap-3 stg:rounded-lg stg:border stg:border-border-muted stg:px-3 stg:py-2.5 stg:hover:border-border stg:transition-colors",children:[(0,t.jsx)(m,{}),(0,t.jsxs)("div",{className:"stg:min-w-0 stg:flex-1",children:[(0,t.jsx)("span",{className:"stg:block stg:truncate stg:text-sm stg:font-medium stg:text-foreground",children:w}),N&&(0,t.jsx)("span",{className:"stg:block stg:text-xs stg:text-muted-foreground stg:font-mono",children:N})]}),(0,t.jsxs)("div",{className:"stg:hidden stg:sm:flex stg:shrink-0 stg:items-center stg:gap-3 stg:text-xs stg:text-muted-foreground",children:[S&&(0,t.jsx)("span",{className:"stg:inline-flex stg:items-center stg:rounded-full stg:border stg:border-primary/30 stg:bg-primary-subtle stg:px-2 stg:py-0.5 stg:text-[0.65rem] stg:font-medium stg:text-primary",children:"SSO"}),I&&(0,t.jsx)("span",{className:"stg:inline-flex stg:items-center stg:rounded-full stg:border stg:border-primary/30 stg:bg-primary-subtle stg:px-2 stg:py-0.5 stg:text-[0.65rem] stg:font-medium stg:text-primary",children:"JIT"}),A&&(0,t.jsxs)(a.Tooltip,{children:[(0,t.jsx)(a.TooltipTrigger,{render:(0,t.jsx)("time",{dateTime:(0,i.timestampDate)(A).toISOString()}),children:(0,i.timestampDate)(A).toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}),(0,t.jsx)(a.TooltipContent,{side:"top",children:`Created ${(0,i.timestampDate)(A).toISOString()}`})]})]}),(0,t.jsxs)("div",{className:"stg:flex stg:shrink-0 stg:items-center stg:gap-1",children:[c&&(0,t.jsx)("button",{type:"button",onClick:c,"aria-label":`Edit ${w}`,className:(0,r.cn)("stg:shrink-0 stg:rounded stg:p-1","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:transition-colors"),children:(0,t.jsx)(x,{})}),(0,t.jsx)("button",{type:"button",onClick:h,"aria-label":`Delete ${w}`,className:(0,r.cn)("stg:shrink-0 stg:rounded stg:p-1","stg:text-muted-foreground stg:hover:text-destructive stg:hover:bg-destructive-subtle","stg:transition-colors"),children:(0,t.jsx)(p,{})})]})]})}function m(){return(0,t.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:shrink-0 stg:text-muted-foreground",children:(0,t.jsx)("path",{d:"M8 1.5L2 4v4c0 3.5 2.5 5.5 6 7 3.5-1.5 6-3.5 6-7V4L8 1.5z"})})}function x(){return(0,t.jsx)("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:"M11 2.5l2.5 2.5L5 13.5H2.5V11L11 2.5z"})})}function p(){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:"M2.5 4h11M5.5 4V2.5a1 1 0 0 1 1-1h3a1 1 0 0 1 1 1V4"}),(0,t.jsx)("path",{d:"M12.5 4v9a1 1 0 0 1-1 1h-7a1 1 0 0 1-1-1V4"}),(0,t.jsx)("line",{x1:"6.5",y1:"7",x2:"6.5",y2:"11"}),(0,t.jsx)("line",{x1:"9.5",y1:"7",x2:"9.5",y2:"11"})]})}var h=e.i(869803),b=e.i(430182);let f=[{id:"auth0",label:"Auth0",description:"Auth0 by Okta — universal login and identity platform",variables:[{key:"tenant",label:"Tenant name",placeholder:"acme-prod",hint:"The subdomain from your Auth0 tenant URL",type:"text"},{key:"region",label:"Region",placeholder:"us",type:"select",options:[{value:"us",label:"US"},{value:"eu",label:"EU"},{value:"au",label:"AU"},{value:"jp",label:"JP"}]}],buildConfig(e){let{tenant:t,region:s}=e;if(!t||!s)return null;let r=`${t}.${s}.auth0.com`,n=`https://${r}/`;return{issuer:n,jwksUri:`https://${r}/.well-known/jwks.json`,allowedIssuers:[n],userinfoEndpoint:`https://${r}/userinfo`}}},{id:"okta",label:"Okta",description:"Okta — enterprise identity and access management",variables:[{key:"domain",label:"Okta domain",placeholder:"acme.okta.com",hint:"Your Okta organization domain (e.g., acme.okta.com)",type:"text"}],buildConfig(e){let{domain:t}=e;if(!t)return null;let s=`https://${t}/oauth2/default`;return{issuer:s,jwksUri:`${s}/v1/keys`,allowedIssuers:[s],userinfoEndpoint:`${s}/v1/userinfo`}}},{id:"google",label:"Google",description:"Google Identity — Workspace and consumer accounts",variables:[],buildConfig:()=>({issuer:"https://accounts.google.com",jwksUri:"https://www.googleapis.com/oauth2/v3/certs",allowedIssuers:["https://accounts.google.com"],userinfoEndpoint:"https://openidconnect.googleapis.com/v1/userinfo"})},{id:"azure-ad",label:"Microsoft Entra ID",description:"Microsoft Entra ID (formerly Azure AD) — enterprise identity",variables:[{key:"tenantId",label:"Tenant ID",placeholder:"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",hint:"Your Entra ID / Azure AD tenant identifier (GUID)",type:"text"}],buildConfig(e){let{tenantId:t}=e;if(!t)return null;let s=`https://login.microsoftonline.com/${t}/v2.0`;return{issuer:s,jwksUri:`https://login.microsoftonline.com/${t}/discovery/v2.0/keys`,allowedIssuers:[s],userinfoEndpoint:"https://graph.microsoft.com/oidc/userinfo"}}},{id:"aws-cognito",label:"AWS Cognito",description:"Amazon Cognito — user pools for AWS applications",variables:[{key:"region",label:"AWS region",placeholder:"us-east-1",hint:"The AWS region of your Cognito user pool",type:"text"},{key:"userPoolId",label:"User Pool ID",placeholder:"us-east-1_aBcDeFgHi",hint:"Your Cognito user pool identifier",type:"text"}],buildConfig(e){let{region:t,userPoolId:s}=e;if(!t||!s)return null;let r=`https://cognito-idp.${t}.amazonaws.com/${s}`;return{issuer:r,jwksUri:`${r}/.well-known/jwks.json`,allowedIssuers:[r]}}},{id:"custom",label:"Custom OIDC",description:"Any OpenID Connect compliant identity provider",variables:[{key:"issuerUrl",label:"Issuer URL",placeholder:"https://idp.example.com",hint:"The OIDC issuer URL — configuration will be auto-discovered",type:"text"}],buildConfig:()=>null}];function v({onSelect:e,className:s}){return(0,t.jsx)("div",{className:(0,r.cn)("stg:grid stg:grid-cols-2 stg:gap-2 stg:sm:grid-cols-3",s),role:"listbox","aria-label":"Choose an identity provider",children:f.map(s=>(0,t.jsxs)("button",{type:"button",role:"option","aria-selected":!1,onClick:()=>e(s),className:(0,r.cn)("stg:flex stg:flex-col stg:items-start stg:gap-2 stg:rounded-lg stg:px-3 stg:py-3 stg:text-left stg:transition-colors","stg:border stg:hover:border-primary/60 stg:hover:bg-accent-hover","stg:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","custom"===s.id?"stg:border-dashed stg:border-border":"stg:border-border-muted"),children:[(0,t.jsx)(j,{presetId:s.id}),(0,t.jsxs)("div",{className:"stg:min-w-0",children:[(0,t.jsx)("span",{className:"stg:block stg:text-sm stg:font-medium stg:text-foreground",children:s.label}),(0,t.jsx)("span",{className:"stg:block stg:text-[0.65rem] stg:leading-tight stg:text-muted-foreground",children:s.description})]})]},s.id))})}function j({presetId:e}){let s=y[e]??k;return(0,t.jsx)("span",{className:"stg:flex stg:size-8 stg:items-center stg:justify-center stg:rounded-lg stg:bg-muted",children:(0,t.jsx)(s,{})})}let y={auth0:function(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:text-muted-foreground",children:[(0,t.jsx)("rect",{x:"3.5",y:"7",width:"9",height:"7",rx:"1.5"}),(0,t.jsx)("path",{d:"M5.5 7V5a2.5 2.5 0 0 1 5 0v2"})]})},okta:function(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:text-muted-foreground",children:[(0,t.jsx)("circle",{cx:"5.5",cy:"10",r:"3"}),(0,t.jsx)("path",{d:"M8 8l5.5-5.5M11 5l2-0.5L13.5 2.5"})]})},google:function(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:text-muted-foreground",children:[(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,t.jsx)("path",{d:"M2 8h12M8 2c2 2 2.5 4 2.5 6S10 14 8 14c-2-2-2.5-4-2.5-6S6 2 8 2z"})]})},"azure-ad":function(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:text-muted-foreground",children:(0,t.jsx)("path",{d:"M4 12.5h8.5a3 3 0 0 0 0-6 .5.5 0 0 1-.5-.4A4.5 4.5 0 0 0 3.5 8v.5a3 3 0 0 0 .5 6z"})})},"aws-cognito":function(){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:text-muted-foreground",children:[(0,t.jsx)("circle",{cx:"6",cy:"5",r:"2.5"}),(0,t.jsx)("path",{d:"M1.5 14c0-2.5 2-4.5 4.5-4.5S10.5 11.5 10.5 14"}),(0,t.jsx)("circle",{cx:"11.5",cy:"5.5",r:"1.5"}),(0,t.jsx)("path",{d:"M14.5 14c0-1.5-1-3-2.5-3.5"})]})},custom:function(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:text-muted-foreground",children:(0,t.jsx)("path",{d:"M5 4.5L1.5 8 5 11.5M11 4.5l3.5 3.5-3.5 3.5M9 2.5l-2 11"})})}};function k(){return(0,t.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:"stg:text-muted-foreground",children:(0,t.jsx)("circle",{cx:"8",cy:"8",r:"6"})})}async function C(e){let t,s,r=e.replace(/\/+$/,""),n=`${r}/.well-known/openid-configuration`;try{t=await fetch(n,{mode:"cors"})}catch{throw Error("Could not reach the issuer's discovery endpoint. The provider may not allow browser requests (CORS). You can enter the configuration manually instead.")}if(!t.ok)throw Error(`Discovery endpoint returned HTTP ${t.status}. Verify the issuer URL is correct.`);try{s=await t.json()}catch{throw Error("Discovery endpoint returned invalid JSON. Verify the issuer URL points to a valid OIDC provider.")}if("string"!=typeof s.issuer||"string"!=typeof s.jwks_uri)throw Error("Discovery document is missing required fields (issuer, jwks_uri). This may not be a compliant OpenID Connect provider.");return{issuer:s.issuer,jwksUri:s.jwks_uri,userinfoEndpoint:"string"==typeof s.userinfo_endpoint?s.userinfo_endpoint:void 0}}function w({org:e,onCreated:n,onCancel:i,className:a}){let{create:o,isCreating:g,error:c,clearError:u}=function(){let e=(0,l.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,i]=(0,s.useState)(null),a=(0,s.useCallback)(()=>i(null),[]);return{create:(0,s.useCallback)(async t=>{r(!0),i(null);try{return await e.identityProvider.create(t)}catch(e){throw i((0,d.toError)(e)),e}finally{r(!1)}},[e]),isCreating:t,error:n,clearError:a}}(),{discover:m,isDiscovering:x,error:p}=function(){let[e,t]=(0,s.useState)(!1),[r,n]=(0,s.useState)(null);return{discover:(0,s.useCallback)(async e=>{t(!0),n(null);try{return await C(e)}catch(e){return n(e instanceof Error?e:Error(String(e))),null}finally{t(!1)}},[]),isDiscovering:e,error:r}}(),[h,f]=(0,s.useState)("pick"),[j,y]=(0,s.useState)(null),[k,N]=(0,s.useState)({}),[R,D]=(0,s.useState)(""),[U,E]=(0,s.useState)(""),[L,T]=(0,s.useState)(""),[$,_]=(0,s.useState)(""),[z,G]=(0,s.useState)(""),[M,W]=(0,s.useState)(!1),[B,J]=(0,s.useState)(""),[q,F]=(0,s.useState)(!1),[V,K]=(0,s.useState)(!1),[Y,H]=(0,s.useState)(!1),[Q,X]=(0,s.useState)(b.IamRole.iam_role_unspecified),[Z,ee]=(0,s.useState)(""),[et,es]=(0,s.useState)(null),er=(0,s.useCallback)(e=>{y(e),N(Object.fromEntries(e.variables.map(e=>[e.key,e.options?.[0]?.value??""]))),D(""),E(""),f("configure")},[]),en=(0,s.useCallback)(()=>{f("pick"),y(null)},[]),ei=(0,s.useCallback)(e=>{T(e?.jwksUri??""),_(e?.allowedIssuers.join(", ")??""),G(e?.userinfoEndpoint??""),W(!1),J(""),F(!e)},[]),ea=(0,s.useCallback)(async()=>{if(j){if("custom"===j.id){let e=await m(k.issuerUrl??"");ei(e?{...e,allowedIssuers:[e.issuer]}:null)}else ei(j.buildConfig(k));f("review")}},[j,k,m,ei]),eo=(0,s.useCallback)(()=>{f("configure"),u()},[u]),el=(0,s.useCallback)(e=>{K(e),e||(H(!1),X(b.IamRole.iam_role_unspecified),ee(""))},[]),ed=(0,s.useCallback)(e=>{H(e),e&&K(!0),e||(X(b.IamRole.iam_role_unspecified),ee(""))},[]),eg=(0,s.useCallback)(async t=>{t.preventDefault(),u();try{let t=await o({name:R.trim(),org:e,displayName:R.trim(),jwksUri:L.trim(),allowedIssuers:$.split(",").map(e=>e.trim()).filter(Boolean),expectedAudience:U.trim(),userinfoEndpoint:z.trim()||void 0,...M&&{isSsoProvider:!0,oidcClientId:B.trim()},...!M&&{autoProvisionAccounts:V,autoGrantOnOrg:Y,...Y&&Q!==b.IamRole.iam_role_unspecified&&{autoGrantRole:Q},...Y&&Z.trim()&&{tenantOrgClaim:Z.trim()}}});es(t),f("success")}catch{}},[R,e,L,$,U,z,M,B,V,Y,Q,Z,o,u]);return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-4",a),children:[(0,t.jsx)(S,{current:h}),"pick"===h&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"stg:text-muted-foreground stg:text-xs",children:"Choose your identity provider to get started. Known providers will have their OIDC configuration auto-populated."}),(0,t.jsx)(v,{onSelect:er}),i&&(0,t.jsx)("div",{className:"stg:pt-1",children:(0,t.jsx)(P,{onClick:i})})]}),"configure"===h&&j&&(0,t.jsx)(I,{preset:j,vars:k,onVarChange:(e,t)=>N(s=>({...s,[e]:t})),name:R,onNameChange:D,audience:U,onAudienceChange:E,isLoading:x,discoveryError:p,onBack:en,onContinue:ea,onCancel:i}),"review"===h&&(0,t.jsx)(A,{discoveryFailed:q,jwksUri:L,onJwksUriChange:T,issuers:$,onIssuersChange:_,userinfoEndpoint:z,onUserinfoEndpointChange:G,isSso:M,onIsSsoChange:W,oidcClientId:B,onOidcClientIdChange:J,autoProvision:V,onAutoProvisionChange:el,autoGrant:Y,onAutoGrantChange:ed,autoGrantRole:Q,onAutoGrantRoleChange:X,tenantOrgClaim:Z,onTenantOrgClaimChange:ee,isCreating:g,createError:c,onBack:eo,onSubmit:eg,onCancel:i}),"success"===h&&et&&(0,t.jsx)(O,{identityProvider:et,org:e,isSso:M,autoProvision:V,autoGrant:Y,autoGrantRole:Q,onDone:()=>n?.(et)})]})}let N=[{key:"pick",label:"Provider"},{key:"configure",label:"Configure"},{key:"review",label:"Review"},{key:"success",label:"Done"}];function S({current:e}){let s=N.findIndex(t=>t.key===e);return(0,t.jsx)("nav",{"aria-label":"Wizard progress",className:"stg:flex stg:items-center stg:gap-1.5",children:N.map((e,n)=>{let i=n<s?"done":n===s?"active":"upcoming";return(0,t.jsxs)("span",{className:"stg:flex stg:items-center stg:gap-1.5",children:[n>0&&(0,t.jsx)("span",{className:(0,r.cn)("stg:h-px stg:w-4","upcoming"===i?"stg:bg-border":"stg:bg-primary-subtle")}),(0,t.jsx)("span",{className:(0,r.cn)("stg:text-[0.65rem] stg:font-medium","active"===i?"stg:text-primary":"done"===i?"stg:text-muted-foreground":"stg:text-muted-foreground-faint"),children:e.label})]},e.key)})})}function I({preset:e,vars:i,onVarChange:a,name:o,onNameChange:l,audience:d,onAudienceChange:c,isLoading:u,discoveryError:m,onBack:x,onContinue:p,onCancel:h}){let b=(0,s.useId)(),f=e.variables.every(e=>""!==(i[e.key]??"").trim())&&""!==o.trim()&&""!==d.trim()&&!u;return(0,t.jsxs)("div",{className:"stg:space-y-3",children:[(0,t.jsx)("p",{className:"stg:text-muted-foreground stg:text-xs",children:e.variables.length>0?`Enter your ${e.label} details to auto-populate the OIDC configuration.`:`${e.label} configuration is fully automatic — just provide a name and audience.`}),e.variables.map(e=>(0,t.jsx)(R,{id:`stgm-idp-var-${e.key}`,label:e.label,value:i[e.key]??"",onChange:t=>a(e.key,t),placeholder:e.placeholder,hint:e.hint,disabled:u,type:e.type,options:e.options},e.key)),(0,t.jsx)("hr",{className:"stg:border-border-muted"}),(0,t.jsx)(R,{id:`${b}-name`,label:"Display name",value:o,onChange:l,placeholder:"e.g., Acme Corp SSO",hint:"Human-readable name shown in the UI",disabled:u}),(0,t.jsx)(R,{id:`${b}-audience`,label:"Expected audience",value:d,onChange:c,placeholder:"stigmer-api",hint:"The aud claim value expected in JWTs from this provider",disabled:u}),m&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,n.getUserMessage)(m)}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:pt-1",children:[(0,t.jsxs)("button",{type:"button",onClick:p,disabled:!f,className:(0,r.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:[u&&(0,t.jsx)(g.SpinnerIcon,{size:12}),"Continue"]}),(0,t.jsx)(L,{onClick:x,disabled:u,children:"Back"}),h&&(0,t.jsx)(P,{onClick:h,disabled:u})]})]})}function A({discoveryFailed:e,jwksUri:i,onJwksUriChange:a,issuers:o,onIssuersChange:l,userinfoEndpoint:d,onUserinfoEndpointChange:c,isSso:u,onIsSsoChange:m,oidcClientId:x,onOidcClientIdChange:p,autoProvision:h,onAutoProvisionChange:b,autoGrant:f,onAutoGrantChange:v,autoGrantRole:j,onAutoGrantRoleChange:y,tenantOrgClaim:k,onTenantOrgClaimChange:C,isCreating:w,createError:N,onBack:S,onSubmit:I,onCancel:O}){let D=(0,s.useId)(),T=""!==i.trim()&&""!==o.trim()&&(!u||""!==x.trim())&&!w;return(0,t.jsxs)("form",{onSubmit:I,className:"stg:space-y-3",children:[e&&(0,t.jsx)("div",{className:"stg:rounded-md stg:border stg:border-warning/30 stg:bg-warning/5 stg:px-3 stg:py-2 stg:text-xs stg:text-warning-foreground",role:"alert",children:"Auto-discovery could not reach the provider. Enter the configuration manually below."}),(0,t.jsx)("p",{className:"stg:text-muted-foreground stg:text-xs",children:"Review the OIDC configuration. All fields are editable."}),(0,t.jsx)(R,{id:`${D}-jwks`,label:"JWKS URI",value:i,onChange:a,placeholder:"https://example.com/.well-known/jwks.json",disabled:w,required:!0}),(0,t.jsx)(R,{id:`${D}-issuers`,label:"Allowed issuers",value:o,onChange:l,placeholder:"https://issuer.example.com/",hint:"Comma-separated list of trusted JWT issuer values",disabled:w,required:!0}),(0,t.jsx)(R,{id:`${D}-userinfo`,label:"Userinfo endpoint",value:d,onChange:c,placeholder:"https://example.com/userinfo",hint:"Optional — used to fetch user profile data during token exchange",disabled:w}),(0,t.jsx)(E,{checked:u,onChange:m,label:"SSO provider",disabled:w}),u&&(0,t.jsx)(R,{id:`${D}-client-id`,label:"OIDC client ID",value:x,onChange:p,placeholder:"public-client-id",hint:"Client ID for the PKCE-based Authorization Code flow",disabled:w,required:!0}),(0,t.jsx)(U,{isSso:u,autoProvision:h,onAutoProvisionChange:b,autoGrant:f,onAutoGrantChange:v,autoGrantRole:j,onAutoGrantRoleChange:y,tenantOrgClaim:k,onTenantOrgClaimChange:C,disabled:w}),N&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,n.getUserMessage)(N)}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:pt-1",children:[(0,t.jsxs)("button",{type:"submit",disabled:!T,className:(0,r.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:[w&&(0,t.jsx)(g.SpinnerIcon,{size:12}),"Create identity provider"]}),(0,t.jsx)(L,{onClick:S,disabled:w,children:"Back"}),O&&(0,t.jsx)(P,{onClick:O,disabled:w})]})]})}function O({identityProvider:e,org:s,isSso:n,autoProvision:i,autoGrant:a,autoGrantRole:o,onDone:l}){let d=e.spec?.displayName||e.metadata?.name||"Identity provider",g=o!==b.IamRole.iam_role_unspecified?b.IamRole[o]:"viewer";return(0,t.jsxs)("div",{className:"stg:space-y-4",children:[(0,t.jsx)("div",{className:"stg:rounded-md stg:border stg:border-primary/30 stg:bg-primary-subtle stg:px-3 stg:py-2.5",children:(0,t.jsxs)("p",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:[d," created successfully"]})}),(0,t.jsxs)("div",{className:"stg:space-y-2",children:[(0,t.jsx)("p",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"What happens next"}),n?(0,t.jsxs)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:["Users can sign in via SSO at"," ",(0,t.jsxs)("span",{className:"stg:font-mono stg:text-foreground",children:["/login?org=",s]}),". Accounts are auto-provisioned and granted the"," ",(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:"viewer"})," role on this organization."]}):i&&a?(0,t.jsxs)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:["Users authenticating with JWTs from this provider will be automatically provisioned and granted the"," ",(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:g})," role on this organization. No additional setup is required."]}):i?(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Accounts are auto-provisioned on first authentication, but no organization role is granted automatically. Use the Members page to grant access."}):(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"The trust relationship is configured. Accounts must be created manually before users can authenticate."}),(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"To verify the setup, have a user authenticate with a JWT from this provider and confirm they can access the organization's resources."})]}),(0,t.jsx)("button",{type:"button",onClick:l,className:(0,r.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"),children:"Done"})]})}function R({id:e,label:s,value:n,onChange:i,placeholder:a,hint:o,disabled:l,required:d,type:g="text",options:c}){return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("label",{htmlFor:e,className:"stg:text-xs stg:font-medium stg:text-foreground",children:s}),"select"===g&&c?(0,t.jsx)("select",{id:e,value:n,onChange:e=>i(e.target.value),disabled:l,className:(0,r.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:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:c.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))}):(0,t.jsx)("input",{id:e,type:"text",value:n,onChange:e=>i(e.target.value),placeholder:a,disabled:l,required:d,className:(0,r.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-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),o&&(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:o})]})}let D=[{value:String(b.IamRole.iam_role_unspecified),label:"Default (viewer)"},{value:String(b.IamRole.viewer),label:"Viewer"},{value:String(b.IamRole.member),label:"Member"},{value:String(b.IamRole.admin),label:"Admin"}];function U({isSso:e,autoProvision:n,onAutoProvisionChange:i,autoGrant:a,onAutoGrantChange:o,autoGrantRole:l,onAutoGrantRoleChange:d,tenantOrgClaim:g,onTenantOrgClaimChange:c,disabled:u}){let m=(0,s.useId)();return e?(0,t.jsx)("div",{className:"stg:rounded-md stg:border stg:border-border-muted stg:bg-muted-faint stg:px-3 stg:py-2",children:(0,t.jsxs)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:["SSO providers automatically provision accounts and grant the"," ",(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:"viewer"})," role on the owning organization. JIT provisioning settings are not applicable."]})}):(0,t.jsxs)("fieldset",{className:(0,r.cn)(h.UNSTYLED_FIELDSET,"stg:space-y-2.5"),disabled:u,children:[(0,t.jsx)("hr",{className:"stg:border-border-muted"}),(0,t.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"JIT provisioning"}),(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Configure automatic account creation and role assignment for users authenticating with this provider."}),(0,t.jsx)(E,{checked:n,onChange:i,label:"Auto-provision accounts",hint:"Create a federated account automatically on first authentication",disabled:u}),(0,t.jsx)(E,{checked:a,onChange:o,label:"Auto-grant on organization",hint:"Grant a role on the owning organization when an account is provisioned",disabled:u||!n}),a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R,{id:`${m}-grant-role`,label:"Auto-grant role",value:String(l),onChange:e=>d(Number(e)),placeholder:"",hint:"Role granted automatically — org admins can upgrade later",disabled:u,type:"select",options:D}),(0,t.jsx)(R,{id:`${m}-tenant-claim`,label:"Tenant org claim",value:g,onChange:c,placeholder:"e.g., org_id",hint:"JWT claim name that maps to a platform-managed organization (max 256 chars)",disabled:u})]})]})}function E({checked:e,onChange:s,label:n,hint:i,disabled:a}){return(0,t.jsxs)("div",{className:"stg:space-y-0.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>s(!e),disabled:a,className:(0,r.cn)("stg:relative stg:inline-flex stg:h-5 stg:w-9 stg:shrink-0 stg:cursor-pointer stg:rounded-full stg:border-2 stg:border-transparent stg:transition-colors",e?"stg:bg-primary":"stg:bg-muted","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:(0,t.jsx)("span",{className:(0,r.cn)("stg:pointer-events-none stg:inline-block stg:h-4 stg:w-4 stg:rounded-full stg:bg-background stg:shadow-sm stg:ring-0 stg:transition-transform",e?"stg:translate-x-4":"stg:translate-x-0")})}),(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:n})]}),i&&(0,t.jsx)("p",{className:"stg:pl-11 stg:text-[0.65rem] stg:text-muted-foreground",children:i})]})}function L({onClick:e,disabled:s,children:n}){return(0,t.jsx)("button",{type:"button",onClick:e,disabled:s,className:(0,r.cn)("stg:rounded-md stg:px-2.5 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:n})}function P({onClick:e,disabled:s}){return(0,t.jsx)(L,{onClick:e,disabled:s,children:"Cancel"})}var T=e.i(353978),$=e.i(162697),_=e.i(193799);function z({identityProvider:e,onUpdated:i,onBack:a,ssoLoginUrl:o,className:c}){let u=(0,s.useId)(),m=e.spec,x=e.metadata,{update:p,isUpdating:h,error:f,clearError:v}=function(){let e=(0,l.useStigmer)(),[t,r]=(0,s.useState)(!1),[n,i]=(0,s.useState)(null),a=(0,s.useCallback)(()=>i(null),[]);return{update:(0,s.useCallback)(async t=>{r(!0),i(null);try{return await e.identityProvider.update(t)}catch(e){throw i((0,d.toError)(e)),e}finally{r(!1)}},[e]),isUpdating:t,error:n,clearError:a}}(),[j,y]=(0,s.useState)("view"),[k,C]=(0,s.useState)(m?.displayName??""),[w,N]=(0,s.useState)(m?.jwksUri??""),[S,I]=(0,s.useState)(m?.allowedIssuers.join(", ")??""),[A,O]=(0,s.useState)(m?.expectedAudience??""),[R,D]=(0,s.useState)(m?.userinfoEndpoint??""),[U,E]=(0,s.useState)(m?.isSsoProvider??!1),[L,P]=(0,s.useState)(m?.oidcClientId??""),[$,_]=(0,s.useState)(m?.autoProvisionAccounts??!1),[M,W]=(0,s.useState)(m?.autoGrantOnOrg??!1),[q,V]=(0,s.useState)(m?.autoGrantRole??b.IamRole.iam_role_unspecified),[K,H]=(0,s.useState)(m?.tenantOrgClaim??""),Q=(0,s.useCallback)(e=>{_(e),e||(W(!1),V(b.IamRole.iam_role_unspecified),H(""))},[]),X=(0,s.useCallback)(e=>{W(e),e&&_(!0),e||(V(b.IamRole.iam_role_unspecified),H(""))},[]),Z=(0,s.useCallback)(()=>{C(m?.displayName??""),N(m?.jwksUri??""),I(m?.allowedIssuers.join(", ")??""),O(m?.expectedAudience??""),D(m?.userinfoEndpoint??""),E(m?.isSsoProvider??!1),P(m?.oidcClientId??""),_(m?.autoProvisionAccounts??!1),W(m?.autoGrantOnOrg??!1),V(m?.autoGrantRole??b.IamRole.iam_role_unspecified),H(m?.tenantOrgClaim??""),v(),y("edit")},[m,v]),ee=(0,s.useCallback)(()=>{v(),y("view")},[v]),et=(0,s.useCallback)(async t=>{t.preventDefault(),v();try{let t=await p({...(0,T.toIdentityProviderUpdateInput)(e),displayName:k.trim(),jwksUri:w.trim(),allowedIssuers:S.split(",").map(e=>e.trim()).filter(Boolean),expectedAudience:A.trim(),userinfoEndpoint:R.trim()||void 0,isSsoProvider:U,oidcClientId:U?L.trim():void 0,autoProvisionAccounts:!U&&!!$||void 0,autoGrantOnOrg:!U&&!!M||void 0,autoGrantRole:!U&&M&&q!==b.IamRole.iam_role_unspecified?q:void 0,tenantOrgClaim:!U&&M&&K.trim()?K.trim():void 0});y("view"),i?.(t)}catch{}},[e,k,w,S,A,R,U,L,$,M,q,K,p,v,i]),es=""!==k.trim()&&""!==w.trim()&&""!==S.trim()&&""!==A.trim()&&(!U||""!==L.trim())&&!h,er=e.status?.audit?.specAudit?.createdAt,en=e.status?.audit?.specAudit?.updatedAt;return(0,t.jsxs)("div",{className:(0,r.cn)("stg:space-y-4",c),children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:justify-between stg:gap-3",children:[(0,t.jsxs)("div",{className:"stg:min-w-0",children:[a&&(0,t.jsxs)("button",{type:"button",onClick:a,className:"stg:text-muted-foreground stg:hover:text-foreground stg:mb-1 stg:flex stg:items-center stg:gap-1 stg:text-xs stg:transition-colors",children:[(0,t.jsx)(Y,{}),"Back to list"]}),(0,t.jsx)("h3",{className:"stg:text-foreground stg:truncate stg:text-sm stg:font-semibold",children:m?.displayName||x?.name||"Identity Provider"}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[x?.slug&&(0,t.jsx)("span",{className:"stg:text-muted-foreground stg:font-mono stg:text-xs",children:x.slug}),(0,t.jsx)(J,{spec:m})]})]}),"view"===j&&(0,t.jsx)("button",{type:"button",onClick:Z,className:(0,r.cn)("stg:shrink-0 stg:rounded-md stg:px-2.5 stg:py-1.5 stg:text-xs stg:font-medium","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:transition-colors"),children:"Edit"})]}),"view"===j?(0,t.jsx)(G,{spec:m,ssoLoginUrl:o,createdAt:er,updatedAt:en}):(0,t.jsxs)("form",{onSubmit:et,className:"stg:space-y-3",children:[(0,t.jsx)(B,{id:`${u}-name`,label:"Display name",value:k,onChange:C,placeholder:"e.g., Acme Corp SSO",disabled:h,required:!0}),(0,t.jsx)(B,{id:`${u}-jwks`,label:"JWKS URI",value:w,onChange:N,placeholder:"https://example.com/.well-known/jwks.json",disabled:h,required:!0}),(0,t.jsx)(B,{id:`${u}-issuers`,label:"Allowed issuers",value:S,onChange:I,placeholder:"https://issuer.example.com/",hint:"Comma-separated list of trusted JWT issuer values",disabled:h,required:!0}),(0,t.jsx)(B,{id:`${u}-audience`,label:"Expected audience",value:A,onChange:O,placeholder:"stigmer-api",disabled:h,required:!0}),(0,t.jsx)(B,{id:`${u}-userinfo`,label:"Userinfo endpoint",value:R,onChange:D,placeholder:"https://example.com/userinfo",hint:"Optional — used to fetch user profile data",disabled:h}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":U,onClick:()=>E(e=>!e),disabled:h,className:(0,r.cn)("stg:relative stg:inline-flex stg:h-5 stg:w-9 stg:shrink-0 stg:cursor-pointer stg:rounded-full stg:border-2 stg:border-transparent stg:transition-colors",U?"stg:bg-primary":"stg:bg-muted","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:(0,t.jsx)("span",{className:(0,r.cn)("stg:pointer-events-none stg:inline-block stg:h-4 stg:w-4 stg:rounded-full stg:bg-background stg:shadow-sm stg:ring-0 stg:transition-transform",U?"stg:translate-x-4":"stg:translate-x-0")})}),(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"SSO provider"})]}),U&&(0,t.jsx)(B,{id:`${u}-client-id`,label:"OIDC client ID",value:L,onChange:P,placeholder:"public-client-id",hint:"Client ID for the PKCE-based Authorization Code flow",disabled:h,required:!0}),(0,t.jsx)(F,{isSso:U,autoProvision:$,onAutoProvisionChange:Q,autoGrant:M,onAutoGrantChange:X,autoGrantRole:q,onAutoGrantRoleChange:V,tenantOrgClaim:K,onTenantOrgClaimChange:H,disabled:h}),f&&(0,t.jsx)("p",{className:"stg:text-destructive stg:text-[0.65rem]",role:"alert",children:(0,n.getUserMessage)(f)}),(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2 stg:pt-1",children:[(0,t.jsxs)("button",{type:"submit",disabled:!es,className:(0,r.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:[h&&(0,t.jsx)(g.SpinnerIcon,{size:12}),"Save changes"]}),(0,t.jsx)("button",{type:"button",onClick:ee,disabled:h,className:(0,r.cn)("stg:rounded-md stg:px-2.5 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:"Cancel"})]})]})]})}function G({spec:e,ssoLoginUrl:s,createdAt:r,updatedAt:n}){return(0,t.jsxs)("dl",{className:"stg:space-y-2.5",children:[(0,t.jsx)(M,{label:"JWKS URI",value:e?.jwksUri,mono:!0}),(0,t.jsx)(M,{label:"Allowed issuers",value:e?.allowedIssuers.join(", "),mono:!0}),(0,t.jsx)(M,{label:"Expected audience",value:e?.expectedAudience,mono:!0}),e?.userinfoEndpoint&&(0,t.jsx)(M,{label:"Userinfo endpoint",value:e.userinfoEndpoint,mono:!0}),e?.isSsoProvider&&(0,t.jsx)(M,{label:"OIDC client ID",value:e.oidcClientId,mono:!0}),e?.isSsoProvider&&s&&(0,t.jsx)(W,{label:"SSO login URL",value:s,hint:"Share this URL with your team members to sign in via SSO"}),(e?.rateLimitBudget??0)>0&&(0,t.jsx)(M,{label:"Rate limit",value:`${e.rateLimitBudget} req/min`}),!e?.isSsoProvider&&e?.autoProvisionAccounts&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("hr",{className:"stg:border-border-muted"}),(0,t.jsx)(M,{label:"Auto-provision accounts",value:e.autoProvisionAccounts?"Enabled":"Disabled"}),(0,t.jsx)(M,{label:"Auto-grant on organization",value:e.autoGrantOnOrg?"Enabled":"Disabled"}),e.autoGrantOnOrg&&(0,t.jsx)(M,{label:"Auto-grant role",value:function(e){switch(e){case b.IamRole.viewer:return"Viewer";case b.IamRole.member:return"Member";case b.IamRole.admin:return"Admin";case b.IamRole.owner:return"Owner";default:return"Viewer (default)"}}(e.autoGrantRole)}),e.autoGrantOnOrg&&e.tenantOrgClaim&&(0,t.jsx)(M,{label:"Tenant org claim",value:e.tenantOrgClaim,mono:!0})]}),(0,t.jsxs)("div",{className:"stg:flex stg:gap-6",children:[r&&(0,t.jsx)(M,{label:"Created",value:K((0,i.timestampDate)(r))}),n&&(0,t.jsx)(M,{label:"Updated",value:K((0,i.timestampDate)(n))})]})]})}function M({label:e,value:s,mono:n}){return s?(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"stg:text-muted-foreground stg:text-[0.65rem] stg:font-medium",children:e}),(0,t.jsx)("dd",{className:(0,r.cn)("stg:text-foreground stg:mt-0.5 stg:break-all stg:text-xs",n&&"stg:font-mono"),children:s})]}):null}function W({label:e,value:n,hint:i}){let{copy:a,copied:o}=(0,_.useCopyFeedback)(),l=(0,s.useRef)(null),d=(0,s.useCallback)(async()=>{!await a(n)&&l.current&&(0,$.selectElementText)(l.current)},[a,n]);return(0,t.jsxs)("div",{children:[(0,t.jsx)("dt",{className:"stg:text-muted-foreground stg:text-[0.65rem] stg:font-medium",children:e}),(0,t.jsxs)("dd",{className:"stg:mt-0.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("span",{ref:l,className:"stg:text-foreground stg:break-all stg:font-mono stg:text-xs stg:select-all",children:n}),(0,t.jsx)("button",{type:"button",onClick:()=>void d(),className:(0,r.cn)("stg:shrink-0 stg:rounded stg:px-1.5 stg:py-0.5 stg:text-[0.6rem]","stg:text-muted-foreground stg:hover:text-foreground stg:hover:bg-accent-hover","stg:transition-colors"),"aria-label":`Copy ${e}`,children:o?"Copied":"Copy"})]}),i&&(0,t.jsx)("p",{className:"stg:text-muted-foreground stg:mt-0.5 stg:text-[0.65rem]",children:i}),(0,t.jsx)("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"stg:sr-only",children:o&&"SSO login URL copied to clipboard"})]})]})}function B({id:e,label:s,value:n,onChange:i,placeholder:a,hint:o,disabled:l,required:d}){return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("label",{htmlFor:e,className:"stg:text-xs stg:font-medium stg:text-foreground",children:s}),(0,t.jsx)("input",{id:e,type:"text",value:n,onChange:e=>i(e.target.value),placeholder:a,disabled:l,required:d,className:(0,r.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-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50")}),o&&(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:o})]})}function J({spec:e}){return e?.isSsoProvider?(0,t.jsx)("span",{className:"stg:inline-flex stg:items-center stg:rounded-full stg:border stg:border-primary/30 stg:bg-primary-subtle stg:px-2 stg:py-0.5 stg:text-[0.65rem] stg:font-medium stg:text-primary",children:"SSO"}):e?.autoProvisionAccounts?(0,t.jsx)("span",{className:"stg:inline-flex stg:items-center stg:rounded-full stg:border stg:border-primary/30 stg:bg-primary-subtle stg:px-2 stg:py-0.5 stg:text-[0.65rem] stg:font-medium stg:text-primary",children:"JIT"}):null}let q=[{value:String(b.IamRole.iam_role_unspecified),label:"Default (viewer)"},{value:String(b.IamRole.viewer),label:"Viewer"},{value:String(b.IamRole.member),label:"Member"},{value:String(b.IamRole.admin),label:"Admin"}];function F({isSso:e,autoProvision:n,onAutoProvisionChange:i,autoGrant:a,onAutoGrantChange:o,autoGrantRole:l,onAutoGrantRoleChange:d,tenantOrgClaim:g,onTenantOrgClaimChange:c,disabled:u}){let m=(0,s.useId)();return e?(0,t.jsx)("div",{className:"stg:rounded-md stg:border stg:border-border-muted stg:bg-muted-faint stg:px-3 stg:py-2",children:(0,t.jsxs)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:["SSO providers automatically provision accounts and grant the"," ",(0,t.jsx)("span",{className:"stg:font-medium stg:text-foreground",children:"viewer"})," role on the owning organization. JIT provisioning settings are not applicable."]})}):(0,t.jsxs)("fieldset",{className:(0,r.cn)(h.UNSTYLED_FIELDSET,"stg:space-y-2.5"),disabled:u,children:[(0,t.jsx)("hr",{className:"stg:border-border-muted"}),(0,t.jsx)("legend",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:"JIT provisioning"}),(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Configure automatic account creation and role assignment for users authenticating with this provider."}),(0,t.jsx)(V,{checked:n,onChange:i,label:"Auto-provision accounts",hint:"Create a federated account automatically on first authentication",disabled:u}),(0,t.jsx)(V,{checked:a,onChange:o,label:"Auto-grant on organization",hint:"Grant a role on the owning organization when an account is provisioned",disabled:u||!n}),a&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsx)("label",{htmlFor:`${m}-grant-role`,className:"stg:text-xs stg:font-medium stg:text-foreground",children:"Auto-grant role"}),(0,t.jsx)("select",{id:`${m}-grant-role`,value:String(l),onChange:e=>d(Number(e.target.value)),disabled:u,className:(0,r.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:focus-visible:outline-none stg:focus-visible:ring-1 stg:focus-visible:ring-ring","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:q.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))}),(0,t.jsx)("p",{className:"stg:text-[0.65rem] stg:text-muted-foreground",children:"Role granted automatically — org admins can upgrade later"})]}),(0,t.jsx)(B,{id:`${m}-tenant-claim`,label:"Tenant org claim",value:g,onChange:c,placeholder:"e.g., org_id",hint:"JWT claim name that maps to a platform-managed organization (max 256 chars)",disabled:u})]})]})}function V({checked:e,onChange:s,label:n,hint:i,disabled:a}){return(0,t.jsxs)("div",{className:"stg:space-y-0.5",children:[(0,t.jsxs)("div",{className:"stg:flex stg:items-center stg:gap-2",children:[(0,t.jsx)("button",{type:"button",role:"switch","aria-checked":e,onClick:()=>s(!e),disabled:a,className:(0,r.cn)("stg:relative stg:inline-flex stg:h-5 stg:w-9 stg:shrink-0 stg:cursor-pointer stg:rounded-full stg:border-2 stg:border-transparent stg:transition-colors",e?"stg:bg-primary":"stg:bg-muted","stg:disabled:pointer-events-none stg:disabled:opacity-50"),children:(0,t.jsx)("span",{className:(0,r.cn)("stg:pointer-events-none stg:inline-block stg:h-4 stg:w-4 stg:rounded-full stg:bg-background stg:shadow-sm stg:ring-0 stg:transition-transform",e?"stg:translate-x-4":"stg:translate-x-0")})}),(0,t.jsx)("span",{className:"stg:text-xs stg:font-medium stg:text-foreground",children:n})]}),i&&(0,t.jsx)("p",{className:"stg:pl-11 stg:text-[0.65rem] stg:text-muted-foreground",children:i})]})}function K(e){return e.toLocaleDateString(void 0,{month:"short",day:"numeric",year:"numeric"})}function Y(){return(0,t.jsx)("svg",{width:"12",height:"12",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:"M10 3L5 8l5 5"})})}var H=e.i(597744),Q=e.i(170255),X=e.i(630983),Z=e.i(297629);e.s(["IdentityProvidersSection",0,function({ssoLoginBaseUrl:e}={}){let r=(0,s.useId)(),{activeOrg:n}=(0,Z.useOrg)(),i=(0,H.useResourceAvailable)(Q.ApiResourceKind.identity_provider),a=n?.metadata?.slug??"",[o,l]=(0,s.useState)({phase:"idle"}),d=(0,s.useRef)(null),g=(0,s.useCallback)(e=>{d.current=e},[]),u=(0,s.useCallback)(()=>{d.current?.(),l({phase:"idle"})},[]),m=(0,s.useCallback)(()=>{d.current?.(),l({phase:"idle"})},[]),x=e??window.location.origin;return(0,t.jsxs)("section",{"aria-labelledby":r,children:[(0,t.jsxs)("div",{className:"stg:mb-3 stg:flex stg:items-center stg:justify-between",children:[(0,t.jsx)("h2",{id:r,className:"stg:text-foreground stg:text-sm stg:font-semibold",children:"Identity Providers"}),i&&a&&"idle"===o.phase&&(0,t.jsx)("button",{type:"button",onClick:()=>l({phase:"creating"}),className:"stg:text-primary stg:hover:text-foreground stg:text-xs stg:font-medium stg:transition-colors",children:"+ New identity provider"})]}),(0,t.jsx)("p",{className:"stg:text-muted-foreground stg:mb-4 stg:text-xs",children:"Identity providers define external OIDC trust relationships for federated authentication. Configure providers for platform-managed organizations or self-managed SSO."}),i?a?"creating"===o.phase?(0,t.jsx)("div",{className:"stg:border-border stg:bg-card stg:rounded-lg stg:border stg:p-4",children:(0,t.jsx)(w,{org:a,onCreated:u,onCancel:()=>l({phase:"idle"})})}):"editing"===o.phase?(0,t.jsx)("div",{className:"stg:border-border stg:bg-card stg:rounded-lg stg:border stg:p-4",children:(0,t.jsx)(z,{identityProvider:o.identityProvider,ssoLoginUrl:o.identityProvider.spec?.isSsoProvider?`${x}/login?org=${a}`:void 0,onUpdated:m,onBack:()=>l({phase:"idle"})})}):(0,t.jsx)(c,{org:a,onEdit:e=>l({phase:"editing",identityProvider:e}),onRefetchRef:g}):(0,t.jsx)("p",{className:"stg:text-muted-foreground stg:py-4 stg:text-center stg:text-xs",children:"Select an organization to manage identity providers."}):(0,t.jsx)(X.CloudFeatureNotice,{children:"Identity providers are not available in local mode. Federated authentication requires Stigmer Cloud."})]})}],23280)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,348990,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(95265),n=e.i(586108),a=e.i(583093);e.s(["useEnvironmentList",0,function(e,o){let i=(0,n.useStigmer)(),l=(0,t.useRef)(o);o!==l.current&&JSON.stringify(o)!==JSON.stringify(l.current)&&(l.current=o);let u=l.current,c=e?async()=>{let t=await i.environment.list((0,r.create)(s.ListEnvironmentsRequestSchema,{org:e,labels:u??{}}));return{environments:t.items,totalCount:t.totalCount}}:null,{data:d,isLoading:g,isRefetching:h,error:p,refetch:m}=(0,a.useFetch)(c,[e,u,i],{environments:[],totalCount:0});return{environments:d.environments,totalCount:d.totalCount,isLoading:g,isRefetching:h,error:p,refetch:m}}])},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)}])},207344,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(95265),n=e.i(621559),a=e.i(586108),o=e.i(367539),i=e.i(326283),l=e.i(348990);let u={"stigmer.ai/personal":"true"};e.s(["usePersonalEnvironment",0,function(e){let c=(0,a.useStigmer)(),{environments:d,isLoading:g,error:h,refetch:p}=(0,l.useEnvironmentList)(e,u),m=(0,t.useMemo)(()=>d[0]??null,[d]),[v,f]=(0,t.useState)(!1),[b,x]=(0,t.useState)(null),S=(0,t.useRef)(m);S.current=m;let y=(0,t.useRef)(g);y.current=g;let w=(0,t.useCallback)(async t=>{if(S.current)return S.current;if(!e)throw Error("usePersonalEnvironment: cannot call getOrCreate when org is null.");if(y.current)throw Error("usePersonalEnvironment: cannot call getOrCreate while the environment list is loading. Wait for isLoading to become false before calling getOrCreate().");f(!0),x(null);try{let r;t&&Object.keys(t).length>0&&(r=t);let s=await c.environment.create({name:"Personal Environment",slug:`env-personal-${(0,o.generateSlugSuffix)()}`,org:e,labels:u,data:r});return S.current=s,p(),s}catch(e){throw x((0,i.toError)(e)),e}finally{f(!1)}},[e,c,p]),k=(0,t.useCallback)(async e=>{let t=S.current;if(!t)throw Error("usePersonalEnvironment: personal environment does not exist. Call getOrCreate() before addVariables().");f(!0),x(null);try{let a=Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(0,r.create)(n.EnvironmentValueSchema,{value:t.value,isSecret:t.isSecret,description:t.description})])),o=(0,r.create)(s.UpdateEnvironmentVariablesRequestSchema,{environmentId:t.metadata.id,variables:a}),i=await c.environment.updateVariables(o);return p(),i}catch(e){throw x((0,i.toError)(e)),e}finally{f(!1)}},[c,p]),A=(0,t.useCallback)(async e=>{let t=S.current;if(!t)throw Error("usePersonalEnvironment: personal environment does not exist. Call getOrCreate() before removeVariables().");f(!0),x(null);try{let n=(0,r.create)(s.RemoveEnvironmentVariablesRequestSchema,{environmentId:t.metadata.id,keys:e}),a=await c.environment.removeVariables(n);return p(),a}catch(e){throw x((0,i.toError)(e)),e}finally{f(!1)}},[c,p]);return{environment:m,isLoading:g,error:b??h,refetch:p,getOrCreate:w,addVariables:k,removeVariables:A,isMutating:v}}])},903198,e=>{"use strict";let t="stigmer:oauth:callback",r="stigmer:oauth:broadcast";function s(e){try{e?.close()}catch{}}e.s(["OAUTH_BROADCAST_CHANNEL",0,r,"OAUTH_CALLBACK_MESSAGE_TYPE",0,t,"closeOAuthPopup",0,s,"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,n,a){return new Promise((o,i)=>{let l,u,c=!1,d=null,g=!1;function h(e){if(!c){c=!0,l&&clearTimeout(l),u&&clearInterval(u),window.removeEventListener("message",m);try{d?.close()}catch{}e instanceof Error?i(e):o(e)}}function p(e){if(e?.type===t){if(e.state!==n)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.")),s(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.")),s(e)},12e4);let v=null;u=setInterval(()=>{!g&&(e.closed?null===v?v=Date.now():Date.now()-v>5e3&&h(Error("The authentication window was closed before completing sign-in.")):v=null)},500)})}])},230849,4144,e=>{"use strict";var t=e.i(271645);e.s(["useScrollShadows",0,function(){let e=(0,t.useRef)(null),[r,s]=(0,t.useState)(!1),[n,a]=(0,t.useState)(!1),o=(0,t.useCallback)(()=>{let t=e.current;t&&(s(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",o,{passive:!0});let r=new ResizeObserver(o);return r.observe(t),o(),()=>{t.removeEventListener("scroll",o),r.disconnect()}},[o]),{scrollRef:e,canScrollUp:r,canScrollDown:n}}],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),s=e.i(893976),n=e.i(230849),a=e.i(4144),o=e.i(379410);function i(){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:u,onCancel:c,isSubmitting:d,disabled:g,title:h,description:p,submitLabel:m,cancelLabel:v="Back",defaultSaveForFuture:f=!0,hideSaveToggle:b=!1,poolValues:x,className:S,ariaLabel:y}){let[w,k]=(0,r.useState)(()=>Object.fromEntries(e.map(e=>{let t=x?.(e.key);return[e.key,t?.value??""]}))),[A]=(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}),[O,E]=(0,r.useState)(new Set),[j,C]=(0,r.useState)(f),N=(0,r.useRef)(null),I=(0,n.useScrollShadows)(),M=(0,r.useId)(),P=`${M}-save-toggle`,R=g||d,L=e.every(e=>w[e.key]?.trim()!==""),T=(0,r.useCallback)((e,t)=>{k(r=>({...r,[e]:t}))},[]),_=(0,r.useCallback)(e=>{E(t=>{let r=new Set(t);return r.has(e)?r.delete(e):r.add(e),r})},[]),U=(0,r.useCallback)(t=>{if(t.preventDefault(),!L||R)return;let r={};for(let t of e)r[t.key]={value:w[t.key],isSecret:t.isSecret,...t.description&&{description:t.description}};u(r,{saveForFuture:j})},[L,R,w,e,u,j]),V=y??(h?`Configure ${h}`:"Configure environment variables"),D=m??(j?"Save":"Use once");return(0,t.jsxs)("form",{onSubmit:U,className:(0,s.cn)("stg:w-72 stg:space-y-3",S),"aria-label":V,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:[I.canScrollUp&&(0,t.jsx)(a.ScrollFade,{position:"top"}),(0,t.jsx)("div",{ref:I.scrollRef,className:"stg:max-h-64 stg:space-y-2.5 stg:overflow-y-auto",children:e.map((e,r)=>{let n=`${M}-env-${e.key}`,a=e.description?`${n}-desc`:void 0,o=O.has(e.key);return(0,t.jsxs)("div",{className:"stg:space-y-1",children:[(0,t.jsxs)("label",{htmlFor:n,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?N:void 0,id:n,type:e.isSecret&&!o?"password":"text",value:w[e.key],onChange:t=>T(e.key,t.target.value),disabled:R,required:!0,"aria-required":!0,"aria-describedby":a,autoComplete:"off",autoFocus:0===r,className:(0,s.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:()=>_(e.key),disabled:R,className:(0,s.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":o?`Hide ${e.key}`:`Show ${e.key}`,tabIndex:-1,children:o?(0,t.jsx)(l,{}):(0,t.jsx)(i,{})})]}),e.description&&(0,t.jsx)("p",{id:a,className:"stg:text-[0.6rem] stg:leading-relaxed stg:text-muted-foreground-subtle",children:e.description}),A.has(e.key)&&(0,t.jsx)("p",{className:"stg:text-[0.55rem] stg:text-primary-muted",children:"Pre-filled from session variables"})]},e.key)})}),I.canScrollDown&&(0,t.jsx)(a.ScrollFade,{position:"bottom"})]}),!b&&(0,t.jsxs)("div",{className:"stg:flex stg:items-start stg:gap-2 stg:pt-0.5",children:[(0,t.jsx)("button",{id:P,type:"button",role:"switch","aria-checked":j,onClick:()=>C(e=>!e),disabled:R,className:(0,s.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,s.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:P,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:[c&&(0,t.jsx)("button",{type:"button",onClick:c,disabled:R,className:(0,s.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:v}),(0,t.jsxs)("button",{type:"submit",disabled:!L||R,"data-cursor-target":"env-form-submit",className:(0,s.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)(o.SpinnerIcon,{size:12}),D]})]})]})}])},793907,e=>{"use strict";var t=e.i(843476),r=e.i(893976);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:"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 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:"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:o,canBringOwnApp:i,docsUrl:l,onBringOwnApp:u,compact:c,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=i?o?"You can use your own OAuth app or enter a token manually.":"You can use your own OAuth app.":o?"You can still connect by entering your own token manually.":"OAuth sign-in is temporarily unavailable for this server.",p=i&&u,m=!!l&&!i;return c?(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:u,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)(s,{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:u,"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)(n,{className:"stg:size-3 stg:shrink-0"})]})]})]})}])},20883,e=>{"use strict";var t=e.i(939910),r=e.i(167937),s=e.i(498931),n=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 o(e,o,l){let u,c=l?.pollIntervalMs??2500,d=Math.min(l?.deadlineMs??39e5,39e5);try{u=await e.startConnect(o)}catch(t){if(!(0,n.isUnimplemented)(t))throw t;return i(e,o,d)}l?.onStarted?.(u);let g=Date.now()+d;for(;;){if(Date.now()>=g)throw new a(o.mcpServerId,d);await function(e){return new Promise(t=>setTimeout(t,e))}(Math.min(c,Math.max(1,g-Date.now())));let i=await e.get(o.mcpServerId),l=i.status?.connectStatus;if(l?.phase===s.ConnectPhase.succeeded)return i;if(l?.phase===s.ConnectPhase.failed)throw function(e,s){let a=t.Code[e];return(0,n.wrapError)(new r.ConnectError(s,"number"==typeof a?a:t.Code.Unknown))}(l.failureCode,l.failureMessage)}}async function i(e,t,r){let s,n=e.connect(t);n.catch(()=>{});let o=new Promise((e,n)=>{s=setTimeout(()=>n(new a(t.mcpServerId,r)),r)});try{return await Promise.race([n,o])}finally{void 0!==s&&clearTimeout(s)}}e.s(["connectAndWait",0,o])},139666,e=>{"use strict";let t="STIGMER_SERVER_ADDRESS",r="STIGMER_API_KEY",s=new Set([t,r]);async function n(e){var s;let n=await e.getAuthCredential();return s=e.baseUrl,{[t]:{value:function(e){try{let t=new URL(e),r=t.hostname,s=t.port||("https:"===t.protocol?"443":"80");return`${r}:${s}`}catch{return e}}(s),isSecret:!1,description:"Auto-resolved from the current Stigmer connection."},[r]:{value:n||"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(![...s].some(e=>r.has(e)))return{};let a=await n(e),o={};for(let[e,t]of Object.entries(a))r.has(e)&&(o[e]=t);return o}e.s(["SYSTEM_ENV_VAR_KEYS",0,s,"resolveDeclaredSystemEnvVars",0,a,"resolveSystemEnvVarValues",0,n])},168197,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(20883),n=e.i(610595),a=e.i(336973),o=e.i(586108),i=e.i(139666),l=e.i(326283),u=e.i(903198);e.s(["getOAuthConnectErrorMessage",0,function(e,t){let r=(0,n.getUserMessage)(e);return"connecting"===t?`Signed in successfully, but tool discovery failed: ${r}`:r},"useMcpServerOAuthConnect",0,function(){let e=(0,o.useStigmer)(),[n,c]=(0,t.useState)("idle"),[d,g]=(0,t.useState)(null),[h,p]=(0,t.useState)(null),m=(0,t.useRef)(null),v=(0,t.useRef)(null),f=(0,t.useRef)(!1),b=(0,t.useRef)("idle"),x=(0,t.useCallback)(e=>{b.current=e,c(e)},[]);(0,t.useEffect)(()=>()=>{v.current?.()},[]);let S=(0,t.useCallback)(()=>{(v.current||m.current)&&(f.current=!0,v.current?.(),(0,u.closeOAuthPopup)(m.current),m.current=null,v.current=null),x("idle"),g(null),p(null)},[x]);return{startOAuth:(0,t.useCallback)(async(t,n,o)=>{x("initiating"),g(null),p(null),f.current=!1,v.current?.();let c=(0,u.openOAuthPopup)();if(!c){let e=(0,u.popupBlockedError)();throw g(e),p("initiating"),x("idle"),e}m.current=c;try{let l=await e.mcpServer.initiateOAuthConnect((0,r.create)(a.InitiateOAuthConnectInputSchema,{mcpServerId:t,org:n}));c.location.href=l.authorizationUrl,x("awaiting-callback");let{code:d,state:g}=await (0,u.waitForOAuthCallback)(c,l.state,e=>{v.current=e});x("completing"),await e.mcpServer.completeOAuthConnect((0,r.create)(a.CompleteOAuthConnectInputSchema,{mcpServerId:t,authorizationCode:d,state:g})),x("connecting");let h=o?await (0,i.resolveDeclaredSystemEnvVars)(e,o):{},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:n,...Object.keys(p).length>0?{runtimeEnv:p}:{}}),f=await (0,s.connectAndWait)(e.mcpServer,m);return x("done"),f}catch(t){let e=(0,l.toError)(t);throw f.current||(g(e),p(b.current),x("idle"),(0,u.closeOAuthPopup)(c)),f.current=!1,e}finally{m.current=null,v.current=null}},[e,x]),isInProgress:"idle"!==n&&"done"!==n,phase:n,error:d,failedPhase:h,clearError:S}}])},862645,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(336973),n=e.i(20883),a=e.i(586108),o=e.i(139666),i=e.i(326283);e.s(["useMcpServerConnect",0,function(){let e=(0,a.useStigmer)(),[l,u]=(0,t.useState)(!1),[c,d]=(0,t.useState)(null),g=(0,t.useCallback)(()=>d(null),[]);return{connect:(0,t.useCallback)(async(t,a,l,c)=>{u(!0),d(null);try{let i={...c?await (0,o.resolveDeclaredSystemEnvVars)(e,c):{},...l??{}},u={};for(let[e,t]of Object.entries(i))u[e]={value:t.value,isSecret:t.isSecret??!1};let d=(0,r.create)(s.ConnectInputSchema,{mcpServerId:t,org:a,...Object.keys(u).length>0?{runtimeEnv:u}:{}});return await (0,n.connectAndWait)(e.mcpServer,d)}catch(t){let e=(0,i.toError)(t);throw d(e),e}finally{u(!1)}},[e]),isConnecting:l,error:c,clearError:g}}])},727996,288270,651424,153158,e=>{"use strict";var t=e.i(910304),r=e.i(586108),s=e.i(583093);e.s(["useMcpServer",0,function(e,n){let a=(0,r.useStigmer)(),{data:o,isLoading:i,isRefetching:l,error:u,refetch:c}=(0,s.useFetch)(e&&n?async()=>{try{return await a.mcpServer.getByReference({org:e,slug:n})}catch(e){if((0,t.isNotFound)(e))return null;throw e}}:null,[e,n,a],null);return{mcpServer:o,isLoading:i,isRefetching:l,error:u,refetch:c}}],727996);var n=e.i(271645),a=e.i(498931),o=e.i(437241),i=e.i(207344);function l(e,t,r){let s=[];for(let[n,a]of Object.entries(e))!t.has(n)&&(r?.has(n)||s.push({key:n,isSecret:a.isSecret,...a.description&&{description:a.description},...a.optional&&{optional:!0}}));return s}e.s(["diffEnv",0,l],288270);var u=e.i(139666),c=e.i(891287),d=e.i(336973);let g={connected:!1,accessTokenExpiresAt:BigInt(0),targetEnvVar:"",authMethod:"",connectionHealth:d.OAuthConnectionHealth.OAUTH_CONNECTION_HEALTH_UNSPECIFIED};var h=e.i(521557),p=e.i(326283);let m={isSupported:!1,hasOverride:!1,oauthAppId:null,clientId:null},v={isSupported:!1,hasOverride:!1,oauthAppId:null,clientId:null},f={...m,isLoading:!1,isRefetching:!1,error:null,refetch:()=>{},setOrgOAuthApp:()=>Promise.resolve(""),isSetting:!1,setError:null,deleteOrgOAuthApp:()=>Promise.resolve(!1),isDeleting:!1,deleteError:null,clearErrors:()=>{}};function b(e,t){let a=(0,r.useStigmer)(),{data:o,isLoading:i,isRefetching:l,error:u,refetch:g}=(0,s.useFetch)(e&&t?async()=>{try{let r=await a.mcpServer.getOrgOAuthApp((0,c.create)(d.GetOrgOAuthAppInputSchema,{resourceId:e,org:t}));return{isSupported:!0,hasOverride:r.hasOverride,oauthAppId:r.oauthAppId||null,clientId:r.clientId||null}}catch(e){if((0,h.isUnimplemented)(e))return v;throw e}}:null,[e,t,a],m,{cacheKey:`org-oauth-app:${t}:${e}`}),[b,x]=(0,n.useState)(!1),[S,y]=(0,n.useState)(null),[w,k]=(0,n.useState)(!1),[A,O]=(0,n.useState)(null),E=(0,n.useCallback)(()=>{y(null),O(null)},[]),j=(0,n.useCallback)(async(r,s)=>{if(!e||!t)throw Error("useOrgOAuthApp: resourceId and org are required for setOrgOAuthApp");x(!0),y(null);try{return(await a.mcpServer.setOrgOAuthApp((0,c.create)(d.SetOrgOAuthAppInputSchema,{resourceId:e,org:t,clientId:r,clientSecret:s}))).oauthAppId}catch(t){let e=(0,p.toError)(t);throw y(e),e}finally{x(!1)}},[a,e,t]),C=(0,n.useCallback)(async()=>{if(!e||!t)throw Error("useOrgOAuthApp: resourceId and org are required for deleteOrgOAuthApp");k(!0),O(null);try{return(await a.mcpServer.deleteOrgOAuthApp((0,c.create)(d.DeleteOrgOAuthAppInputSchema,{resourceId:e,org:t}))).deleted}catch(t){let e=(0,p.toError)(t);throw O(e),e}finally{k(!1)}},[a,e,t]);return e&&t?{...o,isLoading:i,isRefetching:l,error:u,refetch:g,setOrgOAuthApp:j,isSetting:b,setError:S,deleteOrgOAuthApp:C,isDeleting:w,deleteError:A,clearErrors:E}:{...f,refetch:g,clearErrors:E}}e.s(["useOrgOAuthApp",0,b],651424),e.s(["useMcpServerCredentials",0,function(e,t){let h=(0,i.usePersonalEnvironment)(e),[p,m]=(0,n.useState)(!1),v=t?.spec?.auth,f=v?"oauth":"manual",x=v?.targetEnvVar||null,S=v?.tokenLifetimeHint||null,y=!v?.oauthOnly,w=p&&y,k=t?.status?.oauthStatus,A="oauth"===f&&k?.vendorApprovalStatus===o.VendorApprovalStatus.PENDING,O="oauth"===f&&(k?.vendorApprovalStatus===o.VendorApprovalStatus.PENDING||k?.vendorApprovalStatus===o.VendorApprovalStatus.REJECTED),E=k?.vendorApprovalDocsUrl||null,j=!!v?.oauthAppRef?.slug,C=b("oauth"===f&&j?t?.metadata?.id??null:null,e),N=C.hasOverride,I=C.isLoading||null!==C.error||j&&!e,M="oauth"!==f||I?a.OAuthAppSource.OAUTH_APP_SOURCE_UNSPECIFIED:N?a.OAuthAppSource.OAUTH_APP_SOURCE_ORG_OVERRIDE:j?a.OAuthAppSource.OAUTH_APP_SOURCE_PLATFORM:a.OAuthAppSource.OAUTH_APP_SOURCE_NONE,P="oauth"===f&&j&&!N&&C.isSupported,R=function(e,t){let n=(0,r.useStigmer)(),{data:a,isLoading:o,isRefetching:i,error:l,refetch:u}=(0,s.useFetch)(e&&t?async()=>{let r=await n.mcpServer.getOAuthGrantStatus((0,c.create)(d.GetOAuthGrantStatusInputSchema,{resourceId:e,org:t}));return{connected:r.connected,accessTokenExpiresAt:r.accessTokenExpiresAt,targetEnvVar:r.targetEnvVar,authMethod:r.authMethod,connectionHealth:r.connectionHealth}}:null,[e,t,n],g);return{...a,isLoading:o,isRefetching:i,error:l,refetch:u}}("oauth"===f?t?.metadata?.id??null:null,"oauth"===f?e:null),L="oauth"===f&&R.connected,T=(0,n.useMemo)(()=>new Set(Object.keys(h.environment?.spec?.data??{})),[h.environment]),_=(0,n.useMemo)(()=>{if(!t)return[];let e=t.spec?.env;return e&&0!==Object.keys(e).length?l(e,T).filter(e=>!u.SYSTEM_ENV_VAR_KEYS.has(e.key)):[]},[t,T]),U=(0,n.useMemo)(()=>_.filter(e=>!e.optional),[_]),V=(0,n.useMemo)(()=>!x||w?U:U.filter(e=>e.key!==x),[U,x,w]),D=!h.isLoading&&!R.isLoading&&0===V.length&&("manual"===f||w||L),H=(0,n.useCallback)(async e=>{await h.getOrCreate(),await h.addVariables(e)},[h]),$=(0,n.useCallback)(()=>{h.refetch(),R.refetch(),C.refetch()},[h,R,C]);return{authMode:f,oauthTargetEnvVar:x,isOAuthConnected:L,connectionHealth:R.connectionHealth,canDisconnect:L,accessTokenExpiresAt:R.accessTokenExpiresAt,tokenLifetimeHint:S,isVendorApprovalPending:A,isVendorApprovalBlocked:O,vendorApprovalDocsUrl:E,effectiveOAuthSource:M,isOrgOAuthApp:N,canBringOwnApp:P,manualEntrySupported:y,missingVariables:V,isReady:D,isLoading:h.isLoading||R.isLoading||C.isLoading,error:h.error??R.error??C.error,saveCredentials:H,isSaving:h.isMutating,refetch:$,manualOverride:w,setManualOverride:m}}],153158)},844533,801731,e=>{"use strict";var t=e.i(843476),r=e.i(893976),s=e.i(597744);function n({className:e}){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,t.jsx)("path",{d:"M2 5.5 8 2.5l6 3-6 3-6-3Z"}),(0,t.jsx)("path",{d:"M2 5.5v5l6 3 6-3v-5"}),(0,t.jsx)("path",{d:"M8 8.5v5"})]})}function a({className:e}){return(0,t.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",className:e,"aria-hidden":"true",children:[(0,t.jsx)("circle",{cx:"5",cy:"11",r:"2.5"}),(0,t.jsx)("path",{d:"M6.8 9.2 13 3"}),(0,t.jsx)("path",{d:"M11 5l1.5 1.5"}),(0,t.jsx)("path",{d:"M9 7l1.5 1.5"})]})}e.s(["StdioSandboxNotice",0,function({serverType:e,className:a}){var o;return(o=(0,s.useDeploymentMode)(),"cloud"!==o||e?.case!=="stdio")?null:(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:bg-muted-subtle stg:text-muted-foreground stg:flex stg:items-start stg:gap-2.5 stg:rounded-lg stg:border stg:border-transparent stg:px-4 stg:py-3",a),children:[(0,t.jsx)(n,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,t.jsx)("p",{className:"stg:text-xs stg:leading-relaxed",children:"This stdio server runs only on local runners — it won't be available to sessions on Stigmer-managed cloud compute. Run the session on a local runner (desktop app or CLI) to use it, or choose a remote (HTTP) server instead."})]})}],844533),e.s(["OAuthRequiredNotice",0,function({oauthOnly:e,className:s}){return e?(0,t.jsxs)("div",{role:"status",className:(0,r.cn)("stg:bg-muted-subtle stg:text-muted-foreground stg:flex stg:items-start stg:gap-2.5 stg:rounded-lg stg:border stg:border-transparent stg:px-4 stg:py-3",s),children:[(0,t.jsx)(a,{className:"stg:mt-0.5 stg:size-4 stg:shrink-0"}),(0,t.jsx)("p",{className:"stg:text-xs stg:leading-relaxed",children:"This server requires OAuth. Sign in to connect — its hosted endpoint rejects manually-entered API tokens, so a pasted token won't work here."})]}):null}],801731)},388894,e=>{"use strict";var t=e.i(271645),r=e.i(891287),s=e.i(336973),n=e.i(586108),a=e.i(326283);e.s(["useDisconnectOAuth",0,function(){let e=(0,n.useStigmer)(),[o,i]=(0,t.useState)(!1),[l,u]=(0,t.useState)(null),c=(0,t.useCallback)(()=>u(null),[]);return{disconnect:(0,t.useCallback)(async(t,n)=>{i(!0),u(null);try{return(await e.mcpServer.disconnectOAuth((0,r.create)(s.DisconnectOAuthInputSchema,{resourceId:t,org:n}))).disconnected}catch(e){throw u((0,a.toError)(e)),e}finally{i(!1)}},[e]),isDisconnecting:o,error:l,clearError:c}}])}]);