@marimo-team/frontend 0.15.5 → 0.16.0-dev96986

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/dist/assets/ConnectedDataExplorerComponent-CNLoZkWr.js +19 -0
  2. package/dist/assets/{ImageComparisonComponent-CEXMKKA4.js → ImageComparisonComponent-SX7fDaTK.js} +1 -1
  3. package/dist/assets/{VegaLite-Bt14Ds9k.js → VegaLite-MJUW3b7C.js} +6 -6
  4. package/dist/assets/_baseEach-9_logFrf.js +1 -0
  5. package/dist/assets/_baseMap-NzEbKt5c.js +1 -0
  6. package/dist/assets/_baseUniq-C5LFcyNC.js +1 -0
  7. package/dist/assets/_createAggregator-ZRm2b6Zm.js +1 -0
  8. package/dist/assets/agent-panel-BBd11wNX.js +287 -0
  9. package/dist/assets/agent-panel-D92Mfy1i.css +1 -0
  10. package/dist/assets/{any-language-editor-DiwNT6zp.js → any-language-editor-DwAaEQfS.js} +1 -1
  11. package/dist/assets/architectureDiagram-W76B3OCA-BJmVXUoW.js +36 -0
  12. package/dist/assets/{between-horizontal-start-FyewyCGn.js → between-horizontal-start-KiwU-a3C.js} +1 -1
  13. package/dist/assets/{blockDiagram-QIGZ2CNN-BrOkAf_c.js → blockDiagram-QIGZ2CNN-DzxZjE7B.js} +1 -1
  14. package/dist/assets/{c4Diagram-FPNF74CW-BHPzDxE2.js → c4Diagram-FPNF74CW-DjmldG_J.js} +5 -5
  15. package/dist/assets/channel-DHcKBVM4.js +1 -0
  16. package/dist/assets/chat-panel-DgJZr0eS.js +3 -0
  17. package/dist/assets/{chunk-4BX2VUAB-DLxaCNYh.js → chunk-4BX2VUAB-EUTQThiZ.js} +1 -1
  18. package/dist/assets/{chunk-55IACEB6-DdzvO3HR.js → chunk-55IACEB6-DZAiDJxy.js} +1 -1
  19. package/dist/assets/{chunk-FMBD7UC4-R5o-nSiG.js → chunk-FMBD7UC4-Bd0Czs-J.js} +1 -1
  20. package/dist/assets/{chunk-K7UQS3LO-DxaMrGgG.js → chunk-K7UQS3LO-DEKMIknX.js} +1 -1
  21. package/dist/assets/{chunk-QN33PNHL-DqS9-FYm.js → chunk-QN33PNHL-E0jwHU_n.js} +1 -1
  22. package/dist/assets/{chunk-QZHKN3VN-BZ-TzajS.js → chunk-QZHKN3VN-BzaIHJbq.js} +1 -1
  23. package/dist/assets/{chunk-TVAH2DTR-BsgP2dyv.js → chunk-TVAH2DTR-CZFYvqnm.js} +1 -1
  24. package/dist/assets/{chunk-TZMSLE5B-D-h3ahXI.js → chunk-TZMSLE5B-BNqnFjtv.js} +1 -1
  25. package/dist/assets/{circle-play-CQtRZ-rT.js → circle-play-D3J_mYrF.js} +1 -1
  26. package/dist/assets/classDiagram-KNZD7YFC-D-xwLnlX.js +1 -0
  27. package/dist/assets/classDiagram-v2-RKCZMP56-D-xwLnlX.js +1 -0
  28. package/dist/assets/{clear-button-BY6Z_ViL.js → clear-button-ifzRuAR3.js} +1 -1
  29. package/dist/assets/clone-CSxIll62.js +1 -0
  30. package/dist/assets/command-palette-D2fdVSET.js +1 -0
  31. package/dist/assets/common-Ku-cF_2J.js +1 -0
  32. package/dist/assets/{compile-Ct_jzdKr.js → compile-BgZlHW1c.js} +1 -1
  33. package/dist/assets/cose-bilkent-S5V4N54A-CVM83SqK.js +1 -0
  34. package/dist/assets/dagre-5GWH7T2D-ouQPkxT3.js +4 -0
  35. package/dist/assets/{data-grid-overlay-editor-BN_wulc3.js → data-grid-overlay-editor-B47j5GJJ.js} +1 -1
  36. package/dist/assets/datasources-panel-Bt41Zir-.js +1 -0
  37. package/dist/assets/{dependency-graph-panel-BOmSCZf7.js → dependency-graph-panel-CZC_B7pK.js} +4 -4
  38. package/dist/assets/diagram-N5W7TBWH-CQ817ZdR.js +24 -0
  39. package/dist/assets/diagram-QEK2KX5R-DOK_psUO.js +43 -0
  40. package/dist/assets/diagram-S2PKOQOG-CVljmOW8.js +24 -0
  41. package/dist/assets/{documentation-panel-BxjJO_Gw.js → documentation-panel-C7yIvGg1.js} +1 -1
  42. package/dist/assets/edit-page-CyTMQV2u.js +129 -0
  43. package/dist/assets/{ellipsis-vertical-UHbmjI2n.js → ellipsis-vertical-C7FjlUsY.js} +1 -1
  44. package/dist/assets/{empty-state-BIBXzY_0.js → empty-state-DIOGM_CU.js} +1 -1
  45. package/dist/assets/{erDiagram-AWTI2OKA-E84mAle_.js → erDiagram-AWTI2OKA-DYu8cEdc.js} +1 -1
  46. package/dist/assets/{error-panel-MEvQ6K7h.js → error-panel-Ddb8RkFG.js} +1 -1
  47. package/dist/assets/file-explorer-panel-Oy9DbyFP.js +1 -0
  48. package/dist/assets/{flowDiagram-PVAE7QVJ-DfbIRSAW.js → flowDiagram-PVAE7QVJ-CmvW5iTb.js} +1 -1
  49. package/dist/assets/{ganttDiagram-OWAHRB6G-DR4HZ1z_.js → ganttDiagram-OWAHRB6G-BaKQlCaT.js} +4 -4
  50. package/dist/assets/gitGraphDiagram-NY62KEGX-CWO24eP6.js +65 -0
  51. package/dist/assets/{glide-data-editor-nNmo1lPq.js → glide-data-editor-CNDLEJ9a.js} +11 -11
  52. package/dist/assets/graph-BZKTtxsc.js +1 -0
  53. package/dist/assets/home-page-Bvwppn9N.js +9 -0
  54. package/dist/assets/{index-VPWqq2Pg.js → index-0XOUPdwT.js} +1 -1
  55. package/dist/assets/{index-uacyUula.js → index-BH7f3aiU.js} +1 -1
  56. package/dist/assets/{index-Dt9UWeWn.js → index-BJVyzkx5.js} +1 -1
  57. package/dist/assets/{index-BAH034Ue.js → index-B_d_JZGI.js} +1 -1
  58. package/dist/assets/{index-CB2pnVQG.js → index-BgXbBA39.js} +1 -1
  59. package/dist/assets/{index-B8llrTSo.js → index-Brf2DwUM.js} +1 -1
  60. package/dist/assets/{index-BLu5CX6z.js → index-CXrWwFX6.js} +1 -1
  61. package/dist/assets/{index-DyLSuOH1.js → index-CZaurnA9.js} +1 -1
  62. package/dist/assets/{index-BFSnz7iM.js → index-CerjupfZ.js} +1 -1
  63. package/dist/assets/{index-B7yXbrLa.js → index-D-tZfElD.js} +1 -1
  64. package/dist/assets/{index-c6If577Q.js → index-D3PqGupX.js} +1 -1
  65. package/dist/assets/{index-CSgxTUzD.js → index-DCkzth56.js} +1 -1
  66. package/dist/assets/{index-DWOaniGT.js → index-DFrGFNW1.js} +1 -1
  67. package/dist/assets/{index-CPN7TRA1.js → index-DZhOPkOB.js} +1 -1
  68. package/dist/assets/index-DadI618h.css +1 -0
  69. package/dist/assets/{index-DqzMPAC8.js → index-DkntzpX4.js} +2 -2
  70. package/dist/assets/{index-B1_GXGaP.js → index-DmgwT3sx.js} +1 -1
  71. package/dist/assets/index-PmY0x4Zd.js +578 -0
  72. package/dist/assets/{index-Bq516OmX.js → index-WXJFkQHg.js} +1 -1
  73. package/dist/assets/{index-DSU75csX.js → index-qE8lHQ-N.js} +1 -1
  74. package/dist/assets/{index-DMomwMcN.js → index-zrSUQXha.js} +1 -1
  75. package/dist/assets/infoDiagram-STP46IZ2-CAuVVehw.js +2 -0
  76. package/dist/assets/isEmpty-D1t7Gran.js +1 -0
  77. package/dist/assets/{journeyDiagram-BIP6EPQ6-BBiFyygf.js → journeyDiagram-BIP6EPQ6-D4Rp6H_h.js} +1 -1
  78. package/dist/assets/{kanban-definition-6OIFK2YF-DhgA6Nt6.js → kanban-definition-6OIFK2YF-DFt9DftA.js} +4 -4
  79. package/dist/assets/layout-D8WXi2_g.js +1 -0
  80. package/dist/assets/linear-BwY8e5hA.js +1 -0
  81. package/dist/assets/links-4B6ldZ5P.js +7 -0
  82. package/dist/assets/{logs-panel-B9SmTZAW.js → logs-panel-Dxiyt7dO.js} +1 -1
  83. package/dist/assets/{agent-panel-DpQ6muj-.css → markdown-renderer-ClyzDMmG.css} +1 -1
  84. package/dist/assets/markdown-renderer-VDu-NBKB.js +263 -0
  85. package/dist/assets/mermaid-B-O-Puyi.js +1 -0
  86. package/dist/assets/{mermaid.core-4nVOEVX3.js → mermaid.core-BFFCqfOn.js} +41 -41
  87. package/dist/assets/min-DtVSfYKl.js +1 -0
  88. package/dist/assets/{mindmap-definition-Q6HEUPPD-CVLQNn1q.js → mindmap-definition-Q6HEUPPD-kyvIY8Dg.js} +2 -2
  89. package/dist/assets/{number-overlay-editor-CzRzXLcd.js → number-overlay-editor-GjLB2UK4.js} +1 -1
  90. package/dist/assets/outline-panel-CMJjOoN7.js +1 -0
  91. package/dist/assets/packages-panel-nfXB-bKW.js +1 -0
  92. package/dist/assets/{pieDiagram-ADFJNKIX-C5IQ5DBZ.js → pieDiagram-ADFJNKIX-D8JFQcWR.js} +3 -3
  93. package/dist/assets/{quadrantDiagram-LMRXKWRM-CFXFnQxx.js → quadrantDiagram-LMRXKWRM-Nf8GzxXG.js} +1 -1
  94. package/dist/assets/{react-plotly-mzdv02_Y.js → react-plotly-CnW9p7ZA.js} +1 -1
  95. package/dist/assets/{requirementDiagram-4UW4RH46-D9bPC89T.js → requirementDiagram-4UW4RH46-CCUxF8BZ.js} +1 -1
  96. package/dist/assets/run-page-Bl4p3AbZ.js +1 -0
  97. package/dist/assets/sankeyDiagram-GR3RE2ED-Sr8kDwP1.js +10 -0
  98. package/dist/assets/scratchpad-panel-Ja1Mu-W3.js +1 -0
  99. package/dist/assets/secrets-panel-B-3fcSyP.js +1 -0
  100. package/dist/assets/{sequenceDiagram-C3RYC4MD-6N7_hY4k.js → sequenceDiagram-C3RYC4MD-CBJ152Q3.js} +4 -4
  101. package/dist/assets/{slides-component-DMjQomc3.css → slides-component-C-LoGC1U.css} +1 -1
  102. package/dist/assets/{slides-component-EcjC8sDK.js → slides-component-DGtsVP5o.js} +1 -1
  103. package/dist/assets/snippets-panel-ClNnwKBM.js +1 -0
  104. package/dist/assets/sortBy-D47H6Vyl.js +1 -0
  105. package/dist/assets/state-B_RCHTH5.js +1 -0
  106. package/dist/assets/stateDiagram-KXAO66HF-BlBFSAZr.js +1 -0
  107. package/dist/assets/stateDiagram-v2-UMBNRL4Z-DbA-iToo.js +1 -0
  108. package/dist/assets/storage-BNcWOH3-.js +26 -0
  109. package/dist/assets/terminal-CATzv5Hd.js +10 -0
  110. package/dist/assets/time-CsYqILfB.js +1 -0
  111. package/dist/assets/{timeline-definition-XQNQX7LJ-BEaynAiY.js → timeline-definition-XQNQX7LJ-CGrhjuAs.js} +1 -1
  112. package/dist/assets/tracing-DUbJtOyq.js +2 -0
  113. package/dist/assets/{tracing-panel-BmuHLPrY.js → tracing-panel-DmzqPUtc.js} +2 -2
  114. package/dist/assets/{trash-UBqfK4mR.js → trash-rxdjLzkf.js} +1 -1
  115. package/dist/assets/{tree-XiEycetl.js → tree-C2Ul1h1C.js} +1 -1
  116. package/dist/assets/{treemap-75Q7IDZK-CnuVFbBG.js → treemap-75Q7IDZK-N9hyUpyj.js} +20 -20
  117. package/dist/assets/{ts-tags-CloPe9IY.js → ts-tags-DxCDHihD.js} +1 -1
  118. package/dist/assets/variable-panel-BbgupOdG.js +1 -0
  119. package/dist/assets/{vega-component-DsTH4tuX.js → vega-component-CR_MHOBT.js} +1 -1
  120. package/dist/assets/worker-fHbtoWvT.js +1 -0
  121. package/dist/assets/{xychartDiagram-6GGTOJPD-Dcz3O-A3.js → xychartDiagram-6GGTOJPD-jdLZsMb2.js} +1 -1
  122. package/dist/index.html +2 -2
  123. package/package.json +10 -5
  124. package/src/__tests__/mocks.ts +43 -0
  125. package/src/components/app-config/user-config-form.tsx +78 -1
  126. package/src/components/chat/acp/__tests__/__snapshots__/prompt.test.ts.snap +116 -65
  127. package/src/components/chat/acp/__tests__/atoms.test.ts +1 -1
  128. package/src/components/chat/acp/__tests__/context-utils.test.ts +222 -0
  129. package/src/components/chat/acp/__tests__/prompt.test.ts +1 -1
  130. package/src/components/chat/acp/__tests__/state.test.ts +38 -42
  131. package/src/components/chat/acp/agent-docs.tsx +33 -6
  132. package/src/components/chat/acp/agent-panel.css +0 -18
  133. package/src/components/chat/acp/agent-panel.tsx +394 -72
  134. package/src/components/chat/acp/agent-selector.tsx +7 -1
  135. package/src/components/chat/acp/blocks.tsx +40 -10
  136. package/src/components/chat/acp/common.tsx +10 -2
  137. package/src/components/chat/acp/context-utils.ts +127 -0
  138. package/src/components/chat/acp/prompt.ts +96 -53
  139. package/src/components/chat/acp/state.ts +1 -1
  140. package/src/components/chat/acp/types.ts +8 -0
  141. package/src/components/chat/chat-panel.tsx +28 -89
  142. package/src/components/chat/chat-utils.ts +127 -1
  143. package/src/components/chat/markdown-renderer.css +39 -0
  144. package/src/components/chat/markdown-renderer.tsx +12 -47
  145. package/src/components/chat/tool-call-accordion.tsx +148 -26
  146. package/src/components/data-table/SearchBar.tsx +8 -7
  147. package/src/components/data-table/__tests__/column_formatting.test.ts +50 -35
  148. package/src/components/data-table/__tests__/data-table.test.tsx +39 -1
  149. package/src/components/data-table/cell-hover-template/feature.ts +14 -0
  150. package/src/components/data-table/cell-hover-template/types.ts +11 -0
  151. package/src/components/data-table/charts/components/form-fields.tsx +41 -37
  152. package/src/components/data-table/charts/forms/common-chart.tsx +2 -2
  153. package/src/components/data-table/column-explorer-panel/column-explorer.tsx +5 -2
  154. package/src/components/data-table/column-formatting/feature.ts +62 -29
  155. package/src/components/data-table/column-formatting/types.ts +1 -0
  156. package/src/components/data-table/column-header.tsx +3 -1
  157. package/src/components/data-table/column-summary/chart-spec-model.tsx +24 -7
  158. package/src/components/data-table/column-summary/column-summary.tsx +18 -9
  159. package/src/components/data-table/columns.tsx +42 -18
  160. package/src/components/data-table/data-table.tsx +10 -2
  161. package/src/components/data-table/date-popover.tsx +85 -75
  162. package/src/components/data-table/filter-pills.tsx +14 -9
  163. package/src/components/data-table/header-items.tsx +5 -1
  164. package/src/components/data-table/pagination.tsx +20 -13
  165. package/src/components/data-table/renderers.tsx +28 -0
  166. package/src/components/data-table/row-viewer-panel/row-viewer.tsx +10 -8
  167. package/src/components/datasources/column-preview.tsx +6 -2
  168. package/src/components/datasources/datasources.tsx +8 -12
  169. package/src/components/editor/Cell.tsx +6 -0
  170. package/src/components/editor/actions/name-cell-input.tsx +6 -1
  171. package/src/components/editor/actions/useCellActionButton.tsx +3 -1
  172. package/src/components/editor/ai/__tests__/completion-utils.test.ts +178 -1
  173. package/src/components/editor/ai/add-cell-with-ai.tsx +68 -66
  174. package/src/components/editor/ai/ai-completion-editor.tsx +29 -26
  175. package/src/components/editor/ai/completion-handlers.tsx +44 -6
  176. package/src/components/editor/ai/completion-utils.ts +92 -0
  177. package/src/components/editor/ai/transport/chat-transport.tsx +39 -0
  178. package/src/components/editor/cell/CellStatus.tsx +23 -20
  179. package/src/components/editor/cell/CreateCellButton.tsx +3 -4
  180. package/src/components/editor/cell/StagedAICell.tsx +51 -0
  181. package/src/components/editor/cell/cell-actions.tsx +2 -1
  182. package/src/components/editor/cell/code/language-toggle.tsx +3 -4
  183. package/src/components/editor/chrome/wrapper/footer-items/machine-stats.tsx +39 -28
  184. package/src/components/editor/controls/notebook-menu-dropdown.tsx +4 -2
  185. package/src/components/editor/file-tree/requesting-tree.tsx +14 -8
  186. package/src/components/editor/renderers/CellArray.tsx +3 -4
  187. package/src/components/editor/renderers/slides-layout/slides-layout.tsx +3 -3
  188. package/src/components/editor/renderers/slides-layout/types.ts +1 -0
  189. package/src/components/pages/home-page.tsx +4 -1
  190. package/src/components/slides/slides-component.tsx +1 -1
  191. package/src/components/slides/slides.css +6 -0
  192. package/src/components/terminal/__tests__/state.test.ts +207 -0
  193. package/src/components/terminal/hooks.ts +41 -0
  194. package/src/components/terminal/state.ts +75 -0
  195. package/src/components/terminal/terminal.tsx +334 -13
  196. package/src/components/terminal/theme.tsx +57 -0
  197. package/src/components/tracing/tracing-spec.ts +5 -4
  198. package/src/components/ui/range-slider.tsx +4 -2
  199. package/src/components/ui/slider.tsx +3 -1
  200. package/src/components/variables/variables-table.tsx +3 -0
  201. package/src/core/MarimoApp.tsx +9 -6
  202. package/src/core/ai/__tests__/staged-cells.test.ts +356 -0
  203. package/src/core/ai/context/__tests__/registry.test.ts +6 -4
  204. package/src/core/ai/context/providers/cell-output.ts +3 -2
  205. package/src/core/ai/context/providers/error.ts +3 -1
  206. package/src/core/ai/context/providers/file.ts +7 -2
  207. package/src/core/ai/context/providers/tables.ts +3 -2
  208. package/src/core/ai/context/providers/variable.ts +6 -4
  209. package/src/core/ai/staged-cells.ts +208 -0
  210. package/src/core/cells/cells.ts +1 -1
  211. package/src/core/cells/logs.ts +1 -1
  212. package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
  213. package/src/core/codemirror/language/LanguageAdapters.ts +9 -3
  214. package/src/core/codemirror/lsp/federated-lsp.ts +1 -1
  215. package/src/core/codemirror/lsp/notebook-lsp.ts +8 -2
  216. package/src/core/codemirror/readonly/__tests__/extension.test.ts +1 -1
  217. package/src/core/codemirror/rtc/loro/awareness.ts +52 -17
  218. package/src/core/codemirror/rtc/loro/sync.ts +12 -4
  219. package/src/core/config/config-schema.ts +1 -0
  220. package/src/core/config/config.ts +4 -0
  221. package/src/core/hotkeys/hotkeys.ts +8 -4
  222. package/src/core/i18n/__tests__/locale-provider.test.tsx +176 -0
  223. package/src/core/i18n/locale-provider.tsx +35 -0
  224. package/src/core/i18n/with-locale.tsx +12 -0
  225. package/src/core/islands/components/web-components.tsx +13 -10
  226. package/src/core/islands/main.ts +2 -2
  227. package/src/core/kernel/RuntimeState.ts +4 -1
  228. package/src/core/kernel/messages.ts +8 -12
  229. package/src/core/network/DeferredRequestRegistry.ts +16 -4
  230. package/src/core/runtime/runtime.ts +5 -4
  231. package/src/core/saving/__tests__/filename.test.ts +37 -0
  232. package/src/core/static/__tests__/download-html.test.ts +43 -1
  233. package/src/core/wasm/bridge.ts +5 -1
  234. package/src/core/wasm/store.ts +4 -1
  235. package/src/core/wasm/worker/message-buffer.ts +3 -2
  236. package/src/core/websocket/types.ts +22 -16
  237. package/src/core/websocket/useMarimoWebSocket.tsx +2 -2
  238. package/src/css/app/Cell.css +11 -0
  239. package/src/hooks/useFormatting.ts +97 -0
  240. package/src/hooks/useTimer.ts +8 -5
  241. package/src/plugins/core/RenderHTML.tsx +36 -2
  242. package/src/plugins/core/__test__/RenderHTML.test.ts +72 -0
  243. package/src/plugins/core/registerReactComponent.tsx +44 -10
  244. package/src/plugins/impl/DataTablePlugin.tsx +4 -0
  245. package/src/plugins/impl/FileBrowserPlugin.tsx +8 -2
  246. package/src/plugins/impl/RangeSliderPlugin.tsx +5 -3
  247. package/src/plugins/impl/SliderPlugin.tsx +3 -1
  248. package/src/plugins/impl/anywidget/model.ts +16 -5
  249. package/src/plugins/impl/data-editor/types.ts +7 -5
  250. package/src/plugins/impl/data-explorer/components/column-summary.tsx +20 -13
  251. package/src/plugins/impl/panel/utils.ts +6 -4
  252. package/src/plugins/layout/OutlinePlugin.tsx +69 -0
  253. package/src/plugins/layout/StatPlugin.tsx +4 -1
  254. package/src/plugins/plugins.ts +2 -0
  255. package/src/stories/cell.stories.tsx +1 -1
  256. package/src/stories/layout/vertical/one-column.stories.tsx +1 -1
  257. package/src/utils/__tests__/cell-urls.test.ts +29 -0
  258. package/src/utils/__tests__/dates.test.ts +45 -24
  259. package/src/utils/__tests__/filenames.test.ts +18 -0
  260. package/src/utils/__tests__/numbers.test.ts +42 -30
  261. package/src/utils/__tests__/once.test.ts +187 -0
  262. package/src/utils/__tests__/path.test.ts +38 -0
  263. package/src/utils/__tests__/urls.test.ts +56 -1
  264. package/src/utils/dates.ts +15 -10
  265. package/src/utils/edit-distance.ts +8 -6
  266. package/src/utils/errors.ts +9 -0
  267. package/src/utils/id-tree.tsx +21 -10
  268. package/src/utils/localStorage.ts +13 -4
  269. package/src/utils/numbers.ts +11 -11
  270. package/src/utils/once.ts +32 -0
  271. package/src/utils/paths.ts +4 -1
  272. package/src/utils/pluralize.ts +12 -5
  273. package/src/utils/python-poet/poet.ts +30 -15
  274. package/src/utils/time.ts +5 -1
  275. package/dist/assets/ConnectedDataExplorerComponent-Cn5-l2X1.js +0 -19
  276. package/dist/assets/_baseEach-C1FLm7WW.js +0 -1
  277. package/dist/assets/_baseMap-DBVArUYD.js +0 -1
  278. package/dist/assets/_baseUniq-Dk7ZPJ3N.js +0 -1
  279. package/dist/assets/_createAggregator-Bn38fDd3.js +0 -1
  280. package/dist/assets/agent-panel-COUYnuIK.js +0 -475
  281. package/dist/assets/architectureDiagram-W76B3OCA-DBzWQKKu.js +0 -36
  282. package/dist/assets/channel-CjhbjOv4.js +0 -1
  283. package/dist/assets/chat-panel-BPXKoTnZ.js +0 -7
  284. package/dist/assets/chat-panel-Brrs_eeH.css +0 -1
  285. package/dist/assets/classDiagram-KNZD7YFC-DHs5cFzy.js +0 -1
  286. package/dist/assets/classDiagram-v2-RKCZMP56-DHs5cFzy.js +0 -1
  287. package/dist/assets/clone-DM1YNjEn.js +0 -1
  288. package/dist/assets/command-palette-S0bzQp7v.js +0 -1
  289. package/dist/assets/common-B8U9k2Ly.js +0 -1
  290. package/dist/assets/cose-bilkent-S5V4N54A-wz1Sfx7j.js +0 -1
  291. package/dist/assets/dagre-5GWH7T2D-BfpcVBgq.js +0 -4
  292. package/dist/assets/datasources-panel-DfuURLJw.js +0 -1
  293. package/dist/assets/diagram-N5W7TBWH-Bf0oqqQh.js +0 -24
  294. package/dist/assets/diagram-QEK2KX5R-ZTc3qikh.js +0 -43
  295. package/dist/assets/diagram-S2PKOQOG-tLScBy7Z.js +0 -24
  296. package/dist/assets/edit-page-DJ8kJZ9w.js +0 -129
  297. package/dist/assets/file-explorer-panel-CzNUJ63G.js +0 -1
  298. package/dist/assets/gitGraphDiagram-NY62KEGX-C1t6QtVa.js +0 -65
  299. package/dist/assets/graph-CssCVWIq.js +0 -1
  300. package/dist/assets/home-page-9eW6qida.js +0 -9
  301. package/dist/assets/index-CknhX2Vy.css +0 -1
  302. package/dist/assets/index-DcCIe7np.js +0 -28
  303. package/dist/assets/index-OC46250R.js +0 -570
  304. package/dist/assets/infoDiagram-STP46IZ2-CwiAoz9f.js +0 -2
  305. package/dist/assets/layout-DpQrxGW-.js +0 -1
  306. package/dist/assets/linear-NsreOeBF.js +0 -1
  307. package/dist/assets/links-CbvGxbsJ.js +0 -7
  308. package/dist/assets/mermaid-DSt0r6IQ.js +0 -1
  309. package/dist/assets/min-D259kI3t.js +0 -1
  310. package/dist/assets/outline-panel-uvsS-YEQ.js +0 -1
  311. package/dist/assets/packages-panel-xMz9W2hW.js +0 -1
  312. package/dist/assets/run-page-Bb68qdhQ.js +0 -1
  313. package/dist/assets/sankeyDiagram-GR3RE2ED-BSJOau8E.js +0 -10
  314. package/dist/assets/scratchpad-panel-BF4BO-U4.js +0 -1
  315. package/dist/assets/secrets-panel-CdIX44dQ.js +0 -1
  316. package/dist/assets/snippets-panel-Dco9h0rb.js +0 -1
  317. package/dist/assets/sortBy-aLGA-PGK.js +0 -1
  318. package/dist/assets/stateDiagram-KXAO66HF-Bd68WT3b.js +0 -1
  319. package/dist/assets/stateDiagram-v2-UMBNRL4Z-BXz_GSwb.js +0 -1
  320. package/dist/assets/storage-CGlP4lCF.js +0 -26
  321. package/dist/assets/terminal-CxkHubcu.js +0 -9
  322. package/dist/assets/time-D2nr1UgQ.js +0 -1
  323. package/dist/assets/tracing-kTqHxa7q.js +0 -2
  324. package/dist/assets/variable-panel-noTnH-AQ.js +0 -1
  325. package/dist/assets/worker-X5rxzQGQ.js +0 -1
