@marimo-team/frontend 0.21.2-dev5 → 0.21.2-dev53
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/{CellStatus-CDSBsjjF.js → CellStatus-DX8MnBMk.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-Buaffg3u.js → ConnectedDataExplorerComponent-7yXYooWG.js} +1 -1
- package/dist/assets/{DeferredRequestRegistry-O6RDJKs0.js → DeferredRequestRegistry-B8jPCuU1.js} +1 -1
- package/dist/assets/{ImperativeModal-qEtcJ95s.js → ImperativeModal-C3CD5-Aq.js} +1 -1
- package/dist/assets/JsonOutput-DqjAyzM8.js +46 -0
- package/dist/assets/{LazyAnyLanguageCodeMirror-m8w66E4s.js → LazyAnyLanguageCodeMirror-CcCHIX38.js} +2 -2
- package/dist/assets/{MarimoErrorOutput-az74f3Mp.js → MarimoErrorOutput-Dat_S09q.js} +5 -5
- package/dist/assets/RenderHTML-C7XM39M2.js +1 -0
- package/dist/assets/{add-cell-with-ai-DUn4LN4W.js → add-cell-with-ai-y2xroEGf.js} +9 -9
- package/dist/assets/{add-connection-dialog-CBz0AUVX.js → add-connection-dialog-QDBOmil3.js} +23 -23
- package/dist/assets/{agent-panel-u83dsDsM.js → agent-panel-DziFrEjJ.js} +6 -6
- package/dist/assets/ai-model-dropdown-CiJpv5wN.js +5 -0
- package/dist/assets/{alert-dialog-9WfvUF7e.js → alert-dialog-ebk_-wsU.js} +1 -1
- package/dist/assets/{any-language-editor-DwQMnAM3.js → any-language-editor-DZYnKlJB.js} +1 -1
- package/dist/assets/{app-config-button-rDu-lCIB.js → app-config-button-CpAv9Tiu.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-DfMHHFZ3.js → architectureDiagram-VXUJARFQ-DKmk99ac.js} +1 -1
- package/dist/assets/{azure-BTXHztTw.js → azure-Dw5gKmUz.js} +1 -1
- package/dist/assets/{blockDiagram-VD42YOAC-CuEDwbg7.js → blockDiagram-VD42YOAC-TpAhP5OQ.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-CD9uz7WG.js → c4Diagram-YG6GDRKO-Dg8hCyKf.js} +1 -1
- package/dist/assets/{cache-panel-qIxnndwr.js → cache-panel-D0OsHk_D.js} +1 -1
- package/dist/assets/cell-editor-RbAVpSFb.js +22 -0
- package/dist/assets/{cell-link-Q_UEP94Z.js → cell-link-CNgO3c-T.js} +1 -1
- package/dist/assets/{cells-fq1RMGX_.js → cells-39RE4UzS.js} +77 -76
- package/dist/assets/channel-D1wPYhc9.js +1 -0
- package/dist/assets/{chat-display-D_Fuuy6r.js → chat-display-BPUVrlA6.js} +1 -1
- package/dist/assets/{chat-panel-BO-JoQSp.js → chat-panel-esz5TfF-.js} +2 -2
- package/dist/assets/{chunk-5FQGJX7Z-CM1a_K7I.js → chunk-5FQGJX7Z-sGWxL7Ey.js} +3 -3
- package/dist/assets/{chunk-ABZYJK2D-D_Wumzom.js → chunk-ABZYJK2D-DXJ7hnjx.js} +1 -1
- package/dist/assets/{chunk-ATLVNIR6-BZ0lTgIn.js → chunk-ATLVNIR6-CTEqcLEc.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-Dw1S6osV.js → chunk-B4BG7PRW-CkAIqtPf.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-Q63FTCPP.js → chunk-DI55MBZ5-C4F9vu8o.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-CfkJ_R7W.js → chunk-EXTU4WIE-BT0Py-4P.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-B41fGeoj.js → chunk-JA3XYJ7Z-CGd7jja_.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-D43EJxQw.js → chunk-JZLCHNYA-CqY-RYTj.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-DCtw0-ni.js → chunk-N4CR4FBY-aUDjVzN7.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-CLA2rsaS.js → chunk-QN33PNHL-DHnCb5-U.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-De1DpbnL.js → chunk-QXUST7PY-CRO5kYCE.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-qrwvlUdq.js → chunk-S3R3BYOJ-CSHQgcuP.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-C4KcThb0.js → chunk-TZMSLE5B-CE7o9asH.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-BDIQSKYv.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-Cdh4cVOB.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-D4FF4cnN.js → code-block-37QAKDTI-DMpe1jNG.js} +1 -1
- package/dist/assets/{column-preview-WsubyItX.js → column-preview-BUKHsglA.js} +1 -1
- package/dist/assets/{command-rfxSsiHU.js → command-DmzEbs6L.js} +1 -1
- package/dist/assets/{command-palette-Bez4BqJF.js → command-palette-BX5gNpUr.js} +1 -1
- package/dist/assets/{common-BYwO983A.js → common-B4yshY-H.js} +1 -1
- package/dist/assets/{components-Ozq0825a.js → components-DCqJqyys.js} +1 -1
- package/dist/assets/{components-Bpgzv_5_.js → components-oKCjx6cN.js} +1 -1
- package/dist/assets/{config-3Aq84phF.js → config-DqxNMQDN.js} +1 -1
- package/dist/assets/{context-CIAP2NOh.js → context-CRmPPhx9.js} +1 -1
- package/dist/assets/{context-aware-panel-CfsfBlhO.js → context-aware-panel-DC0Te9Hj.js} +2 -2
- package/dist/assets/copy-KjcPgPw9.js +1 -0
- package/dist/assets/{copy-icon-BgmMM9Zg.js → copy-icon-P0kzz1Pr.js} +1 -1
- package/dist/assets/{dagre-6UL2VRFP-BhMnPhuU.js → dagre-6UL2VRFP-XqoNLMQ3.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-kbv73SQ7.js → data-grid-overlay-editor-Cus1-BFN.js} +1 -1
- package/dist/assets/{datasource-F9sJtuof.js → datasource-DKHG39NV.js} +2 -2
- package/dist/assets/{dates-CHaNfieI.js → dates-CTqMeMGY.js} +1 -1
- package/dist/assets/{dependency-graph-panel-AOBcX2tP.js → dependency-graph-panel-7GKT3dyD.js} +4 -4
- package/dist/assets/{diagram-PSM6KHXK-Cr2t4zul.js → diagram-PSM6KHXK-BuzKNNcN.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-DLU_hSO4.js → diagram-QEK2KX5R-A5LBQS11.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-C7EkNAO3.js → diagram-S2PKOQOG-dkJE8SA0.js} +1 -1
- package/dist/assets/{dialog-CVN1lcMF.js → dialog-1_jIyAb_.js} +1 -1
- package/dist/assets/{dist-DJBpXGro.js → dist-6P6vjf93.js} +1 -1
- package/dist/assets/dist-BWGxTsTP.js +1 -0
- package/dist/assets/{dist-CblX3KGI.js → dist-B_buFm3B.js} +1 -1
- package/dist/assets/{dist-CXLJUPFl.js → dist-BatEf-0f.js} +1 -1
- package/dist/assets/dist-C3AnARPE.js +1 -0
- package/dist/assets/{dist-BNC_tnlW.js → dist-C6ohaMKU.js} +1 -1
- package/dist/assets/{dist-BoDHthoc.js → dist-CO9Pg2Rc.js} +1 -1
- package/dist/assets/{dist-By6zhkxZ.js → dist-CSV6H5w_.js} +1 -1
- package/dist/assets/{dist-6FIAeDIu.js → dist-CYs1oP7g.js} +1 -1
- package/dist/assets/{dist-DbK_4_qo.js → dist-DD9ZJMK5.js} +1 -1
- package/dist/assets/{dist-DlTbNRBn.js → dist-DReDpc2z.js} +1 -1
- package/dist/assets/dist-DSlq5ZeQ.js +1 -0
- package/dist/assets/{dist-DrceDAhM.js → dist-DXyIIB32.js} +1 -1
- package/dist/assets/{dist-CcGcwrUD.js → dist-DkaderFA.js} +1 -1
- package/dist/assets/{dist-BiZQlfhr.js → dist-Dq3BlK4R.js} +1 -1
- package/dist/assets/{dist-ClzRAVN-.js → dist-Dxov2ltb.js} +1 -1
- package/dist/assets/{dist-BXXPfIam.js → dist-EtGG9C1A.js} +1 -1
- package/dist/assets/{dist-C3MmXcLA.js → dist-NjId5Gdz.js} +1 -1
- package/dist/assets/dist-ZM59OWYL.js +1 -0
- package/dist/assets/dist-_TwZ4tIe.js +1 -0
- package/dist/assets/dist-f9b2H4q_.js +1 -0
- package/dist/assets/{dist-mxGLXOFm.js → dist-feWVQ4dq.js} +1 -1
- package/dist/assets/{documentation-panel-D28MpqbI.js → documentation-panel-D5d_BbHV.js} +1 -1
- package/dist/assets/{download-B9_ToVd4.js → download-B1vXaivj.js} +4 -4
- package/dist/assets/{dropdown-menu-DdPu5Kfu.js → dropdown-menu-BehqiLFL.js} +1 -1
- package/dist/assets/{edit-page-otS-QvnC.js → edit-page-B5cAZdO7.js} +7 -7
- package/dist/assets/{en-US-BO8E69bZ.js → en-US-f8tajDx1.js} +1 -1
- package/dist/assets/{erDiagram-Q2GNP2WA-DqlEo_Us.js → erDiagram-Q2GNP2WA-CgH6udOW.js} +1 -1
- package/dist/assets/{error-banner-BRG6IPhC.js → error-banner-J5F3weEj.js} +1 -1
- package/dist/assets/{error-panel-RRoj_iOR.js → error-panel-DnhKJ5Ou.js} +1 -1
- package/dist/assets/{es-CzkousWe.js → es-DYI7U61K.js} +1 -1
- package/dist/assets/{esm-CBkHtTOV.js → esm-BC1J92im.js} +1 -1
- package/dist/assets/{esm-DhTsVMLM.js → esm-DKLLCu3N.js} +1 -1
- package/dist/assets/{field-B1jGbQlH.js → field-B08lvxnl.js} +1 -1
- package/dist/assets/file-explorer-panel-BUk69TND.js +26 -0
- package/dist/assets/{file-icons-CWLHDa1J.js → file-icons-3DTS8ZM7.js} +1 -1
- package/dist/assets/{floating-outline-BvQKiC0F.js → floating-outline-DmugATcB.js} +1 -1
- package/dist/assets/{flowDiagram-NV44I4VS-CQlIJ12H.js → flowDiagram-NV44I4VS-D85BL4rA.js} +1 -1
- package/dist/assets/{focus-DYwTiH9-.js → focus-DlJH7sfh.js} +1 -1
- package/dist/assets/{form-CrQYrsUC.js → form-760_EqmF.js} +2 -2
- package/dist/assets/{formats-rhOJovGE.js → formats-wYuh1bqp.js} +1 -1
- package/dist/assets/{formatting-B4ZCH3ol.js → formatting-CraOPe94.js} +1 -1
- package/dist/assets/{gallery-page-eRea0yic.js → gallery-page--paiPvYX.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-B3EGIuZL.js → ganttDiagram-JELNMOA3-DzCOXWlF.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-h5SlguJK.js → gitGraphDiagram-V2S2FVAM-BUHURX6t.js} +1 -1
- package/dist/assets/{glide-data-editor-xt5xNZeV.js → glide-data-editor-DYdoQTO5.js} +4 -4
- package/dist/assets/{globals-BsV5fVR-.js → globals-7M5DRsIb.js} +1 -1
- package/dist/assets/home-page-CxQ1e98h.js +4 -0
- package/dist/assets/{hooks-CHx5dUUq.js → hooks-C3jEff2O.js} +1 -1
- package/dist/assets/html-to-image-DTFXm6_Z.js +2 -0
- package/dist/assets/{index-GjXovVsl.css → index-BmoocKR0.css} +1 -1
- package/dist/assets/index-DNchElHl.js +38 -0
- package/dist/assets/{infoDiagram-HS3SLOUP-pzpClObZ.js → infoDiagram-HS3SLOUP-GG5r0Y5G.js} +1 -1
- package/dist/assets/{input-CUwqpKjd.js → input-CN1ZeRYm.js} +1 -1
- package/dist/assets/{isValid-BGe7pJXT.js → isValid-DY4Mgbr7.js} +1 -1
- package/dist/assets/{journeyDiagram-XKPGCS4Q-BrdRi92v.js → journeyDiagram-XKPGCS4Q-B1dvnV4D.js} +1 -1
- package/dist/assets/{kanban-definition-3W4ZIXB7-B6WqgFqh.js → kanban-definition-3W4ZIXB7-CefbrXQv.js} +1 -1
- package/dist/assets/{kiosk-mode-DNjEnIWb.js → kiosk-mode-CyTnrzwK.js} +1 -1
- package/dist/assets/{layout-CwFtCyW8.js → layout-3b3tzmbb.js} +3 -3
- package/dist/assets/{linear-BP9rwmWK.js → linear-BDnrHGYO.js} +1 -1
- package/dist/assets/{links-CIQwYQ48.js → links-CptYD1FP.js} +1 -1
- package/dist/assets/{logs-panel-BU1tNEVc.js → logs-panel-C4k_2IHW.js} +1 -1
- package/dist/assets/{markdown-renderer-MR9df58W.js → markdown-renderer-DSy5IuAx.js} +1 -1
- package/dist/assets/{menu-items-UxKrm8hS.js → menu-items-BpHXKv51.js} +1 -1
- package/dist/assets/mermaid-4DMBBIKO-g7AL4SLJ.js +1 -0
- package/dist/assets/{mermaid-Djr3jUAB.js → mermaid-C43VbdrM.js} +3 -3
- package/dist/assets/{mermaid-parser.core-DR82IMb2.js → mermaid-parser.core-CdM8D_p_.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-DAmJpbPM.js → mindmap-definition-VGOIOE7T-CcV7D-wF.js} +1 -1
- package/dist/assets/{mode-AcL8c6qH.js → mode-D-iRbN9x.js} +1 -1
- package/dist/assets/{multi-map-Pp1P2DOX.js → multi-map-C8RbwBrw.js} +1 -1
- package/dist/assets/{name-cell-input-DVFEv_aO.js → name-cell-input-Dyb0ZO4X.js} +1 -1
- package/dist/assets/{number-overlay-editor-D__AflXQ.js → number-overlay-editor-BBJO1mf8.js} +1 -1
- package/dist/assets/{outline-panel-CP0oIuiU.js → outline-panel-D7CJwO8u.js} +1 -1
- package/dist/assets/{packages-panel-CzRELimG.js → packages-panel-Bp1SYjgc.js} +1 -1
- package/dist/assets/{panels-wTweRyIv.js → panels-D0aw6jdc.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-DbGIFRoq.js → pieDiagram-ADFJNKIX-C1fBf15W.js} +1 -1
- package/dist/assets/{popover-BPGG2gPG.js → popover-Bvoif-Mg.js} +1 -1
- package/dist/assets/{precisionRound-BOmLQIKI.js → precisionRound-CCOoIlcP.js} +1 -1
- package/dist/assets/{process-output-CTVsT--B.js → process-output-BxPWHcIi.js} +1 -1
- package/dist/assets/{quadrantDiagram-AYHSOK5B-CLAtyple.js → quadrantDiagram-AYHSOK5B-RVooN-fX.js} +1 -1
- package/dist/assets/{react-vega-BZav_-2n.js → react-vega-BKRQSy0g.js} +1 -1
- package/dist/assets/react-vega-DXESF7qN.js +1 -0
- package/dist/assets/{readonly-python-code-DH-1xZGq.js → readonly-python-code-D95oshJa.js} +1 -1
- package/dist/assets/{renderShortcut-CnD1Dah5.js → renderShortcut-BYvKm38e.js} +1 -1
- package/dist/assets/{request-registry-B-7cIM_I.js → request-registry-XB2EzJHm.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-DDDTB1LD.js → requirementDiagram-UZGBJVZJ-DtqOYJpH.js} +1 -1
- package/dist/assets/{run-page-FCvGnICa.js → run-page-B7CASued.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-DAWPOfBw.js → sankeyDiagram-TZEHDZUN-DmcooLA8.js} +1 -1
- package/dist/assets/{scratchpad-panel-k9lrm-rC.js → scratchpad-panel-BIVRgYOU.js} +1 -1
- package/dist/assets/{secrets-panel-B1Z-6dmz.js → secrets-panel-C24hZEiO.js} +1 -1
- package/dist/assets/{select-CxT2Geqr.js → select-Cnd3vm9n.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-D_qAidD2.js → sequenceDiagram-WL72ISMW-S2qeLb7J.js} +1 -1
- package/dist/assets/{session-panel-WhN0qilM.js → session-panel-CNabBHQm.js} +1 -1
- package/dist/assets/{share-BdH_5I58.js → share-NjpZ54PJ.js} +1 -1
- package/dist/assets/{snippets-panel-BCDHUuku.js → snippets-panel-D1JAeJj1.js} +1 -1
- package/dist/assets/{spec-DbmSqx09.js → spec-DnVBmJUh.js} +1 -1
- package/dist/assets/{state-Ce7CVShi.js → state-BagvlaEz.js} +1 -1
- package/dist/assets/{state-3V5UxC3B.js → state-Cz_wrzCz.js} +1 -1
- package/dist/assets/{state-CBmCYWFH.js → state-DMQXxemS.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-C7qgDrGA.js → stateDiagram-FKZM4ZOC-uuQ60pIl.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-D-GWhQTG.js +1 -0
- package/dist/assets/stex-CruVQx-P.js +1 -0
- package/dist/assets/{switch-CVKxYu_0.js → switch-Bwpd2AFq.js} +1 -1
- package/dist/assets/{terminal-Cr7wbEjz.js → terminal-Gl8Fi44y.js} +1 -1
- package/dist/assets/{time-D2GKc0U6.js → time-Bw8f15NM.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-hd6uJKGs.js → timeline-definition-IT6M3QCI-TKWeDnSQ.js} +1 -1
- package/dist/assets/{toggle-RCwU-rnE.js → toggle-C_gNjXg8.js} +1 -1
- package/dist/assets/{tooltip-D9723Brr.js → tooltip-CR_izE8Q.js} +1 -1
- package/dist/assets/tracing-DwAC7DWN.js +1 -0
- package/dist/assets/tracing-panel-D1iNgclL.js +2 -0
- package/dist/assets/{tree-Ch2-GuhG.js → tree-WVrWjdwv.js} +3 -3
- package/dist/assets/{useAddCell-YC7rpcmD.js → useAddCell-D6Q7JziZ.js} +1 -1
- package/dist/assets/{useBoolean-m1e6E3Ao.js → useBoolean-CrltYVhE.js} +1 -1
- package/dist/assets/{useCellActionButton-GUb2fXU8.js → useCellActionButton-B2G9OaX9.js} +1 -1
- package/dist/assets/{useDateFormatter-CpE7XQLs.js → useDateFormatter-DOoVZUts.js} +1 -1
- package/dist/assets/{useDeleteCell-DRUDRiy0.js → useDeleteCell-d8veThW7.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-nFVMlEx0.js → useDependencyPanelTab-B3iIj3MO.js} +1 -1
- package/dist/assets/{useInstallPackage-C9V-on2J.js → useInstallPackage-CQEr5429.js} +1 -1
- package/dist/assets/{useNotebookActions-ChLHy-0O.js → useNotebookActions-SAEOWcBo.js} +1 -1
- package/dist/assets/{useNumberFormatter-DbDKSvEd.js → useNumberFormatter-BXZcbTzH.js} +1 -1
- package/dist/assets/{usePress-BHGkpw8X.js → usePress-alQ5Crny.js} +1 -1
- package/dist/assets/{useRunCells-5m6jCnyo.js → useRunCells-Dhl8ZTGh.js} +1 -1
- package/dist/assets/{useSplitCell-DGD9smMq.js → useSplitCell-BSnFazbH.js} +1 -1
- package/dist/assets/{utils-CdjCA1J8.js → utils-C24l2A1T.js} +1 -1
- package/dist/assets/{vega-component-CRbeDmeM.js → vega-component-9Pf4pVZL.js} +1 -1
- package/dist/assets/{vega-loader.browser-CZV6_g2i.js → vega-loader.browser-BJ9oKrvH.js} +1 -1
- package/dist/assets/{write-secret-modal-BCvuRAFb.js → write-secret-modal-BFCsWMoW.js} +1 -1
- package/dist/assets/{xychartDiagram-PRI3JC2R-CXlUBSbQ.js → xychartDiagram-PRI3JC2R-CIp-yeSa.js} +1 -1
- package/dist/index.html +125 -125
- package/package.json +1 -1
- package/src/__mocks__/notebook.ts +9 -9
- package/src/__tests__/branded.ts +20 -0
- package/src/components/app-config/user-config-form.tsx +5 -4
- package/src/components/data-table/__tests__/utils.test.ts +138 -1
- package/src/components/data-table/charts/__tests__/storage.test.ts +7 -7
- package/src/components/data-table/context-menu.tsx +9 -5
- package/src/components/data-table/data-table.tsx +3 -0
- package/src/components/data-table/range-focus/__tests__/atoms.test.ts +8 -2
- package/src/components/data-table/range-focus/__tests__/test-utils.ts +2 -0
- package/src/components/data-table/range-focus/__tests__/utils.test.ts +82 -8
- package/src/components/data-table/range-focus/atoms.ts +2 -2
- package/src/components/data-table/range-focus/utils.ts +50 -12
- package/src/components/data-table/types.ts +7 -0
- package/src/components/data-table/utils.ts +87 -0
- package/src/components/editor/__tests__/data-attributes.test.tsx +8 -8
- package/src/components/editor/ai/__tests__/completion-utils.test.ts +15 -15
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +2 -2
- package/src/components/editor/navigation/__tests__/selection.test.ts +7 -6
- package/src/components/editor/navigation/__tests__/state.test.ts +8 -7
- package/src/components/editor/output/MarimoErrorOutput.tsx +7 -7
- package/src/components/editor/output/__tests__/traceback.test.tsx +4 -4
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +4 -4
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +8 -1
- package/src/components/storage/storage-file-viewer.tsx +35 -1
- package/src/components/storage/storage-inspector.tsx +9 -4
- package/src/components/storage/storage-snippets.ts +3 -3
- package/src/components/tracing/tracing.tsx +3 -1
- package/src/components/ui/range-slider.tsx +108 -1
- package/src/core/ai/__tests__/staged-cells.test.ts +9 -8
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +31 -31
- package/src/core/ai/context/providers/__tests__/datasource.test.ts +3 -3
- package/src/core/ai/context/providers/__tests__/tables.test.ts +3 -2
- package/src/core/ai/context/providers/__tests__/variable.test.ts +84 -63
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +10 -9
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +6 -6
- package/src/core/ai/tools/edit-notebook-tool.ts +3 -3
- package/src/core/cells/__tests__/add-missing-import.test.ts +3 -3
- package/src/core/cells/__tests__/cells.test.ts +192 -135
- package/src/core/cells/__tests__/focus.test.ts +5 -4
- package/src/core/cells/__tests__/logs.test.ts +13 -12
- package/src/core/cells/__tests__/pending-delete-service.test.tsx +3 -3
- package/src/core/cells/__tests__/runs.test.ts +22 -21
- package/src/core/cells/__tests__/scrollCellIntoView.test.ts +8 -7
- package/src/core/cells/__tests__/session.test.ts +23 -22
- package/src/core/cells/cells.ts +1 -1
- package/src/core/cells/ids.ts +5 -5
- package/src/core/cells/logs.ts +2 -2
- package/src/core/cells/runs.ts +6 -8
- package/src/core/codemirror/__tests__/format.test.ts +34 -36
- package/src/core/codemirror/__tests__/setup.test.ts +2 -2
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +114 -0
- package/src/core/codemirror/cells/__tests__/traceback-decorations.test.ts +33 -32
- package/src/core/codemirror/cells/extensions.ts +66 -23
- package/src/core/codemirror/completion/__tests__/keymap.test.ts +15 -35
- package/src/core/codemirror/completion/keymap.ts +14 -4
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +12 -13
- package/src/core/codemirror/language/__tests__/utils.test.ts +3 -3
- package/src/core/codemirror/language/embedded/__tests__/embedded-python.test.ts +7 -8
- package/src/core/codemirror/language/languages/python.ts +4 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +4 -3
- package/src/core/codemirror/lsp/notebook-lsp.ts +28 -2
- package/src/core/codemirror/reactive-references/__tests__/analyzer.test.ts +7 -6
- package/src/core/codemirror/reactive-references/analyzer.ts +2 -2
- package/src/core/codemirror/rtc/loro/__tests__/sync.test.ts +52 -0
- package/src/core/codemirror/rtc/loro/sync.ts +1 -0
- package/src/core/datasets/__tests__/data-source.test.ts +5 -6
- package/src/core/datasets/state.ts +1 -1
- package/src/core/errors/__tests__/errors.test.ts +2 -1
- package/src/core/export/__tests__/hooks.test.ts +37 -36
- package/src/core/islands/main.ts +2 -7
- package/src/core/kernel/__tests__/handlers.test.ts +5 -4
- package/src/core/kernel/handlers.ts +7 -4
- package/src/core/network/DeferredRequestRegistry.ts +2 -2
- package/src/core/network/__tests__/CachingRequestRegistry.test.ts +9 -10
- package/src/core/network/__tests__/DeferredRequestRegistry.test.ts +4 -6
- package/src/core/static/__tests__/virtual-file-tracker.test.ts +8 -8
- package/src/core/static/virtual-file-tracker.ts +1 -1
- package/src/core/storage/__tests__/state.test.ts +31 -21
- package/src/core/storage/state.ts +1 -1
- package/src/core/variables/__tests__/state.test.ts +6 -6
- package/src/core/variables/types.ts +2 -2
- package/src/core/wasm/__tests__/state.test.ts +8 -8
- package/src/core/websocket/useMarimoKernelConnection.tsx +12 -15
- package/src/css/md-tooltip.css +4 -39
- package/src/css/md.css +7 -0
- package/src/plugins/core/RenderHTML.tsx +17 -0
- package/src/plugins/core/__test__/RenderHTML.test.ts +45 -0
- package/src/plugins/core/sanitize-html.ts +25 -18
- package/src/plugins/impl/DataTablePlugin.tsx +23 -2
- package/src/plugins/impl/SliderPlugin.tsx +1 -3
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +120 -0
- package/src/plugins/impl/anywidget/model.ts +1 -2
- package/src/stories/cell.stories.tsx +8 -8
- package/src/stories/layout/vertical/one-column.stories.tsx +9 -8
- package/src/stories/log-viewer.stories.tsx +8 -8
- package/src/stories/variables.stories.tsx +2 -2
- package/src/utils/__tests__/download.test.tsx +21 -20
- package/src/utils/copy.ts +18 -5
- package/src/utils/download.ts +4 -3
- package/src/utils/html-to-image.ts +6 -0
- package/src/utils/json/base64.ts +3 -3
- package/src/utils/traceback.ts +5 -3
- package/dist/assets/JsonOutput-DKXKGKvX.js +0 -46
- package/dist/assets/RenderHTML-DJ8khuob.js +0 -1
- package/dist/assets/ai-model-dropdown-DPTa_EpU.js +0 -5
- package/dist/assets/cell-editor-DX7IcqNr.js +0 -23
- package/dist/assets/channel-CkT8Qdo2.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-BhMT_rTz.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-D-F4WEyb.js +0 -1
- package/dist/assets/copy-YwM0Pd7v.js +0 -1
- package/dist/assets/dist-BTqMkf4j.js +0 -1
- package/dist/assets/dist-DHw9sXeN.js +0 -1
- package/dist/assets/dist-Du0qZeXz.js +0 -1
- package/dist/assets/dist-a0FfbvMD.js +0 -1
- package/dist/assets/dist-cfkfP0ni.js +0 -1
- package/dist/assets/dist-pzQ9JG-p.js +0 -1
- package/dist/assets/file-explorer-panel-CB8vF5ob.js +0 -26
- package/dist/assets/home-page-itW0tRmv.js +0 -4
- package/dist/assets/html-to-image-BnSc-Wa0.js +0 -2
- package/dist/assets/index-0n92c_W7.js +0 -38
- package/dist/assets/mermaid-4DMBBIKO-PoHnhmy8.js +0 -1
- package/dist/assets/react-vega-Da-Ps9UW.js +0 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CEqeIlM0.js +0 -1
- package/dist/assets/stex-BBWVYm-R.js +0 -1
- package/dist/assets/tracing-DUVd0jtl.js +0 -1
- package/dist/assets/tracing-panel-CuTxPn_x.js +0 -2
- /package/dist/assets/{Combination-Cs9nbinQ.js → Combination-CSPK4t6z.js} +0 -0
- /package/dist/assets/{Deferred-BMfCOLaw.js → Deferred-CfyqLOPG.js} +0 -0
- /package/dist/assets/{SSRProvider-DC7ElCZZ.js → SSRProvider-CwqN9FWV.js} +0 -0
- /package/dist/assets/{badge-hTpPIsMT.js → badge-DImLVznf.js} +0 -0
- /package/dist/assets/{blob-CObhN-9g.js → blob-DgooIGjS.js} +0 -0
- /package/dist/assets/{bot-message-square-CK6eoGWy.js → bot-message-square-Dw41U6lL.js} +0 -0
- /package/dist/assets/{chart-no-axes-column-DV8gdCvH.js → chart-no-axes-column-a9XtWmzk.js} +0 -0
- /package/dist/assets/{check-BE0hEwVo.js → check-DZA_bRpw.js} +0 -0
- /package/dist/assets/{chevron-right-D0GQBpTb.js → chevron-right-CvVxySQk.js} +0 -0
- /package/dist/assets/{circle-check-gLIOLu8x.js → circle-check-CbaVeozR.js} +0 -0
- /package/dist/assets/{circle-play-DYGULlKZ.js → circle-play-DYn5nR6N.js} +0 -0
- /package/dist/assets/{circle-plus-CGG-gArM.js → circle-plus-nCze0-py.js} +0 -0
- /package/dist/assets/{clipboard-paste-DoYSN8Sv.js → clipboard-paste-EHXeKq9D.js} +0 -0
- /package/dist/assets/{code-xml-DwHPF_nL.js → code-xml-BlrJCgNZ.js} +0 -0
- /package/dist/assets/{copy-CkudG0Ej.js → copy-D6N1-xc1.js} +0 -0
- /package/dist/assets/{database-zap-DTWCDKdn.js → database-zap-BIGMFOfP.js} +0 -0
- /package/dist/assets/{defaultLocale-DK1MWd7f.js → defaultLocale-CGfP-Ye3.js} +0 -0
- /package/dist/assets/{defaultLocale-OkOxlkkM.js → defaultLocale-CuYNS33t.js} +0 -0
- /package/dist/assets/{dist-8UD0A5sU.js → dist-BF9S272t.js} +0 -0
- /package/dist/assets/{dist-apDpadc4.js → dist-Bk1itfBD.js} +0 -0
- /package/dist/assets/{dist-CQqv2gQL.js → dist-Dm11d0_A.js} +0 -0
- /package/dist/assets/{download-DBW9RXtT.js → download-nLboiTtW.js} +0 -0
- /package/dist/assets/{ellipsis-0_zJdF6H.js → ellipsis-d7eaKIFn.js} +0 -0
- /package/dist/assets/{ellipsis-vertical-CAB7tdza.js → ellipsis-vertical-DBQ5kWTo.js} +0 -0
- /package/dist/assets/{emotion-is-prop-valid.esm-D1keIaYa.js → emotion-is-prop-valid.esm-D7FeWASw.js} +0 -0
- /package/dist/assets/{errors-Bfogio62.js → errors-0IrrdfSG.js} +0 -0
- /package/dist/assets/{extends-DRbCSry7.js → extends-aq1t6BkR.js} +0 -0
- /package/dist/assets/{eye-off-vwi9L975.js → eye-off-CF3GmvXV.js} +0 -0
- /package/dist/assets/{file-DzHkbIdO.js → file-C-yMeaec.js} +0 -0
- /package/dist/assets/{file-headphone-B5q2Ow55.js → file-headphone-CPAP8asn.js} +0 -0
- /package/dist/assets/{file-plus-corner-lLQw9OnR.js → file-plus-corner-ks__N1mr.js} +0 -0
- /package/dist/assets/{github-BVtI-3F1.js → github-CRD4USKm.js} +0 -0
- /package/dist/assets/{image-DXfkah9d.js → image-CfyJzBP9.js} +0 -0
- /package/dist/assets/{link-Cf10mh3t.js → link-_dbp0XNB.js} +0 -0
- /package/dist/assets/{maps-OKerBHH8.js → maps-DQsjfyTy.js} +0 -0
- /package/dist/assets/{numbers-CYnquDho.js → numbers-Cno6K0UF.js} +0 -0
- /package/dist/assets/{objectWithoutPropertiesLoose-DP4vAkvg.js → objectWithoutPropertiesLoose-Dxmp_Bd_.js} +0 -0
- /package/dist/assets/{ordinal-BjO5SoTk.js → ordinal-CMAUv8ku.js} +0 -0
- /package/dist/assets/{paths-D2lG83Oh.js → paths-BVwhPRFT.js} +0 -0
- /package/dist/assets/{play-DKSqmedg.js → play-Bu_0ogGD.js} +0 -0
- /package/dist/assets/{plus-dVmh0yTy.js → plus-DJ99CUbx.js} +0 -0
- /package/dist/assets/{preload-helper-BW0IMuFq.js → preload-helper-y72bE5iF.js} +0 -0
- /package/dist/assets/{prop-types-RrUi-pOT.js → prop-types-DRf51_gT.js} +0 -0
- /package/dist/assets/{purify.es-BBn8CPhf.js → purify.es-Cf8RQecB.js} +0 -0
- /package/dist/assets/{range-DNqFcYmr.js → range-ClqUI25v.js} +0 -0
- /package/dist/assets/{refresh-ccw-DLpfIr8v.js → refresh-ccw-DQ6SJ8UC.js} +0 -0
- /package/dist/assets/{refresh-cw-CHAHPgkx.js → refresh-cw-Dg9tCj4k.js} +0 -0
- /package/dist/assets/{rotate-ccw-hLlF_82X.js → rotate-ccw-BCkZViUZ.js} +0 -0
- /package/dist/assets/{save-8fSvKYJT.js → save-CUdcv5qm.js} +0 -0
- /package/dist/assets/{session-BrEm7qNv.js → session-CByuQ-M-.js} +0 -0
- /package/dist/assets/{settings-CzQUw9rV.js → settings-B7nhfCat.js} +0 -0
- /package/dist/assets/{spinner-C5JoisA7.js → spinner-pCogyRyo.js} +0 -0
- /package/dist/assets/{square-CxAsQQ77.js → square-KVNDGpgy.js} +0 -0
- /package/dist/assets/{square-function-B006EYFX.js → square-function-BMNCw7Qb.js} +0 -0
- /package/dist/assets/{stex-0ac7Aukl.js → stex-C6JeW1YI.js} +0 -0
- /package/dist/assets/{table-BCnp9gKC.js → table-Od8PbuV-.js} +0 -0
- /package/dist/assets/{toDate-BqKH-Jd9.js → toDate-Cfp9W_O9.js} +0 -0
- /package/dist/assets/{trash-2-CAoNMkjq.js → trash-2-Bc_J7TQO.js} +0 -0
- /package/dist/assets/{trash-BZMAQneW.js → trash-Cxd189Vw.js} +0 -0
- /package/dist/assets/{triangle-alert-qZo1ox6x.js → triangle-alert-CzLrbLGN.js} +0 -0
- /package/dist/assets/{types-C1RN112u.js → types-CLOMZuqU.js} +0 -0
- /package/dist/assets/{use-toast-Hc8CXlvz.js → use-toast-BtZldTi5.js} +0 -0
- /package/dist/assets/{useDebounce-B0dx2Gp0.js → useDebounce-DwTO_rGp.js} +0 -0
- /package/dist/assets/{useTheme-BYXBU1of.js → useTheme-KDW4sktg.js} +0 -0
- /package/dist/assets/{uuid-ClFZlR7U.js → uuid-BukULOeS.js} +0 -0
- /package/dist/assets/{workflow-BmeqNuSH.js → workflow-BqHyyStM.js} +0 -0
- /package/dist/assets/{x-BI1M8X_v.js → x-CdLP7-v3.js} +0 -0
- /package/dist/assets/{youtube-DE-Ej6FR.js → youtube-CfU-SnDw.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as I}from"./chunk-LvLJmgfZ.js";import{u as j}from"./useEvent-O0nX5vok.js";import{t as M}from"./react-Bj1aDYRI.js";import{S as H,it as S}from"./cells-
|
|
1
|
+
import{s as I}from"./chunk-LvLJmgfZ.js";import{u as j}from"./useEvent-O0nX5vok.js";import{t as M}from"./react-Bj1aDYRI.js";import{S as H,it as S}from"./cells-39RE4UzS.js";import{t as _}from"./compiler-runtime-B3qBwwSJ.js";import{m as k}from"./useEventListener-Dy81QR4n.js";import{t as $}from"./jsx-runtime-icT_Ltz2.js";import{t as x}from"./cn-BoaCR37F.js";import{t as B}from"./mode-D-iRbN9x.js";var L=_(),g=I(M(),1);function T(){return B()==="edit"?document.getElementById("App"):void 0}function O(t){let e=(0,L.c)(7),[r,a]=(0,g.useState)(void 0),[o,s]=(0,g.useState)(void 0),l=(0,g.useRef)(null),n=(0,g.useRef)(null),f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=new Map,e[0]=f):f=e[0];let u=(0,g.useRef)(f),i,m;e[1]===t?(i=e[2],m=e[3]):(i=()=>t.length===0?void 0:(l.current=new IntersectionObserver(d=>{let v=!1;if(d.forEach(p=>{let b=p.target;p.isIntersecting?(!n.current||b.getBoundingClientRect().top<n.current.getBoundingClientRect().top)&&(n.current=b,v=!0):b===n.current&&(n.current=null,v=!0)}),v&&n.current){let p=S(n.current);a("id"in p?p.id:p.path),s(u.current.get(n.current))}},{root:T(),rootMargin:"0px",threshold:0}),t.forEach(d=>{var v;if(d){let p=S(d[0]),b=t.map(D).filter(w=>"id"in p?w.id===p.id:w.textContent===d[0].textContent).indexOf(d[0]);u.current.set(d[0],b),(v=l.current)==null||v.observe(d[0])}}),()=>{l.current&&l.current.disconnect(),n.current=null}),m=[t],e[1]=t,e[2]=i,e[3]=m),(0,g.useEffect)(i,m);let c;return e[4]!==r||e[5]!==o?(c={activeHeaderId:r,activeOccurrences:o},e[4]=r,e[5]=o,e[6]=c):c=e[6],c}function D(t){let[e]=t;return e}function C(t){if(t.length===0)return[];let e=new Map;return t.map(r=>{let a="id"in r.by?r.by.id:r.by.path,o=e.get(a)??0;e.set(a,o+1);let s=N(r,o);return s?[s,a]:null}).filter(Boolean)}function E(t,e){let r=N(t,e);if(!r){k.warn("Could not find element for outline item",t);return}r.scrollIntoView({behavior:"smooth",block:"start"}),r.classList.add("outline-item-highlight"),setTimeout(()=>{r.classList.remove("outline-item-highlight")},3e3)}function N(t,e){return"id"in t.by?document.querySelectorAll(`[id="${CSS.escape(t.by.id)}"]`)[e]:document.evaluate(t.by.path,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}var y=_(),h=I($(),1);const A=()=>{let t=(0,y.c)(19),{items:e}=j(H),r;t[0]===e?r=t[1]:(r=C(e),t[0]=e,t[1]=r);let{activeHeaderId:a,activeOccurrences:o}=O(r),[s,l]=g.useState(!1);if(e.length<2)return null;let n,f,u;t[2]===Symbol.for("react.memo_cache_sentinel")?(n=()=>l(!0),f=()=>l(!1),u=x("fixed top-[25vh] right-8 z-10000 print:hidden","hidden md:block"),t[2]=n,t[3]=f,t[4]=u):(n=t[2],f=t[3],u=t[4]);let i=s?"-left-[280px] opacity-100":"left-[300px] opacity-0",m;t[5]===i?m=t[6]:(m=x("-top-4 max-h-[70vh] bg-background rounded-lg shadow-lg absolute overflow-auto transition-all duration-300 w-[300px] border",i),t[5]=i,t[6]=m);let c;t[7]!==a||t[8]!==o||t[9]!==e||t[10]!==m?(c=(0,h.jsx)(R,{className:m,items:e,activeHeaderId:a,activeOccurrences:o}),t[7]=a,t[8]=o,t[9]=e,t[10]=m,t[11]=c):c=t[11];let d;t[12]!==a||t[13]!==o||t[14]!==e?(d=(0,h.jsx)(P,{items:e,activeHeaderId:a,activeOccurrences:o}),t[12]=a,t[13]=o,t[14]=e,t[15]=d):d=t[15];let v;return t[16]!==c||t[17]!==d?(v=(0,h.jsxs)("div",{onMouseEnter:n,onMouseLeave:f,className:u,children:[c,d]}),t[16]=c,t[17]=d,t[18]=v):v=t[18],v},P=t=>{let e=(0,y.c)(8),{items:r,activeHeaderId:a,activeOccurrences:o}=t,s,l;if(e[0]!==a||e[1]!==o||e[2]!==r){let f=new Map;s="flex flex-col gap-4 items-end max-h-[70vh] overflow-hidden",l=r.map((u,i)=>{let m="id"in u.by?u.by.id:u.by.path,c=f.get(m)??0;return f.set(m,c+1),(0,h.jsx)("div",{className:x("h-[2px] bg-muted-foreground/60",u.level===1&&"w-5",u.level===2&&"w-4",u.level===3&&"w-3",u.level===4&&"w-2",c===o&&a===m&&"bg-foreground"),onClick:()=>E(u,c)},`${m}-${i}`)}),e[0]=a,e[1]=o,e[2]=r,e[3]=s,e[4]=l}else s=e[3],l=e[4];let n;return e[5]!==s||e[6]!==l?(n=(0,h.jsx)("div",{className:s,children:l}),e[5]=s,e[6]=l,e[7]=n):n=e[7],n},R=t=>{let e=(0,y.c)(11),{items:r,activeHeaderId:a,activeOccurrences:o,className:s}=t,l,n;if(e[0]!==a||e[1]!==o||e[2]!==s||e[3]!==r){let u=new Map;e[6]===s?l=e[7]:(l=x("flex flex-col overflow-auto py-4 pl-2",s),e[6]=s,e[7]=l),n=r.map((i,m)=>{let c="id"in i.by?i.by.id:i.by.path,d=u.get(c)??0;u.set(c,d+1);let v=`${c}-${m}`,p={className:x("px-2 py-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l",i.level===1&&"font-semibold",i.level===2&&"ml-3",i.level===3&&"ml-6",i.level===4&&"ml-9",d===o&&a===c&&"text-accent-foreground"),onClick:()=>E(i,d)};return i.html?(0,h.jsx)("div",{...p,dangerouslySetInnerHTML:{__html:i.html}},v):(0,h.jsx)("div",{...p,children:i.name},v)}),e[0]=a,e[1]=o,e[2]=s,e[3]=r,e[4]=l,e[5]=n}else l=e[4],n=e[5];let f;return e[8]!==l||e[9]!==n?(f=(0,h.jsx)("div",{className:l,children:n}),e[8]=l,e[9]=n,e[10]=f):f=e[10],f};export{O as i,R as n,C as r,A as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var P1;import"./purify.es-
|
|
1
|
+
var P1;import"./purify.es-Cf8RQecB.js";import{u as m1}from"./src-Bp_72rVO.js";import{c as et,g as st}from"./chunk-S3R3BYOJ-CSHQgcuP.js";import{n as k,r as Z}from"./src-CW27-Kjl.js";import{$ as Yt,B as Ht,C as Xt,H as Mt,U as qt,_ as Qt,a as Zt,b as p1,s as Jt,u as te,v as ee,z as se}from"./chunk-ABZYJK2D-DXJ7hnjx.js";import{t as ie}from"./channel-D1wPYhc9.js";import{n as re,t as ue}from"./chunk-MI3HLSF2-BceZdyTR.js";import"./chunk-HN2XXSSU-BstCPYtG.js";import"./chunk-CVBHYZKI-BmNXddyI.js";import"./chunk-ATLVNIR6-CTEqcLEc.js";import"./dist-COnmrAVZ.js";import"./chunk-JA3XYJ7Z-CGd7jja_.js";import{o as ne}from"./chunk-JZLCHNYA-CqY-RYTj.js";import"./chunk-QXUST7PY-CRO5kYCE.js";import{r as oe,t as ae}from"./chunk-N4CR4FBY-aUDjVzN7.js";import{t as le}from"./chunk-FMBD7UC4-BF_CXOnN.js";import{t as ce}from"./chunk-55IACEB6-D0TKhzEY.js";import{t as he}from"./chunk-QN33PNHL-DHnCb5-U.js";var de="flowchart-",pe=(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=Ht,this.setAccDescription=se,this.setDiagramTitle=qt,this.getAccTitle=ee,this.getAccDescription=Qt,this.getDiagramTitle=Xt,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(let r of this.vertices.values())if(r.id===i)return r.domId;return i}addVertex(i,r,u,o,n,g,p={},c){var z,f;if(!i||i.trim().length===0)return;let a;if(c!==void 0){let d;d=c.includes(`
|
|
2
2
|
`)?c+`
|
|
3
3
|
`:`{
|
|
4
4
|
`+c+`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as s,u as C}from"./useEvent-O0nX5vok.js";import{b as d}from"./cells-
|
|
1
|
+
import{p as s,u as C}from"./useEvent-O0nX5vok.js";import{b as d}from"./cells-39RE4UzS.js";import{t as m}from"./createReducer-Drh7NmIR.js";function p(){return{focusedCellId:null,lastFocusedCellId:null}}var{reducer:w,createActions:V,valueAtom:a,useActions:g}=m(p,{focusCell:(l,e)=>({...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId}),toggleCell:(l,e)=>l.focusedCellId===e.cellId?{...l,focusedCellId:null}:{...l,focusedCellId:e.cellId,lastFocusedCellId:e.cellId},blurCell:l=>({...l,focusedCellId:null})});const c=s(l=>l(a).lastFocusedCellId);function F(){return C(c)}const _=s(l=>{let e=l(c);return!e||e==="__scratch__"?null:r(e,l(d))});function h(l){return s(e=>r(l,e(d)))}function r(l,e){var o;let{cellData:i,cellHandles:f,cellRuntime:I}=e,u=i[l],t=I[l],n=(o=f[l])==null?void 0:o.current;return!u||!n?null:{cellId:l,name:u.name,config:u.config,status:t?t.status:"idle",getEditorView:()=>n.editorView,hasOutput:(t==null?void 0:t.output)!=null,hasConsoleOutput:(t==null?void 0:t.consoleOutputs)!=null}}export{g as a,c as i,h as n,F as o,_ as r,a as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{s as Ge}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-Bj1aDYRI.js";import{Qn as wr,Tt as Nr,q as ze}from"./cells-fq1RMGX_.js";import{_ as Te,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Je,y as Oe}from"./zod-H_cgTO0M.js";import{t as fe}from"./compiler-runtime-B3qBwwSJ.js";import{c as Ar,h as Vr,m as Er,r as Ae}from"./useEventListener-Dy81QR4n.js";import{t as Pr}from"./jsx-runtime-icT_Ltz2.js";import{r as Lr,t as Be}from"./button-Ej3vmCIF.js";import{t as q}from"./cn-BoaCR37F.js";import{t as $r}from"./createLucideIcon-Cm-Z7dYr.js";import{t as qr}from"./check-BE0hEwVo.js";import{r as Ir}from"./x-BI1M8X_v.js";import{M as Mr,N as Ke,P as Fr,j as Dr}from"./dropdown-menu-DdPu5Kfu.js";import{t as Gr}from"./plus-dVmh0yTy.js";import{t as zr}from"./refresh-ccw-DLpfIr8v.js";import{n as Tr,t as Ve}from"./input-CUwqpKjd.js";import{_ as Jr,a as Ue,c as A,d as V,f as S,g as Br,p as E,s as P,u as R,x as Kr}from"./azure-BTXHztTw.js";import{t as Ur}from"./trash-2-CAoNMkjq.js";import{t as Zr}from"./badge-hTpPIsMT.js";import{E as Ze,S as Ee,_ as xe,w as Pe,x as Hr}from"./Combination-Cs9nbinQ.js";import{c as Qr,i as He,l as Wr,m as Xr,n as Yr,r as ea,s as ra,t as aa}from"./select-CxT2Geqr.js";import{l as ta}from"./dist-DJBpXGro.js";import{t as sa}from"./tooltip-D9723Brr.js";import{u as na}from"./menu-items-UxKrm8hS.js";import{i as la,r as oa,t as ia}from"./popover-BPGG2gPG.js";import{a as ca,o as da,r as ua,s as ma,t as pa}from"./command-rfxSsiHU.js";import{t as ha}from"./label-TNNaT1M9.js";import{t as fa}from"./toggle-RCwU-rnE.js";var xa=$r("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),Qe=fe(),w=Ge(yr(),1),a=Ge(Pr(),1);const We=(0,w.createContext)({isSelected:()=>!1,onSelect:Vr.NOOP}),Le=t=>{let e=(0,Qe.c)(94),r,n,l,o,i,d,p,s,c,u,h,f,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],n=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],s=e[8],c=e[9],u=e[10],h=e[11],f=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:h,multiple:g,shouldFilter:v,filterFn:p,open:f,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:n,keepPopoverOpenOnSelect:s,...j}=t,e[0]=t,e[1]=r,e[2]=n,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=s,e[9]=c,e[10]=u,e[11]=h,e[12]=f,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,I=v===void 0?!0:v,M=y===void 0?"Search...":y,ne=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==f||e[24]!==ye?(oe={prop:f,defaultProp:ye,onChange:c},e[22]=c,e[23]=f,e[24]=ye,e[25]=oe):oe=e[25];let[Fe,G]=Ee(oe),z=Fe===void 0?!1:Fe,T;e[26]===h?T=e[27]:(T=_=>{h==null||h(_)},e[26]=h,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==s||e[35]!==k||e[36]!==G||e[37]!==we||e[38]!==b?(de=_=>{let F=_;if(k)if(Array.isArray(b))if(b.includes(F)){let De=b.filter(br=>br!==_);F=De.length>0?De:[]}else F=[...b,F];else F=[F];else b===_&&(F=null);we(F),(s??k)||G(!1)},e[34]=s,e[35]=k,e[36]=G,e[37]=we,e[38]=b,e[39]=de):de=e[39];let J=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=q("relative"),e[46]=me):me=e[46];let B;e[47]===l?B=e[48]:(B=q("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=B);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(Ir,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==B||e[56]!==U?(Z=(0,a.jsx)(la,{asChild:!0,children:(0,a.jsxs)("div",{className:B,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=B,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==M||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ca,{placeholder:M,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=M,e[59]=u,e[60]=x,e[61]=H):H=e[61];let Q;e[62]===ne?Q=e[63]:(Q=(0,a.jsx)(ua,{children:ne}),e[62]=ne,e[63]=Q);let W;e[64]!==J||e[65]!==Ne?(W={isSelected:Ne,onSelect:J},e[64]=J,e[65]=Ne,e[66]=W):W=e[66];let X;e[67]!==r||e[68]!==W?(X=(0,a.jsx)(We,{value:W,children:r}),e[67]=r,e[68]=W,e[69]=X):X=e[69];let Y;e[70]!==Q||e[71]!==X?(Y=(0,a.jsxs)(ma,{className:"max-h-60 py-.5",children:[Q,X]}),e[70]=Q,e[71]=X,e[72]=Y):Y=e[72];let ee;e[73]!==p||e[74]!==I||e[75]!==H||e[76]!==Y?(ee=(0,a.jsx)(oa,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(pa,{filter:p,shouldFilter:I,children:[H,Y]})}),e[73]=p,e[74]=I,e[75]=H,e[76]=Y,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==G||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(ia,{open:z,onOpenChange:G,children:[Z,ee]}),e[78]=z,e[79]=G,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==n||e[85]!==d||e[86]!==J||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:q("flex flex-col gap-1 items-start",n),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(Zr,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(wr,{onClick:()=>{J(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=n,e[85]=d,e[86]=J,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let he;return e[90]!==j||e[91]!==re||e[92]!==ae?(he=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=he):he=e[93],he},je=w.forwardRef((t,e)=>{let r=(0,Qe.c)(17),{children:n,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),s=w.use(We),c;r[0]===l?c=r[1]:(c=q("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==s||r[3]!==i||r[4]!==o?(u=()=>{s.onSelect(o),i==null||i(o)},r[2]=s,r[3]=i,r[4]=o,r[5]=u):u=r[5];let h;r[6]!==s||r[7]!==o?(h=s.isSelected(o)&&(0,a.jsx)(qr,{className:"absolute left-1 h-4 w-4"}),r[6]=s,r[7]=o,r[8]=h):h=r[8];let f;return r[9]!==n||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==h||r[15]!==p?(f=(0,a.jsxs)(da,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[h,n]}),r[9]=n,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=h,r[15]=p,r[16]=f):f=r[16],f});je.displayName="ComboboxItem";const D={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function Xe(){return Math.floor(Math.random()*1e5)}var $e="Radio",[ja,Ye]=Ze($e),[va,ga]=ja($e),er=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:n,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:s,...c}=t,[u,h]=w.useState(null),f=Ae(e,x=>h(x)),m=w.useRef(!1),j=u?s||!!u.closest("form"):!0;return(0,a.jsxs)(va,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":sr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:f,onClick:Pe(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(tr,{control:u,bubbles:!m.current,name:n,value:d,checked:l,required:o,disabled:i,form:s,style:{transform:"translateX(-100%)"}})]})});er.displayName=$e;var rr="RadioIndicator",ar=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:n,...l}=t,o=ga(rr,r);return(0,a.jsx)(Hr,{present:n||o.checked,children:(0,a.jsx)(xe.span,{"data-state":sr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});ar.displayName=rr;var ba="RadioBubbleInput",tr=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:n=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=Xr(r),s=ta(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&h){let f=new Event("click",{bubbles:n});h.call(c,r),c.dispatchEvent(f)}},[p,r,n]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tr.displayName=ba;function sr(t){return t?"checked":"unchecked"}var ya=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ve="RadioGroup",[wa,ft]=Ze(ve,[Ke,Ye]),nr=Ke(),lr=Ye(),[Na,Ca]=wa(ve),or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:n,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:s,loop:c=!0,onValueChange:u,...h}=t,f=nr(r),m=na(s),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:ve});return(0,a.jsx)(Na,{scope:r,name:n,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(Mr,{asChild:!0,...f,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...h,ref:e})})})});or.displayName=ve;var ir="RadioGroupItem",cr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:n,...l}=t,o=Ca(ir,r),i=o.disabled||n,d=nr(r),p=lr(r),s=w.useRef(null),c=Ae(e,s),u=o.value===l.value,h=w.useRef(!1);return w.useEffect(()=>{let f=j=>{ya.includes(j.key)&&(h.current=!0)},m=()=>h.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Dr,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(er,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Pe(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Pe(l.onFocus,()=>{var f;h.current&&((f=s.current)==null||f.click())})})})});cr.displayName=ir;var ka="RadioGroupIndicator",dr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...n}=t;return(0,a.jsx)(ar,{...lr(r),...n,ref:e})});dr.displayName=ka;var ur=or,mr=cr,Sa=dr,pr=fe(),qe=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),n,l;r[0]===t?(n=r[1],l=r[2]):({className:n,...l}=t,r[0]=t,r[1]=n,r[2]=l);let o;r[3]===n?o=r[4]:(o=q("grid gap-2",n),r[3]=n,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ur,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});qe.displayName=ur.displayName;var Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),n,l;if(r[0]!==t){let{className:p,children:s,...c}=t;n=p,l=c,r[0]=t,r[1]=n,r[2]=l}else n=r[1],l=r[2];let o;r[3]===n?o=r[4]:(o=q("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",n),r[3]=n,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Sa,{className:"flex items-center justify-center",children:(0,a.jsx)(Fr,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(mr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});Ie.displayName=mr.displayName;function _a(t){return t instanceof Re.ZodArray}function hr(t){return t instanceof Re.ZodPipe}function Ra(t){return t instanceof Re.ZodTuple}function fr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let n=[...r.values];return r.values.size===1?n[0]:n}if(r instanceof Je){let n=r.def.defaultValue;return typeof n=="function"?n():n}if(hr(r))return e(r.in);if(Ra(r))return r.def.items.map(n=>e(n));if("unwrap"in r)return e(fr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):_a(t)?Oa(t)?[ge(t.element)]:[]:t instanceof Te?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,n])=>[r,e(n)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Er.warn(t),Error("Invalid schema")}function Oa(t){return!t.safeParse([]).success}var xr=fe(),jr=`
|
|
2
|
-
`;const vr=t=>{let e=(0,xr.c)(24),{value:r,options:n,onChange:l,className:o,placeholder:i,textAreaClassName:d,comboBoxClassName:p}=t,[s,c]=(0,w.useState)(!1),u;e[0]===r?u=e[1]:(u=be(r),e[0]=r,e[1]=u);let h=u,f;e[2]!==p||e[3]!==l||e[4]!==n||e[5]!==i||e[6]!==s||e[7]!==d||e[8]!==h?(f=()=>s?(0,a.jsx)(Me,{value:h,className:d,onChange:l,placeholder:i?`${i}: one per line`:"One value per line"}):(0,a.jsx)(Le,{placeholder:i,displayValue:Aa,className:q("w-full max-w-[400px]",p),multiple:!0,value:h,onValueChange:l,keepPopoverOpenOnSelect:!0,chips:!0,chipsClassName:"flex-row flex-wrap min-w-[210px]",children:n.map(Va)}),e[2]=p,e[3]=l,e[4]=n,e[5]=i,e[6]=s,e[7]=d,e[8]=h,e[9]=f):f=e[9];let m=f,j;e[10]===o?j=e[11]:(j=q("flex gap-1",o),e[10]=o,e[11]=j);let x;e[12]===m?x=e[13]:(x=m(),e[12]=m,e[13]=x);let g=s?"Switch to multi-select":"Switch to textarea",v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Kr,{className:"w-3 h-3"}),e[14]=v):v=e[14];let y;e[15]===s?y=e[16]:(y=(0,a.jsx)(fa,{size:"xs",onPressedChange:c,pressed:s,children:v}),e[15]=s,e[16]=y);let N;e[17]!==g||e[18]!==y?(N=(0,a.jsx)(sa,{content:g,children:y}),e[17]=g,e[18]=y,e[19]=N):N=e[19];let C;return e[20]!==j||e[21]!==x||e[22]!==N?(C=(0,a.jsxs)("div",{className:j,children:[x,N]}),e[20]=j,e[21]=x,e[22]=N,e[23]=C):C=e[23],C},Me=t=>{let e=(0,xr.c)(11),{className:r,value:n,onChange:l,placeholder:o}=t,i,d;if(e[0]!==n){let u=be(n);i=Ue,d=u.join(jr),e[0]=n,e[1]=i,e[2]=d}else i=e[1],d=e[2];let p;e[3]===l?p=e[4]:(p=u=>{if(u.target.value===""){l([]);return}l(u.target.value.split(jr))},e[3]=l,e[4]=p);let s=o?`${o}: one per line`:"One value per line",c;return e[5]!==i||e[6]!==r||e[7]!==d||e[8]!==p||e[9]!==s?(c=(0,a.jsx)(i,{value:d,className:r,rows:4,onChange:p,placeholder:s}),e[5]=i,e[6]=r,e[7]=d,e[8]=p,e[9]=s,e[10]=c):c=e[10],c};function be(t){return t==null?[]:Array.isArray(t)?t:[t].filter(e=>e!=null||e!=="")}function Aa(t){return t}function Va(t){return(0,a.jsx)(je,{value:t,children:t},t)}var se=fe();const Ea=t=>{let e=(0,se.c)(11),{schema:r,form:n,path:l,renderers:o,children:i}=t,d=l===void 0?"":l,p;e[0]===o?p=e[1]:(p=o===void 0?[]:o,e[0]=o,e[1]=p);let s=p,c;e[2]!==n||e[3]!==d||e[4]!==s||e[5]!==r?(c=L(r,n,d,s),e[2]=n,e[3]=d,e[4]=s,e[5]=r,e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==n||e[9]!==c?(u=(0,a.jsxs)(Br,{...n,children:[i,c]}),e[7]=i,e[8]=n,e[9]=c,e[10]=u):u=e[10],u};function L(t,e,r,n){for(let s of n){let{isMatch:c,Component:u}=s;if(c(t))return(0,a.jsx)(u,{schema:t,form:e,path:r})}let{label:l,description:o,special:i,direction:d="column",minLength:p}=D.parse(t.description||"");if(t instanceof Je){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof kr){let s=t.unwrap();return s=!s.description&&t.description?s.describe(t.description):s,L(s,e,r,n)}if(t instanceof _e)return(0,a.jsxs)("div",{className:q("flex",d==="row"?"flex-row gap-6 items-start":d==="two-columns"?"grid grid-cols-2 gap-y-6":"flex-col gap-6"),children:[(0,a.jsx)(S,{children:l}),Ar.entries(t.shape).map(([s,c])=>{let u=c instanceof le,h=L(c,e,Ia(r,s),n);return u?(0,a.jsx)(w.Fragment,{children:h},s):(0,a.jsx)("div",{className:"flex flex-row align-start",children:h},s)})]});if(t instanceof Te)return i==="time"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(Ve,{...s,onValueChange:s.onChange,type:"time",className:"my-0"})}),(0,a.jsx)(E,{})]})}):(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Cr)return(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(V,{children:[(0,a.jsxs)("div",{className:"flex flex-row items-start space-x-2",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(Nr,{"data-testid":"marimo-plugin-data-frames-boolean-checkbox",checked:s.value,onCheckedChange:s.onChange})})]}),(0,a.jsx)(E,{})]})});if(t instanceof _r)return i==="random_number_button"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-random-number-button",variant:"secondary",onClick:()=>{s.onChange(Xe())},children:[(0,a.jsx)(zr,{className:"w-3.5 h-3.5 mr-1"}),l]})}):(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(Tr,{...s,className:"my-0",onValueChange:s.onChange})}),(0,a.jsx)(E,{})]})});if(t instanceof Sr){let s=i==="datetime"?"datetime-local":i==="time"?"time":"date";return(0,a.jsx)(R,{control:e.control,name:r,render:({field:c})=>(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(Ve,{...c,onValueChange:c.onChange,type:s,className:"my-0"})}),(0,a.jsx)(E,{})]})})}if(t instanceof Rr)return(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Se)return(0,a.jsx)($a,{schema:t,form:e,path:r,options:t.options.map(s=>s.toString())});if(t instanceof Or){if(i==="text_area_multiline")return(0,a.jsx)(La,{schema:t,form:e,path:r});let s=t.element;return s instanceof Se?(0,a.jsx)(qa,{schema:t,form:e,path:r,itemLabel:l,options:s.options.map(c=>c.toString())}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(ha,{children:l}),(0,a.jsx)(Pa,{schema:t.element,form:e,path:r,minLength:p,renderers:n},r)]})}if(t instanceof ke){let s=t.def,c=s.options,u=s.discriminator,h=f=>c.find(m=>te(m).value===f);return(0,a.jsx)(R,{control:e.control,name:r,render:({field:f})=>{let m=f.value,j=c.map(v=>te(v).value),x=m&&typeof m=="object"&&u in m?m[u]:j[0],g=h(x);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)("div",{className:"flex border-b mb-4 -mt-2",children:j.map(v=>(0,a.jsx)("button",{type:"button",className:`px-4 py-2 ${x===v?"border-b-2 border-primary font-medium":"text-muted-foreground"}`,onClick:()=>{let y=h(v);y?f.onChange(ge(y)):f.onChange({[u]:v})},children:v},v))}),(0,a.jsx)("div",{className:"flex flex-col",children:g&&L(g,e,r,n)},x)]})}})}return t instanceof Oe?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>{let c=t.options,u=s.value,h=c.map(m=>te(m).value);u||(u=h[0]);let f=c.find(m=>te(m).value===u);return(0,a.jsxs)("div",{className:"flex flex-col mb-4 gap-1",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(Wr,{"data-testid":"marimo-plugin-data-frames-union-select",...s,children:h.map(m=>(0,a.jsx)("option",{value:m,children:m},m))}),f&&L(f,e,r,n)]})}}):t instanceof le?(0,a.jsx)(R,{control:e.control,name:r,render:({field:s})=>(0,a.jsx)("input",{...s,type:"hidden",value:String([...t.values][0]??"")})}):"unwrap"in t?L(fr(t),e,r,n):hr(t)?L(t.in,e,r,n):(0,a.jsxs)("div",{children:["Unknown schema type"," ",t==null?r:JSON.stringify(t.type??t)]})}var Pa=t=>{let e=(0,se.c)(39),{schema:r,form:n,path:l,minLength:o,renderers:i}=t,d;e[0]===r.description?d=e[1]:(d=D.parse(r.description||""),e[0]=r.description,e[1]=d);let{label:p,description:s}=d,c=n.control,u;e[2]!==c||e[3]!==l?(u={control:c,name:l},e[2]=c,e[3]=l,e[4]=u):u=e[4];let{fields:h,append:f,remove:m}=Jr(u),j=o!=null&&h.length<o,x=o==null||h.length>o,g;e[5]===p?g=e[6]:(g=(0,a.jsx)(S,{children:p}),e[5]=p,e[6]=g);let v;e[7]===s?v=e[8]:(v=(0,a.jsx)(A,{children:s}),e[7]=s,e[8]=v);let y;if(e[9]!==x||e[10]!==h||e[11]!==n||e[12]!==l||e[13]!==m||e[14]!==i||e[15]!==r){let M;e[17]!==x||e[18]!==n||e[19]!==l||e[20]!==m||e[21]!==i||e[22]!==r?(M=(ne,$)=>(0,a.jsxs)("div",{className:"flex flex-row pl-2 ml-2 border-l-2 border-disabled hover-actions-parent relative pr-5 pt-1 items-center w-fit",onKeyDown:Lr.onEnter(Ma),children:[L(r,n,`${l}[${$}]`,i),x&&(0,a.jsx)(Ur,{className:"w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",onClick:()=>{m($)}})]},ne.id),e[17]=x,e[18]=n,e[19]=l,e[20]=m,e[21]=i,e[22]=r,e[23]=M):M=e[23],y=h.map(M),e[9]=x,e[10]=h,e[11]=n,e[12]=l,e[13]=m,e[14]=i,e[15]=r,e[16]=y}else y=e[16];let N;e[24]!==j||e[25]!==o?(N=j&&(0,a.jsx)("div",{className:"text-destructive text-xs font-semibold",children:(0,a.jsxs)("div",{children:["At least ",o," required."]})}),e[24]=j,e[25]=o,e[26]=N):N=e[26];let C;e[27]!==f||e[28]!==r?(C=()=>{f(ge(r))},e[27]=f,e[28]=r,e[29]=C):C=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(Gr,{className:"w-3.5 h-3.5 mr-1"}),e[30]=O):O=e[30];let k;e[31]===C?k=e[32]:(k=(0,a.jsx)("div",{children:(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-add-array-item",variant:"text",className:"hover:text-accent-foreground",onClick:C,children:[O,"Add"]})}),e[31]=C,e[32]=k);let I;return e[33]!==g||e[34]!==v||e[35]!==y||e[36]!==N||e[37]!==k?(I=(0,a.jsxs)("div",{className:"flex flex-col gap-2 min-w-[220px]",children:[g,v,y,N,k]}),e[33]=g,e[34]=v,e[35]=y,e[36]=N,e[37]=k,e[38]=I):I=e[38],I},gr=t=>{let e=(0,se.c)(21),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=D.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p,disabled:s,inputType:c}=o;if(c==="textarea"){let f;e[2]!==d||e[3]!==s||e[4]!==i||e[5]!==p?(f=j=>{let{field:x}=j;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(P,{children:(0,a.jsx)(Ue,{...x,value:x.value,onChange:x.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=s,e[4]=i,e[5]=p,e[6]=f):f=e[6];let m;return e[7]!==n.control||e[8]!==l||e[9]!==f?(m=(0,a.jsx)(R,{control:n.control,name:l,render:f}),e[7]=n.control,e[8]=l,e[9]=f,e[10]=m):m=e[10],m}let u;e[11]!==d||e[12]!==s||e[13]!==c||e[14]!==i||e[15]!==p?(u=f=>{let{field:m}=f;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(P,{children:(0,a.jsx)(Ve,{...m,type:c,value:m.value,onValueChange:m.onChange,className:"my-0",placeholder:p,disabled:s})}),(0,a.jsx)(E,{})]})},e[11]=d,e[12]=s,e[13]=c,e[14]=i,e[15]=p,e[16]=u):u=e[16];let h;return e[17]!==n.control||e[18]!==l||e[19]!==u?(h=(0,a.jsx)(R,{control:n.control,name:l,render:u}),e[17]=n.control,e[18]=l,e[19]=u,e[20]=h):h=e[20],h},La=t=>{let e=(0,se.c)(10),{schema:r,form:n,path:l}=t,o;e[0]===r.description?o=e[1]:(o=D.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p}=o,s;e[2]!==d||e[3]!==i||e[4]!==p?(s=u=>{let{field:h}=u;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(P,{children:(0,a.jsx)(Me,{...h,placeholder:p})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=i,e[4]=p,e[5]=s):s=e[5];let c;return e[6]!==n.control||e[7]!==l||e[8]!==s?(c=(0,a.jsx)(R,{control:n.control,name:l,render:s}),e[6]=n.control,e[7]=l,e[8]=s,e[9]=c):c=e[9],c},$a=t=>{let e=(0,se.c)(22),{schema:r,form:n,path:l,options:o,textTransform:i}=t,d;e[0]===r.description?d=e[1]:(d=D.parse(r.description),e[0]=r.description,e[1]=d);let{label:p,description:s,disabled:c,special:u}=d;if(u==="radio_group"){let m;e[2]!==s||e[3]!==p||e[4]!==o||e[5]!==l?(m=x=>{let{field:g}=x;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(P,{children:(0,a.jsx)(qe,{className:"flex flex-row gap-2 pt-1 items-center",value:g.value,onValueChange:g.onChange,children:o.map(v=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(Ie,{value:v,id:`${l}-${v}`},v),(0,a.jsx)(S,{className:"whitespace-pre",htmlFor:`${l}-${v}`,children:ze.startCase(v)})]},v))})}),(0,a.jsx)(E,{})]})},e[2]=s,e[3]=p,e[4]=o,e[5]=l,e[6]=m):m=e[6];let j;return e[7]!==c||e[8]!==n.control||e[9]!==l||e[10]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:m}),e[7]=c,e[8]=n.control,e[9]=l,e[10]=m,e[11]=j):j=e[11],j}let h;e[12]!==s||e[13]!==p||e[14]!==o||e[15]!==i?(h=m=>{let{field:j}=m;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:p}),(0,a.jsx)(A,{children:s}),(0,a.jsx)(P,{children:(0,a.jsxs)(aa,{"data-testid":"marimo-plugin-data-frames-select",value:j.value,onValueChange:j.onChange,children:[(0,a.jsx)(ra,{className:"min-w-[180px]",children:(0,a.jsx)(Qr,{placeholder:"--"})}),(0,a.jsx)(Yr,{children:(0,a.jsxs)(ea,{children:[o.map(x=>(0,a.jsx)(He,{value:x,children:(i==null?void 0:i(x))??x},x)),o.length===0&&(0,a.jsx)(He,{disabled:!0,value:"--",children:"No options"})]})})]})}),(0,a.jsx)(E,{})]})},e[12]=s,e[13]=p,e[14]=o,e[15]=i,e[16]=h):h=e[16];let f;return e[17]!==c||e[18]!==n.control||e[19]!==l||e[20]!==h?(f=(0,a.jsx)(R,{control:n.control,name:l,disabled:c,render:h}),e[17]=c,e[18]=n.control,e[19]=l,e[20]=h,e[21]=f):f=e[21],f},qa=t=>{let e=(0,se.c)(15),{schema:r,form:n,path:l,options:o,itemLabel:i,showSwitchable:d}=t,p;e[0]===r.description?p=e[1]:(p=D.parse(r.description),e[0]=r.description,e[1]=p);let{label:s,description:c,placeholder:u}=p,h;e[2]!==i||e[3]!==u?(h=u??(i?`Select ${i==null?void 0:i.toLowerCase()}`:void 0),e[2]=i,e[3]=u,e[4]=h):h=e[4];let f=h,m;e[5]!==c||e[6]!==s||e[7]!==o||e[8]!==f||e[9]!==d?(m=x=>{let{field:g}=x,v=be(g.value);return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:s}),(0,a.jsx)(A,{children:c}),(0,a.jsx)(P,{children:d?(0,a.jsx)(vr,{...g,value:v,options:o,placeholder:f}):(0,a.jsx)(Le,{className:"min-w-[180px]",placeholder:f,displayValue:Fa,multiple:!0,chips:!0,keepPopoverOpenOnSelect:!0,value:v,onValueChange:g.onChange,children:o.map(Da)})}),(0,a.jsx)(E,{})]})},e[5]=c,e[6]=s,e[7]=o,e[8]=f,e[9]=d,e[10]=m):m=e[10];let j;return e[11]!==n.control||e[12]!==l||e[13]!==m?(j=(0,a.jsx)(R,{control:n.control,name:l,render:m}),e[11]=n.control,e[12]=l,e[13]=m,e[14]=j):j=e[14],j};function Ia(...t){return t.filter(e=>e!=="").join(".")}function Ma(t){return t.preventDefault()}function Fa(t){return ze.startCase(t)}function Da(t){return(0,a.jsx)(je,{value:t,children:t},t)}export{be as a,qe as c,Xe as d,Le as f,Me as i,Ie as l,xa as m,L as n,ge as o,je as p,vr as r,te as s,Ea as t,D as u};
|
|
1
|
+
import{s as Ge}from"./chunk-LvLJmgfZ.js";import{t as yr}from"./react-Bj1aDYRI.js";import{Tt as wr,er as Nr,q as ze}from"./cells-39RE4UzS.js";import{_ as Te,c as Cr,d as ke,f as Se,g as kr,h as _e,l as Sr,m as _r,o as Rr,p as le,s as Or,t as Re,u as Je,y as Oe}from"./zod-H_cgTO0M.js";import{t as fe}from"./compiler-runtime-B3qBwwSJ.js";import{c as Ar,h as Vr,m as Er,r as Ae}from"./useEventListener-Dy81QR4n.js";import{t as Pr}from"./jsx-runtime-icT_Ltz2.js";import{r as Lr,t as Be}from"./button-Ej3vmCIF.js";import{t as q}from"./cn-BoaCR37F.js";import{t as $r}from"./createLucideIcon-Cm-Z7dYr.js";import{t as qr}from"./check-DZA_bRpw.js";import{r as Ir}from"./x-CdLP7-v3.js";import{M as Mr,N as Ke,P as Fr,j as Dr}from"./dropdown-menu-BehqiLFL.js";import{t as Gr}from"./plus-DJ99CUbx.js";import{t as zr}from"./refresh-ccw-DQ6SJ8UC.js";import{n as Tr,t as Ve}from"./input-CN1ZeRYm.js";import{_ as Jr,a as Ue,c as A,d as V,f as S,g as Br,p as E,s as P,u as R,x as Kr}from"./azure-Dw5gKmUz.js";import{t as Ur}from"./trash-2-Bc_J7TQO.js";import{t as Zr}from"./badge-DImLVznf.js";import{E as Ze,S as Ee,_ as xe,w as Pe,x as Hr}from"./Combination-CSPK4t6z.js";import{c as Wr,i as He,l as Xr,m as Yr,n as Qr,r as ea,s as ra,t as aa}from"./select-Cnd3vm9n.js";import{l as ta}from"./dist-6P6vjf93.js";import{t as na}from"./tooltip-CR_izE8Q.js";import{u as sa}from"./menu-items-BpHXKv51.js";import{i as la,r as oa,t as ia}from"./popover-Bvoif-Mg.js";import{a as ca,o as da,r as ua,s as ma,t as pa}from"./command-DmzEbs6L.js";import{t as ha}from"./label-TNNaT1M9.js";import{t as fa}from"./toggle-C_gNjXg8.js";var xa=$r("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),We=fe(),w=Ge(yr(),1),a=Ge(Pr(),1);const Xe=(0,w.createContext)({isSelected:()=>!1,onSelect:Vr.NOOP}),Le=t=>{let e=(0,We.c)(94),r,s,l,o,i,d,p,n,c,u,h,f,m,j,x,g,v,y,N,C,O;e[0]===t?(r=e[1],s=e[2],l=e[3],o=e[4],i=e[5],d=e[6],p=e[7],n=e[8],c=e[9],u=e[10],h=e[11],f=e[12],m=e[13],j=e[14],x=e[15],g=e[16],v=e[17],y=e[18],N=e[19],C=e[20],O=e[21]):({children:r,displayValue:d,className:l,placeholder:m,value:O,defaultValue:i,onValueChange:h,multiple:g,shouldFilter:v,filterFn:p,open:f,defaultOpen:o,onOpenChange:c,inputPlaceholder:y,search:x,onSearchChange:u,emptyState:N,chips:C,chipsClassName:s,keepPopoverOpenOnSelect:n,...j}=t,e[0]=t,e[1]=r,e[2]=s,e[3]=l,e[4]=o,e[5]=i,e[6]=d,e[7]=p,e[8]=n,e[9]=c,e[10]=u,e[11]=h,e[12]=f,e[13]=m,e[14]=j,e[15]=x,e[16]=g,e[17]=v,e[18]=y,e[19]=N,e[20]=C,e[21]=O);let k=g===void 0?!1:g,I=v===void 0?!0:v,M=y===void 0?"Search...":y,se=N===void 0?"Nothing found.":N,$=C===void 0?!1:C,ye=o??!1,oe;e[22]!==c||e[23]!==f||e[24]!==ye?(oe={prop:f,defaultProp:ye,onChange:c},e[22]=c,e[23]=f,e[24]=ye,e[25]=oe):oe=e[25];let[Fe,G]=Ee(oe),z=Fe===void 0?!1:Fe,T;e[26]===h?T=e[27]:(T=_=>{h==null||h(_)},e[26]=h,e[27]=T);let ie;e[28]!==i||e[29]!==T||e[30]!==O?(ie={prop:O,defaultProp:i,onChange:T},e[28]=i,e[29]=T,e[30]=O,e[31]=ie):ie=e[31];let[b,we]=Ee(ie),ce;e[32]===b?ce=e[33]:(ce=_=>Array.isArray(b)?b.includes(_):b===_,e[32]=b,e[33]=ce);let Ne=ce,de;e[34]!==n||e[35]!==k||e[36]!==G||e[37]!==we||e[38]!==b?(de=_=>{let F=_;if(k)if(Array.isArray(b))if(b.includes(F)){let De=b.filter(br=>br!==_);F=De.length>0?De:[]}else F=[...b,F];else F=[F];else b===_&&(F=null);we(F),(n??k)||G(!1)},e[34]=n,e[35]=k,e[36]=G,e[37]=we,e[38]=b,e[39]=de):de=e[39];let J=de,ue;e[40]!==$||e[41]!==d||e[42]!==k||e[43]!==m||e[44]!==b?(ue=()=>k&&$&&m?m:b==null?m??"--":Array.isArray(b)?b.length===0?m??"--":b.length===1&&d!==void 0?d(b[0]):`${b.length} selected`:d===void 0?m??"--":d(b),e[40]=$,e[41]=d,e[42]=k,e[43]=m,e[44]=b,e[45]=ue):ue=e[45];let Ce=ue,me;e[46]===Symbol.for("react.memo_cache_sentinel")?(me=q("relative"),e[46]=me):me=e[46];let B;e[47]===l?B=e[48]:(B=q("flex h-6 w-fit mb-1 shadow-xs-solid items-center justify-between rounded-sm border border-input bg-transparent px-2 text-sm font-prose ring-offset-background placeholder:text-muted-foreground hover:shadow-sm-solid focus:outline-hidden focus:ring-1 focus:ring-ring focus:border-primary focus:shadow-md-solid disabled:cursor-not-allowed disabled:opacity-50",l),e[47]=l,e[48]=B);let K;e[49]===Ce?K=e[50]:(K=Ce(),e[49]=Ce,e[50]=K);let U;e[51]===K?U=e[52]:(U=(0,a.jsx)("span",{className:"truncate flex-1 min-w-0",children:K}),e[51]=K,e[52]=U);let pe;e[53]===Symbol.for("react.memo_cache_sentinel")?(pe=(0,a.jsx)(Ir,{className:"ml-3 w-4 h-4 opacity-50 shrink-0"}),e[53]=pe):pe=e[53];let Z;e[54]!==z||e[55]!==B||e[56]!==U?(Z=(0,a.jsx)(la,{asChild:!0,children:(0,a.jsxs)("div",{className:B,"aria-expanded":z,children:[U,pe]})}),e[54]=z,e[55]=B,e[56]=U,e[57]=Z):Z=e[57];let H;e[58]!==M||e[59]!==u||e[60]!==x?(H=(0,a.jsx)(ca,{placeholder:M,rootClassName:"px-1 h-8",autoFocus:!0,value:x,onValueChange:u}),e[58]=M,e[59]=u,e[60]=x,e[61]=H):H=e[61];let W;e[62]===se?W=e[63]:(W=(0,a.jsx)(ua,{children:se}),e[62]=se,e[63]=W);let X;e[64]!==J||e[65]!==Ne?(X={isSelected:Ne,onSelect:J},e[64]=J,e[65]=Ne,e[66]=X):X=e[66];let Y;e[67]!==r||e[68]!==X?(Y=(0,a.jsx)(Xe,{value:X,children:r}),e[67]=r,e[68]=X,e[69]=Y):Y=e[69];let Q;e[70]!==W||e[71]!==Y?(Q=(0,a.jsxs)(ma,{className:"max-h-60 py-.5",children:[W,Y]}),e[70]=W,e[71]=Y,e[72]=Q):Q=e[72];let ee;e[73]!==p||e[74]!==I||e[75]!==H||e[76]!==Q?(ee=(0,a.jsx)(oa,{className:"w-full min-w-(--radix-popover-trigger-width) p-0",align:"start",children:(0,a.jsxs)(pa,{filter:p,shouldFilter:I,children:[H,Q]})}),e[73]=p,e[74]=I,e[75]=H,e[76]=Q,e[77]=ee):ee=e[77];let re;e[78]!==z||e[79]!==G||e[80]!==Z||e[81]!==ee?(re=(0,a.jsxs)(ia,{open:z,onOpenChange:G,children:[Z,ee]}),e[78]=z,e[79]=G,e[80]=Z,e[81]=ee,e[82]=re):re=e[82];let ae;e[83]!==$||e[84]!==s||e[85]!==d||e[86]!==J||e[87]!==k||e[88]!==b?(ae=k&&$&&(0,a.jsx)("div",{className:q("flex flex-col gap-1 items-start",s),children:Array.isArray(b)&&b.map(_=>_==null?null:(0,a.jsxs)(Zr,{variant:"secondary",children:[(d==null?void 0:d(_))??String(_),(0,a.jsx)(Nr,{onClick:()=>{J(_)},className:"w-3 h-3 opacity-50 hover:opacity-100 ml-1 cursor-pointer"})]},String(_)))}),e[83]=$,e[84]=s,e[85]=d,e[86]=J,e[87]=k,e[88]=b,e[89]=ae):ae=e[89];let he;return e[90]!==j||e[91]!==re||e[92]!==ae?(he=(0,a.jsxs)("div",{className:me,...j,children:[re,ae]}),e[90]=j,e[91]=re,e[92]=ae,e[93]=he):he=e[93],he},je=w.forwardRef((t,e)=>{let r=(0,We.c)(17),{children:s,className:l,value:o,onSelect:i,disabled:d}=t,p=typeof o=="object"&&"value"in o?o.value:String(o),n=w.use(Xe),c;r[0]===l?c=r[1]:(c=q("pl-6 m-1 py-1",l),r[0]=l,r[1]=c);let u;r[2]!==n||r[3]!==i||r[4]!==o?(u=()=>{n.onSelect(o),i==null||i(o)},r[2]=n,r[3]=i,r[4]=o,r[5]=u):u=r[5];let h;r[6]!==n||r[7]!==o?(h=n.isSelected(o)&&(0,a.jsx)(qr,{className:"absolute left-1 h-4 w-4"}),r[6]=n,r[7]=o,r[8]=h):h=r[8];let f;return r[9]!==s||r[10]!==d||r[11]!==e||r[12]!==c||r[13]!==u||r[14]!==h||r[15]!==p?(f=(0,a.jsxs)(da,{ref:e,className:c,role:"option",value:p,disabled:d,onSelect:u,children:[h,s]}),r[9]=s,r[10]=d,r[11]=e,r[12]=c,r[13]=u,r[14]=h,r[15]=p,r[16]=f):f=r[16],f});je.displayName="ComboboxItem";const D={of(t){return JSON.stringify(t)},parse(t){if(!t)return{};try{return JSON.parse(t)}catch{return{label:t}}}};function Ye(){return Math.floor(Math.random()*1e5)}var $e="Radio",[ja,Qe]=Ze($e),[va,ga]=ja($e),er=w.forwardRef((t,e)=>{let{__scopeRadio:r,name:s,checked:l=!1,required:o,disabled:i,value:d="on",onCheck:p,form:n,...c}=t,[u,h]=w.useState(null),f=Ae(e,x=>h(x)),m=w.useRef(!1),j=u?n||!!u.closest("form"):!0;return(0,a.jsxs)(va,{scope:r,checked:l,disabled:i,children:[(0,a.jsx)(xe.button,{type:"button",role:"radio","aria-checked":l,"data-state":nr(l),"data-disabled":i?"":void 0,disabled:i,value:d,...c,ref:f,onClick:Pe(t.onClick,x=>{l||(p==null||p()),j&&(m.current=x.isPropagationStopped(),m.current||x.stopPropagation())})}),j&&(0,a.jsx)(tr,{control:u,bubbles:!m.current,name:s,value:d,checked:l,required:o,disabled:i,form:n,style:{transform:"translateX(-100%)"}})]})});er.displayName=$e;var rr="RadioIndicator",ar=w.forwardRef((t,e)=>{let{__scopeRadio:r,forceMount:s,...l}=t,o=ga(rr,r);return(0,a.jsx)(Hr,{present:s||o.checked,children:(0,a.jsx)(xe.span,{"data-state":nr(o.checked),"data-disabled":o.disabled?"":void 0,...l,ref:e})})});ar.displayName=rr;var ba="RadioBubbleInput",tr=w.forwardRef(({__scopeRadio:t,control:e,checked:r,bubbles:s=!0,...l},o)=>{let i=w.useRef(null),d=Ae(i,o),p=Yr(r),n=ta(e);return w.useEffect(()=>{let c=i.current;if(!c)return;let u=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(u,"checked").set;if(p!==r&&h){let f=new Event("click",{bubbles:s});h.call(c,r),c.dispatchEvent(f)}},[p,r,s]),(0,a.jsx)(xe.input,{type:"radio","aria-hidden":!0,defaultChecked:r,...l,tabIndex:-1,ref:d,style:{...l.style,...n,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});tr.displayName=ba;function nr(t){return t?"checked":"unchecked"}var ya=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],ve="RadioGroup",[wa,ft]=Ze(ve,[Ke,Qe]),sr=Ke(),lr=Qe(),[Na,Ca]=wa(ve),or=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,name:s,defaultValue:l,value:o,required:i=!1,disabled:d=!1,orientation:p,dir:n,loop:c=!0,onValueChange:u,...h}=t,f=sr(r),m=sa(n),[j,x]=Ee({prop:o,defaultProp:l??null,onChange:u,caller:ve});return(0,a.jsx)(Na,{scope:r,name:s,required:i,disabled:d,value:j,onValueChange:x,children:(0,a.jsx)(Mr,{asChild:!0,...f,orientation:p,dir:m,loop:c,children:(0,a.jsx)(xe.div,{role:"radiogroup","aria-required":i,"aria-orientation":p,"data-disabled":d?"":void 0,dir:m,...h,ref:e})})})});or.displayName=ve;var ir="RadioGroupItem",cr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,disabled:s,...l}=t,o=Ca(ir,r),i=o.disabled||s,d=sr(r),p=lr(r),n=w.useRef(null),c=Ae(e,n),u=o.value===l.value,h=w.useRef(!1);return w.useEffect(()=>{let f=j=>{ya.includes(j.key)&&(h.current=!0)},m=()=>h.current=!1;return document.addEventListener("keydown",f),document.addEventListener("keyup",m),()=>{document.removeEventListener("keydown",f),document.removeEventListener("keyup",m)}},[]),(0,a.jsx)(Dr,{asChild:!0,...d,focusable:!i,active:u,children:(0,a.jsx)(er,{disabled:i,required:o.required,checked:u,...p,...l,name:o.name,ref:c,onCheck:()=>o.onValueChange(l.value),onKeyDown:Pe(f=>{f.key==="Enter"&&f.preventDefault()}),onFocus:Pe(l.onFocus,()=>{var f;h.current&&((f=n.current)==null||f.click())})})})});cr.displayName=ir;var ka="RadioGroupIndicator",dr=w.forwardRef((t,e)=>{let{__scopeRadioGroup:r,...s}=t;return(0,a.jsx)(ar,{...lr(r),...s,ref:e})});dr.displayName=ka;var ur=or,mr=cr,Sa=dr,pr=fe(),qe=w.forwardRef((t,e)=>{let r=(0,pr.c)(9),s,l;r[0]===t?(s=r[1],l=r[2]):({className:s,...l}=t,r[0]=t,r[1]=s,r[2]=l);let o;r[3]===s?o=r[4]:(o=q("grid gap-2",s),r[3]=s,r[4]=o);let i;return r[5]!==l||r[6]!==e||r[7]!==o?(i=(0,a.jsx)(ur,{className:o,...l,ref:e}),r[5]=l,r[6]=e,r[7]=o,r[8]=i):i=r[8],i});qe.displayName=ur.displayName;var Ie=w.forwardRef((t,e)=>{let r=(0,pr.c)(10),s,l;if(r[0]!==t){let{className:p,children:n,...c}=t;s=p,l=c,r[0]=t,r[1]=s,r[2]=l}else s=r[1],l=r[2];let o;r[3]===s?o=r[4]:(o=q("h-[16px] w-[16px] transition-shadow data-[state=unchecked]:shadow-xs-solid rounded-full border border-input text-primary ring-offset-background focus:outline-hidden focus:shadow-none focus-visible:ring-1 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary data-[state=checked]:shadow-none",s),r[3]=s,r[4]=o);let i;r[5]===Symbol.for("react.memo_cache_sentinel")?(i=(0,a.jsx)(Sa,{className:"flex items-center justify-center",children:(0,a.jsx)(Fr,{className:"h-[10px] w-[10px] fill-primary text-current"})}),r[5]=i):i=r[5];let d;return r[6]!==l||r[7]!==e||r[8]!==o?(d=(0,a.jsx)(mr,{ref:e,className:o,...l,children:i}),r[6]=l,r[7]=e,r[8]=o,r[9]=d):d=r[9],d});Ie.displayName=mr.displayName;function _a(t){return t instanceof Re.ZodArray}function hr(t){return t instanceof Re.ZodPipe}function Ra(t){return t instanceof Re.ZodTuple}function fr(t){return"unwrap"in t?t.unwrap():t}function ge(t){let e=r=>{if(r instanceof le){let s=[...r.values];return r.values.size===1?s[0]:s}if(r instanceof Je){let s=r.def.defaultValue;return typeof s=="function"?s():s}if(hr(r))return e(r.in);if(Ra(r))return r.def.items.map(s=>e(s));if("unwrap"in r)return e(fr(r))};return t instanceof Oe||t instanceof ke?e(t.options[0]):_a(t)?Oa(t)?[ge(t.element)]:[]:t instanceof Te?"":t instanceof Se?t.options[0]:t instanceof _e?Object.fromEntries(Object.entries(t.shape).map(([r,s])=>[r,e(s)])):e(t)}function te(t){if(t instanceof le)return t;if(t instanceof _e){let e=t.shape.type;if(e instanceof le)return e;throw Error("Invalid schema")}if(t instanceof Oe||t instanceof ke)return te(t.options[0]);throw Er.warn(t),Error("Invalid schema")}function Oa(t){return!t.safeParse([]).success}var xr=fe(),jr=`
|
|
2
|
+
`;const vr=t=>{let e=(0,xr.c)(24),{value:r,options:s,onChange:l,className:o,placeholder:i,textAreaClassName:d,comboBoxClassName:p}=t,[n,c]=(0,w.useState)(!1),u;e[0]===r?u=e[1]:(u=be(r),e[0]=r,e[1]=u);let h=u,f;e[2]!==p||e[3]!==l||e[4]!==s||e[5]!==i||e[6]!==n||e[7]!==d||e[8]!==h?(f=()=>n?(0,a.jsx)(Me,{value:h,className:d,onChange:l,placeholder:i?`${i}: one per line`:"One value per line"}):(0,a.jsx)(Le,{placeholder:i,displayValue:Aa,className:q("w-full max-w-[400px]",p),multiple:!0,value:h,onValueChange:l,keepPopoverOpenOnSelect:!0,chips:!0,chipsClassName:"flex-row flex-wrap min-w-[210px]",children:s.map(Va)}),e[2]=p,e[3]=l,e[4]=s,e[5]=i,e[6]=n,e[7]=d,e[8]=h,e[9]=f):f=e[9];let m=f,j;e[10]===o?j=e[11]:(j=q("flex gap-1",o),e[10]=o,e[11]=j);let x;e[12]===m?x=e[13]:(x=m(),e[12]=m,e[13]=x);let g=n?"Switch to multi-select":"Switch to textarea",v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=(0,a.jsx)(Kr,{className:"w-3 h-3"}),e[14]=v):v=e[14];let y;e[15]===n?y=e[16]:(y=(0,a.jsx)(fa,{size:"xs",onPressedChange:c,pressed:n,children:v}),e[15]=n,e[16]=y);let N;e[17]!==g||e[18]!==y?(N=(0,a.jsx)(na,{content:g,children:y}),e[17]=g,e[18]=y,e[19]=N):N=e[19];let C;return e[20]!==j||e[21]!==x||e[22]!==N?(C=(0,a.jsxs)("div",{className:j,children:[x,N]}),e[20]=j,e[21]=x,e[22]=N,e[23]=C):C=e[23],C},Me=t=>{let e=(0,xr.c)(11),{className:r,value:s,onChange:l,placeholder:o}=t,i,d;if(e[0]!==s){let u=be(s);i=Ue,d=u.join(jr),e[0]=s,e[1]=i,e[2]=d}else i=e[1],d=e[2];let p;e[3]===l?p=e[4]:(p=u=>{if(u.target.value===""){l([]);return}l(u.target.value.split(jr))},e[3]=l,e[4]=p);let n=o?`${o}: one per line`:"One value per line",c;return e[5]!==i||e[6]!==r||e[7]!==d||e[8]!==p||e[9]!==n?(c=(0,a.jsx)(i,{value:d,className:r,rows:4,onChange:p,placeholder:n}),e[5]=i,e[6]=r,e[7]=d,e[8]=p,e[9]=n,e[10]=c):c=e[10],c};function be(t){return t==null?[]:Array.isArray(t)?t:[t].filter(e=>e!=null||e!=="")}function Aa(t){return t}function Va(t){return(0,a.jsx)(je,{value:t,children:t},t)}var ne=fe();const Ea=t=>{let e=(0,ne.c)(11),{schema:r,form:s,path:l,renderers:o,children:i}=t,d=l===void 0?"":l,p;e[0]===o?p=e[1]:(p=o===void 0?[]:o,e[0]=o,e[1]=p);let n=p,c;e[2]!==s||e[3]!==d||e[4]!==n||e[5]!==r?(c=L(r,s,d,n),e[2]=s,e[3]=d,e[4]=n,e[5]=r,e[6]=c):c=e[6];let u;return e[7]!==i||e[8]!==s||e[9]!==c?(u=(0,a.jsxs)(Br,{...s,children:[i,c]}),e[7]=i,e[8]=s,e[9]=c,e[10]=u):u=e[10],u};function L(t,e,r,s){for(let n of s){let{isMatch:c,Component:u}=n;if(c(t))return(0,a.jsx)(u,{schema:t,form:e,path:r})}let{label:l,description:o,special:i,direction:d="column",minLength:p}=D.parse(t.description||"");if(t instanceof Je){let n=t.unwrap();return n=!n.description&&t.description?n.describe(t.description):n,L(n,e,r,s)}if(t instanceof kr){let n=t.unwrap();return n=!n.description&&t.description?n.describe(t.description):n,L(n,e,r,s)}if(t instanceof _e)return(0,a.jsxs)("div",{className:q("flex",d==="row"?"flex-row gap-6 items-start":d==="two-columns"?"grid grid-cols-2 gap-y-6":"flex-col gap-6"),children:[(0,a.jsx)(S,{children:l}),Ar.entries(t.shape).map(([n,c])=>{let u=c instanceof le,h=L(c,e,Ia(r,n),s);return u?(0,a.jsx)(w.Fragment,{children:h},n):(0,a.jsx)("div",{className:"flex flex-row align-start",children:h},n)})]});if(t instanceof Te)return i==="time"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(Ve,{...n,onValueChange:n.onChange,type:"time",className:"my-0"})}),(0,a.jsx)(E,{})]})}):(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Cr)return(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(V,{children:[(0,a.jsxs)("div",{className:"flex flex-row items-start space-x-2",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(wr,{"data-testid":"marimo-plugin-data-frames-boolean-checkbox",checked:n.value,onCheckedChange:n.onChange})})]}),(0,a.jsx)(E,{})]})});if(t instanceof _r)return i==="random_number_button"?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-random-number-button",variant:"secondary",onClick:()=>{n.onChange(Ye())},children:[(0,a.jsx)(zr,{className:"w-3.5 h-3.5 mr-1"}),l]})}):(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(Tr,{...n,className:"my-0",onValueChange:n.onChange})}),(0,a.jsx)(E,{})]})});if(t instanceof Sr){let n=i==="datetime"?"datetime-local":i==="time"?"time":"date";return(0,a.jsx)(R,{control:e.control,name:r,render:({field:c})=>(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(A,{children:o}),(0,a.jsx)(P,{children:(0,a.jsx)(Ve,{...c,onValueChange:c.onChange,type:n,className:"my-0"})}),(0,a.jsx)(E,{})]})})}if(t instanceof Rr)return(0,a.jsx)(gr,{schema:t,form:e,path:r});if(t instanceof Se)return(0,a.jsx)($a,{schema:t,form:e,path:r,options:t.options.map(n=>n.toString())});if(t instanceof Or){if(i==="text_area_multiline")return(0,a.jsx)(La,{schema:t,form:e,path:r});let n=t.element;return n instanceof Se?(0,a.jsx)(qa,{schema:t,form:e,path:r,itemLabel:l,options:n.options.map(c=>c.toString())}):(0,a.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,a.jsx)(ha,{children:l}),(0,a.jsx)(Pa,{schema:t.element,form:e,path:r,minLength:p,renderers:s},r)]})}if(t instanceof ke){let n=t.def,c=n.options,u=n.discriminator,h=f=>c.find(m=>te(m).value===f);return(0,a.jsx)(R,{control:e.control,name:r,render:({field:f})=>{let m=f.value,j=c.map(v=>te(v).value),x=m&&typeof m=="object"&&u in m?m[u]:j[0],g=h(x);return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)("div",{className:"flex border-b mb-4 -mt-2",children:j.map(v=>(0,a.jsx)("button",{type:"button",className:`px-4 py-2 ${x===v?"border-b-2 border-primary font-medium":"text-muted-foreground"}`,onClick:()=>{let y=h(v);y?f.onChange(ge(y)):f.onChange({[u]:v})},children:v},v))}),(0,a.jsx)("div",{className:"flex flex-col",children:g&&L(g,e,r,s)},x)]})}})}return t instanceof Oe?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>{let c=t.options,u=n.value,h=c.map(m=>te(m).value);u||(u=h[0]);let f=c.find(m=>te(m).value===u);return(0,a.jsxs)("div",{className:"flex flex-col mb-4 gap-1",children:[(0,a.jsx)(S,{children:l}),(0,a.jsx)(Xr,{"data-testid":"marimo-plugin-data-frames-union-select",...n,children:h.map(m=>(0,a.jsx)("option",{value:m,children:m},m))}),f&&L(f,e,r,s)]})}}):t instanceof le?(0,a.jsx)(R,{control:e.control,name:r,render:({field:n})=>(0,a.jsx)("input",{...n,type:"hidden",value:String([...t.values][0]??"")})}):"unwrap"in t?L(fr(t),e,r,s):hr(t)?L(t.in,e,r,s):(0,a.jsxs)("div",{children:["Unknown schema type"," ",t==null?r:JSON.stringify(t.type??t)]})}var Pa=t=>{let e=(0,ne.c)(39),{schema:r,form:s,path:l,minLength:o,renderers:i}=t,d;e[0]===r.description?d=e[1]:(d=D.parse(r.description||""),e[0]=r.description,e[1]=d);let{label:p,description:n}=d,c=s.control,u;e[2]!==c||e[3]!==l?(u={control:c,name:l},e[2]=c,e[3]=l,e[4]=u):u=e[4];let{fields:h,append:f,remove:m}=Jr(u),j=o!=null&&h.length<o,x=o==null||h.length>o,g;e[5]===p?g=e[6]:(g=(0,a.jsx)(S,{children:p}),e[5]=p,e[6]=g);let v;e[7]===n?v=e[8]:(v=(0,a.jsx)(A,{children:n}),e[7]=n,e[8]=v);let y;if(e[9]!==x||e[10]!==h||e[11]!==s||e[12]!==l||e[13]!==m||e[14]!==i||e[15]!==r){let M;e[17]!==x||e[18]!==s||e[19]!==l||e[20]!==m||e[21]!==i||e[22]!==r?(M=(se,$)=>(0,a.jsxs)("div",{className:"flex flex-row pl-2 ml-2 border-l-2 border-disabled hover-actions-parent relative pr-5 pt-1 items-center w-fit",onKeyDown:Lr.onEnter(Ma),children:[L(r,s,`${l}[${$}]`,i),x&&(0,a.jsx)(Ur,{className:"w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",onClick:()=>{m($)}})]},se.id),e[17]=x,e[18]=s,e[19]=l,e[20]=m,e[21]=i,e[22]=r,e[23]=M):M=e[23],y=h.map(M),e[9]=x,e[10]=h,e[11]=s,e[12]=l,e[13]=m,e[14]=i,e[15]=r,e[16]=y}else y=e[16];let N;e[24]!==j||e[25]!==o?(N=j&&(0,a.jsx)("div",{className:"text-destructive text-xs font-semibold",children:(0,a.jsxs)("div",{children:["At least ",o," required."]})}),e[24]=j,e[25]=o,e[26]=N):N=e[26];let C;e[27]!==f||e[28]!==r?(C=()=>{f(ge(r))},e[27]=f,e[28]=r,e[29]=C):C=e[29];let O;e[30]===Symbol.for("react.memo_cache_sentinel")?(O=(0,a.jsx)(Gr,{className:"w-3.5 h-3.5 mr-1"}),e[30]=O):O=e[30];let k;e[31]===C?k=e[32]:(k=(0,a.jsx)("div",{children:(0,a.jsxs)(Be,{size:"xs","data-testid":"marimo-plugin-data-frames-add-array-item",variant:"text",className:"hover:text-accent-foreground",onClick:C,children:[O,"Add"]})}),e[31]=C,e[32]=k);let I;return e[33]!==g||e[34]!==v||e[35]!==y||e[36]!==N||e[37]!==k?(I=(0,a.jsxs)("div",{className:"flex flex-col gap-2 min-w-[220px]",children:[g,v,y,N,k]}),e[33]=g,e[34]=v,e[35]=y,e[36]=N,e[37]=k,e[38]=I):I=e[38],I},gr=t=>{let e=(0,ne.c)(21),{schema:r,form:s,path:l}=t,o;e[0]===r.description?o=e[1]:(o=D.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p,disabled:n,inputType:c}=o;if(c==="textarea"){let f;e[2]!==d||e[3]!==n||e[4]!==i||e[5]!==p?(f=j=>{let{field:x}=j;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(P,{children:(0,a.jsx)(Ue,{...x,value:x.value,onChange:x.onChange,className:"my-0",placeholder:p,disabled:n})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=n,e[4]=i,e[5]=p,e[6]=f):f=e[6];let m;return e[7]!==s.control||e[8]!==l||e[9]!==f?(m=(0,a.jsx)(R,{control:s.control,name:l,render:f}),e[7]=s.control,e[8]=l,e[9]=f,e[10]=m):m=e[10],m}let u;e[11]!==d||e[12]!==n||e[13]!==c||e[14]!==i||e[15]!==p?(u=f=>{let{field:m}=f;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(P,{children:(0,a.jsx)(Ve,{...m,type:c,value:m.value,onValueChange:m.onChange,className:"my-0",placeholder:p,disabled:n})}),(0,a.jsx)(E,{})]})},e[11]=d,e[12]=n,e[13]=c,e[14]=i,e[15]=p,e[16]=u):u=e[16];let h;return e[17]!==s.control||e[18]!==l||e[19]!==u?(h=(0,a.jsx)(R,{control:s.control,name:l,render:u}),e[17]=s.control,e[18]=l,e[19]=u,e[20]=h):h=e[20],h},La=t=>{let e=(0,ne.c)(10),{schema:r,form:s,path:l}=t,o;e[0]===r.description?o=e[1]:(o=D.parse(r.description),e[0]=r.description,e[1]=o);let{label:i,description:d,placeholder:p}=o,n;e[2]!==d||e[3]!==i||e[4]!==p?(n=u=>{let{field:h}=u;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:i}),(0,a.jsx)(A,{children:d}),(0,a.jsx)(P,{children:(0,a.jsx)(Me,{...h,placeholder:p})}),(0,a.jsx)(E,{})]})},e[2]=d,e[3]=i,e[4]=p,e[5]=n):n=e[5];let c;return e[6]!==s.control||e[7]!==l||e[8]!==n?(c=(0,a.jsx)(R,{control:s.control,name:l,render:n}),e[6]=s.control,e[7]=l,e[8]=n,e[9]=c):c=e[9],c},$a=t=>{let e=(0,ne.c)(22),{schema:r,form:s,path:l,options:o,textTransform:i}=t,d;e[0]===r.description?d=e[1]:(d=D.parse(r.description),e[0]=r.description,e[1]=d);let{label:p,description:n,disabled:c,special:u}=d;if(u==="radio_group"){let m;e[2]!==n||e[3]!==p||e[4]!==o||e[5]!==l?(m=x=>{let{field:g}=x;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{children:p}),(0,a.jsx)(A,{children:n}),(0,a.jsx)(P,{children:(0,a.jsx)(qe,{className:"flex flex-row gap-2 pt-1 items-center",value:g.value,onValueChange:g.onChange,children:o.map(v=>(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(Ie,{value:v,id:`${l}-${v}`},v),(0,a.jsx)(S,{className:"whitespace-pre",htmlFor:`${l}-${v}`,children:ze.startCase(v)})]},v))})}),(0,a.jsx)(E,{})]})},e[2]=n,e[3]=p,e[4]=o,e[5]=l,e[6]=m):m=e[6];let j;return e[7]!==c||e[8]!==s.control||e[9]!==l||e[10]!==m?(j=(0,a.jsx)(R,{control:s.control,name:l,disabled:c,render:m}),e[7]=c,e[8]=s.control,e[9]=l,e[10]=m,e[11]=j):j=e[11],j}let h;e[12]!==n||e[13]!==p||e[14]!==o||e[15]!==i?(h=m=>{let{field:j}=m;return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:p}),(0,a.jsx)(A,{children:n}),(0,a.jsx)(P,{children:(0,a.jsxs)(aa,{"data-testid":"marimo-plugin-data-frames-select",value:j.value,onValueChange:j.onChange,children:[(0,a.jsx)(ra,{className:"min-w-[180px]",children:(0,a.jsx)(Wr,{placeholder:"--"})}),(0,a.jsx)(Qr,{children:(0,a.jsxs)(ea,{children:[o.map(x=>(0,a.jsx)(He,{value:x,children:(i==null?void 0:i(x))??x},x)),o.length===0&&(0,a.jsx)(He,{disabled:!0,value:"--",children:"No options"})]})})]})}),(0,a.jsx)(E,{})]})},e[12]=n,e[13]=p,e[14]=o,e[15]=i,e[16]=h):h=e[16];let f;return e[17]!==c||e[18]!==s.control||e[19]!==l||e[20]!==h?(f=(0,a.jsx)(R,{control:s.control,name:l,disabled:c,render:h}),e[17]=c,e[18]=s.control,e[19]=l,e[20]=h,e[21]=f):f=e[21],f},qa=t=>{let e=(0,ne.c)(15),{schema:r,form:s,path:l,options:o,itemLabel:i,showSwitchable:d}=t,p;e[0]===r.description?p=e[1]:(p=D.parse(r.description),e[0]=r.description,e[1]=p);let{label:n,description:c,placeholder:u}=p,h;e[2]!==i||e[3]!==u?(h=u??(i?`Select ${i==null?void 0:i.toLowerCase()}`:void 0),e[2]=i,e[3]=u,e[4]=h):h=e[4];let f=h,m;e[5]!==c||e[6]!==n||e[7]!==o||e[8]!==f||e[9]!==d?(m=x=>{let{field:g}=x,v=be(g.value);return(0,a.jsxs)(V,{children:[(0,a.jsx)(S,{className:"whitespace-pre",children:n}),(0,a.jsx)(A,{children:c}),(0,a.jsx)(P,{children:d?(0,a.jsx)(vr,{...g,value:v,options:o,placeholder:f}):(0,a.jsx)(Le,{className:"min-w-[180px]",placeholder:f,displayValue:Fa,multiple:!0,chips:!0,keepPopoverOpenOnSelect:!0,value:v,onValueChange:g.onChange,children:o.map(Da)})}),(0,a.jsx)(E,{})]})},e[5]=c,e[6]=n,e[7]=o,e[8]=f,e[9]=d,e[10]=m):m=e[10];let j;return e[11]!==s.control||e[12]!==l||e[13]!==m?(j=(0,a.jsx)(R,{control:s.control,name:l,render:m}),e[11]=s.control,e[12]=l,e[13]=m,e[14]=j):j=e[14],j};function Ia(...t){return t.filter(e=>e!=="").join(".")}function Ma(t){return t.preventDefault()}function Fa(t){return ze.startCase(t)}function Da(t){return(0,a.jsx)(je,{value:t,children:t},t)}export{be as a,qe as c,Ye as d,Le as f,Me as i,Ie as l,xa as m,L as n,ge as o,je as p,vr as r,te as s,Ea as t,D as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./utils-
|
|
1
|
+
import{c as a}from"./utils-C24l2A1T.js";function o(r){function n(t){return!!(t!=null&&t.schema)&&Array.isArray(t.schema.fields)&&typeof t.toArray=="function"}return(n(r)?r:f(r)).toArray()}o.responseType="arrayBuffer";function f(r,n){return a(r,n??{useProxy:!0})}export{o as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i}from"./numbers-
|
|
1
|
+
import{r as i}from"./numbers-Cno6K0UF.js";function t(r,o){if(r===0||r===-1)return"0 B";let e=1024,$=["B","KB","MB","GB","TB"],f=Math.floor(Math.log(r)/Math.log(e));return`${i(r/e**f,o)} ${$[f]}`}function u(r,o){if(r===0)return"0s";if(r<.001)return`${i(r*1e6,o)}\xB5s`;if(r<1)return`${i(r*1e3,o)}ms`;if(r<60)return`${i(r,o)}s`;let e=Math.floor(r/60),$=r%60;if(e<60)return $>0?`${e}m ${i($,o)}s`:`${e}m`;let f=Math.floor(e/60),n=e%60;return n>0?`${f}h ${n}m`:`${f}h`}export{u as n,t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as b}from"./chunk-LvLJmgfZ.js";import"./useEvent-O0nX5vok.js";import{t as y}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import"./compiler-runtime-B3qBwwSJ.js";import{t as P}from"./ErrorBoundary-Ba0LbbH4.js";import{t as $}from"./jsx-runtime-icT_Ltz2.js";import{r as z}from"./requests-Bgjtqo_1.js";import{t as N}from"./spinner-
|
|
1
|
+
import{s as b}from"./chunk-LvLJmgfZ.js";import"./useEvent-O0nX5vok.js";import{t as y}from"./react-Bj1aDYRI.js";import"./react-dom-CSu739Rf.js";import"./compiler-runtime-B3qBwwSJ.js";import{t as P}from"./ErrorBoundary-Ba0LbbH4.js";import{t as $}from"./jsx-runtime-icT_Ltz2.js";import{r as z}from"./requests-Bgjtqo_1.js";import{t as N}from"./spinner-pCogyRyo.js";import{dt as L,r as M}from"./input-CN1ZeRYm.js";import{n as c,t as R}from"./paths-BVwhPRFT.js";import{c as v,t as I}from"./session-CByuQ-M-.js";import"./Combination-CSPK4t6z.js";import{r as A}from"./errors-0IrrdfSG.js";import{t as f}from"./error-banner-J5F3weEj.js";import{n as D}from"./useAsyncData-D-4ifFXh.js";import{n as W,t as _}from"./card-C-c-4jyF.js";var p=b(y(),1),e=b($(),1),B=a=>a.charAt(0).toUpperCase()+a.slice(1).toLowerCase(),w=a=>{let o=R.guessDeliminator(a).deliminator;return a.replace(/\.[^./]+$/,"").split(o).filter(Boolean).map(d=>d.split(/[_-]/).map(B).join(" ")).join(" > ")},F=a=>`${I()}-${encodeURIComponent(a)}`,Y=a=>{try{return new URL(a).protocol==="https:"}catch{return!1}},q=10,E=()=>{let{getWorkspaceFiles:a}=z(),[o,d]=(0,p.useState)(""),n=D(()=>a({includeMarkdown:!1}),[]),t=n.data,m=(0,p.useMemo)(()=>{let r=(t==null?void 0:t.files)??[],l=(t==null?void 0:t.root)??"";return r.filter(s=>!s.isDirectory).map(s=>{var g,x,j;let i=l&&c.isAbsolute(s.path)&&s.path.startsWith(l)?c.rest(s.path,l):s.path,C=((g=s.opengraph)==null?void 0:g.title)??w(c.basename(i)),S=w(c.dirname(i)),U=((x=s.opengraph)==null?void 0:x.description)??"",h=(j=s.opengraph)==null?void 0:j.image,k=h&&Y(h)?h:v(`og/thumbnail?file=${encodeURIComponent(i)}`).toString();return{...s,relativePath:i,title:C,subtitle:S,description:U,thumbnailUrl:k}}).sort((s,i)=>s.relativePath.localeCompare(i.relativePath))},[t==null?void 0:t.files,t==null?void 0:t.root]),u=(0,p.useMemo)(()=>{if(!o)return m;let r=o.toLowerCase();return m.filter(l=>l.title.toLowerCase().includes(r))},[m,o]);return n.isPending?(0,e.jsx)(N,{centered:!0,size:"xlarge",className:"mt-6"}):n.error?(0,e.jsx)(f,{kind:"danger",className:"rounded p-4",children:A(n.error)}):t?(0,e.jsx)(p.Suspense,{children:(0,e.jsxs)("div",{className:"flex flex-col gap-6 max-w-6xl container pt-5 pb-20 z-10",children:[(0,e.jsx)("img",{src:"logo.png",alt:"marimo logo",className:"w-48 mb-2"}),(0,e.jsx)(P,{children:(0,e.jsxs)("div",{className:"flex flex-col gap-2",children:[t.hasMore&&(0,e.jsxs)(f,{kind:"warn",className:"rounded p-4",children:["Showing first ",t.fileCount," files. Your workspace has more files."]}),m.length>q&&(0,e.jsx)(M,{id:"search",value:o,icon:(0,e.jsx)(L,{className:"h-4 w-4"}),onChange:r=>d(r.target.value),placeholder:"Search",rootClassName:"mb-3",className:"mb-0 border-border"}),u.length===0?(0,e.jsx)(f,{kind:"warn",className:"rounded p-4",children:"No marimo apps found."}):(0,e.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:u.map(r=>(0,e.jsx)("a",{href:v(`?file=${encodeURIComponent(r.relativePath)}`).toString(),target:F(r.path),className:"no-underline",children:(0,e.jsxs)(_,{className:"h-full overflow-hidden hover:bg-accent/20 transition-colors",children:[(0,e.jsx)("img",{src:r.thumbnailUrl,alt:r.title,loading:"lazy",className:"w-full aspect-1200/630 object-cover border-b border-border/60"}),(0,e.jsx)(W,{className:"p-6 pt-4",children:(0,e.jsxs)("div",{className:"flex flex-col gap-1",children:[r.subtitle&&(0,e.jsx)("div",{className:"text-sm font-semibold text-muted-foreground",children:r.subtitle}),(0,e.jsx)("div",{className:"text-lg font-medium",children:r.title}),r.description&&(0,e.jsx)("div",{className:"text-sm text-muted-foreground line-clamp-3 mt-1",children:r.description})]})})]})},r.path))})]})})]})}):(0,e.jsx)(N,{centered:!0,size:"xlarge",className:"mt-6"})};export{E as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as ct,t as vt}from"./chunk-LvLJmgfZ.js";import"./purify.es-BBn8CPhf.js";import{t as me}from"./linear-BP9rwmWK.js";import{n as ye,o as ke,s as pe}from"./time-D2GKc0U6.js";import"./defaultLocale-OkOxlkkM.js";import{C as Zt,N as Ut,T as qt,c as Xt,d as ge,f as be,g as ve,h as Te,m as xe,p as we,t as Qt,u as $e,v as Jt,x as Kt}from"./defaultLocale-DK1MWd7f.js";import{o as _e}from"./timer-CPT_vXom.js";import{u as Dt}from"./src-Bp_72rVO.js";import{g as De}from"./chunk-S3R3BYOJ-qrwvlUdq.js";import{a as te,n as u,r as st}from"./src-CW27-Kjl.js";import{B as Se,C as Me,U as Ce,_ as Ee,a as Ye,b as lt,c as Ae,s as Ie,v as Le,z as Fe}from"./chunk-ABZYJK2D-D_Wumzom.js";import{t as Oe}from"./dist-COnmrAVZ.js";function We(t){return t}var Tt=1,St=2,Mt=3,xt=4,ee=1e-6;function Pe(t){return"translate("+t+",0)"}function ze(t){return"translate(0,"+t+")"}function He(t){return i=>+t(i)}function Ne(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),r=>+t(r)+i}function Be(){return!this.__axis}function ie(t,i){var r=[],n=null,o=null,d=6,k=6,M=3,I=typeof window<"u"&&window.devicePixelRatio>1?0:.5,D=t===Tt||t===xt?-1:1,x=t===xt||t===St?"x":"y",F=t===Tt||t===Mt?Pe:ze;function w($){var z=n??(i.ticks?i.ticks.apply(i,r):i.domain()),Y=o??(i.tickFormat?i.tickFormat.apply(i,r):We),v=Math.max(d,0)+M,C=i.range(),L=+C[0]+I,O=+C[C.length-1]+I,H=(i.bandwidth?Ne:He)(i.copy(),I),N=$.selection?$.selection():$,A=N.selectAll(".domain").data([null]),p=N.selectAll(".tick").data(z,i).order(),m=p.exit(),h=p.enter().append("g").attr("class","tick"),g=p.select("line"),y=p.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(h),g=g.merge(h.append("line").attr("stroke","currentColor").attr(x+"2",D*d)),y=y.merge(h.append("text").attr("fill","currentColor").attr(x,D*v).attr("dy",t===Tt?"0em":t===Mt?"0.71em":"0.32em")),$!==N&&(A=A.transition($),p=p.transition($),g=g.transition($),y=y.transition($),m=m.transition($).attr("opacity",ee).attr("transform",function(s){return isFinite(s=H(s))?F(s+I):this.getAttribute("transform")}),h.attr("opacity",ee).attr("transform",function(s){var c=this.parentNode.__axis;return F((c&&isFinite(c=c(s))?c:H(s))+I)})),m.remove(),A.attr("d",t===xt||t===St?k?"M"+D*k+","+L+"H"+I+"V"+O+"H"+D*k:"M"+I+","+L+"V"+O:k?"M"+L+","+D*k+"V"+I+"H"+O+"V"+D*k:"M"+L+","+I+"H"+O),p.attr("opacity",1).attr("transform",function(s){return F(H(s)+I)}),g.attr(x+"2",D*d),y.attr(x,D*v).text(Y),N.filter(Be).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===St?"start":t===xt?"end":"middle"),N.each(function(){this.__axis=H})}return w.scale=function($){return arguments.length?(i=$,w):i},w.ticks=function(){return r=Array.from(arguments),w},w.tickArguments=function($){return arguments.length?(r=$==null?[]:Array.from($),w):r.slice()},w.tickValues=function($){return arguments.length?(n=$==null?null:Array.from($),w):n&&n.slice()},w.tickFormat=function($){return arguments.length?(o=$,w):o},w.tickSize=function($){return arguments.length?(d=k=+$,w):d},w.tickSizeInner=function($){return arguments.length?(d=+$,w):d},w.tickSizeOuter=function($){return arguments.length?(k=+$,w):k},w.tickPadding=function($){return arguments.length?(M=+$,w):M},w.offset=function($){return arguments.length?(I=+$,w):I},w}function je(t){return ie(Tt,t)}function Ge(t){return ie(Mt,t)}var Ve=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_isoWeek=n()})(t,(function(){var r="day";return function(n,o,d){var k=function(D){return D.add(4-D.isoWeekday(),r)},M=o.prototype;M.isoWeekYear=function(){return k(this).year()},M.isoWeek=function(D){if(!this.$utils().u(D))return this.add(7*(D-this.isoWeek()),r);var x,F,w,$,z=k(this),Y=(x=this.isoWeekYear(),F=this.$u,w=(F?d.utc:d)().year(x).startOf("year"),$=4-w.isoWeekday(),w.isoWeekday()>4&&($+=7),w.add($,r));return z.diff(Y,"week")+1},M.isoWeekday=function(D){return this.$utils().u(D)?this.day()||7:this.day(this.day()%7?D:D-7)};var I=M.startOf;M.startOf=function(D,x){var F=this.$utils(),w=!!F.u(x)||x;return F.p(D)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):I.bind(this)(D,x)}}}))})),Re=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_customParseFormat=n()})(t,(function(){var r={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,o=/\d/,d=/\d\d/,k=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,I={},D=function(v){return(v=+v)+(v>68?1900:2e3)},x=function(v){return function(C){this[v]=+C}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var L=C.match(/([+-]|\d\d)/g),O=60*L[1]+(+L[2]||0);return O===0?0:L[0]==="+"?-O:O})(v)}],w=function(v){var C=I[v];return C&&(C.indexOf?C:C.s.concat(C.f))},$=function(v,C){var L,O=I.meridiem;if(O){for(var H=1;H<=24;H+=1)if(v.indexOf(O(H,0,C))>-1){L=H>12;break}}else L=v===(C?"pm":"PM");return L},z={A:[M,function(v){this.afternoon=$(v,!1)}],a:[M,function(v){this.afternoon=$(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*v}],SS:[d,function(v){this.milliseconds=10*v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[k,x("seconds")],ss:[k,x("seconds")],m:[k,x("minutes")],mm:[k,x("minutes")],H:[k,x("hours")],h:[k,x("hours")],HH:[k,x("hours")],hh:[k,x("hours")],D:[k,x("day")],DD:[d,x("day")],Do:[M,function(v){var C=I.ordinal;if(this.day=v.match(/\d+/)[0],C)for(var L=1;L<=31;L+=1)C(L).replace(/\[|\]/g,"")===v&&(this.day=L)}],w:[k,x("week")],ww:[d,x("week")],M:[k,x("month")],MM:[d,x("month")],MMM:[M,function(v){var C=w("months"),L=(w("monthsShort")||C.map((function(O){return O.slice(0,3)}))).indexOf(v)+1;if(L<1)throw Error();this.month=L%12||L}],MMMM:[M,function(v){var C=w("months").indexOf(v)+1;if(C<1)throw Error();this.month=C%12||C}],Y:[/[+-]?\d+/,x("year")],YY:[d,function(v){this.year=D(v)}],YYYY:[/\d{4}/,x("year")],Z:F,ZZ:F};function Y(v){for(var C=v,L=I&&I.formats,O=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(g,y,s){var c=s&&s.toUpperCase();return y||L[s]||r[s]||L[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(f,l,b){return l||b.slice(1)}))}))).match(n),H=O.length,N=0;N<H;N+=1){var A=O[N],p=z[A],m=p&&p[0],h=p&&p[1];O[N]=h?{regex:m,parser:h}:A.replace(/^\[|\]$/g,"")}return function(g){for(var y={},s=0,c=0;s<H;s+=1){var f=O[s];if(typeof f=="string")c+=f.length;else{var l=f.regex,b=f.parser,a=g.slice(c),_=l.exec(a)[0];b.call(y,_),g=g.replace(_,"")}}return(function(e){var T=e.afternoon;if(T!==void 0){var S=e.hours;T?S<12&&(e.hours+=12):S===12&&(e.hours=0),delete e.afternoon}})(y),y}}return function(v,C,L){L.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(D=v.parseTwoDigitYear);var O=C.prototype,H=O.parse;O.parse=function(N){var A=N.date,p=N.utc,m=N.args;this.$u=p;var h=m[1];if(typeof h=="string"){var g=m[2]===!0,y=m[3]===!0,s=g||y,c=m[2];y&&(c=m[2]),I=this.$locale(),!g&&c&&(I=L.Ls[c]),this.$d=(function(a,_,e,T){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*a);var S=Y(_)(a),E=S.year,W=S.month,P=S.day,j=S.hours,B=S.minutes,X=S.seconds,ht=S.milliseconds,at=S.zone,gt=S.week,ft=new Date,ot=P||(E||W?1:ft.getDate()),V=E||ft.getFullYear(),et=0;E&&!W||(et=W>0?W-1:ft.getMonth());var Z,R=j||0,nt=B||0,Q=X||0,it=ht||0;return at?new Date(Date.UTC(V,et,ot,R,nt,Q,it+60*at.offset*1e3)):e?new Date(Date.UTC(V,et,ot,R,nt,Q,it)):(Z=new Date(V,et,ot,R,nt,Q,it),gt&&(Z=T(Z).week(gt).toDate()),Z)}catch{return new Date("")}})(A,h,p,L),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),s&&A!=this.format(h)&&(this.$d=new Date("")),I={}}else if(h instanceof Array)for(var f=h.length,l=1;l<=f;l+=1){m[1]=h[l-1];var b=L.apply(this,m);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}l===f&&(this.$d=new Date(""))}else H.call(this,N)}}}))})),Ze=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_advancedFormat=n()})(t,(function(){return function(r,n){var o=n.prototype,d=o.format;o.format=function(k){var M=this,I=this.$locale();if(!this.isValid())return d.bind(this)(k);var D=this.$utils(),x=(k||"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(F){switch(F){case"Q":return Math.ceil((M.$M+1)/3);case"Do":return I.ordinal(M.$D);case"gggg":return M.weekYear();case"GGGG":return M.isoWeekYear();case"wo":return I.ordinal(M.week(),"W");case"w":case"ww":return D.s(M.week(),F==="w"?1:2,"0");case"W":case"WW":return D.s(M.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return D.s(String(M.$H===0?24:M.$H),F==="k"?1:2,"0");case"X":return Math.floor(M.$d.getTime()/1e3);case"x":return M.$d.getTime();case"z":return"["+M.offsetName()+"]";case"zzz":return"["+M.offsetName("long")+"]";default:return F}}));return d.bind(this)(x)}}}))})),Ue=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_duration=n()})(t,(function(){var r,n,o=1e3,d=6e4,k=36e5,M=864e5,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D=31536e6,x=2628e6,F=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:D,months:x,days:M,hours:k,minutes:d,seconds:o,milliseconds:1,weeks:6048e5},$=function(A){return A instanceof H},z=function(A,p,m){return new H(A,m,p.$l)},Y=function(A){return n.p(A)+"s"},v=function(A){return A<0},C=function(A){return v(A)?Math.ceil(A):Math.floor(A)},L=function(A){return Math.abs(A)},O=function(A,p){return A?v(A)?{negative:!0,format:""+L(A)+p}:{negative:!1,format:""+A+p}:{negative:!1,format:""}},H=(function(){function A(m,h,g){var y=this;if(this.$d={},this.$l=g,m===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return z(m*w[Y(h)],this);if(typeof m=="number")return this.$ms=m,this.parseFromMilliseconds(),this;if(typeof m=="object")return Object.keys(m).forEach((function(f){y.$d[Y(f)]=m[f]})),this.calMilliseconds(),this;if(typeof m=="string"){var s=m.match(F);if(s){var c=s.slice(2).map((function(f){return f==null?0:Number(f)}));return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var p=A.prototype;return p.calMilliseconds=function(){var m=this;this.$ms=Object.keys(this.$d).reduce((function(h,g){return h+(m.$d[g]||0)*w[g]}),0)},p.parseFromMilliseconds=function(){var m=this.$ms;this.$d.years=C(m/D),m%=D,this.$d.months=C(m/x),m%=x,this.$d.days=C(m/M),m%=M,this.$d.hours=C(m/k),m%=k,this.$d.minutes=C(m/d),m%=d,this.$d.seconds=C(m/o),m%=o,this.$d.milliseconds=m},p.toISOString=function(){var m=O(this.$d.years,"Y"),h=O(this.$d.months,"M"),g=+this.$d.days||0;this.$d.weeks&&(g+=7*this.$d.weeks);var y=O(g,"D"),s=O(this.$d.hours,"H"),c=O(this.$d.minutes,"M"),f=this.$d.seconds||0;this.$d.milliseconds&&(f+=this.$d.milliseconds/1e3,f=Math.round(1e3*f)/1e3);var l=O(f,"S"),b=m.negative||h.negative||y.negative||s.negative||c.negative||l.negative,a=s.format||c.format||l.format?"T":"",_=(b?"-":"")+"P"+m.format+h.format+y.format+a+s.format+c.format+l.format;return _==="P"||_==="-P"?"P0D":_},p.toJSON=function(){return this.toISOString()},p.format=function(m){var h=m||"YYYY-MM-DDTHH:mm:ss",g={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return h.replace(I,(function(y,s){return s||String(g[y])}))},p.as=function(m){return this.$ms/w[Y(m)]},p.get=function(m){var h=this.$ms,g=Y(m);return g==="milliseconds"?h%=1e3:h=g==="weeks"?C(h/w[g]):this.$d[g],h||0},p.add=function(m,h,g){var y;return y=h?m*w[Y(h)]:$(m)?m.$ms:z(m,this).$ms,z(this.$ms+y*(g?-1:1),this)},p.subtract=function(m,h){return this.add(m,h,!0)},p.locale=function(m){var h=this.clone();return h.$l=m,h},p.clone=function(){return z(this.$ms,this)},p.humanize=function(m){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!m)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},A})(),N=function(A,p,m){return A.add(p.years()*m,"y").add(p.months()*m,"M").add(p.days()*m,"d").add(p.hours()*m,"h").add(p.minutes()*m,"m").add(p.seconds()*m,"s").add(p.milliseconds()*m,"ms")};return function(A,p,m){r=m,n=m().$utils(),m.duration=function(y,s){return z(y,{$l:m.locale()},s)},m.isDuration=$;var h=p.prototype.add,g=p.prototype.subtract;p.prototype.add=function(y,s){return $(y)?N(this,y,1):h.bind(this)(y,s)},p.prototype.subtract=function(y,s){return $(y)?N(this,y,-1):g.bind(this)(y,s)}}}))})),qe=Oe(),q=ct(te(),1),Xe=ct(Ve(),1),Qe=ct(Re(),1),Je=ct(Ze(),1),mt=ct(te(),1),Ke=ct(Ue(),1),Ct=(function(){var t=u(function(s,c,f,l){for(f||(f={}),l=s.length;l--;f[s[l]]=c);return f},"o"),i=[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],r=[1,26],n=[1,27],o=[1,28],d=[1,29],k=[1,30],M=[1,31],I=[1,32],D=[1,33],x=[1,34],F=[1,9],w=[1,10],$=[1,11],z=[1,12],Y=[1,13],v=[1,14],C=[1,15],L=[1,16],O=[1,19],H=[1,20],N=[1,21],A=[1,22],p=[1,23],m=[1,25],h=[1,35],g={trace:u(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:u(function(s,c,f,l,b,a,_){var e=a.length-1;switch(b){case 1:return a[e-1];case 2:this.$=[];break;case 3:a[e-1].push(a[e]),this.$=a[e-1];break;case 4:case 5:this.$=a[e];break;case 6:case 7:this.$=[];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=a[e].substr(18);break;case 19:l.TopAxis(),this.$=a[e].substr(8);break;case 20:l.setAxisFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 21:l.setTickInterval(a[e].substr(13)),this.$=a[e].substr(13);break;case 22:l.setExcludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 23:l.setIncludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 24:l.setTodayMarker(a[e].substr(12)),this.$=a[e].substr(12);break;case 27:l.setDiagramTitle(a[e].substr(6)),this.$=a[e].substr(6);break;case 28:this.$=a[e].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=a[e].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(a[e].substr(8)),this.$=a[e].substr(8);break;case 33:l.addTask(a[e-1],a[e]),this.$="task";break;case 34:this.$=a[e-1],l.setClickEvent(a[e-1],a[e],null);break;case 35:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],a[e]);break;case 36:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],null),l.setLink(a[e-2],a[e]);break;case 37:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-2],a[e-1]),l.setLink(a[e-3],a[e]);break;case 38:this.$=a[e-2],l.setClickEvent(a[e-2],a[e],null),l.setLink(a[e-2],a[e-1]);break;case 39:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-1],a[e]),l.setLink(a[e-3],a[e-2]);break;case 40:this.$=a[e-1],l.setLink(a[e-1],a[e]);break;case 41:case 47:this.$=a[e-1]+" "+a[e];break;case 42:case 43:case 45:this.$=a[e-2]+" "+a[e-1]+" "+a[e];break;case 44:case 46:this.$=a[e-3]+" "+a[e-2]+" "+a[e-1]+" "+a[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:u(function(s,c){if(c.recoverable)this.trace(s);else{var f=Error(s);throw f.hash=c,f}},"parseError"),parse:u(function(s){var c=this,f=[0],l=[],b=[null],a=[],_=this.table,e="",T=0,S=0,E=0,W=2,P=1,j=a.slice.call(arguments,1),B=Object.create(this.lexer),X={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(X.yy[ht]=this.yy[ht]);B.setInput(s,X.yy),X.yy.lexer=B,X.yy.parser=this,B.yylloc===void 0&&(B.yylloc={});var at=B.yylloc;a.push(at);var gt=B.options&&B.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(U){f.length-=2*U,b.length-=U,a.length-=U}u(ft,"popStack");function ot(){var U=l.pop()||B.lex()||P;return typeof U!="number"&&(U instanceof Array&&(l=U,U=l.pop()),U=c.symbols_[U]||U),U}u(ot,"lex");for(var V,et,Z,R,nt,Q={},it,K,Vt,bt;;){if(Z=f[f.length-1],this.defaultActions[Z]?R=this.defaultActions[Z]:(V??(V=ot()),R=_[Z]&&_[Z][V]),R===void 0||!R.length||!R[0]){var Rt="";for(it in bt=[],_[Z])this.terminals_[it]&&it>W&&bt.push("'"+this.terminals_[it]+"'");Rt=B.showPosition?"Parse error on line "+(T+1)+`:
|
|
1
|
+
import{s as ct,t as vt}from"./chunk-LvLJmgfZ.js";import"./purify.es-Cf8RQecB.js";import{t as me}from"./linear-BDnrHGYO.js";import{n as ye,o as ke,s as pe}from"./time-Bw8f15NM.js";import"./defaultLocale-CuYNS33t.js";import{C as Zt,N as Ut,T as qt,c as Xt,d as ge,f as be,g as ve,h as Te,m as xe,p as we,t as Qt,u as $e,v as Jt,x as Kt}from"./defaultLocale-CGfP-Ye3.js";import{o as _e}from"./timer-CPT_vXom.js";import{u as Dt}from"./src-Bp_72rVO.js";import{g as De}from"./chunk-S3R3BYOJ-CSHQgcuP.js";import{a as te,n as u,r as st}from"./src-CW27-Kjl.js";import{B as Se,C as Me,U as Ce,_ as Ee,a as Ye,b as lt,c as Ae,s as Ie,v as Le,z as Fe}from"./chunk-ABZYJK2D-DXJ7hnjx.js";import{t as Oe}from"./dist-COnmrAVZ.js";function We(t){return t}var Tt=1,St=2,Mt=3,xt=4,ee=1e-6;function Pe(t){return"translate("+t+",0)"}function ze(t){return"translate(0,"+t+")"}function He(t){return i=>+t(i)}function Ne(t,i){return i=Math.max(0,t.bandwidth()-i*2)/2,t.round()&&(i=Math.round(i)),r=>+t(r)+i}function Be(){return!this.__axis}function ie(t,i){var r=[],n=null,o=null,d=6,k=6,M=3,I=typeof window<"u"&&window.devicePixelRatio>1?0:.5,D=t===Tt||t===xt?-1:1,x=t===xt||t===St?"x":"y",F=t===Tt||t===Mt?Pe:ze;function w($){var z=n??(i.ticks?i.ticks.apply(i,r):i.domain()),Y=o??(i.tickFormat?i.tickFormat.apply(i,r):We),v=Math.max(d,0)+M,C=i.range(),L=+C[0]+I,O=+C[C.length-1]+I,H=(i.bandwidth?Ne:He)(i.copy(),I),N=$.selection?$.selection():$,A=N.selectAll(".domain").data([null]),p=N.selectAll(".tick").data(z,i).order(),m=p.exit(),h=p.enter().append("g").attr("class","tick"),g=p.select("line"),y=p.select("text");A=A.merge(A.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),p=p.merge(h),g=g.merge(h.append("line").attr("stroke","currentColor").attr(x+"2",D*d)),y=y.merge(h.append("text").attr("fill","currentColor").attr(x,D*v).attr("dy",t===Tt?"0em":t===Mt?"0.71em":"0.32em")),$!==N&&(A=A.transition($),p=p.transition($),g=g.transition($),y=y.transition($),m=m.transition($).attr("opacity",ee).attr("transform",function(s){return isFinite(s=H(s))?F(s+I):this.getAttribute("transform")}),h.attr("opacity",ee).attr("transform",function(s){var c=this.parentNode.__axis;return F((c&&isFinite(c=c(s))?c:H(s))+I)})),m.remove(),A.attr("d",t===xt||t===St?k?"M"+D*k+","+L+"H"+I+"V"+O+"H"+D*k:"M"+I+","+L+"V"+O:k?"M"+L+","+D*k+"V"+I+"H"+O+"V"+D*k:"M"+L+","+I+"H"+O),p.attr("opacity",1).attr("transform",function(s){return F(H(s)+I)}),g.attr(x+"2",D*d),y.attr(x,D*v).text(Y),N.filter(Be).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===St?"start":t===xt?"end":"middle"),N.each(function(){this.__axis=H})}return w.scale=function($){return arguments.length?(i=$,w):i},w.ticks=function(){return r=Array.from(arguments),w},w.tickArguments=function($){return arguments.length?(r=$==null?[]:Array.from($),w):r.slice()},w.tickValues=function($){return arguments.length?(n=$==null?null:Array.from($),w):n&&n.slice()},w.tickFormat=function($){return arguments.length?(o=$,w):o},w.tickSize=function($){return arguments.length?(d=k=+$,w):d},w.tickSizeInner=function($){return arguments.length?(d=+$,w):d},w.tickSizeOuter=function($){return arguments.length?(k=+$,w):k},w.tickPadding=function($){return arguments.length?(M=+$,w):M},w.offset=function($){return arguments.length?(I=+$,w):I},w}function je(t){return ie(Tt,t)}function Ge(t){return ie(Mt,t)}var Ve=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_isoWeek=n()})(t,(function(){var r="day";return function(n,o,d){var k=function(D){return D.add(4-D.isoWeekday(),r)},M=o.prototype;M.isoWeekYear=function(){return k(this).year()},M.isoWeek=function(D){if(!this.$utils().u(D))return this.add(7*(D-this.isoWeek()),r);var x,F,w,$,z=k(this),Y=(x=this.isoWeekYear(),F=this.$u,w=(F?d.utc:d)().year(x).startOf("year"),$=4-w.isoWeekday(),w.isoWeekday()>4&&($+=7),w.add($,r));return z.diff(Y,"week")+1},M.isoWeekday=function(D){return this.$utils().u(D)?this.day()||7:this.day(this.day()%7?D:D-7)};var I=M.startOf;M.startOf=function(D,x){var F=this.$utils(),w=!!F.u(x)||x;return F.p(D)==="isoweek"?w?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):I.bind(this)(D,x)}}}))})),Re=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_customParseFormat=n()})(t,(function(){var r={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,o=/\d/,d=/\d\d/,k=/\d\d?/,M=/\d*[^-_:/,()\s\d]+/,I={},D=function(v){return(v=+v)+(v>68?1900:2e3)},x=function(v){return function(C){this[v]=+C}},F=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=(function(C){if(!C||C==="Z")return 0;var L=C.match(/([+-]|\d\d)/g),O=60*L[1]+(+L[2]||0);return O===0?0:L[0]==="+"?-O:O})(v)}],w=function(v){var C=I[v];return C&&(C.indexOf?C:C.s.concat(C.f))},$=function(v,C){var L,O=I.meridiem;if(O){for(var H=1;H<=24;H+=1)if(v.indexOf(O(H,0,C))>-1){L=H>12;break}}else L=v===(C?"pm":"PM");return L},z={A:[M,function(v){this.afternoon=$(v,!1)}],a:[M,function(v){this.afternoon=$(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*v}],SS:[d,function(v){this.milliseconds=10*v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[k,x("seconds")],ss:[k,x("seconds")],m:[k,x("minutes")],mm:[k,x("minutes")],H:[k,x("hours")],h:[k,x("hours")],HH:[k,x("hours")],hh:[k,x("hours")],D:[k,x("day")],DD:[d,x("day")],Do:[M,function(v){var C=I.ordinal;if(this.day=v.match(/\d+/)[0],C)for(var L=1;L<=31;L+=1)C(L).replace(/\[|\]/g,"")===v&&(this.day=L)}],w:[k,x("week")],ww:[d,x("week")],M:[k,x("month")],MM:[d,x("month")],MMM:[M,function(v){var C=w("months"),L=(w("monthsShort")||C.map((function(O){return O.slice(0,3)}))).indexOf(v)+1;if(L<1)throw Error();this.month=L%12||L}],MMMM:[M,function(v){var C=w("months").indexOf(v)+1;if(C<1)throw Error();this.month=C%12||C}],Y:[/[+-]?\d+/,x("year")],YY:[d,function(v){this.year=D(v)}],YYYY:[/\d{4}/,x("year")],Z:F,ZZ:F};function Y(v){for(var C=v,L=I&&I.formats,O=(v=C.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(g,y,s){var c=s&&s.toUpperCase();return y||L[s]||r[s]||L[c].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(f,l,b){return l||b.slice(1)}))}))).match(n),H=O.length,N=0;N<H;N+=1){var A=O[N],p=z[A],m=p&&p[0],h=p&&p[1];O[N]=h?{regex:m,parser:h}:A.replace(/^\[|\]$/g,"")}return function(g){for(var y={},s=0,c=0;s<H;s+=1){var f=O[s];if(typeof f=="string")c+=f.length;else{var l=f.regex,b=f.parser,a=g.slice(c),_=l.exec(a)[0];b.call(y,_),g=g.replace(_,"")}}return(function(e){var T=e.afternoon;if(T!==void 0){var S=e.hours;T?S<12&&(e.hours+=12):S===12&&(e.hours=0),delete e.afternoon}})(y),y}}return function(v,C,L){L.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(D=v.parseTwoDigitYear);var O=C.prototype,H=O.parse;O.parse=function(N){var A=N.date,p=N.utc,m=N.args;this.$u=p;var h=m[1];if(typeof h=="string"){var g=m[2]===!0,y=m[3]===!0,s=g||y,c=m[2];y&&(c=m[2]),I=this.$locale(),!g&&c&&(I=L.Ls[c]),this.$d=(function(a,_,e,T){try{if(["x","X"].indexOf(_)>-1)return new Date((_==="X"?1e3:1)*a);var S=Y(_)(a),E=S.year,W=S.month,P=S.day,j=S.hours,B=S.minutes,X=S.seconds,ht=S.milliseconds,at=S.zone,gt=S.week,ft=new Date,ot=P||(E||W?1:ft.getDate()),V=E||ft.getFullYear(),et=0;E&&!W||(et=W>0?W-1:ft.getMonth());var Z,R=j||0,nt=B||0,Q=X||0,it=ht||0;return at?new Date(Date.UTC(V,et,ot,R,nt,Q,it+60*at.offset*1e3)):e?new Date(Date.UTC(V,et,ot,R,nt,Q,it)):(Z=new Date(V,et,ot,R,nt,Q,it),gt&&(Z=T(Z).week(gt).toDate()),Z)}catch{return new Date("")}})(A,h,p,L),this.init(),c&&c!==!0&&(this.$L=this.locale(c).$L),s&&A!=this.format(h)&&(this.$d=new Date("")),I={}}else if(h instanceof Array)for(var f=h.length,l=1;l<=f;l+=1){m[1]=h[l-1];var b=L.apply(this,m);if(b.isValid()){this.$d=b.$d,this.$L=b.$L,this.init();break}l===f&&(this.$d=new Date(""))}else H.call(this,N)}}}))})),Ze=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_advancedFormat=n()})(t,(function(){return function(r,n){var o=n.prototype,d=o.format;o.format=function(k){var M=this,I=this.$locale();if(!this.isValid())return d.bind(this)(k);var D=this.$utils(),x=(k||"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(F){switch(F){case"Q":return Math.ceil((M.$M+1)/3);case"Do":return I.ordinal(M.$D);case"gggg":return M.weekYear();case"GGGG":return M.isoWeekYear();case"wo":return I.ordinal(M.week(),"W");case"w":case"ww":return D.s(M.week(),F==="w"?1:2,"0");case"W":case"WW":return D.s(M.isoWeek(),F==="W"?1:2,"0");case"k":case"kk":return D.s(String(M.$H===0?24:M.$H),F==="k"?1:2,"0");case"X":return Math.floor(M.$d.getTime()/1e3);case"x":return M.$d.getTime();case"z":return"["+M.offsetName()+"]";case"zzz":return"["+M.offsetName("long")+"]";default:return F}}));return d.bind(this)(x)}}}))})),Ue=vt(((t,i)=>{(function(r,n){typeof t=="object"&&i!==void 0?i.exports=n():typeof define=="function"&&define.amd?define(n):(r=typeof globalThis<"u"?globalThis:r||self).dayjs_plugin_duration=n()})(t,(function(){var r,n,o=1e3,d=6e4,k=36e5,M=864e5,I=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,D=31536e6,x=2628e6,F=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,w={years:D,months:x,days:M,hours:k,minutes:d,seconds:o,milliseconds:1,weeks:6048e5},$=function(A){return A instanceof H},z=function(A,p,m){return new H(A,m,p.$l)},Y=function(A){return n.p(A)+"s"},v=function(A){return A<0},C=function(A){return v(A)?Math.ceil(A):Math.floor(A)},L=function(A){return Math.abs(A)},O=function(A,p){return A?v(A)?{negative:!0,format:""+L(A)+p}:{negative:!1,format:""+A+p}:{negative:!1,format:""}},H=(function(){function A(m,h,g){var y=this;if(this.$d={},this.$l=g,m===void 0&&(this.$ms=0,this.parseFromMilliseconds()),h)return z(m*w[Y(h)],this);if(typeof m=="number")return this.$ms=m,this.parseFromMilliseconds(),this;if(typeof m=="object")return Object.keys(m).forEach((function(f){y.$d[Y(f)]=m[f]})),this.calMilliseconds(),this;if(typeof m=="string"){var s=m.match(F);if(s){var c=s.slice(2).map((function(f){return f==null?0:Number(f)}));return this.$d.years=c[0],this.$d.months=c[1],this.$d.weeks=c[2],this.$d.days=c[3],this.$d.hours=c[4],this.$d.minutes=c[5],this.$d.seconds=c[6],this.calMilliseconds(),this}}return this}var p=A.prototype;return p.calMilliseconds=function(){var m=this;this.$ms=Object.keys(this.$d).reduce((function(h,g){return h+(m.$d[g]||0)*w[g]}),0)},p.parseFromMilliseconds=function(){var m=this.$ms;this.$d.years=C(m/D),m%=D,this.$d.months=C(m/x),m%=x,this.$d.days=C(m/M),m%=M,this.$d.hours=C(m/k),m%=k,this.$d.minutes=C(m/d),m%=d,this.$d.seconds=C(m/o),m%=o,this.$d.milliseconds=m},p.toISOString=function(){var m=O(this.$d.years,"Y"),h=O(this.$d.months,"M"),g=+this.$d.days||0;this.$d.weeks&&(g+=7*this.$d.weeks);var y=O(g,"D"),s=O(this.$d.hours,"H"),c=O(this.$d.minutes,"M"),f=this.$d.seconds||0;this.$d.milliseconds&&(f+=this.$d.milliseconds/1e3,f=Math.round(1e3*f)/1e3);var l=O(f,"S"),b=m.negative||h.negative||y.negative||s.negative||c.negative||l.negative,a=s.format||c.format||l.format?"T":"",_=(b?"-":"")+"P"+m.format+h.format+y.format+a+s.format+c.format+l.format;return _==="P"||_==="-P"?"P0D":_},p.toJSON=function(){return this.toISOString()},p.format=function(m){var h=m||"YYYY-MM-DDTHH:mm:ss",g={Y:this.$d.years,YY:n.s(this.$d.years,2,"0"),YYYY:n.s(this.$d.years,4,"0"),M:this.$d.months,MM:n.s(this.$d.months,2,"0"),D:this.$d.days,DD:n.s(this.$d.days,2,"0"),H:this.$d.hours,HH:n.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:n.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:n.s(this.$d.seconds,2,"0"),SSS:n.s(this.$d.milliseconds,3,"0")};return h.replace(I,(function(y,s){return s||String(g[y])}))},p.as=function(m){return this.$ms/w[Y(m)]},p.get=function(m){var h=this.$ms,g=Y(m);return g==="milliseconds"?h%=1e3:h=g==="weeks"?C(h/w[g]):this.$d[g],h||0},p.add=function(m,h,g){var y;return y=h?m*w[Y(h)]:$(m)?m.$ms:z(m,this).$ms,z(this.$ms+y*(g?-1:1),this)},p.subtract=function(m,h){return this.add(m,h,!0)},p.locale=function(m){var h=this.clone();return h.$l=m,h},p.clone=function(){return z(this.$ms,this)},p.humanize=function(m){return r().add(this.$ms,"ms").locale(this.$l).fromNow(!m)},p.valueOf=function(){return this.asMilliseconds()},p.milliseconds=function(){return this.get("milliseconds")},p.asMilliseconds=function(){return this.as("milliseconds")},p.seconds=function(){return this.get("seconds")},p.asSeconds=function(){return this.as("seconds")},p.minutes=function(){return this.get("minutes")},p.asMinutes=function(){return this.as("minutes")},p.hours=function(){return this.get("hours")},p.asHours=function(){return this.as("hours")},p.days=function(){return this.get("days")},p.asDays=function(){return this.as("days")},p.weeks=function(){return this.get("weeks")},p.asWeeks=function(){return this.as("weeks")},p.months=function(){return this.get("months")},p.asMonths=function(){return this.as("months")},p.years=function(){return this.get("years")},p.asYears=function(){return this.as("years")},A})(),N=function(A,p,m){return A.add(p.years()*m,"y").add(p.months()*m,"M").add(p.days()*m,"d").add(p.hours()*m,"h").add(p.minutes()*m,"m").add(p.seconds()*m,"s").add(p.milliseconds()*m,"ms")};return function(A,p,m){r=m,n=m().$utils(),m.duration=function(y,s){return z(y,{$l:m.locale()},s)},m.isDuration=$;var h=p.prototype.add,g=p.prototype.subtract;p.prototype.add=function(y,s){return $(y)?N(this,y,1):h.bind(this)(y,s)},p.prototype.subtract=function(y,s){return $(y)?N(this,y,-1):g.bind(this)(y,s)}}}))})),qe=Oe(),q=ct(te(),1),Xe=ct(Ve(),1),Qe=ct(Re(),1),Je=ct(Ze(),1),mt=ct(te(),1),Ke=ct(Ue(),1),Ct=(function(){var t=u(function(s,c,f,l){for(f||(f={}),l=s.length;l--;f[s[l]]=c);return f},"o"),i=[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],r=[1,26],n=[1,27],o=[1,28],d=[1,29],k=[1,30],M=[1,31],I=[1,32],D=[1,33],x=[1,34],F=[1,9],w=[1,10],$=[1,11],z=[1,12],Y=[1,13],v=[1,14],C=[1,15],L=[1,16],O=[1,19],H=[1,20],N=[1,21],A=[1,22],p=[1,23],m=[1,25],h=[1,35],g={trace:u(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:u(function(s,c,f,l,b,a,_){var e=a.length-1;switch(b){case 1:return a[e-1];case 2:this.$=[];break;case 3:a[e-1].push(a[e]),this.$=a[e-1];break;case 4:case 5:this.$=a[e];break;case 6:case 7:this.$=[];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=a[e].substr(18);break;case 19:l.TopAxis(),this.$=a[e].substr(8);break;case 20:l.setAxisFormat(a[e].substr(11)),this.$=a[e].substr(11);break;case 21:l.setTickInterval(a[e].substr(13)),this.$=a[e].substr(13);break;case 22:l.setExcludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 23:l.setIncludes(a[e].substr(9)),this.$=a[e].substr(9);break;case 24:l.setTodayMarker(a[e].substr(12)),this.$=a[e].substr(12);break;case 27:l.setDiagramTitle(a[e].substr(6)),this.$=a[e].substr(6);break;case 28:this.$=a[e].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=a[e].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(a[e].substr(8)),this.$=a[e].substr(8);break;case 33:l.addTask(a[e-1],a[e]),this.$="task";break;case 34:this.$=a[e-1],l.setClickEvent(a[e-1],a[e],null);break;case 35:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],a[e]);break;case 36:this.$=a[e-2],l.setClickEvent(a[e-2],a[e-1],null),l.setLink(a[e-2],a[e]);break;case 37:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-2],a[e-1]),l.setLink(a[e-3],a[e]);break;case 38:this.$=a[e-2],l.setClickEvent(a[e-2],a[e],null),l.setLink(a[e-2],a[e-1]);break;case 39:this.$=a[e-3],l.setClickEvent(a[e-3],a[e-1],a[e]),l.setLink(a[e-3],a[e-2]);break;case 40:this.$=a[e-1],l.setLink(a[e-1],a[e]);break;case 41:case 47:this.$=a[e-1]+" "+a[e];break;case 42:case 43:case 45:this.$=a[e-2]+" "+a[e-1]+" "+a[e];break;case 44:case 46:this.$=a[e-3]+" "+a[e-2]+" "+a[e-1]+" "+a[e];break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,7],{1:[2,1]}),t(i,[2,3]),{9:36,11:17,12:r,13:n,14:o,15:d,16:k,17:M,18:I,19:18,20:D,21:x,22:F,23:w,24:$,25:z,26:Y,27:v,28:C,29:L,30:O,31:H,33:N,35:A,36:p,37:24,38:m,40:h},t(i,[2,5]),t(i,[2,6]),t(i,[2,17]),t(i,[2,18]),t(i,[2,19]),t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),t(i,[2,23]),t(i,[2,24]),t(i,[2,25]),t(i,[2,26]),t(i,[2,27]),{32:[1,37]},{34:[1,38]},t(i,[2,30]),t(i,[2,31]),t(i,[2,32]),{39:[1,39]},t(i,[2,8]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),{41:[1,40],43:[1,41]},t(i,[2,4]),t(i,[2,28]),t(i,[2,29]),t(i,[2,33]),t(i,[2,34],{42:[1,42],43:[1,43]}),t(i,[2,40],{41:[1,44]}),t(i,[2,35],{43:[1,45]}),t(i,[2,36]),t(i,[2,38],{42:[1,46]}),t(i,[2,37]),t(i,[2,39])],defaultActions:{},parseError:u(function(s,c){if(c.recoverable)this.trace(s);else{var f=Error(s);throw f.hash=c,f}},"parseError"),parse:u(function(s){var c=this,f=[0],l=[],b=[null],a=[],_=this.table,e="",T=0,S=0,E=0,W=2,P=1,j=a.slice.call(arguments,1),B=Object.create(this.lexer),X={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(X.yy[ht]=this.yy[ht]);B.setInput(s,X.yy),X.yy.lexer=B,X.yy.parser=this,B.yylloc===void 0&&(B.yylloc={});var at=B.yylloc;a.push(at);var gt=B.options&&B.options.ranges;typeof X.yy.parseError=="function"?this.parseError=X.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(U){f.length-=2*U,b.length-=U,a.length-=U}u(ft,"popStack");function ot(){var U=l.pop()||B.lex()||P;return typeof U!="number"&&(U instanceof Array&&(l=U,U=l.pop()),U=c.symbols_[U]||U),U}u(ot,"lex");for(var V,et,Z,R,nt,Q={},it,K,Vt,bt;;){if(Z=f[f.length-1],this.defaultActions[Z]?R=this.defaultActions[Z]:(V??(V=ot()),R=_[Z]&&_[Z][V]),R===void 0||!R.length||!R[0]){var Rt="";for(it in bt=[],_[Z])this.terminals_[it]&&it>W&&bt.push("'"+this.terminals_[it]+"'");Rt=B.showPosition?"Parse error on line "+(T+1)+`:
|
|
2
2
|
`+B.showPosition()+`
|
|
3
3
|
Expecting `+bt.join(", ")+", got '"+(this.terminals_[V]||V)+"'":"Parse error on line "+(T+1)+": Unexpected "+(V==P?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(Rt,{text:B.match,token:this.terminals_[V]||V,line:B.yylineno,loc:at,expected:bt})}if(R[0]instanceof Array&&R.length>1)throw Error("Parse Error: multiple actions possible at state: "+Z+", token: "+V);switch(R[0]){case 1:f.push(V),b.push(B.yytext),a.push(B.yylloc),f.push(R[1]),V=null,et?(V=et,et=null):(S=B.yyleng,e=B.yytext,T=B.yylineno,at=B.yylloc,E>0&&E--);break;case 2:if(K=this.productions_[R[1]][1],Q.$=b[b.length-K],Q._$={first_line:a[a.length-(K||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(K||1)].first_column,last_column:a[a.length-1].last_column},gt&&(Q._$.range=[a[a.length-(K||1)].range[0],a[a.length-1].range[1]]),nt=this.performAction.apply(Q,[e,S,T,X.yy,R[1],b,a].concat(j)),nt!==void 0)return nt;K&&(f=f.slice(0,-1*K*2),b=b.slice(0,-1*K),a=a.slice(0,-1*K)),f.push(this.productions_[R[1]][0]),b.push(Q.$),a.push(Q._$),Vt=_[f[f.length-2]][f[f.length-1]],f.push(Vt);break;case 3:return!0}}return!0},"parse")};g.lexer=(function(){return{EOF:1,parseError:u(function(s,c){if(this.yy.parser)this.yy.parser.parseError(s,c);else throw Error(s)},"parseError"),setInput:u(function(s,c){return this.yy=c||this.yy||{},this._input=s,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:u(function(){var s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.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),s},"input"),unput:u(function(s){var c=s.length,f=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var l=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),f.length-1&&(this.yylineno-=f.length-1);var b=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:f?(f.length===l.length?this.yylloc.first_column:0)+l[l.length-f.length].length-f[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[b[0],b[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return 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});return this},"reject"),less:u(function(s){this.unput(this.match.slice(s))},"less"),pastInput:u(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var s=this.pastInput(),c=Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
package/dist/assets/{gitGraphDiagram-V2S2FVAM-h5SlguJK.js → gitGraphDiagram-V2S2FVAM-BUHURX6t.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var J;import"./chunk-TCCFYFTB-49JL9s9e.js";import"./main-DrBRErTM.js";import"./purify.es-BBn8CPhf.js";import{u as Q}from"./src-Bp_72rVO.js";import{g as X,i as Z,m as tt}from"./chunk-S3R3BYOJ-qrwvlUdq.js";import{n as h,r as u}from"./src-CW27-Kjl.js";import{B as rt,C as et,K as at,U as ot,_ as it,a as st,b as ct,d as nt,s as k,v as dt,y as ht,z as mt}from"./chunk-ABZYJK2D-D_Wumzom.js";import"./dist-COnmrAVZ.js";import"./chunk-UMXZTB3W-Bt-_br31.js";import"./chunk-4F5CHEZ2-BGeTOmrq.js";import"./chunk-FRFDVMJY-CUDE-MUX.js";import"./chunk-SJTYNZTY-C9cwtT3h.js";import"./chunk-PL6DKKU2-DMqBvHTF.js";import"./chunk-TQ3KTPDO-CUyT9lNN.js";import"./chunk-B2363JML-Cmh9TPpj.js";import{t as lt}from"./chunk-4BX2VUAB-DOQhLGwX.js";import{t as $t}from"./mermaid-parser.core-DR82IMb2.js";import{t as yt}from"./chunk-QZHKN3VN-D3EIvP2i.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gt=nt.gitGraph,A=h(()=>Z({...gt,...ht().gitGraph}),"getConfig"),n=new yt(()=>{let r=A(),t=r.mainBranchName,a=r.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:a}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function z(){return tt({length:7})}h(z,"getID");function j(r,t){let a=Object.create(null);return r.reduce((i,e)=>{let o=t(e);return a[o]||(a[o]=!0,i.push(e)),i},[])}h(j,"uniqBy");var pt=h(function(r){n.records.direction=r},"setDirection"),xt=h(function(r){u.debug("options str",r),r=r==null?void 0:r.trim(),r||(r="{}");try{n.records.options=JSON.parse(r)}catch(t){u.error("error while parsing gitGraph options",t.message)}},"setOptions"),ft=h(function(){return n.records.options},"getOptions"),ut=h(function(r){let t=r.msg,a=r.id,i=r.type,e=r.tags;u.info("commit",t,a,i,e),u.debug("Entering commit:",t,a,i,e);let o=A();a=k.sanitizeText(a,o),t=k.sanitizeText(t,o),e=e==null?void 0:e.map(s=>k.sanitizeText(s,o));let c={id:a||n.records.seq+"-"+z(),message:t,seq:n.records.seq++,type:i??p.NORMAL,tags:e??[],parents:n.records.head==null?[]:[n.records.head.id],branch:n.records.currBranch};n.records.head=c,u.info("main branch",o.mainBranchName),n.records.commits.has(c.id)&&u.warn(`Commit ID ${c.id} already exists`),n.records.commits.set(c.id,c),n.records.branches.set(n.records.currBranch,c.id),u.debug("in pushCommit "+c.id)},"commit"),bt=h(function(r){let t=r.name,a=r.order;if(t=k.sanitizeText(t,A()),n.records.branches.has(t))throw 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}")`);n.records.branches.set(t,n.records.head==null?null:n.records.head.id),n.records.branchConfig.set(t,{name:t,order:a}),_(t),u.debug("in createBranch")},"branch"),wt=h(r=>{let t=r.branch,a=r.id,i=r.type,e=r.tags,o=A();t=k.sanitizeText(t,o),a&&(a=k.sanitizeText(a,o));let c=n.records.branches.get(n.records.currBranch),s=n.records.branches.get(t),m=c?n.records.commits.get(c):void 0,$=s?n.records.commits.get(s):void 0;if(m&&$&&m.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(n.records.currBranch===t){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(m===void 0||!m){let d=Error(`Incorrect usage of "merge". Current branch (${n.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!n.records.branches.has(t)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if($===void 0||!$){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(m===$){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(a&&n.records.commits.has(a)){let d=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,token:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${t} ${a}_UNIQUE ${i} ${e==null?void 0:e.join(" ")}`]},d}let l=s||"",y={id:a||`${n.records.seq}-${z()}`,message:`merged branch ${t} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,l],branch:n.records.currBranch,type:p.MERGE,customType:i,customId:!!a,tags:e??[]};n.records.head=y,n.records.commits.set(y.id,y),n.records.branches.set(n.records.currBranch,y.id),u.debug(n.records.branches),u.debug("in mergeBranch")},"merge"),Bt=h(function(r){let t=r.id,a=r.targetId,i=r.tags,e=r.parent;u.debug("Entering cherryPick:",t,a,i);let o=A();if(t=k.sanitizeText(t,o),a=k.sanitizeText(a,o),i=i==null?void 0:i.map(m=>k.sanitizeText(m,o)),e=k.sanitizeText(e,o),!t||!n.records.commits.has(t)){let m=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},m}let c=n.records.commits.get(t);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=c.branch;if(c.type===p.MERGE&&!e)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!n.records.commits.has(a)){if(s===n.records.currBranch){let y=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let m=n.records.branches.get(n.records.currBranch);if(m===void 0||!m){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let $=n.records.commits.get(m);if($===void 0||!$){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let l={id:n.records.seq+"-"+z(),message:`cherry-picked ${c==null?void 0:c.message} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,c.id],branch:n.records.currBranch,type:p.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${e}`:""}`]};n.records.head=l,n.records.commits.set(l.id,l),n.records.branches.set(n.records.currBranch,l.id),u.debug(n.records.branches),u.debug("in cherryPick")}},"cherryPick"),_=h(function(r){if(r=k.sanitizeText(r,A()),n.records.branches.has(r)){n.records.currBranch=r;let t=n.records.branches.get(n.records.currBranch);t===void 0||!t?n.records.head=null:n.records.head=n.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw t.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},t}},"checkout");function D(r,t,a){let i=r.indexOf(t);i===-1?r.push(a):r.splice(i,1,a)}h(D,"upsert");function N(r){let t=r.reduce((e,o)=>e.seq>o.seq?e:o,r[0]),a="";r.forEach(function(e){e===t?a+=" *":a+=" |"});let i=[a,t.id,t.seq];for(let e in n.records.branches)n.records.branches.get(e)===t.id&&i.push(e);if(u.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let e=n.records.commits.get(t.parents[0]);D(r,t,e),t.parents[1]&&r.push(n.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let e=n.records.commits.get(t.parents[0]);D(r,t,e)}}r=j(r,e=>e.id),N(r)}h(N,"prettyPrintCommitHistory");var Et=h(function(){u.debug(n.records.commits);let r=K()[0];N([r])},"prettyPrint"),Ct=h(function(){n.reset(),st()},"clear"),kt=h(function(){return[...n.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Lt=h(function(){return n.records.branches},"getBranches"),Tt=h(function(){return n.records.commits},"getCommits"),K=h(function(){let r=[...n.records.commits.values()];return r.forEach(function(t){u.debug(t.id)}),r.sort((t,a)=>t.seq-a.seq),r},"getCommitsArray"),F={commitType:p,getConfig:A,setDirection:pt,setOptions:xt,getOptions:ft,commit:ut,branch:bt,merge:wt,cherryPick:Bt,checkout:_,prettyPrint:Et,clear:Ct,getBranchesAsObjArray:kt,getBranches:Lt,getCommits:Tt,getCommitsArray:K,getCurrentBranch:h(function(){return n.records.currBranch},"getCurrentBranch"),getDirection:h(function(){return n.records.direction},"getDirection"),getHead:h(function(){return n.records.head},"getHead"),setAccTitle:rt,getAccTitle:dt,getAccDescription:it,setAccDescription:mt,setDiagramTitle:ot,getDiagramTitle:et},Mt=h((r,t)=>{lt(r,t),r.dir&&t.setDirection(r.dir);for(let a of r.statements)vt(a,t)},"populate"),vt=h((r,t)=>{let a={Commit:h(i=>t.commit(Pt(i)),"Commit"),Branch:h(i=>t.branch(Rt(i)),"Branch"),Merge:h(i=>t.merge(At(i)),"Merge"),Checkout:h(i=>t.checkout(Gt(i)),"Checkout"),CherryPicking:h(i=>t.cherryPick(Ot(i)),"CherryPicking")}[r.$type];a?a(r):u.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),Pt=h(r=>({id:r.id,msg:r.message??"",type:r.type===void 0?p.NORMAL:p[r.type],tags:r.tags??void 0}),"parseCommit"),Rt=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),At=h(r=>({branch:r.branch,id:r.id??"",type:r.type===void 0?void 0:p[r.type],tags:r.tags??void 0}),"parseMerge"),Gt=h(r=>r.branch,"parseCheckout"),Ot=h(r=>{var t;return{id:r.id,targetId:"",tags:((t=r.tags)==null?void 0:t.length)===0?void 0:r.tags,parent:r.parent}},"parseCherryPicking"),It={parse:h(async r=>{let t=await $t("gitGraph",r);u.debug(t),Mt(t,F)},"parse")},f=(J=ct())==null?void 0:J.gitGraph,v=10,P=40,L=4,T=2,G=8,E=new Map,C=new Map,H=30,I=new Map,S=[],R=0,g="LR",qt=h(()=>{E.clear(),C.clear(),I.clear(),R=0,S=[],g="LR"},"clear"),Y=h(r=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(a=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=a.trim(),t.appendChild(i)}),t},"drawText"),U=h(r=>{let t,a,i;return g==="BT"?(a=h((e,o)=>e<=o,"comparisonFunc"),i=1/0):(a=h((e,o)=>e>=o,"comparisonFunc"),i=0),r.forEach(e=>{var c,s;let o=g==="TB"||g=="BT"?(c=C.get(e))==null?void 0:c.y:(s=C.get(e))==null?void 0:s.x;o!==void 0&&a(o,i)&&(t=e,i=o)}),t},"findClosestParent"),zt=h(r=>{let t="",a=1/0;return r.forEach(i=>{let e=C.get(i).y;e<=a&&(t=i,a=e)}),t||void 0},"findClosestParentBT"),Ht=h((r,t,a)=>{let i=a,e=a,o=[];r.forEach(c=>{let s=t.get(c);if(!s)throw Error(`Commit not found for key ${c}`);s.parents.length?(i=Dt(s),e=Math.max(i,e)):o.push(s),Nt(s,i)}),i=e,o.forEach(c=>{Wt(c,i,a)}),r.forEach(c=>{let s=t.get(c);if(s!=null&&s.parents.length){let m=zt(s.parents);i=C.get(m).y-P,i<=e&&(e=i);let $=E.get(s.branch).pos,l=i-v;C.set(s.id,{x:$,y:l})}})},"setParallelBTPos"),St=h(r=>{var i;let t=U(r.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${r.id}`);let a=(i=C.get(t))==null?void 0:i.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${r.id}`);return a},"findClosestParentPos"),Dt=h(r=>St(r)+P,"calculateCommitPosition"),Nt=h((r,t)=>{let a=E.get(r.branch);if(!a)throw Error(`Branch not found for commit ${r.id}`);let i=a.pos,e=t+v;return C.set(r.id,{x:i,y:e}),{x:i,y:e}},"setCommitPosition"),Wt=h((r,t,a)=>{let i=E.get(r.branch);if(!i)throw Error(`Branch not found for commit ${r.id}`);let e=t+a,o=i.pos;C.set(r.id,{x:o,y:e})},"setRootPosition"),jt=h((r,t,a,i,e,o)=>{if(o===p.HIGHLIGHT)r.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${e%G} ${i}-outer`),r.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${e%G} ${i}-inner`);else if(o===p.CHERRY_PICK)r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`);else{let c=r.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${e%G}`),o===p.MERGE){let s=r.append("circle");s.attr("cx",a.x),s.attr("cy",a.y),s.attr("r",6),s.attr("class",`commit ${i} ${t.id} commit${e%G}`)}o===p.REVERSE&&r.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${i} ${t.id} commit${e%G}`)}},"drawCommitBullet"),_t=h((r,t,a,i)=>{var e;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){let o=r.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),s=o.append("text").attr("x",i).attr("y",a.y+25).attr("class","commit-label").text(t.id),m=(e=s.node())==null?void 0:e.getBBox();if(m&&(c.attr("x",a.posWithOffset-m.width/2-T).attr("y",a.y+13.5).attr("width",m.width+2*T).attr("height",m.height+2*T),g==="TB"||g==="BT"?(c.attr("x",a.x-(m.width+4*L+5)).attr("y",a.y-12),s.attr("x",a.x-(m.width+4*L)).attr("y",a.y+m.height-12)):s.attr("x",a.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let $=-7.5-(m.width+10)/25*9.5,l=10+m.width/25*8.5;o.attr("transform","translate("+$+", "+l+") rotate(-45, "+i+", "+a.y+")")}}},"drawCommitLabel"),Kt=h((r,t,a,i)=>{var e;if(t.tags.length>0){let o=0,c=0,s=0,m=[];for(let $ of t.tags.reverse()){let l=r.insert("polygon"),y=r.append("circle"),d=r.append("text").attr("y",a.y-16-o).attr("class","tag-label").text($),x=(e=d.node())==null?void 0:e.getBBox();if(!x)throw Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),d.attr("x",a.posWithOffset-x.width/2),m.push({tag:d,hole:y,rect:l,yOffset:o}),o+=20}for(let{tag:$,hole:l,rect:y,yOffset:d}of m){let x=s/2,b=a.y-19.2-d;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
var J;import"./chunk-TCCFYFTB-49JL9s9e.js";import"./main-DrBRErTM.js";import"./purify.es-Cf8RQecB.js";import{u as Q}from"./src-Bp_72rVO.js";import{g as X,i as Z,m as tt}from"./chunk-S3R3BYOJ-CSHQgcuP.js";import{n as h,r as u}from"./src-CW27-Kjl.js";import{B as rt,C as et,K as at,U as ot,_ as it,a as st,b as ct,d as nt,s as k,v as dt,y as ht,z as mt}from"./chunk-ABZYJK2D-DXJ7hnjx.js";import"./dist-COnmrAVZ.js";import"./chunk-UMXZTB3W-Bt-_br31.js";import"./chunk-4F5CHEZ2-BGeTOmrq.js";import"./chunk-FRFDVMJY-CUDE-MUX.js";import"./chunk-SJTYNZTY-C9cwtT3h.js";import"./chunk-PL6DKKU2-DMqBvHTF.js";import"./chunk-TQ3KTPDO-CUyT9lNN.js";import"./chunk-B2363JML-Cmh9TPpj.js";import{t as lt}from"./chunk-4BX2VUAB-DOQhLGwX.js";import{t as $t}from"./mermaid-parser.core-CdM8D_p_.js";import{t as yt}from"./chunk-QZHKN3VN-D3EIvP2i.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},gt=nt.gitGraph,A=h(()=>Z({...gt,...ht().gitGraph}),"getConfig"),n=new yt(()=>{let r=A(),t=r.mainBranchName,a=r.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:a}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function z(){return tt({length:7})}h(z,"getID");function j(r,t){let a=Object.create(null);return r.reduce((i,e)=>{let o=t(e);return a[o]||(a[o]=!0,i.push(e)),i},[])}h(j,"uniqBy");var pt=h(function(r){n.records.direction=r},"setDirection"),xt=h(function(r){u.debug("options str",r),r=r==null?void 0:r.trim(),r||(r="{}");try{n.records.options=JSON.parse(r)}catch(t){u.error("error while parsing gitGraph options",t.message)}},"setOptions"),ft=h(function(){return n.records.options},"getOptions"),ut=h(function(r){let t=r.msg,a=r.id,i=r.type,e=r.tags;u.info("commit",t,a,i,e),u.debug("Entering commit:",t,a,i,e);let o=A();a=k.sanitizeText(a,o),t=k.sanitizeText(t,o),e=e==null?void 0:e.map(s=>k.sanitizeText(s,o));let c={id:a||n.records.seq+"-"+z(),message:t,seq:n.records.seq++,type:i??p.NORMAL,tags:e??[],parents:n.records.head==null?[]:[n.records.head.id],branch:n.records.currBranch};n.records.head=c,u.info("main branch",o.mainBranchName),n.records.commits.has(c.id)&&u.warn(`Commit ID ${c.id} already exists`),n.records.commits.set(c.id,c),n.records.branches.set(n.records.currBranch,c.id),u.debug("in pushCommit "+c.id)},"commit"),bt=h(function(r){let t=r.name,a=r.order;if(t=k.sanitizeText(t,A()),n.records.branches.has(t))throw 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}")`);n.records.branches.set(t,n.records.head==null?null:n.records.head.id),n.records.branchConfig.set(t,{name:t,order:a}),_(t),u.debug("in createBranch")},"branch"),wt=h(r=>{let t=r.branch,a=r.id,i=r.type,e=r.tags,o=A();t=k.sanitizeText(t,o),a&&(a=k.sanitizeText(a,o));let c=n.records.branches.get(n.records.currBranch),s=n.records.branches.get(t),m=c?n.records.commits.get(c):void 0,$=s?n.records.commits.get(s):void 0;if(m&&$&&m.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(n.records.currBranch===t){let d=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(m===void 0||!m){let d=Error(`Incorrect usage of "merge". Current branch (${n.records.currBranch})has no commits`);throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},d}if(!n.records.branches.has(t)){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},d}if($===void 0||!$){let d=Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},d}if(m===$){let d=Error('Incorrect usage of "merge". Both branches have same head');throw d.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},d}if(a&&n.records.commits.has(a)){let d=Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw d.hash={text:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,token:`merge ${t} ${a} ${i} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${t} ${a}_UNIQUE ${i} ${e==null?void 0:e.join(" ")}`]},d}let l=s||"",y={id:a||`${n.records.seq}-${z()}`,message:`merged branch ${t} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,l],branch:n.records.currBranch,type:p.MERGE,customType:i,customId:!!a,tags:e??[]};n.records.head=y,n.records.commits.set(y.id,y),n.records.branches.set(n.records.currBranch,y.id),u.debug(n.records.branches),u.debug("in mergeBranch")},"merge"),Bt=h(function(r){let t=r.id,a=r.targetId,i=r.tags,e=r.parent;u.debug("Entering cherryPick:",t,a,i);let o=A();if(t=k.sanitizeText(t,o),a=k.sanitizeText(a,o),i=i==null?void 0:i.map(m=>k.sanitizeText(m,o)),e=k.sanitizeText(e,o),!t||!n.records.commits.has(t)){let m=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},m}let c=n.records.commits.get(t);if(c===void 0||!c)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(c.parents)&&c.parents.includes(e)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let s=c.branch;if(c.type===p.MERGE&&!e)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!n.records.commits.has(a)){if(s===n.records.currBranch){let y=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let m=n.records.branches.get(n.records.currBranch);if(m===void 0||!m){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let $=n.records.commits.get(m);if($===void 0||!$){let y=Error(`Incorrect usage of "cherry-pick". Current branch (${n.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${t} ${a}`,token:`cherryPick ${t} ${a}`,expected:["cherry-pick abc"]},y}let l={id:n.records.seq+"-"+z(),message:`cherry-picked ${c==null?void 0:c.message} into ${n.records.currBranch}`,seq:n.records.seq++,parents:n.records.head==null?[]:[n.records.head.id,c.id],branch:n.records.currBranch,type:p.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${e}`:""}`]};n.records.head=l,n.records.commits.set(l.id,l),n.records.branches.set(n.records.currBranch,l.id),u.debug(n.records.branches),u.debug("in cherryPick")}},"cherryPick"),_=h(function(r){if(r=k.sanitizeText(r,A()),n.records.branches.has(r)){n.records.currBranch=r;let t=n.records.branches.get(n.records.currBranch);t===void 0||!t?n.records.head=null:n.records.head=n.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw t.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},t}},"checkout");function D(r,t,a){let i=r.indexOf(t);i===-1?r.push(a):r.splice(i,1,a)}h(D,"upsert");function N(r){let t=r.reduce((e,o)=>e.seq>o.seq?e:o,r[0]),a="";r.forEach(function(e){e===t?a+=" *":a+=" |"});let i=[a,t.id,t.seq];for(let e in n.records.branches)n.records.branches.get(e)===t.id&&i.push(e);if(u.debug(i.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let e=n.records.commits.get(t.parents[0]);D(r,t,e),t.parents[1]&&r.push(n.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){let e=n.records.commits.get(t.parents[0]);D(r,t,e)}}r=j(r,e=>e.id),N(r)}h(N,"prettyPrintCommitHistory");var Et=h(function(){u.debug(n.records.commits);let r=K()[0];N([r])},"prettyPrint"),Ct=h(function(){n.reset(),st()},"clear"),kt=h(function(){return[...n.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Lt=h(function(){return n.records.branches},"getBranches"),Tt=h(function(){return n.records.commits},"getCommits"),K=h(function(){let r=[...n.records.commits.values()];return r.forEach(function(t){u.debug(t.id)}),r.sort((t,a)=>t.seq-a.seq),r},"getCommitsArray"),F={commitType:p,getConfig:A,setDirection:pt,setOptions:xt,getOptions:ft,commit:ut,branch:bt,merge:wt,cherryPick:Bt,checkout:_,prettyPrint:Et,clear:Ct,getBranchesAsObjArray:kt,getBranches:Lt,getCommits:Tt,getCommitsArray:K,getCurrentBranch:h(function(){return n.records.currBranch},"getCurrentBranch"),getDirection:h(function(){return n.records.direction},"getDirection"),getHead:h(function(){return n.records.head},"getHead"),setAccTitle:rt,getAccTitle:dt,getAccDescription:it,setAccDescription:mt,setDiagramTitle:ot,getDiagramTitle:et},Mt=h((r,t)=>{lt(r,t),r.dir&&t.setDirection(r.dir);for(let a of r.statements)vt(a,t)},"populate"),vt=h((r,t)=>{let a={Commit:h(i=>t.commit(Pt(i)),"Commit"),Branch:h(i=>t.branch(Rt(i)),"Branch"),Merge:h(i=>t.merge(At(i)),"Merge"),Checkout:h(i=>t.checkout(Gt(i)),"Checkout"),CherryPicking:h(i=>t.cherryPick(Ot(i)),"CherryPicking")}[r.$type];a?a(r):u.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),Pt=h(r=>({id:r.id,msg:r.message??"",type:r.type===void 0?p.NORMAL:p[r.type],tags:r.tags??void 0}),"parseCommit"),Rt=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),At=h(r=>({branch:r.branch,id:r.id??"",type:r.type===void 0?void 0:p[r.type],tags:r.tags??void 0}),"parseMerge"),Gt=h(r=>r.branch,"parseCheckout"),Ot=h(r=>{var t;return{id:r.id,targetId:"",tags:((t=r.tags)==null?void 0:t.length)===0?void 0:r.tags,parent:r.parent}},"parseCherryPicking"),It={parse:h(async r=>{let t=await $t("gitGraph",r);u.debug(t),Mt(t,F)},"parse")},f=(J=ct())==null?void 0:J.gitGraph,v=10,P=40,L=4,T=2,G=8,E=new Map,C=new Map,H=30,I=new Map,S=[],R=0,g="LR",qt=h(()=>{E.clear(),C.clear(),I.clear(),R=0,S=[],g="LR"},"clear"),Y=h(r=>{let t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(a=>{let i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=a.trim(),t.appendChild(i)}),t},"drawText"),U=h(r=>{let t,a,i;return g==="BT"?(a=h((e,o)=>e<=o,"comparisonFunc"),i=1/0):(a=h((e,o)=>e>=o,"comparisonFunc"),i=0),r.forEach(e=>{var c,s;let o=g==="TB"||g=="BT"?(c=C.get(e))==null?void 0:c.y:(s=C.get(e))==null?void 0:s.x;o!==void 0&&a(o,i)&&(t=e,i=o)}),t},"findClosestParent"),zt=h(r=>{let t="",a=1/0;return r.forEach(i=>{let e=C.get(i).y;e<=a&&(t=i,a=e)}),t||void 0},"findClosestParentBT"),Ht=h((r,t,a)=>{let i=a,e=a,o=[];r.forEach(c=>{let s=t.get(c);if(!s)throw Error(`Commit not found for key ${c}`);s.parents.length?(i=Dt(s),e=Math.max(i,e)):o.push(s),Nt(s,i)}),i=e,o.forEach(c=>{Wt(c,i,a)}),r.forEach(c=>{let s=t.get(c);if(s!=null&&s.parents.length){let m=zt(s.parents);i=C.get(m).y-P,i<=e&&(e=i);let $=E.get(s.branch).pos,l=i-v;C.set(s.id,{x:$,y:l})}})},"setParallelBTPos"),St=h(r=>{var i;let t=U(r.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${r.id}`);let a=(i=C.get(t))==null?void 0:i.y;if(a===void 0)throw Error(`Closest parent position not found for commit ${r.id}`);return a},"findClosestParentPos"),Dt=h(r=>St(r)+P,"calculateCommitPosition"),Nt=h((r,t)=>{let a=E.get(r.branch);if(!a)throw Error(`Branch not found for commit ${r.id}`);let i=a.pos,e=t+v;return C.set(r.id,{x:i,y:e}),{x:i,y:e}},"setCommitPosition"),Wt=h((r,t,a)=>{let i=E.get(r.branch);if(!i)throw Error(`Branch not found for commit ${r.id}`);let e=t+a,o=i.pos;C.set(r.id,{x:o,y:e})},"setRootPosition"),jt=h((r,t,a,i,e,o)=>{if(o===p.HIGHLIGHT)r.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${e%G} ${i}-outer`),r.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${e%G} ${i}-inner`);else if(o===p.CHERRY_PICK)r.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`),r.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${i}`);else{let c=r.append("circle");if(c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${e%G}`),o===p.MERGE){let s=r.append("circle");s.attr("cx",a.x),s.attr("cy",a.y),s.attr("r",6),s.attr("class",`commit ${i} ${t.id} commit${e%G}`)}o===p.REVERSE&&r.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${i} ${t.id} commit${e%G}`)}},"drawCommitBullet"),_t=h((r,t,a,i)=>{var e;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){let o=r.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),s=o.append("text").attr("x",i).attr("y",a.y+25).attr("class","commit-label").text(t.id),m=(e=s.node())==null?void 0:e.getBBox();if(m&&(c.attr("x",a.posWithOffset-m.width/2-T).attr("y",a.y+13.5).attr("width",m.width+2*T).attr("height",m.height+2*T),g==="TB"||g==="BT"?(c.attr("x",a.x-(m.width+4*L+5)).attr("y",a.y-12),s.attr("x",a.x-(m.width+4*L)).attr("y",a.y+m.height-12)):s.attr("x",a.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{let $=-7.5-(m.width+10)/25*9.5,l=10+m.width/25*8.5;o.attr("transform","translate("+$+", "+l+") rotate(-45, "+i+", "+a.y+")")}}},"drawCommitLabel"),Kt=h((r,t,a,i)=>{var e;if(t.tags.length>0){let o=0,c=0,s=0,m=[];for(let $ of t.tags.reverse()){let l=r.insert("polygon"),y=r.append("circle"),d=r.append("text").attr("y",a.y-16-o).attr("class","tag-label").text($),x=(e=d.node())==null?void 0:e.getBBox();if(!x)throw Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),d.attr("x",a.posWithOffset-x.width/2),m.push({tag:d,hole:y,rect:l,yOffset:o}),o+=20}for(let{tag:$,hole:l,rect:y,yOffset:d}of m){let x=s/2,b=a.y-19.2-d;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${i-c/2-L/2},${b+T}
|
|
3
3
|
${i-c/2-L/2},${b-T}
|
|
4
4
|
${a.posWithOffset-c/2-L},${b-x-T}
|