@marimo-team/islands 0.25.3-dev18 → 0.25.3-dev182
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/{ConnectedDataExplorerComponent-CNMliVzw.js → ConnectedDataExplorerComponent-Le_OBfmt.js} +21 -19
- package/dist/{ErrorBoundary-DP07HKNC.js → ErrorBoundary-CcSbeila.js} +19 -19
- package/dist/{abnfDiagram-VCTEODGH-D-Ez91gV.js → abnfDiagram-VCTEODGH-Tf1ghyQQ.js} +2 -2
- package/dist/any-language-editor-BVFHDDQ3.js +75 -0
- package/dist/{architectureDiagram-5GKGNRK7-CTpcNtO8.js → architectureDiagram-5GKGNRK7-xlnbTG0T.js} +1 -1
- package/dist/{arrays-CN1djC4k.js → arrays-R6JsImiT.js} +8 -0
- package/dist/assets/__vite-browser-external-DVeFf2e7.js +1 -0
- package/dist/assets/worker-C1pfNBsx.js +113 -0
- package/dist/{button-CvjkwdSk.js → button-BQRdqQi1.js} +199 -192
- package/dist/{capabilities-CQ5IjhzL.js → capabilities-CI4xUPsp.js} +2 -2
- package/dist/{chat-ui-DaHynk8g.js → chat-ui-X-cWrL9u.js} +541 -540
- package/dist/{check-EDwSwP89.js → check-C9Mp9eCK.js} +1 -1
- package/dist/{chunk-IMKFNOWR-DGxi-zeo.js → chunk-IMKFNOWR-Cmd4a5jy.js} +1 -1
- package/dist/{chunk-SHT3W25Y-CV9J3rAB.js → chunk-SHT3W25Y-mSNp-WpO.js} +1 -1
- package/dist/{chunk-SVP7TREG-BL-9Fqgg.js → chunk-SVP7TREG-CWC49D8X.js} +1 -1
- package/dist/{chunk-TICWLB2K-Cu_XMjDM.js → chunk-TICWLB2K-De9FINtG.js} +1 -1
- package/dist/{chunk-YOKDWASO-DPZk8vhS.js → chunk-YOKDWASO-DKplTrBY.js} +20 -20
- package/dist/{classDiagram-ZZMXUADV-BXXV13Hq.js → classDiagram-ZZMXUADV-DweTkYdp.js} +2 -2
- package/dist/{classDiagram-v2-VYDZK3BY-B7FXJ1Cp.js → classDiagram-v2-VYDZK3BY-A6MR2TiE.js} +2 -2
- package/dist/{code-visibility-hTy956cB.js → code-visibility-BbBLg2nW.js} +25 -25
- package/dist/{common-CiockEHa.js → common-BuwBk7_9.js} +6994 -6819
- package/dist/{copy-icon-Ft7t9bqz.js → copy-icon-De584pZ4.js} +3 -3
- package/dist/{cynefinDiagram-5FMLGOSQ-CH96rwba.js → cynefinDiagram-5FMLGOSQ-BSvo5le-.js} +1 -1
- package/dist/{dagre-GXQ25YYZ-BD3PmpFY.js → dagre-GXQ25YYZ-tXRQslO6.js} +1 -1
- package/dist/{data-grid-overlay-editor-XsGuhhu5.js → data-grid-overlay-editor-Bt_qy-zy.js} +5 -5
- package/dist/{data-grid-types-BH_r7g7l.js → data-grid-types-0PJ-9N5n.js} +1 -1
- package/dist/{diagram-S7CK7UJ4-BsSJJldB.js → diagram-S7CK7UJ4-r3t5VtwI.js} +1 -1
- package/dist/{diagram-UQ7AKVKN-muQtNZc4.js → diagram-UQ7AKVKN-qgbC8YnT.js} +1 -1
- package/dist/{diagram-VX7I27RA-CdhuZAqR.js → diagram-VX7I27RA-CiHxEwtp.js} +1 -1
- package/dist/{diagram-Z3DM3KII-BD8mXjOj.js → diagram-Z3DM3KII-D95u15Ev.js} +1 -1
- package/dist/{dialog-CEBFZNyc.js → dialog-DVRfQuhD.js} +25 -25
- package/dist/{dist-F8Ep36rk.js → dist-B1M0bGO3.js} +1 -1
- package/dist/{dist-D6d86eNJ.js → dist-BA13RJj5.js} +1 -1
- package/dist/{dist-Bvs24R_E.js → dist-BJtmSgcE.js} +48 -48
- package/dist/{dist-CN_BeG2I.js → dist-Ba2VIn1K.js} +53 -53
- package/dist/{dist-PXYI_yuP.js → dist-Bj4bmwUm.js} +12 -12
- package/dist/{dist-DoE4XJBC.js → dist-BmS-ZGjl.js} +8626 -8626
- package/dist/{dist-BorMD-uX.js → dist-Bzogh7CW.js} +87 -87
- package/dist/{dist-CN8zI-XC.js → dist-CThPVKaP.js} +1385 -1382
- package/dist/{dist-DiDibOYr.js → dist-CTi5FTiV.js} +87 -87
- package/dist/{dist-diIx5qJW.js → dist-Ck_C32ye.js} +2 -2
- package/dist/{dist-BLfKmR-l.js → dist-D1fnFp1J.js} +1 -1
- package/dist/{dist-OR1OnN-y.js → dist-D3x9__Fu.js} +46 -46
- package/dist/{dist-BMQf5zIS.js → dist-D7mrh5sO.js} +36 -36
- package/dist/{dist-CSJ0MDRw.js → dist-D9Q3xjiP.js} +1 -1
- package/dist/{dist-BuaRHxOc.js → dist-DP60Ubh8.js} +2 -2
- package/dist/{dist-CSbh1PNP.js → dist-DTv9KkpW.js} +12 -12
- package/dist/{dist-D-wwqlzJ.js → dist-DVVwOfrD.js} +109 -109
- package/dist/{dist-C8fAKSH1.js → dist-DYXM73-k.js} +36 -36
- package/dist/{dist-DBtSl3sf.js → dist-DjeybPOb.js} +1 -1
- package/dist/{dist-CrSP_H1M.js → dist-DtGn9N4h.js} +197 -197
- package/dist/{dist-CLdpGQVr.js → dist-KN80qWCP.js} +2 -2
- package/dist/{dist-DpBpA_n1.js → dist-Lm-D-Vr6.js} +3 -3
- package/dist/{dist-Cg7gzw-a.js → dist-O0qFpEJh.js} +56 -56
- package/dist/{dist-CkTTIdBe.js → dist-OUle2RT7.js} +207 -207
- package/dist/{dist-BK4Oj99o.js → dist-T5rh6JvL.js} +1 -1
- package/dist/{dropdown-menu-CP_qCYHC.js → dropdown-menu-DCMbbQ35.js} +1481 -1433
- package/dist/{ebnfDiagram-PWID7BFC-BIN1sweE.js → ebnfDiagram-PWID7BFC-P7e4bryK.js} +2 -2
- package/dist/{erDiagram-RLTQ6QDP-Ctp5cfoN.js → erDiagram-RLTQ6QDP-CUHZcmRj.js} +1 -1
- package/dist/{error-banner-D-WCIiMt.js → error-banner-DxJ3s8YO.js} +86 -86
- package/dist/{error-entries-Bv6bZPF3.js → error-entries-mpoD5t79.js} +4771 -4702
- package/dist/{esm-D2gTsXEV.js → esm-Bbw_Njjx.js} +575 -575
- package/dist/{esm-AMFssoNp.js → esm-mDQNEFe_.js} +354 -354
- package/dist/{feedback-button-CZNhgq7U.js → feedback-button-CuRYTzzX.js} +37 -37
- package/dist/{flowDiagram-HODETNUW-3EfLrlFb.js → flowDiagram-HODETNUW-BGZ95AzI.js} +2 -2
- package/dist/{formats-27CW_UP4.js → formats-DI7HEVv7.js} +3 -3
- package/dist/{ganttDiagram-EL5Y4UJY-BQT16JSc.js → ganttDiagram-EL5Y4UJY-Dh_4cBJZ.js} +2 -2
- package/dist/{glide-data-editor-DNPChdXf.js → glide-data-editor-vvFmzxva.js} +370 -368
- package/dist/{glide-utils-DJyqh0EM.js → glide-utils-D98laidb.js} +16 -16
- package/dist/{globals-DcKi3Zmn.js → globals-CIofsJK9.js} +3 -3
- package/dist/{highlighted-body-KPVGNVTW-zwjq21tf.js → highlighted-body-KPVGNVTW-3Ziwfz-V.js} +2 -2
- package/dist/{html-to-image-Bf8QMGi4.js → html-to-image-BoZthB4P.js} +668 -622
- package/dist/{infoDiagram-27XIBGKW-DipQoHxl.js → infoDiagram-27XIBGKW-BF0YX70D.js} +1 -1
- package/dist/{ishikawaDiagram-5VMMS53U-DgFMjSGz.js → ishikawaDiagram-5VMMS53U-_itsAAn-.js} +1 -1
- package/dist/{kanban-definition-UXKFOSKX-w1ACVjgl.js → kanban-definition-UXKFOSKX-VNW2Beqh.js} +1 -1
- package/dist/{label-BDKF3Afc.js → label-Qvw1E97W.js} +3 -3
- package/dist/{linear-Cnaq3Tfb.js → linear-DWERh7eI.js} +121 -73
- package/dist/{loader-BQOfjTIJ.js → loader-DOVB0Syl.js} +12 -12
- package/dist/main.js +9822 -7824
- package/dist/{mermaid-CHo49Yv-.js → mermaid-CZ6FrClS.js} +38 -38
- package/dist/mermaid-HWGCJPDP-Du3-HPQA.js +2 -0
- package/dist/{mindmap-definition-YA3MSWOX-CrT0KSfX.js → mindmap-definition-YA3MSWOX-DR4ripvd.js} +1 -1
- package/dist/{number-overlay-editor-GnpmNxbw.js → number-overlay-editor-BiEkIBfV.js} +3 -3
- package/dist/{objects-CzUgoMIF.js → objects-DCmMvZtn.js} +1 -3
- package/dist/{once-BtE-wKRL.js → once-eG8Vmvjd.js} +1 -1
- package/dist/{pegDiagram-XKGWAZYB-BqvywNJA.js → pegDiagram-XKGWAZYB-CFr3XlGl.js} +2 -2
- package/dist/{pieDiagram-E7YTZNPT-BfxJ_XCc.js → pieDiagram-E7YTZNPT-j91XYSLY.js} +1 -1
- package/dist/precisionRound-DhAzeRcm.js +49 -0
- package/dist/{process-output-BZg56CCb.js → process-output-DLS4Mqg_.js} +4 -4
- package/dist/{quadrantDiagram-AXDQQJYC-Ccw0xMjN.js → quadrantDiagram-AXDQQJYC-Blrm7V7_.js} +1 -1
- package/dist/{railroadDiagram-O6MQD6OU-8vFLVTPu.js → railroadDiagram-O6MQD6OU-Cd47ZV9E.js} +2 -2
- package/dist/{react-vega-BED0DjiB.js → react-vega-C4T9Rb_w.js} +12284 -12270
- package/dist/{requirementDiagram-BXWQKSXE-a_MxGvxe.js → requirementDiagram-BXWQKSXE-eJH6gLtX.js} +1 -1
- package/dist/{reveal-component-B1Wbl-hd.js → reveal-component-C0zVfY6v.js} +14 -14
- package/dist/{select-BButFi-d.js → select-2KOiReNY.js} +536 -457
- package/dist/{sequenceDiagram-WJ2MYXX4-CXFMnxGh.js → sequenceDiagram-WJ2MYXX4-DdfFEIrm.js} +1 -1
- package/dist/{spec-BwarBpUJ.js → spec-h69nC3SI.js} +41 -11
- package/dist/{stateDiagram-D77RDMKH-DQeA_CwI.js → stateDiagram-D77RDMKH-DkjDvip8.js} +2 -2
- package/dist/{stateDiagram-v2-MP3YSRHH-BxxQucm1.js → stateDiagram-v2-MP3YSRHH-DBHACnOo.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{swimlanes-42K2YHIH-Do6L-cYg.js → swimlanes-42K2YHIH-ogImlOmp.js} +1 -1
- package/dist/{swimlanesDiagram-VR7AAH4N-DUzPvSVU.js → swimlanesDiagram-VR7AAH4N-D6x-zsci.js} +2 -2
- package/dist/{swiper-component-DKntyn8p.js → swiper-component-BkCm-kLg.js} +2 -2
- package/dist/{time-BieKwdYS.js → time-BaMbJs4z.js} +18 -18
- package/dist/{timeline-definition-24CTP7MA-D3c46WM5.js → timeline-definition-24CTP7MA-DQpLtsHD.js} +1 -1
- package/dist/{toDate-UtiwmnH2.js → toDate-CDzoofJo.js} +37 -36
- package/dist/{toast-B9UMEi8u.js → toast-B5t9o6s_.js} +219 -201
- package/dist/{tooltip-BO1REbqs.js → tooltip-s4zZxwKe.js} +325 -301
- package/dist/{use-restore-focus-BEM7sFWl.js → use-restore-focus-BgDTd2tc.js} +1482 -1433
- package/dist/{useAsyncData-Deh5kszT.js → useAsyncData-Bn8SxUqM.js} +15 -14
- package/dist/{useDateFormatter-D8XruNGG.js → useDateFormatter-D3Tkfzej.js} +2 -2
- package/dist/{useDeepCompareMemoize-DXwzRINI.js → useDeepCompareMemoize-CC2tnPCk.js} +1 -1
- package/dist/{useIframeCapabilities-DBETvvPl.js → useIframeCapabilities-CSdWn6NP.js} +1 -1
- package/dist/{useLifecycle-j7D9uD1o.js → useLifecycle-BJlxHqWa.js} +28 -25
- package/dist/{useTheme-CRnjkku0.js → useTheme-DMfQYmlG.js} +301 -297
- package/dist/{vega-component-BeF9dfyO.js → vega-component-CovWHi60.js} +148 -148
- package/dist/{vega-embed-container-BNHE18G9.js → vega-embed-container--LYZqguO.js} +2 -2
- package/dist/{vega-loader.browser-DNST6uVf.js → vega-loader.browser-B9Pz0EGP.js} +298 -507
- package/dist/{vennDiagram-4TSXK5OY-BSZD8JcZ.js → vennDiagram-4TSXK5OY-BD-SL_vq.js} +1 -1
- package/dist/{wardleyDiagram-VM6X3IG4-48cUWkfA.js → wardleyDiagram-VM6X3IG4-BDgJV4ah.js} +1 -1
- package/dist/{xychartDiagram-S5SC5T6Z-CswYgYeu.js → xychartDiagram-S5SC5T6Z-1hIHN6Rl.js} +2 -2
- package/package.json +16 -16
- package/src/__mocks__/document.tsx +54 -0
- package/src/__mocks__/notebook.ts +2 -1
- package/src/__mocks__/requests.ts +0 -3
- package/src/__tests__/module-entry.test.ts +44 -0
- package/src/__tests__/mount.test.ts +1 -21
- package/src/__tests__/{host-imports.test.ts → replica-imports.test.ts} +12 -11
- package/src/components/ai/__tests__/ai-model-dropdown.test.tsx +63 -0
- package/src/components/ai/ai-model-dropdown.tsx +11 -6
- package/src/components/app-config/ai-config.tsx +7 -2
- package/src/components/app-config/user-config-form.tsx +35 -0
- package/src/components/chat/__tests__/message-queue.test.tsx +17 -0
- package/src/components/chat/acp/__tests__/session-tabs.test.tsx +43 -0
- package/src/components/chat/acp/__tests__/state.test.ts +2 -2
- package/src/components/chat/acp/blocks.tsx +3 -2
- package/src/components/chat/acp/session-tabs.tsx +8 -3
- package/src/components/chat/chat-components.tsx +2 -0
- package/src/components/chat/chat-panel.tsx +12 -11
- package/src/components/chat/chat-utils.ts +4 -8
- package/src/components/data-table/TableBottomBar.tsx +4 -1
- package/src/components/data-table/TableTopBar.tsx +2 -0
- package/src/components/data-table/__tests__/chart-spec-model.test.ts +195 -195
- package/src/components/data-table/__tests__/column-explorer.test.tsx +27 -1
- package/src/components/data-table/__tests__/columns.test.tsx +105 -0
- package/src/components/data-table/__tests__/context-menu-interaction.test.tsx +130 -0
- package/src/components/data-table/__tests__/data-table.test.tsx +1 -0
- package/src/components/data-table/__tests__/date-popover.test.tsx +72 -0
- package/src/components/data-table/__tests__/export-actions.test.tsx +105 -0
- package/src/components/data-table/__tests__/keyboard-selection.test.tsx +188 -0
- package/src/components/data-table/__tests__/pagination.test.tsx +28 -1
- package/src/components/data-table/__tests__/search-highlight.test.tsx +109 -0
- package/src/components/data-table/__tests__/url-detector.test.tsx +74 -0
- package/src/components/data-table/cell-selection/feature.ts +2 -2
- package/src/components/data-table/cell-selection/types.ts +2 -2
- package/src/components/data-table/charts/__tests__/chart-panel.test.tsx +74 -1
- package/src/components/data-table/charts/__tests__/spec-snapshot.test.ts +20 -20
- package/src/components/data-table/charts/__tests__/spec.test.ts +78 -52
- package/src/components/data-table/charts/__tests__/storage.test.ts +4 -1
- package/src/components/data-table/charts/chart-spec/spec.ts +68 -43
- package/src/components/data-table/charts/charts.tsx +40 -30
- package/src/components/data-table/charts/storage.ts +16 -5
- package/src/components/data-table/column-explorer-panel/column-explorer.tsx +1 -1
- package/src/components/data-table/column-summary/chart-spec-model.tsx +23 -16
- package/src/components/data-table/column-summary/column-summary.tsx +2 -4
- package/src/components/data-table/column-visibility-dropdown.tsx +8 -13
- package/src/components/data-table/columns.tsx +45 -46
- package/src/components/data-table/context-menu.tsx +36 -20
- package/src/components/data-table/data-table.tsx +17 -1
- package/src/components/data-table/date-popover.tsx +6 -4
- package/src/components/data-table/export-actions.tsx +76 -48
- package/src/components/data-table/pagination.tsx +44 -33
- package/src/components/data-table/range-focus/atoms.ts +4 -6
- package/src/components/data-table/range-focus/use-cell-range-selection.ts +65 -38
- package/src/components/data-table/range-focus/use-scroll-into-view.ts +21 -2
- package/src/components/data-table/renderers.tsx +16 -7
- package/src/components/data-table/row-viewer-panel/__tests__/row-viewer.test.tsx +24 -1
- package/src/components/data-table/row-viewer-panel/row-viewer.tsx +4 -4
- package/src/components/data-table/search-highlight.tsx +79 -0
- package/src/components/data-table/types.ts +1 -0
- package/src/components/data-table/url-detector.tsx +49 -9
- package/src/components/datasources/__tests__/column-actions.test.tsx +97 -0
- package/src/components/datasources/__tests__/column-preview.test.tsx +96 -5
- package/src/components/datasources/__tests__/datasources-interactions.test.tsx +181 -0
- package/src/components/datasources/__tests__/table-list.test.tsx +118 -0
- package/src/components/datasources/__tests__/utils.test.ts +57 -6
- package/src/components/datasources/column-preview.tsx +17 -12
- package/src/components/datasources/datasources.tsx +55 -42
- package/src/components/datasources/utils.ts +32 -23
- package/src/components/debugger/debugger-code.tsx +5 -0
- package/src/components/dependency-graph/dependency-graph-tree.tsx +8 -8
- package/src/components/dependency-graph/elements.ts +24 -21
- package/src/components/dependency-graph/minimap-content.tsx +2 -6
- package/src/components/dependency-graph/panels.tsx +4 -2
- package/src/components/dependency-graph/utils/__tests__/layout.test.ts +18 -11
- package/src/components/editor/SortableCell.tsx +1 -3
- package/src/components/editor/__tests__/Output.test.tsx +50 -32
- package/src/{core/attachments/__tests__/toast.test.tsx → components/editor/__tests__/agent-toast.test.tsx} +1 -1
- package/src/components/editor/__tests__/data-attributes.test.tsx +28 -13
- package/src/components/editor/__tests__/dynamic-favicon.test.tsx +111 -18
- package/src/components/editor/__tests__/output-persistence.test.tsx +6 -1
- package/src/components/editor/__tests__/package-alert.test.tsx +22 -1
- package/src/components/editor/actions/__tests__/name-cell-input.test.tsx +69 -0
- package/src/components/editor/actions/__tests__/pair-with-agent-modal.test.tsx +34 -8
- package/src/components/editor/actions/__tests__/pair-with-agent.test.tsx +2 -6
- package/src/components/editor/actions/name-cell-input.tsx +4 -3
- package/src/components/editor/actions/pair-with-agent-commands.ts +2 -2
- package/src/components/editor/actions/pair-with-agent-modal.tsx +19 -16
- package/src/components/editor/actions/useCellActionButton.tsx +20 -26
- package/src/components/editor/actions/useNotebookActions.tsx +14 -19
- package/src/components/editor/actions/useRestartKernel.tsx +1 -1
- package/src/components/editor/actions/useSetCodeVisibility.ts +10 -11
- package/src/components/editor/actions/useSetOutputsExpanded.ts +13 -18
- package/src/components/editor/ai/add-cell-with-ai.tsx +3 -3
- package/src/components/editor/ai/ai-completion-editor.tsx +1 -0
- package/src/components/editor/alerts/__tests__/connection-notice.test.tsx +1 -1
- package/src/components/editor/alerts/connection-notice.tsx +1 -1
- package/src/components/editor/alerts/startup-logs-alert.tsx +1 -0
- package/src/components/editor/app-container.tsx +1 -1
- package/src/components/editor/boundary/__tests__/ErrorBoundary.test.tsx +1 -1
- package/src/components/editor/cell/CreateCellButton.tsx +15 -21
- package/src/components/editor/cell/DeleteButton.tsx +3 -2
- package/src/components/editor/cell/RunButton.tsx +2 -2
- package/src/components/editor/cell/StagedAICell.tsx +10 -2
- package/src/components/editor/cell/StopButton.tsx +2 -2
- package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +3 -1
- package/src/components/editor/cell/__tests__/useShouldShowInterrupt.test.ts +39 -0
- package/src/components/editor/cell/code/__tests__/language-toggle.test.tsx +54 -0
- package/src/components/editor/cell/code/cell-editor.tsx +22 -36
- package/src/components/editor/cell/code/language-toggle.tsx +8 -7
- package/src/components/editor/cell/collapse.tsx +5 -3
- package/src/components/editor/cell/useAddCell.ts +4 -8
- package/src/components/editor/cell/useDeleteCell.tsx +10 -36
- package/src/components/editor/cell/useRunCells.ts +2 -5
- package/src/components/editor/cell/useShouldShowInterrupt.ts +2 -12
- package/src/components/editor/cell/useSplitCell.tsx +2 -1
- package/src/components/editor/chrome/components/__tests__/feedback-button.test.tsx +1 -1
- package/src/components/editor/chrome/components/feedback-button.tsx +1 -1
- package/src/components/editor/chrome/panels/__tests__/packages-panel.test.tsx +31 -2
- package/src/components/editor/chrome/panels/__tests__/runtime-details.test.tsx +1 -1
- package/src/components/editor/chrome/panels/__tests__/sandbox-recovery.test.tsx +1 -1
- package/src/components/editor/chrome/panels/cache-panel.tsx +1 -0
- package/src/components/editor/chrome/panels/logs-panel.tsx +2 -1
- package/src/components/editor/chrome/panels/outline/__tests__/outline-keyboard.test.tsx +84 -0
- package/src/components/editor/chrome/panels/outline/floating-outline.tsx +39 -14
- package/src/components/editor/chrome/panels/outline/useActiveOutline.tsx +3 -2
- package/src/components/editor/chrome/panels/packages-panel.tsx +4 -7
- package/src/components/editor/chrome/panels/secrets-panel.tsx +1 -0
- package/src/components/editor/chrome/panels/snippets-panel.tsx +10 -12
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +9 -18
- package/src/components/editor/chrome/wrapper/__tests__/document-sync-status.test.tsx +92 -0
- package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +61 -2
- package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +4 -4
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/document-sync-status.tsx +54 -0
- package/src/components/editor/chrome/wrapper/footer-items/lsp-status.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +1 -1
- package/src/components/editor/chrome/wrapper/footer-items/runtime-settings.tsx +1 -7
- package/src/components/editor/chrome/wrapper/footer.tsx +2 -0
- package/src/components/editor/chrome/wrapper/pending-ai-cells.tsx +12 -2
- package/src/components/editor/chrome/wrapper/storage.ts +1 -1
- package/src/components/editor/columns/sortable-column.tsx +1 -1
- package/src/components/editor/connections/components.tsx +5 -10
- package/src/components/editor/controls/Controls.tsx +3 -3
- package/src/components/editor/controls/__tests__/command-palette.test.tsx +53 -0
- package/src/components/editor/controls/__tests__/keyboard-shortcuts.test.tsx +61 -0
- package/src/components/editor/controls/__tests__/notebook-menu-dropdown.test.tsx +10 -4
- package/src/components/editor/controls/command-palette.tsx +22 -10
- package/src/components/editor/controls/keyboard-shortcuts.tsx +14 -5
- package/src/components/editor/documentation.css +34 -11
- package/src/components/editor/dynamic-favicon.tsx +21 -40
- package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +9 -23
- package/src/components/editor/errors/auto-fix.tsx +4 -8
- package/src/components/editor/errors/send-error-report-button.tsx +3 -6
- package/src/components/editor/file-tree/__tests__/file-explorer-interactions.test.tsx +6 -0
- package/src/components/editor/file-tree/__tests__/file-explorer-navigation.test.tsx +47 -0
- package/src/components/editor/file-tree/__tests__/use-file-search.test.tsx +91 -0
- package/src/components/editor/file-tree/file-explorer.tsx +48 -15
- package/src/components/editor/file-tree/file-name-input.tsx +1 -0
- package/src/components/editor/file-tree/file-viewer.tsx +4 -2
- package/src/components/editor/file-tree/use-file-search.ts +35 -21
- package/src/components/editor/header/__tests__/status.test.tsx +5 -3
- package/src/components/editor/header/app-header.tsx +1 -1
- package/src/components/editor/header/status.tsx +40 -20
- package/src/components/editor/links/__tests__/cell-link.test.tsx +148 -0
- package/src/components/editor/links/cell-link.tsx +16 -6
- package/src/components/editor/navigation/__tests__/clipboard.test.ts +60 -38
- package/src/components/editor/navigation/__tests__/navigation.test.ts +73 -64
- package/src/components/editor/navigation/clipboard.ts +12 -11
- package/src/components/editor/navigation/focus-utils.ts +4 -4
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +11 -20
- package/src/components/editor/navigation/navigation.ts +20 -28
- package/src/components/editor/notebook-banner.tsx +1 -0
- package/src/components/editor/notebook-cell.tsx +19 -13
- package/src/components/editor/output/MarimoErrorOutput.tsx +2 -1
- package/src/components/editor/output/MarimoTracebackOutput.tsx +19 -17
- package/src/components/editor/output/Outputs.css +8 -0
- package/src/components/editor/output/__tests__/traceback.test.tsx +27 -1
- package/src/components/editor/output/ansi-reduce.ts +33 -20
- package/src/components/editor/output/console/ConsoleOutput.tsx +19 -25
- package/src/components/editor/output/console/__tests__/ConsoleOutput.test.tsx +125 -69
- package/src/components/editor/package-alert.tsx +14 -7
- package/src/components/editor/renderers/cell-array.tsx +10 -17
- package/src/components/editor/renderers/grid-layout/grid-layout.tsx +12 -6
- package/src/components/editor/renderers/vertical-layout/sidebar/toggle.tsx +7 -1
- package/src/components/home/components.tsx +17 -31
- package/src/components/icons/__tests__/large-spinner.test.tsx +39 -0
- package/src/components/icons/large-spinner.tsx +3 -14
- package/src/components/icons/spinner.tsx +1 -1
- package/src/components/markdown/markdown-renderer.tsx +4 -8
- package/src/components/mcp/mcp-status-indicator.tsx +1 -1
- package/src/components/pages/__tests__/home-page.test.tsx +116 -0
- package/src/components/pages/edit-page.tsx +32 -17
- package/src/components/pages/home-page.tsx +164 -91
- package/src/components/scratchpad/scratchpad.test.tsx +97 -0
- package/src/components/scratchpad/scratchpad.tsx +20 -10
- package/src/components/slides/__tests__/minimap-actions.test.tsx +9 -25
- package/src/components/slides/minimap.tsx +7 -3
- package/src/components/slides/reveal-component.tsx +4 -2
- package/src/components/slides/slide-cell-view.tsx +4 -4
- package/src/components/slides/slide-form.tsx +1 -0
- package/src/components/sort/SortableCellsProvider.tsx +2 -1
- package/src/components/tracing/tracing-keyboard.test.tsx +85 -0
- package/src/components/tracing/tracing.tsx +45 -41
- package/src/components/ui/__tests__/draggable-popover.test.tsx +24 -0
- package/src/components/ui/__tests__/range-slider.test.tsx +165 -0
- package/src/components/ui/alert-dialog.tsx +1 -1
- package/src/components/ui/draggable-popover.tsx +24 -2
- package/src/components/ui/range-slider.tsx +22 -9
- package/src/core/ai/__tests__/staged-cells.test.ts +26 -25
- package/src/core/ai/context/providers/datasource.ts +6 -2
- package/src/core/ai/staged-cells.ts +15 -18
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +5 -17
- package/src/core/ai/tools/__tests__/run-cells-tool.test.ts +2 -2
- package/src/core/ai/tools/base.ts +18 -9
- package/src/core/ai/tools/edit-notebook-tool.ts +74 -69
- package/src/core/ai/tools/registry.ts +13 -8
- package/src/core/ai/tools/sample-tool.ts +6 -7
- package/src/core/cells/__tests__/__snapshots__/cells.test.ts.snap +4 -0
- package/src/core/cells/__tests__/actions.test.ts +474 -34
- package/src/core/cells/__tests__/add-missing-import.test.ts +7 -8
- package/src/core/cells/__tests__/cell.test.ts +39 -0
- package/src/core/cells/__tests__/cells.test.ts +260 -1165
- package/src/core/cells/__tests__/collapseConsoleOutputs.test.ts +54 -0
- package/src/core/cells/__tests__/document.test.ts +414 -0
- package/src/core/cells/__tests__/flush-document.test.ts +40 -0
- package/src/core/cells/__tests__/notebook-outline.test.ts +114 -0
- package/src/core/cells/__tests__/outputs.test.tsx +71 -53
- package/src/core/cells/__tests__/session.test.ts +117 -36
- package/src/core/cells/__tests__/with-document-save.test.ts +67 -0
- package/src/core/cells/actions.ts +391 -3
- package/src/core/cells/add-missing-import.ts +46 -42
- package/src/core/cells/cell.ts +14 -3
- package/src/core/cells/cells.ts +99 -599
- package/src/core/cells/columns.ts +38 -0
- package/src/core/cells/document.ts +392 -0
- package/src/core/cells/outputs.ts +12 -28
- package/src/core/cells/pending-delete-service.ts +2 -6
- package/src/core/cells/session.ts +1 -1
- package/src/core/cells/types.ts +22 -1
- package/src/core/codemirror/__tests__/setup.test.ts +29 -29
- package/src/core/codemirror/ai/__tests__/resources.test.ts +117 -0
- package/src/core/codemirror/ai/resources.ts +1 -1
- package/src/core/codemirror/cells/__tests__/extensions.test.ts +42 -1
- package/src/core/codemirror/cells/extensions.ts +27 -9
- package/src/core/codemirror/cells/state.ts +1 -1
- package/src/core/codemirror/format.ts +6 -5
- package/src/core/codemirror/keymaps/vim.ts +4 -8
- package/src/core/codemirror/language/__tests__/sql.test.ts +22 -20
- package/src/core/codemirror/language/__tests__/utils.test.ts +187 -15
- package/src/core/codemirror/language/cell-code.ts +114 -0
- package/src/core/codemirror/language/extension.ts +52 -35
- package/src/core/codemirror/language/languages/markdown.ts +8 -6
- package/src/core/codemirror/language/languages/python.ts +16 -10
- package/src/core/codemirror/language/languages/sql/sql.ts +16 -24
- package/src/core/codemirror/language/panel/panel.tsx +1 -0
- package/src/core/codemirror/language/types.ts +7 -7
- package/src/core/codemirror/language/utils.ts +9 -39
- package/src/core/codemirror/lsp/notebook-lsp.ts +6 -5
- package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
- package/src/core/codemirror/readonly/extension.ts +2 -2
- package/src/core/codemirror/rtc/extension.ts +24 -13
- package/src/core/codemirror/rtc/loro/awareness.ts +34 -19
- package/src/core/codemirror/rtc/loro/sync.ts +1 -0
- package/src/core/codemirror/utils.ts +1 -0
- package/src/core/config/__tests__/config-schema.test.ts +5 -3
- package/src/core/config/config-schema.ts +3 -0
- package/src/core/datasets/__tests__/data-source-discovery.test.ts +5 -5
- package/src/core/datasets/data-source-discovery.ts +4 -6
- package/src/core/edit-app.tsx +19 -23
- package/src/core/errors/error-entries.ts +3 -0
- package/src/core/export/hooks.ts +1 -1
- package/src/core/export/layout.ts +2 -2
- package/src/core/hotkeys/actions.ts +2 -4
- package/src/core/islands/__tests__/bootstrap.test.ts +73 -43
- package/src/core/islands/__tests__/bridge.test.ts +72 -25
- package/src/core/islands/bootstrap.ts +46 -53
- package/src/core/islands/bridge.ts +74 -23
- package/src/core/islands/components/__tests__/IslandControls.test.tsx +7 -5
- package/src/core/islands/worker/__tests__/controller.test.ts +62 -4
- package/src/core/islands/worker/controller.ts +4 -10
- package/src/core/islands/worker/worker.tsx +33 -33
- package/src/core/kernel/__tests__/RuntimeState.test.ts +1 -1
- package/src/core/kernel/__tests__/handlers.test.ts +7 -153
- package/src/core/kernel/handlers.ts +18 -59
- package/src/core/network/__tests__/connection.test.ts +1 -1
- package/src/core/network/__tests__/requests-lazy.test.ts +1 -3
- package/src/core/network/connection-notice.ts +1 -1
- package/src/core/network/connection.ts +1 -1
- package/src/core/network/requests-lazy.ts +1 -4
- package/src/core/network/requests-network.ts +0 -25
- package/src/core/network/requests-static.ts +0 -3
- package/src/core/network/requests-toasting.tsx +0 -3
- package/src/core/network/types.ts +0 -12
- package/src/core/network/useConnectionNotice.ts +8 -2
- package/src/core/notebook/attachments.ts +38 -0
- package/src/core/notebook/document/__tests__/codemirror.test.ts +552 -0
- package/src/core/notebook/document/__tests__/draft.test.ts +363 -0
- package/src/core/notebook/document/__tests__/fixtures.ts +92 -0
- package/src/core/notebook/document/__tests__/hold.test.ts +88 -0
- package/src/core/notebook/document/__tests__/hooks.test.tsx +391 -0
- package/src/core/notebook/document/__tests__/lifecycle-scenarios.test.ts +61 -0
- package/src/core/notebook/document/__tests__/model.test.ts +247 -0
- package/src/core/notebook/document/__tests__/protocol-fixtures.ts +38 -0
- package/src/core/notebook/document/__tests__/recovery-scenarios.test.ts +230 -0
- package/src/core/notebook/document/__tests__/scenario-fixture.ts +43 -0
- package/src/core/notebook/document/__tests__/scenarios.test.ts +205 -0
- package/src/core/notebook/document/__tests__/state.test.ts +459 -0
- package/src/core/notebook/document/__tests__/submission.test.ts +203 -0
- package/src/core/notebook/document/__tests__/test-host.test.ts +92 -0
- package/src/core/notebook/document/__tests__/test-host.ts +247 -0
- package/src/core/notebook/document/__tests__/test-notebook.ts +149 -0
- package/src/core/notebook/document/__tests__/user.ts +61 -0
- package/src/core/notebook/document/codemirror.ts +216 -0
- package/src/core/notebook/document/draft.ts +502 -0
- package/src/core/notebook/document/hooks.tsx +118 -0
- package/src/core/notebook/document/index.ts +24 -0
- package/src/core/notebook/document/model.ts +105 -0
- package/src/core/notebook/document/select.ts +41 -0
- package/src/core/notebook/document/state.ts +378 -0
- package/src/core/notebook/document/sync.ts +418 -0
- package/src/core/notebook/index.ts +18 -0
- package/src/core/notebook/replica/AGENTS.md +11 -0
- package/src/core/notebook/replica/__tests__/attachments.test.ts +56 -0
- package/src/core/notebook/replica/__tests__/document.test.ts +126 -0
- package/src/core/notebook/replica/__tests__/fixtures.ts +79 -0
- package/src/core/notebook/replica/__tests__/replica.test.ts +550 -0
- package/src/core/notebook/replica/backend.ts +19 -0
- package/src/core/notebook/replica/connection.ts +42 -0
- package/src/core/notebook/replica/index.ts +13 -0
- package/src/core/notebook/replica/replica.ts +286 -0
- package/src/core/notebook/replica/resources/attachments.ts +22 -0
- package/src/core/notebook/replica/resources/document.ts +101 -0
- package/src/core/packages/__tests__/useSandboxController.test.tsx +1 -1
- package/src/core/packages/useSandboxController.ts +1 -1
- package/src/core/run-app.tsx +48 -51
- package/src/core/runtime/__tests__/adapter.test.ts +1 -1
- package/src/core/runtime/__tests__/createWsUrl.test.ts +77 -7
- package/src/core/runtime/__tests__/runtime.test.ts +32 -58
- package/src/core/runtime/adapter.ts +1 -1
- package/src/core/runtime/config.ts +2 -2
- package/src/core/runtime/runtime.ts +38 -42
- package/src/core/runtime/types.ts +0 -2
- package/src/core/saving/filename.ts +1 -1
- package/src/core/saving/save-component.tsx +10 -4
- package/src/core/saving/useAutoSave.ts +1 -1
- package/src/core/session/__tests__/backend.test.ts +235 -0
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +183 -0
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +663 -0
- package/src/core/session/active-notebook.ts +11 -0
- package/src/core/session/backend.ts +125 -0
- package/src/core/{websocket → session}/types.ts +2 -2
- package/src/core/session/useNotebookReplica.ts +72 -0
- package/src/core/{websocket → session}/useNotebookSession.tsx +74 -68
- package/src/core/state/__tests__/jotai.test.tsx +108 -0
- package/src/core/state/jotai.ts +1 -1
- package/src/core/static/__tests__/files.test.ts +38 -10
- package/src/core/static/files.ts +2 -0
- package/src/core/{websocket → transports}/__tests__/connection-state.test.ts +1 -13
- package/src/core/transports/__tests__/server.test.ts +408 -0
- package/src/core/transports/__tests__/static.test.ts +175 -0
- package/src/core/transports/__tests__/wasm.test.ts +166 -0
- package/src/core/{websocket → transports}/connection-state.ts +9 -16
- package/src/core/transports/server.ts +152 -0
- package/src/core/transports/static.ts +84 -0
- package/src/core/transports/wasm.ts +97 -0
- package/src/core/wasm/__tests__/bridge.test.ts +213 -50
- package/src/core/wasm/__tests__/worker.test.ts +187 -0
- package/src/core/wasm/bridge.ts +75 -69
- package/src/core/wasm/rpc.ts +15 -3
- package/src/core/wasm/store.ts +3 -3
- package/src/core/wasm/worker/bootstrap.ts +55 -51
- package/src/core/wasm/worker/getMarimoWheel.ts +1 -1
- package/src/core/wasm/worker/save-worker.ts +9 -10
- package/src/core/wasm/worker/types.ts +29 -18
- package/src/core/wasm/worker/worker.ts +88 -44
- package/src/css/globals.css +66 -22
- package/src/hooks/__tests__/useAsyncData.test.tsx +148 -0
- package/src/hooks/__tests__/useDebounce.test.tsx +51 -0
- package/src/hooks/__tests__/useDeepCompareMemoize.test.tsx +39 -0
- package/src/hooks/__tests__/useDelayElapsed.test.tsx +28 -0
- package/src/hooks/__tests__/useInternalStateWithSync.test.tsx +20 -0
- package/src/hooks/__tests__/useScript.test.tsx +77 -0
- package/src/hooks/__tests__/useStateForKey.test.tsx +257 -0
- package/src/hooks/useAsyncData.ts +3 -3
- package/src/hooks/useDataSourceDiscovery.ts +6 -4
- package/src/hooks/useDebounce.ts +6 -10
- package/src/hooks/useDeepCompareMemoize.ts +1 -1
- package/src/hooks/useDelayElapsed.ts +14 -10
- package/src/hooks/useElapsedTime.ts +3 -3
- package/src/hooks/useEventListener.ts +1 -2
- package/src/hooks/useInputHistory.ts +4 -7
- package/src/hooks/useInternalStateWithSync.ts +6 -6
- package/src/hooks/useResizeObserver.ts +4 -7
- package/src/hooks/useScript.ts +67 -70
- package/src/hooks/useStateForKey.ts +93 -0
- package/src/mount.tsx +1 -5
- package/src/plugins/__tests__/plugin-object-schemas.test.ts +104 -0
- package/src/plugins/core/registerReactComponent.tsx +1 -1
- package/src/plugins/impl/CodeEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataEditorPlugin.tsx +1 -1
- package/src/plugins/impl/DataTablePlugin.tsx +69 -37
- package/src/plugins/impl/DropdownPlugin.tsx +2 -6
- package/src/plugins/impl/FileBrowserPlugin.tsx +4 -16
- package/src/plugins/impl/FormPlugin.tsx +1 -1
- package/src/plugins/impl/RangeSliderPlugin.tsx +16 -2
- package/src/plugins/impl/RefreshPlugin.tsx +1 -0
- package/src/plugins/impl/SliderPlugin.tsx +6 -8
- package/src/plugins/impl/__tests__/DataTablePlugin.test.tsx +387 -1
- package/src/plugins/impl/__tests__/FileBrowserPlugin.test.tsx +45 -0
- package/src/plugins/impl/__tests__/RangeSliderPlugin.test.tsx +109 -0
- package/src/plugins/impl/__tests__/SliderPlugin.test.tsx +24 -3
- package/src/plugins/impl/anywidget/__tests__/registry.test.ts +153 -0
- package/src/plugins/impl/anywidget/__tests__/widget-binding.test.ts +241 -2
- package/src/plugins/impl/anywidget/model.ts +3 -1
- package/src/plugins/impl/anywidget/registry.ts +18 -14
- package/src/plugins/impl/anywidget/runtime.ts +21 -9
- package/src/plugins/impl/anywidget/widget-binding.ts +160 -82
- package/src/plugins/impl/chat/__tests__/chat-prompts.test.tsx +93 -0
- package/src/plugins/impl/chat/chat-ui.tsx +14 -11
- package/src/plugins/impl/code/any-language-editor.tsx +2 -2
- package/src/plugins/impl/data-editor/glide-data-editor.tsx +8 -5
- package/src/plugins/impl/data-editor/glide-utils.ts +3 -1
- package/src/plugins/impl/data-explorer/ConnectedDataExplorerComponent.tsx +1 -1
- package/src/plugins/impl/data-explorer/components/column-summary.tsx +4 -2
- package/src/plugins/impl/data-explorer/state/reducer.ts +1 -1
- package/src/plugins/impl/data-frames/DataFramePlugin.tsx +1 -2
- package/src/plugins/impl/data-frames/__tests__/sidebar.test.tsx +160 -0
- package/src/plugins/impl/data-frames/forms/__tests__/__snapshots__/form.test.tsx.snap +66 -66
- package/src/plugins/impl/data-frames/panel.tsx +43 -16
- package/src/plugins/impl/mpl-interactive/MplInteractivePlugin.tsx +5 -3
- package/src/plugins/impl/panel/PanelPlugin.tsx +16 -17
- package/src/plugins/impl/panel/__tests__/utils.test.ts +39 -1
- package/src/plugins/impl/panel/utils.ts +17 -0
- package/src/plugins/impl/plotly/PlotlyPlugin.tsx +2 -5
- package/src/plugins/impl/plotly/selection.ts +25 -19
- package/src/plugins/impl/vega/VegaPlugin.tsx +2 -3
- package/src/plugins/impl/vega/make-selectable.ts +4 -7
- package/src/plugins/layout/RoutesPlugin.tsx +1 -1
- package/src/stories/__tests__/editor-story.test.tsx +33 -0
- package/src/stories/button.stories.tsx +1 -0
- package/src/stories/cell.stories.tsx +1 -1
- package/src/stories/data-table.stories.tsx +31 -0
- package/src/stories/editor.stories.tsx +24 -17
- package/src/stories/form-wrapper.stories.tsx +2 -2
- package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
- package/src/stories/runtime-story.tsx +23 -16
- package/src/stories/select.stories.tsx +2 -2
- package/src/stories/switchable-multi-select.stories.tsx +1 -1
- package/src/utils/__tests__/arrays.test.ts +35 -0
- package/src/utils/__tests__/batch-requests.test.ts +3 -3
- package/src/utils/__tests__/{createReducer.test.ts → createReducer.test.tsx} +29 -0
- package/src/utils/__tests__/numbers.test.ts +105 -1
- package/src/utils/__tests__/objects.test.ts +21 -0
- package/src/utils/arrays.ts +11 -2
- package/src/utils/blob.ts +1 -1
- package/src/utils/createReducer.ts +53 -26
- package/src/utils/maps.ts +0 -3
- package/src/utils/numbers.ts +79 -18
- package/src/utils/objects.ts +4 -9
- package/src/utils/once.ts +19 -19
- package/src/utils/tracer.ts +9 -5
- package/src/utils/zod-utils.ts +1 -3
- package/dist/any-language-editor-DZ_YTVus.js +0 -76
- package/dist/assets/__vite-browser-external-BXYkiFsk.js +0 -1
- package/dist/assets/worker-HPY9fbhz.js +0 -114
- package/dist/mermaid-HWGCJPDP-ByCsZnYF.js +0 -2
- package/dist/precisionRound-DMIVQrt2.js +0 -97
- package/src/core/attachments/state.ts +0 -21
- package/src/core/cells/__tests__/apply-transaction.test.ts +0 -991
- package/src/core/cells/__tests__/document-changes.test.ts +0 -1140
- package/src/core/cells/__tests__/document-roundtrip.test.ts +0 -392
- package/src/core/cells/document-changes.ts +0 -944
- package/src/core/host/AGENTS.md +0 -6
- package/src/core/host/__tests__/events.test.ts +0 -46
- package/src/core/host/__tests__/notebook-client.test.ts +0 -191
- package/src/core/host/__tests__/protocol.test.ts +0 -214
- package/src/core/host/connection.ts +0 -81
- package/src/core/host/events.ts +0 -60
- package/src/core/host/notebook-client.ts +0 -226
- package/src/core/host/protocol.ts +0 -1943
- package/src/core/state/__tests__/jotai.test.ts +0 -25
- package/src/core/wasm/worker/message-buffer.ts +0 -33
- package/src/core/websocket/__tests__/createConnectionTransport.test.ts +0 -49
- package/src/core/websocket/__tests__/useNotebookClient.hook.test.tsx +0 -140
- package/src/core/websocket/__tests__/useNotebookSession.hook.test.tsx +0 -883
- package/src/core/websocket/transports/__tests__/basic.test.ts +0 -275
- package/src/core/websocket/transports/__tests__/sse.test.ts +0 -335
- package/src/core/websocket/transports/__tests__/transport.test.ts +0 -308
- package/src/core/websocket/transports/__tests__/ws.test.ts +0 -125
- package/src/core/websocket/transports/basic.ts +0 -102
- package/src/core/websocket/transports/create.ts +0 -31
- package/src/core/websocket/transports/sse.ts +0 -308
- package/src/core/websocket/transports/transport.ts +0 -50
- package/src/core/websocket/transports/ws.ts +0 -98
- package/src/core/websocket/useNotebookClient.ts +0 -80
- /package/src/{core/attachments/toast.ts → components/editor/agent-toast.ts} +0 -0
- /package/src/core/{websocket → session}/connection-utils.ts +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as e, t } from "./rolldown-runtime-Cb76FRpK.js";
|
|
2
|
-
import { g as n, h as r, p as i, r as a, t as o, u as s } from "./button-
|
|
2
|
+
import { g as n, h as r, p as i, r as a, t as o, u as s } from "./button-BQRdqQi1.js";
|
|
3
3
|
import { t as c } from "./react-sHtZdjeP.js";
|
|
4
4
|
import { t as l } from "./compiler-runtime-CldRdSsv.js";
|
|
5
|
-
import { n as u, t as d } from "./copy-icon-
|
|
6
|
-
import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-
|
|
7
|
-
import { c as _,
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { m as
|
|
12
|
-
import { t as
|
|
13
|
-
import { Ct as je,
|
|
14
|
-
import { A as Ge,
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
5
|
+
import { n as u, t as d } from "./copy-icon-De584pZ4.js";
|
|
6
|
+
import { a as f, c as p, l as m, s as h, t as g } from "./chunk-YOKDWASO-DKplTrBY.js";
|
|
7
|
+
import { c as _, l as v, m as y, s as b, t as x, u as ee } from "./tooltip-s4zZxwKe.js";
|
|
8
|
+
import { A as te, Ct as ne, Dt as re, F as ie, It as ae, O as oe, St as se, Tt as ce, U as le, W as ue, Z as de, a as fe, d as pe, en as me, ht as he, j as ge, ot as _e, rn as ve, rt as ye, wt as be, xt as xe } from "./error-entries-mpoD5t79.js";
|
|
9
|
+
import { D as Se, M as Ce, k as we } from "./select-2KOiReNY.js";
|
|
10
|
+
import { J as Te, pt as Ee } from "./dropdown-menu-DCMbbQ35.js";
|
|
11
|
+
import { m as De, y as Oe } from "./toDate-CDzoofJo.js";
|
|
12
|
+
import { t as ke } from "./jsx-runtime-3BD1kT0s.js";
|
|
13
|
+
import { $ as Ae, Ct as S, Dt as je, Et as C, Ot as Me, Q as Ne, Tt as w, Y as Pe, _t as Fe, bt as Ie, dt as Le, ft as Re, gt as ze, ht as Be, kt as T, mt as Ve, tt as He, vt as Ue, wt as E, yt as We } from "./use-restore-focus-BgDTd2tc.js";
|
|
14
|
+
import { A as Ge, D as Ke, T as qe, _ as Je, b as Ye, c as Xe, n as Ze, w as D } from "./useTheme-DMfQYmlG.js";
|
|
15
|
+
import { G as Qe } from "./dist-BmS-ZGjl.js";
|
|
16
|
+
import { t as $e } from "./useAsyncData-Bn8SxUqM.js";
|
|
17
17
|
//#region ../node_modules/.pnpm/domelementtype@2.3.0/node_modules/domelementtype/lib/index.js
|
|
18
|
-
var
|
|
18
|
+
var et = /* @__PURE__ */ t(((e) => {
|
|
19
19
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.Doctype = e.CDATA = e.Tag = e.Style = e.Script = e.Comment = e.Directive = e.Text = e.Root = e.isTag = e.ElementType = void 0;
|
|
20
20
|
var t;
|
|
21
21
|
(function(e) {
|
|
@@ -25,7 +25,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
25
25
|
return e.type === t.Tag || e.type === t.Script || e.type === t.Style;
|
|
26
26
|
}
|
|
27
27
|
e.isTag = n, e.Root = t.Root, e.Text = t.Text, e.Directive = t.Directive, e.Comment = t.Comment, e.Script = t.Script, e.Style = t.Style, e.Tag = t.Tag, e.CDATA = t.CDATA, e.Doctype = t.Doctype;
|
|
28
|
-
})),
|
|
28
|
+
})), tt = /* @__PURE__ */ t(((e) => {
|
|
29
29
|
var t = e && e.__extends || (function() {
|
|
30
30
|
var e = function(t, n) {
|
|
31
31
|
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
@@ -49,7 +49,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
49
49
|
}, n.apply(this, arguments);
|
|
50
50
|
};
|
|
51
51
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.cloneNode = e.hasChildren = e.isDocument = e.isDirective = e.isComment = e.isText = e.isCDATA = e.isTag = e.Element = e.Document = e.CDATA = e.NodeWithChildren = e.ProcessingInstruction = e.Comment = e.Text = e.DataNode = e.Node = void 0;
|
|
52
|
-
var r =
|
|
52
|
+
var r = et(), i = function() {
|
|
53
53
|
function e() {
|
|
54
54
|
this.parent = null, this.prev = null, this.next = null, this.startIndex = null, this.endIndex = null;
|
|
55
55
|
}
|
|
@@ -308,7 +308,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
308
308
|
}), n = 1; n < t.length; n++) t[n].prev = t[n - 1], t[n - 1].next = t[n];
|
|
309
309
|
return t;
|
|
310
310
|
}
|
|
311
|
-
})),
|
|
311
|
+
})), nt = /* @__PURE__ */ t(((e) => {
|
|
312
312
|
var t = e && e.__createBinding || (Object.create ? (function(e, t, n, r) {
|
|
313
313
|
r === void 0 && (r = n);
|
|
314
314
|
var i = Object.getOwnPropertyDescriptor(t, n);
|
|
@@ -324,8 +324,8 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
324
324
|
for (var r in e) r !== "default" && !Object.prototype.hasOwnProperty.call(n, r) && t(n, e, r);
|
|
325
325
|
};
|
|
326
326
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.DomHandler = void 0;
|
|
327
|
-
var r =
|
|
328
|
-
n(
|
|
327
|
+
var r = et(), i = tt();
|
|
328
|
+
n(tt(), e);
|
|
329
329
|
var a = {
|
|
330
330
|
withStartIndices: !1,
|
|
331
331
|
withEndIndices: !1,
|
|
@@ -382,13 +382,13 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
382
382
|
}, e;
|
|
383
383
|
}();
|
|
384
384
|
e.DomHandler = o, e.default = o;
|
|
385
|
-
})),
|
|
385
|
+
})), rt = /* @__PURE__ */ t(((e) => {
|
|
386
386
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = e.CARRIAGE_RETURN_PLACEHOLDER = e.CARRIAGE_RETURN_REGEX = e.CARRIAGE_RETURN = e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES = void 0, e.CASE_SENSITIVE_TAG_NAMES = /* @__PURE__ */ "animateMotion.animateTransform.clipPath.feBlend.feColorMatrix.feComponentTransfer.feComposite.feConvolveMatrix.feDiffuseLighting.feDisplacementMap.feDropShadow.feFlood.feFuncA.feFuncB.feFuncG.feFuncR.feGaussianBlur.feImage.feMerge.feMergeNode.feMorphology.feOffset.fePointLight.feSpecularLighting.feSpotLight.feTile.feTurbulence.foreignObject.linearGradient.radialGradient.textPath".split("."), e.CASE_SENSITIVE_TAG_NAMES_MAP = e.CASE_SENSITIVE_TAG_NAMES.reduce(function(e, t) {
|
|
387
387
|
return e[t.toLowerCase()] = t, e;
|
|
388
388
|
}, {}), e.CARRIAGE_RETURN = "\r", e.CARRIAGE_RETURN_REGEX = new RegExp(e.CARRIAGE_RETURN, "g"), e.CARRIAGE_RETURN_PLACEHOLDER = `__HTML_DOM_PARSER_CARRIAGE_RETURN_PLACEHOLDER_${Date.now().toString()}__`, e.CARRIAGE_RETURN_PLACEHOLDER_REGEX = new RegExp(e.CARRIAGE_RETURN_PLACEHOLDER, "g");
|
|
389
|
-
})),
|
|
389
|
+
})), it = /* @__PURE__ */ t(((e) => {
|
|
390
390
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatAttributes = i, e.hasOpenTag = o, e.escapeSpecialCharacters = s, e.revertEscapedCharacters = c, e.formatDOM = l;
|
|
391
|
-
var t =
|
|
391
|
+
var t = nt(), n = rt();
|
|
392
392
|
function r(e) {
|
|
393
393
|
return n.CASE_SENSITIVE_TAG_NAMES_MAP[e];
|
|
394
394
|
}
|
|
@@ -436,9 +436,9 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
436
436
|
}
|
|
437
437
|
return r && (s = new t.ProcessingInstruction(r.substring(0, r.indexOf(" ")).toLowerCase(), r), s.next = o[0] ?? null, s.parent = n, o.unshift(s), o[1] && (o[1].prev = o[0])), o;
|
|
438
438
|
}
|
|
439
|
-
})),
|
|
439
|
+
})), at = /* @__PURE__ */ t(((e) => {
|
|
440
440
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = h;
|
|
441
|
-
var t =
|
|
441
|
+
var t = it(), n = "html", r = "head", i = "body", a = /<([a-zA-Z]+[0-9]?)/, o = function(e, t) {
|
|
442
442
|
throw Error("This browser does not support `document.implementation.createHTMLDocument`");
|
|
443
443
|
}, s = function(e, t) {
|
|
444
444
|
throw Error("This browser does not support `DOMParser.prototype.parseFromString`");
|
|
@@ -497,19 +497,19 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
497
497
|
return f?.childNodes ?? m();
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
})),
|
|
500
|
+
})), ot = /* @__PURE__ */ t(((e) => {
|
|
501
501
|
var t = e && e.__importDefault || function(e) {
|
|
502
502
|
return e && e.__esModule ? e : { default: e };
|
|
503
503
|
};
|
|
504
504
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = a;
|
|
505
|
-
var n = t(
|
|
505
|
+
var n = t(at()), r = it(), i = /<(![a-zA-Z\s]+)>/;
|
|
506
506
|
function a(e) {
|
|
507
507
|
if (typeof e != "string") throw TypeError("First argument must be a string");
|
|
508
508
|
if (!e) return [];
|
|
509
509
|
var t = i.exec(e), a = t ? t[1] : void 0;
|
|
510
510
|
return (0, r.formatDOM)((0, n.default)(e), null, a);
|
|
511
511
|
}
|
|
512
|
-
})),
|
|
512
|
+
})), st = /* @__PURE__ */ t(((e) => {
|
|
513
513
|
e.SAME = 0, e.CAMELCASE = 1, e.possibleStandardNames = {
|
|
514
514
|
accept: 0,
|
|
515
515
|
acceptCharset: 1,
|
|
@@ -995,7 +995,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
995
995
|
z: 0,
|
|
996
996
|
zoomAndPan: 1
|
|
997
997
|
};
|
|
998
|
-
})),
|
|
998
|
+
})), ct = /* @__PURE__ */ t(((e) => {
|
|
999
999
|
var t = 0, n = 1, r = 2, i = 3, a = 4, o = 5, s = 6;
|
|
1000
1000
|
function c(e) {
|
|
1001
1001
|
return u.hasOwnProperty(e) ? u[e] : null;
|
|
@@ -1114,12 +1114,12 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1114
1114
|
].forEach((e) => {
|
|
1115
1115
|
u[e] = new l(e, n, !1, e.toLowerCase(), null, !0, !0);
|
|
1116
1116
|
});
|
|
1117
|
-
var { CAMELCASE: m, SAME: h, possibleStandardNames: g } =
|
|
1117
|
+
var { CAMELCASE: m, SAME: h, possibleStandardNames: g } = st(), _ = RegExp.prototype.test.bind(/* @__PURE__ */ RegExp("^(data|aria)-[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$")), v = Object.keys(g).reduce((e, t) => {
|
|
1118
1118
|
let n = g[t];
|
|
1119
1119
|
return n === h ? e[t] = t : n === m ? e[t.toLowerCase()] = t : e[t] = n, e;
|
|
1120
1120
|
}, {});
|
|
1121
1121
|
e.BOOLEAN = i, e.BOOLEANISH_STRING = r, e.NUMERIC = o, e.OVERLOADED_BOOLEAN = a, e.POSITIVE_NUMERIC = s, e.RESERVED = t, e.STRING = n, e.getPropertyInfo = c, e.isCustomAttribute = _, e.possibleStandardNames = v;
|
|
1122
|
-
})),
|
|
1122
|
+
})), lt = /* @__PURE__ */ t(((e) => {
|
|
1123
1123
|
var t = e && e.__importDefault || function(e) {
|
|
1124
1124
|
return e && e.__esModule ? e : { default: e };
|
|
1125
1125
|
};
|
|
@@ -1166,9 +1166,9 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1166
1166
|
}, e.returnFirstArg = function(e) {
|
|
1167
1167
|
return e;
|
|
1168
1168
|
};
|
|
1169
|
-
})),
|
|
1169
|
+
})), ut = /* @__PURE__ */ t(((e) => {
|
|
1170
1170
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1171
|
-
var t =
|
|
1171
|
+
var t = ct(), n = lt(), r = ["checked", "value"], i = [
|
|
1172
1172
|
"input",
|
|
1173
1173
|
"select",
|
|
1174
1174
|
"textarea"
|
|
@@ -1203,12 +1203,12 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1203
1203
|
function s(e) {
|
|
1204
1204
|
return t.possibleStandardNames[e];
|
|
1205
1205
|
}
|
|
1206
|
-
})),
|
|
1206
|
+
})), dt = /* @__PURE__ */ t(((e) => {
|
|
1207
1207
|
var t = e && e.__importDefault || function(e) {
|
|
1208
1208
|
return e && e.__esModule ? e : { default: e };
|
|
1209
1209
|
};
|
|
1210
1210
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = o;
|
|
1211
|
-
var n = c(), r = t(
|
|
1211
|
+
var n = c(), r = t(ut()), i = lt(), a = {
|
|
1212
1212
|
cloneElement: n.cloneElement,
|
|
1213
1213
|
createElement: n.createElement,
|
|
1214
1214
|
isValidElement: n.isValidElement
|
|
@@ -1250,16 +1250,16 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1250
1250
|
function s(e) {
|
|
1251
1251
|
return i.PRESERVE_CUSTOM_ATTRIBUTES && e.type === "tag" && (0, i.isCustomComponent)(e.name, e.attribs);
|
|
1252
1252
|
}
|
|
1253
|
-
})),
|
|
1253
|
+
})), ft = /* @__PURE__ */ t(((e) => {
|
|
1254
1254
|
var t = e && e.__importDefault || function(e) {
|
|
1255
1255
|
return e && e.__esModule ? e : { default: e };
|
|
1256
1256
|
};
|
|
1257
1257
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.htmlToDOM = e.domToReact = e.attributesToProps = e.Text = e.ProcessingInstruction = e.Element = e.Comment = void 0, e.default = o;
|
|
1258
|
-
var n = t(
|
|
1259
|
-
e.htmlToDOM = n.default, e.attributesToProps = t(
|
|
1260
|
-
var r = t(
|
|
1258
|
+
var n = t(ot());
|
|
1259
|
+
e.htmlToDOM = n.default, e.attributesToProps = t(ut()).default;
|
|
1260
|
+
var r = t(dt());
|
|
1261
1261
|
e.domToReact = r.default;
|
|
1262
|
-
var i =
|
|
1262
|
+
var i = nt();
|
|
1263
1263
|
Object.defineProperty(e, "Comment", {
|
|
1264
1264
|
enumerable: !0,
|
|
1265
1265
|
get: function() {
|
|
@@ -1286,7 +1286,7 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1286
1286
|
if (typeof e != "string") throw TypeError("First argument must be a string");
|
|
1287
1287
|
return e ? (0, r.default)((0, n.default)(e, t?.htmlparser2 ?? a), t) : [];
|
|
1288
1288
|
}
|
|
1289
|
-
})),
|
|
1289
|
+
})), O = /* @__PURE__ */ e(c(), 1), k = l(), A = /* @__PURE__ */ e(ft(), 1), pt = A.default.default || A.default, mt = y("between-horizontal-start", [
|
|
1290
1290
|
["rect", {
|
|
1291
1291
|
width: "13",
|
|
1292
1292
|
height: "7",
|
|
@@ -1307,10 +1307,10 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1307
1307
|
rx: "1",
|
|
1308
1308
|
key: "1q5fc1"
|
|
1309
1309
|
}]
|
|
1310
|
-
]),
|
|
1310
|
+
]), ht = y("loader-circle", [["path", {
|
|
1311
1311
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
1312
1312
|
key: "13zald"
|
|
1313
|
-
}]]),
|
|
1313
|
+
}]]), gt = y("trash-2", [
|
|
1314
1314
|
["path", {
|
|
1315
1315
|
d: "M10 11v6",
|
|
1316
1316
|
key: "nco0om"
|
|
@@ -1331,61 +1331,61 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1331
1331
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
1332
1332
|
key: "e791ji"
|
|
1333
1333
|
}]
|
|
1334
|
-
]),
|
|
1334
|
+
]), _t = y("wrench", [["path", {
|
|
1335
1335
|
d: "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",
|
|
1336
1336
|
key: "1ngwbx"
|
|
1337
|
-
}]]),
|
|
1337
|
+
}]]), j = ke(), vt = Object.defineProperty, M = (e, t) => vt(e, "name", {
|
|
1338
1338
|
value: t,
|
|
1339
1339
|
configurable: !0
|
|
1340
|
-
}),
|
|
1341
|
-
let { __scopeCollapsible: n, open: r, defaultOpen: i, disabled: a, onOpenChange: o, ...s } = e, [c, l] =
|
|
1340
|
+
}), yt = "Collapsible", [bt, xt] = Me(yt), [St, Ct] = bt(yt), wt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1341
|
+
let { __scopeCollapsible: n, open: r, defaultOpen: i, disabled: a, onOpenChange: o, ...s } = e, [c, l] = w({
|
|
1342
1342
|
prop: r,
|
|
1343
1343
|
defaultProp: i ?? !1,
|
|
1344
1344
|
onChange: o,
|
|
1345
|
-
caller:
|
|
1345
|
+
caller: yt
|
|
1346
1346
|
});
|
|
1347
|
-
return /* @__PURE__ */ (0,
|
|
1347
|
+
return /* @__PURE__ */ (0, j.jsx)(St, {
|
|
1348
1348
|
scope: n,
|
|
1349
1349
|
disabled: a,
|
|
1350
|
-
contentId:
|
|
1350
|
+
contentId: S(),
|
|
1351
1351
|
open: c,
|
|
1352
|
-
onOpenToggle:
|
|
1353
|
-
children: /* @__PURE__ */ (0,
|
|
1354
|
-
"data-state":
|
|
1352
|
+
onOpenToggle: O.useCallback(() => l((e) => !e), [l]),
|
|
1353
|
+
children: /* @__PURE__ */ (0, j.jsx)(T.div, {
|
|
1354
|
+
"data-state": N(c),
|
|
1355
1355
|
"data-disabled": a ? "" : void 0,
|
|
1356
1356
|
...s,
|
|
1357
1357
|
ref: t
|
|
1358
1358
|
})
|
|
1359
1359
|
});
|
|
1360
|
-
}, "Collapsible")),
|
|
1361
|
-
let { __scopeCollapsible: n, ...r } = e, i =
|
|
1362
|
-
return /* @__PURE__ */ (0,
|
|
1360
|
+
}, "Collapsible")), Tt = "CollapsibleTrigger", Et = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1361
|
+
let { __scopeCollapsible: n, ...r } = e, i = Ct(Tt, n);
|
|
1362
|
+
return /* @__PURE__ */ (0, j.jsx)(T.button, {
|
|
1363
1363
|
type: "button",
|
|
1364
1364
|
"aria-controls": i.open ? i.contentId : void 0,
|
|
1365
1365
|
"aria-expanded": i.open || !1,
|
|
1366
|
-
"data-state":
|
|
1366
|
+
"data-state": N(i.open),
|
|
1367
1367
|
"data-disabled": i.disabled ? "" : void 0,
|
|
1368
1368
|
disabled: i.disabled,
|
|
1369
1369
|
...r,
|
|
1370
1370
|
ref: t,
|
|
1371
|
-
onClick:
|
|
1371
|
+
onClick: C(e.onClick, i.onOpenToggle)
|
|
1372
1372
|
});
|
|
1373
|
-
}, "CollapsibleTrigger")),
|
|
1374
|
-
let { forceMount: n, ...r } = e, i =
|
|
1375
|
-
return /* @__PURE__ */ (0,
|
|
1373
|
+
}, "CollapsibleTrigger")), Dt = "CollapsibleContent", Ot = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1374
|
+
let { forceMount: n, ...r } = e, i = Ct(Dt, e.__scopeCollapsible);
|
|
1375
|
+
return /* @__PURE__ */ (0, j.jsx)(E, {
|
|
1376
1376
|
present: n || i.open,
|
|
1377
|
-
children: ({ present: e }) => /* @__PURE__ */ (0,
|
|
1377
|
+
children: ({ present: e }) => /* @__PURE__ */ (0, j.jsx)(kt, {
|
|
1378
1378
|
...r,
|
|
1379
1379
|
ref: t,
|
|
1380
1380
|
present: e
|
|
1381
1381
|
})
|
|
1382
1382
|
});
|
|
1383
|
-
}, "CollapsibleContent")),
|
|
1384
|
-
let { __scopeCollapsible: n, present: r, children: a, ...o } = e, s =
|
|
1385
|
-
return
|
|
1383
|
+
}, "CollapsibleContent")), kt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ M(function(e, t) {
|
|
1384
|
+
let { __scopeCollapsible: n, present: r, children: a, ...o } = e, s = Ct(Dt, n), [c, l] = O.useState(r), u = O.useRef(null), d = i(t, u), f = O.useRef(0), p = f.current, m = O.useRef(0), h = m.current, g = s.open || c, _ = O.useRef(g), v = O.useRef(void 0);
|
|
1385
|
+
return O.useEffect(() => {
|
|
1386
1386
|
let e = requestAnimationFrame(() => _.current = !1);
|
|
1387
1387
|
return () => cancelAnimationFrame(e);
|
|
1388
|
-
}, []),
|
|
1388
|
+
}, []), je(() => {
|
|
1389
1389
|
let e = u.current;
|
|
1390
1390
|
if (e) {
|
|
1391
1391
|
v.current = v.current || {
|
|
@@ -1395,8 +1395,8 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1395
1395
|
let t = e.getBoundingClientRect();
|
|
1396
1396
|
f.current = t.height, m.current = t.width, _.current || (e.style.transitionDuration = v.current.transitionDuration, e.style.animationName = v.current.animationName), l(r);
|
|
1397
1397
|
}
|
|
1398
|
-
}, [s.open, r]), /* @__PURE__ */ (0,
|
|
1399
|
-
"data-state":
|
|
1398
|
+
}, [s.open, r]), /* @__PURE__ */ (0, j.jsx)(T.div, {
|
|
1399
|
+
"data-state": N(s.open),
|
|
1400
1400
|
"data-disabled": s.disabled ? "" : void 0,
|
|
1401
1401
|
id: s.contentId,
|
|
1402
1402
|
hidden: !g,
|
|
@@ -1410,113 +1410,125 @@ var Ze = /* @__PURE__ */ t(((e) => {
|
|
|
1410
1410
|
children: g && a
|
|
1411
1411
|
});
|
|
1412
1412
|
}, "CollapsibleContentImpl"));
|
|
1413
|
-
function
|
|
1413
|
+
function N(e) {
|
|
1414
1414
|
return e ? "open" : "closed";
|
|
1415
1415
|
}
|
|
1416
|
-
|
|
1417
|
-
|
|
1416
|
+
M(N, "getState");
|
|
1417
|
+
//#endregion
|
|
1418
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-accordion@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+rea_abc4d855e45dd0aac37149041714f617/node_modules/@radix-ui/react-accordion/dist/index.mjs
|
|
1419
|
+
var At = Object.defineProperty, P = (e, t) => At(e, "name", {
|
|
1418
1420
|
value: t,
|
|
1419
1421
|
configurable: !0
|
|
1420
|
-
}),
|
|
1422
|
+
}), jt = {
|
|
1423
|
+
Single: "single",
|
|
1424
|
+
Multiple: "multiple"
|
|
1425
|
+
}, F = {
|
|
1426
|
+
Vertical: "vertical",
|
|
1427
|
+
Horizontal: "horizontal"
|
|
1428
|
+
}, Mt = {
|
|
1429
|
+
LTR: "ltr",
|
|
1430
|
+
RTL: "rtl"
|
|
1431
|
+
}, I = "Accordion", Nt = [
|
|
1421
1432
|
"Home",
|
|
1422
1433
|
"End",
|
|
1423
1434
|
"ArrowDown",
|
|
1424
1435
|
"ArrowUp",
|
|
1425
1436
|
"ArrowLeft",
|
|
1426
1437
|
"ArrowRight"
|
|
1427
|
-
], [
|
|
1438
|
+
], [Pt, { useGetCollection: Ft, createCollectionScope: It }] = we(I), [L, Lt] = Me(I, [It, xt]), Rt = xt(), zt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1428
1439
|
let { type: n, ...r } = e, i = r, a = r;
|
|
1429
|
-
return /* @__PURE__ */ (0,
|
|
1440
|
+
return /* @__PURE__ */ (0, j.jsx)(Pt.Provider, {
|
|
1430
1441
|
scope: e.__scopeAccordion,
|
|
1431
|
-
children: n ===
|
|
1442
|
+
children: n === jt.Multiple ? /* @__PURE__ */ (0, j.jsx)(Gt, {
|
|
1432
1443
|
...a,
|
|
1433
1444
|
ref: t
|
|
1434
|
-
}) : /* @__PURE__ */ (0,
|
|
1445
|
+
}) : /* @__PURE__ */ (0, j.jsx)(Wt, {
|
|
1435
1446
|
...i,
|
|
1436
1447
|
ref: t
|
|
1437
1448
|
})
|
|
1438
1449
|
});
|
|
1439
|
-
}, "Accordion")), [
|
|
1440
|
-
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */
|
|
1450
|
+
}, "Accordion")), [Bt, Vt] = L(I), [Ht, Ut] = L(I, { collapsible: !1 }), Wt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1451
|
+
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ P(() => {}, "onValueChange"), collapsible: a = !1, ...o } = e, [s, c] = w({
|
|
1441
1452
|
prop: n,
|
|
1442
1453
|
defaultProp: r ?? "",
|
|
1443
1454
|
onChange: i,
|
|
1444
1455
|
caller: I
|
|
1445
1456
|
});
|
|
1446
|
-
return /* @__PURE__ */ (0,
|
|
1457
|
+
return /* @__PURE__ */ (0, j.jsx)(Bt, {
|
|
1447
1458
|
scope: e.__scopeAccordion,
|
|
1448
|
-
value:
|
|
1459
|
+
value: O.useMemo(() => s ? [s] : [], [s]),
|
|
1449
1460
|
onItemOpen: c,
|
|
1450
|
-
onItemClose:
|
|
1451
|
-
children: /* @__PURE__ */ (0,
|
|
1461
|
+
onItemClose: O.useCallback(() => a && c(""), [a, c]),
|
|
1462
|
+
children: /* @__PURE__ */ (0, j.jsx)(Ht, {
|
|
1452
1463
|
scope: e.__scopeAccordion,
|
|
1453
1464
|
collapsible: a,
|
|
1454
|
-
children: /* @__PURE__ */ (0,
|
|
1465
|
+
children: /* @__PURE__ */ (0, j.jsx)(qt, {
|
|
1455
1466
|
...o,
|
|
1456
1467
|
ref: t
|
|
1457
1468
|
})
|
|
1458
1469
|
})
|
|
1459
1470
|
});
|
|
1460
|
-
}, "AccordionImplSingle")),
|
|
1461
|
-
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */
|
|
1471
|
+
}, "AccordionImplSingle")), Gt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1472
|
+
let { value: n, defaultValue: r, onValueChange: i = /* @__PURE__ */ P(() => {}, "onValueChange"), ...a } = e, [o, s] = w({
|
|
1462
1473
|
prop: n,
|
|
1463
1474
|
defaultProp: r ?? [],
|
|
1464
1475
|
onChange: i,
|
|
1465
1476
|
caller: I
|
|
1466
|
-
}), c =
|
|
1467
|
-
return /* @__PURE__ */ (0,
|
|
1477
|
+
}), c = O.useCallback((e) => s((t = []) => [...t, e]), [s]), l = O.useCallback((e) => s((t = []) => t.filter((t) => t !== e)), [s]);
|
|
1478
|
+
return /* @__PURE__ */ (0, j.jsx)(Bt, {
|
|
1468
1479
|
scope: e.__scopeAccordion,
|
|
1469
1480
|
value: o,
|
|
1470
1481
|
onItemOpen: c,
|
|
1471
1482
|
onItemClose: l,
|
|
1472
|
-
children: /* @__PURE__ */ (0,
|
|
1483
|
+
children: /* @__PURE__ */ (0, j.jsx)(Ht, {
|
|
1473
1484
|
scope: e.__scopeAccordion,
|
|
1474
1485
|
collapsible: !0,
|
|
1475
|
-
children: /* @__PURE__ */ (0,
|
|
1486
|
+
children: /* @__PURE__ */ (0, j.jsx)(qt, {
|
|
1476
1487
|
...a,
|
|
1477
1488
|
ref: t
|
|
1478
1489
|
})
|
|
1479
1490
|
})
|
|
1480
1491
|
});
|
|
1481
|
-
}, "AccordionImplMultiple")), [
|
|
1482
|
-
let { __scopeAccordion: n, disabled: r, dir: a, orientation: o =
|
|
1483
|
-
if (!
|
|
1484
|
-
let t = e.target,
|
|
1485
|
-
if (
|
|
1492
|
+
}, "AccordionImplMultiple")), [Kt, R] = L(I), qt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1493
|
+
let { __scopeAccordion: n, disabled: r, dir: a, orientation: o = F.Vertical, ...s } = e, c = O.useRef(null), l = i(c, t), u = Ft(n), d = Se(a) === Mt.LTR, f = C(e.onKeyDown, (e) => {
|
|
1494
|
+
if (!Nt.includes(e.key)) return;
|
|
1495
|
+
let t = u(), n = e.target, r = t.filter(([, e]) => !e.element.disabled), i = r.findIndex(([, e]) => e.element === n), a = r.size;
|
|
1496
|
+
if (i === -1) return;
|
|
1486
1497
|
e.preventDefault();
|
|
1487
|
-
let
|
|
1488
|
-
|
|
1489
|
-
}, "moveNext"),
|
|
1490
|
-
|
|
1498
|
+
let s = i, c = a - 1, l = /* @__PURE__ */ P(() => {
|
|
1499
|
+
s = i + 1, s > c && (s = 0);
|
|
1500
|
+
}, "moveNext"), f = /* @__PURE__ */ P(() => {
|
|
1501
|
+
s = i - 1, s < 0 && (s = c);
|
|
1491
1502
|
}, "movePrev");
|
|
1492
1503
|
switch (e.key) {
|
|
1493
1504
|
case "Home":
|
|
1494
|
-
|
|
1505
|
+
s = 0;
|
|
1495
1506
|
break;
|
|
1496
1507
|
case "End":
|
|
1497
|
-
|
|
1508
|
+
s = c;
|
|
1498
1509
|
break;
|
|
1499
1510
|
case "ArrowRight":
|
|
1500
|
-
o ===
|
|
1511
|
+
o === F.Horizontal && (d ? l() : f());
|
|
1501
1512
|
break;
|
|
1502
1513
|
case "ArrowDown":
|
|
1503
|
-
o ===
|
|
1514
|
+
o === F.Vertical && l();
|
|
1504
1515
|
break;
|
|
1505
1516
|
case "ArrowLeft":
|
|
1506
|
-
o ===
|
|
1517
|
+
o === F.Horizontal && (d ? f() : l());
|
|
1507
1518
|
break;
|
|
1508
|
-
case "ArrowUp": o ===
|
|
1519
|
+
case "ArrowUp": o === F.Vertical && f();
|
|
1509
1520
|
}
|
|
1510
|
-
|
|
1521
|
+
let p = s % a;
|
|
1522
|
+
r.at(p)?.element.focus();
|
|
1511
1523
|
});
|
|
1512
|
-
return /* @__PURE__ */ (0,
|
|
1524
|
+
return /* @__PURE__ */ (0, j.jsx)(Kt, {
|
|
1513
1525
|
scope: n,
|
|
1514
1526
|
disabled: r,
|
|
1515
1527
|
direction: a,
|
|
1516
1528
|
orientation: o,
|
|
1517
|
-
children: /* @__PURE__ */ (0,
|
|
1529
|
+
children: /* @__PURE__ */ (0, j.jsx)(Pt.Slot, {
|
|
1518
1530
|
scope: n,
|
|
1519
|
-
children: /* @__PURE__ */ (0,
|
|
1531
|
+
children: /* @__PURE__ */ (0, j.jsx)(T.div, {
|
|
1520
1532
|
...s,
|
|
1521
1533
|
"data-orientation": o,
|
|
1522
1534
|
ref: l,
|
|
@@ -1524,16 +1536,16 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1524
1536
|
})
|
|
1525
1537
|
})
|
|
1526
1538
|
});
|
|
1527
|
-
}, "AccordionImpl")),
|
|
1528
|
-
let { __scopeAccordion: n, value: r, ...i } = e, a = R(
|
|
1529
|
-
return /* @__PURE__ */ (0,
|
|
1539
|
+
}, "AccordionImpl")), Jt = "AccordionItem", [Yt, Xt] = L(Jt), Zt = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1540
|
+
let { __scopeAccordion: n, value: r, ...i } = e, a = R(Jt, n), o = Vt(Jt, n), s = Rt(n), c = S(), l = r && o.value.includes(r) || !1, u = a.disabled || e.disabled;
|
|
1541
|
+
return /* @__PURE__ */ (0, j.jsx)(Yt, {
|
|
1530
1542
|
scope: n,
|
|
1531
1543
|
open: l,
|
|
1532
1544
|
disabled: u,
|
|
1533
1545
|
triggerId: c,
|
|
1534
|
-
children: /* @__PURE__ */ (0,
|
|
1546
|
+
children: /* @__PURE__ */ (0, j.jsx)(wt, {
|
|
1535
1547
|
"data-orientation": a.orientation,
|
|
1536
|
-
"data-state":
|
|
1548
|
+
"data-state": rn(l),
|
|
1537
1549
|
...s,
|
|
1538
1550
|
...i,
|
|
1539
1551
|
ref: t,
|
|
@@ -1544,20 +1556,20 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1544
1556
|
}
|
|
1545
1557
|
})
|
|
1546
1558
|
});
|
|
1547
|
-
}, "AccordionItem")),
|
|
1548
|
-
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a =
|
|
1549
|
-
return /* @__PURE__ */ (0,
|
|
1559
|
+
}, "AccordionItem")), Qt = "AccordionHeader", $t = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1560
|
+
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Xt(Qt, n);
|
|
1561
|
+
return /* @__PURE__ */ (0, j.jsx)(T.h3, {
|
|
1550
1562
|
"data-orientation": i.orientation,
|
|
1551
|
-
"data-state":
|
|
1563
|
+
"data-state": rn(a.open),
|
|
1552
1564
|
"data-disabled": a.disabled ? "" : void 0,
|
|
1553
1565
|
...r,
|
|
1554
1566
|
ref: t
|
|
1555
1567
|
});
|
|
1556
|
-
}, "AccordionHeader")),
|
|
1557
|
-
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a =
|
|
1558
|
-
return /* @__PURE__ */ (0,
|
|
1568
|
+
}, "AccordionHeader")), en = "AccordionTrigger", z = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1569
|
+
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Xt(en, n), o = Ut(en, n), s = Rt(n);
|
|
1570
|
+
return /* @__PURE__ */ (0, j.jsx)(Pt.ItemSlot, {
|
|
1559
1571
|
scope: n,
|
|
1560
|
-
children: /* @__PURE__ */ (0,
|
|
1572
|
+
children: /* @__PURE__ */ (0, j.jsx)(Et, {
|
|
1561
1573
|
"aria-disabled": a.open && !o.collapsible || void 0,
|
|
1562
1574
|
"data-orientation": i.orientation,
|
|
1563
1575
|
id: a.triggerId,
|
|
@@ -1566,9 +1578,9 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1566
1578
|
ref: t
|
|
1567
1579
|
})
|
|
1568
1580
|
});
|
|
1569
|
-
}, "AccordionTrigger")),
|
|
1570
|
-
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a =
|
|
1571
|
-
return /* @__PURE__ */ (0,
|
|
1581
|
+
}, "AccordionTrigger")), tn = "AccordionContent", nn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
1582
|
+
let { __scopeAccordion: n, ...r } = e, i = R(I, n), a = Xt(tn, n), o = Rt(n);
|
|
1583
|
+
return /* @__PURE__ */ (0, j.jsx)(Ot, {
|
|
1572
1584
|
role: "region",
|
|
1573
1585
|
"aria-labelledby": a.triggerId,
|
|
1574
1586
|
"data-orientation": i.orientation,
|
|
@@ -1582,111 +1594,122 @@ var Tt = yt, Et = xt, Dt = Ct, Ot = Object.defineProperty, F = (e, t) => Ot(e, "
|
|
|
1582
1594
|
}
|
|
1583
1595
|
});
|
|
1584
1596
|
}, "AccordionContent"));
|
|
1585
|
-
function
|
|
1597
|
+
function rn(e) {
|
|
1586
1598
|
return e ? "open" : "closed";
|
|
1587
1599
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1600
|
+
P(rn, "getState");
|
|
1601
|
+
//#endregion
|
|
1602
|
+
//#region ../node_modules/.pnpm/@radix-ui+react-popover@1.3.1_@types+react-dom@19.3.0_@types+react@19.3.0__@types+react_e30c1a3361e595871e7a1c2e1a74b81d/node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
1603
|
+
var an = Object.defineProperty, B = (e, t) => an(e, "name", {
|
|
1590
1604
|
value: t,
|
|
1591
1605
|
configurable: !0
|
|
1592
|
-
}),
|
|
1593
|
-
let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s =
|
|
1606
|
+
}), V = "Popover", [on, sn] = Me(V, [ee]), H = ee(), [cn, U] = on(V), ln = /* @__PURE__ */ B((e) => {
|
|
1607
|
+
let { __scopePopover: t, children: n, open: r, defaultOpen: i, onOpenChange: a, modal: o = !1 } = e, s = H(t), c = O.useRef(null), [l, u] = O.useState(!1), [d, f] = O.useState(0), [p, m] = O.useState(0), [h, g] = w({
|
|
1594
1608
|
prop: r,
|
|
1595
1609
|
defaultProp: i ?? !1,
|
|
1596
1610
|
onChange: a,
|
|
1597
|
-
caller:
|
|
1611
|
+
caller: V
|
|
1598
1612
|
});
|
|
1599
|
-
return /* @__PURE__ */ (0,
|
|
1613
|
+
return /* @__PURE__ */ (0, j.jsx)(b, {
|
|
1600
1614
|
...s,
|
|
1601
|
-
children: /* @__PURE__ */ (0,
|
|
1615
|
+
children: /* @__PURE__ */ (0, j.jsx)(cn, {
|
|
1602
1616
|
scope: t,
|
|
1603
|
-
contentId:
|
|
1617
|
+
contentId: S(),
|
|
1618
|
+
titleId: S(),
|
|
1619
|
+
descriptionId: S(),
|
|
1620
|
+
titlePresent: d > 0,
|
|
1621
|
+
descriptionPresent: p > 0,
|
|
1622
|
+
setTitleCount: f,
|
|
1623
|
+
setDescriptionCount: m,
|
|
1604
1624
|
triggerRef: c,
|
|
1605
|
-
open:
|
|
1606
|
-
onOpenChange:
|
|
1607
|
-
onOpenToggle:
|
|
1625
|
+
open: h,
|
|
1626
|
+
onOpenChange: g,
|
|
1627
|
+
onOpenToggle: O.useCallback(() => g((e) => !e), [g]),
|
|
1608
1628
|
hasCustomAnchor: l,
|
|
1609
|
-
onCustomAnchorAdd:
|
|
1610
|
-
onCustomAnchorRemove:
|
|
1629
|
+
onCustomAnchorAdd: O.useCallback(() => u(!0), []),
|
|
1630
|
+
onCustomAnchorRemove: O.useCallback(() => u(!1), []),
|
|
1611
1631
|
modal: o,
|
|
1612
1632
|
children: n
|
|
1613
1633
|
})
|
|
1614
1634
|
});
|
|
1615
|
-
}, "Popover"),
|
|
1616
|
-
let { __scopePopover: n, ...r } = e, i =
|
|
1617
|
-
return
|
|
1635
|
+
}, "Popover"), un = "PopoverAnchor", dn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1636
|
+
let { __scopePopover: n, ...r } = e, i = U(un, n), a = H(n), { onCustomAnchorAdd: o, onCustomAnchorRemove: s } = i;
|
|
1637
|
+
return O.useEffect(() => (o(), () => s()), [o, s]), /* @__PURE__ */ (0, j.jsx)(_, {
|
|
1618
1638
|
...a,
|
|
1619
1639
|
...r,
|
|
1620
1640
|
ref: t
|
|
1621
1641
|
});
|
|
1622
|
-
}, "PopoverAnchor")),
|
|
1623
|
-
let { __scopePopover: n, ...r } = e, a =
|
|
1642
|
+
}, "PopoverAnchor")), fn = "PopoverTrigger", pn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1643
|
+
let { __scopePopover: n, ...r } = e, a = U(fn, n), o = H(n), s = i(t, a.triggerRef), c = /* @__PURE__ */ (0, j.jsx)(T.button, {
|
|
1624
1644
|
type: "button",
|
|
1625
1645
|
"aria-haspopup": "dialog",
|
|
1626
1646
|
"aria-expanded": a.open,
|
|
1627
1647
|
"aria-controls": a.open ? a.contentId : void 0,
|
|
1628
|
-
"data-state":
|
|
1648
|
+
"data-state": Tn(a.open),
|
|
1629
1649
|
...r,
|
|
1630
1650
|
ref: s,
|
|
1631
|
-
onClick:
|
|
1651
|
+
onClick: C(e.onClick, a.onOpenToggle)
|
|
1632
1652
|
});
|
|
1633
|
-
return a.hasCustomAnchor ? c : /* @__PURE__ */ (0,
|
|
1653
|
+
return a.hasCustomAnchor ? c : /* @__PURE__ */ (0, j.jsx)(_, {
|
|
1634
1654
|
asChild: !0,
|
|
1635
1655
|
...o,
|
|
1636
1656
|
children: c
|
|
1637
1657
|
});
|
|
1638
|
-
}, "PopoverTrigger")),
|
|
1639
|
-
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a =
|
|
1640
|
-
return /* @__PURE__ */ (0,
|
|
1658
|
+
}, "PopoverTrigger")), mn = "PopoverPortal", [hn, gn] = on(mn, { forceMount: void 0 }), _n = /* @__PURE__ */ B((e) => {
|
|
1659
|
+
let { __scopePopover: t, forceMount: n, children: r, container: i } = e, a = U(mn, t);
|
|
1660
|
+
return /* @__PURE__ */ (0, j.jsx)(hn, {
|
|
1641
1661
|
scope: t,
|
|
1642
1662
|
forceMount: n,
|
|
1643
|
-
children: /* @__PURE__ */ (0,
|
|
1663
|
+
children: /* @__PURE__ */ (0, j.jsx)(E, {
|
|
1644
1664
|
present: n || a.open,
|
|
1645
|
-
children: /* @__PURE__ */ (0,
|
|
1665
|
+
children: /* @__PURE__ */ (0, j.jsx)(Be, {
|
|
1646
1666
|
asChild: !0,
|
|
1647
1667
|
container: i,
|
|
1648
1668
|
children: r
|
|
1649
1669
|
})
|
|
1650
1670
|
})
|
|
1651
1671
|
});
|
|
1652
|
-
}, "PopoverPortal"),
|
|
1653
|
-
let n =
|
|
1654
|
-
return /* @__PURE__ */ (0,
|
|
1672
|
+
}, "PopoverPortal"), W = "PopoverContent", vn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1673
|
+
let n = gn(W, e.__scopePopover), { forceMount: r = n.forceMount, ...i } = e, a = U(W, e.__scopePopover);
|
|
1674
|
+
return /* @__PURE__ */ (0, j.jsx)(E, {
|
|
1655
1675
|
present: r || a.open,
|
|
1656
|
-
children: a.modal ? /* @__PURE__ */ (0,
|
|
1676
|
+
children: a.modal ? /* @__PURE__ */ (0, j.jsx)(bn, {
|
|
1657
1677
|
...i,
|
|
1658
1678
|
ref: t
|
|
1659
|
-
}) : /* @__PURE__ */ (0,
|
|
1679
|
+
}) : /* @__PURE__ */ (0, j.jsx)(xn, {
|
|
1660
1680
|
...i,
|
|
1661
1681
|
ref: t
|
|
1662
1682
|
})
|
|
1663
1683
|
});
|
|
1664
|
-
}, "PopoverContent")),
|
|
1665
|
-
let n =
|
|
1666
|
-
return
|
|
1684
|
+
}, "PopoverContent")), yn = s("PopoverContent.RemoveScroll"), bn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1685
|
+
let n = U(W, e.__scopePopover), r = O.useRef(null), a = i(t, r), o = O.useRef(!1), { nodes: s, registry: c } = We();
|
|
1686
|
+
return O.useEffect(() => {
|
|
1667
1687
|
let e = r.current;
|
|
1668
|
-
if (e) return
|
|
1669
|
-
}, []), /* @__PURE__ */ (0,
|
|
1670
|
-
as:
|
|
1688
|
+
if (e) return Le(e);
|
|
1689
|
+
}, []), /* @__PURE__ */ (0, j.jsx)(Re, {
|
|
1690
|
+
as: yn,
|
|
1671
1691
|
allowPinchZoom: !0,
|
|
1672
|
-
|
|
1692
|
+
shards: O.useMemo(() => [r, ...s.map((e) => ({ current: e }))], [r, s]),
|
|
1693
|
+
children: /* @__PURE__ */ (0, j.jsx)(Sn, {
|
|
1673
1694
|
...e,
|
|
1674
1695
|
ref: a,
|
|
1696
|
+
branchNodes: s,
|
|
1697
|
+
branchRegistry: c,
|
|
1675
1698
|
trapFocus: n.open,
|
|
1676
1699
|
disableOutsidePointerEvents: !0,
|
|
1677
|
-
onCloseAutoFocus:
|
|
1700
|
+
onCloseAutoFocus: C(e.onCloseAutoFocus, (e) => {
|
|
1678
1701
|
e.preventDefault(), o.current || n.triggerRef.current?.focus();
|
|
1679
1702
|
}),
|
|
1680
|
-
onPointerDownOutside:
|
|
1703
|
+
onPointerDownOutside: C(e.onPointerDownOutside, (e) => {
|
|
1681
1704
|
let t = e.detail.originalEvent, n = t.button === 0 && t.ctrlKey === !0, r = t.button === 2 || n;
|
|
1682
1705
|
o.current = r;
|
|
1683
1706
|
}, { checkForDefaultPrevented: !1 }),
|
|
1684
|
-
onFocusOutside:
|
|
1707
|
+
onFocusOutside: C(e.onFocusOutside, (e) => e.preventDefault(), { checkForDefaultPrevented: !1 })
|
|
1685
1708
|
})
|
|
1686
1709
|
});
|
|
1687
|
-
}, "PopoverContentModal")),
|
|
1688
|
-
let n =
|
|
1689
|
-
return /* @__PURE__ */ (0,
|
|
1710
|
+
}, "PopoverContentModal")), xn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1711
|
+
let n = U(W, e.__scopePopover), r = O.useRef(!1), i = O.useRef(!1);
|
|
1712
|
+
return /* @__PURE__ */ (0, j.jsx)(Sn, {
|
|
1690
1713
|
...e,
|
|
1691
1714
|
ref: t,
|
|
1692
1715
|
trapFocus: !1,
|
|
@@ -1700,58 +1723,72 @@ var tn = Ft, nn = qt, rn = Yt, an = Zt, on = $t, sn = Object.defineProperty, z =
|
|
|
1700
1723
|
n.triggerRef.current?.contains(a) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && i.current && t.preventDefault();
|
|
1701
1724
|
}
|
|
1702
1725
|
});
|
|
1703
|
-
}, "PopoverContentNonModal")),
|
|
1704
|
-
let { __scopePopover: n, trapFocus: r, onOpenAutoFocus:
|
|
1705
|
-
return
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
trapped: r,
|
|
1709
|
-
onMountAutoFocus: i,
|
|
1710
|
-
onUnmountAutoFocus: a,
|
|
1711
|
-
children: /* @__PURE__ */ (0, A.jsx)(ze, {
|
|
1726
|
+
}, "PopoverContentNonModal")), Sn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1727
|
+
let { __scopePopover: n, trapFocus: r, onOpenAutoFocus: a, onCloseAutoFocus: o, disableOutsidePointerEvents: s, onEscapeKeyDown: c, onPointerDownOutside: l, onFocusOutside: u, onInteractOutside: d, "aria-describedby": f, branchNodes: p, branchRegistry: m, ...h } = e, g = U(W, n), _ = H(n), [y, b] = O.useState(null), x = i(t, b);
|
|
1728
|
+
return Ue(y), Ve(), /* @__PURE__ */ (0, j.jsx)(Fe, {
|
|
1729
|
+
registry: m,
|
|
1730
|
+
children: /* @__PURE__ */ (0, j.jsx)(ze, {
|
|
1712
1731
|
asChild: !0,
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
"
|
|
1732
|
-
"
|
|
1733
|
-
|
|
1734
|
-
|
|
1732
|
+
loop: !0,
|
|
1733
|
+
trapped: r,
|
|
1734
|
+
branches: p,
|
|
1735
|
+
onMountAutoFocus: a,
|
|
1736
|
+
onUnmountAutoFocus: o,
|
|
1737
|
+
children: /* @__PURE__ */ (0, j.jsx)(Ie, {
|
|
1738
|
+
asChild: !0,
|
|
1739
|
+
disableOutsidePointerEvents: s,
|
|
1740
|
+
onInteractOutside: d,
|
|
1741
|
+
onEscapeKeyDown: c,
|
|
1742
|
+
onPointerDownOutside: l,
|
|
1743
|
+
onFocusOutside: u,
|
|
1744
|
+
onDismiss: () => g.onOpenChange(!1),
|
|
1745
|
+
deferPointerDownOutside: !0,
|
|
1746
|
+
children: /* @__PURE__ */ (0, j.jsx)(v, {
|
|
1747
|
+
"data-state": Tn(g.open),
|
|
1748
|
+
role: "dialog",
|
|
1749
|
+
id: g.contentId,
|
|
1750
|
+
"aria-labelledby": g.titlePresent ? g.titleId : void 0,
|
|
1751
|
+
"aria-describedby": g.descriptionPresent ? En(f, g.descriptionId) : f,
|
|
1752
|
+
..._,
|
|
1753
|
+
...h,
|
|
1754
|
+
ref: x,
|
|
1755
|
+
style: {
|
|
1756
|
+
...h.style,
|
|
1757
|
+
"--radix-popover-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
1758
|
+
"--radix-popover-content-available-width": "var(--radix-popper-available-width)",
|
|
1759
|
+
"--radix-popover-content-available-height": "var(--radix-popper-available-height)",
|
|
1760
|
+
"--radix-popover-trigger-width": "var(--radix-popper-anchor-width)",
|
|
1761
|
+
"--radix-popover-trigger-height": "var(--radix-popper-anchor-height)"
|
|
1762
|
+
}
|
|
1763
|
+
})
|
|
1735
1764
|
})
|
|
1736
1765
|
})
|
|
1737
1766
|
});
|
|
1738
|
-
}, "PopoverContentImpl")),
|
|
1739
|
-
let { __scopePopover: n, ...r } = e, i =
|
|
1740
|
-
return /* @__PURE__ */ (0,
|
|
1767
|
+
}, "PopoverContentImpl")), Cn = "PopoverClose", wn = /* @__PURE__ */ O.forwardRef(/* @__PURE__ */ B(function(e, t) {
|
|
1768
|
+
let { __scopePopover: n, ...r } = e, i = U(Cn, n);
|
|
1769
|
+
return /* @__PURE__ */ (0, j.jsx)(T.button, {
|
|
1741
1770
|
type: "button",
|
|
1742
1771
|
...r,
|
|
1743
1772
|
ref: t,
|
|
1744
|
-
onClick:
|
|
1773
|
+
onClick: C(e.onClick, () => i.onOpenChange(!1))
|
|
1745
1774
|
});
|
|
1746
1775
|
}, "PopoverClose"));
|
|
1747
|
-
function
|
|
1776
|
+
function Tn(e) {
|
|
1748
1777
|
return e ? "open" : "closed";
|
|
1749
1778
|
}
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
let t =
|
|
1779
|
+
B(Tn, "getState");
|
|
1780
|
+
function En(...e) {
|
|
1781
|
+
let t = /* @__PURE__ */ new Set();
|
|
1782
|
+
for (let n of e) if (typeof n == "string") for (let e of String(n).trim().split(/\s+/)) e && t.add(e);
|
|
1783
|
+
return t.size > 0 ? Array.from(t).join(" ") : void 0;
|
|
1784
|
+
}
|
|
1785
|
+
B(En, "concatAriaDescribedby");
|
|
1786
|
+
//#endregion
|
|
1787
|
+
//#region src/components/ui/query-param-preserving-link.tsx
|
|
1788
|
+
var Dn = (e) => {
|
|
1789
|
+
let t = (0, k.c)(16), n, r, i;
|
|
1753
1790
|
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({href: r, children: n, ...i} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
1754
|
-
let a = (0,
|
|
1791
|
+
let a = (0, O.useRef)(null), o;
|
|
1755
1792
|
t[4] === r ? o = t[5] : (o = () => {
|
|
1756
1793
|
let e = new URL(globalThis.location.href);
|
|
1757
1794
|
e.hash = r, globalThis.history.pushState({}, "", e.toString()), globalThis.dispatchEvent(new HashChangeEvent("hashchange"));
|
|
@@ -1770,7 +1807,7 @@ var On = dn, kn = pn, An = hn, jn = yn, Mn = bn, Nn = En, Pn = (e) => {
|
|
|
1770
1807
|
e.preventDefault(), s();
|
|
1771
1808
|
}, t[8] = s, t[9] = u);
|
|
1772
1809
|
let d = u, f;
|
|
1773
|
-
return t[10] !== n || t[11] !== d || t[12] !== r || t[13] !== l || t[14] !== i ? (f = /* @__PURE__ */ (0,
|
|
1810
|
+
return t[10] !== n || t[11] !== d || t[12] !== r || t[13] !== l || t[14] !== i ? (f = /* @__PURE__ */ (0, j.jsx)("a", {
|
|
1774
1811
|
ref: a,
|
|
1775
1812
|
href: r,
|
|
1776
1813
|
...l,
|
|
@@ -1778,18 +1815,18 @@ var On = dn, kn = pn, An = hn, jn = yn, Mn = bn, Nn = En, Pn = (e) => {
|
|
|
1778
1815
|
...i,
|
|
1779
1816
|
children: n
|
|
1780
1817
|
}), t[10] = n, t[11] = d, t[12] = r, t[13] = l, t[14] = i, t[15] = f) : f = t[15], f;
|
|
1781
|
-
},
|
|
1782
|
-
let n = (0,
|
|
1818
|
+
}, On = ln, kn = pn, An = Ne(_n), jn = wn, Mn = Ae(vn), Nn = O.forwardRef((e, t) => {
|
|
1819
|
+
let n = (0, k.c)(22), i, a, o, s, c, l;
|
|
1783
1820
|
n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4], c = n[5], l = n[6]) : ({className: i, align: o, sideOffset: s, portal: c, scrollable: l, ...a} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s, n[5] = c, n[6] = l);
|
|
1784
1821
|
let u = o === void 0 ? "center" : o, d = s === void 0 ? 4 : s, f = c === void 0 || c, p = l !== void 0 && l, m = p && "overflow-auto", h;
|
|
1785
1822
|
n[7] !== i || n[8] !== m ? (h = r("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-hidden animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2", i, m), n[7] = i, n[8] = m, n[9] = h) : h = n[9];
|
|
1786
|
-
let g = p ? `calc(var(--radix-popover-content-available-height) - ${
|
|
1823
|
+
let g = p ? `calc(var(--radix-popover-content-available-height) - ${Pe}px)` : void 0, _;
|
|
1787
1824
|
n[10] !== a.style || n[11] !== g ? (_ = {
|
|
1788
1825
|
...a.style,
|
|
1789
1826
|
maxHeight: g
|
|
1790
1827
|
}, n[10] = a.style, n[11] = g, n[12] = _) : _ = n[12];
|
|
1791
1828
|
let v;
|
|
1792
|
-
n[13] !== u || n[14] !== a || n[15] !== t || n[16] !== d || n[17] !== h || n[18] !== _ ? (v = /* @__PURE__ */ (0,
|
|
1829
|
+
n[13] !== u || n[14] !== a || n[15] !== t || n[16] !== d || n[17] !== h || n[18] !== _ ? (v = /* @__PURE__ */ (0, j.jsx)(He, { children: /* @__PURE__ */ (0, j.jsx)(Mn, {
|
|
1793
1830
|
ref: t,
|
|
1794
1831
|
align: u,
|
|
1795
1832
|
sideOffset: d,
|
|
@@ -1800,15 +1837,15 @@ var On = dn, kn = pn, An = hn, jn = yn, Mn = bn, Nn = En, Pn = (e) => {
|
|
|
1800
1837
|
let y = v;
|
|
1801
1838
|
if (f) {
|
|
1802
1839
|
let e;
|
|
1803
|
-
return n[20] === y ? e = n[21] : (e = /* @__PURE__ */ (0,
|
|
1840
|
+
return n[20] === y ? e = n[21] : (e = /* @__PURE__ */ (0, j.jsx)(An, { children: y }), n[20] = y, n[21] = e), e;
|
|
1804
1841
|
}
|
|
1805
1842
|
return y;
|
|
1806
1843
|
});
|
|
1807
|
-
|
|
1844
|
+
Nn.displayName = vn.displayName;
|
|
1808
1845
|
//#endregion
|
|
1809
1846
|
//#region src/core/documentation/doc-lookup.ts
|
|
1810
|
-
async function
|
|
1811
|
-
let t =
|
|
1847
|
+
async function Pn(e) {
|
|
1848
|
+
let t = pe().inOrderIds.at(0);
|
|
1812
1849
|
if (t) try {
|
|
1813
1850
|
let n = await ye.request({
|
|
1814
1851
|
document: e,
|
|
@@ -1816,149 +1853,149 @@ async function Vn(e) {
|
|
|
1816
1853
|
});
|
|
1817
1854
|
if (!n || n.options.length === 0) return;
|
|
1818
1855
|
let r = e.split(".").pop() ?? e, i = n.options[0], a = n.options.find((e) => e.name === r) ?? i;
|
|
1819
|
-
a?.completion_info &&
|
|
1856
|
+
a?.completion_info && Je.set(_e, { documentation: a.completion_info });
|
|
1820
1857
|
} catch (t) {
|
|
1821
1858
|
n.debug(`Doc lookup failed for "${e}"`, t);
|
|
1822
1859
|
}
|
|
1823
1860
|
}
|
|
1824
1861
|
//#endregion
|
|
1825
1862
|
//#region src/core/documentation/DocHoverTarget.tsx
|
|
1826
|
-
var
|
|
1827
|
-
let t = (0,
|
|
1863
|
+
var Fn = (e) => {
|
|
1864
|
+
let t = (0, k.c)(8), { qualifiedName: n, children: r } = e, i;
|
|
1828
1865
|
t[0] === n ? i = t[1] : (i = () => {
|
|
1829
|
-
|
|
1866
|
+
Pn(n);
|
|
1830
1867
|
}, t[0] = n, t[1] = i);
|
|
1831
|
-
let a =
|
|
1868
|
+
let a = Te(i, 100), o;
|
|
1832
1869
|
t[2] === a ? o = t[3] : (o = () => a.cancel(), t[2] = a, t[3] = o);
|
|
1833
1870
|
let s;
|
|
1834
|
-
return t[4] !== r || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ (0,
|
|
1871
|
+
return t[4] !== r || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ (0, j.jsx)("span", {
|
|
1835
1872
|
onMouseEnter: a,
|
|
1836
1873
|
onMouseLeave: o,
|
|
1837
1874
|
children: r
|
|
1838
1875
|
}), t[4] = r, t[5] = a, t[6] = o, t[7] = s) : s = t[7], s;
|
|
1839
|
-
},
|
|
1876
|
+
}, In = Ke(!1);
|
|
1840
1877
|
//#endregion
|
|
1841
1878
|
//#region src/core/static/export-context.ts
|
|
1842
|
-
function
|
|
1879
|
+
function Ln(e) {
|
|
1843
1880
|
if (typeof e != "object" || !e) return !1;
|
|
1844
1881
|
let t = e;
|
|
1845
1882
|
return !(t.trusted !== !0 || t.notebookCode !== void 0 && typeof t.notebookCode != "string");
|
|
1846
1883
|
}
|
|
1847
|
-
function
|
|
1884
|
+
function Rn() {
|
|
1848
1885
|
let e = window?.__MARIMO_EXPORT_CONTEXT__;
|
|
1849
|
-
return
|
|
1886
|
+
return Ln(e) ? e : void 0;
|
|
1850
1887
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
1888
|
+
function zn() {
|
|
1889
|
+
return Rn()?.trusted === !0;
|
|
1853
1890
|
}
|
|
1854
|
-
function
|
|
1855
|
-
if (
|
|
1891
|
+
function Bn() {
|
|
1892
|
+
if (Je.get(In) || zn() || Je.get(Xe)) return !0;
|
|
1856
1893
|
try {
|
|
1857
|
-
if (
|
|
1894
|
+
if (De() === "read") return !0;
|
|
1858
1895
|
} catch {}
|
|
1859
1896
|
return !1;
|
|
1860
1897
|
}
|
|
1861
1898
|
//#endregion
|
|
1862
1899
|
//#region src/plugins/core/sanitize.ts
|
|
1863
|
-
var
|
|
1864
|
-
let t = e(
|
|
1865
|
-
if (t || n ||
|
|
1900
|
+
var Vn = Ke((e) => {
|
|
1901
|
+
let t = e(In), n = e(Xe);
|
|
1902
|
+
if (t || n || zn()) return !1;
|
|
1866
1903
|
let r = !0;
|
|
1867
1904
|
try {
|
|
1868
|
-
r =
|
|
1905
|
+
r = De() === "read";
|
|
1869
1906
|
} catch {
|
|
1870
1907
|
return !0;
|
|
1871
1908
|
}
|
|
1872
1909
|
return !r;
|
|
1873
1910
|
});
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1911
|
+
function Hn() {
|
|
1912
|
+
return D(Vn);
|
|
1876
1913
|
}
|
|
1877
1914
|
//#endregion
|
|
1878
1915
|
//#region src/plugins/core/RenderHTML.tsx
|
|
1879
|
-
var
|
|
1880
|
-
if (e instanceof
|
|
1881
|
-
},
|
|
1882
|
-
if (t instanceof
|
|
1883
|
-
if ((0,
|
|
1916
|
+
var Un = [], Wn = (e) => {
|
|
1917
|
+
if (e instanceof A.Element && !/^[A-Za-z][\w-]*$/.test(e.name)) return O.createElement(O.Fragment);
|
|
1918
|
+
}, Gn = (e, t) => {
|
|
1919
|
+
if (t instanceof A.Element && t.name === "body") {
|
|
1920
|
+
if ((0, O.isValidElement)(e) && "props" in e) {
|
|
1884
1921
|
let t = e.props.children;
|
|
1885
|
-
return /* @__PURE__ */ (0,
|
|
1922
|
+
return /* @__PURE__ */ (0, j.jsx)(j.Fragment, { children: t });
|
|
1886
1923
|
}
|
|
1887
1924
|
return;
|
|
1888
1925
|
}
|
|
1889
|
-
},
|
|
1890
|
-
if (t instanceof
|
|
1891
|
-
if ((0,
|
|
1926
|
+
}, Kn = (e, t) => {
|
|
1927
|
+
if (t instanceof A.Element && t.name === "html") {
|
|
1928
|
+
if ((0, O.isValidElement)(e) && "props" in e) {
|
|
1892
1929
|
let t = e.props.children;
|
|
1893
|
-
return /* @__PURE__ */ (0,
|
|
1930
|
+
return /* @__PURE__ */ (0, j.jsx)(j.Fragment, { children: t });
|
|
1894
1931
|
}
|
|
1895
1932
|
return;
|
|
1896
1933
|
}
|
|
1897
|
-
},
|
|
1898
|
-
if (e instanceof
|
|
1934
|
+
}, qn = (e) => {
|
|
1935
|
+
if (e instanceof A.Element && e.attribs && e.name === "iframe") {
|
|
1899
1936
|
let t = document.createElement("iframe");
|
|
1900
1937
|
return Object.entries(e.attribs).forEach(([e, n]) => {
|
|
1901
1938
|
e.startsWith("\"") && e.endsWith("\"") && (e = e.slice(1, -1)), t.setAttribute(e, n);
|
|
1902
|
-
}), /* @__PURE__ */ (0,
|
|
1939
|
+
}), /* @__PURE__ */ (0, j.jsx)("div", { dangerouslySetInnerHTML: { __html: t.outerHTML } });
|
|
1903
1940
|
}
|
|
1904
|
-
},
|
|
1905
|
-
if (e instanceof
|
|
1941
|
+
}, Jn = (e) => {
|
|
1942
|
+
if (e instanceof A.Element && e.name === "script") {
|
|
1906
1943
|
let t = e.attribs.src;
|
|
1907
1944
|
if (!t) return;
|
|
1908
|
-
if (!
|
|
1945
|
+
if (!Bn()) return n.warn(`[RenderHTML] refusing <script src> in untrusted context: ${t}`), /* @__PURE__ */ (0, j.jsx)(j.Fragment, {});
|
|
1909
1946
|
if (![...document.querySelectorAll("script[src]")].some((e) => e.getAttribute("src") === t)) {
|
|
1910
1947
|
let e = document.createElement("script");
|
|
1911
1948
|
e.src = t, document.head.append(e);
|
|
1912
1949
|
}
|
|
1913
|
-
return /* @__PURE__ */ (0,
|
|
1950
|
+
return /* @__PURE__ */ (0, j.jsx)(j.Fragment, {});
|
|
1914
1951
|
}
|
|
1915
|
-
},
|
|
1916
|
-
if (t instanceof
|
|
1952
|
+
}, Yn = (e, t) => {
|
|
1953
|
+
if (t instanceof A.Element && t.name === "a") {
|
|
1917
1954
|
let n = t.attribs.href;
|
|
1918
1955
|
if (n?.startsWith("#") && !n.startsWith("#code/")) {
|
|
1919
1956
|
let r = null;
|
|
1920
|
-
return (0,
|
|
1957
|
+
return (0, O.isValidElement)(e) && "props" in e && (r = e.props.children), /* @__PURE__ */ (0, j.jsx)(Dn, {
|
|
1921
1958
|
href: n,
|
|
1922
1959
|
...t.attribs,
|
|
1923
1960
|
children: r
|
|
1924
1961
|
});
|
|
1925
1962
|
}
|
|
1926
1963
|
}
|
|
1927
|
-
},
|
|
1928
|
-
if (t instanceof
|
|
1929
|
-
},
|
|
1930
|
-
if (!(t instanceof
|
|
1964
|
+
}, Xn = (e, t, n) => {
|
|
1965
|
+
if (t instanceof A.Element && t.name === "div" && t.attribs?.class?.includes("codehilite")) return /* @__PURE__ */ (0, j.jsx)(tr, { children: e }, n);
|
|
1966
|
+
}, Zn = (e, t, n) => {
|
|
1967
|
+
if (!(t instanceof A.Element) || t.name !== "img") return;
|
|
1931
1968
|
let r = t.attribs?.src;
|
|
1932
|
-
if (!(!r || !(0,
|
|
1933
|
-
},
|
|
1934
|
-
if (!(t instanceof
|
|
1969
|
+
if (!(!r || !(0, O.isValidElement)(e)) && !/^data:/i.test(r)) return (0, O.cloneElement)(e, { key: `${r}-${n}` });
|
|
1970
|
+
}, Qn = (e, t, n) => {
|
|
1971
|
+
if (!(t instanceof A.Element) || t.name !== "input" || t.attribs?.type !== "checkbox" || !(0, O.isValidElement)(e)) return;
|
|
1935
1972
|
let r = "checked" in t.attribs;
|
|
1936
|
-
return (0,
|
|
1937
|
-
},
|
|
1938
|
-
if (t instanceof
|
|
1973
|
+
return (0, O.cloneElement)(e, { key: `checkbox-${n}-${r}` });
|
|
1974
|
+
}, $n = (e, t) => {
|
|
1975
|
+
if (t instanceof A.Element && t.attribs?.["data-marimo-doc"]) {
|
|
1939
1976
|
let n = t.attribs["data-marimo-doc"];
|
|
1940
|
-
return /* @__PURE__ */ (0,
|
|
1977
|
+
return /* @__PURE__ */ (0, j.jsx)(Fn, {
|
|
1941
1978
|
qualifiedName: n,
|
|
1942
1979
|
children: e
|
|
1943
1980
|
});
|
|
1944
1981
|
}
|
|
1945
|
-
},
|
|
1946
|
-
if (t instanceof
|
|
1982
|
+
}, er = (e, t) => {
|
|
1983
|
+
if (t instanceof A.Element && t.attribs?.["data-tooltip"]) {
|
|
1947
1984
|
if ((t.name?.toLowerCase() ?? "").startsWith("marimo-")) return;
|
|
1948
1985
|
let n = t.attribs["data-tooltip"].replace(/^[\r\n]+|[\r\n]+$/g, "");
|
|
1949
|
-
return /* @__PURE__ */ (0,
|
|
1950
|
-
content: n.includes("\n") ? /* @__PURE__ */ (0,
|
|
1986
|
+
return /* @__PURE__ */ (0, j.jsx)(x, {
|
|
1987
|
+
content: n.includes("\n") ? /* @__PURE__ */ (0, j.jsx)("span", {
|
|
1951
1988
|
className: "whitespace-pre-wrap",
|
|
1952
|
-
children: n.split(/\r?\n/).map((e, t) => /* @__PURE__ */ (0,
|
|
1989
|
+
children: n.split(/\r?\n/).map((e, t) => /* @__PURE__ */ (0, j.jsxs)(O.Fragment, { children: [t > 0 && /* @__PURE__ */ (0, j.jsx)("br", {}), e] }, t))
|
|
1953
1990
|
}) : n,
|
|
1954
1991
|
children: e
|
|
1955
1992
|
});
|
|
1956
1993
|
}
|
|
1957
|
-
},
|
|
1958
|
-
let t = (0,
|
|
1959
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0,
|
|
1994
|
+
}, tr = (e) => {
|
|
1995
|
+
let t = (0, k.c)(3), { children: n } = e, r = (0, O.useRef)(null), i;
|
|
1996
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0, j.jsx)("div", {
|
|
1960
1997
|
className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1961
|
-
children: /* @__PURE__ */ (0,
|
|
1998
|
+
children: /* @__PURE__ */ (0, j.jsx)(d, {
|
|
1962
1999
|
tooltip: !1,
|
|
1963
2000
|
className: "p-1",
|
|
1964
2001
|
value: () => {
|
|
@@ -1968,46 +2005,46 @@ var Xn = [], Zn = (e) => {
|
|
|
1968
2005
|
})
|
|
1969
2006
|
}), t[0] = i) : i = t[0];
|
|
1970
2007
|
let a;
|
|
1971
|
-
return t[1] === n ? a = t[2] : (a = /* @__PURE__ */ (0,
|
|
2008
|
+
return t[1] === n ? a = t[2] : (a = /* @__PURE__ */ (0, j.jsxs)("div", {
|
|
1972
2009
|
className: "relative group codehilite-wrapper",
|
|
1973
2010
|
ref: r,
|
|
1974
2011
|
children: [n, i]
|
|
1975
2012
|
}), t[1] = n, t[2] = a), a;
|
|
1976
|
-
},
|
|
2013
|
+
}, nr = ({ html: e, additionalReplacements: t = Un, alwaysSanitizeHtml: n = !0 }) => /* @__PURE__ */ (0, j.jsx)(rr, {
|
|
1977
2014
|
html: e,
|
|
1978
2015
|
alwaysSanitizeHtml: n,
|
|
1979
2016
|
additionalReplacements: t
|
|
1980
|
-
}),
|
|
1981
|
-
let t = (0,
|
|
2017
|
+
}), rr = (e) => {
|
|
2018
|
+
let t = (0, k.c)(5), { html: n, additionalReplacements: r, alwaysSanitizeHtml: i } = e, a = r === void 0 ? Un : r, o = Hn(), s;
|
|
1982
2019
|
bb0: {
|
|
1983
2020
|
if (i || o) {
|
|
1984
2021
|
let e;
|
|
1985
|
-
t[0] === n ? e = t[1] : (e =
|
|
2022
|
+
t[0] === n ? e = t[1] : (e = oe(n), t[0] = n, t[1] = e), s = e;
|
|
1986
2023
|
break bb0;
|
|
1987
2024
|
}
|
|
1988
2025
|
s = n;
|
|
1989
2026
|
}
|
|
1990
2027
|
let c = s, l;
|
|
1991
|
-
return t[2] !== a || t[3] !== c ? (l =
|
|
2028
|
+
return t[2] !== a || t[3] !== c ? (l = ir({
|
|
1992
2029
|
html: c,
|
|
1993
2030
|
additionalReplacements: a
|
|
1994
2031
|
}), t[2] = a, t[3] = c, t[4] = l) : l = t[4], l;
|
|
1995
2032
|
};
|
|
1996
|
-
function
|
|
2033
|
+
function ir({ html: e, additionalReplacements: t = Un }) {
|
|
1997
2034
|
let n = [
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2035
|
+
Wn,
|
|
2036
|
+
qn,
|
|
2037
|
+
Jn,
|
|
2001
2038
|
...t
|
|
2002
2039
|
], r = [
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
], i = [
|
|
2010
|
-
return
|
|
2040
|
+
Xn,
|
|
2041
|
+
Yn,
|
|
2042
|
+
$n,
|
|
2043
|
+
er,
|
|
2044
|
+
Gn,
|
|
2045
|
+
Kn
|
|
2046
|
+
], i = [Zn, Qn];
|
|
2047
|
+
return pt(e, {
|
|
2011
2048
|
replace: (e, t) => {
|
|
2012
2049
|
for (let r of n) {
|
|
2013
2050
|
let n = r(e, t);
|
|
@@ -2034,115 +2071,115 @@ function dr({ html: e, additionalReplacements: t = Xn }) {
|
|
|
2034
2071
|
}
|
|
2035
2072
|
//#endregion
|
|
2036
2073
|
//#region src/utils/json/base64.ts
|
|
2037
|
-
function
|
|
2074
|
+
function ar(e, t) {
|
|
2038
2075
|
return `data:${t};base64,${e}`;
|
|
2039
2076
|
}
|
|
2040
|
-
function
|
|
2077
|
+
function or(e) {
|
|
2041
2078
|
return e.startsWith("data:") && e.includes(";base64,");
|
|
2042
2079
|
}
|
|
2043
|
-
function
|
|
2080
|
+
function sr(e) {
|
|
2044
2081
|
return e.split(",")[1];
|
|
2045
2082
|
}
|
|
2046
|
-
function
|
|
2083
|
+
function cr(e) {
|
|
2047
2084
|
let t = globalThis.atob(e), n = t.length, r = new Uint8Array(n);
|
|
2048
2085
|
for (let e = 0; e < n; e++) r[e] = t.charCodeAt(e);
|
|
2049
2086
|
return r;
|
|
2050
2087
|
}
|
|
2051
|
-
var
|
|
2052
|
-
function
|
|
2053
|
-
let t =
|
|
2088
|
+
var lr = Uint8Array.fromBase64 ?? cr;
|
|
2089
|
+
function ur(e) {
|
|
2090
|
+
let t = lr(e);
|
|
2054
2091
|
return new DataView(t.buffer);
|
|
2055
2092
|
}
|
|
2056
|
-
function
|
|
2093
|
+
function dr(e) {
|
|
2057
2094
|
let t = "", n = e.length;
|
|
2058
2095
|
for (let r = 0; r < n; r++) t += String.fromCharCode(e[r]);
|
|
2059
2096
|
return globalThis.btoa(t);
|
|
2060
2097
|
}
|
|
2061
|
-
var
|
|
2062
|
-
function
|
|
2063
|
-
return
|
|
2098
|
+
var fr = "toBase64" in Uint8Array.prototype ? (e) => e.toBase64() : dr;
|
|
2099
|
+
function pr(e) {
|
|
2100
|
+
return fr(new Uint8Array(e.buffer, e.byteOffset, e.byteLength));
|
|
2064
2101
|
}
|
|
2065
|
-
function
|
|
2066
|
-
return (e.buffers ?? []).map(
|
|
2102
|
+
function mr(e) {
|
|
2103
|
+
return (e.buffers ?? []).map(ur);
|
|
2067
2104
|
}
|
|
2068
2105
|
//#endregion
|
|
2069
2106
|
//#region ../node_modules/.pnpm/@radix-ui+react-icons@1.3.2_react@19.3.0/node_modules/@radix-ui/react-icons/dist/react-icons.esm.js
|
|
2070
|
-
function
|
|
2107
|
+
function G(e, t) {
|
|
2071
2108
|
if (e == null) return {};
|
|
2072
2109
|
var n = {}, r = Object.keys(e), i, a;
|
|
2073
2110
|
for (a = 0; a < r.length; a++) i = r[a], !(t.indexOf(i) >= 0) && (n[i] = e[i]);
|
|
2074
2111
|
return n;
|
|
2075
2112
|
}
|
|
2076
|
-
var
|
|
2077
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2078
|
-
return (0,
|
|
2113
|
+
var hr = ["color"], gr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2114
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, hr);
|
|
2115
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2079
2116
|
width: "15",
|
|
2080
2117
|
height: "15",
|
|
2081
2118
|
viewBox: "0 0 15 15",
|
|
2082
2119
|
fill: "none",
|
|
2083
2120
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2084
|
-
}, i, { ref: t }), (0,
|
|
2121
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2085
2122
|
d: "M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z",
|
|
2086
2123
|
fill: r,
|
|
2087
2124
|
fillRule: "evenodd",
|
|
2088
2125
|
clipRule: "evenodd"
|
|
2089
|
-
}), (0,
|
|
2126
|
+
}), (0, O.createElement)("rect", {
|
|
2090
2127
|
x: "7",
|
|
2091
2128
|
y: "5",
|
|
2092
2129
|
width: "1",
|
|
2093
2130
|
height: "1",
|
|
2094
2131
|
rx: ".5",
|
|
2095
2132
|
fill: r
|
|
2096
|
-
}), (0,
|
|
2133
|
+
}), (0, O.createElement)("rect", {
|
|
2097
2134
|
x: "7",
|
|
2098
2135
|
y: "3",
|
|
2099
2136
|
width: "1",
|
|
2100
2137
|
height: "1",
|
|
2101
2138
|
rx: ".5",
|
|
2102
2139
|
fill: r
|
|
2103
|
-
}), (0,
|
|
2140
|
+
}), (0, O.createElement)("rect", {
|
|
2104
2141
|
x: "7",
|
|
2105
2142
|
y: "7",
|
|
2106
2143
|
width: "1",
|
|
2107
2144
|
height: "1",
|
|
2108
2145
|
rx: ".5",
|
|
2109
2146
|
fill: r
|
|
2110
|
-
}), (0,
|
|
2147
|
+
}), (0, O.createElement)("rect", {
|
|
2111
2148
|
x: "5",
|
|
2112
2149
|
y: "7",
|
|
2113
2150
|
width: "1",
|
|
2114
2151
|
height: "1",
|
|
2115
2152
|
rx: ".5",
|
|
2116
2153
|
fill: r
|
|
2117
|
-
}), (0,
|
|
2154
|
+
}), (0, O.createElement)("rect", {
|
|
2118
2155
|
x: "3",
|
|
2119
2156
|
y: "7",
|
|
2120
2157
|
width: "1",
|
|
2121
2158
|
height: "1",
|
|
2122
2159
|
rx: ".5",
|
|
2123
2160
|
fill: r
|
|
2124
|
-
}), (0,
|
|
2161
|
+
}), (0, O.createElement)("rect", {
|
|
2125
2162
|
x: "9",
|
|
2126
2163
|
y: "7",
|
|
2127
2164
|
width: "1",
|
|
2128
2165
|
height: "1",
|
|
2129
2166
|
rx: ".5",
|
|
2130
2167
|
fill: r
|
|
2131
|
-
}), (0,
|
|
2168
|
+
}), (0, O.createElement)("rect", {
|
|
2132
2169
|
x: "11",
|
|
2133
2170
|
y: "7",
|
|
2134
2171
|
width: "1",
|
|
2135
2172
|
height: "1",
|
|
2136
2173
|
rx: ".5",
|
|
2137
2174
|
fill: r
|
|
2138
|
-
}), (0,
|
|
2175
|
+
}), (0, O.createElement)("rect", {
|
|
2139
2176
|
x: "7",
|
|
2140
2177
|
y: "9",
|
|
2141
2178
|
width: "1",
|
|
2142
2179
|
height: "1",
|
|
2143
2180
|
rx: ".5",
|
|
2144
2181
|
fill: r
|
|
2145
|
-
}), (0,
|
|
2182
|
+
}), (0, O.createElement)("rect", {
|
|
2146
2183
|
x: "7",
|
|
2147
2184
|
y: "11",
|
|
2148
2185
|
width: "1",
|
|
@@ -2150,126 +2187,126 @@ var Sr = ["color"], Cr = /*#__PURE__*/ (0, D.forwardRef)(function(e, t) {
|
|
|
2150
2187
|
rx: ".5",
|
|
2151
2188
|
fill: r
|
|
2152
2189
|
}));
|
|
2153
|
-
}),
|
|
2154
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2155
|
-
return (0,
|
|
2190
|
+
}), _r = ["color"], vr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2191
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, _r);
|
|
2192
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2156
2193
|
width: "15",
|
|
2157
2194
|
height: "15",
|
|
2158
2195
|
viewBox: "0 0 15 15",
|
|
2159
2196
|
fill: "none",
|
|
2160
2197
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2161
|
-
}, i, { ref: t }), (0,
|
|
2198
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2162
2199
|
d: "M12.5 3L2.5 3.00002C1.67157 3.00002 1 3.6716 1 4.50002V9.50003C1 10.3285 1.67157 11 2.5 11H7.50003C7.63264 11 7.75982 11.0527 7.85358 11.1465L10 13.2929V11.5C10 11.2239 10.2239 11 10.5 11H12.5C13.3284 11 14 10.3285 14 9.50003V4.5C14 3.67157 13.3284 3 12.5 3ZM2.49999 2.00002L12.5 2C13.8807 2 15 3.11929 15 4.5V9.50003C15 10.8807 13.8807 12 12.5 12H11V14.5C11 14.7022 10.8782 14.8845 10.6913 14.9619C10.5045 15.0393 10.2894 14.9965 10.1464 14.8536L7.29292 12H2.5C1.11929 12 0 10.8807 0 9.50003V4.50002C0 3.11931 1.11928 2.00003 2.49999 2.00002Z",
|
|
2163
2200
|
fill: r,
|
|
2164
2201
|
fillRule: "evenodd",
|
|
2165
2202
|
clipRule: "evenodd"
|
|
2166
2203
|
}));
|
|
2167
|
-
}),
|
|
2168
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2169
|
-
return (0,
|
|
2204
|
+
}), yr = ["color"], br = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2205
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, yr);
|
|
2206
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2170
2207
|
width: "15",
|
|
2171
2208
|
height: "15",
|
|
2172
2209
|
viewBox: "0 0 15 15",
|
|
2173
2210
|
fill: "none",
|
|
2174
2211
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2175
|
-
}, i, { ref: t }), (0,
|
|
2212
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2176
2213
|
d: "M11.4669 3.72684C11.7558 3.91574 11.8369 4.30308 11.648 4.59198L7.39799 11.092C7.29783 11.2452 7.13556 11.3467 6.95402 11.3699C6.77247 11.3931 6.58989 11.3355 6.45446 11.2124L3.70446 8.71241C3.44905 8.48022 3.43023 8.08494 3.66242 7.82953C3.89461 7.57412 4.28989 7.55529 4.5453 7.78749L6.75292 9.79441L10.6018 3.90792C10.7907 3.61902 11.178 3.53795 11.4669 3.72684Z",
|
|
2177
2214
|
fill: r,
|
|
2178
2215
|
fillRule: "evenodd",
|
|
2179
2216
|
clipRule: "evenodd"
|
|
2180
2217
|
}));
|
|
2181
|
-
}),
|
|
2182
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2183
|
-
return (0,
|
|
2218
|
+
}), xr = ["color"], Sr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2219
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, xr);
|
|
2220
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2184
2221
|
width: "15",
|
|
2185
2222
|
height: "15",
|
|
2186
2223
|
viewBox: "0 0 15 15",
|
|
2187
2224
|
fill: "none",
|
|
2188
2225
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2189
|
-
}, i, { ref: t }), (0,
|
|
2226
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2190
2227
|
d: "M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z",
|
|
2191
2228
|
fill: r,
|
|
2192
2229
|
fillRule: "evenodd",
|
|
2193
2230
|
clipRule: "evenodd"
|
|
2194
2231
|
}));
|
|
2195
|
-
}),
|
|
2196
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2197
|
-
return (0,
|
|
2232
|
+
}), Cr = ["color"], wr = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2233
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, Cr);
|
|
2234
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2198
2235
|
width: "15",
|
|
2199
2236
|
height: "15",
|
|
2200
2237
|
viewBox: "0 0 15 15",
|
|
2201
2238
|
fill: "none",
|
|
2202
2239
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2203
|
-
}, i, { ref: t }), (0,
|
|
2240
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2204
2241
|
d: "M6.1584 3.13508C6.35985 2.94621 6.67627 2.95642 6.86514 3.15788L10.6151 7.15788C10.7954 7.3502 10.7954 7.64949 10.6151 7.84182L6.86514 11.8418C6.67627 12.0433 6.35985 12.0535 6.1584 11.8646C5.95694 11.6757 5.94673 11.3593 6.1356 11.1579L9.565 7.49985L6.1356 3.84182C5.94673 3.64036 5.95694 3.32394 6.1584 3.13508Z",
|
|
2205
2242
|
fill: r,
|
|
2206
2243
|
fillRule: "evenodd",
|
|
2207
2244
|
clipRule: "evenodd"
|
|
2208
2245
|
}));
|
|
2209
|
-
}),
|
|
2210
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2211
|
-
return (0,
|
|
2246
|
+
}), Tr = ["color"], Er = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2247
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, Tr);
|
|
2248
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2212
2249
|
width: "15",
|
|
2213
2250
|
height: "15",
|
|
2214
2251
|
viewBox: "0 0 15 15",
|
|
2215
2252
|
fill: "none",
|
|
2216
2253
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2217
|
-
}, i, { ref: t }), (0,
|
|
2254
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2218
2255
|
d: "M9.875 7.5C9.875 8.81168 8.81168 9.875 7.5 9.875C6.18832 9.875 5.125 8.81168 5.125 7.5C5.125 6.18832 6.18832 5.125 7.5 5.125C8.81168 5.125 9.875 6.18832 9.875 7.5Z",
|
|
2219
2256
|
fill: r
|
|
2220
2257
|
}));
|
|
2221
|
-
}),
|
|
2222
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2223
|
-
return (0,
|
|
2258
|
+
}), Dr = ["color"], Or = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2259
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, Dr);
|
|
2260
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2224
2261
|
width: "15",
|
|
2225
2262
|
height: "15",
|
|
2226
2263
|
viewBox: "0 0 15 15",
|
|
2227
2264
|
fill: "none",
|
|
2228
2265
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2229
|
-
}, i, { ref: t }), (0,
|
|
2266
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2230
2267
|
d: "M2.05005 13.5C2.05005 13.7485 2.25152 13.95 2.50005 13.95C2.74858 13.95 2.95005 13.7485 2.95005 13.5L2.95005 1.49995C2.95005 1.25142 2.74858 1.04995 2.50005 1.04995C2.25152 1.04995 2.05005 1.25142 2.05005 1.49995L2.05005 13.5ZM8.4317 11.0681C8.60743 11.2439 8.89236 11.2439 9.06809 11.0681C9.24383 10.8924 9.24383 10.6075 9.06809 10.4317L6.58629 7.94993L14.5 7.94993C14.7485 7.94993 14.95 7.74846 14.95 7.49993C14.95 7.2514 14.7485 7.04993 14.5 7.04993L6.58629 7.04993L9.06809 4.56813C9.24383 4.39239 9.24383 4.10746 9.06809 3.93173C8.89236 3.75599 8.60743 3.75599 8.4317 3.93173L5.1817 7.18173C5.00596 7.35746 5.00596 7.64239 5.1817 7.81812L8.4317 11.0681Z",
|
|
2231
2268
|
fill: r,
|
|
2232
2269
|
fillRule: "evenodd",
|
|
2233
2270
|
clipRule: "evenodd"
|
|
2234
2271
|
}));
|
|
2235
|
-
}),
|
|
2236
|
-
var n = e.color, r = n === void 0 ? "currentColor" : n, i =
|
|
2237
|
-
return (0,
|
|
2272
|
+
}), kr = ["color"], Ar = /*#__PURE__*/ (0, O.forwardRef)(function(e, t) {
|
|
2273
|
+
var n = e.color, r = n === void 0 ? "currentColor" : n, i = G(e, kr);
|
|
2274
|
+
return (0, O.createElement)("svg", Object.assign({
|
|
2238
2275
|
width: "15",
|
|
2239
2276
|
height: "15",
|
|
2240
2277
|
viewBox: "0 0 15 15",
|
|
2241
2278
|
fill: "none",
|
|
2242
2279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2243
|
-
}, i, { ref: t }), (0,
|
|
2280
|
+
}, i, { ref: t }), (0, O.createElement)("path", {
|
|
2244
2281
|
d: "M12.95 1.50005C12.95 1.25152 12.7485 1.05005 12.5 1.05005C12.2514 1.05005 12.05 1.25152 12.05 1.50005L12.05 13.5C12.05 13.7486 12.2514 13.95 12.5 13.95C12.7485 13.95 12.95 13.7486 12.95 13.5L12.95 1.50005ZM6.5683 3.93188C6.39257 3.75614 6.10764 3.75614 5.93191 3.93188C5.75617 4.10761 5.75617 4.39254 5.93191 4.56827L8.41371 7.05007L0.499984 7.05007C0.251456 7.05007 0.0499847 7.25155 0.0499847 7.50007C0.0499846 7.7486 0.251457 7.95007 0.499984 7.95007L8.41371 7.95007L5.93191 10.4319C5.75617 10.6076 5.75617 10.8925 5.93191 11.0683C6.10764 11.244 6.39257 11.244 6.56831 11.0683L9.8183 7.81827C9.99404 7.64254 9.99404 7.35761 9.8183 7.18188L6.5683 3.93188Z",
|
|
2245
2282
|
fill: r,
|
|
2246
2283
|
fillRule: "evenodd",
|
|
2247
2284
|
clipRule: "evenodd"
|
|
2248
2285
|
}));
|
|
2249
|
-
}),
|
|
2250
|
-
let n = (0,
|
|
2286
|
+
}), jr = zt, Mr = O.forwardRef((e, t) => {
|
|
2287
|
+
let n = (0, k.c)(9), i, a;
|
|
2251
2288
|
n[0] === e ? (i = n[1], a = n[2]) : ({className: i, ...a} = e, n[0] = e, n[1] = i, n[2] = a);
|
|
2252
2289
|
let o;
|
|
2253
2290
|
n[3] === i ? o = n[4] : (o = r("border-b", i), n[3] = i, n[4] = o);
|
|
2254
2291
|
let s;
|
|
2255
|
-
return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0,
|
|
2292
|
+
return n[5] !== a || n[6] !== t || n[7] !== o ? (s = /* @__PURE__ */ (0, j.jsx)(Zt, {
|
|
2256
2293
|
ref: t,
|
|
2257
2294
|
className: o,
|
|
2258
2295
|
...a
|
|
2259
2296
|
}), n[5] = a, n[6] = t, n[7] = o, n[8] = s) : s = n[8], s;
|
|
2260
2297
|
});
|
|
2261
|
-
|
|
2262
|
-
var
|
|
2263
|
-
let n = (0,
|
|
2298
|
+
Mr.displayName = "AccordionItem";
|
|
2299
|
+
var Nr = O.forwardRef((e, t) => {
|
|
2300
|
+
let n = (0, k.c)(12), i, a, o;
|
|
2264
2301
|
n[0] === e ? (i = n[1], a = n[2], o = n[3]) : ({className: a, children: i, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o);
|
|
2265
2302
|
let s;
|
|
2266
2303
|
n[4] === a ? s = n[5] : (s = r("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180 text-start", a), n[4] = a, n[5] = s);
|
|
2267
2304
|
let c;
|
|
2268
|
-
n[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0,
|
|
2305
|
+
n[6] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, j.jsx)(Ce, { className: "h-4 w-4 transition-transform duration-200" }), n[6] = c) : c = n[6];
|
|
2269
2306
|
let l;
|
|
2270
|
-
return n[7] !== i || n[8] !== o || n[9] !== t || n[10] !== s ? (l = /* @__PURE__ */ (0,
|
|
2307
|
+
return n[7] !== i || n[8] !== o || n[9] !== t || n[10] !== s ? (l = /* @__PURE__ */ (0, j.jsx)($t, {
|
|
2271
2308
|
className: "flex",
|
|
2272
|
-
children: /* @__PURE__ */ (0,
|
|
2309
|
+
children: /* @__PURE__ */ (0, j.jsxs)(z, {
|
|
2273
2310
|
ref: t,
|
|
2274
2311
|
className: s,
|
|
2275
2312
|
...o,
|
|
@@ -2277,31 +2314,31 @@ var Br = D.forwardRef((e, t) => {
|
|
|
2277
2314
|
})
|
|
2278
2315
|
}), n[7] = i, n[8] = o, n[9] = t, n[10] = s, n[11] = l) : l = n[11], l;
|
|
2279
2316
|
});
|
|
2280
|
-
|
|
2281
|
-
var
|
|
2282
|
-
let n = (0,
|
|
2317
|
+
Nr.displayName = z.displayName;
|
|
2318
|
+
var Pr = O.forwardRef((e, t) => {
|
|
2319
|
+
let n = (0, k.c)(17), i, a, o, s;
|
|
2283
2320
|
n[0] === e ? (i = n[1], a = n[2], o = n[3], s = n[4]) : ({className: a, children: i, wrapperClassName: s, ...o} = e, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s);
|
|
2284
2321
|
let c;
|
|
2285
2322
|
n[5] === a ? c = n[6] : (c = r("overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down", a), n[5] = a, n[6] = c);
|
|
2286
2323
|
let l;
|
|
2287
2324
|
n[7] === s ? l = n[8] : (l = r("pb-4 pt-0", s), n[7] = s, n[8] = l);
|
|
2288
2325
|
let u;
|
|
2289
|
-
n[9] !== i || n[10] !== l ? (u = /* @__PURE__ */ (0,
|
|
2326
|
+
n[9] !== i || n[10] !== l ? (u = /* @__PURE__ */ (0, j.jsx)("div", {
|
|
2290
2327
|
className: l,
|
|
2291
2328
|
children: i
|
|
2292
2329
|
}), n[9] = i, n[10] = l, n[11] = u) : u = n[11];
|
|
2293
2330
|
let d;
|
|
2294
|
-
return n[12] !== o || n[13] !== t || n[14] !== c || n[15] !== u ? (d = /* @__PURE__ */ (0,
|
|
2331
|
+
return n[12] !== o || n[13] !== t || n[14] !== c || n[15] !== u ? (d = /* @__PURE__ */ (0, j.jsx)(nn, {
|
|
2295
2332
|
ref: t,
|
|
2296
2333
|
className: c,
|
|
2297
2334
|
...o,
|
|
2298
2335
|
children: u
|
|
2299
2336
|
}), n[12] = o, n[13] = t, n[14] = c, n[15] = u, n[16] = d) : d = n[16], d;
|
|
2300
2337
|
});
|
|
2301
|
-
|
|
2338
|
+
Pr.displayName = nn.displayName;
|
|
2302
2339
|
//#endregion
|
|
2303
2340
|
//#region src/utils/multi-map.ts
|
|
2304
|
-
var
|
|
2341
|
+
var Fr = /* @__PURE__ */ e(se(), 1), Ir = class {
|
|
2305
2342
|
map = /* @__PURE__ */ new Map();
|
|
2306
2343
|
get(e) {
|
|
2307
2344
|
return this.map.get(e) ?? [];
|
|
@@ -2344,11 +2381,11 @@ var Hr = /* @__PURE__ */ e(xe(), 1), Ur = class {
|
|
|
2344
2381
|
};
|
|
2345
2382
|
//#endregion
|
|
2346
2383
|
//#region src/core/ai/context/registry.ts
|
|
2347
|
-
function
|
|
2384
|
+
function Lr(e) {
|
|
2348
2385
|
let t = e.indexOf("://");
|
|
2349
2386
|
if (t !== -1) return e.slice(0, t);
|
|
2350
2387
|
}
|
|
2351
|
-
var
|
|
2388
|
+
var Rr = class {
|
|
2352
2389
|
async getAttachments(e) {
|
|
2353
2390
|
return [];
|
|
2354
2391
|
}
|
|
@@ -2370,7 +2407,7 @@ var Gr = class {
|
|
|
2370
2407
|
section: t?.section || this.title
|
|
2371
2408
|
};
|
|
2372
2409
|
}
|
|
2373
|
-
},
|
|
2410
|
+
}, zr = class {
|
|
2374
2411
|
providers = /* @__PURE__ */ new Set();
|
|
2375
2412
|
register(e) {
|
|
2376
2413
|
return this.providers.add(e), this;
|
|
@@ -2388,14 +2425,14 @@ var Gr = class {
|
|
|
2388
2425
|
return [...this.providers].flatMap((t) => t.parseContextIds(e));
|
|
2389
2426
|
}
|
|
2390
2427
|
findProviderForUri(e) {
|
|
2391
|
-
let t =
|
|
2428
|
+
let t = Lr(e);
|
|
2392
2429
|
if (t) return [...this.providers].find((n) => n.contextType === t && n.getItems().some((t) => t.uri === e));
|
|
2393
2430
|
}
|
|
2394
2431
|
resolveItems(e) {
|
|
2395
2432
|
if (e.length === 0) return [];
|
|
2396
|
-
let t = new
|
|
2433
|
+
let t = new Ir();
|
|
2397
2434
|
for (let n of e) {
|
|
2398
|
-
let e =
|
|
2435
|
+
let e = Lr(n);
|
|
2399
2436
|
e && t.add(e, n);
|
|
2400
2437
|
}
|
|
2401
2438
|
let n = /* @__PURE__ */ new Map();
|
|
@@ -2426,7 +2463,7 @@ var Gr = class {
|
|
|
2426
2463
|
async getAttachmentsForContext(e) {
|
|
2427
2464
|
let t = this.resolveItems(e);
|
|
2428
2465
|
if (t.length === 0) return [];
|
|
2429
|
-
let r = new
|
|
2466
|
+
let r = new Ir();
|
|
2430
2467
|
for (let e of t) {
|
|
2431
2468
|
let t = this.findProviderForUri(e.uri);
|
|
2432
2469
|
t && r.add(t, e);
|
|
@@ -2441,30 +2478,30 @@ var Gr = class {
|
|
|
2441
2478
|
return (await Promise.all(i)).flat();
|
|
2442
2479
|
}
|
|
2443
2480
|
};
|
|
2444
|
-
|
|
2481
|
+
ae([me()], zr.prototype, "getAllItems", null);
|
|
2445
2482
|
//#endregion
|
|
2446
2483
|
//#region src/core/ai/context/utils.ts
|
|
2447
|
-
function
|
|
2484
|
+
function Br(e) {
|
|
2448
2485
|
return e.replaceAll("<", "<").replaceAll(">", ">");
|
|
2449
2486
|
}
|
|
2450
|
-
function
|
|
2487
|
+
function Vr(e) {
|
|
2451
2488
|
let { type: t, data: n, details: r } = e, i = `<${t}`;
|
|
2452
2489
|
for (let [e, t] of Object.entries(n)) if (t !== void 0) {
|
|
2453
|
-
let n =
|
|
2490
|
+
let n = Br(typeof t == "object" && t ? JSON.stringify(t) : String(t));
|
|
2454
2491
|
i += ` ${e}="${n}"`;
|
|
2455
2492
|
}
|
|
2456
|
-
return i += ">", r && (i +=
|
|
2493
|
+
return i += ">", r && (i += Br(r)), i += `</${t}>`, i;
|
|
2457
2494
|
}
|
|
2458
2495
|
//#endregion
|
|
2459
2496
|
//#region src/core/ai/context/providers/common.ts
|
|
2460
|
-
var
|
|
2497
|
+
var Hr = {
|
|
2461
2498
|
LOCAL_TABLE: 7,
|
|
2462
2499
|
REMOTE_TABLE: 5,
|
|
2463
2500
|
HIGH: 4,
|
|
2464
2501
|
MEDIUM: 3,
|
|
2465
2502
|
CELL_OUTPUT: 2,
|
|
2466
2503
|
LOW: 2
|
|
2467
|
-
},
|
|
2504
|
+
}, Ur = {
|
|
2468
2505
|
ERROR: {
|
|
2469
2506
|
name: "Error",
|
|
2470
2507
|
rank: 1
|
|
@@ -2489,19 +2526,19 @@ var Yr = {
|
|
|
2489
2526
|
name: "File",
|
|
2490
2527
|
rank: 6
|
|
2491
2528
|
}
|
|
2492
|
-
},
|
|
2529
|
+
}, Wr = "datasource", Gr = class extends Rr {
|
|
2493
2530
|
title = "Datasource";
|
|
2494
2531
|
mentionPrefix = "@";
|
|
2495
|
-
contextType =
|
|
2532
|
+
contextType = Wr;
|
|
2496
2533
|
connectionsMap;
|
|
2497
2534
|
dataframes;
|
|
2498
2535
|
constructor(e, t) {
|
|
2499
|
-
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) =>
|
|
2536
|
+
super(), this.connectionsMap = e, this.dataframes = [...t.values()].filter((e) => ce(e) === "dataframe");
|
|
2500
2537
|
}
|
|
2501
2538
|
getItems() {
|
|
2502
2539
|
return [...this.connectionsMap.values()].map((e) => {
|
|
2503
2540
|
let t = "Database schema.", n = { connection: e };
|
|
2504
|
-
return
|
|
2541
|
+
return re.has(e.name) && (n.tables = this.dataframes, t = "Database schema and the dataframes that can be queried"), e.databases.length === 0 && (n.tables?.length ?? 0) === 0 ? null : {
|
|
2505
2542
|
uri: this.asURI(e.name),
|
|
2506
2543
|
name: e.name,
|
|
2507
2544
|
description: t,
|
|
@@ -2512,10 +2549,10 @@ var Yr = {
|
|
|
2512
2549
|
}
|
|
2513
2550
|
formatContext(e) {
|
|
2514
2551
|
let t = e.data, { name: n, display_name: r, source: i, ...a } = t.connection, o = a;
|
|
2515
|
-
return
|
|
2552
|
+
return re.has(n) || (o = {
|
|
2516
2553
|
...a,
|
|
2517
2554
|
engine_name: n
|
|
2518
|
-
}),
|
|
2555
|
+
}), Vr({
|
|
2519
2556
|
type: this.contextType,
|
|
2520
2557
|
data: {
|
|
2521
2558
|
connection: o,
|
|
@@ -2525,86 +2562,96 @@ var Yr = {
|
|
|
2525
2562
|
}
|
|
2526
2563
|
formatCompletion(e) {
|
|
2527
2564
|
let t = e.data, n = t.connection, r = t.tables, i = n.name;
|
|
2528
|
-
return
|
|
2565
|
+
return re.has(n.name) && (i = "In-Memory"), {
|
|
2529
2566
|
label: `@${i}`,
|
|
2530
2567
|
displayLabel: i,
|
|
2531
|
-
detail:
|
|
2532
|
-
boost:
|
|
2568
|
+
detail: xe(n.dialect),
|
|
2569
|
+
boost: Hr.MEDIUM,
|
|
2533
2570
|
type: this.contextType,
|
|
2534
|
-
section:
|
|
2571
|
+
section: Ur.DATA_SOURCES,
|
|
2535
2572
|
info: () => {
|
|
2536
2573
|
let e = document.createElement("div");
|
|
2537
|
-
return e.classList.add("mo-cm-tooltip", "docs-documentation"), (0,
|
|
2574
|
+
return e.classList.add("mo-cm-tooltip", "docs-documentation"), (0, Fr.createRoot)(e).render(he(n, r)), e;
|
|
2538
2575
|
}
|
|
2539
2576
|
};
|
|
2540
2577
|
}
|
|
2541
2578
|
};
|
|
2542
|
-
function
|
|
2543
|
-
let n = t.get(
|
|
2579
|
+
function Kr(e, t) {
|
|
2580
|
+
let n = t.get(fe(e))?.code;
|
|
2544
2581
|
if (!n || n.trim() === "") return null;
|
|
2545
|
-
let [r, i, a] =
|
|
2546
|
-
return o ? `@${
|
|
2582
|
+
let [r, i, a] = le.sql.transformIn(n), o = t.get(be).connectionsMap.get(a.engine);
|
|
2583
|
+
return o ? `@${Wr}://${o.name}` : null;
|
|
2547
2584
|
}
|
|
2548
|
-
function
|
|
2549
|
-
let n =
|
|
2585
|
+
function qr(e, t) {
|
|
2586
|
+
let n = Kr(e, t);
|
|
2550
2587
|
if (!n) return null;
|
|
2551
|
-
let r = t.get(
|
|
2588
|
+
let r = t.get(be).connectionsMap, i = new Gr(r, t.get(ne)), a = n.slice(1), o = i.getItems().find((e) => e.uri === a);
|
|
2552
2589
|
return o ? i.formatContext(o) : null;
|
|
2553
2590
|
}
|
|
2554
2591
|
//#endregion
|
|
2555
|
-
//#region src/core/
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
let t = (0, O.c)(16), { mode: n } = T(ke), { updateCellConfig: r } = Se(), i;
|
|
2559
|
-
t[0] === e ? i = t[1] : (i = ve(pe(e), ai, Object.is), t[0] = e, t[1] = i);
|
|
2560
|
-
let a = T(i), o;
|
|
2561
|
-
t[2] !== e || t[3] !== a ? (o = () => ti[e] ?? a, t[2] = e, t[3] = a, t[4] = o) : o = t[4];
|
|
2562
|
-
let [s, c] = (0, D.useState)(o), l, u;
|
|
2563
|
-
t[5] !== e || t[6] !== s ? (l = () => {
|
|
2564
|
-
ti[e] = s;
|
|
2565
|
-
}, u = [e, s], t[5] = e, t[6] = s, t[7] = l, t[8] = u) : (l = t[7], u = t[8]), (0, D.useEffect)(l, u);
|
|
2566
|
-
let d = n === "edit", f = d ? a : s, p;
|
|
2567
|
-
t[9] !== e || t[10] !== d || t[11] !== r ? (p = (t) => {
|
|
2568
|
-
if (c(t), !d) return;
|
|
2569
|
-
let n = { expand_output: t };
|
|
2570
|
-
r({
|
|
2571
|
-
cellId: e,
|
|
2572
|
-
config: n
|
|
2573
|
-
}), ie().saveCellConfig({ configs: { [e]: n } }).catch(ii);
|
|
2574
|
-
}, t[9] = e, t[10] = d, t[11] = r, t[12] = p) : p = t[12];
|
|
2575
|
-
let m = Ge(p), h;
|
|
2576
|
-
return t[13] !== f || t[14] !== m ? (h = [f, m], t[13] = f, t[14] = m, t[15] = h) : h = t[15], h;
|
|
2592
|
+
//#region src/core/notebook/document/select.ts
|
|
2593
|
+
function Jr(e, t, n) {
|
|
2594
|
+
return ve(e, (e) => e?.cells.get(t)?.[n], Ye);
|
|
2577
2595
|
}
|
|
2578
|
-
|
|
2579
|
-
|
|
2596
|
+
//#endregion
|
|
2597
|
+
//#region src/core/notebook/document/hooks.tsx
|
|
2598
|
+
var Yr = (0, O.createContext)(null);
|
|
2599
|
+
function Xr() {
|
|
2600
|
+
let e = (0, O.useContext)(Yr);
|
|
2601
|
+
if (e === null) throw Error("Document hooks require a DocumentProvider");
|
|
2602
|
+
return e;
|
|
2580
2603
|
}
|
|
2581
|
-
function
|
|
2582
|
-
|
|
2604
|
+
function Zr(e, t) {
|
|
2605
|
+
let n = (0, k.c)(4), { documentAtom: r } = Xr(), i;
|
|
2606
|
+
return n[0] !== r || n[1] !== t || n[2] !== e ? (i = Jr(r, e, t), n[0] = r, n[1] = t, n[2] = e, n[3] = i) : i = n[3], D(i);
|
|
2607
|
+
}
|
|
2608
|
+
function Qr(e) {
|
|
2609
|
+
return Zr(e, "config");
|
|
2610
|
+
}
|
|
2611
|
+
function $r() {
|
|
2612
|
+
return qe(Xr().editAtom);
|
|
2613
|
+
}
|
|
2614
|
+
//#endregion
|
|
2615
|
+
//#region src/core/cells/outputs.ts
|
|
2616
|
+
var ei = {}, ti = {};
|
|
2617
|
+
function ni(e) {
|
|
2618
|
+
let t = (0, k.c)(14), { mode: n } = D(Oe), r = $r(), i = Qr(e)?.expand_output ?? !1, a;
|
|
2619
|
+
t[0] !== e || t[1] !== i ? (a = () => ei[e] ?? i, t[0] = e, t[1] = i, t[2] = a) : a = t[2];
|
|
2620
|
+
let [o, s] = (0, O.useState)(a), c, l;
|
|
2621
|
+
t[3] !== e || t[4] !== o ? (c = () => {
|
|
2622
|
+
ei[e] = o;
|
|
2623
|
+
}, l = [e, o], t[3] = e, t[4] = o, t[5] = c, t[6] = l) : (c = t[5], l = t[6]), (0, O.useEffect)(c, l);
|
|
2624
|
+
let u = n === "edit", d = u ? i : o, f;
|
|
2625
|
+
t[7] !== e || t[8] !== r || t[9] !== u ? (f = (t) => {
|
|
2626
|
+
s(t), !(!u || e === "__scratch__") && r((n) => n.updateConfig(e, { expand_output: t }));
|
|
2627
|
+
}, t[7] = e, t[8] = r, t[9] = u, t[10] = f) : f = t[10];
|
|
2628
|
+
let p = Ge(f), m;
|
|
2629
|
+
return t[11] !== d || t[12] !== p ? (m = [d, p], t[11] = d, t[12] = p, t[13] = m) : m = t[13], m;
|
|
2583
2630
|
}
|
|
2584
|
-
function
|
|
2585
|
-
let t = (0,
|
|
2631
|
+
function ri(e) {
|
|
2632
|
+
let t = (0, k.c)(6), [n, r] = (0, O.useState)(ti[e] ?? !1), i, a;
|
|
2586
2633
|
t[0] !== e || t[1] !== n ? (i = () => {
|
|
2587
|
-
|
|
2588
|
-
}, a = [e, n], t[0] = e, t[1] = n, t[2] = i, t[3] = a) : (i = t[2], a = t[3]), (0,
|
|
2634
|
+
ti[e] = n;
|
|
2635
|
+
}, a = [e, n], t[0] = e, t[1] = n, t[2] = i, t[3] = a) : (i = t[2], a = t[3]), (0, O.useEffect)(i, a);
|
|
2589
2636
|
let o;
|
|
2590
2637
|
return t[4] === n ? o = t[5] : (o = [n, r], t[4] = n, t[5] = o), o;
|
|
2591
2638
|
}
|
|
2592
|
-
function
|
|
2639
|
+
function ii(e) {
|
|
2593
2640
|
return e == null || e.data == null || e.data === "";
|
|
2594
2641
|
}
|
|
2595
2642
|
//#endregion
|
|
2596
2643
|
//#region src/plugins/impl/code/LazyAnyLanguageCodeMirror.tsx
|
|
2597
|
-
var
|
|
2598
|
-
function
|
|
2644
|
+
var ai = (0, O.lazy)(() => import("./any-language-editor-BVFHDDQ3.js")), oi = [Qe.lineWrapping];
|
|
2645
|
+
function si(e, t) {
|
|
2599
2646
|
return e ? e === "python" ? {
|
|
2600
2647
|
language: e,
|
|
2601
2648
|
code: t
|
|
2602
2649
|
} : e === "sql" ? {
|
|
2603
2650
|
language: "python",
|
|
2604
|
-
code:
|
|
2651
|
+
code: ue.fromQuery(t)
|
|
2605
2652
|
} : e === "markdown" ? {
|
|
2606
2653
|
language: "python",
|
|
2607
|
-
code:
|
|
2654
|
+
code: de.fromMarkdown(t)
|
|
2608
2655
|
} : e === "shell" || e === "bash" ? {
|
|
2609
2656
|
language: "python",
|
|
2610
2657
|
code: `import subprocess\nsubprocess.run("${t}")`
|
|
@@ -2616,123 +2663,122 @@ function ui(e, t) {
|
|
|
2616
2663
|
code: t
|
|
2617
2664
|
};
|
|
2618
2665
|
}
|
|
2619
|
-
var
|
|
2620
|
-
let t = (0,
|
|
2666
|
+
var ci = (e) => {
|
|
2667
|
+
let t = (0, k.c)(9), { code: n, language: r } = e, { createCell: i } = ge(), a = te(), s = D(Xe), c;
|
|
2621
2668
|
t[0] !== s || t[1] !== n || t[2] !== i || t[3] !== r || t[4] !== a ? (c = () => {
|
|
2622
|
-
let e =
|
|
2623
|
-
r === "sql" &&
|
|
2669
|
+
let e = si(r, n);
|
|
2670
|
+
r === "sql" && ie({
|
|
2624
2671
|
autoInstantiate: s,
|
|
2625
|
-
|
|
2672
|
+
createCell: i,
|
|
2626
2673
|
fromCellId: a
|
|
2627
2674
|
}), i({
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
cellId: a ?? "__end__"
|
|
2675
|
+
after: a,
|
|
2676
|
+
code: e.code
|
|
2631
2677
|
});
|
|
2632
2678
|
}, t[0] = s, t[1] = n, t[2] = i, t[3] = r, t[4] = a, t[5] = c) : c = t[5];
|
|
2633
2679
|
let l = c, u;
|
|
2634
|
-
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0,
|
|
2680
|
+
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, j.jsx)(mt, { className: "ml-2 h-4 w-4" }), t[6] = u) : u = t[6];
|
|
2635
2681
|
let d;
|
|
2636
|
-
return t[7] === l ? d = t[8] : (d = /* @__PURE__ */ (0,
|
|
2682
|
+
return t[7] === l ? d = t[8] : (d = /* @__PURE__ */ (0, j.jsxs)(o, {
|
|
2637
2683
|
size: "xs",
|
|
2638
2684
|
variant: "outline",
|
|
2639
2685
|
onClick: l,
|
|
2640
2686
|
children: ["Add to Notebook", u]
|
|
2641
2687
|
}), t[7] = l, t[8] = d), d;
|
|
2642
|
-
},
|
|
2643
|
-
let t = (0,
|
|
2688
|
+
}, li = (e) => {
|
|
2689
|
+
let t = (0, k.c)(17), { code: n, language: r } = e, { theme: i } = Ze(), [a, o] = (0, O.useState)(n);
|
|
2644
2690
|
a !== n && o(n);
|
|
2645
2691
|
let s;
|
|
2646
2692
|
t[0] === a ? s = t[1] : (s = async () => {
|
|
2647
2693
|
await u(a);
|
|
2648
2694
|
}, t[0] = a, t[1] = s);
|
|
2649
2695
|
let c = s, l = i === "dark" ? "dark" : "light", d;
|
|
2650
|
-
t[2] !== r || t[3] !== l || t[4] !== a ? (d = /* @__PURE__ */ (0,
|
|
2696
|
+
t[2] !== r || t[3] !== l || t[4] !== a ? (d = /* @__PURE__ */ (0, j.jsx)(O.Suspense, { children: /* @__PURE__ */ (0, j.jsx)(ai, {
|
|
2651
2697
|
theme: l,
|
|
2652
2698
|
language: r,
|
|
2653
2699
|
hideUnsupportedLanguageErrors: !0,
|
|
2654
2700
|
className: "cm border rounded overflow-hidden",
|
|
2655
|
-
extensions:
|
|
2701
|
+
extensions: oi,
|
|
2656
2702
|
value: a,
|
|
2657
2703
|
onChange: o
|
|
2658
2704
|
}) }), t[2] = r, t[3] = l, t[4] = a, t[5] = d) : d = t[5];
|
|
2659
2705
|
let f;
|
|
2660
|
-
t[6] === c ? f = t[7] : (f = /* @__PURE__ */ (0,
|
|
2706
|
+
t[6] === c ? f = t[7] : (f = /* @__PURE__ */ (0, j.jsx)(ui, {
|
|
2661
2707
|
size: "xs",
|
|
2662
2708
|
variant: "outline",
|
|
2663
2709
|
onClick: c,
|
|
2664
2710
|
children: "Copy"
|
|
2665
2711
|
}), t[6] = c, t[7] = f);
|
|
2666
2712
|
let p;
|
|
2667
|
-
t[8] !== r || t[9] !== a ? (p = /* @__PURE__ */ (0,
|
|
2713
|
+
t[8] !== r || t[9] !== a ? (p = /* @__PURE__ */ (0, j.jsx)(ci, {
|
|
2668
2714
|
code: a,
|
|
2669
2715
|
language: r
|
|
2670
2716
|
}), t[8] = r, t[9] = a, t[10] = p) : p = t[10];
|
|
2671
2717
|
let m;
|
|
2672
|
-
t[11] !== f || t[12] !== p ? (m = /* @__PURE__ */ (0,
|
|
2718
|
+
t[11] !== f || t[12] !== p ? (m = /* @__PURE__ */ (0, j.jsxs)("div", {
|
|
2673
2719
|
className: "flex justify-end mt-2 space-x-2",
|
|
2674
2720
|
children: [f, p]
|
|
2675
2721
|
}), t[11] = f, t[12] = p, t[13] = m) : m = t[13];
|
|
2676
2722
|
let h;
|
|
2677
|
-
return t[14] !== d || t[15] !== m ? (h = /* @__PURE__ */ (0,
|
|
2723
|
+
return t[14] !== d || t[15] !== m ? (h = /* @__PURE__ */ (0, j.jsxs)("div", {
|
|
2678
2724
|
className: "relative",
|
|
2679
2725
|
children: [d, m]
|
|
2680
2726
|
}), t[14] = d, t[15] = m, t[16] = h) : h = t[16], h;
|
|
2681
|
-
},
|
|
2682
|
-
let t = (0,
|
|
2727
|
+
}, ui = (e) => {
|
|
2728
|
+
let t = (0, k.c)(9), n, r;
|
|
2683
2729
|
t[0] === e ? (n = t[1], r = t[2]) : ({onClick: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
2684
|
-
let [i, a] = (0,
|
|
2730
|
+
let [i, a] = (0, O.useState)(!1), s;
|
|
2685
2731
|
t[3] === n ? s = t[4] : (s = (e) => {
|
|
2686
2732
|
n?.(e), a(!0), setTimeout(() => a(!1), 1e3);
|
|
2687
2733
|
}, t[3] = n, t[4] = s);
|
|
2688
2734
|
let c = i ? "Copied" : "Copy", l;
|
|
2689
|
-
return t[5] !== r || t[6] !== s || t[7] !== c ? (l = /* @__PURE__ */ (0,
|
|
2735
|
+
return t[5] !== r || t[6] !== s || t[7] !== c ? (l = /* @__PURE__ */ (0, j.jsx)(o, {
|
|
2690
2736
|
...r,
|
|
2691
2737
|
onClick: s,
|
|
2692
2738
|
children: c
|
|
2693
2739
|
}), t[5] = r, t[6] = s, t[7] = c, t[8] = l) : l = t[8], l;
|
|
2694
|
-
},
|
|
2740
|
+
}, di = {
|
|
2695
2741
|
...p,
|
|
2696
2742
|
attributes: {
|
|
2697
2743
|
...p.attributes,
|
|
2698
2744
|
"*": [...p.attributes?.["*"] ?? [], "className"]
|
|
2699
2745
|
}
|
|
2700
|
-
},
|
|
2746
|
+
}, fi = Object.values({
|
|
2701
2747
|
...g,
|
|
2702
|
-
sanitize: [h,
|
|
2703
|
-
}),
|
|
2748
|
+
sanitize: [h, di]
|
|
2749
|
+
}), pi = { code: ({ children: e, className: t }) => {
|
|
2704
2750
|
let n = t?.replace("language-", "");
|
|
2705
2751
|
if (n && typeof e == "string") {
|
|
2706
2752
|
let t = e.trim();
|
|
2707
|
-
return /* @__PURE__ */ (0,
|
|
2753
|
+
return /* @__PURE__ */ (0, j.jsxs)("div", { children: [/* @__PURE__ */ (0, j.jsx)("div", {
|
|
2708
2754
|
className: "text-xs text-muted-foreground pl-1",
|
|
2709
2755
|
children: n
|
|
2710
|
-
}), /* @__PURE__ */ (0,
|
|
2756
|
+
}), /* @__PURE__ */ (0, j.jsx)(li, {
|
|
2711
2757
|
code: t,
|
|
2712
2758
|
language: n
|
|
2713
2759
|
})] });
|
|
2714
2760
|
}
|
|
2715
|
-
return /* @__PURE__ */ (0,
|
|
2761
|
+
return /* @__PURE__ */ (0, j.jsx)("code", {
|
|
2716
2762
|
className: t,
|
|
2717
2763
|
children: e
|
|
2718
2764
|
});
|
|
2719
|
-
} },
|
|
2720
|
-
let { data: e } =
|
|
2765
|
+
} }, mi, hi = () => {
|
|
2766
|
+
let { data: e } = $e(async () => mi || (mi = { math: (await import("./dist-Lm-D-Vr6.js")).math }, mi), []);
|
|
2721
2767
|
return e;
|
|
2722
|
-
},
|
|
2723
|
-
let t = (0,
|
|
2724
|
-
return t[0] !== n || t[1] !== r ? (i = /* @__PURE__ */ (0,
|
|
2725
|
-
components:
|
|
2768
|
+
}, gi = (0, O.memo)((e) => {
|
|
2769
|
+
let t = (0, k.c)(3), { content: n } = e, r = hi(), i;
|
|
2770
|
+
return t[0] !== n || t[1] !== r ? (i = /* @__PURE__ */ (0, j.jsx)(f, {
|
|
2771
|
+
components: pi,
|
|
2726
2772
|
plugins: r,
|
|
2727
|
-
rehypePlugins:
|
|
2773
|
+
rehypePlugins: fi,
|
|
2728
2774
|
className: "mo-markdown-renderer",
|
|
2729
2775
|
children: n
|
|
2730
2776
|
}), t[0] = n, t[1] = r, t[2] = i) : i = t[2], i;
|
|
2731
2777
|
});
|
|
2732
|
-
|
|
2778
|
+
gi.displayName = "MarkdownRenderer";
|
|
2733
2779
|
//#endregion
|
|
2734
2780
|
//#region src/components/icons/spinner.tsx
|
|
2735
|
-
var
|
|
2781
|
+
var _i = a("animate-spin", {
|
|
2736
2782
|
variants: {
|
|
2737
2783
|
centered: { true: "m-auto" },
|
|
2738
2784
|
size: {
|
|
@@ -2743,67 +2789,67 @@ var bi = a("animate-spin", {
|
|
|
2743
2789
|
}
|
|
2744
2790
|
},
|
|
2745
2791
|
defaultVariants: { size: "medium" }
|
|
2746
|
-
}),
|
|
2747
|
-
let n = (0,
|
|
2792
|
+
}), vi = O.forwardRef((e, t) => {
|
|
2793
|
+
let n = (0, k.c)(13), i, a, o, s;
|
|
2748
2794
|
if (n[0] !== e) {
|
|
2749
2795
|
let { className: t, children: r, centered: c, size: l, ...u } = e;
|
|
2750
2796
|
a = t, i = c, s = l, o = u, n[0] = e, n[1] = i, n[2] = a, n[3] = o, n[4] = s;
|
|
2751
2797
|
} else i = n[1], a = n[2], o = n[3], s = n[4];
|
|
2752
2798
|
let c;
|
|
2753
|
-
n[5] !== i || n[6] !== a || n[7] !== s ? (c = r(
|
|
2799
|
+
n[5] !== i || n[6] !== a || n[7] !== s ? (c = r(_i({
|
|
2754
2800
|
centered: i,
|
|
2755
2801
|
size: s
|
|
2756
2802
|
}), a), n[5] = i, n[6] = a, n[7] = s, n[8] = c) : c = n[8];
|
|
2757
2803
|
let l;
|
|
2758
|
-
return n[9] !== o || n[10] !== t || n[11] !== c ? (l = /* @__PURE__ */ (0,
|
|
2804
|
+
return n[9] !== o || n[10] !== t || n[11] !== c ? (l = /* @__PURE__ */ (0, j.jsx)(ht, {
|
|
2759
2805
|
ref: t,
|
|
2760
2806
|
className: c,
|
|
2761
2807
|
strokeWidth: 1.5,
|
|
2762
2808
|
...o
|
|
2763
2809
|
}), n[9] = o, n[10] = t, n[11] = c, n[12] = l) : l = n[12], l;
|
|
2764
2810
|
});
|
|
2765
|
-
|
|
2811
|
+
vi.displayName = "Spinner";
|
|
2766
2812
|
//#endregion
|
|
2767
2813
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/util.js
|
|
2768
|
-
function
|
|
2814
|
+
function yi(e, t) {
|
|
2769
2815
|
if (e.match(/^[a-z]+:\/\//i)) return e;
|
|
2770
2816
|
if (e.match(/^\/\//)) return window.location.protocol + e;
|
|
2771
2817
|
if (e.match(/^[a-z]+:/i)) return e;
|
|
2772
2818
|
let n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
2773
2819
|
return n.head.appendChild(r), n.body.appendChild(i), t && (r.href = t), i.href = e, i.href;
|
|
2774
2820
|
}
|
|
2775
|
-
var
|
|
2821
|
+
var bi = (() => {
|
|
2776
2822
|
let e = 0, t = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
|
|
2777
2823
|
return () => (e += 1, `u${t()}${e}`);
|
|
2778
2824
|
})();
|
|
2779
|
-
function
|
|
2825
|
+
function K(e) {
|
|
2780
2826
|
let t = [];
|
|
2781
2827
|
for (let n = 0, r = e.length; n < r; n++) t.push(e[n]);
|
|
2782
2828
|
return t;
|
|
2783
2829
|
}
|
|
2784
|
-
var
|
|
2785
|
-
function
|
|
2786
|
-
return
|
|
2830
|
+
var q = null;
|
|
2831
|
+
function xi(e = {}) {
|
|
2832
|
+
return q || (e.includeStyleProperties ? (q = e.includeStyleProperties, q) : (q = K(window.getComputedStyle(document.documentElement)), q));
|
|
2787
2833
|
}
|
|
2788
|
-
function
|
|
2834
|
+
function J(e, t) {
|
|
2789
2835
|
let n = (e.ownerDocument.defaultView || window).getComputedStyle(e).getPropertyValue(t);
|
|
2790
2836
|
return n ? parseFloat(n.replace("px", "")) : 0;
|
|
2791
2837
|
}
|
|
2792
|
-
function
|
|
2793
|
-
let t =
|
|
2838
|
+
function Si(e) {
|
|
2839
|
+
let t = J(e, "border-left-width"), n = J(e, "border-right-width");
|
|
2794
2840
|
return e.clientWidth + t + n;
|
|
2795
2841
|
}
|
|
2796
|
-
function
|
|
2797
|
-
let t =
|
|
2842
|
+
function Ci(e) {
|
|
2843
|
+
let t = J(e, "border-top-width"), n = J(e, "border-bottom-width");
|
|
2798
2844
|
return e.clientHeight + t + n;
|
|
2799
2845
|
}
|
|
2800
|
-
function
|
|
2846
|
+
function wi(e, t = {}) {
|
|
2801
2847
|
return {
|
|
2802
|
-
width: t.width ||
|
|
2803
|
-
height: t.height ||
|
|
2848
|
+
width: t.width || Si(e),
|
|
2849
|
+
height: t.height || Ci(e)
|
|
2804
2850
|
};
|
|
2805
2851
|
}
|
|
2806
|
-
function
|
|
2852
|
+
function Ti() {
|
|
2807
2853
|
let e, t;
|
|
2808
2854
|
try {
|
|
2809
2855
|
t = process;
|
|
@@ -2811,11 +2857,11 @@ function Oi() {
|
|
|
2811
2857
|
let n = t && t.env ? t.env.devicePixelRatio : null;
|
|
2812
2858
|
return n && (e = parseInt(n, 10), Number.isNaN(e) && (e = 1)), e || window.devicePixelRatio || 1;
|
|
2813
2859
|
}
|
|
2814
|
-
var
|
|
2815
|
-
function
|
|
2816
|
-
(e.width >
|
|
2860
|
+
var Y = 16384;
|
|
2861
|
+
function Ei(e) {
|
|
2862
|
+
(e.width > Y || e.height > Y) && (e.width > Y && e.height > Y ? e.width > e.height ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y) : e.width > Y ? (e.height *= Y / e.width, e.width = Y) : (e.width *= Y / e.height, e.height = Y));
|
|
2817
2863
|
}
|
|
2818
|
-
function
|
|
2864
|
+
function X(e) {
|
|
2819
2865
|
return new Promise((t, n) => {
|
|
2820
2866
|
let r = new Image();
|
|
2821
2867
|
r.onload = () => {
|
|
@@ -2825,80 +2871,80 @@ function Y(e) {
|
|
|
2825
2871
|
}, r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = e;
|
|
2826
2872
|
});
|
|
2827
2873
|
}
|
|
2828
|
-
async function
|
|
2874
|
+
async function Di(e) {
|
|
2829
2875
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(e)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
2830
2876
|
}
|
|
2831
|
-
async function
|
|
2877
|
+
async function Oi(e, t, n) {
|
|
2832
2878
|
let r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), a = document.createElementNS(r, "foreignObject");
|
|
2833
|
-
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e),
|
|
2879
|
+
return i.setAttribute("width", `${t}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${t} ${n}`), a.setAttribute("width", "100%"), a.setAttribute("height", "100%"), a.setAttribute("x", "0"), a.setAttribute("y", "0"), a.setAttribute("externalResourcesRequired", "true"), i.appendChild(a), a.appendChild(e), Di(i);
|
|
2834
2880
|
}
|
|
2835
|
-
var
|
|
2881
|
+
var Z = (e, t) => {
|
|
2836
2882
|
if (e instanceof t) return !0;
|
|
2837
2883
|
let n = Object.getPrototypeOf(e);
|
|
2838
|
-
return n === null ? !1 : n.constructor.name === t.name ||
|
|
2884
|
+
return n === null ? !1 : n.constructor.name === t.name || Z(n, t);
|
|
2839
2885
|
};
|
|
2840
2886
|
//#endregion
|
|
2841
2887
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/clone-pseudos.js
|
|
2842
|
-
function
|
|
2888
|
+
function ki(e) {
|
|
2843
2889
|
let t = e.getPropertyValue("content");
|
|
2844
2890
|
return `${e.cssText} content: '${t.replace(/'|"/g, "")}';`;
|
|
2845
2891
|
}
|
|
2846
|
-
function
|
|
2847
|
-
return
|
|
2892
|
+
function Ai(e, t) {
|
|
2893
|
+
return xi(t).map((t) => `${t}: ${e.getPropertyValue(t)}${e.getPropertyPriority(t) ? " !important" : ""};`).join(" ");
|
|
2848
2894
|
}
|
|
2849
|
-
function
|
|
2850
|
-
let i = `.${e}:${t}`, a = n.cssText ?
|
|
2895
|
+
function ji(e, t, n, r) {
|
|
2896
|
+
let i = `.${e}:${t}`, a = n.cssText ? ki(n) : Ai(n, r);
|
|
2851
2897
|
return document.createTextNode(`${i}{${a}}`);
|
|
2852
2898
|
}
|
|
2853
|
-
function
|
|
2899
|
+
function Mi(e, t, n, r) {
|
|
2854
2900
|
let i = window.getComputedStyle(e, n), a = i.getPropertyValue("content");
|
|
2855
2901
|
if (a === "" || a === "none") return;
|
|
2856
|
-
let o =
|
|
2902
|
+
let o = bi();
|
|
2857
2903
|
try {
|
|
2858
2904
|
t.className = `${t.className} ${o}`;
|
|
2859
2905
|
} catch {
|
|
2860
2906
|
return;
|
|
2861
2907
|
}
|
|
2862
2908
|
let s = document.createElement("style");
|
|
2863
|
-
s.appendChild(
|
|
2909
|
+
s.appendChild(ji(o, n, i, r)), t.appendChild(s);
|
|
2864
2910
|
}
|
|
2865
|
-
function
|
|
2866
|
-
|
|
2911
|
+
function Ni(e, t, n) {
|
|
2912
|
+
Mi(e, t, ":before", n), Mi(e, t, ":after", n);
|
|
2867
2913
|
}
|
|
2868
2914
|
//#endregion
|
|
2869
2915
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/mimes.js
|
|
2870
|
-
var
|
|
2871
|
-
woff:
|
|
2872
|
-
woff2:
|
|
2916
|
+
var Pi = "application/font-woff", Fi = "image/jpeg", Ii = {
|
|
2917
|
+
woff: Pi,
|
|
2918
|
+
woff2: Pi,
|
|
2873
2919
|
ttf: "application/font-truetype",
|
|
2874
2920
|
eot: "application/vnd.ms-fontobject",
|
|
2875
2921
|
png: "image/png",
|
|
2876
|
-
jpg:
|
|
2877
|
-
jpeg:
|
|
2922
|
+
jpg: Fi,
|
|
2923
|
+
jpeg: Fi,
|
|
2878
2924
|
gif: "image/gif",
|
|
2879
2925
|
tiff: "image/tiff",
|
|
2880
2926
|
svg: "image/svg+xml",
|
|
2881
2927
|
webp: "image/webp"
|
|
2882
2928
|
};
|
|
2883
|
-
function
|
|
2929
|
+
function Li(e) {
|
|
2884
2930
|
let t = /\.([^./]*?)$/g.exec(e);
|
|
2885
2931
|
return t ? t[1] : "";
|
|
2886
2932
|
}
|
|
2887
|
-
function
|
|
2888
|
-
return
|
|
2933
|
+
function Ri(e) {
|
|
2934
|
+
return Ii[Li(e).toLowerCase()] || "";
|
|
2889
2935
|
}
|
|
2890
2936
|
//#endregion
|
|
2891
2937
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/dataurl.js
|
|
2892
|
-
function
|
|
2938
|
+
function zi(e) {
|
|
2893
2939
|
return e.split(/,/)[1];
|
|
2894
2940
|
}
|
|
2895
|
-
function
|
|
2941
|
+
function Bi(e) {
|
|
2896
2942
|
return e.search(/^(data:)/) !== -1;
|
|
2897
2943
|
}
|
|
2898
|
-
function
|
|
2944
|
+
function Vi(e, t) {
|
|
2899
2945
|
return `data:${t};base64,${e}`;
|
|
2900
2946
|
}
|
|
2901
|
-
async function
|
|
2947
|
+
async function Hi(e, t, n) {
|
|
2902
2948
|
let r = await fetch(e, t);
|
|
2903
2949
|
if (r.status === 404) throw Error(`Resource "${r.url}" not found`);
|
|
2904
2950
|
let i = await r.blob();
|
|
@@ -2916,83 +2962,83 @@ async function Gi(e, t, n) {
|
|
|
2916
2962
|
}, a.readAsDataURL(i);
|
|
2917
2963
|
});
|
|
2918
2964
|
}
|
|
2919
|
-
var
|
|
2920
|
-
function
|
|
2965
|
+
var Ui = {};
|
|
2966
|
+
function Wi(e, t, n) {
|
|
2921
2967
|
let r = e.replace(/\?.*/, "");
|
|
2922
2968
|
return n && (r = e), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), t ? `[${t}]${r}` : r;
|
|
2923
2969
|
}
|
|
2924
|
-
async function
|
|
2925
|
-
let r =
|
|
2926
|
-
if (
|
|
2970
|
+
async function Gi(e, t, n) {
|
|
2971
|
+
let r = Wi(e, t, n.includeQueryParams);
|
|
2972
|
+
if (Ui[r] != null) return Ui[r];
|
|
2927
2973
|
n.cacheBust && (e += (/\?/.test(e) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
2928
2974
|
let i;
|
|
2929
2975
|
try {
|
|
2930
|
-
i =
|
|
2976
|
+
i = Vi(await Hi(e, n.fetchRequestInit, ({ res: e, result: n }) => (t ||= e.headers.get("Content-Type") || "", zi(n))), t);
|
|
2931
2977
|
} catch (t) {
|
|
2932
2978
|
i = n.imagePlaceholder || "";
|
|
2933
2979
|
let r = `Failed to fetch resource: ${e}`;
|
|
2934
2980
|
t && (r = typeof t == "string" ? t : t.message), r && console.warn(r);
|
|
2935
2981
|
}
|
|
2936
|
-
return
|
|
2982
|
+
return Ui[r] = i, i;
|
|
2937
2983
|
}
|
|
2938
2984
|
//#endregion
|
|
2939
2985
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/clone-node.js
|
|
2940
|
-
async function
|
|
2986
|
+
async function Ki(e) {
|
|
2941
2987
|
let t = e.toDataURL();
|
|
2942
|
-
return t === "data:," ? e.cloneNode(!1) :
|
|
2988
|
+
return t === "data:," ? e.cloneNode(!1) : X(t);
|
|
2943
2989
|
}
|
|
2944
|
-
async function
|
|
2990
|
+
async function qi(e, t) {
|
|
2945
2991
|
if (e.currentSrc) {
|
|
2946
2992
|
let t = document.createElement("canvas"), n = t.getContext("2d");
|
|
2947
|
-
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height),
|
|
2993
|
+
return t.width = e.clientWidth, t.height = e.clientHeight, n?.drawImage(e, 0, 0, t.width, t.height), X(t.toDataURL());
|
|
2948
2994
|
}
|
|
2949
2995
|
let n = e.poster;
|
|
2950
|
-
return
|
|
2996
|
+
return X(await Gi(n, Ri(n), t));
|
|
2951
2997
|
}
|
|
2952
|
-
async function
|
|
2998
|
+
async function Ji(e, t) {
|
|
2953
2999
|
try {
|
|
2954
3000
|
if (e?.contentDocument?.body) return await Q(e.contentDocument.body, t, !0);
|
|
2955
3001
|
} catch {}
|
|
2956
3002
|
return e.cloneNode(!1);
|
|
2957
3003
|
}
|
|
2958
|
-
async function
|
|
2959
|
-
return
|
|
3004
|
+
async function Yi(e, t) {
|
|
3005
|
+
return Z(e, HTMLCanvasElement) ? Ki(e) : Z(e, HTMLVideoElement) ? qi(e, t) : Z(e, HTMLIFrameElement) ? Ji(e, t) : e.cloneNode(Zi(e));
|
|
2960
3006
|
}
|
|
2961
|
-
var
|
|
2962
|
-
async function
|
|
2963
|
-
if (
|
|
3007
|
+
var Xi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SLOT", Zi = (e) => e.tagName != null && e.tagName.toUpperCase() === "SVG";
|
|
3008
|
+
async function Qi(e, t, n) {
|
|
3009
|
+
if (Zi(t)) return t;
|
|
2964
3010
|
let r = [];
|
|
2965
|
-
if (
|
|
2966
|
-
else if (
|
|
2967
|
-
e.contentDocument?.body && (r =
|
|
3011
|
+
if (Xi(e) && e.assignedNodes) r = K(e.assignedNodes());
|
|
3012
|
+
else if (Z(e, HTMLIFrameElement)) try {
|
|
3013
|
+
e.contentDocument?.body && (r = K(e.contentDocument.body.childNodes));
|
|
2968
3014
|
} catch {}
|
|
2969
|
-
else r =
|
|
2970
|
-
return r.length === 0 ||
|
|
3015
|
+
else r = K((e.shadowRoot ?? e).childNodes);
|
|
3016
|
+
return r.length === 0 || Z(e, HTMLVideoElement) || await r.reduce((e, r) => e.then(() => Q(r, n)).then((e) => {
|
|
2971
3017
|
e && t.appendChild(e);
|
|
2972
3018
|
}), Promise.resolve()), t;
|
|
2973
3019
|
}
|
|
2974
|
-
function
|
|
3020
|
+
function $i(e, t, n) {
|
|
2975
3021
|
let r = t.style;
|
|
2976
3022
|
if (!r) return;
|
|
2977
3023
|
let i = window.getComputedStyle(e);
|
|
2978
|
-
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) :
|
|
3024
|
+
i.cssText ? (r.cssText = i.cssText, r.transformOrigin = i.transformOrigin) : xi(n).forEach((n) => {
|
|
2979
3025
|
let a = i.getPropertyValue(n);
|
|
2980
|
-
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`),
|
|
3026
|
+
n === "font-size" && a.endsWith("px") && (a = `${Math.floor(parseFloat(a.substring(0, a.length - 2))) - .1}px`), Z(e, HTMLIFrameElement) && n === "display" && a === "inline" && (a = "block"), n === "d" && t.getAttribute("d") && (a = `path(${t.getAttribute("d")})`), r.setProperty(n, a, i.getPropertyPriority(n));
|
|
2981
3027
|
});
|
|
2982
3028
|
}
|
|
2983
|
-
function
|
|
2984
|
-
|
|
3029
|
+
function ea(e, t) {
|
|
3030
|
+
Z(e, HTMLTextAreaElement) && (t.innerHTML = e.value), Z(e, HTMLInputElement) && t.setAttribute("value", e.value);
|
|
2985
3031
|
}
|
|
2986
|
-
function
|
|
2987
|
-
if (
|
|
3032
|
+
function ta(e, t) {
|
|
3033
|
+
if (Z(e, HTMLSelectElement)) {
|
|
2988
3034
|
let n = t, r = Array.from(n.children).find((t) => e.value === t.getAttribute("value"));
|
|
2989
3035
|
r && r.setAttribute("selected", "");
|
|
2990
3036
|
}
|
|
2991
3037
|
}
|
|
2992
|
-
function
|
|
2993
|
-
return
|
|
3038
|
+
function na(e, t, n) {
|
|
3039
|
+
return Z(t, Element) && ($i(e, t, n), Ni(e, t, n), ea(e, t), ta(e, t)), t;
|
|
2994
3040
|
}
|
|
2995
|
-
async function
|
|
3041
|
+
async function ra(e, t) {
|
|
2996
3042
|
let n = e.querySelectorAll ? e.querySelectorAll("use") : [];
|
|
2997
3043
|
if (n.length === 0) return e;
|
|
2998
3044
|
let r = {};
|
|
@@ -3015,60 +3061,60 @@ async function aa(e, t) {
|
|
|
3015
3061
|
return e;
|
|
3016
3062
|
}
|
|
3017
3063
|
async function Q(e, t, n) {
|
|
3018
|
-
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) =>
|
|
3064
|
+
return !n && t.filter && !t.filter(e) ? null : Promise.resolve(e).then((e) => Yi(e, t)).then((n) => Qi(e, n, t)).then((n) => na(e, n, t)).then((e) => ra(e, t));
|
|
3019
3065
|
}
|
|
3020
3066
|
//#endregion
|
|
3021
3067
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-resources.js
|
|
3022
|
-
var
|
|
3023
|
-
function
|
|
3068
|
+
var ia = /url\((['"]?)([^'"]+?)\1\)/g, aa = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, oa = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
3069
|
+
function sa(e) {
|
|
3024
3070
|
let t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
3025
3071
|
return RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
|
|
3026
3072
|
}
|
|
3027
|
-
function
|
|
3073
|
+
function ca(e) {
|
|
3028
3074
|
let t = [];
|
|
3029
|
-
return e.replace(
|
|
3075
|
+
return e.replace(ia, (e, n, r) => (t.push(r), e)), t.filter((e) => !Bi(e));
|
|
3030
3076
|
}
|
|
3031
|
-
async function
|
|
3077
|
+
async function la(e, t, n, r, i) {
|
|
3032
3078
|
try {
|
|
3033
|
-
let a = n ?
|
|
3034
|
-
return s = i ?
|
|
3079
|
+
let a = n ? yi(t, n) : t, o = Ri(t), s;
|
|
3080
|
+
return s = i ? Vi(await i(a), o) : await Gi(a, o, r), e.replace(sa(t), `$1${s}$3`);
|
|
3035
3081
|
} catch {}
|
|
3036
3082
|
return e;
|
|
3037
3083
|
}
|
|
3038
|
-
function
|
|
3039
|
-
return t ? e.replace(
|
|
3084
|
+
function ua(e, { preferredFontFormat: t }) {
|
|
3085
|
+
return t ? e.replace(oa, (e) => {
|
|
3040
3086
|
for (;;) {
|
|
3041
|
-
let [n, , r] =
|
|
3087
|
+
let [n, , r] = aa.exec(e) || [];
|
|
3042
3088
|
if (!r) return "";
|
|
3043
3089
|
if (r === t) return `src: ${n};`;
|
|
3044
3090
|
}
|
|
3045
3091
|
}) : e;
|
|
3046
3092
|
}
|
|
3047
|
-
function
|
|
3048
|
-
return e.search(
|
|
3093
|
+
function da(e) {
|
|
3094
|
+
return e.search(ia) !== -1;
|
|
3049
3095
|
}
|
|
3050
|
-
async function
|
|
3051
|
-
if (!
|
|
3052
|
-
let r =
|
|
3053
|
-
return
|
|
3096
|
+
async function fa(e, t, n) {
|
|
3097
|
+
if (!da(e)) return e;
|
|
3098
|
+
let r = ua(e, n);
|
|
3099
|
+
return ca(r).reduce((e, r) => e.then((e) => la(e, r, t, n)), Promise.resolve(r));
|
|
3054
3100
|
}
|
|
3055
3101
|
//#endregion
|
|
3056
3102
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-images.js
|
|
3057
3103
|
async function $(e, t, n) {
|
|
3058
3104
|
let r = t.style?.getPropertyValue(e);
|
|
3059
3105
|
if (r) {
|
|
3060
|
-
let i = await
|
|
3106
|
+
let i = await fa(r, null, n);
|
|
3061
3107
|
return t.style.setProperty(e, i, t.style.getPropertyPriority(e)), !0;
|
|
3062
3108
|
}
|
|
3063
3109
|
return !1;
|
|
3064
3110
|
}
|
|
3065
|
-
async function
|
|
3111
|
+
async function pa(e, t) {
|
|
3066
3112
|
await $("background", e, t) || await $("background-image", e, t), await $("mask", e, t) || await $("-webkit-mask", e, t) || await $("mask-image", e, t) || await $("-webkit-mask-image", e, t);
|
|
3067
3113
|
}
|
|
3068
|
-
async function
|
|
3069
|
-
let n =
|
|
3070
|
-
if (!(n && !
|
|
3071
|
-
let r = n ? e.src : e.href.baseVal, i = await
|
|
3114
|
+
async function ma(e, t) {
|
|
3115
|
+
let n = Z(e, HTMLImageElement);
|
|
3116
|
+
if (!(n && !Bi(e.src)) && !(Z(e, SVGImageElement) && !Bi(e.href.baseVal))) return;
|
|
3117
|
+
let r = n ? e.src : e.href.baseVal, i = await Gi(r, Ri(r), t);
|
|
3072
3118
|
await new Promise((r, a) => {
|
|
3073
3119
|
e.onload = r, e.onerror = t.onImageErrorHandler ? (...e) => {
|
|
3074
3120
|
try {
|
|
@@ -3081,16 +3127,16 @@ async function ga(e, t) {
|
|
|
3081
3127
|
o.decode &&= r, o.loading === "lazy" && (o.loading = "eager"), n ? (e.srcset = "", e.src = i) : e.href.baseVal = i;
|
|
3082
3128
|
});
|
|
3083
3129
|
}
|
|
3084
|
-
async function
|
|
3085
|
-
let n =
|
|
3130
|
+
async function ha(e, t) {
|
|
3131
|
+
let n = K(e.childNodes).map((e) => ga(e, t));
|
|
3086
3132
|
await Promise.all(n).then(() => e);
|
|
3087
3133
|
}
|
|
3088
|
-
async function
|
|
3089
|
-
|
|
3134
|
+
async function ga(e, t) {
|
|
3135
|
+
Z(e, Element) && (await pa(e, t), await ma(e, t), await ha(e, t));
|
|
3090
3136
|
}
|
|
3091
3137
|
//#endregion
|
|
3092
3138
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/apply-style.js
|
|
3093
|
-
function
|
|
3139
|
+
function _a(e, t) {
|
|
3094
3140
|
let { style: n } = e;
|
|
3095
3141
|
t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.width && (n.width = `${t.width}px`), t.height && (n.height = `${t.height}px`);
|
|
3096
3142
|
let r = t.style;
|
|
@@ -3100,22 +3146,22 @@ function ya(e, t) {
|
|
|
3100
3146
|
}
|
|
3101
3147
|
//#endregion
|
|
3102
3148
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/embed-webfonts.js
|
|
3103
|
-
var
|
|
3104
|
-
async function
|
|
3105
|
-
let t =
|
|
3149
|
+
var va = {};
|
|
3150
|
+
async function ya(e) {
|
|
3151
|
+
let t = va[e];
|
|
3106
3152
|
return t ?? (t = {
|
|
3107
3153
|
url: e,
|
|
3108
3154
|
cssText: await (await fetch(e)).text()
|
|
3109
|
-
},
|
|
3155
|
+
}, va[e] = t, t);
|
|
3110
3156
|
}
|
|
3111
|
-
async function
|
|
3157
|
+
async function ba(e, t) {
|
|
3112
3158
|
let n = e.cssText, r = /url\(["']?([^"')]+)["']?\)/g, i = (n.match(/url\([^)]+\)/g) || []).map(async (i) => {
|
|
3113
3159
|
let a = i.replace(r, "$1");
|
|
3114
|
-
return a.startsWith("https://") || (a = new URL(a, e.url).href),
|
|
3160
|
+
return a.startsWith("https://") || (a = new URL(a, e.url).href), Hi(a, t.fetchRequestInit, ({ result: e }) => (n = n.replace(i, `url(${e})`), [i, e]));
|
|
3115
3161
|
});
|
|
3116
3162
|
return Promise.all(i).then(() => n);
|
|
3117
3163
|
}
|
|
3118
|
-
function
|
|
3164
|
+
function xa(e) {
|
|
3119
3165
|
if (e == null) return [];
|
|
3120
3166
|
let t = [], n = e.replace(/(\/\*[\s\S]*?\*\/)/gi, ""), r = /* @__PURE__ */ RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})", "gi");
|
|
3121
3167
|
for (;;) {
|
|
@@ -3135,13 +3181,13 @@ function Ca(e) {
|
|
|
3135
3181
|
}
|
|
3136
3182
|
return t;
|
|
3137
3183
|
}
|
|
3138
|
-
async function
|
|
3184
|
+
async function Sa(e, t) {
|
|
3139
3185
|
let n = [], r = [];
|
|
3140
3186
|
return e.forEach((n) => {
|
|
3141
3187
|
if ("cssRules" in n) try {
|
|
3142
|
-
|
|
3188
|
+
K(n.cssRules || []).forEach((e, i) => {
|
|
3143
3189
|
if (e.type === CSSRule.IMPORT_RULE) {
|
|
3144
|
-
let a = i + 1, o = e.href, s =
|
|
3190
|
+
let a = i + 1, o = e.href, s = ya(o).then((e) => ba(e, t)).then((e) => xa(e).forEach((e) => {
|
|
3145
3191
|
try {
|
|
3146
3192
|
n.insertRule(e, e.startsWith("@import") ? a += 1 : n.cssRules.length);
|
|
3147
3193
|
} catch (t) {
|
|
@@ -3158,7 +3204,7 @@ async function wa(e, t) {
|
|
|
3158
3204
|
});
|
|
3159
3205
|
} catch (i) {
|
|
3160
3206
|
let a = e.find((e) => e.href == null) || document.styleSheets[0];
|
|
3161
|
-
n.href != null && r.push(
|
|
3207
|
+
n.href != null && r.push(ya(n.href).then((e) => ba(e, t)).then((e) => xa(e).forEach((e) => {
|
|
3162
3208
|
a.insertRule(e, a.cssRules.length);
|
|
3163
3209
|
})).catch((e) => {
|
|
3164
3210
|
console.error("Error loading remote stylesheet", e);
|
|
@@ -3166,7 +3212,7 @@ async function wa(e, t) {
|
|
|
3166
3212
|
}
|
|
3167
3213
|
}), Promise.all(r).then(() => (e.forEach((e) => {
|
|
3168
3214
|
if ("cssRules" in e) try {
|
|
3169
|
-
|
|
3215
|
+
K(e.cssRules || []).forEach((e) => {
|
|
3170
3216
|
n.push(e);
|
|
3171
3217
|
});
|
|
3172
3218
|
} catch (t) {
|
|
@@ -3174,37 +3220,37 @@ async function wa(e, t) {
|
|
|
3174
3220
|
}
|
|
3175
3221
|
}), n));
|
|
3176
3222
|
}
|
|
3177
|
-
function
|
|
3178
|
-
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) =>
|
|
3223
|
+
function Ca(e) {
|
|
3224
|
+
return e.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => da(e.style.getPropertyValue("src")));
|
|
3179
3225
|
}
|
|
3180
|
-
async function
|
|
3226
|
+
async function wa(e, t) {
|
|
3181
3227
|
if (e.ownerDocument == null) throw Error("Provided element is not within a Document");
|
|
3182
|
-
return
|
|
3228
|
+
return Ca(await Sa(K(e.ownerDocument.styleSheets), t));
|
|
3183
3229
|
}
|
|
3184
|
-
function
|
|
3230
|
+
function Ta(e) {
|
|
3185
3231
|
return (e || "").trim().replace(/["']/g, "");
|
|
3186
3232
|
}
|
|
3187
|
-
function
|
|
3233
|
+
function Ea(e) {
|
|
3188
3234
|
let t = /* @__PURE__ */ new Set();
|
|
3189
3235
|
function n(e) {
|
|
3190
3236
|
let r = e.style.fontFamily || getComputedStyle(e).fontFamily;
|
|
3191
3237
|
r && r.split(",").forEach((e) => {
|
|
3192
|
-
t.add(
|
|
3238
|
+
t.add(Ta(e));
|
|
3193
3239
|
}), Array.from(e.children).forEach((e) => {
|
|
3194
3240
|
e instanceof HTMLElement && n(e);
|
|
3195
3241
|
});
|
|
3196
3242
|
}
|
|
3197
3243
|
return n(e), t;
|
|
3198
3244
|
}
|
|
3199
|
-
async function
|
|
3200
|
-
let n = await
|
|
3201
|
-
return (await Promise.all(n.filter((e) => r.has(
|
|
3245
|
+
async function Da(e, t) {
|
|
3246
|
+
let n = await wa(e, t), r = Ea(e);
|
|
3247
|
+
return (await Promise.all(n.filter((e) => r.has(Ta(e.style.fontFamily))).map((e) => {
|
|
3202
3248
|
let n = e.parentStyleSheet ? e.parentStyleSheet.href : null;
|
|
3203
|
-
return
|
|
3249
|
+
return fa(e.cssText, n, t);
|
|
3204
3250
|
}))).join("\n");
|
|
3205
3251
|
}
|
|
3206
|
-
async function
|
|
3207
|
-
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await
|
|
3252
|
+
async function Oa(e, t) {
|
|
3253
|
+
let n = t.fontEmbedCSS == null ? t.skipFonts ? null : await Da(e, t) : t.fontEmbedCSS, r = t.extraStyleContent == null ? n : (n || "").concat(t.extraStyleContent);
|
|
3208
3254
|
if (r) {
|
|
3209
3255
|
let t = document.createElement("style"), n = document.createTextNode(r);
|
|
3210
3256
|
t.appendChild(n), e.firstChild ? e.insertBefore(t, e.firstChild) : e.appendChild(t);
|
|
@@ -3212,18 +3258,18 @@ async function Aa(e, t) {
|
|
|
3212
3258
|
}
|
|
3213
3259
|
//#endregion
|
|
3214
3260
|
//#region ../node_modules/.pnpm/html-to-image@1.11.13_patch_hash=405d43fd603ed64fdfdd4e3572f22a2b0eab5c8bd36a0dbd88f28ab1f311893f/node_modules/html-to-image/es/index.js
|
|
3215
|
-
async function
|
|
3216
|
-
let { width: n, height: r } =
|
|
3217
|
-
return await
|
|
3261
|
+
async function ka(e, t = {}) {
|
|
3262
|
+
let { width: n, height: r } = wi(e, t), i = await Q(e, t, !0);
|
|
3263
|
+
return await Oa(i, t), await ga(i, t), _a(i, t), await Oi(i, n, r);
|
|
3218
3264
|
}
|
|
3219
|
-
async function
|
|
3220
|
-
let { width: n, height: r } =
|
|
3221
|
-
return a.width = c * s, a.height = l * s, t.skipAutoScale ||
|
|
3265
|
+
async function Aa(e, t = {}) {
|
|
3266
|
+
let { width: n, height: r } = wi(e, t), i = await X(await ka(e, t)), a = document.createElement("canvas"), o = a.getContext("2d"), s = t.pixelRatio || Ti(), c = t.canvasWidth || n, l = t.canvasHeight || r;
|
|
3267
|
+
return a.width = c * s, a.height = l * s, t.skipAutoScale || Ei(a), a.style.width = `${c}`, a.style.height = `${l}`, t.backgroundColor && (o.fillStyle = t.backgroundColor, o.fillRect(0, 0, a.width, a.height)), o.drawImage(i, 0, 0, a.width, a.height), a;
|
|
3222
3268
|
}
|
|
3223
|
-
async function
|
|
3224
|
-
return (await
|
|
3269
|
+
async function ja(e, t = {}) {
|
|
3270
|
+
return (await Aa(e, t)).toDataURL();
|
|
3225
3271
|
}
|
|
3226
|
-
var
|
|
3272
|
+
var Ma = {
|
|
3227
3273
|
filter: (e) => {
|
|
3228
3274
|
try {
|
|
3229
3275
|
if ("classList" in e) {
|
|
@@ -3241,11 +3287,11 @@ var Pa = {
|
|
|
3241
3287
|
},
|
|
3242
3288
|
includeStyleProperties: /* @__PURE__ */ "width.height.min-width.min-height.max-width.max-height.box-sizing.aspect-ratio.display.position.top.left.bottom.right.z-index.float.clear.flex.flex-direction.flex-wrap.flex-grow.flex-shrink.flex-basis.align-items.align-self.justify-content.gap.order.grid-template-columns.grid-template-rows.grid-column.grid-row.row-gap.column-gap.margin.margin-top.margin-right.margin-bottom.margin-left.padding.padding-top.padding-right.padding-bottom.padding-left.font.font-family.font-size.font-weight.font-style.line-height.letter-spacing.word-spacing.text-align.text-decoration.text-transform.text-indent.text-shadow.white-space.text-wrap.word-break.text-overflow.vertical-align.color.background.background-color.background-image.background-size.background-position.background-repeat.background-clip.border.border-width.border-style.border-color.border-top.border-right.border-bottom.border-left.border-radius.outline.box-shadow.text-shadow.opacity.filter.backdrop-filter.mix-blend-mode.transform.clip-path.overflow.overflow-x.overflow-y.visibility.fill.stroke.stroke-width.object-fit.object-position.list-style.list-style-type.border-collapse.border-spacing.content.cursor".split(".")
|
|
3243
3289
|
};
|
|
3244
|
-
async function
|
|
3245
|
-
return
|
|
3246
|
-
...
|
|
3290
|
+
async function Na(e, t) {
|
|
3291
|
+
return ja(e, {
|
|
3292
|
+
...Ma,
|
|
3247
3293
|
...t
|
|
3248
3294
|
});
|
|
3249
3295
|
}
|
|
3250
3296
|
//#endregion
|
|
3251
|
-
export {
|
|
3297
|
+
export { pt as $, ur as A, On as B, br as C, Or as D, Er as E, mr as F, wn as G, Nn as H, nr as I, Zt as J, zt as K, Rn as L, pr as M, sr as N, Ar as O, or as P, ht as Q, zn as R, vr as S, wr as T, kn as U, jn as V, dn as W, _t as X, z as Y, gt as Z, jr as _, ii as a, Nr as b, $r as c, Kr as d, A as et, Hr as f, zr as g, Rr as h, ai as i, lr as j, ar as k, Gr as l, Vr as m, vi as n, ri as o, Ur as p, nn as q, gi as r, ni as s, Na as t, qr as u, Pr as v, Sr as w, gr as x, Mr as y, In as z };
|