@datalayer/agent-runtimes 1.6.86 → 1.6.88

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 (344) hide show
  1. package/dist-embed/chunks/{AgentDetails-BRhO9qA_.js → AgentDetails-DdSlGfQV.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-DAWAmYS1.js → AgentDetailsDialog-C7rvaKS1.js} +1 -1
  3. package/dist-embed/chunks/{CellSidebarExtension-B_Bqi3Eh.js → CellSidebarExtension-CrgdhbHy.js} +1 -1
  4. package/dist-embed/chunks/{ChatView-eRieNBDa.js → ChatView-Bw7yLD4U.js} +1 -1
  5. package/dist-embed/chunks/{CollapsiblePlugin-DPGnrmLj.js → CollapsiblePlugin-ng8VFSwH.js} +1 -1
  6. package/dist-embed/chunks/{ContextPie-h_II4EDU.js → ContextPie-Duhkymga.js} +1 -1
  7. package/dist-embed/chunks/{DeckComponent-oBh8nbTa.js → DeckComponent-BhyoCP90.js} +2 -2
  8. package/dist-embed/chunks/{DocumentView-C8G8fA7K.js → DocumentView-Dn2adk7S.js} +1 -1
  9. package/dist-embed/chunks/{EphemeralDocument-Bm1w17Zw.js → EphemeralDocument-BiQZswSQ.js} +1 -1
  10. package/dist-embed/chunks/{EphemeralNotebook-jQ7FGCY-.js → EphemeralNotebook-C04wMmoE.js} +1 -1
  11. package/dist-embed/chunks/{ExcalidrawComponent-BgjhoJC3.js → ExcalidrawComponent-GkzKDk_S.js} +1 -1
  12. package/dist-embed/chunks/{ExcalidrawModal-DtdsEiaS.js → ExcalidrawModal-Ct44VSBv.js} +1 -1
  13. package/dist-embed/chunks/{JupyterLexicalExtension-Dr8dgCst.js → JupyterLexicalExtension-BYde4Hzz.js} +8 -8
  14. package/dist-embed/chunks/{KernelVariables-cH-x-Hrc.js → KernelVariables-DvfwDxTX.js} +1 -1
  15. package/dist-embed/chunks/{NotebookToolSurfaces-BcIduPcQ.js → NotebookToolSurfaces-BvKDvb3M.js} +1 -1
  16. package/dist-embed/chunks/{NotebookView-LJ0GBHTQ.js → NotebookView-Wo8VVvUY.js} +1 -1
  17. package/dist-embed/chunks/{Output-Do1CYRIF.js → Output-BmVt4DpZ.js} +1 -1
  18. package/dist-embed/chunks/{SandboxDetailsDialog-DjP6mCWy.js → SandboxDetailsDialog-CCmkIp8x.js} +1 -1
  19. package/dist-embed/chunks/{SchemaForm-1QzMu6Zk.js → SchemaForm-YDAPV6Rb.js} +1 -1
  20. package/dist-embed/chunks/{SheetTabs-DJG69znU.js → SheetTabs-PG3DQn2N.js} +1 -1
  21. package/dist-embed/chunks/{SpreadsheetPreviewView-5marsdKE.js → SpreadsheetPreviewView-CpUuO1Di.js} +1 -1
  22. package/dist-embed/chunks/{SpreadsheetView-CmD-dAjn.js → SpreadsheetView-CsSXGqRw.js} +1 -1
  23. package/dist-embed/chunks/{WidgetVariableView-BQoMV999.js → WidgetVariableView-BBupZR8G.js} +1 -1
  24. package/dist-embed/chunks/{YouTubePlugin-BCHN7vdi.js → YouTubePlugin-BOnLCvAR.js} +1 -1
  25. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CF8QpiZa.js → abnfDiagram-VCTEODGH-C5V-1V3E.js} +1 -1
  26. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-GnaR64st.js → abnfDiagram-VCTEODGH-CvZ8usho.js} +1 -1
  27. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BSmEjUJk.js → abnfDiagram-VCTEODGH-DN0kRlog.js} +1 -1
  28. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-4AR7vABL.js → ar-SA-G6X2FPQ2-DloHADQr.js} +1 -1
  29. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-b_EnmOeS.js → architectureDiagram-5GKGNRK7-BeTQQNyc.js} +1 -1
  30. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-ByAYkSMW.js → architectureDiagram-5GKGNRK7-Bwqgkba9.js} +1 -1
  31. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Cy6c9GhS.js → architectureDiagram-5GKGNRK7-DRfUn2vu.js} +1 -1
  32. package/dist-embed/chunks/{az-AZ-76LH7QW2-DQ2RQ6Bt.js → az-AZ-76LH7QW2-ZZtVb3rf.js} +1 -1
  33. package/dist-embed/chunks/{bg-BG-XCXSNQG7-BRTYabxb.js → bg-BG-XCXSNQG7-9xliuV5e.js} +1 -1
  34. package/dist-embed/chunks/{blockDiagram-868be97b-C6Xxmbgc.js → blockDiagram-868be97b-DQhIB20U.js} +1 -1
  35. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-zXh6gZYF.js → blockDiagram-I7D4REHJ-BjLfxD7u.js} +1 -1
  36. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BBd_q6Z7.js → blockDiagram-I7D4REHJ-BjW3QpXh.js} +1 -1
  37. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Clrwi7_Q.js → blockDiagram-I7D4REHJ-DUfJri3_.js} +1 -1
  38. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DJpR_aiV.js → bn-BD-2XOGV67Q-Bhkca3_3.js} +1 -1
  39. package/dist-embed/chunks/{c4Diagram-3f4bdde3-BhBNs69f.js → c4Diagram-3f4bdde3-dS_U3gYR.js} +1 -1
  40. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BWQ9xHoN.js → c4Diagram-7LVT6UL2-BK8yvli2.js} +1 -1
  41. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DcCc8HaH.js → c4Diagram-7LVT6UL2-Da5uNT8x.js} +1 -1
  42. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-p14SIG7V.js → c4Diagram-7LVT6UL2-O_rZefrz.js} +1 -1
  43. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BrHrTXrx.js → ca-ES-6MX7JW3Y-jpG1o3Op.js} +1 -1
  44. package/dist-embed/chunks/{chunk-2Q5K7J3B-BkzWX8eg.js → chunk-2Q5K7J3B-BX9u1bBi.js} +1 -1
  45. package/dist-embed/chunks/{chunk-2Q5K7J3B-CWx-QJ0-.js → chunk-2Q5K7J3B-DiqqlJZw.js} +1 -1
  46. package/dist-embed/chunks/{chunk-2Q5K7J3B-CtmdieBX.js → chunk-2Q5K7J3B-JhdIsXWp.js} +1 -1
  47. package/dist-embed/chunks/{chunk-5VM5RSS4-Ciba-ybC.js → chunk-5VM5RSS4-BbOPwJfe.js} +1 -1
  48. package/dist-embed/chunks/{chunk-5VM5RSS4-C7mbT2Vq.js → chunk-5VM5RSS4-C5X9VB1v.js} +1 -1
  49. package/dist-embed/chunks/{chunk-5VM5RSS4-O8p7luYq.js → chunk-5VM5RSS4-box8kQsT.js} +1 -1
  50. package/dist-embed/chunks/{chunk-F27PBJKO-Bo5boRfj.js → chunk-F27PBJKO-BUeWPnw5.js} +1 -1
  51. package/dist-embed/chunks/{chunk-F27PBJKO-CZHz6AS9.js → chunk-F27PBJKO-CQM02DXR.js} +1 -1
  52. package/dist-embed/chunks/{chunk-F27PBJKO-WqHcL2s0.js → chunk-F27PBJKO-syxUNYMu.js} +1 -1
  53. package/dist-embed/chunks/{chunk-IMKFNOWR-CPdtPffh.js → chunk-IMKFNOWR-B87sc0vl.js} +1 -1
  54. package/dist-embed/chunks/{chunk-IMKFNOWR-BJR6rkFo.js → chunk-IMKFNOWR-CPIe37ka.js} +1 -1
  55. package/dist-embed/chunks/{chunk-IMKFNOWR-Csfu1kFU.js → chunk-IMKFNOWR-rg2BEcj6.js} +1 -1
  56. package/dist-embed/chunks/{chunk-JWPE2WC7-BVXd-ICe.js → chunk-JWPE2WC7-BGdc9-bH.js} +1 -1
  57. package/dist-embed/chunks/{chunk-JWPE2WC7-Cq6Q947j.js → chunk-JWPE2WC7-DXZeG2qg.js} +1 -1
  58. package/dist-embed/chunks/{chunk-JWPE2WC7-Bf4pFlIJ.js → chunk-JWPE2WC7-NvLQtuoq.js} +1 -1
  59. package/dist-embed/chunks/{chunk-POPQ4Y6H-DhNnPwZp.js → chunk-POPQ4Y6H-BgR92oKl.js} +1 -1
  60. package/dist-embed/chunks/{chunk-POPQ4Y6H-s1yt1ZtK.js → chunk-POPQ4Y6H-DWWKSDND.js} +1 -1
  61. package/dist-embed/chunks/{chunk-POPQ4Y6H-B_rWRGt2.js → chunk-POPQ4Y6H-UAJm0Siu.js} +1 -1
  62. package/dist-embed/chunks/{chunk-SVP7TREG-CHN6fclq.js → chunk-SVP7TREG-BE97ZGVE.js} +1 -1
  63. package/dist-embed/chunks/{chunk-SVP7TREG-8oKVa2mm.js → chunk-SVP7TREG-BGHt1HDi.js} +1 -1
  64. package/dist-embed/chunks/{chunk-SVP7TREG-CsFEUe5B.js → chunk-SVP7TREG-lMq3S-u-.js} +1 -1
  65. package/dist-embed/chunks/{chunk-TICWLB2K-CSCMv_QA.js → chunk-TICWLB2K-BdUzhQPw.js} +1 -1
  66. package/dist-embed/chunks/{chunk-TICWLB2K-BsCtCkEM.js → chunk-TICWLB2K-CeH9Mpzc.js} +1 -1
  67. package/dist-embed/chunks/{chunk-TICWLB2K-InZQ5ZEH.js → chunk-TICWLB2K-D6WJ64X6.js} +1 -1
  68. package/dist-embed/chunks/{chunk-XXDRQBXY-z8go8Kjf.js → chunk-XXDRQBXY-B8THsPMh.js} +1 -1
  69. package/dist-embed/chunks/{chunk-XXDRQBXY-Y8pSpMzF.js → chunk-XXDRQBXY-BU32lP3z.js} +1 -1
  70. package/dist-embed/chunks/{chunk-XXDRQBXY-sm2AIgJ5.js → chunk-XXDRQBXY-CjAMT3RS.js} +1 -1
  71. package/dist-embed/chunks/{classDiagram-ZZMXUADV-BjEOw29S.js → classDiagram-ZZMXUADV-Cy9bb-Ja.js} +1 -1
  72. package/dist-embed/chunks/{classDiagram-ZZMXUADV-G9WI_1Zg.js → classDiagram-ZZMXUADV-HBhnoh6h.js} +1 -1
  73. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DJ40c8si.js → classDiagram-ZZMXUADV-dVm_zkxF.js} +1 -1
  74. package/dist-embed/chunks/{classDiagram-f62afe4f-Blm1wT1_.js → classDiagram-f62afe4f-jrNOgtbP.js} +1 -1
  75. package/dist-embed/chunks/{classDiagram-v2-604399ef-DtWqjJhW.js → classDiagram-v2-604399ef-CIao-4MQ.js} +1 -1
  76. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BjEOw29S.js → classDiagram-v2-VYDZK3BY-Cy9bb-Ja.js} +1 -1
  77. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-G9WI_1Zg.js → classDiagram-v2-VYDZK3BY-HBhnoh6h.js} +1 -1
  78. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DJ40c8si.js → classDiagram-v2-VYDZK3BY-dVm_zkxF.js} +1 -1
  79. package/dist-embed/chunks/{core-BrYTRvTy.js → core-trN55qc5.js} +1 -1
  80. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-j_7L0NF5.js → cose-bilkent-JH36ORCC-D2gVNaYW.js} +1 -1
  81. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-C73aLaB-.js → cose-bilkent-JH36ORCC-DFWJgtSE.js} +1 -1
  82. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DCtKiRmD.js → cose-bilkent-JH36ORCC-DGrxjlJ4.js} +1 -1
  83. package/dist-embed/chunks/{createText-aed3d8b3-B0tLexrf.js → createText-aed3d8b3-DoLPKXK1.js} +1 -1
  84. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CmCt0bDq.js → cs-CZ-2BRQDIVT-BMA1Xu87.js} +1 -1
  85. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-BSwaTAfL.js → cynefinDiagram-5FMLGOSQ-BZ1LtKUy.js} +1 -1
  86. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DXr1M_CB.js → cynefinDiagram-5FMLGOSQ-DExZ3BYo.js} +1 -1
  87. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-DLyDkFEh.js → cynefinDiagram-5FMLGOSQ-DhFh7Gts.js} +1 -1
  88. package/dist-embed/chunks/{da-DK-5WZEPLOC-Bow4-dps.js → da-DK-5WZEPLOC-smzK_QPz.js} +1 -1
  89. package/dist-embed/chunks/{dagre-GXQ25YYZ-CPu-St26.js → dagre-GXQ25YYZ-4P90jeEC.js} +1 -1
  90. package/dist-embed/chunks/{dagre-GXQ25YYZ-Bfxayyi1.js → dagre-GXQ25YYZ-CQ05bX5J.js} +1 -1
  91. package/dist-embed/chunks/{dagre-GXQ25YYZ-DTWZ8vY1.js → dagre-GXQ25YYZ-MXGi4287.js} +1 -1
  92. package/dist-embed/chunks/{de-DE-XR44H4JA-DOrKYiYP.js → de-DE-XR44H4JA-CfWQxGGf.js} +1 -1
  93. package/dist-embed/chunks/{diagram-S7CK7UJ4-ERKr1j6v.js → diagram-S7CK7UJ4-Ccq8-Zxr.js} +1 -1
  94. package/dist-embed/chunks/{diagram-S7CK7UJ4-Biw5mnoN.js → diagram-S7CK7UJ4-CvR2q_hg.js} +1 -1
  95. package/dist-embed/chunks/{diagram-S7CK7UJ4-ewBgYmRN.js → diagram-S7CK7UJ4-xgW0lqt_.js} +1 -1
  96. package/dist-embed/chunks/{diagram-UQ7AKVKN-B-f2Afei.js → diagram-UQ7AKVKN-Csc8IuSs.js} +1 -1
  97. package/dist-embed/chunks/{diagram-UQ7AKVKN-C-6kzgTn.js → diagram-UQ7AKVKN-D6nWV9sq.js} +1 -1
  98. package/dist-embed/chunks/{diagram-UQ7AKVKN-CGNA7gub.js → diagram-UQ7AKVKN-DM05uJg0.js} +1 -1
  99. package/dist-embed/chunks/{diagram-VSXAHHWV-DRVoe_PH.js → diagram-VSXAHHWV-C0Dte6B4.js} +1 -1
  100. package/dist-embed/chunks/{diagram-VSXAHHWV-7M08zFHc.js → diagram-VSXAHHWV-CBb3q1Lt.js} +1 -1
  101. package/dist-embed/chunks/{diagram-VSXAHHWV-CTQu2IBp.js → diagram-VSXAHHWV-ChcqzpvG.js} +1 -1
  102. package/dist-embed/chunks/{diagram-VX7I27RA-vkcQI8-t.js → diagram-VX7I27RA-D8OyA7LV.js} +1 -1
  103. package/dist-embed/chunks/{diagram-VX7I27RA-DHwSWNj4.js → diagram-VX7I27RA-DA3s85ZI.js} +1 -1
  104. package/dist-embed/chunks/{diagram-VX7I27RA-B_LkfTnq.js → diagram-VX7I27RA-DFBWpFKi.js} +1 -1
  105. package/dist-embed/chunks/{diagram-Z3DM3KII-D0Xt6xwn.js → diagram-Z3DM3KII-CWv5dRb1.js} +1 -1
  106. package/dist-embed/chunks/{diagram-Z3DM3KII-YAo8QSYR.js → diagram-Z3DM3KII-DViUyD1V.js} +1 -1
  107. package/dist-embed/chunks/{diagram-Z3DM3KII-BZ9tmKdd.js → diagram-Z3DM3KII-DpwpLNON.js} +1 -1
  108. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DN2tb-X8.js → ebnfDiagram-PWID7BFC-CeZcQDV3.js} +1 -1
  109. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-C2oLjL45.js → ebnfDiagram-PWID7BFC-DogBQteX.js} +1 -1
  110. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Dk5WVIim.js → ebnfDiagram-PWID7BFC-ZbRTmpLY.js} +1 -1
  111. package/dist-embed/chunks/{edges-b2856ca0-BSzU9ga-.js → edges-b2856ca0-D_o-rhcf.js} +1 -1
  112. package/dist-embed/chunks/{el-GR-BZB4AONW-BTtxEAc0.js → el-GR-BZB4AONW-B66N5_hN.js} +1 -1
  113. package/dist-embed/chunks/{erDiagram-5d81789a--wvCe6Ur.js → erDiagram-5d81789a-Fv2KfQrA.js} +1 -1
  114. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BDw_Db3e.js → erDiagram-RLTQ6QDP-BGg8orkr.js} +1 -1
  115. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BTXMcY7Y.js → erDiagram-RLTQ6QDP-CmahDLTF.js} +1 -1
  116. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BsU1EeJN.js → erDiagram-RLTQ6QDP-QI_LQlaL.js} +1 -1
  117. package/dist-embed/chunks/{es-ES-U4NZUMDT-DhrLOB7I.js → es-ES-U4NZUMDT-B9FR_uSt.js} +1 -1
  118. package/dist-embed/chunks/{esm-VjpQWsU9.js → esm--zHizpYG.js} +1 -1
  119. package/dist-embed/chunks/{esm-BFRTiV0k.js → esm-BaCqpqKi.js} +1 -1
  120. package/dist-embed/chunks/{eu-ES-A7QVB2H4-CdpglPNY.js → eu-ES-A7QVB2H4-BOXiXCGc.js} +1 -1
  121. package/dist-embed/chunks/{fa-IR-HGAKTJCU-Ea2hzNvl.js → fa-IR-HGAKTJCU-DZGgNuMT.js} +1 -1
  122. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-D6KBS1-v.js → fi-FI-Z5N7JZ37-CaWIHowf.js} +1 -1
  123. package/dist-embed/chunks/{flowDb-185abca5-CBeP2_ZY.js → flowDb-185abca5-Bme86bTZ.js} +1 -1
  124. package/dist-embed/chunks/{flowDiagram-1629c991-LZzO5ZR8.js → flowDiagram-1629c991-Dgzjtx-J.js} +1 -1
  125. package/dist-embed/chunks/{flowDiagram-HODETNUW-DNjEQlAR.js → flowDiagram-HODETNUW-CgvZqEVs.js} +1 -1
  126. package/dist-embed/chunks/{flowDiagram-HODETNUW-DP1PWdQF.js → flowDiagram-HODETNUW-CmuRDMmw.js} +1 -1
  127. package/dist-embed/chunks/{flowDiagram-HODETNUW-_U05MBMl.js → flowDiagram-HODETNUW-OUrVNdIM.js} +1 -1
  128. package/dist-embed/chunks/{flowDiagram-v2-1d953310-DeqYSBVG.js → flowDiagram-v2-1d953310-C0-FfyAn.js} +1 -1
  129. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-Dg5bSBS4.js → flowchart-elk-definition-6df44142-Cj7Q5rsQ.js} +1 -1
  130. package/dist-embed/chunks/{fr-FR-RHASNOE6-CeDw1EdR.js → fr-FR-RHASNOE6-JbYWEs2C.js} +1 -1
  131. package/dist-embed/chunks/{ganttDiagram-3b0b3873-D9Pr_Kxk.js → ganttDiagram-3b0b3873-11vGPr5M.js} +1 -1
  132. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Baccn166.js → ganttDiagram-EL5Y4UJY-BKVYCh-L.js} +1 -1
  133. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DmwhuzrV.js → ganttDiagram-EL5Y4UJY-DjmeWOsd.js} +1 -1
  134. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-Qz5HuyzZ.js → ganttDiagram-EL5Y4UJY-sX30iW6f.js} +1 -1
  135. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CF5nE-hV.js → gitGraphDiagram-WWUBYQGX-BuldyYGe.js} +1 -1
  136. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-BUlSUrle.js → gitGraphDiagram-WWUBYQGX-CVcSYkDK.js} +1 -1
  137. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-ZgEb3qK-.js → gitGraphDiagram-WWUBYQGX-D5bCd_Fv.js} +1 -1
  138. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-BqpGV-_U.js → gitGraphDiagram-f01e8bc2-CWnInLhH.js} +1 -1
  139. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DK2-uVTg.js → gl-ES-HMX3MZ6V-DHOQCvQH.js} +1 -1
  140. package/dist-embed/chunks/{he-IL-6SHJWFNN-Fk0F_rV-.js → he-IL-6SHJWFNN-T-2jEF-H.js} +1 -1
  141. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-03USmwuM.js → hi-IN-IWLTKZ5I-DnwHC230.js} +1 -1
  142. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-BSbsIqRs.js → hu-HU-A5ZG7DT2-CXi3BH37.js} +1 -1
  143. package/dist-embed/chunks/{id-ID-SAP4L64H-Def1ERB7.js → id-ID-SAP4L64H-CLNAMqbr.js} +1 -1
  144. package/dist-embed/chunks/{index-DrrVr0x3.js → index-5os8HYj-.js} +1 -1
  145. package/dist-embed/chunks/{index-9bae90f3-9T5x-xqi.js → index-9bae90f3-iredpvJb.js} +1 -1
  146. package/dist-embed/chunks/{index-CHu5zo1L.js → index-BeJsO4Vc.js} +1 -1
  147. package/dist-embed/chunks/{index-z8PItpd8.js → index-C5HZB8ue.js} +2 -2
  148. package/dist-embed/chunks/{index-Df2MkvAW.js → index-CLB4KPZs.js} +4 -4
  149. package/dist-embed/chunks/{index-DB6fbGKT.js → index-DqWZNFUh.js} +1 -1
  150. package/dist-embed/chunks/{index-DObGLuCI.js → index-s25RSqvt.js} +4 -4
  151. package/dist-embed/chunks/index.esm-BLnMhA7S.js +1 -0
  152. package/dist-embed/chunks/{index.esm-BA_6VWW2.js → index.esm-CDmg415B.js} +1 -1
  153. package/dist-embed/chunks/{infoDiagram-27XIBGKW-D3fIZzte.js → infoDiagram-27XIBGKW-C5jY9v4i.js} +1 -1
  154. package/dist-embed/chunks/{infoDiagram-27XIBGKW-Cs7bZlH6.js → infoDiagram-27XIBGKW-ZpA0pyod.js} +1 -1
  155. package/dist-embed/chunks/{infoDiagram-27XIBGKW-B4XVsJvC.js → infoDiagram-27XIBGKW-r53wKy7u.js} +1 -1
  156. package/dist-embed/chunks/{infoDiagram-a29d40f1-DkWa9MRC.js → infoDiagram-a29d40f1-Knwr4YPu.js} +1 -1
  157. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BB-Kv-Mj.js → ishikawaDiagram-5VMMS53U-DZTg3ecD.js} +1 -1
  158. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BIytcjnR.js → ishikawaDiagram-5VMMS53U-DyyVsa6G.js} +1 -1
  159. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-B6nIkJxX.js → ishikawaDiagram-5VMMS53U-_ZSb2XNA.js} +1 -1
  160. package/dist-embed/chunks/{it-IT-JPQ66NNP-SLcJY1NM.js → it-IT-JPQ66NNP-txSVmIqw.js} +1 -1
  161. package/dist-embed/chunks/{ja-JP-DBVTYXUO-Cc9AUQ4A.js → ja-JP-DBVTYXUO-DOImz4yG.js} +1 -1
  162. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Bs6ObzT9.js → journeyDiagram-3NMN7TZE-Bc9JVKJo.js} +1 -1
  163. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-DjgUmoWA.js → journeyDiagram-3NMN7TZE-ChyAFriv.js} +1 -1
  164. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-C3yCP95B.js → journeyDiagram-3NMN7TZE-DAnc386V.js} +1 -1
  165. package/dist-embed/chunks/{journeyDiagram-95396277-Dj4xwdzk.js → journeyDiagram-95396277-BebgPn4W.js} +1 -1
  166. package/dist-embed/chunks/{kaa-6HZHGXH3-CzXQn7ER.js → kaa-6HZHGXH3-B2yEdYaM.js} +1 -1
  167. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Cd1AWKsn.js → kab-KAB-ZGHBKWFO-sLTnjbMU.js} +1 -1
  168. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-_mcHB773.js → kanban-definition-UXKFOSKX-C2nVULib.js} +1 -1
  169. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-B9DSJpj9.js → kanban-definition-UXKFOSKX-CaaDxJqC.js} +1 -1
  170. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Chsw2-Nq.js → kanban-definition-UXKFOSKX-Ceyuj1Ce.js} +1 -1
  171. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CoeOUA0W.js → kk-KZ-P5N5QNE5-BDlGvfGX.js} +1 -1
  172. package/dist-embed/chunks/{km-KH-HSX4SM5Z-Newj9En6.js → km-KH-HSX4SM5Z-CooQACBW.js} +1 -1
  173. package/dist-embed/chunks/{ko-KR-MTYHY66A-B0HPCdz1.js → ko-KR-MTYHY66A-Bj_rlaK_.js} +1 -1
  174. package/dist-embed/chunks/{ku-TR-6OUDTVRD-DGP0qnbh.js → ku-TR-6OUDTVRD-Bj6Ypm8A.js} +1 -1
  175. package/dist-embed/chunks/{layout-DTdkd155.js → layout-BjpOdFu2.js} +1 -1
  176. package/dist-embed/chunks/{layout-D_LOxL0l.js → layout-DQIVAfpO.js} +1 -1
  177. package/dist-embed/chunks/{layout-W4AzWc9F.js → layout-Dqr0Lpzq.js} +1 -1
  178. package/dist-embed/chunks/{lib-CXGDRspZ.js → lib-14GbWfrY.js} +1 -1
  179. package/dist-embed/chunks/{lib-CADgZZ9y.js → lib-4swlpTXy.js} +1 -1
  180. package/dist-embed/chunks/{lib-B8KSw9bH.js → lib-BQq_nDIJ.js} +1 -1
  181. package/dist-embed/chunks/{lib-Y90USIm4.js → lib-B_Y-fFGM.js} +1 -1
  182. package/dist-embed/chunks/{lib-BYzUzQ6H.js → lib-Bi3C17qp.js} +1 -1
  183. package/dist-embed/chunks/{lib-nq0B6NsD.js → lib-BnWPn-3C.js} +1 -1
  184. package/dist-embed/chunks/{lib-CaukawRB.js → lib-CFjofO2V.js} +1 -1
  185. package/dist-embed/chunks/{lib-B8ebpTVD.js → lib-CZdsrJQn.js} +1 -1
  186. package/dist-embed/chunks/{lib-Cn7qCM0u.js → lib-CjtFb8n-.js} +1 -1
  187. package/dist-embed/chunks/{lib-Enno6S7H.js → lib-CxLkAp-u.js} +1 -1
  188. package/dist-embed/chunks/{lib-Coc8tcSm.js → lib-D-SlE5VC.js} +1 -1
  189. package/dist-embed/chunks/{lib-EuT6O3Jf.js → lib-D8GpP3sJ.js} +1 -1
  190. package/dist-embed/chunks/{lib-Bc3R7boK.js → lib-DTFhY99t.js} +1 -1
  191. package/dist-embed/chunks/{lib-DDbDl1bK.js → lib-Df9xZsJQ.js} +1 -1
  192. package/dist-embed/chunks/{lib-CrCTDU2F.js → lib-Dte5toRY.js} +1 -1
  193. package/dist-embed/chunks/{lib-BSeAgx1v.js → lib-RkdqeSxj.js} +1 -1
  194. package/dist-embed/chunks/{lib-YvkJZ6Rp.js → lib-XPaJtC26.js} +1 -1
  195. package/dist-embed/chunks/{lib-CLcIUOT7.js → lib-ZCrl6o8i.js} +1 -1
  196. package/dist-embed/chunks/{lib-DKIJv0vv.js → lib-epJftt6F.js} +1 -1
  197. package/dist-embed/chunks/{lt-LT-XHIRWOB4-BIsLadFj.js → lt-LT-XHIRWOB4-tCy9B-KD.js} +1 -1
  198. package/dist-embed/chunks/{lv-LV-5QDEKY6T-C8HmZZBF.js → lv-LV-5QDEKY6T-D7otgK4T.js} +1 -1
  199. package/dist-embed/chunks/{mermaid.core-Dd-D7tJ4.js → mermaid.core-DMHnDUdQ.js} +4 -4
  200. package/dist-embed/chunks/{mermaid.core-By9AWIOp.js → mermaid.core-DySu4CMa.js} +3 -3
  201. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-Uv7-26v7.js → mindmap-definition-YA3MSWOX-BXfU9jpH.js} +1 -1
  202. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CmGscTNk.js → mindmap-definition-YA3MSWOX-BxYK9vLg.js} +1 -1
  203. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CCpwK8vh.js → mindmap-definition-YA3MSWOX-DQSoT62j.js} +1 -1
  204. package/dist-embed/chunks/{mindmap-definition-e4c1d938-aCX0qYqH.js → mindmap-definition-e4c1d938-GSsr5zyA.js} +1 -1
  205. package/dist-embed/chunks/{mr-IN-CRQNXWMA-DKYnEuji.js → mr-IN-CRQNXWMA-C_WuMJ-7.js} +1 -1
  206. package/dist-embed/chunks/{my-MM-5M5IBNSE-MY3GKeMd.js → my-MM-5M5IBNSE-ljxQ9hC9.js} +1 -1
  207. package/dist-embed/chunks/{nb-NO-T6EIAALU-txIp5vuE.js → nb-NO-T6EIAALU-D2s2RIr7.js} +1 -1
  208. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-C6xelwh4.js → nl-NL-IS3SIHDZ-BnT13jFW.js} +1 -1
  209. package/dist-embed/chunks/{nn-NO-6E72VCQL-BFYvN5n1.js → nn-NO-6E72VCQL-obFqc-dJ.js} +1 -1
  210. package/dist-embed/chunks/{oc-FR-POXYY2M6-uGpH7RML.js → oc-FR-POXYY2M6-Dp0fg3-H.js} +1 -1
  211. package/dist-embed/chunks/{pa-IN-N4M65BXN-Cg4Z-vtz.js → pa-IN-N4M65BXN-BefFR002.js} +1 -1
  212. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-DLONs192.js → pegDiagram-XKGWAZYB-FSobI14k.js} +1 -1
  213. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-C1R8Kk6K.js → pegDiagram-XKGWAZYB-GlLsdSxR.js} +1 -1
  214. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-dwQNJiaW.js → pegDiagram-XKGWAZYB-iCCMOEMa.js} +1 -1
  215. package/dist-embed/chunks/{percentages-BXMCSKIN-9RttMFHC.js → percentages-BXMCSKIN-D1a6fCH1.js} +5 -5
  216. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DiT0kFGb.js → pieDiagram-E7YTZNPT-BLVqNMWJ.js} +1 -1
  217. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-CH60iHt1.js → pieDiagram-E7YTZNPT-CIfzhxTy.js} +1 -1
  218. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Cm-wzRi8.js → pieDiagram-E7YTZNPT-ffhUIieA.js} +1 -1
  219. package/dist-embed/chunks/{pieDiagram-c941bede-BF587JLB.js → pieDiagram-c941bede-nYu7i5OI.js} +1 -1
  220. package/dist-embed/chunks/{pl-PL-T2D74RX3-Dv_CTL10.js → pl-PL-T2D74RX3-BO36IHPS.js} +1 -1
  221. package/dist-embed/chunks/{plugin-Bvp_HQZg.js → plugin-m2JrXH0S.js} +1 -1
  222. package/dist-embed/chunks/{pt-BR-5N22H2LF-CK-yjA9j.js → pt-BR-5N22H2LF-DeQn8LGc.js} +1 -1
  223. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-DYb7ailg.js → pt-PT-UZXXM6DQ-BY1iT-VW.js} +1 -1
  224. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-mkOZIUHb.js → quadrantDiagram-AXDQQJYC-BE9RPE6m.js} +1 -1
  225. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-B1wf6Zth.js → quadrantDiagram-AXDQQJYC-DbYIZcyN.js} +1 -1
  226. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DWDtOx8-.js → quadrantDiagram-AXDQQJYC-Dpzqg33f.js} +1 -1
  227. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-CE6GwviF.js → quadrantDiagram-cf8b8fe0-nVG6Aygu.js} +1 -1
  228. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DrkBEH1z.js → railroadDiagram-O6MQD6OU-CEl2l0ZE.js} +1 -1
  229. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DEB7gRmX.js → railroadDiagram-O6MQD6OU-CwaTW3Mo.js} +1 -1
  230. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-DjA_m2-o.js → railroadDiagram-O6MQD6OU-jikRRl2W.js} +1 -1
  231. package/dist-embed/chunks/{renderer-B_98xkGt.js → renderer-CCsq5PXp.js} +1 -1
  232. package/dist-embed/chunks/{requirementDiagram-53bda41b-BsRjuGBf.js → requirementDiagram-53bda41b-CXGOrv-O.js} +1 -1
  233. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-C8d0kJ1A.js → requirementDiagram-BXWQKSXE-Bd0fV1Bn.js} +1 -1
  234. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-S8WT8VJ1.js → requirementDiagram-BXWQKSXE-ClYVmNTl.js} +1 -1
  235. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-82Ybj2ki.js → requirementDiagram-BXWQKSXE-DEQBP2xS.js} +1 -1
  236. package/dist-embed/chunks/{ro-RO-JPDTUUEW-1Cu9X8j1.js → ro-RO-JPDTUUEW-BJDoWheT.js} +1 -1
  237. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-Bl3rV2YR.js → ru-RU-B4JR7IUQ-tTkTCAO1.js} +1 -1
  238. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-C2LowYxA.js → sankeyDiagram-P5KCCOFB-CLR82118.js} +1 -1
  239. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CKqSAqcJ.js → sankeyDiagram-P5KCCOFB-CuMdtMPP.js} +1 -1
  240. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-eNBOyfBR.js → sankeyDiagram-P5KCCOFB-DH-uxGJV.js} +1 -1
  241. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-BAS8V2Ov.js → sankeyDiagram-c3ef121a-nnS5nxSr.js} +1 -1
  242. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-BWNvF-m7.js → sequenceDiagram-82a5b84f-BXXPsnTm.js} +1 -1
  243. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CxH0MlFa.js → sequenceDiagram-WJ2MYXX4-CkWCOxWE.js} +1 -1
  244. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-C_2alFNp.js → sequenceDiagram-WJ2MYXX4-D00NbcmA.js} +1 -1
  245. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-fsR56p6L.js → sequenceDiagram-WJ2MYXX4-VyUqwKEJ.js} +1 -1
  246. package/dist-embed/chunks/{si-LK-N5RQ5JYF-C2t5ES1t.js → si-LK-N5RQ5JYF-D4AT7z9z.js} +1 -1
  247. package/dist-embed/chunks/{sizeCapture-INFHLROL-BCe0IiFV.js → sizeCapture-INFHLROL-B_CNNL_v.js} +1 -1
  248. package/dist-embed/chunks/{sizeCapture-INFHLROL-BsZaIjAU.js → sizeCapture-INFHLROL-_h3QW8w5.js} +1 -1
  249. package/dist-embed/chunks/{sizeCapture-INFHLROL-Y7lBmAj6.js → sizeCapture-INFHLROL-cLmnJm7s.js} +1 -1
  250. package/dist-embed/chunks/{sk-SK-C5VTKIMK-BPwM2QoN.js → sk-SK-C5VTKIMK-zTXKcnhq.js} +1 -1
  251. package/dist-embed/chunks/{sl-SI-NN7IZMDC-BCS7eO-5.js → sl-SI-NN7IZMDC-DrxXPVrt.js} +1 -1
  252. package/dist-embed/chunks/{state-DeMGhTAB.js → state-CGa66Nqd.js} +1 -1
  253. package/dist-embed/chunks/{stateDiagram-43e79a5f-2cuSVith.js → stateDiagram-43e79a5f-CKwOZnPj.js} +1 -1
  254. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DosU0FIz.js → stateDiagram-D77RDMKH-BVJqlFiv.js} +1 -1
  255. package/dist-embed/chunks/{stateDiagram-D77RDMKH-ul2eLf5Q.js → stateDiagram-D77RDMKH-CEvuFuTH.js} +1 -1
  256. package/dist-embed/chunks/{stateDiagram-D77RDMKH-3P7AgNud.js → stateDiagram-D77RDMKH-Ns0E2Xy4.js} +1 -1
  257. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-Ur2pX7Zl.js → stateDiagram-v2-2041ed4f-Dx6MQIKx.js} +1 -1
  258. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-D0rhfnrW.js → stateDiagram-v2-MP3YSRHH-C_JHNwKt.js} +1 -1
  259. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-BvlJBilq.js → stateDiagram-v2-MP3YSRHH-DXcA38of.js} +1 -1
  260. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-DeEmivLr.js → stateDiagram-v2-MP3YSRHH-ok1qePbZ.js} +1 -1
  261. package/dist-embed/chunks/{styles-455b33cd-DPOVDa0x.js → styles-455b33cd-CyGhxLIv.js} +1 -1
  262. package/dist-embed/chunks/{styles-f932cba9-Dev7yXQc.js → styles-f932cba9-Yfe3P5e2.js} +1 -1
  263. package/dist-embed/chunks/{styles-fcc2142b-70zGEKfV.js → styles-fcc2142b-CoUogcOD.js} +1 -1
  264. package/dist-embed/chunks/{subset-shared.chunk-Cs06OLE4.js → subset-shared.chunk-Ez82ye3f.js} +1 -1
  265. package/dist-embed/chunks/{subset-worker.chunk-C-vXxYep.js → subset-worker.chunk-BJr6TVB9.js} +1 -1
  266. package/dist-embed/chunks/{substates-BuHNVWkx.js → substates-Bs9ZMVGa.js} +1 -1
  267. package/dist-embed/chunks/{sv-SE-XGPEYMSR-sUR_yJ3Z.js → sv-SE-XGPEYMSR-CVuCUAbC.js} +1 -1
  268. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-zokUeLzq.js → svgDrawCommon-148a3cd9-Vfy_vJEN.js} +1 -1
  269. package/dist-embed/chunks/{swimlanes-42K2YHIH-x4BMo9Cs.js → swimlanes-42K2YHIH-BMEa5pc_.js} +1 -1
  270. package/dist-embed/chunks/{swimlanes-42K2YHIH-CIW2hU2l.js → swimlanes-42K2YHIH-CpRw9PHz.js} +1 -1
  271. package/dist-embed/chunks/{swimlanes-42K2YHIH-DOkKP2_2.js → swimlanes-42K2YHIH-DO1ZzP4k.js} +1 -1
  272. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-zOAH82Ya.js → swimlanesDiagram-VR7AAH4N-BCaTTDxJ.js} +1 -1
  273. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-9yw92Xx_.js → swimlanesDiagram-VR7AAH4N-BYKvE-MW.js} +1 -1
  274. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BlFZ7eQS.js → swimlanesDiagram-VR7AAH4N-BucpGmoC.js} +1 -1
  275. package/dist-embed/chunks/{ta-IN-2NMHFXQM-c1DneC5B.js → ta-IN-2NMHFXQM-BURg7Kc1.js} +1 -1
  276. package/dist-embed/chunks/{th-TH-HPSO5L25-TIsXPiQR.js → th-TH-HPSO5L25-CxVkDzOV.js} +1 -1
  277. package/dist-embed/chunks/{timeline-definition-24CTP7MA-C9Ed6D0K.js → timeline-definition-24CTP7MA-CRpA2xfq.js} +1 -1
  278. package/dist-embed/chunks/{timeline-definition-24CTP7MA-kHlycslq.js → timeline-definition-24CTP7MA-C_RPFzcS.js} +1 -1
  279. package/dist-embed/chunks/{timeline-definition-24CTP7MA-BfM-0614.js → timeline-definition-24CTP7MA-DUJPQe9n.js} +1 -1
  280. package/dist-embed/chunks/{timeline-definition-7545f45a-B4ECAP9Q.js → timeline-definition-7545f45a-BPBA2KPg.js} +1 -1
  281. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Bvb4Ep_L.js → tr-TR-DEFEU3FU-DzMZjlaq.js} +1 -1
  282. package/dist-embed/chunks/{uk-UA-QMV73CPH-BNgdD_2E.js → uk-UA-QMV73CPH-DBHj_NAU.js} +1 -1
  283. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-7gMUaOyw.js → vennDiagram-4TSXK5OY-ByKQXzaL.js} +1 -1
  284. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Dt9fBhlj.js → vennDiagram-4TSXK5OY-C4cLgb45.js} +1 -1
  285. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CrE30dtz.js → vennDiagram-4TSXK5OY-CRiS0wYe.js} +1 -1
  286. package/dist-embed/chunks/{vi-VN-M7AON7JQ-T0aYX7Py.js → vi-VN-M7AON7JQ-B8B39qmP.js} +1 -1
  287. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-CsR-8GhP.js → wardleyDiagram-VM6X3IG4-BbgqGTmD.js} +1 -1
  288. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-6HRbbvDt.js → wardleyDiagram-VM6X3IG4-CLayLpj4.js} +1 -1
  289. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-AvAVDPLG.js → wardleyDiagram-VM6X3IG4-CnxCRlDr.js} +1 -1
  290. package/dist-embed/chunks/{xychartDiagram-3f383b91-C09F8RkF.js → xychartDiagram-3f383b91-zh1CmS72.js} +1 -1
  291. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CkZtbHvK.js → xychartDiagram-S5SC5T6Z-CYJl0Gtl.js} +1 -1
  292. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-VWPR98LV.js → xychartDiagram-S5SC5T6Z-CoRCml5l.js} +1 -1
  293. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-ZZD1fZ1L.js → xychartDiagram-S5SC5T6Z-RhhCg-yn.js} +1 -1
  294. package/dist-embed/chunks/{zh-CN-LNUGB5OW-CpDHeCAz.js → zh-CN-LNUGB5OW-OOkUvmDB.js} +1 -1
  295. package/dist-embed/chunks/{zh-HK-E62DVLB3-B5Kmyhoq.js → zh-HK-E62DVLB3-r2T4uQQz.js} +1 -1
  296. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-D-Gvp4EC.js → zh-TW-RAJ6MFWO-CVJ2FptU.js} +1 -1
  297. package/dist-embed/datalayer-app-main.js +206 -61
  298. package/lib/apps/Application.d.ts +1 -1
  299. package/lib/apps/Application.js +4 -0
  300. package/lib/apps/agentUiPlugins.d.ts +1 -1
  301. package/lib/apps/agentUiPlugins.js +1 -1
  302. package/lib/apps/apps/AppRenderer.d.ts +7 -0
  303. package/lib/apps/apps/AppRenderer.js +21 -2
  304. package/lib/apps/apps/appspec.js +7 -1
  305. package/lib/apps/core/index.d.ts +33 -1
  306. package/lib/apps/core/index.js +15 -0
  307. package/lib/apps/plugins/chat/ChatView.js +3 -0
  308. package/lib/apps/plugins/trip-budget/index.d.ts +1 -1
  309. package/lib/apps/plugins/trip-budget/read.d.ts +1 -1
  310. package/lib/apps/plugins/trip-budget/read.js +1 -1
  311. package/lib/apps/plugins/trip-itinerary/index.d.ts +1 -1
  312. package/lib/apps/plugins/trip-itinerary/read.d.ts +1 -1
  313. package/lib/apps/plugins/trip-itinerary/read.js +1 -1
  314. package/lib/apps/plugins/trip-options/index.d.ts +1 -1
  315. package/lib/apps/plugins/trip-options/read.d.ts +1 -1
  316. package/lib/apps/plugins/trip-options/read.js +1 -1
  317. package/lib/apps/plugins/trip-summary/index.d.ts +1 -1
  318. package/lib/apps/shell/LeftPanel.d.ts +85 -0
  319. package/lib/apps/shell/LeftPanel.js +138 -0
  320. package/lib/apps/shell/LoopWorkspace.js +27 -2
  321. package/lib/apps/shell/index.d.ts +1 -0
  322. package/lib/apps/shell/index.js +1 -0
  323. package/lib/chat/Chat.d.ts +1 -1
  324. package/lib/chat/Chat.js +2 -2
  325. package/lib/chat/assistant/SpeechBalloon.d.ts +4 -2
  326. package/lib/chat/assistant/SpeechBalloon.js +3 -1
  327. package/lib/chat/base/ChatBase.js +2 -1
  328. package/lib/chat/header/ChatHeaderBase.d.ts +7 -1
  329. package/lib/chat/header/ChatHeaderBase.js +2 -2
  330. package/lib/specs/actions.js +2 -2
  331. package/lib/specs/agentPresentations.d.ts +26 -0
  332. package/lib/specs/agentPresentations.js +64 -0
  333. package/lib/specs/agents/agents.d.ts +1 -1
  334. package/lib/specs/agents/agents.js +118 -106
  335. package/lib/specs/apps.d.ts +6 -6
  336. package/lib/specs/apps.js +98 -46
  337. package/lib/specs/appspecSchema.js +7 -0
  338. package/lib/specs/backendTools.js +3 -3
  339. package/lib/specs/mcpServers.js +1 -1
  340. package/lib/types/agentspecs.d.ts +15 -0
  341. package/lib/types/chat.d.ts +12 -0
  342. package/package.json +1 -1
  343. package/scripts/codegen/generate_agents.py +93 -2
  344. package/dist-embed/chunks/index.esm-CjezntnN.js +0 -1
