@datalayer/agent-runtimes 1.5.20 → 1.5.21
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.
- package/dist-embed/chunks/{AgentDetails-DZyyuD5F.js → AgentDetails-C7tCazwB.js} +1 -1
- package/dist-embed/chunks/{AgentDetailsDialog-DaQyQxlm.js → AgentDetailsDialog-Cwps4GeH.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-CBNiiRtv.js → AgentInspector-Gk7jbg8t.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-BxMOAc7K.js → AgentInspectorDialog-BSSDOFrT.js} +1 -1
- package/dist-embed/chunks/{CellSidebarExtension-Dwe7PfXi.js → CellSidebarExtension-p2BAkwis.js} +9 -9
- package/dist-embed/chunks/ChatView-fHb_i4kH.js +32 -0
- package/dist-embed/chunks/{ContextPie-n1y886z-.js → ContextPie-bd_YOjzP.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-BSeEBNHt.js → DeckComponent-4gxuEH4A.js} +2 -2
- package/dist-embed/chunks/{DocumentView-OIdQEk_n.js → DocumentView-BZSYqTh_.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-C-uLD1W7.js → EphemeralDocument-Cevnk5OF.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-C_peDfqf.js → EphemeralNotebook-JvALIbK2.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-DHSxnPc9.js → ExcalidrawComponent-CbghNk-F.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-BpsfNG-u.js → ExcalidrawModal-BOVvWzYQ.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-BUSLnJVL.js → JupyterLexicalExtension-CRccZ2h7.js} +29 -29
- package/dist-embed/chunks/{KernelVariables-Cu7UeFhT.js → KernelVariables-ompObBEM.js} +1 -1
- package/dist-embed/chunks/{LexicalToolRegistry-CNg1T5sQ.js → LexicalToolRegistry-BlBEZPP4.js} +4 -4
- package/dist-embed/chunks/{NotebookToolSurfaces-Cm6-oE_W.js → NotebookToolSurfaces-DP8sWqVy.js} +1 -1
- package/dist-embed/chunks/{NotebookView-Be2lNZjS.js → NotebookView-DC6BDVEp.js} +1 -1
- package/dist-embed/chunks/{Output-OIgTyxpD.js → Output-C4hBhZ5k.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-BMq0tlcE.js → SandboxDetailsDialog-CX8wvCLJ.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-D3mmq2C1.js → SchemaForm-BuhXDyz6.js} +1 -1
- package/dist-embed/chunks/{WidgetVariableView-DnuwkCHl.js → WidgetVariableView-C2X5Ehcg.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-Bum16ua6.js → YouTubePlugin-CjgOnMCz.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-BMkFygW4.js → abnfDiagram-VCTEODGH-kzVu7pzT.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Dac38D-P.js → abnfDiagram-VCTEODGH-wvUaPpVC.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-JDFjD_Dk.js → ar-SA-G6X2FPQ2-ArgZTGSp.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DXJTBh9S.js → architectureDiagram-5GKGNRK7-CwbfxDHw.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-D7VBU0uf.js → architectureDiagram-5GKGNRK7-DVZUrWEx.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-AbN1w5Zy.js → az-AZ-76LH7QW2-DQgz6n32.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-BULkJsTf.js → bg-BG-XCXSNQG7-Cx0dPt6-.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-Bk9MNjmt.js → blockDiagram-868be97b-DEQh5CUO.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CKjKQ6Dq.js → blockDiagram-I7D4REHJ-C6gbEBfg.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-BwenaP7n.js → blockDiagram-I7D4REHJ-DUIcpkIN.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-B6EtUyIk.js → bn-BD-2XOGV67Q-BkekmuYO.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-BGoSdP5p.js → c4Diagram-3f4bdde3-CUcRctJE.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DlkcVfDa.js → c4Diagram-7LVT6UL2-DSQiEaxC.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-BZRokUDB.js → c4Diagram-7LVT6UL2-f7UaZWVg.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-BZ0wzUck.js → ca-ES-6MX7JW3Y-Yr14RtMP.js} +1 -1
- package/dist-embed/chunks/{celltoolbartracker-CCRqu43G.js → celltoolbartracker-Bx9x9aeh.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-CfYiHpfd.js → chunk-2Q5K7J3B-BBPiCQqO.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-DLu9zZx0.js → chunk-2Q5K7J3B-DbzMjK_L.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-yHAygNq4.js → chunk-5VM5RSS4-CcNPo9qP.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-dV5IUPYK.js → chunk-5VM5RSS4-rEZEdbpi.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BeY8iI19.js → chunk-F27PBJKO-BH7lDumP.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BArvzx7H.js → chunk-F27PBJKO-DTgjd0wN.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-iUeFNxCU.js → chunk-IMKFNOWR-BA-vmq_V.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-BJRUyuXy.js → chunk-IMKFNOWR-DuzpuE1w.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-BDUBU4vN.js → chunk-JWPE2WC7-BfRI4eJ2.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-Djk-1JPJ.js → chunk-JWPE2WC7-CAdvd3EQ.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-E4731IOt.js → chunk-POPQ4Y6H-B7pT6rUf.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-CibXbz_c.js → chunk-POPQ4Y6H-Dw1h_9lT.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-DeRyA6Ek.js → chunk-SVP7TREG-BxpYXJab.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-o7JviCXQ.js → chunk-SVP7TREG-VsO48dck.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BIhZcpwn.js → chunk-TICWLB2K-CU2oQRJ9.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-Zk_gUXIu.js → chunk-TICWLB2K-LCiyX33a.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-DATpHkZD.js → chunk-XXDRQBXY-CL1cUI4w.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-Cp6f69YK.js → chunk-XXDRQBXY-islJGiCO.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-DcutslOq.js → classDiagram-ZZMXUADV-C7-Ca_nP.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-BfpWJKcC.js → classDiagram-ZZMXUADV-Ctw7VU-m.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-BVLyWZwA.js → classDiagram-f62afe4f-BaJUb6H9.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-CgcAzr_L.js → classDiagram-v2-604399ef-s6LKeK41.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-DcutslOq.js → classDiagram-v2-VYDZK3BY-C7-Ca_nP.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-BfpWJKcC.js → classDiagram-v2-VYDZK3BY-Ctw7VU-m.js} +1 -1
- package/dist-embed/chunks/{code-block-IT6T5CEO-D5_yhrdD.js → code-block-IT6T5CEO-BieLU8ls.js} +1 -1
- package/dist-embed/chunks/{component-DoyMsR16.js → component-p2xkjXeh.js} +3 -3
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B-LvsoyE.js → cose-bilkent-JH36ORCC-BkezndW_.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DhPsWJev.js → cose-bilkent-JH36ORCC-DrOmRWVI.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-CnP7VdTn.js → createText-aed3d8b3-Dw8k7JC8.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-CHIiQJ-9.js → cs-CZ-2BRQDIVT-DYR-S6bD.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D4zzGd7W.js → cynefinDiagram-5FMLGOSQ-DqoI6t3s.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B4k-OykO.js → cynefinDiagram-5FMLGOSQ-qZ6StjuY.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-dfN2SAKQ.js → da-DK-5WZEPLOC-DhaHIgKI.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-DUrWhbsC.js → dagre-GXQ25YYZ-Bb0_WA3x.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-BlWkzzlo.js → dagre-GXQ25YYZ-pcAHu_bK.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-BKsKfmfo.js → de-DE-XR44H4JA-CJpRH2Fy.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-FxHXDIYr.js → diagram-S7CK7UJ4-CwINt91M.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-BuRBzTwI.js → diagram-S7CK7UJ4-W17wgXHY.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-FxYHrvzF.js → diagram-UQ7AKVKN-CXRpfLBt.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-CeDT8Vz4.js → diagram-UQ7AKVKN-mH7QBO8y.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-Cv0WAiv8.js → diagram-VSXAHHWV-Bg68Bv82.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-C2icUdkA.js → diagram-VSXAHHWV-CFHqpDaB.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-D6VPVMhu.js → diagram-VX7I27RA-BEO0D7jE.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-AoxkG7BW.js → diagram-VX7I27RA-DQ6XlKLw.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-DxunLDOr.js → diagram-Z3DM3KII-BLJQK61P.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-CHxtPQ6F.js → diagram-Z3DM3KII-Cenqf76m.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CfsTBJc5.js → ebnfDiagram-PWID7BFC-6H6OSebp.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-CmJlfM6d.js → ebnfDiagram-PWID7BFC-Cqmnghct.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-Cl5rq6T8.js → edges-b2856ca0-ChO7JKaP.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-Cs0zPSU1.js → el-GR-BZB4AONW-DPGB1p8K.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-C0jmz-br.js → erDiagram-5d81789a-jzhAXdZi.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-Dyljy6tN.js → erDiagram-RLTQ6QDP-DEAWMrMT.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-FFD_URlX.js → erDiagram-RLTQ6QDP-hAbP0vV0.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-fGOqRf0o.js → es-ES-U4NZUMDT-CLztgM3g.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-CLZ09rVe.js → eu-ES-A7QVB2H4--ffZf65_.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-Cjimbc8n.js → fa-IR-HGAKTJCU-Cwwej6FC.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-ZXNEW916.js → fi-FI-Z5N7JZ37-Tw-dUSxy.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-Cden9aoH.js → flowDb-185abca5-DDUaXZ_Q.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-Bar9YxSW.js → flowDiagram-1629c991-DpvDtFPK.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-bg09n0_F.js → flowDiagram-HODETNUW-DENY4Bvt.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-02Xo2-6n.js → flowDiagram-HODETNUW-Hr-elwWq.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-C6FnOAb2.js → flowDiagram-v2-1d953310-TxFSXMN7.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-DcmMV2Wi.js → flowchart-elk-definition-6df44142-BGFxwidp.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-DQaq_g67.js → fr-FR-RHASNOE6-CT1NyjSV.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-BN61xNrz.js → ganttDiagram-3b0b3873-DJqKtGUz.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-BCLyiaOJ.js → ganttDiagram-EL5Y4UJY-3bErrKpg.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-JviVPOnF.js → ganttDiagram-EL5Y4UJY-Ddh9hVkO.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CzBMuAvA.js → gitGraphDiagram-WWUBYQGX-B3BVHs36.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-CNc3l-2t.js → gitGraphDiagram-WWUBYQGX-BiEolUQH.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-7ecaKDp7.js → gitGraphDiagram-f01e8bc2-vOvP_sU8.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-BlrLF7Sk.js → gl-ES-HMX3MZ6V-BKTaXj_2.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-DLfo2nov.js → he-IL-6SHJWFNN-BJ5SwTG5.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-BcbS0I1h.js → hi-IN-IWLTKZ5I-D5ZQxogx.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-B_-3TehM.js → hu-HU-A5ZG7DT2-CoAAAzpy.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-C920eBs5.js → id-ID-SAP4L64H-DFWbGjYj.js} +1 -1
- package/dist-embed/chunks/{index-D_-7qr4x.js → index-1MXuxaax.js} +1 -1
- package/dist-embed/chunks/{index-CGhVy6OJ.js → index-6feFd5AZ.js} +1 -1
- package/dist-embed/chunks/{index-MNZ1LVAM.js → index-8Jy3Vws8.js} +6 -6
- package/dist-embed/chunks/{index-9bae90f3-_mZDJyzh.js → index-9bae90f3-YA-Pbv-C.js} +1 -1
- package/dist-embed/chunks/{index-C2UmIEOV.js → index-B0MhQWhs.js} +1 -1
- package/dist-embed/chunks/{index-DcbXB4Ou.js → index-B0omKuYl.js} +1 -1
- package/dist-embed/chunks/{index-CLojGXLe.js → index-B8y71UkT.js} +1 -1
- package/dist-embed/chunks/{index-DmKOrT_f.js → index-B9vBhR-p.js} +1 -1
- package/dist-embed/chunks/{index-B3qU5V3s.js → index-BL4KuFQP.js} +1 -1
- package/dist-embed/chunks/{index-BMqDh5WU.js → index-BNFZYAJT.js} +1 -1
- package/dist-embed/chunks/{index-BVkaRzYN.js → index-BTeNnRc_.js} +1 -1
- package/dist-embed/chunks/{index-W-qUA31l.js → index-BVzIb3Wy.js} +1 -1
- package/dist-embed/chunks/{index-D1CRwrf9.js → index-BfMo5nXi.js} +2 -2
- package/dist-embed/chunks/{index-C3p2Hbbg.js → index-BgWf1G8H.js} +1 -1
- package/dist-embed/chunks/{index-C3zGthUI.js → index-BuyZwxeT.js} +1 -1
- package/dist-embed/chunks/{index-7V4MgoX0.js → index-BzQxauhZ.js} +1 -1
- package/dist-embed/chunks/{index-Dyv67BU9.js → index-C7os26P7.js} +2 -2
- package/dist-embed/chunks/{index-BbtA7ppb.js → index-CCA_V9Td.js} +1 -1
- package/dist-embed/chunks/{index-oJ3M8HYJ.js → index-CIDdX0nc.js} +1 -1
- package/dist-embed/chunks/{index-C8N5z7FZ.js → index-CkOZcvYl.js} +1 -1
- package/dist-embed/chunks/{index-DV2fNvY7.js → index-CxIZHPCc.js} +1 -1
- package/dist-embed/chunks/{index-BST3vALX.js → index-D62kZnWZ.js} +3 -3
- package/dist-embed/chunks/{index-CuqMWXgT.js → index-DMf0f7ny.js} +3 -3
- package/dist-embed/chunks/{index-OZDJ7kli.js → index-DPzPvDBn.js} +1 -1
- package/dist-embed/chunks/{index-B0VC_nl2.js → index-DSgHh0-i.js} +1 -1
- package/dist-embed/chunks/{index-DmYrjwOw.js → index-DTCcg1ap.js} +1 -1
- package/dist-embed/chunks/{index-D95mZTII.js → index-DTbF6Y7O.js} +1 -1
- package/dist-embed/chunks/{index-DbHMJ-IM.js → index-Db1qHC1a.js} +1 -1
- package/dist-embed/chunks/{index--rbc1jdS.js → index-DiBcWu6d.js} +1 -1
- package/dist-embed/chunks/{index-DSts8s_N.js → index-DpJpQnPn.js} +1 -1
- package/dist-embed/chunks/{index-DqwL86GY.js → index-Dw1P-H6s.js} +12 -12
- package/dist-embed/chunks/{index-k3ISgWrJ.js → index-FbZJIbu_.js} +1 -1
- package/dist-embed/chunks/{index-DMTXHmrU.js → index-JhvHCMRQ.js} +1 -1
- package/dist-embed/chunks/{index-BVdp0AG7.js → index-TDpnbl90.js} +4 -4
- package/dist-embed/chunks/{index-CW0DxnfF.js → index-fQxrRXLD.js} +1 -1
- package/dist-embed/chunks/{index.esm-Dy7cyZyH.js → index.esm-B6P80s3J.js} +1 -1
- package/dist-embed/chunks/{index.esm-jFa95d0B.js → index.esm-z-R1Ypx2.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CuQ0a02I.js → infoDiagram-27XIBGKW-8DlnjSdf.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CDc0DV-6.js → infoDiagram-27XIBGKW-CZPNcDbH.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-BKWmVk4B.js → infoDiagram-a29d40f1-Di_kmyTC.js} +1 -1
- package/dist-embed/chunks/{isEqual-SWNqZJZT.js → isEqual-D0eOPSLC.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BY7eKNmA.js → ishikawaDiagram-5VMMS53U-DD5TaPvH.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-CPu6wHAG.js → ishikawaDiagram-5VMMS53U-ri4cvaWs.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-CsJELR-H.js → it-IT-JPQ66NNP-C7p9bCWQ.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-Bh4bW0cv.js → ja-JP-DBVTYXUO-DupAM7Cv.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-6CRYfcQL.js → journeyDiagram-3NMN7TZE-1NqbTyL4.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Cv_KZqY3.js → journeyDiagram-3NMN7TZE-BpYgEBLO.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-yJruA0Fm.js → journeyDiagram-95396277-xr9Xk_mL.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-BmDtc0g0.js → kaa-6HZHGXH3-DrthOcPY.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-Bluox3dD.js → kab-KAB-ZGHBKWFO-C4hr0kbU.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Dps45ZlJ.js → kanban-definition-UXKFOSKX-B5nUu45Q.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-Biauy1A4.js → kanban-definition-UXKFOSKX-DlSwjr3b.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-EZjFhsK8.js → kk-KZ-P5N5QNE5-CrjDkh9r.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-BpZu76AC.js → km-KH-HSX4SM5Z-JHWf7VZ6.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-C5JZPTHd.js → ko-KR-MTYHY66A-CJ4JxKMG.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-BUaf6TOB.js → ku-TR-6OUDTVRD-YSlLPag_.js} +1 -1
- package/dist-embed/chunks/{layout-C8INuwYa.js → layout-5FOjTADt.js} +1 -1
- package/dist-embed/chunks/{layout-CEbgEIwd.js → layout-Bdtul_rg.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-DFMSPigW.js → lexicalHooks-eqXJbnX9.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-CuGmKRQr.js → lt-LT-XHIRWOB4-2v6r2YYq.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-EYERw_NP.js → lv-LV-5QDEKY6T-DVGd68q4.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-hzdTpjmh.js → mermaid.core-BU1Nkb56.js} +5 -5
- package/dist-embed/chunks/{mermaid.core-BeAq5EQp.js → mermaid.core-DY5DKOtx.js} +3 -3
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX--O06aygF.js → mindmap-definition-YA3MSWOX-CEuIjXO2.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-iB7eW5x9.js → mindmap-definition-YA3MSWOX-sSfUfKt8.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-DCwgMhNw.js → mindmap-definition-e4c1d938-btrk6STt.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-SKx4bMeU.js → mr-IN-CRQNXWMA-D1q8zjMr.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-BG-vgEXz.js → my-MM-5M5IBNSE-CCWuEpIN.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-BbW-11AI.js → nb-NO-T6EIAALU-eJ92wx2h.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-CSKGpuSJ.js → nl-NL-IS3SIHDZ-DmkMgsvp.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-P1tnp9TQ.js → nn-NO-6E72VCQL-CWYEaXBn.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-vpu8tuQT.js → oc-FR-POXYY2M6-CayriaEZ.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-CIpdGll2.js → pa-IN-N4M65BXN-CydiKcR8.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-ZPizxhEX.js → pegDiagram-XKGWAZYB--dcG-x2B.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Bon6jQ3L.js → pegDiagram-XKGWAZYB-CqRRvKft.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-hVEpOtFm.js → percentages-BXMCSKIN-fzYCDL7m.js} +5 -5
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-C0Pc9GUi.js → pieDiagram-E7YTZNPT-CkHpKSua.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-Di8dEHt9.js → pieDiagram-E7YTZNPT-D-uncTun.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-C--hwbRv.js → pieDiagram-c941bede-BoVaJIdw.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-Ckyj0Mzv.js → pl-PL-T2D74RX3-DhiK4YSC.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-3jDc9_Aa.js → pt-BR-5N22H2LF-CwSVxIqs.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-lhLbXf7Q.js → pt-PT-UZXXM6DQ-BnxquNJT.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-Ffo3hgR0.js → quadrantDiagram-AXDQQJYC-ClE_bWPS.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-D0QYtpIp.js → quadrantDiagram-AXDQQJYC-nOA8Q9nG.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Bqmed-0s.js → quadrantDiagram-cf8b8fe0-V_e2KgDu.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-BMC9Ldnh.js → railroadDiagram-O6MQD6OU-CkhmY0tS.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-aTc7bF4I.js → railroadDiagram-O6MQD6OU-D-SNyKIn.js} +1 -1
- package/dist-embed/chunks/{renderer-CR6Lxa3d.js → renderer-BwlsmtXF.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-DExdw0ey.js → requirementDiagram-53bda41b-BZw7Ipej.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-mBFLHcqA.js → requirementDiagram-BXWQKSXE-1A97ivzl.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DBj1iVv5.js → requirementDiagram-BXWQKSXE-BXwXUXrr.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-Dy9oeW3b.js → ro-RO-JPDTUUEW-D3G2f_fQ.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CK16-wfD.js → ru-RU-B4JR7IUQ-SnVfNwaW.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-DzaadHXz.js → sankeyDiagram-P5KCCOFB-0B_Kvjm2.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-9W9X5V7a.js → sankeyDiagram-P5KCCOFB-ktT6v9aY.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-B6u8wnkU.js → sankeyDiagram-c3ef121a-e1QLivkZ.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-Bq8bvLh8.js → sequenceDiagram-82a5b84f-N-16oABv.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BNfJw8_y.js → sequenceDiagram-WJ2MYXX4-CtbkJYCv.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-B76NTf4c.js → sequenceDiagram-WJ2MYXX4-DYY-dZgX.js} +1 -1
- package/dist-embed/chunks/{sessions-XxjScqnJ.js → sessions-C9DBCyZI.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-AJdaUbzl.js → si-LK-N5RQ5JYF-Da7Bfexz.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-KZBUxNmb.js → sizeCapture-INFHLROL-B3xt8UaI.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-DQ5s0TIW.js → sizeCapture-INFHLROL-DJOph387.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-Bk82hIVU.js → sk-SK-C5VTKIMK-BB-Ks1b-.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-DSFcvf6W.js → sl-SI-NN7IZMDC-DF3fUKHX.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-BiTTNI1Z.js → stateDiagram-43e79a5f-BJcJNr41.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-D4hQpdZ2.js → stateDiagram-D77RDMKH-DVd0MOrg.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-lndPMO3D.js → stateDiagram-D77RDMKH-LjWP-fRB.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-BbFiQEfG.js → stateDiagram-v2-2041ed4f-DTEruWg2.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-pqcRT12A.js → stateDiagram-v2-MP3YSRHH-CJD5_Eji.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-C-kIBdBJ.js → stateDiagram-v2-MP3YSRHH-_xCQcvgo.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-U9lx7mAf.js → styles-455b33cd-OIhmfs6N.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-S-lYZYdK.js → styles-f932cba9-CwLjreIv.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-DfudfB3j.js → styles-fcc2142b-DP74dQpR.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-f2gmZjeG.js → subset-shared.chunk-Cf9zgTA9.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-De1CPIQ6.js → subset-worker.chunk-WYW3AHku.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-BbGfLHIi.js → sv-SE-XGPEYMSR-CeR-pJHy.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-ClgHG0vb.js → svgDrawCommon-148a3cd9-CgE5QJIv.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-OqZ4t-07.js → swimlanes-42K2YHIH-CZyflHYJ.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-CjV1bdPk.js → swimlanes-42K2YHIH-Cj4fdAYa.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-9twpvQtj.js → swimlanesDiagram-VR7AAH4N-B2gk37ys.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-BdS4NGOx.js → swimlanesDiagram-VR7AAH4N-Bmr6N4fj.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-BWMJgnI2.js → ta-IN-2NMHFXQM-lmsodGuU.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-DiP_CZXl.js → th-TH-HPSO5L25-DQCWr96I.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-Cs4Bwobu.js → timeline-definition-24CTP7MA-D5dMAy5U.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-B7uSaXDu.js → timeline-definition-24CTP7MA-DqY5EM6p.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-CHrBluu1.js → timeline-definition-7545f45a-B8wMEyZY.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-CKMBvOkr.js → tr-TR-DEFEU3FU-CqnvlGZW.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-CQL0E0jU.js → uk-UA-QMV73CPH-DdWFjbHe.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-uwWpr4uC.js → vennDiagram-4TSXK5OY-63-O_xI8.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-CHSyRZN_.js → vennDiagram-4TSXK5OY-BMg6wc5A.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-BpvEBNJo.js → vi-VN-M7AON7JQ-CydTT0Fi.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-0UuvD-IO.js → wardleyDiagram-VM6X3IG4-C5wMQ_qe.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-zIfOyYBf.js → wardleyDiagram-VM6X3IG4-C9vLUvHf.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-ChbRPzo8.js → xychartDiagram-3f383b91-BfoQg8n9.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-hCGgyjir.js → xychartDiagram-S5SC5T6Z-BZr3T3n_.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-q9gcUSF1.js → xychartDiagram-S5SC5T6Z-DthHDnAV.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-DWmzAIjK.js → zh-CN-LNUGB5OW-DEn1TFfK.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-CQ-xPzHX.js → zh-HK-E62DVLB3-DJQRmOHH.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-DvlSTykD.js → zh-TW-RAJ6MFWO-B7s9vmSf.js} +1 -1
- package/dist-embed/datalayer-app-main.js +52 -52
- package/lib/apps/embed/visitorApp.d.ts +1 -1
- package/lib/apps/embed/visitorApp.js +1 -1
- package/lib/apps/plugins/chat/ChatView.js +13 -2
- package/lib/chat/ChatFloating.js +4 -1
- package/lib/chat/base/ChatBase.js +11 -3
- package/lib/chat/prompt/InputPrompt.d.ts +6 -1
- package/lib/chat/prompt/InputPrompt.js +12 -2
- package/lib/voice/ComposerVoice.d.ts +15 -2
- package/lib/voice/ComposerVoice.js +23 -17
- package/lib/voice/VoiceMenu.d.ts +27 -0
- package/lib/voice/VoiceMenu.js +32 -0
- package/lib/voice/chatVoice.js +2 -2
- package/lib/voice/choices.d.ts +33 -0
- package/lib/voice/choices.js +70 -0
- package/lib/voice/index.d.ts +4 -0
- package/lib/voice/index.js +3 -0
- package/lib/voice/settings.d.ts +17 -1
- package/lib/voice/settings.js +64 -1
- package/lib/voice/useVoiceSettings.d.ts +6 -0
- package/lib/voice/useVoiceSettings.js +25 -0
- package/package.json +1 -1
- package/dist-embed/chunks/ChatView-C2La9033.js +0 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as V}from"./LexicalToolRegistry-CNg1T5sQ.js";import{D as Vl,a as Yl,b as Gl,e as Zl,c as Kl,g as Ql,i as ec,f as tc,l as nc,h as sc,j as oc,k as rc,m as ic,n as ac,r as lc,o as cc,p as uc,q as dc,s as pc,t as fc,v as mc,w as gc,x as hc,y as bc,z as yc,u as xc}from"./LexicalToolRegistry-CNg1T5sQ.js";import{_ as qt,E as Mn,G as Dn,H as Bn,K as me,M as Wt,O as ot,P as rt,Q as jn,R as Fn,S as Xt,U as Un,V as Jt,W as zn,X as Hn,Y as Vt,Z as Yt,a0 as qn,a1 as Wn,a2 as Xn,a3 as Jn,C as Gt,a4 as Vn,a5 as Zt,a6 as Yn,a7 as Gn,a8 as Ce,a9 as Q,aa as Kt,ab as it,ac as xe,ad as at,ae as Re,af as Zn,ag as Be,ah as Ve,ai as lt,aj as Kn,ak as Ye,al as Qn,am as es,an as ts,ao as Ge,ap as Qt,aq as en,ar as tn,as as Ie,at as ns,au as ss,av as nn,aw as os,ax as Pe,$ as rs,b as is,a as as,c as ls,ay as sn,az as Y,aA as cs,aB as us,aC as Ze,aD as ds,aE as ps,aF as fs,aG as ms,aH as ct,aI as gs,aJ as hs,aK as bs,aL as ys,aM as xs,aN as Ts,aO as Oe,aP as Ke,aQ as bt,aR as yt,aS as Es,aT as Cs,aU as vs,aV as ws,aW as Ss,aX as Ls,aY as _s,aZ as ks,a_ as As,x as on,a$ as Ns,b0 as $s,b1 as Rs,b2 as Is,b3 as Ps,b4 as Os,b5 as Ue,b6 as Ms,b7 as Ds,b8 as Bs,b9 as js,ba as Fs,bb as rn,bc as an,bd as ln,be as cn,j as Us,T as zs,L as Hs,w as qs,k as Ws,l as Xs,D as Js,m as Vs,n as Ys,o as Gs,p as Zs,t as Ks,bf as Qs,s as eo,F as to,u as no,v as so,bg as oo,bh as ro}from"./JupyterLexicalExtension-BUSLnJVL.js";import{bi as Ec,bj as Cc,bk as vc,bl as wc,bm as Sc,bn as Lc,bo as _c,bp as kc,bq as Ac,br as Nc,bs as $c,bt as Rc,bu as Ic,bv as Pc,d as Oc,e as Mc,bw as Dc,bx as Bc,B as jc,by as Fc,A as Uc,bz as zc,bA as Hc,bB as qc,bC as Wc,bD as Xc,bE as Jc,bF as Vc,bG as Yc,bH as Gc,bI as Zc,bJ as Kc,bK as Qc,bL as eu,bM as tu,bN as nu,bO as su,bP as ou,f as ru,bQ as iu,g as au,bR as lu,bS as cu,bT as uu,bU as du,bV as pu,q as fu,bW as mu,bX as gu,bY as hu,bZ as bu,b_ as yu,b$ as xu,c0 as Tu,c1 as Eu,c2 as Cu,c3 as vu,c4 as wu,c5 as Su,c6 as Lu,c7 as _u,c8 as ku,c9 as Au,ca as Nu,cb as $u,cc as Ru,cd as Iu,ce as Pu,cf as Ou,cg as Mu,ch as Du,ci as Bu,cj as ju,I as Fu,ck as Uu,cl as zu,cm as Hu,cn as qu,co as Wu,cp as Xu,cq as Ju,cr as Vu,cs as Yu,ct as Gu,cu as Zu,cv as Ku,h as Qu,z as ed,cw as td,cx as nd,cy as sd,cz as od,cA as rd,cB as id,cC as ad,cD as ld,cE as cd,cF as ud,cG as dd,J as pd,cH as fd,cI as md,cJ as gd,cK as hd,cL as bd,cM as yd,cN as xd,cO as Td,cP as Ed,cQ as Cd,cR as vd,cS as wd,cT as Sd,cU as Ld,cV as _d,cW as kd,cX as Ad,cY as Nd,cZ as $d,c_ as Rd,c$ as Id,d0 as Pd,d1 as Od,d2 as Md,d3 as Dd,d4 as Bd,d5 as jd,d6 as Fd,d7 as Ud,d8 as zd,d9 as Hd,da as qd,db as Wd,dc as Xd,dd as Jd,de as Vd,df as Yd,dg as Gd,dh as Zd,di as Kd,dj as Qd,dk as ep,dl as tp,dm as np,dn as sp,dp as op,dq as rp,dr as ip,ds as ap,dt as lp,du as cp,dv as up,dw as dp,dx as pp,dy as fp,dz as mp,dA as gp,dB as hp,dC as bp,dD as yp,dE as xp,dF as Tp,dG as Ep,dH as Cp,dI as vp,dJ as wp,dK as Sp,dL as Lp,dM as _p,dN as kp,dO as Ap,dP as Np,dQ as $p,dR as Rp,dS as Ip,dT as Pp,dU as Op,dV as Mp,dW as Dp,dX as Bp,dY as jp,dZ as Fp,d_ as Up,d$ as zp,e0 as Hp,e1 as qp,e2 as Wp,e3 as Xp,e4 as Jp,e5 as Vp,e6 as Yp,e7 as Gp,e8 as Zp,e9 as Kp,ea as Qp,eb as ef,ec as tf,ed as nf,ee as sf,ef as of,eg as rf,eh as af,ei as lf,ej as cf,ek as uf,el as df,em as pf,en as ff,eo as mf,ep as gf,eq as hf,er as bf,es as yf,et as xf,eu as Tf,ev as Ef,ew as Cf,ex as vf,ey as wf,ez as Sf,eA as Lf,eB as _f,eC as kf,eD as Af,eE as Nf,eF as $f,eG as Rf,eH as If,eI as Pf,eJ as Of,eK as Mf,eL as Df,eM as Bf,eN as jf,eO as Ff,eP as Uf,eQ as zf,eR as Hf,eS as qf,eT as Wf,eU as Xf,eV as Jf,eW as Vf,eX as Yf,r as Gf,eY as Zf,eZ as Kf,e_ as Qf,e$ as em,i as tm,f0 as nm,f1 as sm,f2 as om,f3 as rm,f4 as im,f5 as am,f6 as lm,f7 as cm,f8 as um,f9 as dm,fa as pm,fb as fm,fc as mm,fd as gm,fe as hm,ff as bm,fg as ym,fh as xm,fi as Tm,fj as Em,fk as Cm,fl as vm,fm as wm,fn as Sm,fo as Lm,fp as _m,fq as km,fr as Am,fs as Nm,ft as $m,fu as Rm,fv as Im}from"./JupyterLexicalExtension-BUSLnJVL.js";import{kF as io,r as m,j as h,aA as ao,au as lo,B as co,aE as ee,kG as F,kH as ae,kI as un,kJ as fe,kK as z,kL as uo,kM as po,kN as fo,kO as mo,kP as j,aD as ce,kQ as Te,kR as ut,kS as go,kT as ho,kU as bo,kV as yo,kW as dn,kX as xo,kY as To,kZ as Eo,k_ as Co,k$ as vo,l0 as wo,aC as So,K as M,bS as ve,l1 as Lo,l2 as se,l3 as X,l4 as ye,l5 as _o,l6 as ko,l7 as Ao,bT as No,l8 as le,bV as pn,l9 as fn,la as mn,bd as gn,lb as pe,lc as $o,ld as Ro,bi as ie,co as Io,I as Le,e4 as hn,C as Po,e as Oo,bX as Mo,k as Do,le as Bo,lf as jo,bW as ze,lg as Fo,lh as xt,d5 as Uo,el as zo,T as Ho,li as Tt,lj as qo,lk as Wo,ll as Xo,lm as Et,ln as Jo,lo as Vo,av as Yo,aw as Go,aq as Zo,aB as Ko}from"../datalayer-app-main.js";import{CollapsiblePlugin as Om}from"./index-DV2fNvY7.js";import{u as Qo,N as Ct}from"./usePrimerThemeBridge-CoHussa9.js";import{u as er}from"./Output-OIgTyxpD.js";import{T as tr}from"./ThemeContext-D9ztCaU3.js";import{a as Dm,u as Bm}from"./ThemeContext-D9ztCaU3.js";import{YouTubePlugin as Fm}from"./YouTubePlugin-Bum16ua6.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./index-CuqMWXgT.js";import"./hoverbox-CStlKQWE.js";import"./index-Dyv67BU9.js";import"./index-DSts8s_N.js";import"./color-CG7_7V2-.js";import"./isEqual-SWNqZJZT.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";class nr{registry;_debug;constructor(t,n=!1){this.registry=t,this._debug=n}calculateIndent(t){const n=this.registry.getConfigOrDefault(t.language),s=this.getLeadingWhitespaceCount(t.currentLine);let o=s,r=!1,i=!1,l;for(const a of n.indentTriggers)if(this.matchesIndentRule(t.currentLine,a)){o=s+a.indentAmount,r=!0,l=a.name;break}if(!r){for(const a of n.dedentTriggers)if(this.matchesDedentRule(t.currentLine,a)){i=!0,l=a.name;break}}if(n.customRules){for(const a of n.customRules)if(a.condition(t.currentLine,t)){o=a.apply(o,t);break}}return o=Math.max(0,o),{spaces:o,shouldIndent:r,shouldDedent:i,triggeredRule:l}}getTabString(t){const n=this.registry.getConfigOrDefault(t);return n.useTabs?" ":" ".repeat(n.tabSize)}getTabSize(t){return this.registry.getConfigOrDefault(t).tabSize}calculateOutdent(t,n){const s=this.registry.getConfigOrDefault(n),o=t-s.tabSize;return Math.max(0,o)}getLeadingWhitespaceCount(t){const n=t.match(/^[\t ]*/);if(!n)return 0;const s=n[0];let o=0;for(const r of s)r===" "?o+=4:o+=1;return o}getLeadingWhitespace(t){const n=t.match(/^[\t ]*/);return n?n[0]:""}matchesIndentRule(t,n){switch(n.context){case"line-end":return n.pattern.test(t);case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}matchesDedentRule(t,n){switch(n.context){case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}normalizeIndentation(t,n){const s=this.registry.getConfigOrDefault(n);if(s.useTabs){const o=this.getLeadingWhitespace(t),r=o.length,i=Math.floor(r/s.tabSize),l=r%s.tabSize;return" ".repeat(i)+" ".repeat(l)+t.substring(o.length)}else{const o=this.getLeadingWhitespace(t);return o.replace(/\t/g," ".repeat(s.tabSize)).concat(t.substring(o.length))}}}const sr={language:"python",tabSize:4,useTabs:!1,indentTriggers:[{name:"colon-indent",pattern:/:\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"continuation-backslash",pattern:/\\\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"open-bracket",pattern:/[[({]\s*$/,context:"line-end",indentAmount:4}],dedentTriggers:[{name:"flow-control-keywords",pattern:/^\s*(return|break|continue|pass)(\s|$)/,context:"line-start",dedentAmount:4},{name:"raise-keyword",pattern:/^\s*raise(\s|$)/,context:"line-start",dedentAmount:4}],customRules:[{name:"close-bracket-dedent",condition:e=>/^\s*[\])}]/.test(e),apply:e=>Math.max(0,e-4)}]},bn={language:"javascript",tabSize:2,useTabs:!1,indentTriggers:[{name:"open-brace",pattern:/\{\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-bracket",pattern:/\[\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-paren",pattern:/\(\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"arrow-function",pattern:/=>\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"ternary-operator",pattern:/\?\s*(\/\/.*)?$/,context:"line-end",indentAmount:2}],dedentTriggers:[{name:"return-statement",pattern:/^\s*return(\s|;)/,context:"line-start",dedentAmount:2},{name:"break-continue",pattern:/^\s*(break|continue)(\s|;)/,context:"line-start",dedentAmount:2},{name:"throw-statement",pattern:/^\s*throw(\s|;)/,context:"line-start",dedentAmount:2}],customRules:[{name:"close-brace-dedent",condition:e=>/^\s*}/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-bracket-dedent",condition:e=>/^\s*\]/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-paren-dedent",condition:e=>/^\s*\)/.test(e),apply:e=>Math.max(0,e-2)},{name:"case-label",condition:e=>/^\s*(case\s+.*:|default:)/.test(e),apply:(e,t)=>e}]},or={...bn,language:"typescript"};class rr{configs;options;constructor(t={}){this.configs=new Map,this.options={defaultLanguage:"python",fallbackTabSize:4,debug:!1,...t},this.registerDefaultLanguages(),t.customConfigs&&t.customConfigs.forEach(n=>this.registerLanguage(n))}registerDefaultLanguages(){this.registerLanguage(sr),this.registerLanguage(bn),this.registerLanguage(or),this.registerAlias("py","python"),this.registerAlias("js","javascript"),this.registerAlias("ts","typescript"),this.registerAlias("jsx","javascript"),this.registerAlias("tsx","typescript")}registerLanguage(t){if(this.configs.has(t.language)){this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t.language}' already registered. Use updateConfig() to modify.`);return}this.configs.set(t.language,t)}registerAlias(t,n){const s=this.configs.get(n);s&&this.configs.set(t,s)}getConfig(t){if(!t)return this.getConfig(this.options.defaultLanguage);const n=t.toLowerCase().trim();return this.configs.get(n)}getConfigOrDefault(t){const n=this.getConfig(t);if(n)return n;const s=this.getConfig(this.options.defaultLanguage);return s?(this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t}' not found, using default: ${this.options.defaultLanguage}`),s):(this.options.debug&&console.error(`[LanguageIndentRegistry] No config found for '${t}' and default '${this.options.defaultLanguage}' missing!`),this.createFallbackConfig(t||"unknown"))}createFallbackConfig(t){return{language:t,tabSize:this.options.fallbackTabSize||4,useTabs:this.options.preserveTabs||!1,indentTriggers:[],dedentTriggers:[]}}hasLanguage(t){if(!t)return!1;const n=t.toLowerCase().trim();return this.configs.has(n)}updateConfig(t,n){const s=t.toLowerCase().trim(),o=this.configs.get(s);if(!o)return this.options.debug&&console.warn(`[LanguageIndentRegistry] Cannot update '${t}' - not registered`),!1;const r={...o,...n,language:o.language};return this.configs.set(s,r),!0}getRegisteredLanguages(){return Array.from(this.configs.keys())}clear(){this.configs.clear()}reset(){this.clear(),this.registerDefaultLanguages()}}const ir="[Deleted Comment]",Qe=e=>e.uid===e.thread_uid,yn=e=>e.anchor?.mark_id??e.uid,ar=(e,t)=>e.created_at!==t.created_at?e.created_at<t.created_at?-1:1:e.uid<t.uid?-1:e.uid>t.uid?1:0,He=(e,t)=>e!==void 0&&e.updated_at>t.updated_at?e:t,vt=e=>{const{uid:t,handle:n,name:s,agent_uid:o}=e.author;return t?{kind:"user",uid:t,handle:n??null,name:s??null,...o?{agentUid:o}:{}}:Bn(s||n)},lr=e=>({type:"comment",id:e.uid,author:Dn(vt(e)),authorPrincipal:vt(e),content:e.deleted?ir:e.body,deleted:e.deleted,...e.mentions&&e.mentions.length>0?{mentions:e.mentions}:{},timeStamp:Date.parse(e.created_at)});function cr(e){const t=[...e].sort(ar),n=new Map;for(const s of t)Qe(s)||n.set(s.thread_uid,[...n.get(s.thread_uid)??[],s]);return t.filter(s=>Qe(s)&&!s.deleted&&s.status==="open").map(s=>({type:"thread",id:yn(s),quote:s.quote??"",assignee:s.assignee??null,comments:[s,...n.get(s.uid)??[]].map(lr)}))}const wt=e=>e&&e.length>0?{mentions:e}:{};class dl{searchPeople;assignThread;_editor;_backend;_options;_listeners=new Set;_heardDuringReads=new Set;_records=new Map;_comments=[];constructor(t,n,s={}){this._editor=t,this._backend=n,this._options=s;const{searchPeople:o,assign:r}=n;o&&(this.searchPeople=i=>o.call(n,i).catch(l=>{throw this._options.onError?.(l),l})),r&&(this.assignThread=(i,l)=>this._write(()=>r.call(n,this._threadRecord(i).uid,l?.uid??null)))}connect(){const t=this._backend.subscribe({comment:n=>this._heard(n),ready:()=>{this.refresh()}});return this.refresh(),t}async refresh(){const t=new Map;this._heardDuringReads.add(t);try{const n=await this._backend.list(),s=new Map(n.map(o=>[o.uid,o]));for(const[o,r]of t)s.set(o,He(s.get(o),r));this._records=s,this._changed()}catch(n){this._options.onError?.(n)}finally{this._heardDuringReads.delete(t)}}getComments(){return this._comments}addComment(t,n){if(t.type==="thread"){const s=t.id,o=t.comments[0];this._write(()=>this._backend.create({body:o?.content??"",anchor:{mark_id:s},quote:t.quote,...wt(o?.mentions)}),()=>this._unmark(s))}else n!==void 0?this._write(()=>this._backend.create({body:t.content,thread_uid:this._threadRecord(n).uid,...wt(t.mentions)})):this._options.onError?.(new Error("A comment is written in a thread."))}deleteComment(t){this._write(()=>this._backend.delete(t.id))}deleteThread(t){this._write(()=>this._backend.delete(this._threadRecord(t).uid))}resolveThread(t){this._write(()=>this._backend.resolve(this._threadRecord(t).uid))}registerOnChange(t){return this._listeners.add(t),()=>{this._listeners.delete(t)}}_write(t,n){Promise.resolve().then(t).then(s=>this._heard(s),s=>{n?.(),this._options.onError?.(s)})}_threadRecord(t){for(const n of this._records.values())if(Qe(n)&&yn(n)===t.id)return n;throw new Error(`The thread ${t.id} is not one the store read.`)}_heard(t){for(const n of this._heardDuringReads)n.set(t.uid,He(n.get(t.uid),t));this._records.set(t.uid,He(this._records.get(t.uid),t)),this._changed()}_changed(){this._comments=cr(this._records.values());for(const t of this._listeners)t()}_unmark(t){this._editor.update(()=>{for(const{node:n}of io())qt(n)&&n.getIDs().includes(t)&&(n.deleteID(t),n.getIDs().length===0&&Mn(n))})}}const dt=m.createContext(void 0);function ur(){const e=m.useContext(dt);if(!e)throw new Error("useContext must be inside a Provider with a value");return e}const dr=dt.Provider,pl=dt.Consumer,fl=({children:e})=>{const[t,n]=m.useState();return h.jsx(dr,{value:{editor:t,setEditor:n},children:e})};function ml(e){const{useStore:t,children:n}=e,{colorMode:s,resolvedMode:o,themeConfig:r,themeBackground:i,lexicalTheme:l}=Qo(t);return h.jsx(ao,{colorMode:s,theme:r.primerTheme,themeStyles:r.themeStyles,children:h.jsx(lo,{colormode:o,backgroundColor:i,useBaseStyles:!1,children:h.jsx(co,{sx:{"& .editor-shell":{backgroundColor:i,borderRadius:2},"& .editor-container":{backgroundColor:i},"& .editor-inner":{backgroundColor:i},"& .editor-input":{backgroundColor:i},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:i}},children:h.jsx(tr.Provider,{value:{theme:l},children:n})})})})}const pr={"\\":"\\textbackslash{}","{":"\\{","}":"\\}",$:"\\$","&":"\\&","#":"\\#","^":"\\^{}",_:"\\_","%":"\\%","~":"\\~{}"};function K(e){return e.replace(/[\\{}$&#^_%~]/g,t=>pr[t]??t)}function pt(e,t,n="{",s="}"){let o=0;for(let r=t;r<e.length;r++){const i=e[r];if(i==="\\"){r++;continue}if(i===n)o++;else if(i===s&&(o--,o===0))return r}return-1}function W(e,t){let n=t;for(;n<e.length&&(e[n]===" "||e[n]===`
|
|
1
|
+
import{d as V}from"./LexicalToolRegistry-BlBEZPP4.js";import{D as Vl,a as Yl,b as Gl,e as Zl,c as Kl,g as Ql,i as ec,f as tc,l as nc,h as sc,j as oc,k as rc,m as ic,n as ac,r as lc,o as cc,p as uc,q as dc,s as pc,t as fc,v as mc,w as gc,x as hc,y as bc,z as yc,u as xc}from"./LexicalToolRegistry-BlBEZPP4.js";import{_ as qt,E as Mn,G as Dn,H as Bn,K as me,M as Wt,O as ot,P as rt,Q as jn,R as Un,S as Xt,U as Fn,V as Jt,W as zn,X as Hn,Y as Vt,Z as Yt,a0 as qn,a1 as Wn,a2 as Xn,a3 as Jn,C as Gt,a4 as Vn,a5 as Zt,a6 as Yn,a7 as Gn,a8 as Ce,a9 as Q,aa as Kt,ab as it,ac as xe,ad as at,ae as Re,af as Zn,ag as Be,ah as Ve,ai as lt,aj as Kn,ak as Ye,al as Qn,am as es,an as ts,ao as Ge,ap as Qt,aq as en,ar as tn,as as Ie,at as ns,au as ss,av as nn,aw as os,ax as Pe,$ as rs,b as is,a as as,c as ls,ay as sn,az as Y,aA as cs,aB as us,aC as Ze,aD as ds,aE as ps,aF as fs,aG as ms,aH as ct,aI as gs,aJ as hs,aK as bs,aL as ys,aM as xs,aN as Ts,aO as Oe,aP as Ke,aQ as bt,aR as yt,aS as Es,aT as Cs,aU as vs,aV as ws,aW as Ss,aX as Ls,aY as _s,aZ as ks,a_ as As,x as on,a$ as Ns,b0 as $s,b1 as Rs,b2 as Is,b3 as Ps,b4 as Os,b5 as Fe,b6 as Ms,b7 as Ds,b8 as Bs,b9 as js,ba as Us,bb as rn,bc as an,bd as ln,be as cn,j as Fs,T as zs,L as Hs,w as qs,k as Ws,l as Xs,D as Js,m as Vs,n as Ys,o as Gs,p as Zs,t as Ks,bf as Qs,s as eo,F as to,u as no,v as so,bg as oo,bh as ro}from"./JupyterLexicalExtension-CRccZ2h7.js";import{bi as Ec,bj as Cc,bk as vc,bl as wc,bm as Sc,bn as Lc,bo as _c,bp as kc,bq as Ac,br as Nc,bs as $c,bt as Rc,bu as Ic,bv as Pc,d as Oc,e as Mc,bw as Dc,bx as Bc,B as jc,by as Uc,A as Fc,bz as zc,bA as Hc,bB as qc,bC as Wc,bD as Xc,bE as Jc,bF as Vc,bG as Yc,bH as Gc,bI as Zc,bJ as Kc,bK as Qc,bL as eu,bM as tu,bN as nu,bO as su,bP as ou,f as ru,bQ as iu,g as au,bR as lu,bS as cu,bT as uu,bU as du,bV as pu,q as fu,bW as mu,bX as gu,bY as hu,bZ as bu,b_ as yu,b$ as xu,c0 as Tu,c1 as Eu,c2 as Cu,c3 as vu,c4 as wu,c5 as Su,c6 as Lu,c7 as _u,c8 as ku,c9 as Au,ca as Nu,cb as $u,cc as Ru,cd as Iu,ce as Pu,cf as Ou,cg as Mu,ch as Du,ci as Bu,cj as ju,I as Uu,ck as Fu,cl as zu,cm as Hu,cn as qu,co as Wu,cp as Xu,cq as Ju,cr as Vu,cs as Yu,ct as Gu,cu as Zu,cv as Ku,h as Qu,z as ed,cw as td,cx as nd,cy as sd,cz as od,cA as rd,cB as id,cC as ad,cD as ld,cE as cd,cF as ud,cG as dd,J as pd,cH as fd,cI as md,cJ as gd,cK as hd,cL as bd,cM as yd,cN as xd,cO as Td,cP as Ed,cQ as Cd,cR as vd,cS as wd,cT as Sd,cU as Ld,cV as _d,cW as kd,cX as Ad,cY as Nd,cZ as $d,c_ as Rd,c$ as Id,d0 as Pd,d1 as Od,d2 as Md,d3 as Dd,d4 as Bd,d5 as jd,d6 as Ud,d7 as Fd,d8 as zd,d9 as Hd,da as qd,db as Wd,dc as Xd,dd as Jd,de as Vd,df as Yd,dg as Gd,dh as Zd,di as Kd,dj as Qd,dk as ep,dl as tp,dm as np,dn as sp,dp as op,dq as rp,dr as ip,ds as ap,dt as lp,du as cp,dv as up,dw as dp,dx as pp,dy as fp,dz as mp,dA as gp,dB as hp,dC as bp,dD as yp,dE as xp,dF as Tp,dG as Ep,dH as Cp,dI as vp,dJ as wp,dK as Sp,dL as Lp,dM as _p,dN as kp,dO as Ap,dP as Np,dQ as $p,dR as Rp,dS as Ip,dT as Pp,dU as Op,dV as Mp,dW as Dp,dX as Bp,dY as jp,dZ as Up,d_ as Fp,d$ as zp,e0 as Hp,e1 as qp,e2 as Wp,e3 as Xp,e4 as Jp,e5 as Vp,e6 as Yp,e7 as Gp,e8 as Zp,e9 as Kp,ea as Qp,eb as ef,ec as tf,ed as nf,ee as sf,ef as of,eg as rf,eh as af,ei as lf,ej as cf,ek as uf,el as df,em as pf,en as ff,eo as mf,ep as gf,eq as hf,er as bf,es as yf,et as xf,eu as Tf,ev as Ef,ew as Cf,ex as vf,ey as wf,ez as Sf,eA as Lf,eB as _f,eC as kf,eD as Af,eE as Nf,eF as $f,eG as Rf,eH as If,eI as Pf,eJ as Of,eK as Mf,eL as Df,eM as Bf,eN as jf,eO as Uf,eP as Ff,eQ as zf,eR as Hf,eS as qf,eT as Wf,eU as Xf,eV as Jf,eW as Vf,eX as Yf,r as Gf,eY as Zf,eZ as Kf,e_ as Qf,e$ as em,i as tm,f0 as nm,f1 as sm,f2 as om,f3 as rm,f4 as im,f5 as am,f6 as lm,f7 as cm,f8 as um,f9 as dm,fa as pm,fb as fm,fc as mm,fd as gm,fe as hm,ff as bm,fg as ym,fh as xm,fi as Tm,fj as Em,fk as Cm,fl as vm,fm as wm,fn as Sm,fo as Lm,fp as _m,fq as km,fr as Am,fs as Nm,ft as $m,fu as Rm,fv as Im}from"./JupyterLexicalExtension-CRccZ2h7.js";import{kG as io,r as m,j as h,aA as ao,au as lo,B as co,aE as ee,kH as U,kI as ae,kJ as un,kK as fe,kL as z,kM as uo,kN as po,kO as fo,kP as mo,kQ as j,aD as ce,kR as Te,kS as ut,kT as go,kU as ho,kV as bo,kW as yo,kX as dn,kY as xo,kZ as To,k_ as Eo,k$ as Co,l0 as vo,l1 as wo,aC as So,K as M,bS as ve,l2 as Lo,l3 as se,l4 as X,l5 as ye,l6 as _o,l7 as ko,l8 as Ao,bT as No,l9 as le,bV as pn,la as fn,lb as mn,bd as gn,lc as pe,ld as $o,le as Ro,bi as ie,co as Io,I as Le,e4 as hn,C as Po,e as Oo,bX as Mo,k as Do,lf as Bo,lg as jo,bW as ze,lh as Uo,li as xt,d5 as Fo,el as zo,T as Ho,lj as Tt,lk as qo,ll as Wo,lm as Xo,ln as Et,lo as Jo,lp as Vo,av as Yo,aw as Go,aq as Zo,aB as Ko}from"../datalayer-app-main.js";import{CollapsiblePlugin as Om}from"./index-CxIZHPCc.js";import{u as Qo,N as Ct}from"./usePrimerThemeBridge-CoHussa9.js";import{u as er}from"./Output-C4hBhZ5k.js";import{T as tr}from"./ThemeContext-D9ztCaU3.js";import{a as Dm,u as Bm}from"./ThemeContext-D9ztCaU3.js";import{YouTubePlugin as Um}from"./YouTubePlugin-CjgOnMCz.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./url-DuKx0yk0.js";import"./isSymbol-BLtK9CV6.js";import"./toNumber-B1wj8-wx.js";import"./VideoIcon-BjP_LDa4.js";import"./LinkIcon-DUI0jw25.js";import"./Toolbar-CGQDY041.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./ArrowUpIcon-BUCpIXDR.js";import"./SortDescIcon-CS4EzHeS.js";import"./PaintbrushIcon-CLU8RilX.js";import"./PrismCss-CcU1ChRk.js";import"./index-DMf0f7ny.js";import"./hoverbox-CStlKQWE.js";import"./index-C7os26P7.js";import"./index-DpJpQnPn.js";import"./color-CG7_7V2-.js";import"./isEqual-D0eOPSLC.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";class nr{registry;_debug;constructor(t,n=!1){this.registry=t,this._debug=n}calculateIndent(t){const n=this.registry.getConfigOrDefault(t.language),s=this.getLeadingWhitespaceCount(t.currentLine);let o=s,r=!1,i=!1,l;for(const a of n.indentTriggers)if(this.matchesIndentRule(t.currentLine,a)){o=s+a.indentAmount,r=!0,l=a.name;break}if(!r){for(const a of n.dedentTriggers)if(this.matchesDedentRule(t.currentLine,a)){i=!0,l=a.name;break}}if(n.customRules){for(const a of n.customRules)if(a.condition(t.currentLine,t)){o=a.apply(o,t);break}}return o=Math.max(0,o),{spaces:o,shouldIndent:r,shouldDedent:i,triggeredRule:l}}getTabString(t){const n=this.registry.getConfigOrDefault(t);return n.useTabs?" ":" ".repeat(n.tabSize)}getTabSize(t){return this.registry.getConfigOrDefault(t).tabSize}calculateOutdent(t,n){const s=this.registry.getConfigOrDefault(n),o=t-s.tabSize;return Math.max(0,o)}getLeadingWhitespaceCount(t){const n=t.match(/^[\t ]*/);if(!n)return 0;const s=n[0];let o=0;for(const r of s)r===" "?o+=4:o+=1;return o}getLeadingWhitespace(t){const n=t.match(/^[\t ]*/);return n?n[0]:""}matchesIndentRule(t,n){switch(n.context){case"line-end":return n.pattern.test(t);case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}matchesDedentRule(t,n){switch(n.context){case"line-start":return n.pattern.test(t);case"anywhere":return n.pattern.test(t);default:return!1}}normalizeIndentation(t,n){const s=this.registry.getConfigOrDefault(n);if(s.useTabs){const o=this.getLeadingWhitespace(t),r=o.length,i=Math.floor(r/s.tabSize),l=r%s.tabSize;return" ".repeat(i)+" ".repeat(l)+t.substring(o.length)}else{const o=this.getLeadingWhitespace(t);return o.replace(/\t/g," ".repeat(s.tabSize)).concat(t.substring(o.length))}}}const sr={language:"python",tabSize:4,useTabs:!1,indentTriggers:[{name:"colon-indent",pattern:/:\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"continuation-backslash",pattern:/\\\s*(#.*)?$/,context:"line-end",indentAmount:4},{name:"open-bracket",pattern:/[[({]\s*$/,context:"line-end",indentAmount:4}],dedentTriggers:[{name:"flow-control-keywords",pattern:/^\s*(return|break|continue|pass)(\s|$)/,context:"line-start",dedentAmount:4},{name:"raise-keyword",pattern:/^\s*raise(\s|$)/,context:"line-start",dedentAmount:4}],customRules:[{name:"close-bracket-dedent",condition:e=>/^\s*[\])}]/.test(e),apply:e=>Math.max(0,e-4)}]},bn={language:"javascript",tabSize:2,useTabs:!1,indentTriggers:[{name:"open-brace",pattern:/\{\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-bracket",pattern:/\[\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"open-paren",pattern:/\(\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"arrow-function",pattern:/=>\s*(\/\/.*)?$/,context:"line-end",indentAmount:2},{name:"ternary-operator",pattern:/\?\s*(\/\/.*)?$/,context:"line-end",indentAmount:2}],dedentTriggers:[{name:"return-statement",pattern:/^\s*return(\s|;)/,context:"line-start",dedentAmount:2},{name:"break-continue",pattern:/^\s*(break|continue)(\s|;)/,context:"line-start",dedentAmount:2},{name:"throw-statement",pattern:/^\s*throw(\s|;)/,context:"line-start",dedentAmount:2}],customRules:[{name:"close-brace-dedent",condition:e=>/^\s*}/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-bracket-dedent",condition:e=>/^\s*\]/.test(e),apply:e=>Math.max(0,e-2)},{name:"close-paren-dedent",condition:e=>/^\s*\)/.test(e),apply:e=>Math.max(0,e-2)},{name:"case-label",condition:e=>/^\s*(case\s+.*:|default:)/.test(e),apply:(e,t)=>e}]},or={...bn,language:"typescript"};class rr{configs;options;constructor(t={}){this.configs=new Map,this.options={defaultLanguage:"python",fallbackTabSize:4,debug:!1,...t},this.registerDefaultLanguages(),t.customConfigs&&t.customConfigs.forEach(n=>this.registerLanguage(n))}registerDefaultLanguages(){this.registerLanguage(sr),this.registerLanguage(bn),this.registerLanguage(or),this.registerAlias("py","python"),this.registerAlias("js","javascript"),this.registerAlias("ts","typescript"),this.registerAlias("jsx","javascript"),this.registerAlias("tsx","typescript")}registerLanguage(t){if(this.configs.has(t.language)){this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t.language}' already registered. Use updateConfig() to modify.`);return}this.configs.set(t.language,t)}registerAlias(t,n){const s=this.configs.get(n);s&&this.configs.set(t,s)}getConfig(t){if(!t)return this.getConfig(this.options.defaultLanguage);const n=t.toLowerCase().trim();return this.configs.get(n)}getConfigOrDefault(t){const n=this.getConfig(t);if(n)return n;const s=this.getConfig(this.options.defaultLanguage);return s?(this.options.debug&&console.warn(`[LanguageIndentRegistry] Language '${t}' not found, using default: ${this.options.defaultLanguage}`),s):(this.options.debug&&console.error(`[LanguageIndentRegistry] No config found for '${t}' and default '${this.options.defaultLanguage}' missing!`),this.createFallbackConfig(t||"unknown"))}createFallbackConfig(t){return{language:t,tabSize:this.options.fallbackTabSize||4,useTabs:this.options.preserveTabs||!1,indentTriggers:[],dedentTriggers:[]}}hasLanguage(t){if(!t)return!1;const n=t.toLowerCase().trim();return this.configs.has(n)}updateConfig(t,n){const s=t.toLowerCase().trim(),o=this.configs.get(s);if(!o)return this.options.debug&&console.warn(`[LanguageIndentRegistry] Cannot update '${t}' - not registered`),!1;const r={...o,...n,language:o.language};return this.configs.set(s,r),!0}getRegisteredLanguages(){return Array.from(this.configs.keys())}clear(){this.configs.clear()}reset(){this.clear(),this.registerDefaultLanguages()}}const ir="[Deleted Comment]",Qe=e=>e.uid===e.thread_uid,yn=e=>e.anchor?.mark_id??e.uid,ar=(e,t)=>e.created_at!==t.created_at?e.created_at<t.created_at?-1:1:e.uid<t.uid?-1:e.uid>t.uid?1:0,He=(e,t)=>e!==void 0&&e.updated_at>t.updated_at?e:t,vt=e=>{const{uid:t,handle:n,name:s,agent_uid:o}=e.author;return t?{kind:"user",uid:t,handle:n??null,name:s??null,...o?{agentUid:o}:{}}:Bn(s||n)},lr=e=>({type:"comment",id:e.uid,author:Dn(vt(e)),authorPrincipal:vt(e),content:e.deleted?ir:e.body,deleted:e.deleted,...e.mentions&&e.mentions.length>0?{mentions:e.mentions}:{},timeStamp:Date.parse(e.created_at)});function cr(e){const t=[...e].sort(ar),n=new Map;for(const s of t)Qe(s)||n.set(s.thread_uid,[...n.get(s.thread_uid)??[],s]);return t.filter(s=>Qe(s)&&!s.deleted&&s.status==="open").map(s=>({type:"thread",id:yn(s),quote:s.quote??"",assignee:s.assignee??null,comments:[s,...n.get(s.uid)??[]].map(lr)}))}const wt=e=>e&&e.length>0?{mentions:e}:{};class dl{searchPeople;assignThread;_editor;_backend;_options;_listeners=new Set;_heardDuringReads=new Set;_records=new Map;_comments=[];constructor(t,n,s={}){this._editor=t,this._backend=n,this._options=s;const{searchPeople:o,assign:r}=n;o&&(this.searchPeople=i=>o.call(n,i).catch(l=>{throw this._options.onError?.(l),l})),r&&(this.assignThread=(i,l)=>this._write(()=>r.call(n,this._threadRecord(i).uid,l?.uid??null)))}connect(){const t=this._backend.subscribe({comment:n=>this._heard(n),ready:()=>{this.refresh()}});return this.refresh(),t}async refresh(){const t=new Map;this._heardDuringReads.add(t);try{const n=await this._backend.list(),s=new Map(n.map(o=>[o.uid,o]));for(const[o,r]of t)s.set(o,He(s.get(o),r));this._records=s,this._changed()}catch(n){this._options.onError?.(n)}finally{this._heardDuringReads.delete(t)}}getComments(){return this._comments}addComment(t,n){if(t.type==="thread"){const s=t.id,o=t.comments[0];this._write(()=>this._backend.create({body:o?.content??"",anchor:{mark_id:s},quote:t.quote,...wt(o?.mentions)}),()=>this._unmark(s))}else n!==void 0?this._write(()=>this._backend.create({body:t.content,thread_uid:this._threadRecord(n).uid,...wt(t.mentions)})):this._options.onError?.(new Error("A comment is written in a thread."))}deleteComment(t){this._write(()=>this._backend.delete(t.id))}deleteThread(t){this._write(()=>this._backend.delete(this._threadRecord(t).uid))}resolveThread(t){this._write(()=>this._backend.resolve(this._threadRecord(t).uid))}registerOnChange(t){return this._listeners.add(t),()=>{this._listeners.delete(t)}}_write(t,n){Promise.resolve().then(t).then(s=>this._heard(s),s=>{n?.(),this._options.onError?.(s)})}_threadRecord(t){for(const n of this._records.values())if(Qe(n)&&yn(n)===t.id)return n;throw new Error(`The thread ${t.id} is not one the store read.`)}_heard(t){for(const n of this._heardDuringReads)n.set(t.uid,He(n.get(t.uid),t));this._records.set(t.uid,He(this._records.get(t.uid),t)),this._changed()}_changed(){this._comments=cr(this._records.values());for(const t of this._listeners)t()}_unmark(t){this._editor.update(()=>{for(const{node:n}of io())qt(n)&&n.getIDs().includes(t)&&(n.deleteID(t),n.getIDs().length===0&&Mn(n))})}}const dt=m.createContext(void 0);function ur(){const e=m.useContext(dt);if(!e)throw new Error("useContext must be inside a Provider with a value");return e}const dr=dt.Provider,pl=dt.Consumer,fl=({children:e})=>{const[t,n]=m.useState();return h.jsx(dr,{value:{editor:t,setEditor:n},children:e})};function ml(e){const{useStore:t,children:n}=e,{colorMode:s,resolvedMode:o,themeConfig:r,themeBackground:i,lexicalTheme:l}=Qo(t);return h.jsx(ao,{colorMode:s,theme:r.primerTheme,themeStyles:r.themeStyles,children:h.jsx(lo,{colormode:o,backgroundColor:i,useBaseStyles:!1,children:h.jsx(co,{sx:{"& .editor-shell":{backgroundColor:i,borderRadius:2},"& .editor-container":{backgroundColor:i},"& .editor-inner":{backgroundColor:i},"& .editor-input":{backgroundColor:i},'& [role="toolbar"][aria-label="Editor toolbar"]':{backgroundColor:i}},children:h.jsx(tr.Provider,{value:{theme:l},children:n})})})})}const pr={"\\":"\\textbackslash{}","{":"\\{","}":"\\}",$:"\\$","&":"\\&","#":"\\#","^":"\\^{}",_:"\\_","%":"\\%","~":"\\~{}"};function K(e){return e.replace(/[\\{}$&#^_%~]/g,t=>pr[t]??t)}function pt(e,t,n="{",s="}"){let o=0;for(let r=t;r<e.length;r++){const i=e[r];if(i==="\\"){r++;continue}if(i===n)o++;else if(i===s&&(o--,o===0))return r}return-1}function W(e,t){let n=t;for(;n<e.length&&(e[n]===" "||e[n]===`
|
|
2
2
|
`);)n++;if(e[n]!=="{")return null;const s=pt(e,n);return s===-1?null:{value:e.slice(n+1,s),end:s+1}}function ne(e,t){let n=t;for(;n<e.length&&e[n]===" ";)n++;if(e[n]!=="[")return null;const s=pt(e,n,"[","]");return s===-1?null:{value:e.slice(n+1,s),end:s+1}}function xn(e){return e.split(`
|
|
3
3
|
`).map(t=>{for(let n=0;n<t.length;n++){if(t[n]==="\\"){n++;continue}if(t[n]==="%")return t.slice(0,n)}return t}).join(`
|
|
4
4
|
`)}function Tn(e,t){if(!e)return null;const n=new RegExp(`(?:^|,)\\s*${t}\\s*=\\s*([^,]+)`).exec(e);return n?n[1].trim():null}function oe(e,t,n){const s=[];let o=t;for(let r=0;r<n;r++){const i=W(e,o);if(!i)break;s.push(i.value),o=i.end}return{values:s,end:o}}function fr(e){const t=e.indexOf("\\begin{document}");if(t===-1)return{body:e,preamble:""};const n=t+16,s=e.lastIndexOf("\\end{document}");return{body:s===-1?e.slice(n):e.slice(n,s),preamble:e.slice(0,t)}}function En(e){return e.charAt(0).toUpperCase()+e.slice(1)}const mr=new Set(["book","report","memoir","scrbook","scrreprt","amsbook","thesis","mitthesis","phdthesis","bookest"]);function Cn(e,t){return mr.has((e??"").toLowerCase())||t!==void 0&&/(?<!\\)\\chapter\b/.test(t)}const gr={h1:"section",h2:"subsection",h3:"subsubsection",h4:"paragraph",h5:"subparagraph",h6:"subparagraph"},hr={h1:"chapter",h2:"section",h3:"subsection",h4:"subsubsection",h5:"paragraph",h6:"subparagraph"},br={part:"h1",chapter:"h1",section:"h1",subsection:"h2",subsubsection:"h3",paragraph:"h4",subparagraph:"h5"},yr={part:"h1",chapter:"h1",section:"h2",subsection:"h3",subsubsection:"h4",paragraph:"h5",subparagraph:"h6"};function xr(e){return e?{js:"JavaScript",javascript:"JavaScript",ts:"TypeScript",typescript:"TypeScript",py:"Python",python:"Python",sh:"bash",bash:"bash",r:"R",sql:"SQL",c:"C",cpp:"C++",java:"Java",html:"HTML",xml:"XML",json:"JSON",markdown:"Markdown",md:"Markdown"}[e.toLowerCase()]??e:null}function ft(e){return e.replace(/^\n/,"").replace(/\n[ \t]*$/,"")}function Tr(e){if(uo(e))return St(e.text);if(po(e)||fo(e)){const t=e.data["text/plain"];return t===void 0?null:St(t)}return mo(e)?e.traceback.join(`
|
|
@@ -9,7 +9,7 @@ ${e}
|
|
|
9
9
|
\\end{verbatim}`}function Ee(e,t){const n=[];let s=0,o=0,r="";for(let i=0;i<e.length;i++){const l=e[i];if(l==="\\"){if(e.startsWith("\\begin{",i)?o++:e.startsWith("\\end{",i)&&o--,e.startsWith(t,i)&&s===0&&o===0){n.push(r),r="",i+=t.length-1;continue}r+=l+(e[i+1]??""),i++;continue}if(l==="{"?s++:l==="}"&&s--,!t.startsWith("\\")&&e.startsWith(t,i)&&s===0&&o===0){n.push(r),r="",i+=t.length-1;continue}r+=l}return n.push(r),n}function mt(e){const t=[],n=[];for(const s of e)(ae(s)||it(s)||Q(s))&&z(s)?(t.length>0&&t.push(fe()),t.push(...s.getChildren())):n.push(s);return{inline:t,rest:n}}const Cr={type:"element",dependencies:[me],export:(e,t)=>Q(e)?`\\${(t.chapters?hr:gr)[e.getTag()]??"section"}{${t.exportChildren(e)}}`:null,import:{kind:"line",regExp:/^\\(part|chapter|section|subsection|subsubsection|paragraph|subparagraph)\*?\s*(?:\[[^\]]*\])?\s*\{/,replace:(e,t,{importInline:n,chapters:s})=>{const o=W(t,e[0].length-1),i=Ce((s?yr:br)[e[1]]??"h1");return i.append(...n(o?o.value:"")),[i]}}},vr={type:"element",dependencies:[Wt],export:(e,{exportChildren:t})=>it(e)?`\\begin{quote}
|
|
10
10
|
${t(e)}
|
|
11
11
|
\\end{quote}`:null,import:{kind:"environment",names:["quote","quotation","abstract","verse"],replace:(e,{importBlocks:t})=>{const{inline:n,rest:s}=mt(t(e.body)),o=Kt();return o.append(...n),[o,...s]}}},wn="$\\boxtimes$",Sn="$\\square$";function Ln(e,t,n){const s=" ".repeat(n),o=e.getListType()==="number"?"enumerate":"itemize",r=[`${s}\\begin{${o}}`];for(const i of e.getChildren()){if(!cs(i))continue;const l=i.getFirstChild();if(i.getChildrenSize()===1&&xe(l)){r.push(Ln(l,t,n+1));continue}let d="";e.getListType()==="check"&&(d=`[${i.getChecked()?wn:Sn}]`),r.push(`${s} \\item${d} ${t.exportChildren(i)}`.trimEnd())}return r.push(`${s}\\end{${o}}`),r.join(`
|
|
12
|
-
`)}function wr(e,t,n,s=!1){const o=at(t),r=Ee(e,"\\item").slice(1);for(const i of r){let l=i,d,a=null;const c=/^\s*\[/.test(l)?_n(l):null;if(c){const C=c.value.trim();C===wn||/checkmark|boxtimes|CheckedBox/.test(C)?d=!0:C===Sn||/square|Box\b/.test(C)?d=!1:(s||C)&&(a=C),l=l.slice(c.end)}const u=n.importBlocks(l),{inline:f,rest:y}=mt(u),E=Re(t==="check"||d!==void 0?d??!1:void 0);a&&E.append(...n.importInline(a).map(de),
|
|
12
|
+
`)}function wr(e,t,n,s=!1){const o=at(t),r=Ee(e,"\\item").slice(1);for(const i of r){let l=i,d,a=null;const c=/^\s*\[/.test(l)?_n(l):null;if(c){const C=c.value.trim();C===wn||/checkmark|boxtimes|CheckedBox/.test(C)?d=!0:C===Sn||/square|Box\b/.test(C)?d=!1:(s||C)&&(a=C),l=l.slice(c.end)}const u=n.importBlocks(l),{inline:f,rest:y}=mt(u),E=Re(t==="check"||d!==void 0?d??!1:void 0);a&&E.append(...n.importInline(a).map(de),U(" ")),E.append(...f),o.append(E);for(const C of y)if(xe(C)){const L=Re();L.append(C),o.append(L)}else z(C)&&E.append(fe(),...C.getChildren())}return o}function de(e){return j(e)&&!e.hasFormat("bold")&&e.toggleFormat("bold"),e}function et(e){return j(e)&&!e.hasFormat("italic")&&e.toggleFormat("italic"),e}function _n(e){const t=e.indexOf("[");let n=0;for(let s=t;s<e.length;s++)if(e[s]==="[")n++;else if(e[s]==="]"&&(n--,n===0))return{value:e.slice(t+1,s),end:s+1};return null}const Sr={type:"element",dependencies:[ot,rt],export:(e,t)=>xe(e)?Ln(e,t,0):null,import:{kind:"environment",names:["itemize","enumerate","description"],replace:(e,t)=>{const s=/\\item\s*\[\s*\$\\(boxtimes|square)\$\s*\]/.test(e.body)?"check":e.name==="enumerate"?"number":"bullet";return[wr(e.body,s,t,e.name==="description")]}}},Lr={type:"element",dependencies:[Xt,Fn],export:e=>Kn(e)?vn(e.getTextContent(),e.getLanguage()):null,import:{kind:"environment",names:["verbatim","Verbatim","alltt"],replace:e=>{const t=lt();return t.append(U(ft(e.body))),[t]}}},_r={type:"element",dependencies:[jn],export:e=>Be(e)?vn(e.getTextContent(),e.getLanguage()??"python"):null,import:{kind:"environment",names:["lstlisting","minted","pythoncode","code"],replace:e=>{const t=e.name==="minted"?e.argument:Tn(e.options,"language"),n=Zn(t?t.toLowerCase():"python");return n.append(U(ft(e.body))),[n]}}},kr={type:"element",dependencies:[Un],export:e=>{if(!Ve(e))return null;const t=e.getOutputs().map(Tr).filter(n=>n!==null&&n.trim()!=="");return t.length===0?e.getOutputs().length>0?"% [output omitted]":"":Er(t.join(`
|
|
13
13
|
`).replace(/\n$/,""))}},Ar={type:"element",dependencies:[qn],export:e=>un(e)?"\\noindent\\hrulefill":null,import:{kind:"line",regExp:/^(\\noindent\s*)?(\\hrulefill|\\hrule|\\rule\{[^}]*\}\{[^}]*\}|\\hline)$/,replace:()=>[ns()]}};function Nr(e,t){const n=e.getChildren().filter(us),s=i=>Math.max(1,i.getColSpan()),o=Math.max(1,...n.map(i=>i.getChildren().filter(Ze).reduce((l,d)=>l+s(d),0))),r=[`\\begin{tabular}{|${"l|".repeat(o)}}`,"\\hline"];return n.forEach((i,l)=>{const d=i.getChildren().filter(Ze),a=d.length>0&&d.every(u=>u.hasHeaderState(Ge.ROW)),c=d.map(u=>{const f=u.getChildren().map(y=>z(y)?t.exportChildren(y):t.exportBlock(y)).filter(Boolean).join(" ");return s(u)>1?`\\multicolumn{${s(u)}}{l}{${f}}`:f});r.push(`${c.join(" & ")} \\\\`),(a||l===n.length-1)&&r.push("\\hline")}),r.push("\\end{tabular}"),r.join(`
|
|
14
14
|
`)}function $r(e,t){const n=e.body.replace(/\\(toprule|midrule|bottomrule)/g,"\\hline"),s=Ee(n,"\\\\").map(i=>i.replace(/^\s*\[[^\]]*\]/,"")).map(i=>({hlineBefore:/^\s*\\hline/.test(i),text:i.replace(/\\hline/g,"").trim()})).filter(i=>i.text!=="");if(s.length===0)return[];const o=Qn(),r=s.length>1&&s[1].hlineBefore;return s.forEach((i,l)=>{const d=es();for(const a of Ee(i.text,"&")){let c=a.trim(),u=1;const f=/^\\multicolumn\s*\{/.exec(c);if(f){const C=oe(c,f[0].length-1,3);u=Math.max(1,Number(C.values[0])||1),c=C.values[2]??""}const y=ts(l===0&&r?Ge.ROW:Ge.NO_STATUS,u),E=ee();E.append(...t.importInline(c)),y.append(E),d.append(y)}o.append(d)}),[o]}const Rr={type:"element",dependencies:[Jt,zn,Hn],export:(e,t)=>Ye(e)?Nr(e,t):null,import:{kind:"environment",names:["tabular","tabularx","longtable","tabulary"],replace:$r}},Ir={type:"element",dependencies:[],export:()=>null,import:{kind:"environment",names:["table","table*","center","flushleft","flushright","titlepage"],replace:(e,{importBlocks:t})=>t(e.body.replace(/\\caption\{/g,"\\textit{").replace(/\\centering/g,""))}},Pr={type:"element",dependencies:[Vt],export:e=>{if(!ae(e)||e.getChildrenSize()!==1)return null;const t=e.getFirstChild();if(!en(t))return null;const n=t.getAltText()?`
|
|
15
15
|
\\caption{${K(t.getAltText())}}`:"";return`\\begin{figure}[h]
|
|
@@ -19,19 +19,19 @@ ${t(e)}
|
|
|
19
19
|
${t.getEquation()}
|
|
20
20
|
\\]`},import:{kind:"environment",names:["equation","equation*","align","align*","gather","gather*","multline","multline*","eqnarray","eqnarray*","displaymath","math"],replace:e=>{const t=ee(),n=e.name.replace(/\*$/,""),s={align:"aligned",eqnarray:"aligned",gather:"gathered",multline:"gathered"},o=e.body.trim(),r=s[n]?`\\begin{${s[n]}}${o}\\end{${s[n]}}`:o;return t.append(tn(r,e.name==="math")),[t]}}},Mr={type:"element",dependencies:[Wn],export:e=>nn(e)?`\\url{https://www.youtube.com/watch?v=${e.getId()}}`:null,import:{kind:"line",regExp:/^\\(?:url|href)\{https?:\/\/(?:www\.)?(?:youtube\.com\/watch\?v=|youtu\.be\/)([A-Za-z0-9_-]{6,})[^}]*\}(?:\{[^}]*\})?$/,replace:e=>[ss(e[1])]}},Dr={type:"element",dependencies:[Gt],export:(e,t)=>{if(!ls(e))return null;const[n,s]=e.getChildren(),o=n?`\\paragraph{${K(n.getTextContent())}}`:"",r=z(s)?t.exportBlocks(s.getChildren()):"";return[o,r].filter(Boolean).join(`
|
|
21
21
|
|
|
22
|
-
`)}},Br={type:"text-format",format:"code",command:"texttt",aliases:["lstinline","mintinline"]},jr={type:"text-format",format:"bold",command:"textbf",aliases:["bf","bfseries"]},
|
|
22
|
+
`)}},Br={type:"text-format",format:"code",command:"texttt",aliases:["lstinline","mintinline"]},jr={type:"text-format",format:"bold",command:"textbf",aliases:["bf","bfseries"]},Ur={type:"text-format",format:"italic",command:"textit",aliases:["emph","it","itshape","textsl"]},Fr={type:"text-format",format:"underline",command:"underline",aliases:["uline"]},zr={type:"text-format",format:"strikethrough",command:"sout",aliases:["st"]},Hr={type:"text-format",format:"superscript",command:"textsuperscript"},qr={type:"text-format",format:"subscript",command:"textsubscript"},Wr={type:"text-format",format:"highlight",command:"hl"},Xr={type:"text-match",dependencies:[Yt],export:e=>Ie(e)?e.__inline?`$${e.getEquation()}$`:`\\[${e.getEquation()}\\]`:null,importMath:(e,t)=>tn(e,!t)},Jr={type:"text-match",dependencies:[Vt],export:e=>en(e)?`\\includegraphics[width=\\linewidth]{${e.getSrc()}}`:null,importCommand:{names:["includegraphics"],replace:e=>e[0]?Qt({altText:"",maxWidth:800,src:e[0].trim()}):null}},Vr={type:"text-match",dependencies:[Vn,Zt],export:(e,{exportChildren:t})=>Y(e)?`\\href{${e.getURL()}}{${t(e)}}`:null,importCommand:{names:["href","url"],replace:(e,t,{importInline:n})=>{const s=(e[0]??"").trim();if(!s)return null;const o=sn(s),r=e.length>1?e[1]:s;return o.append(...n(r)),o}}};function Yr(e){const t=e.reduce((n,s)=>n+s,0)||e.length;return e.map(n=>`${Math.max(1,Math.round(n/t*100))}fr`).join(" ")}function $e(e){const t=Yn();return t.append(...e.length>0?e:[ee()]),t}function Me(e,t){const n=Gn(Yr(t));for(const s of e)s.isEmpty()&&s.append(ee()),n.append(s);return n}function kn(e,t){const n=Math.max(1,Math.ceil(e.length/t)),s=[];for(let o=0;o<t;o++)s.push(e.slice(o*n,(o+1)*n));return s}function Lt(e){if(!e)return 1;const t=/^\s*(?:(\d+(?:\.\d*)?|\.\d+)\s*)?\\(?:text|line|column|paper)width/.exec(e);return t&&t[1]?Number(t[1]):1}function G(e){const t=ee();return t.append(...e),t}function Gr(e,t){const n=[],s=(r,i)=>{const l=Ce(r);l.append(...t.importInline(i)),n.push(l)};if(e.name?(s("h1",e.name),e.title&&s("h3",e.title)):e.title&&(s("h1",e.title),e.subtitle&&s("h3",e.subtitle)),e.author){const r=e.author.split(/\\and\b/).map(i=>i.trim()).join(", ");n.push(G(t.importInline(r).map(et)))}e.institute&&n.push(G(t.importInline(e.institute))),e.date&&n.push(G(t.importInline(e.date)));const o=[e.address,e.phone,e.email,e.homepage].filter(r=>!!r).join(" · ");return o&&n.push(G(t.importInline(o))),n}const Zr={type:"element",dependencies:[],export:()=>null,import:{kind:"line",regExp:/^\\(title|subtitle|author|date|institute)\s*(?:\[[^\]]*\])?\s*\{/,replace:(e,t,n)=>{const s=e[1],o=W(t,e[0].length-1);return o&&(n.document[s]=o.value),[]}}},Kr={type:"element",dependencies:[me],export:()=>null,import:{kind:"line",regExp:/^\\(maketitle|titlepage|makecvtitle|maketitlepage)(?![A-Za-z])/,replace:(e,t,n)=>Gr(n.document,n)}},Qr={type:"element",dependencies:[Xn,Jn],export:(e,t)=>{if(os(e)){const n=e.getChildren().filter(Pe),s=n.map(o=>t.exportBlocks(o.getChildren()));return`\\begin{multicols}{${Math.max(1,n.length)}}
|
|
23
23
|
${s.join(`
|
|
24
24
|
\\columnbreak
|
|
25
25
|
`)}
|
|
26
|
-
\\end{multicols}`}return Pe(e)?t.exportBlocks(e.getChildren()):null},import:{kind:"environment",names:["multicols","multicols*","columns","column","minipage","paracol"],replace:(e,t)=>{if(e.name.startsWith("multicols")||e.name==="paracol"){const s=Math.max(1,Number(e.argument)||2),o=Ee(e.body,"\\columnbreak"),r=o.length>1?o.map(i=>t.importBlocks(i)):kn(t.importBlocks(e.body),s);return[Me(r.map($e),r.map(()=>1))]}if(e.name==="columns"){if(/\\column\s*\{/.test(e.body)&&!/\\begin\{column\}/.test(e.body)){const s=e.body.split(/\\column\s*\{([^{}]*)\}/).slice(1),o=[],r=[];for(let i=0;i+1<s.length;i+=2)o.push($e(t.importBlocks(s[i+1]))),r.push(Lt(s[i]));return o.length>0?[Me(o,r)]:[]}return t.importBlocks(e.body)}const n=$e(t.importBlocks(e.body));return t.columnWeights.set(n,Lt(e.argument)),[n]}}},ei=["theorem","lemma","proposition","corollary","definition","example","remark","claim","exercise","solution","note","conjecture","proof"],ti={type:"element",dependencies:[Wt],export:()=>null,import:{kind:"environment",names:ei.flatMap(e=>[e,`${e}*`]),replace:(e,t)=>{const n=e.name.replace(/\*$/,""),{inline:s,rest:o}=mt(t.importBlocks(e.body)),r=Kt(),i=
|
|
26
|
+
\\end{multicols}`}return Pe(e)?t.exportBlocks(e.getChildren()):null},import:{kind:"environment",names:["multicols","multicols*","columns","column","minipage","paracol"],replace:(e,t)=>{if(e.name.startsWith("multicols")||e.name==="paracol"){const s=Math.max(1,Number(e.argument)||2),o=Ee(e.body,"\\columnbreak"),r=o.length>1?o.map(i=>t.importBlocks(i)):kn(t.importBlocks(e.body),s);return[Me(r.map($e),r.map(()=>1))]}if(e.name==="columns"){if(/\\column\s*\{/.test(e.body)&&!/\\begin\{column\}/.test(e.body)){const s=e.body.split(/\\column\s*\{([^{}]*)\}/).slice(1),o=[],r=[];for(let i=0;i+1<s.length;i+=2)o.push($e(t.importBlocks(s[i+1]))),r.push(Lt(s[i]));return o.length>0?[Me(o,r)]:[]}return t.importBlocks(e.body)}const n=$e(t.importBlocks(e.body));return t.columnWeights.set(n,Lt(e.argument)),[n]}}},ei=["theorem","lemma","proposition","corollary","definition","example","remark","claim","exercise","solution","note","conjecture","proof"],ti={type:"element",dependencies:[Wt],export:()=>null,import:{kind:"environment",names:ei.flatMap(e=>[e,`${e}*`]),replace:(e,t)=>{const n=e.name.replace(/\*$/,""),{inline:s,rest:o}=mt(t.importBlocks(e.body)),r=Kt(),i=U(n==="proof"?"Proof.":`${En(n)}${e.options?` (${e.options})`:""}.`);return i.toggleFormat(n==="proof"?"italic":"bold"),r.append(i,U(" "),...s),n==="proof"&&r.append(U(" ∎")),[r,...o]}}},ni={type:"element",dependencies:[ot,rt,me],export:()=>null,import:{kind:"environment",names:["thebibliography"],replace:(e,t)=>{const n=at("number");for(const o of Ee(e.body,"\\bibitem").slice(1)){let r=o;const i=/^\s*\[/.test(r)?_n(r):null;i&&(r=r.slice(i.end));const l=W(r,0);l&&(r=r.slice(l.end));const d=Re();d.append(...t.importInline(r.trim())),n.append(d)}const s=Ce("h2");return s.append(U("References")),[s,n]}}},si={type:"element",dependencies:[me],export:()=>null,import:{kind:"environment",names:["frame"],replace:(e,t)=>{const n=[];if(e.argument&&e.argument.trim()){const s=Ce("h2");s.append(...t.importInline(e.argument)),n.push(s)}return n.push(...t.importBlocks(e.body)),n}}},oi={type:"element",dependencies:[me],export:()=>null,import:{kind:"line",regExp:/^\\(frametitle|framesubtitle)\s*\{/,replace:(e,t,n)=>{const s=W(t,e[0].length-1),o=Ce(e[1]==="frametitle"?"h2":"h3");return o.append(...n.importInline(s?s.value:"")),[o]}}},ri={type:"element",dependencies:[Gt],export:()=>null,import:{kind:"environment",names:["block","alertblock","exampleblock","tcolorbox","mdframed","infobox"],replace:(e,t)=>{const n=e.argument&&e.argument.trim()||Tn(e.options,"title")||En(e.name.replace(/block$/,"")||"note"),s=rs(!0),o=is();o.append(...t.importInline(n));const r=as(),i=t.importBlocks(e.body);return r.append(...i.length>0?i:[ee()]),s.append(o,r),[s]}}},ii={type:"element",dependencies:[],export:()=>null,import:{kind:"environment",names:["letter"],replace:(e,t)=>{const n=[];return e.argument&&e.argument.trim()&&n.push(G(t.importInline(e.argument))),n.push(...t.importBlocks(e.body)),n}}},ai={type:"element",dependencies:[],export:()=>null,import:{kind:"line",regExp:/^\\(opening|closing|ps|encl|cc)\s*\{/,replace:(e,t,n)=>{const s=W(t,e[0].length-1),o=s?s.value:"",r={cc:"cc: ",encl:"Enclosures: ",ps:"P.S. "},i=[];if(r[e[1]]){const l=U(r[e[1]]);l.toggleFormat("bold"),i.push(G([l,...n.importInline(o)]))}else i.push(G(n.importInline(o)));return e[1]==="closing"&&n.document.signature&&i.push(G(n.importInline(n.document.signature).map(de))),i}}},li={type:"element",dependencies:[ot,rt],export:()=>null,import:{kind:"line",regExp:/^\\(cventry|cvitem|cvitemwithcomment|cvlistitem|cvlistdoubleitem|cvdoubleitem)\s*\{/,replace:(e,t,n)=>{const s=e[0].length-1,o=r=>n.importInline(r);switch(e[1]){case"cventry":{const[r,i,l,d,a,c]=oe(t,s,6).values,u=[...o(i??"").map(de)],f=[l,d].filter(Boolean).join(", ");return f&&u.push(U(" — "),...o(f)),r&&u.push(U(" ("),...o(r),U(")")),a&&u.push(U(", "),...o(a).map(et)),c&&u.push(fe(),...o(c)),[G(u)]}case"cvitem":case"cvitemwithcomment":{const[r,i,l]=oe(t,s,3).values,d=[];return r&&d.push(...o(`${r}: `).map(de)),d.push(...o(i??"")),l&&d.push(U(" — "),...o(l).map(et)),[G(d)]}case"cvdoubleitem":{const[r,i,l,d]=oe(t,s,4).values,a=[];return r&&a.push(...o(`${r}: `).map(de)),a.push(...o(i??"")),l&&a.push(U(" · "),...o(`${l}: `).map(de)),a.push(...o(d??"")),[G(a)]}default:{const r=at("bullet");for(const i of oe(t,s,2).values){const l=Re();l.append(...o(i)),r.append(l)}return[r]}}}}},ci={type:"element",dependencies:[Xt],export:()=>null,import:{kind:"environment",names:["algorithm","algorithm*","algorithmic","algorithm2e","tikzpicture","circuitikz"],replace:e=>{if(e.name==="tikzpicture"||e.name==="circuitikz"){const n=U("[TikZ picture]");return n.toggleFormat("italic"),[G([n])]}const t=lt();return t.append(U(ft(e.body).trim())),[t]}}},ui=[Zr,Kr,Cr,oi,vr,ti,Sr,ni,_r,kr,Lr,ci,Rr,Ir,Pr,Or,Ar,Mr,Qr,si,ri,ii,ai,li,Dr],di=[Br,jr,Ur,Fr,zr,Hr,qr,Wr],pi=[Xr,Jr,Vr],ge=[...ui,...di,...pi];function An(e){return{element:e.filter(t=>t.type==="element"),textFormat:e.filter(t=>t.type==="text-format"),textMatch:e.filter(t=>t.type==="text-match")}}const fi=["\\usepackage[utf8]{inputenc}","\\usepackage[T1]{fontenc}","\\usepackage{amsmath}","\\usepackage{amssymb}","\\usepackage{graphicx}","\\usepackage{hyperref}","\\usepackage{listings}","\\usepackage{multicol}","\\usepackage[normalem]{ulem}","\\usepackage{soul}"],_t="january|february|march|april|may|june|july|august|september|october|november|december",mi=new RegExp(`^(?:\\d{1,2}(?:st|nd|rd|th)?\\s+(?:${_t})\\s+\\d{4}|(?:${_t})\\s+(?:\\d{1,2},?\\s+)?\\d{4}|\\d{4}-\\d{2}-\\d{2}|\\d{1,2}/\\d{1,2}/\\d{2,4})$`,"i");function gi(e){return!ae(e)||e.getChildrenSize()===0?!1:e.getChildren().every(t=>j(t)&&t.hasFormat("italic"))}function hi(e){return ae(e)&&e.getChildrenSize()>0&&e.getChildren().every(t=>j(t))}function bi(e,t,n){const s={title:t.title?K(t.title):null,subtitle:null,author:t.author?K(t.author):null,institute:null,date:t.date?K(t.date):null,consumed:0},o=e[0];if(!(Q(o)&&o.getTag()==="h1"&&(t.title===void 0||o.getTextContent()===t.title)))return s;s.title=n(o);let i=1;const l=e[i];if(Q(l)&&l.getTag()==="h3"&&(s.subtitle=n(l),i++),gi(e[i])){t.author||(s.author=K(e[i].getTextContent())),i++;const d=(t.documentClass??"").toLowerCase()==="beamer";for(let a=0;a<2&&hi(e[i]);a++){const c=e[i].getTextContent().trim();if(mi.test(c)){t.date||(s.date=K(c)),i++;break}if(d&&s.institute===null){s.institute=K(c),i++;continue}break}}return s.consumed=i,s}function yi(e=ge,t={}){const n=An(e),s=a=>a.map(o).filter(c=>c!==null&&c!=="").join(`
|
|
27
27
|
|
|
28
28
|
`),o=a=>{for(const c of n.element){const u=c.export(a,d);if(u!==null)return u}return z(a)?l(a):Te(a)?r(a)??K(a.getTextContent()):null},r=a=>{for(const c of n.textMatch){const u=c.export(a,d);if(u!==null)return u}return null},i=a=>{let c=K(a.getTextContent());if(c==="")return"";for(const u of n.textFormat)a.hasFormat(u.format)&&(c=`\\${u.command}{${c}}`);return c},l=a=>{const c=[];for(const u of a.getChildren())ut(u)?c.push(`\\\\
|
|
29
29
|
`):go(u)?c.push("\\quad{}"):j(u)?c.push(i(u)):z(u)?c.push(r(u)??o(u)??""):Te(u)&&c.push(r(u)??K(u.getTextContent()));return c.join("")},d={exportBlock:o,exportBlocks:s,exportChildren:l,chapters:Cn(t.documentClass)};return()=>{const a=ce().getChildren();if(!t.document)return s(a);const c=bi(a,t,l);return xi(s(a.slice(c.consumed)),t,c)}}function xi(e,t,n){const s=t.documentClass??"article",r=[`\\documentclass${t.classOptions?.length?`[${t.classOptions.join(",")}]`:""}{${s}}`,...fi],{title:i,subtitle:l,author:d,institute:a,date:c}=n,u=s.toLowerCase();if(u==="moderncv"&&i){const f=i.lastIndexOf(" ");r.push(f===-1?`\\name{${i}}{}`:`\\name{${i.slice(0,f)}}{${i.slice(f+1)}}`),l&&r.push(`\\title{${l}}`)}else i&&(l&&u==="beamer"?r.push(`\\title{${i}}`,`\\subtitle{${l}}`):l?r.push(`\\title{${i}\\\\ \\large ${l}}`):r.push(`\\title{${i}}`));return i&&d&&r.push(`\\author{${d}}`),i&&a&&r.push(`\\institute{${a}}`),i&&c&&r.push(`\\date{${c}}`),r.push("","\\begin{document}"),i&&r.push(u==="moderncv"?"\\makecvtitle":"\\maketitle"),r.push("",e,"","\\end{document}",""),r.join(`
|
|
30
|
-
`)}function gl(e=ge,t={}){return yi(e,t)()}const Ti={bold:Co,italic:Eo,underline:To,strikethrough:xo,code:dn,subscript:yo,superscript:bo,highlight:ho,lowercase:0,uppercase:0,capitalize:0},Ei=/^\\(tableofcontents|listoffigures|listoftables|newpage|clearpage|pagebreak|bigskip|medskip|smallskip|centering|raggedright|raggedleft|noindent|vfill|hfill|appendix|frontmatter|mainmatter|backmatter|twocolumn|onecolumn|sloppy|linenumbers|columnbreak|newcolumn|small|footnotesize|scriptsize|tiny|normalsize|large|Large|LARGE|huge|Huge|vspace\*?\{[^}]*\}|label\{[^}]*\}|setlength\{[^}]*\}\{[^}]*\}|setcounter\{[^}]*\}\{[^}]*\}|bibliographystyle\{[^}]*\}|bibliography\{[^}]*\}|pagestyle\{[^}]*\}|thispagestyle\{[^}]*\}|selectlanguage\{[^}]*\}|pagenumbering\{[^}]*\})$/,Ci=new Set(["verbatim","Verbatim","lstlisting","minted","alltt","pythoncode","code","algorithm","algorithmic","algorithm2e","tikzpicture","circuitikz"]),vi={tabular:1,tabularx:2,tabulary:2,longtable:1,minted:1,wrapfigure:2,minipage:1,multicols:1,column:1,frame:1,block:1,alertblock:1,exampleblock:1,letter:1,thebibliography:1},wi={textcolor:2,colorbox:2,parbox:2,raisebox:2,scalebox:2,rotatebox:2,fcolorbox:3,resizebox:3};function Si(e=new Date){return e.toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric"})}function Li(){return{address:null,author:null,classOptions:[],date:null,documentClass:null,email:null,homepage:null,institute:null,macros:[],name:null,phone:null,signature:null,subtitle:null,title:null}}function te(e,t){const s=new RegExp(`\\\\${t}(?![A-Za-z])`).exec(e);if(!s)return null;let o=s.index+s[0].length;const r=ne(e,o);return r&&(o=r.end),W(e,o)?.value??null}function kt(e,t,n){const o=new RegExp(`\\\\${t}(?![A-Za-z])`).exec(e);return o?oe(e,o.index+o[0].length,n).values:[]}function _i(e){const t=[],n=/\\(?:re)?newcommand\*?|\\providecommand\*?|\\DeclareRobustCommand\*?|\\def(?=\\)/g;let s;for(;(s=n.exec(e))!==null;){let o=s.index+s[0].length,r=null;const i=W(e,o);if(i&&/^\\[A-Za-z]+$/.test(i.value.trim()))r=i.value.trim().slice(1),o=i.end;else{const u=/^\s*\\([A-Za-z]+)/.exec(e.slice(o));u&&(r=u[1],o+=u[0].length)}if(!r)continue;let l=0,d=null;const a=ne(e,o);if(a&&/^\d+$/.test(a.value.trim())){l=Number(a.value.trim()),o=a.end;const u=ne(e,o);u&&(d=u.value,o=u.end)}const c=W(e,o);c&&(t.push({arity:l,body:c.value,defaultArg:d,name:r}),n.lastIndex=c.end)}return t}function ki(e,t){if(t.length===0)return e;const n=[...t].sort((o,r)=>r.name.length-o.name.length);let s=e;for(let o=0;o<10;o++){let r=!1;for(const i of n){const l=new RegExp(`\\\\${i.name}(?![A-Za-z])`,"g");let d="",a=0,c;for(;(c=l.exec(s))!==null;){let u=c.index+c[0].length;const f=[];if(i.defaultArg!==null){const g=ne(s,u);f.push(g?g.value:i.defaultArg),g&&(u=g.end)}const y=i.arity-f.length,E=oe(s,u,y);f.push(...E.values),u=E.end;let C=i.body;f.forEach((g,S)=>{C=C.split(`#${S+1}`).join(g)});const L=(/^\s/.test(s.slice(u)),"");d+=s.slice(a,c.index)+C+L,a=u,l.lastIndex=u,r=!0}s=d+s.slice(a)}if(!r)break}return s}function Ai(e){const t=Li(),n=/\\documentclass(?:\[([^[\]\\]*)\])?\{([^{}\\]*)\}/.exec(e);n&&(t.documentClass=n[2].trim(),t.classOptions=(n[1]??"").split(",").map(i=>i.trim()).filter(Boolean));const s=xn(e);t.title=te(s,"title"),t.subtitle=te(s,"subtitle"),t.author=te(s,"author"),t.date=te(s,"date"),t.institute=te(s,"institute"),t.signature=te(s,"signature"),t.email=te(s,"email"),t.homepage=te(s,"homepage"),t.phone=te(s,"phone");const o=kt(s,"address",3);t.address=o.length>0?o.join(", "):null;const r=kt(s,"name",2);return t.name=r.length>0?r.join(" ").trim():null,t.macros=_i(s),t}function Nn(e=ge){const t=An(e),n=new Map,s=[];for(const d of t.element){const a=d.import;if(a)if(a.kind==="environment")for(const c of a.names)n.set(c,a);else s.push(a)}const o=new Map;for(const d of t.textFormat){const a=Ti[d.format];o.set(d.command,a);for(const c of d.aliases??[])o.set(c,a)}const r=new Map;for(const d of t.textMatch)for(const a of d.importCommand?.names??[])r.set(a,d.importCommand);const i=t.textMatch.find(d=>d.importMath),l=(d,a)=>i?.importMath?i.importMath(d,a):
|
|
30
|
+
`)}function gl(e=ge,t={}){return yi(e,t)()}const Ti={bold:Co,italic:Eo,underline:To,strikethrough:xo,code:dn,subscript:yo,superscript:bo,highlight:ho,lowercase:0,uppercase:0,capitalize:0},Ei=/^\\(tableofcontents|listoffigures|listoftables|newpage|clearpage|pagebreak|bigskip|medskip|smallskip|centering|raggedright|raggedleft|noindent|vfill|hfill|appendix|frontmatter|mainmatter|backmatter|twocolumn|onecolumn|sloppy|linenumbers|columnbreak|newcolumn|small|footnotesize|scriptsize|tiny|normalsize|large|Large|LARGE|huge|Huge|vspace\*?\{[^}]*\}|label\{[^}]*\}|setlength\{[^}]*\}\{[^}]*\}|setcounter\{[^}]*\}\{[^}]*\}|bibliographystyle\{[^}]*\}|bibliography\{[^}]*\}|pagestyle\{[^}]*\}|thispagestyle\{[^}]*\}|selectlanguage\{[^}]*\}|pagenumbering\{[^}]*\})$/,Ci=new Set(["verbatim","Verbatim","lstlisting","minted","alltt","pythoncode","code","algorithm","algorithmic","algorithm2e","tikzpicture","circuitikz"]),vi={tabular:1,tabularx:2,tabulary:2,longtable:1,minted:1,wrapfigure:2,minipage:1,multicols:1,column:1,frame:1,block:1,alertblock:1,exampleblock:1,letter:1,thebibliography:1},wi={textcolor:2,colorbox:2,parbox:2,raisebox:2,scalebox:2,rotatebox:2,fcolorbox:3,resizebox:3};function Si(e=new Date){return e.toLocaleDateString("en-US",{day:"numeric",month:"long",year:"numeric"})}function Li(){return{address:null,author:null,classOptions:[],date:null,documentClass:null,email:null,homepage:null,institute:null,macros:[],name:null,phone:null,signature:null,subtitle:null,title:null}}function te(e,t){const s=new RegExp(`\\\\${t}(?![A-Za-z])`).exec(e);if(!s)return null;let o=s.index+s[0].length;const r=ne(e,o);return r&&(o=r.end),W(e,o)?.value??null}function kt(e,t,n){const o=new RegExp(`\\\\${t}(?![A-Za-z])`).exec(e);return o?oe(e,o.index+o[0].length,n).values:[]}function _i(e){const t=[],n=/\\(?:re)?newcommand\*?|\\providecommand\*?|\\DeclareRobustCommand\*?|\\def(?=\\)/g;let s;for(;(s=n.exec(e))!==null;){let o=s.index+s[0].length,r=null;const i=W(e,o);if(i&&/^\\[A-Za-z]+$/.test(i.value.trim()))r=i.value.trim().slice(1),o=i.end;else{const u=/^\s*\\([A-Za-z]+)/.exec(e.slice(o));u&&(r=u[1],o+=u[0].length)}if(!r)continue;let l=0,d=null;const a=ne(e,o);if(a&&/^\d+$/.test(a.value.trim())){l=Number(a.value.trim()),o=a.end;const u=ne(e,o);u&&(d=u.value,o=u.end)}const c=W(e,o);c&&(t.push({arity:l,body:c.value,defaultArg:d,name:r}),n.lastIndex=c.end)}return t}function ki(e,t){if(t.length===0)return e;const n=[...t].sort((o,r)=>r.name.length-o.name.length);let s=e;for(let o=0;o<10;o++){let r=!1;for(const i of n){const l=new RegExp(`\\\\${i.name}(?![A-Za-z])`,"g");let d="",a=0,c;for(;(c=l.exec(s))!==null;){let u=c.index+c[0].length;const f=[];if(i.defaultArg!==null){const g=ne(s,u);f.push(g?g.value:i.defaultArg),g&&(u=g.end)}const y=i.arity-f.length,E=oe(s,u,y);f.push(...E.values),u=E.end;let C=i.body;f.forEach((g,S)=>{C=C.split(`#${S+1}`).join(g)});const L=(/^\s/.test(s.slice(u)),"");d+=s.slice(a,c.index)+C+L,a=u,l.lastIndex=u,r=!0}s=d+s.slice(a)}if(!r)break}return s}function Ai(e){const t=Li(),n=/\\documentclass(?:\[([^[\]\\]*)\])?\{([^{}\\]*)\}/.exec(e);n&&(t.documentClass=n[2].trim(),t.classOptions=(n[1]??"").split(",").map(i=>i.trim()).filter(Boolean));const s=xn(e);t.title=te(s,"title"),t.subtitle=te(s,"subtitle"),t.author=te(s,"author"),t.date=te(s,"date"),t.institute=te(s,"institute"),t.signature=te(s,"signature"),t.email=te(s,"email"),t.homepage=te(s,"homepage"),t.phone=te(s,"phone");const o=kt(s,"address",3);t.address=o.length>0?o.join(", "):null;const r=kt(s,"name",2);return t.name=r.length>0?r.join(" ").trim():null,t.macros=_i(s),t}function Nn(e=ge){const t=An(e),n=new Map,s=[];for(const d of t.element){const a=d.import;if(a)if(a.kind==="environment")for(const c of a.names)n.set(c,a);else s.push(a)}const o=new Map;for(const d of t.textFormat){const a=Ti[d.format];o.set(d.command,a);for(const c of d.aliases??[])o.set(c,a)}const r=new Map;for(const d of t.textMatch)for(const a of d.importCommand?.names??[])r.set(a,d.importCommand);const i=t.textMatch.find(d=>d.importMath),l=(d,a)=>i?.importMath?i.importMath(d,a):U(a?`\\[${d}\\]`:`$${d}$`);return d=>{const{preamble:a,body:c}=fr(d),u=Ai(a),f=new WeakMap,y=p=>{const T=[],v=/(?<!\\)\\begin\{([A-Za-z*]+)\}|(?<!\\)\\\[|(?<!\\)\$\$/g;let x=0;for(;x<p.length;){v.lastIndex=x;const k=v.exec(p),A=k?k.index:p.length;if(T.push(...L(p.slice(x,A))),!k)break;if(k[1]){const I=C(p,k.index,k[1]);if(!I){T.push(...L(p.slice(k.index)));break}const b=n.get(k[1]);T.push(...b?b.replace(I.block,R):y(I.block.body)),x=I.end}else{const I=k[0],b=I==="\\["?"\\]":"$$",N=k.index+I.length,_=p.indexOf(b,N),B=_===-1?p.slice(N):p.slice(N,_),O=ee();O.append(l(B.trim(),!0)),T.push(O),x=_===-1?p.length:_+b.length}}return E(T)},E=p=>{const T=[];let v=0;for(;v<p.length;){const x=p[v];if(Pe(x)){const k=[x];for(;v+1<p.length&&Pe(p[v+1]);)k.push(p[++v]);k.length===1?T.push(...x.getChildren()):T.push(Me(k,k.map(A=>f.get(A)??1)))}else xe(x)&&T.length>0&&xe(T[T.length-1])&&T[T.length-1].getListType()===x.getListType()?T[T.length-1].append(...x.getChildren()):T.push(x);v++}return T},C=(p,T,v)=>{let x=T+`\\begin{${v}}`.length,k=null;const A=ne(p,x);A&&(k=A.value,x=A.end);let I=null;for(let O=0;O<(vi[v]??0);O++){const w=W(p,x);if(!w)break;I=w.value,x=w.end}const b=`\\begin{${v}}`,N=`\\end{${v}}`;let _=1,B=x;for(;_>0;){const O=p.indexOf(N,B);if(O===-1)return null;const w=Ci.has(v)?-1:p.indexOf(b,B);if(w!==-1&&w<O)_++,B=w+b.length;else{if(_--,_===0)return{block:{argument:I,body:p.slice(x,O),name:v,options:k},end:O+N.length};B=O+N.length}}return null},L=p=>{const T=[];let v=[];const x=()=>{const A=v.join(`
|
|
31
31
|
`).trim();if(v=[],!A)return;const I=ee();I.append(...g(A)),I.getChildrenSize()>0&&T.push(I)},k=xn(p).replace(/\\par(?![A-Za-z])/g,`
|
|
32
32
|
|
|
33
33
|
`);for(const A of k.split(`
|
|
34
|
-
`)){const I=A.trim();if(I===""){x();continue}if(Ei.test(I))continue;const b=s.find(N=>N.regExp.test(I));if(b){x();const N=b.regExp.exec(I);T.push(...b.replace(N,I,R));continue}v.push(A)}return x(),T},g=p=>S(p.replace(/[ \t]*\n[ \t]*/g," ").replace(/[ \t]{2,}/g," "),0),S=(p,T)=>{const v=[];let x="";const k=()=>{if(x!==""){const N=
|
|
34
|
+
`)){const I=A.trim();if(I===""){x();continue}if(Ei.test(I))continue;const b=s.find(N=>N.regExp.test(I));if(b){x();const N=b.regExp.exec(I);T.push(...b.replace(N,I,R));continue}v.push(A)}return x(),T},g=p=>S(p.replace(/[ \t]*\n[ \t]*/g," ").replace(/[ \t]{2,}/g," "),0),S=(p,T)=>{const v=[];let x="";const k=()=>{if(x!==""){const N=U(x);T&&N.setFormat(T),v.push(N),x=""}},A=N=>{k(),v.push(...N)},I=N=>{let _=N;for(;p[_]===" ";)_++;return _};let b=0;for(;b<p.length;){const N=p[b];if(N==="\\"){const _=p[b+1];if(_==="\\"){A([fe()]),b+=2;const P=ne(p,b);P&&p[b]==="["&&(b=P.end),b=I(b);continue}if(_==="("||_==="["){const P=_==="("?"\\)":"\\]",D=p.indexOf(P,b+2),q=D===-1?p.slice(b+2):p.slice(b+2,D);A([l(q.trim(),_==="[")]),b=D===-1?p.length:D+2;continue}if(_!==void 0&&"%$&#_{}".includes(_)){x+=_,b+=2;continue}if(_==="~"||_==="^"){x+=_,b+=2,p.startsWith("{}",b)&&(b+=2);continue}if(_===" "||_===","||_===";"||_==="!"||_==="/"){x+=_==="/"?"":" ",b+=2;continue}const B=/^\\([A-Za-z]+)\*?/.exec(p.slice(b));if(!B){x+="\\",b++;continue}const O=B[1];let w=b+B[0].length;const H=o.get(O);if(H!==void 0){const P=W(p,w);P?(A(S(P.value,T|H)),b=P.end):(A(S(p.slice(w),T|H)),b=p.length);continue}const F=r.get(O);if(F){let P=null;const D=ne(p,w);D&&(P=D.value,w=D.end);const q=oe(p,w,2);w=q.end;const Z=F.replace(q.values,P,R);A(Z?[Z]:[]),b=w;continue}const ue=wi[O];if(ue){const P=ne(p,w);P&&(w=P.end);const D=oe(p,w,ue),q=D.values[D.values.length-1];q!==void 0&&A(S(q,T)),b=D.end;continue}switch(O){case"textbackslash":x+="\\",w=_e(p,w);break;case"newline":case"linebreak":A([fe()]),w=I(w);break;case"ldots":case"dots":case"textellipsis":x+="…",w=_e(p,w);break;case"LaTeX":case"TeX":x+=O,w=_e(p,w);break;case"today":x+=Si(),w=_e(p,w);break;case"and":x=x.replace(/\s+$/,"")+", ";break;case"quad":case"qquad":case"enspace":case"hfill":case"vfill":case"dotfill":case"hrulefill":x+=" ";break;case"verb":{const P=p[w],D=P?p.indexOf(P,w+1):-1;if(D!==-1){k();const q=U(p.slice(w+1,D));q.setFormat(T|dn),v.push(q),w=D+1}break}case"footnote":{const P=W(p,w);P&&(x+=" (",A(S(P.value,T)),x+=")",w=P.end);break}case"cite":case"citep":case"citet":case"textcite":case"parencite":case"autocite":{const P=ne(p,w);P&&(w=P.end);const D=W(p,w);D&&(x+=`[${D.value.split(",").map(q=>q.trim()).join(", ")}]`,w=D.end);break}case"label":case"ref":case"eqref":case"pageref":case"index":case"thanks":case"hspace":case"vspace":case"hyphenation":case"phantom":{const P=W(p,w);P&&(w=P.end);break}default:{const P=W(p,w);P&&(A(S(P.value,T)),w=P.end)}}b=w;continue}if(N==="$"){const _=Ni(p,"$",b+1),B=p.slice(b+1,_===-1?void 0:_);A([l(B.trim(),!1)]),b=_===-1?p.length:_+1;continue}if(N==="{"){const _=pt(p,b);if(_===-1){b++;continue}A(S(p.slice(b+1,_),T)),b=_+1;continue}if(N==="}"){b++;continue}if(N==="~"){x+=" ",b++;continue}if(p.startsWith("---",b)){x+="—",b+=3;continue}if(p.startsWith("--",b)){x+="–",b+=2;continue}if(p.startsWith("``",b)){x+="“",b+=2;continue}if(p.startsWith("''",b)){x+="”",b+=2;continue}if(N==="`"){x+="‘",b++;continue}x+=N,b++}return k(),v},R={columnWeights:f,document:u,importBlocks:y,importInline:g,chapters:Cn(u.documentClass,c)};let $=y(ki(c,u.macros));if(u.documentClass==="letter"&&u.address){const p=ee();p.append(...g(u.address.split(", ").join("\\\\ "))),$=[p,...$]}if(u.classOptions.includes("twocolumn")){let p=Q($[0])?1:0;for(;p<$.length&&(ae($[p])||it($[p]));)p++;const T=$.slice(p);T.length>=2&&($=[...$.slice(0,p),Me(kn(T,2).map($e),[1,1])])}return{document:u,nodes:$}}}function _e(e,t){return e.startsWith("{}",t)?t+2:t}function Ni(e,t,n){for(let s=n;s<e.length;s++){if(e[s]==="\\"){s++;continue}if(e[s]===t)return s}return-1}function $i(e=ge){const t=Nn(e);return n=>{ce().append(...t(n).nodes)}}function hl(e,t=ge){return Nn(t)(e)}function bl(e,t=ge){$i(t)(e)}const Ri="``",yl=["Journal articles","Bibliographies","Books","Calendars","CVs and résumés","Formal letters","Assignments","Newsletters","Posters","Presentations","Theses"],Ii=[{id:"journal-article",category:"Journal articles",name:"IEEE Transactions article (IEEEtran)",description:"Two-column article: abstract, equations, a table with a spanning cell, a figure, citations and a bibliography.",source:String.raw`\documentclass[journal,twocolumn]{IEEEtran}
|
|
35
35
|
\usepackage{amsmath}
|
|
36
36
|
\usepackage{graphicx}
|
|
37
37
|
\usepackage{booktabs}
|
|
@@ -532,9 +532,9 @@ The benchmark streams and their generators.
|
|
|
532
532
|
|
|
533
533
|
`))),n=[])};for(let r=0;r<e.length;r++){const i=e[r];if(Be(i)){o();let l=[];const d=e[r+1];Ve(d)&&d.getJupyterInputNodeUuid()===i.getJupyterInputNodeUuid()&&(l=d.getOutputs(),r++),t.push(We(s(),i.getTextContent(),l))}else{if(Ve(i))continue;if(nn(i))o(),t.push(We(s(),`from IPython.display import YouTubeVideo
|
|
534
534
|
YouTubeVideo('${i.getId()}')`,[]));else if(ds(i)){const l=ps(i.getVideo().url);if(!l)continue;o(),t.push(We(s(),`from IPython.display import IFrame
|
|
535
|
-
IFrame('${fs(l)}', width=800, height=450)`,[]))}else if(ae(i)&&i.getChildrenSize()===1&&Ie(i.getFirstChild())){const l=i.getFirstChild();Ie(l)&&n.push(`$$${l.getEquation()}$$`)}else{const l=Bi(i);l!==null&&l.trim()!==""&&n.push(l)}}}return o(),{nbformat:4,nbformat_minor:5,metadata:Oi,cells:t}},We=(e,t,n)=>({id:e,cell_type:"code",metadata:{},source:t,outputs:n,execution_count:null}),Mi=(e,t)=>({id:e,cell_type:"markdown",metadata:{},source:t}),tt=ms(ct),Di=tt.textFormat.filter(e=>e.format.length===1);function Bi(e){return Pi(e,tt.element,Di,tt.textMatch)}function ji(e){return Array.isArray(e)?e.join(""):typeof e=="string"?e:""}const Fi=(e,t)=>{t.update(()=>{const n=ce();vo(null),n.clear(),n.selectStart(),e.cells.forEach((s,o)=>{const r=ji(s.source);if(n.selectEnd(),s.cell_type==="markdown")gs(r,ct);else if(s.cell_type==="code"){const i=s.outputs??[];t.dispatchCommand(hs,{code:r,outputs:i,loading:"Loading..."})}else{const i=lt();i.append(F(r)),n.append(i)}o<e.cells.length-1&&t.dispatchCommand(wo,void 0)})})};function Ui(e){return So(M()[0],e)}function $t(e){return Ui(e).output.Component}function zi(e){const t=e.getChildren();for(const n of t)if(ys(n))return!0;return!1}function El({enabled:e=!0,defaultLanguage:t="python",customConfigs:n=[],debug:s=!1,fallbackTabSize:o=4,preserveTabs:r=!1}){const[i]=M(),[l]=m.useState(()=>new rr({defaultLanguage:t,customConfigs:n,debug:s,fallbackTabSize:o,preserveTabs:r})),[d]=m.useState(()=>new nr(l,s));return m.useEffect(()=>{if(e)return ve(i.registerCommand(Ao,a=>{const c=se();if(!X(c))return!1;const u=c.anchor.getNode(),f=nt(u);if(!f||zi(f))return!1;a?.preventDefault();const y=f.getLanguage()||t,E=d.getTabString(y);return s&&V(`[AutoIndentPlugin] Tab key pressed - Language: ${y}, inserting: ${JSON.stringify(E)}`),c.isCollapsed()?c.insertText(E):It(c,E),!0},ye),i.registerCommand(ko,()=>{const a=se();if(!X(a))return!1;const c=Rt(a),u=d.getTabString(c);return s&&V(`[AutoIndentPlugin] INDENT_CONTENT_COMMAND - Language: ${c}, inserting: ${JSON.stringify(u)}`),a.isCollapsed()?a.insertText(u):It(a,u),!0},ye),i.registerCommand(_o,a=>{const c=se();if(!X(c))return!1;const u=c.anchor.getNode(),f=nt(u);if(!f||a?.shiftKey)return!1;a?.preventDefault();const y=f.getLanguage()||t,E=Hi(c),L=E.trim().length===0;s&&V(`[AutoIndentPlugin] Enter key pressed in ${y} cell - Current line: "${E}", isEmpty: ${L}`);let g;if(L)s&&V("[AutoIndentPlugin] Empty line detected - about to clear whitespace"),qi(c,s),g=d.getLeadingWhitespace(E).length,s&&V(`[AutoIndentPlugin] Empty line - cleared whitespace, preserving ${g} spaces for new line`);else{const S=d.calculateIndent({currentLine:E,language:y,currentIndent:d.getLeadingWhitespace(E).length});g=S.spaces,s&&V("[AutoIndentPlugin] Indent result:",S)}if(c.insertNodes([fe()]),g>0){const S=" ".repeat(g),R=bs(S);c.insertNodes([R]),s&&V(`[AutoIndentPlugin] Inserted ${g} spaces`)}return!0},ye),i.registerCommand(Lo,()=>{const a=se();if(!X(a))return!1;const c=Rt(a),u=d.getTabSize(c);return Wi(a,u),!0},ye))},[i,e,t,s]),null}function Rt(e){if(!X(e))return null;const t=e.anchor.getNode();return nt(t)?.getLanguage()||"python"}function nt(e){let t=e;for(;t;){if(Be(t))return t;t=t.getParent()}return null}function Hi(e){if(!X(e))return"";let n=e.anchor.getNode();const s=[];for(j(n)&&s.unshift(n.getTextContent()),n=n.getPreviousSibling();n&&n.getType()!=="linebreak";)j(n)&&s.unshift(n.getTextContent()),n=n.getPreviousSibling();return s.join("")}function qi(e,t=!1){if(!X(e)){t&&V("[clearCurrentLineWhitespace] Not a range selection");return}const n=e.anchor.getNode();let s=n;t&&V("[clearCurrentLineWhitespace] Starting with anchor node:",{type:n.getType(),isTextNode:j(n),content:j(n)?n.getTextContent():"N/A"});const o=[];for(j(s)&&o.push(s),s=s.getPreviousSibling();s;){if(s.getType()==="linebreak"){t&&V("[clearCurrentLineWhitespace] Hit linebreak, stopping");break}j(s)&&o.unshift(s),s=s.getPreviousSibling()}t&&(V(`[clearCurrentLineWhitespace] Found ${o.length} text nodes to clear`),o.forEach((i,l)=>{j(i)&&V(`[clearCurrentLineWhitespace] Node ${l}: "${i.getTextContent()}"`)}));let r=0;o.forEach(i=>{j(i)&&(i.setTextContent(""),r++)}),t&&V(`[clearCurrentLineWhitespace] Cleared ${r} nodes`)}function It(e,t){if(!X(e))return;e.getNodes().forEach(s=>{if(j(s)){const o=s.getTextContent(),r=s.getPreviousSibling();(r===null||r.getType()==="linebreak")&&s.setTextContent(t+o)}})}function Wi(e,t){if(!X(e))return;e.getNodes().forEach(s=>{if(j(s)){const o=s.getTextContent(),r=s.getPreviousSibling();if(r===null||r.getType()==="linebreak"){const i=o.match(/^ {1,}/)?.[0]?.length||0,l=Math.min(i,t);l>0&&s.setTextContent(o.substring(l))}}})}function Xi(e,t,n,s){m.useEffect(()=>{e.hasNodes([Zt])||(function(o,...r){const i=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",o);for(const d of r)l.append("v",d);throw i.search=l.toString(),Error(`Minified Lexical error #${o}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77)}),m.useEffect(()=>xs(e,{changeHandlers:n?[n]:[],excludeParents:s??[],matchers:t}),[e,t,n,s])}function Ji({matchers:e,onChange:t,excludeParents:n}){const[s]=M();return Xi(s,e,t,n),null}const Cl=()=>h.jsx(Ji,{matchers:Ts}),Vi=10,Yi=5;function Xe(e,t,n,s=Vi,o=Yi){const r=n.parentElement;if(e===null||!r){t.style.opacity="0",t.style.top="-10000px",t.style.left="-10000px",t.style.transform="translate(0px, 0px)";return}const i=t.getBoundingClientRect(),l=n.getBoundingClientRect(),d=r.getBoundingClientRect();let a=e.top-s,c=e.left-o;a<d.top&&(a+=i.height+e.height+s*2),c+i.width>d.right&&(c=d.right-i.width-o),a-=l.top,c-=l.left,t.style.opacity="1",t.style.top="0px",t.style.left="0px",t.style.transform=`translate(${c}px, ${a}px)`}function ke(e){e.preventDefault()}function Gi({editor:e,isLink:t,setIsLink:n,anchorElem:s,isLinkEditMode:o,setIsLinkEditMode:r}){const i=m.useRef(null),l=m.useRef(null),[d,a]=m.useState(""),[c,u]=m.useState("https://"),[f,y]=m.useState(null),E=m.useCallback(()=>{const g=se();if(X(g)){const T=Oe(g),v=le(T,Y);v?a(v.getURL()):Y(T)?a(T.getURL()):a(""),o&&u(d)}else if(pe(g)){const T=g.getNodes();if(T.length>0){const v=T[0],x=v.getParent();Y(x)?a(x.getURL()):Y(v)?a(v.getURL()):a(""),o&&u(d)}}const S=i.current,R=$o(e._window),$=document.activeElement;if(S===null)return;const p=e.getRootElement();if(o){let T;if(g!==null&&p!==null)if(pe(g)){const v=g.getNodes();if(v.length>0){const x=e.getElementByKey(v[0].getKey());x&&(T=x.getBoundingClientRect())}}else R!==null&&p.contains(R.anchorNode)&&(T=R.focusNode?.parentElement?.getBoundingClientRect());T&&(T.y+=40,Xe(T,S,s)),y(g)}else if(t&&g!==null&&p!==null&&e.isEditable()){let T;if(pe(g)){const v=g.getNodes();if(v.length>0){const x=e.getElementByKey(v[0].getKey());x&&(T=x.getBoundingClientRect())}}else R!==null&&p.contains(R.anchorNode)&&(T=R.focusNode?.parentElement?.getBoundingClientRect());T&&(T.y+=40,Xe(T,S,s)),y(g)}else(!$||$.className!=="link-input")&&(p!==null&&Xe(null,S,s),y(null),a(""));return!0},[s,e,o,d,t]);m.useEffect(()=>{const g=s.parentElement,S=()=>{e.getEditorState().read(()=>{E()})};return window.addEventListener("resize",S),g&&g.addEventListener("scroll",S),()=>{window.removeEventListener("resize",S),g&&g.removeEventListener("scroll",S)}},[s.parentElement,e,E]),m.useEffect(()=>ve(e.registerUpdateListener(({editorState:g})=>{g.read(()=>{E()})}),e.registerCommand(fn,()=>(E(),!0),pn),e.registerCommand(Ro,()=>t?(n(!1),!0):!1,ye)),[e,E,n,t]),m.useEffect(()=>{e.getEditorState().read(()=>{E()})},[e,E]),m.useEffect(()=>{e.getEditorState().read(()=>{E()})},[e,E,o,t]),m.useEffect(()=>{o&&l.current&&l.current.focus()},[o,t]),m.useEffect(()=>{const g=i.current;if(g===null)return;const S=R=>{!g.contains(R.relatedTarget)&&t&&n(!1)};return g.addEventListener("focusout",S),()=>{g.removeEventListener("focusout",S)}},[i,n,r,t,o]);const C=g=>{g.key==="Enter"?L(g):g.key==="Escape"&&(g.preventDefault(),r(!1))},L=g=>{g.preventDefault(),f!==null&&(d!==""&&e.update(()=>{e.dispatchCommand(yt,bt(c));const S=se();if(X(S)){const R=Oe(S).getParent();if(Ke(R)){const $=sn(R.getURL(),{rel:R.__rel,target:R.__target,title:R.__title});R.replace($,!0)}}}),u("https://"),r(!1))};return h.jsx(ie,{ref:i,sx:{position:"absolute",zIndex:10,top:"-10000px",left:"-10000px",opacity:0,bg:"var(--overlay-bgColor)",border:"1px solid",borderColor:"var(--borderColor-default)",borderRadius:2,boxShadow:"var(--shadow-floating-large, 0 0 0 1px #d1d9e0, 0 40px 80px 0 #25292e3d)",transition:"opacity 0.15s ease",p:1,minWidth:250},children:t?o?h.jsxs(ie,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(Io,{ref:l,value:c,onChange:g=>{u(g.target.value)},onKeyDown:C,size:"small",block:!0,sx:{flex:1}}),h.jsx(Le,{icon:hn,"aria-label":"Cancel",variant:"invisible",size:"small",onMouseDown:ke,onClick:()=>r(!1)}),h.jsx(Le,{icon:Po,"aria-label":"Confirm",variant:"invisible",size:"small",onMouseDown:ke,onClick:L})]}):h.jsxs(ie,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(ie,{sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:1,px:1},children:h.jsx(Oo,{href:bt(d),target:"_blank",rel:"noopener noreferrer",sx:{fontSize:1},children:d})}),h.jsx(Le,{icon:Mo,"aria-label":"Edit link",variant:"invisible",size:"small",onMouseDown:ke,onClick:g=>{g.preventDefault(),u(d),r(!0)}}),h.jsx(Le,{icon:Do,"aria-label":"Remove link",variant:"invisible",size:"small",sx:{color:"var(--fgColor-danger)"},onMouseDown:ke,onClick:()=>{e.dispatchCommand(yt,null)}})]}):null})}function Zi(e,t,n,s){const[o,r]=m.useState(e),[i,l]=m.useState(!1);return m.useEffect(()=>{function d(){const a=se();if(X(a)){const c=Oe(a),u=le(c,Y),f=le(c,Ke);if(!(u||f)){l(!1);return}const y=a.getNodes().filter(E=>!ut(E)).find(E=>{const C=le(E,Y),L=le(E,Ke);return u&&!u.is(C)||C&&!C.is(u)||f&&!f.is(L)||L&&(!L.is(f)||L.getIsUnlinked())});l(!y)}else if(pe(a)){const c=a.getNodes();if(c.length===0){l(!1);return}const u=c[0],f=u.getParent();Y(f)||Y(u)?l(!0):l(!1)}}return ve(e.registerUpdateListener(({editorState:a})=>{a.read(()=>{d()})}),e.registerCommand(fn,(a,c)=>(d(),r(c),!1),mn),e.registerCommand(No,a=>{const c=se();if(X(c)){const u=Oe(c),f=le(u,Y);if(Y(f)&&(a.metaKey||a.ctrlKey))return window.open(f.getURL(),"_blank"),!0}return!1},pn))},[e]),gn.createPortal(h.jsx(Gi,{editor:o,isLink:i,anchorElem:t,setIsLink:l,isLinkEditMode:n,setIsLinkEditMode:s}),t)}function Ki({anchorElem:e=document.body,isLinkEditMode:t,setIsLinkEditMode:n}){const[s]=M();return Zi(s,e,t,n)}function vl(e,t){const n=e.getRangeAt(0);let s;if(e.anchorNode===t){let o=t;for(;o.firstElementChild!=null;)o=o.firstElementChild;s=o.getBoundingClientRect()}else s=n.getBoundingClientRect();return s}const wl=(...e)=>e.filter(Boolean).join(" "),Sl=()=>window.getSelection(),Qi=10,ea=5;function Ll(e,t,n,s=Qi,o=ea){const r=n.parentElement;if(e===null||!r){t.style.opacity="0",t.style.top="-10000px",t.style.left="-10000px";return}const i=t.getBoundingClientRect(),l=n.getBoundingClientRect(),d=r.getBoundingClientRect();let a=e.top-i.height-s,c=e.left-o;a<d.top&&(a+=i.height+e.height+s*2),c+i.width>d.right&&(c=d.right-i.width-o),a-=l.top,c-=l.left,t.style.opacity="1",t.style.top=`${a}px`,t.style.left=`${c}px`}function _l(){const[e]=M();return m.useEffect(()=>Es(e),[e]),null}const kl=()=>{const[e]=M();return m.useEffect(()=>Cs(e),[e]),null};function Al(){const[e]=M();return m.useEffect(()=>vs(e),[e]),null}function Nl(){const[e]=M();return m.useEffect(()=>ws(e),[e]),null}class $l{name="LSP (Python & Markdown)";pendingRequests=new Map;requestCounter=0;lexicalId;vscodeAPI;boundHandleMessage;constructor(t,n){this.lexicalId=t,this.vscodeAPI=n||typeof window<"u"&&window.vscode,this.vscodeAPI||console.warn("[LSP-Lexical] VS Code API not available, LSP completions disabled"),this.boundHandleMessage=this.handleMessage.bind(this),typeof window<"u"&&window.addEventListener("message",this.boundHandleMessage)}async fetchCompletions(t,n,s,o){if(!this.vscodeAPI)return console.error("[LSP-Lexical-Provider] VS Code API not available"),[];if(o!=="python"&&o!=="markdown")return[];const r=`lsp-lexical-${++this.requestCounter}`,i={type:"lsp-completion-request",requestId:r,cellId:t,language:o,position:s,source:"lexical",lexicalId:this.lexicalId};return new Promise(l=>{const d=setTimeout(()=>{console.warn("[LSP-Lexical-Provider] Request timed out:",r),this.pendingRequests.delete(r),l([])},15e3);this.pendingRequests.set(r,a=>{clearTimeout(d),l(a)}),this.vscodeAPI.postMessage(i)})}handleMessage(t){const n=t.data;if(n.type==="lsp-completion-response"){const s=this.pendingRequests.get(n.requestId);s?(s(n.completions||[]),this.pendingRequests.delete(n.requestId)):console.warn("[LSP-Lexical-Provider] No resolver found for requestId:",n.requestId)}else if(n.type==="lsp-error"){console.error("[LSP-Lexical-Provider] LSP error received",n);const s=this.pendingRequests.get(n.requestId);s&&(s([]),this.pendingRequests.delete(n.requestId))}}dispose(){this.pendingRequests.clear(),typeof window<"u"&&this.boundHandleMessage&&window.removeEventListener("message",this.boundHandleMessage)}}function ta(e){const t=e.getLanguage();return!t||t==="python"||t==="py"?"python":t==="markdown"||t==="md"||t==="text"?"markdown":"unknown"}function Rl({lexicalId:e,onDocumentOpen:t,onDocumentSync:n,onDocumentClose:s,disabled:o=!1}){const[r]=M(),i=m.useRef(new Set),l=m.useRef(t),d=m.useRef(n),a=m.useRef(s);return m.useEffect(()=>{l.current=t,d.current=n,a.current=s},[t,n,s]),m.useEffect(()=>{if(o)return;const c=()=>{const f=ce(),y=new Map;function E(C){if(Be(C)){const L=C.getJupyterInputNodeUuid(),g=C.getTextContent(),S=ta(C);(S==="python"||S==="markdown")&&y.set(L,{uuid:L,content:g,language:S})}z(C)&&C.getChildren().forEach(E)}E(f);for(const[C,L]of y)i.current.has(C)?d.current?.({cellId:L.uuid,notebookId:e,content:L.content,language:L.language,version:Date.now()}):(l.current?.({cellId:L.uuid,notebookId:e,content:L.content,language:L.language,version:Date.now()}),i.current.add(C))};r.getEditorState().read(c);const u=r.registerUpdateListener(({editorState:f})=>{f.read(c)});return()=>{u(),i.current.clear()}},[r,e,o]),null}var Pt;(function(e){e[e.Text=0]="Text",e[e.Method=1]="Method",e[e.Function=2]="Function",e[e.Constructor=3]="Constructor",e[e.Field=4]="Field",e[e.Variable=5]="Variable",e[e.Class=6]="Class",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Unit=10]="Unit",e[e.Value=11]="Value",e[e.Enum=12]="Enum",e[e.Keyword=13]="Keyword",e[e.Snippet=14]="Snippet",e[e.Color=15]="Color",e[e.File=16]="File",e[e.Reference=17]="Reference",e[e.Folder=18]="Folder",e[e.EnumMember=19]="EnumMember",e[e.Constant=20]="Constant",e[e.Struct=21]="Struct",e[e.Event=22]="Event",e[e.Operator=23]="Operator",e[e.TypeParameter=24]="TypeParameter"})(Pt||(Pt={}));const Il=({maxDepth:e})=>{const[t]=M();return m.useEffect(()=>Ss(t,e??Ls),[t,e]),null},na=[{dependencies:[Bo],export:e=>un(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,s)=>{const o=jo();s||e.getNextSibling()!=null?e.replace(o):e.insertBefore(o),o.selectNext()},triggerOnEnter:!0,type:"element"},...ks];function sa({transformers:e=na}){const[t]=M();return m.useEffect(()=>_s(t,e),[t,e]),null}const Pl=()=>h.jsx(sa,{transformers:ct}),oa=e=>{const{notebook:t}=e,[n]=M(),s=m.useRef(null);return m.useEffect(()=>{if(!t)return;const o=JSON.stringify(t);o!==s.current&&(s.current=o,Fi(t,n))},[n,t]),null};function gt(e){return[e.getKey(),e.getTextContent(),e.getTag()]}function ra(e,t,n){if(t===null)return n;const s=gt(t);let o=[];if(e===null){if(n.length>0&&n[0][0]===t.__key)return n;o=[s,...n]}else for(let r=0;r<n.length;r++){const i=n[r][0];if(o.push(n[r]),i===e.getKey()&&i!==t.getKey()){if(r+1<n.length&&n[r+1][0]===t.__key)return n;o.push(s)}}return o}function ia(e,t){const n=[];for(const s of t)s[0]!==e&&n.push(s);return n}function aa(e,t){const n=[];for(const s of t)s[0]===e.getKey()?n.push(gt(e)):n.push(s);return n}function Ot(e,t,n){const s=[],o=gt(t);e||s.push(o);for(const r of n)r[0]!==t.getKey()&&(s.push(r),e&&r[0]===e.getKey()&&s.push(o));return s}function Je(e){let t=xt(e);for(;t!==null&&!Q(t);)t=xt(t);return t}function la({children:e}){const[t,n]=m.useState([]),[s]=M();return m.useEffect(()=>{let o=[];s.read("latest",()=>{const d=a=>{for(const c of a.getChildren())Q(c)?o.push([c.getKey(),c.getTextContent(),c.getTag()]):z(c)&&d(c)};d(ce()),n(o)});const r=s.registerUpdateListener(({editorState:d,dirtyElements:a})=>{d.read(()=>{const c=u=>{for(const f of u.getChildren())if(Q(f)){const y=Je(f);o=Ot(y,f,o),n(o)}else z(f)&&c(f)};ce().getChildren().forEach(u=>{z(u)&&a.get(u.__key)&&c(u)})})}),i=s.registerMutationListener(me,d=>{s.read("latest",()=>{for(const[a,c]of d)if(c==="created"){const u=ze(a);if(Q(u)){const f=Je(u);o=ra(f,u,o)}}else if(c==="destroyed")o=ia(a,o);else if(c==="updated"){const u=ze(a);if(Q(u)){const f=Je(u);o=Ot(f,u,o)}}n(o)})},{skipInitialization:!0}),l=s.registerMutationListener(Fo,d=>{s.read("latest",()=>{for(const[a,c]of d)if(c==="updated"){const u=ze(a);if(u!==null){const f=u.getParentOrThrow();Q(f)&&(o=aa(f,o),n(o))}}})},{skipInitialization:!0});return()=>{i(),l(),r()}},[s]),e(t,s)}function $n(e){switch(e){case"top-left":return{top:"16px",left:"16px"};case"top-right":return{top:"16px",right:"16px"};case"bottom-left":return{bottom:"16px",left:"16px"};case"center-left":return{top:"50%",left:"16px",transform:"translateY(-50%)"};case"center-right":return{top:"50%",right:"16px",transform:"translateY(-50%)"};case"top":return{top:"16px",left:"50%",transform:"translateX(-50%)"};case"bottom":return{bottom:"16px",left:"50%",transform:"translateX(-50%)"};case"left":return{top:"50%",left:"16px",transform:"translateY(-50%)"};case"right":return{top:"50%",right:"16px",transform:"translateY(-50%)"};case"center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};default:return{bottom:"16px",right:"16px"}}}function ca(e){return e==="h2"?3:e==="h3"?5:0}function ua({tableOfContents:e,onClose:t,collapsePosition:n}){const[s,o]=m.useState(""),r=m.useRef(0),[i]=M();function l(u,f){i.getEditorState().read(()=>{const y=i.getElementByKey(u);y!==null&&(y.scrollIntoView(),o(u),r.current=f)})}function d(u){const f=u?.getClientRects()[0].y;return f>=.26&&f<=9}function a(u){return u?.getClientRects()[0].y<=0}function c(u){return u?.getClientRects()[0].y>9}return m.useEffect(()=>{function u(){if(e.length!==0&&r.current<e.length-1){let C=i.getElementByKey(e[r.current][0]);if(C!==null){if(c(C)){for(;C!==null&&c(C)&&r.current>0;){const g=i.getElementByKey(e[r.current-1][0]);g!==null&&(a(g)||c(g))&&r.current--,C=g}const L=e[r.current][0];o(L)}else if(a(C)){for(;C!==null&&a(C)&&r.current<e.length-1;){const g=i.getElementByKey(e[r.current+1][0]);g!==null&&(d(g)||a(g))&&r.current++,C=g}const L=e[r.current][0];o(L)}}}else r.current=0}let f;function y(C,L){clearTimeout(f),f=setTimeout(C,L)}function E(){y(u,10)}return document.addEventListener("scroll",E),()=>document.removeEventListener("scroll",E)},[e,i]),h.jsxs(ie,{sx:{position:"fixed",...$n(n),width:"220px",maxHeight:"300px",overflowY:"auto",overflowX:"hidden",zIndex:20,bg:"var(--bgColor-default)",border:"1px solid",borderColor:"var(--borderColor-default)",borderRadius:2,boxShadow:"var(--shadow-resting-small, 0 1px 1px 0 #1f23280f, 0 1px 3px 0 #1f23280f)",p:2},children:[h.jsxs(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[h.jsx(Ho,{sx:{fontSize:1,fontWeight:"bold",color:"var(--fgColor-default)"},children:"Table of Contents"}),h.jsx(ie,{as:"button",type:"button",onClick:t,"aria-label":"Close table of contents",title:"Close",sx:{appearance:"none",border:"1px solid",borderColor:"var(--borderColor-default)",borderRadius:1,bg:"var(--bgColor-default)",color:"var(--fgColor-default)",width:"24px",height:"24px",p:0,display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{bg:"var(--bgColor-muted)"}},children:h.jsx(hn,{size:12})})]}),h.jsx(Ct,{"aria-label":"Table of contents",children:e.map(([u,f,y],E)=>{const C=(""+f).length>27?f.substring(0,27)+"…":f;return h.jsx(Ct.Item,{as:"button",type:"button","aria-current":s===u?"location":void 0,onClick:()=>l(u,E),sx:{width:"100%",textAlign:"left",fontWeight:E===0?"bold":void 0,pl:E===0?void 0:ca(y)},children:C},u)})})]})}const da=({showByDefault:e=!1,collapsePosition:t="bottom-right"}={})=>{const[n,s]=m.useState(e);return h.jsx(la,{children:o=>n?h.jsx(ua,{tableOfContents:o,onClose:()=>s(!1),collapsePosition:t}):h.jsx(Uo,{text:"Open TOC",direction:"w",children:h.jsx(ie,{as:"button",type:"button",onClick:()=>s(!0),"aria-label":"Open table of contents",title:"Open TOC",sx:{position:"fixed",...$n(t),zIndex:20,width:"48px",height:"48px",borderRadius:"999px",border:"1px solid",borderColor:"var(--borderColor-default)",bg:"var(--overlay-bgColor)",color:"var(--fgColor-default)",boxShadow:"var(--shadow-resting-medium, 0 1px 1px 0 #25292e1a, 0 3px 6px 0 #25292e1f)",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{bg:"var(--bgColor-muted)"}},children:h.jsx(zo,{size:16})})})})};function pa(e,t,n){const s=m.useRef(null);return s.current=e,m.useMemo(()=>As((...o)=>{s.current&&s.current(...o)},t,{maxWait:n}),[t,n])}const Mt=20;function fa({anchorElem:e}){const[t,{getTheme:n}]=M(),s=on(),[o,r]=m.useState(!1),[i,l]=m.useState(!1),[d,a]=m.useState(!1),[c,u]=m.useState({}),f=m.useRef(new Set),y=m.useRef(null),E=pa(g=>{const{isOutside:S,tableDOMNode:R}=ma(g,n);if(S){r(!1),l(!1);return}if(!R)return;y.current=R;let $=null,p=null,T=null;if(t.getEditorState().read(()=>{const v=Tt(R);if(Ze(v)){const x=le(v,k=>Ye(k));if(!Ye(x))return;if(T=$s(x,t.getElementByKey(x.getKey())),T){const k=x.getChildrenSize(),A=x.getChildAtIndex(0)?.getChildrenSize(),I=Rs(v),b=Is(v);I===k-1?$=v:b===A-1&&(p=v)}}},{editor:t}),T){const{width:v,y:x,right:k,left:A,bottom:I,height:b}=T.getBoundingClientRect(),N=T.parentElement;let _=!1;N&&N.classList.contains("JupyterLexicalTheme__tableScrollableWrapper")&&(_=N.scrollWidth>N.clientWidth);const{y:B,left:O}=e.getBoundingClientRect();if($){const w={height:Mt,left:_&&N?N.offsetLeft:A-O,top:I-B,width:_&&N?N.offsetWidth:v};l(!1),r(!0),u(w)}else if(p){const w={height:b,left:k-O,top:x-B,width:Mt};l(!0),r(!1),u(w)}}},50,250),C=m.useMemo(()=>new ResizeObserver(()=>{r(!1),l(!1)}),[]);m.useEffect(()=>{if(!d)return;const g=()=>{r(!1),l(!1)};return document.addEventListener("mousemove",E),document.addEventListener("scroll",g,!0),()=>{r(!1),l(!1),E.cancel(),document.removeEventListener("mousemove",E),document.removeEventListener("scroll",g,!0)}},[d,E]),m.useEffect(()=>ve(t.registerMutationListener(Jt,g=>{t.getEditorState().read(()=>{let S=!1;for(const[R,$]of g)switch($){case"created":{f.current.add(R),S=!0;break}case"destroyed":{f.current.delete(R),S=!0;break}}if(S){C.disconnect();for(const R of f.current){const{tableElement:$}=Ns(R);C.observe($)}a(f.current.size>0)}},{editor:t})},{skipInitialization:!1})),[t,C]);const L=g=>{t.update(()=>{y.current&&(Tt(y.current)?.selectEnd(),g?(Ps(),r(!1)):(Os(),l(!1)))})};return s?h.jsxs(h.Fragment,{children:[o&&h.jsx("button",{className:`${n()?.tableAddRows}`,style:{...c},onClick:()=>L(!0)}),i&&h.jsx("button",{className:`${n()?.tableAddColumns}`,style:{...c},onClick:()=>L(!1)})]}):null}function ma(e,t){const n=e.target,s=Ue(t,"tableCell");if(qo(n)){const o=n.closest(`td${s}, th${s}`);return{isOutside:!(o||n.closest(`button${Ue(t,"tableAddRows")}`)||n.closest(`button${Ue(t,"tableAddColumns")}`)||n.closest("div.TableCellResizer__resizer")),tableDOMNode:o}}else return{isOutside:!0,tableDOMNode:null}}function Ol({anchorElem:e=document.body}){return on()?gn.createPortal(h.jsx(fa,{anchorElem:e}),e):null}const Ae="JupyterLexicalTheme__tableScrollableWrapper",Dt="JupyterLexicalTheme__tableScrollRight",Bt="JupyterLexicalTheme__tableScrollLeft",jt="JupyterLexicalTheme__tableScrollMiddle";function Ne(e){const t=e.scrollWidth>e.clientWidth,n=e.scrollLeft+e.clientWidth>=e.scrollWidth-1,s=e.scrollLeft<=1;e.classList.remove(Dt),e.classList.remove(Bt),e.classList.remove(jt),t&&(!s&&!n?e.classList.add(jt):s&&!n?e.classList.add(Dt):!s&&n&&e.classList.add(Bt))}function Ml(){const[e]=M();return m.useEffect(()=>{const t=e.getRootElement();if(!t)return;const n=()=>{t.querySelectorAll(`.${Ae}`).forEach(Ne)};n();const s=new MutationObserver(()=>{n()});s.observe(t,{childList:!0,subtree:!0});const o=new ResizeObserver(()=>{n()}),r=new Map,i=a=>{if(r.has(a))return;const c=()=>{Ne(a)};a.addEventListener("scroll",c,{passive:!0}),r.set(a,c)};t.querySelectorAll(`.${Ae}`).forEach(a=>{o.observe(a),i(a)});const d=new MutationObserver(a=>{a.forEach(c=>{c.addedNodes.forEach(u=>{u instanceof HTMLElement&&(u.classList.contains(Ae)&&(o.observe(u),i(u),Ne(u)),u.querySelectorAll(`.${Ae}`).forEach(y=>{o.observe(y),i(y),Ne(y)}))})})});return d.observe(t,{childList:!0,subtree:!0}),()=>{s.disconnect(),o.disconnect(),d.disconnect(),r.forEach((a,c)=>{c.removeEventListener("scroll",a)}),r.clear()}},[e]),null}const Rn=Object.freeze({" ":"\\t","\n":"\\n"}),Ft=new RegExp(Object.keys(Rn).join("|"),"g"),J=Object.freeze({ancestorHasNextSibling:"|",ancestorIsLastChild:" ",hasNextSibling:"├",isLastChild:"└",selectedChar:"^",selectedLine:">"}),ga=[e=>e.hasFormat("bold")&&"Bold",e=>e.hasFormat("code")&&"Code",e=>e.hasFormat("italic")&&"Italic",e=>e.hasFormat("strikethrough")&&"Strikethrough",e=>e.hasFormat("subscript")&&"Subscript",e=>e.hasFormat("superscript")&&"Superscript",e=>e.hasFormat("underline")&&"Underline",e=>e.hasFormat("highlight")&&"Highlight"],ha=[e=>e.hasTextFormat("bold")&&"Bold",e=>e.hasTextFormat("code")&&"Code",e=>e.hasTextFormat("italic")&&"Italic",e=>e.hasTextFormat("strikethrough")&&"Strikethrough",e=>e.hasTextFormat("subscript")&&"Subscript",e=>e.hasTextFormat("superscript")&&"Superscript",e=>e.hasTextFormat("underline")&&"Underline",e=>e.hasTextFormat("highlight")&&"Highlight"],ba=[e=>e.isDirectionless()&&"Directionless",e=>e.isUnmergeable()&&"Unmergeable"],ya=[e=>e.isToken()&&"Token",e=>e.isSegmented()&&"Segmented"];function xa(e,t,n,s,o=!1){const r=e.getEditorState(),i=e._config,l=e._compositionKey,d=e._editable;if(n){let f="";return r.read(()=>{f=(function(y){const E=document.createElement("div");return E.innerHTML=y.trim(),In(E,0).innerHTML})(Wo(e))},{editor:e}),f}let a=` root
|
|
536
|
-
`;const c=r.read(()=>{const f=se();return st(ce(),(y,E,C)=>{const L=`(${y.getKey()})`,g=y.getType()||"",S=y.isSelected(),R=C!==void 0?`[slot: ${C}] `:"",$=(function(p,T){return T===void 0?"":z(p)&&p.isShadowRoot()?" [shadow-root]":Te(p)&&!p.isInline()?" [atomic decorator]":""})(y,C);a+=`${S?J.selectedLine:" "} ${E.join(" ")} ${L} ${R}${g}${$} ${(function(p,T,v=!1){const x=T?T(p,v):void 0;if(x!==void 0&&x.length>0)return x;if(j(p)){const k=p.getTextContent(),A=k.length===0?"(empty)":`"${
|
|
537
|
-
`,a+=(function({indent:p,isSelected:T,node:v,nodeKeyDisplay:x,selection:k,typeDisplay:A}){if(!j(v)||!X(k)||!T||z(v))return"";const I=k.anchor,b=k.focus;if(v.getTextContent()===""||I.getNode()===k.focus.getNode()&&I.offset===b.offset)return"";const[N,_]=(function(P,D){const q=D.getStartEndPoints();if(pe(D)||q===null)return[-1,-1];const[Z,re]=q,je=P.getTextContent(),
|
|
535
|
+
IFrame('${fs(l)}', width=800, height=450)`,[]))}else if(ae(i)&&i.getChildrenSize()===1&&Ie(i.getFirstChild())){const l=i.getFirstChild();Ie(l)&&n.push(`$$${l.getEquation()}$$`)}else{const l=Bi(i);l!==null&&l.trim()!==""&&n.push(l)}}}return o(),{nbformat:4,nbformat_minor:5,metadata:Oi,cells:t}},We=(e,t,n)=>({id:e,cell_type:"code",metadata:{},source:t,outputs:n,execution_count:null}),Mi=(e,t)=>({id:e,cell_type:"markdown",metadata:{},source:t}),tt=ms(ct),Di=tt.textFormat.filter(e=>e.format.length===1);function Bi(e){return Pi(e,tt.element,Di,tt.textMatch)}function ji(e){return Array.isArray(e)?e.join(""):typeof e=="string"?e:""}const Ui=(e,t)=>{t.update(()=>{const n=ce();vo(null),n.clear(),n.selectStart(),e.cells.forEach((s,o)=>{const r=ji(s.source);if(n.selectEnd(),s.cell_type==="markdown")gs(r,ct);else if(s.cell_type==="code"){const i=s.outputs??[];t.dispatchCommand(hs,{code:r,outputs:i,loading:"Loading..."})}else{const i=lt();i.append(U(r)),n.append(i)}o<e.cells.length-1&&t.dispatchCommand(wo,void 0)})})};function Fi(e){return So(M()[0],e)}function $t(e){return Fi(e).output.Component}function zi(e){const t=e.getChildren();for(const n of t)if(ys(n))return!0;return!1}function El({enabled:e=!0,defaultLanguage:t="python",customConfigs:n=[],debug:s=!1,fallbackTabSize:o=4,preserveTabs:r=!1}){const[i]=M(),[l]=m.useState(()=>new rr({defaultLanguage:t,customConfigs:n,debug:s,fallbackTabSize:o,preserveTabs:r})),[d]=m.useState(()=>new nr(l,s));return m.useEffect(()=>{if(e)return ve(i.registerCommand(Ao,a=>{const c=se();if(!X(c))return!1;const u=c.anchor.getNode(),f=nt(u);if(!f||zi(f))return!1;a?.preventDefault();const y=f.getLanguage()||t,E=d.getTabString(y);return s&&V(`[AutoIndentPlugin] Tab key pressed - Language: ${y}, inserting: ${JSON.stringify(E)}`),c.isCollapsed()?c.insertText(E):It(c,E),!0},ye),i.registerCommand(ko,()=>{const a=se();if(!X(a))return!1;const c=Rt(a),u=d.getTabString(c);return s&&V(`[AutoIndentPlugin] INDENT_CONTENT_COMMAND - Language: ${c}, inserting: ${JSON.stringify(u)}`),a.isCollapsed()?a.insertText(u):It(a,u),!0},ye),i.registerCommand(_o,a=>{const c=se();if(!X(c))return!1;const u=c.anchor.getNode(),f=nt(u);if(!f||a?.shiftKey)return!1;a?.preventDefault();const y=f.getLanguage()||t,E=Hi(c),L=E.trim().length===0;s&&V(`[AutoIndentPlugin] Enter key pressed in ${y} cell - Current line: "${E}", isEmpty: ${L}`);let g;if(L)s&&V("[AutoIndentPlugin] Empty line detected - about to clear whitespace"),qi(c,s),g=d.getLeadingWhitespace(E).length,s&&V(`[AutoIndentPlugin] Empty line - cleared whitespace, preserving ${g} spaces for new line`);else{const S=d.calculateIndent({currentLine:E,language:y,currentIndent:d.getLeadingWhitespace(E).length});g=S.spaces,s&&V("[AutoIndentPlugin] Indent result:",S)}if(c.insertNodes([fe()]),g>0){const S=" ".repeat(g),R=bs(S);c.insertNodes([R]),s&&V(`[AutoIndentPlugin] Inserted ${g} spaces`)}return!0},ye),i.registerCommand(Lo,()=>{const a=se();if(!X(a))return!1;const c=Rt(a),u=d.getTabSize(c);return Wi(a,u),!0},ye))},[i,e,t,s]),null}function Rt(e){if(!X(e))return null;const t=e.anchor.getNode();return nt(t)?.getLanguage()||"python"}function nt(e){let t=e;for(;t;){if(Be(t))return t;t=t.getParent()}return null}function Hi(e){if(!X(e))return"";let n=e.anchor.getNode();const s=[];for(j(n)&&s.unshift(n.getTextContent()),n=n.getPreviousSibling();n&&n.getType()!=="linebreak";)j(n)&&s.unshift(n.getTextContent()),n=n.getPreviousSibling();return s.join("")}function qi(e,t=!1){if(!X(e)){t&&V("[clearCurrentLineWhitespace] Not a range selection");return}const n=e.anchor.getNode();let s=n;t&&V("[clearCurrentLineWhitespace] Starting with anchor node:",{type:n.getType(),isTextNode:j(n),content:j(n)?n.getTextContent():"N/A"});const o=[];for(j(s)&&o.push(s),s=s.getPreviousSibling();s;){if(s.getType()==="linebreak"){t&&V("[clearCurrentLineWhitespace] Hit linebreak, stopping");break}j(s)&&o.unshift(s),s=s.getPreviousSibling()}t&&(V(`[clearCurrentLineWhitespace] Found ${o.length} text nodes to clear`),o.forEach((i,l)=>{j(i)&&V(`[clearCurrentLineWhitespace] Node ${l}: "${i.getTextContent()}"`)}));let r=0;o.forEach(i=>{j(i)&&(i.setTextContent(""),r++)}),t&&V(`[clearCurrentLineWhitespace] Cleared ${r} nodes`)}function It(e,t){if(!X(e))return;e.getNodes().forEach(s=>{if(j(s)){const o=s.getTextContent(),r=s.getPreviousSibling();(r===null||r.getType()==="linebreak")&&s.setTextContent(t+o)}})}function Wi(e,t){if(!X(e))return;e.getNodes().forEach(s=>{if(j(s)){const o=s.getTextContent(),r=s.getPreviousSibling();if(r===null||r.getType()==="linebreak"){const i=o.match(/^ {1,}/)?.[0]?.length||0,l=Math.min(i,t);l>0&&s.setTextContent(o.substring(l))}}})}function Xi(e,t,n,s){m.useEffect(()=>{e.hasNodes([Zt])||(function(o,...r){const i=new URL("https://lexical.dev/docs/error"),l=new URLSearchParams;l.append("code",o);for(const d of r)l.append("v",d);throw i.search=l.toString(),Error(`Minified Lexical error #${o}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)})(77)}),m.useEffect(()=>xs(e,{changeHandlers:n?[n]:[],excludeParents:s??[],matchers:t}),[e,t,n,s])}function Ji({matchers:e,onChange:t,excludeParents:n}){const[s]=M();return Xi(s,e,t,n),null}const Cl=()=>h.jsx(Ji,{matchers:Ts}),Vi=10,Yi=5;function Xe(e,t,n,s=Vi,o=Yi){const r=n.parentElement;if(e===null||!r){t.style.opacity="0",t.style.top="-10000px",t.style.left="-10000px",t.style.transform="translate(0px, 0px)";return}const i=t.getBoundingClientRect(),l=n.getBoundingClientRect(),d=r.getBoundingClientRect();let a=e.top-s,c=e.left-o;a<d.top&&(a+=i.height+e.height+s*2),c+i.width>d.right&&(c=d.right-i.width-o),a-=l.top,c-=l.left,t.style.opacity="1",t.style.top="0px",t.style.left="0px",t.style.transform=`translate(${c}px, ${a}px)`}function ke(e){e.preventDefault()}function Gi({editor:e,isLink:t,setIsLink:n,anchorElem:s,isLinkEditMode:o,setIsLinkEditMode:r}){const i=m.useRef(null),l=m.useRef(null),[d,a]=m.useState(""),[c,u]=m.useState("https://"),[f,y]=m.useState(null),E=m.useCallback(()=>{const g=se();if(X(g)){const T=Oe(g),v=le(T,Y);v?a(v.getURL()):Y(T)?a(T.getURL()):a(""),o&&u(d)}else if(pe(g)){const T=g.getNodes();if(T.length>0){const v=T[0],x=v.getParent();Y(x)?a(x.getURL()):Y(v)?a(v.getURL()):a(""),o&&u(d)}}const S=i.current,R=$o(e._window),$=document.activeElement;if(S===null)return;const p=e.getRootElement();if(o){let T;if(g!==null&&p!==null)if(pe(g)){const v=g.getNodes();if(v.length>0){const x=e.getElementByKey(v[0].getKey());x&&(T=x.getBoundingClientRect())}}else R!==null&&p.contains(R.anchorNode)&&(T=R.focusNode?.parentElement?.getBoundingClientRect());T&&(T.y+=40,Xe(T,S,s)),y(g)}else if(t&&g!==null&&p!==null&&e.isEditable()){let T;if(pe(g)){const v=g.getNodes();if(v.length>0){const x=e.getElementByKey(v[0].getKey());x&&(T=x.getBoundingClientRect())}}else R!==null&&p.contains(R.anchorNode)&&(T=R.focusNode?.parentElement?.getBoundingClientRect());T&&(T.y+=40,Xe(T,S,s)),y(g)}else(!$||$.className!=="link-input")&&(p!==null&&Xe(null,S,s),y(null),a(""));return!0},[s,e,o,d,t]);m.useEffect(()=>{const g=s.parentElement,S=()=>{e.getEditorState().read(()=>{E()})};return window.addEventListener("resize",S),g&&g.addEventListener("scroll",S),()=>{window.removeEventListener("resize",S),g&&g.removeEventListener("scroll",S)}},[s.parentElement,e,E]),m.useEffect(()=>ve(e.registerUpdateListener(({editorState:g})=>{g.read(()=>{E()})}),e.registerCommand(fn,()=>(E(),!0),pn),e.registerCommand(Ro,()=>t?(n(!1),!0):!1,ye)),[e,E,n,t]),m.useEffect(()=>{e.getEditorState().read(()=>{E()})},[e,E]),m.useEffect(()=>{e.getEditorState().read(()=>{E()})},[e,E,o,t]),m.useEffect(()=>{o&&l.current&&l.current.focus()},[o,t]),m.useEffect(()=>{const g=i.current;if(g===null)return;const S=R=>{!g.contains(R.relatedTarget)&&t&&n(!1)};return g.addEventListener("focusout",S),()=>{g.removeEventListener("focusout",S)}},[i,n,r,t,o]);const C=g=>{g.key==="Enter"?L(g):g.key==="Escape"&&(g.preventDefault(),r(!1))},L=g=>{g.preventDefault(),f!==null&&(d!==""&&e.update(()=>{e.dispatchCommand(yt,bt(c));const S=se();if(X(S)){const R=Oe(S).getParent();if(Ke(R)){const $=sn(R.getURL(),{rel:R.__rel,target:R.__target,title:R.__title});R.replace($,!0)}}}),u("https://"),r(!1))};return h.jsx(ie,{ref:i,sx:{position:"absolute",zIndex:10,top:"-10000px",left:"-10000px",opacity:0,bg:"var(--overlay-bgColor)",border:"1px solid",borderColor:"var(--borderColor-default)",borderRadius:2,boxShadow:"var(--shadow-floating-large, 0 0 0 1px #d1d9e0, 0 40px 80px 0 #25292e3d)",transition:"opacity 0.15s ease",p:1,minWidth:250},children:t?o?h.jsxs(ie,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(Io,{ref:l,value:c,onChange:g=>{u(g.target.value)},onKeyDown:C,size:"small",block:!0,sx:{flex:1}}),h.jsx(Le,{icon:hn,"aria-label":"Cancel",variant:"invisible",size:"small",onMouseDown:ke,onClick:()=>r(!1)}),h.jsx(Le,{icon:Po,"aria-label":"Confirm",variant:"invisible",size:"small",onMouseDown:ke,onClick:L})]}):h.jsxs(ie,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(ie,{sx:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:1,px:1},children:h.jsx(Oo,{href:bt(d),target:"_blank",rel:"noopener noreferrer",sx:{fontSize:1},children:d})}),h.jsx(Le,{icon:Mo,"aria-label":"Edit link",variant:"invisible",size:"small",onMouseDown:ke,onClick:g=>{g.preventDefault(),u(d),r(!0)}}),h.jsx(Le,{icon:Do,"aria-label":"Remove link",variant:"invisible",size:"small",sx:{color:"var(--fgColor-danger)"},onMouseDown:ke,onClick:()=>{e.dispatchCommand(yt,null)}})]}):null})}function Zi(e,t,n,s){const[o,r]=m.useState(e),[i,l]=m.useState(!1);return m.useEffect(()=>{function d(){const a=se();if(X(a)){const c=Oe(a),u=le(c,Y),f=le(c,Ke);if(!(u||f)){l(!1);return}const y=a.getNodes().filter(E=>!ut(E)).find(E=>{const C=le(E,Y),L=le(E,Ke);return u&&!u.is(C)||C&&!C.is(u)||f&&!f.is(L)||L&&(!L.is(f)||L.getIsUnlinked())});l(!y)}else if(pe(a)){const c=a.getNodes();if(c.length===0){l(!1);return}const u=c[0],f=u.getParent();Y(f)||Y(u)?l(!0):l(!1)}}return ve(e.registerUpdateListener(({editorState:a})=>{a.read(()=>{d()})}),e.registerCommand(fn,(a,c)=>(d(),r(c),!1),mn),e.registerCommand(No,a=>{const c=se();if(X(c)){const u=Oe(c),f=le(u,Y);if(Y(f)&&(a.metaKey||a.ctrlKey))return window.open(f.getURL(),"_blank"),!0}return!1},pn))},[e]),gn.createPortal(h.jsx(Gi,{editor:o,isLink:i,anchorElem:t,setIsLink:l,isLinkEditMode:n,setIsLinkEditMode:s}),t)}function Ki({anchorElem:e=document.body,isLinkEditMode:t,setIsLinkEditMode:n}){const[s]=M();return Zi(s,e,t,n)}function vl(e,t){const n=e.getRangeAt(0);let s;if(e.anchorNode===t){let o=t;for(;o.firstElementChild!=null;)o=o.firstElementChild;s=o.getBoundingClientRect()}else s=n.getBoundingClientRect();return s}const wl=(...e)=>e.filter(Boolean).join(" "),Sl=()=>window.getSelection(),Qi=10,ea=5;function Ll(e,t,n,s=Qi,o=ea){const r=n.parentElement;if(e===null||!r){t.style.opacity="0",t.style.top="-10000px",t.style.left="-10000px";return}const i=t.getBoundingClientRect(),l=n.getBoundingClientRect(),d=r.getBoundingClientRect();let a=e.top-i.height-s,c=e.left-o;a<d.top&&(a+=i.height+e.height+s*2),c+i.width>d.right&&(c=d.right-i.width-o),a-=l.top,c-=l.left,t.style.opacity="1",t.style.top=`${a}px`,t.style.left=`${c}px`}function _l(){const[e]=M();return m.useEffect(()=>Es(e),[e]),null}const kl=()=>{const[e]=M();return m.useEffect(()=>Cs(e),[e]),null};function Al(){const[e]=M();return m.useEffect(()=>vs(e),[e]),null}function Nl(){const[e]=M();return m.useEffect(()=>ws(e),[e]),null}class $l{name="LSP (Python & Markdown)";pendingRequests=new Map;requestCounter=0;lexicalId;vscodeAPI;boundHandleMessage;constructor(t,n){this.lexicalId=t,this.vscodeAPI=n||typeof window<"u"&&window.vscode,this.vscodeAPI||console.warn("[LSP-Lexical] VS Code API not available, LSP completions disabled"),this.boundHandleMessage=this.handleMessage.bind(this),typeof window<"u"&&window.addEventListener("message",this.boundHandleMessage)}async fetchCompletions(t,n,s,o){if(!this.vscodeAPI)return console.error("[LSP-Lexical-Provider] VS Code API not available"),[];if(o!=="python"&&o!=="markdown")return[];const r=`lsp-lexical-${++this.requestCounter}`,i={type:"lsp-completion-request",requestId:r,cellId:t,language:o,position:s,source:"lexical",lexicalId:this.lexicalId};return new Promise(l=>{const d=setTimeout(()=>{console.warn("[LSP-Lexical-Provider] Request timed out:",r),this.pendingRequests.delete(r),l([])},15e3);this.pendingRequests.set(r,a=>{clearTimeout(d),l(a)}),this.vscodeAPI.postMessage(i)})}handleMessage(t){const n=t.data;if(n.type==="lsp-completion-response"){const s=this.pendingRequests.get(n.requestId);s?(s(n.completions||[]),this.pendingRequests.delete(n.requestId)):console.warn("[LSP-Lexical-Provider] No resolver found for requestId:",n.requestId)}else if(n.type==="lsp-error"){console.error("[LSP-Lexical-Provider] LSP error received",n);const s=this.pendingRequests.get(n.requestId);s&&(s([]),this.pendingRequests.delete(n.requestId))}}dispose(){this.pendingRequests.clear(),typeof window<"u"&&this.boundHandleMessage&&window.removeEventListener("message",this.boundHandleMessage)}}function ta(e){const t=e.getLanguage();return!t||t==="python"||t==="py"?"python":t==="markdown"||t==="md"||t==="text"?"markdown":"unknown"}function Rl({lexicalId:e,onDocumentOpen:t,onDocumentSync:n,onDocumentClose:s,disabled:o=!1}){const[r]=M(),i=m.useRef(new Set),l=m.useRef(t),d=m.useRef(n),a=m.useRef(s);return m.useEffect(()=>{l.current=t,d.current=n,a.current=s},[t,n,s]),m.useEffect(()=>{if(o)return;const c=()=>{const f=ce(),y=new Map;function E(C){if(Be(C)){const L=C.getJupyterInputNodeUuid(),g=C.getTextContent(),S=ta(C);(S==="python"||S==="markdown")&&y.set(L,{uuid:L,content:g,language:S})}z(C)&&C.getChildren().forEach(E)}E(f);for(const[C,L]of y)i.current.has(C)?d.current?.({cellId:L.uuid,notebookId:e,content:L.content,language:L.language,version:Date.now()}):(l.current?.({cellId:L.uuid,notebookId:e,content:L.content,language:L.language,version:Date.now()}),i.current.add(C))};r.getEditorState().read(c);const u=r.registerUpdateListener(({editorState:f})=>{f.read(c)});return()=>{u(),i.current.clear()}},[r,e,o]),null}var Pt;(function(e){e[e.Text=0]="Text",e[e.Method=1]="Method",e[e.Function=2]="Function",e[e.Constructor=3]="Constructor",e[e.Field=4]="Field",e[e.Variable=5]="Variable",e[e.Class=6]="Class",e[e.Interface=7]="Interface",e[e.Module=8]="Module",e[e.Property=9]="Property",e[e.Unit=10]="Unit",e[e.Value=11]="Value",e[e.Enum=12]="Enum",e[e.Keyword=13]="Keyword",e[e.Snippet=14]="Snippet",e[e.Color=15]="Color",e[e.File=16]="File",e[e.Reference=17]="Reference",e[e.Folder=18]="Folder",e[e.EnumMember=19]="EnumMember",e[e.Constant=20]="Constant",e[e.Struct=21]="Struct",e[e.Event=22]="Event",e[e.Operator=23]="Operator",e[e.TypeParameter=24]="TypeParameter"})(Pt||(Pt={}));const Il=({maxDepth:e})=>{const[t]=M();return m.useEffect(()=>Ss(t,e??Ls),[t,e]),null},na=[{dependencies:[Bo],export:e=>un(e)?"***":null,regExp:/^(---|\*\*\*|___)\s?$/,replace:(e,t,n,s)=>{const o=jo();s||e.getNextSibling()!=null?e.replace(o):e.insertBefore(o),o.selectNext()},triggerOnEnter:!0,type:"element"},...ks];function sa({transformers:e=na}){const[t]=M();return m.useEffect(()=>_s(t,e),[t,e]),null}const Pl=()=>h.jsx(sa,{transformers:ct}),oa=e=>{const{notebook:t}=e,[n]=M(),s=m.useRef(null);return m.useEffect(()=>{if(!t)return;const o=JSON.stringify(t);o!==s.current&&(s.current=o,Ui(t,n))},[n,t]),null};function gt(e){return[e.getKey(),e.getTextContent(),e.getTag()]}function ra(e,t,n){if(t===null)return n;const s=gt(t);let o=[];if(e===null){if(n.length>0&&n[0][0]===t.__key)return n;o=[s,...n]}else for(let r=0;r<n.length;r++){const i=n[r][0];if(o.push(n[r]),i===e.getKey()&&i!==t.getKey()){if(r+1<n.length&&n[r+1][0]===t.__key)return n;o.push(s)}}return o}function ia(e,t){const n=[];for(const s of t)s[0]!==e&&n.push(s);return n}function aa(e,t){const n=[];for(const s of t)s[0]===e.getKey()?n.push(gt(e)):n.push(s);return n}function Ot(e,t,n){const s=[],o=gt(t);e||s.push(o);for(const r of n)r[0]!==t.getKey()&&(s.push(r),e&&r[0]===e.getKey()&&s.push(o));return s}function Je(e){let t=xt(e);for(;t!==null&&!Q(t);)t=xt(t);return t}function la({children:e}){const[t,n]=m.useState([]),[s]=M();return m.useEffect(()=>{let o=[];s.read("latest",()=>{const d=a=>{for(const c of a.getChildren())Q(c)?o.push([c.getKey(),c.getTextContent(),c.getTag()]):z(c)&&d(c)};d(ce()),n(o)});const r=s.registerUpdateListener(({editorState:d,dirtyElements:a})=>{d.read(()=>{const c=u=>{for(const f of u.getChildren())if(Q(f)){const y=Je(f);o=Ot(y,f,o),n(o)}else z(f)&&c(f)};ce().getChildren().forEach(u=>{z(u)&&a.get(u.__key)&&c(u)})})}),i=s.registerMutationListener(me,d=>{s.read("latest",()=>{for(const[a,c]of d)if(c==="created"){const u=ze(a);if(Q(u)){const f=Je(u);o=ra(f,u,o)}}else if(c==="destroyed")o=ia(a,o);else if(c==="updated"){const u=ze(a);if(Q(u)){const f=Je(u);o=Ot(f,u,o)}}n(o)})},{skipInitialization:!0}),l=s.registerMutationListener(Uo,d=>{s.read("latest",()=>{for(const[a,c]of d)if(c==="updated"){const u=ze(a);if(u!==null){const f=u.getParentOrThrow();Q(f)&&(o=aa(f,o),n(o))}}})},{skipInitialization:!0});return()=>{i(),l(),r()}},[s]),e(t,s)}function $n(e){switch(e){case"top-left":return{top:"16px",left:"16px"};case"top-right":return{top:"16px",right:"16px"};case"bottom-left":return{bottom:"16px",left:"16px"};case"center-left":return{top:"50%",left:"16px",transform:"translateY(-50%)"};case"center-right":return{top:"50%",right:"16px",transform:"translateY(-50%)"};case"top":return{top:"16px",left:"50%",transform:"translateX(-50%)"};case"bottom":return{bottom:"16px",left:"50%",transform:"translateX(-50%)"};case"left":return{top:"50%",left:"16px",transform:"translateY(-50%)"};case"right":return{top:"50%",right:"16px",transform:"translateY(-50%)"};case"center":return{top:"50%",left:"50%",transform:"translate(-50%, -50%)"};default:return{bottom:"16px",right:"16px"}}}function ca(e){return e==="h2"?3:e==="h3"?5:0}function ua({tableOfContents:e,onClose:t,collapsePosition:n}){const[s,o]=m.useState(""),r=m.useRef(0),[i]=M();function l(u,f){i.getEditorState().read(()=>{const y=i.getElementByKey(u);y!==null&&(y.scrollIntoView(),o(u),r.current=f)})}function d(u){const f=u?.getClientRects()[0].y;return f>=.26&&f<=9}function a(u){return u?.getClientRects()[0].y<=0}function c(u){return u?.getClientRects()[0].y>9}return m.useEffect(()=>{function u(){if(e.length!==0&&r.current<e.length-1){let C=i.getElementByKey(e[r.current][0]);if(C!==null){if(c(C)){for(;C!==null&&c(C)&&r.current>0;){const g=i.getElementByKey(e[r.current-1][0]);g!==null&&(a(g)||c(g))&&r.current--,C=g}const L=e[r.current][0];o(L)}else if(a(C)){for(;C!==null&&a(C)&&r.current<e.length-1;){const g=i.getElementByKey(e[r.current+1][0]);g!==null&&(d(g)||a(g))&&r.current++,C=g}const L=e[r.current][0];o(L)}}}else r.current=0}let f;function y(C,L){clearTimeout(f),f=setTimeout(C,L)}function E(){y(u,10)}return document.addEventListener("scroll",E),()=>document.removeEventListener("scroll",E)},[e,i]),h.jsxs(ie,{sx:{position:"fixed",...$n(n),width:"220px",maxHeight:"300px",overflowY:"auto",overflowX:"hidden",zIndex:20,bg:"var(--bgColor-default)",border:"1px solid",borderColor:"var(--borderColor-default)",borderRadius:2,boxShadow:"var(--shadow-resting-small, 0 1px 1px 0 #1f23280f, 0 1px 3px 0 #1f23280f)",p:2},children:[h.jsxs(ie,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:2},children:[h.jsx(Ho,{sx:{fontSize:1,fontWeight:"bold",color:"var(--fgColor-default)"},children:"Table of Contents"}),h.jsx(ie,{as:"button",type:"button",onClick:t,"aria-label":"Close table of contents",title:"Close",sx:{appearance:"none",border:"1px solid",borderColor:"var(--borderColor-default)",borderRadius:1,bg:"var(--bgColor-default)",color:"var(--fgColor-default)",width:"24px",height:"24px",p:0,display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{bg:"var(--bgColor-muted)"}},children:h.jsx(hn,{size:12})})]}),h.jsx(Ct,{"aria-label":"Table of contents",children:e.map(([u,f,y],E)=>{const C=(""+f).length>27?f.substring(0,27)+"…":f;return h.jsx(Ct.Item,{as:"button",type:"button","aria-current":s===u?"location":void 0,onClick:()=>l(u,E),sx:{width:"100%",textAlign:"left",fontWeight:E===0?"bold":void 0,pl:E===0?void 0:ca(y)},children:C},u)})})]})}const da=({showByDefault:e=!1,collapsePosition:t="bottom-right"}={})=>{const[n,s]=m.useState(e);return h.jsx(la,{children:o=>n?h.jsx(ua,{tableOfContents:o,onClose:()=>s(!1),collapsePosition:t}):h.jsx(Fo,{text:"Open TOC",direction:"w",children:h.jsx(ie,{as:"button",type:"button",onClick:()=>s(!0),"aria-label":"Open table of contents",title:"Open TOC",sx:{position:"fixed",...$n(t),zIndex:20,width:"48px",height:"48px",borderRadius:"999px",border:"1px solid",borderColor:"var(--borderColor-default)",bg:"var(--overlay-bgColor)",color:"var(--fgColor-default)",boxShadow:"var(--shadow-resting-medium, 0 1px 1px 0 #25292e1a, 0 3px 6px 0 #25292e1f)",display:"inline-flex",alignItems:"center",justifyContent:"center",cursor:"pointer","&:hover":{bg:"var(--bgColor-muted)"}},children:h.jsx(zo,{size:16})})})})};function pa(e,t,n){const s=m.useRef(null);return s.current=e,m.useMemo(()=>As((...o)=>{s.current&&s.current(...o)},t,{maxWait:n}),[t,n])}const Mt=20;function fa({anchorElem:e}){const[t,{getTheme:n}]=M(),s=on(),[o,r]=m.useState(!1),[i,l]=m.useState(!1),[d,a]=m.useState(!1),[c,u]=m.useState({}),f=m.useRef(new Set),y=m.useRef(null),E=pa(g=>{const{isOutside:S,tableDOMNode:R}=ma(g,n);if(S){r(!1),l(!1);return}if(!R)return;y.current=R;let $=null,p=null,T=null;if(t.getEditorState().read(()=>{const v=Tt(R);if(Ze(v)){const x=le(v,k=>Ye(k));if(!Ye(x))return;if(T=$s(x,t.getElementByKey(x.getKey())),T){const k=x.getChildrenSize(),A=x.getChildAtIndex(0)?.getChildrenSize(),I=Rs(v),b=Is(v);I===k-1?$=v:b===A-1&&(p=v)}}},{editor:t}),T){const{width:v,y:x,right:k,left:A,bottom:I,height:b}=T.getBoundingClientRect(),N=T.parentElement;let _=!1;N&&N.classList.contains("JupyterLexicalTheme__tableScrollableWrapper")&&(_=N.scrollWidth>N.clientWidth);const{y:B,left:O}=e.getBoundingClientRect();if($){const w={height:Mt,left:_&&N?N.offsetLeft:A-O,top:I-B,width:_&&N?N.offsetWidth:v};l(!1),r(!0),u(w)}else if(p){const w={height:b,left:k-O,top:x-B,width:Mt};l(!0),r(!1),u(w)}}},50,250),C=m.useMemo(()=>new ResizeObserver(()=>{r(!1),l(!1)}),[]);m.useEffect(()=>{if(!d)return;const g=()=>{r(!1),l(!1)};return document.addEventListener("mousemove",E),document.addEventListener("scroll",g,!0),()=>{r(!1),l(!1),E.cancel(),document.removeEventListener("mousemove",E),document.removeEventListener("scroll",g,!0)}},[d,E]),m.useEffect(()=>ve(t.registerMutationListener(Jt,g=>{t.getEditorState().read(()=>{let S=!1;for(const[R,$]of g)switch($){case"created":{f.current.add(R),S=!0;break}case"destroyed":{f.current.delete(R),S=!0;break}}if(S){C.disconnect();for(const R of f.current){const{tableElement:$}=Ns(R);C.observe($)}a(f.current.size>0)}},{editor:t})},{skipInitialization:!1})),[t,C]);const L=g=>{t.update(()=>{y.current&&(Tt(y.current)?.selectEnd(),g?(Ps(),r(!1)):(Os(),l(!1)))})};return s?h.jsxs(h.Fragment,{children:[o&&h.jsx("button",{className:`${n()?.tableAddRows}`,style:{...c},onClick:()=>L(!0)}),i&&h.jsx("button",{className:`${n()?.tableAddColumns}`,style:{...c},onClick:()=>L(!1)})]}):null}function ma(e,t){const n=e.target,s=Fe(t,"tableCell");if(qo(n)){const o=n.closest(`td${s}, th${s}`);return{isOutside:!(o||n.closest(`button${Fe(t,"tableAddRows")}`)||n.closest(`button${Fe(t,"tableAddColumns")}`)||n.closest("div.TableCellResizer__resizer")),tableDOMNode:o}}else return{isOutside:!0,tableDOMNode:null}}function Ol({anchorElem:e=document.body}){return on()?gn.createPortal(h.jsx(fa,{anchorElem:e}),e):null}const Ae="JupyterLexicalTheme__tableScrollableWrapper",Dt="JupyterLexicalTheme__tableScrollRight",Bt="JupyterLexicalTheme__tableScrollLeft",jt="JupyterLexicalTheme__tableScrollMiddle";function Ne(e){const t=e.scrollWidth>e.clientWidth,n=e.scrollLeft+e.clientWidth>=e.scrollWidth-1,s=e.scrollLeft<=1;e.classList.remove(Dt),e.classList.remove(Bt),e.classList.remove(jt),t&&(!s&&!n?e.classList.add(jt):s&&!n?e.classList.add(Dt):!s&&n&&e.classList.add(Bt))}function Ml(){const[e]=M();return m.useEffect(()=>{const t=e.getRootElement();if(!t)return;const n=()=>{t.querySelectorAll(`.${Ae}`).forEach(Ne)};n();const s=new MutationObserver(()=>{n()});s.observe(t,{childList:!0,subtree:!0});const o=new ResizeObserver(()=>{n()}),r=new Map,i=a=>{if(r.has(a))return;const c=()=>{Ne(a)};a.addEventListener("scroll",c,{passive:!0}),r.set(a,c)};t.querySelectorAll(`.${Ae}`).forEach(a=>{o.observe(a),i(a)});const d=new MutationObserver(a=>{a.forEach(c=>{c.addedNodes.forEach(u=>{u instanceof HTMLElement&&(u.classList.contains(Ae)&&(o.observe(u),i(u),Ne(u)),u.querySelectorAll(`.${Ae}`).forEach(y=>{o.observe(y),i(y),Ne(y)}))})})});return d.observe(t,{childList:!0,subtree:!0}),()=>{s.disconnect(),o.disconnect(),d.disconnect(),r.forEach((a,c)=>{c.removeEventListener("scroll",a)}),r.clear()}},[e]),null}const Rn=Object.freeze({" ":"\\t","\n":"\\n"}),Ut=new RegExp(Object.keys(Rn).join("|"),"g"),J=Object.freeze({ancestorHasNextSibling:"|",ancestorIsLastChild:" ",hasNextSibling:"├",isLastChild:"└",selectedChar:"^",selectedLine:">"}),ga=[e=>e.hasFormat("bold")&&"Bold",e=>e.hasFormat("code")&&"Code",e=>e.hasFormat("italic")&&"Italic",e=>e.hasFormat("strikethrough")&&"Strikethrough",e=>e.hasFormat("subscript")&&"Subscript",e=>e.hasFormat("superscript")&&"Superscript",e=>e.hasFormat("underline")&&"Underline",e=>e.hasFormat("highlight")&&"Highlight"],ha=[e=>e.hasTextFormat("bold")&&"Bold",e=>e.hasTextFormat("code")&&"Code",e=>e.hasTextFormat("italic")&&"Italic",e=>e.hasTextFormat("strikethrough")&&"Strikethrough",e=>e.hasTextFormat("subscript")&&"Subscript",e=>e.hasTextFormat("superscript")&&"Superscript",e=>e.hasTextFormat("underline")&&"Underline",e=>e.hasTextFormat("highlight")&&"Highlight"],ba=[e=>e.isDirectionless()&&"Directionless",e=>e.isUnmergeable()&&"Unmergeable"],ya=[e=>e.isToken()&&"Token",e=>e.isSegmented()&&"Segmented"];function xa(e,t,n,s,o=!1){const r=e.getEditorState(),i=e._config,l=e._compositionKey,d=e._editable;if(n){let f="";return r.read(()=>{f=(function(y){const E=document.createElement("div");return E.innerHTML=y.trim(),In(E,0).innerHTML})(Wo(e))},{editor:e}),f}let a=` root
|
|
536
|
+
`;const c=r.read(()=>{const f=se();return st(ce(),(y,E,C)=>{const L=`(${y.getKey()})`,g=y.getType()||"",S=y.isSelected(),R=C!==void 0?`[slot: ${C}] `:"",$=(function(p,T){return T===void 0?"":z(p)&&p.isShadowRoot()?" [shadow-root]":Te(p)&&!p.isInline()?" [atomic decorator]":""})(y,C);a+=`${S?J.selectedLine:" "} ${E.join(" ")} ${L} ${R}${g}${$} ${(function(p,T,v=!1){const x=T?T(p,v):void 0;if(x!==void 0&&x.length>0)return x;if(j(p)){const k=p.getTextContent(),A=k.length===0?"(empty)":`"${Ft(k,v)}"`,I=(function(b){return[zt(b),Ta(b),Ea(b),Ht(b)].filter(Boolean).join(", ")})(p);return[A,I.length!==0?`{ ${I} }`:null].filter(Boolean).join(" ").trim()}if(Y(p)){const k=p.getURL(),A=k.length===0?"(empty)":`"${Ft(k,v)}"`,I=(function(b){return[Ca(b),va(b),wa(b),Ht(b)].filter(Boolean).join(", ")})(p);return[A,I.length!==0?`{ ${I} }`:null].filter(Boolean).join(" ").trim()}if(qt(p))return`ids: [ ${p.getIDs().join(", ")} ]`;if(ae(p)){const k=(function(I){let b=ha.map(N=>N(I)).filter(Boolean).join(", ").toLocaleLowerCase();return b!==""&&(b="format: "+b),b})(p);let A=k!==""?`{ ${k} }`:"";return A+=p.__style?`(${p.__style})`:"",A}return""})(y,s,o)}
|
|
537
|
+
`,a+=(function({indent:p,isSelected:T,node:v,nodeKeyDisplay:x,selection:k,typeDisplay:A}){if(!j(v)||!X(k)||!T||z(v))return"";const I=k.anchor,b=k.focus;if(v.getTextContent()===""||I.getNode()===k.focus.getNode()&&I.offset===b.offset)return"";const[N,_]=(function(P,D){const q=D.getStartEndPoints();if(pe(D)||q===null)return[-1,-1];const[Z,re]=q,je=P.getTextContent(),Ue=je.length;let he=-1,we=-1;if(Z.type==="text"&&re.type==="text"){const be=Z.getNode(),Se=re.getNode();be===Se&&P===be&&Z.offset!==re.offset?[he,we]=Z.offset<re.offset?[Z.offset,re.offset]:[re.offset,Z.offset]:[he,we]=P===be?be.isBefore(Se)?[Z.offset,Ue]:[0,Z.offset]:P===Se?Se.isBefore(be)?[re.offset,Ue]:[0,re.offset]:[0,Ue]}const ht=(je.slice(0,he).match(Ut)||[]).length,On=(je.slice(he,we).match(Ut)||[]).length;return[he+ht,we+ht+On]})(v,k);if(N===_)return"";const B=p[p.length-1]===J.hasNextSibling?J.ancestorHasNextSibling:J.ancestorIsLastChild,O=[...p.slice(0,p.length-1),B],w=Array(N+1).fill(" "),H=Array(_-N).fill(J.selectedChar),F=A.length+2,ue=Array(x.length+F).fill(" ");return[J.selectedLine,O.join(" "),[...ue,...w,...H].join("")].join(" ")+`
|
|
538
538
|
`})({indent:E,isSelected:S,node:y,nodeKeyDisplay:L,selection:f,typeDisplay:g})}),f===null?": null":X(f)?(function(y){let E="";const C=zt(y),L=(function(T){let v=T;for(;v!==null;){const x=Xo(v);if(x!==null){const k=Et(v);if(k!==null)return{host:k,name:x}}v=v.getParent()??Et(v)}return null})(y.anchor.getNode()),g=L!==null?` (in slot "${L.name}" of ${L.host.getType()} { key: ${L.host.getKey()} })`:"";E+=`: range${g} ${C!==""?`{ ${C} }`:""} ${y.style!==""?`{ style: ${y.style} } `:""}`;const S=y.anchor,R=y.focus,$=S.offset,p=R.offset;return E+=`
|
|
539
539
|
├ anchor { key: ${S.key}, offset: ${$===null?"null":$}, type: ${S.type} }`,E+=`
|
|
540
540
|
└ focus { key: ${R.key}, offset: ${p===null?"null":p}, type: ${R.type} }`,E})(f):Ms(f)?(function(y){return`: table
|
|
@@ -549,9 +549,9 @@ IFrame('${fs(l)}', width=800, height=450)`,[]))}else if(ae(i)&&i.getChildrenSize
|
|
|
549
549
|
editor${u?` (v${u})`:""}:`,a+=`
|
|
550
550
|
└ namespace ${i.namespace}`,l!==null&&(a+=`
|
|
551
551
|
└ compositionKey ${l}`),a+=`
|
|
552
|
-
└ editable ${String(d)}`,a}function st(e,t,n=[]){const s=[];for(const l of Jo(e)){const d=Vo(e,l);d!==null&&s.push([l,d])}const o=z(e)?e.getChildren():[],r=s.length+o.length;let i=0;for(const[l,d]of s){const a=i===r-1;t(d,n.concat(a?J.isLastChild:J.hasNextSibling),l),(z(d)||Te(d))&&st(d,t,n.concat(a?J.ancestorIsLastChild:J.ancestorHasNextSibling)),i++}for(const l of o){const d=i===r-1;t(l,n.concat(d?J.isLastChild:J.hasNextSibling)),(z(l)||Te(l))&&st(l,t,n.concat(d?J.ancestorIsLastChild:J.ancestorHasNextSibling)),i++}}function
|
|
552
|
+
└ editable ${String(d)}`,a}function st(e,t,n=[]){const s=[];for(const l of Jo(e)){const d=Vo(e,l);d!==null&&s.push([l,d])}const o=z(e)?e.getChildren():[],r=s.length+o.length;let i=0;for(const[l,d]of s){const a=i===r-1;t(d,n.concat(a?J.isLastChild:J.hasNextSibling),l),(z(d)||Te(d))&&st(d,t,n.concat(a?J.ancestorIsLastChild:J.ancestorHasNextSibling)),i++}for(const l of o){const d=i===r-1;t(l,n.concat(d?J.isLastChild:J.hasNextSibling)),(z(l)||Te(l))&&st(l,t,n.concat(d?J.ancestorIsLastChild:J.ancestorHasNextSibling)),i++}}function Ft(e,t=!1){const n=Object.entries(Rn).reduce((s,[o,r])=>s.replace(new RegExp(o,"g"),String(r)),e);return t?n.replace(/[^\s]/g,"*"):n}function Ta(e){let t=ba.map(n=>n(e)).filter(Boolean).join(", ").toLocaleLowerCase();return t!==""&&(t="detail: "+t),t}function Ea(e){let t=ya.map(n=>n(e)).filter(Boolean).join(", ").toLocaleLowerCase();return t!==""&&(t="mode: "+t),t}function zt(e){let t=ga.map(n=>n(e)).filter(Boolean).join(", ").toLocaleLowerCase();return t!==""&&(t="format: "+t),t}function Ca(e){let t=e.getTarget();return t!=null&&(t="target: "+t),t}function va(e){let t=e.getRel();return t!=null&&(t="rel: "+t),t}function wa(e){let t=e.getTitle();return t!=null&&(t="title: "+t),t}function Ht(e){if(!e.__state)return!1;const t=[];for(const[s,o]of e.__state.knownState.entries()){if(s.isEqual(o,s.defaultValue))continue;const r=JSON.stringify(s.unparse(o));t.push(`[${s.key}: ${r}]`)}let n=t.join(",");return n!==""&&(n="state: "+n),n}function In(e,t){const n=new Array(1+t++).join(" "),s=new Array(t-1).join(" ");let o;for(let r=0;r<e.children.length;r++)o=document.createTextNode(`
|
|
553
553
|
`+n),e.insertBefore(o,e.children[r]),In(e.children[r],t),e.lastElementChild===e.children[r]&&(o=document.createTextNode(`
|
|
554
|
-
`+s),e.appendChild(o));return e}const Sa=m.forwardRef(function({treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:n,timeTravelPanelButtonClassName:s,viewClassName:o,timeTravelPanelClassName:r,editorState:i,setEditorState:l,setEditorReadOnly:d,generateContent:a,commandsLog:c=[]},u){const[f,y]=m.useState([]),[E,C]=m.useState(""),[L,g]=m.useState(!1),[S,R]=m.useState(!1),$=m.useRef(0),p=m.useRef(null),[T,v]=m.useState(!1),[x,k]=m.useState(!1),[A,I]=m.useState(!1),b=m.useRef(null),N=m.useRef([]),_=m.useRef(0),B=m.useCallback(w=>{const H=++_.current;a(w).then(
|
|
554
|
+
`+s),e.appendChild(o));return e}const Sa=m.forwardRef(function({treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:n,timeTravelPanelButtonClassName:s,viewClassName:o,timeTravelPanelClassName:r,editorState:i,setEditorState:l,setEditorReadOnly:d,generateContent:a,commandsLog:c=[]},u){const[f,y]=m.useState([]),[E,C]=m.useState(""),[L,g]=m.useState(!1),[S,R]=m.useState(!1),$=m.useRef(0),p=m.useRef(null),[T,v]=m.useState(!1),[x,k]=m.useState(!1),[A,I]=m.useState(!1),b=m.useRef(null),N=m.useRef([]),_=m.useRef(0),B=m.useCallback(w=>{const H=++_.current;a(w).then(F=>{H===_.current&&C(F)}).catch(F=>{H===_.current&&C(`Error rendering tree: ${F.message}
|
|
555
555
|
|
|
556
556
|
Stack:
|
|
557
|
-
${U.stack}`)})},[a]);m.useEffect(()=>{if(!(!A&&i._nodeMap.size>1e3&&(k(!0),!A))&&(b.current!==i||N.current!==c)){const w=b.current!==i;b.current=i,N.current=c,B(S),!L&&w&&y(H=>[...H,[Date.now(),i]])}},[i,B,S,A,L,c]);const O=f.length;return m.useEffect(()=>{if(T){let w;const H=()=>{const U=$.current;if(U===O-1)return void v(!1);const ue=f[U][0],P=f[U+1][0];w=setTimeout(()=>{$.current++;const D=$.current,q=p.current;q!==null&&(q.value=String(D)),l(f[D][1]),H()},P-ue)};return H(),()=>{clearTimeout(w)}}},[f,T,O,l]),h.jsxs("div",{className:o,children:[!A&&x?h.jsxs("div",{style:{padding:20},children:[h.jsx("span",{style:{marginRight:20},children:"Detected large EditorState, this can impact debugging performance."}),h.jsx("button",{onClick:()=>{I(!0)},style:{background:"transparent",border:"1px solid white",color:"white",cursor:"pointer",padding:5},children:"Show full tree"})]}):null,A?null:h.jsx("button",{onClick:()=>(B(!S),void R(!S)),className:e,type:"button",children:S?"Tree":"Export DOM"}),!L&&(A||!x)&&O>2&&h.jsx("button",{onClick:()=>{d(!0),$.current=O-1,g(!0)},className:t,type:"button",children:"Time Travel"}),(A||!x)&&h.jsx("pre",{ref:u,children:E}),L&&(A||!x)&&h.jsxs("div",{className:r,children:[h.jsx("button",{className:s,onClick:()=>{$.current===O-1&&($.current=1),v(!T)},type:"button",children:T?"Pause":"Play"}),h.jsx("input",{className:n,ref:p,onChange:w=>{const H=Number(w.target.value),U=f[H];U&&($.current=H,l(U[1]))},type:"range",min:"1",max:O-1}),h.jsx("button",{className:s,onClick:()=>{d(!1);const w=f.length-1,H=f[w];l(H[1]);const U=p.current;U!==null&&(U.value=String(w)),g(!1),v(!1)},type:"button",children:"Exit"})]})]})});function La(e,t){const n=[];let s=0;for(const o of e._commands.keys())n.push(e.registerCommand(o,r=>{s+=1;const i={index:s,payload:r,type:o.type?o.type:"UNKNOWN"};return t(l=>[...l.slice(-9),i]),!1},mn));return()=>n.forEach(o=>o())}function _a(e){const[t,n]=m.useState([]);return m.useEffect(()=>La(e,n),[e]),t}function ka({treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:n,timeTravelPanelButtonClassName:s,timeTravelPanelClassName:o,viewClassName:r,editor:i,customPrintNode:l}){const d=m.createRef(),[a,c]=m.useState(i.getEditorState()),u=_a(i);return m.useEffect(()=>ve(i.registerUpdateListener(({editorState:f})=>{c(f)}),i.registerEditableListener(()=>{c(i.getEditorState())})),[i]),m.useEffect(()=>{const f=d.current;if(f!==null)return f.__lexicalEditor=i,()=>{f.__lexicalEditor=null}},[i,d]),h.jsx(Sa,{treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:n,timeTravelPanelButtonClassName:s,viewClassName:r,timeTravelPanelClassName:o,setEditorReadOnly:f=>{const y=i.getRootElement();y!=null&&(y.contentEditable=f?"false":"true")},editorState:a,setEditorState:f=>i.setEditorState(f),generateContent:async function(f){return xa(i,u,f,l)},ref:d,commandsLog:u})}function Aa(){const[e]=M();return h.jsx(ka,{viewClassName:"tree-view-output",treeTypeButtonClassName:"debug-treetype-button",timeTravelPanelClassName:"debug-timetravel-panel",timeTravelButtonClassName:"debug-timetravel-button",timeTravelPanelSliderClassName:"debug-timetravel-panel-slider",timeTravelPanelButtonClassName:"debug-timetravel-panel-button",editor:e})}const Dl=({publicAppId:e})=>{const[t]=M();return m.useEffect(()=>Ds(t),[t]),m.useEffect(()=>Bs(t,e),[t,e]),null},Bl=()=>{const[e]=M();return m.useEffect(()=>js(e),[e]),null},jl=()=>{const[e]=M();return m.useEffect(()=>Fs(e),[e]),null};function Fl(e){const[t]=M();return m.useEffect(()=>an(t,e),[t,e]),null}function Ul(e){const[t]=M();return m.useEffect(()=>rn(t,e),[t,e]),null}function zl(e){const[t]=M();return m.useEffect(()=>ln(t,e),[t,e]),null}function Hl(e){const[t]=M();return m.useEffect(()=>cn(t,e),[t,e]),null}function ql(){const[e]=M();return m.useEffect(()=>{const t=[an(e),rn(e),ln(e),cn(e)];return()=>t.forEach(n=>n())},[e]),null}const Na="Jupyter Lexical Example",Pn="Code and analyse data.";function $a(e,t=[]){return Zo({name:"@datalayer/jupyter-lexical/Editor",namespace:Na,theme:so,dependencies:[no,Ko,...t],$initialEditorState:e})}const Ra=({runtimeEnabled:e,onSessionConnection:t})=>{const{defaultKernel:n}=er({startDefaultKernel:e}),s=$t(oo),o=$t(ro);return h.jsxs(h.Fragment,{children:[e&&h.jsx(s,{kernel:n,onSessionConnection:t}),h.jsx(o,{kernel:n})]})};function Ia(){return h.jsx("div",{className:"editor-placeholder",children:Pn})}const Pa=()=>{const{setEditor:e}=ur(),[t]=M();return m.useEffect(()=>{e(t)},[t,e]),null};function Oa(e){const{id:t,notebook:n,onSessionConnection:s,collaboration:o,runtimeEnabled:r=!0}=e,[i]=M(),[l,d]=m.useState(i),[a,c]=m.useState(!1),[u,f]=m.useState(null),y=o?.id,[E,C]=m.useState(),L=y===void 0||E===y,g=o?.onInitialization,S=m.useCallback($=>{C($?y:void 0),g?.($)},[y,g]),R=$=>{$!==null&&f($)};return h.jsxs("div",{className:"editor-container",children:[h.jsx(qs,{editor:i,activeEditor:l,setActiveEditor:d,setIsLinkEditMode:c}),h.jsxs("div",{className:"editor-inner",children:[o&&h.jsx(Ws,{id:o.id,shouldBootstrap:!0,showCollaborators:!0,username:o.username,cursorColor:o.cursorColor,initialEditorState:o.initialEditorState,awarenessData:o.awarenessData,providerFactory:o.providerFactory??Xs,websocketUrl:o.websocketUrl,onIdentityResolved:o.onIdentityResolved,onInitialization:S}),L?h.jsx("div",{className:"editor-scroller",children:h.jsx("div",{className:"editor",ref:R,children:h.jsx(Go,{className:"editor-input",placeholder:h.jsx(Ia,{}),"aria-placeholder":Pn})})}):h.jsx(Js,{maxWidth:"100%"}),h.jsx(Aa,{}),t&&h.jsx(Vs,{}),h.jsx(Ys,{}),h.jsx(Gs,{}),h.jsx(Zs,{}),h.jsx(Ra,{runtimeEnabled:r,onSessionConnection:s}),h.jsx(oa,{notebook:n}),h.jsx(Ks,{}),h.jsx(Pa,{}),h.jsx(da,{}),h.jsx(Qs,{providerFactory:void 0}),u&&h.jsxs(h.Fragment,{children:[h.jsx(eo,{anchorElem:u}),h.jsx(Ki,{anchorElem:u,isLinkEditMode:a,setIsLinkEditMode:c}),h.jsx(to,{anchorElem:u,setIsLinkEditMode:c})]})]})]})}function Wl(e){const{id:t,serviceManager:n,collaboration:s,initialEditorState:o,extensions:r}=e,i=m.useMemo(()=>$a(s?void 0:o,r),[s,o,r]),l=h.jsx(Yo,{extension:i,contentEditable:null,children:h.jsx(Us,{children:h.jsx(zs,{children:h.jsx("div",{className:"editor-shell",children:h.jsx(Oa,{...e})})})})});return t?h.jsx(Hs,{lexicalId:t,serviceManager:n,children:l}):l}export{Ec as $blockOf,Cc as $blocksOf,$e as $columnOf,Me as $columnsOf,bl as $convertFromLatexString,gl as $convertToLatexString,rs as $createCollapsibleContainerNode,as as $createCollapsibleContentNode,is as $createCollapsibleTitleNode,vc as $createCommentThreadNode,wc as $createCounterNode,Sc as $createDeckNode,tn as $createEquationNode,Lc as $createExcalidrawNode,_c as $createExecutionTreeNode,Qt as $createImageNode,kc as $createInlineCompletionNode,Ac as $createJupyterCellNode,bs as $createJupyterInputHighlightNode,Zn as $createJupyterInputNode,Nc as $createJupyterOutputNode,Gn as $createLayoutContainerNode,Yn as $createLayoutItemNode,$c as $createLoomNode,Rc as $createVideoNode,ss as $createYouTubeNode,hl as $importLatex,Ic as $inlinesOf,Pc as $inlinesOfNodes,ls as $isCollapsibleContainerNode,Oc as $isCollapsibleContentNode,Mc as $isCollapsibleTitleNode,Dc as $isCommentThreadNode,Bc as $isCounterNode,jc as $isDeckNode,Fc as $isEmptyLayoutItemNode,Ie as $isEquationNode,Uc as $isExcalidrawNode,zc as $isExecutionTreeNode,en as $isImageNode,ys as $isInlineCompletionNode,Hc as $isJupyterCellNode,qc as $isJupyterInputHighlightNode,Be as $isJupyterInputNode,Ve as $isJupyterOutputNode,os as $isLayoutContainerNode,Pe as $isLayoutItemNode,ds as $isLoomNode,Wc as $isVideoNode,nn as $isYouTubeNode,Xc as $jupyterInputNodeFor,Jc as $jupyterOutputNodeFor,Vc as $readDocument,kn as $splitBlocks,Gr as $titleBlock,Ts as AUTO_LINK_MATCHERS,dl as ApiCommentStore,Yc as AutoEmbedDialog,Gc as AutoEmbedExtension,Zc as AutoEmbedPlugin,nr as AutoIndentEngine,El as AutoIndentPlugin,Kc as AutoLinkExtension,Cl as AutoLinkPlugin,Qc as Button,eu as CAN_USE_DOM,mr as CHAPTER_CLASSES,tu as CLEAR_ALL_OUTPUTS_COMMAND,nu as CODE_LANGUAGE_FRIENDLY_NAME_MAP,su as CODE_LANGUAGE_MAP,Ks as CodeActionMenuPlugin,ou as CodeBlockHighlightExtension,_l as CodeBlockHighlightPlugin,Gt as CollapsibleContainerNode,ru as CollapsibleContentNode,iu as CollapsibleExtension,Om as CollapsiblePlugin,au as CollapsibleTitleNode,lu as CommentAuthorAvatar,cu as CommentExtension,uu as CommentPeopleContext,Qs as CommentPlugin,du as CommentStore,pu as CommentThreadNode,Us as CommentsProvider,ro as ComponentPickerMenuExtension,fu as ComponentPickerMenuPlugin,mu as CounterNode,gu as DEFAULT_CODE_LANGUAGE,hu as DEFAULT_CONFIG,bu as DEFAULT_FONT_SIZE,yu as DEFAULT_INITIAL_OUTPUTS,Ls as DEFAULT_LIST_MAX_INDENT_LEVEL,xu as DEFAULT_TYPST_MODULE_URL,Tu as DEFAULT_TYPST_WASM_URL,Eu as DeckExtension,Cu as DeckNode,jl as DeckPlugin,Vl as DefaultExecutor,Js as DocumentSkeleton,eo as DraggableBlockPlugin,Na as EDITOR_NAMESPACE,vu as EXPORT_PDF_DOCUMENT_COMMAND,wu as EXPORT_PDF_SNAPSHOT_COMMAND,Su as EXPORT_PDF_TYPESET_COMMAND,Wl as Editor,Oa as EditorContainer,Lu as EmbedConfigs,_u as EmbedHandlersContext,Yt as EquationNode,ku as EquationsExtension,Au as EquationsPlugin,Nu as ExcalidrawExtension,$u as ExcalidrawNode,Ru as ExcalidrawPlugin,Iu as ExecutionTreeExtension,Pu as ExecutionTreeNode,Ou as FileInput,Ki as FloatingLinkEditorPlugin,to as FloatingTextFormatToolbarPlugin,Mu as HorizontalRuleExtension,kl as HorizontalRulePlugin,Du as INPUT_UUID_TO_CODE_KEY,Bu as INPUT_UUID_TO_OUTPUT_KEY,ju as INPUT_UUID_TO_OUTPUT_UUID,Fu as INSERT_COLLAPSIBLE_COMMAND,Uu as INSERT_DECK_COMMAND,zu as INSERT_EQUATION_COMMAND,Hu as INSERT_EXCALIDRAW_COMMAND,qu as INSERT_EXECUTION_TREE_COMMAND,Wu as INSERT_IMAGE_COMMAND,Xu as INSERT_INLINE_COMMAND,Ju as INSERT_JUPYTER_CELL_COMMAND,hs as INSERT_JUPYTER_INPUT_OUTPUT_COMMAND,Vu as INSERT_LAYOUT_COMMAND,Yu as INSERT_LOOM_COMMAND,Gu as INSERT_MARIMO_CELL_COMMAND,Zu as INSERT_TABLE_WITH_DIALOG_COMMAND,Ku as INSERT_VIDEO_COMMAND,Qu as INSERT_YOUTUBE_COMMAND,Vt as ImageNode,ed as ImageResizer,td as ImagesExtension,nd as ImagesPlugin,sd as InlineCompletionExtension,od as InlineCompletionNode,rd as InsertEquationDialog,id as InsertImageDialog,ad as InsertImageUploadedDialogBody,ld as InsertImageUriDialogBody,cd as JupyterCellExtension,ud as JupyterCellNode,Al as JupyterCellPlugin,dd as JupyterInputHighlightNode,jn as JupyterInputNode,oo as JupyterInputOutputExtension,pd as JupyterInputOutputPlugin,no as JupyterLexicalExtension,Fn as JupyterOutputNode,fd as KatexEquationAlterer,ci as LATEX_ALGORITHM,ni as LATEX_BIBLIOGRAPHY,ri as LATEX_BLOCK,jr as LATEX_BOLD,Lr as LATEX_CODE,Br as LATEX_CODE_FORMAT,Dr as LATEX_COLLAPSIBLE,Qr as LATEX_COLUMNS,li as LATEX_CV,Or as LATEX_DISPLAY_EQUATION,ui as LATEX_ELEMENT_TRANSFORMERS,Pr as LATEX_FIGURE,Ir as LATEX_FLOAT,si as LATEX_FRAME,oi as LATEX_FRAME_TITLE,Cr as LATEX_HEADING,Wr as LATEX_HIGHLIGHT,Ar as LATEX_HORIZONTAL_RULE,Jr as LATEX_IMAGE,Xr as LATEX_INLINE_EQUATION,Fr as LATEX_ITALIC,_r as LATEX_JUPYTER_INPUT,kr as LATEX_JUPYTER_OUTPUT,ii as LATEX_LETTER,ai as LATEX_LETTER_LINES,Vr as LATEX_LINK,Sr as LATEX_LIST,Zr as LATEX_META,fi as LATEX_PREAMBLE_PACKAGES,vr as LATEX_QUOTE,zr as LATEX_STRIKETHROUGH,qr as LATEX_SUBSCRIPT,Hr as LATEX_SUPERSCRIPT,Rr as LATEX_TABLE,Ii as LATEX_TEMPLATES,yl as LATEX_TEMPLATE_CATEGORIES,di as LATEX_TEXT_FORMAT_TRANSFORMERS,pi as LATEX_TEXT_MATCH_TRANSFORMERS,ti as LATEX_THEOREM,Kr as LATEX_TITLE,ge as LATEX_TRANSFORMERS,Ur as LATEX_UNDERLINE,Mr as LATEX_YOUTUBE,md as LOOM_EXTENSION_NAME,Pt as LSPCompletionItemKind,Rl as LSPDocumentSyncPlugin,gd as LSPTabCompletionPlugin,hd as LSP_COMPLETION_INSERTED_COMMAND,bd as LSP_MENU_STATE_COMMAND,rr as LanguageIndentRegistry,Xn as LayoutContainerNode,yd as LayoutExtension,Jn as LayoutItemNode,Nl as LayoutPlugin,xd as LexicalAdapter,Hs as LexicalConfigProvider,Td as LexicalContentEditable,pl as LexicalContextConsumer,dr as LexicalContextProvider,Ed as LexicalInlineCompletionPlugin,$l as LexicalLSPCompletionProvider,ml as LexicalPrimerThemeProvider,fl as LexicalProvider,Cd as LexicalStateExtension,Vs as LexicalStatePlugin,vd as ListMaxIndentLevelExtension,Il as ListMaxIndentLevelPlugin,wd as LoomEmbedConfig,Sd as LoomExtension,Ld as LoomNode,Dl as LoomPlugin,_d as MAX_ALLOWED_FONT_SIZE,kd as MIN_ALLOWED_FONT_SIZE,Pl as MarkdownPlugin,Ad as MarkdownShortcutsExtension,Nd as MentionsPlugin,$d as Modal,Oi as NBFORMAT_METADATA,oa as NbformatContentPlugin,Rd as OUTPUT_UUID_TO_CODE_UUID,Id as OUTPUT_UUID_TO_OUTPUT_KEY,Pd as OrchestrationRenderersContext,Od as PAGE_SIZES,Md as PDF_FONTS,Dd as PEOPLE_SEARCH_PAUSE_MS,Bd as PRINT_CSS,jd as PRINT_PDF_COMMAND,Fd as PdfDocumentExtension,Ul as PdfDocumentPlugin,Ud as PdfExportExtension,ql as PdfExportPlugin,zd as PdfPage,Hd as PdfPrintExtension,Fl as PdfPrintPlugin,qd as PdfSnapshotExtension,zl as PdfSnapshotPlugin,Wd as PdfTypesetExtension,Hl as PdfTypesetPlugin,Xd as PdfWriter,Jd as Placeholder,Vd as Point,Yd as PrettierButton,Gd as RESTART_JUPYTER_KERNEL_COMMAND,Zd as RUN_ALL_JUPYTER_CELLS_COMMAND,Kd as RUN_JUPYTER_CELL_COMMAND,Qd as Rect,ep as SettingsContext,tp as TRIGGER_INLINE_COMPLETION_COMMAND,np as TYPST_TS_VERSION,Gs as TableActionMenuPlugin,Ys as TableCellResizerPlugin,sp as TableExtension,Ol as TableHoverActionsPlugin,Zs as TableHoverActionsV2Plugin,op as TableInsertDialogPlugin,da as TableOfContentsPlugin,rp as TablePlugin,Ml as TableScrollShadowPlugin,ip as TextInput,tr as ThemeContext,ap as ThreadAssignee,zs as ToolbarContext,qs as ToolbarPlugin,Aa as TreeViewPlugin,lp as VideoExtension,cp as VideoNode,Bl as VideoPlugin,up as YouTubeExtension,Wn as YouTubeNode,Fm as YouTubePlugin,dp as YoutubeEmbedConfig,Bn as anonymousAuthor,Dn as authorLabel,pp as authorOf,fp as blockTypeToBlockName,mp as buildPrintHtml,gp as bytesToObjectUrl,hp as canBePrettier,bp as canRaster,yp as canRecordVideo,xp as canvasElementToRaster,Tp as canvasToJpeg,Ep as canvasToPng,ji as cellSource,Cp as charWidth,vp as cloneEditorDom,wp as collectPictures,Sp as columnWeights,Yr as columnsTemplate,so as commentTheme,Lp as countPdfPages,_p as createComment,$a as createEditorExtension,yi as createLatexExport,$i as createLatexImport,Nn as createLatexImporter,kp as createThread,Ap as dataUrlToBytes,Yl as deleteBlocksOperation,Gl as deleteBlocksTool,Np as describeLoomVideo,$p as describeScene,Rp as discardVideoRecording,Ip as documentToPdf,Pp as downloadBytes,Op as elementSkeletonSchema,Mp as elementToRaster,Li as emptyDocumentInfo,Dp as emptyScene,Bp as encodeWinAnsi,jp as equalColumnsTemplate,Fp as equationToRaster,K as escapeLatex,Up as escapeTypst,zp as excalidrawAddElementsParamsSchema,Hp as excalidrawClearSceneParamsSchema,qp as excalidrawConnectElementsParamsSchema,Wp as excalidrawDeleteElementsParamsSchema,Xp as excalidrawFromMermaidParamsSchema,Jp as excalidrawInsertNodeParamsSchema,Vp as excalidrawListDrawingsParamsSchema,Yp as excalidrawPluginTools,Gp as excalidrawReadSceneParamsSchema,Zp as excalidrawResizeParamsSchema,Kp as excalidrawSetAppStateParamsSchema,Qp as excalidrawToolDefinitions,ef as excalidrawToolHandlers,tf as excalidrawToolMismatches,nf as excalidrawToolOperations,sf as excalidrawUpdateElementsParamsSchema,Zl as executeCodeOperation,Kl as executeCodeTool,ki as expandMacros,of as explainLoomFailure,rf as explainVideoFailure,af as exportLexicalToPdf,lf as exportPdfDocument,cf as exportPdfSnapshot,uf as exportPdfTypeset,xl as findLatexTemplate,df as flattenToInlines,pf as fontFor,ff as getCodeLanguages,vl as getDOMRangeRect,mf as getDefaultCodeLanguage,gf as getEndOfJupyterInputInLine,hf as getFirstJupyterInputHighlightNodeOfLine,bf as getItemsCountFromTemplate,yf as getLanguageFriendlyName,xf as getLastJupyterInputHighlightNodeOfLine,Ql as getLexicalTools,Oe as getSelectedNode,Sl as getSelection,Tf as getStartOfCodeInLine,Cn as hasChapters,Ef as imageToRaster,Cf as inlineSvgOf,vf as inlineText,ec as insertBlockOperation,tc as insertBlockTool,wf as isDisabled,Sf as isHTMLElement,Lf as isPoint,_f as isTypstEngine,kf as isValidContextScope,bn as javascriptIndentConfig,wl as joinClasses,An as latexTransformersByType,nc as lexicalStore,Tl as lexicalToNbformat,Af as lexicalToTypst,sc as lexicalToolDefinitions,oc as lexicalToolOperations,rc as lexicalTools,ic as listAvailableBlocksOperation,ac as listAvailableBlocksTool,Nf as liveElements,$f as loadHtml2Canvas,Rf as loadTypstEngine,fs as loomEmbedUrl,If as loomPublicAppIdOf,Pf as loomRecorder,Of as loomShareUrl,ps as loomVideoId,Mf as mathToSvg,Df as mentionsIn,Bf as mergeConfig,Fi as nbformatToLexical,jf as newDeckSpec,Ff as newVideoRecordingId,Uf as normalizeCodeLang,_i as parseMacros,Ai as parsePreamble,zf as parseScene,Hf as pdfFilename,qf as personLabel,Wf as pickVideoMimeType,Xf as printEditorToPdf,Jf as printPdf,sr as pythonIndentConfig,lc as readAllBlocksOperation,cc as readAllBlocksTool,uc as readBlockOperation,dc as readBlockTool,Vf as readDocument,Es as registerCodeBlockHighlight,Yf as registerCodeHighlighting,Gf as registerCollapsible,Fs as registerDeck,Zf as registerEquations,Kf as registerExecutionTree,Cs as registerHorizontalRule,Qf as registerImages,vs as registerJupyterCell,ws as registerLayout,em as registerLexicalState,Ss as registerListMaxIndentLevel,Ds as registerLoom,rn as registerPdfDocument,an as registerPdfPrint,ln as registerPdfSnapshot,cn as registerPdfTypeset,js as registerVideo,tm as registerYouTube,pc as runAllBlocksOperation,fc as runAllBlocksTool,mc as runBlockOperation,gc as runBlockTool,bt as sanitizeUrl,nm as scaleCanvas,sm as serializeScene,Ll as setFloatingElemPosition,Xe as setFloatingElemPositionForLinkEditor,Bs as setLoomPublicAppId,om as shouldAutoTrigger,rm as shouldManualTrigger,im as snapshotEditorToPdf,fr as splitDocument,am as startVideoRecording,lm as stopVideoRecording,cm as subscribeVideoRecordings,um as summarizeElement,dm as supportedTransformers,pm as svgForTypst,fm as svgToRaster,mm as textWidth,cr as threadsOf,Si as todayForLatex,gm as touchElement,or as typescriptIndentConfig,hm as typesetToPdf,hc as updateBlockOperation,bc as updateBlockTool,bm as useCommentStore,ym as useComments,xm as useDebounce,Dm as useDomColormode,Tm as useEmbedHandlers,Em as useLayoutEffectImpl,ur as useLexical,Cm as useLexicalConfig,yc as useLexicalStore,xc as useLexicalToolBundle,vm as useModal,wm as useOptionalLexicalConfig,Sm as useOrchestrationRenderers,Lm as usePeopleSearch,_m as useSettings,Bm as useTheme,km as useToolbarState,Am as validateUrl,Nm as videoBlockStatus,$m as videoFileName,Rm as videoRecordingOf,Im as withBoundText};
|
|
557
|
+
${F.stack}`)})},[a]);m.useEffect(()=>{if(!(!A&&i._nodeMap.size>1e3&&(k(!0),!A))&&(b.current!==i||N.current!==c)){const w=b.current!==i;b.current=i,N.current=c,B(S),!L&&w&&y(H=>[...H,[Date.now(),i]])}},[i,B,S,A,L,c]);const O=f.length;return m.useEffect(()=>{if(T){let w;const H=()=>{const F=$.current;if(F===O-1)return void v(!1);const ue=f[F][0],P=f[F+1][0];w=setTimeout(()=>{$.current++;const D=$.current,q=p.current;q!==null&&(q.value=String(D)),l(f[D][1]),H()},P-ue)};return H(),()=>{clearTimeout(w)}}},[f,T,O,l]),h.jsxs("div",{className:o,children:[!A&&x?h.jsxs("div",{style:{padding:20},children:[h.jsx("span",{style:{marginRight:20},children:"Detected large EditorState, this can impact debugging performance."}),h.jsx("button",{onClick:()=>{I(!0)},style:{background:"transparent",border:"1px solid white",color:"white",cursor:"pointer",padding:5},children:"Show full tree"})]}):null,A?null:h.jsx("button",{onClick:()=>(B(!S),void R(!S)),className:e,type:"button",children:S?"Tree":"Export DOM"}),!L&&(A||!x)&&O>2&&h.jsx("button",{onClick:()=>{d(!0),$.current=O-1,g(!0)},className:t,type:"button",children:"Time Travel"}),(A||!x)&&h.jsx("pre",{ref:u,children:E}),L&&(A||!x)&&h.jsxs("div",{className:r,children:[h.jsx("button",{className:s,onClick:()=>{$.current===O-1&&($.current=1),v(!T)},type:"button",children:T?"Pause":"Play"}),h.jsx("input",{className:n,ref:p,onChange:w=>{const H=Number(w.target.value),F=f[H];F&&($.current=H,l(F[1]))},type:"range",min:"1",max:O-1}),h.jsx("button",{className:s,onClick:()=>{d(!1);const w=f.length-1,H=f[w];l(H[1]);const F=p.current;F!==null&&(F.value=String(w)),g(!1),v(!1)},type:"button",children:"Exit"})]})]})});function La(e,t){const n=[];let s=0;for(const o of e._commands.keys())n.push(e.registerCommand(o,r=>{s+=1;const i={index:s,payload:r,type:o.type?o.type:"UNKNOWN"};return t(l=>[...l.slice(-9),i]),!1},mn));return()=>n.forEach(o=>o())}function _a(e){const[t,n]=m.useState([]);return m.useEffect(()=>La(e,n),[e]),t}function ka({treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:n,timeTravelPanelButtonClassName:s,timeTravelPanelClassName:o,viewClassName:r,editor:i,customPrintNode:l}){const d=m.createRef(),[a,c]=m.useState(i.getEditorState()),u=_a(i);return m.useEffect(()=>ve(i.registerUpdateListener(({editorState:f})=>{c(f)}),i.registerEditableListener(()=>{c(i.getEditorState())})),[i]),m.useEffect(()=>{const f=d.current;if(f!==null)return f.__lexicalEditor=i,()=>{f.__lexicalEditor=null}},[i,d]),h.jsx(Sa,{treeTypeButtonClassName:e,timeTravelButtonClassName:t,timeTravelPanelSliderClassName:n,timeTravelPanelButtonClassName:s,viewClassName:r,timeTravelPanelClassName:o,setEditorReadOnly:f=>{const y=i.getRootElement();y!=null&&(y.contentEditable=f?"false":"true")},editorState:a,setEditorState:f=>i.setEditorState(f),generateContent:async function(f){return xa(i,u,f,l)},ref:d,commandsLog:u})}function Aa(){const[e]=M();return h.jsx(ka,{viewClassName:"tree-view-output",treeTypeButtonClassName:"debug-treetype-button",timeTravelPanelClassName:"debug-timetravel-panel",timeTravelButtonClassName:"debug-timetravel-button",timeTravelPanelSliderClassName:"debug-timetravel-panel-slider",timeTravelPanelButtonClassName:"debug-timetravel-panel-button",editor:e})}const Dl=({publicAppId:e})=>{const[t]=M();return m.useEffect(()=>Ds(t),[t]),m.useEffect(()=>Bs(t,e),[t,e]),null},Bl=()=>{const[e]=M();return m.useEffect(()=>js(e),[e]),null},jl=()=>{const[e]=M();return m.useEffect(()=>Us(e),[e]),null};function Ul(e){const[t]=M();return m.useEffect(()=>an(t,e),[t,e]),null}function Fl(e){const[t]=M();return m.useEffect(()=>rn(t,e),[t,e]),null}function zl(e){const[t]=M();return m.useEffect(()=>ln(t,e),[t,e]),null}function Hl(e){const[t]=M();return m.useEffect(()=>cn(t,e),[t,e]),null}function ql(){const[e]=M();return m.useEffect(()=>{const t=[an(e),rn(e),ln(e),cn(e)];return()=>t.forEach(n=>n())},[e]),null}const Na="Jupyter Lexical Example",Pn="Code and analyse data.";function $a(e,t=[]){return Zo({name:"@datalayer/jupyter-lexical/Editor",namespace:Na,theme:so,dependencies:[no,Ko,...t],$initialEditorState:e})}const Ra=({runtimeEnabled:e,onSessionConnection:t})=>{const{defaultKernel:n}=er({startDefaultKernel:e}),s=$t(oo),o=$t(ro);return h.jsxs(h.Fragment,{children:[e&&h.jsx(s,{kernel:n,onSessionConnection:t}),h.jsx(o,{kernel:n})]})};function Ia(){return h.jsx("div",{className:"editor-placeholder",children:Pn})}const Pa=()=>{const{setEditor:e}=ur(),[t]=M();return m.useEffect(()=>{e(t)},[t,e]),null};function Oa(e){const{id:t,notebook:n,onSessionConnection:s,collaboration:o,runtimeEnabled:r=!0}=e,[i]=M(),[l,d]=m.useState(i),[a,c]=m.useState(!1),[u,f]=m.useState(null),y=o?.id,[E,C]=m.useState(),L=y===void 0||E===y,g=o?.onInitialization,S=m.useCallback($=>{C($?y:void 0),g?.($)},[y,g]),R=$=>{$!==null&&f($)};return h.jsxs("div",{className:"editor-container",children:[h.jsx(qs,{editor:i,activeEditor:l,setActiveEditor:d,setIsLinkEditMode:c}),h.jsxs("div",{className:"editor-inner",children:[o&&h.jsx(Ws,{id:o.id,shouldBootstrap:!0,showCollaborators:!0,username:o.username,cursorColor:o.cursorColor,initialEditorState:o.initialEditorState,awarenessData:o.awarenessData,providerFactory:o.providerFactory??Xs,websocketUrl:o.websocketUrl,onIdentityResolved:o.onIdentityResolved,onInitialization:S}),L?h.jsx("div",{className:"editor-scroller",children:h.jsx("div",{className:"editor",ref:R,children:h.jsx(Go,{className:"editor-input",placeholder:h.jsx(Ia,{}),"aria-placeholder":Pn})})}):h.jsx(Js,{maxWidth:"100%"}),h.jsx(Aa,{}),t&&h.jsx(Vs,{}),h.jsx(Ys,{}),h.jsx(Gs,{}),h.jsx(Zs,{}),h.jsx(Ra,{runtimeEnabled:r,onSessionConnection:s}),h.jsx(oa,{notebook:n}),h.jsx(Ks,{}),h.jsx(Pa,{}),h.jsx(da,{}),h.jsx(Qs,{providerFactory:void 0}),u&&h.jsxs(h.Fragment,{children:[h.jsx(eo,{anchorElem:u}),h.jsx(Ki,{anchorElem:u,isLinkEditMode:a,setIsLinkEditMode:c}),h.jsx(to,{anchorElem:u,setIsLinkEditMode:c})]})]})]})}function Wl(e){const{id:t,serviceManager:n,collaboration:s,initialEditorState:o,extensions:r}=e,i=m.useMemo(()=>$a(s?void 0:o,r),[s,o,r]),l=h.jsx(Yo,{extension:i,contentEditable:null,children:h.jsx(Fs,{children:h.jsx(zs,{children:h.jsx("div",{className:"editor-shell",children:h.jsx(Oa,{...e})})})})});return t?h.jsx(Hs,{lexicalId:t,serviceManager:n,children:l}):l}export{Ec as $blockOf,Cc as $blocksOf,$e as $columnOf,Me as $columnsOf,bl as $convertFromLatexString,gl as $convertToLatexString,rs as $createCollapsibleContainerNode,as as $createCollapsibleContentNode,is as $createCollapsibleTitleNode,vc as $createCommentThreadNode,wc as $createCounterNode,Sc as $createDeckNode,tn as $createEquationNode,Lc as $createExcalidrawNode,_c as $createExecutionTreeNode,Qt as $createImageNode,kc as $createInlineCompletionNode,Ac as $createJupyterCellNode,bs as $createJupyterInputHighlightNode,Zn as $createJupyterInputNode,Nc as $createJupyterOutputNode,Gn as $createLayoutContainerNode,Yn as $createLayoutItemNode,$c as $createLoomNode,Rc as $createVideoNode,ss as $createYouTubeNode,hl as $importLatex,Ic as $inlinesOf,Pc as $inlinesOfNodes,ls as $isCollapsibleContainerNode,Oc as $isCollapsibleContentNode,Mc as $isCollapsibleTitleNode,Dc as $isCommentThreadNode,Bc as $isCounterNode,jc as $isDeckNode,Uc as $isEmptyLayoutItemNode,Ie as $isEquationNode,Fc as $isExcalidrawNode,zc as $isExecutionTreeNode,en as $isImageNode,ys as $isInlineCompletionNode,Hc as $isJupyterCellNode,qc as $isJupyterInputHighlightNode,Be as $isJupyterInputNode,Ve as $isJupyterOutputNode,os as $isLayoutContainerNode,Pe as $isLayoutItemNode,ds as $isLoomNode,Wc as $isVideoNode,nn as $isYouTubeNode,Xc as $jupyterInputNodeFor,Jc as $jupyterOutputNodeFor,Vc as $readDocument,kn as $splitBlocks,Gr as $titleBlock,Ts as AUTO_LINK_MATCHERS,dl as ApiCommentStore,Yc as AutoEmbedDialog,Gc as AutoEmbedExtension,Zc as AutoEmbedPlugin,nr as AutoIndentEngine,El as AutoIndentPlugin,Kc as AutoLinkExtension,Cl as AutoLinkPlugin,Qc as Button,eu as CAN_USE_DOM,mr as CHAPTER_CLASSES,tu as CLEAR_ALL_OUTPUTS_COMMAND,nu as CODE_LANGUAGE_FRIENDLY_NAME_MAP,su as CODE_LANGUAGE_MAP,Ks as CodeActionMenuPlugin,ou as CodeBlockHighlightExtension,_l as CodeBlockHighlightPlugin,Gt as CollapsibleContainerNode,ru as CollapsibleContentNode,iu as CollapsibleExtension,Om as CollapsiblePlugin,au as CollapsibleTitleNode,lu as CommentAuthorAvatar,cu as CommentExtension,uu as CommentPeopleContext,Qs as CommentPlugin,du as CommentStore,pu as CommentThreadNode,Fs as CommentsProvider,ro as ComponentPickerMenuExtension,fu as ComponentPickerMenuPlugin,mu as CounterNode,gu as DEFAULT_CODE_LANGUAGE,hu as DEFAULT_CONFIG,bu as DEFAULT_FONT_SIZE,yu as DEFAULT_INITIAL_OUTPUTS,Ls as DEFAULT_LIST_MAX_INDENT_LEVEL,xu as DEFAULT_TYPST_MODULE_URL,Tu as DEFAULT_TYPST_WASM_URL,Eu as DeckExtension,Cu as DeckNode,jl as DeckPlugin,Vl as DefaultExecutor,Js as DocumentSkeleton,eo as DraggableBlockPlugin,Na as EDITOR_NAMESPACE,vu as EXPORT_PDF_DOCUMENT_COMMAND,wu as EXPORT_PDF_SNAPSHOT_COMMAND,Su as EXPORT_PDF_TYPESET_COMMAND,Wl as Editor,Oa as EditorContainer,Lu as EmbedConfigs,_u as EmbedHandlersContext,Yt as EquationNode,ku as EquationsExtension,Au as EquationsPlugin,Nu as ExcalidrawExtension,$u as ExcalidrawNode,Ru as ExcalidrawPlugin,Iu as ExecutionTreeExtension,Pu as ExecutionTreeNode,Ou as FileInput,Ki as FloatingLinkEditorPlugin,to as FloatingTextFormatToolbarPlugin,Mu as HorizontalRuleExtension,kl as HorizontalRulePlugin,Du as INPUT_UUID_TO_CODE_KEY,Bu as INPUT_UUID_TO_OUTPUT_KEY,ju as INPUT_UUID_TO_OUTPUT_UUID,Uu as INSERT_COLLAPSIBLE_COMMAND,Fu as INSERT_DECK_COMMAND,zu as INSERT_EQUATION_COMMAND,Hu as INSERT_EXCALIDRAW_COMMAND,qu as INSERT_EXECUTION_TREE_COMMAND,Wu as INSERT_IMAGE_COMMAND,Xu as INSERT_INLINE_COMMAND,Ju as INSERT_JUPYTER_CELL_COMMAND,hs as INSERT_JUPYTER_INPUT_OUTPUT_COMMAND,Vu as INSERT_LAYOUT_COMMAND,Yu as INSERT_LOOM_COMMAND,Gu as INSERT_MARIMO_CELL_COMMAND,Zu as INSERT_TABLE_WITH_DIALOG_COMMAND,Ku as INSERT_VIDEO_COMMAND,Qu as INSERT_YOUTUBE_COMMAND,Vt as ImageNode,ed as ImageResizer,td as ImagesExtension,nd as ImagesPlugin,sd as InlineCompletionExtension,od as InlineCompletionNode,rd as InsertEquationDialog,id as InsertImageDialog,ad as InsertImageUploadedDialogBody,ld as InsertImageUriDialogBody,cd as JupyterCellExtension,ud as JupyterCellNode,Al as JupyterCellPlugin,dd as JupyterInputHighlightNode,jn as JupyterInputNode,oo as JupyterInputOutputExtension,pd as JupyterInputOutputPlugin,no as JupyterLexicalExtension,Un as JupyterOutputNode,fd as KatexEquationAlterer,ci as LATEX_ALGORITHM,ni as LATEX_BIBLIOGRAPHY,ri as LATEX_BLOCK,jr as LATEX_BOLD,Lr as LATEX_CODE,Br as LATEX_CODE_FORMAT,Dr as LATEX_COLLAPSIBLE,Qr as LATEX_COLUMNS,li as LATEX_CV,Or as LATEX_DISPLAY_EQUATION,ui as LATEX_ELEMENT_TRANSFORMERS,Pr as LATEX_FIGURE,Ir as LATEX_FLOAT,si as LATEX_FRAME,oi as LATEX_FRAME_TITLE,Cr as LATEX_HEADING,Wr as LATEX_HIGHLIGHT,Ar as LATEX_HORIZONTAL_RULE,Jr as LATEX_IMAGE,Xr as LATEX_INLINE_EQUATION,Ur as LATEX_ITALIC,_r as LATEX_JUPYTER_INPUT,kr as LATEX_JUPYTER_OUTPUT,ii as LATEX_LETTER,ai as LATEX_LETTER_LINES,Vr as LATEX_LINK,Sr as LATEX_LIST,Zr as LATEX_META,fi as LATEX_PREAMBLE_PACKAGES,vr as LATEX_QUOTE,zr as LATEX_STRIKETHROUGH,qr as LATEX_SUBSCRIPT,Hr as LATEX_SUPERSCRIPT,Rr as LATEX_TABLE,Ii as LATEX_TEMPLATES,yl as LATEX_TEMPLATE_CATEGORIES,di as LATEX_TEXT_FORMAT_TRANSFORMERS,pi as LATEX_TEXT_MATCH_TRANSFORMERS,ti as LATEX_THEOREM,Kr as LATEX_TITLE,ge as LATEX_TRANSFORMERS,Fr as LATEX_UNDERLINE,Mr as LATEX_YOUTUBE,md as LOOM_EXTENSION_NAME,Pt as LSPCompletionItemKind,Rl as LSPDocumentSyncPlugin,gd as LSPTabCompletionPlugin,hd as LSP_COMPLETION_INSERTED_COMMAND,bd as LSP_MENU_STATE_COMMAND,rr as LanguageIndentRegistry,Xn as LayoutContainerNode,yd as LayoutExtension,Jn as LayoutItemNode,Nl as LayoutPlugin,xd as LexicalAdapter,Hs as LexicalConfigProvider,Td as LexicalContentEditable,pl as LexicalContextConsumer,dr as LexicalContextProvider,Ed as LexicalInlineCompletionPlugin,$l as LexicalLSPCompletionProvider,ml as LexicalPrimerThemeProvider,fl as LexicalProvider,Cd as LexicalStateExtension,Vs as LexicalStatePlugin,vd as ListMaxIndentLevelExtension,Il as ListMaxIndentLevelPlugin,wd as LoomEmbedConfig,Sd as LoomExtension,Ld as LoomNode,Dl as LoomPlugin,_d as MAX_ALLOWED_FONT_SIZE,kd as MIN_ALLOWED_FONT_SIZE,Pl as MarkdownPlugin,Ad as MarkdownShortcutsExtension,Nd as MentionsPlugin,$d as Modal,Oi as NBFORMAT_METADATA,oa as NbformatContentPlugin,Rd as OUTPUT_UUID_TO_CODE_UUID,Id as OUTPUT_UUID_TO_OUTPUT_KEY,Pd as OrchestrationRenderersContext,Od as PAGE_SIZES,Md as PDF_FONTS,Dd as PEOPLE_SEARCH_PAUSE_MS,Bd as PRINT_CSS,jd as PRINT_PDF_COMMAND,Ud as PdfDocumentExtension,Fl as PdfDocumentPlugin,Fd as PdfExportExtension,ql as PdfExportPlugin,zd as PdfPage,Hd as PdfPrintExtension,Ul as PdfPrintPlugin,qd as PdfSnapshotExtension,zl as PdfSnapshotPlugin,Wd as PdfTypesetExtension,Hl as PdfTypesetPlugin,Xd as PdfWriter,Jd as Placeholder,Vd as Point,Yd as PrettierButton,Gd as RESTART_JUPYTER_KERNEL_COMMAND,Zd as RUN_ALL_JUPYTER_CELLS_COMMAND,Kd as RUN_JUPYTER_CELL_COMMAND,Qd as Rect,ep as SettingsContext,tp as TRIGGER_INLINE_COMPLETION_COMMAND,np as TYPST_TS_VERSION,Gs as TableActionMenuPlugin,Ys as TableCellResizerPlugin,sp as TableExtension,Ol as TableHoverActionsPlugin,Zs as TableHoverActionsV2Plugin,op as TableInsertDialogPlugin,da as TableOfContentsPlugin,rp as TablePlugin,Ml as TableScrollShadowPlugin,ip as TextInput,tr as ThemeContext,ap as ThreadAssignee,zs as ToolbarContext,qs as ToolbarPlugin,Aa as TreeViewPlugin,lp as VideoExtension,cp as VideoNode,Bl as VideoPlugin,up as YouTubeExtension,Wn as YouTubeNode,Um as YouTubePlugin,dp as YoutubeEmbedConfig,Bn as anonymousAuthor,Dn as authorLabel,pp as authorOf,fp as blockTypeToBlockName,mp as buildPrintHtml,gp as bytesToObjectUrl,hp as canBePrettier,bp as canRaster,yp as canRecordVideo,xp as canvasElementToRaster,Tp as canvasToJpeg,Ep as canvasToPng,ji as cellSource,Cp as charWidth,vp as cloneEditorDom,wp as collectPictures,Sp as columnWeights,Yr as columnsTemplate,so as commentTheme,Lp as countPdfPages,_p as createComment,$a as createEditorExtension,yi as createLatexExport,$i as createLatexImport,Nn as createLatexImporter,kp as createThread,Ap as dataUrlToBytes,Yl as deleteBlocksOperation,Gl as deleteBlocksTool,Np as describeLoomVideo,$p as describeScene,Rp as discardVideoRecording,Ip as documentToPdf,Pp as downloadBytes,Op as elementSkeletonSchema,Mp as elementToRaster,Li as emptyDocumentInfo,Dp as emptyScene,Bp as encodeWinAnsi,jp as equalColumnsTemplate,Up as equationToRaster,K as escapeLatex,Fp as escapeTypst,zp as excalidrawAddElementsParamsSchema,Hp as excalidrawClearSceneParamsSchema,qp as excalidrawConnectElementsParamsSchema,Wp as excalidrawDeleteElementsParamsSchema,Xp as excalidrawFromMermaidParamsSchema,Jp as excalidrawInsertNodeParamsSchema,Vp as excalidrawListDrawingsParamsSchema,Yp as excalidrawPluginTools,Gp as excalidrawReadSceneParamsSchema,Zp as excalidrawResizeParamsSchema,Kp as excalidrawSetAppStateParamsSchema,Qp as excalidrawToolDefinitions,ef as excalidrawToolHandlers,tf as excalidrawToolMismatches,nf as excalidrawToolOperations,sf as excalidrawUpdateElementsParamsSchema,Zl as executeCodeOperation,Kl as executeCodeTool,ki as expandMacros,of as explainLoomFailure,rf as explainVideoFailure,af as exportLexicalToPdf,lf as exportPdfDocument,cf as exportPdfSnapshot,uf as exportPdfTypeset,xl as findLatexTemplate,df as flattenToInlines,pf as fontFor,ff as getCodeLanguages,vl as getDOMRangeRect,mf as getDefaultCodeLanguage,gf as getEndOfJupyterInputInLine,hf as getFirstJupyterInputHighlightNodeOfLine,bf as getItemsCountFromTemplate,yf as getLanguageFriendlyName,xf as getLastJupyterInputHighlightNodeOfLine,Ql as getLexicalTools,Oe as getSelectedNode,Sl as getSelection,Tf as getStartOfCodeInLine,Cn as hasChapters,Ef as imageToRaster,Cf as inlineSvgOf,vf as inlineText,ec as insertBlockOperation,tc as insertBlockTool,wf as isDisabled,Sf as isHTMLElement,Lf as isPoint,_f as isTypstEngine,kf as isValidContextScope,bn as javascriptIndentConfig,wl as joinClasses,An as latexTransformersByType,nc as lexicalStore,Tl as lexicalToNbformat,Af as lexicalToTypst,sc as lexicalToolDefinitions,oc as lexicalToolOperations,rc as lexicalTools,ic as listAvailableBlocksOperation,ac as listAvailableBlocksTool,Nf as liveElements,$f as loadHtml2Canvas,Rf as loadTypstEngine,fs as loomEmbedUrl,If as loomPublicAppIdOf,Pf as loomRecorder,Of as loomShareUrl,ps as loomVideoId,Mf as mathToSvg,Df as mentionsIn,Bf as mergeConfig,Ui as nbformatToLexical,jf as newDeckSpec,Uf as newVideoRecordingId,Ff as normalizeCodeLang,_i as parseMacros,Ai as parsePreamble,zf as parseScene,Hf as pdfFilename,qf as personLabel,Wf as pickVideoMimeType,Xf as printEditorToPdf,Jf as printPdf,sr as pythonIndentConfig,lc as readAllBlocksOperation,cc as readAllBlocksTool,uc as readBlockOperation,dc as readBlockTool,Vf as readDocument,Es as registerCodeBlockHighlight,Yf as registerCodeHighlighting,Gf as registerCollapsible,Us as registerDeck,Zf as registerEquations,Kf as registerExecutionTree,Cs as registerHorizontalRule,Qf as registerImages,vs as registerJupyterCell,ws as registerLayout,em as registerLexicalState,Ss as registerListMaxIndentLevel,Ds as registerLoom,rn as registerPdfDocument,an as registerPdfPrint,ln as registerPdfSnapshot,cn as registerPdfTypeset,js as registerVideo,tm as registerYouTube,pc as runAllBlocksOperation,fc as runAllBlocksTool,mc as runBlockOperation,gc as runBlockTool,bt as sanitizeUrl,nm as scaleCanvas,sm as serializeScene,Ll as setFloatingElemPosition,Xe as setFloatingElemPositionForLinkEditor,Bs as setLoomPublicAppId,om as shouldAutoTrigger,rm as shouldManualTrigger,im as snapshotEditorToPdf,fr as splitDocument,am as startVideoRecording,lm as stopVideoRecording,cm as subscribeVideoRecordings,um as summarizeElement,dm as supportedTransformers,pm as svgForTypst,fm as svgToRaster,mm as textWidth,cr as threadsOf,Si as todayForLatex,gm as touchElement,or as typescriptIndentConfig,hm as typesetToPdf,hc as updateBlockOperation,bc as updateBlockTool,bm as useCommentStore,ym as useComments,xm as useDebounce,Dm as useDomColormode,Tm as useEmbedHandlers,Em as useLayoutEffectImpl,ur as useLexical,Cm as useLexicalConfig,yc as useLexicalStore,xc as useLexicalToolBundle,vm as useModal,wm as useOptionalLexicalConfig,Sm as useOrchestrationRenderers,Lm as usePeopleSearch,_m as useSettings,Bm as useTheme,km as useToolbarState,Am as validateUrl,Nm as videoBlockStatus,$m as videoFileName,Rm as videoRecordingOf,Im as withBoundText};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ai as m,aj as u,ak as b}from"../datalayer-app-main.js";import{I as f}from"./tokens-BHLmeqjP.js";import{I}from"./index-
|
|
1
|
+
import{ai as m,aj as u,ak as b}from"../datalayer-app-main.js";import{I as f}from"./tokens-BHLmeqjP.js";import{I}from"./index-DMf0f7ny.js";import{C as i}from"./celltoolbartracker-Bx9x9aeh.js";import"./hoverbox-CStlKQWE.js";const d="@jupyterlab/cell-toolbar-extension:plugin",T={id:d,description:"Add the cells toolbar.",autoStart:!0,activate:async(l,e,t,a)=>{function n(o){const s=o===null?!0:o.get("showToolbar").composite;r.enabled=s}const c=e&&t?u(t,e,i.FACTORY_NAME,T.id,a??b):void 0,r=new i(l.commands,c);e!==null&&Promise.all([l.restored,e.load(d)]).then(([,o])=>{n(o),o.changed.connect(n)}),l.docRegistry.addWidgetExtension("Notebook",r)},optional:[f,I,m]};export{T as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{hw as ue,hx as Y,hy as H,hz as pe,hA as me,hB as ee,hC as ge,hD as te,hE as ne,hF as f,hG as B,hH as y,hI as fe,hJ as be,hK as ve,hL as xe,hM as ye,hN as Ce,hO as $e,hP as Te,hQ as we,hR as _e,hS as Ie,hT as V,hU as L,hV as W,hW as ke,hX as z,hY as U,hZ as M,h_ as q,h$ as G,i0 as O,i1 as Fe,i2 as Se,i3 as _,i4 as Ee,i5 as Ne,i6 as x,i7 as J,i8 as Oe,i9 as He,ia as I,ib as Ae,ic as Be,id as je,ie as Ve,ig as oe,ih as k,ii as De,ij as u,ik as Me,il as se,im as ie,io as Re,r as h,ip as K,iq as A,v as ae,ir as le,c2 as Pe,aV as Le,ag as We,ae as ze,c$ as re,ai as Ue,is as qe,ak as Ge,c0 as Je,it as Ke,iu as Ze,iv as Qe,iw as Xe,dE as Z,am as Ye,cv as et,ix as tt}from"../datalayer-app-main.js";import{S as nt,f as ot,c as st,M as it}from"./index-BfMo5nXi.js";import{I as at}from"./tokens-BHLmeqjP.js";import"./Output-C4hBhZ5k.js";import"./index-DMf0f7ny.js";import"./hoverbox-CStlKQWE.js";import"./index-C7os26P7.js";import"./index-DpJpQnPn.js";import"./color-CG7_7V2-.js";import"./isEqual-D0eOPSLC.js";import"./defaultLocale-5voVPcsN.js";import"./index-DbMBnR4l.js";import"./KebabHorizontalIcon-CXDXtkuL.js";import"./PaintbrushIcon-CLU8RilX.js";import"./index-BJhxZF_K.js";import"./RestartIcon-Ca6_HoK0.js";import"./CellSidebarExtension-p2BAkwis.js";import"./NotebookSkeleton-CI7ovjNW.js";import"./Avatar-9MpXENSs.js";import"./renderer-BwlsmtXF.js";import"./SquareIcon-e3ygcjpv.js";import"./SortAscIcon-CVKVWIWQ.js";import"./url-DuKx0yk0.js";/* empty css */import"./index-Dro44tIm.js";/* empty css *//* empty css */import"./index-DsG9xhMj.js";/* empty css */import"./index-CNU-WVhQ.js";import"./index--OLIX362.js";import"./index-DYGslHkf.js";import"./index-BSRVX3UN.js";import"./index-BH2OX5l8.js";import"./index-C3vDfO5_.js";import"./index-Ko8lxXFd.js";import"./index-CB9u17_J.js";import"./index-BUVtc_FV.js";import"./ArrowLeftIcon-Y3PTljcl.js";import"./SkubbleIcon-tlg17jBG.js";import"./usePrimerThemeBridge-CoHussa9.js";import"./index-BgWf1G8H.js";import"./KernelVariables-ompObBEM.js";import"./index-BvgsWH_d.js";import"./SortDescIcon-CS4EzHeS.js";import"./NotebookToolbar-rtMQZWHQ.js";import"./RepoPushIcon-Cm8g9NuL.js";import"./Toolbar-CGQDY041.js";import"./sessions-C9DBCyZI.js";import"./tokens-DTIgYcNS.js";import"./drivecontents-CxwZz_5W.js";import"./kernel-BI-BLP-K.js";const de=n=>typeof n=="function",lt=()=>null;function Q(n){return n===void 0?lt:de(n)?n:()=>n}function X(n,t,e){const o=de(n)?n:()=>n,d=Q(t),p=Q(e);return(r,l)=>o(r,l)?d(r,l):p(r,l)}const rt=(n,t)=>H`
|
|
2
2
|
<template
|
|
3
3
|
role="treeitem"
|
|
4
4
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|