@datalayer/agent-runtimes 1.6.98 → 1.6.99

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 (357) hide show
  1. package/dist-embed/chunks/{AgentDetails-CqMfY8zN.js → AgentDetails-Dc-zAfsd.js} +1 -1
  2. package/dist-embed/chunks/{AgentDetailsDialog-lxnKA_dF.js → AgentDetailsDialog-D2ezFFlA.js} +1 -1
  3. package/dist-embed/chunks/{CellSidebarExtension-CrdbRLaE.js → CellSidebarExtension-umk7yQhN.js} +1 -1
  4. package/dist-embed/chunks/ChatView-BDvwDtXF.js +32 -0
  5. package/dist-embed/chunks/{CollapsiblePlugin-CnG1qA1e.js → CollapsiblePlugin-7P9eK3oU.js} +1 -1
  6. package/dist-embed/chunks/{ContextPie-DAZz2yzl.js → ContextPie-DaHEeHxd.js} +1 -1
  7. package/dist-embed/chunks/{DeckComponent-qAMqKLzs.js → DeckComponent-DQ2W1Fj7.js} +1 -1
  8. package/dist-embed/chunks/{DeckRenderer-DQmjQ_vE.js → DeckRenderer-BdATImsV.js} +2 -2
  9. package/dist-embed/chunks/{DeckStage-LDi6nZOg.js → DeckStage-BaIwK7uO.js} +2 -2
  10. package/dist-embed/chunks/{DiagramView-CpCoC99y.js → DiagramView-CUf_ij9A.js} +1 -1
  11. package/dist-embed/chunks/{DocumentView-B-lWAJgm.js → DocumentView-BXE42g3H.js} +1 -1
  12. package/dist-embed/chunks/{DrawingStage-DEeTWKLT.js → DrawingStage-B9AOjEPj.js} +1 -1
  13. package/dist-embed/chunks/{EphemeralDocument-CZNRDs_b.js → EphemeralDocument-BlvZagtH.js} +1 -1
  14. package/dist-embed/chunks/{EphemeralNotebook-BDutT9GQ.js → EphemeralNotebook-gz0sG8Hk.js} +1 -1
  15. package/dist-embed/chunks/{ExcalidrawComponent-CmJy7bb4.js → ExcalidrawComponent-Bc1UIgcH.js} +1 -1
  16. package/dist-embed/chunks/{ExcalidrawModal-D_DmAro7.js → ExcalidrawModal-Cp4Da2nV.js} +1 -1
  17. package/dist-embed/chunks/{FormulaBar-f9U7lupQ.js → FormulaBar-BUs-n7Zc.js} +1 -1
  18. package/dist-embed/chunks/{JupyterLexicalExtension-DpGAnn7v.js → JupyterLexicalExtension-Be8mweC6.js} +9 -9
  19. package/dist-embed/chunks/{KernelVariables-BIWju6rZ.js → KernelVariables-xXzfdk5t.js} +1 -1
  20. package/dist-embed/chunks/{LexicalToolRegistry-BqxU1w4N.js → LexicalToolRegistry-DI_iHg04.js} +1 -1
  21. package/dist-embed/chunks/{NotebookToolSurfaces-CqU9CVCl.js → NotebookToolSurfaces-BmBGWX9x.js} +1 -1
  22. package/dist-embed/chunks/{NotebookView-CpOBHIut.js → NotebookView-D4hr5dD7.js} +1 -1
  23. package/dist-embed/chunks/{Output-DLpf2Of9.js → Output-WQnm0VN5.js} +6 -6
  24. package/dist-embed/chunks/{SandboxDetailsDialog-yUjpxBdw.js → SandboxDetailsDialog-DujTXXdD.js} +1 -1
  25. package/dist-embed/chunks/SchemaForm-CL6wJsI5.js +1 -0
  26. package/dist-embed/chunks/{SheetStage-gUVhALxR.js → SheetStage-BCq1DaET.js} +1 -1
  27. package/dist-embed/chunks/{SheetTabs-sx_-jWyq.js → SheetTabs-BZP7_RGB.js} +1 -1
  28. package/dist-embed/chunks/SignInIcon-D1-wo8qx.js +1 -0
  29. package/dist-embed/chunks/{SpreadsheetPreviewView-C9LaI5mp.js → SpreadsheetPreviewView-D_LLvpPF.js} +1 -1
  30. package/dist-embed/chunks/{SpreadsheetView-FfnOGHeU.js → SpreadsheetView-BT4Rr56c.js} +1 -1
  31. package/dist-embed/chunks/{WidgetVariableView-CKcw-pPX.js → WidgetVariableView-DAz5YxtA.js} +1 -1
  32. package/dist-embed/chunks/{YouTubePlugin-DUDVTb3B.js → YouTubePlugin-DgTStKvk.js} +1 -1
  33. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BM2pAacI.js → abnfDiagram-VCTEODGH-B5LqqmCZ.js} +1 -1
  34. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-B0MQRzNo.js → abnfDiagram-VCTEODGH-BsJXEg6b.js} +1 -1
  35. package/dist-embed/chunks/{abnfDiagram-VCTEODGH-fcR8gNdJ.js → abnfDiagram-VCTEODGH-DP066SC3.js} +1 -1
  36. package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BfVZMCow.js → ar-SA-G6X2FPQ2-DwPbQVyE.js} +1 -1
  37. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-CnP0s6uJ.js → architectureDiagram-5GKGNRK7-C7914IyO.js} +1 -1
  38. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-GZ5981UE.js → architectureDiagram-5GKGNRK7-CAe4xseh.js} +1 -1
  39. package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-Cpu0tfD1.js → architectureDiagram-5GKGNRK7-O1s7O7KE.js} +1 -1
  40. package/dist-embed/chunks/{az-AZ-76LH7QW2-BeD9jzcd.js → az-AZ-76LH7QW2-CnpysEBO.js} +1 -1
  41. package/dist-embed/chunks/{bg-BG-XCXSNQG7-VUraF-a0.js → bg-BG-XCXSNQG7-DJUiP_6F.js} +1 -1
  42. package/dist-embed/chunks/{blockDiagram-868be97b-BK7odeOZ.js → blockDiagram-868be97b-DNJtOmrO.js} +1 -1
  43. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BMQSOcOL.js → blockDiagram-I7D4REHJ-BDRQoIKI.js} +1 -1
  44. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CZlh2u1A.js → blockDiagram-I7D4REHJ-BO6TccV1.js} +1 -1
  45. package/dist-embed/chunks/{blockDiagram-I7D4REHJ-DiBWN476.js → blockDiagram-I7D4REHJ-BWNVQ7Gz.js} +1 -1
  46. package/dist-embed/chunks/{bn-BD-2XOGV67Q-DjghL9Ba.js → bn-BD-2XOGV67Q-VQD-Kmco.js} +1 -1
  47. package/dist-embed/chunks/{c4Diagram-3f4bdde3-CMf0cOcM.js → c4Diagram-3f4bdde3-Cj02FLSR.js} +1 -1
  48. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-plU3oizm.js → c4Diagram-7LVT6UL2-BPMcidFW.js} +1 -1
  49. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BYPUXI1P.js → c4Diagram-7LVT6UL2-CoSh2wjn.js} +1 -1
  50. package/dist-embed/chunks/{c4Diagram-7LVT6UL2-qmYneJtb.js → c4Diagram-7LVT6UL2-yq3lLpw3.js} +1 -1
  51. package/dist-embed/chunks/{ca-ES-6MX7JW3Y-J6FuV-ut.js → ca-ES-6MX7JW3Y-W4esLUmK.js} +1 -1
  52. package/dist-embed/chunks/{celltoolbartracker-0MFBHjtq.js → celltoolbartracker-CxRPC2_P.js} +1 -1
  53. package/dist-embed/chunks/{chunk-2Q5K7J3B-B5DIEbuU.js → chunk-2Q5K7J3B-BM6msVjQ.js} +1 -1
  54. package/dist-embed/chunks/{chunk-2Q5K7J3B-Cj3jAIkT.js → chunk-2Q5K7J3B-ClmjTuJ8.js} +1 -1
  55. package/dist-embed/chunks/{chunk-2Q5K7J3B-BfCPaxeK.js → chunk-2Q5K7J3B-Q4yuTBzL.js} +1 -1
  56. package/dist-embed/chunks/{chunk-5VM5RSS4-DYeTGvz7.js → chunk-5VM5RSS4-BcDuf73d.js} +1 -1
  57. package/dist-embed/chunks/{chunk-5VM5RSS4-g3id5Hpo.js → chunk-5VM5RSS4-daB-wV3g.js} +1 -1
  58. package/dist-embed/chunks/{chunk-5VM5RSS4-BZGDG9GF.js → chunk-5VM5RSS4-g3qUjK0w.js} +1 -1
  59. package/dist-embed/chunks/{chunk-F27PBJKO-DvclqQhV.js → chunk-F27PBJKO-BVFLgw2h.js} +1 -1
  60. package/dist-embed/chunks/{chunk-F27PBJKO-kACIRR-8.js → chunk-F27PBJKO-Bh4vuDL9.js} +1 -1
  61. package/dist-embed/chunks/{chunk-F27PBJKO-S3msebgW.js → chunk-F27PBJKO-CeF8R-xY.js} +1 -1
  62. package/dist-embed/chunks/{chunk-IMKFNOWR-DjIARM3y.js → chunk-IMKFNOWR-D0xfV4fA.js} +1 -1
  63. package/dist-embed/chunks/{chunk-IMKFNOWR-SiS0o9FR.js → chunk-IMKFNOWR-DihmSer8.js} +1 -1
  64. package/dist-embed/chunks/{chunk-IMKFNOWR-Ch7v5XHt.js → chunk-IMKFNOWR-JVdSvsGK.js} +1 -1
  65. package/dist-embed/chunks/{chunk-JWPE2WC7-BwLKeh91.js → chunk-JWPE2WC7-B9R3G9XV.js} +1 -1
  66. package/dist-embed/chunks/{chunk-JWPE2WC7-CVacxpin.js → chunk-JWPE2WC7-R5kOKFCi.js} +1 -1
  67. package/dist-embed/chunks/{chunk-JWPE2WC7-M6oulZhu.js → chunk-JWPE2WC7-xLeWlifS.js} +1 -1
  68. package/dist-embed/chunks/{chunk-POPQ4Y6H-DacAiEUG.js → chunk-POPQ4Y6H-BDTkHmFN.js} +1 -1
  69. package/dist-embed/chunks/{chunk-POPQ4Y6H-BCHaCocF.js → chunk-POPQ4Y6H-BWThom3B.js} +1 -1
  70. package/dist-embed/chunks/{chunk-POPQ4Y6H-DicNgh7k.js → chunk-POPQ4Y6H-DH11l_UL.js} +1 -1
  71. package/dist-embed/chunks/{chunk-SVP7TREG-COLBrDOd.js → chunk-SVP7TREG-B5krxfJG.js} +1 -1
  72. package/dist-embed/chunks/{chunk-SVP7TREG-Cit7UeF2.js → chunk-SVP7TREG-BIf35xVD.js} +1 -1
  73. package/dist-embed/chunks/{chunk-SVP7TREG-3X_ReA6d.js → chunk-SVP7TREG-gPNw7vXg.js} +1 -1
  74. package/dist-embed/chunks/{chunk-TICWLB2K-DfGZ1S46.js → chunk-TICWLB2K-BhQI0S0U.js} +1 -1
  75. package/dist-embed/chunks/{chunk-TICWLB2K-C4D-h9t1.js → chunk-TICWLB2K-BnmW9-rq.js} +1 -1
  76. package/dist-embed/chunks/{chunk-TICWLB2K-TaUeWpZb.js → chunk-TICWLB2K-ZniMXeAW.js} +1 -1
  77. package/dist-embed/chunks/{chunk-XXDRQBXY-Bo_XDdf-.js → chunk-XXDRQBXY-B0pMdS4i.js} +1 -1
  78. package/dist-embed/chunks/{chunk-XXDRQBXY-Bz5lFaJG.js → chunk-XXDRQBXY-CGxfHk6Z.js} +1 -1
  79. package/dist-embed/chunks/{chunk-XXDRQBXY-B6fuzLc9.js → chunk-XXDRQBXY-CTBVYOwD.js} +1 -1
  80. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DDZ5U8jk.js → classDiagram-ZZMXUADV-BVgpaw2k.js} +1 -1
  81. package/dist-embed/chunks/{classDiagram-ZZMXUADV-orzU8a0Z.js → classDiagram-ZZMXUADV-DZ_oaj8W.js} +1 -1
  82. package/dist-embed/chunks/{classDiagram-ZZMXUADV-DpQTfwXC.js → classDiagram-ZZMXUADV-Pn2VInwp.js} +1 -1
  83. package/dist-embed/chunks/{classDiagram-f62afe4f-CNI3U8Mt.js → classDiagram-f62afe4f-CbG4T64Y.js} +1 -1
  84. package/dist-embed/chunks/{classDiagram-v2-604399ef-CLQHn0oB.js → classDiagram-v2-604399ef-BY9qCJgc.js} +1 -1
  85. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DDZ5U8jk.js → classDiagram-v2-VYDZK3BY-BVgpaw2k.js} +1 -1
  86. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-orzU8a0Z.js → classDiagram-v2-VYDZK3BY-DZ_oaj8W.js} +1 -1
  87. package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DpQTfwXC.js → classDiagram-v2-VYDZK3BY-Pn2VInwp.js} +1 -1
  88. package/dist-embed/chunks/{code-block-IT6T5CEO-DjmCcA6a.js → code-block-IT6T5CEO-BH-xK8dt.js} +1 -1
  89. package/dist-embed/chunks/{component-B62XEB_I.js → component-CHAmQtQO.js} +1 -1
  90. package/dist-embed/chunks/{core-CsMGn5rr.js → core-B-25xtEy.js} +1 -1
  91. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B_IELYPJ.js → cose-bilkent-JH36ORCC--dQRyne0.js} +1 -1
  92. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CE9lt3OO.js → cose-bilkent-JH36ORCC-CCswhHys.js} +1 -1
  93. package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CJiHk5L4.js → cose-bilkent-JH36ORCC-CzSbL0t-.js} +1 -1
  94. package/dist-embed/chunks/{createText-aed3d8b3-DTAS6DfQ.js → createText-aed3d8b3-C0l5-4ze.js} +1 -1
  95. package/dist-embed/chunks/{cs-CZ-2BRQDIVT-BJRVSuxc.js → cs-CZ-2BRQDIVT-BRaMX0Yn.js} +1 -1
  96. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-CyHkNAUC.js → cynefinDiagram-5FMLGOSQ-CCuKYj0g.js} +1 -1
  97. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B2073FgP.js → cynefinDiagram-5FMLGOSQ-Dv0bdW3s.js} +1 -1
  98. package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-HsJLw9Ow.js → cynefinDiagram-5FMLGOSQ-ULiO5ngX.js} +1 -1
  99. package/dist-embed/chunks/{da-DK-5WZEPLOC-DmvpQmCz.js → da-DK-5WZEPLOC-CHJSd-hL.js} +1 -1
  100. package/dist-embed/chunks/{dagre-GXQ25YYZ-DzmuuJ_r.js → dagre-GXQ25YYZ-BiEdL9_Y.js} +1 -1
  101. package/dist-embed/chunks/{dagre-GXQ25YYZ-R_lzFrVl.js → dagre-GXQ25YYZ-CQKZfFLy.js} +1 -1
  102. package/dist-embed/chunks/{dagre-GXQ25YYZ-BkxHUUfX.js → dagre-GXQ25YYZ-CbxhqH-l.js} +1 -1
  103. package/dist-embed/chunks/{de-DE-XR44H4JA-aRPZsjh8.js → de-DE-XR44H4JA-CtNUHnP5.js} +1 -1
  104. package/dist-embed/chunks/{diagram-S7CK7UJ4-1KpTTJPB.js → diagram-S7CK7UJ4-4cZ1l0Md.js} +1 -1
  105. package/dist-embed/chunks/{diagram-S7CK7UJ4-BANHWGqU.js → diagram-S7CK7UJ4-BbDaT9be.js} +1 -1
  106. package/dist-embed/chunks/{diagram-S7CK7UJ4-DsEYZOqE.js → diagram-S7CK7UJ4-C_K2XQ68.js} +1 -1
  107. package/dist-embed/chunks/{diagram-UQ7AKVKN-BadWwEqS.js → diagram-UQ7AKVKN-BQGMd5WO.js} +1 -1
  108. package/dist-embed/chunks/{diagram-UQ7AKVKN-B-SbMZjY.js → diagram-UQ7AKVKN-DHkyqRGv.js} +1 -1
  109. package/dist-embed/chunks/{diagram-UQ7AKVKN-E5q5_JWL.js → diagram-UQ7AKVKN-NwCsVCGT.js} +1 -1
  110. package/dist-embed/chunks/{diagram-VSXAHHWV-D_7x_Ody.js → diagram-VSXAHHWV-BOaVUYmv.js} +1 -1
  111. package/dist-embed/chunks/{diagram-VSXAHHWV-BsdL7E17.js → diagram-VSXAHHWV-BRZfKN3x.js} +1 -1
  112. package/dist-embed/chunks/{diagram-VSXAHHWV-B-ZTas3h.js → diagram-VSXAHHWV-C5Iv2HbC.js} +1 -1
  113. package/dist-embed/chunks/{diagram-VX7I27RA-BGyPrgPC.js → diagram-VX7I27RA-BRnBP8ma.js} +1 -1
  114. package/dist-embed/chunks/{diagram-VX7I27RA-C_1S9aIm.js → diagram-VX7I27RA-BYCgrvUs.js} +1 -1
  115. package/dist-embed/chunks/{diagram-VX7I27RA-CNSwTKHP.js → diagram-VX7I27RA-CRBBlvv5.js} +1 -1
  116. package/dist-embed/chunks/{diagram-Z3DM3KII-B5t8N8ZT.js → diagram-Z3DM3KII-B3LW49_k.js} +1 -1
  117. package/dist-embed/chunks/{diagram-Z3DM3KII-C2gtrmQ9.js → diagram-Z3DM3KII-CiCUrtKW.js} +1 -1
  118. package/dist-embed/chunks/{diagram-Z3DM3KII-yVDxeysg.js → diagram-Z3DM3KII-CsjIQRhO.js} +1 -1
  119. package/dist-embed/chunks/dist-BwO-MYZO.js +1 -0
  120. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-C7dUKFPT.js → ebnfDiagram-PWID7BFC-BaIi5Hrd.js} +1 -1
  121. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-LCa7gn5F.js → ebnfDiagram-PWID7BFC-CCJeM8Fw.js} +1 -1
  122. package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-BgfF1EZn.js → ebnfDiagram-PWID7BFC-CopkaDiT.js} +1 -1
  123. package/dist-embed/chunks/{edges-b2856ca0-J2ON9YC7.js → edges-b2856ca0-C1lOjQnE.js} +1 -1
  124. package/dist-embed/chunks/{el-GR-BZB4AONW-BBpO4fOL.js → el-GR-BZB4AONW-BdA68ZvY.js} +1 -1
  125. package/dist-embed/chunks/{erDiagram-5d81789a-BM5rHLzM.js → erDiagram-5d81789a-Dj3mpdgC.js} +1 -1
  126. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-CX1vL7D6.js → erDiagram-RLTQ6QDP-BB3sojlA.js} +1 -1
  127. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-C35O3IA_.js → erDiagram-RLTQ6QDP-BtFCDuhD.js} +1 -1
  128. package/dist-embed/chunks/{erDiagram-RLTQ6QDP-BguBlD55.js → erDiagram-RLTQ6QDP-CWSWn-p1.js} +1 -1
  129. package/dist-embed/chunks/{es-ES-U4NZUMDT-CyrQHwAL.js → es-ES-U4NZUMDT-O5foFWNy.js} +1 -1
  130. package/dist-embed/chunks/{esm-BaC41XaP.js → esm-Bx0lRTDo.js} +1 -1
  131. package/dist-embed/chunks/{esm-DNtiNaWu.js → esm-Som5GXlh.js} +1 -1
  132. package/dist-embed/chunks/{eu-ES-A7QVB2H4-BJG9zHud.js → eu-ES-A7QVB2H4-DF43uSd5.js} +1 -1
  133. package/dist-embed/chunks/{fa-IR-HGAKTJCU-BOnLqEaQ.js → fa-IR-HGAKTJCU-CodiokGb.js} +1 -1
  134. package/dist-embed/chunks/{fi-FI-Z5N7JZ37-DdQTDw9O.js → fi-FI-Z5N7JZ37-C5RZVPNW.js} +1 -1
  135. package/dist-embed/chunks/{flowDb-185abca5-CLfj2Qv7.js → flowDb-185abca5-C-wCaq68.js} +1 -1
  136. package/dist-embed/chunks/{flowDiagram-1629c991-DjfIfqQ2.js → flowDiagram-1629c991-B0BqMZGm.js} +1 -1
  137. package/dist-embed/chunks/{flowDiagram-HODETNUW-DEVM2ZrI.js → flowDiagram-HODETNUW-l4GLkuOH.js} +1 -1
  138. package/dist-embed/chunks/{flowDiagram-HODETNUW-Cuv1YfzK.js → flowDiagram-HODETNUW-ncSEoBU5.js} +1 -1
  139. package/dist-embed/chunks/{flowDiagram-HODETNUW-CmpkqsRJ.js → flowDiagram-HODETNUW-uoDrwD7v.js} +1 -1
  140. package/dist-embed/chunks/{flowDiagram-v2-1d953310-4wSPcojK.js → flowDiagram-v2-1d953310-CbX1zFAU.js} +1 -1
  141. package/dist-embed/chunks/{flowchart-elk-definition-6df44142-Cb0xBerO.js → flowchart-elk-definition-6df44142-NO6Qs2xn.js} +1 -1
  142. package/dist-embed/chunks/{fr-FR-RHASNOE6-DQXpQs87.js → fr-FR-RHASNOE6-BecaN4ln.js} +1 -1
  143. package/dist-embed/chunks/{ganttDiagram-3b0b3873-DI6DrFsY.js → ganttDiagram-3b0b3873-DJda4k6s.js} +1 -1
  144. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DdKCj2ex.js → ganttDiagram-EL5Y4UJY-BNMzBAYm.js} +1 -1
  145. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-CSmChevD.js → ganttDiagram-EL5Y4UJY-CyZOoQUx.js} +1 -1
  146. package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-drl1C7t5.js → ganttDiagram-EL5Y4UJY-D0pMMDIC.js} +1 -1
  147. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-gYDVDk5C.js → gitGraphDiagram-WWUBYQGX-BbxTXier.js} +1 -1
  148. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-PLhOfVTI.js → gitGraphDiagram-WWUBYQGX-DtiOT-6M.js} +1 -1
  149. package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-Dna0JScG.js → gitGraphDiagram-WWUBYQGX-pM-0eEXc.js} +1 -1
  150. package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-BmE4UKm_.js → gitGraphDiagram-f01e8bc2-BY4Avza4.js} +1 -1
  151. package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DzfCce3N.js → gl-ES-HMX3MZ6V-v7rlIuX_.js} +1 -1
  152. package/dist-embed/chunks/{he-IL-6SHJWFNN-DRlcBbb7.js → he-IL-6SHJWFNN-CPDVuLW6.js} +1 -1
  153. package/dist-embed/chunks/{hi-IN-IWLTKZ5I-BrerMuM3.js → hi-IN-IWLTKZ5I-cv7JPHhI.js} +1 -1
  154. package/dist-embed/chunks/{hu-HU-A5ZG7DT2-DFTsPGh6.js → hu-HU-A5ZG7DT2-sIqhErzy.js} +1 -1
  155. package/dist-embed/chunks/{id-ID-SAP4L64H-D0pKFdUL.js → id-ID-SAP4L64H-Bih05s5Z.js} +1 -1
  156. package/dist-embed/chunks/{index-9bae90f3-Cc18qrXw.js → index-9bae90f3-B-h6Bmpj.js} +1 -1
  157. package/dist-embed/chunks/{index-46VEGuyz.js → index-B5fl-cx7.js} +2 -2
  158. package/dist-embed/chunks/{index-BQEWUnIX.js → index-B9DnJYjS.js} +1 -1
  159. package/dist-embed/chunks/{index-BzdaTJ02.js → index-BEkzae0W.js} +4 -4
  160. package/dist-embed/chunks/{index-B5W7CVUY.js → index-DE0JwlLw.js} +1 -1
  161. package/dist-embed/chunks/{index-BXY2kJ1z.js → index-Dm-b78og.js} +1 -1
  162. package/dist-embed/chunks/{index-CBWGYoQM.js → index-Dqc2hT2k.js} +1 -1
  163. package/dist-embed/chunks/{index-C-4crJTg.js → index-dBBA442C.js} +4 -4
  164. package/dist-embed/chunks/{index-h8lXpqtD.js → index-npitmnIA.js} +1 -1
  165. package/dist-embed/chunks/{index-CET7bv5d.js → index-qZXZK5qd.js} +1 -1
  166. package/dist-embed/chunks/index.esm-9neflYIr.js +1 -0
  167. package/dist-embed/chunks/{index.esm-fF--io5D.js → index.esm-shCygvgu.js} +1 -1
  168. package/dist-embed/chunks/{infoDiagram-27XIBGKW-DlOi-VkF.js → infoDiagram-27XIBGKW-BQ_FpbVx.js} +1 -1
  169. package/dist-embed/chunks/{infoDiagram-27XIBGKW-BZLQcxTA.js → infoDiagram-27XIBGKW-BekHLcSS.js} +1 -1
  170. package/dist-embed/chunks/{infoDiagram-27XIBGKW-Ir7z7vae.js → infoDiagram-27XIBGKW-CHWrtYbt.js} +1 -1
  171. package/dist-embed/chunks/{infoDiagram-a29d40f1-B_50LXsh.js → infoDiagram-a29d40f1-rAu-MoIO.js} +1 -1
  172. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CmchLGEY.js → ishikawaDiagram-5VMMS53U-Cmb7AWZG.js} +1 -1
  173. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CUxqPwbA.js → ishikawaDiagram-5VMMS53U-Cn4-zUna.js} +1 -1
  174. package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-Erx01g7S.js → ishikawaDiagram-5VMMS53U-Uk09zgQy.js} +1 -1
  175. package/dist-embed/chunks/{it-IT-JPQ66NNP-CbZLqWAE.js → it-IT-JPQ66NNP-C7yi7ISV.js} +1 -1
  176. package/dist-embed/chunks/{ja-JP-DBVTYXUO-9xZnJjLg.js → ja-JP-DBVTYXUO-DfPIxAGi.js} +1 -1
  177. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BRe0KiaN.js → journeyDiagram-3NMN7TZE-BuYQDwkV.js} +1 -1
  178. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-C9s2og1s.js → journeyDiagram-3NMN7TZE-D86e9Y03.js} +1 -1
  179. package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-B6PqY62p.js → journeyDiagram-3NMN7TZE-DlZ7DnFk.js} +1 -1
  180. package/dist-embed/chunks/{journeyDiagram-95396277-BsoN0fKG.js → journeyDiagram-95396277-C2env92y.js} +1 -1
  181. package/dist-embed/chunks/{kaa-6HZHGXH3-CO2r0Hb-.js → kaa-6HZHGXH3-DtvfFgz6.js} +1 -1
  182. package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-0WoWjCrc.js → kab-KAB-ZGHBKWFO-Cs_P0J-0.js} +1 -1
  183. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-CKIjAYbp.js → kanban-definition-UXKFOSKX-BgGOEpcs.js} +1 -1
  184. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-B6PDcRlF.js → kanban-definition-UXKFOSKX-DBTVO8S2.js} +1 -1
  185. package/dist-embed/chunks/{kanban-definition-UXKFOSKX-BO0-y3yZ.js → kanban-definition-UXKFOSKX-jcrnmXSL.js} +1 -1
  186. package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DFQE1uuw.js → kk-KZ-P5N5QNE5-DX02WIig.js} +1 -1
  187. package/dist-embed/chunks/{km-KH-HSX4SM5Z-D0Bja56Q.js → km-KH-HSX4SM5Z-C4yS0alE.js} +1 -1
  188. package/dist-embed/chunks/{ko-KR-MTYHY66A-C6MeQrMU.js → ko-KR-MTYHY66A-5P-CxGKE.js} +1 -1
  189. package/dist-embed/chunks/{ku-TR-6OUDTVRD-CweepkXr.js → ku-TR-6OUDTVRD-B_CF--jS.js} +1 -1
  190. package/dist-embed/chunks/{layout-Bz98EP0E.js → layout-BzuSIVA6.js} +1 -1
  191. package/dist-embed/chunks/{layout-DPmNjViN.js → layout-DrQTHWcp.js} +1 -1
  192. package/dist-embed/chunks/{layout-mk0FGxVc.js → layout-ke1SehnF.js} +1 -1
  193. package/dist-embed/chunks/{lexicalHooks-Cj3BNPDC.js → lexicalHooks-mjCdxurM.js} +1 -1
  194. package/dist-embed/chunks/{lib-f60SfhfM.js → lib-77hal096.js} +1 -1
  195. package/dist-embed/chunks/{lib-tR3XRdBe.js → lib-BF0qLKx4.js} +1 -1
  196. package/dist-embed/chunks/{lib-0j0dfH8p.js → lib-BHN4er3T.js} +1 -1
  197. package/dist-embed/chunks/{lib-D8Ksfd49.js → lib-BL0Z7ZLN.js} +1 -1
  198. package/dist-embed/chunks/{lib-ku1U2GxE.js → lib-BbQRs6gq.js} +1 -1
  199. package/dist-embed/chunks/{lib-BItrfBU4.js → lib-BqYnt3B4.js} +1 -1
  200. package/dist-embed/chunks/{lib-DCBCbRKN.js → lib-C0IoKYd5.js} +1 -1
  201. package/dist-embed/chunks/{lib-DzVf9ZJD.js → lib-CSLo_71d.js} +1 -1
  202. package/dist-embed/chunks/{lib-CkKgTevD.js → lib-Clh_AUFx.js} +1 -1
  203. package/dist-embed/chunks/{lib-BmoHRaAo.js → lib-Cz1lLXyg.js} +1 -1
  204. package/dist-embed/chunks/{lib-Hgl-pfON.js → lib-DDBKY5pq.js} +1 -1
  205. package/dist-embed/chunks/{lib-B62N3zGB.js → lib-DJP5gvFi.js} +1 -1
  206. package/dist-embed/chunks/{lib-COg_k5cY.js → lib-DMTtt1wk.js} +1 -1
  207. package/dist-embed/chunks/{lib-DpZphKNm.js → lib-Jm05d6GV.js} +1 -1
  208. package/dist-embed/chunks/{lib-w650Gz0V.js → lib-KpC079PC.js} +1 -1
  209. package/dist-embed/chunks/{lib-CjicD0Pj.js → lib-WVhM2LQX.js} +1 -1
  210. package/dist-embed/chunks/{lib-BnAfx9wF.js → lib-_bLHZImL.js} +1 -1
  211. package/dist-embed/chunks/{lib-B01oDNlH.js → lib-jZS8hOW4.js} +1 -1
  212. package/dist-embed/chunks/{lib-CY6QUCzq.js → lib-q3E3Gmmk.js} +1 -1
  213. package/dist-embed/chunks/{lib-C-8NAvI1.js → lib-tF-FByVb.js} +1 -1
  214. package/dist-embed/chunks/{lt-LT-XHIRWOB4-DrPOBOia.js → lt-LT-XHIRWOB4-BDdaHp0_.js} +1 -1
  215. package/dist-embed/chunks/{lv-LV-5QDEKY6T-BlGiDUA0.js → lv-LV-5QDEKY6T-C4eEADZC.js} +1 -1
  216. package/dist-embed/chunks/{mermaid.core-BiF8MSuv.js → mermaid.core-Do9KSWkx.js} +5 -5
  217. package/dist-embed/chunks/{mermaid.core-1p09QPXM.js → mermaid.core-ImjaHcFN.js} +3 -3
  218. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-CEFrcqEk.js → mindmap-definition-YA3MSWOX-DQ5gBAUm.js} +1 -1
  219. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-DpAy5heR.js → mindmap-definition-YA3MSWOX-DhjXREA8.js} +1 -1
  220. package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-t1pDKjS3.js → mindmap-definition-YA3MSWOX-DqaQ8KOs.js} +1 -1
  221. package/dist-embed/chunks/{mindmap-definition-e4c1d938-DcepOwKv.js → mindmap-definition-e4c1d938-DoEOORm1.js} +1 -1
  222. package/dist-embed/chunks/{model-jLDiOPpQ.js → model-DUnnBi6P.js} +1 -1
  223. package/dist-embed/chunks/{mr-IN-CRQNXWMA-BWEVprKf.js → mr-IN-CRQNXWMA-BWxvnaHu.js} +1 -1
  224. package/dist-embed/chunks/{my-MM-5M5IBNSE-BBxutJOz.js → my-MM-5M5IBNSE-CLLGJ71z.js} +1 -1
  225. package/dist-embed/chunks/{nb-NO-T6EIAALU-DJnrKa7W.js → nb-NO-T6EIAALU-CXXHz47F.js} +1 -1
  226. package/dist-embed/chunks/{nl-NL-IS3SIHDZ-DQfv4h3e.js → nl-NL-IS3SIHDZ-DgvIFG1o.js} +1 -1
  227. package/dist-embed/chunks/{nn-NO-6E72VCQL-DiGj9RA6.js → nn-NO-6E72VCQL-CF-xs2ZW.js} +1 -1
  228. package/dist-embed/chunks/{oc-FR-POXYY2M6-WJRn50ji.js → oc-FR-POXYY2M6-Blnuf5JR.js} +1 -1
  229. package/dist-embed/chunks/{pa-IN-N4M65BXN-U7QCzNgm.js → pa-IN-N4M65BXN--oZas2yq.js} +1 -1
  230. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-iE6rBtXO.js → pegDiagram-XKGWAZYB-B7vltnXv.js} +1 -1
  231. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BlYwAwEo.js → pegDiagram-XKGWAZYB-D4e6HBvn.js} +1 -1
  232. package/dist-embed/chunks/{pegDiagram-XKGWAZYB-CudwiD3O.js → pegDiagram-XKGWAZYB-LNTV4YzJ.js} +1 -1
  233. package/dist-embed/chunks/{percentages-BXMCSKIN-DhE6_GLO.js → percentages-BXMCSKIN-MAjQwr8F.js} +5 -5
  234. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-CIawCiDR.js → pieDiagram-E7YTZNPT-BL6tcixN.js} +1 -1
  235. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Cy6Wueqp.js → pieDiagram-E7YTZNPT-DgV4Cy2T.js} +1 -1
  236. package/dist-embed/chunks/{pieDiagram-E7YTZNPT-DkhDYj7K.js → pieDiagram-E7YTZNPT-a4twxVx-.js} +1 -1
  237. package/dist-embed/chunks/{pieDiagram-c941bede-Ds-rlqjJ.js → pieDiagram-c941bede-C1NXxH3p.js} +1 -1
  238. package/dist-embed/chunks/{pl-PL-T2D74RX3-D5hzyBxL.js → pl-PL-T2D74RX3-CW7khEw8.js} +1 -1
  239. package/dist-embed/chunks/{plugin-BqLEv-U0.js → plugin-U4XZBswA.js} +1 -1
  240. package/dist-embed/chunks/{pt-BR-5N22H2LF-CAs1Vbwd.js → pt-BR-5N22H2LF-CBLbqrvY.js} +1 -1
  241. package/dist-embed/chunks/{pt-PT-UZXXM6DQ-f3BuGnIL.js → pt-PT-UZXXM6DQ-Boh5oA32.js} +1 -1
  242. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-1ViFLfLW.js → quadrantDiagram-AXDQQJYC-BTBfnkpT.js} +1 -1
  243. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-B30POsrM.js → quadrantDiagram-AXDQQJYC-CXiKbUwz.js} +1 -1
  244. package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-CqArYUyr.js → quadrantDiagram-AXDQQJYC-Dy9EnqX6.js} +1 -1
  245. package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-QoN4fcns.js → quadrantDiagram-cf8b8fe0-BmuQ4zSn.js} +1 -1
  246. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BelGMNLe.js → railroadDiagram-O6MQD6OU-BZgQtORC.js} +1 -1
  247. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-nWQg4Zha.js → railroadDiagram-O6MQD6OU-D4ziu6ro.js} +1 -1
  248. package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BKrSAEIz.js → railroadDiagram-O6MQD6OU-DZJxMT9e.js} +1 -1
  249. package/dist-embed/chunks/{renderer-NdtLW87o.js → renderer-DTpEU9RO.js} +1 -1
  250. package/dist-embed/chunks/{requirementDiagram-53bda41b-DRQpj1S7.js → requirementDiagram-53bda41b-CZFqw_aX.js} +1 -1
  251. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-C-ZNAzIA.js → requirementDiagram-BXWQKSXE-By8LT77q.js} +1 -1
  252. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BsKIaNx-.js → requirementDiagram-BXWQKSXE-Dk3nxAMd.js} +1 -1
  253. package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-Dj_84sJE.js → requirementDiagram-BXWQKSXE-Dx1y_rw2.js} +1 -1
  254. package/dist-embed/chunks/{ro-RO-JPDTUUEW-Ck6Pl6T-.js → ro-RO-JPDTUUEW-QpHkCZjx.js} +1 -1
  255. package/dist-embed/chunks/{ru-RU-B4JR7IUQ-B5ZFvbSm.js → ru-RU-B4JR7IUQ-C8-ztNrr.js} +1 -1
  256. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BwrjNR9f.js → sankeyDiagram-P5KCCOFB-BARe0eo5.js} +1 -1
  257. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DNcJ8lTV.js → sankeyDiagram-P5KCCOFB-D3-EpmdU.js} +1 -1
  258. package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CvESkMt0.js → sankeyDiagram-P5KCCOFB-DJG8GtNG.js} +1 -1
  259. package/dist-embed/chunks/{sankeyDiagram-c3ef121a-NSdOSIUQ.js → sankeyDiagram-c3ef121a-DzTFYWVL.js} +1 -1
  260. package/dist-embed/chunks/{sequenceDiagram-82a5b84f-Cxc06-S6.js → sequenceDiagram-82a5b84f-B0hIjr4n.js} +1 -1
  261. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-vrbMF2lh.js → sequenceDiagram-WJ2MYXX4-BcB5M_uE.js} +1 -1
  262. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-DYkcZR01.js → sequenceDiagram-WJ2MYXX4-CggwqzCL.js} +1 -1
  263. package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CdKf7EXa.js → sequenceDiagram-WJ2MYXX4-DD0JtyHN.js} +1 -1
  264. package/dist-embed/chunks/{sheet-BFp5lgzm.js → sheet-BQ9MLxvm.js} +1 -1
  265. package/dist-embed/chunks/{si-LK-N5RQ5JYF-turarKuZ.js → si-LK-N5RQ5JYF-hqqq2gYS.js} +1 -1
  266. package/dist-embed/chunks/{sizeCapture-INFHLROL-B05-5pAF.js → sizeCapture-INFHLROL-BMuUFBVt.js} +1 -1
  267. package/dist-embed/chunks/{sizeCapture-INFHLROL-DBDGASUh.js → sizeCapture-INFHLROL-CpGgMlRe.js} +1 -1
  268. package/dist-embed/chunks/{sizeCapture-INFHLROL-BTK449Mq.js → sizeCapture-INFHLROL-DwbRJ4BV.js} +1 -1
  269. package/dist-embed/chunks/{sk-SK-C5VTKIMK-B61Eejyh.js → sk-SK-C5VTKIMK-Cwov2m-p.js} +1 -1
  270. package/dist-embed/chunks/{sl-SI-NN7IZMDC-Vmd7HFee.js → sl-SI-NN7IZMDC-BRxVCDIe.js} +1 -1
  271. package/dist-embed/chunks/{state-B-9Ja93T.js → state-OwYcN40e.js} +1 -1
  272. package/dist-embed/chunks/{stateDiagram-43e79a5f-BNfT8BMf.js → stateDiagram-43e79a5f-Bu9kA3H-.js} +1 -1
  273. package/dist-embed/chunks/{stateDiagram-D77RDMKH-B4P4foWm.js → stateDiagram-D77RDMKH-CC58EPeY.js} +1 -1
  274. package/dist-embed/chunks/{stateDiagram-D77RDMKH-DGy5pPcJ.js → stateDiagram-D77RDMKH-Cs4wIyOq.js} +1 -1
  275. package/dist-embed/chunks/{stateDiagram-D77RDMKH-cX1LxuDW.js → stateDiagram-D77RDMKH-vD5bWUvd.js} +1 -1
  276. package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-DT_Cb2bL.js → stateDiagram-v2-2041ed4f-Od7A0mbg.js} +1 -1
  277. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-CoF-m0JB.js → stateDiagram-v2-MP3YSRHH-DXfM0lWD.js} +1 -1
  278. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-BSxDwfLM.js → stateDiagram-v2-MP3YSRHH-DwPQ0Ue3.js} +1 -1
  279. package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-GuE-uLPq.js → stateDiagram-v2-MP3YSRHH-l7s3F_nn.js} +1 -1
  280. package/dist-embed/chunks/{styles-455b33cd-Cp1Ujuo8.js → styles-455b33cd-Ds_FotAH.js} +1 -1
  281. package/dist-embed/chunks/{styles-f932cba9-CxoS5hwQ.js → styles-f932cba9-D0_uYfjw.js} +1 -1
  282. package/dist-embed/chunks/{styles-fcc2142b-ByLmqETE.js → styles-fcc2142b-Btmp_yd-.js} +1 -1
  283. package/dist-embed/chunks/{subset-shared.chunk-BsVAPxIg.js → subset-shared.chunk-Bwn3uV7D.js} +1 -1
  284. package/dist-embed/chunks/{subset-worker.chunk-BS8PIaQX.js → subset-worker.chunk-sLZsYGAm.js} +1 -1
  285. package/dist-embed/chunks/{substates-CeUNAPt2.js → substates-CRCFGJkO.js} +1 -1
  286. package/dist-embed/chunks/{sv-SE-XGPEYMSR-C9lMr16n.js → sv-SE-XGPEYMSR-CFTcXTPe.js} +1 -1
  287. package/dist-embed/chunks/{svgDrawCommon-148a3cd9-BHhr6lti.js → svgDrawCommon-148a3cd9-BzG9z3G2.js} +1 -1
  288. package/dist-embed/chunks/{swimlanes-42K2YHIH-DQJZa-xA.js → swimlanes-42K2YHIH-CXcSAQkI.js} +1 -1
  289. package/dist-embed/chunks/{swimlanes-42K2YHIH-RHIIyMRW.js → swimlanes-42K2YHIH-CbKvXXpE.js} +1 -1
  290. package/dist-embed/chunks/{swimlanes-42K2YHIH-DKdFBGRm.js → swimlanes-42K2YHIH-Cn91OzZh.js} +1 -1
  291. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-qQpIxgus.js → swimlanesDiagram-VR7AAH4N-BDYem9Qf.js} +1 -1
  292. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-DPhzMK19.js → swimlanesDiagram-VR7AAH4N-C0oAnnos.js} +1 -1
  293. package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-rV-EK234.js → swimlanesDiagram-VR7AAH4N-KVXFaw6h.js} +1 -1
  294. package/dist-embed/chunks/{ta-IN-2NMHFXQM-DDvtKbYb.js → ta-IN-2NMHFXQM-DOxRBGkF.js} +1 -1
  295. package/dist-embed/chunks/{th-TH-HPSO5L25-Cuk9i9q1.js → th-TH-HPSO5L25-B66DJGUH.js} +1 -1
  296. package/dist-embed/chunks/{timeline-definition-24CTP7MA-BYQXqujM.js → timeline-definition-24CTP7MA-BdFFNT8A.js} +1 -1
  297. package/dist-embed/chunks/{timeline-definition-24CTP7MA-CNJYLQV3.js → timeline-definition-24CTP7MA-BwHa8bSq.js} +1 -1
  298. package/dist-embed/chunks/{timeline-definition-24CTP7MA-B0VfyyC9.js → timeline-definition-24CTP7MA-pOvrvUiT.js} +1 -1
  299. package/dist-embed/chunks/{timeline-definition-7545f45a-B6u65RjP.js → timeline-definition-7545f45a-mktOQHwE.js} +1 -1
  300. package/dist-embed/chunks/{tr-TR-DEFEU3FU-Dt5AbXXF.js → tr-TR-DEFEU3FU-4T2eEq6g.js} +1 -1
  301. package/dist-embed/chunks/{uk-UA-QMV73CPH-CqxkvO2g.js → uk-UA-QMV73CPH-DzInGHdV.js} +1 -1
  302. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-ERcpoENM.js → vennDiagram-4TSXK5OY-DgP7uC-E.js} +1 -1
  303. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-8GPjZ_rY.js → vennDiagram-4TSXK5OY-DpQuXqxB.js} +1 -1
  304. package/dist-embed/chunks/{vennDiagram-4TSXK5OY-BC0uMGWS.js → vennDiagram-4TSXK5OY-DxCQybxm.js} +1 -1
  305. package/dist-embed/chunks/{vi-VN-M7AON7JQ-CZtlZzss.js → vi-VN-M7AON7JQ-DqvR1smN.js} +1 -1
  306. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DMJNYu8Y.js → wardleyDiagram-VM6X3IG4-1jMcvi60.js} +1 -1
  307. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-Bubuc1xO.js → wardleyDiagram-VM6X3IG4-Dyv0LxbD.js} +1 -1
  308. package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DdRbpzRB.js → wardleyDiagram-VM6X3IG4-MyP5nqZ4.js} +1 -1
  309. package/dist-embed/chunks/workbook-5qhwFc45.js +1 -0
  310. package/dist-embed/chunks/{write-D-y9_9sL.js → write-DKnalcKH.js} +1 -1
  311. package/dist-embed/chunks/{xychartDiagram-3f383b91-CEkYRds9.js → xychartDiagram-3f383b91-CH6jxwtm.js} +1 -1
  312. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-iG96dorC.js → xychartDiagram-S5SC5T6Z-CepDAfxw.js} +1 -1
  313. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-DKWKSC-B.js → xychartDiagram-S5SC5T6Z-FNQJ78h8.js} +1 -1
  314. package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-C0WCXM2P.js → xychartDiagram-S5SC5T6Z-euDlXTya.js} +1 -1
  315. package/dist-embed/chunks/{zh-CN-LNUGB5OW-6_SDF9o2.js → zh-CN-LNUGB5OW-iQ1ZrxBq.js} +1 -1
  316. package/dist-embed/chunks/{zh-HK-E62DVLB3-em8dd9Nl.js → zh-HK-E62DVLB3-BjSHLy4a.js} +1 -1
  317. package/dist-embed/chunks/{zh-TW-RAJ6MFWO-BCzbAoXj.js → zh-TW-RAJ6MFWO-CqMWwcSn.js} +1 -1
  318. package/dist-embed/datalayer-app-main.js +62 -62
  319. package/lib/apps/agentUiPlugins.d.ts +7 -0
  320. package/lib/apps/agentUiPlugins.js +20 -0
  321. package/lib/apps/apps/AppRenderer.d.ts +1 -1
  322. package/lib/apps/apps/AppRenderer.js +22 -13
  323. package/lib/apps/core/index.d.ts +7 -0
  324. package/lib/apps/core/index.js +7 -0
  325. package/lib/apps/embed/AppEmbed.d.ts +3 -3
  326. package/lib/apps/embed/LoopEmbed.js +2 -0
  327. package/lib/apps/embed/embedConfig.d.ts +1 -1
  328. package/lib/apps/embed/embedConfig.js +1 -1
  329. package/lib/apps/plugins/chat/ChatView.js +11 -5
  330. package/lib/apps/plugins/chat/index.d.ts +6 -5
  331. package/lib/apps/plugins/limited-preview/LimitedPreviewIndicator.d.ts +31 -0
  332. package/lib/apps/plugins/limited-preview/LimitedPreviewIndicator.js +70 -0
  333. package/lib/apps/plugins/limited-preview/index.d.ts +37 -0
  334. package/lib/apps/plugins/limited-preview/index.js +53 -0
  335. package/lib/apps/plugins/limited-preview/preview.d.ts +101 -0
  336. package/lib/apps/plugins/limited-preview/preview.js +188 -0
  337. package/lib/apps/presets.d.ts +16 -0
  338. package/lib/apps/presets.js +18 -1
  339. package/lib/chat/anonymous/AnonymousChat.d.ts +8 -19
  340. package/lib/chat/anonymous/AnonymousChat.js +11 -43
  341. package/lib/chat/anonymous/anonymousMode.d.ts +8 -13
  342. package/lib/chat/anonymous/anonymousMode.js +0 -6
  343. package/lib/chat/index.d.ts +1 -1
  344. package/lib/chat/index.js +1 -1
  345. package/lib/chat/prompt/InputPrompt.d.ts +8 -1
  346. package/lib/chat/prompt/InputPrompt.js +8 -3
  347. package/lib/chat/prompt/stack.d.ts +9 -0
  348. package/lib/chat/prompt/stack.js +8 -4
  349. package/lib/specs/apps.js +0 -40
  350. package/package.json +1 -1
  351. package/scripts/codegen/generate_apps.py +4 -1
  352. package/dist-embed/chunks/ChatView-B9oVgZ72.js +0 -32
  353. package/dist-embed/chunks/SchemaForm-N0hu4z_p.js +0 -1
  354. package/dist-embed/chunks/SignInIcon-XIbntAUw.js +0 -1
  355. package/dist-embed/chunks/dist-BOLa5oLF.js +0 -1
  356. package/dist-embed/chunks/index.esm-DwyYEnhk.js +0 -1
  357. package/dist-embed/chunks/workbook-BQLbQvZ-.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as p,k as _,n as S,o as A,q as L,u as P,j as n,T as x,B as c,v as b,D as B,S as K,H as O,x as U,L as z,y as T,I as N,z as R,A as $}from"../datalayer-app-main.js";import{e as F,K as H}from"./KernelVariables-BIWju6rZ.js";function E({status:e}){const s=e==="running"||e==="idle"?"success":e==="busy"||e==="starting"?"attention":e==="error"||e==="dead"?"danger":"secondary";return n.jsx(z,{variant:s,size:"small","data-sandbox-status":e,children:e})}function Y({url:e}){const[s,l]=p.useState(!1);return n.jsxs(c,{display:"flex",alignItems:"center",gap:1,minWidth:0,children:[n.jsx(T,{href:e,target:"_blank",rel:"noreferrer",sx:{fontFamily:"mono",fontSize:0,wordBreak:"break-all"},children:e}),n.jsx(N,{icon:s?R:$,"aria-label":"Copy the URL",size:"small",variant:"invisible",onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})}})]})}function C(e){if(e===void 0||e==="")return;const s=typeof e=="number"?new Date(e<1e12?e*1e3:e):new Date(e);return Number.isNaN(s.getTime())?void 0:s.toLocaleString()}const h="__DL_PYODIDE__",M=`def __dl_pyodide():
1
+ import{r as p,k as _,n as S,o as A,q as L,u as P,j as n,T as x,B as c,v as b,D as B,S as K,H as O,x as U,L as z,y as T,I as N,z as R,A as $}from"../datalayer-app-main.js";import{e as F,K as H}from"./KernelVariables-xXzfdk5t.js";function E({status:e}){const s=e==="running"||e==="idle"?"success":e==="busy"||e==="starting"?"attention":e==="error"||e==="dead"?"danger":"secondary";return n.jsx(z,{variant:s,size:"small","data-sandbox-status":e,children:e})}function Y({url:e}){const[s,l]=p.useState(!1);return n.jsxs(c,{display:"flex",alignItems:"center",gap:1,minWidth:0,children:[n.jsx(T,{href:e,target:"_blank",rel:"noreferrer",sx:{fontFamily:"mono",fontSize:0,wordBreak:"break-all"},children:e}),n.jsx(N,{icon:s?R:$,"aria-label":"Copy the URL",size:"small",variant:"invisible",onClick:()=>{navigator.clipboard?.writeText(e).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})}})]})}function C(e){if(e===void 0||e==="")return;const s=typeof e=="number"?new Date(e<1e12?e*1e3:e):new Date(e);return Number.isNaN(s.getTime())?void 0:s.toLocaleString()}const h="__DL_PYODIDE__",M=`def __dl_pyodide():
2
2
  import json, sys
