@marimo-team/frontend 0.23.16-dev5 → 0.23.16-dev50
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-BalYv0pK.js → CellStatus-DciB5rbr.js} +1 -1
- package/dist/assets/{ConnectedDataExplorerComponent-DI7mV-Gw.js → ConnectedDataExplorerComponent-CXp99aFw.js} +1 -1
- package/dist/assets/{ErrorBoundary-C7_5jjWi.js → ErrorBoundary-DzTD8LVq.js} +1 -1
- package/dist/assets/{ImperativeModal-BIavOiUv.js → ImperativeModal-fY-ZfT0b.js} +1 -1
- package/dist/assets/JsonOutput-BM3vve9F.js +53 -0
- package/dist/assets/LazyAnyLanguageCodeMirror-DPOEues4.js +2 -0
- package/dist/assets/{MarimoErrorOutput-DO2k2fA5.js → MarimoErrorOutput-Bh0y53Du.js} +4 -4
- package/dist/assets/{RSPContexts-CgC81f0I.js → RSPContexts-WiCgGm__.js} +1 -1
- package/dist/assets/RenderHTML-B9jx7Dsm.js +1 -0
- package/dist/assets/{RunButton-BKRupqr7.js → RunButton-DMtHbFuA.js} +1 -1
- package/dist/assets/{add-cell-with-ai-CEZtaZCK.js → add-cell-with-ai-BcRYriMM.js} +35 -35
- package/dist/assets/add-connection-dialog-syjRSNPT.js +178 -0
- package/dist/assets/{agent-panel-CHB6t7Zy.js → agent-panel-B31W_VwU.js} +5 -5
- package/dist/assets/ai-model-dropdown-B3D05oQh.js +5 -0
- package/dist/assets/{alert-dialog-BXegNC0I.js → alert-dialog-Bb8Lz8ko.js} +1 -1
- package/dist/assets/{any-language-editor-DCpZRrpx.js → any-language-editor-BDvoKhJM.js} +1 -1
- package/dist/assets/apl-B-7blH-b.js +1 -0
- package/dist/assets/app-config-button-D_mjovwU.js +1 -0
- package/dist/assets/{arc-CfUZAQDm.js → arc-CezuXhk_.js} +1 -1
- package/dist/assets/{architecture-7HQA4BMR-Bvqj37EA.js → architecture-7HQA4BMR-Dy7zkjw8.js} +1 -1
- package/dist/assets/{architectureDiagram-VXUJARFQ-sx_yisiZ.js → architectureDiagram-VXUJARFQ-BmOSh2SW.js} +1 -1
- package/dist/assets/asciiarmor-D3K8amZ9.js +1 -0
- package/dist/assets/asn1-UGGn98tp.js +1 -0
- package/dist/assets/blob-BJREJiQp.js +1 -0
- package/dist/assets/{blockDiagram-VD42YOAC-KexI-fgH.js → blockDiagram-VD42YOAC-DHO0ifdn.js} +1 -1
- package/dist/assets/brainfuck-B4y4U3tg.js +1 -0
- package/dist/assets/{button-eIihcbUw.js → button-DDGiD1NW.js} +1 -1
- package/dist/assets/{c4Diagram-YG6GDRKO-d8NrlxRF.js → c4Diagram-YG6GDRKO-ByToYMes.js} +1 -1
- package/dist/assets/{cache-panel-wllSTlbM.js → cache-panel-Bvnkzrzd.js} +1 -1
- package/dist/assets/{capabilities-B09j1Eor.js → capabilities-DoEg0XwL.js} +1 -1
- package/dist/assets/{cell-editor-B5JVq7_q.js → cell-editor-BOhZHoLm.js} +17 -17
- package/dist/assets/cell-link-DqNEv3f9.js +1 -0
- package/dist/assets/cells-Jr-5Pc9f.js +235 -0
- package/dist/assets/channel-hYe4T32r.js +1 -0
- package/dist/assets/{chat-display-BG08ltQ3.js → chat-display-Djy1Jt6b.js} +1 -1
- package/dist/assets/{chat-panel-P2CzCtXJ.js → chat-panel-B2nYSE_l.js} +4 -4
- package/dist/assets/{chat-ui-fAJZAoTD.js → chat-ui-DlG0En7w.js} +4 -4
- package/dist/assets/{chunk-4BX2VUAB-fhh1HlXH.js → chunk-4BX2VUAB-BsEakQWN.js} +1 -1
- package/dist/assets/chunk-55IACEB6-DkGbQmsa.js +1 -0
- package/dist/assets/{chunk-5FQGJX7Z-Cp0LZT-a.js → chunk-5FQGJX7Z-BEbM01OT.js} +2 -2
- package/dist/assets/{chunk-ABZYJK2D-BtK4zInQ.js → chunk-ABZYJK2D-CCNXe-E2.js} +3 -3
- package/dist/assets/{chunk-ATLVNIR6-YZDenslF.js → chunk-ATLVNIR6-yY0weiRB.js} +1 -1
- package/dist/assets/{chunk-B4BG7PRW-DYIZwDbt.js → chunk-B4BG7PRW-DtjHcIBO.js} +1 -1
- package/dist/assets/{chunk-CVBHYZKI-CIyHeK0Q.js → chunk-CVBHYZKI-D1ar3Zzb.js} +1 -1
- package/dist/assets/{chunk-DI55MBZ5-TodwBGEN.js → chunk-DI55MBZ5-BxB9Lmc6.js} +1 -1
- package/dist/assets/{chunk-EXTU4WIE-C76bF1UD.js → chunk-EXTU4WIE-Do43HMrz.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-Yq65IDPA.js → chunk-FMBD7UC4-FWkYBdS7.js} +1 -1
- package/dist/assets/{chunk-HN2XXSSU-CcbN4n6W.js → chunk-HN2XXSSU-nVY6M8Me.js} +1 -1
- package/dist/assets/{chunk-JA3XYJ7Z-CPXEu7AX.js → chunk-JA3XYJ7Z-52dYwyoT.js} +1 -1
- package/dist/assets/{chunk-JZLCHNYA-D8q1z6Py.js → chunk-JZLCHNYA-BHSouLxk.js} +1 -1
- package/dist/assets/{chunk-MI3HLSF2-bmomnexd.js → chunk-MI3HLSF2-BwgHEi3_.js} +1 -1
- package/dist/assets/{chunk-N4CR4FBY-BhsjB2qn.js → chunk-N4CR4FBY-BkAnRh0J.js} +2 -2
- package/dist/assets/{chunk-QN33PNHL-ngvPqyQ0.js → chunk-QN33PNHL-DWzHlkYI.js} +1 -1
- package/dist/assets/{chunk-QXUST7PY-C4c0Sjmn.js → chunk-QXUST7PY-CjtWgrZg.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-CkbwBDOS.js → chunk-QZHKN3VN-CmAwpNoC.js} +1 -1
- package/dist/assets/{chunk-S3R3BYOJ-Bt2NnquF.js → chunk-S3R3BYOJ-DcZAYEft.js} +1 -1
- package/dist/assets/{chunk-TZMSLE5B-Dysko1OC.js → chunk-TZMSLE5B-D2-o8-XQ.js} +1 -1
- package/dist/assets/classDiagram-2ON5EDUG-DapsPtpH.js +1 -0
- package/dist/assets/classDiagram-v2-WZHVMYZB-Oa2f7U6n.js +1 -0
- package/dist/assets/{clike-DKPr2D1_.js → clike-BAN6KopO.js} +1 -1
- package/dist/assets/clojure-BAZ-ejkG.js +1 -0
- package/dist/assets/cmake-jWn0xN9y.js +1 -0
- package/dist/assets/cobol-XqY9jaWP.js +1 -0
- package/dist/assets/{code-block-37QAKDTI-DlENujeV.js → code-block-37QAKDTI-DdMTHZGu.js} +1 -1
- package/dist/assets/coffeescript-DI1jfZHX.js +1 -0
- package/dist/assets/{column-preview-Dne1dIt0.js → column-preview-BUHlI5va.js} +1 -1
- package/dist/assets/{command-CAJLPEBq.js → command-Dqxie4gq.js} +1 -1
- package/dist/assets/{command-palette-iOCqUIs1.js → command-palette-rEJmXCZM.js} +1 -1
- package/dist/assets/{common-CD6Mj8n6.js → common-CZc3fQI4.js} +1 -1
- package/dist/assets/commonlisp-UKb01OlU.js +1 -0
- package/dist/assets/components-GAYCj6Mx.js +1 -0
- package/dist/assets/config-B-Q7J_6d.js +1 -0
- package/dist/assets/{config-COUOIPEq.js → config-BJVx3eBW.js} +1 -1
- package/dist/assets/{copy-BtTOqPTS.js → copy-Bxb1_Gtw.js} +1 -1
- package/dist/assets/{copy-icon-C2pG0ZNK.js → copy-icon-neDQUo4Q.js} +1 -1
- package/dist/assets/{cose-bilkent-S5V4N54A-BlMw4-M9.js → cose-bilkent-S5V4N54A-B4-5phSs.js} +1 -1
- package/dist/assets/{createReducer-C7kZ8zEe.js → createReducer-DGx5Af-C.js} +1 -1
- package/dist/assets/crystal-DOvjTBWA.js +1 -0
- package/dist/assets/{css-DsUcFZz8.js → css-DWLxGm3Z.js} +1 -1
- package/dist/assets/cypher-CLDhu2ae.js +1 -0
- package/dist/assets/d-C0ecUZk9.js +1 -0
- package/dist/assets/{dagre-6UL2VRFP-kJ4x17JK.js → dagre-6UL2VRFP-2XhH1Ri-.js} +1 -1
- package/dist/assets/{data-grid-overlay-editor-DbobQcVo.js → data-grid-overlay-editor-B4LrPNw9.js} +1 -1
- package/dist/assets/{datasource-ySAiC9gr.js → datasource-AWkkAeiS.js} +2 -2
- package/dist/assets/{dates-D-kIKDYA.js → dates-C2LWzsCZ.js} +1 -1
- package/dist/assets/{dependency-graph-panel-BF23EwcD.js → dependency-graph-panel-wcqTPq6b.js} +3 -3
- package/dist/assets/{diagram-PSM6KHXK-d-5aQNHk.js → diagram-PSM6KHXK-CAqt0euW.js} +1 -1
- package/dist/assets/{diagram-QEK2KX5R-CO-PXq75.js → diagram-QEK2KX5R-D5cgX3Vp.js} +1 -1
- package/dist/assets/{diagram-S2PKOQOG-Dv7pcvYC.js → diagram-S2PKOQOG-ibWavdR5.js} +1 -1
- package/dist/assets/{dialog-D1DEsRZ2.js → dialog-BCVepWLJ.js} +1 -1
- package/dist/assets/diff-657cCCVc.js +1 -0
- package/dist/assets/{dist-CRrIf3gB.js → dist-7L5iW3e_.js} +1 -1
- package/dist/assets/{dist-ByVeMWkr.js → dist-BLN8PNJV.js} +1 -1
- package/dist/assets/{dist-R1kU4nzJ.js → dist-Bcpo9599.js} +1 -1
- package/dist/assets/{dist-DQNaXfK1.js → dist-BrZHhdmA.js} +1 -1
- package/dist/assets/dist-C00gHjPp.js +1 -0
- package/dist/assets/{dist-0QUuSoRx.js → dist-C4El4p_-.js} +1 -1
- package/dist/assets/{dist-BsphJPAV.js → dist-CIYjZ11d.js} +1 -1
- package/dist/assets/{dist-Du-wcJyR.js → dist-COTjOJlM.js} +1 -1
- package/dist/assets/dist-CWNfBqYo.js +1 -0
- package/dist/assets/dist-Cck3fpDq.js +1 -0
- package/dist/assets/dist-CiVShZKM.js +2 -0
- package/dist/assets/{dist-CECF_J8y.js → dist-DIQO2yAn.js} +1 -1
- package/dist/assets/{dist-BMOD2Pyh.js → dist-DabFEfar.js} +1 -1
- package/dist/assets/dist-f5euh_Pv.js +1 -0
- package/dist/assets/{dist-CDUl-YL4.js → dist-ryTWanRP.js} +1 -1
- package/dist/assets/{dist-6c4zOh78.js → dist-sg9T7Ulw.js} +1 -1
- package/dist/assets/{dist-sPfKr-vH.js → dist-wSuqFvon.js} +1 -1
- package/dist/assets/{dockerfile-C2PznFWk.js → dockerfile-kqVBOcIP.js} +1 -1
- package/dist/assets/{documentation-panel-e9Fi9R7e.js → documentation-panel-Eu8MIkoU.js} +1 -1
- package/dist/assets/download-CQ7iZFJL.js +9 -0
- package/dist/assets/{dropdown-menu-BFZLnWeO.js → dropdown-menu-dHmZR8bI.js} +1 -1
- package/dist/assets/dtd-DSiK7Qgi.js +1 -0
- package/dist/assets/dylan-07d5-7Q9.js +1 -0
- package/dist/assets/ecl-CSTUHiwq.js +1 -0
- package/dist/assets/{edit-page-7X3HYey7.js → edit-page-zyK_cMuR.js} +6 -6
- package/dist/assets/eiffel-DR99GcsM.js +1 -0
- package/dist/assets/elm-Cmh0iW6J.js +1 -0
- package/dist/assets/{erDiagram-Q2GNP2WA-BQ8HfnRu.js → erDiagram-Q2GNP2WA-BaY7iomT.js} +1 -1
- package/dist/assets/erlang-CS9Yc6UC.js +1 -0
- package/dist/assets/{error-banner-B6eIlxzg.js → error-banner-BSxEOIn2.js} +1 -1
- package/dist/assets/error-entries-Cr8uVukN.js +8 -0
- package/dist/assets/{error-panel-DdsUL6b7.js → error-panel-BZzr0PA1.js} +1 -1
- package/dist/assets/{es-1D83cgiu.js → es-gYgfF8y5.js} +1 -1
- package/dist/assets/{esm-BL7jQmzn.js → esm-B30N1GS0.js} +1 -1
- package/dist/assets/{esm-Cmv0Nuxi.js → esm-DqItXpGT.js} +1 -1
- package/dist/assets/{factor-DMrXrOH8.js → factor-D96xahcJ.js} +1 -1
- package/dist/assets/factor-DjB27Lcf.js +1 -0
- package/dist/assets/{field-BeZbVzXA.js → field-BsxD35VE.js} +1 -1
- package/dist/assets/file-explorer-panel-C1W7g_Wp.js +26 -0
- package/dist/assets/{file-icons-Cb54mIL8.js → file-icons-BAqZR08W.js} +1 -1
- package/dist/assets/{file-name-input-BWFcK1ey.js → file-name-input-0MiZVw5r.js} +1 -1
- package/dist/assets/{fileToBase64-C2Yy-YXq.js → fileToBase64-Dgfa7TRQ.js} +1 -1
- package/dist/assets/floating-outline-C6g75zrP.js +1 -0
- package/dist/assets/{flowDiagram-NV44I4VS-xBOzhlfg.js → flowDiagram-NV44I4VS-C_6PGGE6.js} +1 -1
- package/dist/assets/focus-C0HXXg3V.js +1 -0
- package/dist/assets/form-C051zAev.js +1 -0
- package/dist/assets/{form-B6BkSCJb.js → form-DT44Rmhp.js} +2 -2
- package/dist/assets/{formats-ClEFGPy-.js → formats-DzmLpc9A.js} +1 -1
- package/dist/assets/{formatting-B_41gSF5.js → formatting-DQX9QUSf.js} +1 -1
- package/dist/assets/forth-UwTUu7NY.js +1 -0
- package/dist/assets/fortran-cptiB4gJ.js +1 -0
- package/dist/assets/{fullscreen-dUjPYOmm.js → fullscreen-CTDqNQr6.js} +1 -1
- package/dist/assets/{gallery-page-CWQQAYpa.js → gallery-page-CL1y8LXc.js} +1 -1
- package/dist/assets/{ganttDiagram-JELNMOA3-D2O_k-Zg.js → ganttDiagram-JELNMOA3-CJFyE5hs.js} +1 -1
- package/dist/assets/gas-ajMbd9Us.js +1 -0
- package/dist/assets/gherkin-ClYkalzE.js +1 -0
- package/dist/assets/{gitGraph-G5XIXVHT-8HJwNcdU.js → gitGraph-G5XIXVHT-BP96QVP9.js} +1 -1
- package/dist/assets/{gitGraphDiagram-V2S2FVAM-Nk4Ll9GY.js → gitGraphDiagram-V2S2FVAM-CGQPWKR8.js} +1 -1
- package/dist/assets/{glide-data-editor-lMARFWHS.js → glide-data-editor-Badziq3Y.js} +4 -4
- package/dist/assets/groovy-BY-gt7AW.js +1 -0
- package/dist/assets/haskell-D1BeJ7SR.js +1 -0
- package/dist/assets/haxe-QOq5WFXx.js +1 -0
- package/dist/assets/home-page-CJz9IHZ2.js +4 -0
- package/dist/assets/{html-to-image-CwmX28T9.js → html-to-image-CfjhKLA4.js} +2 -2
- package/dist/assets/idl-3-UcEGx7.js +1 -0
- package/dist/assets/index-BGE_j_ZS.js +38 -0
- package/dist/assets/index-D6Dp_PFj.css +2 -0
- package/dist/assets/{info-VBDWY6EO-rfe3WPvd.js → info-VBDWY6EO-B7aeNYNu.js} +1 -1
- package/dist/assets/infoDiagram-HS3SLOUP-BT7ISZ3J.js +2 -0
- package/dist/assets/{input-CqrUjynb.js → input-JxFwu-3G.js} +1 -1
- package/dist/assets/javascript-CorD44JN.js +1 -0
- package/dist/assets/{journeyDiagram-XKPGCS4Q-D61FGivn.js → journeyDiagram-XKPGCS4Q-DhyWkFu7.js} +1 -1
- package/dist/assets/julia-BYqTtTAl.js +1 -0
- package/dist/assets/{kanban-definition-3W4ZIXB7-Bnv0X0Tu.js → kanban-definition-3W4ZIXB7-B2A0FPA_.js} +1 -1
- package/dist/assets/katex-BnxSCReZ.js +1 -0
- package/dist/assets/kiosk-mode-CWGEgpon.js +1 -0
- package/dist/assets/{label-BElwWzf0.js → label-CqjrpwRC.js} +1 -1
- package/dist/assets/{layout-CUlZijwG.js → layout-D4bpsgVD.js} +5 -5
- package/dist/assets/{line-DNm2phYo.js → line-1dURhxkp.js} +1 -1
- package/dist/assets/{linear-CTQqNbVX.js → linear-gmSPLe7o.js} +1 -1
- package/dist/assets/{links-CToBjIIj.js → links-CiT7FeSM.js} +1 -1
- package/dist/assets/livescript-qYgfNnNE.js +1 -0
- package/dist/assets/logs-panel-CsaY3O1m.js +1 -0
- package/dist/assets/{loro_wasm_bg-Duqr-kJ2.js → loro_wasm_bg-DWuCVDfB.js} +1 -1
- package/dist/assets/lua-BCqCjdfz.js +1 -0
- package/dist/assets/{markdown-renderer-QvXG0CRk.js → markdown-renderer-BgqeO4JR.js} +3 -3
- package/dist/assets/mathematica-XKwMfn0d.js +1 -0
- package/dist/assets/mbox-BnkeOnif.js +1 -0
- package/dist/assets/{menu-items-DbSLBfXR.js → menu-items-CCi6aOPm.js} +1 -1
- package/dist/assets/{mermaid-4DMBBIKO-CDGmT6YQ.js → mermaid-4DMBBIKO-DxfSuOnE.js} +1 -1
- package/dist/assets/{mermaid-Bh0flEIb.js → mermaid-Dfx05w1B.js} +3 -3
- package/dist/assets/{mermaid-parser.core-Dz2GMGqQ.js → mermaid-parser.core-OagDSIIt.js} +2 -2
- package/dist/assets/{mhchem-CIWniJp4.js → mhchem-Dka9kRKN.js} +1 -1
- package/dist/assets/{mindmap-definition-VGOIOE7T-C-YaKmEU.js → mindmap-definition-VGOIOE7T-torqqISZ.js} +1 -1
- package/dist/assets/mirc-ipoElhai.js +1 -0
- package/dist/assets/mllike-DmouQ5Dp.js +1 -0
- package/dist/assets/modelica-BtmmVsUf.js +1 -0
- package/dist/assets/mscgen-BHZmHZgz.js +1 -0
- package/dist/assets/mumps-oKfoFTl_.js +1 -0
- package/dist/assets/{name-cell-input-C6cukQ9k.js → name-cell-input-DcU8Rfrz.js} +1 -1
- package/dist/assets/node-sql-parser-Dpr10aqR.js +68 -0
- package/dist/assets/nsis-DDOPnuAW.js +1 -0
- package/dist/assets/{nsis-Ccvd1gbp.js → nsis-gzbsJ5t0.js} +1 -1
- package/dist/assets/ntriples-Dsyl_sOF.js +1 -0
- package/dist/assets/{number-overlay-editor-BQ9P6yP7.js → number-overlay-editor-DlQjqV32.js} +1 -1
- package/dist/assets/{numbers-CeeaFKqu.js → numbers-rmawRqQP.js} +1 -1
- package/dist/assets/octave-CI5RGMPa.js +1 -0
- package/dist/assets/{ordinal-DyTNGK17.js → ordinal-W4TcDjiJ.js} +1 -1
- package/dist/assets/{outline-panel-BPlg9_CE.js → outline-panel-D-CHPZQM.js} +1 -1
- package/dist/assets/oz-D01pKAWx.js +1 -0
- package/dist/assets/{packages-panel-BzQF60rG.js → packages-panel-dq7QVZl1.js} +1 -1
- package/dist/assets/{packet-DYOGHKS2-DTVloLa7.js → packet-DYOGHKS2-B2FlK_cc.js} +1 -1
- package/dist/assets/pair-with-agent-modal-D2vO1D8g.js +4 -0
- package/dist/assets/panels-DWoniKhE.js +4 -0
- package/dist/assets/pascal-DGXfnIFD.js +1 -0
- package/dist/assets/perl-gZ7qIkF-.js +1 -0
- package/dist/assets/{pie-VRWISCQL-Bmght6JF.js → pie-VRWISCQL-rtCNhZhm.js} +1 -1
- package/dist/assets/{pieDiagram-ADFJNKIX-DlFYL0BN.js → pieDiagram-ADFJNKIX-vSo1I9sb.js} +1 -1
- package/dist/assets/pig-Cb90ayl-.js +1 -0
- package/dist/assets/{popover-DrHQ3KEt.js → popover-Bcz1Zikb.js} +1 -1
- package/dist/assets/powershell-_YxddSL3.js +1 -0
- package/dist/assets/process-output-NbwnUu05.js +1 -0
- package/dist/assets/properties-sU50dmvt.js +1 -0
- package/dist/assets/protobuf-DFdF-yfo.js +1 -0
- package/dist/assets/{pug-BtXi5KiX.js → pug-CfBtO6QD.js} +1 -1
- package/dist/assets/pug-DwUB-C24.js +1 -0
- package/dist/assets/puppet-DtKzwiZ6.js +1 -0
- package/dist/assets/python-BMLOKYmk.js +1 -0
- package/dist/assets/q-BF1zXMdP.js +1 -0
- package/dist/assets/{quadrantDiagram-AYHSOK5B-BpJug2BH.js → quadrantDiagram-AYHSOK5B-DonUSsuk.js} +1 -1
- package/dist/assets/r-BQiKhVSI.js +1 -0
- package/dist/assets/{radar-ZZBFDIW7-CYwWzRgW.js → radar-ZZBFDIW7-CRVupj1O.js} +1 -1
- package/dist/assets/{radio-group-CLBjGkt5.js → radio-group-rhQpGwU-.js} +1 -1
- package/dist/assets/{react-vega-TNCk_eWj.js → react-vega-Bd66vLSZ.js} +1 -1
- package/dist/assets/{readonly-code-display-D63oRtBP.js → readonly-code-display-CVY2f7EZ.js} +1 -1
- package/dist/assets/{readonly-python-code-CW_G5e4E.js → readonly-python-code-Q_1Y3VyZ.js} +1 -1
- package/dist/assets/{renderShortcut-BZLr8D7H.js → renderShortcut-Bl8_FVn8.js} +1 -1
- package/dist/assets/{requirementDiagram-UZGBJVZJ-Bd-1eny8.js → requirementDiagram-UZGBJVZJ-D8rJ1Dg-.js} +1 -1
- package/dist/assets/{reveal-component-BLMTmd8T.js → reveal-component-CedpDwM8.js} +60 -60
- package/dist/assets/rpm-v7UTuaHo.js +1 -0
- package/dist/assets/ruby-Cw43FpG3.js +1 -0
- package/dist/assets/{run-page-B6pgDYEJ.js → run-page-CGoux5cj.js} +1 -1
- package/dist/assets/{runs-D51Xwrsk.js → runs-CZN8py6x.js} +1 -1
- package/dist/assets/{sankeyDiagram-TZEHDZUN-CDWAE6GV.js → sankeyDiagram-TZEHDZUN-Bufh177s.js} +1 -1
- package/dist/assets/sas-BIKscqlp.js +1 -0
- package/dist/assets/scheme-CGic3hSV.js +1 -0
- package/dist/assets/scratchpad-panel-BLuF25yR.js +1 -0
- package/dist/assets/{scroll-to-bottom-button-Cgr10kaJ.js → scroll-to-bottom-button-C8yfT4wq.js} +1 -1
- package/dist/assets/{secrets-panel-Cc5KDBk6.js → secrets-panel-4Qy7R-wy.js} +1 -1
- package/dist/assets/{select-B5TFNjmU.js → select-BP75_5jJ.js} +1 -1
- package/dist/assets/{sequenceDiagram-WL72ISMW-B6hjDGBF.js → sequenceDiagram-WL72ISMW-DOsQdDD2.js} +1 -1
- package/dist/assets/{session-CEFnN9Cq.js → session-BmukRjSi.js} +1 -1
- package/dist/assets/session-panel-OIot3eyB.js +1 -0
- package/dist/assets/{share-CYpcX4N4.js → share-852X_cqy.js} +1 -1
- package/dist/assets/shell-DAh545tm.js +1 -0
- package/dist/assets/sieve-bGkng63-.js +1 -0
- package/dist/assets/{skeleton-D3QPxqWC.js → skeleton-BRvjFlRu.js} +1 -1
- package/dist/assets/slides-DkEgzTJB.css +1 -0
- package/dist/assets/smalltalk-fIw53lm8.js +1 -0
- package/dist/assets/{snippets-panel-CXpGflMO.js → snippets-panel-YFyH2hUM.js} +1 -1
- package/dist/assets/sparql-CHbJrAY_.js +1 -0
- package/dist/assets/{spec-CzqcmYQk.js → spec-C7opZZRp.js} +1 -1
- package/dist/assets/{src-CIOdyciO.js → src-BSYB0gI9.js} +1 -1
- package/dist/assets/state-DB_fxbhn.js +3 -0
- package/dist/assets/{state-WBgc7MiA.js → state-DDag0B_B.js} +1 -1
- package/dist/assets/{state-BvdK8eiw.js → state-DFeun9PF.js} +1 -1
- package/dist/assets/{state-DBzEQtWz.js → state-bHyw5u3R.js} +1 -1
- package/dist/assets/{stateDiagram-FKZM4ZOC-Bzv6j99z.js → stateDiagram-FKZM4ZOC-z2ks4r_9.js} +1 -1
- package/dist/assets/stateDiagram-v2-4FDKWEC3-BApjXiT0.js +1 -0
- package/dist/assets/{step-CDlhJj9-.js → step-DIOVHicC.js} +1 -1
- package/dist/assets/{strings-Djnbwmfl.js → strings--BknHX9C.js} +1 -1
- package/dist/assets/stylus-3Q5WfXqT.js +1 -0
- package/dist/assets/swift-MKxc2knl.js +1 -0
- package/dist/assets/{swiper-component-DInvCxhI.js → swiper-component-C0ieyDzn.js} +1 -1
- package/dist/assets/switch-OVajJBPR.js +1 -0
- package/dist/assets/tcl-D3fKhQc_.js +1 -0
- package/dist/assets/{terminal-D3IQBBYo.js → terminal-D4sGJYRn.js} +1 -1
- package/dist/assets/textarea-DZB2bzVL.js +1 -0
- package/dist/assets/textile-Bi_LEJQ3.js +1 -0
- package/dist/assets/{time-BuRlxEhE.js → time-NXrJfoDM.js} +1 -1
- package/dist/assets/{timeline-definition-IT6M3QCI-DXwdU1og.js → timeline-definition-IT6M3QCI-BRuA290T.js} +1 -1
- package/dist/assets/toml-Dt-PBqwt.js +1 -0
- package/dist/assets/{tooltip-CFX4fYHU.js → tooltip-4bZlU7jl.js} +1 -1
- package/dist/assets/{tooltip-HLb6RxVp.js → tooltip-B7U4xkIN.js} +1 -1
- package/dist/assets/{tracing-CKn3gWHw.js → tracing-CDMM1BB2.js} +1 -1
- package/dist/assets/{tracing-panel-BU-o_LCd.js → tracing-panel-BH5Zbvl9.js} +2 -2
- package/dist/assets/{tree-actions-CsC2XmGo.js → tree-actions-DDveUIHK.js} +1 -1
- package/dist/assets/{treemap-GDKQZRPO-4Cm6HMmj.js → treemap-GDKQZRPO-DIzBBPQD.js} +1 -1
- package/dist/assets/troff-BSU-rxoD.js +1 -0
- package/dist/assets/ttcn-BmLjonVM.js +1 -0
- package/dist/assets/ttcn-cfg-TPTcP0Eh.js +1 -0
- package/dist/assets/turtle-HafmShQq.js +1 -0
- package/dist/assets/{useBoolean-D89u30n-.js → useBoolean-CFj86iac.js} +1 -1
- package/dist/assets/useCellActionButton-D5ix_g2a.js +1 -0
- package/dist/assets/{useDeleteCell-EPH4kcG7.js → useDeleteCell-BIopCngo.js} +1 -1
- package/dist/assets/{useDependencyPanelTab-CZnK7N2L.js → useDependencyPanelTab-snM337f9.js} +1 -1
- package/dist/assets/useEventListener-C0195JsF.js +1 -0
- package/dist/assets/{useHotkey-DIuRH8Wu.js → useHotkey-DLZvrRZT.js} +1 -1
- package/dist/assets/{useIframeCapabilities-Ccb4fvKc.js → useIframeCapabilities-j6fR_dBA.js} +1 -1
- package/dist/assets/{useInstallPackage-BRbUAUFn.js → useInstallPackage-WiYBwhUO.js} +1 -1
- package/dist/assets/{useInterval-CC0vKpWm.js → useInterval-Be6s6idX.js} +1 -1
- package/dist/assets/useNotebookActions-CsZfWFKy.js +12 -0
- package/dist/assets/{useRunCells-CSSF_mJ0.js → useRunCells-CF_V8X2K.js} +1 -1
- package/dist/assets/{useSplitCell-9Qz93yPZ.js → useSplitCell-BTmKY1CU.js} +1 -1
- package/dist/assets/{useTheme-KXqAyDPC.js → useTheme-Bxv9B31g.js} +1 -1
- package/dist/assets/{utils-Z80SV4_d.js → utils-BWBBpCkT.js} +1 -1
- package/dist/assets/vb-CUif5uGR.js +1 -0
- package/dist/assets/vbscript-DWVPFl59.js +1 -0
- package/dist/assets/{vega-component-Cie3ag_T.js → vega-component-BYd6AACD.js} +1 -1
- package/dist/assets/{vega-embed-container-hDAVOOba.js → vega-embed-container-CRADa99b.js} +1 -1
- package/dist/assets/velocity-BJl8UzB4.js +1 -0
- package/dist/assets/verilog-B4LUPYXy.js +1 -0
- package/dist/assets/vhdl-C91h3ipk.js +1 -0
- package/dist/assets/webidl-DOay1zbU.js +1 -0
- package/dist/assets/write-secret-modal-D-p66LIx.js +2 -0
- package/dist/assets/xquery-Cez7jD_4.js +1 -0
- package/dist/assets/{xychartDiagram-PRI3JC2R-Cb0exSKs.js → xychartDiagram-PRI3JC2R-BX6ICxcN.js} +1 -1
- package/dist/assets/yacas-CSQEXB_S.js +1 -0
- package/dist/assets/z80-CJbYj7Wr.js +1 -0
- package/dist/index.html +74 -73
- package/package.json +3 -4
- package/src/__mocks__/requests.ts +45 -4
- package/src/components/data-table/__tests__/__snapshots__/chart-spec-model.test.ts.snap +174 -21
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +102 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +163 -103
- package/src/components/data-table/column-summary/legacy-chart-spec.ts +15 -7
- package/src/components/data-table/column-summary/utils.ts +26 -7
- package/src/components/data-table/types.ts +1 -1
- package/src/components/editor/__tests__/viewer-banner.test.tsx +14 -0
- package/src/components/editor/actions/__tests__/pair-with-agent-commands.test.ts +99 -18
- package/src/components/editor/actions/__tests__/pdf-export.test.ts +32 -13
- package/src/components/editor/actions/pair-with-agent-commands.ts +21 -10
- package/src/components/editor/actions/pair-with-agent-modal.tsx +2 -2
- package/src/components/editor/actions/pdf-export.ts +11 -14
- package/src/components/editor/actions/useNotebookActions.tsx +18 -18
- package/src/components/editor/cell/code/__tests__/cell-editor-activity-lifecycle.test.ts +250 -0
- package/src/components/editor/cell/code/cell-editor.tsx +13 -7
- package/src/components/editor/chrome/panels/__tests__/logs-panel.test.tsx +25 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +12 -2
- package/src/components/editor/chrome/panels/write-secret-modal.tsx +40 -12
- package/src/components/editor/connections/__tests__/json-credentials.test.ts +114 -0
- package/src/components/editor/connections/__tests__/paths.test.ts +39 -0
- package/src/components/editor/connections/components.tsx +6 -2
- package/src/components/editor/connections/database/__tests__/__snapshots__/as-code.test.ts.snap +21 -5
- package/src/components/editor/connections/database/__tests__/as-code.test.ts +17 -0
- package/src/components/editor/connections/database/as-code.ts +16 -2
- package/src/components/editor/connections/database/schemas.ts +6 -5
- package/src/components/editor/connections/form-renderers.tsx +99 -1
- package/src/components/editor/connections/json-credentials.ts +57 -0
- package/src/components/editor/connections/paths.ts +21 -0
- package/src/components/editor/connections/secret-combobox.tsx +41 -20
- package/src/components/editor/connections/storage/__tests__/__snapshots__/as-code.test.ts.snap +88 -2
- package/src/components/editor/connections/storage/__tests__/as-code.test.ts +128 -8
- package/src/components/editor/connections/storage/as-code.ts +79 -36
- package/src/components/editor/connections/storage/schemas.ts +85 -44
- package/src/components/editor/file-tree/__tests__/renderers.test.ts +31 -0
- package/src/components/editor/file-tree/file-viewer.tsx +11 -7
- package/src/components/editor/file-tree/renderers.tsx +21 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +1 -1
- package/src/components/editor/viewer-banner.tsx +4 -1
- package/src/components/forms/options.ts +2 -1
- package/src/components/slides/__tests__/cell-output-block.test.tsx +40 -0
- package/src/components/slides/__tests__/slide-cell-view.test.tsx +33 -0
- package/src/components/slides/__tests__/slide-scroll-hint.test.tsx +198 -0
- package/src/components/slides/reveal-component.tsx +25 -19
- package/src/components/slides/slide-cell-view.tsx +1 -1
- package/src/components/slides/slide-scroll-hint.tsx +161 -0
- package/src/components/slides/slides.css +4 -2
- package/src/components/static-html/share-modal.tsx +1 -1
- package/src/components/ui/input.tsx +1 -1
- package/src/core/ai/context/providers/file.ts +8 -29
- package/src/core/cells/__tests__/cells.test.ts +12 -2
- package/src/core/cells/__tests__/logs.test.ts +5 -5
- package/src/core/cells/cells.ts +17 -4
- package/src/core/cells/document-changes.ts +1 -0
- package/src/core/cells/logs.ts +14 -4
- package/src/core/codemirror/copilot/__tests__/language-server.test.ts +396 -100
- package/src/core/codemirror/copilot/__tests__/transport.test.ts +128 -540
- package/src/core/codemirror/copilot/language-server.ts +182 -70
- package/src/core/codemirror/copilot/transport.ts +15 -207
- package/src/core/codemirror/copilot/types.ts +9 -2
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -30
- package/src/core/codemirror/find-replace/navigate.ts +2 -0
- package/src/core/codemirror/go-to-definition/__tests__/commands.test.ts +24 -3
- package/src/core/codemirror/go-to-definition/commands.ts +3 -0
- package/src/core/codemirror/keymaps/__tests__/keymaps.test.ts +31 -2
- package/src/core/codemirror/keymaps/keymaps.ts +12 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +443 -61
- package/src/core/codemirror/language/languages/python.ts +23 -11
- package/src/core/codemirror/language/languages/sql/completion-store.ts +5 -1
- package/src/core/codemirror/language/languages/sql/sql.ts +210 -3
- package/src/core/codemirror/lsp/__tests__/federated-lsp.test.ts +161 -0
- package/src/core/codemirror/lsp/__tests__/log-messages.test.ts +53 -0
- package/src/core/codemirror/lsp/__tests__/normalize-markdown-math.test.ts +25 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +598 -156
- package/src/core/codemirror/lsp/__tests__/transports.test.ts +112 -0
- package/src/core/codemirror/lsp/federated-lsp.ts +76 -23
- package/src/core/codemirror/lsp/log-messages.ts +37 -0
- package/src/core/codemirror/lsp/normalize-markdown-math.ts +8 -4
- package/src/core/codemirror/lsp/notebook-lsp.ts +220 -56
- package/src/core/codemirror/lsp/transports.ts +8 -1
- package/src/core/codemirror/lsp/types.ts +68 -8
- package/src/core/codemirror/lsp/utils.ts +14 -0
- package/src/core/codemirror/utils.ts +28 -0
- package/src/core/edit-app.tsx +1 -2
- package/src/core/export/__tests__/hooks.test.ts +2 -4
- package/src/core/export/hooks.ts +4 -3
- package/src/core/hotkeys/hotkeys.ts +0 -2
- package/src/core/islands/__tests__/bridge.test.ts +107 -0
- package/src/core/islands/bridge.ts +16 -0
- package/src/core/lsp/__tests__/transport.test.ts +509 -337
- package/src/core/lsp/transport.ts +304 -132
- package/src/core/mode.ts +10 -0
- package/src/core/network/__tests__/api.test.ts +42 -0
- package/src/core/network/__tests__/connection.test.ts +45 -0
- package/src/core/network/__tests__/requests-lazy.test.ts +32 -1
- package/src/core/network/__tests__/requests-network.test.ts +21 -0
- package/src/core/network/api.ts +27 -0
- package/src/core/network/connection.ts +15 -0
- package/src/core/network/requests-lazy.ts +1 -0
- package/src/core/network/requests-network.ts +14 -8
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.tsx +1 -0
- package/src/core/network/types.ts +22 -6
- package/src/core/rtc/state.ts +9 -0
- package/src/core/static/download-html.ts +5 -14
- package/src/core/wasm/bridge.ts +4 -2
- package/src/core/wasm/worker/types.ts +5 -2
- package/src/css/app/codemirror.css +16 -2
- package/src/plugins/impl/FormPlugin.tsx +1 -1
- package/src/plugins/impl/__tests__/FormPlugin.test.tsx +162 -0
- package/src/stories/log-viewer.stories.tsx +12 -6
- package/src/utils/__tests__/blob.test.ts +27 -1
- package/src/utils/__tests__/download.test.tsx +44 -4
- package/src/utils/blob.ts +24 -1
- package/src/utils/download.ts +14 -15
- package/dist/assets/JsonOutput-CkCD-FgM.js +0 -53
- package/dist/assets/LazyAnyLanguageCodeMirror-sVm_hz8A.js +0 -2
- package/dist/assets/RenderHTML-BCvU9dYz.js +0 -1
- package/dist/assets/add-connection-dialog-B-jCRNTN.js +0 -170
- package/dist/assets/ai-model-dropdown-DXgLphFa.js +0 -5
- package/dist/assets/apl-DTwRFDps.js +0 -1
- package/dist/assets/app-config-button-NrM9ywXA.js +0 -1
- package/dist/assets/asciiarmor-CiqkDK0s.js +0 -1
- package/dist/assets/asn1-RTvH5MEs.js +0 -1
- package/dist/assets/blob-C3EfaMOb.js +0 -1
- package/dist/assets/brainfuck-szH_VGzd.js +0 -1
- package/dist/assets/cell-link-DqBkyAFe.js +0 -1
- package/dist/assets/cells-Cf7bHHq3.js +0 -229
- package/dist/assets/channel-D-k8o3T1.js +0 -1
- package/dist/assets/chunk-55IACEB6-xhaY4LU6.js +0 -1
- package/dist/assets/classDiagram-2ON5EDUG-C-rIg7EQ.js +0 -1
- package/dist/assets/classDiagram-v2-WZHVMYZB-MBAsRLae.js +0 -1
- package/dist/assets/clojure-CyEbLmch.js +0 -1
- package/dist/assets/cmake-Dk8f7QuI.js +0 -1
- package/dist/assets/cobol-BJJRqW1D.js +0 -1
- package/dist/assets/coffeescript-BDuWJ9WO.js +0 -1
- package/dist/assets/commonlisp-CVHm2VSp.js +0 -1
- package/dist/assets/components-BH6gDVv6.js +0 -1
- package/dist/assets/config-BbOTTCYY.js +0 -1
- package/dist/assets/crystal-C2Fgr79A.js +0 -1
- package/dist/assets/cypher-CUlCm6vR.js +0 -1
- package/dist/assets/d-4ANEHA6q.js +0 -1
- package/dist/assets/diff-C-W-5V8L.js +0 -1
- package/dist/assets/dist-BCMBu0rO.js +0 -2
- package/dist/assets/dist-CCAhuqF-.js +0 -1
- package/dist/assets/dist-DGhK0kPE.js +0 -1
- package/dist/assets/dist-SVDIDTM2.js +0 -1
- package/dist/assets/dist-xSLg7wNV.js +0 -1
- package/dist/assets/download-BomYt3nl.js +0 -9
- package/dist/assets/dtd-D9h-tL8G.js +0 -1
- package/dist/assets/dylan-D3MC56xy.js +0 -1
- package/dist/assets/ecl-B6UC4tME.js +0 -1
- package/dist/assets/eiffel-CjvEov4k.js +0 -1
- package/dist/assets/elm-DvSbvRWe.js +0 -1
- package/dist/assets/erlang-DJYaGXyq.js +0 -1
- package/dist/assets/error-entries-Birw-8VX.js +0 -8
- package/dist/assets/factor-CUQCrkTo.js +0 -1
- package/dist/assets/file-explorer-panel-Ntq1-VbF.js +0 -26
- package/dist/assets/floating-outline-wz-WSRgP.js +0 -1
- package/dist/assets/focus-DiEyfiAG.js +0 -1
- package/dist/assets/forth-D9xegiCO.js +0 -1
- package/dist/assets/fortran-B0Oe0U8s.js +0 -1
- package/dist/assets/gas-jLjj-PIq.js +0 -1
- package/dist/assets/gherkin-3Ig8Crit.js +0 -1
- package/dist/assets/groovy-NKpNVJ-n.js +0 -1
- package/dist/assets/haskell-OPE4bAjk.js +0 -1
- package/dist/assets/haxe-DEAZF8L3.js +0 -1
- package/dist/assets/home-page-DJ4jJsZj.js +0 -4
- package/dist/assets/idl-BM6265Xl.js +0 -1
- package/dist/assets/index-A71LAt6h.css +0 -2
- package/dist/assets/index-CMZzy-dF.js +0 -38
- package/dist/assets/infoDiagram-HS3SLOUP-DQnMjKYJ.js +0 -2
- package/dist/assets/javascript-CZ9vDpAy.js +0 -1
- package/dist/assets/julia-BrY9TQnt.js +0 -1
- package/dist/assets/katex-C-lfa1AM.js +0 -1
- package/dist/assets/kiosk-mode-ABm3oYgq.js +0 -1
- package/dist/assets/livescript-CNahkUp5.js +0 -1
- package/dist/assets/logs-panel-iFV4ZJ9b.js +0 -1
- package/dist/assets/lua-Skr4TVu_.js +0 -1
- package/dist/assets/mathematica-BXxhrpeY.js +0 -1
- package/dist/assets/mbox-BRrQCVe9.js +0 -1
- package/dist/assets/mirc-CffYPE4R.js +0 -1
- package/dist/assets/mllike-C1DLZhEI.js +0 -1
- package/dist/assets/modelica-CvAyRRNV.js +0 -1
- package/dist/assets/mscgen-uMZWtMZv.js +0 -1
- package/dist/assets/mumps-DFJehEx7.js +0 -1
- package/dist/assets/node-sql-parser-BWgUjcfV.js +0 -68
- package/dist/assets/nsis-BVI9YULz.js +0 -1
- package/dist/assets/ntriples-Bcdh7b2H.js +0 -1
- package/dist/assets/octave-CdAKz6YS.js +0 -1
- package/dist/assets/oz-DSySeR-W.js +0 -1
- package/dist/assets/pair-with-agent-modal-CKOYwOYw.js +0 -4
- package/dist/assets/panels-Dj45fW-v.js +0 -4
- package/dist/assets/pascal-DefziIUN.js +0 -1
- package/dist/assets/perl-BOOloBPk.js +0 -1
- package/dist/assets/pig-f0nBb-5x.js +0 -1
- package/dist/assets/powershell-DToQjbK9.js +0 -1
- package/dist/assets/process-output-BEhIGfkO.js +0 -1
- package/dist/assets/properties-BRob-nyj.js +0 -1
- package/dist/assets/protobuf-DZyC6051.js +0 -1
- package/dist/assets/pug-pVoM8FRt.js +0 -1
- package/dist/assets/puppet-9fuYG07F.js +0 -1
- package/dist/assets/python-_Mr8fyXP.js +0 -1
- package/dist/assets/q-D73s4Y77.js +0 -1
- package/dist/assets/r-BOEjz92e.js +0 -1
- package/dist/assets/rpm-LpXWTM5t.js +0 -1
- package/dist/assets/ruby-DodgSDfF.js +0 -1
- package/dist/assets/sas-D9KCtUmL.js +0 -1
- package/dist/assets/scheme-p8UJxmJw.js +0 -1
- package/dist/assets/scratchpad-panel-B0mEqBNk.js +0 -1
- package/dist/assets/session-panel-Y0Oon0sD.js +0 -1
- package/dist/assets/shell-BWdqyqwL.js +0 -1
- package/dist/assets/sieve-CLwJmtiQ.js +0 -1
- package/dist/assets/slides-MCbMDtlY.css +0 -1
- package/dist/assets/smalltalk-D3KV-Qah.js +0 -1
- package/dist/assets/sparql-D9Jz2mBw.js +0 -1
- package/dist/assets/state-BZQc7xxL.js +0 -3
- package/dist/assets/stateDiagram-v2-4FDKWEC3-CA1l0rNa.js +0 -1
- package/dist/assets/stylus-ClN4l_XO.js +0 -1
- package/dist/assets/swift-Dvd_9xBv.js +0 -1
- package/dist/assets/switch-CvweaCXq.js +0 -1
- package/dist/assets/tcl-DR2p8cyi.js +0 -1
- package/dist/assets/textarea-CpFfEUet.js +0 -1
- package/dist/assets/textile-D6S27_J2.js +0 -1
- package/dist/assets/toml-B-YuQ2Id.js +0 -1
- package/dist/assets/troff-HSk8AoRF.js +0 -1
- package/dist/assets/ttcn-CehzlVdx.js +0 -1
- package/dist/assets/ttcn-cfg-CLEPwk1s.js +0 -1
- package/dist/assets/turtle-DQLHkbOu.js +0 -1
- package/dist/assets/useCellActionButton-CRfIEVB5.js +0 -1
- package/dist/assets/useEventListener-B_w3A283.js +0 -1
- package/dist/assets/useNotebookActions-DTXAoukG.js +0 -12
- package/dist/assets/vb-o1EHrS4z.js +0 -1
- package/dist/assets/vbscript-BS8yUFpf.js +0 -1
- package/dist/assets/velocity-u_oGPFaA.js +0 -1
- package/dist/assets/verilog-CSmDH7su.js +0 -1
- package/dist/assets/vhdl-BCaWLcjw.js +0 -1
- package/dist/assets/webidl-Bf6dokXM.js +0 -1
- package/dist/assets/write-secret-modal-DEEn7sZV.js +0 -1
- package/dist/assets/xquery-Di0kkiXg.js +0 -1
- package/dist/assets/yacas-DB8tPtyp.js +0 -1
- package/dist/assets/z80-DFUvlWxk.js +0 -1
- /package/dist/assets/{ImageComparisonComponent-Cz3xVDLH.js → ImageComparisonComponent-HnxpPJnM.js} +0 -0
- /package/dist/assets/{Inputs-B8-VCb_j.js → Inputs-BhvqLBkk.js} +0 -0
- /package/dist/assets/{Plot-X2G47XHf.js → Plot-Df7XX6zz.js} +0 -0
- /package/dist/assets/{apl-DVqFAlEd.js → apl-CPlG1HX3.js} +0 -0
- /package/dist/assets/{array-Ddg9CgJT.js → array-DkMvCrqF.js} +0 -0
- /package/dist/assets/{asciiarmor-B45BhOLj.js → asciiarmor-DV_pcocJ.js} +0 -0
- /package/dist/assets/{asn1-C4T2ctU6.js → asn1-DPxWcGvG.js} +0 -0
- /package/dist/assets/{asterisk-9U_4Kgke.js → asterisk-Di-nanOd.js} +0 -0
- /package/dist/assets/{azure-nN8APleF.js → azure-BjL5s4-w.js} +0 -0
- /package/dist/assets/{brainfuck-kVh8Eud4.js → brainfuck-CGDdBVNO.js} +0 -0
- /package/dist/assets/{card-VUBaYDpT.js → card-DIbLM4TA.js} +0 -0
- /package/dist/assets/{chunk-4F5CHEZ2-ClSh5rxG.js → chunk-4F5CHEZ2-yOSqdjGN.js} +0 -0
- /package/dist/assets/{chunk-B2363JML-cit0ouFv.js → chunk-B2363JML-BqlxcdFI.js} +0 -0
- /package/dist/assets/{chunk-DR5Q36YT-Bsu9Glc0.js → chunk-DR5Q36YT-9bsCT1tL.js} +0 -0
- /package/dist/assets/{chunk-FRFDVMJY--Re1QfFE.js → chunk-FRFDVMJY-DW58IWII.js} +0 -0
- /package/dist/assets/{chunk-PL6DKKU2-CAwRAr-p.js → chunk-PL6DKKU2-CiPkyomE.js} +0 -0
- /package/dist/assets/{chunk-SJTYNZTY-G1spWesO.js → chunk-SJTYNZTY-UJLIXgY2.js} +0 -0
- /package/dist/assets/{chunk-TQ3KTPDO-DBwra5xv.js → chunk-TQ3KTPDO-DQFcRP5c.js} +0 -0
- /package/dist/assets/{chunk-UMXZTB3W-A5RvYDPE.js → chunk-UMXZTB3W-cibob28z.js} +0 -0
- /package/dist/assets/{clear-button-DQtvx6eq.js → clear-button-Bsxh4lx1.js} +0 -0
- /package/dist/assets/{click-outside-container-CrWZsAF5.js → click-outside-container-LfSB2_ne.js} +0 -0
- /package/dist/assets/{clike-O0gwXilc.js → clike-D91DrsBh.js} +0 -0
- /package/dist/assets/{clojure-CsbMWxp9.js → clojure-B0eb_-2q.js} +0 -0
- /package/dist/assets/{cmake-FpJvOdyj.js → cmake-COzUvjiS.js} +0 -0
- /package/dist/assets/{cobol-Duxbpsru.js → cobol-DW4FSnmb.js} +0 -0
- /package/dist/assets/{coffeescript-D-Unz9IP.js → coffeescript-CommR2mv.js} +0 -0
- /package/dist/assets/{colors-C_0lIznd.js → colors-CyQT5OPu.js} +0 -0
- /package/dist/assets/{common-keywords-PqH2GDfH.js → common-keywords-Bk-0jOKl.js} +0 -0
- /package/dist/assets/{commonlisp-_nR12oc7.js → commonlisp-FR_N9RJL.js} +0 -0
- /package/dist/assets/{crystal-dj3W4b1A.js → crystal-CAN7bz25.js} +0 -0
- /package/dist/assets/{css-0BG6A_BC.js → css-DmLg8a0m.js} +0 -0
- /package/dist/assets/{cypher-CKPokaoH.js → cypher-BzSJn05x.js} +0 -0
- /package/dist/assets/{cytoscape.esm-DzUNSF80.js → cytoscape.esm-CVhOSlMZ.js} +0 -0
- /package/dist/assets/{d-BrbqzVa2.js → d-UpmnByGo.js} +0 -0
- /package/dist/assets/{diff-BmdR9FsO.js → diff-DRpitNo9.js} +0 -0
- /package/dist/assets/{dist-CM-lWxt3.js → dist-1DJkf78n.js} +0 -0
- /package/dist/assets/{dist-ByK00N0T.js → dist-6KRysbQA.js} +0 -0
- /package/dist/assets/{dist-98K4fusX.js → dist-8H9kNP92.js} +0 -0
- /package/dist/assets/{dist-OgwOt8T2.js → dist-8lZYHUSx.js} +0 -0
- /package/dist/assets/{dist-DNGKAtWk.js → dist-B4sFEC9P.js} +0 -0
- /package/dist/assets/{dist-BaKJ0-Tb.js → dist-B5BlmbY-.js} +0 -0
- /package/dist/assets/{dist-CpbbK4-I.js → dist-BDUj3vkc.js} +0 -0
- /package/dist/assets/{dist-3N7-WLqi.js → dist-C13NfWpP.js} +0 -0
- /package/dist/assets/{dist-DokId-qM.js → dist-C3XTRycV.js} +0 -0
- /package/dist/assets/{dist-56ul6-mm.js → dist-C6uSSUmH.js} +0 -0
- /package/dist/assets/{dist-D5ToCtv8.js → dist-CDFlR-dv.js} +0 -0
- /package/dist/assets/{dist-DzAAhYcW.js → dist-CaADT3TK.js} +0 -0
- /package/dist/assets/{dist-B8g3pNYJ.js → dist-CbTMGxEf.js} +0 -0
- /package/dist/assets/{dist-O5-NiN3f.js → dist-CjpCHqUI.js} +0 -0
- /package/dist/assets/{dist-D9sE1udr.js → dist-D0BTeZL0.js} +0 -0
- /package/dist/assets/{dist-DrtRBAn8.js → dist-DE4Vb9tO.js} +0 -0
- /package/dist/assets/{dist-D35OyUMQ.js → dist-DYsXEge_.js} +0 -0
- /package/dist/assets/{dist-C5kf6g-d.js → dist-lCLEUACp.js} +0 -0
- /package/dist/assets/{dtd-DbCXDVgi.js → dtd-CQV9N2ok.js} +0 -0
- /package/dist/assets/{duckdb-keywords-mPlR0SxW.js → duckdb-keywords-CqO5LWsh.js} +0 -0
- /package/dist/assets/{dylan-CLLzL2Js.js → dylan-Bp98yT5y.js} +0 -0
- /package/dist/assets/{ebnf-Cnws41cu.js → ebnf-DoGvzVmX.js} +0 -0
- /package/dist/assets/{ecl-BC7x2nzk.js → ecl-BgtQ3zu5.js} +0 -0
- /package/dist/assets/{eiffel-CDU836rz.js → eiffel-Cu14O7Gi.js} +0 -0
- /package/dist/assets/{elm-D-_bXARs.js → elm-Dp1dn40k.js} +0 -0
- /package/dist/assets/{empty-state-CqJvEFRk.js → empty-state-yX2_pzkH.js} +0 -0
- /package/dist/assets/{erlang-CwDZk2zM.js → erlang-DdogJjdp.js} +0 -0
- /package/dist/assets/{esm-D6WfbcL3.js → esm-DZILy413.js} +0 -0
- /package/dist/assets/{fcl-CwkPc-_9.js → fcl-CTs4ROWI.js} +0 -0
- /package/dist/assets/{forth-D6FsO_8x.js → forth-Dd0r86IP.js} +0 -0
- /package/dist/assets/{fortran-D4BMbIkG.js → fortran-4qvtlW4z.js} +0 -0
- /package/dist/assets/{gas-JFjzcgdY.js → gas-DqwqZHXy.js} +0 -0
- /package/dist/assets/{gherkin-Cyu-qGaF.js → gherkin-DMxJEDh5.js} +0 -0
- /package/dist/assets/{github-_JH-0hIO.js → github-kTVN-x1m.js} +0 -0
- /package/dist/assets/{groovy-CZaE9eN-.js → groovy-DA_MxBua.js} +0 -0
- /package/dist/assets/{haskell-Dc6o0IGr.js → haskell-B_hi8VEK.js} +0 -0
- /package/dist/assets/{haxe-Bsf0tzqs.js → haxe-D-I6YeRN.js} +0 -0
- /package/dist/assets/{http-BQNSD-HR.js → http-Ci3E2pzn.js} +0 -0
- /package/dist/assets/{idl-1W91kQ8_.js → idl-CteRrHSs.js} +0 -0
- /package/dist/assets/{init-nx27Zb9l.js → init-CYoUL2Ak.js} +0 -0
- /package/dist/assets/{javascript-BZ81-2rO.js → javascript-Cq9DsvSW.js} +0 -0
- /package/dist/assets/{julia-BZOsq0r_.js → julia-bHGj6eLp.js} +0 -0
- /package/dist/assets/{katex-CvZ3kCGk.js → katex-BKFLE8En.js} +0 -0
- /package/dist/assets/{livescript-CNZfmikk.js → livescript-C72YlTeO.js} +0 -0
- /package/dist/assets/{loro_wasm_bg-RNUly1SE.js → loro_wasm_bg-aCH66ryB.js} +0 -0
- /package/dist/assets/{lua-DXGRliwd.js → lua-DAtJrHXr.js} +0 -0
- /package/dist/assets/{marimo-icons-C_nFooxr.js → marimo-icons-Bq_N9GGs.js} +0 -0
- /package/dist/assets/{math-CLO4uoaP.js → math-D6WZfqI3.js} +0 -0
- /package/dist/assets/{mathematica-BoUj8M7D.js → mathematica-DGp7b8Lx.js} +0 -0
- /package/dist/assets/{mbox-DLVP8LAe.js → mbox-C35KjfEV.js} +0 -0
- /package/dist/assets/{mirc-kI4d5fMu.js → mirc-BRCHEPv1.js} +0 -0
- /package/dist/assets/{mllike-CD9vBc_2.js → mllike-D7ajla-U.js} +0 -0
- /package/dist/assets/{modelica-DgfsLJuF.js → modelica-0RGVL4ie.js} +0 -0
- /package/dist/assets/{mscgen-B1HDwshJ.js → mscgen-C7Ohs4Tl.js} +0 -0
- /package/dist/assets/{multi-icon-nrKPWjDU.js → multi-icon-C2ijLyOs.js} +0 -0
- /package/dist/assets/{mumps-D_-b9TZD.js → mumps-Cgag5Xef.js} +0 -0
- /package/dist/assets/{nginx-Cm282mo8.js → nginx-k5GTB7o1.js} +0 -0
- /package/dist/assets/{ntriples-COX9JFZ8.js → ntriples-oQv5c69K.js} +0 -0
- /package/dist/assets/{octave-BejycR79.js → octave-BMTXs4lo.js} +0 -0
- /package/dist/assets/{oz-CFFivrGn.js → oz-CuHYwo8r.js} +0 -0
- /package/dist/assets/{panel-context-CH75ubGG.js → panel-context-CmeYEpWr.js} +0 -0
- /package/dist/assets/{pascal-B_p9jkCs.js → pascal-eFKoVV2p.js} +0 -0
- /package/dist/assets/{path-Bz_hIzg5.js → path-BcLO3NWe.js} +0 -0
- /package/dist/assets/{pathUtils-Bfcp5m-a.js → pathUtils-BbJtW9Mp.js} +0 -0
- /package/dist/assets/{perl-C-SFBTly.js → perl-B1OqOW8w.js} +0 -0
- /package/dist/assets/{pig-BhxDMp2k.js → pig-gIrBDx27.js} +0 -0
- /package/dist/assets/{powershell-c59M-9N2.js → powershell-3fQF2XND.js} +0 -0
- /package/dist/assets/{properties-D1JNwCKy.js → properties-D4HHpZmU.js} +0 -0
- /package/dist/assets/{protobuf-DQS7ex8R.js → protobuf-DFSTKR0L.js} +0 -0
- /package/dist/assets/{puppet-DaQvhvew.js → puppet-BAISgXk9.js} +0 -0
- /package/dist/assets/{python-XHl3eRTS.js → python-mPctBCbA.js} +0 -0
- /package/dist/assets/{q-DppnoRE3.js → q-CYeV5Dbb.js} +0 -0
- /package/dist/assets/{r-D8-F_FWj.js → r-Ds4UrjIV.js} +0 -0
- /package/dist/assets/{request-registry-DHocQ_4I.js → request-registry-CEkYnwgr.js} +0 -0
- /package/dist/assets/{requests-DYeT4CEe.js → requests-CIR84T8A.js} +0 -0
- /package/dist/assets/{rpm-CegJhNNO.js → rpm-DV5-r6dM.js} +0 -0
- /package/dist/assets/{ruby-YMIxufV1.js → ruby-B9qrycrI.js} +0 -0
- /package/dist/assets/{sas-wTtX9UIQ.js → sas-Cd7L1ZOe.js} +0 -0
- /package/dist/assets/{scheme-BGenom3k.js → scheme-L6Kva-Kc.js} +0 -0
- /package/dist/assets/{semaphore-DtBYRzWS.js → semaphore-YOr3WMiw.js} +0 -0
- /package/dist/assets/{shell-Bu1sLaiP.js → shell-Ck42V1Kn.js} +0 -0
- /package/dist/assets/{sieve-ffe6rUQh.js → sieve-DfSJcUfS.js} +0 -0
- /package/dist/assets/{simple-mode-DBSzUJLA.js → simple-mode-CfoR0Lvg.js} +0 -0
- /package/dist/assets/{smalltalk-NU5EGjHp.js → smalltalk-CT418Iph.js} +0 -0
- /package/dist/assets/{solr-ptw1yIqO.js → solr-DfAVBX8L.js} +0 -0
- /package/dist/assets/{sparql-uqVktnwO.js → sparql-BlJ_cLEt.js} +0 -0
- /package/dist/assets/{spreadsheet-VEzeu_mb.js → spreadsheet-Qy1VjLDU.js} +0 -0
- /package/dist/assets/{sql-tYjnWETe.js → sql-BAkD7JGK.js} +0 -0
- /package/dist/assets/{src-BshXgZd4.js → src-Dlf0iGaF.js} +0 -0
- /package/dist/assets/{stylus-B2E6Ulaz.js → stylus-92qIiGm1.js} +0 -0
- /package/dist/assets/{swift-Rmnn7ATv.js → swift-gZzicbJu.js} +0 -0
- /package/dist/assets/{tcl-ZPWCn2nn.js → tcl-CtgoBYkk.js} +0 -0
- /package/dist/assets/{textile-uhA33kFk.js → textile-Du3RzJ2D.js} +0 -0
- /package/dist/assets/{tiddlywiki-CPkGLyXH.js → tiddlywiki-CL3W3RpP.js} +0 -0
- /package/dist/assets/{tiki-BtjLo8OF.js → tiki-2L3jCwab.js} +0 -0
- /package/dist/assets/{timer-VYMLXPue.js → timer-DLLzXmjF.js} +0 -0
- /package/dist/assets/{toml-BFZv2Mv7.js → toml-HcF44TVB.js} +0 -0
- /package/dist/assets/{treemap-Bca0xNNq.js → treemap-BdaAyoGw.js} +0 -0
- /package/dist/assets/{troff-B5eayHop.js → troff-xbwT4huN.js} +0 -0
- /package/dist/assets/{ttcn-cfg-CfbkL3Q_.js → ttcn-cfg-jWDg1i50.js} +0 -0
- /package/dist/assets/{ttcn-BM0Yp8NY.js → ttcn-phKysj_0.js} +0 -0
- /package/dist/assets/{turtle-DvetLxrv.js → turtle-CPC48wcy.js} +0 -0
- /package/dist/assets/{types-Da7lA5YC.js → types-C7hjolXC.js} +0 -0
- /package/dist/assets/{use-vega-container-remeasure-CbKTb_jy.js → use-vega-container-remeasure-0GBen_rR.js} +0 -0
- /package/dist/assets/{vb-i5Z8scch.js → vb-BTubZ2rB.js} +0 -0
- /package/dist/assets/{vbscript-BiPYgIyi.js → vbscript-B52mDFWM.js} +0 -0
- /package/dist/assets/{velocity-Dw3R3YoX.js → velocity-BO3M1iFD.js} +0 -0
- /package/dist/assets/{verilog-B8FhJcX6.js → verilog-CBz90JJu.js} +0 -0
- /package/dist/assets/{vhdl-BqPEoXdJ.js → vhdl-CeQ1lGlV.js} +0 -0
- /package/dist/assets/{web-vitals-CwE0GGzl.js → web-vitals-Q0-_CtWm.js} +0 -0
- /package/dist/assets/{webidl-mMO-qW5Q.js → webidl-CRtF5pmu.js} +0 -0
- /package/dist/assets/{ws-BmTnbVEi.js → ws-CNqquaud.js} +0 -0
- /package/dist/assets/{xquery-DvqNwq7L.js → xquery-CFnbrHav.js} +0 -0
- /package/dist/assets/{yacas-Dku9Z6Kf.js → yacas-KIC_JO6M.js} +0 -0
- /package/dist/assets/{z80-DvazU5Tr.js → z80-kGpw5_me.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as ge}from"./chunk-LvLJmgfZ.js";import{d as je,l as ye,p as ve,u as J}from"./useEvent-D91BmmQi.js";import{t as Qe}from"./react-Bj1aDYRI.js";import{$r as Ye,Bn as Ze,Br as Ne,Ct as ea,E as aa,Gr as oe,Hn as ta,Hr as sa,Ir as la,Kr as we,Lt as na,N as ra,Qr as Se,Rt as oa,Tr as ce,Ur as ca,Vr as _e,Wi as Ce,Xr as ma,Yr as ia,Zr as da,d as ha,dr as ua,fn as xa,fr as pa,i as fa,j as ba,jt as ga,mr as ja,ni as Ie,qr as me,ti as ya,wr as va,xr as Na,zn as ke,zr as ie,zt as wa}from"./cells-Jr-5Pc9f.js";import"./react-dom-CSu739Rf.js";import{t as Te}from"./compiler-runtime-B3qBwwSJ.js";import{c as Sa}from"./utils-BWBBpCkT.js";import{t as _a}from"./ErrorBoundary-DzTD8LVq.js";import{t as Q}from"./cn-DYvqRARy.js";import{t as Ca}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import{r as Ia}from"./config-BJVx3eBW.js";import"./popover-Bcz1Zikb.js";import{_ as Pe,at as ka,d as Ta,et as de,g as he,h as ue,it as Pa,m as le,nt as Fa,p as Fe,rt as $a,tt as $e}from"./JsonOutput-BM3vve9F.js";import"./download-CQ7iZFJL.js";import{r as Re}from"./radio-group-rhQpGwU-.js";import{t as xe}from"./tooltip-4bZlU7jl.js";import{r as Ra,t as ne}from"./button-DDGiD1NW.js";import"./dist-12S8I4CH.js";import{l as Y}from"./arrays-DbOq36rN.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{i as Va}from"./strings--BknHX9C.js";import{r as Da}from"./requests-9-v2bhoi.js";import{t as qa}from"./createLucideIcon-w-Qo9n0R.js";import{t as Ba}from"./x-C-Eq0ag8.js";import{a as La,r as Ma}from"./tree-actions-DDveUIHK.js";import"./markdown-renderer-BgqeO4JR.js";import{t as Ve}from"./add-connection-dialog-syjRSNPT.js";import{t as De}from"./plus-AgXtozBz.js";import{a as Ea}from"./input-JxFwu-3G.js";import{n as Oa,o as za}from"./column-preview-BUHlI5va.js";import{t as Aa}from"./workflow-e-XGaKyY.js";import"./dist-DcwTQG1A.js";import"./dist-DnjsPBRJ.js";import"./dist-BJZAIIze.js";import"./dist-aRc_dRed.js";import"./dist-CPjTeT8p.js";import"./session-BmukRjSi.js";import"./purify.es-CWmnYhGI.js";import"./dates-C2LWzsCZ.js";import{t as Ua}from"./copy-icon-neDQUo4Q.js";import{t as Ga}from"./context-BFPaAUK_.js";import"./tooltip-B7U4xkIN.js";import"./vega-loader.browser-Dun7Qe4B.js";import"./defaultLocale-DOVIEEPN.js";import"./defaultLocale-BUCH2FMc.js";import{t as qe}from"./cell-link-DqNEv3f9.js";import"./chunk-5FQGJX7Z-BEbM01OT.js";import{r as Ha}from"./html-to-image-CfjhKLA4.js";import{o as Ka}from"./focus-C0HXXg3V.js";import{n as pe}from"./useAsyncData-Bg5iAViP.js";import{a as Wa,i as Xa,n as Ja,o as Be,r as Qa,t as Ya}from"./table-CH2plyy9.js";import"./react-resizable-panels.browser.esm-Z-MD3n3J.js";import{a as Za,f as et,o as re,t as at}from"./command-Dqxie4gq.js";import{n as tt}from"./icons-CIPE8AIY.js";import{t as st}from"./useDeepCompareMemoize-CSMoa-ga.js";import{t as lt}from"./empty-state-yX2_pzkH.js";import{n as nt,t as rt}from"./common-CZc3fQI4.js";import{a as ot,i as ct,n as Le,r as Me,t as Ee}from"./components-GAYCj6Mx.js";var mt=qa("square-equal",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}]]),U=Te(),F=ge(Qe(),1),s=ge(Ca(),1),fe=1;function Oe(a){return 1.75+a*fe}function it(a){return 3+a*fe}function ze(a){return 3.25+a*fe}var A={engineEmpty:.75,engine:.75,database:1,tableLoading:2.75,tableSchemaless:2,columnLocal:1.25,columnPreview:2.5};function E(a){return{paddingLeft:`${a}rem`}}var dt=ve(a=>{let e=a(_e),t=a(ta),l=a(fa);return Y(e,n=>{if(!n.variable_name)return-1;let i=Object.values(t).find(d=>d.name===n.variable_name);if(!i)return 0;let c=l.inOrderIds.indexOf(i.declaredBy[0]);return c===-1?0:c})});const ht=Ce("marimo:datasources:hideEmpty",!1,ke,{getOnInit:!0});function Ae(a){let e=!1,t=[];for(let l of a){if(!me(l)||!oe(l)){t.push(l);continue}let n=l.child_schemas??[],i=Ae(n);if(l.tables.length===0&&i.length===0){e=!0;continue}if(i===n){t.push(l);continue}e=!0,t.push({...l,child_schemas:i})}return e?t:a}function ut(a){let e=!1,t=[];for(let l of a){if(we(l)&&l.schemas.length===0){e=!0;continue}if(l.schemas.length===0){t.push(l);continue}let n=Ae(l.schemas);if(n.length===0){e=!0;continue}if(n===l.schemas){t.push(l);continue}e=!0,t.push({...l,schemas:n})}return e?t:a}const Ue=ve(a=>{let e=new Map(a(la));for(let t of Ie){let l=e.get(t);l&&(l.databases.length===0&&e.delete(t),l.databases.length===1&&l.databases[0].name==="memory"&&l.databases[0].schemas.length===0&&e.delete(t))}return Y([...e.values()],t=>Ie.has(t.name)?1:0)}),xt=()=>{let a=(0,U.c)(40),[e,t]=F.useState(""),[l,n]=ye(ht),i=je(Ne),c=J(dt),d=J(Ue),r;e:{if(!l){r=d;break e}let f,v;a[0]===d?(f=a[1],v=a[2]):(f=!1,v=d.map(C=>{let k=ut(C.databases);return k===C.databases?C:(f=!0,{...C,databases:k})}),a[0]=d,a[1]=f,a[2]=v),r=f?v:d}let x=r;if(c.length===0&&x.length===0){let f;return a[3]===Symbol.for("react.memo_cache_sentinel")?(f=(0,s.jsx)(lt,{title:"No tables found",description:"Any datasets/dataframes in the global scope will be shown here.",action:(0,s.jsx)(Ve,{children:(0,s.jsxs)(ne,{variant:"outline",size:"sm",children:["Add database or catalog",(0,s.jsx)(De,{className:"h-4 w-4 ml-2"})]})}),icon:(0,s.jsx)(ce,{})}),a[3]=f):f=a[3],f}let h=!!e.trim(),m;a[4]===i?m=a[5]:(m=f=>{i(f.length>0),t(f)},a[4]=i,a[5]=m);let o;a[6]!==e||a[7]!==m?(o=(0,s.jsx)(Za,{placeholder:"Search tables...",className:"h-6 m-1",value:e,onValueChange:m,rootClassName:"flex-1 border-r border-b-0"}),a[6]=e,a[7]=m,a[8]=o):o=a[8];let p;a[9]===h?p=a[10]:(p=h&&(0,s.jsx)("button",{type:"button",className:"float-right border-b px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",onClick:()=>t(""),children:(0,s.jsx)(Ba,{className:"h-4 w-4"})}),a[9]=h,a[10]=p);let S=!l,b;a[11]!==l||a[12]!==n?(b=()=>n(!l),a[11]=l,a[12]=n,a[13]=b):b=a[13];let N;a[14]!==S||a[15]!==b?(N=(0,s.jsx)(La,{"data-testid":"datasources-hide-empty-button",isVisible:S,onToggle:b,showTooltip:"Show empty schemas and databases",hideTooltip:"Hide empty schemas and databases",size:"sm",className:"px-2 rounded-none focus-visible:outline-hidden"}),a[14]=S,a[15]=b,a[16]=N):N=a[16];let y;a[17]===Symbol.for("react.memo_cache_sentinel")?(y=(0,s.jsx)(Ve,{children:(0,s.jsx)(ne,{variant:"ghost",size:"sm",className:"px-2 rounded-none focus-visible:outline-hidden",children:(0,s.jsx)(De,{className:"h-4 w-4"})})}),a[17]=y):y=a[17];let j;a[18]!==o||a[19]!==p||a[20]!==N?(j=(0,s.jsxs)("div",{className:"flex items-center w-full border-b",children:[o,p,N,y]}),a[18]=o,a[19]=p,a[20]=N,a[21]=j):j=a[21];let g;if(a[22]!==x||a[23]!==e){let f;a[25]===e?f=a[26]:(f=v=>(0,s.jsx)(pt,{connection:v,hasChildren:v.databases.length>0,children:v.databases.map(C=>(0,s.jsx)(ft,{connection:v,database:C,searchValue:e},C.name))},v.name),a[25]=e,a[26]=f),g=x.map(f),a[22]=x,a[23]=e,a[24]=g}else g=a[24];let w;a[27]!==x.length||a[28]!==c.length?(w=x.length>0&&c.length>0&&(0,s.jsxs)(Fe,{className:"pr-2",style:E(A.engine),children:[(0,s.jsx)(tt,{className:"h-4 w-4 text-muted-foreground"}),(0,s.jsx)("span",{className:"text-xs",children:"Python"})]}),a[27]=x.length,a[28]=c.length,a[29]=w):w=a[29];let u;a[30]!==e||a[31]!==c?(u=c.length>0&&(0,s.jsx)(be,{tables:c,searchValue:e}),a[30]=e,a[31]=c,a[32]=u):u=a[32];let _;a[33]!==w||a[34]!==u||a[35]!==g?(_=(0,s.jsxs)(et,{className:"flex flex-col",children:[g,w,u]}),a[33]=w,a[34]=u,a[35]=g,a[36]=_):_=a[36];let I;return a[37]!==_||a[38]!==j?(I=(0,s.jsxs)(at,{className:"border-b bg-background rounded-none h-full pb-10 overflow-auto outline-hidden",shouldFilter:!1,children:[j,_]}),a[37]=_,a[38]=j,a[39]=I):I=a[39],I};var pt=a=>{let e=(0,U.c)(26),{connection:t,children:l,hasChildren:n}=a,i=t.name===ya,c=i?"In-Memory":t.name,{previewDataSourceConnection:d}=Da(),r;e[0]!==t.name||e[1]!==d?(r=async()=>{await d({engine:t.name})},e[0]=t.name,e[1]=d,e[2]=r):r=e[2];let x=r,h;e[3]===Symbol.for("react.memo_cache_sentinel")?(h=E(A.engine),e[3]=h):h=e[3];let m;e[4]===t.dialect?m=e[5]:(m=(0,s.jsx)(ea,{className:"h-4 w-4 text-muted-foreground",name:t.dialect}),e[4]=t.dialect,e[5]=m);let o;e[6]===t.dialect?o=e[7]:(o=ua(t.dialect),e[6]=t.dialect,e[7]=o);let p;e[8]===o?p=e[9]:(p=(0,s.jsx)("span",{className:"text-xs",children:o}),e[8]=o,e[9]=p);let S=c,b;e[10]===S?b=e[11]:(b=(0,s.jsxs)("span",{className:"text-xs text-muted-foreground",children:["(",(0,s.jsx)(ot,{variableName:S}),")"]}),e[10]=S,e[11]=b);let N;e[12]!==x||e[13]!==i?(N=!i&&(0,s.jsx)(Ma,{onClick:x,tooltip:"Refresh connection",className:"ml-auto h-4 p-0",iconClassName:"h-3.5 w-3.5"}),e[12]=x,e[13]=i,e[14]=N):N=e[14];let y;e[15]!==m||e[16]!==p||e[17]!==b||e[18]!==N?(y=(0,s.jsxs)(Fe,{className:"pr-2",style:h,children:[m,p,b,N]}),e[15]=m,e[16]=p,e[17]=b,e[18]=N,e[19]=y):y=e[19];let j;e[20]!==l||e[21]!==n?(j=n?l:(0,s.jsx)(le,{content:"No databases available",style:E(A.engineEmpty)}),e[20]=l,e[21]=n,e[22]=j):j=e[22];let g;return e[23]!==j||e[24]!==y?(g=(0,s.jsxs)(s.Fragment,{children:[y,j]}),e[23]=j,e[24]=y,e[25]=g):g=e[25],g},Ge=F.createContext(null);function He(){let a=F.useContext(Ge);if(a==null)throw Error("useDataSourceTree must be used within a DataSourceTreeContext.Provider");return a}function Ke(a,{schema:e,schemaPath:t}){return{engine:a.engineName,database:a.databaseName,schema:e,schemaPath:t,defaultSchema:a.defaultSchema,defaultDatabase:a.defaultDatabase,dialect:a.dialect}}var ft=a=>{let e=(0,U.c)(21),{connection:t,database:l,searchValue:n}=a,i;e[0]!==t.default_database||e[1]!==t.default_schema||e[2]!==t.dialect||e[3]!==t.name||e[4]!==l.name||e[5]!==n?(i={engineName:t.name,databaseName:l.name,dialect:t.dialect,defaultSchema:t.default_schema,defaultDatabase:t.default_database,searchValue:n},e[0]=t.default_database,e[1]=t.default_schema,e[2]=t.dialect,e[3]=t.name,e[4]=l.name,e[5]=n,e[6]=i):i=e[6];let c=i,d=t.name,r=l.schemas,x;e[7]===l?x=e[8]:(x=we(l),e[7]=l,e[8]=x);let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=[],e[9]=h):h=e[9];let m;e[10]!==l.schemas||e[11]!==x?(m=(0,s.jsx)(We,{schemas:r,schemasResolved:x,schemaPath:h,depth:0}),e[10]=l.schemas,e[11]=x,e[12]=m):m=e[12];let o;e[13]!==m||e[14]!==c?(o=(0,s.jsx)(Ge.Provider,{value:c,children:m}),e[13]=m,e[14]=c,e[15]=o):o=e[15];let p;return e[16]!==t.name||e[17]!==l||e[18]!==n||e[19]!==o?(p=(0,s.jsx)(bt,{engineName:d,database:l,searchValue:n,children:o}),e[16]=t.name,e[17]=l,e[18]=n,e[19]=o,e[20]=p):p=e[20],p},bt=a=>{let e=(0,U.c)(29),{searchValue:t,engineName:l,database:n,children:i}=a,c;e[0]!==n||e[1]!==t?(c=da(n,t),e[0]=n,e[1]=t,e[2]=c):c=e[2];let d=c,[r,x]=F.useState(d),[h,m]=F.useState(!1),[o,p]=F.useState(t),[S,b]=F.useState(d);(o!==t||S!==d)&&(p(t),b(d),x(d));let N;e[3]===Symbol.for("react.memo_cache_sentinel")?(N=E(A.database),e[3]=N):N=e[3];let y;e[4]!==r||e[5]!==h?(y=()=>{x(!r),m(!h)},e[4]=r,e[5]=h,e[6]=y):y=e[6];let j=`${l}:${n.name}`,g;e[7]===r?g=e[8]:(g=(0,s.jsx)(Pe,{isExpanded:r}),e[7]=r,e[8]=g);let w=h&&r?"text-foreground":"text-muted-foreground",u;e[9]===w?u=e[10]:(u=Q("h-4 w-4",w),e[9]=w,e[10]=u);let _;e[11]===u?_=e[12]:(_=(0,s.jsx)(ce,{className:u}),e[11]=u,e[12]=_);let I=h&&r&&"font-semibold",f;e[13]===I?f=e[14]:(f=Q(I),e[13]=I,e[14]=f);let v;e[15]===n.name?v=e[16]:(v=n.name===""?(0,s.jsx)("i",{children:"Not connected"}):n.name,e[15]=n.name,e[16]=v);let C;e[17]!==f||e[18]!==v?(C=(0,s.jsx)("span",{className:f,children:v}),e[17]=f,e[18]=v,e[19]=C):C=e[19];let k;e[20]!==C||e[21]!==y||e[22]!==j||e[23]!==g||e[24]!==_?(k=(0,s.jsxs)(re,{className:"text-sm flex flex-row gap-1 items-center cursor-pointer rounded-none",style:N,onSelect:y,value:j,children:[g,_,C]}),e[20]=C,e[21]=y,e[22]=j,e[23]=g,e[24]=_,e[25]=k):k=e[25];let T=r&&i,P;return e[26]!==k||e[27]!==T?(P=(0,s.jsxs)(s.Fragment,{children:[k,T]}),e[26]=k,e[27]=T,e[28]=P):P=e[28],P},We=a=>{let{schemas:e,schemasResolved:t,depth:l}=a,n=He(),{engineName:i,databaseName:c,searchValue:d}=n,{addSchemaList:r}=ie(),x=st(a.schemaPath),[h,m]=F.useState(!1),{isPending:o,error:p}=pe(async()=>{if(!t&&i){m(!0);try{r({schemas:(await na.request({engine:i,database:c,schemaPath:x})).schemas??[],sqlSchemaContext:{engine:i,database:c,schemaPath:x}})}finally{m(!1)}}},[t,i,c,x]),S=E(Oe(l));return o||h?(0,s.jsx)(he,{message:"Loading schemas...",style:S}):p?(0,s.jsx)(ue,{error:p,style:S}):e.length===0?(0,s.jsx)(le,{content:"No schemas available",style:S}):(0,s.jsx)(s.Fragment,{children:e.map(b=>ia(b.name)?(0,s.jsx)(be,{tables:b.tables,tablesResolved:me(b),searchValue:d,sqlTableContext:Ke(n,{schema:b.name,schemaPath:x})},b.name):(0,s.jsx)(gt,{schema:b,schemaPath:[...x,b.name],depth:l},b.name))})},gt=a=>{let e=(0,U.c)(39),{schema:t,schemaPath:l,depth:n}=a,i=He(),{databaseName:c,searchValue:d}=i,r;e[0]!==t||e[1]!==d?(r=ma(t,d),e[0]=t,e[1]=d,e[2]=r):r=e[2];let x=r,[h,m]=F.useState(x),[o,p]=F.useState(!1),[S,b]=F.useState(d),[N,y]=F.useState(x),j=`${c}:${l.join(".")}`,g;e[3]===t.child_schemas?g=e[4]:(g=t.child_schemas??[],e[3]=t.child_schemas,e[4]=g);let w=g;(S!==d||N!==x)&&(b(d),y(x),m(x));let u;e[5]===n?u=e[6]:(u=E(Oe(n)),e[5]=n,e[6]=u);let _;e[7]!==h||e[8]!==o?(_=()=>{m(!h),p(!o)},e[7]=h,e[8]=o,e[9]=_):_=e[9];let I;e[10]===h?I=e[11]:(I=(0,s.jsx)(Pe,{isExpanded:h}),e[10]=h,e[11]=I);let f=o&&h&&"text-foreground",v;e[12]===f?v=e[13]:(v=Q("h-4 w-4 text-muted-foreground",f),e[12]=f,e[13]=v);let C;e[14]===v?C=e[15]:(C=(0,s.jsx)(Na,{className:v}),e[14]=v,e[15]=C);let k=o&&h&&"font-semibold",T;e[16]===k?T=e[17]:(T=Q(k),e[16]=k,e[17]=T);let P;e[18]!==t.name||e[19]!==T?(P=(0,s.jsx)("span",{className:T,children:t.name}),e[18]=t.name,e[19]=T,e[20]=P):P=e[20];let R;e[21]!==P||e[22]!==u||e[23]!==_||e[24]!==I||e[25]!==C||e[26]!==j?(R=(0,s.jsxs)(re,{className:"text-sm flex flex-row gap-1 items-center cursor-pointer rounded-none",style:u,onSelect:_,value:j,children:[I,C,P]}),e[21]=P,e[22]=u,e[23]=_,e[24]=I,e[25]=C,e[26]=j,e[27]=R):R=e[27];let V;e[28]!==w||e[29]!==n||e[30]!==h||e[31]!==t||e[32]!==l||e[33]!==d||e[34]!==i?(V=h&&(0,s.jsxs)(s.Fragment,{children:[(w.length>0||!oe(t))&&(0,s.jsx)(We,{schemas:w,schemasResolved:oe(t),schemaPath:l,depth:n+1}),(0,s.jsx)(be,{tables:t.tables,tablesResolved:me(t),searchValue:d,tableIndentRem:it(n),columnIndentRem:ze(n),sqlTableContext:Ke(i,{schema:t.name,schemaPath:l})})]}),e[28]=w,e[29]=n,e[30]=h,e[31]=t,e[32]=l,e[33]=d,e[34]=i,e[35]=V):V=e[35];let $;return e[36]!==R||e[37]!==V?($=(0,s.jsxs)(s.Fragment,{children:[R,V]}),e[36]=R,e[37]=V,e[38]=$):$=e[38],$},be=a=>{let e=(0,U.c)(31),{tables:t,sqlTableContext:l,searchValue:n,tablesResolved:i,tableIndentRem:c,columnIndentRem:d}=a,r=i===void 0?!0:i,{addTableList:x}=ie(),[h,m]=F.useState(!1),o;e[0]!==x||e[1]!==l||e[2]!==r?(o=async()=>{if(!r&&l){m(!0);let{engine:u,database:_,schema:I,schemaPath:f}=l,v=await wa.request({engine:u,database:_,schema:I,schemaPath:f??[]});if(!(v!=null&&v.tables))throw m(!1),Error("No tables available");x({tables:v.tables,sqlTableContext:l}),m(!1)}},e[0]=x,e[1]=l,e[2]=r,e[3]=o):o=e[3];let p;e[4]!==l||e[5]!==r?(p=[r,l],e[4]=l,e[5]=r,e[6]=p):p=e[6];let{isPending:S,error:b}=pe(o,p),N=c??A.tableLoading,y;e[7]===N?y=e[8]:(y=E(N),e[7]=N,e[8]=y);let j=y;if(S||h){let u;return e[9]===j?u=e[10]:(u=(0,s.jsx)(he,{message:"Loading tables...",style:j}),e[9]=j,e[10]=u),u}if(b){let u;return e[11]!==b||e[12]!==j?(u=(0,s.jsx)(ue,{error:b,style:j}),e[11]=b,e[12]=j,e[13]=u):u=e[13],u}if(t.length===0){let u;return e[14]===j?u=e[15]:(u=(0,s.jsx)(le,{content:"No tables found",style:j}),e[14]=j,e[15]=u),u}let g;if(e[16]!==d||e[17]!==n||e[18]!==l||e[19]!==c||e[20]!==t){let u;e[22]===n?u=e[23]:(u=f=>n?f.name.toLowerCase().includes(n.toLowerCase()):!0,e[22]=n,e[23]=u);let _=t.filter(u),I;e[24]!==d||e[25]!==n||e[26]!==l||e[27]!==c?(I=f=>(0,s.jsx)(jt,{table:f,sqlTableContext:l,isSearching:!!n,tableIndentRem:c,columnIndentRem:d},f.name),e[24]=d,e[25]=n,e[26]=l,e[27]=c,e[28]=I):I=e[28],g=_.map(I),e[16]=d,e[17]=n,e[18]=l,e[19]=c,e[20]=t,e[21]=g}else g=e[21];let w;return e[29]===g?w=e[30]:(w=(0,s.jsx)(s.Fragment,{children:g}),e[29]=g,e[30]=w),w},jt=a=>{let e=(0,U.c)(69),{table:t,sqlTableContext:l,isSearching:n,tableIndentRem:i,columnIndentRem:c}=a,{addTable:d}=ie(),[r,x]=F.useState(!1),h=t.columns.length>0,m;e[0]!==d||e[1]!==r||e[2]!==l||e[3]!==t.name||e[4]!==h?(m=async()=>{if(r&&!h&&l){let{engine:L,database:ae,schema:te,schemaPath:Je}=l,se=await oa.request({engine:L,database:ae,schema:te,tableName:t.name,schemaPath:Je??[]});if(!(se!=null&&se.table))throw Error("No table details available");d({table:se.table,sqlTableContext:l})}},e[0]=d,e[1]=r,e[2]=l,e[3]=t.name,e[4]=h,e[5]=m):m=e[5];let o;e[6]!==r||e[7]!==h?(o=[r,h],e[6]=r,e[7]=h,e[8]=o):o=e[8];let{isFetching:p,isPending:S,error:b}=pe(m,o),N=J(Sa),y=Ka(),{createNewCell:j}=aa(),g=Re(),w;e[9]!==g||e[10]!==N||e[11]!==j||e[12]!==y||e[13]!==l||e[14]!==t?(w=()=>{Ha({autoInstantiate:N,createNewCell:j,fromCellId:y}),g((()=>{if(t.source_type==="catalog"){let L=l!=null&&l.database?[l.database,...l.schemaPath??[],t.name].join("."):t.name;return`${t.engine}.load_table("${L}")`}if(l)return Se({table:t,columnName:"*",sqlTableContext:l});switch(t.source_type){case"local":return`mo.ui.table(${t.name})`;case"duckdb":case"connection":return Se({table:t,columnName:"*",sqlTableContext:l});default:return Va(t.source_type),""}})())},e[9]=g,e[10]=N,e[11]=j,e[12]=y,e[13]=l,e[14]=t,e[15]=w):w=e[15];let u=w,_;e[16]!==t.num_columns||e[17]!==t.num_rows?(_=()=>{let L=[];return t.num_rows!=null&&L.push(`${t.num_rows} rows`),t.num_columns!=null&&L.push(`${t.num_columns} columns`),L.length===0?null:(0,s.jsx)("div",{className:"flex flex-row gap-2 items-center pl-6 group-hover:hidden",children:(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:L.join(", ")})})},e[16]=t.num_columns,e[17]=t.num_rows,e[18]=_):_=e[18];let I=_,f;e[19]!==c||e[20]!==b||e[21]!==p||e[22]!==S||e[23]!==l||e[24]!==t?(f=()=>{let L=E(c??A.tableLoading);if(S||p)return(0,s.jsx)(he,{message:"Loading columns...",style:L});if(b)return(0,s.jsx)(ue,{error:b,style:L});let ae=t.columns;return ae.length===0?(0,s.jsx)(le,{content:"No columns found",style:L}):ae.map(te=>(0,s.jsx)(yt,{table:t,column:te,sqlTableContext:l,columnIndentRem:c},te.name))},e[19]=c,e[20]=b,e[21]=p,e[22]=S,e[23]=l,e[24]=t,e[25]=f):f=e[25];let v=f,C;e[26]!==r||e[27]!==n||e[28]!==t.source_type||e[29]!==t.type?(C=()=>{if(t.source_type!=="local")return(0,s.jsx)(t.type==="table"?ja:va,{className:"h-3 w-3",strokeWidth:r||n?2.5:void 0})},e[26]=r,e[27]=n,e[28]=t.source_type,e[29]=t.type,e[30]=C):C=e[30];let k=C,T;e[31]!==l||e[32]!==t.name?(T=Ye(l,t.name),e[31]=l,e[32]=t.name,e[33]=T):T=e[33];let P=T,R=i??(l?A.tableSchemaless:0),V=(r||n)&&"font-semibold",$;e[34]===V?$=e[35]:($=Q("rounded-none group h-8 cursor-pointer",V),e[34]=V,e[35]=$);let D;e[36]===R?D=e[37]:(D=E(R),e[36]=R,e[37]=D);let q;e[38]===r?q=e[39]:(q=()=>x(!r),e[38]=r,e[39]=q);let M;e[40]===k?M=e[41]:(M=k(),e[40]=k,e[41]=M);let O;e[42]===t.name?O=e[43]:(O=(0,s.jsx)("span",{className:"text-sm",children:t.name}),e[42]=t.name,e[43]=O);let z;e[44]!==M||e[45]!==O?(z=(0,s.jsxs)("div",{className:"flex gap-2 items-center flex-1 pl-1",children:[M,O]}),e[44]=M,e[45]=O,e[46]=z):z=e[46];let B;e[47]===I?B=e[48]:(B=I(),e[47]=I,e[48]=B);let H;e[49]===u?H=e[50]:(H=Ra.stopPropagation(()=>u()),e[49]=u,e[50]=H);let Z;e[51]===Symbol.for("react.memo_cache_sentinel")?(Z=(0,s.jsx)(za,{className:"h-3 w-3"}),e[51]=Z):Z=e[51];let K;e[52]===H?K=e[53]:(K=(0,s.jsx)(xe,{content:"Add table to notebook",delayDuration:400,children:(0,s.jsx)(ne,{className:"group-hover:inline-flex hidden",variant:"text",size:"icon",onClick:H,children:Z})}),e[52]=H,e[53]=K);let W;e[54]!==r||e[55]!==D||e[56]!==q||e[57]!==z||e[58]!==B||e[59]!==K||e[60]!==$||e[61]!==P?(W=(0,s.jsxs)(re,{className:$,style:D,value:P,"aria-selected":r,forceMount:!0,onSelect:q,children:[z,B,K]}),e[54]=r,e[55]=D,e[56]=q,e[57]=z,e[58]=B,e[59]=K,e[60]=$,e[61]=P,e[62]=W):W=e[62];let X;e[63]!==r||e[64]!==v?(X=r&&v(),e[63]=r,e[64]=v,e[65]=X):X=e[65];let ee;return e[66]!==W||e[67]!==X?(ee=(0,s.jsxs)(s.Fragment,{children:[W,X]}),e[66]=W,e[67]=X,e[68]=ee):ee=e[68],ee},yt=a=>{var O,z;let e=(0,U.c)(51),{table:t,column:l,sqlTableContext:n,columnIndentRem:i}=a,[c,d]=F.useState(!1),r=J(Ne),x=je(sa);r&&c&&d(!1),x(c?B=>new Set([...B,`${t.name}:${l.name}`]):B=>(B.delete(`${t.name}:${l.name}`),new Set(B)));let h=Re(),{columnsPreviews:m}=ca(),o;e[0]!==l.name||e[1]!==t.primary_keys?(o=((O=t.primary_keys)==null?void 0:O.includes(l.name))||!1,e[0]=l.name,e[1]=t.primary_keys,e[2]=o):o=e[2];let p=o,S;e[3]!==l.name||e[4]!==t.indexes?(S=((z=t.indexes)==null?void 0:z.includes(l.name))||!1,e[3]=l.name,e[4]=t.indexes,e[5]=S):S=e[5];let b=S,N;e[6]===h?N=e[7]:(N=B=>{h(B)},e[6]=h,e[7]=N);let y=N,j=vt,g=c?"font-semibold":"",w;e[8]!==l.name||e[9]!==g?(w=(0,s.jsx)("span",{className:g,children:l.name}),e[8]=l.name,e[9]=g,e[10]=w):w=e[10];let u=w,_=`${t.name}.${l.name}`,I=`${t.name}.${l.name}`,f;e[11]===c?f=e[12]:(f=()=>d(!c),e[11]=c,e[12]=f);let v;e[13]!==i||e[14]!==n?(v=i??(n?ze(0):A.columnLocal),e[13]=i,e[14]=n,e[15]=v):v=e[15];let C;e[16]===v?C=e[17]:(C=E(v),e[16]=v,e[17]=C);let k;e[18]!==l.type||e[19]!==u?(k=(0,s.jsx)(Ta,{columnName:u,dataType:l.type}),e[18]=l.type,e[19]=u,e[20]=k):k=e[20];let T;e[21]===p?T=e[22]:(T=p&&j({tooltipContent:"Primary key",content:"PK"}),e[21]=p,e[22]=T);let P;e[23]===b?P=e[24]:(P=b&&j({tooltipContent:"Indexed",content:"IDX"}),e[23]=b,e[24]=P);let R;e[25]!==C||e[26]!==k||e[27]!==T||e[28]!==P?(R=(0,s.jsxs)("div",{className:"flex flex-row gap-2 items-center flex-1",style:C,children:[k,T,P]}),e[25]=C,e[26]=k,e[27]=T,e[28]=P,e[29]=R):R=e[29];let V;e[30]===l.name?V=e[31]:(V=(0,s.jsx)(xe,{content:"Copy column name",delayDuration:400,children:(0,s.jsx)(ne,{variant:"text",size:"icon",className:"group-hover:opacity-100 opacity-0 hover:bg-muted text-muted-foreground hover:text-foreground",children:(0,s.jsx)(Ua,{tooltip:!1,value:l.name,className:"h-3 w-3"})})}),e[30]=l.name,e[31]=V);let $;e[32]===l.external_type?$=e[33]:($=(0,s.jsx)("span",{className:"text-xs text-muted-foreground",children:l.external_type}),e[32]=l.external_type,e[33]=$);let D;e[34]!==R||e[35]!==V||e[36]!==$||e[37]!==_||e[38]!==I||e[39]!==f?(D=(0,s.jsxs)(re,{className:"rounded-none py-1 group cursor-pointer",value:I,onSelect:f,children:[R,V,$]},_),e[34]=R,e[35]=V,e[36]=$,e[37]=_,e[38]=I,e[39]=f,e[40]=D):D=e[40];let q;e[41]!==l||e[42]!==m||e[43]!==y||e[44]!==c||e[45]!==n||e[46]!==t?(q=c&&(0,s.jsx)("div",{className:"pr-2 py-2 bg-(--slate-1) shadow-inner border-b",style:E(A.columnPreview),children:(0,s.jsx)(_a,{children:(0,s.jsx)(Oa,{table:t,column:l,onAddColumnChart:y,preview:m.get(n?`${n.database}.${n.schema}.${t.name}:${l.name}`:`${t.name}:${l.name}`),sqlTableContext:n})})}),e[41]=l,e[42]=m,e[43]=y,e[44]=c,e[45]=n,e[46]=t,e[47]=q):q=e[47];let M;return e[48]!==D||e[49]!==q?(M=(0,s.jsxs)(s.Fragment,{children:[D,q]}),e[48]=D,e[49]=q,e[50]=M):M=e[50],M};function vt(a){let{tooltipContent:e,content:t}=a;return(0,s.jsx)(xe,{content:e,delayDuration:100,children:(0,s.jsx)("span",{className:"text-xs text-black bg-gray-100 dark:invert rounded px-1",children:t})})}function Ds(a){return a}var G={name:"name",type:"type-value",defs:"defs-refs"},Nt=[{id:G.name,accessorFn:a=>[a.name,a.declaredBy],enableSorting:!0,sortingFn:"alphanumeric",header:({column:a})=>(0,s.jsx)(de,{header:"Name",column:a}),cell:({getValue:a})=>{let[e,t]=a();return(0,s.jsx)(rt,{name:e,declaredBy:t})}},{id:G.type,accessorFn:a=>[a.dataType,a.value],enableSorting:!0,sortingFn:"alphanumeric",header:({column:a})=>(0,s.jsx)(de,{header:(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("span",{children:"Type"}),(0,s.jsx)("span",{children:"Value"})]}),column:a}),cell:({getValue:a})=>{let[e,t]=a();return(0,s.jsxs)("div",{className:"max-w-[150px]",children:[(0,s.jsx)("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap text-muted-foreground font-mono text-xs",children:e}),(0,s.jsx)("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap",title:t??"",children:t})]})}},{id:G.defs,accessorFn:a=>[a.declaredBy,a.usedBy,a.name,a.declaredByNames,a.usedByNames],enableSorting:!0,sortingFn:"basic",header:({column:a})=>(0,s.jsx)(de,{header:(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("span",{children:"Declared By"}),(0,s.jsx)("span",{children:"Used By"})]}),column:a}),cell:({getValue:a})=>{let[e,t,l]=a(),n=i=>{let c=ha(i);c&&xa(c,l)};return(0,s.jsxs)("div",{className:"flex flex-col gap-1 py-1",children:[(0,s.jsxs)("div",{className:"flex flex-row overflow-auto gap-2 items-center",children:[(0,s.jsx)("span",{title:"Declared by",children:(0,s.jsx)(mt,{className:"w-3.5 h-3.5 text-muted-foreground"})}),e.length===1?(0,s.jsx)(qe,{variant:"focus",cellId:e[0],skipScroll:!0,onClick:()=>n(e[0])}):(0,s.jsx)("div",{className:"text-destructive flex flex-row gap-2",children:e.slice(0,3).map((i,c)=>(0,s.jsxs)("span",{className:"flex",children:[(0,s.jsx)(qe,{variant:"focus",cellId:i,skipScroll:!0,className:"whitespace-nowrap text-destructive",onClick:()=>n(i)},i),c<e.length-1&&", "]},i))})]}),(0,s.jsxs)("div",{className:"flex flex-row overflow-auto gap-2 items-baseline",children:[(0,s.jsx)("span",{title:"Used by",children:(0,s.jsx)(Aa,{className:"w-3.5 h-3.5 text-muted-foreground"})}),(0,s.jsx)(nt,{maxCount:3,cellIds:t,skipScroll:!0,onClick:n})]})]})}}];function wt({variables:a,sort:e,cellIdToIndex:t}){e||(e={id:G.defs,desc:!1});let l=[];switch(e.id){case G.name:l=Y(a,n=>n.name);break;case G.type:l=Y(a,n=>n.dataType);break;case G.defs:l=Y(a,n=>t.get(n.declaredBy[0]));break}return e.desc?l.toReversed():l}const Xe=(0,F.memo)(({className:a,cellIds:e,variables:t})=>{let[l,n]=F.useState([]),[i,c]=F.useState(""),d=ra(),{locale:r}=Ga(),x=(0,F.useMemo)(()=>{let m=o=>{let p=d[o];return ga(p)?`cell-${e.indexOf(o)}`:p??`cell-${e.indexOf(o)}`};return Object.values(t).map(o=>({...o,declaredByNames:o.declaredBy.map(m),usedByNames:o.usedBy.map(m)}))},[t,d,e]),h=Fa({data:(0,F.useMemo)(()=>{let m=new Map;return e.forEach((o,p)=>m.set(o,p)),wt({variables:x,sort:l[0],cellIdToIndex:m})},[x,l,e]),columns:Nt,getCoreRowModel:$a(),onGlobalFilterChange:c,getFilteredRowModel:Pa(),enableFilters:!0,enableGlobalFilter:!0,enableColumnPinning:!1,getColumnCanGlobalFilter(m){return m.columnDef.enableGlobalFilter??!0},globalFilterFn:"auto",manualSorting:!0,locale:r,onSortingChange:n,getSortedRowModel:ka(),state:{sorting:l,globalFilter:i}});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(Ea,{className:"w-full",placeholder:"Search",value:i,onChange:m=>c(m.target.value)}),(0,s.jsxs)(Ya,{className:Q("w-full text-sm flex-1 border-separate border-spacing-0",a),children:[(0,s.jsx)(Wa,{children:(0,s.jsx)(Be,{className:"whitespace-nowrap text-xs",children:h.getFlatHeaders().map(m=>(0,s.jsx)(Xa,{className:"sticky top-0 bg-background border-b",children:$e(m.column.columnDef.header,m.getContext())},m.id))})}),(0,s.jsx)(Ja,{children:h.getRowModel().rows.map(m=>(0,s.jsx)(Be,{className:"hover:bg-accent",children:m.getVisibleCells().map(o=>(0,s.jsx)(Qa,{className:"border-b",children:$e(o.column.columnDef.cell,o.getContext())},o.id))},m.id))})]})]})});Xe.displayName="VariableTable";var St=Te(),_t=Ce("marimo:session-panel:state",{openSections:["variables"],hasUserInteracted:!1},ke),Ct=()=>{let a=(0,St.c)(24),e=Ze(),t=ba(),l=J(_e),n=J(Ue),[i,c]=ye(_t),d=l.length+n.length,r;a[0]!==d||a[1]!==i.hasUserInteracted||a[2]!==i.openSections?(r=!i.hasUserInteracted&&d>0?[...new Set([...i.openSections,"datasources"])]:i.openSections,a[0]=d,a[1]=i.hasUserInteracted,a[2]=i.openSections,a[3]=r):r=a[3];let x=r,h;a[4]===c?h=a[5]:(h=u=>{c({openSections:u,hasUserInteracted:!0})},a[4]=c,a[5]=h);let m=h,o=!x.includes("datasources")&&d>0,p;a[6]===Symbol.for("react.memo_cache_sentinel")?(p=(0,s.jsx)(ce,{className:"w-4 h-4"}),a[6]=p):p=a[6];let S;a[7]!==d||a[8]!==o?(S=o&&(0,s.jsx)(ct,{children:d}),a[7]=d,a[8]=o,a[9]=S):S=a[9];let b;a[10]===S?b=a[11]:(b=(0,s.jsxs)(Me,{children:[p,"Data sources",S]}),a[10]=S,a[11]=b);let N;a[12]===Symbol.for("react.memo_cache_sentinel")?(N=(0,s.jsx)(Ee,{children:(0,s.jsx)(xt,{})}),a[12]=N):N=a[12];let y;a[13]===b?y=a[14]:(y=(0,s.jsxs)(Le,{value:"datasources",children:[b,N]}),a[13]=b,a[14]=y);let j;a[15]===Symbol.for("react.memo_cache_sentinel")?(j=(0,s.jsxs)(Me,{children:[(0,s.jsx)(pa,{className:"w-4 h-4"}),"Variables"]}),a[15]=j):j=a[15];let g;a[16]!==t||a[17]!==e?(g=(0,s.jsxs)(Le,{value:"variables",lastItem:!0,children:[j,(0,s.jsx)(Ee,{children:Object.keys(e).length===0?(0,s.jsx)("div",{className:"px-3 py-4 text-sm text-muted-foreground",children:"No variables defined"}):(0,s.jsx)(Xe,{cellIds:t.inOrderIds,variables:e})})]}),a[16]=t,a[17]=e,a[18]=g):g=a[18];let w;return a[19]!==m||a[20]!==x||a[21]!==y||a[22]!==g?(w=(0,s.jsxs)(Ia,{type:"multiple",value:x,onValueChange:m,className:"flex flex-col h-full overflow-auto",children:[y,g]}),a[19]=m,a[20]=x,a[21]=y,a[22]=g,a[23]=w):w=a[23],w};export{Ct as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as O}from"./chunk-LvLJmgfZ.js";import{g as j}from"./useEventListener-
|
|
1
|
+
import{t as O}from"./chunk-LvLJmgfZ.js";import{g as j}from"./useEventListener-C0195JsF.js";import{t as T}from"./use-toast-BwJoaaDM.js";function k(){try{window.location.reload()}catch(w){j.error("Failed to reload page",w),T({title:"Failed to reload page",description:"Please refresh the page manually."})}}var F=O(((w,y)=>{var C=(function(){var g=String.fromCharCode,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",U="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",b={};function _(r,e){if(!b[r]){b[r]={};for(var a=0;a<r.length;a++)b[r][r.charAt(a)]=a}return b[r][e]}var d={compressToBase64:function(r){if(r==null)return"";var e=d._compress(r,6,function(a){return x.charAt(a)});switch(e.length%4){default:case 0:return e;case 1:return e+"===";case 2:return e+"==";case 3:return e+"="}},decompressFromBase64:function(r){return r==null?"":r==""?null:d._decompress(r.length,32,function(e){return _(x,r.charAt(e))})},compressToUTF16:function(r){return r==null?"":d._compress(r,15,function(e){return g(e+32)})+" "},decompressFromUTF16:function(r){return r==null?"":r==""?null:d._decompress(r.length,16384,function(e){return r.charCodeAt(e)-32})},compressToUint8Array:function(r){for(var e=d.compress(r),a=new Uint8Array(e.length*2),n=0,s=e.length;n<s;n++){var f=e.charCodeAt(n);a[n*2]=f>>>8,a[n*2+1]=f%256}return a},decompressFromUint8Array:function(r){if(r==null)return d.decompress(r);for(var e=Array(r.length/2),a=0,n=e.length;a<n;a++)e[a]=r[a*2]*256+r[a*2+1];var s=[];return e.forEach(function(f){s.push(g(f))}),d.decompress(s.join(""))},compressToEncodedURIComponent:function(r){return r==null?"":d._compress(r,6,function(e){return U.charAt(e)})},decompressFromEncodedURIComponent:function(r){return r==null?"":r==""?null:(r=r.replace(/ /g,"+"),d._decompress(r.length,32,function(e){return _(U,r.charAt(e))}))},compress:function(r){return d._compress(r,16,function(e){return g(e)})},_compress:function(r,e,a){if(r==null)return"";var n,s,f={},v={},m="",A="",p="",h=2,l=3,c=2,u=[],o=0,i=0,t;for(t=0;t<r.length;t+=1)if(m=r.charAt(t),Object.prototype.hasOwnProperty.call(f,m)||(f[m]=l++,v[m]=!0),A=p+m,Object.prototype.hasOwnProperty.call(f,A))p=A;else{if(Object.prototype.hasOwnProperty.call(v,p)){if(p.charCodeAt(0)<256){for(n=0;n<c;n++)o<<=1,i==e-1?(i=0,u.push(a(o)),o=0):i++;for(s=p.charCodeAt(0),n=0;n<8;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}else{for(s=1,n=0;n<c;n++)o=o<<1|s,i==e-1?(i=0,u.push(a(o)),o=0):i++,s=0;for(s=p.charCodeAt(0),n=0;n<16;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}h--,h==0&&(h=2**c,c++),delete v[p]}else for(s=f[p],n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;h--,h==0&&(h=2**c,c++),f[A]=l++,p=String(m)}if(p!==""){if(Object.prototype.hasOwnProperty.call(v,p)){if(p.charCodeAt(0)<256){for(n=0;n<c;n++)o<<=1,i==e-1?(i=0,u.push(a(o)),o=0):i++;for(s=p.charCodeAt(0),n=0;n<8;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}else{for(s=1,n=0;n<c;n++)o=o<<1|s,i==e-1?(i=0,u.push(a(o)),o=0):i++,s=0;for(s=p.charCodeAt(0),n=0;n<16;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1}h--,h==0&&(h=2**c,c++),delete v[p]}else for(s=f[p],n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;h--,h==0&&(h=2**c,c++)}for(s=2,n=0;n<c;n++)o=o<<1|s&1,i==e-1?(i=0,u.push(a(o)),o=0):i++,s>>=1;for(;;)if(o<<=1,i==e-1){u.push(a(o));break}else i++;return u.join("")},decompress:function(r){return r==null?"":r==""?null:d._decompress(r.length,32768,function(e){return r.charCodeAt(e)})},_decompress:function(r,e,a){var n=[],s=4,f=4,v=3,m="",A=[],p,h,l,c,u,o,i,t={val:a(0),position:e,index:1};for(p=0;p<3;p+=1)n[p]=p;for(l=0,u=2**2,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;switch(l){case 0:for(l=0,u=2**8,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;i=g(l);break;case 1:for(l=0,u=2**16,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;i=g(l);break;case 2:return""}for(n[3]=i,h=i,A.push(i);;){if(t.index>r)return"";for(l=0,u=2**v,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;switch(i=l){case 0:for(l=0,u=2**8,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;n[f++]=g(l),i=f-1,s--;break;case 1:for(l=0,u=2**16,o=1;o!=u;)c=t.val&t.position,t.position>>=1,t.position==0&&(t.position=e,t.val=a(t.index++)),l|=(c>0?1:0)*o,o<<=1;n[f++]=g(l),i=f-1,s--;break;case 2:return A.join("")}if(s==0&&(s=2**v,v++),n[i])m=n[i];else if(i===f)m=h+h.charAt(0);else return null;A.push(m),n[f++]=h+m.charAt(0),s--,h=m,s==0&&(s=2**v,v++)}}};return d})();typeof define=="function"&&define.amd?define(function(){return C}):y!==void 0&&y!=null?y.exports=C:typeof angular<"u"&&angular!=null&&angular.module("LZString",[]).factory("LZString",function(){return C})})),P=F();function E(w){let{code:y,baseUrl:C="https://marimo.app"}=w,g=new URL(C);return y&&(g.hash=`#code/${(0,P.compressToEncodedURIComponent)(y)}`),g.href}export{F as n,k as r,E as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./shell-Ck42V1Kn.js";export{e as shell};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./sieve-DfSJcUfS.js";export{e as sieve};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var A=Object.defineProperty;var N=(t,e,
|
|
1
|
+
var A=Object.defineProperty;var N=(t,e,r)=>e in t?A(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var b=(t,e,r)=>N(t,typeof e!="symbol"?e+"":e,r);import{s as T}from"./chunk-LvLJmgfZ.js";import{u as I}from"./useEvent-D91BmmQi.js";import{a as V}from"./cells-Jr-5Pc9f.js";import{t as M}from"./compiler-runtime-B3qBwwSJ.js";import{g as k}from"./useEventListener-C0195JsF.js";import{t as E}from"./objects-BlG0ZrO0.js";import{o as _}from"./utils-BWBBpCkT.js";import{T as P,v as z}from"./config-B-Q7J_6d.js";import{t as D}from"./cn-DYvqRARy.js";import{t as $}from"./jsx-runtime-Blw4afVn.js";import{c as B,d as H}from"./download-CQ7iZFJL.js";import{r as L}from"./requests-9-v2bhoi.js";import{F as R}from"./layout-D4bpsgVD.js";import{t as Y}from"./Deferred-D2igisxY.js";import{t as q}from"./use-toast-BwJoaaDM.js";import{t as x}from"./useInterval-Be6s6idX.js";var G=class{constructor(){b(this,"capturedInputs",new Map);b(this,"inFlight",new Map)}cancelEntry(t){t.controller.abort(),t.deferred.status==="pending"&&t.deferred.resolve(void 0)}needsCapture(t,e){if(this.capturedInputs.get(t)===e)return!1;let r=this.inFlight.get(t);return!(r&&r.inputValue===e)}waitForInFlight(t,e){let r=this.inFlight.get(t);return r&&r.inputValue===e?r.deferred.promise:null}startCapture(t,e){let r=this.inFlight.get(t);r&&this.cancelEntry(r);let a=new AbortController,i=new Y,s={controller:a,inputValue:e,deferred:i};return this.inFlight.set(t,s),{signal:a.signal,markCaptured:p=>{this.inFlight.get(t)===s&&(i.resolve(p),this.capturedInputs.set(t,e),this.inFlight.delete(t))},markFailed:()=>{this.inFlight.get(t)===s&&(i.resolve(void 0),this.inFlight.delete(t))}}}prune(t){for(let e of this.capturedInputs.keys())t.has(e)||this.capturedInputs.delete(e);for(let[e,r]of this.inFlight)t.has(e)||(this.cancelEntry(r),this.inFlight.delete(e))}get isCapturing(){return this.inFlight.size>0}abort(){for(let t of this.inFlight.values())this.cancelEntry(t);this.inFlight.clear()}reset(){this.abort(),this.capturedInputs.clear()}},J=M(),S=5e3;function K(){let t=(0,J.c)(14),e=I(_),{state:r}=I(z),a=e.auto_download.includes("markdown"),i=e.auto_download.includes("html"),s=e.auto_download.includes("ipynb"),p=r===P.OPEN,m=!a||!p,d=!i||!p,c=!s||!p,{autoExportAsHTML:l,autoExportAsIPYNB:o,autoExportAsMarkdown:n,updateCellOutputs:u}=L(),h=O(),f;t[0]===n?f=t[1]:(f=async()=>{await n({download:!1})},t[0]=n,t[1]=f);let g;t[2]===m?g=t[3]:(g={delayMs:S,whenVisible:!0,disabled:m},t[2]=m,t[3]=g),x(f,g);let w;t[4]===l?w=t[5]:(w=async()=>{await l({download:!1,includeCode:!0,files:R.INSTANCE.filenames()})},t[4]=l,t[5]=w);let v;t[6]===d?v=t[7]:(v={delayMs:S,whenVisible:!0,disabled:d},t[6]=d,t[7]=v),x(w,v);let F;t[8]!==o||t[9]!==h||t[10]!==u?(F=async()=>{await j({takeScreenshots:()=>h({progress:H.indeterminate()}),updateCellOutputs:u}),await o({download:!1})},t[8]=o,t[9]=h,t[10]=u,t[11]=F):F=t[11];let y;t[12]===c?y=t[13]:(y={delayMs:S,whenVisible:!0,disabled:c,skipIfRunning:!0},t[12]=c,t[13]=y),x(F,y)}var Q=new Set(["text/html","application/vnd.vegalite.v5+json","application/vnd.vega.v5+json","application/vnd.vegalite.v6+json","application/vnd.vega.v6+json"]);const C=new G;function O(){let t=I(V);return async e=>{var d,c;let{progress:r}=e,a=new Set(E.keys(t));C.prune(a);let i=[],s=[];for(let[l,o]of E.entries(t)){let n=(d=o.output)==null?void 0:d.data;if((c=o.output)!=null&&c.mimetype&&Q.has(o.output.mimetype)&&n)if(C.needsCapture(l,n))i.push([l,n]);else{let u=C.waitForInFlight(l,n);u&&s.push({cellId:l,promise:u})}}if(i.length===0&&s.length===0)return{};i.length>0&&r.addTotal(i.length);let p={};for(let[l,o]of i){let n=C.startCapture(l,o);try{let u=await B(l);if(n.signal.aborted)continue;if(!u){k.error(`Failed to capture screenshot for cell ${l}`),n.markFailed();continue}let h=["image/png",u];p[l]=h,n.markCaptured(h)}catch(u){k.error(`Error screenshotting cell ${l}:`,u),n.markFailed()}finally{r.increment(1)}}let m=await Promise.allSettled(s.map(({promise:l})=>l));for(let[l,{cellId:o}]of s.entries()){let n=m[l];n.status==="fulfilled"&&n.value&&(p[o]=n.value)}return p}}async function j(t){let{takeScreenshots:e,updateCellOutputs:r}=t;try{let a=await e();E.size(a)>0&&await r({cellIdsToOutput:a})}catch(a){k.error("Error updating cell outputs with screenshots:",a),q({title:"Failed to capture cell outputs",description:"Some outputs may be missing from the export. Continuing.",variant:"danger"})}}var U=M(),W=T($(),1),X=t=>{let e=(0,U.c)(8),r,a;e[0]===t?(r=e[1],a=e[2]):({className:r,...a}=t,e[0]=t,e[1]=r,e[2]=a);let i;e[3]===r?i=e[4]:(i=D("animate-pulse rounded-md bg-muted",r),e[3]=r,e[4]=i);let s;return e[5]!==a||e[6]!==i?(s=(0,W.jsx)("div",{className:i,...a}),e[5]=a,e[6]=i,e[7]=s):s=e[7],s};export{O as i,j as n,K as r,X as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.mo-slide-content{justify-content:center;width:100%;min-height:fit-content;display:flex;& .output{max-width:100%;width:unset;margin:auto 0}&>:only-child:has(>.output:only-child,>*>.output:only-child){flex:1}& div:has(>marimo-ui-element>marimo-vega){flex:1;display:block!important;@media (width>=500px){min-width:350px}}}.mo-slides-notes-resize{background-color:#0000;outline:none;height:4px;transition:background-color .2s linear}.mo-slides-notes-resize:hover,.mo-slides-notes-resize[data-resize-handle-active]{background-color:var(--slate-11)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as a}from"./smalltalk-CT418Iph.js";export{a as smalltalk};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as I}from"./chunk-LvLJmgfZ.js";import"./useEvent-D91BmmQi.js";import{t as D}from"./react-Bj1aDYRI.js";import{E as F}from"./cells-
|
|
1
|
+
import{s as I}from"./chunk-LvLJmgfZ.js";import"./useEvent-D91BmmQi.js";import{t as D}from"./react-Bj1aDYRI.js";import{E as F}from"./cells-Jr-5Pc9f.js";import"./react-dom-CSu739Rf.js";import{t as $}from"./compiler-runtime-B3qBwwSJ.js";import{n as G}from"./useEventListener-C0195JsF.js";import{n as R}from"./constants-CDyU_g2F.js";import{t as T}from"./cn-DYvqRARy.js";import{t as W}from"./jsx-runtime-Blw4afVn.js";import"./fullscreen-CTDqNQr6.js";import{t as A}from"./tooltip-4bZlU7jl.js";import{t as w}from"./button-DDGiD1NW.js";import{st as B}from"./dist-12S8I4CH.js";import"./cjs-D5tzp-Y6.js";import"./main-BNL5rxQw.js";import"./useNonce-CbdaHKzX.js";import{r as J}from"./requests-9-v2bhoi.js";import{n as E,t as K}from"./LazyAnyLanguageCodeMirror-DPOEues4.js";import{t as L}from"./x-C-Eq0ag8.js";import{t as U}from"./spinner-D-V4psAa.js";import{t as V}from"./plus-AgXtozBz.js";import"./dist-DcwTQG1A.js";import"./dist-DnjsPBRJ.js";import"./dist-BJZAIIze.js";import"./dist-aRc_dRed.js";import"./dist-CPjTeT8p.js";import"./session-BmukRjSi.js";import{r as X}from"./useTheme-Bxv9B31g.js";import"./purify.es-CWmnYhGI.js";import{t as Y}from"./RenderHTML-B9jx7Dsm.js";import{a as Z,c as Q,i as ee,n as te,r as se}from"./dialog-BCVepWLJ.js";import{n as re}from"./ImperativeModal-fY-ZfT0b.js";import{n as le}from"./error-banner-BSxEOIn2.js";import{o as oe}from"./focus-C0HXXg3V.js";import{n as ie}from"./useAsyncData-Bg5iAViP.js";import{n as ae,r as ne,t as M}from"./react-resizable-panels.browser.esm-Z-MD3n3J.js";import{a as me,f as ce,o as de,r as pe,t as fe}from"./command-Dqxie4gq.js";import{t as he}from"./empty-state-yX2_pzkH.js";import{n as xe,r as ue}from"./panel-context-CmeYEpWr.js";import{t as je}from"./readonly-code-display-CVY2f7EZ.js";import{t as H}from"./kiosk-mode-CWGEgpon.js";var O=$(),C=I(D(),1),s=I(W(),1),be=G;const ve=t=>{let e=(0,O.c)(6),{children:r}=t,{openModal:i,closeModal:o}=re(),l;e[0]!==o||e[1]!==i?(l=()=>i((0,s.jsx)(Ne,{onClose:o})),e[0]=o,e[1]=i,e[2]=l):l=e[2];let a;return e[3]!==r||e[4]!==l?(a=(0,s.jsx)(be,{onClick:l,children:r}),e[3]=r,e[4]=l,e[5]=a):a=e[5],a};var Ne=t=>{let e=(0,O.c)(4),{onClose:r}=t,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=(0,s.jsx)(Q,{children:"Contribute a Snippet"}),e[0]=i):i=e[0];let o;e[1]===Symbol.for("react.memo_cache_sentinel")?(o=(0,s.jsxs)(Z,{children:[i,(0,s.jsxs)(se,{children:["Have a useful snippet you want to share with the community? Make a pull request"," ",(0,s.jsx)("a",{href:R.githubPage,target:"_blank",className:"underline",children:"on GitHub"}),"."]})]}),e[1]=o):o=e[1];let l;return e[2]===r?l=e[3]:(l=(0,s.jsxs)(te,{className:"max-w-md",children:[o,(0,s.jsx)(ee,{children:(0,s.jsx)(w,{"data-testid":"snippet-close-button",variant:"default",onClick:r,children:"Close"})})]}),e[2]=r,e[3]=l),l},k=$(),_e=[B.lineWrapping],ge=()=>{let t=(0,k.c)(24),{readSnippets:e}=J(),[r,i]=C.useState(),o=xe(),l=ue(),a;t[0]===e?a=t[1]:(a=()=>e(),t[0]=e,t[1]=a);let c;t[2]===Symbol.for("react.memo_cache_sentinel")?(c=[],t[2]=c):c=t[2];let{data:N,error:j,isPending:g}=ie(a,c);if(j){let m;return t[3]===j?m=t[4]:(m=(0,s.jsx)(le,{error:j}),t[3]=j,t[4]=m),m}if(g||!N){let m;return t[5]===Symbol.for("react.memo_cache_sentinel")?(m=(0,s.jsx)(U,{size:"medium",centered:!0}),t[5]=m):m=t[5],m}let _=o==="vertical",b;t[6]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsx)(me,{placeholder:"Search snippets...",className:"h-6 m-1",rootClassName:"flex-1 border-r"}),t[6]=b):b=t[6];let f,h;t[7]===Symbol.for("react.memo_cache_sentinel")?(f=(0,s.jsxs)("div",{className:"flex items-center w-full border-b",children:[b,(0,s.jsx)(ve,{children:(0,s.jsx)("button",{className:"float-right px-2 m-0 h-full hover:bg-accent hover:text-accent-foreground",children:(0,s.jsx)(V,{className:"h-4 w-4"})})})]}),h=(0,s.jsx)(pe,{children:"No results"}),t[7]=f,t[8]=h):(f=t[7],h=t[8]);let v;t[9]===Symbol.for("react.memo_cache_sentinel")?(v=m=>i(m),t[9]=v):v=t[9];let d;t[10]===N.snippets?d=t[11]:(d=(0,s.jsx)(M,{defaultSize:40,minSize:20,maxSize:70,children:(0,s.jsxs)(fe,{className:"h-full rounded-none",children:[f,h,(0,s.jsx)(we,{onSelect:v,snippets:N.snippets})]})}),t[10]=N.snippets,t[11]=d);let u=_?"h-1":"w-1",p;t[12]===u?p=t[13]:(p=T("bg-border hover:bg-primary/50 transition-colors",u),t[12]=u,t[13]=p);let x;t[14]===p?x=t[15]:(x=(0,s.jsx)(ne,{className:p}),t[14]=p,t[15]=x);let n;t[16]===r?n=t[17]:(n=(0,s.jsx)(M,{defaultSize:60,minSize:20,children:(0,s.jsx)(C.Suspense,{children:(0,s.jsx)("div",{className:"h-full snippet-viewer flex flex-col overflow-hidden",children:r?(0,s.jsx)(Se,{snippet:r,onClose:()=>i(void 0)},r.title):(0,s.jsx)(he,{title:"",description:"Click on a snippet to view its content."})})})}),t[16]=r,t[17]=n);let S;return t[18]!==o||t[19]!==l||t[20]!==n||t[21]!==d||t[22]!==x?(S=(0,s.jsx)("div",{className:"flex-1 overflow-hidden h-full",children:(0,s.jsxs)(ae,{direction:o,className:"h-full",children:[d,x,n]},l)}),t[18]=o,t[19]=l,t[20]=n,t[21]=d,t[22]=x,t[23]=S):S=t[23],S},Se=t=>{let e=(0,k.c)(33),{snippet:r,onClose:i}=t,{theme:o}=X(),{createNewCell:l}=F(),a=oe(),c;e[0]!==l||e[1]!==a||e[2]!==r.sections?(c=()=>{for(let n of r.sections.toReversed())n.code&&l({code:n.code,before:!1,cellId:a??"__end__",skipIfCodeExists:!0})},e[0]=l,e[1]=a,e[2]=r.sections,e[3]=c):c=e[3];let N=c,j;e[4]!==l||e[5]!==a?(j=n=>{l({code:n,before:!1,cellId:a??"__end__"})},e[4]=l,e[5]=a,e[6]=j):j=e[6];let g=j,_;e[7]===r.title?_=e[8]:(_=(0,s.jsx)("span",{children:r.title}),e[7]=r.title,e[8]=_);let b;e[9]===Symbol.for("react.memo_cache_sentinel")?(b=(0,s.jsx)(L,{className:"h-4 w-4"}),e[9]=b):b=e[9];let f;e[10]===i?f=e[11]:(f=(0,s.jsx)(w,{size:"sm",variant:"ghost",onClick:i,className:"h-6 w-6 p-0 hover:bg-muted-foreground/10",children:b}),e[10]=i,e[11]=f);let h;e[12]!==_||e[13]!==f?(h=(0,s.jsxs)("div",{className:"text-sm font-semibold bg-muted border-y px-2 py-1 flex justify-between items-center",children:[_,f]}),e[12]=_,e[13]=f,e[14]=h):h=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=(0,s.jsx)(E,{className:"ml-2 h-4 w-4"}),e[15]=v):v=e[15];let d;e[16]===N?d=e[17]:(d=(0,s.jsx)("div",{className:"flex justify-end",children:(0,s.jsx)(H,{children:(0,s.jsxs)(w,{className:"float-right",size:"xs",variant:"outline",onClick:N,children:["Insert snippet",v]})})}),e[16]=N,e[17]=d);let u;if(e[18]!==g||e[19]!==r.sections||e[20]!==r.title||e[21]!==o){let n;e[23]!==g||e[24]!==r.title||e[25]!==o?(n=S=>{let{code:m,html:z,id:y}=S;if(z)return(0,s.jsx)("div",{children:Y({html:z})},`${r.title}-${y}`);if(!m)return null;let{language:P,code:q}=je(m);return(0,s.jsxs)("div",{className:"relative hover-actions-parent pr-2",children:[(0,s.jsx)(H,{children:(0,s.jsx)(A,{content:"Insert snippet",children:(0,s.jsx)(w,{className:"absolute -top-2 -right-1 z-10 hover-action px-2 bg-background",size:"sm",variant:"outline",onClick:()=>{g(m)},children:(0,s.jsx)(E,{className:"h-5 w-5"})})})}),(0,s.jsx)(C.Suspense,{children:(0,s.jsx)(K,{theme:o==="dark"?"dark":"light",language:P,className:"cm border rounded overflow-hidden",extensions:_e,value:q,readOnly:!0},`${r.title}-${y}`)})]},`${r.title}-${y}`)},e[23]=g,e[24]=r.title,e[25]=o,e[26]=n):n=e[26],u=r.sections.map(n),e[18]=g,e[19]=r.sections,e[20]=r.title,e[21]=o,e[22]=u}else u=e[22];let p;e[27]!==d||e[28]!==u?(p=(0,s.jsxs)("div",{className:"px-2 py-2 space-y-4 overflow-auto flex-1",children:[d,u]}),e[27]=d,e[28]=u,e[29]=p):p=e[29];let x;return e[30]!==p||e[31]!==h?(x=(0,s.jsxs)(s.Fragment,{children:[h,p]}),e[30]=p,e[31]=h,e[32]=x):x=e[32],x},we=t=>{let e=(0,k.c)(7),{snippets:r,onSelect:i}=t,o;if(e[0]!==i||e[1]!==r){let a;e[3]===i?a=e[4]:(a=c=>(0,s.jsx)(de,{className:"rounded-none",onSelect:()=>i(c),children:(0,s.jsx)("div",{className:"flex flex-row gap-2 items-center",children:(0,s.jsx)("span",{className:"mt-1 text-accent-foreground",children:c.title})})},c.title),e[3]=i,e[4]=a),o=r.map(a),e[0]=i,e[1]=r,e[2]=o}else o=e[2];let l;return e[5]===o?l=e[6]:(l=(0,s.jsx)(ce,{className:"flex flex-col overflow-auto",children:o}),e[5]=o,e[6]=l),l};export{ge as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as r}from"./sparql-BlJ_cLEt.js";export{r as sparql};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as I}from"./strings-Djnbwmfl.js";import{t as p}from"./createLucideIcon-w-Qo9n0R.js";import{a as J}from"./useLifecycle-lLOBhc-1.js";import{t as R}from"./chart-no-axes-column-iDRxid4h.js";import{r as Z,t as ee}from"./table-D-tcnZC7.js";import{t as te}from"./square-function-DNNRTPQJ.js";var ae=p("align-center-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]),ne=p("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),re=p("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]),ie=p("baseline",[["path",{d:"M4 20h16",key:"14thso"}],["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),le=p("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]),P=p("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),oe=p("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]),se=p("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),ce=p("chart-scatter",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]]),ue=p("ruler-dimension-line",[["path",{d:"M10 15v-3",key:"1pjskw"}],["path",{d:"M14 15v-3",key:"1o1mqj"}],["path",{d:"M18 15v-3",key:"cws6he"}],["path",{d:"M2 8V4",key:"3jv1jz"}],["path",{d:"M22 6H2",key:"1iqbfk"}],["path",{d:"M22 8V4",key:"16f4ou"}],["path",{d:"M6 15v-3",key:"1ij1qe"}],["rect",{x:"2",y:"12",width:"20",height:"8",rx:"2",key:"1tqiko"}]]),de=p("sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);function v(e){return e&&e.replaceAll(".","\\.").replaceAll("[","\\[").replaceAll("]","\\]").replaceAll(":","\\:")}const fe="__count__",Y="default",me="yearmonthdate",ye=6,ge="",pe={line:oe,bar:se,pie:Z,scatter:ce,heatmap:ee,area:le},U="mean",he={none:te,count:J,sum:de,mean:ie,median:ae,min:ne,max:re,distinct:J,valid:J,stdev:R,stdevp:R,variance:P,variancep:P,bin:ue},be={none:"No aggregation",count:"Count of records",sum:"Sum of values",mean:"Mean of values",median:"Median of values",min:"Minimum value",max:"Maximum value",distinct:"Count of distinct records",valid:"Count non-null records",stdev:"Standard deviation",stdevp:"Standard deviation of population",variance:"Variance",variancep:"Variance of population",bin:"Group values into bins"},ke=[Y,"accent","category10","category20","category20b","category20c","dark2","paired","pastel1","pastel2","set1","set2","set3","tableau10","tableau20","blues","greens","greys","oranges","purples","reds","bluegreen","bluepurple","goldgreen","goldorange","goldred","greenblue","orangered","purplebluegreen","purplered","redpurple","yellowgreenblue","yelloworangered","blueorange","brownbluegreen","purplegreen","pinkyellowgreen","purpleorange","redblue","redgrey","redyellowblue","redyellowgreen","spectral","rainbow","sinebow"],ve={number:"Continuous numerical scale",string:"Discrete categorical scale (inputs treated as strings)",temporal:"Continuous temporal scale"},xe={year:["Year","2025"],quarter:["Quarter","Q1 2025"],month:["Month","Jan 2025"],week:["Week","Jan 01, 2025"],day:["Day","Jan 01, 2025"],hours:["Hour","Jan 01, 2025 12:00"],minutes:["Minute","Jan 01, 2025 12:34"],seconds:["Second","Jan 01, 2025 12:34:56"],milliseconds:["Millisecond","Jan 01, 2025 12:34:56.789"],date:["Date","Jan 01, 2025"],dayofyear:["Day of Year","Day 1 of 2025"],yearmonth:["Year Month","Jan 2025"],yearmonthdate:["Year Month Date","Jan 01, 2025"],monthdate:["Month Date","Jan 01"]},Me=["number","string","temporal"],O=["year","quarter","month","date","week","day","dayofyear","hours","minutes","seconds","milliseconds"],X=["yearmonth","yearmonthdate","monthdate"],L=[...O,...X];[...L];const we=["ascending","descending"],q="none",Ce="bin",Ae=[q,"bin","count","sum","mean","median","min","max","distinct","valid","stdev","stdevp","variance","variancep"],N=[q,"count","distinct","valid"],y={LINE:"line",BAR:"bar",PIE:"pie",SCATTER:"scatter",HEATMAP:"heatmap",AREA:"area"},Ee=Object.values(y),Te=["X","Y","Color",q];function B(e){switch(e){case"number":case"integer":return"quantitative";case"string":case"boolean":case"unknown":return"nominal";case"date":case"datetime":case"time":case"temporal":return"temporal";default:return I(e),"nominal"}}function _e(e){switch(e){case"number":case"integer":return"number";case"string":case"boolean":case"unknown":return"string";case"date":case"datetime":case"time":return"temporal";default:return I(e),"string"}}function Q(e){switch(e){case y.PIE:return"arc";case y.SCATTER:return"point";case y.HEATMAP:return"rect";default:return e}}function j(e,t,a,i){if(e===y.HEATMAP)return a!=null&&a.maxbins?{maxbins:a==null?void 0:a.maxbins}:void 0;if(t!=="number")return;if(!(a!=null&&a.binned))return i;let n={};return a.step!==void 0&&(n.step=a.step),a.maxbins!==void 0&&(n.maxbins=a.maxbins),Object.keys(n).length===0?!0:n}function G(e){var i,n;let t=(i=e.color)==null?void 0:i.range;if(t!=null&&t.length)return{range:t};let a=(n=e.color)==null?void 0:n.scheme;if(a&&a!=="default")return{scheme:a}}function De(e,t){var o,c,u,f,h,s,g,k,b;if(e===y.PIE)return;let a;if(m((c=(o=t.general)==null?void 0:o.colorByColumn)==null?void 0:c.field))a=(u=t.general)==null?void 0:u.colorByColumn;else if(m((f=t.color)==null?void 0:f.field))switch((h=t.color)==null?void 0:h.field){case"X":a=(s=t.general)==null?void 0:s.xColumn;break;case"Y":a=(g=t.general)==null?void 0:g.yColumn;break;case"Color":a=(k=t.general)==null?void 0:k.colorByColumn;break;default:return}else return;if(!a||!m(a.field)||a.field==="none")return;if(a.field==="__count__")return{aggregate:"count",type:"quantitative"};let i=(b=t.color)==null?void 0:b.bin,n=a.selectedDataType||"string",r=a==null?void 0:a.aggregate;return{field:v(a.field),type:B(n),scale:G(t),aggregate:W(r,n),bin:j(e,n,i)}}function Ve(e,t){var a,i,n,r,o;if(!((a=t.general)!=null&&a.stacking||!m((n=(i=t.general)==null?void 0:i.colorByColumn)==null?void 0:n.field)||e!==y.BAR))return{field:v((o=(r=t.general)==null?void 0:r.colorByColumn)==null?void 0:o.field)}}function W(e,t,a){if(t!=="temporal"&&!(e==="none"||e==="bin"))return e?t==="string"?N.includes(e)?e:void 0:e:a||void 0}function qe(e){switch(e){case"integer":return",.0f";case"number":return",.2f";default:return}}function $(e){var u,f,h,s,g,k,b,M,w,C,_,D,V,A,E,T;let{formValues:t,xEncoding:a,yEncoding:i,colorByEncoding:n}=e;if(!t.tooltips)return;function r(l,x,d){if("aggregate"in l&&l.aggregate==="count"&&!m(l.field))return{aggregate:"count"};if(l&&"field"in l&&m(l.field))return l.timeUnit&&!d&&(d=l.field),{field:l.field,aggregate:l.aggregate,timeUnit:l.timeUnit,format:qe(x),title:d,bin:l.bin}}if(t.tooltips.auto){let l=[],x=r(a,((f=(u=t.general)==null?void 0:u.xColumn)==null?void 0:f.type)||"string",(h=t.xAxis)==null?void 0:h.label);x&&l.push(x);let d=r(i,((g=(s=t.general)==null?void 0:s.yColumn)==null?void 0:g.type)||"string",(k=t.yAxis)==null?void 0:k.label);d&&l.push(d);let z=r(n||{},((M=(b=t.general)==null?void 0:b.colorByColumn)==null?void 0:M.type)||"string");return z&&l.push(z),l}let o=t.tooltips.fields??[],c=[];for(let l of o){if("field"in a&&m(a.field)&&a.field===l.field){let d=r(a,((C=(w=t.general)==null?void 0:w.xColumn)==null?void 0:C.type)||"string",(_=t.xAxis)==null?void 0:_.label);d&&c.push(d);continue}if("field"in i&&m(i.field)&&i.field===l.field){let d=r(i,((V=(D=t.general)==null?void 0:D.yColumn)==null?void 0:V.type)||"string",(A=t.yAxis)==null?void 0:A.label);d&&c.push(d);continue}if(n&&"field"in n&&m(n.field)&&n.field===l.field){let d=r(n,((T=(E=t.general)==null?void 0:E.colorByColumn)==null?void 0:T.type)||"string");d&&c.push(d);continue}let x={field:v(l.field)};c.push(x)}return c}function Be(e,t,a,i,n){var A,E,T,l;let{xColumn:r,yColumn:o,colorByColumn:c,horizontal:u,stacking:f,title:h,facet:s}=t.general??{};if(e===y.PIE)return He(t,a,i,n);if(!m(r==null?void 0:r.field))return"X-axis column is required";if(!m(o==null?void 0:o.field))return"Y-axis column is required";let g=S(r,(A=t.xAxis)==null?void 0:A.bin,H((E=t.xAxis)==null?void 0:E.label),c!=null&&c.field&&u?f:void 0,e),k=U;(o==null?void 0:o.selectedDataType)==="string"&&(k="count");let b=S(o,(T=t.yAxis)==null?void 0:T.bin,H((l=t.yAxis)==null?void 0:l.label),c!=null&&c.field&&!u?f:void 0,e,k),M=s!=null&&s.row.field?F(s.row,e):void 0,w=s!=null&&s.column.field?F(s.column,e):void 0,C=De(e,t),_=K(e,t,a,i,n,h),D={x:u?b:g,y:u?g:b,xOffset:Ve(e,t),color:C,tooltip:$({formValues:t,xEncoding:g,yEncoding:b,colorByEncoding:C}),...M&&{row:M},...w&&{column:w}},V=Se(s==null?void 0:s.column,s==null?void 0:s.row);return{..._,mark:{type:Q(e)},encoding:D,...V}}function je(e,t){return{...e,data:{values:t}}}function S(e,t,a,i,n,r){let o=e.selectedDataType||"string";return e.field==="__count__"?{aggregate:"count",type:"quantitative",bin:j(n,o,t),title:a==="__count__"?void 0:a,stack:i}:{field:v(e.field),type:B(e.selectedDataType||"unknown"),bin:j(n,o,t),title:a,stack:i,aggregate:W(e.aggregate,o,r),sort:e.sort,timeUnit:Je(e)}}function F(e,t){let a=j(t,e.selectedDataType||"string",{maxbins:e.maxbins,binned:e.binned},{maxbins:6});return{field:v(e.field),sort:e.sort,timeUnit:Pe(e),type:B(e.selectedDataType||"unknown"),bin:a}}function He(e,t,a,i){var f,h,s,g;let{yColumn:n,colorByColumn:r,title:o}=e.general??{};if(!m(r==null?void 0:r.field))return"Color by column is required";if(!m(n==null?void 0:n.field))return"Size by column is required";let c=S(n,(f=e.xAxis)==null?void 0:f.bin,H((h=e.xAxis)==null?void 0:h.label),void 0,y.PIE),u={field:v(r.field),type:B(r.selectedDataType||"unknown"),scale:G(e),title:H((s=e.yAxis)==null?void 0:s.label)};return{...K(y.PIE,e,t,a,i,o),mark:{type:Q(y.PIE),innerRadius:(g=e.style)==null?void 0:g.innerRadius},encoding:{theta:c,color:u,tooltip:$({formValues:e,xEncoding:c,yEncoding:c,colorByEncoding:u})}}}function K(e,t,a,i,n,r){var c,u,f;let o=((c=t.style)==null?void 0:c.gridLines)??!1;return e===y.SCATTER&&(o=!0),{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"dark":"white",title:r,data:{values:[]},height:((u=t.yAxis)==null?void 0:u.height)??n,width:((f=t.xAxis)==null?void 0:f.width)??i,config:{axis:{grid:o}}}}function m(e){return e!==void 0&&e.trim()!==""}function H(e){let t=e==null?void 0:e.trim();return t===""?void 0:t}function Je(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Pe(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Se(e,t){let a={};return(e==null?void 0:e.linkXAxis)===!1&&(a.x="independent"),(t==null?void 0:t.linkYAxis)===!1&&(a.y="independent"),Object.keys(a).length>0?{resolve:{axis:a}}:void 0}export{P as A,Y as C,ve as D,ge as E,xe as O,U as S,me as T,be as _,Ae as a,ke as b,Te as c,q as d,Me as f,L as g,N as h,_e as i,v as k,X as l,we as m,Be as n,Ce as o,O as p,m as r,Ee as s,je as t,y as u,he as v,ye as w,fe as x,pe as y};
|
|
1
|
+
import{i as I}from"./strings--BknHX9C.js";import{t as p}from"./createLucideIcon-w-Qo9n0R.js";import{a as J}from"./useLifecycle-lLOBhc-1.js";import{t as R}from"./chart-no-axes-column-iDRxid4h.js";import{r as Z,t as ee}from"./table-D-tcnZC7.js";import{t as te}from"./square-function-DNNRTPQJ.js";var ae=p("align-center-vertical",[["path",{d:"M12 2v20",key:"t6zp3m"}],["path",{d:"M8 10H4a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h4",key:"14d6g8"}],["path",{d:"M16 10h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2h-4",key:"1e2lrw"}],["path",{d:"M8 20H7a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2h1",key:"1fkdwx"}],["path",{d:"M16 14h1a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2h-1",key:"1euafb"}]]),ne=p("arrow-down-to-line",[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]]),re=p("arrow-up-to-line",[["path",{d:"M5 3h14",key:"7usisc"}],["path",{d:"m18 13-6-6-6 6",key:"1kf1n9"}],["path",{d:"M12 7v14",key:"1akyts"}]]),ie=p("baseline",[["path",{d:"M4 20h16",key:"14thso"}],["path",{d:"m6 16 6-12 6 12",key:"1b4byz"}],["path",{d:"M8 12h8",key:"1wcyev"}]]),le=p("chart-area",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M7 11.207a.5.5 0 0 1 .146-.353l2-2a.5.5 0 0 1 .708 0l3.292 3.292a.5.5 0 0 0 .708 0l4.292-4.292a.5.5 0 0 1 .854.353V16a1 1 0 0 1-1 1H8a1 1 0 0 1-1-1z",key:"q0gr47"}]]),P=p("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),oe=p("chart-line",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]]),se=p("chart-no-axes-column-increasing",[["path",{d:"M5 21v-6",key:"1hz6c0"}],["path",{d:"M12 21V9",key:"uvy0l4"}],["path",{d:"M19 21V3",key:"11j9sm"}]]),ce=p("chart-scatter",[["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}],["circle",{cx:"18.5",cy:"5.5",r:".5",fill:"currentColor",key:"lysivs"}],["circle",{cx:"11.5",cy:"11.5",r:".5",fill:"currentColor",key:"byv1b8"}],["circle",{cx:"7.5",cy:"16.5",r:".5",fill:"currentColor",key:"nkw3mc"}],["circle",{cx:"17.5",cy:"14.5",r:".5",fill:"currentColor",key:"1gjh6j"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}]]),ue=p("ruler-dimension-line",[["path",{d:"M10 15v-3",key:"1pjskw"}],["path",{d:"M14 15v-3",key:"1o1mqj"}],["path",{d:"M18 15v-3",key:"cws6he"}],["path",{d:"M2 8V4",key:"3jv1jz"}],["path",{d:"M22 6H2",key:"1iqbfk"}],["path",{d:"M22 8V4",key:"16f4ou"}],["path",{d:"M6 15v-3",key:"1ij1qe"}],["rect",{x:"2",y:"12",width:"20",height:"8",rx:"2",key:"1tqiko"}]]),de=p("sigma",[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]]);function v(e){return e&&e.replaceAll(".","\\.").replaceAll("[","\\[").replaceAll("]","\\]").replaceAll(":","\\:")}const fe="__count__",Y="default",me="yearmonthdate",ye=6,ge="",pe={line:oe,bar:se,pie:Z,scatter:ce,heatmap:ee,area:le},U="mean",he={none:te,count:J,sum:de,mean:ie,median:ae,min:ne,max:re,distinct:J,valid:J,stdev:R,stdevp:R,variance:P,variancep:P,bin:ue},be={none:"No aggregation",count:"Count of records",sum:"Sum of values",mean:"Mean of values",median:"Median of values",min:"Minimum value",max:"Maximum value",distinct:"Count of distinct records",valid:"Count non-null records",stdev:"Standard deviation",stdevp:"Standard deviation of population",variance:"Variance",variancep:"Variance of population",bin:"Group values into bins"},ke=[Y,"accent","category10","category20","category20b","category20c","dark2","paired","pastel1","pastel2","set1","set2","set3","tableau10","tableau20","blues","greens","greys","oranges","purples","reds","bluegreen","bluepurple","goldgreen","goldorange","goldred","greenblue","orangered","purplebluegreen","purplered","redpurple","yellowgreenblue","yelloworangered","blueorange","brownbluegreen","purplegreen","pinkyellowgreen","purpleorange","redblue","redgrey","redyellowblue","redyellowgreen","spectral","rainbow","sinebow"],ve={number:"Continuous numerical scale",string:"Discrete categorical scale (inputs treated as strings)",temporal:"Continuous temporal scale"},xe={year:["Year","2025"],quarter:["Quarter","Q1 2025"],month:["Month","Jan 2025"],week:["Week","Jan 01, 2025"],day:["Day","Jan 01, 2025"],hours:["Hour","Jan 01, 2025 12:00"],minutes:["Minute","Jan 01, 2025 12:34"],seconds:["Second","Jan 01, 2025 12:34:56"],milliseconds:["Millisecond","Jan 01, 2025 12:34:56.789"],date:["Date","Jan 01, 2025"],dayofyear:["Day of Year","Day 1 of 2025"],yearmonth:["Year Month","Jan 2025"],yearmonthdate:["Year Month Date","Jan 01, 2025"],monthdate:["Month Date","Jan 01"]},Me=["number","string","temporal"],O=["year","quarter","month","date","week","day","dayofyear","hours","minutes","seconds","milliseconds"],X=["yearmonth","yearmonthdate","monthdate"],L=[...O,...X];[...L];const we=["ascending","descending"],q="none",Ce="bin",Ae=[q,"bin","count","sum","mean","median","min","max","distinct","valid","stdev","stdevp","variance","variancep"],N=[q,"count","distinct","valid"],y={LINE:"line",BAR:"bar",PIE:"pie",SCATTER:"scatter",HEATMAP:"heatmap",AREA:"area"},Ee=Object.values(y),Te=["X","Y","Color",q];function B(e){switch(e){case"number":case"integer":return"quantitative";case"string":case"boolean":case"unknown":return"nominal";case"date":case"datetime":case"time":case"temporal":return"temporal";default:return I(e),"nominal"}}function _e(e){switch(e){case"number":case"integer":return"number";case"string":case"boolean":case"unknown":return"string";case"date":case"datetime":case"time":return"temporal";default:return I(e),"string"}}function Q(e){switch(e){case y.PIE:return"arc";case y.SCATTER:return"point";case y.HEATMAP:return"rect";default:return e}}function j(e,t,a,i){if(e===y.HEATMAP)return a!=null&&a.maxbins?{maxbins:a==null?void 0:a.maxbins}:void 0;if(t!=="number")return;if(!(a!=null&&a.binned))return i;let n={};return a.step!==void 0&&(n.step=a.step),a.maxbins!==void 0&&(n.maxbins=a.maxbins),Object.keys(n).length===0?!0:n}function G(e){var i,n;let t=(i=e.color)==null?void 0:i.range;if(t!=null&&t.length)return{range:t};let a=(n=e.color)==null?void 0:n.scheme;if(a&&a!=="default")return{scheme:a}}function De(e,t){var o,c,u,f,h,s,g,k,b;if(e===y.PIE)return;let a;if(m((c=(o=t.general)==null?void 0:o.colorByColumn)==null?void 0:c.field))a=(u=t.general)==null?void 0:u.colorByColumn;else if(m((f=t.color)==null?void 0:f.field))switch((h=t.color)==null?void 0:h.field){case"X":a=(s=t.general)==null?void 0:s.xColumn;break;case"Y":a=(g=t.general)==null?void 0:g.yColumn;break;case"Color":a=(k=t.general)==null?void 0:k.colorByColumn;break;default:return}else return;if(!a||!m(a.field)||a.field==="none")return;if(a.field==="__count__")return{aggregate:"count",type:"quantitative"};let i=(b=t.color)==null?void 0:b.bin,n=a.selectedDataType||"string",r=a==null?void 0:a.aggregate;return{field:v(a.field),type:B(n),scale:G(t),aggregate:W(r,n),bin:j(e,n,i)}}function Ve(e,t){var a,i,n,r,o;if(!((a=t.general)!=null&&a.stacking||!m((n=(i=t.general)==null?void 0:i.colorByColumn)==null?void 0:n.field)||e!==y.BAR))return{field:v((o=(r=t.general)==null?void 0:r.colorByColumn)==null?void 0:o.field)}}function W(e,t,a){if(t!=="temporal"&&!(e==="none"||e==="bin"))return e?t==="string"?N.includes(e)?e:void 0:e:a||void 0}function qe(e){switch(e){case"integer":return",.0f";case"number":return",.2f";default:return}}function $(e){var u,f,h,s,g,k,b,M,w,C,_,D,V,A,E,T;let{formValues:t,xEncoding:a,yEncoding:i,colorByEncoding:n}=e;if(!t.tooltips)return;function r(l,x,d){if("aggregate"in l&&l.aggregate==="count"&&!m(l.field))return{aggregate:"count"};if(l&&"field"in l&&m(l.field))return l.timeUnit&&!d&&(d=l.field),{field:l.field,aggregate:l.aggregate,timeUnit:l.timeUnit,format:qe(x),title:d,bin:l.bin}}if(t.tooltips.auto){let l=[],x=r(a,((f=(u=t.general)==null?void 0:u.xColumn)==null?void 0:f.type)||"string",(h=t.xAxis)==null?void 0:h.label);x&&l.push(x);let d=r(i,((g=(s=t.general)==null?void 0:s.yColumn)==null?void 0:g.type)||"string",(k=t.yAxis)==null?void 0:k.label);d&&l.push(d);let z=r(n||{},((M=(b=t.general)==null?void 0:b.colorByColumn)==null?void 0:M.type)||"string");return z&&l.push(z),l}let o=t.tooltips.fields??[],c=[];for(let l of o){if("field"in a&&m(a.field)&&a.field===l.field){let d=r(a,((C=(w=t.general)==null?void 0:w.xColumn)==null?void 0:C.type)||"string",(_=t.xAxis)==null?void 0:_.label);d&&c.push(d);continue}if("field"in i&&m(i.field)&&i.field===l.field){let d=r(i,((V=(D=t.general)==null?void 0:D.yColumn)==null?void 0:V.type)||"string",(A=t.yAxis)==null?void 0:A.label);d&&c.push(d);continue}if(n&&"field"in n&&m(n.field)&&n.field===l.field){let d=r(n,((T=(E=t.general)==null?void 0:E.colorByColumn)==null?void 0:T.type)||"string");d&&c.push(d);continue}let x={field:v(l.field)};c.push(x)}return c}function Be(e,t,a,i,n){var A,E,T,l;let{xColumn:r,yColumn:o,colorByColumn:c,horizontal:u,stacking:f,title:h,facet:s}=t.general??{};if(e===y.PIE)return He(t,a,i,n);if(!m(r==null?void 0:r.field))return"X-axis column is required";if(!m(o==null?void 0:o.field))return"Y-axis column is required";let g=S(r,(A=t.xAxis)==null?void 0:A.bin,H((E=t.xAxis)==null?void 0:E.label),c!=null&&c.field&&u?f:void 0,e),k=U;(o==null?void 0:o.selectedDataType)==="string"&&(k="count");let b=S(o,(T=t.yAxis)==null?void 0:T.bin,H((l=t.yAxis)==null?void 0:l.label),c!=null&&c.field&&!u?f:void 0,e,k),M=s!=null&&s.row.field?F(s.row,e):void 0,w=s!=null&&s.column.field?F(s.column,e):void 0,C=De(e,t),_=K(e,t,a,i,n,h),D={x:u?b:g,y:u?g:b,xOffset:Ve(e,t),color:C,tooltip:$({formValues:t,xEncoding:g,yEncoding:b,colorByEncoding:C}),...M&&{row:M},...w&&{column:w}},V=Se(s==null?void 0:s.column,s==null?void 0:s.row);return{..._,mark:{type:Q(e)},encoding:D,...V}}function je(e,t){return{...e,data:{values:t}}}function S(e,t,a,i,n,r){let o=e.selectedDataType||"string";return e.field==="__count__"?{aggregate:"count",type:"quantitative",bin:j(n,o,t),title:a==="__count__"?void 0:a,stack:i}:{field:v(e.field),type:B(e.selectedDataType||"unknown"),bin:j(n,o,t),title:a,stack:i,aggregate:W(e.aggregate,o,r),sort:e.sort,timeUnit:Je(e)}}function F(e,t){let a=j(t,e.selectedDataType||"string",{maxbins:e.maxbins,binned:e.binned},{maxbins:6});return{field:v(e.field),sort:e.sort,timeUnit:Pe(e),type:B(e.selectedDataType||"unknown"),bin:a}}function He(e,t,a,i){var f,h,s,g;let{yColumn:n,colorByColumn:r,title:o}=e.general??{};if(!m(r==null?void 0:r.field))return"Color by column is required";if(!m(n==null?void 0:n.field))return"Size by column is required";let c=S(n,(f=e.xAxis)==null?void 0:f.bin,H((h=e.xAxis)==null?void 0:h.label),void 0,y.PIE),u={field:v(r.field),type:B(r.selectedDataType||"unknown"),scale:G(e),title:H((s=e.yAxis)==null?void 0:s.label)};return{...K(y.PIE,e,t,a,i,o),mark:{type:Q(y.PIE),innerRadius:(g=e.style)==null?void 0:g.innerRadius},encoding:{theta:c,color:u,tooltip:$({formValues:e,xEncoding:c,yEncoding:c,colorByEncoding:u})}}}function K(e,t,a,i,n,r){var c,u,f;let o=((c=t.style)==null?void 0:c.gridLines)??!1;return e===y.SCATTER&&(o=!0),{$schema:"https://vega.github.io/schema/vega-lite/v6.json",background:a==="dark"?"dark":"white",title:r,data:{values:[]},height:((u=t.yAxis)==null?void 0:u.height)??n,width:((f=t.xAxis)==null?void 0:f.width)??i,config:{axis:{grid:o}}}}function m(e){return e!==void 0&&e.trim()!==""}function H(e){let t=e==null?void 0:e.trim();return t===""?void 0:t}function Je(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Pe(e){if(e.selectedDataType==="temporal")return e.timeUnit??"yearmonthdate"}function Se(e,t){let a={};return(e==null?void 0:e.linkXAxis)===!1&&(a.x="independent"),(t==null?void 0:t.linkYAxis)===!1&&(a.y="independent"),Object.keys(a).length>0?{resolve:{axis:a}}:void 0}export{P as A,Y as C,ve as D,ge as E,xe as O,U as S,me as T,be as _,Ae as a,ke as b,Te as c,q as d,Me as f,L as g,N as h,_e as i,v as k,X as l,we as m,Be as n,Ce as o,O as p,m as r,Ee as s,je as t,y as u,he as v,ye as w,fe as x,pe as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as It,h as ht,i as lt,l as Ot,m as Ut,n as Rt,p as jt,r as Gt,t as Ht,u as Kt,v as ft}from"./timer-VYMLXPue.js";function pt(t,n,e){var r=new Ht;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var mt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function W(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),mt.hasOwnProperty(n)?{space:mt[n],local:t}:t}function Wt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e==="http://www.w3.org/1999/xhtml"&&n.documentElement.namespaceURI==="http://www.w3.org/1999/xhtml"?n.createElement(t):n.createElementNS(e,t)}}function $t(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function vt(t){var n=W(t);return(n.local?$t:Wt)(n)}function Ft(){}function rt(t){return t==null?Ft:function(){return this.querySelector(t)}}function Jt(t){typeof t!="function"&&(t=rt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,s=r[i]=Array(u),c,l,f=0;f<u;++f)(c=o[f])&&(l=t.call(c,c.__data__,f,o))&&("__data__"in c&&(l.__data__=c.__data__),s[f]=l);return new S(r,this._parents)}function Qt(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Zt(){return[]}function _t(t){return t==null?Zt:function(){return this.querySelectorAll(t)}}function tn(t){return function(){return Qt(t.apply(this,arguments))}}function nn(t){t=typeof t=="function"?tn(t):_t(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u=n[o],s=u.length,c,l=0;l<s;++l)(c=u[l])&&(r.push(t.call(c,c.__data__,l,u)),i.push(c));return new S(r,i)}function gt(t){return function(){return this.matches(t)}}function dt(t){return function(n){return n.matches(t)}}var en=Array.prototype.find;function rn(t){return function(){return en.call(this.children,t)}}function on(){return this.firstElementChild}function un(t){return this.select(t==null?on:rn(typeof t=="function"?t:dt(t)))}var an=Array.prototype.filter;function sn(){return Array.from(this.children)}function cn(t){return function(){return an.call(this.children,t)}}function hn(t){return this.selectAll(t==null?sn:cn(typeof t=="function"?t:dt(t)))}function ln(t){typeof t!="function"&&(t=gt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,s=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&s.push(c);return new S(r,this._parents)}function yt(t){return Array(t.length)}function fn(){return new S(this._enter||this._groups.map(yt),this._parents)}function $(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$.prototype={constructor:$,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function pn(t){return function(){return t}}function mn(t,n,e,r,i,o){for(var u=0,s,c=n.length,l=o.length;u<l;++u)(s=n[u])?(s.__data__=o[u],r[u]=s):e[u]=new $(t,o[u]);for(;u<c;++u)(s=n[u])&&(i[u]=s)}function vn(t,n,e,r,i,o,u){var s,c,l=new Map,f=n.length,x=o.length,d=Array(f),_;for(s=0;s<f;++s)(c=n[s])&&(d[s]=_=u.call(c,c.__data__,s,n)+"",l.has(_)?i[s]=c:l.set(_,c));for(s=0;s<x;++s)_=u.call(t,o[s],s,o)+"",(c=l.get(_))?(r[s]=c,c.__data__=o[s],l.delete(_)):e[s]=new $(t,o[s]);for(s=0;s<f;++s)(c=n[s])&&l.get(d[s])===c&&(i[s]=c)}function _n(t){return t.__data__}function gn(t,n){if(!arguments.length)return Array.from(this,_n);var e=n?vn:mn,r=this._parents,i=this._groups;typeof t!="function"&&(t=pn(t));for(var o=i.length,u=Array(o),s=Array(o),c=Array(o),l=0;l<o;++l){var f=r[l],x=i[l],d=x.length,_=dn(t.call(f,f&&f.__data__,l,r)),E=_.length,k=s[l]=Array(E),I=u[l]=Array(E);e(f,x,k,I,c[l]=Array(d),_,n);for(var v=0,B=0,O,j;v<E;++v)if(O=k[v]){for(v>=B&&(B=v+1);!(j=I[B])&&++B<E;);O._next=j||null}}return u=new S(u,r),u._enter=s,u._exit=c,u}function dn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yn(){return new S(this._exit||this._groups.map(yt),this._parents)}function wn(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function xn(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,u=Math.min(i,o),s=Array(i),c=0;c<u;++c)for(var l=e[c],f=r[c],x=l.length,d=s[c]=Array(x),_,E=0;E<x;++E)(_=l[E]||f[E])&&(d[E]=_);for(;c<i;++c)s[c]=e[c];return new S(s,this._parents)}function An(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],u;--i>=0;)(u=r[i])&&(o&&u.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(u,o),o=u);return this}function bn(t){t||(t=zn);function n(x,d){return x&&d?t(x.__data__,d.__data__):!x-!d}for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o){for(var u=e[o],s=u.length,c=i[o]=Array(s),l,f=0;f<s;++f)(l=u[f])&&(c[f]=l);c.sort(n)}return new S(i,this._parents).order()}function zn(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function En(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Sn(){return Array.from(this)}function kn(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null}function Tn(){let t=0;for(let n of this)++t;return t}function Cn(){return!this.node()}function Mn(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,u=i.length,s;o<u;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Nn(t){return function(){this.removeAttribute(t)}}function Pn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bn(t,n){return function(){this.setAttribute(t,n)}}function Dn(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Vn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Xn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Yn(t,n){var e=W(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Pn:Nn:typeof n=="function"?e.local?Xn:Vn:e.local?Dn:Bn)(e,n))}function wt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ln(t){return function(){this.style.removeProperty(t)}}function qn(t,n,e){return function(){this.style.setProperty(t,n,e)}}function In(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function On(t,n,e){return arguments.length>1?this.each((n==null?Ln:typeof n=="function"?In:qn)(t,n,e??"")):G(this.node(),t)}function G(t,n){return t.style.getPropertyValue(n)||wt(t).getComputedStyle(t,null).getPropertyValue(n)}function Un(t){return function(){delete this[t]}}function Rn(t,n){return function(){this[t]=n}}function jn(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function Gn(t,n){return arguments.length>1?this.each((n==null?Un:typeof n=="function"?jn:Rn)(t,n)):this.node()[t]}function xt(t){return t.trim().split(/^|\s+/)}function it(t){return t.classList||new At(t)}function At(t){this._node=t,this._names=xt(t.getAttribute("class")||"")}At.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function bt(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function zt(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Hn(t){return function(){bt(this,t)}}function Kn(t){return function(){zt(this,t)}}function Wn(t,n){return function(){(n.apply(this,arguments)?bt:zt)(this,t)}}function $n(t,n){var e=xt(t+"");if(arguments.length<2){for(var r=it(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?Wn:n?Hn:Kn)(e,n))}function Fn(){this.textContent=""}function Jn(t){return function(){this.textContent=t}}function Qn(t){return function(){this.textContent=t.apply(this,arguments)??""}}function Zn(t){return arguments.length?this.each(t==null?Fn:(typeof t=="function"?Qn:Jn)(t)):this.node().textContent}function te(){this.innerHTML=""}function ne(t){return function(){this.innerHTML=t}}function ee(t){return function(){this.innerHTML=t.apply(this,arguments)??""}}function re(t){return arguments.length?this.each(t==null?te:(typeof t=="function"?ee:ne)(t)):this.node().innerHTML}function ie(){this.nextSibling&&this.parentNode.appendChild(this)}function oe(){return this.each(ie)}function ue(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ae(){return this.each(ue)}function se(t){var n=typeof t=="function"?t:vt(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ce(){return null}function he(t,n){var e=typeof t=="function"?t:vt(t),r=n==null?ce:typeof n=="function"?n:rt(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function le(){var t=this.parentNode;t&&t.removeChild(this)}function fe(){return this.each(le)}function pe(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function me(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ve(t){return this.select(t?me:pe)}function _e(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ge(t){return function(n){t.call(this,n,this.__data__)}}function de(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function ye(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function we(t,n,e){return function(){var r=this.__on,i,o=ge(n);if(r){for(var u=0,s=r.length;u<s;++u)if((i=r[u]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function xe(t,n,e){var r=de(t+""),i,o=r.length,u;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,f;c<l;++c)for(i=0,f=s[c];i<o;++i)if((u=r[i]).type===f.type&&u.name===f.name)return f.value}return}for(s=n?we:ye,i=0;i<o;++i)this.each(s(r[i],n,e));return this}function Et(t,n,e){var r=wt(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Ae(t,n){return function(){return Et(this,t,n)}}function be(t,n){return function(){return Et(this,t,n.apply(this,arguments))}}function ze(t,n){return this.each((typeof n=="function"?be:Ae)(t,n))}function*Ee(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,u;i<o;++i)(u=r[i])&&(yield u)}var St=[null];function S(t,n){this._groups=t,this._parents=n}function kt(){return new S([[document.documentElement]],St)}function Se(){return this}S.prototype=kt.prototype={constructor:S,select:Jt,selectAll:nn,selectChild:un,selectChildren:hn,filter:ln,data:gn,enter:fn,exit:yn,join:wn,merge:xn,selection:Se,order:An,sort:bn,call:En,nodes:Sn,node:kn,size:Tn,empty:Cn,each:Mn,attr:Yn,style:On,property:Gn,classed:$n,text:Zn,html:re,raise:oe,lower:ae,append:se,insert:he,remove:fe,clone:ve,datum:_e,on:xe,dispatch:ze,[Symbol.iterator]:Ee};var H=kt;function U(t){return typeof t=="string"?new S([[document.querySelector(t)]],[document.documentElement]):new S([[t]],St)}function ke(t){let n;for(;n=t.sourceEvent;)t=n;return t}function R(t,n){if(t=ke(t),n===void 0&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}const Te={passive:!1},F={capture:!0,passive:!1};function Ce(t){t.stopImmediatePropagation()}function J(t){t.preventDefault(),t.stopImmediatePropagation()}function Tt(t){var n=t.document.documentElement,e=U(t).on("dragstart.drag",J,F);"onselectstart"in n?e.on("selectstart.drag",J,F):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Ct(t,n){var e=t.document.documentElement,r=U(t).on("dragstart.drag",null);n&&(r.on("click.drag",J,F),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var Me=lt("start","end","cancel","interrupt"),Ne=[];function Q(t,n,e,r,i,o){var u=t.__transition;if(!u)t.__transition={};else if(e in u)return;Pe(t,e,{name:n,index:r,group:i,on:Me,tween:Ne,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function ot(t,n){var e=M(t,n);if(e.state>0)throw Error("too late; already scheduled");return e}function P(t,n){var e=M(t,n);if(e.state>3)throw Error("too late; already running");return e}function M(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw Error("transition not found");return e}function Pe(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=Gt(o,0,e.time);function o(l){e.state=1,e.timer.restart(u,e.delay,e.time),e.delay<=l&&u(l-e.delay)}function u(l){var f,x,d,_;if(e.state!==1)return c();for(f in r)if(_=r[f],_.name===e.name){if(_.state===3)return pt(u);_.state===4?(_.state=6,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete r[f]):+f<n&&(_.state=6,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete r[f])}if(pt(function(){e.state===3&&(e.state=4,e.timer.restart(s,e.delay,e.time),s(l))}),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),e.state===2){for(e.state=3,i=Array(d=e.tween.length),f=0,x=-1;f<d;++f)(_=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++x]=_);i.length=x+1}}function s(l){for(var f=l<e.duration?e.ease.call(null,l/e.duration):(e.timer.restart(c),e.state=5,1),x=-1,d=i.length;++x<d;)i[x].call(t,f);e.state===5&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){for(var l in e.state=6,e.timer.stop(),delete r[n],r)return;delete t.__transition}}function Z(t,n){var e=t.__transition,r,i,o=!0,u;if(e){for(u in n=n==null?null:n+"",e){if((r=e[u]).name!==n){o=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[u]}o&&delete t.__transition}}function Be(t){return this.each(function(){Z(this,t)})}function De(t,n){var e,r;return function(){var i=P(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,s=r.length;u<s;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function Ve(t,n,e){var r,i;if(typeof e!="function")throw Error();return function(){var o=P(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var s={name:n,value:e},c=0,l=i.length;c<l;++c)if(i[c].name===n){i[c]=s;break}c===l&&i.push(s)}o.tween=i}}function Xe(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=M(this.node(),e).tween,i=0,o=r.length,u;i<o;++i)if((u=r[i]).name===t)return u.value;return null}return this.each((n==null?De:Ve)(e,t,n))}function ut(t,n,e){var r=t._id;return t.each(function(){var i=P(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return M(i,r).value[n]}}function Mt(t,n){var e;return(typeof n=="number"?Ut:n instanceof ft?ht:(e=ft(n))?(n=e,ht):jt)(t,n)}function Ye(t){return function(){this.removeAttribute(t)}}function Le(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qe(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttribute(t);return u===i?null:u===r?o:o=n(r=u,e)}}function Ie(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttributeNS(t.space,t.local);return u===i?null:u===r?o:o=n(r=u,e)}}function Oe(t,n,e){var r,i,o;return function(){var u,s=e(this),c;return s==null?void this.removeAttribute(t):(u=this.getAttribute(t),c=s+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,s)))}}function Ue(t,n,e){var r,i,o;return function(){var u,s=e(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),c=s+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,s)))}}function Re(t,n){var e=W(t),r=e==="transform"?Kt:Mt;return this.attrTween(t,typeof n=="function"?(e.local?Ue:Oe)(e,r,ut(this,"attr."+t,n)):n==null?(e.local?Le:Ye)(e):(e.local?Ie:qe)(e,r,n))}function je(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Ge(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function He(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&Ge(t,o)),e}return i._value=n,i}function Ke(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&je(t,o)),e}return i._value=n,i}function We(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw Error();var r=W(t);return this.tween(e,(r.local?He:Ke)(r,n))}function $e(t,n){return function(){ot(this,t).delay=+n.apply(this,arguments)}}function Fe(t,n){return n=+n,function(){ot(this,t).delay=n}}function Je(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?$e:Fe)(n,t)):M(this.node(),n).delay}function Qe(t,n){return function(){P(this,t).duration=+n.apply(this,arguments)}}function Ze(t,n){return n=+n,function(){P(this,t).duration=n}}function tr(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Qe:Ze)(n,t)):M(this.node(),n).duration}function nr(t,n){if(typeof n!="function")throw Error();return function(){P(this,t).ease=n}}function er(t){var n=this._id;return arguments.length?this.each(nr(n,t)):M(this.node(),n).ease}function rr(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw Error();P(this,t).ease=e}}function ir(t){if(typeof t!="function")throw Error();return this.each(rr(this._id,t))}function or(t){typeof t!="function"&&(t=gt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,s=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&s.push(c);return new Y(r,this._parents,this._name,this._id)}function ur(t){if(t._id!==this._id)throw Error();for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=Array(r),s=0;s<o;++s)for(var c=n[s],l=e[s],f=c.length,x=u[s]=Array(f),d,_=0;_<f;++_)(d=c[_]||l[_])&&(x[_]=d);for(;s<r;++s)u[s]=n[s];return new Y(u,this._parents,this._name,this._id)}function ar(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function sr(t,n,e){var r,i,o=ar(n)?ot:P;return function(){var u=o(this,t),s=u.on;s!==r&&(i=(r=s).copy()).on(n,e),u.on=i}}function cr(t,n){var e=this._id;return arguments.length<2?M(this.node(),e).on.on(t):this.each(sr(e,t,n))}function hr(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function lr(){return this.on("end.remove",hr(this._id))}function fr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=rt(t));for(var r=this._groups,i=r.length,o=Array(i),u=0;u<i;++u)for(var s=r[u],c=s.length,l=o[u]=Array(c),f,x,d=0;d<c;++d)(f=s[d])&&(x=t.call(f,f.__data__,d,s))&&("__data__"in f&&(x.__data__=f.__data__),l[d]=x,Q(l[d],n,e,d,l,M(f,e)));return new Y(o,this._parents,n,e)}function pr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=_t(t));for(var r=this._groups,i=r.length,o=[],u=[],s=0;s<i;++s)for(var c=r[s],l=c.length,f,x=0;x<l;++x)if(f=c[x]){for(var d=t.call(f,f.__data__,x,c),_,E=M(f,e),k=0,I=d.length;k<I;++k)(_=d[k])&&Q(_,n,e,k,d,E);o.push(d),u.push(f)}return new Y(o,u,n,e)}var mr=H.prototype.constructor;function vr(){return new mr(this._groups,this._parents)}function _r(t,n){var e,r,i;return function(){var o=G(this,t),u=(this.style.removeProperty(t),G(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}function Nt(t){return function(){this.style.removeProperty(t)}}function gr(t,n,e){var r,i=e+"",o;return function(){var u=G(this,t);return u===i?null:u===r?o:o=n(r=u,e)}}function dr(t,n,e){var r,i,o;return function(){var u=G(this,t),s=e(this),c=s+"";return s??(c=s=(this.style.removeProperty(t),G(this,t))),u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,s))}}function yr(t,n){var e,r,i,o="style."+n,u="end."+o,s;return function(){var c=P(this,t),l=c.on,f=c.value[o]==null?s||(s=Nt(n)):void 0;(l!==e||i!==f)&&(r=(e=l).copy()).on(u,i=f),c.on=r}}function wr(t,n,e){var r=(t+="")=="transform"?Ot:Mt;return n==null?this.styleTween(t,_r(t,r)).on("end.style."+t,Nt(t)):typeof n=="function"?this.styleTween(t,dr(t,r,ut(this,"style."+t,n))).each(yr(this._id,t)):this.styleTween(t,gr(t,r,n),e).on("end.style."+t,null)}function xr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Ar(t,n,e){var r,i;function o(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&xr(t,u,e)),r}return o._value=n,o}function br(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw Error();return this.tween(r,Ar(t,n,e??""))}function zr(t){return function(){this.textContent=t}}function Er(t){return function(){this.textContent=t(this)??""}}function Sr(t){return this.tween("text",typeof t=="function"?Er(ut(this,"text",t)):zr(t==null?"":t+""))}function kr(t){return function(n){this.textContent=t.call(this,n)}}function Tr(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&kr(i)),n}return r._value=t,r}function Cr(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw Error();return this.tween(n,Tr(t))}function Mr(){for(var t=this._name,n=this._id,e=Pt(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],s=u.length,c,l=0;l<s;++l)if(c=u[l]){var f=M(c,n);Q(c,t,e,l,u,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Y(r,this._parents,t,e)}function Nr(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var s={value:u},c={value:function(){--i===0&&o()}};e.each(function(){var l=P(this,r),f=l.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(s),n._.interrupt.push(s),n._.end.push(c)),l.on=n}),i===0&&o()})}var Pr=0;function Y(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Br(t){return H().transition(t)}function Pt(){return++Pr}var L=H.prototype;Y.prototype=Br.prototype={constructor:Y,select:fr,selectAll:pr,selectChild:L.selectChild,selectChildren:L.selectChildren,filter:or,merge:ur,selection:vr,transition:Mr,call:L.call,nodes:L.nodes,node:L.node,size:L.size,empty:L.empty,each:L.each,on:cr,attr:Re,attrTween:We,style:wr,styleTween:br,text:Sr,textTween:Cr,remove:lr,tween:Xe,delay:Je,duration:tr,ease:er,easeVarying:ir,end:Nr,[Symbol.iterator]:L[Symbol.iterator]};function Dr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Vr={time:null,delay:0,duration:250,ease:Dr};function Xr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw Error(`transition ${n} not found`);return e}function Yr(t){var n,e;t instanceof Y?(n=t._id,t=t._name):(n=Pt(),(e=Vr).time=Rt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],s=u.length,c,l=0;l<s;++l)(c=u[l])&&Q(c,t,n,l,u,e||Xr(c,n));return new Y(r,this._parents,t,n)}H.prototype.interrupt=Be,H.prototype.transition=Yr;var tt=t=>()=>t;function Lr(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function q(t,n,e){this.k=t,this.x=n,this.y=e}q.prototype={constructor:q,scale:function(t){return t===1?this:new q(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new q(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nt=new q(1,0,0);qr.prototype=q.prototype;function qr(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nt;return t.__zoom}function at(t){t.stopImmediatePropagation()}function K(t){t.preventDefault(),t.stopImmediatePropagation()}function Ir(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Or(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Bt(){return this.__zoom||nt}function Ur(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Rr(){return navigator.maxTouchPoints||"ontouchstart"in this}function jr(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],u=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}function Gr(){var t=Ir,n=Or,e=jr,r=Ur,i=Rr,o=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],s=250,c=It,l=lt("start","zoom","end"),f,x,d,_=500,E=150,k=0,I=10;function v(a){a.property("__zoom",Bt).on("wheel.zoom",Dt,{passive:!1}).on("mousedown.zoom",Vt).on("dblclick.zoom",Xt).filter(i).on("touchstart.zoom",Yt).on("touchmove.zoom",Lt).on("touchend.zoom touchcancel.zoom",qt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(a,p,h,m){var g=a.selection?a.selection():a;g.property("__zoom",Bt),a===g?g.interrupt().each(function(){D(this,arguments).event(m).start().zoom(null,typeof p=="function"?p.apply(this,arguments):p).end()}):st(a,p,h,m)},v.scaleBy=function(a,p,h,m){v.scaleTo(a,function(){return this.__zoom.k*(typeof p=="function"?p.apply(this,arguments):p)},h,m)},v.scaleTo=function(a,p,h,m){v.transform(a,function(){var g=n.apply(this,arguments),w=this.__zoom,y=h==null?j(g):typeof h=="function"?h.apply(this,arguments):h,A=w.invert(y),b=typeof p=="function"?p.apply(this,arguments):p;return e(O(B(w,b),y,A),g,u)},h,m)},v.translateBy=function(a,p,h,m){v.transform(a,function(){return e(this.__zoom.translate(typeof p=="function"?p.apply(this,arguments):p,typeof h=="function"?h.apply(this,arguments):h),n.apply(this,arguments),u)},null,m)},v.translateTo=function(a,p,h,m,g){v.transform(a,function(){var w=n.apply(this,arguments),y=this.__zoom,A=m==null?j(w):typeof m=="function"?m.apply(this,arguments):m;return e(nt.translate(A[0],A[1]).scale(y.k).translate(typeof p=="function"?-p.apply(this,arguments):-p,typeof h=="function"?-h.apply(this,arguments):-h),w,u)},m,g)};function B(a,p){return p=Math.max(o[0],Math.min(o[1],p)),p===a.k?a:new q(p,a.x,a.y)}function O(a,p,h){var m=p[0]-h[0]*a.k,g=p[1]-h[1]*a.k;return m===a.x&&g===a.y?a:new q(a.k,m,g)}function j(a){return[(+a[0][0]+ +a[1][0])/2,(+a[0][1]+ +a[1][1])/2]}function st(a,p,h,m){a.on("start.zoom",function(){D(this,arguments).event(m).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(m).end()}).tween("zoom",function(){var g=this,w=arguments,y=D(g,w).event(m),A=n.apply(g,w),b=h==null?j(A):typeof h=="function"?h.apply(g,w):h,N=Math.max(A[1][0]-A[0][0],A[1][1]-A[0][1]),z=g.__zoom,T=typeof p=="function"?p.apply(g,w):p,V=c(z.invert(b).concat(N/z.k),T.invert(b).concat(N/T.k));return function(C){if(C===1)C=T;else{var X=V(C),et=N/X[2];C=new q(et,b[0]-X[0]*et,b[1]-X[1]*et)}y.zoom(null,C)}})}function D(a,p,h){return!h&&a.__zooming||new ct(a,p)}function ct(a,p){this.that=a,this.args=p,this.active=0,this.sourceEvent=null,this.extent=n.apply(a,p),this.taps=0}ct.prototype={event:function(a){return a&&(this.sourceEvent=a),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(a,p){return this.mouse&&a!=="mouse"&&(this.mouse[1]=p.invert(this.mouse[0])),this.touch0&&a!=="touch"&&(this.touch0[1]=p.invert(this.touch0[0])),this.touch1&&a!=="touch"&&(this.touch1[1]=p.invert(this.touch1[0])),this.that.__zoom=p,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(a){var p=U(this.that).datum();l.call(a,this.that,new Lr(a,{sourceEvent:this.sourceEvent,target:v,type:a,transform:this.that.__zoom,dispatch:l}),p)}};function Dt(a,...p){if(!t.apply(this,arguments))return;var h=D(this,p).event(a),m=this.__zoom,g=Math.max(o[0],Math.min(o[1],m.k*2**r.apply(this,arguments))),w=R(a);if(h.wheel)(h.mouse[0][0]!==w[0]||h.mouse[0][1]!==w[1])&&(h.mouse[1]=m.invert(h.mouse[0]=w)),clearTimeout(h.wheel);else{if(m.k===g)return;h.mouse=[w,m.invert(w)],Z(this),h.start()}K(a),h.wheel=setTimeout(y,E),h.zoom("mouse",e(O(B(m,g),h.mouse[0],h.mouse[1]),h.extent,u));function y(){h.wheel=null,h.end()}}function Vt(a,...p){if(d||!t.apply(this,arguments))return;var h=a.currentTarget,m=D(this,p,!0).event(a),g=U(a.view).on("mousemove.zoom",b,!0).on("mouseup.zoom",N,!0),w=R(a,h),y=a.clientX,A=a.clientY;Tt(a.view),at(a),m.mouse=[w,this.__zoom.invert(w)],Z(this),m.start();function b(z){if(K(z),!m.moved){var T=z.clientX-y,V=z.clientY-A;m.moved=T*T+V*V>k}m.event(z).zoom("mouse",e(O(m.that.__zoom,m.mouse[0]=R(z,h),m.mouse[1]),m.extent,u))}function N(z){g.on("mousemove.zoom mouseup.zoom",null),Ct(z.view,m.moved),K(z),m.event(z).end()}}function Xt(a,...p){if(t.apply(this,arguments)){var h=this.__zoom,m=R(a.changedTouches?a.changedTouches[0]:a,this),g=h.invert(m),w=h.k*(a.shiftKey?.5:2),y=e(O(B(h,w),m,g),n.apply(this,p),u);K(a),s>0?U(this).transition().duration(s).call(st,y,m,a):U(this).call(v.transform,y,m,a)}}function Yt(a,...p){if(t.apply(this,arguments)){var h=a.touches,m=h.length,g=D(this,p,a.changedTouches.length===m).event(a),w,y,A,b;for(at(a),y=0;y<m;++y)A=h[y],b=R(A,this),b=[b,this.__zoom.invert(b),A.identifier],g.touch0?!g.touch1&&g.touch0[2]!==b[2]&&(g.touch1=b,g.taps=0):(g.touch0=b,w=!0,g.taps=1+!!f);f&&(f=clearTimeout(f)),w&&(g.taps<2&&(x=b[0],f=setTimeout(function(){f=null},_)),Z(this),g.start())}}function Lt(a,...p){if(this.__zooming){var h=D(this,p).event(a),m=a.changedTouches,g=m.length,w,y,A,b;for(K(a),w=0;w<g;++w)y=m[w],A=R(y,this),h.touch0&&h.touch0[2]===y.identifier?h.touch0[0]=A:h.touch1&&h.touch1[2]===y.identifier&&(h.touch1[0]=A);if(y=h.that.__zoom,h.touch1){var N=h.touch0[0],z=h.touch0[1],T=h.touch1[0],V=h.touch1[1],C=(C=T[0]-N[0])*C+(C=T[1]-N[1])*C,X=(X=V[0]-z[0])*X+(X=V[1]-z[1])*X;y=B(y,Math.sqrt(C/X)),A=[(N[0]+T[0])/2,(N[1]+T[1])/2],b=[(z[0]+V[0])/2,(z[1]+V[1])/2]}else if(h.touch0)A=h.touch0[0],b=h.touch0[1];else return;h.zoom("touch",e(O(y,A,b),h.extent,u))}}function qt(a,...p){if(this.__zooming){var h=D(this,p).event(a),m=a.changedTouches,g=m.length,w,y;for(at(a),d&&clearTimeout(d),d=setTimeout(function(){d=null},_),w=0;w<g;++w)y=m[w],h.touch0&&h.touch0[2]===y.identifier?delete h.touch0:h.touch1&&h.touch1[2]===y.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(y=R(y,this),Math.hypot(x[0]-y[0],x[1]-y[1])<I)){var A=U(this).on("dblclick.zoom");A&&A.apply(this,arguments)}}}return v.wheelDelta=function(a){return arguments.length?(r=typeof a=="function"?a:tt(+a),v):r},v.filter=function(a){return arguments.length?(t=typeof a=="function"?a:tt(!!a),v):t},v.touchable=function(a){return arguments.length?(i=typeof a=="function"?a:tt(!!a),v):i},v.extent=function(a){return arguments.length?(n=typeof a=="function"?a:tt([[+a[0][0],+a[0][1]],[+a[1][0],+a[1][1]]]),v):n},v.scaleExtent=function(a){return arguments.length?(o[0]=+a[0],o[1]=+a[1],v):[o[0],o[1]]},v.translateExtent=function(a){return arguments.length?(u[0][0]=+a[0][0],u[1][0]=+a[1][0],u[0][1]=+a[0][1],u[1][1]=+a[1][1],v):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},v.constrain=function(a){return arguments.length?(e=a,v):e},v.duration=function(a){return arguments.length?(s=+a,v):s},v.interpolate=function(a){return arguments.length?(c=a,v):c},v.on=function(){var a=l.on.apply(l,arguments);return a===l?v:a},v.clickDistance=function(a){return arguments.length?(k=(a=+a)*a,v):Math.sqrt(k)},v.tapDistance=function(a){return arguments.length?(I=+a,v):I},v}export{J as a,Ce as c,Ct as i,R as l,nt as n,Te as o,Tt as r,F as s,Gr as t,U as u};
|
|
1
|
+
import{c as It,h as ht,i as lt,l as Ot,m as Ut,n as Rt,p as jt,r as Gt,t as Ht,u as Kt,v as ft}from"./timer-DLLzXmjF.js";function pt(t,n,e){var r=new Ht;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var mt={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function W(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),mt.hasOwnProperty(n)?{space:mt[n],local:t}:t}function Wt(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e==="http://www.w3.org/1999/xhtml"&&n.documentElement.namespaceURI==="http://www.w3.org/1999/xhtml"?n.createElement(t):n.createElementNS(e,t)}}function $t(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function vt(t){var n=W(t);return(n.local?$t:Wt)(n)}function Ft(){}function rt(t){return t==null?Ft:function(){return this.querySelector(t)}}function Jt(t){typeof t!="function"&&(t=rt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,s=r[i]=Array(u),c,l,f=0;f<u;++f)(c=o[f])&&(l=t.call(c,c.__data__,f,o))&&("__data__"in c&&(l.__data__=c.__data__),s[f]=l);return new S(r,this._parents)}function Qt(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Zt(){return[]}function _t(t){return t==null?Zt:function(){return this.querySelectorAll(t)}}function tn(t){return function(){return Qt(t.apply(this,arguments))}}function nn(t){t=typeof t=="function"?tn(t):_t(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u=n[o],s=u.length,c,l=0;l<s;++l)(c=u[l])&&(r.push(t.call(c,c.__data__,l,u)),i.push(c));return new S(r,i)}function gt(t){return function(){return this.matches(t)}}function dt(t){return function(n){return n.matches(t)}}var en=Array.prototype.find;function rn(t){return function(){return en.call(this.children,t)}}function on(){return this.firstElementChild}function un(t){return this.select(t==null?on:rn(typeof t=="function"?t:dt(t)))}var an=Array.prototype.filter;function sn(){return Array.from(this.children)}function cn(t){return function(){return an.call(this.children,t)}}function hn(t){return this.selectAll(t==null?sn:cn(typeof t=="function"?t:dt(t)))}function ln(t){typeof t!="function"&&(t=gt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,s=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&s.push(c);return new S(r,this._parents)}function yt(t){return Array(t.length)}function fn(){return new S(this._enter||this._groups.map(yt),this._parents)}function $(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}$.prototype={constructor:$,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function pn(t){return function(){return t}}function mn(t,n,e,r,i,o){for(var u=0,s,c=n.length,l=o.length;u<l;++u)(s=n[u])?(s.__data__=o[u],r[u]=s):e[u]=new $(t,o[u]);for(;u<c;++u)(s=n[u])&&(i[u]=s)}function vn(t,n,e,r,i,o,u){var s,c,l=new Map,f=n.length,x=o.length,d=Array(f),_;for(s=0;s<f;++s)(c=n[s])&&(d[s]=_=u.call(c,c.__data__,s,n)+"",l.has(_)?i[s]=c:l.set(_,c));for(s=0;s<x;++s)_=u.call(t,o[s],s,o)+"",(c=l.get(_))?(r[s]=c,c.__data__=o[s],l.delete(_)):e[s]=new $(t,o[s]);for(s=0;s<f;++s)(c=n[s])&&l.get(d[s])===c&&(i[s]=c)}function _n(t){return t.__data__}function gn(t,n){if(!arguments.length)return Array.from(this,_n);var e=n?vn:mn,r=this._parents,i=this._groups;typeof t!="function"&&(t=pn(t));for(var o=i.length,u=Array(o),s=Array(o),c=Array(o),l=0;l<o;++l){var f=r[l],x=i[l],d=x.length,_=dn(t.call(f,f&&f.__data__,l,r)),E=_.length,k=s[l]=Array(E),I=u[l]=Array(E);e(f,x,k,I,c[l]=Array(d),_,n);for(var v=0,B=0,O,j;v<E;++v)if(O=k[v]){for(v>=B&&(B=v+1);!(j=I[B])&&++B<E;);O._next=j||null}}return u=new S(u,r),u._enter=s,u._exit=c,u}function dn(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function yn(){return new S(this._exit||this._groups.map(yt),this._parents)}function wn(t,n,e){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),n!=null&&(i=n(i),i&&(i=i.selection())),e==null?o.remove():e(o),r&&i?r.merge(i).order():i}function xn(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,o=r.length,u=Math.min(i,o),s=Array(i),c=0;c<u;++c)for(var l=e[c],f=r[c],x=l.length,d=s[c]=Array(x),_,E=0;E<x;++E)(_=l[E]||f[E])&&(d[E]=_);for(;c<i;++c)s[c]=e[c];return new S(s,this._parents)}function An(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r=t[n],i=r.length-1,o=r[i],u;--i>=0;)(u=r[i])&&(o&&u.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(u,o),o=u);return this}function bn(t){t||(t=zn);function n(x,d){return x&&d?t(x.__data__,d.__data__):!x-!d}for(var e=this._groups,r=e.length,i=Array(r),o=0;o<r;++o){for(var u=e[o],s=u.length,c=i[o]=Array(s),l,f=0;f<s;++f)(l=u[f])&&(c[f]=l);c.sort(n)}return new S(i,this._parents).order()}function zn(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function En(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Sn(){return Array.from(this)}function kn(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null}function Tn(){let t=0;for(let n of this)++t;return t}function Cn(){return!this.node()}function Mn(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i=n[e],o=0,u=i.length,s;o<u;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function Nn(t){return function(){this.removeAttribute(t)}}function Pn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Bn(t,n){return function(){this.setAttribute(t,n)}}function Dn(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Vn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Xn(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Yn(t,n){var e=W(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Pn:Nn:typeof n=="function"?e.local?Xn:Vn:e.local?Dn:Bn)(e,n))}function wt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ln(t){return function(){this.style.removeProperty(t)}}function qn(t,n,e){return function(){this.style.setProperty(t,n,e)}}function In(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function On(t,n,e){return arguments.length>1?this.each((n==null?Ln:typeof n=="function"?In:qn)(t,n,e??"")):G(this.node(),t)}function G(t,n){return t.style.getPropertyValue(n)||wt(t).getComputedStyle(t,null).getPropertyValue(n)}function Un(t){return function(){delete this[t]}}function Rn(t,n){return function(){this[t]=n}}function jn(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function Gn(t,n){return arguments.length>1?this.each((n==null?Un:typeof n=="function"?jn:Rn)(t,n)):this.node()[t]}function xt(t){return t.trim().split(/^|\s+/)}function it(t){return t.classList||new At(t)}function At(t){this._node=t,this._names=xt(t.getAttribute("class")||"")}At.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function bt(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function zt(t,n){for(var e=it(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Hn(t){return function(){bt(this,t)}}function Kn(t){return function(){zt(this,t)}}function Wn(t,n){return function(){(n.apply(this,arguments)?bt:zt)(this,t)}}function $n(t,n){var e=xt(t+"");if(arguments.length<2){for(var r=it(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?Wn:n?Hn:Kn)(e,n))}function Fn(){this.textContent=""}function Jn(t){return function(){this.textContent=t}}function Qn(t){return function(){this.textContent=t.apply(this,arguments)??""}}function Zn(t){return arguments.length?this.each(t==null?Fn:(typeof t=="function"?Qn:Jn)(t)):this.node().textContent}function te(){this.innerHTML=""}function ne(t){return function(){this.innerHTML=t}}function ee(t){return function(){this.innerHTML=t.apply(this,arguments)??""}}function re(t){return arguments.length?this.each(t==null?te:(typeof t=="function"?ee:ne)(t)):this.node().innerHTML}function ie(){this.nextSibling&&this.parentNode.appendChild(this)}function oe(){return this.each(ie)}function ue(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ae(){return this.each(ue)}function se(t){var n=typeof t=="function"?t:vt(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})}function ce(){return null}function he(t,n){var e=typeof t=="function"?t:vt(t),r=n==null?ce:typeof n=="function"?n:rt(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})}function le(){var t=this.parentNode;t&&t.removeChild(this)}function fe(){return this.each(le)}function pe(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function me(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function ve(t){return this.select(t?me:pe)}function _e(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ge(t){return function(n){t.call(this,n,this.__data__)}}function de(t){return t.trim().split(/^|\s+/).map(function(n){var e="",r=n.indexOf(".");return r>=0&&(e=n.slice(r+1),n=n.slice(0,r)),{type:n,name:e}})}function ye(t){return function(){var n=this.__on;if(n){for(var e=0,r=-1,i=n.length,o;e<i;++e)o=n[e],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):n[++r]=o;++r?n.length=r:delete this.__on}}}function we(t,n,e){return function(){var r=this.__on,i,o=ge(n);if(r){for(var u=0,s=r.length;u<s;++u)if((i=r[u]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=e),i.value=n;return}}this.addEventListener(t.type,o,e),i={type:t.type,name:t.name,value:n,listener:o,options:e},r?r.push(i):this.__on=[i]}}function xe(t,n,e){var r=de(t+""),i,o=r.length,u;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,f;c<l;++c)for(i=0,f=s[c];i<o;++i)if((u=r[i]).type===f.type&&u.name===f.name)return f.value}return}for(s=n?we:ye,i=0;i<o;++i)this.each(s(r[i],n,e));return this}function Et(t,n,e){var r=wt(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Ae(t,n){return function(){return Et(this,t,n)}}function be(t,n){return function(){return Et(this,t,n.apply(this,arguments))}}function ze(t,n){return this.each((typeof n=="function"?be:Ae)(t,n))}function*Ee(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length,u;i<o;++i)(u=r[i])&&(yield u)}var St=[null];function S(t,n){this._groups=t,this._parents=n}function kt(){return new S([[document.documentElement]],St)}function Se(){return this}S.prototype=kt.prototype={constructor:S,select:Jt,selectAll:nn,selectChild:un,selectChildren:hn,filter:ln,data:gn,enter:fn,exit:yn,join:wn,merge:xn,selection:Se,order:An,sort:bn,call:En,nodes:Sn,node:kn,size:Tn,empty:Cn,each:Mn,attr:Yn,style:On,property:Gn,classed:$n,text:Zn,html:re,raise:oe,lower:ae,append:se,insert:he,remove:fe,clone:ve,datum:_e,on:xe,dispatch:ze,[Symbol.iterator]:Ee};var H=kt;function U(t){return typeof t=="string"?new S([[document.querySelector(t)]],[document.documentElement]):new S([[t]],St)}function ke(t){let n;for(;n=t.sourceEvent;)t=n;return t}function R(t,n){if(t=ke(t),n===void 0&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(n.getScreenCTM().inverse()),[r.x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}const Te={passive:!1},F={capture:!0,passive:!1};function Ce(t){t.stopImmediatePropagation()}function J(t){t.preventDefault(),t.stopImmediatePropagation()}function Tt(t){var n=t.document.documentElement,e=U(t).on("dragstart.drag",J,F);"onselectstart"in n?e.on("selectstart.drag",J,F):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function Ct(t,n){var e=t.document.documentElement,r=U(t).on("dragstart.drag",null);n&&(r.on("click.drag",J,F),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}var Me=lt("start","end","cancel","interrupt"),Ne=[];function Q(t,n,e,r,i,o){var u=t.__transition;if(!u)t.__transition={};else if(e in u)return;Pe(t,e,{name:n,index:r,group:i,on:Me,tween:Ne,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function ot(t,n){var e=M(t,n);if(e.state>0)throw Error("too late; already scheduled");return e}function P(t,n){var e=M(t,n);if(e.state>3)throw Error("too late; already running");return e}function M(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw Error("transition not found");return e}function Pe(t,n,e){var r=t.__transition,i;r[n]=e,e.timer=Gt(o,0,e.time);function o(l){e.state=1,e.timer.restart(u,e.delay,e.time),e.delay<=l&&u(l-e.delay)}function u(l){var f,x,d,_;if(e.state!==1)return c();for(f in r)if(_=r[f],_.name===e.name){if(_.state===3)return pt(u);_.state===4?(_.state=6,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete r[f]):+f<n&&(_.state=6,_.timer.stop(),_.on.call("cancel",t,t.__data__,_.index,_.group),delete r[f])}if(pt(function(){e.state===3&&(e.state=4,e.timer.restart(s,e.delay,e.time),s(l))}),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),e.state===2){for(e.state=3,i=Array(d=e.tween.length),f=0,x=-1;f<d;++f)(_=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(i[++x]=_);i.length=x+1}}function s(l){for(var f=l<e.duration?e.ease.call(null,l/e.duration):(e.timer.restart(c),e.state=5,1),x=-1,d=i.length;++x<d;)i[x].call(t,f);e.state===5&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){for(var l in e.state=6,e.timer.stop(),delete r[n],r)return;delete t.__transition}}function Z(t,n){var e=t.__transition,r,i,o=!0,u;if(e){for(u in n=n==null?null:n+"",e){if((r=e[u]).name!==n){o=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete e[u]}o&&delete t.__transition}}function Be(t){return this.each(function(){Z(this,t)})}function De(t,n){var e,r;return function(){var i=P(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,s=r.length;u<s;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function Ve(t,n,e){var r,i;if(typeof e!="function")throw Error();return function(){var o=P(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var s={name:n,value:e},c=0,l=i.length;c<l;++c)if(i[c].name===n){i[c]=s;break}c===l&&i.push(s)}o.tween=i}}function Xe(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r=M(this.node(),e).tween,i=0,o=r.length,u;i<o;++i)if((u=r[i]).name===t)return u.value;return null}return this.each((n==null?De:Ve)(e,t,n))}function ut(t,n,e){var r=t._id;return t.each(function(){var i=P(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return M(i,r).value[n]}}function Mt(t,n){var e;return(typeof n=="number"?Ut:n instanceof ft?ht:(e=ft(n))?(n=e,ht):jt)(t,n)}function Ye(t){return function(){this.removeAttribute(t)}}function Le(t){return function(){this.removeAttributeNS(t.space,t.local)}}function qe(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttribute(t);return u===i?null:u===r?o:o=n(r=u,e)}}function Ie(t,n,e){var r,i=e+"",o;return function(){var u=this.getAttributeNS(t.space,t.local);return u===i?null:u===r?o:o=n(r=u,e)}}function Oe(t,n,e){var r,i,o;return function(){var u,s=e(this),c;return s==null?void this.removeAttribute(t):(u=this.getAttribute(t),c=s+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,s)))}}function Ue(t,n,e){var r,i,o;return function(){var u,s=e(this),c;return s==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),c=s+"",u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,s)))}}function Re(t,n){var e=W(t),r=e==="transform"?Kt:Mt;return this.attrTween(t,typeof n=="function"?(e.local?Ue:Oe)(e,r,ut(this,"attr."+t,n)):n==null?(e.local?Le:Ye)(e):(e.local?Ie:qe)(e,r,n))}function je(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Ge(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function He(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&Ge(t,o)),e}return i._value=n,i}function Ke(t,n){var e,r;function i(){var o=n.apply(this,arguments);return o!==r&&(e=(r=o)&&je(t,o)),e}return i._value=n,i}function We(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw Error();var r=W(t);return this.tween(e,(r.local?He:Ke)(r,n))}function $e(t,n){return function(){ot(this,t).delay=+n.apply(this,arguments)}}function Fe(t,n){return n=+n,function(){ot(this,t).delay=n}}function Je(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?$e:Fe)(n,t)):M(this.node(),n).delay}function Qe(t,n){return function(){P(this,t).duration=+n.apply(this,arguments)}}function Ze(t,n){return n=+n,function(){P(this,t).duration=n}}function tr(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?Qe:Ze)(n,t)):M(this.node(),n).duration}function nr(t,n){if(typeof n!="function")throw Error();return function(){P(this,t).ease=n}}function er(t){var n=this._id;return arguments.length?this.each(nr(n,t)):M(this.node(),n).ease}function rr(t,n){return function(){var e=n.apply(this,arguments);if(typeof e!="function")throw Error();P(this,t).ease=e}}function ir(t){if(typeof t!="function")throw Error();return this.each(rr(this._id,t))}function or(t){typeof t!="function"&&(t=gt(t));for(var n=this._groups,e=n.length,r=Array(e),i=0;i<e;++i)for(var o=n[i],u=o.length,s=r[i]=[],c,l=0;l<u;++l)(c=o[l])&&t.call(c,c.__data__,l,o)&&s.push(c);return new Y(r,this._parents,this._name,this._id)}function ur(t){if(t._id!==this._id)throw Error();for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=Array(r),s=0;s<o;++s)for(var c=n[s],l=e[s],f=c.length,x=u[s]=Array(f),d,_=0;_<f;++_)(d=c[_]||l[_])&&(x[_]=d);for(;s<r;++s)u[s]=n[s];return new Y(u,this._parents,this._name,this._id)}function ar(t){return(t+"").trim().split(/^|\s+/).every(function(n){var e=n.indexOf(".");return e>=0&&(n=n.slice(0,e)),!n||n==="start"})}function sr(t,n,e){var r,i,o=ar(n)?ot:P;return function(){var u=o(this,t),s=u.on;s!==r&&(i=(r=s).copy()).on(n,e),u.on=i}}function cr(t,n){var e=this._id;return arguments.length<2?M(this.node(),e).on.on(t):this.each(sr(e,t,n))}function hr(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function lr(){return this.on("end.remove",hr(this._id))}function fr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=rt(t));for(var r=this._groups,i=r.length,o=Array(i),u=0;u<i;++u)for(var s=r[u],c=s.length,l=o[u]=Array(c),f,x,d=0;d<c;++d)(f=s[d])&&(x=t.call(f,f.__data__,d,s))&&("__data__"in f&&(x.__data__=f.__data__),l[d]=x,Q(l[d],n,e,d,l,M(f,e)));return new Y(o,this._parents,n,e)}function pr(t){var n=this._name,e=this._id;typeof t!="function"&&(t=_t(t));for(var r=this._groups,i=r.length,o=[],u=[],s=0;s<i;++s)for(var c=r[s],l=c.length,f,x=0;x<l;++x)if(f=c[x]){for(var d=t.call(f,f.__data__,x,c),_,E=M(f,e),k=0,I=d.length;k<I;++k)(_=d[k])&&Q(_,n,e,k,d,E);o.push(d),u.push(f)}return new Y(o,u,n,e)}var mr=H.prototype.constructor;function vr(){return new mr(this._groups,this._parents)}function _r(t,n){var e,r,i;return function(){var o=G(this,t),u=(this.style.removeProperty(t),G(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}function Nt(t){return function(){this.style.removeProperty(t)}}function gr(t,n,e){var r,i=e+"",o;return function(){var u=G(this,t);return u===i?null:u===r?o:o=n(r=u,e)}}function dr(t,n,e){var r,i,o;return function(){var u=G(this,t),s=e(this),c=s+"";return s??(c=s=(this.style.removeProperty(t),G(this,t))),u===c?null:u===r&&c===i?o:(i=c,o=n(r=u,s))}}function yr(t,n){var e,r,i,o="style."+n,u="end."+o,s;return function(){var c=P(this,t),l=c.on,f=c.value[o]==null?s||(s=Nt(n)):void 0;(l!==e||i!==f)&&(r=(e=l).copy()).on(u,i=f),c.on=r}}function wr(t,n,e){var r=(t+="")=="transform"?Ot:Mt;return n==null?this.styleTween(t,_r(t,r)).on("end.style."+t,Nt(t)):typeof n=="function"?this.styleTween(t,dr(t,r,ut(this,"style."+t,n))).each(yr(this._id,t)):this.styleTween(t,gr(t,r,n),e).on("end.style."+t,null)}function xr(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Ar(t,n,e){var r,i;function o(){var u=n.apply(this,arguments);return u!==i&&(r=(i=u)&&xr(t,u,e)),r}return o._value=n,o}function br(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw Error();return this.tween(r,Ar(t,n,e??""))}function zr(t){return function(){this.textContent=t}}function Er(t){return function(){this.textContent=t(this)??""}}function Sr(t){return this.tween("text",typeof t=="function"?Er(ut(this,"text",t)):zr(t==null?"":t+""))}function kr(t){return function(n){this.textContent=t.call(this,n)}}function Tr(t){var n,e;function r(){var i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&kr(i)),n}return r._value=t,r}function Cr(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw Error();return this.tween(n,Tr(t))}function Mr(){for(var t=this._name,n=this._id,e=Pt(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],s=u.length,c,l=0;l<s;++l)if(c=u[l]){var f=M(c,n);Q(c,t,e,l,u,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new Y(r,this._parents,t,e)}function Nr(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var s={value:u},c={value:function(){--i===0&&o()}};e.each(function(){var l=P(this,r),f=l.on;f!==t&&(n=(t=f).copy(),n._.cancel.push(s),n._.interrupt.push(s),n._.end.push(c)),l.on=n}),i===0&&o()})}var Pr=0;function Y(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Br(t){return H().transition(t)}function Pt(){return++Pr}var L=H.prototype;Y.prototype=Br.prototype={constructor:Y,select:fr,selectAll:pr,selectChild:L.selectChild,selectChildren:L.selectChildren,filter:or,merge:ur,selection:vr,transition:Mr,call:L.call,nodes:L.nodes,node:L.node,size:L.size,empty:L.empty,each:L.each,on:cr,attr:Re,attrTween:We,style:wr,styleTween:br,text:Sr,textTween:Cr,remove:lr,tween:Xe,delay:Je,duration:tr,ease:er,easeVarying:ir,end:Nr,[Symbol.iterator]:L[Symbol.iterator]};function Dr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Vr={time:null,delay:0,duration:250,ease:Dr};function Xr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw Error(`transition ${n} not found`);return e}function Yr(t){var n,e;t instanceof Y?(n=t._id,t=t._name):(n=Pt(),(e=Vr).time=Rt(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u=r[o],s=u.length,c,l=0;l<s;++l)(c=u[l])&&Q(c,t,n,l,u,e||Xr(c,n));return new Y(r,this._parents,t,n)}H.prototype.interrupt=Be,H.prototype.transition=Yr;var tt=t=>()=>t;function Lr(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function q(t,n,e){this.k=t,this.x=n,this.y=e}q.prototype={constructor:q,scale:function(t){return t===1?this:new q(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new q(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nt=new q(1,0,0);qr.prototype=q.prototype;function qr(t){for(;!t.__zoom;)if(!(t=t.parentNode))return nt;return t.__zoom}function at(t){t.stopImmediatePropagation()}function K(t){t.preventDefault(),t.stopImmediatePropagation()}function Ir(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Or(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Bt(){return this.__zoom||nt}function Ur(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Rr(){return navigator.maxTouchPoints||"ontouchstart"in this}function jr(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],u=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}function Gr(){var t=Ir,n=Or,e=jr,r=Ur,i=Rr,o=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],s=250,c=It,l=lt("start","zoom","end"),f,x,d,_=500,E=150,k=0,I=10;function v(a){a.property("__zoom",Bt).on("wheel.zoom",Dt,{passive:!1}).on("mousedown.zoom",Vt).on("dblclick.zoom",Xt).filter(i).on("touchstart.zoom",Yt).on("touchmove.zoom",Lt).on("touchend.zoom touchcancel.zoom",qt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}v.transform=function(a,p,h,m){var g=a.selection?a.selection():a;g.property("__zoom",Bt),a===g?g.interrupt().each(function(){D(this,arguments).event(m).start().zoom(null,typeof p=="function"?p.apply(this,arguments):p).end()}):st(a,p,h,m)},v.scaleBy=function(a,p,h,m){v.scaleTo(a,function(){return this.__zoom.k*(typeof p=="function"?p.apply(this,arguments):p)},h,m)},v.scaleTo=function(a,p,h,m){v.transform(a,function(){var g=n.apply(this,arguments),w=this.__zoom,y=h==null?j(g):typeof h=="function"?h.apply(this,arguments):h,A=w.invert(y),b=typeof p=="function"?p.apply(this,arguments):p;return e(O(B(w,b),y,A),g,u)},h,m)},v.translateBy=function(a,p,h,m){v.transform(a,function(){return e(this.__zoom.translate(typeof p=="function"?p.apply(this,arguments):p,typeof h=="function"?h.apply(this,arguments):h),n.apply(this,arguments),u)},null,m)},v.translateTo=function(a,p,h,m,g){v.transform(a,function(){var w=n.apply(this,arguments),y=this.__zoom,A=m==null?j(w):typeof m=="function"?m.apply(this,arguments):m;return e(nt.translate(A[0],A[1]).scale(y.k).translate(typeof p=="function"?-p.apply(this,arguments):-p,typeof h=="function"?-h.apply(this,arguments):-h),w,u)},m,g)};function B(a,p){return p=Math.max(o[0],Math.min(o[1],p)),p===a.k?a:new q(p,a.x,a.y)}function O(a,p,h){var m=p[0]-h[0]*a.k,g=p[1]-h[1]*a.k;return m===a.x&&g===a.y?a:new q(a.k,m,g)}function j(a){return[(+a[0][0]+ +a[1][0])/2,(+a[0][1]+ +a[1][1])/2]}function st(a,p,h,m){a.on("start.zoom",function(){D(this,arguments).event(m).start()}).on("interrupt.zoom end.zoom",function(){D(this,arguments).event(m).end()}).tween("zoom",function(){var g=this,w=arguments,y=D(g,w).event(m),A=n.apply(g,w),b=h==null?j(A):typeof h=="function"?h.apply(g,w):h,N=Math.max(A[1][0]-A[0][0],A[1][1]-A[0][1]),z=g.__zoom,T=typeof p=="function"?p.apply(g,w):p,V=c(z.invert(b).concat(N/z.k),T.invert(b).concat(N/T.k));return function(C){if(C===1)C=T;else{var X=V(C),et=N/X[2];C=new q(et,b[0]-X[0]*et,b[1]-X[1]*et)}y.zoom(null,C)}})}function D(a,p,h){return!h&&a.__zooming||new ct(a,p)}function ct(a,p){this.that=a,this.args=p,this.active=0,this.sourceEvent=null,this.extent=n.apply(a,p),this.taps=0}ct.prototype={event:function(a){return a&&(this.sourceEvent=a),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(a,p){return this.mouse&&a!=="mouse"&&(this.mouse[1]=p.invert(this.mouse[0])),this.touch0&&a!=="touch"&&(this.touch0[1]=p.invert(this.touch0[0])),this.touch1&&a!=="touch"&&(this.touch1[1]=p.invert(this.touch1[0])),this.that.__zoom=p,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(a){var p=U(this.that).datum();l.call(a,this.that,new Lr(a,{sourceEvent:this.sourceEvent,target:v,type:a,transform:this.that.__zoom,dispatch:l}),p)}};function Dt(a,...p){if(!t.apply(this,arguments))return;var h=D(this,p).event(a),m=this.__zoom,g=Math.max(o[0],Math.min(o[1],m.k*2**r.apply(this,arguments))),w=R(a);if(h.wheel)(h.mouse[0][0]!==w[0]||h.mouse[0][1]!==w[1])&&(h.mouse[1]=m.invert(h.mouse[0]=w)),clearTimeout(h.wheel);else{if(m.k===g)return;h.mouse=[w,m.invert(w)],Z(this),h.start()}K(a),h.wheel=setTimeout(y,E),h.zoom("mouse",e(O(B(m,g),h.mouse[0],h.mouse[1]),h.extent,u));function y(){h.wheel=null,h.end()}}function Vt(a,...p){if(d||!t.apply(this,arguments))return;var h=a.currentTarget,m=D(this,p,!0).event(a),g=U(a.view).on("mousemove.zoom",b,!0).on("mouseup.zoom",N,!0),w=R(a,h),y=a.clientX,A=a.clientY;Tt(a.view),at(a),m.mouse=[w,this.__zoom.invert(w)],Z(this),m.start();function b(z){if(K(z),!m.moved){var T=z.clientX-y,V=z.clientY-A;m.moved=T*T+V*V>k}m.event(z).zoom("mouse",e(O(m.that.__zoom,m.mouse[0]=R(z,h),m.mouse[1]),m.extent,u))}function N(z){g.on("mousemove.zoom mouseup.zoom",null),Ct(z.view,m.moved),K(z),m.event(z).end()}}function Xt(a,...p){if(t.apply(this,arguments)){var h=this.__zoom,m=R(a.changedTouches?a.changedTouches[0]:a,this),g=h.invert(m),w=h.k*(a.shiftKey?.5:2),y=e(O(B(h,w),m,g),n.apply(this,p),u);K(a),s>0?U(this).transition().duration(s).call(st,y,m,a):U(this).call(v.transform,y,m,a)}}function Yt(a,...p){if(t.apply(this,arguments)){var h=a.touches,m=h.length,g=D(this,p,a.changedTouches.length===m).event(a),w,y,A,b;for(at(a),y=0;y<m;++y)A=h[y],b=R(A,this),b=[b,this.__zoom.invert(b),A.identifier],g.touch0?!g.touch1&&g.touch0[2]!==b[2]&&(g.touch1=b,g.taps=0):(g.touch0=b,w=!0,g.taps=1+!!f);f&&(f=clearTimeout(f)),w&&(g.taps<2&&(x=b[0],f=setTimeout(function(){f=null},_)),Z(this),g.start())}}function Lt(a,...p){if(this.__zooming){var h=D(this,p).event(a),m=a.changedTouches,g=m.length,w,y,A,b;for(K(a),w=0;w<g;++w)y=m[w],A=R(y,this),h.touch0&&h.touch0[2]===y.identifier?h.touch0[0]=A:h.touch1&&h.touch1[2]===y.identifier&&(h.touch1[0]=A);if(y=h.that.__zoom,h.touch1){var N=h.touch0[0],z=h.touch0[1],T=h.touch1[0],V=h.touch1[1],C=(C=T[0]-N[0])*C+(C=T[1]-N[1])*C,X=(X=V[0]-z[0])*X+(X=V[1]-z[1])*X;y=B(y,Math.sqrt(C/X)),A=[(N[0]+T[0])/2,(N[1]+T[1])/2],b=[(z[0]+V[0])/2,(z[1]+V[1])/2]}else if(h.touch0)A=h.touch0[0],b=h.touch0[1];else return;h.zoom("touch",e(O(y,A,b),h.extent,u))}}function qt(a,...p){if(this.__zooming){var h=D(this,p).event(a),m=a.changedTouches,g=m.length,w,y;for(at(a),d&&clearTimeout(d),d=setTimeout(function(){d=null},_),w=0;w<g;++w)y=m[w],h.touch0&&h.touch0[2]===y.identifier?delete h.touch0:h.touch1&&h.touch1[2]===y.identifier&&delete h.touch1;if(h.touch1&&!h.touch0&&(h.touch0=h.touch1,delete h.touch1),h.touch0)h.touch0[1]=this.__zoom.invert(h.touch0[0]);else if(h.end(),h.taps===2&&(y=R(y,this),Math.hypot(x[0]-y[0],x[1]-y[1])<I)){var A=U(this).on("dblclick.zoom");A&&A.apply(this,arguments)}}}return v.wheelDelta=function(a){return arguments.length?(r=typeof a=="function"?a:tt(+a),v):r},v.filter=function(a){return arguments.length?(t=typeof a=="function"?a:tt(!!a),v):t},v.touchable=function(a){return arguments.length?(i=typeof a=="function"?a:tt(!!a),v):i},v.extent=function(a){return arguments.length?(n=typeof a=="function"?a:tt([[+a[0][0],+a[0][1]],[+a[1][0],+a[1][1]]]),v):n},v.scaleExtent=function(a){return arguments.length?(o[0]=+a[0],o[1]=+a[1],v):[o[0],o[1]]},v.translateExtent=function(a){return arguments.length?(u[0][0]=+a[0][0],u[1][0]=+a[1][0],u[0][1]=+a[0][1],u[1][1]=+a[1][1],v):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},v.constrain=function(a){return arguments.length?(e=a,v):e},v.duration=function(a){return arguments.length?(s=+a,v):s},v.interpolate=function(a){return arguments.length?(c=a,v):c},v.on=function(){var a=l.on.apply(l,arguments);return a===l?v:a},v.clickDistance=function(a){return arguments.length?(k=(a=+a)*a,v):Math.sqrt(k)},v.tapDistance=function(a){return arguments.length?(I=+a,v):I},v}export{J as a,Ce as c,Ct as i,R as l,nt as n,Te as o,Tt as r,F as s,Gr as t,U as u};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var jr=Object.defineProperty;var Ct=m=>{throw TypeError(m)};var $r=(m,y,_)=>y in m?jr(m,y,{enumerable:!0,configurable:!0,writable:!0,value:_}):m[y]=_;var o=(m,y,_)=>$r(m,typeof y!="symbol"?y+"":y,_),We=(m,y,_)=>y.has(m)||Ct("Cannot "+_);var i=(m,y,_)=>(We(m,y,"read from private field"),_?_.call(m):y.get(m)),u=(m,y,_)=>y.has(m)?Ct("Cannot add the same private member more than once"):y instanceof WeakSet?y.add(m):y.set(m,_),h=(m,y,_,le)=>(We(m,y,"write to private field"),le?le.call(m,_):y.set(m,_),_),g=(m,y,_)=>(We(m,y,"access private method"),_);import{i as U,p as Rt,u as Hr}from"./useEvent-D91BmmQi.js";import{Bi as Dr,Fi as Or,Gt as ie,Ji as zr,Ri as Br,Ui as Vr,Wt as qt,Yi as Se,b as Qr,qn as Gr,__tla as Yr}from"./cells-Jr-5Pc9f.js";import{t as Jr}from"./get-C-qh_et5.js";import{t as Kr}from"./debounce-OiXznToA.js";import{t as Xr}from"./_baseSet-CsW0tABf.js";import{g as p,v as b}from"./useEventListener-C0195JsF.js";import{t as Zr}from"./invariant-CkiqGLcK.js";import{E as en}from"./utils-BWBBpCkT.js";import{E as kt,M as tn,c as je,j as rn,l as Pt,n as nn}from"./config-B-Q7J_6d.js";import{n as sn}from"./switch-OVajJBPR.js";import{c as an}from"./readonly-python-code-Q_1Y3VyZ.js";import{t as on}from"./createReducer-DGx5Af-C.js";import{r as ln}from"./strings--BknHX9C.js";import{t as $e}from"./requests-9-v2bhoi.js";import{c as Ft,o as It,__tla as dn}from"./markdown-renderer-BgqeO4JR.js";import{t as un}from"./DeferredRequestRegistry-C8EV1PoE.js";import{t as cn}from"./preload-helper-TXkS1QI3.js";import{t as At}from"./Deferred-D2igisxY.js";import{t as Nt}from"./uuid-ImXS-885.js";import{t as hn}from"./use-toast-BwJoaaDM.js";import{n as pn}from"./RenderHTML-B9jx7Dsm.js";import{t as fn}from"./useRunCells-CF_V8X2K.js";import{r as gn,t as mn}from"./blob-BJREJiQp.js";import{n as yn,r as wn,t as bn}from"./share-852X_cqy.js";import{i as Lt,r as vn,t as Sn}from"./events-90X9nql5.js";let _e,He,De,Tt,Ut,Wt,jt,ae,oe,$t,Oe,Ht,Dt,Ot,ze,zt,Fe,Bt,Ie,Be,Vt,Qt,_n=Promise.all([(()=>{try{return Yr}catch{}})(),(()=>{try{return dn}catch{}})()]).then(async()=>{var vt,Re,$,H,Z,q,D,Yt,Jt,Kt,qe,ee,z,ke,Xt,St,te,de,ue,ce,he,B,re,V,Zt,Qe,ne,O,pe,fe,ge,me,F,C,Q,A,N,G,x,ye,Y,v,Ge,Ye,er,Je,tr,Ke,Xe,rr,_t,L,we,be,W,X,Et;function m(t,e,r){return t==null?t:Xr(t,e,r)}_e=m,Qt=Rt(null);var{valueAtom:y,useActions:_}=on(()=>({banners:[]}),{addBanner:(t,e)=>({...t,banners:[...t.banners,{...e,id:Nt()}]}),removeBanner:(t,e)=>({...t,banners:t.banners.filter(r=>r.id!==e)}),clearBanners:t=>({...t,banners:[]})});Tt=()=>Hr(y),Vt=function(){return _()};let le,Ze;Be=class{constructor(){o(this,"subscriptions",new Map)}addSubscription(t,e){var r;this.subscriptions.has(t)||this.subscriptions.set(t,new Set),(r=this.subscriptions.get(t))==null||r.add(e)}removeSubscription(t,e){var r;(r=this.subscriptions.get(t))==null||r.delete(e)}notify(t,e){for(let r of this.subscriptions.get(t)??[])r(e)}},He=class Ve{constructor(e){o(this,"subscriptions",new Be);this.producer=e}static withProducerCallback(e){return new Ve(e)}static empty(){return new Ve}startProducer(){this.producer&&this.producer(e=>{this.subscriptions.notify("message",e)})}connect(){return new Promise(e=>setTimeout(e,0)).then(()=>{this.subscriptions.notify("open",new Event("open"))})}get readyState(){return WebSocket.OPEN}reconnect(e,r){this.close(),this.connect()}close(){this.subscriptions.notify("close",new Event("close"))}send(e){return this.subscriptions.notify("message",new MessageEvent("message",{data:e})),Promise.resolve()}addEventListener(e,r){this.subscriptions.addSubscription(e,r),e==="open"&&r(new Event("open")),e==="message"&&this.startProducer()}removeEventListener(e,r){this.subscriptions.removeSubscription(e,r)}},le=1e10,Ze=1e3;function Ee(t,e){let r=t.map(n=>`"${n}"`).join(", ");return Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`)}function sr(t={}){let e={};function r(d){e=d}let n={};function s(d){var f;n.unregisterHandler&&n.unregisterHandler(),n=d,(f=n.registerHandler)==null||f.call(n,Wr)}let a;function l(d){if(typeof d=="function"){a=d;return}a=(f,E)=>{let S=d[f];if(S)return S(E);let M=d._;if(!M)throw Error(`The requested method has no handler: ${f}`);return M(f,E)}}let{maxRequestTime:c=Ze}=t;t.transport&&s(t.transport),t.requestHandler&&l(t.requestHandler),t._debugHooks&&r(t._debugHooks);let w=0;function R(){return w<=le?++w:w=0}let k=new Map,P=new Map;function j(d,...f){let E=f[0];return new Promise((S,M)=>{var se;if(!n.send)throw Ee(["send"],"make requests");let T=R(),K={type:"request",id:T,method:d,params:E};k.set(T,{resolve:S,reject:M}),c!==1/0&&P.set(T,setTimeout(()=>{P.delete(T),M(Error("RPC request timed out."))},c)),(se=e.onSend)==null||se.call(e,K),n.send(K)})}let I=new Proxy(j,{get:(d,f,E)=>f in d?Reflect.get(d,f,E):S=>j(f,S)}),Pe=I;function ve(d,...f){var M;let E=f[0];if(!n.send)throw Ee(["send"],"send messages");let S={type:"message",id:d,payload:E};(M=e.onSend)==null||M.call(e,S),n.send(S)}let xt=new Proxy(ve,{get:(d,f,E)=>f in d?Reflect.get(d,f,E):S=>ve(f,S)}),Mt=xt,J=new Map,Ue=new Set;function Tr(d,f){var E;if(!n.registerHandler)throw Ee(["registerHandler"],"register message listeners");if(d==="*"){Ue.add(f);return}J.has(d)||J.set(d,new Set),(E=J.get(d))==null||E.add(f)}function Ur(d,f){var E,S;if(d==="*"){Ue.delete(f);return}(E=J.get(d))==null||E.delete(f),((S=J.get(d))==null?void 0:S.size)===0&&J.delete(d)}async function Wr(d){var f,E;if((f=e.onReceive)==null||f.call(e,d),!("type"in d))throw Error("Message does not contain a type.");if(d.type==="request"){if(!n.send||!a)throw Ee(["send","requestHandler"],"handle requests");let{id:S,method:M,params:T}=d,K;try{K={type:"response",id:S,success:!0,payload:await a(M,T)}}catch(se){if(!(se instanceof Error))throw se;K={type:"response",id:S,success:!1,error:se.message}}(E=e.onSend)==null||E.call(e,K),n.send(K);return}if(d.type==="response"){let S=P.get(d.id);S!=null&&clearTimeout(S);let{resolve:M,reject:T}=k.get(d.id)??{};d.success?M==null||M(d.payload):T==null||T(Error(d.error));return}if(d.type==="message"){for(let M of Ue)M(d.id,d.payload);let S=J.get(d.id);if(!S)return;for(let M of S)M(d.payload);return}throw Error(`Unexpected RPC message type: ${d.type}`)}return{setTransport:s,setRequestHandler:l,request:I,requestProxy:Pe,send:xt,sendProxy:Mt,addMessageListener:Tr,removeMessageListener:Ur,proxy:{send:Mt,request:Pe},_setDebugHooks:r}}function ir(t){return sr(t)}var et="[transport-id]";function ar(t,e){let{transportId:r}=e;return r==null?t:{[et]:r,data:t}}function or(t,e){let{transportId:r,filter:n}=e,s=n==null?void 0:n();if(r!=null&&s!=null)throw Error("Cannot use both `transportId` and `filter` at the same time");let a=t;if(r){if(t[et]!==r)return[!0];a=t.data}return s===!1?[!0]:[!1,a]}function lr(t,e={}){let{transportId:r,filter:n,remotePort:s}=e,a=t,l=s??t,c;return{send(w){l.postMessage(ar(w,{transportId:r}))},registerHandler(w){c=R=>{let k=R.data,[P,j]=or(k,{transportId:r,filter:()=>n==null?void 0:n(R)});P||w(j)},a.addEventListener("message",c)},unregisterHandler(){c&&a.removeEventListener("message",c)}}}function dr(t,e){return lr(t,e)}function tt(t){return ir({transport:dr(t,{transportId:"marimo-transport"}),maxRequestTime:2e4,_debugHooks:{onSend:e=>{p.debug("[rpc] Parent -> Worker",e)},onReceive:e=>{p.debug("[rpc] Worker -> Parent",e)}}})}ae=Rt({kind:"loading",message:"Initializing..."});var rt=yn(),nt="marimo:file",st=new Or(null);const ur={saveFile(t){st.set(nt,t)},readFile(){return st.get(nt)}};var cr={saveFile(t){Se.setCodeForHash((0,rt.compressToEncodedURIComponent)(t))},readFile(){let t=Se.getCodeFromHash()||Se.getCodeFromSearchParam();return t?(0,rt.decompressFromEncodedURIComponent)(t):null}};const hr={saveFile(t){},readFile(){let t=document.querySelector("marimo-code");return t?decodeURIComponent(t.textContent||"").trim():null}};var pr={saveFile(t){},readFile(){if(window.location.hostname!=="marimo.app")return null;let t=new URL("export_demos/wasm-intro.py",document.baseURI);return fetch(t.toString()).then(e=>e.ok?e.text():null).catch(()=>null)}};const fr={saveFile(t){},readFile(){return U.get(Br)??null}};var gr={saveFile(t){},readFile(){return["import marimo","app = marimo.App()","","@app.cell","def __():"," return","",'if __name__ == "__main__":'," app.run()"].join(`
|
|
2
|
+
`)}},it=class{constructor(t){this.stores=t}insert(t,e){this.stores.splice(t,0,e)}saveFile(t){this.stores.forEach(e=>e.saveFile(t))}readFile(){for(let t of this.stores){let e=t.readFile();if(e)return e}return null}};let xe;oe=new it([fr,hr,cr]),xe=new it([ur,pr,gr]),ze=class Gt{constructor(){o(this,"initialized",new At);o(this,"sendRename",async({filename:e})=>(e===null||(Se.setFilename(e),await this.rpc.proxy.request.bridge({functionName:"rename_file",payload:e})),null));o(this,"sendSave",async e=>{if(!this.saveRpc)return p.warn("Save RPC not initialized"),null;await this.saveRpc.saveNotebook(e);let r=await this.readCode();return r.contents&&(oe.saveFile(r.contents),xe.saveFile(r.contents)),this.rpc.proxy.request.saveNotebook(e).catch(n=>{p.error(n)}),null});o(this,"sendCopy",async()=>{b()});o(this,"sendStdin",async e=>(await this.rpc.proxy.request.bridge({functionName:"put_input",payload:e.text}),null));o(this,"sendPdb",async()=>{b()});o(this,"sendSetBreakpoints",async()=>{b()});o(this,"sendRun",async e=>(await this.rpc.proxy.request.loadPackages(e.codes.join(`
|
|
3
|
+
`)),await this.putControlRequest({type:"execute-cells",...e}),null));o(this,"sendRunScratchpad",async e=>(await this.rpc.proxy.request.loadPackages(e.code),await this.putControlRequest({type:"execute-scratchpad",...e}),null));o(this,"sendInterrupt",async()=>(this.interruptBuffer!==void 0&&(this.interruptBuffer[0]=2),null));o(this,"sendShutdown",async()=>(window.close(),null));o(this,"sendFormat",async e=>await this.rpc.proxy.request.bridge({functionName:"format",payload:e}));o(this,"sendDeleteCell",async e=>(await this.putControlRequest({type:"delete-cell",...e}),null));o(this,"sendInstallMissingPackages",async e=>(this.putControlRequest({type:"install-packages",...e}),null));o(this,"sendCodeCompletionRequest",async e=>(U.get(Qr)||await this.rpc.proxy.request.bridge({functionName:"code_complete",payload:e}),null));o(this,"saveUserConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_user_config",payload:e}),sn.post("/kernel/save_user_config",e,{baseUrl:"/"}).catch(r=>(p.error(r),null))));o(this,"saveAppConfig",async e=>(await this.rpc.proxy.request.bridge({functionName:"save_app_config",payload:e}),null));o(this,"saveCellConfig",async e=>(await this.putControlRequest({type:"update-cell-config",...e}),null));o(this,"sendRestart",async()=>{let e=await this.readCode();return e.contents&&(oe.saveFile(e.contents),xe.saveFile(e.contents)),wn(),null});o(this,"readCode",async()=>this.saveRpc?{contents:await this.saveRpc.readNotebook()}:(p.warn("Save RPC not initialized"),{contents:""}));o(this,"readSnippets",async()=>await this.rpc.proxy.request.bridge({functionName:"read_snippets",payload:void 0}));o(this,"openFile",async({path:e})=>{let r=bn({code:null,baseUrl:window.location.origin});return window.open(r,"_blank"),null});o(this,"sendListFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"list_files",payload:e}));o(this,"sendSearchFiles",async e=>await this.rpc.proxy.request.bridge({functionName:"search_files",payload:e}));o(this,"sendComponentValues",async e=>(await this.putControlRequest({type:"update-ui-element",...e,token:Nt()}),null));o(this,"sendInstantiate",async e=>null);o(this,"sendFunctionRequest",async e=>(await this.putControlRequest({type:"invoke-function",...e}),null));o(this,"sendCreateFileOrFolder",async e=>{let r=null;return e.file&&(r=(await gn(e.file)).split(",")[1]??""),await this.rpc.proxy.request.bridge({functionName:"create_file_or_directory",payload:{path:e.path,type:e.type,name:e.name,contents:r}})});o(this,"sendDeleteFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"delete_file_or_directory",payload:e}));o(this,"sendCopyFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"copy_file_or_directory",payload:e}));o(this,"sendRenameFileOrFolder",async e=>await this.rpc.proxy.request.bridge({functionName:"move_file_or_directory",payload:e}));o(this,"sendUpdateFile",async e=>await this.rpc.proxy.request.bridge({functionName:"update_file",payload:e}));o(this,"sendFileDetails",async e=>await this.rpc.proxy.request.bridge({functionName:"file_details",payload:e}));o(this,"exportAsHTML",async e=>await this.rpc.proxy.request.bridge({functionName:"export_html",payload:e}));o(this,"exportAsMarkdown",async e=>await this.rpc.proxy.request.bridge({functionName:"export_markdown",payload:e}));o(this,"previewDatasetColumn",async e=>(await this.putControlRequest({type:"preview-dataset-column",...e}),null));o(this,"previewSQLTable",async e=>(await this.putControlRequest({type:"preview-sql-table",...e}),null));o(this,"previewSQLTableList",async e=>(await this.putControlRequest({type:"list-sql-tables",...e}),null));o(this,"previewSQLSchemaList",async e=>(await this.putControlRequest({type:"list-sql-schemas",...e}),null));o(this,"previewDataSourceConnection",async e=>(await this.putControlRequest({type:"list-data-source-connection",...e}),null));o(this,"validateSQL",async e=>(await this.putControlRequest({type:"validate-sql",...e}),null));o(this,"sendModelValue",async e=>(await this.putControlRequest({type:"model",...e}),null));o(this,"sendDocumentTransaction",()=>Promise.resolve(null));o(this,"addPackage",async e=>this.rpc.proxy.request.addPackage(e));o(this,"removePackage",async e=>this.rpc.proxy.request.removePackage(e));o(this,"getPackageList",async()=>await this.rpc.proxy.request.listPackages());o(this,"getDependencyTree",async()=>({tree:{dependencies:[],name:"",tags:[],version:null}}));o(this,"listSecretKeys",async e=>(await this.putControlRequest({type:"list-secret-keys",...e}),null));o(this,"getUsageStats",b);o(this,"getEnvironmentInfo",async()=>await this.rpc.proxy.request.bridge({functionName:"get_environment_info",payload:void 0}));o(this,"openTutorial",b);o(this,"getRecentFiles",b);o(this,"getWorkspaceFiles",b);o(this,"getRunningNotebooks",b);o(this,"shutdownSession",b);o(this,"getExportAvailability",b);o(this,"exportAsIPYNB",b);o(this,"exportAsPDF",b);o(this,"autoExportAsHTML",b);o(this,"autoExportAsMarkdown",b);o(this,"autoExportAsIPYNB",b);o(this,"updateCellOutputs",b);o(this,"writeSecret",b);o(this,"invokeAiTool",b);o(this,"clearCache",b);o(this,"getCacheInfo",b);o(this,"listStorageEntries",b);o(this,"downloadStorage",b);tn()&&(this.rpc=tt(new Worker(new URL(""+new URL("worker-BQo2bijx.js",import.meta.url).href,""+import.meta.url),{type:"module",name:at()})),this.rpc.addMessageListener("ready",()=>{this.startSession()}),this.rpc.addMessageListener("initialized",()=>{this.saveRpc=this.getSaveWorker(),this.setInterruptBuffer(),U.set(ae,{kind:"ready"}),this.initialized.resolve()}),this.rpc.addMessageListener("initializingMessage",({message:e})=>{U.get(ae).kind==="loading"&&U.set(ae,{kind:"loading",message:e})}),this.rpc.addMessageListener("initializedError",({error:e})=>{if(this.initialized.status==="resolved"){p.error(e),hn({title:"Error initializing",description:e,variant:"danger"});return}U.set(ae,{kind:"error",message:e}),this.initialized.reject(Error(e))}),this.rpc.addMessageListener("kernelMessage",({message:e})=>{var r;(r=this.messageConsumer)==null||r.call(this,new MessageEvent("message",{data:e}))}))}static get INSTANCE(){let e="_marimo_private_PyodideBridge";return window[e]||(window[e]=new Gt),window[e]}getSaveWorker(){return kt()==="read"?(p.debug("Using partially disabled SaveWorker in read-mode"),{readFile:b,readNotebook:async()=>await oe.readFile()??"",saveNotebook:b}):tt(new Worker(new URL(""+new URL("save-worker-_Qc1hOeF.js",import.meta.url).href,""+import.meta.url),{type:"module",name:at()})).proxy.request}async startSession(){let e=await oe.readFile(),r=await xe.readFile(),n=U.get(Dr)??Se.getFilename(),s=U.get(en),a={},l=new URLSearchParams(window.location.search);for(let c of l.keys()){let w=l.getAll(c);a[c]=w.length===1?w[0]:w}await this.rpc.proxy.request.startSession({queryParameters:a,code:e||r||"",filename:n,userConfig:{...s,runtime:{...s.runtime,auto_instantiate:kt()==="read"?!0:s.runtime.auto_instantiate}}})}setInterruptBuffer(){crossOriginIsolated?(this.interruptBuffer=new Uint8Array(new SharedArrayBuffer(1)),this.rpc.proxy.request.setInterruptBuffer(this.interruptBuffer)):p.warn("Not running in a secure context; interrupts are not available.")}attachMessageConsumer(e){this.messageConsumer=e,this.rpc.proxy.send.consumerReady({})}async putControlRequest(e){await this.rpc.proxy.request.bridge({functionName:"put_control_request",payload:e})}},Ht=function(){return He.withProducerCallback(t=>{ze.INSTANCE.attachMessageConsumer(t)})};function at(){let t=typeof window<"u"&&window.__MARIMO_HAS_WASM_CONTROLLER__===!0;return an()+(t?"::controller":"")}Wt=function(t=je()){let e=window.fetch;return window.fetch=async(r,n)=>{let s=r instanceof Request?r.url:r.toString();if(s.startsWith("data:"))return e(r,n);try{let a=Me(s,t);if(a){let l=await(await e(a)).arrayBuffer();return new Response(l,{headers:{"Content-Type":mr(s)}})}return e(r,n)}catch(a){return p.error("Error parsing URL",a),e(r,n)}},()=>{window.fetch=e}};function mr(t){return t.endsWith(".csv")?"text/csv":t.endsWith(".json")?"application/json":t.endsWith(".txt")?"text/plain":"application/octet-stream"}jt=function(t,e=je()){let r=t.http.bind(t),n=t.load.bind(t);return t.http=async s=>{let a=Me(s,e);if(a)return await window.fetch(a).then(l=>l.text());try{return await r(s)}catch(l){if(s.startsWith("data:"))return await window.fetch(s).then(c=>c.text());throw l}},t.load=async s=>{let a=Me(s,e);if(a)return await window.fetch(a).then(l=>l.text());try{return await n(s)}catch(l){if(s.startsWith("data:"))return await window.fetch(s).then(c=>c.text());throw l}},()=>{t.http=r,t.load=n}};function ot(t){return t.startsWith(".")?t.slice(1):t}function yr(t,e=je()){let r=Me(t,e);if(!r)return t;let n=mn(r);return URL.createObjectURL(n)}function Me(t,e){let r=document.baseURI;r.startsWith("blob:")&&(r=r.replace("blob:",""));let n=new URL(t,r).pathname,s=lt(t),a=lt(n);return e[t]||e[ot(t)]||e[n]||e[ot(n)]||s&&e[s]||a&&e[a]}function lt(t){let e=t.indexOf("/@file/");return e===-1?null:t.slice(e)}function Ce(t,e){return{get(r){return t.get(r)},set(r,n){t.set(r,n)},save_changes(){t.save_changes()},send:t.send.bind(t),on(r,n){e.aborted||(t.on(r,n),e.addEventListener("abort",()=>t.off(r,n),{once:!0}))},off(r,n){t.off(r??null,n??null)},widget_manager:{async get_model(r){return Ce(await t.widget_manager.get_model(r),e)}}}}Ie=function(t){return typeof t=="string"&&t.length>0};function dt(t){if(typeof t=="string"&&t.startsWith("anywidget:")){let e=t.slice(10);if(Ie(e))return e}throw Error(`[anywidget] Invalid widget reference: ${JSON.stringify(t)}`)}function wr(t,e){return{async getModel(r){let n=dt(r);return Ce(await t.getModel(n),e)},async getWidget(r){let n=dt(r),s=await t.getWidget(n);return{exports:s.exports,async render({el:a,signal:l}){await s.render({el:a,signal:l??e})}}}}}var ut=Symbol("marimo");function Ae(t){return t[ut]}var ct=(vt=ut,ee=class{constructor(e,r,n){u(this,D);u(this,Re,"change");u(this,$);u(this,H);u(this,Z);u(this,q,{});o(this,vt,{updateAndEmitDiffs:e=>g(this,D,Jt).call(this,e),emitCustomMessage:(e,r)=>g(this,D,Kt).call(this,e,r)});o(this,"widget_manager",{async get_model(e){let r=await ee._modelManager.getModel(e);if(!r)throw Error(`Model not found with id: ${e}. This is likely because the model was not registered.`);return r}});u(this,qe,Kr(()=>{let e=i(this,q)[i(this,Re)];if(e)for(let r of[...e])try{r()}catch(n){p.error("Error emitting event",n)}},0));h(this,H,e),h(this,Z,r),h(this,$,new Map),n&&n.addEventListener("abort",()=>{p.debug("[Model] Signal aborted, clearing all listeners"),h(this,q,{})})}off(e,r){var n;if(!e){h(this,q,{});return}if(!r){i(this,q)[e]=new Set;return}(n=i(this,q)[e])==null||n.delete(r)}send(e,r,n){let s=(n??[]).map(a=>a instanceof ArrayBuffer?new DataView(a):new DataView(a.buffer,a.byteOffset,a.byteLength));return i(this,Z).sendCustomMessage(e,s).then(()=>r==null?void 0:r())}get(e){return i(this,H)[e]}set(e,r){h(this,H,{...i(this,H),[e]:r}),i(this,$).set(e,r),g(this,D,Yt).call(this,`change:${e}`,r),i(this,qe).call(this)}save_changes(){if(i(this,$).size===0)return;let e=Object.fromEntries(i(this,$).entries());i(this,$).clear(),i(this,Z).sendUpdate(e)}on(e,r,n){let s=n==null?void 0:n.signal;s!=null&&s.aborted||(i(this,q)[e]||(i(this,q)[e]=new Set),i(this,q)[e].add(r),s==null||s.addEventListener("abort",()=>this.off(e,r),{once:!0}))}},Re=new WeakMap,$=new WeakMap,H=new WeakMap,Z=new WeakMap,q=new WeakMap,D=new WeakSet,Yt=function(e,r){let n=i(this,q)[e];if(n)for(let s of[...n])try{s(r)}catch(a){p.error("Error emitting event",a)}},Jt=function(e){e!=null&&Object.keys(e).forEach(r=>{let n=r;i(this,H)[n]!==e[n]&&this.set(n,e[n])})},Kt=function(e,r=[]){let n=i(this,q)["msg:custom"];if(n)for(let s of[...n])try{s(e.content,r)}catch(a){p.error("Error emitting event",a)}},qe=new WeakMap,ee);function ht(t){return typeof t=="function"}function pt(t){return typeof t=="function"}function br(t){return ie(t)&&(ht(t.render)||pt(t.initialize))}function vr(t){return typeof t=="function"||br(t)}function Sr(t){return ie(t)&&vr(t.default)}var ft=new Set,gt=new WeakMap;function _r(t,e){if(Sr(t))return t.default;if(!ie(t)||t.default!==void 0)return null;let r=ht(t.render)?t.render:void 0,n=pt(t.initialize)?t.initialize:void 0;if(r===void 0&&n===void 0)return null;let s=gt.get(t);if(s)return s;ft.has(e)||(ft.add(e),p.warn(`Anywidget module at ${e} uses deprecated top-level named exports (\`render\`/\`initialize\`). Per the AFM spec, use a default export instead: \`export default { render }\`. See https://anywidget.dev/en/afm/`));let a={render:r,initialize:n};return gt.set(t,a),a}function Er(t,e){let r="https://anywidget.dev/en/afm/",n=ie(t)&&qt(t,"render"),s=ie(t)&&qt(t,"initialize");if(ie(t)&&t.default!==void 0)return Error(`Anywidget module at ${e} has an invalid default export. Expected a factory function or an object with \`render\` or \`initialize\`. See ${r}`);if(n||s){let a=[n?"`render`":null,s?"`initialize`":null].filter(Boolean).join(" and "),l=[n?"render":null,s?"initialize":null].filter(R=>R!==null),c=`export default { ${l.join(", ")} }`,w=l.length===1?`export function ${l[0]}`:"named export function ...";return Error(`Anywidget module at ${e} uses named exports (${a}). Per the AFM spec, use a default export instead: \`${c}\` (not \`${w}\`). See ${r}`)}return Error(`Anywidget module at ${e} is missing a default export. Per the AFM spec, use \`export default { render }\` or \`export default async () => ({ render })\`. See ${r}`)}Oe=function(t){return typeof t!="string"||t.length===0?!1:!!(/^(\.?\/)?@file\/[^?#]+$/.test(t)||Mr(t))};function xr(){return U.get(fn)||pn()}function Mr(t){return t.startsWith("data:text/javascript;base64,")||t.startsWith("data:application/javascript;base64,")||t.startsWith("data:text/css;base64,")?xr():!1}const mt={invoke:async()=>{let t="anywidget.invoke not supported in marimo. Please file an issue at https://github.com/marimo-team/marimo/issues";throw p.warn(t),Error(t)}};function Cr(t){if(typeof AbortSignal.any=="function")return AbortSignal.any(t);let e=new AbortController;for(let r of t){if(r.aborted)return e.abort(r.reason),e.signal;r.addEventListener("abort",()=>e.abort(r.reason),{once:!0})}return e.signal}var Rr=(St=class{constructor(){u(this,ke);u(this,z,new Map)}getModule(t){let{jsUrl:e,jsHash:r,kernelAuthored:n=!1}=t,s=i(this,z).get(r);if(s)return s;let a=g(this,ke,Xt).call(this,e,{kernelAuthored:n}).catch(l=>{throw i(this,z).delete(r),l});return i(this,z).set(r,a),a}invalidate(t){i(this,z).delete(t)}},z=new WeakMap,ke=new WeakSet,Xt=async function(t,e={}){if(!(Oe(t)||e.kernelAuthored===!0&&/^(https?:|data:)/.test(t)))throw Error(`Refusing to load anywidget module from untrusted URL: ${String(t)}`);let r=nn(t).toString();return Pt()&&(r=yr(r)),cn(()=>import(r).then(async n=>(await n.__tla,n)),[],import.meta.url)},St);function Ne(t){return typeof t=="function"}async function yt(t,e){try{await t()}catch(r){p.warn(`[WidgetBinding] ${e} cleanup failed`,r)}}var qr=(ne=class{constructor(e){u(this,V);u(this,te);u(this,de);u(this,ue);u(this,ce);u(this,he);u(this,B,new Set);u(this,re,new Set);h(this,de,e.widget),h(this,ue,e.model),h(this,ce,e.exports),h(this,te,e.controller),h(this,he,e.createHost)}static async create({widgetDef:e,model:r,createHost:n,controller:s=new AbortController}){var j;let a=s.signal,l=typeof e=="function"?await e():e,c=Promise.resolve((j=l.initialize)==null?void 0:j.call(l,{model:Ce(r,a),experimental:mt,signal:a}));c.then(async I=>{a.aborted&&Ne(I)&&await yt(I,"late initialize")}).catch(()=>{});let w=await Promise.race([c,new Promise((I,Pe)=>{let ve=()=>Pe(Error("[anywidget] binding destroyed"));if(a.aborted){ve();return}a.addEventListener("abort",ve,{once:!0})})]);if(a.aborted)throw Error("[anywidget] binding destroyed");let R,k;Ne(w)?(k=w,R=void 0):R=typeof w=="object"&&w?w:void 0;let P=new ne({widget:l,model:r,exports:R,controller:s,createHost:n});return k&&a.addEventListener("abort",()=>{var I;g(I=P,V,Qe).call(I,k,"initialize")},{once:!0}),P}get exports(){return i(this,ce)}async createView(e,r){let n=g(this,V,Zt).call(this,e,r);i(this,re).add(n);try{await n}finally{i(this,re).delete(n)}}async destroy(){for(p.debug("[WidgetBinding] Destroying binding generation"),i(this,te).abort(),await Promise.allSettled(i(this,re));i(this,B).size>0;)await Promise.all(i(this,B))}},te=new WeakMap,de=new WeakMap,ue=new WeakMap,ce=new WeakMap,he=new WeakMap,B=new WeakMap,re=new WeakMap,V=new WeakSet,Zt=async function(e,r){let n=i(this,de);if(!n.render)return;let s=Cr([r.signal,i(this,te).signal]);if(s.aborted)return;e.el.innerHTML="";let a=i(this,he).call(this,s),l=await n.render({model:Ce(i(this,ue),s),el:e.el,experimental:mt,signal:s,host:a});if(Ne(l)){let c=()=>{let w=r.signal.aborted?"view unmount":"binding destroyed";return p.debug(`[WidgetBinding] Render cleanup triggered (reason: ${w})`),g(this,V,Qe).call(this,l,"render")};if(s.aborted){await c();return}s.addEventListener("abort",()=>{c()},{once:!0})}},Qe=function(e,r){let n=yt(e,r);return i(this,B).add(n),n.finally(()=>i(this,B).delete(n)),n},ne);const wt=new Rr;var kr=(_t=class{constructor(t,e){u(this,v);u(this,O);u(this,pe);u(this,fe);u(this,ge);u(this,me);u(this,F,new AbortController);u(this,C,new At);u(this,Q,new Set);u(this,A,new Map);u(this,N);u(this,G);u(this,x);u(this,ye,Promise.resolve());u(this,Y,"");h(this,O,t),h(this,pe,e.timeout),h(this,fe,e.isEditMode),h(this,ge,e.createHost),h(this,me,e.onModelTimeout)}getModel(){return i(this,C).status==="pending"&&!i(this,N)&&h(this,N,setTimeout(()=>{i(this,C).status==="pending"&&(h(this,N,void 0),i(this,C).reject(Error(`Model not found for key: ${i(this,O)}`)),i(this,me).call(this))},i(this,pe))),i(this,C).promise}getModelSync(){return i(this,C).status==="resolved"?i(this,C).value:void 0}createModel(t){i(this,C).status==="pending"&&g(this,v,Ge).call(this,t(i(this,F).signal))}setModel(t){i(this,C).status==="pending"&&g(this,v,Ge).call(this,t)}setSpec(t){if(!i(this,G)){h(this,G,t);return}i(this,fe).call(this)&&(h(this,G,t),i(this,x)&&i(this,x).hash!==t.hash&&g(this,v,tr).call(this,t))}async getWidget(){return{exports:(await g(this,v,Ye).call(this)).exports,render:async({el:t,signal:e})=>{await this.createView({el:t,signal:e??i(this,F).signal})}}}async createView(t){if(t.signal.aborted||i(this,F).signal.aborted)return;let e={el:t.el,signal:t.signal};i(this,Q).add(e),g(this,v,rr).call(this,e),t.signal.addEventListener("abort",()=>i(this,Q).delete(e),{once:!0}),await g(this,v,Xe).call(this,e)}dispose(){if(!i(this,F).signal.aborted){p.debug(`[WidgetRuntime] Disposing model=${i(this,O)}`),i(this,N)&&h(this,N,(clearTimeout(i(this,N)),void 0)),i(this,C).status==="pending"&&(i(this,C).promise.catch(()=>{}),i(this,C).reject(Error("[anywidget] widget runtime destroyed"))),i(this,x)&&g(this,v,Ke).call(this,i(this,x)),i(this,F).abort(),i(this,Q).clear();for(let t of i(this,A).values())t.dispose();i(this,A).clear()}}},O=new WeakMap,pe=new WeakMap,fe=new WeakMap,ge=new WeakMap,me=new WeakMap,F=new WeakMap,C=new WeakMap,Q=new WeakMap,A=new WeakMap,N=new WeakMap,G=new WeakMap,x=new WeakMap,ye=new WeakMap,Y=new WeakMap,v=new WeakSet,Ge=function(t){i(this,N)&&h(this,N,(clearTimeout(i(this,N)),void 0)),i(this,C).resolve(t);let e=t.get("_css");h(this,Y,typeof e=="string"?e:""),t.on("change:_css",r=>{h(this,Y,typeof r=="string"?r:"");for(let n of i(this,A).values())n.update(i(this,Y))},{signal:i(this,F).signal})},Ye=async function(){for(;!i(this,F).signal.aborted;){let t=await this.getModel(),e=i(this,x);if(!e){let r=i(this,G);if(!r)throw Error(`[anywidget] No ESM spec for model ${i(this,O)}: nothing ever provided this widget's code`);e=g(this,v,Je).call(this,r,t)}try{let r=await e.promise;if(e===i(this,x))return r}catch(r){if(!i(this,x)||e===i(this,x))throw r}}throw Error("[anywidget] widget runtime destroyed")},er=async function(t){let{spec:e,model:r,controller:n}=t,s=await wt.getModule({jsUrl:e.url,jsHash:e.hash,kernelAuthored:!0}),a=_r(s,e.url);if(!a)throw wt.invalidate(e.hash),Er(s,e.url);return qr.create({widgetDef:a,model:r,createHost:i(this,ge),controller:n})},Je=function(t,e){let r=new AbortController,n={hash:t.hash,controller:r,promise:g(this,v,er).call(this,{spec:t,model:e,controller:r})};return n.promise.catch(()=>{i(this,x)===n&&h(this,x,void 0)}),h(this,x,n),n},tr=function(t){let e=i(this,x);if(!e)return;p.debug(`[WidgetRuntime] Hot-swapping generation for model=${i(this,O)}`);let r=g(this,v,Ke).call(this,e),n=this.getModelSync();if(!n)return;let s=g(this,v,Je).call(this,t,n);for(let a of i(this,Q))a.generation=void 0,r.then(()=>g(this,v,Xe).call(this,a,s)).catch(l=>{p.error("[WidgetRuntime] Error replacing widget view",l)})},Ke=function(t){t.controller.abort();let e=i(this,ye).then(async()=>{try{await(await t.promise).destroy()}catch{}});return h(this,ye,e),e},Xe=async function(t,e){if(t.signal.aborted||i(this,F).signal.aborted)return;let r=e??i(this,x),n=r?await r.promise:await g(this,v,Ye).call(this),s=i(this,x);if(!(!s||s!==(r??s))&&t.generation!==s){t.generation=s;try{await n.createView({el:t.el},{signal:t.signal})}catch(a){if(s!==i(this,x)){t.generation=void 0;return}throw a}}},rr=function(t){let e=t.el.getRootNode();if(!Le(e)&&!Pr(e))return;let r=i(this,A).get(e);r||(r=Fr(e,i(this,Y)),i(this,A).set(e,r)),r.references+=1;let n=!1;t.signal.addEventListener("abort",()=>{if(n)return;n=!0;let s=i(this,A).get(e);s&&(--s.references,s.references===0&&(s.dispose(),i(this,A).delete(e)))},{once:!0})},_t);function Le(t){return t.nodeType===Node.DOCUMENT_NODE}function Pr(t){return t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}function Fr(t,e){let r=Le(t)?t:t.ownerDocument??document,n=r.defaultView??window;if("adoptedStyleSheets"in t&&n.CSSStyleSheet!==void 0&&typeof n.CSSStyleSheet.prototype.replaceSync=="function")try{let a=new n.CSSStyleSheet;return a.replaceSync(e),t.adoptedStyleSheets=[...t.adoptedStyleSheets,a],{references:0,update(l){a.replaceSync(l)},dispose(){t.adoptedStyleSheets=t.adoptedStyleSheets.filter(l=>l!==a)}}}catch{}let s=r.createElement("style");return s.textContent=e,Le(t)?r.head.append(s):t.append(s),{references:0,update(a){s.textContent=a},dispose(){s.remove()}}}function Te(t,e=[]){let r=[];if(t instanceof DataView)r.push(e);else if(Array.isArray(t))for(let[n,s]of t.entries())r.push(...Te(s,[...e,n]));else if(typeof t=="object"&&t)for(let[n,s]of Object.entries(t))r.push(...Te(s,[...e,n]));return r}function Ir(t){let e=Te(t);if(e.length===0)return{state:t,buffers:[],bufferPaths:[]};let r=structuredClone(t),n=[],s=[];for(let a of e){let l=Jr(t,a);if(l instanceof DataView){let c=Ft(l);n.push(c),s.push(a),_e(r,a,c)}}return{state:r,buffers:n,bufferPaths:s}}function bt(t){let{state:e,bufferPaths:r,buffers:n}=t;if(!r||r.length===0)return e;n&&Zr(n.length===r.length,"Buffers and buffer paths not the same length");let s=e;for(let[a,l]of r.entries()){let c=n==null?void 0:n[a];if(c==null){p.warn("[anywidget] Could not find buffer at path",l);continue}typeof c=="string"?_e(s,l,It(c)):_e(s,l,c)}return s}function Ar(){let t=U.get(rn).mode;return t==="edit"||t==="present"}Fe=new(Et=class{constructor(t=1e4,e=Ar){u(this,W);u(this,L,new Map);u(this,we);u(this,be);h(this,we,t),h(this,be,e)}getModel(t){return g(this,W,X).call(this,t).getModel()}getModelSync(t){var e;return(e=i(this,L).get(t))==null?void 0:e.getModelSync()}createModel(t,e){g(this,W,X).call(this,t).createModel(e)}setModel(t,e){g(this,W,X).call(this,t).setModel(e)}setSpec(t,e){g(this,W,X).call(this,t).setSpec(e)}getWidget(t){return g(this,W,X).call(this,t).getWidget()}createView(t){return g(this,W,X).call(this,t.modelId).createView(t)}delete(t){let e=i(this,L).get(t);e&&(e.dispose(),i(this,L).delete(t))}},L=new WeakMap,we=new WeakMap,be=new WeakMap,W=new WeakSet,X=function(t){let e=i(this,L).get(t);if(!e){let r=new kr(t,{timeout:i(this,we),isEditMode:i(this,be),createHost:n=>wr(this,n),onModelTimeout:()=>{i(this,L).get(t)===r&&(r.dispose(),i(this,L).delete(t))}});e=r,i(this,L).set(t,e)}return e},Et),ct._modelManager=Fe,Ut=async function(t,e){let r=e.model_id;if(!Ie(r))throw Error(`[anywidget] Invalid model id: ${String(r)}`);let n=e.message,s=("buffers"in n?n.buffers:[]).map(It);switch(n.method){case"open":{let{state:a,buffer_paths:l=[]}=n;n.esm_spec&&t.setSpec(r,n.esm_spec);let c=bt({state:a,bufferPaths:l,buffers:s}),w=t.getModelSync(r);if(w){Ae(w).updateAndEmitDiffs(c);return}t.createModel(r,R=>new ct(c,Pt()?{sendUpdate:async()=>{},sendCustomMessage:async()=>{}}:{async sendUpdate(k){if(R.aborted){p.debug(`[Model] sendUpdate suppressed for model=${r} (signal aborted)`);return}let{state:P,buffers:j,bufferPaths:I}=Ir(k);await $e().sendModelValue({modelId:r,message:{method:"update",state:P,bufferPaths:I},buffers:j})},async sendCustomMessage(k,P){if(R.aborted){p.debug(`[Model] sendCustomMessage suppressed for model=${r} (signal aborted)`);return}await $e().sendModelValue({modelId:r,message:{method:"custom",content:k},buffers:P.map(Ft)})}},R));return}case"custom":Ae(await t.getModel(r)).emitCustomMessage({method:"custom",content:n.content},s);return;case"close":t.delete(r);return;case"update":{let{state:a,buffer_paths:l=[]}=n;n.esm_spec&&t.setSpec(r,n.esm_spec);let c=bt({state:a,bufferPaths:l,buffers:s});Ae(await t.getModel(r)).updateAndEmitDiffs(c);return}default:ln(n)}},Gr(Fe,"WIDGET_REGISTRY");function Nr(t){return typeof t!="object"||!t?!1:"type"in t&&t.type==="marimo-ui-value-update"}De=class nr{static get INSTANCE(){let e="_marimo_private_UIElementRegistry";return window[e]||(window[e]=new nr),window[e]}constructor(){this.entries=new Map}has(e){return this.entries.has(e)}set(e,r){this.entries.has(e)&&p.debug("UIElementRegistry overwriting entry for objectId.",e),this.entries.set(e,{objectId:e,value:r,elements:new Set})}registerInstance(e,r){let n=this.entries.get(e);n===void 0?this.entries.set(e,{objectId:e,value:zr(r,this),elements:new Set([r])}):n.elements.add(r)}removeInstance(e,r){let n=this.entries.get(e);n!=null&&n.elements.has(r)&&n.elements.delete(r)}removeElementsByCell(e){[...this.entries.keys()].filter(r=>r.startsWith(`${e}-`)).forEach(r=>{this.entries.delete(r)})}lookupValue(e){let r=this.entries.get(e);return r===void 0?void 0:r.value}broadcastMessage(e,r,n){let s=this.entries.get(e);if(s===void 0){p.warn("UIElementRegistry missing entry",e);return}if(Nr(r)){s.value=r.value,s.elements.forEach(a=>{a.dispatchEvent(Lt.create({bubbles:!1,composed:!0,detail:{value:r.value,element:a}}))});return}s.elements.forEach(a=>{a.dispatchEvent(Sn.create({bubbles:!1,composed:!0,detail:{objectId:e,message:r,buffers:n}}))})}broadcastValueUpdate(e,r,n){let s=this.entries.get(r);s===void 0?p.warn("UIElementRegistry missing entry",r):(s.value=n,s.elements.forEach(a=>{a!==e&&a.dispatchEvent(Lt.create({bubbles:!1,composed:!0,detail:{value:n,element:a}}))}),document.dispatchEvent(vn.create({bubbles:!0,composed:!0,detail:{objectId:r}})))}},Ot=De.INSTANCE,$t=new un("function-call-result",async(t,e)=>{await $e().sendFunctionRequest({functionCallId:t,...e})}),Bt="68px";var Lr="288px";Dt=t=>t?/^\d+$/.test(t)?`${t}px`:t:Lr,zt=Vr({isOpen:!0},(t,e)=>{if(!e)return t;switch(e.type){case"toggle":return{...t,isOpen:e.isOpen??t.isOpen};case"setWidth":return{...t,width:e.width};default:return t}})});export{_e as S,He as _,_n as __tla,De as a,Tt as b,Ut as c,Wt as d,jt as f,ae as g,oe as h,$t as i,Oe as l,Ht as m,Dt as n,Ot as o,ze as p,zt as r,Fe as s,Bt as t,Ie as u,Be as v,Vt as x,Qt as y};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as _}from"./chunk-LvLJmgfZ.js";import{p as b,u as q}from"./useEvent-D91BmmQi.js";import{t as A}from"./react-Bj1aDYRI.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as $}from"./createReducer-
|
|
1
|
+
import{s as _}from"./chunk-LvLJmgfZ.js";import{p as b,u as q}from"./useEvent-D91BmmQi.js";import{t as A}from"./react-Bj1aDYRI.js";import{t as C}from"./compiler-runtime-B3qBwwSJ.js";import{t as $}from"./createReducer-DGx5Af-C.js";import{t as y}from"./requests-9-v2bhoi.js";import{t as I}from"./createLucideIcon-w-Qo9n0R.js";import{t as w}from"./DeferredRequestRegistry-C8EV1PoE.js";import{n as N}from"./useAsyncData-Bg5iAViP.js";var W=I("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);const M=new w("storage-list-entries",async(e,a)=>{await y().listStorageEntries({requestId:e,...a})}),z=new w("storage-download",async(e,a)=>{await y().downloadStorage({requestId:e,...a})});function m(e,a){return`${e}::${a??""}`}function D(e){return`${e}::`}var F=C(),p=_(A(),1);function H(){return{namespaces:[],entriesByPath:new Map,pageMetadataByPath:new Map}}var{reducer:ee,createActions:ae,valueAtom:P,useActions:L}=$(H,{setNamespaces:(e,a)=>{let t=new Map(e.namespaces.map(r=>[r.name,r]));for(let r of a.namespaces)t.set(r.name,r);return{...e,namespaces:[...t.values()]}},setEntries:(e,a)=>{let t=m(a.namespace,a.prefix),r=new Map(e.entriesByPath),s=a.append&&r.has(t)?[...r.get(t)??[],...a.entries]:a.entries;r.set(t,s);let n=new Map(e.pageMetadataByPath);return n.set(t,{nextPageToken:a.nextPageToken??null}),{...e,entriesByPath:r,pageMetadataByPath:n}},clearNamespaceCache:(e,a)=>{let t=new Map(e.entriesByPath),r=new Map(e.pageMetadataByPath),s=D(a);for(let n of t.keys())n.startsWith(s)&&t.delete(n);for(let n of r.keys())n.startsWith(s)&&r.delete(n);return{...e,entriesByPath:t,pageMetadataByPath:r}},filterFromVariables:(e,a)=>{let t=new Set(a),r=e.namespaces.filter(s=>t.has(s.name));return{...e,namespaces:r}}});const x=()=>q(P),R=b(e=>e(P).namespaces);function f(){return L()}async function u({namespace:e,prefix:a,pageToken:t,append:r,setEntries:s}){let n=await M.request({namespace:e,prefix:a??"",limit:150,...t==null?{}:{pageToken:t}});if(n.error)throw Error(n.error);return s({namespace:e,prefix:a,entries:n.entries,nextPageToken:n.next_page_token,append:r}),n}function V(e,a){var h;let{entriesByPath:t,pageMetadataByPath:r}=x(),{setEntries:s}=f(),n=m(e,a),o=t.get(n),i=((h=r.get(n))==null?void 0:h.nextPageToken)??null,c=(0,p.useRef)(!1),[k,d]=(0,p.useState)(!1),[E,g]=(0,p.useState)(),{isPending:B,error:v,refetch:T}=N(async()=>{o||await u({namespace:e,prefix:a,setEntries:s})},[e,a,o===void 0]),S=(0,p.useCallback)(async()=>{if(!(i==null||c.current)){c.current=!0,d(!0),g(void 0);try{await u({namespace:e,prefix:a,pageToken:i,append:!0,setEntries:s})}catch(l){g(l instanceof Error?l:Error(String(l)))}finally{c.current=!1,d(!1)}}},[e,a,i,s]);return{entries:o??[],isPending:B&&!o,error:o?void 0:v,hasMore:i!==null,loadMore:S,isLoadingMore:k,loadMoreError:E,refetch:T}}function j(){let e=(0,F.c)(2),{setEntries:a}=f(),t;return e[0]===a?t=e[1]:(t=r=>u({...r,setEntries:a}),e[0]=a,e[1]=t),t}export{j as a,M as c,V as i,W as l,x as n,m as o,f as r,z as s,R as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as o}from"./useEvent-D91BmmQi.js";import{t}from"./createReducer-
|
|
1
|
+
import{u as o}from"./useEvent-D91BmmQi.js";import{t}from"./createReducer-DGx5Af-C.js";import{t as a}from"./uuid-ImXS-885.js";function d(){return{pendingCommands:[],isReady:!1}}var{reducer:f,createActions:g,valueAtom:r,useActions:i}=t(d,{addCommand:(n,m)=>{let e={id:a(),text:m,timestamp:Date.now()};return{...n,pendingCommands:[...n.pendingCommands,e]}},removeCommand:(n,m)=>({...n,pendingCommands:n.pendingCommands.filter(e=>e.id!==m)}),setReady:(n,m)=>({...n,isReady:m}),clearCommands:n=>({...n,pendingCommands:[]})});const s=()=>o(r);function p(){return i()}export{s as n,p as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as i}from"./useEvent-D91BmmQi.js";import{
|
|
1
|
+
import{p as i}from"./useEvent-D91BmmQi.js";import{Rn as o,Wi as r,zn as h}from"./cells-Jr-5Pc9f.js";import{d as m}from"./arrays-DbOq36rN.js";var d="marimo:ai:chatState:v5";const u=i(null),v=i(null),C=r("marimo:ai:includeOtherCells",!0,h);function f(a){let t=new Map;for(let[s,e]of a.entries()){if(e.messages.length===0)continue;let c=m(e.messages,l=>l.id);t.set(s,{...e,messages:c})}return t}const n=r(d,{chats:new Map,activeChatId:null},o({toSerializable:a=>({chats:[...f(a.chats).entries()],activeChatId:a.activeChatId}),fromSerializable:a=>({chats:new Map(a.chats),activeChatId:a.activeChatId})})),p=i(a=>{let t=a(n);return t.activeChatId?t.chats.get(t.activeChatId):null},(a,t,s)=>{t(n,e=>({...e,activeChatId:s}))});export{v as a,C as i,u as n,n as r,p as t};
|