@datalayer/agent-runtimes 1.6.97 → 1.6.98

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 (356) hide show
  1. package/dist-embed/chunks/{AgentDetails-B5csrqWi.js → AgentDetails-CqMfY8zN.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-gGnV2mTY.js → AgentDetailsDialog-lxnKA_dF.js} +1 -1
  3. package/dist-embed/chunks/{CellSidebarExtension-B4QBsTRy.js → CellSidebarExtension-CrdbRLaE.js} +1 -1
  4. package/dist-embed/chunks/ChatView-B9oVgZ72.js +32 -0
  5. package/dist-embed/chunks/{CollapsiblePlugin-vjE7wFOu.js → CollapsiblePlugin-CnG1qA1e.js} +1 -1
  6. package/dist-embed/chunks/{ContextPie-Dqj618Q2.js → ContextPie-DAZz2yzl.js} +1 -1
  7. package/dist-embed/chunks/{DeckComponent-CSxElvrq.js → DeckComponent-qAMqKLzs.js} +1 -1
  8. package/dist-embed/chunks/{DeckRenderer-DcyoBlq5.js → DeckRenderer-DQmjQ_vE.js} +2 -2
  9. package/dist-embed/chunks/{DeckStage-DJJkDWlM.js → DeckStage-LDi6nZOg.js} +2 -2
  10. package/dist-embed/chunks/{DiagramView-D8385Uvy.js → DiagramView-CpCoC99y.js} +1 -1
  11. package/dist-embed/chunks/{DocumentView-pHXY2GUy.js → DocumentView-B-lWAJgm.js} +1 -1
  12. package/dist-embed/chunks/{DrawingStage-CBhXNP2j.js → DrawingStage-DEeTWKLT.js} +1 -1
  13. package/dist-embed/chunks/{EphemeralDocument-C12bJ2Zi.js → EphemeralDocument-CZNRDs_b.js} +1 -1
  14. package/dist-embed/chunks/{EphemeralNotebook-DW9uU70P.js → EphemeralNotebook-BDutT9GQ.js} +1 -1
  15. package/dist-embed/chunks/{ExcalidrawComponent-BvB8s8DF.js → ExcalidrawComponent-CmJy7bb4.js} +1 -1
  16. package/dist-embed/chunks/{ExcalidrawModal-CLGo6lxD.js → ExcalidrawModal-D_DmAro7.js} +1 -1
  17. package/dist-embed/chunks/{FormulaBar-IFoQ6yN8.js → FormulaBar-f9U7lupQ.js} +1 -1
  18. package/dist-embed/chunks/{JupyterLexicalExtension-DhlGUbc0.js → JupyterLexicalExtension-DpGAnn7v.js} +9 -9
  19. package/dist-embed/chunks/{KernelVariables-COPHuvQe.js → KernelVariables-BIWju6rZ.js} +1 -1
  20. package/dist-embed/chunks/{LexicalToolRegistry-mRwpy8uR.js → LexicalToolRegistry-BqxU1w4N.js} +1 -1
  21. package/dist-embed/chunks/{NotebookToolSurfaces-f0K0s6tk.js → NotebookToolSurfaces-CqU9CVCl.js} +1 -1
  22. package/dist-embed/chunks/{NotebookView-CkgduWGZ.js → NotebookView-CpOBHIut.js} +1 -1
  23. package/dist-embed/chunks/{Output-BlVb0nsN.js → Output-DLpf2Of9.js} +6 -6
  24. package/dist-embed/chunks/{SandboxDetailsDialog-BWr3ZHmy.js → SandboxDetailsDialog-yUjpxBdw.js} +1 -1
  25. package/dist-embed/chunks/{SchemaForm-BYx28f9R.js → SchemaForm-N0hu4z_p.js} +1 -1
  26. package/dist-embed/chunks/{SheetStage-UDDuD0c-.js → SheetStage-gUVhALxR.js} +1 -1
  27. package/dist-embed/chunks/{SheetTabs-CRqCh6SH.js → SheetTabs-sx_-jWyq.js} +1 -1
  28. package/dist-embed/chunks/{SignInIcon-C0lCx6yN.js → SignInIcon-XIbntAUw.js} +1 -1
  29. package/dist-embed/chunks/{SpreadsheetPreviewView-D3bm2FuW.js → SpreadsheetPreviewView-C9LaI5mp.js} +1 -1
  30. package/dist-embed/chunks/{SpreadsheetView-C0jqVlH0.js → SpreadsheetView-FfnOGHeU.js} +1 -1
  31. package/dist-embed/chunks/{WidgetVariableView-CEWGssAP.js → WidgetVariableView-CKcw-pPX.js} +1 -1
  32. package/dist-embed/chunks/{YouTubePlugin-CwtVeT4X.js → YouTubePlugin-DUDVTb3B.js} +1 -1
  33. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-JXHACDBz.js → abnfDiagram-VCTEODGH-B0MQRzNo.js} +1 -1
  34. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-C-5M28HY.js → abnfDiagram-VCTEODGH-BM2pAacI.js} +1 -1
  35. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Bwv6WjS-.js → abnfDiagram-VCTEODGH-fcR8gNdJ.js} +1 -1
  36. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BM34ImM5.js → ar-SA-G6X2FPQ2-BfVZMCow.js} +1 -1
  37. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DpujQos2.js → architectureDiagram-5GKGNRK7-CnP0s6uJ.js} +1 -1
  38. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-KCUb-Mex.js → architectureDiagram-5GKGNRK7-Cpu0tfD1.js} +1 -1
  39. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-CAgLqF4a.js → architectureDiagram-5GKGNRK7-GZ5981UE.js} +1 -1
  40. package/dist-embed/chunks/{az-AZ-76LH7QW2-ClbRZkch.js → az-AZ-76LH7QW2-BeD9jzcd.js} +1 -1
  41. package/dist-embed/chunks/{bg-BG-XCXSNQG7-C9-xTdL3.js → bg-BG-XCXSNQG7-VUraF-a0.js} +1 -1
  42. package/dist-embed/chunks/{blockDiagram-868be97b-BIKcIMyQ.js → blockDiagram-868be97b-BK7odeOZ.js} +1 -1
  43. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-6rNTajX4.js → blockDiagram-I7D4REHJ-BMQSOcOL.js} +1 -1
  44. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Dk3ubhN6.js → blockDiagram-I7D4REHJ-CZlh2u1A.js} +1 -1
  45. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Dg9wRDSP.js → blockDiagram-I7D4REHJ-DiBWN476.js} +1 -1
  46. package/dist-embed/chunks/{bn-BD-2XOGV67Q-yHaSEyU7.js → bn-BD-2XOGV67Q-DjghL9Ba.js} +1 -1
  47. package/dist-embed/chunks/{c4Diagram-3f4bdde3-DX31j648.js → c4Diagram-3f4bdde3-CMf0cOcM.js} +1 -1
  48. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-Blhl5Ivg.js → c4Diagram-7LVT6UL2-BYPUXI1P.js} +1 -1
  49. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DotUFrPy.js → c4Diagram-7LVT6UL2-plU3oizm.js} +1 -1
  50. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-kO868bTp.js → c4Diagram-7LVT6UL2-qmYneJtb.js} +1 -1
  51. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-Co3yrY97.js → ca-ES-6MX7JW3Y-J6FuV-ut.js} +1 -1
  52. package/dist-embed/chunks/{celltoolbartracker-DzouPWbZ.js → celltoolbartracker-0MFBHjtq.js} +1 -1
  53. package/dist-embed/chunks/{chunk-2Q5K7J3B-BC8SN0W_.js → chunk-2Q5K7J3B-B5DIEbuU.js} +1 -1
  54. package/dist-embed/chunks/{chunk-2Q5K7J3B-BB4YNChb.js → chunk-2Q5K7J3B-BfCPaxeK.js} +1 -1
  55. package/dist-embed/chunks/{chunk-2Q5K7J3B-COf2HInf.js → chunk-2Q5K7J3B-Cj3jAIkT.js} +1 -1
  56. package/dist-embed/chunks/{chunk-5VM5RSS4-C3jze8cb.js → chunk-5VM5RSS4-BZGDG9GF.js} +1 -1
  57. package/dist-embed/chunks/{chunk-5VM5RSS4-DiJWlaEG.js → chunk-5VM5RSS4-DYeTGvz7.js} +1 -1
  58. package/dist-embed/chunks/{chunk-5VM5RSS4-cXmhCpsu.js → chunk-5VM5RSS4-g3id5Hpo.js} +1 -1
  59. package/dist-embed/chunks/{chunk-F27PBJKO-BXMw8fcU.js → chunk-F27PBJKO-DvclqQhV.js} +1 -1
  60. package/dist-embed/chunks/{chunk-F27PBJKO-DaAtxZ3_.js → chunk-F27PBJKO-S3msebgW.js} +1 -1
  61. package/dist-embed/chunks/{chunk-F27PBJKO-DZJGymAh.js → chunk-F27PBJKO-kACIRR-8.js} +1 -1
  62. package/dist-embed/chunks/{chunk-IMKFNOWR-CR3C15pD.js → chunk-IMKFNOWR-Ch7v5XHt.js} +1 -1
  63. package/dist-embed/chunks/{chunk-IMKFNOWR-C4f2Xvwg.js → chunk-IMKFNOWR-DjIARM3y.js} +1 -1
  64. package/dist-embed/chunks/{chunk-IMKFNOWR-Ct7GddYG.js → chunk-IMKFNOWR-SiS0o9FR.js} +1 -1
  65. package/dist-embed/chunks/{chunk-JWPE2WC7-9KydF4Cl.js → chunk-JWPE2WC7-BwLKeh91.js} +1 -1
  66. package/dist-embed/chunks/{chunk-JWPE2WC7-B54sCK-y.js → chunk-JWPE2WC7-CVacxpin.js} +1 -1
  67. package/dist-embed/chunks/{chunk-JWPE2WC7-D9_2-oUP.js → chunk-JWPE2WC7-M6oulZhu.js} +1 -1
  68. package/dist-embed/chunks/{chunk-POPQ4Y6H-BaMRoQVu.js → chunk-POPQ4Y6H-BCHaCocF.js} +1 -1
  69. package/dist-embed/chunks/{chunk-POPQ4Y6H-BgtIg837.js → chunk-POPQ4Y6H-DacAiEUG.js} +1 -1
  70. package/dist-embed/chunks/{chunk-POPQ4Y6H-Db5GUGhc.js → chunk-POPQ4Y6H-DicNgh7k.js} +1 -1
  71. package/dist-embed/chunks/{chunk-SVP7TREG-CeM8qf58.js → chunk-SVP7TREG-3X_ReA6d.js} +1 -1
  72. package/dist-embed/chunks/{chunk-SVP7TREG-F4uclbvM.js → chunk-SVP7TREG-COLBrDOd.js} +1 -1
  73. package/dist-embed/chunks/{chunk-SVP7TREG-BYkF4CFZ.js → chunk-SVP7TREG-Cit7UeF2.js} +1 -1
  74. package/dist-embed/chunks/{chunk-TICWLB2K-D-Wwl7XB.js → chunk-TICWLB2K-C4D-h9t1.js} +1 -1
  75. package/dist-embed/chunks/{chunk-TICWLB2K-BFf8Le3M.js → chunk-TICWLB2K-DfGZ1S46.js} +1 -1
  76. package/dist-embed/chunks/{chunk-TICWLB2K-BHq2Ystt.js → chunk-TICWLB2K-TaUeWpZb.js} +1 -1
  77. package/dist-embed/chunks/{chunk-XXDRQBXY-BHMLcU9A.js → chunk-XXDRQBXY-B6fuzLc9.js} +1 -1
  78. package/dist-embed/chunks/{chunk-XXDRQBXY-BlVD4u-l.js → chunk-XXDRQBXY-Bo_XDdf-.js} +1 -1
  79. package/dist-embed/chunks/{chunk-XXDRQBXY-DTCYLV17.js → chunk-XXDRQBXY-Bz5lFaJG.js} +1 -1
  80. package/dist-embed/chunks/{classDiagram-ZZMXUADV-B1H5YR5N.js → classDiagram-ZZMXUADV-DDZ5U8jk.js} +1 -1
  81. package/dist-embed/chunks/{classDiagram-ZZMXUADV-C69Ng482.js → classDiagram-ZZMXUADV-DpQTfwXC.js} +1 -1
  82. package/dist-embed/chunks/{classDiagram-ZZMXUADV-fah4qQBw.js → classDiagram-ZZMXUADV-orzU8a0Z.js} +1 -1
  83. package/dist-embed/chunks/{classDiagram-f62afe4f-BpmDNOf_.js → classDiagram-f62afe4f-CNI3U8Mt.js} +1 -1
  84. package/dist-embed/chunks/{classDiagram-v2-604399ef-DXSVTZaU.js → classDiagram-v2-604399ef-CLQHn0oB.js} +1 -1
  85. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-B1H5YR5N.js → classDiagram-v2-VYDZK3BY-DDZ5U8jk.js} +1 -1
  86. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-C69Ng482.js → classDiagram-v2-VYDZK3BY-DpQTfwXC.js} +1 -1
  87. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-fah4qQBw.js → classDiagram-v2-VYDZK3BY-orzU8a0Z.js} +1 -1
  88. package/dist-embed/chunks/{code-block-IT6T5CEO-BzV6dOeo.js → code-block-IT6T5CEO-DjmCcA6a.js} +1 -1
  89. package/dist-embed/chunks/{component-DQ0vRpmL.js → component-B62XEB_I.js} +1 -1
  90. package/dist-embed/chunks/{core-YLcIWC_X.js → core-CsMGn5rr.js} +1 -1
  91. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DUgmse9Z.js → cose-bilkent-JH36ORCC-B_IELYPJ.js} +1 -1
  92. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CFC6-4OL.js → cose-bilkent-JH36ORCC-CE9lt3OO.js} +1 -1
  93. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B13OR0_2.js → cose-bilkent-JH36ORCC-CJiHk5L4.js} +1 -1
  94. package/dist-embed/chunks/{createText-aed3d8b3-Cft4GZJy.js → createText-aed3d8b3-DTAS6DfQ.js} +1 -1
  95. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-BXDHJOy0.js → cs-CZ-2BRQDIVT-BJRVSuxc.js} +1 -1
  96. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-Baap8yDb.js → cynefinDiagram-5FMLGOSQ-B2073FgP.js} +1 -1
  97. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B7_plLD6.js → cynefinDiagram-5FMLGOSQ-CyHkNAUC.js} +1 -1
  98. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-kHl-Cu_e.js → cynefinDiagram-5FMLGOSQ-HsJLw9Ow.js} +1 -1
  99. package/dist-embed/chunks/{da-DK-5WZEPLOC-Bv_vMRQS.js → da-DK-5WZEPLOC-DmvpQmCz.js} +1 -1
  100. package/dist-embed/chunks/{dagre-GXQ25YYZ-l25rB3RT.js → dagre-GXQ25YYZ-BkxHUUfX.js} +1 -1
  101. package/dist-embed/chunks/{dagre-GXQ25YYZ-DLkLgXkX.js → dagre-GXQ25YYZ-DzmuuJ_r.js} +1 -1
  102. package/dist-embed/chunks/{dagre-GXQ25YYZ-De_KrzkJ.js → dagre-GXQ25YYZ-R_lzFrVl.js} +1 -1
  103. package/dist-embed/chunks/{de-DE-XR44H4JA-Bko2COU8.js → de-DE-XR44H4JA-aRPZsjh8.js} +1 -1
  104. package/dist-embed/chunks/{diagram-S7CK7UJ4-uPenisEP.js → diagram-S7CK7UJ4-1KpTTJPB.js} +1 -1
  105. package/dist-embed/chunks/{diagram-S7CK7UJ4-uDpubVD_.js → diagram-S7CK7UJ4-BANHWGqU.js} +1 -1
  106. package/dist-embed/chunks/{diagram-S7CK7UJ4-BiZ-ex3Q.js → diagram-S7CK7UJ4-DsEYZOqE.js} +1 -1
  107. package/dist-embed/chunks/{diagram-UQ7AKVKN-FzXo7K78.js → diagram-UQ7AKVKN-B-SbMZjY.js} +1 -1
  108. package/dist-embed/chunks/{diagram-UQ7AKVKN-BzBp2O2s.js → diagram-UQ7AKVKN-BadWwEqS.js} +1 -1
  109. package/dist-embed/chunks/{diagram-UQ7AKVKN-DbPeWUnW.js → diagram-UQ7AKVKN-E5q5_JWL.js} +1 -1
  110. package/dist-embed/chunks/{diagram-VSXAHHWV-DLDYySj7.js → diagram-VSXAHHWV-B-ZTas3h.js} +1 -1
  111. package/dist-embed/chunks/{diagram-VSXAHHWV-CwicQwvc.js → diagram-VSXAHHWV-BsdL7E17.js} +1 -1
  112. package/dist-embed/chunks/{diagram-VSXAHHWV-BcQHUbuO.js → diagram-VSXAHHWV-D_7x_Ody.js} +1 -1
  113. package/dist-embed/chunks/{diagram-VX7I27RA-Ft45yb-L.js → diagram-VX7I27RA-BGyPrgPC.js} +1 -1
  114. package/dist-embed/chunks/{diagram-VX7I27RA-BscrabRG.js → diagram-VX7I27RA-CNSwTKHP.js} +1 -1
  115. package/dist-embed/chunks/{diagram-VX7I27RA-BSiMudGz.js → diagram-VX7I27RA-C_1S9aIm.js} +1 -1
  116. package/dist-embed/chunks/{diagram-Z3DM3KII-C5mNapBw.js → diagram-Z3DM3KII-B5t8N8ZT.js} +1 -1
  117. package/dist-embed/chunks/{diagram-Z3DM3KII-B86lp0dM.js → diagram-Z3DM3KII-C2gtrmQ9.js} +1 -1
  118. package/dist-embed/chunks/{diagram-Z3DM3KII-Y-lVwha7.js → diagram-Z3DM3KII-yVDxeysg.js} +1 -1
  119. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DuGxLmkd.js → ebnfDiagram-PWID7BFC-BgfF1EZn.js} +1 -1
  120. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-COn39ksr.js → ebnfDiagram-PWID7BFC-C7dUKFPT.js} +1 -1
  121. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Tzta9jsh.js → ebnfDiagram-PWID7BFC-LCa7gn5F.js} +1 -1
  122. package/dist-embed/chunks/{edges-b2856ca0-B0fzIYH0.js → edges-b2856ca0-J2ON9YC7.js} +1 -1
  123. package/dist-embed/chunks/{el-GR-BZB4AONW-CGifhWk7.js → el-GR-BZB4AONW-BBpO4fOL.js} +1 -1
  124. package/dist-embed/chunks/{erDiagram-5d81789a-Bs2AlkA7.js → erDiagram-5d81789a-BM5rHLzM.js} +1 -1
  125. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-gNk7K_1a.js → erDiagram-RLTQ6QDP-BguBlD55.js} +1 -1
  126. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-dY0zbwz5.js → erDiagram-RLTQ6QDP-C35O3IA_.js} +1 -1
  127. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-69KYQDkg.js → erDiagram-RLTQ6QDP-CX1vL7D6.js} +1 -1
  128. package/dist-embed/chunks/{es-ES-U4NZUMDT-CG3eLB2T.js → es-ES-U4NZUMDT-CyrQHwAL.js} +1 -1
  129. package/dist-embed/chunks/{esm-jxjWs5qw.js → esm-BaC41XaP.js} +1 -1
  130. package/dist-embed/chunks/{esm-DXOCHrTC.js → esm-DNtiNaWu.js} +1 -1
  131. package/dist-embed/chunks/{eu-ES-A7QVB2H4-DzPN5Wvi.js → eu-ES-A7QVB2H4-BJG9zHud.js} +1 -1
  132. package/dist-embed/chunks/{fa-IR-HGAKTJCU-DFiN2zZy.js → fa-IR-HGAKTJCU-BOnLqEaQ.js} +1 -1
  133. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-DoWgfc_V.js → fi-FI-Z5N7JZ37-DdQTDw9O.js} +1 -1
  134. package/dist-embed/chunks/{flowDb-185abca5-CX3GWJVI.js → flowDb-185abca5-CLfj2Qv7.js} +1 -1
  135. package/dist-embed/chunks/{flowDiagram-1629c991-CLqeIp_x.js → flowDiagram-1629c991-DjfIfqQ2.js} +1 -1
  136. package/dist-embed/chunks/{flowDiagram-HODETNUW-BHSFqLFz.js → flowDiagram-HODETNUW-CmpkqsRJ.js} +1 -1
  137. package/dist-embed/chunks/{flowDiagram-HODETNUW-CJEJhhfg.js → flowDiagram-HODETNUW-Cuv1YfzK.js} +1 -1
  138. package/dist-embed/chunks/{flowDiagram-HODETNUW-Du69fYws.js → flowDiagram-HODETNUW-DEVM2ZrI.js} +1 -1
  139. package/dist-embed/chunks/{flowDiagram-v2-1d953310-CBHgUV1p.js → flowDiagram-v2-1d953310-4wSPcojK.js} +1 -1
  140. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-DeZ--5a6.js → flowchart-elk-definition-6df44142-Cb0xBerO.js} +1 -1
  141. package/dist-embed/chunks/{fr-FR-RHASNOE6-J88GG3aE.js → fr-FR-RHASNOE6-DQXpQs87.js} +1 -1
  142. package/dist-embed/chunks/{ganttDiagram-3b0b3873-C2r1fH39.js → ganttDiagram-3b0b3873-DI6DrFsY.js} +1 -1
  143. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-7MMvC1fh.js → ganttDiagram-EL5Y4UJY-CSmChevD.js} +1 -1
  144. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DKaPd3MM.js → ganttDiagram-EL5Y4UJY-DdKCj2ex.js} +1 -1
  145. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-C3YxQe7W.js → ganttDiagram-EL5Y4UJY-drl1C7t5.js} +1 -1
  146. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-Cnig1EpR.js → gitGraphDiagram-WWUBYQGX-Dna0JScG.js} +1 -1
  147. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-BhAiY2G7.js → gitGraphDiagram-WWUBYQGX-PLhOfVTI.js} +1 -1
  148. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DL75-74K.js → gitGraphDiagram-WWUBYQGX-gYDVDk5C.js} +1 -1
  149. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-DpCnh99K.js → gitGraphDiagram-f01e8bc2-BmE4UKm_.js} +1 -1
  150. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DCx-cx3z.js → gl-ES-HMX3MZ6V-DzfCce3N.js} +1 -1
  151. package/dist-embed/chunks/{he-IL-6SHJWFNN-DSVCS7oh.js → he-IL-6SHJWFNN-DRlcBbb7.js} +1 -1
  152. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-dYf4Ui9C.js → hi-IN-IWLTKZ5I-BrerMuM3.js} +1 -1
  153. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-D62ZhqXS.js → hu-HU-A5ZG7DT2-DFTsPGh6.js} +1 -1
  154. package/dist-embed/chunks/{id-ID-SAP4L64H-CPbEyEGt.js → id-ID-SAP4L64H-D0pKFdUL.js} +1 -1
  155. package/dist-embed/chunks/{index-DUo_Q0bE.js → index-46VEGuyz.js} +2 -2
  156. package/dist-embed/chunks/{index-9bae90f3-BXKxYnBg.js → index-9bae90f3-Cc18qrXw.js} +1 -1
  157. package/dist-embed/chunks/{index-h3ezbReI.js → index-B5W7CVUY.js} +1 -1
  158. package/dist-embed/chunks/{index-BeTQYXBa.js → index-BQEWUnIX.js} +1 -1
  159. package/dist-embed/chunks/{index-C1V3QrNG.js → index-BXY2kJ1z.js} +1 -1
  160. package/dist-embed/chunks/{index-BDfHQl3F.js → index-BzdaTJ02.js} +4 -4
  161. package/dist-embed/chunks/{index-BxqT3iXs.js → index-C-4crJTg.js} +4 -4
  162. package/dist-embed/chunks/{index-BrEfsSSF.js → index-CBWGYoQM.js} +1 -1
  163. package/dist-embed/chunks/{index-D6Jo2GVI.js → index-CET7bv5d.js} +1 -1
  164. package/dist-embed/chunks/{index-BAjfjlr1.js → index-h8lXpqtD.js} +1 -1
  165. package/dist-embed/chunks/index.esm-DwyYEnhk.js +1 -0
  166. package/dist-embed/chunks/{index.esm-hHiWwus_.js → index.esm-fF--io5D.js} +1 -1
  167. package/dist-embed/chunks/{infoDiagram-27XIBGKW-DR9uGGbg.js → infoDiagram-27XIBGKW-BZLQcxTA.js} +1 -1
  168. package/dist-embed/chunks/{infoDiagram-27XIBGKW-BWng8B0-.js → infoDiagram-27XIBGKW-DlOi-VkF.js} +1 -1
  169. package/dist-embed/chunks/{infoDiagram-27XIBGKW-CUOzYTfJ.js → infoDiagram-27XIBGKW-Ir7z7vae.js} +1 -1
  170. package/dist-embed/chunks/{infoDiagram-a29d40f1-HEc-jV3D.js → infoDiagram-a29d40f1-B_50LXsh.js} +1 -1
  171. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-bN5K7Z_H.js → ishikawaDiagram-5VMMS53U-CUxqPwbA.js} +1 -1
  172. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-D-4s54qG.js → ishikawaDiagram-5VMMS53U-CmchLGEY.js} +1 -1
  173. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-A0e9fSuG.js → ishikawaDiagram-5VMMS53U-Erx01g7S.js} +1 -1
  174. package/dist-embed/chunks/{it-IT-JPQ66NNP-B82xwLEQ.js → it-IT-JPQ66NNP-CbZLqWAE.js} +1 -1
  175. package/dist-embed/chunks/{ja-JP-DBVTYXUO-CM-98LRm.js → ja-JP-DBVTYXUO-9xZnJjLg.js} +1 -1
  176. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Bi4bGCmh.js → journeyDiagram-3NMN7TZE-B6PqY62p.js} +1 -1
  177. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BxzwEGdA.js → journeyDiagram-3NMN7TZE-BRe0KiaN.js} +1 -1
  178. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-8G4uOxBl.js → journeyDiagram-3NMN7TZE-C9s2og1s.js} +1 -1
  179. package/dist-embed/chunks/{journeyDiagram-95396277-eqSlSLqg.js → journeyDiagram-95396277-BsoN0fKG.js} +1 -1
  180. package/dist-embed/chunks/{kaa-6HZHGXH3-Ef811qmk.js → kaa-6HZHGXH3-CO2r0Hb-.js} +1 -1
  181. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-DXBRnDqR.js → kab-KAB-ZGHBKWFO-0WoWjCrc.js} +1 -1
  182. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-CmTw15_j.js → kanban-definition-UXKFOSKX-B6PDcRlF.js} +1 -1
  183. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DMF43A4Q.js → kanban-definition-UXKFOSKX-BO0-y3yZ.js} +1 -1
  184. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DMkqn8yL.js → kanban-definition-UXKFOSKX-CKIjAYbp.js} +1 -1
  185. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DXPHFZv8.js → kk-KZ-P5N5QNE5-DFQE1uuw.js} +1 -1
  186. package/dist-embed/chunks/{km-KH-HSX4SM5Z-fcVwn7la.js → km-KH-HSX4SM5Z-D0Bja56Q.js} +1 -1
  187. package/dist-embed/chunks/{ko-KR-MTYHY66A-fPmaSt-R.js → ko-KR-MTYHY66A-C6MeQrMU.js} +1 -1
  188. package/dist-embed/chunks/{ku-TR-6OUDTVRD-DLO8mEqc.js → ku-TR-6OUDTVRD-CweepkXr.js} +1 -1
  189. package/dist-embed/chunks/{layout-BQJeAUxn.js → layout-Bz98EP0E.js} +1 -1
  190. package/dist-embed/chunks/{layout-DKKRYrOx.js → layout-DPmNjViN.js} +1 -1
  191. package/dist-embed/chunks/{layout-BiwLrHFv.js → layout-mk0FGxVc.js} +1 -1
  192. package/dist-embed/chunks/{lexicalHooks-CJT40c-i.js → lexicalHooks-Cj3BNPDC.js} +1 -1
  193. package/dist-embed/chunks/{lib-CCs8IFk9.js → lib-0j0dfH8p.js} +1 -1
  194. package/dist-embed/chunks/{lib-BWVYnyap.js → lib-B01oDNlH.js} +1 -1
  195. package/dist-embed/chunks/{lib-DGyQX8HH.js → lib-B62N3zGB.js} +1 -1
  196. package/dist-embed/chunks/{lib-DjnzrDLN.js → lib-BItrfBU4.js} +1 -1
  197. package/dist-embed/chunks/{lib-DiaM9sQK.js → lib-BmoHRaAo.js} +1 -1
  198. package/dist-embed/chunks/{lib-Bt7-2uko.js → lib-BnAfx9wF.js} +1 -1
  199. package/dist-embed/chunks/{lib-5GRWA8Zf.js → lib-C-8NAvI1.js} +1 -1
  200. package/dist-embed/chunks/{lib-D-sHfT2H.js → lib-COg_k5cY.js} +1 -1
  201. package/dist-embed/chunks/{lib-DlJpF03q.js → lib-CY6QUCzq.js} +1 -1
  202. package/dist-embed/chunks/{lib-Bkasfzit.js → lib-CjicD0Pj.js} +1 -1
  203. package/dist-embed/chunks/{lib-Ct98HeTv.js → lib-CkKgTevD.js} +1 -1
  204. package/dist-embed/chunks/{lib-CAO9TgtV.js → lib-D8Ksfd49.js} +1 -1
  205. package/dist-embed/chunks/{lib-hGDX-thU.js → lib-DCBCbRKN.js} +1 -1
  206. package/dist-embed/chunks/{lib-C9Xg-F1Z.js → lib-DpZphKNm.js} +1 -1
  207. package/dist-embed/chunks/{lib-D63-MDjq.js → lib-DzVf9ZJD.js} +1 -1
  208. package/dist-embed/chunks/{lib-Duu9jvZE.js → lib-Hgl-pfON.js} +1 -1
  209. package/dist-embed/chunks/{lib-D7hI6faK.js → lib-f60SfhfM.js} +1 -1
  210. package/dist-embed/chunks/{lib-Bp97CI40.js → lib-ku1U2GxE.js} +1 -1
  211. package/dist-embed/chunks/{lib-B9ZzlHt8.js → lib-tR3XRdBe.js} +1 -1
  212. package/dist-embed/chunks/{lib-BBunDtjl.js → lib-w650Gz0V.js} +1 -1
  213. package/dist-embed/chunks/{lt-LT-XHIRWOB4-CDj2NwJ7.js → lt-LT-XHIRWOB4-DrPOBOia.js} +1 -1
  214. package/dist-embed/chunks/{lv-LV-5QDEKY6T-DM0UmntK.js → lv-LV-5QDEKY6T-BlGiDUA0.js} +1 -1
  215. package/dist-embed/chunks/{mermaid.core-BFu8E2Ch.js → mermaid.core-1p09QPXM.js} +3 -3
  216. package/dist-embed/chunks/{mermaid.core-oCOrUXH6.js → mermaid.core-BiF8MSuv.js} +5 -5
  217. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-BBOAmrK9.js → mindmap-definition-YA3MSWOX-CEFrcqEk.js} +1 -1
  218. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-D5P4dsfO.js → mindmap-definition-YA3MSWOX-DpAy5heR.js} +1 -1
  219. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-k9DaqQ85.js → mindmap-definition-YA3MSWOX-t1pDKjS3.js} +1 -1
  220. package/dist-embed/chunks/{mindmap-definition-e4c1d938-pjtVjzMw.js → mindmap-definition-e4c1d938-DcepOwKv.js} +1 -1
  221. package/dist-embed/chunks/{model-BlGqAZ_E.js → model-jLDiOPpQ.js} +1 -1
  222. package/dist-embed/chunks/{mr-IN-CRQNXWMA-DKu7Lbyh.js → mr-IN-CRQNXWMA-BWEVprKf.js} +1 -1
  223. package/dist-embed/chunks/{my-MM-5M5IBNSE-OpXhxQFy.js → my-MM-5M5IBNSE-BBxutJOz.js} +1 -1
  224. package/dist-embed/chunks/{nb-NO-T6EIAALU-CaW58ARR.js → nb-NO-T6EIAALU-DJnrKa7W.js} +1 -1
  225. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-D4WjKwio.js → nl-NL-IS3SIHDZ-DQfv4h3e.js} +1 -1
  226. package/dist-embed/chunks/{nn-NO-6E72VCQL-n-7vV9Cs.js → nn-NO-6E72VCQL-DiGj9RA6.js} +1 -1
  227. package/dist-embed/chunks/{oc-FR-POXYY2M6-CB6dwikR.js → oc-FR-POXYY2M6-WJRn50ji.js} +1 -1
  228. package/dist-embed/chunks/{pa-IN-N4M65BXN-Cq4oiAGn.js → pa-IN-N4M65BXN-U7QCzNgm.js} +1 -1
  229. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-oNVN1IG9.js → pegDiagram-XKGWAZYB-BlYwAwEo.js} +1 -1
  230. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BTn5P1TU.js → pegDiagram-XKGWAZYB-CudwiD3O.js} +1 -1
  231. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Cge-GlZ7.js → pegDiagram-XKGWAZYB-iE6rBtXO.js} +1 -1
  232. package/dist-embed/chunks/{percentages-BXMCSKIN-DRR-eJCX.js → percentages-BXMCSKIN-DhE6_GLO.js} +5 -5
  233. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-C9syugZr.js → pieDiagram-E7YTZNPT-CIawCiDR.js} +1 -1
  234. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-LKAJV-f9.js → pieDiagram-E7YTZNPT-Cy6Wueqp.js} +1 -1
  235. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-LRVEFdTA.js → pieDiagram-E7YTZNPT-DkhDYj7K.js} +1 -1
  236. package/dist-embed/chunks/{pieDiagram-c941bede-DjCRmn-L.js → pieDiagram-c941bede-Ds-rlqjJ.js} +1 -1
  237. package/dist-embed/chunks/{pl-PL-T2D74RX3-C1YHW5JY.js → pl-PL-T2D74RX3-D5hzyBxL.js} +1 -1
  238. package/dist-embed/chunks/{plugin-DdlXgZum.js → plugin-BqLEv-U0.js} +1 -1
  239. package/dist-embed/chunks/{pt-BR-5N22H2LF-CeAhQlI9.js → pt-BR-5N22H2LF-CAs1Vbwd.js} +1 -1
  240. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-GWUC3hdB.js → pt-PT-UZXXM6DQ-f3BuGnIL.js} +1 -1
  241. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-8vY1ABOf.js → quadrantDiagram-AXDQQJYC-1ViFLfLW.js} +1 -1
  242. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-C2i8SYpJ.js → quadrantDiagram-AXDQQJYC-B30POsrM.js} +1 -1
  243. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DFP2Eoj5.js → quadrantDiagram-AXDQQJYC-CqArYUyr.js} +1 -1
  244. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Bgejfr6D.js → quadrantDiagram-cf8b8fe0-QoN4fcns.js} +1 -1
  245. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-D8iXssMi.js → railroadDiagram-O6MQD6OU-BKrSAEIz.js} +1 -1
  246. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-Ck2bziJ8.js → railroadDiagram-O6MQD6OU-BelGMNLe.js} +1 -1
  247. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-B54ysFcl.js → railroadDiagram-O6MQD6OU-nWQg4Zha.js} +1 -1
  248. package/dist-embed/chunks/{renderer-Dsm4_V5Z.js → renderer-NdtLW87o.js} +1 -1
  249. package/dist-embed/chunks/{requirementDiagram-53bda41b-Don9LmwH.js → requirementDiagram-53bda41b-DRQpj1S7.js} +1 -1
  250. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BKfTxvAx.js → requirementDiagram-BXWQKSXE-BsKIaNx-.js} +1 -1
  251. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BluOoSWL.js → requirementDiagram-BXWQKSXE-C-ZNAzIA.js} +1 -1
  252. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DzYOora7.js → requirementDiagram-BXWQKSXE-Dj_84sJE.js} +1 -1
  253. package/dist-embed/chunks/{ro-RO-JPDTUUEW-CfstrBRj.js → ro-RO-JPDTUUEW-Ck6Pl6T-.js} +1 -1
  254. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CprdF87i.js → ru-RU-B4JR7IUQ-B5ZFvbSm.js} +1 -1
  255. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BbWM5efa.js → sankeyDiagram-P5KCCOFB-BwrjNR9f.js} +1 -1
  256. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BO6yMQvy.js → sankeyDiagram-P5KCCOFB-CvESkMt0.js} +1 -1
  257. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CFPCOaBB.js → sankeyDiagram-P5KCCOFB-DNcJ8lTV.js} +1 -1
  258. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-foGV8N2_.js → sankeyDiagram-c3ef121a-NSdOSIUQ.js} +1 -1
  259. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-6pLDiDbB.js → sequenceDiagram-82a5b84f-Cxc06-S6.js} +1 -1
  260. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-C0zWhG8B.js → sequenceDiagram-WJ2MYXX4-CdKf7EXa.js} +1 -1
  261. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-w41G2RsH.js → sequenceDiagram-WJ2MYXX4-DYkcZR01.js} +1 -1
  262. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BGIbaSlI.js → sequenceDiagram-WJ2MYXX4-vrbMF2lh.js} +1 -1
  263. package/dist-embed/chunks/{sheet-4YYsjTBK.js → sheet-BFp5lgzm.js} +1 -1
  264. package/dist-embed/chunks/{si-LK-N5RQ5JYF-CBECC-z7.js → si-LK-N5RQ5JYF-turarKuZ.js} +1 -1
  265. package/dist-embed/chunks/{sizeCapture-INFHLROL-C4Um3fMN.js → sizeCapture-INFHLROL-B05-5pAF.js} +1 -1
  266. package/dist-embed/chunks/{sizeCapture-INFHLROL-WE85tnHS.js → sizeCapture-INFHLROL-BTK449Mq.js} +1 -1
  267. package/dist-embed/chunks/{sizeCapture-INFHLROL-DAIM469w.js → sizeCapture-INFHLROL-DBDGASUh.js} +1 -1
  268. package/dist-embed/chunks/{sk-SK-C5VTKIMK-DMJnHZkB.js → sk-SK-C5VTKIMK-B61Eejyh.js} +1 -1
  269. package/dist-embed/chunks/{sl-SI-NN7IZMDC-7Z4OGoYj.js → sl-SI-NN7IZMDC-Vmd7HFee.js} +1 -1
  270. package/dist-embed/chunks/{state-DWaoyyF_.js → state-B-9Ja93T.js} +1 -1
  271. package/dist-embed/chunks/{stateDiagram-43e79a5f-S14mEvLi.js → stateDiagram-43e79a5f-BNfT8BMf.js} +1 -1
  272. package/dist-embed/chunks/{stateDiagram-D77RDMKH-BC6_D1er.js → stateDiagram-D77RDMKH-B4P4foWm.js} +1 -1
  273. package/dist-embed/chunks/{stateDiagram-D77RDMKH-BKswuz-D.js → stateDiagram-D77RDMKH-DGy5pPcJ.js} +1 -1
  274. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DaQTz1j_.js → stateDiagram-D77RDMKH-cX1LxuDW.js} +1 -1
  275. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-3GcjyBy-.js → stateDiagram-v2-2041ed4f-DT_Cb2bL.js} +1 -1
  276. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-Bm6DUSD7.js → stateDiagram-v2-MP3YSRHH-BSxDwfLM.js} +1 -1
  277. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-z0Ujpn87.js → stateDiagram-v2-MP3YSRHH-CoF-m0JB.js} +1 -1
  278. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-DOLQNFRH.js → stateDiagram-v2-MP3YSRHH-GuE-uLPq.js} +1 -1
  279. package/dist-embed/chunks/{styles-455b33cd-BRr4X9hL.js → styles-455b33cd-Cp1Ujuo8.js} +1 -1
  280. package/dist-embed/chunks/{styles-f932cba9-UDBXX5a8.js → styles-f932cba9-CxoS5hwQ.js} +1 -1
  281. package/dist-embed/chunks/{styles-fcc2142b-CSFZuop9.js → styles-fcc2142b-ByLmqETE.js} +1 -1
  282. package/dist-embed/chunks/{subset-shared.chunk-B3u5KdN0.js → subset-shared.chunk-BsVAPxIg.js} +1 -1
  283. package/dist-embed/chunks/{subset-worker.chunk-CT6VKIPU.js → subset-worker.chunk-BS8PIaQX.js} +1 -1
  284. package/dist-embed/chunks/{substates-CZP38fPi.js → substates-CeUNAPt2.js} +1 -1
  285. package/dist-embed/chunks/{sv-SE-XGPEYMSR-FpJ1BpmI.js → sv-SE-XGPEYMSR-C9lMr16n.js} +1 -1
  286. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-F4sRB6k0.js → svgDrawCommon-148a3cd9-BHhr6lti.js} +1 -1
  287. package/dist-embed/chunks/{swimlanes-42K2YHIH-EibPKc5o.js → swimlanes-42K2YHIH-DKdFBGRm.js} +1 -1
  288. package/dist-embed/chunks/{swimlanes-42K2YHIH-Bm2EMEIj.js → swimlanes-42K2YHIH-DQJZa-xA.js} +1 -1
  289. package/dist-embed/chunks/{swimlanes-42K2YHIH-60OSS3vA.js → swimlanes-42K2YHIH-RHIIyMRW.js} +1 -1
  290. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-C5g-ZOer.js → swimlanesDiagram-VR7AAH4N-DPhzMK19.js} +1 -1
  291. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-mQfKwLBP.js → swimlanesDiagram-VR7AAH4N-qQpIxgus.js} +1 -1
  292. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-Dd4rkKxx.js → swimlanesDiagram-VR7AAH4N-rV-EK234.js} +1 -1
  293. package/dist-embed/chunks/{ta-IN-2NMHFXQM-CGrfHW-T.js → ta-IN-2NMHFXQM-DDvtKbYb.js} +1 -1
  294. package/dist-embed/chunks/{th-TH-HPSO5L25-XSyuAjYd.js → th-TH-HPSO5L25-Cuk9i9q1.js} +1 -1
  295. package/dist-embed/chunks/{timeline-definition-24CTP7MA-Dw-j__OF.js → timeline-definition-24CTP7MA-B0VfyyC9.js} +1 -1
  296. package/dist-embed/chunks/{timeline-definition-24CTP7MA-DrK86SXx.js → timeline-definition-24CTP7MA-BYQXqujM.js} +1 -1
  297. package/dist-embed/chunks/{timeline-definition-24CTP7MA-4xcdFEe3.js → timeline-definition-24CTP7MA-CNJYLQV3.js} +1 -1
  298. package/dist-embed/chunks/{timeline-definition-7545f45a-BbuRGmnt.js → timeline-definition-7545f45a-B6u65RjP.js} +1 -1
  299. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Bmilf4wA.js → tr-TR-DEFEU3FU-Dt5AbXXF.js} +1 -1
  300. package/dist-embed/chunks/{uk-UA-QMV73CPH-D7__x2rc.js → uk-UA-QMV73CPH-CqxkvO2g.js} +1 -1
  301. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Dyygo0QE.js → vennDiagram-4TSXK5OY-8GPjZ_rY.js} +1 -1
  302. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-DU_TiJPw.js → vennDiagram-4TSXK5OY-BC0uMGWS.js} +1 -1
  303. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-aBwLZ5sI.js → vennDiagram-4TSXK5OY-ERcpoENM.js} +1 -1
  304. package/dist-embed/chunks/{vi-VN-M7AON7JQ-Cp1NNDFR.js → vi-VN-M7AON7JQ-CZtlZzss.js} +1 -1
  305. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-BUupZELs.js → wardleyDiagram-VM6X3IG4-Bubuc1xO.js} +1 -1
  306. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-8uoJ6em9.js → wardleyDiagram-VM6X3IG4-DMJNYu8Y.js} +1 -1
  307. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DJsJzMBH.js → wardleyDiagram-VM6X3IG4-DdRbpzRB.js} +1 -1
  308. package/dist-embed/chunks/workbook-BQLbQvZ-.js +1 -0
  309. package/dist-embed/chunks/{write-DDDJmUTa.js → write-D-y9_9sL.js} +1 -1
  310. package/dist-embed/chunks/{xychartDiagram-3f383b91-CbuvIhMQ.js → xychartDiagram-3f383b91-CEkYRds9.js} +1 -1
  311. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-D2_kfHro.js → xychartDiagram-S5SC5T6Z-C0WCXM2P.js} +1 -1
  312. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-AUNwwAUK.js → xychartDiagram-S5SC5T6Z-DKWKSC-B.js} +1 -1
  313. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-B9ZiyRsR.js → xychartDiagram-S5SC5T6Z-iG96dorC.js} +1 -1
  314. package/dist-embed/chunks/{zh-CN-LNUGB5OW-1W7T5K4d.js → zh-CN-LNUGB5OW-6_SDF9o2.js} +1 -1
  315. package/dist-embed/chunks/{zh-HK-E62DVLB3-6wLRdIMH.js → zh-HK-E62DVLB3-em8dd9Nl.js} +1 -1
  316. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-Bq3E0gIc.js → zh-TW-RAJ6MFWO-BCzbAoXj.js} +1 -1
  317. package/dist-embed/datalayer-app-main.js +68 -74
  318. package/lib/apps/plugins/chat/ChatView.js +96 -38
  319. package/lib/chat/anonymous/AnonymousChat.d.ts +0 -3
  320. package/lib/chat/anonymous/anonymousMode.d.ts +0 -4
  321. package/lib/chat/anonymous/anonymousMode.js +0 -4
  322. package/lib/chat/base/ChatBase.js +2 -58
  323. package/lib/chat/index.d.ts +1 -1
  324. package/lib/chat/index.js +1 -1
  325. package/lib/chat/indicators/index.d.ts +3 -12
  326. package/lib/chat/indicators/index.js +0 -15
  327. package/lib/chat/prompt/InputPrompt.d.ts +28 -16
  328. package/lib/chat/prompt/InputPrompt.js +60 -12
  329. package/lib/chat/prompt/menus/EquipmentMenus.d.ts +58 -81
  330. package/lib/chat/prompt/menus/EquipmentMenus.js +190 -127
  331. package/lib/chat/prompt/menus/ToolsMenu.d.ts +2 -11
  332. package/lib/chat/prompt/menus/ToolsMenu.js +8 -43
  333. package/lib/chat/prompt/menus/equipmentRows.d.ts +160 -0
  334. package/lib/chat/prompt/menus/equipmentRows.js +349 -0
  335. package/lib/chat/prompt/menus/index.d.ts +2 -1
  336. package/lib/chat/prompt/menus/index.js +2 -1
  337. package/lib/hooks/useConversationSwitches.d.ts +29 -0
  338. package/lib/hooks/useConversationSwitches.js +102 -0
  339. package/lib/hooks/useMcpToolSwitches.d.ts +13 -0
  340. package/lib/hooks/useMcpToolSwitches.js +96 -0
  341. package/lib/portable/index.d.ts +1 -1
  342. package/lib/portable/sessions.d.ts +47 -0
  343. package/lib/portable/sessions.js +7 -0
  344. package/lib/types/chat.d.ts +2 -3
  345. package/package.json +1 -1
  346. package/dist-embed/chunks/ChatView-BxxW10wd.js +0 -32
  347. package/dist-embed/chunks/index.esm-ClpGzk_d.js +0 -1
  348. package/dist-embed/chunks/workbook-B-AfiHkC.js +0 -1
  349. package/lib/chat/indicators/DisabledIndicator.d.ts +0 -18
  350. package/lib/chat/indicators/DisabledIndicator.js +0 -22
  351. package/lib/chat/indicators/McpStatusIndicator.d.ts +0 -18
  352. package/lib/chat/indicators/McpStatusIndicator.js +0 -106
  353. package/lib/chat/indicators/SkillsStatusIndicator.d.ts +0 -13
  354. package/lib/chat/indicators/SkillsStatusIndicator.js +0 -88
  355. package/lib/chat/prompt/menus/SkillsMenu.d.ts +0 -10
  356. package/lib/chat/prompt/menus/SkillsMenu.js +0 -49