@@ -1 +1 @@
1
- import e from"./typescript-C6YI4KwS.js";import s from"./css-l46fsARh.js";import t from"./javascript-CY0YvwoL.js";import n from"./glsl-BDbjGBhJ.js";import i from"./html-ReiWYoHo.js";import c from"./sql-BhJCBb_s.js";import m from"./xml-BsgRw6d1.js";import"./c-BmJt9k-y.js";import"./java-DtRXFtDl.js";const r=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string, L:source.vue -comment -string, L:source.svelte -comment -string, L:source.php -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-css","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)css)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)css))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)css) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.css"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-css","embeddedLangs":["typescript","css","javascript"]}')),l=[...e,...s,...t,r],a=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-glsl","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)glsl)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)glsl))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)glsl) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-glsl","embeddedLangs":["typescript","glsl","javascript"]}')),o=[...e,...n,...t,a],u=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-html","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(html|template|inline-html|inline-template)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*(html|template|inline-html|inline-template))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(html|template|inline-html|inline-template) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]},{"begin":"(\\\\$\\\\(`)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(`\\\\))","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-html","embeddedLangs":["typescript","html","javascript"]}')),p=[...e,...i,...t,u],g=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-sql","patterns":[{"begin":"(?i)\\\\b(\\\\w+\\\\.sql)\\\\s*(`)","beginCaptures":{"1":{"name":"variable.parameter"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(\\\\s?/?\\\\*?\\\\s?((?:|inline-)sql)\\\\s?\\\\*?/?\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)sql) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`)","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]}],"scopeName":"inline.es6-sql","embeddedLangs":["typescript","sql"]}')),d=[...e,...c,g],b=[...m,Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-xml","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(xml|svg|inline-svg|inline-xml)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(\\\\s*((?:|inline-)xml))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(xml|svg|inline-svg|inline-xml) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"text.xml"}]}],"scopeName":"inline.es6-xml","embeddedLangs":["xml"]}'))],j=Object.freeze(JSON.parse('{"displayName":"TypeScript with Tags","name":"ts-tags","patterns":[{"include":"source.ts"}],"scopeName":"source.ts.tags","embeddedLangs":["typescript","es-tag-css","es-tag-glsl","es-tag-html","es-tag-sql","es-tag-xml"],"aliases":["lit"]}')),x=[...e,...l,...o,...p,...d,...b,j];export{x as default};
1
+ import e from"./typescript-C6YI4KwS.js";import s from"./css-l46fsARh.js";import t from"./javascript-CY0YvwoL.js";import n from"./glsl-BDbjGBhJ.js";import i from"./html-ReiWYoHo.js";import c from"./sql-BhJCBb_s.js";import m from"./xml-BsgRw6d1.js";import"./c-BmJt9k-y.js";import"./java-DtRXFtDl.js";const r=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string, L:source.vue -comment -string, L:source.svelte -comment -string, L:source.php -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-css","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)css)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)css))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.css"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)css) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.css"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-css","embeddedLangs":["typescript","css","javascript"]}')),l=[...e,...s,...t,r],a=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-glsl","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?((?:|inline-)glsl)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*((?:|inline-)glsl))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)glsl) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.glsl"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-glsl","embeddedLangs":["typescript","glsl","javascript"]}')),o=[...e,...n,...t,a],u=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-html","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(html|template|inline-html|inline-template)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"}]},{"begin":"(?i)(\\\\s*(html|template|inline-html|inline-template))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"},{"include":"inline.es6-htmlx#template"},{"include":"string.quoted.other.template.js"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(html|template|inline-html|inline-template) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"text.html.basic"}]},{"begin":"(\\\\$\\\\{)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(})","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]},{"begin":"(\\\\$\\\\(`)","beginCaptures":{"1":{"name":"entity.name.tag"}},"end":"(`\\\\))","endCaptures":{"1":{"name":"entity.name.tag"}},"patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.js"}]}],"scopeName":"inline.es6-html","embeddedLangs":["typescript","html","javascript"]}')),p=[...e,...i,...t,u],g=Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-sql","patterns":[{"begin":"(?i)\\\\b(\\\\w+\\\\.sql)\\\\s*(`)","beginCaptures":{"1":{"name":"variable.parameter"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(\\\\s?/?\\\\*?\\\\s?((?:|inline-)sql)\\\\s?\\\\*?/?\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?((?:|inline-)sql) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`)","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"source.ts#template-substitution-element"},{"include":"source.ts#string-character-escape"},{"include":"source.sql"},{"include":"source.plpgsql.postgres"},{"match":"."}]}],"scopeName":"inline.es6-sql","embeddedLangs":["typescript","sql"]}')),d=[...e,...c,g],b=[...m,Object.freeze(JSON.parse('{"fileTypes":["js","jsx","ts","tsx","html","vue","svelte","php","res"],"injectTo":["source.ts","source.js"],"injectionSelector":"L:source.js -comment -string, L:source.js -comment -string, L:source.jsx -comment -string, L:source.js.jsx -comment -string, L:source.ts -comment -string, L:source.tsx -comment -string, L:source.rescript -comment -string","injections":{"L:source":{"patterns":[{"match":"<","name":"invalid.illegal.bad-angle-bracket.html"}]}},"name":"es-tag-xml","patterns":[{"begin":"(?i)(\\\\s?/\\\\*\\\\s?(xml|svg|inline-svg|inline-xml)\\\\s?\\\\*/\\\\s?)(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(\\\\s*((?:|inline-)xml))(`)","beginCaptures":{"1":{"name":"comment.block"}},"end":"(`)","patterns":[{"include":"text.xml"}]},{"begin":"(?i)(?<=[(,:=\\\\s]|\\\\$\\\\()\\\\s*(((/\\\\*)|(//))\\\\s?(xml|svg|inline-svg|inline-xml) {0,1000}\\\\*?/?) {0,1000}$","beginCaptures":{"1":{"name":"comment.line"}},"end":"(`).*","patterns":[{"begin":"\\\\G()","end":"(`)"},{"include":"text.xml"}]}],"scopeName":"inline.es6-xml","embeddedLangs":["xml"]}'))],j=Object.freeze(JSON.parse('{"displayName":"TypeScript with Tags","name":"ts-tags","patterns":[{"include":"source.ts"}],"scopeName":"source.ts.tags","embeddedLangs":["typescript","es-tag-css","es-tag-glsl","es-tag-html","es-tag-sql","es-tag-xml"],"aliases":["lit"]}')),h=[...e,...l,...o,...p,...d,...b,j];export{h as default};
@@ -0,0 +1 @@
1
+ import{c as O,r as u,d as v,bV as T,bW as D,bX as G,bY as R,bZ as q,b_ as P,j as e,aC as $,a5 as U,T as Y,a3 as Z,Y as _,a4 as z,b$ as F,a6 as E,Z as H,c0 as W,c1 as h,V as C,b8 as X,b9 as A,a as J,c2 as K,ak as L,c3 as Q,__tla as ee}from"./index-PmY0x4Zd.js";import{V as re,C as te}from"./common-Ku-cF_2J.js";import{s as b}from"./sortBy-D47H6Vyl.js";import{a as ae,__tla as oe}from"./edit-page-CyTMQV2u.js";import{P as se}from"./empty-state-DIOGM_CU.js";import"./_baseEach-9_logFrf.js";import"./_baseMap-NzEbKt5c.js";import"./links-4B6ldZ5P.js";import{__tla as ie}from"./storage-BNcWOH3-.js";import"./index-BJVyzkx5.js";import"./index-B_d_JZGI.js";import"./index-DkntzpX4.js";import"./index-qE8lHQ-N.js";import"./index-DCkzth56.js";import"./index-CXrWwFX6.js";import"./index-Brf2DwUM.js";import"./index-DZhOPkOB.js";import"./index-CerjupfZ.js";import"./index-WXJFkQHg.js";import"./index-BgXbBA39.js";import"./index-DFrGFNW1.js";import"./index-D3PqGupX.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asn1-DWPaVWf6.js";import"./brainfuck-CtZaYBKt.js";import"./cobol-stawOqaz.js";import"./clike-BgBwzOhw.js";import"./clojure-DiuoqK-z.js";import"./css-ZjFoif2m.js";import"./cmake-DXn5xaP-.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./cypher-gJDei3ni.js";import"./python-DD-Q2bae.js";import"./crystal-CRzZ78HM.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./simple-mode-C3vEBAcb.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./mllike-3c2dg9RT.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./idl-pcmmZuaN.js";import"./javascript-BpzJj0-u.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mirc-DkvFAiy5.js";import"./mathematica-IIbmv7SK.js";import"./modelica-DSrSSXCg.js";import"./mumps-zvxmGV4l.js";import"./mbox-z_N2Mo3d.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./pug-BTvK5tSS.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./rpm-DI_rRufH.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./sparql-BRLJFz69.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./verilog-B4LBqg_1.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./ttcn-cfg-CKJxb-l2.js";import"./turtle-BkSuIpt-.js";import"./webidl-CGwyPRYs.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./vhdl-CWWH2SUo.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./mscgen-B2igx18G.js";import"./index-zrSUQXha.js";import"./trash-rxdjLzkf.js";import"./_createAggregator-ZRm2b6Zm.js";import{__tla as le}from"./loro_wasm_bg-C1ks32Vm.js";let k,me=Promise.all([(()=>{try{return ee}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return ie}catch{}})(),(()=>{try{return le}catch{}})()]).then(async()=>{const B=O("square-equal",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M7 10h10",key:"1101jm"}],["path",{d:"M7 14h10",key:"1mhdw3"}]]),f="name",g="type-value",x="defs-refs",S=[{id:f,accessorFn:r=>[r.name,r.declaredBy],enableSorting:!0,sortingFn:"alphanumeric",header:({column:r})=>e.jsx(h,{header:"Name",column:r}),cell:({getValue:r})=>{const[t,s]=r();return e.jsx(re,{name:t,declaredBy:s})}},{id:g,accessorFn:r=>[r.dataType,r.value],enableSorting:!0,sortingFn:"alphanumeric",header:({column:r})=>e.jsx(h,{header:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{children:"Type"}),e.jsx("span",{children:"Value"})]}),column:r}),cell:({getValue:r})=>{const[t,s]=r();return e.jsxs("div",{className:"max-w-[150px]",children:[e.jsx("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap text-muted-foreground font-mono text-xs",children:t}),e.jsx("div",{className:"text-ellipsis overflow-hidden whitespace-nowrap",title:s??"",children:s})]})}},{id:x,accessorFn:r=>[r.declaredBy,r.usedBy,r.name,r.declaredByNames,r.usedByNames],enableSorting:!0,sortingFn:"basic",header:({column:r})=>e.jsx(h,{header:e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{children:"Declared By"}),e.jsx("span",{children:"Used By"})]}),column:r}),cell:({getValue:r})=>{const[t,s,i]=r(),l=m=>{const c=X(m);c&&A(c,i)};return e.jsxs("div",{className:"flex flex-col gap-1 py-1",children:[e.jsxs("div",{className:"flex flex-row overflow-auto gap-2 items-center",children:[e.jsx("span",{title:"Declared by",children:e.jsx(B,{className:"w-3.5 h-3.5 text-muted-foreground"})}),t.length===1?e.jsx(C,{variant:"focus",cellId:t[0],skipScroll:!0,onClick:()=>l(t[0])}):e.jsx("div",{className:"text-destructive flex flex-row gap-2",children:t.slice(0,3).map((m,c)=>e.jsxs("span",{className:"flex",children:[e.jsx(C,{variant:"focus",cellId:m,skipScroll:!0,className:"whitespace-nowrap text-destructive",onClick:()=>l(m)},m),c<t.length-1&&", "]},m))})]}),e.jsxs("div",{className:"flex flex-row overflow-auto gap-2 items-baseline",children:[e.jsx("span",{title:"Used by",children:e.jsx(ae,{className:"w-3.5 h-3.5 text-muted-foreground"})}),e.jsx(te,{maxCount:3,cellIds:s,skipScroll:!0,onClick:l})]})]})}}],j=u.memo(({className:r,cellIds:t,variables:s})=>{const[i,l]=v.useState([]),[m,c]=v.useState(""),y=T(),{locale:I}=D(),w=u.useMemo(()=>{const o=a=>{const p=y[a];return W(p)?`cell-${t.indexOf(a)}`:p??`cell-${t.indexOf(a)}`};return Object.values(s).map(a=>({...a,declaredByNames:a.declaredBy.map(o),usedByNames:a.usedBy.map(o)}))},[s,y,t]),V=u.useMemo(()=>{const o=new Map;return t.forEach((a,p)=>o.set(a,p)),(function({variables:a,sort:p,cellIdToIndex:M}){p||(p={id:x,desc:!1});let n=[];switch(p.id){case f:n=b(a,d=>d.name);break;case g:n=b(a,d=>d.dataType);break;case x:n=b(a,d=>M.get(d.declaredBy[0]))}return p.desc?n.reverse():n})({variables:w,sort:i[0],cellIdToIndex:o})},[w,i,t]),N=G({data:V,columns:S,getCoreRowModel:P(),onGlobalFilterChange:c,getFilteredRowModel:q(),enableFilters:!0,enableGlobalFilter:!0,enableColumnPinning:!1,getColumnCanGlobalFilter:o=>o.columnDef.enableGlobalFilter??!0,globalFilterFn:"auto",manualSorting:!0,locale:I,onSortingChange:l,getSortedRowModel:R(),state:{sorting:i,globalFilter:m}});return e.jsxs(e.Fragment,{children:[e.jsx($,{className:"w-full",placeholder:"Search",value:m,onChange:o=>c(o.target.value)}),e.jsxs(U,{className:Y("w-full text-sm flex-1 border-separate border-spacing-0",r),children:[e.jsx(Z,{children:e.jsx(_,{className:"whitespace-nowrap text-xs",children:N.getFlatHeaders().map(o=>e.jsx(z,{className:"sticky top-0 bg-background border-b",children:F(o.column.columnDef.header,o.getContext())},o.id))})}),e.jsx(E,{children:N.getRowModel().rows.map(o=>e.jsx(_,{className:"hover:bg-accent",children:o.getVisibleCells().map(a=>e.jsx(H,{className:"border-b",children:F(a.column.columnDef.cell,a.getContext())},a.id))},o.id))})]})]})});j.displayName="VariableTable",k=()=>{const r=J.c(4),t=K(),s=L();if(Object.keys(t).length===0){let l;return r[0]===Symbol.for("react.memo_cache_sentinel")?(l=e.jsx(se,{title:"No variables",description:"Global variables will appear here.",icon:e.jsx(Q,{})}),r[0]=l):l=r[0],l}let i;return r[1]!==s.inOrderIds||r[2]!==t?(i=e.jsx(j,{className:"flex-1",cellIds:s.inOrderIds,variables:t}),r[1]=s.inOrderIds,r[2]=t,r[3]=i):i=r[3],i}});export{me as __tla,k as default};
@@ -1 +1 @@
1
- import{cI as K,cJ as E,a as F,b as D,cK as G,cL as W,j as g,E as $,u as C,r as S,cM as V,cA as N,cN as q,L as _,ch as z,cO as J,cP as Q,aw as R,cQ as B,ap as U,ar as X}from"./index-OC46250R.js";import{M as y}from"./compile-Ct_jzdKr.js";import{a as Y}from"./VegaLite-Bt14Ds9k.js";import"./time-D2nr1UgQ.js";import"./timer-Bqd5yn_a.js";import"./linear-NsreOeBF.js";import"./init-DLRA0X12.js";import"./range-CtcPcB_L.js";import"./zoom-COrs4lFh.js";import"./ordinal-DDUp3AbE.js";import"./colors-bszWmPJw.js";import"./step-BwsUM5iJ.js";import"./arc-Cuwikxov.js";import"./index-BEQfoZiP.js";import"./index-VPWqq2Pg.js";const A=new Set(["boxplot","errorband","errorbar"]),j={getMarkType(t){const e=typeof t=="string"?t:t.type;if(A.has(e))throw new Error("Not supported");return e},isInteractive(t){const e=typeof t=="string"?t:t.type;return!A.has(e)},makeClickable(t){const e=typeof t=="string"?t:t.type;return e in y?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:e,cursor:"pointer",tooltip:!0}:t},getOpacity:t=>typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null},tt=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function et(t,e,r,i){const u={and:r.map(d=>({param:d}))};if(t==="opacity"){const d=j.getOpacity(i)||1;return{...e,opacity:{condition:{test:u,value:d},value:d/5}}}return e}const w={point:t=>t==null?"select_point":`select_point_${t}`,interval:t=>t==null?"select_interval":`select_interval_${t}`,legendSelection:t=>`legend_selection_${t}`,HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint:t=>t.some(e=>e.startsWith("select_point")),hasInterval:t=>t.some(e=>e.startsWith("select_interval")),hasLegend:t=>t.some(e=>e.startsWith("legend_selection")),hasPanZoom:t=>t.some(e=>e.startsWith("pan_zoom"))},P={highlight:()=>({name:w.HIGHLIGHT,select:{type:"point",on:"mouseover"}}),interval:(t,e)=>({name:w.interval(e),select:{type:"interval",encodings:L(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}),point:(t,e)=>({name:w.point(e),select:{type:"point",encodings:L(t),on:"click[!event.metaKey]"}}),legend:t=>({name:w.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}),panZoom:()=>({name:w.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}})};function L(t){switch(j.getMarkType(t.mark)){case y.image:case y.trail:return;case y.area:case y.arc:return["color"];case y.bar:{const e=(function(r){var d,l;if(!r||!("mark"in r))return;const i=(d=r.encoding)==null?void 0:d.x,u=(l=r.encoding)==null?void 0:l.y;if(i&&"type"in i&&i.type==="nominal")return"vertical";if(u&&"type"in u&&u.type==="nominal"||i&&"aggregate"in i)return"horizontal";if(u&&"aggregate"in u)return"vertical"})(t);return e==="horizontal"?["y"]:e==="vertical"?["x"]:void 0}case y.circle:case y.geoshape:case y.line:case y.point:case y.rect:case y.rule:case y.square:case y.text:case y.tick:return["x","y"]}}function Z(t){return"params"in t&&t.params&&t.params.length>0?t.params.filter(e=>e!=null&&"select"in e&&e.select!==void 0).map(e=>e.name):"layer"in t?[...new Set(t.layer.flatMap(Z))]:[]}function at(t,e){var f,v;let{chartSelection:r=!0,fieldSelection:i=!0}=e;if(!r&&!i)return t;if(((f=t.params)==null?void 0:f.some(c=>c.bind==="legend"))&&(i=!1),((v=t.params)==null?void 0:v.some(c=>!c.bind))&&(r=!1),"vconcat"in t){const c=t.vconcat.map(o=>"mark"in o?O(o):o);return{...t,vconcat:c}}if("hconcat"in t){const c=t.hconcat.map(o=>"mark"in o?O(o):o);return{...t,hconcat:c}}if("layer"in t){const c=t.layer.map((o,p)=>{if(!("mark"in o))return o;let s=o;return s=T(s,r,p),s=O(s),p===0&&(s=H(s)),s});return{...t,layer:c}}if(!("mark"in t)||!j.isInteractive(t.mark))return t;let l=t;return l=(function(c,o){if(o===!1)return c;let p=(function(h){if(!h||!("encoding"in h))return[];const{encoding:b}=h;return b?Object.entries(b).flatMap(a=>{const[n,m]=a;return m&&tt.has(n)?"field"in m&&typeof m.field=="string"?[m.field]:"condition"in m&&m.condition&&typeof m.condition=="object"&&"field"in m.condition&&m.condition.field&&typeof m.condition.field=="string"?[m.condition.field]:[]:[]}):[]})(c);Array.isArray(o)&&(p=p.filter(h=>o.includes(h)));const s=p.map(h=>P.legend(h)),x=[...c.params||[],...s];return{...c,params:x}})(l,i),l=T(l,r,void 0),l=O(l),l=H(l),l}function T(t,e,r){if(e===!1)return t;let i;try{i=j.getMarkType(t.mark)}catch{return t}if(i==="geoshape")return t;const u=e===!0?(function(f){switch(f){case"arc":case"area":return["point"];case"text":case"bar":default:return["point","interval"];case"line":return}})(i):[e];if(!u)return t;const d=u.map(f=>f==="interval"?P.interval(t,r):P.point(t,r)),l=[...t.params||[],...d];return{...t,params:l}}function H(t){let e;try{e=j.getMarkType(t.mark)}catch{}if(e==="geoshape")return t;const r=t.params||[];return r.some(i=>i.bind==="scales")?t:{...t,params:[...r,P.panZoom()]}}function O(t){const e="encoding"in t?t.encoding:void 0,r=t.params||[],i=r.map(u=>u.name);return r.length===0?t:j.isInteractive(t.mark)?{...t,mark:j.makeClickable(t.mark),encoding:et("opacity",e||{},i,t.mark)}:t}G("arrow",W);const nt=t=>{const e=F.c(11),{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:l}=t;let f,v;e[0]!==l?(f=async()=>(async function(s){if(!s)return s;const x="datasets"in s?{...s.datasets}:{},h=async a=>{if(!a)return a;if("layer"in a){const k=await Promise.all(a.layer.map(h));a={...a,layer:k}}if("hconcat"in a){const k=await Promise.all(a.hconcat.map(h));a={...a,hconcat:k}}if("vconcat"in a){const k=await Promise.all(a.vconcat.map(h));a={...a,vconcat:k}}if("spec"in a&&(a={...a,spec:await h(a.spec)}),!a.data||!("url"in a.data))return a;let n;try{n=K(a.data.url)}catch{return a}const m=await E(n.href,a.data.format);return x[n.pathname]=m,{...a,data:{name:n.pathname}}},b=await h(s);return Object.keys(x).length===0?b:{...b,datasets:x}})(l),v=[l],e[0]=l,e[1]=f,e[2]=v):(f=e[1],v=e[2]);const{data:c,error:o}=D(f,v);if(o){let s;return e[3]!==o?(s=g.jsx($,{error:o}),e[3]=o,e[4]=s):s=e[4],s}if(!c)return null;let p;return e[5]!==u||e[6]!==d||e[7]!==c||e[8]!==i||e[9]!==r?(p=g.jsx(rt,{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:c}),e[5]=u,e[6]=d,e[7]=c,e[8]=i,e[9]=r,e[10]=p):p=e[10],p},rt=({value:t,setValue:e,chartSelection:r,fieldSelection:i,spec:u})=>{const{theme:d}=C(),l=S.useRef(void 0),[f,v]=S.useState(),c=V(u),o=S.useMemo(()=>at((function(n){return n.data&&"url"in n.data&&(n.data.url=K(n.data.url).href),n})(c),{chartSelection:r,fieldSelection:i}),[c,r,i]),p=S.useMemo(()=>Z(o),[o]),s=N(n=>{e({...t,...n})}),x=V(p),h=S.useMemo(()=>x.reduce((n,m)=>(w.PAN_ZOOM===m||(n[m]=q((k,I)=>{_.debug("[Vega signal]",k,I);let M=z.mapValues(I,st);M=z.mapValues(M,ot),s({[k]:M})},100)),n),{}),[x,s]),b=N(n=>{_.error(n),_.debug(o),v(n)}),a=N(n=>{_.debug("[Vega view] created",n),l.current=n,v(void 0)});return g.jsxs(g.Fragment,{children:[f&&g.jsxs(J,{variant:"destructive",children:[g.jsx(Q,{children:f.message}),g.jsx("div",{className:"text-md",children:f.stack})]}),g.jsxs("div",{className:"relative",onPointerDown:R.stopPropagation(),children:[g.jsx(Y,{spec:o,theme:d==="dark"?"dark":void 0,actions:it,signalListeners:h,onError:b,onNewView:a}),(()=>{const n=[];return w.hasPoint(p)&&n.push(["Point selection","click to select a point; hold shift for multi-select"]),w.hasInterval(p)&&n.push(["Interval selection","click and drag to select an interval"]),w.hasLegend(p)&&n.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),w.hasPanZoom(p)&&n.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),n.length===0?null:g.jsx(U,{delayDuration:300,side:"left",content:g.jsx("div",{className:"text-xs flex flex-col",children:n.map((m,k)=>g.jsxs("div",{children:[g.jsxs("span",{className:"font-bold tracking-wide",children:[m[0],":"]})," ",m[1]]},k))}),children:g.jsx(X,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})})()]})]})},it={source:!1,compiled:!1};function ot(t){return t instanceof Set?[...t]:t}function st(t){return Array.isArray(t)?t.map(e=>e instanceof Date&&B(e)?new Date(e).getTime():e):t}export{nt as default};
1
+ import{dM as K,dN as D,a as E,b as F,dO as G,dP as W,j as g,E as $,u as C,r as j,dQ as T,cM as N,dR as R,L as M,ct as z,dS as q,dT as B,aI as Q,dU as U,aB as J,aD as X}from"./index-PmY0x4Zd.js";import{M as y}from"./compile-BgZlHW1c.js";import{a as Y}from"./VegaLite-MJUW3b7C.js";import"./time-CsYqILfB.js";import"./timer-Bqd5yn_a.js";import"./linear-BwY8e5hA.js";import"./init-DLRA0X12.js";import"./range-CtcPcB_L.js";import"./zoom-COrs4lFh.js";import"./ordinal-DDUp3AbE.js";import"./colors-bszWmPJw.js";import"./step-BwsUM5iJ.js";import"./arc-Cuwikxov.js";import"./index-BEQfoZiP.js";import"./index-0XOUPdwT.js";const V=new Set(["boxplot","errorband","errorbar"]),S={getMarkType(t){const e=typeof t=="string"?t:t.type;if(V.has(e))throw new Error("Not supported");return e},isInteractive(t){const e=typeof t=="string"?t:t.type;return!V.has(e)},makeClickable(t){const e=typeof t=="string"?t:t.type;return e in y?typeof t=="string"?{type:t,cursor:"pointer",tooltip:!0}:{...t,type:e,cursor:"pointer",tooltip:!0}:t},getOpacity:t=>typeof t=="string"?null:"opacity"in t&&typeof t.opacity=="number"?t.opacity:null},tt=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function et(t,e,r,i){const u={and:r.map(d=>({param:d}))};if(t==="opacity"){const d=S.getOpacity(i)||1;return{...e,opacity:{condition:{test:u,value:d},value:d/5}}}return e}const w={point:t=>t==null?"select_point":`select_point_${t}`,interval:t=>t==null?"select_interval":`select_interval_${t}`,legendSelection:t=>`legend_selection_${t}`,HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint:t=>t.some(e=>e.startsWith("select_point")),hasInterval:t=>t.some(e=>e.startsWith("select_interval")),hasLegend:t=>t.some(e=>e.startsWith("legend_selection")),hasPanZoom:t=>t.some(e=>e.startsWith("pan_zoom"))},P={highlight:()=>({name:w.HIGHLIGHT,select:{type:"point",on:"mouseover"}}),interval:(t,e)=>({name:w.interval(e),select:{type:"interval",encodings:Z(t),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}),point:(t,e)=>({name:w.point(e),select:{type:"point",encodings:Z(t),on:"click[!event.metaKey]"}}),legend:t=>({name:w.legendSelection(t),select:{type:"point",fields:[t]},bind:"legend"}),panZoom:()=>({name:w.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}})};function Z(t){switch(S.getMarkType(t.mark)){case y.image:case y.trail:return;case y.area:case y.arc:return["color"];case y.bar:{const e=(function(r){var d,l;if(!r||!("mark"in r))return;const i=(d=r.encoding)==null?void 0:d.x,u=(l=r.encoding)==null?void 0:l.y;if(i&&"type"in i&&i.type==="nominal")return"vertical";if(u&&"type"in u&&u.type==="nominal"||i&&"aggregate"in i)return"horizontal";if(u&&"aggregate"in u)return"vertical"})(t);return e==="horizontal"?["y"]:e==="vertical"?["x"]:void 0}case y.circle:case y.geoshape:case y.line:case y.point:case y.rect:case y.rule:case y.square:case y.text:case y.tick:return["x","y"]}}function A(t){return"params"in t&&t.params&&t.params.length>0?t.params.filter(e=>e!=null&&"select"in e&&e.select!==void 0).map(e=>e.name):"layer"in t?[...new Set(t.layer.flatMap(A))]:[]}function at(t,e){var f,v;let{chartSelection:r=!0,fieldSelection:i=!0}=e;if(!r&&!i)return t;if(((f=t.params)==null?void 0:f.some(c=>c.bind==="legend"))&&(i=!1),((v=t.params)==null?void 0:v.some(c=>!c.bind))&&(r=!1),"vconcat"in t){const c=t.vconcat.map(o=>"mark"in o?_(o):o);return{...t,vconcat:c}}if("hconcat"in t){const c=t.hconcat.map(o=>"mark"in o?_(o):o);return{...t,hconcat:c}}if("layer"in t){const c=t.layer.map((o,p)=>{if(!("mark"in o))return o;let s=o;return s=L(s,r,p),s=_(s),p===0&&(s=H(s)),s});return{...t,layer:c}}if(!("mark"in t)||!S.isInteractive(t.mark))return t;let l=t;return l=(function(c,o){if(o===!1)return c;let p=(function(h){if(!h||!("encoding"in h))return[];const{encoding:b}=h;return b?Object.entries(b).flatMap(a=>{const[n,m]=a;return m&&tt.has(n)?"field"in m&&typeof m.field=="string"?[m.field]:"condition"in m&&m.condition&&typeof m.condition=="object"&&"field"in m.condition&&m.condition.field&&typeof m.condition.field=="string"?[m.condition.field]:[]:[]}):[]})(c);Array.isArray(o)&&(p=p.filter(h=>o.includes(h)));const s=p.map(h=>P.legend(h)),x=[...c.params||[],...s];return{...c,params:x}})(l,i),l=L(l,r,void 0),l=_(l),l=H(l),l}function L(t,e,r){if(e===!1)return t;let i;try{i=S.getMarkType(t.mark)}catch{return t}if(i==="geoshape")return t;const u=e===!0?(function(f){switch(f){case"arc":case"area":return["point"];case"text":case"bar":default:return["point","interval"];case"line":return}})(i):[e];if(!u)return t;const d=u.map(f=>f==="interval"?P.interval(t,r):P.point(t,r)),l=[...t.params||[],...d];return{...t,params:l}}function H(t){let e;try{e=S.getMarkType(t.mark)}catch{}if(e==="geoshape")return t;const r=t.params||[];return r.some(i=>i.bind==="scales")?t:{...t,params:[...r,P.panZoom()]}}function _(t){const e="encoding"in t?t.encoding:void 0,r=t.params||[],i=r.map(u=>u.name);return r.length===0?t:S.isInteractive(t.mark)?{...t,mark:S.makeClickable(t.mark),encoding:et("opacity",e||{},i,t.mark)}:t}G("arrow",W);const nt=t=>{const e=E.c(11),{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:l}=t;let f,v;e[0]!==l?(f=async()=>(async function(s){if(!s)return s;const x="datasets"in s?{...s.datasets}:{},h=async a=>{if(!a)return a;if("layer"in a){const k=await Promise.all(a.layer.map(h));a={...a,layer:k}}if("hconcat"in a){const k=await Promise.all(a.hconcat.map(h));a={...a,hconcat:k}}if("vconcat"in a){const k=await Promise.all(a.vconcat.map(h));a={...a,vconcat:k}}if("spec"in a&&(a={...a,spec:await h(a.spec)}),!a.data||!("url"in a.data))return a;let n;try{n=K(a.data.url)}catch{return a}const m=await D(n.href,a.data.format);return x[n.pathname]=m,{...a,data:{name:n.pathname}}},b=await h(s);return Object.keys(x).length===0?b:{...b,datasets:x}})(l),v=[l],e[0]=l,e[1]=f,e[2]=v):(f=e[1],v=e[2]);const{data:c,error:o}=F(f,v);if(o){let s;return e[3]!==o?(s=g.jsx($,{error:o}),e[3]=o,e[4]=s):s=e[4],s}if(!c)return null;let p;return e[5]!==u||e[6]!==d||e[7]!==c||e[8]!==i||e[9]!==r?(p=g.jsx(rt,{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:c}),e[5]=u,e[6]=d,e[7]=c,e[8]=i,e[9]=r,e[10]=p):p=e[10],p},rt=({value:t,setValue:e,chartSelection:r,fieldSelection:i,spec:u})=>{const{theme:d}=C(),l=j.useRef(void 0),[f,v]=j.useState(),c=T(u),o=j.useMemo(()=>at((function(n){return n.data&&"url"in n.data&&(n.data.url=K(n.data.url).href),n})(c),{chartSelection:r,fieldSelection:i}),[c,r,i]),p=j.useMemo(()=>A(o),[o]),s=N(n=>{e({...t,...n})}),x=T(p),h=j.useMemo(()=>x.reduce((n,m)=>(w.PAN_ZOOM===m||(n[m]=R((k,I)=>{M.debug("[Vega signal]",k,I);let O=z.mapValues(I,st);O=z.mapValues(O,ot),s({[k]:O})},100)),n),{}),[x,s]),b=N(n=>{M.error(n),M.debug(o),v(n)}),a=N(n=>{M.debug("[Vega view] created",n),l.current=n,v(void 0)});return g.jsxs(g.Fragment,{children:[f&&g.jsxs(q,{variant:"destructive",children:[g.jsx(B,{children:f.message}),g.jsx("div",{className:"text-md",children:f.stack})]}),g.jsxs("div",{className:"relative",onPointerDown:Q.stopPropagation(),children:[g.jsx(Y,{spec:o,theme:d==="dark"?"dark":void 0,actions:it,signalListeners:h,onError:b,onNewView:a}),(()=>{const n=[];return w.hasPoint(p)&&n.push(["Point selection","click to select a point; hold shift for multi-select"]),w.hasInterval(p)&&n.push(["Interval selection","click and drag to select an interval"]),w.hasLegend(p)&&n.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),w.hasPanZoom(p)&&n.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),n.length===0?null:g.jsx(J,{delayDuration:300,side:"left",content:g.jsx("div",{className:"text-xs flex flex-col",children:n.map((m,k)=>g.jsxs("div",{children:[g.jsxs("span",{className:"font-bold tracking-wide",children:[m[0],":"]})," ",m[1]]},k))}),children:g.jsx(X,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})})()]})]})},it={source:!1,compiled:!1};function ot(t){return t instanceof Set?[...t]:t}function st(t){return Array.isArray(t)?t.map(e=>e instanceof Date&&U(e)?new Date(e).getTime():e):t}export{nt as default};
@@ -0,0 +1 @@
1
+ const e=1e3;function t(e,t){const n=e.map(e=>`"${e}"`).join(", ");return new Error(`This RPC instance cannot ${t} because the transport did not provide one or more of these methods: ${n}`)}function n(n={}){let r={};function s(e){r=e}let a,i={};function o(e){i.unregisterHandler&&i.unregisterHandler(),i=e,i.registerHandler?.(k)}function d(e){a="function"!=typeof e?(t,n)=>{const r=e[t];if(r)return r(n);const s=e._;if(!s)throw new Error(`The requested method has no handler: ${t}`);return s(t,n)}:e}const{maxRequestTime:c=e}=n;n.transport&&o(n.transport),n.requestHandler&&d(n.requestHandler),n._debugHooks&&s(n._debugHooks);let u=0;const l=new Map,p=new Map;function h(e,...n){const s=n[0];return new Promise((n,a)=>{if(!i.send)throw t(["send"],"make requests");const o=u<=1e10?++u:u=0,d={type:"request",id:o,method:e,params:s};l.set(o,{resolve:n,reject:a}),c!==1/0&&p.set(o,setTimeout(()=>{p.delete(o),a(new Error("RPC request timed out."))},c)),r.onSend?.(d),i.send(d)})}const m=new Proxy(h,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>h(t,e)}),f=m;function y(e,...n){const s=n[0];if(!i.send)throw t(["send"],"send messages");const a={type:"message",id:e,payload:s};r.onSend?.(a),i.send(a)}const g=new Proxy(y,{get:(e,t,n)=>t in e?Reflect.get(e,t,n):e=>y(t,e)}),_=g,v=new Map,w=new Set;async function k(e){if(r.onReceive?.(e),!("type"in e))throw new Error("Message does not contain a type.");if("request"===e.type){if(!i.send||!a)throw t(["send","requestHandler"],"handle requests");const{id:s,method:o,params:d}=e;let c;try{c={type:"response",id:s,success:!0,payload:await a(o,d)}}catch(n){if(!(n instanceof Error))throw n;c={type:"response",id:s,success:!1,error:n.message}}return r.onSend?.(c),void i.send(c)}if("response"===e.type){const t=p.get(e.id);null!=t&&clearTimeout(t);const{resolve:n,reject:r}=l.get(e.id)??{};return void(e.success?n?.(e.payload):r?.(new Error(e.error)))}if("message"===e.type){for(const n of w)n(e.id,e.payload);const t=v.get(e.id);if(!t)return;for(const n of t)n(e.payload);return}throw new Error(`Unexpected RPC message type: ${e.type}`)}return{setTransport:o,setRequestHandler:d,request:m,requestProxy:f,send:g,sendProxy:_,addMessageListener:function(e,n){if(!i.registerHandler)throw t(["registerHandler"],"register message listeners");"*"!==e?(v.has(e)||v.set(e,new Set),v.get(e)?.add(n)):w.add(n)},removeMessageListener:function(e,t){"*"!==e?(v.get(e)?.delete(t),0===v.get(e)?.size&&v.delete(e)):w.delete(t)},proxy:{send:_,request:f},_setDebugHooks:s}}const r="[transport-id]";function s(e,t={}){const{transportId:n,filter:s,remotePort:a}=t,i=e,o=a??e;let d;return{send(e){o.postMessage(function(e,t){const{transportId:n}=t;return null!=n?{[r]:n,data:e}:e}(e,{transportId:n}))},registerHandler(e){d=t=>{const a=t.data,[i,o]=function(e,t){const{transportId:n,filter:s}=t,a=s?.();if(null!=n&&null!=a)throw new Error("Cannot use both `transportId` and `filter` at the same time");let i=e;if(n){if(e[r]!==n)return[!0];i=e.data}return!1===a?[!0]:[!1,i]}(a,{transportId:n,filter:()=>s?.(t)});i||e(o)},i.addEventListener("message",d)},unregisterHandler(){d&&i.removeEventListener("message",d)}}}function a(e,t){if(!e)throw new Error(t)}const i=()=>{},o=(e,t)=>{const n=`[${e}]`;return{debug:(...e)=>console.debug(n,...e),log:(...e)=>t.log(n,...e),warn:(...e)=>t.warn(n,...e),error:(...e)=>t.error(n,...e),trace:(...e)=>t.trace(n,...e),get:n=>o(`${e}:${n}`,t),disabled:(e=!0)=>e?c:t}},d={debug:(...e)=>{console.debug(...e)},log:(...e)=>{console.log(...e)},warn:(...e)=>{console.warn(...e)},error:(...e)=>{console.error(...e)},trace:(...e)=>{console.trace(...e)},get:e=>o(`marimo:${e}`,d),disabled:(e=!0)=>e?c:d},c={debug:()=>i,log:()=>i,warn:()=>i,error:()=>i,trace:()=>i,get:()=>c,disabled:()=>c};const u="undefined"!=typeof window&&window.Logger||d,l=e=>(new TextDecoder).decode(e);var p,h;!function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const n of e)t[n]=n;return t},e.getValidEnumValues=t=>{const n=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),r={};for(const e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(const n of e)if(t(n))return n},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(p||(p={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(h||(h={}));const m=p.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),f=e=>{switch(typeof e){case"undefined":return m.undefined;case"string":return m.string;case"number":return Number.isNaN(e)?m.nan:m.number;case"boolean":return m.boolean;case"function":return m.function;case"bigint":return m.bigint;case"symbol":return m.symbol;case"object":return Array.isArray(e)?m.array:null===e?m.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?m.promise:"undefined"!=typeof Map&&e instanceof Map?m.map:"undefined"!=typeof Set&&e instanceof Set?m.set:"undefined"!=typeof Date&&e instanceof Date?m.date:m.object;default:return m.unknown}},y=p.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class g extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(const s of e.issues)if("invalid_union"===s.code)s.unionErrors.map(r);else if("invalid_return_type"===s.code)r(s.returnTypeError);else if("invalid_arguments"===s.code)r(s.argumentsError);else if(0===s.path.length)n._errors.push(t(s));else{let e=n,r=0;for(;r<s.path.length;){const n=s.path[r];r===s.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(t(s))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return r(this),n}static assert(e){if(!(e instanceof g))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,p.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},n=[];for(const r of this.issues)if(r.path.length>0){const n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}}g.create=e=>new g(e);const _=(e,t)=>{let n;switch(e.code){case y.invalid_type:n=e.received===m.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case y.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,p.jsonStringifyReplacer)}`;break;case y.unrecognized_keys:n=`Unrecognized key(s) in object: ${p.joinValues(e.keys,", ")}`;break;case y.invalid_union:n="Invalid input";break;case y.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${p.joinValues(e.options)}`;break;case y.invalid_enum_value:n=`Invalid enum value. Expected ${p.joinValues(e.options)}, received '${e.received}'`;break;case y.invalid_arguments:n="Invalid function arguments";break;case y.invalid_return_type:n="Invalid function return type";break;case y.invalid_date:n="Invalid date";break;case y.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:p.assertNever(e.validation):n="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case y.too_small:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case y.too_big:n="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case y.custom:n="Invalid input";break;case y.invalid_intersection_types:n="Intersection results could not be merged";break;case y.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case y.not_finite:n="Number must be finite";break;default:n=t.defaultError,p.assertNever(e)}return{message:n}};let v=_;function w(e,t){const n=v,r=(e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,a=[...n,...s.path||[]],i={...s,path:a};if(void 0!==s.message)return{...s,path:a,message:s.message};let o="";const d=r.filter(e=>!!e).slice().reverse();for(const c of d)o=c(i,{data:t,defaultError:o}).message;return{...s,path:a,message:o}})({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===_?void 0:_].filter(e=>!!e)});e.common.issues.push(r)}class k{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const n=[];for(const r of t){if("aborted"===r.status)return b;"dirty"===r.status&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(e,t){const n=[];for(const r of t){const e=await r.key,t=await r.value;n.push({key:e,value:t})}return k.mergeObjectSync(e,n)}static mergeObjectSync(e,t){const n={};for(const r of t){const{key:t,value:s}=r;if("aborted"===t.status)return b;if("aborted"===s.status)return b;"dirty"===t.status&&e.dirty(),"dirty"===s.status&&e.dirty(),"__proto__"===t.value||void 0===s.value&&!r.alwaysSet||(n[t.value]=s.value)}return{status:e.value,value:n}}}const b=Object.freeze({status:"aborted"}),x=e=>({status:"dirty",value:e}),S=e=>({status:"valid",value:e}),O=e=>"aborted"===e.status,T=e=>"dirty"===e.status,E=e=>"valid"===e.status,N=e=>"undefined"!=typeof Promise&&e instanceof Promise;var P;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(P||(P={}));class j{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const A=(e,t)=>{if(E(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new g(e.common.issues);return this._error=t,this._error}}};function C(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:s};return{errorMap:(t,s)=>{const{message:a}=e;return"invalid_enum_value"===t.code?{message:a??s.defaultError}:void 0===s.data?{message:a??r??s.defaultError}:"invalid_type"!==t.code?{message:s.defaultError}:{message:a??n??s.defaultError}},description:s}}class Z{get description(){return this._def.description}_getType(e){return f(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:f(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new k,ctx:{common:e.parent.common,data:e.data,parsedType:f(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(N(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){const n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:f(e)},r=this._parseSync({data:e,path:n.path,parent:n});return A(n,r)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:f(e)};if(!this["~standard"].async)try{const n=this._parseSync({data:e,path:[],parent:t});return E(n)?{value:n.value}:{issues:t.common.issues}}catch(n){n?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>E(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){const n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:f(e)},r=this._parse({data:e,path:n.path,parent:n}),s=await(N(r)?r:Promise.resolve(r));return A(n,s)}refine(e,t){const n=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,r)=>{const s=e(t),a=()=>r.addIssue({code:y.custom,...n(t)});return"undefined"!=typeof Promise&&s instanceof Promise?s.then(e=>!!e||(a(),!1)):!!s||(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>!!e(n)||(r.addIssue("function"==typeof t?t(n,r):t),!1))}_refinement(e){return new Ae({schema:this,typeName:De.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return Ce.create(this,this._def)}nullable(){return Ze.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ye.create(this)}promise(){return je.create(this,this._def)}or(e){return ve.create([this,e],this._def)}and(e){return ke.create(this,e,this._def)}transform(e){return new Ae({...C(this._def),schema:this,typeName:De.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new Fe({...C(this._def),innerType:this,defaultValue:t,typeName:De.ZodDefault})}brand(){return new Re({typeName:De.ZodBranded,type:this,...C(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new Ie({...C(this._def),innerType:this,catchValue:t,typeName:De.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return Le.create(this,e)}readonly(){return Me.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const F=/^c[^\s-]{8,}$/i,I=/^[0-9a-z]+$/,$=/^[0-9A-HJKMNP-TV-Z]{26}$/i,R=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,L=/^[a-z0-9_-]{21}$/i,M=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,D=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,z=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let q;const U=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,V=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,H=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,B=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,W=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,K=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,J="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Y=new RegExp(`^${J}$`);function G(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function X(e){return new RegExp(`^${G(e)}$`)}function Q(e){let t=`${J}T${G(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function ee(e,t){return!("v4"!==t&&t||!U.test(e))||!("v6"!==t&&t||!H.test(e))}function te(e,t){if(!M.test(e))return!1;try{const[n]=e.split(".");if(!n)return!1;const r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),s=JSON.parse(atob(r));return"object"==typeof s&&null!==s&&((!("typ"in s)||"JWT"===s?.typ)&&(!!s.alg&&(!t||s.alg===t)))}catch{return!1}}function ne(e,t){return!("v4"!==t&&t||!V.test(e))||!("v6"!==t&&t||!B.test(e))}class re extends Z{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==m.string){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.string,received:t.parsedType}),b}const t=new k;let n;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:y.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:y.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const s=e.data.length>r.value,a=e.data.length<r.value;(s||a)&&(n=this._getOrReturnCtx(e,n),s?w(n,{code:y.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):a&&w(n,{code:y.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)z.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"email",code:y.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)q||(q=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),q.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"emoji",code:y.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)R.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"uuid",code:y.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)L.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"nanoid",code:y.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)F.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"cuid",code:y.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)I.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"cuid2",code:y.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)$.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"ulid",code:y.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),w(n,{validation:"url",code:y.invalid_string,message:r.message}),t.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;r.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"regex",code:y.invalid_string,message:r.message}),t.dirty())}else if("trim"===r.kind)e.data=e.data.trim();else if("includes"===r.kind)e.data.includes(r.value,r.position)||(n=this._getOrReturnCtx(e,n),w(n,{code:y.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty());else if("toLowerCase"===r.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===r.kind)e.data=e.data.toUpperCase();else if("startsWith"===r.kind)e.data.startsWith(r.value)||(n=this._getOrReturnCtx(e,n),w(n,{code:y.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty());else if("endsWith"===r.kind)e.data.endsWith(r.value)||(n=this._getOrReturnCtx(e,n),w(n,{code:y.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty());else if("datetime"===r.kind){Q(r).test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:y.invalid_string,validation:"datetime",message:r.message}),t.dirty())}else if("date"===r.kind){Y.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:y.invalid_string,validation:"date",message:r.message}),t.dirty())}else if("time"===r.kind){X(r).test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{code:y.invalid_string,validation:"time",message:r.message}),t.dirty())}else"duration"===r.kind?D.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"duration",code:y.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?ee(e.data,r.version)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"ip",code:y.invalid_string,message:r.message}),t.dirty()):"jwt"===r.kind?te(e.data,r.alg)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"jwt",code:y.invalid_string,message:r.message}),t.dirty()):"cidr"===r.kind?ne(e.data,r.version)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"cidr",code:y.invalid_string,message:r.message}),t.dirty()):"base64"===r.kind?W.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"base64",code:y.invalid_string,message:r.message}),t.dirty()):"base64url"===r.kind?K.test(e.data)||(n=this._getOrReturnCtx(e,n),w(n,{validation:"base64url",code:y.invalid_string,message:r.message}),t.dirty()):p.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,n){return this.refinement(t=>e.test(t),{validation:t,code:y.invalid_string,...P.errToObj(n)})}_addCheck(e){return new re({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...P.errToObj(e)})}url(e){return this._addCheck({kind:"url",...P.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...P.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...P.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...P.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...P.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...P.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...P.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...P.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...P.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...P.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...P.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...P.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...P.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...P.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...P.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...P.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...P.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...P.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...P.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...P.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...P.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...P.errToObj(t)})}nonempty(e){return this.min(1,P.errToObj(e))}trim(){return new re({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new re({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new re({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function se(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r;return Number.parseInt(e.toFixed(s).replace(".",""))%Number.parseInt(t.toFixed(s).replace(".",""))/10**s}re.create=e=>new re({checks:[],typeName:De.ZodString,coerce:e?.coerce??!1,...C(e)});class ae extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==m.number){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.number,received:t.parsedType}),b}let t;const n=new k;for(const r of this._def.checks)if("int"===r.kind)p.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),w(t,{code:y.invalid_type,expected:"integer",received:"float",message:r.message}),n.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),w(t,{code:y.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),w(t,{code:y.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty())}else"multipleOf"===r.kind?0!==se(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),w(t,{code:y.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),w(t,{code:y.not_finite,message:r.message}),n.dirty()):p.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,P.toString(t))}gt(e,t){return this.setLimit("min",e,!1,P.toString(t))}lte(e,t){return this.setLimit("max",e,!0,P.toString(t))}lt(e,t){return this.setLimit("max",e,!1,P.toString(t))}setLimit(e,t,n,r){return new ae({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:P.toString(r)}]})}_addCheck(e){return new ae({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:P.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:P.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:P.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:P.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:P.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:P.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:P.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:P.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:P.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&p.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const n of this._def.checks){if("finite"===n.kind||"int"===n.kind||"multipleOf"===n.kind)return!0;"min"===n.kind?(null===t||n.value>t)&&(t=n.value):"max"===n.kind&&(null===e||n.value<e)&&(e=n.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ae.create=e=>new ae({checks:[],typeName:De.ZodNumber,coerce:e?.coerce||!1,...C(e)});class ie extends Z{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==m.bigint)return this._getInvalidInput(e);let t;const n=new k;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),w(t,{code:y.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),w(t,{code:y.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),w(t,{code:y.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):p.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.bigint,received:t.parsedType}),b}gte(e,t){return this.setLimit("min",e,!0,P.toString(t))}gt(e,t){return this.setLimit("min",e,!1,P.toString(t))}lte(e,t){return this.setLimit("max",e,!0,P.toString(t))}lt(e,t){return this.setLimit("max",e,!1,P.toString(t))}setLimit(e,t,n,r){return new ie({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:n,message:P.toString(r)}]})}_addCheck(e){return new ie({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:P.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:P.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:P.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:P.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:P.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ie.create=e=>new ie({checks:[],typeName:De.ZodBigInt,coerce:e?.coerce??!1,...C(e)});class oe extends Z{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==m.boolean){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.boolean,received:t.parsedType}),b}return S(e.data)}}oe.create=e=>new oe({typeName:De.ZodBoolean,coerce:e?.coerce||!1,...C(e)});class de extends Z{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==m.date){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.date,received:t.parsedType}),b}if(Number.isNaN(e.data.getTime())){return w(this._getOrReturnCtx(e),{code:y.invalid_date}),b}const t=new k;let n;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:y.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(n=this._getOrReturnCtx(e,n),w(n,{code:y.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):p.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new de({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:P.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:P.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}de.create=e=>new de({checks:[],coerce:e?.coerce||!1,typeName:De.ZodDate,...C(e)});class ce extends Z{_parse(e){if(this._getType(e)!==m.symbol){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.symbol,received:t.parsedType}),b}return S(e.data)}}ce.create=e=>new ce({typeName:De.ZodSymbol,...C(e)});class ue extends Z{_parse(e){if(this._getType(e)!==m.undefined){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.undefined,received:t.parsedType}),b}return S(e.data)}}ue.create=e=>new ue({typeName:De.ZodUndefined,...C(e)});class le extends Z{_parse(e){if(this._getType(e)!==m.null){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.null,received:t.parsedType}),b}return S(e.data)}}le.create=e=>new le({typeName:De.ZodNull,...C(e)});class pe extends Z{constructor(){super(...arguments),this._any=!0}_parse(e){return S(e.data)}}pe.create=e=>new pe({typeName:De.ZodAny,...C(e)});class he extends Z{constructor(){super(...arguments),this._unknown=!0}_parse(e){return S(e.data)}}he.create=e=>new he({typeName:De.ZodUnknown,...C(e)});class me extends Z{_parse(e){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.never,received:t.parsedType}),b}}me.create=e=>new me({typeName:De.ZodNever,...C(e)});class fe extends Z{_parse(e){if(this._getType(e)!==m.undefined){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.void,received:t.parsedType}),b}return S(e.data)}}fe.create=e=>new fe({typeName:De.ZodVoid,...C(e)});class ye extends Z{_parse(e){const{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==m.array)return w(t,{code:y.invalid_type,expected:m.array,received:t.parsedType}),b;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,s=t.data.length<r.exactLength.value;(e||s)&&(w(t,{code:e?y.too_big:y.too_small,minimum:s?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),n.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&(w(t,{code:y.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),n.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&(w(t,{code:y.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new j(t,e,t.path,n)))).then(e=>k.mergeArray(n,e));const s=[...t.data].map((e,n)=>r.type._parseSync(new j(t,e,t.path,n)));return k.mergeArray(n,s)}get element(){return this._def.type}min(e,t){return new ye({...this._def,minLength:{value:e,message:P.toString(t)}})}max(e,t){return new ye({...this._def,maxLength:{value:e,message:P.toString(t)}})}length(e,t){return new ye({...this._def,exactLength:{value:e,message:P.toString(t)}})}nonempty(e){return this.min(1,e)}}function ge(e){if(e instanceof _e){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Ce.create(ge(r))}return new _e({...e._def,shape:()=>t})}return e instanceof ye?new ye({...e._def,type:ge(e.element)}):e instanceof Ce?Ce.create(ge(e.unwrap())):e instanceof Ze?Ze.create(ge(e.unwrap())):e instanceof be?be.create(e.items.map(e=>ge(e))):e}ye.create=(e,t)=>new ye({type:e,minLength:null,maxLength:null,exactLength:null,typeName:De.ZodArray,...C(t)});class _e extends Z{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=p.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==m.object){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.object,received:t.parsedType}),b}const{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof me&&"strip"===this._def.unknownKeys))for(const o in n.data)s.includes(o)||a.push(o);const i=[];for(const o of s){const e=r[o],t=n.data[o];i.push({key:{status:"valid",value:o},value:e._parse(new j(n,t,n.path,o)),alwaysSet:o in n.data})}if(this._def.catchall instanceof me){const e=this._def.unknownKeys;if("passthrough"===e)for(const t of a)i.push({key:{status:"valid",value:t},value:{status:"valid",value:n.data[t]}});else if("strict"===e)a.length>0&&(w(n,{code:y.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const r=n.data[t];i.push({key:{status:"valid",value:t},value:e._parse(new j(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of i){const n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>k.mergeObjectSync(t,e)):k.mergeObjectSync(t,i)}get shape(){return this._def.shape()}strict(e){return P.errToObj,new _e({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,n)=>{const r=this._def.errorMap?.(t,n).message??n.defaultError;return"unrecognized_keys"===t.code?{message:P.errToObj(e).message??r}:{message:r}}}:{}})}strip(){return new _e({...this._def,unknownKeys:"strip"})}passthrough(){return new _e({...this._def,unknownKeys:"passthrough"})}extend(e){return new _e({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new _e({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:De.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new _e({...this._def,catchall:e})}pick(e){const t={};for(const n of p.objectKeys(e))e[n]&&this.shape[n]&&(t[n]=this.shape[n]);return new _e({...this._def,shape:()=>t})}omit(e){const t={};for(const n of p.objectKeys(this.shape))e[n]||(t[n]=this.shape[n]);return new _e({...this._def,shape:()=>t})}deepPartial(){return ge(this)}partial(e){const t={};for(const n of p.objectKeys(this.shape)){const r=this.shape[n];e&&!e[n]?t[n]=r:t[n]=r.optional()}return new _e({...this._def,shape:()=>t})}required(e){const t={};for(const n of p.objectKeys(this.shape))if(e&&!e[n])t[n]=this.shape[n];else{let e=this.shape[n];for(;e instanceof Ce;)e=e._def.innerType;t[n]=e}return new _e({...this._def,shape:()=>t})}keyof(){return Ee(p.objectKeys(this.shape))}}_e.create=(e,t)=>new _e({shape:()=>e,unknownKeys:"strip",catchall:me.create(),typeName:De.ZodObject,...C(t)}),_e.strictCreate=(e,t)=>new _e({shape:()=>e,unknownKeys:"strict",catchall:me.create(),typeName:De.ZodObject,...C(t)}),_e.lazycreate=(e,t)=>new _e({shape:e,unknownKeys:"strip",catchall:me.create(),typeName:De.ZodObject,...C(t)});class ve extends Z{_parse(e){const{ctx:t}=this._processInputParams(e),n=this._def.options;if(t.common.async)return Promise.all(n.map(async e=>{const n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(function(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;const n=e.map(e=>new g(e.ctx.common.issues));return w(t,{code:y.invalid_union,unionErrors:n}),b});{let e;const r=[];for(const a of n){const n={...t,common:{...t.common,issues:[]},parent:null},s=a._parseSync({data:t.data,path:t.path,parent:n});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=r.map(e=>new g(e));return w(t,{code:y.invalid_union,unionErrors:s}),b}}get options(){return this._def.options}}function we(e,t){const n=f(e),r=f(t);if(e===t)return{valid:!0,data:e};if(n===m.object&&r===m.object){const n=p.objectKeys(t),r=p.objectKeys(e).filter(e=>-1!==n.indexOf(e)),s={...e,...t};for(const a of r){const n=we(e[a],t[a]);if(!n.valid)return{valid:!1};s[a]=n.data}return{valid:!0,data:s}}if(n===m.array&&r===m.array){if(e.length!==t.length)return{valid:!1};const n=[];for(let r=0;r<e.length;r++){const s=we(e[r],t[r]);if(!s.valid)return{valid:!1};n.push(s.data)}return{valid:!0,data:n}}return n===m.date&&r===m.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}ve.create=(e,t)=>new ve({options:e,typeName:De.ZodUnion,...C(t)});class ke extends Z{_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=(e,r)=>{if(O(e)||O(r))return b;const s=we(e.value,r.value);return s.valid?((T(e)||T(r))&&t.dirty(),{status:t.value,value:s.data}):(w(n,{code:y.invalid_intersection_types}),b)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}}ke.create=(e,t,n)=>new ke({left:e,right:t,typeName:De.ZodIntersection,...C(n)});class be extends Z{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.array)return w(n,{code:y.invalid_type,expected:m.array,received:n.parsedType}),b;if(n.data.length<this._def.items.length)return w(n,{code:y.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),b;!this._def.rest&&n.data.length>this._def.items.length&&(w(n,{code:y.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...n.data].map((e,t)=>{const r=this._def.items[t]||this._def.rest;return r?r._parse(new j(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>k.mergeArray(t,e)):k.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new be({...this._def,rest:e})}}be.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new be({items:e,typeName:De.ZodTuple,rest:null,...C(t)})};class xe extends Z{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.map)return w(n,{code:y.invalid_type,expected:m.map,received:n.parsedType}),b;const r=this._def.keyType,s=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new j(n,e,n.path,[a,"key"])),value:s._parse(new j(n,t,n.path,[a,"value"]))}));if(n.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const n of a){const r=await n.key,s=await n.value;if("aborted"===r.status||"aborted"===s.status)return b;"dirty"!==r.status&&"dirty"!==s.status||t.dirty(),e.set(r.value,s.value)}return{status:t.value,value:e}})}{const e=new Map;for(const n of a){const r=n.key,s=n.value;if("aborted"===r.status||"aborted"===s.status)return b;"dirty"!==r.status&&"dirty"!==s.status||t.dirty(),e.set(r.value,s.value)}return{status:t.value,value:e}}}}xe.create=(e,t,n)=>new xe({valueType:t,keyType:e,typeName:De.ZodMap,...C(n)});class Se extends Z{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==m.set)return w(n,{code:y.invalid_type,expected:m.set,received:n.parsedType}),b;const r=this._def;null!==r.minSize&&n.data.size<r.minSize.value&&(w(n,{code:y.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&n.data.size>r.maxSize.value&&(w(n,{code:y.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const s=this._def.valueType;function a(e){const n=new Set;for(const r of e){if("aborted"===r.status)return b;"dirty"===r.status&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}const i=[...n.data.values()].map((e,t)=>s._parse(new j(n,e,n.path,t)));return n.common.async?Promise.all(i).then(e=>a(e)):a(i)}min(e,t){return new Se({...this._def,minSize:{value:e,message:P.toString(t)}})}max(e,t){return new Se({...this._def,maxSize:{value:e,message:P.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}Se.create=(e,t)=>new Se({valueType:e,minSize:null,maxSize:null,typeName:De.ZodSet,...C(t)});class Oe extends Z{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}Oe.create=(e,t)=>new Oe({getter:e,typeName:De.ZodLazy,...C(t)});class Te extends Z{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return w(t,{received:t.data,code:y.invalid_literal,expected:this._def.value}),b}return{status:"valid",value:e.data}}get value(){return this._def.value}}function Ee(e,t){return new Ne({values:e,typeName:De.ZodEnum,...C(t)})}Te.create=(e,t)=>new Te({value:e,typeName:De.ZodLiteral,...C(t)});class Ne extends Z{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),n=this._def.values;return w(t,{expected:p.joinValues(n),received:t.parsedType,code:y.invalid_type}),b}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),n=this._def.values;return w(t,{received:t.data,code:y.invalid_enum_value,options:n}),b}return S(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return Ne.create(e,{...this._def,...t})}exclude(e,t=this._def){return Ne.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}Ne.create=Ee;class Pe extends Z{_parse(e){const t=p.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==m.string&&n.parsedType!==m.number){const e=p.objectValues(t);return w(n,{expected:p.joinValues(e),received:n.parsedType,code:y.invalid_type}),b}if(this._cache||(this._cache=new Set(p.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=p.objectValues(t);return w(n,{received:n.data,code:y.invalid_enum_value,options:e}),b}return S(e.data)}get enum(){return this._def.values}}Pe.create=(e,t)=>new Pe({values:e,typeName:De.ZodNativeEnum,...C(t)});class je extends Z{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==m.promise&&!1===t.common.async)return w(t,{code:y.invalid_type,expected:m.promise,received:t.parsedType}),b;const n=t.parsedType===m.promise?t.data:Promise.resolve(t.data);return S(n.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}je.create=(e,t)=>new je({type:e,typeName:De.ZodPromise,...C(t)});class Ae extends Z{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===De.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,s={addIssue:e=>{w(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(s.addIssue=s.addIssue.bind(s),"preprocess"===r.type){const e=r.transform(n.data,s);if(n.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return b;const r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return"aborted"===r.status?b:"dirty"===r.status||"dirty"===t.value?x(r.value):r});{if("aborted"===t.value)return b;const r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return"aborted"===r.status?b:"dirty"===r.status||"dirty"===t.value?x(r.value):r}}if("refinement"===r.type){const e=e=>{const t=r.refinement(e,s);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===n.common.async){const r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===r.status?b:("dirty"===r.status&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>"aborted"===n.status?b:("dirty"===n.status&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if("transform"===r.type){if(!1===n.common.async){const e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!E(e))return b;const a=r.transform(e.value,s);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>E(e)?Promise.resolve(r.transform(e.value,s)).then(e=>({status:t.value,value:e})):b)}p.assertNever(r)}}Ae.create=(e,t,n)=>new Ae({schema:e,typeName:De.ZodEffects,effect:t,...C(n)}),Ae.createWithPreprocess=(e,t,n)=>new Ae({schema:t,effect:{type:"preprocess",transform:e},typeName:De.ZodEffects,...C(n)});class Ce extends Z{_parse(e){return this._getType(e)===m.undefined?S(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ce.create=(e,t)=>new Ce({innerType:e,typeName:De.ZodOptional,...C(t)});class Ze extends Z{_parse(e){return this._getType(e)===m.null?S(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Ze.create=(e,t)=>new Ze({innerType:e,typeName:De.ZodNullable,...C(t)});class Fe extends Z{_parse(e){const{ctx:t}=this._processInputParams(e);let n=t.data;return t.parsedType===m.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}Fe.create=(e,t)=>new Fe({innerType:e,typeName:De.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...C(t)});class Ie extends Z{_parse(e){const{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return N(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new g(n.common.issues)},input:n.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new g(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}}Ie.create=(e,t)=>new Ie({innerType:e,typeName:De.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...C(t)});class $e extends Z{_parse(e){if(this._getType(e)!==m.nan){const t=this._getOrReturnCtx(e);return w(t,{code:y.invalid_type,expected:m.nan,received:t.parsedType}),b}return{status:"valid",value:e.data}}}$e.create=e=>new $e({typeName:De.ZodNaN,...C(e)});class Re extends Z{_parse(e){const{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}}class Le extends Z{_parse(e){const{status:t,ctx:n}=this._processInputParams(e);if(n.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?b:"dirty"===e.status?(t.dirty(),x(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})()}{const e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return"aborted"===e.status?b:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(e,t){return new Le({in:e,out:t,typeName:De.ZodPipeline})}}class Me extends Z{_parse(e){const t=this._def.innerType._parse(e),n=e=>(E(e)&&(e.value=Object.freeze(e.value)),e);return N(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}}var De;Me.create=(e,t)=>new Me({innerType:e,typeName:De.ZodReadonly,...C(t)}),function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(De||(De={}));const ze=re.create;me.create,ye.create;const qe=_e.create;ve.create,ke.create,be.create,Ne.create,je.create,Ce.create,Ze.create;const Ue=qe({detail:ze()}),Ve=qe({error:ze()});function He(e){if(!e)return"Unknown error";if(e instanceof Error){const t=Ue.safeParse(e.cause);return t.success?t.data.detail:function(e){const t=function(e){try{return JSON.parse(e)}catch{return e}}(e);if(!t)return e;const n=Ue.safeParse(t);if(n.success)return n.data.detail;const r=Ve.safeParse(t);if(r.success)return r.data.error;return e}(e.message)}if("object"==typeof e){const t=Ue.safeParse(e);if(t.success)return t.data.detail;const n=Ve.safeParse(e);if(n.success)return n.data.error}try{return JSON.stringify(e)}catch{return String(e)}}function Be(e){return e.FS}const We="notebook.py",Ke="/marimo",Je=We,Ye=e=>{const t=Be(e);try{t.mkdirTree(Ke)}catch{}t.chdir(Ke)},Ge=e=>{Be(e).mount(e.FS.filesystems.IDBFS,{root:"."},Ke)},Xe=async e=>{await tt(e,!0)},Qe=async e=>{await tt(e,!1)},et=e=>{const{pyodide:t,filename:n,code:r}=e,s=Be(t);if(n&&n!==We){const e=(e=>{try{return l(s.readFile(e))}catch{return null}})(n);if(e)return{code:e,filename:n}}return s.writeFile(We,r),{code:r,filename:We}};function tt(e,t){return new Promise((n,r)=>{Be(e).syncfs(t,e=>{e instanceof Error?r(e):n()})})}var nt,rt=Object.defineProperty,st=(e,t)=>rt(e,"name",{value:t,configurable:!0}),at=(nt=function(e){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+e+'" is not supported')},typeof require<"u"?require:typeof Proxy<"u"?new Proxy(nt,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):nt);function it(e){return!isNaN(parseFloat(e))&&isFinite(e)}function ot(e){return e.charAt(0).toUpperCase()+e.substring(1)}function dt(e){return function(){return this[e]}}st(it,"_isNumber"),st(ot,"_capitalize"),st(dt,"_getter");var ct,ut,lt=["isConstructor","isEval","isNative","isToplevel"],pt=["columnNumber","lineNumber"],ht=["fileName","functionName","source"],mt=lt.concat(pt,ht,["args"],["evalOrigin"]);function ft(e){if(e)for(var t=0;t<mt.length;t++)void 0!==e[mt[t]]&&this["set"+ot(mt[t])](e[mt[t]])}for(st(ft,"StackFrame"),ft.prototype={getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(e){if(e instanceof ft)this.evalOrigin=e;else{if(!(e instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new ft(e)}},toString:function(){var e=this.getFileName()||"",t=this.getLineNumber()||"",n=this.getColumnNumber()||"",r=this.getFunctionName()||"";return this.getIsEval()?e?"[eval] ("+e+":"+t+":"+n+")":"[eval]:"+t+":"+n:r?r+" ("+e+":"+t+":"+n+")":e+":"+t+":"+n}},ft.fromString=st(function(e){var t=e.indexOf("("),n=e.lastIndexOf(")"),r=e.substring(0,t),s=e.substring(t+1,n).split(","),a=e.substring(n+1);if(0===a.indexOf("@"))var i=/@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a,""),o=i[1],d=i[2],c=i[3];return new ft({functionName:r,args:s||void 0,fileName:o,lineNumber:d||void 0,columnNumber:c||void 0})},"StackFrame$$fromString"),ct=0;ct<lt.length;ct++)ft.prototype["get"+ot(lt[ct])]=dt(lt[ct]),ft.prototype["set"+ot(lt[ct])]=function(e){return function(t){this[e]=!!t}}(lt[ct]);for(ut=0;ut<pt.length;ut++)ft.prototype["get"+ot(pt[ut])]=dt(pt[ut]),ft.prototype["set"+ot(pt[ut])]=function(e){return function(t){if(!it(t))throw new TypeError(e+" must be a Number");this[e]=Number(t)}}(pt[ut]);for(yt=0;yt<ht.length;yt++)ft.prototype["get"+ot(ht[yt])]=dt(ht[yt]),ft.prototype["set"+ot(ht[yt])]=function(e){return function(t){this[e]=String(t)}}(ht[yt]);var yt,gt=ft;function _t(){var e=/^\s*at .*(\S+:\d+|\(native\))/m,t=/^(eval@)?(\[native code])?$/;return{parse:st(function(t){if(t.stack&&t.stack.match(e))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},"ErrorStackParser$$parse"),extractLocation:st(function(e){if(-1===e.indexOf(":"))return[e];var t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));return[t[1],t[2]||void 0,t[3]||void 0]},"ErrorStackParser$$extractLocation"),parseV8OrIE:st(function(t){return t.stack.split("\n").filter(function(t){return!!t.match(e)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));var t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),n=t.match(/ (\(.+\)$)/);t=n?t.replace(n[0],""):t;var r=this.extractLocation(n?n[1]:t),s=n&&t||void 0,a=["eval","<anonymous>"].indexOf(r[0])>-1?void 0:r[0];return new gt({functionName:s,fileName:a,lineNumber:r[1],columnNumber:r[2],source:e})},this)},"ErrorStackParser$$parseV8OrIE"),parseFFOrSafari:st(function(e){return e.stack.split("\n").filter(function(e){return!e.match(t)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new gt({functionName:e});var t=/((.*".+"[^@]*)?[^@]*)(?:@)/,n=e.match(t),r=n&&n[1]?n[1]:void 0,s=this.extractLocation(e.replace(t,""));return new gt({functionName:r,fileName:s[0],lineNumber:s[1],columnNumber:s[2],source:e})},this)},"ErrorStackParser$$parseFFOrSafari")}}st(_t,"ErrorStackParser");var vt,wt,kt,bt,xt,St,Ot,Tt,Et,Nt=new _t,Pt="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&!process.browser,jt=Pt&&typeof module<"u"&&typeof module.exports<"u"&&typeof at<"u"&&typeof __dirname<"u",At=Pt&&!jt,Ct=typeof Deno<"u",Zt=!Pt&&!Ct,Ft=Zt&&"object"==typeof window&&"object"==typeof document&&"function"==typeof document.createElement&&"sessionStorage"in window&&"function"!=typeof importScripts,It=Zt&&"function"==typeof importScripts&&"object"==typeof self;async function $t(){if(!Pt||(vt=(await import("./__vite-browser-external-CIEyP2s7.js")).default,bt=await import("./__vite-browser-external-CIEyP2s7.js"),xt=await import("./__vite-browser-external-CIEyP2s7.js"),kt=(await import("./__vite-browser-external-CIEyP2s7.js")).default,wt=await import("./__vite-browser-external-CIEyP2s7.js"),Ot=wt.sep,typeof at<"u"))return;let e={fs:bt,crypto:await import("./__vite-browser-external-CIEyP2s7.js"),ws:await import("./__vite-browser-external-CIEyP2s7.js"),child_process:await import("./__vite-browser-external-CIEyP2s7.js")};globalThis.require=function(t){return e[t]}}function Rt(e,t){return wt.resolve(t||".",e)}function Lt(e,t){return void 0===t&&(t=location),new URL(e,t).toString()}function Mt(e,t){return e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?{response:fetch(e)}:{binary:xt.readFile(e).then(e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}}function Dt(e,t){let n=new URL(e,location);return{response:fetch(n,t?{integrity:t}:{})}}async function zt(e,t){let{response:n,binary:r}=Tt(e,t);if(r)return r;let s=await n;if(!s.ok)throw new Error(`Failed to load '${e}': request failed.`);return new Uint8Array(await s.arrayBuffer())}if("object"==typeof navigator&&"string"==typeof navigator.userAgent&&-1==navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Safari"),st($t,"initNodeModules"),st(Rt,"node_resolvePath"),st(Lt,"browser_resolvePath"),St=Pt?Rt:Lt,Pt||(Ot="/"),st(Mt,"node_getBinaryResponse"),st(Dt,"browser_getBinaryResponse"),Tt=Pt?Mt:Dt,st(zt,"loadBinaryFile"),Ft)Et=st(async e=>await import(e),"loadScript");else if(It)Et=st(async e=>{try{globalThis.importScripts(e)}catch(nn){if(!(nn instanceof TypeError))throw nn;await import(e)}},"loadScript");else{if(!Pt)throw new Error("Cannot determine runtime environment");Et=qt}async function qt(e){e.startsWith("file://")&&(e=e.slice(7)),e.includes("://")?kt.runInThisContext(await(await fetch(e)).text()):await import(vt.pathToFileURL(e).href)}async function Ut(e){if(Pt){await $t();let t=await xt.readFile(e,{encoding:"utf8"});return JSON.parse(t)}return await(await fetch(e)).json()}async function Vt(){if(jt)return __dirname;let e;try{throw new Error}catch(r){e=r}let t=Nt.parse(e)[0].fileName;if(Pt&&!t.startsWith("file://")&&(t=`file://${t}`),At){let e=await import("./__vite-browser-external-CIEyP2s7.js");return(await import("./__vite-browser-external-CIEyP2s7.js")).fileURLToPath(e.dirname(t))}let n=t.lastIndexOf(Ot);if(-1===n)throw new Error("Could not extract indexURL path from pyodide module location");return t.slice(0,n)}function Ht(e){let t=e.FS,n=e.FS.filesystems.MEMFS,r=e.PATH,s={DIR_MODE:16895,FILE_MODE:33279,mount:function(e){if(!e.opts.fileSystemHandle)throw new Error("opts.fileSystemHandle is required");return n.mount.apply(null,arguments)},syncfs:async(e,t,n)=>{try{let r=s.getLocalSet(e),a=await s.getRemoteSet(e),i=t?a:r,o=t?r:a;await s.reconcile(e,i,o),n(null)}catch(r){n(r)}},getLocalSet:e=>{let n=Object.create(null);function s(e){return"."!==e&&".."!==e}function a(e){return t=>r.join2(e,t)}st(s,"isRealDir"),st(a,"toAbsolute");let i=t.readdir(e.mountpoint).filter(s).map(a(e.mountpoint));for(;i.length;){let e=i.pop(),r=t.stat(e);t.isDir(r.mode)&&i.push.apply(i,t.readdir(e).filter(s).map(a(e))),n[e]={timestamp:r.mtime,mode:r.mode}}return{type:"local",entries:n}},getRemoteSet:async e=>{let t=Object.create(null),n=await Bt(e.opts.fileSystemHandle);for(let[a,i]of n)"."!==a&&(t[r.join2(e.mountpoint,a)]={timestamp:"file"===i.kind?new Date((await i.getFile()).lastModified):new Date,mode:"file"===i.kind?s.FILE_MODE:s.DIR_MODE});return{type:"remote",entries:t,handles:n}},loadLocalEntry:e=>{let r=t.lookupPath(e).node,s=t.stat(e);if(t.isDir(s.mode))return{timestamp:s.mtime,mode:s.mode};if(t.isFile(s.mode))return r.contents=n.getFileDataAsTypedArray(r),{timestamp:s.mtime,mode:s.mode,contents:r.contents};throw new Error("node type not supported")},storeLocalEntry:(e,n)=>{if(t.isDir(n.mode))t.mkdirTree(e,n.mode);else{if(!t.isFile(n.mode))throw new Error("node type not supported");t.writeFile(e,n.contents,{canOwn:!0})}t.chmod(e,n.mode),t.utime(e,n.timestamp,n.timestamp)},removeLocalEntry:e=>{var n=t.stat(e);t.isDir(n.mode)?t.rmdir(e):t.isFile(n.mode)&&t.unlink(e)},loadRemoteEntry:async e=>{if("file"===e.kind){let t=await e.getFile();return{contents:new Uint8Array(await t.arrayBuffer()),mode:s.FILE_MODE,timestamp:new Date(t.lastModified)}}if("directory"===e.kind)return{mode:s.DIR_MODE,timestamp:new Date};throw new Error("unknown kind: "+e.kind)},storeRemoteEntry:async(e,n,s)=>{let a=e.get(r.dirname(n)),i=t.isFile(s.mode)?await a.getFileHandle(r.basename(n),{create:!0}):await a.getDirectoryHandle(r.basename(n),{create:!0});if("file"===i.kind){let e=await i.createWritable();await e.write(s.contents),await e.close()}e.set(n,i)},removeRemoteEntry:async(e,t)=>{await e.get(r.dirname(t)).removeEntry(r.basename(t)),e.delete(t)},reconcile:async(e,n,a)=>{let i=0,o=[];Object.keys(n.entries).forEach(function(e){let r=n.entries[e],s=a.entries[e];(!s||t.isFile(r.mode)&&r.timestamp.getTime()>s.timestamp.getTime())&&(o.push(e),i++)}),o.sort();let d=[];if(Object.keys(a.entries).forEach(function(e){n.entries[e]||(d.push(e),i++)}),d.sort().reverse(),!i)return;let c="remote"===n.type?n.handles:a.handles;for(let t of o){let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);if("local"===a.type){let e=c.get(n),r=await s.loadRemoteEntry(e);s.storeLocalEntry(t,r)}else{let e=s.loadLocalEntry(t);await s.storeRemoteEntry(c,n,e)}}for(let t of d)if("local"===a.type)s.removeLocalEntry(t);else{let n=r.normalize(t.replace(e.mountpoint,"/")).substring(1);await s.removeRemoteEntry(c,n)}}};e.FS.filesystems.NATIVEFS_ASYNC=s}st(qt,"nodeLoadScript"),st(Ut,"loadLockFile"),st(Vt,"calculateDirname"),st(Ht,"initializeNativeFS");var Bt=st(async e=>{let t=[];async function n(e){for await(let r of e.values())t.push(r),"directory"===r.kind&&await n(r)}st(n,"collect"),await n(e);let r=new Map;r.set(".",e);for(let s of t){let t=(await e.resolve(s)).join("/");r.set(t,s)}return r},"getFsHandles");function Wt(e){let t={noImageDecoding:!0,noAudioDecoding:!0,noWasmDecoding:!1,preRun:Xt(e),quit(e,n){throw t.exited={status:e,toThrow:n},n},print:e.stdout,printErr:e.stderr,thisProgram:e._sysExecutable,arguments:e.args,API:{config:e},locateFile:t=>e.indexURL+t,instantiateWasm:Qt(e.indexURL)};return t}function Kt(e){return function(t){try{t.FS.mkdirTree(e)}catch(n){console.error(`Error occurred while making a home directory '${e}':`),console.error(n),console.error("Using '/' for a home directory instead"),e="/"}t.FS.chdir(e)}}function Jt(e){return function(t){Object.assign(t.ENV,e)}}function Yt(e){return e?[async t=>{t.addRunDependency("fsInitHook");try{await e(t.FS,{sitePackages:t.API.sitePackages})}finally{t.removeRunDependency("fsInitHook")}}]:[]}function Gt(e){let t=zt(e);return async e=>{let n=e._py_version_major(),r=e._py_version_minor();e.FS.mkdirTree("/lib"),e.API.sitePackages=`/lib/python${n}.${r}/site-packages`,e.FS.mkdirTree(e.API.sitePackages),e.addRunDependency("install-stdlib");try{let s=await t;e.FS.writeFile(`/lib/python${n}${r}.zip`,s)}catch(s){console.error("Error occurred while installing the standard library:"),console.error(s)}finally{e.removeRunDependency("install-stdlib")}}}function Xt(e){let t;return t=null!=e.stdLibURL?e.stdLibURL:e.indexURL+"python_stdlib.zip",[...Yt(e.fsInit),Gt(t),Kt(e.env.HOME),Jt(e.env),Ht]}function Qt(e){if(typeof WasmOffsetConverter<"u")return;let{binary:t,response:n}=Tt(e+"pyodide.asm.wasm");return function(e,r){return async function(){try{let s;s=n?await WebAssembly.instantiateStreaming(n,e):await WebAssembly.instantiate(await t,e);let{instance:a,module:i}=s;r(a,i)}catch(s){console.warn("wasm instantiation failed!"),console.warn(s)}}(),{}}}st(Wt,"createSettings"),st(Kt,"createHomeDirectory"),st(Jt,"setEnvironment"),st(Yt,"callFsInitHook"),st(Gt,"installStdlib"),st(Xt,"getFileSystemInitializationFuncs"),st(Qt,"getInstantiateWasmFunc");var en="0.27.7";async function tn(e={}){var t,n;await $t();let r=e.indexURL||await Vt();r=St(r),r.endsWith("/")||(r+="/"),e.indexURL=r;let s={fullStdLib:!1,jsglobals:globalThis,stdin:globalThis.prompt?globalThis.prompt:void 0,lockFileURL:r+"pyodide-lock.json",args:[],env:{},packageCacheDir:r,packages:[],enableRunUntilComplete:!0,checkAPIVersion:!0,BUILD_ID:"e94377f5ce7dcf67e0417b69a0016733c2cfb6b4622ee8c490a6f17eb58e863b"},a=Object.assign(s,e);(t=a.env).HOME??(t.HOME="/home/pyodide"),(n=a.env).PYTHONINSPECT??(n.PYTHONINSPECT="1");let i,o=Wt(a),d=o.API;if(d.lockFilePromise=Ut(a.lockFileURL),"function"!=typeof _createPyodideModule){let e=`${a.indexURL}pyodide.asm.js`;await Et(e)}if(e._loadSnapshot){let t=await e._loadSnapshot;i=ArrayBuffer.isView(t)?t:new Uint8Array(t),o.noInitialRun=!0,o.INITIAL_MEMORY=i.length}let c,u=await _createPyodideModule(o);if(o.exited)throw o.exited.toThrow;if(e.pyproxyToStringRepr&&d.setPyProxyToStringMethod(!0),d.version!==en&&a.checkAPIVersion)throw new Error(`Pyodide version does not match: '${en}' <==> '${d.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);u.locateFile=e=>{throw new Error("Didn't expect to load any more file_packager files!")},i&&(c=d.restoreSnapshot(i));let l=d.finalizeBootstrap(c,e._snapshotDeserializer);return d.sys.path.insert(0,""),l.version.includes("dev")||d.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${l.version}/full/`),d._pyodide.set_excepthook(),await d.packageIndexReady,d.initializeStreams(a.stdin,a.stdout,a.stderr),l}st(tn,"loadPyodide");const nn=new class{spans=[];startSpan(e,t={}){const n={name:e,startTime:Date.now(),attributes:t,end:(e="ok")=>this.endSpan(n,e)};return this.spans.push(n),n}endSpan(e,t="ok"){e.endTime=Date.now(),e.status=t}getSpans(){return this.spans}wrap(e,t,n={}){const r=this.startSpan(t||e.name,n);try{const t=e();return this.endSpan(r),t}catch(s){throw this.endSpan(r,"error"),s}}wrapAsync(e,t,n={}){return async(...r)=>{const s=this.startSpan(t||e.name,n);try{const t=await e(...r);return this.endSpan(s),t}catch(a){throw this.endSpan(s,"error"),a}}}logSpans(){}};globalThis.t=nn;class rn{pyodide=null;get requirePyodide(){return a(this.pyodide,"Pyodide not loaded"),this.pyodide}async bootstrap(e){return await this.loadPyodideAndPackages(e)}async loadPyodideAndPackages(e){if(!tn)throw new Error("loadPyodide is not defined");const t=nn.startSpan("loadPyodide");try{const n=await tn({packages:["micropip","msgspec",(e.version,"marimo-base"),"Markdown","pymdown-extensions","narwhals","packaging"],_makeSnapshot:false,lockFileURL:`https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,indexURL:`https://cdn.jsdelivr.net/pyodide/${e.pyodideVersion}/full/`});return this.pyodide=n,t.end("ok"),n}catch(n){throw u.error("Failed to load Pyodide",n),n}}async mountFilesystem(e){const t=nn.startSpan("mountFilesystem");return Ye(this.requirePyodide),Ge(this.requirePyodide),await Xe(this.requirePyodide),t.end("ok"),et({pyodide:this.requirePyodide,code:e.code,filename:e.filename})}async startSession(e){const{code:t,filename:n,onMessage:r,queryParameters:s,userConfig:a}=e;self.messenger={callback:r},self.query_params=s,self.user_config=a;const i=nn.startSpan("startSession.runPython"),o=n||Je,[d,c,u]=this.requirePyodide.runPython(`\n print("[py] Starting marimo...")\n import asyncio\n import js\n from marimo._pyodide.bootstrap import create_session, instantiate\n\n assert js.messenger, "messenger is not defined"\n assert js.query_params, "query_params is not defined"\n\n session, bridge = create_session(\n filename="${o}",\n query_params=js.query_params.to_py(),\n message_callback=js.messenger.callback,\n user_config=js.user_config.to_py(),\n )\n\n def init(auto_instantiate=True):\n instantiate(session, auto_instantiate)\n asyncio.create_task(session.start())\n\n # Find the packages to install\n with open("${o}", "r") as f:\n packages = session.find_packages(f.read())\n\n bridge, init, packages`);i.end();const l=new Set(u.toJs());return this.loadNotebookDeps(t,l).then(()=>c(a.runtime.auto_instantiate)),d}async loadNotebookDeps(e,t){const n=this.requirePyodide;e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),e=`import pyodide_http\n${e=`import jedi\n${e=`import pygments\n${e=`import docutils\n${e}`}`}`}`;const r=[...t];let s=nn.startSpan("pyodide.loadPackage");await n.loadPackagesFromImports(e,{errorCallback:u.error,messageCallback:u.log}),s.end(),s=nn.startSpan("micropip.install");const a=r.filter(e=>!n.loadedPackages[e]);a.length>0&&await n.runPythonAsync(`\n import micropip\n import sys\n # Filter out builtins\n missing = [p for p in ${JSON.stringify(a)} if p not in sys.modules]\n if len(missing) > 0:\n print("Loading from micropip:", missing)\n await micropip.install(missing)\n `).catch(e=>{u.error("Failed to load packages from micropip",e)}),s.end()}}async function sn(e){try{return await import(`/wasm/controller.js?version=${e}`)}catch{return new rn}}const an=nn.startSpan("worker:init");const on=new class{buffer;started=!1;onMessage;constructor(e){this.onMessage=e,this.buffer=[]}push=e=>{this.started?this.onMessage(e):this.buffer.push(e)};start=()=>{this.started=!0,this.buffer.forEach(e=>this.onMessage(e)),this.buffer=[]}}(e=>{ln.send.kernelMessage({message:e})}),dn=new class{promise;resolve;reject;status="pending";constructor(){this.promise=new Promise((e,t)=>{this.reject=e=>{this.status="rejected",t(e)},this.resolve=t=>{this.status="resolved",e(t)}})}};let cn=!1;const un={startSession:async e=>{if(await mn,cn)u.warn("Session already started");else{cn=!0;try{a(self.controller,"Controller not loaded"),await(self.controller.mountFilesystem?.({code:e.code,filename:e.filename}));const t=nn.wrapAsync(self.controller.startSession.bind(self.controller)),n=function(e){let t,n=!1;return function(...r){return n||(n=!0,t=e.apply(this,r)),t}}(()=>{ln.send.initializingMessage({message:"Initializing notebook..."}),ln.send.initialized({})});ln.send.initializingMessage({message:"Loading notebook and dependencies..."});const r=await t({code:e.code,filename:e.filename,queryParameters:e.queryParameters,userConfig:e.userConfig,onMessage:e=>{n(),on.push(e)}});dn.resolve(r),an.end("ok")}catch(t){ln.send.initializedError({error:He(t)}),an.end("error")}}},loadPackages:async e=>{const t=nn.startSpan("loadPackages");await mn,e.includes("mo.sql")&&(e=`import sqlglot\n${e=`import duckdb\n${e=`import pandas\n${e}`}`}`).includes("polars")&&(e=`import pyarrow\n${e}`),await self.pyodide.loadPackagesFromImports(e,{messageCallback:u.log,errorCallback:u.error}),t.end()},readFile:async e=>{const t=nn.startSpan("readFile");await mn;const n=l(self.pyodide.FS.readFile(e));return t.end(),n},setInterruptBuffer:async e=>{await mn,self.pyodide.setInterruptBuffer(e)},addPackage:async e=>{await mn;const{package:t}=e,n=t.split(" ").map(e=>e.trim()),r=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n await micropip.install(${JSON.stringify(n)})\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(r)},removePackage:async e=>{await mn;const{package:t}=e,n=await self.pyodide.runPythonAsync(`\n import micropip\n import json\n response = None\n try:\n micropip.uninstall("${t}")\n response = {"success": True}\n except Exception as e:\n response = {"success": False, "error": str(e)}\n json.dumps(response)\n `);return JSON.parse(n)},listPackages:async()=>{const e=nn.startSpan("listPackages");await mn;const t=await self.pyodide.runPythonAsync('\n import json\n import micropip\n\n packages = micropip.list()\n packages = [\n {"name": p.name, "version": p.version}\n for p in packages.values()\n ]\n json.dumps(sorted(packages, key=lambda pkg: pkg["name"]))\n ');return e.end(),{packages:JSON.parse(t)}},saveNotebook:async e=>{await mn;const t=self.pyodide.runPython("\n from marimo._pyodide.bootstrap import save_file\n save_file\n ");await t(JSON.stringify(e),Je)},bridge:async e=>{const t=nn.startSpan("bridge",{functionName:e.functionName});await mn;const{functionName:n,payload:r}=e;"format"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import black\n except ModuleNotFoundError:\n await micropip.install("black")\n '),"export_markdown"===n&&await self.pyodide.runPythonAsync('\n import micropip\n\n try:\n import yaml\n except ModuleNotFoundError:\n await micropip.install("pyyaml")\n ');const s=await dn.promise,a=null==r?null:"string"==typeof r?r:JSON.stringify(r),i=null==a?await s[n]():await s[n](a);return hn.has(n)&&Qe(self.pyodide),t.end(),"string"==typeof i?JSON.parse(i):i}},ln=function(e){return n(e)}({transport:(pn={transportId:"marimo-transport"},s(self,pn)),requestHandler:un});var pn;ln.send("ready",{}),ln.addMessageListener("consumerReady",async()=>{await mn,on.start()});const hn=new Set(["save","save_app_config","rename_file","create_file_or_directory","delete_file_or_directory","move_file_or_directory","update_file"]);const mn=nn.wrapAsync(async function(){try{const e=self.name,t=function(e){return e.includes("dev"),`v${en}`}(e),n=await nn.wrapAsync(sn)(e);self.controller=n,ln.send.initializingMessage({message:"Loading marimo..."}),self.pyodide=await nn.wrapAsync(n.bootstrap.bind(n))({version:e,pyodideVersion:t})}catch(e){u.error("Error bootstrapping",e),ln.send.initializedError({error:He(e)})}})();
@@ -1,4 +1,4 @@
1
- var G,j,Q,K,q,Z,J,tt,it,et;import{_ as a,s as hi,g as oi,t as It,q as ri,a as li,b as ci,l as $t,K as gi,d as ui,z as xi,G as ft,F as Bt,H as di,M as pi,h as fi,ac as mi}from"./mermaid.core-4nVOEVX3.js";import"./transform-D9VCJYws.js";import{i as yi}from"./init-DLRA0X12.js";import{o as bi}from"./ordinal-DDUp3AbE.js";import{r as Ai}from"./range-CtcPcB_L.js";import{l as zt}from"./linear-NsreOeBF.js";import{l as Ot}from"./step-BwsUM5iJ.js";import"./index-OC46250R.js";import"./timer-Bqd5yn_a.js";function mt(){var e,t,i=bi().unknown(void 0),s=i.domain,n=i.range,c=0,g=1,p=!1,d=0,_=0,L=.5;function S(){var y=s().length,E=g<c,D=E?g:c,P=E?c:g;e=(P-D)/Math.max(1,y-d+2*_),p&&(e=Math.floor(e)),D+=(P-D-e*(y-d))*L,t=e*(1-d),p&&(D=Math.round(D),t=Math.round(t));var M=Ai(y).map(function(f){return D+e*f});return n(E?M.reverse():M)}return delete i.unknown,i.domain=function(y){return arguments.length?(s(y),S()):s()},i.range=function(y){return arguments.length?([c,g]=y,c=+c,g=+g,S()):[c,g]},i.rangeRound=function(y){return[c,g]=y,c=+c,g=+g,p=!0,S()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(y){return arguments.length?(p=!!y,S()):p},i.padding=function(y){return arguments.length?(d=Math.min(1,_=+y),S()):d},i.paddingInner=function(y){return arguments.length?(d=Math.min(1,y),S()):d},i.paddingOuter=function(y){return arguments.length?(_=+y,S()):_},i.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),S()):L},i.copy=function(){return mt(s(),[c,g]).round(p).paddingInner(d).paddingOuter(_).align(L)},yi.apply(S(),arguments)}var yt=(function(){var e=a(function(h,b,u,x){for(u=u||{},x=h.length;x--;u[h[x]]=b);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],c=[1,6],g=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],d=[1,25],_=[1,26],L=[1,28],S=[1,29],y=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],f=[1,35],k=[1,36],l=[1,37],z=[1,43],O=[1,42],Y=[1,47],F=[1,50],r=[1,10,12,14,16,18,19,21,23,34,35,36],v=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],st={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,b,u,x,w,o,nt){var m=o.length-1;switch(w){case 5:x.setOrientation(o[m]);break;case 9:x.setDiagramTitle(o[m].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[m]);break;case 13:x.setLineData(o[m-1],o[m]);break;case 14:x.setBarData({text:"",type:"text"},o[m]);break;case 15:x.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),x.setAccDescription(this.$);break;case 19:case 27:this.$=o[m-1];break;case 20:this.$=[Number(o[m-2]),...o[m]];break;case 21:this.$=[Number(o[m])];break;case 22:x.setXAxisTitle(o[m]);break;case 23:x.setXAxisTitle(o[m-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[m]);break;case 26:x.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 28:this.$=[o[m-2],...o[m]];break;case 29:this.$=[o[m]];break;case 30:x.setYAxisTitle(o[m]);break;case 31:x.setYAxisTitle(o[m-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 37:case 38:this.$={text:o[m],type:"text"};break;case 39:this.$={text:o[m],type:"markdown"};break;case 40:this.$=o[m];break;case 41:this.$=o[m-1]+""+o[m]}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:c,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:c,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:c,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:c,36:g}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:c,36:g}),{11:23,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:39,13:38,24:z,27:O,29:40,30:41,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:45,15:44,27:Y,33:46,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:49,17:48,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:52,17:51,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{20:[1,53]},{22:[1,54]},e(r,[2,18]),{1:[2,2]},e(r,[2,8]),e(r,[2,9]),e(v,[2,37],{40:55,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l}),e(v,[2,38]),e(v,[2,39]),e(C,[2,40]),e(C,[2,42]),e(C,[2,43]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(r,[2,10]),e(r,[2,22],{30:41,29:56,24:z,27:O}),e(r,[2,24]),e(r,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,11]),e(r,[2,30],{33:60,27:Y}),e(r,[2,32]),{31:[1,61]},e(r,[2,12]),{17:62,24:F},{25:63,27:T},e(r,[2,14]),{17:65,24:F},e(r,[2,16]),e(r,[2,17]),e(C,[2,41]),e(r,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(r,[2,31]),{27:[1,69]},e(r,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(r,[2,15]),e(r,[2,26]),e(r,[2,27]),{11:59,32:72,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,33]),e(r,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,b){if(!b.recoverable){var u=new Error(h);throw u.hash=b,u}this.trace(h)},"parseError"),parse:a(function(h){var b=this,u=[0],x=[],w=[null],o=[],nt=this.table,m="",rt=0,Lt=0,ni=o.slice.call(arguments,1),R=Object.create(this.lexer),N={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(N.yy[dt]=this.yy[dt]);R.setInput(h,N.yy),N.yy.lexer=R,N.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var pt=R.yylloc;o.push(pt);var ai=R.options&&R.options.ranges;function Pt(){var B;return typeof(B=x.pop()||R.lex()||1)!="number"&&(B instanceof Array&&(B=(x=B).pop()),B=b.symbols_[B]||B),B}typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(B){u.length=u.length-2*B,w.length=w.length-B,o.length=o.length-B},"popStack"),a(Pt,"lex");for(var I,V,$,vt,lt,W,Et,ct,H={};;){if(V=u[u.length-1],this.defaultActions[V]?$=this.defaultActions[V]:(I==null&&(I=Pt()),$=nt[V]&&nt[V][I]),$===void 0||!$.length||!$[0]){var Mt="";for(lt in ct=[],nt[V])this.terminals_[lt]&&lt>2&&ct.push("'"+this.terminals_[lt]+"'");Mt=R.showPosition?"Parse error on line "+(rt+1)+`:
1
+ var G,j,Q,K,q,Z,J,tt,it,et;import{_ as a,s as hi,g as oi,t as It,q as ri,a as li,b as ci,l as $t,K as gi,d as ui,z as xi,G as ft,F as Bt,H as di,M as pi,h as fi,ac as mi}from"./mermaid.core-BFFCqfOn.js";import"./transform-D9VCJYws.js";import{i as yi}from"./init-DLRA0X12.js";import{o as bi}from"./ordinal-DDUp3AbE.js";import{r as Ai}from"./range-CtcPcB_L.js";import{l as zt}from"./linear-BwY8e5hA.js";import{l as Ot}from"./step-BwsUM5iJ.js";import"./index-PmY0x4Zd.js";import"./isEmpty-D1t7Gran.js";import"./timer-Bqd5yn_a.js";function mt(){var e,t,i=bi().unknown(void 0),s=i.domain,n=i.range,c=0,g=1,p=!1,d=0,_=0,L=.5;function S(){var y=s().length,E=g<c,D=E?g:c,P=E?c:g;e=(P-D)/Math.max(1,y-d+2*_),p&&(e=Math.floor(e)),D+=(P-D-e*(y-d))*L,t=e*(1-d),p&&(D=Math.round(D),t=Math.round(t));var M=Ai(y).map(function(f){return D+e*f});return n(E?M.reverse():M)}return delete i.unknown,i.domain=function(y){return arguments.length?(s(y),S()):s()},i.range=function(y){return arguments.length?([c,g]=y,c=+c,g=+g,S()):[c,g]},i.rangeRound=function(y){return[c,g]=y,c=+c,g=+g,p=!0,S()},i.bandwidth=function(){return t},i.step=function(){return e},i.round=function(y){return arguments.length?(p=!!y,S()):p},i.padding=function(y){return arguments.length?(d=Math.min(1,_=+y),S()):d},i.paddingInner=function(y){return arguments.length?(d=Math.min(1,y),S()):d},i.paddingOuter=function(y){return arguments.length?(_=+y,S()):_},i.align=function(y){return arguments.length?(L=Math.max(0,Math.min(1,y)),S()):L},i.copy=function(){return mt(s(),[c,g]).round(p).paddingInner(d).paddingOuter(_).align(L)},yi.apply(S(),arguments)}var yt=(function(){var e=a(function(h,b,u,x){for(u=u||{},x=h.length;x--;u[h[x]]=b);return u},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],c=[1,6],g=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],d=[1,25],_=[1,26],L=[1,28],S=[1,29],y=[1,30],E=[1,31],D=[1,32],P=[1,33],M=[1,34],f=[1,35],k=[1,36],l=[1,37],z=[1,43],O=[1,42],Y=[1,47],F=[1,50],r=[1,10,12,14,16,18,19,21,23,34,35,36],v=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],C=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],T=[1,64],st={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,b,u,x,w,o,nt){var m=o.length-1;switch(w){case 5:x.setOrientation(o[m]);break;case 9:x.setDiagramTitle(o[m].text.trim());break;case 12:x.setLineData({text:"",type:"text"},o[m]);break;case 13:x.setLineData(o[m-1],o[m]);break;case 14:x.setBarData({text:"",type:"text"},o[m]);break;case 15:x.setBarData(o[m-1],o[m]);break;case 16:this.$=o[m].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=o[m].trim(),x.setAccDescription(this.$);break;case 19:case 27:this.$=o[m-1];break;case 20:this.$=[Number(o[m-2]),...o[m]];break;case 21:this.$=[Number(o[m])];break;case 22:x.setXAxisTitle(o[m]);break;case 23:x.setXAxisTitle(o[m-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(o[m]);break;case 26:x.setXAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 28:this.$=[o[m-2],...o[m]];break;case 29:this.$=[o[m]];break;case 30:x.setYAxisTitle(o[m]);break;case 31:x.setYAxisTitle(o[m-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(o[m-2]),Number(o[m]));break;case 37:case 38:this.$={text:o[m],type:"text"};break;case 39:this.$={text:o[m],type:"markdown"};break;case 40:this.$=o[m];break;case 41:this.$=o[m-1]+""+o[m]}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:c,36:g}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:c,36:g}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:c,36:g}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:c,36:g}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:c,36:g}),{11:23,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:39,13:38,24:z,27:O,29:40,30:41,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:45,15:44,27:Y,33:46,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:49,17:48,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{11:52,17:51,24:F,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},{20:[1,53]},{22:[1,54]},e(r,[2,18]),{1:[2,2]},e(r,[2,8]),e(r,[2,9]),e(v,[2,37],{40:55,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l}),e(v,[2,38]),e(v,[2,39]),e(C,[2,40]),e(C,[2,42]),e(C,[2,43]),e(C,[2,44]),e(C,[2,45]),e(C,[2,46]),e(C,[2,47]),e(C,[2,48]),e(C,[2,49]),e(C,[2,50]),e(C,[2,51]),e(r,[2,10]),e(r,[2,22],{30:41,29:56,24:z,27:O}),e(r,[2,24]),e(r,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,11]),e(r,[2,30],{33:60,27:Y}),e(r,[2,32]),{31:[1,61]},e(r,[2,12]),{17:62,24:F},{25:63,27:T},e(r,[2,14]),{17:65,24:F},e(r,[2,16]),e(r,[2,17]),e(C,[2,41]),e(r,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(r,[2,31]),{27:[1,69]},e(r,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(r,[2,15]),e(r,[2,26]),e(r,[2,27]),{11:59,32:72,37:24,38:d,39:_,40:27,41:L,42:S,43:y,44:E,45:D,46:P,47:M,48:f,49:k,50:l},e(r,[2,33]),e(r,[2,19]),{25:73,27:T},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,b){if(!b.recoverable){var u=new Error(h);throw u.hash=b,u}this.trace(h)},"parseError"),parse:a(function(h){var b=this,u=[0],x=[],w=[null],o=[],nt=this.table,m="",rt=0,Lt=0,ni=o.slice.call(arguments,1),R=Object.create(this.lexer),N={yy:{}};for(var dt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,dt)&&(N.yy[dt]=this.yy[dt]);R.setInput(h,N.yy),N.yy.lexer=R,N.yy.parser=this,R.yylloc===void 0&&(R.yylloc={});var pt=R.yylloc;o.push(pt);var ai=R.options&&R.options.ranges;function Pt(){var B;return typeof(B=x.pop()||R.lex()||1)!="number"&&(B instanceof Array&&(B=(x=B).pop()),B=b.symbols_[B]||B),B}typeof N.yy.parseError=="function"?this.parseError=N.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,a(function(B){u.length=u.length-2*B,w.length=w.length-B,o.length=o.length-B},"popStack"),a(Pt,"lex");for(var I,V,$,vt,lt,W,Et,ct,H={};;){if(V=u[u.length-1],this.defaultActions[V]?$=this.defaultActions[V]:(I==null&&(I=Pt()),$=nt[V]&&nt[V][I]),$===void 0||!$.length||!$[0]){var Mt="";for(lt in ct=[],nt[V])this.terminals_[lt]&&lt>2&&ct.push("'"+this.terminals_[lt]+"'");Mt=R.showPosition?"Parse error on line "+(rt+1)+`:
2
2
  `+R.showPosition()+`
3
3
  Expecting `+ct.join(", ")+", got '"+(this.terminals_[I]||I)+"'":"Parse error on line "+(rt+1)+": Unexpected "+(I==1?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(Mt,{text:R.match,token:this.terminals_[I]||I,line:R.yylineno,loc:pt,expected:ct})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+V+", token: "+I);switch($[0]){case 1:u.push(I),w.push(R.yytext),o.push(R.yylloc),u.push($[1]),I=null,Lt=R.yyleng,m=R.yytext,rt=R.yylineno,pt=R.yylloc;break;case 2:if(W=this.productions_[$[1]][1],H.$=w[w.length-W],H._$={first_line:o[o.length-(W||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(W||1)].first_column,last_column:o[o.length-1].last_column},ai&&(H._$.range=[o[o.length-(W||1)].range[0],o[o.length-1].range[1]]),(vt=this.performAction.apply(H,[m,Lt,rt,N.yy,$[1],w,o].concat(ni)))!==void 0)return vt;W&&(u=u.slice(0,-1*W*2),w=w.slice(0,-1*W),o=o.slice(0,-1*W)),u.push(this.productions_[$[1]][0]),w.push(H.$),o.push(H._$),Et=nt[u[u.length-2]][u[u.length-1]],u.push(Et);break;case 3:return!0}}return!0},"parse")},ot=(function(){return{EOF:1,parseError:a(function(h,b){if(!this.yy.parser)throw new Error(h);this.yy.parser.parseError(h,b)},"parseError"),setInput:a(function(h,b){return this.yy=b||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];return this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h,h.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var b=h.length,u=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var w=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===x.length?this.yylloc.first_column:0)+x[x.length-u.length].length-u[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[w[0],w[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),b=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
package/dist/index.html CHANGED
@@ -59,8 +59,8 @@
59
59
  <marimo-server-token data-token="{{ server_token }}" hidden></marimo-server-token>
60
60
  <!-- /TODO -->
61
61
  <title>{{ title }}</title>
62
- <script type="module" crossorigin src="./assets/index-OC46250R.js"></script>
63
- <link rel="stylesheet" crossorigin href="./assets/index-CknhX2Vy.css">
62
+ <script type="module" crossorigin src="./assets/index-PmY0x4Zd.js"></script>
63
+ <link rel="stylesheet" crossorigin href="./assets/index-DadI618h.css">
64
64
  </head>
65
65
  <body>
66
66
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marimo-team/frontend",
3
- "version": "0.15.5",
3
+ "version": "0.16.0-dev96986",
4
4
  "main": "dist/main.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -100,9 +100,13 @@
100
100
  "@uwdata/flechette": "^1.1.2",
101
101
  "@valtown/codemirror-codeium": "^1.1.1",
102
102
  "@xterm/addon-attach": "^0.11.0",
103
+ "@xterm/addon-canvas": "^0.7.0",
103
104
  "@xterm/addon-fit": "^0.10.0",
105
+ "@xterm/addon-search": "^0.15.0",
106
+ "@xterm/addon-unicode11": "^0.8.0",
107
+ "@xterm/addon-web-links": "^0.11.0",
104
108
  "@xterm/xterm": "^5.5.0",
105
- "@zed-industries/agent-client-protocol": "^0.1.2",
109
+ "@zed-industries/agent-client-protocol": "^0.3.1",
106
110
  "ai": "^5.0.30",
107
111
  "ansi_up": "^6.0.6",
108
112
  "class-variance-authority": "^0.7.1",
@@ -151,7 +155,7 @@
151
155
  "remark-gfm": "^4.0.1",
152
156
  "rpc-anywhere": "^1.7.0",
153
157
  "sql-formatter": "^15.6.6",
154
- "streamdown": "^1.2.0",
158
+ "streamdown": "^1.3.0",
155
159
  "string-dedent": "^3.0.2",
156
160
  "swiper": "^11.2.10",
157
161
  "tailwind-merge": "^2.6.0",
@@ -159,7 +163,7 @@
159
163
  "thememirror": "^2.0.1",
160
164
  "timestring": "^7.0.0",
161
165
  "typescript-memoize": "^1.1.1",
162
- "use-acp": "^0.1.5",
166
+ "use-acp": "^0.2.3",
163
167
  "use-resize-observer": "^9.1.0",
164
168
  "vega-lite": "^5.23.0",
165
169
  "vega-loader": "^4.5.3",
@@ -176,7 +180,7 @@
176
180
  "build:watch": "vite build --watch --outDir ../marimo/_static",
177
181
  "build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 vite build",
178
182
  "test": "vitest",
179
- "typecheck": "tsc",
183
+ "typecheck": "tsgo",
180
184
  "lint": "run-s lint:biome lint:eslint lint:stylelint",
181
185
  "lint:biome": "biome lint --diagnostic-level=warn --write .",
182
186
  "lint:eslint": "cross-env TIMING=1 eslint src e2e-tests --fix",
@@ -225,6 +229,7 @@
225
229
  "eslint-config-prettier": "^9.1.0",
226
230
  "eslint-plugin-react": "^7.34.3",
227
231
  "eslint-plugin-react-hooks": "^6.0.0-rc.1",
232
+ "eslint-plugin-react-you-might-not-need-an-effect": "^0.5.1",
228
233
  "eslint-plugin-ssr-friendly": "^1.3.0",
229
234
  "eslint-plugin-storybook": "^9.0.14",
230
235
  "eslint-plugin-unicorn": "^54.0.0",
@@ -0,0 +1,43 @@
1
+ /* Copyright 2024 Marimo. All rights reserved. */
2
+
3
+ // Edge case filenames for testing unicode, spaces, and special characters
4
+ export const EDGE_CASE_FILENAMES = [
5
+ // Unicode
6
+ "tést.py",
7
+ "café.py",
8
+ "测试.py",
9
+ // Emojis
10
+ "🚀notebook.py",
11
+ // Spaces
12
+ "test file.py",
13
+ "file with spaces.py",
14
+ // Multiple
15
+ "café & 测试.py",
16
+ "café notebook.py",
17
+ // URL characters
18
+ "test-file.py",
19
+ "test_file.py",
20
+ "test_file.backup.py",
21
+ "file&with&ampersands.py",
22
+ "file=with=equals.py",
23
+ "file?with?questions.py",
24
+ ];
25
+
26
+ // Cell names with unicode and special characters for frontend tests
27
+ export const EDGE_CASE_CELL_NAMES = [
28
+ "tést_cell",
29
+ "café_notebook",
30
+ "测试_cell",
31
+ "🚀_my_cell",
32
+ "cell with spaces",
33
+ "café notebook cell",
34
+ ];
35
+
36
+ // URL test cases with special characters that could break query parameters
37
+ export const URL_SPECIAL_CHAR_FILENAMES = [
38
+ "file with spaces.py",
39
+ "file&with&ampersands.py",
40
+ "file=with=equals.py",
41
+ "file?with?questions.py",
42
+ "café & 测试.py",
43
+ ];