@langwatch/server 3.6.0 → 3.7.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 (1120) hide show
  1. package/feature-map.json +1279 -0
  2. package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-C2BpUHmD.js +2 -0
  3. package/langwatch/dist/client/assets/AddDatasetRecordDrawer-MGG9OkL5.js +6 -0
  4. package/langwatch/dist/client/assets/AddOrEditAnnotationScore-DT7Wwgex.js +2 -0
  5. package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-B_bvSihT.js +2 -0
  6. package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-DTTe34qt.js +3 -0
  7. package/langwatch/dist/client/assets/AddParticipants-Cu80BF8F.js +2 -0
  8. package/langwatch/dist/client/assets/AgentHistoryDrawer-Dv3a7Uw1.js +2 -0
  9. package/langwatch/dist/client/assets/AgentHttpEditorDrawer-BsTydMou.js +5 -0
  10. package/langwatch/dist/client/assets/AgentListDrawer-CkuGaFHx.js +2 -0
  11. package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-K0PUyG8U.js +2 -0
  12. package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CMHvyQPV.js +2 -0
  13. package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-B18KFX98.js +2 -0
  14. package/langwatch/dist/client/assets/AiGatewayLayout-DL7at8rW.js +2 -0
  15. package/langwatch/dist/client/assets/AnnotationsTable-CrX2ZAvY.js +2 -0
  16. package/langwatch/dist/client/assets/AreaChart-BYqCBYVe.js +2 -0
  17. package/langwatch/dist/client/assets/AutomationDrawer-gr9nl_bx.js +112 -0
  18. package/langwatch/dist/client/assets/BatchEvaluationSummary-DJGlsFFE.js +2 -0
  19. package/langwatch/dist/client/assets/BudgetEditDrawer-DA_Za9Jh.js +2 -0
  20. package/langwatch/dist/client/assets/CartesianChart-BvVgDMpj.js +54 -0
  21. package/langwatch/dist/client/assets/CascadeArchiveDialog-CRcsYqD3.js +2 -0
  22. package/langwatch/dist/client/assets/ChartCard-C-6jgIhJ.js +2 -0
  23. package/langwatch/dist/client/assets/ChartTooltip-DDBarZKG.js +4 -0
  24. package/langwatch/dist/client/assets/ChatWindow-DgNy40Dm.js +5 -0
  25. package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-N8k4omh5.js +9 -0
  26. package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-B-0KIS0U.js +2 -0
  27. package/langwatch/dist/client/assets/ColorfulBlockIcons-DntRdsrM.js +6 -0
  28. package/langwatch/dist/client/assets/ColumnTypeIcon-DHpZtj81.js +2 -0
  29. package/langwatch/dist/client/assets/ConfirmDialog-Bv_GbZtR.js +2 -0
  30. package/langwatch/dist/client/assets/ContactSalesBlock-BKfDeTTe.js +2 -0
  31. package/langwatch/dist/client/assets/Conversation-BLw2XAh1.js +2 -0
  32. package/langwatch/dist/client/assets/CopyInput-D4OHtSik.js +2 -0
  33. package/langwatch/dist/client/assets/CopyableInputWithPrefix-CqmK9rdo.js +2 -0
  34. package/langwatch/dist/client/assets/CreateProjectDrawer-z3akmVmk.js +2 -0
  35. package/langwatch/dist/client/assets/CreateTeamDrawer-Cq0VeHPU.js +2 -0
  36. package/langwatch/dist/client/assets/CustomGraph-D1JcOEDG.js +2 -0
  37. package/langwatch/dist/client/assets/DashboardLayout-cHFbN-Gk.js +6 -0
  38. package/langwatch/dist/client/assets/DashboardNameDrawer-Gox6uoUt.js +2 -0
  39. package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-jE8I0jR2.js +2 -0
  40. package/langwatch/dist/client/assets/DatasetEditorTable-DKIy0xQj.js +2 -0
  41. package/langwatch/dist/client/assets/DatasetPickerList-DxrvRALJ.js +2 -0
  42. package/langwatch/dist/client/assets/DatasetPreviewTable-BtNFthdy.js +2 -0
  43. package/langwatch/dist/client/assets/DatasetSelector-DnwaHRnP.js +2 -0
  44. package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-CdUN3LnJ.js +2 -0
  45. package/langwatch/dist/client/assets/DeleteConfirmationDialog-DuCAmpDY.js +2 -0
  46. package/langwatch/dist/client/assets/DocsLinks-CIoxiusp.js +2 -0
  47. package/langwatch/dist/client/assets/DynamicZodForm-g1UNpH1b.js +2 -0
  48. package/langwatch/dist/client/assets/EditAutomationFilterDrawer-BTKzOnMx.js +3 -0
  49. package/langwatch/dist/client/assets/EditModelProviderDrawer-CRJeagvH.js +4 -0
  50. package/langwatch/dist/client/assets/EditProjectDrawer-B6CJf6nC.js +2 -0
  51. package/langwatch/dist/client/assets/EmojiPickerModal-DT_Uj7SU.js +3 -0
  52. package/langwatch/dist/client/assets/EnterpriseLockedSurface-BjKgoqAx.js +2 -0
  53. package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-BnIwWX8t.js +107 -0
  54. package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-BMpitetN.js +2 -0
  55. package/langwatch/dist/client/assets/EvaluatorEditorDrawer-8SJeJRen.js +2 -0
  56. package/langwatch/dist/client/assets/EvaluatorEditorShared-BJefmSxm.js +43 -0
  57. package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-D9r7pDt9.js +2 -0
  58. package/langwatch/dist/client/assets/EvaluatorListDrawer-J_BFDGv3.js +2 -0
  59. package/langwatch/dist/client/assets/EvaluatorMappingsSection-DZFvYqNu.js +2 -0
  60. package/langwatch/dist/client/assets/EvaluatorSelection-DLWkQLtb.js +2 -0
  61. package/langwatch/dist/client/assets/EvaluatorSelectionBox-CPndz_g-.js +2 -0
  62. package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-B1g5DjJ7.js +2 -0
  63. package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-KKfZF0P-.js +2 -0
  64. package/langwatch/dist/client/assets/ExecutionState-Dh8lIhIP.js +2 -0
  65. package/langwatch/dist/client/assets/ExternalImage-As_YKOAz.js +34 -0
  66. package/langwatch/dist/client/assets/FeatureFlagsDrawer-ClPIMzIj.js +2 -0
  67. package/langwatch/dist/client/assets/FieldInfoTooltip-s2rM7SM0.js +2 -0
  68. package/langwatch/dist/client/assets/FieldsFilters-DePzLbr2.js +2 -0
  69. package/langwatch/dist/client/assets/FilterDisplay-ClLW19sO.js +2 -0
  70. package/langwatch/dist/client/assets/FilterSidebar-_ppaUjTr.js +2 -0
  71. package/langwatch/dist/client/assets/FormatMoney-CGjDIju_.js +2 -0
  72. package/langwatch/dist/client/assets/FoundryDrawer-DGKNXqmH.js +2 -0
  73. package/langwatch/dist/client/assets/FullLogo-itaa7fj-.js +2 -0
  74. package/langwatch/dist/client/assets/GovernanceLayout-DO9JArUM.js +2 -0
  75. package/langwatch/dist/client/assets/GraphsLayout-CjPYn5X3.js +2 -0
  76. package/langwatch/dist/client/assets/GroupBindingInputRow-zL2daQIU.js +2 -0
  77. package/langwatch/dist/client/assets/GuardrailsDrawer-Cf49144Z.js +91 -0
  78. package/langwatch/dist/client/assets/History-Cyg2gtXB.js +17 -0
  79. package/langwatch/dist/client/assets/HorizontalFormControl-COLSSPyK.js +2 -0
  80. package/langwatch/dist/client/assets/HoverableBigText-BLoq2yxD.js +2 -0
  81. package/langwatch/dist/client/assets/InstallCliCard-DvH3ygIs.js +2 -0
  82. package/langwatch/dist/client/assets/IntegratePaneShell-DmBxXblY.js +8 -0
  83. package/langwatch/dist/client/assets/InviteMemberDrawer-BPyf9yg9.js +2 -0
  84. package/langwatch/dist/client/assets/LLMModelCostDrawer-Ddduogw2.js +2 -0
  85. package/langwatch/dist/client/assets/LangyContextTarget-C6xwYVGg.js +2 -0
  86. package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-BYKcrVD_.js +2 -0
  87. package/langwatch/dist/client/assets/Legend-DoNXU8yt.js +6 -0
  88. package/langwatch/dist/client/assets/Line-DVmhil3S.js +2 -0
  89. package/langwatch/dist/client/assets/LineChart-JT5Tcp_D.js +2 -0
  90. package/langwatch/dist/client/assets/ListTable-sDgRCJ9e.js +2 -0
  91. package/langwatch/dist/client/assets/LoadingScreen-XWYCoKBN.js +2 -0
  92. package/langwatch/dist/client/assets/Markdown-CjWZDaeK.js +3 -0
  93. package/langwatch/dist/client/assets/MenuLink-CCPiKN-n.js +2 -0
  94. package/langwatch/dist/client/assets/MessageCard-CbSQoH1U.js +2 -0
  95. package/langwatch/dist/client/assets/MetadataTag-B1XwJcdK.js +5 -0
  96. package/langwatch/dist/client/assets/ModelProviderCustomModelInput-DKgydORR.js +2 -0
  97. package/langwatch/dist/client/assets/ModelProviderScreen-CoHgPhxe.js +2 -0
  98. package/langwatch/dist/client/assets/ModelSelector-dbR6V8hR.js +2 -0
  99. package/langwatch/dist/client/assets/MyLayout-BCFIoFGU.js +2 -0
  100. package/langwatch/dist/client/assets/NavigationFooter-BV-y1Ccf.js +2 -0
  101. package/langwatch/dist/client/assets/NewWorkflowForm-DgYkTq45.js +2 -0
  102. package/langwatch/dist/client/assets/NoDataInfoBlock-CqSD7i-D.js +2 -0
  103. package/langwatch/dist/client/assets/OnboardingContainer-jXD3w576.js +2 -0
  104. package/langwatch/dist/client/assets/OnlineEvaluationDrawer-3RfgPXAt.js +2 -0
  105. package/langwatch/dist/client/assets/OpsPageShell-BOi49ML9.js +2 -0
  106. package/langwatch/dist/client/assets/OttlEditor-7MOJI6SZ.js +3 -0
  107. package/langwatch/dist/client/assets/OverflownText-DITOBs56.js +2 -0
  108. package/langwatch/dist/client/assets/ProjectAvatar-BOH7ULC-.js +2 -0
  109. package/langwatch/dist/client/assets/ProjectLangyLayout-D6uI0rgc.js +82 -0
  110. package/langwatch/dist/client/assets/PromptEditorDrawer-CawpMwv2.js +2 -0
  111. package/langwatch/dist/client/assets/PromptListDrawer-mJuEu6sl.js +2 -0
  112. package/langwatch/dist/client/assets/PropertySectionTitle-DM-QD_X7.js +37 -0
  113. package/langwatch/dist/client/assets/ProviderModelSelector-bu_UnJgn.js +2 -0
  114. package/langwatch/dist/client/assets/ProviderScopeChips-DAith1M3.js +2 -0
  115. package/langwatch/dist/client/assets/PushToCopiesDialog-ZhJKOmpB.js +2 -0
  116. package/langwatch/dist/client/assets/RandomColorAvatar-D4Pjdi5E.js +2 -0
  117. package/langwatch/dist/client/assets/ReferenceDot-BNL3mb_4.js +2 -0
  118. package/langwatch/dist/client/assets/RenderInputOutput-B6SIoJEE.js +261 -0
  119. package/langwatch/dist/client/assets/ScenarioFormDrawer-BreFWAEL.js +2 -0
  120. package/langwatch/dist/client/assets/ScenarioInputMappingSection-BO7xuz3Q.js +2 -0
  121. package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-B7tqZUtg.js +3 -0
  122. package/langwatch/dist/client/assets/ScopeChipPicker-DW0UYA9z.js +2 -0
  123. package/langwatch/dist/client/assets/SearchInput-Q-TBf_3C.js +2 -0
  124. package/langwatch/dist/client/assets/SectionNavigationLayout-DELi2l8C.js +2 -0
  125. package/langwatch/dist/client/assets/SelectDatasetDrawer-z00GrHUJ.js +2 -0
  126. package/langwatch/dist/client/assets/SelectionActionBar-CmpsxKus.js +2 -0
  127. package/langwatch/dist/client/assets/SeriesFilterDrawer-DBl29Nft.js +2 -0
  128. package/langwatch/dist/client/assets/SettingsLayout-TFI-annu.js +2 -0
  129. package/langwatch/dist/client/assets/SetupWithAgentButton-ChiBWonD.js +4 -0
  130. package/langwatch/dist/client/assets/ShikiCommandBox-CvJJv-UK.js +5 -0
  131. package/langwatch/dist/client/assets/SpanDetails-Bf9G4Q7r.js +3 -0
  132. package/langwatch/dist/client/assets/SubscriptionPage-DojUae0-.js +2 -0
  133. package/langwatch/dist/client/assets/SuiteFormDrawer-BkSwohnS.js +2 -0
  134. package/langwatch/dist/client/assets/TabButton-IdHwwJvZ.js +3 -0
  135. package/langwatch/dist/client/assets/TableCell-BOc9hDdP.js +2 -0
  136. package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-BkACL4B0.js +2 -0
  137. package/langwatch/dist/client/assets/TeamForm-CoGCbaXE.js +2 -0
  138. package/langwatch/dist/client/assets/TeamUserRoleField-DaCIsPr0.js +2 -0
  139. package/langwatch/dist/client/assets/TraceDetails-D_HPr1ii.js +9 -0
  140. package/langwatch/dist/client/assets/TraceDetailsDrawer-CFMdgFO6.js +2 -0
  141. package/langwatch/dist/client/assets/TraceIdPeek-DmsxeUlT.js +2 -0
  142. package/langwatch/dist/client/assets/TracesMapping-qL9_JqHU.js +2 -0
  143. package/langwatch/dist/client/assets/UpgradeModal-DaVSEBO2.js +92 -0
  144. package/langwatch/dist/client/assets/UpgradeModalContent-DUimbawj.js +2 -0
  145. package/langwatch/dist/client/assets/UploadCSVDrawer-2fH0dmmN.js +3 -0
  146. package/langwatch/dist/client/assets/VariablesSection-BOZytTct.js +2 -0
  147. package/langwatch/dist/client/assets/VersionBadge-BNwXa8K1.js +2 -0
  148. package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-BvCK6x4i.js +1161 -0
  149. package/langwatch/dist/client/assets/ViewAutomationDrawer-CBoDRCfF.js +2 -0
  150. package/langwatch/dist/client/assets/VirtualKeySecretReveal-z9OhRCRq.js +54 -0
  151. package/langwatch/dist/client/assets/WelcomeLayout-veH9XP9n.js +2 -0
  152. package/langwatch/dist/client/assets/WithFeatureFlagGuard-D09SSCsN.js +2 -0
  153. package/langwatch/dist/client/assets/WithPermissionGuard-BBKTBlhW.js +2 -0
  154. package/langwatch/dist/client/assets/WorkflowCard-CUUg0Jb9.js +2 -0
  155. package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-DQPMmz5y.js +2 -0
  156. package/langwatch/dist/client/assets/_...path_-Dl2wM_Co.js +2 -0
  157. package/langwatch/dist/client/assets/_Uint8Array-CVdXk-9j.js +2 -0
  158. package/langwatch/dist/client/assets/__...path__-dvuiwbR8.js +22 -0
  159. package/langwatch/dist/client/assets/_baseAssignValue-D1riHssy.js +2 -0
  160. package/langwatch/dist/client/assets/_baseClone-Btuu3kUN.js +2 -0
  161. package/langwatch/dist/client/assets/_baseEach-D42E_cYN.js +2 -0
  162. package/langwatch/dist/client/assets/_baseFor-DjY96g6R.js +2 -0
  163. package/langwatch/dist/client/assets/_experiment_-C41VDj2_.js +2 -0
  164. package/langwatch/dist/client/assets/_id_-6sd4MNOz.js +2 -0
  165. package/langwatch/dist/client/assets/_id_-7yHuXZsv.js +2 -0
  166. package/langwatch/dist/client/assets/_id_-BiJsS6cZ.js +2 -0
  167. package/langwatch/dist/client/assets/_id_-BxNfkyzv.js +2 -0
  168. package/langwatch/dist/client/assets/_id_-DjvwAa9I.js +2 -0
  169. package/langwatch/dist/client/assets/_id_-Dv1Ha5td.js +2 -0
  170. package/langwatch/dist/client/assets/_id_-qIAmzXj9.js +2 -0
  171. package/langwatch/dist/client/assets/_project_-WrF4swO9.js +8 -0
  172. package/langwatch/dist/client/assets/_runId_-uzKEhtNe.js +7 -0
  173. package/langwatch/dist/client/assets/_shell-CBKyngpn.js +2 -0
  174. package/langwatch/dist/client/assets/_slug_-B7rGjVou.js +17 -0
  175. package/langwatch/dist/client/assets/_slug_-BM065qSQ.js +2 -0
  176. package/langwatch/dist/client/assets/_slug_-DTN4hRRD.js +2 -0
  177. package/langwatch/dist/client/assets/_team_-DFCS7cLC.js +2 -0
  178. package/langwatch/dist/client/assets/_workflow_-Dm-v5D1q.js +25 -0
  179. package/langwatch/dist/client/assets/_workflow_-Od6Ld1fG.js +3 -0
  180. package/langwatch/dist/client/assets/accept-DfhUN0Qn.js +2 -0
  181. package/langwatch/dist/client/assets/activity-ikjk_AlK.js +1 -0
  182. package/langwatch/dist/client/assets/agents-BbtJ377u.js +2 -0
  183. package/langwatch/dist/client/assets/alerts-ikjk_AlK.js +1 -0
  184. package/langwatch/dist/client/assets/all-Ba9m0fkb.js +2 -0
  185. package/langwatch/dist/client/assets/analytics-BfdI38ZC.js +2 -0
  186. package/langwatch/dist/client/assets/annotation-scores-BY75kcBF.js +2 -0
  187. package/langwatch/dist/client/assets/annotations-DIwdkHHY.js +2 -0
  188. package/langwatch/dist/client/assets/anomaly-rules-BmEX38RD.js +2 -0
  189. package/langwatch/dist/client/assets/api-keys-BPifPObL.js +4 -0
  190. package/langwatch/dist/client/assets/asaplangy-BjnuNv4L.js +5 -0
  191. package/langwatch/dist/client/assets/audit-log-2z_Ec4XU.js +2 -0
  192. package/langwatch/dist/client/assets/auth-BJm09Odd.js +2 -0
  193. package/langwatch/dist/client/assets/authentication-D4a-VSlX.js +2 -0
  194. package/langwatch/dist/client/assets/authorize-BBjJ2zjw.js +2 -0
  195. package/langwatch/dist/client/assets/authorize-CHqAf3Jd.js +2 -0
  196. package/langwatch/dist/client/assets/automations-Bds5nLI_.js +2 -0
  197. package/langwatch/dist/client/assets/automations-ikjk_AlK.js +1 -0
  198. package/langwatch/dist/client/assets/billing-plans-K7xawVCS.js +2 -0
  199. package/langwatch/dist/client/assets/blank-DsMQ71pJ.js +2 -0
  200. package/langwatch/dist/client/assets/blobs-Dc7nKnmO.js +2 -0
  201. package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3-57B2W0rq.js +133 -0
  202. package/langwatch/dist/client/assets/budgets-dKK-wYyg.js +3 -0
  203. package/langwatch/dist/client/assets/bug-reports-BxCDdVoL.js +2 -0
  204. package/langwatch/dist/client/assets/cache-rules-Ds14kJAt.js +2 -0
  205. package/langwatch/dist/client/assets/choose-X7Hyqyyu.js +2 -0
  206. package/langwatch/dist/client/assets/chunk-EX3LRPZG-DF3ACR9i.js +232 -0
  207. package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CIlmcu0O.js +3 -0
  208. package/langwatch/dist/client/assets/chunk-PUDLZKDR-Dj_zAVVr.js +157 -0
  209. package/langwatch/dist/client/assets/chunk-RYQCIY6F-CjWAFgxP.js +2 -0
  210. package/langwatch/dist/client/assets/chunk-V7JOEXUC-BgVcuIhi.js +207 -0
  211. package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-Cw7PXCaC.js +2 -0
  212. package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-Cw7PXCaC.js +2 -0
  213. package/langwatch/dist/client/assets/codeAgentConfig-B0NzDmlQ.js +7 -0
  214. package/langwatch/dist/client/assets/codingDefaultSync-ebaLPfnN.js +2 -0
  215. package/langwatch/dist/client/assets/configure-CrbOTC5S.js +4 -0
  216. package/langwatch/dist/client/assets/custom-D8Emd7w-.js +12 -0
  217. package/langwatch/dist/client/assets/custom_evaluator-BtYta_Dj.js +31 -0
  218. package/langwatch/dist/client/assets/dagre-ClO7SEns.js +2 -0
  219. package/langwatch/dist/client/assets/dagre-VKFMJZFB-evqDS8UW.js +5 -0
  220. package/langwatch/dist/client/assets/data-privacy-GCArtTFq.js +2 -0
  221. package/langwatch/dist/client/assets/data-retention-BtLi9M98.js +2 -0
  222. package/langwatch/dist/client/assets/datasets-DeNG9KNJ.js +2 -0
  223. package/langwatch/dist/client/assets/debounce-r-8TPIqh.js +2 -0
  224. package/langwatch/dist/client/assets/defaultModelState-ByR0bEhZ.js +2 -0
  225. package/langwatch/dist/client/assets/dejaview-BF8VqQGI.js +2 -0
  226. package/langwatch/dist/client/assets/departments-D2L92_Qa.js +2 -0
  227. package/langwatch/dist/client/assets/devices-C8e0So_K.js +2 -0
  228. package/langwatch/dist/client/assets/dist-B1XMO10X.js +6 -0
  229. package/langwatch/dist/client/assets/drawerFromUrl-BZIwwDLm.js +2 -0
  230. package/langwatch/dist/client/assets/edit-pIB-bQM_.js +62 -0
  231. package/langwatch/dist/client/assets/email-suppressions-Bq0lhfwG.js +2 -0
  232. package/langwatch/dist/client/assets/erDiagram-Q63AITRT-BqEHcyA0.js +86 -0
  233. package/langwatch/dist/client/assets/error-2TTx9xpE.js +2 -0
  234. package/langwatch/dist/client/assets/evaluations-0Nc6rWP8.js +2 -0
  235. package/langwatch/dist/client/assets/evaluations-DHmE-YCm.js +2 -0
  236. package/langwatch/dist/client/assets/evaluators-DKbY-ajr.js +146 -0
  237. package/langwatch/dist/client/assets/evaluators-v4CDfsOE.js +2 -0
  238. package/langwatch/dist/client/assets/experiments-BRN0rGL9.js +1 -0
  239. package/langwatch/dist/client/assets/external-link-CtHzR85H.js +2 -0
  240. package/langwatch/dist/client/assets/feature-flags-BDyiuat4.js +2 -0
  241. package/langwatch/dist/client/assets/fetchSSE-GcVBzE9n.js +3 -0
  242. package/langwatch/dist/client/assets/fieldset-CIGh0Uxg.js +2 -0
  243. package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-BOl-6oqO.js +1 -0
  244. package/langwatch/dist/client/assets/forgot-password-DjvudMXW.js +2 -0
  245. package/langwatch/dist/client/assets/formatMoney-ByqR-Rrd.js +2 -0
  246. package/langwatch/dist/client/assets/foundry-Co_CpgKb.js +477 -0
  247. package/langwatch/dist/client/assets/gateway-B0y3Tz7G.js +2 -0
  248. package/langwatch/dist/client/assets/getEvaluator-pJF3ehUx.js +2 -0
  249. package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-Bbj-WQTj.js +2 -0
  250. package/langwatch/dist/client/assets/governance-BtuwwuRw.js +2 -0
  251. package/langwatch/dist/client/assets/graphlib-CwcejmA1.js +2 -0
  252. package/langwatch/dist/client/assets/groups-DTVa4dcS.js +2 -0
  253. package/langwatch/dist/client/assets/guardrails-BnCJsF0m.js +2 -0
  254. package/langwatch/dist/client/assets/http-BIG04f8c.js +7 -0
  255. package/langwatch/dist/client/assets/identifierUtils-B1LGnOD5.js +2 -0
  256. package/langwatch/dist/client/assets/immer-BdlOHsfO.js +14 -0
  257. package/langwatch/dist/client/assets/index-DtiounXP.js +68 -0
  258. package/langwatch/dist/client/assets/ingestion-source-detail-hmCupOG1.js +19 -0
  259. package/langwatch/dist/client/assets/ingestion-sources-sv7eDiMD.js +12 -0
  260. package/langwatch/dist/client/assets/integrations-CM7dYrOG.js +2 -0
  261. package/langwatch/dist/client/assets/isArrayLikeObject-6lUBvOUd.js +2 -0
  262. package/langwatch/dist/client/assets/isSymbol-n0ARt1yC.js +2 -0
  263. package/langwatch/dist/client/assets/langyHomeSuggestions-Oyh_vavj.js +2 -0
  264. package/langwatch/dist/client/assets/latestAliases-D_86OOcA.js +2 -0
  265. package/langwatch/dist/client/assets/license-CYtxniam.js +2 -0
  266. package/langwatch/dist/client/assets/loadModelCatalog-31-xT4W4.js +2 -0
  267. package/langwatch/dist/client/assets/map-BCpZm9Sc.js +2 -0
  268. package/langwatch/dist/client/assets/mappingValidation-DPNnGAuO.js +2 -0
  269. package/langwatch/dist/client/assets/me-1nxAV6zO.js +2 -0
  270. package/langwatch/dist/client/assets/me-wWuZrajs.js +7 -0
  271. package/langwatch/dist/client/assets/members-Bau-5CPK.js +2 -0
  272. package/langwatch/dist/client/assets/mermaid.core-oQEgcWXd.js +12 -0
  273. package/langwatch/dist/client/assets/messages-kTp5NaSm.js +2 -0
  274. package/langwatch/dist/client/assets/metrics-Cpovzjg4.js +2 -0
  275. package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-OcYZSGuC.js +97 -0
  276. package/langwatch/dist/client/assets/model-costs-DiRpmy-H.js +2 -0
  277. package/langwatch/dist/client/assets/model-providers-DRq5Q7er.js +2 -0
  278. package/langwatch/dist/client/assets/modelProviderHelpers-STUAbD02.js +2 -0
  279. package/langwatch/dist/client/assets/my-queue-veenWZWf.js +2 -0
  280. package/langwatch/dist/client/assets/normalizeComparison-CDNTbMdZ.js +2 -0
  281. package/langwatch/dist/client/assets/not-found-Nu1odKyD.js +2 -0
  282. package/langwatch/dist/client/assets/now-BQGidI_5.js +2 -0
  283. package/langwatch/dist/client/assets/onboarding-BWJ038z8.js +2 -0
  284. package/langwatch/dist/client/assets/online-evaluations-k-WwH1ML.js +2 -0
  285. package/langwatch/dist/client/assets/ops-D9am3MEi.js +2 -0
  286. package/langwatch/dist/client/assets/organizations-CMTT_97U.js +2 -0
  287. package/langwatch/dist/client/assets/pages-D5p_o0LC.js +2 -0
  288. package/langwatch/dist/client/assets/persistence-jLMreGhL.js +2 -0
  289. package/langwatch/dist/client/assets/plans-v8LBcXa9.js +2 -0
  290. package/langwatch/dist/client/assets/product-CAja-R4_.js +2 -0
  291. package/langwatch/dist/client/assets/project-DbS0dYGR.js +2 -0
  292. package/langwatch/dist/client/assets/projections-B4mXJEvc.js +2 -0
  293. package/langwatch/dist/client/assets/projects-DnYaZW6w.js +2 -0
  294. package/langwatch/dist/client/assets/promptHandle-CQ_zUeRB.js +2 -0
  295. package/langwatch/dist/client/assets/prompts-BAxWZhm5.js +8 -0
  296. package/langwatch/dist/client/assets/radio-group-y_PtCP6q.js +2 -0
  297. package/langwatch/dist/client/assets/registry-KCPOxhx0.js +2 -0
  298. package/langwatch/dist/client/assets/reports-B_Y4pHYs.js +2 -0
  299. package/langwatch/dist/client/assets/request-bU99z82H.js +2 -0
  300. package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-BYId9zaF.js +85 -0
  301. package/langwatch/dist/client/assets/reset-password-zMr6-23y.js +2 -0
  302. package/langwatch/dist/client/assets/role-bindings-BvPzAUj1.js +2 -0
  303. package/langwatch/dist/client/assets/roles-CjwqOKoo.js +2 -0
  304. package/langwatch/dist/client/assets/routing-policies-C7yjQJuY.js +5 -0
  305. package/langwatch/dist/client/assets/scenarios-CdrzuCtM.js +2 -0
  306. package/langwatch/dist/client/assets/scheduler-CfXVwiOa.js +2 -0
  307. package/langwatch/dist/client/assets/schedules-ikjk_AlK.js +1 -0
  308. package/langwatch/dist/client/assets/scim-CGJ8MwNu.js +2 -0
  309. package/langwatch/dist/client/assets/secrets-DZef0jTb.js +2 -0
  310. package/langwatch/dist/client/assets/segment-group-EW0AyNd-.js +2 -0
  311. package/langwatch/dist/client/assets/segmented-control-SS4Yq_Ti.js +2 -0
  312. package/langwatch/dist/client/assets/select-C5JAM7Gf.js +2 -0
  313. package/langwatch/dist/client/assets/send-TZcuPW9Z.js +2 -0
  314. package/langwatch/dist/client/assets/sequenceView-vubFe0e7.js +5 -0
  315. package/langwatch/dist/client/assets/seriesOptions-0YtTiTzZ.js +1011 -0
  316. package/langwatch/dist/client/assets/settings-CfAtn_PH.js +2 -0
  317. package/langwatch/dist/client/assets/setup-In6OXn3a.js +2 -0
  318. package/langwatch/dist/client/assets/shikiAdapter-lZp3oxvk.js +3 -0
  319. package/langwatch/dist/client/assets/signin-CMU_rlgk.js +2 -0
  320. package/langwatch/dist/client/assets/signup-CYKtIfrB.js +2 -0
  321. package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CKO-9021.js +2 -0
  322. package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-BnXuBsJr.js +2 -0
  323. package/langwatch/dist/client/assets/subscription-CBiotOK9.js +3 -0
  324. package/langwatch/dist/client/assets/subscriptions-D55paZaw.js +2 -0
  325. package/langwatch/dist/client/assets/suggestionUI-KPD1is36.js +106 -0
  326. package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-B0ptAIsf.js +3 -0
  327. package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-DzqdWH4x.js +9 -0
  328. package/langwatch/dist/client/assets/switch-BOt3Np6s.js +2 -0
  329. package/langwatch/dist/client/assets/switch-BnyTlP1L.js +2 -0
  330. package/langwatch/dist/client/assets/tabs-D8PJtlU3.js +2 -0
  331. package/langwatch/dist/client/assets/teams-CE3UCC84.js +2 -0
  332. package/langwatch/dist/client/assets/teams-CxmVu0zp.js +2 -0
  333. package/langwatch/dist/client/assets/tool-catalog-DTTKCxyF.js +7 -0
  334. package/langwatch/dist/client/assets/toolIcons-n2K5OHKw.js +2 -0
  335. package/langwatch/dist/client/assets/tooltip-CYWvZEOf.js +2 -0
  336. package/langwatch/dist/client/assets/topic-clustering-C37AbBFy.js +2 -0
  337. package/langwatch/dist/client/assets/topics-rviNSdYR.js +2 -0
  338. package/langwatch/dist/client/assets/traceExecutor-DQlsNg6N.js +55 -0
  339. package/langwatch/dist/client/assets/traces-DnlS2lMP.js +289 -0
  340. package/langwatch/dist/client/assets/tracesMapping-DJvqZsfB.js +3 -0
  341. package/langwatch/dist/client/assets/tracking-6s9dX1_R.js +2 -0
  342. package/langwatch/dist/client/assets/types-BeNupKna.js +2 -0
  343. package/langwatch/dist/client/assets/types-ChBnYRcc.js +2 -0
  344. package/langwatch/dist/client/assets/types-DXVP3BA7.js +2 -0
  345. package/langwatch/dist/client/assets/types-atzk7phf.js +2 -0
  346. package/langwatch/dist/client/assets/unsubscribe-uUCCImkQ.js +2 -0
  347. package/langwatch/dist/client/assets/usage-DBjFOkD3.js +2 -0
  348. package/langwatch/dist/client/assets/usage-De8DbhVE.js +2 -0
  349. package/langwatch/dist/client/assets/use-breakpoint-BdbDgj6J.js +2 -0
  350. package/langwatch/dist/client/assets/use-generic-onboarding-flow-CQjNkSYf.js +2 -0
  351. package/langwatch/dist/client/assets/useActivePlan-DZotDN7k.js +2 -0
  352. package/langwatch/dist/client/assets/useAllPromptsForProject-yZtsv1kJ.js +2 -0
  353. package/langwatch/dist/client/assets/useAnnotationQueues-BJ8Vb6SZ.js +2 -0
  354. package/langwatch/dist/client/assets/useAvailableEvaluators-C6cl3TSs.js +2 -0
  355. package/langwatch/dist/client/assets/useCyclingVerb-CMPh6fkl.js +2 -0
  356. package/langwatch/dist/client/assets/useDepartmentColumn-C4l1_4BR.js +2 -0
  357. package/langwatch/dist/client/assets/useEvaluationsV3Store-CMnxA8pt.js +2 -0
  358. package/langwatch/dist/client/assets/useExportTraces-DzTqFSlc.js +2 -0
  359. package/langwatch/dist/client/assets/useFeatureFlag-CKFU9lsX.js +2 -0
  360. package/langwatch/dist/client/assets/useInviteActions-CNRL7usw.js +2 -0
  361. package/langwatch/dist/client/assets/useLicenseEnforcement-BIiCopDI.js +2 -0
  362. package/langwatch/dist/client/assets/useLiteMemberGuard-ChV0lUs4.js +43 -0
  363. package/langwatch/dist/client/assets/usePersonalContext-D-HsFKQo.js +2 -0
  364. package/langwatch/dist/client/assets/useProjectSpanNames-BKMm-yLN.js +2 -0
  365. package/langwatch/dist/client/assets/useProjectsForCopy-BPGjhWUl.js +2 -0
  366. package/langwatch/dist/client/assets/useRunViaApiTabs-BGv2kygX.js +50 -0
  367. package/langwatch/dist/client/assets/useSavedViews-DH6Poufh.js +2 -0
  368. package/langwatch/dist/client/assets/useShowLangy-DvcJ7z1U.js +2 -0
  369. package/langwatch/dist/client/assets/useSimulationUpdateListener-CcqEq03v.js +2 -0
  370. package/langwatch/dist/client/assets/useTargetName-CByKsdU-.js +2 -0
  371. package/langwatch/dist/client/assets/useTargetNameMap-C8kjUxhY.js +2 -0
  372. package/langwatch/dist/client/assets/useTraceDetailsDrawer-BgcNOady.js +2 -0
  373. package/langwatch/dist/client/assets/useTraceUpdateListener-D5UNLNbd.js +2 -0
  374. package/langwatch/dist/client/assets/useUrlScopeFilter-D0HZ-mkj.js +2 -0
  375. package/langwatch/dist/client/assets/useWorkflowStore-CVvg8K0Q.js +8 -0
  376. package/langwatch/dist/client/assets/users-802bPAIG.js +2 -0
  377. package/langwatch/dist/client/assets/users-CWkRn-Tl.js +2 -0
  378. package/langwatch/dist/client/assets/users-DhJ0ZUHi.js +2 -0
  379. package/langwatch/dist/client/assets/v3-D65ySaeM.js +2 -0
  380. package/langwatch/dist/client/assets/variables-BpyyIkKh.js +396 -0
  381. package/langwatch/dist/client/assets/viewStore-Bq2Jqc8R.js +2 -0
  382. package/langwatch/dist/client/assets/virtual-keys-Cbeg9TQU.js +2 -0
  383. package/langwatch/dist/client/assets/welcome-Bh4D-qW7.js +16 -0
  384. package/langwatch/dist/client/assets/wizard-spBSxei8.js +2 -0
  385. package/langwatch/dist/client/assets/workbench-Bid7wYk7.js +2 -0
  386. package/langwatch/dist/client/assets/workflows-1TodsGOO.js +3 -0
  387. package/langwatch/dist/client/assets/wrap-noqflF_F.js +2 -0
  388. package/langwatch/dist/client/index.html +1 -1
  389. package/langwatch/package.json +1 -1
  390. package/langwatch/packages/api/README.md +283 -0
  391. package/langwatch/packages/api/node_modules/.bin/tsc +21 -0
  392. package/langwatch/packages/api/node_modules/.bin/tsserver +21 -0
  393. package/langwatch/packages/api/node_modules/.bin/vitest +21 -0
  394. package/langwatch/packages/api/package.json +39 -0
  395. package/langwatch/packages/api/src/__tests__/builder.unit.test.ts +1135 -0
  396. package/langwatch/packages/api/src/__tests__/errorLogging.integration.test.ts +130 -0
  397. package/langwatch/packages/api/src/__tests__/errors.unit.test.ts +331 -0
  398. package/langwatch/packages/api/src/__tests__/sse.unit.test.ts +247 -0
  399. package/langwatch/packages/api/src/__tests__/versioning.unit.test.ts +379 -0
  400. package/langwatch/packages/api/src/builder.ts +163 -0
  401. package/langwatch/packages/api/src/errors.ts +255 -0
  402. package/langwatch/packages/api/src/index.ts +41 -0
  403. package/langwatch/packages/api/src/middleware.ts +227 -0
  404. package/langwatch/packages/api/src/pipeline.ts +254 -0
  405. package/langwatch/packages/api/src/response.ts +38 -0
  406. package/langwatch/packages/api/src/route-mounting.ts +140 -0
  407. package/langwatch/packages/api/src/sse.ts +179 -0
  408. package/langwatch/packages/api/src/types.ts +217 -0
  409. package/langwatch/packages/api/src/version-builder.ts +131 -0
  410. package/langwatch/packages/api/src/versioning.ts +221 -0
  411. package/langwatch/packages/api/tsconfig.json +16 -0
  412. package/langwatch/packages/api/vitest.config.ts +8 -0
  413. package/langwatch/packages/automations/README.md +17 -0
  414. package/langwatch/packages/automations/node_modules/.bin/liquid +21 -0
  415. package/langwatch/packages/automations/node_modules/.bin/liquidjs +21 -0
  416. package/langwatch/packages/automations/node_modules/.bin/marked +21 -0
  417. package/langwatch/packages/automations/node_modules/.bin/tsc +21 -0
  418. package/langwatch/packages/automations/node_modules/.bin/tsserver +21 -0
  419. package/langwatch/packages/automations/node_modules/.bin/vitest +21 -0
  420. package/langwatch/packages/automations/package.json +43 -0
  421. package/langwatch/packages/automations/src/cadences.ts +50 -0
  422. package/langwatch/packages/automations/src/enums.ts +24 -0
  423. package/langwatch/packages/automations/src/index.ts +26 -0
  424. package/langwatch/packages/automations/src/providers/__tests__/webhook.unit.test.ts +147 -0
  425. package/langwatch/packages/automations/src/providers/annotationQueue.ts +26 -0
  426. package/langwatch/packages/automations/src/providers/dataset.ts +43 -0
  427. package/langwatch/packages/automations/src/providers/email.ts +36 -0
  428. package/langwatch/packages/automations/src/providers/slack.ts +96 -0
  429. package/langwatch/packages/automations/src/providers/types.ts +84 -0
  430. package/langwatch/packages/automations/src/providers/webhook.ts +137 -0
  431. package/langwatch/packages/automations/src/templating/__tests__/alertDefaultsRender.unit.test.ts +133 -0
  432. package/langwatch/packages/automations/src/templating/__tests__/blockKitAllowlist.unit.test.ts +723 -0
  433. package/langwatch/packages/automations/src/templating/__tests__/engine.unit.test.ts +106 -0
  434. package/langwatch/packages/automations/src/templating/__tests__/exampleContext.unit.test.ts +39 -0
  435. package/langwatch/packages/automations/src/templating/__tests__/fixtures.ts +42 -0
  436. package/langwatch/packages/automations/src/templating/__tests__/graphAlertTemplateContext.unit.test.ts +260 -0
  437. package/langwatch/packages/automations/src/templating/__tests__/markdown.unit.test.ts +71 -0
  438. package/langwatch/packages/automations/src/templating/__tests__/renderEmail.unit.test.ts +183 -0
  439. package/langwatch/packages/automations/src/templating/__tests__/renderSlack.unit.test.ts +233 -0
  440. package/langwatch/packages/automations/src/templating/__tests__/renderWebhookBody.unit.test.ts +145 -0
  441. package/langwatch/packages/automations/src/templating/__tests__/reportDefaultsRender.unit.test.ts +148 -0
  442. package/langwatch/packages/automations/src/templating/__tests__/templateContext.unit.test.ts +137 -0
  443. package/langwatch/packages/automations/src/templating/__tests__/validate.unit.test.ts +28 -0
  444. package/langwatch/packages/automations/src/templating/banner.ts +29 -0
  445. package/langwatch/packages/automations/src/templating/blockKitAllowlist.ts +662 -0
  446. package/langwatch/packages/automations/src/templating/defaults.ts +400 -0
  447. package/langwatch/packages/automations/src/templating/emailLayout.ts +59 -0
  448. package/langwatch/packages/automations/src/templating/engine.ts +255 -0
  449. package/langwatch/packages/automations/src/templating/exampleContext.ts +171 -0
  450. package/langwatch/packages/automations/src/templating/markdown.ts +61 -0
  451. package/langwatch/packages/automations/src/templating/renderEmail.ts +112 -0
  452. package/langwatch/packages/automations/src/templating/renderSlack.ts +184 -0
  453. package/langwatch/packages/automations/src/templating/renderWebhookBody.ts +105 -0
  454. package/langwatch/packages/automations/src/templating/renderWithFallback.ts +54 -0
  455. package/langwatch/packages/automations/src/templating/templateContext.ts +812 -0
  456. package/langwatch/packages/automations/src/templating/validate.ts +24 -0
  457. package/langwatch/packages/automations/tsconfig.json +18 -0
  458. package/langwatch/packages/automations/vitest.config.ts +8 -0
  459. package/langwatch/packages/observability/README.md +86 -0
  460. package/langwatch/packages/observability/node_modules/.bin/esbuild +18 -0
  461. package/langwatch/packages/observability/node_modules/.bin/pino +21 -0
  462. package/langwatch/packages/observability/node_modules/.bin/pino-pretty +21 -0
  463. package/langwatch/packages/observability/node_modules/.bin/tsc +21 -0
  464. package/langwatch/packages/observability/node_modules/.bin/tsserver +21 -0
  465. package/langwatch/packages/observability/node_modules/.bin/vitest +21 -0
  466. package/langwatch/packages/observability/package.json +44 -0
  467. package/langwatch/packages/observability/src/__tests__/browserSafety.unit.test.ts +14 -0
  468. package/langwatch/packages/observability/src/__tests__/context.unit.test.ts +228 -0
  469. package/langwatch/packages/observability/src/__tests__/logger.unit.test.ts +227 -0
  470. package/langwatch/packages/observability/src/__tests__/requestLogging.unit.test.ts +252 -0
  471. package/langwatch/packages/observability/src/__tests__/runtimeSafety.unit.test.ts +96 -0
  472. package/langwatch/packages/observability/src/__tests__/traceContext.unit.test.ts +108 -0
  473. package/langwatch/packages/observability/src/constants.ts +46 -0
  474. package/langwatch/packages/observability/src/context/core.ts +124 -0
  475. package/langwatch/packages/observability/src/context/index.ts +19 -0
  476. package/langwatch/packages/observability/src/context/logging.ts +24 -0
  477. package/langwatch/packages/observability/src/index.ts +32 -0
  478. package/langwatch/packages/observability/src/logger.ts +280 -0
  479. package/langwatch/packages/observability/src/request/requestLogging.ts +131 -0
  480. package/langwatch/packages/observability/src/trace/traceContext.ts +56 -0
  481. package/langwatch/packages/observability/tsconfig.json +16 -0
  482. package/langwatch/packages/observability/vitest.config.ts +8 -0
  483. package/langwatch/packages/react-rum/node_modules/.bin/tsc +21 -0
  484. package/langwatch/packages/react-rum/node_modules/.bin/tsserver +21 -0
  485. package/langwatch/packages/react-rum/node_modules/.bin/vitest +21 -0
  486. package/langwatch/packages/react-rum/package.json +43 -0
  487. package/langwatch/packages/react-rum/src/browserTracing.ts +130 -0
  488. package/langwatch/packages/react-rum/src/constants.ts +67 -0
  489. package/langwatch/packages/react-rum/src/index.ts +34 -0
  490. package/langwatch/packages/react-rum/src/navigation.test.ts +188 -0
  491. package/langwatch/packages/react-rum/src/navigation.ts +189 -0
  492. package/langwatch/packages/react-rum/src/navigationContextManager.ts +71 -0
  493. package/langwatch/packages/react-rum/src/sampling.test.ts +182 -0
  494. package/langwatch/packages/react-rum/src/sampling.ts +124 -0
  495. package/langwatch/packages/react-rum/src/session.test.ts +85 -0
  496. package/langwatch/packages/react-rum/src/session.ts +62 -0
  497. package/langwatch/packages/react-rum/src/sessionSpanProcessor.ts +34 -0
  498. package/langwatch/packages/react-rum/tsconfig.json +18 -0
  499. package/langwatch/packages/react-rum/vitest.config.ts +8 -0
  500. package/langwatch/packages/redaction/node_modules/.bin/tsc +21 -0
  501. package/langwatch/packages/redaction/node_modules/.bin/tsserver +21 -0
  502. package/langwatch/packages/redaction/node_modules/.bin/vitest +21 -0
  503. package/langwatch/packages/redaction/package.json +29 -0
  504. package/langwatch/packages/redaction/src/__tests__/secrets.unit.test.ts +226 -0
  505. package/langwatch/packages/redaction/src/__tests__/sessionReport.unit.test.ts +239 -0
  506. package/langwatch/packages/redaction/src/index.ts +29 -0
  507. package/langwatch/packages/redaction/src/markers.ts +101 -0
  508. package/langwatch/packages/redaction/src/secrets.ts +286 -0
  509. package/langwatch/packages/redaction/src/sessionReport.ts +356 -0
  510. package/langwatch/packages/redaction/tsconfig.json +18 -0
  511. package/langwatch/packages/ssrf/node_modules/.bin/tsc +21 -0
  512. package/langwatch/packages/ssrf/node_modules/.bin/tsserver +21 -0
  513. package/langwatch/packages/ssrf/node_modules/.bin/vitest +21 -0
  514. package/langwatch/packages/ssrf/package.json +29 -0
  515. package/langwatch/packages/ssrf/src/index.test.ts +72 -0
  516. package/langwatch/packages/ssrf/src/index.ts +320 -0
  517. package/langwatch/packages/ssrf/tsconfig.json +18 -0
  518. package/langwatch/packages/ssrf/vitest.config.ts +8 -0
  519. package/langwatch/scripts/__tests__/bug-report-discovery.unit.test.ts +37 -0
  520. package/langwatch/scripts/build-mcp-server.sh +15 -0
  521. package/langwatch/scripts/generate-langy-skills.ts +10 -0
  522. package/langwatch/scripts/update-matrix-provider-keys.ts +1 -1
  523. package/langwatch/src/components/EditModelProviderDrawer.tsx +7 -1
  524. package/langwatch/src/components/settings/ModelProviderCredentialsSection.tsx +13 -21
  525. package/langwatch/src/components/settings/ModelProviderForm.tsx +32 -3
  526. package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-preservation.integration.test.tsx +277 -0
  527. package/langwatch/src/components/settings/__tests__/ModelProviderForm.credential-requiredness.integration.test.tsx +260 -0
  528. package/langwatch/src/components/settings/__tests__/modelProviderDrawerHarness.tsx +152 -0
  529. package/langwatch/src/features/onboarding/components/sections/model-provider/ModelProviderSetup.tsx +7 -3
  530. package/langwatch/src/hooks/__tests__/useProviderFormSubmit.integration.test.tsx +7 -1
  531. package/langwatch/src/hooks/useModelProviderApiKeyValidation.ts +25 -4
  532. package/langwatch/src/hooks/useModelProviderFields.ts +45 -37
  533. package/langwatch/src/hooks/useModelProviderForm.ts +2 -0
  534. package/langwatch/src/hooks/useProviderFormSubmit.ts +27 -19
  535. package/langwatch/src/hooks/useRequiredCredentialKeys.ts +38 -0
  536. package/langwatch/src/pages/settings/__tests__/model-providers.no-project.integration.test.tsx +508 -0
  537. package/langwatch/src/pages/settings/model-providers.tsx +19 -97
  538. package/langwatch/src/server/api/routers/__tests__/prepareEnvKeys.unit.test.ts +56 -0
  539. package/langwatch/src/server/api/routers/modelProviders.ts +146 -15
  540. package/langwatch/src/server/api/routers/modelProviders.utils.ts +1 -10
  541. package/langwatch/src/server/app-layer/traces/__tests__/audio-model-cost.unit.test.ts +133 -0
  542. package/langwatch/src/server/app-layer/traces/canonicalisation/extractors/_constants.ts +6 -0
  543. package/langwatch/src/server/app-layer/traces/model-cost-matching.ts +17 -1
  544. package/langwatch/src/server/app-layer/traces/repositories/__tests__/span-storage.clickhouse.repository.unit.test.ts +6 -0
  545. package/langwatch/src/server/app-layer/traces/repositories/span-storage.clickhouse.repository.ts +6 -0
  546. package/langwatch/src/server/gateway/__tests__/config.materialiser.integration.test.ts +132 -3
  547. package/langwatch/src/server/gateway/config.materialiser.ts +11 -9
  548. package/langwatch/src/server/modelProviders/__tests__/modelProvider.credentialPreservation.integration.test.ts +206 -0
  549. package/langwatch/src/server/modelProviders/__tests__/modelProvider.deleteScope.integration.test.ts +0 -4
  550. package/langwatch/src/server/modelProviders/__tests__/modelProvider.noProject.integration.test.ts +748 -0
  551. package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.integration.test.ts +3 -3
  552. package/langwatch/src/server/modelProviders/__tests__/modelProvider.repository.unit.test.ts +7 -8
  553. package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.extraHeaders.unit.test.ts +0 -5
  554. package/langwatch/src/server/modelProviders/__tests__/modelProvider.service.unit.test.ts +5 -1
  555. package/langwatch/src/server/modelProviders/__tests__/registry.unit.test.ts +31 -0
  556. package/langwatch/src/server/modelProviders/llmModelCost.tsx +20 -2
  557. package/langwatch/src/server/modelProviders/llmModels.json +736 -209
  558. package/langwatch/src/server/modelProviders/llmModels.overlay.json +149 -2
  559. package/langwatch/src/server/modelProviders/llmModels.types.ts +9 -2
  560. package/langwatch/src/server/modelProviders/modelProvider.repository.ts +10 -12
  561. package/langwatch/src/server/modelProviders/modelProvider.service.ts +142 -34
  562. package/langwatch/src/server/modelProviders/registry.ts +45 -15
  563. package/langwatch/src/server/tracer/collector/cost.ts +15 -2
  564. package/langwatch/src/utils/__tests__/modelProviderCredentialRules.unit.test.ts +259 -0
  565. package/langwatch/src/utils/__tests__/modelProviderHelpers.unit.test.ts +12 -0
  566. package/langwatch/src/utils/modelProviderHelpers.ts +207 -16
  567. package/package.json +5 -1
  568. package/packages/handled-error/node_modules/.bin/tsc +21 -0
  569. package/packages/handled-error/node_modules/.bin/tsserver +21 -0
  570. package/packages/handled-error/node_modules/.bin/vitest +21 -0
  571. package/packages/handled-error/package.json +31 -0
  572. package/packages/handled-error/src/handled-error.test.ts +305 -0
  573. package/packages/handled-error/src/handled-error.ts +431 -0
  574. package/packages/handled-error/src/index.ts +16 -0
  575. package/packages/handled-error/tsconfig.json +22 -0
  576. package/packages/langy/node_modules/.bin/tsc +21 -0
  577. package/packages/langy/node_modules/.bin/tsserver +21 -0
  578. package/packages/langy/node_modules/.bin/vitest +21 -0
  579. package/packages/langy/package.json +40 -0
  580. package/packages/langy/src/cards/cliJson.ts +95 -0
  581. package/packages/langy/src/cards/cliJson.unit.test.ts +80 -0
  582. package/packages/langy/src/cards/created-resource.unit.test.ts +137 -0
  583. package/packages/langy/src/cards/derived-safe.ts +265 -0
  584. package/packages/langy/src/cards/derived-safe.unit.test.ts +283 -0
  585. package/packages/langy/src/cards/digest.ts +247 -0
  586. package/packages/langy/src/cards/digest.unit.test.ts +230 -0
  587. package/packages/langy/src/cards/handled-error.ts +697 -0
  588. package/packages/langy/src/cards/handled-error.unit.test.ts +795 -0
  589. package/packages/langy/src/cards/index.ts +51 -0
  590. package/packages/langy/src/cards/primitives.ts +113 -0
  591. package/packages/langy/src/cards/promotion.unit.test.ts +253 -0
  592. package/packages/langy/src/cards/registry.ts +450 -0
  593. package/packages/langy/src/cards/registry.unit.test.ts +141 -0
  594. package/packages/langy/src/cards/schemas.ts +561 -0
  595. package/packages/langy/src/cards/tool-result.ts +151 -0
  596. package/packages/langy/src/cards/tool-result.unit.test.ts +37 -0
  597. package/packages/langy/src/constants.ts +253 -0
  598. package/packages/langy/src/event-sourcing/contracts/cursor.ts +46 -0
  599. package/packages/langy/src/event-sourcing/contracts/cursor.unit.test.ts +66 -0
  600. package/packages/langy/src/event-sourcing/contracts/events.ts +345 -0
  601. package/packages/langy/src/event-sourcing/contracts/turnWire.ts +81 -0
  602. package/packages/langy/src/event-sourcing/folds/conversationFold.ts +413 -0
  603. package/packages/langy/src/event-sourcing/folds/messageMap.ts +71 -0
  604. package/packages/langy/src/event-sourcing/folds/turnFold.ts +372 -0
  605. package/packages/langy/src/event-sourcing/folds/turnFold.unit.test.ts +217 -0
  606. package/packages/langy/src/event-sourcing/turnPhase.ts +124 -0
  607. package/packages/langy/src/event-sourcing/turnPhase.unit.test.ts +110 -0
  608. package/packages/langy/src/event-sourcing/turnProjection.ts +120 -0
  609. package/packages/langy/src/event-sourcing/turnProjection.unit.test.ts +207 -0
  610. package/packages/langy/src/index.ts +16 -0
  611. package/packages/langy/src/inline-channel/choices.ts +136 -0
  612. package/packages/langy/src/inline-channel/choices.unit.test.ts +213 -0
  613. package/packages/langy/src/inline-channel/fence.ts +125 -0
  614. package/packages/langy/src/inline-channel/fence.unit.test.ts +112 -0
  615. package/packages/langy/src/inline-channel/parts.ts +85 -0
  616. package/packages/langy/src/inline-channel/parts.unit.test.ts +100 -0
  617. package/packages/langy/src/inline-channel/preview.ts +68 -0
  618. package/packages/langy/src/inline-channel/preview.unit.test.ts +116 -0
  619. package/packages/langy/src/inline-channel/salvage.ts +260 -0
  620. package/packages/langy/src/inline-channel/salvage.unit.test.ts +135 -0
  621. package/packages/langy/src/json.ts +47 -0
  622. package/packages/langy/tsconfig.json +22 -0
  623. package/packages/server/dist/cli.cjs +11045 -10616
  624. package/python-sdk/src/langwatch/openai.py +107 -28
  625. package/skills/.env.example +1 -0
  626. package/skills/.release-please-shim +1 -0
  627. package/skills/CHANGELOG.md +158 -0
  628. package/skills/README.md +99 -0
  629. package/skills/_compiled/README.md +43 -0
  630. package/skills/_compiled/generate.sh +31 -0
  631. package/skills/_compiled/native/agent-best-practices/SKILL.md +91 -0
  632. package/skills/_compiled/native/agent-improve/SKILL.md +133 -0
  633. package/skills/_compiled/native/agent-performance/SKILL.md +125 -0
  634. package/skills/_compiled/native/datasets/SKILL.md +437 -0
  635. package/skills/_compiled/native/debug-instrumentation/SKILL.md +104 -0
  636. package/skills/_compiled/native/debug-with-langwatch/SKILL.md +109 -0
  637. package/skills/_compiled/native/eval-triage/SKILL.md +87 -0
  638. package/skills/_compiled/native/evaluate-multimodal/SKILL.md +121 -0
  639. package/skills/_compiled/native/evaluations/SKILL.md +58 -0
  640. package/skills/_compiled/native/experiments/SKILL.md +191 -0
  641. package/skills/_compiled/native/generate-rag-dataset/SKILL.md +123 -0
  642. package/skills/_compiled/native/github/SKILL.md +107 -0
  643. package/skills/_compiled/native/level-up/SKILL.md +149 -0
  644. package/skills/_compiled/native/online-evaluations/SKILL.md +179 -0
  645. package/skills/_compiled/native/prompts/SKILL.md +187 -0
  646. package/skills/_compiled/native/scenarios/SKILL.md +924 -0
  647. package/skills/_compiled/native/setup-lw/SKILL.md +82 -0
  648. package/skills/_compiled/native/test-cli-usability/SKILL.md +109 -0
  649. package/skills/_compiled/native/test-compliance/SKILL.md +160 -0
  650. package/skills/_compiled/native/tracing/SKILL.md +115 -0
  651. package/skills/_compiler/compile.ts +181 -0
  652. package/skills/_compiler/native.ts +74 -0
  653. package/skills/_lib/feature-skills.ts +66 -0
  654. package/skills/_lib/frontmatter.ts +21 -0
  655. package/skills/_lib/mdx-inline.ts +148 -0
  656. package/skills/_publish/sync.ts +73 -0
  657. package/skills/_shared/api-key-setup.mdx +1 -0
  658. package/skills/_shared/cli-install.mdx +1 -0
  659. package/skills/_shared/cli-setup.mdx +15 -0
  660. package/skills/_shared/consultant-mode.mdx +9 -0
  661. package/skills/_shared/plan-limits.mdx +8 -0
  662. package/skills/_shared/projects-and-api-keys.mdx +13 -0
  663. package/skills/_tests/README.md +47 -0
  664. package/skills/_tests/agent-best-practices.scenario.test.ts +79 -0
  665. package/skills/_tests/agent-improve.scenario.test.ts +90 -0
  666. package/skills/_tests/agent-performance.scenario.test.ts +110 -0
  667. package/skills/_tests/claude-code-adapter.test.ts +70 -0
  668. package/skills/_tests/cli-auth.scenario.test.ts +171 -0
  669. package/skills/_tests/cli-comprehensive.scenario.test.ts +171 -0
  670. package/skills/_tests/cli-crud.scenario.test.ts +245 -0
  671. package/skills/_tests/cli-gateway-coding-agents.scenario.test.ts +597 -0
  672. package/skills/_tests/cli-gateway.scenario.test.ts +254 -0
  673. package/skills/_tests/cli-projects-api-keys.scenario.test.ts +182 -0
  674. package/skills/_tests/cli-suites.scenario.test.ts +234 -0
  675. package/skills/_tests/datasets.scenario.test.ts +586 -0
  676. package/skills/_tests/docs-skills-pages.test.ts +206 -0
  677. package/skills/_tests/evaluation-skill-boundaries.test.ts +84 -0
  678. package/skills/_tests/experiments-faithfulness.scenario.test.ts +80 -0
  679. package/skills/_tests/experiments-python-langgraph.scenario.test.ts +80 -0
  680. package/skills/_tests/experiments-python-openai.scenario.test.ts +110 -0
  681. package/skills/_tests/experiments-rag.scenario.test.ts +88 -0
  682. package/skills/_tests/experiments-typescript-vercel.scenario.test.ts +80 -0
  683. package/skills/_tests/fixtures/cli-prompts/python-with-prompts/main.py +24 -0
  684. package/skills/_tests/fixtures/python-agno/main.py +14 -0
  685. package/skills/_tests/fixtures/python-google-adk/main.py +28 -0
  686. package/skills/_tests/fixtures/python-health-agent/main.py +32 -0
  687. package/skills/_tests/fixtures/python-langgraph/main.py +35 -0
  688. package/skills/_tests/fixtures/python-openai/main.py +36 -0
  689. package/skills/_tests/fixtures/python-rag-agent/main.py +53 -0
  690. package/skills/_tests/fixtures/typescript-mastra/index.ts +11 -0
  691. package/skills/_tests/fixtures/typescript-vercel/index.ts +16 -0
  692. package/skills/_tests/fixtures/typescript-voice/index.ts +18 -0
  693. package/skills/_tests/helpers/claude-code-adapter.ts +387 -0
  694. package/skills/_tests/helpers/experiments-scenario.ts +197 -0
  695. package/skills/_tests/helpers/judge-model.ts +12 -0
  696. package/skills/_tests/level-up.scenario.test.ts +236 -0
  697. package/skills/_tests/native-skills.test.ts +191 -0
  698. package/skills/_tests/online-evaluations.scenario.test.ts +257 -0
  699. package/skills/_tests/prompts-cli.scenario.test.ts +330 -0
  700. package/skills/_tests/prompts.scenario.test.ts +434 -0
  701. package/skills/_tests/publish-sync.test.ts +119 -0
  702. package/skills/_tests/recipes.scenario.test.ts +343 -0
  703. package/skills/_tests/scenarios.scenario.test.ts +884 -0
  704. package/skills/_tests/tracing.scenario.test.ts +472 -0
  705. package/skills/_tests/voice-factories.test.ts +60 -0
  706. package/skills/agent-improve/SKILL.mdx +100 -0
  707. package/skills/agent-performance/SKILL.mdx +102 -0
  708. package/skills/datasets/SKILL.mdx +416 -0
  709. package/skills/evaluations/SKILL.mdx +57 -0
  710. package/skills/experiments/SKILL.mdx +155 -0
  711. package/skills/github/SKILL.mdx +107 -0
  712. package/skills/initial-prompt.md +66 -0
  713. package/skills/level-up/SKILL.mdx +112 -0
  714. package/skills/online-evaluations/SKILL.mdx +150 -0
  715. package/skills/package.json +53 -0
  716. package/skills/pnpm-lock.yaml +4862 -0
  717. package/skills/pnpm-workspace.yaml +2 -0
  718. package/skills/prompts/SKILL.mdx +151 -0
  719. package/skills/recipes/README.md +30 -0
  720. package/skills/recipes/agent-best-practices/SKILL.mdx +84 -0
  721. package/skills/recipes/debug-instrumentation/SKILL.mdx +88 -0
  722. package/skills/recipes/debug-with-langwatch/SKILL.mdx +97 -0
  723. package/skills/recipes/eval-triage/SKILL.mdx +75 -0
  724. package/skills/recipes/evaluate-multimodal/SKILL.mdx +110 -0
  725. package/skills/recipes/generate-rag-dataset/SKILL.mdx +105 -0
  726. package/skills/recipes/setup-lw/SKILL.mdx +71 -0
  727. package/skills/recipes/test-cli-usability/SKILL.mdx +106 -0
  728. package/skills/recipes/test-compliance/SKILL.mdx +149 -0
  729. package/skills/scenarios/SKILL.mdx +874 -0
  730. package/skills/tracing/SKILL.mdx +88 -0
  731. package/skills/tsconfig.json +15 -0
  732. package/skills/version.txt +1 -0
  733. package/skills/vitest.config.ts +7 -0
  734. package/langwatch/dist/client/assets/AddAnnotationQueueDrawer-BQSucfOX.js +0 -2
  735. package/langwatch/dist/client/assets/AddDatasetRecordDrawer-DAsTHYTP.js +0 -6
  736. package/langwatch/dist/client/assets/AddOrEditAnnotationScore-B5Ck48cm.js +0 -2
  737. package/langwatch/dist/client/assets/AddOrEditAnnotationScoreDrawer-C8HFvayF.js +0 -2
  738. package/langwatch/dist/client/assets/AddOrEditDatasetDrawer-BRzya-3u.js +0 -3
  739. package/langwatch/dist/client/assets/AddParticipants-DGPUGXt7.js +0 -2
  740. package/langwatch/dist/client/assets/AgentHistoryDrawer-D13d_z7X.js +0 -2
  741. package/langwatch/dist/client/assets/AgentHttpEditorDrawer-CuT-fXSu.js +0 -5
  742. package/langwatch/dist/client/assets/AgentListDrawer-CWtvhmue.js +0 -2
  743. package/langwatch/dist/client/assets/AgentTypeSelectorDrawer-BRHSlvwQ.js +0 -2
  744. package/langwatch/dist/client/assets/AgentWorkflowEditorDrawer-CylJD3xL.js +0 -2
  745. package/langwatch/dist/client/assets/AgentWorkflowTargetEditorDrawer-CaoZTrdq.js +0 -2
  746. package/langwatch/dist/client/assets/AiGatewayLayout-B5Q-EfZV.js +0 -2
  747. package/langwatch/dist/client/assets/AnnotationsTable-DoO83AX9.js +0 -2
  748. package/langwatch/dist/client/assets/AreaChart-CXmFZ9PN.js +0 -2
  749. package/langwatch/dist/client/assets/AutomationDrawer-Bv4nX8y6.js +0 -112
  750. package/langwatch/dist/client/assets/BatchEvaluationSummary-uqdSLrh7.js +0 -2
  751. package/langwatch/dist/client/assets/BudgetEditDrawer-CGUdeHXR.js +0 -2
  752. package/langwatch/dist/client/assets/CartesianChart-D35vYym3.js +0 -54
  753. package/langwatch/dist/client/assets/CascadeArchiveDialog-DSo9Fwed.js +0 -2
  754. package/langwatch/dist/client/assets/ChartCard-DgQ4fTGc.js +0 -2
  755. package/langwatch/dist/client/assets/ChartTooltip-Cf8ESsQ9.js +0 -4
  756. package/langwatch/dist/client/assets/ChatWindow-DplHBlw_.js +0 -5
  757. package/langwatch/dist/client/assets/CodeEvaluatorEditorDrawer-CPxNogVm.js +0 -9
  758. package/langwatch/dist/client/assets/CodexCodingDefaultsAsk-BdUx3xAP.js +0 -2
  759. package/langwatch/dist/client/assets/ColorfulBlockIcons-CUrsa--K.js +0 -6
  760. package/langwatch/dist/client/assets/ColumnTypeIcon-DNzTCt_2.js +0 -2
  761. package/langwatch/dist/client/assets/ConfirmDialog-DTpkLGhm.js +0 -2
  762. package/langwatch/dist/client/assets/ContactSalesBlock-BaXLliHv.js +0 -2
  763. package/langwatch/dist/client/assets/Conversation-DZIYz2Vp.js +0 -2
  764. package/langwatch/dist/client/assets/CopyInput-Csb1U32e.js +0 -2
  765. package/langwatch/dist/client/assets/CopyableInputWithPrefix-C3PRtdkW.js +0 -2
  766. package/langwatch/dist/client/assets/CreateProjectDrawer-32NvkFfD.js +0 -2
  767. package/langwatch/dist/client/assets/CreateTeamDrawer-DtGf5dkO.js +0 -2
  768. package/langwatch/dist/client/assets/CustomGraph-C3a1gzo6.js +0 -2
  769. package/langwatch/dist/client/assets/DashboardLayout-RHGL-98_.js +0 -6
  770. package/langwatch/dist/client/assets/DashboardNameDrawer-DD8bwnCt.js +0 -2
  771. package/langwatch/dist/client/assets/DataPrivacyRuleDrawer-DiY-VkTs.js +0 -2
  772. package/langwatch/dist/client/assets/DatasetEditorTable-CwI345qA.js +0 -2
  773. package/langwatch/dist/client/assets/DatasetPickerList-CpHDt0t8.js +0 -2
  774. package/langwatch/dist/client/assets/DatasetPreviewTable-v8OUUAB3.js +0 -2
  775. package/langwatch/dist/client/assets/DatasetSelector-isPOzukH.js +0 -2
  776. package/langwatch/dist/client/assets/DefaultModelOverrideDrawer-BI7NSI6A.js +0 -2
  777. package/langwatch/dist/client/assets/DeleteConfirmationDialog-7K0S0Qdq.js +0 -2
  778. package/langwatch/dist/client/assets/DocsLinks-NNRxMwQU.js +0 -2
  779. package/langwatch/dist/client/assets/DynamicZodForm-3XwhQhOl.js +0 -2
  780. package/langwatch/dist/client/assets/EditAutomationFilterDrawer-MYW_WiO2.js +0 -3
  781. package/langwatch/dist/client/assets/EditModelProviderDrawer-Isp2BSHG.js +0 -4
  782. package/langwatch/dist/client/assets/EditProjectDrawer-Dj2lYKdO.js +0 -2
  783. package/langwatch/dist/client/assets/EmojiPickerModal-DdZxZuTV.js +0 -3
  784. package/langwatch/dist/client/assets/EnterpriseLockedSurface-CxLn8Im_.js +0 -2
  785. package/langwatch/dist/client/assets/EvaluatorApiUsageDialog-DIFGzOw4.js +0 -107
  786. package/langwatch/dist/client/assets/EvaluatorCategorySelectorDrawer-Cm114u5E.js +0 -2
  787. package/langwatch/dist/client/assets/EvaluatorEditorDrawer-aCxccvFM.js +0 -2
  788. package/langwatch/dist/client/assets/EvaluatorEditorShared-DiLlkD4v.js +0 -43
  789. package/langwatch/dist/client/assets/EvaluatorHistoryDrawer-Bv3sLSRP.js +0 -2
  790. package/langwatch/dist/client/assets/EvaluatorListDrawer-eUbPJehC.js +0 -2
  791. package/langwatch/dist/client/assets/EvaluatorMappingsSection-DvSTsuT8.js +0 -2
  792. package/langwatch/dist/client/assets/EvaluatorSelection-Bi_Ud8sy.js +0 -2
  793. package/langwatch/dist/client/assets/EvaluatorSelectionBox-v8iA4p4D.js +0 -2
  794. package/langwatch/dist/client/assets/EvaluatorTypeSelectorContent-DlwvjPGU.js +0 -2
  795. package/langwatch/dist/client/assets/EvaluatorTypeSelectorDrawer-ul5Ud4lG.js +0 -2
  796. package/langwatch/dist/client/assets/ExecutionState-DKBVAVTm.js +0 -2
  797. package/langwatch/dist/client/assets/ExternalImage-DbtOSrKl.js +0 -34
  798. package/langwatch/dist/client/assets/FeatureFlagsDrawer-YiildcJp.js +0 -2
  799. package/langwatch/dist/client/assets/FieldInfoTooltip-CXhYVsTQ.js +0 -2
  800. package/langwatch/dist/client/assets/FieldsFilters-CrGJyKXz.js +0 -2
  801. package/langwatch/dist/client/assets/FilterDisplay-BT6B5ZoZ.js +0 -2
  802. package/langwatch/dist/client/assets/FilterSidebar-0UgGuTeu.js +0 -2
  803. package/langwatch/dist/client/assets/FormatMoney-CEzwUDkl.js +0 -2
  804. package/langwatch/dist/client/assets/FoundryDrawer-BIy5SFvr.js +0 -2
  805. package/langwatch/dist/client/assets/FullLogo-EwD3nY0N.js +0 -2
  806. package/langwatch/dist/client/assets/GovernanceLayout-COAapH9g.js +0 -2
  807. package/langwatch/dist/client/assets/GraphsLayout-ygWQTw_g.js +0 -2
  808. package/langwatch/dist/client/assets/GroupBindingInputRow-DF_WY6iQ.js +0 -2
  809. package/langwatch/dist/client/assets/GuardrailsDrawer-BIq6RhSh.js +0 -91
  810. package/langwatch/dist/client/assets/History-V1jF0Epn.js +0 -17
  811. package/langwatch/dist/client/assets/HorizontalFormControl-CLz9xuFM.js +0 -2
  812. package/langwatch/dist/client/assets/HoverableBigText-CxXucdYS.js +0 -2
  813. package/langwatch/dist/client/assets/InstallCliCard-SGRlvABl.js +0 -2
  814. package/langwatch/dist/client/assets/IntegratePaneShell--xX7Q_FZ.js +0 -8
  815. package/langwatch/dist/client/assets/InviteMemberDrawer-BgkE2My_.js +0 -2
  816. package/langwatch/dist/client/assets/LLMModelCostDrawer-Be2PXHIC.js +0 -2
  817. package/langwatch/dist/client/assets/LangyContextTarget-DUSindiC.js +0 -2
  818. package/langwatch/dist/client/assets/LegacyTracesDeprecationBanner-C1PAs5gE.js +0 -2
  819. package/langwatch/dist/client/assets/Legend-UkJ5OBun.js +0 -6
  820. package/langwatch/dist/client/assets/Line-Bq29STZQ.js +0 -2
  821. package/langwatch/dist/client/assets/LineChart-DjFD6yv4.js +0 -2
  822. package/langwatch/dist/client/assets/ListTable-CSs4ttpJ.js +0 -2
  823. package/langwatch/dist/client/assets/LoadingScreen-D0JSh0Q2.js +0 -2
  824. package/langwatch/dist/client/assets/Markdown-Dm0jXfOR.js +0 -3
  825. package/langwatch/dist/client/assets/MenuLink-CCRiOtxz.js +0 -2
  826. package/langwatch/dist/client/assets/MessageCard-DqgrJCJ6.js +0 -2
  827. package/langwatch/dist/client/assets/MetadataTag-W5I0CKzN.js +0 -5
  828. package/langwatch/dist/client/assets/ModelProviderCustomModelInput-XgGjvYky.js +0 -2
  829. package/langwatch/dist/client/assets/ModelProviderScreen-BtASYmAL.js +0 -2
  830. package/langwatch/dist/client/assets/ModelSelector-BBb1wHS_.js +0 -2
  831. package/langwatch/dist/client/assets/MyLayout-DX7ntheK.js +0 -2
  832. package/langwatch/dist/client/assets/NavigationFooter-CJaT-F50.js +0 -2
  833. package/langwatch/dist/client/assets/NewWorkflowForm-BrvVQJNY.js +0 -2
  834. package/langwatch/dist/client/assets/NoDataInfoBlock-B3c1WwDO.js +0 -2
  835. package/langwatch/dist/client/assets/OnboardingContainer-DRrQV_9c.js +0 -2
  836. package/langwatch/dist/client/assets/OnlineEvaluationDrawer-DHbPXgEV.js +0 -2
  837. package/langwatch/dist/client/assets/OpsPageShell-BamkwuvB.js +0 -2
  838. package/langwatch/dist/client/assets/OttlEditor-BhsdMVM9.js +0 -3
  839. package/langwatch/dist/client/assets/OverflownText-DhbWrtC6.js +0 -2
  840. package/langwatch/dist/client/assets/ProjectAvatar--gOpUll9.js +0 -2
  841. package/langwatch/dist/client/assets/ProjectLangyLayout-C7WNak1h.js +0 -82
  842. package/langwatch/dist/client/assets/PromptEditorDrawer-k_dFbREL.js +0 -2
  843. package/langwatch/dist/client/assets/PromptListDrawer-B-C4Cl6I.js +0 -2
  844. package/langwatch/dist/client/assets/PropertySectionTitle-CK67qoQ9.js +0 -37
  845. package/langwatch/dist/client/assets/ProviderModelSelector-Cm89XYO8.js +0 -2
  846. package/langwatch/dist/client/assets/ProviderScopeChips-S0Ctqbwg.js +0 -2
  847. package/langwatch/dist/client/assets/PushToCopiesDialog-C3eBpZ9F.js +0 -2
  848. package/langwatch/dist/client/assets/RandomColorAvatar-CTya_4BQ.js +0 -2
  849. package/langwatch/dist/client/assets/ReferenceDot-St9tkyoA.js +0 -2
  850. package/langwatch/dist/client/assets/RenderInputOutput-DOVNZVJ2.js +0 -261
  851. package/langwatch/dist/client/assets/ScenarioFormDrawer-9224CX_d.js +0 -2
  852. package/langwatch/dist/client/assets/ScenarioInputMappingSection-Sqtj3HwL.js +0 -2
  853. package/langwatch/dist/client/assets/ScenarioRunDetailDrawer-fzMzXl1A.js +0 -3
  854. package/langwatch/dist/client/assets/ScopeChipPicker-B6r27G3S.js +0 -2
  855. package/langwatch/dist/client/assets/SearchInput-C_AroTij.js +0 -2
  856. package/langwatch/dist/client/assets/SectionNavigationLayout-DNvKM1pq.js +0 -2
  857. package/langwatch/dist/client/assets/SelectDatasetDrawer-CeZvw0Rl.js +0 -2
  858. package/langwatch/dist/client/assets/SelectionActionBar-5j-e3Y3p.js +0 -2
  859. package/langwatch/dist/client/assets/SeriesFilterDrawer-C2Io5BkG.js +0 -2
  860. package/langwatch/dist/client/assets/SettingsLayout-CYtjUobV.js +0 -2
  861. package/langwatch/dist/client/assets/SetupWithAgentButton-BKWI-UTU.js +0 -4
  862. package/langwatch/dist/client/assets/ShikiCommandBox-D_TBnZxW.js +0 -5
  863. package/langwatch/dist/client/assets/SpanDetails-xl9OjARI.js +0 -3
  864. package/langwatch/dist/client/assets/SubscriptionPage-85dxt08g.js +0 -2
  865. package/langwatch/dist/client/assets/SuiteFormDrawer-BYdeRl8R.js +0 -2
  866. package/langwatch/dist/client/assets/TabButton-BY-_E4cy.js +0 -3
  867. package/langwatch/dist/client/assets/TableCell-B6fYjFy7.js +0 -2
  868. package/langwatch/dist/client/assets/TargetTypeSelectorDrawer-CTaJP17t.js +0 -2
  869. package/langwatch/dist/client/assets/TeamForm-DQIdGXFE.js +0 -2
  870. package/langwatch/dist/client/assets/TeamUserRoleField-UXHlsd5l.js +0 -2
  871. package/langwatch/dist/client/assets/TraceDetails-Bm1Ufstq.js +0 -9
  872. package/langwatch/dist/client/assets/TraceDetailsDrawer-BlZH_mba.js +0 -2
  873. package/langwatch/dist/client/assets/TraceIdPeek-By6CFB9R.js +0 -2
  874. package/langwatch/dist/client/assets/TracesMapping-QHyuw6AD.js +0 -2
  875. package/langwatch/dist/client/assets/UpgradeModal-BmLw5ONS.js +0 -92
  876. package/langwatch/dist/client/assets/UpgradeModalContent-C_lXaZaj.js +0 -2
  877. package/langwatch/dist/client/assets/UploadCSVDrawer-BKntPqbk.js +0 -3
  878. package/langwatch/dist/client/assets/VariablesSection-DnkttoMe.js +0 -2
  879. package/langwatch/dist/client/assets/VersionBadge-8Mh0h6z8.js +0 -2
  880. package/langwatch/dist/client/assets/ViaClaudeDesktopScreen-fQIOpGM1.js +0 -1161
  881. package/langwatch/dist/client/assets/ViewAutomationDrawer-CPoifrwV.js +0 -2
  882. package/langwatch/dist/client/assets/VirtualKeySecretReveal-CKCq8oBA.js +0 -54
  883. package/langwatch/dist/client/assets/WelcomeLayout-B_rw1HA0.js +0 -2
  884. package/langwatch/dist/client/assets/WithFeatureFlagGuard-DwfApI3b.js +0 -2
  885. package/langwatch/dist/client/assets/WithPermissionGuard-BP1dFkpM.js +0 -2
  886. package/langwatch/dist/client/assets/WorkflowCard-B_SYXPpi.js +0 -2
  887. package/langwatch/dist/client/assets/WorkflowSelectorForEvaluatorDrawer-D_fcHR54.js +0 -2
  888. package/langwatch/dist/client/assets/_...path_-Ipy6q2Lm.js +0 -2
  889. package/langwatch/dist/client/assets/_Uint8Array-B8b3z1r6.js +0 -2
  890. package/langwatch/dist/client/assets/__...path__-3xWAWxQ-.js +0 -22
  891. package/langwatch/dist/client/assets/_baseAssignValue-D7YNnh37.js +0 -2
  892. package/langwatch/dist/client/assets/_baseClone-o3pPcmbM.js +0 -2
  893. package/langwatch/dist/client/assets/_baseEach-CJ0DbEY4.js +0 -2
  894. package/langwatch/dist/client/assets/_baseFor-C04Mk-th.js +0 -2
  895. package/langwatch/dist/client/assets/_experiment_-DYMW8ia6.js +0 -2
  896. package/langwatch/dist/client/assets/_id_-B8SzykYR.js +0 -2
  897. package/langwatch/dist/client/assets/_id_-BT8l3_4N.js +0 -2
  898. package/langwatch/dist/client/assets/_id_-BTgcDKRo.js +0 -2
  899. package/langwatch/dist/client/assets/_id_-BrxUqiAK.js +0 -2
  900. package/langwatch/dist/client/assets/_id_-Cke69ccV.js +0 -2
  901. package/langwatch/dist/client/assets/_id_-CxtJm9qq.js +0 -2
  902. package/langwatch/dist/client/assets/_id_-DGNS0pL2.js +0 -2
  903. package/langwatch/dist/client/assets/_project_-CPYgRSe0.js +0 -8
  904. package/langwatch/dist/client/assets/_runId_-CnJnzVCf.js +0 -7
  905. package/langwatch/dist/client/assets/_shell-JRkk6wPs.js +0 -2
  906. package/langwatch/dist/client/assets/_slug_-D3cx1Thv.js +0 -17
  907. package/langwatch/dist/client/assets/_slug_-Dx0M4BvX.js +0 -2
  908. package/langwatch/dist/client/assets/_slug_-cRMpdOOA.js +0 -2
  909. package/langwatch/dist/client/assets/_team_-BW8SVrk-.js +0 -2
  910. package/langwatch/dist/client/assets/_workflow_-C35QPIPs.js +0 -25
  911. package/langwatch/dist/client/assets/_workflow_-DowL6naf.js +0 -3
  912. package/langwatch/dist/client/assets/accept-D3cDvj0y.js +0 -2
  913. package/langwatch/dist/client/assets/activity-CrGqZpWa.js +0 -1
  914. package/langwatch/dist/client/assets/agents-BNeoLDoj.js +0 -2
  915. package/langwatch/dist/client/assets/alerts-CrGqZpWa.js +0 -1
  916. package/langwatch/dist/client/assets/all-BHRNPEIX.js +0 -2
  917. package/langwatch/dist/client/assets/analytics-CZuaBlXL.js +0 -2
  918. package/langwatch/dist/client/assets/annotation-scores-CeAaT6zF.js +0 -2
  919. package/langwatch/dist/client/assets/annotations-CpkTmTvn.js +0 -2
  920. package/langwatch/dist/client/assets/anomaly-rules-BOLIh6OR.js +0 -2
  921. package/langwatch/dist/client/assets/api-keys-mK1aqQaM.js +0 -4
  922. package/langwatch/dist/client/assets/asaplangy-D_DeMaDk.js +0 -5
  923. package/langwatch/dist/client/assets/audit-log-CL6iYEbl.js +0 -2
  924. package/langwatch/dist/client/assets/auth-DWhhuKxO.js +0 -2
  925. package/langwatch/dist/client/assets/authentication-CvPvvVW6.js +0 -2
  926. package/langwatch/dist/client/assets/authorize-C1bDXq-Z.js +0 -2
  927. package/langwatch/dist/client/assets/authorize-xZkU_nXs.js +0 -2
  928. package/langwatch/dist/client/assets/automations-ChfL33YS.js +0 -2
  929. package/langwatch/dist/client/assets/automations-CrGqZpWa.js +0 -1
  930. package/langwatch/dist/client/assets/billing-plans-CXxmUM3Y.js +0 -2
  931. package/langwatch/dist/client/assets/blank-DFMnaDEJ.js +0 -2
  932. package/langwatch/dist/client/assets/blobs-D-pozzQX.js +0 -2
  933. package/langwatch/dist/client/assets/blockDiagram-677ZJIJ3--iqoZYgE.js +0 -133
  934. package/langwatch/dist/client/assets/budgets-BAJ1tdYz.js +0 -3
  935. package/langwatch/dist/client/assets/bug-reports-DOqvPuTB.js +0 -2
  936. package/langwatch/dist/client/assets/cache-rules-DbITxirX.js +0 -2
  937. package/langwatch/dist/client/assets/choose-BSGQGAYS.js +0 -2
  938. package/langwatch/dist/client/assets/chunk-EX3LRPZG-B7fiWf8z.js +0 -232
  939. package/langwatch/dist/client/assets/chunk-FWX5IMBZ-CiS2XotT.js +0 -3
  940. package/langwatch/dist/client/assets/chunk-PUDLZKDR-_aske-8B.js +0 -157
  941. package/langwatch/dist/client/assets/chunk-RYQCIY6F-Bzb9D1UT.js +0 -2
  942. package/langwatch/dist/client/assets/chunk-V7JOEXUC-BNxgutMB.js +0 -207
  943. package/langwatch/dist/client/assets/classDiagram-OUVF2IWQ-GwNDfT24.js +0 -2
  944. package/langwatch/dist/client/assets/classDiagram-v2-EOCWNBFH-GwNDfT24.js +0 -2
  945. package/langwatch/dist/client/assets/codeAgentConfig-DWx3pMLC.js +0 -7
  946. package/langwatch/dist/client/assets/codingDefaultSync-C9Lev3y1.js +0 -2
  947. package/langwatch/dist/client/assets/configure-Coe_YM3c.js +0 -4
  948. package/langwatch/dist/client/assets/custom-Dpn85JW8.js +0 -12
  949. package/langwatch/dist/client/assets/custom_evaluator-DGAwXo2Z.js +0 -31
  950. package/langwatch/dist/client/assets/dagre-D7MBpcKV.js +0 -2
  951. package/langwatch/dist/client/assets/dagre-VKFMJZFB-COHUH3Np.js +0 -5
  952. package/langwatch/dist/client/assets/data-privacy-CtKFJ8SN.js +0 -2
  953. package/langwatch/dist/client/assets/data-retention-e5nryGvV.js +0 -2
  954. package/langwatch/dist/client/assets/datasets-JEoBpoYL.js +0 -2
  955. package/langwatch/dist/client/assets/debounce-KKoMEqvq.js +0 -2
  956. package/langwatch/dist/client/assets/defaultModelState-C4_m_XBI.js +0 -2
  957. package/langwatch/dist/client/assets/dejaview-BV4oU0up.js +0 -2
  958. package/langwatch/dist/client/assets/departments-BjNbKZtW.js +0 -2
  959. package/langwatch/dist/client/assets/devices-CaLokczo.js +0 -2
  960. package/langwatch/dist/client/assets/dist-BToT9Gni.js +0 -6
  961. package/langwatch/dist/client/assets/drawerFromUrl-Cpd3NvN0.js +0 -2
  962. package/langwatch/dist/client/assets/edit-BW6g7_XC.js +0 -62
  963. package/langwatch/dist/client/assets/email-suppressions-DYhLkUjt.js +0 -2
  964. package/langwatch/dist/client/assets/erDiagram-Q63AITRT-CBcweIHJ.js +0 -86
  965. package/langwatch/dist/client/assets/error-CmmaHju0.js +0 -2
  966. package/langwatch/dist/client/assets/evaluations-BX71jpba.js +0 -2
  967. package/langwatch/dist/client/assets/evaluations-C82dwzqH.js +0 -2
  968. package/langwatch/dist/client/assets/evaluators-CKOs_qOx.js +0 -146
  969. package/langwatch/dist/client/assets/evaluators-Cnp4esT5.js +0 -2
  970. package/langwatch/dist/client/assets/experiments-CzhcDWnc.js +0 -1
  971. package/langwatch/dist/client/assets/external-link-BzETHrAG.js +0 -2
  972. package/langwatch/dist/client/assets/feature-flags-Cl5NHQrK.js +0 -2
  973. package/langwatch/dist/client/assets/fetchSSE-DWKCnoHV.js +0 -3
  974. package/langwatch/dist/client/assets/fieldset-CE_IDQSv.js +0 -2
  975. package/langwatch/dist/client/assets/flowDiagram-23GEKE2U-B2EV4X5b.js +0 -1
  976. package/langwatch/dist/client/assets/forgot-password-Bdtjps2K.js +0 -2
  977. package/langwatch/dist/client/assets/formatMoney-CI_YqDED.js +0 -2
  978. package/langwatch/dist/client/assets/foundry-DdJynGEa.js +0 -477
  979. package/langwatch/dist/client/assets/gateway-BvjtD98W.js +0 -2
  980. package/langwatch/dist/client/assets/getEvaluator-OH0w_5fd.js +0 -2
  981. package/langwatch/dist/client/assets/getRadiusAndStrokeWidthFromDot-BB5SvhT3.js +0 -2
  982. package/langwatch/dist/client/assets/governance-DUSWlZID.js +0 -2
  983. package/langwatch/dist/client/assets/graphlib-Dn160vFe.js +0 -2
  984. package/langwatch/dist/client/assets/groups--YQRJnbz.js +0 -2
  985. package/langwatch/dist/client/assets/guardrails-_Jb3oZg3.js +0 -2
  986. package/langwatch/dist/client/assets/http-7YWbWWla.js +0 -7
  987. package/langwatch/dist/client/assets/identifierUtils-BuQJ50Jl.js +0 -2
  988. package/langwatch/dist/client/assets/immer-tl_oI9yy.js +0 -14
  989. package/langwatch/dist/client/assets/index-CUhcyBp3.js +0 -68
  990. package/langwatch/dist/client/assets/ingestion-source-detail-E-alCDhM.js +0 -19
  991. package/langwatch/dist/client/assets/ingestion-sources-APi2TUL6.js +0 -12
  992. package/langwatch/dist/client/assets/integrations-osNA42lv.js +0 -2
  993. package/langwatch/dist/client/assets/isArrayLikeObject-CJZEoMj_.js +0 -2
  994. package/langwatch/dist/client/assets/isSymbol-IFJb2-6T.js +0 -2
  995. package/langwatch/dist/client/assets/langyHomeSuggestions-B0_Fr3Q2.js +0 -2
  996. package/langwatch/dist/client/assets/latestAliases-BG98QtLZ.js +0 -2
  997. package/langwatch/dist/client/assets/license-Dbjlsvq9.js +0 -2
  998. package/langwatch/dist/client/assets/loadModelCatalog-CtqlQvVB.js +0 -2
  999. package/langwatch/dist/client/assets/map-DH6XyRvi.js +0 -2
  1000. package/langwatch/dist/client/assets/mappingValidation-oCsaOwz3.js +0 -2
  1001. package/langwatch/dist/client/assets/me-Bqm1rCwb.js +0 -2
  1002. package/langwatch/dist/client/assets/me-BxYTDdYk.js +0 -7
  1003. package/langwatch/dist/client/assets/members-C-RYfdOt.js +0 -2
  1004. package/langwatch/dist/client/assets/mermaid.core-CIOVe75m.js +0 -12
  1005. package/langwatch/dist/client/assets/messages-DSB9EzQc.js +0 -2
  1006. package/langwatch/dist/client/assets/metrics-C_DWHPhN.js +0 -2
  1007. package/langwatch/dist/client/assets/mindmap-definition-LN4V7U3C-D9FhjenJ.js +0 -97
  1008. package/langwatch/dist/client/assets/model-costs-DHTDEPq7.js +0 -2
  1009. package/langwatch/dist/client/assets/model-providers-B5lYdYGB.js +0 -2
  1010. package/langwatch/dist/client/assets/modelProviderHelpers-DDoNJl7J.js +0 -2
  1011. package/langwatch/dist/client/assets/my-queue-DBUdNObC.js +0 -2
  1012. package/langwatch/dist/client/assets/normalizeComparison-CCZ-bOPv.js +0 -2
  1013. package/langwatch/dist/client/assets/not-found-1cA6pijP.js +0 -2
  1014. package/langwatch/dist/client/assets/now-Sx_cFlpx.js +0 -2
  1015. package/langwatch/dist/client/assets/onboarding-Brb1FAS4.js +0 -2
  1016. package/langwatch/dist/client/assets/online-evaluations-Di78dvHe.js +0 -2
  1017. package/langwatch/dist/client/assets/ops-BDrWqQb1.js +0 -2
  1018. package/langwatch/dist/client/assets/organizations-I7_fQcGq.js +0 -2
  1019. package/langwatch/dist/client/assets/pages-BowufdCe.js +0 -2
  1020. package/langwatch/dist/client/assets/persistence-ChzYQRy2.js +0 -2
  1021. package/langwatch/dist/client/assets/plans-DUiB6dWS.js +0 -2
  1022. package/langwatch/dist/client/assets/product-CLC45PiC.js +0 -2
  1023. package/langwatch/dist/client/assets/project-CO0U6_JZ.js +0 -2
  1024. package/langwatch/dist/client/assets/projections-yljzVGg_.js +0 -2
  1025. package/langwatch/dist/client/assets/projects-DbpxS5ex.js +0 -2
  1026. package/langwatch/dist/client/assets/promptHandle-BwdZsauS.js +0 -2
  1027. package/langwatch/dist/client/assets/prompts-DUxsvuSh.js +0 -8
  1028. package/langwatch/dist/client/assets/radio-group-DJFHT54R.js +0 -2
  1029. package/langwatch/dist/client/assets/registry-C3oFDiqP.js +0 -2
  1030. package/langwatch/dist/client/assets/reports-BQKkyGFY.js +0 -2
  1031. package/langwatch/dist/client/assets/request-CmAXw9Uw.js +0 -2
  1032. package/langwatch/dist/client/assets/requirementDiagram-TGXJPOKE-D1dMWBTG.js +0 -85
  1033. package/langwatch/dist/client/assets/reset-password-CTK4_mwV.js +0 -2
  1034. package/langwatch/dist/client/assets/role-bindings-C6ZsuMgm.js +0 -2
  1035. package/langwatch/dist/client/assets/roles-BCVxn7jA.js +0 -2
  1036. package/langwatch/dist/client/assets/routing-policies-CRBbtcKU.js +0 -5
  1037. package/langwatch/dist/client/assets/scenarios-t3nGDwOk.js +0 -2
  1038. package/langwatch/dist/client/assets/scheduler-BLbmBCjU.js +0 -2
  1039. package/langwatch/dist/client/assets/schedules-CrGqZpWa.js +0 -1
  1040. package/langwatch/dist/client/assets/scim-Db5_4cCw.js +0 -2
  1041. package/langwatch/dist/client/assets/secrets-w56NYZDd.js +0 -2
  1042. package/langwatch/dist/client/assets/segment-group-BZ45xnHN.js +0 -2
  1043. package/langwatch/dist/client/assets/segmented-control-DD0HLoke.js +0 -2
  1044. package/langwatch/dist/client/assets/select-BVcV39WT.js +0 -2
  1045. package/langwatch/dist/client/assets/send-C4QAmSdY.js +0 -2
  1046. package/langwatch/dist/client/assets/sequenceView-BjWvujkI.js +0 -5
  1047. package/langwatch/dist/client/assets/seriesOptions-BYBEdexs.js +0 -1011
  1048. package/langwatch/dist/client/assets/settings-BLUJDHk_.js +0 -2
  1049. package/langwatch/dist/client/assets/setup-DZUDYG7y.js +0 -2
  1050. package/langwatch/dist/client/assets/shikiAdapter-S_u9TjIh.js +0 -3
  1051. package/langwatch/dist/client/assets/signin-DIBdy2xA.js +0 -2
  1052. package/langwatch/dist/client/assets/signup-CNRmYZe8.js +0 -2
  1053. package/langwatch/dist/client/assets/stateDiagram-2N3HPSRC-CvKHJ3lm.js +0 -2
  1054. package/langwatch/dist/client/assets/stateDiagram-v2-6OUMAXLB-DAiJnxt-.js +0 -2
  1055. package/langwatch/dist/client/assets/subscription-DCXG9i3Z.js +0 -3
  1056. package/langwatch/dist/client/assets/subscriptions-vembyNSC.js +0 -2
  1057. package/langwatch/dist/client/assets/suggestionUI-CKer7JjV.js +0 -106
  1058. package/langwatch/dist/client/assets/swimlanes-5IMT3BWC-BSx4-zBB.js +0 -3
  1059. package/langwatch/dist/client/assets/swimlanesDiagram-G3AALYLV-CiuP6lw7.js +0 -9
  1060. package/langwatch/dist/client/assets/switch-COTwlCOb.js +0 -2
  1061. package/langwatch/dist/client/assets/switch-vUOdjiD1.js +0 -2
  1062. package/langwatch/dist/client/assets/tabs-DdHsJkYS.js +0 -2
  1063. package/langwatch/dist/client/assets/teams-CNWyUErs.js +0 -2
  1064. package/langwatch/dist/client/assets/teams-DfkeiBlG.js +0 -2
  1065. package/langwatch/dist/client/assets/tool-catalog-Fz2CTXGX.js +0 -7
  1066. package/langwatch/dist/client/assets/toolIcons-8yYANIzS.js +0 -2
  1067. package/langwatch/dist/client/assets/tooltip-Croc0I6e.js +0 -2
  1068. package/langwatch/dist/client/assets/topic-clustering-BUhCtd-n.js +0 -2
  1069. package/langwatch/dist/client/assets/topics-DTHKQBbG.js +0 -2
  1070. package/langwatch/dist/client/assets/traceExecutor-apa7WEzU.js +0 -55
  1071. package/langwatch/dist/client/assets/traces-DHbPO8-r.js +0 -289
  1072. package/langwatch/dist/client/assets/tracesMapping-AU2q390i.js +0 -3
  1073. package/langwatch/dist/client/assets/tracking-2cJI_Hu7.js +0 -2
  1074. package/langwatch/dist/client/assets/types-CQ-IJ_jx.js +0 -2
  1075. package/langwatch/dist/client/assets/types-DV4H6wK9.js +0 -2
  1076. package/langwatch/dist/client/assets/types-PSz4yYPE.js +0 -2
  1077. package/langwatch/dist/client/assets/types-Qc1U0Lzq.js +0 -2
  1078. package/langwatch/dist/client/assets/unsubscribe-B7-aB2wW.js +0 -2
  1079. package/langwatch/dist/client/assets/usage-B56MHHfN.js +0 -2
  1080. package/langwatch/dist/client/assets/usage-BrFpMBrn.js +0 -2
  1081. package/langwatch/dist/client/assets/use-breakpoint-BTtibx4n.js +0 -2
  1082. package/langwatch/dist/client/assets/use-generic-onboarding-flow-eiutgTpm.js +0 -2
  1083. package/langwatch/dist/client/assets/useActivePlan-DZDUm8JK.js +0 -2
  1084. package/langwatch/dist/client/assets/useAllPromptsForProject-BY-Cnuhg.js +0 -2
  1085. package/langwatch/dist/client/assets/useAnnotationQueues-BWrpwDYN.js +0 -2
  1086. package/langwatch/dist/client/assets/useAvailableEvaluators-D7TbKINw.js +0 -2
  1087. package/langwatch/dist/client/assets/useCyclingVerb-Bp3m8dQc.js +0 -2
  1088. package/langwatch/dist/client/assets/useDepartmentColumn-DTsM9Nhy.js +0 -2
  1089. package/langwatch/dist/client/assets/useEvaluationsV3Store-KPEU27UA.js +0 -2
  1090. package/langwatch/dist/client/assets/useExportTraces-DK-tRqPq.js +0 -2
  1091. package/langwatch/dist/client/assets/useFeatureFlag-D9ikgDaE.js +0 -2
  1092. package/langwatch/dist/client/assets/useInviteActions-DyYvQrlw.js +0 -2
  1093. package/langwatch/dist/client/assets/useLicenseEnforcement-DRk7-NQ0.js +0 -2
  1094. package/langwatch/dist/client/assets/useLiteMemberGuard-klZnweA7.js +0 -43
  1095. package/langwatch/dist/client/assets/usePersonalContext-CrhmQYta.js +0 -2
  1096. package/langwatch/dist/client/assets/useProjectSpanNames-w6NW0Ct5.js +0 -2
  1097. package/langwatch/dist/client/assets/useProjectsForCopy-DxbxCEv5.js +0 -2
  1098. package/langwatch/dist/client/assets/useRunViaApiTabs-WzgJSfv2.js +0 -50
  1099. package/langwatch/dist/client/assets/useSavedViews-CNmeuzC3.js +0 -2
  1100. package/langwatch/dist/client/assets/useShowLangy-BvJ39ifH.js +0 -2
  1101. package/langwatch/dist/client/assets/useSimulationUpdateListener-Bu7hXXtv.js +0 -2
  1102. package/langwatch/dist/client/assets/useTargetName-VjbhYyp5.js +0 -2
  1103. package/langwatch/dist/client/assets/useTargetNameMap-CB8rbgsw.js +0 -2
  1104. package/langwatch/dist/client/assets/useTraceDetailsDrawer-BQRQYAwh.js +0 -2
  1105. package/langwatch/dist/client/assets/useTraceUpdateListener-DvzIDKvr.js +0 -2
  1106. package/langwatch/dist/client/assets/useUrlScopeFilter-u6ryUPSP.js +0 -2
  1107. package/langwatch/dist/client/assets/useWorkflowStore-PvyqdAIQ.js +0 -8
  1108. package/langwatch/dist/client/assets/users-B6_uecCc.js +0 -2
  1109. package/langwatch/dist/client/assets/users-BKSIVGOV.js +0 -2
  1110. package/langwatch/dist/client/assets/users-Cvlw527b.js +0 -2
  1111. package/langwatch/dist/client/assets/v3-D_vxEDZB.js +0 -2
  1112. package/langwatch/dist/client/assets/variables-fv0lgY95.js +0 -396
  1113. package/langwatch/dist/client/assets/viewStore-149qmWlN.js +0 -2
  1114. package/langwatch/dist/client/assets/virtual-keys-BrPMP91L.js +0 -2
  1115. package/langwatch/dist/client/assets/welcome-CvpidJSe.js +0 -16
  1116. package/langwatch/dist/client/assets/wizard-D3LrFT3o.js +0 -2
  1117. package/langwatch/dist/client/assets/workbench-YhI9hb4n.js +0 -2
  1118. package/langwatch/dist/client/assets/workflows-D66JEP8o.js +0 -3
  1119. package/langwatch/dist/client/assets/wrap-C4rzJqks.js +0 -2
  1120. package/langwatch/src/pages/settings/__tests__/model-providers.first-project.integration.test.tsx +0 -426
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{t as s}from"./h-stack-CMPhqSp5.js";import{t as c}from"./v-stack-ClAMS101.js";import{t as l}from"./DashboardLayout-RHGL-98_.js";import{t as u}from"./Conversation-DZIYz2Vp.js";import{r as d}from"./next-router-Bn5Y8Iek.js";import{n as f}from"./api-BK6L1im2.js";import{t as p}from"./check-D7gK__iL.js";import{t as m}from"./chevron-left-DlNhu8W0.js";import{t as h}from"./chevron-right-DwuCZRCa.js";import{n as g,t as _}from"./useAnnotationQueues-BWrpwDYN.js";import{Rt as v}from"./index-CUhcyBp3.js";import{t as y}from"./react-FE7US63s.js";var b=e(t()),x=i();function S(e){return(0,x.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e.width??564,height:e.height??424,fill:`none`,viewBox:`-40 0 630 424`,children:[(0,x.jsx)(`path`,{fill:`#ECC94B`,d:`M361.835 194.167c0 50.86-41.23 92.09-92.09 92.09-33.367 0-62.597-17.756-78.773-44.352-8.464-13.919-13.317-30.246-13.317-47.738 0-50.861 41.23-92.09 92.09-92.09 26.897 0 51.124 11.549 67.977 29.944 14.972 16.402 24.113 38.22 24.113 62.146`}),(0,x.jsx)(`path`,{fill:`#F6E05E`,d:`M351.039 179.797c0 50.86-41.23 92.09-92.09 92.09-26.935 0-51.124-11.549-67.977-29.944-8.464-13.919-13.317-30.246-13.317-47.738 0-50.86 41.23-92.09 92.09-92.09 26.897 0 51.124 11.549 67.977 29.944 8.464 13.919 13.317 30.245 13.317 47.738`}),(0,x.jsx)(`path`,{fill:`#3C2415`,d:`M272.718 216.024c-10.307 0-18.658-8.69-18.658-19.374 0-1.128.94-2.069 2.069-2.069 1.128 0 2.069.941 2.069 2.069 0 8.389 6.508 15.236 14.52 15.236s14.521-6.847 14.521-15.236c0-1.128.941-2.069 2.069-2.069s2.069.941 2.069 2.069c0 10.684-8.351 19.374-18.659 19.374M241.684 170.731c-6.132 0-11.135-5.192-11.135-11.549 0-.677.564-1.242 1.241-1.242s1.242.565 1.242 1.242c0 5.003 3.874 9.066 8.652 9.066s8.652-4.063 8.652-9.066c0-.677.564-1.242 1.242-1.242.677 0 1.241.565 1.241 1.242 0 6.395-5.003 11.549-11.135 11.549`}),(0,x.jsx)(`path`,{fill:`#3C2415`,stroke:`#3C2415`,strokeMiterlimit:`10`,strokeWidth:`0.295`,d:`M241.683 173.139c-7.448 0-13.542-6.245-13.542-13.957a3.65 3.65 0 0 1 3.649-3.649 3.653 3.653 0 0 1 3.649 3.649c0 3.687 2.783 6.659 6.244 6.659s6.245-3.01 6.245-6.659a3.653 3.653 0 0 1 3.649-3.649 3.653 3.653 0 0 1 3.649 3.649c-.038 7.712-6.094 13.957-13.543 13.957Z`}),(0,x.jsx)(`path`,{fill:`#3C2415`,d:`M307.779 174.831c-7.448 0-13.543-6.245-13.543-13.957a3.653 3.653 0 0 1 3.649-3.649 3.63 3.63 0 0 1 3.649 3.649c0 3.687 2.822 6.659 6.245 6.659 3.461 0 6.245-3.01 6.245-6.659a3.65 3.65 0 0 1 3.649-3.649 3.653 3.653 0 0 1 3.649 3.649c-.038 7.712-6.095 13.957-13.543 13.957`}),(0,x.jsx)(y.path,{id:`sun-flares`,fill:`#F6E05E`,animate:{rotate:360},transition:{duration:20,repeat:1/0,ease:`linear`},style:{transformOrigin:`center`},d:`M269.745 83.192c-2.294 0-4.138-.903-4.138-1.994v-37.58c0-1.092 1.844-1.995 4.138-1.995 2.295 0 4.138.903 4.138 1.994v37.581c.038 1.091-1.843 1.994-4.138 1.994M214.259 98.052c-1.994 1.128-4.026 1.316-4.59.338L190.86 65.85c-.564-.94.602-2.67 2.596-3.8 1.993-1.128 4.025-1.316 4.589-.338l18.809 32.54c.565.94-.602 2.633-2.595 3.8M173.63 138.679c-1.129 1.994-2.859 3.16-3.8 2.596l-32.54-18.809c-.94-.565-.79-2.596.339-4.59 1.128-1.994 2.859-3.16 3.799-2.596l32.54 18.81c.978.526.828 2.595-.338 4.589M158.772 194.166c0 2.295-.903 4.138-1.994 4.138h-37.581c-1.091 0-1.994-1.843-1.994-4.138s.903-4.138 1.994-4.138h37.581c1.091 0 1.994 1.844 1.994 4.138M173.632 249.654c1.128 1.994 1.316 4.025.338 4.589l-32.54 18.81c-.94.564-2.671-.602-3.799-2.596s-1.317-4.025-.339-4.59l32.54-18.809c.941-.527 2.671.64 3.8 2.596M214.259 290.282c1.993 1.128 3.16 2.859 2.595 3.799l-18.809 32.54c-.564.941-2.596.79-4.589-.338s-3.16-2.859-2.596-3.8l18.809-32.54c.564-.94 2.596-.79 4.59.339M269.745 305.179c2.295 0 4.138.903 4.138 1.993v37.581c0 1.091-1.843 1.994-4.138 1.994s-4.138-.903-4.138-1.994v-37.581c0-1.128 1.881-1.993 4.138-1.993M325.271 290.282c1.994-1.129 4.025-1.317 4.59-.339l18.809 32.54c.564.94-.602 2.671-2.596 3.799s-4.025 1.317-4.589.339l-18.81-32.54c-.564-.94.602-2.633 2.596-3.799M365.899 249.654c1.128-1.994 2.859-3.16 3.799-2.596l32.54 18.809c.941.565.79 2.596-.338 4.59s-2.859 3.16-3.8 2.596l-32.54-18.81c-.978-.526-.827-2.595.339-4.589M380.758 194.166c0-2.294.903-4.138 1.994-4.138h37.58c1.091 0 1.994 1.844 1.994 4.138 0 2.295-.903 4.138-1.994 4.138h-37.58c-1.091 0-1.994-1.843-1.994-4.138M365.898 138.679c-1.128-1.994-1.316-4.025-.338-4.589l32.54-18.81c.94-.564 2.671.602 3.799 2.596s1.317 4.025.339 4.59l-32.54 18.809c-.978.526-2.671-.602-3.8-2.596M325.271 98.051c-1.994-1.129-3.16-2.859-2.596-3.8l18.81-32.54c.564-.94 2.595-.79 4.589.34 1.994 1.128 3.16 2.858 2.596 3.799l-18.809 32.54c-.565.94-2.634.79-4.59-.339`}),(0,x.jsx)(y.path,{id:`clouds`,fill:`#BEE3F8`,animate:{x:[-30,30,-30],y:[0,20,0,20,0,20,0,20,0]},transition:{duration:40,repeat:1/0,ease:`easeInOut`},d:`M547.865 67.635c0-17.642-14.314-31.956-31.956-31.956s-31.956 14.314-31.956 31.956v.73c-1.505-.457-3.1-.73-4.741-.73-8.844 0-16.001 7.157-16.001 16s7.157 15.956 16.001 15.956h68.653c8.844 0 15.955-7.157 15.955-15.955 0-8.844-7.157-16.001-15.955-16.001M64.004 332.161c0-13.357-10.805-24.161-24.161-24.161s-24.161 10.804-24.161 24.161v.547a11.7 11.7 0 0 0-3.602-.547c-6.655 0-12.08 5.425-12.08 12.08s5.425 12.081 12.08 12.081h51.924c6.655 0 12.08-5.425 12.08-12.081s-5.38-12.08-12.08-12.08M544.538 361.896c-2.051 0-4.011.319-5.88.912-5.653-7.795-14.771-12.855-25.119-12.855a30.87 30.87 0 0 0-25.118 12.855 19.3 19.3 0 0 0-5.881-.912c-10.53 0-19.055 8.525-19.055 19.055 0 10.531 8.525 19.056 19.055 19.056a19.3 19.3 0 0 0 5.881-.912c5.653 7.795 14.77 12.855 25.118 12.855a30.87 30.87 0 0 0 25.119-12.855c1.869.593 3.829.912 5.88.912 10.531 0 19.055-8.525 19.055-19.056 0-10.53-8.524-19.055-19.055-19.055M55.029 8.087c-1.231 0-2.462.182-3.602.547C47.964 3.847 42.357.747 36.066.747c-6.337 0-11.944 3.1-15.363 7.887a11.7 11.7 0 0 0-3.601-.547c-6.428 0-11.67 5.242-11.67 11.67 0 6.427 5.242 11.67 11.67 11.67 1.23 0 2.462-.183 3.601-.547 3.465 4.786 9.072 7.886 15.363 7.886 6.336 0 11.944-3.1 15.363-7.886 1.14.364 2.324.547 3.6.547 6.429 0 11.671-5.243 11.671-11.67 0-6.428-5.242-11.67-11.67-11.67`})]})}function C(){let{"queue-item":e}=d().query,{assignedQueueItems:t,queuesLoading:n}=_({showQueueAndUser:!0,allQueueItems:!0}),{project:r}=v(),i=f.useContext(),s=(0,b.useMemo)(()=>[...t??[]].filter(e=>!e.doneAt),[t]),p=(0,b.useMemo)(()=>s.map(e=>`${e.id}-${e.doneAt}`).join(`,`),[s]),m=s.find(t=>t.id===e);m||=s[0];let h=async()=>{await i.annotation.getOptimizedAnnotationQueues.invalidate(),await i.annotation.getPendingItemsCount.invalidate(),await i.annotation.getAssignedItemsCount.invalidate(),await i.annotation.getQueueItemsCounts.invalidate()};console.log(`currentQueueItem`,m);let y=f.traces.getById.useQuery({projectId:r?.id??``,traceId:m?.trace?.trace_id??``},{enabled:!!r?.id&&!!m?.trace?.trace_id,refetchOnWindowFocus:!1}),[C,T]=(0,b.useState)(null);return(0,b.useEffect)(()=>{y.data?.metadata.thread_id?T(y.data?.metadata.thread_id):T(null)},[y.data?.metadata.thread_id,m?.id]),n?(0,x.jsx)(g,{}):s.length===0&&!n?(0,x.jsx)(g,{children:(0,x.jsxs)(c,{height:`100%`,width:`full`,justify:`center`,backgroundColor:`bg.muted`,marginTop:`-48px`,children:[(0,x.jsx)(S,{}),(0,x.jsx)(o,{fontSize:`xl`,fontWeight:`500`,children:`All tasks complete`}),(0,x.jsx)(o,{children:`Nice work!`})]})}):(0,x.jsx)(l,{display:`flex`,flexDirection:`column`,children:(0,x.jsxs)(c,{height:`100%`,width:`full`,gap:0,alignItems:`stretch`,position:`relative`,flex:`1`,children:[(0,x.jsx)(a,{flex:`1`,overflowY:`auto`,padding:4,paddingBottom:m?.trace?`100px`:4,position:`relative`,children:(0,x.jsx)(u,{threadId:C??``,traceId:m?.trace?.trace_id??``},m?.trace?.trace_id??m?.id)}),m?.trace&&(0,x.jsx)(a,{position:`absolute`,bottom:0,left:0,right:0,width:`full`,backgroundColor:`bg.panel`,borderTop:`1px solid`,borderColor:`border`,zIndex:10,children:(0,x.jsx)(w,{queueItems:s,currentQueueItem:m,refetchQueueItems:h},p)})]})})}var w=({queueItems:e,currentQueueItem:t,refetchQueueItems:i})=>{let l=d(),{project:u}=v(),[g,_]=(0,b.useState)(!1),y=e.findIndex(e=>e.id===t.id),S=async(e,t)=>{_(!0);let n=t?`/${u?.slug}/annotations/my-queue?queue-item=${e}&trace=${t}`:`/${u?.slug}/annotations/my-queue?queue-item=${e}`;await l.push(n),setTimeout(()=>_(!1),100)},C=f.annotation.markQueueItemDone.useMutation(),w=async()=>{C.mutate({queueItemId:t.id,projectId:u?.id??``},{onSuccess:async()=>{await i();let t=e[y+1];t?await S(t.id):(_(!0),await l.replace(`/${u?.slug}/annotations/my-queue`),setTimeout(()=>_(!1),100))}})};return(0,x.jsxs)(a,{shadow:`md`,padding:5,width:`full`,position:`relative`,children:[g&&(0,x.jsx)(a,{position:`absolute`,top:0,left:0,right:0,bottom:0,backgroundColor:`bg.panel/80`,zIndex:20,display:`flex`,alignItems:`center`,justifyContent:`center`,children:(0,x.jsx)(n,{})}),(0,x.jsx)(c,{children:(0,x.jsxs)(s,{gap:8,children:[(0,x.jsxs)(s,{gap:2,children:[(0,x.jsx)(r,{variant:`outline`,disabled:y===0||g,onClick:()=>{let t=e[y-1];t&&S(t.id)},children:(0,x.jsx)(m,{})}),(0,x.jsx)(r,{variant:`outline`,disabled:y===e.length-1||g,onClick:()=>{let t=e[y+1];t&&S(t.id)},children:(0,x.jsx)(h,{})})]}),(0,x.jsxs)(o,{children:[y+1,` of `,e.length]}),(0,x.jsxs)(r,{colorPalette:`blue`,disabled:t.doneAt!==null||C.isLoading||g,onClick:()=>{w()},children:[(0,x.jsx)(p,{}),` Done`]})]})})]})};export{C as default};
2
- //# sourceMappingURL=my-queue-DBUdNObC.js.map
@@ -1,2 +0,0 @@
1
- import"./types-DV4H6wK9.js";var e=e=>{let t=[e.variantA,e.variantB],n={};return e.variantA&&e.variantAOutputPath?.length&&(n[e.variantA]=e.variantAOutputPath),e.variantB&&e.variantBOutputPath?.length&&(n[e.variantB]=e.variantBOutputPath),{variants:t,...Object.keys(n).length>0&&{variantOutputPaths:n},hasGoldenAnswer:e.hasGoldenAnswer??!0,goldenField:e.goldenField,includeMetrics:e.includeMetrics??[],randomizeOrder:!0}},t=t=>{if(t.comparison)return t.comparison;if(t.pairwise)return e(t.pairwise)},n=e=>{let n=t(e);if(!n)return e;let{pairwise:r,...i}=e;return{...i,comparison:n}},r=e=>e.map(n),i=e=>e.map(n),a=({label:e,variants:t})=>t.includes(e)?e:e===`A`?t[0]??e:e===`B`?t[1]??e:e,o=({label:e,target:t,resolvedName:n})=>e===t.id||e===t.promptId||!!n&&e===n;export{t as a,a as i,r as n,i as r,o as t};
2
- //# sourceMappingURL=normalizeComparison-CCZ-bOPv.js.map
@@ -1,2 +0,0 @@
1
- import{t as e}from"./jsx-runtime-CFwixLRt.js";import{I as t,t as n}from"./DashboardLayout-RHGL-98_.js";var r=e();function i(){return(0,r.jsx)(n,{children:(0,r.jsx)(t,{})})}export{i as NotFoundPage,i as default};
2
- //# sourceMappingURL=not-found-1cA6pijP.js.map
@@ -1,2 +0,0 @@
1
- import{r as e,s as t}from"./fetchSSE-DWKCnoHV.js";import{t as n}from"./isSymbol-IFJb2-6T.js";var r=/\s/;function i(e){for(var t=e.length;t--&&r.test(e.charAt(t)););return t}var a=/^\s+/;function o(e){return e&&e.slice(0,i(e)+1).replace(a,``)}var s=NaN,c=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,d=parseInt;function f(t){if(typeof t==`number`)return t;if(n(t))return s;if(e(t)){var r=typeof t.valueOf==`function`?t.valueOf():t;t=e(r)?r+``:r}if(typeof t!=`string`)return t===0?t:+t;t=o(t);var i=l.test(t);return i||u.test(t)?d(t.slice(2),i?2:8):c.test(t)?s:+t}var p=function(){return t.Date.now()};export{f as n,p as t};
2
- //# sourceMappingURL=now-Sx_cFlpx.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{r}from"./next-router-Bn5Y8Iek.js";import{Rt as i}from"./index-CUhcyBp3.js";import{t as a}from"./LoadingScreen-D0JSh0Q2.js";var o=e(t()),s=n();function c(){let{project:e}=i(),t=r();return(0,o.useEffect)(()=>{e&&t.push(`/${e.slug}`)},[e,t]),(0,s.jsx)(a,{})}export{c as default};
2
- //# sourceMappingURL=onboarding-Brb1FAS4.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./skeleton-YwQIu7Tp.js";import{t as o}from"./text-A3qvcMyN.js";import{n as s}from"./info-CtYT35g4.js";import{n as c}from"./toaster-CRP22oRW.js";import{I as l,Q as u,X as d,Y as f,Z as p,et as m,l as h}from"./ExternalImage-DbtOSrKl.js";import{r as g}from"./UpgradeModal-BmLw5ONS.js";import{t as _}from"./icon-button-Ce2kwA7j.js";import{t as v}from"./h-stack-CMPhqSp5.js";import{t as y}from"./spacer-CbmCSsJg.js";import{N as b}from"./immer-tl_oI9yy.js";import{t as x}from"./v-stack-ClAMS101.js";import{t as S}from"./DashboardLayout-RHGL-98_.js";import{r as C}from"./next-router-Bn5Y8Iek.js";import{n as w}from"./api-BK6L1im2.js";import{t as T}from"./src-RcSZrN9Q.js";import{K as E,Ut as D,V as O,Wt as k,gn as A,qt as j,y as ee}from"./lu-DlSq9Be4.js";import{Qn as te,Rt as M,V as N,_n as P,an as ne,bn as re,gn as ie,in as ae,n as F,qn as I,t as L,un as R,wr as z,xn as B}from"./index-CUhcyBp3.js";import{t as V}from"./WithPermissionGuard-BP1dFkpM.js";import{d as H}from"./tracesMapping-AU2q390i.js";import{n as U}from"./getEvaluator-OH0w_5fd.js";import{n as W,t as G}from"./useProjectsForCopy-DxbxCEv5.js";import{t as K}from"./LangyContextTarget-DUSindiC.js";import{t as q}from"./NoDataInfoBlock-B3c1WwDO.js";import{t as oe}from"./SetupWithAgentButton-BKWI-UTU.js";import{t as se}from"./ListTable-CSs4ttpJ.js";import{t as ce}from"./FullWidthListPageContent-BtPGWzII.js";import{t as le}from"./types-CQ-IJ_jx.js";var J=e(t()),Y=r(),X=T(`CopyMonitorDialog`),ue=({open:e,onClose:t,onSuccess:n,monitorId:r,monitorName:i})=>{let{project:a}=M(),o=w.monitors.copy.useMutation(),s=G(`evaluations:manage`);return a?(0,Y.jsx)(W,{open:e,onClose:t,onSuccess:n,title:`Replicate online evaluator`,entityLabel:`Online evaluator`,sourceName:i,sourceId:r,sourceProjectId:a.id,projects:s,onCopy:async({projectId:e,sourceProjectId:t})=>{await o.mutateAsync({monitorId:r,projectId:e,sourceProjectId:t})},isLoading:o.isLoading,logError:X.error.bind(X)}):null},Z=()=>{let{project:e,hasPermission:t}=M(),{openDrawer:n}=N();return!e||!t(`evaluations:manage`)?null:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(g.HeaderButton,{background:`bg`,onClick:()=>n(`guardrails`,{}),children:[(0,Y.jsx)(I,{size:16}),`Set up Guardrail`]}),(0,Y.jsxs)(g.HeaderButton,{background:`bg`,onClick:()=>n(`onlineEvaluation`,{}),children:[(0,Y.jsx)(te,{size:16}),`New Online Evaluation`]})]})},Q=({row:e})=>{let t=e.performance;if(e.hasPerformanceError)return(0,Y.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`Performance unavailable`});if(!t)return(0,Y.jsxs)(v,{width:`full`,gap:4,children:[(0,Y.jsx)(a,{width:`112px`,height:`38px`}),(0,Y.jsxs)(x,{align:`start`,gap:1,children:[(0,Y.jsx)(a,{width:`48px`,height:`18px`}),(0,Y.jsx)(a,{width:`64px`,height:`14px`})]})]});let{current:n,previous:r,metric:i,points:s}=t,c=n!==null&&r!==null?n-r:null,l=c===null||c===0?`neutral`:c>0?`up`:`down`,u=l===`up`?`green.fg`:l===`down`?`red.fg`:`fg.muted`;return n===null?(0,Y.jsxs)(v,{width:`full`,gap:4,children:[(0,Y.jsx)($,{points:[],trend:`neutral`,name:e.name}),(0,Y.jsx)(o,{textStyle:`sm`,color:`fg.muted`,"data-trend":`neutral`,children:`No data yet`})]}):(0,Y.jsxs)(v,{width:`full`,gap:4,justify:`space-between`,children:[(0,Y.jsx)($,{points:s,trend:l,name:e.name}),(0,Y.jsxs)(x,{minWidth:`82px`,align:`start`,gap:0,children:[(0,Y.jsx)(o,{fontWeight:`semibold`,children:i===`pass_rate`?`${Math.round(n*100)}%`:n.toFixed(2)}),(0,Y.jsx)(o,{textStyle:`xs`,color:u,"data-trend":l,children:de(i,c)})]})]})},de=(e,t)=>{if(t===null)return`No comparison`;if(t===0)return`No change`;let n=t>0?`↑`:`↓`,r=Math.abs(t);return e===`pass_rate`?`${n} ${Math.round(r*100)} pp`:`${n} ${r.toFixed(2)}`},$=({points:e,trend:t,name:n})=>{let r=e.filter(Number.isFinite),a=r.length>0?Math.min(...r):0,o=r.length>0?Math.max(...r):1,s=o-a||1,c=r.length>0&&o===a,l=r.map((e,t)=>`${r.length===1?112/2:3+t/(r.length-1)*106},${c?38/2:35-(e-a)/s*32}`).join(` `),u=t===`up`?`var(--chakra-colors-green-500)`:t===`down`?`var(--chakra-colors-red-500)`:`var(--chakra-colors-gray-400)`;return(0,Y.jsx)(i,{width:`112px`,height:`38px`,flexShrink:0,children:(0,Y.jsx)(`svg`,{role:`img`,"aria-label":`Performance trend for ${n}`,viewBox:`0 0 112 38`,width:`100%`,height:`100%`,children:r.length>1?(0,Y.jsx)(`polyline`,{points:l,fill:`none`,stroke:u,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`}):(0,Y.jsx)(`line`,{x1:3,x2:109,y1:38/2,y2:38/2,stroke:u,strokeWidth:`2`,strokeDasharray:`3 4`})})})},fe=(e,t)=>`/${e}/analytics/evaluations?evaluationId=${encodeURIComponent(t)}`,pe=({projectSlug:e,rows:t,canManage:n,canViewAnalytics:r,onEdit:a,onReplicate:c,onToggle:h,onDelete:g})=>(0,Y.jsxs)(se,{width:`full`,children:[(0,Y.jsx)(u,{children:(0,Y.jsxs)(m,{children:[(0,Y.jsx)(p,{width:`32%`,children:`Online evaluation`}),(0,Y.jsx)(p,{width:`15%`,children:`Mode`}),(0,Y.jsx)(p,{width:`13%`,children:`Status`}),(0,Y.jsx)(p,{width:`35%`,children:`Performance, last 7 days`}),(0,Y.jsx)(p,{width:`5%`})]})}),(0,Y.jsx)(f,{children:t.map(t=>{let u=U(t.checkType),f=fe(e,t.id);return(0,Y.jsxs)(m,{children:[(0,Y.jsx)(d,{children:(0,Y.jsx)(K,{target:b({evaluationId:t.id,name:t.name}),children:(0,Y.jsxs)(x,{align:`start`,gap:.5,children:[(0,Y.jsx)(o,{fontWeight:`medium`,children:t.name}),(0,Y.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:u?.name??t.checkType})]})})}),(0,Y.jsx)(d,{children:(0,Y.jsx)(s,{colorPalette:t.executionMode===`AS_GUARDRAIL`?`blue`:`teal`,variant:`subtle`,children:t.executionMode===`AS_GUARDRAIL`?`Guardrail`:`Online evaluation`})}),(0,Y.jsx)(d,{children:(0,Y.jsxs)(v,{gap:2,children:[(0,Y.jsx)(i,{width:`6px`,height:`6px`,borderRadius:`full`,background:t.enabled?`green.solid`:`fg.subtle`}),(0,Y.jsx)(o,{textStyle:`sm`,children:t.enabled?`Active`:`Paused`})]})}),(0,Y.jsx)(d,{children:r?(0,Y.jsx)(F,{href:f,"aria-label":`View analytics for ${t.name}`,style:{color:`inherit`,display:`inline-flex`,maxWidth:`330px`,textDecoration:`none`,width:`100%`},children:(0,Y.jsx)(i,{width:`full`,borderRadius:`md`,paddingY:1,paddingX:2,marginX:-2,_hover:{background:`bg.muted`},children:(0,Y.jsx)(Q,{row:t})})}):(0,Y.jsx)(o,{textStyle:`sm`,color:`fg.muted`,children:`Analytics access required`})}),(0,Y.jsx)(d,{children:(r||n)&&(0,Y.jsxs)(l.Root,{children:[(0,Y.jsx)(l.Trigger,{asChild:!0,children:(0,Y.jsx)(_,{"aria-label":`Actions for ${t.name}`,variant:`ghost`,size:`sm`,children:(0,Y.jsx)(E,{})})}),(0,Y.jsxs)(l.Content,{children:[r&&(0,Y.jsx)(l.Item,{value:`analytics`,asChild:!0,children:(0,Y.jsxs)(F,{href:f,children:[(0,Y.jsx)(ee,{}),`View analytics`]})}),n&&(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(l.Item,{value:`edit`,onClick:()=>a(t.id),children:[(0,Y.jsx)(k,{}),`Edit`]}),(0,Y.jsxs)(l.Item,{value:`replicate`,onClick:()=>c(t.id),children:[(0,Y.jsx)(O,{}),`Replicate to another project`]}),(0,Y.jsxs)(l.Item,{value:`toggle`,onClick:()=>h(t.id),children:[t.enabled?(0,Y.jsx)(D,{}):(0,Y.jsx)(j,{}),t.enabled?`Disable`:`Enable`]}),(0,Y.jsxs)(l.Item,{value:`delete`,color:`red.fg`,onClick:()=>g(t.id),children:[(0,Y.jsx)(A,{}),`Delete`]})]})]})]})})]},t.id)})})]});P({name:B().optional(),step:R([`task`,`dataset`,`execution`,`evaluation`,`results`]),task:R(Object.keys({real_time:`Real-time evaluation`,llm_app:`Offline evaluation`,prompt_creation:`Prompt Creation`,custom_evaluator:`Evaluate your Evaluator`,scan:`Scan for Vulnerabilities (Coming Soon)`})).optional(),dataSource:R(Object.keys({choose:`Choose existing dataset`,from_production:`Import from Production`,manual:`Create with AI`,upload:`Upload CSV`})).optional(),executionMethod:R(Object.keys({realtime_on_message:`When a message arrives`,realtime_guardrail:`As a guardrail`,realtime_manually:`Manually`,offline_prompt:`Create a prompt`,offline_http:`Call an HTTP endpoint`,offline_workflow:`Create a Workflow`,offline_notebook:`Run on Notebook or CI/CD Pipeline`,offline_code_execution:`Run code`,api:`Run on Notebook or CI/CD Pipeline`})).optional(),evaluatorCategory:R([`expected_answer`,`llm_judge`,`quality`,`rag`,`safety`,`custom_evaluators`]).optional(),realTimeTraceMappings:H.optional(),realTimeExecution:P({sample:ie().min(0).max(1).optional(),preconditions:le.optional()}).optional(),workspaceTab:R([`dataset`,`workflow`,`results`,`code-implementation`]).optional(),isThreadMapping:ne().optional(),realTimeThreadMappings:P({mapping:re(P({source:R([``,`thread_id`,`traces`,`formatted_traces`]),selectedFields:ae(B()).optional()}))}).optional()});var me=e=>!e||typeof e!=`object`||Array.isArray(e)?!1:e.task===`real_time`;function he(){let{project:e,hasPermission:t}=M(),r=C(),{openDrawer:a}=N(),s=t(`evaluations:manage`),l=t(`analytics:view`),u=t(`experiments:view`),[d,f]=(0,J.useState)(null),[p,m]=(0,J.useState)(null),_=w.monitors.getAllForProject.useQuery({projectId:e?.id??``},{enabled:!!e}),b=w.monitors.getPerformanceForProject.useQuery({projectId:e?.id??``,timeZone:Intl.DateTimeFormat().resolvedOptions().timeZone},{enabled:!!e&&l&&_.isSuccess,refetchOnWindowFocus:!1,trpc:{context:{skipBatch:!0}}}),T=w.experiments.getAllByProjectId.useQuery({projectId:e?.id??``},{enabled:!!e&&s&&u&&_.isSuccess,refetchOnWindowFocus:!1,trpc:{context:{skipBatch:!0}}}),E=(0,J.useMemo)(()=>new Map(b.data?.map(e=>[e.monitorId,e])??[]),[b.data]),D=(0,J.useMemo)(()=>new Map((T.data??[]).filter(e=>me(e.workbenchState)).map(e=>[e.id,e.slug])),[T.data]),O=_.data?.map(e=>({id:e.id,name:e.name,checkType:e.checkType,enabled:e.enabled,executionMode:e.executionMode,performance:E.get(e.id),hasPerformanceError:b.isError}))??[],k=w.monitors.toggle.useMutation({onSuccess:()=>{_.refetch()}}),A=w.monitors.delete.useMutation({onSuccess:()=>{_.refetch(),l&&b.refetch(),c.create({title:`Online evaluation deleted`,type:`success`,meta:{closable:!0}})},onError:()=>{c.create({title:`Could not delete online evaluation`,description:`Please try again.`,type:`error`,meta:{closable:!0}})}});if(!e)return null;let j=new Map(_.data?.map(e=>[e.id,e]));return(0,Y.jsxs)(S,{children:[(0,Y.jsxs)(g.Header,{children:[(0,Y.jsx)(g.Heading,{children:`Online Evaluations`}),(0,Y.jsx)(y,{}),(0,Y.jsx)(v,{gap:2,children:(0,Y.jsx)(Z,{})})]}),_.isLoading?(0,Y.jsx)(i,{display:`flex`,justifyContent:`center`,paddingY:8,children:(0,Y.jsx)(n,{})}):_.isError?(0,Y.jsx)(i,{padding:6,children:(0,Y.jsx)(o,{color:`red.500`,children:`Error loading online evaluations`})}):O.length===0?(0,Y.jsx)(g.Container,{children:(0,Y.jsx)(g.Content,{children:(0,Y.jsx)(q,{title:`No online evaluations yet`,description:`Score live traces and threads as they arrive, or set up a synchronous guardrail that can block unsafe traffic.`,icon:(0,Y.jsx)(z,{size:24}),color:`teal.500`,docsInfo:(0,Y.jsxs)(o,{children:[`Learn more in the`,` `,(0,Y.jsx)(L,{color:`inherit`,textDecoration:`underline`,href:`https://langwatch.ai/docs/evaluations/online-evaluation/overview`,isExternal:!0,children:`online evaluations documentation`}),`.`]}),children:(0,Y.jsxs)(v,{marginTop:4,children:[(0,Y.jsx)(Z,{}),(0,Y.jsx)(oe,{surface:`onlineEvaluations`})]})})})}):(0,Y.jsx)(ce,{children:(0,Y.jsxs)(x,{width:`full`,gap:4,align:`stretch`,children:[(0,Y.jsx)(x,{align:`start`,gap:1,children:(0,Y.jsx)(o,{color:`fg.muted`,children:`Online evaluations score live traces asynchronously. Guardrails run synchronously and can stop unsafe requests or responses.`})}),(0,Y.jsx)(pe,{projectSlug:e.slug,rows:O,canManage:s,canViewAnalytics:l,onEdit:t=>{let n=j.get(t);if(!n)return;let i=n.experimentId?D.get(n.experimentId):void 0;if(i){r.push(`/${e.slug}/experiments/workbench/${i}`);return}a(`onlineEvaluation`,{monitorId:t})},onReplicate:e=>{let t=j.get(e);t&&f({id:t.id,name:t.name})},onToggle:t=>{let n=j.get(t);n&&k.mutate({id:n.id,projectId:e.id,enabled:!n.enabled})},onDelete:e=>{let t=j.get(e);t&&m({id:t.id,name:t.name})}})]})}),d&&(0,Y.jsx)(ue,{open:!0,onClose:()=>f(null),monitorId:d.id,monitorName:d.name}),(0,Y.jsx)(h,{open:!!p,onOpenChange:e=>{e||m(null)},title:`Delete online evaluation`,message:`Are you sure you want to delete "${p?.name??``}"?`,confirmLabel:`Delete`,tone:`danger`,loading:A.isLoading,onConfirm:()=>{p&&A.mutate({id:p.id,projectId:e.id},{onSettled:()=>m(null)})}})]})}var ge=V(`evaluations:view`,{layoutComponent:S})(he);export{ge as default};
2
- //# sourceMappingURL=online-evaluations-Di78dvHe.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{Nn as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./info-CtYT35g4.js";import{n as l}from"./toaster-CRP22oRW.js";import{$ as u,J as d,Q as f,X as p,Y as m,Z as h,et as g,tt as _}from"./ExternalImage-DbtOSrKl.js";import{r as v}from"./UpgradeModal-BmLw5ONS.js";import{r as y,t as b}from"./card-54_vstoB.js";import{a as x,i as S,n as C,r as w,t as T}from"./empty-state-Al7XUd1I.js";import{t as E}from"./h-stack-CMPhqSp5.js";import{t as D}from"./spacer-CbmCSsJg.js";import{n as O,r as k,t as A}from"./stat-BuRz-g3X.js";import{i as j,n as M,r as N,t as P}from"./ReplayStateBadge-C_aPNnCs.js";import{E as F,nt as ee,rt as I}from"./immer-tl_oI9yy.js";import{t as L}from"./v-stack-ClAMS101.js";import{t as R}from"./DashboardLayout-RHGL-98_.js";import{t as te}from"./pause-CNgWYTuw.js";import{n as z}from"./api-BK6L1im2.js";import{$n as B,Ar as V,Mr as H,Yn as ne,g as U,n as W,yt as G}from"./index-CUhcyBp3.js";import{J as re,d as ie,g as ae,on as oe,u as se}from"./CartesianChart-D35vYym3.js";import{t as ce}from"./Line-Bq29STZQ.js";import{n as le,t as ue}from"./AreaChart-CXmFZ9PN.js";import{a as K,i as q,n as de,o as fe,r as pe,t as me}from"./formatters-BDO3Inyr.js";import{t as J}from"./ConfirmDialog-DTpkLGhm.js";import{t as he}from"./OpsPageShell-BamkwuvB.js";var Y=e(t()),X=i();function ge(){let e=z.ops.listAnomalies.useQuery(void 0,{refetchInterval:3e4}),t=z.ops.dismissAnomaly.useMutation({onSuccess:()=>e.refetch()}),i=e.data?.anomalies??[],a=i.length>0,s=e.isError&&!e.isFetching,l=(0,Y.useMemo)(()=>i.filter(e=>e.tier===`hard`).length,[i]);return(0,X.jsx)(y,{borderColor:l>0?`red.300`:void 0,children:(0,X.jsxs)(b,{padding:0,children:[(0,X.jsxs)(E,{paddingX:4,paddingY:2.5,children:[(0,X.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,children:`Anomalous tenants`}),l>0&&(0,X.jsxs)(c,{colorPalette:`red`,variant:`solid`,children:[l,` hard`]}),a&&l===0&&(0,X.jsxs)(c,{colorPalette:`yellow`,children:[i.length,` surfaced`]}),(0,X.jsx)(D,{}),e.isFetching&&(0,X.jsx)(n,{size:`xs`})]}),s&&(0,X.jsx)(o,{paddingX:4,paddingBottom:3,color:`red.500`,textStyle:`xs`,children:`Could not load anomalies — Redis may be unavailable. Retrying every 30s. Do NOT interpret this as “all clear”.`}),!a&&!e.isLoading&&!s&&(0,X.jsx)(o,{paddingX:4,paddingBottom:3,color:`gray.500`,textStyle:`xs`,children:`No active anomalies in the last 60 minutes.`}),a&&(0,X.jsxs)(u,{size:`sm`,variant:`line`,children:[(0,X.jsx)(f,{children:(0,X.jsxs)(g,{children:[(0,X.jsx)(h,{children:`Tenant`}),(0,X.jsx)(h,{children:`Kind`}),(0,X.jsx)(h,{children:`Tier`}),(0,X.jsx)(h,{children:`Current`}),(0,X.jsx)(h,{children:`Baseline`}),(0,X.jsx)(h,{children:`Triggered`}),(0,X.jsx)(h,{children:`Reason`}),(0,X.jsx)(h,{})]})}),(0,X.jsx)(m,{children:i.map(e=>(0,X.jsxs)(g,{children:[(0,X.jsx)(p,{children:(0,X.jsx)(o,{fontFamily:`mono`,textStyle:`xs`,children:e.tenantId})}),(0,X.jsx)(p,{children:e.kind.replace(`_`,` `)}),(0,X.jsx)(p,{children:(0,X.jsx)(c,{colorPalette:e.tier===`hard`?`red`:`yellow`,size:`xs`,children:e.tier})}),(0,X.jsxs)(p,{children:[e.currentRate.toLocaleString(),`/min`]}),(0,X.jsxs)(p,{children:[e.baseline.toLocaleString(),`/min`]}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,children:_e(e.triggeredAt)})}),(0,X.jsx)(p,{maxW:`320px`,children:(0,X.jsx)(o,{textStyle:`xs`,color:`gray.600`,lineClamp:2,children:e.reason})}),(0,X.jsx)(p,{children:(0,X.jsx)(r,{size:`xs`,variant:`ghost`,onClick:()=>t.mutate({tenantId:e.tenantId,kind:e.kind}),children:`Dismiss`})})]},`${e.kind}:${e.tenantId}`))})]})]})})}function _e(e){let t=Date.now()-e,n=Math.floor(t/6e4);return n<1?`<1m ago`:n<60?`${n}m ago`:`${Math.floor(n/60)}h ${n%60}m ago`}function Z({count:e,rowHeight:t,columnCount:n,scrollContainerRef:r,renderRow:i,getItemKey:a,threshold:o=30,overscan:s=6}){let c=e>o,l=F({count:e,getScrollElement:(0,Y.useCallback)(()=>r.current,[r]),estimateSize:(0,Y.useCallback)(()=>t,[t]),overscan:s,enabled:c,getItemKey:a});if(!c){let t=[];for(let n=0;n<e;n++)t.push(i(n));return(0,X.jsx)(X.Fragment,{children:t})}let u=l.getVirtualItems(),d=l.getTotalSize(),f=u.length>0?u[0]?.start??0:0,m=u.length>0?d-(u[u.length-1]?.end??0):0;return(0,X.jsxs)(X.Fragment,{children:[f>0&&(0,X.jsx)(g,{children:(0,X.jsx)(p,{colSpan:n,style:{height:`${f}px`,padding:0,border:`none`}})}),u.map(e=>(0,X.jsx)(Y.Fragment,{children:i(e.index)},e.key)),m>0&&(0,X.jsx)(g,{children:(0,X.jsx)(p,{colSpan:n,style:{height:`${m}px`,padding:0,border:`none`}})})]})}var ve=360,ye=36;function be({queueNames:e}){let{hasAccess:t}=U(),n=z.useContext(),i=z.ops.getBlockedSummary.useQuery(),s=z.ops.listQueues.useQuery(),[c,d]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(null),[C,w]=(0,Y.useState)(null),[T,O]=(0,Y.useState)(5),k=(0,Y.useRef)(null),A=z.ops.unblockAll.useMutation({onSuccess:e=>{l.create({title:`Unblocked ${e.unblockedCount} groups`,type:`success`}),d(null),n.ops.invalidate()},onError:e=>{l.create({title:`Unblock failed`,description:e.message,type:`error`})}}),j=z.ops.drainGroup.useMutation({onSuccess:e=>{l.create({title:`Drained, removed ${e.jobsRemoved} jobs`,type:`success`}),v(null),n.ops.invalidate()},onError:e=>{l.create({title:`Drain failed`,description:e.message,type:`error`})}}),M=z.ops.moveAllBlockedToDlq.useMutation({onSuccess:e=>{l.create({title:`Moved ${e.movedCount} groups to DLQ`,type:`success`}),S(null),n.ops.invalidate()},onError:e=>{l.create({title:`Move to DLQ failed`,description:e.message,type:`error`})}}),N=z.ops.canaryUnblock.useMutation({onSuccess:e=>{l.create({title:`Canary unblocked ${e.unblockedCount}`,type:`success`}),w(null),n.ops.invalidate()},onError:e=>{l.create({title:`Canary failed`,description:e.message,type:`error`})}}),P=(s.data??[]).filter(e=>e.blockedGroupCount>0);if(i.isLoading||!i.data||i.data.clusters.length===0)return null;let F=i.data.clusters;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(y,{children:(0,X.jsxs)(b,{padding:0,children:[(0,X.jsxs)(E,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,children:[(0,X.jsxs)(o,{textStyle:`sm`,fontWeight:`medium`,color:`red.500`,children:[`Blocked — `,i.data.totalBlocked,` groups, `,F.length,` error patterns`]}),(0,X.jsx)(D,{}),t&&(0,X.jsxs)(E,{gap:1.5,flexWrap:`wrap`,children:[P.map(e=>(0,X.jsxs)(r,{variant:`outline`,size:`2xs`,colorPalette:`orange`,onClick:()=>d(e.name),children:[`Unblock All (`,e.blockedGroupCount,`)`]},e.name)),P.map(e=>(0,X.jsx)(r,{variant:`outline`,size:`2xs`,colorPalette:`red`,onClick:()=>S(e.name),children:`→ DLQ`},`dlq-${e.name}`)),(0,X.jsxs)(E,{gap:1,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Canary:`}),(0,X.jsx)(V,{size:`xs`,type:`number`,value:T,onChange:e=>O(Math.max(1,Math.min(100,parseInt(e.target.value)||5))),width:`50px`}),P.map(e=>(0,X.jsx)(r,{variant:`ghost`,size:`2xs`,onClick:()=>w(e.name),children:`Go`},`c-${e.name}`))]})]})]}),(0,X.jsx)(a,{ref:k,maxHeight:`${ve}px`,overflowY:`auto`,children:(0,X.jsxs)(u,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,X.jsx)(f,{position:`sticky`,top:0,zIndex:1,bg:`bg`,children:(0,X.jsxs)(g,{children:[(0,X.jsx)(h,{width:`60px`,textAlign:`end`,children:`Count`}),(0,X.jsx)(h,{children:`Error`}),(0,X.jsx)(h,{children:`Pipeline`}),(0,X.jsx)(h,{children:`Sample Groups`}),(0,X.jsx)(h,{width:`60px`,children:`Actions`})]})}),(0,X.jsx)(m,{children:(0,X.jsx)(Z,{count:F.length,rowHeight:ye,columnCount:5,scrollContainerRef:k,getItemKey:e=>{let t=F[e];return`${t.queueName}::${t.normalizedMessage}`},renderRow:e=>{let t=F[e],n=`${t.queueName}::${t.normalizedMessage}`;return(0,X.jsxs)(g,{children:[(0,X.jsx)(p,{textAlign:`end`,children:(0,X.jsx)(o,{color:`red.500`,fontWeight:`medium`,textStyle:`xs`,children:t.count})}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,truncate:!0,maxWidth:`300px`,title:t.sampleMessage,children:t.sampleMessage})}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:t.pipelineName??`—`})}),(0,X.jsx)(p,{children:(0,X.jsxs)(o,{textStyle:`xs`,fontFamily:`mono`,truncate:!0,maxWidth:`160px`,children:[t.sampleGroupIds.slice(0,2).join(`, `),t.sampleGroupIds.length>2?` +${t.sampleGroupIds.length-2}`:``]})}),(0,X.jsx)(p,{children:t.sampleGroupIds[0]&&(0,X.jsx)(r,{variant:`outline`,size:`2xs`,colorPalette:`red`,onClick:()=>v({queueName:t.queueName,groupId:t.sampleGroupIds[0]}),children:`Drain`})})]},n)}})})]})})]})}),(0,X.jsx)(J,{open:!!c,onClose:()=>d(null),onConfirm:()=>{c&&A.mutate({queueName:c})},title:`Unblock All`,description:`Unblock all blocked groups in "${c}". They will retry immediately.`,isLoading:A.isPending}),(0,X.jsx)(J,{open:!!_,onClose:()=>v(null),onConfirm:()=>{_&&j.mutate(_)},title:`Drain Group`,description:`Permanently remove all jobs from "${_?.groupId}". Cannot be undone.`,isLoading:j.isPending}),(0,X.jsx)(J,{open:!!x,onClose:()=>S(null),onConfirm:()=>{x&&M.mutate({queueName:x})},title:`Move All to DLQ`,description:`Move all blocked groups in "${x}" to DLQ. They can be replayed later.`,isLoading:M.isPending}),(0,X.jsx)(J,{open:!!C,onClose:()=>w(null),onConfirm:()=>{C&&N.mutate({queueName:C,count:T})},title:`Canary Unblock`,description:`Unblock ${T} random groups in "${C}" as a canary test.`,isLoading:N.isPending})]})}var xe=360,Se=36;function Ce({queueNames:e}){let{hasAccess:t}=U(),n=z.useContext(),i=z.ops.listAllDlqGroups.useQuery(void 0,{refetchInterval:1e4}),[s,d]=(0,Y.useState)(null),[_,v]=(0,Y.useState)(null),[x,S]=(0,Y.useState)(null),[C,w]=(0,Y.useState)(5),T=(0,Y.useRef)(null),O=z.ops.replayFromDlq.useMutation({onSuccess:e=>{l.create({title:`Replayed ${e.jobsReplayed} jobs`,type:`success`}),d(null),n.ops.invalidate()},onError:e=>{l.create({title:`Replay failed`,description:e.message,type:`error`})}}),k=z.ops.replayAllFromDlq.useMutation({onSuccess:e=>{l.create({title:`Replayed ${e.replayedCount} groups`,type:`success`}),v(null),n.ops.invalidate()},onError:e=>{l.create({title:`Replay all failed`,description:e.message,type:`error`})}}),A=z.ops.canaryRedrive.useMutation({onSuccess:e=>{l.create({title:`Canary redrove ${e.redrivenCount}`,type:`success`}),S(null),n.ops.invalidate()},onError:e=>{l.create({title:`Canary failed`,description:e.message,type:`error`})}}),j=i.data??[],M=[...new Set(j.map(e=>e.queueName))];return i.isLoading||j.length===0?null:(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(y,{children:(0,X.jsxs)(b,{padding:0,children:[(0,X.jsxs)(E,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,children:[(0,X.jsxs)(o,{textStyle:`sm`,fontWeight:`medium`,color:`orange.500`,children:[`Dead Letter Queue — `,j.length,` group`,j.length===1?``:`s`]}),(0,X.jsx)(D,{}),t&&(0,X.jsxs)(E,{gap:1.5,flexWrap:`wrap`,children:[M.map(e=>{let t=j.filter(t=>t.queueName===e).length;return(0,X.jsxs)(r,{variant:`outline`,size:`2xs`,colorPalette:`green`,onClick:()=>v(e),children:[`Replay All `,j.find(t=>t.queueName===e)?.queueDisplayName??e,` (`,t,`)`]},e)}),(0,X.jsxs)(E,{gap:1,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Canary:`}),(0,X.jsx)(V,{size:`xs`,type:`number`,value:C,onChange:e=>w(Math.max(1,Math.min(100,parseInt(e.target.value)||5))),width:`50px`}),M.map(e=>(0,X.jsx)(r,{variant:`ghost`,size:`2xs`,onClick:()=>S(e),children:`Go`},`c-${e}`))]})]})]}),(0,X.jsx)(a,{ref:T,maxHeight:`${xe}px`,overflowY:`auto`,children:(0,X.jsxs)(u,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,X.jsx)(f,{position:`sticky`,top:0,zIndex:1,bg:`bg`,children:(0,X.jsxs)(g,{children:[(0,X.jsx)(h,{children:`Queue`}),(0,X.jsx)(h,{children:`Group ID`}),(0,X.jsx)(h,{children:`Pipeline`}),(0,X.jsx)(h,{children:`Error`}),(0,X.jsx)(h,{textAlign:`end`,width:`50px`,children:`Jobs`}),t&&(0,X.jsx)(h,{width:`70px`,children:`Actions`})]})}),(0,X.jsx)(m,{children:(0,X.jsx)(Z,{count:j.length,rowHeight:Se,columnCount:t?6:5,scrollContainerRef:T,getItemKey:e=>{let t=j[e];return`${t.queueName}:${t.groupId}`},renderRow:e=>{let n=j[e];return(0,X.jsxs)(g,{children:[(0,X.jsx)(p,{children:(0,X.jsx)(c,{size:`xs`,variant:`subtle`,children:n.queueDisplayName})}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,truncate:!0,maxWidth:`160px`,children:n.groupId})}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:n.pipelineName??`—`})}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,color:`red.500`,truncate:!0,maxWidth:`220px`,title:n.error??void 0,children:n.error??``})}),(0,X.jsx)(p,{textAlign:`end`,children:(0,X.jsx)(o,{textStyle:`xs`,children:n.jobCount})}),t&&(0,X.jsx)(p,{children:(0,X.jsx)(r,{variant:`outline`,size:`2xs`,colorPalette:`green`,onClick:()=>d({queueName:n.queueName,groupId:n.groupId}),children:`Replay`})})]},`${n.queueName}:${n.groupId}`)}})})]})})]})}),(0,X.jsx)(J,{open:!!s,onClose:()=>d(null),onConfirm:()=>{s&&O.mutate(s)},title:`Replay from DLQ`,description:`Move "${s?.groupId}" back to main queue for reprocessing.`,isLoading:O.isPending}),(0,X.jsx)(J,{open:!!_,onClose:()=>v(null),onConfirm:()=>{_&&k.mutate({queueName:_})},title:`Replay All from DLQ`,description:`Move all DLQ groups in "${_}" back to main queue.`,isLoading:k.isPending}),(0,X.jsx)(J,{open:!!x,onClose:()=>S(null),onConfirm:()=>{x&&A.mutate({queueName:x,count:C})},title:`Canary Redrive`,description:`Replay ${C} random DLQ groups from "${x}" as canary.`,isLoading:A.isPending})]})}function we(e,t,n){let r=t?`${t}/${e.name}`:e.name;if(n.has(r))return!0;if(t){let e=t.split(`/`);for(let t=1;t<=e.length;t++){let r=e.slice(0,t).join(`/`);if(n.has(r))return!0}}return!1}function Te(e,t){return t.has(e)}function Ee(e,t){if(!t.trim())return e;let n=t.toLowerCase();function r(e){if(e.name.toLowerCase().includes(n))return e;let t=e.children.map(r).filter(e=>e!==null);return t.length>0?{...e,children:t}:null}let i=e.map(r).filter(e=>e!==null);return i.length>0?i:null}function De(e){return e===null?!1:Date.now()-e>300*1e3}function Oe(e,t){switch(t){case`all`:return!0;case`ok`:return!e.isBlocked&&!e.isStaleBlock;case`blocked`:return e.isBlocked&&!e.isStaleBlock;case`stale`:return e.isStaleBlock;case`active`:return e.hasActiveJob&&!e.isBlocked}}function ke({group:e,onClose:t}){let r=z.ops.getGroupDetail.useQuery({queueName:e?.queueName??``,groupId:e?.groupId??``},{enabled:!!e}),i=z.ops.getGroupJobs.useQuery({queueName:e?.queueName??``,groupId:e?.groupId??``,page:1,pageSize:20},{enabled:!!e}),s=r.data,l=i.data;return(0,X.jsx)(G.Root,{open:!!e,onOpenChange:e=>!e.open&&t(),size:`lg`,children:(0,X.jsxs)(G.Content,{bg:`bg`,children:[(0,X.jsx)(G.Header,{children:(0,X.jsx)(G.Title,{children:(0,X.jsx)(o,{textStyle:`sm`,fontFamily:`mono`,wordBreak:`break-all`,children:e?.groupId})})}),(0,X.jsx)(G.Body,{children:r.isLoading?(0,X.jsx)(H,{paddingY:6,children:(0,X.jsx)(n,{size:`sm`})}):s?(0,X.jsxs)(L,{align:`stretch`,gap:4,children:[(0,X.jsxs)(E,{gap:4,flexWrap:`wrap`,children:[(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Status`}),s.isStaleBlock?(0,X.jsx)(c,{size:`sm`,colorPalette:`orange`,variant:`subtle`,children:`Stale`}):s.isBlocked?(0,X.jsx)(c,{size:`sm`,colorPalette:`red`,variant:`subtle`,children:`Blocked`}):s.hasActiveJob?(0,X.jsx)(c,{size:`sm`,colorPalette:`green`,variant:`subtle`,children:`Active`}):(0,X.jsx)(c,{size:`sm`,colorPalette:`gray`,variant:`subtle`,children:`OK`})]}),(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Pipeline`}),(0,X.jsx)(o,{textStyle:`sm`,children:s.pipelineName??`—`})]}),(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Pending`}),(0,X.jsx)(o,{textStyle:`sm`,fontFamily:`mono`,children:s.pendingJobs})]}),(s.retryCount??0)>0&&(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Retries`}),(0,X.jsx)(o,{textStyle:`sm`,fontFamily:`mono`,color:`orange.500`,children:s.retryCount})]}),s.activeJobId&&(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Active Job`}),(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,color:`green.500`,children:s.activeJobId})]})]}),(0,X.jsxs)(E,{gap:4,children:[(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Oldest Job`}),(0,X.jsx)(o,{textStyle:`sm`,children:fe(s.oldestJobMs)})]}),(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Newest Job`}),(0,X.jsx)(o,{textStyle:`sm`,children:fe(s.newestJobMs)})]}),s.processingDurationMs!=null&&(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Processing`}),(0,X.jsxs)(o,{textStyle:`sm`,children:[s.processingDurationMs,`ms`]})]})]}),s.errorMessage&&(0,X.jsxs)(L,{align:`stretch`,gap:1,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Error`}),(0,X.jsx)(y,{borderColor:`red.500/20`,children:(0,X.jsxs)(b,{padding:3,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`red.500`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,children:s.errorMessage}),s.errorStack&&(0,X.jsx)(a,{marginTop:2,maxHeight:`200px`,overflow:`auto`,bg:`bg.subtle`,borderRadius:`sm`,padding:2,children:(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,color:`fg.muted`,whiteSpace:`pre`,fontSize:`10px`,children:s.errorStack})})]})})]}),(0,X.jsxs)(L,{align:`stretch`,gap:1,children:[(0,X.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[`Jobs `,l?`(${l.total})`:``]}),i.isLoading?(0,X.jsx)(n,{size:`xs`}):l&&l.jobs.length>0?(0,X.jsx)(L,{align:`stretch`,gap:2,children:l.jobs.map(e=>(0,X.jsx)(y,{variant:`outline`,children:(0,X.jsxs)(b,{padding:3,children:[(0,X.jsxs)(E,{gap:3,marginBottom:e.data?2:0,children:[(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Job ID`}),(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,wordBreak:`break-all`,children:e.jobId})]}),(0,X.jsxs)(L,{align:`start`,gap:0,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Score`}),(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,children:e.score})]})]}),e.data&&(0,X.jsx)(a,{bg:`bg.subtle`,borderRadius:`sm`,padding:2,maxHeight:`200px`,overflow:`auto`,children:(0,X.jsx)(o,{as:`pre`,textStyle:`xs`,fontFamily:`mono`,whiteSpace:`pre-wrap`,wordBreak:`break-word`,fontSize:`11px`,children:JSON.stringify(e.data,null,2)})})]})},e.jobId))}):(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`No jobs in queue.`})]})]}):null}),(0,X.jsx)(G.CloseTrigger,{})]})})}var Ae=480,je=36;function Me({queueNames:e}){let{hasAccess:t}=U(),i=z.useContext(),[s,d]=(0,Y.useState)(`all`),[_,v]=(0,Y.useState)(``),x=(0,Y.useRef)(null),S=e[0],C=z.ops.listGroups.useQuery({queueName:S??``,page:1,pageSize:200},{refetchInterval:1e4,enabled:!!S}),w=(0,Y.useMemo)(()=>{let e=[];if(C.data&&S)for(let t of C.data.groups)e.push({...t,queueName:S});return e},[C.data,S]),T=(0,Y.useMemo)(()=>{let e=w;if(s!==`all`&&(e=e.filter(e=>Oe(e,s))),_.trim()){let t=_.toLowerCase();e=e.filter(e=>e.groupId.toLowerCase().includes(t)||e.pipelineName?.toLowerCase().includes(t)||e.errorMessage?.toLowerCase().includes(t))}return e},[w,s,_]),O=(0,Y.useMemo)(()=>{let e=0,t=0,n=0,r=0;for(let i of w)i.isStaleBlock?n++:i.isBlocked?t++:e++,i.hasActiveJob&&!i.isBlocked&&r++;return{all:w.length,ok:e,blocked:t,stale:n,active:r}},[w]);(0,Y.useEffect)(()=>{x.current&&(x.current.scrollTop=0)},[s,_]);let k=!!S&&C.isLoading,[A,j]=(0,Y.useState)(null),[M,N]=(0,Y.useState)(null),[P,F]=(0,Y.useState)(null),ee=z.ops.drainGroup.useMutation({onSuccess:e=>{l.create({title:`Drained, removed ${e.jobsRemoved} jobs`,type:`success`}),N(null),i.ops.invalidate()},onError:e=>{l.create({title:`Failed to drain`,description:e.message,type:`error`})}}),I=z.ops.unblockGroup.useMutation({onSuccess:()=>{l.create({title:`Group unblocked`,type:`success`}),i.ops.invalidate()},onError:e=>{l.create({title:`Failed to unblock`,description:e.message,type:`error`})}}),L=(0,Y.useMemo)(()=>{let e=_.trim();return!e||e.includes(`/`)||e.includes(` `)||!e.startsWith(`project_`)?null:e},[_]),R=z.ops.listPausedTenants.useQuery({queueName:S??``},{enabled:!!S,refetchInterval:1e4}),te=!!(L&&R.data?.includes(L)),B=z.ops.pauseTenant.useMutation({onSuccess:(e,t)=>{l.create({title:`Paused tenant ${t.tenantId}`,type:`success`}),i.ops.invalidate()},onError:e=>{l.create({title:`Failed to pause tenant`,description:e.message,type:`error`})}}),W=z.ops.unpauseTenant.useMutation({onSuccess:(e,t)=>{l.create({title:`Unpaused tenant ${t.tenantId}`,type:`success`}),i.ops.invalidate()},onError:e=>{l.create({title:`Failed to unpause tenant`,description:e.message,type:`error`})}}),G=z.ops.drainTenant.useMutation({onSuccess:(e,t)=>{l.create({title:`Drained ${e.groupsDrained} groups (${e.jobsDrained} jobs) for ${t.tenantId}`,type:`success`}),F(null),i.ops.invalidate()},onError:e=>{l.create({title:`Failed to drain tenant`,description:e.message,type:`error`}),F(null)}}),re=[{value:`all`,label:`All`,count:O.all,color:`gray`},{value:`ok`,label:`OK`,count:O.ok,color:`green`},{value:`blocked`,label:`Blocked`,count:O.blocked,color:`red`},{value:`stale`,label:`Stale`,count:O.stale,color:`orange`},{value:`active`,label:`Active`,count:O.active,color:`blue`}];return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(y,{children:(0,X.jsxs)(b,{padding:0,children:[t&&R.data&&R.data.length>0&&(0,X.jsxs)(E,{paddingX:4,paddingY:2,borderBottom:`1px solid`,borderBottomColor:`border`,bg:`yellow.subtle`,gap:2,flexWrap:`wrap`,children:[(0,X.jsx)(o,{textStyle:`xs`,fontWeight:`medium`,children:`Paused tenants:`}),R.data.map(e=>(0,X.jsxs)(E,{gap:1,children:[(0,X.jsx)(c,{size:`xs`,colorPalette:`yellow`,variant:`solid`,fontFamily:`mono`,children:e}),(0,X.jsx)(r,{size:`2xs`,variant:`outline`,colorPalette:`green`,onClick:()=>S&&W.mutate({queueName:S,tenantId:e}),loading:W.isPending&&W.variables?.tenantId===e,children:`Unpause`})]},e))]}),(0,X.jsxs)(E,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,children:[(0,X.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,children:`Groups`}),(0,X.jsx)(D,{}),w.length>0&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(E,{gap:1,children:re.map(e=>(0,X.jsxs)(r,{size:`2xs`,variant:s===e.value?`solid`:`ghost`,colorPalette:e.color,onClick:()=>d(e.value),children:[e.label,` `,e.count>0?`(${e.count})`:``]},e.value))}),(0,X.jsxs)(a,{position:`relative`,width:`200px`,children:[(0,X.jsx)(a,{position:`absolute`,left:2.5,top:`50%`,transform:`translateY(-50%)`,zIndex:1,children:(0,X.jsx)(ne,{size:11,color:`var(--chakra-colors-fg-muted)`})}),(0,X.jsx)(V,{size:`xs`,placeholder:`Search...`,value:_,onChange:e=>v(e.target.value),paddingLeft:7})]})]})]}),t&&L&&S&&(0,X.jsxs)(E,{paddingX:4,paddingY:2,borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,flexWrap:`wrap`,bg:`bg.subtle`,children:[(0,X.jsx)(o,{textStyle:`xs`,fontWeight:`medium`,children:`Tenant actions:`}),(0,X.jsx)(c,{size:`xs`,variant:`subtle`,fontFamily:`mono`,children:L}),te?(0,X.jsx)(r,{size:`2xs`,variant:`outline`,colorPalette:`green`,onClick:()=>{B.reset(),W.mutate({queueName:S,tenantId:L})},loading:W.isPending,children:`Unpause Tenant`}):(0,X.jsx)(r,{size:`2xs`,variant:`outline`,colorPalette:`yellow`,onClick:()=>{W.reset(),B.mutate({queueName:S,tenantId:L})},loading:B.isPending,children:`Pause Tenant`}),(0,X.jsx)(r,{size:`2xs`,variant:`outline`,colorPalette:`red`,onClick:()=>F(L),children:`Drain All Tenant Groups`})]}),k?(0,X.jsx)(H,{paddingY:6,children:(0,X.jsx)(n,{size:`sm`})}):w.length===0?(0,X.jsx)(a,{padding:4,children:(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`No groups — queues are idle.`})}):T.length===0?(0,X.jsx)(a,{padding:4,children:(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`No groups match current filters.`})}):(0,X.jsx)(a,{ref:x,maxHeight:`${Ae}px`,overflowY:`auto`,children:(0,X.jsxs)(u,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,X.jsx)(f,{position:`sticky`,top:0,zIndex:1,bg:`bg`,children:(0,X.jsxs)(g,{children:[(0,X.jsx)(h,{children:`Group ID`}),(0,X.jsx)(h,{width:`140px`,children:`Pipeline`}),(0,X.jsx)(h,{textAlign:`end`,width:`50px`,children:`Pend.`}),(0,X.jsx)(h,{textAlign:`end`,width:`45px`,children:`Retry`}),(0,X.jsx)(h,{width:`75px`,children:`Oldest`}),(0,X.jsx)(h,{width:`65px`,children:`Status`}),t&&(0,X.jsx)(h,{width:`100px`,children:`Actions`})]})}),(0,X.jsx)(m,{children:(0,X.jsx)(Z,{count:T.length,rowHeight:je,columnCount:t?7:6,scrollContainerRef:x,getItemKey:e=>{let t=T[e];return`${t.queueName}:${t.groupId}`},renderRow:e=>{let n=T[e],i=!n.isBlocked&&De(n.oldestJobMs);return(0,X.jsxs)(g,{cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>j({queueName:n.queueName,groupId:n.groupId}),children:[(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,truncate:!0,title:n.groupId,children:n.groupId})}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,truncate:!0,children:n.pipelineName??`—`})}),(0,X.jsx)(p,{textAlign:`end`,children:(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,children:n.pendingJobs})}),(0,X.jsx)(p,{textAlign:`end`,children:(n.retryCount??0)>0?(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,color:`orange.500`,children:n.retryCount}):(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,color:`fg.muted`,children:`—`})}),(0,X.jsx)(p,{children:(0,X.jsxs)(o,{textStyle:`xs`,color:i?`orange.500`:`fg.muted`,fontWeight:i?`medium`:void 0,children:[fe(n.oldestJobMs),i?` ⚠`:``]})}),(0,X.jsx)(p,{children:n.isStaleBlock?(0,X.jsx)(c,{size:`xs`,colorPalette:`orange`,variant:`subtle`,children:`Stale`}):n.isBlocked?(0,X.jsx)(c,{size:`xs`,colorPalette:`red`,variant:`subtle`,children:`Blocked`}):n.hasActiveJob?(0,X.jsx)(c,{size:`xs`,colorPalette:`green`,variant:`subtle`,children:`Active`}):(0,X.jsx)(c,{size:`xs`,colorPalette:`gray`,variant:`subtle`,children:`OK`})}),t&&(0,X.jsx)(p,{onClick:e=>e.stopPropagation(),children:(0,X.jsxs)(E,{gap:1,children:[n.isBlocked&&(0,X.jsx)(r,{variant:`outline`,size:`2xs`,colorPalette:`green`,onClick:()=>I.mutate({queueName:n.queueName,groupId:n.groupId}),loading:I.isPending,children:`Retry`}),(0,X.jsx)(r,{variant:`outline`,size:`2xs`,colorPalette:`red`,onClick:()=>N({queueName:n.queueName,groupId:n.groupId}),children:`Drain`})]})})]},`${n.queueName}:${n.groupId}`)}})})]})})]})}),(0,X.jsx)(ke,{group:A,onClose:()=>j(null)}),(0,X.jsx)(J,{open:!!M,onClose:()=>N(null),onConfirm:()=>{M&&ee.mutate(M)},title:`Drain Group`,description:`Permanently remove all jobs from "${M?.groupId}". Cannot be undone.`,isLoading:ee.isPending}),(0,X.jsx)(J,{open:!!P,onClose:()=>F(null),onConfirm:()=>{P&&S&&G.mutate({queueName:S,tenantId:P})},title:`Drain All Tenant Groups`,description:`Permanently remove ALL pending groups for tenant "${P}" across every pipeline. Cannot be undone. The event log in ClickHouse is preserved; you can replay later if needed.`,isLoading:G.isPending})]})}function Ne({node:e,parentPath:t,depth:n,pausedKeys:i,expandedPaths:s,onToggleExpand:l,onPause:u,onUnpause:d,hasAccess:f,queueNames:p}){let m=t?`${t}/${e.name}`:e.name,h=e.children.length>0,g=s.has(m),_=we(e,t,i),v=Te(m,i),y=!h;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(E,{paddingY:1,paddingX:3,paddingLeft:`${n*20+12}px`,cursor:h?`pointer`:`default`,_hover:{bg:`bg.subtle`},onClick:()=>h&&l(m),borderBottom:`1px solid`,borderBottomColor:`border`,gap:2,opacity:_?.6:1,children:[(0,X.jsx)(a,{width:`14px`,flexShrink:0,children:h?g?(0,X.jsx)(I,{size:12}):(0,X.jsx)(ee,{size:12}):null}),(0,X.jsx)(o,{textStyle:`xs`,fontWeight:n===0?`semibold`:`medium`,fontFamily:y?`mono`:void 0,flex:1,color:_?`orange.500`:void 0,children:e.name}),_&&(0,X.jsx)(c,{size:`xs`,colorPalette:`orange`,variant:`subtle`,children:`Paused`}),(0,X.jsxs)(E,{gap:1,flexShrink:0,children:[e.pending>0&&(0,X.jsx)(c,{size:`xs`,colorPalette:`blue`,variant:`subtle`,children:e.pending}),e.active>0&&(0,X.jsx)(c,{size:`xs`,colorPalette:`green`,variant:`subtle`,children:e.active}),e.blocked>0&&(0,X.jsx)(c,{size:`xs`,colorPalette:`red`,variant:`subtle`,children:e.blocked})]}),f&&(0,X.jsx)(a,{flexShrink:0,onClick:e=>e.stopPropagation(),children:v?(0,X.jsx)(r,{variant:`ghost`,size:`2xs`,colorPalette:`green`,onClick:()=>d(m),children:(0,X.jsx)(B,{size:10})}):_?null:(0,X.jsx)(r,{variant:`ghost`,size:`2xs`,colorPalette:`orange`,onClick:()=>u(m),children:(0,X.jsx)(te,{size:10})})})]}),h&&g&&e.children.map(e=>(0,X.jsx)(Ne,{node:e,parentPath:m,depth:n+1,pausedKeys:i,expandedPaths:s,onToggleExpand:l,onPause:u,onUnpause:d,hasAccess:f,queueNames:p},e.name))]})}function Pe({pipelineTree:e,pausedKeys:t,queueNames:n}){let{hasAccess:i}=U(),s=z.useContext(),[c,u]=(0,Y.useState)(``),[d,f]=(0,Y.useState)(()=>new Set),p=(0,Y.useMemo)(()=>new Set(t),[t]),m=(0,Y.useMemo)(()=>Ee(e,c),[e,c]),h=z.ops.pausePipeline.useMutation({onSuccess:()=>{l.create({title:`Pipeline paused`,type:`success`}),s.ops.invalidate()},onError:e=>{l.create({title:`Failed to pause`,description:e.message,type:`error`})}}),g=z.ops.unpausePipeline.useMutation({onSuccess:()=>{l.create({title:`Pipeline unpaused`,type:`success`}),s.ops.invalidate()},onError:e=>{l.create({title:`Failed to unpause`,description:e.message,type:`error`})}});function _(e){f(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function v(){let t=new Set;function n(e,r){for(let i of e){let e=r?`${r}/${i.name}`:i.name;t.add(e),n(i.children,e)}}n(e,``),f(t)}let x=n[0];function S(e){x&&h.mutate({queueName:x,key:e})}function C(e){x&&g.mutate({queueName:x,key:e})}return(0,X.jsx)(y,{children:(0,X.jsxs)(b,{padding:0,children:[(0,X.jsxs)(E,{paddingX:4,paddingY:2.5,borderBottom:`1px solid`,borderBottomColor:`border`,children:[(0,X.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,children:`Pipeline Tree`}),(0,X.jsx)(D,{}),e.length>0&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(a,{position:`relative`,width:`200px`,children:[(0,X.jsx)(a,{position:`absolute`,left:2.5,top:`50%`,transform:`translateY(-50%)`,zIndex:1,children:(0,X.jsx)(ne,{size:11,color:`var(--chakra-colors-fg-muted)`})}),(0,X.jsx)(V,{size:`xs`,placeholder:`Filter...`,value:c,onChange:e=>u(e.target.value),paddingLeft:7})]}),(0,X.jsx)(r,{variant:`ghost`,size:`2xs`,onClick:v,children:`Expand all`}),(0,X.jsx)(r,{variant:`ghost`,size:`2xs`,onClick:()=>f(new Set),children:`Collapse`})]})]}),e.length===0?(0,X.jsx)(a,{padding:4,children:(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`No pipelines discovered yet.`})}):m===null?(0,X.jsx)(a,{padding:4,children:(0,X.jsxs)(o,{textStyle:`xs`,color:`fg.muted`,children:[`No pipelines match "`,c,`"`]})}):m.map(e=>(0,X.jsx)(Ne,{node:e,parentPath:``,depth:0,pausedKeys:p,expandedPaths:d,onToggleExpand:_,onPause:S,onUnpause:C,hasAccess:i,queueNames:n},e.name))]})})}function Fe({data:e}){let t=M().data,n=t?.state===`running`,r=e.pausedKeys,i=r.length>0;return!n&&!i?null:(0,X.jsxs)(y,{overflow:`hidden`,children:[(0,X.jsx)(o,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,paddingX:4,paddingTop:3,paddingBottom:2,children:`Active Operations`}),(0,X.jsxs)(L,{align:`stretch`,gap:0,paddingX:4,paddingBottom:3,children:[n&&t&&(0,X.jsxs)(E,{gap:2,paddingY:2,borderBottom:i?`1px solid`:void 0,borderBottomColor:`border`,children:[(0,X.jsx)(j,{colorPalette:`blue`,size:`sm`,children:(0,X.jsx)(N,{})}),(0,X.jsx)(o,{textStyle:`sm`,fontWeight:`medium`,children:`Replay running`}),t.currentProjection&&(0,X.jsx)(c,{size:`sm`,variant:`subtle`,colorPalette:`blue`,children:t.currentProjection}),(0,X.jsx)(D,{}),t.runId&&(0,X.jsx)(W,{href:`/ops/projections/${t.runId}`,style:{textDecoration:`none`},children:(0,X.jsx)(o,{textStyle:`xs`,color:`blue.500`,cursor:`pointer`,children:`View progress`})})]}),i&&(0,X.jsxs)(L,{align:`stretch`,gap:1,paddingY:2,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Paused pipelines`}),(0,X.jsx)(E,{gap:2,flexWrap:`wrap`,children:r.map(e=>(0,X.jsx)(c,{size:`sm`,colorPalette:`orange`,variant:`subtle`,children:e},e))})]})]})]})}function Q({label:e,value:t,sublabel:n,href:r,color:i,testId:a,warning:s}){let c=(0,X.jsxs)(O,{cursor:r?`pointer`:void 0,_hover:r?{bg:`bg.subtle`}:void 0,borderRadius:`md`,padding:2,transition:`background 0.1s`,"data-testid":a,"data-warning":s===void 0?void 0:s?`true`:`false`,children:[(0,X.jsx)(A,{whiteSpace:`nowrap`,children:(0,X.jsxs)(E,{gap:1,children:[(0,X.jsx)(o,{children:e}),r&&(0,X.jsx)(d,{size:10})]})}),(0,X.jsx)(k,{color:i,whiteSpace:`nowrap`,children:t}),n&&(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontWeight:`normal`,whiteSpace:`nowrap`,children:n})]});return r?(0,X.jsx)(W,{href:r,style:{textDecoration:`none`},children:c}):c}var Ie=80,Le=70;function Re({data:e}){let t=e.redisMemoryMaxBytes>0?e.redisMemoryUsedBytes/e.redisMemoryMaxBytes*100:null,n=t===null?null:Math.round(t*10)/10,r=t!==null&&t>=Ie,i=e.redisEngineCpuPercent!==null&&e.redisEngineCpuPercent>=Le,a=n===null?e.redisMemoryPeakBytes>0?`peak ${me(e.redisMemoryPeakBytes)}`:void 0:`${n}% of ${me(e.redisMemoryMaxBytes)}`;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(Q,{label:`Redis mem`,value:me(e.redisMemoryUsedBytes),sublabel:a,color:r?`red.500`:void 0,testId:`redis-memory-stat`,warning:r}),(0,X.jsx)(Q,{label:`Redis CPU`,value:e.redisEngineCpuPercent===null?`-`:`${e.redisEngineCpuPercent}%`,sublabel:e.redisEngineCpuPercent===null?`sampling…`:`main-thread`,color:i?`red.500`:void 0,testId:`redis-engine-cpu-stat`,warning:i}),(0,X.jsx)(Q,{label:`Redis conns`,value:e.redisConnectedClients.toString(),sublabel:`clients`,testId:`redis-clients-stat`})]})}function ze(){let e=z.ops.getReplayHistory.useQuery(void 0,{refetchInterval:1e4}).data?.[0];return(0,X.jsxs)(y,{overflow:`hidden`,children:[(0,X.jsx)(W,{href:`/ops/projections`,style:{textDecoration:`none`},children:(0,X.jsxs)(E,{paddingX:4,paddingTop:3,paddingBottom:2,cursor:`pointer`,_hover:{color:`orange.500`},transition:`color 0.1s`,children:[(0,X.jsx)(o,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,children:`Latest Replay`}),(0,X.jsx)(d,{size:10})]})}),(0,X.jsx)(a,{paddingX:4,paddingBottom:4,children:e?(0,X.jsx)(W,{href:`/ops/projections/${e.runId}`,style:{textDecoration:`none`},children:(0,X.jsxs)(E,{gap:3,cursor:`pointer`,_hover:{opacity:.8},transition:`opacity 0.1s`,children:[(0,X.jsx)(c,{size:`sm`,variant:`subtle`,colorPalette:P(e.state),children:e.state}),(0,X.jsx)(o,{textStyle:`xs`,truncate:!0,maxWidth:`240px`,children:e.description||`—`}),(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:pe(e.startedAt,e.completedAt)}),(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,whiteSpace:`nowrap`,children:e.completedAt?new Date(e.completedAt).toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):`—`})]})}):(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`No replay history`})})]})}var $={staged:{stroke:`#06b6d4`,fill:`#06b6d4`},completed:{stroke:`#22c55e`,fill:`#22c55e`},failed:{stroke:`#ef4444`,fill:`#ef4444`},pending:`#a78bfa`,blocked:`#f97316`,parked:`#eab308`},Be=[{label:`2s`,ms:0},{label:`5s`,ms:5e3},{label:`15s`,ms:15e3},{label:`30s`,ms:3e4},{label:`1m`,ms:6e4}];function Ve(e,t){if(e.length===0)return[];if(t<=0)return e.map(e=>({timestamp:e.timestamp,staged:e.ingestedPerSec,completed:e.completedPerSec,failed:e.failedPerSec,pending:e.pendingCount,blocked:e.blockedCount,parked:e.parkedCount}));let n=new Map;for(let r of e){let e=Math.floor(r.timestamp/t)*t,i=n.get(e);i?(i.sum.staged+=r.ingestedPerSec,i.sum.completed+=r.completedPerSec,i.sum.failed+=r.failedPerSec,i.sum.pending+=r.pendingCount,i.sum.blocked+=r.blockedCount,i.sum.parked+=r.parkedCount,i.count++):n.set(e,{sum:{timestamp:e,staged:r.ingestedPerSec,completed:r.completedPerSec,failed:r.failedPerSec,pending:r.pendingCount,blocked:r.blockedCount,parked:r.parkedCount},count:1})}let r=[];for(let[,{sum:e,count:t}]of n)r.push({timestamp:e.timestamp,staged:e.staged/t,completed:e.completed/t,failed:e.failed/t,pending:Math.round(e.pending/t),blocked:Math.round(e.blocked/t),parked:Math.round(e.parked/t)});return r.sort((e,t)=>e.timestamp-t.timestamp),r}function He(e){return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`})}function Ue(e){return new Date(e).toLocaleTimeString([],{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function We(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:e===0?`0`:Number.isInteger(e)?e.toString():e.toFixed(1)}function Ge(e){if(e.length<2)return[];let t=e[0].timestamp,n=e[e.length-1].timestamp,r=n-t,i=6e4;r>20*6e4?i=5*6e4:r>10*6e4&&(i=2*6e4);let a=Math.ceil(t/i)*i,o=[];for(let e=a;e<=n;e+=i)o.push(e);return o}function Ke(e){if(e<=0)return 1;let t=10**Math.floor(Math.log10(e)),n=e/t,r;return r=n<=1?1:n<=2?2:n<=5?5:10,r*t}function qe({active:e,payload:t,label:n}){if(!e||!t?.length||n==null)return null;let r=t.filter(e=>e.name!==`Pending`&&e.name!==`Blocked`&&e.name!==`Parked`),i=t.filter(e=>e.name===`Pending`||e.name===`Blocked`||e.name===`Parked`);return(0,X.jsxs)(a,{bg:`bg.panel`,borderWidth:`1px`,borderColor:`border`,borderRadius:`md`,padding:2,shadow:`md`,minWidth:`140px`,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:Ue(n)}),r.map(e=>(0,X.jsxs)(E,{justify:`space-between`,gap:3,children:[(0,X.jsxs)(E,{gap:1.5,children:[(0,X.jsx)(a,{width:`6px`,height:`6px`,borderRadius:`full`,bg:e.color}),(0,X.jsx)(o,{textStyle:`xs`,children:e.name})]}),(0,X.jsxs)(o,{textStyle:`xs`,fontFamily:`mono`,fontWeight:`medium`,children:[e.value.toFixed(1),`/s`]})]},e.name)),i.length>0&&i.some(e=>e.value>0)&&(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(a,{height:`1px`,bg:`border`,marginY:1}),i.map(e=>(0,X.jsxs)(E,{justify:`space-between`,gap:3,children:[(0,X.jsxs)(E,{gap:1.5,children:[(0,X.jsx)(a,{width:`6px`,height:`2px`,bg:e.color}),(0,X.jsx)(o,{textStyle:`xs`,children:e.name})]}),(0,X.jsx)(o,{textStyle:`xs`,fontFamily:`mono`,children:e.value.toLocaleString()})]},e.name))]})]})}function Je({showCounts:e}){return(0,X.jsx)(E,{gap:3,justify:`center`,paddingTop:2,children:[{name:`Staged/s`,color:$.staged.stroke,type:`area`},{name:`Completed/s`,color:$.completed.stroke,type:`area`},{name:`Failed/s`,color:$.failed.stroke,type:`area`},...e?[{name:`Pending`,color:$.pending,type:`line`},{name:`Blocked`,color:$.blocked,type:`line`},{name:`Parked`,color:$.parked,type:`line`}]:[]].map(e=>(0,X.jsxs)(E,{gap:1,children:[e.type===`area`?(0,X.jsx)(a,{width:`6px`,height:`6px`,borderRadius:`full`,bg:e.color}):(0,X.jsx)(a,{width:`10px`,height:`2px`,bg:e.color,borderRadius:`full`,opacity:.7}),(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:e.name})]},e.name))})}function Ye({data:e}){let t=(0,Y.useRef)(1),[i,a]=(0,Y.useState)(5e3),s=(0,Y.useMemo)(()=>Ve(e.throughputHistory,i),[e.throughputHistory,i]),c=(0,Y.useMemo)(()=>Ge(s),[s]),l=(0,Y.useMemo)(()=>{if(s.length===0)return 1;let e=0;for(let t of s)e=Math.max(e,t.staged,t.completed,t.failed);let n=Ke(e*1.3);return(n>t.current*1.2||n<t.current*.5)&&(t.current=n),t.current},[s]),u=(0,Y.useMemo)(()=>s.some(e=>e.pending>0||e.blocked>0||e.parked>0),[s]),d=(0,Y.useMemo)(()=>{if(!u)return 10;let e=0;for(let t of s)e=Math.max(e,t.pending,t.blocked,t.parked);return e<=0?10:Ke(e*1.3)},[s,u]);return s.length<2?(0,X.jsx)(H,{height:`280px`,children:(0,X.jsxs)(L,{gap:2,children:[(0,X.jsx)(n,{size:`sm`}),(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:`Collecting data...`})]})}):(0,X.jsxs)(L,{align:`stretch`,gap:0,children:[(0,X.jsxs)(E,{justify:`space-between`,paddingX:1,paddingBottom:1,children:[(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontStyle:`italic`,children:`events/s`}),(0,X.jsx)(E,{gap:.5,children:Be.map(e=>(0,X.jsx)(r,{size:`2xs`,variant:i===e.ms?`subtle`:`ghost`,colorPalette:i===e.ms?`orange`:`gray`,onClick:()=>a(e.ms),fontFamily:`mono`,minWidth:`auto`,paddingX:1.5,children:e.label},e.ms))}),u&&(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,fontStyle:`italic`,children:`count`})]}),(0,X.jsx)(oe,{width:`100%`,height:280,children:(0,X.jsxs)(ue,{data:s,margin:{top:8,right:u?4:12,bottom:4,left:-8},children:[(0,X.jsxs)(`defs`,{children:[(0,X.jsxs)(`linearGradient`,{id:`gradStaged`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,X.jsx)(`stop`,{offset:`0%`,stopColor:$.staged.fill,stopOpacity:.2}),(0,X.jsx)(`stop`,{offset:`100%`,stopColor:$.staged.fill,stopOpacity:.02})]}),(0,X.jsxs)(`linearGradient`,{id:`gradCompleted`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,X.jsx)(`stop`,{offset:`0%`,stopColor:$.completed.fill,stopOpacity:.2}),(0,X.jsx)(`stop`,{offset:`100%`,stopColor:$.completed.fill,stopOpacity:.02})]}),(0,X.jsxs)(`linearGradient`,{id:`gradFailed`,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,X.jsx)(`stop`,{offset:`0%`,stopColor:$.failed.fill,stopOpacity:.25}),(0,X.jsx)(`stop`,{offset:`100%`,stopColor:$.failed.fill,stopOpacity:.02})]})]}),(0,X.jsx)(ae,{strokeDasharray:`3 3`,stroke:`var(--chakra-colors-border)`,strokeOpacity:.4,vertical:!1}),(0,X.jsx)(ie,{dataKey:`timestamp`,type:`number`,domain:[`dataMin`,`dataMax`],scale:`time`,ticks:c,tickFormatter:He,tick:{fontSize:10,fill:`var(--chakra-colors-fg-muted)`},axisLine:!1,tickLine:!1}),(0,X.jsx)(se,{yAxisId:`rate`,tick:{fontSize:10,fill:`var(--chakra-colors-fg-muted)`},axisLine:!1,tickLine:!1,width:40,domain:[0,l],allowDataOverflow:!0,tickFormatter:We}),u&&(0,X.jsx)(se,{yAxisId:`count`,orientation:`right`,tick:{fontSize:10,fill:`var(--chakra-colors-fg-muted)`},axisLine:!1,tickLine:!1,width:40,domain:[0,d],allowDataOverflow:!0,tickFormatter:We}),(0,X.jsx)(re,{content:(0,X.jsx)(qe,{}),cursor:{stroke:`var(--chakra-colors-fg-muted)`,strokeWidth:1,strokeDasharray:`3 3`,strokeOpacity:.3}}),(0,X.jsx)(le,{yAxisId:`rate`,type:`monotone`,dataKey:`staged`,stroke:$.staged.stroke,fill:`url(#gradStaged)`,strokeWidth:1.5,name:`Staged/s`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:0}}),(0,X.jsx)(le,{yAxisId:`rate`,type:`monotone`,dataKey:`completed`,stroke:$.completed.stroke,fill:`url(#gradCompleted)`,strokeWidth:1.5,name:`Completed/s`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:0}}),(0,X.jsx)(le,{yAxisId:`rate`,type:`monotone`,dataKey:`failed`,stroke:$.failed.stroke,fill:`url(#gradFailed)`,strokeWidth:1.5,name:`Failed/s`,isAnimationActive:!1,dot:!1,activeDot:{r:3,strokeWidth:0}}),(0,X.jsx)(ce,{yAxisId:u?`count`:`rate`,type:`monotone`,dataKey:`pending`,stroke:$.pending,strokeWidth:1,strokeOpacity:.6,strokeDasharray:`4 3`,dot:!1,activeDot:{r:2,strokeWidth:0},name:`Pending`,isAnimationActive:!1}),(0,X.jsx)(ce,{yAxisId:u?`count`:`rate`,type:`monotone`,dataKey:`blocked`,stroke:$.blocked,strokeWidth:1,strokeOpacity:.6,strokeDasharray:`4 3`,dot:!1,activeDot:{r:2,strokeWidth:0},name:`Blocked`,isAnimationActive:!1}),(0,X.jsx)(ce,{yAxisId:u?`count`:`rate`,type:`monotone`,dataKey:`parked`,stroke:$.parked,strokeWidth:1,strokeOpacity:.6,strokeDasharray:`4 3`,dot:!1,activeDot:{r:2,strokeWidth:0},name:`Parked`,isAnimationActive:!1})]})}),(0,X.jsx)(Je,{showCounts:u})]})}function Xe({data:e}){let t=e.queues.reduce((e,t)=>e+t.blockedGroupCount,0),n=e.queues.reduce((e,t)=>e+t.parkedGroupCount,0),r=e.queues.reduce((e,t)=>e+t.dlqCount,0),i=z.ops.listQueues.useQuery(void 0,{refetchInterval:1e4}),c=(0,Y.useMemo)(()=>(i.data??[]).map(e=>e.name),[i.data]);return(0,X.jsxs)(L,{align:`stretch`,gap:5,width:`full`,children:[(0,X.jsx)(Fe,{data:e}),(0,X.jsxs)(s,{columns:{base:2,md:5,lg:10},gap:1,children:[(0,X.jsx)(Q,{label:`Staged/s`,value:K(e.throughputIngestedPerSec),sublabel:`peak ${K(e.peakIngestedPerSec)}`}),(0,X.jsx)(Q,{label:`Completed/s`,value:K(e.completedPerSec),sublabel:`peak ${K(e.peakCompletedPerSec)} · ${de(e.totalCompleted)} total`}),(0,X.jsx)(Q,{label:`Failed/s`,value:K(e.failedPerSec),sublabel:e.totalFailed>0?`${de(e.totalFailed)} total`:void 0,color:e.failedPerSec>0?`red.500`:void 0}),(0,X.jsx)(Q,{label:`Blocked`,value:t.toString(),sublabel:`${e.totalGroups} groups`,color:t>0?`red.500`:void 0}),(0,X.jsx)(Q,{label:`Parked`,value:n.toString(),sublabel:`over cap`,color:n>0?`orange.500`:void 0}),(0,X.jsx)(Q,{label:`P50`,value:q(e.latencyP50Ms),sublabel:`peak ${q(e.peakLatencyP50Ms)}`}),(0,X.jsx)(Q,{label:`P99`,value:q(e.latencyP99Ms),sublabel:`peak ${q(e.peakLatencyP99Ms)}`}),(0,X.jsx)(Q,{label:`DLQ`,value:r.toString(),color:r>0?`orange.500`:void 0}),(0,X.jsx)(Re,{data:e})]}),(0,X.jsx)(y,{overflow:`hidden`,children:(0,X.jsxs)(b,{padding:4,children:[(0,X.jsx)(o,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,marginBottom:2,children:`Throughput`}),(0,X.jsx)(Ye,{data:e})]})}),(0,X.jsx)(Pe,{pipelineTree:e.pipelineTree,pausedKeys:e.pausedKeys,queueNames:c}),(0,X.jsxs)(y,{overflow:`hidden`,children:[(0,X.jsx)(E,{paddingX:4,paddingTop:3,paddingBottom:2,children:(0,X.jsx)(o,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,children:`Top Errors`})}),e.topErrors.length>0?(0,X.jsx)(_,{children:(0,X.jsxs)(u,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,X.jsx)(f,{children:(0,X.jsxs)(g,{children:[(0,X.jsx)(h,{width:`60px`,children:`Count`}),(0,X.jsx)(h,{children:`Error`}),(0,X.jsx)(h,{children:`Pipeline`})]})}),(0,X.jsx)(m,{children:e.topErrors.slice(0,5).map(e=>(0,X.jsxs)(g,{children:[(0,X.jsx)(p,{children:(0,X.jsx)(o,{color:`red.500`,fontWeight:`medium`,children:e.count})}),(0,X.jsx)(p,{children:(0,X.jsx)(o,{truncate:!0,maxWidth:`400px`,children:e.sampleMessage})}),(0,X.jsx)(p,{color:`fg.muted`,children:e.pipelineName??`—`})]},`${e.queueName}::${e.normalizedMessage}`))})]})}):(0,X.jsx)(a,{paddingX:4,paddingBottom:4,children:(0,X.jsx)(o,{textStyle:`xs`,color:`fg.muted`,children:t>0?`0 errors`:`No errors`})})]}),(0,X.jsx)(ge,{}),(0,X.jsx)(be,{queueNames:c}),(0,X.jsx)(Ce,{queueNames:c}),(0,X.jsx)(Me,{queueNames:c}),(0,X.jsx)(ze,{})]})}var Ze={connected:`green`,connecting:`orange`,disconnected:`red`},Qe={connected:`Live`,connecting:`Connecting`,disconnected:`Disconnected`};function $e({status:e}){return(0,X.jsxs)(j,{size:`sm`,colorPalette:Ze[e],children:[(0,X.jsx)(N,{}),Qe[e]]})}function et(){let[e,t]=(0,Y.useState)(null),[n,r]=(0,Y.useState)(`connecting`);return z.ops.dashboardStream.useSubscription(void 0,{onStarted:()=>r(`connecting`),onData:e=>{t(e),r(`connected`)},onError:()=>r(`disconnected`)}),{data:e,status:n}}function tt(){let{data:e,status:t}=et(),r=z.ops.getDashboardSnapshot.useQuery(void 0,{enabled:!e,refetchInterval:e?!1:5e3}),i=e??r.data??null;return(0,X.jsx)(he,{children:(0,X.jsxs)(R,{children:[(0,X.jsxs)(v.Header,{children:[(0,X.jsx)(v.Heading,{children:`Ops Dashboard`}),(0,X.jsx)(D,{}),(0,X.jsx)($e,{status:t})]}),(0,X.jsx)(v.Container,{children:i?(0,X.jsx)(Xe,{data:i}):(0,X.jsx)(H,{paddingY:20,children:(0,X.jsx)(S,{children:(0,X.jsxs)(T,{children:[(0,X.jsx)(w,{children:(0,X.jsx)(n,{size:`lg`})}),(0,X.jsx)(x,{children:`Loading metrics`}),(0,X.jsx)(C,{children:`Waiting for the first collection cycle...`})]})})})})]})})}export{tt as default};
2
- //# sourceMappingURL=ops-BDrWqQb1.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{An as o,cn as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./toaster-CRP22oRW.js";import{$ as l,I as u,Q as d,X as f,Y as p,Z as m,et as h,nt as g}from"./ExternalImage-DbtOSrKl.js";import{a as _,n as v,r as y}from"./field-Dz4Xmo3X.js";import{t as b}from"./h-stack-CMPhqSp5.js";import{n as x,r as S,t as C}from"./native-select-Bj4m9rSh.js";import{t as w}from"./spacer-CbmCSsJg.js";import{it as T}from"./immer-tl_oI9yy.js";import{t as E}from"./v-stack-ClAMS101.js";import{r as D}from"./next-router-Bn5Y8Iek.js";import{Ar as O,En as k,ni as A,nr as j}from"./index-CUhcyBp3.js";import{n as M}from"./index.module-CJLn6vye.js";import{t as N}from"./switch-vUOdjiD1.js";import{a as P,i as F,n as I,r as L,t as R}from"./_shell-JRkk6wPs.js";import{n as z,r as B}from"./useAdminResource-DCHLEJ-V.js";var V=k(),H=e(t()),U=r(),W=25;function G(){let e=D(),t=(0,H.useRef)(typeof e.query.q==`string`?e.query.q:``),[n,r]=(0,H.useState)(1),[s,c]=(0,H.useState)(t.current),[g]=M(s,300),[_,v]=(0,H.useState)(null),y=z(`organization`,{pagination:{page:n,perPage:W},sort:{field:`createdAt`,order:`DESC`},filter:g?{query:g}:{}});return(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(I,{title:`Organizations`,searchValue:s,onSearchChange:e=>{c(e),r(1)},searchPlaceholder:`Search by ID, name, or slug`,isLoading:y.isLoading,isFetching:y.isFetching,error:y.error,pagination:{page:n,perPage:W,total:y.data?.total??0,onPageChange:r},children:(0,U.jsxs)(l,{variant:`line`,size:`md`,width:`full`,children:[(0,U.jsx)(d,{children:(0,U.jsxs)(h,{children:[(0,U.jsx)(m,{children:`ID`}),(0,U.jsx)(m,{children:`Name`}),(0,U.jsx)(m,{children:`Slug`}),(0,U.jsx)(m,{children:`Plan model`}),(0,U.jsx)(m,{children:`Currency`}),(0,U.jsx)(m,{children:`SSO domain`}),(0,U.jsx)(m,{children:`Created`}),(0,U.jsx)(m,{width:`60px`,textAlign:`right`})]})}),(0,U.jsxs)(p,{children:[y.data?.data.length===0&&(0,U.jsx)(h,{children:(0,U.jsx)(f,{colSpan:8,children:(0,U.jsx)(a,{color:`fg.muted`,textAlign:`center`,paddingY:6,children:`No organizations match your search.`})})}),y.data?.data.map(e=>(0,U.jsxs)(h,{children:[(0,U.jsx)(f,{fontSize:`xs`,color:`fg.muted`,children:e.id}),(0,U.jsx)(f,{children:e.name}),(0,U.jsx)(f,{children:e.slug}),(0,U.jsx)(f,{children:e.pricingModel}),(0,U.jsx)(f,{children:e.currency}),(0,U.jsx)(f,{children:e.ssoDomain??(0,U.jsx)(L,{})}),(0,U.jsx)(f,{children:P(e.createdAt)}),(0,U.jsx)(f,{textAlign:`right`,children:(0,U.jsx)(i,{width:`full`,height:`full`,display:`flex`,justifyContent:`end`,children:(0,U.jsxs)(u.Root,{children:[(0,U.jsx)(u.Trigger,{children:(0,U.jsx)(o,{size:16})}),(0,U.jsx)(u.Content,{children:(0,U.jsxs)(u.Item,{value:`edit`,onClick:()=>v(e),children:[(0,U.jsx)(j,{size:16}),`Edit`]})})]})})})]},e.id))]})]})}),(0,U.jsx)(Y,{organization:_,onClose:()=>v(null)})]})}function K(e){if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,10)}function q(e){if(e===``)return null;let t=Number(e);return Number.isFinite(t)?t:null}function J(e){return e.trim()===``?null:e}function Y({organization:e,onClose:t}){let r=B(`organization`),[i,o]=(0,H.useState)(null);(0,H.useEffect)(()=>{e&&o({name:e.name??``,slug:e.slug??``,phoneNumber:e.phoneNumber??``,ssoDomain:e.ssoDomain??``,ssoProvider:e.ssoProvider??``,usageSpendingMaxLimit:e.usageSpendingMaxLimit?.toString()??``,signedDPA:!!e.signedDPA,promoCode:e.promoCode??``,stripeCustomerId:e.stripeCustomerId??``,currency:e.currency,pricingModel:e.pricingModel,license:e.license??``,licenseExpiresAt:K(e.licenseExpiresAt),useCustomS3:!!e.useCustomS3,s3Endpoint:``,s3AccessKeyId:``,s3SecretAccessKey:``,s3Bucket:``})},[e]);let l=(e,t)=>o(n=>n&&{...n,[e]:t});return(0,U.jsx)(s.Root,{open:!!e,onOpenChange:({open:e})=>{e||t()},size:`md`,children:(0,U.jsxs)(s.Content,{children:[(0,U.jsx)(s.Header,{children:(0,U.jsx)(s.Title,{children:`Edit Organization`})}),(0,U.jsx)(s.CloseTrigger,{}),(0,U.jsx)(s.Body,{children:e&&i&&(0,U.jsxs)(E,{gap:4,align:`stretch`,children:[(0,U.jsx)(X,{children:`Identity`}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Name`}),(0,U.jsx)(O,{value:i.name,onChange:e=>l(`name`,e.target.value)})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Slug`}),(0,U.jsx)(O,{value:i.slug,onChange:e=>l(`slug`,e.target.value)}),(0,U.jsx)(v,{children:`URL-safe identifier. Changing this can break existing links.`})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Phone number`}),(0,U.jsx)(O,{type:`tel`,value:i.phoneNumber,onChange:e=>l(`phoneNumber`,e.target.value)})]}),(0,U.jsx)(X,{children:`Billing`}),(0,U.jsxs)(b,{gap:3,align:`start`,children:[(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Currency`}),(0,U.jsx)(Z,{value:i.currency,options:Object.values(V.Currency),onChange:e=>l(`currency`,e)})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Pricing model`}),(0,U.jsx)(Z,{value:i.pricingModel,options:Object.values(V.PricingModel),onChange:e=>l(`pricingModel`,e)})]})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Stripe customer ID`}),(0,U.jsx)(O,{value:i.stripeCustomerId,onChange:e=>l(`stripeCustomerId`,e.target.value)})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Promo code`}),(0,U.jsx)(O,{value:i.promoCode,onChange:e=>l(`promoCode`,e.target.value)})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Usage spending max limit`}),(0,U.jsx)(O,{type:`number`,value:i.usageSpendingMaxLimit,onChange:e=>l(`usageSpendingMaxLimit`,e.target.value),placeholder:`Leave empty for no cap`})]}),(0,U.jsx)(Q,{label:`Signed DPA`,hint:`Enterprise data processing agreement on file.`,checked:i.signedDPA,onChange:e=>l(`signedDPA`,e)}),(0,U.jsx)(X,{children:`Authentication`}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`SSO domain`}),(0,U.jsx)(O,{value:i.ssoDomain,onChange:e=>l(`ssoDomain`,e.target.value),placeholder:`e.g. acme.com`}),(0,U.jsx)(v,{children:`Lowercased server-side. Users with this email domain can sign in via SSO.`})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`SSO provider`}),(0,U.jsx)(O,{value:i.ssoProvider,onChange:e=>l(`ssoProvider`,e.target.value)})]}),(0,U.jsx)(X,{children:`License`}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`License key`}),(0,U.jsx)(T,{rows:4,value:i.license,onChange:e=>l(`license`,e.target.value),fontFamily:`mono`,fontSize:`xs`})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`License expires at`}),(0,U.jsx)(O,{type:`date`,value:i.licenseExpiresAt,onChange:e=>l(`licenseExpiresAt`,e.target.value)})]}),(0,U.jsx)(X,{children:`Custom S3`}),(0,U.jsx)(a,{fontSize:`xs`,color:`fg.muted`,children:`Credentials below are write-only — the server never reads them back. Leave blank to keep the stored value; type to replace.`}),(0,U.jsx)(Q,{label:`Use custom S3`,hint:`Store large blobs (datasets, uploads) in the tenant's own bucket.`,checked:i.useCustomS3,onChange:e=>l(`useCustomS3`,e)}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Endpoint`}),(0,U.jsx)(O,{type:`url`,value:i.s3Endpoint,onChange:e=>l(`s3Endpoint`,e.target.value),placeholder:`Leave blank to keep current`,disabled:!i.useCustomS3})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Bucket`}),(0,U.jsx)(O,{value:i.s3Bucket,onChange:e=>l(`s3Bucket`,e.target.value),placeholder:`Leave blank to keep current`,disabled:!i.useCustomS3})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Access key ID`}),(0,U.jsx)(O,{type:`password`,value:i.s3AccessKeyId,onChange:e=>l(`s3AccessKeyId`,e.target.value),placeholder:`Leave blank to keep current`,disabled:!i.useCustomS3,autoComplete:`new-password`})]}),(0,U.jsxs)(_,{children:[(0,U.jsx)(y,{children:`Secret access key`}),(0,U.jsx)(O,{type:`password`,value:i.s3SecretAccessKey,onChange:e=>l(`s3SecretAccessKey`,e.target.value),placeholder:`Leave blank to keep current`,autoComplete:`new-password`,disabled:!i.useCustomS3})]}),(0,U.jsx)(g,{my:2}),(0,U.jsxs)(E,{align:`start`,gap:0,children:[(0,U.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`Organization ID: `,e.id]}),(0,U.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`Created: `,P(e.createdAt)]})]})]})}),(0,U.jsx)(s.Footer,{children:(0,U.jsxs)(b,{width:`full`,children:[(0,U.jsx)(w,{}),(0,U.jsx)(n,{variant:`ghost`,onClick:t,children:`Cancel`}),(0,U.jsx)(n,{loading:r.isPending,onClick:()=>{if(!e||!i)return;let n={};i.name!==e.name&&(n.name=i.name),i.slug!==e.slug&&(n.slug=i.slug),i.phoneNumber!==(e.phoneNumber??``)&&(n.phoneNumber=J(i.phoneNumber)),i.ssoDomain!==(e.ssoDomain??``)&&(n.ssoDomain=J(i.ssoDomain)),i.ssoProvider!==(e.ssoProvider??``)&&(n.ssoProvider=J(i.ssoProvider));let a=q(i.usageSpendingMaxLimit);a!==e.usageSpendingMaxLimit&&(n.usageSpendingMaxLimit=a),i.signedDPA!==!!e.signedDPA&&(n.signedDPA=i.signedDPA),i.promoCode!==(e.promoCode??``)&&(n.promoCode=J(i.promoCode)),i.stripeCustomerId!==(e.stripeCustomerId??``)&&(n.stripeCustomerId=J(i.stripeCustomerId)),i.currency!==e.currency&&(n.currency=i.currency),i.pricingModel!==e.pricingModel&&(n.pricingModel=i.pricingModel),i.license!==(e.license??``)&&(n.license=J(i.license));let o=F(i.licenseExpiresAt);if(o!==e.licenseExpiresAt&&(n.licenseExpiresAt=o),i.useCustomS3!==!!e.useCustomS3&&(n.useCustomS3=i.useCustomS3),i.s3Endpoint.trim()!==``&&(n.s3Endpoint=i.s3Endpoint),i.s3AccessKeyId.trim()!==``&&(n.s3AccessKeyId=i.s3AccessKeyId),i.s3SecretAccessKey.trim()!==``&&(n.s3SecretAccessKey=i.s3SecretAccessKey),i.s3Bucket.trim()!==``&&(n.s3Bucket=i.s3Bucket),Object.keys(n).length===0){t();return}r.mutate({id:e.id,data:n},{onSuccess:()=>{c.create({title:`Organization updated`,type:`success`,duration:3e3,meta:{closable:!0}}),t()},onError:e=>c.create({title:`Update failed`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})})},children:`Save`})]})})]})})}function X({children:e}){return(0,U.jsx)(A,{as:`h3`,size:`xs`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,pt:2,children:e})}function Z({value:e,options:t,onChange:n}){return(0,U.jsxs)(S,{size:`sm`,width:`full`,children:[(0,U.jsx)(C,{value:e,onChange:e=>n(e.target.value),children:t.map(e=>(0,U.jsx)(`option`,{value:e,children:e},e))}),(0,U.jsx)(x,{})]})}function Q({label:e,hint:t,checked:n,onChange:r}){return(0,U.jsx)(_,{children:(0,U.jsxs)(b,{width:`full`,children:[(0,U.jsxs)(E,{align:`start`,gap:0,children:[(0,U.jsx)(y,{children:e}),t&&(0,U.jsx)(a,{fontSize:`xs`,color:`fg.muted`,children:t})]}),(0,U.jsx)(w,{}),(0,U.jsx)(N,{checked:n,onCheckedChange:e=>r(e.checked)})]})})}function $(){return(0,U.jsx)(R,{children:(0,U.jsx)(G,{})})}export{$ as default};
2
- //# sourceMappingURL=organizations-I7_fQcGq.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{t as n}from"./jsx-runtime-CFwixLRt.js";import{r}from"./next-router-Bn5Y8Iek.js";import{n as i}from"./api-BK6L1im2.js";import{Rt as a,kn as o}from"./index-CUhcyBp3.js";import{t as s}from"./LoadingScreen-D0JSh0Q2.js";var c=e(t());function l({resolverDestination:e,isOverride:t,intentPinned:n,governanceUiEnabled:r,lastVisitedHomeKind:i,lastProjectSlug:a}){return t?e:n?e===`/me`?e:i===`project`&&a?`/${a}`:e:r&&i===`personal`&&e!==`/me`?`/me`:i===`project`&&a?`/${a}`:e}var u=n();function d(){let{project:e,organization:t,organizations:n,isLoading:d}=a({redirectToOnboarding:!1}),f=r(),p=i.governance.resolveHome.useQuery({organizationId:t?.id??``},{enabled:!!t?.id,staleTime:6e4,retry:!1}),[m]=o(`lastVisitedHomeKind`,``);return(0,c.useEffect)(()=>{if(p.data?.destination){f.replace(l({resolverDestination:p.data.destination,isOverride:p.data.isOverride,intentPinned:p.data.intentPinned,governanceUiEnabled:p.data.governanceUiEnabled,lastVisitedHomeKind:m,lastProjectSlug:e&&!e.isPersonal?e.slug:null}));return}if(p.isError&&e){f.replace(`/${e.slug}`);return}!d&&!t&&(n?.length??0)===0&&f.replace(`/onboarding/welcome`)},[p.data,p.isError,e,t,n,d,f,m]),(0,u.jsx)(s,{})}export{d as default};
2
- //# sourceMappingURL=pages-BowufdCe.js.map
@@ -1,2 +0,0 @@
1
- import{_n as e,bn as t,gn as n,in as r,wn as i,xn as a}from"./index-CUhcyBp3.js";import{a as o,l as s,o as c,u as l}from"./types-DV4H6wK9.js";var u=e({runId:a().optional(),versionId:a().optional(),targetOutputs:t(r(i())),targetMetadata:t(r(l.nullish())),evaluatorResults:t(t(r(i()))),errors:t(r(a().nullish()))}),d=e({experimentId:a().optional(),experimentSlug:a().optional(),name:a(),datasets:r(o),activeDatasetId:a(),evaluators:r(c),targets:r(s),results:u.optional(),hiddenColumns:r(a()).optional(),concurrency:n().min(1).max(24).optional()}),f=e=>{if(Object.keys(e.targetOutputs).length>0||Object.keys(e.targetMetadata).length>0||Object.keys(e.evaluatorResults).length>0||Object.keys(e.errors).length>0)return{runId:e.runId,versionId:e.versionId,targetOutputs:e.targetOutputs,targetMetadata:e.targetMetadata,evaluatorResults:e.evaluatorResults,errors:e.errors}},p=e=>{let{ui:t,results:n,datasets:r}=e,i=f(n),a=r.map(e=>{if(e.type===`saved`){let{savedRecords:t,...n}=e;return n}return e});return d.parse({experimentId:e.experimentId,experimentSlug:e.experimentSlug,name:e.name,datasets:a,activeDatasetId:e.activeDatasetId,evaluators:e.evaluators,targets:e.targets,results:i,hiddenColumns:Array.from(t.hiddenColumns),concurrency:t.concurrency})};export{p as t};
2
- //# sourceMappingURL=persistence-ChzYQRy2.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{Nn as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c,t as l}from"./info-CtYT35g4.js";import{n as u}from"./external-link-BzETHrAG.js";import{r as d,t as f}from"./card-54_vstoB.js";import{T as p}from"./fetchSSE-DWKCnoHV.js";import{t as m}from"./h-stack-CMPhqSp5.js";import{t as h}from"./v-stack-ClAMS101.js";import{t as g}from"./createLucideIcon-WbxVGt4j.js";import{S as _,k as v}from"./DashboardLayout-RHGL-98_.js";import{t as y}from"./arrow-left-BWMkb3Ih.js";import{n as b}from"./api-BK6L1im2.js";import{En as x,Rt as S,hr as C,ni as w,t as T}from"./index-CUhcyBp3.js";import{t as E}from"./WithPermissionGuard-BP1dFkpM.js";import{t as D}from"./SettingsLayout-CYtjUobV.js";import{i as O,l as k,n as A,o as j,s as M,t as N}from"./billing-plans-CXxmUM3Y.js";var P=g(`euro`,[[`path`,{d:`M4 10h12`,key:`1y6xl8`}],[`path`,{d:`M4 14h9`,key:`1loblj`}],[`path`,{d:`M19 6a7.7 7.7 0 0 0-5.2-2A7.9 7.9 0 0 0 6 12c0 4.4 3.5 8 7.8 8 2 0 3.8-.8 5.2-2`,key:`1j6lzo`}]]),F=e(t()),I=x();function L(e){if(!e)return null;let t=e.type?.toUpperCase();return e.free||t===`FREE`?`free`:t===`GROWTH`||t&&_(t)?`growth`:t===`ENTERPRISE`?`enterprise`:null}var R=i(),z=e=>[{id:`free`,name:`Free`,subtitle:`For teams getting started`,actionLabel:`Get Started`,actionHref:`/settings/subscription`,actionColor:`blue`,features:A},{id:`growth`,name:`Growth`,subtitle:`Seat and usage pricing for growing teams`,actionLabel:`Get Started`,actionHref:`/settings/subscription`,actionColor:`orange`,features:j(e)},{id:`enterprise`,name:`Enterprise`,subtitle:`Regulated and high-volume deployments`,actionLabel:`Contact Sales`,actionHref:v,actionColor:`blue`,features:N}];function B(e,t,n){if(e===`free`)return`${O[t]}0 per user/month`;if(e===`growth`){let e=k();return`${M({cents:n===`annual`?Math.round(e[t].annual/12):e[t].monthly,currency:t})} per seat/month`}return`Custom pricing`}function V({plan:e,currentPlan:t}){return e.id===`free`?null:e.id===`growth`?t===`growth`?(0,R.jsx)(h,{width:`full`,gap:2,children:(0,R.jsx)(r,{asChild:!0,width:`full`,color:`bg.emphasized`,backgroundColor:`orange.600`,variant:`solid`,children:(0,R.jsx)(T,{href:`/settings/members`,children:`Add Members`})})}):(0,R.jsx)(r,{asChild:!0,width:`full`,colorPalette:`orange`,variant:`solid`,children:(0,R.jsx)(T,{color:`white`,href:`/settings/subscription`,children:`Upgrade Now`})}):e.id===`enterprise`&&t!==`enterprise`?(0,R.jsx)(r,{asChild:!0,width:`full`,colorPalette:`muted`,variant:`outline`,children:(0,R.jsx)(T,{href:v,isExternal:!0,children:`Contact Sales`})}):null}function H({plan:e,isCurrent:t,currentPlan:n,currency:r,billingPeriod:i}){return(0,R.jsx)(d,{"data-testid":`plan-column-${e.id}`,borderWidth:1,borderColor:`border.emphasized`,bg:`bg.panel`,borderRadius:`2xl`,height:`full`,transition:`all 0.2s ease-in-out`,_hover:{transform:`scale(1.02)`,boxShadow:`lg`},children:(0,R.jsx)(f,{paddingY:6,paddingX:6,children:(0,R.jsxs)(h,{align:`stretch`,gap:5,height:`full`,children:[(0,R.jsxs)(h,{align:`start`,gap:1,children:[(0,R.jsxs)(m,{gap:2,children:[(0,R.jsx)(w,{as:`h2`,size:`xl`,children:e.name}),t&&(0,R.jsx)(c,{colorPalette:`green`,variant:`surface`,size:`lg`,children:`Current`})]}),(0,R.jsx)(o,{color:`fg`,fontSize:`md`,fontWeight:`medium`,children:B(e.id,r,i)}),(0,R.jsx)(o,{color:`fg.muted`,fontSize:`sm`,children:e.subtitle})]}),(0,R.jsx)(h,{align:`start`,gap:2,flex:1,children:e.features.map(e=>(0,R.jsxs)(m,{align:`start`,gap:2,children:[(0,R.jsx)(u,{size:14,style:{marginTop:`4px`,flexShrink:0},color:`var(--chakra-colors-blue-500)`}),(0,R.jsx)(o,{fontSize:`sm`,color:`fg.muted`,children:e})]},e))}),(0,R.jsx)(h,{width:`full`,marginTop:`auto`,paddingTop:4,children:(0,R.jsx)(V,{plan:e,currentPlan:n})})]})})})}function U({activePlan:e,pricingModel:t}){let i=L(e),c=t===`TIERED`&&!e?.free,u=b.currency.detectCurrency.useQuery({}),[d,f]=(0,F.useState)(null),g=d??u.data?.currency??I.Currency.EUR,[_,v]=(0,F.useState)(`monthly`);return u.isLoading?(0,R.jsx)(n,{}):(0,R.jsxs)(h,{gap:6,width:`full`,align:`stretch`,maxWidth:`900px`,marginX:`auto`,children:[(0,R.jsxs)(p,{justifyContent:`space-between`,alignItems:`flex-start`,children:[(0,R.jsx)(a,{flex:1,children:(0,R.jsx)(T,{href:`/settings/subscription`,children:(0,R.jsxs)(r,{variant:`ghost`,size:`sm`,color:`gray.600`,children:[(0,R.jsx)(y,{size:14}),` Subscription`]})})}),(0,R.jsxs)(h,{align:`center`,gap:1,flex:2,children:[(0,R.jsx)(w,{size:`xl`,as:`h2`,children:`Plans`}),(0,R.jsx)(o,{color:`fg.muted`,children:`Compare plans and choose the right tier for your organization.`})]}),(0,R.jsx)(a,{flex:1})]}),(0,R.jsxs)(m,{width:`full`,justifyContent:{base:`center`,md:`center`},flexWrap:`wrap`,gap:3,children:[(0,R.jsx)(a,{flex:{md:1}}),(0,R.jsx)(m,{gap:0,bg:`bg.muted`,borderRadius:`full`,padding:`1`,"data-testid":`billing-period-toggle`,children:[{label:`Monthly`,value:`monthly`},{label:`Annually`,value:`annual`}].map(e=>(0,R.jsx)(a,{as:`button`,"aria-pressed":_===e.value,onClick:()=>v(e.value),paddingX:4,paddingY:1.5,borderRadius:`full`,fontSize:`sm`,fontWeight:_===e.value?`semibold`:`normal`,color:_===e.value?`orange.500`:`fg.muted`,bg:_===e.value?`bg.panel`:`transparent`,boxShadow:_===e.value?`xs`:`none`,transition:`all 0.15s ease-in-out`,cursor:`pointer`,_hover:{color:_===e.value?`orange.500`:`fg`},children:e.label},e.value))}),(0,R.jsx)(a,{flex:{md:1},display:`flex`,justifyContent:`flex-end`,children:(0,R.jsxs)(r,{"data-testid":`currency-toggle`,variant:`subtle`,size:`sm`,_hover:{bgColor:`orange.400`,color:`bg.muted`},onClick:()=>f(g===I.Currency.EUR?I.Currency.USD:I.Currency.EUR),children:[g===I.Currency.EUR?(0,R.jsx)(P,{size:14}):(0,R.jsx)(C,{size:14}),g]})})]}),c&&(0,R.jsx)(a,{"data-testid":`tiered-discontinued-notice`,backgroundColor:`orange.50`,borderWidth:1,borderColor:`orange.200`,borderRadius:`md`,padding:4,children:(0,R.jsxs)(m,{gap:2,alignItems:`start`,children:[(0,R.jsx)(l,{size:16,color:`var(--chakra-colors-orange-500)`}),(0,R.jsxs)(o,{fontSize:`sm`,color:`orange.900`,children:[`Your current pricing model has been discontinued.`,` `,(0,R.jsx)(T,{href:`/settings/subscription`,fontWeight:`semibold`,color:`orange.700`,_hover:{color:`orange.900`},children:`Update your plan`}),` `,`to move to seat and usage billing.`]})]})}),(0,R.jsx)(s,{columns:{base:1,md:3},gap:4,children:z(g).map(e=>(0,R.jsx)(H,{plan:e,isCurrent:i===e.id,currentPlan:i,currency:g,billingPeriod:_},e.id))})]})}function W(){let{organization:e}=S(),t=b.plan.getActivePlan.useQuery({organizationId:e?.id??``},{enabled:!!e?.id,refetchOnWindowFocus:!1,refetchOnMount:!1});return t.isLoading&&!t.data?(0,R.jsx)(D,{children:(0,R.jsx)(n,{})}):(0,R.jsx)(D,{children:(0,R.jsx)(U,{activePlan:t.data,pricingModel:e?.pricingModel})})}var G=E(`organization:view`,{layoutComponent:D})(W);export{G as default};
2
- //# sourceMappingURL=plans-DUiB6dWS.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{c as s,s as c}from"./shikiAdapter-S_u9TjIh.js";import{n as l}from"./toaster-CRP22oRW.js";import{J as u}from"./ExternalImage-DbtOSrKl.js";import{r as d}from"./external-link-BzETHrAG.js";import{t as f}from"./icon-CkSWK_vf.js";import{t as p}from"./grid-item-BDl8eynK.js";import{t as m}from"./h-stack-CMPhqSp5.js";import{t as h}from"./v-stack-ClAMS101.js";import{t as g}from"./arrow-right-00XC9HsO.js";import{t as ee}from"./code-RXLqs93S.js";import{r as _}from"./next-router-Bn5Y8Iek.js";import{n as v}from"./api-BK6L1im2.js";import{t as y}from"./check-circle-C5tqZD1V.js";import{t as b}from"./usePublicEnv-CATGNgPr.js";import{Jn as te,Kn as ne,Mn as x,Nt as S,Rt as C,jn as w,pr as T,qn as E,rr as D,t as re,wr as ie,xr as ae}from"./index-CUhcyBp3.js";import{t as oe}from"./react-FE7US63s.js";import{t as se}from"./LoadingScreen-D0JSh0Q2.js";import"./TabButton-BY-_E4cy.js";import{t as O}from"./DocsLinks-NNRxMwQU.js";import{t as k}from"./ModelProviderScreen-BtASYmAL.js";import{t as A}from"./CopyableInputWithPrefix-C3PRtdkW.js";import{a as j,c as M,d as N,f as P,h as F,l as I,m as L,o as R,s as z,t as B,u as V}from"./ViaClaudeDesktopScreen-fQIOpGM1.js";import{t as H}from"./OnboardingContainer-DRrQV_9c.js";import{a as U,i as W,n as G,t as K}from"./use-generic-onboarding-flow-eiutgTpm.js";var q=e(t());function ce(e){let t=_().query.projectSlug,n=Array.isArray(t)?t[0]:t,r=(0,q.useMemo)(()=>{if(!e)return;let t=(e.teams??[]).flatMap(e=>e?.projects??[]).filter(Boolean);if(!t.length)return;let r=e=>{if(!e)return 0;if(e instanceof Date)return e.getTime();let t=new Date(e).getTime();return Number.isNaN(t)?0:t};if(n){let e=t.filter(e=>e.slug===n).sort((e,t)=>r(t.createdAt)-r(e.createdAt));if(e[0])return e[0]}return t.sort((e,t)=>r(t.createdAt)-r(e.createdAt))[0]},[e,n]);return{project:r,slug:r?.slug??n??void 0}}var J=()=>{let{emit:e}=x(),t=(0,q.useRef)(e);return t.current=e,(0,q.useEffect)(()=>{let e=Date.now();return()=>{t.current(`exited`,void 0,{timeOnScreenMs:Date.now()-e})}},[]),null},Y={variant:`product`,visibleScreens:[W.SELECTION],first:W.SELECTION,last:W.SELECTION,total:1},X=[`via-claude-code`,`via-platform`,`via-claude-desktop`,`manually`],Z={"via-claude-code":[W.VIA_CLAUDE_CODE],"via-platform":[W.MODEL_PROVIDER,W.VIA_PLATFORM],"via-claude-desktop":[W.VIA_CLAUDE_DESKTOP],manually:[W.MANUALLY]},Q=e=>Z[e][0];function le(){let e=_(),[t,n]=(0,q.useState)(void 0),[r,i]=(0,q.useState)(Y);(0,q.useEffect)(()=>{let r=e.query.product,i=e.query.step,a;if(r&&typeof r==`string`&&X.includes(r))a=r;else if(i&&typeof i==`string`&&X.includes(i))a=i;else{let t=((typeof e.asPath==`string`?e.asPath:``).split(`?`)[0]??``).split(`/`).filter(e=>!!e&&e.length>0),n=t.length>0?t[t.length-1]:void 0;n&&X.includes(n)&&(a=n)}a&&a!==t&&n(a)},[e.query.product,e.query.step,t]);let a=(0,q.useMemo)(()=>{let e=new Map([[W.SELECTION,`product-selection`],[W.VIA_CLAUDE_CODE,`via-claude-code`],[W.VIA_PLATFORM,`via-platform`],[W.VIA_CLAUDE_DESKTOP,`via-claude-desktop`],[W.MANUALLY,`manually`],[W.MODEL_PROVIDER,`model-provider`]]),t=new Map;return e.forEach((e,n)=>{t.set(e,n)}),{indexToId:e,idToIndex:t}},[]);(0,q.useEffect)(()=>{if(t){let e=Z[t];i({variant:`product`,visibleScreens:[W.SELECTION,...e],first:W.SELECTION,last:e[e.length-1]??e[0],total:1+e.length})}else i(Y)},[t]);let{currentScreenIndex:o,direction:s,navigation:c,canGoBack:l,setCurrentScreenIndex:u}=K(r,(0,q.useCallback)(()=>!0,[]),{queryParamName:`step`,screenIdMap:a,firstScreenId:`product-selection`});return(0,q.useEffect)(()=>{t&&s!==G.BACKWARD&&typeof e.query.step!=`string`&&u(Q(t))},[t,e.query.step,s,u]),{selectedProduct:t,currentScreenIndex:o,direction:s,flow:r,navigation:c,canGoBack:l,handleSelectProduct:(0,q.useCallback)(t=>{n(t);let r=Q(t),i=a.indexToId.get(r)??t,o={...e.query};delete o.product,o.step=i,i!==t&&(o.product=t),u(r),e.push({pathname:e.pathname,query:o},void 0,{shallow:!0})},[e,a,u])}}var $=i();function ue({onContinue:e}){let{emit:t}=x();return(0,$.jsxs)(h,{align:`stretch`,gap:0,w:`full`,children:[(0,$.jsx)(k,{variant:`onboarding`,onComplete:e}),(0,$.jsx)(m,{justify:`center`,children:(0,$.jsx)(r,{variant:`ghost`,size:`sm`,color:`fg.subtle`,fontWeight:`semibold`,fontSize:`14px`,borderRadius:`8px`,_hover:{color:`fg`,bg:`bg.muted`},onClick:()=>{t(`clicked`,`skip`),e()},children:`Skip for now`})})]})}function de(){let{project:e}=F(),t=b(),n=e?.apiKey??``,r=t.data?.BASE_HOST??``;async function i({withBashPrefix:e}){try{await navigator.clipboard.writeText(e?`LANGWATCH_API_KEY=${n}`:n),l.create({title:`Copied`,description:`API key copied to clipboard`,type:`success`,meta:{closable:!0}})}catch{l.create({title:`Copy failed`,description:`Couldn't copy the API key. Please try again.`,type:`error`,meta:{closable:!0}})}}async function a({withBashPrefix:e}){try{await navigator.clipboard.writeText(e?`LANGWATCH_ENDPOINT=${r}`:r),l.create({title:`Copied`,description:`Endpoint copied to clipboard`})}catch{l.create({title:`Copy failed`,description:`Couldn't copy the endpoint. Please try again.`,type:`error`,meta:{closable:!0}})}}return(0,$.jsxs)(h,{align:`stretch`,gap:3,children:[(0,$.jsxs)(h,{align:`stretch`,gap:.5,children:[(0,$.jsx)(o,{fontSize:`md`,fontWeight:`semibold`,letterSpacing:`-0.01em`,children:`Your LangWatch Integration Info`}),(0,$.jsxs)(o,{fontSize:`xs`,color:`fg.muted`,lineHeight:`tall`,children:[`You can access your API key again anytime in the project's settings `,`page.`]})]}),(0,$.jsx)(A,{prefix:`LANGWATCH_API_KEY=`,value:n,ariaLabel:`Your API key`,showVisibilityToggle:!0,onCopy:i}),r&&r!==`https://app.langwatch.ai`&&(0,$.jsx)(A,{prefix:`LANGWATCH_ENDPOINT=`,value:r,ariaLabel:`Your LangWatch Endpoint`,showVisibilityToggle:!1,onCopy:a})]})}function fe(){let e=S(`orange.400`),t=S(`green.400`),r=_(),{project:i}=F(),[s,c]=(0,q.useState)(!1),[l,u]=(0,q.useState)(null),[d,f]=(0,q.useState)(typeof document>`u`?!0:document.visibilityState===`visible`);(0,q.useEffect)(()=>{let e=()=>f(document.visibilityState===`visible`);return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]);let p=(0,q.useMemo)(()=>{let e=Date.now();return{startDate:e-10080*60*1e3,endDate:e+1440*60*1e3}},[]),h=v.traces.getAllForProject.useQuery({projectId:i?.id??``,startDate:p.startDate,endDate:p.endDate,filters:{},groupBy:`none`,pageSize:1},{enabled:!!i?.id&&!s,refetchInterval:d?3e3:!1,refetchOnWindowFocus:!1});(0,q.useEffect)(()=>{let e=h.data?.groups?.flat().length??0;!s&&e>0&&c(!0)},[h.data,s]);let g=(0,q.useCallback)(()=>{if(!i?.slug)return;let e=h.data?.groups?.flat().at(0)?.trace_id??void 0;if(!e){window.location.href=`/${i.slug}/traces`;return}let t=new URLSearchParams({"drawer.open":`traceV2Details`,"drawer.traceId":e});window.location.href=`/${i.slug}/traces?${t.toString()}`},[i?.slug,r,h.status,h.data?.groups?.length]);return(0,q.useEffect)(()=>{s&&l===null&&u(3)},[s,l]),(0,q.useEffect)(()=>{if(!s||l===null)return;if(l<=0){g();return}let e=setTimeout(()=>u(e=>(e??1)-1),1e3);return()=>clearTimeout(e)},[s,l,g]),(0,$.jsx)(a,{position:`fixed`,left:`50%`,bottom:`24px`,transform:`translateX(-50%)`,zIndex:10,children:(0,$.jsx)(a,{position:`relative`,display:`inline-block`,children:(0,$.jsx)(m,{position:`relative`,bg:`bg.panel/50`,backdropFilter:`blur(24px) saturate(1.4)`,borderWidth:`1px`,borderColor:`gray.200`,boxShadow:`0 4px 30px rgba(0,0,0,0.08)`,borderRadius:`full`,px:4,py:2,gap:2,overflow:`hidden`,transition:`all 0.2s ease`,"aria-live":`polite`,children:s?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(a,{color:t,display:`flex`,alignItems:`center`,children:(0,$.jsx)(y,{size:16})}),(0,$.jsxs)(o,{fontWeight:`medium`,fontSize:`sm`,children:[`Traces detected.`,l!==null&&l>0&&` redirecting in ${l}..`,l!==null&&l===0&&` redirecting...`]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(n,{color:e,borderWidth:`2px`,animationDuration:`2s`,size:`sm`}),(0,$.jsx)(o,{fontWeight:`medium`,fontSize:`sm`,children:`Waiting to receive traces…`})]})})})})}function pe(){let{project:e}=F(),[t,n]=(0,q.useState)(`typescript`),[r,i]=(0,q.useState)(`vercel_ai`);function o(e){n(e);let t=V[e]?.[0]?.key;i(t||null)}let s=(0,q.useMemo)(()=>V[t]?.length>0,[t]),c=(0,q.useMemo)(()=>P(t,s?r:void 0),[t,r,s]);return(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(d,{templateColumns:{base:`1fr`,xl:`1fr 1fr`},gap:{base:6,xl:10},alignItems:`start`,mb:20,children:[(0,$.jsxs)(h,{align:`stretch`,gap:8,overflow:`visible`,children:[(0,$.jsx)(R,{selectedLanguage:t,onSelectLanguage:o}),s&&(0,$.jsx)(I,{language:t,selectedFramework:r,onSelectFramework:i}),(0,$.jsx)(de,{})]}),(0,$.jsx)(h,{align:`stretch`,gap:3,minW:0,w:`full`,children:c?.customComponent?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(c.customComponent,{}),(0,$.jsx)(O,{docs:c?.docs,label:c?.label??``})]}):(0,$.jsxs)(h,{align:`stretch`,gap:3,minW:0,w:`full`,children:[(0,$.jsx)(z,{install:c?.install}),(0,$.jsx)(a,{minW:0,w:`full`,overflowX:`auto`,children:(0,$.jsx)(M,{platform:t,framework:r,languageIconUrl:N.find(e=>e.key===t)?.iconUrl})}),(0,$.jsx)(O,{docs:c?.docs,label:c?.label??``})]})})]}),(0,$.jsx)(fe,{})]})}var me=oe.create(a),he=[{key:`via-platform`,title:`Via the Platform`,description:`Configure everything directly from the LangWatch dashboard`,icon:D,gradient:`linear-gradient(135deg, rgba(49,130,206,0.05) 0%, transparent 50%)`},{key:`via-claude-code`,title:`Via Coding Agent`,description:`Set up with prompts, skills, or MCP. Works with Claude Code, Cursor, Windsurf, and more`,icon:ne,gradient:`linear-gradient(135deg, rgba(237,137,38,0.06) 0%, transparent 50%)`},{key:`via-claude-desktop`,title:`Via MCP`,description:`Connect any MCP client. Claude Desktop, ChatGPT, Cursor, Windsurf, and more`,icon:c,gradient:`linear-gradient(135deg, rgba(128,90,213,0.05) 0%, transparent 50%)`},{key:`manually`,title:`Manually`,description:`Integrate the LangWatch SDK directly into your codebase`,icon:ee,gradient:`linear-gradient(135deg, rgba(56,161,105,0.05) 0%, transparent 50%)`}],ge=({onSelectProduct:e})=>{let t=v.onboarding.setIntegrationMethod.useMutation();return(0,$.jsx)(h,{gap:3,align:`stretch`,w:`full`,maxW:`520px`,mx:`auto`,children:he.map((n,r)=>(0,$.jsxs)(me,{as:`button`,w:`full`,position:`relative`,overflow:`hidden`,borderRadius:`2xl`,bg:`bg.panel/80`,border:`1px solid`,borderColor:{base:`orange.200`,_dark:`orange.800`},boxShadow:`sm`,backdropFilter:`blur(20px) saturate(1.3)`,px:6,py:5,cursor:`pointer`,role:`button`,tabIndex:0,onClick:()=>{t.mutate({integrationMethod:n.key}),e(n.key)},textAlign:`left`,initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.27,delay:r*.054,ease:`easeOut`},whileHover:{y:-3,boxShadow:`0 12px 40px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04)`,borderColor:`var(--chakra-colors-orange-emphasized)`,transition:{duration:.25,ease:`easeOut`}},whileTap:{scale:.98,transition:{duration:.1}},children:[(0,$.jsx)(a,{position:`absolute`,inset:0,style:{background:n.gradient},opacity:.5,transition:`opacity 0.3s ease`,pointerEvents:`none`,css:{"button:hover &":{opacity:1}}}),(0,$.jsxs)(m,{gap:5,align:`center`,position:`relative`,children:[(0,$.jsx)(a,{flexShrink:0,p:3,borderRadius:`xl`,bg:`orange.50`,border:`1px solid`,borderColor:`orange.100`,transition:`all 0.25s ease`,css:{"button:hover &":{background:`var(--chakra-colors-orange-100)`,borderColor:`var(--chakra-colors-orange-200)`,transform:`scale(1.05)`}},children:(0,$.jsx)(f,{color:`orange.500`,boxSize:6,children:(0,$.jsx)(n.icon,{strokeWidth:1.5})})}),(0,$.jsxs)(h,{gap:.5,align:`start`,flex:1,children:[(0,$.jsx)(o,{fontSize:`md`,fontWeight:`semibold`,color:`fg`,letterSpacing:`-0.01em`,children:n.title}),(0,$.jsx)(o,{fontSize:`sm`,color:`fg.muted`,lineHeight:`tall`,children:n.description})]}),(0,$.jsx)(a,{flexShrink:0,color:`fg.muted`,opacity:0,transform:`translateX(-6px)`,transition:`all 0.25s ease`,css:{"button:hover &":{opacity:.5,transform:`translateX(0)`}},children:(0,$.jsx)(g,{size:18})})]})]},n.key))})},_e=[{icon:ie,title:`Traces & Analytics`,description:`Monitor LLM calls, latency, costs, and user interactions`,path:`/traces`},{icon:E,title:`Online Evaluations`,description:`Run automated quality checks on live LLM outputs`,path:`/online-evaluations`},{icon:s,title:`Prompts`,description:`Version, test, and manage your prompts from the dashboard`,path:`/prompts`},{icon:T,title:`Scenarios`,description:`Create test scenarios to validate agent behavior`,path:`/simulations`},{icon:ae,title:`Datasets`,description:`Build and curate datasets for evaluation and fine-tuning`,path:`/datasets`},{icon:te,title:`Model Providers`,description:`Configure API keys for the models you use`,path:`/settings/model-providers`,absolute:!0}];function ve({icon:e,title:t,description:n,href:r}){return(0,$.jsx)(h,{asChild:!0,align:`start`,gap:3,p:5,flex:1,borderRadius:`xl`,border:`1px solid`,borderColor:{base:`orange.200`,_dark:`orange.800`},bg:`bg.panel/70`,backdropFilter:`blur(20px) saturate(1.3)`,boxShadow:`0 1px 3px rgba(0,0,0,0.04)`,transition:`all 0.2s ease`,cursor:`pointer`,_hover:{borderColor:`orange.emphasized`,boxShadow:`0 6px 28px rgba(237,137,38,0.06)`,transform:`translateY(-2px)`,textDecoration:`none`},children:(0,$.jsxs)(re,{href:r,textDecoration:`none`,color:`inherit`,children:[(0,$.jsx)(a,{flexShrink:0,p:2.5,borderRadius:`xl`,bg:`orange.50`,color:`orange.500`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:(0,$.jsx)(e,{size:20,strokeWidth:1.5})}),(0,$.jsxs)(h,{align:`stretch`,gap:1,children:[(0,$.jsx)(o,{fontSize:`sm`,fontWeight:`semibold`,color:`fg`,letterSpacing:`-0.01em`,children:t}),(0,$.jsx)(o,{fontSize:`xs`,color:`fg.muted`,lineHeight:`tall`,children:n})]})]})})}function ye(){let{project:e}=F();return(0,$.jsx)($.Fragment,{children:(0,$.jsxs)(h,{align:`stretch`,gap:6,mb:20,w:`full`,children:[(0,$.jsx)(d,{templateColumns:{base:`1fr`,md:`repeat(2, 1fr)`,lg:`repeat(3, 1fr)`},gap:3,children:_e.map(t=>(0,$.jsx)(p,{display:`flex`,children:(0,$.jsx)(ve,{...t,href:t.absolute?t.path:e?.slug?`/${e.slug}${t.path}`:`#`})},t.title))}),(0,$.jsx)(m,{justify:`center`,pt:2,children:(0,$.jsxs)(`a`,{href:`https://docs.langwatch.ai`,target:`_blank`,rel:`noopener noreferrer`,style:{display:`inline-flex`,alignItems:`center`,gap:`4px`,fontSize:`13px`,color:`var(--chakra-colors-fg-muted)`,textDecoration:`none`},children:[`Read the docs`,(0,$.jsx)(u,{size:14})]})})]})})}var be=({onSelectProduct:e})=>{let{emit:t}=x();return(0,$.jsx)(ge,{onSelectProduct:n=>{t(`selected`,`product`,{product:n}),e(n)}})},xe=({flow:e,onSelectProduct:t,onContinue:n})=>{let r=(0,q.useMemo)(()=>function(){return(0,$.jsx)(be,{onSelectProduct:t})},[t]),i=(0,q.useRef)(n);(0,q.useEffect)(()=>{i.current=n},[n]);let a=(0,q.useMemo)(()=>function(){return(0,$.jsx)(ue,{onContinue:()=>i.current()})},[]),o=(0,q.useMemo)(()=>({[W.SELECTION]:{id:`product-selection`,required:!1,heading:`Pick your flavour`,subHeading:`Choose a starting point. You can explore the rest anytime.`,component:r},[W.VIA_CLAUDE_CODE]:{id:`via-claude-code`,required:!1,heading:`Via Coding Agent`,subHeading:`Pick how you want to work with LangWatch in your coding agent`,widthVariant:`full`,component:j},[W.VIA_PLATFORM]:{id:`via-platform`,required:!1,heading:`Via the Platform`,subHeading:`Configure everything from the dashboard, no code changes needed`,widthVariant:`full`,component:ye},[W.VIA_CLAUDE_DESKTOP]:{id:`via-claude-desktop`,required:!1,heading:`Connect via MCP`,subHeading:`Add LangWatch to any MCP-compatible app in under a minute`,widthVariant:`full`,component:B},[W.MANUALLY]:{id:`manually`,required:!1,heading:`Manual Setup`,subHeading:`Add LangWatch to your codebase in minutes`,widthVariant:`full`,component:pe},[W.MODEL_PROVIDER]:{id:`model-provider`,required:!1,heading:`Set up a model provider`,subHeading:`Connect the model that powers LangWatch's AI features`,component:a}}),[r,a]);return e.visibleScreens.map(e=>o[e])},Se=()=>{let{currentScreenIndex:e,flow:t,navigation:n,canGoBack:r,handleSelectProduct:i}=le(),{organization:o,isLoading:s}=C({redirectToOnboarding:!0}),{project:c,slug:l}=ce(o),[u,d]=(0,q.useState)(!1);(0,q.useEffect)(()=>{let e;return s?e=setTimeout(()=>d(!0),200):d(!1),()=>{e&&clearTimeout(e)}},[s]);let f=xe({flow:t,onSelectProduct:i,onContinue:n.nextScreen}),p=(0,q.useMemo)(()=>t.visibleScreens.findIndex(t=>Number(t)===Number(e)),[t.visibleScreens,e]),m=p>=0?f[p]:void 0;return m?s?(0,$.jsx)(se,{}):(0,$.jsxs)(w,{name:`onboarding_product`,sendViewedEvent:!0,children:[(0,$.jsx)(J,{}),(0,$.jsx)(H,{title:m.heading,subTitle:m.subHeading,loading:u,compressedHeader:!0,widthVariant:m.widthVariant??`narrow`,showBackButton:r,onBack:()=>n.prevScreen(),skipHref:l?`/${l}`:void 0,children:(0,$.jsx)(a,{w:`full`,children:(0,$.jsx)(L,{value:{project:c,organization:o},children:!s&&m.component?(0,$.jsxs)(w,{name:m.id,sendViewedEvent:!0,children:[(0,$.jsx)(J,{}),(0,$.jsx)(m.component,{})]},m.id):null})})})]}):null},Ce=()=>(0,$.jsx)(U,{children:(0,$.jsx)(Se,{})});export{Ce as default};
2
- //# sourceMappingURL=product-CLC45PiC.js.map
@@ -1,2 +0,0 @@
1
- import{o as e,r as t}from"./rolldown-runtime-DAXXjFlN.js";import{t as n}from"./react-BUD3sqOU.js";import{r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{t as o}from"./text-A3qvcMyN.js";import{a as s,n as c,t as l}from"./radio-group-DJFHT54R.js";import{a as u,r as d}from"./field-Dz4Xmo3X.js";import{t as f}from"./h-stack-CMPhqSp5.js";import{n as p,r as m,t as h}from"./native-select-Bj4m9rSh.js";import{t as g}from"./v-stack-ClAMS101.js";import{r as _}from"./next-router-Bn5Y8Iek.js";import{n as v}from"./api-BK6L1im2.js";import{t as y}from"./code-DdPQRevI.js";import{t as b}from"./SetupLayout-DQ1mB1du.js";import{Ar as x,Rt as S,ni as C,zt as w}from"./index-CUhcyBp3.js";import{n as T,t as E}from"./OpenAI-DFYm1n1s.js";import{s as D,t as O}from"./index.esm-C0ipNBTK.js";import{t as k}from"./getSafeReturnToPath-DhtoOW7y.js";import{t as A}from"./next-error-CxP4qmmD.js";var j=i();function M(){return(0,j.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`100%`,x:`0`,y:`0`,version:`1.1`,viewBox:`0 0 135 129`,xmlSpace:`preserve`,children:[(0,j.jsx)(`path`,{fill:`#EF4036`,d:`M57 130c-4.025 0-8.05 0-12.738-.388-12.655-.796-24.644-1.307-36.637-1.554-3.991-.083-6.077-1.088-5.733-5.642.233-3.099-.559-6.275-.892-9.416 0-3.03 0-6.061.388-9.747.462-2.482.601-4.307.602-6.133.014-28.16-.128-56.32.08-84.478C2.15 1.665 4.737 1.884 12.41 1.961 26.237 2.099 40.067 2 53.897 2c23.327 0 46.664-.387 69.978.174 10.618.255 11.252.618 11.144 10.772-.384 36.255-.697 72.512-1.011 108.768-.063 7.28-.013 7.162-7.504 7.328-4.84.108-9.67.625-14.505.958-8.354 0-16.708 0-25.733-.388-8.722-.462-16.774-.589-24.825-.565-1.482.004-2.961.62-4.442.953M9 54.37v5.385c5.808.445 11.04.881 16.277 1.237 5.138.348 6.526 2.156 5.266 6.98-.328 1.257-.997 2.613-.769 3.779.294 1.5 1.229 3.992 2.07 4.069 3.052.281 6.499.404 9.122-.838 1.039-.492.732-4.787.3-7.219-.819-4.617.47-6.87 5.055-6.698 5.693.212 11.368.896 17.68 1.43l2.831-14.063c-11.667-1.47-15.167-5.947-13.826-17.463.75-6.428 6.2-10.251 13.753-9.707V9.276H9V54.37m64.082-2.606l-1.38 12.12 13.042 1.246c1.312-4.52 1.405-9.022 3.686-11.54 2.31-2.55 6.69-3.895 10.341-4.36 3.148-.4 7.653.122 9.58 2.132 2.98 3.11 4.275 7.835 6.748 12.808l12.9-1.35c0-16.546-.12-32.688.085-48.827.052-4.056-1.325-5.12-5.207-5.07-14.662.192-29.329.069-43.994.093-1.26.002-2.52.22-3.452.308-.515 4.216-1.159 7.953-1.39 11.716-.47 7.613-.648 7.774-7.874 8.045-1.72.064-4.6.878-4.86 1.886-.63 2.44-.675 5.493.339 7.705.533 1.165 3.868 1.697 5.795 1.44 4.502-.6 6.512.763 6.532 5.461.007 1.8-.291 3.601-.89 6.187M109.762 71c-5.78-.108-6.12-.549-4.792-6.265.256-1.103.93-2.244.78-3.276-.216-1.48-.97-4.086-1.568-4.107-3.389-.12-6.903.039-10.115.984-.63.186-.452 4.3-.072 6.504.987 5.722-.073 7.151-5.944 7.158-5.867.008-11.734.002-17.823.002v11.717c16.259.062 17.997 1.8 16.626 17.732-.199 2.315-1.803 5.683-3.636 6.441-3.964 1.64-8.497 1.904-13.218 2.812 0 1.524.022 4.009-.005 6.493-.037 3.38 1.188 5.165 4.985 4.87 3.64-.282 7.322-.005 10.986-.003 13.615.007 27.231.003 41.434.003V71h-17.638M69.03 92.467c-5.086 1.942-5.712-1.924-5.923-5.102-.373-5.611-.105-11.265-.105-17.1l-12.395-2.002c-1.735 4.8-2.101 10.653-5.15 12.962-3.419 2.588-9.372 2.996-14.028 2.506-6.93-.728-11.226-6.305-8.924-15.41H9.342v53.577h53.659c0-5.359-.093-10.168.026-14.972.122-4.967 2.62-6.667 7.336-5.211 1.395.43 2.869 1.342 4.176 1.149 1.785-.263 4.736-1.147 4.912-2.16.482-2.774.426-6.073-.763-8.507-.528-1.08-4.292-.65-6.594-.754-.76-.035-1.543.404-3.064 1.024z`,opacity:`1`}),(0,j.jsx)(`path`,{fill:`#FFF`,d:`M112.469 130c4.366-.333 9.196-.85 14.036-.958 7.49-.166 7.44-.048 7.504-7.328.314-36.256.627-72.513 1.011-108.768.108-10.154-.526-10.517-11.144-10.772C100.562 1.614 77.226 2 53.898 2c-13.83 0-27.66.1-41.489-.04C4.738 1.885 2.15 1.666 2.07 12.643 1.862 40.8 2.004 68.96 1.99 97.12c0 1.826-.14 3.651-.602 5.678C1 69.038 1 35.076 1 1.058h134.867V130h-23.398zM1 113.47c.333 2.671 1.125 5.847.892 8.946-.344 4.554 1.742 5.56 5.733 5.642 11.993.247 23.982.758 36.173 1.554C29.773 130 15.546 130 1 130v-16.53zM57.469 130c1.012-.333 2.491-.949 3.973-.953 8.051-.024 16.103.103 24.356.565-9.152.388-18.506.388-28.33.388z`,opacity:`1`}),(0,j.jsx)(`path`,{fill:`#FFF`,d:`M9 53.885V9.275h57.759v11.987c-7.553-.544-13.004 3.28-13.753 9.707-1.341 11.516 2.16 15.993 13.826 17.463l-2.83 14.062c-6.313-.533-11.988-1.217-17.681-1.43-4.584-.17-5.874 2.082-5.054 6.7.431 2.431.738 6.726-.301 7.218-2.623 1.242-6.07 1.119-9.121.838-.842-.077-1.777-2.568-2.071-4.069-.228-1.166.441-2.522.77-3.779 1.259-4.824-.13-6.632-5.267-6.98C20.04 60.636 14.808 60.2 9 59.755v-5.87z`,opacity:`1`}),(0,j.jsx)(`path`,{fill:`#FFF`,d:`M73.302 51.371c.38-2.193.678-3.994.67-5.794-.019-4.698-2.03-6.06-6.531-5.46-1.927.256-5.262-.276-5.795-1.44-1.014-2.213-.968-5.266-.339-7.706.26-1.008 3.14-1.822 4.86-1.886 7.226-.271 7.405-.432 7.873-8.045.232-3.763.876-7.5 1.39-11.716.933-.087 2.193-.306 3.453-.308 14.665-.024 29.332.099 43.994-.093 3.882-.05 5.26 1.014 5.207 5.07-.205 16.139-.084 32.281-.084 48.828l-12.901 1.35c-2.473-4.974-3.768-9.699-6.748-12.809-1.927-2.01-6.432-2.532-9.58-2.131-3.652.464-8.03 1.808-10.34 4.359-2.282 2.518-2.375 7.02-3.687 11.54l-13.043-1.245c.473-4.145.927-8.133 1.601-12.514z`,opacity:`1`}),(0,j.jsx)(`path`,{fill:`#FFF`,d:`M110.235 71h17.166v51.065c-14.203 0-27.819.004-41.434-.003-3.664-.002-7.346-.28-10.986.004-3.797.294-5.022-1.491-4.985-4.87.027-2.485.005-4.97.005-6.494 4.72-.908 9.254-1.172 13.218-2.812 1.833-.758 3.437-4.126 3.636-6.441 1.371-15.932-.367-17.67-16.626-17.732V72c6.089 0 11.956.006 17.823-.002 5.87-.007 6.931-1.436 5.944-7.158-.38-2.204-.558-6.318.072-6.504 3.212-.945 6.726-1.103 10.115-.984.598.02 1.352 2.627 1.568 4.107.15 1.032-.524 2.173-.78 3.276-1.329 5.716-.987 6.157 5.264 6.265z`,opacity:`1`}),(0,j.jsx)(`path`,{fill:`#FFF`,d:`M69.405 92.268c1.146-.421 1.928-.86 2.689-.825 2.302.104 6.066-.326 6.594.754 1.19 2.434 1.245 5.733.763 8.506-.176 1.014-3.127 1.898-4.912 2.161-1.307.193-2.78-.719-4.176-1.15-4.716-1.455-7.214.245-7.336 5.212-.12 4.804-.026 9.613-.026 14.972H9.342V68.322h13.165c-2.304 9.104 1.991 14.68 8.922 15.41 4.656.489 10.61.081 14.027-2.507 3.05-2.31 3.416-8.161 5.151-12.962l12.395 2.002c0 5.835-.268 11.489.105 17.1.211 3.178.837 7.044 6.298 4.903z`,opacity:`1`})]})}var N=e(n());function P(){return(0,j.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,preserveAspectRatio:`xMinYMid meet`,viewBox:`0 0 75 75`,children:(0,j.jsx)(`text`,{y:`65`,fontSize:`65px`,style:{fontSize:`65px`},children:`🦜`})})}function F({size:e=24,color:t,style:n}){return(0,j.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 100 100`,...n,width:e,height:e,children:(0,j.jsx)(`path`,{fill:t??`currentColor`,d:`M81.32 47.807c1.89 0 3.65.648 5.144 1.825a3.696 3.696 0 003.928.476 3.666 3.666 0 002.103-3.32V23.224a3.69 3.69 0 00-3.69-3.69H71.071c.344-1.283.502-2.605.502-3.928C71.573 7.01 64.564 0 55.968 0S40.363 7.01 40.363 15.605c0 1.35.172 2.672.503 3.928L35 19.5s-15.6-1-15.6 16v57.06h27.564c1.455 0 2.777-.846 3.346-2.169a3.691 3.691 0 00-.582-3.967 8.144 8.144 0 01-2.037-5.383c0-4.535 3.69-8.225 8.226-8.225 4.536 0 8.226 3.69 8.226 8.225a8.143 8.143 0 01-2.037 5.383 3.691 3.691 0 00-.582 3.967c.609 1.323 1.931 2.17 3.346 2.17h23.87a3.691 3.691 0 003.69-3.69V65.305a3.643 3.643 0 00-2.103-3.32 3.7 3.7 0 00-3.927.476 8.073 8.073 0 01-5.145 1.825c-4.536 0-8.225-3.69-8.225-8.226.066-4.522 3.754-8.253 8.29-8.253zM19.4 71.189V35.5v5.43a15.71 15.71 0 00-3.795-.475C7.01 40.455 0 47.464 0 56.06s7.009 15.605 15.605 15.605c1.283 0 2.54-.172 3.796-.476zm61.92.422c1.283 0 2.539-.172 3.795-.476v14.018H71.031c.37-1.322.542-2.71.542-4.126 0-8.596-7.009-15.605-15.605-15.605s-15.605 7.009-15.605 15.605c0 1.389.198 2.777.542 4.126H26.781V65.29a3.643 3.643 0 00-2.102-3.32 3.7 3.7 0 00-3.928.477 8.072 8.072 0 01-5.145 1.825c-4.535 0-8.225-3.69-8.225-8.226 0-4.536 3.69-8.226 8.226-8.226 1.89 0 3.689.648 5.144 1.825a3.697 3.697 0 003.928.476 3.666 3.666 0 002.102-3.32V35.5c0-9.5 8.719-8.562 8.719-8.562h11.29a3.729 3.729 0 003.346-2.129 3.696 3.696 0 00-.503-3.928 8.246 8.246 0 01-1.89-5.25c0-4.536 3.689-8.226 8.225-8.226s8.226 3.69 8.226 8.226c0 1.931-.675 3.796-1.93 5.25a3.702 3.702 0 00-.504 3.928 3.7 3.7 0 003.346 2.13h20.01v14.017a15.71 15.71 0 00-3.796-.476c-8.596 0-15.605 7.01-15.605 15.606 0 8.582 6.995 15.525 15.605 15.525z`})})}function I(){return(0,j.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,xmlnsXlink:`http://www.w3.org/1999/xlink`,version:`1`,viewBox:`0 0 122 134`,children:[(0,j.jsxs)(`defs`,{children:[(0,j.jsxs)(`linearGradient`,{id:`linearGradient2795`,children:[(0,j.jsx)(`stop`,{offset:`0`,stopColor:`#b8b8b8`,stopOpacity:`0.498`}),(0,j.jsx)(`stop`,{offset:`1`,stopColor:`#7f7f7f`,stopOpacity:`0`})]}),(0,j.jsxs)(`linearGradient`,{children:[(0,j.jsx)(`stop`,{offset:`0`,stopColor:`#7f7f7f`,stopOpacity:`0.5`}),(0,j.jsx)(`stop`,{offset:`1`,stopColor:`#7f7f7f`,stopOpacity:`0`})]}),(0,j.jsxs)(`linearGradient`,{children:[(0,j.jsx)(`stop`,{offset:`0`,stopColor:`#b2b2b2`,stopOpacity:`0.5`}),(0,j.jsx)(`stop`,{offset:`1`,stopColor:`#b3b3b3`,stopOpacity:`0`})]}),(0,j.jsxs)(`linearGradient`,{children:[(0,j.jsx)(`stop`,{offset:`0`,stopColor:`#f4f4f4`,stopOpacity:`1`}),(0,j.jsx)(`stop`,{offset:`1`,stopColor:`#fff`,stopOpacity:`1`})]}),(0,j.jsxs)(`linearGradient`,{id:`linearGradient4671`,children:[(0,j.jsx)(`stop`,{offset:`0`,stopColor:`#ffd43b`,stopOpacity:`1`}),(0,j.jsx)(`stop`,{offset:`1`,stopColor:`#ffe873`,stopOpacity:`1`})]}),(0,j.jsxs)(`linearGradient`,{id:`linearGradient4689`,children:[(0,j.jsx)(`stop`,{offset:`0`,stopColor:`#5a9fd4`,stopOpacity:`1`}),(0,j.jsx)(`stop`,{offset:`1`,stopColor:`#306998`,stopOpacity:`1`})]}),(0,j.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,j.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`77.476`,y2:`76.313`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,j.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`77.476`,y2:`76.313`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,j.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,j.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`77.476`,y2:`76.313`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,j.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`translate(100.27 99.611)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,j.jsx)(`linearGradient`,{x1:`224.24`,x2:`-65.309`,y1:`144.757`,y2:`144.757`,gradientTransform:`matrix(.56254 0 0 .56797 -11.597 -7.61)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,j.jsx)(`linearGradient`,{x1:`172.942`,x2:`26.67`,y1:`76.176`,y2:`76.313`,gradientTransform:`matrix(.56254 0 0 .56797 -11.597 -7.61)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,j.jsx)(`radialGradient`,{cx:`61.519`,cy:`132.286`,r:`29.037`,fx:`61.519`,fy:`132.286`,gradientTransform:`matrix(1 0 0 .17797 0 108.743)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient2795`}),(0,j.jsx)(`linearGradient`,{id:`linearGradient1475`,x1:`150.961`,x2:`112.031`,y1:`192.352`,y2:`137.273`,gradientTransform:`matrix(.56254 0 0 .56797 -14.991 -11.702)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4671`}),(0,j.jsx)(`linearGradient`,{id:`linearGradient1478`,x1:`26.649`,x2:`135.665`,y1:`20.604`,y2:`114.398`,gradientTransform:`matrix(.56254 0 0 .56797 -14.991 -11.702)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient4689`}),(0,j.jsx)(`radialGradient`,{id:`radialGradient1480`,cx:`61.519`,cy:`132.286`,r:`29.037`,fx:`61.519`,fy:`132.286`,gradientTransform:`matrix(0 -.23995 1.05467 0 -83.7 142.462)`,gradientUnits:`userSpaceOnUse`,xlinkHref:`#linearGradient2795`})]}),(0,j.jsxs)(`g`,{transform:`translate(0,0)`,children:[(0,j.jsx)(`path`,{fill:`url(#linearGradient1478)`,fillOpacity:`1`,d:`M54.919 0c-4.584.022-8.961.413-12.813 1.095C30.76 3.099 28.7 7.295 28.7 15.032v10.219h26.813v3.406H18.638c-7.793 0-14.616 4.684-16.75 13.594-2.462 10.213-2.571 16.586 0 27.25 1.905 7.938 6.457 13.594 14.25 13.594h9.218v-12.25c0-8.85 7.657-16.657 16.75-16.657h26.782c7.454 0 13.406-6.138 13.406-13.625v-25.53c0-7.267-6.13-12.726-13.406-13.938C64.282.328 59.502-.02 54.918 0zm-14.5 8.22c2.77 0 5.031 2.298 5.031 5.125 0 2.816-2.262 5.093-5.031 5.093-2.78 0-5.031-2.277-5.031-5.093 0-2.827 2.251-5.125 5.03-5.125z`}),(0,j.jsx)(`path`,{fill:`url(#linearGradient1475)`,fillOpacity:`1`,d:`M85.638 28.657v11.906c0 9.231-7.826 17-16.75 17H42.106c-7.336 0-13.406 6.279-13.406 13.625V96.72c0 7.266 6.319 11.54 13.406 13.625 8.488 2.495 16.627 2.946 26.782 0 6.75-1.955 13.406-5.888 13.406-13.625V86.5H55.513v-3.405H95.7c7.793 0 10.696-5.436 13.406-13.594 2.8-8.399 2.68-16.476 0-27.25-1.925-7.758-5.604-13.594-13.406-13.594zM70.575 93.313c2.78 0 5.031 2.278 5.031 5.094 0 2.827-2.251 5.125-5.031 5.125-2.77 0-5.031-2.298-5.031-5.125 0-2.816 2.261-5.094 5.031-5.094z`})]})]})}function L(){return(0,j.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`512`,fill:`none`,viewBox:`0 0 512 512`,children:[(0,j.jsx)(`rect`,{width:`512`,height:`512`,fill:`#3178c6`,rx:`50`}),(0,j.jsx)(`rect`,{width:`512`,height:`512`,fill:`#3178c6`,rx:`50`}),(0,j.jsx)(`path`,{fill:`#fff`,fillRule:`evenodd`,d:`M316.939 407.424v50.061c8.138 4.172 17.763 7.3 28.875 9.386S368.637 470 380.949 470c11.999 0 23.397-1.147 34.196-3.442 10.799-2.294 20.268-6.075 28.406-11.342 8.138-5.266 14.581-12.15 19.328-20.65S470 415.559 470 403.044c0-9.074-1.356-17.026-4.069-23.857s-6.625-12.906-11.738-18.225c-5.112-5.319-11.242-10.091-18.389-14.315s-15.207-8.213-24.18-11.967c-6.573-2.712-12.468-5.345-17.685-7.9-5.217-2.556-9.651-5.163-13.303-7.822-3.652-2.66-6.469-5.476-8.451-8.448-1.982-2.973-2.974-6.336-2.974-10.091 0-3.441.887-6.544 2.661-9.308s4.278-5.136 7.512-7.118c3.235-1.981 7.199-3.52 11.894-4.615 4.696-1.095 9.912-1.642 15.651-1.642 4.173 0 8.581.313 13.224.938 4.643.626 9.312 1.591 14.008 2.894a97.514 97.514 0 0113.694 4.928c4.434 1.982 8.529 4.276 12.285 6.884v-46.776c-7.616-2.92-15.937-5.084-24.962-6.492S415.797 238 404.112 238c-11.895 0-23.163 1.278-33.805 3.833s-20.006 6.544-28.093 11.967c-8.086 5.424-14.476 12.333-19.171 20.729-4.695 8.395-7.043 18.433-7.043 30.114 0 14.914 4.304 27.638 12.912 38.172 8.607 10.533 21.675 19.45 39.204 26.751 6.886 2.816 13.303 5.579 19.25 8.291s11.086 5.528 15.415 8.448c4.33 2.92 7.747 6.101 10.252 9.543 2.504 3.441 3.756 7.352 3.756 11.733 0 3.233-.783 6.231-2.348 8.995s-3.939 5.162-7.121 7.196-7.147 3.624-11.894 4.771c-4.748 1.148-10.303 1.721-16.668 1.721-10.851 0-21.597-1.903-32.24-5.71-10.642-3.806-20.502-9.516-29.579-17.13zM232.78 284.082H297V243H118v41.082h63.906V467h50.874z`,clipRule:`evenodd`})]})}function R(){return(0,j.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`100%`,height:`100%`,viewBox:`0 0 512 512`,children:(0,j.jsx)(`path`,{d:`M2310 5109c-502-55-974-249-1355-556-129-104-340-321-433-445-265-354-434-758-498-1193-22-147-29-428-15-575 42-433 180-833 405-1174C828 537 1461 134 2205 24c147-22 428-29 575-15 433 42 833 180 1174 405 629 414 1032 1047 1142 1791 22 147 29 428 15 575-51 524-238 988-558 1385-104 129-321 340-445 433-354 265-755 432-1193 498-121 18-487 26-605 13zm909-2348c347-607 631-1105 631-1107s-569-4-1265-4-1265 2-1265 5c0 8 1263 2216 1266 2212 1-1 287-499 633-1106z`,transform:`matrix(.1 0 0 -.1 0 512)`,fill:`currentColor`})})}var z={python:{label:`Python`,icon:(0,j.jsx)(I,{})},typescript:{label:`TypeScript`,icon:(0,j.jsx)(L,{})},other:{label:`Other`,icon:(0,j.jsx)(F,{})}},B={python_openai:{label:`Python OpenAI`,icon:(0,j.jsx)(I,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_azure_openai:{label:`Python Azure OpenAI`,icon:(0,j.jsx)(I,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_langchain:{label:`Python LangChain`,icon:(0,j.jsx)(I,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_dspy:{label:`Python DSPy`,icon:(0,j.jsx)(I,{}),href:`https://docs.langwatch.ai/integration/python/guide`},python_custom:{label:`Python Custom`,icon:(0,j.jsx)(I,{}),href:`https://docs.langwatch.ai/integration/python/guide`},typescript_guide:{label:`TypeScript`,icon:(0,j.jsx)(L,{}),href:`https://docs.langwatch.ai/integration/typescript/guide`},custom_rest:{label:`Custom REST`,icon:(0,j.jsx)(y,{}),href:`https://docs.langwatch.ai/integration/rest-api`}},V={openai:{label:`OpenAI`,icon:(0,j.jsx)(E,{}),languages:{python:B.python_openai,typescript:B.typescript_guide}},azure_openai:{label:`Azure OpenAI`,icon:(0,j.jsx)(T,{}),languages:{python:B.python_azure_openai,typescript:B.typescript_guide}},vercel_ai:{label:`Vercel AI SDK`,icon:(0,j.jsx)(R,{}),languages:{typescript:B.typescript_guide}},langchain:{label:`LangChain`,icon:(0,j.jsx)(P,{}),languages:{python:B.python_langchain,typescript:B.typescript_guide}},dspy:{label:`DSPy`,icon:(0,j.jsx)(M,{}),languages:{python:B.python_dspy}},other:{label:`Other`,icon:(0,j.jsx)(F,{}),languages:{python:B.python_custom,typescript:B.typescript_guide,other:B.custom_rest}}},H=e=>{let t=e.language,n=e.framework;return{language:z[t]??z.other,framework:V[n]??V.other}};function U({form:e}){let t=e,n=({children:e})=>(0,j.jsx)(a,{width:`32px`,height:`32px`,display:`flex`,alignItems:`center`,justifyContent:`center`,overflow:`hidden`,_icon:{width:`32px`,height:`32px`},children:e}),r=t.watch(`language`)||Object.keys(z)[0],i=e=>{let n=Object.entries(V).filter(([t,n])=>Object.keys(n.languages).includes(e));t.setValue(`language`,e),n[0]&&t.setValue(`framework`,n[0][0])};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(u,{children:[(0,j.jsx)(d,{children:`Language`}),(0,j.jsx)(O,{name:`language`,control:t.control,render:({field:e})=>(0,j.jsx)(s,{...e,onChange:void 0,onValueChange:e=>{i(e.value??``)},children:(0,j.jsx)(f,{gap:6,alignItems:`stretch`,wrap:`wrap`,children:Object.entries(z).map(([e,t])=>(0,j.jsx)(K,{value:e,children:(0,j.jsxs)(g,{width:`64px`,children:[(0,j.jsx)(n,{children:t.icon}),(0,j.jsx)(a,{fontSize:`sm`,textAlign:`center`,children:t.label})]})},e))})})})]}),(0,j.jsxs)(u,{children:[(0,j.jsx)(d,{children:`Library or Framework`}),(0,j.jsx)(O,{name:`framework`,control:t.control,render:({field:e})=>(0,j.jsx)(s,{...e,children:(0,j.jsx)(f,{gap:6,alignItems:`stretch`,wrap:`wrap`,children:Object.entries(V).filter(([e,t])=>Object.keys(t.languages).includes(r??``)).map(([e,t])=>(0,j.jsx)(K,{value:e,children:(0,j.jsxs)(g,{width:`64px`,children:[(0,j.jsx)(n,{children:t.icon}),(0,j.jsx)(a,{fontSize:`sm`,textAlign:`center`,children:t.label})]})},e))})})})]})]})}var W=({project:e})=>{let t=({children:e})=>(0,j.jsx)(a,{width:`16px`,height:`16px`,display:`flex`,alignItems:`center`,justifyContent:`center`,children:e}),{language:n,framework:r}=H(e);return n.label===`Other`&&r.label===`Other`?(0,j.jsx)(f,{gap:0,align:`center`,justify:`center`,color:`fg.muted`,children:(0,j.jsx)(t,{children:(0,j.jsx)(F,{})})}):(0,j.jsxs)(f,{gap:0,children:[(0,j.jsx)(a,{marginRight:`-6px`,children:(0,j.jsx)(t,{children:n.icon})}),(0,j.jsx)(t,{children:r.icon})]})},G=t({RadioCard:()=>K,default:()=>q}),K=(0,N.forwardRef)(function(e,t){let{children:n,value:r}=e;return(0,j.jsxs)(l,{value:r,_checked:{backgroundColor:`gray.50`},children:[(0,j.jsx)(c,{ref:t}),(0,j.jsx)(a,{cursor:`pointer`,borderRadius:`md`,_hover:{backgroundColor:`gray.50`},px:5,py:3,height:`full`,display:`flex`,alignItems:`center`,children:n})]})});function q(){w();let e=D({defaultValues:{language:`python`,framework:`openai`}}),{watch:t}=e,n=t(`teamId`),i=_(),{organization:a}=S({redirectToProjectOnboarding:!1}),{team:s}=i.query,c=v.team.getBySlug.useQuery({slug:typeof s==`string`?s:``,organizationId:a?.id??``},{enabled:!!a}),l=v.team.getTeamsWithMembers.useQuery({organizationId:a?.id??``},{enabled:!!a}),y=k(i.query.return_to);(0,N.useEffect)(()=>{c.data&&e.setValue(`teamId`,c.data.id)},[e,c.data]);let T=v.project.create.useMutation();return c.isFetched&&!c.data?(0,j.jsx)(A,{statusCode:404}):(0,j.jsx)(b,{children:(0,j.jsx)(`form`,{onSubmit:e.handleSubmit(e=>{c.data&&T.mutate({organizationId:a?.id??``,name:e.name,teamId:e.teamId==`NEW`?void 0:e.teamId,newTeamName:e.newTeamName,language:e.language,framework:e.framework},{onSuccess:e=>{if(y){i.push(y);return}i.push(`/${e.projectSlug}`)}})}),children:(0,j.jsxs)(g,{gap:4,alignItems:`left`,children:[(0,j.jsx)(C,{as:`h1`,fontSize:`x-large`,children:`Create New Project`}),(0,j.jsxs)(o,{paddingBottom:4,fontSize:`14px`,children:[`You can set up separate projects for each service or LLM feature of your application (for example, one for your ChatBot, another for that Content Generation feature).`,(0,j.jsx)(`br`,{})]}),(0,j.jsxs)(u,{children:[(0,j.jsx)(d,{children:`Project Name`}),(0,j.jsx)(x,{...e.register(`name`,{required:!0})})]}),l.data?.some(e=>e.projects.length>0)&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(u,{children:[(0,j.jsx)(d,{children:`Team`}),(0,j.jsxs)(m,{children:[(0,j.jsxs)(h,{...e.register(`teamId`,{required:!0}),children:[l.data?.map(e=>(0,j.jsx)(`option`,{value:e.id,children:e.name},e.id)),(0,j.jsx)(`option`,{value:`NEW`,children:`(+) Create new team`})]}),(0,j.jsx)(p,{})]})]}),n==`NEW`&&(0,j.jsxs)(u,{children:[(0,j.jsx)(d,{children:`New Team Name`}),(0,j.jsx)(x,{...e.register(`newTeamName`,{required:!0})})]})]}),(0,j.jsx)(U,{form:e}),T.error&&(0,j.jsx)(`p`,{children:`Something went wrong!`}),(0,j.jsx)(f,{width:`full`,children:(0,j.jsx)(r,{colorPalette:`orange`,type:`submit`,disabled:T.isLoading||T.isSuccess,children:T.isSuccess?`Created`:T.isLoading?`Loading...`:`Next`})})]})})})}export{W as n,U as r,G as t};
2
- //# sourceMappingURL=project-CO0U6_JZ.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{A as n,B as r,Ht as i,I as a,L as o,M as s,Q as c,Vt as l,Z as u,_ as d,b as f,d as p,et as m,f as ee,ft as h,g,h as _,i as v,l as te,nt as y,o as b,p as x,pt as S,r as C,u as ne,v as re,yt as ie}from"./portal-FJIui2Z2.js";import{t as ae}from"./jsx-runtime-CFwixLRt.js";import{t as w}from"./box-Ck5lef6C.js";import{t as T}from"./text-A3qvcMyN.js";import{Gn as E,dn as oe,fn as se,gn as ce,hn as le,ln as ue,nr as de,pn as fe,rr as pe,tr as me,un as he}from"./useLiteMemberGuard-klZnweA7.js";import{n as D,s as ge}from"./info-CtYT35g4.js";import{n as O}from"./toaster-CRP22oRW.js";import{n as _e,t as ve}from"./dist-B7coEPw4.js";import{r as ye}from"./dismissable-layer-B-YbfJzk.js";import{c as be,r as xe,s as Se}from"./visually-hidden-Bv77dNd2.js";import{$ as Ce,D as we,Q as Te,X as k,Y as Ee,Z as A,et as j,nt as De,tt as Oe}from"./ExternalImage-DbtOSrKl.js";import{i as ke,l as Ae,n as je,o as Me,s as Ne}from"./icon-CkSWK_vf.js";import{n as Pe}from"./use-field-context-Ct2EZR3u.js";import{at as Fe,it as Ie,ot as Le,r as Re}from"./UpgradeModal-BmLw5ONS.js";import{s as ze}from"./icons-DbK9WJNH.js";import{r as M,t as N}from"./card-54_vstoB.js";import{a as Be,i as Ve,n as He,t as Ue}from"./empty-state-Al7XUd1I.js";import{t as P}from"./h-stack-CMPhqSp5.js";import{n as F,r as I,t as L}from"./stat-BuRz-g3X.js";import{i as We,n as R,r as Ge,t as Ke}from"./ReplayStateBadge-C_aPNnCs.js";import{it as qe,rt as Je}from"./immer-tl_oI9yy.js";import{t as z}from"./v-stack-ClAMS101.js";import{t as Ye}from"./DashboardLayout-RHGL-98_.js";import{t as Xe}from"./arrow-right-00XC9HsO.js";import{r as Ze}from"./next-router-Bn5Y8Iek.js";import{n as B}from"./api-BK6L1im2.js";import{Ar as Qe,Mr as $e,Pr as V,Yn as et,g as H}from"./index-CUhcyBp3.js";import{r as tt}from"./formatters-BDO3Inyr.js";import{t as nt}from"./OpsPageShell-BamkwuvB.js";import{i as rt,n as it,r as at,t as ot}from"./parseActiveProjections-BYVfzdkq.js";function st(e){if(!e)return;let t=u(e);return`box-sizing:`+t.boxSizing+`;border-left:`+t.borderLeftWidth+` solid red;border-right:`+t.borderRightWidth+` solid red;font-family:`+t.fontFamily+`;font-feature-settings:`+t.fontFeatureSettings+`;font-kerning:`+t.fontKerning+`;font-size:`+t.fontSize+`;font-stretch:`+t.fontStretch+`;font-style:`+t.fontStyle+`;font-variant:`+t.fontVariant+`;font-variant-caps:`+t.fontVariantCaps+`;font-variant-ligatures:`+t.fontVariantLigatures+`;font-variant-numeric:`+t.fontVariantNumeric+`;font-weight:`+t.fontWeight+`;letter-spacing:`+t.letterSpacing+`;margin-left:`+t.marginLeft+`;margin-right:`+t.marginRight+`;padding-left:`+t.paddingLeft+`;padding-right:`+t.paddingRight+`;text-indent:`+t.textIndent+`;text-transform:`+t.textTransform}function ct(e){let t=e.createElement(`div`);return t.id=`ghost`,t.style.cssText=`display:inline-block;height:0;overflow:hidden;position:absolute;top:0;visibility:hidden;white-space:nowrap;`,e.body.appendChild(t),t}function lt(e){if(!e)return;let t=m(e),n=y(e),r=ct(t),i=st(e);i&&(r.style.cssText+=i);function a(){n.requestAnimationFrame(()=>{r.innerHTML=e.value;let t=n.getComputedStyle(r);e?.style.setProperty(`width`,t.width)})}return a(),e?.addEventListener(`input`,a),e?.addEventListener(`change`,a),()=>{t.body.removeChild(r),e?.removeEventListener(`input`,a),e?.removeEventListener(`change`,a)}}var ut=e=>e.ids?.root??`tags-input:${e.id}`,dt=e=>e.ids?.input??`tags-input:${e.id}:input`,ft=e=>e.ids?.clearBtn??`tags-input:${e.id}:clear-btn`,pt=e=>e.ids?.hiddenInput??`tags-input:${e.id}:hidden-input`,mt=e=>e.ids?.label??`tags-input:${e.id}:label`,ht=e=>e.ids?.control??`tags-input:${e.id}:control`,U=(e,t)=>e.ids?.item?.(t)??`tags-input:${e.id}:tag:${t.value}:${t.index}`,gt=(e,t)=>e.ids?.itemDeleteTrigger?.(t)??`${U(e,t)}:delete-btn`,_t=(e,t)=>e.ids?.itemInput?.(t)??`${U(e,t)}:input`,vt=e=>`${e}:input`,yt=(e,t)=>e.getById(vt(t)),bt=e=>Ae(St(e),`[data-part=item]`),xt=(e,t)=>e.getById(_t(e,t)),St=e=>e.getById(ut(e)),W=e=>e.getById(dt(e)),Ct=e=>e.getById(pt(e)),G=e=>Ae(St(e),`[data-part=item-preview]:not([data-disabled])`),wt=e=>G(e)[0],Tt=e=>G(e)[G(e).length-1],Et=(e,t)=>Ne(G(e),t,!1),Dt=(e,t)=>Me(G(e),t,!1),Ot=(e,t)=>G(e)[t],K=(e,t)=>ke(G(e),t),kt=e=>{let t=e.closest(`[data-part=item-preview]`);t&&(t.dataset.deleteIntent=``)},At=e=>{let t=e.closest(`[data-part=item-preview]`);t&&delete t.dataset.deleteIntent},jt=(e,t)=>{let n=Ct(e);n&&xe(n,{value:t})};function Mt(e,t){let{state:n,send:i,computed:c,prop:l,scope:u,context:d}=e,f=c(`isInteractive`),p=!!l(`disabled`),m=!!l(`readOnly`),ee=!!l(`required`),g=l(`invalid`)||c(`isOverflowing`),_=l(`translations`),v=n.hasTag(`focused`),te=n.matches(`editing:tag`),y=c(`count`)===0;function b(e){let t=U(u,e),n=d.get(`editedTagId`),r=d.get(`highlightedTagId`);return{id:t,editing:te&&n===t,highlighted:t===r,disabled:!!(e.disabled||p)}}return{empty:y,inputValue:d.get(`inputValue`),value:d.get(`value`),valueAsString:c(`valueAsString`),count:c(`count`),atMax:c(`isAtMax`),setValue(e){i({type:`SET_VALUE`,value:e})},clearValue(e){i(e?{type:`CLEAR_TAG`,id:e}:{type:`CLEAR_VALUE`})},addValue(e){i({type:`ADD_TAG`,value:e})},setValueAtIndex(e,t){i({type:`SET_VALUE_AT_INDEX`,index:e,value:t})},setInputValue(e){i({type:`SET_INPUT_VALUE`,value:e})},clearInputValue(){i({type:`SET_INPUT_VALUE`,value:``})},focus(){W(u)?.focus()},getItemState:b,getRootProps(){return t.element({dir:l(`dir`),...V.root.attrs,"data-invalid":S(g),"data-readonly":S(m),"data-disabled":S(p),"data-focus":S(v),"data-empty":S(y),id:ut(u),onPointerDown(){f&&i({type:`POINTER_DOWN`})}})},getLabelProps(){return t.label({...V.label.attrs,"data-disabled":S(p),"data-invalid":S(g),"data-readonly":S(m),"data-required":S(ee),id:mt(u),dir:l(`dir`),htmlFor:dt(u)})},getControlProps(){return t.element({id:ht(u),...V.control.attrs,dir:l(`dir`),tabIndex:m?0:void 0,"data-disabled":S(p),"data-readonly":S(m),"data-invalid":S(g),"data-focus":S(v)})},getInputProps(){return t.input({...V.input.attrs,dir:l(`dir`),"data-invalid":S(g),"aria-invalid":h(g),"data-readonly":S(m),"data-empty":S(y),maxLength:l(`maxLength`),id:dt(u),defaultValue:d.get(`inputValue`),autoComplete:`off`,autoCorrect:`off`,autoCapitalize:`none`,enterKeyHint:`done`,disabled:p||m,placeholder:y?l(`placeholder`):void 0,onInput(e){let t=a(e),n=e.currentTarget.value;if(t.inputType===`insertFromPaste`){i({type:`PASTE`,value:n});return}if(Nt(n,l(`delimiter`))){i({type:`DELIMITER_KEY`});return}i({type:`TYPE`,value:n,key:t.inputType})},onFocus(){queueMicrotask(()=>{i({type:`FOCUS`})})},onKeyDown(e){if(e.defaultPrevented||o(e))return;let t=e.currentTarget,n=t.getAttribute(`role`)===`combobox`,r=t.ariaExpanded===`true`,a={ArrowDown(){i({type:`ARROW_DOWN`})},ArrowLeft(){n&&r||i({type:`ARROW_LEFT`})},ArrowRight(e){d.get(`highlightedTagId`)&&e.preventDefault(),!(n&&r)&&i({type:`ARROW_RIGHT`})},Escape(e){e.preventDefault(),i({type:`ESCAPE`})},Backspace(){i({type:`BACKSPACE`})},Delete(){i({type:`DELETE`})},Enter(e){let a=t.getAttribute(`aria-activedescendant`);n&&r&&a||(i({type:`ENTER`}),e.preventDefault())}}[s(e,{dir:l(`dir`)})];if(a){a(e);return}}})},getHiddenInputProps(){return t.input({type:`text`,hidden:!0,name:l(`name`),form:l(`form`),disabled:p,readOnly:m,required:l(`required`),id:pt(u),defaultValue:c(`valueAsString`)})},getItemProps(e){return t.element({...V.item.attrs,dir:l(`dir`),"data-value":e.value,"data-disabled":S(p)})},getItemPreviewProps(e){let n=b(e);return t.element({...V.itemPreview.attrs,id:n.id,dir:l(`dir`),hidden:n.editing,"data-value":e.value,"data-disabled":S(p),"data-highlighted":S(n.highlighted),onPointerDown(e){!f||n.disabled||r(e)&&(e.preventDefault(),i({type:`POINTER_DOWN_TAG`,id:n.id}))},onDoubleClick(){!f||n.disabled||i({type:`DOUBLE_CLICK_TAG`,id:n.id})}})},getItemTextProps(e){let n=b(e);return t.element({...V.itemText.attrs,dir:l(`dir`),"data-disabled":S(p),"data-highlighted":S(n.highlighted)})},getItemInputProps(e){let n=b(e);return t.input({...V.itemInput.attrs,dir:l(`dir`),"aria-label":_?.tagEdited?.(e.value),disabled:p,id:_t(u,e),tabIndex:-1,hidden:!n.editing,maxLength:l(`maxLength`),defaultValue:n.editing?d.get(`editedTagValue`):``,onInput(e){i({type:`TAG_INPUT_TYPE`,value:e.currentTarget.value})},onBlur(e){queueMicrotask(()=>{i({type:`TAG_INPUT_BLUR`,target:e.relatedTarget,id:n.id})})},onKeyDown(e){if(e.defaultPrevented||o(e))return;let t={Enter(){i({type:`TAG_INPUT_ENTER`})},Escape(){i({type:`TAG_INPUT_ESCAPE`})}}[e.key];t&&(e.preventDefault(),t(e))}})},getItemDeleteTriggerProps(e){let n=b(e);return t.button({...V.itemDeleteTrigger.attrs,dir:l(`dir`),"data-disabled":S(n.disabled),"aria-disabled":n.disabled,"data-highlighted":S(n.highlighted),id:gt(u,e),type:`button`,disabled:n.disabled,"aria-label":_?.deleteTagTriggerLabel?.(e.value),tabIndex:-1,onPointerDown(e){r(e)&&(f||e.preventDefault())},onPointerMove(e){f&&kt(e.currentTarget)},onPointerLeave(e){f&&At(e.currentTarget)},onClick(e){e.defaultPrevented||f&&i({type:`CLICK_DELETE_TAG`,id:n.id})}})},getClearTriggerProps(){return t.button({...V.clearTrigger.attrs,dir:l(`dir`),id:ft(u),type:`button`,"data-readonly":S(m),disabled:p,"aria-label":_?.clearTriggerLabel,hidden:y,onClick(){f&&i({type:`CLEAR_VALUE`})}})}}}function Nt(e,t){return t?typeof t==`string`?e.endsWith(t):RegExp(`${t.source}$`).test(e):!1}var{and:q,not:J,or:Pt}=d(),Ft=re({props({props:e}){return{dir:`ltr`,addOnPaste:!1,editable:!0,validate:()=>!0,allowDuplicates:!1,delimiter:`,`,defaultValue:[],defaultInputValue:``,max:1/0,sanitizeValue:e=>e.trim(),...e,translations:{clearTriggerLabel:`Clear all tags`,deleteTagTriggerLabel:e=>`Delete tag ${e}`,tagAdded:e=>`Added tag ${e}`,tagsPasted:e=>`Pasted ${e.length} tags`,tagEdited:e=>`Editing tag ${e}. Press enter to save or escape to cancel.`,tagUpdated:e=>`Tag update to ${e}`,tagDeleted:e=>`Tag ${e} deleted`,tagSelected:e=>`Tag ${e} selected. Press enter to edit, delete or backspace to remove.`,...e.translations}}},initialState({prop:e}){return e(`autoFocus`)?`focused:input`:`idle`},refs(){return{liveRegion:null,log:{current:null,prev:null}}},context({bindable:e,prop:t}){return{value:e(()=>({defaultValue:t(`defaultValue`),value:t(`value`),isEqual:ge,hash(e){return e.join(`, `)},onChange(e){t(`onValueChange`)?.({value:e})}})),inputValue:e(()=>({sync:!0,defaultValue:t(`defaultInputValue`),value:t(`inputValue`),onChange(e){t(`onInputValueChange`)?.({inputValue:e})}})),fieldsetDisabled:e(()=>({defaultValue:!1})),editedTagValue:e(()=>({defaultValue:``})),editedTagId:e(()=>({defaultValue:null})),editedTagIndex:e(()=>({defaultValue:null,sync:!0})),highlightedTagId:e(()=>({defaultValue:null,sync:!0,onChange(e){t(`onHighlightChange`)?.({highlightedValue:e})}}))}},computed:{count:({context:e})=>e.get(`value`).length,valueAsString:({context:e})=>e.hash(`value`),sanitizedInputValue:({context:e,prop:t})=>t(`sanitizeValue`)(e.get(`inputValue`)),isDisabled:({prop:e})=>!!e(`disabled`),isInteractive:({prop:e})=>!(e(`readOnly`)||e(`disabled`)),isAtMax:({context:e,prop:t})=>e.get(`value`).length===t(`max`),isOverflowing:({context:e,prop:t})=>e.get(`value`).length>t(`max`)},watch({track:e,context:t,action:n,computed:r,refs:i}){e([()=>t.get(`editedTagValue`)],()=>{n([`syncEditedTagInputValue`])}),e([()=>t.get(`inputValue`)],()=>{n([`syncInputValue`])}),e([()=>t.get(`highlightedTagId`)],()=>{n([`logHighlightedTag`])}),e([()=>r(`isOverflowing`)],()=>{n([`invokeOnInvalid`])}),e([()=>JSON.stringify(i.get(`log`))],()=>{n([`announceLog`])})},effects:[`trackLiveRegion`,`trackFormControlState`],exit:[`clearLog`],on:{DOUBLE_CLICK_TAG:{guard:`isTagEditable`,target:`editing:tag`,actions:[`setEditedId`]},POINTER_DOWN_TAG:{target:`navigating:tag`,actions:[`highlightTag`,`focusInput`]},CLICK_DELETE_TAG:{target:`focused:input`,actions:[`deleteTag`]},SET_INPUT_VALUE:{actions:[`setInputValue`]},SET_VALUE:{actions:[`setValue`]},CLEAR_TAG:{actions:[`deleteTag`]},SET_VALUE_AT_INDEX:{actions:[`setValueAtIndex`]},CLEAR_VALUE:{actions:[`clearTags`,`clearInputValue`,`focusInput`]},ADD_TAG:{actions:[`addTag`]},INSERT_TAG:{guard:q(Pt(J(`isAtMax`),`allowOverflow`),J(`isInputValueEmpty`)),actions:[`addTag`,`clearInputValue`]},EXTERNAL_BLUR:[{guard:`addOnBlur`,actions:[`raiseInsertTagEvent`]},{guard:`clearOnBlur`,actions:[`clearInputValue`]}]},states:{idle:{on:{FOCUS:{target:`focused:input`},POINTER_DOWN:{guard:J(`hasHighlightedTag`),target:`focused:input`}}},"focused:input":{tags:[`focused`],entry:[`focusInput`,`clearHighlightedId`],effects:[`trackInteractOutside`],on:{TYPE:{actions:[`setInputValue`]},BLUR:[{guard:`addOnBlur`,target:`idle`,actions:[`raiseInsertTagEvent`]},{guard:`clearOnBlur`,target:`idle`,actions:[`clearInputValue`]},{target:`idle`}],ENTER:{actions:[`raiseInsertTagEvent`]},DELIMITER_KEY:{actions:[`raiseInsertTagEvent`]},ARROW_LEFT:{guard:q(`hasTags`,`isCaretAtStart`),target:`navigating:tag`,actions:[`highlightLastTag`]},BACKSPACE:{target:`navigating:tag`,guard:q(`hasTags`,`isCaretAtStart`),actions:[`highlightLastTag`]},DELETE:{guard:`hasHighlightedTag`,actions:[`deleteHighlightedTag`,`highlightTagAtIndex`]},PASTE:[{guard:`addOnPaste`,actions:[`setInputValue`,`addTagFromPaste`]},{actions:[`setInputValue`]}]}},"navigating:tag":{tags:[`focused`],effects:[`trackInteractOutside`],on:{ARROW_RIGHT:[{guard:q(`hasTags`,`isCaretAtStart`,J(`isLastTagHighlighted`)),actions:[`highlightNextTag`]},{target:`focused:input`}],ARROW_LEFT:[{guard:J(`isCaretAtStart`),target:`focused:input`},{actions:[`highlightPrevTag`]}],BLUR:{target:`idle`,actions:[`clearHighlightedId`]},ENTER:{guard:q(`isTagEditable`,`hasHighlightedTag`),target:`editing:tag`,actions:[`setEditedId`,`focusEditedTagInput`]},ARROW_DOWN:{target:`focused:input`},ESCAPE:{target:`focused:input`},TYPE:{target:`focused:input`,actions:[`setInputValue`]},BACKSPACE:[{guard:J(`isCaretAtStart`),target:`focused:input`},{guard:`isFirstTagHighlighted`,actions:[`deleteHighlightedTag`,`highlightFirstTag`]},{guard:`hasHighlightedTag`,actions:[`deleteHighlightedTag`,`highlightPrevTag`]},{actions:[`highlightLastTag`]}],DELETE:[{guard:J(`isCaretAtStart`),target:`focused:input`},{target:`focused:input`,actions:[`deleteHighlightedTag`,`highlightTagAtIndex`]}],PASTE:[{guard:`addOnPaste`,target:`focused:input`,actions:[`setInputValue`,`addTagFromPaste`]},{target:`focused:input`,actions:[`setInputValue`]}]}},"editing:tag":{tags:[`editing`,`focused`],entry:[`focusEditedTagInput`],effects:[`autoResize`],on:{TAG_INPUT_TYPE:{actions:[`setEditedTagValue`]},TAG_INPUT_ESCAPE:{target:`navigating:tag`,actions:[`clearEditedTagValue`,`focusInput`,`clearEditedId`,`highlightTagAtIndex`]},TAG_INPUT_BLUR:[{guard:`isInputRelatedTarget`,target:`navigating:tag`,actions:[`clearEditedTagValue`,`clearHighlightedId`,`clearEditedId`]},{target:`idle`,actions:[`clearEditedTagValue`,`clearHighlightedId`,`clearEditedId`,`raiseExternalBlurEvent`]}],TAG_INPUT_ENTER:[{guard:`isEditedTagEmpty`,target:`navigating:tag`,actions:[`deleteHighlightedTag`,`focusInput`,`clearEditedId`,`highlightTagAtIndex`]},{target:`navigating:tag`,actions:[`submitEditedTagValue`,`focusInput`,`clearEditedId`,`highlightTagAtIndex`]}]}}},implementations:{guards:{isInputRelatedTarget:({scope:e,event:t})=>t.relatedTarget===W(e),isAtMax:({computed:e})=>e(`isAtMax`),hasHighlightedTag:({context:e})=>e.get(`highlightedTagId`)!=null,isFirstTagHighlighted:({context:e,scope:t})=>U(t,{value:e.get(`value`)[0],index:0})===e.get(`highlightedTagId`),isEditedTagEmpty:({context:e,prop:t})=>t(`sanitizeValue`)(e.get(`editedTagValue`))===``,isLastTagHighlighted:({context:e,scope:t})=>{let n=e.get(`value`),r=n.length-1;return U(t,{value:n[r],index:r})===e.get(`highlightedTagId`)},isInputValueEmpty:({context:e,prop:t})=>t(`sanitizeValue`)(e.get(`inputValue`)).length===0,hasTags:({context:e})=>e.get(`value`).length>0,allowOverflow:({prop:e})=>!!e(`allowOverflow`),autoFocus:({prop:e})=>!!e(`autoFocus`),addOnBlur:({prop:e})=>e(`blurBehavior`)===`add`,clearOnBlur:({prop:e})=>e(`blurBehavior`)===`clear`,addOnPaste:({prop:e})=>!!e(`addOnPaste`),isTagEditable:({prop:e})=>!!e(`editable`),isCaretAtStart:({scope:e})=>_e(W(e))},effects:{trackInteractOutside({scope:e,prop:t,send:n}){return ye(W(e),{exclude(t){return bt(e).some(e=>c(e,t))},onFocusOutside:t(`onFocusOutside`),onPointerDownOutside:t(`onPointerDownOutside`),onInteractOutside(e){t(`onInteractOutside`)?.(e),!e.defaultPrevented&&n({type:`BLUR`,src:`interact-outside`})}})},trackFormControlState({context:e,send:t,scope:n}){return be(Ct(n),{onFieldsetDisabledChange(t){e.set(`fieldsetDisabled`,t)},onFormReset(){t({type:`SET_VALUE`,value:e.initial(`value`),src:`form-reset`})}})},autoResize({context:e,prop:t,scope:n}){let r;return queueMicrotask(()=>{let i=e.get(`editedTagValue`),a=e.get(`editedTagIndex`);!i||a==null||!t(`editable`)||(r=lt(xt(n,{value:i,index:a})))}),()=>{r?.()}},trackLiveRegion({scope:e,refs:t}){let n=ve({level:`assertive`,document:e.getDoc()});return t.set(`liveRegion`,n),()=>n.destroy()}},actions:{raiseInsertTagEvent({send:e}){e({type:`INSERT_TAG`})},raiseExternalBlurEvent({send:e,event:t}){e({type:`EXTERNAL_BLUR`,id:t.id})},dispatchChangeEvent({scope:e,computed:t}){jt(e,t(`valueAsString`))},highlightNextTag({context:e,scope:t}){let n=e.get(`highlightedTagId`);if(n==null)return;let r=Dt(t,n);e.set(`highlightedTagId`,r?.id??null)},highlightFirstTag({context:e,scope:t}){n(()=>{let n=wt(t);e.set(`highlightedTagId`,n?.id??null)})},highlightLastTag({context:e,scope:t}){let n=Tt(t);e.set(`highlightedTagId`,n?.id??null)},highlightPrevTag({context:e,scope:t}){let n=e.get(`highlightedTagId`);if(n==null)return;let r=Et(t,n);e.set(`highlightedTagId`,r?.id??null)},highlightTag({context:e,event:t}){e.set(`highlightedTagId`,t.id)},highlightTagAtIndex({context:e,scope:t}){n(()=>{let n=e.get(`editedTagIndex`);if(n==null)return;let r=Ot(t,n);r!=null&&(e.set(`highlightedTagId`,r.id),e.set(`editedTagIndex`,null))})},deleteTag({context:e,scope:t,event:n,refs:r}){let i=K(t,n.id),a=e.get(`value`)[i],o=r.get(`log`);r.set(`log`,{prev:o.current,current:{type:`delete`,value:a}}),e.set(`value`,e=>l(e,i))},deleteHighlightedTag({context:e,scope:t,refs:n}){let r=e.get(`highlightedTagId`);if(r==null)return;let i=K(t,r);e.set(`editedTagIndex`,i);let a=e.get(`value`),o=n.get(`log`);n.set(`log`,{prev:o.current,current:{type:`delete`,value:a[i]}}),e.set(`value`,e=>l(e,i))},setEditedId({context:e,event:t,scope:n}){let r=e.get(`highlightedTagId`),i=t.id??r;e.set(`editedTagId`,i);let a=K(n,i),o=e.get(`value`)[a];e.set(`editedTagIndex`,a),e.set(`editedTagValue`,o)},clearEditedId({context:e}){e.set(`editedTagId`,null)},clearEditedTagValue({context:e}){e.set(`editedTagValue`,``)},setEditedTagValue({context:e,event:t}){e.set(`editedTagValue`,t.value)},submitEditedTagValue({context:e,scope:t,refs:n,prop:r}){let i=e.get(`editedTagId`);if(!i)return;let a=K(t,i),o=e.get(`editedTagValue`),s=e.get(`value`),c=s.some((e,t)=>t!==a&&e===o);if(!r(`allowDuplicates`)&&c||s[a]===o)return;e.set(`value`,e=>{let t=e.slice();return t[a]=o,t});let l=n.get(`log`);n.set(`log`,{prev:l.current,current:{type:`update`,value:o}})},setValueAtIndex({context:e,event:t,refs:n,prop:r}){if(t.value){let i=e.get(`value`),a=i.some((e,n)=>n!==t.index&&e===t.value);if(!r(`allowDuplicates`)&&a||i[t.index]===t.value)return;e.set(`value`,e=>{let n=e.slice();return n[t.index]=t.value,n});let o=n.get(`log`);n.set(`log`,{prev:o.current,current:{type:`update`,value:t.value}})}else ie(`You need to provide a value for the tag`)},focusEditedTagInput({context:e,scope:t}){n(()=>{let n=e.get(`editedTagId`);n&&yt(t,n)?.select()})},setInputValue({context:e,event:t}){e.set(`inputValue`,t.value)},clearHighlightedId({context:e}){e.set(`highlightedTagId`,null)},focusInput({scope:e}){n(()=>{W(e)?.focus()})},clearInputValue({context:e}){n(()=>{e.set(`inputValue`,``)})},syncInputValue({context:e,scope:t}){let n=W(t);n&&Se(n,e.get(`inputValue`))},syncEditedTagInputValue({context:e,event:t,scope:n}){let r=e.get(`editedTagId`)||e.get(`highlightedTagId`)||t.id;if(r==null)return;let i=yt(n,r);i&&Se(i,e.get(`editedTagValue`))},addTag({context:e,event:t,computed:n,prop:r,refs:a}){let o=t.value??n(`sanitizedInputValue`),s=e.get(`value`);if(r(`validate`)?.({inputValue:o,value:Array.from(s)})){let t=r(`allowDuplicates`)?s.concat(o):i(s.concat(o));e.set(`value`,t);let n=a.get(`log`);a.set(`log`,{prev:n.current,current:{type:`add`,value:o}})}else r(`onValueInvalid`)?.({reason:`invalidTag`})},addTagFromPaste({context:e,computed:t,prop:r,refs:a}){n(()=>{let n=t(`sanitizedInputValue`),o=e.get(`value`),s=r(`sanitizeValue`);if(r(`validate`)?.({inputValue:n,value:Array.from(o)})){let t=r(`delimiter`),c=t?n.split(t).map(s):[n],l=r(`allowDuplicates`)?o.concat(...c):i(o.concat(...c));e.set(`value`,l);let u=a.get(`log`);a.set(`log`,{prev:u.current,current:{type:`paste`,values:c}})}else r(`onValueInvalid`)?.({reason:`invalidTag`});e.set(`inputValue`,``)})},clearTags({context:e,refs:t}){e.set(`value`,[]);let n=t.get(`log`);t.set(`log`,{prev:n.current,current:{type:`clear`}})},setValue({context:e,event:t}){e.set(`value`,t.value)},invokeOnInvalid({prop:e,computed:t}){t(`isOverflowing`)&&e(`onValueInvalid`)?.({reason:`rangeOverflow`})},clearLog({refs:e}){let t=e.get(`log`);t.prev=t.current=null},logHighlightedTag({refs:e,context:t,scope:n}){let r=t.get(`highlightedTagId`),i=e.get(`log`);if(r==null||!i.current)return;let a=K(n,r),o=t.get(`value`)[a],s=e.get(`log`);e.set(`log`,{prev:s.current,current:{type:`select`,value:o}})},announceLog({refs:e,prop:t}){let n=e.get(`liveRegion`),r=t(`translations`),i=e.get(`log`);if(!i.current||n==null)return;let a=n,{current:o,prev:s}=i,c;switch(o.type){case`add`:c=r.tagAdded(o.value);break;case`delete`:c=r.tagDeleted(o.value);break;case`update`:c=r.tagUpdated(o.value);break;case`paste`:c=r.tagsPasted(o.values);break;case`select`:c=r.tagSelected(o.value),s?.type===`delete`?c=`${r.tagDeleted(s.value)}. ${c}`:s?.type===`update`&&(c=`${r.tagUpdated(s.value)}. ${c}`);break;default:break}c&&a.announce(c)}}}}),[It,Y]=_({name:`TagsInputContext`,hookName:`useTagsInputContext`,providerName:`<TagsInputProvider />`}),X=e(t(),1),Z=ae(),Lt=(0,X.forwardRef)((e,t)=>{let n=f(Y().getClearTriggerProps(),e);return(0,Z.jsx)(x.button,{...n,ref:t})});Lt.displayName=`TagsInputClearTrigger`;var Rt=e=>e.children(Y()),zt=(0,X.forwardRef)((e,t)=>{let n=f(Y().getControlProps(),e);return(0,Z.jsx)(x.div,{...n,ref:t})});zt.displayName=`TagsInputControl`;var Bt=(0,X.forwardRef)((e,t)=>{let n=f(Y().getHiddenInputProps(),e),r=Pe();return(0,Z.jsx)(x.input,{"aria-describedby":r?.ariaDescribedby,...n,ref:t})});Bt.displayName=`TagsInputHiddenInput`;var Vt=(0,X.forwardRef)((e,t)=>{let n=f(Y().getInputProps(),e);return(0,Z.jsx)(x.input,{...n,ref:t})});Vt.displayName=`TagsInputInput`;var[Ht,Ut]=_({name:`TagsInputItemContext`,hookName:`useTagsInputItemContext`,providerName:`<TagsInputItemProvider />`}),[Wt,Gt]=_({name:`TagsInputItemPropsContext`,hookName:`useTagsInputItemPropsContext`,providerName:`<TagsInputItemPropsProvider />`}),Kt=je(),qt=(0,X.forwardRef)((e,t)=>{let[n,r]=Kt(e,[`index`,`disabled`,`value`]),i=Y(),a=f(i.getItemProps(n),r);return(0,Z.jsx)(Wt,{value:n,children:(0,Z.jsx)(Ht,{value:i.getItemState(n),children:(0,Z.jsx)(x.div,{...a,ref:t})})})});qt.displayName=`TagsInputItem`;var Jt=e=>e.children(Ut()),Yt=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Gt(),i=f(n.getItemDeleteTriggerProps(r),e);return(0,Z.jsx)(x.button,{...i,ref:t})});Yt.displayName=`TagsInputItemDeleteTrigger`;var Xt=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Gt(),i=f(n.getItemInputProps(r),e);return(0,Z.jsx)(x.input,{...i,ref:t})});Xt.displayName=`TagsInputItemInput`;var Zt=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Gt(),i=f(n.getItemPreviewProps(r),e);return(0,Z.jsx)(x.div,{...i,ref:t})});Zt.displayName=`TagsInputItemPreview`;var Qt=(0,X.forwardRef)((e,t)=>{let n=Y(),r=Gt(),i=f(n.getItemTextProps(r),e);return(0,Z.jsx)(x.span,{...i,ref:t})});Qt.displayName=`TagsInputItemText`;var $t=(0,X.forwardRef)((e,t)=>{let n=f(Y().getLabelProps(),e);return(0,Z.jsx)(x.label,{...n,ref:t})});$t.displayName=`TagsInputLabel`;var en=e=>{let t=(0,X.useId)(),{getRootNode:n}=ee(),{dir:r}=p(),i=Pe();return Mt(ne(Ft,{id:t,ids:{label:i?.ids.label,hiddenInput:i?.ids.control},dir:r,disabled:i?.disabled,invalid:i?.invalid,readOnly:i?.readOnly,required:i?.required,getRootNode:n,...e}),te)},tn=je(),nn=(0,X.forwardRef)((e,t)=>{let[n,r]=tn(e,`addOnPaste.allowDuplicates.allowOverflow.autoFocus.blurBehavior.defaultInputValue.defaultValue.delimiter.disabled.editable.form.id.ids.inputValue.invalid.max.maxLength.name.onFocusOutside.onHighlightChange.onInputValueChange.onInteractOutside.onPointerDownOutside.onValueChange.onValueInvalid.placeholder.readOnly.required.sanitizeValue.translations.validate.value`.split(`.`)),i=en(n),a=f(i.getRootProps(),r);return(0,Z.jsx)(It,{value:i,children:(0,Z.jsx)(x.div,{...a,ref:t})})});nn.displayName=`TagsInputRoot`;var rn=je(),an=(0,X.forwardRef)((e,t)=>{let[{value:n},r]=rn(e,[`value`]),i=f(n.getRootProps(),r);return(0,Z.jsx)(It,{value:n,children:(0,Z.jsx)(x.div,{...i,ref:t})})});an.displayName=`TagsInputRootProvider`;var Q=g({ClearTrigger:()=>Lt,Context:()=>Rt,Control:()=>zt,HiddenInput:()=>Bt,Input:()=>Vt,Item:()=>qt,ItemContext:()=>Jt,ItemDeleteTrigger:()=>Yt,ItemInput:()=>Xt,ItemPreview:()=>Zt,ItemText:()=>Qt,Label:()=>$t,Root:()=>nn,RootProvider:()=>an}),{withProvider:on,withContext:$,useStyles:sn,PropsProvider:cn}=b({key:`tagsInput`});on(Q.RootProvider,`root`,{forwardAsChild:!0});var ln=on(Q.Root,`root`,{forwardAsChild:!0,defaultProps:{editable:!1}}),un=$(Q.Label,`label`,{forwardAsChild:!0}),dn=$(Q.Control,`control`,{forwardAsChild:!0}),fn=$(Q.Input,`input`,{forwardAsChild:!0}),pn=$(Q.Item,`item`,{forwardAsChild:!0}),mn=$(Q.ItemText,`itemText`,{forwardAsChild:!0}),hn=$(Q.ItemDeleteTrigger,`itemDeleteTrigger`,{forwardAsChild:!0,defaultProps:{children:(0,Z.jsx)(ze,{})}}),gn=$(Q.ItemPreview,`itemPreview`,{forwardAsChild:!0}),_n=$(Q.ItemInput,`itemInput`,{forwardAsChild:!0}),vn=$(Q.ClearTrigger,`clearTrigger`,{forwardAsChild:!0,defaultProps:{children:(0,Z.jsx)(ze,{})}}),yn=e=>(0,Z.jsx)(E,{each:Y().value,children:(t,n)=>(0,Z.jsxs)(pn,{index:n,value:t,...e,children:[(0,Z.jsxs)(gn,{children:[(0,Z.jsx)(mn,{children:t}),(0,Z.jsx)(hn,{})]}),(0,Z.jsx)(_n,{})]},n)});Q.Context,Q.HiddenInput,Q.ItemContext;function bn({open:e,onClose:t}){let n=Ze(),{hasAccess:r}=H(),i=R({refetchInterval:e?1e3:!1}),a=B.ops.cancelReplay.useMutation({onSuccess:()=>void i.refetch()}),o=i.data,s=o?.state===`running`,c=ot(o?.currentProjection),l=new Set(c),u=o?.state===`completed`?`green`:o?.state===`failed`?`red`:o?.state===`cancelled`?`orange`:`blue`,d=o&&o.aggregatesTotal>0?Math.round(o.aggregatesProcessed/o.aggregatesTotal*100):0,f=(0,X.useMemo)(()=>{if(!o?.startedAt||!o.eventsProcessed)return null;let e=((o.completedAt?new Date(o.completedAt).getTime():Date.now())-new Date(o.startedAt).getTime())/1e3;return e<1?null:Math.round(o.eventsProcessed/e)},[o?.startedAt,o?.completedAt,o?.eventsProcessed]);return(0,Z.jsx)(le,{open:e,onOpenChange:e=>{e.open||t()},placement:`end`,size:`sm`,children:(0,Z.jsxs)(oe,{children:[(0,Z.jsxs)(fe,{children:[(0,Z.jsx)(ce,{children:(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(We,{colorPalette:u,size:`sm`,children:(0,Z.jsx)(Ge,{})}),`Replay `,o?.state??`idle`]})}),(0,Z.jsx)(he,{})]}),(0,Z.jsx)(ue,{children:!o||o.state===`idle`?(0,Z.jsx)(T,{textStyle:`sm`,color:`fg.muted`,children:`No replay is currently running.`}):(0,Z.jsxs)(z,{align:`stretch`,gap:4,children:[(0,Z.jsx)(rt,{currentPhase:o.currentPhase,completedState:o.state===`running`?null:o.state}),o.currentPhase&&(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(T,{textStyle:`lg`,children:it[o.currentPhase]??`·`}),(0,Z.jsxs)(z,{align:`start`,gap:0,children:[(0,Z.jsx)(T,{textStyle:`sm`,fontWeight:`medium`,children:at[o.currentPhase]??o.currentPhase}),c.length>0&&(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:c.length===1?c[0]:`${c.length} projections`})]})]}),o.aggregatesTotal>0&&(0,Z.jsxs)(z,{align:`stretch`,gap:1,children:[(0,Z.jsxs)(P,{justify:`space-between`,children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:`Aggregates`}),(0,Z.jsxs)(T,{textStyle:`xs`,fontWeight:`medium`,children:[o.aggregatesProcessed.toLocaleString(),` / `,o.aggregatesTotal.toLocaleString(),` (`,d,`%)`]})]}),(0,Z.jsx)(Fe,{value:d,size:`sm`,colorPalette:u,children:(0,Z.jsx)(Le,{children:(0,Z.jsx)(Ie,{})})})]}),(0,Z.jsx)(De,{}),(0,Z.jsxs)(P,{gap:4,flexWrap:`wrap`,children:[(0,Z.jsxs)(F,{children:[(0,Z.jsx)(L,{children:`Events`}),(0,Z.jsx)(I,{textStyle:`lg`,children:o.eventsProcessed.toLocaleString()})]}),(0,Z.jsxs)(F,{children:[(0,Z.jsx)(L,{children:`Projections`}),(0,Z.jsx)(I,{textStyle:`lg`,children:o.projectionNames.length})]}),f!==null&&(0,Z.jsxs)(F,{children:[(0,Z.jsx)(L,{children:`Events/s`}),(0,Z.jsx)(I,{textStyle:`lg`,children:f.toLocaleString()})]}),(0,Z.jsxs)(F,{children:[(0,Z.jsx)(L,{children:`Elapsed`}),(0,Z.jsx)(I,{textStyle:`lg`,children:o.startedAt?tt(o.startedAt,o.completedAt):`—`})]})]}),(0,Z.jsxs)(z,{align:`stretch`,gap:1,children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:`Projections`}),(0,Z.jsx)(P,{gap:1,flexWrap:`wrap`,children:o.projectionNames.map(e=>(0,Z.jsx)(D,{size:`sm`,variant:s&&l.has(e)?`solid`:`subtle`,colorPalette:s&&l.has(e)?`orange`:`gray`,children:e},e))})]}),o.description&&(0,Z.jsxs)(z,{align:`stretch`,gap:1,children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:`Description`}),(0,Z.jsx)(T,{textStyle:`sm`,children:o.description})]}),o.error&&(0,Z.jsxs)(w,{padding:3,borderRadius:`md`,bg:`red.subtle`,borderWidth:`1px`,borderColor:`red.200`,children:[(0,Z.jsx)(T,{textStyle:`xs`,fontWeight:`medium`,color:`red.fg`,marginBottom:1,children:`Error`}),(0,Z.jsx)(T,{textStyle:`xs`,color:`red.fg`,children:o.error})]})]})}),(0,Z.jsx)(se,{children:(0,Z.jsxs)(P,{gap:2,width:`full`,children:[o?.runId&&(0,Z.jsx)(C,{size:`sm`,variant:`outline`,flex:1,onClick:()=>{n.push(`/ops/projections/${o.runId}`),t()},children:`Full Page View`}),s&&r&&(0,Z.jsx)(C,{size:`sm`,colorPalette:`red`,variant:`outline`,loading:a.isPending,onClick:()=>a.mutate(),children:`Cancel`})]})})]})})}function xn(){let e=Ze(),t=R(),n=B.ops.cancelReplay.useMutation({onSuccess:()=>void t.refetch()}),{hasAccess:r}=H(),i=t.data;if(!i||i.state!==`running`)return null;let a=ot(i.currentProjection);return(0,Z.jsx)(M,{borderColor:`blue.200`,borderWidth:`1px`,children:(0,Z.jsx)(N,{padding:4,children:(0,Z.jsxs)(P,{justify:`space-between`,children:[(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(We,{colorPalette:`blue`,children:(0,Z.jsx)(Ge,{})}),(0,Z.jsx)(T,{textStyle:`sm`,fontWeight:`semibold`,children:`Replay running`}),a.length>0&&(0,Z.jsx)(D,{size:`sm`,variant:`subtle`,children:a.length===1?a[0]:`${a.length} projections`})]}),(0,Z.jsxs)(P,{gap:2,children:[i.runId&&(0,Z.jsx)(C,{size:`xs`,variant:`outline`,onClick:()=>void e.push(`/ops/projections/${i.runId}`),children:`View Progress`}),r&&(0,Z.jsx)(C,{size:`xs`,colorPalette:`red`,variant:`outline`,loading:n.isPending,onClick:()=>n.mutate(),children:`Cancel`})]})]})})})}function Sn(){let e=Ze(),t=B.ops.getReplayHistory.useQuery(void 0,{refetchInterval:1e4}).data;return!t||t.length===0?null:(0,Z.jsx)(M,{overflow:`hidden`,children:(0,Z.jsxs)(N,{padding:0,children:[(0,Z.jsx)(P,{paddingX:4,paddingY:3,children:(0,Z.jsx)(T,{textStyle:`sm`,fontWeight:`medium`,children:`Replay History`})}),(0,Z.jsx)(Oe,{children:(0,Z.jsxs)(Ce,{size:`sm`,variant:`line`,css:{"& tr:last-child td":{borderBottom:`none`}},children:[(0,Z.jsx)(Te,{children:(0,Z.jsxs)(j,{children:[(0,Z.jsx)(A,{children:`Status`}),(0,Z.jsx)(A,{children:`Description`}),(0,Z.jsx)(A,{children:`Projections`}),(0,Z.jsx)(A,{textAlign:`end`,children:`Duration`}),(0,Z.jsx)(A,{textAlign:`end`,children:`Aggregates`}),(0,Z.jsx)(A,{textAlign:`end`,children:`Events`}),(0,Z.jsx)(A,{children:`When`}),(0,Z.jsx)(A,{width:`40px`})]})}),(0,Z.jsx)(Ee,{children:t.map(t=>{let n=Ke(t.state);return(0,Z.jsxs)(j,{cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>void e.push(`/ops/projections/${t.runId}`),children:[(0,Z.jsx)(k,{children:(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(We,{colorPalette:n,children:(0,Z.jsx)(Ge,{})}),(0,Z.jsx)(D,{size:`sm`,variant:`subtle`,colorPalette:n,children:t.state})]})}),(0,Z.jsx)(k,{children:(0,Z.jsx)(T,{textStyle:`xs`,truncate:!0,maxW:`300px`,children:t.description??`—`})}),(0,Z.jsx)(k,{children:(0,Z.jsxs)(T,{textStyle:`xs`,color:`fg.muted`,children:[t.projectionNames?.length??0,` projection`,(t.projectionNames?.length??0)===1?``:`s`]})}),(0,Z.jsx)(k,{textAlign:`end`,children:(0,Z.jsx)(T,{textStyle:`xs`,children:tt(t.startedAt,t.completedAt)})}),(0,Z.jsx)(k,{textAlign:`end`,children:(0,Z.jsx)(T,{textStyle:`xs`,children:(t.aggregatesProcessed??0).toLocaleString()})}),(0,Z.jsx)(k,{textAlign:`end`,children:(0,Z.jsx)(T,{textStyle:`xs`,children:(t.eventsProcessed??0).toLocaleString()})}),(0,Z.jsx)(k,{children:(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,whiteSpace:`nowrap`,children:t.startedAt?new Date(t.startedAt).toLocaleString([],{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}):`—`})}),(0,Z.jsx)(k,{children:(0,Z.jsx)(Xe,{size:12,style:{opacity:.5}})})]},t.runId)})})]})})]})})}function Cn({tenantIds:e,onTenantIdsChange:t}){let[n,r]=(0,X.useState)(``),i=B.ops.searchTenants.useQuery({query:n},{enabled:n.length>=2});return(0,Z.jsxs)(z,{align:`stretch`,gap:2,children:[(0,Z.jsxs)(ln,{size:`sm`,value:e,onValueChange:e=>t(e.value),addOnPaste:!0,delimiter:`,`,blurBehavior:`add`,validate:e=>e.inputValue.trim().length>0,children:[(0,Z.jsx)(un,{children:(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:`Tenants`})}),(0,Z.jsxs)(dn,{children:[(0,Z.jsx)(yn,{}),(0,Z.jsx)(fn,{placeholder:`Type tenant ID and press Enter...`}),(0,Z.jsx)(vn,{})]})]}),(0,Z.jsxs)(w,{position:`relative`,children:[(0,Z.jsxs)(P,{gap:2,borderWidth:`1px`,borderRadius:`md`,paddingX:3,paddingY:1.5,children:[(0,Z.jsx)(et,{size:12,color:`var(--chakra-colors-fg-muted)`}),(0,Z.jsx)(`input`,{style:{flex:1,background:`transparent`,border:`none`,outline:`none`,fontSize:`12px`,color:`inherit`},placeholder:`Search tenants by name or ID...`,value:n,onChange:e=>r(e.target.value)})]}),i.data&&i.data.length>0&&(0,Z.jsx)(w,{position:`absolute`,zIndex:10,width:`full`,borderWidth:`1px`,borderRadius:`md`,bg:`bg.panel`,shadow:`md`,maxHeight:`200px`,overflowY:`auto`,marginTop:1,children:i.data.map(n=>(0,Z.jsx)(w,{paddingX:3,paddingY:2,cursor:`pointer`,_hover:{bg:`bg.subtle`},onClick:()=>{e.includes(n.id)||t([...e,n.id]),r(``)},children:(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(T,{textStyle:`xs`,fontWeight:`medium`,children:n.name}),(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,fontFamily:`mono`,children:n.id}),e.includes(n.id)&&(0,Z.jsx)(D,{size:`sm`,colorPalette:`green`,children:`added`})]})},n.id))})]})]})}function wn({onReplayStarted:e}){let{hasAccess:t}=H(),[n,r]=(0,X.useState)([]),[i,a]=(0,X.useState)(!1),[o,s]=(0,X.useState)(``),[c,l]=(0,X.useState)(new Set),[u,d]=(0,X.useState)(``),f=B.ops.listProjections.useQuery(),p=R(),m=i||n.length>0,ee=o.length>0,h=m&&ee,g=B.ops.discoverAggregates.useQuery({projectionNames:f.data?.projections.map(e=>e.projectionName)??[],since:o,tenantIds:i?[]:n},{enabled:!1}),_=(0,X.useRef)(``);(0,X.useEffect)(()=>{if(!h)return;let e=JSON.stringify({tenantIds:i?[]:n,since:o});e!==_.current&&(_.current=e,g.refetch().then(e=>{e.data&&l(new Set(e.data.projections.filter(e=>e.aggregateCount>0).map(e=>e.projectionName)))}))},[h,i,n,o]);let te=(0,X.useMemo)(()=>new Map((f.data?.projections??[]).map(e=>[e.projectionName,e])),[f.data?.projections]),y=!!g.data,b=new Set(g.data?.projections.filter(e=>e.aggregateCount>0).map(e=>e.projectionName)??[]),x=B.ops.startReplay.useMutation({onSuccess:()=>{p.refetch(),O.create({title:`Projection replay started`,description:`Replaying ${c.size} projection${c.size===1?``:`s`}...`,type:`success`}),e()},onError:e=>{O.create({title:`Failed to start replay`,description:e.message,type:`error`})}}),[S,ne]=(0,X.useState)(null),re=B.ops.dryRunReplay.useMutation({onSuccess:e=>{ne(e),O.create({title:`Dry run complete`,description:e.message,type:`info`})},onError:e=>{O.create({title:`Dry run failed`,description:e.message,type:`error`})}});function ie(e){b.has(e)&&l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}function ae(){l(new Set(b))}let E=g.data?.projections.filter(e=>c.has(e.projectionName)).reduce((e,t)=>e+t.aggregateCount,0)??0,oe=p.data?.state===`running`;function se(){x.mutate({projectionNames:[...c],since:o,tenantIds:i?[]:n,description:u||`Manual replay`})}function ce(){re.mutate({projectionNames:[...c],since:o,tenantIds:i?[]:n})}return f.isLoading?(0,Z.jsx)($e,{paddingY:20,children:(0,Z.jsx)(v,{size:`lg`})}):f.data&&f.data.projections.length===0?(0,Z.jsx)($e,{paddingY:20,children:(0,Z.jsx)(Ve,{children:(0,Z.jsxs)(Ue,{children:[(0,Z.jsx)(Be,{children:`No projections registered`}),(0,Z.jsx)(He,{children:`No projections were found in the pipeline registry.`})]})})}):f.data?(0,Z.jsxs)(z,{align:`stretch`,gap:4,children:[(0,Z.jsx)(M,{children:(0,Z.jsxs)(N,{padding:4,children:[(0,Z.jsxs)(P,{marginBottom:3,justify:`space-between`,children:[(0,Z.jsx)(T,{textStyle:`sm`,fontWeight:`medium`,children:`1. Select tenants`}),(0,Z.jsx)(we,{size:`sm`,checked:i,onCheckedChange:e=>{a(!!e.checked),e.checked&&r([])},children:(0,Z.jsx)(T,{textStyle:`xs`,children:`All tenants`})})]}),(0,Z.jsx)(w,{opacity:i?.4:1,pointerEvents:i?`none`:`auto`,children:(0,Z.jsx)(Cn,{tenantIds:n,onTenantIdsChange:r})}),!m&&!i&&(0,Z.jsx)(T,{textStyle:`xs`,color:`orange.500`,marginTop:2,children:`At least 1 tenant is required to proceed`})]})}),(0,Z.jsx)(M,{opacity:m?1:.5,pointerEvents:m?`auto`:`none`,children:(0,Z.jsxs)(N,{padding:4,children:[(0,Z.jsx)(T,{textStyle:`sm`,fontWeight:`medium`,marginBottom:3,children:`2. Choose date range`}),(0,Z.jsxs)(P,{gap:3,alignItems:`end`,flexWrap:`wrap`,children:[(0,Z.jsxs)(w,{maxWidth:`220px`,children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Replay events since`}),(0,Z.jsx)(Qe,{type:`date`,size:`sm`,value:o,onChange:e=>s(e.target.value)})]}),(0,Z.jsx)(P,{gap:1,children:[{label:`This month`,months:0},{label:`2 months`,months:2},{label:`3 months`,months:3},{label:`6 months`,months:6}].map(({label:e,months:t})=>{let n=new Date;t===0?n.setDate(1):n.setMonth(n.getMonth()-t);let r=n.toISOString().slice(0,10);return(0,Z.jsx)(C,{size:`sm`,height:`36px`,variant:o===r?`solid`:`outline`,onClick:()=>s(r),children:e},e)})})]}),h&&g.isFetching&&(0,Z.jsxs)(P,{gap:2,marginTop:3,children:[(0,Z.jsx)(v,{size:`xs`}),(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:`Discovering aggregates...`})]})]})}),y&&(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(M,{children:(0,Z.jsxs)(N,{padding:0,overflowX:`auto`,children:[(0,Z.jsxs)(P,{paddingX:4,paddingY:3,justify:`space-between`,children:[(0,Z.jsx)(T,{textStyle:`sm`,fontWeight:`medium`,children:`3. Select projections to replay`}),(0,Z.jsx)(C,{variant:`ghost`,size:`xs`,onClick:ae,children:`Select all with data`})]}),(0,Z.jsxs)(Ce,{size:`sm`,variant:`line`,children:[(0,Z.jsx)(Te,{children:(0,Z.jsxs)(j,{children:[(0,Z.jsx)(A,{width:`40px`}),(0,Z.jsx)(A,{children:`Projection`}),(0,Z.jsx)(A,{children:`Pipeline`}),(0,Z.jsx)(A,{textAlign:`end`,children:`Aggregates`}),(0,Z.jsx)(A,{children:`Tenants`})]})}),(0,Z.jsx)(Ee,{children:g.data.projections.map(e=>{let t=e.aggregateCount>0,n=te.get(e.projectionName),r=c.has(e.projectionName);return(0,Z.jsxs)(j,{cursor:t?`pointer`:`default`,opacity:t?1:.4,onClick:()=>ie(e.projectionName),_hover:t?{bg:`bg.subtle`}:void 0,bg:r?`bg.subtle`:void 0,children:[(0,Z.jsx)(k,{children:(0,Z.jsx)(we,{checked:r,disabled:!t,onCheckedChange:()=>ie(e.projectionName)})}),(0,Z.jsx)(k,{children:(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(T,{textStyle:`sm`,children:e.projectionName}),n&&(0,Z.jsx)(D,{size:`sm`,variant:`subtle`,colorPalette:n.kind===`map`?`purple`:`blue`,children:n.kind===`map`?`map`:`fold`}),!t&&(0,Z.jsx)(D,{size:`sm`,variant:`subtle`,colorPalette:`gray`,children:`no data`})]})}),(0,Z.jsx)(k,{children:(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:n?.pipelineName??`—`})}),(0,Z.jsx)(k,{textAlign:`end`,children:(0,Z.jsx)(T,{fontWeight:`medium`,children:e.aggregateCount})}),(0,Z.jsx)(k,{children:(0,Z.jsxs)(T,{textStyle:`xs`,color:`fg.muted`,children:[e.tenantBreakdown.length,` tenant`,e.tenantBreakdown.length===1?``:`s`]})})]},e.projectionName)})})]})]})}),c.size>0&&(0,Z.jsx)(M,{children:(0,Z.jsxs)(N,{padding:4,children:[(0,Z.jsxs)(P,{gap:6,marginBottom:4,children:[(0,Z.jsxs)(F,{children:[(0,Z.jsx)(L,{children:`Selected Aggregates`}),(0,Z.jsx)(I,{children:E})]}),(0,Z.jsxs)(F,{children:[(0,Z.jsx)(L,{children:`Projections`}),(0,Z.jsx)(I,{children:c.size})]}),(0,Z.jsxs)(F,{children:[(0,Z.jsx)(L,{children:`Tenants`}),(0,Z.jsx)(I,{children:i?`All`:n.length})]})]}),t&&(0,Z.jsxs)(z,{align:`stretch`,gap:3,children:[(0,Z.jsxs)(w,{children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Description (for audit log)`}),(0,Z.jsx)(qe,{size:`sm`,placeholder:`Describe the reason for this replay...`,value:u,onChange:e=>d(e.target.value),rows:2})]}),(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(C,{size:`sm`,colorPalette:`orange`,disabled:oe||E===0,loading:x.isPending,onClick:se,children:`Start Full Replay`}),(0,Z.jsx)(C,{size:`sm`,variant:`outline`,disabled:oe||E===0,loading:re.isPending,onClick:ce,children:`Dry Run (5 aggregates)`}),oe&&(0,Z.jsx)(T,{textStyle:`xs`,color:`orange.500`,children:`A replay is already running`})]}),(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:`Full replay pauses projections, drains active jobs, replays events from ClickHouse, then unpauses. Dry run processes 5 sample aggregates in memory without writing.`}),S&&(0,Z.jsx)(M,{borderColor:`blue.200`,borderWidth:`1px`,children:(0,Z.jsxs)(N,{padding:3,children:[(0,Z.jsx)(T,{textStyle:`xs`,fontWeight:`medium`,color:`blue.500`,marginBottom:1,children:`Dry Run Result`}),(0,Z.jsx)(T,{textStyle:`sm`,children:S.message}),(0,Z.jsxs)(T,{textStyle:`xs`,color:`fg.muted`,marginTop:1,children:[`Projections:`,` `,S.projectionNames.join(`, `),` | Sample size: `,S.sampleSize]})]})})]})]})})]})]}):null}function Tn({projections:e,onReplayStarted:t}){let n=R(),r=n.data?.state===`running`,[i,a]=(0,X.useState)(``),[o,s]=(0,X.useState)(``),[c,l]=(0,X.useState)(new Set),[u]=(0,X.useState)(()=>{let e=new Date;return e.setMonth(e.getMonth()-3),e.toISOString().slice(0,10)}),d=B.ops.startReplay.useMutation({onSuccess:()=>{n.refetch(),O.create({title:`Single aggregate replay started`,type:`success`}),t()},onError:e=>{O.create({title:`Failed to start replay`,description:e.message,type:`error`})}});function f(e){l(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return(0,Z.jsxs)(z,{align:`stretch`,gap:2,children:[(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsxs)(w,{flex:1,children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Aggregate ID`}),(0,Z.jsx)(Qe,{size:`sm`,placeholder:`e.g. trace_abc123`,value:i,onChange:e=>a(e.target.value),fontFamily:`mono`})]}),(0,Z.jsxs)(w,{flex:1,children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Tenant ID`}),(0,Z.jsx)(Qe,{size:`sm`,placeholder:`e.g. project_xyz`,value:o,onChange:e=>s(e.target.value),fontFamily:`mono`})]})]}),(0,Z.jsxs)(w,{children:[(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,marginBottom:1,children:`Projections`}),(0,Z.jsx)(P,{gap:1,flexWrap:`wrap`,children:e.map(e=>(0,Z.jsx)(D,{size:`sm`,variant:c.has(e.projectionName)?`solid`:`outline`,colorPalette:c.has(e.projectionName)?`orange`:`gray`,cursor:`pointer`,onClick:()=>f(e.projectionName),children:e.projectionName},e.projectionName))})]}),(0,Z.jsxs)(P,{gap:2,children:[(0,Z.jsx)(C,{size:`sm`,variant:`outline`,disabled:!i.trim()||!o.trim()||c.size===0||r,loading:d.isPending,onClick:()=>{d.mutate({projectionNames:[...c],since:u,tenantIds:[o.trim()],aggregateIds:[i.trim()],description:`Single aggregate replay: ${i.trim()}`})},children:`Replay Single`}),(0,Z.jsx)(T,{textStyle:`xs`,color:`fg.muted`,children:`Replays selected projections for a single tenant (events from last 3 months)`})]})]})}function En(){let{hasAccess:e}=H(),[t,n]=(0,X.useState)(!1),[r,i]=(0,X.useState)(!1),a=B.ops.listProjections.useQuery().data?.projections??[];return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsxs)(z,{align:`stretch`,gap:4,children:[(0,Z.jsx)(xn,{}),(0,Z.jsx)(wn,{onReplayStarted:()=>n(!0)}),e&&a.length>0&&(0,Z.jsxs)(de,{open:r,onOpenChange:e=>i(e.open),children:[(0,Z.jsx)(pe,{asChild:!0,children:(0,Z.jsx)(w,{cursor:`pointer`,userSelect:`none`,children:(0,Z.jsxs)(P,{gap:2,paddingY:1,children:[(0,Z.jsx)(T,{textStyle:`xs`,fontWeight:`medium`,color:`fg.muted`,children:`Advanced: Single Aggregate Replay`}),(0,Z.jsx)(Je,{size:12,style:{transform:r?`rotate(180deg)`:`none`,transition:`transform 0.15s`}})]})})}),(0,Z.jsx)(me,{children:(0,Z.jsx)(M,{marginTop:2,children:(0,Z.jsx)(N,{padding:4,children:(0,Z.jsx)(Tn,{projections:a,onReplayStarted:()=>n(!0)})})})})]}),(0,Z.jsx)(Sn,{})]}),(0,Z.jsx)(bn,{open:t,onClose:()=>n(!1)})]})}function Dn(){return(0,Z.jsx)(nt,{children:(0,Z.jsxs)(Ye,{children:[(0,Z.jsx)(Re.Header,{children:(0,Z.jsx)(Re.Heading,{children:`Projection Replay`})}),(0,Z.jsx)(Re.Container,{children:(0,Z.jsx)(En,{})})]})})}export{Dn as default};
2
- //# sourceMappingURL=projections-yljzVGg_.js.map
@@ -1,2 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{r as n}from"./portal-FJIui2Z2.js";import{t as r}from"./jsx-runtime-CFwixLRt.js";import{t as i}from"./box-Ck5lef6C.js";import{t as a}from"./text-A3qvcMyN.js";import{An as o,cn as s}from"./useLiteMemberGuard-klZnweA7.js";import{n as c}from"./info-CtYT35g4.js";import{n as l}from"./toaster-CRP22oRW.js";import{$ as u,I as d,Q as f,X as p,Y as m,Z as h,et as g,nt as _}from"./ExternalImage-DbtOSrKl.js";import{a as v,n as y,r as b}from"./field-Dz4Xmo3X.js";import{t as x}from"./h-stack-CMPhqSp5.js";import{t as S}from"./spacer-CbmCSsJg.js";import{t as C}from"./v-stack-ClAMS101.js";import{r as w}from"./next-router-Bn5Y8Iek.js";import{Ar as T,ni as E,nr as D}from"./index-CUhcyBp3.js";import{n as O}from"./index.module-CJLn6vye.js";import{t as k}from"./switch-vUOdjiD1.js";import{a as A,n as j,r as M,t as N}from"./_shell-JRkk6wPs.js";import{n as P,r as F}from"./useAdminResource-DCHLEJ-V.js";var I=e(t()),L=r(),R=25;function z(){let e=w(),t=(0,I.useRef)(typeof e.query.q==`string`?e.query.q:``),[n,r]=(0,I.useState)(1),[s,l]=(0,I.useState)(t.current),[_]=O(s,300),[v,y]=(0,I.useState)(null),b=P(`project`,{pagination:{page:n,perPage:R},sort:{field:`createdAt`,order:`DESC`},filter:_?{query:_}:{}});return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(j,{title:`Projects`,searchValue:s,onSearchChange:e=>{l(e),r(1)},searchPlaceholder:`Search by ID, name, or slug`,isLoading:b.isLoading,isFetching:b.isFetching,error:b.error,pagination:{page:n,perPage:R,total:b.data?.total??0,onPageChange:r},children:(0,L.jsxs)(u,{variant:`line`,size:`md`,width:`full`,children:[(0,L.jsx)(f,{children:(0,L.jsxs)(g,{children:[(0,L.jsx)(h,{children:`ID`}),(0,L.jsx)(h,{children:`Name`}),(0,L.jsx)(h,{children:`Slug`}),(0,L.jsx)(h,{children:`Language`}),(0,L.jsx)(h,{children:`Framework`}),(0,L.jsx)(h,{children:`Status`}),(0,L.jsx)(h,{children:`Created`}),(0,L.jsx)(h,{width:`60px`,textAlign:`right`})]})}),(0,L.jsxs)(m,{children:[b.data?.data.length===0&&(0,L.jsx)(g,{children:(0,L.jsx)(p,{colSpan:8,children:(0,L.jsx)(a,{color:`fg.muted`,textAlign:`center`,paddingY:6,children:`No projects match your search.`})})}),b.data?.data.map(e=>(0,L.jsxs)(g,{children:[(0,L.jsx)(p,{fontSize:`xs`,color:`fg.muted`,children:e.id}),(0,L.jsx)(p,{children:e.name}),(0,L.jsx)(p,{children:e.slug}),(0,L.jsx)(p,{children:e.language??(0,L.jsx)(M,{})}),(0,L.jsx)(p,{children:e.framework??(0,L.jsx)(M,{})}),(0,L.jsx)(p,{children:e.archivedAt?(0,L.jsx)(c,{size:`sm`,colorPalette:`gray`,children:`Archived`}):e.integrated?(0,L.jsx)(c,{size:`sm`,colorPalette:`green`,children:`Integrated`}):(0,L.jsx)(c,{size:`sm`,colorPalette:`yellow`,children:`Pending`})}),(0,L.jsx)(p,{children:A(e.createdAt)}),(0,L.jsx)(p,{textAlign:`right`,children:(0,L.jsx)(i,{width:`full`,height:`full`,display:`flex`,justifyContent:`end`,children:(0,L.jsxs)(d.Root,{children:[(0,L.jsx)(d.Trigger,{children:(0,L.jsx)(o,{size:16})}),(0,L.jsx)(d.Content,{children:(0,L.jsxs)(d.Item,{value:`edit`,onClick:()=>y(e),children:[(0,L.jsx)(D,{size:16}),`Edit`]})})]})})})]},e.id))]})]})}),(0,L.jsx)(V,{project:v,onClose:()=>y(null)})]})}function B(e){return e.trim()===``?null:e}function V({project:e,onClose:t}){let r=F(`project`),[i,o]=(0,I.useState)(null);(0,I.useEffect)(()=>{e&&o({name:e.name,slug:e.slug,language:e.language??``,framework:e.framework??``,firstMessage:!!e.firstMessage,integrated:!!e.integrated,userLinkTemplate:e.userLinkTemplate??``,traceSharingEnabled:!!e.traceSharingEnabled,s3Endpoint:``,s3AccessKeyId:``,s3SecretAccessKey:``,s3Bucket:``,archive:!!e.archivedAt})},[e]);let c=(e,t)=>o(n=>n&&{...n,[e]:t});return(0,L.jsx)(s.Root,{open:!!e,onOpenChange:({open:e})=>{e||t()},size:`md`,children:(0,L.jsxs)(s.Content,{children:[(0,L.jsx)(s.Header,{children:(0,L.jsx)(s.Title,{children:`Edit Project`})}),(0,L.jsx)(s.CloseTrigger,{}),(0,L.jsx)(s.Body,{children:e&&i&&(0,L.jsxs)(C,{gap:4,align:`stretch`,children:[(0,L.jsx)(H,{children:`Identity`}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Name`}),(0,L.jsx)(T,{value:i.name,onChange:e=>c(`name`,e.target.value)})]}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Slug`}),(0,L.jsx)(T,{value:i.slug,onChange:e=>c(`slug`,e.target.value)}),(0,L.jsx)(y,{children:`URL-safe identifier. Changing this can break existing links.`})]}),(0,L.jsxs)(x,{gap:3,children:[(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Language`}),(0,L.jsx)(T,{value:i.language,onChange:e=>c(`language`,e.target.value)})]}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Framework`}),(0,L.jsx)(T,{value:i.framework,onChange:e=>c(`framework`,e.target.value)})]})]}),(0,L.jsx)(H,{children:`Onboarding flags`}),(0,L.jsx)(U,{label:`First message received`,hint:`Flipped by the collector on the first ingested trace.`,checked:i.firstMessage,onChange:e=>c(`firstMessage`,e)}),(0,L.jsx)(U,{label:`Integrated`,hint:`Tenant-visible ‘setup complete’ state.`,checked:i.integrated,onChange:e=>c(`integrated`,e)}),(0,L.jsx)(H,{children:`Privacy`}),(0,L.jsx)(U,{label:`Trace sharing enabled`,hint:`Allow operators to generate public share links for traces.`,checked:i.traceSharingEnabled,onChange:e=>c(`traceSharingEnabled`,e)}),(0,L.jsx)(H,{children:`Integrations`}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`User link template`}),(0,L.jsx)(T,{value:i.userLinkTemplate,onChange:e=>c(`userLinkTemplate`,e.target.value),placeholder:`e.g. https://app.acme.com/users/{{userId}}`})]}),(0,L.jsx)(H,{children:`Project S3`}),(0,L.jsx)(a,{fontSize:`xs`,color:`fg.muted`,children:`Credentials below are write-only — the server never reads them back. Leave blank to keep the stored value; type to replace.`}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Endpoint`}),(0,L.jsx)(T,{type:`url`,value:i.s3Endpoint,onChange:e=>c(`s3Endpoint`,e.target.value),placeholder:`Leave blank to keep current`})]}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Bucket`}),(0,L.jsx)(T,{value:i.s3Bucket,onChange:e=>c(`s3Bucket`,e.target.value),placeholder:`Leave blank to keep current`})]}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Access key ID`}),(0,L.jsx)(T,{type:`password`,value:i.s3AccessKeyId,onChange:e=>c(`s3AccessKeyId`,e.target.value),placeholder:`Leave blank to keep current`,autoComplete:`new-password`})]}),(0,L.jsxs)(v,{children:[(0,L.jsx)(b,{children:`Secret access key`}),(0,L.jsx)(T,{type:`password`,value:i.s3SecretAccessKey,onChange:e=>c(`s3SecretAccessKey`,e.target.value),placeholder:`Leave blank to keep current`,autoComplete:`new-password`})]}),(0,L.jsx)(H,{children:`Lifecycle`}),(0,L.jsx)(U,{label:`Archived`,hint:`Hides the project from the UI and stops it from accruing limits.`,checked:i.archive,onChange:e=>c(`archive`,e)}),(0,L.jsx)(_,{my:2}),(0,L.jsxs)(C,{align:`start`,gap:0,children:[(0,L.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`Project ID: `,e.id]}),(0,L.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`Team: `,e.teamId]}),(0,L.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`API key: `,e.apiKey]}),e.archivedAt&&(0,L.jsxs)(a,{fontSize:`xs`,color:`fg.muted`,children:[`Archived at: `,A(e.archivedAt)]})]})]})}),(0,L.jsx)(s.Footer,{children:(0,L.jsxs)(x,{width:`full`,children:[(0,L.jsx)(S,{}),(0,L.jsx)(n,{variant:`ghost`,onClick:t,children:`Cancel`}),(0,L.jsx)(n,{loading:r.isPending,onClick:()=>{if(!e||!i)return;let n={};i.name!==e.name&&(n.name=i.name),i.slug!==e.slug&&(n.slug=i.slug),i.language!==(e.language??``)&&(n.language=i.language),i.framework!==(e.framework??``)&&(n.framework=i.framework),i.firstMessage!==!!e.firstMessage&&(n.firstMessage=i.firstMessage),i.integrated!==!!e.integrated&&(n.integrated=i.integrated),i.userLinkTemplate!==(e.userLinkTemplate??``)&&(n.userLinkTemplate=B(i.userLinkTemplate)),i.traceSharingEnabled!==!!e.traceSharingEnabled&&(n.traceSharingEnabled=i.traceSharingEnabled),i.s3Endpoint.trim()!==``&&(n.s3Endpoint=i.s3Endpoint),i.s3AccessKeyId.trim()!==``&&(n.s3AccessKeyId=i.s3AccessKeyId),i.s3SecretAccessKey.trim()!==``&&(n.s3SecretAccessKey=i.s3SecretAccessKey),i.s3Bucket.trim()!==``&&(n.s3Bucket=i.s3Bucket);let a=!!e.archivedAt;if(i.archive!==a&&(n.archivedAt=i.archive?new Date().toISOString():null),Object.keys(n).length===0){t();return}r.mutate({id:e.id,data:n},{onSuccess:()=>{l.create({title:`Project updated`,type:`success`,duration:3e3,meta:{closable:!0}}),t()},onError:e=>l.create({title:`Update failed`,description:e.message,type:`error`,duration:5e3,meta:{closable:!0}})})},children:`Save`})]})})]})})}function H({children:e}){return(0,L.jsx)(E,{as:`h3`,size:`xs`,color:`fg.muted`,textTransform:`uppercase`,letterSpacing:`wider`,pt:2,children:e})}function U({label:e,hint:t,checked:n,onChange:r}){return(0,L.jsx)(v,{children:(0,L.jsxs)(x,{width:`full`,children:[(0,L.jsxs)(C,{align:`start`,gap:0,children:[(0,L.jsx)(b,{children:e}),t&&(0,L.jsx)(a,{fontSize:`xs`,color:`fg.muted`,children:t})]}),(0,L.jsx)(S,{}),(0,L.jsx)(k,{checked:n,onCheckedChange:e=>r(e.checked)})]})})}function W(){return(0,L.jsx)(N,{children:(0,L.jsx)(z,{})})}export{W as default};
2
- //# sourceMappingURL=projects-DbpxS5ex.js.map
@@ -1,2 +0,0 @@
1
- import{r as e,t}from"./_baseEach-CJ0DbEY4.js";import{O as n}from"./_Uint8Array-B8b3z1r6.js";import{t as r}from"./_baseAssignValue-D7YNnh37.js";function i(e,t,n,r){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function a(e,n,r,i){return t(e,function(e,t,a){n(i,e,r(e),a)}),i}function o(t,r){return function(o,s){var c=n(o)?i:a,l=r?r():{};return c(o,t,e(s,2),l)}}var s=Object.prototype.hasOwnProperty,c=o(function(e,t,n){s.call(e,n)?e[n].push(t):r(e,n,[t])}),l=`New Prompt`;function u(e){return e?e.split(`/`).at(-1)||e:l}function d(e){return e?.includes(`/`)&&e.split(`/`)[0]||void 0}export{c as i,u as n,d as r,l as t};
2
- //# sourceMappingURL=promptHandle-BwdZsauS.js.map
@@ -1,8 +0,0 @@
1
- import{o as e}from"./rolldown-runtime-DAXXjFlN.js";import{t}from"./react-BUD3sqOU.js";import{i as n,r}from"./portal-FJIui2Z2.js";import{t as i}from"./jsx-runtime-CFwixLRt.js";import{t as a}from"./box-Ck5lef6C.js";import{r as o,t as s}from"./skeleton-YwQIu7Tp.js";import{t as c}from"./text-A3qvcMyN.js";import{_ as l,a as u,lr as d,m as f,o as p,p as m,u as h}from"./useLiteMemberGuard-klZnweA7.js";import{t as g}from"./tooltip-Croc0I6e.js";import{n as _}from"./toaster-CRP22oRW.js";import{H as v,I as y,L as b,W as x,z as S}from"./ExternalImage-DbtOSrKl.js";import{t as C}from"./icon-CkSWK_vf.js";import{r as w}from"./UpgradeModal-BmLw5ONS.js";import{a as T,i as E,n as D,r as O,t as k}from"./empty-state-Al7XUd1I.js";import{t as A}from"./h-stack-CMPhqSp5.js";import{t as ee}from"./spacer-CbmCSsJg.js";import{i as j,o as M,r as N,t as P}from"./tabs-DdHsJkYS.js";import{I as F,s as I}from"./immer-tl_oI9yy.js";import{t as L}from"./v-stack-ClAMS101.js";import{E as te,T as R,d as z,f as ne,h as re,m as ie,n as ae,r as oe,u as se,x as ce}from"./variables-fv0lgY95.js";import{_ as le,b as ue,c as de,d as fe,g as pe,m as me,o as he,p as ge,t as B,v as _e,y as ve}from"./DashboardLayout-RHGL-98_.js";import{i as ye}from"./PropertySectionTitle-CK67qoQ9.js";import{r as be}from"./next-router-Bn5Y8Iek.js";import{f as xe,n as V,u as H}from"./api-BK6L1im2.js";import{t as Se}from"./arrow-up-BUkai5Np.js";import{t as Ce}from"./copy-MuDrLrYT.js";import{t as we}from"./refresh-cw-CFMVkCi4.js";import{H as Te,Jt as Ee,L as De,On as Oe,S as U,Wt as ke,_n as Ae,cn as je,et as Me,p as Ne,q as Pe,z as Fe}from"./lu-DlSq9Be4.js";import{Mr as W,Rt as G,pr as Ie,yt as K}from"./index-CUhcyBp3.js";import{i as Le,n as q,r as Re}from"./promptHandle-BwdZsauS.js";import{t as ze}from"./WithPermissionGuard-BP1dFkpM.js";import{t as Be}from"./useLicenseEnforcement-DRk7-NQ0.js";import{t as Ve}from"./useModelProvidersSettings-DwRsXmh4.js";import{n as He,t as Ue}from"./useProjectsForCopy-DxbxCEv5.js";import{t as We}from"./PushToCopiesDialog-C3eBpZ9F.js";import{t as Ge}from"./DeleteConfirmationDialog-7K0S0Qdq.js";import{i as Ke}from"./types-DV4H6wK9.js";import{i as qe,t as Je}from"./VersionBadge-8Mh0h6z8.js";import{t as J}from"./useAllPromptsForProject-BY-Cnuhg.js";import{t as Ye}from"./LangyContextTarget-DUSindiC.js";import{t as Xe}from"./SetupWithAgentButton-BKWI-UTU.js";import{t as Ze}from"./persistence-ChzYQRy2.js";import{t as Qe}from"./humanReadableId-ClEZjP0Y.js";var Y=e(t()),$e=`Welcome to the LangWatch Prompt Playground
2
-
3
- Edit this template to get started
4
-
5
- Add variables via double brackets like this: {{input}}
6
-
7
- `;function X(){let{project:e}=G(),{modelMetadata:t}=Ve({projectId:e?.id}),{addTab:n}=p(({addTab:e})=>({addTab:e})),r=V.modelProvider.getResolvedDefault.useQuery({projectId:e?.id??``,featureKey:`prompt.create_default`},{enabled:!!e?.id});return{createDraftPrompt:(0,Y.useCallback)(async()=>{let e=r.data?.model??``,i=l({version:{configData:{llm:{model:e,maxTokens:ye(e?t?.[e]:void 0)},messages:[{content:$e}]}}});return n({data:{chat:{initialMessagesFromSpanData:[]},form:{currentValues:i},meta:{title:i.handle},variableValues:{}}}),setTimeout(()=>{document.querySelector(`textarea[data-role="system"]`)?.focus()},100),{defaultValues:i}},[n,t,r.data?.model])}}var Z=i();function et({iconOnly:e}){let{createDraftPrompt:t}=X(),{checkAndProceed:n}=Be(`prompts`),{hasPermission:r}=G(),i=xe(e=>e.openLiteMemberRestriction);return(0,Z.jsx)(g,{content:`New Prompt`,disabled:!e,children:(0,Z.jsxs)(w.HeaderButton,{onClick:()=>{if(!r(`prompts:create`)){i({resource:`prompts`});return}n(()=>{t()})},children:[(0,Z.jsx)(Ee,{size:14}),!e&&`New Prompt`]})})}var tt=e=>{let t=e.form.currentValues.version?.configData;if(!t)return;let n=t.llm,r=t.messages??[],i=t.inputs??[],a=t.outputs??[],o=n?.litellmParams?Object.fromEntries(Object.entries(n.litellmParams).filter(e=>e[1]!==void 0)):void 0;return{llm:{model:n?.model??`openai/gpt-4o`,temperature:n?.temperature??void 0,maxTokens:n?.maxTokens??void 0,litellmParams:o},messages:r.filter(e=>e!==void 0).map(e=>({role:e.role,content:e.content??``})),inputs:i.filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`input`,type:e.type??`str`})),outputs:a.filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`output`,type:e.type??`str`,json_schema:e.json_schema??void 0}))}},nt=(e,t)=>{let n=e.form.currentValues.configId,r=e.form.currentValues;return!n||!r.handle||!t?!0:r?!ne(h({prompt:t,useSystemMessage:!0}),r):!1},rt=(e,t,n,r)=>{let i=e.form.currentValues.configId,a=e.form.currentValues.versionMetadata?.versionId,o=e.form.currentValues.version?.configData,s=(o?.inputs??[]).filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`input`,type:e.type??`str`})),c=(o?.outputs??[]).filter(e=>e!==void 0).map(e=>({identifier:e.identifier??`output`,type:e.type??`str`})),l=nt(e,r),u={id:`target_${Date.now()}_${t}`,type:`prompt`,promptId:i??void 0,promptVersionId:a??void 0,promptVersionNumber:i?e.meta.versionNumber:void 0,localPromptConfig:l?tt(e):void 0,inputs:s,outputs:c,mappings:{}},d=qe(u,n);return{...u,mappings:d}};function it({iconOnly:e}){let{project:t,hasPermission:i}=G(),a=be(),[o,s]=(0,Y.useState)(!1),[l,u]=(0,Y.useState)(!1),d=V.useContext(),{isComparing:f,allTabs:m,activeTab:h}=p(e=>{let t=e.windows.find(t=>t.id===e.activeWindowId);return{isComparing:e.windows.length>1,allTabs:e.windows.flatMap(e=>e.tabs),activeTab:t?.tabs.find(e=>e.id===t?.activeTabId)}}),_=m.length,v=_===0||!i(`evaluations:manage`),y=(0,Y.useMemo)(()=>m.map(e=>e.data.form.currentValues.configId).filter(e=>!!e),[m]),b=V.useQueries(e=>y.map(n=>{let r=m.find(e=>e.data.form.currentValues.configId===n)?.data.form.currentValues.versionMetadata?.versionId;return e.prompts.getByIdOrHandle({idOrHandle:n,projectId:t?.id??``,versionId:r},{enabled:!!t?.id&&o,staleTime:6e4})})),x=b.some(e=>e.isLoading),S=(0,Y.useMemo)(()=>{let e=new Map;return y.forEach((t,n)=>{let r=b[n];r?.isLoading||e.set(t,r?.data??null)}),e},[y,b]),C=V.experiments.saveEvaluationsV3.useMutation({onSuccess:e=>{d.experiments.getAllForEvaluationsList.invalidate(),a.push(`/${t?.slug}/experiments/workbench/${e.slug}`),u(!1),s(!1)},onError:()=>{u(!1)}});return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(g,{content:`Experiment`,disabled:!e,children:(0,Z.jsxs)(w.HeaderButton,{onClick:()=>s(!0),disabled:v,title:v?`Open a prompt to create an experiment`:void 0,children:[(0,Z.jsx)(Ie,{size:`18px`}),!e&&`Experiment`]})}),(0,Z.jsx)(K.Root,{open:o,onOpenChange:({open:e})=>s(e),children:(0,Z.jsxs)(K.Content,{bg:`bg`,children:[(0,Z.jsx)(K.Header,{children:(0,Z.jsx)(K.Title,{children:`Create Experiment`})}),(0,Z.jsx)(K.Body,{children:(0,Z.jsx)(c,{children:!f||_===1?`Create new experiment with this prompt?`:`Create new experiment with these prompts? (${_} prompts)`})}),(0,Z.jsxs)(K.Footer,{children:[(0,Z.jsx)(r,{variant:`ghost`,onClick:()=>s(!1),disabled:l,children:`Cancel`}),(0,Z.jsxs)(r,{colorPalette:`blue`,onClick:()=>{if(!t?.id||l||x)return;u(!0);let e=Qe(),n=Ke();n.name=e,n.targets=(f||!h?m:[h]).map((e,t)=>{let r=e.data.form.currentValues.configId,i=r?S.get(r):null;return rt(e.data,t,n.datasets,i)});let r=Ze(n);C.mutate({projectId:t.id,experimentId:void 0,state:{...r,experimentSlug:e}})},disabled:l||x,children:[(l||x)&&(0,Z.jsx)(n,{size:`sm`,marginRight:2}),x?`Loading...`:`Create`]})]}),(0,Z.jsx)(K.CloseTrigger,{})]})})]})}var at=({isOutdated:e,configId:t,allTabsData:n})=>{if(e)return!0;if(!t)return!1;let r=n.filter(e=>e.configId===t);return r.length<=1?!1:new Set(r.map(e=>e.versionNumber)).size>1};function ot(e){let t=z(e),n=se(e),r=t?.data.form.currentValues?.configId,i=t?.data.meta.versionNumber,{latestVersion:a,isOutdated:o}=ce({configId:r,currentVersion:i}),s=p(e=>at({isOutdated:o,configId:r,allTabsData:e.windows.flatMap(e=>e.tabs).map(e=>({configId:e.data.form.currentValues?.configId,versionNumber:e.data.meta.versionNumber}))}));return{title:t?.data.meta.title??`New Prompt`,hasUnsavedChanges:n,versionNumber:i,latestVersion:a,isOutdated:o,showVersionBadge:s}}function st({tabIds:e,activeTabId:t,onSelect:n,scrollerRef:i,isStripOverflowing:a}){if(!a||e.length<=1)return null;let o=e=>{let t=i.current;t&&Array.from(t.querySelectorAll(`[data-tab-strip-id]`)).find(t=>t.getAttribute(`data-tab-strip-id`)===e)?.scrollIntoView({behavior:`smooth`,inline:`nearest`,block:`nearest`})},s=e=>{e!==t&&n(e),o(e)};return(0,Z.jsxs)(v,{lazyMount:!0,unmountOnExit:!0,children:[(0,Z.jsx)(x,{asChild:!0,children:(0,Z.jsxs)(r,{size:`2xs`,variant:`plain`,flexShrink:0,alignSelf:`center`,height:`24px`,minWidth:`auto`,gap:.5,paddingX:1,borderRadius:`sm`,whiteSpace:`nowrap`,color:`fg.subtle`,_hover:{background:`bg.subtle`,color:`fg`},_focusVisible:{outline:`none`,background:`bg.subtle`},"aria-label":`Show ${e.length} open prompts`,children:[(0,Z.jsx)(c,{fontSize:`xs`,fontWeight:`medium`,children:e.length}),(0,Z.jsx)(U,{size:11})]})}),(0,Z.jsx)(b,{minWidth:`240px`,children:e.map(e=>(0,Z.jsx)(ct,{tabId:e,isActive:e===t,onSelect:s},e))})]})}function ct({tabId:e,isActive:t,onSelect:n}){let{title:r,hasUnsavedChanges:i,versionNumber:a,showVersionBadge:s}=ot(e),l=Re(r),u=q(r);return(0,Z.jsx)(S,{value:e,onClick:()=>n(e),"aria-current":t?`true`:void 0,fontWeight:t?`semibold`:void 0,children:(0,Z.jsxs)(A,{gap:2,width:`full`,minWidth:0,children:[(0,Z.jsxs)(c,{textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,minWidth:0,children:[l&&(0,Z.jsxs)(c,{as:`span`,color:`fg.subtle`,children:[l,`/`]}),u]}),i&&(0,Z.jsx)(o,{"data-testid":`unsaved-indicator`,size:`8px`,bg:`orange.solid`,flexShrink:0}),s&&a!=null&&(0,Z.jsxs)(c,{fontSize:`xs`,color:`fg.muted`,flexShrink:0,children:[`v`,a]})]})})}function lt(e,t){let n=n=>{let r=t(n);return(0,Z.jsx)(e,{...n,...r})};return n.displayName=`withController(${e.displayName??e.name??`Component`})`,n}function ut(){let e=te(),{title:t,hasUnsavedChanges:n,versionNumber:r,latestVersion:i,isOutdated:a,showVersionBadge:o}=ot(e),s=z(e),c=p(e=>e.removeTab),l=p(e=>e.updateTabData),u=s?.data.form.currentValues?.configId,d=!u,{getPromptById:h}=f();return{tab:s,title:t,hasUnsavedChanges:n,handleClose:t=>{t.stopPropagation(),!((n||d)&&!confirm(`Your unsaved changes will be lost. Proceed anyway?`))&&c({tabId:e})},versionNumber:r,latestVersion:i,isOutdated:a,handleUpgrade:(0,Y.useCallback)(async()=>{if(u)try{let t=await h({id:u});if(!t)throw Error(`Prompt not found`);let n=m(t);l({tabId:e,updater:e=>({...e,form:{currentValues:n},meta:{...e.meta,versionNumber:t.version}})})}catch(e){console.error(`Failed to load latest prompt version:`,e)}},[u,h,e,l]),showVersionBadge:o}}function dt({tab:e,title:t,hasUnsavedChanges:n,dimmed:r,isActive:i,isCrowded:s,handleClose:l,versionNumber:u,latestVersion:d,isOutdated:f,handleUpgrade:p,showVersionBadge:m,...h}){let[g,_]=(0,Y.useState)(!1);if(!e)return null;let v=q(t),y=!s||i||g;return(0,Z.jsxs)(A,{gap:2,height:`full`,width:`full`,minWidth:0,onMouseEnter:()=>_(!0),onMouseLeave:()=>_(!1),...h,children:[(0,Z.jsxs)(A,{gap:2,minWidth:0,flex:`1 1 0`,children:[(0,Z.jsx)(c,{textOverflow:`ellipsis`,whiteSpace:`nowrap`,overflow:`hidden`,minWidth:0,title:t,children:v}),n&&(0,Z.jsx)(a,{flexShrink:0,children:(0,Z.jsx)(o,{size:`10px`,bg:`orange.solid`})}),m&&u!=null&&(0,Z.jsx)(a,{flexShrink:0,children:(0,Z.jsx)(Je,{version:u,latestVersion:d,onUpgrade:f?p:void 0})})]}),y&&(0,Z.jsx)(a,{role:`button`,"aria-label":`Close ${v}`,borderRadius:`3px`,transition:`all 0.1s ease-in-out`,opacity:r?.25:1,flexShrink:0,_hover:{opacity:1},onPointerDown:e=>{e.stopPropagation()},onClick:l,marginRight:-1,children:(0,Z.jsx)(Oe,{width:`18px`})})]})}var ft=lt(dt,ut),pt=Y.createContext(null),mt=Y.createContext(null);function ht(){let e=Y.useContext(mt);if(!e)throw Error(`Tab components must be used within DraggableTabsBrowser.Window`);return e}function gt({children:e,onTabMove:t}){let[n,r]=Y.useState(null),i=ve(_e(pe,{activationConstraint:{distance:8}}));function a(e){let{windowId:t,tabId:n,label:i}=e.active.data.current;r({windowId:t,tabId:n,label:i})}function o(e){r(null);let{active:n,over:i}=e;if(!i)return;let a=n.data.current,o=i.data.current;if(!a||!o)return;let s=a.sortable?.index,c=o.sortable?.index;t({tabId:a.tabId,from:{windowId:a.windowId,index:s},to:{windowId:o.windowId,index:c}})}let s={onTabMove:t,activeDrag:n,setActiveDrag:r};return(0,Z.jsx)(pt.Provider,{value:s,children:(0,Z.jsx)(ge,{sensors:i,onDragStart:a,onDragEnd:o,collisionDetection:le,children:(0,Z.jsxs)(A,{width:`full`,gap:2,padding:2,height:`full`,children:[e,(0,Z.jsx)(me,{children:n?(0,Z.jsx)(_t,{activeDrag:n}):null})]})})})}function _t({activeDrag:e}){return(0,Z.jsx)(`div`,{style:{background:`var(--chakra-colors-bg-panel)`,padding:8,border:`1px solid var(--chakra-colors-border)`,borderRadius:6,boxShadow:`0 2px 8px rgba(0,0,0,0.15)`,pointerEvents:`none`},children:e.label??`Dragging tab...`})}function vt({children:e,windowId:t,activeTabId:n,onTabChange:r,onWindowClick:i,...a}){let o={windowId:t,activeTabId:n};return(0,Z.jsx)(mt.Provider,{value:o,children:(0,Z.jsx)(L,{height:`full`,gap:0,align:`stretch`,width:`full`,children:(0,Z.jsx)(j,{value:n,onValueChange:e=>r?.({windowId:t,tabId:e.value}),onClick:()=>i?.({windowId:t,tabId:n??``}),width:`full`,height:`full`,display:`flex`,flexDirection:`column`,variant:`enclosed`,lazyMount:!0,unmountOnExit:!0,...a,children:e})})})}function yt({children:e,tabIds:t,...n}){return(0,Z.jsx)(A,{gap:0,width:`full`,flexWrap:`nowrap`,minWidth:0,...n,children:(0,Z.jsx)(he,{items:t??[],strategy:de,children:(0,Z.jsx)(N,{width:`full`,gap:0,height:`full`,paddingY:0,background:`none`,flexWrap:`nowrap`,alignItems:`center`,minWidth:0,children:e})})})}var bt=`88px`,xt=`180px`;function St({value:e,children:t}){return(0,Z.jsx)(M,{value:e,minWidth:0,width:`full`,overflow:`hidden`,cursor:`pointer`,transition:`all 0.15s ease-in-out`,children:t})}function Ct({id:e,children:t,...n}){let{windowId:r}=ht(),{attributes:i,listeners:o,setNodeRef:s,transform:c,transition:l,isDragging:u,isOver:d}=fe({id:e,data:{windowId:r,tabId:e,label:(0,Z.jsx)(R,{tabId:e,children:(0,Z.jsx)(ft,{dimmed:!1})})}});return(0,Z.jsx)(a,{...n,ref:s,"data-tab-strip-id":e,flex:`1 1 0`,minWidth:bt,maxWidth:xt,alignItems:`stretch`,cursor:u?`grabbing`:`grab`,transform:ue.Transform.toString(c),transition:l,opacity:u||d?.5:1,...i,...o,children:t})}var Q={Root:gt,Window:vt,TabBar:yt,Trigger:St,Tab:Ct,Content:P};function wt(e,t){let[n,r]=(0,Y.useState)(!1),i=(0,Y.useCallback)(()=>{let t=e.current;t&&r(t.scrollWidth-t.clientWidth>1)},[e]);return(0,Y.useLayoutEffect)(()=>{i()},[i,t]),(0,Y.useEffect)(()=>{let t=e.current;if(!t)return;let n=new ResizeObserver(i);return n.observe(t),()=>n.disconnect()},[e,i]),n}function Tt({tabs:e,activeTabId:t,isActiveWindow:n,onSelectTab:r}){let i=(0,Y.useRef)(null),a=wt(i,e.length);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(A,{ref:i,gap:0,overflow:`auto`,height:`full`,paddingY:2,paddingX:2,flex:`1 1 0`,minWidth:0,children:e.map(e=>(0,Z.jsx)(R,{tabId:e.id,children:(0,Z.jsx)(Q.Tab,{id:e.id,height:`full`,children:(0,Z.jsx)(Q.Trigger,{value:e.id,children:(0,Z.jsx)(ft,{dimmed:!n,isActive:e.id===t,isCrowded:a})})})},e.id))}),(0,Z.jsx)(st,{tabIds:e.map(e=>e.id),activeTabId:t,onSelect:r,scrollerRef:i,isStripOverflowing:a})]})}function Et(){let{windows:e,splitTab:t,moveTab:n,setActiveTab:r,activeWindowId:i,setActiveWindow:a}=p(({windows:e,splitTab:t,moveTab:n,setActiveTab:r,activeWindowId:i,setActiveWindow:a})=>({windows:e,splitTab:t,moveTab:n,setActiveTab:r,activeWindowId:i,setActiveWindow:a}));function o(e){n({tabId:e.tabId,windowId:e.to.windowId,index:e.to.index})}function s({windowId:e,tabId:t}){r({windowId:e,tabId:t})}function c(e){t({tabId:e})}return(0,Z.jsx)(Q.Root,{onTabMove:o,children:e.map(t=>(0,Z.jsxs)(Q.Window,{windowId:t.id,activeTabId:t.activeTabId??void 0,onTabChange:s,onWindowClick:()=>a({windowId:t.id}),maxWidth:e.length>1?`calc((100vw - 340px) / ${e.length})`:`auto`,paddingTop:0,children:[(0,Z.jsxs)(Q.TabBar,{tabIds:t.tabs.map(e=>e.id),children:[(0,Z.jsx)(Tt,{tabs:t.tabs,activeTabId:t.activeTabId??void 0,isActiveWindow:t.id===i,onSelectTab:e=>s({windowId:t.id,tabId:e})}),t.id===i&&(0,Z.jsx)(Z.Fragment,{children:(0,Z.jsxs)(A,{flexShrink:0,paddingLeft:1,position:`relative`,_before:{content:`""`,position:`absolute`,left:`-10px`,top:0,bottom:0,width:`10px`,height:`50px`,background:`linear-gradient(to right, transparent, var(--chakra-colors-bg-panel))`,zIndex:10,pointerEvents:`none`},children:[(0,Z.jsx)(it,{iconOnly:e.length>1}),(0,Z.jsx)(g,{content:`Compare`,disabled:e.length<=1,children:(0,Z.jsxs)(w.HeaderButton,{onClick:()=>t.activeTabId&&c(t.activeTabId),disabled:!t.activeTabId,title:`Split tab to compare prompts side by side`,children:[(0,Z.jsx)(Fe,{size:`18px`}),e.length<=1&&`Compare`]})}),(0,Z.jsx)(et,{iconOnly:e.length>1})]})})]}),t.tabs.map(e=>(0,Z.jsx)(R,{tabId:e.id,children:(0,Z.jsx)(Q.Content,{value:e.id,height:`full`,borderRadius:`lg`,boxShadow:`md`,background:`bg.panel`,padding:0,minHeight:`0`,children:(0,Z.jsx)(ae,{})})},e.id))]},t.id))})}function Dt(){let{createDraftPrompt:e}=X();return(0,Z.jsx)(W,{width:`full`,height:`full`,bg:`bg.panel`,children:(0,Z.jsx)(E,{children:(0,Z.jsxs)(k,{children:[(0,Z.jsx)(O,{children:(0,Z.jsx)(je,{})}),(0,Z.jsx)(T,{children:`Create Your First Prompt`}),(0,Z.jsx)(D,{children:`Get started on the prompt playground to design, test, and optimize your AI prompts in one place.`}),(0,Z.jsxs)(A,{gap:2,children:[(0,Z.jsx)(r,{variant:`outline`,size:`sm`,onClick:()=>void e(),children:`Create First Prompt`}),(0,Z.jsx)(Xe,{surface:`prompts`})]})]})})})}function Ot(){return(0,Z.jsxs)(L,{width:`full`,height:`full`,children:[(0,Z.jsxs)(A,{width:`full`,paddingTop:`18px`,paddingRight:`12px`,children:[(0,Z.jsx)(ee,{}),(0,Z.jsx)(et,{})]}),(0,Z.jsx)(W,{width:`full`,height:`full`,bg:`bg.panel`,children:(0,Z.jsx)(E,{children:(0,Z.jsxs)(k,{children:[(0,Z.jsx)(O,{children:(0,Z.jsx)(Me,{})}),(0,Z.jsx)(T,{children:`No prompts open`}),(0,Z.jsx)(D,{children:`Create a new prompt or select an existing prompt to get started.`})]})})})]})}function kt(){let{data:e}=J();return e?.filter(e=>e.version>0)?.length===0?(0,Z.jsx)(Dt,{}):(0,Z.jsx)(Ot,{})}function At(){return u(),p(({windows:e})=>e.length===0||e.every(e=>e.tabs.length===0))?(0,Z.jsx)(kt,{}):(0,Z.jsx)(A,{width:`full`,height:`full`,gap:0,overflowX:`scroll`,children:(0,Z.jsx)(Et,{})})}function jt(){return(0,Z.jsx)(g,{content:`This prompt is available to all projects in the organization`,children:(0,Z.jsx)(C,{color:`purple`,children:(0,Z.jsx)(Ne,{})})})}var Mt=({open:e,onClose:t,onSuccess:n,promptId:r,promptName:i})=>{let{project:a}=G(),o=V.prompts.copy.useMutation(),s=Ue(`prompts:create`);return a?(0,Z.jsx)(He,{open:e,onClose:t,onSuccess:n,title:`Replicate Prompt`,entityLabel:`Prompt`,sourceName:i,sourceId:r,sourceProjectId:a.id,projects:s,onCopy:async({projectId:e,sourceProjectId:t})=>{await o.mutateAsync({idOrHandle:r,projectId:e,sourceProjectId:t})},isLoading:o.isLoading}):null},Nt=({open:e,onClose:t,promptId:n,promptName:r})=>{let{project:i}=G(),a=V.prompts.pushToCopies.useMutation(),o=V.useContext(),[s,c]=(0,Y.useState)(new Set),{data:l,isLoading:u,error:d}=V.prompts.getCopies.useQuery({projectId:i?.id??``,idOrHandle:n},{enabled:e&&!!i?.id&&!!n}),[f,p]=(0,Y.useState)([]);return(0,Y.useEffect)(()=>{l&&(p(l),c(new Set(l.map(e=>e.id))))},[l]),(0,Z.jsx)(We,{open:e,onClose:t,entityLabel:`Prompt`,sourceName:r,copies:f,isLoading:u,error:d?{message:d.message}:null,selectedCopyIds:s,onToggleCopy:e=>{let t=new Set(s);t.has(e)?t.delete(e):t.add(e),c(t)},onPush:async()=>{let e=await a.mutateAsync({idOrHandle:n,projectId:i.id,copyIds:Array.from(s)});return await o.prompts.getAllPromptsForProject.invalidate(),e},pushLoading:a.isLoading,bodyIntro:`Select which replicas to push the latest version to:`,onSuccess:()=>c(new Set)})},Pt=({promptId:e,onSuccess:t})=>{let{triggerChangeHandle:n}=re(),{project:r}=G(),i=V.useContext(),{data:a}=V.prompts.checkModifyPermission.useQuery({idOrHandle:e,projectId:r?.id??``},{enabled:!!e&&!!r?.id}),o=a?.hasPermission??!1;return{renameHandle:(0,Y.useCallback)(()=>{if(!e){_.create({title:`Error changing prompt handle`,description:`Prompt ID is required`,type:`error`});return}n({id:e,onSuccess:e=>{i.prompts.getAllPromptsForProject.invalidate(),_.create({title:`Prompt handle changed`,description:`Prompt handle has been changed to ${e.handle}`,type:`success`}),t?.(e)},onError:e=>{console.error(e),_.create({title:`Error changing prompt handle`,description:e.message,type:`error`})}})},[e,n,i,t]),canRename:o,permissionReason:a?.reason}};function Ft({promptId:e,promptHandle:t,prompt:n}){let[i,o]=(0,Y.useState)(!1),[s,l]=(0,Y.useState)(!1),[u,m]=(0,Y.useState)(!1),{open:v,setOpen:b}=d(),{deletePrompt:x}=f(),{project:S,hasPermission:C}=G(),{addTab:w}=p(({addTab:e})=>({addTab:e})),{renameHandle:T,canRename:E,permissionReason:D}=Pt({promptId:e}),O=V.prompts.syncFromSource.useMutation(),k=V.prompts.duplicate.useMutation(),A=V.useContext(),ee=V.modelProvider.getResolvedDefault.useQuery({projectId:S?.id??``,featureKey:`prompt.create_default`},{enabled:v&&!!S?.id}),j=!!n?.copiedFromPromptId,M=(n?._count?.copiedPrompts??0)>0,N=(0,Y.useCallback)(async()=>{if(S)try{await O.mutateAsync({idOrHandle:e,projectId:S.id}),await A.prompts.getAllPromptsForProject.invalidate(),_.create({title:`Prompt updated`,description:`Prompt "${q(t)}" has been updated from source.`,type:`success`,meta:{closable:!0}})}catch(e){if(H(e))return;_.create({title:`Error updating prompt`,description:e instanceof Error?e.message:`Please try again later.`,type:`error`,meta:{closable:!0}})}},[O,S,A,e,t]),P=(0,Y.useCallback)(async()=>{if(S)try{let n=await k.mutateAsync({idOrHandle:e,projectId:S.id});await A.prompts.getAllPromptsForProject.invalidate(),_.create({title:`Prompt duplicated`,description:`"${q(t)}" was duplicated as "${q(n.handle)}"`,type:`success`,meta:{closable:!0}})}catch(e){if(H(e))return;_.create({title:`Error duplicating prompt`,description:e instanceof Error?e.message:`Please try again later.`,type:`error`,meta:{closable:!0}})}},[k,S,A,e,t]),{data:F}=V.prompts.checkModifyPermission.useQuery({idOrHandle:e,projectId:S?.id??``},{enabled:v&&!!S?.id}),I=F?.hasPermission===!0,L=(0,Y.useCallback)(async()=>{if(S?.id)try{await x({projectId:S.id,idOrHandle:e}),_.create({title:`Prompt deleted`,description:`"${q(t)}" has been deleted`,type:`success`})}catch(e){if(H(e))return;_.create({title:`Failed to delete prompt`,description:e instanceof Error?e.message:`An unknown error occurred`,type:`error`})}finally{o(!1)}},[e,t,S?.id,x]);return(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(a,{onClick:e=>e.stopPropagation(),opacity:0,_groupHover:{opacity:1},transition:`opacity 0.2s`,children:(0,Z.jsxs)(y.Root,{open:v,onOpenChange:({open:e})=>b(e),children:[(0,Z.jsx)(y.Trigger,{asChild:!0,children:(0,Z.jsx)(r,{variant:`ghost`,size:`xs`,onClick:e=>e.stopPropagation(),children:(0,Z.jsx)(Pe,{size:14})})}),(0,Z.jsxs)(y.Content,{onClick:e=>e.stopPropagation(),children:[j&&(0,Z.jsxs)(y.Item,{value:`sync`,onClick:()=>void N(),children:[(0,Z.jsx)(we,{size:16}),` Update from source`]}),M&&(0,Z.jsxs)(y.Item,{value:`push`,onClick:()=>m(!0),children:[(0,Z.jsx)(Se,{size:16}),` Push to replicas`]}),(0,Z.jsxs)(y.Item,{value:`copy`,onClick:()=>l(!0),children:[(0,Z.jsx)(Ce,{size:16}),` Replicate to another project`]}),(0,Z.jsxs)(y.Item,{value:`duplicate`,onClick:()=>void P(),children:[(0,Z.jsx)(Te,{size:16}),` Duplicate prompt`]}),(0,Z.jsxs)(y.Item,{value:`view-history`,onClick:()=>{if(!n)return;let e=h({prompt:n,defaultModel:ee.data?.model??``,useSystemMessage:!0});w({data:{chat:{initialMessagesFromSpanData:[]},form:{currentValues:e},meta:{title:e.handle??null,versionNumber:e.versionMetadata?.versionNumber,openHistoryOnLoad:!0},variableValues:{}}})},children:[(0,Z.jsx)(De,{size:16}),` View history`]}),(0,Z.jsx)(g,{content:D,disabled:E,positioning:{placement:`right`},showArrow:!0,children:(0,Z.jsxs)(y.Item,{value:`rename`,onClick:E?T:void 0,disabled:!E,opacity:E?1:.5,cursor:E?`pointer`:`not-allowed`,children:[(0,Z.jsx)(ke,{size:16}),(0,Z.jsx)(c,{as:`span`,children:`Rename handle`})]})}),(0,Z.jsx)(g,{content:F?.reason,disabled:I,positioning:{placement:`right`},showArrow:!0,children:(0,Z.jsxs)(y.Item,{value:`delete`,onClick:()=>I&&o(!0),disabled:!I,opacity:I?1:.5,cursor:I?`pointer`:`not-allowed`,children:[(0,Z.jsx)(Ae,{size:16}),(0,Z.jsx)(c,{as:`span`,children:`Delete prompt`})]})})]})]})}),(0,Z.jsx)(Ge,{title:`Are you really sure?`,description:`There is no going back, and you will lose all versions of this prompt. If you're sure you want to delete this prompt, type 'delete' below:`,open:i,onClose:()=>o(!1),onConfirm:()=>void L()}),(0,Z.jsx)(Mt,{open:s,onClose:()=>l(!1),onSuccess:()=>void A.prompts.getAllPromptsForProject.invalidate(),promptId:e,promptName:q(t)}),(0,Z.jsx)(Nt,{open:u,onClose:()=>m(!1),promptId:e,promptName:q(t)})]})}function It({promptId:e,promptHandle:t,prompt:n}){return(0,Z.jsxs)(A,{justify:`space-between`,width:`full`,className:`group`,children:[n?.scope===`ORGANIZATION`&&(0,Z.jsx)(a,{marginLeft:`-12px`,children:(0,Z.jsx)(jt,{})}),(0,Z.jsx)(c,{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,fontSize:`sm`,fontWeight:`normal`,flex:1,children:q(t)}),(0,Z.jsx)(Ft,{promptId:e,promptHandle:t,prompt:n})]})}function Lt({children:e,...t}){return(0,Z.jsx)(a,{as:`nav`,width:`full`,height:`100%`,overflowY:`auto`,paddingBottom:`2`,...t,children:(0,Z.jsx)(L,{gap:0,align:`stretch`,children:e})})}function Rt({children:e}){return(0,Z.jsx)(a,{padding:`4`,fontSize:`lg`,fontWeight:`semibold`,children:e})}function zt({children:e,...t}){return(0,Z.jsx)(a,{paddingX:`3`,paddingY:`2`,fontSize:`sm`,fontWeight:`medium`,color:`fg`,display:`flex`,alignItems:`center`,justifyContent:`space-between`,...t,children:e})}function Bt({children:e}){return(0,Z.jsx)(a,{children:e})}function Vt({children:e,title:t,collapsible:n=!1,defaultOpen:r=!1,action:i}){let[o,s]=(0,Y.useState)(r);return t?(0,Z.jsxs)(L,{gap:0,align:`stretch`,children:[(0,Z.jsxs)(zt,{onClick:()=>s(!o),cursor:`pointer`,children:[(0,Z.jsxs)(A,{gap:2,children:[n&&(0,Z.jsx)(a,{transform:o?`rotate(0deg)`:`rotate(-90deg)`,transition:`transform 0.2s`,children:(0,Z.jsx)(U,{size:14})}),(0,Z.jsx)(c,{children:t})]}),i&&(0,Z.jsx)(a,{onClick:e=>e.stopPropagation(),children:i})]}),(!n||o)&&(0,Z.jsx)(L,{gap:0,align:`stretch`,paddingX:4,children:e})]}):(0,Z.jsx)(L,{gap:.5,align:`stretch`,paddingX:2,children:e})}function Ht({children:e,onClick:t,active:n=!1,icon:r,meta:i,variant:o=`default`,...s}){return o===`empty`?(0,Z.jsx)(a,{padding:`3`,fontSize:`sm`,color:`fg.muted`,textAlign:`center`,children:e}):(0,Z.jsxs)(a,{fontSize:`sm`,color:n?`blue.fg`:`fg`,bg:n?`blue.subtle`:`transparent`,borderRadius:`md`,cursor:`pointer`,_hover:{bg:n?`blue.muted`:`bg.muted`},onClick:t,display:`flex`,alignItems:`center`,gap:2,width:`full`,...s,children:[r&&(0,Z.jsx)(a,{width:`16px`,borderRadius:`full`,bg:`bg.muted`,display:`flex`,alignItems:`center`,justifyContent:`center`,flexShrink:0,children:r}),(0,Z.jsxs)(a,{flex:1,minWidth:0,children:[e,i&&(0,Z.jsx)(c,{fontSize:`xs`,color:`fg.muted`,overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`,children:i})]})]})}var $={Root:Lt,Header:Rt,SectionHeader:zt,List:Vt,Item:Ht,Section:Bt};function Ut(){return(0,Z.jsx)(c,{fontSize:`sm`,color:`fg.muted`,textAlign:`center`,paddingY:6,paddingX:4,children:`No prompts yet`})}function Wt(){let{data:e,isLoading:t}=J(),{addTab:n}=p(({addTab:e})=>({addTab:e})),{project:r}=G(),i=V.modelProvider.getResolvedDefault.useQuery({projectId:r?.id??``,featureKey:`prompt.create_default`},{enabled:!!r?.id}),a=(0,Y.useMemo)(()=>{let t=e?.filter(e=>e.version>0),n=Le(t,e=>e.handle?.includes(`/`)?e.handle?.split(`/`)[0]:`default`);return Object.entries(n).sort((e,t)=>e[0]==="default"?1:t[0]==="default"?-1:0)},[e]),o=e?.filter(e=>e.version>0);return t?(0,Z.jsx)($.List,{children:[1,2,3,4].map(e=>(0,Z.jsx)($.Item,{paddingY:1,paddingLeft:2,children:(0,Z.jsx)(s,{width:`full`,height:`20px`,borderRadius:`sm`})},e))}):o?.length===0?(0,Z.jsx)(Ut,{}):(0,Z.jsx)(Z.Fragment,{children:a.map(([e,t])=>(0,Z.jsx)($.List,{title:e==="default"?void 0:e,collapsible:e!=="default",defaultOpen:!1,children:t.map(e=>(0,Z.jsx)(Ye,{target:F({promptId:e.id,handle:e.handle}),children:(0,Z.jsx)($.Item,{icon:I[e.model?.split(`/`)[0]],onClick:()=>{let t=h({prompt:e,defaultModel:i.data?.model??``,useSystemMessage:!0});n({data:{chat:{initialMessagesFromSpanData:[]},form:{currentValues:t},meta:{title:t.handle??null,versionNumber:t.versionMetadata?.versionNumber},variableValues:{}}})},paddingY:1,paddingLeft:2,children:(0,Z.jsx)(It,{promptId:e.id,promptHandle:e.handle,prompt:e})})},e.id))},e))})}function Gt(){return(0,Z.jsx)($.Root,{children:(0,Z.jsx)($.Section,{children:(0,Z.jsx)(Wt,{})})})}function Kt(){return(0,Z.jsx)(B,{position:`relative`,compactMenu:!0,children:(0,Z.jsx)(ie,{children:(0,Z.jsx)(oe,{children:(0,Z.jsxs)(A,{width:`full`,height:`full`,gap:0,position:`relative`,children:[(0,Z.jsxs)(L,{position:`relative`,top:0,left:0,width:`250px`,height:`full`,children:[(0,Z.jsx)(w.Header,{withBorder:!1,children:(0,Z.jsx)(w.Heading,{children:`Prompts`})}),(0,Z.jsx)(Gt,{})]}),(0,Z.jsx)(At,{})]})})})})}function qt(){return(0,Z.jsx)(Kt,{})}var Jt=ze(`prompts:view`,{layoutComponent:B})(qt);export{Jt as default};
8
- //# sourceMappingURL=prompts-DUxsvuSh.js.map