@@ -0,0 +1,96 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+ /**
6
+ * The conversation's MCP tool switches, for a chat that draws its own
7
+ * composer (the user, 19 November 2026: the toggles back in the MCP
8
+ * overlay): which tools of each server are on and approved, as the
9
+ * runtime's status says, with what was just switched held until its next
10
+ * status, and the switches, sent over the runtime's monitoring stream as
11
+ * `ChatBase` sends them (`mcp_server_tools_set`, `mcp_server_tool_approve`).
12
+ *
13
+ * A switch is offered only while that stream is open (`switchesLocked`
14
+ * says why otherwise): a send that finds it closed is an error.
15
+ *
16
+ * @module hooks/useMcpToolSwitches
17
+ */
18
+ import { useCallback, useEffect, useMemo, useState } from 'react';
19
+ import { agentRuntimeStore } from '../stores/index.js';
20
+ import { enabledToolsOf, parseApprovedMcpToolsByServer, parseEnabledMcpToolsByServer, } from '../chat/prompt/menus/equipmentRows.js';
21
+ const EMPTY = new Map();
22
+ function send(payload, agentId) {
23
+ if (!agentRuntimeStore.getState().sendRawMessage(payload, agentId)) {
24
+ throw new Error(`The runtime's monitoring stream is closed: ${String(payload.type)} was not sent.`);
25
+ }
26
+ }
27
+ /** The tools a server lists: its config's, else its live status's. */
28
+ function toolNamesOf(serverId, servers, status) {
29
+ const configured = servers.find(each => each.id === serverId);
30
+ if (configured && configured.tools.length > 0) {
31
+ return configured.tools.map(tool => tool.name);
32
+ }
33
+ return (status?.servers.find(each => each.id === serverId)?.tools ?? []).map(tool => tool.name);
34
+ }
35
+ export function useMcpToolSwitches({ agentId, status, servers, }) {
36
+ const reported = useMemo(() => ({
37
+ enabled: parseEnabledMcpToolsByServer(status) ?? EMPTY,
38
+ approved: parseApprovedMcpToolsByServer(status) ?? EMPTY,
39
+ }), [status]);
40
+ // What was switched here, until the runtime's next status says it.
41
+ const [switched, setSwitched] = useState({ enabled: new Map(), approved: new Map() });
42
+ useEffect(() => {
43
+ setSwitched({ enabled: new Map(), approved: new Map() });
44
+ }, [reported, agentId]);
45
+ const enabledMcpTools = useMemo(() => new Map([...reported.enabled, ...switched.enabled]), [reported, switched]);
46
+ const approvedMcpTools = useMemo(() => new Map([...reported.approved, ...switched.approved]), [reported, switched]);
47
+ const setTools = useCallback((serverId, tools) => {
48
+ send({
49
+ type: 'mcp_server_tools_set',
50
+ serverId,
51
+ enabledToolNames: Array.from(tools),
52
+ }, agentId);
53
+ setSwitched(prev => ({
54
+ ...prev,
55
+ enabled: new Map(prev.enabled).set(serverId, tools),
56
+ }));
57
+ }, [agentId]);
58
+ const onToggleMcpTool = useCallback((serverId, toolName) => {
59
+ const tools = new Set(enabledToolsOf(enabledMcpTools, serverId, toolNamesOf(serverId, servers, status)));
60
+ if (tools.has(toolName)) {
61
+ tools.delete(toolName);
62
+ }
63
+ else {
64
+ tools.add(toolName);
65
+ }
66
+ setTools(serverId, tools);
67
+ }, [enabledMcpTools, servers, status, setTools]);
68
+ const onToggleAllMcpServerTools = useCallback((serverId, toolNames, enable) => setTools(serverId, enable ? new Set(toolNames) : new Set()), [setTools]);
69
+ const onToggleMcpToolApproval = useCallback((serverId, toolName) => {
70
+ const approved = new Set(approvedMcpTools.get(serverId) ?? []);
71
+ const approve = !approved.has(toolName);
72
+ send({
73
+ type: 'mcp_server_tool_approve',
74
+ serverId,
75
+ toolName,
76
+ approved: approve,
77
+ }, agentId);
78
+ if (approve) {
79
+ approved.add(toolName);
80
+ }
81
+ else {
82
+ approved.delete(toolName);
83
+ }
84
+ setSwitched(prev => ({
85
+ ...prev,
86
+ approved: new Map(prev.approved).set(serverId, approved),
87
+ }));
88
+ }, [approvedMcpTools, agentId]);
89
+ return {
90
+ enabledMcpTools,
91
+ approvedMcpTools,
92
+ onToggleMcpTool,
93
+ onToggleAllMcpServerTools,
94
+ onToggleMcpToolApproval,
95
+ };
96
+ }
@@ -29,5 +29,5 @@ export { failureOf, otlpMetricsOf, RunMeter, type RunMeasure, type StreamFailure
29
29
  export { ACTIVITY_WORDS, activityOf, entryOf, entrySaid, mergeActivityPages, runEndOf, scheduledSays, SESSION_LINEAGE_WORDS, SESSION_STATE_WORDS, SESSION_STATES, SESSION_TURN_WORDS, SESSION_TURNS, sessionAgentSaid, sessionLineageSaid, sessionPageOf, sessionRowOf, sessionSentence, sessionStateSaid, wakesOn, type AppActivity, type RecordEntry, type RecordKind, type ScheduledRun, type SessionLineage, type SessionRow, type SessionRunsOn, type SessionState, type SessionTurn, } from './activity';
30
30
  export { deploymentEventLine, deploymentEventOf, notDeletedOf, resetBody, resetCountsOf, resetLines, stateChangeBody, stoppedWorkLine, stoppedWorkOf, type DeploymentEvent, type DeploymentEventKind, type DeploymentState, type ResetCounts, type StoppedWork, } from './lifecycle';
31
31
  export { agentRuntimesOf, agentSummaryOfRuntime, CREATING_STATUSES, isAgentRuntime, isCreatingAgent, runtimeOf, type AgentRuntime, type AgentSummaryData, } from './runtimes';
32
- export { agentRunClient, agentRuntimesUrlOf, appSessionsClient, RuntimeRefusal, type AgentRunClient, type AgentTurn, type AppSessionsClient, type RuntimeClientOptions, type SessionStart, type StreamOptions, } from './sessions';
32
+ export { agentRunClient, agentRuntimesUrlOf, appSessionsClient, RuntimeRefusal, type AgentRunClient, type AgentTurn, type AppSessionsClient, type ConversationSwitch, type ConversationSwitchesState, type RuntimeClientOptions, type SessionStart, type StreamOptions, } from './sessions';
33
33
  export type { ChatMessage } from '../types/messages';
@@ -43,6 +43,46 @@ export type SessionStart = {
43
43
  /** The session's uid, when the client chose it. */
44
44
  session?: string;
45
45
  };
46
+ /**
47
+ * One switch of a conversation, as the session API takes it
48
+ * (`PUT /api/v1/apps/sessions/{uid}/switches`): for that conversation alone.
49
+ */
50
+ export type ConversationSwitch = {
51
+ kind: 'server';
52
+ server: string;
53
+ enabled: boolean;
54
+ } | {
55
+ kind: 'tool';
56
+ server: string;
57
+ tool: string;
58
+ enabled: boolean;
59
+ } | {
60
+ kind: 'tool_approval';
61
+ server: string;
62
+ tool: string;
63
+ approved: boolean;
64
+ } | {
65
+ kind: 'skill';
66
+ skill: string;
67
+ enabled: boolean;
68
+ } | {
69
+ kind: 'skills';
70
+ skills: string[];
71
+ enabled: boolean;
72
+ } | {
73
+ kind: 'skill_approval';
74
+ skill: string;
75
+ approved: boolean;
76
+ };
77
+ /** What a conversation switched: only that, the rest as its agent has it. */
78
+ export type ConversationSwitchesState = {
79
+ /** The tools on, by server, for the servers it switched. */
80
+ mcp_tools: Record<string, string[]>;
81
+ /** The tools approved, by server, for the servers whose approvals it switched. */
82
+ mcp_approved: Record<string, string[]>;
83
+ skills: Record<string, boolean>;
84
+ skills_approved: Record<string, boolean>;
85
+ };
46
86
  /**
47
87
  * An application's sessions on the runtime that runs it: start, message,
48
88
  * settings, resume (streamed), and stop, end, read (JSON).
@@ -89,6 +129,13 @@ export declare function appSessionsClient(options: RuntimeClientOptions): {
89
129
  rename: (uid: string, title: string) => Promise<Record<string, unknown>>;
90
130
  /** Archive it (hidden from the list unless asked for), or bring it back. */
91
131
  archive: (uid: string, archived: boolean) => Promise<Record<string, unknown>>;
132
+ /** What the conversation switched of its agent's MCP tools and skills. */
133
+ switches: (uid: string) => Promise<ConversationSwitchesState>;
134
+ /**
135
+ * One switch, for this conversation alone; a `RuntimeRefusal` with the
136
+ * runtime's sentence for what it does not offer. Answers its switches.
137
+ */
138
+ switchIn: (uid: string, said: ConversationSwitch) => Promise<ConversationSwitchesState>;
92
139
  /** Its conversation as a person reads it (`messagesOfThread`). */
93
140
  messages: (uid: string) => Promise<ChatMessage[]>;
94
141
  };
