@datalayer/agent-runtimes 1.3.99 → 1.3.101
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-DDIhoGCr.js → AgentDetails-CO9iM59C.js} +8 -8
- package/dist-embed/chunks/{AgentDetailsDialog-DQfL7V4R.js → AgentDetailsDialog-DmD6xm6k.js} +1 -1
- package/dist-embed/chunks/{AgentInspector-DaMCROPs.js → AgentInspector-kDMuvh45.js} +1 -1
- package/dist-embed/chunks/{AgentInspectorDialog-zGMiFR5z.js → AgentInspectorDialog-fT96Pb4Z.js} +1 -1
- package/dist-embed/chunks/Avatar-Dqz3ZWjZ.js +1 -0
- package/dist-embed/chunks/{CellSidebarExtension-DAzWlyRN.js → CellSidebarExtension-B-vao30u.js} +1 -1
- package/dist-embed/chunks/ChatView-CubqJum2.js +288 -0
- package/dist-embed/chunks/{ContextPie-D1eAig1P.js → ContextPie-ltoJ11q_.js} +1 -1
- package/dist-embed/chunks/DatalayerAgentBridge-BmJbZ2Lk.js +1 -0
- package/dist-embed/chunks/{DeckComponent-lNZXX0qi.js → DeckComponent-Fp6Vw8vN.js} +2 -2
- package/dist-embed/chunks/{DocumentView-BKzeMFBq.js → DocumentView-DKUbyyJg.js} +1 -1
- package/dist-embed/chunks/{EphemeralDocument-DKtocZ3W.js → EphemeralDocument-CgYPEfGC.js} +1 -1
- package/dist-embed/chunks/{EphemeralNotebook-oX8GrXS3.js → EphemeralNotebook-DvDbCKnr.js} +2 -2
- package/dist-embed/chunks/{ExcalidrawComponent-B8nrxRST.js → ExcalidrawComponent-BehqBpwC.js} +1 -1
- package/dist-embed/chunks/{ExcalidrawModal--K0C_WUL.js → ExcalidrawModal-B2sXbVJB.js} +1 -1
- package/dist-embed/chunks/{Flash-DTBPQ4yb.js → Flash-DdFxPtBI.js} +1 -1
- package/dist-embed/chunks/{JupyterLexicalExtension-CSMNnVr9.js → JupyterLexicalExtension-CUsjvchq.js} +9 -9
- package/dist-embed/chunks/{KernelVariables-D4s9Q5Ng.js → KernelVariables-BUmOt4yF.js} +2 -2
- package/dist-embed/chunks/{LexicalToolRegistry-_DH2qwSU.js → LexicalToolRegistry-DoZIM1lF.js} +1 -1
- package/dist-embed/chunks/{NotebookSkeleton-BTs2pK7B.js → NotebookSkeleton-D9WNoiWD.js} +1 -1
- package/dist-embed/chunks/{NotebookToolbar-B3BFk-WV.js → NotebookToolbar-C2_ZC9Ej.js} +1 -1
- package/dist-embed/chunks/{NotebookView-Dl-icjhk.js → NotebookView-BActuABH.js} +1 -1
- package/dist-embed/chunks/{SandboxDetailsDialog-22wdG0V-.js → SandboxDetailsDialog-C0afmOA7.js} +1 -1
- package/dist-embed/chunks/{SchemaForm-8b_dpfFK.js → SchemaForm-B351kd79.js} +1 -1
- package/dist-embed/chunks/{Toolbar-5oT8y_0g.js → Toolbar-B6ROXJ-2.js} +1 -1
- package/dist-embed/chunks/{YouTubePlugin-B6pgdGkU.js → YouTubePlugin-CqA-IwCx.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-CCRPX817.js → abnfDiagram-VCTEODGH-B2rXJzIG.js} +1 -1
- package/dist-embed/chunks/{abnfDiagram-VCTEODGH-Cc9J0KVQ.js → abnfDiagram-VCTEODGH-Celh8uSB.js} +1 -1
- package/dist-embed/chunks/{advancedFormat-IOT0HLTV.js → advancedFormat-9fBUVkZ9.js} +1 -1
- package/dist-embed/chunks/{ar-SA-G6X2FPQ2-DMIAxeqR.js → ar-SA-G6X2FPQ2-DhQlC4AZ.js} +1 -1
- package/dist-embed/chunks/{arc-CN-j54V6.js → arc-BcTWnMdT.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-BN7cGeVb.js → architectureDiagram-5GKGNRK7-B1nGp-ab.js} +1 -1
- package/dist-embed/chunks/{architectureDiagram-5GKGNRK7-De77ckgV.js → architectureDiagram-5GKGNRK7-BtvjVASE.js} +1 -1
- package/dist-embed/chunks/{az-AZ-76LH7QW2-DMFqBzG7.js → az-AZ-76LH7QW2-CDvJeI6H.js} +1 -1
- package/dist-embed/chunks/{bg-BG-XCXSNQG7-DM9S3yhg.js → bg-BG-XCXSNQG7-B_2t7dwS.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-868be97b-CoipBJ9g.js → blockDiagram-868be97b-Ctqgl81i.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-CYPYbqjz.js → blockDiagram-I7D4REHJ-B8cdJr95.js} +1 -1
- package/dist-embed/chunks/{blockDiagram-I7D4REHJ-Cs7aaFQh.js → blockDiagram-I7D4REHJ-BW7qedxT.js} +1 -1
- package/dist-embed/chunks/{bn-BD-2XOGV67Q-CK8aWMNS.js → bn-BD-2XOGV67Q-B7nTDj-4.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-3f4bdde3-UwJoyMng.js → c4Diagram-3f4bdde3-0ruvDNdG.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-C0lopX7r.js → c4Diagram-7LVT6UL2-D_oBILZn.js} +1 -1
- package/dist-embed/chunks/{c4Diagram-7LVT6UL2-DjTuau65.js → c4Diagram-7LVT6UL2-ujGlIhtL.js} +1 -1
- package/dist-embed/chunks/{ca-ES-6MX7JW3Y-HslrBDJw.js → ca-ES-6MX7JW3Y-llJD_i9l.js} +1 -1
- package/dist-embed/chunks/channel-o04upGuP.js +1 -0
- package/dist-embed/chunks/{chunk-2Q5K7J3B-D4cqUYAT.js → chunk-2Q5K7J3B-CwLcj_PJ.js} +1 -1
- package/dist-embed/chunks/{chunk-2Q5K7J3B-BVMKDBY8.js → chunk-2Q5K7J3B-DcyPc2RX.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-Xhg_BVSp.js → chunk-5VM5RSS4-BkRs7Fna.js} +1 -1
- package/dist-embed/chunks/{chunk-5VM5RSS4-CzKuJynz.js → chunk-5VM5RSS4-DMPUDDnV.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-Bt1Q0fHq.js → chunk-F27PBJKO-BzMwl8_q.js} +1 -1
- package/dist-embed/chunks/{chunk-F27PBJKO-BUIdY_4T.js → chunk-F27PBJKO-pG1_v10O.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-DpgCTHeS.js → chunk-IMKFNOWR-Bf_-T_nx.js} +1 -1
- package/dist-embed/chunks/{chunk-IMKFNOWR-Cy5BRScb.js → chunk-IMKFNOWR-DJta09Af.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-D3HcIpVU.js → chunk-JWPE2WC7-DC1wY1Ne.js} +1 -1
- package/dist-embed/chunks/{chunk-JWPE2WC7-Diz0u535.js → chunk-JWPE2WC7-SVeaXwdX.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-TbpwubqF.js → chunk-POPQ4Y6H-BHtANfps.js} +1 -1
- package/dist-embed/chunks/{chunk-POPQ4Y6H-CkAsArUm.js → chunk-POPQ4Y6H-Cl1LQa-a.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-_yTXReWy.js → chunk-SVP7TREG-0GCrhixv.js} +1 -1
- package/dist-embed/chunks/{chunk-SVP7TREG-Cw20-h7G.js → chunk-SVP7TREG-2ZP0qWw_.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-BPo6s9dS.js → chunk-TICWLB2K-BcegNV27.js} +1 -1
- package/dist-embed/chunks/{chunk-TICWLB2K-Df9jMrfB.js → chunk-TICWLB2K-CZYEMhEE.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-CizfVebu.js → chunk-XXDRQBXY-DlOeT6YV.js} +1 -1
- package/dist-embed/chunks/{chunk-XXDRQBXY-CQCJr_te.js → chunk-XXDRQBXY-NxzmpYaR.js} +1 -1
- package/dist-embed/chunks/classDiagram-ZZMXUADV-BXZxncqO.js +1 -0
- package/dist-embed/chunks/classDiagram-ZZMXUADV-DnNeD34Z.js +1 -0
- package/dist-embed/chunks/{classDiagram-f62afe4f-BPLoDclf.js → classDiagram-f62afe4f-BD1_NCwH.js} +1 -1
- package/dist-embed/chunks/{classDiagram-v2-604399ef-ByLL4G6w.js → classDiagram-v2-604399ef-CxmFuhFb.js} +1 -1
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-BXZxncqO.js +1 -0
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-DnNeD34Z.js +1 -0
- package/dist-embed/chunks/{code-block-IT6T5CEO-CZdOZWWc.js → code-block-IT6T5CEO-U73VXKeS.js} +1 -1
- package/dist-embed/chunks/{component-CCqdcSgN.js → component-COjBgUMr.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-D1KcELJ6.js → cose-bilkent-JH36ORCC-71p0f-kJ.js} +1 -1
- package/dist-embed/chunks/{cose-bilkent-JH36ORCC-DI7Z4av-.js → cose-bilkent-JH36ORCC-B-Oq7xUI.js} +1 -1
- package/dist-embed/chunks/{createText-aed3d8b3-qEBV_LAF.js → createText-aed3d8b3-CmAg0yKd.js} +1 -1
- package/dist-embed/chunks/{cs-CZ-2BRQDIVT-D2WZgYFZ.js → cs-CZ-2BRQDIVT-Cm_uiYT0.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-D_YG7HzO.js → cynefinDiagram-5FMLGOSQ-BdKZ7Rf2.js} +1 -1
- package/dist-embed/chunks/{cynefinDiagram-5FMLGOSQ-zmfGD2O2.js → cynefinDiagram-5FMLGOSQ-NbSU35d_.js} +1 -1
- package/dist-embed/chunks/{da-DK-5WZEPLOC-BZhZmwgX.js → da-DK-5WZEPLOC-B0lo6-wZ.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-BcPCMol6.js → dagre-GXQ25YYZ-C2NoVPqt.js} +1 -1
- package/dist-embed/chunks/{dagre-GXQ25YYZ-B-pyqr-3.js → dagre-GXQ25YYZ-Cq55WvUn.js} +1 -1
- package/dist-embed/chunks/{de-DE-XR44H4JA-CltJ8MP6.js → de-DE-XR44H4JA-DZrN-mJo.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-BmnkJuMF.js → diagram-S7CK7UJ4-CF7XYPSL.js} +1 -1
- package/dist-embed/chunks/{diagram-S7CK7UJ4-hhBlnYjW.js → diagram-S7CK7UJ4-Cq78dPrF.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-DPb8MAV_.js → diagram-UQ7AKVKN-BAi-uDI4.js} +1 -1
- package/dist-embed/chunks/{diagram-UQ7AKVKN-BN1Xspl9.js → diagram-UQ7AKVKN-DlMLGIyl.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-TMd-7Wmo.js → diagram-VSXAHHWV-DRNadpAk.js} +1 -1
- package/dist-embed/chunks/{diagram-VSXAHHWV-H5G6hU8P.js → diagram-VSXAHHWV-jJir7z_u.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-BrkFbK0K.js → diagram-VX7I27RA-BR-L0h0N.js} +1 -1
- package/dist-embed/chunks/{diagram-VX7I27RA-DiYNlqCO.js → diagram-VX7I27RA-D_LZ7ttC.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-DdG_O5h6.js → diagram-Z3DM3KII-CDeXGbsG.js} +1 -1
- package/dist-embed/chunks/{diagram-Z3DM3KII-D1vqz5Ew.js → diagram-Z3DM3KII-CwrX0YEI.js} +1 -1
- package/dist-embed/chunks/{document-zcF1SUIy.js → document-B3yvxR3p.js} +1 -1
- package/dist-embed/chunks/{drivecontents-Ckcp2ERS.js → drivecontents-BHpoQXqz.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-PMrBUO9H.js → ebnfDiagram-PWID7BFC-DJ-S4zNP.js} +1 -1
- package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DMXmlTDY.js → ebnfDiagram-PWID7BFC-DktGPWnR.js} +1 -1
- package/dist-embed/chunks/{edges-b2856ca0-zod3pf5J.js → edges-b2856ca0-Dl_I1_Tl.js} +1 -1
- package/dist-embed/chunks/{el-GR-BZB4AONW-C70uQp6T.js → el-GR-BZB4AONW-C4D5ZbOc.js} +1 -1
- package/dist-embed/chunks/{erDiagram-5d81789a-D4Y_ua8V.js → erDiagram-5d81789a-Xh6XZPYE.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-COpQ5gec.js → erDiagram-RLTQ6QDP-CvKed34U.js} +1 -1
- package/dist-embed/chunks/{erDiagram-RLTQ6QDP-CZNZ_893.js → erDiagram-RLTQ6QDP-Dn5o1zp3.js} +1 -1
- package/dist-embed/chunks/{es-ES-U4NZUMDT-Bsjo8e08.js → es-ES-U4NZUMDT-D1yiS-ZI.js} +1 -1
- package/dist-embed/chunks/{eu-ES-A7QVB2H4-SVPEle78.js → eu-ES-A7QVB2H4-Zm3lJsL6.js} +1 -1
- package/dist-embed/chunks/{fa-IR-HGAKTJCU-CpgfdtSo.js → fa-IR-HGAKTJCU-Dhv2lg_O.js} +1 -1
- package/dist-embed/chunks/{fi-FI-Z5N7JZ37-0AIruYqI.js → fi-FI-Z5N7JZ37-QeFFEfyg.js} +1 -1
- package/dist-embed/chunks/{flowDb-185abca5-8a6sWoVq.js → flowDb-185abca5-DCi2LSG3.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-1629c991-CCbNUYZl.js → flowDiagram-1629c991-1AzvuCps.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-lJ2Z3vFv.js → flowDiagram-HODETNUW-BjiuBN9U.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-HODETNUW-CMUxuQ7T.js → flowDiagram-HODETNUW-BoOyNxJY.js} +1 -1
- package/dist-embed/chunks/{flowDiagram-v2-1d953310-CEF2SgZr.js → flowDiagram-v2-1d953310-DNyM8Btq.js} +1 -1
- package/dist-embed/chunks/{flowchart-elk-definition-6df44142-RHeVm2Vk.js → flowchart-elk-definition-6df44142-DucxAUTE.js} +1 -1
- package/dist-embed/chunks/{fr-FR-RHASNOE6-Pv7-mObZ.js → fr-FR-RHASNOE6-DjbRpOS6.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-3b0b3873-wEiuIWcM.js → ganttDiagram-3b0b3873-DLJCN1HW.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-BYMiax7v.js → ganttDiagram-EL5Y4UJY-D3bfGcnP.js} +1 -1
- package/dist-embed/chunks/{ganttDiagram-EL5Y4UJY-B5WlwMpk.js → ganttDiagram-EL5Y4UJY-us782PXd.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-DYJQ-SIg.js → gitGraphDiagram-WWUBYQGX-BCKtisB_.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-WWUBYQGX-D8fVmtc9.js → gitGraphDiagram-WWUBYQGX-DpOwi5a_.js} +1 -1
- package/dist-embed/chunks/{gitGraphDiagram-f01e8bc2-DxDYtdab.js → gitGraphDiagram-f01e8bc2-B5VZrDor.js} +1 -1
- package/dist-embed/chunks/{gl-ES-HMX3MZ6V-CvVsi7_e.js → gl-ES-HMX3MZ6V-C-ev9dqC.js} +1 -1
- package/dist-embed/chunks/{hcl-BZsx9glM.js → hcl-hwLh11hJ.js} +1 -1
- package/dist-embed/chunks/{he-IL-6SHJWFNN-DR-LBFsb.js → he-IL-6SHJWFNN-DHoNpuA6.js} +1 -1
- package/dist-embed/chunks/{hi-IN-IWLTKZ5I-C-7x_jFk.js → hi-IN-IWLTKZ5I-JZJZPoWj.js} +1 -1
- package/dist-embed/chunks/{hu-HU-A5ZG7DT2-IRN8uyau.js → hu-HU-A5ZG7DT2-RzCikyBW.js} +1 -1
- package/dist-embed/chunks/{id-ID-SAP4L64H-B4acvKcJ.js → id-ID-SAP4L64H-Bn08nS9B.js} +1 -1
- package/dist-embed/chunks/{index-CzyPyDL7.js → index-1Ekpl0uC.js} +1 -1
- package/dist-embed/chunks/{index-9bae90f3-Byqvc_1J.js → index-9bae90f3-CqVDusDd.js} +1 -1
- package/dist-embed/chunks/{index-O05b1yOc.js → index-B1Egld01.js} +1 -1
- package/dist-embed/chunks/{index-CkcSokt2.js → index-B2dtLxcg.js} +1 -1
- package/dist-embed/chunks/{index-DrTOPxp7.js → index-B5MiaXUV.js} +1 -1
- package/dist-embed/chunks/{index-CML3IxdI.js → index-BOvsLtXe.js} +1 -1
- package/dist-embed/chunks/{index-C8PIFg_G.js → index-BUbwVG__.js} +4 -4
- package/dist-embed/chunks/{index-4cAPvEvs.js → index-BVAnvfbh.js} +1 -1
- package/dist-embed/chunks/{index-CBqbd-wN.js → index-BYofH50G.js} +1 -1
- package/dist-embed/chunks/{index-BvCNoy7C.js → index-Ba-Kv3yV.js} +1 -1
- package/dist-embed/chunks/{index-CFLgmNxm.js → index-BbsUSk_Q.js} +5 -5
- package/dist-embed/chunks/{index-DSqW3D0Y.js → index-Bs1pVq7E.js} +1 -1
- package/dist-embed/chunks/{index-CkHVrFkx.js → index-BtjXlYA2.js} +1 -1
- package/dist-embed/chunks/{index-qS3zZ9pt.js → index-C0iUgNwj.js} +2 -2
- package/dist-embed/chunks/{index-BNamX66v.js → index-C5xKtdLU.js} +13 -13
- package/dist-embed/chunks/{index-B3E7bXYK.js → index-CGscJbrF.js} +1 -1
- package/dist-embed/chunks/{index-CGSmsddM.js → index-Cjx6uk6z.js} +1 -1
- package/dist-embed/chunks/{index-DPibz6KG.js → index-CqKV027P.js} +1 -1
- package/dist-embed/chunks/{index-Dm4AUkEh.js → index-Cqur_rhw.js} +4 -4
- package/dist-embed/chunks/{index-CNx_s591.js → index-D7rnWGLu.js} +2 -2
- package/dist-embed/chunks/{index-qoRa7lfq.js → index-DCX_IqLg.js} +1 -1
- package/dist-embed/chunks/{index-BY3dr_Yb.js → index-DHVYKZ44.js} +6 -6
- package/dist-embed/chunks/{index-Begrz6qi.js → index-DIHzcHI1.js} +1 -1
- package/dist-embed/chunks/{index-NHZX5LFG.js → index-DJomc4za.js} +2 -2
- package/dist-embed/chunks/{index-DecCuztE.js → index-DLk6Znxv.js} +1 -1
- package/dist-embed/chunks/{index-BnowXurk.js → index-DYt0uAs-.js} +1 -1
- package/dist-embed/chunks/{index-kuItYEfY.js → index-DeYQGrTz.js} +8 -8
- package/dist-embed/chunks/{index-CDSBIJbt.js → index-DgnVcOqG.js} +1 -1
- package/dist-embed/chunks/{index-REv48H9T.js → index-DkY_OIbM.js} +1 -1
- package/dist-embed/chunks/{index-CaurkNaJ.js → index-DsX9nIHt.js} +1 -1
- package/dist-embed/chunks/{index-DKPjJ48t.js → index-DtYYe0Cw.js} +5 -5
- package/dist-embed/chunks/{index-CwFAduNg.js → index-aX9x7qni.js} +1 -1
- package/dist-embed/chunks/{index-74YA-L1Q.js → index-hib7vWC6.js} +1 -1
- package/dist-embed/chunks/{index-DYk4SAGn.js → index-p2ZGnxJX.js} +1 -1
- package/dist-embed/chunks/{index-CxSZtb0e.js → index-qzUKNibz.js} +1 -1
- package/dist-embed/chunks/{index-5Jo-nwZH.js → index-zr-b1Ds3.js} +1 -1
- package/dist-embed/chunks/{index.esm-DOzsYAbC.js → index.esm-CJLAKtMR.js} +1 -1
- package/dist-embed/chunks/{index.esm-BpcXmnkv.js → index.esm-DlPZAW-m.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-CV8wJO56.js → infoDiagram-27XIBGKW-CB1VZqVi.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-27XIBGKW-DNSrv0V4.js → infoDiagram-27XIBGKW-s9Lynuxa.js} +1 -1
- package/dist-embed/chunks/{infoDiagram-a29d40f1-E8D341jS.js → infoDiagram-a29d40f1-BSyalhIZ.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-BRfv59pP.js → ishikawaDiagram-5VMMS53U-BnyB2Q-F.js} +1 -1
- package/dist-embed/chunks/{ishikawaDiagram-5VMMS53U-DmZ-PvsF.js → ishikawaDiagram-5VMMS53U-D-b9zU7V.js} +1 -1
- package/dist-embed/chunks/{it-IT-JPQ66NNP-qA6LaRji.js → it-IT-JPQ66NNP-C2vJMuKM.js} +1 -1
- package/dist-embed/chunks/{ja-JP-DBVTYXUO-CHmLHAsr.js → ja-JP-DBVTYXUO-C8KOKQt9.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-3jE8sGmW.js → journeyDiagram-3NMN7TZE-CZXsMFjb.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-3NMN7TZE-itNV2GBs.js → journeyDiagram-3NMN7TZE-Cv3HlmqD.js} +1 -1
- package/dist-embed/chunks/{journeyDiagram-95396277-Ba7ZL7z3.js → journeyDiagram-95396277-DnkmTBAP.js} +1 -1
- package/dist-embed/chunks/{kaa-6HZHGXH3-CLJsweAJ.js → kaa-6HZHGXH3-CvxJbmMB.js} +1 -1
- package/dist-embed/chunks/{kab-KAB-ZGHBKWFO-C5IJJXMt.js → kab-KAB-ZGHBKWFO-CQJhf9Nn.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DraK1j1A.js → kanban-definition-UXKFOSKX-CZ0olp9z.js} +1 -1
- package/dist-embed/chunks/{kanban-definition-UXKFOSKX-DLigKnGA.js → kanban-definition-UXKFOSKX-LX8xxzUZ.js} +1 -1
- package/dist-embed/chunks/{kk-KZ-P5N5QNE5-CCaxEdfw.js → kk-KZ-P5N5QNE5-Dl6YC0GH.js} +1 -1
- package/dist-embed/chunks/{km-KH-HSX4SM5Z-My_ugj4j.js → km-KH-HSX4SM5Z-QYB-tJ4i.js} +1 -1
- package/dist-embed/chunks/{ko-KR-MTYHY66A-CHP-oWuX.js → ko-KR-MTYHY66A-D6yzBqJ5.js} +1 -1
- package/dist-embed/chunks/{ku-TR-6OUDTVRD-C52g9k3M.js → ku-TR-6OUDTVRD-C43l2362.js} +1 -1
- package/dist-embed/chunks/{layout-Dj1wRfbG.js → layout-DC1dN5QV.js} +1 -1
- package/dist-embed/chunks/{layout-DNotAWCv.js → layout-DfHqq7Y7.js} +1 -1
- package/dist-embed/chunks/{lexicalHooks-kxLGr2aO.js → lexicalHooks-PS_v7JyS.js} +1 -1
- package/dist-embed/chunks/{line-DuKLYeqR.js → line-BLnKxlFS.js} +1 -1
- package/dist-embed/chunks/{linear-Dg-Vn5Yx.js → linear-bDTv5gmU.js} +1 -1
- package/dist-embed/chunks/{lt-LT-XHIRWOB4-DcGTTOch.js → lt-LT-XHIRWOB4-BG1v5NwF.js} +1 -1
- package/dist-embed/chunks/{lv-LV-5QDEKY6T-Duj8GAiu.js → lv-LV-5QDEKY6T-CAwm1y_0.js} +1 -1
- package/dist-embed/chunks/{mermaid.core-C0gANONu.js → mermaid.core-BS7AlRW2.js} +3 -3
- package/dist-embed/chunks/{mermaid.core-BjUO4_Ly.js → mermaid.core-CLv-vCjs.js} +5 -5
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-x4oa4R6v.js → mindmap-definition-YA3MSWOX-BUr4hM7e.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-YA3MSWOX-qCMgaWWi.js → mindmap-definition-YA3MSWOX-CwwLX5oJ.js} +1 -1
- package/dist-embed/chunks/{mindmap-definition-e4c1d938-Dy5nnqlt.js → mindmap-definition-e4c1d938-B4xy2oKe.js} +1 -1
- package/dist-embed/chunks/{model-D8diDS02.js → model-D7a10Ag0.js} +1 -1
- package/dist-embed/chunks/{mr-IN-CRQNXWMA-Cm1jPr2r.js → mr-IN-CRQNXWMA-DSk6q1fp.js} +1 -1
- package/dist-embed/chunks/{my-MM-5M5IBNSE-CfTzX-Wc.js → my-MM-5M5IBNSE-BRiKXulk.js} +1 -1
- package/dist-embed/chunks/{nb-NO-T6EIAALU-DdPxuBWB.js → nb-NO-T6EIAALU-CCDnctVd.js} +1 -1
- package/dist-embed/chunks/{nl-NL-IS3SIHDZ-eOHjxC9z.js → nl-NL-IS3SIHDZ-DwStD_Ch.js} +1 -1
- package/dist-embed/chunks/{nn-NO-6E72VCQL-DjAv0k1C.js → nn-NO-6E72VCQL-DNcfjETk.js} +1 -1
- package/dist-embed/chunks/{oc-FR-POXYY2M6-C0T2Uif7.js → oc-FR-POXYY2M6-BOjjS12P.js} +1 -1
- package/dist-embed/chunks/{pa-IN-N4M65BXN-BpX0p08b.js → pa-IN-N4M65BXN-B4y5cv2_.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-5jUoEdYP.js → pegDiagram-XKGWAZYB-CVtSqLfc.js} +1 -1
- package/dist-embed/chunks/{pegDiagram-XKGWAZYB-Smos5ynL.js → pegDiagram-XKGWAZYB-pdjxeh5M.js} +1 -1
- package/dist-embed/chunks/{percentages-BXMCSKIN-CmsGG1KO.js → percentages-BXMCSKIN-BpahO1D1.js} +6 -6
- package/dist-embed/chunks/{pica-DvcVbjys.js → pica-CyDhZ1sv.js} +1 -1
- package/dist-embed/chunks/{pie-CrFPIYc9.js → pie-CktNGOxo.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-D0vDTcE9.js → pieDiagram-E7YTZNPT-D2I7Fwff.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-E7YTZNPT-COPe6fPR.js → pieDiagram-E7YTZNPT-JUXSTYxs.js} +1 -1
- package/dist-embed/chunks/{pieDiagram-c941bede-65qxkgxB.js → pieDiagram-c941bede-DWhYbfLm.js} +1 -1
- package/dist-embed/chunks/{pl-PL-T2D74RX3-ZCXWl-vX.js → pl-PL-T2D74RX3-CfuLoYHB.js} +1 -1
- package/dist-embed/chunks/{plugin-Ba5UScsV.js → plugin-DZPXm2dP.js} +1 -1
- package/dist-embed/chunks/{pt-BR-5N22H2LF-ClSeRSTv.js → pt-BR-5N22H2LF-Fk60PfdA.js} +1 -1
- package/dist-embed/chunks/{pt-PT-UZXXM6DQ-aI3iyXEY.js → pt-PT-UZXXM6DQ-SNAgJ5Vr.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-BoEDNaHO.js → quadrantDiagram-AXDQQJYC-Cw8ysOVS.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-AXDQQJYC-DvWSIFQv.js → quadrantDiagram-AXDQQJYC-zTpXZRnN.js} +1 -1
- package/dist-embed/chunks/{quadrantDiagram-cf8b8fe0-DiapetF0.js → quadrantDiagram-cf8b8fe0-DH_dNEld.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-LnW8lyjW.js → railroadDiagram-O6MQD6OU-CoMzy1dm.js} +1 -1
- package/dist-embed/chunks/{railroadDiagram-O6MQD6OU-XyeFPUFA.js → railroadDiagram-O6MQD6OU-DrPiQVOZ.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-53bda41b-NVu0cGYm.js → requirementDiagram-53bda41b-C7A0I5GT.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-wRDyhjvw.js → requirementDiagram-BXWQKSXE-B9trBsts.js} +1 -1
- package/dist-embed/chunks/{requirementDiagram-BXWQKSXE-CtpxXHY5.js → requirementDiagram-BXWQKSXE-BLQtV6jv.js} +1 -1
- package/dist-embed/chunks/{ro-RO-JPDTUUEW--yP8WH1q.js → ro-RO-JPDTUUEW-YkxpKkWn.js} +1 -1
- package/dist-embed/chunks/{round-BYqUt1IP.js → round-DymJ-a3G.js} +1 -1
- package/dist-embed/chunks/{ru-RU-B4JR7IUQ-S6Dpc8ej.js → ru-RU-B4JR7IUQ-CaI1rtvc.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CWsU1zz9.js → sankeyDiagram-P5KCCOFB-Cvxdoq6D.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-P5KCCOFB-CkYpEh5o.js → sankeyDiagram-P5KCCOFB-Dwkp-ggM.js} +1 -1
- package/dist-embed/chunks/{sankeyDiagram-c3ef121a-D9xzSD-8.js → sankeyDiagram-c3ef121a-DeaFXwir.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-82a5b84f-DDCEPqNh.js → sequenceDiagram-82a5b84f-fDhOBU7A.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-CafPjz3k.js → sequenceDiagram-WJ2MYXX4-Bj9ikwM4.js} +1 -1
- package/dist-embed/chunks/{sequenceDiagram-WJ2MYXX4-D-ytwLdK.js → sequenceDiagram-WJ2MYXX4-Bp1oVZMs.js} +1 -1
- package/dist-embed/chunks/{sessions-BeSpcqDy.js → sessions-ZDYLkdi_.js} +2 -2
- package/dist-embed/chunks/{si-LK-N5RQ5JYF-Bh0-Jjfq.js → si-LK-N5RQ5JYF-CQz29xmh.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-FMWRuKPu.js → sizeCapture-INFHLROL-CMlzK5MC.js} +1 -1
- package/dist-embed/chunks/{sizeCapture-INFHLROL-5RviLAUl.js → sizeCapture-INFHLROL-ohpYHAcp.js} +1 -1
- package/dist-embed/chunks/{sk-SK-C5VTKIMK-TXk80Xbq.js → sk-SK-C5VTKIMK-CZg7PVzd.js} +1 -1
- package/dist-embed/chunks/{sl-SI-NN7IZMDC-DSdu_b8Y.js → sl-SI-NN7IZMDC-D-EjMWyZ.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-43e79a5f-Bd0gJvTB.js → stateDiagram-43e79a5f-BFR_IH5W.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-CsoLoQdw.js → stateDiagram-D77RDMKH-DpOxo9yl.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-D77RDMKH-anfAB1CI.js → stateDiagram-D77RDMKH-zWegA-O8.js} +1 -1
- package/dist-embed/chunks/{stateDiagram-v2-2041ed4f-Db6Ltf2q.js → stateDiagram-v2-2041ed4f-8TkUHVMG.js} +1 -1
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-BZAMPWr5.js +1 -0
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-DrTAroDB.js +1 -0
- package/dist-embed/chunks/{styles-455b33cd-DjZhq6rj.js → styles-455b33cd-Befvug13.js} +1 -1
- package/dist-embed/chunks/{styles-f932cba9-s39yhAcA.js → styles-f932cba9-eBHnVQaE.js} +1 -1
- package/dist-embed/chunks/{styles-fcc2142b-QdZsB9tg.js → styles-fcc2142b-BsjaKqGS.js} +1 -1
- package/dist-embed/chunks/{subset-shared.chunk-B1SUTh3f.js → subset-shared.chunk-BIvvzzX2.js} +1 -1
- package/dist-embed/chunks/{subset-worker.chunk-B24w3nw0.js → subset-worker.chunk-DGgI6iRY.js} +1 -1
- package/dist-embed/chunks/{sv-SE-XGPEYMSR-CT10IJuV.js → sv-SE-XGPEYMSR-D8CsNMON.js} +1 -1
- package/dist-embed/chunks/{svgDrawCommon-148a3cd9-B38JgGfg.js → svgDrawCommon-148a3cd9-BxzL4r3S.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-CPp_dpjU.js → swimlanes-42K2YHIH-B28jcYJ_.js} +1 -1
- package/dist-embed/chunks/{swimlanes-42K2YHIH-DHlC5c8j.js → swimlanes-42K2YHIH-BZP55aw9.js} +1 -1
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-BIQqrjYQ.js +8 -0
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-hQM0t42-.js +8 -0
- package/dist-embed/chunks/{ta-IN-2NMHFXQM-HSbClJ74.js → ta-IN-2NMHFXQM-CvuxKO7t.js} +1 -1
- package/dist-embed/chunks/{th-TH-HPSO5L25-B2hciv_c.js → th-TH-HPSO5L25-NgQJigwq.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-CKyPT4PB.js → timeline-definition-24CTP7MA-CficHg2r.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-24CTP7MA-D9gzYUYy.js → timeline-definition-24CTP7MA-De_e-NOu.js} +1 -1
- package/dist-embed/chunks/{timeline-definition-7545f45a-BWnp7J60.js → timeline-definition-7545f45a-DqfcISSR.js} +1 -1
- package/dist-embed/chunks/{tokens-C8cD27Uo.js → tokens-B5KQP74f.js} +1 -1
- package/dist-embed/chunks/{tr-TR-DEFEU3FU-BWwXpAYZ.js → tr-TR-DEFEU3FU-eu9-qLmi.js} +1 -1
- package/dist-embed/chunks/{uk-UA-QMV73CPH-Dj7E5VqN.js → uk-UA-QMV73CPH-CbjmuLVL.js} +1 -1
- package/dist-embed/chunks/{venn.esm-DCEZyyO1.js → venn.esm-QMuJZ7sT.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-bbhu-7hk.js → vennDiagram-4TSXK5OY-DIL1dW8w.js} +1 -1
- package/dist-embed/chunks/{vennDiagram-4TSXK5OY-F_ETYUiw.js → vennDiagram-4TSXK5OY-DmLAzLnR.js} +1 -1
- package/dist-embed/chunks/{vi-VN-M7AON7JQ-PsrEnccg.js → vi-VN-M7AON7JQ-u84yOuJ-.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-DOvpFGv3.js → wardleyDiagram-VM6X3IG4-Cb_52SC-.js} +1 -1
- package/dist-embed/chunks/{wardleyDiagram-VM6X3IG4-3pZGhbDZ.js → wardleyDiagram-VM6X3IG4-DfZqkrsZ.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-3f383b91-DZLtCOMM.js → xychartDiagram-3f383b91-DGvBSaRz.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-CFYS5J-K.js → xychartDiagram-S5SC5T6Z-6OM1k4o6.js} +1 -1
- package/dist-embed/chunks/{xychartDiagram-S5SC5T6Z-DSYuijxd.js → xychartDiagram-S5SC5T6Z-xYHAmg9u.js} +1 -1
- package/dist-embed/chunks/{zh-CN-LNUGB5OW-BaQu8uAz.js → zh-CN-LNUGB5OW-ojkSgl-t.js} +1 -1
- package/dist-embed/chunks/{zh-HK-E62DVLB3-BidFwl7n.js → zh-HK-E62DVLB3-C6M89-Da.js} +1 -1
- package/dist-embed/chunks/{zh-TW-RAJ6MFWO-Bm6PhMc5.js → zh-TW-RAJ6MFWO-BaTtFORh.js} +1 -1
- package/dist-embed/datalayer-app-main.js +19 -19
- package/lib/apps/apps/AppRenderer.d.ts +12 -0
- package/lib/apps/apps/AppRenderer.js +38 -5
- package/lib/apps/apps/visitorToken.d.ts +29 -0
- package/lib/apps/apps/visitorToken.js +57 -0
- package/lib/apps/plugins/agents/DatalayerAgentBridge.js +71 -2
- package/lib/apps/plugins/agents/switchable.js +3 -2
- package/lib/apps/plugins/chat/ChatView.js +11 -1
- package/package.json +1 -1
- package/scripts/record-scene-checks.py +80 -20
- package/dist-embed/chunks/Avatar-VyZWLCFE.js +0 -1
- package/dist-embed/chunks/ChatView-Bqiq0mvd.js +0 -288
- package/dist-embed/chunks/DatalayerAgentBridge-BhxfUyb7.js +0 -1
- package/dist-embed/chunks/channel-gqCIn1TE.js +0 -1
- package/dist-embed/chunks/classDiagram-ZZMXUADV-BmkR_bZ0.js +0 -1
- package/dist-embed/chunks/classDiagram-ZZMXUADV-Db5VIrmE.js +0 -1
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-BmkR_bZ0.js +0 -1
- package/dist-embed/chunks/classDiagram-v2-VYDZK3BY-Db5VIrmE.js +0 -1
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-CHSJtozR.js +0 -1
- package/dist-embed/chunks/stateDiagram-v2-MP3YSRHH-Grhw6_l4.js +0 -1
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-DA8nqWDf.js +0 -8
- package/dist-embed/chunks/swimlanesDiagram-VR7AAH4N-PPX_kI6A.js +0 -8
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{p as re}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as re}from"./chunk-JWPE2WC7-SVeaXwdX.js";import{p as oe,o as se,s as de,g as le,a as ce,b as me,_ as o,l as g,c as T,z as ue,q as xe,A as fe,y as M,B as ge,i as y,w as P,a7 as he}from"./mermaid.core-CLv-vCjs.js";import{p as pe,i as be}from"./cynefin-OW5HDTMX-BVK0_S--.js";import{s as ve}from"./index-BtjXlYA2.js";import"../datalayer-app-main.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-BLnKxlFS.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./index-p2ZGnxJX.js";var $="position frame",D="frame positioned",S="position relation",N="relation positioned",we=o(function(e){g.debug("options str",e)},"setOptions"),ye=o(function(){return{}},"getOptions"),Pe=o(function(){C(),xe()},"clear");function C(){B={}}o(C,"reset");var Se=ge.eventmodeling,ke=o(()=>fe({...Se,...M().eventmodeling}),"getConfig"),B={};function O(){let e=Fe;const{ast:n}=B,t=E();if(!n)throw new Error("No data for EventModel");return n.frames.forEach((i,a)=>{const r=G(i,n.dataEntities,t);e=v(e,{$kind:$,index:a,frame:i,textProps:r});let d;K(i)?(g.debug("source frame",i.sourceFrames),d=n.frames.filter(l=>i.sourceFrames.some(c=>c.$refText===l.name)),d.forEach(l=>{e=v(e,{$kind:S,index:a,frame:i,sourceFrame:l})})):e=v(e,{$kind:S,index:a,frame:i})}),e={...e,sortedSwimlanesArray:A(e.swimlanes)},e}o(O,"getState");function I(e){B.ast=e}o(I,"setAst");var s={swimlaneMinHeight:70,swimlanePadding:15,swimlaneGap:10,boxPadding:10,boxOverlap:90,boxDefaultY:0,boxMinWidth:80,boxMaxWidth:450,boxMinHeight:80,boxMaxHeight:750,contentStartX:250,textMaxWidth:430,boxTextFontWeight:"bold",boxTextPadding:10,swimlaneTextFontWeight:"bold",labelUiAutomation:"UI/Automation",labelUiAutomationPrefix:"UI/A: ",labelCommandReadModel:"Command/Read Model",labelCommandReadModelPrefix:"C/RM: ",labelEvents:"Events",labelEventsPrefix:"Stream: "};function E(){return s}o(E,"getDiagramProps");var Fe={boxes:[],swimlanes:{},relations:[],maxR:0,sortedSwimlanesArray:[]};function W(e){const n=e.split(".");if(n.length===2)return n[0]}o(W,"extractNamespace");function H(e){const n=e.split(".");return n.length===2?n[1]:e}o(H,"extractName");function U(e,n){if(!(!n||n.length===0))return Object.values(e).find(t=>t.namespace===n)}o(U,"findSwimlaneByNamespace");function b(e,n,t){return Math.max(n,...Object.keys(e).filter(i=>{const a=Number.parseInt(i);return a>n&&a<t}).map(i=>Number.parseInt(i)))+1}o(b,"findNextAvailableIndex");function _(e,n){const t=W(e.entityIdentifier),i=U(n,t);switch(e.modelEntityType){case"ui":case"pcr":case"processor":return i?{index:i.index,label:i.namespace||s.labelUiAutomation}:t?{index:b(n,0,100),label:s.labelUiAutomationPrefix+t}:{index:0,label:s.labelUiAutomation};case"rmo":case"readmodel":case"cmd":case"command":return i?{index:i.index,label:i.namespace||s.labelCommandReadModel}:t?{index:b(n,100,200),label:s.labelCommandReadModelPrefix+t}:{index:100,label:s.labelCommandReadModel};default:return i?{index:i.index,label:i.namespace||s.labelEvents}:t?{index:b(n,200,300),label:s.labelEventsPrefix+t}:{index:200,label:s.labelEvents}}}o(_,"calculateSwimlaneProps");function L(e){const{themeVariables:n}=M();switch(e.modelEntityType){case"ui":return{fill:n.emUiFill??"white",stroke:n.emUiStroke??"#dbdada"};case"pcr":case"processor":return{fill:n.emProcessorFill??"#edb3f6",stroke:n.emProcessorStroke??"#b88cbf"};case"rmo":case"readmodel":return{fill:n.emReadModelFill??"#d3f1a2",stroke:n.emReadModelStroke??"#a3b732"};case"cmd":case"command":return{fill:n.emCommandFill??"#bcd6fe",stroke:n.emCommandStroke??"#679ac3"};case"evt":case"event":return{fill:n.emEventFill??"#ffb778",stroke:n.emEventStroke??"#c19a0f"};default:return{fill:"red",stroke:"black"}}}o(L,"calculateEntityVisualProps");function G(e,n,t){const i=M(),a=y(H(e.entityIdentifier)??"",i);let r;const d={fontSize:16,fontWeight:700,fontFamily:'"trebuchet ms", verdana, arial, sans-serif',joinWith:"<br/>"};let c=`<b>${P(a,t.textMaxWidth,d)}</b>`;if(e.dataInlineValue&&(r=e.dataInlineValue,r=r.substring(r.indexOf("{")+1),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," ")),e.dataReference){const p=n.find(w=>w.name===e.dataReference?.$refText);p&&(r=p.dataBlockValue,r=r.substring(r.indexOf(`{
|
|
2
2
|
`)+2),r=r.substring(0,r.lastIndexOf("}")-1),r=y(r,i),r=P(r,t.textMaxWidth,d),r=r.replaceAll(" "," "),r+="<br/>")}const m=r!==void 0;m&&(c+=`<br/><br/><code style="text-align: left; display: block;max-width:${t.textMaxWidth}px">${r}</code>`);const x={fontSize:d.fontSize,fontWeight:d.fontWeight,fontFamily:d.fontFamily},u=he(c,x),h=m?u.width/3:u.width,f={content:c,width:h,height:u.height};return g.debug(`[${e.name}] ${e.entityIdentifier} text`,f),f}o(G,"calculateTextProps");function V(e,n){const t=n,i=L(t.frame),a={width:t.textProps.width+2*s.boxTextPadding,height:t.textProps.height+2*s.boxTextPadding};return[{$kind:D,frame:t.frame,index:t.index,visual:i,dimension:a,textProps:t.textProps}]}o(V,"decidePositionFrame");function X(e,n,t){return n===void 0?s.contentStartX:n.index===e.index&&e.r?e.r+s.boxPadding:t===void 0?s.contentStartX:t.r-s.boxOverlap+s.boxPadding}o(X,"calculateX");function j(e,n){const t=[...e.map(i=>i.r),n];return Math.max(...t)}o(j,"calculateMaxRight");function A(e){return Object.values(e).sort((n,t)=>n.index-t.index)}o(A,"sortedSwimlanesArray");function Y(e,n){const t=n,i=_(t.frame,e.swimlanes);let a;i.index in e.swimlanes?a=e.swimlanes[i.index]:a={index:i.index,label:i.label,r:0,y:i.index*s.swimlaneMinHeight+s.swimlaneGap,height:s.swimlaneMinHeight,maxHeight:s.swimlaneMinHeight};const r=e.boxes.length>0?e.boxes[e.boxes.length-1]:void 0,d=e.previousSwimlaneNumber!==void 0?e.swimlanes[e.previousSwimlaneNumber]:void 0,l={width:Math.max(s.boxMinWidth,Math.min(s.boxMaxWidth,t.dimension.width))+2*s.boxPadding,height:Math.max(s.boxMinHeight,Math.min(s.boxMaxHeight,t.dimension.height))+2*s.boxPadding},c=X(a,d,r),m=c+l.width+s.boxPadding,x=j(Object.values(e.swimlanes),m);a.r=c+l.width,a.maxHeight=Math.max(a.maxHeight,l.height),a.height=Math.max(s.swimlaneMinHeight,a.maxHeight)+2*s.swimlanePadding;const u={x:c,y:s.swimlanePadding+a.y,r:m,dimension:l,leftSibling:!1,swimlane:a,visual:t.visual,text:t.textProps.content,frame:t.frame,index:t.index},h={...e,boxes:[...e.boxes,u],swimlanes:{...e.swimlanes,[`${a.index}`]:a},previousSwimlaneNumber:i.index,previousFrame:t.frame,maxR:x},f=A(h.swimlanes);f.length>0&&(f[0].y=0);for(let p=1;p<f.length;p++){const w=f[p],R=f[p-1];w.y=R.y+R.height+s.swimlaneGap}return h}o(Y,"evolveFramePositioned");function z(e,n){return e===0&&n.sourceFrames.length===0}o(z,"isFirstFrame");function K(e){return e.sourceFrames!==void 0&&e.sourceFrames!==null&&e.sourceFrames.length>0}o(K,"hasSourceFrame");function k(e,n){if(n!=null)return e.find(t=>t.frame.name===n.name)}o(k,"findBoxByFrame");function q(e,n,t){if(!(t<0))for(let i=t;i>=0;i--){const a=e[i];if(a.swimlane.index!==n)return a}}o(q,"findBoxByLineIndex");function J(e,n){const t=n;if(be(t.frame)||z(t.index,t.frame))return[];const i=k(e.boxes,t.frame);if(i===void 0)throw new Error(`Target box not found for frame ${t.frame.name}`);let a;return t.sourceFrame?a=k(e.boxes,t.sourceFrame):a=q(e.boxes,i.swimlane.index,t.index-1),a===void 0?[]:[{$kind:N,frame:t.frame,index:t.index,sourceBox:a,targetBox:i}]}o(J,"decidePositionRelation");function Q(e,n){const t=n,i={visual:{fill:"none",stroke:"#000"},source:{x:t.sourceBox.x,y:t.sourceBox.y},target:{x:t.targetBox.x,y:t.targetBox.y},sourceBox:t.sourceBox,targetBox:t.targetBox};return{...e,relations:[...e.relations,i]}}o(Q,"evolveRelationPositioned");var Me={[$]:V,[S]:J},Be={[D]:Y,[N]:Q};function Z(e,n){const t=Me[n.$kind];if(t==null)return[];const i=t(e,n);return g.debug("decided events",i),i}o(Z,"decide");function ee(e,n){const t=n.reduce((i,a)=>{const r=Be[a.$kind];return r==null?i:r(i,a)},e);return g.debug("evolve events",{state:e,newState:t,events:n}),t}o(ee,"evolve");function v(e,n){const t=Z(e,n);return ee(e,t)}o(v,"dispatch");var F={getConfig:ke,setOptions:we,getOptions:ye,clear:Pe,setAccTitle:me,getAccTitle:ce,getAccDescription:le,setAccDescription:de,setDiagramTitle:se,getDiagramTitle:oe,setAst:I,getDiagramProps:E,getState:O},Ee={parse:o(async e=>{const n=await pe("eventmodeling",e);g.debug(n),F.setAst(n),re(n,F)},"parse")},Ae=T(),Re=Ae?.eventmodeling;function te(e,n){return t=>{const i=t.swimlane.y+n.swimlanePadding,a=e.append("g").attr("class","em-box");a.append("rect").attr("x",t.x).attr("y",i).attr("rx","3").attr("width",t.dimension.width).attr("height",t.dimension.height).attr("stroke",t.visual.stroke).attr("fill",t.visual.fill),a.append("foreignObject").attr("x",t.x+n.boxPadding).attr("y",i+10).attr("width",t.dimension.width-2*n.boxPadding).attr("height",t.dimension.height-2*n.boxPadding).append("xhtml:div").style("display","table").style("height","100%").style("width","100%").append("span").style("display","table-cell").style("text-align","center").style("vertical-align","middle").html(t.text)}}o(te,"renderD3Box");function ne(e,n){return e>n}o(ne,"dirUpwards");function ie(e,n,t,i){return a=>{const r=a.sourceBox.swimlane.y+n.swimlanePadding,d=a.targetBox.swimlane.y+n.swimlanePadding,l=ne(r,d),c=a.sourceBox.x+a.sourceBox.dimension.width*2/3,m=a.targetBox.x+a.targetBox.dimension.width/3;let x,u;g.debug(`rendering relation up=${l} for `,{sourceBox:a.sourceBox,targetBox:a.targetBox}),l?(x=r,u=d+a.targetBox.dimension.height):(x=r+a.sourceBox.dimension.height,u=d);const h=i.emRelationStroke??a.visual.stroke;e.append("path").attr("class","em-relation").attr("fill",a.visual.fill).attr("stroke",h).attr("stroke-width","1").attr("marker-end",`url(#${t})`).attr("d",`M${c} ${x} L${m} ${u}`)}}o(ie,"renderD3Relation");function ae(e,n,t,i){return a=>{const r=e.append("g").attr("class","em-swimlane"),d=i.emSwimlaneBackgroundOdd??"rgb(250,250,250)",l=i.emSwimlaneBackgroundStroke??"rgb(240,240,240)";r.append("rect").attr("x",0).attr("y",a.y).attr("rx","3").attr("width",n+t.swimlanePadding).attr("height",a.height).attr("fill",d).attr("stroke",l),r.append("text").attr("font-weight",t.swimlaneTextFontWeight).attr("x",30).attr("y",a.y+30).text(a.label)}}o(ae,"renderD3Swimlane");var Te=o(function(e,n,t,i){if(g.debug("in eventmodeling renderer",e+`
|
|
3
3
|
`,"id:",n,t),!Re)throw new Error("EventModeling config not found");const a=i.db,{themeVariables:r,eventmodeling:d}=T(),l=ve(`[id="${n}"]`),c=a.getDiagramProps(),m=a.getState(),x=`em-arrowhead-${n}`,u=r.emArrowhead??"#000000";m.sortedSwimlanesArray.forEach(ae(l,m.maxR,c,r)),m.boxes.forEach(te(l,c)),m.relations.forEach(ie(l,c,x,r)),l.append("defs").append("marker").attr("id",x).attr("markerWidth","10").attr("markerHeight","7").attr("refX","10").attr("refY","3.5").attr("orient","auto").append("polygon").attr("points","0 0, 10 3.5, 0 7").attr("fill",u),ue(void 0,l,d?.padding??30,d?.useMaxWidth)},"draw"),$e={draw:Te},De=o(e=>"","getStyles"),Ne=De,Ke={parser:Ee,db:F,renderer:$e,styles:Ne};export{Ke as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as pe}from"./chunk-JWPE2WC7-Diz0u535.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./mermaid.core-BjUO4_Ly.js";import{s as we}from"./chunk-POPQ4Y6H-CkAsArUm.js";import{p as Te}from"./cynefin-OW5HDTMX-BVK0_S--.js";import{s as _}from"./index-CkHVrFkx.js";import{ad as P}from"../datalayer-app-main.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-DuKLYeqR.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./index-DYk4SAGn.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
1
|
+
import{p as pe}from"./chunk-JWPE2WC7-SVeaXwdX.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./mermaid.core-CLv-vCjs.js";import{s as we}from"./chunk-POPQ4Y6H-Cl1LQa-a.js";import{p as Te}from"./cynefin-OW5HDTMX-BVK0_S--.js";import{s as _}from"./index-BtjXlYA2.js";import{ad as P}from"../datalayer-app-main.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-BLnKxlFS.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./index-p2ZGnxJX.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${l.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${l.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as pe}from"./chunk-JWPE2WC7-D3HcIpVU.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./index-DKPjJ48t.js";import{s as we}from"./chunk-POPQ4Y6H-TbpwubqF.js";import{p as Te}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import{s as _}from"./index-CkHVrFkx.js";import{ad as P}from"../datalayer-app-main.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-DuKLYeqR.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./index-DYk4SAGn.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
1
|
+
import{p as pe}from"./chunk-JWPE2WC7-DC1wY1Ne.js";import{_ as m,F as de,y as X,A as G,D as he,d as me,l as O,a9 as L,b as ue,a as fe,o as ye,p as ge,g as Se,s as xe,B as be,aa as ve,q as Ce}from"./index-DtYYe0Cw.js";import{s as we}from"./chunk-POPQ4Y6H-BHtANfps.js";import{p as Te}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import{s as _}from"./index-BtjXlYA2.js";import{ad as P}from"../datalayer-app-main.js";import{o as I}from"./ordinal-Cboi1Yqb.js";import{h as $e,t as Le}from"./index-CvYzv8kf.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-BLnKxlFS.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./index-p2ZGnxJX.js";import"./init-Gi6I4Gst.js";var ee=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=ue,this.getAccTitle=fe,this.setDiagramTitle=ye,this.getDiagramTitle=ge,this.getAccDescription=Se,this.setAccDescription=xe}static{m(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){const r=be,s=X();return G({...r.treemap,...s.treemap??{}})}addNode(r,s){this.nodes.push(r),this.levels.set(r,s),s===0&&(this.outerNodes.push(r),this.root??=r)}getRoot(){return{name:"",children:this.outerNodes}}addClass(r,s){const i=this.classes.get(r)??{id:r,styles:[],textStyles:[]},c=s.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");c&&c.forEach(l=>{ve(l)&&(i?.textStyles?i.textStyles.push(l):i.textStyles=[l]),i?.styles?i.styles.push(l):i.styles=[l]}),this.classes.set(r,i)}getClasses(){return this.classes}getStylesForClass(r){return this.classes.get(r)?.styles??[]}clear(){Ce(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function te(r){if(!r.length)return[];const s=[],i=[];return r.forEach(c=>{const l={name:c.name,children:c.type==="Leaf"?void 0:[]};for(l.classSelector=c?.classSelector,c?.cssCompiledStyles&&(l.cssCompiledStyles=c.cssCompiledStyles),c.type==="Leaf"&&c.value!==void 0&&(l.value=c.value);i.length>0&&i[i.length-1].level>=c.level;)i.pop();if(i.length===0)s.push(l);else{const o=i[i.length-1].node;o.children?o.children.push(l):o.children=[l]}c.type!=="Leaf"&&i.push({node:l,level:c.level})}),s}m(te,"buildHierarchy");var Fe=m((r,s)=>{pe(r,s);const i=[];for(const o of r.TreemapRows??[])o.$type==="ClassDefStatement"&&s.addClass(o.className??"",o.styleText??"");for(const o of r.TreemapRows??[]){const d=o.item;if(!d)continue;const h=o.indent?parseInt(o.indent):0,M=Ne(d),a=d.classSelector?s.getStylesForClass(d.classSelector):[],N=a.length>0?a:void 0,x={level:h,name:M,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:N};i.push(x)}const c=te(i),l=m((o,d)=>{for(const h of o)s.addNode(h,d),h.children&&h.children.length>0&&l(h.children,d+1)},"addNodesRecursively");l(c,0)},"populate"),Ne=m(r=>r.name?String(r.name):"","getItemName"),ae={parser:{yy:void 0},parse:m(async r=>{try{const i=await Te("treemap",r);O.debug("Treemap AST:",i);const c=ae.parser?.yy;if(!(c instanceof ee))throw new Error("parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Fe(i,c)}catch(s){throw O.error("Error parsing treemap:",s),s}},"parse")},ze=10,F=10,V=25,Ae=m((r,s,i,c)=>{const l=c.db,o=l.getConfig(),d=o.padding??ze,h=l.getDiagramTitle(),M=l.getRoot(),{themeVariables:a}=X();if(!M)return;const N=h?30:0,x=he(s),Y=o.nodeWidth?o.nodeWidth*F:960,j=o.nodeHeight?o.nodeHeight*F:500,H=Y,q=j+N;x.attr("viewBox",`0 0 ${H} ${q}`),me(x,q,H,o.useMaxWidth);let b;try{const e=o.valueFormat||",";if(e==="$0,0")b=m(t=>"$"+P(",")(t),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const t=/\.\d+/.exec(e),n=t?t[0]:"";b=m(u=>"$"+P(","+n)(u),"valueFormat")}else if(e.startsWith("$")){const t=e.substring(1);b=m(n=>"$"+P(t||"")(n),"valueFormat")}else b=P(e)}catch(e){O.error("Error creating format function:",e),b=P(",")}const z=I().range(["transparent",a.cScale0,a.cScale1,a.cScale2,a.cScale3,a.cScale4,a.cScale5,a.cScale6,a.cScale7,a.cScale8,a.cScale9,a.cScale10,a.cScale11]),le=I().range(["transparent",a.cScalePeer0,a.cScalePeer1,a.cScalePeer2,a.cScalePeer3,a.cScalePeer4,a.cScalePeer5,a.cScalePeer6,a.cScalePeer7,a.cScalePeer8,a.cScalePeer9,a.cScalePeer10,a.cScalePeer11]),k=I().range([a.cScaleLabel0,a.cScaleLabel1,a.cScaleLabel2,a.cScaleLabel3,a.cScaleLabel4,a.cScaleLabel5,a.cScaleLabel6,a.cScaleLabel7,a.cScaleLabel8,a.cScaleLabel9,a.cScaleLabel10,a.cScaleLabel11]);h&&x.append("text").attr("x",H/2).attr("y",N/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);const U=x.append("g").attr("transform",`translate(0, ${N})`).attr("class","treemapContainer"),se=$e(M).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),J=Le().size([Y,j]).paddingTop(e=>e.children&&e.children.length>0?V+F:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?F:0).paddingRight(e=>e.children&&e.children.length>0?F:0).paddingBottom(e=>e.children&&e.children.length>0?F:0).round(!0)(se),re=J.descendants().filter(e=>e.children&&e.children.length>0),A=U.selectAll(".treemapSection").data(re).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",V).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),A.append("clipPath").attr("id",(e,t)=>`clip-section-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",V),A.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class",(e,t)=>`treemapSection section${t}`).attr("fill",e=>z(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>le(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const t=L({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),A.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",V/2).attr("dominant-baseline","middle").text(e=>e.depth===0?"":e.data.name).attr("font-weight","bold").attr("clip-path",(e,t)=>`url(#clip-section-${s}-${t})`).attr("style",e=>{if(e.depth===0)return"display: none;";const t="dominant-baseline: middle; font-size: 12px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const t=_(this),n=e.data.name;t.text(n);const u=e.x1-e.x0,y=6;let f;o.showValues!==!1&&e.value?f=u-10-30-10-y:f=u-y-6;const p=Math.max(15,f),v=t.node();if(v.getComputedTextLength()>p){let w=n;for(;w.length>0;){if(w=n.substring(0,w.length-1),w.length===0){t.text("..."),v.getComputedTextLength()>p&&t.text("");break}if(t.text(w+"..."),v.getComputedTextLength()<=p)break}}}),o.showValues!==!1&&A.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",V/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?b(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const t="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+k(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")});const K=J.leaves(),g=K.length>20,oe=g?16:38,W=g?14:28,T=g?4:8,D=g?4:6,R=g?2:4,Q=g?8:10,B=g?1:2,E=U.selectAll(".treemapLeafGroup").data(K).enter().append("g").attr("class",(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:""}x`).attr("transform",e=>`translate(${e.x0},${e.y0})`);E.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("style",e=>L({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?z(e.parent.data.name):z(e.data.name)).attr("stroke-width",3),E.append("clipPath").attr("id",(e,t)=>`clip-${s}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-4)).attr("height",e=>Math.max(0,e.y1-e.y0-4)),E.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const t=`text-anchor: middle; dominant-baseline: middle; font-size: ${oe}px;fill:`+k(e.data.name)+";",n=L({cssCompiledStyles:e.data.cssCompiledStyles});return t+n.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,t)=>`url(#clip-${s}-${t})`).text(e=>e.data.name).each(function(e){const t=_(this),n=e.x1-e.x0,u=e.y1-e.y0,y=t.node(),f=n-2*R,$=u-2*R;if(f<Q||$<Q){t.style("display","none");return}let p=parseInt(t.style("font-size"),10);const v=.6;for(;y.getComputedTextLength()>f&&p>T;)p--,t.style("font-size",`${p}px`);let S=Math.max(D,Math.min(W,Math.round(p*v))),C=p+B+S;for(;C>$&&p>T&&(p--,S=Math.max(D,Math.min(W,Math.round(p*v))),!(S<D&&p===T));)t.style("font-size",`${p}px`),C=p+B+S;t.style("font-size",`${p}px`),g?(p<T||$<T)&&t.style("display","none"):(y.getComputedTextLength()>f||p<T||$<p)&&t.style("display","none")}),o.showValues!==!1&&E.append("text").attr("class","treemapValue").attr("x",t=>(t.x1-t.x0)/2).attr("y",function(t){return(t.y1-t.y0)/2}).attr("style",t=>{const n=`text-anchor: middle; dominant-baseline: hanging; font-size: ${W}px;fill:`+k(t.data.name)+";",u=L({cssCompiledStyles:t.data.cssCompiledStyles});return n+u.labelStyles.replace("color:","fill:")}).attr("clip-path",(t,n)=>`url(#clip-${s}-${n})`).text(t=>t.value?b(t.value):"").each(function(t){const n=_(this),u=this.parentNode;if(!u){n.style("display","none");return}const y=_(u).select(".treemapLabel");if(y.empty()||y.style("display")==="none"){n.style("display","none");return}const f=parseFloat(y.style("font-size")),p=Math.max(D,Math.min(W,Math.round(f*.6)));n.style("font-size",`${p}px`);const S=(t.y1-t.y0)/2+f/2+B;n.attr("y",S);const C=t.x1-t.x0,Z=t.y1-t.y0-4,ce=C-2*R;n.node().getComputedTextLength()>ce||S+p>Z||p<D?n.style("display","none"):n.style("display",null)});const ne=o.diagramPadding??8;we(x,ne,"flowchart",o?.useMaxWidth||!1)},"draw"),De=m(function(r,s){return s.db.getClasses()},"getClasses"),Pe={draw:Ae,getClasses:De},Ve={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Me=m(({treemap:r}={})=>{const s=de(),i=X(),c=G(s,i.themeVariables),l=G(Ve,r),o=l.titleColor??c.titleColor,d=l.labelColor??c.textColor,h=l.valueColor??c.textColor;return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${l.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${l.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as B}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as B}from"./chunk-JWPE2WC7-SVeaXwdX.js";import{_ as m,A as b,D as $,d as C,l as u,b as S,a as D,o as T,p as P,g as z,s as A,y as E,B as F,q as W}from"./mermaid.core-CLv-vCjs.js";import{p as _}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./index-BtjXlYA2.js";import"./index-p2ZGnxJX.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-BLnKxlFS.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var N=F.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=P,this.getAccDescription=z,this.setAccDescription=A}static{m(this,"PacketDB")}getConfig(){const t=b({...N,...E().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=m((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:s,bits:d,label:c}of t.blocks){if(a!==void 0&&s!==void 0&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(d??1)-1,d??=s-a+1,r=s,u.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,i]=Y({start:a,end:s,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!i)break;({start:a,end:s,bits:d,label:c}=i)}}e.pushWord(o)},"populate"),Y=m((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:m(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");u.debug(e),M(e,r)},"parse")},I=m((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:s,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),i=n.getDiagramTitle(),h=a+s,g=h*(p.length+1)-(i?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(i).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=m((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:s,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const i of e){const h=i.start%s*a+1,g=(i.end-i.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!d)continue;const k=i.end===i.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(i.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=m(({packet:t}={})=>{const e=b(q,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${e.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as B}from"./chunk-JWPE2WC7-
|
|
1
|
+
import{p as B}from"./chunk-JWPE2WC7-DC1wY1Ne.js";import{_ as m,A as b,D as $,d as C,l as u,b as S,a as D,o as T,p as P,g as z,s as A,B as E,y as F,q as W}from"./index-DtYYe0Cw.js";import{p as _}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"../datalayer-app-main.js";import"./index-BtjXlYA2.js";import"./index-p2ZGnxJX.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-BLnKxlFS.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";var N=E.packet,w=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=T,this.getDiagramTitle=P,this.getAccDescription=z,this.setAccDescription=A}static{m(this,"PacketDB")}getConfig(){const t=b({...N,...F().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},L=1e4,M=m((t,e)=>{B(t,e);let r=-1,o=[],n=1;const{bitsPerRow:l}=e.getConfig();for(let{start:a,end:s,bits:d,label:c}of t.blocks){if(a!==void 0&&s!==void 0&&s<a)throw new Error(`Packet block ${a} - ${s} is invalid. End must be greater than start.`);if(a??=r+1,a!==r+1)throw new Error(`Packet block ${a} - ${s??a} is not contiguous. It should start from ${r+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(s??=a+(d??1)-1,d??=s-a+1,r=s,u.debug(`Packet block ${a} - ${r} with label ${c}`);o.length<=l+1&&e.getPacket().length<L;){const[p,i]=Y({start:a,end:s,bits:d,label:c},n,l);if(o.push(p),p.end+1===n*l&&(e.pushWord(o),o=[],n++),!i)break;({start:a,end:s,bits:d,label:c}=i)}}e.pushWord(o)},"populate"),Y=m((t,e,r)=>{if(t.start===void 0)throw new Error("start should have been set during first phase");if(t.end===void 0)throw new Error("end should have been set during first phase");if(t.start>t.end)throw new Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=e*r)return[t,void 0];const o=e*r-1,n=e*r;return[{start:t.start,end:o,label:t.label,bits:o-t.start},{start:n,end:t.end,label:t.label,bits:t.end-n}]},"getNextFittingBlock"),v={parser:{yy:void 0},parse:m(async t=>{const e=await _("packet",t),r=v.parser?.yy;if(!(r instanceof w))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");u.debug(e),M(e,r)},"parse")},I=m((t,e,r,o)=>{const n=o.db,l=n.getConfig(),{rowHeight:a,paddingY:s,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),i=n.getDiagramTitle(),h=a+s,g=h*(p.length+1)-(i?0:a),k=d*c+2,f=$(e);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[x,y]of p.entries())O(f,y,x,l);f.append("text").text(i).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),O=m((t,e,r,{rowHeight:o,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:s,showBits:d})=>{const c=t.append("g"),p=r*(o+l)+l;for(const i of e){const h=i.start%s*a+1,g=(i.end-i.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",o).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+o/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(i.label),!d)continue;const k=i.end===i.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(i.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(i.end)}},"drawWord"),j={draw:I},q={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},G=m(({packet:t}={})=>{const e=b(q,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${e.byteFontSize};
|
|
4
4
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a6 as Sr,F as U,ao as Tr,cz as _n,cy as Er,ae as Pt,b9 as Rr,cf as nt}from"../datalayer-app-main.js";var ot={exports:{}};ot.exports;var vn;function Dr(){return vn||(vn=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",a=800,s=16,d=9007199254740991,l="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",p="[object Boolean]",_="[object Date]",v="[object Error]",E="[object Function]",O="[object GeneratorFunction]",J="[object Map]",$="[object Number]",Y="[object Null]",oe="[object Object]",Pe="[object Proxy]",be="[object RegExp]",ke="[object Set]",Ce="[object String]",we="[object Undefined]",Se="[object WeakMap]",Te="[object ArrayBuffer]",Ve="[object DataView]",Z="[object Float32Array]",R="[object Float64Array]",f="[object Int8Array]",T="[object Int16Array]",D="[object Int32Array]",S="[object Uint8Array]",M="[object Uint8ClampedArray]",kt="[object Uint16Array]",At="[object Uint32Array]",It=/[\\^$.*+?()[\]{}|]/g,Ae=/^\[object .+?Constructor\]$/,Ie=/^(?:0|[1-9]\d*)$/,A={};A[Z]=A[R]=A[f]=A[T]=A[D]=A[S]=A[M]=A[kt]=A[At]=!0,A[l]=A[c]=A[Te]=A[p]=A[Ve]=A[_]=A[v]=A[E]=A[J]=A[$]=A[oe]=A[be]=A[ke]=A[Ce]=A[Se]=!1;var Ee=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Ge=typeof self=="object"&&self&&self.Object===Object&&self,ue=Ee||Ge||Function("return this")(),Je=e&&!e.nodeType&&e,ne=Je&&!0&&n&&!n.nodeType&&n,ae=ne&&ne.exports===Je,Re=ae&&Ee.process,ie=(function(){try{var i=ne&&ne.require&&ne.require("util").types;return i||Re&&Re.binding&&Re.binding("util")}catch{}})(),j=ie&&ie.isTypedArray;function fe(i,u,g){switch(g.length){case 0:return i.call(u);case 1:return i.call(u,g[0]);case 2:return i.call(u,g[0],g[1]);case 3:return i.call(u,g[0],g[1],g[2])}return i.apply(u,g)}function V(i,u){for(var g=-1,C=Array(i);++g<i;)C[g]=u(g);return C}function le(i){return function(u){return i(u)}}function Ke(i,u){return i?.[u]}function dt(i,u){return function(g){return i(u(g))}}var ht=Array.prototype,ft=Function.prototype,je=Object.prototype,se=ue["__core-js_shared__"],qe=ft.toString,de=je.hasOwnProperty,gt=(function(){var i=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),pt=je.toString,jt=qe.call(Object),mt=RegExp("^"+qe.call(de).replace(It,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ae?ue.Buffer:void 0,ge=ue.Symbol,Ze=ue.Uint8Array;Fe&&Fe.allocUnsafe;var _t=dt(Object.getPrototypeOf,Object),vt=Object.create,yt=je.propertyIsEnumerable,bt=ht.splice,pe=ge?ge.toStringTag:void 0,Ye=(function(){try{var i=Ht(Object,"defineProperty");return i({},"",{}),i}catch{}})(),qt=Fe?Fe.isBuffer:void 0,Ct=Math.max,Ft=Date.now,wt=Ht(ue,"Map"),ee=Ht(Object,"create"),Ut=(function(){function i(){}return function(u){if(!$e(u))return{};if(vt)return vt(u);i.prototype=u;var g=new i;return i.prototype=void 0,g}})();function me(i){var u=-1,g=i==null?0:i.length;for(this.clear();++u<g;){var C=i[u];this.set(C[0],C[1])}}function Qe(){this.__data__=ee?ee(null):{},this.size=0}function $t(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Xe(i){var u=this.__data__;if(ee){var g=u[i];return g===r?void 0:g}return de.call(u,i)?u[i]:void 0}function xt(i){var u=this.__data__;return ee?u[i]!==void 0:de.call(u,i)}function De(i,u){var g=this.__data__;return this.size+=this.has(i)?0:1,g[i]=ee&&u===void 0?r:u,this}me.prototype.clear=Qe,me.prototype.delete=$t,me.prototype.get=Xe,me.prototype.has=xt,me.prototype.set=De;function X(i){var u=-1,g=i==null?0:i.length;for(this.clear();++u<g;){var C=i[u];this.set(C[0],C[1])}}function zt(){this.__data__=[],this.size=0}function Bt(i){var u=this.__data__,g=Q(u,i);if(g<0)return!1;var C=u.length-1;return g==C?u.pop():bt.call(u,g,1),--this.size,!0}function Ue(i){var u=this.__data__,g=Q(u,i);return g<0?void 0:u[g][1]}function St(i){return Q(this.__data__,i)>-1}function Tt(i,u){var g=this.__data__,C=Q(g,i);return C<0?(++this.size,g.push([i,u])):g[C][1]=u,this}X.prototype.clear=zt,X.prototype.delete=Bt,X.prototype.get=Ue,X.prototype.has=St,X.prototype.set=Tt;function he(i){var u=-1,g=i==null?0:i.length;for(this.clear();++u<g;){var C=i[u];this.set(C[0],C[1])}}function Et(){this.size=0,this.__data__={hash:new me,map:new(wt||X),string:new me}}function Oe(i){var u=Dt(this,i).delete(i);return this.size-=u?1:0,u}function o(i){return Dt(this,i).get(i)}function m(i){return Dt(this,i).has(i)}function y(i,u){var g=Dt(this,i),C=g.size;return g.set(i,u),this.size+=g.size==C?0:1,this}he.prototype.clear=Et,he.prototype.delete=Oe,he.prototype.get=o,he.prototype.has=m,he.prototype.set=y;function b(i){var u=this.__data__=new X(i);this.size=u.size}function q(){this.__data__=new X,this.size=0}function I(i){var u=this.__data__,g=u.delete(i);return this.size=u.size,g}function z(i){return this.__data__.get(i)}function H(i){return this.__data__.has(i)}function L(i,u){var g=this.__data__;if(g instanceof X){var C=g.__data__;if(!wt||C.length<t-1)return C.push([i,u]),this.size=++g.size,this;g=this.__data__=new he(C)}return g.set(i,u),this.size=g.size,this}b.prototype.clear=q,b.prototype.delete=I,b.prototype.get=z,b.prototype.has=H,b.prototype.set=L;function x(i,u){var g=Jt(i),C=!g&&Gt(i),N=!g&&!C&&dn(i),F=!g&&!C&&!N&&fn(i),B=g||C||N||F,k=B?V(i.length,String):[],W=k.length;for(var ce in i)B&&(ce=="length"||N&&(ce=="offset"||ce=="parent")||F&&(ce=="buffer"||ce=="byteLength"||ce=="byteOffset")||un(ce,W))||k.push(ce);return k}function P(i,u,g){(g!==void 0&&!Ot(i[u],g)||g===void 0&&!(u in i))&&te(i,u,g)}function G(i,u,g){var C=i[u];(!(de.call(i,u)&&Ot(C,g))||g===void 0&&!(u in i))&&te(i,u,g)}function Q(i,u){for(var g=i.length;g--;)if(Ot(i[g][0],u))return g;return-1}function te(i,u,g){u=="__proto__"&&Ye?Ye(i,u,{configurable:!0,enumerable:!0,value:g,writable:!0}):i[u]=g}var Wt=sr();function Rt(i){return i==null?i===void 0?we:Y:pe&&pe in Object(i)?or(i):hr(i)}function an(i){return et(i)&&Rt(i)==l}function Gn(i){if(!$e(i)||lr(i))return!1;var u=Qt(i)?mt:Ae;return u.test(mr(i))}function Jn(i){return et(i)&&hn(i.length)&&!!A[Rt(i)]}function Yn(i){if(!$e(i))return dr(i);var u=ln(i),g=[];for(var C in i)C=="constructor"&&(u||!de.call(i,C))||g.push(C);return g}function cn(i,u,g,C,N){i!==u&&Wt(u,function(F,B){if(N||(N=new b),$e(F))Qn(i,u,B,g,cn,C,N);else{var k=C?C(Vt(i,B),F,B+"",i,u,N):void 0;k===void 0&&(k=F),P(i,B,k)}},gn)}function Qn(i,u,g,C,N,F,B){var k=Vt(i,g),W=Vt(u,g),ce=B.get(W);if(ce){P(i,g,ce);return}var re=F?F(k,W,g+"",i,u,B):void 0,tt=re===void 0;if(tt){var Kt=Jt(W),Zt=!Kt&&dn(W),mn=!Kt&&!Zt&&fn(W);re=W,Kt||Zt||mn?Jt(k)?re=k:_r(k)?re=nr(k):Zt?(tt=!1,re=Xn(W)):mn?(tt=!1,re=tr(W)):re=[]:vr(W)||Gt(W)?(re=k,Gt(k)?re=yr(k):(!$e(k)||Qt(k))&&(re=ar(W))):tt=!1}tt&&(B.set(W,re),N(re,W,C,F,B),B.delete(W)),P(i,g,re)}function Kn(i,u){return gr(fr(i,u,pn),i+"")}var Zn=Ye?function(i,u){return Ye(i,"toString",{configurable:!0,enumerable:!1,value:Cr(u),writable:!0})}:pn;function Xn(i,u){return i.slice()}function er(i){var u=new i.constructor(i.byteLength);return new Ze(u).set(new Ze(i)),u}function tr(i,u){var g=er(i.buffer);return new i.constructor(g,i.byteOffset,i.length)}function nr(i,u){var g=-1,C=i.length;for(u||(u=Array(C));++g<C;)u[g]=i[g];return u}function rr(i,u,g,C){var N=!g;g||(g={});for(var F=-1,B=u.length;++F<B;){var k=u[F],W=void 0;W===void 0&&(W=i[k]),N?te(g,k,W):G(g,k,W)}return g}function ir(i){return Kn(function(u,g){var C=-1,N=g.length,F=N>1?g[N-1]:void 0,B=N>2?g[2]:void 0;for(F=i.length>3&&typeof F=="function"?(N--,F):void 0,B&&cr(g[0],g[1],B)&&(F=N<3?void 0:F,N=1),u=Object(u);++C<N;){var k=g[C];k&&i(u,k,C,F)}return u})}function sr(i){return function(u,g,C){for(var N=-1,F=Object(u),B=C(u),k=B.length;k--;){var W=B[++N];if(g(F[W],W,F)===!1)break}return u}}function Dt(i,u){var g=i.__data__;return ur(u)?g[typeof u=="string"?"string":"hash"]:g.map}function Ht(i,u){var g=Ke(i,u);return Gn(g)?g:void 0}function or(i){var u=de.call(i,pe),g=i[pe];try{i[pe]=void 0;var C=!0}catch{}var N=pt.call(i);return C&&(u?i[pe]=g:delete i[pe]),N}function ar(i){return typeof i.constructor=="function"&&!ln(i)?Ut(_t(i)):{}}function un(i,u){var g=typeof i;return u=u??d,!!u&&(g=="number"||g!="symbol"&&Ie.test(i))&&i>-1&&i%1==0&&i<u}function cr(i,u,g){if(!$e(g))return!1;var C=typeof u;return(C=="number"?Yt(g)&&un(u,g.length):C=="string"&&u in g)?Ot(g[u],i):!1}function ur(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function lr(i){return!!gt&> in i}function ln(i){var u=i&&i.constructor,g=typeof u=="function"&&u.prototype||je;return i===g}function dr(i){var u=[];if(i!=null)for(var g in Object(i))u.push(g);return u}function hr(i){return pt.call(i)}function fr(i,u,g){return u=Ct(u===void 0?i.length-1:u,0),function(){for(var C=arguments,N=-1,F=Ct(C.length-u,0),B=Array(F);++N<F;)B[N]=C[u+N];N=-1;for(var k=Array(u+1);++N<u;)k[N]=C[N];return k[u]=g(B),fe(i,this,k)}}function Vt(i,u){if(!(u==="constructor"&&typeof i[u]=="function")&&u!="__proto__")return i[u]}var gr=pr(Zn);function pr(i){var u=0,g=0;return function(){var C=Ft(),N=s-(C-g);if(g=C,N>0){if(++u>=a)return arguments[0]}else u=0;return i.apply(void 0,arguments)}}function mr(i){if(i!=null){try{return qe.call(i)}catch{}try{return i+""}catch{}}return""}function Ot(i,u){return i===u||i!==i&&u!==u}var Gt=an((function(){return arguments})())?an:function(i){return et(i)&&de.call(i,"callee")&&!yt.call(i,"callee")},Jt=Array.isArray;function Yt(i){return i!=null&&hn(i.length)&&!Qt(i)}function _r(i){return et(i)&&Yt(i)}var dn=qt||wr;function Qt(i){if(!$e(i))return!1;var u=Rt(i);return u==E||u==O||u==h||u==Pe}function hn(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=d}function $e(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function et(i){return i!=null&&typeof i=="object"}function vr(i){if(!et(i)||Rt(i)!=oe)return!1;var u=_t(i);if(u===null)return!0;var g=de.call(u,"constructor")&&u.constructor;return typeof g=="function"&&g instanceof g&&qe.call(g)==jt}var fn=j?le(j):Jn;function yr(i){return rr(i,gn(i))}function gn(i){return Yt(i)?x(i):Yn(i)}var br=ir(function(i,u,g,C){cn(i,u,g,C)});function Cr(i){return function(){return i}}function pn(i){return i}function wr(){return!1}n.exports=br})(ot,ot.exports)),ot.exports}var Or=Dr();const Fn=Sr(Or);class Mr{constructor(e){this._widgetAdapter=e.widgetAdapter,this._extensions=e.extensions,e.editor.ready().then(t=>{this._injectExtensions(e.editor)})}dispose(){this.isDisposed||(this.isDisposed=!0,U.clearData(this))}_injectExtensions(e){const t=e.getEditor();!t||t.isDisposed||this._extensions.forEach(r=>{const a=r.factory({path:this._widgetAdapter.widget.context.path,editor:e,widgetAdapter:this._widgetAdapter,model:t.model,inline:!0});a&&t.injectExtension(a.instance(t))})}}const yn=Er.createButton,bn={"text/x-rsrc":"r","text/x-r-source":"r","text/x-ipython":"python"};class ei{constructor(e,t){this.widget=e,this.options=t,this._adapterConnected=new U(this),this._activeEditorChanged=new U(this),this._editorAdded=new U(this),this._editorRemoved=new U(this),this._disposed=new U(this),this._isDisposed=!1,this._virtualDocument=null,this._connectionManager=t.connectionManager,this._isConnected=!1,this._trans=(t.translator||Tr).load("jupyterlab"),this.widget.context.saveState.connect(this.onSaveState,this),this.connectionManager.closed.connect(this.onConnectionClosed,this),this.widget.disposed.connect(this.dispose,this),this._editorToAdapter=new WeakMap,this.editorAdded.connect(this._onEditorAdded,this),this.editorRemoved.connect(this._onEditorRemoved,this),this._connectionManager.languageServerManager.sessionsChanged.connect(this._onLspSessionOrFeatureChanged,this),this.options.featureManager.featureRegistered.connect(this._onLspSessionOrFeatureChanged,this)}get isDisposed(){return this._isDisposed}get hasMultipleEditors(){return this.editors.length>1}get widgetId(){return this.widget.id}get language(){if(bn.hasOwnProperty(this.mimeType))return bn[this.mimeType];{let e=this.mimeType.split(";")[0],[t,r]=e.split("/");return t==="application"||t==="text"?r.startsWith("x-")?r.substring(2):r:this.mimeType}}get adapterConnected(){return this._adapterConnected}get activeEditorChanged(){return this._activeEditorChanged}get disposed(){return this._disposed}get editorAdded(){return this._editorAdded}get editorRemoved(){return this._editorRemoved}get isConnected(){return this._isConnected}get connectionManager(){return this._connectionManager}get trans(){return this._trans}get updateFinished(){return this._updateFinished}get virtualDocument(){return this._virtualDocument}onConnectionClosed(e,{virtualDocument:t}){t===this.virtualDocument&&this.dispose()}dispose(){this._isDisposed||(this.editorAdded.disconnect(this._onEditorAdded,this),this.editorRemoved.disconnect(this._onEditorRemoved,this),this._connectionManager.languageServerManager.sessionsChanged.disconnect(this._onLspSessionOrFeatureChanged,this),this.options.featureManager.featureRegistered.disconnect(this._onLspSessionOrFeatureChanged,this),this._isDisposed=!0,this.disconnect(),this._virtualDocument=null,this._disposed.emit(),U.clearData(this))}disconnect(){var e,t;const r=(e=this.virtualDocument)===null||e===void 0?void 0:e.uri,{model:a}=this.widget.context;r&&this.connectionManager.unregisterDocument(r),a.contentChanged.disconnect(this._onContentChanged,this);for(let{ceEditor:s}of this.editors)this._editorRemoved.emit({editor:s});(t=this.virtualDocument)===null||t===void 0||t.dispose()}updateDocuments(){return this._isDisposed?(console.warn("Cannot update documents: adapter disposed"),Promise.reject("Cannot update documents: adapter disposed")):this.virtualDocument.updateManager.updateDocuments(this.editors)}documentChanged(e,t,r=!1){if(this._isDisposed){console.warn("Cannot swap document: adapter disposed");return}let a=this.connectionManager.connections.get(e.uri);if(!a?.isReady){console.log("Skipping document update signal: connection not ready");return}a.sendFullTextChange(e.value,e.documentInfo)}reloadConnection(){this.virtualDocument!==null&&(this.disconnect(),this.initVirtual(),this.connectDocument(this.virtualDocument,!0).catch(console.warn))}onSaveState(e,t){if(this.virtualDocument!==null&&t==="completed"){const r=[this.virtualDocument];for(let a of r){let s=this.connectionManager.connections.get(a.uri);if(s){s.sendSaved(a.documentInfo);for(let d of a.foreignDocuments.values())r.push(d)}}}}async onConnected(e){let{virtualDocument:t}=e;this._adapterConnected.emit(e),this._isConnected=!0;try{await this.updateDocuments()}catch(r){console.warn("Could not update documents",r);return}this.documentChanged(t,t,!0),e.connection.serverNotifications["$/logTrace"].connect((r,a)=>{console.log(e.connection.serverIdentifier,"trace",t.uri,a)},this),e.connection.serverNotifications["window/logMessage"].connect((r,a)=>{console.log(r.serverIdentifier+": "+a.message)},this),e.connection.serverNotifications["window/showMessage"].connect((r,a)=>{_n({title:this.trans.__("Message from ")+r.serverIdentifier,body:a.message})},this),e.connection.serverRequests["window/showMessageRequest"].setHandler(async r=>{const a=r.actions,s=a?a.map(c=>yn({label:c.title})):[yn({label:this.trans.__("Dismiss")})],d=await _n({title:this.trans.__("Message from ")+e.connection.serverIdentifier,body:r.message,buttons:s}),l=s.indexOf(d.button);return l===-1?null:a?a[l]:null})}async connectDocument(e,t=!1){e.foreignDocumentOpened.connect(this.onForeignDocumentOpened,this);const r=await this._connect(e).catch(console.error);r&&r.connection&&(e.changed.connect(this.documentChanged,this),t&&r.connection.sendOpenWhenReady(e.documentInfo))}initVirtual(){var e;(e=this._virtualDocument)===null||e===void 0||e.dispose(),this._virtualDocument=this.createVirtualDocument(),this._onLspSessionOrFeatureChanged()}async onForeignDocumentOpened(e,t){const{foreignDocument:r}=t;await this.connectDocument(r,!0),r.foreignDocumentClosed.connect(this._onForeignDocumentClosed,this)}_onEditorAdded(e,t){const{editor:r}=t,a=new Mr({editor:r,widgetAdapter:this,extensions:this.options.featureManager.extensionFactories()});this._editorToAdapter.set(r,a)}_onEditorRemoved(e,t){const{editor:r}=t,a=this._editorToAdapter.get(r);a?.dispose(),this._editorToAdapter.delete(r)}_onForeignDocumentClosed(e,t){const{foreignDocument:r}=t;r.foreignDocumentClosed.disconnect(this._onForeignDocumentClosed,this),r.foreignDocumentOpened.disconnect(this.onForeignDocumentOpened,this),r.changed.disconnect(this.documentChanged,this)}async _connect(e){let t=e.language,r={textDocument:{synchronization:{dynamicRegistration:!0,willSave:!1,didSave:!0,willSaveWaitUntil:!1}},workspace:{didChangeConfiguration:{dynamicRegistration:!0}}};r=Fn(r,this.options.featureManager.clientCapabilities());let a={capabilities:r,virtualDocument:e,language:t,hasLspSupportedFile:e.hasLspSupportedFile},s=await this.connectionManager.connect(a);if(s)return await this.onConnected({virtualDocument:e,connection:s}),{connection:s,virtualDocument:e}}async _onContentChanged(e){const t=this.updateDocuments();if(!t){console.warn("Could not update documents");return}this._updateFinished=t.catch(console.warn),await this.updateFinished}_shouldUpdateVirtualDocument(){const{languageServerManager:e}=this.connectionManager;return e.isEnabled&&this.options.featureManager.features.length>0}_onLspSessionOrFeatureChanged(){if(!this._virtualDocument)return;const{model:e}=this.widget.context;this._shouldUpdateVirtualDocument()?e.contentChanged.connect(this._onContentChanged,this):e.contentChanged.disconnect(this._onContentChanged,this)}}var Cn;(function(n){n.URL_NS="lsp"})(Cn||(Cn={}));const ti=new Pt("@jupyterlab/lsp:ILSPDocumentConnectionManager","Provides the virtual documents and language server connections service."),ni=new Pt("@jupyterlab/lsp:ILSPFeatureManager","Provides the language server feature manager. This token is required to register new client capabilities."),ri=new Pt("@jupyterlab/lsp:ILSPCodeExtractorsManager","Provides the code extractor manager. This token is required in your extension to register code extractor allowing the creation of multiple virtual document from an opened document."),ii=new Pt("@jupyterlab/lsp:IWidgetLSPAdapterTracker","Provides the WidgetLSPAdapter tracker. This token is required in your extension to track WidgetLSPAdapters.");var Me;(function(n){(function(e){e.PUBLISH_DIAGNOSTICS="textDocument/publishDiagnostics",e.SHOW_MESSAGE="window/showMessage",e.LOG_TRACE="$/logTrace",e.LOG_MESSAGE="window/logMessage"})(n.ServerNotification||(n.ServerNotification={})),(function(e){e.DID_CHANGE="textDocument/didChange",e.DID_CHANGE_CONFIGURATION="workspace/didChangeConfiguration",e.DID_OPEN="textDocument/didOpen",e.DID_SAVE="textDocument/didSave",e.INITIALIZED="initialized",e.SET_TRACE="$/setTrace"})(n.ClientNotification||(n.ClientNotification={})),(function(e){e.REGISTER_CAPABILITY="client/registerCapability",e.SHOW_MESSAGE_REQUEST="window/showMessageRequest",e.UNREGISTER_CAPABILITY="client/unregisterCapability",e.WORKSPACE_CONFIGURATION="workspace/configuration"})(n.ServerRequest||(n.ServerRequest={})),(function(e){e.CODE_ACTION="textDocument/codeAction",e.COMPLETION="textDocument/completion",e.COMPLETION_ITEM_RESOLVE="completionItem/resolve",e.DEFINITION="textDocument/definition",e.DOCUMENT_COLOR="textDocument/documentColor",e.DOCUMENT_HIGHLIGHT="textDocument/documentHighlight",e.DOCUMENT_SYMBOL="textDocument/documentSymbol",e.HOVER="textDocument/hover",e.IMPLEMENTATION="textDocument/implementation",e.INITIALIZE="initialize",e.REFERENCES="textDocument/references",e.RENAME="textDocument/rename",e.SIGNATURE_HELP="textDocument/signatureHelp",e.TYPE_DEFINITION="textDocument/typeDefinition",e.LINKED_EDITING_RANGE="textDocument/linkedEditingRange",e.INLINE_VALUE="textDocument/inlineValue",e.INLAY_HINT="textDocument/inlayHint",e.WORKSPACE_SYMBOL="workspace/symbol",e.WORKSPACE_SYMBOL_RESOLVE="workspaceSymbol/resolve",e.FORMATTING="textDocument/formatting",e.RANGE_FORMATTING="textDocument/rangeFormatting"})(n.ClientRequest||(n.ClientRequest={}))})(Me||(Me={}));async function Un(n){return new Promise(e=>{setTimeout(()=>{e()},n)})}function at(n,e=35,t=50,r=a=>a){return(async()=>{let a=0;for(;n()!==!0;){if(a+=1,e!==-1&&a>e)throw Error("Too many retrials");t=r(t),await Un(t)}return n})()}function Lr(n){const e=[];for(let t in n){const r=Nr(t.split("."),n[t]);e.push(r)}return Fn({},...e)}const Nr=(n,e)=>{const t=Object.create(null);let r=t;return n.forEach((a,s)=>{r[a]=Object.create(null),s===n.length-1?r[a]=e:r=r[a]}),t};class Pr extends Map{constructor(e,t){super(t),this.defaultFactory=e}get(e){return this.getOrCreate(e)}getOrCreate(e,...t){if(this.has(e))return super.get(e);{let r=this.defaultFactory(e,...t);return this.set(e,r),r}}}function $n(n,e){const t=JSON.parse(JSON.stringify(n)),{method:r,registerOptions:a}=e,s=r.substring(13)+"Provider";if(s)a?t[s]=JSON.parse(JSON.stringify(a)):t[s]=!0;else return console.warn("Could not register server capability.",e),null;return t}function xn(n,e){const t=JSON.parse(JSON.stringify(n)),{method:r}=e,a=r.substring(13)+"Provider";return delete t[a],t}var xe={},Mt={},Xt={},w={},K={},wn;function ut(){if(wn)return K;wn=1,Object.defineProperty(K,"__esModule",{value:!0}),K.stringArray=K.array=K.func=K.error=K.number=K.string=K.boolean=void 0;function n(l){return l===!0||l===!1}K.boolean=n;function e(l){return typeof l=="string"||l instanceof String}K.string=e;function t(l){return typeof l=="number"||l instanceof Number}K.number=t;function r(l){return l instanceof Error}K.error=r;function a(l){return typeof l=="function"}K.func=a;function s(l){return Array.isArray(l)}K.array=s;function d(l){return s(l)&&l.every(c=>e(c))}return K.stringArray=d,K}var Sn;function sn(){if(Sn)return w;Sn=1,Object.defineProperty(w,"__esModule",{value:!0}),w.Message=w.NotificationType9=w.NotificationType8=w.NotificationType7=w.NotificationType6=w.NotificationType5=w.NotificationType4=w.NotificationType3=w.NotificationType2=w.NotificationType1=w.NotificationType0=w.NotificationType=w.RequestType9=w.RequestType8=w.RequestType7=w.RequestType6=w.RequestType5=w.RequestType4=w.RequestType3=w.RequestType2=w.RequestType1=w.RequestType=w.RequestType0=w.AbstractMessageSignature=w.ParameterStructures=w.ResponseError=w.ErrorCodes=void 0;const n=ut();var e;(function(R){R.ParseError=-32700,R.InvalidRequest=-32600,R.MethodNotFound=-32601,R.InvalidParams=-32602,R.InternalError=-32603,R.jsonrpcReservedErrorRangeStart=-32099,R.serverErrorStart=-32099,R.MessageWriteError=-32099,R.MessageReadError=-32098,R.PendingResponseRejected=-32097,R.ConnectionInactive=-32096,R.ServerNotInitialized=-32002,R.UnknownErrorCode=-32001,R.jsonrpcReservedErrorRangeEnd=-32e3,R.serverErrorEnd=-32e3})(e||(w.ErrorCodes=e={}));class t extends Error{constructor(f,T,D){super(T),this.code=n.number(f)?f:e.UnknownErrorCode,this.data=D,Object.setPrototypeOf(this,t.prototype)}toJson(){const f={code:this.code,message:this.message};return this.data!==void 0&&(f.data=this.data),f}}w.ResponseError=t;class r{constructor(f){this.kind=f}static is(f){return f===r.auto||f===r.byName||f===r.byPosition}toString(){return this.kind}}w.ParameterStructures=r,r.auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName");class a{constructor(f,T){this.method=f,this.numberOfParams=T}get parameterStructures(){return r.auto}}w.AbstractMessageSignature=a;class s extends a{constructor(f){super(f,0)}}w.RequestType0=s;class d extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.RequestType=d;class l extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.RequestType1=l;class c extends a{constructor(f){super(f,2)}}w.RequestType2=c;class h extends a{constructor(f){super(f,3)}}w.RequestType3=h;class p extends a{constructor(f){super(f,4)}}w.RequestType4=p;class _ extends a{constructor(f){super(f,5)}}w.RequestType5=_;class v extends a{constructor(f){super(f,6)}}w.RequestType6=v;class E extends a{constructor(f){super(f,7)}}w.RequestType7=E;class O extends a{constructor(f){super(f,8)}}w.RequestType8=O;class J extends a{constructor(f){super(f,9)}}w.RequestType9=J;class $ extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.NotificationType=$;class Y extends a{constructor(f){super(f,0)}}w.NotificationType0=Y;class oe extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.NotificationType1=oe;class Pe extends a{constructor(f){super(f,2)}}w.NotificationType2=Pe;class be extends a{constructor(f){super(f,3)}}w.NotificationType3=be;class ke extends a{constructor(f){super(f,4)}}w.NotificationType4=ke;class Ce extends a{constructor(f){super(f,5)}}w.NotificationType5=Ce;class we extends a{constructor(f){super(f,6)}}w.NotificationType6=we;class Se extends a{constructor(f){super(f,7)}}w.NotificationType7=Se;class Te extends a{constructor(f){super(f,8)}}w.NotificationType8=Te;class Ve extends a{constructor(f){super(f,9)}}w.NotificationType9=Ve;var Z;return(function(R){function f(S){const M=S;return M&&n.string(M.method)&&(n.string(M.id)||n.number(M.id))}R.isRequest=f;function T(S){const M=S;return M&&n.string(M.method)&&S.id===void 0}R.isNotification=T;function D(S){const M=S;return M&&(M.result!==void 0||!!M.error)&&(n.string(M.id)||n.number(M.id)||M.id===null)}R.isResponse=D})(Z||(w.Message=Z={})),w}var _e={},Tn;function zn(){if(Tn)return _e;Tn=1;var n;Object.defineProperty(_e,"__esModule",{value:!0}),_e.LRUCache=_e.LinkedMap=_e.Touch=void 0;var e;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(e||(_e.Touch=e={}));class t{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(s){return this._map.has(s)}get(s,d=e.None){const l=this._map.get(s);if(l)return d!==e.None&&this.touch(l,d),l.value}set(s,d,l=e.None){let c=this._map.get(s);if(c)c.value=d,l!==e.None&&this.touch(c,l);else{switch(c={key:s,value:d,next:void 0,previous:void 0},l){case e.None:this.addItemLast(c);break;case e.First:this.addItemFirst(c);break;case e.Last:this.addItemLast(c);break;default:this.addItemLast(c);break}this._map.set(s,c),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){const d=this._map.get(s);if(d)return this._map.delete(s),this.removeItem(d),this._size--,d.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,d){const l=this._state;let c=this._head;for(;c;){if(d?s.bind(d)(c.value,c.key,this):s(c.value,c.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");c=c.next}}keys(){const s=this._state;let d=this._head;const l={[Symbol.iterator]:()=>l,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:d.key,done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return l}values(){const s=this._state;let d=this._head;const l={[Symbol.iterator]:()=>l,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:d.value,done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return l}entries(){const s=this._state;let d=this._head;const l={[Symbol.iterator]:()=>l,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:[d.key,d.value],done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return l}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let d=this._head,l=this.size;for(;d&&l>s;)this._map.delete(d.key),d=d.next,l--;this._head=d,this._size=l,d&&(d.previous=void 0),this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(this._head)s.next=this._head,this._head.previous=s;else throw new Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw new Error("Invalid list");this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw new Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw new Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{const d=s.next,l=s.previous;if(!d||!l)throw new Error("Invalid list");d.previous=l,l.next=d}s.next=void 0,s.previous=void 0,this._state++}touch(s,d){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(d!==e.First&&d!==e.Last)){if(d===e.First){if(s===this._head)return;const l=s.next,c=s.previous;s===this._tail?(c.next=void 0,this._tail=c):(l.previous=c,c.next=l),s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(d===e.Last){if(s===this._tail)return;const l=s.next,c=s.previous;s===this._head?(l.previous=void 0,this._head=l):(l.previous=c,c.next=l),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){const s=[];return this.forEach((d,l)=>{s.push([l,d])}),s}fromJSON(s){this.clear();for(const[d,l]of s)this.set(d,l)}}_e.LinkedMap=t;class r extends t{constructor(s,d=1){super(),this._limit=s,this._ratio=Math.min(Math.max(0,d),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.min(Math.max(0,s),1),this.checkTrim()}get(s,d=e.AsNew){return super.get(s,d)}peek(s){return super.get(s,e.None)}set(s,d){return super.set(s,d,e.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}return _e.LRUCache=r,_e}var rt={},En;function kr(){if(En)return rt;En=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.Disposable=void 0;var n;return(function(e){function t(r){return{dispose:r}}e.create=t})(n||(rt.Disposable=n={})),rt}var ze={},Lt={},Rn;function He(){if(Rn)return Lt;Rn=1,Object.defineProperty(Lt,"__esModule",{value:!0});let n;function e(){if(n===void 0)throw new Error("No runtime abstraction layer installed");return n}return(function(t){function r(a){if(a===void 0)throw new Error("No runtime abstraction layer provided");n=a}t.install=r})(e||(e={})),Lt.default=e,Lt}var Dn;function lt(){if(Dn)return ze;Dn=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.Emitter=ze.Event=void 0;const n=He();var e;(function(a){const s={dispose(){}};a.None=function(){return s}})(e||(ze.Event=e={}));class t{add(s,d=null,l){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(d),Array.isArray(l)&&l.push({dispose:()=>this.remove(s,d)})}remove(s,d=null){if(!this._callbacks)return;let l=!1;for(let c=0,h=this._callbacks.length;c<h;c++)if(this._callbacks[c]===s)if(this._contexts[c]===d){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else l=!0;if(l)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...s){if(!this._callbacks)return[];const d=[],l=this._callbacks.slice(0),c=this._contexts.slice(0);for(let h=0,p=l.length;h<p;h++)try{d.push(l[h].apply(c[h],s))}catch(_){(0,n.default)().console.error(_)}return d}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(s){this._options=s}get event(){return this._event||(this._event=(s,d,l)=>{this._callbacks||(this._callbacks=new t),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,d);const c={dispose:()=>{this._callbacks&&(this._callbacks.remove(s,d),c.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(l)&&l.push(c),c}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return ze.Emitter=r,r._noop=function(){},ze}var Be={},On;function on(){if(On)return Be;On=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.CancellationTokenSource=Be.CancellationToken=void 0;const n=He(),e=ut(),t=lt();var r;(function(l){l.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:t.Event.None}),l.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:t.Event.None});function c(h){const p=h;return p&&(p===l.None||p===l.Cancelled||e.boolean(p.isCancellationRequested)&&!!p.onCancellationRequested)}l.is=c})(r||(Be.CancellationToken=r={}));const a=Object.freeze(function(l,c){const h=(0,n.default)().timer.setTimeout(l.bind(c),0);return{dispose(){h.dispose()}}});class s{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new t.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class d{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}return Be.CancellationTokenSource=d,Be}var We={},Mn;function Ar(){if(Mn)return We;Mn=1,Object.defineProperty(We,"__esModule",{value:!0}),We.SharedArrayReceiverStrategy=We.SharedArraySenderStrategy=void 0;const n=on();var e;(function(d){d.Continue=0,d.Cancelled=1})(e||(e={}));class t{constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;const c=new SharedArrayBuffer(4),h=new Int32Array(c,0,1);h[0]=e.Continue,this.buffers.set(l.id,c),l.$cancellationData=c}async sendCancellation(l,c){const h=this.buffers.get(c);if(h===void 0)return;const p=new Int32Array(h,0,1);Atomics.store(p,0,e.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}}We.SharedArraySenderStrategy=t;class r{constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===e.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class a{constructor(l){this.token=new r(l)}cancel(){}dispose(){}}class s{constructor(){this.kind="request"}createCancellationTokenSource(l){const c=l.$cancellationData;return c===void 0?new n.CancellationTokenSource:new a(c)}}return We.SharedArrayReceiverStrategy=s,We}var ve={},it={},Ln;function Bn(){if(Ln)return it;Ln=1,Object.defineProperty(it,"__esModule",{value:!0}),it.Semaphore=void 0;const n=He();class e{constructor(r=1){if(r<=0)throw new Error("Capacity must be greater than 0");this._capacity=r,this._active=0,this._waiting=[]}lock(r){return new Promise((a,s)=>{this._waiting.push({thunk:r,resolve:a,reject:s}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const r=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const a=r.thunk();a instanceof Promise?a.then(s=>{this._active--,r.resolve(s),this.runNext()},s=>{this._active--,r.reject(s),this.runNext()}):(this._active--,r.resolve(a),this.runNext())}catch(a){this._active--,r.reject(a),this.runNext()}}}return it.Semaphore=e,it}var Nn;function Wn(){if(Nn)return ve;Nn=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.ReadableStreamMessageReader=ve.AbstractMessageReader=ve.MessageReader=void 0;const n=He(),e=ut(),t=lt(),r=Bn();var a;(function(c){function h(p){let _=p;return _&&e.func(_.listen)&&e.func(_.dispose)&&e.func(_.onError)&&e.func(_.onClose)&&e.func(_.onPartialMessage)}c.is=h})(a||(ve.MessageReader=a={}));class s{constructor(){this.errorEmitter=new t.Emitter,this.closeEmitter=new t.Emitter,this.partialMessageEmitter=new t.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(h){this.errorEmitter.fire(this.asError(h))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(h){this.partialMessageEmitter.fire(h)}asError(h){return h instanceof Error?h:new Error(`Reader received error. Reason: ${e.string(h.message)?h.message:"unknown"}`)}}ve.AbstractMessageReader=s;var d;(function(c){function h(p){let _,v;const E=new Map;let O;const J=new Map;if(p===void 0||typeof p=="string")_=p??"utf-8";else{if(_=p.charset??"utf-8",p.contentDecoder!==void 0&&(v=p.contentDecoder,E.set(v.name,v)),p.contentDecoders!==void 0)for(const $ of p.contentDecoders)E.set($.name,$);if(p.contentTypeDecoder!==void 0&&(O=p.contentTypeDecoder,J.set(O.name,O)),p.contentTypeDecoders!==void 0)for(const $ of p.contentTypeDecoders)J.set($.name,$)}return O===void 0&&(O=(0,n.default)().applicationJson.decoder,J.set(O.name,O)),{charset:_,contentDecoder:v,contentDecoders:E,contentTypeDecoder:O,contentTypeDecoders:J}}c.fromOptions=h})(d||(d={}));class l extends s{constructor(h,p){super(),this.readable=h,this.options=d.fromOptions(p),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new r.Semaphore(1)}set partialMessageTimeout(h){this._partialMessageTimeout=h}get partialMessageTimeout(){return this._partialMessageTimeout}listen(h){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=h;const p=this.readable.onData(_=>{this.onData(_)});return this.readable.onError(_=>this.fireError(_)),this.readable.onClose(()=>this.fireClose()),p}onData(h){try{for(this.buffer.append(h);;){if(this.nextMessageLength===-1){const _=this.buffer.tryReadHeaders(!0);if(!_)return;const v=_.get("content-length");if(!v){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
1
|
+
import{a6 as Sr,F as U,ao as Tr,cA as _n,cz as Er,ae as Pt,b9 as Rr,cg as nt}from"../datalayer-app-main.js";var ot={exports:{}};ot.exports;var vn;function Dr(){return vn||(vn=1,(function(n,e){var t=200,r="__lodash_hash_undefined__",a=800,s=16,d=9007199254740991,l="[object Arguments]",c="[object Array]",h="[object AsyncFunction]",p="[object Boolean]",_="[object Date]",v="[object Error]",E="[object Function]",O="[object GeneratorFunction]",J="[object Map]",$="[object Number]",Y="[object Null]",oe="[object Object]",Pe="[object Proxy]",be="[object RegExp]",ke="[object Set]",Ce="[object String]",we="[object Undefined]",Se="[object WeakMap]",Te="[object ArrayBuffer]",Ve="[object DataView]",Z="[object Float32Array]",R="[object Float64Array]",f="[object Int8Array]",T="[object Int16Array]",D="[object Int32Array]",S="[object Uint8Array]",M="[object Uint8ClampedArray]",kt="[object Uint16Array]",At="[object Uint32Array]",It=/[\\^$.*+?()[\]{}|]/g,Ae=/^\[object .+?Constructor\]$/,Ie=/^(?:0|[1-9]\d*)$/,A={};A[Z]=A[R]=A[f]=A[T]=A[D]=A[S]=A[M]=A[kt]=A[At]=!0,A[l]=A[c]=A[Te]=A[p]=A[Ve]=A[_]=A[v]=A[E]=A[J]=A[$]=A[oe]=A[be]=A[ke]=A[Ce]=A[Se]=!1;var Ee=typeof globalThis=="object"&&globalThis&&globalThis.Object===Object&&globalThis,Ge=typeof self=="object"&&self&&self.Object===Object&&self,ue=Ee||Ge||Function("return this")(),Je=e&&!e.nodeType&&e,ne=Je&&!0&&n&&!n.nodeType&&n,ae=ne&&ne.exports===Je,Re=ae&&Ee.process,ie=(function(){try{var i=ne&&ne.require&&ne.require("util").types;return i||Re&&Re.binding&&Re.binding("util")}catch{}})(),j=ie&&ie.isTypedArray;function fe(i,u,g){switch(g.length){case 0:return i.call(u);case 1:return i.call(u,g[0]);case 2:return i.call(u,g[0],g[1]);case 3:return i.call(u,g[0],g[1],g[2])}return i.apply(u,g)}function V(i,u){for(var g=-1,C=Array(i);++g<i;)C[g]=u(g);return C}function le(i){return function(u){return i(u)}}function Ke(i,u){return i?.[u]}function dt(i,u){return function(g){return i(u(g))}}var ht=Array.prototype,ft=Function.prototype,je=Object.prototype,se=ue["__core-js_shared__"],qe=ft.toString,de=je.hasOwnProperty,gt=(function(){var i=/[^.]+$/.exec(se&&se.keys&&se.keys.IE_PROTO||"");return i?"Symbol(src)_1."+i:""})(),pt=je.toString,jt=qe.call(Object),mt=RegExp("^"+qe.call(de).replace(It,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fe=ae?ue.Buffer:void 0,ge=ue.Symbol,Ze=ue.Uint8Array;Fe&&Fe.allocUnsafe;var _t=dt(Object.getPrototypeOf,Object),vt=Object.create,yt=je.propertyIsEnumerable,bt=ht.splice,pe=ge?ge.toStringTag:void 0,Ye=(function(){try{var i=Ht(Object,"defineProperty");return i({},"",{}),i}catch{}})(),qt=Fe?Fe.isBuffer:void 0,Ct=Math.max,Ft=Date.now,wt=Ht(ue,"Map"),ee=Ht(Object,"create"),Ut=(function(){function i(){}return function(u){if(!$e(u))return{};if(vt)return vt(u);i.prototype=u;var g=new i;return i.prototype=void 0,g}})();function me(i){var u=-1,g=i==null?0:i.length;for(this.clear();++u<g;){var C=i[u];this.set(C[0],C[1])}}function Qe(){this.__data__=ee?ee(null):{},this.size=0}function $t(i){var u=this.has(i)&&delete this.__data__[i];return this.size-=u?1:0,u}function Xe(i){var u=this.__data__;if(ee){var g=u[i];return g===r?void 0:g}return de.call(u,i)?u[i]:void 0}function xt(i){var u=this.__data__;return ee?u[i]!==void 0:de.call(u,i)}function De(i,u){var g=this.__data__;return this.size+=this.has(i)?0:1,g[i]=ee&&u===void 0?r:u,this}me.prototype.clear=Qe,me.prototype.delete=$t,me.prototype.get=Xe,me.prototype.has=xt,me.prototype.set=De;function X(i){var u=-1,g=i==null?0:i.length;for(this.clear();++u<g;){var C=i[u];this.set(C[0],C[1])}}function zt(){this.__data__=[],this.size=0}function Bt(i){var u=this.__data__,g=Q(u,i);if(g<0)return!1;var C=u.length-1;return g==C?u.pop():bt.call(u,g,1),--this.size,!0}function Ue(i){var u=this.__data__,g=Q(u,i);return g<0?void 0:u[g][1]}function St(i){return Q(this.__data__,i)>-1}function Tt(i,u){var g=this.__data__,C=Q(g,i);return C<0?(++this.size,g.push([i,u])):g[C][1]=u,this}X.prototype.clear=zt,X.prototype.delete=Bt,X.prototype.get=Ue,X.prototype.has=St,X.prototype.set=Tt;function he(i){var u=-1,g=i==null?0:i.length;for(this.clear();++u<g;){var C=i[u];this.set(C[0],C[1])}}function Et(){this.size=0,this.__data__={hash:new me,map:new(wt||X),string:new me}}function Oe(i){var u=Dt(this,i).delete(i);return this.size-=u?1:0,u}function o(i){return Dt(this,i).get(i)}function m(i){return Dt(this,i).has(i)}function y(i,u){var g=Dt(this,i),C=g.size;return g.set(i,u),this.size+=g.size==C?0:1,this}he.prototype.clear=Et,he.prototype.delete=Oe,he.prototype.get=o,he.prototype.has=m,he.prototype.set=y;function b(i){var u=this.__data__=new X(i);this.size=u.size}function q(){this.__data__=new X,this.size=0}function I(i){var u=this.__data__,g=u.delete(i);return this.size=u.size,g}function z(i){return this.__data__.get(i)}function H(i){return this.__data__.has(i)}function L(i,u){var g=this.__data__;if(g instanceof X){var C=g.__data__;if(!wt||C.length<t-1)return C.push([i,u]),this.size=++g.size,this;g=this.__data__=new he(C)}return g.set(i,u),this.size=g.size,this}b.prototype.clear=q,b.prototype.delete=I,b.prototype.get=z,b.prototype.has=H,b.prototype.set=L;function x(i,u){var g=Jt(i),C=!g&&Gt(i),N=!g&&!C&&dn(i),F=!g&&!C&&!N&&fn(i),B=g||C||N||F,k=B?V(i.length,String):[],W=k.length;for(var ce in i)B&&(ce=="length"||N&&(ce=="offset"||ce=="parent")||F&&(ce=="buffer"||ce=="byteLength"||ce=="byteOffset")||un(ce,W))||k.push(ce);return k}function P(i,u,g){(g!==void 0&&!Ot(i[u],g)||g===void 0&&!(u in i))&&te(i,u,g)}function G(i,u,g){var C=i[u];(!(de.call(i,u)&&Ot(C,g))||g===void 0&&!(u in i))&&te(i,u,g)}function Q(i,u){for(var g=i.length;g--;)if(Ot(i[g][0],u))return g;return-1}function te(i,u,g){u=="__proto__"&&Ye?Ye(i,u,{configurable:!0,enumerable:!0,value:g,writable:!0}):i[u]=g}var Wt=sr();function Rt(i){return i==null?i===void 0?we:Y:pe&&pe in Object(i)?or(i):hr(i)}function an(i){return et(i)&&Rt(i)==l}function Gn(i){if(!$e(i)||lr(i))return!1;var u=Qt(i)?mt:Ae;return u.test(mr(i))}function Jn(i){return et(i)&&hn(i.length)&&!!A[Rt(i)]}function Yn(i){if(!$e(i))return dr(i);var u=ln(i),g=[];for(var C in i)C=="constructor"&&(u||!de.call(i,C))||g.push(C);return g}function cn(i,u,g,C,N){i!==u&&Wt(u,function(F,B){if(N||(N=new b),$e(F))Qn(i,u,B,g,cn,C,N);else{var k=C?C(Vt(i,B),F,B+"",i,u,N):void 0;k===void 0&&(k=F),P(i,B,k)}},gn)}function Qn(i,u,g,C,N,F,B){var k=Vt(i,g),W=Vt(u,g),ce=B.get(W);if(ce){P(i,g,ce);return}var re=F?F(k,W,g+"",i,u,B):void 0,tt=re===void 0;if(tt){var Kt=Jt(W),Zt=!Kt&&dn(W),mn=!Kt&&!Zt&&fn(W);re=W,Kt||Zt||mn?Jt(k)?re=k:_r(k)?re=nr(k):Zt?(tt=!1,re=Xn(W)):mn?(tt=!1,re=tr(W)):re=[]:vr(W)||Gt(W)?(re=k,Gt(k)?re=yr(k):(!$e(k)||Qt(k))&&(re=ar(W))):tt=!1}tt&&(B.set(W,re),N(re,W,C,F,B),B.delete(W)),P(i,g,re)}function Kn(i,u){return gr(fr(i,u,pn),i+"")}var Zn=Ye?function(i,u){return Ye(i,"toString",{configurable:!0,enumerable:!1,value:Cr(u),writable:!0})}:pn;function Xn(i,u){return i.slice()}function er(i){var u=new i.constructor(i.byteLength);return new Ze(u).set(new Ze(i)),u}function tr(i,u){var g=er(i.buffer);return new i.constructor(g,i.byteOffset,i.length)}function nr(i,u){var g=-1,C=i.length;for(u||(u=Array(C));++g<C;)u[g]=i[g];return u}function rr(i,u,g,C){var N=!g;g||(g={});for(var F=-1,B=u.length;++F<B;){var k=u[F],W=void 0;W===void 0&&(W=i[k]),N?te(g,k,W):G(g,k,W)}return g}function ir(i){return Kn(function(u,g){var C=-1,N=g.length,F=N>1?g[N-1]:void 0,B=N>2?g[2]:void 0;for(F=i.length>3&&typeof F=="function"?(N--,F):void 0,B&&cr(g[0],g[1],B)&&(F=N<3?void 0:F,N=1),u=Object(u);++C<N;){var k=g[C];k&&i(u,k,C,F)}return u})}function sr(i){return function(u,g,C){for(var N=-1,F=Object(u),B=C(u),k=B.length;k--;){var W=B[++N];if(g(F[W],W,F)===!1)break}return u}}function Dt(i,u){var g=i.__data__;return ur(u)?g[typeof u=="string"?"string":"hash"]:g.map}function Ht(i,u){var g=Ke(i,u);return Gn(g)?g:void 0}function or(i){var u=de.call(i,pe),g=i[pe];try{i[pe]=void 0;var C=!0}catch{}var N=pt.call(i);return C&&(u?i[pe]=g:delete i[pe]),N}function ar(i){return typeof i.constructor=="function"&&!ln(i)?Ut(_t(i)):{}}function un(i,u){var g=typeof i;return u=u??d,!!u&&(g=="number"||g!="symbol"&&Ie.test(i))&&i>-1&&i%1==0&&i<u}function cr(i,u,g){if(!$e(g))return!1;var C=typeof u;return(C=="number"?Yt(g)&&un(u,g.length):C=="string"&&u in g)?Ot(g[u],i):!1}function ur(i){var u=typeof i;return u=="string"||u=="number"||u=="symbol"||u=="boolean"?i!=="__proto__":i===null}function lr(i){return!!gt&> in i}function ln(i){var u=i&&i.constructor,g=typeof u=="function"&&u.prototype||je;return i===g}function dr(i){var u=[];if(i!=null)for(var g in Object(i))u.push(g);return u}function hr(i){return pt.call(i)}function fr(i,u,g){return u=Ct(u===void 0?i.length-1:u,0),function(){for(var C=arguments,N=-1,F=Ct(C.length-u,0),B=Array(F);++N<F;)B[N]=C[u+N];N=-1;for(var k=Array(u+1);++N<u;)k[N]=C[N];return k[u]=g(B),fe(i,this,k)}}function Vt(i,u){if(!(u==="constructor"&&typeof i[u]=="function")&&u!="__proto__")return i[u]}var gr=pr(Zn);function pr(i){var u=0,g=0;return function(){var C=Ft(),N=s-(C-g);if(g=C,N>0){if(++u>=a)return arguments[0]}else u=0;return i.apply(void 0,arguments)}}function mr(i){if(i!=null){try{return qe.call(i)}catch{}try{return i+""}catch{}}return""}function Ot(i,u){return i===u||i!==i&&u!==u}var Gt=an((function(){return arguments})())?an:function(i){return et(i)&&de.call(i,"callee")&&!yt.call(i,"callee")},Jt=Array.isArray;function Yt(i){return i!=null&&hn(i.length)&&!Qt(i)}function _r(i){return et(i)&&Yt(i)}var dn=qt||wr;function Qt(i){if(!$e(i))return!1;var u=Rt(i);return u==E||u==O||u==h||u==Pe}function hn(i){return typeof i=="number"&&i>-1&&i%1==0&&i<=d}function $e(i){var u=typeof i;return i!=null&&(u=="object"||u=="function")}function et(i){return i!=null&&typeof i=="object"}function vr(i){if(!et(i)||Rt(i)!=oe)return!1;var u=_t(i);if(u===null)return!0;var g=de.call(u,"constructor")&&u.constructor;return typeof g=="function"&&g instanceof g&&qe.call(g)==jt}var fn=j?le(j):Jn;function yr(i){return rr(i,gn(i))}function gn(i){return Yt(i)?x(i):Yn(i)}var br=ir(function(i,u,g,C){cn(i,u,g,C)});function Cr(i){return function(){return i}}function pn(i){return i}function wr(){return!1}n.exports=br})(ot,ot.exports)),ot.exports}var Or=Dr();const Fn=Sr(Or);class Mr{constructor(e){this._widgetAdapter=e.widgetAdapter,this._extensions=e.extensions,e.editor.ready().then(t=>{this._injectExtensions(e.editor)})}dispose(){this.isDisposed||(this.isDisposed=!0,U.clearData(this))}_injectExtensions(e){const t=e.getEditor();!t||t.isDisposed||this._extensions.forEach(r=>{const a=r.factory({path:this._widgetAdapter.widget.context.path,editor:e,widgetAdapter:this._widgetAdapter,model:t.model,inline:!0});a&&t.injectExtension(a.instance(t))})}}const yn=Er.createButton,bn={"text/x-rsrc":"r","text/x-r-source":"r","text/x-ipython":"python"};class ei{constructor(e,t){this.widget=e,this.options=t,this._adapterConnected=new U(this),this._activeEditorChanged=new U(this),this._editorAdded=new U(this),this._editorRemoved=new U(this),this._disposed=new U(this),this._isDisposed=!1,this._virtualDocument=null,this._connectionManager=t.connectionManager,this._isConnected=!1,this._trans=(t.translator||Tr).load("jupyterlab"),this.widget.context.saveState.connect(this.onSaveState,this),this.connectionManager.closed.connect(this.onConnectionClosed,this),this.widget.disposed.connect(this.dispose,this),this._editorToAdapter=new WeakMap,this.editorAdded.connect(this._onEditorAdded,this),this.editorRemoved.connect(this._onEditorRemoved,this),this._connectionManager.languageServerManager.sessionsChanged.connect(this._onLspSessionOrFeatureChanged,this),this.options.featureManager.featureRegistered.connect(this._onLspSessionOrFeatureChanged,this)}get isDisposed(){return this._isDisposed}get hasMultipleEditors(){return this.editors.length>1}get widgetId(){return this.widget.id}get language(){if(bn.hasOwnProperty(this.mimeType))return bn[this.mimeType];{let e=this.mimeType.split(";")[0],[t,r]=e.split("/");return t==="application"||t==="text"?r.startsWith("x-")?r.substring(2):r:this.mimeType}}get adapterConnected(){return this._adapterConnected}get activeEditorChanged(){return this._activeEditorChanged}get disposed(){return this._disposed}get editorAdded(){return this._editorAdded}get editorRemoved(){return this._editorRemoved}get isConnected(){return this._isConnected}get connectionManager(){return this._connectionManager}get trans(){return this._trans}get updateFinished(){return this._updateFinished}get virtualDocument(){return this._virtualDocument}onConnectionClosed(e,{virtualDocument:t}){t===this.virtualDocument&&this.dispose()}dispose(){this._isDisposed||(this.editorAdded.disconnect(this._onEditorAdded,this),this.editorRemoved.disconnect(this._onEditorRemoved,this),this._connectionManager.languageServerManager.sessionsChanged.disconnect(this._onLspSessionOrFeatureChanged,this),this.options.featureManager.featureRegistered.disconnect(this._onLspSessionOrFeatureChanged,this),this._isDisposed=!0,this.disconnect(),this._virtualDocument=null,this._disposed.emit(),U.clearData(this))}disconnect(){var e,t;const r=(e=this.virtualDocument)===null||e===void 0?void 0:e.uri,{model:a}=this.widget.context;r&&this.connectionManager.unregisterDocument(r),a.contentChanged.disconnect(this._onContentChanged,this);for(let{ceEditor:s}of this.editors)this._editorRemoved.emit({editor:s});(t=this.virtualDocument)===null||t===void 0||t.dispose()}updateDocuments(){return this._isDisposed?(console.warn("Cannot update documents: adapter disposed"),Promise.reject("Cannot update documents: adapter disposed")):this.virtualDocument.updateManager.updateDocuments(this.editors)}documentChanged(e,t,r=!1){if(this._isDisposed){console.warn("Cannot swap document: adapter disposed");return}let a=this.connectionManager.connections.get(e.uri);if(!a?.isReady){console.log("Skipping document update signal: connection not ready");return}a.sendFullTextChange(e.value,e.documentInfo)}reloadConnection(){this.virtualDocument!==null&&(this.disconnect(),this.initVirtual(),this.connectDocument(this.virtualDocument,!0).catch(console.warn))}onSaveState(e,t){if(this.virtualDocument!==null&&t==="completed"){const r=[this.virtualDocument];for(let a of r){let s=this.connectionManager.connections.get(a.uri);if(s){s.sendSaved(a.documentInfo);for(let d of a.foreignDocuments.values())r.push(d)}}}}async onConnected(e){let{virtualDocument:t}=e;this._adapterConnected.emit(e),this._isConnected=!0;try{await this.updateDocuments()}catch(r){console.warn("Could not update documents",r);return}this.documentChanged(t,t,!0),e.connection.serverNotifications["$/logTrace"].connect((r,a)=>{console.log(e.connection.serverIdentifier,"trace",t.uri,a)},this),e.connection.serverNotifications["window/logMessage"].connect((r,a)=>{console.log(r.serverIdentifier+": "+a.message)},this),e.connection.serverNotifications["window/showMessage"].connect((r,a)=>{_n({title:this.trans.__("Message from ")+r.serverIdentifier,body:a.message})},this),e.connection.serverRequests["window/showMessageRequest"].setHandler(async r=>{const a=r.actions,s=a?a.map(c=>yn({label:c.title})):[yn({label:this.trans.__("Dismiss")})],d=await _n({title:this.trans.__("Message from ")+e.connection.serverIdentifier,body:r.message,buttons:s}),l=s.indexOf(d.button);return l===-1?null:a?a[l]:null})}async connectDocument(e,t=!1){e.foreignDocumentOpened.connect(this.onForeignDocumentOpened,this);const r=await this._connect(e).catch(console.error);r&&r.connection&&(e.changed.connect(this.documentChanged,this),t&&r.connection.sendOpenWhenReady(e.documentInfo))}initVirtual(){var e;(e=this._virtualDocument)===null||e===void 0||e.dispose(),this._virtualDocument=this.createVirtualDocument(),this._onLspSessionOrFeatureChanged()}async onForeignDocumentOpened(e,t){const{foreignDocument:r}=t;await this.connectDocument(r,!0),r.foreignDocumentClosed.connect(this._onForeignDocumentClosed,this)}_onEditorAdded(e,t){const{editor:r}=t,a=new Mr({editor:r,widgetAdapter:this,extensions:this.options.featureManager.extensionFactories()});this._editorToAdapter.set(r,a)}_onEditorRemoved(e,t){const{editor:r}=t,a=this._editorToAdapter.get(r);a?.dispose(),this._editorToAdapter.delete(r)}_onForeignDocumentClosed(e,t){const{foreignDocument:r}=t;r.foreignDocumentClosed.disconnect(this._onForeignDocumentClosed,this),r.foreignDocumentOpened.disconnect(this.onForeignDocumentOpened,this),r.changed.disconnect(this.documentChanged,this)}async _connect(e){let t=e.language,r={textDocument:{synchronization:{dynamicRegistration:!0,willSave:!1,didSave:!0,willSaveWaitUntil:!1}},workspace:{didChangeConfiguration:{dynamicRegistration:!0}}};r=Fn(r,this.options.featureManager.clientCapabilities());let a={capabilities:r,virtualDocument:e,language:t,hasLspSupportedFile:e.hasLspSupportedFile},s=await this.connectionManager.connect(a);if(s)return await this.onConnected({virtualDocument:e,connection:s}),{connection:s,virtualDocument:e}}async _onContentChanged(e){const t=this.updateDocuments();if(!t){console.warn("Could not update documents");return}this._updateFinished=t.catch(console.warn),await this.updateFinished}_shouldUpdateVirtualDocument(){const{languageServerManager:e}=this.connectionManager;return e.isEnabled&&this.options.featureManager.features.length>0}_onLspSessionOrFeatureChanged(){if(!this._virtualDocument)return;const{model:e}=this.widget.context;this._shouldUpdateVirtualDocument()?e.contentChanged.connect(this._onContentChanged,this):e.contentChanged.disconnect(this._onContentChanged,this)}}var Cn;(function(n){n.URL_NS="lsp"})(Cn||(Cn={}));const ti=new Pt("@jupyterlab/lsp:ILSPDocumentConnectionManager","Provides the virtual documents and language server connections service."),ni=new Pt("@jupyterlab/lsp:ILSPFeatureManager","Provides the language server feature manager. This token is required to register new client capabilities."),ri=new Pt("@jupyterlab/lsp:ILSPCodeExtractorsManager","Provides the code extractor manager. This token is required in your extension to register code extractor allowing the creation of multiple virtual document from an opened document."),ii=new Pt("@jupyterlab/lsp:IWidgetLSPAdapterTracker","Provides the WidgetLSPAdapter tracker. This token is required in your extension to track WidgetLSPAdapters.");var Me;(function(n){(function(e){e.PUBLISH_DIAGNOSTICS="textDocument/publishDiagnostics",e.SHOW_MESSAGE="window/showMessage",e.LOG_TRACE="$/logTrace",e.LOG_MESSAGE="window/logMessage"})(n.ServerNotification||(n.ServerNotification={})),(function(e){e.DID_CHANGE="textDocument/didChange",e.DID_CHANGE_CONFIGURATION="workspace/didChangeConfiguration",e.DID_OPEN="textDocument/didOpen",e.DID_SAVE="textDocument/didSave",e.INITIALIZED="initialized",e.SET_TRACE="$/setTrace"})(n.ClientNotification||(n.ClientNotification={})),(function(e){e.REGISTER_CAPABILITY="client/registerCapability",e.SHOW_MESSAGE_REQUEST="window/showMessageRequest",e.UNREGISTER_CAPABILITY="client/unregisterCapability",e.WORKSPACE_CONFIGURATION="workspace/configuration"})(n.ServerRequest||(n.ServerRequest={})),(function(e){e.CODE_ACTION="textDocument/codeAction",e.COMPLETION="textDocument/completion",e.COMPLETION_ITEM_RESOLVE="completionItem/resolve",e.DEFINITION="textDocument/definition",e.DOCUMENT_COLOR="textDocument/documentColor",e.DOCUMENT_HIGHLIGHT="textDocument/documentHighlight",e.DOCUMENT_SYMBOL="textDocument/documentSymbol",e.HOVER="textDocument/hover",e.IMPLEMENTATION="textDocument/implementation",e.INITIALIZE="initialize",e.REFERENCES="textDocument/references",e.RENAME="textDocument/rename",e.SIGNATURE_HELP="textDocument/signatureHelp",e.TYPE_DEFINITION="textDocument/typeDefinition",e.LINKED_EDITING_RANGE="textDocument/linkedEditingRange",e.INLINE_VALUE="textDocument/inlineValue",e.INLAY_HINT="textDocument/inlayHint",e.WORKSPACE_SYMBOL="workspace/symbol",e.WORKSPACE_SYMBOL_RESOLVE="workspaceSymbol/resolve",e.FORMATTING="textDocument/formatting",e.RANGE_FORMATTING="textDocument/rangeFormatting"})(n.ClientRequest||(n.ClientRequest={}))})(Me||(Me={}));async function Un(n){return new Promise(e=>{setTimeout(()=>{e()},n)})}function at(n,e=35,t=50,r=a=>a){return(async()=>{let a=0;for(;n()!==!0;){if(a+=1,e!==-1&&a>e)throw Error("Too many retrials");t=r(t),await Un(t)}return n})()}function Lr(n){const e=[];for(let t in n){const r=Nr(t.split("."),n[t]);e.push(r)}return Fn({},...e)}const Nr=(n,e)=>{const t=Object.create(null);let r=t;return n.forEach((a,s)=>{r[a]=Object.create(null),s===n.length-1?r[a]=e:r=r[a]}),t};class Pr extends Map{constructor(e,t){super(t),this.defaultFactory=e}get(e){return this.getOrCreate(e)}getOrCreate(e,...t){if(this.has(e))return super.get(e);{let r=this.defaultFactory(e,...t);return this.set(e,r),r}}}function $n(n,e){const t=JSON.parse(JSON.stringify(n)),{method:r,registerOptions:a}=e,s=r.substring(13)+"Provider";if(s)a?t[s]=JSON.parse(JSON.stringify(a)):t[s]=!0;else return console.warn("Could not register server capability.",e),null;return t}function xn(n,e){const t=JSON.parse(JSON.stringify(n)),{method:r}=e,a=r.substring(13)+"Provider";return delete t[a],t}var xe={},Mt={},Xt={},w={},K={},wn;function ut(){if(wn)return K;wn=1,Object.defineProperty(K,"__esModule",{value:!0}),K.stringArray=K.array=K.func=K.error=K.number=K.string=K.boolean=void 0;function n(l){return l===!0||l===!1}K.boolean=n;function e(l){return typeof l=="string"||l instanceof String}K.string=e;function t(l){return typeof l=="number"||l instanceof Number}K.number=t;function r(l){return l instanceof Error}K.error=r;function a(l){return typeof l=="function"}K.func=a;function s(l){return Array.isArray(l)}K.array=s;function d(l){return s(l)&&l.every(c=>e(c))}return K.stringArray=d,K}var Sn;function sn(){if(Sn)return w;Sn=1,Object.defineProperty(w,"__esModule",{value:!0}),w.Message=w.NotificationType9=w.NotificationType8=w.NotificationType7=w.NotificationType6=w.NotificationType5=w.NotificationType4=w.NotificationType3=w.NotificationType2=w.NotificationType1=w.NotificationType0=w.NotificationType=w.RequestType9=w.RequestType8=w.RequestType7=w.RequestType6=w.RequestType5=w.RequestType4=w.RequestType3=w.RequestType2=w.RequestType1=w.RequestType=w.RequestType0=w.AbstractMessageSignature=w.ParameterStructures=w.ResponseError=w.ErrorCodes=void 0;const n=ut();var e;(function(R){R.ParseError=-32700,R.InvalidRequest=-32600,R.MethodNotFound=-32601,R.InvalidParams=-32602,R.InternalError=-32603,R.jsonrpcReservedErrorRangeStart=-32099,R.serverErrorStart=-32099,R.MessageWriteError=-32099,R.MessageReadError=-32098,R.PendingResponseRejected=-32097,R.ConnectionInactive=-32096,R.ServerNotInitialized=-32002,R.UnknownErrorCode=-32001,R.jsonrpcReservedErrorRangeEnd=-32e3,R.serverErrorEnd=-32e3})(e||(w.ErrorCodes=e={}));class t extends Error{constructor(f,T,D){super(T),this.code=n.number(f)?f:e.UnknownErrorCode,this.data=D,Object.setPrototypeOf(this,t.prototype)}toJson(){const f={code:this.code,message:this.message};return this.data!==void 0&&(f.data=this.data),f}}w.ResponseError=t;class r{constructor(f){this.kind=f}static is(f){return f===r.auto||f===r.byName||f===r.byPosition}toString(){return this.kind}}w.ParameterStructures=r,r.auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName");class a{constructor(f,T){this.method=f,this.numberOfParams=T}get parameterStructures(){return r.auto}}w.AbstractMessageSignature=a;class s extends a{constructor(f){super(f,0)}}w.RequestType0=s;class d extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.RequestType=d;class l extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.RequestType1=l;class c extends a{constructor(f){super(f,2)}}w.RequestType2=c;class h extends a{constructor(f){super(f,3)}}w.RequestType3=h;class p extends a{constructor(f){super(f,4)}}w.RequestType4=p;class _ extends a{constructor(f){super(f,5)}}w.RequestType5=_;class v extends a{constructor(f){super(f,6)}}w.RequestType6=v;class E extends a{constructor(f){super(f,7)}}w.RequestType7=E;class O extends a{constructor(f){super(f,8)}}w.RequestType8=O;class J extends a{constructor(f){super(f,9)}}w.RequestType9=J;class $ extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.NotificationType=$;class Y extends a{constructor(f){super(f,0)}}w.NotificationType0=Y;class oe extends a{constructor(f,T=r.auto){super(f,1),this._parameterStructures=T}get parameterStructures(){return this._parameterStructures}}w.NotificationType1=oe;class Pe extends a{constructor(f){super(f,2)}}w.NotificationType2=Pe;class be extends a{constructor(f){super(f,3)}}w.NotificationType3=be;class ke extends a{constructor(f){super(f,4)}}w.NotificationType4=ke;class Ce extends a{constructor(f){super(f,5)}}w.NotificationType5=Ce;class we extends a{constructor(f){super(f,6)}}w.NotificationType6=we;class Se extends a{constructor(f){super(f,7)}}w.NotificationType7=Se;class Te extends a{constructor(f){super(f,8)}}w.NotificationType8=Te;class Ve extends a{constructor(f){super(f,9)}}w.NotificationType9=Ve;var Z;return(function(R){function f(S){const M=S;return M&&n.string(M.method)&&(n.string(M.id)||n.number(M.id))}R.isRequest=f;function T(S){const M=S;return M&&n.string(M.method)&&S.id===void 0}R.isNotification=T;function D(S){const M=S;return M&&(M.result!==void 0||!!M.error)&&(n.string(M.id)||n.number(M.id)||M.id===null)}R.isResponse=D})(Z||(w.Message=Z={})),w}var _e={},Tn;function zn(){if(Tn)return _e;Tn=1;var n;Object.defineProperty(_e,"__esModule",{value:!0}),_e.LRUCache=_e.LinkedMap=_e.Touch=void 0;var e;(function(a){a.None=0,a.First=1,a.AsOld=a.First,a.Last=2,a.AsNew=a.Last})(e||(_e.Touch=e={}));class t{constructor(){this[n]="LinkedMap",this._map=new Map,this._head=void 0,this._tail=void 0,this._size=0,this._state=0}clear(){this._map.clear(),this._head=void 0,this._tail=void 0,this._size=0,this._state++}isEmpty(){return!this._head&&!this._tail}get size(){return this._size}get first(){return this._head?.value}get last(){return this._tail?.value}has(s){return this._map.has(s)}get(s,d=e.None){const l=this._map.get(s);if(l)return d!==e.None&&this.touch(l,d),l.value}set(s,d,l=e.None){let c=this._map.get(s);if(c)c.value=d,l!==e.None&&this.touch(c,l);else{switch(c={key:s,value:d,next:void 0,previous:void 0},l){case e.None:this.addItemLast(c);break;case e.First:this.addItemFirst(c);break;case e.Last:this.addItemLast(c);break;default:this.addItemLast(c);break}this._map.set(s,c),this._size++}return this}delete(s){return!!this.remove(s)}remove(s){const d=this._map.get(s);if(d)return this._map.delete(s),this.removeItem(d),this._size--,d.value}shift(){if(!this._head&&!this._tail)return;if(!this._head||!this._tail)throw new Error("Invalid list");const s=this._head;return this._map.delete(s.key),this.removeItem(s),this._size--,s.value}forEach(s,d){const l=this._state;let c=this._head;for(;c;){if(d?s.bind(d)(c.value,c.key,this):s(c.value,c.key,this),this._state!==l)throw new Error("LinkedMap got modified during iteration.");c=c.next}}keys(){const s=this._state;let d=this._head;const l={[Symbol.iterator]:()=>l,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:d.key,done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return l}values(){const s=this._state;let d=this._head;const l={[Symbol.iterator]:()=>l,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:d.value,done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return l}entries(){const s=this._state;let d=this._head;const l={[Symbol.iterator]:()=>l,next:()=>{if(this._state!==s)throw new Error("LinkedMap got modified during iteration.");if(d){const c={value:[d.key,d.value],done:!1};return d=d.next,c}else return{value:void 0,done:!0}}};return l}[(n=Symbol.toStringTag,Symbol.iterator)](){return this.entries()}trimOld(s){if(s>=this.size)return;if(s===0){this.clear();return}let d=this._head,l=this.size;for(;d&&l>s;)this._map.delete(d.key),d=d.next,l--;this._head=d,this._size=l,d&&(d.previous=void 0),this._state++}addItemFirst(s){if(!this._head&&!this._tail)this._tail=s;else if(this._head)s.next=this._head,this._head.previous=s;else throw new Error("Invalid list");this._head=s,this._state++}addItemLast(s){if(!this._head&&!this._tail)this._head=s;else if(this._tail)s.previous=this._tail,this._tail.next=s;else throw new Error("Invalid list");this._tail=s,this._state++}removeItem(s){if(s===this._head&&s===this._tail)this._head=void 0,this._tail=void 0;else if(s===this._head){if(!s.next)throw new Error("Invalid list");s.next.previous=void 0,this._head=s.next}else if(s===this._tail){if(!s.previous)throw new Error("Invalid list");s.previous.next=void 0,this._tail=s.previous}else{const d=s.next,l=s.previous;if(!d||!l)throw new Error("Invalid list");d.previous=l,l.next=d}s.next=void 0,s.previous=void 0,this._state++}touch(s,d){if(!this._head||!this._tail)throw new Error("Invalid list");if(!(d!==e.First&&d!==e.Last)){if(d===e.First){if(s===this._head)return;const l=s.next,c=s.previous;s===this._tail?(c.next=void 0,this._tail=c):(l.previous=c,c.next=l),s.previous=void 0,s.next=this._head,this._head.previous=s,this._head=s,this._state++}else if(d===e.Last){if(s===this._tail)return;const l=s.next,c=s.previous;s===this._head?(l.previous=void 0,this._head=l):(l.previous=c,c.next=l),s.next=void 0,s.previous=this._tail,this._tail.next=s,this._tail=s,this._state++}}}toJSON(){const s=[];return this.forEach((d,l)=>{s.push([l,d])}),s}fromJSON(s){this.clear();for(const[d,l]of s)this.set(d,l)}}_e.LinkedMap=t;class r extends t{constructor(s,d=1){super(),this._limit=s,this._ratio=Math.min(Math.max(0,d),1)}get limit(){return this._limit}set limit(s){this._limit=s,this.checkTrim()}get ratio(){return this._ratio}set ratio(s){this._ratio=Math.min(Math.max(0,s),1),this.checkTrim()}get(s,d=e.AsNew){return super.get(s,d)}peek(s){return super.get(s,e.None)}set(s,d){return super.set(s,d,e.Last),this.checkTrim(),this}checkTrim(){this.size>this._limit&&this.trimOld(Math.round(this._limit*this._ratio))}}return _e.LRUCache=r,_e}var rt={},En;function kr(){if(En)return rt;En=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.Disposable=void 0;var n;return(function(e){function t(r){return{dispose:r}}e.create=t})(n||(rt.Disposable=n={})),rt}var ze={},Lt={},Rn;function He(){if(Rn)return Lt;Rn=1,Object.defineProperty(Lt,"__esModule",{value:!0});let n;function e(){if(n===void 0)throw new Error("No runtime abstraction layer installed");return n}return(function(t){function r(a){if(a===void 0)throw new Error("No runtime abstraction layer provided");n=a}t.install=r})(e||(e={})),Lt.default=e,Lt}var Dn;function lt(){if(Dn)return ze;Dn=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.Emitter=ze.Event=void 0;const n=He();var e;(function(a){const s={dispose(){}};a.None=function(){return s}})(e||(ze.Event=e={}));class t{add(s,d=null,l){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(s),this._contexts.push(d),Array.isArray(l)&&l.push({dispose:()=>this.remove(s,d)})}remove(s,d=null){if(!this._callbacks)return;let l=!1;for(let c=0,h=this._callbacks.length;c<h;c++)if(this._callbacks[c]===s)if(this._contexts[c]===d){this._callbacks.splice(c,1),this._contexts.splice(c,1);return}else l=!0;if(l)throw new Error("When adding a listener with a context, you should remove it with the same context")}invoke(...s){if(!this._callbacks)return[];const d=[],l=this._callbacks.slice(0),c=this._contexts.slice(0);for(let h=0,p=l.length;h<p;h++)try{d.push(l[h].apply(c[h],s))}catch(_){(0,n.default)().console.error(_)}return d}isEmpty(){return!this._callbacks||this._callbacks.length===0}dispose(){this._callbacks=void 0,this._contexts=void 0}}class r{constructor(s){this._options=s}get event(){return this._event||(this._event=(s,d,l)=>{this._callbacks||(this._callbacks=new t),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(s,d);const c={dispose:()=>{this._callbacks&&(this._callbacks.remove(s,d),c.dispose=r._noop,this._options&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this))}};return Array.isArray(l)&&l.push(c),c}),this._event}fire(s){this._callbacks&&this._callbacks.invoke.call(this._callbacks,s)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}}return ze.Emitter=r,r._noop=function(){},ze}var Be={},On;function on(){if(On)return Be;On=1,Object.defineProperty(Be,"__esModule",{value:!0}),Be.CancellationTokenSource=Be.CancellationToken=void 0;const n=He(),e=ut(),t=lt();var r;(function(l){l.None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:t.Event.None}),l.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:t.Event.None});function c(h){const p=h;return p&&(p===l.None||p===l.Cancelled||e.boolean(p.isCancellationRequested)&&!!p.onCancellationRequested)}l.is=c})(r||(Be.CancellationToken=r={}));const a=Object.freeze(function(l,c){const h=(0,n.default)().timer.setTimeout(l.bind(c),0);return{dispose(){h.dispose()}}});class s{constructor(){this._isCancelled=!1}cancel(){this._isCancelled||(this._isCancelled=!0,this._emitter&&(this._emitter.fire(void 0),this.dispose()))}get isCancellationRequested(){return this._isCancelled}get onCancellationRequested(){return this._isCancelled?a:(this._emitter||(this._emitter=new t.Emitter),this._emitter.event)}dispose(){this._emitter&&(this._emitter.dispose(),this._emitter=void 0)}}class d{get token(){return this._token||(this._token=new s),this._token}cancel(){this._token?this._token.cancel():this._token=r.Cancelled}dispose(){this._token?this._token instanceof s&&this._token.dispose():this._token=r.None}}return Be.CancellationTokenSource=d,Be}var We={},Mn;function Ar(){if(Mn)return We;Mn=1,Object.defineProperty(We,"__esModule",{value:!0}),We.SharedArrayReceiverStrategy=We.SharedArraySenderStrategy=void 0;const n=on();var e;(function(d){d.Continue=0,d.Cancelled=1})(e||(e={}));class t{constructor(){this.buffers=new Map}enableCancellation(l){if(l.id===null)return;const c=new SharedArrayBuffer(4),h=new Int32Array(c,0,1);h[0]=e.Continue,this.buffers.set(l.id,c),l.$cancellationData=c}async sendCancellation(l,c){const h=this.buffers.get(c);if(h===void 0)return;const p=new Int32Array(h,0,1);Atomics.store(p,0,e.Cancelled)}cleanup(l){this.buffers.delete(l)}dispose(){this.buffers.clear()}}We.SharedArraySenderStrategy=t;class r{constructor(l){this.data=new Int32Array(l,0,1)}get isCancellationRequested(){return Atomics.load(this.data,0)===e.Cancelled}get onCancellationRequested(){throw new Error("Cancellation over SharedArrayBuffer doesn't support cancellation events")}}class a{constructor(l){this.token=new r(l)}cancel(){}dispose(){}}class s{constructor(){this.kind="request"}createCancellationTokenSource(l){const c=l.$cancellationData;return c===void 0?new n.CancellationTokenSource:new a(c)}}return We.SharedArrayReceiverStrategy=s,We}var ve={},it={},Ln;function Bn(){if(Ln)return it;Ln=1,Object.defineProperty(it,"__esModule",{value:!0}),it.Semaphore=void 0;const n=He();class e{constructor(r=1){if(r<=0)throw new Error("Capacity must be greater than 0");this._capacity=r,this._active=0,this._waiting=[]}lock(r){return new Promise((a,s)=>{this._waiting.push({thunk:r,resolve:a,reject:s}),this.runNext()})}get active(){return this._active}runNext(){this._waiting.length===0||this._active===this._capacity||(0,n.default)().timer.setImmediate(()=>this.doRunNext())}doRunNext(){if(this._waiting.length===0||this._active===this._capacity)return;const r=this._waiting.shift();if(this._active++,this._active>this._capacity)throw new Error("To many thunks active");try{const a=r.thunk();a instanceof Promise?a.then(s=>{this._active--,r.resolve(s),this.runNext()},s=>{this._active--,r.reject(s),this.runNext()}):(this._active--,r.resolve(a),this.runNext())}catch(a){this._active--,r.reject(a),this.runNext()}}}return it.Semaphore=e,it}var Nn;function Wn(){if(Nn)return ve;Nn=1,Object.defineProperty(ve,"__esModule",{value:!0}),ve.ReadableStreamMessageReader=ve.AbstractMessageReader=ve.MessageReader=void 0;const n=He(),e=ut(),t=lt(),r=Bn();var a;(function(c){function h(p){let _=p;return _&&e.func(_.listen)&&e.func(_.dispose)&&e.func(_.onError)&&e.func(_.onClose)&&e.func(_.onPartialMessage)}c.is=h})(a||(ve.MessageReader=a={}));class s{constructor(){this.errorEmitter=new t.Emitter,this.closeEmitter=new t.Emitter,this.partialMessageEmitter=new t.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(h){this.errorEmitter.fire(this.asError(h))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(h){this.partialMessageEmitter.fire(h)}asError(h){return h instanceof Error?h:new Error(`Reader received error. Reason: ${e.string(h.message)?h.message:"unknown"}`)}}ve.AbstractMessageReader=s;var d;(function(c){function h(p){let _,v;const E=new Map;let O;const J=new Map;if(p===void 0||typeof p=="string")_=p??"utf-8";else{if(_=p.charset??"utf-8",p.contentDecoder!==void 0&&(v=p.contentDecoder,E.set(v.name,v)),p.contentDecoders!==void 0)for(const $ of p.contentDecoders)E.set($.name,$);if(p.contentTypeDecoder!==void 0&&(O=p.contentTypeDecoder,J.set(O.name,O)),p.contentTypeDecoders!==void 0)for(const $ of p.contentTypeDecoders)J.set($.name,$)}return O===void 0&&(O=(0,n.default)().applicationJson.decoder,J.set(O.name,O)),{charset:_,contentDecoder:v,contentDecoders:E,contentTypeDecoder:O,contentTypeDecoders:J}}c.fromOptions=h})(d||(d={}));class l extends s{constructor(h,p){super(),this.readable=h,this.options=d.fromOptions(p),this.buffer=(0,n.default)().messageBuffer.create(this.options.charset),this._partialMessageTimeout=1e4,this.nextMessageLength=-1,this.messageToken=0,this.readSemaphore=new r.Semaphore(1)}set partialMessageTimeout(h){this._partialMessageTimeout=h}get partialMessageTimeout(){return this._partialMessageTimeout}listen(h){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=h;const p=this.readable.onData(_=>{this.onData(_)});return this.readable.onError(_=>this.fireError(_)),this.readable.onClose(()=>this.fireClose()),p}onData(h){try{for(this.buffer.append(h);;){if(this.nextMessageLength===-1){const _=this.buffer.tryReadHeaders(!0);if(!_)return;const v=_.get("content-length");if(!v){this.fireError(new Error(`Header must provide a Content-Length property.
|
|
2
2
|
${JSON.stringify(Object.fromEntries(_))}`));return}const E=parseInt(v);if(isNaN(E)){this.fireError(new Error(`Content-Length value must be a number. Got ${v}`));return}this.nextMessageLength=E}const p=this.buffer.tryReadBody(this.nextMessageLength);if(p===void 0){this.setPartialMessageTimer();return}this.clearPartialMessageTimer(),this.nextMessageLength=-1,this.readSemaphore.lock(async()=>{const _=this.options.contentDecoder!==void 0?await this.options.contentDecoder.decode(p):p,v=await this.options.contentTypeDecoder.decode(_,this.options);this.callback(v)}).catch(_=>{this.fireError(_)})}}catch(p){this.fireError(p)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,n.default)().timer.setTimeout((h,p)=>{this.partialMessageTimer=void 0,h===this.messageToken&&(this.firePartialMessage({messageToken:h,waitingTime:p}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}return ve.ReadableStreamMessageReader=l,ve}var ye={},Pn;function Hn(){if(Pn)return ye;Pn=1,Object.defineProperty(ye,"__esModule",{value:!0}),ye.WriteableStreamMessageWriter=ye.AbstractMessageWriter=ye.MessageWriter=void 0;const n=He(),e=ut(),t=Bn(),r=lt(),a="Content-Length: ",s=`\r
|
|
3
3
|
`;var d;(function(p){function _(v){let E=v;return E&&e.func(E.dispose)&&e.func(E.onClose)&&e.func(E.onError)&&e.func(E.write)}p.is=_})(d||(ye.MessageWriter=d={}));class l{constructor(){this.errorEmitter=new r.Emitter,this.closeEmitter=new r.Emitter}dispose(){this.errorEmitter.dispose(),this.closeEmitter.dispose()}get onError(){return this.errorEmitter.event}fireError(_,v,E){this.errorEmitter.fire([this.asError(_),v,E])}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}asError(_){return _ instanceof Error?_:new Error(`Writer received error. Reason: ${e.string(_.message)?_.message:"unknown"}`)}}ye.AbstractMessageWriter=l;var c;(function(p){function _(v){return v===void 0||typeof v=="string"?{charset:v??"utf-8",contentTypeEncoder:(0,n.default)().applicationJson.encoder}:{charset:v.charset??"utf-8",contentEncoder:v.contentEncoder,contentTypeEncoder:v.contentTypeEncoder??(0,n.default)().applicationJson.encoder}}p.fromOptions=_})(c||(c={}));class h extends l{constructor(_,v){super(),this.writable=_,this.options=c.fromOptions(v),this.errorCount=0,this.writeSemaphore=new t.Semaphore(1),this.writable.onError(E=>this.fireError(E)),this.writable.onClose(()=>this.fireClose())}async write(_){return this.writeSemaphore.lock(async()=>this.options.contentTypeEncoder.encode(_,this.options).then(E=>this.options.contentEncoder!==void 0?this.options.contentEncoder.encode(E):E).then(E=>{const O=[];return O.push(a,E.byteLength.toString(),s),O.push(s),this.doWrite(_,O,E)},E=>{throw this.fireError(E),E}))}async doWrite(_,v,E){try{return await this.writable.write(v.join(""),"ascii"),this.writable.write(E)}catch(O){return this.handleError(O,_),Promise.reject(O)}}handleError(_,v){this.errorCount++,this.fireError(_,v,this.errorCount)}end(){this.writable.end()}}return ye.WriteableStreamMessageWriter=h,ye}var st={},kn;function Ir(){if(kn)return st;kn=1,Object.defineProperty(st,"__esModule",{value:!0}),st.AbstractMessageBuffer=void 0;const n=13,e=10,t=`\r
|
|
4
4
|
`;class r{constructor(s="utf-8"){this._encoding=s,this._chunks=[],this._totalLength=0}get encoding(){return this._encoding}append(s){const d=typeof s=="string"?this.fromString(s,this._encoding):s;this._chunks.push(d),this._totalLength+=d.byteLength}tryReadHeaders(s=!1){if(this._chunks.length===0)return;let d=0,l=0,c=0,h=0;e:for(;l<this._chunks.length;){const E=this._chunks[l];for(c=0;c<E.length;){switch(E[c]){case n:switch(d){case 0:d=1;break;case 2:d=3;break;default:d=0}break;case e:switch(d){case 1:d=2;break;case 3:d=4,c++;break e;default:d=0}break;default:d=0}c++}h+=E.byteLength,l++}if(d!==4)return;const p=this._read(h+c),_=new Map,v=this.toString(p,"ascii").split(t);if(v.length<2)return _;for(let E=0;E<v.length-2;E++){const O=v[E],J=O.indexOf(":");if(J===-1)throw new Error(`Message header must separate key and value using ':'
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{cg as l}from"../datalayer-app-main.js";const d=16895,f=33206,p=1,E=2;function P(o){return"node"in o}const g=":",y="/api/drive.v1",m=4096,w=new TextEncoder,S=new TextDecoder("utf-8"),u={0:!1,1:!0,2:!0,64:!0,65:!0,66:!0,129:!0,193:!0,514:!0,577:!0,578:!0,705:!0,706:!0,1024:!0,1025:!0,1026:!0,1089:!0,1090:!0,1153:!0,1154:!0,1217:!0,1218:!0,4096:!0,4098:!0};class N{fs;constructor(t){this.fs=t}open(t){const e=this.fs.realPath(t.node);this.fs.FS.isFile(t.node.mode)&&(t.file=this.fs.API.get(e))}close(t){if(!this.fs.FS.isFile(t.node.mode)||!t.file)return;const e=this.fs.realPath(t.node),r=t.flags;let s=typeof r=="string"?parseInt(r,10):r;s&=8191;let n=!0;s in u&&(n=u[s]),n&&this.fs.API.put(e,t.file),t.file=void 0}read(t,e,r,s,n){if(s<=0||t.file===void 0||n>=(t.file.data.length||0))return 0;const a=Math.min(t.file.data.length-n,s);return e.set(t.file.data.subarray(n,n+a),r),a}write(t,e,r,s,n){if(s<=0||t.file===void 0)return 0;if(t.node.timestamp=Date.now(),n+s>(t.file?.data.length||0)){const a=t.file.data?t.file.data:new Uint8Array;t.file.data=new Uint8Array(n+s),t.file.data.set(a)}return t.file.data.set(e.subarray(r,r+s),n),s}llseek(t,e,r){let s=e;if(r===p)s+=t.position;else if(r===E&&this.fs.FS.isFile(t.node.mode))if(t.file!==void 0)s+=t.file.data.length;else throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM);if(s<0)throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EINVAL);return s}}class O{fs;constructor(t){this.fs=t}node(t){return P(t)?t.node:t}getattr(t){const e=this.node(t);return{...this.fs.API.getattr(this.fs.realPath(e)),mode:e.mode,ino:e.id}}setattr(t,e){const r=this.node(t);for(const[s,n]of Object.entries(e))switch(s){case"mode":r.mode=n;break;case"timestamp":r.timestamp=n;break;case"size":{const a=n,h=this.fs.realPath(r);if(this.fs.FS.isFile(r.mode)&&a>=0){const i=this.fs.API.get(h),c=i.data?i.data:new Uint8Array;a!==c.length&&(a<c.length?i.data=i.data.slice(0,a):(i.data=new Uint8Array(a),i.data.set(c)),this.fs.API.put(h,i))}else console.warn("setattr size of",a,"on",r,"not yet implemented");break}default:console.warn("setattr",s,"of",n,"on",r,"not yet implemented");break}}lookup(t,e){const r=this.node(t),s=this.fs.PATH.join2(this.fs.realPath(r),e),n=this.fs.API.lookup(s);if(!n.ok)throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.ENOENT);return this.fs.createNode(r,e,n.mode,0)}mknod(t,e,r,s){const n=this.node(t),a=this.fs.PATH.join2(this.fs.realPath(n),e);return this.fs.API.mknod(a,r),this.fs.createNode(n,e,r,s)}rename(t,e,r){const s=this.node(t),n=this.node(e);this.fs.API.rename(s.parent?this.fs.PATH.join2(this.fs.realPath(s.parent),s.name):s.name,this.fs.PATH.join2(this.fs.realPath(n),r)),s.name=r,s.parent=n}unlink(t,e){this.fs.API.rmdir(this.fs.PATH.join2(this.fs.realPath(this.node(t)),e))}rmdir(t,e){this.fs.API.rmdir(this.fs.PATH.join2(this.fs.realPath(this.node(t)),e))}readdir(t){return this.fs.API.readdir(this.fs.realPath(this.node(t)))}symlink(t,e,r){throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM)}readlink(t){throw new this.fs.FS.ErrnoError(this.fs.ERRNO_CODES.EPERM)}}class _{constructor(t,e,r,s){this._driveName=t,this._mountpoint=e,this.FS=r,this.ERRNO_CODES=s}lookup(t){return this.request({method:"lookup",path:this.normalizePath(t)})}getmode(t){return this.request({method:"getmode",path:this.normalizePath(t)})}mknod(t,e){return this.request({method:"mknod",path:this.normalizePath(t),data:{mode:e}})}rename(t,e){return this.request({method:"rename",path:this.normalizePath(t),data:{newPath:this.normalizePath(e)}})}readdir(t){const e=this.request({method:"readdir",path:this.normalizePath(t)});return e.push("."),e.push(".."),e}rmdir(t){return this.request({method:"rmdir",path:this.normalizePath(t)})}get(t){const e=this.request({method:"get",path:this.normalizePath(t)});if(!e)throw new this.FS.ErrnoError(this.ERRNO_CODES.ENOENT);const r=e.content,s=e.format;switch(s){case"json":case"text":return{data:w.encode(r),format:s};case"base64":{const n=atob(r),a=n.length,h=new Uint8Array(a);for(let i=0;i<a;i++)h[i]=n.charCodeAt(i);return{data:h,format:s}}default:throw new this.FS.ErrnoError(this.ERRNO_CODES.ENOENT)}}put(t,e){switch(e.format){case"json":case"text":return this.request({method:"put",path:this.normalizePath(t),data:{format:e.format,data:S.decode(e.data)}});case"base64":{let r="";for(let s=0;s<e.data.byteLength;s++)r+=String.fromCharCode(e.data[s]);return this.request({method:"put",path:this.normalizePath(t),data:{format:e.format,data:btoa(r)}})}}}getattr(t){const e=this.request({method:"getattr",path:this.normalizePath(t)});return e.atime&&(e.atime=new Date(e.atime)),e.mtime&&(e.mtime=new Date(e.mtime)),e.ctime&&(e.ctime=new Date(e.ctime)),e.size=e.size||0,e}normalizePath(t){return t.startsWith(this._mountpoint)&&(t=t.slice(this._mountpoint.length)),this._driveName&&(t=`${this._driveName}${g}${t}`),t}_driveName;_mountpoint;FS;ERRNO_CODES}class R extends _{constructor(t,e,r,s,n){super(e,r,s,n),this._baseUrl=t}request(t){const e=new XMLHttpRequest;e.open("POST",encodeURI(this.endpoint),!1);try{e.send(JSON.stringify(t))}catch(r){console.error(r)}if(e.status>=400)throw new this.FS.ErrnoError(this.ERRNO_CODES.EINVAL);return JSON.parse(e.responseText)}get endpoint(){return`${this._baseUrl}api/drive`}_baseUrl}class D{FS;API;PATH;ERRNO_CODES;driveName;constructor(t){this.FS=t.FS,this.PATH=t.PATH,this.ERRNO_CODES=t.ERRNO_CODES,this.API=this.createAPI(t),this.driveName=t.driveName,this.node_ops=new O(this),this.stream_ops=new N(this)}node_ops;stream_ops;createAPI(t){return new R(t.baseUrl,t.driveName,t.mountpoint,t.FS,t.ERRNO_CODES)}mount(t){return this.createNode(null,t.mountpoint,d|511,0)}createNode(t,e,r,s){const n=this.FS;if(!n.isDir(r)&&!n.isFile(r))throw new n.ErrnoError(this.ERRNO_CODES.EINVAL);const a=n.createNode(t,e,r,s);return a.node_ops=this.node_ops,a.stream_ops=this.stream_ops,a}getMode(t){return this.API.getmode(t)}realPath(t){const e=[];let r=t;for(e.push(r.name);r.parent!==r;)r=r.parent,e.push(r.name);return e.reverse(),this.PATH.join.apply(null,e)}}class F{contentsManager;constructor(t){this.contentsManager=t.contentsManager}async processDriveRequest(t){switch(t.method){case"readdir":return this.readdir(t);case"rmdir":return this.rmdir(t);case"rename":return this.rename(t);case"getmode":return this.getmode(t);case"lookup":return this.lookup(t);case"mknod":return this.mknod(t);case"getattr":return this.getattr(t);case"get":return this.get(t);case"put":return this.put(t)}throw`Drive request ${t.method} does not exist.`}async readdir(t){const e=await this.contentsManager.get(t.path,{content:!0});let r=[];return e.type==="directory"&&e.content&&(r=e.content.map(s=>s.name)),r}async rmdir(t){return await this.contentsManager.delete(t.path),null}async rename(t){return await this.contentsManager.rename(t.path,t.data.newPath),null}async getmode(t){const e=await this.contentsManager.get(t.path);let r;return e.type==="directory"?r=d:r=f,r}async lookup(t){let e;try{e={ok:!0,mode:(await this.contentsManager.get(t.path)).type==="directory"?d:f}}catch{e={ok:!1}}return e}async mknod(t){const e=await this.contentsManager.newUntitled({path:l.PathExt.dirname(t.path),type:t.data.mode===d?"directory":"file",ext:l.PathExt.extname(t.path)});return await this.contentsManager.rename(e.path,t.path),null}async getattr(t){const e=await this.contentsManager.get(t.path),r=new Date(0).toISOString();return{dev:1,nlink:1,uid:0,gid:0,rdev:0,size:e.size||0,blksize:m,blocks:Math.ceil(e.size||0/m),atime:e.last_modified||r,mtime:e.last_modified||r,ctime:e.created||r,timestamp:0}}async get(t){const e=await this.contentsManager.get(t.path,{content:!0});let r;return e.type!=="directory"&&(r={content:e.format==="json"?JSON.stringify(e.content):e.content,format:e.format}),r}async put(t){return await this.contentsManager.save(t.path,{content:t.data.format==="json"?JSON.parse(t.data.data):t.data.data,type:"file",format:t.data.format}),null}}export{m as B,_ as C,F as D,f as F,p as S,y as a,d as b,g as c,D as d,O as e,N as f,E as g,R as h,P as i};
|
package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-PMrBUO9H.js → ebnfDiagram-PWID7BFC-DJ-S4zNP.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-0GCrhixv.js";import{p as l}from"./chunk-JWPE2WC7-DC1wY1Ne.js";import{_ as t,l as s}from"./index-DtYYe0Cw.js";import"./index-BtjXlYA2.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-D8Lw5okC.js";import"../datalayer-app-main.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-BLnKxlFS.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./index-p2ZGnxJX.js";var c=f().RailroadEbnf.parser.LangiumParser,o=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return o(e.element);case"EbnfOptional":return{type:"optional",element:o(e.element)};case"EbnfRepetition":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),v=t(e=>{l(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),s.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;s.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),s.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},D={parser:g,db:n,renderer:p,styles:m};export{D as diagram};
|
package/dist-embed/chunks/{ebnfDiagram-PWID7BFC-DMXmlTDY.js → ebnfDiagram-PWID7BFC-DktGPWnR.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-
|
|
1
|
+
import{g as m,r as p,d as n}from"./chunk-SVP7TREG-2ZP0qWw_.js";import{p as l}from"./chunk-JWPE2WC7-SVeaXwdX.js";import{_ as t,l as s}from"./mermaid.core-CLv-vCjs.js";import"./index-BtjXlYA2.js";import{M as u,a as f}from"./cynefin-OW5HDTMX-BVK0_S--.js";import"../datalayer-app-main.js";import"./fastdom-promised-BVkcNAgN.js";import"./line-BLnKxlFS.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";import"./_baseRest-BmxuuM4H.js";import"./isSymbol-BLtK9CV6.js";import"./forEach-hknrtmxV.js";import"./isUndefined-wBqHC1Hw.js";import"./index-p2ZGnxJX.js";var c=f().RailroadEbnf.parser.LangiumParser,o=t(e=>{const r=e.alternatives.map(E);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformChoice"),E=t(e=>{const r=e.elements.map(d);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformSequence"),i=t(e=>{switch(e.$type){case"EbnfTerminal":return{type:"terminal",value:e.value};case"EbnfNonTerminal":return{type:"nonterminal",name:e.name};case"EbnfSpecial":return{type:"special",text:e.text};case"EbnfGroup":return o(e.element);case"EbnfOptional":return{type:"optional",element:o(e.element)};case"EbnfRepetition":return{type:"repetition",element:o(e.element),min:0,max:1/0};default:throw new Error(`Unsupported EBNF primary node: ${e.$type}`)}},"transformPrimary"),b=t((e,r)=>{switch(r.$type){case"EbnfOptionalPostfix":return{type:"optional",element:e};case"EbnfZeroOrMorePostfix":return{type:"repetition",element:e,min:0,max:1/0};case"EbnfOneOrMorePostfix":return{type:"repetition",element:e,min:1,max:1/0};case"EbnfExceptionPostfix":return{type:"sequence",elements:[e,{type:"terminal",value:"-"},i(r.except)]};default:throw new Error(`Unsupported EBNF postfix node: ${r.$type}`)}},"transformPostfix"),d=t(e=>e.postfixes.reduce((r,a)=>b(r,a),i(e.base)),"transformTerm"),y=t(e=>({name:e.name,definition:o(e.definition)}),"transformRule"),v=t(e=>{l(e,n),e.title&&n.setTitle(e.title),e.rules.map(r=>n.addRule(y(r)))},"populateDb"),g={parse:t(e=>{n.clear(),s.debug("[EBNF Parser] Starting Langium parse");const r=c.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new u(r);const a=r.value;s.debug("[EBNF Parser] Parsed rules:",a.rules.length),v(a),s.debug("[EBNF Parser] Parse complete")},"parse"),parser:{yy:n}},D={parser:g,db:n,renderer:p,styles:m};export{D as diagram};
|