@datalayer/agent-runtimes 1.6.97 → 1.6.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-embed/chunks/{AgentDetails-B5csrqWi.js → AgentDetails-CqMfY8zN.js} +1 -1
- package/dist-embed/chunks/{AgentDetailsDialog-gGnV2mTY.js → AgentDetailsDialog-lxnKA_dF.js} +1 -1
- package/dist-embed/chunks/{CellSidebarExtension-B4QBsTRy.js → CellSidebarExtension-CrdbRLaE.js} +1 -1
- package/dist-embed/chunks/ChatView-B9oVgZ72.js +32 -0
- package/dist-embed/chunks/{CollapsiblePlugin-vjE7wFOu.js → CollapsiblePlugin-CnG1qA1e.js} +1 -1
- package/dist-embed/chunks/{ContextPie-Dqj618Q2.js → ContextPie-DAZz2yzl.js} +1 -1
- package/dist-embed/chunks/{DeckComponent-CSxElvrq.js → DeckComponent-qAMqKLzs.js} +1 -1
- package/dist-embed/chunks/{DeckRenderer-DcyoBlq5.js → DeckRenderer-DQmjQ_vE.js} +2 -2
- package/dist-embed/chunks/{DeckStage-DJJkDWlM.js → DeckStage-LDi6nZOg.js} +2 -2
- package/dist-embed/chunks/{DiagramView-D8385Uvy.js → DiagramView-CpCoC99y.js} +1 -1
- package/dist-embed/chunks/{DocumentView-pHXY2GUy.js → DocumentView-B-lWAJgm.js} +1 -1
- package/dist-embed/chunks/{DrawingStage-CBhXNP2j.js → DrawingStage-DEeTWKLT.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-C12bJ2Zi.js → EphemeralDocument-CZNRDs_b.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-DW9uU70P.js → EphemeralNotebook-BDutT9GQ.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawComponent-BvB8s8DF.js → ExcalidrawComponent-CmJy7bb4.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal-CLGo6lxD.js → ExcalidrawModal-D_DmAro7.js} +1 -1
- package/dist-embed/chunks/{FormulaBar-IFoQ6yN8.js → FormulaBar-f9U7lupQ.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-DhlGUbc0.js → JupyterLexicalExtension-DpGAnn7v.js} +9 -9
- package/dist-embed/chunks/{KernelVariables-COPHuvQe.js → KernelVariables-BIWju6rZ.js} +1 -1
- package/dist-embed/chunks/{LexicalToolRegistry-mRwpy8uR.js → LexicalToolRegistry-BqxU1w4N.js} +1 -1
- package/dist-embed/chunks/{NotebookToolSurfaces-f0K0s6tk.js → NotebookToolSurfaces-CqU9CVCl.js} +1 -1
- package/dist-embed/chunks/{NotebookView-CkgduWGZ.js → NotebookView-CpOBHIut.js} +1 -1
- package/dist-embed/chunks/{Output-BlVb0nsN.js → Output-DLpf2Of9.js} +6 -6
- package/dist-embed/chunks/{SandboxDetailsDialog-BWr3ZHmy.js → SandboxDetailsDialog-yUjpxBdw.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-BYx28f9R.js → SchemaForm-N0hu4z_p.js} +1 -1
- package/dist-embed/chunks/{SheetStage-UDDuD0c-.js → SheetStage-gUVhALxR.js} +1 -1
- package/dist-embed/chunks/{SheetTabs-CRqCh6SH.js → SheetTabs-sx_-jWyq.js} +1 -1
- package/dist-embed/chunks/{SignInIcon-C0lCx6yN.js → SignInIcon-XIbntAUw.js} +1 -1
- package/dist-embed/chunks/{SpreadsheetPreviewView-D3bm2FuW.js → SpreadsheetPreviewView-C9LaI5mp.js} +1 -1
- package/dist-embed/chunks/{SpreadsheetView-C0jqVlH0.js → SpreadsheetView-FfnOGHeU.js} +1 -1
- package/dist-embed/chunks/{WidgetVariableView-CEWGssAP.js → WidgetVariableView-CKcw-pPX.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-CwtVeT4X.js → YouTubePlugin-DUDVTb3B.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-JXHACDBz.js → abnfDiagram-VCTEODGH-B0MQRzNo.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-C-5M28HY.js → abnfDiagram-VCTEODGH-BM2pAacI.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Bwv6WjS-.js → abnfDiagram-VCTEODGH-fcR8gNdJ.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-BM34ImM5.js → ar-SA-G6X2FPQ2-BfVZMCow.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-DpujQos2.js → architectureDiagram-5GKGNRK7-CnP0s6uJ.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-KCUb-Mex.js → architectureDiagram-5GKGNRK7-Cpu0tfD1.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-CAgLqF4a.js → architectureDiagram-5GKGNRK7-GZ5981UE.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-ClbRZkch.js → az-AZ-76LH7QW2-BeD9jzcd.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-C9-xTdL3.js → bg-BG-XCXSNQG7-VUraF-a0.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-BIKcIMyQ.js → blockDiagram-868be97b-BK7odeOZ.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-6rNTajX4.js → blockDiagram-I7D4REHJ-BMQSOcOL.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Dk3ubhN6.js → blockDiagram-I7D4REHJ-CZlh2u1A.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Dg9wRDSP.js → blockDiagram-I7D4REHJ-DiBWN476.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-yHaSEyU7.js → bn-BD-2XOGV67Q-DjghL9Ba.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-DX31j648.js → c4Diagram-3f4bdde3-CMf0cOcM.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-Blhl5Ivg.js → c4Diagram-7LVT6UL2-BYPUXI1P.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DotUFrPy.js → c4Diagram-7LVT6UL2-plU3oizm.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-kO868bTp.js → c4Diagram-7LVT6UL2-qmYneJtb.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-Co3yrY97.js → ca-ES-6MX7JW3Y-J6FuV-ut.js} +1 -1
- package/dist-embed/chunks/{celltoolbartracker-DzouPWbZ.js → celltoolbartracker-0MFBHjtq.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-BC8SN0W_.js → chunk-2Q5K7J3B-B5DIEbuU.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-BB4YNChb.js → chunk-2Q5K7J3B-BfCPaxeK.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-COf2HInf.js → chunk-2Q5K7J3B-Cj3jAIkT.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-C3jze8cb.js → chunk-5VM5RSS4-BZGDG9GF.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-DiJWlaEG.js → chunk-5VM5RSS4-DYeTGvz7.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-cXmhCpsu.js → chunk-5VM5RSS4-g3id5Hpo.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BXMw8fcU.js → chunk-F27PBJKO-DvclqQhV.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-DaAtxZ3_.js → chunk-F27PBJKO-S3msebgW.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-DZJGymAh.js → chunk-F27PBJKO-kACIRR-8.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-CR3C15pD.js → chunk-IMKFNOWR-Ch7v5XHt.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-C4f2Xvwg.js → chunk-IMKFNOWR-DjIARM3y.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-Ct7GddYG.js → chunk-IMKFNOWR-SiS0o9FR.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-9KydF4Cl.js → chunk-JWPE2WC7-BwLKeh91.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-B54sCK-y.js → chunk-JWPE2WC7-CVacxpin.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-D9_2-oUP.js → chunk-JWPE2WC7-M6oulZhu.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-BaMRoQVu.js → chunk-POPQ4Y6H-BCHaCocF.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-BgtIg837.js → chunk-POPQ4Y6H-DacAiEUG.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-Db5GUGhc.js → chunk-POPQ4Y6H-DicNgh7k.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-CeM8qf58.js → chunk-SVP7TREG-3X_ReA6d.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-F4uclbvM.js → chunk-SVP7TREG-COLBrDOd.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-BYkF4CFZ.js → chunk-SVP7TREG-Cit7UeF2.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-D-Wwl7XB.js → chunk-TICWLB2K-C4D-h9t1.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BFf8Le3M.js → chunk-TICWLB2K-DfGZ1S46.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BHq2Ystt.js → chunk-TICWLB2K-TaUeWpZb.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-BHMLcU9A.js → chunk-XXDRQBXY-B6fuzLc9.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-BlVD4u-l.js → chunk-XXDRQBXY-Bo_XDdf-.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-DTCYLV17.js → chunk-XXDRQBXY-Bz5lFaJG.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-B1H5YR5N.js → classDiagram-ZZMXUADV-DDZ5U8jk.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-C69Ng482.js → classDiagram-ZZMXUADV-DpQTfwXC.js} +1 -1
- package/dist-embed/chunks/{classDiagram-ZZMXUADV-fah4qQBw.js → classDiagram-ZZMXUADV-orzU8a0Z.js} +1 -1
- package/dist-embed/chunks/{classDiagram-f62afe4f-BpmDNOf_.js → classDiagram-f62afe4f-CNI3U8Mt.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-DXSVTZaU.js → classDiagram-v2-604399ef-CLQHn0oB.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-B1H5YR5N.js → classDiagram-v2-VYDZK3BY-DDZ5U8jk.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-C69Ng482.js → classDiagram-v2-VYDZK3BY-DpQTfwXC.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-VYDZK3BY-fah4qQBw.js → classDiagram-v2-VYDZK3BY-orzU8a0Z.js} +1 -1
- package/dist-embed/chunks/{code-block-IT6T5CEO-BzV6dOeo.js → code-block-IT6T5CEO-DjmCcA6a.js} +1 -1
- package/dist-embed/chunks/{component-DQ0vRpmL.js → component-B62XEB_I.js} +1 -1
- package/dist-embed/chunks/{core-YLcIWC_X.js → core-CsMGn5rr.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DUgmse9Z.js → cose-bilkent-JH36ORCC-B_IELYPJ.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-CFC6-4OL.js → cose-bilkent-JH36ORCC-CE9lt3OO.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-B13OR0_2.js → cose-bilkent-JH36ORCC-CJiHk5L4.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-Cft4GZJy.js → createText-aed3d8b3-DTAS6DfQ.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-BXDHJOy0.js → cs-CZ-2BRQDIVT-BJRVSuxc.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-Baap8yDb.js → cynefinDiagram-5FMLGOSQ-B2073FgP.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-B7_plLD6.js → cynefinDiagram-5FMLGOSQ-CyHkNAUC.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-kHl-Cu_e.js → cynefinDiagram-5FMLGOSQ-HsJLw9Ow.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-Bv_vMRQS.js → da-DK-5WZEPLOC-DmvpQmCz.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-l25rB3RT.js → dagre-GXQ25YYZ-BkxHUUfX.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-DLkLgXkX.js → dagre-GXQ25YYZ-DzmuuJ_r.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-De_KrzkJ.js → dagre-GXQ25YYZ-R_lzFrVl.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-Bko2COU8.js → de-DE-XR44H4JA-aRPZsjh8.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-uPenisEP.js → diagram-S7CK7UJ4-1KpTTJPB.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-uDpubVD_.js → diagram-S7CK7UJ4-BANHWGqU.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-BiZ-ex3Q.js → diagram-S7CK7UJ4-DsEYZOqE.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-FzXo7K78.js → diagram-UQ7AKVKN-B-SbMZjY.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-BzBp2O2s.js → diagram-UQ7AKVKN-BadWwEqS.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-DbPeWUnW.js → diagram-UQ7AKVKN-E5q5_JWL.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-DLDYySj7.js → diagram-VSXAHHWV-B-ZTas3h.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-CwicQwvc.js → diagram-VSXAHHWV-BsdL7E17.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-BcQHUbuO.js → diagram-VSXAHHWV-D_7x_Ody.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-Ft45yb-L.js → diagram-VX7I27RA-BGyPrgPC.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-BscrabRG.js → diagram-VX7I27RA-CNSwTKHP.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-BSiMudGz.js → diagram-VX7I27RA-C_1S9aIm.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-C5mNapBw.js → diagram-Z3DM3KII-B5t8N8ZT.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-B86lp0dM.js → diagram-Z3DM3KII-C2gtrmQ9.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-Y-lVwha7.js → diagram-Z3DM3KII-yVDxeysg.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DuGxLmkd.js → ebnfDiagram-PWID7BFC-BgfF1EZn.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-COn39ksr.js → ebnfDiagram-PWID7BFC-C7dUKFPT.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-Tzta9jsh.js → ebnfDiagram-PWID7BFC-LCa7gn5F.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-B0fzIYH0.js → edges-b2856ca0-J2ON9YC7.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-CGifhWk7.js → el-GR-BZB4AONW-BBpO4fOL.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-Bs2AlkA7.js → erDiagram-5d81789a-BM5rHLzM.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-gNk7K_1a.js → erDiagram-RLTQ6QDP-BguBlD55.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-dY0zbwz5.js → erDiagram-RLTQ6QDP-C35O3IA_.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-69KYQDkg.js → erDiagram-RLTQ6QDP-CX1vL7D6.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-CG3eLB2T.js → es-ES-U4NZUMDT-CyrQHwAL.js} +1 -1
- package/dist-embed/chunks/{esm-jxjWs5qw.js → esm-BaC41XaP.js} +1 -1
- package/dist-embed/chunks/{esm-DXOCHrTC.js → esm-DNtiNaWu.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-DzPN5Wvi.js → eu-ES-A7QVB2H4-BJG9zHud.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-DFiN2zZy.js → fa-IR-HGAKTJCU-BOnLqEaQ.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-DoWgfc_V.js → fi-FI-Z5N7JZ37-DdQTDw9O.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-CX3GWJVI.js → flowDb-185abca5-CLfj2Qv7.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-CLqeIp_x.js → flowDiagram-1629c991-DjfIfqQ2.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-BHSFqLFz.js → flowDiagram-HODETNUW-CmpkqsRJ.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-CJEJhhfg.js → flowDiagram-HODETNUW-Cuv1YfzK.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-Du69fYws.js → flowDiagram-HODETNUW-DEVM2ZrI.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-CBHgUV1p.js → flowDiagram-v2-1d953310-4wSPcojK.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-DeZ--5a6.js → flowchart-elk-definition-6df44142-Cb0xBerO.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-J88GG3aE.js → fr-FR-RHASNOE6-DQXpQs87.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-C2r1fH39.js → ganttDiagram-3b0b3873-DI6DrFsY.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-7MMvC1fh.js → ganttDiagram-EL5Y4UJY-CSmChevD.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-DKaPd3MM.js → ganttDiagram-EL5Y4UJY-DdKCj2ex.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-C3YxQe7W.js → ganttDiagram-EL5Y4UJY-drl1C7t5.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-Cnig1EpR.js → gitGraphDiagram-WWUBYQGX-Dna0JScG.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-BhAiY2G7.js → gitGraphDiagram-WWUBYQGX-PLhOfVTI.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DL75-74K.js → gitGraphDiagram-WWUBYQGX-gYDVDk5C.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-DpCnh99K.js → gitGraphDiagram-f01e8bc2-BmE4UKm_.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-DCx-cx3z.js → gl-ES-HMX3MZ6V-DzfCce3N.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-DSVCS7oh.js → he-IL-6SHJWFNN-DRlcBbb7.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-dYf4Ui9C.js → hi-IN-IWLTKZ5I-BrerMuM3.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-D62ZhqXS.js → hu-HU-A5ZG7DT2-DFTsPGh6.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-CPbEyEGt.js → id-ID-SAP4L64H-D0pKFdUL.js} +1 -1
- package/dist-embed/chunks/{index-DUo_Q0bE.js → index-46VEGuyz.js} +2 -2
- package/dist-embed/chunks/{index-9bae90f3-BXKxYnBg.js → index-9bae90f3-Cc18qrXw.js} +1 -1
- package/dist-embed/chunks/{index-h3ezbReI.js → index-B5W7CVUY.js} +1 -1
- package/dist-embed/chunks/{index-BeTQYXBa.js → index-BQEWUnIX.js} +1 -1
- package/dist-embed/chunks/{index-C1V3QrNG.js → index-BXY2kJ1z.js} +1 -1
- package/dist-embed/chunks/{index-BDfHQl3F.js → index-BzdaTJ02.js} +4 -4
- package/dist-embed/chunks/{index-BxqT3iXs.js → index-C-4crJTg.js} +4 -4
- package/dist-embed/chunks/{index-BrEfsSSF.js → index-CBWGYoQM.js} +1 -1
- package/dist-embed/chunks/{index-D6Jo2GVI.js → index-CET7bv5d.js} +1 -1
- package/dist-embed/chunks/{index-BAjfjlr1.js → index-h8lXpqtD.js} +1 -1
- package/dist-embed/chunks/index.esm-DwyYEnhk.js +1 -0
- package/dist-embed/chunks/{index.esm-hHiWwus_.js → index.esm-fF--io5D.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-DR9uGGbg.js → infoDiagram-27XIBGKW-BZLQcxTA.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-BWng8B0-.js → infoDiagram-27XIBGKW-DlOi-VkF.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CUOzYTfJ.js → infoDiagram-27XIBGKW-Ir7z7vae.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-HEc-jV3D.js → infoDiagram-a29d40f1-B_50LXsh.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-bN5K7Z_H.js → ishikawaDiagram-5VMMS53U-CUxqPwbA.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-D-4s54qG.js → ishikawaDiagram-5VMMS53U-CmchLGEY.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-A0e9fSuG.js → ishikawaDiagram-5VMMS53U-Erx01g7S.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-B82xwLEQ.js → it-IT-JPQ66NNP-CbZLqWAE.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-CM-98LRm.js → ja-JP-DBVTYXUO-9xZnJjLg.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-Bi4bGCmh.js → journeyDiagram-3NMN7TZE-B6PqY62p.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-BxzwEGdA.js → journeyDiagram-3NMN7TZE-BRe0KiaN.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-8G4uOxBl.js → journeyDiagram-3NMN7TZE-C9s2og1s.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-eqSlSLqg.js → journeyDiagram-95396277-BsoN0fKG.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-Ef811qmk.js → kaa-6HZHGXH3-CO2r0Hb-.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-DXBRnDqR.js → kab-KAB-ZGHBKWFO-0WoWjCrc.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-CmTw15_j.js → kanban-definition-UXKFOSKX-B6PDcRlF.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DMF43A4Q.js → kanban-definition-UXKFOSKX-BO0-y3yZ.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DMkqn8yL.js → kanban-definition-UXKFOSKX-CKIjAYbp.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-DXPHFZv8.js → kk-KZ-P5N5QNE5-DFQE1uuw.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-fcVwn7la.js → km-KH-HSX4SM5Z-D0Bja56Q.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-fPmaSt-R.js → ko-KR-MTYHY66A-C6MeQrMU.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-DLO8mEqc.js → ku-TR-6OUDTVRD-CweepkXr.js} +1 -1
- package/dist-embed/chunks/{layout-BQJeAUxn.js → layout-Bz98EP0E.js} +1 -1
- package/dist-embed/chunks/{layout-DKKRYrOx.js → layout-DPmNjViN.js} +1 -1
- package/dist-embed/chunks/{layout-BiwLrHFv.js → layout-mk0FGxVc.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-CJT40c-i.js → lexicalHooks-Cj3BNPDC.js} +1 -1
- package/dist-embed/chunks/{lib-CCs8IFk9.js → lib-0j0dfH8p.js} +1 -1
- package/dist-embed/chunks/{lib-BWVYnyap.js → lib-B01oDNlH.js} +1 -1
- package/dist-embed/chunks/{lib-DGyQX8HH.js → lib-B62N3zGB.js} +1 -1
- package/dist-embed/chunks/{lib-DjnzrDLN.js → lib-BItrfBU4.js} +1 -1
- package/dist-embed/chunks/{lib-DiaM9sQK.js → lib-BmoHRaAo.js} +1 -1
- package/dist-embed/chunks/{lib-Bt7-2uko.js → lib-BnAfx9wF.js} +1 -1
- package/dist-embed/chunks/{lib-5GRWA8Zf.js → lib-C-8NAvI1.js} +1 -1
- package/dist-embed/chunks/{lib-D-sHfT2H.js → lib-COg_k5cY.js} +1 -1
- package/dist-embed/chunks/{lib-DlJpF03q.js → lib-CY6QUCzq.js} +1 -1
- package/dist-embed/chunks/{lib-Bkasfzit.js → lib-CjicD0Pj.js} +1 -1
- package/dist-embed/chunks/{lib-Ct98HeTv.js → lib-CkKgTevD.js} +1 -1
- package/dist-embed/chunks/{lib-CAO9TgtV.js → lib-D8Ksfd49.js} +1 -1
- package/dist-embed/chunks/{lib-hGDX-thU.js → lib-DCBCbRKN.js} +1 -1
- package/dist-embed/chunks/{lib-C9Xg-F1Z.js → lib-DpZphKNm.js} +1 -1
- package/dist-embed/chunks/{lib-D63-MDjq.js → lib-DzVf9ZJD.js} +1 -1
- package/dist-embed/chunks/{lib-Duu9jvZE.js → lib-Hgl-pfON.js} +1 -1
- package/dist-embed/chunks/{lib-D7hI6faK.js → lib-f60SfhfM.js} +1 -1
- package/dist-embed/chunks/{lib-Bp97CI40.js → lib-ku1U2GxE.js} +1 -1
- package/dist-embed/chunks/{lib-B9ZzlHt8.js → lib-tR3XRdBe.js} +1 -1
- package/dist-embed/chunks/{lib-BBunDtjl.js → lib-w650Gz0V.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-CDj2NwJ7.js → lt-LT-XHIRWOB4-DrPOBOia.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-DM0UmntK.js → lv-LV-5QDEKY6T-BlGiDUA0.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-BFu8E2Ch.js → mermaid.core-1p09QPXM.js} +3 -3
- package/dist-embed/chunks/{mermaid.core-oCOrUXH6.js → mermaid.core-BiF8MSuv.js} +5 -5
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-BBOAmrK9.js → mindmap-definition-YA3MSWOX-CEFrcqEk.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-D5P4dsfO.js → mindmap-definition-YA3MSWOX-DpAy5heR.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-k9DaqQ85.js → mindmap-definition-YA3MSWOX-t1pDKjS3.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-pjtVjzMw.js → mindmap-definition-e4c1d938-DcepOwKv.js} +1 -1
- package/dist-embed/chunks/{model-BlGqAZ_E.js → model-jLDiOPpQ.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-DKu7Lbyh.js → mr-IN-CRQNXWMA-BWEVprKf.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-OpXhxQFy.js → my-MM-5M5IBNSE-BBxutJOz.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-CaW58ARR.js → nb-NO-T6EIAALU-DJnrKa7W.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-D4WjKwio.js → nl-NL-IS3SIHDZ-DQfv4h3e.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-n-7vV9Cs.js → nn-NO-6E72VCQL-DiGj9RA6.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-CB6dwikR.js → oc-FR-POXYY2M6-WJRn50ji.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-Cq4oiAGn.js → pa-IN-N4M65BXN-U7QCzNgm.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-oNVN1IG9.js → pegDiagram-XKGWAZYB-BlYwAwEo.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-BTn5P1TU.js → pegDiagram-XKGWAZYB-CudwiD3O.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Cge-GlZ7.js → pegDiagram-XKGWAZYB-iE6rBtXO.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-DRR-eJCX.js → percentages-BXMCSKIN-DhE6_GLO.js} +5 -5
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-C9syugZr.js → pieDiagram-E7YTZNPT-CIawCiDR.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-LKAJV-f9.js → pieDiagram-E7YTZNPT-Cy6Wueqp.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-LRVEFdTA.js → pieDiagram-E7YTZNPT-DkhDYj7K.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-DjCRmn-L.js → pieDiagram-c941bede-Ds-rlqjJ.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-C1YHW5JY.js → pl-PL-T2D74RX3-D5hzyBxL.js} +1 -1
- package/dist-embed/chunks/{plugin-DdlXgZum.js → plugin-BqLEv-U0.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-CeAhQlI9.js → pt-BR-5N22H2LF-CAs1Vbwd.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-GWUC3hdB.js → pt-PT-UZXXM6DQ-f3BuGnIL.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-8vY1ABOf.js → quadrantDiagram-AXDQQJYC-1ViFLfLW.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-C2i8SYpJ.js → quadrantDiagram-AXDQQJYC-B30POsrM.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DFP2Eoj5.js → quadrantDiagram-AXDQQJYC-CqArYUyr.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-Bgejfr6D.js → quadrantDiagram-cf8b8fe0-QoN4fcns.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-D8iXssMi.js → railroadDiagram-O6MQD6OU-BKrSAEIz.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-Ck2bziJ8.js → railroadDiagram-O6MQD6OU-BelGMNLe.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-B54ysFcl.js → railroadDiagram-O6MQD6OU-nWQg4Zha.js} +1 -1
- package/dist-embed/chunks/{renderer-Dsm4_V5Z.js → renderer-NdtLW87o.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-Don9LmwH.js → requirementDiagram-53bda41b-DRQpj1S7.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BKfTxvAx.js → requirementDiagram-BXWQKSXE-BsKIaNx-.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-BluOoSWL.js → requirementDiagram-BXWQKSXE-C-ZNAzIA.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-DzYOora7.js → requirementDiagram-BXWQKSXE-Dj_84sJE.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW-CfstrBRj.js → ro-RO-JPDTUUEW-Ck6Pl6T-.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-CprdF87i.js → ru-RU-B4JR7IUQ-B5ZFvbSm.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BbWM5efa.js → sankeyDiagram-P5KCCOFB-BwrjNR9f.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-BO6yMQvy.js → sankeyDiagram-P5KCCOFB-CvESkMt0.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CFPCOaBB.js → sankeyDiagram-P5KCCOFB-DNcJ8lTV.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-foGV8N2_.js → sankeyDiagram-c3ef121a-NSdOSIUQ.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-6pLDiDbB.js → sequenceDiagram-82a5b84f-Cxc06-S6.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-C0zWhG8B.js → sequenceDiagram-WJ2MYXX4-CdKf7EXa.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-w41G2RsH.js → sequenceDiagram-WJ2MYXX4-DYkcZR01.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-BGIbaSlI.js → sequenceDiagram-WJ2MYXX4-vrbMF2lh.js} +1 -1
- package/dist-embed/chunks/{sheet-4YYsjTBK.js → sheet-BFp5lgzm.js} +1 -1
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-CBECC-z7.js → si-LK-N5RQ5JYF-turarKuZ.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-C4Um3fMN.js → sizeCapture-INFHLROL-B05-5pAF.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-WE85tnHS.js → sizeCapture-INFHLROL-BTK449Mq.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-DAIM469w.js → sizeCapture-INFHLROL-DBDGASUh.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-DMJnHZkB.js → sk-SK-C5VTKIMK-B61Eejyh.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-7Z4OGoYj.js → sl-SI-NN7IZMDC-Vmd7HFee.js} +1 -1
- package/dist-embed/chunks/{state-DWaoyyF_.js → state-B-9Ja93T.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-S14mEvLi.js → stateDiagram-43e79a5f-BNfT8BMf.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-BC6_D1er.js → stateDiagram-D77RDMKH-B4P4foWm.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-BKswuz-D.js → stateDiagram-D77RDMKH-DGy5pPcJ.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-DaQTz1j_.js → stateDiagram-D77RDMKH-cX1LxuDW.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-3GcjyBy-.js → stateDiagram-v2-2041ed4f-DT_Cb2bL.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-Bm6DUSD7.js → stateDiagram-v2-MP3YSRHH-BSxDwfLM.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-z0Ujpn87.js → stateDiagram-v2-MP3YSRHH-CoF-m0JB.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-MP3YSRHH-DOLQNFRH.js → stateDiagram-v2-MP3YSRHH-GuE-uLPq.js} +1 -1
- package/dist-embed/chunks/{styles-455b33cd-BRr4X9hL.js → styles-455b33cd-Cp1Ujuo8.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-UDBXX5a8.js → styles-f932cba9-CxoS5hwQ.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-CSFZuop9.js → styles-fcc2142b-ByLmqETE.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-B3u5KdN0.js → subset-shared.chunk-BsVAPxIg.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-CT6VKIPU.js → subset-worker.chunk-BS8PIaQX.js} +1 -1
- package/dist-embed/chunks/{substates-CZP38fPi.js → substates-CeUNAPt2.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-FpJ1BpmI.js → sv-SE-XGPEYMSR-C9lMr16n.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-F4sRB6k0.js → svgDrawCommon-148a3cd9-BHhr6lti.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-EibPKc5o.js → swimlanes-42K2YHIH-DKdFBGRm.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-Bm2EMEIj.js → swimlanes-42K2YHIH-DQJZa-xA.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-60OSS3vA.js → swimlanes-42K2YHIH-RHIIyMRW.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-C5g-ZOer.js → swimlanesDiagram-VR7AAH4N-DPhzMK19.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-mQfKwLBP.js → swimlanesDiagram-VR7AAH4N-qQpIxgus.js} +1 -1
- package/dist-embed/chunks/{swimlanesDiagram-VR7AAH4N-Dd4rkKxx.js → swimlanesDiagram-VR7AAH4N-rV-EK234.js} +1 -1
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-CGrfHW-T.js → ta-IN-2NMHFXQM-DDvtKbYb.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-XSyuAjYd.js → th-TH-HPSO5L25-Cuk9i9q1.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-Dw-j__OF.js → timeline-definition-24CTP7MA-B0VfyyC9.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-DrK86SXx.js → timeline-definition-24CTP7MA-BYQXqujM.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-4xcdFEe3.js → timeline-definition-24CTP7MA-CNJYLQV3.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-BbuRGmnt.js → timeline-definition-7545f45a-B6u65RjP.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-Bmilf4wA.js → tr-TR-DEFEU3FU-Dt5AbXXF.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-D7__x2rc.js → uk-UA-QMV73CPH-CqxkvO2g.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-Dyygo0QE.js → vennDiagram-4TSXK5OY-8GPjZ_rY.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-DU_TiJPw.js → vennDiagram-4TSXK5OY-BC0uMGWS.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-aBwLZ5sI.js → vennDiagram-4TSXK5OY-ERcpoENM.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-Cp1NNDFR.js → vi-VN-M7AON7JQ-CZtlZzss.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-BUupZELs.js → wardleyDiagram-VM6X3IG4-Bubuc1xO.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-8uoJ6em9.js → wardleyDiagram-VM6X3IG4-DMJNYu8Y.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DJsJzMBH.js → wardleyDiagram-VM6X3IG4-DdRbpzRB.js} +1 -1
- package/dist-embed/chunks/workbook-BQLbQvZ-.js +1 -0
- package/dist-embed/chunks/{write-DDDJmUTa.js → write-D-y9_9sL.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-CbuvIhMQ.js → xychartDiagram-3f383b91-CEkYRds9.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-D2_kfHro.js → xychartDiagram-S5SC5T6Z-C0WCXM2P.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-AUNwwAUK.js → xychartDiagram-S5SC5T6Z-DKWKSC-B.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-B9ZiyRsR.js → xychartDiagram-S5SC5T6Z-iG96dorC.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-1W7T5K4d.js → zh-CN-LNUGB5OW-6_SDF9o2.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-6wLRdIMH.js → zh-HK-E62DVLB3-em8dd9Nl.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-Bq3E0gIc.js → zh-TW-RAJ6MFWO-BCzbAoXj.js} +1 -1
- package/dist-embed/datalayer-app-main.js +68 -74
- package/lib/apps/plugins/chat/ChatView.js +96 -38
- package/lib/chat/anonymous/AnonymousChat.d.ts +0 -3
- package/lib/chat/anonymous/anonymousMode.d.ts +0 -4
- package/lib/chat/anonymous/anonymousMode.js +0 -4
- package/lib/chat/base/ChatBase.js +2 -58
- package/lib/chat/index.d.ts +1 -1
- package/lib/chat/index.js +1 -1
- package/lib/chat/indicators/index.d.ts +3 -12
- package/lib/chat/indicators/index.js +0 -15
- package/lib/chat/prompt/InputPrompt.d.ts +28 -16
- package/lib/chat/prompt/InputPrompt.js +60 -12
- package/lib/chat/prompt/menus/EquipmentMenus.d.ts +58 -81
- package/lib/chat/prompt/menus/EquipmentMenus.js +190 -127
- package/lib/chat/prompt/menus/ToolsMenu.d.ts +2 -11
- package/lib/chat/prompt/menus/ToolsMenu.js +8 -43
- package/lib/chat/prompt/menus/equipmentRows.d.ts +160 -0
- package/lib/chat/prompt/menus/equipmentRows.js +349 -0
- package/lib/chat/prompt/menus/index.d.ts +2 -1
- package/lib/chat/prompt/menus/index.js +2 -1
- package/lib/hooks/useConversationSwitches.d.ts +29 -0
- package/lib/hooks/useConversationSwitches.js +102 -0
- package/lib/hooks/useMcpToolSwitches.d.ts +13 -0
- package/lib/hooks/useMcpToolSwitches.js +96 -0
- package/lib/portable/index.d.ts +1 -1
- package/lib/portable/sessions.d.ts +47 -0
- package/lib/portable/sessions.js +7 -0
- package/lib/types/chat.d.ts +2 -3
- package/package.json +1 -1
- package/dist-embed/chunks/ChatView-BxxW10wd.js +0 -32
- package/dist-embed/chunks/index.esm-ClpGzk_d.js +0 -1
- package/dist-embed/chunks/workbook-B-AfiHkC.js +0 -1
- package/lib/chat/indicators/DisabledIndicator.d.ts +0 -18
- package/lib/chat/indicators/DisabledIndicator.js +0 -22
- package/lib/chat/indicators/McpStatusIndicator.d.ts +0 -18
- package/lib/chat/indicators/McpStatusIndicator.js +0 -106
- package/lib/chat/indicators/SkillsStatusIndicator.d.ts +0 -13
- package/lib/chat/indicators/SkillsStatusIndicator.js +0 -88
- package/lib/chat/prompt/menus/SkillsMenu.d.ts +0 -10
- package/lib/chat/prompt/menus/SkillsMenu.js +0 -49
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{cG as w,cH as I,cI as g,cJ as B,cK as b,aS as P,aV as v,aU as M}from"../datalayer-app-main.js";import{J as C,c as E}from"./index-
|
|
1
|
+
import{cG as w,cH as I,cI as g,cJ as B,cK as b,aS as P,aV as v,aU as M}from"../datalayer-app-main.js";import{J as C,c as E}from"./index-46VEGuyz.js";import{I as L}from"./tokens-CGj56w43.js";import{I as N}from"./tokens-Dj3mshtL.js";import{b as A}from"./index-h8lXpqtD.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./hoverbox-CStlKQWE.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class T{constructor(t="",e,n,a){this._domainData={},this._translationBundles={},this._connector=a??new w(t,n),this._stringsPrefix=e||"",this._englishBundle=new I({stringsPrefix:this._stringsPrefix}),this._currentLocale=g}get languageCode(){return this._currentLocale}async fetch(t){var e,n,a,o;this._languageData=await this._connector.fetch({language:t});let i;if(this._languageData&&t==="default")try{for(const s of Object.values((e=this._languageData.data)!==null&&e!==void 0?e:{})){i=s[""].language;break}}catch{}this._currentLocale=(t!=="default"?t:i??g).replace("_","-"),this._domainData=(a=(n=this._languageData)===null||n===void 0?void 0:n.data)!==null&&a!==void 0?a:{};const r=(o=this._languageData)===null||o===void 0?void 0:o.message;r&&this._currentLocale!==g&&console.warn(r)}load(t){if(this._domainData){if(this._currentLocale==g)return this._englishBundle;if(t=B(t),!(t in this._translationBundles)){let e=new I({domain:t,locale:this._currentLocale,stringsPrefix:this._stringsPrefix});if(t in this._domainData){const n=this._domainData[t][""],a={...this._domainData[t],"":{...n,pluralForms:n.plural_forms}};e.loadJSON(a,t)}this._translationBundles[t]=e}return this._translationBundles[t]}else return this._englishBundle}}const y="@jupyterlab/translation-extension:plugin",$={id:"@jupyterlab/translation-extension:translator-connector",description:"Provides the application translation connector.",autoStart:!0,requires:[C.IPaths],provides:b,activate:(m,t)=>{const e=t.urls.translations,n=m.serviceManager.serverSettings;return new w(e,n)}},G={id:"@jupyterlab/translation-extension:translator",description:"Provides the application translation object.",autoStart:!0,requires:[C.IPaths,L],optional:[E,b],provides:P,activate:async(m,t,e,n,a)=>{const o=await e.load(y),i=o.get("locale").composite;let r=o.get("stringsPrefix").composite;r=o.get("displayStringsPrefix").composite?r:"";const c=m.serviceManager.serverSettings,l=new T(t.urls.translations,r,c,a??void 0);return await l.fetch(i),document.documentElement.lang=l.languageCode,n&&(n.translator=l),v.translator=l,l}},J={id:y,description:"Adds translation commands and settings.",requires:[L,P,b],optional:[N,A],autoStart:!0,activate:(m,t,e,n,a,o)=>{var i;const r=e.load("jupyterlab"),{commands:s}=m,c=a?(i=a.settingsMenu.items.find(u=>{var p;return u.type==="submenu"&&((p=u.submenu)===null||p===void 0?void 0:p.id)==="jp-mainmenu-settings-language"}))===null||i===void 0?void 0:i.submenu:null,l="jupyterlab-translation:install-languages";s.addCommand(l,{label:r.__("Install more languages…"),caption:r.__("Search for language packs in the Extension Manager"),isEnabled:()=>s.hasCommand("extensionmanager:show-panel")&&s.isVisible("extensionmanager:show-panel"),execute:()=>s.execute("extensionmanager:show-panel",{query:"jupyterlab-language-pack"}),describedBy:{args:{type:"object",properties:{}}}}),o&&o.addItem({category:r.__("Display Languages"),command:l}),n.fetch().then(u=>{const p=e.languageCode.replace("-","_");for(const d in u.data){const x=u.data[d],D=x.displayName,S=x.nativeName,h=p===d,_=h?`${D}`:`${D} - ${S}`,f=`jupyterlab-translation:${d}`;s.addCommand(f,{label:_,caption:r.__("Change interface language to %1",_),isEnabled:()=>!h,isToggled:()=>h,execute:async()=>{if((await M({title:r.__("Change interface language?"),body:r.__("After changing the interface language to %1, you will need to reload JupyterLab to see the changes.",_),buttons:[v.cancelButton(),v.okButton({label:r.__("Change and reload")})]})).button.accept)try{await t.set(y,"locale",d),window.location.reload()}catch(j){console.error(`Failed to update language locale to ${d}`,j)}},describedBy:{args:{type:"object",properties:{}}}}),c&&c.addItem({command:f,args:{}}),o&&o.addItem({category:r.__("Display Languages"),command:f})}}).catch(u=>{console.error(`Available locales errored!
|
|
2
2
|
${u}`)}).finally(()=>{c&&(c.items.length>0&&c.addItem({type:"separator"}),c.addItem({command:l,args:{}}))})}},Gt=[$,G,J];export{Gt as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aT as P,am as I,aO as E,aS as R,cL as A,cM as B,aQ as j,cD as M}from"../datalayer-app-main.js";import{b as N}from"./index-
|
|
1
|
+
import{aT as P,am as I,aO as E,aS as R,cL as A,cM as B,aQ as j,cD as M}from"../datalayer-app-main.js";import{b as N}from"./index-h8lXpqtD.js";import{I as V}from"./tokens-CGj56w43.js";import{I as W}from"./tokens-Bq_eiXUV.js";import{c as k}from"./index-46VEGuyz.js";import"./hoverbox-CStlKQWE.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class D{constructor(n=P){this.translator=n,this._changed=new I(this),this._providerMap=new Map}add(n,c){return this._providerMap.set(n,c),this._changed.emit(),new E(()=>{this._providerMap.delete(n),this._changed.emit()})}getProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return c.createNew(n,this.translator)}hasProvider(n){for(const c of this._providerMap.values())if(c.isApplicable(n))return!0;return!1}get changed(){return this._changed}}const v="jp-mod-searchable",S="jp-mod-search-active",_="--jp-documentsearch-content-header";var o;(function(t){t.search="documentsearch:start",t.searchAndReplace="documentsearch:startWithReplace",t.findNext="documentsearch:highlightNext",t.findPrevious="documentsearch:highlightPrevious",t.end="documentsearch:end",t.toggleSearchInSelection="documentsearch:toggleSearchInSelection"})(o||(o={}));const L={id:"@jupyterlab/documentsearch-extension:labShellWidgetListener",description:"Active search on valid document",requires:[k,W],autoStart:!0,activate:(t,n,c)=>{const h=s=>{s&&(c.hasProvider(s)?s.addClass(v):s.removeClass(v))};c.changed.connect(()=>h(n.activeWidget)),n.activeChanged.connect((s,d)=>{const u=d.oldValue;u&&u.removeClass(v),h(d.newValue)})}};class F{constructor(n){this._commandRegistry=n,this._cache=this._buildCache(),this._commandRegistry.keyBindingChanged.connect(this._rebuildCache,this)}get next(){return this._cache.next}get previous(){return this._cache.previous}get toggleSearchInSelection(){return this._cache.toggleSearchInSelection}_rebuildCache(){this._cache=this._buildCache()}_buildCache(){const n=this._commandRegistry.keyBindings.find(s=>s.command===o.findNext),c=this._commandRegistry.keyBindings.find(s=>s.command===o.findPrevious),h=this._commandRegistry.keyBindings.find(s=>s.command===o.toggleSearchInSelection);return{next:n,previous:c,toggleSearchInSelection:h}}dispose(){this._commandRegistry.keyBindingChanged.disconnect(this._rebuildCache,this)}}const T={id:"@jupyterlab/documentsearch-extension:plugin",description:"Provides the document search registry.",provides:W,requires:[R],optional:[N,V],autoStart:!0,activate:(t,n,c,h)=>{var s;const d=n.load("jupyterlab");let u=500,y="never";const p=new D(n),l=new Map;if(h){const e=h.load(T.id),r=i=>{u=i.get("searchDebounceTime").composite,y=i.get("autoSearchInSelection").composite};Promise.all([e,t.restored]).then(([i])=>{r(i),i.changed.connect(a=>{r(a)})}).catch(i=>{console.error(i.message)})}const b=()=>{const e=t.shell.currentWidget;return e?p.hasProvider(e):!1},x=e=>{if(!e)return;const r=e.id;let i=l.get(r);if(!i){const a=p.getProvider(e);if(!a)return;const m=new A(a,u),C=new F(t.commands),g=new B(m,n,C);l.set(r,g),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)}),g.closed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S))}),g.disposed.connect(()=>{e.isDisposed||(e.activate(),e.removeClass(S)),l.delete(r),[o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(f=>{t.commands.notifyCommandChanged(f)})}),e.disposed.connect(()=>{g.dispose(),m.dispose(),a.dispose(),C.dispose()}),i=g}return i.isAttached||(j.attach(i,e.node),e.addClass(S),e instanceof M&&(e.contentHeader.node.style.setProperty("anchor-name",_),e.node.style.setProperty("anchor-scope",_),i.node.style.top=`anchor(${_} bottom)`),i.model.searchExpression&&i.model.refresh()),i};return t.commands.addCommand(o.search,{label:d.__("Find…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")}}}},execute:async e=>{const r=x(t.shell.currentWidget);if(r){const i=e.searchText;i?r.setSearchText(i):r.setSearchText(r.model.suggestedInitialQuery);const a=r.model.selectionState;let m=!1;switch(y){case"multiple-selected":m=a==="multiple";break;case"any-selected":m=a==="multiple"||a==="single";break}m&&await r.model.setFilter("selection",!0),r.focusSearchInput()}}}),t.commands.addCommand(o.searchAndReplace,{label:d.__("Find and Replace…"),isEnabled:b,describedBy:{args:{type:"object",properties:{searchText:{type:"string",description:d.__("The text to search for")},replaceText:{type:"string",description:d.__("The text to replace with")}}}},execute:e=>{const r=x(t.shell.currentWidget);if(r){const i=e.searchText;i?r.setSearchText(i):r.setSearchText(r.model.suggestedInitialQuery);const a=e.replaceText;a&&r.setReplaceText(a),r.showReplace(),r.focusSearchInput()}}}),t.commands.addCommand(o.findNext,{label:d.__("Find Next"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&await((e=l.get(r.id))===null||e===void 0?void 0:e.model.highlightNext())}}),t.commands.addCommand(o.findPrevious,{label:d.__("Find Previous"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&await((e=l.get(r.id))===null||e===void 0?void 0:e.model.highlightPrevious())}}),t.commands.addCommand(o.end,{label:d.__("End Search"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id),describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;r&&((e=l.get(r.id))===null||e===void 0||e.close())}}),t.commands.addCommand(o.toggleSearchInSelection,{label:d.__("Search in Selection"),isEnabled:()=>!!t.shell.currentWidget&&l.has(t.shell.currentWidget.id)&&"selection"in l.get(t.shell.currentWidget.id).model.filtersDefinition,describedBy:{args:{type:"object",properties:{}}},execute:async()=>{var e;const r=t.shell.currentWidget;if(!r)return;const i=(e=l.get(r.id))===null||e===void 0?void 0:e.model;if(!i)return;const a=i.filters.selection;return i.setFilter("selection",!a)}}),(s=t.shell.currentChanged)===null||s===void 0||s.connect(()=>{Object.values(o).forEach(e=>{t.commands.notifyCommandChanged(e)})}),c&&[o.search,o.searchAndReplace,o.findNext,o.findPrevious,o.end,o.toggleSearchInSelection].forEach(e=>{c.addItem({command:e,category:d.__("Main Area")})}),p}},De=[T,L];export{De as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{am as R,aV as I,aQ as O,g2 as M,r as n,e0 as w,ct as b,g3 as q,eV as F,g4 as H,g5 as J,aP as U,g6 as k,er as x,e8 as W,g7 as z,g8 as $,cB as Q,J as P,aS as V,eI as G,aT as Y,dS as X,dP as Z}from"../datalayer-app-main.js";import{H as tt}from"./htmlselect-FCh4qyXz.js";import{o as et}from"./index-DUo_Q0bE.js";import{a as st}from"./tokens-DQMPCAHQ.js";import{I as ot}from"./tokens-CGj56w43.js";import"./Output-BlVb0nsN.js";import"./index-BAjfjlr1.js";import"./hoverbox-CStlKQWE.js";import"./index-h3ezbReI.js";import"./index-BrEfsSSF.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-B4QBsTRy.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-Dsm4_V5Z.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-COPHuvQe.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class it{constructor(e){this.reset=()=>{this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this._changed.emit()},this.addKeybinding=async(t,o)=>{this._shortcut.keybindings.push({keys:o,isDefault:!1}),this._changed.emit()},this.replaceKeybinding=async(t,o,s)=>{if(s=s.filter(i=>i!==""),!s.length)return this.deleteKeybinding(t,o);const r=this._shortcut.keybindings.findIndex(i=>i.keys===o.keys);r>-1?this._shortcut.keybindings[r]={keys:s,isDefault:!1}:this.addKeybinding(t,s),this._changed.emit()},this.deleteKeybinding=async(t,o)=>{const s=this._shortcut.keybindings.findIndex(r=>r.keys===o.keys);s>-1&&(this._shortcut.keybindings.splice(s,1),this._changed.emit())},this.resetKeybindings=async t=>{this._shortcut={...this._shortcut,keybindings:[]},this._changed.emit()},this.setCustomOptions=async(t,o)=>(this._shortcut={...this._shortcut,selector:o.selector,args:o.args},this._changed.emit(),!0),this.updateCommand=(t,o)=>{this._shortcut={...this._shortcut,command:t,category:o},this._changed.emit()},this._changed=new R(this),this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this.findConflictsFor=e.findConflictsFor,this.showSelectors=e.showSelectors,this.external=e.external}get shortcut(){return this._shortcut}get changed(){return this._changed}}class rt extends I{constructor(e){const{shortcut:t,translator:o,editorFactory:s}=e,r=o.load("jupyterlab"),i=new nt(t,o,s,()=>this._checkValidation(),e.readOnly),a=[];e.readOnly?a.push(I.cancelButton({label:r.__("OK")})):(a.push(I.cancelButton({label:r.__("Cancel")})),a.push(I.okButton({label:r.__("Apply")}))),super({title:e.readOnly?r.__("Shortcut Options"):r.__("Custom Shortcut Options"),body:i,buttons:a})}_evtKeydown(e){if(e.key==="Enter"){const t=this.node.querySelector(".jp-JSONEditor"),o=document.activeElement;if(t instanceof HTMLElement&&o instanceof HTMLElement&&t.contains(o)){e.stopPropagation();return}}super._evtKeydown(e)}}class nt extends O{constructor(e,t,o,s,r){var i,a;super();const c=t.load("jupyterlab");this.addClass("jp-Shortcuts-CustomOptionsDialogBody");const g=document.createElement("div");g.className="jp-Shortcuts-CustomOptionDialog-container";const p=document.createElement("label");p.textContent=c.__("Selector:"),p.className="jp-Dialog-label",this._selectorInput=document.createElement("input"),this._selectorInput.type="text",this._selectorInput.disabled=r??!1,this._selectorInput.value=e.selector,this._selectorInput.className="jp-mod-styled",g.appendChild(p),g.appendChild(this._selectorInput);const f=document.createElement("label");if(f.textContent=c.__("Arguments:"),f.className="jp-Dialog-label",g.appendChild(f),r){const d=document.createElement("pre");d.textContent=JSON.stringify((i=e.args)!==null&&i!==void 0?i:{},void 0,2),g.appendChild(d)}else this._editorWidget=new at((a=e.args)!==null&&a!==void 0?a:{},o,s),g.appendChild(this._editorWidget.node);this.node.appendChild(g)}getValue(){var e,t;const o=(t=(e=this._editorWidget)===null||e===void 0?void 0:e.getJSON())!==null&&t!==void 0?t:"{}";let s;try{s=JSON.parse(o)}catch(r){console.error(`Invalid JSON in arguments: ${r instanceof Error?r.message:String(r)}`),s={}}return{selector:this._selectorInput.value,args:s}}dispose(){var e;(e=this._editorWidget)===null||e===void 0||e.dispose(),super.dispose()}}class at extends O{constructor(e,t,o){super(),this._validateJSON=()=>{try{const a=this._editor.model.sharedModel.getSource();JSON.parse(a),this.node.classList.remove("jp-mod-error")}catch{this.node.classList.add("jp-mod-error")}this._checkValidation()},this.addClass("jp-JSONEditor"),this._checkValidation=o;const s=document.createElement("div");s.className="jp-JSONEditor-host";const r=new M.Model({mimeType:"application/json"}),i=JSON.stringify(e,null,2);r.sharedModel.setSource(i),this._editor=t({host:s,model:r,config:{readOnly:!1}}),this.node.appendChild(s),this._editor.model.sharedModel.changed.connect(this._validateJSON,this)}getJSON(){return this._editor.model.sharedModel.getSource()}dispose(){this._editor.model.sharedModel.changed.disconnect(this._validateJSON,this),this._editor.dispose(),super.dispose()}}const D="jp-Shortcuts-ConflictContainer";class A extends n.Component{constructor(e){super(e),this.handleSubmit=async()=>{this._isReplacingExistingKeybinding?this.state.selected?this.props.toggleInput():await this._updateShortcut():(await this._updateShortcut(),this.props.toggleInput())},this._updateShortcut=async()=>{const t=[...this.state.keys,this.state.currentChain];this.setState({keys:t}),this.props.keybinding?await this.props.replaceKeybinding(this.props.shortcut,this.props.keybinding,t):await this.props.addKeybinding(this.props.shortcut,t)},this._handleOverwrite=async(t,o)=>{const s=o.map(w.normalizeKeystroke);for(const r of t){const i=r.keybindings.filter(a=>b.deepEqual(a.keys,s)||s.some(c=>b.deepEqual(a.keys,[c])))[0];if(!i){console.error(`Conflicting binding could not be found for ${r} using keys ${o}`);continue}await this.props.deleteKeybinding(r,i)}await this._updateShortcut()},this.parseChaining=(t,o,s,r,i)=>{let a=q.keyForKeydownEvent(t.nativeEvent);const c=["Shift","Control","Alt","Meta","Ctrl","Accel"];if(t.key==="Backspace")s="",o="",r=[],i="",this.setState({value:o,userInput:s,keys:r,currentChain:i});else if(t.key!=="CapsLock"){const g=s.substr(s.lastIndexOf(" ")+1,s.length).trim();c.lastIndexOf(g)===-1&&g!=""?(s=s+",",r.push(i),i="",t.ctrlKey&&t.key!="Control"&&(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()),t.metaKey&&t.key!="Meta"&&(s=(s+" Accel").trim(),i=(i+" Accel").trim()),t.altKey&&t.key!="Alt"&&(s=(s+" Alt").trim(),i=(i+" Alt").trim()),t.shiftKey&&t.key!="Shift"&&(s=(s+" Shift").trim(),i=(i+" Shift").trim()),c.lastIndexOf(t.key)===-1?(s=(s+" "+a).trim(),i=(i+" "+a).trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+t.key).trim(),i=(i+" "+t.key).trim())):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+a).trim(),i=(i+" "+a).trim())}return this.setState({keys:r,currentChain:i}),[s,r,i]},this.checkNonFunctional=()=>{const t=["Ctrl","Alt","Accel","Shift"],o=this.state.currentChain.split(" "),s=o[o.length-1];return this.setState({isFunctional:t.indexOf(s)===-1}),t.indexOf(s)!==-1},this.checkShortcutAvailability=(t,o,s)=>{const r=this.props.findConflictsFor([...o,s],this.props.shortcut.selector),i=t===""||r.length===0;return!i&&r.length===1&&r[0].id===this.props.shortcut.id&&this._isReplacingExistingKeybinding?(this.setState({isAvailable:!0}),[]):(this.setState({isAvailable:i}),r)},this.handleInput=t=>{t.preventDefault(),this.setState({selected:!1});const o=this.parseChaining(t,this.state.value,this.state.userInput,this.state.keys,this.state.currentChain),s=o[0],r=o[1],i=o[2],a=this.props.toSymbols(s);let c=this.checkShortcutAvailability(s,r,i);this.setState({value:a,userInput:s,keys:r,currentChain:i},()=>{this.checkNonFunctional(),this._emitConflicts(c)})},this._handleBlur=t=>{var o,s;!((o=this._ref.current)===null||o===void 0)&&o.contains(t.relatedTarget)||!((s=t.relatedTarget)===null||s===void 0)&&s.closest(`.${D}`)||this.props.toggleInput()},this._ref=n.createRef(),this.state={value:this.props.placeholder,userInput:"",isAvailable:!0,isFunctional:this._isReplacingExistingKeybinding,keys:[],currentChain:"",selected:!0}}get _isReplacingExistingKeybinding(){return!!this.props.keybinding}_emitConflicts(e){const t=[...this.state.keys,this.state.currentChain];this.props.displayConflicts({conflictsWith:e,keys:this.state.keys,overwrite:async()=>{this.setState({isAvailable:!0}),await this._handleOverwrite(e,t),this.props.toggleInput()},cancel:()=>{this.props.toggleInput()}})}render(){const e=this.props.translator.load("jupyterlab");let t="jp-Shortcuts-Input";return this.state.isAvailable||(t+=" jp-mod-unavailable-Input"),n.createElement("div",{className:this.props.displayInput?this._isReplacingExistingKeybinding?"jp-Shortcuts-InputBox":"jp-Shortcuts-InputBox jp-Shortcuts-InputBoxNew":"jp-mod-hidden",ref:this._ref,onBlur:this._handleBlur},n.createElement("div",{tabIndex:0,className:t,onKeyDown:this.handleInput,ref:o=>o&&o.focus(),"data-lm-suppress-shortcuts":"true"},n.createElement("p",{className:this.state.selected&&this._isReplacingExistingKeybinding?"jp-Shortcuts-InputText jp-mod-selected-InputText":this.state.value===""?"jp-Shortcuts-InputText jp-mod-waiting-InputText":"jp-Shortcuts-InputText"},this.state.value===""?e.__("press keys"):this.state.value)),n.createElement("button",{className:this.state.isFunctional?this.state.isAvailable?"jp-Shortcuts-Submit":"jp-Shortcuts-Submit jp-mod-conflict-Submit":"jp-Shortcuts-Submit jp-mod-defunc-Submit",disabled:!this.state.isAvailable||!this.state.isFunctional,onClick:this.handleSubmit,tabIndex:0},this.state.isAvailable?n.createElement(F.react,null):n.createElement(H.react,null)))}}var C;(function(l){l.editBinding="shortcuts:edit-keybinding",l.addBinding="shortcuts:add-keybinding",l.deleteBinding="shortcuts:delete-keybinding",l.toggleSelectors="shortcuts:toggle-selectors",l.resetAll="shortcuts:reset-all"})(C||(C={}));var E;(function(l){l[l.Label=0]="Label",l[l.Category=1]="Category",l[l.Split=2]="Split",l[l.Default=3]="Default"})(E||(E={}));class j extends Map{constructor(e){var t,o,s,r;super();const{settings:i,commandRegistry:a,allCommands:c}=e;if(c)for(const g of a.listCommands()){const p={command:g,selector:"body"},f=this._computeTargetId(p),d=p.command.split(":"),m=(t=a.label(p.command,p.args))!==null&&t!==void 0?t:d.length>1?d[1]:void 0,u=d[0],y={...p,id:f,keybindings:[],category:u,label:m,args:{}};this.set(f,y)}else if(i){const g=(o=i.user.shortcuts)!==null&&o!==void 0?o:[],p=new Set(g.map(this._computeKeybindingId.bind(this))),f=(s=i.composite.shortcuts)!==null&&s!==void 0?s:[],d=i.default("shortcuts").map(m=>this._computeTargetId(m));for(const m of f){const u=this._computeTargetId(m),y=this._computeKeybindingId(m),h={keys:w.normalizeKeys(m),isDefault:!p.has(y),...m.preventDefault===void 0?{}:{preventDefault:m.preventDefault}},S=this.get(u);if(S)S.keybindings.push(h);else{const _=m.command.split(":"),K=(r=a.label(m.command,m.args))!==null&&r!==void 0?r:_.length>1?_[1]:void 0,B=_[0];this.set(u,{id:u,selector:m.selector,command:m.command,category:B,label:K,args:m.args,keybindings:[h],userDefined:!d.includes(u)})}}}}findConflictsFor(e,t){const o=new lt({registry:this}),s=e.map(w.normalizeKeystroke);let r=o.findConflicts(s,t);if(r.length!==0)return r;for(const i of s)if(r=o.findConflicts([i],t),r.length!==0)return r;return[]}_computeTargetId(e){var t;return e.command+"_"+e.selector+"_"+JSON.stringify((t=e.args)!==null&&t!==void 0?t:{})}_computeKeybindingId(e){var t;return[e.command,e.selector,JSON.stringify((t=e.args)!==null&&t!==void 0?t:{}),w.normalizeKeys(e).join(" ")].join("_")}}class lt{constructor(e){var t;const o=new Map;for(const s of e.registry.values())for(const r of s.keybindings){const i=this._keybindingHash(r.keys,s.selector),a=(t=o.get(i))!==null&&t!==void 0?t:[];a.push(s),o.set(i,a)}this._keybindingsMap=o}findConflicts(e,t){var o;const s=this._keybindingHash(e,t);return(o=this._keybindingsMap.get(s))!==null&&o!==void 0?o:[]}_keybindingHash(e,t){return e.join(" ")+"_"+t}}(function(l){function e(s){return s.replace(/\s+/g,"").toLowerCase()}function t(s,r){var i;const a=s.category.toLowerCase(),c=((i=s.label)!==null&&i!==void 0?i:"").toLowerCase(),g=`${a} ${c}`;let p=1/0,f=null;const d=/\b\w/g;for(;;){const S=d.exec(g);if(!S)break;const _=J.matchSumOfDeltas(g,r,S.index);if(!_)break;_&&_.score<=p&&(p=_.score,f=_.indices)}if(!f||p===1/0)return null;const m=a.length+1,u=U.lowerBound(f,m,(S,_)=>S-_),y=f.slice(0,u),h=f.slice(u);for(let S=0,_=h.length;S<_;++S)h[S]-=m;return y.length===0?{matchType:E.Label,categoryIndices:null,labelIndices:h,score:p,item:s}:h.length===0?{matchType:E.Category,categoryIndices:y,labelIndices:null,score:p,item:s}:{matchType:E.Split,categoryIndices:y,labelIndices:h,score:p,item:s}}function o(s,r){r=e(r);let i=[];for(const a of s.values()){if(!r){i.push({matchType:E.Default,categoryIndices:null,labelIndices:null,score:0,item:a});continue}let c=t(a,r);c&&i.push(c)}return i}l.matchItems=o})(j||(j={}));const ct={Ctrl:"⌃",Alt:"⌥",Shift:"⇧",Accel:"⌘",Cmd:"⌘"};class L extends n.Component{constructor(e){super(e),this.toggleInputNew=()=>{this.setState({displayNewInput:!this.state.displayNewInput,conflicts:new Map})},this.toSymbols=t=>k.IS_MAC?t.split(" ").map(o=>{var s;return(s=ct[o])!==null&&s!==void 0?s:o}).join(" "):t.split(" ").map(o=>o==="Accel"?"Ctrl":o).join(" "),this._trans=this.props.external.translator.load("jupyterlab"),this.state={displayNewInput:!1,displayReplaceInput:Object.freeze({}),conflicts:new Map}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this)}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(!("shortcutId"in t&&t.shortcutId!==this.props.shortcut.id)){if(t.request==="add-keybinding")return this.toggleInputNew();if(t.request==="edit-keybinding"&&this.toggleInputReplaceMethod(t.keybinding),t.request==="delete-keybinding"){const o=this.props.shortcut,s=o.keybindings[t.keybinding];this.props.deleteKeybinding(o,s).catch(console.error)}}}getCategoryCell(){return n.createElement("div",{className:"jp-Shortcuts-Cell"},this.props.shortcut.category)}getLabelCell(){var e;if(this.props.newShortcutUtils){const t=this._getFilteredCommands();return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(tt,{value:this.props.shortcut.command,options:[{value:"",label:this._trans.__("Select a command")},...t.map(o=>({value:o.command,label:`${o.category}: ${o.label}`}))],onChange:o=>{var s,r,i;const a=t.find(c=>c.command===o.target.value);(s=this.props.newShortcutUtils)===null||s===void 0||s.updateCommand((r=a?.command)!==null&&r!==void 0?r:"",(i=a?.category)!==null&&i!==void 0?i:"")}}))}else return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-label"},(e=this.props.shortcut.label)!==null&&e!==void 0?e:this._trans.__("(Command label missing)")))}getResetShortCutLink(){return n.createElement("a",{className:"jp-Shortcuts-Reset",onClick:()=>this.props.resetKeybindings(this.props.shortcut)},this.props.shortcut.userDefined?this._trans.__("Delete"):this._trans.__("Reset"))}getSourceCell(){var e;const t=this.props.shortcut.keybindings.every(r=>r.isDefault),o=this.props.shortcut.userDefined||!!this.props.newShortcutUtils,s=o?this._trans.__("Custom options"):this._trans.__("Show options");return n.createElement("div",{className:"jp-Shortcuts-Cell"},!this.props.newShortcutUtils&&n.createElement("div",{className:"jp-Shortcuts-SourceCell"},t?this._trans.__("Default"):this._trans.__("Custom")),t?"":this.getResetShortCutLink(),this.props.external.editorFactory&&n.createElement(x,{className:"jp-mod-styled jp-mod-reject jp-Shortcuts-CustomOptions",onClick:async()=>{if(!this.props.external.editorFactory){console.error("Cannot build the custom options form");return}const i=await new rt({shortcut:this.props.shortcut,translator:this.props.external.translator,editorFactory:this.props.external.editorFactory,readOnly:!o}).launch();i.button.accept&&o&&i.value&&await this.props.setCustomOptions(this.props.shortcut,i.value)},title:s,"aria-label":s,appearance:"neutral"},o?n.createElement(W.react,{tag:null}):n.createElement(z.react,{tag:null})),!!this.props.newShortcutUtils&&n.createElement(n.Fragment,null,n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-SaveNew",onClick:(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.saveShortcut,title:this._trans.__("Save shortcut"),"aria-label":this._trans.__("Save shortcut"),appearance:"neutral",disabled:!this.props.shortcut.command||!this.props.shortcut.keybindings.length||this.props.shortcut.keybindings.every(r=>!r.keys||r.keys.length===0)},n.createElement(F.react,{tag:null}))))}getOptionalSelectorCell(){return this.props.showSelectors?n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-selector"},this.props.shortcut.selector)):null}getClassNameForShortCuts(e){const t=["jp-Shortcuts-ShortcutCell"];switch(e.length){case 1:t.push("jp-Shortcuts-SingleCell");break;case 0:t.push("jp-Shortcuts-EmptyCell");break}return t.join(" ")}toggleInputReplaceMethod(e){const t=this.state.displayReplaceInput[e];this.setState({displayReplaceInput:{...this.state.displayReplaceInput,[e]:!t},conflicts:new Map})}getDisplayReplaceInput(e){return this.state.displayReplaceInput[e]}getOrDisplayIfNeeded(e){const t=["jp-Shortcuts-Or"];return(e||this.state.displayNewInput)&&t.push("jp-Shortcuts-Or-Forced"),n.createElement("div",{className:t.join(" ")},this._trans.__("or"))}getShortCutAsInput(e,t){return n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:()=>this.toggleInputReplaceMethod(t),shortcut:this.props.shortcut,keybinding:e,displayConflicts:o=>{const s=new Map(this.state.conflicts);s.set(e,o),this.setState({conflicts:s})},toSymbols:this.toSymbols,displayInput:this.getDisplayReplaceInput(t),placeholder:this.toSymbols(e.keys.join(", ")),translator:this.props.external.translator})}getShortCutForDisplayOnly(e){return e.keys.map((t,o)=>n.createElement("div",{className:"jp-Shortcuts-ShortcutKeysContainer",key:o},n.createElement("div",{className:"jp-Shortcuts-ShortcutKeys"},this.toSymbols(t).split(" ").map((s,r,i)=>n.createElement(n.Fragment,{key:`${o}-${s}-${r}`},n.createElement("span",{className:"jp-ContextualShortcut-Key"},s),r+1<i.length?" + ":null))),o+1<e.keys.length?n.createElement("div",{className:"jp-Shortcuts-Comma"},","):null))}isLocationBeingEdited(e){return this.state.displayReplaceInput[e]}getDivForKey(e,t,o){return n.createElement("div",{className:"jp-Shortcuts-ShortcutContainer",key:this.props.shortcut.id+"_"+e,"data-keybinding":e,"data-shortcut":this.props.shortcut.id,onClick:()=>this.toggleInputReplaceMethod(e)},this.isLocationBeingEdited(e)?this.getShortCutAsInput(t,e):this.getShortCutForDisplayOnly(t),!(e===this._nonEmptyBindings.length-1&&Object.values(this.state.displayReplaceInput).some(Boolean))&&this.getOrDisplayIfNeeded(e<this._nonEmptyBindings.length-1))}getAddLink(){return n.createElement("a",{className:this.state.displayNewInput?"":"jp-Shortcuts-Plus",onClick:()=>{this.toggleInputNew()}},this._trans.__("Add"))}getInputBoxWhenToggled(){return this.state.displayNewInput?n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:this.toggleInputNew,shortcut:this.props.shortcut,displayConflicts:e=>{const t=new Map(this.state.conflicts);t.set(null,e),this.setState({conflicts:t})},toSymbols:this.toSymbols,displayInput:this.state.displayNewInput,placeholder:"",translator:this.props.external.translator}):n.createElement("div",null)}getShortCutsCell(e){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:this.getClassNameForShortCuts(e)},e.map((t,o)=>this.getDivForKey(o,t,e)),e.length>=1&&!this.state.displayNewInput&&!Object.values(this.state.displayReplaceInput).some(Boolean)&&this.getAddLink(),e.length===0&&!this.state.displayNewInput&&this.getAddLink(),this.getInputBoxWhenToggled()))}getConflicts(){const e=[...this.state.conflicts.values()].filter(t=>t.conflictsWith.length!==0);return e.length===0?n.createElement(n.Fragment,null):n.createElement("div",{className:"jp-Shortcuts-Row jp-Shortcuts-RowWithConflict"},n.createElement("div",{className:D},e.map(t=>{const o=t.keys.join(" ")+"_"+t.conflictsWith.map(s=>s.id).join("");return n.createElement("div",{className:"jp-Shortcuts-Conflict",key:o},n.createElement("div",{className:"jp-Shortcuts-ErrorMessage"},this._trans.__("Shortcut already in use by %1. Overwrite it?",t.conflictsWith.map(s=>{var r;return(r=s.label)!==null&&r!==void 0?r:s.command}).join(", "))),n.createElement("div",{className:"jp-Shortcuts-ErrorButton"},n.createElement("button",{className:"jp-Button jp-mod-reject jp-mod-styled",onClick:()=>{this._clearConflict(t),t.cancel()}},this._trans.__("Cancel")),n.createElement("button",{className:"jp-Button jp-mod-warn jp-mod-styled",onClick:()=>{this._clearConflict(t),t.overwrite()}},this._trans.__("Overwrite"))))})))}_clearConflict(e){const t=new Map,o=this._conflictId(e);for(const[s,r]of this.state.conflicts.entries())this._conflictId(r)!==o&&t.set(s,r);this.setState({conflicts:t})}_conflictId(e){return e.keys.join(" ")+"_"+e.conflictsWith.map(t=>t.id).join("")}_getFilteredCommands(){var e,t;const o=new j({commandRegistry:this.props.external.commandRegistry,allCommands:!0}),s=j.matchItems(o,(t=(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.searchQuery)!==null&&t!==void 0?t:"").map(r=>r.item).filter(r=>!r.command.startsWith("__internal:"));return s.sort((r,i)=>{var a,c;const g=r.category,p=i.category,f=g.localeCompare(p);if(f)return f;{const d=(a=r.label)!==null&&a!==void 0?a:"",m=(c=i.label)!==null&&c!==void 0?c:"";return d.localeCompare(m)}}),s}get _nonEmptyBindings(){return this.props.shortcut.keybindings.filter(e=>e.keys.filter(t=>t!="").length!==0)}render(){return n.createElement(n.Fragment,null,n.createElement("div",{className:`jp-Shortcuts-Row${this.props.newShortcutUtils?" jp-Shortcuts-Row-newShortcut":""}`,"data-shortcut":this.props.shortcut.id},this.getCategoryCell(),this.getLabelCell(),this.getShortCutsCell(this._nonEmptyBindings),this.getSourceCell(),this.getOptionalSelectorCell()),this.getConflicts())}}const dt=115;class ht extends n.Component{render(){return n.createElement("div",{className:"jp-Shortcuts-ShortcutListContainer",style:{height:`${this.props.height-dt}px`},id:"shortcutListContainer"},n.createElement("div",{className:"jp-Shortcuts-ShortcutList"},this.props.shortcuts.map(e=>n.createElement(L,{key:e.id,addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,resetKeybindings:this.props.resetKeybindings,findConflictsFor:this.props.findConflictsFor,setCustomOptions:this.props.setCustomOptions,shortcut:e,showSelectors:this.props.showSelectors,external:this.props.external}))))}}class ut extends n.Component{render(){return n.createElement("div",{className:this.props.title.toLowerCase()===this.props.active?"jp-Shortcuts-Header jp-Shortcuts-CurrentHeader":"jp-Shortcuts-Header",onClick:()=>this.props.updateSort(this.props.columnId)},this.props.title,n.createElement($.react,{className:"jp-Shortcuts-SortButton jp-ShortcutTitleItem-sortButton"}))}}function pt(l){const e=l.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-AdvancedOptions"},n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.toggleSelectors()},l.showSelectors?e.__("Hide Selectors"):e.__("Show Selectors")),n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.resetShortcuts()},e.__("Reset All")),n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-AdvancedOptionsButton",onClick:l.toggleAddCommandRow,title:e.__("Tool for adding shortcuts"),"aria-label":e.__("Tool for adding shortcuts")},n.createElement(Q.react,{tag:"span",elementSize:"xlarge",elementPosition:"center"})))}class mt extends n.Component{constructor(e){super(e)}getShortCutTitleItem(e,t){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(ut,{title:e,updateSort:this.props.updateSort,active:this.props.currentSort,columnId:t}))}render(){const e=this.props.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-Top"},n.createElement("div",{className:"jp-Shortcuts-TopNav"},n.createElement(et,{"aria-label":e.__("Search shortcuts"),updateFilter:(t,o)=>this.props.updateSearchQuery(o??""),placeholder:e.__("Search…"),useFuzzyFilter:!1}),n.createElement(pt,{toggleSelectors:this.props.toggleSelectors,showSelectors:this.props.showSelectors,resetShortcuts:this.props.resetShortcuts,toggleAddCommandRow:this.props.toggleAddCommandRow,translator:this.props.translator})),n.createElement("div",{className:"jp-Shortcuts-HeaderRowContainer"},n.createElement("div",{className:"jp-Shortcuts-HeaderRow"},this.getShortCutTitleItem(e.__("Category"),"category"),this.getShortCutTitleItem(e.__("Command"),"command"),n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"title-div"},e.__("Shortcut"))),this.getShortCutTitleItem(e.__("Source"),"source"),this.props.showSelectors&&this.getShortCutTitleItem(e.__("Selectors"),"selector"))))}}class gt extends n.Component{constructor(e){super(e),this.updateSearchQuery=t=>{this.setState({searchQuery:t},()=>{const o=this.state.shortcutRegistry;this.setState({filteredShortcutList:this._searchFilterShortcuts(o)},()=>{this.sortShortcuts()})})},this.resetShortcuts=async()=>{await(await this.props.external.getSettings()).set("shortcuts",[]),await this._refreshShortcutList()},this.resetKeybindings=async t=>{await this._setKeybinding(t,[])},this.replaceKeybinding=async(t,o,s)=>this._setKeybinding(t,s,o),this.deleteKeybinding=async(t,o)=>{await this._setKeybinding(t,[],o)},this.addKeybinding=async(t,o)=>{await this._setKeybinding(t,o)},this.setCustomOptions=async(t,o)=>{var s;const r=await this.props.external.getSettings(),i=(s=r.user.shortcuts)!==null&&s!==void 0?s:[],a=i.filter(c=>{var g,p;return c.command===t.command&&c.selector===t.selector&&b.deepEqual((g=c.args)!==null&&g!==void 0?g:{},(p=t.args)!==null&&p!==void 0?p:{})});return a.length?(a.forEach(c=>{c.selector=o.selector,c.args=o.args}),await r.set("shortcuts",i),await this._refreshShortcutList(),!0):(console.error("Error writing the custom options: target not found"),!1)},this.toggleSelectors=()=>{this.setState({showSelectors:!this.state.showSelectors})},this.toggleAddCommandRow=async()=>{this.setState({showAddCommand:!this.state.showAddCommand})},this.updateSort=t=>{t!==this.state.currentSort&&this.setState({currentSort:t},this.sortShortcuts)},this.saveNewShortcut=async()=>{const t={...this.state.newShortcut,args:void 0};for(let s of t.keybindings)await this.addKeybinding(t,s.keys);await this.setCustomOptions(t,{selector:t.selector,args:this.state.newShortcut.args})&&(this._newShortcutItem.reset(),this.toggleAddCommandRow())},this._newShortcutItem=new it({showSelectors:!1,findConflictsFor:(t,o)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(t,o):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),external:this.props.external}),this.state={shortcutRegistry:null,filteredShortcutList:new Array,shortcutsFetched:!1,searchQuery:"",showSelectors:!1,currentSort:"category",showAddCommand:!1,newShortcut:this._newShortcutItem.shortcut},this._newShortcutItem.changed.connect(()=>{this.setState({newShortcut:{...this._newShortcutItem.shortcut}})})}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this),this._refreshShortcutList()}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(t.request==="toggle-selectors")return this.toggleSelectors();t.request==="reset-all"&&await this.resetShortcuts()}async _refreshShortcutList(){const e=await this.props.external.getSettings(),t=new j({commandRegistry:this.props.external.commandRegistry,settings:e});this.setState({shortcutRegistry:t,filteredShortcutList:this._searchFilterShortcuts(t),shortcutsFetched:!0},()=>{this.sortShortcuts()})}_searchFilterShortcuts(e){return e?j.matchItems(e,this.state.searchQuery).map(o=>o.item):[]}async _setKeybinding(e,t,o){var s,r,i,a,c;t.length===1&&t[0]==""&&(t=[]);const g=t.map(w.normalizeKeystroke),p=await this.props.external.getSettings(),f=(s=p.user.shortcuts)!==null&&s!==void 0?s:[],d=[];let m=!1;for(let u of f)if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((r=u.args)!==null&&r!==void 0?r:{},(i=e.args)!==null&&i!==void 0?i:{})&&o&&b.deepEqual(o.keys,w.normalizeKeys(u))){const y=o.isDefault&&b.deepEqual(o.keys,g);t.length!==0&&!y&&d.push(this._setShortcutKeys(u,t)),m=!0}else{if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((a=u.args)!==null&&a!==void 0?a:{},(c=e.args)!==null&&c!==void 0?c:{})&&!o&&t.length===0)continue;d.push(u)}if(!m){const u=!o||!b.deepEqual(o.keys,g);o&&o.isDefault&&u&&d.push(this._shortcutFromTarget(e,o.keys,{disabled:!0,preventDefault:o.preventDefault})),t.length!==0&&u&&d.push(this._shortcutFromTarget(e,t,{preventDefault:o?.preventDefault}))}await p.set("shortcuts",d),await this._refreshShortcutList()}_setShortcutKeys(e,t){const o=this._platformKeys(e);return{...e,[o]:t}}_shortcutFromTarget(e,t,o={}){const s={command:e.command,selector:e.selector,keys:t};return e.args&&!b.deepEqual(e.args,{})&&(s.args=e.args),o.disabled&&(s.disabled=!0),o.preventDefault!==void 0&&(s.preventDefault=o.preventDefault),s}_platformKeys(e){return k.IS_WIN&&e.winKeys?"winKeys":k.IS_MAC&&e.macKeys?"macKeys":!k.IS_WIN&&!k.IS_MAC&&e.linuxKeys?"linuxKeys":"keys"}sortShortcuts(){const e=this.state.filteredShortcutList;let t=this.state.currentSort;t==="command"&&(t="label");const o=s=>{var r;return t==="source"?s.keybindings.every(i=>i.isDefault)?"default":"other":(r=s[t])!==null&&r!==void 0?r:""};e.sort((s,r)=>{var i,a;const c=o(s),g=o(r),p=c.localeCompare(g);if(p)return p;{const f=(i=s.label)!==null&&i!==void 0?i:"",d=(a=r.label)!==null&&a!==void 0?a:"";return f.localeCompare(d)}}),this.setState({filteredShortcutList:e})}render(){return this.state.shortcutsFetched?n.createElement("div",{className:"jp-Shortcuts-ShortcutUI",id:"jp-shortcutui"},n.createElement(mt,{updateSearchQuery:this.updateSearchQuery,resetShortcuts:this.resetShortcuts,toggleSelectors:this.toggleSelectors,showSelectors:this.state.showSelectors,updateSort:this.updateSort,currentSort:this.state.currentSort,toggleAddCommandRow:this.toggleAddCommandRow,width:this.props.width,translator:this.props.external.translator}),this.state.showAddCommand&&n.createElement(L,{...this._newShortcutItem,shortcut:this.state.newShortcut,newShortcutUtils:{searchQuery:this.state.searchQuery,updateCommand:this._newShortcutItem.updateCommand,saveShortcut:this.saveNewShortcut}}),n.createElement(ht,{shortcuts:this.state.filteredShortcutList,resetKeybindings:this.resetKeybindings,addKeybinding:this.addKeybinding,replaceKeybinding:this.replaceKeybinding,deleteKeybinding:this.deleteKeybinding,setCustomOptions:this.setCustomOptions,showSelectors:this.state.showSelectors,findConflictsFor:(e,t)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(e,t):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),height:this.props.height,external:this.props.external})):null}}const yt=l=>P.createElement(gt,{external:l.external,height:1e3,width:1e3}),T="@jupyterlab/shortcuts-extension:shortcuts";function ft(l,e,t,o,s){return{translator:t,getSettings:()=>l.load(T,!0),commandRegistry:e.commands,actionRequested:o,editorFactory:s}}const v={id:T,description:"Adds the keyboard shortcuts editor.",requires:[ot],optional:[V,st,G],activate:async(l,e,t,o,s)=>{const r=t??Y,i=r.load("jupyterlab"),{commands:a}=l;let c,g,p={};if(o){const d=new R({}),m=h=>h.dataset.shortcut!==void 0;l.commands.addCommand(C.editBinding,{label:i.__("Edit Keybinding"),caption:i.__("Edit existing keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"edit-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.deleteBinding,{label:i.__("Delete Keybinding"),caption:i.__("Delete chosen keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"delete-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.addBinding,{label:i.__("Add Keybinding"),caption:i.__("Add new keybinding for existing shortcut target"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.shortcut;if(!S)return console.log("Missing shortcut id to add keybinding to");d.emit({request:"add-keybinding",shortcutId:S})}}),a.addCommand(C.toggleSelectors,{label:i.__("Toggle Selectors"),caption:i.__("Toggle command selectors"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"toggle-selectors"})}}),a.addCommand(C.resetAll,{label:i.__("Reset All"),caption:i.__("Reset all shortcuts"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"reset-all"})}});const u=s?h=>s.factoryService.newInlineEditor(h):void 0,y={fieldRenderer:h=>yt({external:ft(e,l,r,d,u),...h})};o.addRenderer(`${v.id}.shortcuts`,y)}function f(d){const m=l.commands.listCommands().join(`
|
|
1
|
+
import{am as R,aV as I,aQ as O,g2 as M,r as n,e0 as w,ct as b,g3 as q,eV as F,g4 as H,g5 as J,aP as U,g6 as k,er as x,e8 as W,g7 as z,g8 as $,cB as Q,J as P,aS as V,eI as G,aT as Y,dS as X,dP as Z}from"../datalayer-app-main.js";import{H as tt}from"./htmlselect-FCh4qyXz.js";import{o as et}from"./index-46VEGuyz.js";import{a as st}from"./tokens-DQMPCAHQ.js";import{I as ot}from"./tokens-CGj56w43.js";import"./Output-DLpf2Of9.js";import"./index-h8lXpqtD.js";import"./hoverbox-CStlKQWE.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class it{constructor(e){this.reset=()=>{this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this._changed.emit()},this.addKeybinding=async(t,o)=>{this._shortcut.keybindings.push({keys:o,isDefault:!1}),this._changed.emit()},this.replaceKeybinding=async(t,o,s)=>{if(s=s.filter(i=>i!==""),!s.length)return this.deleteKeybinding(t,o);const r=this._shortcut.keybindings.findIndex(i=>i.keys===o.keys);r>-1?this._shortcut.keybindings[r]={keys:s,isDefault:!1}:this.addKeybinding(t,s),this._changed.emit()},this.deleteKeybinding=async(t,o)=>{const s=this._shortcut.keybindings.findIndex(r=>r.keys===o.keys);s>-1&&(this._shortcut.keybindings.splice(s,1),this._changed.emit())},this.resetKeybindings=async t=>{this._shortcut={...this._shortcut,keybindings:[]},this._changed.emit()},this.setCustomOptions=async(t,o)=>(this._shortcut={...this._shortcut,selector:o.selector,args:o.args},this._changed.emit(),!0),this.updateCommand=(t,o)=>{this._shortcut={...this._shortcut,command:t,category:o},this._changed.emit()},this._changed=new R(this),this._shortcut={id:"new shortcut",command:"",keybindings:[],selector:"body",category:"",args:{}},this.findConflictsFor=e.findConflictsFor,this.showSelectors=e.showSelectors,this.external=e.external}get shortcut(){return this._shortcut}get changed(){return this._changed}}class rt extends I{constructor(e){const{shortcut:t,translator:o,editorFactory:s}=e,r=o.load("jupyterlab"),i=new nt(t,o,s,()=>this._checkValidation(),e.readOnly),a=[];e.readOnly?a.push(I.cancelButton({label:r.__("OK")})):(a.push(I.cancelButton({label:r.__("Cancel")})),a.push(I.okButton({label:r.__("Apply")}))),super({title:e.readOnly?r.__("Shortcut Options"):r.__("Custom Shortcut Options"),body:i,buttons:a})}_evtKeydown(e){if(e.key==="Enter"){const t=this.node.querySelector(".jp-JSONEditor"),o=document.activeElement;if(t instanceof HTMLElement&&o instanceof HTMLElement&&t.contains(o)){e.stopPropagation();return}}super._evtKeydown(e)}}class nt extends O{constructor(e,t,o,s,r){var i,a;super();const c=t.load("jupyterlab");this.addClass("jp-Shortcuts-CustomOptionsDialogBody");const g=document.createElement("div");g.className="jp-Shortcuts-CustomOptionDialog-container";const p=document.createElement("label");p.textContent=c.__("Selector:"),p.className="jp-Dialog-label",this._selectorInput=document.createElement("input"),this._selectorInput.type="text",this._selectorInput.disabled=r??!1,this._selectorInput.value=e.selector,this._selectorInput.className="jp-mod-styled",g.appendChild(p),g.appendChild(this._selectorInput);const f=document.createElement("label");if(f.textContent=c.__("Arguments:"),f.className="jp-Dialog-label",g.appendChild(f),r){const d=document.createElement("pre");d.textContent=JSON.stringify((i=e.args)!==null&&i!==void 0?i:{},void 0,2),g.appendChild(d)}else this._editorWidget=new at((a=e.args)!==null&&a!==void 0?a:{},o,s),g.appendChild(this._editorWidget.node);this.node.appendChild(g)}getValue(){var e,t;const o=(t=(e=this._editorWidget)===null||e===void 0?void 0:e.getJSON())!==null&&t!==void 0?t:"{}";let s;try{s=JSON.parse(o)}catch(r){console.error(`Invalid JSON in arguments: ${r instanceof Error?r.message:String(r)}`),s={}}return{selector:this._selectorInput.value,args:s}}dispose(){var e;(e=this._editorWidget)===null||e===void 0||e.dispose(),super.dispose()}}class at extends O{constructor(e,t,o){super(),this._validateJSON=()=>{try{const a=this._editor.model.sharedModel.getSource();JSON.parse(a),this.node.classList.remove("jp-mod-error")}catch{this.node.classList.add("jp-mod-error")}this._checkValidation()},this.addClass("jp-JSONEditor"),this._checkValidation=o;const s=document.createElement("div");s.className="jp-JSONEditor-host";const r=new M.Model({mimeType:"application/json"}),i=JSON.stringify(e,null,2);r.sharedModel.setSource(i),this._editor=t({host:s,model:r,config:{readOnly:!1}}),this.node.appendChild(s),this._editor.model.sharedModel.changed.connect(this._validateJSON,this)}getJSON(){return this._editor.model.sharedModel.getSource()}dispose(){this._editor.model.sharedModel.changed.disconnect(this._validateJSON,this),this._editor.dispose(),super.dispose()}}const D="jp-Shortcuts-ConflictContainer";class A extends n.Component{constructor(e){super(e),this.handleSubmit=async()=>{this._isReplacingExistingKeybinding?this.state.selected?this.props.toggleInput():await this._updateShortcut():(await this._updateShortcut(),this.props.toggleInput())},this._updateShortcut=async()=>{const t=[...this.state.keys,this.state.currentChain];this.setState({keys:t}),this.props.keybinding?await this.props.replaceKeybinding(this.props.shortcut,this.props.keybinding,t):await this.props.addKeybinding(this.props.shortcut,t)},this._handleOverwrite=async(t,o)=>{const s=o.map(w.normalizeKeystroke);for(const r of t){const i=r.keybindings.filter(a=>b.deepEqual(a.keys,s)||s.some(c=>b.deepEqual(a.keys,[c])))[0];if(!i){console.error(`Conflicting binding could not be found for ${r} using keys ${o}`);continue}await this.props.deleteKeybinding(r,i)}await this._updateShortcut()},this.parseChaining=(t,o,s,r,i)=>{let a=q.keyForKeydownEvent(t.nativeEvent);const c=["Shift","Control","Alt","Meta","Ctrl","Accel"];if(t.key==="Backspace")s="",o="",r=[],i="",this.setState({value:o,userInput:s,keys:r,currentChain:i});else if(t.key!=="CapsLock"){const g=s.substr(s.lastIndexOf(" ")+1,s.length).trim();c.lastIndexOf(g)===-1&&g!=""?(s=s+",",r.push(i),i="",t.ctrlKey&&t.key!="Control"&&(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()),t.metaKey&&t.key!="Meta"&&(s=(s+" Accel").trim(),i=(i+" Accel").trim()),t.altKey&&t.key!="Alt"&&(s=(s+" Alt").trim(),i=(i+" Alt").trim()),t.shiftKey&&t.key!="Shift"&&(s=(s+" Shift").trim(),i=(i+" Shift").trim()),c.lastIndexOf(t.key)===-1?(s=(s+" "+a).trim(),i=(i+" "+a).trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+t.key).trim(),i=(i+" "+t.key).trim())):t.key==="Control"?(s=(s+" Ctrl").trim(),i=(i+" Ctrl").trim()):t.key==="Meta"?(s=(s+" Accel").trim(),i=(i+" Accel").trim()):t.key==="Shift"?(s=(s+" Shift").trim(),i=(i+" Shift").trim()):t.key==="Alt"?(s=(s+" Alt").trim(),i=(i+" Alt").trim()):(s=(s+" "+a).trim(),i=(i+" "+a).trim())}return this.setState({keys:r,currentChain:i}),[s,r,i]},this.checkNonFunctional=()=>{const t=["Ctrl","Alt","Accel","Shift"],o=this.state.currentChain.split(" "),s=o[o.length-1];return this.setState({isFunctional:t.indexOf(s)===-1}),t.indexOf(s)!==-1},this.checkShortcutAvailability=(t,o,s)=>{const r=this.props.findConflictsFor([...o,s],this.props.shortcut.selector),i=t===""||r.length===0;return!i&&r.length===1&&r[0].id===this.props.shortcut.id&&this._isReplacingExistingKeybinding?(this.setState({isAvailable:!0}),[]):(this.setState({isAvailable:i}),r)},this.handleInput=t=>{t.preventDefault(),this.setState({selected:!1});const o=this.parseChaining(t,this.state.value,this.state.userInput,this.state.keys,this.state.currentChain),s=o[0],r=o[1],i=o[2],a=this.props.toSymbols(s);let c=this.checkShortcutAvailability(s,r,i);this.setState({value:a,userInput:s,keys:r,currentChain:i},()=>{this.checkNonFunctional(),this._emitConflicts(c)})},this._handleBlur=t=>{var o,s;!((o=this._ref.current)===null||o===void 0)&&o.contains(t.relatedTarget)||!((s=t.relatedTarget)===null||s===void 0)&&s.closest(`.${D}`)||this.props.toggleInput()},this._ref=n.createRef(),this.state={value:this.props.placeholder,userInput:"",isAvailable:!0,isFunctional:this._isReplacingExistingKeybinding,keys:[],currentChain:"",selected:!0}}get _isReplacingExistingKeybinding(){return!!this.props.keybinding}_emitConflicts(e){const t=[...this.state.keys,this.state.currentChain];this.props.displayConflicts({conflictsWith:e,keys:this.state.keys,overwrite:async()=>{this.setState({isAvailable:!0}),await this._handleOverwrite(e,t),this.props.toggleInput()},cancel:()=>{this.props.toggleInput()}})}render(){const e=this.props.translator.load("jupyterlab");let t="jp-Shortcuts-Input";return this.state.isAvailable||(t+=" jp-mod-unavailable-Input"),n.createElement("div",{className:this.props.displayInput?this._isReplacingExistingKeybinding?"jp-Shortcuts-InputBox":"jp-Shortcuts-InputBox jp-Shortcuts-InputBoxNew":"jp-mod-hidden",ref:this._ref,onBlur:this._handleBlur},n.createElement("div",{tabIndex:0,className:t,onKeyDown:this.handleInput,ref:o=>o&&o.focus(),"data-lm-suppress-shortcuts":"true"},n.createElement("p",{className:this.state.selected&&this._isReplacingExistingKeybinding?"jp-Shortcuts-InputText jp-mod-selected-InputText":this.state.value===""?"jp-Shortcuts-InputText jp-mod-waiting-InputText":"jp-Shortcuts-InputText"},this.state.value===""?e.__("press keys"):this.state.value)),n.createElement("button",{className:this.state.isFunctional?this.state.isAvailable?"jp-Shortcuts-Submit":"jp-Shortcuts-Submit jp-mod-conflict-Submit":"jp-Shortcuts-Submit jp-mod-defunc-Submit",disabled:!this.state.isAvailable||!this.state.isFunctional,onClick:this.handleSubmit,tabIndex:0},this.state.isAvailable?n.createElement(F.react,null):n.createElement(H.react,null)))}}var C;(function(l){l.editBinding="shortcuts:edit-keybinding",l.addBinding="shortcuts:add-keybinding",l.deleteBinding="shortcuts:delete-keybinding",l.toggleSelectors="shortcuts:toggle-selectors",l.resetAll="shortcuts:reset-all"})(C||(C={}));var E;(function(l){l[l.Label=0]="Label",l[l.Category=1]="Category",l[l.Split=2]="Split",l[l.Default=3]="Default"})(E||(E={}));class j extends Map{constructor(e){var t,o,s,r;super();const{settings:i,commandRegistry:a,allCommands:c}=e;if(c)for(const g of a.listCommands()){const p={command:g,selector:"body"},f=this._computeTargetId(p),d=p.command.split(":"),m=(t=a.label(p.command,p.args))!==null&&t!==void 0?t:d.length>1?d[1]:void 0,u=d[0],y={...p,id:f,keybindings:[],category:u,label:m,args:{}};this.set(f,y)}else if(i){const g=(o=i.user.shortcuts)!==null&&o!==void 0?o:[],p=new Set(g.map(this._computeKeybindingId.bind(this))),f=(s=i.composite.shortcuts)!==null&&s!==void 0?s:[],d=i.default("shortcuts").map(m=>this._computeTargetId(m));for(const m of f){const u=this._computeTargetId(m),y=this._computeKeybindingId(m),h={keys:w.normalizeKeys(m),isDefault:!p.has(y),...m.preventDefault===void 0?{}:{preventDefault:m.preventDefault}},S=this.get(u);if(S)S.keybindings.push(h);else{const _=m.command.split(":"),K=(r=a.label(m.command,m.args))!==null&&r!==void 0?r:_.length>1?_[1]:void 0,B=_[0];this.set(u,{id:u,selector:m.selector,command:m.command,category:B,label:K,args:m.args,keybindings:[h],userDefined:!d.includes(u)})}}}}findConflictsFor(e,t){const o=new lt({registry:this}),s=e.map(w.normalizeKeystroke);let r=o.findConflicts(s,t);if(r.length!==0)return r;for(const i of s)if(r=o.findConflicts([i],t),r.length!==0)return r;return[]}_computeTargetId(e){var t;return e.command+"_"+e.selector+"_"+JSON.stringify((t=e.args)!==null&&t!==void 0?t:{})}_computeKeybindingId(e){var t;return[e.command,e.selector,JSON.stringify((t=e.args)!==null&&t!==void 0?t:{}),w.normalizeKeys(e).join(" ")].join("_")}}class lt{constructor(e){var t;const o=new Map;for(const s of e.registry.values())for(const r of s.keybindings){const i=this._keybindingHash(r.keys,s.selector),a=(t=o.get(i))!==null&&t!==void 0?t:[];a.push(s),o.set(i,a)}this._keybindingsMap=o}findConflicts(e,t){var o;const s=this._keybindingHash(e,t);return(o=this._keybindingsMap.get(s))!==null&&o!==void 0?o:[]}_keybindingHash(e,t){return e.join(" ")+"_"+t}}(function(l){function e(s){return s.replace(/\s+/g,"").toLowerCase()}function t(s,r){var i;const a=s.category.toLowerCase(),c=((i=s.label)!==null&&i!==void 0?i:"").toLowerCase(),g=`${a} ${c}`;let p=1/0,f=null;const d=/\b\w/g;for(;;){const S=d.exec(g);if(!S)break;const _=J.matchSumOfDeltas(g,r,S.index);if(!_)break;_&&_.score<=p&&(p=_.score,f=_.indices)}if(!f||p===1/0)return null;const m=a.length+1,u=U.lowerBound(f,m,(S,_)=>S-_),y=f.slice(0,u),h=f.slice(u);for(let S=0,_=h.length;S<_;++S)h[S]-=m;return y.length===0?{matchType:E.Label,categoryIndices:null,labelIndices:h,score:p,item:s}:h.length===0?{matchType:E.Category,categoryIndices:y,labelIndices:null,score:p,item:s}:{matchType:E.Split,categoryIndices:y,labelIndices:h,score:p,item:s}}function o(s,r){r=e(r);let i=[];for(const a of s.values()){if(!r){i.push({matchType:E.Default,categoryIndices:null,labelIndices:null,score:0,item:a});continue}let c=t(a,r);c&&i.push(c)}return i}l.matchItems=o})(j||(j={}));const ct={Ctrl:"⌃",Alt:"⌥",Shift:"⇧",Accel:"⌘",Cmd:"⌘"};class L extends n.Component{constructor(e){super(e),this.toggleInputNew=()=>{this.setState({displayNewInput:!this.state.displayNewInput,conflicts:new Map})},this.toSymbols=t=>k.IS_MAC?t.split(" ").map(o=>{var s;return(s=ct[o])!==null&&s!==void 0?s:o}).join(" "):t.split(" ").map(o=>o==="Accel"?"Ctrl":o).join(" "),this._trans=this.props.external.translator.load("jupyterlab"),this.state={displayNewInput:!1,displayReplaceInput:Object.freeze({}),conflicts:new Map}}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this)}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(!("shortcutId"in t&&t.shortcutId!==this.props.shortcut.id)){if(t.request==="add-keybinding")return this.toggleInputNew();if(t.request==="edit-keybinding"&&this.toggleInputReplaceMethod(t.keybinding),t.request==="delete-keybinding"){const o=this.props.shortcut,s=o.keybindings[t.keybinding];this.props.deleteKeybinding(o,s).catch(console.error)}}}getCategoryCell(){return n.createElement("div",{className:"jp-Shortcuts-Cell"},this.props.shortcut.category)}getLabelCell(){var e;if(this.props.newShortcutUtils){const t=this._getFilteredCommands();return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(tt,{value:this.props.shortcut.command,options:[{value:"",label:this._trans.__("Select a command")},...t.map(o=>({value:o.command,label:`${o.category}: ${o.label}`}))],onChange:o=>{var s,r,i;const a=t.find(c=>c.command===o.target.value);(s=this.props.newShortcutUtils)===null||s===void 0||s.updateCommand((r=a?.command)!==null&&r!==void 0?r:"",(i=a?.category)!==null&&i!==void 0?i:"")}}))}else return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-label"},(e=this.props.shortcut.label)!==null&&e!==void 0?e:this._trans.__("(Command label missing)")))}getResetShortCutLink(){return n.createElement("a",{className:"jp-Shortcuts-Reset",onClick:()=>this.props.resetKeybindings(this.props.shortcut)},this.props.shortcut.userDefined?this._trans.__("Delete"):this._trans.__("Reset"))}getSourceCell(){var e;const t=this.props.shortcut.keybindings.every(r=>r.isDefault),o=this.props.shortcut.userDefined||!!this.props.newShortcutUtils,s=o?this._trans.__("Custom options"):this._trans.__("Show options");return n.createElement("div",{className:"jp-Shortcuts-Cell"},!this.props.newShortcutUtils&&n.createElement("div",{className:"jp-Shortcuts-SourceCell"},t?this._trans.__("Default"):this._trans.__("Custom")),t?"":this.getResetShortCutLink(),this.props.external.editorFactory&&n.createElement(x,{className:"jp-mod-styled jp-mod-reject jp-Shortcuts-CustomOptions",onClick:async()=>{if(!this.props.external.editorFactory){console.error("Cannot build the custom options form");return}const i=await new rt({shortcut:this.props.shortcut,translator:this.props.external.translator,editorFactory:this.props.external.editorFactory,readOnly:!o}).launch();i.button.accept&&o&&i.value&&await this.props.setCustomOptions(this.props.shortcut,i.value)},title:s,"aria-label":s,appearance:"neutral"},o?n.createElement(W.react,{tag:null}):n.createElement(z.react,{tag:null})),!!this.props.newShortcutUtils&&n.createElement(n.Fragment,null,n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-SaveNew",onClick:(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.saveShortcut,title:this._trans.__("Save shortcut"),"aria-label":this._trans.__("Save shortcut"),appearance:"neutral",disabled:!this.props.shortcut.command||!this.props.shortcut.keybindings.length||this.props.shortcut.keybindings.every(r=>!r.keys||r.keys.length===0)},n.createElement(F.react,{tag:null}))))}getOptionalSelectorCell(){return this.props.showSelectors?n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"jp-selector"},this.props.shortcut.selector)):null}getClassNameForShortCuts(e){const t=["jp-Shortcuts-ShortcutCell"];switch(e.length){case 1:t.push("jp-Shortcuts-SingleCell");break;case 0:t.push("jp-Shortcuts-EmptyCell");break}return t.join(" ")}toggleInputReplaceMethod(e){const t=this.state.displayReplaceInput[e];this.setState({displayReplaceInput:{...this.state.displayReplaceInput,[e]:!t},conflicts:new Map})}getDisplayReplaceInput(e){return this.state.displayReplaceInput[e]}getOrDisplayIfNeeded(e){const t=["jp-Shortcuts-Or"];return(e||this.state.displayNewInput)&&t.push("jp-Shortcuts-Or-Forced"),n.createElement("div",{className:t.join(" ")},this._trans.__("or"))}getShortCutAsInput(e,t){return n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:()=>this.toggleInputReplaceMethod(t),shortcut:this.props.shortcut,keybinding:e,displayConflicts:o=>{const s=new Map(this.state.conflicts);s.set(e,o),this.setState({conflicts:s})},toSymbols:this.toSymbols,displayInput:this.getDisplayReplaceInput(t),placeholder:this.toSymbols(e.keys.join(", ")),translator:this.props.external.translator})}getShortCutForDisplayOnly(e){return e.keys.map((t,o)=>n.createElement("div",{className:"jp-Shortcuts-ShortcutKeysContainer",key:o},n.createElement("div",{className:"jp-Shortcuts-ShortcutKeys"},this.toSymbols(t).split(" ").map((s,r,i)=>n.createElement(n.Fragment,{key:`${o}-${s}-${r}`},n.createElement("span",{className:"jp-ContextualShortcut-Key"},s),r+1<i.length?" + ":null))),o+1<e.keys.length?n.createElement("div",{className:"jp-Shortcuts-Comma"},","):null))}isLocationBeingEdited(e){return this.state.displayReplaceInput[e]}getDivForKey(e,t,o){return n.createElement("div",{className:"jp-Shortcuts-ShortcutContainer",key:this.props.shortcut.id+"_"+e,"data-keybinding":e,"data-shortcut":this.props.shortcut.id,onClick:()=>this.toggleInputReplaceMethod(e)},this.isLocationBeingEdited(e)?this.getShortCutAsInput(t,e):this.getShortCutForDisplayOnly(t),!(e===this._nonEmptyBindings.length-1&&Object.values(this.state.displayReplaceInput).some(Boolean))&&this.getOrDisplayIfNeeded(e<this._nonEmptyBindings.length-1))}getAddLink(){return n.createElement("a",{className:this.state.displayNewInput?"":"jp-Shortcuts-Plus",onClick:()=>{this.toggleInputNew()}},this._trans.__("Add"))}getInputBoxWhenToggled(){return this.state.displayNewInput?n.createElement(A,{addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,findConflictsFor:this.props.findConflictsFor,toggleInput:this.toggleInputNew,shortcut:this.props.shortcut,displayConflicts:e=>{const t=new Map(this.state.conflicts);t.set(null,e),this.setState({conflicts:t})},toSymbols:this.toSymbols,displayInput:this.state.displayNewInput,placeholder:"",translator:this.props.external.translator}):n.createElement("div",null)}getShortCutsCell(e){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:this.getClassNameForShortCuts(e)},e.map((t,o)=>this.getDivForKey(o,t,e)),e.length>=1&&!this.state.displayNewInput&&!Object.values(this.state.displayReplaceInput).some(Boolean)&&this.getAddLink(),e.length===0&&!this.state.displayNewInput&&this.getAddLink(),this.getInputBoxWhenToggled()))}getConflicts(){const e=[...this.state.conflicts.values()].filter(t=>t.conflictsWith.length!==0);return e.length===0?n.createElement(n.Fragment,null):n.createElement("div",{className:"jp-Shortcuts-Row jp-Shortcuts-RowWithConflict"},n.createElement("div",{className:D},e.map(t=>{const o=t.keys.join(" ")+"_"+t.conflictsWith.map(s=>s.id).join("");return n.createElement("div",{className:"jp-Shortcuts-Conflict",key:o},n.createElement("div",{className:"jp-Shortcuts-ErrorMessage"},this._trans.__("Shortcut already in use by %1. Overwrite it?",t.conflictsWith.map(s=>{var r;return(r=s.label)!==null&&r!==void 0?r:s.command}).join(", "))),n.createElement("div",{className:"jp-Shortcuts-ErrorButton"},n.createElement("button",{className:"jp-Button jp-mod-reject jp-mod-styled",onClick:()=>{this._clearConflict(t),t.cancel()}},this._trans.__("Cancel")),n.createElement("button",{className:"jp-Button jp-mod-warn jp-mod-styled",onClick:()=>{this._clearConflict(t),t.overwrite()}},this._trans.__("Overwrite"))))})))}_clearConflict(e){const t=new Map,o=this._conflictId(e);for(const[s,r]of this.state.conflicts.entries())this._conflictId(r)!==o&&t.set(s,r);this.setState({conflicts:t})}_conflictId(e){return e.keys.join(" ")+"_"+e.conflictsWith.map(t=>t.id).join("")}_getFilteredCommands(){var e,t;const o=new j({commandRegistry:this.props.external.commandRegistry,allCommands:!0}),s=j.matchItems(o,(t=(e=this.props.newShortcutUtils)===null||e===void 0?void 0:e.searchQuery)!==null&&t!==void 0?t:"").map(r=>r.item).filter(r=>!r.command.startsWith("__internal:"));return s.sort((r,i)=>{var a,c;const g=r.category,p=i.category,f=g.localeCompare(p);if(f)return f;{const d=(a=r.label)!==null&&a!==void 0?a:"",m=(c=i.label)!==null&&c!==void 0?c:"";return d.localeCompare(m)}}),s}get _nonEmptyBindings(){return this.props.shortcut.keybindings.filter(e=>e.keys.filter(t=>t!="").length!==0)}render(){return n.createElement(n.Fragment,null,n.createElement("div",{className:`jp-Shortcuts-Row${this.props.newShortcutUtils?" jp-Shortcuts-Row-newShortcut":""}`,"data-shortcut":this.props.shortcut.id},this.getCategoryCell(),this.getLabelCell(),this.getShortCutsCell(this._nonEmptyBindings),this.getSourceCell(),this.getOptionalSelectorCell()),this.getConflicts())}}const dt=115;class ht extends n.Component{render(){return n.createElement("div",{className:"jp-Shortcuts-ShortcutListContainer",style:{height:`${this.props.height-dt}px`},id:"shortcutListContainer"},n.createElement("div",{className:"jp-Shortcuts-ShortcutList"},this.props.shortcuts.map(e=>n.createElement(L,{key:e.id,addKeybinding:this.props.addKeybinding,replaceKeybinding:this.props.replaceKeybinding,deleteKeybinding:this.props.deleteKeybinding,resetKeybindings:this.props.resetKeybindings,findConflictsFor:this.props.findConflictsFor,setCustomOptions:this.props.setCustomOptions,shortcut:e,showSelectors:this.props.showSelectors,external:this.props.external}))))}}class ut extends n.Component{render(){return n.createElement("div",{className:this.props.title.toLowerCase()===this.props.active?"jp-Shortcuts-Header jp-Shortcuts-CurrentHeader":"jp-Shortcuts-Header",onClick:()=>this.props.updateSort(this.props.columnId)},this.props.title,n.createElement($.react,{className:"jp-Shortcuts-SortButton jp-ShortcutTitleItem-sortButton"}))}}function pt(l){const e=l.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-AdvancedOptions"},n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.toggleSelectors()},l.showSelectors?e.__("Hide Selectors"):e.__("Show Selectors")),n.createElement("a",{className:"jp-Shortcuts-AdvancedOptionsLink",onClick:()=>l.resetShortcuts()},e.__("Reset All")),n.createElement(x,{className:"jp-mod-styled jp-mod-accept jp-Shortcuts-AdvancedOptionsButton",onClick:l.toggleAddCommandRow,title:e.__("Tool for adding shortcuts"),"aria-label":e.__("Tool for adding shortcuts")},n.createElement(Q.react,{tag:"span",elementSize:"xlarge",elementPosition:"center"})))}class mt extends n.Component{constructor(e){super(e)}getShortCutTitleItem(e,t){return n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement(ut,{title:e,updateSort:this.props.updateSort,active:this.props.currentSort,columnId:t}))}render(){const e=this.props.translator.load("jupyterlab");return n.createElement("div",{className:"jp-Shortcuts-Top"},n.createElement("div",{className:"jp-Shortcuts-TopNav"},n.createElement(et,{"aria-label":e.__("Search shortcuts"),updateFilter:(t,o)=>this.props.updateSearchQuery(o??""),placeholder:e.__("Search…"),useFuzzyFilter:!1}),n.createElement(pt,{toggleSelectors:this.props.toggleSelectors,showSelectors:this.props.showSelectors,resetShortcuts:this.props.resetShortcuts,toggleAddCommandRow:this.props.toggleAddCommandRow,translator:this.props.translator})),n.createElement("div",{className:"jp-Shortcuts-HeaderRowContainer"},n.createElement("div",{className:"jp-Shortcuts-HeaderRow"},this.getShortCutTitleItem(e.__("Category"),"category"),this.getShortCutTitleItem(e.__("Command"),"command"),n.createElement("div",{className:"jp-Shortcuts-Cell"},n.createElement("div",{className:"title-div"},e.__("Shortcut"))),this.getShortCutTitleItem(e.__("Source"),"source"),this.props.showSelectors&&this.getShortCutTitleItem(e.__("Selectors"),"selector"))))}}class gt extends n.Component{constructor(e){super(e),this.updateSearchQuery=t=>{this.setState({searchQuery:t},()=>{const o=this.state.shortcutRegistry;this.setState({filteredShortcutList:this._searchFilterShortcuts(o)},()=>{this.sortShortcuts()})})},this.resetShortcuts=async()=>{await(await this.props.external.getSettings()).set("shortcuts",[]),await this._refreshShortcutList()},this.resetKeybindings=async t=>{await this._setKeybinding(t,[])},this.replaceKeybinding=async(t,o,s)=>this._setKeybinding(t,s,o),this.deleteKeybinding=async(t,o)=>{await this._setKeybinding(t,[],o)},this.addKeybinding=async(t,o)=>{await this._setKeybinding(t,o)},this.setCustomOptions=async(t,o)=>{var s;const r=await this.props.external.getSettings(),i=(s=r.user.shortcuts)!==null&&s!==void 0?s:[],a=i.filter(c=>{var g,p;return c.command===t.command&&c.selector===t.selector&&b.deepEqual((g=c.args)!==null&&g!==void 0?g:{},(p=t.args)!==null&&p!==void 0?p:{})});return a.length?(a.forEach(c=>{c.selector=o.selector,c.args=o.args}),await r.set("shortcuts",i),await this._refreshShortcutList(),!0):(console.error("Error writing the custom options: target not found"),!1)},this.toggleSelectors=()=>{this.setState({showSelectors:!this.state.showSelectors})},this.toggleAddCommandRow=async()=>{this.setState({showAddCommand:!this.state.showAddCommand})},this.updateSort=t=>{t!==this.state.currentSort&&this.setState({currentSort:t},this.sortShortcuts)},this.saveNewShortcut=async()=>{const t={...this.state.newShortcut,args:void 0};for(let s of t.keybindings)await this.addKeybinding(t,s.keys);await this.setCustomOptions(t,{selector:t.selector,args:this.state.newShortcut.args})&&(this._newShortcutItem.reset(),this.toggleAddCommandRow())},this._newShortcutItem=new it({showSelectors:!1,findConflictsFor:(t,o)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(t,o):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),external:this.props.external}),this.state={shortcutRegistry:null,filteredShortcutList:new Array,shortcutsFetched:!1,searchQuery:"",showSelectors:!1,currentSort:"category",showAddCommand:!1,newShortcut:this._newShortcutItem.shortcut},this._newShortcutItem.changed.connect(()=>{this.setState({newShortcut:{...this._newShortcutItem.shortcut}})})}componentDidMount(){this.props.external.actionRequested.connect(this._onActionRequested,this),this._refreshShortcutList()}componentWillUnmount(){this.props.external.actionRequested.disconnect(this._onActionRequested,this)}async _onActionRequested(e,t){if(t.request==="toggle-selectors")return this.toggleSelectors();t.request==="reset-all"&&await this.resetShortcuts()}async _refreshShortcutList(){const e=await this.props.external.getSettings(),t=new j({commandRegistry:this.props.external.commandRegistry,settings:e});this.setState({shortcutRegistry:t,filteredShortcutList:this._searchFilterShortcuts(t),shortcutsFetched:!0},()=>{this.sortShortcuts()})}_searchFilterShortcuts(e){return e?j.matchItems(e,this.state.searchQuery).map(o=>o.item):[]}async _setKeybinding(e,t,o){var s,r,i,a,c;t.length===1&&t[0]==""&&(t=[]);const g=t.map(w.normalizeKeystroke),p=await this.props.external.getSettings(),f=(s=p.user.shortcuts)!==null&&s!==void 0?s:[],d=[];let m=!1;for(let u of f)if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((r=u.args)!==null&&r!==void 0?r:{},(i=e.args)!==null&&i!==void 0?i:{})&&o&&b.deepEqual(o.keys,w.normalizeKeys(u))){const y=o.isDefault&&b.deepEqual(o.keys,g);t.length!==0&&!y&&d.push(this._setShortcutKeys(u,t)),m=!0}else{if(u.command===e.command&&u.selector===e.selector&&b.deepEqual((a=u.args)!==null&&a!==void 0?a:{},(c=e.args)!==null&&c!==void 0?c:{})&&!o&&t.length===0)continue;d.push(u)}if(!m){const u=!o||!b.deepEqual(o.keys,g);o&&o.isDefault&&u&&d.push(this._shortcutFromTarget(e,o.keys,{disabled:!0,preventDefault:o.preventDefault})),t.length!==0&&u&&d.push(this._shortcutFromTarget(e,t,{preventDefault:o?.preventDefault}))}await p.set("shortcuts",d),await this._refreshShortcutList()}_setShortcutKeys(e,t){const o=this._platformKeys(e);return{...e,[o]:t}}_shortcutFromTarget(e,t,o={}){const s={command:e.command,selector:e.selector,keys:t};return e.args&&!b.deepEqual(e.args,{})&&(s.args=e.args),o.disabled&&(s.disabled=!0),o.preventDefault!==void 0&&(s.preventDefault=o.preventDefault),s}_platformKeys(e){return k.IS_WIN&&e.winKeys?"winKeys":k.IS_MAC&&e.macKeys?"macKeys":!k.IS_WIN&&!k.IS_MAC&&e.linuxKeys?"linuxKeys":"keys"}sortShortcuts(){const e=this.state.filteredShortcutList;let t=this.state.currentSort;t==="command"&&(t="label");const o=s=>{var r;return t==="source"?s.keybindings.every(i=>i.isDefault)?"default":"other":(r=s[t])!==null&&r!==void 0?r:""};e.sort((s,r)=>{var i,a;const c=o(s),g=o(r),p=c.localeCompare(g);if(p)return p;{const f=(i=s.label)!==null&&i!==void 0?i:"",d=(a=r.label)!==null&&a!==void 0?a:"";return f.localeCompare(d)}}),this.setState({filteredShortcutList:e})}render(){return this.state.shortcutsFetched?n.createElement("div",{className:"jp-Shortcuts-ShortcutUI",id:"jp-shortcutui"},n.createElement(mt,{updateSearchQuery:this.updateSearchQuery,resetShortcuts:this.resetShortcuts,toggleSelectors:this.toggleSelectors,showSelectors:this.state.showSelectors,updateSort:this.updateSort,currentSort:this.state.currentSort,toggleAddCommandRow:this.toggleAddCommandRow,width:this.props.width,translator:this.props.external.translator}),this.state.showAddCommand&&n.createElement(L,{...this._newShortcutItem,shortcut:this.state.newShortcut,newShortcutUtils:{searchQuery:this.state.searchQuery,updateCommand:this._newShortcutItem.updateCommand,saveShortcut:this.saveNewShortcut}}),n.createElement(ht,{shortcuts:this.state.filteredShortcutList,resetKeybindings:this.resetKeybindings,addKeybinding:this.addKeybinding,replaceKeybinding:this.replaceKeybinding,deleteKeybinding:this.deleteKeybinding,setCustomOptions:this.setCustomOptions,showSelectors:this.state.showSelectors,findConflictsFor:(e,t)=>this.state.shortcutRegistry?this.state.shortcutRegistry.findConflictsFor(e,t):(console.error("Cannot search for keybinding conflicts at this time: registry is not ready"),[]),height:this.props.height,external:this.props.external})):null}}const yt=l=>P.createElement(gt,{external:l.external,height:1e3,width:1e3}),T="@jupyterlab/shortcuts-extension:shortcuts";function ft(l,e,t,o,s){return{translator:t,getSettings:()=>l.load(T,!0),commandRegistry:e.commands,actionRequested:o,editorFactory:s}}const v={id:T,description:"Adds the keyboard shortcuts editor.",requires:[ot],optional:[V,st,G],activate:async(l,e,t,o,s)=>{const r=t??Y,i=r.load("jupyterlab"),{commands:a}=l;let c,g,p={};if(o){const d=new R({}),m=h=>h.dataset.shortcut!==void 0;l.commands.addCommand(C.editBinding,{label:i.__("Edit Keybinding"),caption:i.__("Edit existing keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"edit-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.deleteBinding,{label:i.__("Delete Keybinding"),caption:i.__("Delete chosen keybinding"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.keybinding,_=h?.dataset.shortcut;if(!_||!S)return console.log("Missing shortcut id/keybinding information");d.emit({request:"delete-keybinding",keybinding:parseInt(S,10),shortcutId:_})}}),l.commands.addCommand(C.addBinding,{label:i.__("Add Keybinding"),caption:i.__("Add new keybinding for existing shortcut target"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{const h=l.contextMenuHitTest(m),S=h?.dataset.shortcut;if(!S)return console.log("Missing shortcut id to add keybinding to");d.emit({request:"add-keybinding",shortcutId:S})}}),a.addCommand(C.toggleSelectors,{label:i.__("Toggle Selectors"),caption:i.__("Toggle command selectors"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"toggle-selectors"})}}),a.addCommand(C.resetAll,{label:i.__("Reset All"),caption:i.__("Reset all shortcuts"),describedBy:{args:{type:"object",properties:{}}},execute:()=>{d.emit({request:"reset-all"})}});const u=s?h=>s.factoryService.newInlineEditor(h):void 0,y={fieldRenderer:h=>yt({external:ft(e,l,r,d,u),...h})};o.addRenderer(`${v.id}.shortcuts`,y)}function f(d){const m=l.commands.listCommands().join(`
|
|
2
2
|
`);g||(g=b.deepCopy(d.properties.shortcuts.default)),p={},d.properties.shortcuts.default=Object.keys(e.plugins).map(u=>{const y=e.plugins[u].schema["jupyter.lab.shortcuts"]||[];return p[u]=y,y}).concat([g]).reduce((u,y)=>k.IS_MAC?u.concat(y):u.concat(y.filter(h=>!h.keys.some(S=>{const{cmd:_}=w.parseKeystroke(S);return _}))),[]).sort((u,y)=>u.command.localeCompare(y.command)),d.properties.shortcuts.description=i.__(`Note: To disable a system default shortcut,
|
|
3
3
|
copy it to User Preferences and add the
|
|
4
4
|
"disabled" key, for example:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aS as C,aT as m,aU as h,aV as b,aW as D}from"../datalayer-app-main.js";import{I as w}from"./tokens-CGj56w43.js";import{I as k}from"./index-
|
|
1
|
+
import{aS as C,aT as m,aU as h,aV as b,aW as D}from"../datalayer-app-main.js";import{I as w}from"./tokens-CGj56w43.js";import{I as k}from"./index-h8lXpqtD.js";import{C as f}from"./celltoolbartracker-0MFBHjtq.js";import"./hoverbox-CStlKQWE.js";const i="@jupyterlab/cell-toolbar-extension:plugin",x={id:i,description:"Add the cells toolbar.",autoStart:!0,activate:async(o,l,d,a)=>{const t=(a??m).load("jupyterlab");o.commands.addCommand("cell-toolbar:delete",{label:t.__("Delete Cell"),caption:t.__("Delete the cell"),describedBy:{args:{type:"object",properties:{}}},execute:async e=>{let n=!0,c;if(l&&(c=await l.load(i),n=c.get("askCellDeleteConfirmation").composite),!n)return o.commands.execute("notebook:delete-cell",e);const u=await h({title:t.__("Delete Cell"),body:t.__("Are you sure you want to delete this cell?"),buttons:[b.cancelButton(),b.warnButton({label:t.__("Delete")})],checkbox:l?{label:t.__("Do not ask me again"),caption:t.__("Ignore this warning for future deletions.")}:null});if(u.button.accept)return u.isChecked&&c&&await c.set("askCellDeleteConfirmation",!1),o.commands.execute("notebook:delete-cell",e)},isEnabled:e=>o.commands.isEnabled("notebook:delete-cell")});function s(e){const n=e===null?!0:e.get("showToolbar").composite;r.enabled=n}const _=l&&d?D(d,l,f.FACTORY_NAME,x.id,a??m):void 0,r=new f(o.commands,_);l!==null&&Promise.all([o.restored,l.load(i)]).then(([,e])=>{s(e),e.changed.connect(s)}),o.docRegistry.addWidgetExtension("Notebook",r)},optional:[w,k,C]};export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aS as b}from"../datalayer-app-main.js";import{b as f,S}from"./index-
|
|
1
|
+
import{aS as b}from"../datalayer-app-main.js";import{b as f,S}from"./index-h8lXpqtD.js";import{I}from"./tokens-BUuPwJ9U.js";import{c as h}from"./index-46VEGuyz.js";import{I as g}from"./tokens-CGj56w43.js";import"./hoverbox-CStlKQWE.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";const s="@jupyterlab/statusbar-extension:plugin",It={id:s,description:"Provides the application status bar.",requires:[b],provides:I,autoStart:!0,activate:(i,l,p,r,n)=>{const c=l.load("jupyterlab"),t=new S;t.id="jp-main-statusbar",i.shell.add(t,"bottom"),p&&p.layoutModified.connect(()=>{t.update()});const u=c.__("Main Area"),e="statusbar:toggle";if(i.commands.addCommand(e,{label:c.__("Show Status Bar"),execute:()=>{t.setHidden(t.isVisible),r&&r.set(s,"visible",t.isVisible)},isToggled:()=>t.isVisible,describedBy:{args:{type:"object",properties:{}}}}),i.commands.commandExecuted.connect((d,m)=>{m.id==="application:reset-layout"&&!t.isVisible&&i.commands.execute(e).catch(o=>{console.error("Failed to show the status bar.",o)})}),n&&n.addItem({command:e,category:u}),r){const d=r.load(s),m=o=>{const a=o.get("visible").composite;t.setHidden(!a)};Promise.all([d,i.restored]).then(([o])=>{m(o),o.changed.connect(a=>{m(a)})}).catch(o=>{console.error(o.message)})}return t},optional:[h,g,f]};export{It as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cr as E,aO as I,aP as j,cv as N,aT as x,r as d,cw as L,cx as w,cy as A,aQ as D,cz as R,cA as O,aS as P,cB as M,cC as T,cD as U,cE as W}from"../datalayer-app-main.js";import{I as q}from"./tokens-DLcOlp5q.js";import{c as z}from"./index-
|
|
1
|
+
import{cr as E,aO as I,aP as j,cv as N,aT as x,r as d,cw as L,cx as w,cy as A,aQ as D,cz as R,cA as O,aS as P,cB as M,cC as T,cD as U,cE as W}from"../datalayer-app-main.js";import{I as q}from"./tokens-DLcOlp5q.js";import{c as z}from"./index-46VEGuyz.js";import{b as F}from"./index-h8lXpqtD.js";import{I as H}from"./tokens-CcUJmvEV.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./hoverbox-CStlKQWE.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";const K="jp-Launcher";class V extends E{constructor(){super(...arguments),this.itemsList=[]}add(r){const e=k.createItem(r);return this.itemsList.push(e),this.stateChanged.emit(void 0),new I(()=>{j.removeFirstOf(this.itemsList,e),this.stateChanged.emit(void 0)})}items(){return this.itemsList[Symbol.iterator]()}}class $ extends N{constructor(r){super(r.model),this._pending=!1,this._cwd="",this._cwd=r.cwd,this.translator=r.translator||x,this._trans=this.translator.load("jupyterlab"),this._callback=r.callback,this._commands=r.commands,this.addClass(K)}get cwd(){return this._cwd}set cwd(r){this._cwd=r,this.update()}get pending(){return this._pending}set pending(r){this._pending=r}render(){if(!this.model)return null;const r=[this._trans.__("Notebook"),this._trans.__("Console")],e=Object.create(null);for(const t of this.model.items()){const a=t.category||this._trans.__("Other");a in e||(e[a]=[]),e[a].push(t)}for(const t in e)e[t]=e[t].sort((a,n)=>k.sortCmp(a,n,this._cwd,this._commands));const p=[];let o;const u={[this._trans.__("Notebook")]:0,[this._trans.__("Console")]:20,[this._trans.__("Other")]:100};return Object.keys(e).sort((t,a)=>{const n=h=>{var _,g;const i=(_=e[h])!==null&&_!==void 0?_:[],f=(g=u[h])!==null&&g!==void 0?g:1/0;return Math.min(...i.map(y=>{var v;return(v=y.categoryRank)!==null&&v!==void 0?v:f}))},c=n(t),s=n(a);return c!==s?c-s:t.localeCompare(a)}).forEach(t=>{if(!e[t])return;const a=e[t][0],n={...a.args,cwd:this.cwd},c=r.indexOf(t)>-1,s=this._commands.iconClass(a.command,n),h=this._commands.icon(a.command,n);t in e&&(o=d.createElement("div",{className:"jp-Launcher-section",key:t},d.createElement("div",{className:"jp-Launcher-sectionHeader"},d.createElement(L.resolveReact,{icon:h,iconClass:w(s,"jp-Icon-cover"),stylesheet:"launcherSection","aria-hidden":"true"}),d.createElement("h2",{className:"jp-Launcher-sectionTitle"},t)),d.createElement("div",{className:"jp-Launcher-cardContainer"},Array.from(A(e[t],_=>Q(c,_,this,this._commands,this._trans,this._callback))))),p.push(o))}),d.createElement("div",{className:"jp-Launcher-body jp-zoom-target"},d.createElement("div",{className:"jp-Launcher-content"},d.createElement("div",{className:"jp-Launcher-cwd"},d.createElement("h3",null,this.cwd)),p))}}function Q(m,r,e,p,o,u){const l=r.command,t={...r.args,cwd:e.cwd},a=p.caption(l,t),n=p.label(l,t),c=m?n:a||n,s=()=>{e.pending!==!0&&(e.pending=!0,p.execute(l,{...r.args,cwd:e.cwd}).then(i=>{e.pending=!1,i instanceof D&&u(i)}).catch(i=>{console.error(i),e.pending=!1,R(o._p("Error","Launcher Error"),i)}))},h=i=>{(i.key==="Enter"||i.key===" "||i.key==="Spacebar")&&(i.preventDefault(),s())},_=p.iconClass(l,t),g=p.icon(l,t);return d.createElement("div",{className:"jp-LauncherCard",title:c,role:"button",onClick:s,onKeyDown:h,tabIndex:0,"data-category":r.category||o.__("Other"),key:k.keyProperty.get(r)},d.createElement("div",{className:"jp-LauncherCard-icon"},m?r.kernelIconUrl?d.createElement("img",{src:r.kernelIconUrl,className:"jp-Launcher-kernelIcon",alt:c}):d.createElement("div",{className:"jp-LauncherCard-noKernelIcon"},n[0].toUpperCase()):d.createElement(L.resolveReact,{icon:g,iconClass:w(_,"jp-Icon-cover"),stylesheet:"launcherCard"})),d.createElement("div",{className:"jp-LauncherCard-label",title:c},d.createElement("p",null,n)))}var k;(function(m){let r=0;m.keyProperty=new O({name:"key",create:()=>r++});function e(o){return{...o,category:o.category||"",rank:o.rank!==void 0?o.rank:1/0}}m.createItem=e;function p(o,u,l,t){const a=o.rank,n=u.rank;if(a!==n&&a!==void 0&&n!==void 0)return a<n?-1:1;const c=t.label(o.command,{...o.args,cwd:l}),s=t.label(u.command,{...u.args,cwd:l});return c.localeCompare(s)}m.sortCmp=p})(k||(k={}));var C;(function(m){m.create="launcher:create"})(C||(C={}));const $e={activate:G,id:"@jupyterlab/launcher-extension:plugin",description:"Provides the launcher tab service.",requires:[P],optional:[z,F,H],provides:q,autoStart:!0};function G(m,r,e,p,o){const{commands:u,shell:l}=m,t=r.load("jupyterlab"),a=new V;return u.addCommand(C.create,{label:t.__("New Launcher"),icon:n=>n.toolbar?M:void 0,describedBy:{args:{type:"object",properties:{cwd:{type:"string",description:t.__("The current working directory")},toolbar:{type:"boolean",description:t.__("Whether the command is executed from a toolbar")},activate:{type:"boolean",description:t.__("Whether to activate the widget")},ref:{type:"string",description:t.__("The reference widget id")}}}},execute:n=>{var c,s;const h=(s=(c=n.cwd)!==null&&c!==void 0?c:o?.model.path)!==null&&s!==void 0?s:"",_=`launcher-${b.id++}`,g=y=>{W(l.widgets("main"),v=>v===y)&&(l.add(y,"main",{ref:_}),i.dispose())},i=new $({model:a,cwd:h,callback:g,commands:u,translator:r});i.model=a,i.title.icon=T,i.title.label=t.__("Launcher");const f=new U({content:i});if(f.title.closable=!!Array.from(l.widgets("main")).length,f.id=_,l.add(f,"main",{activate:n.activate,ref:n.ref}),e&&e.layoutModified.connect(()=>{f.title.closable=Array.from(e.widgets("main")).length>1},f),o){const y=v=>{i.cwd=v.path};o.model.pathChanged.connect(y),i.disposed.connect(()=>{o.model.pathChanged.disconnect(y)})}return f}}),e&&Promise.all([m.restored,o?.model.restored]).then(()=>{function n(){e.isEmpty("main")&&u.execute(C.create)}e.layoutModified.connect(()=>{n()})}),p&&p.addItem({command:C.create,category:t.__("Launcher")}),e&&(e.addButtonEnabled=!0,e.addRequested.connect((n,c)=>{var s;const h=((s=c.currentTitle)===null||s===void 0?void 0:s.owner.id)||c.titles[c.titles.length-1].owner.id;return u.execute(C.create,{ref:h})})),a}var b;(function(m){m.id=0})(b||(b={}));export{$e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jl as ge,jm as oe,jn as H,jo as fe,jp as be,jq as ne,jr as ve,js as se,jt as ie,ju as b,jv as V,jw as C,jx as xe,jy as ye,jz as Ce,jA as $e,jB as Te,jC as we,jD as _e,jE as Ie,jF as ke,jG as je,jH as Fe,jI as P,jJ as U,jK as q,jL as Se,jM as G,jN as J,jO as R,jP as K,jQ as Q,jR as O,jS as Ee,jT as Ne,jU as I,jV as Oe,jW as He,jX as y,jY as Y,jZ as Ae,j_ as Be,j$ as k,k0 as Ve,k1 as De,k2 as Me,k3 as Pe,k4 as ae,k5 as j,k6 as Le,k7 as p,k8 as Re,k9 as le,ka as re,kb as We,r as h,kc as Z,kd as A,J as de,ke as ce,cv as ze,bv as Ue,aQ as qe,aO as Ge,ek as he,aS as Je,kf as Ke,aT as Qe,cs as Ye,kg as Ze,kh as Xe,ki as et,kj as tt,eS as X,aY as ot,dT as nt,kk as st}from"../datalayer-app-main.js";import{S as it,f as at,c as lt,M as rt}from"./index-46VEGuyz.js";import{I as dt}from"./tokens-CGj56w43.js";import"./Output-DLpf2Of9.js";import"./index-h8lXpqtD.js";import"./hoverbox-CStlKQWE.js";import"./index-B5W7CVUY.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";const ue=o=>typeof o=="function",ct=()=>null;function ee(o){return o===void 0?ct:ue(o)?o:()=>o}function te(o,t,e){const n=ue(o)?o:()=>o,d=ee(t),m=ee(e);return(r,l)=>n(r,l)?d(r,l):m(r,l)}const ht=(o,t)=>H`
|
|
2
2
|
<template
|
|
3
3
|
role="treeitem"
|
|
4
4
|
slot="${e=>e.isNestedItem()?"item":void 0}"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{am as L,aQ as D,aT as w,eR as W,r as V,J as I,aS as T,eS as S,eT as M,eU as K,eV as $,e0 as G,eW as U}from"../datalayer-app-main.js";import{K as j,b as F,c as z,P as J,d as Q,I as E,e as B,f as X}from"./index-
|
|
1
|
+
import{am as L,aQ as D,aT as w,eR as W,r as V,J as I,aS as T,eS as S,eT as M,eU as K,eV as $,e0 as G,eW as U}from"../datalayer-app-main.js";import{K as j,b as F,c as z,P as J,d as Q,I as E,e as B,f as X}from"./index-B5W7CVUY.js";import{a as Y}from"./tokens-DQMPCAHQ.js";import{I as q}from"./tokens-CGj56w43.js";import{I as H}from"./CellSidebarExtension-CrdbRLaE.js";import"./hoverbox-CStlKQWE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";const R="CompletionProvider:context";class Z{constructor(){this.identifier=R,this.rank=500,this.renderer=null}async isApplicable(t){return!0}fetch(t,e){const n=e.editor;return n?new Promise(i=>{i(A.contextHint(n))}):Promise.reject("No editor")}}var A;(function(l){function t(n){const i=n.getTokenAtCursor(),r=e(i,n).filter(c=>c.type).map(c=>c.value),m=new Set(r),u=new Array;return m.forEach(c=>u.push({label:c})),{start:i.offset,end:i.offset+i.value.length,items:u}}l.contextHint=t;function e(n,i){return i.getTokens().filter(r=>r.value.indexOf(n.value)===0&&r.value!==n.value)}})(A||(A={}));class ee{constructor(){this._activeProviders=new Set([j,R]),this._inlineCompleterSettings=H.defaultSettings,this._providers=new Map,this._inlineProviders=new Map,this._panelHandlers=new Map,this._mostRecentContext=new Map,this._activeProvidersChanged=new L(this),this._selected=new L(this),this._inlineCompleterFactory=null}get activeProvidersChanged(){return this._activeProvidersChanged}get selected(){return this._selected}setTimeout(t){this._timeout=t}setShowDocumentationPanel(t){this._panelHandlers.forEach(e=>e.completer.showDocsPanel=t),this._showDoc=t}setSuppressIfInlineCompleterActive(t){this._panelHandlers.forEach(e=>e.completer.suppressIfInlineCompleterActive=t),this._suppressIfInlineCompleterActive=t}setContinuousHinting(t){this._panelHandlers.forEach(e=>e.autoCompletion=t),this._autoCompletion=t}registerProvider(t){const e=t.identifier;this._providers.has(e)?console.warn(`Completion provider with identifier ${e} is already registered`):(this._providers.set(e,t),this._panelHandlers.forEach((n,i)=>{this.updateCompleter(this._mostRecentContext.get(i))}))}registerInlineProvider(t){const e=t.identifier;this._inlineProviders.has(e)?console.warn(`Completion provider with identifier ${e} is already registered`):(this._inlineProviders.set(e,t),this._panelHandlers.forEach((n,i)=>{this.updateCompleter(this._mostRecentContext.get(i))}))}getProviders(){return this._providers}activateProvider(t){this._activeProviders=new Set([]),t.forEach(e=>{this._providers.has(e)&&this._activeProviders.add(e)}),this._activeProviders.size===0&&(this._activeProviders.add(j),this._activeProviders.add(R)),this._activeProvidersChanged.emit()}async updateCompleter(t){var e,n;const{widget:i,editor:o,sanitizer:r}=t,m=i.id,u=this._panelHandlers.get(m),c=[...this._activeProviders][0],a=this._providers.get(c);let _=(e=a?.renderer)!==null&&e!==void 0?e:F.getDefaultRenderer(r);const s=a?.modelFactory;let d;s?d=await s.call(a,t):d=new z,this._mostRecentContext.set(i.id,t);const f={model:d,editor:o,renderer:_,sanitizer:r,showDoc:this._showDoc};if(u){const h=u.completer;(n=h.model)===null||n===void 0||n.dispose(),h.model=f.model,h.renderer=f.renderer,h.showDocsPanel=f.showDoc,h.suppressIfInlineCompleterActive=this._suppressIfInlineCompleterActive,u.autoCompletion=this._autoCompletion,o&&(u.editor=o,u.reconciliator=await this.generateReconciliator(t))}else{const h=await this._generateHandler(t,f);this._panelHandlers.set(i.id,h),h.completer.selected.connect((p,g)=>this._selected.emit({insertText:g})),i.disposed.connect(p=>{this.disposeHandler(p.id,h),this._mostRecentContext.delete(m)})}}invoke(t){const e=this._panelHandlers.get(t);e&&e.invoke()}select(t){const e=this._panelHandlers.get(t);e&&e.completer.selectActive()}setInlineCompleterFactory(t){this._inlineCompleterFactory=t,this._panelHandlers.forEach((e,n)=>{this.updateCompleter(this._mostRecentContext.get(n))}),!this.inline&&(this.inline={invoke:e=>{const n=this._panelHandlers.get(e);n&&n.inlineCompleter&&n.invokeInline()},isActive:e=>{const n=this._panelHandlers.get(e);return n&&n.inlineCompleter?n.inlineCompleter.isActive:!1},cycle:(e,n)=>{const i=this._panelHandlers.get(e);i&&i.inlineCompleter&&i.inlineCompleter.cycle(n)},accept:e=>{const n=this._panelHandlers.get(e);n&&n.inlineCompleter&&n.inlineCompleter.accept()},configure:e=>{this._inlineCompleterSettings=e;for(const[n,i]of this._inlineProviders.entries())i.configure&&i.configure(e.providers[n]);this._panelHandlers.forEach((n,i)=>{n.inlineCompleter&&n.inlineCompleter.configure(e),this.updateCompleter(this._mostRecentContext.get(i))})}})}get inlineProviders(){return[...this._inlineProviders.values()]}async generateReconciliator(t){const e=[];for(const[o,r]of Object.entries(this._inlineCompleterSettings.providers))r.enabled===!0&&e.push(o);const n=[...this._inlineProviders.values()].filter(o=>e.includes(o.identifier)),i=[];for(const o of this._activeProviders){const r=this._providers.get(o);r&&i.push(r)}return new J({context:t,providers:i,inlineProviders:n,inlineProvidersSettings:this._inlineCompleterSettings.providers,timeout:this._timeout})}disposeHandler(t,e){var n,i,o,r;(n=e.completer.model)===null||n===void 0||n.dispose(),e.completer.dispose(),(o=(i=e.inlineCompleter)===null||i===void 0?void 0:i.model)===null||o===void 0||o.dispose(),(r=e.inlineCompleter)===null||r===void 0||r.dispose(),e.dispose(),this._panelHandlers.delete(t)}async _generateHandler(t,e){const n=new F(e),i=this._inlineCompleterFactory?this._inlineCompleterFactory.factory({...e,model:new H.Model}):void 0;n.hide(),D.attach(n,document.body),i&&(D.attach(i,document.body),i.hide(),i.configure(this._inlineCompleterSettings));const o=await this.generateReconciliator(t),r=new Q({completer:n,inlineCompleter:i,reconciliator:o});return r.editor=t.editor,r}}class te{constructor(t){this.options=t,this.identifier="@jupyterlab/inline-completer:history",this._maxSuggestions=100;const e=t.translator||w;this._trans=e.load("jupyterlab")}get name(){return this._trans.__("History")}get icon(){return W}get schema(){return{properties:{maxSuggestions:{title:this._trans.__("Maximum number of suggestions"),description:this._trans.__("The maximum number of suggestions to retrieve from history."),type:"number"}},default:{enabled:!1,maxSuggestions:100}}}configure(t){var e;this._maxSuggestions=(e=t.maxSuggestions)!==null&&e!==void 0?e:100}async fetch(t,e,n){var i;const o=(i=e.session)===null||i===void 0?void 0:i.kernel;if(!o)throw new Error("No kernel for completion request.");const m=t.text.slice(0,t.offset).split(`
|
|
2
2
|
`).slice(-1)[0],u=t.text.slice(t.offset).split(`
|
|
3
3
|
`)[0];let c;const a=[];if(m===""){c={output:!1,raw:!0,hist_access_type:"tail",n:this._maxSuggestions};const _=await o.requestHistory(c);if(_.content.status==="ok"){let s=_.content.history;const d=new Map;for(const p of s.reverse()){const g=p[2];d.set(g,(d.get(g)||0)+1)}const h=Array.from(d.entries()).sort((p,g)=>p[1]>g[1]?-1:p[1]<g[1]?1:0);for(const p of h)a.push({insertText:p[0]})}}else{c={output:!1,raw:!0,hist_access_type:"search",pattern:O(m)+"*"+(u?O(u)+"*":""),unique:!0,n:this._maxSuggestions};const _=await o.requestHistory(c);if(_.content.status==="ok")for(const s of _.content.history){const d=s[2].split(`
|
|
4
4
|
`);for(let f=0;f<d.length;f++){const h=d[f];if(h.startsWith(m)){let p=h.slice(m.length);f+1<d.length&&(p+=`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ec as M,ed as F,ee as P,ef as S,eg as I,aM as O,aQ as A,bw as W,am as E,aT as q,eh as H,cq as T,aK as j,cz as D,ei as B,ej as V,ek as L,aS as N,el as z,dV as U}from"../datalayer-app-main.js";import{f as Y,I as $}from"./index-
|
|
1
|
+
import{ec as M,ed as F,ee as P,ef as S,eg as I,aM as O,aQ as A,bw as W,am as E,aT as q,eh as H,cq as T,aK as j,cz as D,ei as B,ej as V,ek as L,aS as N,el as z,dV as U}from"../datalayer-app-main.js";import{f as Y,I as $}from"./index-46VEGuyz.js";import{I as G}from"./tokens-CGj56w43.js";import{a as K,C as R}from"./index-h8lXpqtD.js";import{T as Q,a as J}from"./model-UAl84z_g.js";import"./Output-DLpf2Of9.js";import"./index-B5W7CVUY.js";import"./hoverbox-CStlKQWE.js";import"./index-CBWGYoQM.js";import"./dayjs.min-u3zuoSR8.js";import"./isEqual-BxgGIFfN.js";import"./d3-color-Jd8hXty2.js";import"./dist-N90VI44_.js";import"./index-Cz10oMGc.js";import"./RestartIcon-DvpOf5Mf.js";import"./CellSidebarExtension-CrdbRLaE.js";import"./NotebookSkeleton-DHQ--KEB.js";import"./Avatar-B0TcOj_b.js";import"./renderer-NdtLW87o.js";import"./SquareIcon-Dy3l3VdH.js";import"./FileDirectoryOpenFillIcon-Db8fP24q.js";import"./url-4_0MnaFQ.js";/* empty css *//* empty css */import"./style-DdAxk_bj.js";/* empty css */import"./style-Cj1gzCjo.js";/* empty css */import"./style-rkw8dR9f.js";import"./style-GHJFdtIz.js";import"./style-ZSIOeMoX.js";import"./style-iVfD6mFL.js";import"./style-DA-Ya7rp.js";import"./style-D3tvWcFO.js";import"./style-BOqStzF9.js";import"./style-ADLQJ-E9.js";import"./style-DgglluaK.js";import"./ArrowLeftIcon-sX3iNMG1.js";import"./SkubbleIcon-CAaVh_BE.js";import"./usePrimerThemeBridge-BfoXa7hP.js";import"./index-C644crfL.js";import"./KernelVariables-BIWju6rZ.js";import"./index-CavxlEgY.js";import"./SortAscIcon-CmH04s3F.js";import"./SortDescIcon-Qif6E10I.js";import"./NotebookToolbar-C1fpK-Vi.js";import"./RepoPushIcon-BtXQRhLa.js";import"./sessions-W_hhenw6.js";import"./tokens-DcXbsdvP.js";import"./drivecontents-BSbQpH52.js";import"./kernel-Cn-ejD4i.js";class X extends J{constructor(e,r,t){super(e,t),this.parser=r}get documentType(){return"markdown-viewer"}get isAlwaysActive(){return!0}get supportedOptions(){return["maximalDepth","numberingH1","numberHeaders"]}async getHeadings(){const e=this.widget.context.model.toString(),r=await S(e,this.parser),t=I(r,{...this.configuration,baseNumbering:1});return Promise.resolve(t)}}class Z extends Q{constructor(e,r,t){super(e),this.parser=r,this.sanitizer=t}_createNew(e,r){const t=new X(e,this.parser,r);let o=new WeakMap;const p=(c,m)=>{if(m){const a=o.get(m);if(a){const h=e.content.node.getBoundingClientRect(),l=a.getBoundingClientRect();(l.top>h.bottom||l.bottom<h.top)&&a.scrollIntoView({block:"center"})}else console.warn("Heading element not found for heading",m,"in widget",e)}},s=()=>{this.parser&&(M(e.content.node),o=new WeakMap,t.headings.forEach(async c=>{var m,a;const h=await F(this.parser,c.raw,c.level,this.sanitizer);if(!h)return;const l=(m=this.sanitizer.allowNamedProperties)!==null&&m!==void 0&&m?"id":"data-jupyter-id",w=`h${c.level}[${l}="${CSS.escape(h)}"]`;o.set(c,P(e.content.node,w,(a=c.prefix)!==null&&a!==void 0?a:""))}))};return e.content.ready.then(()=>{s(),e.content.rendered.connect(s),t.activeHeadingChanged.connect(p),t.headingsChanged.connect(s),e.disposed.connect(()=>{e.content.rendered.disconnect(s),t.activeHeadingChanged.disconnect(p),t.headingsChanged.disconnect(s)})}),t}}const ee=new O("@jupyterlab/markdownviewer:IMarkdownViewerTracker",`A widget tracker for markdown
|
|
2
2
|
document viewers. Use this if you want to iterate over and interact with rendered markdown documents.`),te="jp-MarkdownViewer",C="text/markdown";class f extends A{constructor(e){super(),this._config={...f.defaultConfig},this._fragment="",this._ready=new W,this._renderPending=!1,this._isRendering=!1,this._renderRequested=!1,this._rendered=new E(this),this.context=e.context,this.translator=e.translator||q,this._trans=this.translator.load("jupyterlab"),this.renderer=e.renderer,this.node.tabIndex=0,this.addClass(te),(this.layout=new H).addWidget(this.renderer),this.context.ready.then(async()=>{await this._render(),this._monitor=new T.ActivityMonitor({signal:this.context.model.contentChanged,timeout:this._config.renderTimeout}),this._monitor.activityStopped.connect(this._requestRender,this),this.context.model.contentChanged.connect(this._onContentChanged,this),this._ready.resolve(void 0)})}get ready(){return this._ready.promise}get rendered(){return this._rendered}setFragment(e){this._fragment=e,this._requestRender()}setOption(e,r){if(this._config[e]===r)return;this._config[e]=r;const{style:t}=this.renderer.node;switch(e){case"fontFamily":t.setProperty("font-family",r);break;case"fontSize":t.setProperty("font-size",r?r+"px":null);break;case"hideFrontMatter":this._requestRender();break;case"lineHeight":t.setProperty("line-height",r?r.toString():null);break;case"lineWidth":{const o=r?`calc(50% - ${r/2}ch)`:null;t.setProperty("padding-left",o),t.setProperty("padding-right",o);break}case"renderTimeout":this._monitor&&(this._monitor.timeout=r);break}}dispose(){this.isDisposed||(this._monitor&&this._monitor.dispose(),this._monitor=null,super.dispose())}onUpdateRequest(e){this._renderPending&&this.context.isReady&&!this.isDisposed&&(this._renderPending=!1,this._render())}onActivateRequest(e){this.node.focus()}_requestRender(){this._renderPending=!0,this.update()}_onContentChanged(){this._renderPending=!0}async _render(){if(this.isDisposed)return;if(this._isRendering){this._renderRequested=!0;return}this._renderPending=!1,this._renderRequested=!1;const{context:e}=this,{model:r}=e,t=r.toString(),o={};o[C]=this._config.hideFrontMatter?y.removeFrontMatter(t):t;const p=new j({data:o,metadata:{fragment:this._fragment}});this._fragment="";try{if(this._isRendering=!0,await this.renderer.renderModel(p),this._isRendering=!1,this._renderRequested)return this._render();this._rendered.emit()}catch(s){requestAnimationFrame(()=>{this.dispose()}),D(this._trans.__("Renderer Failure: %1",e.path),s)}}}(function(d){d.defaultConfig={fontFamily:null,fontSize:null,lineHeight:null,lineWidth:null,hideFrontMatter:!0,renderTimeout:1e3}})(f||(f={}));class re extends V{setFragment(e){this.content.setFragment(e)}}class ne extends B{constructor(e){super(y.createRegistryOptions(e)),this._fileType=e.primaryFileType,this._rendermime=e.rendermime}createNewWidget(e){var r,t,o,p,s;const m=this._rendermime.clone({resolver:e.urlResolver}).createRenderer(C),a=new f({context:e,renderer:m});return a.title.icon=(r=this._fileType)===null||r===void 0?void 0:r.icon,a.title.iconClass=(o=(t=this._fileType)===null||t===void 0?void 0:t.iconClass)!==null&&o!==void 0?o:"",a.title.iconLabel=(s=(p=this._fileType)===null||p===void 0?void 0:p.iconLabel)!==null&&s!==void 0?s:"",a.title.caption=this.label,new re({content:a,context:e})}}var y;(function(d){function e(t){return{...t,readOnly:!0}}d.createRegistryOptions=e;function r(t){const o=/^---\n[\s\S]*?\n(?:---|\.\.\.)\n/,p=t.match(o);if(!p)return t;const{length:s}=p[0];return t.slice(s)}d.removeFrontMatter=r})(y||(y={}));var g;(function(d){d.markdownPreview="markdownviewer:open",d.markdownEditor="markdownviewer:edit",d.trust="markdownviewer:trust"})(g||(g={}));const v="Markdown Preview",ie={activate:oe,id:"@jupyterlab/markdownviewer-extension:plugin",description:"Adds markdown file viewer and provides its tracker.",provides:ee,requires:[$,N],optional:[Y,G,L,K],autoStart:!0};function oe(d,e,r,t,o,p,s){const c=r.load("jupyterlab"),{commands:m,docRegistry:a}=d;e.addFactory(z);const h="markdownviewer-widget",l=new U({namespace:h});let w={...f.defaultConfig};function k(i){Object.keys(w).forEach(n=>{var u;i.setOption(n,(u=w[n])!==null&&u!==void 0?u:null)})}if(o){const i=n=>{w=n.composite,l.forEach(u=>{k(u.content)})};o.load(ie.id).then(n=>{n.changed.connect(()=>{i(n)}),i(n)}).catch(n=>{console.error(n.message)})}const b=new ne({rendermime:e,name:v,label:c.__("Markdown Preview"),primaryFileType:a.getFileType("markdown"),fileTypes:["markdown"],defaultRendered:["markdown"]});return b.widgetCreated.connect((i,n)=>{n.context.pathChanged.connect(()=>{l.save(n)}),k(n.content),n.content.node.setAttribute("data-trust-command",g.trust),l.add(n)}),a.addWidgetFactory(b),t&&t.restore(l,{command:"docmanager:open",args:i=>({path:i.context.path,factory:v}),name:i=>i.context.path}),m.addCommand(g.markdownPreview,{label:c.__("Markdown Preview"),execute:i=>{const n=i.path;if(typeof n=="string")return m.execute("docmanager:open",{path:n,factory:v,options:i.options})},describedBy:{args:{type:"object",properties:{path:{type:"string",description:c.__("The path to the markdown file to preview")},options:{type:"object",description:c.__("Options for opening the preview")}},required:["path"]}}}),m.addCommand(g.markdownEditor,{execute:()=>{const i=l.currentWidget;if(!i)return;const n=i.context.path;return m.execute("docmanager:open",{path:n,factory:"Editor",options:{mode:"split-right"}})},isVisible:()=>{const i=l.currentWidget;return i&&T.PathExt.extname(i.context.path)===".md"||!1},label:c.__("Show Markdown Editor"),describedBy:{args:{type:"object",properties:{}}}}),m.addCommand(g.trust,{label:c.__("Trust Markdown Preview"),execute:i=>{var n;const u=i[R.TRUST_BOUNDARY_ID_ARG],_=typeof u=="string"?(n=l.find(x=>x.content.node.id===u))!==null&&n!==void 0?n:null:l.currentWidget;return _&&!_.isDisposed?(_.content.node.classList.add("jp-mod-trusted"),d.commandLinker.markTrusted(_.content.node),{trusted:!0}):{trusted:!1}},describedBy:{args:{type:"object",properties:{[R.TRUST_BOUNDARY_ID_ARG]:{type:"string",description:c.__("The Markdown preview trust boundary ID")}}}}}),p&&p.add(new Z(l,e.markdownParser,s??e.sanitizer)),l}export{ie as default};
|