@marimo-team/frontend 0.15.5 → 0.16.0-dev96986
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/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +19 -0
- package/dist/assets/{ImageComparisonComponent-CEXMKKA4.js → ImageComparisonComponent-SX7fDaTK.js} +1 -1
- package/dist/assets/{VegaLite-Bt14Ds9k.js → VegaLite-MJUW3b7C.js} +6 -6
- package/dist/assets/_baseEach-9_logFrf.js +1 -0
- package/dist/assets/_baseMap-NzEbKt5c.js +1 -0
- package/dist/assets/_baseUniq-C5LFcyNC.js +1 -0
- package/dist/assets/_createAggregator-ZRm2b6Zm.js +1 -0
- package/dist/assets/agent-panel-BBd11wNX.js +287 -0
- package/dist/assets/agent-panel-D92Mfy1i.css +1 -0
- package/dist/assets/{any-language-editor-DiwNT6zp.js → any-language-editor-DwAaEQfS.js} +1 -1
- package/dist/assets/architectureDiagram-W76B3OCA-BJmVXUoW.js +36 -0
- package/dist/assets/{between-horizontal-start-FyewyCGn.js → between-horizontal-start-KiwU-a3C.js} +1 -1
- package/dist/assets/{blockDiagram-QIGZ2CNN-BrOkAf_c.js → blockDiagram-QIGZ2CNN-DzxZjE7B.js} +1 -1
- package/dist/assets/{c4Diagram-FPNF74CW-BHPzDxE2.js → c4Diagram-FPNF74CW-DjmldG_J.js} +5 -5
- package/dist/assets/channel-DHcKBVM4.js +1 -0
- package/dist/assets/chat-panel-DgJZr0eS.js +3 -0
- package/dist/assets/{chunk-4BX2VUAB-DLxaCNYh.js → chunk-4BX2VUAB-EUTQThiZ.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DdzvO3HR.js → chunk-55IACEB6-DZAiDJxy.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-R5o-nSiG.js → chunk-FMBD7UC4-Bd0Czs-J.js} +1 -1
- package/dist/assets/{chunk-K7UQS3LO-DxaMrGgG.js → chunk-K7UQS3LO-DEKMIknX.js} +1 -1
- package/dist/assets/{chunk-QN33PNHL-DqS9-FYm.js → chunk-QN33PNHL-E0jwHU_n.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-BZ-TzajS.js → chunk-QZHKN3VN-BzaIHJbq.js} +1 -1
- package/dist/assets/{chunk-TVAH2DTR-BsgP2dyv.js → chunk-TVAH2DTR-CZFYvqnm.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-D-h3ahXI.js → chunk-TZMSLE5B-BNqnFjtv.js} +1 -1
- package/dist/assets/{circle-play-CQtRZ-rT.js → circle-play-D3J_mYrF.js} +1 -1
- package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +1 -0
- package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +1 -0
- package/dist/assets/{clear-button-BY6Z_ViL.js → clear-button-ifzRuAR3.js} +1 -1
- package/dist/assets/clone-CSxIll62.js +1 -0
- package/dist/assets/command-palette-D2fdVSET.js +1 -0
- package/dist/assets/common-Ku-cF_2J.js +1 -0
- package/dist/assets/{compile-Ct_jzdKr.js → compile-BgZlHW1c.js} +1 -1
- package/dist/assets/cose-bilkent-S5V4N54A-CVM83SqK.js +1 -0
- package/dist/assets/dagre-5GWH7T2D-ouQPkxT3.js +4 -0
- package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-B47j5GJJ.js} +1 -1
- package/dist/assets/datasources-panel-Bt41Zir-.js +1 -0
- package/dist/assets/{dependency-graph-panel-BOmSCZf7.js → dependency-graph-panel-CZC_B7pK.js} +4 -4
- package/dist/assets/diagram-N5W7TBWH-CQ817ZdR.js +24 -0
- package/dist/assets/diagram-QEK2KX5R-DOK_psUO.js +43 -0
- package/dist/assets/diagram-S2PKOQOG-CVljmOW8.js +24 -0
- package/dist/assets/{documentation-panel-BxjJO_Gw.js → documentation-panel-C7yIvGg1.js} +1 -1
- package/dist/assets/edit-page-CyTMQV2u.js +129 -0
- package/dist/assets/{ellipsis-vertical-UHbmjI2n.js → ellipsis-vertical-C7FjlUsY.js} +1 -1
- package/dist/assets/{empty-state-BIBXzY_0.js → empty-state-DIOGM_CU.js} +1 -1
- package/dist/assets/{erDiagram-AWTI2OKA-E84mAle_.js → erDiagram-AWTI2OKA-DYu8cEdc.js} +1 -1
- package/dist/assets/{error-panel-MEvQ6K7h.js → error-panel-Ddb8RkFG.js} +1 -1
- package/dist/assets/file-explorer-panel-Oy9DbyFP.js +1 -0
- package/dist/assets/{flowDiagram-PVAE7QVJ-DfbIRSAW.js → flowDiagram-PVAE7QVJ-CmvW5iTb.js} +1 -1
- package/dist/assets/{ganttDiagram-OWAHRB6G-DR4HZ1z_.js → ganttDiagram-OWAHRB6G-BaKQlCaT.js} +4 -4
- package/dist/assets/gitGraphDiagram-NY62KEGX-CWO24eP6.js +65 -0
- package/dist/assets/{glide-data-editor-nNmo1lPq.js → glide-data-editor-CNDLEJ9a.js} +11 -11
- package/dist/assets/graph-BZKTtxsc.js +1 -0
- package/dist/assets/home-page-Bvwppn9N.js +9 -0
- package/dist/assets/{index-VPWqq2Pg.js → index-0XOUPdwT.js} +1 -1
- package/dist/assets/{index-uacyUula.js → index-BH7f3aiU.js} +1 -1
- package/dist/assets/{index-Dt9UWeWn.js → index-BJVyzkx5.js} +1 -1
- package/dist/assets/{index-BAH034Ue.js → index-B_d_JZGI.js} +1 -1
- package/dist/assets/{index-CB2pnVQG.js → index-BgXbBA39.js} +1 -1
- package/dist/assets/{index-B8llrTSo.js → index-Brf2DwUM.js} +1 -1
- package/dist/assets/{index-BLu5CX6z.js → index-CXrWwFX6.js} +1 -1
- package/dist/assets/{index-DyLSuOH1.js → index-CZaurnA9.js} +1 -1
- package/dist/assets/{index-BFSnz7iM.js → index-CerjupfZ.js} +1 -1
- package/dist/assets/{index-B7yXbrLa.js → index-D-tZfElD.js} +1 -1
- package/dist/assets/{index-c6If577Q.js → index-D3PqGupX.js} +1 -1
- package/dist/assets/{index-CSgxTUzD.js → index-DCkzth56.js} +1 -1
- package/dist/assets/{index-DWOaniGT.js → index-DFrGFNW1.js} +1 -1
- package/dist/assets/{index-CPN7TRA1.js → index-DZhOPkOB.js} +1 -1
- package/dist/assets/index-DadI618h.css +1 -0
- package/dist/assets/{index-DqzMPAC8.js → index-DkntzpX4.js} +2 -2
- package/dist/assets/{index-B1_GXGaP.js → index-DmgwT3sx.js} +1 -1
- package/dist/assets/index-PmY0x4Zd.js +578 -0
- package/dist/assets/{index-Bq516OmX.js → index-WXJFkQHg.js} +1 -1
- package/dist/assets/{index-DSU75csX.js → index-qE8lHQ-N.js} +1 -1
- package/dist/assets/{index-DMomwMcN.js → index-zrSUQXha.js} +1 -1
- package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +2 -0
- package/dist/assets/isEmpty-D1t7Gran.js +1 -0
- package/dist/assets/{journeyDiagram-BIP6EPQ6-BBiFyygf.js → journeyDiagram-BIP6EPQ6-D4Rp6H_h.js} +1 -1
- package/dist/assets/{kanban-definition-6OIFK2YF-DhgA6Nt6.js → kanban-definition-6OIFK2YF-DFt9DftA.js} +4 -4
- package/dist/assets/layout-D8WXi2_g.js +1 -0
- package/dist/assets/linear-BwY8e5hA.js +1 -0
- package/dist/assets/links-4B6ldZ5P.js +7 -0
- package/dist/assets/{logs-panel-B9SmTZAW.js → logs-panel-Dxiyt7dO.js} +1 -1
- package/dist/assets/{agent-panel-DpQ6muj-.css → markdown-renderer-ClyzDMmG.css} +1 -1
- package/dist/assets/markdown-renderer-VDu-NBKB.js +263 -0
- package/dist/assets/mermaid-B-O-Puyi.js +1 -0
- package/dist/assets/{mermaid.core-4nVOEVX3.js → mermaid.core-BFFCqfOn.js} +41 -41
- package/dist/assets/min-DtVSfYKl.js +1 -0
- package/dist/assets/{mindmap-definition-Q6HEUPPD-CVLQNn1q.js → mindmap-definition-Q6HEUPPD-kyvIY8Dg.js} +2 -2
- package/dist/assets/{number-overlay-editor-CzRzXLcd.js → number-overlay-editor-GjLB2UK4.js} +1 -1
- package/dist/assets/outline-panel-CMJjOoN7.js +1 -0
- package/dist/assets/packages-panel-nfXB-bKW.js +1 -0
- package/dist/assets/{pieDiagram-ADFJNKIX-C5IQ5DBZ.js → pieDiagram-ADFJNKIX-D8JFQcWR.js} +3 -3
- package/dist/assets/{quadrantDiagram-LMRXKWRM-CFXFnQxx.js → quadrantDiagram-LMRXKWRM-Nf8GzxXG.js} +1 -1
- package/dist/assets/{react-plotly-mzdv02_Y.js → react-plotly-CnW9p7ZA.js} +1 -1
- package/dist/assets/{requirementDiagram-4UW4RH46-D9bPC89T.js → requirementDiagram-4UW4RH46-CCUxF8BZ.js} +1 -1
- package/dist/assets/run-page-Bl4p3AbZ.js +1 -0
- package/dist/assets/sankeyDiagram-GR3RE2ED-Sr8kDwP1.js +10 -0
- package/dist/assets/scratchpad-panel-Ja1Mu-W3.js +1 -0
- package/dist/assets/secrets-panel-B-3fcSyP.js +1 -0
- package/dist/assets/{sequenceDiagram-C3RYC4MD-6N7_hY4k.js → sequenceDiagram-C3RYC4MD-CBJ152Q3.js} +4 -4
- package/dist/assets/{slides-component-DMjQomc3.css → slides-component-C-LoGC1U.css} +1 -1
- package/dist/assets/{slides-component-EcjC8sDK.js → slides-component-DGtsVP5o.js} +1 -1
- package/dist/assets/snippets-panel-ClNnwKBM.js +1 -0
- package/dist/assets/sortBy-D47H6Vyl.js +1 -0
- package/dist/assets/state-B_RCHTH5.js +1 -0
- package/dist/assets/stateDiagram-KXAO66HF-BlBFSAZr.js +1 -0
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +1 -0
- package/dist/assets/storage-BNcWOH3-.js +26 -0
- package/dist/assets/terminal-CATzv5Hd.js +10 -0
- package/dist/assets/time-CsYqILfB.js +1 -0
- package/dist/assets/{timeline-definition-XQNQX7LJ-BEaynAiY.js → timeline-definition-XQNQX7LJ-CGrhjuAs.js} +1 -1
- package/dist/assets/tracing-DUbJtOyq.js +2 -0
- package/dist/assets/{tracing-panel-BmuHLPrY.js → tracing-panel-DmzqPUtc.js} +2 -2
- package/dist/assets/{trash-UBqfK4mR.js → trash-rxdjLzkf.js} +1 -1
- package/dist/assets/{tree-XiEycetl.js → tree-C2Ul1h1C.js} +1 -1
- package/dist/assets/{treemap-75Q7IDZK-CnuVFbBG.js → treemap-75Q7IDZK-N9hyUpyj.js} +20 -20
- package/dist/assets/{ts-tags-CloPe9IY.js → ts-tags-DxCDHihD.js} +1 -1
- package/dist/assets/variable-panel-BbgupOdG.js +1 -0
- package/dist/assets/{vega-component-DsTH4tuX.js → vega-component-CR_MHOBT.js} +1 -1
- package/dist/assets/worker-fHbtoWvT.js +1 -0
- package/dist/assets/{xychartDiagram-6GGTOJPD-Dcz3O-A3.js → xychartDiagram-6GGTOJPD-jdLZsMb2.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +10 -5
- package/src/__tests__/mocks.ts +43 -0
- package/src/components/app-config/user-config-form.tsx +78 -1
- package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +116 -65
- package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
- package/src/components/chat/acp/__tests__/context-utils.test.ts +222 -0
- package/src/components/chat/acp/__tests__/prompt.test.ts +1 -1
- package/src/components/chat/acp/__tests__/state.test.ts +38 -42
- package/src/components/chat/acp/agent-docs.tsx +33 -6
- package/src/components/chat/acp/agent-panel.css +0 -18
- package/src/components/chat/acp/agent-panel.tsx +394 -72
- package/src/components/chat/acp/agent-selector.tsx +7 -1
- package/src/components/chat/acp/blocks.tsx +40 -10
- package/src/components/chat/acp/common.tsx +10 -2
- package/src/components/chat/acp/context-utils.ts +127 -0
- package/src/components/chat/acp/prompt.ts +96 -53
- package/src/components/chat/acp/state.ts +1 -1
- package/src/components/chat/acp/types.ts +8 -0
- package/src/components/chat/chat-panel.tsx +28 -89
- package/src/components/chat/chat-utils.ts +127 -1
- package/src/components/chat/markdown-renderer.css +39 -0
- package/src/components/chat/markdown-renderer.tsx +12 -47
- package/src/components/chat/tool-call-accordion.tsx +148 -26
- package/src/components/data-table/SearchBar.tsx +8 -7
- package/src/components/data-table/__tests__/column_formatting.test.ts +50 -35
- package/src/components/data-table/__tests__/data-table.test.tsx +39 -1
- package/src/components/data-table/cell-hover-template/feature.ts +14 -0
- package/src/components/data-table/cell-hover-template/types.ts +11 -0
- package/src/components/data-table/charts/components/form-fields.tsx +41 -37
- package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +5 -2
- package/src/components/data-table/column-formatting/feature.ts +62 -29
- package/src/components/data-table/column-formatting/types.ts +1 -0
- package/src/components/data-table/column-header.tsx +3 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +24 -7
- package/src/components/data-table/column-summary/column-summary.tsx +18 -9
- package/src/components/data-table/columns.tsx +42 -18
- package/src/components/data-table/data-table.tsx +10 -2
- package/src/components/data-table/date-popover.tsx +85 -75
- package/src/components/data-table/filter-pills.tsx +14 -9
- package/src/components/data-table/header-items.tsx +5 -1
- package/src/components/data-table/pagination.tsx +20 -13
- package/src/components/data-table/renderers.tsx +28 -0
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +10 -8
- package/src/components/datasources/column-preview.tsx +6 -2
- package/src/components/datasources/datasources.tsx +8 -12
- package/src/components/editor/Cell.tsx +6 -0
- package/src/components/editor/actions/name-cell-input.tsx +6 -1
- package/src/components/editor/actions/useCellActionButton.tsx +3 -1
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +178 -1
- package/src/components/editor/ai/add-cell-with-ai.tsx +68 -66
- package/src/components/editor/ai/ai-completion-editor.tsx +29 -26
- package/src/components/editor/ai/completion-handlers.tsx +44 -6
- package/src/components/editor/ai/completion-utils.ts +92 -0
- package/src/components/editor/ai/transport/chat-transport.tsx +39 -0
- package/src/components/editor/cell/CellStatus.tsx +23 -20
- package/src/components/editor/cell/CreateCellButton.tsx +3 -4
- package/src/components/editor/cell/StagedAICell.tsx +51 -0
- package/src/components/editor/cell/cell-actions.tsx +2 -1
- package/src/components/editor/cell/code/language-toggle.tsx +3 -4
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +39 -28
- package/src/components/editor/controls/notebook-menu-dropdown.tsx +4 -2
- package/src/components/editor/file-tree/requesting-tree.tsx +14 -8
- package/src/components/editor/renderers/CellArray.tsx +3 -4
- package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
- package/src/components/editor/renderers/slides-layout/types.ts +1 -0
- package/src/components/pages/home-page.tsx +4 -1
- package/src/components/slides/slides-component.tsx +1 -1
- package/src/components/slides/slides.css +6 -0
- package/src/components/terminal/__tests__/state.test.ts +207 -0
- package/src/components/terminal/hooks.ts +41 -0
- package/src/components/terminal/state.ts +75 -0
- package/src/components/terminal/terminal.tsx +334 -13
- package/src/components/terminal/theme.tsx +57 -0
- package/src/components/tracing/tracing-spec.ts +5 -4
- package/src/components/ui/range-slider.tsx +4 -2
- package/src/components/ui/slider.tsx +3 -1
- package/src/components/variables/variables-table.tsx +3 -0
- package/src/core/MarimoApp.tsx +9 -6
- package/src/core/ai/__tests__/staged-cells.test.ts +356 -0
- package/src/core/ai/context/__tests__/registry.test.ts +6 -4
- package/src/core/ai/context/providers/cell-output.ts +3 -2
- package/src/core/ai/context/providers/error.ts +3 -1
- package/src/core/ai/context/providers/file.ts +7 -2
- package/src/core/ai/context/providers/tables.ts +3 -2
- package/src/core/ai/context/providers/variable.ts +6 -4
- package/src/core/ai/staged-cells.ts +208 -0
- package/src/core/cells/cells.ts +1 -1
- package/src/core/cells/logs.ts +1 -1
- package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
- package/src/core/codemirror/language/LanguageAdapters.ts +9 -3
- package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
- package/src/core/codemirror/lsp/notebook-lsp.ts +8 -2
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
- package/src/core/codemirror/rtc/loro/awareness.ts +52 -17
- package/src/core/codemirror/rtc/loro/sync.ts +12 -4
- package/src/core/config/config-schema.ts +1 -0
- package/src/core/config/config.ts +4 -0
- package/src/core/hotkeys/hotkeys.ts +8 -4
- package/src/core/i18n/__tests__/locale-provider.test.tsx +176 -0
- package/src/core/i18n/locale-provider.tsx +35 -0
- package/src/core/i18n/with-locale.tsx +12 -0
- package/src/core/islands/components/web-components.tsx +13 -10
- package/src/core/islands/main.ts +2 -2
- package/src/core/kernel/RuntimeState.ts +4 -1
- package/src/core/kernel/messages.ts +8 -12
- package/src/core/network/DeferredRequestRegistry.ts +16 -4
- package/src/core/runtime/runtime.ts +5 -4
- package/src/core/saving/__tests__/filename.test.ts +37 -0
- package/src/core/static/__tests__/download-html.test.ts +43 -1
- package/src/core/wasm/bridge.ts +5 -1
- package/src/core/wasm/store.ts +4 -1
- package/src/core/wasm/worker/message-buffer.ts +3 -2
- package/src/core/websocket/types.ts +22 -16
- package/src/core/websocket/useMarimoWebSocket.tsx +2 -2
- package/src/css/app/Cell.css +11 -0
- package/src/hooks/useFormatting.ts +97 -0
- package/src/hooks/useTimer.ts +8 -5
- package/src/plugins/core/RenderHTML.tsx +36 -2
- package/src/plugins/core/__test__/RenderHTML.test.ts +72 -0
- package/src/plugins/core/registerReactComponent.tsx +44 -10
- package/src/plugins/impl/DataTablePlugin.tsx +4 -0
- package/src/plugins/impl/FileBrowserPlugin.tsx +8 -2
- package/src/plugins/impl/RangeSliderPlugin.tsx +5 -3
- package/src/plugins/impl/SliderPlugin.tsx +3 -1
- package/src/plugins/impl/anywidget/model.ts +16 -5
- package/src/plugins/impl/data-editor/types.ts +7 -5
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +20 -13
- package/src/plugins/impl/panel/utils.ts +6 -4
- package/src/plugins/layout/OutlinePlugin.tsx +69 -0
- package/src/plugins/layout/StatPlugin.tsx +4 -1
- package/src/plugins/plugins.ts +2 -0
- package/src/stories/cell.stories.tsx +1 -1
- package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
- package/src/utils/__tests__/cell-urls.test.ts +29 -0
- package/src/utils/__tests__/dates.test.ts +45 -24
- package/src/utils/__tests__/filenames.test.ts +18 -0
- package/src/utils/__tests__/numbers.test.ts +42 -30
- package/src/utils/__tests__/once.test.ts +187 -0
- package/src/utils/__tests__/path.test.ts +38 -0
- package/src/utils/__tests__/urls.test.ts +56 -1
- package/src/utils/dates.ts +15 -10
- package/src/utils/edit-distance.ts +8 -6
- package/src/utils/errors.ts +9 -0
- package/src/utils/id-tree.tsx +21 -10
- package/src/utils/localStorage.ts +13 -4
- package/src/utils/numbers.ts +11 -11
- package/src/utils/once.ts +32 -0
- package/src/utils/paths.ts +4 -1
- package/src/utils/pluralize.ts +12 -5
- package/src/utils/python-poet/poet.ts +30 -15
- package/src/utils/time.ts +5 -1
- package/dist/assets/ConnectedDataExplorerComponent-Cn5-l2X1.js +0 -19
- package/dist/assets/_baseEach-C1FLm7WW.js +0 -1
- package/dist/assets/_baseMap-DBVArUYD.js +0 -1
- package/dist/assets/_baseUniq-Dk7ZPJ3N.js +0 -1
- package/dist/assets/_createAggregator-Bn38fDd3.js +0 -1
- package/dist/assets/agent-panel-COUYnuIK.js +0 -475
- package/dist/assets/architectureDiagram-W76B3OCA-DBzWQKKu.js +0 -36
- package/dist/assets/channel-CjhbjOv4.js +0 -1
- package/dist/assets/chat-panel-BPXKoTnZ.js +0 -7
- package/dist/assets/chat-panel-Brrs_eeH.css +0 -1
- package/dist/assets/classDiagram-KNZD7YFC-DHs5cFzy.js +0 -1
- package/dist/assets/classDiagram-v2-RKCZMP56-DHs5cFzy.js +0 -1
- package/dist/assets/clone-DM1YNjEn.js +0 -1
- package/dist/assets/command-palette-S0bzQp7v.js +0 -1
- package/dist/assets/common-B8U9k2Ly.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-wz1Sfx7j.js +0 -1
- package/dist/assets/dagre-5GWH7T2D-BfpcVBgq.js +0 -4
- package/dist/assets/datasources-panel-DfuURLJw.js +0 -1
- package/dist/assets/diagram-N5W7TBWH-Bf0oqqQh.js +0 -24
- package/dist/assets/diagram-QEK2KX5R-ZTc3qikh.js +0 -43
- package/dist/assets/diagram-S2PKOQOG-tLScBy7Z.js +0 -24
- package/dist/assets/edit-page-DJ8kJZ9w.js +0 -129
- package/dist/assets/file-explorer-panel-CzNUJ63G.js +0 -1
- package/dist/assets/gitGraphDiagram-NY62KEGX-C1t6QtVa.js +0 -65
- package/dist/assets/graph-CssCVWIq.js +0 -1
- package/dist/assets/home-page-9eW6qida.js +0 -9
- package/dist/assets/index-CknhX2Vy.css +0 -1
- package/dist/assets/index-DcCIe7np.js +0 -28
- package/dist/assets/index-OC46250R.js +0 -570
- package/dist/assets/infoDiagram-STP46IZ2-CwiAoz9f.js +0 -2
- package/dist/assets/layout-DpQrxGW-.js +0 -1
- package/dist/assets/linear-NsreOeBF.js +0 -1
- package/dist/assets/links-CbvGxbsJ.js +0 -7
- package/dist/assets/mermaid-DSt0r6IQ.js +0 -1
- package/dist/assets/min-D259kI3t.js +0 -1
- package/dist/assets/outline-panel-uvsS-YEQ.js +0 -1
- package/dist/assets/packages-panel-xMz9W2hW.js +0 -1
- package/dist/assets/run-page-Bb68qdhQ.js +0 -1
- package/dist/assets/sankeyDiagram-GR3RE2ED-BSJOau8E.js +0 -10
- package/dist/assets/scratchpad-panel-BF4BO-U4.js +0 -1
- package/dist/assets/secrets-panel-CdIX44dQ.js +0 -1
- package/dist/assets/snippets-panel-Dco9h0rb.js +0 -1
- package/dist/assets/sortBy-aLGA-PGK.js +0 -1
- package/dist/assets/stateDiagram-KXAO66HF-Bd68WT3b.js +0 -1
- package/dist/assets/stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js +0 -1
- package/dist/assets/storage-CGlP4lCF.js +0 -26
- package/dist/assets/terminal-CxkHubcu.js +0 -9
- package/dist/assets/time-D2nr1UgQ.js +0 -1
- package/dist/assets/tracing-kTqHxa7q.js +0 -2
- package/dist/assets/variable-panel-noTnH-AQ.js +0 -1
- package/dist/assets/worker-X5rxzQGQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as f,d as j,j as l}from"./index-
|
|
1
|
+
import{a as f,d as j,j as l}from"./index-PmY0x4Zd.js";const p=d=>{const e=f.c(15),{title:i,description:x,icon:r,action:o}=d;let s,t,a,c,n,m;return e[0]!==r?(s=r&&j.cloneElement(r,{className:"text-accent-foreground"}),e[0]=r,e[1]=s):s=e[1],e[2]!==i?(t=l.jsx("span",{className:"mt-1 text-accent-foreground",children:i}),e[2]=i,e[3]=t):t=e[3],e[4]!==s||e[5]!==t?(a=l.jsxs("div",{className:"flex flex-row gap-2 items-center",children:[s,t]}),e[4]=s,e[5]=t,e[6]=a):a=e[6],e[7]!==x?(c=l.jsx("span",{className:"text-muted-foreground text-sm",children:x}),e[7]=x,e[8]=c):c=e[8],e[9]!==o?(n=o&&l.jsx("div",{className:"mt-2",children:o}),e[9]=o,e[10]=n):n=e[10],e[11]!==a||e[12]!==c||e[13]!==n?(m=l.jsxs("div",{className:"mx-6 my-6 flex flex-col gap-2",children:[a,c,n]}),e[11]=a,e[12]=c,e[13]=n,e[14]=m):m=e[14],m};export{p as P};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var D;import{g as It}from"./chunk-55IACEB6-
|
|
1
|
+
var D;import{g as It}from"./chunk-55IACEB6-DZAiDJxy.js";import{s as Ct}from"./chunk-QN33PNHL-E0jwHU_n.js";import{_ as h,b as xt,a as Dt,s as $t,g as vt,q as wt,t as Lt,c as V,l as x,z as Mt,y as Bt,B as Ft,D as Yt,p as Pt,r as zt,u as Gt}from"./mermaid.core-BFFCqfOn.js";import{s as Kt}from"./transform-D9VCJYws.js";import{c as Zt}from"./channel-DHcKBVM4.js";import"./index-PmY0x4Zd.js";import"./step-BwsUM5iJ.js";import"./isEmpty-D1t7Gran.js";import"./timer-Bqd5yn_a.js";var lt=(function(){var s=h(function(a,u,o,n){for(o=o||{},n=a.length;n--;o[a[n]]=u);return o},"o"),i=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],l=[1,10],y=[1,11],c=[1,12],r=[1,13],_=[1,20],g=[1,21],E=[1,22],$=[1,23],v=[1,24],N=[1,19],w=[1,25],Z=[1,26],L=[1,18],tt=[1,33],et=[1,34],st=[1,35],it=[1,36],nt=[1,37],ht=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],O=[1,42],T=[1,43],M=[1,52],B=[40,50,68,69],F=[1,63],Y=[1,61],S=[1,58],P=[1,62],z=[1,64],U=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],yt=[63,64,65,66,67],ut=[1,81],dt=[1,80],pt=[1,78],_t=[1,79],gt=[6,10,42,47],I=[6,10,13,41,42,47,48,49],j=[1,89],W=[1,88],Q=[1,87],G=[19,56],mt=[1,98],ft=[1,97],at=[19,56,58,60],rt={trace:h(function(){},"trace"),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",8:"SPACE",10:"NEWLINE",13:"COLON",15:"STYLE_SEPARATOR",17:"BLOCK_START",19:"BLOCK_STOP",20:"SQS",21:"SQE",22:"title",23:"title_value",24:"acc_title",25:"acc_title_value",26:"acc_descr",27:"acc_descr_value",28:"acc_descr_multiline_value",33:"direction_tb",34:"direction_bt",35:"direction_rl",36:"direction_lr",37:"CLASSDEF",40:"UNICODE_TEXT",41:"STYLE_TEXT",42:"COMMA",43:"CLASS",44:"STYLE",47:"SEMI",48:"NUM",49:"BRKT",50:"ENTITY_NAME",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"WORD"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:h(function(a,u,o,n,d,t,K){var e=t.length-1;switch(d){case 1:break;case 2:case 6:case 7:this.$=[];break;case 3:t[e-1].push(t[e]),this.$=t[e-1];break;case 4:case 5:case 55:case 78:case 62:case 63:case 66:this.$=t[e];break;case 8:n.addEntity(t[e-4]),n.addEntity(t[e-2]),n.addRelationship(t[e-4],t[e],t[e-2],t[e-3]);break;case 9:n.addEntity(t[e-8]),n.addEntity(t[e-4]),n.addRelationship(t[e-8],t[e],t[e-4],t[e-5]),n.setClass([t[e-8]],t[e-6]),n.setClass([t[e-4]],t[e-2]);break;case 10:n.addEntity(t[e-6]),n.addEntity(t[e-2]),n.addRelationship(t[e-6],t[e],t[e-2],t[e-3]),n.setClass([t[e-6]],t[e-4]);break;case 11:n.addEntity(t[e-6]),n.addEntity(t[e-4]),n.addRelationship(t[e-6],t[e],t[e-4],t[e-5]),n.setClass([t[e-4]],t[e-2]);break;case 12:n.addEntity(t[e-3]),n.addAttributes(t[e-3],t[e-1]);break;case 13:n.addEntity(t[e-5]),n.addAttributes(t[e-5],t[e-1]),n.setClass([t[e-5]],t[e-3]);break;case 14:n.addEntity(t[e-2]);break;case 15:n.addEntity(t[e-4]),n.setClass([t[e-4]],t[e-2]);break;case 16:n.addEntity(t[e]);break;case 17:n.addEntity(t[e-2]),n.setClass([t[e-2]],t[e]);break;case 18:n.addEntity(t[e-6],t[e-4]),n.addAttributes(t[e-6],t[e-1]);break;case 19:n.addEntity(t[e-8],t[e-6]),n.addAttributes(t[e-8],t[e-1]),n.setClass([t[e-8]],t[e-3]);break;case 20:n.addEntity(t[e-5],t[e-3]);break;case 21:n.addEntity(t[e-7],t[e-5]),n.setClass([t[e-7]],t[e-2]);break;case 22:n.addEntity(t[e-3],t[e-1]);break;case 23:n.addEntity(t[e-5],t[e-3]),n.setClass([t[e-5]],t[e]);break;case 24:case 25:this.$=t[e].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=t[e].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=t[e-3],n.addClass(t[e-2],t[e-1]);break;case 37:case 38:case 56:case 64:case 43:this.$=[t[e]];break;case 39:case 40:this.$=t[e-2].concat([t[e]]);break;case 41:this.$=t[e-2],n.setClass(t[e-1],t[e]);break;case 42:this.$=t[e-3],n.addCssStyles(t[e-2],t[e-1]);break;case 44:case 65:t[e-2].push(t[e]),this.$=t[e-2];break;case 46:this.$=t[e-1]+t[e];break;case 54:case 76:case 77:case 67:this.$=t[e].replace(/"/g,"");break;case 57:t[e].push(t[e-1]),this.$=t[e];break;case 58:this.$={type:t[e-1],name:t[e]};break;case 59:this.$={type:t[e-2],name:t[e-1],keys:t[e]};break;case 60:this.$={type:t[e-2],name:t[e-1],comment:t[e]};break;case 61:this.$={type:t[e-3],name:t[e-2],keys:t[e-1],comment:t[e]};break;case 68:this.$={cardA:t[e],relType:t[e-1],cardB:t[e-2]};break;case 69:this.$=n.Cardinality.ZERO_OR_ONE;break;case 70:this.$=n.Cardinality.ZERO_OR_MORE;break;case 71:this.$=n.Cardinality.ONE_OR_MORE;break;case 72:this.$=n.Cardinality.ONLY_ONE;break;case 73:this.$=n.Cardinality.MD_PARENT;break;case 74:this.$=n.Identification.NON_IDENTIFYING;break;case 75:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},s(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:l,24:y,26:c,28:r,29:14,30:15,31:16,32:17,33:_,34:g,35:E,36:$,37:v,40:N,43:w,44:Z,50:L},s(i,[2,7],{1:[2,1]}),s(i,[2,3]),{9:27,11:9,22:l,24:y,26:c,28:r,29:14,30:15,31:16,32:17,33:_,34:g,35:E,36:$,37:v,40:N,43:w,44:Z,50:L},s(i,[2,5]),s(i,[2,6]),s(i,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:tt,64:et,65:st,66:it,67:nt}),{23:[1,38]},{25:[1,39]},{27:[1,40]},s(i,[2,27]),s(i,[2,28]),s(i,[2,29]),s(i,[2,30]),s(i,[2,31]),s(ht,[2,54]),s(ht,[2,55]),s(i,[2,32]),s(i,[2,33]),s(i,[2,34]),s(i,[2,35]),{16:41,40:O,41:T},{16:44,40:O,41:T},{16:45,40:O,41:T},s(i,[2,4]),{11:46,40:N,50:L},{16:47,40:O,41:T},{18:48,19:[1,49],51:50,52:51,56:M},{11:53,40:N,50:L},{62:54,68:[1,55],69:[1,56]},s(B,[2,69]),s(B,[2,70]),s(B,[2,71]),s(B,[2,72]),s(B,[2,73]),s(i,[2,24]),s(i,[2,25]),s(i,[2,26]),{13:F,38:57,41:Y,42:S,45:59,46:60,48:P,49:z},s(U,[2,37]),s(U,[2,38]),{16:65,40:O,41:T,42:S},{13:F,38:66,41:Y,42:S,45:59,46:60,48:P,49:z},{13:[1,67],15:[1,68]},s(i,[2,17],{61:32,12:69,17:[1,70],42:S,63:tt,64:et,65:st,66:it,67:nt}),{19:[1,71]},s(i,[2,14]),{18:72,19:[2,56],51:50,52:51,56:M},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:tt,64:et,65:st,66:it,67:nt},s(yt,[2,74]),s(yt,[2,75]),{6:ut,10:dt,39:77,42:pt,47:_t},{40:[1,82],41:[1,83]},s(gt,[2,43],{46:84,13:F,41:Y,48:P,49:z}),s(I,[2,45]),s(I,[2,50]),s(I,[2,51]),s(I,[2,52]),s(I,[2,53]),s(i,[2,41],{42:S}),{6:ut,10:dt,39:85,42:pt,47:_t},{14:86,40:j,50:W,70:Q},{16:90,40:O,41:T},{11:91,40:N,50:L},{18:92,19:[1,93],51:50,52:51,56:M},s(i,[2,12]),{19:[2,57]},s(G,[2,58],{54:94,55:95,57:96,59:mt,60:ft}),s([19,56,59,60],[2,63]),s(i,[2,22],{15:[1,100],17:[1,99]}),s([40,50],[2,68]),s(i,[2,36]),{13:F,41:Y,45:101,46:60,48:P,49:z},s(i,[2,47]),s(i,[2,48]),s(i,[2,49]),s(U,[2,39]),s(U,[2,40]),s(I,[2,46]),s(i,[2,42]),s(i,[2,8]),s(i,[2,76]),s(i,[2,77]),s(i,[2,78]),{13:[1,102],42:S},{13:[1,104],15:[1,103]},{19:[1,105]},s(i,[2,15]),s(G,[2,59],{55:106,58:[1,107],60:ft}),s(G,[2,60]),s(at,[2,64]),s(G,[2,67]),s(at,[2,66]),{18:108,19:[1,109],51:50,52:51,56:M},{16:110,40:O,41:T},s(gt,[2,44],{46:84,13:F,41:Y,48:P,49:z}),{14:111,40:j,50:W,70:Q},{16:112,40:O,41:T},{14:113,40:j,50:W,70:Q},s(i,[2,13]),s(G,[2,61]),{57:114,59:mt},{19:[1,115]},s(i,[2,20]),s(i,[2,23],{17:[1,116],42:S}),s(i,[2,11]),{13:[1,117],42:S},s(i,[2,10]),s(at,[2,65]),s(i,[2,18]),{18:118,19:[1,119],51:50,52:51,56:M},{14:120,40:j,50:W,70:Q},{19:[1,121]},s(i,[2,21]),s(i,[2,9]),s(i,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:h(function(a,u){if(!u.recoverable){var o=new Error(a);throw o.hash=u,o}this.trace(a)},"parseError"),parse:h(function(a){var u=this,o=[0],n=[],d=[null],t=[],K=this.table,e="",q=0,bt=0,Rt=t.slice.call(arguments,1),p=Object.create(this.lexer),R={yy:{}};for(var ct in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ct)&&(R.yy[ct]=this.yy[ct]);p.setInput(a,R.yy),R.yy.lexer=p,R.yy.parser=this,p.yylloc===void 0&&(p.yylloc={});var ot=p.yylloc;t.push(ot);var At=p.options&&p.options.ranges;function Et(){var b;return typeof(b=n.pop()||p.lex()||1)!="number"&&(b instanceof Array&&(b=(n=b).pop()),b=u.symbols_[b]||b),b}typeof R.yy.parseError=="function"?this.parseError=R.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,h(function(b){o.length=o.length-2*b,d.length=d.length-b,t.length=t.length-b},"popStack"),h(Et,"lex");for(var m,A,f,kt,H,k,Ot,J,C={};;){if(A=o[o.length-1],this.defaultActions[A]?f=this.defaultActions[A]:(m==null&&(m=Et()),f=K[A]&&K[A][m]),f===void 0||!f.length||!f[0]){var Tt="";for(H in J=[],K[A])this.terminals_[H]&&H>2&&J.push("'"+this.terminals_[H]+"'");Tt=p.showPosition?"Parse error on line "+(q+1)+`:
|
|
2
2
|
`+p.showPosition()+`
|
|
3
3
|
Expecting `+J.join(", ")+", got '"+(this.terminals_[m]||m)+"'":"Parse error on line "+(q+1)+": Unexpected "+(m==1?"end of input":"'"+(this.terminals_[m]||m)+"'"),this.parseError(Tt,{text:p.match,token:this.terminals_[m]||m,line:p.yylineno,loc:ot,expected:J})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+A+", token: "+m);switch(f[0]){case 1:o.push(m),d.push(p.yytext),t.push(p.yylloc),o.push(f[1]),m=null,bt=p.yyleng,e=p.yytext,q=p.yylineno,ot=p.yylloc;break;case 2:if(k=this.productions_[f[1]][1],C.$=d[d.length-k],C._$={first_line:t[t.length-(k||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(k||1)].first_column,last_column:t[t.length-1].last_column},At&&(C._$.range=[t[t.length-(k||1)].range[0],t[t.length-1].range[1]]),(kt=this.performAction.apply(C,[e,bt,q,R.yy,f[1],d,t].concat(Rt)))!==void 0)return kt;k&&(o=o.slice(0,-1*k*2),d=d.slice(0,-1*k),t=t.slice(0,-1*k)),o.push(this.productions_[f[1]][0]),d.push(C.$),t.push(C._$),Ot=K[o[o.length-2]][o[o.length-1]],o.push(Ot);break;case 3:return!0}}return!0},"parse")},Nt=(function(){return{EOF:1,parseError:h(function(a,u){if(!this.yy.parser)throw new Error(a);this.yy.parser.parseError(a,u)},"parseError"),setInput:h(function(a,u){return this.yy=u||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:h(function(){var a=this._input[0];return this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a,a.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},"input"),unput:h(function(a){var u=a.length,o=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-u),this.offset-=u;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),o.length-1&&(this.yylineno-=o.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:o?(o.length===n.length?this.yylloc.first_column:0)+n[n.length-o.length].length-o[0].length:this.yylloc.first_column-u},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-u]),this.yyleng=this.yytext.length,this},"unput"),more:h(function(){return this._more=!0,this},"more"),reject:h(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:h(function(a){this.unput(this.match.slice(a))},"less"),pastInput:h(function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:h(function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:h(function(){var a=this.pastInput(),u=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as r,a as d,
|
|
1
|
+
import{c as r,a as d,ao as o,j as t,ap as p,aq as h}from"./index-PmY0x4Zd.js";import{P as m}from"./empty-state-DIOGM_CU.js";/**
|
|
2
2
|
* @license lucide-react v0.542.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as T,u as Ze,ax as ae,K as Xe,cs as Ge,r as P,b as fe,j as a,E as xe,aA as Z,aB as D,e8 as se,b4 as ue,a8 as ge,$ as X,cO as Je,eU as Qe,eV as et,eW as tt,eX as at,eY as st,bS as it,p as nt,eZ as rt,e_ as ot,e$ as lt,b3 as je,cP as ct,f0 as ie,a0 as O,e5 as dt,ba as ht,av as ye,f1 as pt,f2 as mt,a as M,f3 as ft,L as xt,f4 as ut,d as gt,cp as be,X as ve,cM as z,a1 as jt,a_ as V,f5 as yt,e6 as bt,S as vt,by as kt,f6 as wt,T as ne,e7 as Ft,d$ as Ct,dZ as _t,aG as Nt,aH as St,f7 as Pt,eg as Dt,e0 as Ot,dY as C,f8 as L,f9 as ke,fa as Mt,fb as zt,e9 as At,c6 as Rt,__tla as Wt}from"./index-PmY0x4Zd.js";import{e as G,o as It}from"./links-4B6ldZ5P.js";import{m as Et}from"./icon-32x32-DHZerVul.js";import{h as Bt,i as Ht,F as we,__tla as $t}from"./edit-page-CyTMQV2u.js";import{S as re,T as qt}from"./tree-C2Ul1h1C.js";import{E as Tt}from"./ellipsis-vertical-C7FjlUsY.js";import{B as Vt}from"./between-horizontal-start-KiwU-a3C.js";import{__tla as Lt}from"./storage-BNcWOH3-.js";import"./index-BJVyzkx5.js";import"./index-B_d_JZGI.js";import"./index-DkntzpX4.js";import"./index-qE8lHQ-N.js";import"./index-DCkzth56.js";import"./index-CXrWwFX6.js";import"./index-Brf2DwUM.js";import"./index-DZhOPkOB.js";import"./index-CerjupfZ.js";import"./index-WXJFkQHg.js";import"./index-BgXbBA39.js";import"./index-DFrGFNW1.js";import"./index-D3PqGupX.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asn1-DWPaVWf6.js";import"./brainfuck-CtZaYBKt.js";import"./cobol-stawOqaz.js";import"./clike-BgBwzOhw.js";import"./clojure-DiuoqK-z.js";import"./css-ZjFoif2m.js";import"./cmake-DXn5xaP-.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./cypher-gJDei3ni.js";import"./python-DD-Q2bae.js";import"./crystal-CRzZ78HM.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./simple-mode-C3vEBAcb.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./mllike-3c2dg9RT.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./idl-pcmmZuaN.js";import"./javascript-BpzJj0-u.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mirc-DkvFAiy5.js";import"./mathematica-IIbmv7SK.js";import"./modelica-DSrSSXCg.js";import"./mumps-zvxmGV4l.js";import"./mbox-z_N2Mo3d.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./pug-BTvK5tSS.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./rpm-DI_rRufH.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./sparql-BRLJFz69.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./verilog-B4LBqg_1.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./ttcn-cfg-CKJxb-l2.js";import"./turtle-BkSuIpt-.js";import"./webidl-CGwyPRYs.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./vhdl-CWWH2SUo.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./mscgen-B2igx18G.js";import"./index-zrSUQXha.js";import"./trash-rxdjLzkf.js";import"./_createAggregator-ZRm2b6Zm.js";import"./_baseEach-9_logFrf.js";import{__tla as Ut}from"./loro_wasm_bg-C1ks32Vm.js";import"./index-0XOUPdwT.js";let Fe,Kt=Promise.all([(()=>{try{return Wt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Ut}catch{}})()]).then(async()=>{const Ce=T("copy-minus",[["line",{x1:"12",x2:"18",y1:"15",y2:"15",key:"1nscbv"}],["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),oe=T("folder-plus",[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]),le=T("list-tree",[["path",{d:"M21 12h-8",key:"1bmf0i"}],["path",{d:"M21 6H8",key:"1pqkrb"}],["path",{d:"M21 18h-8",key:"1tm79t"}],["path",{d:"M3 6v4c0 1.1.9 2 2 2h3",key:"1ywdgy"}],["path",{d:"M3 10v6c0 1.1.9 2 2 2h3",key:"2wc746"}]]),_e=T("pen-line",[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),Ne=T("square-play",[["rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",key:"h1oib"}],["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}]]),Se=T("view",[["path",{d:"M21 17v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2",key:"mrq65r"}],["path",{d:"M21 7V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v2",key:"be3xqs"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["path",{d:"M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0",key:"11ak4c"}]]),J=new Map,Pe=({file:t,onOpenNotebook:e})=>{const{theme:s}=Ze(),{sendFileDetails:r,sendUpdateFile:i}=ae(),o=Xe(Ge),[l,m]=P.useState(""),{data:n,isPending:u,error:f,setData:x}=fe(async()=>{const g=await r({path:t.path}),c=g.contents||"";return m(J.get(t.path)||c),g},[t.path]),d=async()=>{l!==(n==null?void 0:n.contents)&&await i({path:t.path,contents:l}).then(g=>{g.success&&(x(c=>({...c,contents:l})),m(l))})},j=P.useRef(l);if(j.current=l,P.useEffect(()=>()=>{if(!(n!=null&&n.contents))return;const g=j.current;g===n.contents?J.delete(t.path):J.set(t.path,g)},[t.path,n==null?void 0:n.contents]),f)return a.jsx(xe,{error:f});if(u||!n)return null;const h=n.mimeType||"text/plain",w=h in Q;if(!n.contents&&!w)return a.jsxs("div",{className:"grid grid-cols-2 gap-2 p-6",children:[a.jsx("div",{className:"font-bold text-muted-foreground",children:"Name"}),a.jsx("div",{children:n.file.name}),a.jsx("div",{className:"font-bold text-muted-foreground",children:"Type"}),a.jsx("div",{children:h})]});const b=a.jsxs("div",{className:"text-xs text-muted-foreground p-1 flex justify-end gap-2 border-b",children:[t.isMarimoFile&&!Z()&&a.jsx(D,{content:"Open notebook",children:a.jsx(G,{size:"small",onClick:g=>e(g),children:a.jsx(se,{})})}),a.jsx(D,{content:"Download",children:a.jsx(G,{size:"small",onClick:()=>{if(ce(h)){const g=ot(n.contents,h);return void lt(g,n.file.name)}je(new Blob([n.contents||l],{type:h}),n.file.name)},children:a.jsx(ue,{})})}),!ce(h)&&a.jsxs(a.Fragment,{children:[a.jsx(D,{content:"Copy contents to clipboard",children:a.jsx(G,{size:"small",onClick:async()=>{await X(l)},children:a.jsx(ge,{})})}),a.jsx(D,{content:Je("global.save"),children:a.jsx(G,{size:"small",color:l===n.contents?void 0:"green",onClick:d,disabled:l===n.contents,children:a.jsx(Bt,{})})})]})]});return h.startsWith("image/")?a.jsxs(a.Fragment,{children:[b,a.jsx("div",{className:"flex-1 overflow-hidden flex flex-col",children:a.jsx(Qe,{base64:n.contents,mime:h})})]}):h==="text/csv"&&n.contents?a.jsxs(a.Fragment,{children:[b,a.jsx("div",{className:"flex-1 overflow-hidden flex flex-col",children:a.jsx(et,{contents:n.contents})})]}):h.startsWith("audio/")?a.jsxs(a.Fragment,{children:[b,a.jsx("div",{className:"flex-1 overflow-hidden flex flex-col",children:a.jsx(tt,{base64:n.contents,mime:h})})]}):h.startsWith("video/")?a.jsxs(a.Fragment,{children:[b,a.jsx("div",{className:"flex-1 overflow-hidden flex flex-col",children:a.jsx(at,{base64:n.contents,mime:h})})]}):h.startsWith("application/pdf")?a.jsxs(a.Fragment,{children:[b,a.jsx("div",{className:"flex-1 overflow-hidden flex flex-col",children:a.jsx(st,{base64:n.contents,mime:h})})]}):a.jsxs(a.Fragment,{children:[b,a.jsx("div",{className:"flex-1 overflow-auto",children:a.jsx(P.Suspense,{children:a.jsx(it,{theme:s==="dark"?"dark":"light",language:Q[h]||Q.default,className:"border-b",extensions:[nt.lineWrapping,rt.of([{key:o.getHotkey("global.save").key,stopPropagation:!0,run:()=>l!==n.contents&&(d(),!0)}])],value:l,onChange:m})})})]})},ce=t=>t.startsWith("image/")||t.startsWith("audio/")||t.startsWith("video/")||t.startsWith("application/pdf"),Q={"application/javascript":"javascript","text/markdown":"markdown","text/html":"html","text/css":"css","text/x-python":"python","application/json":"json","application/xml":"xml","text/x-yaml":"yaml","text/csv":"markdown","text/plain":"markdown",default:"markdown"};class De{constructor(e){this.delegate=new re([]),this.callbacks=void 0,this.rootPath="",this.onChange=ct.NOOP,this.path=new ie("/"),this.initialize=async s=>{if(this.onChange=s,this.delegate.data.length===0)try{const r=await this.callbacks.listFiles({path:this.rootPath});this.delegate=new re(r.files),this.rootPath=r.root,this.path=ie.guessDeliminator(r.root)}catch(r){O({title:"Failed",description:dt(r)})}this.onChange(this.delegate.data)},this.refreshAll=async s=>{const r=[this.rootPath,...s.map(o=>{var l;return(l=this.delegate.find(o))==null?void 0:l.data.path})].filter(Boolean),i=await Promise.all(r.map(o=>this.callbacks.listFiles({path:o}).catch(()=>({files:[]}))));for(const[o,l]of r.entries()){const m=i[o];l===this.rootPath?this.delegate=new re(m.files):this.delegate.update({id:l,changes:{children:m.files}})}this.onChange(this.delegate.data)},this.relativeFromRoot=s=>{const r=this.rootPath.endsWith(this.path.deliminator)?this.rootPath:`${this.rootPath}${this.path.deliminator}`;return s.startsWith(r)?s.slice(r.length):s},this.handleResponse=s=>s.success?s:(O({title:"Failed",description:s.message}),null),this.callbacks=e}async expand(e){const s=this.delegate.find(e);if(!s||!s.data.isDirectory)return!1;if(s.children&&s.children.length>0)return!0;const r=await this.callbacks.listFiles({path:s.data.path});return this.delegate.update({id:e,changes:{children:r.files}}),this.onChange(this.delegate.data),!0}async rename(e,s){const r=this.delegate.find(e);if(!r)return;const i=r.data.path,o=this.path.join(this.path.dirname(i),s);await this.callbacks.renameFileOrFolder({path:i,newPath:o}).then(this.handleResponse),this.delegate.update({id:e,changes:{name:s,path:o}}),this.onChange(this.delegate.data),await this.refreshAll([o])}async move(e,s){var i;const r=s?((i=this.delegate.find(s))==null?void 0:i.data.path)??s:this.rootPath;await Promise.all(e.map(o=>{this.delegate.move({id:o,parentId:s,index:0});const l=this.delegate.find(o);if(!l)return Promise.resolve();const m=this.path.join(r,this.path.basename(l.data.path));return this.delegate.update({id:o,changes:{path:m}}),this.callbacks.renameFileOrFolder({path:l.data.path,newPath:m}).then(this.handleResponse)})),this.onChange(this.delegate.data),await this.refreshAll([r])}async createFile(e,s){var o;const r=s?((o=this.delegate.find(s))==null?void 0:o.data.path)??s:this.rootPath,i=await this.callbacks.createFileOrFolder({path:r,type:"file",name:e}).then(this.handleResponse);i!=null&&i.info&&(this.delegate.create({parentId:s,index:0,data:i.info}),this.onChange(this.delegate.data),await this.refreshAll([r]))}async createFolder(e,s){var o;const r=s?((o=this.delegate.find(s))==null?void 0:o.data.path)??s:this.rootPath,i=await this.callbacks.createFileOrFolder({path:r,type:"directory",name:e}).then(this.handleResponse);i!=null&&i.info&&(this.delegate.create({parentId:s,index:0,data:i.info}),this.onChange(this.delegate.data),await this.refreshAll([r]))}async delete(e){const s=this.delegate.find(e);s&&(await this.callbacks.deleteFileOrFolder({path:s.data.path}).then(this.handleResponse),this.delegate.drop({id:e}),this.onChange(this.delegate.data))}}const de=ye(t=>{const e=t(pt);return mt(e,"no requestClientAtom set"),new De({listFiles:e.sendListFiles,createFileOrFolder:e.sendCreateFileOrFolder,deleteFileOrFolder:e.sendDeleteFileOrFolder,renameFileOrFolder:e.sendRenameFileOrFolder})}),Oe=ye({});function he(t){const e=M.c(7);let s;e[0]!==t?(s=t===void 0?{}:t,e[0]=t,e[1]=s):s=e[1];const r=s,{sendCreateFileOrFolder:i}=ae();let o,l;return e[2]!==i?(o=async m=>{for(const n of m){const u=Ie(We(n));let f="";u&&(f=ie.guessDeliminator(u).dirname(u));const x=(await ut(n)).split(",")[1];await i({path:f,type:"file",name:n.name,contents:x})}await(async function(){await ht.get(de).refreshAll([])})()},e[2]=i,e[3]=o):o=e[3],e[4]!==r||e[5]!==o?(l={multiple:!0,maxSize:104857600,onError:Re,onDropRejected:Me,onDrop:o,...r},e[4]=r,e[5]=o,e[6]=l):l=e[6],ft(l)}function Me(t){O({title:"File upload failed",description:a.jsx("div",{className:"flex flex-col gap-1",children:t.map(ze)}),variant:"danger"})}function ze(t){return a.jsxs("div",{children:[t.file.name," (",t.errors.map(Ae).join(", "),")"]},t.file.name)}function Ae(t){return t.message}function Re(t){xt.error(t),O({title:"File upload failed",description:t.message,variant:"danger"})}function We(t){return t.webkitRelativePath?t.webkitRelativePath:"path"in t&&typeof t.path=="string"?t.path:"relativePath"in t&&typeof t.relativePath=="string"?t.relativePath:void 0}function Ie(t){if(t)return t.replace(/^\/+/,"")}const pe=gt.createContext(null),Ee=t=>{const e=M.c(60),{height:s}=t,r=P.useRef(null),[i]=be(de);let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=[],e[0]=o):o=e[0];const[l,m]=P.useState(o),[n,u]=P.useState(null),{openPrompt:f}=ve(),[x,d]=be(Oe);let j,h;e[1]!==i?(j=()=>i.initialize(m),e[1]=i,e[2]=j):j=e[2],e[3]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[3]=h):h=e[3];const{isPending:w,error:b}=fe(j,h);let g;e[4]!==x||e[5]!==i?(g=()=>{i.refreshAll(Object.keys(x).filter(p=>x[p]))},e[4]=x,e[5]=i,e[6]=g):g=e[6];const c=z(g);let y;e[7]!==f||e[8]!==i?(y=async()=>{f({title:"Folder name",onConfirm:async p=>{i.createFolder(p,null)}})},e[7]=f,e[8]=i,e[9]=y):y=e[9];const v=z(y);let _;e[10]!==f||e[11]!==i?(_=async()=>{f({title:"File name",onConfirm:async p=>{i.createFile(p,null)}})},e[10]=f,e[11]=i,e[12]=_):_=e[12];const F=z(_);let N;e[13]!==d?(N=()=>{var p;(p=r.current)==null||p.closeAll(),d({})},e[13]=d,e[14]=N):N=e[14];const ee=z(N);if(w){let p;return e[15]===Symbol.for("react.memo_cache_sentinel")?(p=a.jsx(jt,{size:"medium",centered:!0}),e[15]=p):p=e[15],p}if(b){let p;return e[16]!==b?(p=a.jsx(xe,{error:b}),e[16]=b,e[17]=p):p=e[17],p}if(n){let p,k,S,$,q,Y;return e[18]===Symbol.for("react.memo_cache_sentinel")?(p=()=>u(null),e[18]=p):p=e[18],e[19]===Symbol.for("react.memo_cache_sentinel")?(k=a.jsx(V,{onClick:p,"data-testid":"file-explorer-back-button",variant:"text",size:"xs",className:"mb-0",children:a.jsx(Ht,{size:16})}),e[19]=k):k=e[19],e[20]!==n.name?(S=a.jsxs("div",{className:"flex items-center pl-1 pr-3 shrink-0 border-b justify-between",children:[k,a.jsx("span",{className:"font-bold",children:n.name})]}),e[20]=n.name,e[21]=S):S=e[21],e[22]!==n.path||e[23]!==i?($=Ye=>me(Ye,i.relativeFromRoot(n.path)),e[22]=n.path,e[23]=i,e[24]=$):$=e[24],e[25]!==n||e[26]!==$?(q=a.jsx(P.Suspense,{children:a.jsx(Pe,{onOpenNotebook:$,file:n})}),e[25]=n,e[26]=$,e[27]=q):q=e[27],e[28]!==S||e[29]!==q?(Y=a.jsxs(a.Fragment,{children:[S,q]}),e[28]=S,e[29]=q,e[30]=Y):Y=e[30],Y}let A;e[31]!==ee||e[32]!==F||e[33]!==v||e[34]!==c||e[35]!==i?(A=a.jsx(He,{onRefresh:c,onCreateFile:F,onCreateFolder:v,onCollapseAll:ee,tree:i}),e[31]=ee,e[32]=F,e[33]=v,e[34]=c,e[35]=i,e[36]=A):A=e[36];const te=s-33;let R,W,I,U,E,B,H,K;return e[37]!==i?(R=async p=>{const{ids:k}=p;for(const S of k)await i.delete(S)},W=async p=>{const{id:k,name:S}=p;await i.rename(k,S)},I=async p=>{const{dragIds:k,parentId:S}=p;await i.move(k,S)},e[37]=i,e[38]=R,e[39]=W,e[40]=I):(R=e[38],W=e[39],I=e[40]),e[41]===Symbol.for("react.memo_cache_sentinel")?(U=p=>{const k=p[0];k&&(k.data.isDirectory||u(k.data))},e[41]=U):U=e[41],e[42]!==x||e[43]!==d||e[44]!==i?(E=async p=>{if(await i.expand(p)){const k=x[p]??!1;d({...x,[p]:!k})}},e[42]=x,e[43]=d,e[44]=i,e[45]=E):E=e[45],e[46]!==l||e[47]!==x||e[48]!==R||e[49]!==W||e[50]!==I||e[51]!==E||e[52]!==te?(B=a.jsx(qt,{width:"100%",ref:r,height:te,className:"h-full",data:l,initialOpenState:x,openByDefault:!1,renderCursor:Le,disableDrop:Ue,onDelete:R,onRename:W,onMove:I,onSelect:U,onToggle:E,padding:15,rowHeight:30,indent:Be,overscanCount:1e3,disableMultiSelection:!0,children:Te}),e[46]=l,e[47]=x,e[48]=R,e[49]=W,e[50]=I,e[51]=E,e[52]=te,e[53]=B):B=e[53],e[54]!==B||e[55]!==i?(H=a.jsx(pe,{value:i,children:B}),e[54]=B,e[55]=i,e[56]=H):H=e[56],e[57]!==H||e[58]!==A?(K=a.jsxs(a.Fragment,{children:[A,H]}),e[57]=H,e[58]=A,e[59]=K):K=e[59],K},Be=15,He=t=>{const e=M.c(30),{onRefresh:s,onCreateFile:r,onCreateFolder:i,onCollapseAll:o}=t;let l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l={noDrag:!0,noDragEventsBubbling:!0},e[0]=l):l=e[0];const{getRootProps:m,getInputProps:n}=he(l);let u,f,x,d,j,h,w,b,g,c,y,v,_,F,N;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=a.jsx(we,{size:16}),e[1]=u):u=e[1],e[2]!==r?(f=a.jsx(D,{content:"Add file",children:a.jsx(V,{"data-testid":"file-explorer-add-file-button",onClick:r,variant:"text",size:"xs",children:u})}),e[2]=r,e[3]=f):f=e[3],e[4]===Symbol.for("react.memo_cache_sentinel")?(x=a.jsx(oe,{size:16}),e[4]=x):x=e[4],e[5]!==i?(d=a.jsx(D,{content:"Add folder",children:a.jsx(V,{"data-testid":"file-explorer-add-folder-button",onClick:i,variant:"text",size:"xs",children:x})}),e[5]=i,e[6]=d):d=e[6],e[7]!==m?(j=m({}),e[7]=m,e[8]=j):j=e[8],e[9]===Symbol.for("react.memo_cache_sentinel")?(h=yt({variant:"text",size:"xs"}),w=a.jsx(Pt,{size:16}),e[9]=h,e[10]=w):(h=e[9],w=e[10]),e[11]!==j?(b=a.jsx(D,{content:"Upload file",children:a.jsx("button",{"data-testid":"file-explorer-upload-button",...j,className:h,children:w})}),e[11]=j,e[12]=b):b=e[12],e[13]!==n?(g=n({}),e[13]=n,e[14]=g):g=e[14],e[15]!==g?(c=a.jsx("input",{...g,type:"file"}),e[15]=g,e[16]=c):c=e[16],e[17]===Symbol.for("react.memo_cache_sentinel")?(y=a.jsx(Dt,{size:16}),e[17]=y):y=e[17],e[18]!==s?(v=a.jsx(D,{content:"Refresh",children:a.jsx(V,{"data-testid":"file-explorer-refresh-button",onClick:s,variant:"text",size:"xs",children:y})}),e[18]=s,e[19]=v):v=e[19],e[20]===Symbol.for("react.memo_cache_sentinel")?(_=a.jsx(Ce,{size:16}),e[20]=_):_=e[20],e[21]!==o?(F=a.jsx(D,{content:"Collapse all folders",children:a.jsx(V,{"data-testid":"file-explorer-collapse-button",onClick:o,variant:"text",size:"xs",children:_})}),e[21]=o,e[22]=F):F=e[22],e[23]!==c||e[24]!==v||e[25]!==F||e[26]!==f||e[27]!==d||e[28]!==b?(N=a.jsxs("div",{className:"flex items-center justify-end px-2 shrink-0 border-b",children:[f,d,b,c,v,F]}),e[23]=c,e[24]=v,e[25]=F,e[26]=f,e[27]=d,e[28]=b,e[29]=N):N=e[29],N},$e=t=>{const e=M.c(9),{node:s,onOpenMarimoFile:r}=t;let i,o,l;return e[0]!==s?(i=m=>{s.data.isDirectory||(m.stopPropagation(),s.select())},e[0]=s,e[1]=i):i=e[1],e[2]!==s.data.isMarimoFile||e[3]!==r?(o=s.data.isMarimoFile&&!Z()&&a.jsxs("span",{className:"shrink-0 ml-2 text-sm hidden group-hover:inline hover:underline",onClick:r,children:["open ",a.jsx(se,{className:"inline ml-1",size:12})]}),e[2]=s.data.isMarimoFile,e[3]=r,e[4]=o):o=e[4],e[5]!==s.data.name||e[6]!==i||e[7]!==o?(l=a.jsxs("span",{className:"flex-1 overflow-hidden text-ellipsis",onClick:i,children:[s.data.name,o]}),e[5]=s.data.name,e[6]=i,e[7]=o,e[8]=l):l=e[8],l},qe=t=>{const e=M.c(10),{node:s}=t,r=P.useRef(null);let i,o,l,m,n;return e[0]!==s.data.name?(i=()=>{var u,f;(u=r.current)==null||u.focus(),(f=r.current)==null||f.setSelectionRange(0,s.data.name.lastIndexOf("."))},o=[s.data.name],e[0]=s.data.name,e[1]=i,e[2]=o):(i=e[1],o=e[2]),P.useEffect(i,o),e[3]!==s?(l=()=>s.reset(),m=u=>{u.key==="Escape"&&s.reset(),u.key==="Enter"&&s.submit(u.currentTarget.value)},e[3]=s,e[4]=l,e[5]=m):(l=e[4],m=e[5]),e[6]!==s.data.name||e[7]!==l||e[8]!==m?(n=a.jsx("input",{ref:r,className:"flex-1 bg-transparent border border-border text-muted-foreground",defaultValue:s.data.name,onClick:Ke,onBlur:l,onKeyDown:m}),e[6]=s.data.name,e[7]=l,e[8]=m,e[9]=n):n=e[9],n},Te=({node:t,style:e,dragHandle:s})=>{const{openFile:r,sendCreateFileOrFolder:i,sendFileDetails:o}=ae(),l=t.data.isDirectory?"directory":bt(t.data.name),m=Ft[l],{openConfirm:n,openPrompt:u}=ve(),{createNewCell:f}=vt(),x=kt(),d=P.use(pe),j=async c=>{me(c,d?d.relativeFromRoot(t.data.path):t.data.path)},h=async c=>{c.stopPropagation(),c.preventDefault(),n({title:"Delete file",description:`Are you sure you want to delete ${t.data.name}?`,confirmAction:a.jsx(At,{onClick:async()=>{await t.tree.delete(t.id)},"aria-label":"Confirm",children:"Delete"})})},w=z(async()=>{t.open(),u({title:"Folder name",onConfirm:async c=>{d==null||d.createFolder(c,t.id)}})}),b=z(async()=>{t.open(),u({title:"File name",onConfirm:async c=>{d==null||d.createFile(c,t.id)}})}),g=z(async()=>{var _;if(!d||t.data.isDirectory)return;const[c,y]=wt(t.data.name),v=`${c}_copy${y}`;try{const F=await o({path:t.data.path}),N=((_=t.parent)==null?void 0:_.data.path)||"";await i({path:N,type:"file",name:v,contents:F.contents?btoa(F.contents):void 0}),await d.refreshAll([N])}catch{O({title:"Failed to duplicate file",description:"Unable to create a duplicate of the file",variant:"danger"})}});return a.jsxs("div",{style:e,ref:s,className:ne("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group"),draggable:!0,onClick:c=>{c.stopPropagation(),t.data.isDirectory&&t.toggle()},children:[a.jsx(Ve,{node:t}),a.jsxs("span",{className:ne("flex items-center pl-1 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden group",t.willReceiveDrop&&t.data.isDirectory&&"bg-accent/80 hover:bg-accent/80 text-accent-foreground"),children:[t.data.isMarimoFile?a.jsx("img",{src:Et,className:"w-5 h-5 shrink-0 mr-2 filter grayscale",alt:"Marimo"}):a.jsx(m,{className:"w-5 h-5 shrink-0 mr-2",strokeWidth:1.5}),t.isEditing?a.jsx(qe,{node:t}):a.jsx($e,{node:t,onOpenMarimoFile:j}),a.jsxs(Ct,{modal:!1,children:[a.jsx(_t,{asChild:!0,tabIndex:-1,onClick:c=>c.stopPropagation(),children:a.jsx(V,{"data-testid":"file-explorer-more-button",variant:"text",tabIndex:-1,size:"xs",className:"mb-0","aria-label":"More options",children:a.jsx(Tt,{strokeWidth:2,className:"w-5 h-5 hidden group-hover:block"})})}),(()=>{const c={size:14,strokeWidth:1.5,className:"mr-2"};return a.jsxs(Ot,{align:"end",className:"no-print w-[220px]",onClick:y=>y.stopPropagation(),onCloseAutoFocus:y=>y.preventDefault(),children:[!t.data.isDirectory&&a.jsxs(C,{onSelect:()=>t.select(),children:[a.jsx(Se,{...c}),"Open file"]}),!t.data.isDirectory&&!Z()&&a.jsxs(C,{onSelect:()=>{r({path:t.data.path})},children:[a.jsx(se,{...c}),"Open file in external editor"]}),t.data.isDirectory&&a.jsxs(a.Fragment,{children:[a.jsxs(C,{onSelect:()=>b(),children:[a.jsx(we,{...c}),"Create file"]}),a.jsxs(C,{onSelect:()=>w(),children:[a.jsx(oe,{...c}),"Create folder"]}),a.jsx(L,{})]}),a.jsxs(C,{onSelect:()=>t.edit(),children:[a.jsx(_e,{...c}),"Rename"]}),!t.data.isDirectory&&a.jsxs(C,{onSelect:g,children:[a.jsx(ge,{...c}),"Duplicate"]}),a.jsxs(C,{onSelect:async()=>{await X(t.data.path),O({title:"Copied to clipboard"})},children:[a.jsx(le,{...c}),"Copy path"]}),d&&a.jsxs(C,{onSelect:async()=>{await X(d.relativeFromRoot(t.data.path)),O({title:"Copied to clipboard"})},children:[a.jsx(le,{...c}),"Copy relative path"]}),a.jsx(L,{}),a.jsxs(C,{onSelect:()=>{const{path:y}=t.data,v=ke[l](y);f({code:v,before:!1,cellId:x??"__end__"})},children:[a.jsx(Vt,{...c}),"Insert snippet for reading file"]}),a.jsxs(C,{onSelect:async()=>{O({title:"Copied to clipboard",description:"Code to open the file has been copied to your clipboard. You can also drag and drop this file into the editor"});const{path:y}=t.data,v=ke[l](y);await X(v)},children:[a.jsx(Mt,{...c}),"Copy snippet for reading file"]}),t.data.isMarimoFile&&!Z()&&a.jsxs(a.Fragment,{children:[a.jsx(L,{}),a.jsxs(C,{onSelect:j,children:[a.jsx(Ne,{...c}),"Open notebook"]})]}),a.jsx(L,{}),!t.data.isDirectory&&a.jsxs(a.Fragment,{children:[a.jsxs(C,{onSelect:async()=>{const y=(await o({path:t.data.path})).contents||"";je(new Blob([y]),t.data.name)},children:[a.jsx(ue,{...c}),"Download"]}),a.jsx(L,{})]}),a.jsxs(C,{onSelect:h,variant:"danger",children:[a.jsx(zt,{...c}),"Delete"]})]})})()]})]})]})},Ve=t=>{const e=M.c(3),{node:s}=t;if(!s.data.isDirectory){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=a.jsx("span",{className:"w-5 h-5 shrink-0"}),e[0]=i):i=e[0],i}let r;return e[1]!==s.isOpen?(r=s.isOpen?a.jsx(Nt,{className:"w-5 h-5 shrink-0"}):a.jsx(St,{className:"w-5 h-5 shrink-0"}),e[1]=s.isOpen,e[2]=r):r=e[2],r};function me(t,e){t.stopPropagation(),t.preventDefault(),It(e)}function Le(){return null}function Ue(t){const{parentNode:e}=t;return!e.data.isDirectory}function Ke(t){return t.stopPropagation()}Fe=()=>{const t=M.c(20),{ref:e,height:s}=Rt(),r=s===void 0?1:s;let i;t[0]===Symbol.for("react.memo_cache_sentinel")?(i={noClick:!0,noKeyboard:!0},t[0]=i):i=t[0];const{getRootProps:o,getInputProps:l,isDragActive:m}=he(i);let n,u,f,x,d,j,h,w;return t[1]!==o?(n=o(),t[1]=o,t[2]=n):n=t[2],t[3]===Symbol.for("react.memo_cache_sentinel")?(u=ne("flex flex-col flex-1 overflow-hidden relative"),t[3]=u):u=t[3],t[4]!==l?(f=l(),t[4]=l,t[5]=f):f=t[5],t[6]!==f?(x=a.jsx("input",{...f}),t[6]=f,t[7]=x):x=t[7],t[8]!==m?(d=m&&a.jsx("div",{className:"absolute inset-0 flex items-center uppercase justify-center text-xl font-bold text-primary/90 bg-accent/85 z-10 border-2 border-dashed border-primary/90 rounded-lg pointer-events-none",children:"Drop files here"}),t[8]=m,t[9]=d):d=t[9],t[10]!==r?(j=a.jsx(Ee,{height:r}),t[10]=r,t[11]=j):j=t[11],t[12]!==e||t[13]!==j?(h=a.jsx("div",{ref:e,className:"flex flex-col flex-1 overflow-hidden",children:j}),t[12]=e,t[13]=j,t[14]=h):h=t[14],t[15]!==n||t[16]!==x||t[17]!==d||t[18]!==h?(w=a.jsxs("div",{...n,className:u,children:[x,d,h]}),t[15]=n,t[16]=x,t[17]=d,t[18]=h,t[19]=w):w=t[19],w}});export{Kt as __tla,Fe as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var P1;import{g as Wt}from"./chunk-FMBD7UC4-
|
|
1
|
+
var P1;import{g as Wt}from"./chunk-FMBD7UC4-Bd0Czs-J.js";import{_ as y,o as Pt,l as J,c as p1,p as jt,r as zt,u as Z1,b as Kt,s as Yt,q as Ht,a as qt,g as Xt,t as Qt,j as Jt,v as Zt,J as te,x as ee,y as tt,z as se,A as ie,B as ne}from"./mermaid.core-BFFCqfOn.js";import{g as ae}from"./chunk-55IACEB6-DZAiDJxy.js";import{s as ue}from"./chunk-QN33PNHL-E0jwHU_n.js";import{s as E1}from"./transform-D9VCJYws.js";import{c as re}from"./channel-DHcKBVM4.js";import"./index-PmY0x4Zd.js";import"./step-BwsUM5iJ.js";import"./isEmpty-D1t7Gran.js";import"./timer-Bqd5yn_a.js";var oe=(P1=class{constructor(){this.vertexCounter=0,this.config=p1(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=Kt,this.setAccDescription=Yt,this.setDiagramTitle=Ht,this.getAccTitle=qt,this.getAccDescription=Xt,this.getDiagramTitle=Qt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return Jt.sanitizeText(i,this.config)}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return a.domId;return i}addVertex(i,a,n,r,u,g,p={},c){var j,k;if(!i||i.trim().length===0)return;let o;if(c!==void 0){let d;d=c.includes(`
|
|
2
2
|
`)?c+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+c+`
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{_ as l,g as le,s as de,t as ue,q as he,a as fe,b as me,c as ot,d as ye,ar as V,l as mt,j as ke,i as pe,z as ge,u as xe}from"./mermaid.core-4nVOEVX3.js";import{a9 as gt,dF as Wt,dD as Ot,dC as be,eZ as ve,e_ as Te,e$ as we,f0 as _e,f1 as De,f2 as $e,dB as Pt,dA as zt,dz as Bt,di as Ht,ds as Nt}from"./index-OC46250R.js";import{s as xt}from"./transform-D9VCJYws.js";import{t as Se,m as Ce,a as Me,i as Ee}from"./time-D2nr1UgQ.js";import{l as Ae}from"./linear-NsreOeBF.js";import"./step-BwsUM5iJ.js";import"./timer-Bqd5yn_a.js";import"./init-DLRA0X12.js";function Le(e){return e}var Gt=1e-6;function Ye(e){return"translate("+e+",0)"}function Ie(e){return"translate(0,"+e+")"}function Fe(e){return n=>+e(n)}function We(e,n){return n=Math.max(0,e.bandwidth()-2*n)/2,e.round()&&(n=Math.round(n)),s=>+e(s)+n}function Oe(){return!this.__axis}function jt(e,n){var s=[],r=null,i=null,c=6,u=6,A=3,v=typeof window<"u"&&window.devicePixelRatio>1?0:.5,$=e===1||e===4?-1:1,L=e===4||e===2?"x":"y",F=e===1||e===3?Ye:Ie;function C(D){var g=r??(n.ticks?n.ticks.apply(n,s):n.domain()),k=i??(n.tickFormat?n.tickFormat.apply(n,s):Le),M=Math.max(c,0)+A,E=n.range(),P=+E[0]+v,z=+E[E.length-1]+v,j=(n.bandwidth?We:Fe)(n.copy(),v),B=D.selection?D.selection():D,W=B.selectAll(".domain").data([null]),I=B.selectAll(".tick").data(g,n).order(),p=I.exit(),w=I.enter().append("g").attr("class","tick"),b=I.select("line"),x=I.select("text");W=W.merge(W.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(w),b=b.merge(w.append("line").attr("stroke","currentColor").attr(L+"2",$*c)),x=x.merge(w.append("text").attr("fill","currentColor").attr(L,$*M).attr("dy",e===1?"0em":e===3?"0.71em":"0.32em")),D!==B&&(W=W.transition(D),I=I.transition(D),b=b.transition(D),x=x.transition(D),p=p.transition(D).attr("opacity",Gt).attr("transform",function(y){return isFinite(y=j(y))?F(y+v):this.getAttribute("transform")}),w.attr("opacity",Gt).attr("transform",function(y){var o=this.parentNode.__axis;return F((o&&isFinite(o=o(y))?o:j(y))+v)})),p.remove(),W.attr("d",e===4||e===2?u?"M"+$*u+","+P+"H"+v+"V"+z+"H"+$*u:"M"+v+","+P+"V"+z:u?"M"+P+","+$*u+"V"+v+"H"+z+"V"+$*u:"M"+P+","+v+"H"+z),I.attr("opacity",1).attr("transform",function(y){return F(j(y)+v)}),b.attr(L+"2",$*c),x.attr(L,$*M).text(k),B.filter(Oe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===2?"start":e===4?"end":"middle"),B.each(function(){this.__axis=j})}return C.scale=function(D){return arguments.length?(n=D,C):n},C.ticks=function(){return s=Array.from(arguments),C},C.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),C):s.slice()},C.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),C):r&&r.slice()},C.tickFormat=function(D){return arguments.length?(i=D,C):i},C.tickSize=function(D){return arguments.length?(c=u=+D,C):c},C.tickSizeInner=function(D){return arguments.length?(c=+D,C):c},C.tickSizeOuter=function(D){return arguments.length?(u=+D,C):u},C.tickPadding=function(D){return arguments.length?(A=+D,C):A},C.offset=function(D){return arguments.length?(v=+D,C):v},C}var Vt,yt,Rt={exports:{}};const Pe=gt(Vt?Rt.exports:(Vt=1,Rt.exports=(yt="day",function(e,n,s){var r=function(u){return u.add(4-u.isoWeekday(),yt)},i=n.prototype;i.isoWeekYear=function(){return r(this).year()},i.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),yt);var A,v,$,L=r(this),F=(A=this.isoWeekYear(),$=4-(v=(this.$u?s.utc:s)().year(A).startOf("year")).isoWeekday(),v.isoWeekday()>4&&($+=7),v.add($,yt));return L.diff(F,"week")+1},i.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var c=i.startOf;i.startOf=function(u,A){var v=this.$utils(),$=!!v.u(A)||A;return v.p(u)==="isoweek"?$?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(u,A)}})));var Zt,Ut={exports:{}},ze=(Zt||(Zt=1,Ut.exports=(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,r=/\d\d/,i=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,u={},A=function(g){return(g=+g)+(g>68?1900:2e3)},v=function(g){return function(k){this[g]=+k}},$=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(k){if(!k||k==="Z")return 0;var M=k.match(/([+-]|\d\d)/g),E=60*M[1]+(+M[2]||0);return E===0?0:M[0]==="+"?-E:E})(g)}],L=function(g){var k=u[g];return k&&(k.indexOf?k:k.s.concat(k.f))},F=function(g,k){var M,E=u.meridiem;if(E){for(var P=1;P<=24;P+=1)if(g.indexOf(E(P,0,k))>-1){M=P>12;break}}else M=g===(k?"pm":"PM");return M},C={A:[c,function(g){this.afternoon=F(g,!1)}],a:[c,function(g){this.afternoon=F(g,!0)}],Q:[s,function(g){this.month=3*(g-1)+1}],S:[s,function(g){this.milliseconds=100*+g}],SS:[r,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,v("seconds")],ss:[i,v("seconds")],m:[i,v("minutes")],mm:[i,v("minutes")],H:[i,v("hours")],h:[i,v("hours")],HH:[i,v("hours")],hh:[i,v("hours")],D:[i,v("day")],DD:[r,v("day")],Do:[c,function(g){var k=u.ordinal,M=g.match(/\d+/);if(this.day=M[0],k)for(var E=1;E<=31;E+=1)k(E).replace(/\[|\]/g,"")===g&&(this.day=E)}],w:[i,v("week")],ww:[r,v("week")],M:[i,v("month")],MM:[r,v("month")],MMM:[c,function(g){var k=L("months"),M=(L("monthsShort")||k.map(function(E){return E.slice(0,3)})).indexOf(g)+1;if(M<1)throw new Error;this.month=M%12||M}],MMMM:[c,function(g){var k=L("months").indexOf(g)+1;if(k<1)throw new Error;this.month=k%12||k}],Y:[/[+-]?\d+/,v("year")],YY:[r,function(g){this.year=A(g)}],YYYY:[/\d{4}/,v("year")],Z:$,ZZ:$};function D(g){var k,M;k=g,M=u&&u.formats;for(var E=(g=k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,w,b){var x=b&&b.toUpperCase();return w||M[b]||e[b]||M[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,o,m){return o||m.slice(1)})})).match(n),P=E.length,z=0;z<P;z+=1){var j=E[z],B=C[j],W=B&&B[0],I=B&&B[1];E[z]=I?{regex:W,parser:I}:j.replace(/^\[|\]$/g,"")}return function(p){for(var w={},b=0,x=0;b<P;b+=1){var y=E[b];if(typeof y=="string")x+=y.length;else{var o=y.regex,m=y.parser,h=p.slice(x),d=o.exec(h)[0];m.call(w,d),p=p.replace(d,"")}}return(function(T){var t=T.afternoon;if(t!==void 0){var f=T.hours;t?f<12&&(T.hours+=12):f===12&&(T.hours=0),delete T.afternoon}})(w),w}}return function(g,k,M){M.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(A=g.parseTwoDigitYear);var E=k.prototype,P=E.parse;E.parse=function(z){var j=z.date,B=z.utc,W=z.args;this.$u=B;var I=W[1];if(typeof I=="string"){var p=W[2]===!0,w=W[3]===!0,b=p||w,x=W[2];w&&(x=W[2]),u=this.$locale(),!p&&x&&(u=M.Ls[x]),this.$d=(function(h,d,T,t){try{if(["x","X"].indexOf(d)>-1)return new Date((d==="X"?1e3:1)*h);var f=D(d)(h),a=f.year,_=f.month,Y=f.day,O=f.hours,S=f.minutes,U=f.seconds,tt=f.milliseconds,rt=f.zone,ft=f.week,st=new Date,N=Y||(a||_?1:st.getDate()),q=a||st.getFullYear(),G=0;a&&!_||(G=_>0?_-1:st.getMonth());var et,X=O||0,R=S||0,at=U||0,J=tt||0;return rt?new Date(Date.UTC(q,G,N,X,R,at,J+60*rt.offset*1e3)):T?new Date(Date.UTC(q,G,N,X,R,at,J)):(et=new Date(q,G,N,X,R,at,J),ft&&(et=t(et).week(ft).toDate()),et)}catch{return new Date("")}})(j,I,B,M),this.init(),x&&x!==!0&&(this.$L=this.locale(x).$L),b&&j!=this.format(I)&&(this.$d=new Date("")),u={}}else if(I instanceof Array)for(var y=I.length,o=1;o<=y;o+=1){W[1]=I[o-1];var m=M.apply(this,W);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}o===y&&(this.$d=new Date(""))}else P.call(this,z)}}})()),Ut.exports);const Be=gt(ze);var qt,Qt={exports:{}},He=(qt||(qt=1,Qt.exports=function(e,n){var s=n.prototype,r=s.format;s.format=function(i){var c=this,u=this.$locale();if(!this.isValid())return r.bind(this)(i);var A=this.$utils(),v=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function($){switch($){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return u.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return u.ordinal(c.week(),"W");case"w":case"ww":return A.s(c.week(),$==="w"?1:2,"0");case"W":case"WW":return A.s(c.isoWeek(),$==="W"?1:2,"0");case"k":case"kk":return A.s(String(c.$H===0?24:c.$H),$==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return $}});return r.bind(this)(v)}}),Qt.exports);const Ne=gt(He);var bt=(function(){var e=l(function(o,m,h,d){for(h=h||{},d=o.length;d--;h[o[d]]=m);return h},"o"),n=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],c=[1,29],u=[1,30],A=[1,31],v=[1,32],$=[1,33],L=[1,34],F=[1,9],C=[1,10],D=[1,11],g=[1,12],k=[1,13],M=[1,14],E=[1,15],P=[1,16],z=[1,19],j=[1,20],B=[1,21],W=[1,22],I=[1,23],p=[1,25],w=[1,35],b={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(o,m,h,d,T,t,f){var a=t.length-1;switch(T){case 1:return t[a-1];case 2:case 6:case 7:this.$=[];break;case 3:t[a-1].push(t[a]),this.$=t[a-1];break;case 4:case 5:this.$=t[a];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(t[a].substr(11)),this.$=t[a].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=t[a].substr(18);break;case 19:d.TopAxis(),this.$=t[a].substr(8);break;case 20:d.setAxisFormat(t[a].substr(11)),this.$=t[a].substr(11);break;case 21:d.setTickInterval(t[a].substr(13)),this.$=t[a].substr(13);break;case 22:d.setExcludes(t[a].substr(9)),this.$=t[a].substr(9);break;case 23:d.setIncludes(t[a].substr(9)),this.$=t[a].substr(9);break;case 24:d.setTodayMarker(t[a].substr(12)),this.$=t[a].substr(12);break;case 27:d.setDiagramTitle(t[a].substr(6)),this.$=t[a].substr(6);break;case 28:this.$=t[a].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=t[a].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(t[a].substr(8)),this.$=t[a].substr(8);break;case 33:d.addTask(t[a-1],t[a]),this.$="task";break;case 34:this.$=t[a-1],d.setClickEvent(t[a-1],t[a],null);break;case 35:this.$=t[a-2],d.setClickEvent(t[a-2],t[a-1],t[a]);break;case 36:this.$=t[a-2],d.setClickEvent(t[a-2],t[a-1],null),d.setLink(t[a-2],t[a]);break;case 37:this.$=t[a-3],d.setClickEvent(t[a-3],t[a-2],t[a-1]),d.setLink(t[a-3],t[a]);break;case 38:this.$=t[a-2],d.setClickEvent(t[a-2],t[a],null),d.setLink(t[a-2],t[a-1]);break;case 39:this.$=t[a-3],d.setClickEvent(t[a-3],t[a-1],t[a]),d.setLink(t[a-3],t[a-2]);break;case 40:this.$=t[a-1],d.setLink(t[a-1],t[a]);break;case 41:case 47:this.$=t[a-1]+" "+t[a];break;case 42:case 43:case 45:this.$=t[a-2]+" "+t[a-1]+" "+t[a];break;case 44:case 46:this.$=t[a-3]+" "+t[a-2]+" "+t[a-1]+" "+t[a]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:c,16:u,17:A,18:v,19:18,20:$,21:L,22:F,23:C,24:D,25:g,26:k,27:M,28:E,29:P,30:z,31:j,33:B,35:W,36:I,37:24,38:p,40:w},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:c,16:u,17:A,18:v,19:18,20:$,21:L,22:F,23:C,24:D,25:g,26:k,27:M,28:E,29:P,30:z,31:j,33:B,35:W,36:I,37:24,38:p,40:w},e(n,[2,5]),e(n,[2,6]),e(n,[2,17]),e(n,[2,18]),e(n,[2,19]),e(n,[2,20]),e(n,[2,21]),e(n,[2,22]),e(n,[2,23]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),e(n,[2,27]),{32:[1,37]},{34:[1,38]},e(n,[2,30]),e(n,[2,31]),e(n,[2,32]),{39:[1,39]},e(n,[2,8]),e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),{41:[1,40],43:[1,41]},e(n,[2,4]),e(n,[2,28]),e(n,[2,29]),e(n,[2,33]),e(n,[2,34],{42:[1,42],43:[1,43]}),e(n,[2,40],{41:[1,44]}),e(n,[2,35],{43:[1,45]}),e(n,[2,36]),e(n,[2,38],{42:[1,46]}),e(n,[2,37]),e(n,[2,39])],defaultActions:{},parseError:l(function(o,m){if(!m.recoverable){var h=new Error(o);throw h.hash=m,h}this.trace(o)},"parseError"),parse:l(function(o){var m=this,h=[0],d=[],T=[null],t=[],f=this.table,a="",_=0,Y=0,O=t.slice.call(arguments,1),S=Object.create(this.lexer),U={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(U.yy[tt]=this.yy[tt]);S.setInput(o,U.yy),U.yy.lexer=S,U.yy.parser=this,S.yylloc===void 0&&(S.yylloc={});var rt=S.yylloc;t.push(rt);var ft=S.options&&S.options.ranges;function st(){var Z;return typeof(Z=d.pop()||S.lex()||1)!="number"&&(Z instanceof Array&&(Z=(d=Z).pop()),Z=m.symbols_[Z]||Z),Z}typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,l(function(Z){h.length=h.length-2*Z,T.length=T.length-Z,t.length=t.length-Z},"popStack"),l(st,"lex");for(var N,q,G,et,X,R,at,J,nt={};;){if(q=h[h.length-1],this.defaultActions[q]?G=this.defaultActions[q]:(N==null&&(N=st()),G=f[q]&&f[q][N]),G===void 0||!G.length||!G[0]){var Ft="";for(X in J=[],f[q])this.terminals_[X]&&X>2&&J.push("'"+this.terminals_[X]+"'");Ft=S.showPosition?"Parse error on line "+(_+1)+`:
|
|
1
|
+
import{_ as l,g as le,s as de,t as ue,q as he,a as fe,b as me,c as ot,d as ye,aq as V,l as mt,j as ke,i as pe,z as ge,u as xe}from"./mermaid.core-BFFCqfOn.js";import{ai as gt,eG as Wt,eE as Ot,eD as be,fc as ve,fd as Te,fe as we,ff as _e,fg as De,fh as $e,eC as Pt,eB as zt,eA as Bt,ek as Ht,et as Nt}from"./index-PmY0x4Zd.js";import{s as xt}from"./transform-D9VCJYws.js";import{t as Se,m as Ce,a as Ee,i as Me}from"./time-CsYqILfB.js";import{l as Ae}from"./linear-BwY8e5hA.js";import"./step-BwsUM5iJ.js";import"./isEmpty-D1t7Gran.js";import"./timer-Bqd5yn_a.js";import"./init-DLRA0X12.js";function Le(e){return e}var Gt=1e-6;function Ye(e){return"translate("+e+",0)"}function Ie(e){return"translate(0,"+e+")"}function Fe(e){return n=>+e(n)}function We(e,n){return n=Math.max(0,e.bandwidth()-2*n)/2,e.round()&&(n=Math.round(n)),s=>+e(s)+n}function Oe(){return!this.__axis}function jt(e,n){var s=[],r=null,i=null,c=6,u=6,A=3,v=typeof window<"u"&&window.devicePixelRatio>1?0:.5,$=e===1||e===4?-1:1,L=e===4||e===2?"x":"y",F=e===1||e===3?Ye:Ie;function C(D){var g=r??(n.ticks?n.ticks.apply(n,s):n.domain()),k=i??(n.tickFormat?n.tickFormat.apply(n,s):Le),E=Math.max(c,0)+A,M=n.range(),P=+M[0]+v,z=+M[M.length-1]+v,j=(n.bandwidth?We:Fe)(n.copy(),v),B=D.selection?D.selection():D,W=B.selectAll(".domain").data([null]),I=B.selectAll(".tick").data(g,n).order(),p=I.exit(),w=I.enter().append("g").attr("class","tick"),b=I.select("line"),x=I.select("text");W=W.merge(W.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),I=I.merge(w),b=b.merge(w.append("line").attr("stroke","currentColor").attr(L+"2",$*c)),x=x.merge(w.append("text").attr("fill","currentColor").attr(L,$*E).attr("dy",e===1?"0em":e===3?"0.71em":"0.32em")),D!==B&&(W=W.transition(D),I=I.transition(D),b=b.transition(D),x=x.transition(D),p=p.transition(D).attr("opacity",Gt).attr("transform",function(y){return isFinite(y=j(y))?F(y+v):this.getAttribute("transform")}),w.attr("opacity",Gt).attr("transform",function(y){var o=this.parentNode.__axis;return F((o&&isFinite(o=o(y))?o:j(y))+v)})),p.remove(),W.attr("d",e===4||e===2?u?"M"+$*u+","+P+"H"+v+"V"+z+"H"+$*u:"M"+v+","+P+"V"+z:u?"M"+P+","+$*u+"V"+v+"H"+z+"V"+$*u:"M"+P+","+v+"H"+z),I.attr("opacity",1).attr("transform",function(y){return F(j(y)+v)}),b.attr(L+"2",$*c),x.attr(L,$*E).text(k),B.filter(Oe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",e===2?"start":e===4?"end":"middle"),B.each(function(){this.__axis=j})}return C.scale=function(D){return arguments.length?(n=D,C):n},C.ticks=function(){return s=Array.from(arguments),C},C.tickArguments=function(D){return arguments.length?(s=D==null?[]:Array.from(D),C):s.slice()},C.tickValues=function(D){return arguments.length?(r=D==null?null:Array.from(D),C):r&&r.slice()},C.tickFormat=function(D){return arguments.length?(i=D,C):i},C.tickSize=function(D){return arguments.length?(c=u=+D,C):c},C.tickSizeInner=function(D){return arguments.length?(c=+D,C):c},C.tickSizeOuter=function(D){return arguments.length?(u=+D,C):u},C.tickPadding=function(D){return arguments.length?(A=+D,C):A},C.offset=function(D){return arguments.length?(v=+D,C):v},C}var Vt,yt,Rt={exports:{}};const Pe=gt(Vt?Rt.exports:(Vt=1,Rt.exports=(yt="day",function(e,n,s){var r=function(u){return u.add(4-u.isoWeekday(),yt)},i=n.prototype;i.isoWeekYear=function(){return r(this).year()},i.isoWeek=function(u){if(!this.$utils().u(u))return this.add(7*(u-this.isoWeek()),yt);var A,v,$,L=r(this),F=(A=this.isoWeekYear(),$=4-(v=(this.$u?s.utc:s)().year(A).startOf("year")).isoWeekday(),v.isoWeekday()>4&&($+=7),v.add($,yt));return L.diff(F,"week")+1},i.isoWeekday=function(u){return this.$utils().u(u)?this.day()||7:this.day(this.day()%7?u:u-7)};var c=i.startOf;i.startOf=function(u,A){var v=this.$utils(),$=!!v.u(A)||A;return v.p(u)==="isoweek"?$?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(u,A)}})));var Zt,qt={exports:{}},ze=(Zt||(Zt=1,qt.exports=(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,r=/\d\d/,i=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,u={},A=function(g){return(g=+g)+(g>68?1900:2e3)},v=function(g){return function(k){this[g]=+k}},$=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=(function(k){if(!k||k==="Z")return 0;var E=k.match(/([+-]|\d\d)/g),M=60*E[1]+(+E[2]||0);return M===0?0:E[0]==="+"?-M:M})(g)}],L=function(g){var k=u[g];return k&&(k.indexOf?k:k.s.concat(k.f))},F=function(g,k){var E,M=u.meridiem;if(M){for(var P=1;P<=24;P+=1)if(g.indexOf(M(P,0,k))>-1){E=P>12;break}}else E=g===(k?"pm":"PM");return E},C={A:[c,function(g){this.afternoon=F(g,!1)}],a:[c,function(g){this.afternoon=F(g,!0)}],Q:[s,function(g){this.month=3*(g-1)+1}],S:[s,function(g){this.milliseconds=100*+g}],SS:[r,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[i,v("seconds")],ss:[i,v("seconds")],m:[i,v("minutes")],mm:[i,v("minutes")],H:[i,v("hours")],h:[i,v("hours")],HH:[i,v("hours")],hh:[i,v("hours")],D:[i,v("day")],DD:[r,v("day")],Do:[c,function(g){var k=u.ordinal,E=g.match(/\d+/);if(this.day=E[0],k)for(var M=1;M<=31;M+=1)k(M).replace(/\[|\]/g,"")===g&&(this.day=M)}],w:[i,v("week")],ww:[r,v("week")],M:[i,v("month")],MM:[r,v("month")],MMM:[c,function(g){var k=L("months"),E=(L("monthsShort")||k.map(function(M){return M.slice(0,3)})).indexOf(g)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[c,function(g){var k=L("months").indexOf(g)+1;if(k<1)throw new Error;this.month=k%12||k}],Y:[/[+-]?\d+/,v("year")],YY:[r,function(g){this.year=A(g)}],YYYY:[/\d{4}/,v("year")],Z:$,ZZ:$};function D(g){var k,E;k=g,E=u&&u.formats;for(var M=(g=k.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,w,b){var x=b&&b.toUpperCase();return w||E[b]||e[b]||E[x].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,o,m){return o||m.slice(1)})})).match(n),P=M.length,z=0;z<P;z+=1){var j=M[z],B=C[j],W=B&&B[0],I=B&&B[1];M[z]=I?{regex:W,parser:I}:j.replace(/^\[|\]$/g,"")}return function(p){for(var w={},b=0,x=0;b<P;b+=1){var y=M[b];if(typeof y=="string")x+=y.length;else{var o=y.regex,m=y.parser,h=p.slice(x),d=o.exec(h)[0];m.call(w,d),p=p.replace(d,"")}}return(function(T){var t=T.afternoon;if(t!==void 0){var f=T.hours;t?f<12&&(T.hours+=12):f===12&&(T.hours=0),delete T.afternoon}})(w),w}}return function(g,k,E){E.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(A=g.parseTwoDigitYear);var M=k.prototype,P=M.parse;M.parse=function(z){var j=z.date,B=z.utc,W=z.args;this.$u=B;var I=W[1];if(typeof I=="string"){var p=W[2]===!0,w=W[3]===!0,b=p||w,x=W[2];w&&(x=W[2]),u=this.$locale(),!p&&x&&(u=E.Ls[x]),this.$d=(function(h,d,T,t){try{if(["x","X"].indexOf(d)>-1)return new Date((d==="X"?1e3:1)*h);var f=D(d)(h),a=f.year,_=f.month,Y=f.day,O=f.hours,S=f.minutes,q=f.seconds,tt=f.milliseconds,rt=f.zone,ft=f.week,st=new Date,N=Y||(a||_?1:st.getDate()),U=a||st.getFullYear(),G=0;a&&!_||(G=_>0?_-1:st.getMonth());var et,X=O||0,R=S||0,at=q||0,J=tt||0;return rt?new Date(Date.UTC(U,G,N,X,R,at,J+60*rt.offset*1e3)):T?new Date(Date.UTC(U,G,N,X,R,at,J)):(et=new Date(U,G,N,X,R,at,J),ft&&(et=t(et).week(ft).toDate()),et)}catch{return new Date("")}})(j,I,B,E),this.init(),x&&x!==!0&&(this.$L=this.locale(x).$L),b&&j!=this.format(I)&&(this.$d=new Date("")),u={}}else if(I instanceof Array)for(var y=I.length,o=1;o<=y;o+=1){W[1]=I[o-1];var m=E.apply(this,W);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}o===y&&(this.$d=new Date(""))}else P.call(this,z)}}})()),qt.exports);const Be=gt(ze);var Ut,Qt={exports:{}},He=(Ut||(Ut=1,Qt.exports=function(e,n){var s=n.prototype,r=s.format;s.format=function(i){var c=this,u=this.$locale();if(!this.isValid())return r.bind(this)(i);var A=this.$utils(),v=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function($){switch($){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return u.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return u.ordinal(c.week(),"W");case"w":case"ww":return A.s(c.week(),$==="w"?1:2,"0");case"W":case"WW":return A.s(c.isoWeek(),$==="W"?1:2,"0");case"k":case"kk":return A.s(String(c.$H===0?24:c.$H),$==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return $}});return r.bind(this)(v)}}),Qt.exports);const Ne=gt(He);var bt=(function(){var e=l(function(o,m,h,d){for(h=h||{},d=o.length;d--;h[o[d]]=m);return h},"o"),n=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],s=[1,26],r=[1,27],i=[1,28],c=[1,29],u=[1,30],A=[1,31],v=[1,32],$=[1,33],L=[1,34],F=[1,9],C=[1,10],D=[1,11],g=[1,12],k=[1,13],E=[1,14],M=[1,15],P=[1,16],z=[1,19],j=[1,20],B=[1,21],W=[1,22],I=[1,23],p=[1,25],w=[1,35],b={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:l(function(o,m,h,d,T,t,f){var a=t.length-1;switch(T){case 1:return t[a-1];case 2:case 6:case 7:this.$=[];break;case 3:t[a-1].push(t[a]),this.$=t[a-1];break;case 4:case 5:this.$=t[a];break;case 8:d.setWeekday("monday");break;case 9:d.setWeekday("tuesday");break;case 10:d.setWeekday("wednesday");break;case 11:d.setWeekday("thursday");break;case 12:d.setWeekday("friday");break;case 13:d.setWeekday("saturday");break;case 14:d.setWeekday("sunday");break;case 15:d.setWeekend("friday");break;case 16:d.setWeekend("saturday");break;case 17:d.setDateFormat(t[a].substr(11)),this.$=t[a].substr(11);break;case 18:d.enableInclusiveEndDates(),this.$=t[a].substr(18);break;case 19:d.TopAxis(),this.$=t[a].substr(8);break;case 20:d.setAxisFormat(t[a].substr(11)),this.$=t[a].substr(11);break;case 21:d.setTickInterval(t[a].substr(13)),this.$=t[a].substr(13);break;case 22:d.setExcludes(t[a].substr(9)),this.$=t[a].substr(9);break;case 23:d.setIncludes(t[a].substr(9)),this.$=t[a].substr(9);break;case 24:d.setTodayMarker(t[a].substr(12)),this.$=t[a].substr(12);break;case 27:d.setDiagramTitle(t[a].substr(6)),this.$=t[a].substr(6);break;case 28:this.$=t[a].trim(),d.setAccTitle(this.$);break;case 29:case 30:this.$=t[a].trim(),d.setAccDescription(this.$);break;case 31:d.addSection(t[a].substr(8)),this.$=t[a].substr(8);break;case 33:d.addTask(t[a-1],t[a]),this.$="task";break;case 34:this.$=t[a-1],d.setClickEvent(t[a-1],t[a],null);break;case 35:this.$=t[a-2],d.setClickEvent(t[a-2],t[a-1],t[a]);break;case 36:this.$=t[a-2],d.setClickEvent(t[a-2],t[a-1],null),d.setLink(t[a-2],t[a]);break;case 37:this.$=t[a-3],d.setClickEvent(t[a-3],t[a-2],t[a-1]),d.setLink(t[a-3],t[a]);break;case 38:this.$=t[a-2],d.setClickEvent(t[a-2],t[a],null),d.setLink(t[a-2],t[a-1]);break;case 39:this.$=t[a-3],d.setClickEvent(t[a-3],t[a-1],t[a]),d.setLink(t[a-3],t[a-2]);break;case 40:this.$=t[a-1],d.setLink(t[a-1],t[a]);break;case 41:case 47:this.$=t[a-1]+" "+t[a];break;case 42:case 43:case 45:this.$=t[a-2]+" "+t[a-1]+" "+t[a];break;case 44:case 46:this.$=t[a-3]+" "+t[a-2]+" "+t[a-1]+" "+t[a]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:s,13:r,14:i,15:c,16:u,17:A,18:v,19:18,20:$,21:L,22:F,23:C,24:D,25:g,26:k,27:E,28:M,29:P,30:z,31:j,33:B,35:W,36:I,37:24,38:p,40:w},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:36,11:17,12:s,13:r,14:i,15:c,16:u,17:A,18:v,19:18,20:$,21:L,22:F,23:C,24:D,25:g,26:k,27:E,28:M,29:P,30:z,31:j,33:B,35:W,36:I,37:24,38:p,40:w},e(n,[2,5]),e(n,[2,6]),e(n,[2,17]),e(n,[2,18]),e(n,[2,19]),e(n,[2,20]),e(n,[2,21]),e(n,[2,22]),e(n,[2,23]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),e(n,[2,27]),{32:[1,37]},{34:[1,38]},e(n,[2,30]),e(n,[2,31]),e(n,[2,32]),{39:[1,39]},e(n,[2,8]),e(n,[2,9]),e(n,[2,10]),e(n,[2,11]),e(n,[2,12]),e(n,[2,13]),e(n,[2,14]),e(n,[2,15]),e(n,[2,16]),{41:[1,40],43:[1,41]},e(n,[2,4]),e(n,[2,28]),e(n,[2,29]),e(n,[2,33]),e(n,[2,34],{42:[1,42],43:[1,43]}),e(n,[2,40],{41:[1,44]}),e(n,[2,35],{43:[1,45]}),e(n,[2,36]),e(n,[2,38],{42:[1,46]}),e(n,[2,37]),e(n,[2,39])],defaultActions:{},parseError:l(function(o,m){if(!m.recoverable){var h=new Error(o);throw h.hash=m,h}this.trace(o)},"parseError"),parse:l(function(o){var m=this,h=[0],d=[],T=[null],t=[],f=this.table,a="",_=0,Y=0,O=t.slice.call(arguments,1),S=Object.create(this.lexer),q={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(q.yy[tt]=this.yy[tt]);S.setInput(o,q.yy),q.yy.lexer=S,q.yy.parser=this,S.yylloc===void 0&&(S.yylloc={});var rt=S.yylloc;t.push(rt);var ft=S.options&&S.options.ranges;function st(){var Z;return typeof(Z=d.pop()||S.lex()||1)!="number"&&(Z instanceof Array&&(Z=(d=Z).pop()),Z=m.symbols_[Z]||Z),Z}typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,l(function(Z){h.length=h.length-2*Z,T.length=T.length-Z,t.length=t.length-Z},"popStack"),l(st,"lex");for(var N,U,G,et,X,R,at,J,nt={};;){if(U=h[h.length-1],this.defaultActions[U]?G=this.defaultActions[U]:(N==null&&(N=st()),G=f[U]&&f[U][N]),G===void 0||!G.length||!G[0]){var Ft="";for(X in J=[],f[U])this.terminals_[X]&&X>2&&J.push("'"+this.terminals_[X]+"'");Ft=S.showPosition?"Parse error on line "+(_+1)+`:
|
|
2
2
|
`+S.showPosition()+`
|
|
3
|
-
Expecting `+J.join(", ")+", got '"+(this.terminals_[N]||N)+"'":"Parse error on line "+(_+1)+": Unexpected "+(N==1?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Ft,{text:S.match,token:this.terminals_[N]||N,line:S.yylineno,loc:rt,expected:J})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+
|
|
3
|
+
Expecting `+J.join(", ")+", got '"+(this.terminals_[N]||N)+"'":"Parse error on line "+(_+1)+": Unexpected "+(N==1?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Ft,{text:S.match,token:this.terminals_[N]||N,line:S.yylineno,loc:rt,expected:J})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+N);switch(G[0]){case 1:h.push(N),T.push(S.yytext),t.push(S.yylloc),h.push(G[1]),N=null,Y=S.yyleng,a=S.yytext,_=S.yylineno,rt=S.yylloc;break;case 2:if(R=this.productions_[G[1]][1],nt.$=T[T.length-R],nt._$={first_line:t[t.length-(R||1)].first_line,last_line:t[t.length-1].last_line,first_column:t[t.length-(R||1)].first_column,last_column:t[t.length-1].last_column},ft&&(nt._$.range=[t[t.length-(R||1)].range[0],t[t.length-1].range[1]]),(et=this.performAction.apply(nt,[a,Y,_,q.yy,G[1],T,t].concat(O)))!==void 0)return et;R&&(h=h.slice(0,-1*R*2),T=T.slice(0,-1*R),t=t.slice(0,-1*R)),h.push(this.productions_[G[1]][0]),T.push(nt.$),t.push(nt._$),at=f[h[h.length-2]][h[h.length-1]],h.push(at);break;case 3:return!0}}return!0},"parse")},x=(function(){return{EOF:1,parseError:l(function(o,m){if(!this.yy.parser)throw new Error(o);this.yy.parser.parseError(o,m)},"parseError"),setInput:l(function(o,m){return this.yy=m||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:l(function(o){var m=o.length,h=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var d=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===d.length?this.yylloc.first_column:0)+d[d.length-h.length].length-h[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:l(function(o){this.unput(this.match.slice(o))},"less"),pastInput:l(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var o=this.pastInput(),m=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
|
5
5
|
`+m+"^"},"showPosition"),test_match:l(function(o,m){var h,d,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),(d=o[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=d.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:d?d[d.length-1].length-d[d.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+o[0].length},this.yytext+=o[0],this.match+=o[0],this.matches=o,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(o[0].length),this.matched+=o[0],h=this.performAction.call(this,this.yy,this,m,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),h)return h;if(this._backtrack){for(var t in T)this[t]=T[t];return!1}return!1},"test_match"),next:l(function(){if(this.done)return this.EOF;var o,m,h,d;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),t=0;t<T.length;t++)if((h=this._input.match(this.rules[T[t]]))&&(!m||h[0].length>m[0].length)){if(m=h,d=t,this.options.backtrack_lexer){if((o=this.test_match(h,T[t]))!==!1)return o;if(this._backtrack){m=!1;continue}return!1}if(!this.options.flex)break}return m?(o=this.test_match(m,T[d]))!==!1&&o:this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var o=this.next();return o||this.lex()},"lex"),begin:l(function(o){this.conditionStack.push(o)},"begin"),popState:l(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(o){return(o=this.conditionStack.length-1-Math.abs(o||0))>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:l(function(o){this.begin(o)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(o,m,h,d){switch(h){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function y(){this.yy={}}return b.lexer=x,l(y,"Parser"),y.prototype=b,b.Parser=y,new y})();bt.parser=bt;var Ge=bt;V.extend(Pe),V.extend(Be),V.extend(Ne);var vt,kt,Xt={friday:5,saturday:6},Q="",Tt="",wt=void 0,_t="",dt=[],ut=[],Dt=new Map,$t=[],St=[],ct="",Ct="",Jt=["active","done","crit","milestone","vert"],Mt=[],ht=!1,Et=!1,At="sunday",pt="saturday",Lt=0,je=l(function(){$t=[],St=[],ct="",Mt=[],ie=0,vt=void 0,kt=void 0,H=[],Q="",Tt="",Ct="",wt=void 0,_t="",dt=[],ut=[],ht=!1,Et=!1,Lt=0,Dt=new Map,ge(),At="sunday",pt="saturday"},"clear"),Ve=l(function(e){Tt=e},"setAxisFormat"),Re=l(function(){return Tt},"getAxisFormat"),Ze=l(function(e){wt=e},"setTickInterval"),Ue=l(function(){return wt},"getTickInterval"),qe=l(function(e){_t=e},"setTodayMarker"),Qe=l(function(){return _t},"getTodayMarker"),Xe=l(function(e){Q=e},"setDateFormat"),Je=l(function(){ht=!0},"enableInclusiveEndDates"),Ke=l(function(){return ht},"endDatesAreInclusive"),tn=l(function(){Et=!0},"enableTopAxis"),en=l(function(){return Et},"topAxisEnabled"),nn=l(function(e){Ct=e},"setDisplayMode"),rn=l(function(){return Ct},"getDisplayMode"),sn=l(function(){return Q},"getDateFormat"),an=l(function(e){dt=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),on=l(function(){return dt},"getIncludes"),cn=l(function(e){ut=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),ln=l(function(){return ut},"getExcludes"),dn=l(function(){return Dt},"getLinks"),un=l(function(e){ct=e,$t.push(e)},"addSection"),hn=l(function(){return $t},"getSections"),fn=l(function(){let e=se(),n=0;for(;!e&&n<10;)e=se(),n++;return St=H},"getTasks"),Kt=l(function(e,n,s,r){const i=e.format(n.trim()),c=e.format("YYYY-MM-DD");return!r.includes(i)&&!r.includes(c)&&(!(!s.includes("weekends")||e.isoWeekday()!==Xt[pt]&&e.isoWeekday()!==Xt[pt]+1)||!!s.includes(e.format("dddd").toLowerCase())||s.includes(i)||s.includes(c))},"isInvalidDate"),mn=l(function(e){At=e},"setWeekday"),yn=l(function(){return At},"getWeekday"),kn=l(function(e){pt=e},"setWeekend"),te=l(function(e,n,s,r){if(!s.length||e.manualEndTime)return;let i,c;i=e.startTime instanceof Date?V(e.startTime):V(e.startTime,n,!0),i=i.add(1,"d"),c=e.endTime instanceof Date?V(e.endTime):V(e.endTime,n,!0);const[u,A]=pn(i,c,n,s,r);e.endTime=u.toDate(),e.renderEndTime=A},"checkTaskDates"),pn=l(function(e,n,s,r,i){let c=!1,u=null;for(;e<=n;)c||(u=n.toDate()),c=Kt(e,s,r,i),c&&(n=n.add(1,"d")),e=e.add(1,"d");return[n,u]},"fixTaskDates"),Yt=l(function(e,n,s){s=s.trim();const r=/^after\s+(?<ids>[\d\w- ]+)/.exec(s);if(r!==null){let c=null;for(const A of r.groups.ids.split(" ")){let v=it(A);v!==void 0&&(!c||v.endTime>c.endTime)&&(c=v)}if(c)return c.endTime;const u=new Date;return u.setHours(0,0,0,0),u}let i=V(s,n.trim(),!0);if(i.isValid())return i.toDate();{mt.debug("Invalid date:"+s),mt.debug("With date format:"+n.trim());const c=new Date(s);if(c===void 0||isNaN(c.getTime())||c.getFullYear()<-1e4||c.getFullYear()>1e4)throw new Error("Invalid date:"+s);return c}},"getStartDate"),ee=l(function(e){const n=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return n!==null?[Number.parseFloat(n[1]),n[2]]:[NaN,"ms"]},"parseDuration"),ne=l(function(e,n,s,r=!1){s=s.trim();const i=/^until\s+(?<ids>[\d\w- ]+)/.exec(s);if(i!==null){let $=null;for(const F of i.groups.ids.split(" ")){let C=it(F);C!==void 0&&(!$||C.startTime<$.startTime)&&($=C)}if($)return $.startTime;const L=new Date;return L.setHours(0,0,0,0),L}let c=V(s,n.trim(),!0);if(c.isValid())return r&&(c=c.add(1,"d")),c.toDate();let u=V(e);const[A,v]=ee(s);if(!Number.isNaN(A)){const $=u.add(A,v);$.isValid()&&(u=$)}return u.toDate()},"getEndDate"),ie=0,lt=l(function(e){return e===void 0?"task"+(ie+=1):e},"parseId"),gn=l(function(e,n){let s;s=n.substr(0,1)===":"?n.substr(1,n.length):n;const r=s.split(","),i={};It(r,i,Jt);for(let u=0;u<r.length;u++)r[u]=r[u].trim();let c="";switch(r.length){case 1:i.id=lt(),i.startTime=e.endTime,c=r[0];break;case 2:i.id=lt(),i.startTime=Yt(void 0,Q,r[0]),c=r[1];break;case 3:i.id=lt(r[0]),i.startTime=Yt(void 0,Q,r[1]),c=r[2]}return c&&(i.endTime=ne(i.startTime,Q,c,ht),i.manualEndTime=V(c,"YYYY-MM-DD",!0).isValid(),te(i,Q,ut,dt)),i},"compileData"),xn=l(function(e,n){let s;s=n.substr(0,1)===":"?n.substr(1,n.length):n;const r=s.split(","),i={};It(r,i,Jt);for(let c=0;c<r.length;c++)r[c]=r[c].trim();switch(r.length){case 1:i.id=lt(),i.startTime={type:"prevTaskEnd",id:e},i.endTime={data:r[0]};break;case 2:i.id=lt(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=lt(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i},"parseData"),H=[],re={},bn=l(function(e,n){const s={section:ct,type:ct,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:n},task:e,classes:[]},r=xn(kt,n);s.raw.startTime=r.startTime,s.raw.endTime=r.endTime,s.id=r.id,s.prevTaskId=kt,s.active=r.active,s.done=r.done,s.crit=r.crit,s.milestone=r.milestone,s.vert=r.vert,s.order=Lt,Lt++;const i=H.push(s);kt=s.id,re[s.id]=i-1},"addTask"),it=l(function(e){const n=re[e];return H[n]},"findTaskById"),vn=l(function(e,n){const s={section:ct,type:ct,description:e,task:e,classes:[]},r=gn(vt,n);s.startTime=r.startTime,s.endTime=r.endTime,s.id=r.id,s.active=r.active,s.done=r.done,s.crit=r.crit,s.milestone=r.milestone,s.vert=r.vert,vt=s,St.push(s)},"addTaskOrg"),se=l(function(){const e=l(function(s){const r=H[s];let i="";switch(H[s].raw.startTime.type){case"prevTaskEnd":{const c=it(r.prevTaskId);r.startTime=c.endTime;break}case"getStartDate":i=Yt(void 0,Q,H[s].raw.startTime.startData),i&&(H[s].startTime=i)}return H[s].startTime&&(H[s].endTime=ne(H[s].startTime,Q,H[s].raw.endTime.data,ht),H[s].endTime&&(H[s].processed=!0,H[s].manualEndTime=V(H[s].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),te(H[s],Q,ut,dt))),H[s].processed},"compileTask");let n=!0;for(const[s,r]of H.entries())e(s),n=n&&r.processed;return n},"compileTasks"),Tn=l(function(e,n){let s=n;ot().securityLevel!=="loose"&&(s=pe.sanitizeUrl(n)),e.split(",").forEach(function(r){it(r)!==void 0&&(oe(r,()=>{window.open(s,"_self")}),Dt.set(r,s))}),ae(e,"clickable")},"setLink"),ae=l(function(e,n){e.split(",").forEach(function(s){let r=it(s);r!==void 0&&r.classes.push(n)})},"setClass"),wn=l(function(e,n,s){if(ot().securityLevel!=="loose"||n===void 0)return;let r=[];if(typeof s=="string"){r=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i<r.length;i++){let c=r[i].trim();c.startsWith('"')&&c.endsWith('"')&&(c=c.substr(1,c.length-2)),r[i]=c}}r.length===0&&r.push(e),it(e)!==void 0&&oe(e,()=>{xe.runFunc(n,...r)})},"setClickFun"),oe=l(function(e,n){Mt.push(function(){const s=document.querySelector(`[id="${e}"]`);s!==null&&s.addEventListener("click",function(){n()})},function(){const s=document.querySelector(`[id="${e}-text"]`);s!==null&&s.addEventListener("click",function(){n()})})},"pushFun"),_n=l(function(e,n,s){e.split(",").forEach(function(r){wn(r,n,s)}),ae(e,"clickable")},"setClickEvent"),Dn=l(function(e){Mt.forEach(function(n){n(e)})},"bindFunctions"),$n={getConfig:l(()=>ot().gantt,"getConfig"),clear:je,setDateFormat:Xe,getDateFormat:sn,enableInclusiveEndDates:Je,endDatesAreInclusive:Ke,enableTopAxis:tn,topAxisEnabled:en,setAxisFormat:Ve,getAxisFormat:Re,setTickInterval:Ze,getTickInterval:Ue,setTodayMarker:qe,getTodayMarker:Qe,setAccTitle:me,getAccTitle:fe,setDiagramTitle:he,getDiagramTitle:ue,setDisplayMode:nn,getDisplayMode:rn,setAccDescription:de,getAccDescription:le,addSection:un,getSections:hn,getTasks:fn,addTask:bn,findTaskById:it,addTaskOrg:vn,setIncludes:an,getIncludes:on,setExcludes:cn,getExcludes:ln,setClickEvent:_n,setLink:Tn,getLinks:dn,bindFunctions:Dn,parseDuration:ee,isInvalidDate:Kt,setWeekday:mn,getWeekday:yn,setWeekend:kn};function It(e,n,s){let r=!0;for(;r;)r=!1,s.forEach(function(i){const c=new RegExp("^\\s*"+i+"\\s*$");e[0].match(c)&&(n[i]=!0,e.shift(1),r=!0)})}l(It,"getTaskTags");var K,Sn=l(function(){mt.debug("Something is calling, setConf, remove the call")},"setConf"),ce={monday:$e,tuesday:De,wednesday:_e,thursday:we,friday:Te,saturday:ve,sunday:be},Cn=l((e,n)=>{let s=[...e].map(()=>-1/0),r=[...e].sort((c,u)=>c.startTime-u.startTime||c.order-u.order),i=0;for(const c of r)for(let u=0;u<s.length;u++)if(c.startTime>=s[u]){s[u]=c.endTime,c.order=u+n,u>i&&(i=u);break}return i},"getMaxIntersections"),Mn={parser:Ge,db:$n,renderer:{setConf:Sn,draw:l(function(e,n,s,r){const i=ot().gantt,c=ot().securityLevel;let u;c==="sandbox"&&(u=xt("#i"+n));const A=xt(c==="sandbox"?u.nodes()[0].contentDocument.body:"body"),v=c==="sandbox"?u.nodes()[0].contentDocument:document,$=v.getElementById(n);(K=$.parentElement.offsetWidth)===void 0&&(K=1200),i.useWidth!==void 0&&(K=i.useWidth);const L=r.db.getTasks();let F=[];for(const p of L)F.push(p.type);F=I(F);const C={};let D=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const p={};for(const b of L)p[b.section]===void 0?p[b.section]=[b]:p[b.section].push(b);let w=0;for(const b of Object.keys(p)){const x=Cn(p[b],w)+1;w+=x,D+=x*(i.barHeight+i.barGap),C[b]=x}}else{D+=L.length*(i.barHeight+i.barGap);for(const p of F)C[p]=L.filter(w=>w.type===p).length}$.setAttribute("viewBox","0 0 "+K+" "+D);const g=A.select(`[id="${n}"]`),k=Se().domain([Ce(L,function(p){return p.startTime}),Me(L,function(p){return p.endTime})]).rangeRound([0,K-i.leftPadding-i.rightPadding]);function M(p,w){const b=p.startTime,x=w.startTime;let y=0;return b>x?y=1:b<x&&(y=-1),y}function E(p,w,b){const x=i.barHeight,y=x+i.barGap,o=i.topPadding,m=i.leftPadding,h=Ae().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(Ee);z(y,o,m,w,b,p,r.db.getExcludes(),r.db.getIncludes()),j(m,o,w,b),P(p,y,o,m,x,h,w),B(y,o),W(m,o,w,b)}function P(p,w,b,x,y,o,m){p.sort((t,f)=>t.vert===f.vert?0:t.vert?1:-1);const h=[...new Set(p.map(t=>t.order))].map(t=>p.find(f=>f.order===t));g.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(t,f){return t.order*w+b-2}).attr("width",function(){return m-i.rightPadding/2}).attr("height",w).attr("class",function(t){for(const[f,a]of F.entries())if(t.type===a)return"section section"+f%i.numberSectionStyles;return"section section0"}).enter();const d=g.append("g").selectAll("rect").data(p).enter(),T=r.db.getLinks();if(d.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?k(t.startTime)+x+.5*(k(t.endTime)-k(t.startTime))-.5*y:k(t.startTime)+x}).attr("y",function(t,f){return f=t.order,t.vert?i.gridLineStartPadding:f*w+b}).attr("width",function(t){return t.milestone?y:t.vert?.08*y:k(t.renderEndTime||t.endTime)-k(t.startTime)}).attr("height",function(t){return t.vert?L.length*(i.barHeight+i.barGap)+2*i.barHeight:y}).attr("transform-origin",function(t,f){return f=t.order,(k(t.startTime)+x+.5*(k(t.endTime)-k(t.startTime))).toString()+"px "+(f*w+b+.5*y).toString()+"px"}).attr("class",function(t){let f="";t.classes.length>0&&(f=t.classes.join(" "));let a=0;for(const[Y,O]of F.entries())t.type===O&&(a=Y%i.numberSectionStyles);let _="";return t.active?t.crit?_+=" activeCrit":_=" active":t.done?_=t.crit?" doneCrit":" done":t.crit&&(_+=" crit"),_.length===0&&(_=" task"),t.milestone&&(_=" milestone "+_),t.vert&&(_=" vert "+_),_+=a,_+=" "+f,"task"+_}),d.append("text").attr("id",function(t){return t.id+"-text"}).text(function(t){return t.task}).attr("font-size",i.fontSize).attr("x",function(t){let f=k(t.startTime),a=k(t.renderEndTime||t.endTime);if(t.milestone&&(f+=.5*(k(t.endTime)-k(t.startTime))-.5*y,a=f+y),t.vert)return k(t.startTime)+x;const _=this.getBBox().width;return _>a-f?a+_+1.5*i.leftPadding>m?f+x-5:a+x+5:(a-f)/2+f+x}).attr("y",function(t,f){return t.vert?i.gridLineStartPadding+L.length*(i.barHeight+i.barGap)+60:t.order*w+i.barHeight/2+(i.fontSize/2-2)+b}).attr("text-height",y).attr("class",function(t){const f=k(t.startTime);let a=k(t.endTime);t.milestone&&(a=f+y);const _=this.getBBox().width;let Y="";t.classes.length>0&&(Y=t.classes.join(" "));let O=0;for(const[U,tt]of F.entries())t.type===tt&&(O=U%i.numberSectionStyles);let S="";return t.active&&(S=t.crit?"activeCritText"+O:"activeText"+O),t.done?S=t.crit?S+" doneCritText"+O:S+" doneText"+O:t.crit&&(S=S+" critText"+O),t.milestone&&(S+=" milestoneText"),t.vert&&(S+=" vertText"),_>a-f?a+_+1.5*i.leftPadding>m?Y+" taskTextOutsideLeft taskTextOutside"+O+" "+S:Y+" taskTextOutsideRight taskTextOutside"+O+" "+S+" width-"+_:Y+" taskText taskText"+O+" "+S+" width-"+_}),ot().securityLevel==="sandbox"){let t;t=xt("#i"+n);const f=t.nodes()[0].contentDocument;d.filter(function(a){return T.has(a.id)}).each(function(a){var _=f.querySelector("#"+a.id),Y=f.querySelector("#"+a.id+"-text");const O=_.parentNode;var S=f.createElement("a");S.setAttribute("xlink:href",T.get(a.id)),S.setAttribute("target","_top"),O.appendChild(S),S.appendChild(_),S.appendChild(Y)})}}function z(p,w,b,x,y,o,m,h){if(m.length===0&&h.length===0)return;let d,T;for(const{startTime:Y,endTime:O}of o)(d===void 0||Y<d)&&(d=Y),(T===void 0||O>T)&&(T=O);if(!d||!T)return;if(V(T).diff(V(d),"year")>5)return void mt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const t=r.db.getDateFormat(),f=[];let a=null,_=V(d);for(;_.valueOf()<=T;)r.db.isInvalidDate(_,t,m,h)?a?a.end=_:a={start:_,end:_}:a&&(f.push(a),a=null),_=_.add(1,"d");g.append("g").selectAll("rect").data(f).enter().append("rect").attr("id",Y=>"exclude-"+Y.start.format("YYYY-MM-DD")).attr("x",Y=>k(Y.start.startOf("day"))+b).attr("y",i.gridLineStartPadding).attr("width",Y=>k(Y.end.endOf("day"))-k(Y.start.startOf("day"))).attr("height",y-w-i.gridLineStartPadding).attr("transform-origin",function(Y,O){return(k(Y.start)+b+.5*(k(Y.end)-k(Y.start))).toString()+"px "+(O*p+.5*y).toString()+"px"}).attr("class","exclude-range")}function j(p,w,b,x){const y=r.db.getDateFormat(),o=r.db.getAxisFormat();let m;m=o||(y==="D"?"%d":i.axisFormat??"%Y-%m-%d");let h=(d=k,jt(3,d)).tickSize(-x+w+i.gridLineStartPadding).tickFormat(Wt(m));var d;const T=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(T!==null){const t=T[1],f=T[2],a=r.db.getWeekday()||i.weekday;switch(f){case"millisecond":h.ticks(Nt.every(t));break;case"second":h.ticks(Ht.every(t));break;case"minute":h.ticks(Bt.every(t));break;case"hour":h.ticks(zt.every(t));break;case"day":h.ticks(Pt.every(t));break;case"week":h.ticks(ce[a].every(t));break;case"month":h.ticks(Ot.every(t))}}if(g.append("g").attr("class","grid").attr("transform","translate("+p+", "+(x-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let t=(function(f){return jt(1,f)})(k).tickSize(-x+w+i.gridLineStartPadding).tickFormat(Wt(m));if(T!==null){const f=T[1],a=T[2],_=r.db.getWeekday()||i.weekday;switch(a){case"millisecond":t.ticks(Nt.every(f));break;case"second":t.ticks(Ht.every(f));break;case"minute":t.ticks(Bt.every(f));break;case"hour":t.ticks(zt.every(f));break;case"day":t.ticks(Pt.every(f));break;case"week":t.ticks(ce[_].every(f));break;case"month":t.ticks(Ot.every(f))}}g.append("g").attr("class","grid").attr("transform","translate("+p+", "+w+")").call(t).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function B(p,w){let b=0;const x=Object.keys(C).map(y=>[y,C[y]]);g.append("g").selectAll("text").data(x).enter().append(function(y){const o=y[0].split(ke.lineBreakRegex),m=-(o.length-1)/2,h=v.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("dy",m+"em");for(const[d,T]of o.entries()){const t=v.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),d>0&&t.setAttribute("dy","1em"),t.textContent=T,h.appendChild(t)}return h}).attr("x",10).attr("y",function(y,o){if(!(o>0))return y[1]*p/2+w;for(let m=0;m<o;m++)return b+=x[o-1][1],y[1]*p/2+b*p+w}).attr("font-size",i.sectionFontSize).attr("class",function(y){for(const[o,m]of F.entries())if(y[0]===m)return"sectionTitle sectionTitle"+o%i.numberSectionStyles;return"sectionTitle"})}function W(p,w,b,x){const y=r.db.getTodayMarker();if(y==="off")return;const o=g.append("g").attr("class","today"),m=new Date,h=o.append("line");h.attr("x1",k(m)+p).attr("x2",k(m)+p).attr("y1",i.titleTopMargin).attr("y2",x-i.titleTopMargin).attr("class","today"),y!==""&&h.attr("style",y.replace(/,/g,";"))}function I(p){const w={},b=[];for(let x=0,y=p.length;x<y;++x)Object.prototype.hasOwnProperty.call(w,p[x])||(w[p[x]]=!0,b.push(p[x]));return b}l(M,"taskCompare"),L.sort(M),E(L,K,D),ye(g,D,K,i.useMaxWidth),g.append("text").text(r.db.getDiagramTitle()).attr("x",K/2).attr("y",i.titleTopMargin).attr("class","titleText"),l(E,"makeGantt"),l(P,"drawRects"),l(z,"drawExcludeDays"),l(j,"makeGrid"),l(B,"vertLabels"),l(W,"drawToday"),l(I,"checkUnique")},"draw")},styles:l(e=>`
|
|
6
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:l(function(){var o=this.next();return o||this.lex()},"lex"),begin:l(function(o){this.conditionStack.push(o)},"begin"),popState:l(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:l(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:l(function(o){return(o=this.conditionStack.length-1-Math.abs(o||0))>=0?this.conditionStack[o]:"INITIAL"},"topState"),pushState:l(function(o){this.begin(o)},"pushState"),stateStackSize:l(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:l(function(o,m,h,d){switch(h){case 0:return this.begin("open_directive"),"open_directive";case 1:return this.begin("acc_title"),31;case 2:return this.popState(),"acc_title_value";case 3:return this.begin("acc_descr"),33;case 4:return this.popState(),"acc_descr_value";case 5:this.begin("acc_descr_multiline");break;case 6:case 15:case 18:case 21:case 24:this.popState();break;case 7:return"acc_descr_multiline_value";case 8:case 9:case 10:case 12:case 13:break;case 11:return 10;case 14:this.begin("href");break;case 16:return 43;case 17:this.begin("callbackname");break;case 19:this.popState(),this.begin("callbackargs");break;case 20:return 41;case 22:return 42;case 23:this.begin("click");break;case 25:return 40;case 26:return 4;case 27:return 22;case 28:return 23;case 29:return 24;case 30:return 25;case 31:return 26;case 32:return 28;case 33:return 27;case 34:return 29;case 35:return 12;case 36:return 13;case 37:return 14;case 38:return 15;case 39:return 16;case 40:return 17;case 41:return 18;case 42:return 20;case 43:return 21;case 44:return"date";case 45:return 30;case 46:return"accDescription";case 47:return 36;case 48:return 38;case 49:return 39;case 50:return":";case 51:return 6;case 52:return"INVALID"}},"anonymous"),rules:[/^(?:%%\{)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:weekday\s+monday\b)/i,/^(?:weekday\s+tuesday\b)/i,/^(?:weekday\s+wednesday\b)/i,/^(?:weekday\s+thursday\b)/i,/^(?:weekday\s+friday\b)/i,/^(?:weekday\s+saturday\b)/i,/^(?:weekday\s+sunday\b)/i,/^(?:weekend\s+friday\b)/i,/^(?:weekend\s+saturday\b)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^\n]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^\n]+)/i,/^(?:[^:\n]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[6,7],inclusive:!1},acc_descr:{rules:[4],inclusive:!1},acc_title:{rules:[2],inclusive:!1},callbackargs:{rules:[21,22],inclusive:!1},callbackname:{rules:[18,19,20],inclusive:!1},href:{rules:[15,16],inclusive:!1},click:{rules:[24,25],inclusive:!1},INITIAL:{rules:[0,1,3,5,8,9,10,11,12,13,14,17,23,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52],inclusive:!0}}}})();function y(){this.yy={}}return b.lexer=x,l(y,"Parser"),y.prototype=b,b.Parser=y,new y})();bt.parser=bt;var Ge=bt;V.extend(Pe),V.extend(Be),V.extend(Ne);var vt,kt,Xt={friday:5,saturday:6},Q="",Tt="",wt=void 0,_t="",dt=[],ut=[],Dt=new Map,$t=[],St=[],ct="",Ct="",Jt=["active","done","crit","milestone","vert"],Et=[],ht=!1,Mt=!1,At="sunday",pt="saturday",Lt=0,je=l(function(){$t=[],St=[],ct="",Et=[],ie=0,vt=void 0,kt=void 0,H=[],Q="",Tt="",Ct="",wt=void 0,_t="",dt=[],ut=[],ht=!1,Mt=!1,Lt=0,Dt=new Map,ge(),At="sunday",pt="saturday"},"clear"),Ve=l(function(e){Tt=e},"setAxisFormat"),Re=l(function(){return Tt},"getAxisFormat"),Ze=l(function(e){wt=e},"setTickInterval"),qe=l(function(){return wt},"getTickInterval"),Ue=l(function(e){_t=e},"setTodayMarker"),Qe=l(function(){return _t},"getTodayMarker"),Xe=l(function(e){Q=e},"setDateFormat"),Je=l(function(){ht=!0},"enableInclusiveEndDates"),Ke=l(function(){return ht},"endDatesAreInclusive"),tn=l(function(){Mt=!0},"enableTopAxis"),en=l(function(){return Mt},"topAxisEnabled"),nn=l(function(e){Ct=e},"setDisplayMode"),rn=l(function(){return Ct},"getDisplayMode"),sn=l(function(){return Q},"getDateFormat"),an=l(function(e){dt=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),on=l(function(){return dt},"getIncludes"),cn=l(function(e){ut=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),ln=l(function(){return ut},"getExcludes"),dn=l(function(){return Dt},"getLinks"),un=l(function(e){ct=e,$t.push(e)},"addSection"),hn=l(function(){return $t},"getSections"),fn=l(function(){let e=se(),n=0;for(;!e&&n<10;)e=se(),n++;return St=H},"getTasks"),Kt=l(function(e,n,s,r){const i=e.format(n.trim()),c=e.format("YYYY-MM-DD");return!r.includes(i)&&!r.includes(c)&&(!(!s.includes("weekends")||e.isoWeekday()!==Xt[pt]&&e.isoWeekday()!==Xt[pt]+1)||!!s.includes(e.format("dddd").toLowerCase())||s.includes(i)||s.includes(c))},"isInvalidDate"),mn=l(function(e){At=e},"setWeekday"),yn=l(function(){return At},"getWeekday"),kn=l(function(e){pt=e},"setWeekend"),te=l(function(e,n,s,r){if(!s.length||e.manualEndTime)return;let i,c;i=e.startTime instanceof Date?V(e.startTime):V(e.startTime,n,!0),i=i.add(1,"d"),c=e.endTime instanceof Date?V(e.endTime):V(e.endTime,n,!0);const[u,A]=pn(i,c,n,s,r);e.endTime=u.toDate(),e.renderEndTime=A},"checkTaskDates"),pn=l(function(e,n,s,r,i){let c=!1,u=null;for(;e<=n;)c||(u=n.toDate()),c=Kt(e,s,r,i),c&&(n=n.add(1,"d")),e=e.add(1,"d");return[n,u]},"fixTaskDates"),Yt=l(function(e,n,s){s=s.trim();const r=/^after\s+(?<ids>[\d\w- ]+)/.exec(s);if(r!==null){let c=null;for(const A of r.groups.ids.split(" ")){let v=it(A);v!==void 0&&(!c||v.endTime>c.endTime)&&(c=v)}if(c)return c.endTime;const u=new Date;return u.setHours(0,0,0,0),u}let i=V(s,n.trim(),!0);if(i.isValid())return i.toDate();{mt.debug("Invalid date:"+s),mt.debug("With date format:"+n.trim());const c=new Date(s);if(c===void 0||isNaN(c.getTime())||c.getFullYear()<-1e4||c.getFullYear()>1e4)throw new Error("Invalid date:"+s);return c}},"getStartDate"),ee=l(function(e){const n=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(e.trim());return n!==null?[Number.parseFloat(n[1]),n[2]]:[NaN,"ms"]},"parseDuration"),ne=l(function(e,n,s,r=!1){s=s.trim();const i=/^until\s+(?<ids>[\d\w- ]+)/.exec(s);if(i!==null){let $=null;for(const F of i.groups.ids.split(" ")){let C=it(F);C!==void 0&&(!$||C.startTime<$.startTime)&&($=C)}if($)return $.startTime;const L=new Date;return L.setHours(0,0,0,0),L}let c=V(s,n.trim(),!0);if(c.isValid())return r&&(c=c.add(1,"d")),c.toDate();let u=V(e);const[A,v]=ee(s);if(!Number.isNaN(A)){const $=u.add(A,v);$.isValid()&&(u=$)}return u.toDate()},"getEndDate"),ie=0,lt=l(function(e){return e===void 0?"task"+(ie+=1):e},"parseId"),gn=l(function(e,n){let s;s=n.substr(0,1)===":"?n.substr(1,n.length):n;const r=s.split(","),i={};It(r,i,Jt);for(let u=0;u<r.length;u++)r[u]=r[u].trim();let c="";switch(r.length){case 1:i.id=lt(),i.startTime=e.endTime,c=r[0];break;case 2:i.id=lt(),i.startTime=Yt(void 0,Q,r[0]),c=r[1];break;case 3:i.id=lt(r[0]),i.startTime=Yt(void 0,Q,r[1]),c=r[2]}return c&&(i.endTime=ne(i.startTime,Q,c,ht),i.manualEndTime=V(c,"YYYY-MM-DD",!0).isValid(),te(i,Q,ut,dt)),i},"compileData"),xn=l(function(e,n){let s;s=n.substr(0,1)===":"?n.substr(1,n.length):n;const r=s.split(","),i={};It(r,i,Jt);for(let c=0;c<r.length;c++)r[c]=r[c].trim();switch(r.length){case 1:i.id=lt(),i.startTime={type:"prevTaskEnd",id:e},i.endTime={data:r[0]};break;case 2:i.id=lt(),i.startTime={type:"getStartDate",startData:r[0]},i.endTime={data:r[1]};break;case 3:i.id=lt(r[0]),i.startTime={type:"getStartDate",startData:r[1]},i.endTime={data:r[2]}}return i},"parseData"),H=[],re={},bn=l(function(e,n){const s={section:ct,type:ct,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:n},task:e,classes:[]},r=xn(kt,n);s.raw.startTime=r.startTime,s.raw.endTime=r.endTime,s.id=r.id,s.prevTaskId=kt,s.active=r.active,s.done=r.done,s.crit=r.crit,s.milestone=r.milestone,s.vert=r.vert,s.order=Lt,Lt++;const i=H.push(s);kt=s.id,re[s.id]=i-1},"addTask"),it=l(function(e){const n=re[e];return H[n]},"findTaskById"),vn=l(function(e,n){const s={section:ct,type:ct,description:e,task:e,classes:[]},r=gn(vt,n);s.startTime=r.startTime,s.endTime=r.endTime,s.id=r.id,s.active=r.active,s.done=r.done,s.crit=r.crit,s.milestone=r.milestone,s.vert=r.vert,vt=s,St.push(s)},"addTaskOrg"),se=l(function(){const e=l(function(s){const r=H[s];let i="";switch(H[s].raw.startTime.type){case"prevTaskEnd":{const c=it(r.prevTaskId);r.startTime=c.endTime;break}case"getStartDate":i=Yt(void 0,Q,H[s].raw.startTime.startData),i&&(H[s].startTime=i)}return H[s].startTime&&(H[s].endTime=ne(H[s].startTime,Q,H[s].raw.endTime.data,ht),H[s].endTime&&(H[s].processed=!0,H[s].manualEndTime=V(H[s].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),te(H[s],Q,ut,dt))),H[s].processed},"compileTask");let n=!0;for(const[s,r]of H.entries())e(s),n=n&&r.processed;return n},"compileTasks"),Tn=l(function(e,n){let s=n;ot().securityLevel!=="loose"&&(s=pe.sanitizeUrl(n)),e.split(",").forEach(function(r){it(r)!==void 0&&(oe(r,()=>{window.open(s,"_self")}),Dt.set(r,s))}),ae(e,"clickable")},"setLink"),ae=l(function(e,n){e.split(",").forEach(function(s){let r=it(s);r!==void 0&&r.classes.push(n)})},"setClass"),wn=l(function(e,n,s){if(ot().securityLevel!=="loose"||n===void 0)return;let r=[];if(typeof s=="string"){r=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let i=0;i<r.length;i++){let c=r[i].trim();c.startsWith('"')&&c.endsWith('"')&&(c=c.substr(1,c.length-2)),r[i]=c}}r.length===0&&r.push(e),it(e)!==void 0&&oe(e,()=>{xe.runFunc(n,...r)})},"setClickFun"),oe=l(function(e,n){Et.push(function(){const s=document.querySelector(`[id="${e}"]`);s!==null&&s.addEventListener("click",function(){n()})},function(){const s=document.querySelector(`[id="${e}-text"]`);s!==null&&s.addEventListener("click",function(){n()})})},"pushFun"),_n=l(function(e,n,s){e.split(",").forEach(function(r){wn(r,n,s)}),ae(e,"clickable")},"setClickEvent"),Dn=l(function(e){Et.forEach(function(n){n(e)})},"bindFunctions"),$n={getConfig:l(()=>ot().gantt,"getConfig"),clear:je,setDateFormat:Xe,getDateFormat:sn,enableInclusiveEndDates:Je,endDatesAreInclusive:Ke,enableTopAxis:tn,topAxisEnabled:en,setAxisFormat:Ve,getAxisFormat:Re,setTickInterval:Ze,getTickInterval:qe,setTodayMarker:Ue,getTodayMarker:Qe,setAccTitle:me,getAccTitle:fe,setDiagramTitle:he,getDiagramTitle:ue,setDisplayMode:nn,getDisplayMode:rn,setAccDescription:de,getAccDescription:le,addSection:un,getSections:hn,getTasks:fn,addTask:bn,findTaskById:it,addTaskOrg:vn,setIncludes:an,getIncludes:on,setExcludes:cn,getExcludes:ln,setClickEvent:_n,setLink:Tn,getLinks:dn,bindFunctions:Dn,parseDuration:ee,isInvalidDate:Kt,setWeekday:mn,getWeekday:yn,setWeekend:kn};function It(e,n,s){let r=!0;for(;r;)r=!1,s.forEach(function(i){const c=new RegExp("^\\s*"+i+"\\s*$");e[0].match(c)&&(n[i]=!0,e.shift(1),r=!0)})}l(It,"getTaskTags");var K,Sn=l(function(){mt.debug("Something is calling, setConf, remove the call")},"setConf"),ce={monday:$e,tuesday:De,wednesday:_e,thursday:we,friday:Te,saturday:ve,sunday:be},Cn=l((e,n)=>{let s=[...e].map(()=>-1/0),r=[...e].sort((c,u)=>c.startTime-u.startTime||c.order-u.order),i=0;for(const c of r)for(let u=0;u<s.length;u++)if(c.startTime>=s[u]){s[u]=c.endTime,c.order=u+n,u>i&&(i=u);break}return i},"getMaxIntersections"),En={parser:Ge,db:$n,renderer:{setConf:Sn,draw:l(function(e,n,s,r){const i=ot().gantt,c=ot().securityLevel;let u;c==="sandbox"&&(u=xt("#i"+n));const A=xt(c==="sandbox"?u.nodes()[0].contentDocument.body:"body"),v=c==="sandbox"?u.nodes()[0].contentDocument:document,$=v.getElementById(n);(K=$.parentElement.offsetWidth)===void 0&&(K=1200),i.useWidth!==void 0&&(K=i.useWidth);const L=r.db.getTasks();let F=[];for(const p of L)F.push(p.type);F=I(F);const C={};let D=2*i.topPadding;if(r.db.getDisplayMode()==="compact"||i.displayMode==="compact"){const p={};for(const b of L)p[b.section]===void 0?p[b.section]=[b]:p[b.section].push(b);let w=0;for(const b of Object.keys(p)){const x=Cn(p[b],w)+1;w+=x,D+=x*(i.barHeight+i.barGap),C[b]=x}}else{D+=L.length*(i.barHeight+i.barGap);for(const p of F)C[p]=L.filter(w=>w.type===p).length}$.setAttribute("viewBox","0 0 "+K+" "+D);const g=A.select(`[id="${n}"]`),k=Se().domain([Ce(L,function(p){return p.startTime}),Ee(L,function(p){return p.endTime})]).rangeRound([0,K-i.leftPadding-i.rightPadding]);function E(p,w){const b=p.startTime,x=w.startTime;let y=0;return b>x?y=1:b<x&&(y=-1),y}function M(p,w,b){const x=i.barHeight,y=x+i.barGap,o=i.topPadding,m=i.leftPadding,h=Ae().domain([0,F.length]).range(["#00B9FA","#F95002"]).interpolate(Me);z(y,o,m,w,b,p,r.db.getExcludes(),r.db.getIncludes()),j(m,o,w,b),P(p,y,o,m,x,h,w),B(y,o),W(m,o,w,b)}function P(p,w,b,x,y,o,m){p.sort((t,f)=>t.vert===f.vert?0:t.vert?1:-1);const h=[...new Set(p.map(t=>t.order))].map(t=>p.find(f=>f.order===t));g.append("g").selectAll("rect").data(h).enter().append("rect").attr("x",0).attr("y",function(t,f){return t.order*w+b-2}).attr("width",function(){return m-i.rightPadding/2}).attr("height",w).attr("class",function(t){for(const[f,a]of F.entries())if(t.type===a)return"section section"+f%i.numberSectionStyles;return"section section0"}).enter();const d=g.append("g").selectAll("rect").data(p).enter(),T=r.db.getLinks();if(d.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?k(t.startTime)+x+.5*(k(t.endTime)-k(t.startTime))-.5*y:k(t.startTime)+x}).attr("y",function(t,f){return f=t.order,t.vert?i.gridLineStartPadding:f*w+b}).attr("width",function(t){return t.milestone?y:t.vert?.08*y:k(t.renderEndTime||t.endTime)-k(t.startTime)}).attr("height",function(t){return t.vert?L.length*(i.barHeight+i.barGap)+2*i.barHeight:y}).attr("transform-origin",function(t,f){return f=t.order,(k(t.startTime)+x+.5*(k(t.endTime)-k(t.startTime))).toString()+"px "+(f*w+b+.5*y).toString()+"px"}).attr("class",function(t){let f="";t.classes.length>0&&(f=t.classes.join(" "));let a=0;for(const[Y,O]of F.entries())t.type===O&&(a=Y%i.numberSectionStyles);let _="";return t.active?t.crit?_+=" activeCrit":_=" active":t.done?_=t.crit?" doneCrit":" done":t.crit&&(_+=" crit"),_.length===0&&(_=" task"),t.milestone&&(_=" milestone "+_),t.vert&&(_=" vert "+_),_+=a,_+=" "+f,"task"+_}),d.append("text").attr("id",function(t){return t.id+"-text"}).text(function(t){return t.task}).attr("font-size",i.fontSize).attr("x",function(t){let f=k(t.startTime),a=k(t.renderEndTime||t.endTime);if(t.milestone&&(f+=.5*(k(t.endTime)-k(t.startTime))-.5*y,a=f+y),t.vert)return k(t.startTime)+x;const _=this.getBBox().width;return _>a-f?a+_+1.5*i.leftPadding>m?f+x-5:a+x+5:(a-f)/2+f+x}).attr("y",function(t,f){return t.vert?i.gridLineStartPadding+L.length*(i.barHeight+i.barGap)+60:t.order*w+i.barHeight/2+(i.fontSize/2-2)+b}).attr("text-height",y).attr("class",function(t){const f=k(t.startTime);let a=k(t.endTime);t.milestone&&(a=f+y);const _=this.getBBox().width;let Y="";t.classes.length>0&&(Y=t.classes.join(" "));let O=0;for(const[q,tt]of F.entries())t.type===tt&&(O=q%i.numberSectionStyles);let S="";return t.active&&(S=t.crit?"activeCritText"+O:"activeText"+O),t.done?S=t.crit?S+" doneCritText"+O:S+" doneText"+O:t.crit&&(S=S+" critText"+O),t.milestone&&(S+=" milestoneText"),t.vert&&(S+=" vertText"),_>a-f?a+_+1.5*i.leftPadding>m?Y+" taskTextOutsideLeft taskTextOutside"+O+" "+S:Y+" taskTextOutsideRight taskTextOutside"+O+" "+S+" width-"+_:Y+" taskText taskText"+O+" "+S+" width-"+_}),ot().securityLevel==="sandbox"){let t;t=xt("#i"+n);const f=t.nodes()[0].contentDocument;d.filter(function(a){return T.has(a.id)}).each(function(a){var _=f.querySelector("#"+a.id),Y=f.querySelector("#"+a.id+"-text");const O=_.parentNode;var S=f.createElement("a");S.setAttribute("xlink:href",T.get(a.id)),S.setAttribute("target","_top"),O.appendChild(S),S.appendChild(_),S.appendChild(Y)})}}function z(p,w,b,x,y,o,m,h){if(m.length===0&&h.length===0)return;let d,T;for(const{startTime:Y,endTime:O}of o)(d===void 0||Y<d)&&(d=Y),(T===void 0||O>T)&&(T=O);if(!d||!T)return;if(V(T).diff(V(d),"year")>5)return void mt.warn("The difference between the min and max time is more than 5 years. This will cause performance issues. Skipping drawing exclude days.");const t=r.db.getDateFormat(),f=[];let a=null,_=V(d);for(;_.valueOf()<=T;)r.db.isInvalidDate(_,t,m,h)?a?a.end=_:a={start:_,end:_}:a&&(f.push(a),a=null),_=_.add(1,"d");g.append("g").selectAll("rect").data(f).enter().append("rect").attr("id",Y=>"exclude-"+Y.start.format("YYYY-MM-DD")).attr("x",Y=>k(Y.start.startOf("day"))+b).attr("y",i.gridLineStartPadding).attr("width",Y=>k(Y.end.endOf("day"))-k(Y.start.startOf("day"))).attr("height",y-w-i.gridLineStartPadding).attr("transform-origin",function(Y,O){return(k(Y.start)+b+.5*(k(Y.end)-k(Y.start))).toString()+"px "+(O*p+.5*y).toString()+"px"}).attr("class","exclude-range")}function j(p,w,b,x){const y=r.db.getDateFormat(),o=r.db.getAxisFormat();let m;m=o||(y==="D"?"%d":i.axisFormat??"%Y-%m-%d");let h=(d=k,jt(3,d)).tickSize(-x+w+i.gridLineStartPadding).tickFormat(Wt(m));var d;const T=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(r.db.getTickInterval()||i.tickInterval);if(T!==null){const t=T[1],f=T[2],a=r.db.getWeekday()||i.weekday;switch(f){case"millisecond":h.ticks(Nt.every(t));break;case"second":h.ticks(Ht.every(t));break;case"minute":h.ticks(Bt.every(t));break;case"hour":h.ticks(zt.every(t));break;case"day":h.ticks(Pt.every(t));break;case"week":h.ticks(ce[a].every(t));break;case"month":h.ticks(Ot.every(t))}}if(g.append("g").attr("class","grid").attr("transform","translate("+p+", "+(x-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),r.db.topAxisEnabled()||i.topAxis){let t=(function(f){return jt(1,f)})(k).tickSize(-x+w+i.gridLineStartPadding).tickFormat(Wt(m));if(T!==null){const f=T[1],a=T[2],_=r.db.getWeekday()||i.weekday;switch(a){case"millisecond":t.ticks(Nt.every(f));break;case"second":t.ticks(Ht.every(f));break;case"minute":t.ticks(Bt.every(f));break;case"hour":t.ticks(zt.every(f));break;case"day":t.ticks(Pt.every(f));break;case"week":t.ticks(ce[_].every(f));break;case"month":t.ticks(Ot.every(f))}}g.append("g").attr("class","grid").attr("transform","translate("+p+", "+w+")").call(t).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function B(p,w){let b=0;const x=Object.keys(C).map(y=>[y,C[y]]);g.append("g").selectAll("text").data(x).enter().append(function(y){const o=y[0].split(ke.lineBreakRegex),m=-(o.length-1)/2,h=v.createElementNS("http://www.w3.org/2000/svg","text");h.setAttribute("dy",m+"em");for(const[d,T]of o.entries()){const t=v.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttribute("alignment-baseline","central"),t.setAttribute("x","10"),d>0&&t.setAttribute("dy","1em"),t.textContent=T,h.appendChild(t)}return h}).attr("x",10).attr("y",function(y,o){if(!(o>0))return y[1]*p/2+w;for(let m=0;m<o;m++)return b+=x[o-1][1],y[1]*p/2+b*p+w}).attr("font-size",i.sectionFontSize).attr("class",function(y){for(const[o,m]of F.entries())if(y[0]===m)return"sectionTitle sectionTitle"+o%i.numberSectionStyles;return"sectionTitle"})}function W(p,w,b,x){const y=r.db.getTodayMarker();if(y==="off")return;const o=g.append("g").attr("class","today"),m=new Date,h=o.append("line");h.attr("x1",k(m)+p).attr("x2",k(m)+p).attr("y1",i.titleTopMargin).attr("y2",x-i.titleTopMargin).attr("class","today"),y!==""&&h.attr("style",y.replace(/,/g,";"))}function I(p){const w={},b=[];for(let x=0,y=p.length;x<y;++x)Object.prototype.hasOwnProperty.call(w,p[x])||(w[p[x]]=!0,b.push(p[x]));return b}l(E,"taskCompare"),L.sort(E),M(L,K,D),ye(g,D,K,i.useMaxWidth),g.append("text").text(r.db.getDiagramTitle()).attr("x",K/2).attr("y",i.titleTopMargin).attr("class","titleText"),l(M,"makeGantt"),l(P,"drawRects"),l(z,"drawExcludeDays"),l(j,"makeGrid"),l(B,"vertLabels"),l(W,"drawToday"),l(I,"checkUnique")},"draw")},styles:l(e=>`
|
|
7
7
|
.mermaid-main-font {
|
|
8
8
|
font-family: ${e.fontFamily};
|
|
9
9
|
}
|
|
@@ -264,4 +264,4 @@ Expecting `+J.join(", ")+", got '"+(this.terminals_[N]||N)+"'":"Parse error on l
|
|
|
264
264
|
fill: ${e.titleColor||e.textColor};
|
|
265
265
|
font-family: ${e.fontFamily};
|
|
266
266
|
}
|
|
267
|
-
`,"getStyles")};export{
|
|
267
|
+
`,"getStyles")};export{En as diagram};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import{p as Y}from"./chunk-4BX2VUAB-EUTQThiZ.js";import{I as U}from"./chunk-QZHKN3VN-BzaIHJbq.js";import{_ as d,t as V,q as Q,s as X,g as Z,a as J,b as tt,l as u,c as rt,u as et,E as ot,z as nt,j as k,F as at,G as st,H as ct,I as it}from"./mermaid.core-BFFCqfOn.js";import{p as ht}from"./treemap-75Q7IDZK-N9hyUpyj.js";import{s as dt}from"./transform-D9VCJYws.js";import"./index-PmY0x4Zd.js";import"./step-BwsUM5iJ.js";import"./isEmpty-D1t7Gran.js";import"./_baseEach-9_logFrf.js";import"./_baseUniq-C5LFcyNC.js";import"./min-DtVSfYKl.js";import"./_baseMap-NzEbKt5c.js";import"./clone-CSxIll62.js";import"./_createAggregator-ZRm2b6Zm.js";import"./timer-Bqd5yn_a.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},mt=ct.gitGraph,R=d(()=>at({...mt,...st().gitGraph}),"getConfig"),i=new U(()=>{const e=R(),t=e.mainBranchName,o=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:o}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function G(){return it({length:7})}function D(e,t){const o=Object.create(null);return e.reduce((a,r)=>{const n=t(r);return o[n]||(o[n]=!0,a.push(r)),a},[])}d(G,"getID"),d(D,"uniqBy");var $t=d(function(e){i.records.direction=e},"setDirection"),lt=d(function(e){u.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(t){u.error("error while parsing gitGraph options",t.message)}},"setOptions"),yt=d(function(){return i.records.options},"getOptions"),gt=d(function(e){let t=e.msg,o=e.id;const a=e.type;let r=e.tags;u.info("commit",t,o,a,r),u.debug("Entering commit:",t,o,a,r);const n=R();o=k.sanitizeText(o,n),t=k.sanitizeText(t,n),r=r==null?void 0:r.map(s=>k.sanitizeText(s,n));const c={id:o||i.records.seq+"-"+G(),message:t,seq:i.records.seq++,type:a??p.NORMAL,tags:r??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,u.info("main branch",n.mainBranchName),i.records.commits.has(c.id)&&u.warn(`Commit ID ${c.id} already exists`),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),u.debug("in pushCommit "+c.id)},"commit"),pt=d(function(e){let t=e.name;const o=e.order;if(t=k.sanitizeText(t,R()),i.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);i.records.branches.set(t,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(t,{name:t,order:o}),N(t),u.debug("in createBranch")},"branch"),xt=d(e=>{let t=e.branch,o=e.id;const a=e.type,r=e.tags,n=R();t=k.sanitizeText(t,n),o&&(o=k.sanitizeText(o,n));const c=i.records.branches.get(i.records.currBranch),s=i.records.branches.get(t),m=c?i.records.commits.get(c):void 0,y=s?i.records.commits.get(s):void 0;if(m&&y&&m.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(i.records.currBranch===t){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},l}if(m===void 0||!m){const l=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},l}if(!i.records.branches.has(t)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},l}if(y===void 0||!y){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},l}if(m===y){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},l}if(o&&i.records.commits.has(o)){const l=new Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom id");throw l.hash={text:`merge ${t} ${o} ${a} ${r==null?void 0:r.join(" ")}`,token:`merge ${t} ${o} ${a} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${t} ${o}_UNIQUE ${a} ${r==null?void 0:r.join(" ")}`]},l}const $=s||"",h={id:o||`${i.records.seq}-${G()}`,message:`merged branch ${t} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,$],branch:i.records.currBranch,type:p.MERGE,customType:a,customId:!!o,tags:r??[]};i.records.head=h,i.records.commits.set(h.id,h),i.records.branches.set(i.records.currBranch,h.id),u.debug(i.records.branches),u.debug("in mergeBranch")},"merge"),ft=d(function(e){let t=e.id,o=e.targetId,a=e.tags,r=e.parent;u.debug("Entering cherryPick:",t,o,a);const n=R();if(t=k.sanitizeText(t,n),o=k.sanitizeText(o,n),a=a==null?void 0:a.map(m=>k.sanitizeText(m,n)),r=k.sanitizeText(r,n),!t||!i.records.commits.has(t)){const m=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},m}const c=i.records.commits.get(t);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&(!Array.isArray(c.parents)||!c.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const s=c.branch;if(c.type===p.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!i.records.commits.has(o)){if(s===i.records.currBranch){const h=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const m=i.records.branches.get(i.records.currBranch);if(m===void 0||!m){const h=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const y=i.records.commits.get(m);if(y===void 0||!y){const h=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const $={id:i.records.seq+"-"+G(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:a?a.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${r}`:""}`]};i.records.head=$,i.records.commits.set($.id,$),i.records.branches.set(i.records.currBranch,$.id),u.debug(i.records.branches),u.debug("in cherryPick")}},"cherryPick"),N=d(function(e){if(e=k.sanitizeText(e,R()),!i.records.branches.has(e)){const t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}{i.records.currBranch=e;const t=i.records.branches.get(i.records.currBranch);i.records.head=t!==void 0&&t?i.records.commits.get(t)??null:null}},"checkout");function q(e,t,o){const a=e.indexOf(t);a===-1?e.push(o):e.splice(a,1,o)}function H(e){const t=e.reduce((r,n)=>r.seq>n.seq?r:n,e[0]);let o="";e.forEach(function(r){o+=r===t?" *":" |"});const a=[o,t.id,t.seq];for(const r in i.records.branches)i.records.branches.get(r)===t.id&&a.push(r);if(u.debug(a.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){const r=i.records.commits.get(t.parents[0]);q(e,t,r),t.parents[1]&&e.push(i.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){const r=i.records.commits.get(t.parents[0]);q(e,t,r)}}H(e=D(e,r=>r.id))}d(q,"upsert"),d(H,"prettyPrintCommitHistory");var ut=d(function(){u.debug(i.records.commits),H([W()[0]])},"prettyPrint"),bt=d(function(){i.reset(),nt()},"clear"),wt=d(function(){return[...i.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Bt=d(function(){return i.records.branches},"getBranches"),Et=d(function(){return i.records.commits},"getCommits"),W=d(function(){const e=[...i.records.commits.values()];return e.forEach(function(t){u.debug(t.id)}),e.sort((t,o)=>t.seq-o.seq),e},"getCommitsArray"),j={commitType:p,getConfig:R,setDirection:$t,setOptions:lt,getOptions:yt,commit:gt,branch:pt,merge:xt,cherryPick:ft,checkout:N,prettyPrint:ut,clear:bt,getBranchesAsObjArray:wt,getBranches:Bt,getCommits:Et,getCommitsArray:W,getCurrentBranch:d(function(){return i.records.currBranch},"getCurrentBranch"),getDirection:d(function(){return i.records.direction},"getDirection"),getHead:d(function(){return i.records.head},"getHead"),setAccTitle:tt,getAccTitle:J,getAccDescription:Z,setAccDescription:X,setDiagramTitle:Q,getDiagramTitle:V},Ct=d((e,t)=>{Y(e,t),e.dir&&t.setDirection(e.dir);for(const o of e.statements)kt(o,t)},"populate"),kt=d((e,t)=>{const o={Commit:d(a=>t.commit(Lt(a)),"Commit"),Branch:d(a=>t.branch(Tt(a)),"Branch"),Merge:d(a=>t.merge(Mt(a)),"Merge"),Checkout:d(a=>t.checkout(vt(a)),"Checkout"),CherryPicking:d(a=>t.cherryPick(Pt(a)),"CherryPicking")}[e.$type];o?o(e):u.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Lt=d(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),Tt=d(e=>({name:e.name,order:e.order??0}),"parseBranch"),Mt=d(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),vt=d(e=>e.branch,"parseCheckout"),Pt=d(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Rt={parse:d(async e=>{const t=await ht("gitGraph",e);u.debug(t),Ct(t,j)},"parse")},z=rt(),f=z==null?void 0:z.gitGraph,T=10,M=40,E=new Map,C=new Map,I=new Map,O=[],v=0,g="LR",It=d(()=>{E.clear(),C.clear(),I.clear(),v=0,O=[],g="LR"},"clear"),F=d(e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),a.setAttribute("class","row"),a.textContent=o.trim(),t.appendChild(a)}),t},"drawText"),_=d(e=>{let t,o,a;return g==="BT"?(o=d((r,n)=>r<=n,"comparisonFunc"),a=1/0):(o=d((r,n)=>r>=n,"comparisonFunc"),a=0),e.forEach(r=>{var c,s;const n=g==="TB"||g=="BT"?(c=C.get(r))==null?void 0:c.y:(s=C.get(r))==null?void 0:s.x;n!==void 0&&o(n,a)&&(t=r,a=n)}),t},"findClosestParent"),At=d(e=>{let t="",o=1/0;return e.forEach(a=>{const r=C.get(a).y;r<=o&&(t=a,o=r)}),t||void 0},"findClosestParentBT"),Gt=d((e,t,o)=>{let a=o,r=o;const n=[];e.forEach(c=>{const s=t.get(c);if(!s)throw new Error(`Commit not found for key ${c}`);s.parents.length?(a=qt(s),r=Math.max(a,r)):n.push(s),Ht(s,a)}),a=r,n.forEach(c=>{zt(c,a,o)}),e.forEach(c=>{const s=t.get(c);if(s!=null&&s.parents.length){const m=At(s.parents);a=C.get(m).y-M,a<=r&&(r=a);const y=E.get(s.branch).pos,$=a-T;C.set(s.id,{x:y,y:$})}})},"setParallelBTPos"),Ot=d(e=>{var a;const t=_(e.parents.filter(r=>r!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);const o=(a=C.get(t))==null?void 0:a.y;if(o===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return o},"findClosestParentPos"),qt=d(e=>Ot(e)+M,"calculateCommitPosition"),Ht=d((e,t)=>{const o=E.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const a=o.pos,r=t+T;return C.set(e.id,{x:a,y:r}),{x:a,y:r}},"setCommitPosition"),zt=d((e,t,o)=>{const a=E.get(e.branch);if(!a)throw new Error(`Branch not found for commit ${e.id}`);const r=t+o,n=a.pos;C.set(e.id,{x:n,y:r})},"setRootPosition"),St=d((e,t,o,a,r,n)=>{if(n===p.HIGHLIGHT)e.append("rect").attr("x",o.x-10).attr("y",o.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${r%8} ${a}-outer`),e.append("rect").attr("x",o.x-6).attr("y",o.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${r%8} ${a}-inner`);else if(n===p.CHERRY_PICK)e.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",10).attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${a}`);else{const c=e.append("circle");if(c.attr("cx",o.x),c.attr("cy",o.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${r%8}`),n===p.MERGE){const s=e.append("circle");s.attr("cx",o.x),s.attr("cy",o.y),s.attr("r",6),s.attr("class",`commit ${a} ${t.id} commit${r%8}`)}n===p.REVERSE&&e.append("path").attr("d",`M ${o.x-5},${o.y-5}L${o.x+5},${o.y+5}M${o.x-5},${o.y+5}L${o.x+5},${o.y-5}`).attr("class",`commit ${a} ${t.id} commit${r%8}`)}},"drawCommitBullet"),Dt=d((e,t,o,a)=>{var r;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){const n=e.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),s=n.append("text").attr("x",a).attr("y",o.y+25).attr("class","commit-label").text(t.id),m=(r=s.node())==null?void 0:r.getBBox();if(m&&(c.attr("x",o.posWithOffset-m.width/2-2).attr("y",o.y+13.5).attr("width",m.width+4).attr("height",m.height+4),g==="TB"||g==="BT"?(c.attr("x",o.x-(m.width+16+5)).attr("y",o.y-12),s.attr("x",o.x-(m.width+16)).attr("y",o.y+m.height-12)):s.attr("x",o.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),c.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{const y=-7.5-(m.width+10)/25*9.5,$=10+m.width/25*8.5;n.attr("transform","translate("+y+", "+$+") rotate(-45, "+a+", "+o.y+")")}}},"drawCommitLabel"),Nt=d((e,t,o,a)=>{var r;if(t.tags.length>0){let n=0,c=0,s=0;const m=[];for(const y of t.tags.reverse()){const $=e.insert("polygon"),h=e.append("circle"),l=e.append("text").attr("y",o.y-16-n).attr("class","tag-label").text(y),x=(r=l.node())==null?void 0:r.getBBox();if(!x)throw new Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),l.attr("x",o.posWithOffset-x.width/2),m.push({tag:l,hole:h,rect:$,yOffset:n}),n+=20}for(const{tag:y,hole:$,rect:h,yOffset:l}of m){const x=s/2,b=o.y-19.2-l;if(h.attr("class","tag-label-bkg").attr("points",`
|
|
2
|
+
${a-c/2-2},${b+2}
|
|
3
|
+
${a-c/2-2},${b-2}
|
|
4
|
+
${o.posWithOffset-c/2-4},${b-x-2}
|
|
5
|
+
${o.posWithOffset+c/2+4},${b-x-2}
|
|
6
|
+
${o.posWithOffset+c/2+4},${b+x+2}
|
|
7
|
+
${o.posWithOffset-c/2-4},${b+x+2}`),$.attr("cy",b).attr("cx",a-c/2+2).attr("r",1.5).attr("class","tag-hole"),g==="TB"||g==="BT"){const w=a+l;h.attr("class","tag-label-bkg").attr("points",`
|
|
8
|
+
${o.x},${w+2}
|
|
9
|
+
${o.x},${w-2}
|
|
10
|
+
${o.x+T},${w-x-2}
|
|
11
|
+
${o.x+T+c+4},${w-x-2}
|
|
12
|
+
${o.x+T+c+4},${w+x+2}
|
|
13
|
+
${o.x+T},${w+x+2}`).attr("transform","translate(12,12) rotate(45, "+o.x+","+a+")"),$.attr("cx",o.x+2).attr("cy",w).attr("transform","translate(12,12) rotate(45, "+o.x+","+a+")"),y.attr("x",o.x+5).attr("y",w+3).attr("transform","translate(14,14) rotate(45, "+o.x+","+a+")")}}}},"drawCommitTags"),Wt=d(e=>{switch(e.customType??e.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),jt=d((e,t,o,a)=>{const r={x:0,y:0};if(!(e.parents.length>0))return t==="TB"?30:t==="BT"?(a.get(e.id)??r).y-M:0;{const n=_(e.parents);if(n){const c=a.get(n)??r;return t==="TB"?c.y+M:t==="BT"?(a.get(e.id)??r).y-M:c.x+M}}return 0},"calculatePosition"),Ft=d((e,t,o)=>{var c,s;const a=g==="BT"&&o?t:t+T,r=g==="TB"||g==="BT"?a:(c=E.get(e.branch))==null?void 0:c.pos,n=g==="TB"||g==="BT"?(s=E.get(e.branch))==null?void 0:s.pos:a;if(n===void 0||r===void 0)throw new Error(`Position were undefined for commit ${e.id}`);return{x:n,y:r,posWithOffset:a}},"getCommitPosition"),K=d((e,t,o)=>{if(!f)throw new Error("GitGraph config not found");const a=e.append("g").attr("class","commit-bullets"),r=e.append("g").attr("class","commit-labels");let n=g==="TB"||g==="BT"?30:0;const c=[...t.keys()],s=(f==null?void 0:f.parallelCommits)??!1,m=d(($,h)=>{var b,w;const l=(b=t.get($))==null?void 0:b.seq,x=(w=t.get(h))==null?void 0:w.seq;return l!==void 0&&x!==void 0?l-x:0},"sortKeys");let y=c.sort(m);g==="BT"&&(s&&Gt(y,t,n),y=y.reverse()),y.forEach($=>{var x;const h=t.get($);if(!h)throw new Error(`Commit not found for key ${$}`);s&&(n=jt(h,g,n,C));const l=Ft(h,n,s);if(o){const b=Wt(h),w=h.customType??h.type,P=((x=E.get(h.branch))==null?void 0:x.index)??0;St(a,h,l,b,P,w),Dt(r,h,l,n),Nt(r,h,l,n)}g==="TB"||g==="BT"?C.set(h.id,{x:l.x,y:l.posWithOffset}):C.set(h.id,{x:l.posWithOffset,y:l.y}),n=g==="BT"&&s?n+M:n+M+T,n>v&&(v=n)})},"drawCommits"),_t=d((e,t,o,a,r)=>{const n=(g==="TB"||g==="BT"?o.x<a.x:o.y<a.y)?t.branch:e.branch,c=d(m=>m.branch===n,"isOnBranchToGetCurve"),s=d(m=>m.seq>e.seq&&m.seq<t.seq,"isBetweenCommits");return[...r.values()].some(m=>s(m)&&c(m))},"shouldRerouteArrow"),A=d((e,t,o=0)=>{const a=e+Math.abs(e-t)/2;if(o>5)return a;if(O.every(n=>Math.abs(n-a)>=10))return O.push(a),a;const r=Math.abs(e-t);return A(e,t-r/5,o+1)},"findLane"),Kt=d((e,t,o,a)=>{var x,b,w,P,S;const r=C.get(t.id),n=C.get(o.id);if(r===void 0||n===void 0)throw new Error(`Commit positions not found for commits ${t.id} and ${o.id}`);const c=_t(t,o,r,n,a);let s,m="",y="",$=0,h=0,l=(x=E.get(o.branch))==null?void 0:x.index;if(o.type===p.MERGE&&t.id!==o.parents[0]&&(l=(b=E.get(t.branch))==null?void 0:b.index),c){m="A 10 10, 0, 0, 0,",y="A 10 10, 0, 0, 1,",$=10,h=10;const L=r.y<n.y?A(r.y,n.y):A(n.y,r.y),B=r.x<n.x?A(r.x,n.x):A(n.x,r.x);g==="TB"?r.x<n.x?s=`M ${r.x} ${r.y} L ${B-$} ${r.y} ${y} ${B} ${r.y+h} L ${B} ${n.y-$} ${m} ${B+h} ${n.y} L ${n.x} ${n.y}`:(l=(w=E.get(t.branch))==null?void 0:w.index,s=`M ${r.x} ${r.y} L ${B+$} ${r.y} ${m} ${B} ${r.y+h} L ${B} ${n.y-$} ${y} ${B-h} ${n.y} L ${n.x} ${n.y}`):g==="BT"?r.x<n.x?s=`M ${r.x} ${r.y} L ${B-$} ${r.y} ${m} ${B} ${r.y-h} L ${B} ${n.y+$} ${y} ${B+h} ${n.y} L ${n.x} ${n.y}`:(l=(P=E.get(t.branch))==null?void 0:P.index,s=`M ${r.x} ${r.y} L ${B+$} ${r.y} ${y} ${B} ${r.y-h} L ${B} ${n.y+$} ${m} ${B-h} ${n.y} L ${n.x} ${n.y}`):r.y<n.y?s=`M ${r.x} ${r.y} L ${r.x} ${L-$} ${m} ${r.x+h} ${L} L ${n.x-$} ${L} ${y} ${n.x} ${L+h} L ${n.x} ${n.y}`:(l=(S=E.get(t.branch))==null?void 0:S.index,s=`M ${r.x} ${r.y} L ${r.x} ${L+$} ${y} ${r.x+h} ${L} L ${n.x-$} ${L} ${m} ${n.x} ${L-h} L ${n.x} ${n.y}`)}else m="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",$=20,h=20,g==="TB"?(r.x<n.x&&(s=o.type===p.MERGE&&t.id!==o.parents[0]?`M ${r.x} ${r.y} L ${r.x} ${n.y-$} ${m} ${r.x+h} ${n.y} L ${n.x} ${n.y}`:`M ${r.x} ${r.y} L ${n.x-$} ${r.y} ${y} ${n.x} ${r.y+h} L ${n.x} ${n.y}`),r.x>n.x&&(m="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",$=20,h=20,s=o.type===p.MERGE&&t.id!==o.parents[0]?`M ${r.x} ${r.y} L ${r.x} ${n.y-$} ${y} ${r.x-h} ${n.y} L ${n.x} ${n.y}`:`M ${r.x} ${r.y} L ${n.x+$} ${r.y} ${m} ${n.x} ${r.y+h} L ${n.x} ${n.y}`),r.x===n.x&&(s=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):g==="BT"?(r.x<n.x&&(s=o.type===p.MERGE&&t.id!==o.parents[0]?`M ${r.x} ${r.y} L ${r.x} ${n.y+$} ${y} ${r.x+h} ${n.y} L ${n.x} ${n.y}`:`M ${r.x} ${r.y} L ${n.x-$} ${r.y} ${m} ${n.x} ${r.y-h} L ${n.x} ${n.y}`),r.x>n.x&&(m="A 20 20, 0, 0, 0,",y="A 20 20, 0, 0, 1,",$=20,h=20,s=o.type===p.MERGE&&t.id!==o.parents[0]?`M ${r.x} ${r.y} L ${r.x} ${n.y+$} ${m} ${r.x-h} ${n.y} L ${n.x} ${n.y}`:`M ${r.x} ${r.y} L ${n.x-$} ${r.y} ${m} ${n.x} ${r.y-h} L ${n.x} ${n.y}`),r.x===n.x&&(s=`M ${r.x} ${r.y} L ${n.x} ${n.y}`)):(r.y<n.y&&(s=o.type===p.MERGE&&t.id!==o.parents[0]?`M ${r.x} ${r.y} L ${n.x-$} ${r.y} ${y} ${n.x} ${r.y+h} L ${n.x} ${n.y}`:`M ${r.x} ${r.y} L ${r.x} ${n.y-$} ${m} ${r.x+h} ${n.y} L ${n.x} ${n.y}`),r.y>n.y&&(s=o.type===p.MERGE&&t.id!==o.parents[0]?`M ${r.x} ${r.y} L ${n.x-$} ${r.y} ${m} ${n.x} ${r.y-h} L ${n.x} ${n.y}`:`M ${r.x} ${r.y} L ${r.x} ${n.y+$} ${y} ${r.x+h} ${n.y} L ${n.x} ${n.y}`),r.y===n.y&&(s=`M ${r.x} ${r.y} L ${n.x} ${n.y}`));if(s===void 0)throw new Error("Line definition not found");e.append("path").attr("d",s).attr("class","arrow arrow"+l%8)},"drawArrow"),Yt=d((e,t)=>{const o=e.append("g").attr("class","commit-arrows");[...t.keys()].forEach(a=>{const r=t.get(a);r.parents&&r.parents.length>0&&r.parents.forEach(n=>{Kt(o,t.get(n),r,t)})})},"drawArrows"),Ut=d((e,t)=>{const o=e.append("g");t.forEach((a,r)=>{var x;const n=r%8,c=(x=E.get(a.name))==null?void 0:x.pos;if(c===void 0)throw new Error(`Position not found for branch ${a.name}`);const s=o.append("line");s.attr("x1",0),s.attr("y1",c),s.attr("x2",v),s.attr("y2",c),s.attr("class","branch branch"+n),g==="TB"?(s.attr("y1",30),s.attr("x1",c),s.attr("y2",v),s.attr("x2",c)):g==="BT"&&(s.attr("y1",v),s.attr("x1",c),s.attr("y2",30),s.attr("x2",c)),O.push(c);const m=a.name,y=F(m),$=o.insert("rect"),h=o.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+n);h.node().appendChild(y);const l=y.getBBox();$.attr("class","branchLabelBkg label"+n).attr("rx",4).attr("ry",4).attr("x",-l.width-4-((f==null?void 0:f.rotateCommitLabel)===!0?30:0)).attr("y",-l.height/2+8).attr("width",l.width+18).attr("height",l.height+4),h.attr("transform","translate("+(-l.width-14-((f==null?void 0:f.rotateCommitLabel)===!0?30:0))+", "+(c-l.height/2-1)+")"),g==="TB"?($.attr("x",c-l.width/2-10).attr("y",0),h.attr("transform","translate("+(c-l.width/2-5)+", 0)")):g==="BT"?($.attr("x",c-l.width/2-10).attr("y",v),h.attr("transform","translate("+(c-l.width/2-5)+", "+v+")")):$.attr("transform","translate(-19, "+(c-l.height/2)+")")})},"drawBranches"),Vt=d(function(e,t,o,a,r){return E.set(e,{pos:t,index:o}),t+=50+(r?40:0)+(g==="TB"||g==="BT"?a.width/2:0)},"setBranchPosition"),Qt={parser:Rt,db:j,renderer:{draw:d(function(e,t,o,a){if(It(),u.debug("in gitgraph renderer",e+`
|
|
14
|
+
`,"id:",t,o),!f)throw new Error("GitGraph config not found");const r=f.rotateCommitLabel??!1,n=a.db;I=n.getCommits();const c=n.getBranchesAsObjArray();g=n.getDirection();const s=dt(`[id="${t}"]`);let m=0;c.forEach((y,$)=>{var P;const h=F(y.name),l=s.append("g"),x=l.insert("g").attr("class","branchLabel"),b=x.insert("g").attr("class","label branch-label");(P=b.node())==null||P.appendChild(h);const w=h.getBBox();m=Vt(y.name,m,$,w,r),b.remove(),x.remove(),l.remove()}),K(s,I,!1),f.showBranches&&Ut(s,c),Yt(s,I),K(s,I,!0),et.insertTitle(s,"gitTitleText",f.titleTopMargin??0,n.getDiagramTitle()),ot(void 0,s,f.diagramPadding,f.useMaxWidth)},"draw")},styles:d(e=>`
|
|
15
|
+
.commit-id,
|
|
16
|
+
.commit-msg,
|
|
17
|
+
.branch-label {
|
|
18
|
+
fill: lightgrey;
|
|
19
|
+
color: lightgrey;
|
|
20
|
+
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
21
|
+
font-family: var(--mermaid-font-family);
|
|
22
|
+
}
|
|
23
|
+
${[0,1,2,3,4,5,6,7].map(t=>`
|
|
24
|
+
.branch-label${t} { fill: ${e["gitBranchLabel"+t]}; }
|
|
25
|
+
.commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
|
|
26
|
+
.commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
|
|
27
|
+
.label${t} { fill: ${e["git"+t]}; }
|
|
28
|
+
.arrow${t} { stroke: ${e["git"+t]}; }
|
|
29
|
+
`).join(`
|
|
30
|
+
`)}
|
|
31
|
+
|
|
32
|
+
.branch {
|
|
33
|
+
stroke-width: 1;
|
|
34
|
+
stroke: ${e.lineColor};
|
|
35
|
+
stroke-dasharray: 2;
|
|
36
|
+
}
|
|
37
|
+
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};}
|
|
38
|
+
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; }
|
|
39
|
+
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
40
|
+
.tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; }
|
|
41
|
+
.tag-hole { fill: ${e.textColor}; }
|
|
42
|
+
|
|
43
|
+
.commit-merge {
|
|
44
|
+
stroke: ${e.primaryColor};
|
|
45
|
+
fill: ${e.primaryColor};
|
|
46
|
+
}
|
|
47
|
+
.commit-reverse {
|
|
48
|
+
stroke: ${e.primaryColor};
|
|
49
|
+
fill: ${e.primaryColor};
|
|
50
|
+
stroke-width: 3;
|
|
51
|
+
}
|
|
52
|
+
.commit-highlight-outer {
|
|
53
|
+
}
|
|
54
|
+
.commit-highlight-inner {
|
|
55
|
+
stroke: ${e.primaryColor};
|
|
56
|
+
fill: ${e.primaryColor};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
60
|
+
.gitTitleText {
|
|
61
|
+
text-anchor: middle;
|
|
62
|
+
font-size: 18px;
|
|
63
|
+
fill: ${e.textColor};
|
|
64
|
+
}
|
|
65
|
+
`,"getStyles")};export{Qt as diagram};
|