3
3
  facts = {'python': sys.version.split()[0], 'packages': []}
4
4
  try:
@@ -0,0 +1 @@
1
+ import{lb as ne,lc as se,ld as ae,bB as ie,J as O,le,j as t,lf as oe,lg as de,hx as F,lh as H,a1 as ce,r as E,aF as T,fo as ue,I as ee,X as pe,a9 as te,T as K,dE as he,W as me,A as xe,v as re,li as J,lj as fe,lk as ye,gq as ge,hX as Y,aI as be,ll as je,B as Ce,dD as Te}from"../datalayer-app-main.js";import{F as Se,T as D,a as X,g as A,b as Fe,e as Q,d as L,f as Be,h as ke,t as ve,i as we,c as Ae,j as Ie,A as De,s as Le,k as We,o as G,l as Oe,m as Re,n as v,u as Ve,p as _e,r as Ee,q as qe,v as $e}from"./index-B9DnJYjS.js";import{A as Ge,a as Pe}from"./ArrowUpIcon-y5enrVH9.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./uniqueId-Dci46PXR.js";import"./toNumber-DUdf79Nr.js";import"./_baseClone-DJnceIKt.js";import"./merge-Bj_36vYI.js";import"./isEqual-BxgGIFfN.js";const Me=r=>{const e=ie.c(24);let n,s,a,o;e[0]!==r?({children:n,disabled:s,onChange:a,...o}=r,e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=o):(n=e[1],s=e[2],a=e[3],o=e[4]);let m;if(e[5]!==n){const y=O.Children.toArray(n).filter(Ne).map(Ue).flat();m=O.Children.toArray(y).filter(ze).map(He).filter(Boolean),e[5]=n,e[6]=m}else m=e[6];const u=m,[d,c]=le(u);let x;e[7]!==d||e[8]!==c?(x=y=>{const{value:b,checked:j}=y.currentTarget;if(j){c([...d.current||[],b]);return}c((d.current||[]).filter(S=>S!==b))},e[7]=d,e[8]=c,e[9]=x):x=e[9];const i=x;let l;e[10]!==a||e[11]!==d||e[12]!==i?(l=y=>{a&&(i(y),a(d.current||[],y))},e[10]=a,e[11]=d,e[12]=i,e[13]=l):l=e[13];let h;e[14]!==s||e[15]!==l?(h={disabled:s,onChange:l},e[14]=s,e[15]=l,e[16]=h):h=e[16];let p;e[17]!==n||e[18]!==s||e[19]!==o?(p=t.jsx(oe,{disabled:s,...o,children:n}),e[17]=n,e[18]=s,e[19]=o,e[20]=p):p=e[20];let f;return e[21]!==h||e[22]!==p?(f=t.jsx(de.Provider,{value:h,children:p}),e[21]=h,e[22]=p,e[23]=f):f=e[23],f};var Z=Object.assign(Me,{Caption:ae,Label:se,Validation:ne});function Ne(r){return O.isValidElement(r)&&r.type===F}function Ue(r){return O.isValidElement(r)?r.props.children:[]}function ze(r){return O.isValidElement(r)&&r.type===H}function He(r){return O.isValidElement(r)&&(r.props.checked||r.props.defaultChecked)&&r.props.value}const Ke=({name:r="slider",id:e="slider",min:n=0,max:s=10,value:a=5,label:o="label",step:m=1,markers:u=!1,displayValue:d=!0,disabled:c=!1,orientation:x="horizontal",width:i="200px",onChange:l})=>{const{colorMode:h}=ce(),p=s<n?n:n+(s-n)/2,[f,y]=E.useState(p);E.useEffect(()=>{y(a??p)},[a,p]);const b=S=>{const g=Number(S.target.value);y(g),l(g)},j={width:i,...x==="vertical"?{transform:"rotate(-90deg)"}:{},colorScheme:h=="day"?"light":"dark",accentColor:"var(--fgColor-accent)"};return t.jsxs(T,{display:"flex",alignItems:"center",children:[t.jsx("input",{type:"range",id:e,name:r,min:n,max:s,value:f,step:m??"any",list:"slider-markers",style:j,onChange:b,disabled:c}),u&&m&&t.jsx("datalist",{id:"slider-markers",children:Array.from({length:Math.floor((s-n)/m)+1},(S,g)=>n+g*m).map(S=>t.jsx("option",{value:S},`slider-marker-${S}`))}),o&&t.jsx(F.Label,{htmlFor:e,sx:{ml:2},children:o}),d&&x==="horizontal"&&t.jsx(ue,{sx:{ml:2},children:f})]})};function Xe(r){return E.forwardRef(({fields:e,widgets:n,templates:s,...a},o)=>(e={...r?.fields,...e},n={...r?.widgets,...n},s={...r?.templates,...s,ButtonTemplates:{...r?.templates?.ButtonTemplates,...s?.ButtonTemplates}},t.jsx(Se,{...r,...a,fields:e,widgets:n,templates:s,ref:o})))}function Je({uiSchema:r,registry:e,...n}){const{translateString:s}=e;return t.jsx(ee,{variant:"default",size:"small",icon:pe,"aria-label":s(D.AddItemButton),...n})}function Ye(r){const{children:e,disabled:n,hasToolbar:s,hasMoveDown:a,hasMoveUp:o,hasRemove:m,index:u,onDropIndexClick:d,onReorderClick:c,readonly:x,uiSchema:i,registry:l}=r,{MoveDownButton:h,MoveUpButton:p,RemoveButton:f}=l.templates.ButtonTemplates,y={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold",minWidth:0};return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",children:[t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},style:{overflow:"auto"},children:t.jsx(T,{mb:2,p:2,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:e})}),s&&t.jsxs(T,{p:1,children:[(o||a)&&t.jsx(p,{style:y,disabled:n||x||!o,onClick:c(u,u-1),uiSchema:i,registry:l}),(o||a)&&t.jsx(h,{style:y,disabled:n||x||!a,onClick:c(u,u+1),uiSchema:i,registry:l}),m&&t.jsx(f,{style:y,disabled:n||x,onClick:d(u),uiSchema:i,registry:l})]})]})}function Qe(r){const{canAdd:e,disabled:n,idSchema:s,uiSchema:a,items:o,onAddClick:m,readonly:u,registry:d,required:c,schema:x,title:i}=r,l=X(a),h=A("ArrayFieldDescriptionTemplate",d,l),p=A("ArrayFieldItemTemplate",d,l),f=A("ArrayFieldTitleTemplate",d,l),{ButtonTemplates:{AddButton:y}}=d.templates;return t.jsxs(T,{p:3,sx:{display:"flex",width:"100%",flexFlow:"row wrap",borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:[t.jsx(f,{idSchema:s,title:l.title||i,schema:x,uiSchema:a,required:c,registry:d}),t.jsx(h,{idSchema:s,description:l.description||x.description,schema:x,uiSchema:a,registry:d}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},children:[o&&o.map(({key:b,...j})=>t.jsx(p,{...j},b)),e&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(T,{mt:2,children:t.jsx(y,{className:"array-item-add",onClick:m,disabled:n||u,uiSchema:a,registry:d})})})})]},`array-item-list-${s.$id}`)]})}function Ze(r){const{id:e,placeholder:n,required:s,readonly:a,disabled:o,type:m,label:u,value:d,onChange:c,onBlur:x,onFocus:i,autofocus:l,options:h,schema:p,uiSchema:f,rawErrors:y=[],formContext:b,registry:j,hideLabel:S,hideError:g,...C}=r,w=Fe(p,m,h),{step:I,min:R,max:V,...M}=w,q={...Array.isArray(p.examples)?{list:Q(e)}:void 0,...M,...I!==void 0?{step:I}:void 0,...R!==void 0?{min:R}:void 0,...V!==void 0?{max:V}:void 0},N=({target:{value:B}})=>c(B===""?h.emptyValue:B),U=({target:{value:B}})=>x(e,B),z=({target:{value:B}})=>i(e,B),{schemaUtils:$}=j,k=$.getDisplayLabel(p,f);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!k,htmlFor:e,children:u||p.title}),t.jsx(te,{id:e,name:e,placeholder:n,autoFocus:l,required:s,disabled:o||a,...q,value:d||d===0?d:"",validationStatus:y.length>0?"error":void 0,onChange:N,onBlur:U,onFocus:z,block:!0,...C,"aria-describedby":L(e,!!p.examples)}),Array.isArray(p.examples)&&t.jsx("datalist",{id:Q(e),children:p.examples.concat(p.default&&!p.examples.includes(p.default)?[p.default]:[]).map(B=>t.jsx("option",{value:B},B))})]})}function et(r){const{id:e,description:n}=r;return n?t.jsx(K,{id:e,as:"p",mt:1,children:n}):null}function tt({errors:r,registry:e}){const{translateString:n}=e;return t.jsx(T,{mb:3,sx:{borderWidth:1,borderStyle:"solid",borderColor:"border.default",borderRadius:2},children:t.jsxs(T,{p:3,children:[t.jsx(T,{as:"h3",sx:{fontSize:3,fontWeight:"semibold",m:0},children:n(D.ErrorsLabel)}),t.jsx(t.Fragment,{children:r.map((s,a)=>t.jsx(he,{variant:"danger",sx:{marginTop:2},children:s.stack},a))})]})})}function P({color:r,title:e,icon:n,...s}){return r||(r="invisible"),t.jsx(ee,{variant:r,size:"small",icon:n,onClick:a=>a.preventDefault(),onSubmit:a=>a.preventDefault(),"aria-label":e,...s})}function rt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.CopyButton),...r,icon:xe})}function nt(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveDownButton),...r,icon:Pe})}function st(r){const{registry:{translateString:e}}=r;return t.jsx(P,{title:e(D.MoveUpButton),...r,icon:Ge})}function at(r){const{iconType:e,...n}=r,{registry:{translateString:s}}=n;return t.jsx(P,{title:s(D.RemoveButton),...n,icon:me})}function it(r){const{errors:e=[],idSchema:n}=r;if(e.length===0)return null;const s=Be(n);return t.jsx("div",{id:s,children:e.map((a,o)=>t.jsxs(K,{as:"p",mb:1,sx:{fontSize:"12px",display:"block",color:"danger.fg"},children:["•"," "+a]},o))})}function lt(r){const{idSchema:e,help:n}=r;if(!n)return null;const s=ke(e);return t.jsx(F.Caption,{id:s,children:n})}function ot(r){const{id:e,children:n,classNames:s,style:a,disabled:o,displayLabel:m,hidden:u,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,rawErrors:h=[],errors:p,help:f,rawDescription:y,schema:b,uiSchema:j,registry:S}=r,g=X(j),C=A("WrapIfAdditionalTemplate",S,g);return u?t.jsx("div",{style:{display:"none"},children:n}):t.jsx(C,{classNames:s,style:a,disabled:o,id:e,label:d,onDropPropertyClick:c,onKeyChange:x,readonly:i,required:l,schema:b,uiSchema:j,registry:S,children:t.jsxs(F,{required:l,children:[t.jsx(F.Label,{visuallyHidden:!0}),n,m&&y?t.jsx(F.Caption,{id:e,children:y}):null,p,f]})})}function dt(r){const{description:e,title:n,properties:s,required:a,disabled:o,readonly:m,uiSchema:u,idSchema:d,schema:c,formData:x,onAddClick:i,registry:l}=r,h=X(u),p=A("TitleFieldTemplate",l,h),f=A("DescriptionFieldTemplate",l,h),{ButtonTemplates:{AddButton:y}}=l.templates;return t.jsxs(t.Fragment,{children:[(h.title||n)&&t.jsx(p,{id:ve(d),title:n,required:a,schema:c,uiSchema:u,registry:l}),(h.description||e)&&t.jsx(f,{id:we(d),description:h.description||e,schema:c,uiSchema:u,registry:l}),t.jsxs(T,{sx:{display:"flex",width:"100%",flexDirection:"column",flexFlow:"row wrap"},style:{marginTop:"10px"},children:[s.map((b,j)=>b.hidden?b.content:t.jsx(T,{sx:{flexBasis:"100%",flexGrow:0,maxWidth:"100%"},mb:1,children:b.content},j)),Ae(c,u,x)&&t.jsx(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},justifyContent:"flex-end",children:t.jsx(T,{sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsx(y,{className:"object-property-expand",onClick:b=>{b.preventDefault(),i(c)()},disabled:o||m,uiSchema:u,registry:l})})})]})]})}function ct({uiSchema:r}){const{submitText:e,norender:n,props:s={}}=Ie(r);return n?null:t.jsx(T,{marginTop:2,children:t.jsx(re,{type:"submit",variant:"primary",...s,children:e})})}function ut({id:r,title:e}){return t.jsx(T,{id:r,my:2,children:t.jsx(T,{as:"h5",sx:{fontSize:1,fontWeight:"semibold",m:0,borderBottom:"1px solid",borderColor:"border.default",paddingBottom:1},children:e})})}function pt(r){const{children:e,classNames:n,style:s,disabled:a,id:o,label:m,onDropPropertyClick:u,onKeyChange:d,readonly:c,required:x,schema:i,uiSchema:l,registry:h}=r,{templates:p,translateString:f}=h,{RemoveButton:y}=p.ButtonTemplates,b=f(D.KeyLabel,[m]),j=De in i,S={flex:1,paddingLeft:6,paddingRight:6,fontWeight:"bold"};if(!j)return t.jsx("div",{className:n,style:s,children:e});const g=({target:C})=>d(C.value);return t.jsxs(T,{sx:{display:"flex",width:"100%",flexFlow:"row wrap"},alignItems:"center",className:n,style:s,children:[t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:t.jsxs(F,{id:`${o}-key`,required:x,children:[t.jsx(F.Label,{children:b}),t.jsx(te,{defaultValue:m,disabled:a||c,name:`${o}-key`,onBlur:c?void 0:g,type:"text",block:!0})]})}),t.jsx(T,{pr:2,sx:{flexBasis:0,flexGrow:1,maxWidth:"100%"},children:e}),t.jsx(T,{children:t.jsx(y,{iconType:"default",style:S,disabled:a||c,onClick:u(m),uiSchema:l,registry:h})})]},`${o}-key`)}function ht(){return{ArrayFieldItemTemplate:Ye,ArrayFieldTemplate:Qe,BaseInputTemplate:Ze,ButtonTemplates:{AddButton:Je,CopyButton:rt,MoveDownButton:nt,MoveUpButton:st,RemoveButton:at,SubmitButton:ct},DescriptionFieldTemplate:et,ErrorListTemplate:tt,FieldErrorTemplate:it,FieldHelpTemplate:lt,FieldTemplate:ot,ObjectFieldTemplate:dt,TitleFieldTemplate:ut,WrapIfAdditionalTemplate:pt}}function mt(r){const{schema:e,id:n,value:s,disabled:a,readonly:o,label:m,autofocus:u,onChange:d,onBlur:c,onFocus:x}=r,i=Le(e),l=({target:{checked:f}})=>d(f),h=({target:{value:f}})=>c(n,f),p=({target:{value:f}})=>x(n,f);return t.jsxs(F,{id:n,children:[t.jsx(H,{checked:typeof s>"u"?!1:!!s,required:i,disabled:a||o,autoFocus:u,onChange:l,onBlur:h,onFocus:p,"aria-describedby":L(n)}),t.jsx(F.Label,{children:m||""})]})}function xt({schema:r,label:e,id:n,disabled:s,options:a,value:o,autofocus:m,readonly:u,required:d,onChange:c,onBlur:x,onFocus:i}){const{enumOptions:l,enumDisabled:h,inline:p,emptyValue:f}=a,y=Array.isArray(o)?o:[o],b=g=>({target:{checked:C}})=>{c(C?Oe(g,y,l):Re(g,y,l))},j=({target:{value:g}})=>x(n,v(g,l,f)),S=({target:{value:g}})=>i(n,v(g,l,f));return t.jsxs(Z,{required:d,children:[t.jsx(Z.Label,{children:e||r.title}),Array.isArray(l)&&l.map((g,C)=>{const w=We(g.value,y),I=Array.isArray(h)&&h.indexOf(g.value)!==-1;return t.jsxs(F,{id:G(n,C),children:[t.jsx(H,{checked:w,disabled:s||I||u,autoFocus:m&&C===0,onChange:b(C),onBlur:j,onFocus:S,"aria-describedby":L(n)}),t.jsx(F.Label,{children:g.label})]},G(n,C))})]})}function ft(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e);return t.jsx(s,{type:"date",InputLabelProps:{shrink:!0},...r})}function yt(r){const{options:e,registry:n}=r,s=A("BaseInputTemplate",n,e),a=Ve(r.value),o=m=>{r.onChange(_e(m))};return t.jsx(s,{type:"datetime-local",...r,value:a,onChange:o})}function gt({id:r,schema:e,options:n,value:s,required:a,disabled:o,readonly:m,label:u,onChange:d,onBlur:c,onFocus:x}){const{enumOptions:i,enumDisabled:l,emptyValue:h}=n,p=({target:{value:b}})=>d(v(b,i,h)),f=({target:{value:b}})=>c(r,v(b,i,h)),y=({target:{value:b}})=>x(r,v(b,i,h));return t.jsxs(J,{name:r,required:a,children:[t.jsx(J.Label,{children:u||e.title}),t.jsx(t.Fragment,{children:Array.isArray(i)&&i.map((b,j)=>{const S=Array.isArray(l)&&l.indexOf(b.value)!==-1;return t.jsxs(F,{id:G(r,j),children:[t.jsx(fe,{value:String(j),onChange:p,onBlur:f,onFocus:y,"aria-describedby":L(r),disabled:o||S||m},j),t.jsx(F.Label,{children:b.label})]},G(r,j))})})]})}function bt(r){const{value:e,readonly:n,disabled:s,options:a,schema:o,onChange:m,label:u,id:d}=r,c={value:e,label:u,id:d,name:d,...Ee(o)},x=i=>{m(i??a.emptyValue)};return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{htmlFor:d,children:u||o.title}),t.jsx(Ke,{disabled:s||n,onChange:x,...c,"aria-describedby":L(d)})]})}function jt({schema:r,id:e,options:n,label:s,required:a,disabled:o,placeholder:m,readonly:u,value:d,multiple:c,autofocus:x,onChange:i,onBlur:l,onFocus:h,rawErrors:p=[],registry:f,uiSchema:y,hideError:b,formContext:j,...S}){const{enumOptions:g,enumDisabled:C,emptyValue:w}=n,[I,R]=E.useState(!1);c=typeof c>"u"?!1:!!c;const V=c?[]:"",M=typeof d>"u"||c&&d.length<1||!c&&d===V,q=g?.map(({value:k,label:B},W)=>{const _=Array.isArray(C)&&C.indexOf(k)!==-1;return{text:B,id:W,disabled:_}}),N=({target:{value:k}})=>i(v(k,g,w)),U=({target:{value:k}})=>l(e,v(k,g,w)),z=({target:{value:k}})=>h(e,v(k,g,w)),$=qe(d,g,c);return t.jsxs(F,{id:e,required:a,children:[t.jsx(F.Label,{visuallyHidden:!(s||r.title),htmlFor:e,children:s||r.title}),c&&Array.isArray(g)?t.jsx(ye,{placeholderText:(s||r.title)??"",renderAnchor:({children:k,"aria-labelledby":B,...W})=>t.jsx(re,{trailingAction:ge,"aria-labelledby":` ${B}`,...W,onClick:_=>{R(!I),_.preventDefault()},children:k||`Select ${s||r.title}`}),open:I,onOpenChange:R,items:q??[],selected:(q??[]).filter((k,B)=>$?.includes(String(B))),onSelectedChange:k=>{i(v(k.map(B=>B.id),g,w))},onFilterChange:()=>null,overlayProps:{width:"small"}}):t.jsx(Y,{name:e,value:M?V:$,disabled:o||u,autoFocus:x,placeholder:s||r.title,validationStatus:p.length>0?"error":void 0,onChange:N,onBlur:U,onFocus:z,defaultValue:void 0,...S,"aria-describedby":L(e),children:Array.isArray(g)&&g.map(({value:k,label:B},W)=>{const _=Array.isArray(C)&&C.indexOf(k)!==-1;return t.jsx(Y.Option,{value:String(W),disabled:_,children:B},W)})})]})}function Ct({id:r,placeholder:e,value:n,label:s,disabled:a,autofocus:o,readonly:m,onBlur:u,onFocus:d,onChange:c,options:x,schema:i,uiSchema:l,required:h,rawErrors:p=[],registry:f}){const{schemaUtils:y}=f,b=y.getDisplayLabel(i,l)&&(!!s||!!i.title),j=({target:{value:C}})=>c(C===""?x.emptyValue:C),S=({target:{value:C}})=>u(r,C),g=({target:{value:C}})=>d(r,C);return t.jsxs(t.Fragment,{children:[t.jsx(F.Label,{visuallyHidden:!b,htmlFor:r,children:s||i.title}),t.jsx(be,{id:r,name:r,value:n??"",placeholder:e,autoFocus:o,required:h,disabled:a||m,validationStatus:p.length>0?"error":void 0,onChange:j,onBlur:S,onFocus:g,block:!0,"aria-describedby":L(r)})]})}function Tt(){return{CheckboxWidget:mt,CheckboxesWidget:xt,DateWidget:ft,DateTimeWidget:yt,RadioWidget:gt,RangeWidget:bt,SelectWidget:jt,TextareaWidget:Ct}}function St(){return{templates:ht(),widgets:Tt()}}function Ft(){return Xe(St())}const Bt=Ft();function kt({id:r,value:e,label:n,disabled:s,readonly:a,onChange:o}){return t.jsxs(Ce,{display:"flex",flexDirection:"column",gap:1,children:[t.jsx(K,{as:"span",id:`${r}-label`,sx:{fontWeight:"semibold"},children:n}),t.jsx(Te,{size:"small","aria-labelledby":`${r}-label`,checked:!!e,disabled:s||a,onClick:()=>o(!e)})]})}function vt({id:r,value:e,label:n,disabled:s,readonly:a,placeholder:o,onChange:m}){const u=Array.isArray(e)?e.map(String):[],[d,c]=E.useState(""),x=()=>{const i=d.trim();i&&!u.includes(i)&&m([...u,i]),c("")};return t.jsxs(F,{id:r,disabled:s||a,children:[t.jsx(F.Label,{children:n}),t.jsx(je,{block:!0,placeholder:o,tokens:u.map((i,l)=>({id:l,text:i})),value:d,onChange:i=>c(i.target.value.replace(",","")),onKeyDown:i=>{(i.key==="Enter"||i.key===",")&&(i.preventDefault(),x())},onBlur:x,onTokenRemove:i=>{m(u.filter((l,h)=>h!==i))}})]})}const wt={switch:kt,tags:vt};function Gt(r){return t.jsx(Bt,{...r,widgets:wt,validator:$e})}export{Gt as default};
@@ -1 +1 @@
1
- import{r as h,j as t,a4 as x,B as c,T as a,v as f,a5 as u}from"../datalayer-app-main.js";import{c as b}from"./sheet-BFp5lgzm.js";import{F as m}from"./FormulaBar-f9U7lupQ.js";import{C as S,S as g,a as j}from"./SheetTabs-sx_-jWyq.js";import{t as k}from"./write-D-y9_9sL.js";import"./model-jLDiOPpQ.js";const o={kicker:"Sheet",export:"Export CSV",exportTitle:"Download the tab shown as a CSV file",cells:e=>e===1?"1 cell":`${e} cells`,kept:"You can edit the cells. Your edits stay on this page: export to keep them."},w=340,v=e=>`${e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"sheet"}.csv`,C=e=>k(e,{sheet:e.selection.sheet});function E(e,i){const r=URL.createObjectURL(new Blob([i],{type:"text/csv;charset=utf-8"})),s=document.createElement("a");s.href=r,s.download=e,s.click(),URL.revokeObjectURL(r)}function B({model:e}){const i=h.useCallback(l=>{const d=e.subscribe(l),p=e.subscribeSelection(l);return()=>{d(),p()}},[e]),r=h.useSyncExternalStore(i,()=>`${e.revision}:${e.selection.sheet}`,()=>""),s=e.sheet(e.selection.sheet).name,n=b(e);return t.jsxs(x,{as:"section","aria-label":`${o.kicker}: ${s}`,"data-page-sheet":"","data-page-sheet-tab":s,"data-page-sheet-cells":n,"data-page-sheet-facts":r,border:!0,shadow:"none",overflow:"hidden",my:2,width:"100%",maxWidth:760,children:[t.jsxs(c,{display:"flex",alignItems:"center",px:3,py:2,borderBottom:"1px solid",borderColor:"border.muted",sx:{gap:2,minWidth:0},children:[t.jsx(a,{sx:{fontSize:0,fontWeight:"semibold",color:"success.fg",letterSpacing:"0.04em",textTransform:"uppercase",flexShrink:0},children:o.kicker}),t.jsx(a,{as:"h4",sx:{m:0,fontSize:2,fontWeight:"semibold",color:"fg.default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:s}),t.jsx(a,{sx:{fontSize:0,color:"fg.muted",fontVariantNumeric:"tabular-nums",flexShrink:0},children:o.cells(n)}),t.jsx(f,{size:"small",leadingVisual:u,title:o.exportTitle,disabled:n===0,onClick:()=>E(v(s),C(e)),"data-page-sheet-export":"",children:o.export})]}),t.jsxs(S,{model:e,children:[t.jsx(m,{}),t.jsx(c,{height:w,position:"relative",children:t.jsx(g,{model:e,"aria-label":`Spreadsheet: ${s}`})}),t.jsx(j,{})]}),t.jsx(c,{px:3,py:2,borderTop:"1px solid",borderColor:"border.muted",bg:"canvas.subtle",children:t.jsx(a,{sx:{fontSize:0,color:"fg.muted"},children:o.kept})})]})}export{w as PAGE_SHEET_GRID_HEIGHT,o as PAGE_SHEET_WORDS,v as csvFileName,B as default,C as sheetCsv};
1
+ import{r as h,j as t,a4 as x,B as c,T as a,v as f,a5 as u}from"../datalayer-app-main.js";import{c as b}from"./sheet-BQ9MLxvm.js";import{F as m}from"./FormulaBar-BUs-n7Zc.js";import{C as S,S as g,a as j}from"./SheetTabs-BZP7_RGB.js";import{t as k}from"./write-DKnalcKH.js";import"./model-DUnnBi6P.js";const o={kicker:"Sheet",export:"Export CSV",exportTitle:"Download the tab shown as a CSV file",cells:e=>e===1?"1 cell":`${e} cells`,kept:"You can edit the cells. Your edits stay on this page: export to keep them."},w=340,v=e=>`${e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"sheet"}.csv`,C=e=>k(e,{sheet:e.selection.sheet});function E(e,i){const r=URL.createObjectURL(new Blob([i],{type:"text/csv;charset=utf-8"})),s=document.createElement("a");s.href=r,s.download=e,s.click(),URL.revokeObjectURL(r)}function B({model:e}){const i=h.useCallback(l=>{const d=e.subscribe(l),p=e.subscribeSelection(l);return()=>{d(),p()}},[e]),r=h.useSyncExternalStore(i,()=>`${e.revision}:${e.selection.sheet}`,()=>""),s=e.sheet(e.selection.sheet).name,n=b(e);return t.jsxs(x,{as:"section","aria-label":`${o.kicker}: ${s}`,"data-page-sheet":"","data-page-sheet-tab":s,"data-page-sheet-cells":n,"data-page-sheet-facts":r,border:!0,shadow:"none",overflow:"hidden",my:2,width:"100%",maxWidth:760,children:[t.jsxs(c,{display:"flex",alignItems:"center",px:3,py:2,borderBottom:"1px solid",borderColor:"border.muted",sx:{gap:2,minWidth:0},children:[t.jsx(a,{sx:{fontSize:0,fontWeight:"semibold",color:"success.fg",letterSpacing:"0.04em",textTransform:"uppercase",flexShrink:0},children:o.kicker}),t.jsx(a,{as:"h4",sx:{m:0,fontSize:2,fontWeight:"semibold",color:"fg.default",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:1},children:s}),t.jsx(a,{sx:{fontSize:0,color:"fg.muted",fontVariantNumeric:"tabular-nums",flexShrink:0},children:o.cells(n)}),t.jsx(f,{size:"small",leadingVisual:u,title:o.exportTitle,disabled:n===0,onClick:()=>E(v(s),C(e)),"data-page-sheet-export":"",children:o.export})]}),t.jsxs(S,{model:e,children:[t.jsx(m,{}),t.jsx(c,{height:w,position:"relative",children:t.jsx(g,{model:e,"aria-label":`Spreadsheet: ${s}`})}),t.jsx(j,{})]}),t.jsx(c,{px:3,py:2,borderTop:"1px solid",borderColor:"border.muted",bg:"canvas.subtle",children:t.jsx(a,{sx:{fontSize:0,color:"fg.muted"},children:o.kept})})]})}export{w as PAGE_SHEET_GRID_HEIGHT,o as PAGE_SHEET_WORDS,v as csvFileName,B as default,C as sheetCsv};
@@ -1,4 +1,4 @@
1
- import{j as v,r as x,dH as yt,hq as bt,aI as Nn,v as Dt,_ as Bn,hr as Kn,hs as Xn,ht as Yn,bA as de,dJ as Wn,a9 as Un,I as Ot,X as Gn,dI as ct,hu as Vn}from"../datalayer-app-main.js";import{s as en,a as Zn,p as qn,q as Jn,P as tn,C as Qn,r as eo,d as to,u as we,v as nn,w as on,x as no,y as oo,A as ro,D as so,E as rn,F as io,G as Fe,H as lo,I as co,c as He,J as sn,o as ln,K as ao,L as uo,M as _e,N as Re,O as ho,Q as fo,z as Me,R as mo,e as go,S as xo,T as ht,U as Pt,V as wo,b as It}from"./model-jLDiOPpQ.js";function cn(t,e,n){if(e===void 0)return t.selection.sheet;const o=e.toLowerCase(),s=t.sheets.find(i=>i.name.toLowerCase()===o);if(s===void 0)throw new Error(`'${n}' names no sheet of the workbook: there is no '${e}'.`);return s.id}function vt(t,e){const{sheet:n,ref:o}=en(e);return{sheet:cn(t,n,e),...Zn(o)}}function Ct(t,e){const{sheet:n,ref:o}=en(e);return{sheet:cn(t,n,e),zone:qn(o)}}const Lt=new WeakMap,_t=new WeakMap;function po(t){let e=Lt.get(t);return e===void 0&&(e=new tn(t,Qn,{label:"chart type",key:n=>n.id,check:n=>{if(typeof n.id!="string"||!/^[a-z][a-zA-Z0-9.-]*$/.test(n.id))throw new Error("a chart type has an id such as 'column' or 'acme.radar'");if(typeof n.option!="function")throw new Error(`the chart type ${n.id} has no option`);if(typeof n.describe!="function")throw new Error(`the chart type ${n.id} has no describe`);if(!Array.isArray(n.modules))throw new Error(`the chart type ${n.id} lists its modules`)}}),Lt.set(t,e)),e}function yo(t){let e=_t.get(t);return e===void 0&&(e=new tn(t,eo,{label:"chart option transform",key:n=>n.id,check:n=>{if(typeof n.transform!="function")throw new Error(`the chart option transform ${n.id} has no transform`)}}),_t.set(t,e)),e}function an(t){return Jn(t,to,"chart renderer")}function bo(t,e,n,o,s=[]){let i=o.option(t,e,n);for(const r of s)r.applies!==void 0&&!r.applies(t)||(i=r.transform(i,t,n));return i}function vo(t,e){const n=`A ${t.type} chart`;return e==="not-loaded"?`${n}: charts are not loaded`:`${n}: no plugin draws '${t.type}' charts`}const Ft=new WeakMap;function Co(t,e,n,o,s=an(t.reactor)===void 0?"not-loaded":"loaded"){const i=t.sheet(e).charts.get(n);if(i===void 0)throw new Error(`No chart '${n}' on sheet '${e}'.`);const r=t.chartRevision(e,n),a=po(t.reactor),c=a.revision,u=Ft.get(i);if(u!==void 0&&u.revision===r&&u.theme===o&&u.platform===c&&u.renderer===s)return u.resolved;let p;const C=s==="loaded"?a.get(i.type):void 0;if(C===void 0)p={kind:"placeholder",text:vo(i,s==="loaded"?"no-type":"not-loaded")};else{const w=t.chartData(e,n),f=yo(t.reactor).all().map(S=>S.value);p={kind:"option",type:C,data:w,option:bo(i,w,o,C.value,f),description:C.value.describe(i,w)}}return Ft.set(i,{revision:r,theme:o,platform:c,renderer:s,resolved:p}),p}const dn=x.createContext(null);function So({model:t,children:e}){return v.jsx(dn.Provider,{value:t,children:e})}function ye(){const t=x.useContext(dn);if(t===null)throw new Error("useCells reads the model of a <CellsProvider> or a <Spreadsheet>; this component is in neither.");return t}function Eo(){const t=ye(),e=x.useCallback(n=>{const o=t.subscribe(n),s=t.subscribeSelection(n);return()=>{o(),s()}},[t]);return x.useSyncExternalStore(e,()=>t.revision,()=>t.revision)}function St(t,e){const n=ye(),o=Eo();return x.useMemo(()=>t(n),[n,o,...e])}function Mo(t){return St(e=>{const{sheet:n,row:o,col:s}=vt(e,t);return{content:e.content(n,o,s),value:e.value(n,o,s),style:e.style(n,o,s)}},[t])}function Kr(t){const e=ye(),{style:n}=Mo(t),o=x.useCallback(s=>{const{sheet:i,zone:r}=Ct(e,t);return e.dispatch({type:"SET_STYLE",sheet:i,zone:r,style:s})},[e,t]);return{style:n,set:o}}function Xr(){const t=ye();return St(e=>({...e.selection,select:(n,o={})=>{const{sheet:s,zone:i}=Ct(t,n),r={row:i.top,col:i.left},a=s===t.selection.sheet?t.selection:we(s,r);let c;o.add?c=no(a,i):i.top===i.bottom&&i.left===i.right?c=oo(a,r,o.extend):c={sheet:s,zones:[i],anchor:r,active:r},t.select(c)},set:n=>t.select(n),navigate:n=>{const o=t.selection;t.select(nn(o,n,on(t.sheet(o.sheet))))},activate:n=>t.select(we(t.sheet(n).id))}),[])}function ko(){const t=ye();return St(e=>({sheets:e.sheets.map(n=>({id:n.id,name:n.name,frozen:{...n.frozen},merges:[...n.merges]})),active:e.selection.sheet,add:(n,o)=>t.dispatch({type:"ADD_SHEET",name:n,at:o}),rename:(n,o)=>t.dispatch({type:"RENAME_SHEET",sheet:n,name:o}),move:(n,o)=>t.dispatch({type:"MOVE_SHEET",sheet:n,to:o}),remove:n=>t.dispatch({type:"DELETE_SHEET",sheet:n}),freeze:(n,o,s)=>t.dispatch({type:"FREEZE",sheet:n,rows:o,cols:s}),activate:n=>t.select(we(t.sheet(n).id))}),[])}function Yr(){const t=ye(),e=x.useCallback(o=>t.subscribeEdit(o),[t]),n=x.useSyncExternalStore(e,()=>t.edit,()=>t.edit);return x.useMemo(()=>({edit:n,start:(o,s)=>{if(o===void 0){t.startEdit(void 0,s);return}const i=vt(t,o);i.sheet!==t.selection.sheet&&t.select(we(i.sheet,i)),t.startEdit({row:i.row,col:i.col},s)},setText:o=>t.setEditText(o),commit:()=>t.commitEdit(),cancel:()=>t.cancelEdit()}),[t,n])}function Wr(t){const e=ye(),n=x.useCallback(s=>e.reactor.subscribe(s),[e]),o=x.useSyncExternalStore(n,()=>e.reactor.getRevision(),()=>e.reactor.getRevision());return x.useMemo(()=>e.reactor.getContributions(t),[e,t,o])}function Ur(){const t=ye(),e=x.useCallback(o=>t.reactor.subscribe(o),[t]),n=x.useSyncExternalStore(e,()=>t.reactor.getRevision(),()=>t.reactor.getRevision());return x.useMemo(()=>t.reactor.listCommands(),[t,n])}const ft="data-cells-slice",at=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function zo(t){if(t===void 0)return"";const e=[];t.bold&&e.push("font-weight:bold"),t.italic&&e.push("font-style:italic");const n=[t.underline?"underline":"",t.strike?"line-through":""].filter(Boolean).join(" ");return n&&e.push(`text-decoration:${n}`),t.color&&e.push(`color:${t.color}`),t.fill&&e.push(`background-color:${t.fill}`),t.align&&e.push(`text-align:${t.align}`),t.valign&&e.push(`vertical-align:${t.valign}`),t.size&&e.push(`font-size:${t.size}px`),t.font&&e.push(`font-family:${t.font}`),t.wrap&&e.push("white-space:normal"),e.join(";")}function Ro(t,e){const n=Array.from({length:t.rows},()=>Array.from({length:t.cols},()=>"")),o=Array.from({length:t.rows},()=>Array.from({length:t.cols},()=>{})),s=t.parts.cells??[],i=t.source;for(const r of s){const a=r.f!==void 0&&i!==void 0&&e.workbook.hasSheet(i.sheet)?e.value(i.sheet,i.zone.top+r.r,i.zone.left+r.c):r.v??null;n[r.r][r.c]=Fe(a,r.style?.format).text,o[r.r][r.c]=r.style}return{text:n,styles:o}}function To(t,e){const{text:n,styles:o}=Ro(t,e),s=n.map((r,a)=>`<tr>${r.map((c,u)=>{const p=zo(o[a][u]);return`<td${p?` style="${at(p)}"`:""}>${at(c).replace(/\n/g,"<br>")}</td>`}).join("")}</tr>`).join(""),i=`<meta charset="utf-8"><table ${ft}="${at(JSON.stringify(t))}" style="border-collapse:collapse">${s}</table>`;return{text:ro(n),html:i}}function $o(t){const e={},n=t["font-weight"];(n==="bold"||n==="bolder"||Number(n)>=600)&&(e.bold=!0),t["font-style"]==="italic"&&(e.italic=!0);const o=t["text-decoration"]??t["text-decoration-line"]??"";o.includes("underline")&&(e.underline=!0),o.includes("line-through")&&(e.strike=!0);const s=t.color;s&&!/^(windowtext|black|#000000|#000|rgb\(0, 0, 0\))$/i.test(s)&&(e.color=s);const i=t["background-color"]??t.background;i&&!/^(transparent|white|#ffffff|#fff|rgb\(255, 255, 255\)|none|initial)$/i.test(i)&&(e.fill=i);const r=t["text-align"];(r==="left"||r==="center"||r==="right")&&(e.align=r);const a=t["vertical-align"];(a==="top"||a==="middle")&&(e.valign=a);const c=(t["mso-number-format"]??t["data-sheets-numberformat"])?.replace(/^"|"$/g,"").replace(/\\(.)/g,"$1");if(c)try{lo(c),e.format=c}catch{}return Object.keys(e).length>0?e:void 0}function Ht(t){const e={},n=[];let o="",s=!1;for(let i=0;i<t.length;i+=1){const r=t[i];r==="\\"&&i+1<t.length?(o+=r+t[i+1],i+=1):r==='"'?(s=!s,o+=r):r===";"&&!s?(n.push(o),o=""):o+=r}n.push(o);for(const i of n){const r=i.indexOf(":");r<0||(e[i.slice(0,r).trim().toLowerCase()]=i.slice(r+1).trim())}return e}function Ao(t,e){const n=t.getAttribute("x:num")??t.getAttribute("num");if(n!==null){const c=Number(n===""?e.replace(/[^0-9.eE+-]/g,""):n);if(Number.isFinite(c))return{v:c}}const o=t.getAttribute("x:bool");if(o!==null)return{v:o.toUpperCase()==="TRUE"};const s=t.getAttribute("x:fmla")??t.getAttribute("data-sheets-formula"),i=t.getAttribute("data-sheets-value");if(i!==null)try{const c=JSON.parse(i);if(typeof c[3]=="number")return{v:c[3]};if(typeof c[2]=="string")return{v:c[2]};if(typeof c[4]=="number")return{v:c[4]===1}}catch{}if(s!==null&&s.startsWith("="))return{f:s.slice(1)};const a=rn([[e]]).parts.cells[0];return a===void 0?{}:{...a.v!==void 0?{v:a.v}:{},...a.f!==void 0?{f:a.f}:{}}}function jo(t,e){if(t){const n=new DOMParser().parseFromString(t,"text/html"),o=n.querySelector(`[${ft}]`);if(o!==null){const i=JSON.parse(o.getAttribute(ft));return so(i),i}const s=n.querySelector("table");if(s!==null){const i=new Map;for(const p of n.querySelectorAll("style")){const C=(p.textContent??"").replace(/<!--|-->/g,"");for(const w of C.matchAll(/\.([\w-]+)\s*\{([^}]*)\}/g))i.set(w[1],Ht(w[2]))}const r=[],a=new Set;let c=0,u=0;if(s.querySelectorAll("tr").forEach((p,C)=>{let w=0;p.querySelectorAll("td, th").forEach(f=>{for(;a.has(`${C},${w}`);)w+=1;const S=Math.max(1,Number(f.getAttribute("colspan")??1)),y=Math.max(1,Number(f.getAttribute("rowspan")??1));for(let O=0;O<y;O+=1)for(let j=0;j<S;j+=1)a.add(`${C+O},${w+j}`);f.querySelectorAll("br").forEach(O=>O.replaceWith(`
1
+ import{j as v,r as x,dH as yt,hq as bt,aI as Nn,v as Dt,_ as Bn,hr as Kn,hs as Xn,ht as Yn,bA as de,dJ as Wn,a9 as Un,I as Ot,X as Gn,dI as ct,hu as Vn}from"../datalayer-app-main.js";import{s as en,a as Zn,p as qn,q as Jn,P as tn,C as Qn,r as eo,d as to,u as we,v as nn,w as on,x as no,y as oo,A as ro,D as so,E as rn,F as io,G as Fe,H as lo,I as co,c as He,J as sn,o as ln,K as ao,L as uo,M as _e,N as Re,O as ho,Q as fo,z as Me,R as mo,e as go,S as xo,T as ht,U as Pt,V as wo,b as It}from"./model-DUnnBi6P.js";function cn(t,e,n){if(e===void 0)return t.selection.sheet;const o=e.toLowerCase(),s=t.sheets.find(i=>i.name.toLowerCase()===o);if(s===void 0)throw new Error(`'${n}' names no sheet of the workbook: there is no '${e}'.`);return s.id}function vt(t,e){const{sheet:n,ref:o}=en(e);return{sheet:cn(t,n,e),...Zn(o)}}function Ct(t,e){const{sheet:n,ref:o}=en(e);return{sheet:cn(t,n,e),zone:qn(o)}}const Lt=new WeakMap,_t=new WeakMap;function po(t){let e=Lt.get(t);return e===void 0&&(e=new tn(t,Qn,{label:"chart type",key:n=>n.id,check:n=>{if(typeof n.id!="string"||!/^[a-z][a-zA-Z0-9.-]*$/.test(n.id))throw new Error("a chart type has an id such as 'column' or 'acme.radar'");if(typeof n.option!="function")throw new Error(`the chart type ${n.id} has no option`);if(typeof n.describe!="function")throw new Error(`the chart type ${n.id} has no describe`);if(!Array.isArray(n.modules))throw new Error(`the chart type ${n.id} lists its modules`)}}),Lt.set(t,e)),e}function yo(t){let e=_t.get(t);return e===void 0&&(e=new tn(t,eo,{label:"chart option transform",key:n=>n.id,check:n=>{if(typeof n.transform!="function")throw new Error(`the chart option transform ${n.id} has no transform`)}}),_t.set(t,e)),e}function an(t){return Jn(t,to,"chart renderer")}function bo(t,e,n,o,s=[]){let i=o.option(t,e,n);for(const r of s)r.applies!==void 0&&!r.applies(t)||(i=r.transform(i,t,n));return i}function vo(t,e){const n=`A ${t.type} chart`;return e==="not-loaded"?`${n}: charts are not loaded`:`${n}: no plugin draws '${t.type}' charts`}const Ft=new WeakMap;function Co(t,e,n,o,s=an(t.reactor)===void 0?"not-loaded":"loaded"){const i=t.sheet(e).charts.get(n);if(i===void 0)throw new Error(`No chart '${n}' on sheet '${e}'.`);const r=t.chartRevision(e,n),a=po(t.reactor),c=a.revision,u=Ft.get(i);if(u!==void 0&&u.revision===r&&u.theme===o&&u.platform===c&&u.renderer===s)return u.resolved;let p;const C=s==="loaded"?a.get(i.type):void 0;if(C===void 0)p={kind:"placeholder",text:vo(i,s==="loaded"?"no-type":"not-loaded")};else{const w=t.chartData(e,n),f=yo(t.reactor).all().map(S=>S.value);p={kind:"option",type:C,data:w,option:bo(i,w,o,C.value,f),description:C.value.describe(i,w)}}return Ft.set(i,{revision:r,theme:o,platform:c,renderer:s,resolved:p}),p}const dn=x.createContext(null);function So({model:t,children:e}){return v.jsx(dn.Provider,{value:t,children:e})}function ye(){const t=x.useContext(dn);if(t===null)throw new Error("useCells reads the model of a <CellsProvider> or a <Spreadsheet>; this component is in neither.");return t}function Eo(){const t=ye(),e=x.useCallback(n=>{const o=t.subscribe(n),s=t.subscribeSelection(n);return()=>{o(),s()}},[t]);return x.useSyncExternalStore(e,()=>t.revision,()=>t.revision)}function St(t,e){const n=ye(),o=Eo();return x.useMemo(()=>t(n),[n,o,...e])}function Mo(t){return St(e=>{const{sheet:n,row:o,col:s}=vt(e,t);return{content:e.content(n,o,s),value:e.value(n,o,s),style:e.style(n,o,s)}},[t])}function Kr(t){const e=ye(),{style:n}=Mo(t),o=x.useCallback(s=>{const{sheet:i,zone:r}=Ct(e,t);return e.dispatch({type:"SET_STYLE",sheet:i,zone:r,style:s})},[e,t]);return{style:n,set:o}}function Xr(){const t=ye();return St(e=>({...e.selection,select:(n,o={})=>{const{sheet:s,zone:i}=Ct(t,n),r={row:i.top,col:i.left},a=s===t.selection.sheet?t.selection:we(s,r);let c;o.add?c=no(a,i):i.top===i.bottom&&i.left===i.right?c=oo(a,r,o.extend):c={sheet:s,zones:[i],anchor:r,active:r},t.select(c)},set:n=>t.select(n),navigate:n=>{const o=t.selection;t.select(nn(o,n,on(t.sheet(o.sheet))))},activate:n=>t.select(we(t.sheet(n).id))}),[])}function ko(){const t=ye();return St(e=>({sheets:e.sheets.map(n=>({id:n.id,name:n.name,frozen:{...n.frozen},merges:[...n.merges]})),active:e.selection.sheet,add:(n,o)=>t.dispatch({type:"ADD_SHEET",name:n,at:o}),rename:(n,o)=>t.dispatch({type:"RENAME_SHEET",sheet:n,name:o}),move:(n,o)=>t.dispatch({type:"MOVE_SHEET",sheet:n,to:o}),remove:n=>t.dispatch({type:"DELETE_SHEET",sheet:n}),freeze:(n,o,s)=>t.dispatch({type:"FREEZE",sheet:n,rows:o,cols:s}),activate:n=>t.select(we(t.sheet(n).id))}),[])}function Yr(){const t=ye(),e=x.useCallback(o=>t.subscribeEdit(o),[t]),n=x.useSyncExternalStore(e,()=>t.edit,()=>t.edit);return x.useMemo(()=>({edit:n,start:(o,s)=>{if(o===void 0){t.startEdit(void 0,s);return}const i=vt(t,o);i.sheet!==t.selection.sheet&&t.select(we(i.sheet,i)),t.startEdit({row:i.row,col:i.col},s)},setText:o=>t.setEditText(o),commit:()=>t.commitEdit(),cancel:()=>t.cancelEdit()}),[t,n])}function Wr(t){const e=ye(),n=x.useCallback(s=>e.reactor.subscribe(s),[e]),o=x.useSyncExternalStore(n,()=>e.reactor.getRevision(),()=>e.reactor.getRevision());return x.useMemo(()=>e.reactor.getContributions(t),[e,t,o])}function Ur(){const t=ye(),e=x.useCallback(o=>t.reactor.subscribe(o),[t]),n=x.useSyncExternalStore(e,()=>t.reactor.getRevision(),()=>t.reactor.getRevision());return x.useMemo(()=>t.reactor.listCommands(),[t,n])}const ft="data-cells-slice",at=t=>t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;");function zo(t){if(t===void 0)return"";const e=[];t.bold&&e.push("font-weight:bold"),t.italic&&e.push("font-style:italic");const n=[t.underline?"underline":"",t.strike?"line-through":""].filter(Boolean).join(" ");return n&&e.push(`text-decoration:${n}`),t.color&&e.push(`color:${t.color}`),t.fill&&e.push(`background-color:${t.fill}`),t.align&&e.push(`text-align:${t.align}`),t.valign&&e.push(`vertical-align:${t.valign}`),t.size&&e.push(`font-size:${t.size}px`),t.font&&e.push(`font-family:${t.font}`),t.wrap&&e.push("white-space:normal"),e.join(";")}function Ro(t,e){const n=Array.from({length:t.rows},()=>Array.from({length:t.cols},()=>"")),o=Array.from({length:t.rows},()=>Array.from({length:t.cols},()=>{})),s=t.parts.cells??[],i=t.source;for(const r of s){const a=r.f!==void 0&&i!==void 0&&e.workbook.hasSheet(i.sheet)?e.value(i.sheet,i.zone.top+r.r,i.zone.left+r.c):r.v??null;n[r.r][r.c]=Fe(a,r.style?.format).text,o[r.r][r.c]=r.style}return{text:n,styles:o}}function To(t,e){const{text:n,styles:o}=Ro(t,e),s=n.map((r,a)=>`<tr>${r.map((c,u)=>{const p=zo(o[a][u]);return`<td${p?` style="${at(p)}"`:""}>${at(c).replace(/\n/g,"<br>")}</td>`}).join("")}</tr>`).join(""),i=`<meta charset="utf-8"><table ${ft}="${at(JSON.stringify(t))}" style="border-collapse:collapse">${s}</table>`;return{text:ro(n),html:i}}function $o(t){const e={},n=t["font-weight"];(n==="bold"||n==="bolder"||Number(n)>=600)&&(e.bold=!0),t["font-style"]==="italic"&&(e.italic=!0);const o=t["text-decoration"]??t["text-decoration-line"]??"";o.includes("underline")&&(e.underline=!0),o.includes("line-through")&&(e.strike=!0);const s=t.color;s&&!/^(windowtext|black|#000000|#000|rgb\(0, 0, 0\))$/i.test(s)&&(e.color=s);const i=t["background-color"]??t.background;i&&!/^(transparent|white|#ffffff|#fff|rgb\(255, 255, 255\)|none|initial)$/i.test(i)&&(e.fill=i);const r=t["text-align"];(r==="left"||r==="center"||r==="right")&&(e.align=r);const a=t["vertical-align"];(a==="top"||a==="middle")&&(e.valign=a);const c=(t["mso-number-format"]??t["data-sheets-numberformat"])?.replace(/^"|"$/g,"").replace(/\\(.)/g,"$1");if(c)try{lo(c),e.format=c}catch{}return Object.keys(e).length>0?e:void 0}function Ht(t){const e={},n=[];let o="",s=!1;for(let i=0;i<t.length;i+=1){const r=t[i];r==="\\"&&i+1<t.length?(o+=r+t[i+1],i+=1):r==='"'?(s=!s,o+=r):r===";"&&!s?(n.push(o),o=""):o+=r}n.push(o);for(const i of n){const r=i.indexOf(":");r<0||(e[i.slice(0,r).trim().toLowerCase()]=i.slice(r+1).trim())}return e}function Ao(t,e){const n=t.getAttribute("x:num")??t.getAttribute("num");if(n!==null){const c=Number(n===""?e.replace(/[^0-9.eE+-]/g,""):n);if(Number.isFinite(c))return{v:c}}const o=t.getAttribute("x:bool");if(o!==null)return{v:o.toUpperCase()==="TRUE"};const s=t.getAttribute("x:fmla")??t.getAttribute("data-sheets-formula"),i=t.getAttribute("data-sheets-value");if(i!==null)try{const c=JSON.parse(i);if(typeof c[3]=="number")return{v:c[3]};if(typeof c[2]=="string")return{v:c[2]};if(typeof c[4]=="number")return{v:c[4]===1}}catch{}if(s!==null&&s.startsWith("="))return{f:s.slice(1)};const a=rn([[e]]).parts.cells[0];return a===void 0?{}:{...a.v!==void 0?{v:a.v}:{},...a.f!==void 0?{f:a.f}:{}}}function jo(t,e){if(t){const n=new DOMParser().parseFromString(t,"text/html"),o=n.querySelector(`[${ft}]`);if(o!==null){const i=JSON.parse(o.getAttribute(ft));return so(i),i}const s=n.querySelector("table");if(s!==null){const i=new Map;for(const p of n.querySelectorAll("style")){const C=(p.textContent??"").replace(/<!--|-->/g,"");for(const w of C.matchAll(/\.([\w-]+)\s*\{([^}]*)\}/g))i.set(w[1],Ht(w[2]))}const r=[],a=new Set;let c=0,u=0;if(s.querySelectorAll("tr").forEach((p,C)=>{let w=0;p.querySelectorAll("td, th").forEach(f=>{for(;a.has(`${C},${w}`);)w+=1;const S=Math.max(1,Number(f.getAttribute("colspan")??1)),y=Math.max(1,Number(f.getAttribute("rowspan")??1));for(let O=0;O<y;O+=1)for(let j=0;j<S;j+=1)a.add(`${C+O},${w+j}`);f.querySelectorAll("br").forEach(O=>O.replaceWith(`
2
2
  `));const m=(f.textContent??"").replace(/ /g," "),E=f.getAttribute("data-sheets-numberformat");let z;if(E!==null)try{const O=JSON.parse(E);typeof O[2]=="string"&&(z=O[2])}catch{}const T={...z!==void 0?{"data-sheets-numberformat":z}:{},...Object.assign({},...(f.getAttribute("class")??"").split(/\s+/).filter(Boolean).map(O=>i.get(O)??{})),...Ht(f.getAttribute("style")??"")},A=$o(T),D=Ao(f,m.trim()===""?"":m);(D.v!==void 0||D.f!==void 0||A!==void 0)&&r.push({r:C,c:w,...D,...A?{style:A}:{}}),w+=S,u=Math.max(u,w)}),c=C+1}),c>0&&u>0)return{version:1,rows:c,cols:u,parts:{cells:r}}}}if(e!==void 0&&e!=="")return rn(io(e))}class Do{capacity;#e=new Map;hits=0;misses=0;constructor(e){if(!Number.isInteger(e)||e<1)throw new Error(`An LRU holds at least one entry; ${e} was asked for.`);this.capacity=e}get(e){const n=this.#e.get(e);if(n===void 0){this.misses+=1;return}return this.hits+=1,this.#e.delete(e),this.#e.set(e,n),n}set(e,n){this.#e.delete(e),this.#e.set(e,n),this.#e.size>this.capacity&&this.#e.delete(this.#e.keys().next().value)}get size(){return this.#e.size}clear(){this.#e.clear()}}class Oo{cache;constructor(e=2e4){this.cache=new Do(e)}width(e,n,o){const s=`${n}\0${o}`,i=this.cache.get(s);if(i!==void 0)return i;e.font!==n&&(e.font=n);const r=e.measureText(o).width;return this.cache.set(s,r),r}wrap(e,n,o,s){const i=[];for(const r of o.split(`
3
3
  `)){let a="";for(const c of r.split(/(\s+)/)){const u=a+c;a!==""&&this.width(e,n,u.trimEnd())>s?(i.push(a.trimEnd()),a=c.trimStart()):a=u}i.push(a.trimEnd())}return i}}function Po(t,e){if(!e)return{width:0,height:0};const n=String(t).length;return{width:Math.max(40,12+n*8),height:24}}function We(t,e,n,o){if(n<=0||o<=0||e>=t.offsetOf(o))return[0,-1];const s=t.indexAt(e),i=Math.min(t.indexAt(Math.max(e,e+n-1e-6)),o-1);return[s,i]}function Io(t){if(!(t.zoom>0))throw new Error(`A zoom must be positive; ${t.zoom} was given.`);const e=t.zoom,n=Po(t.rows.count,t.showHeaders),o=n.width*e,s=n.height*e,i=t.rows.offsetOf(t.frozen.rows),r=t.cols.offsetOf(t.frozen.cols),a=t.cols.extent-r,c=t.rows.extent-i,u=Math.max(0,t.width-o),p=Math.max(0,t.height-s),C=Math.min(r*e,u),w=Math.min(i*e,p),f=u-C,S=p-w,y=Math.max(0,a-f/e),k=Math.max(0,c-S/e),m=Math.min(Math.max(0,t.scrollX),y),E=Math.min(Math.max(0,t.scrollY),k),z=We(t.rows,0,w/e,t.frozen.rows),T=We(t.cols,0,C/e,t.frozen.cols),A=We(t.rows,i+E,S/e,t.rows.count),D=We(t.cols,r+m,f/e,t.cols.count),O=(F,Y,N,I,K,B,ne,U,G)=>({name:F,x:Y,y:N,width:I,height:K,firstRow:B[0],lastRow:B[1],firstCol:ne[0],lastCol:ne[1],originX:U,originY:G}),j=[];return w>0&&C>0&&j.push(O("corner",o,s,C,w,z,T,0,0)),w>0&&j.push(O("top",o+C,s,f,w,z,D,r+m,0)),C>0&&j.push(O("left",o,s+w,C,S,A,T,0,i+E)),j.push(O("main",o+C,s+w,f,S,A,D,r+m,i+E)),{zoom:e,headerWidth:o,headerHeight:s,panes:j,scrollWidth:a,scrollHeight:c,maxScrollX:y,maxScrollY:k}}function un(t,e,n){return t.panes.find(o=>e>=o.x&&e<o.x+o.width&&n>=o.y&&n<o.y+o.height)}function Lo(t,e,n,o,s){const i=un(t,o,s);if(i===void 0)return;const r=i.originX+(o-i.x)/t.zoom,a=i.originY+(s-i.y)/t.zoom;if(!(r>=n.extent||a>=e.extent))return{row:e.indexAt(a),col:n.indexAt(r)}}function te(t,e,n,o,s,i){const r=t.x+(o.offsetOf(i)-t.originX)*e,a=t.y+(n.offsetOf(s)-t.originY)*e;return{x:r,y:a,width:o.effectiveSizeOf(i)*e,height:n.effectiveSizeOf(s)*e}}const _o=4;function Fo(t,e,n,o,s){if(t.headerHeight===0)return;const i=s<t.headerHeight&&o>=t.headerWidth,r=o<t.headerWidth&&s>=t.headerHeight;if(!i&&!r)return;const a=i?"cols":"rows",c=i?n:e,u=t.panes.find(k=>i?o>=k.x&&o<k.x+k.width:s>=k.y&&s<k.y+k.height);if(u===void 0)return;const p=i?u.originX+(o-u.x)/t.zoom:u.originY+(s-u.y)/t.zoom;if(p>=c.extent)return;const C=c.indexAt(p),w=c.offsetOf(C),f=c.offsetOf(C+1),S=_o/t.zoom;let y;if(f-p<=S)y=C;else if(p-w<=S&&C>0){let k=C-1;for(;k>0&&c.effectiveSizeOf(k)===0;)k-=1;y=k}return{axis:a,index:C,edge:y,x:o,y:s}}const hn=3,mt=20;function tt(t,e,n){const o=(t.size??e.fontSize)*n;return`${t.italic?"italic ":""}${t.bold?"bold ":""}${o}px ${t.font??e.fontFamily}`}function Ze(t,e,n,o,s){const i=Math.round(s*e)+.5;t.moveTo(Math.round(n*e),i),t.lineTo(Math.round(o*e),i)}function qe(t,e,n,o,s){const i=Math.round(n*e)+.5;t.moveTo(i,Math.round(o*e)),t.lineTo(i,Math.round(s*e))}function Et(t,e){t.save(),t.setTransform(1,0,0,1,0,0),e(),t.restore()}function pe(t,e){t.beginPath(),t.rect(e.x,e.y,e.width,e.height),t.clip()}function Je(t,e,n){const o=[];for(let s=e;s<=n;s+=1)t.effectiveSizeOf(s)>0&&o.push(s);return o}function dt(t){return t===null||t.value===null&&t.formula===void 0}function gt(t,e){const n=Math.max(t.x,e.x),o=Math.max(t.y,e.y),s=Math.min(t.x+t.width,e.x+e.width)-n,i=Math.min(t.y+t.height,e.y+e.height)-o;return s>0&&i>0?{x:n,y:o,width:s,height:i}:void 0}function Nt(t){const{ctx:e,dpr:n,viewport:o}=t,s={cells:0,texts:0};e.save(),e.setTransform(n,0,0,n,0,0),t.clip&&pe(e,t.clip);const i={x:0,y:0,width:Number.MAX_SAFE_INTEGER,height:Number.MAX_SAFE_INTEGER};for(const r of o.panes){const a=gt({x:r.x,y:r.y,width:r.width,height:r.height},t.clip??i);a!==void 0&&(e.save(),pe(e,a),No(t,t.clip?Ho(r,a,o.zoom,t.sheet):r,s),e.restore())}return Ko(t),Xo(t),e.restore(),s}function Ho(t,e,n,o){if(t.lastRow<t.firstRow||t.lastCol<t.firstCol)return t;const s=t.originY+(e.y-t.y)/n,i=t.originY+(e.y+e.height-t.y)/n,r=t.originX+(e.x-t.x)/n,a=t.originX+(e.x+e.width-t.x)/n,c=Math.max(t.firstRow,o.rows.indexAt(s)),u=Math.min(t.lastRow,o.rows.indexAt(i)),p=Math.max(t.firstCol,o.cols.indexAt(r)-mt),C=Math.min(t.lastCol,o.cols.indexAt(a)+mt);return{...t,firstRow:c,lastRow:u,firstCol:p,lastCol:C}}function No(t,e,n){const{ctx:o,dpr:s,viewport:i,sheet:r,styles:a,theme:c,measure:u}=t,p=i.zoom;if(o.fillStyle=c.background,o.fillRect(e.x,e.y,e.width,e.height),e.lastRow<e.firstRow||e.lastCol<e.firstCol)return;const C=Je(r.rows,e.firstRow,e.lastRow),w=Je(r.cols,e.firstCol,e.lastCol),f=(m,E)=>te(e,p,r.rows,r.cols,m,E);for(const m of C)for(const E of w){const z=r.cells.get(m,E);if(z===null)continue;n.cells+=1;const T=a.get(z.style).fill;if(T){const A=f(m,E);o.fillStyle=T,o.fillRect(A.x,A.y,A.width,A.height)}}t.showGridlines&&Et(o,()=>{o.beginPath(),o.strokeStyle=c.gridline,o.lineWidth=1;const m=e.x+e.width,E=e.y+e.height;for(const z of C){const T=f(z,w[0]??e.firstCol);Ze(o,s,e.x,m,T.y+T.height-1/s)}for(const z of w){const T=f(C[0]??e.firstRow,z);qe(o,s,T.x+T.width-1/s,e.y,E)}o.stroke()}),xt(t,"background",e,r,o);const S={top:e.firstRow,left:e.firstCol,bottom:e.lastRow,right:e.lastCol},y=r.merges.filter(m=>co(m,S));for(const m of y){const E=f(m.top,m.left),z=f(m.bottom,m.right),T={x:E.x,y:E.y,width:z.x+z.width-E.x-1/s,height:z.y+z.height-E.y-1/s},A=r.cells.get(m.top,m.left),D=a.get(A?.style??0);o.fillStyle=D.fill??c.background,o.fillRect(T.x,T.y,T.width,T.height);const O=A===null?void 0:Bt(t,D);if(A!==null&&(!dt(A)||O?.paintsEmpty===!0)){const j=O;j!==void 0?Kt(t,j,T,t.value(m.top,m.left),D,n,m.top,m.left):Xt(t,Fe(t.value(m.top,m.left),D.format,t.locale),D,T,T,n)}}const k=(m,E)=>y.some(z=>m>=z.top&&m<=z.bottom&&E>=z.left&&E<=z.right);for(const m of C){const E=w[0];if(E===void 0)break;const z=[],T=e.name==="main"||e.name==="top"?r.frozen.cols:0;for(let j=E-1;j>=Math.max(T,E-mt);j-=1)r.cols.effectiveSizeOf(j)>0&&z.unshift(j);const A=[...z,...w],D=t.bound,O=D!==void 0&&m>=D.top&&m<=D.bottom;for(let j=0;j<A.length;j+=1){const F=A[j];let Y=r.cells.get(m,F);if(Y===null&&O&&F>=D.left&&F<=D.right){const U=t.value(m,F);if(U===null)continue;Y={value:U,style:0},n.cells+=1}if(Y===null||k(m,F))continue;const N=a.get(Y.style),I=Bt(t,N);if(dt(Y)&&I?.paintsEmpty!==!0)continue;const K=f(m,F);if(I!==void 0){j>=z.length&&Kt(t,I,K,t.value(m,F),N,n,m,F);continue}const B=Fe(t.value(m,F),N.format,t.locale);let ne=K;if(B.kind==="text"&&!N.wrap){const U=tt(N,c,p),G=u.width(o,U,B.text)+2*hn*p,be=N.align??B.align;if(G>K.width){let oe=K.x,q=K.x+K.width;const ce=V=>V>=0&&V<r.cols.count&&dt(r.cells.get(m,V))&&!k(m,V);if(be!=="right")for(let V=F+1;ce(V)&&q-oe<G;V+=1)q=f(m,V).x+f(m,V).width;if(be!=="left")for(let V=F-1;ce(V)&&q-oe<G;V-=1)oe=f(m,V).x;ne={x:oe,y:K.y,width:q-oe,height:K.height}}}j<z.length&&ne.x+ne.width<=f(m,E).x||Xt(t,B,N,K,ne,n)}}for(const m of C)for(const E of w){const z=r.cells.get(m,E);if(z===null)continue;const T=a.get(z.style).borders;if(!T)continue;const A=f(m,E);for(const D of["top","right","bottom","left"]){const O=T[D];if(!O)continue;const j=O.style==="thick"?3:O.style==="medium"?2:1;o.save(),o.strokeStyle=O.color,o.lineWidth=j,O.style==="dashed"&&o.setLineDash([4*p,2*p]),O.style==="dotted"&&o.setLineDash([1*p,1*p]),o.beginPath();const F=A.x,Y=A.x+A.width,N=A.y,I=A.y+A.height,K=O.style==="double"?[-1,1]:[0];for(const B of K)D==="top"&&(o.moveTo(F,N+B),o.lineTo(Y,N+B)),D==="bottom"&&(o.moveTo(F,I+B),o.lineTo(Y,I+B)),D==="left"&&(o.moveTo(F+B,N),o.lineTo(F+B,I)),D==="right"&&(o.moveTo(Y+B,N),o.lineTo(Y+B,I));o.stroke(),o.restore()}}xt(t,"cells",e,r,o)}function Bo(t,e,n){return{sheet:n.id,zone:{top:t.firstRow,left:t.firstCol,bottom:t.lastRow,right:t.lastCol},pane:t.name,zoom:e,cellRect:(o,s)=>({...te(t,e,n.rows,n.cols,o,s),zoom:e})}}function xt(t,e,n,o,s){if(t.layers===void 0)return;let i;for(const r of t.layers)if(r.layer===e){i??=Bo(n,t.viewport.zoom,o),s.save(),pe(s,n);try{r.draw(s,i,t.model)}finally{s.restore()}}}function Bt(t,e){return e.type===void 0||t.cellType===void 0?void 0:t.cellType(e.type)}function Kt(t,e,n,o,s,i,r,a){const{ctx:c}=t;c.save(),pe(c,n);const u={x:n.x,y:n.y,width:n.width-1,height:n.height-1,zoom:t.viewport.zoom};e.render(c,u,o,s,t.theme,{sheet:t.sheet.id,row:r,col:a,model:t.model}),c.restore(),i.texts+=1}function Xt(t,e,n,o,s,i){const{ctx:r,viewport:a,theme:c,measure:u}=t,p=a.zoom;if(e.text==="")return;const C=tt(n,c,p),w=hn*p;let f=e.text;if(e.kind==="number"&&u.width(r,C,f)+2*w>o.width){const A=u.width(r,C,"#");f="#".repeat(Math.max(1,Math.floor((o.width-2*w)/Math.max(A,1))))}const S=n.align??e.align;if(s!==o&&s.width>o.width){const A=t.dpr;r.fillStyle=n.fill??c.background,r.fillRect(s.x,s.y,s.width-1/A,s.height-1/A)}r.save(),pe(r,s),r.font=C,r.fillStyle=e.kind==="error"?c.errorText:e.color??n.color??c.text,r.textBaseline="alphabetic";const y=(n.size??c.fontSize)*p,k=n.wrap?u.wrap(r,C,f,o.width-2*w):[f],m=y*1.25,E=n.valign??"bottom",z=k.length*m,T=E==="top"?o.y+w:E==="middle"?o.y+(o.height-z)/2:o.y+o.height-w-z;k.forEach((A,D)=>{const O=u.width(r,C,A),j=T+(D+1)*m-(m-y)/2-y*.12,F=n.wrap?o:s,Y=S==="left"?F.x+w:S==="right"?F.x+F.width-w-O:F.x+(F.width-O)/2;r.fillText(A,Y,j),(n.underline||n.strike)&&r.fillRect(Y,n.underline?j+1.5*p:j-y*.32,O,Math.max(1,p))}),r.restore(),i.texts+=1}function Ko(t){const{ctx:e,dpr:n,viewport:o,sheet:s,theme:i,measure:r}=t;if(o.headerHeight===0)return;const a=o.zoom,c=`${i.headerFontSize*a}px ${i.fontFamily}`,u=o.headerWidth,p=o.headerHeight;e.fillStyle=i.headerBackground,e.fillRect(0,0,e.canvas.width/n,p),e.fillRect(0,0,u,e.canvas.height/n),e.font=c,e.fillStyle=i.headerText,e.textBaseline="middle";const C=[];for(const w of o.panes){if(w.name==="main"||w.name==="top"){e.save(),pe(e,{x:w.x,y:0,width:w.width,height:p});for(const f of Je(s.cols,w.firstCol,w.lastCol)){const S=te(w,a,s.rows,s.cols,w.firstRow,f),y=He(f),k=r.width(e,c,y);e.fillStyle=i.headerText,e.fillText(y,S.x+(S.width-k)/2,p/2),C.push(()=>qe(e,n,S.x+S.width-1/n,0,p))}e.restore()}if(w.name==="main"||w.name==="left"){e.save(),pe(e,{x:0,y:w.y,width:u,height:w.height});for(const f of Je(s.rows,w.firstRow,w.lastRow)){const S=te(w,a,s.rows,s.cols,f,w.firstCol),y=String(f+1),k=r.width(e,c,y);e.fillStyle=i.headerText,e.fillText(y,(u-k)/2,S.y+S.height/2),C.push(()=>Ze(e,n,0,u,S.y+S.height-1/n))}e.restore()}}Et(e,()=>{e.beginPath(),e.strokeStyle=i.headerBorder,e.lineWidth=1;for(const w of C)w();Ze(e,n,0,e.canvas.width/n,p-1/n),qe(e,n,u-1/n,0,e.canvas.height/n),e.stroke()})}function Xo(t){const{ctx:e,dpr:n,viewport:o,theme:s}=t;if(o.panes.find(a=>a.name==="top"||a.name==="left"||a.name==="corner")===void 0)return;const r=o.panes.find(a=>a.name==="main");Et(e,()=>{e.beginPath(),e.strokeStyle=s.frozenLine,e.lineWidth=Math.max(1,Math.round(2*n)),o.panes.some(a=>a.name==="top")&&Ze(e,n,0,r.x+r.width,r.y-1/n),o.panes.some(a=>a.name==="left")&&qe(e,n,r.x-1/n,0,r.y+r.height),e.stroke()})}const Yo=.4,Ue=7;function Wo(t){const{ctx:e,dpr:n,viewport:o,sheet:s,theme:i,selection:r}=t,a=o.zoom;e.save(),e.setTransform(n,0,0,n,0,0),e.clearRect(0,0,e.canvas.width/n,e.canvas.height/n);const c=(p,C)=>{const w=te(p,a,s.rows,s.cols,C.top,C.left),f=Math.min(C.bottom,s.rows.count-1),S=Math.min(C.right,s.cols.count-1),y=p.x+(s.cols.offsetOf(S+1)-p.originX)*a,k=p.y+(s.rows.offsetOf(f+1)-p.originY)*a;return{x:w.x,y:w.y,width:y-w.x,height:k-w.y}};if(o.headerHeight>0){e.fillStyle=i.headerSelectedBackground,e.globalAlpha=i.forcedColors?1:.6;for(const p of o.panes)for(const C of r.zones){const w=c(p,C);if(p.name==="main"||p.name==="top"){const f=gt({x:w.x,y:0,width:w.width,height:o.headerHeight},{x:p.x,y:0,width:p.width,height:o.headerHeight});f&&e.fillRect(f.x,f.y,f.width,f.height)}if(p.name==="main"||p.name==="left"){const f=gt({x:0,y:w.y,width:o.headerWidth,height:w.height},{x:0,y:p.y,width:o.headerWidth,height:p.height});f&&e.fillRect(f.x,f.y,f.width,f.height)}}e.globalAlpha=1}const u=r.zones[r.zones.length-1];for(const p of o.panes){e.save(),pe(e,p);for(const S of r.zones){const y=c(p,S);!(S.top===S.bottom&&S.left===S.right&&r.zones.length===1)&&!i.forcedColors&&(e.fillStyle=i.selectionFill,e.globalAlpha=Yo,e.fillRect(y.x,y.y,y.width,y.height),e.globalAlpha=1),(S===u||i.forcedColors)&&(e.strokeStyle=i.selectionBorder,e.lineWidth=i.forcedColors?2:1,e.strokeRect(y.x+.5,y.y+.5,y.width-1,y.height-1))}const C=s.mergeAt(r.active.row,r.active.col),w=c(p,C??{top:r.active.row,left:r.active.col,bottom:r.active.row,right:r.active.col});if(e.strokeStyle=i.activeCellBorder,e.lineWidth=2,e.strokeRect(w.x+1,w.y+1,w.width-2,w.height-2),t.mark&&t.mark.sheet===s.id){const S=c(p,t.mark.zone);e.save(),e.strokeStyle=i.copyMarch,e.lineWidth=2,e.setLineDash([4,3]),e.strokeRect(S.x+1,S.y+1,S.width-2,S.height-2),e.restore()}for(const S of t.remote??[]){if(S.sheet!==s.id)continue;const y=i.forcedColors?i.remoteUserColors[0]:S.user.color;e.strokeStyle=y,e.lineWidth=2;for(const A of S.zones){const D=c(p,A);e.strokeRect(D.x+1,D.y+1,D.width-2,D.height-2)}const k=c(p,{top:S.active.row,left:S.active.col,bottom:S.active.row,right:S.active.col});S.editing!==void 0&&(e.setLineDash([3,2]),e.strokeRect(k.x+1,k.y+1,k.width-2,k.height-2),e.setLineDash([])),e.font=`${Math.max(9,i.headerFontSize-2)*a}px ${i.fontFamily}`;const m=S.editing!==void 0?`${S.user.name} (editing)`:S.user.name,E=e.measureText(m).width+8,z=14*a,T=k.y-z>=p.y?k.y-z:k.y+k.height;e.fillStyle=y,e.fillRect(k.x,T,E,z),e.fillStyle=i.forcedColors?"Canvas":"#ffffff",e.textBaseline="middle",e.fillText(m,k.x+4,T+z/2)}const f=c(p,u);e.fillStyle=i.fillHandle,e.fillRect(f.x+f.width-Ue/2-.5,f.y+f.height-Ue/2-.5,Ue,Ue),e.restore(),xt(t,"overlay",p,s,e)}e.restore()}class Uo{counters={frames:0,gridFull:0,gridPartial:0,blits:0,overlay:0,lastFrameMs:0,cells:0,texts:0,blitMs:0,gridMs:0,overlayMs:0};measure=new Oo;#e;#t;#y;#S;#g;#x;#w;#b=sn;#s=0;#i=0;#l=1;#c=1;#a=0;#d=0;#n;#u=null;#h=!0;#o=!0;#p=[];#f={dx:0,dy:0};#v=!1;#C=!1;#E;constructor(e){this.#e=e.model,this.#t=e.grid,this.#y=e.overlay,this.#g=e.theme,this.#x=e.showGridlines??!0,this.#w=e.showHeaders??!0,this.#S=e.schedule??(i=>requestAnimationFrame(i)),this.#n=this.#e.selection.sheet;const n=this.#e.subscribe(i=>this.#z(i)),o=this.#e.subscribeSelection(i=>this.#R(i)),s=this.#e.subscribePresence(()=>{this.#o=!0,this.#m()});this.#E=()=>{n(),o(),s()}}dispose(){this.#C=!0,this.#E()}get viewport(){return this.#u===null&&(this.#u=this.#T()),this.#u}get sheet(){return this.#n}get dpr(){return this.#l}get zoom(){return this.#c}get scroll(){return{x:this.#a,y:this.#d}}setSize(e,n,o){if(!(e===this.#s&&n===this.#i&&o===this.#l)){this.#s=e,this.#i=n,this.#l=o;for(const s of[this.#t,this.#y])s.width=Math.max(1,Math.round(e*o)),s.height=Math.max(1,Math.round(n*o));this.#r()}}setZoom(e){if(!(e>=.5&&e<=4))throw new Error(`Zoom goes from 0.5 to 4; ${e} was asked for.`);e!==this.#c&&(this.#c=e,this.#r())}setTheme(e){e!==this.#g&&(this.#g=e,this.#r())}setOptions(e){const n=e.showGridlines??this.#x,o=e.showHeaders??this.#w;n===this.#x&&o===this.#w||(this.#x=n,this.#w=o,this.#r())}setLocale(e){e!==this.#b&&(this.#b=e,this.#r())}setSheet(e){e!==this.#n&&(this.#e.sheet(e),this.#n=e,this.#a=0,this.#d=0,this.#r())}setScroll(e,n){const o=this.viewport,s=Math.min(Math.max(0,e),o.maxScrollX),i=Math.min(Math.max(0,n),o.maxScrollY);if(s===this.#a&&i===this.#d)return;const r=(s-this.#a)*this.#c,a=(i-this.#d)*this.#c;this.#a=s,this.#d=i,this.#u=null,this.#h||(this.#f={dx:this.#f.dx+r,dy:this.#f.dy+a}),this.#o=!0,this.#m()}repaint(){this.#r()}frame(){if(this.#v=!1,this.#C||this.#s===0||this.#i===0)return;const e=performance.now(),n=this.viewport,o=this.#e.sheet(this.#n),s=this.#t.getContext("2d",{alpha:!1,desynchronized:!0});if(s===null)throw new Error("The grid canvas has no 2D context.");const i={ctx:s,dpr:this.#l,viewport:n,sheet:o,styles:this.#e.workbook.styles,theme:this.#g,measure:this.measure,showGridlines:this.#x,locale:this.#b,value:(f,S)=>this.#e.value(o.id,f,S),cellType:f=>this.#e.cellTypeOf(f)?.value,bound:this.#e.dataSource(o.id)?.zone,layers:this.#e.renderLayers(),model:this.#e};let r={cells:0,texts:0};const a=n.panes.find(f=>f.name==="main"),{dx:c,dy:u}=this.#f,p=!this.#h&&(c!==0||u!==0)&&Math.abs(c)<a.width/2&&Math.abs(u)<a.height/2;this.counters.blitMs=0;const C=performance.now();if(this.#h||!p&&(c!==0||u!==0))r=Nt(i),this.counters.gridFull+=1;else{const f=[...this.#p];if(p){const S=performance.now();this.#M(s,a,c,u),this.counters.blitMs=performance.now()-S,f.push(...this.#k(a,c,u))}for(const S of f){const y=Nt({...i,clip:S});r.cells+=y.cells,r.texts+=y.texts}f.length>0&&(this.counters.gridPartial+=1)}this.counters.gridMs=performance.now()-C-this.counters.blitMs;const w=performance.now();if(this.#o||this.#h||c!==0||u!==0||this.#p.length>0){const f=this.#y.getContext("2d",{desynchronized:!0});if(f===null)throw new Error("The overlay canvas has no 2D context.");Wo({ctx:f,dpr:this.#l,viewport:n,sheet:o,theme:this.#g,selection:this.#e.selection,mark:this.#e.clipboardMark,remote:this.#e.remotePresence,layers:i.layers,model:this.#e}),this.counters.overlay+=1}this.counters.overlayMs=performance.now()-w,this.#h=!1,this.#o=!1,this.#p=[],this.#f={dx:0,dy:0},this.counters.frames+=1,this.counters.frames===1&&typeof performance.mark=="function"&&performance.mark("cells:first-frame"),this.counters.cells=r.cells,this.counters.texts=r.texts,this.counters.lastFrameMs=performance.now()-e}#M(e,n,o,s){const i=this.#l,r=this.#s,a=this.#i;if(e.save(),e.setTransform(1,0,0,1,0,0),o!==0){const c=n.x;e.drawImage(this.#t,(c+Math.max(o,0))*i,0,(r-c-Math.abs(o))*i,a*i,(c+Math.max(-o,0))*i,0,(r-c-Math.abs(o))*i,a*i)}if(s!==0){const c=n.y;e.drawImage(this.#t,0,(c+Math.max(s,0))*i,r*i,(a-c-Math.abs(s))*i,0,(c+Math.max(-s,0))*i,r*i,(a-c-Math.abs(s))*i)}e.restore(),this.counters.blits+=1}#k(e,n,o){const s=[],i=this.#s,r=this.#i;return n>0&&s.push({x:i-n-1,y:0,width:n+1,height:r}),n<0&&s.push({x:e.x,y:0,width:-n+1,height:r}),o>0&&s.push({x:0,y:r-o-1,width:i,height:o+1}),o<0&&s.push({x:0,y:e.y,width:i,height:-o+1}),s}#z(e){this.#u=null,this.#e.workbook.hasSheet(this.#n)||(this.#n=this.#e.selection.sheet);let n=e.origin==="load"||e.origin==="plugins"||e.origin==="async"||e.origin==="source"||e.origin==="code"?"all":Go(e.patches,this.#n);if(e.patches.length>0&&this.#e.workbook.formulas.size>0&&(n="all"),n==="all"){this.#r();return}if(n==="none"){this.#o=!0,this.#m();return}const o=this.viewport,s=this.#e.sheet(this.#n);for(const i of o.panes){const r=Math.max(n.top,i.firstRow),a=Math.min(n.bottom,i.lastRow);if(r>a)continue;const c=i.y+(s.rows.offsetOf(r)-i.originY)*o.zoom,u=i.y+(s.rows.offsetOf(a+1)-i.originY)*o.zoom;this.#p.push({x:0,y:Math.max(i.y,c-1),width:this.#s,height:Math.min(i.y+i.height,u+1)-Math.max(i.y,c-1)})}this.#o=!0,this.#m()}#R(e){if(e.sheet!==this.#n){this.setSheet(e.sheet);return}this.#o=!0,this.#m()}#r(){this.#u=null,this.#h=!0,this.#o=!0,this.#p=[],this.#f={dx:0,dy:0},this.#m()}#m(){this.#v||this.#C||(this.#v=!0,this.#S(()=>this.frame()))}#T(){const e=this.#e.sheet(this.#n);return Io({rows:e.rows,cols:e.cols,frozen:e.frozen,scrollX:this.#a,scrollY:this.#d,width:this.#s,height:this.#i,zoom:this.#c,showHeaders:this.#w})}}function Go(t,e){let n=1/0,o=-1/0;for(const s of t){const i=s.sheet;if(s.op==="cells"){if(i!==e)continue;const r=s.zone;n=Math.min(n,r.top),o=Math.max(o,r.bottom)}else{if(typeof i=="string"&&i!==e)continue;return"all"}}return n===1/0?"none":o-n>200?"all":{top:n,bottom:o}}const Vo=8e6;function Qe(t,e){return Math.min(t+e,Vo)}class Yt{#e=0;#t=0;map(e,n){const o=Qe(n.maxContent,n.viewport)-n.viewport;if(n.maxContent<=o||o<=0)return this.#e=e,this.#t=Math.min(Math.max(0,e),n.maxContent),this.#t;const s=e-this.#e;let i;return e<=0?i=0:e>=o?i=n.maxContent:Math.abs(s)<n.viewport?i=this.#t+s:i=e/o*n.maxContent,this.#e=e,this.#t=Math.min(Math.max(0,i),n.maxContent),this.#t}domFor(e,n){const o=Qe(n.maxContent,n.viewport)-n.viewport,s=n.maxContent<=o||o<=0?e:e/n.maxContent*o;return this.#e=s,this.#t=e,s}get content(){return this.#t}}const Zo='-apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif',qo=["#0969da","#cf222e","#1a7f37","#8250df","#bf8700","#bc4c00","#1b7c83"],nt={background:"#ffffff",text:"#1f2328",textMuted:"#59636e",gridline:"#d1d9e0",headerBackground:"#f6f8fa",headerText:"#59636e",headerBorder:"#d1d9e0",headerSelectedBackground:"#ddf4ff",selectionFill:"#b6e3ff",selectionBorder:"#0969da",activeCellBorder:"#0969da",fillHandle:"#0969da",copyMarch:"#0969da",frozenLine:"#818b98",errorText:"#d1242f",linkText:"#0969da",referenceColors:qo,remoteUserColors:["#bf3989","#1a7f37","#bc4c00","#8250df"],fontFamily:Zo,fontSize:13,headerFontSize:12,chartColors:["#0969da","#1a7f37","#bc4c00","#8250df","#bf8700","#cf222e","#bf3989","#1b7c83"],chartAxis:"#59636e",chartGridline:"#d1d9e0",chartText:"#1f2328",chartBackground:"#ffffff"},Jo={...nt,background:"#0d1117",text:"#f0f6fc",textMuted:"#9198a1",gridline:"#3d444d",headerBackground:"#151b23",headerText:"#9198a1",headerBorder:"#3d444d",headerSelectedBackground:"#0c2d6b",selectionFill:"#1f6feb",selectionBorder:"#4493f8",activeCellBorder:"#4493f8",fillHandle:"#4493f8",copyMarch:"#4493f8",frozenLine:"#656c76",errorText:"#f85149",linkText:"#4493f8",referenceColors:["#4493f8","#f85149","#3fb950","#ab7df8","#d29922","#db6d28","#39c5cf"],remoteUserColors:["#db61a2","#3fb950","#db6d28","#ab7df8"],chartColors:["#4493f8","#3fb950","#db6d28","#ab7df8","#d29922","#f85149","#db61a2","#39c5cf"],chartAxis:"#9198a1",chartGridline:"#3d444d",chartText:"#f0f6fc",chartBackground:"#0d1117"},fn={...nt,background:"Canvas",text:"CanvasText",textMuted:"GrayText",gridline:"GrayText",headerBackground:"Canvas",headerText:"CanvasText",headerBorder:"CanvasText",headerSelectedBackground:"Highlight",selectionFill:"transparent",selectionBorder:"Highlight",activeCellBorder:"Highlight",fillHandle:"Highlight",copyMarch:"Highlight",frozenLine:"CanvasText",errorText:"CanvasText",linkText:"LinkText",referenceColors:["Highlight"],remoteUserColors:["Highlight"],chartColors:["CanvasText","Highlight","LinkText","GrayText"],chartAxis:"CanvasText",chartGridline:"GrayText",chartText:"CanvasText",chartBackground:"Canvas",forcedColors:!0},Qo=Object.keys(nt);function mn(t){if(typeof t!="object"||t===null)throw new Error("A CellsTheme is an object.");const e=t;for(const n of Qo){const o=e[n];if(n==="referenceColors"||n==="remoteUserColors"||n==="chartColors"){if(!Array.isArray(o)||o.length===0||!o.every(s=>typeof s=="string"))throw new Error(`CellsTheme.${n}: a non-empty list of colours.`)}else if(n==="fontSize"||n==="headerFontSize"){if(!(typeof o=="number"&&o>0))throw new Error(`CellsTheme.${n}: a positive size in px.`)}else if(typeof o!="string"||o==="")throw new Error(`CellsTheme.${n}: a colour (or, for fontFamily, a font list).`)}}const er=1e3;function tr({resolved:t,label:e}){if(t.kind!=="option")return null;const{data:n}=t,o=Math.max(0,...n.series.map(r=>r.values.length)),s=Math.min(o,er),i=n.series.map(r=>r.source).filter(r=>r!==void 0);return v.jsxs("div",{style:gn,"data-cells-chart-table":"",children:[v.jsxs("table",{children:[v.jsx("caption",{children:`Data of ${e}`}),v.jsx("thead",{children:v.jsxs("tr",{children:[v.jsx("th",{scope:"col",children:n.categories.length>0?"Category":"#"}),n.series.map((r,a)=>v.jsx("th",{scope:"col",children:r.name},a))]})}),v.jsx("tbody",{children:Array.from({length:s},(r,a)=>v.jsxs("tr",{children:[v.jsx("th",{scope:"row",children:String(n.categories[a]??a+1)}),n.series.map((c,u)=>v.jsx("td",{children:c.values[a]===null||c.values[a]===void 0?"":String(c.values[a])},u))]},a))})]}),o>s&&v.jsx("p",{children:`${o-s} more rows are not listed; the data is in ${i.join(", ")||"the sheet"}.`})]})}const gn={position:"absolute",width:1,height:1,margin:-1,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",whiteSpace:"nowrap",border:0};function nr(t,e){return t.title!==void 0&&t.title!==""?t.title:e.kind==="option"?e.description.split(". ")[0]:e.text}function or(t){const{spec:e,resolved:n,renderer:o,width:s,height:i,theme:r}=t,a=nr(e,n),c=n.kind==="option"?n.description:n.text,u=t.mounted!==!1&&n.kind==="option"&&o!==void 0,p=x.useId(),C=x.useRef(null);return x.useEffect(()=>{t.selected&&t.focusWhenSelected&&C.current?.focus({preventScroll:!0})},[t.selected,t.focusWhenSelected]),v.jsxs("div",{ref:C,role:"figure",tabIndex:-1,"aria-label":a,"aria-describedby":p,"aria-selected":t.selected||void 0,"data-cells-chart":e.id,"data-cells-chart-type":e.type,className:t.className,style:{boxSizing:"border-box",width:s,height:i,overflow:"hidden",background:r.chartBackground,border:`1px solid ${t.selected?r.selectionBorder:r.gridline}`,color:r.chartText,fontFamily:r.fontFamily,fontSize:r.fontSize,...t.style},children:[u?x.createElement(o.value.component,{option:n.option,modules:n.type.value.modules,width:s-2,height:i-2,theme:r}):n.kind==="placeholder"?v.jsx("div",{"data-cells-chart-placeholder":"",style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%",textAlign:"center",padding:8,boxSizing:"border-box",color:r.textMuted},children:n.text}):null,v.jsx("div",{id:p,style:gn,children:c}),v.jsx(tr,{resolved:n,label:a})]})}function rr(t,e,n){const o=e.anchor;let s,i;o.kind==="absolute"?(s=t.frozen.rows>0&&o.y<t.rows.offsetOf(t.frozen.rows),i=t.frozen.cols>0&&o.x<t.cols.offsetOf(t.frozen.cols)):(s=o.from.row<t.frozen.rows,i=o.from.col<t.frozen.cols);const r=s&&i?"corner":s?"top":i?"left":"main";return n.find(a=>a.name===r)??n.find(a=>a.name==="main")}function sr(t,e,n,o){const s=ln(t,e),i=(s.x-n.originX)*o,r=(s.y-n.originY)*o,a=Math.max(1,Math.round(s.width*o)),c=Math.max(1,Math.round(s.height*o)),u=i+a>=-n.width&&i<=2*n.width&&r+c>=-n.height&&r<=2*n.height;return{x:Math.round(i),y:Math.round(r),width:a,height:c,near:u}}const ir=["nw","n","ne","w","e","sw","s","se"];function lr(t,e,n,o,s,i){const r=n.rect,a=n.handle;let c=r.x,u=r.y,p=r.x+r.width,C=r.y+r.height;a==="move"?(c=Math.max(0,c+o),u=Math.max(0,u+s),p=c+r.width,C=u+r.height):(a.includes("w")&&(c=Math.min(c+o,p-16)),a.includes("e")&&(p=Math.max(p+o,c+16)),a.includes("n")&&(u=Math.min(u+s,C-16)),a.includes("s")&&(C=Math.max(C+s,u+16))),c=Math.max(0,c),u=Math.max(0,u);const w=e.anchor;if(w.kind==="absolute"){const k={};return(c!==r.x||u!==r.y)&&(k.move={x:Math.round(c),y:Math.round(u)}),(p-c!==r.width||C-u!==r.height)&&(k.resize={width:Math.round(p-c),height:Math.round(C-u)}),k}const f=Math.min(t.cols.indexAt(c),t.cols.count-1),S=Math.min(t.rows.indexAt(u),t.rows.count-1),y={};if((f!==w.from.col||S!==w.from.row||a==="move")&&(y.move={row:S,col:f}),w.kind==="cells"){const k=Math.max(f,Math.min(t.cols.indexAt(p),t.cols.count-1)),m=Math.max(S,Math.min(t.rows.indexAt(C),t.rows.count-1));a!=="move"&&(y.resize={row:m,col:k})}else a!=="move"&&(y.resize={width:Math.round(p-c),height:Math.round(C-u)});return y}function cr(t){const{model:e,viewport:n,theme:o}=t,s=x.useRef(null),i=(w,f)=>{const S=s.current;if(s.current=null,S===null)return;const y=f.charts.get(S.id);if(y===void 0)return;const k=(w.clientX-S.startX)/n.zoom,m=(w.clientY-S.startY)/n.zoom;if(Math.abs(k)<2&&Math.abs(m)<2)return;const E=lr(f,y,S,k,m,w.altKey),z=()=>{E.move!==void 0&&e.dispatch({type:"MOVE_CHART",sheet:f.id,id:S.id,to:E.move}),E.resize!==void 0&&e.dispatch({type:"RESIZE_CHART",sheet:f.id,id:S.id,to:E.resize})};E.move!==void 0&&E.resize!==void 0?e.transact(S.handle==="move"?"Move chart":"Resize chart",z):z()},r=x.useCallback(w=>e.subscribe(w),[e]);x.useSyncExternalStore(r,()=>e.revision,()=>e.revision);const a=x.useCallback(w=>e.reactor.subscribe(w),[e]);if(x.useSyncExternalStore(a,()=>e.reactor.getRevision(),()=>e.reactor.getRevision()),!e.workbook.hasSheet(t.sheet))return null;const c=e.sheet(t.sheet);if(c.charts.size===0)return null;const u=an(e.reactor),p=u===void 0?"not-loaded":"loaded",C=new Map;for(const w of c.charts.values()){const f=rr(c,w,n.panes);let S=C.get(f);S===void 0&&C.set(f,S=[]),S.push(w)}return v.jsx(v.Fragment,{children:[...C].map(([w,f])=>v.jsx("div",{"data-cells-charts-pane":w.name,style:{position:"absolute",left:w.x,top:w.y,width:w.width,height:w.height,overflow:"hidden",pointerEvents:"none",zIndex:1},children:f.map(S=>{const y=sr(c,S,w,n.zoom),k=y.near?Co(e,c.id,S.id,o,p):null;return v.jsxs("div",{"data-cells-chart-holder":"",style:{position:"absolute",left:y.x,top:y.y,width:y.width,height:y.height,pointerEvents:"auto"},onPointerDown:m=>{t.onPointerDownChart?.(S.id,m);const E=m.target.getAttribute("data-cells-chart-handle");if(m.button!==0)return;const z=ln(c,S);s.current={id:S.id,handle:E??"move",startX:m.clientX,startY:m.clientY,pointerId:m.pointerId,rect:z},m.currentTarget.setPointerCapture?.(m.pointerId)},onPointerUp:m=>i(m,c),onPointerCancel:()=>{s.current=null},onKeyDown:m=>{t.onChartKeyDown?.(m)&&m.stopPropagation()},children:[t.selectedChart===S.id&&ir.map(m=>v.jsx("div",{"data-cells-chart-handle":m,"aria-hidden":"true",style:{position:"absolute",width:8,height:8,background:o.selectionBorder,border:`1px solid ${o.background}`,boxSizing:"border-box",zIndex:2,cursor:`${m}-resize`,left:m.includes("w")?-4:m.includes("e")?y.width-4:y.width/2-4,top:m.includes("n")?-4:m.includes("s")?y.height-4:y.height/2-4}},m)),v.jsx(or,{spec:S,resolved:k??{kind:"placeholder",text:`A ${S.type} chart, off screen`},renderer:u,width:y.width,height:y.height,theme:o,mounted:y.near,selected:t.selectedChart===S.id,focusWhenSelected:!0})]},S.id)})},w.name))})}const ar=20,dr=2e5;function et(t){if(t.outputs.length>0)return t.outputs;const e=Wt.get(t);if(e!==void 0)return e;const n=t.result,o=n==null||typeof n=="object"?ur:[{output_type:"execute_result",data:{"text/plain":String(n)},metadata:{},execution_count:t.executionCount??null}];return Wt.set(t,o),o}const Wt=new WeakMap,ur=[];function xn(t){const e=[];for(const n of t)if(n.output_type==="stream")e.push(String(n.text??""));else if(n.output_type==="error")e.push(`${String(n.ename??"Error")}: ${String(n.evalue??"")}`);else{const o=(n.data??{})["text/plain"];o!==void 0&&e.push(Array.isArray(o)?o.join(""):String(o))}return e.join(`
4
4
  `).trim()}const hr=["text/plain","image/png","image/jpeg","image/gif","text/latex"];function wn(t){return t.map(e=>{if(e.output_type==="stream"||e.output_type==="error")return e;const n=e.data??{},o=Object.fromEntries(Object.entries(n).filter(([i])=>hr.includes(i)));if(Object.keys(o).length>0)return{...e,data:o};const s=Object.keys(n).join(", ")||"nothing";return{...e,data:{"text/plain":`[${s}: shown once the cell runs here]`}}})}function Ut(t,e,n,o){const s=e<t.frozen.rows,i=n<t.frozen.cols,r=s&&i?"corner":s?"top":i?"left":"main";return o.find(a=>a.name===r)??o.find(a=>a.name==="main")}function Gt(t,e,n,o,s,i){const r=t.cols.offsetOf(n)+t.cols.effectiveSizeOf(n)+(o.dx??0),a=t.rows.offsetOf(e)+(o.dy??0),c=Math.round((r-s.originX)*i),u=Math.round((a-s.originY)*i),p=Math.max(1,Math.round(o.width*i)),C=Math.max(1,Math.round(o.height*i)),w=c+p>=-s.width&&c<=2*s.width&&u+C>=-s.height&&u<=2*s.height,f=Math.hypot(Math.max(0,-c,c+p-s.width),Math.max(0,-u,u+C-s.height));return{x:c,y:u,width:p,height:C,near:w,distance:f}}const fr='button, a, input, select, textarea, [role="button"], [role="menuitem"]';function Mt(t={}){const[e,n]=x.useState({dx:0,dy:0}),[o,s]=x.useState(!1),i=x.useRef(t);i.current=t;const r=x.useRef(null);return{offset:e,setOffset:n,dragging:o,handlers:{onPointerDown:c=>{if(c.button!==0)return;const u=c.target.closest?.(fr);u!=null&&u!==c.currentTarget||(c.preventDefault(),c.stopPropagation(),r.current={id:c.pointerId,x:c.clientX,y:c.clientY,base:e},c.currentTarget.setPointerCapture?.(c.pointerId),s(!0),i.current.onStart?.())},onPointerMove:c=>{const u=r.current;u===null||c.pointerId!==u.id||(c.stopPropagation(),n({dx:u.base.dx+c.clientX-u.x,dy:u.base.dy+c.clientY-u.y}))},onPointerUp:c=>{const u=r.current;if(u===null||c.pointerId!==u.id)return;c.stopPropagation(),r.current=null,s(!1);const p={dx:u.base.dx+c.clientX-u.x,dy:u.base.dy+c.clientY-u.y};n(p),i.current.onDrop?.(c.clientX-u.x,c.clientY-u.y,p)},onPointerCancel:()=>{const c=r.current;r.current=null,s(!1),c!==null&&n(c.base)}}}}const kt={cursor:"move",userSelect:"none",touchAction:"none"},pn=t=>JSON.stringify(t).length,Ve=18;function mr(t){const{code:e,place:n,theme:o}=t,s=Re(t.row,t.col),i=pn(e.outputs)>dr,r=x.useSyncExternalStore(x.useCallback(y=>t.model.subscribe(y),[t.model]),()=>t.model.codeState(t.sheet,t.row,t.col)!=="running",()=>!0),{offset:a,setOffset:c,dragging:u,handlers:p}=Mt({onDrop:(y,k)=>{c({dx:0,dy:0}),(Math.abs(y)>=2||Math.abs(k)>=2)&&t.onMove?.(y,k)}}),C=t.trusted?e.outputs:wn(e.outputs),w=xn(C),f=t.trusted?"":" Untrusted: from a file or another person; HTML, scripts and widgets are shown once the cell runs here.",S=Math.max(1,n.height-Ve);return v.jsxs("div",{"data-cells-code-output":s,"data-cells-dragging":u?"":void 0,role:"region","aria-label":`Output of ${s}`,"aria-description":`${w.slice(0,500)}${f}`.trim()||void 0,"data-cells-code-untrusted":t.trusted?void 0:"",tabIndex:-1,style:{position:"absolute",left:n.x+a.dx,top:n.y+a.dy,width:n.width,height:n.height,display:"flex",flexDirection:"column",overflow:"hidden",boxSizing:"border-box",border:`1px solid ${o.gridline}`,background:o.background,color:o.text,pointerEvents:"auto",font:`${o.fontSize}px ${o.fontFamily}`},onKeyDown:y=>{y.key==="Escape"&&(y.stopPropagation(),t.onEscape?.())},children:[v.jsxs("div",{"data-cells-code-output-handle":"",title:"Drag to move",...p,style:{...kt,flex:`0 0 ${Ve}px`,display:"flex",alignItems:"center",justifyContent:"space-between",gap:4,padding:"0 2px 0 6px",fontSize:11,lineHeight:`${Ve-1}px`,color:o.headerText,background:o.headerBackground,borderBottom:`1px solid ${o.gridline}`,overflow:"hidden",whiteSpace:"nowrap"},children:[v.jsxs("span",{children:["Output of ",s]}),v.jsx("button",{type:"button","data-cells-code-unpin":"","aria-label":`Unpin the output of ${s}`,title:"Unpin: show it on hover",onPointerDown:y=>y.stopPropagation(),onClick:()=>t.onUnpin?.(),style:{border:0,background:"transparent",color:"inherit",cursor:"pointer",padding:"0 4px",font:"inherit",lineHeight:"inherit"},children:"×"})]}),v.jsx("div",{style:{flex:"1 1 auto",overflow:"auto",minHeight:0},children:t.mounted&&r&&v.jsx(yn,{heavy:i,renderer:t.renderer,outputs:C,trusted:t.trusted,cell:s,width:n.width,height:S,text:w})})]})}function yn(t){const[e,n]=x.useState(!1);return t.heavy&&!e?v.jsxs("button",{type:"button",onClick:()=>n(!0),style:{margin:8},children:["Show output (",Math.round(pn(t.outputs)/1024)," kB)"]}):t.renderer===void 0?v.jsx("pre",{style:{margin:8,whiteSpace:"pre-wrap",font:"inherit"},"data-cells-code-text":"",children:t.text}):v.jsx(x.Suspense,{fallback:v.jsx("span",{style:{margin:8},children:"Loading the output…"}),children:x.createElement(t.renderer,{outputs:t.outputs,trusted:t.trusted,cell:t.cell,width:t.width,height:t.height})})}function gr(t){const{model:e,viewport:n,theme:o}=t;if(x.useSyncExternalStore(x.useCallback(E=>e.subscribe(E),[e]),()=>e.revision,()=>e.revision),x.useSyncExternalStore(x.useCallback(E=>e.reactor.subscribe(E),[e]),()=>e.reactor.getRevision(),()=>e.reactor.getRevision()),!e.workbook.hasSheet(t.sheet))return null;const s=e.sheet(t.sheet);if(s.code.size===0)return null;const i=ao(e.reactor)?.value,r=i?.output,a=i?.editor,c=[];for(const E of uo(s)){const z=_e(E.code);if(z===void 0)continue;const T=Ut(s,E.row,E.col,n.panes);c.push({...E,pane:T,place:Gt(s,E.row,E.col,z,T,n.zoom)})}const u=new Set(c.filter(E=>E.place.near).sort((E,z)=>E.place.distance-z.place.distance).slice(0,ar)),p=new Map;for(const E of c){let z=p.get(E.pane);z===void 0&&p.set(E.pane,z=[]),z.push(E)}const C=(E,z,T)=>{const A=e.code(s.id,E,z);A!==void 0&&e.dispatch({type:"SET_CODE",sheet:s.id,row:E,col:z,code:{...A,frame:T}})},w=n.zoom,f=(E,z,T,A)=>{const D=e.code(s.id,E,z),O=D===void 0?void 0:_e(D);O!==void 0&&C(E,z,{...O,dx:Math.round((O.dx??0)+T/w),dy:Math.round((O.dy??0)+A/w)})},S=(E,z,T)=>{const A=Ut(s,E,z,n.panes),D=Gt(s,E,z,{width:1,height:1},A,w);C(E,z,{width:Math.round(T.width/w),height:Math.round(T.height/w),dx:Math.round((T.x-A.x-D.x)/w),dy:Math.round((T.y-A.y-D.y)/w)})},y=t.editing??null,k=t.preview??null,m=k===null?void 0:e.code(s.id,k.row,k.col);return v.jsxs(v.Fragment,{children:[[...p].map(([E,z])=>v.jsx("div",{"data-cells-code-pane":E.name,style:{position:"absolute",left:E.x,top:E.y,width:E.width,height:E.height,overflow:"hidden",pointerEvents:"none",zIndex:1},children:z.map(T=>v.jsx(mr,{model:e,sheet:s.id,row:T.row,col:T.col,code:T.code,place:T.place,theme:o,renderer:r,mounted:u.has(T),trusted:e.codeTrusted(s.id,T.row,T.col),onEscape:t.onEscape,onMove:(A,D)=>f(T.row,T.col,A,D),onUnpin:()=>C(T.row,T.col,null)},`${T.row},${T.col}`))},E.name)),y!==null&&e.code(s.id,y.row,y.col)!==void 0&&v.jsx(pr,{model:e,sheet:s.id,row:y.row,col:y.col,x:y.x,y:y.y,width:Math.max(wr,_e(e.code(s.id,y.row,y.col))?.width??0),editor:a,status:i?.status,portalName:t.portalName,returnFocusRef:t.returnFocusRef,onClose:()=>t.onCloseEditor?.()},`${s.id}:${y.row},${y.col}`),k!==null&&m!==void 0&&et(m).length>0&&v.jsx(xr,{cell:Re(k.row,k.col),outputs:et(m),trusted:e.codeTrusted(s.id,k.row,k.col),x:k.x,y:k.y,renderer:r,theme:o,portalName:t.portalName,returnFocusRef:t.returnFocusRef,onClose:()=>t.onClosePreview?.(),onPointer:t.onPreviewPointer,onPin:E=>{S(k.row,k.col,E),t.onClosePreview?.()}},`preview:${s.id}:${k.row},${k.col}`)]})}const xe={width:480,height:360};function xr(t){const e=t.trusted?t.outputs:wn(t.outputs),n=xn(e),o=x.useRef(!1),s=x.useRef(null),{offset:i,dragging:r,handlers:a}=Mt({onStart:()=>{o.current=!0,t.onPointer?.(!0)},onDrop:(c,u,p)=>{if(o.current=!1,Math.abs(c)<2&&Math.abs(u)<2)return;const C=s.current?.getBoundingClientRect();t.onPin?.({x:t.x+p.dx,y:t.y+p.dy,width:Math.min(xe.width,Math.max(80,C?.width??xe.width)),height:Math.min(xe.height+Ve,Math.max(40,C?.height??xe.height))})}});return v.jsx(yt,{children:v.jsx(bt,{role:"region","aria-label":`Output of ${t.cell}`,returnFocusRef:t.returnFocusRef,onClickOutside:t.onClose,onEscape:t.onClose,portalContainerName:t.portalName,position:"absolute",top:t.y+i.dy,left:t.x+i.dx,width:"auto",preventFocusOnOpen:!0,style:{backgroundColor:"var(--overlay-bgColor, Canvas)",color:"var(--fgColor-default, CanvasText)",boxShadow:"var(--shadow-floating-small, 0 0 0 1px rgba(128, 128, 128, 0.35), 0 8px 24px rgba(0, 0, 0, 0.2))"},"data-cells-code-preview":t.cell,"data-cells-dragging":r?"":void 0,children:v.jsxs("div",{ref:s,"data-cells-code-preview":t.cell,style:{font:`${t.theme.fontSize}px ${t.theme.fontFamily}`},onPointerEnter:()=>t.onPointer?.(!0),onPointerLeave:()=>{o.current||t.onPointer?.(!1)},onPointerDown:c=>c.stopPropagation(),onKeyDown:c=>{c.stopPropagation(),c.key==="Escape"&&(c.preventDefault(),t.onClose())},children:[v.jsxs("div",{"data-cells-code-preview-handle":"",title:"Drag to move",...a,style:{...kt,padding:"2px 8px",fontSize:11,color:"var(--fgColor-muted, GrayText)",borderBottom:"1px solid var(--borderColor-muted, rgba(128, 128, 128, 0.3))"},children:["Output of ",t.cell]}),v.jsx("div",{style:{maxWidth:xe.width,maxHeight:xe.height,overflow:"auto",padding:4},children:v.jsx(yn,{heavy:!1,renderer:t.renderer,outputs:e,trusted:t.trusted,cell:t.cell,width:xe.width-8,height:xe.height-8,text:n})})]})})})}const wr=560;function pr(t){const{model:e,sheet:n,row:o,col:s}=t,{offset:i,dragging:r,handlers:a}=Mt(),c=x.useRef(null),u=x.useRef(!1),p=()=>c.current?.save(),C=()=>{u.current||(u.current=!0,p(),t.onClose())},w=()=>{p(),ho(e).run({sheet:n,row:o,col:s}).catch(()=>{})},f=t.status,S={sheet:n,row:o,col:s,model:e,onClose:()=>{u.current=!0,t.onClose()},register:y=>{c.current=y}};return v.jsx(yt,{children:v.jsx(bt,{role:"dialog","aria-label":`Code of ${Re(o,s)}`,returnFocusRef:t.returnFocusRef,onClickOutside:C,onEscape:C,portalContainerName:t.portalName,position:"absolute",top:t.y+i.dy,left:t.x+i.dx,width:"auto",style:{backgroundColor:"var(--overlay-bgColor, Canvas)",color:"var(--fgColor-default, CanvasText)",boxShadow:"var(--shadow-floating-small, 0 0 0 1px rgba(128, 128, 128, 0.35), 0 8px 24px rgba(0, 0, 0, 0.2))"},"data-cells-code-overlay":"","data-cells-dragging":r?"":void 0,children:v.jsxs("div",{"data-cells-code-overlay":"",style:{width:t.width,maxWidth:"calc(100vw - 32px)",padding:8},onPointerDown:y=>y.stopPropagation(),onKeyDownCapture:y=>{y.key==="Enter"&&y.shiftKey?(y.preventDefault(),y.stopPropagation(),w()):y.key.toLowerCase()==="s"&&(y.ctrlKey||y.metaKey)&&(y.preventDefault(),y.stopPropagation(),p())},onKeyDown:y=>{y.stopPropagation(),y.key==="Escape"&&(y.preventDefault(),C())},children:[v.jsxs("div",{"data-cells-code-overlay-header":"",title:"Drag to move",...a,style:{...kt,display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,marginBottom:6,fontSize:12},children:[v.jsx("strong",{children:Re(o,s)}),f!==void 0&&v.jsx(x.Suspense,{fallback:null,children:v.jsx(f,{model:e})})]}),t.editor!==void 0?v.jsx(x.Suspense,{fallback:v.jsx("span",{"data-cells-code-loading":"",children:"Loading the editor…"}),children:x.createElement(t.editor,S)}):v.jsx(yr,{...S})]})})})}function yr({model:t,sheet:e,row:n,col:o,onClose:s,register:i}){const r=t,a=r.code(e,n,o),[c,u]=x.useState(a?.source??""),p=x.useRef(c);p.current=c;const C=()=>{const f=r.code(e,n,o);f!==void 0&&p.current!==f.source&&r.dispatch({type:"SET_CODE",sheet:e,row:n,col:o,code:{...f,source:p.current}})};if(i?.({save:C}),a===void 0)return null;const w=()=>{C(),s()};return v.jsxs("div",{role:"dialog","aria-label":`Code of ${Re(n,o)}`,"data-cells-code-editor":"",children:[v.jsx(Nn,{"aria-label":"Source",value:c,block:!0,resize:"vertical",rows:Math.min(20,Math.max(4,c.split(`
@@ -0,0 +1 @@
1
+ import{J as a,K as e}from"../datalayer-app-main.js";var h=["16","24"],n={16:{width:16,path:a.createElement("path",{d:"M.143 2.31a.75.75 0 0 1 1.047-.167l14.5 10.5a.75.75 0 1 1-.88 1.214l-2.248-1.628C11.346 13.19 9.792 14 8 14c-1.981 0-3.67-.992-4.933-2.078C1.797 10.832.88 9.577.43 8.9a1.619 1.619 0 0 1 0-1.797c.353-.533.995-1.42 1.868-2.305L.31 3.357A.75.75 0 0 1 .143 2.31Zm1.536 5.622A.12.12 0 0 0 1.657 8c0 .021.006.045.022.068.412.621 1.242 1.75 2.366 2.717C5.175 11.758 6.527 12.5 8 12.5c1.195 0 2.31-.488 3.29-1.191L9.063 9.695A2 2 0 0 1 6.058 7.52L3.529 5.688a14.207 14.207 0 0 0-1.85 2.244ZM8 3.5c-.516 0-1.017.09-1.499.251a.75.75 0 1 1-.473-1.423A6.207 6.207 0 0 1 8 2c1.981 0 3.67.992 4.933 2.078 1.27 1.091 2.187 2.345 2.637 3.023a1.62 1.62 0 0 1 0 1.798c-.11.166-.248.365-.41.587a.75.75 0 1 1-1.21-.887c.148-.201.272-.382.371-.53a.119.119 0 0 0 0-.137c-.412-.621-1.242-1.75-2.366-2.717C10.825 4.242 9.473 3.5 8 3.5Z"})},24:{width:24,path:a.createElement("path",{d:"M8.052 5.837A9.715 9.715 0 0 1 12 5c2.955 0 5.309 1.315 7.06 2.864 1.756 1.553 2.866 3.307 3.307 4.08a.11.11 0 0 1 .016.055.122.122 0 0 1-.017.06 16.766 16.766 0 0 1-1.53 2.218.75.75 0 1 0 1.163.946 18.253 18.253 0 0 0 1.67-2.42 1.607 1.607 0 0 0 .001-1.602c-.485-.85-1.69-2.757-3.616-4.46C18.124 5.034 15.432 3.5 12 3.5c-1.695 0-3.215.374-4.552.963a.75.75 0 0 0 .604 1.373Zm11.114 12.15C17.328 19.38 14.933 20.5 12 20.5c-3.432 0-6.125-1.534-8.054-3.24C2.02 15.556.814 13.648.33 12.798a1.606 1.606 0 0 1 .001-1.6A18.283 18.283 0 0 1 3.648 7.01L1.317 5.362a.75.75 0 1 1 .866-1.224l20.5 14.5a.75.75 0 1 1-.866 1.224ZM4.902 7.898c-1.73 1.541-2.828 3.273-3.268 4.044a.112.112 0 0 0-.017.059c0 .015.003.034.016.055.441.774 1.551 2.527 3.307 4.08C6.69 17.685 9.045 19 12 19c2.334 0 4.29-.82 5.874-1.927l-3.516-2.487a3.5 3.5 0 0 1-5.583-3.949L4.902 7.899Z"})}},o=a.forwardRef(function(c,t){return e(c,t,"octicon octicon-eye-closed",n,h)});o.displayName="EyeClosedIcon";var r=["16","24"],i={16:{width:16,path:a.createElement("path",{d:"M2 2.75C2 1.784 2.784 1 3.75 1h2.5a.75.75 0 0 1 0 1.5h-2.5a.25.25 0 0 0-.25.25v10.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 0 1.5h-2.5A1.75 1.75 0 0 1 2 13.25Zm6.56 4.5h5.69a.75.75 0 0 1 0 1.5H8.56l1.97 1.97a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L6.22 8.53a.75.75 0 0 1 0-1.06l3.25-3.25a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734Z"})},24:{width:24,path:a.createElement("path",{d:"M3 3.25c0-.966.784-1.75 1.75-1.75h5.5a.75.75 0 0 1 0 1.5h-5.5a.25.25 0 0 0-.25.25v17.5c0 .138.112.25.25.25h5.5a.75.75 0 0 1 0 1.5h-5.5A1.75 1.75 0 0 1 3 20.75Zm9.994 9.5 3.3 3.484a.75.75 0 0 1-1.088 1.032l-4.5-4.75a.75.75 0 0 1 0-1.032l4.5-4.75a.75.75 0 0 1 1.088 1.032l-3.3 3.484h8.256a.75.75 0 0 1 0 1.5Z"})}},l=a.forwardRef(function(c,t){return e(c,t,"octicon octicon-sign-in",i,r)});l.displayName="SignInIcon";export{o as E,l as S};
@@ -1 +1 @@
1
- import{bS as ye,bU as Ce,fi as ve,fj as Ae,r as U,j as I,T as le,B as Q,v as Se,a5 as $e,fk as ke,fl as Te}from"../datalayer-app-main.js";import{C as Re}from"./index-CET7bv5d.js";import{u as De}from"./write-D-y9_9sL.js";import{g as Ee,t as Me,h as Ne,B as se,j as Ie,p as V,z as F,i as Oe,k as je,a as Le,l as Pe,m as _e,o as ze,e as Be}from"./model-jLDiOPpQ.js";import{C as Fe,S as We,a as Xe}from"./SheetTabs-sx_-jWyq.js";import{u as Ge,s as Ve}from"./browser-CjxI_vdc.js";const He={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:"@"},de=/<(\/?)([A-Za-z_][\w:.-]*)((?:\s+[^\s=>/]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|<\?[\s\S]*?\?>|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<![^>]*>|([^<]+)/g,ae=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Ue={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};function W(e){return e.includes("&")?e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-z]+);/g,(o,l)=>{if(l[0]==="#"){const t=l[1]==="x"?parseInt(l.slice(2),16):parseInt(l.slice(1),10);return String.fromCodePoint(t)}return Ue[l]??o}):e}const ge=e=>{const o=e.indexOf(":");return o<0?e:e.slice(o+1)};function Ze(e){const o={};if(e==="")return o;ae.lastIndex=0;let l;for(;(l=ae.exec(e))!==null;)o[ge(l[1])]=W(l[2]??l[3]??"");return o}function O(e,o){de.lastIndex=0;let l;for(;(l=de.exec(e))!==null;)if(l[2]!==void 0){const t=ge(l[2]);if(l[1]==="/")o.close?.(t);else{const s=l[4]==="/";o.open?.(t,Ze(l[3]),s),s&&o.close?.(t)}}else l[5]!==void 0?o.text?.(l[5]):l[6]!==void 0&&o.text?.(W(l[6]))}const qe=9525,B=e=>Math.round(Number(e??0)/qe);function Ke(e){const o=e.join("");return o===""?void 0:o}const ce=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","ofPieChart","scatterChart","radarChart","bubbleChart","stockChart","surfaceChart","surface3DChart"]),me=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","scatterChart"]);function Ye(e){const o={autoTitleDeleted:!1,groups:[],axes:[],pivot:!1,undrawn:[]},l=[];let t,s,r,i,c,p="",h=0;const g=n=>l.includes(n);return O(e,{open(n,u){if(l.push(n),ce.has(n)&&g("plotArea")){t={element:n,series:[],axIds:[]},o.groups.push(t),me.has(n)||o.undrawn.push(n);return}if(n==="pivotSource"&&(o.pivot=!0),n==="autoTitleDeleted"&&(o.autoTitleDeleted=u.val==="1"||u.val==="true"),n==="legendPos"&&(o.legend=u.val),n==="dispBlanksAs"&&(o.dispBlanksAs=u.val),n==="title"&&!g("ser")){h+=1,i=[],c=r!==void 0&&g(r.element)?"axisTitle":"title";return}if(t!==void 0&&!g("ser")&&(n==="barDir"?t.barDir=u.val:n==="grouping"?t.grouping=u.val:n==="holeSize"?t.holeSize=!0:n==="axId"?t.axIds.push(u.val):n==="showVal"&&g("dLbls")&&(t.showVal=u.val==="1"||u.val==="true")),n==="ser"&&t!==void 0){s={idx:1e9,literal:!1,dPt:0,trendline:0,errBars:0,external:!1},t.series.push(s);return}if(s!==void 0&&(n==="idx"&&!g("dPt")&&!g("dLbl")?s.idx=Number(u.val):n==="tx"?c="name":n==="val"||n==="yVal"?c="values":n==="cat"?c="categories":n==="xVal"?c="x":n==="f"?p="":n==="numLit"||n==="strLit"?s.literal=!0:n==="dPt"&&t!==void 0&&!t.element.startsWith("pie")&&t.element!=="doughnutChart"?s.dPt+=1:n==="trendline"?s.trendline+=1:n==="errBars"?s.errBars+=1:n==="smooth"?s.smooth=u.val!=="0"&&u.val!=="false":n==="srgbClr"&&g("spPr")&&g("solidFill")&&!g("dPt")&&s.color===void 0?s.color=`#${u.val.toLowerCase()}`:n==="v"&&c==="name"&&g("tx")&&!g("strRef")&&(i=[])),(n==="catAx"||n==="valAx"||n==="dateAx"||n==="serAx")&&g("plotArea")){r={element:n,id:"",gridlines:!1,deleted:!1},o.axes.push(r);return}r!==void 0&&g(r.element)&&(n==="axId"?r.id=u.val:n==="min"?r.min=Number(u.val):n==="max"?r.max=Number(u.val):n==="logBase"?r.log=!0:n==="majorGridlines"?r.gridlines=!0:n==="numFmt"&&u.formatCode!==void 0&&u.formatCode!=="General"&&u.sourceLinked!=="1"&&u.sourceLinked!=="true"?r.format=u.formatCode:n==="delete"&&(r.deleted=u.val==="1"||u.val==="true"))},text(n){g("f")?p+=n:i!==void 0&&(g("t")||g("v")&&c==="name")&&i.push(n)},close(n){if(l.pop(),n==="f"&&s!==void 0&&c!==void 0&&c!=="title"&&c!=="axisTitle"){const u=p.trim();/^\[/.test(u)||/'\[/.test(u)?s.external=!0:s[c]=u}if(n==="v"&&s!==void 0&&c==="name"&&i!==void 0&&!g("strRef")&&(s.name=i.join(""),i=void 0),(n==="tx"||n==="val"||n==="yVal"||n==="cat"||n==="xVal")&&s!==void 0&&(c=void 0),n==="title"&&h>0){h-=1;const u=Ke(i??[]);c==="axisTitle"&&r!==void 0?r.title=u:c==="title"&&(o.title=u),i=void 0,c=void 0}n==="ser"&&(s=void 0),ce.has(n)&&(t=void 0),(n==="catAx"||n==="valAx"||n==="dateAx"||n==="serAx")&&(r=void 0)}}),o}const Je={t:"top",r:"right",b:"bottom",l:"left",tr:"right"},ee=e=>e;function Qe(e,o,l,t,s){const r=`${t}: chart '${o}'`;if(e.pivot){s.push(`${r}: a pivot chart was not imported.`);return}for(const f of e.undrawn)s.push(`${r}: a ${f.replace(/Chart$/,"")} chart was not imported.`);const i=e.groups.filter(f=>me.has(f.element));if(i.length===0){e.undrawn.length===0&&s.push(`${r}: no chart that Cells draws.`);return}const c=i.filter(f=>f.element.includes("3D")),p=f=>{switch(f.element){case"barChart":case"bar3DChart":return f.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"}},h=e.axes.filter(f=>f.element==="valAx"),g=h[0],u=i.every(f=>f.element==="scatterChart")?void 0:h.find(f=>f!==g&&i.some(v=>v.axIds.includes(f.id))),x=e.axes.find(f=>f.element==="catAx"||f.element==="dateAx"||f.element==="valAx"&&i.every(v=>v.element==="scatterChart")&&f===g),y=i.length>1;let a=y?"combo":p(i[0]);if(y&&i.some(f=>f.element.startsWith("pie")||f.element==="doughnutChart"||f.element==="scatterChart")){a=p(i[0]);for(const f of i.slice(1))s.push(`${r}: a second plot (${f.element.replace(/Chart$/,"")}) beside a ${a} chart was not imported.`);i.length=1}c.length>0&&s.push(`${r}: a 3-D chart was imported as a ${a} chart.`);let d;const w=i[0];w.element==="doughnutChart"?d="doughnut":w.grouping==="stacked"?d="stacked":w.grouping==="percentStacked"?d="percent":(w.element==="lineChart"||w.element==="line3DChart")&&w.series.some(f=>f.smooth)&&(d="smooth");const b=[],k=[],$=[];for(const f of i){const v=p(f),C=u!==void 0&&f.axIds.includes(u.id);for(const m of f.series){if(m.values===void 0){k.push(m.external?"a series naming another workbook":m.literal?"a series given as literals":"a series without values");continue}m.literal&&s.push(`${r}: literal categories or names of a series were left out.`),m.dPt>0&&s.push(`${r}: ${m.dPt} per-point colour(s) were left out.`),m.trendline>0&&s.push(`${r}: ${m.trendline} trendline(s) were left out.`),m.errBars>0&&s.push(`${r}: error bars were left out.`),$.push([m.idx,{values:ee(m.values),...m.name!==void 0?{name:m.name}:{},...m.categories!==void 0?{categories:ee(m.categories)}:{},...m.x!==void 0?{x:ee(m.x)}:{},...y?{type:v==="column"||v==="bar"?"column":v==="area"?"area":"line"}:{},...C?{axis:"secondary"}:{},...m.color!==void 0?{color:m.color}:{}}])}}$.sort((f,v)=>f[0]-v[0]);for(const[,f]of $)b.push(f);for(const f of k)s.push(`${r}: ${f} was not imported.`);if(b.length===0){s.push(`${r}: no series to draw.`);return}const A=f=>{if(f===void 0)return;const v=f.element==="valAx",C={...f.title!==void 0?{title:f.title}:{},...f.min!==void 0?{min:f.min}:{},...f.max!==void 0?{max:f.max}:{},...f.format!==void 0?{format:f.format}:{},...f.log?{log:!0}:{},...v&&!f.gridlines?{gridlines:!1}:{},...!v&&f.gridlines?{gridlines:!0}:{}};return Object.keys(C).length===0?void 0:C},N=A(x),L=A(a==="scatter"?h[1]??g:g),z=A(u),X=N!==void 0||L!==void 0||z!==void 0?{...N!==void 0?{x:N}:{},...L!==void 0?{y:L}:{},...z!==void 0?{y2:z}:{}}:void 0,G=b.length>1&&b.every(f=>{const v=/\$?([A-Z]+)\$?(\d+):\$?([A-Z]+)\$?(\d+)$/.exec(f.values);return v!==null&&v[2]===v[4]&&v[1]!==v[3]});return{id:o,type:a,...d!==void 0?{variant:d}:{},anchor:l,data:{series:b,by:G?"rows":"columns",headers:{row:b.some(f=>f.name!==void 0),column:b.some(f=>f.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?Je[e.legend]??"bottom":"none",...X!==void 0?{axes:X}:{},...i.some(f=>f.showVal)?{labels:!0}:{}}}function et(e){const o=[];let l,t,s,r,i,c,p,h=!1,g,n={col:0,colOff:0,row:0,rowOff:0},u,x="";const y=()=>{if(l===void 0)return;let a;l==="twoCellAnchor"&&t!==void 0&&s!==void 0?a={kind:"cells",from:t,to:s}:l==="oneCellAnchor"&&t!==void 0&&i!==void 0?a={kind:"cell",from:t,width:Math.max(1,i.width),height:Math.max(1,i.height)}:l==="absoluteAnchor"&&r!==void 0&&i!==void 0&&(a={kind:"absolute",...r,width:Math.max(1,i.width),height:Math.max(1,i.height)}),a!==void 0&&o.push({anchor:a,chart:c,chartEx:p,picture:h}),l=void 0,t=s=r=i=c=p=void 0,h=!1};return O(e,{open(a,d){a==="twoCellAnchor"||a==="oneCellAnchor"||a==="absoluteAnchor"?l=a:a==="from"||a==="to"?(g=a,n={col:0,colOff:0,row:0,rowOff:0}):a==="col"||a==="colOff"||a==="row"||a==="rowOff"?(u=a,x=""):a==="pos"?r={x:B(d.x),y:B(d.y)}:a==="ext"&&l!==void 0&&d.cx!==void 0&&i===void 0?i={width:B(d.cx),height:B(d.cy)}:a==="chart"?(c===void 0&&(c=d.id),d.id===void 0&&(c=c??"missing")):a==="pic"&&(h=!0)},text(a){u!==void 0&&(x+=a)},close(a){if(a==="col"||a==="colOff"||a==="row"||a==="rowOff")n[a]=Number(x.trim()),u=void 0;else if(a==="from"||a==="to"){const d={row:n.row,col:n.col,dx:B(String(n.colOff)),dy:B(String(n.rowOff))};g==="from"?t=d:s=d,g=void 0}else(a==="twoCellAnchor"||a==="oneCellAnchor"||a==="absoluteAnchor")&&y()}}),o}function fe(e){const o=new Map;return e===void 0||O(e,{open(l,t){l==="Relationship"&&t.Id!==void 0&&t.Target!==void 0&&o.set(t.Id,{target:t.Target,type:t.Type??""})}}),o}function te(e,o){if(o.startsWith("/"))return o.slice(1);const l=e.split("/").slice(0,-1);for(const t of o.split("/"))t===".."?l.pop():t!=="."&&l.push(t);return l.join("/")}function tt(e,o,l,t,s){const r={},i=o.split("/").slice(0,-1).join("/"),c=o.split("/").pop(),h=fe(e(`${i}/_rels/${c}.rels`)).get(l);if(h===void 0)return s.push(`${t}: the drawing part is missing.`),r;const g=te(o,h.target),n=e(g);if(n===void 0)return s.push(`${t}: the drawing part ${g} is missing.`),r;const u=g.split("/").slice(0,-1).join("/"),x=g.split("/").pop(),y=fe(e(`${u}/_rels/${x}.rels`));let a=0;for(const d of et(n)){if(d.chart===void 0)continue;const w=y.get(d.chart);if(w===void 0){s.push(`${t}: a chart's part is missing (${d.chart}).`);continue}a+=1;const b=`chart${a}`;if(/chartEx/i.test(w.type)||/chartEx/.test(w.target)){const A=e(te(g,w.target))??"",N=/<cx:layoutId val="([^"]+)"/.exec(A)?.[1]??"unknown";s.push(`${t}: chart '${b}': an Excel 2016 chart (${N}) was not imported.`);continue}const k=e(te(g,w.target));if(k===void 0){s.push(`${t}: chart '${b}': its part ${w.target} is missing.`);continue}const $=Qe(Ye(k),b,d.anchor,t,s);$!==void 0&&(r[b]=$)}return r}const we="customXml/cells-code.xml";function nt(e){let o=0;for(const l of e)o=o*26+(l.charCodeAt(0)-64);return o-1}function Z(e){const o=/^\$?([A-Z]{1,3})\$?([0-9]+)$/.exec(e);if(o===null)throw new Error(`'${e}' is not a cell reference.`);return{row:Number(o[2])-1,col:nt(o[1])}}function st(e){const[o,l=o]=e.split(":"),t=Z(o),s=Z(l);return{top:Math.min(t.row,s.row),left:Math.min(t.col,s.col),bottom:Math.max(t.row,s.row),right:Math.max(t.col,s.col)}}function ne(e){const o=e?.rgb;if(!(o===void 0||!/^[0-9A-Fa-f]{6,8}$/.test(o)))return`#${o.slice(-6).toLowerCase()}`}const rt={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 ot(e){if(e===void 0)return[{}];const o=new Map,l=[],t=[],s=[],r=[],i=new Map;let c="",p,h,g,n,u,x;O(e,{open(a,d){switch(a){case"numFmts":case"fonts":case"fills":case"borders":case"cellXfs":case"cellStyleXfs":case"dxfs":c=a;return;case"numFmt":c==="numFmts"&&o.set(Number(d.numFmtId),d.formatCode??"General");return}if(c==="fonts")a==="font"?p={}:p!==void 0&&(a==="b"?p.bold=d.val!=="0"&&d.val!=="false":a==="i"?p.italic=d.val!=="0"&&d.val!=="false":a==="u"?p.underline=d.val!=="none":a==="strike"?p.strike=d.val!=="0"&&d.val!=="false":a==="sz"?p.size=Number(d.val):a==="color"?p.color=ne(d):a==="name"&&(p.font=d.val));else if(c==="fills")a==="fill"?h={}:a==="patternFill"&&h?h.pattern=d.patternType:a==="fgColor"&&h&&(h.color=ne(d));else if(c==="borders")a==="border"?g={}:g!==void 0&&["left","right","top","bottom"].includes(a)?n={name:a,style:d.style===void 0?void 0:rt[d.style]}:a==="color"&&n!==void 0&&n.style!==void 0&&(g[n.name]={style:n.style,color:ne(d)??"#000000"});else if(c==="cellXfs"){if(a==="xf"){const w=Number(d.numFmtId??0),b=l[Number(d.fontId??0)]??{};x=b;const k=t[Number(d.fillId??0)],$=s[Number(d.borderId??0)],A=w===0?void 0:(o.get(w)??He[w])?.replace(/^\[\$-(409|en-US)\]/,"");u={...b.bold?{bold:!0}:{},...b.italic?{italic:!0}:{},...b.underline?{underline:!0}:{},...b.strike?{strike:!0}:{},...b.color!==void 0&&b.color!=="#000000"?{color:b.color}:{},...k!==void 0?{fill:k}:{},...$!==void 0&&Object.keys($).length>0?{borders:$}:{},...A!==void 0&&A!=="General"?{format:A}:{}}}else if(a==="alignment"&&u!==void 0){const w=d.horizontal,b=d.vertical;u={...u,...w==="left"||w==="center"||w==="right"?{align:w}:{},...b==="top"?{valign:"top"}:b==="center"?{valign:"middle"}:{},...d.wrapText==="1"||d.wrapText==="true"?{wrap:!0}:{}}}}},close(a){a===c?c="":a==="font"&&p!==void 0?(l.push(p),p=void 0):a==="fill"&&h!==void 0?(t.push(h.pattern==="solid"?h.color:void 0),h=void 0):a==="border"&&g!==void 0?(s.push(g),g=void 0):["left","right","top","bottom"].includes(a)?n=void 0:a==="xf"&&u!==void 0&&c==="cellXfs"&&(r.push(u),x!==void 0&&i.set(u,x),u=void 0)}});const y=l[0]??{};return r.map((a,d)=>{if(d===0)return{};const w=i.get(a);return w===void 0?a:{...a,...w.size!==void 0&&w.size!==y.size?{size:w.size}:{},...w.font!==void 0&&w.font!==y.font?{font:w.font}:{}}})}function it(e){const o=[];if(e===void 0)return o;let l,t=!1,s=!1;return O(e,{open(r){r==="si"?l="":r==="t"?t=!s:r==="rPh"&&(s=!0)},close(r){r==="si"?(o.push(l??""),l=void 0):r==="t"?t=!1:r==="rPh"&&(s=!1)},text(r){t&&l!==void 0&&(l+=r)}}),o}const lt=e=>Math.round(e*7+5),ue=e=>Math.round(e*4/3);function dt(e,o,l){const t={},s={},r={},i=[],c=[],p=[];let h,g;const n=new Map;let u=0,x=0,y,a="n",d=0,w,b,k,$="",A,N=0,L=0;const z=(C,m,D,R,S,E,P)=>{const T={};if(E?.t==="shared"&&E.si!==void 0)if(S!==void 0&&S!=="")n.set(E.si,{formula:S,...C});else{const j=n.get(E.si);j!==void 0&&(S=Me(j.formula,C.row-j.row,C.col-j.col))}else E?.t==="array"&&l.set("array formula",(l.get("array formula")??0)+1);if(S!==void 0&&S!==""&&(T.f=S,x+=1),m==="s"&&R!==void 0?T.v=o[Number(R)]??"":m==="b"&&R!==void 0?T.v=R==="1":m==="e"&&R!==void 0?T.v=Ne(R)?{error:R}:{error:"#VALUE!"}:(m==="str"||m==="inlineStr")&&(R!==void 0||P!=="")?T.v=m==="inlineStr"?P:R??"":R!==void 0&&R!==""&&(T.v=Number(R)),D!==0&&(T.s=D),T.v!==void 0||T.f!==void 0||T.s!==void 0){const j=String(C.row);(t[j]??={cells:{}}).cells[String(C.col)]=T,u+=1}},X=C=>{const m=/<(?:\w+:)?row\s([^>]*?)\/?>/g;let D;for(;(D=m.exec(C))!==null;){const S=D[1],E=/\br="(\d+)"/.exec(S);if(E===null)continue;const P=Number(E[1])-1,T=/\bht="([^"]+)"/.exec(S);T!==null&&/\bcustomHeight="(1|true)"/.test(S)&&(s[String(P)]=ue(Number(T[1]))),/\bhidden="(1|true)"/.test(S)&&i.push(P)}const R=/<(?:\w+:)?c\s([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?c>)/g;for(;(D=R.exec(C))!==null;){const S=D[1],E=D[2]??"",P=Z(/\br="([^"]+)"/.exec(S)[1]),T=/\bt="([^"]+)"/.exec(S)?.[1]??"n",j=Number(/\bs="(\d+)"/.exec(S)?.[1]??0);let q,re,K,oe="";if(E!==""){const ie=/<(?:\w+:)?v>([\s\S]*?)<\/(?:\w+:)?v>/.exec(E);ie!==null?q=W(ie[1]):/<(?:\w+:)?v\/>/.test(E)&&(q="");const Y=/<(?:\w+:)?f\b([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?f>)/.exec(E);if(Y!==null){K={};for(const[,J,xe]of Y[1].matchAll(/(\w+)="([^"]*)"/g))K[J]=xe;re=W(Y[2]??"")}if(T==="inlineStr")for(const[,J]of E.matchAll(/<(?:\w+:)?t(?:\s[^>]*)?>([\s\S]*?)<\/(?:\w+:)?t>/g))oe+=W(J)}z(P,T,j,q,re,K,oe)}};let G=e;const f=/<(?:\w+:)?sheetData\b[^>]*>/.exec(e),v=f===null?-1:e.search(/<\/(?:\w+:)?sheetData>/);return f!==null&&v>f.index&&!/<(?:\w+:)?c(?=[\s>/])(?![^>]*\sr=)/.test(e)&&(X(e.slice(f.index+f[0].length,v)),G=e.slice(0,f.index)+e.slice(v)),O(G,{open(C,m){switch(C){case"row":{const D=m.r===void 0?N:Number(m.r)-1;N=D+1,L=0,m.ht!==void 0&&(m.customHeight==="1"||m.customHeight==="true")&&(s[String(D)]=ue(Number(m.ht))),(m.hidden==="1"||m.hidden==="true")&&i.push(D);return}case"c":{y=m.r===void 0?{row:N-1,col:L}:Z(m.r),L=y.col+1,a=m.t??"n",d=Number(m.s??0),w=void 0,b=void 0,k=void 0,$="";return}case"v":A="v",w="";return;case"f":A="f",b="",k=m;return;case"is":A="is";return;case"col":{const D=Number(m.min)-1,R=Math.min(Number(m.max)-1,16383);for(let S=D;S<=R;S+=1)m.width!==void 0&&(m.customWidth==="1"||m.customWidth==="true")&&(r[String(S)]=lt(Number(m.width))),(m.hidden==="1"||m.hidden==="true")&&c.push(S);return}case"mergeCell":m.ref!==void 0&&p.push(st(m.ref));return;case"pane":(m.state==="frozen"||m.state==="frozenSplit")&&(h={rows:Number(m.ySplit??0),cols:Number(m.xSplit??0)});return;case"drawing":g=m.id;return;case"conditionalFormatting":case"dataValidation":case"hyperlink":case"legacyDrawing":case"tablePart":case"sheetProtection":case"autoFilter":l.set(C,(l.get(C)??0)+1);return}},text(C){A==="v"?w+=C:A==="f"?b+=C:A==="is"&&($+=C)},close(C){if(C==="v"||C==="f"||C==="is"){A=void 0;return}C!=="c"||y===void 0||(z(y,a,d,w,b,k,$),y=void 0)}}),{sheet:{rows:t,...Object.keys(s).length+Object.keys(r).length>0?{sizes:{rows:s,cols:r}}:{},...i.length+c.length>0?{hidden:{rows:i,cols:c}}:{},...p.length>0?{merges:p}:{},...h!==void 0?{frozen:h}:{}},cells:u,formulas:x,...g!==void 0?{drawing:g}:{}}}function at(e){return e.startsWith("/")?e.slice(1):`xl/${e}`.replace(/\/[^/]+\/\.\.\//g,"/")}function ct(e){let o;try{o=Ge(e)}catch(d){throw new Error(`The file is not an XLSX package: ${d.message}`)}const l=d=>o[d]===void 0?void 0:Ve(o[d]),t=l("xl/workbook.xml");if(t===void 0)throw new Error("The package has no xl/workbook.xml.");const s=new Map;O(l("xl/_rels/workbook.xml.rels")??"",{open(d,w){d==="Relationship"&&w.Id!==void 0&&w.Target!==void 0&&s.set(w.Id,at(w.Target))}});const r=[],i=new Map;O(t,{open(d,w){if(d==="sheet"){const b=s.get(w.id);if(b===void 0)throw new Error(`The sheet '${w.name}' has no part.`);r.push({name:w.name,path:b,hidden:w.state==="hidden"||w.state==="veryHidden"})}else d==="definedName"&&i.set("defined name",(i.get("defined name")??0)+1)}});const c=it(l("xl/sharedStrings.xml")),p=ot(l("xl/styles.xml"));let h=0,g=0,n=0;const u=[],x=new Set,y=r.map((d,w)=>{const b=l(d.path);if(b===void 0)throw new Error(`The sheet '${d.name}' has no ${d.path}.`);d.hidden&&i.set("hidden sheet (shown)",(i.get("hidden sheet (shown)")??0)+1);const k=dt(b,c,i);h+=k.cells,g+=k.formulas;let $=`s${w+1}`;for(;x.has($);)$+="_";x.add($);const A=k.drawing===void 0?{}:tt(l,d.path,k.drawing,d.name,u);return n+=Object.keys(A).length,{id:$,name:d.name,...k.sheet,...Object.keys(A).length>0?{charts:A}:{}}}),a=ft(l(we),y);for(const d of Object.keys(o))/^xl\/chartsheets\/sheet\d+\.xml$/.test(d)?u.push(`${d}: a chart sheet was not imported.`):d.startsWith("xl/media/")?i.set("image",(i.get("image")??0)+1):/^xl\/comments\d*\.xml$/.test(d)||d.startsWith("xl/threadedComments/")?i.set("comments",(i.get("comments")??0)+1):d.startsWith("xl/pivotTables/")&&i.set("pivot table",(i.get("pivot table")??0)+1);for(const d of y)for(const w of Object.values(d.rows))for(const b of Object.values(w.cells))b.s!==void 0&&b.s>=p.length&&delete b.s;return{workbook:{version:1,sheets:y,styles:p.length>0?p:[{}]},report:{sheets:y.length,cells:h,formulas:g,skipped:[...i].map(([d,w])=>({feature:d,count:w})),chartsImported:n,charts:u,code:a}}}function ft(e,o){if(e===void 0)return[];const l=new Map(o.map(p=>[p.name,p])),t=new Map;let s=0,r,i="",c=!1;O(e,{open(p,h){if(p==="cell"){const g=l.get(h.sheet??"");r=g===void 0?void 0:{sheet:g,ref:h.ref??"",attrs:h},i=""}else p==="source"&&(c=!0)},text(p){c&&(i+=p)},close(p){if(p==="source"&&(c=!1),p!=="cell"||r===void 0)return;const{sheet:h,ref:g,attrs:n}=r,u=/^([A-Z]{1,3})([1-9][0-9]*)$/.exec(g);if(u===null)return;let x=-1;for(const w of u[1])x=(x+1)*26+w.charCodeAt(0)-65;const y=h.rows[String(Number(u[2])-1)]?.cells[String(x)]?.v,a={source:i,language:"python",outputs:[],result:y===void 0?null:y,run:n.run==="auto"?"auto":"manual",...n.executionCount!==void 0?{executionCount:Number(n.executionCount)}:{},...n.lastRun!==void 0?{lastRun:n.lastRun}:{},...n.frame==="none"?{frame:null}:n.frameWidth!==void 0&&n.frameHeight!==void 0?{frame:{width:Number(n.frameWidth),height:Number(n.frameHeight),...n.frameDx!==void 0?{dx:Number(n.frameDx)}:{},...n.frameDy!==void 0?{dy:Number(n.frameDy)}:{}}}:{}};if(Ee(a)!==void 0)return;let d=t.get(h);d===void 0&&t.set(h,d={}),d[g]=a,s+=1,r=void 0}});for(const[p,h]of t)p.code=h;return s===0?[]:[`${s} code cell${s===1?"":"s"} read from ${we}: the sources and the results, as cached values; the outputs are not in XLSX and were dropped.`]}const M={readRange:"cells.agent.readRange",writeRange:"cells.agent.writeRange",insertChart:"cells.agent.insertChart",listCharts:"cells.agent.listCharts",selectRange:"cells.agent.selectRange"},ut=2e3,H={type:"string",description:"A range in A1 notation on the sheet shown, such as `A1:D13`, or one cell such as `B3`."},he=Ae({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:M.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:H}}},{name:"cells_write_range",command:M.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:{...H,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:M.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:{...H,description:"The data to chart, headers included, such as `A1:D13`."},type:{type:"string",enum:[...se],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:M.listCharts,description:"The charts of the sheet shown: id, type, title and the ranges each reads."},{name:"cells_select_range",command:M.selectRange,description:"Select a range of the spreadsheet shown, to show the person the cells meant.",parameters:{type:"object",properties:{range:H},required:["range"]}}]}),_=(e,o)=>{if(typeof e!="string"||e.trim()==="")throw new Error(`${o} is a non-empty string.`);return e},pe=e=>{if(!e.ok)throw new Error(e.refusals.map(o=>o.message).join(" "))};function ht(e,o){const l=e.sheet(o).cells;let t=-1,s=-1;for(const r of l.columnIndexes()){const i=l.lastRowIn(r);i<0||(t=Math.max(t,r),s=Math.max(s,i))}return t<0?null:{top:0,left:0,bottom:s,right:t}}const pt=e=>e!==null&&typeof e=="object"?`#${e.error.replace(/^#/,"")}`:e,gt=e=>{if(e==null)return null;if(typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return e.startsWith("=")?_e(e):e;throw new Error(`A cell is a number, a string, a boolean or null, not ${JSON.stringify(e)}.`)};function be(e={}){const o=t=>e.model?.()??Ie(t,void 0).model,l=(t,s,r)=>({id:t,name:s,category:"Cells",execute:i=>r(o(t),i??{})});return ye({name:e.name??mt,displayName:"Cells agent tools",description:"Read, write, chart and select the grid on screen, as tools an agent calls.",octicon:"table",commands:[l(M.readRange,"Read a range",(t,s)=>{const r=t.selection.sheet,i=s.range===void 0?ht(t,r):V(_(s.range,"The range"));if(i===null)return{sheet:t.sheet(r).name,range:null,values:[]};const c=i.right-i.left+1,p=Math.max(1,Math.min(i.bottom-i.top+1,Math.floor(ut/c))),h={...i,bottom:i.top+p-1};return{sheet:t.sheet(r).name,range:F(h),values:t.toRows(h,r).map(g=>g.map(pt)),...h.bottom<i.bottom?{truncated:!0,fullRange:F(i)}:{}}}),l(M.writeRange,"Write values into a range",(t,s)=>{const r=V(_(s.range,"The range"));if(!Array.isArray(s.values)||s.values.length===0||!s.values.every(Array.isArray))throw new Error("The values are a non-empty array of rows, each an array of cells.");const i=t.selection.sheet,c=s.values.map(h=>h.map(gt));pe(t.dispatch({type:"SET_CELLS",sheet:i,at:{row:r.top,col:r.left},cells:c}));const p=Math.max(...c.map(h=>h.length));return{ok:!0,sheet:t.sheet(i).name,range:F({top:r.top,left:r.left,bottom:r.top+c.length-1,right:r.left+Math.max(0,p-1)})}}),l(M.insertChart,"Insert a chart of a range",(t,s)=>{const r=V(_(s.range,"The range")),i=s.type===void 0?"column":_(s.type,"The type");if(!se.includes(i))throw new Error(`'${i}' is not a chart type; there are ${se.join(", ")}.`);const c=t.selection.sheet,p=Oe((x,y)=>t.value(c,x,y),t.sheet(c).name,r,(x,y)=>/[dmy]/i.test(t.style(c,x,y).format??""));if(!p.ok)throw new Error(p.message);let h=je(t,r);if(s.at!==void 0&&h.kind==="cells"){const x=Le(_(s.at,"Where the chart goes")),y=h.to.row-h.from.row,a=h.to.col-h.from.col;h={kind:"cells",from:{row:x.row,col:x.col,dx:0,dy:0},to:{row:x.row+y,col:x.col+a,dx:0,dy:0}}}const g=new Set(t.sheet(c).charts.keys()),n=s.title===void 0?void 0:_(s.title,"The title");pe(t.dispatch({type:"INSERT_CHART",sheet:c,chart:{type:i,anchor:h,data:p.data,legend:"bottom",...n?{title:n}:{}}}));const u=[...t.sheet(c).charts.keys()].find(x=>!g.has(x));return u!==void 0&&t.selectChart(u),{ok:!0,chartId:u,sheet:t.sheet(c).name,range:F(r),type:i}}),l(M.listCharts,"List the charts",t=>{const s=t.selection.sheet;return{sheet:t.sheet(s).name,charts:[...t.sheet(s).charts.values()].map(r=>({id:r.id,type:r.type,...r.title?{title:r.title}:{},ranges:Pe(r)}))}}),l(M.selectRange,"Select a range",(t,s)=>{const r=V(_(s.range,"The range")),i=t.selection.sheet,c={row:r.top,col:r.left};return t.select({sheet:i,zones:[r],anchor:c,active:c}),{ok:!0,sheet:t.sheet(i).name,range:F(r)}})],contributes:[Ce(ve,he,{id:he.id})]})}const mt="@datalayer/cells-agent-tools";be();function wt(){}const bt=40;function xt(e,o=160,l=560){const[t,s]=U.useState(o);return U.useEffect(()=>{if(!e)return;const r=()=>{const i=e.sheet(e.selection.sheet);let c=i.rows.offsetOf(De(e,i.id).bottom+1);for(const p of i.charts.values()){const h=ze(i,p);c=Math.max(c,h.y+h.height)}s(Math.min(l,Math.max(o,Math.ceil(c)+bt)))};return r(),e.subscribe(r)},[e,o,l]),t}be({model:wt,name:"@datalayer/loop-plugin-agent-outputs-sheet-tools"});async function yt(e){const o=await Te(e),{workbook:l}=ct(o);return{model:Be({data:l,readOnly:!0,codeCells:!1,plugins:[Re]}),bytes:o}}function Tt({data:e,name:o,maxHeight:l}){const[t,s]=U.useState({model:null,bytes:null,error:""});U.useEffect(()=>{let c=!1;return yt(e).then(({model:p,bytes:h})=>!c&&s({model:p,bytes:h,error:""}),p=>!c&&s({model:null,bytes:null,error:p instanceof Error?p.message:String(p)})),()=>{c=!0}},[e]);const r=xt(t.model,160,l);if(t.error)return I.jsxs(le,{sx:{color:"danger.fg",fontSize:0},children:["Could not read the spreadsheet: ",t.error]});if(!t.model)return I.jsx(le,{as:"p",sx:{color:"fg.muted",fontSize:0,m:0},children:"Reading the spreadsheet…"});const i=t.model.sheets.length>1;return I.jsxs(Fe,{model:t.model,children:[I.jsxs(Q,{"data-spreadsheet-preview-sheets":t.model.sheets.length,border:"1px solid",borderColor:"border.muted",borderRadius:2,overflow:"hidden",children:[I.jsx(Q,{height:r,children:I.jsx(We,{model:t.model,"aria-label":`${o}, read-only`})}),i?I.jsx(Xe,{"aria-label":`The sheets of ${o}`}):null]}),I.jsx(Q,{mt:1,children:I.jsxs(Se,{size:"small",variant:"invisible",leadingVisual:$e,onClick:()=>t.bytes&&ke(t.bytes,o),children:["Download ",o]})})]})}export{Tt as SpreadsheetPreviewView,Tt as default,yt as readOnlyWorkbook};
1
+ import{bS as ye,bU as Ce,fi as ve,fj as Ae,r as U,j as I,T as le,B as Q,v as Se,a5 as $e,fk as ke,fl as Te}from"../datalayer-app-main.js";import{C as Re}from"./index-qZXZK5qd.js";import{u as De}from"./write-DKnalcKH.js";import{g as Ee,t as Me,h as Ne,B as se,j as Ie,p as V,z as F,i as Oe,k as je,a as Le,l as Pe,m as _e,o as ze,e as Be}from"./model-DUnnBi6P.js";import{C as Fe,S as We,a as Xe}from"./SheetTabs-BZP7_RGB.js";import{u as Ge,s as Ve}from"./browser-CjxI_vdc.js";const He={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:"@"},de=/<(\/?)([A-Za-z_][\w:.-]*)((?:\s+[^\s=>/]+\s*=\s*(?:"[^"]*"|'[^']*'))*)\s*(\/?)>|<\?[\s\S]*?\?>|<!--[\s\S]*?-->|<!\[CDATA\[([\s\S]*?)\]\]>|<![^>]*>|([^<]+)/g,ae=/([^\s=]+)\s*=\s*(?:"([^"]*)"|'([^']*)')/g,Ue={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};function W(e){return e.includes("&")?e.replace(/&(#x[0-9a-fA-F]+|#[0-9]+|[a-z]+);/g,(o,l)=>{if(l[0]==="#"){const t=l[1]==="x"?parseInt(l.slice(2),16):parseInt(l.slice(1),10);return String.fromCodePoint(t)}return Ue[l]??o}):e}const ge=e=>{const o=e.indexOf(":");return o<0?e:e.slice(o+1)};function Ze(e){const o={};if(e==="")return o;ae.lastIndex=0;let l;for(;(l=ae.exec(e))!==null;)o[ge(l[1])]=W(l[2]??l[3]??"");return o}function O(e,o){de.lastIndex=0;let l;for(;(l=de.exec(e))!==null;)if(l[2]!==void 0){const t=ge(l[2]);if(l[1]==="/")o.close?.(t);else{const s=l[4]==="/";o.open?.(t,Ze(l[3]),s),s&&o.close?.(t)}}else l[5]!==void 0?o.text?.(l[5]):l[6]!==void 0&&o.text?.(W(l[6]))}const qe=9525,B=e=>Math.round(Number(e??0)/qe);function Ke(e){const o=e.join("");return o===""?void 0:o}const ce=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","ofPieChart","scatterChart","radarChart","bubbleChart","stockChart","surfaceChart","surface3DChart"]),me=new Set(["barChart","bar3DChart","lineChart","line3DChart","areaChart","area3DChart","pieChart","pie3DChart","doughnutChart","scatterChart"]);function Ye(e){const o={autoTitleDeleted:!1,groups:[],axes:[],pivot:!1,undrawn:[]},l=[];let t,s,r,i,c,p="",h=0;const g=n=>l.includes(n);return O(e,{open(n,u){if(l.push(n),ce.has(n)&&g("plotArea")){t={element:n,series:[],axIds:[]},o.groups.push(t),me.has(n)||o.undrawn.push(n);return}if(n==="pivotSource"&&(o.pivot=!0),n==="autoTitleDeleted"&&(o.autoTitleDeleted=u.val==="1"||u.val==="true"),n==="legendPos"&&(o.legend=u.val),n==="dispBlanksAs"&&(o.dispBlanksAs=u.val),n==="title"&&!g("ser")){h+=1,i=[],c=r!==void 0&&g(r.element)?"axisTitle":"title";return}if(t!==void 0&&!g("ser")&&(n==="barDir"?t.barDir=u.val:n==="grouping"?t.grouping=u.val:n==="holeSize"?t.holeSize=!0:n==="axId"?t.axIds.push(u.val):n==="showVal"&&g("dLbls")&&(t.showVal=u.val==="1"||u.val==="true")),n==="ser"&&t!==void 0){s={idx:1e9,literal:!1,dPt:0,trendline:0,errBars:0,external:!1},t.series.push(s);return}if(s!==void 0&&(n==="idx"&&!g("dPt")&&!g("dLbl")?s.idx=Number(u.val):n==="tx"?c="name":n==="val"||n==="yVal"?c="values":n==="cat"?c="categories":n==="xVal"?c="x":n==="f"?p="":n==="numLit"||n==="strLit"?s.literal=!0:n==="dPt"&&t!==void 0&&!t.element.startsWith("pie")&&t.element!=="doughnutChart"?s.dPt+=1:n==="trendline"?s.trendline+=1:n==="errBars"?s.errBars+=1:n==="smooth"?s.smooth=u.val!=="0"&&u.val!=="false":n==="srgbClr"&&g("spPr")&&g("solidFill")&&!g("dPt")&&s.color===void 0?s.color=`#${u.val.toLowerCase()}`:n==="v"&&c==="name"&&g("tx")&&!g("strRef")&&(i=[])),(n==="catAx"||n==="valAx"||n==="dateAx"||n==="serAx")&&g("plotArea")){r={element:n,id:"",gridlines:!1,deleted:!1},o.axes.push(r);return}r!==void 0&&g(r.element)&&(n==="axId"?r.id=u.val:n==="min"?r.min=Number(u.val):n==="max"?r.max=Number(u.val):n==="logBase"?r.log=!0:n==="majorGridlines"?r.gridlines=!0:n==="numFmt"&&u.formatCode!==void 0&&u.formatCode!=="General"&&u.sourceLinked!=="1"&&u.sourceLinked!=="true"?r.format=u.formatCode:n==="delete"&&(r.deleted=u.val==="1"||u.val==="true"))},text(n){g("f")?p+=n:i!==void 0&&(g("t")||g("v")&&c==="name")&&i.push(n)},close(n){if(l.pop(),n==="f"&&s!==void 0&&c!==void 0&&c!=="title"&&c!=="axisTitle"){const u=p.trim();/^\[/.test(u)||/'\[/.test(u)?s.external=!0:s[c]=u}if(n==="v"&&s!==void 0&&c==="name"&&i!==void 0&&!g("strRef")&&(s.name=i.join(""),i=void 0),(n==="tx"||n==="val"||n==="yVal"||n==="cat"||n==="xVal")&&s!==void 0&&(c=void 0),n==="title"&&h>0){h-=1;const u=Ke(i??[]);c==="axisTitle"&&r!==void 0?r.title=u:c==="title"&&(o.title=u),i=void 0,c=void 0}n==="ser"&&(s=void 0),ce.has(n)&&(t=void 0),(n==="catAx"||n==="valAx"||n==="dateAx"||n==="serAx")&&(r=void 0)}}),o}const Je={t:"top",r:"right",b:"bottom",l:"left",tr:"right"},ee=e=>e;function Qe(e,o,l,t,s){const r=`${t}: chart '${o}'`;if(e.pivot){s.push(`${r}: a pivot chart was not imported.`);return}for(const f of e.undrawn)s.push(`${r}: a ${f.replace(/Chart$/,"")} chart was not imported.`);const i=e.groups.filter(f=>me.has(f.element));if(i.length===0){e.undrawn.length===0&&s.push(`${r}: no chart that Cells draws.`);return}const c=i.filter(f=>f.element.includes("3D")),p=f=>{switch(f.element){case"barChart":case"bar3DChart":return f.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"}},h=e.axes.filter(f=>f.element==="valAx"),g=h[0],u=i.every(f=>f.element==="scatterChart")?void 0:h.find(f=>f!==g&&i.some(v=>v.axIds.includes(f.id))),x=e.axes.find(f=>f.element==="catAx"||f.element==="dateAx"||f.element==="valAx"&&i.every(v=>v.element==="scatterChart")&&f===g),y=i.length>1;let a=y?"combo":p(i[0]);if(y&&i.some(f=>f.element.startsWith("pie")||f.element==="doughnutChart"||f.element==="scatterChart")){a=p(i[0]);for(const f of i.slice(1))s.push(`${r}: a second plot (${f.element.replace(/Chart$/,"")}) beside a ${a} chart was not imported.`);i.length=1}c.length>0&&s.push(`${r}: a 3-D chart was imported as a ${a} chart.`);let d;const w=i[0];w.element==="doughnutChart"?d="doughnut":w.grouping==="stacked"?d="stacked":w.grouping==="percentStacked"?d="percent":(w.element==="lineChart"||w.element==="line3DChart")&&w.series.some(f=>f.smooth)&&(d="smooth");const b=[],k=[],$=[];for(const f of i){const v=p(f),C=u!==void 0&&f.axIds.includes(u.id);for(const m of f.series){if(m.values===void 0){k.push(m.external?"a series naming another workbook":m.literal?"a series given as literals":"a series without values");continue}m.literal&&s.push(`${r}: literal categories or names of a series were left out.`),m.dPt>0&&s.push(`${r}: ${m.dPt} per-point colour(s) were left out.`),m.trendline>0&&s.push(`${r}: ${m.trendline} trendline(s) were left out.`),m.errBars>0&&s.push(`${r}: error bars were left out.`),$.push([m.idx,{values:ee(m.values),...m.name!==void 0?{name:m.name}:{},...m.categories!==void 0?{categories:ee(m.categories)}:{},...m.x!==void 0?{x:ee(m.x)}:{},...y?{type:v==="column"||v==="bar"?"column":v==="area"?"area":"line"}:{},...C?{axis:"secondary"}:{},...m.color!==void 0?{color:m.color}:{}}])}}$.sort((f,v)=>f[0]-v[0]);for(const[,f]of $)b.push(f);for(const f of k)s.push(`${r}: ${f} was not imported.`);if(b.length===0){s.push(`${r}: no series to draw.`);return}const A=f=>{if(f===void 0)return;const v=f.element==="valAx",C={...f.title!==void 0?{title:f.title}:{},...f.min!==void 0?{min:f.min}:{},...f.max!==void 0?{max:f.max}:{},...f.format!==void 0?{format:f.format}:{},...f.log?{log:!0}:{},...v&&!f.gridlines?{gridlines:!1}:{},...!v&&f.gridlines?{gridlines:!0}:{}};return Object.keys(C).length===0?void 0:C},N=A(x),L=A(a==="scatter"?h[1]??g:g),z=A(u),X=N!==void 0||L!==void 0||z!==void 0?{...N!==void 0?{x:N}:{},...L!==void 0?{y:L}:{},...z!==void 0?{y2:z}:{}}:void 0,G=b.length>1&&b.every(f=>{const v=/\$?([A-Z]+)\$?(\d+):\$?([A-Z]+)\$?(\d+)$/.exec(f.values);return v!==null&&v[2]===v[4]&&v[1]!==v[3]});return{id:o,type:a,...d!==void 0?{variant:d}:{},anchor:l,data:{series:b,by:G?"rows":"columns",headers:{row:b.some(f=>f.name!==void 0),column:b.some(f=>f.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?Je[e.legend]??"bottom":"none",...X!==void 0?{axes:X}:{},...i.some(f=>f.showVal)?{labels:!0}:{}}}function et(e){const o=[];let l,t,s,r,i,c,p,h=!1,g,n={col:0,colOff:0,row:0,rowOff:0},u,x="";const y=()=>{if(l===void 0)return;let a;l==="twoCellAnchor"&&t!==void 0&&s!==void 0?a={kind:"cells",from:t,to:s}:l==="oneCellAnchor"&&t!==void 0&&i!==void 0?a={kind:"cell",from:t,width:Math.max(1,i.width),height:Math.max(1,i.height)}:l==="absoluteAnchor"&&r!==void 0&&i!==void 0&&(a={kind:"absolute",...r,width:Math.max(1,i.width),height:Math.max(1,i.height)}),a!==void 0&&o.push({anchor:a,chart:c,chartEx:p,picture:h}),l=void 0,t=s=r=i=c=p=void 0,h=!1};return O(e,{open(a,d){a==="twoCellAnchor"||a==="oneCellAnchor"||a==="absoluteAnchor"?l=a:a==="from"||a==="to"?(g=a,n={col:0,colOff:0,row:0,rowOff:0}):a==="col"||a==="colOff"||a==="row"||a==="rowOff"?(u=a,x=""):a==="pos"?r={x:B(d.x),y:B(d.y)}:a==="ext"&&l!==void 0&&d.cx!==void 0&&i===void 0?i={width:B(d.cx),height:B(d.cy)}:a==="chart"?(c===void 0&&(c=d.id),d.id===void 0&&(c=c??"missing")):a==="pic"&&(h=!0)},text(a){u!==void 0&&(x+=a)},close(a){if(a==="col"||a==="colOff"||a==="row"||a==="rowOff")n[a]=Number(x.trim()),u=void 0;else if(a==="from"||a==="to"){const d={row:n.row,col:n.col,dx:B(String(n.colOff)),dy:B(String(n.rowOff))};g==="from"?t=d:s=d,g=void 0}else(a==="twoCellAnchor"||a==="oneCellAnchor"||a==="absoluteAnchor")&&y()}}),o}function fe(e){const o=new Map;return e===void 0||O(e,{open(l,t){l==="Relationship"&&t.Id!==void 0&&t.Target!==void 0&&o.set(t.Id,{target:t.Target,type:t.Type??""})}}),o}function te(e,o){if(o.startsWith("/"))return o.slice(1);const l=e.split("/").slice(0,-1);for(const t of o.split("/"))t===".."?l.pop():t!=="."&&l.push(t);return l.join("/")}function tt(e,o,l,t,s){const r={},i=o.split("/").slice(0,-1).join("/"),c=o.split("/").pop(),h=fe(e(`${i}/_rels/${c}.rels`)).get(l);if(h===void 0)return s.push(`${t}: the drawing part is missing.`),r;const g=te(o,h.target),n=e(g);if(n===void 0)return s.push(`${t}: the drawing part ${g} is missing.`),r;const u=g.split("/").slice(0,-1).join("/"),x=g.split("/").pop(),y=fe(e(`${u}/_rels/${x}.rels`));let a=0;for(const d of et(n)){if(d.chart===void 0)continue;const w=y.get(d.chart);if(w===void 0){s.push(`${t}: a chart's part is missing (${d.chart}).`);continue}a+=1;const b=`chart${a}`;if(/chartEx/i.test(w.type)||/chartEx/.test(w.target)){const A=e(te(g,w.target))??"",N=/<cx:layoutId val="([^"]+)"/.exec(A)?.[1]??"unknown";s.push(`${t}: chart '${b}': an Excel 2016 chart (${N}) was not imported.`);continue}const k=e(te(g,w.target));if(k===void 0){s.push(`${t}: chart '${b}': its part ${w.target} is missing.`);continue}const $=Qe(Ye(k),b,d.anchor,t,s);$!==void 0&&(r[b]=$)}return r}const we="customXml/cells-code.xml";function nt(e){let o=0;for(const l of e)o=o*26+(l.charCodeAt(0)-64);return o-1}function Z(e){const o=/^\$?([A-Z]{1,3})\$?([0-9]+)$/.exec(e);if(o===null)throw new Error(`'${e}' is not a cell reference.`);return{row:Number(o[2])-1,col:nt(o[1])}}function st(e){const[o,l=o]=e.split(":"),t=Z(o),s=Z(l);return{top:Math.min(t.row,s.row),left:Math.min(t.col,s.col),bottom:Math.max(t.row,s.row),right:Math.max(t.col,s.col)}}function ne(e){const o=e?.rgb;if(!(o===void 0||!/^[0-9A-Fa-f]{6,8}$/.test(o)))return`#${o.slice(-6).toLowerCase()}`}const rt={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 ot(e){if(e===void 0)return[{}];const o=new Map,l=[],t=[],s=[],r=[],i=new Map;let c="",p,h,g,n,u,x;O(e,{open(a,d){switch(a){case"numFmts":case"fonts":case"fills":case"borders":case"cellXfs":case"cellStyleXfs":case"dxfs":c=a;return;case"numFmt":c==="numFmts"&&o.set(Number(d.numFmtId),d.formatCode??"General");return}if(c==="fonts")a==="font"?p={}:p!==void 0&&(a==="b"?p.bold=d.val!=="0"&&d.val!=="false":a==="i"?p.italic=d.val!=="0"&&d.val!=="false":a==="u"?p.underline=d.val!=="none":a==="strike"?p.strike=d.val!=="0"&&d.val!=="false":a==="sz"?p.size=Number(d.val):a==="color"?p.color=ne(d):a==="name"&&(p.font=d.val));else if(c==="fills")a==="fill"?h={}:a==="patternFill"&&h?h.pattern=d.patternType:a==="fgColor"&&h&&(h.color=ne(d));else if(c==="borders")a==="border"?g={}:g!==void 0&&["left","right","top","bottom"].includes(a)?n={name:a,style:d.style===void 0?void 0:rt[d.style]}:a==="color"&&n!==void 0&&n.style!==void 0&&(g[n.name]={style:n.style,color:ne(d)??"#000000"});else if(c==="cellXfs"){if(a==="xf"){const w=Number(d.numFmtId??0),b=l[Number(d.fontId??0)]??{};x=b;const k=t[Number(d.fillId??0)],$=s[Number(d.borderId??0)],A=w===0?void 0:(o.get(w)??He[w])?.replace(/^\[\$-(409|en-US)\]/,"");u={...b.bold?{bold:!0}:{},...b.italic?{italic:!0}:{},...b.underline?{underline:!0}:{},...b.strike?{strike:!0}:{},...b.color!==void 0&&b.color!=="#000000"?{color:b.color}:{},...k!==void 0?{fill:k}:{},...$!==void 0&&Object.keys($).length>0?{borders:$}:{},...A!==void 0&&A!=="General"?{format:A}:{}}}else if(a==="alignment"&&u!==void 0){const w=d.horizontal,b=d.vertical;u={...u,...w==="left"||w==="center"||w==="right"?{align:w}:{},...b==="top"?{valign:"top"}:b==="center"?{valign:"middle"}:{},...d.wrapText==="1"||d.wrapText==="true"?{wrap:!0}:{}}}}},close(a){a===c?c="":a==="font"&&p!==void 0?(l.push(p),p=void 0):a==="fill"&&h!==void 0?(t.push(h.pattern==="solid"?h.color:void 0),h=void 0):a==="border"&&g!==void 0?(s.push(g),g=void 0):["left","right","top","bottom"].includes(a)?n=void 0:a==="xf"&&u!==void 0&&c==="cellXfs"&&(r.push(u),x!==void 0&&i.set(u,x),u=void 0)}});const y=l[0]??{};return r.map((a,d)=>{if(d===0)return{};const w=i.get(a);return w===void 0?a:{...a,...w.size!==void 0&&w.size!==y.size?{size:w.size}:{},...w.font!==void 0&&w.font!==y.font?{font:w.font}:{}}})}function it(e){const o=[];if(e===void 0)return o;let l,t=!1,s=!1;return O(e,{open(r){r==="si"?l="":r==="t"?t=!s:r==="rPh"&&(s=!0)},close(r){r==="si"?(o.push(l??""),l=void 0):r==="t"?t=!1:r==="rPh"&&(s=!1)},text(r){t&&l!==void 0&&(l+=r)}}),o}const lt=e=>Math.round(e*7+5),ue=e=>Math.round(e*4/3);function dt(e,o,l){const t={},s={},r={},i=[],c=[],p=[];let h,g;const n=new Map;let u=0,x=0,y,a="n",d=0,w,b,k,$="",A,N=0,L=0;const z=(C,m,D,R,S,E,P)=>{const T={};if(E?.t==="shared"&&E.si!==void 0)if(S!==void 0&&S!=="")n.set(E.si,{formula:S,...C});else{const j=n.get(E.si);j!==void 0&&(S=Me(j.formula,C.row-j.row,C.col-j.col))}else E?.t==="array"&&l.set("array formula",(l.get("array formula")??0)+1);if(S!==void 0&&S!==""&&(T.f=S,x+=1),m==="s"&&R!==void 0?T.v=o[Number(R)]??"":m==="b"&&R!==void 0?T.v=R==="1":m==="e"&&R!==void 0?T.v=Ne(R)?{error:R}:{error:"#VALUE!"}:(m==="str"||m==="inlineStr")&&(R!==void 0||P!=="")?T.v=m==="inlineStr"?P:R??"":R!==void 0&&R!==""&&(T.v=Number(R)),D!==0&&(T.s=D),T.v!==void 0||T.f!==void 0||T.s!==void 0){const j=String(C.row);(t[j]??={cells:{}}).cells[String(C.col)]=T,u+=1}},X=C=>{const m=/<(?:\w+:)?row\s([^>]*?)\/?>/g;let D;for(;(D=m.exec(C))!==null;){const S=D[1],E=/\br="(\d+)"/.exec(S);if(E===null)continue;const P=Number(E[1])-1,T=/\bht="([^"]+)"/.exec(S);T!==null&&/\bcustomHeight="(1|true)"/.test(S)&&(s[String(P)]=ue(Number(T[1]))),/\bhidden="(1|true)"/.test(S)&&i.push(P)}const R=/<(?:\w+:)?c\s([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?c>)/g;for(;(D=R.exec(C))!==null;){const S=D[1],E=D[2]??"",P=Z(/\br="([^"]+)"/.exec(S)[1]),T=/\bt="([^"]+)"/.exec(S)?.[1]??"n",j=Number(/\bs="(\d+)"/.exec(S)?.[1]??0);let q,re,K,oe="";if(E!==""){const ie=/<(?:\w+:)?v>([\s\S]*?)<\/(?:\w+:)?v>/.exec(E);ie!==null?q=W(ie[1]):/<(?:\w+:)?v\/>/.test(E)&&(q="");const Y=/<(?:\w+:)?f\b([^>]*?)(?:\/>|>([\s\S]*?)<\/(?:\w+:)?f>)/.exec(E);if(Y!==null){K={};for(const[,J,xe]of Y[1].matchAll(/(\w+)="([^"]*)"/g))K[J]=xe;re=W(Y[2]??"")}if(T==="inlineStr")for(const[,J]of E.matchAll(/<(?:\w+:)?t(?:\s[^>]*)?>([\s\S]*?)<\/(?:\w+:)?t>/g))oe+=W(J)}z(P,T,j,q,re,K,oe)}};let G=e;const f=/<(?:\w+:)?sheetData\b[^>]*>/.exec(e),v=f===null?-1:e.search(/<\/(?:\w+:)?sheetData>/);return f!==null&&v>f.index&&!/<(?:\w+:)?c(?=[\s>/])(?![^>]*\sr=)/.test(e)&&(X(e.slice(f.index+f[0].length,v)),G=e.slice(0,f.index)+e.slice(v)),O(G,{open(C,m){switch(C){case"row":{const D=m.r===void 0?N:Number(m.r)-1;N=D+1,L=0,m.ht!==void 0&&(m.customHeight==="1"||m.customHeight==="true")&&(s[String(D)]=ue(Number(m.ht))),(m.hidden==="1"||m.hidden==="true")&&i.push(D);return}case"c":{y=m.r===void 0?{row:N-1,col:L}:Z(m.r),L=y.col+1,a=m.t??"n",d=Number(m.s??0),w=void 0,b=void 0,k=void 0,$="";return}case"v":A="v",w="";return;case"f":A="f",b="",k=m;return;case"is":A="is";return;case"col":{const D=Number(m.min)-1,R=Math.min(Number(m.max)-1,16383);for(let S=D;S<=R;S+=1)m.width!==void 0&&(m.customWidth==="1"||m.customWidth==="true")&&(r[String(S)]=lt(Number(m.width))),(m.hidden==="1"||m.hidden==="true")&&c.push(S);return}case"mergeCell":m.ref!==void 0&&p.push(st(m.ref));return;case"pane":(m.state==="frozen"||m.state==="frozenSplit")&&(h={rows:Number(m.ySplit??0),cols:Number(m.xSplit??0)});return;case"drawing":g=m.id;return;case"conditionalFormatting":case"dataValidation":case"hyperlink":case"legacyDrawing":case"tablePart":case"sheetProtection":case"autoFilter":l.set(C,(l.get(C)??0)+1);return}},text(C){A==="v"?w+=C:A==="f"?b+=C:A==="is"&&($+=C)},close(C){if(C==="v"||C==="f"||C==="is"){A=void 0;return}C!=="c"||y===void 0||(z(y,a,d,w,b,k,$),y=void 0)}}),{sheet:{rows:t,...Object.keys(s).length+Object.keys(r).length>0?{sizes:{rows:s,cols:r}}:{},...i.length+c.length>0?{hidden:{rows:i,cols:c}}:{},...p.length>0?{merges:p}:{},...h!==void 0?{frozen:h}:{}},cells:u,formulas:x,...g!==void 0?{drawing:g}:{}}}function at(e){return e.startsWith("/")?e.slice(1):`xl/${e}`.replace(/\/[^/]+\/\.\.\//g,"/")}function ct(e){let o;try{o=Ge(e)}catch(d){throw new Error(`The file is not an XLSX package: ${d.message}`)}const l=d=>o[d]===void 0?void 0:Ve(o[d]),t=l("xl/workbook.xml");if(t===void 0)throw new Error("The package has no xl/workbook.xml.");const s=new Map;O(l("xl/_rels/workbook.xml.rels")??"",{open(d,w){d==="Relationship"&&w.Id!==void 0&&w.Target!==void 0&&s.set(w.Id,at(w.Target))}});const r=[],i=new Map;O(t,{open(d,w){if(d==="sheet"){const b=s.get(w.id);if(b===void 0)throw new Error(`The sheet '${w.name}' has no part.`);r.push({name:w.name,path:b,hidden:w.state==="hidden"||w.state==="veryHidden"})}else d==="definedName"&&i.set("defined name",(i.get("defined name")??0)+1)}});const c=it(l("xl/sharedStrings.xml")),p=ot(l("xl/styles.xml"));let h=0,g=0,n=0;const u=[],x=new Set,y=r.map((d,w)=>{const b=l(d.path);if(b===void 0)throw new Error(`The sheet '${d.name}' has no ${d.path}.`);d.hidden&&i.set("hidden sheet (shown)",(i.get("hidden sheet (shown)")??0)+1);const k=dt(b,c,i);h+=k.cells,g+=k.formulas;let $=`s${w+1}`;for(;x.has($);)$+="_";x.add($);const A=k.drawing===void 0?{}:tt(l,d.path,k.drawing,d.name,u);return n+=Object.keys(A).length,{id:$,name:d.name,...k.sheet,...Object.keys(A).length>0?{charts:A}:{}}}),a=ft(l(we),y);for(const d of Object.keys(o))/^xl\/chartsheets\/sheet\d+\.xml$/.test(d)?u.push(`${d}: a chart sheet was not imported.`):d.startsWith("xl/media/")?i.set("image",(i.get("image")??0)+1):/^xl\/comments\d*\.xml$/.test(d)||d.startsWith("xl/threadedComments/")?i.set("comments",(i.get("comments")??0)+1):d.startsWith("xl/pivotTables/")&&i.set("pivot table",(i.get("pivot table")??0)+1);for(const d of y)for(const w of Object.values(d.rows))for(const b of Object.values(w.cells))b.s!==void 0&&b.s>=p.length&&delete b.s;return{workbook:{version:1,sheets:y,styles:p.length>0?p:[{}]},report:{sheets:y.length,cells:h,formulas:g,skipped:[...i].map(([d,w])=>({feature:d,count:w})),chartsImported:n,charts:u,code:a}}}function ft(e,o){if(e===void 0)return[];const l=new Map(o.map(p=>[p.name,p])),t=new Map;let s=0,r,i="",c=!1;O(e,{open(p,h){if(p==="cell"){const g=l.get(h.sheet??"");r=g===void 0?void 0:{sheet:g,ref:h.ref??"",attrs:h},i=""}else p==="source"&&(c=!0)},text(p){c&&(i+=p)},close(p){if(p==="source"&&(c=!1),p!=="cell"||r===void 0)return;const{sheet:h,ref:g,attrs:n}=r,u=/^([A-Z]{1,3})([1-9][0-9]*)$/.exec(g);if(u===null)return;let x=-1;for(const w of u[1])x=(x+1)*26+w.charCodeAt(0)-65;const y=h.rows[String(Number(u[2])-1)]?.cells[String(x)]?.v,a={source:i,language:"python",outputs:[],result:y===void 0?null:y,run:n.run==="auto"?"auto":"manual",...n.executionCount!==void 0?{executionCount:Number(n.executionCount)}:{},...n.lastRun!==void 0?{lastRun:n.lastRun}:{},...n.frame==="none"?{frame:null}:n.frameWidth!==void 0&&n.frameHeight!==void 0?{frame:{width:Number(n.frameWidth),height:Number(n.frameHeight),...n.frameDx!==void 0?{dx:Number(n.frameDx)}:{},...n.frameDy!==void 0?{dy:Number(n.frameDy)}:{}}}:{}};if(Ee(a)!==void 0)return;let d=t.get(h);d===void 0&&t.set(h,d={}),d[g]=a,s+=1,r=void 0}});for(const[p,h]of t)p.code=h;return s===0?[]:[`${s} code cell${s===1?"":"s"} read from ${we}: the sources and the results, as cached values; the outputs are not in XLSX and were dropped.`]}const M={readRange:"cells.agent.readRange",writeRange:"cells.agent.writeRange",insertChart:"cells.agent.insertChart",listCharts:"cells.agent.listCharts",selectRange:"cells.agent.selectRange"},ut=2e3,H={type:"string",description:"A range in A1 notation on the sheet shown, such as `A1:D13`, or one cell such as `B3`."},he=Ae({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:M.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:H}}},{name:"cells_write_range",command:M.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:{...H,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:M.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:{...H,description:"The data to chart, headers included, such as `A1:D13`."},type:{type:"string",enum:[...se],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:M.listCharts,description:"The charts of the sheet shown: id, type, title and the ranges each reads."},{name:"cells_select_range",command:M.selectRange,description:"Select a range of the spreadsheet shown, to show the person the cells meant.",parameters:{type:"object",properties:{range:H},required:["range"]}}]}),_=(e,o)=>{if(typeof e!="string"||e.trim()==="")throw new Error(`${o} is a non-empty string.`);return e},pe=e=>{if(!e.ok)throw new Error(e.refusals.map(o=>o.message).join(" "))};function ht(e,o){const l=e.sheet(o).cells;let t=-1,s=-1;for(const r of l.columnIndexes()){const i=l.lastRowIn(r);i<0||(t=Math.max(t,r),s=Math.max(s,i))}return t<0?null:{top:0,left:0,bottom:s,right:t}}const pt=e=>e!==null&&typeof e=="object"?`#${e.error.replace(/^#/,"")}`:e,gt=e=>{if(e==null)return null;if(typeof e=="number"||typeof e=="boolean")return e;if(typeof e=="string")return e.startsWith("=")?_e(e):e;throw new Error(`A cell is a number, a string, a boolean or null, not ${JSON.stringify(e)}.`)};function be(e={}){const o=t=>e.model?.()??Ie(t,void 0).model,l=(t,s,r)=>({id:t,name:s,category:"Cells",execute:i=>r(o(t),i??{})});return ye({name:e.name??mt,displayName:"Cells agent tools",description:"Read, write, chart and select the grid on screen, as tools an agent calls.",octicon:"table",commands:[l(M.readRange,"Read a range",(t,s)=>{const r=t.selection.sheet,i=s.range===void 0?ht(t,r):V(_(s.range,"The range"));if(i===null)return{sheet:t.sheet(r).name,range:null,values:[]};const c=i.right-i.left+1,p=Math.max(1,Math.min(i.bottom-i.top+1,Math.floor(ut/c))),h={...i,bottom:i.top+p-1};return{sheet:t.sheet(r).name,range:F(h),values:t.toRows(h,r).map(g=>g.map(pt)),...h.bottom<i.bottom?{truncated:!0,fullRange:F(i)}:{}}}),l(M.writeRange,"Write values into a range",(t,s)=>{const r=V(_(s.range,"The range"));if(!Array.isArray(s.values)||s.values.length===0||!s.values.every(Array.isArray))throw new Error("The values are a non-empty array of rows, each an array of cells.");const i=t.selection.sheet,c=s.values.map(h=>h.map(gt));pe(t.dispatch({type:"SET_CELLS",sheet:i,at:{row:r.top,col:r.left},cells:c}));const p=Math.max(...c.map(h=>h.length));return{ok:!0,sheet:t.sheet(i).name,range:F({top:r.top,left:r.left,bottom:r.top+c.length-1,right:r.left+Math.max(0,p-1)})}}),l(M.insertChart,"Insert a chart of a range",(t,s)=>{const r=V(_(s.range,"The range")),i=s.type===void 0?"column":_(s.type,"The type");if(!se.includes(i))throw new Error(`'${i}' is not a chart type; there are ${se.join(", ")}.`);const c=t.selection.sheet,p=Oe((x,y)=>t.value(c,x,y),t.sheet(c).name,r,(x,y)=>/[dmy]/i.test(t.style(c,x,y).format??""));if(!p.ok)throw new Error(p.message);let h=je(t,r);if(s.at!==void 0&&h.kind==="cells"){const x=Le(_(s.at,"Where the chart goes")),y=h.to.row-h.from.row,a=h.to.col-h.from.col;h={kind:"cells",from:{row:x.row,col:x.col,dx:0,dy:0},to:{row:x.row+y,col:x.col+a,dx:0,dy:0}}}const g=new Set(t.sheet(c).charts.keys()),n=s.title===void 0?void 0:_(s.title,"The title");pe(t.dispatch({type:"INSERT_CHART",sheet:c,chart:{type:i,anchor:h,data:p.data,legend:"bottom",...n?{title:n}:{}}}));const u=[...t.sheet(c).charts.keys()].find(x=>!g.has(x));return u!==void 0&&t.selectChart(u),{ok:!0,chartId:u,sheet:t.sheet(c).name,range:F(r),type:i}}),l(M.listCharts,"List the charts",t=>{const s=t.selection.sheet;return{sheet:t.sheet(s).name,charts:[...t.sheet(s).charts.values()].map(r=>({id:r.id,type:r.type,...r.title?{title:r.title}:{},ranges:Pe(r)}))}}),l(M.selectRange,"Select a range",(t,s)=>{const r=V(_(s.range,"The range")),i=t.selection.sheet,c={row:r.top,col:r.left};return t.select({sheet:i,zones:[r],anchor:c,active:c}),{ok:!0,sheet:t.sheet(i).name,range:F(r)}})],contributes:[Ce(ve,he,{id:he.id})]})}const mt="@datalayer/cells-agent-tools";be();function wt(){}const bt=40;function xt(e,o=160,l=560){const[t,s]=U.useState(o);return U.useEffect(()=>{if(!e)return;const r=()=>{const i=e.sheet(e.selection.sheet);let c=i.rows.offsetOf(De(e,i.id).bottom+1);for(const p of i.charts.values()){const h=ze(i,p);c=Math.max(c,h.y+h.height)}s(Math.min(l,Math.max(o,Math.ceil(c)+bt)))};return r(),e.subscribe(r)},[e,o,l]),t}be({model:wt,name:"@datalayer/loop-plugin-agent-outputs-sheet-tools"});async function yt(e){const o=await Te(e),{workbook:l}=ct(o);return{model:Be({data:l,readOnly:!0,codeCells:!1,plugins:[Re]}),bytes:o}}function Tt({data:e,name:o,maxHeight:l}){const[t,s]=U.useState({model:null,bytes:null,error:""});U.useEffect(()=>{let c=!1;return yt(e).then(({model:p,bytes:h})=>!c&&s({model:p,bytes:h,error:""}),p=>!c&&s({model:null,bytes:null,error:p instanceof Error?p.message:String(p)})),()=>{c=!0}},[e]);const r=xt(t.model,160,l);if(t.error)return I.jsxs(le,{sx:{color:"danger.fg",fontSize:0},children:["Could not read the spreadsheet: ",t.error]});if(!t.model)return I.jsx(le,{as:"p",sx:{color:"fg.muted",fontSize:0,m:0},children:"Reading the spreadsheet…"});const i=t.model.sheets.length>1;return I.jsxs(Fe,{model:t.model,children:[I.jsxs(Q,{"data-spreadsheet-preview-sheets":t.model.sheets.length,border:"1px solid",borderColor:"border.muted",borderRadius:2,overflow:"hidden",children:[I.jsx(Q,{height:r,children:I.jsx(We,{model:t.model,"aria-label":`${o}, read-only`})}),i?I.jsx(Xe,{"aria-label":`The sheets of ${o}`}):null]}),I.jsx(Q,{mt:1,children:I.jsxs(Se,{size:"small",variant:"invisible",leadingVisual:$e,onClick:()=>t.bytes&&ke(t.bytes,o),children:["Download ",o]})})]})}export{Tt as SpreadsheetPreviewView,Tt as default,yt as readOnlyWorkbook};
@@ -1 +1 @@
1
- import{j as o,dH as M,dI as p,bA as T,r as u,dJ as P,dK as $,dL as H,dM as U,I as F,v as K,B as w}from"../datalayer-app-main.js";import{C as N}from"./index-CET7bv5d.js";import{S as z,I as W,B as O}from"./StrikethroughIcon-CbiEuPT-.js";import{U as _,N as J,R as V,a as Y}from"./UnlockIcon-CUoRerV_.js";import{S as q}from"./SortAscIcon-CmH04s3F.js";import{S as G}from"./SortDescIcon-Qif6E10I.js";import{B as Q,c as X,f as Z,e as ee}from"./model-jLDiOPpQ.js";import{e as ne,u as E,f as oe,g as se,b as ae,h as te,C as re,S as le,a as ie}from"./SheetTabs-sx_-jWyq.js";import{F as ce}from"./FormulaBar-f9U7lupQ.js";function de(s){const e=ne(s.reactor).all();return e.length>0?e.map(t=>({id:t.value.id,label:t.value.label})):Q.map(t=>({id:t,label:t[0].toUpperCase()+t.slice(1)}))}function ue(s){const e=E(),t=de(e);return o.jsx(M,{children:o.jsxs(p,{children:[o.jsx(p.Button,{size:"small",variant:"invisible","data-cells-chart-picker":"",children:"Insert chart"}),o.jsx(p.Overlay,{width:"small",children:o.jsx(T,{children:t.map(i=>o.jsx(T.Item,{"data-chart-type":i.id,onSelect:()=>{e.reactor.executeCommand("cells.chart.insert",{model:e,chartType:i.id}).catch(c=>s.onError?.(c.message))},children:i.label},i.id))})})]})})}const me={bold:O,italic:W,strikethrough:z,undo:Y,redo:V,"sort-asc":q,"sort-desc":G,number:J,calendar:U,table:H,lock:$,unlock:_},he={"cells.bold":"bold","cells.italic":"italic","cells.underline":"underline","cells.strikethrough":"strike"};function pe(s){const e=E(),t=oe(Z),i=se(),c=ae(),B=`${X(c.active.col)}${c.active.row+1}`,{style:A}=te(`'${e.sheet(c.sheet).name.replace(/'/g,"''")}'!${B}`),[m,b]=u.useState(0),x=u.useRef([]),g=new Map(i.map(n=>[n.id,n])),I=t.filter(n=>g.has(n.value.command)),d=[];for(const n of I){const a=d[d.length-1];a!==void 0&&a[0].value.group===n.value.group?a.push(n):d.push([n])}const R=u.useCallback(n=>{e.reactor.executeCommand(n,{model:e}).catch(a=>s.onError?.(a.message))},[e,s]),D=n=>{const a=I.length;if(a===0)return;const l=n.key==="ArrowRight"?(m+1)%a:n.key==="ArrowLeft"?(m+a-1)%a:n.key==="Home"?0:n.key==="End"?a-1:void 0;l!==void 0&&(n.preventDefault(),b(l),x.current[l]?.focus())};let v=-1;return o.jsxs("div",{role:"toolbar","aria-label":s["aria-label"]??"Spreadsheet toolbar",onKeyDown:D,"data-cells-toolbar":"",style:{display:"flex",alignItems:"center",gap:4,flexWrap:"wrap",padding:4},children:[d.map((n,a)=>o.jsx("div",{role:"group","aria-label":n[0].value.group,style:{display:"flex",gap:2,paddingInlineEnd:4,borderInlineEnd:a<d.length-1?"1px solid var(--borderColor-muted, #d0d7de)":void 0},children:n.map(l=>{v+=1;const h=v,r=g.get(l.value.command),y=typeof r.keybinding=="string"?r.keybinding:void 0,k=y?`${r.name} (${P(y)})`:r.name,C=typeof r.octicon=="string"?me[r.octicon]:void 0,j=he[r.id],S={ref:L=>{x.current[h]=L},tabIndex:h===m?0:-1,onFocus:()=>b(h),onClick:()=>R(r.id),"aria-pressed":j===void 0?void 0:A[j]===!0,"data-command":r.id};return C!==void 0?o.jsx(F,{...S,icon:C,"aria-label":k,size:"small",variant:"invisible"},l.id):o.jsx(K,{...S,"aria-label":k,size:"small",variant:"invisible",children:r.name},l.id)})},a)),s.charts!==!1&&o.jsx("div",{role:"group","aria-label":"charts","data-cells-toolbar-group":"charts",children:o.jsx(ue,{onError:s.onError})})]})}const f=new Map;function fe(s){let e=f.get(s);return e||(e=ee({plugins:[N]}),f.set(s,e)),e}function Se(){f.clear()}function Te({workspace:s}){const e=s.surfaceId,t=u.useMemo(()=>fe(e),[e]);return o.jsx(re,{model:t,children:o.jsxs(w,{"data-spreadsheet-editor":e,height:"100%",minHeight:0,display:"flex",flexDirection:"column",children:[o.jsx(pe,{}),o.jsx(ce,{}),o.jsx(w,{flex:1,minHeight:0,position:"relative",children:o.jsx(le,{model:t,"aria-label":"Spreadsheet"})}),o.jsx(ie,{})]})})}export{Te as default,Se as resetSpreadsheetWorkbooks,fe as spreadsheetWorkbook};
1
+ import{j as o,dH as M,dI as p,bA as T,r as u,dJ as P,dK as $,dL as H,dM as U,I as F,v as K,B as w}from"../datalayer-app-main.js";import{C as N}from"./index-qZXZK5qd.js";import{S as z,I as W,B as O}from"./StrikethroughIcon-CbiEuPT-.js";import{U as _,N as J,R as V,a as Y}from"./UnlockIcon-CUoRerV_.js";import{S as q}from"./SortAscIcon-CmH04s3F.js";import{S as G}from"./SortDescIcon-Qif6E10I.js";import{B as Q,c as X,f as Z,e as ee}from"./model-DUnnBi6P.js";import{e as ne,u as E,f as oe,g as se,b as ae,h as te,C as re,S as le,a as ie}from"./SheetTabs-BZP7_RGB.js";import{F as ce}from"./FormulaBar-BUs-n7Zc.js";function de(s){const e=ne(s.reactor).all();return e.length>0?e.map(t=>({id:t.value.id,label:t.value.label})):Q.map(t=>({id:t,label:t[0].toUpperCase()+t.slice(1)}))}function ue(s){const e=E(),t=de(e);return o.jsx(M,{children:o.jsxs(p,{children:[o.jsx(p.Button,{size:"small",variant:"invisible","data-cells-chart-picker":"",children:"Insert chart"}),o.jsx(p.Overlay,{width:"small",children:o.jsx(T,{children:t.map(i=>o.jsx(T.Item,{"data-chart-type":i.id,onSelect:()=>{e.reactor.executeCommand("cells.chart.insert",{model:e,chartType:i.id}).catch(c=>s.onError?.(c.message))},children:i.label},i.id))})})]})})}const me={bold:O,italic:W,strikethrough:z,undo:Y,redo:V,"sort-asc":q,"sort-desc":G,number:J,calendar:U,table:H,lock:$,unlock:_},he={"cells.bold":"bold","cells.italic":"italic","cells.underline":"underline","cells.strikethrough":"strike"};function pe(s){const e=E(),t=oe(Z),i=se(),c=ae(),B=`${X(c.active.col)}${c.active.row+1}`,{style:A}=te(`'${e.sheet(c.sheet).name.replace(/'/g,"''")}'!${B}`),[m,b]=u.useState(0),x=u.useRef([]),g=new Map(i.map(n=>[n.id,n])),I=t.filter(n=>g.has(n.value.command)),d=[];for(const n of I){const a=d[d.length-1];a!==void 0&&a[0].value.group===n.value.group?a.push(n):d.push([n])}const R=u.useCallback(n=>{e.reactor.executeCommand(n,{model:e}).catch(a=>s.onError?.(a.message))},[e,s]),D=n=>{const a=I.length;if(a===0)return;const l=n.key==="ArrowRight"?(m+1)%a:n.key==="ArrowLeft"?(m+a-1)%a:n.key==="Home"?0:n.key==="End"?a-1:void 0;l!==void 0&&(n.preventDefault(),b(l),x.current[l]?.focus())};let v=-1;return o.jsxs("div",{role:"toolbar","aria-label":s["aria-label"]??"Spreadsheet toolbar",onKeyDown:D,"data-cells-toolbar":"",style:{display:"flex",alignItems:"center",gap:4,flexWrap:"wrap",padding:4},children:[d.map((n,a)=>o.jsx("div",{role:"group","aria-label":n[0].value.group,style:{display:"flex",gap:2,paddingInlineEnd:4,borderInlineEnd:a<d.length-1?"1px solid var(--borderColor-muted, #d0d7de)":void 0},children:n.map(l=>{v+=1;const h=v,r=g.get(l.value.command),y=typeof r.keybinding=="string"?r.keybinding:void 0,k=y?`${r.name} (${P(y)})`:r.name,C=typeof r.octicon=="string"?me[r.octicon]:void 0,j=he[r.id],S={ref:L=>{x.current[h]=L},tabIndex:h===m?0:-1,onFocus:()=>b(h),onClick:()=>R(r.id),"aria-pressed":j===void 0?void 0:A[j]===!0,"data-command":r.id};return C!==void 0?o.jsx(F,{...S,icon:C,"aria-label":k,size:"small",variant:"invisible"},l.id):o.jsx(K,{...S,"aria-label":k,size:"small",variant:"invisible",children:r.name},l.id)})},a)),s.charts!==!1&&o.jsx("div",{role:"group","aria-label":"charts","data-cells-toolbar-group":"charts",children:o.jsx(ue,{onError:s.onError})})]})}const f=new Map;function fe(s){let e=f.get(s);return e||(e=ee({plugins:[N]}),f.set(s,e)),e}function Se(){f.clear()}function Te({workspace:s}){const e=s.surfaceId,t=u.useMemo(()=>fe(e),[e]);return o.jsx(re,{model:t,children:o.jsxs(w,{"data-spreadsheet-editor":e,height:"100%",minHeight:0,display:"flex",flexDirection:"column",children:[o.jsx(pe,{}),o.jsx(ce,{}),o.jsx(w,{flex:1,minHeight:0,position:"relative",children:o.jsx(le,{model:t,"aria-label":"Spreadsheet"})}),o.jsx(ie,{})]})})}export{Te as default,Se as resetSpreadsheetWorkbooks,fe as spreadsheetWorkbook};
@@ -1 +1 @@
1
- import{r as o,aK as g,j as n,B as p,T as u,aL as c}from"../datalayer-app-main.js";import{W as f,K as x}from"./renderer-NdtLW87o.js";import{W as d,L as w,R as h}from"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";const l=new WeakMap;function M(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 L({connection:r,modelId:e}){const[t,a]=o.useState();return o.useEffect(()=>{const s=M(r),i=new f({mimeType:d,sanitizer:{sanitize:m=>m},resolver:null,linkHandler:null,latexTypesetter:null},s);return i.renderModel(new g({data:{[d]:{model_id:e,version_major:2,version_minor:0}}})),a(i),()=>i.dispose()},[r,e]),n.jsx(p,{"data-kernel-variable-widget":e,sx:{minHeight:32},children:t?n.jsx(w,{id:`kernel-variable-widget-${e}`,height:"auto",children:t}):n.jsx(u,{sx:{fontSize:1,color:"fg.muted"},children:"Loading the widget…"})})}export{L as WidgetVariableView,L as default};
1
+ import{r as o,aK as g,j as n,B as p,T as u,aL as c}from"../datalayer-app-main.js";import{W as f,K as x}from"./renderer-DTpEU9RO.js";import{W as d,L as w,R as h}from"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";const l=new WeakMap;function M(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 L({connection:r,modelId:e}){const[t,a]=o.useState();return o.useEffect(()=>{const s=M(r),i=new f({mimeType:d,sanitizer:{sanitize:m=>m},resolver:null,linkHandler:null,latexTypesetter:null},s);return i.renderModel(new g({data:{[d]:{model_id:e,version_major:2,version_minor:0}}})),a(i),()=>i.dispose()},[r,e]),n.jsx(p,{"data-kernel-variable-widget":e,sx:{minHeight:32},children:t?n.jsx(w,{id:`kernel-variable-widget-${e}`,height:"auto",children:t}):n.jsx(u,{sx:{fontSize:1,color:"fg.muted"},children:"Loading the widget…"})})}export{L as WidgetVariableView,L as default};
@@ -1 +1 @@
1
- import{an as o,r as t}from"../datalayer-app-main.js";import{h as e,i}from"./JupyterLexicalExtension-DpGAnn7v.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./url-4_0MnaFQ.js";import"./isObject-CeOzAI2h.js";import"./toNumber-DUdf79Nr.js";import"./isSymbol-DfwdEMHq.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./TypographyIcon-CCkcdj7U.js";import"./ArrowUpIcon-y5enrVH9.js";import"./floating-ui.react-dom-Bcd0th1j.js";import"./SortDescIcon-Qif6E10I.js";import"./VideoIcon-BTOb9gRv.js";import"./PrismCss-C5fDCsu9.js";import"./Output-DLpf2Of9.js";import"./index-h8lXpqtD.js";import"./hoverbox-CStlKQWE.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-BqxU1w4N.js";const P=()=>{const[r]=o();return t.useEffect(()=>i(r),[r]),null};export{e as INSERT_YOUTUBE_COMMAND,P as YouTubePlugin,P as default};
1
+ import{an as o,r as t}from"../datalayer-app-main.js";import{h as e,i}from"./JupyterLexicalExtension-Be8mweC6.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./url-4_0MnaFQ.js";import"./isObject-CeOzAI2h.js";import"./toNumber-DUdf79Nr.js";import"./isSymbol-DfwdEMHq.js";import"./StrikethroughIcon-CbiEuPT-.js";import"./TypographyIcon-CCkcdj7U.js";import"./ArrowUpIcon-y5enrVH9.js";import"./floating-ui.react-dom-Bcd0th1j.js";import"./SortDescIcon-Qif6E10I.js";import"./VideoIcon-BTOb9gRv.js";import"./PrismCss-C5fDCsu9.js";import"./Output-WQnm0VN5.js";import"./index-npitmnIA.js";import"./hoverbox-CStlKQWE.js";import"./index-DE0JwlLw.js";import"./index-Dqc2hT2k.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./LexicalToolRegistry-DI_iHg04.js";const P=()=>{const[r]=o();return t.useEffect(()=>i(r),[r]),null};export{e as INSERT_YOUTUBE_COMMAND,P as YouTubePlugin,P as default};
@@ -1 +1 @@
1
- import{g as l,r as u,d as a}from"./chunk-SVP7TREG-3X_ReA6d.js";import{p as f}from"./chunk-JWPE2WC7-CVacxpin.js";import{_ as n,l as s}from"./index-C-4crJTg.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-wHoWF_7d.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-DP8eIWg7.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./isUndefined-QeaoSmDB.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,p=o?parseInt(o,10):1/0;return{min:m,max:p}}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}},M={parser:R,db:a,renderer:u,styles:l};export{M as diagram};
1
+ import{g as l,r as u,d as a}from"./chunk-SVP7TREG-B5krxfJG.js";import{p as f}from"./chunk-JWPE2WC7-xLeWlifS.js";import{_ as n,l as s}from"./index-dBBA442C.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-wHoWF_7d.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-DP8eIWg7.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./isUndefined-QeaoSmDB.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,p=o?parseInt(o,10):1/0;return{min:m,max:p}}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}},M={parser:R,db:a,renderer:u,styles:l};export{M as diagram};
@@ -1 +1 @@
1
- import{g as l,r as u,d as a}from"./chunk-SVP7TREG-COLBrDOd.js";import{p as f}from"./chunk-JWPE2WC7-M6oulZhu.js";import{_ as n,l as s}from"./index-BzdaTJ02.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BBLugbYz.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-wHoWF_7d.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-DP8eIWg7.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./isUndefined-QeaoSmDB.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,p=o?parseInt(o,10):1/0;return{min:m,max:p}}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}},M={parser:R,db:a,renderer:u,styles:l};export{M as diagram};
1
+ import{g as l,r as u,d as a}from"./chunk-SVP7TREG-gPNw7vXg.js";import{p as f}from"./chunk-JWPE2WC7-R5kOKFCi.js";import{_ as n,l as s}from"./index-BEkzae0W.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BBLugbYz.js";import"./index-CJys1M3A.js";import"../datalayer-app-main.js";import"./index-wHoWF_7d.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-DP8eIWg7.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./isUndefined-QeaoSmDB.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,p=o?parseInt(o,10):1/0;return{min:m,max:p}}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}},M={parser:R,db:a,renderer:u,styles:l};export{M as diagram};
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-SVP7TREG-Cit7UeF2.js";import{p as f}from"./chunk-JWPE2WC7-BwLKeh91.js";import{_ as n,l as s}from"./mermaid.core-BiF8MSuv.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./index-wHoWF_7d.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-DP8eIWg7.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./isUndefined-QeaoSmDB.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-BIf35xVD.js";import{p as f}from"./chunk-JWPE2WC7-B9R3G9XV.js";import{_ as n,l as s}from"./mermaid.core-Do9KSWkx.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./index-wHoWF_7d.js";import"./dayjs.min-u3zuoSR8.js";import"./fastdom-promised-DP8eIWg7.js";import"./_baseRest-CxHO6LCs.js";import"./isObject-CeOzAI2h.js";import"./forEach-Bvicu226.js";import"./isSymbol-DfwdEMHq.js";import"./isUndefined-QeaoSmDB.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-DhE6_GLO.js";import"../datalayer-app-main.js";import"./floating-ui.react-dom-Bcd0th1j.js";import"./extends-CF3RwP-h.js";import"./index-CavxlEgY.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:"اضغط للتفاعل"},a={clearReset:"هذا سيُزيل كامل اللوحة. هل أنت متأكد؟",couldNotCreateShareableLink:"تعذر إنشاء رابطة المشاركة.",couldNotCreateShareableLinkTooBig:"تعذر إنشاء رابط قابل للمشاركة: المشهد كبير جدًا",couldNotLoadInvalidFile:"تعذر التحميل، الملف غير صالح",importBackendFailed:"فشل الاستيراد من الخادوم.",cannotExportEmptyCanvas:"لا يمكن تصدير لوحة فارغة.",couldNotCopyToClipboard:"تعذر النسخ إلى الحافظة.",decryptFailed:"تعذر فك تشفير البيانات.",uploadedSecurly:"تم تأمين التحميل بتشفير النهاية إلى النهاية، مما يعني أن خادوم Excalidraw والأطراف الثالثة لا يمكنها قراءة المحتوى.",loadSceneOverridePrompt:"تحميل الرسم الخارجي سيحل محل المحتوى الموجود لديك. هل ترغب في المتابعة؟",collabStopOverridePrompt:`إيقاف الجلسة سيؤدي إلى الكتابة فوق رسومك السابقة المخزنة داخليا. هل أنت متأكد؟
1
+ import"./percentages-BXMCSKIN-MAjQwr8F.js";import"../datalayer-app-main.js";import"./floating-ui.react-dom-Bcd0th1j.js";import"./extends-CF3RwP-h.js";import"./index-CavxlEgY.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:"اضغط للتفاعل"},a={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
  لن يتم حفظ التغييرات التي قمت بها!`},r={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:""},o={selection:"تحديد",image:"إدراج صورة",rectangle:"مستطيل",diamond:"مضلع",ellipse:"دائرة",arrow:"سهم",line:"خط",freedraw:"رسم",text:"نص",library:"مكتبة",lock:"الحفاظ على أداة التحديد نشطة بعد الرسم",penMode:"وضع القلم - امنع اللمس",link:"إضافة/تحديث الرابط للشكل المحدد",eraser:"ممحاة",frame:"أداة الإطار",magicframe:"",embeddable:"تضمين ويب",laser:"مؤشر ليزر",hand:"يد (أداة الإزاحة)",extraTools:"المزيد من أﻷدوات",mermaidToExcalidraw:"",magicSettings:""},t={canvasActions:"إجراءات اللوحة",selectedShapeActions:"إجراءات الشكل المحدد",shapes:"الأشكال"},i={canvasPanning:"لتحريك القماش، اضغط على عجلة الفأرة أو مفتاح المسافة أثناء السحب، أو استخدم أداة اليد",linearElement:"انقر لبدء نقاط متعددة، اسحب لخط واحد",freeDraw:"انقر واسحب، افرج عند الانتهاء",text:"نصيحة: يمكنك أيضًا إضافة نص بالنقر المزدوج في أي مكان بأداة الاختيار",embeddable:"اضغط مع السحب لإنشاء موقع ويب مضمّن",text_selected:"انقر نقراً مزدوجاً أو اضغط ادخال لتعديل النص",text_editing:"اضغط على Esc أو (Ctrl أو Cmd) + Enter لإنهاء التعديل",linearElementMulti:"انقر فوق النقطة الأخيرة أو اضغط على Esc أو Enter للإنهاء",lockAngle:"يمكنك تقييد الزاوية بالضغط على SHIFT",resize:`يمكنك تقييد النسب بالضغط على SHIFT أثناء تغيير الحجم،