@@ -146,6 +146,13 @@ export function appSessionsClient(options) {
146
146
  rename: (uid, title) => json(`${at(uid)}/title`, 'PUT', { title }),
147
147
  /** Archive it (hidden from the list unless asked for), or bring it back. */
148
148
  archive: (uid, archived) => json(`${at(uid)}/archived`, 'PUT', { archived }),
149
+ /** What the conversation switched of its agent's MCP tools and skills. */
150
+ switches: async (uid) => (await json(`${at(uid)}/switches`)),
151
+ /**
152
+ * One switch, for this conversation alone; a `RuntimeRefusal` with the
153
+ * runtime's sentence for what it does not offer. Answers its switches.
154
+ */
155
+ switchIn: async (uid, said) => (await json(`${at(uid)}/switches`, 'PUT', said)),
149
156
  /** Its conversation as a person reads it (`messagesOfThread`). */
150
157
  messages: async (uid) => messagesOfThread((await json(`${at(uid)}/messages`)).messages),
151
158
  };
@@ -799,9 +799,8 @@ export interface ChatBaseProps {
799
799
  */
800
800
  contextSnapshot?: import('./context').ContextSnapshotData;
801
801
  /**
802
- * External MCP toolsets status data for the MCP indicator.
803
- * When provided, the data is forwarded to the McpStatusIndicator
804
- * so it shows their live status; with none, it is not drawn.
802
+ * External MCP toolsets status data for the MCP dot and menu.
803
+ * When provided, their rows show its live status.
805
804
  */
806
805
  mcpStatusData?: import('./mcp').McpToolsetsStatusResponse | null;
807
806
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datalayer/agent-runtimes",
3
- "version": "1.6.97",
3
+ "version": "1.6.98",
4
4
  "type": "module",
5
5
  "workspaces": [
6
6
  ".",
@@ -1,32 +0,0 @@
1
- import{ag as K,fi as ho,r as o,j as t,hv as xo,hw as bo,cq as ps,B as h,H as It,T as $,v as q,dG as un,fG as bn,hx as ce,a9 as Et,y as vo,hy as So,aI as yo,fm as jo,hz as Co,bh as ko,hA as wo,hB as To,hC as Io,hD as Eo,hE as Ro,hF as Ao,hG as Ts,f9 as Is,f7 as $o,dC as Mo,fa as vn,hH as Oo,hI as Po,hJ as Uo,hK as ms,hL as Lo,hM as Es,f_ as _o,fE as Fo,dI as Ge,fN as zo,bA as te,hN as Bo,hO as Rs,hP as As,hQ as No,L as Vo,hR as Do,I as $s,hu as Ho,D as Ms,hS as gs,hT as Wo,hU as Go,E as Ko,cP as qo,hV as Yo,hW as Jo,hX as Qo,hY as Zo,hZ as Xo,h_ as ea,ab as fn,h$ as ta,i0 as na,i1 as sa,i2 as oa,i3 as aa,i4 as ia,i5 as ra,i6 as la,i7 as ca,i8 as da,i9 as ua,ia as fa,ib as pa,ic as ma,id as ga,ie as ha,ig as xa,ih as ba,ii as va,ij as Sa,ik as ya,il as dt,im as ja,io as Ca,ip as ka,iq as wa,ir as hs,is as Ta,it as We,iu as Ia,iv as Ea,cQ as ct,iw as Ra,ix as Aa,iy as xs,iz as $a,iA as Ma,iB as Oa,iC as Pa,iD as Ua,iE as La,iF as _a,iG as Fa,iH as za,fQ as Ba,iI as Rt,iJ as Ce,iK as Na,iL as Va,iM as Da,iN as Ha,iO as bs,iP as Wa,iQ as Ga,iR as Ka,iS as qa,iT as Ya,iU as Ja,iV as Qa,iW as Za,iX as Xa,iY as ei,iZ as ti,i_ as ni,i$ as At,j0 as si,j1 as oi,j2 as ai,j3 as ii,j4 as ri,j5 as li,j6 as ci,j7 as vs,j8 as di,j9 as ui,ja as fi,jb as pi,jc as mi,jd as Sn,je as gi,jf as hi,a2 as pn,jg as xi}from"../datalayer-app-main.js";import{S as bi,E as vi,a as Si,M as yi}from"./SignInIcon-C0lCx6yN.js";import{F as ji,a as Ci,b as ki}from"./LinkedInGreyIcon-eBP5iBjI.js";function Os(){const e=K(ho);return o.useMemo(()=>e.map(s=>s.value),[e])}const mn={github:{name:"github",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/github/callback"},google:{name:"google",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/google/callback"},linkedin:{name:"linkedin",oauth2CallbackServerRoute:"jupyter_iam/oauth2/callback",oauth2CallbackUIRoute:"/iam/oauth2/linkedin/callback"}},Ss=()=>{if(typeof document>"u")return"";const e=document.getElementById("datalayer-config-data");if(!e?.textContent)return"";try{const s=JSON.parse(e.textContent);return String(s?.iamUrl||"").replace(/\/$/,"")}catch{return""}},wi=(e,s="Unable to start social sign-in.")=>{if(e instanceof Error&&e.message)return e.message;if(typeof e=="string"&&e.trim())return e;if(e&&typeof e=="object"&&"message"in e){const a=e.message;if(typeof a=="string"&&a.trim())return a}return s},Ti=Co`
2
- .signin-input-theme-scope input:-webkit-autofill,
3
- .signin-input-theme-scope input:-webkit-autofill:hover,
4
- .signin-input-theme-scope input:-webkit-autofill:focus,
5
- .signin-input-theme-scope input:-webkit-autofill:active,
6
- .signin-input-theme-scope input:-webkit-autofill:disabled,
7
- .signin-input-theme-scope textarea:-webkit-autofill,
8
- .signin-input-theme-scope textarea:-webkit-autofill:hover,
9
- .signin-input-theme-scope textarea:-webkit-autofill:focus,
10
- .signin-input-theme-scope textarea:-webkit-autofill:active,
11
- .signin-input-theme-scope textarea:-webkit-autofill:disabled {
12
- -webkit-text-fill-color: var(--fgColor-default) !important;
13
- caret-color: var(--fgColor-default) !important;
14
- -webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
15
- box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
16
- background-color: var(--bgColor-default) !important;
17
- transition: background-color 9999s ease-in-out 0s !important;
18
- }
19
-
20
- .signin-input-theme-scope input:disabled,
21
- .signin-input-theme-scope textarea:disabled {
22
- -webkit-text-fill-color: var(--fgColor-muted) !important;
23
- -webkit-box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
24
- box-shadow: 0 0 0 1000px var(--bgColor-default) inset !important;
25
- background-color: var(--bgColor-default) !important;
26
- opacity: 1 !important;
27
- }
28
- `,Ii=({onSignIn:e,onApiKeySignIn:s,loginUrl:a,name:i,title:c="Datalayer OTEL",description:u="Sign in to access the observability dashboard.",icon:x,leadingIcon:l=t.jsx(jo,{size:24}),github:f=!1,google:v=!1,linkedin:m=!1,apiKey:p=!1,signUp:V=!0,socialSignInNavigationTarget:M,asDoc:y=!1,fillHeight:k=!0,hideHero:O=!1,calloutTitle:I,calloutDescription:oe,passwordToggleLabel:ke="Sign in with a password",signUpTitle:z="Don't have an account?",signUpDescription:$t="Create a free Datalayer account with your email address.",signUpLabel:Mt="Sign up with email",signUpHref:Ot="https://datalayer.ai/signup",onSignUp:ue,forgotPasswordHref:we="/password",forgotPasswordLabel:fe="Forgot password?",showForgotPassword:Pt=!0,socialButtonMarginTop:Ue=3,actionButtonMaxWidth:W=320})=>{const Se=y&&!O,Ke=i??(y&&c==="Datalayer OTEL"?"Datalayer Sign In":c),Ut=x??(y?t.jsx(bi,{size:24}):l),j=o.useMemo(()=>{if(a)return a;const g=Ss();return g?`${g}/api/iam/v1/login`:"/api/iam/v1/login"},[a]),[ne,ut]=o.useState(""),[ye,Lt]=o.useState(""),[L,_t]=o.useState(!1),[pe,Ft]=o.useState(!1),[P,Le]=o.useState(!1),[Te,ft]=o.useState(!1),[me,qe]=o.useState(null),[Y,pt]=o.useState(null),[Ie,zt]=o.useState(""),[Ee,Bt]=o.useState(null),[mt,ae]=o.useState(null),{enqueueToast:ge}=xo(),[_e,Ye]=o.useState(!1),[he,Re]=o.useState(""),Je=o.useRef(null),Qe=o.useCallback(g=>bo()?ps.URLExt.join(ps.PageConfig.getBaseUrl(),g.oauth2CallbackServerRoute):`${window.location.protocol}//${window.location.hostname}${window.location.port?`:${window.location.port}`:""}${g.oauth2CallbackUIRoute}`,[]),ie=o.useMemo(()=>{if(typeof window>"u")return"/";const g=`${window.location.pathname}${window.location.search}${window.location.hash}`;return g.startsWith("/")?g:"/"},[]),Fe=o.useCallback(async g=>{if(!Te){ae(null),qe(g.name),ft(!0);try{const U=Ss(),J=new URLSearchParams({provider:g.name,callback_uri:Qe(g)}),Q=M===void 0?void 0:String(M||"").trim(),et=Q===void 0?ie&&ie!=="/"?ie:void 0:Q&&Q.startsWith("/")&&!Q.startsWith("//")?Q:void 0;et&&J.set("post_auth_redirect",et);const R=`${U||""}/api/iam/v1/oauth2/authz/url?${J.toString()}`,F=await fetch(R),T=await F.json(),xe=T?.autorization_url;if(!F.ok||!xe)throw new Error(T?.message||"Unable to start social sign-in.");window.location.assign(xe)}catch(U){const J=wi(U);ae(J),ge(J,{variant:"error"}),qe(null),ft(!1)}}},[Qe,ie,ge,Te,M]);o.useEffect(()=>{_e&&Je.current?.focus()},[_e]);const re=o.useCallback(()=>{Ye(!1),Re("")},[]),_=o.useCallback(()=>{!he.trim()||!s||(s(he.trim()),re())},[he,s,re]),Ze=o.useCallback(()=>{if(ue){ue();return}window.location.assign(Ot)},[ue,Ot]),Ae=o.useCallback(()=>{if(we){if(we.startsWith("http://")||we.startsWith("https://")){window.open(we,"_blank","noopener,noreferrer");return}window.location.assign(we)}},[we]),ze=o.useCallback(async()=>{if(!(y||!ne||!ye||P)){Le(!0),ae(null);try{const g=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handle:ne,password:ye})});if(!g.ok)throw new Error(`HTTP ${g.status}`);const U=await g.json();if(U.success&&U.token){const J=String(U?.user?.id||U?.user?.uid||"").trim();if(!!U?.user?.mfaUrl&&J){pt(J),Bt(U.token),ae(null);return}e&&e(U.token,ne)}else ae(U.message||"Invalid username or password.")}catch(g){ae(g instanceof Error?g.message:String(g))}finally{Le(!1)}}},[y,ne,ye,P,j,e]),Be=o.useCallback(async()=>{if(!(y||P||!Y||!Ie.trim()||!Ee)){Le(!0),ae(null);try{const g=new URL(j,window.location.origin),U=g.pathname.endsWith("/api/iam/v1/login")?g.href.replace(/\/api\/iam\/v1\/login$/,""):`${g.origin}`,J=await fetch(`${U}/api/iam/v1/users/${Y}/mfa/validate`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({userUid:Y,code:Ie.trim()})}),Q=await J.json();if(!J.ok||!Q?.success)throw new Error(Q?.message||"Failed to validate your MFA code.");e&&e(Ee,ne)}catch(g){const U=g instanceof Error?g.message:String(g);ae(U),ge(U,{variant:"error"})}finally{Le(!1)}}},[y,ge,ne,P,j,Ie,Ee,Y,e]),X=o.useCallback(g=>{g.key==="Enter"&&(Y?Be():ze())},[Y,ze,Be]),Xe=Te||P||y;return t.jsxs(h,{className:"signin-input-theme-scope",display:"flex",alignItems:O||Se||!k?"flex-start":"center",justifyContent:"center",minHeight:O||Se||!k?"auto":"100vh",bg:O?"transparent":"canvas.default",color:"fg.default",py:O?0:Se?2:4,children:[t.jsx(Ti,{}),t.jsxs(h,{width:"100%",maxWidth:440,p:0,children:[!O&&t.jsxs(t.Fragment,{children:[t.jsxs(h,{display:"flex",alignItems:"center",gap:2,mb:Se?2:3,justifyContent:"center",children:[Ut,t.jsx(It,{sx:{fontSize:3},children:Ke})]}),t.jsx($,{as:"p",sx:{fontSize:1,color:"fg.muted",mb:Se?2:3,textAlign:"center"},children:u})]}),(I||oe)&&t.jsxs(h,{mb:3,textAlign:"center",children:[I&&t.jsx(It,{as:"h3",sx:{fontSize:2,mb:1},children:I}),oe&&t.jsx($,{sx:{color:"fg.muted",fontSize:1},children:oe})]}),!Y&&(f||v||m)&&t.jsxs(t.Fragment,{children:[f&&t.jsx(q,{block:!0,size:"large",leadingVisual:me==="github"?()=>t.jsx(un,{size:"small"}):ji,disabled:Xe,onClick:()=>Fe(mn.github),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with GitHub"}),v&&t.jsx(q,{block:!0,size:"large",leadingVisual:me==="google"?()=>t.jsx(un,{size:"small"}):Ci,disabled:Xe,onClick:()=>Fe(mn.google),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with Google"}),m&&t.jsx(q,{block:!0,size:"large",leadingVisual:me==="linkedin"?()=>t.jsx(un,{size:"small"}):ki,disabled:Xe,onClick:()=>Fe(mn.linkedin),sx:{mt:Ue,maxWidth:W,mx:"auto"},children:"Sign in with LinkedIn"})]}),!Y&&!L&&t.jsx(h,{mt:3,display:"flex",justifyContent:"center",children:t.jsx(q,{leadingVisual:bn,size:"large",block:!0,disabled:y||P||Te,onClick:()=>_t(!0),sx:{maxWidth:W,mx:"auto"},children:ke})}),!Y&&L&&t.jsxs(h,{mt:4,children:[t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Username"}),t.jsx(Et,{autoFocus:!0,block:!0,placeholder:"Your username",value:ne,disabled:P||y,onChange:g=>ut(g.target.value),onKeyDown:X})]}),t.jsxs(ce,{required:!0,sx:{mb:3},children:[t.jsx(ce.Label,{children:"Password"}),t.jsx(Et,{block:!0,placeholder:"Your password",type:pe?"text":"password",value:ye,disabled:P||y,onChange:g=>Lt(g.target.value),onKeyDown:X,trailingAction:t.jsx(Et.Action,{onClick:()=>Ft(!pe),disabled:P||y,icon:pe?vi:Si,"aria-label":pe?"Hide password":"Show password",sx:{color:"var(--fgColor-muted)"}})})]}),t.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"space-between",mt:3,children:[t.jsx(q,{variant:"primary",disabled:P||y||!ne||!ye,onClick:ze,children:P?"Signing in…":"Sign In"}),Pt&&t.jsx(vo,{as:"button",sx:{fontSize:1,cursor:y?"not-allowed":"pointer",background:"none",border:"none",opacity:y?.6:1},onClick:()=>{y||P||Ae()},children:fe})]})]}),Y&&t.jsxs(t.Fragment,{children:[t.jsxs(ce,{required:!0,sx:{mb:3,mt:2},children:[t.jsx(ce.Label,{children:"MFA Code"}),t.jsx(Et,{autoFocus:!0,block:!0,placeholder:"Your MFA code",value:Ie,disabled:P||y,onChange:g=>zt(g.target.value),onKeyDown:X})]}),t.jsx(q,{variant:"primary",block:!0,disabled:P||y||!Ie.trim(),onClick:Be,sx:{maxWidth:W,mx:"auto"},children:P?"Validating…":"Validate MFA Code"})]}),mt&&t.jsx($,{sx:{color:"danger.fg",fontSize:1,mt:3,display:"block"},children:mt}),V&&t.jsxs(h,{mt:4,pt:4,textAlign:"center",borderTop:"1px solid",borderColor:"border.muted",children:[t.jsx(It,{as:"h3",sx:{fontSize:2,mb:2},children:z}),t.jsx($,{as:"p",sx:{color:"fg.muted",fontSize:1,mb:3},children:$t}),t.jsx(h,{display:"flex",justifyContent:"center",children:t.jsx(q,{variant:"primary",size:"large",leadingVisual:So,disabled:y||P,onClick:Ze,children:Mt})})]}),p&&s&&t.jsxs(t.Fragment,{children:[t.jsxs(h,{display:"flex",alignItems:"center",gap:2,my:3,children:[t.jsx(h,{flex:1,height:"1px",bg:"border.default"}),t.jsx($,{sx:{fontSize:0,color:"fg.muted"},children:"or"}),t.jsx(h,{flex:1,height:"1px",bg:"border.default"})]}),t.jsx(q,{block:!0,leadingVisual:bn,disabled:y||P||Te,onClick:()=>Ye(!0),sx:{maxWidth:W,mx:"auto"},children:"Sign in with an API Key"}),_e&&t.jsx(h,{role:"dialog","aria-modal":"true","aria-labelledby":"signin-api-key-title",onKeyDown:g=>{g.key==="Escape"&&re()},onClick:re,position:"fixed",inset:0,zIndex:200,p:3,bg:"canvas.backdrop",display:"flex",alignItems:"center",justifyContent:"center",children:t.jsxs(h,{as:"form",onClick:g=>g.stopPropagation(),onSubmit:g=>{g.preventDefault(),_()},width:"min(560px, 100%)",p:3,borderRadius:2,border:"1px solid",borderColor:"border.default",bg:"canvas.overlay",color:"fg.default",boxShadow:"shadow.large",children:[t.jsx(It,{id:"signin-api-key-title",sx:{fontSize:2,mb:2},children:"Enter your API Key"}),t.jsxs(ce,{required:!0,children:[t.jsx(ce.Label,{children:"API Key"}),t.jsx(yo,{block:!0,required:!0,autoFocus:!0,placeholder:"Paste your API key here",value:he,onInput:g=>Re(g.currentTarget.value),ref:Je})]}),t.jsxs(h,{mt:3,display:"flex",justifyContent:"flex-end",gap:2,children:[t.jsx(q,{type:"button",onClick:re,children:"Cancel"}),t.jsx(q,{type:"submit",variant:"primary",disabled:!he.trim(),children:"Authenticate"})]})]})})]})]})]})},ys=ko((e,s)=>({pending:void 0,suggest:(a,i)=>{const c=a.trim();c&&e({pending:{text:c,submit:i?.submit??!1,nonce:(s().pending?.nonce??0)+1}})},consume:()=>e({pending:void 0})}));function Ei(e){const{agentId:s,instructions:a,model:i,frontendTools:c,inference:u,subagents:x,sharing:l,onSubagentEvent:f,modeEffect:v}=e;return{type:"browser-vercel-ai",endpoint:"",agentId:s,enableConfigQuery:!1,options:{instructions:a,model:i,frontendTools:c,inference:u,subagents:x,sharing:l,onSubagentEvent:f,modeEffect:v}}}const Ri=({state:e})=>wo[e];class Ai extends Error{constructor(s,a){super(a),this.status=s,this.name="RuntimeRefusal"}status}function $i({baseUrl:e,getAccessToken:s,fetch:a}){const i=e.replace(/\/+$/,""),c=(f={})=>{const v=s();return{...f,...v?{Authorization:`Bearer ${v}`}:{}}},u=async f=>{throw new Ai(f.status,Eo(f.status,f.statusText,await Ro(f)))};return{json:async(f,v="GET",m)=>{const p=await a(`${i}${f}`,{method:v,headers:c({Accept:"application/json",...m===void 0?{}:{"Content-Type":"application/json"}}),...m===void 0?{}:{body:JSON.stringify(m)}});return p.ok?await p.json():u(p)},stream:async(f,v,{onEvent:m,signal:p},V="POST")=>{const M=await a(`${i}${f}`,{method:V,headers:c({"Content-Type":"application/json",Accept:"text/event-stream"}),body:JSON.stringify(v),signal:p});if(!M.ok)return u(M);await Ao(M,m)},refused:u,headers:c,root:i,fetcher:a}}const Z=e=>`/api/v1/apps/sessions/${encodeURIComponent(e)}`;function Mi(e){const{json:s,stream:a,fetcher:i,headers:c,refused:u,root:x}=$i(e);return{serverUrl:x,accessToken:()=>e.getAccessToken(),start:(l,f)=>a("/api/v1/apps/sessions",{agent:l.agent,...l.deploymentUid?{deployment_uid:l.deploymentUid}:{},...l.appUid?{app_uid:l.appUid}:{},...l.version?{version:l.version}:{},...l.session?{session:l.session}:{},opener:l.opener},f),message:(l,f,v)=>a(`${Z(l)}/messages`,{text:f},v),changeSettings:(l,f,v)=>a(`${Z(l)}/settings`,{values:f},v,"PUT"),resume:(l,f,v)=>a(`${Z(l)}/resume`,{agent:f},v),stop:l=>s(`${Z(l)}/stop`,"POST"),end:l=>s(`${Z(l)}/end`,"POST"),describe:l=>s(Z(l)),described:async l=>Io(await s(Z(l))),list:(l={})=>{const f=new URLSearchParams;for(const[m,p]of Object.entries(l))p!==""&&p!==void 0&&p!==!1&&f.set(m,String(p));const v=f.toString();return s(`/api/v1/apps/sessions${v?`?${v}`:""}`)},swap:(l,f)=>s(`${Z(l)}/agent`,"POST",{agent:f}),clone:(l,f={})=>s(`${Z(l)}/clone`,"POST",{up_to_turn:f.upToTurn??null,agent:f.agent??null,title:f.title??""}),exportFile:async(l,f="")=>{const v=await i(`${x}${Z(l)}/export${f?`?format=${encodeURIComponent(f)}`:""}`,{method:"GET",headers:c()});return v.ok?v.text():u(v)},importFile:async(l,f={})=>{const v=new URLSearchParams;f.agent&&v.set("agent",f.agent),f.format&&v.set("format",f.format);const m=v.toString(),p=await i(`${x}/api/v1/apps/sessions/import${m?`?${m}`:""}`,{method:"POST",headers:c({"Content-Type":"application/x-ndjson"}),body:l});return p.ok?await p.json():u(p)},rename:(l,f)=>s(`${Z(l)}/title`,"PUT",{title:f}),archive:(l,f)=>s(`${Z(l)}/archived`,"PUT",{archived:f}),messages:async l=>To((await s(`${Z(l)}/messages`)).messages)}}const de="";function Oi(e){return{surfaceId:!e||e===Ts?de:e,suspendedId:null}}function Pi({agentName:e,sandboxStillRuns:s=!1,temporary:a=!0,onSignedIn:i,onSignUp:c}){const{configuration:u}=Is(),x=o.useCallback(l=>{$o.getState().checkIAMToken(l),i?.()},[i]);return t.jsx(h,{height:"100%",minHeight:0,overflowY:"auto",bg:"canvas.default",px:4,py:4,children:t.jsxs(h,{maxWidth:440,mx:"auto",children:[t.jsxs(h,{display:"flex",alignItems:"center",justifyContent:"center",gap:2,color:"attention.fg",mb:2,children:[t.jsx(bn,{size:20}),t.jsx($,{sx:{fontSize:2,fontWeight:"semibold",color:"fg.default"},children:a?"This demo runs on a shared key":"Your key has expired"})]}),t.jsxs($,{as:"p",sx:{fontSize:1,color:"fg.muted",textAlign:"center",mb:3},children:[a?`${e??"The agent"} has used the time this key allows. Sign in to point your own agent at it, use your own data, and drop the time limit.`:`${e??"The agent"} stopped because your session ran out.`,s?" Your notebook is still running in this page.":""]}),a&&t.jsxs(h,{display:"flex",flexDirection:"column",alignItems:"center",gap:2,mb:3,"data-anonymous-key-refresh":"",children:[t.jsx($,{sx:{fontSize:1,color:"fg.muted",textAlign:"center"},children:"Or keep trying without an account: refreshing the page gives this demo a new key, and starts the conversation over."}),t.jsx(q,{leadingVisual:Mo,onClick:()=>{typeof window<"u"&&window.location.reload()},children:"Refresh the page for a new key"})]}),t.jsx(Ii,{hideHero:!0,fillHeight:!1,calloutTitle:"Sign in to keep going",github:!0,google:!0,linkedin:!0,socialSignInNavigationTarget:typeof window>"u"?void 0:`${window.location.pathname}${window.location.search}`,loginUrl:u?.iamUrl?`${u.iamUrl}/api/iam/v1/login`:void 0,onSignIn:x,onSignUp:c})]})})}const Ui="https://r1.datalayer.run";function Li(e=!0,s=""){const{configuration:a}=Is(),i=vn(f=>f.token),c=a?.aiInferenceUrl||Ui,u=Oo(c,e&&!i,s),x=i||u.token,l=o.useMemo(()=>({inferenceUrl:c,token:x||void 0}),[c,x]);return{inference:l,needsSignIn:Po(l),anonymous:u,inferenceUrl:c}}const _i={name:"general-purpose",description:"A capable generalist for a task none of the specialists covers: research, reasoning, drafting, checking.",instructions:"You are a capable general-purpose assistant. Carry out the task you are given completely and report the result plainly, saying what you could not do."};function js(e){const s=e?.subagents;if(!s)return[];const a=(s.subagents??[]).map(i=>{const c=i.ref?Uo(i.ref):void 0;return{name:i.name,description:i.description||c?.description||i.name,instructions:i.instructions??c?.systemPrompt,model:i.model??c?.model??s.defaultModel,icon:c?.icon}});return s.includeGeneralPurpose?[...a,_i]:a}const Ps=e=>e.replace(/\/+$/,""),Fi=e=>e.split(":")[0];function zi(e,s){return`${Ps(e)}/api/v1/apps/agents/${encodeURIComponent(s)}/equipment`}function Bi(e,s){return`${Ps(e)}/api/v1/configure/models?agent_id=${encodeURIComponent(s)}`}const Ni=["started","starting","failed","not_started","left_out"],gn=e=>Array.isArray(e)?e.filter(s=>typeof s=="string"):[];function Vi(e){const s=e??{};return{servers:(s.mcp_servers??[]).map(a=>({id:String(a.id??""),name:String(a.name??a.id??""),optional:a.optional===!0,state:Ni.includes(a.state)?a.state:"not_started",...typeof a.reason=="string"&&a.reason?{reason:a.reason}:{},missingEnvVars:gn(a.missing_env_vars),...typeof a.tools=="number"?{tools:a.tools}:{}})),skills:(s.skills??[]).map(a=>({id:String(a.id??""),name:String(a.name??a.id??""),description:String(a.description??""),optional:a.optional===!0,state:a.state==="not_activated"?"not_activated":"active",...typeof a.reason=="string"&&a.reason?{reason:a.reason}:{},missingEnvVars:gn(a.missing_env_vars),oneOfEnvVars:gn(a.one_of_env_vars)}))}}function Di(e){const s=e?ms[e]??ms[Fi(e)]:void 0,a=new Set(s?.optional?.mcpServers??[]),i=new Set(s?.optional?.skills??[]),c=s?[s.model,...s.modelAdditionals??[]].filter(u=>!!u):[];return{source:"declared",modelsSource:"declared",servers:(s?.mcpServers??[]).filter(Boolean).map(u=>({id:u.id,name:u.name||u.id,optional:a.has(u.id),missingEnvVars:[]})),skills:(s?.skills??[]).filter(Boolean).map(u=>({id:u.id,name:u.name||u.id,description:u.description??"",optional:i.has(u.id),missingEnvVars:[],oneOfEnvVars:[]})),models:[...new Set(c)].map((u,x)=>({id:u,name:Lo(u)?.name??u,current:x===0}))}}function Hi(e,s){const a=Es(e),i=a.find(c=>c.id===s)?.id??a.find(c=>c.isAvailable!==!1)?.id;return a.map(c=>({...c,current:c.id===i}))}function Wi({agentServerUrl:e,agentId:s,token:a,specId:i,model:c,enabled:u,refreshMs:x=3e4}){const l=o.useMemo(()=>Di(i),[i]),[f,v]=o.useState(),[m,p]=o.useState();return o.useEffect(()=>{if(v(void 0),p(void 0),!u||!e||!s)return;let V=new AbortController;const M=a?{Authorization:`Bearer ${a}`}:{},y=()=>{V.abort(),V=new AbortController;const{signal:O}=V;fetch(zi(e,s),{headers:M,signal:O}).then(I=>I.ok?I.json():null).then(I=>{!O.aborted&&I&&v(Vi(I))}).catch(()=>{}),fetch(Bi(e,s),{headers:M,signal:O}).then(I=>I.ok?I.json():null).then(I=>{if(!O.aborted&&I){const oe=Hi(I,c);p(oe.some(ke=>ke.isAvailable!==!1)?oe:void 0)}}).catch(()=>{})};y();const k=setInterval(y,x);return()=>{clearInterval(k),V.abort()}},[u,e,s,a,c,x]),o.useMemo(()=>({source:f?"live":"declared",servers:f?.servers??l.servers,skills:f?.skills??l.skills,modelsSource:m&&m.length>0?"live":"declared",models:m&&m.length>0?m:l.models}),[f,m,l])}const N={readOnly:"Chosen by the application. Shown for you to read: nothing here changes it.",declared:"As its spec declares them: its runtime has not said their state yet.",model:"Model",servers:"MCP servers",skills:"Skills",none:{servers:"It uses no MCP server.",skills:"It has no skill."},optional:"optional",serverState:{started:"Running",starting:"Starting",failed:"Failed",not_started:"Not started",left_out:"Off"},skillState:{active:"Active",not_activated:"Not activated"},modelState:{current:"In use",available:"Available",off:"Not available"},declaredState:"Declared"},Gi={success:{fg:"success.fg",bg:"success.subtle"},attention:{fg:"attention.fg",bg:"attention.subtle"},danger:{fg:"danger.fg",bg:"danger.subtle"},accent:{fg:"accent.fg",bg:"accent.subtle"},neutral:{fg:"fg.muted",bg:"neutral.subtle"}};function Ki(e){const s=N.serverState,a=e.state;return{id:e.id,name:e.name,state:a?s[a]:N.declaredState,tone:a==="started"?"success":a==="failed"?"danger":a==="starting"?"attention":"neutral",on:a==="started",...e.reason?{reason:e.reason}:{},...a==="started"&&e.tools!==void 0?{note:`${e.tools} ${e.tools===1?"tool":"tools"}`}:e.optional?{note:N.optional}:{}}}function qi(e){const s=e.state;return{id:e.id,name:e.name,state:s?N.skillState[s]:N.declaredState,tone:s==="active"?"success":"neutral",on:s==="active",...e.reason?{reason:e.reason}:{},...e.optional?{note:N.optional}:{}}}function Yi(e){const s=e.isAvailable===!1;return{id:e.id,name:e.name,state:e.current?N.modelState.current:s?N.modelState.off:N.modelState.available,tone:e.current?"accent":s?"neutral":"success",on:!s,...s&&e.unavailableReason?{reason:e.unavailableReason}:{}}}function Ji(e){return[e.name,e.state,e.reason,e.note].filter(Boolean).join(", ")}function hn({kind:e,icon:s,title:a,rows:i,count:c,summary:u,empty:x,declared:l=!1,align:f="start"}){const v=`${a} — ${u}`;return t.jsxs(Ge,{children:[t.jsx(Ge.Anchor,{children:t.jsx(zo,{text:v,direction:"n",children:t.jsx(q,{type:"button",variant:"invisible",size:"small","aria-label":v,leadingVisual:s,"data-equipment-menu":e,"data-equipment-source":l?"declared":"live",children:t.jsx($,{sx:{fontSize:0,fontVariantNumeric:"tabular-nums",maxWidth:160,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"inline-block",verticalAlign:"bottom",...e==="model"?{"@media (max-width: 480px)":{display:"none"}}:{}},children:c})})})}),t.jsx(Ge.Overlay,{side:"outside-top",align:f,width:"medium",children:t.jsxs(h,{maxHeight:"60vh",overflowY:"auto",children:[t.jsx(te,{"aria-label":a,children:t.jsxs(te.Group,{children:[t.jsxs(te.GroupHeading,{children:[a,i.length>0?` · ${u}`:""]}),i.length===0?t.jsx(te.Item,{onSelect:m=>m.preventDefault(),sx:{color:"fg.muted"},children:x}):i.map(m=>{const p=Gi[m.tone];return t.jsxs(te.Item,{onSelect:V=>V.preventDefault(),"aria-label":Ji(m),"data-equipment-row":m.id,"data-equipment-on":m.on?"true":"false",sx:m.on?void 0:{color:"fg.muted"},children:[m.name,t.jsx(te.TrailingVisual,{children:t.jsx($,{sx:{fontSize:"11px",px:"6px",py:"1px",borderRadius:999,bg:p.bg,color:p.fg,whiteSpace:"nowrap"},children:m.state})}),m.reason||m.note?t.jsx(te.Description,{variant:"block",children:[m.reason,m.note].filter(Boolean).join(" · ")}):null]},m.id)})]})}),t.jsxs(h,{px:3,py:2,borderTop:"1px solid",borderColor:"border.muted","data-equipment-note":"",children:[t.jsx($,{sx:{fontSize:0,color:"fg.muted",display:"block"},children:N.readOnly}),l?t.jsx($,{sx:{fontSize:0,color:"fg.muted",display:"block"},children:N.declared}):null]})]})})]})}const Cs=(e,s,a)=>a?String(s):`${e}/${s}`;function Qi({equipment:e}){const s=e.source==="declared",a=e.servers.map(Ki),i=e.skills.map(qi),c=e.models.map(Yi),u=a.filter(f=>f.on).length,x=i.filter(f=>f.on).length,l=e.models.find(f=>f.current);return t.jsxs(h,{display:"inline-flex",alignItems:"center",role:"group","aria-label":"What this application runs with","data-equipment-bar":e.source,children:[t.jsx(hn,{kind:"servers",icon:yi,title:N.servers,rows:a,count:Cs(u,a.length,s),summary:a.length===0?"none":s?`${a.length} declared`:`${u} of ${a.length} running`,empty:N.none.servers,declared:s}),t.jsx(hn,{kind:"skills",icon:_o,title:N.skills,rows:i,count:Cs(x,i.length,s),summary:i.length===0?"none":s?`${i.length} declared`:`${x} of ${i.length} active`,empty:N.none.skills,declared:s}),c.length>0?t.jsx(hn,{kind:"model",icon:Fo,title:N.model,rows:c,count:l?.name??String(c.length),summary:l?`${l.name}, of ${c.length} it may run on`:`${c.length} it may run on`,declared:e.modelsSource==="declared",align:"end"}):null]})}function Zi(e){return e.replace(/^datalayer_/,"").replace(/_lexical$/,"")}function Xi(e){const s=Zi(e);return/^executeCodeIn(Notebook|Document)$/.test(s)||/^(read|list)[A-Z]/.test(s)}function er(e,s){return e.filter(a=>s?.has(a.name)||Xi(a.name))}function tr(e,s){const a=i=>s&&i.value.id===`${s}-tools`?0:i.value.id==="notebook-tools"?1:2;return e.map((i,c)=>({entry:i,index:c,rank:a(i)})).sort((i,c)=>i.rank-c.rank||i.index-c.index).map(i=>i.entry)}function nr(e,s,a){if(!a||!e.endsWith("-tools"))return!1;const i=e.slice(0,-6);return s.has(i)&&i!==a}const sr={type:"object",properties:{}};function or(e,s){const a=new Set(e.toolset);return e.commands.filter(i=>a.has(i.name)).map(i=>({name:i.name,description:i.description,parameters:i.parameters??sr,location:"frontend",handler:async c=>{if(!s)throw new Error(`${i.name}: the ${e.plugin??e.id} plugin is not mounted on this page.`);const u=Object.keys(c??{}).length>0?c:void 0,x=await s.executeCommand(i.command,u);return x===void 0?{ok:!0,command:i.command,argument:u}:x}}))}function Us(e,s){return e.flatMap(a=>or(a,s))}function ar(){const e=Bo(),s=Os();return o.useMemo(()=>Us(s,e),[s,e])}function ir(e){const s=e?.app_instance;if(!s||typeof s!="object")return"";const a=s.deployment_uid;return typeof a=="string"?a.trim():""}function rr(e,s,a){return e||!s?e:{id:a,messages:[]}}function lr(e){const s=(new URLSearchParams(e).get("session")??"").trim();if(!s)return"";if(!/^[A-Za-z0-9_-]{8,128}$/.test(s))throw new Error(`?session=${s} names no session: a session uid is 8 to 128 letters, digits, hyphens or underscores.`);return s}function cr({facts:e}){if(!e)return null;const s=No(e);return t.jsxs(h,{display:"inline-flex",alignItems:"center",gap:2,"data-session-state":e.state,children:[t.jsx(Vo,{size:"small",variant:e.state==="open"?"accent":e.state==="paused"?"attention":"secondary",children:Do(e)}),s?t.jsx($,{sx:{fontSize:0,color:"fg.muted"},"data-session-lineage":"",children:s}):null]})}function dr({facts:e,turn:s,context:a}){const i=K(Rs),c=As(i,e,"turn");return!e||c.length===0||s<1?null:t.jsx(h,{display:"inline-flex",gap:1,"data-turn-actions":s,children:c.map(u=>t.jsx(q,{size:"small",variant:"invisible","data-turn-action":u.id,onClick:()=>{Promise.resolve(u.run(e,{...a,atTurn:s})).catch(x=>a.say(String(x.message??x)))},children:u.label},u.id))})}function ur({uid:e,describe:s,context:a}){const i=K(Rs),[c,u]=o.useState(void 0),[x,l]=o.useState(!1),[f,v]=o.useState(""),[m,p]=o.useState(void 0),V={...a,show:a.show??p,say:k=>{v(k),a.say(k)}},M=o.useCallback(k=>{l(k),k&&e&&s(e).then(u,()=>u(void 0))},[s,e]);if(!e||i.length===0)return null;const y=As(i,c);return t.jsxs(t.Fragment,{children:[t.jsxs(Ge,{open:x,onOpenChange:M,children:[t.jsx(Ge.Anchor,{children:t.jsx($s,{icon:Ho,"aria-label":"Session actions",variant:"invisible",size:"small","data-testid":"session-actions"})}),t.jsx(Ge.Overlay,{width:"small",children:t.jsxs(te,{children:[y.length===0?t.jsx(te.Item,{disabled:!0,children:c?"Nothing applies to this session now.":"Reading the session…"}):y.map(k=>t.jsx(te.Item,{"data-session-action":k.id,onSelect:()=>{c&&Promise.resolve(k.run(c,V)).catch(O=>V.say(String(O.message??O)))},children:k.label},k.id)),f?t.jsxs(t.Fragment,{children:[t.jsx(te.Divider,{}),t.jsx(te.Item,{disabled:!0,"data-testid":"session-actions-said",children:f})]}):null]})})]}),m?t.jsx(Ms,{title:m.title,onClose:()=>p(void 0),width:"large",children:t.jsx(h,{"data-session-panel":"",children:m.render()})}):null]})}const ks={confirm:"Switch",cancel:"Keep it"};function fr({question:e,onPick:s}){const[a,i]=o.useState(e.options[0]?.id??""),[c,u]=o.useState("");o.useEffect(()=>{let l=!0;if(!e.says||!a){u("");return}return e.says(a).then(f=>l&&u(f),()=>l&&u("")),()=>{l=!1}},[a,e]);const x=e.options.find(l=>l.id===a);return t.jsx(Ms,{title:e.title,onClose:()=>s(void 0),width:"medium",footerButtons:[{buttonType:"default",content:ks.cancel,onClick:()=>s(void 0)},{buttonType:"primary",content:ks.confirm,disabled:!a,onClick:()=>s(a||void 0)}],children:t.jsxs(h,{display:"grid",gap:3,"data-session-choose":"",children:[t.jsxs(ce,{children:[t.jsx(ce.Label,{children:e.title}),t.jsx(gs,{value:a,onChange:l=>i(l.target.value),block:!0,children:e.options.map(l=>t.jsx(gs.Option,{value:l.id,children:l.label},l.id))})]}),x?.description?t.jsx($,{sx:{fontSize:1,color:"fg.muted"},children:x.description}):null,c?t.jsx($,{as:"p",sx:{m:0,fontSize:1,fontStyle:"italic"},"data-session-choose-says":"",children:c}):null]})})}const pr="var(--theme-accent)";function Ls({face:e,size:s}){return typeof e=="string"?t.jsx(Wo,{emoji:e,size:s,label:""}):t.jsx(t.Fragment,{children:e})}function mr({face:e,size:s,state:a}){const i=a==="thinking"||a==="working",c=a==="paused";return t.jsxs(h,{as:"span","aria-hidden":!0,"data-presence":a,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:s+8,height:s+8,flexShrink:0,fontSize:s,lineHeight:1,children:[t.jsx(h,{as:"span",position:"absolute",inset:0,borderRadius:"50%",boxShadow:c?"none":`0 0 0 2px ${pr}`,border:c?"2px dashed":"none",borderColor:"border.default",opacity:i||a==="waiting"||c?.9:0,transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",animation:i?"loopPresenceBreath 1.8s ease-in-out infinite":"none",reducedMotion:{animation:"none"},sx:{"@keyframes loopPresenceBreath":{"0%, 100%":{transform:"scale(0.92)",opacity:.35},"50%":{transform:"scale(1.06)",opacity:.9}}}}),t.jsx(h,{as:"span",display:"inline-flex",opacity:c?.55:1,filter:c?"grayscale(0.6)":"none",transition:"opacity var(--theme-motion-status, 0ms) var(--theme-motion-easing, ease)",children:t.jsx(Ls,{face:e,size:s})})]})}function gr({state:e}){return t.jsx($,{role:"status","aria-live":"polite","data-presence-line":e,sx:{fontSize:0,color:e==="waiting"?"fg.default":"fg.muted",fontWeight:e==="waiting"?"semibold":"normal",whiteSpace:"nowrap",flexShrink:0},children:Ri({state:e})})}const hr=Sn(void 0),xr=Sn(""),br=Sn({}),vr=1400,ws=parseInt(xi["--loop-face-large"],10),Sr={};function Tr({workspace:e}){const s=Go(),a=Ko(),i=o.useRef(null),c=o.useRef(void 0),{setViewControls:u}=e,x=o.useRef(e.setThread);x.current=e.setThread;const l=o.useCallback(()=>{const n=i.current?.thread();return n&&x.current?.(n),n},[]),[f,v]=o.useState(null),m=qo(),p=m.getConfig(Yo),V=p?.placeholder||s.placeholder,M=p?.defaultSurface??"notebook",y=m.getConfig(Jo),[k,O]=o.useState(de),[I,oe]=o.useState(null),ke=o.useRef(!1),z=K(Qo),$t=K(Zo),Mt=K(Xo),ue=K(ea)[0]?.value,fe=fn(ue?.promptStance??hr)??ue?.prompt,Pt=K(ta),Ue=na(Pt[0]?.value),W=o.useRef(Ue);W.current=Ue;const Se=o.useRef(""),Ke=K(sa),Ut=o.useMemo(()=>oa(()=>Ke.reduce((n,r)=>aa(n,r.value.extras.value),{})),[Ke]),j=fn(Ke.length>0?Ut:br),ne=o.useRef(new Set),ut=ia(gi,e),ye=!ut.allowed,Lt=ye?ut.reason??"Chat is unavailable for this sandbox":void 0,[L,_t]=o.useState(!1),[pe,Ft]=o.useState(!1),[P,Le]=o.useState(!1),[Te,ft]=o.useState({open:!1,pendingApproval:!1}),me=ra(L,Te,p?.presence?.paused===!0),qe=p?.presence?.onPresence;o.useEffect(()=>{qe?.(me),W.current?.setPresence(me)},[qe,me]);const Y=o.useRef(p?.presence?.onSaying);Y.current=p?.presence?.onSaying;const pt=o.useRef({answering:!1}),Ie=o.useCallback(n=>{i.current=n,Ft(!!n)},[]),zt=o.useCallback(n=>{const{open:r,pendingApproval:d}=la(n);ft(Pe=>Pe.open===r&&Pe.pendingApproval===d?Pe:{open:r,pendingApproval:d});const S={saying:da(n),answering:ca(n)},b=pt.current;(b.saying?.id!==S.saying?.id||b.saying?.text!==S.saying?.text||b.answering!==S.answering)&&(pt.current=S,Y.current?.(S));const ee=W.current;if(!ee)return;ee.items(n);const B=new Set(["complete","completed","done","error","failed","cancelled","canceled","rejected","denied","stopped"]),le={insertcell:"adding a cell",updatecell:"editing a cell",runcell:"running a cell",deletecells:"removing cells",readallcells:"reading the notebook",readcell:"reading a cell",executecode:"running code",insertblock:"adding a block",updateblock:"editing a block",runblock:"running a block",readdocument:"reading the document"};let C;for(let Pe=n.length-1;Pe>=0;Pe-=1){const Tt=n[Pe];if(typeof Tt.toolName=="string"&&Tt.toolCallId){B.has(String(Tt.status).toLowerCase())||(C=Tt);break}}if(!C){ee.activity(void 0);return}const Oe=C.toolName.toLowerCase().replace(/^datalayer_/,"").replace(/_lexical$/,"").replace(/[^a-z]/g,""),go=le[Oe]??`using ${C.toolName}`;ee.activity(`${Se.current||"The agent"} is ${go}…`)},[]),Ee=o.useRef(j);Ee.current=j;const Bt=o.useCallback(n=>{Ys(n),W.current?.usage(n),Ee.current.onUsage?.(n)},[]),mt=o.useCallback(n=>{_t(n),n||W.current?.end("done")},[]),ae=o.useCallback(n=>{const r=W.current;if(!r)return;let d=-1;for(let b=n.length-1;b>=0;b-=1)if(n[b].role==="user"){d=b;break}const S=n.slice(d+1).filter(b=>b.role==="assistant").map(ua).filter(b=>b.trim().length>0).join(`
29
-
30
- `);r.assistant(S)},[]),ge=o.useRef([]),_e=o.useRef(!1),Ye=o.useRef(void 0),he=o.useRef(void 0),Re=o.useRef(void 0),Je=K(fa),Qe=o.useRef(Je);Qe.current=Je;const ie=o.useCallback((n,r)=>{if(he.current)return he.current;const d=Re.current;Re.current=void 0;const S=pa(Qe.current.map(B=>B.value),d?{...r??{},voice:d}:r),b=S?.loop;if(_e.current&&b?.files&&b.files.length>0){const B=Ye.current;if(!B)return"A file is given to an application running on a runtime: run it on Datalayer or on your machine to give it one.";let le;try{le=b.files.map(C=>({file:ga(String(C.name??"")),base64:ma(String(C.data_url??""))}))}catch(C){return C instanceof Error?C.message:String(C)}B.execute(ha(le)).then(C=>{if(!C.success){v(`The files could not be put in the sandbox: ${C.error??"it failed"}.`);return}ie(`${n}
31
-
32
- ${xa(le.map(Oe=>Oe.file))}`,{...S,loop:Object.fromEntries(Object.entries(b).filter(([Oe])=>Oe!=="files"))})});return}W.current?.begin(n,l());const ee=i.current?.send;if(!ee){ge.current.push([n,S]);return}ee(n,S)},[l]);o.useEffect(()=>{u(pe?{busy:L,stop:i.current?.stop,newChat:i.current?.newChat,send:ie}:null)},[L,pe,u,ie]),o.useEffect(()=>()=>u(null),[u]),o.useEffect(()=>e.prompts.subscribe(ie),[e.prompts,ie]),o.useEffect(()=>{if(!pe||ge.current.length===0)return;const n=ge.current.splice(0,ge.current.length);for(const[r,d]of n)l(),i.current?.send(r,d)},[pe,l]);const Fe=o.useRef(!1),re=o.useCallback(async n=>{v(null);const r=await ba(Ee.current,n);if(r){r.sent?at(""):v(r.refused);return}Fe.current||(Fe.current=!0,y?.firstPromptHook?.());const d=await e.submit(n);if(!d.handled){v(d.reason??null);return}at(""),d.result?.content&&v(d.result.content)},[e,y?.firstPromptHook]),_=o.useMemo(()=>z.find(n=>n.value.surfaceId===k)?.value,[z,k]),Ze=o.useCallback(n=>{ke.current=!0;const r=Oi(n);oe(r.suspendedId),O(r.surfaceId)},[]);o.useEffect(()=>va(Ze),[Ze]),o.useEffect(()=>{Sa(z.map(n=>n.value.surfaceId))},[z]),o.useEffect(()=>{ya(k&&k!==de?k:Ts)},[k]);const Ae=o.useMemo(()=>M===de||M==="none"?void 0:z.find(n=>n.value.surfaceId===M),[z,M]);o.useEffect(()=>{ke.current||!Ae||dt(Ae.value,e)&&O(M)},[Ae,e,M]);const ze=o.useRef(null),Be=p?.fullScreenTopOffset??0,{fullScreen:X,usingApi:Xe,toggle:g,topOffsetPx:U}=ja(ze,{forceOverlay:!!Be,topOffset:Be}),[J,Q]=o.useState(!1),et=o.useRef(!1);o.useEffect(()=>{!L||et.current||X||(et.current=!0,Q(!0))},[L,X]),o.useEffect(()=>{X&&Q(!1)},[X]),o.useEffect(()=>{_&&!dt(_,e)&&(oe(_.surfaceId),O(de))},[_,e]);const gt=o.useMemo(()=>{if(I)return z.find(n=>n.value.surfaceId===I)?.value;if(!ke.current&&k===de)return Ae?.value},[z,I,k,Ae]);o.useEffect(()=>{if(!I||k!==de)return;const n=z.find(r=>r.value.surfaceId===I);n&&dt(n.value,e)&&(oe(null),O(I))},[z,k,I,e]);const R=e.agentId?.trim()||"default",F=Ca(e.sandbox.target??"local");_e.current=F;const T=ka(),xe=fn(T?.selected??xr),E=T?.members.find(n=>n.id===xe),yn=K(wa)[0]?.value,Nt=yn?.specId,A=hs(E?.specId??R)??(Nt?hs(Nt):void 0),Ne=E?void 0:yn,jn=F&&!E?mi(Nt,A):void 0;Se.current=E?.name??A?.name??R;const Cn=K(Ta),kn=j.hiddenOpeners,wn=j.hideOpeners,Vt=j.openers,Dt=o.useMemo(()=>{if(wn)return[];const n=new Set(kn??[]),r=C=>n.size===0?C:C.filter(Oe=>!n.has(Oe.text));if(Vt)return r(Vt);const d=Cn.flatMap(C=>C.value.suggestions);if(d.length>0)return r(d);const S=r(A?.suggestions??[]),b=r(T?.team.suggestions??[]);if(b.length===0)return S;const ee=new Set(b.map(C=>C.text)),B=T?.team.name??"Team",le=E?.name??A?.name??R;return[...b.map(C=>({...C,group:B})),...S.filter(C=>!ee.has(C.text)).map(C=>({...C,group:le}))]},[Cn,T,A,E,R,kn,wn,Vt]),ht=o.useMemo(()=>Dt.map(n=>({title:n.summary??n.text,message:n.message??n.text,group:n.group})),[Dt]),Ht=We(A?.icon),D=p?.presence,_s=We(T?.team.icon),Tn=K(Ia),xt=o.useMemo(()=>{const n=[],r=new Map,d=new Set,S=new Set(z.map(b=>b.value.surfaceId));for(const b of tr(Tn,_?.surfaceId)){if(nr(b.value.id,S,_?.surfaceId))continue;let ee;try{ee=b.value.tools(e)}catch(B){console.warn(`[loop] frontend tools from '${b.plugin}' failed:`,B);continue}for(const B of ee){const le=r.get(B.name);if(le){console.warn(`[loop] frontend tool '${B.name}' from '${b.plugin}' is shadowed by the one from '${le}'.`);continue}r.set(B.name,b.plugin),n.push(B),b.value.chatView&&d.add(B.name)}}for(const b of j.frontendTools??[])r.has(b.name)||(r.set(b.name,"chat-extras"),n.push(b),d.add(b.name));return _?n:er(n,d)},[Tn,e.surfaceId,e.agentId,j.frontendTools,_?.surfaceId,z]),Wt=ar(),tt=o.useMemo(()=>{if(Wt.length===0)return xt;const n=new Set(xt.map(r=>r.name));return[...xt,...Wt.filter(r=>!n.has(r.name))]},[xt,Wt]),In=Os(),Gt=j.agentToolBundles,Fs=o.useMemo(()=>{const n=j.frontendTools??[];if(!Gt?.length)return j.frontendTools;const r=Us(In.filter(S=>Gt.includes(S.id)),m),d=new Set(n.map(S=>S.name));return[...n,...r.filter(S=>!d.has(S.name))]},[j.frontendTools,Gt,In,m]);Ye.current=F&&tt.some(n=>n.name===Ea)?m.getOutput(ct)?.sandbox:void 0;const w=Ra(e.sandbox,e.serverUrl),nt=o.useMemo(()=>Mi({baseUrl:w??"",getAccessToken:()=>c.current,fetch:(n,r)=>fetch(n,r)}),[w]),En=K(Aa),zs=o.useMemo(()=>En.filter(n=>n.value.composer).map(n=>({name:n.value.name,description:n.value.description})),[En]),Bs=o.useMemo(()=>{if(!T||!E)return js(A).map(d=>({name:d.name,description:d.description,icon:We(d.icon)}));const n=T.members.map(d=>({name:d.name,description:d.description,emoji:d.emoji,icon:We(d.icon),disabled:d.id===E.id,disabledReason:d.id===E.id?`You are already talking to ${d.name}`:void 0})),r=xs(T.team,E.id).filter(d=>!T.members.some(S=>S.name===d.name)).map(d=>({name:d.name,description:d.description,icon:We(d.icon)}));return[...n,...r]},[T,E,A]),Ns=$a(m.getConfig(ct)),{inference:Rn,anonymous:Vs}=Li(F,Ns),Kt=vn(n=>n.user),qt=F&&Vs.status==="expired",An=!Kt,st=Ma();he.current=st.disabled?st.disableReason||"This conversation is closed here.":void 0;const bt=w===void 0?Oa(e.sandbox,s):void 0,vt=m.getConfig(ct)?.datalayerVisitors,Yt=Pa(vt),se=p?.anonymous,Jt=Ua(se?.maxTurns),Qt=!!(se&&vt&&!Yt.error&&e.sandbox.state!=="error"&&(!Yt.token||w===void 0)),St=se?Jt.refused:"",$n=o.useRef(!1),Mn=Jt.take;o.useEffect(()=>{se&&L&&!$n.current&&Mn(),$n.current=L},[se,L,Mn]);const Ds=La(se??Sr),ot=Qt||!!St||ye||qt||!!jn||!!bt||st.disabled,On=Qt?_a.validating:St||(qt?An?s.demoKeyExpired:s.keyExpired:jn??bt??Lt??(st.disabled?st.disableReason:void 0)),[Zt,at]=o.useState(""),[Pn]=Fa(),it=o.useMemo(()=>p?.voice?za(p.voice,Pn):void 0,[p?.voice,Pn]),[Hs,Ws]=o.useState(!1),[Gs,Un]=o.useState(),yt=Gs??Ne?.model??A?.model??e.model??"",Ve=Ba(),Ln=o.useRef(Ve),_n=o.useRef(xe),Fn=o.useRef(Ve);Fn.current=Ve,o.useEffect(()=>{_n.current!==xe&&(_n.current=xe,Ln.current=Fn.current,Un(void 0))},[xe]);const Ks=Ve&&Ve!==Ln.current?Ve:null,[qs,Ys]=o.useState(),Js=Ks??qs??null,Qs=Rt(Ce.inpromptMenu),zn=Rt(Ce.promptAction),Bn=Rt(Ce.chatHeader),Nn=Rt(Ce.chatBanner),Zs=o.useMemo(()=>T?.members.map(n=>({id:n.id,name:n.name,description:n.description,icon:We(n.icon)}))??[],[T]),$e=ys(n=>n.pending),[Vn,Xs]=o.useState(0);o.useEffect(()=>Na(()=>Xs(n=>n+1)),[]),o.useEffect(()=>{$e&&(at($e.text),ys.getState().consume(),$e.submit&&re($e.text))},[$e]);const Xt=m.getConfig(ct)?.datalayerCreatePayload,G=!!(Ne?.createPayload?.app_spec||Xt?.app_spec),en=ir(Xt),eo=vn(n=>n.token),to=m.getConfig(ct)?.embedToken,be=vt?Yt.token:to||eo;c.current=be||void 0;const no=o.useMemo(()=>Va(p?.voice,be||void 0),[p?.voice,be]),je=!!(en||vt),tn=!!D&&G&&!F,so=Wi({agentServerUrl:w,agentId:R,token:be||void 0,specId:yr(Ne?.createPayload?.app_spec??Xt?.app_spec),enabled:tn});if(je&&!G)throw new Error("A deployment’s page runs its application: its host gave no app_spec.");const[Dn]=o.useState(Da),[nn,oo]=o.useMemo(()=>{try{return[lr(typeof window>"u"?"":window.location.search),""]}catch(n){return["",n instanceof Error?n.message:String(n)]}},[]),[Hn,ao]=o.useState(void 0),H=o.useMemo(()=>Hn??rr(p?.thread??(nn&&G?{id:nn,messages:[],fromRuntime:!0}:void 0),en,Dn),[Hn,p?.thread,nn,G,en,Dn]),[De,Wn]=o.useState(null),io=!!(H?.fromRuntime&&De?.given!==H.id);o.useEffect(()=>{if(!H?.fromRuntime||!G||!w)return;let n=!0;return(async()=>{let r="";for(let d=0;d<4&&n;d+=1)try{const S=await Ha({agentBaseUrl:w,agentId:R,uid:H.id,token:be});n&&Wn({given:H.id,thread:{...H,fromRuntime:!1,messages:S}});return}catch(S){r=S instanceof Error?S.message:String(S),await new Promise(b=>setTimeout(b,1500))}n&&Wn({given:H.id,thread:{id:Wa(),messages:[],onStarted:H.onStarted},said:bs.notOpened(r)})})(),()=>{n=!1}},[H?.id,H?.fromRuntime,G,w,R,be]);const sn=H?.fromRuntime?De?.given===H.id?De.thread:void 0:H,ve=e.thread||sn?.id||"",[Gn,Kn]=o.useState(void 0),[ro,qn]=o.useState(0),Yn=o.useRef("");o.useEffect(()=>{L&&ve&&(Yn.current=ve)},[L,ve]);const Jn=!!H?.fromRuntime||!!(e.thread&&e.thread===ve)||Yn.current===ve;o.useEffect(()=>{if(!G||!w||!ve||L||!Jn)return;let n=!0;return nt.described(ve).then(r=>n&&Kn(r),()=>n&&Kn(void 0)),()=>{n=!1}},[G,w,ve,L,Jn,ro,nt]);const[Qn,Zn]=o.useState(oo),[Xn,es]=o.useState(null),on=o.useRef(null),an=o.useRef(null),ts=o.useRef(null),ns=o.useMemo(()=>({client:nt,say:n=>{Zn(n),qn(r=>r+1)},openThread:n=>{ao({id:n,messages:[],fromRuntime:!0}),qn(r=>r+1)},download:(n,r,d)=>{const S=URL.createObjectURL(new Blob([r],{type:d})),b=document.createElement("a");b.href=S,b.download=n,b.click(),URL.revokeObjectURL(S)},choose:n=>new Promise(r=>{on.current=r,es(n)}),pickFile:n=>new Promise(r=>{const d=ts.current;if(!d){r(void 0);return}an.current=r,d.accept=n,d.value="",d.click()})}),[nt]),jt=o.useMemo(()=>F?Ei({agentId:E?.specId??R,instructions:Ga(A,Ne?.instructions),model:yt||void 0,inference:Rn,frontendTools:tt,subagents:T&&E?xs(T.team,E.id):js(A),sharing:T?.sharing,onSubagentEvent:n=>hi.getState().appendSubagentEvent(n),modeEffect:Ne?.modeEffect}):w!==void 0?{type:"ag-ui",endpoint:G?`${w}/api/v1/apps/agents/${encodeURIComponent(R)}/ag-ui/`:`${w}/api/v1/ag-ui/${R}/`,...G&&be?{authToken:be}:{},...G?{uiSocket:`${w.replace(/^http/,"ws")}/api/v1/apps/ui`,uiFiles:`${w}/api/v1/apps/agents/${encodeURIComponent(R)}/files`,appSessions:`${w}/api/v1/apps/sessions`,...je?{ownRoutesOnly:!0}:{}}:{},agentId:R,configEndpoint:`${w}/api/v1/configure`,enableConfigQuery:!0}:void 0,[R,F,Rn,E,tt,T,A,Ne,yt,w,G,be,je]),Ct=Ka(!F&&jt?.type==="ag-ui",jt?.type==="ag-ui"?jt.configEndpoint:void 0,void 0,R),rt=qa(),kt=Ya(R),[ss,rn]=o.useState(void 0),[lo,co]=o.useState(void 0);o.useEffect(()=>{if(F||w===void 0)return;const n=Ja(w,R,je);if(!n){rn([]);return}let r=!1;return fetch(n).then(d=>d.ok?d.json():null).then(d=>{r||(rn(d?Es(d):[]),co(d?Qa(d):void 0))}).catch(()=>{r||rn([])}),()=>{r=!0}},[w,R,F,je]);const uo=o.useMemo(()=>Za(Xa(ss,()=>Object.values(ei).filter(n=>n.available&&ti(n)).map(n=>({id:n.id,name:n.name,provider:n.provider}))),!!Kt),[ss,Kt]),os=o.useMemo(()=>{const n=Ct.data?.builtinTools??[],r=new Set(n.map(d=>d.name));return{runtime:n,frontend:tt.filter(d=>!r.has(d.name)).map(d=>({id:d.name,name:d.name}))}},[Ct.data?.builtinTools,tt]),as=o.useMemo(()=>new Set((rt.data?.skills??[]).filter(n=>n.status==="enabled"||n.status==="loaded").map(n=>n.id)),[rt.data]),fo=o.useCallback(async n=>{if(je)throw new Error("A deployment’s chat does not switch its runtime’s model.");Un(n),!(F||w===void 0)&&await fetch(`${w}/api/v1/configure/inference/provider`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({model:n})}).catch(()=>{})},[w,F,je]),is=p?.promptPlacement==="bottom-chat",po=p?.promptPlacement==="floating",He=p?.promptPlacement==="top",lt=p?.hidePrompt===!0||j.hidePrompt===!0,ln=Mt[0]?.value.Component,cn=!p?.hideHeader&&!!ln,dn=o.useMemo(()=>({mcpServers:(A?.mcpServers??[]).map(n=>n.name||n.id),skills:(A?.skills??[]).map(n=>n.name||n.id)}),[A]),Me=se?{...Jt,refused:St,config:se,name:D?.name??E?.name??A?.name??"",validating:Qt,headerShown:cn,minutes:ri,disabledMcpServers:dn.mcpServers,disabledSkills:dn.skills,signIn:Ds}:null,mo={onSend:()=>{re(Zt)},input:Zt,setInput:at,focusTrigger:$e||Vn?($e?.nonce??0)+Vn:void 0,placement:po||fe==="floating"||fe==="floating-top"||fe==="floating-bottom"?"floating":"docked",floatingAnchor:fe==="floating-top"?"top":"bottom",isLoading:L,onStop:()=>e.viewControls.stop?.(),placeholder:On??j.sendInstead?.says??V,typingSuggestions:Dt.map(n=>n.text),suggestions:ht,disableInputPrompt:ot,connectionConfirmed:!ot,interim:Hs,padding:He||fe==="floating-top"||fe==="floating-bottom"||fe==="docked-top"?2:3,promptVariant:"lexical",autoFocus:p?.autoFocusPrompt??!0,mentionableAgents:Bs,promptCommands:zs,headerContent:Qs.length>0?t.jsx(At,{slot:Ce.inpromptMenu,props:{workspace:e}}):void 0,footerExtras:se||tn||zn.length>0||it&&it.input!=="off"?t.jsxs(t.Fragment,{children:[se?t.jsx(ni,{}):null,tn?t.jsx(Qi,{equipment:so}):null,zn.length>0?t.jsx(At,{slot:Ce.promptAction,props:{workspace:e}}):null,it&&it.input!=="off"?t.jsx(si,{voice:it,input:Zt,setInput:at,disabled:ot,speaking:P,onStopSpeaking:()=>i.current?.stopSpeaking?.(),playbackLevel:()=>i.current?.voiceLevel?.()??0,running:L,onStopRun:()=>(i.current?.interrupt??i.current?.stop)?.(),onInterrupted:()=>i.current?.markInterrupted(),onInterimChange:Ws,answers:!!(p?.voice?.output&&p.voice.output!=="off"&&p.voice.speechUrl),onSpoken:n=>{Re.current=n},send:(n,r)=>{Re.current=r,re(n)}}):null]}):void 0,showAgentsMenu:!D,showInlineAgentsMenu:!1,agents:Zs,selectedAgentId:xe,onSelectAgent:n=>T?.select(n),showTokenUsage:j.showTokenUsage??p?.showTokenUsage??!0,showContextRing:!0,agentUsage:Js??void 0,showModelSelector:!D&&!je,models:uo,decisions:lo,selectedModel:yt,onModelSelect:n=>{fo(n)},showToolsMenu:!D,availableTools:os.runtime,availableFrontendTools:os.frontend,mcpServers:Ct.data?.mcpServers??[],mcpStatusData:j.mcpStatusData??void 0,showSkillsMenu:!D,skills:rt.data?.skills??[],skillsLoading:rt.isLoading,enabledSkills:as,onToggleSkill:n=>as.has(n)?kt.disableSkill(n):kt.enableSkill(n),onToggleAllSkills:(n,r)=>n.forEach(d=>r?kt.enableSkill(d):kt.disableSkill(d)),codemodeEnabled:j.codemodeEnabled??!1,onToggleCodemode:j.onToggleCodemode,isA2AProtocol:!1,hasConfigData:!!Ct.data,hasSkillsData:!!rt.data,...se?{anonymousDisabled:dn}:{}},rs=$t[0]?.value.Component,wt=rs?t.jsx(rs,{workspace:e,composer:mo}):null,ls=z.length>0&&p?.showSurfaceSelector!==!1?t.jsx(jr,{surfaces:z.map(n=>n.value),active:_?.surfaceId??gt?.surfaceId??de,onChange:Ze,workspace:e}):null,cs=t.jsxs(t.Fragment,{children:[z.map(n=>{const r=n.value,d=_?.surfaceId===r.surfaceId;return d||ne.current.has(r.surfaceId)||dt(r,e)?(ne.current.add(r.surfaceId),t.jsx(h,{sx:d?{flex:"1 1 0",minWidth:0,minHeight:0}:{position:"absolute",inset:0,visibility:"hidden",pointerEvents:"none",zIndex:-1},children:t.jsx(oi,{load:r.load,props:{surfaceId:r.surfaceId,workspace:e},fallback:t.jsxs(xn,{children:["Loading ",r.title,"…"]}),errorFallback:b=>t.jsxs(xn,{children:[r.title," failed to load: ",b.message]})})},r.surfaceId)):null}),!_&&gt?t.jsx(h,{flex:"1 1 0",minWidth:0,minHeight:0,children:t.jsxs(xn,{children:["Starting ",gt.title,"…"]})}):null]}),ds=t.jsx(t.Fragment,{children:t.jsxs(h,{flex:He&&_?"0 0 34%":"1 1 0",maxWidth:He&&_?460:void 0,minWidth:0,minHeight:0,display:"flex",flexDirection:"column",borderLeft:_?"1px solid":void 0,borderColor:"border.default",position:"relative",children:[j.errorBanner?t.jsx(h,{flexShrink:0,px:3,py:2,fontSize:1,borderBottom:"1px solid",bg:j.errorBanner.variant==="warning"?"attention.subtle":"danger.subtle",color:j.errorBanner.variant==="warning"?"attention.fg":"danger.fg",borderColor:j.errorBanner.variant==="warning"?"attention.muted":"danger.muted",children:j.errorBanner.message}):null,De?.said&&De.given===H?.id?t.jsx($,{as:"p",role:"status",sx:{m:0,px:3,py:2,fontSize:1,color:"fg.muted"},children:De.said}):null,Qn?t.jsxs(h,{display:"flex",alignItems:"baseline",gap:2,px:3,py:2,fontSize:1,color:"fg.muted",role:"status","data-session-said":"",children:[t.jsx($,{sx:{flex:1},children:Qn}),t.jsx(q,{size:"small",variant:"invisible",onClick:()=>Zn(""),children:"Dismiss"})]}):null,Xn?t.jsx(fr,{question:Xn,onPick:n=>{es(null),on.current?.(n),on.current=null}}):null,t.jsx("input",{ref:ts,type:"file",hidden:!0,"data-session-file":"",onChange:async n=>{const r=n.target.files?.[0],d=r?await r.text():void 0;an.current?.(d),an.current=null}}),t.jsx(h,{flex:"1 1 auto",minHeight:0,display:"flex",children:io?t.jsx($,{as:"p",role:"status",sx:{m:0,p:3,fontSize:1,color:"fg.muted"},children:bs.opening}):t.jsx(ai,{themeVariant:p?.themeVariant,themeOverrides:p?.themeOverrides,colorMode:p?.colorMode,thread:sn,voice:no,disabled:ot,disableReason:On,protocol:jt,frontendTools:F?void 0:Fs,initialModel:yt||void 0,title:D?.name??E?.name??A?.name??R,description:D?.welcome??A?.description,brandIcon:D?.face?t.jsx(mr,{face:D.face,size:20,state:me}):t.jsx(Ht,{size:20}),headerLeading:e.chatHeaderLeading,headerContent:D&&!bt||Nn.length>0?t.jsxs(t.Fragment,{children:[D&&!bt?t.jsx(gr,{state:me}):null,Nn.length>0?t.jsx(At,{slot:Ce.chatBanner,props:{workspace:e}}):null]}):void 0,emptyState:{icon:D?.face?t.jsx("span",{"aria-hidden":!0,style:{fontSize:ws,lineHeight:1},children:t.jsx(Ls,{face:D.face,size:ws})}):t.jsx(Ht,{size:48}),title:D?.name??E?.name??A?.name??R,...T&&E?{sections:[{group:T.team.name,icon:t.jsx(_s,{size:48}),title:T.team.name,subtitle:T.team.description},{group:E.name,icon:t.jsx(Ht,{size:32}),title:E.name,subtitle:A?.description}]}:null},suggestions:He||ue||p?.suggestionLabels===!1?[]:ht,showHeader:cn,headerButtons:{showNewChat:p?.headerButtons?.newChat??!1,showClear:p?.headerButtons?.clear??!1},renderHeader:ln?n=>t.jsx(ln,{workspace:e,header:e.chatViewModes?{...n,chatViewMode:e.chatViewModes.value,onChatViewModeChange:e.chatViewModes.onChange,offeredViewModes:e.chatViewModes.offered}:n}):void 0,showInformation:!0,headerItems:[...e.chatHeaderActions?[{key:"workspace-actions",type:"custom",pinned:!0,render:()=>e.chatHeaderActions}]:[],...Me&&!Me.validating&&!Me.refused?[{key:"anonymous-key-clock",type:"custom",render:()=>t.jsx(ii,{state:Me})}]:[],...G&&w?[{key:"session-state",type:"custom",render:()=>t.jsx(cr,{facts:Gn})},{key:"session-actions",type:"custom",pinned:!0,render:()=>t.jsx(ur,{uid:ve||void 0,describe:n=>nt.described(n),context:ns})}]:[],...Bn.map(n=>{const r=n.Component;return{key:`slot-${n.slot}:${n.id}`,type:"custom",priority:-1,render:()=>t.jsx(r,{workspace:e})}}),...e.chatHeaderTrailing?[{key:"right-panel-toggle",type:"custom",pinned:!0,render:()=>e.chatHeaderTrailing}]:[],{key:"full-screen",type:"custom",pinned:!0,render:()=>t.jsx($s,{icon:X?li:ci,"aria-label":X?"Exit full screen":"Enter full screen",variant:"invisible",size:"small",onClick:()=>{Q(!1),g()},sx:J?{"@keyframes dla-fullscreen-hint":{"0%, 100%":{opacity:1},"50%":{opacity:.4}},"&&":{bg:`color-mix(in srgb, ${a.primary} 16%, transparent)`,boxShadow:`inset 0 0 0 1.5px ${a.primary}`,animation:`dla-fullscreen-hint ${vr}ms ease-in-out infinite`},"@media (prefers-reduced-motion: reduce)":{"&&":{animation:"none"}}}:void 0})}],showInput:!1,onSendReady:Ie,notebookToolSurfacesId:_?void 0:e.surfaceId,showTurnFooter:j.showTokenUsage??p?.showTokenUsage??!0,onContextSnapshot:Bt,onLoadingChange:mt,renderMessageFooter:G&&w?(n,r)=>n.role==="user"?t.jsx(dr,{facts:Gn,turn:r.turn,context:ns}):null:void 0,onSpeakingChange:Le,onItemsChange:ae,onDisplayItemsChange:zt,enableStreaming:!0},sn?.id)}),!cn&&Bn.length>0?t.jsx(h,{hidden:!0,children:t.jsx(At,{slot:Ce.chatHeader,props:{workspace:e}})}):null,is&&!lt?wt:null]})}),us=p?.suggestionLabels!==!1&&ht.length>0?t.jsx(h,{"aria-label":s.suggestedPrompts,display:"flex",flexWrap:"wrap",gap:2,px:2,pb:"6px",children:ht.map(n=>t.jsx(h,{as:"button",type:"button",title:n.message,disabled:L||ot,onClick:()=>{re(n.message)},appearance:"none",font:"inherit",fontSize:0,fontWeight:"semibold",lineHeight:1.25,px:"10px",py:"5px",width:vs,flex:`0 0 ${vs}px`,borderRadius:"999px",border:"1px solid",bg:"canvas.subtle",whiteSpace:"nowrap",sx:{borderColor:"border.default",color:"fg.default",cursor:"pointer","&:hover:not(:disabled)":{borderColor:"accent.fg",color:"accent.fg"},"&:disabled":{opacity:.5,cursor:"default"}},children:t.jsx(di,{title:n.title,maxWidth:"100%",sx:{minWidth:0},children:n.title})},n.title))}):null,fs=f?t.jsx(h,{flex:"0 0 auto",px:3,py:2,borderTop:"1px solid",borderColor:"border.default",bg:"canvas.subtle",fontSize:1,maxHeight:"40%",overflowY:"auto",children:f}):null;return t.jsx(ui,{value:Me,children:t.jsxs(h,{ref:ze,sx:{height:"100%",minHeight:0,display:"flex",flexDirection:"column",position:"relative",...X?{bg:"canvas.default"}:null,...X&&!Xe.current?{position:"fixed",top:U,right:0,bottom:0,left:0,height:"auto",zIndex:1e3}:null},children:[Me?t.jsx(h,{flex:"0 0 auto",children:t.jsx(fi,{state:Me})}):null,ue?t.jsx(ue.Component,{workspace:e,editors:cs,hasEditor:!!_,transcript:ds,prompt:lt?null:wt,chips:lt?null:us,picker:ls,transient:fs}):t.jsxs(t.Fragment,{children:[He&&!lt?t.jsxs(h,{flex:"0 0 auto",borderBottom:"1px solid",borderColor:"border.default",children:[wt,us]}):null,ls,t.jsxs(h,{flex:"1 1 auto",minHeight:0,display:"flex",position:"relative",children:[cs,ds]}),fs,is||lt||He?null:wt]}),qt?t.jsx(h,{position:"absolute",inset:0,zIndex:5,bg:"canvas.default",display:"flex",flexDirection:"column",minHeight:0,children:t.jsx(Pi,{agentName:E?.name??A?.name,sandboxStillRuns:F,temporary:An,onSignedIn:()=>pi.getState().clear()})}):null]})})}function yr(e){const s=e?.agent;return typeof s=="string"&&s?s:void 0}function jr({surfaces:e,active:s,onChange:a,workspace:i}){const c=[...e].sort((u,x)=>(u.order??100)-(x.order??100));return t.jsxs(h,{flex:"0 0 auto",display:"flex",alignItems:"center",gap:2,px:3,py:2,borderBottom:"1px solid",borderColor:"border.default",children:[t.jsx($,{sx:{fontSize:0,color:"fg.muted"},children:"Beside the chat"}),t.jsxs(pn,{"aria-label":"Editor beside the chat",size:"small",children:[t.jsx(pn.Button,{selected:s===de,onClick:()=>a(de),children:"Chat"}),c.map(u=>{const x=dt(u,i),l=x?void 0:u.unavailableReason?.(i)??"Not available right now";return t.jsx(pn.Button,{selected:s===u.surfaceId,"aria-disabled":!x,title:l??u.title,leadingIcon:u.icon,onClick:()=>{x&&a(u.surfaceId)},children:u.title},u.surfaceId)})]})]})}function xn({children:e}){return t.jsx(h,{height:"100%",display:"flex",alignItems:"center",justifyContent:"center",color:"fg.muted",fontSize:1,px:3,textAlign:"center",children:e})}export{Tr as default};