@@ -1 +1 @@
1
- import{bE as He,bG as Ze,fg as qe,fh as Ke,r as ce,j as U,T as $e,B as he,v as Ye,fa as Je,fi as Qe,fj as et}from"../datalayer-app-main.js";import{q as tt,t as nt,r as rt,B as be,s as st,v as fe,z as se,w as it,x as ot,y as lt,A as at,D as ft,E as dt,j as ct,S as ut,k as ht,l as gt,m as pt}from"./SheetTabs-DJG69znU.js";var z=Uint8Array,re=Uint16Array,mt=Int32Array,ze=new z([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Pe=new z([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wt=new z([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),je=function(e,t){for(var s=new re(31),n=0;n<31;++n)s[n]=t+=1<<e[n-1];for(var r=new mt(s[30]),n=1;n<30;++n)for(var o=s[n];o<s[n+1];++o)r[o]=o-s[n]<<5|n;return{b:s,r}},Le=je(ze,2),_e=Le.b,vt=Le.r;_e[28]=258,vt[258]=28;var xt=je(Pe,0),bt=xt.b,ye=new re(32768);for(var T=0;T<32768;++T){var q=(T&43690)>>1|(T&21845)<<1;q=(q&52428)>>2|(q&13107)<<2,q=(q&61680)>>4|(q&3855)<<4,ye[T]=((q&65280)>>8|(q&255)<<8)>>1}var ie=(function(e,t,s){for(var n=e.length,r=0,o=new re(t);r<n;++r)e[r]&&++o[e[r]-1];var l=new re(t);for(r=1;r<t;++r)l[r]=l[r-1]+o[r-1]<<1;var f;if(s){f=new re(1<<t);var g=15-t;for(r=0;r<n;++r)if(e[r])for(var u=r<<4|e[r],p=t-e[r],i=l[e[r]-1]++<<p,c=i|(1<<p)-1;i<=c;++i)f[ye[i]>>g]=u}else for(f=new re(n),r=0;r<n;++r)e[r]&&(f[r]=ye[l[e[r]-1]++]>>15-e[r]);return f}),le=new z(288);for(var T=0;T<144;++T)le[T]=8;for(var T=144;T<256;++T)le[T]=9;for(var T=256;T<280;++T)le[T]=7;for(var T=280;T<288;++T)le[T]=8;var Be=new z(32);for(var T=0;T<32;++T)Be[T]=5;var yt=ie(le,9,1),Ct=ie(Be,5,1),ge=function(e){for(var t=e[0],s=1;s<e.length;++s)e[s]>t&&(t=e[s]);return t},j=function(e,t,s){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&s},pe=function(e,t){var s=t/8|0;return(e[s]|e[s+1]<<8|e[s+2]<<16)>>(t&7)},St=function(e){return(e+7)/8|0},Se=function(e,t,s){return(t==null||t<0)&&(t=0),(s==null||s>e.length)&&(s=e.length),new z(e.subarray(t,s))},At=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],O=function(e,t,s){var n=new Error(t||At[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,O),!s)throw n;return n},kt=function(e,t,s,n){var r=e.length,o=n?n.length:0;if(!r||t.f&&!t.l)return s||new z(0);var l=!s,f=l||t.i!=2,g=t.i;l&&(s=new z(r*3));var u=function(Ae){var ke=s.length;if(Ae>ke){var Te=new z(Math.max(ke*2,Ae));Te.set(s),s=Te}},p=t.f||0,i=t.p||0,c=t.b||0,v=t.l,b=t.d,d=t.m,a=t.n,w=r*8;do{if(!v){p=j(e,i,1);var x=j(e,i+1,3);if(i+=3,x)if(x==1)v=yt,b=Ct,d=9,a=5;else if(x==2){var N=j(e,i,31)+257,L=j(e,i+10,15)+4,G=N+j(e,i+5,31)+1;i+=14;for(var _=new z(G),H=new z(19),h=0;h<L;++h)H[wt[h]]=j(e,i+h*3,7);i+=L*3;for(var k=ge(H),C=(1<<k)-1,m=ie(H,k,1),h=0;h<G;){var E=m[j(e,i,C)];i+=E&15;var y=E>>4;if(y<16)_[h++]=y;else{var R=0,S=0;for(y==16?(S=3+j(e,i,3),i+=2,R=_[h-1]):y==17?(S=3+j(e,i,7),i+=3):y==18&&(S=11+j(e,i,127),i+=7);S--;)_[h++]=R}}var M=_.subarray(0,N),I=_.subarray(N);d=ge(M),a=ge(I),v=ie(M,d,1),b=ie(I,a,1)}else O(1);else{var y=St(i)+4,$=e[y-4]|e[y-3]<<8,A=y+$;if(A>r){g&&O(0);break}f&&u(c+$),s.set(e.subarray(y,A),c),t.b=c+=$,t.p=i=A*8,t.f=p;continue}if(i>w){g&&O(0);break}}f&&u(c+131072);for(var D=(1<<d)-1,B=(1<<a)-1,K=i;;K=i){var R=v[pe(e,i)&D],X=R>>4;if(i+=R&15,i>w){g&&O(0);break}if(R||O(2),X<256)s[c++]=X;else if(X==256){K=i,v=null;break}else{var Q=X-254;if(X>264){var h=X-257,Z=ze[h];Q=j(e,i,(1<<Z)-1)+_e[h],i+=Z}var ee=b[pe(e,i)&B],Y=ee>>4;ee||O(3),i+=ee&15;var I=bt[Y];if(Y>3){var Z=Pe[Y];I+=pe(e,i)&(1<<Z)-1,i+=Z}if(i>w){g&&O(0);break}f&&u(c+131072);var te=c+Q;if(c<I){var ae=o-I,Ve=Math.min(I,te);for(ae+c<0&&O(3);c<Ve;++c)s[c]=n[ae+c]}for(;c<te;++c)s[c]=s[c-I]}}t.l=v,t.p=K,t.b=c,t.f=p,v&&(p=1,t.m=d,t.d=b,t.n=a)}while(!p);return c!=s.length&&l?Se(s,0,c):s.subarray(0,c)},Tt=new z(0),F=function(e,t){return e[t]|e[t+1]<<8},P=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},me=function(e,t){return P(e,t)+P(e,t+4)*4294967296};function $t(e,t){return kt(e,{i:2},t&&t.out,t&&t.dictionary)}var Ce=typeof TextDecoder<"u"&&new TextDecoder,Rt=0;try{Ce.decode(Tt,{stream:!0}),Rt=1}catch{}var Dt=function(e){for(var t="",s=0;;){var n=e[s++],r=(n>127)+(n>223)+(n>239);if(s+r>e.length)return{s:t,r:Se(e,s-1)};r?r==3?(n=((n&15)<<18|(e[s++]&63)<<12|(e[s++]&63)<<6|e[s++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):r&1?t+=String.fromCharCode((n&31)<<6|e[s++]&63):t+=String.fromCharCode((n&15)<<12|(e[s++]&63)<<6|e[s++]&63):t+=String.fromCharCode(n)}};function Fe(e,t){if(t){for(var s="",n=0;n<e.length;n+=16384)s+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return s}else{if(Ce)return Ce.decode(e);var r=Dt(e),o=r.s,s=r.r;return s.length&&O(8),o}}var Et=function(e,t){return t+30+F(e,t+26)+F(e,t+28)},Mt=function(e,t,s){var n=F(e,t+28),r=F(e,t+30),o=Fe(e.subarray(t+46,t+46+n),!(F(e,t+8)&2048)),l=t+46+n,f=It(e,l,r,s,P(e,t+20),P(e,t+24),P(e,t+42)),g=f[0],u=f[1],p=f[2];return[F(e,t+10),g,u,o,l+r+F(e,t+32),p]},It=function(e,t,s,n,r,o,l){var f=r==4294967295,g=o==4294967295,u=l==4294967295,p=t+s,i=f+g+u;if(n&&i){for(;t+4<p;t+=4+F(e,t+2))if(F(e,t)==1)return[f?me(e,t+4+8*g):r,g?me(e,t+4):o,u?me(e,t+4+8*(g+f)):l,1];n<2&&O(13)}return[r,o,l,0]};function Nt(e,t){for(var s={},n=e.length-22;P(e,n)!=101010256;--n)(!n||e.length-n>65558)&&O(13);var r=F(e,n+8);if(!r)return{};var o=P(e,n+16),l=P(e,n-20)==117853008;if(l){var f=P(e,n-12);l=P(e,f)==101075792,l&&(r=P(e,f+32),o=P(e,f+48))}for(var g=0;g<r;++g){var u=Mt(e,o,l),p=u[0],i=u[1],c=u[2],v=u[3],b=u[4],d=u[5],a=Et(e,d);o=b,p?p==8?s[v]=$t(e.subarray(a,a+i),{out:new z(c)}):O(14,"unknown compression type "+p):s[v]=Se(e,a,a+i)}return s}const Ot={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yyyy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yyyy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},Re=/<(\/?)([A-Za-z_][\w:.-]*)((?:\s+[^\s=>/]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|<\?[\s\S]*?\?>|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<![^>]*>|([^<]+)/g,De=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,zt={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};function oe(e){return e.includes("&")?e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-z]+);/g,(t,s)=>{if(s[0]==="#"){const n=s[1]==="x"?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return String.fromCodePoint(n)}return zt[s]??t}):e}const We=e=>{const t=e.indexOf(":");return t<0?e:e.slice(t+1)};function Pt(e){const t={};if(e==="")return t;De.lastIndex=0;let s;for(;(s=De.exec(e))!==null;)t[We(s[1])]=oe(s[2]??s[3]??"");return t}function V(e,t){Re.lastIndex=0;let s;for(;(s=Re.exec(e))!==null;)if(s[2]!==void 0){const n=We(s[2]);if(s[1]==="/")t.close?.(n);else{const r=s[4]==="/";t.open?.(n,Pt(s[3]),r),r&&t.close?.(n)}}else s[5]!==void 0?t.text?.(s[5]):s[6]!==void 0&&t.text?.(oe(s[6]))}const jt=9525,ne=e=>Math.round(Number(e??0)/jt);function Lt(e){const t=e.join("");return t===""?void 0:t}const Ee=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","ofPieChart","scatterChart","radarChart","bubbleChart","stockChart","surfaceChart","surface3DChart"]),Ge=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","scatterChart"]);function _t(e){const t={autoTitleDeleted:!1,groups:[],axes:[],pivot:!1,undrawn:[]},s=[];let n,r,o,l,f,g="",u=0;const p=i=>s.includes(i);return V(e,{open(i,c){if(s.push(i),Ee.has(i)&&p("plotArea")){n={element:i,series:[],axIds:[]},t.groups.push(n),Ge.has(i)||t.undrawn.push(i);return}if(i==="pivotSource"&&(t.pivot=!0),i==="autoTitleDeleted"&&(t.autoTitleDeleted=c.val==="1"||c.val==="true"),i==="legendPos"&&(t.legend=c.val),i==="dispBlanksAs"&&(t.dispBlanksAs=c.val),i==="title"&&!p("ser")){u+=1,l=[],f=o!==void 0&&p(o.element)?"axisTitle":"title";return}if(n!==void 0&&!p("ser")&&(i==="barDir"?n.barDir=c.val:i==="grouping"?n.grouping=c.val:i==="holeSize"?n.holeSize=!0:i==="axId"?n.axIds.push(c.val):i==="showVal"&&p("dLbls")&&(n.showVal=c.val==="1"||c.val==="true")),i==="ser"&&n!==void 0){r={idx:1e9,literal:!1,dPt:0,trendline:0,errBars:0,external:!1},n.series.push(r);return}if(r!==void 0&&(i==="idx"&&!p("dPt")&&!p("dLbl")?r.idx=Number(c.val):i==="tx"?f="name":i==="val"||i==="yVal"?f="values":i==="cat"?f="categories":i==="xVal"?f="x":i==="f"?g="":i==="numLit"||i==="strLit"?r.literal=!0:i==="dPt"&&n!==void 0&&!n.element.startsWith("pie")&&n.element!=="doughnutChart"?r.dPt+=1:i==="trendline"?r.trendline+=1:i==="errBars"?r.errBars+=1:i==="smooth"?r.smooth=c.val!=="0"&&c.val!=="false":i==="srgbClr"&&p("spPr")&&p("solidFill")&&!p("dPt")&&r.color===void 0?r.color=`#${c.val.toLowerCase()}`:i==="v"&&f==="name"&&p("tx")&&!p("strRef")&&(l=[])),(i==="catAx"||i==="valAx"||i==="dateAx"||i==="serAx")&&p("plotArea")){o={element:i,id:"",gridlines:!1,deleted:!1},t.axes.push(o);return}o!==void 0&&p(o.element)&&(i==="axId"?o.id=c.val:i==="min"?o.min=Number(c.val):i==="max"?o.max=Number(c.val):i==="logBase"?o.log=!0:i==="majorGridlines"?o.gridlines=!0:i==="numFmt"&&c.formatCode!==void 0&&c.formatCode!=="General"&&c.sourceLinked!=="1"&&c.sourceLinked!=="true"?o.format=c.formatCode:i==="delete"&&(o.deleted=c.val==="1"||c.val==="true"))},text(i){p("f")?g+=i:l!==void 0&&(p("t")||p("v")&&f==="name")&&l.push(i)},close(i){if(s.pop(),i==="f"&&r!==void 0&&f!==void 0&&f!=="title"&&f!=="axisTitle"){const c=g.trim();/^\[/.test(c)||/'\[/.test(c)?r.external=!0:r[f]=c}if(i==="v"&&r!==void 0&&f==="name"&&l!==void 0&&!p("strRef")&&(r.name=l.join(""),l=void 0),(i==="tx"||i==="val"||i==="yVal"||i==="cat"||i==="xVal")&&r!==void 0&&(f=void 0),i==="title"&&u>0){u-=1;const c=Lt(l??[]);f==="axisTitle"&&o!==void 0?o.title=c:f==="title"&&(t.title=c),l=void 0,f=void 0}i==="ser"&&(r=void 0),Ee.has(i)&&(n=void 0),(i==="catAx"||i==="valAx"||i==="dateAx"||i==="serAx")&&(o=void 0)}}),t}const Bt={t:"top",r:"right",b:"bottom",l:"left",tr:"right"},we=e=>e;function Ft(e,t,s,n,r){const o=`${n}: chart '${t}'`;if(e.pivot){r.push(`${o}: a pivot chart was not imported.`);return}for(const h of e.undrawn)r.push(`${o}: a ${h.replace(/Chart$/,"")} chart was not imported.`);const l=e.groups.filter(h=>Ge.has(h.element));if(l.length===0){e.undrawn.length===0&&r.push(`${o}: no chart that Cells draws.`);return}const f=l.filter(h=>h.element.includes("3D")),g=h=>{switch(h.element){case"barChart":case"bar3DChart":return h.barDir==="bar"?"bar":"column";case"lineChart":case"line3DChart":return"line";case"areaChart":case"area3DChart":return"area";case"pieChart":case"pie3DChart":case"doughnutChart":return"pie";default:return"scatter"}},u=e.axes.filter(h=>h.element==="valAx"),p=u[0],c=l.every(h=>h.element==="scatterChart")?void 0:u.find(h=>h!==p&&l.some(k=>k.axIds.includes(h.id))),v=e.axes.find(h=>h.element==="catAx"||h.element==="dateAx"||h.element==="valAx"&&l.every(k=>k.element==="scatterChart")&&h===p),b=l.length>1;let d=b?"combo":g(l[0]);if(b&&l.some(h=>h.element.startsWith("pie")||h.element==="doughnutChart"||h.element==="scatterChart")){d=g(l[0]);for(const h of l.slice(1))r.push(`${o}: a second plot (${h.element.replace(/Chart$/,"")}) beside a ${d} chart was not imported.`);l.length=1}f.length>0&&r.push(`${o}: a 3-D chart was imported as a ${d} chart.`);let a;const w=l[0];w.element==="doughnutChart"?a="doughnut":w.grouping==="stacked"?a="stacked":w.grouping==="percentStacked"?a="percent":(w.element==="lineChart"||w.element==="line3DChart")&&w.series.some(h=>h.smooth)&&(a="smooth");const x=[],y=[],$=[];for(const h of l){const k=g(h),C=c!==void 0&&h.axIds.includes(c.id);for(const m of h.series){if(m.values===void 0){y.push(m.external?"a series naming another workbook":m.literal?"a series given as literals":"a series without values");continue}m.literal&&r.push(`${o}: literal categories or names of a series were left out.`),m.dPt>0&&r.push(`${o}: ${m.dPt} per-point colour(s) were left out.`),m.trendline>0&&r.push(`${o}: ${m.trendline} trendline(s) were left out.`),m.errBars>0&&r.push(`${o}: error bars were left out.`),$.push([m.idx,{values:we(m.values),...m.name!==void 0?{name:m.name}:{},...m.categories!==void 0?{categories:we(m.categories)}:{},...m.x!==void 0?{x:we(m.x)}:{},...b?{type:k==="column"||k==="bar"?"column":k==="area"?"area":"line"}:{},...C?{axis:"secondary"}:{},...m.color!==void 0?{color:m.color}:{}}])}}$.sort((h,k)=>h[0]-k[0]);for(const[,h]of $)x.push(h);for(const h of y)r.push(`${o}: ${h} was not imported.`);if(x.length===0){r.push(`${o}: no series to draw.`);return}const A=h=>{if(h===void 0)return;const k=h.element==="valAx",C={...h.title!==void 0?{title:h.title}:{},...h.min!==void 0?{min:h.min}:{},...h.max!==void 0?{max:h.max}:{},...h.format!==void 0?{format:h.format}:{},...h.log?{log:!0}:{},...k&&!h.gridlines?{gridlines:!1}:{},...!k&&h.gridlines?{gridlines:!0}:{}};return Object.keys(C).length===0?void 0:C},N=A(v),L=A(d==="scatter"?u[1]??p:p),G=A(c),_=N!==void 0||L!==void 0||G!==void 0?{...N!==void 0?{x:N}:{},...L!==void 0?{y:L}:{},...G!==void 0?{y2:G}:{}}:void 0,H=x.length>1&&x.every(h=>{const k=/\$?([A-Z]+)\$?(\d+):\$?([A-Z]+)\$?(\d+)$/.exec(h.values);return k!==null&&k[2]===k[4]&&k[1]!==k[3]});return{id:t,type:d,...a!==void 0?{variant:a}:{},anchor:s,data:{series:x,by:H?"rows":"columns",headers:{row:x.some(h=>h.name!==void 0),column:x.some(h=>h.categories!==void 0)},blanks:e.dispBlanksAs==="zero"?"zero":e.dispBlanksAs==="span"?"connect":"gap"},...e.title!==void 0?{title:e.title}:{},legend:e.legend!==void 0?Bt[e.legend]??"bottom":"none",..._!==void 0?{axes:_}:{},...l.some(h=>h.showVal)?{labels:!0}:{}}}function Wt(e){const t=[];let s,n,r,o,l,f,g,u=!1,p,i={col:0,colOff:0,row:0,rowOff:0},c,v="";const b=()=>{if(s===void 0)return;let d;s==="twoCellAnchor"&&n!==void 0&&r!==void 0?d={kind:"cells",from:n,to:r}:s==="oneCellAnchor"&&n!==void 0&&l!==void 0?d={kind:"cell",from:n,width:Math.max(1,l.width),height:Math.max(1,l.height)}:s==="absoluteAnchor"&&o!==void 0&&l!==void 0&&(d={kind:"absolute",...o,width:Math.max(1,l.width),height:Math.max(1,l.height)}),d!==void 0&&t.push({anchor:d,chart:f,chartEx:g,picture:u}),s=void 0,n=r=o=l=f=g=void 0,u=!1};return V(e,{open(d,a){d==="twoCellAnchor"||d==="oneCellAnchor"||d==="absoluteAnchor"?s=d:d==="from"||d==="to"?(p=d,i={col:0,colOff:0,row:0,rowOff:0}):d==="col"||d==="colOff"||d==="row"||d==="rowOff"?(c=d,v=""):d==="pos"?o={x:ne(a.x),y:ne(a.y)}:d==="ext"&&s!==void 0&&a.cx!==void 0&&l===void 0?l={width:ne(a.cx),height:ne(a.cy)}:d==="chart"?(f===void 0&&(f=a.id),a.id===void 0&&(f=f??"missing")):d==="pic"&&(u=!0)},text(d){c!==void 0&&(v+=d)},close(d){if(d==="col"||d==="colOff"||d==="row"||d==="rowOff")i[d]=Number(v.trim()),c=void 0;else if(d==="from"||d==="to"){const a={row:i.row,col:i.col,dx:ne(String(i.colOff)),dy:ne(String(i.rowOff))};p==="from"?n=a:r=a,p=void 0}else(d==="twoCellAnchor"||d==="oneCellAnchor"||d==="absoluteAnchor")&&b()}}),t}function Me(e){const t=new Map;return e===void 0||V(e,{open(s,n){s==="Relationship"&&n.Id!==void 0&&n.Target!==void 0&&t.set(n.Id,{target:n.Target,type:n.Type??""})}}),t}function ve(e,t){if(t.startsWith("/"))return t.slice(1);const s=e.split("/").slice(0,-1);for(const n of t.split("/"))n===".."?s.pop():n!=="."&&s.push(n);return s.join("/")}function Gt(e,t,s,n,r){const o={},l=t.split("/").slice(0,-1).join("/"),f=t.split("/").pop(),u=Me(e(`${l}/_rels/${f}.rels`)).get(s);if(u===void 0)return r.push(`${n}: the drawing part is missing.`),o;const p=ve(t,u.target),i=e(p);if(i===void 0)return r.push(`${n}: the drawing part ${p} is missing.`),o;const c=p.split("/").slice(0,-1).join("/"),v=p.split("/").pop(),b=Me(e(`${c}/_rels/${v}.rels`));let d=0;for(const a of Wt(i)){if(a.chart===void 0)continue;const w=b.get(a.chart);if(w===void 0){r.push(`${n}: a chart's part is missing (${a.chart}).`);continue}d+=1;const x=`chart${d}`;if(/chartEx/i.test(w.type)||/chartEx/.test(w.target)){const A=e(ve(p,w.target))??"",N=/<cx:layoutId val="([^"]+)"/.exec(A)?.[1]??"unknown";r.push(`${n}: chart '${x}': an Excel 2016 chart (${N}) was not imported.`);continue}const y=e(ve(p,w.target));if(y===void 0){r.push(`${n}: chart '${x}': its part ${w.target} is missing.`);continue}const $=Ft(_t(y),x,a.anchor,n,r);$!==void 0&&(o[x]=$)}return o}const Xe="customXml/cells-code.xml";function Xt(e){let t=0;for(const s of e)t=t*26+(s.charCodeAt(0)-64);return t-1}function ue(e){const t=/^\$?([A-Z]{1,3})\$?([0-9]+)$/.exec(e);if(t===null)throw new Error(`'${e}' is not a cell reference.`);return{row:Number(t[2])-1,col:Xt(t[1])}}function Ut(e){const[t,s=t]=e.split(":"),n=ue(t),r=ue(s);return{top:Math.min(n.row,r.row),left:Math.min(n.col,r.col),bottom:Math.max(n.row,r.row),right:Math.max(n.col,r.col)}}function xe(e){const t=e?.rgb;if(!(t===void 0||!/^[0-9A-Fa-f]{6,8}$/.test(t)))return`#${t.slice(-6).toLowerCase()}`}const Vt={thin:"thin",hair:"thin",medium:"medium",thick:"thick",dashed:"dashed",mediumDashed:"dashed",dashDot:"dashed",mediumDashDot:"dashed",dashDotDot:"dotted",mediumDashDotDot:"dotted",slantDashDot:"dashed",dotted:"dotted",double:"double"};function Ht(e){if(e===void 0)return[{}];const t=new Map,s=[],n=[],r=[],o=[],l=new Map;let f="",g,u,p,i,c,v;V(e,{open(d,a){switch(d){case"numFmts":case"fonts":case"fills":case"borders":case"cellXfs":case"cellStyleXfs":case"dxfs":f=d;return;case"numFmt":f==="numFmts"&&t.set(Number(a.numFmtId),a.formatCode??"General");return}if(f==="fonts")d==="font"?g={}:g!==void 0&&(d==="b"?g.bold=a.val!=="0"&&a.val!=="false":d==="i"?g.italic=a.val!=="0"&&a.val!=="false":d==="u"?g.underline=a.val!=="none":d==="strike"?g.strike=a.val!=="0"&&a.val!=="false":d==="sz"?g.size=Number(a.val):d==="color"?g.color=xe(a):d==="name"&&(g.font=a.val));else if(f==="fills")d==="fill"?u={}:d==="patternFill"&&u?u.pattern=a.patternType:d==="fgColor"&&u&&(u.color=xe(a));else if(f==="borders")d==="border"?p={}:p!==void 0&&["left","right","top","bottom"].includes(d)?i={name:d,style:a.style===void 0?void 0:Vt[a.style]}:d==="color"&&i!==void 0&&i.style!==void 0&&(p[i.name]={style:i.style,color:xe(a)??"#000000"});else if(f==="cellXfs"){if(d==="xf"){const w=Number(a.numFmtId??0),x=s[Number(a.fontId??0)]??{};v=x;const y=n[Number(a.fillId??0)],$=r[Number(a.borderId??0)],A=w===0?void 0:(t.get(w)??Ot[w])?.replace(/^\[\$-(409|en-US)\]/,"");c={...x.bold?{bold:!0}:{},...x.italic?{italic:!0}:{},...x.underline?{underline:!0}:{},...x.strike?{strike:!0}:{},...x.color!==void 0&&x.color!=="#000000"?{color:x.color}:{},...y!==void 0?{fill:y}:{},...$!==void 0&&Object.keys($).length>0?{borders:$}:{},...A!==void 0&&A!=="General"?{format:A}:{}}}else if(d==="alignment"&&c!==void 0){const w=a.horizontal,x=a.vertical;c={...c,...w==="left"||w==="center"||w==="right"?{align:w}:{},...x==="top"?{valign:"top"}:x==="center"?{valign:"middle"}:{},...a.wrapText==="1"||a.wrapText==="true"?{wrap:!0}:{}}}}},close(d){d===f?f="":d==="font"&&g!==void 0?(s.push(g),g=void 0):d==="fill"&&u!==void 0?(n.push(u.pattern==="solid"?u.color:void 0),u=void 0):d==="border"&&p!==void 0?(r.push(p),p=void 0):["left","right","top","bottom"].includes(d)?i=void 0:d==="xf"&&c!==void 0&&f==="cellXfs"&&(o.push(c),v!==void 0&&l.set(c,v),c=void 0)}});const b=s[0]??{};return o.map((d,a)=>{if(a===0)return{};const w=l.get(d);return w===void 0?d:{...d,...w.size!==void 0&&w.size!==b.size?{size:w.size}:{},...w.font!==void 0&&w.font!==b.font?{font:w.font}:{}}})}function Zt(e){const t=[];if(e===void 0)return t;let s,n=!1,r=!1;return V(e,{open(o){o==="si"?s="":o==="t"?n=!r:o==="rPh"&&(r=!0)},close(o){o==="si"?(t.push(s??""),s=void 0):o==="t"?n=!1:o==="rPh"&&(r=!1)},text(o){n&&s!==void 0&&(s+=o)}}),t}const qt=e=>Math.round(e*7+5),Ie=e=>Math.round(e*4/3);function Kt(e,t,s){const n={},r={},o={},l=[],f=[],g=[];let u,p;const i=new Map;let c=0,v=0,b,d="n",a=0,w,x,y,$="",A,N=0,L=0;const G=(C,m,E,R,S,M,I)=>{const D={};if(M?.t==="shared"&&M.si!==void 0)if(S!==void 0&&S!=="")i.set(M.si,{formula:S,...C});else{const B=i.get(M.si);B!==void 0&&(S=nt(B.formula,C.row-B.row,C.col-B.col))}else M?.t==="array"&&s.set("array formula",(s.get("array formula")??0)+1);if(S!==void 0&&S!==""&&(D.f=S,v+=1),m==="s"&&R!==void 0?D.v=t[Number(R)]??"":m==="b"&&R!==void 0?D.v=R==="1":m==="e"&&R!==void 0?D.v=rt(R)?{error:R}:{error:"#VALUE!"}:(m==="str"||m==="inlineStr")&&(R!==void 0||I!=="")?D.v=m==="inlineStr"?I:R??"":R!==void 0&&R!==""&&(D.v=Number(R)),E!==0&&(D.s=E),D.v!==void 0||D.f!==void 0||D.s!==void 0){const B=String(C.row);(n[B]??={cells:{}}).cells[String(C.col)]=D,c+=1}},_=C=>{const m=/<(?:\w+:)?row\s([^>]*?)\/?>/g;let E;for(;(E=m.exec(C))!==null;){const S=E[1],M=/\br="(\d+)"/.exec(S);if(M===null)continue;const I=Number(M[1])-1,D=/\bht="([^"]+)"/.exec(S);D!==null&&/\bcustomHeight="(1|true)"/.test(S)&&(r[String(I)]=Ie(Number(D[1]))),/\bhidden="(1|true)"/.test(S)&&l.push(I)}const R=/<(?:\w+:)?c\s([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?c>)/g;for(;(E=R.exec(C))!==null;){const S=E[1],M=E[2]??"",I=ue(/\br="([^"]+)"/.exec(S)[1]),D=/\bt="([^"]+)"/.exec(S)?.[1]??"n",B=Number(/\bs="(\d+)"/.exec(S)?.[1]??0);let K,X,Q,Z="";if(M!==""){const ee=/<(?:\w+:)?v>([\s\S]*?)<\/(?:\w+:)?v>/.exec(M);ee!==null?K=oe(ee[1]):/<(?:\w+:)?v\/>/.test(M)&&(K="");const Y=/<(?:\w+:)?f\b([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?f>)/.exec(M);if(Y!==null){Q={};for(const[,te,ae]of Y[1].matchAll(/(\w+)="([^"]*)"/g))Q[te]=ae;X=oe(Y[2]??"")}if(D==="inlineStr")for(const[,te]of M.matchAll(/<(?:\w+:)?t(?:\s[^>]*)?>([\s\S]*?)<\/(?:\w+:)?t>/g))Z+=oe(te)}G(I,D,B,K,X,Q,Z)}};let H=e;const h=/<(?:\w+:)?sheetData\b[^>]*>/.exec(e),k=h===null?-1:e.search(/<\/(?:\w+:)?sheetData>/);return h!==null&&k>h.index&&!/<(?:\w+:)?c(?=[\s>/])(?![^>]*\sr=)/.test(e)&&(_(e.slice(h.index+h[0].length,k)),H=e.slice(0,h.index)+e.slice(k)),V(H,{open(C,m){switch(C){case"row":{const E=m.r===void 0?N:Number(m.r)-1;N=E+1,L=0,m.ht!==void 0&&(m.customHeight==="1"||m.customHeight==="true")&&(r[String(E)]=Ie(Number(m.ht))),(m.hidden==="1"||m.hidden==="true")&&l.push(E);return}case"c":{b=m.r===void 0?{row:N-1,col:L}:ue(m.r),L=b.col+1,d=m.t??"n",a=Number(m.s??0),w=void 0,x=void 0,y=void 0,$="";return}case"v":A="v",w="";return;case"f":A="f",x="",y=m;return;case"is":A="is";return;case"col":{const E=Number(m.min)-1,R=Math.min(Number(m.max)-1,16383);for(let S=E;S<=R;S+=1)m.width!==void 0&&(m.customWidth==="1"||m.customWidth==="true")&&(o[String(S)]=qt(Number(m.width))),(m.hidden==="1"||m.hidden==="true")&&f.push(S);return}case"mergeCell":m.ref!==void 0&&g.push(Ut(m.ref));return;case"pane":(m.state==="frozen"||m.state==="frozenSplit")&&(u={rows:Number(m.ySplit??0),cols:Number(m.xSplit??0)});return;case"drawing":p=m.id;return;case"conditionalFormatting":case"dataValidation":case"hyperlink":case"legacyDrawing":case"tablePart":case"sheetProtection":case"autoFilter":s.set(C,(s.get(C)??0)+1);return}},text(C){A==="v"?w+=C:A==="f"?x+=C:A==="is"&&($+=C)},close(C){if(C==="v"||C==="f"||C==="is"){A=void 0;return}C!=="c"||b===void 0||(G(b,d,a,w,x,y,$),b=void 0)}}),{sheet:{rows:n,...Object.keys(r).length+Object.keys(o).length>0?{sizes:{rows:r,cols:o}}:{},...l.length+f.length>0?{hidden:{rows:l,cols:f}}:{},...g.length>0?{merges:g}:{},...u!==void 0?{frozen:u}:{}},cells:c,formulas:v,...p!==void 0?{drawing:p}:{}}}function Yt(e){return e.startsWith("/")?e.slice(1):`xl/${e}`.replace(/\/[^/]+\/\.\.\//g,"/")}function Jt(e){let t;try{t=Nt(e)}catch(a){throw new Error(`The file is not an XLSX package: ${a.message}`)}const s=a=>t[a]===void 0?void 0:Fe(t[a]),n=s("xl/workbook.xml");if(n===void 0)throw new Error("The package has no xl/workbook.xml.");const r=new Map;V(s("xl/_rels/workbook.xml.rels")??"",{open(a,w){a==="Relationship"&&w.Id!==void 0&&w.Target!==void 0&&r.set(w.Id,Yt(w.Target))}});const o=[],l=new Map;V(n,{open(a,w){if(a==="sheet"){const x=r.get(w.id);if(x===void 0)throw new Error(`The sheet '${w.name}' has no part.`);o.push({name:w.name,path:x,hidden:w.state==="hidden"||w.state==="veryHidden"})}else a==="definedName"&&l.set("defined name",(l.get("defined name")??0)+1)}});const f=Zt(s("xl/sharedStrings.xml")),g=Ht(s("xl/styles.xml"));let u=0,p=0,i=0;const c=[],v=new Set,b=o.map((a,w)=>{const x=s(a.path);if(x===void 0)throw new Error(`The sheet '${a.name}' has no ${a.path}.`);a.hidden&&l.set("hidden sheet (shown)",(l.get("hidden sheet (shown)")??0)+1);const y=Kt(x,f,l);u+=y.cells,p+=y.formulas;let $=`s${w+1}`;for(;v.has($);)$+="_";v.add($);const A=y.drawing===void 0?{}:Gt(s,a.path,y.drawing,a.name,c);return i+=Object.keys(A).length,{id:$,name:a.name,...y.sheet,...Object.keys(A).length>0?{charts:A}:{}}}),d=Qt(s(Xe),b);for(const a of Object.keys(t))/^xl\/chartsheets\/sheet\d+\.xml$/.test(a)?c.push(`${a}: a chart sheet was not imported.`):a.startsWith("xl/media/")?l.set("image",(l.get("image")??0)+1):/^xl\/comments\d*\.xml$/.test(a)||a.startsWith("xl/threadedComments/")?l.set("comments",(l.get("comments")??0)+1):a.startsWith("xl/pivotTables/")&&l.set("pivot table",(l.get("pivot table")??0)+1);for(const a of b)for(const w of Object.values(a.rows))for(const x of Object.values(w.cells))x.s!==void 0&&x.s>=g.length&&delete x.s;return{workbook:{version:1,sheets:b,styles:g.length>0?g:[{}]},report:{sheets:b.length,cells:u,formulas:p,skipped:[...l].map(([a,w])=>({feature:a,count:w})),chartsImported:i,charts:c,code:d}}}function Qt(e,t){if(e===void 0)return[];const s=new Map(t.map(g=>[g.name,g])),n=new Map;let r=0,o,l="",f=!1;V(e,{open(g,u){if(g==="cell"){const p=s.get(u.sheet??"");o=p===void 0?void 0:{sheet:p,ref:u.ref??"",attrs:u},l=""}else g==="source"&&(f=!0)},text(g){f&&(l+=g)},close(g){if(g==="source"&&(f=!1),g!=="cell"||o===void 0)return;const{sheet:u,ref:p,attrs:i}=o,c=/^([A-Z]{1,3})([1-9][0-9]*)$/.exec(p);if(c===null)return;let v=-1;for(const w of c[1])v=(v+1)*26+w.charCodeAt(0)-65;const b=u.rows[String(Number(c[2])-1)]?.cells[String(v)]?.v,d={source:l,language:"python",outputs:[],result:b===void 0?null:b,run:i.run==="auto"?"auto":"manual",...i.executionCount!==void 0?{executionCount:Number(i.executionCount)}:{},...i.lastRun!==void 0?{lastRun:i.lastRun}:{},...i.frame==="none"?{frame:null}:i.frameWidth!==void 0&&i.frameHeight!==void 0?{frame:{width:Number(i.frameWidth),height:Number(i.frameHeight),...i.frameDx!==void 0?{dx:Number(i.frameDx)}:{},...i.frameDy!==void 0?{dy:Number(i.frameDy)}:{}}}:{}};if(tt(d)!==void 0)return;let a=n.get(u);a===void 0&&n.set(u,a={}),a[p]=d,r+=1,o=void 0}});for(const[g,u]of n)g.code=u;return r===0?[]:[`${r} code cell${r===1?"":"s"} read from ${Xe}: the sources and the results, as cached values; the outputs are not in XLSX and were dropped.`]}function en(e,t){const s=e.sheet(t).cells;let n=0,r=0;for(const o of s.columnIndexes()){const l=s.lastRowIn(o);l>=0&&(n=Math.max(n,o),r=Math.max(r,l))}return{top:0,left:0,bottom:r,right:n}}const W={readRange:"cells.agent.readRange",writeRange:"cells.agent.writeRange",insertChart:"cells.agent.insertChart",listCharts:"cells.agent.listCharts",selectRange:"cells.agent.selectRange"},tn=2e3,de={type:"string",description:"A range in A1 notation on the sheet shown, such as `A1:D13`, or one cell such as `B3`."},Ne=Ke({id:"cells",version:"0.0.1",name:"Cells",description:"Read and write the spreadsheet on the person's screen, and chart it: the grid drawn by Datalayer Cells.",plugin:"@datalayer/cells",commands:[{name:"cells_read_range",command:W.readRange,description:"The values of a range of the spreadsheet shown, row by row. Without a range, the whole used range from A1, which is how to find where the data is: the answer names the sheet and the range read. Numbers are numbers, empty cells null.",parameters:{type:"object",properties:{range:de}}},{name:"cells_write_range",command:W.writeRange,description:"Write a block of values, row by row, from the top-left cell of a range. A text starting with = is a formula (=SUM(B2:B13)); numbers, booleans and null (an empty cell) are written as they are. One undo step.",parameters:{type:"object",properties:{range:{...de,description:"Where the block starts: its top-left cell, such as `E1`, or a range whose top-left cell it is."},values:{type:"array",description:"The rows to write, each an array of cells: number, string, boolean or null.",items:{type:"array",items:{type:["number","string","boolean","null"]}}}},required:["range","values"]}},{name:"cells_insert_chart",command:W.insertChart,description:"Insert a chart of a range into the spreadsheet shown, as the Insert chart button does: the series are read from the range (a first row of names and a first column of categories become the legend and the axis). It is drawn over the grid, beside the range unless `at` says where; the answer gives its id.",parameters:{type:"object",properties:{range:{...de,description:"The data to chart, headers included, such as `A1:D13`."},type:{type:"string",enum:[...be],description:"The chart type; column by default."},title:{type:"string",description:"The title drawn above the chart."},at:{type:"string",description:"The cell where the chart's top-left corner goes, such as `A15` (below the data) or `F1`."}},required:["range"]}},{name:"cells_list_charts",command:W.listCharts,description:"The charts of the sheet shown: id, type, title and the ranges each reads."},{name:"cells_select_range",command:W.selectRange,description:"Select a range of the spreadsheet shown, to show the person the cells meant.",parameters:{type:"object",properties:{range:de},required:["range"]}}]}),J=(e,t)=>{if(typeof e!="string"||e.trim()==="")throw new Error(`${t} is a non-empty string.`);return e},Oe=e=>{if(!e.ok)throw new Error(e.refusals.map(t=>t.message).join(" "))};function nn(e,t){const s=e.sheet(t).cells;let n=-1,r=-1;for(const o of s.columnIndexes()){const l=s.lastRowIn(o);l<0||(n=Math.max(n,o),r=Math.max(r,l))}return n<0?null:{top:0,left:0,bottom:r,right:n}}const rn=e=>e!==null&&typeof e=="object"?`#${e.error.replace(/^#/,"")}`:e,sn=e=>{if(e==null)return null;if(typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return e.startsWith("=")?ft(e):e;throw new Error(`A cell is a number, a string, a boolean or null, not ${JSON.stringify(e)}.`)};function Ue(e={}){const t=n=>e.model?.()??st(n,void 0).model,s=(n,r,o)=>({id:n,name:r,category:"Cells",execute:l=>o(t(n),l??{})});return He({name:e.name??on,displayName:"Cells agent tools",description:"Read, write, chart and select the grid on screen, as tools an agent calls.",octicon:"table",commands:[s(W.readRange,"Read a range",(n,r)=>{const o=n.selection.sheet,l=r.range===void 0?nn(n,o):fe(J(r.range,"The range"));if(l===null)return{sheet:n.sheet(o).name,range:null,values:[]};const f=l.right-l.left+1,g=Math.max(1,Math.min(l.bottom-l.top+1,Math.floor(tn/f))),u={...l,bottom:l.top+g-1};return{sheet:n.sheet(o).name,range:se(u),values:n.toRows(u,o).map(p=>p.map(rn)),...u.bottom<l.bottom?{truncated:!0,fullRange:se(l)}:{}}}),s(W.writeRange,"Write values into a range",(n,r)=>{const o=fe(J(r.range,"The range"));if(!Array.isArray(r.values)||r.values.length===0||!r.values.every(Array.isArray))throw new Error("The values are a non-empty array of rows, each an array of cells.");const l=n.selection.sheet,f=r.values.map(u=>u.map(sn));Oe(n.dispatch({type:"SET_CELLS",sheet:l,at:{row:o.top,col:o.left},cells:f}));const g=Math.max(...f.map(u=>u.length));return{ok:!0,sheet:n.sheet(l).name,range:se({top:o.top,left:o.left,bottom:o.top+f.length-1,right:o.left+Math.max(0,g-1)})}}),s(W.insertChart,"Insert a chart of a range",(n,r)=>{const o=fe(J(r.range,"The range")),l=r.type===void 0?"column":J(r.type,"The type");if(!be.includes(l))throw new Error(`'${l}' is not a chart type; there are ${be.join(", ")}.`);const f=n.selection.sheet,g=it((v,b)=>n.value(f,v,b),n.sheet(f).name,o,(v,b)=>/[dmy]/i.test(n.style(f,v,b).format??""));if(!g.ok)throw new Error(g.message);let u=ot(n,o);if(r.at!==void 0&&u.kind==="cells"){const v=lt(J(r.at,"Where the chart goes")),b=u.to.row-u.from.row,d=u.to.col-u.from.col;u={kind:"cells",from:{row:v.row,col:v.col,dx:0,dy:0},to:{row:v.row+b,col:v.col+d,dx:0,dy:0}}}const p=new Set(n.sheet(f).charts.keys()),i=r.title===void 0?void 0:J(r.title,"The title");Oe(n.dispatch({type:"INSERT_CHART",sheet:f,chart:{type:l,anchor:u,data:g.data,legend:"bottom",...i?{title:i}:{}}}));const c=[...n.sheet(f).charts.keys()].find(v=>!p.has(v));return c!==void 0&&n.selectChart(c),{ok:!0,chartId:c,sheet:n.sheet(f).name,range:se(o),type:l}}),s(W.listCharts,"List the charts",n=>{const r=n.selection.sheet;return{sheet:n.sheet(r).name,charts:[...n.sheet(r).charts.values()].map(o=>({id:o.id,type:o.type,...o.title?{title:o.title}:{},ranges:at(o)}))}}),s(W.selectRange,"Select a range",(n,r)=>{const o=fe(J(r.range,"The range")),l=n.selection.sheet,f={row:o.top,col:o.left};return n.select({sheet:l,zones:[o],anchor:f,active:f}),{ok:!0,sheet:n.sheet(l).name,range:se(o)}})],contributes:[Ze(qe,Ne,{id:Ne.id})]})}const on="@datalayer/cells-agent-tools";Ue();function ln(){}const an=40;function fn(e,t=160,s=560){const[n,r]=ce.useState(t);return ce.useEffect(()=>{if(!e)return;const o=()=>{const l=e.sheet(e.selection.sheet);let f=l.rows.offsetOf(en(e,l.id).bottom+1);for(const g of l.charts.values()){const u=dt(l,g);f=Math.max(f,u.y+u.height)}r(Math.min(s,Math.max(t,Math.ceil(f)+an)))};return o(),e.subscribe(o)},[e,t,s]),n}Ue({model:ln,name:"@datalayer/loop-plugin-agent-outputs-sheet-tools"});async function dn(e){const t=await et(e),{workbook:s}=Jt(t);return{model:gt({data:s,readOnly:!0,codeCells:!1,plugins:[pt]}),bytes:t}}function hn({data:e,name:t,maxHeight:s}){const[n,r]=ce.useState({model:null,bytes:null,error:""});ce.useEffect(()=>{let f=!1;return dn(e).then(({model:g,bytes:u})=>!f&&r({model:g,bytes:u,error:""}),g=>!f&&r({model:null,bytes:null,error:g instanceof Error?g.message:String(g)})),()=>{f=!0}},[e]);const o=fn(n.model,160,s);if(n.error)return U.jsxs($e,{sx:{color:"danger.fg",fontSize:0},children:["Could not read the spreadsheet: ",n.error]});if(!n.model)return U.jsx($e,{as:"p",sx:{color:"fg.muted",fontSize:0,m:0},children:"Reading the spreadsheet…"});const l=n.model.sheets.length>1;return U.jsxs(ct,{model:n.model,children:[U.jsxs(he,{"data-spreadsheet-preview-sheets":n.model.sheets.length,border:"1px solid",borderColor:"border.muted",borderRadius:2,overflow:"hidden",children:[U.jsx(he,{height:o,children:U.jsx(ut,{model:n.model,"aria-label":`${t}, read-only`})}),l?U.jsx(ht,{"aria-label":`The sheets of ${t}`}):null]}),U.jsx(he,{mt:1,children:U.jsxs(Ye,{size:"small",variant:"invisible",leadingVisual:Je,onClick:()=>n.bytes&&Qe(n.bytes,t),children:["Download ",t]})})]})}export{hn as SpreadsheetPreviewView,hn as default,dn as readOnlyWorkbook};
1
+ import{bE as He,bG as Ze,fg as qe,fh as Ke,r as ce,j as U,T as $e,B as he,v as Ye,fa as Je,fi as Qe,fj as et}from"../datalayer-app-main.js";import{q as tt,t as nt,r as rt,B as be,s as st,v as fe,z as se,w as it,x as ot,y as lt,A as at,D as ft,E as dt,j as ct,S as ut,k as ht,l as gt,m as pt}from"./SheetTabs-PG3DQn2N.js";var z=Uint8Array,re=Uint16Array,mt=Int32Array,ze=new z([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Pe=new z([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),wt=new z([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),je=function(e,t){for(var s=new re(31),n=0;n<31;++n)s[n]=t+=1<<e[n-1];for(var r=new mt(s[30]),n=1;n<30;++n)for(var o=s[n];o<s[n+1];++o)r[o]=o-s[n]<<5|n;return{b:s,r}},Le=je(ze,2),_e=Le.b,vt=Le.r;_e[28]=258,vt[258]=28;var xt=je(Pe,0),bt=xt.b,ye=new re(32768);for(var T=0;T<32768;++T){var q=(T&43690)>>1|(T&21845)<<1;q=(q&52428)>>2|(q&13107)<<2,q=(q&61680)>>4|(q&3855)<<4,ye[T]=((q&65280)>>8|(q&255)<<8)>>1}var ie=(function(e,t,s){for(var n=e.length,r=0,o=new re(t);r<n;++r)e[r]&&++o[e[r]-1];var l=new re(t);for(r=1;r<t;++r)l[r]=l[r-1]+o[r-1]<<1;var f;if(s){f=new re(1<<t);var g=15-t;for(r=0;r<n;++r)if(e[r])for(var u=r<<4|e[r],p=t-e[r],i=l[e[r]-1]++<<p,c=i|(1<<p)-1;i<=c;++i)f[ye[i]>>g]=u}else for(f=new re(n),r=0;r<n;++r)e[r]&&(f[r]=ye[l[e[r]-1]++]>>15-e[r]);return f}),le=new z(288);for(var T=0;T<144;++T)le[T]=8;for(var T=144;T<256;++T)le[T]=9;for(var T=256;T<280;++T)le[T]=7;for(var T=280;T<288;++T)le[T]=8;var Be=new z(32);for(var T=0;T<32;++T)Be[T]=5;var yt=ie(le,9,1),Ct=ie(Be,5,1),ge=function(e){for(var t=e[0],s=1;s<e.length;++s)e[s]>t&&(t=e[s]);return t},j=function(e,t,s){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(t&7)&s},pe=function(e,t){var s=t/8|0;return(e[s]|e[s+1]<<8|e[s+2]<<16)>>(t&7)},St=function(e){return(e+7)/8|0},Se=function(e,t,s){return(t==null||t<0)&&(t=0),(s==null||s>e.length)&&(s=e.length),new z(e.subarray(t,s))},At=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],O=function(e,t,s){var n=new Error(t||At[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,O),!s)throw n;return n},kt=function(e,t,s,n){var r=e.length,o=n?n.length:0;if(!r||t.f&&!t.l)return s||new z(0);var l=!s,f=l||t.i!=2,g=t.i;l&&(s=new z(r*3));var u=function(Ae){var ke=s.length;if(Ae>ke){var Te=new z(Math.max(ke*2,Ae));Te.set(s),s=Te}},p=t.f||0,i=t.p||0,c=t.b||0,v=t.l,b=t.d,d=t.m,a=t.n,w=r*8;do{if(!v){p=j(e,i,1);var x=j(e,i+1,3);if(i+=3,x)if(x==1)v=yt,b=Ct,d=9,a=5;else if(x==2){var N=j(e,i,31)+257,L=j(e,i+10,15)+4,G=N+j(e,i+5,31)+1;i+=14;for(var _=new z(G),H=new z(19),h=0;h<L;++h)H[wt[h]]=j(e,i+h*3,7);i+=L*3;for(var k=ge(H),C=(1<<k)-1,m=ie(H,k,1),h=0;h<G;){var E=m[j(e,i,C)];i+=E&15;var y=E>>4;if(y<16)_[h++]=y;else{var R=0,S=0;for(y==16?(S=3+j(e,i,3),i+=2,R=_[h-1]):y==17?(S=3+j(e,i,7),i+=3):y==18&&(S=11+j(e,i,127),i+=7);S--;)_[h++]=R}}var M=_.subarray(0,N),I=_.subarray(N);d=ge(M),a=ge(I),v=ie(M,d,1),b=ie(I,a,1)}else O(1);else{var y=St(i)+4,$=e[y-4]|e[y-3]<<8,A=y+$;if(A>r){g&&O(0);break}f&&u(c+$),s.set(e.subarray(y,A),c),t.b=c+=$,t.p=i=A*8,t.f=p;continue}if(i>w){g&&O(0);break}}f&&u(c+131072);for(var D=(1<<d)-1,B=(1<<a)-1,K=i;;K=i){var R=v[pe(e,i)&D],X=R>>4;if(i+=R&15,i>w){g&&O(0);break}if(R||O(2),X<256)s[c++]=X;else if(X==256){K=i,v=null;break}else{var Q=X-254;if(X>264){var h=X-257,Z=ze[h];Q=j(e,i,(1<<Z)-1)+_e[h],i+=Z}var ee=b[pe(e,i)&B],Y=ee>>4;ee||O(3),i+=ee&15;var I=bt[Y];if(Y>3){var Z=Pe[Y];I+=pe(e,i)&(1<<Z)-1,i+=Z}if(i>w){g&&O(0);break}f&&u(c+131072);var te=c+Q;if(c<I){var ae=o-I,Ve=Math.min(I,te);for(ae+c<0&&O(3);c<Ve;++c)s[c]=n[ae+c]}for(;c<te;++c)s[c]=s[c-I]}}t.l=v,t.p=K,t.b=c,t.f=p,v&&(p=1,t.m=d,t.d=b,t.n=a)}while(!p);return c!=s.length&&l?Se(s,0,c):s.subarray(0,c)},Tt=new z(0),F=function(e,t){return e[t]|e[t+1]<<8},P=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},me=function(e,t){return P(e,t)+P(e,t+4)*4294967296};function $t(e,t){return kt(e,{i:2},t&&t.out,t&&t.dictionary)}var Ce=typeof TextDecoder<"u"&&new TextDecoder,Rt=0;try{Ce.decode(Tt,{stream:!0}),Rt=1}catch{}var Dt=function(e){for(var t="",s=0;;){var n=e[s++],r=(n>127)+(n>223)+(n>239);if(s+r>e.length)return{s:t,r:Se(e,s-1)};r?r==3?(n=((n&15)<<18|(e[s++]&63)<<12|(e[s++]&63)<<6|e[s++]&63)-65536,t+=String.fromCharCode(55296|n>>10,56320|n&1023)):r&1?t+=String.fromCharCode((n&31)<<6|e[s++]&63):t+=String.fromCharCode((n&15)<<12|(e[s++]&63)<<6|e[s++]&63):t+=String.fromCharCode(n)}};function Fe(e,t){if(t){for(var s="",n=0;n<e.length;n+=16384)s+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return s}else{if(Ce)return Ce.decode(e);var r=Dt(e),o=r.s,s=r.r;return s.length&&O(8),o}}var Et=function(e,t){return t+30+F(e,t+26)+F(e,t+28)},Mt=function(e,t,s){var n=F(e,t+28),r=F(e,t+30),o=Fe(e.subarray(t+46,t+46+n),!(F(e,t+8)&2048)),l=t+46+n,f=It(e,l,r,s,P(e,t+20),P(e,t+24),P(e,t+42)),g=f[0],u=f[1],p=f[2];return[F(e,t+10),g,u,o,l+r+F(e,t+32),p]},It=function(e,t,s,n,r,o,l){var f=r==4294967295,g=o==4294967295,u=l==4294967295,p=t+s,i=f+g+u;if(n&&i){for(;t+4<p;t+=4+F(e,t+2))if(F(e,t)==1)return[f?me(e,t+4+8*g):r,g?me(e,t+4):o,u?me(e,t+4+8*(g+f)):l,1];n<2&&O(13)}return[r,o,l,0]};function Nt(e,t){for(var s={},n=e.length-22;P(e,n)!=101010256;--n)(!n||e.length-n>65558)&&O(13);var r=F(e,n+8);if(!r)return{};var o=P(e,n+16),l=P(e,n-20)==117853008;if(l){var f=P(e,n-12);l=P(e,f)==101075792,l&&(r=P(e,f+32),o=P(e,f+48))}for(var g=0;g<r;++g){var u=Mt(e,o,l),p=u[0],i=u[1],c=u[2],v=u[3],b=u[4],d=u[5],a=Et(e,d);o=b,p?p==8?s[v]=$t(e.subarray(a,a+i),{out:new z(c)}):O(14,"unknown compression type "+p):s[v]=Se(e,a,a+i)}return s}const Ot={0:"General",1:"0",2:"0.00",3:"#,##0",4:"#,##0.00",9:"0%",10:"0.00%",11:"0.00E+00",12:"# ?/?",13:"# ??/??",14:"m/d/yyyy",15:"d-mmm-yy",16:"d-mmm",17:"mmm-yy",18:"h:mm AM/PM",19:"h:mm:ss AM/PM",20:"h:mm",21:"h:mm:ss",22:"m/d/yyyy h:mm",37:"#,##0 ;(#,##0)",38:"#,##0 ;[Red](#,##0)",39:"#,##0.00;(#,##0.00)",40:"#,##0.00;[Red](#,##0.00)",45:"mm:ss",46:"[h]:mm:ss",47:"mmss.0",48:"##0.0E+0",49:"@"},Re=/<(\/?)([A-Za-z_][\w:.-]*)((?:\s+[^\s=>/]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|<\?[\s\S]*?\?>|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<![^>]*>|([^<]+)/g,De=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,zt={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};function oe(e){return e.includes("&")?e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-z]+);/g,(t,s)=>{if(s[0]==="#"){const n=s[1]==="x"?parseInt(s.slice(2),16):parseInt(s.slice(1),10);return String.fromCodePoint(n)}return zt[s]??t}):e}const We=e=>{const t=e.indexOf(":");return t<0?e:e.slice(t+1)};function Pt(e){const t={};if(e==="")return t;De.lastIndex=0;let s;for(;(s=De.exec(e))!==null;)t[We(s[1])]=oe(s[2]??s[3]??"");return t}function V(e,t){Re.lastIndex=0;let s;for(;(s=Re.exec(e))!==null;)if(s[2]!==void 0){const n=We(s[2]);if(s[1]==="/")t.close?.(n);else{const r=s[4]==="/";t.open?.(n,Pt(s[3]),r),r&&t.close?.(n)}}else s[5]!==void 0?t.text?.(s[5]):s[6]!==void 0&&t.text?.(oe(s[6]))}const jt=9525,ne=e=>Math.round(Number(e??0)/jt);function Lt(e){const t=e.join("");return t===""?void 0:t}const Ee=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","ofPieChart","scatterChart","radarChart","bubbleChart","stockChart","surfaceChart","surface3DChart"]),Ge=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","scatterChart"]);function _t(e){const t={autoTitleDeleted:!1,groups:[],axes:[],pivot:!1,undrawn:[]},s=[];let n,r,o,l,f,g="",u=0;const p=i=>s.includes(i);return V(e,{open(i,c){if(s.push(i),Ee.has(i)&&p("plotArea")){n={element:i,series:[],axIds:[]},t.groups.push(n),Ge.has(i)||t.undrawn.push(i);return}if(i==="pivotSource"&&(t.pivot=!0),i==="autoTitleDeleted"&&(t.autoTitleDeleted=c.val==="1"||c.val==="true"),i==="legendPos"&&(t.legend=c.val),i==="dispBlanksAs"&&(t.dispBlanksAs=c.val),i==="title"&&!p("ser")){u+=1,l=[],f=o!==void 0&&p(o.element)?"axisTitle":"title";return}if(n!==void 0&&!p("ser")&&(i==="barDir"?n.barDir=c.val:i==="grouping"?n.grouping=c.val:i==="holeSize"?n.holeSize=!0:i==="axId"?n.axIds.push(c.val):i==="showVal"&&p("dLbls")&&(n.showVal=c.val==="1"||c.val==="true")),i==="ser"&&n!==void 0){r={idx:1e9,literal:!1,dPt:0,trendline:0,errBars:0,external:!1},n.series.push(r);return}if(r!==void 0&&(i==="idx"&&!p("dPt")&&!p("dLbl")?r.idx=Number(c.val):i==="tx"?f="name":i==="val"||i==="yVal"?f="values":i==="cat"?f="categories":i==="xVal"?f="x":i==="f"?g="":i==="numLit"||i==="strLit"?r.literal=!0:i==="dPt"&&n!==void 0&&!n.element.startsWith("pie")&&n.element!=="doughnutChart"?r.dPt+=1:i==="trendline"?r.trendline+=1:i==="errBars"?r.errBars+=1:i==="smooth"?r.smooth=c.val!=="0"&&c.val!=="false":i==="srgbClr"&&p("spPr")&&p("solidFill")&&!p("dPt")&&r.color===void 0?r.color=`#${c.val.toLowerCase()}`:i==="v"&&f==="name"&&p("tx")&&!p("strRef")&&(l=[])),(i==="catAx"||i==="valAx"||i==="dateAx"||i==="serAx")&&p("plotArea")){o={element:i,id:"",gridlines:!1,deleted:!1},t.axes.push(o);return}o!==void 0&&p(o.element)&&(i==="axId"?o.id=c.val:i==="min"?o.min=Number(c.val):i==="max"?o.max=Number(c.val):i==="logBase"?o.log=!0:i==="majorGridlines"?o.gridlines=!0:i==="numFmt"&&c.formatCode!==void 0&&c.formatCode!=="General"&&c.sourceLinked!=="1"&&c.sourceLinked!=="true"?o.format=c.formatCode:i==="delete"&&(o.deleted=c.val==="1"||c.val==="true"))},text(i){p("f")?g+=i:l!==void 0&&(p("t")||p("v")&&f==="name")&&l.push(i)},close(i){if(s.pop(),i==="f"&&r!==void 0&&f!==void 0&&f!=="title"&&f!=="axisTitle"){const c=g.trim();/^\[/.test(c)||/'\[/.test(c)?r.external=!0:r[f]=c}if(i==="v"&&r!==void 0&&f==="name"&&l!==void 0&&!p("strRef")&&(r.name=l.join(""),l=void 0),(i==="tx"||i==="val"||i==="yVal"||i==="cat"||i==="xVal")&&r!==void 0&&(f=void 0),i==="title"&&u>0){u-=1;const c=Lt(l??[]);f==="axisTitle"&&o!==void 0?o.title=c:f==="title"&&(t.title=c),l=void 0,f=void 0}i==="ser"&&(r=void 0),Ee.has(i)&&(n=void 0),(i==="catAx"||i==="valAx"||i==="dateAx"||i==="serAx")&&(o=void 0)}}),t}const Bt={t:"top",r:"right",b:"bottom",l:"left",tr:"right"},we=e=>e;function Ft(e,t,s,n,r){const o=`${n}: chart '${t}'`;if(e.pivot){r.push(`${o}: a pivot chart was not imported.`);return}for(const h of e.undrawn)r.push(`${o}: a ${h.replace(/Chart$/,"")} chart was not imported.`);const l=e.groups.filter(h=>Ge.has(h.element));if(l.length===0){e.undrawn.length===0&&r.push(`${o}: no chart that Cells draws.`);return}const f=l.filter(h=>h.element.includes("3D")),g=h=>{switch(h.element){case"barChart":case"bar3DChart":return h.barDir==="bar"?"bar":"column";case"lineChart":case"line3DChart":return"line";case"areaChart":case"area3DChart":return"area";case"pieChart":case"pie3DChart":case"doughnutChart":return"pie";default:return"scatter"}},u=e.axes.filter(h=>h.element==="valAx"),p=u[0],c=l.every(h=>h.element==="scatterChart")?void 0:u.find(h=>h!==p&&l.some(k=>k.axIds.includes(h.id))),v=e.axes.find(h=>h.element==="catAx"||h.element==="dateAx"||h.element==="valAx"&&l.every(k=>k.element==="scatterChart")&&h===p),b=l.length>1;let d=b?"combo":g(l[0]);if(b&&l.some(h=>h.element.startsWith("pie")||h.element==="doughnutChart"||h.element==="scatterChart")){d=g(l[0]);for(const h of l.slice(1))r.push(`${o}: a second plot (${h.element.replace(/Chart$/,"")}) beside a ${d} chart was not imported.`);l.length=1}f.length>0&&r.push(`${o}: a 3-D chart was imported as a ${d} chart.`);let a;const w=l[0];w.element==="doughnutChart"?a="doughnut":w.grouping==="stacked"?a="stacked":w.grouping==="percentStacked"?a="percent":(w.element==="lineChart"||w.element==="line3DChart")&&w.series.some(h=>h.smooth)&&(a="smooth");const x=[],y=[],$=[];for(const h of l){const k=g(h),C=c!==void 0&&h.axIds.includes(c.id);for(const m of h.series){if(m.values===void 0){y.push(m.external?"a series naming another workbook":m.literal?"a series given as literals":"a series without values");continue}m.literal&&r.push(`${o}: literal categories or names of a series were left out.`),m.dPt>0&&r.push(`${o}: ${m.dPt} per-point colour(s) were left out.`),m.trendline>0&&r.push(`${o}: ${m.trendline} trendline(s) were left out.`),m.errBars>0&&r.push(`${o}: error bars were left out.`),$.push([m.idx,{values:we(m.values),...m.name!==void 0?{name:m.name}:{},...m.categories!==void 0?{categories:we(m.categories)}:{},...m.x!==void 0?{x:we(m.x)}:{},...b?{type:k==="column"||k==="bar"?"column":k==="area"?"area":"line"}:{},...C?{axis:"secondary"}:{},...m.color!==void 0?{color:m.color}:{}}])}}$.sort((h,k)=>h[0]-k[0]);for(const[,h]of $)x.push(h);for(const h of y)r.push(`${o}: ${h} was not imported.`);if(x.length===0){r.push(`${o}: no series to draw.`);return}const A=h=>{if(h===void 0)return;const k=h.element==="valAx",C={...h.title!==void 0?{title:h.title}:{},...h.min!==void 0?{min:h.min}:{},...h.max!==void 0?{max:h.max}:{},...h.format!==void 0?{format:h.format}:{},...h.log?{log:!0}:{},...k&&!h.gridlines?{gridlines:!1}:{},...!k&&h.gridlines?{gridlines:!0}:{}};return Object.keys(C).length===0?void 0:C},N=A(v),L=A(d==="scatter"?u[1]??p:p),G=A(c),_=N!==void 0||L!==void 0||G!==void 0?{...N!==void 0?{x:N}:{},...L!==void 0?{y:L}:{},...G!==void 0?{y2:G}:{}}:void 0,H=x.length>1&&x.every(h=>{const k=/\$?([A-Z]+)\$?(\d+):\$?([A-Z]+)\$?(\d+)$/.exec(h.values);return k!==null&&k[2]===k[4]&&k[1]!==k[3]});return{id:t,type:d,...a!==void 0?{variant:a}:{},anchor:s,data:{series:x,by:H?"rows":"columns",headers:{row:x.some(h=>h.name!==void 0),column:x.some(h=>h.categories!==void 0)},blanks:e.dispBlanksAs==="zero"?"zero":e.dispBlanksAs==="span"?"connect":"gap"},...e.title!==void 0?{title:e.title}:{},legend:e.legend!==void 0?Bt[e.legend]??"bottom":"none",..._!==void 0?{axes:_}:{},...l.some(h=>h.showVal)?{labels:!0}:{}}}function Wt(e){const t=[];let s,n,r,o,l,f,g,u=!1,p,i={col:0,colOff:0,row:0,rowOff:0},c,v="";const b=()=>{if(s===void 0)return;let d;s==="twoCellAnchor"&&n!==void 0&&r!==void 0?d={kind:"cells",from:n,to:r}:s==="oneCellAnchor"&&n!==void 0&&l!==void 0?d={kind:"cell",from:n,width:Math.max(1,l.width),height:Math.max(1,l.height)}:s==="absoluteAnchor"&&o!==void 0&&l!==void 0&&(d={kind:"absolute",...o,width:Math.max(1,l.width),height:Math.max(1,l.height)}),d!==void 0&&t.push({anchor:d,chart:f,chartEx:g,picture:u}),s=void 0,n=r=o=l=f=g=void 0,u=!1};return V(e,{open(d,a){d==="twoCellAnchor"||d==="oneCellAnchor"||d==="absoluteAnchor"?s=d:d==="from"||d==="to"?(p=d,i={col:0,colOff:0,row:0,rowOff:0}):d==="col"||d==="colOff"||d==="row"||d==="rowOff"?(c=d,v=""):d==="pos"?o={x:ne(a.x),y:ne(a.y)}:d==="ext"&&s!==void 0&&a.cx!==void 0&&l===void 0?l={width:ne(a.cx),height:ne(a.cy)}:d==="chart"?(f===void 0&&(f=a.id),a.id===void 0&&(f=f??"missing")):d==="pic"&&(u=!0)},text(d){c!==void 0&&(v+=d)},close(d){if(d==="col"||d==="colOff"||d==="row"||d==="rowOff")i[d]=Number(v.trim()),c=void 0;else if(d==="from"||d==="to"){const a={row:i.row,col:i.col,dx:ne(String(i.colOff)),dy:ne(String(i.rowOff))};p==="from"?n=a:r=a,p=void 0}else(d==="twoCellAnchor"||d==="oneCellAnchor"||d==="absoluteAnchor")&&b()}}),t}function Me(e){const t=new Map;return e===void 0||V(e,{open(s,n){s==="Relationship"&&n.Id!==void 0&&n.Target!==void 0&&t.set(n.Id,{target:n.Target,type:n.Type??""})}}),t}function ve(e,t){if(t.startsWith("/"))return t.slice(1);const s=e.split("/").slice(0,-1);for(const n of t.split("/"))n===".."?s.pop():n!=="."&&s.push(n);return s.join("/")}function Gt(e,t,s,n,r){const o={},l=t.split("/").slice(0,-1).join("/"),f=t.split("/").pop(),u=Me(e(`${l}/_rels/${f}.rels`)).get(s);if(u===void 0)return r.push(`${n}: the drawing part is missing.`),o;const p=ve(t,u.target),i=e(p);if(i===void 0)return r.push(`${n}: the drawing part ${p} is missing.`),o;const c=p.split("/").slice(0,-1).join("/"),v=p.split("/").pop(),b=Me(e(`${c}/_rels/${v}.rels`));let d=0;for(const a of Wt(i)){if(a.chart===void 0)continue;const w=b.get(a.chart);if(w===void 0){r.push(`${n}: a chart's part is missing (${a.chart}).`);continue}d+=1;const x=`chart${d}`;if(/chartEx/i.test(w.type)||/chartEx/.test(w.target)){const A=e(ve(p,w.target))??"",N=/<cx:layoutId val="([^"]+)"/.exec(A)?.[1]??"unknown";r.push(`${n}: chart '${x}': an Excel 2016 chart (${N}) was not imported.`);continue}const y=e(ve(p,w.target));if(y===void 0){r.push(`${n}: chart '${x}': its part ${w.target} is missing.`);continue}const $=Ft(_t(y),x,a.anchor,n,r);$!==void 0&&(o[x]=$)}return o}const Xe="customXml/cells-code.xml";function Xt(e){let t=0;for(const s of e)t=t*26+(s.charCodeAt(0)-64);return t-1}function ue(e){const t=/^\$?([A-Z]{1,3})\$?([0-9]+)$/.exec(e);if(t===null)throw new Error(`'${e}' is not a cell reference.`);return{row:Number(t[2])-1,col:Xt(t[1])}}function Ut(e){const[t,s=t]=e.split(":"),n=ue(t),r=ue(s);return{top:Math.min(n.row,r.row),left:Math.min(n.col,r.col),bottom:Math.max(n.row,r.row),right:Math.max(n.col,r.col)}}function xe(e){const t=e?.rgb;if(!(t===void 0||!/^[0-9A-Fa-f]{6,8}$/.test(t)))return`#${t.slice(-6).toLowerCase()}`}const Vt={thin:"thin",hair:"thin",medium:"medium",thick:"thick",dashed:"dashed",mediumDashed:"dashed",dashDot:"dashed",mediumDashDot:"dashed",dashDotDot:"dotted",mediumDashDotDot:"dotted",slantDashDot:"dashed",dotted:"dotted",double:"double"};function Ht(e){if(e===void 0)return[{}];const t=new Map,s=[],n=[],r=[],o=[],l=new Map;let f="",g,u,p,i,c,v;V(e,{open(d,a){switch(d){case"numFmts":case"fonts":case"fills":case"borders":case"cellXfs":case"cellStyleXfs":case"dxfs":f=d;return;case"numFmt":f==="numFmts"&&t.set(Number(a.numFmtId),a.formatCode??"General");return}if(f==="fonts")d==="font"?g={}:g!==void 0&&(d==="b"?g.bold=a.val!=="0"&&a.val!=="false":d==="i"?g.italic=a.val!=="0"&&a.val!=="false":d==="u"?g.underline=a.val!=="none":d==="strike"?g.strike=a.val!=="0"&&a.val!=="false":d==="sz"?g.size=Number(a.val):d==="color"?g.color=xe(a):d==="name"&&(g.font=a.val));else if(f==="fills")d==="fill"?u={}:d==="patternFill"&&u?u.pattern=a.patternType:d==="fgColor"&&u&&(u.color=xe(a));else if(f==="borders")d==="border"?p={}:p!==void 0&&["left","right","top","bottom"].includes(d)?i={name:d,style:a.style===void 0?void 0:Vt[a.style]}:d==="color"&&i!==void 0&&i.style!==void 0&&(p[i.name]={style:i.style,color:xe(a)??"#000000"});else if(f==="cellXfs"){if(d==="xf"){const w=Number(a.numFmtId??0),x=s[Number(a.fontId??0)]??{};v=x;const y=n[Number(a.fillId??0)],$=r[Number(a.borderId??0)],A=w===0?void 0:(t.get(w)??Ot[w])?.replace(/^\[\$-(409|en-US)\]/,"");c={...x.bold?{bold:!0}:{},...x.italic?{italic:!0}:{},...x.underline?{underline:!0}:{},...x.strike?{strike:!0}:{},...x.color!==void 0&&x.color!=="#000000"?{color:x.color}:{},...y!==void 0?{fill:y}:{},...$!==void 0&&Object.keys($).length>0?{borders:$}:{},...A!==void 0&&A!=="General"?{format:A}:{}}}else if(d==="alignment"&&c!==void 0){const w=a.horizontal,x=a.vertical;c={...c,...w==="left"||w==="center"||w==="right"?{align:w}:{},...x==="top"?{valign:"top"}:x==="center"?{valign:"middle"}:{},...a.wrapText==="1"||a.wrapText==="true"?{wrap:!0}:{}}}}},close(d){d===f?f="":d==="font"&&g!==void 0?(s.push(g),g=void 0):d==="fill"&&u!==void 0?(n.push(u.pattern==="solid"?u.color:void 0),u=void 0):d==="border"&&p!==void 0?(r.push(p),p=void 0):["left","right","top","bottom"].includes(d)?i=void 0:d==="xf"&&c!==void 0&&f==="cellXfs"&&(o.push(c),v!==void 0&&l.set(c,v),c=void 0)}});const b=s[0]??{};return o.map((d,a)=>{if(a===0)return{};const w=l.get(d);return w===void 0?d:{...d,...w.size!==void 0&&w.size!==b.size?{size:w.size}:{},...w.font!==void 0&&w.font!==b.font?{font:w.font}:{}}})}function Zt(e){const t=[];if(e===void 0)return t;let s,n=!1,r=!1;return V(e,{open(o){o==="si"?s="":o==="t"?n=!r:o==="rPh"&&(r=!0)},close(o){o==="si"?(t.push(s??""),s=void 0):o==="t"?n=!1:o==="rPh"&&(r=!1)},text(o){n&&s!==void 0&&(s+=o)}}),t}const qt=e=>Math.round(e*7+5),Ie=e=>Math.round(e*4/3);function Kt(e,t,s){const n={},r={},o={},l=[],f=[],g=[];let u,p;const i=new Map;let c=0,v=0,b,d="n",a=0,w,x,y,$="",A,N=0,L=0;const G=(C,m,E,R,S,M,I)=>{const D={};if(M?.t==="shared"&&M.si!==void 0)if(S!==void 0&&S!=="")i.set(M.si,{formula:S,...C});else{const B=i.get(M.si);B!==void 0&&(S=nt(B.formula,C.row-B.row,C.col-B.col))}else M?.t==="array"&&s.set("array formula",(s.get("array formula")??0)+1);if(S!==void 0&&S!==""&&(D.f=S,v+=1),m==="s"&&R!==void 0?D.v=t[Number(R)]??"":m==="b"&&R!==void 0?D.v=R==="1":m==="e"&&R!==void 0?D.v=rt(R)?{error:R}:{error:"#VALUE!"}:(m==="str"||m==="inlineStr")&&(R!==void 0||I!=="")?D.v=m==="inlineStr"?I:R??"":R!==void 0&&R!==""&&(D.v=Number(R)),E!==0&&(D.s=E),D.v!==void 0||D.f!==void 0||D.s!==void 0){const B=String(C.row);(n[B]??={cells:{}}).cells[String(C.col)]=D,c+=1}},_=C=>{const m=/<(?:\w+:)?row\s([^>]*?)\/?>/g;let E;for(;(E=m.exec(C))!==null;){const S=E[1],M=/\br="(\d+)"/.exec(S);if(M===null)continue;const I=Number(M[1])-1,D=/\bht="([^"]+)"/.exec(S);D!==null&&/\bcustomHeight="(1|true)"/.test(S)&&(r[String(I)]=Ie(Number(D[1]))),/\bhidden="(1|true)"/.test(S)&&l.push(I)}const R=/<(?:\w+:)?c\s([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?c>)/g;for(;(E=R.exec(C))!==null;){const S=E[1],M=E[2]??"",I=ue(/\br="([^"]+)"/.exec(S)[1]),D=/\bt="([^"]+)"/.exec(S)?.[1]??"n",B=Number(/\bs="(\d+)"/.exec(S)?.[1]??0);let K,X,Q,Z="";if(M!==""){const ee=/<(?:\w+:)?v>([\s\S]*?)<\/(?:\w+:)?v>/.exec(M);ee!==null?K=oe(ee[1]):/<(?:\w+:)?v\/>/.test(M)&&(K="");const Y=/<(?:\w+:)?f\b([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?f>)/.exec(M);if(Y!==null){Q={};for(const[,te,ae]of Y[1].matchAll(/(\w+)="([^"]*)"/g))Q[te]=ae;X=oe(Y[2]??"")}if(D==="inlineStr")for(const[,te]of M.matchAll(/<(?:\w+:)?t(?:\s[^>]*)?>([\s\S]*?)<\/(?:\w+:)?t>/g))Z+=oe(te)}G(I,D,B,K,X,Q,Z)}};let H=e;const h=/<(?:\w+:)?sheetData\b[^>]*>/.exec(e),k=h===null?-1:e.search(/<\/(?:\w+:)?sheetData>/);return h!==null&&k>h.index&&!/<(?:\w+:)?c(?=[\s>/])(?![^>]*\sr=)/.test(e)&&(_(e.slice(h.index+h[0].length,k)),H=e.slice(0,h.index)+e.slice(k)),V(H,{open(C,m){switch(C){case"row":{const E=m.r===void 0?N:Number(m.r)-1;N=E+1,L=0,m.ht!==void 0&&(m.customHeight==="1"||m.customHeight==="true")&&(r[String(E)]=Ie(Number(m.ht))),(m.hidden==="1"||m.hidden==="true")&&l.push(E);return}case"c":{b=m.r===void 0?{row:N-1,col:L}:ue(m.r),L=b.col+1,d=m.t??"n",a=Number(m.s??0),w=void 0,x=void 0,y=void 0,$="";return}case"v":A="v",w="";return;case"f":A="f",x="",y=m;return;case"is":A="is";return;case"col":{const E=Number(m.min)-1,R=Math.min(Number(m.max)-1,16383);for(let S=E;S<=R;S+=1)m.width!==void 0&&(m.customWidth==="1"||m.customWidth==="true")&&(o[String(S)]=qt(Number(m.width))),(m.hidden==="1"||m.hidden==="true")&&f.push(S);return}case"mergeCell":m.ref!==void 0&&g.push(Ut(m.ref));return;case"pane":(m.state==="frozen"||m.state==="frozenSplit")&&(u={rows:Number(m.ySplit??0),cols:Number(m.xSplit??0)});return;case"drawing":p=m.id;return;case"conditionalFormatting":case"dataValidation":case"hyperlink":case"legacyDrawing":case"tablePart":case"sheetProtection":case"autoFilter":s.set(C,(s.get(C)??0)+1);return}},text(C){A==="v"?w+=C:A==="f"?x+=C:A==="is"&&($+=C)},close(C){if(C==="v"||C==="f"||C==="is"){A=void 0;return}C!=="c"||b===void 0||(G(b,d,a,w,x,y,$),b=void 0)}}),{sheet:{rows:n,...Object.keys(r).length+Object.keys(o).length>0?{sizes:{rows:r,cols:o}}:{},...l.length+f.length>0?{hidden:{rows:l,cols:f}}:{},...g.length>0?{merges:g}:{},...u!==void 0?{frozen:u}:{}},cells:c,formulas:v,...p!==void 0?{drawing:p}:{}}}function Yt(e){return e.startsWith("/")?e.slice(1):`xl/${e}`.replace(/\/[^/]+\/\.\.\//g,"/")}function Jt(e){let t;try{t=Nt(e)}catch(a){throw new Error(`The file is not an XLSX package: ${a.message}`)}const s=a=>t[a]===void 0?void 0:Fe(t[a]),n=s("xl/workbook.xml");if(n===void 0)throw new Error("The package has no xl/workbook.xml.");const r=new Map;V(s("xl/_rels/workbook.xml.rels")??"",{open(a,w){a==="Relationship"&&w.Id!==void 0&&w.Target!==void 0&&r.set(w.Id,Yt(w.Target))}});const o=[],l=new Map;V(n,{open(a,w){if(a==="sheet"){const x=r.get(w.id);if(x===void 0)throw new Error(`The sheet '${w.name}' has no part.`);o.push({name:w.name,path:x,hidden:w.state==="hidden"||w.state==="veryHidden"})}else a==="definedName"&&l.set("defined name",(l.get("defined name")??0)+1)}});const f=Zt(s("xl/sharedStrings.xml")),g=Ht(s("xl/styles.xml"));let u=0,p=0,i=0;const c=[],v=new Set,b=o.map((a,w)=>{const x=s(a.path);if(x===void 0)throw new Error(`The sheet '${a.name}' has no ${a.path}.`);a.hidden&&l.set("hidden sheet (shown)",(l.get("hidden sheet (shown)")??0)+1);const y=Kt(x,f,l);u+=y.cells,p+=y.formulas;let $=`s${w+1}`;for(;v.has($);)$+="_";v.add($);const A=y.drawing===void 0?{}:Gt(s,a.path,y.drawing,a.name,c);return i+=Object.keys(A).length,{id:$,name:a.name,...y.sheet,...Object.keys(A).length>0?{charts:A}:{}}}),d=Qt(s(Xe),b);for(const a of Object.keys(t))/^xl\/chartsheets\/sheet\d+\.xml$/.test(a)?c.push(`${a}: a chart sheet was not imported.`):a.startsWith("xl/media/")?l.set("image",(l.get("image")??0)+1):/^xl\/comments\d*\.xml$/.test(a)||a.startsWith("xl/threadedComments/")?l.set("comments",(l.get("comments")??0)+1):a.startsWith("xl/pivotTables/")&&l.set("pivot table",(l.get("pivot table")??0)+1);for(const a of b)for(const w of Object.values(a.rows))for(const x of Object.values(w.cells))x.s!==void 0&&x.s>=g.length&&delete x.s;return{workbook:{version:1,sheets:b,styles:g.length>0?g:[{}]},report:{sheets:b.length,cells:u,formulas:p,skipped:[...l].map(([a,w])=>({feature:a,count:w})),chartsImported:i,charts:c,code:d}}}function Qt(e,t){if(e===void 0)return[];const s=new Map(t.map(g=>[g.name,g])),n=new Map;let r=0,o,l="",f=!1;V(e,{open(g,u){if(g==="cell"){const p=s.get(u.sheet??"");o=p===void 0?void 0:{sheet:p,ref:u.ref??"",attrs:u},l=""}else g==="source"&&(f=!0)},text(g){f&&(l+=g)},close(g){if(g==="source"&&(f=!1),g!=="cell"||o===void 0)return;const{sheet:u,ref:p,attrs:i}=o,c=/^([A-Z]{1,3})([1-9][0-9]*)$/.exec(p);if(c===null)return;let v=-1;for(const w of c[1])v=(v+1)*26+w.charCodeAt(0)-65;const b=u.rows[String(Number(c[2])-1)]?.cells[String(v)]?.v,d={source:l,language:"python",outputs:[],result:b===void 0?null:b,run:i.run==="auto"?"auto":"manual",...i.executionCount!==void 0?{executionCount:Number(i.executionCount)}:{},...i.lastRun!==void 0?{lastRun:i.lastRun}:{},...i.frame==="none"?{frame:null}:i.frameWidth!==void 0&&i.frameHeight!==void 0?{frame:{width:Number(i.frameWidth),height:Number(i.frameHeight),...i.frameDx!==void 0?{dx:Number(i.frameDx)}:{},...i.frameDy!==void 0?{dy:Number(i.frameDy)}:{}}}:{}};if(tt(d)!==void 0)return;let a=n.get(u);a===void 0&&n.set(u,a={}),a[p]=d,r+=1,o=void 0}});for(const[g,u]of n)g.code=u;return r===0?[]:[`${r} code cell${r===1?"":"s"} read from ${Xe}: the sources and the results, as cached values; the outputs are not in XLSX and were dropped.`]}function en(e,t){const s=e.sheet(t).cells;let n=0,r=0;for(const o of s.columnIndexes()){const l=s.lastRowIn(o);l>=0&&(n=Math.max(n,o),r=Math.max(r,l))}return{top:0,left:0,bottom:r,right:n}}const W={readRange:"cells.agent.readRange",writeRange:"cells.agent.writeRange",insertChart:"cells.agent.insertChart",listCharts:"cells.agent.listCharts",selectRange:"cells.agent.selectRange"},tn=2e3,de={type:"string",description:"A range in A1 notation on the sheet shown, such as `A1:D13`, or one cell such as `B3`."},Ne=Ke({id:"cells",version:"0.0.1",name:"Cells",description:"Read and write the spreadsheet on the person's screen, and chart it: the grid drawn by Datalayer Cells.",plugin:"@datalayer/cells",commands:[{name:"cells_read_range",command:W.readRange,description:"The values of a range of the spreadsheet shown, row by row. Without a range, the whole used range from A1, which is how to find where the data is: the answer names the sheet and the range read. Numbers are numbers, empty cells null.",parameters:{type:"object",properties:{range:de}}},{name:"cells_write_range",command:W.writeRange,description:"Write a block of values, row by row, from the top-left cell of a range. A text starting with = is a formula (=SUM(B2:B13)); numbers, booleans and null (an empty cell) are written as they are. One undo step.",parameters:{type:"object",properties:{range:{...de,description:"Where the block starts: its top-left cell, such as `E1`, or a range whose top-left cell it is."},values:{type:"array",description:"The rows to write, each an array of cells: number, string, boolean or null.",items:{type:"array",items:{type:["number","string","boolean","null"]}}}},required:["range","values"]}},{name:"cells_insert_chart",command:W.insertChart,description:"Insert a chart of a range into the spreadsheet shown, as the Insert chart button does: the series are read from the range (a first row of names and a first column of categories become the legend and the axis). It is drawn over the grid, beside the range unless `at` says where; the answer gives its id.",parameters:{type:"object",properties:{range:{...de,description:"The data to chart, headers included, such as `A1:D13`."},type:{type:"string",enum:[...be],description:"The chart type; column by default."},title:{type:"string",description:"The title drawn above the chart."},at:{type:"string",description:"The cell where the chart's top-left corner goes, such as `A15` (below the data) or `F1`."}},required:["range"]}},{name:"cells_list_charts",command:W.listCharts,description:"The charts of the sheet shown: id, type, title and the ranges each reads."},{name:"cells_select_range",command:W.selectRange,description:"Select a range of the spreadsheet shown, to show the person the cells meant.",parameters:{type:"object",properties:{range:de},required:["range"]}}]}),J=(e,t)=>{if(typeof e!="string"||e.trim()==="")throw new Error(`${t} is a non-empty string.`);return e},Oe=e=>{if(!e.ok)throw new Error(e.refusals.map(t=>t.message).join(" "))};function nn(e,t){const s=e.sheet(t).cells;let n=-1,r=-1;for(const o of s.columnIndexes()){const l=s.lastRowIn(o);l<0||(n=Math.max(n,o),r=Math.max(r,l))}return n<0?null:{top:0,left:0,bottom:r,right:n}}const rn=e=>e!==null&&typeof e=="object"?`#${e.error.replace(/^#/,"")}`:e,sn=e=>{if(e==null)return null;if(typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return e.startsWith("=")?ft(e):e;throw new Error(`A cell is a number, a string, a boolean or null, not ${JSON.stringify(e)}.`)};function Ue(e={}){const t=n=>e.model?.()??st(n,void 0).model,s=(n,r,o)=>({id:n,name:r,category:"Cells",execute:l=>o(t(n),l??{})});return He({name:e.name??on,displayName:"Cells agent tools",description:"Read, write, chart and select the grid on screen, as tools an agent calls.",octicon:"table",commands:[s(W.readRange,"Read a range",(n,r)=>{const o=n.selection.sheet,l=r.range===void 0?nn(n,o):fe(J(r.range,"The range"));if(l===null)return{sheet:n.sheet(o).name,range:null,values:[]};const f=l.right-l.left+1,g=Math.max(1,Math.min(l.bottom-l.top+1,Math.floor(tn/f))),u={...l,bottom:l.top+g-1};return{sheet:n.sheet(o).name,range:se(u),values:n.toRows(u,o).map(p=>p.map(rn)),...u.bottom<l.bottom?{truncated:!0,fullRange:se(l)}:{}}}),s(W.writeRange,"Write values into a range",(n,r)=>{const o=fe(J(r.range,"The range"));if(!Array.isArray(r.values)||r.values.length===0||!r.values.every(Array.isArray))throw new Error("The values are a non-empty array of rows, each an array of cells.");const l=n.selection.sheet,f=r.values.map(u=>u.map(sn));Oe(n.dispatch({type:"SET_CELLS",sheet:l,at:{row:o.top,col:o.left},cells:f}));const g=Math.max(...f.map(u=>u.length));return{ok:!0,sheet:n.sheet(l).name,range:se({top:o.top,left:o.left,bottom:o.top+f.length-1,right:o.left+Math.max(0,g-1)})}}),s(W.insertChart,"Insert a chart of a range",(n,r)=>{const o=fe(J(r.range,"The range")),l=r.type===void 0?"column":J(r.type,"The type");if(!be.includes(l))throw new Error(`'${l}' is not a chart type; there are ${be.join(", ")}.`);const f=n.selection.sheet,g=it((v,b)=>n.value(f,v,b),n.sheet(f).name,o,(v,b)=>/[dmy]/i.test(n.style(f,v,b).format??""));if(!g.ok)throw new Error(g.message);let u=ot(n,o);if(r.at!==void 0&&u.kind==="cells"){const v=lt(J(r.at,"Where the chart goes")),b=u.to.row-u.from.row,d=u.to.col-u.from.col;u={kind:"cells",from:{row:v.row,col:v.col,dx:0,dy:0},to:{row:v.row+b,col:v.col+d,dx:0,dy:0}}}const p=new Set(n.sheet(f).charts.keys()),i=r.title===void 0?void 0:J(r.title,"The title");Oe(n.dispatch({type:"INSERT_CHART",sheet:f,chart:{type:l,anchor:u,data:g.data,legend:"bottom",...i?{title:i}:{}}}));const c=[...n.sheet(f).charts.keys()].find(v=>!p.has(v));return c!==void 0&&n.selectChart(c),{ok:!0,chartId:c,sheet:n.sheet(f).name,range:se(o),type:l}}),s(W.listCharts,"List the charts",n=>{const r=n.selection.sheet;return{sheet:n.sheet(r).name,charts:[...n.sheet(r).charts.values()].map(o=>({id:o.id,type:o.type,...o.title?{title:o.title}:{},ranges:at(o)}))}}),s(W.selectRange,"Select a range",(n,r)=>{const o=fe(J(r.range,"The range")),l=n.selection.sheet,f={row:o.top,col:o.left};return n.select({sheet:l,zones:[o],anchor:f,active:f}),{ok:!0,sheet:n.sheet(l).name,range:se(o)}})],contributes:[Ze(qe,Ne,{id:Ne.id})]})}const on="@datalayer/cells-agent-tools";Ue();function ln(){}const an=40;function fn(e,t=160,s=560){const[n,r]=ce.useState(t);return ce.useEffect(()=>{if(!e)return;const o=()=>{const l=e.sheet(e.selection.sheet);let f=l.rows.offsetOf(en(e,l.id).bottom+1);for(const g of l.charts.values()){const u=dt(l,g);f=Math.max(f,u.y+u.height)}r(Math.min(s,Math.max(t,Math.ceil(f)+an)))};return o(),e.subscribe(o)},[e,t,s]),n}Ue({model:ln,name:"@datalayer/loop-plugin-agent-outputs-sheet-tools"});async function dn(e){const t=await et(e),{workbook:s}=Jt(t);return{model:gt({data:s,readOnly:!0,codeCells:!1,plugins:[pt]}),bytes:t}}function hn({data:e,name:t,maxHeight:s}){const[n,r]=ce.useState({model:null,bytes:null,error:""});ce.useEffect(()=>{let f=!1;return dn(e).then(({model:g,bytes:u})=>!f&&r({model:g,bytes:u,error:""}),g=>!f&&r({model:null,bytes:null,error:g instanceof Error?g.message:String(g)})),()=>{f=!0}},[e]);const o=fn(n.model,160,s);if(n.error)return U.jsxs($e,{sx:{color:"danger.fg",fontSize:0},children:["Could not read the spreadsheet: ",n.error]});if(!n.model)return U.jsx($e,{as:"p",sx:{color:"fg.muted",fontSize:0,m:0},children:"Reading the spreadsheet…"});const l=n.model.sheets.length>1;return U.jsxs(ct,{model:n.model,children:[U.jsxs(he,{"data-spreadsheet-preview-sheets":n.model.sheets.length,border:"1px solid",borderColor:"border.muted",borderRadius:2,overflow:"hidden",children:[U.jsx(he,{height:o,children:U.jsx(ut,{model:n.model,"aria-label":`${t}, read-only`})}),l?U.jsx(ht,{"aria-label":`The sheets of ${t}`}):null]}),U.jsx(he,{mt:1,children:U.jsxs(Ye,{size:"small",variant:"invisible",leadingVisual:Je,onClick:()=>n.bytes&&Qe(n.bytes,t),children:["Download ",t]})})]})}export{hn as SpreadsheetPreviewView,hn as default,dn as readOnlyWorkbook};
@@ -1 +1 @@
1
- import{r as u,j as t,dp as D,e8 as L,e9 as S,bl as z,ea as P,eb as U,ec as K,I as M,v as H,B as N}from"../datalayer-app-main.js";import{u as w,a as A,b as W,c as F,d as O,z as _,n as q,i as V,e as Y,B as G,f as J,g as Q,h as X,C as Z,j as ee,S as te,k as ae,l as se,m as ne}from"./SheetTabs-DJG69znU.js";import{S as oe,I as re,B as le}from"./StrikethroughIcon-CbiEuPT-.js";import{U as ie,C as ce,N as de,R as ue,a as me}from"./UnlockIcon-pl0zUqkQ.js";import{S as fe}from"./SortAscIcon-CmH04s3F.js";import{S as he}from"./SortDescIcon-Qif6E10I.js";function pe(l){const n=w(),a=A(),o=W(),j=`'${n.sheet(a.sheet).name.replace(/'/g,"''")}'`,k=`${F(a.active.col)}${a.active.row+1}`,{content:g,value:i}=O(`${j}!${k}`),m=a.zones[a.zones.length-1],f=m.top===m.bottom&&m.left===m.right?k:_(m),[x,d]=u.useState(f),[I,y]=u.useState(!1),[h,e]=u.useState(""),r=u.useId();u.useEffect(()=>{I||d(f)},[f,I]);const c=o.edit!==null&&o.edit.sheet===a.sheet&&o.edit.row===a.active.row&&o.edit.col===a.active.col,v=c?o.edit.text:g?.formula!==void 0?`=${g.formula}`:i===null?"":typeof i=="number"?q(i):typeof i=="boolean"?i?"TRUE":"FALSE":V(i)?i.error:i;return t.jsxs("div",{role:"group","aria-label":l["aria-label"]??"Formula bar","data-cells-formula-bar":"",style:{display:"flex",alignItems:"center",gap:4,padding:4},children:[t.jsx(D,{"aria-label":"Name box",size:"small",value:x,style:{width:96},onFocus:()=>y(!0),onBlur:()=>y(!1),onChange:s=>d(s.target.value),onKeyDown:s=>{if(s.key==="Enter"){s.preventDefault();try{a.select(x.trim()),e(""),y(!1)}catch(p){e(p.message)}}else s.key==="Escape"&&(d(f),e(""))}}),t.jsx("span",{"aria-hidden":"true",style:{fontStyle:"italic",opacity:.7},children:"fx"}),t.jsx(D,{"aria-label":"Formula","aria-describedby":h?r:void 0,"aria-invalid":h?!0:void 0,size:"small",block:!0,value:v,onFocus:()=>{c||o.start()},onChange:s=>{c||o.start(),o.setText(s.target.value)},onKeyDown:s=>{if(s.key==="Enter"){s.preventDefault();const p=o.commit();e(p.ok?"":p.refusals.map(C=>C.message).join(" "))}else s.key==="Escape"&&(s.preventDefault(),o.cancel(),e(""))}}),h&&t.jsx("span",{id:r,role:"alert",style:{color:"var(--fgColor-danger, #d1242f)"},children:h})]})}function be(l){const n=Y(l.reactor).all();return n.length>0?n.map(a=>({id:a.value.id,label:a.value.label})):G.map(a=>({id:a,label:a[0].toUpperCase()+a.slice(1)}))}function ge(l){const n=w(),a=be(n);return t.jsx(L,{children:t.jsxs(S,{children:[t.jsx(S.Button,{size:"small",variant:"invisible","data-cells-chart-picker":"",children:"Insert chart"}),t.jsx(S.Overlay,{width:"small",children:t.jsx(z,{children:a.map(o=>t.jsx(z.Item,{"data-chart-type":o.id,onSelect:()=>{n.reactor.executeCommand("cells.chart.insert",{model:n,chartType:o.id}).catch(b=>l.onError?.(b.message))},children:o.label},o.id))})})]})})}const xe={bold:le,italic:re,strikethrough:oe,undo:me,redo:ue,"sort-asc":fe,"sort-desc":he,number:de,calendar:ce,table:K,lock:U,unlock:ie},ye={"cells.bold":"bold","cells.italic":"italic","cells.underline":"underline","cells.strikethrough":"strike"};function ve(l){const n=w(),a=J(Z),o=Q(),b=A(),j=`${F(b.active.col)}${b.active.row+1}`,{style:k}=X(`'${n.sheet(b.sheet).name.replace(/'/g,"''")}'!${j}`),[g,i]=u.useState(0),m=u.useRef([]),f=new Map(o.map(e=>[e.id,e])),x=a.filter(e=>f.has(e.value.command)),d=[];for(const e of x){const r=d[d.length-1];r!==void 0&&r[0].value.group===e.value.group?r.push(e):d.push([e])}const I=u.useCallback(e=>{n.reactor.executeCommand(e,{model:n}).catch(r=>l.onError?.(r.message))},[n,l]),y=e=>{const r=x.length;if(r===0)return;const c=e.key==="ArrowRight"?(g+1)%r:e.key==="ArrowLeft"?(g+r-1)%r:e.key==="Home"?0:e.key==="End"?r-1:void 0;c!==void 0&&(e.preventDefault(),i(c),m.current[c]?.focus())};let h=-1;return t.jsxs("div",{role:"toolbar","aria-label":l["aria-label"]??"Spreadsheet toolbar",onKeyDown:y,"data-cells-toolbar":"",style:{display:"flex",alignItems:"center",gap:4,flexWrap:"wrap",padding:4},children:[d.map((e,r)=>t.jsx("div",{role:"group","aria-label":e[0].value.group,style:{display:"flex",gap:2,paddingInlineEnd:4,borderInlineEnd:r<d.length-1?"1px solid var(--borderColor-muted, #d0d7de)":void 0},children:e.map(c=>{h+=1;const v=h,s=f.get(c.value.command),p=typeof s.keybinding=="string"?s.keybinding:void 0,C=p?`${s.name} (${P(p)})`:s.name,T=typeof s.octicon=="string"?xe[s.octicon]:void 0,$=ye[s.id],B={ref:R=>{m.current[v]=R},tabIndex:v===g?0:-1,onFocus:()=>i(v),onClick:()=>I(s.id),"aria-pressed":$===void 0?void 0:k[$]===!0,"data-command":s.id};return T!==void 0?t.jsx(M,{...B,icon:T,"aria-label":C,size:"small",variant:"invisible"},c.id):t.jsx(H,{...B,"aria-label":C,size:"small",variant:"invisible",children:s.name},c.id)})},r)),l.charts!==!1&&t.jsx("div",{role:"group","aria-label":"charts","data-cells-toolbar-group":"charts",children:t.jsx(ge,{onError:l.onError})})]})}const E=new Map;function ke(l){let n=E.get(l);return n||(n=se({plugins:[ne]}),E.set(l,n)),n}function Te(){E.clear()}function $e({workspace:l}){const n=l.surfaceId,a=u.useMemo(()=>ke(n),[n]);return t.jsx(ee,{model:a,children:t.jsxs(N,{"data-spreadsheet-editor":n,height:"100%",minHeight:0,display:"flex",flexDirection:"column",children:[t.jsx(ve,{}),t.jsx(pe,{}),t.jsx(N,{flex:1,minHeight:0,position:"relative",children:t.jsx(te,{model:a,"aria-label":"Spreadsheet"})}),t.jsx(ae,{})]})})}export{$e as default,Te as resetSpreadsheetWorkbooks,ke as spreadsheetWorkbook};
1
+ import{r as u,j as t,dp as D,e8 as L,e9 as S,bl as z,ea as P,eb as U,ec as K,I as M,v as H,B as N}from"../datalayer-app-main.js";import{u as w,a as A,b as W,c as F,d as O,z as _,n as q,i as V,e as Y,B as G,f as J,g as Q,h as X,C as Z,j as ee,S as te,k as ae,l as se,m as ne}from"./SheetTabs-PG3DQn2N.js";import{S as oe,I as re,B as le}from"./StrikethroughIcon-CbiEuPT-.js";import{U as ie,C as ce,N as de,R as ue,a as me}from"./UnlockIcon-pl0zUqkQ.js";import{S as fe}from"./SortAscIcon-CmH04s3F.js";import{S as he}from"./SortDescIcon-Qif6E10I.js";function pe(l){const n=w(),a=A(),o=W(),j=`'${n.sheet(a.sheet).name.replace(/'/g,"''")}'`,k=`${F(a.active.col)}${a.active.row+1}`,{content:g,value:i}=O(`${j}!${k}`),m=a.zones[a.zones.length-1],f=m.top===m.bottom&&m.left===m.right?k:_(m),[x,d]=u.useState(f),[I,y]=u.useState(!1),[h,e]=u.useState(""),r=u.useId();u.useEffect(()=>{I||d(f)},[f,I]);const c=o.edit!==null&&o.edit.sheet===a.sheet&&o.edit.row===a.active.row&&o.edit.col===a.active.col,v=c?o.edit.text:g?.formula!==void 0?`=${g.formula}`:i===null?"":typeof i=="number"?q(i):typeof i=="boolean"?i?"TRUE":"FALSE":V(i)?i.error:i;return t.jsxs("div",{role:"group","aria-label":l["aria-label"]??"Formula bar","data-cells-formula-bar":"",style:{display:"flex",alignItems:"center",gap:4,padding:4},children:[t.jsx(D,{"aria-label":"Name box",size:"small",value:x,style:{width:96},onFocus:()=>y(!0),onBlur:()=>y(!1),onChange:s=>d(s.target.value),onKeyDown:s=>{if(s.key==="Enter"){s.preventDefault();try{a.select(x.trim()),e(""),y(!1)}catch(p){e(p.message)}}else s.key==="Escape"&&(d(f),e(""))}}),t.jsx("span",{"aria-hidden":"true",style:{fontStyle:"italic",opacity:.7},children:"fx"}),t.jsx(D,{"aria-label":"Formula","aria-describedby":h?r:void 0,"aria-invalid":h?!0:void 0,size:"small",block:!0,value:v,onFocus:()=>{c||o.start()},onChange:s=>{c||o.start(),o.setText(s.target.value)},onKeyDown:s=>{if(s.key==="Enter"){s.preventDefault();const p=o.commit();e(p.ok?"":p.refusals.map(C=>C.message).join(" "))}else s.key==="Escape"&&(s.preventDefault(),o.cancel(),e(""))}}),h&&t.jsx("span",{id:r,role:"alert",style:{color:"var(--fgColor-danger, #d1242f)"},children:h})]})}function be(l){const n=Y(l.reactor).all();return n.length>0?n.map(a=>({id:a.value.id,label:a.value.label})):G.map(a=>({id:a,label:a[0].toUpperCase()+a.slice(1)}))}function ge(l){const n=w(),a=be(n);return t.jsx(L,{children:t.jsxs(S,{children:[t.jsx(S.Button,{size:"small",variant:"invisible","data-cells-chart-picker":"",children:"Insert chart"}),t.jsx(S.Overlay,{width:"small",children:t.jsx(z,{children:a.map(o=>t.jsx(z.Item,{"data-chart-type":o.id,onSelect:()=>{n.reactor.executeCommand("cells.chart.insert",{model:n,chartType:o.id}).catch(b=>l.onError?.(b.message))},children:o.label},o.id))})})]})})}const xe={bold:le,italic:re,strikethrough:oe,undo:me,redo:ue,"sort-asc":fe,"sort-desc":he,number:de,calendar:ce,table:K,lock:U,unlock:ie},ye={"cells.bold":"bold","cells.italic":"italic","cells.underline":"underline","cells.strikethrough":"strike"};function ve(l){const n=w(),a=J(Z),o=Q(),b=A(),j=`${F(b.active.col)}${b.active.row+1}`,{style:k}=X(`'${n.sheet(b.sheet).name.replace(/'/g,"''")}'!${j}`),[g,i]=u.useState(0),m=u.useRef([]),f=new Map(o.map(e=>[e.id,e])),x=a.filter(e=>f.has(e.value.command)),d=[];for(const e of x){const r=d[d.length-1];r!==void 0&&r[0].value.group===e.value.group?r.push(e):d.push([e])}const I=u.useCallback(e=>{n.reactor.executeCommand(e,{model:n}).catch(r=>l.onError?.(r.message))},[n,l]),y=e=>{const r=x.length;if(r===0)return;const c=e.key==="ArrowRight"?(g+1)%r:e.key==="ArrowLeft"?(g+r-1)%r:e.key==="Home"?0:e.key==="End"?r-1:void 0;c!==void 0&&(e.preventDefault(),i(c),m.current[c]?.focus())};let h=-1;return t.jsxs("div",{role:"toolbar","aria-label":l["aria-label"]??"Spreadsheet toolbar",onKeyDown:y,"data-cells-toolbar":"",style:{display:"flex",alignItems:"center",gap:4,flexWrap:"wrap",padding:4},children:[d.map((e,r)=>t.jsx("div",{role:"group","aria-label":e[0].value.group,style:{display:"flex",gap:2,paddingInlineEnd:4,borderInlineEnd:r<d.length-1?"1px solid var(--borderColor-muted, #d0d7de)":void 0},children:e.map(c=>{h+=1;const v=h,s=f.get(c.value.command),p=typeof s.keybinding=="string"?s.keybinding:void 0,C=p?`${s.name} (${P(p)})`:s.name,T=typeof s.octicon=="string"?xe[s.octicon]:void 0,$=ye[s.id],B={ref:R=>{m.current[v]=R},tabIndex:v===g?0:-1,onFocus:()=>i(v),onClick:()=>I(s.id),"aria-pressed":$===void 0?void 0:k[$]===!0,"data-command":s.id};return T!==void 0?t.jsx(M,{...B,icon:T,"aria-label":C,size:"small",variant:"invisible"},c.id):t.jsx(H,{...B,"aria-label":C,size:"small",variant:"invisible",children:s.name},c.id)})},r)),l.charts!==!1&&t.jsx("div",{role:"group","aria-label":"charts","data-cells-toolbar-group":"charts",children:t.jsx(ge,{onError:l.onError})})]})}const E=new Map;function ke(l){let n=E.get(l);return n||(n=se({plugins:[ne]}),E.set(l,n)),n}function Te(){E.clear()}function $e({workspace:l}){const n=l.surfaceId,a=u.useMemo(()=>ke(n),[n]);return t.jsx(ee,{model:a,children:t.jsxs(N,{"data-spreadsheet-editor":n,height:"100%",minHeight:0,display:"flex",flexDirection:"column",children:[t.jsx(ve,{}),t.jsx(pe,{}),t.jsx(N,{flex:1,minHeight:0,position:"relative",children:t.jsx(te,{model:a,"aria-label":"Spreadsheet"})}),t.jsx(ae,{})]})})}export{$e as default,Te as resetSpreadsheetWorkbooks,ke as spreadsheetWorkbook};
@@ -1 +1 @@
1
- import{r as o,au as u,j as n,B as g,T as p,av as c}from"../datalayer-app-main.js";import{W as f,K as x}from"./renderer-B_98xkGt.js";import{W as d,L as w,R as h}from"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";const l=new WeakMap;function v(r){let e=l.get(r);if(!e||e.isDisposed){const t=r.clone({handleComms:!0}),a=new h({initialFactories:c});e=new x(t,a);const s=e;r.disposed.connect(()=>{s.dispose(),t.dispose()}),l.set(r,e)}return e}function _({connection:r,modelId:e}){const[t,a]=o.useState();return o.useEffect(()=>{const s=v(r),i=new f({mimeType:d,sanitizer:{sanitize:m=>m},resolver:null,linkHandler:null,latexTypesetter:null},s);return i.renderModel(new u({data:{[d]:{model_id:e,version_major:2,version_minor:0}}})),a(i),()=>i.dispose()},[r,e]),n.jsx(g,{"data-kernel-variable-widget":e,sx:{minHeight:32},children:t?n.jsx(w,{id:`kernel-variable-widget-${e}`,height:"auto",children:t}):n.jsx(p,{sx:{fontSize:1,color:"fg.muted"},children:"Loading the widget…"})})}export{_ as WidgetVariableView,_ as default};
1
+ import{r as o,au as u,j as n,B as g,T as p,av as c}from"../datalayer-app-main.js";import{W as f,K as x}from"./renderer-CCsq5PXp.js";import{W as d,L as w,R as h}from"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";const l=new WeakMap;function v(r){let e=l.get(r);if(!e||e.isDisposed){const t=r.clone({handleComms:!0}),a=new h({initialFactories:c});e=new x(t,a);const s=e;r.disposed.connect(()=>{s.dispose(),t.dispose()}),l.set(r,e)}return e}function _({connection:r,modelId:e}){const[t,a]=o.useState();return o.useEffect(()=>{const s=v(r),i=new f({mimeType:d,sanitizer:{sanitize:m=>m},resolver:null,linkHandler:null,latexTypesetter:null},s);return i.renderModel(new u({data:{[d]:{model_id:e,version_major:2,version_minor:0}}})),a(i),()=>i.dispose()},[r,e]),n.jsx(g,{"data-kernel-variable-widget":e,sx:{minHeight:32},children:t?n.jsx(w,{id:`kernel-variable-widget-${e}`,height:"auto",children:t}):n.jsx(p,{sx:{fontSize:1,color:"fg.muted"},children:"Loading the widget…"})})}export{_ as WidgetVariableView,_ as default};
@@ -1 +1 @@
1
- import{ab as o,r as t}from"../datalayer-app-main.js";import{h as e,i}from"./JupyterLexicalExtension-Dr8dgCst.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./url-DY3jeuF8.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-c7kvMU60.js";import"./Output-Do1CYRIF.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-rXaW8uXA.js";const D=()=>{const[r]=o();return t.useEffect(()=>i(r),[r]),null};export{e as INSERT_YOUTUBE_COMMAND,D as YouTubePlugin,D as default};
1
+ import{ab as o,r as t}from"../datalayer-app-main.js";import{h as e,i}from"./JupyterLexicalExtension-BYde4Hzz.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./url-DY3jeuF8.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-c7kvMU60.js";import"./Output-BmVt4DpZ.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-rXaW8uXA.js";const D=()=>{const[r]=o();return t.useEffect(()=>i(r),[r]),null};export{e as INSERT_YOUTUBE_COMMAND,D as YouTubePlugin,D as default};
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-SVP7TREG-CHN6fclq.js";import{p as f}from"./chunk-JWPE2WC7-Cq6Q947j.js";import{_ as n,l as s}from"./mermaid.core-Dd-D7tJ4.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./index-CyZxCTSq.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,o]=e.split("*"),m=t?parseInt(t,10):0,l=o?parseInt(o,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:o}=b(e.repeat);return t===0&&o===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:o}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),s.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;s.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),s.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:R,db:a,renderer:u,styles:p};export{$ as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-SVP7TREG-BE97ZGVE.js";import{p as f}from"./chunk-JWPE2WC7-DXZeG2qg.js";import{_ as n,l as s}from"./mermaid.core-DMHnDUdQ.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./index-CyZxCTSq.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,o]=e.split("*"),m=t?parseInt(t,10):0,l=o?parseInt(o,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:o}=b(e.repeat);return t===0&&o===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:o}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),s.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;s.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),s.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},$={parser:R,db:a,renderer:u,styles:p};export{$ as diagram};
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-SVP7TREG-8oKVa2mm.js";import{p as f}from"./chunk-JWPE2WC7-Bf4pFlIJ.js";import{_ as n,l as s}from"./index-DObGLuCI.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BBLugbYz.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-CyZxCTSq.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,o]=e.split("*"),m=t?parseInt(t,10):0,l=o?parseInt(o,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:o}=b(e.repeat);return t===0&&o===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:o}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),s.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;s.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),s.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:R,db:a,renderer:u,styles:p};export{G as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-SVP7TREG-lMq3S-u-.js";import{p as f}from"./chunk-JWPE2WC7-NvLQtuoq.js";import{_ as n,l as s}from"./index-s25RSqvt.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BBLugbYz.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-CyZxCTSq.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,o]=e.split("*"),m=t?parseInt(t,10):0,l=o?parseInt(o,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:o}=b(e.repeat);return t===0&&o===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:o}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),s.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;s.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),s.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:R,db:a,renderer:u,styles:p};export{G as diagram};
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-SVP7TREG-CsFEUe5B.js";import{p as f}from"./chunk-JWPE2WC7-BVXd-ICe.js";import{_ as n,l as s}from"./index-Df2MkvAW.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-CyZxCTSq.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,o]=e.split("*"),m=t?parseInt(t,10):0,l=o?parseInt(o,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:o}=b(e.repeat);return t===0&&o===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:o}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),s.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;s.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),s.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:R,db:a,renderer:u,styles:p};export{G as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-SVP7TREG-BGHt1HDi.js";import{p as f}from"./chunk-JWPE2WC7-BGdc9-bH.js";import{_ as n,l as s}from"./index-CLB4KPZs.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-CyZxCTSq.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,o]=e.split("*"),m=t?parseInt(t,10):0,l=o?parseInt(o,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:o}=b(e.repeat);return t===0&&o===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:o}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),s.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;s.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),s.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},G={parser:R,db:a,renderer:u,styles:p};export{G as diagram};
@@ -1,4 +1,4 @@
1
- import"./percentages-BXMCSKIN-9RttMFHC.js";import"../datalayer-app-main.js";import"./JupyterLexicalExtension-Dr8dgCst.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./url-DY3jeuF8.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-c7kvMU60.js";import"./Output-Do1CYRIF.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-DrrVr0x3.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-rXaW8uXA.js";import"./extends-CF3RwP-h.js";import"./index-BWeXDhSd.js";import"./index-DoBkwclg.js";var u={paste:"لصق",pasteAsPlaintext:"اللصق كنص عادي",pasteCharts:"لصق الرسوم البيانية",selectAll:"تحديد الكل",multiSelect:"إضافة عنصر للتحديد",moveCanvas:"نقل لوح الرسم",cut:"قص",copy:"نسخ",copyAsPng:"نسخ إلى الحافظة بصيغة PNG",copyAsSvg:"نسخ إلى الحافظة بصيغة SVG",copyText:"نسخ إلى الحافظة كنص",copySource:"",convertToCode:"",bringForward:"جلب للأمام",sendToBack:"أرسل للخلف",bringToFront:"أحضر للأمام",sendBackward:"أرسل للخلف",delete:"حذف",copyStyles:"نسخ الأنماط",pasteStyles:"لصق الأنماط",stroke:"الخط",background:"الخلفية",fill:"التعبئة",strokeWidth:"سُمك الخط",strokeStyle:"نمط الخط",strokeStyle_solid:"متصل",strokeStyle_dashed:"متقطع",strokeStyle_dotted:"منقط",sloppiness:"الإمالة",opacity:"الشفافية",textAlign:"محاذاة النص",edges:"الحواف",sharp:"حادة",round:"دائرية",arrowheads:"رؤوس الأسهم",arrowhead_none:"لا شيء",arrowhead_arrow:"سهم",arrowhead_bar:"شريط",arrowhead_circle:"",arrowhead_circle_outline:"",arrowhead_triangle:"مثلث",arrowhead_triangle_outline:"",arrowhead_diamond:"",arrowhead_diamond_outline:"",fontSize:"حجم الخط",fontFamily:"نوع الخط",addWatermark:'إضافة "مصنوعة بواسطة Excalidraw"',handDrawn:"رسم باليد",normal:"عادي",code:"رمز",small:"صغير",medium:"متوسط",large:"كبير",veryLarge:"كبير جدا",solid:"كامل",hachure:"خطوط",zigzag:"متعرج",crossHatch:"خطوط متقطعة",thin:"نحيف",bold:"داكن",left:"الـيسار",center:"وسط",right:"يمين",extraBold:"عريض",architect:"معماري",artist:"رسام",cartoonist:"كرتوني",fileTitle:"إسم الملف",colorPicker:"منتقي اللون",canvasColors:"تستخدم على القماش",canvasBackground:"خلفية اللوحة",drawingCanvas:"لوحة الرسم",layers:"الطبقات",actions:"الإجراءات",language:"اللغة",liveCollaboration:"التعاون المباشر...",duplicateSelection:"تكرار",untitled:"غير معنون",name:"الاسم",yourName:"اسمك",madeWithExcalidraw:"مصنوعة بواسطة Excalidraw",group:"تحديد مجموعة",ungroup:"إلغاء تحديد مجموعة",collaborators:"المتعاونون",showGrid:"إظهار الشبكة",addToLibrary:"أضف إلى المكتبة",removeFromLibrary:"حذف من المكتبة",libraryLoadingMessage:"جارٍ تحميل المكتبة…",libraries:"تصفح المكتبات",loadingScene:"جاري تحميل المشهد…",align:"محاذاة",alignTop:"محاذاة إلى اﻷعلى",alignBottom:"محاذاة إلى اﻷسفل",alignLeft:"محاذاة إلى اليسار",alignRight:"محاذاة إلى اليمين",centerVertically:"توسيط عمودي",centerHorizontally:"توسيط أفقي",distributeHorizontally:"التوزيع الأفقي",distributeVertically:"التوزيع عمودياً",flipHorizontal:"قلب عامودي",flipVertical:"قلب أفقي",viewMode:"نمط العرض",share:"مشاركة",showStroke:"إظهار منتقي لون الخط",showBackground:"إظهار منتقي لون الخلفية",toggleTheme:"غير النمط",personalLib:"المكتبة الشخصية",excalidrawLib:"مكتبتنا",decreaseFontSize:"تصغير حجم الخط",increaseFontSize:"تكبير حجم الخط",unbindText:"فك ربط النص",bindText:"ربط النص بالحاوية",createContainerFromText:"نص مغلف في حاوية",link:{edit:"تعديل الرابط",editEmbed:"تحرير الرابط وإدراجه",create:"إنشاء رابط",createEmbed:"إنشاء رابط و إدراجه",label:"رابط",labelEmbed:"رابط و إدراج",empty:"لم يتم تعيين رابط"},lineEditor:{edit:"تحرير السطر",exit:"الخروج من المُحرر"},elementLock:{lock:"قفل",unlock:"فتح",lockAll:"قفل الكل",unlockAll:"فتح الكل"},statusPublished:"نُشر",sidebarLock:"إبقاء الشريط الجانبي مفتوح",selectAllElementsInFrame:"تحديد جميع العناصر في الإطار",removeAllElementsFromFrame:"إزالة جميع العناصر من الإطار",eyeDropper:"اختيار اللون من القماش",textToDiagram:"",prompt:""},A={noItems:"لا توجد عناصر أضيفت بعد...",hint_emptyLibrary:"حدد عنصر على القماش لإضافته هنا، أو تثبيت مكتبة من المستودع العام أدناه.",hint_emptyPrivateLibrary:"حدد عنصر على القماش لإضافته هنا."},e={clearReset:"إعادة تعيين اللوحة",exportJSON:"صدر الملف",exportImage:"تصدير الصورة...",export:"حفظ إلى...",copyToClipboard:"نسخ إلى الحافظة",save:"احفظ للملف الحالي",saveAs:"حفظ كـ",load:"فتح",getShareableLink:"احصل على رابط المشاركة",close:"غلق",selectLanguage:"اختر اللغة",scrollBackToContent:"الرجوع إلى المحتوى",zoomIn:"تكبير",zoomOut:"تصغير",resetZoom:"إعادة تعيين الشاشة",menu:"القائمة",done:"تم",edit:"تعديل",undo:"تراجع",redo:"إعادة تنفيذ",resetLibrary:"إعادة ضبط المكتبة",createNewRoom:"إنشاء غرفة جديدة",fullScreen:"شاشة كاملة",darkMode:"الوضع المظلم",lightMode:"الوضع المضيء",zenMode:"وضع التأمل",objectsSnapMode:"التقط إلى العناصر",exitZenMode:"إلغاء الوضع الليلى",cancel:"إلغاء",clear:"مسح",remove:"إزالة",embed:"تبديل الإدراج",publishLibrary:"انشر",submit:"أرسل",confirm:"تأكيد",embeddableInteractionButton:"اضغط للتفاعل"},r={clearReset:"هذا سيُزيل كامل اللوحة. هل أنت متأكد؟",couldNotCreateShareableLink:"تعذر إنشاء رابطة المشاركة.",couldNotCreateShareableLinkTooBig:"تعذر إنشاء رابط قابل للمشاركة: المشهد كبير جدًا",couldNotLoadInvalidFile:"تعذر التحميل، الملف غير صالح",importBackendFailed:"فشل الاستيراد من الخادوم.",cannotExportEmptyCanvas:"لا يمكن تصدير لوحة فارغة.",couldNotCopyToClipboard:"تعذر النسخ إلى الحافظة.",decryptFailed:"تعذر فك تشفير البيانات.",uploadedSecurly:"تم تأمين التحميل بتشفير النهاية إلى النهاية، مما يعني أن خادوم Excalidraw والأطراف الثالثة لا يمكنها قراءة المحتوى.",loadSceneOverridePrompt:"تحميل الرسم الخارجي سيحل محل المحتوى الموجود لديك. هل ترغب في المتابعة؟",collabStopOverridePrompt:`إيقاف الجلسة سيؤدي إلى الكتابة فوق رسومك السابقة المخزنة داخليا. هل أنت متأكد؟
1
+ import"./percentages-BXMCSKIN-D1a6fCH1.js";import"../datalayer-app-main.js";import"./JupyterLexicalExtension-BYde4Hzz.js";import"./NotebookSkeleton-GSdyJDf_.js";import"./Avatar-DUPBQXVt.js";import"./url-DY3jeuF8.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./VideoIcon-C3wcjUxu.js";import"./ArrowUpIcon-y5enrVH9.js";import"./SortDescIcon-Qif6E10I.js";import"./PaintbrushIcon-CFBHU-3l.js";import"./PrismCss-c7kvMU60.js";import"./Output-BmVt4DpZ.js";import"./index-i9IsP_xD.js";import"./hoverbox-CStlKQWE.js";import"./index--Rl4aMiU.js";import"./index-5os8HYj-.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-DXPB_0fo.js";import"./d3-color-Jd8hXty2.js";import"./dist-Frc5TvpU.js";import"./index-BaRoLDk0.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-rXaW8uXA.js";import"./extends-CF3RwP-h.js";import"./index-BWeXDhSd.js";import"./index-DoBkwclg.js";var u={paste:"لصق",pasteAsPlaintext:"اللصق كنص عادي",pasteCharts:"لصق الرسوم البيانية",selectAll:"تحديد الكل",multiSelect:"إضافة عنصر للتحديد",moveCanvas:"نقل لوح الرسم",cut:"قص",copy:"نسخ",copyAsPng:"نسخ إلى الحافظة بصيغة PNG",copyAsSvg:"نسخ إلى الحافظة بصيغة SVG",copyText:"نسخ إلى الحافظة كنص",copySource:"",convertToCode:"",bringForward:"جلب للأمام",sendToBack:"أرسل للخلف",bringToFront:"أحضر للأمام",sendBackward:"أرسل للخلف",delete:"حذف",copyStyles:"نسخ الأنماط",pasteStyles:"لصق الأنماط",stroke:"الخط",background:"الخلفية",fill:"التعبئة",strokeWidth:"سُمك الخط",strokeStyle:"نمط الخط",strokeStyle_solid:"متصل",strokeStyle_dashed:"متقطع",strokeStyle_dotted:"منقط",sloppiness:"الإمالة",opacity:"الشفافية",textAlign:"محاذاة النص",edges:"الحواف",sharp:"حادة",round:"دائرية",arrowheads:"رؤوس الأسهم",arrowhead_none:"لا شيء",arrowhead_arrow:"سهم",arrowhead_bar:"شريط",arrowhead_circle:"",arrowhead_circle_outline:"",arrowhead_triangle:"مثلث",arrowhead_triangle_outline:"",arrowhead_diamond:"",arrowhead_diamond_outline:"",fontSize:"حجم الخط",fontFamily:"نوع الخط",addWatermark:'إضافة "مصنوعة بواسطة Excalidraw"',handDrawn:"رسم باليد",normal:"عادي",code:"رمز",small:"صغير",medium:"متوسط",large:"كبير",veryLarge:"كبير جدا",solid:"كامل",hachure:"خطوط",zigzag:"متعرج",crossHatch:"خطوط متقطعة",thin:"نحيف",bold:"داكن",left:"الـيسار",center:"وسط",right:"يمين",extraBold:"عريض",architect:"معماري",artist:"رسام",cartoonist:"كرتوني",fileTitle:"إسم الملف",colorPicker:"منتقي اللون",canvasColors:"تستخدم على القماش",canvasBackground:"خلفية اللوحة",drawingCanvas:"لوحة الرسم",layers:"الطبقات",actions:"الإجراءات",language:"اللغة",liveCollaboration:"التعاون المباشر...",duplicateSelection:"تكرار",untitled:"غير معنون",name:"الاسم",yourName:"اسمك",madeWithExcalidraw:"مصنوعة بواسطة Excalidraw",group:"تحديد مجموعة",ungroup:"إلغاء تحديد مجموعة",collaborators:"المتعاونون",showGrid:"إظهار الشبكة",addToLibrary:"أضف إلى المكتبة",removeFromLibrary:"حذف من المكتبة",libraryLoadingMessage:"جارٍ تحميل المكتبة…",libraries:"تصفح المكتبات",loadingScene:"جاري تحميل المشهد…",align:"محاذاة",alignTop:"محاذاة إلى اﻷعلى",alignBottom:"محاذاة إلى اﻷسفل",alignLeft:"محاذاة إلى اليسار",alignRight:"محاذاة إلى اليمين",centerVertically:"توسيط عمودي",centerHorizontally:"توسيط أفقي",distributeHorizontally:"التوزيع الأفقي",distributeVertically:"التوزيع عمودياً",flipHorizontal:"قلب عامودي",flipVertical:"قلب أفقي",viewMode:"نمط العرض",share:"مشاركة",showStroke:"إظهار منتقي لون الخط",showBackground:"إظهار منتقي لون الخلفية",toggleTheme:"غير النمط",personalLib:"المكتبة الشخصية",excalidrawLib:"مكتبتنا",decreaseFontSize:"تصغير حجم الخط",increaseFontSize:"تكبير حجم الخط",unbindText:"فك ربط النص",bindText:"ربط النص بالحاوية",createContainerFromText:"نص مغلف في حاوية",link:{edit:"تعديل الرابط",editEmbed:"تحرير الرابط وإدراجه",create:"إنشاء رابط",createEmbed:"إنشاء رابط و إدراجه",label:"رابط",labelEmbed:"رابط و إدراج",empty:"لم يتم تعيين رابط"},lineEditor:{edit:"تحرير السطر",exit:"الخروج من المُحرر"},elementLock:{lock:"قفل",unlock:"فتح",lockAll:"قفل الكل",unlockAll:"فتح الكل"},statusPublished:"نُشر",sidebarLock:"إبقاء الشريط الجانبي مفتوح",selectAllElementsInFrame:"تحديد جميع العناصر في الإطار",removeAllElementsFromFrame:"إزالة جميع العناصر من الإطار",eyeDropper:"اختيار اللون من القماش",textToDiagram:"",prompt:""},A={noItems:"لا توجد عناصر أضيفت بعد...",hint_emptyLibrary:"حدد عنصر على القماش لإضافته هنا، أو تثبيت مكتبة من المستودع العام أدناه.",hint_emptyPrivateLibrary:"حدد عنصر على القماش لإضافته هنا."},e={clearReset:"إعادة تعيين اللوحة",exportJSON:"صدر الملف",exportImage:"تصدير الصورة...",export:"حفظ إلى...",copyToClipboard:"نسخ إلى الحافظة",save:"احفظ للملف الحالي",saveAs:"حفظ كـ",load:"فتح",getShareableLink:"احصل على رابط المشاركة",close:"غلق",selectLanguage:"اختر اللغة",scrollBackToContent:"الرجوع إلى المحتوى",zoomIn:"تكبير",zoomOut:"تصغير",resetZoom:"إعادة تعيين الشاشة",menu:"القائمة",done:"تم",edit:"تعديل",undo:"تراجع",redo:"إعادة تنفيذ",resetLibrary:"إعادة ضبط المكتبة",createNewRoom:"إنشاء غرفة جديدة",fullScreen:"شاشة كاملة",darkMode:"الوضع المظلم",lightMode:"الوضع المضيء",zenMode:"وضع التأمل",objectsSnapMode:"التقط إلى العناصر",exitZenMode:"إلغاء الوضع الليلى",cancel:"إلغاء",clear:"مسح",remove:"إزالة",embed:"تبديل الإدراج",publishLibrary:"انشر",submit:"أرسل",confirm:"تأكيد",embeddableInteractionButton:"اضغط للتفاعل"},r={clearReset:"هذا سيُزيل كامل اللوحة. هل أنت متأكد؟",couldNotCreateShareableLink:"تعذر إنشاء رابطة المشاركة.",couldNotCreateShareableLinkTooBig:"تعذر إنشاء رابط قابل للمشاركة: المشهد كبير جدًا",couldNotLoadInvalidFile:"تعذر التحميل، الملف غير صالح",importBackendFailed:"فشل الاستيراد من الخادوم.",cannotExportEmptyCanvas:"لا يمكن تصدير لوحة فارغة.",couldNotCopyToClipboard:"تعذر النسخ إلى الحافظة.",decryptFailed:"تعذر فك تشفير البيانات.",uploadedSecurly:"تم تأمين التحميل بتشفير النهاية إلى النهاية، مما يعني أن خادوم Excalidraw والأطراف الثالثة لا يمكنها قراءة المحتوى.",loadSceneOverridePrompt:"تحميل الرسم الخارجي سيحل محل المحتوى الموجود لديك. هل ترغب في المتابعة؟",collabStopOverridePrompt:`إيقاف الجلسة سيؤدي إلى الكتابة فوق رسومك السابقة المخزنة داخليا. هل أنت متأكد؟
2
2
 
3
3
  (إذا كنت ترغب في الاحتفاظ برسمك المخزن داخليا، ببساطة أغلق علامة تبويب المتصفح بدلاً من ذلك.)`,errorAddingToLibrary:"تعذر إضافة العنصر للمكتبة",errorRemovingFromLibrary:"تعذر إزالة العنصر من المكتبة",confirmAddLibrary:"هذا سيضيف {{numShapes}} شكل إلى مكتبتك. هل أنت متأكد؟",imageDoesNotContainScene:"يبدو أن هذه الصورة لا تحتوي على أي بيانات مشهد. هل قمت بتمكين تضمين المشهد أثناء التصدير؟",cannotRestoreFromImage:"تعذر استعادة المشهد من ملف الصورة",invalidSceneUrl:"تعذر استيراد المشهد من عنوان URL المتوفر. إما أنها مشوهة، أو لا تحتوي على بيانات Excalidraw JSON صالحة.",resetLibrary:"هذا سوف يمسح مكتبتك. هل أنت متأكد؟",removeItemsFromsLibrary:"حذف {{count}} عنصر (عناصر) من المكتبة؟",invalidEncryptionKey:"مفتاح التشفير يجب أن يكون من 22 حرفاً. التعاون المباشر معطل.",collabOfflineWarning:`لا يوجد اتصال بالانترنت.
4
4
  لن يتم حفظ التغييرات التي قمت بها!`},o={unsupportedFileType:"نوع الملف غير مدعوم.",imageInsertError:"تعذر إدراج الصورة. حاول مرة أخرى لاحقاً...",fileTooBig:"الملف كبير جداً. الحد الأقصى المسموح به للحجم هو {{maxSize}}.",svgImageInsertError:"تعذر إدراج صورة SVG. يبدو أن ترميز SVG غير صحيح.",failedToFetchImage:"",invalidSVGString:"SVG غير صالح.",cannotResolveCollabServer:"تعذر الاتصال بخادم التعاون. الرجاء إعادة تحميل الصفحة والمحاولة مرة أخرى.",importLibraryError:"تعذر تحميل المكتبة",collabSaveFailed:"تعذر الحفظ في قاعدة البيانات. إذا استمرت المشاكل، يفضل أن تحفظ ملفك محليا كي لا تفقد عملك.",collabSaveFailed_sizeExceeded:"تعذر الحفظ في قاعدة البيانات، يبدو أن القماش كبير للغاية، يفضّل حفظ الملف محليا كي لا تفقد عملك.",imageToolNotSupported:"",brave_measure_text_error:{line1:"يبدو أنك تستخدم متصفح Brave مع إعداد <bold>حظر صارم لتتبع البصمة</bold>.",line2:"قد يؤدي هذا إلى كسر <bold>عناصر النص</bold> في الرسومات الخاصة بك.",line3:"من المستحسن إلغاء تفعيل هذا الإعداد. يمكنك اتباع <link>هذه الخطوات</link> لفعل ذلك.",line4:"إذا لم يصلح تعطيل هذا الإعداد طريقة عرض النصوص، الرجاء كتابة <issueLink>بلاغ</issueLink> على حسابنا في GitHub، أو راسلنا على <discordLink>Discord</discordLink>"},libraryElementTypeError:{embeddable:"لا يمكن إضافة العناصر القابلة للتضمين في المكتبة.",iframe:"",image:"سوف يتم دعم إضافة صور إلى المكتبة قريباً!"},asyncPasteFailedOnRead:"",asyncPasteFailedOnParse:"",copyToSystemClipboardFailed:""},t={selection:"تحديد",image:"إدراج صورة",rectangle:"مستطيل",diamond:"مضلع",ellipse:"دائرة",arrow:"سهم",line:"خط",freedraw:"رسم",text:"نص",library:"مكتبة",lock:"الحفاظ على أداة التحديد نشطة بعد الرسم",penMode:"وضع القلم - امنع اللمس",link:"إضافة/تحديث الرابط للشكل المحدد",eraser:"ممحاة",frame:"أداة الإطار",magicframe:"",embeddable:"تضمين ويب",laser:"مؤشر ليزر",hand:"يد (أداة الإزاحة)",extraTools:"المزيد من أﻷدوات",mermaidToExcalidraw:"",magicSettings:""},a={canvasActions:"إجراءات اللوحة",selectedShapeActions:"إجراءات الشكل المحدد",shapes:"الأشكال"},i={canvasPanning:"لتحريك القماش، اضغط على عجلة الفأرة أو مفتاح المسافة أثناء السحب، أو استخدم أداة اليد",linearElement:"انقر لبدء نقاط متعددة، اسحب لخط واحد",freeDraw:"انقر واسحب، افرج عند الانتهاء",text:"نصيحة: يمكنك أيضًا إضافة نص بالنقر المزدوج في أي مكان بأداة الاختيار",embeddable:"اضغط مع السحب لإنشاء موقع ويب مضمّن",text_selected:"انقر نقراً مزدوجاً أو اضغط ادخال لتعديل النص",text_editing:"اضغط على Esc أو (Ctrl أو Cmd) + Enter لإنهاء التعديل",linearElementMulti:"انقر فوق النقطة الأخيرة أو اضغط على Esc أو Enter للإنهاء",lockAngle:"يمكنك تقييد الزاوية بالضغط على SHIFT",resize:`يمكنك تقييد النسب بالضغط على SHIFT أثناء تغيير الحجم،
@@ -1,4 +1,4 @@
1
- import{p as he}from"./chunk-JWPE2WC7-Cq6Q947j.js";import{_ as l,D as fe,R as ge,l as K,b as ue,a as pe,o as me,p as ye,g as we,s as ke,q as xe,A as ve,y as $e,B as be,c as H,a5 as J,a3 as Y,i as Ee,r as Se,a4 as Ae,a6 as De}from"./mermaid.core-Dd-D7tJ4.js";import{p as Te}from"./cynefin-OW5HDTMX-BVK0_S--.js";import{c as Q}from"./cytoscape.esm-By_5ytxT.js";import{f as Ie}from"./cytoscape-fcose-DEjGNOBW.js";import{s as Ce}from"./index-CyZxCTSq.js";import"../datalayer-app-main.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./dayjs.min-u3zuoSR8.js";var q={L:"left",R:"right",T:"top",B:"bottom"},V={L:l(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:l(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:l(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:l(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},j={L:l((e,t)=>e-t+2,"L"),R:l((e,t)=>e-2,"R"),T:l((e,t)=>e-t+2,"T"),B:l((e,t)=>e-2,"B")},Me=l(function(e){return M(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),W=l(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),M=l(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=l(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),O=l(function(e,t){const r=M(e)&&z(t),s=z(e)&&M(t);return r||s},"isArchitectureDirectionXY"),Be=l(function(e){const t=e[0],r=e[1],s=M(t)&&z(r),i=z(t)&&M(r);return s||i},"isArchitecturePairXY"),Le=l(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),N=l(function(e,t){const r=`${e}${t}`;return Le(r)?r:void 0},"getArchitectureDirectionPair"),ze=l(function([e,t],r){const s=r[0],i=r[1];return M(s)?z(i)?[e+(s==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(s==="L"?-1:1),t]:M(i)?[e+(i==="L"?1:-1),t+(s==="T"?1:-1)]:[e,t+(s==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Fe=l(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Pe=l(function(e,t){return O(e,t)?"bend":M(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ge=l(function(e){return e.type==="service"},"isArchitectureService"),Re=l(function(e){return e.type==="junction"},"isArchitectureJunction"),U=l((e,t)=>{const[r,s]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(s)}`},"architectureGroupAlignmentKey"),ee=l(e=>e.data(),"edgeData"),G=l(e=>e.data(),"nodeData"),je=be.architecture,te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=ue,this.getAccTitle=pe,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=we,this.setAccDescription=ke,this.clear()}static{l(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",xe()}addService({id:e,icon:t,in:r,title:s,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:s,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(Ge)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(Re)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:s}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:s,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:s,lhsInto:i,rhsInto:f,lhsGroup:g,rhsGroup:d,title:h}){if(!W(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!W(s))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(s)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=this.nodes.get(e).in,c=this.nodes.get(t).in;if(g&&n&&c&&n==c)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(d&&n&&c&&n==c)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:g,rhsId:t,rhsDir:s,rhsInto:f,rhsGroup:d,title:h};this.edges.push(a);const o=this.nodes.get(e),u=this.nodes.get(t);o&&u&&(o.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const e=new Map,t=new Map;for(const[g,d]of this.nodes.entries()){const h=new Map;for(const n of d.edges){const c=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(c&&a&&c!==a){const o=Pe(n.lhsDir,n.rhsDir);o!=="bend"&&e.set(U(c,a),o)}if(n.lhsId===g){const o=N(n.lhsDir,n.rhsDir);o&&h.set(o,n.rhsId)}else{const o=N(n.rhsDir,n.lhsDir);o&&h.set(o,n.lhsId)}}t.set(g,h)}const r=new Set,s=new Set(t.keys()),i=l(g=>{const d=new Map([[g,[0,0]]]),h=[g];for(;h.length>0;){const n=h.shift();if(n){r.add(n),s.delete(n);const c=t.get(n);if(!c)throw new Error(`BFS error: adjacency list for id ${n} not found. Please report this as a bug.`);const a=d.get(n);if(!a)throw new Error(`BFS error: position for id ${n} not found in spatial map. Please report this as a bug.`);const[o,u]=a;c.forEach((y,m)=>{r.has(y)||(d.set(y,ze([o,u],m)),h.push(y))})}}return d},"BFS"),f=[];for(;s.size>0;){const g=s.values().next().value;f.push(i(g))}this.dataStructures={adjList:t,spatialMaps:f,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return ve({...je,...$e().architecture})}getConfigField(e){return this.getConfig()[e]}},Xe=l((e,t)=>{he(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),re={parser:{yy:void 0},parse:l(async e=>{const t=await Te("architecture",e);K.debug(t);const r=re.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Xe(t,r)},"parse")},Ye=l(e=>`
1
+ import{p as he}from"./chunk-JWPE2WC7-DXZeG2qg.js";import{_ as l,D as fe,R as ge,l as K,b as ue,a as pe,o as me,p as ye,g as we,s as ke,q as xe,A as ve,y as $e,B as be,c as H,a5 as J,a3 as Y,i as Ee,r as Se,a4 as Ae,a6 as De}from"./mermaid.core-DMHnDUdQ.js";import{p as Te}from"./cynefin-OW5HDTMX-BVK0_S--.js";import{c as Q}from"./cytoscape.esm-By_5ytxT.js";import{f as Ie}from"./cytoscape-fcose-DEjGNOBW.js";import{s as Ce}from"./index-CyZxCTSq.js";import"../datalayer-app-main.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./dayjs.min-u3zuoSR8.js";var q={L:"left",R:"right",T:"top",B:"bottom"},V={L:l(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:l(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:l(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:l(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},j={L:l((e,t)=>e-t+2,"L"),R:l((e,t)=>e-2,"R"),T:l((e,t)=>e-t+2,"T"),B:l((e,t)=>e-2,"B")},Me=l(function(e){return M(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),W=l(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),M=l(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=l(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),O=l(function(e,t){const r=M(e)&&z(t),s=z(e)&&M(t);return r||s},"isArchitectureDirectionXY"),Be=l(function(e){const t=e[0],r=e[1],s=M(t)&&z(r),i=z(t)&&M(r);return s||i},"isArchitecturePairXY"),Le=l(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),N=l(function(e,t){const r=`${e}${t}`;return Le(r)?r:void 0},"getArchitectureDirectionPair"),ze=l(function([e,t],r){const s=r[0],i=r[1];return M(s)?z(i)?[e+(s==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(s==="L"?-1:1),t]:M(i)?[e+(i==="L"?1:-1),t+(s==="T"?1:-1)]:[e,t+(s==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Fe=l(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Pe=l(function(e,t){return O(e,t)?"bend":M(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ge=l(function(e){return e.type==="service"},"isArchitectureService"),Re=l(function(e){return e.type==="junction"},"isArchitectureJunction"),U=l((e,t)=>{const[r,s]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(s)}`},"architectureGroupAlignmentKey"),ee=l(e=>e.data(),"edgeData"),G=l(e=>e.data(),"nodeData"),je=be.architecture,te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=ue,this.getAccTitle=pe,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=we,this.setAccDescription=ke,this.clear()}static{l(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",xe()}addService({id:e,icon:t,in:r,title:s,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:s,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(Ge)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(Re)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:s}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:s,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:s,lhsInto:i,rhsInto:f,lhsGroup:g,rhsGroup:d,title:h}){if(!W(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!W(s))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(s)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=this.nodes.get(e).in,c=this.nodes.get(t).in;if(g&&n&&c&&n==c)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(d&&n&&c&&n==c)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:g,rhsId:t,rhsDir:s,rhsInto:f,rhsGroup:d,title:h};this.edges.push(a);const o=this.nodes.get(e),u=this.nodes.get(t);o&&u&&(o.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const e=new Map,t=new Map;for(const[g,d]of this.nodes.entries()){const h=new Map;for(const n of d.edges){const c=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(c&&a&&c!==a){const o=Pe(n.lhsDir,n.rhsDir);o!=="bend"&&e.set(U(c,a),o)}if(n.lhsId===g){const o=N(n.lhsDir,n.rhsDir);o&&h.set(o,n.rhsId)}else{const o=N(n.rhsDir,n.lhsDir);o&&h.set(o,n.lhsId)}}t.set(g,h)}const r=new Set,s=new Set(t.keys()),i=l(g=>{const d=new Map([[g,[0,0]]]),h=[g];for(;h.length>0;){const n=h.shift();if(n){r.add(n),s.delete(n);const c=t.get(n);if(!c)throw new Error(`BFS error: adjacency list for id ${n} not found. Please report this as a bug.`);const a=d.get(n);if(!a)throw new Error(`BFS error: position for id ${n} not found in spatial map. Please report this as a bug.`);const[o,u]=a;c.forEach((y,m)=>{r.has(y)||(d.set(y,ze([o,u],m)),h.push(y))})}}return d},"BFS"),f=[];for(;s.size>0;){const g=s.values().next().value;f.push(i(g))}this.dataStructures={adjList:t,spatialMaps:f,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return ve({...je,...$e().architecture})}getConfigField(e){return this.getConfig()[e]}},Xe=l((e,t)=>{he(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),re={parser:{yy:void 0},parse:l(async e=>{const t=await Te("architecture",e);K.debug(t);const r=re.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Xe(t,r)},"parse")},Ye=l(e=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};
@@ -1,4 +1,4 @@
1
- import{p as he}from"./chunk-JWPE2WC7-Bf4pFlIJ.js";import{_ as l,D as fe,R as ge,l as K,b as ue,a as pe,o as me,p as ye,g as we,s as ke,q as xe,A as ve,B as $e,y as be,c as H,a5 as J,a3 as Y,i as Ee,r as Se,a4 as Ae,a6 as De}from"./index-DObGLuCI.js";import{p as Te}from"./cynefin-OW5HDTMX-BBLugbYz.js";import{c as Q}from"./cytoscape.esm-By_5ytxT.js";import{f as Ie}from"./cytoscape-fcose-DEjGNOBW.js";import{s as Ce}from"./index-CyZxCTSq.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./dayjs.min-u3zuoSR8.js";var q={L:"left",R:"right",T:"top",B:"bottom"},V={L:l(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:l(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:l(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:l(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},j={L:l((e,t)=>e-t+2,"L"),R:l((e,t)=>e-2,"R"),T:l((e,t)=>e-t+2,"T"),B:l((e,t)=>e-2,"B")},Me=l(function(e){return M(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),W=l(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),M=l(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=l(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),O=l(function(e,t){const r=M(e)&&z(t),s=z(e)&&M(t);return r||s},"isArchitectureDirectionXY"),Be=l(function(e){const t=e[0],r=e[1],s=M(t)&&z(r),i=z(t)&&M(r);return s||i},"isArchitecturePairXY"),Le=l(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),N=l(function(e,t){const r=`${e}${t}`;return Le(r)?r:void 0},"getArchitectureDirectionPair"),ze=l(function([e,t],r){const s=r[0],i=r[1];return M(s)?z(i)?[e+(s==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(s==="L"?-1:1),t]:M(i)?[e+(i==="L"?1:-1),t+(s==="T"?1:-1)]:[e,t+(s==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Fe=l(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Pe=l(function(e,t){return O(e,t)?"bend":M(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ge=l(function(e){return e.type==="service"},"isArchitectureService"),Re=l(function(e){return e.type==="junction"},"isArchitectureJunction"),U=l((e,t)=>{const[r,s]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(s)}`},"architectureGroupAlignmentKey"),ee=l(e=>e.data(),"edgeData"),G=l(e=>e.data(),"nodeData"),je=$e.architecture,te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=ue,this.getAccTitle=pe,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=we,this.setAccDescription=ke,this.clear()}static{l(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",xe()}addService({id:e,icon:t,in:r,title:s,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:s,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(Ge)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(Re)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:s}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:s,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:s,lhsInto:i,rhsInto:f,lhsGroup:g,rhsGroup:d,title:h}){if(!W(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!W(s))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(s)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=this.nodes.get(e).in,c=this.nodes.get(t).in;if(g&&n&&c&&n==c)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(d&&n&&c&&n==c)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:g,rhsId:t,rhsDir:s,rhsInto:f,rhsGroup:d,title:h};this.edges.push(a);const o=this.nodes.get(e),u=this.nodes.get(t);o&&u&&(o.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const e=new Map,t=new Map;for(const[g,d]of this.nodes.entries()){const h=new Map;for(const n of d.edges){const c=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(c&&a&&c!==a){const o=Pe(n.lhsDir,n.rhsDir);o!=="bend"&&e.set(U(c,a),o)}if(n.lhsId===g){const o=N(n.lhsDir,n.rhsDir);o&&h.set(o,n.rhsId)}else{const o=N(n.rhsDir,n.lhsDir);o&&h.set(o,n.lhsId)}}t.set(g,h)}const r=new Set,s=new Set(t.keys()),i=l(g=>{const d=new Map([[g,[0,0]]]),h=[g];for(;h.length>0;){const n=h.shift();if(n){r.add(n),s.delete(n);const c=t.get(n);if(!c)throw new Error(`BFS error: adjacency list for id ${n} not found. Please report this as a bug.`);const a=d.get(n);if(!a)throw new Error(`BFS error: position for id ${n} not found in spatial map. Please report this as a bug.`);const[o,u]=a;c.forEach((y,m)=>{r.has(y)||(d.set(y,ze([o,u],m)),h.push(y))})}}return d},"BFS"),f=[];for(;s.size>0;){const g=s.values().next().value;f.push(i(g))}this.dataStructures={adjList:t,spatialMaps:f,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return ve({...je,...be().architecture})}getConfigField(e){return this.getConfig()[e]}},Xe=l((e,t)=>{he(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),re={parser:{yy:void 0},parse:l(async e=>{const t=await Te("architecture",e);K.debug(t);const r=re.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Xe(t,r)},"parse")},Ye=l(e=>`
1
+ import{p as he}from"./chunk-JWPE2WC7-NvLQtuoq.js";import{_ as l,D as fe,R as ge,l as K,b as ue,a as pe,o as me,p as ye,g as we,s as ke,q as xe,A as ve,B as $e,y as be,c as H,a5 as J,a3 as Y,i as Ee,r as Se,a4 as Ae,a6 as De}from"./index-s25RSqvt.js";import{p as Te}from"./cynefin-OW5HDTMX-BBLugbYz.js";import{c as Q}from"./cytoscape.esm-By_5ytxT.js";import{f as Ie}from"./cytoscape-fcose-DEjGNOBW.js";import{s as Ce}from"./index-CyZxCTSq.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./dayjs.min-u3zuoSR8.js";var q={L:"left",R:"right",T:"top",B:"bottom"},V={L:l(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:l(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:l(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:l(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},j={L:l((e,t)=>e-t+2,"L"),R:l((e,t)=>e-2,"R"),T:l((e,t)=>e-t+2,"T"),B:l((e,t)=>e-2,"B")},Me=l(function(e){return M(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),W=l(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),M=l(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=l(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),O=l(function(e,t){const r=M(e)&&z(t),s=z(e)&&M(t);return r||s},"isArchitectureDirectionXY"),Be=l(function(e){const t=e[0],r=e[1],s=M(t)&&z(r),i=z(t)&&M(r);return s||i},"isArchitecturePairXY"),Le=l(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),N=l(function(e,t){const r=`${e}${t}`;return Le(r)?r:void 0},"getArchitectureDirectionPair"),ze=l(function([e,t],r){const s=r[0],i=r[1];return M(s)?z(i)?[e+(s==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(s==="L"?-1:1),t]:M(i)?[e+(i==="L"?1:-1),t+(s==="T"?1:-1)]:[e,t+(s==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Fe=l(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Pe=l(function(e,t){return O(e,t)?"bend":M(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ge=l(function(e){return e.type==="service"},"isArchitectureService"),Re=l(function(e){return e.type==="junction"},"isArchitectureJunction"),U=l((e,t)=>{const[r,s]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(s)}`},"architectureGroupAlignmentKey"),ee=l(e=>e.data(),"edgeData"),G=l(e=>e.data(),"nodeData"),je=$e.architecture,te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=ue,this.getAccTitle=pe,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=we,this.setAccDescription=ke,this.clear()}static{l(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",xe()}addService({id:e,icon:t,in:r,title:s,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:s,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(Ge)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(Re)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:s}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:s,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:s,lhsInto:i,rhsInto:f,lhsGroup:g,rhsGroup:d,title:h}){if(!W(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!W(s))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(s)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=this.nodes.get(e).in,c=this.nodes.get(t).in;if(g&&n&&c&&n==c)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(d&&n&&c&&n==c)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:g,rhsId:t,rhsDir:s,rhsInto:f,rhsGroup:d,title:h};this.edges.push(a);const o=this.nodes.get(e),u=this.nodes.get(t);o&&u&&(o.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const e=new Map,t=new Map;for(const[g,d]of this.nodes.entries()){const h=new Map;for(const n of d.edges){const c=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(c&&a&&c!==a){const o=Pe(n.lhsDir,n.rhsDir);o!=="bend"&&e.set(U(c,a),o)}if(n.lhsId===g){const o=N(n.lhsDir,n.rhsDir);o&&h.set(o,n.rhsId)}else{const o=N(n.rhsDir,n.lhsDir);o&&h.set(o,n.lhsId)}}t.set(g,h)}const r=new Set,s=new Set(t.keys()),i=l(g=>{const d=new Map([[g,[0,0]]]),h=[g];for(;h.length>0;){const n=h.shift();if(n){r.add(n),s.delete(n);const c=t.get(n);if(!c)throw new Error(`BFS error: adjacency list for id ${n} not found. Please report this as a bug.`);const a=d.get(n);if(!a)throw new Error(`BFS error: position for id ${n} not found in spatial map. Please report this as a bug.`);const[o,u]=a;c.forEach((y,m)=>{r.has(y)||(d.set(y,ze([o,u],m)),h.push(y))})}}return d},"BFS"),f=[];for(;s.size>0;){const g=s.values().next().value;f.push(i(g))}this.dataStructures={adjList:t,spatialMaps:f,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return ve({...je,...be().architecture})}getConfigField(e){return this.getConfig()[e]}},Xe=l((e,t)=>{he(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),re={parser:{yy:void 0},parse:l(async e=>{const t=await Te("architecture",e);K.debug(t);const r=re.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Xe(t,r)},"parse")},Ye=l(e=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};
@@ -1,4 +1,4 @@
1
- import{p as he}from"./chunk-JWPE2WC7-BVXd-ICe.js";import{_ as l,D as fe,R as ge,l as K,b as ue,a as pe,o as me,p as ye,g as we,s as ke,q as xe,A as ve,B as $e,y as be,c as H,a5 as J,a3 as Y,i as Ee,r as Se,a4 as Ae,a6 as De}from"./index-Df2MkvAW.js";import{p as Te}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import{c as Q}from"./cytoscape.esm-By_5ytxT.js";import{f as Ie}from"./cytoscape-fcose-DEjGNOBW.js";import{s as Ce}from"./index-CyZxCTSq.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./dayjs.min-u3zuoSR8.js";var q={L:"left",R:"right",T:"top",B:"bottom"},V={L:l(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:l(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:l(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:l(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},j={L:l((e,t)=>e-t+2,"L"),R:l((e,t)=>e-2,"R"),T:l((e,t)=>e-t+2,"T"),B:l((e,t)=>e-2,"B")},Me=l(function(e){return M(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),W=l(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),M=l(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=l(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),O=l(function(e,t){const r=M(e)&&z(t),s=z(e)&&M(t);return r||s},"isArchitectureDirectionXY"),Be=l(function(e){const t=e[0],r=e[1],s=M(t)&&z(r),i=z(t)&&M(r);return s||i},"isArchitecturePairXY"),Le=l(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),N=l(function(e,t){const r=`${e}${t}`;return Le(r)?r:void 0},"getArchitectureDirectionPair"),ze=l(function([e,t],r){const s=r[0],i=r[1];return M(s)?z(i)?[e+(s==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(s==="L"?-1:1),t]:M(i)?[e+(i==="L"?1:-1),t+(s==="T"?1:-1)]:[e,t+(s==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Fe=l(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Pe=l(function(e,t){return O(e,t)?"bend":M(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ge=l(function(e){return e.type==="service"},"isArchitectureService"),Re=l(function(e){return e.type==="junction"},"isArchitectureJunction"),U=l((e,t)=>{const[r,s]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(s)}`},"architectureGroupAlignmentKey"),ee=l(e=>e.data(),"edgeData"),G=l(e=>e.data(),"nodeData"),je=$e.architecture,te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=ue,this.getAccTitle=pe,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=we,this.setAccDescription=ke,this.clear()}static{l(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",xe()}addService({id:e,icon:t,in:r,title:s,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:s,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(Ge)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(Re)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:s}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:s,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:s,lhsInto:i,rhsInto:f,lhsGroup:g,rhsGroup:d,title:h}){if(!W(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!W(s))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(s)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=this.nodes.get(e).in,c=this.nodes.get(t).in;if(g&&n&&c&&n==c)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(d&&n&&c&&n==c)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:g,rhsId:t,rhsDir:s,rhsInto:f,rhsGroup:d,title:h};this.edges.push(a);const o=this.nodes.get(e),u=this.nodes.get(t);o&&u&&(o.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const e=new Map,t=new Map;for(const[g,d]of this.nodes.entries()){const h=new Map;for(const n of d.edges){const c=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(c&&a&&c!==a){const o=Pe(n.lhsDir,n.rhsDir);o!=="bend"&&e.set(U(c,a),o)}if(n.lhsId===g){const o=N(n.lhsDir,n.rhsDir);o&&h.set(o,n.rhsId)}else{const o=N(n.rhsDir,n.lhsDir);o&&h.set(o,n.lhsId)}}t.set(g,h)}const r=new Set,s=new Set(t.keys()),i=l(g=>{const d=new Map([[g,[0,0]]]),h=[g];for(;h.length>0;){const n=h.shift();if(n){r.add(n),s.delete(n);const c=t.get(n);if(!c)throw new Error(`BFS error: adjacency list for id ${n} not found. Please report this as a bug.`);const a=d.get(n);if(!a)throw new Error(`BFS error: position for id ${n} not found in spatial map. Please report this as a bug.`);const[o,u]=a;c.forEach((y,m)=>{r.has(y)||(d.set(y,ze([o,u],m)),h.push(y))})}}return d},"BFS"),f=[];for(;s.size>0;){const g=s.values().next().value;f.push(i(g))}this.dataStructures={adjList:t,spatialMaps:f,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return ve({...je,...be().architecture})}getConfigField(e){return this.getConfig()[e]}},Xe=l((e,t)=>{he(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),re={parser:{yy:void 0},parse:l(async e=>{const t=await Te("architecture",e);K.debug(t);const r=re.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Xe(t,r)},"parse")},Ye=l(e=>`
1
+ import{p as he}from"./chunk-JWPE2WC7-BGdc9-bH.js";import{_ as l,D as fe,R as ge,l as K,b as ue,a as pe,o as me,p as ye,g as we,s as ke,q as xe,A as ve,B as $e,y as be,c as H,a5 as J,a3 as Y,i as Ee,r as Se,a4 as Ae,a6 as De}from"./index-CLB4KPZs.js";import{p as Te}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import{c as Q}from"./cytoscape.esm-By_5ytxT.js";import{f as Ie}from"./cytoscape-fcose-DEjGNOBW.js";import{s as Ce}from"./index-CyZxCTSq.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./fastdom-promised-Cw4_bL92.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./dayjs.min-u3zuoSR8.js";var q={L:"left",R:"right",T:"top",B:"bottom"},V={L:l(e=>`${e},${e/2} 0,${e} 0,0`,"L"),R:l(e=>`0,${e/2} ${e},0 ${e},${e}`,"R"),T:l(e=>`0,0 ${e},0 ${e/2},${e}`,"T"),B:l(e=>`${e/2},0 ${e},${e} 0,${e}`,"B")},j={L:l((e,t)=>e-t+2,"L"),R:l((e,t)=>e-2,"R"),T:l((e,t)=>e-t+2,"T"),B:l((e,t)=>e-2,"B")},Me=l(function(e){return M(e)?e==="L"?"R":"L":e==="T"?"B":"T"},"getOppositeArchitectureDirection"),W=l(function(e){const t=e;return t==="L"||t==="R"||t==="T"||t==="B"},"isArchitectureDirection"),M=l(function(e){const t=e;return t==="L"||t==="R"},"isArchitectureDirectionX"),z=l(function(e){const t=e;return t==="T"||t==="B"},"isArchitectureDirectionY"),O=l(function(e,t){const r=M(e)&&z(t),s=z(e)&&M(t);return r||s},"isArchitectureDirectionXY"),Be=l(function(e){const t=e[0],r=e[1],s=M(t)&&z(r),i=z(t)&&M(r);return s||i},"isArchitecturePairXY"),Le=l(function(e){return e!=="LL"&&e!=="RR"&&e!=="TT"&&e!=="BB"},"isValidArchitectureDirectionPair"),N=l(function(e,t){const r=`${e}${t}`;return Le(r)?r:void 0},"getArchitectureDirectionPair"),ze=l(function([e,t],r){const s=r[0],i=r[1];return M(s)?z(i)?[e+(s==="L"?-1:1),t+(i==="T"?1:-1)]:[e+(s==="L"?-1:1),t]:M(i)?[e+(i==="L"?1:-1),t+(s==="T"?1:-1)]:[e,t+(s==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Fe=l(function(e){return e==="LT"||e==="TL"?[1,1]:e==="BL"||e==="LB"?[1,-1]:e==="BR"||e==="RB"?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),Pe=l(function(e,t){return O(e,t)?"bend":M(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),Ge=l(function(e){return e.type==="service"},"isArchitectureService"),Re=l(function(e){return e.type==="junction"},"isArchitectureJunction"),U=l((e,t)=>{const[r,s]=[e,t].sort();return`${JSON.stringify(r)}-${JSON.stringify(s)}`},"architectureGroupAlignmentKey"),ee=l(e=>e.data(),"edgeData"),G=l(e=>e.data(),"nodeData"),je=$e.architecture,te=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=ue,this.getAccTitle=pe,this.setDiagramTitle=me,this.getDiagramTitle=ye,this.getAccDescription=we,this.setAccDescription=ke,this.clear()}static{l(this,"ArchitectureDB")}setDiagramId(e){this.diagramId=e}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",xe()}addService({id:e,icon:t,in:r,title:s,iconText:i}){if(this.registeredIds.has(e))throw new Error(`The service id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(r)==="node")throw new Error(`The service [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"service",icon:t,iconText:i,title:s,edges:[],in:r})}getServices(){return[...this.nodes.values()].filter(Ge)}addJunction({id:e,in:t}){if(this.registeredIds.has(e))throw new Error(`The junction id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(t!==void 0){if(e===t)throw new Error(`The junction [${e}] cannot be placed within itself`);if(!this.registeredIds.has(t))throw new Error(`The junction [${e}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(t)==="node")throw new Error(`The junction [${e}]'s parent is not a group`)}this.registeredIds.set(e,"node"),this.nodes.set(e,{id:e,type:"junction",edges:[],in:t})}getJunctions(){return[...this.nodes.values()].filter(Re)}getNodes(){return[...this.nodes.values()]}getNode(e){return this.nodes.get(e)??null}addGroup({id:e,icon:t,in:r,title:s}){if(this.registeredIds.has(e))throw new Error(`The group id [${e}] is already in use by another ${this.registeredIds.get(e)}`);if(r!==void 0){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(!this.registeredIds.has(r))throw new Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(r)==="node")throw new Error(`The group [${e}]'s parent is not a group`)}this.registeredIds.set(e,"group"),this.groups.set(e,{id:e,icon:t,title:s,in:r})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:e,rhsId:t,lhsDir:r,rhsDir:s,lhsInto:i,rhsInto:f,lhsGroup:g,rhsGroup:d,title:h}){if(!W(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);if(!W(s))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(s)}`);if(!this.nodes.has(e)&&!this.groups.has(e))throw new Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(t)&&!this.groups.has(t))throw new Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);const n=this.nodes.get(e).in,c=this.nodes.get(t).in;if(g&&n&&c&&n==c)throw new Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(d&&n&&c&&n==c)throw new Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);const a={lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:g,rhsId:t,rhsDir:s,rhsInto:f,rhsGroup:d,title:h};this.edges.push(a);const o=this.nodes.get(e),u=this.nodes.get(t);o&&u&&(o.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1]))}getEdges(){return this.edges}addLayoutHint(e){if(e.members.length<2)throw new Error(`An align directive requires at least two members; got ${e.members.length}`);const t=new Set;e.members.forEach(r=>{if(this.registeredIds.get(r)!=="node")throw new Error(`align ${e.direction} references [${r}], which is not a service or junction`);if(t.has(r))throw new Error(`align ${e.direction} lists [${r}] more than once`);t.add(r)}),this.layoutHints.push(e)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){const e=new Map,t=new Map;for(const[g,d]of this.nodes.entries()){const h=new Map;for(const n of d.edges){const c=this.getNode(n.lhsId)?.in,a=this.getNode(n.rhsId)?.in;if(c&&a&&c!==a){const o=Pe(n.lhsDir,n.rhsDir);o!=="bend"&&e.set(U(c,a),o)}if(n.lhsId===g){const o=N(n.lhsDir,n.rhsDir);o&&h.set(o,n.rhsId)}else{const o=N(n.rhsDir,n.lhsDir);o&&h.set(o,n.lhsId)}}t.set(g,h)}const r=new Set,s=new Set(t.keys()),i=l(g=>{const d=new Map([[g,[0,0]]]),h=[g];for(;h.length>0;){const n=h.shift();if(n){r.add(n),s.delete(n);const c=t.get(n);if(!c)throw new Error(`BFS error: adjacency list for id ${n} not found. Please report this as a bug.`);const a=d.get(n);if(!a)throw new Error(`BFS error: position for id ${n} not found in spatial map. Please report this as a bug.`);const[o,u]=a;c.forEach((y,m)=>{r.has(y)||(d.set(y,ze([o,u],m)),h.push(y))})}}return d},"BFS"),f=[];for(;s.size>0;){const g=s.values().next().value;f.push(i(g))}this.dataStructures={adjList:t,spatialMaps:f,groupAlignments:e}}return this.dataStructures}setElementForId(e,t){this.elements.set(e,t)}getElementById(e){return this.elements.get(e)}getConfig(){return ve({...je,...be().architecture})}getConfigField(e){return this.getConfig()[e]}},Xe=l((e,t)=>{he(e,t),e.groups.map(r=>t.addGroup(r)),e.services.map(r=>t.addService({...r,type:"service"})),e.junctions.map(r=>t.addJunction({...r,type:"junction"})),e.edges.map(r=>t.addEdge(r)),e.alignments?.map(r=>t.addLayoutHint({direction:r.direction,members:[...r.members]}))},"populateDb"),re={parser:{yy:void 0},parse:l(async e=>{const t=await Te("architecture",e);K.debug(t);const r=re.parser?.yy;if(!(r instanceof te))throw new Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Xe(t,r)},"parse")},Ye=l(e=>`
2
2
  .edge {
3
3
  stroke-width: ${e.archEdgeWidth};
4
4
  stroke: ${e.archEdgeColor};