@inkeep/open-knowledge 0.64.0-beta.3 → 0.64.0-beta.4
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/{acp-harness-probe-DDqiQmm_.mjs → acp-harness-probe-B0ZOHZTz.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-C-QXBCBl.mjs +2 -0
- package/dist/index.d.mts +37 -2
- package/dist/index.mjs +1 -1
- package/dist/init-DPb4O5KS.mjs +1 -0
- package/dist/{init-8KXad73_.mjs → init-XAxC4-D4.mjs} +3 -3
- package/dist/{launch-json-removal-BwH0QFXd.mjs → launch-json-removal-1-8ZHJtz.mjs} +2 -2
- package/dist/{loader-COdw9cCC.mjs → loader-BAhIE_G7.mjs} +2 -2
- package/dist/loader-DhmZ3k83.mjs +1 -0
- package/dist/{preview-DLUqlPI6.mjs → preview-W17sbyAM.mjs} +2 -2
- package/dist/preview-ztEEIVyt.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-DVp1gZjW.js → ActivityModeContent-CTkq714U.js} +1 -1
- package/dist/public/assets/{AddPropertiesButton-B4mgksK9.js → AddPropertiesButton-BPD1FL9u.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-CxHgKni7.js → AgentDiffPane-irQjcz1_.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-DjPyJZC2.js → AgentThreadClientBinder-BVL-74Xg.js} +1 -1
- package/dist/public/assets/{AppMenubar-D2MAtGAz.js → AppMenubar-ywn95n5_.js} +1 -1
- package/dist/public/assets/{BugReportHistory-CVve2Axu.js → BugReportHistory-DH6PeCd-.js} +1 -1
- package/dist/public/assets/{BugReportHistoryDialog-Ba061U9i.js → BugReportHistoryDialog-B8YFi-N2.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-BL-5Q3Jo.js → CodeMirrorPropInput-kIJWwKe4.js} +2 -2
- package/dist/public/assets/{ConfigSharingInfoTooltip-BAHlj9xZ.js → ConfigSharingInfoTooltip-CmY8gl8k.js} +1 -1
- package/dist/public/assets/{ConsentDialogBody-CzH4EuI3.js → ConsentDialogBody-oXXodDvV.js} +1 -1
- package/dist/public/assets/{DiffView-D8XUmPm-.js → DiffView-BgxYEqNK.js} +1 -1
- package/dist/public/assets/DocumentContext-6gn-Aiv8.js +38 -0
- package/dist/public/assets/{EditorModeToggle-D6L8r63B.js → EditorModeToggle-BaN2Oili.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-BZuygRVh.js → EnableSyncConfirmDialog-xkXGTFo0.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-D2QIjqhX.js → ExcalidrawDocEditor-Dj9eB-pP.js} +4 -4
- package/dist/public/assets/FeedbackForm-BnoSzKB_.js +1 -0
- package/dist/public/assets/{GraphPanel-ByInPd3a.js → GraphPanel-DwUEHRhD.js} +1 -1
- package/dist/public/assets/{ImportSkillDialog-BAk-BVT8.js → ImportSkillDialog-DkMQKyPv.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-a6yi3Ww5.js → LintConfigEditor-B-NsTPbc.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-DL8NyQe3.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-D8geiZjG.js → ManagedArtifactProperties-rX7XGDin.js} +1 -1
- package/dist/public/assets/{McpConsentDialogBody-DVBhoRAw.js → McpConsentDialogBody-Da_YGlKw.js} +1 -1
- package/dist/public/assets/{Mermaid-C9X7cjZ1.js → Mermaid-BAKMqFxz.js} +2 -2
- package/dist/public/assets/{MermaidDocEditor-04iIKbvP.js → MermaidDocEditor-yQOGFE0A.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-Cn7uHncy.js → PropertyDisplayRow-Du0eofgg.js} +2 -2
- package/dist/public/assets/{RegisteredAgentIcon-DIfsdEiW.js → RegisteredAgentIcon-C5l0ngck.js} +1 -1
- package/dist/public/assets/ReportBugDialogBody-CSy9sPgF.js +3 -0
- package/dist/public/assets/ReportBugMenuTrigger-DcXixDKs.js +2 -0
- package/dist/public/assets/{RowDisclosure-BTtG2df8.js → RowDisclosure-BD4HJbRH.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-fWpkoH9e.js → SchemaConfigEditor-Bw4WfNdB.js} +1 -1
- package/dist/public/assets/{SessionsHost-BbabLBoa.js → SessionsHost-Bb2LhY4k.js} +2 -2
- package/dist/public/assets/SettingsDialogBody-BOlhS9Ub.js +12 -0
- package/dist/public/assets/{ShareBranchSwitchDialog-CPFRMiPb.js → ShareBranchSwitchDialog-MPieYF0-.js} +1 -1
- package/dist/public/assets/{ShareReceiveDialog-DHygzplb.js → ShareReceiveDialog-Dv4IxMEt.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-DDYsfJz-.js → ShareReceiveMissDialog-BDMgkM4B.js} +1 -1
- package/dist/public/assets/{SkillCostValue-Dh3W83GI.js → SkillCostValue-BN4Joz66.js} +1 -1
- package/dist/public/assets/{SkillEditBanner-Dmd9x2GL.js → SkillEditBanner-ojtVKJKQ.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-Bj4eanWC.js → SkillInstallMenu-B3V2W9x9.js} +1 -1
- package/dist/public/assets/{SkillOriginInline-DPbc95eY.js → SkillOriginInline-C997nHPd.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-CiKYhqeu.js → SkillToolbarControls-Dj-887tA.js} +1 -1
- package/dist/public/assets/{SlidesToolbarControls-DukKIknR.js → SlidesToolbarControls-DW6XStbl.js} +1 -1
- package/dist/public/assets/{SourceEditor-ChRbLJso.js → SourceEditor-YP4-TM8J.js} +1 -1
- package/dist/public/assets/{TerminalPanel-niWqOudS.js → TerminalPanel-CT7hDlGm.js} +1 -1
- package/dist/public/assets/{TerminalStartingNotice-LVCAO53j.js → TerminalStartingNotice-5YXAirXU.js} +1 -1
- package/dist/public/assets/TerminalWindowApp-YPZsrULF.js +1 -0
- package/dist/public/assets/{TextDocEditor-DYyxuF3J.js → TextDocEditor-7bDJHloT.js} +1 -1
- package/dist/public/assets/{ThemePicker-DXALMWUA.js → ThemePicker-BEVvKk5L.js} +1 -1
- package/dist/public/assets/{ThreadView-Dg2ocFRD.js → ThreadView-DP3_zX56.js} +7 -7
- package/dist/public/assets/{TimelineDiffPane-Dq7qjm7t.js → TimelineDiffPane-DG4VaixQ.js} +1 -1
- package/dist/public/assets/{abnfDiagram-N423BO3Z-CcNzibSW.js → abnfDiagram-N423BO3Z-DBJ3AZ9J.js} +1 -1
- package/dist/public/assets/{agent-diff-store-B3dLX7vR.js → agent-diff-store-DikFdttU.js} +1 -1
- package/dist/public/assets/{alert-dialog-v-lStrvw.js → alert-dialog-BV3f4Vr2.js} +1 -1
- package/dist/public/assets/{architectureDiagram-T3A2C74G-x7KhBP2B.js → architectureDiagram-T3A2C74G-DHhiMV1e.js} +1 -1
- package/dist/public/assets/arrow-up-right-BTi7mHwL.js +1 -0
- package/dist/public/assets/{auth-state-cache-D7CM6sAp.js → auth-state-cache-Oucukckm.js} +4 -4
- package/dist/public/assets/{badge-zJWUwhkd.js → badge-52pHek8I.js} +1 -1
- package/dist/public/assets/{blockDiagram-VBNYF7ZC-_DUjKmqC.js → blockDiagram-VBNYF7ZC-B0XVQOlY.js} +1 -1
- package/dist/public/assets/{braces-DmS8bWjv.js → braces-Bzye844v.js} +1 -1
- package/dist/public/assets/{bug-report-send-manager-CXIJIjU-.js → bug-report-send-manager-Di-wNg5H.js} +1 -1
- package/dist/public/assets/{button-CA0dewJJ.js → button-Cym3gapE.js} +1 -1
- package/dist/public/assets/{c4Diagram-5PPSVZJV-BvXPINTk.js → c4Diagram-5PPSVZJV-C0fXVzxK.js} +1 -1
- package/dist/public/assets/{calendar-D-m9ekuo.js → calendar-P1YHNDVH.js} +1 -1
- package/dist/public/assets/{case-sensitive-m-hzm2Fd.js → case-sensitive-BwklrMJw.js} +1 -1
- package/dist/public/assets/channel-Bw1oZ3oX.js +1 -0
- package/dist/public/assets/check-Dut4Aov8.js +1 -0
- package/dist/public/assets/{checkbox-C60ghXVs.js → checkbox-UfDS9TpS.js} +1 -1
- package/dist/public/assets/{chevron-down-Dkq_Sx62.js → chevron-down-DNO3PgI_.js} +1 -1
- package/dist/public/assets/chevron-left-Dhf0Sw0W.js +1 -0
- package/dist/public/assets/chevron-right-4mYNnAZZ.js +1 -0
- package/dist/public/assets/{chunk-2GRJ4B5K-Cj6-Oom3.js → chunk-2GRJ4B5K-I9g7v43C.js} +1 -1
- package/dist/public/assets/{chunk-3NCLNEKW-Bd-QhfAE.js → chunk-3NCLNEKW-CIPZUTs2.js} +1 -1
- package/dist/public/assets/{chunk-4I5QYGJK-DTmx7k3q.js → chunk-4I5QYGJK-CJSo7JWo.js} +1 -1
- package/dist/public/assets/{chunk-5RXB4S5H-szWjFIhQ.js → chunk-5RXB4S5H-CV_VIHj4.js} +1 -1
- package/dist/public/assets/{chunk-6Q2QTUOP-vClzZXZJ.js → chunk-6Q2QTUOP-HonjM1WC.js} +1 -1
- package/dist/public/assets/{chunk-7Z6QIM7H-CG3W4Gq4.js → chunk-7Z6QIM7H-C7MoQiZ1.js} +1 -1
- package/dist/public/assets/{chunk-BO2N2NFS-DhLAiJRz.js → chunk-BO2N2NFS-D2iiEks4.js} +4 -4
- package/dist/public/assets/{chunk-GF5L2VYU-D2VOXB1D.js → chunk-GF5L2VYU-DMKobWUK.js} +1 -1
- package/dist/public/assets/{chunk-I66GZJ75-BIJACljW.js → chunk-I66GZJ75-BUquu3u4.js} +1 -1
- package/dist/public/assets/{chunk-J7OUQ5F2-IIkcOqGv.js → chunk-J7OUQ5F2-D_xZJOyH.js} +2 -2
- package/dist/public/assets/{chunk-JQJVKLGR-QOce9PgS.js → chunk-JQJVKLGR-DEq8-3eQ.js} +1 -1
- package/dist/public/assets/{chunk-KBJHAD2P-B80ctoly.js → chunk-KBJHAD2P-D4Yduc8o.js} +1 -1
- package/dist/public/assets/{chunk-NSK5VX7P-DLJZ8VNx.js → chunk-NSK5VX7P-BW0NvKtJ.js} +1 -1
- package/dist/public/assets/{chunk-QR6OTTB3-DfBTRDdj.js → chunk-QR6OTTB3-BAd_wKMz.js} +1 -1
- package/dist/public/assets/{chunk-UBXNYLIW-zy0cmc7-.js → chunk-UBXNYLIW-xJmEmvG8.js} +1 -1
- package/dist/public/assets/{chunk-W5SLKNZC-dHRGG7r8.js → chunk-W5SLKNZC-9q5ZT0Or.js} +1 -1
- package/dist/public/assets/{chunk-WRU74C26-DC6Jygyt.js → chunk-WRU74C26-DEuLBlab.js} +1 -1
- package/dist/public/assets/{circle-alert-CeU2sqgg.js → circle-alert-b-E0_BIP.js} +1 -1
- package/dist/public/assets/classDiagram-JCYQIIEL-CrlbOdYD.js +1 -0
- package/dist/public/assets/classDiagram-v2-OCEON4UE-CrkjdB4S.js +1 -0
- package/dist/public/assets/{client-version-Cr4yDTzO.js → client-version-DpPDNVRX.js} +1 -1
- package/dist/public/assets/{cm-theme-CUQw2QSJ.js → cm-theme-CvD6eMwN.js} +1 -1
- package/dist/public/assets/{code-highlighter-impl-DQmjHoA2.js → code-highlighter-impl-CGDVGaGi.js} +1 -1
- package/dist/public/assets/{collapsible-COrqeoHr.js → collapsible-DYySK8La.js} +1 -1
- package/dist/public/assets/comment-chips-BNT5yiMX.js +5 -0
- package/dist/public/assets/{config-provider-DyH_5S1M.js → config-provider-D9QQqC6e.js} +3 -3
- package/dist/public/assets/context-api-dUnlgSJr.js +1 -0
- package/dist/public/assets/{cynefinDiagram-MW4NZA55-CqGzh2Za.js → cynefinDiagram-MW4NZA55-Vp3Z3EOq.js} +1 -1
- package/dist/public/assets/{dagre-VZM6K2ZE-1ir2rJwc.js → dagre-VZM6K2ZE-BsNhh3lr.js} +1 -1
- package/dist/public/assets/{diagram-7IWD3JNH-Bj6PNtgh.js → diagram-7IWD3JNH-CntjEuMQ.js} +1 -1
- package/dist/public/assets/{diagram-B4RE2ZJO-Dz4Gdk3e.js → diagram-B4RE2ZJO-CxKY34wz.js} +1 -1
- package/dist/public/assets/{diagram-LBJQPF4R-DwZPbSOO.js → diagram-LBJQPF4R-CAoRKtuu.js} +1 -1
- package/dist/public/assets/{diagram-Q27KOJAE-DpBefHrG.js → diagram-Q27KOJAE-Bexqwg9W.js} +1 -1
- package/dist/public/assets/{diagram-UB23O5K3-CnYsy3bR.js → diagram-UB23O5K3-BO3f0yq6.js} +1 -1
- package/dist/public/assets/{dialog-CkCtHEOY.js → dialog-Ba9N5nEw.js} +1 -1
- package/dist/public/assets/{dist-BNjWPf5h.js → dist-4YFTUwt_.js} +1 -1
- package/dist/public/assets/{dist-BpVYX4pM2.js → dist-B6U1sHwQ2.js} +1 -1
- package/dist/public/assets/{dist-DJUH3LhV.js → dist-BDna-dOq.js} +1 -1
- package/dist/public/assets/{dist-C2xqTq7L.js → dist-BXlOzfrR.js} +1 -1
- package/dist/public/assets/dist-BY_vnlVW2.js +1 -0
- package/dist/public/assets/{dist-DsLZcVyZ.js → dist-BcvirUWL.js} +1 -1
- package/dist/public/assets/{dist-BF2Tao7_.js → dist-Bd3O90Cl.js} +1 -1
- package/dist/public/assets/{dist-gTGB_-tT.js → dist-Bn0BEeMP.js} +1 -1
- package/dist/public/assets/{dist-CSCWMTfQ.js → dist-CMrReMig.js} +1 -1
- package/dist/public/assets/{dist-Bun0_jqP.js → dist-CWL3ooGG.js} +1 -1
- package/dist/public/assets/{dist-aPIbpbAV.js → dist-CZYk4Gmy.js} +1 -1
- package/dist/public/assets/{dist-D_jhHcmP.js → dist-CfolydxL.js} +1 -1
- package/dist/public/assets/{dist-CUculQn6.js → dist-CkzVKD46.js} +1 -1
- package/dist/public/assets/{dist-BvwnbioL.js → dist-DRO03ovd.js} +1 -1
- package/dist/public/assets/{dist-BTeDUJz7.js → dist-DTZ5Uilk.js} +4 -4
- package/dist/public/assets/{dist-D6nD_291.js → dist-DXjgrsHI.js} +1 -1
- package/dist/public/assets/{dist-DOg6TrZ3.js → dist-DatS2_-H.js} +1 -1
- package/dist/public/assets/{dist-BcWdMddd.js → dist-Dhtu02232.js} +1 -1
- package/dist/public/assets/{dist-DbEdNEy-2.js → dist-DnnH0RLX2.js} +1 -1
- package/dist/public/assets/{dist-C1JnQAE8.js → dist-Ds0ot8zG.js} +1 -1
- package/dist/public/assets/{dist-Cu8jzM5J.js → dist-GoOli512.js} +1 -1
- package/dist/public/assets/{dist-CtBjTqZn.js → dist-MhaicsMV.js} +1 -1
- package/dist/public/assets/dist-wcXwpuqG.js +1 -0
- package/dist/public/assets/{dist-DkdJazl9.js → dist-xXHzlM2r.js} +1 -1
- package/dist/public/assets/{doc-paths-DRMElswC.js → doc-paths-CbSX4XTW.js} +1 -1
- package/dist/public/assets/{documents-events-DhF_sptK.js → documents-events-DxL5ysM1.js} +1 -1
- package/dist/public/assets/dropdown-menu-CRvS0_4-.js +1 -0
- package/dist/public/assets/{ebnfDiagram-BXEA7PRR-CbFOpeAM.js → ebnfDiagram-BXEA7PRR-DC58rQAn.js} +1 -1
- package/dist/public/assets/{erDiagram-JOGREHBK-CZ9JcnST.js → erDiagram-JOGREHBK-CUz9pdjc.js} +1 -1
- package/dist/public/assets/{es2015-wpLRKwCl.js → es2015-B9_uRFGw.js} +1 -1
- package/dist/public/assets/{eye-DrF_XrDR.js → eye-7pio2q9G.js} +1 -1
- package/dist/public/assets/{field-Ml4KaP--.js → field-XqXEu64v.js} +1 -1
- package/dist/public/assets/{file-tree-adapter-hJoW3AuD.js → file-tree-adapter-Dfj6r2ub.js} +1 -1
- package/dist/public/assets/{file-tree-utils-Cb7_vXe_.js → file-tree-utils-Cs7B4muN.js} +1 -1
- package/dist/public/assets/flowDiagram-UKHOOZJN-DHMrplYi.js +1 -0
- package/dist/public/assets/{folder-config-api-CBCo8vGy.js → folder-config-api-DrObHnBt.js} +1 -1
- package/dist/public/assets/{folder-open-BGKIxsBF.js → folder-open-BWpLO6wT.js} +1 -1
- package/dist/public/assets/{form-DWhbcQ6z.js → form-BntZOc7C.js} +1 -1
- package/dist/public/assets/{ganttDiagram-PKOTCBZU-BHB-hUMH.js → ganttDiagram-PKOTCBZU-C2NMWsS0.js} +1 -1
- package/dist/public/assets/{git-branch-CYpvbxHz.js → git-branch-3CSRgL0o.js} +1 -1
- package/dist/public/assets/{gitGraphDiagram-DS77QQ5N-ZJ5Y224L.js → gitGraphDiagram-DS77QQ5N-CVdMqGMX.js} +1 -1
- package/dist/public/assets/{globals-BuFIIVIr.css → globals-20k8qIHJ.css} +1 -1
- package/dist/public/assets/{hash-DdgzU_HC.js → hash-3VQG5UJ7.js} +1 -1
- package/dist/public/assets/{highlighted-body-OFNGDK62-PeS0VpT5.js → highlighted-body-OFNGDK62-UCUIw0Lt.js} +1 -1
- package/dist/public/assets/i18n-CP94ib4l.js +1 -0
- package/dist/public/assets/index-DxkeeuEK.js +2204 -0
- package/dist/public/assets/{info-YXcJ2AqB.js → info-SlzbpjOb.js} +1 -1
- package/dist/public/assets/{infoDiagram-6WML65LV-BG7MF-gX.js → infoDiagram-6WML65LV-D2JV8LcI.js} +1 -1
- package/dist/public/assets/{input-group-Co1pGUva.js → input-group-DpVg5lNG.js} +1 -1
- package/dist/public/assets/{ishikawaDiagram-WSZJBQD7-B0JcQQJV.js → ishikawaDiagram-WSZJBQD7-YJJMNAlB.js} +1 -1
- package/dist/public/assets/{journeyDiagram-NVQOT4AX-CU6rukz3.js → journeyDiagram-NVQOT4AX-NC-EWDbF.js} +1 -1
- package/dist/public/assets/{kanban-definition-27J2QSJJ-XgZkt40N.js → kanban-definition-27J2QSJJ-A5wz4I7T.js} +1 -1
- package/dist/public/assets/{label-Bbz2bT-a.js → label-D-K3fWtj.js} +1 -1
- package/dist/public/assets/{launch-agent-thread-b9-Dv6tT.js → launch-agent-thread-J0X5JOlh.js} +1 -1
- package/dist/public/assets/{launcher-selection-Bld0AvL_.js → launcher-selection-B27yBVlr.js} +1 -1
- package/dist/public/assets/{lib-BoSom6iA.js → lib-DmueaA5E.js} +1 -1
- package/dist/public/assets/{lib-D6L_wV12.js → lib-vOz_s3tj.js} +1 -1
- package/dist/public/assets/{line-B4oNUbqJ.js → line-BURCYBOK.js} +1 -1
- package/dist/public/assets/{lint-config-client-DEbFKblI.js → lint-config-client-DbEZKTUk.js} +1 -1
- package/dist/public/assets/{lint-plugin-meta-C39uvKXt.js → lint-plugin-meta-LEBWvINg.js} +1 -1
- package/dist/public/assets/{list-plus-DZ9qXaBL.js → list-plus-nPRgk4Qi.js} +1 -1
- package/dist/public/assets/{local-menu-action-bus-CXdHCOml.js → local-menu-action-bus-BLEUyEvu.js} +1 -1
- package/dist/public/assets/{markdownlint-rule-browser-CajbFe11.js → markdownlint-rule-browser-CLc72-TR.js} +1 -1
- package/dist/public/assets/mermaid-GHXKKRXX-BmYrNHJr.js +1 -0
- package/dist/public/assets/{mermaid.core-CRAU02Cc.js → mermaid.core-C0IvVkS9.js} +3 -3
- package/dist/public/assets/mermaid.core-DhUKqb7Q.js +1 -0
- package/dist/public/assets/messages-B9v-Dl6o.js +1 -0
- package/dist/public/assets/messages-BNKgouAQ.js +1 -0
- package/dist/public/assets/messages-BWVpwygE.js +1 -0
- package/dist/public/assets/messages-BdoFX7Ke.js +1 -0
- package/dist/public/assets/messages-BozLzcJu.js +1 -0
- package/dist/public/assets/messages-C0rOkBCJ.js +1 -0
- package/dist/public/assets/messages-CF7zITDG.js +1 -0
- package/dist/public/assets/messages-CIBqdK6N.js +1 -0
- package/dist/public/assets/messages-CfXBJncQ.js +1 -0
- package/dist/public/assets/messages-DXdzgbRq.js +1 -0
- package/dist/public/assets/messages-G8fhkSEs.js +1 -0
- package/dist/public/assets/messages-z_LlF45n.js +1 -0
- package/dist/public/assets/{mindmap-definition-FAOFIHXS-CbNRnPS1.js → mindmap-definition-FAOFIHXS-CKQxgOGt.js} +1 -1
- package/dist/public/assets/minus-VHw16jS_.js +1 -0
- package/dist/public/assets/{miss-dialog-store-DtLnMdOO.js → miss-dialog-store-DVpIaq34.js} +1 -1
- package/dist/public/assets/{ok-B0nm7wTQ.js → ok-Z-u-nHAF.js} +1 -1
- package/dist/public/assets/{package-CisN94Rd.js → package-B5dxtZEP.js} +1 -1
- package/dist/public/assets/{page-list-cache-QK9n5Q5R.js → page-list-cache-4RZDQAIl.js} +1 -1
- package/dist/public/assets/{panel-right-open-BgAOqW9e.js → panel-right-open-B0h13QHr.js} +1 -1
- package/dist/public/assets/{paperclip-DTGtQ_JR.js → paperclip-ChAyZqn8.js} +1 -1
- package/dist/public/assets/{pegDiagram-VL7TDLO6-1D9kW7ay.js → pegDiagram-VL7TDLO6-BHV9FATd.js} +1 -1
- package/dist/public/assets/{pending-receive-nav-store-Dgzal0Jj.js → pending-receive-nav-store-CakgGJjG.js} +1 -1
- package/dist/public/assets/{pieDiagram-7S7Q4E2Y-CAWP7eNl.js → pieDiagram-7S7Q4E2Y-vlst6sEu.js} +1 -1
- package/dist/public/assets/{platform-labels-CQrhw-5Z.js → platform-labels-DdSSzvdg.js} +1 -1
- package/dist/public/assets/{popover-BlSDN3zW.js → popover-B7jXm65e.js} +1 -1
- package/dist/public/assets/{progress-Bssl1FLe.js → progress-BJuxWr77.js} +1 -1
- package/dist/public/assets/{project-paths-CBkV3-Ol.js → project-paths-vxe5ndBy.js} +1 -1
- package/dist/public/assets/{prop-types-BGEVLmnR.js → prop-types-DcE7SWmX.js} +1 -1
- package/dist/public/assets/{propagation-api-BqnX4XED.js → propagation-api-DC5404fy.js} +1 -1
- package/dist/public/assets/{quadrantDiagram-CIZ2JOQS-Z4KSVoW4.js → quadrantDiagram-CIZ2JOQS-aZGa0dqP.js} +1 -1
- package/dist/public/assets/radio-group-npdxiS6E.js +1 -0
- package/dist/public/assets/{railroadDiagram-AXF67PYL-BP83q5bW.js → railroadDiagram-AXF67PYL-Daf6Zy7e.js} +1 -1
- package/dist/public/assets/{receive-store-SbtZ93F8.js → receive-store-CkD0UhDA.js} +1 -1
- package/dist/public/assets/{refresh-cw-BaBMjcrv.js → refresh-cw-DwRz6AkS.js} +1 -1
- package/dist/public/assets/{requirementDiagram-LRYGKXZP--AY3V6V9.js → requirementDiagram-LRYGKXZP-C8dZAU1p.js} +1 -1
- package/dist/public/assets/{sankeyDiagram-W5VNT64P-B-TG-dlh.js → sankeyDiagram-W5VNT64P-DSVSXy_1.js} +1 -1
- package/dist/public/assets/{select-Bs8KgWvR.js → select-XEGYznMI.js} +1 -1
- package/dist/public/assets/{selection-context-BbFFffLG.js → selection-context-BFI-bqiT.js} +1 -1
- package/dist/public/assets/{separator-B8dpHmeD.js → separator-C6x7j8mC.js} +1 -1
- package/dist/public/assets/{sequenceDiagram-SI44F4Z6-CXQngtIb.js → sequenceDiagram-SI44F4Z6-Bnbh_rO1.js} +1 -1
- package/dist/public/assets/{skill-scope-D3YD_IZ5.js → skill-scope-grqY_b8j.js} +1 -1
- package/dist/public/assets/{skills-api-BHMzgYxx.js → skills-api-DNXy9jz0.js} +1 -1
- package/dist/public/assets/{spinner-OTMpJ3P-.js → spinner-t7GahFcQ.js} +1 -1
- package/dist/public/assets/{square-pen-CBDgB7xx.js → square-pen-K4JT0cp9.js} +1 -1
- package/dist/public/assets/{src-B7bXrIgD.js → src-DXdR4ZQN.js} +1 -1
- package/dist/public/assets/{stateDiagram-OKZ733FA-DjmKNgc-.js → stateDiagram-OKZ733FA-DS5XYAjU.js} +1 -1
- package/dist/public/assets/stateDiagram-v2-UEYNNEHI-BWm5URXG.js +1 -0
- package/dist/public/assets/{swimlanes-SLNWSIFB-W7I7Md-O.js → swimlanes-SLNWSIFB-BGX6QMGe.js} +1 -1
- package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-CQ5DIVBE.js +8 -0
- package/dist/public/assets/{switch-BeP1gMN6.js → switch-iwBsEWej.js} +1 -1
- package/dist/public/assets/{tabs-r9BJxNSQ.js → tabs-BNfoCymd.js} +1 -1
- package/dist/public/assets/{tag-pill-input-CIT-G8TJ.js → tag-pill-input-D34lLgUq.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-BePi2-hy.js → target-navigation-intent-XZyK8hlI.js} +1 -1
- package/dist/public/assets/{telemetry-impl-C53i8fXP.js → telemetry-impl-CQvRl6_a.js} +1 -1
- package/dist/public/assets/{telemetry-startup-BuxfLmwJ.js → telemetry-startup-BZHG8uvV.js} +1 -1
- package/dist/public/assets/{terminal-tB03Ykfq.js → terminal-D4HSnHXf.js} +1 -1
- package/dist/public/assets/terminal-cli-display-C3XNS9Zb.js +1 -0
- package/dist/public/assets/{terminal-launch-events-D3fBT3uk.js → terminal-launch-events-BgzVfom1.js} +1 -1
- package/dist/public/assets/{terminal-telemetry-DogVmcEg.js → terminal-telemetry-CWD0Kbui.js} +1 -1
- package/dist/public/assets/{text-viewer-languages-CmBalDDz.js → text-viewer-languages-DRp_Y82n.js} +2 -2
- package/dist/public/assets/{thread-client-DG1ERL6y.js → thread-client-CyOBKqv0.js} +1 -1
- package/dist/public/assets/{timeline-definition-Z64GVDOM-Cl223Ubn.js → timeline-definition-Z64GVDOM-BKNoWHPk.js} +1 -1
- package/dist/public/assets/toggle-group-C2_37kV5.js +1 -0
- package/dist/public/assets/{tooltip-DPvMEqsq.js → tooltip-DttaCTqz.js} +1 -1
- package/dist/public/assets/{trash-2-BvCgdeps.js → trash-2-CePzTX_C.js} +1 -1
- package/dist/public/assets/{triangle-alert-BMtjvBBD.js → triangle-alert-D0n54WVY.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-BQPFhb8j.js → typing-burst-detector-CHFv8DDa.js} +2 -2
- package/dist/public/assets/{undo-2-DI8uqzmR.js → undo-2-BOBiJGd5.js} +1 -1
- package/dist/public/assets/{uninstall-DreCX4_1.js → uninstall-Cl4LM0CB.js} +1 -1
- package/dist/public/assets/{use-activity-panel-CR337nsy.js → use-activity-panel-BdGnO2Z6.js} +1 -1
- package/dist/public/assets/{use-apply-config-color-theme-D4rPvW8P.js → use-apply-config-color-theme-Bwj3f7UC.js} +1 -1
- package/dist/public/assets/{use-collab-url-D5rWSAYA.js → use-collab-url-OrVAc6Wo.js} +1 -1
- package/dist/public/assets/{use-live-xterm-theme-DeqoKEyE.js → use-live-xterm-theme-5k6Gqiaw.js} +1 -1
- package/dist/public/assets/{use-open-skill-B6OWc3jt.js → use-open-skill-DymWWnJ_.js} +1 -1
- package/dist/public/assets/use-settings-route-BFU85dl8.js +1 -0
- package/dist/public/assets/{use-skill-origin-QOgMC_cx.js → use-skill-origin-BTVSbkkb.js} +1 -1
- package/dist/public/assets/{use-skills-CUyxM_-s.js → use-skills-Dn1UHdyr.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-BUJSR3VC.js → use-terminal-enabled-DkT9h5DB.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-CQ3Ngq3P.js +6 -0
- package/dist/public/assets/{use-workspace-DHq4JpK0.js → use-workspace-BfO5PsIE.js} +1 -1
- package/dist/public/assets/{vennDiagram-T6HMQDX7-B_vlI0S5.js → vennDiagram-T6HMQDX7-CRzUxobP.js} +1 -1
- package/dist/public/assets/{wardleyDiagram-T6FBY63Y-D3R5qk6E.js → wardleyDiagram-T6FBY63Y-CoEGckrX.js} +1 -1
- package/dist/public/assets/{wrench-DtgyRnkw.js → wrench-ZOpNzIoC.js} +1 -1
- package/dist/public/assets/x-C0WDbk6g.js +1 -0
- package/dist/public/assets/{xychartDiagram-ELKLHX3M-Btdla0qC.js → xychartDiagram-ELKLHX3M-BlVTFSNG.js} +1 -1
- package/dist/public/index.html +155 -155
- package/dist/public/uninstall.html +29 -29
- package/dist/{repair-launch-json-srmUn2hE.mjs → repair-launch-json-BLY6J8I2.mjs} +2 -2
- package/dist/{repair-mcp-configs-I0KtICul.mjs → repair-mcp-configs-lXWW4hnd.mjs} +2 -2
- package/dist/src-BZeMIn4S.mjs +1 -0
- package/dist/{src-BMK0mOrM.mjs → src-Cv5CfSHR.mjs} +2 -2
- package/dist/{start-1qNjbPX9.mjs → start-BaCKwcGO.mjs} +2 -2
- package/dist/start-Bqguzc8D.mjs +1 -0
- package/package.json +4 -4
- package/dist/constants-vY0RbDo-.mjs +0 -2
- package/dist/init-CQuP4oZS.mjs +0 -1
- package/dist/loader-DPUVbNgg.mjs +0 -1
- package/dist/preview-Tkr1Psqx.mjs +0 -1
- package/dist/public/assets/DocumentContext-DKudm1-z.js +0 -38
- package/dist/public/assets/FeedbackForm-DFqW8szu.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-DqX6bBKJ.js +0 -1
- package/dist/public/assets/ReportBugDialogBody-DsOp1u-j.js +0 -3
- package/dist/public/assets/SettingsDialogBody-Dd2GkDtz.js +0 -12
- package/dist/public/assets/TerminalWindowApp-CWKtaPQf.js +0 -1
- package/dist/public/assets/arrow-up-right-BATFT-Sr.js +0 -1
- package/dist/public/assets/channel-CPB7MoVI.js +0 -1
- package/dist/public/assets/check-_e5AYsE9.js +0 -1
- package/dist/public/assets/chevron-left-C3qnVWRd.js +0 -1
- package/dist/public/assets/chevron-right-BBMR0NbW.js +0 -1
- package/dist/public/assets/classDiagram-JCYQIIEL-Co922tiB.js +0 -1
- package/dist/public/assets/classDiagram-v2-OCEON4UE-CUyubUTn.js +0 -1
- package/dist/public/assets/comment-chips-BPjveL06.js +0 -5
- package/dist/public/assets/context-api-7lTvMdKG.js +0 -1
- package/dist/public/assets/dist-Be8lWZxP2.js +0 -1
- package/dist/public/assets/dist-pKYOq3XC2.js +0 -1
- package/dist/public/assets/dropdown-menu-JsEh078s.js +0 -1
- package/dist/public/assets/flowDiagram-UKHOOZJN-CFTGjA42.js +0 -1
- package/dist/public/assets/i18n-B28KWA_H.js +0 -1
- package/dist/public/assets/index-D7ftC-TA.js +0 -2204
- package/dist/public/assets/mermaid-GHXKKRXX-f4wv8zwP.js +0 -1
- package/dist/public/assets/mermaid.core-wyUsrdV8.js +0 -1
- package/dist/public/assets/messages-BNqWoTE7.js +0 -1
- package/dist/public/assets/messages-BVQV1WJj.js +0 -1
- package/dist/public/assets/messages-Bu3H835T.js +0 -1
- package/dist/public/assets/messages-C2YnjINV.js +0 -1
- package/dist/public/assets/messages-CDgZBFJp.js +0 -1
- package/dist/public/assets/messages-D81fhPOK.js +0 -1
- package/dist/public/assets/messages-DRSi5QzW.js +0 -1
- package/dist/public/assets/messages-DmpME-BQ.js +0 -1
- package/dist/public/assets/messages-Drz1dYnk.js +0 -1
- package/dist/public/assets/messages-Ds1yna2Q.js +0 -1
- package/dist/public/assets/messages-N6kgiusx.js +0 -1
- package/dist/public/assets/messages-wwtrT-dP.js +0 -1
- package/dist/public/assets/minus-Dz9yQFxH.js +0 -1
- package/dist/public/assets/radio-group-BsZGGl8l.js +0 -1
- package/dist/public/assets/stateDiagram-v2-UEYNNEHI-DYowbT5J.js +0 -1
- package/dist/public/assets/swimlanesDiagram-ULZ7WXOC-Hyp8OggN.js +0 -8
- package/dist/public/assets/terminal-cli-display-Ch5uUFIR.js +0 -1
- package/dist/public/assets/toggle-group-BlEg4yJE.js +0 -1
- package/dist/public/assets/use-installed-clis-vg6izNL9.js +0 -1
- package/dist/public/assets/use-settings-route-9Zx6tEdn.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-BwGOAWfO.js +0 -6
- package/dist/public/assets/x-BAYve4SL.js +0 -1
- package/dist/src-ByMg6cEv.mjs +0 -1
- package/dist/start-BBP7vc3m.mjs +0 -1
- /package/dist/public/assets/{asset-dispatch-D3iE-ozy.js → asset-dispatch-CD6rGcnF.js} +0 -0
- /package/dist/public/assets/{auth-prompt-store-BXeyTyYx.js → auth-prompt-store-vAFATIFt.js} +0 -0
- /package/dist/public/assets/{createLucideIcon-CfxA0Qtb.js → createLucideIcon-BulbvLvN.js} +0 -0
- /package/dist/public/assets/{desktop-bridge-types-rBjHIYSI.js → desktop-bridge-types-oYPdTDmz.js} +0 -0
- /package/dist/public/assets/{dist-mv8e6dBX.js → dist-BHv-mziD.js} +0 -0
- /package/dist/public/assets/{dist-Cm417ZCm.js → dist-Bd_yyADX.js} +0 -0
- /package/dist/public/assets/{dist-DTX2HxC82.js → dist-CJhtNlOm2.js} +0 -0
- /package/dist/public/assets/{dist-BgXDUIPy.js → dist-Cr4-nBVI.js} +0 -0
- /package/dist/public/assets/{documents-fetch-B1PtbYbS.js → documents-fetch-Bw4lKnRN.js} +0 -0
- /package/dist/public/assets/{external-link-D2rJDkPo.js → external-link-DGqXfQJy.js} +0 -0
- /package/dist/public/assets/{file-tree-rename-validation-D2G4Kbju.js → file-tree-rename-validation-DmGgIR2S.js} +0 -0
- /package/dist/public/assets/{floating-ui.dom-Dk5WJYh0.js → floating-ui.dom-BcZPrP06.js} +0 -0
- /package/dist/public/assets/{globals-Cu_E7Ptz.js → globals-CTSydwqe.js} +0 -0
- /package/dist/public/assets/{html-void-elements-Biw85x38.js → html-void-elements-zEl0KGqf.js} +0 -0
- /package/dist/public/assets/{input-BZhIrrdB.js → input-Cy2M_Avq.js} +0 -0
- /package/dist/public/assets/{katex-DJlTj0sX.js → katex-CcPk1vJT.js} +0 -0
- /package/dist/public/assets/{markdownit-BZnioq-C.js → markdownit-CugClK-K.js} +0 -0
- /package/dist/public/assets/{note-window-mode-BXAdiDXS.js → note-window-mode-CsmLTxU_.js} +0 -0
- /package/dist/public/assets/{parse-api-error-Cmyw9Afr.js → parse-api-error-Dd8VI2eu.js} +0 -0
- /package/dist/public/assets/{startup-marks-BPO-vrjH.js → startup-marks-C-m5WZDP.js} +0 -0
- /package/dist/public/assets/{stex-PMopVeEZ.js → stex-s_JxeNEZ.js} +0 -0
- /package/dist/public/assets/{tool-list-format-CGMeWIgE.js → tool-list-format-HdFmW82S.js} +0 -0
- /package/dist/public/assets/{trace-api-CEY5PfXs.js → trace-api-BP9dN1Hz.js} +0 -0
- /package/dist/public/assets/{use-apply-config-theme-PILfflfB.js → use-apply-config-theme-CBmHKD_B.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-DlL_314g.js → w3c-keyname-C7Rznu6R.js} +0 -0
- /package/dist/public/assets/{workspace-paths-F2vuFWEQ.js → workspace-paths-CAsMig07.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$ as e,At as t,Bt as n,Ct as r,Et as i,F as a,Ft as o,Gt as s,Ht as c,It as l,Lt as u,Mt as d,Nt as f,Ot as p,Rt as m,Vt as h,X as g,Y as _,Z as v,bt as y,et as b,ft as x,jt as S,k as ee,mt as C,ot as w,zt as te}from"./dist-C2xqTq7L.js";var T=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=a(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(se(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function ne(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function re(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=ne(t)+ne(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function ie(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:re(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ae(e,t){return n=>{for(let t=a(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var oe=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function E(e){return e.selection.main.from}function se(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var D=r.define();function ce(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:p.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var O=new WeakMap;function le(e){if(!Array.isArray(e))return e;let t=O.get(e);return t||O.set(e,t=ie(e)),t}var k=l.define(),A=l.define(),ue=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=n(e,t),i=h(r);this.chars.push(r);let a=e.slice(t,t+i),o=a.toUpperCase();this.folded.push(n(o==a?a.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:a,byWord:o}=this;if(t.length==1){let i=n(e,0),a=h(i),o=a==e.length?0:-100;if(i!=t[0])if(i==r[0])o+=-200;else return null;return this.ret(o,[0,a])}let c=e.indexOf(this.pattern);if(c==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=t.length,u=0;if(c<0){for(let a=0,o=Math.min(e.length,200);a<o&&u<l;){let o=n(e,a);(o==t[u]||o==r[u])&&(i[u++]=a),a+=h(o)}if(u<l)return null}let d=0,f=0,p=!1,m=0,g=-1,_=-1,v=/[a-z]/.test(e),y=!0;for(let i=0,u=Math.min(e.length,200),b=0;i<u&&f<l;){let u=n(e,i);c<0&&(d<l&&u==t[d]&&(a[d++]=i),m<l&&(u==t[m]||u==r[m]?(m==0&&(g=i),_=i+1,m++):m=0));let x,S=u<255?u>=48&&u<=57||u>=97&&u<=122?2:+(u>=65&&u<=90):(x=s(u))==x.toLowerCase()?x==x.toUpperCase()?0:2:1;(!i||S==1&&v||b==0&&S!=0)&&(t[f]==u||r[f]==u&&(p=!0)?o[f++]=i:o.length&&(y=!1)),b=S,i+=h(u)}return f==l&&o[0]==0&&y?this.result(-100+(p?-200:0),o,e):m==l&&g==0?this.ret(-200-e.length+(_==e.length?0:-100),[0,_]):c>-1?this.ret(-700-e.length,[c,c+this.pattern.length]):m==l?this.ret(-900-e.length,[g,_]):f==l?this.result(-100+(p?-200:0)+-700+(y?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],a=0;for(let e of t){let t=e+(this.astral?h(n(r,e)):1);a&&i[a-1]==e?i[a-1]=t:(i[a++]=e,i[a++]=t)}return this.ret(e-r.length,i)}},de=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},j=t.define({combine(e){return c(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fe,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>M(e(n),t(n)),optionClass:(e,t)=>n=>M(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function M(e,t){return e?t?e+` `+t:e:t}function fe(e,t,n,r,i,a){let o=e.textDirection==g.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let _=(t.bottom-t.top)/a.offsetHeight,v=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/_}px; max-width: ${d/v}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var N=l.define();function pe(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function P(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var me=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(j);this.optionContent=pe(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=P(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:N.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(j).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:A.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=P(r.length,i,e.state.facet(j).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=P(t.options.length,t.selected,this.view.state.facet(j).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>C(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&ge(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(j).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0))if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function he(e,t){return n=>new me(n,e,t)}function ge(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function F(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function _e(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(j);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new oe(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new de(n):new ue(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new oe(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):F(e.completion)>F(c)&&(s[s.length-1]=e),c=e.completion}return s}var ve=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,I(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=_e(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(j).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,I(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Te,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},ye=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Ce,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(j),i=(r.override||n.languageDataAt(`autocomplete`,E(n)).map(le)).map(e=>(this.active.find(t=>t.source==e)||new R(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(B));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!be(i,this.active)||o?a=ve.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new R(e.source,0):e));for(let e of t.effects)e.is(N)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xe:Se}};function be(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var xe={"aria-autocomplete":`list`},Se={};function I(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Ce=[];function L(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(D);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var R=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=L(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(k))i=new e(i.source,1,n.value);else if(n.is(A))i=new e(i.source,0);else if(n.is(B))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(E(e.state))}},z=class e extends R{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=E(t.state);if(o>a||!r||n&2&&(E(t.startState)==this.from||o<this.limit))return new R(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return we(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new T(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??E(t.state)):new R(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new R(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function we(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):se(e,!0).test(i)}var B=l.define({map(e,t){return e.map(e=>e.map(t))}}),V=u.define({create(){return ye.start()},update(e,t){return e.update(t)},provide:e=>[y.from(e,e=>e.tooltip),v.contentAttributes.from(e,e=>e.attrs)]});function H(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(V).active.find(e=>e.source==t.source);return r instanceof z?(typeof n==`string`?e.dispatch({...ce(e.state,n,r.from,r.to),annotations:D.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}var Te=he(V,H);function U(e,t=`option`){return n=>{let r=n.state.field(V,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(j).interactionDelay)return!1;let i=1,a;t==`page`&&(a=w(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:N.of(s)}),!0}}var Ee=e=>{let t=e.state.field(V,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(j).interactionDelay?!1:H(e,t.open.options[t.open.selected])},W=e=>e.state.field(V,!1)?(e.dispatch({effects:k.of(!0)}),!0):!1,De=e=>{let t=e.state.field(V,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:A.of(null)}),!0)},Oe=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},ke=50,Ae=1e3,je=e.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(V).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(V),n=e.state.facet(j);if(!e.selectionSet&&!e.docChanged&&e.startState.field(V)==t)return;let r=e.transactions.some(e=>{let t=L(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>ke&&Date.now()-n.time>Ae){for(let e of n.context.abortListeners)try{e()}catch(e){C(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(k)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(V);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(j).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new T(t,E(t),e.explicit,this.view),r=new Oe(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:A.of(null)}),C(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(j).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(j),n=this.view.state.field(V);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=E(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new z(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending)if(i.done==null){let n=new R(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:B.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(V,!1);if(t&&t.tooltip&&this.view.state.facet(j).closeOnBlur){let n=t.open&&w(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:A.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:k.of(!1)}),20),this.composing=0}}}),Me=typeof navigator==`object`&&/Win/.test(navigator.platform),Ne=d.highest(v.domEventHandlers({keydown(e,t){let n=t.state.field(V,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Me&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&H(t,r),!1}})),G=v.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Pe=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Fe=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,S.TrackDel),r=t.mapPos(this.to,1,S.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Ie=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(ee);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new Fe(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Pe(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Le=_.widget({widget:new class extends b{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),Re=_.mark({class:`cm-snippetField`}),K=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=_.set(e.map(e=>(e.from==e.to?Le:Re).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},q=l.define({map(e,t){return e&&e.map(t)}}),ze=l.define(),J=u.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(q))return n.value;if(n.is(ze)&&e)return new K(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>v.decorations.from(e,e=>e?e.deco:_.none)});function Y(e,t){return p.create(e.filter(e=>e.field==t).map(e=>p.range(e.from,e.to)))}function Be(e){let t=Ie.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:m.of(a)},scrollIntoView:!0,annotations:n?[D.of(n),te.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=Y(o,0)),o.some(e=>e.field>0)){let t=new K(o,0),n=c.effects=[q.of(t)];e.state.field(J,!1)===void 0&&n.push(l.appendConfig.of([J,We,Ke,G]))}e.dispatch(e.state.update(c))}}function Ve(e){return({state:t,dispatch:n})=>{let r=t.field(J,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:Y(r.ranges,i),effects:q.of(a?null:new K(r.ranges,i)),scrollIntoView:!0})),!0}}var He=[{key:`Tab`,run:Ve(1),shift:Ve(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(J,!1)?(t(e.update({effects:q.of(null)})),!0):!1}],Ue=t.define({combine(e){return e.length?e[0]:He}}),We=d.highest(x.compute([Ue],e=>e.facet(Ue)));function Ge(e,t){return{...t,apply:Be(e)}}var Ke=v.domEventHandlers({mousedown(e,t){let n=t.state.field(J,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:Y(n.ranges,i.field),effects:q.of(n.ranges.some(e=>e.field>i.field)?new K(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),X={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Z=l.define({map(e,t){return t.mapPos(e,-1,S.TrackAfter)??void 0}}),Q=new class extends o{};Q.startSide=1,Q.endSide=-1;var qe=u.define({create(){return f.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Z)&&(e=e.update({add:[Q.range(n.value,n.value+1)]}));return e}});function Je(){return[$e,qe]}var Ye=`()[]{}<>«»»«[]{}`;function Xe(e){for(let t=0;t<16;t+=2)if(Ye.charCodeAt(t)==e)return Ye.charAt(t+1);return s(e<128?e:e+1)}function Ze(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||X}var Qe=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),$e=v.inputHandler.of((e,t,r,i)=>{if((Qe?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let a=e.state.selection.main;if(i.length>2||i.length==2&&h(n(i,0))==1||t!=a.from||r!=a.to)return!1;let o=tt(e.state,i);return o?(e.dispatch(o),!0):!1}),et=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Ze(e,e.selection.main.head).brackets||X.brackets,i=null,a=e.changeByRange(t=>{if(t.empty){let i=rt(e.doc,t.head);for(let a of r)if(a==i&&$(e.doc,t.head)==Xe(n(a,0)))return{changes:{from:t.head-a.length,to:t.head+a.length},range:p.cursor(t.head-a.length)}}return{range:i=t}});return i||t(e.update(a,{scrollIntoView:!0,userEvent:`delete.backward`})),!i}}];function tt(e,t){let r=Ze(e,e.selection.main.head),i=r.brackets||X.brackets;for(let a of i){let o=Xe(n(a,0));if(t==a)return o==a?ot(e,a,i.indexOf(a+a+a)>-1,r):it(e,a,o,r.before||X.before);if(t==o&&nt(e,e.selection.main.from))return at(e,a,o)}return null}function nt(e,t){let n=!1;return e.field(qe).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $(e,t){let r=e.sliceString(t,t+2);return r.slice(0,h(n(r,0)))}function rt(e,t){let r=e.sliceString(t-2,t);return h(n(r,0))==r.length?r:r.slice(1)}function it(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Z.of(a.to+t.length),range:p.range(a.anchor+t.length,a.head+t.length)};let o=$(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:Z.of(a.head+t.length),range:p.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function at(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&$(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:p.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function ot(e,t,n,r){let a=r.stringPrefixes||X.stringPrefixes,o=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Z.of(r.to+t.length),range:p.range(r.anchor+t.length,r.head+t.length)};let s=r.head,c=$(e.doc,s),l;if(c==t){if(st(e,s))return{changes:{insert:t+t,from:s},effects:Z.of(s+t.length),range:p.cursor(s+t.length)};if(nt(e,s)){let r=n&&e.sliceDoc(s,s+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:p.cursor(s+r.length)}}}else if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(l=lt(e,s-2*t.length,a))>-1&&st(e,l))return{changes:{insert:t+t+t+t,from:s},effects:Z.of(s+t.length),range:p.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=i.Word&<(e,s,a)>-1&&!ct(e,s,t,a))return{changes:{insert:t+t,from:s},effects:Z.of(s+t.length),range:p.cursor(s+t.length)};return{range:o=r}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:`input.type`})}function st(e,t){let n=a(e).resolveInner(t+1);return n.parent&&n.from==t}function ct(e,t,n,r){let i=a(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let a=0;a<5;a++){let a=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function lt(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=i.Word)return t;for(let a of n){let n=t-a.length;if(e.sliceDoc(n,t)==a&&r(e.sliceDoc(n-1,n))!=i.Word)return n}return-1}function ut(e={}){return[Ne,V,j.of(e),je,ft,G]}var dt=[{key:`Ctrl-Space`,run:W},{mac:"Alt-`",run:W},{mac:`Alt-i`,run:W},{key:`Escape`,run:De},{key:`ArrowDown`,run:U(!0)},{key:`ArrowUp`,run:U(!1)},{key:`PageDown`,run:U(!0,`page`)},{key:`PageUp`,run:U(!1,`page`)},{key:`Enter`,run:Ee}],ft=d.highest(x.computeN([j],e=>e.facet(j).defaultKeymap?[dt]:[]));export{ie as a,Ge as c,et as i,ut as n,dt as o,Je as r,ae as s,T as t};
|
|
1
|
+
import{$ as e,At as t,Bt as n,Ct as r,Et as i,F as a,Ft as o,Gt as s,Ht as c,It as l,Lt as u,Mt as d,Nt as f,Ot as p,Rt as m,Vt as h,X as g,Y as _,Z as v,bt as y,et as b,ft as x,jt as S,k as ee,mt as C,ot as w,zt as te}from"./dist-BXlOzfrR.js";var T=class{constructor(e,t,n,r){this.state=e,this.pos=t,this.explicit=n,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let t=a(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(se(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return this.abortListeners==null}addEventListener(e,t,n){e==`abort`&&this.abortListeners&&(this.abortListeners.push(t),n&&n.onDocChange&&(this.abortOnDocChange=!0))}};function ne(e){let t=Object.keys(e).join(``),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,``)),`[${n?`\\w`:``}${t.replace(/[^\w\s]/g,`\\$&`)}]`}function re(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e<r.length;e++)n[r[e]]=!0}let r=ne(t)+ne(n)+`*$`;return[RegExp(`^`+r),new RegExp(r)]}function ie(e){let t=e.map(e=>typeof e==`string`?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:re(t);return e=>{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function ae(e,t){return n=>{for(let t=a(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}var oe=class{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}};function E(e){return e.selection.main.from}function se(e,t){let{source:n}=e,r=t&&n[0]!=`^`,i=n[n.length-1]!=`$`;return!r&&!i?e:RegExp(`${r?`^`:``}(?:${n})${i?`$`:``}`,e.flags??(e.ignoreCase?`i`:``))}var D=r.define();function ce(e,t,n,r){let{main:i}=e.selection,a=n-i.from,o=r-i.from;return{...e.changeByRange(s=>{if(s!=i&&n!=r&&e.sliceDoc(s.from+a,s.from+o)!=e.sliceDoc(n,r))return{range:s};let c=e.toText(t);return{changes:{from:s.from+a,to:r==i.from?s.to:s.from+o,insert:c},range:p.cursor(s.from+a+c.length)}}),scrollIntoView:!0,userEvent:`input.complete`}}var O=new WeakMap;function le(e){if(!Array.isArray(e))return e;let t=O.get(e);return t||O.set(e,t=ie(e)),t}var k=l.define(),A=l.define(),ue=class{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let t=0;t<e.length;){let r=n(e,t),i=h(r);this.chars.push(r);let a=e.slice(t,t+i),o=a.toUpperCase();this.folded.push(n(o==a?a.toLowerCase():o,0)),t+=i}this.astral=e.length!=this.chars.length}ret(e,t){return this.score=e,this.matched=t,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:t,folded:r,any:i,precise:a,byWord:o}=this;if(t.length==1){let i=n(e,0),a=h(i),o=a==e.length?0:-100;if(i!=t[0])if(i==r[0])o+=-200;else return null;return this.ret(o,[0,a])}let c=e.indexOf(this.pattern);if(c==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let l=t.length,u=0;if(c<0){for(let a=0,o=Math.min(e.length,200);a<o&&u<l;){let o=n(e,a);(o==t[u]||o==r[u])&&(i[u++]=a),a+=h(o)}if(u<l)return null}let d=0,f=0,p=!1,m=0,g=-1,_=-1,v=/[a-z]/.test(e),y=!0;for(let i=0,u=Math.min(e.length,200),b=0;i<u&&f<l;){let u=n(e,i);c<0&&(d<l&&u==t[d]&&(a[d++]=i),m<l&&(u==t[m]||u==r[m]?(m==0&&(g=i),_=i+1,m++):m=0));let x,S=u<255?u>=48&&u<=57||u>=97&&u<=122?2:+(u>=65&&u<=90):(x=s(u))==x.toLowerCase()?x==x.toUpperCase()?0:2:1;(!i||S==1&&v||b==0&&S!=0)&&(t[f]==u||r[f]==u&&(p=!0)?o[f++]=i:o.length&&(y=!1)),b=S,i+=h(u)}return f==l&&o[0]==0&&y?this.result(-100+(p?-200:0),o,e):m==l&&g==0?this.ret(-200-e.length+(_==e.length?0:-100),[0,_]):c>-1?this.ret(-700-e.length,[c,c+this.pattern.length]):m==l?this.ret(-900-e.length,[g,_]):f==l?this.result(-100+(p?-200:0)+-700+(y?0:-1100),o,e):t.length==2?null:this.result((i[0]?-700:0)+-200+-1100,i,e)}result(e,t,r){let i=[],a=0;for(let e of t){let t=e+(this.astral?h(n(r,e)):1);a&&i[a-1]==e?i[a-1]=t:(i[a++]=e,i[a++]=t)}return this.ret(e-r.length,i)}},de=class{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let t=e.slice(0,this.pattern.length),n=t==this.pattern?0:t.toLowerCase()==this.folded?-200:null;return n==null?null:(this.matched=[0,t.length],this.score=n+(e.length==this.pattern.length?0:-100),this)}},j=t.define({combine(e){return c(e,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>``,optionClass:()=>``,aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:fe,filterStrict:!1,compareCompletions:(e,t)=>(e.sortText||e.label).localeCompare(t.sortText||t.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>M(e(n),t(n)),optionClass:(e,t)=>n=>M(e(n),t(n)),addToOptions:(e,t)=>e.concat(t),filterStrict:(e,t)=>e||t})}});function M(e,t){return e?t?e+` `+t:e:t}function fe(e,t,n,r,i,a){let o=e.textDirection==g.RTL,s=o,c=!1,l=`top`,u,d,f=t.left-i.left,p=i.right-t.right,m=r.right-r.left,h=r.bottom-r.top;if(s&&f<Math.min(m,p)?s=!1:!s&&p<Math.min(m,f)&&(s=!0),m<=(s?f:p))u=Math.max(i.top,Math.min(n.top,i.bottom-h))-t.top,d=Math.min(400,s?f:p);else{c=!0,d=Math.min(400,(o?t.right:i.right-t.left)-30);let e=i.bottom-t.bottom;e>=h||e>t.top?u=n.bottom-t.top:(l=`bottom`,u=t.bottom-n.top)}let _=(t.bottom-t.top)/a.offsetHeight,v=(t.right-t.left)/a.offsetWidth;return{style:`${l}: ${u/_}px; max-width: ${d/v}px`,class:`cm-completionInfo-`+(c?o?`left-narrow`:`right-narrow`:s?`left`:`right`)}}var N=l.define();function pe(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement(`div`);return t.classList.add(`cm-completionIcon`),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>`cm-completionIcon-`+e)),t.setAttribute(`aria-hidden`,`true`),t},position:20}),t.push({render(e,t,n,r){let i=document.createElement(`span`);i.className=`cm-completionLabel`;let a=e.displayLabel||e.label,o=0;for(let e=0;e<r.length;){let t=r[e++],n=r[e++];t>o&&i.appendChild(document.createTextNode(a.slice(o,t)));let s=i.appendChild(document.createElement(`span`));s.appendChild(document.createTextNode(a.slice(t,n))),s.className=`cm-completionMatchedText`,o=n}return o<a.length&&i.appendChild(document.createTextNode(a.slice(o))),i},position:50},{render(e){if(!e.detail)return null;let t=document.createElement(`span`);return t.className=`cm-completionDetail`,t.textContent=e.detail,t},position:80}),t.sort((e,t)=>e.position-t.position).map(e=>e.render)}function P(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.ceil((e-t)/n);return{from:e-r*n,to:e-(r-1)*n}}var me=class{constructor(e,t,n){this.view=e,this.stateField=t,this.applyCompletion=n,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass=``;let r=e.state.field(t),{options:i,selected:a}=r.open,o=e.state.facet(j);this.optionContent=pe(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=P(i.length,a,o.maxRenderedOptions),this.dom=document.createElement(`div`),this.dom.className=`cm-tooltip-autocomplete`,this.updateTooltipClass(e.state),this.dom.addEventListener(`mousedown`,n=>{let{options:r}=e.state.field(t).open;for(let t=n.target,i;t&&t!=this.dom;t=t.parentNode)if(t.nodeName==`LI`&&(i=/-(\d+)$/.exec(t.id))&&+i[1]<r.length){this.applyCompletion(e,r[+i[1]]),n.preventDefault();return}if(n.target==this.list){let t=this.list.classList.contains(`cm-completionListIncompleteTop`)&&n.clientY<this.list.firstChild.getBoundingClientRect().top?this.range.from-1:this.list.classList.contains(`cm-completionListIncompleteBottom`)&&n.clientY>this.list.lastChild.getBoundingClientRect().bottom?this.range.to:null;t!=null&&(e.dispatch({effects:N.of(t)}),n.preventDefault())}}),this.dom.addEventListener(`focusout`,t=>{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(j).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:A.of(null)})}),this.showOptions(i,r.id)}mount(){this.updateSel()}showOptions(e,t){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,t,this.range)),this.list.addEventListener(`scroll`,()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){let t=e.state.field(this.stateField),n=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),t!=n){let{options:r,selected:i,disabled:a}=t.open;(!n.open||n.open.options!=r)&&(this.range=P(r.length,i,e.state.facet(j).maxRenderedOptions),this.showOptions(r,t.id)),this.updateSel(),a!=n.open?.disabled&&this.dom.classList.toggle(`cm-tooltip-autocomplete-disabled`,!!a)}}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(` `))e&&this.dom.classList.remove(e);for(let e of t.split(` `))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;(t.selected>-1&&t.selected<this.range.from||t.selected>=this.range.to)&&(this.range=P(t.options.length,t.selected,this.view.state.facet(j).maxRenderedOptions),this.showOptions(t.options,e.id));let n=this.updateSelectedOption(t.selected);if(n){this.destroyInfo();let{completion:r}=t.options[t.selected],{info:i}=r;if(!i)return;let a=typeof i==`string`?document.createTextNode(i):i(r);if(!a)return;`then`in a?a.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t,r)}).catch(e=>C(this.view.state,e,`completion info`)):(this.addInfoPane(a,r),n.setAttribute(`aria-describedby`,this.info.id))}}addInfoPane(e,t){this.destroyInfo();let n=this.info=document.createElement(`div`);if(n.className=`cm-tooltip cm-completionInfo`,n.id=`cm-completionInfo-`+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)n.appendChild(e),this.infoDestroy=null;else{let{dom:t,destroy:r}=e;n.appendChild(t),this.infoDestroy=r||null}this.dom.appendChild(n),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)n.nodeName!=`LI`||!n.id?r--:r==e?n.hasAttribute(`aria-selected`)||(n.setAttribute(`aria-selected`,`true`),t=n):n.hasAttribute(`aria-selected`)&&(n.removeAttribute(`aria-selected`),n.removeAttribute(`aria-describedby`));return t&&ge(this.list,t),t}measureInfo(){let e=this.dom.querySelector(`[aria-selected]`);if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.documentElement;i={left:0,top:0,right:e.clientWidth,bottom:e.clientHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottom<Math.max(i.top,t.top)+10?null:this.view.state.facet(j).positionInfo(this.view,t,r,n,i,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className=`cm-tooltip cm-completionInfo `+(e.class||``)):this.info.style.cssText=`top: -1e6px`)}createListBox(e,t,n){let r=document.createElement(`ul`);r.id=t,r.setAttribute(`role`,`listbox`),r.setAttribute(`aria-expanded`,`true`),r.setAttribute(`aria-label`,this.view.state.phrase(`Completions`)),r.addEventListener(`mousedown`,e=>{e.target==r&&e.preventDefault()});let i=null;for(let a=n.from;a<n.to;a++){let{completion:o,match:s}=e[a],{section:c}=o;if(c){let e=typeof c==`string`?c:c.name;if(e!=i&&(a>n.from||n.from==0))if(i=e,typeof c!=`string`&&c.header)r.appendChild(c.header(c));else{let t=r.appendChild(document.createElement(`completion-section`));t.textContent=e}}let l=r.appendChild(document.createElement(`li`));l.id=t+`-`+a,l.setAttribute(`role`,`option`);let u=this.optionClass(o);u&&(l.className=u);for(let e of this.optionContent){let t=e(o,this.view.state,this.view,s);t&&l.appendChild(t)}}return n.from&&r.classList.add(`cm-completionListIncompleteTop`),n.to<e.length&&r.classList.add(`cm-completionListIncompleteBottom`),r}destroyInfo(){this.info&&=(this.infoDestroy&&this.infoDestroy(),this.info.remove(),null)}destroy(){this.destroyInfo()}};function he(e,t){return n=>new me(n,e,t)}function ge(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),i=n.height/e.offsetHeight;r.top<n.top?e.scrollTop-=(n.top-r.top)/i:r.bottom>n.bottom&&(e.scrollTop+=(r.bottom-n.bottom)/i)}function F(e){return(e.boost||0)*100+(e.apply?10:0)+(e.info?5:0)+ +!!e.type}function _e(e,t){let n=[],r=null,i=null,a=e=>{n.push(e);let{section:t}=e.completion;if(t){r||=[];let e=typeof t==`string`?t:t.name;r.some(t=>t.name==e)||r.push(typeof t==`string`?{name:e}:t)}},o=t.facet(j);for(let r of e)if(r.hasResult()){let e=r.result.getMatch;if(r.result.filter===!1)for(let t of r.result.options)a(new oe(t,r.source,e?e(t):[],1e9-n.length));else{let n=t.sliceDoc(r.from,r.to),s,c=o.filterStrict?new de(n):new ue(n);for(let t of r.result.options)if(s=c.match(t.label)){let n=t.displayLabel?e?e(t,s.matched):[]:s.matched,o=s.score+(t.boost||0);if(a(new oe(t,r.source,n,o)),typeof t.section==`object`&&t.section.rank===`dynamic`){let{name:e}=t.section;i||=Object.create(null),i[e]=Math.max(o,i[e]||-1e9)}}}}if(r){let e=Object.create(null),t=0,a=(e,t)=>(e.rank===`dynamic`&&t.rank===`dynamic`?i[t.name]-i[e.name]:0)||(typeof e.rank==`number`?e.rank:1e9)-(typeof t.rank==`number`?t.rank:1e9)||(e.name<t.name?-1:1);for(let n of r.sort(a))t-=1e5,e[n.name]=t;for(let t of n){let{section:n}=t.completion;n&&(t.score+=e[typeof n==`string`?n:n.name])}}let s=[],c=null,l=o.compareCompletions;for(let e of n.sort((e,t)=>t.score-e.score||l(e.completion,t.completion))){let t=e.completion;!c||c.label!=t.label||c.detail!=t.detail||c.type!=null&&t.type!=null&&c.type!=t.type||c.apply!=t.apply||c.boost!=t.boost?s.push(e):F(e.completion)>F(c)&&(s[s.length-1]=e),c=e.completion}return s}var ve=class e{constructor(e,t,n,r,i,a){this.options=e,this.attrs=t,this.tooltip=n,this.timestamp=r,this.selected=i,this.disabled=a}setSelected(t,n){return t==this.selected||t>=this.options.length?this:new e(this.options,I(n,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,n,r,i,a,o){if(i&&!o&&t.some(e=>e.isPending))return i.setDisabled();let s=_e(t,n);if(!s.length)return i&&t.some(e=>e.isPending)?i.setDisabled():null;let c=n.facet(j).selectOnOpen?0:-1;if(i&&i.selected!=c&&i.selected!=-1){let e=i.options[i.selected].completion;for(let t=0;t<s.length;t++)if(s[t].completion==e){c=t;break}}return new e(s,I(r,c),{pos:t.reduce((e,t)=>t.hasResult()?Math.min(e,t.from):e,1e8),create:Te,above:a.aboveCursor},i?i.timestamp:Date.now(),c,!1)}map(t){return new e(this.options,this.attrs,{...this.tooltip,pos:t.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new e(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}},ye=class e{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new e(Ce,`cm-ac-`+Math.floor(Math.random()*2e6).toString(36),null)}update(t){let{state:n}=t,r=n.facet(j),i=(r.override||n.languageDataAt(`autocomplete`,E(n)).map(le)).map(e=>(this.active.find(t=>t.source==e)||new R(e,+!!this.active.some(e=>e.state!=0))).update(t,r));i.length==this.active.length&&i.every((e,t)=>e==this.active[t])&&(i=this.active);let a=this.open,o=t.effects.some(e=>e.is(B));a&&t.docChanged&&(a=a.map(t.changes)),t.selection||i.some(e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to))||!be(i,this.active)||o?a=ve.build(i,n,this.id,a,r,o):a&&a.disabled&&!i.some(e=>e.isPending)&&(a=null),!a&&i.every(e=>!e.isPending)&&i.some(e=>e.hasResult())&&(i=i.map(e=>e.hasResult()?new R(e.source,0):e));for(let e of t.effects)e.is(N)&&(a&&=a.setSelected(e.value,this.id));return i==this.active&&a==this.open?this:new e(i,this.id,a)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?xe:Se}};function be(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n<e.length&&!e[n].hasResult();)n++;for(;r<t.length&&!t[r].hasResult();)r++;let i=n==e.length,a=r==t.length;if(i||a)return i==a;if(e[n++].result!=t[r++].result)return!1}}var xe={"aria-autocomplete":`list`},Se={};function I(e,t){let n={"aria-autocomplete":`list`,"aria-haspopup":`listbox`,"aria-controls":e};return t>-1&&(n[`aria-activedescendant`]=e+`-`+t),n}var Ce=[];function L(e,t){if(e.isUserEvent(`input.complete`)){let n=e.annotation(D);if(n&&t.activateOnCompletion(n))return 12}let n=e.isUserEvent(`input.type`);return n&&t.activateOnTyping?5:n?1:e.isUserEvent(`delete.backward`)?2:e.selection?8:e.docChanged?16:0}var R=class e{constructor(e,t,n=!1){this.source=e,this.state=t,this.explicit=n}hasResult(){return!1}get isPending(){return this.state==1}update(t,n){let r=L(t,n),i=this;(r&8||r&16&&this.touches(t))&&(i=new e(i.source,0)),r&4&&i.state==0&&(i=new e(this.source,1)),i=i.updateFor(t,r);for(let n of t.effects)if(n.is(k))i=new e(i.source,1,n.value);else if(n.is(A))i=new e(i.source,0);else if(n.is(B))for(let e of n.value)e.source==i.source&&(i=e);return i}updateFor(e,t){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(E(e.state))}},z=class e extends R{constructor(e,t,n,r,i,a){super(e,3,t),this.limit=n,this.result=r,this.from=i,this.to=a}hasResult(){return!0}updateFor(t,n){if(!(n&3))return this.map(t.changes);let r=this.result;r.map&&!t.changes.empty&&(r=r.map(r,t.changes));let i=t.changes.mapPos(this.from),a=t.changes.mapPos(this.to,1),o=E(t.state);if(o>a||!r||n&2&&(E(t.startState)==this.from||o<this.limit))return new R(this.source,n&4?1:0);let s=t.changes.mapPos(this.limit);return we(r.validFor,t.state,i,a)?new e(this.source,this.explicit,s,r,i,a):r.update&&(r=r.update(r,i,a,new T(t.state,o,!1)))?new e(this.source,this.explicit,s,r,r.from,r.to??E(t.state)):new R(this.source,1,this.explicit)}map(t){if(t.empty)return this;let n=this.result.map?this.result.map(this.result,t):this.result;return n?new e(this.source,this.explicit,t.mapPos(this.limit),n,t.mapPos(this.from),t.mapPos(this.to,1)):new R(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}};function we(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return typeof e==`function`?e(i,n,r,t):se(e,!0).test(i)}var B=l.define({map(e,t){return e.map(e=>e.map(t))}}),V=u.define({create(){return ye.start()},update(e,t){return e.update(t)},provide:e=>[y.from(e,e=>e.tooltip),v.contentAttributes.from(e,e=>e.attrs)]});function H(e,t){let n=t.completion.apply||t.completion.label,r=e.state.field(V).active.find(e=>e.source==t.source);return r instanceof z?(typeof n==`string`?e.dispatch({...ce(e.state,n,r.from,r.to),annotations:D.of(t.completion)}):n(e,t.completion,r.from,r.to),!0):!1}var Te=he(V,H);function U(e,t=`option`){return n=>{let r=n.state.field(V,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp<n.state.facet(j).interactionDelay)return!1;let i=1,a;t==`page`&&(a=w(n,r.open.tooltip))&&(i=Math.max(2,Math.floor(a.dom.offsetHeight/a.dom.querySelector(`li`).offsetHeight)-1));let{length:o}=r.open.options,s=r.open.selected>-1?r.open.selected+i*(e?1:-1):e?0:o-1;return s<0?s=t==`page`?0:o-1:s>=o&&(s=t==`page`?o-1:0),n.dispatch({effects:N.of(s)}),!0}}var Ee=e=>{let t=e.state.field(V,!1);return e.state.readOnly||!t||!t.open||t.open.selected<0||t.open.disabled||Date.now()-t.open.timestamp<e.state.facet(j).interactionDelay?!1:H(e,t.open.options[t.open.selected])},W=e=>e.state.field(V,!1)?(e.dispatch({effects:k.of(!0)}),!0):!1,De=e=>{let t=e.state.field(V,!1);return!t||!t.active.some(e=>e.state!=0)?!1:(e.dispatch({effects:A.of(null)}),!0)},Oe=class{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}},ke=50,Ae=1e3,je=e.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let t of e.state.field(V).active)t.isPending&&this.startQuery(t)}update(e){let t=e.state.field(V),n=e.state.facet(j);if(!e.selectionSet&&!e.docChanged&&e.startState.field(V)==t)return;let r=e.transactions.some(e=>{let t=L(e,n);return t&8||(e.selection||e.docChanged)&&!(t&3)});for(let t=0;t<this.running.length;t++){let n=this.running[t];if(r||n.context.abortOnDocChange&&e.docChanged||n.updates.length+e.transactions.length>ke&&Date.now()-n.time>Ae){for(let e of n.context.abortListeners)try{e()}catch(e){C(this.view.state,e)}n.context.abortListeners=null,this.running.splice(t--,1)}else n.updates.push(...e.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),e.transactions.some(e=>e.effects.some(e=>e.is(k)))&&(this.pendingStart=!0);let i=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=t.active.some(e=>e.isPending&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),i):-1,this.composing!=0)for(let t of e.transactions)t.isUserEvent(`input.type`)?this.composing=2:this.composing==2&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:e}=this.view,t=e.field(V);for(let e of t.active)e.isPending&&!this.running.some(t=>t.active.source==e.source)&&this.startQuery(e);this.running.length&&t.open&&t.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(j).updateSyncTime))}startQuery(e){let{state:t}=this.view,n=new T(t,E(t),e.explicit,this.view),r=new Oe(e,n);this.running.push(r),Promise.resolve(e.source(n)).then(e=>{r.context.aborted||(r.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:A.of(null)}),C(this.view.state,e)})}scheduleAccept(){this.running.every(e=>e.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(j).updateSyncTime))}accept(){this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],t=this.view.state.facet(j),n=this.view.state.field(V);for(let r=0;r<this.running.length;r++){let i=this.running[r];if(i.done===void 0)continue;if(this.running.splice(r--,1),i.done){let n=E(i.updates.length?i.updates[0].startState:this.view.state),r=Math.min(n,i.done.from+ +!i.active.explicit),a=new z(i.active.source,i.active.explicit,r,i.done,i.done.from,i.done.to??n);for(let e of i.updates)a=a.update(e,t);if(a.hasResult()){e.push(a);continue}}let a=n.active.find(e=>e.source==i.active.source);if(a&&a.isPending)if(i.done==null){let n=new R(i.active.source,0);for(let e of i.updates)n=n.update(e,t);n.isPending||e.push(n)}else this.startQuery(a)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:B.of(e)})}},{eventHandlers:{blur(e){let t=this.view.state.field(V,!1);if(t&&t.tooltip&&this.view.state.facet(j).closeOnBlur){let n=t.open&&w(this.view,t.open.tooltip);(!n||!n.dom.contains(e.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:A.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:k.of(!1)}),20),this.composing=0}}}),Me=typeof navigator==`object`&&/Win/.test(navigator.platform),Ne=d.highest(v.domEventHandlers({keydown(e,t){let n=t.state.field(V,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||e.key.length>1||e.ctrlKey&&!(Me&&e.altKey)||e.metaKey)return!1;let r=n.open.options[n.open.selected],i=n.active.find(e=>e.source==r.source),a=r.completion.commitCharacters||i.result.commitCharacters;return a&&a.indexOf(e.key)>-1&&H(t,r),!1}})),G=v.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:`monospace`,whiteSpace:`nowrap`,overflow:`hidden auto`,maxWidth_fallback:`700px`,maxWidth:`min(700px, 95vw)`,minWidth:`250px`,maxHeight:`10em`,height:`100%`,listStyle:`none`,margin:0,padding:0,"& > li, & > completion-section":{padding:`1px 3px`,lineHeight:1.2},"& > li":{overflowX:`hidden`,textOverflow:`ellipsis`,cursor:`pointer`},"& > completion-section":{display:`list-item`,borderBottom:`1px solid silver`,paddingLeft:`0.5em`,opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#17c`,color:`white`},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#777`},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:`#347`,color:`white`},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:`#444`},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:`"···"`,opacity:.5,display:`block`,textAlign:`center`,cursor:`pointer`},".cm-tooltip.cm-completionInfo":{position:`absolute`,padding:`3px 9px`,width:`max-content`,maxWidth:`400px`,boxSizing:`border-box`,whiteSpace:`pre-line`},".cm-completionInfo.cm-completionInfo-left":{right:`100%`},".cm-completionInfo.cm-completionInfo-right":{left:`100%`},".cm-completionInfo.cm-completionInfo-left-narrow":{right:`30px`},".cm-completionInfo.cm-completionInfo-right-narrow":{left:`30px`},"&light .cm-snippetField":{backgroundColor:`#00000022`},"&dark .cm-snippetField":{backgroundColor:`#ffffff22`},".cm-snippetFieldPosition":{verticalAlign:`text-top`,width:0,height:`1.15em`,display:`inline-block`,margin:`0 -0.7px -.7em`,borderLeft:`1.4px dotted #888`},".cm-completionMatchedText":{textDecoration:`underline`},".cm-completionDetail":{marginLeft:`0.5em`,fontStyle:`italic`},".cm-completionIcon":{fontSize:`90%`,width:`.8em`,display:`inline-block`,textAlign:`center`,paddingRight:`.6em`,opacity:`0.6`,boxSizing:`content-box`},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:`'ƒ'`}},".cm-completionIcon-class":{"&:after":{content:`'○'`}},".cm-completionIcon-interface":{"&:after":{content:`'◌'`}},".cm-completionIcon-variable":{"&:after":{content:`'𝑥'`}},".cm-completionIcon-constant":{"&:after":{content:`'𝐶'`}},".cm-completionIcon-type":{"&:after":{content:`'𝑡'`}},".cm-completionIcon-enum":{"&:after":{content:`'∪'`}},".cm-completionIcon-property":{"&:after":{content:`'□'`}},".cm-completionIcon-keyword":{"&:after":{content:`'🔑︎'`}},".cm-completionIcon-namespace":{"&:after":{content:`'▢'`}},".cm-completionIcon-text":{"&:after":{content:`'abc'`,fontSize:`50%`,verticalAlign:`middle`}}}),Pe=class{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}},Fe=class e{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(t){let n=t.mapPos(this.from,-1,S.TrackDel),r=t.mapPos(this.to,1,S.TrackDel);return n==null||r==null?null:new e(this.field,n,r)}},Ie=class e{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),a=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=a,o=/^\t*/.exec(i)[0].length;for(let t=0;t<o;t++)n+=e.facet(ee);r.push(t+n.length-o),i=n+i.slice(o)}n.push(i),t+=i.length+1}return{text:n,ranges:this.fieldPositions.map(e=>new Fe(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(t){let n=[],r=[],i=[],a;for(let e of t.split(/\r\n?|\n/)){for(;a=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);){let t=a[1]?+a[1]:null,o=a[2]||a[3]||``,s=-1;t===0&&(t=1e9);let c=o.replace(/\\[{}]/g,e=>e[1]);for(let e=0;e<n.length;e++)(t==null?c&&n[e].name==c:n[e].seq==t)&&(s=e);if(s<0){let e=0;for(;e<n.length&&(t==null||n[e].seq!=null&&n[e].seq<t);)e++;n.splice(e,0,{seq:t,name:c}),s=e;for(let e of i)e.field>=s&&e.field++}for(let e of i)if(e.line==r.length&&e.from>a.index){let t=a[2]?3+(a[1]||``).length:2;e.from-=t,e.to-=t}i.push(new Pe(s,r.length,a.index,a.index+c.length)),e=e.slice(0,a.index)+o+e.slice(a.index+a[0].length)}e=e.replace(/\\([{}])/g,(e,t,n)=>{for(let e of i)e.line==r.length&&e.from>n&&(e.from--,e.to--);return t}),r.push(e)}return new e(r,i)}},Le=_.widget({widget:new class extends b{toDOM(){let e=document.createElement(`span`);return e.className=`cm-snippetFieldPosition`,e}ignoreEvent(){return!1}}}),Re=_.mark({class:`cm-snippetField`}),K=class e{constructor(e,t){this.ranges=e,this.active=t,this.deco=_.set(e.map(e=>(e.from==e.to?Le:Re).range(e.from,e.to)),!0)}map(t){let n=[];for(let e of this.ranges){let r=e.map(t);if(!r)return null;n.push(r)}return new e(n,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}},q=l.define({map(e,t){return e&&e.map(t)}}),ze=l.define(),J=u.define({create(){return null},update(e,t){for(let n of t.effects){if(n.is(q))return n.value;if(n.is(ze)&&e)return new K(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>v.decorations.from(e,e=>e?e.deco:_.none)});function Y(e,t){return p.create(e.filter(e=>e.field==t).map(e=>p.range(e.from,e.to)))}function Be(e){let t=Ie.parse(e);return(e,n,r,i)=>{let{text:a,ranges:o}=t.instantiate(e.state,r),{main:s}=e.state.selection,c={changes:{from:r,to:i==s.from?s.to:i,insert:m.of(a)},scrollIntoView:!0,annotations:n?[D.of(n),te.userEvent.of(`input.complete`)]:void 0};if(o.length&&(c.selection=Y(o,0)),o.some(e=>e.field>0)){let t=new K(o,0),n=c.effects=[q.of(t)];e.state.field(J,!1)===void 0&&n.push(l.appendConfig.of([J,We,Ke,G]))}e.dispatch(e.state.update(c))}}function Ve(e){return({state:t,dispatch:n})=>{let r=t.field(J,!1);if(!r||e<0&&r.active==0)return!1;let i=r.active+e,a=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:Y(r.ranges,i),effects:q.of(a?null:new K(r.ranges,i)),scrollIntoView:!0})),!0}}var He=[{key:`Tab`,run:Ve(1),shift:Ve(-1)},{key:`Escape`,run:({state:e,dispatch:t})=>e.field(J,!1)?(t(e.update({effects:q.of(null)})),!0):!1}],Ue=t.define({combine(e){return e.length?e[0]:He}}),We=d.highest(x.compute([Ue],e=>e.facet(Ue)));function Ge(e,t){return{...t,apply:Be(e)}}var Ke=v.domEventHandlers({mousedown(e,t){let n=t.state.field(J,!1),r;if(!n||(r=t.posAtCoords({x:e.clientX,y:e.clientY}))==null)return!1;let i=n.ranges.find(e=>e.from<=r&&e.to>=r);return!i||i.field==n.active?!1:(t.dispatch({selection:Y(n.ranges,i.field),effects:q.of(n.ranges.some(e=>e.field>i.field)?new K(n.ranges,i.field):null),scrollIntoView:!0}),!0)}}),X={brackets:[`(`,`[`,`{`,`'`,`"`],before:`)]}:;>`,stringPrefixes:[]},Z=l.define({map(e,t){return t.mapPos(e,-1,S.TrackAfter)??void 0}}),Q=new class extends o{};Q.startSide=1,Q.endSide=-1;var qe=u.define({create(){return f.empty},update(e,t){if(e=e.map(t.changes),t.selection){let n=t.state.doc.lineAt(t.selection.main.head);e=e.update({filter:e=>e>=n.from&&e<=n.to})}for(let n of t.effects)n.is(Z)&&(e=e.update({add:[Q.range(n.value,n.value+1)]}));return e}});function Je(){return[$e,qe]}var Ye=`()[]{}<>«»»«[]{}`;function Xe(e){for(let t=0;t<16;t+=2)if(Ye.charCodeAt(t)==e)return Ye.charAt(t+1);return s(e<128?e:e+1)}function Ze(e,t){return e.languageDataAt(`closeBrackets`,t)[0]||X}var Qe=typeof navigator==`object`&&/Android\b/.test(navigator.userAgent),$e=v.inputHandler.of((e,t,r,i)=>{if((Qe?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let a=e.state.selection.main;if(i.length>2||i.length==2&&h(n(i,0))==1||t!=a.from||r!=a.to)return!1;let o=tt(e.state,i);return o?(e.dispatch(o),!0):!1}),et=[{key:`Backspace`,run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Ze(e,e.selection.main.head).brackets||X.brackets,i=null,a=e.changeByRange(t=>{if(t.empty){let i=rt(e.doc,t.head);for(let a of r)if(a==i&&$(e.doc,t.head)==Xe(n(a,0)))return{changes:{from:t.head-a.length,to:t.head+a.length},range:p.cursor(t.head-a.length)}}return{range:i=t}});return i||t(e.update(a,{scrollIntoView:!0,userEvent:`delete.backward`})),!i}}];function tt(e,t){let r=Ze(e,e.selection.main.head),i=r.brackets||X.brackets;for(let a of i){let o=Xe(n(a,0));if(t==a)return o==a?ot(e,a,i.indexOf(a+a+a)>-1,r):it(e,a,o,r.before||X.before);if(t==o&&nt(e,e.selection.main.from))return at(e,a,o)}return null}function nt(e,t){let n=!1;return e.field(qe).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function $(e,t){let r=e.sliceString(t,t+2);return r.slice(0,h(n(r,0)))}function rt(e,t){let r=e.sliceString(t-2,t);return h(n(r,0))==r.length?r:r.slice(1)}function it(e,t,n,r){let i=null,a=e.changeByRange(a=>{if(!a.empty)return{changes:[{insert:t,from:a.from},{insert:n,from:a.to}],effects:Z.of(a.to+t.length),range:p.range(a.anchor+t.length,a.head+t.length)};let o=$(e.doc,a.head);return!o||/\s/.test(o)||r.indexOf(o)>-1?{changes:{insert:t+n,from:a.head},effects:Z.of(a.head+t.length),range:p.cursor(a.head+t.length)}:{range:i=a}});return i?null:e.update(a,{scrollIntoView:!0,userEvent:`input.type`})}function at(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&$(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:p.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:`input.type`})}function ot(e,t,n,r){let a=r.stringPrefixes||X.stringPrefixes,o=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:Z.of(r.to+t.length),range:p.range(r.anchor+t.length,r.head+t.length)};let s=r.head,c=$(e.doc,s),l;if(c==t){if(st(e,s))return{changes:{insert:t+t,from:s},effects:Z.of(s+t.length),range:p.cursor(s+t.length)};if(nt(e,s)){let r=n&&e.sliceDoc(s,s+t.length*3)==t+t+t?t+t+t:t;return{changes:{from:s,to:s+r.length,insert:r},range:p.cursor(s+r.length)}}}else if(n&&e.sliceDoc(s-2*t.length,s)==t+t&&(l=lt(e,s-2*t.length,a))>-1&&st(e,l))return{changes:{insert:t+t+t+t,from:s},effects:Z.of(s+t.length),range:p.cursor(s+t.length)};else if(e.charCategorizer(s)(c)!=i.Word&<(e,s,a)>-1&&!ct(e,s,t,a))return{changes:{insert:t+t,from:s},effects:Z.of(s+t.length),range:p.cursor(s+t.length)};return{range:o=r}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:`input.type`})}function st(e,t){let n=a(e).resolveInner(t+1);return n.parent&&n.from==t}function ct(e,t,n,r){let i=a(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let a=0;a<5;a++){let a=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),s=a.indexOf(n);if(!s||s>-1&&r.indexOf(a.slice(0,s))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+s;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let c=i.to==t&&i.parent;if(!c)break;i=c}return!1}function lt(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=i.Word)return t;for(let a of n){let n=t-a.length;if(e.sliceDoc(n,t)==a&&r(e.sliceDoc(n-1,n))!=i.Word)return n}return-1}function ut(e={}){return[Ne,V,j.of(e),je,ft,G]}var dt=[{key:`Ctrl-Space`,run:W},{mac:"Alt-`",run:W},{mac:`Alt-i`,run:W},{key:`Escape`,run:De},{key:`ArrowDown`,run:U(!0)},{key:`ArrowUp`,run:U(!1)},{key:`PageDown`,run:U(!0,`page`)},{key:`PageUp`,run:U(!1,`page`)},{key:`Enter`,run:Ee}],ft=d.highest(x.computeN([j],e=>e.facet(j).defaultKeymap?[dt]:[]));export{ie as a,Ge as c,et as i,ut as n,dt as o,Je as r,ae as s,T as t};
|