@marimo-team/islands 0.17.4 → 0.17.6

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 (73) hide show
  1. package/dist/{ConnectedDataExplorerComponent-DY9cADKc.js → ConnectedDataExplorerComponent-BC1bAfWX.js} +4 -4
  2. package/dist/{any-language-editor-Bs2c1bKU.js → any-language-editor-BpWjHMW2.js} +22 -22
  3. package/dist/{dist-DlSZED-1.js → dist-1NPzctn9.js} +2 -2
  4. package/dist/{dist-qGpLTiEi.js → dist-59eZyXwa.js} +3 -3
  5. package/dist/dist-8Gr13wFT.js +6 -0
  6. package/dist/{dist-D4LUTYHc.js → dist-8IZEIZE_.js} +2 -2
  7. package/dist/dist-BA1Ol0Yn.js +6 -0
  8. package/dist/{dist-DzKKEoge.js → dist-BGBHvY7x.js} +3 -3
  9. package/dist/{dist-8v4BI_h_.js → dist-BJKL0WEK.js} +1 -1
  10. package/dist/{dist-B3CNaJau.js → dist-BPwzuLH_.js} +119 -119
  11. package/dist/{dist-D08oiinq.js → dist-BRfGeCYG.js} +77 -77
  12. package/dist/{dist-CxRajUZ6.js → dist-BXNAv-Y6.js} +1 -1
  13. package/dist/{dist-7CqcJssH.js → dist-BZrCuBDi.js} +6 -6
  14. package/dist/{dist-C02gS--y.js → dist-Bevt_gzr.js} +41 -41
  15. package/dist/{dist-DGKjHTv9.js → dist-C1xRKkqR.js} +5 -5
  16. package/dist/{dist-DSDOMDNR.js → dist-C8SV9SiM.js} +4 -4
  17. package/dist/{dist-HKzG1oF6.js → dist-CCFXVP1F.js} +1 -1
  18. package/dist/{dist-BgsDu-bU.js → dist-CLkbwjpG.js} +1 -1
  19. package/dist/{dist-BMhv6XDi.js → dist-CP1MdHH-.js} +27 -27
  20. package/dist/{dist-Dh7gw0Ay.js → dist-CWyLmhAN.js} +2 -2
  21. package/dist/{dist-CXimnGhI.js → dist-C_BPvPwx.js} +2 -2
  22. package/dist/dist-CbNrcsEy.js +10 -0
  23. package/dist/{dist-DiO9ni9a.js → dist-Cba8uTcG.js} +2 -2
  24. package/dist/{dist-C5Ns3q-m.js → dist-Cf1Q6zai.js} +31 -31
  25. package/dist/{dist-_tHnp24J.js → dist-CiMy2-5u.js} +3 -3
  26. package/dist/dist-CkXa7yhd.js +10 -0
  27. package/dist/dist-CoHj7yHI.js +6 -0
  28. package/dist/{dist-XkGsOiy0.js → dist-CqG4DwQn.js} +2 -2
  29. package/dist/{dist-owpR56zn.js → dist-Ct4F6_s2.js} +1 -1
  30. package/dist/{dist-DTNqkRGE.js → dist-DG9oMdD2.js} +3 -3
  31. package/dist/{dist-CawOxmKh.js → dist-DKdtgJ4Q.js} +5 -5
  32. package/dist/{dist-K_AqLCfS.js → dist-DQOkkAzs.js} +3 -3
  33. package/dist/dist-DVuYVZws.js +6 -0
  34. package/dist/{dist-DvsjKDQ4.js → dist-DgnYtm7R.js} +1 -1
  35. package/dist/dist-DjH2J8yO.js +6 -0
  36. package/dist/{dist-DGnWQOnS.js → dist-Djl1P_Vh.js} +3 -3
  37. package/dist/{dist-DbHWFmjZ.js → dist-Kh7kDIJB.js} +1 -1
  38. package/dist/dist-MCqj0bEP.js +12 -0
  39. package/dist/{dist-eSnWVS11.js → dist-k6dhIy0O.js} +3 -3
  40. package/dist/dist-l9YJLCkC.js +6 -0
  41. package/dist/{dist-BYS0EtbC.js → dist-m4uUGntS.js} +2 -2
  42. package/dist/{dist-D_GkrgWD.js → dist-qXlX_Isq.js} +2 -2
  43. package/dist/{dist-CBu8cgzz.js → dist-t5bQPtMZ.js} +43 -45
  44. package/dist/{esm-CQIOyi5v.js → esm-HxIp3fzy.js} +1387 -1435
  45. package/dist/{formats-kyFd0DPJ.js → formats-b5g0iERd.js} +1 -1
  46. package/dist/{glide-data-editor-1bUl_mRe.js → glide-data-editor-hF8NzJm2.js} +2 -2
  47. package/dist/main.js +93 -1074
  48. package/dist/{mermaid-DIjoC4T4.js → mermaid-BAe4A_1z.js} +2 -2
  49. package/dist/{react-vega-DM3e8kar.js → react-vega-BhZaW0DJ.js} +1 -1
  50. package/dist/{react-vega-B9eMrRW1.js → react-vega-C3G6aCB7.js} +1560 -869
  51. package/dist/{spec-rqRnkIf4.js → spec-9eipa51K.js} +1 -1
  52. package/dist/{types-Bt7p5SYB.js → types-O1gHduIo.js} +1 -1
  53. package/dist/{useAsyncData-Dp2V69OV.js → useAsyncData-D8_fNj6a.js} +1 -1
  54. package/dist/{useTheme-D7vlj42b.js → useTheme-BzICL4qs.js} +23 -24
  55. package/dist/{vega-component-C58Jk3ub.js → vega-component-B26vOtT-.js} +4 -4
  56. package/package.json +2 -2
  57. package/src/components/app-config/data-form.tsx +3 -3
  58. package/src/core/codemirror/language/__tests__/markdown.test.ts +36 -13
  59. package/src/core/codemirror/language/__tests__/utils.test.ts +6 -2
  60. package/src/core/codemirror/language/languages/sql/sql.ts +2 -1
  61. package/src/plugins/layout/TexPlugin.tsx +33 -5
  62. package/dist/dist-B9JCXzyv.js +0 -6
  63. package/dist/dist-C6QrJGYr.js +0 -10
  64. package/dist/dist-CFZ32udY.js +0 -6
  65. package/dist/dist-CmgxQNWN.js +0 -10
  66. package/dist/dist-Cr6Cu8sC.js +0 -6
  67. package/dist/dist-NxHLuq7w.js +0 -6
  68. package/dist/dist-S2JcqPPB.js +0 -12
  69. package/dist/dist-hcPlrsR9.js +0 -6
  70. package/dist/dist-poXa8G8m.js +0 -6
  71. package/dist/node-sql-parser-IKID_dZE.js +0 -70437
  72. /package/dist/{esm-CopBBL2y.js → esm-CS8JKDQL.js} +0 -0
  73. /package/dist/{react-plotly-Cs07wkly.js → react-plotly-YQqow0sD.js} +0 -0
package/dist/main.js CHANGED
@@ -6,21 +6,21 @@ import { t as require_react } from "./react-DHL_F5hS.js";
6
6
  import { t as require_compiler_runtime } from "./compiler-runtime-5MdCVm0X.js";
7
7
  import { n as Copy, r as toast, t as copyToClipboard } from "./copy-bxQOKABs.js";
8
8
  import { A as createLucideIcon, C as DismissableLayer, E as dispatchDiscreteCustomEvent, O as createContextScope, S as useLayoutEffect2, T as Primitive, _ as Content$3, a as __awaiter, b as useSize, c as withSmartCollisionBoundary, f as useControllableState, g as Arrow, h as Anchor, i as useFocusGuards, k as composeEventHandlers, l as StyleNamespace, m as Portal, n as hideOthers, o as MAX_HEIGHT_OFFSET, p as Presence, r as FocusScope, s as withFullScreenAsRoot, t as Combination_default, u as Root$5, v as Root2$5, w as useCallbackRef, x as useId$10, y as createPopperScope } from "./Combination-DrSsMSEB.js";
9
- import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $5a387cc49350e6db$export$722debc0e56fea39, H as ChartPie, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, O as TIME_UNIT_DESCRIPTIONS, P as $fb18d541ea1ad717$export$ad991b66133851cf, R as Table$1, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as ChartColumn, V as Hash, W as Calendar, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as createReducerAndAtoms, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON, z as SquareFunction } from "./spec-rqRnkIf4.js";
9
+ import { A as Badge, B as ListFilter, C as DEFAULT_COLOR_SCHEME, D as SCALE_TYPE_DESCRIPTIONS, E as EMPTY_VALUE$1, F as $5a387cc49350e6db$export$722debc0e56fea39, H as ChartPie, I as Type, L as ToggleLeft, M as startCase_default, N as $896ba0a80a8f4d36$export$85fd5fdf27bacc79, O as TIME_UNIT_DESCRIPTIONS, P as $fb18d541ea1ad717$export$ad991b66133851cf, R as Table$1, S as DEFAULT_AGGREGATION, T as DEFAULT_TIME_UNIT, U as ChartColumn, V as Hash, W as Calendar, _ as AGGREGATION_TYPE_DESCRIPTIONS, a as AGGREGATION_FNS$1, b as COLOR_SCHEMES, c as COLOR_BY_FIELDS, d as NONE_VALUE, f as SELECTABLE_DATA_TYPES, g as TIME_UNITS, h as STRING_AGGREGATION_FNS, i as convertDataTypeToSelectable, j as createReducerAndAtoms, k as escapeFieldName, l as COMBINED_TIME_UNITS, m as SORT_TYPES, n as createSpecWithoutData, o as BIN_AGGREGATION, p as SINGLE_TIME_UNITS, r as isFieldSet, s as CHART_TYPES, t as augmentSpecWithData, u as ChartType, v as AGGREGATION_TYPE_ICON, w as DEFAULT_MAX_BINS_FACET, x as COUNT_FIELD, y as CHART_TYPE_ICON, z as SquareFunction } from "./spec-9eipa51K.js";
10
10
  import { t as Check } from "./check-BZnPxXnd.js";
11
11
  import { C as createCollection, D as usePrevious, E as useOnUnmount, F as $b5e257d569688ac6$export$535bd6ca7f90a273, L as X, N as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7, O as assertNever, P as $18f2051aff69b9bf$export$a54013f0d02a8f82, S as useDirection, T as useOnMount, a as SelectItem, b as Icon, c as SelectTrigger, d as selectStyles, f as MENU_ITEM_DISABLED, g as menuItemVariants, i as SelectGroup, j as $a916eb452884faea$export$b7a616150fdb9f44, k as logNever, l as SelectValue, n as Select, o as SelectLabel, r as SelectContent, s as SelectSeparator, t as Label, u as NativeSelect, v as menuSeparatorVariants, w as clamp$2, x as Trigger$4, z as ChevronDown } from "./label-Wr-xTlW7.js";
12
- import { $ as $e93e671b31057976$export$b8473d3665f3a75a, A as $a049562f99e7db0e$export$f9c6924e160136d1, At as $c87311424ea30a05$export$9ac100e40613ea10, B as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Bt as $431fbd86ca7dc216$export$b204af158042fbac, C as DropdownMenuTrigger, Ct as $b4b717babfbb907b$export$bebd5a1431fec25d, D as $3985021b0ad6602f$export$37fb8590cf2c088c, Dt as $313b98861ee5dd6c$export$d6875122194c7b44, E as createRovingFocusGroupScope, Et as $df56164dff5785e2$export$4338b53315abf666, F as $514c0188e459b4c0$export$9afb8bc826b033ea, Ft as $3ef42575df84b30b$export$9d1611c77c2fe928, G as $64fa3d84918910a7$export$c245e6201fed2f75, Gt as $8ae05eaa5c114e9c$export$7f54fc3180508a52, H as $64fa3d84918910a7$export$29f1550f4b0d4415, Ht as $ff5963eb1fccf552$export$e08e3b67e392101e, I as $d2b4bc8c273e7be6$export$24d547caef80ccd1, It as $d4ee10de306f2510$export$4282f70798064fe0, J as $64fa3d84918910a7$export$fabf2dc03a41866e, Jt as Search, K as $64fa3d84918910a7$export$c62b8e45d58ddad9, Kt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, L as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, Lt as $d4ee10de306f2510$export$cd4e5573fbe2b576, M as $ee014567cb39d3f0$export$f551688fc98f2e09, Mt as $c87311424ea30a05$export$fedb369cb70207f1, N as $ee014567cb39d3f0$export$ff05c3ac10437e03, Nt as $7215afc6de606d6b$export$de79e2c695e052f3, O as $3985021b0ad6602f$export$f5b8910cec6cf069, Ot as $c87311424ea30a05$export$6446a186d09e379e, P as $514c0188e459b4c0$export$5f1af8db9871e1d6, Pt as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, Q as $2baaea4c71418dea$export$294aa081a6c6f55d, Qt as ChevronRight, R as $01b77f81d0f07f68$export$75b6ee27786ba447, Rt as $d4ee10de306f2510$export$e58f029f0fbfdb29, S as DropdownMenuSubTrigger, St as $b4b717babfbb907b$export$4c063cf1350e6fed, T as Root$6, Tt as $e9faafb641e167db$export$90fc3a17d93f704c, U as $64fa3d84918910a7$export$4d86445c2cf5e3, Ut as $bdb11010cef70236$export$b4cc09c592e8fdb8, V as $64fa3d84918910a7$export$2881499e37b75b9a, Vt as $431fbd86ca7dc216$export$f21a1ffae260145a, W as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Wt as $bdb11010cef70236$export$f680877a34711e37, X as capitalize_default, Xt as Pencil, Y as useNonce, Yt as Plus, Z as $d2e8511e6f209edf$export$e908e06f4b8e3402, Zt as Circle, _ as DropdownMenuLabel, _t as $f6c31cce2adf654f$export$45712eceda6fad21, a as Input, at as $319e236875307eab$export$a9b970dcc4ae71a9, b as DropdownMenuSub, bt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, c as prettyEngineeringNumber, ct as $6c7bd7858deea686$export$cd11ab140839f11d, d as useDebounceControlledState, dt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, et as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, f as useDebouncedCallback, ft as $5b160d28a433310d$export$c17fa47878dc55b6, g as DropdownMenuItem, gt as $507fabe10e71c6fb$export$630ff653c5ada6a9, h as DropdownMenuGroup, ht as $3ad3f6e1647bc98d$export$80f3e147d781571c, i as DebouncedNumberInput, it as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, j as $d3e0e05bdfcf66bd$export$c24727297075ec6a, jt as $c87311424ea30a05$export$a11b0059900ceec8, k as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, kt as $c87311424ea30a05$export$78551043582a6a98, l as prettyNumber, lt as $fca6afa0e843324b$export$87b761675e8eaa10, m as DropdownMenuContent, mt as $9ab94262bd0047c7$export$420e68273165f4ec, n as ErrorBoundary, nt as $e5be200c675c3b3a$export$aca958c65c314e6c, o as OnBlurredInput, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenu, pt as $6179b936705e76d3$export$ae780daf29e6d456, q as $64fa3d84918910a7$export$ef03459518577ad4, qt as Trash, r as DebouncedInput, rt as $e5be200c675c3b3a$export$dad6ae84456c676a, s as NumberField, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as BulkEdit, tt as $e5be200c675c3b3a$export$a763b9476acd3eb, u as prettyScientificNumber, ut as $fca6afa0e843324b$export$f12b703ca79dfbb1, v as DropdownMenuPortal, vt as _class_private_field_init, w as Item$2, wt as $99facab73266f662$export$5add1d006293d136, x as DropdownMenuSubContent, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuSeparator, yt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, z as $01b77f81d0f07f68$export$b04be29aa201d4f5, zt as $f4e2df6bd15f8569$export$98658e8c59125e6a } from "./types-Bt7p5SYB.js";
13
- import { S as CircleQuestionMark, _ as isUrl, a as AlertDescription, b as Deferred, c as toDate, d as millisecondsInHour, f as millisecondsInMinute, g as getRuntimeManager, h as asRemoteURL, i as Alert, l as constructFrom, m as millisecondsInWeek, n as useDeepCompareMemoize, o as AlertTitle, p as millisecondsInSecond, r as dequal, s as isValid$1, t as arrow, u as millisecondsInDay, v as require_cuid2, x as isWasm, y as isStaticNotebook } from "./formats-kyFd0DPJ.js";
12
+ import { $ as $e93e671b31057976$export$b8473d3665f3a75a, A as $a049562f99e7db0e$export$f9c6924e160136d1, At as $c87311424ea30a05$export$9ac100e40613ea10, B as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, Bt as $431fbd86ca7dc216$export$b204af158042fbac, C as DropdownMenuTrigger, Ct as $b4b717babfbb907b$export$bebd5a1431fec25d, D as $3985021b0ad6602f$export$37fb8590cf2c088c, Dt as $313b98861ee5dd6c$export$d6875122194c7b44, E as createRovingFocusGroupScope, Et as $df56164dff5785e2$export$4338b53315abf666, F as $514c0188e459b4c0$export$9afb8bc826b033ea, Ft as $3ef42575df84b30b$export$9d1611c77c2fe928, G as $64fa3d84918910a7$export$c245e6201fed2f75, Gt as $8ae05eaa5c114e9c$export$7f54fc3180508a52, H as $64fa3d84918910a7$export$29f1550f4b0d4415, Ht as $ff5963eb1fccf552$export$e08e3b67e392101e, I as $d2b4bc8c273e7be6$export$24d547caef80ccd1, It as $d4ee10de306f2510$export$4282f70798064fe0, J as $64fa3d84918910a7$export$fabf2dc03a41866e, Jt as Search, K as $64fa3d84918910a7$export$c62b8e45d58ddad9, Kt as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, L as $d2b4bc8c273e7be6$export$353f5b6fc5456de1, Lt as $d4ee10de306f2510$export$cd4e5573fbe2b576, M as $ee014567cb39d3f0$export$f551688fc98f2e09, Mt as $c87311424ea30a05$export$fedb369cb70207f1, N as $ee014567cb39d3f0$export$ff05c3ac10437e03, Nt as $7215afc6de606d6b$export$de79e2c695e052f3, O as $3985021b0ad6602f$export$f5b8910cec6cf069, Ot as $c87311424ea30a05$export$6446a186d09e379e, P as $514c0188e459b4c0$export$5f1af8db9871e1d6, Pt as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, Q as $2baaea4c71418dea$export$294aa081a6c6f55d, Qt as ChevronRight, R as $01b77f81d0f07f68$export$75b6ee27786ba447, Rt as $d4ee10de306f2510$export$e58f029f0fbfdb29, S as DropdownMenuSubTrigger, St as $b4b717babfbb907b$export$4c063cf1350e6fed, T as Root$6, Tt as $e9faafb641e167db$export$90fc3a17d93f704c, U as $64fa3d84918910a7$export$4d86445c2cf5e3, Ut as $bdb11010cef70236$export$b4cc09c592e8fdb8, V as $64fa3d84918910a7$export$2881499e37b75b9a, Vt as $431fbd86ca7dc216$export$f21a1ffae260145a, W as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, Wt as $bdb11010cef70236$export$f680877a34711e37, X as capitalize_default, Xt as Pencil, Y as useNonce, Yt as Plus, Z as $d2e8511e6f209edf$export$e908e06f4b8e3402, Zt as Circle, _ as DropdownMenuLabel, _t as $f6c31cce2adf654f$export$45712eceda6fad21, a as Input, at as $319e236875307eab$export$a9b970dcc4ae71a9, b as DropdownMenuSub, bt as $9446cca9a3875146$export$7d15b64cf5a3a4c4, c as prettyEngineeringNumber, ct as $6c7bd7858deea686$export$cd11ab140839f11d, d as useDebounceControlledState, dt as $6db58dc88e78b024$export$2f817fcdc4b89ae0, et as $e5be200c675c3b3a$export$75ee7c75d68f5b0e, f as useDebouncedCallback, ft as $5b160d28a433310d$export$c17fa47878dc55b6, g as DropdownMenuItem, gt as $507fabe10e71c6fb$export$630ff653c5ada6a9, h as DropdownMenuGroup, ht as $3ad3f6e1647bc98d$export$80f3e147d781571c, i as DebouncedNumberInput, it as $e5be200c675c3b3a$export$fc1a364ae1f3ff10, j as $d3e0e05bdfcf66bd$export$c24727297075ec6a, jt as $c87311424ea30a05$export$a11b0059900ceec8, k as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, kt as $c87311424ea30a05$export$78551043582a6a98, l as prettyNumber, lt as $fca6afa0e843324b$export$87b761675e8eaa10, m as DropdownMenuContent, mt as $9ab94262bd0047c7$export$420e68273165f4ec, n as ErrorBoundary, nt as $e5be200c675c3b3a$export$aca958c65c314e6c, o as OnBlurredInput, ot as $f7dceffc5ad7768b$export$4e328f61c538687f, p as DropdownMenu, pt as $6179b936705e76d3$export$ae780daf29e6d456, q as $64fa3d84918910a7$export$ef03459518577ad4, qt as Trash, r as DebouncedInput, rt as $e5be200c675c3b3a$export$dad6ae84456c676a, s as NumberField, st as $701a24aa0da5b062$export$ea18c227d4417cc3, t as BulkEdit, tt as $e5be200c675c3b3a$export$a763b9476acd3eb, u as prettyScientificNumber, ut as $fca6afa0e843324b$export$f12b703ca79dfbb1, v as DropdownMenuPortal, vt as _class_private_field_init, w as Item$2, wt as $99facab73266f662$export$5add1d006293d136, x as DropdownMenuSubContent, xt as $458b0a5536c1a7cf$export$40bfa8c7b0832715, y as DropdownMenuSeparator, yt as $ae1eeba8b9eafd08$export$5165eccb35aaadb5, z as $01b77f81d0f07f68$export$b04be29aa201d4f5, zt as $f4e2df6bd15f8569$export$98658e8c59125e6a } from "./types-O1gHduIo.js";
13
+ import { S as CircleQuestionMark, _ as isUrl, a as AlertDescription, b as Deferred, c as toDate, d as millisecondsInHour, f as millisecondsInMinute, g as getRuntimeManager, h as asRemoteURL, i as Alert, l as constructFrom, m as millisecondsInWeek, n as useDeepCompareMemoize, o as AlertTitle, p as millisecondsInSecond, r as dequal, s as isValid$1, t as arrow, u as millisecondsInDay, v as require_cuid2, x as isWasm, y as isStaticNotebook } from "./formats-b5g0iERd.js";
14
14
  import { a as Slot$1, c as composeRefs, d as cn, f as clsx_default, i as useEventListener, l as useComposedRefs, n as buttonVariants, o as createSlot, r as cva, t as Button, u as Events } from "./button-B8zS4Mtw.js";
15
15
  import { c as Functions, i as parseShortcut, l as throwNotImplemented, o as Objects, r as isPlatformMac, s as Logger, t as NOT_SET } from "./hotkeys-DVxFjl2s.js";
16
16
  import { t as require_jsx_runtime } from "./jsx-runtime-CvL6gNI-.js";
17
17
  import { t as require_react_dom } from "./react-dom-BTjywDxo.js";
18
18
  import { a as Portal$2, c as Tooltip, d as TooltipProvider, f as TooltipRoot, i as Overlay, l as TooltipContent, m as TooltipProvider$1, n as ErrorBanner, o as Root$7, p as TooltipTrigger, r as Content$4, s as CellNotInitializedError, t as Banner, u as TooltipPortal } from "./error-banner-B7LmpmGT.js";
19
- import { a as _extends$5, c as setDiagnostics, d as CopyClipboardIcon, l as historyField, n as minimalSetup, o as forEachDiagnostic, r as langs, s as linter, t as esm_default, u as insertTab } from "./esm-CQIOyi5v.js";
19
+ import { a as _extends$5, c as historyField, l as insertTab, n as minimalSetup, o as forEachDiagnostic, r as langs, s as setDiagnostics, t as esm_default, u as CopyClipboardIcon } from "./esm-HxIp3fzy.js";
20
20
  import { t as purify } from "./purify.es-CDFkadZl.js";
21
- import { C as INTERNAL_buildStoreRev1, _ as useAtom, a as getResolvedMarimoConfig, b as useStore, c as AppConfigSchema, d as useJotaiEffect, f as waitFor, g as Provider, h as useEvent_default, i as autoInstantiateAtom, l as createDeepEqualAtom, m as isEqual_default, n as useTheme, o as localeAtom, p as isIslands, r as aiEnabledAtom, s as useResolvedMarimoConfig, t as resolvedThemeAtom, u as store, v as useAtomValue, w as INTERNAL_getBuildingBlocksRev1, x as atom, y as useSetAtom } from "./useTheme-D7vlj42b.js";
22
- import { $ as ViewPlugin, At as RangeSet, B as tags$1, Dt as Facet$1, E as getIndentUnit, Et as EditorState, Ft as Text$2, I as syntaxTree, It as Transaction, J as parseMixed, L as unfoldAll, Nt as StateEffect, Pt as StateField, Q as GutterMarker, S as foldInside, Tt as EditorSelection, Y as Decoration, Z as EditorView, _t as showPanel, b as foldAll, dt as keymap, et as WidgetType, f as StreamLanguage, kt as Prec, l as LanguageDescription, mt as placeholder, ot as gutter, u as LanguageSupport, ut as hoverTooltip, w as foldNodeProp, wt as Compartment } from "./dist-CBu8cgzz.js";
23
- import { d as snippet, n as acceptCompletion, o as closeCompletion, r as autocompletion, u as insertCompletionText } from "./dist-D08oiinq.js";
21
+ import { C as INTERNAL_getBuildingBlocksRev1, S as INTERNAL_buildStoreRev1, _ as useAtomValue, a as localeAtom, b as atom, c as createDeepEqualAtom, d as waitFor, f as isIslands, g as useAtom, h as Provider, i as getResolvedMarimoConfig, l as store, m as useEvent_default, n as aiEnabledAtom, o as useResolvedMarimoConfig, p as isEqual_default, r as autoInstantiateAtom, s as AppConfigSchema, t as useTheme, u as useJotaiEffect, v as useSetAtom, y as useStore } from "./useTheme-BzICL4qs.js";
22
+ import { $ as WidgetType, B as tags$1, Ct as EditorSelection, Dt as Prec, E as getIndentUnit, I as syntaxTree, J as parseMixed, L as unfoldAll, Mt as StateField, Nt as Text$2, Pt as Transaction, Q as ViewPlugin, S as foldInside, St as Compartment, Tt as Facet$1, Y as Decoration, Z as EditorView, b as foldAll, ct as hoverTooltip, f as StreamLanguage, ft as placeholder, ht as showPanel, jt as StateEffect, l as LanguageDescription, lt as keymap, u as LanguageSupport, w as foldNodeProp, wt as EditorState } from "./dist-t5bQPtMZ.js";
23
+ import { d as snippet, n as acceptCompletion, o as closeCompletion, r as autocompletion, u as insertCompletionText } from "./dist-BRfGeCYG.js";
24
24
  import { E as _baseRest_default, b as _baseTimes_default, t as isArrayLikeObject_default } from "./isArrayLikeObject-1qkWxZbL.js";
25
25
  import "./isSymbol-BnxbuvDK.js";
26
26
  import { n as _arrayMap_default } from "./toString-CT4n1k2E.js";
@@ -37,34 +37,34 @@ import "./_arrayReduce-CmsTTAw1.js";
37
37
  import "./now-8WTe-KKa.js";
38
38
  import { n as KnownQueryParams, r as debounce_default } from "./constants-BlvmN57i.js";
39
39
  import { a as tooltipHandler, n as vegaLoadData, r as createBatchedLoader, t as parseCsvData } from "./loader-Dj9XWZTh.js";
40
- import { A as literal, B as tuple, C as any, D as custom, E as boolean$2, F as object$1, G as toJSONSchema, H as unknown, I as optional, J as $ZodError, K as parse$3, L as record, M as nan, N as never, O as discriminatedUnion, P as number$2, R as strictObject, S as _null, T as base64, U as safeParseAsync, V as union, W as ZodError$1, Y as prettifyError, _ as ZodString$1, a as ZodIssueCode$1, b as _enum, c as ZodBoolean$1, d as ZodDiscriminatedUnion$1, f as ZodEnum$1, g as ZodOptional$1, h as ZodObject$1, i as string$3, j as looseObject, k as lazy$4, l as ZodDate$1, m as ZodNumber$1, n as date, o as ZodAny$1, p as ZodLiteral$1, q as parseAsync, r as number$3, s as ZodArray$1, t as zod_default, u as ZodDefault$1, v as ZodType$1, w as array$2, x as _instanceof, y as ZodUnion$1, z as string$2 } from "./zod-0AbTN3Cg.js";
40
+ import { A as literal, B as tuple, C as any, D as custom, E as boolean$2, F as object$1, G as toJSONSchema, H as unknown, I as optional, J as $ZodError, K as parse$3, L as record, M as nan, N as never, O as discriminatedUnion, P as number$2, R as strictObject, S as _null, T as base64, U as safeParseAsync, V as union, W as ZodError$1, Y as prettifyError, _ as ZodString$1, a as ZodIssueCode$1, b as _enum, c as ZodBoolean$1, d as ZodDiscriminatedUnion$1, f as ZodEnum$1, g as ZodOptional$1, h as ZodObject$1, i as string$3, j as looseObject, k as lazy$3, l as ZodDate$1, m as ZodNumber$1, n as date, o as ZodAny$1, p as ZodLiteral$1, q as parseAsync, r as number$3, s as ZodArray$1, t as zod_default, u as ZodDefault$1, v as ZodType$1, w as array$2, x as _instanceof, y as ZodUnion$1, z as string$2 } from "./zod-0AbTN3Cg.js";
41
41
  import { t as invariant } from "./invariant-Cl2wkkjN.js";
42
42
  import { a as arrayInsert, c as arrayShallowEquals, i as arrayDelete, l as uniqueBy, n as once, o as arrayInsertMany, r as Arrays, s as arrayMove, t as memoizeLastValue, u as clamp } from "./once-rI5AYku5.js";
43
43
  import { n as getIframeCapabilities, t as useIframeCapabilities } from "./useIframeCapabilities-B9u0SmJ4.js";
44
- import { i as markdown, o as markdownLanguage } from "./dist-C02gS--y.js";
45
- import "./dist-C5Ns3q-m.js";
46
- import "./dist-CxRajUZ6.js";
47
- import "./dist-B3CNaJau.js";
48
- import { a as parser, i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-D_GkrgWD.js";
44
+ import { i as markdown, o as markdownLanguage } from "./dist-Bevt_gzr.js";
45
+ import "./dist-Cf1Q6zai.js";
46
+ import "./dist-BXNAv-Y6.js";
47
+ import "./dist-BPwzuLH_.js";
48
+ import { a as parser, i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-qXlX_Isq.js";
49
49
  import { n as stexMath } from "./stex-BmcrV7cx.js";
50
50
  import { i as main_exports, r as init_main } from "./main-63eIj2Yx.js";
51
51
  import { t as marked } from "./marked.esm-DE8HU3tw.js";
52
- import { a as PLSQL, c as SQLite, d as schemaCompletionSource, f as sql, i as MySQL, l as StandardSQL, n as MSSQL, o as PostgreSQL, r as MariaSQL, s as SQLDialect, t as Cassandra, u as keywordCompletionSource } from "./dist-D4LUTYHc.js";
52
+ import { a as PLSQL, c as SQLite, d as schemaCompletionSource, f as sql, i as MySQL, l as StandardSQL, n as MSSQL, o as PostgreSQL, r as MariaSQL, s as SQLDialect, t as Cassandra, u as keywordCompletionSource } from "./dist-8IZEIZE_.js";
53
53
  import { n as memoize$1, t as isPropValid } from "./emotion-is-prop-valid.esm-Cm1uulbm.js";
54
54
  import { t as require_prop_types } from "./prop-types-CzOfzj9N.js";
55
- import { t as useAsyncData } from "./useAsyncData-Dp2V69OV.js";
56
- import "./dist-owpR56zn.js";
57
- import "./dist-CXimnGhI.js";
58
- import "./dist-DvsjKDQ4.js";
59
- import "./dist-BgsDu-bU.js";
60
- import "./dist-DiO9ni9a.js";
61
- import "./dist-DSDOMDNR.js";
62
- import "./dist-XkGsOiy0.js";
63
- import "./dist-DbHWFmjZ.js";
64
- import "./dist-DlSZED-1.js";
65
- import "./dist-HKzG1oF6.js";
66
- import "./dist-BMhv6XDi.js";
67
- import "./dist-8v4BI_h_.js";
55
+ import { t as useAsyncData } from "./useAsyncData-D8_fNj6a.js";
56
+ import "./dist-Ct4F6_s2.js";
57
+ import "./dist-C_BPvPwx.js";
58
+ import "./dist-DgnYtm7R.js";
59
+ import "./dist-CLkbwjpG.js";
60
+ import "./dist-Cba8uTcG.js";
61
+ import "./dist-C8SV9SiM.js";
62
+ import "./dist-CqG4DwQn.js";
63
+ import "./dist-Kh7kDIJB.js";
64
+ import "./dist-1NPzctn9.js";
65
+ import "./dist-CCFXVP1F.js";
66
+ import "./dist-CP1MdHH-.js";
67
+ import "./dist-BJKL0WEK.js";
68
68
  import "./apl-Css595_H.js";
69
69
  import "./asciiarmor-BTCuJwxh.js";
70
70
  import "./asn1-DXjhS5QI.js";
@@ -149,7 +149,7 @@ import "./xquery-BErHIIc-.js";
149
149
  import "./yacas-BBBJNs0h.js";
150
150
  import "./z80-nG9RRukG.js";
151
151
  import "./mscgen-DWWpdZnb.js";
152
- import "./dist-DTNqkRGE.js";
152
+ import "./dist-DG9oMdD2.js";
153
153
  import { n as formats } from "./vega-loader.browser-BK7-IO9k.js";
154
154
  import "./precisionRound-DMLkFNYv.js";
155
155
  import "./defaultLocale-BPzjWfXP.js";
@@ -12187,7 +12187,7 @@ ${c.join("\n")}`;
12187
12187
  combine: (e) => e[0]
12188
12188
  }), formattingChangeEffect = StateEffect.define();
12189
12189
  async function formatSQL(e) {
12190
- let { formatDialect: r, duckdb: c } = await import("./esm-CopBBL2y.js"), l = e.state.field(languageAdapterState), d = getIndentUnit(e.state);
12190
+ let { formatDialect: r, duckdb: c } = await import("./esm-CS8JKDQL.js"), l = e.state.field(languageAdapterState), d = getIndentUnit(e.state);
12191
12191
  if (l.type !== "sql") {
12192
12192
  Logger.error("Language adapter is not SQL");
12193
12193
  return;
@@ -20228,7 +20228,7 @@ ${c.join("\n")}`;
20228
20228
  return new LanguageSupport(StreamLanguage.define(e));
20229
20229
  }
20230
20230
  function sql$1(e) {
20231
- return import("./dist-DzKKEoge.js").then((r) => r.sql({
20231
+ return import("./dist-BGBHvY7x.js").then((r) => r.sql({
20232
20232
  dialect: r[e]
20233
20233
  }));
20234
20234
  }
@@ -20241,7 +20241,7 @@ ${c.join("\n")}`;
20241
20241
  "ino"
20242
20242
  ],
20243
20243
  load() {
20244
- return import("./dist-B9JCXzyv.js").then((e) => e.cpp());
20244
+ return import("./dist-BA1Ol0Yn.js").then((e) => e.cpp());
20245
20245
  }
20246
20246
  }),
20247
20247
  LanguageDescription.of({
@@ -20260,7 +20260,7 @@ ${c.join("\n")}`;
20260
20260
  "hxx"
20261
20261
  ],
20262
20262
  load() {
20263
- return import("./dist-B9JCXzyv.js").then((e) => e.cpp());
20263
+ return import("./dist-BA1Ol0Yn.js").then((e) => e.cpp());
20264
20264
  }
20265
20265
  }),
20266
20266
  LanguageDescription.of({
@@ -20281,7 +20281,7 @@ ${c.join("\n")}`;
20281
20281
  "css"
20282
20282
  ],
20283
20283
  load() {
20284
- return import("./dist-Dh7gw0Ay.js").then((e) => e.css());
20284
+ return import("./dist-CWyLmhAN.js").then((e) => e.css());
20285
20285
  }
20286
20286
  }),
20287
20287
  LanguageDescription.of({
@@ -20290,7 +20290,7 @@ ${c.join("\n")}`;
20290
20290
  "go"
20291
20291
  ],
20292
20292
  load() {
20293
- return import("./dist-qGpLTiEi.js").then((e) => e.go());
20293
+ return import("./dist-59eZyXwa.js").then((e) => e.go());
20294
20294
  }
20295
20295
  }),
20296
20296
  LanguageDescription.of({
@@ -20305,7 +20305,7 @@ ${c.join("\n")}`;
20305
20305
  "hbs"
20306
20306
  ],
20307
20307
  load() {
20308
- return import("./dist-DGKjHTv9.js").then((e) => e.html());
20308
+ return import("./dist-C1xRKkqR.js").then((e) => e.html());
20309
20309
  }
20310
20310
  }),
20311
20311
  LanguageDescription.of({
@@ -20314,7 +20314,7 @@ ${c.join("\n")}`;
20314
20314
  "java"
20315
20315
  ],
20316
20316
  load() {
20317
- return import("./dist-CFZ32udY.js").then((e) => e.java());
20317
+ return import("./dist-8Gr13wFT.js").then((e) => e.java());
20318
20318
  }
20319
20319
  }),
20320
20320
  LanguageDescription.of({
@@ -20330,7 +20330,7 @@ ${c.join("\n")}`;
20330
20330
  "cjs"
20331
20331
  ],
20332
20332
  load() {
20333
- return import("./dist-eSnWVS11.js").then((e) => e.javascript());
20333
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript());
20334
20334
  }
20335
20335
  }),
20336
20336
  LanguageDescription.of({
@@ -20343,7 +20343,7 @@ ${c.join("\n")}`;
20343
20343
  "map"
20344
20344
  ],
20345
20345
  load() {
20346
- return import("./dist-Cr6Cu8sC.js").then((e) => e.json());
20346
+ return import("./dist-DjH2J8yO.js").then((e) => e.json());
20347
20347
  }
20348
20348
  }),
20349
20349
  LanguageDescription.of({
@@ -20352,7 +20352,7 @@ ${c.join("\n")}`;
20352
20352
  "jsx"
20353
20353
  ],
20354
20354
  load() {
20355
- return import("./dist-eSnWVS11.js").then((e) => e.javascript({
20355
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript({
20356
20356
  jsx: true
20357
20357
  }));
20358
20358
  }
@@ -20363,7 +20363,7 @@ ${c.join("\n")}`;
20363
20363
  "less"
20364
20364
  ],
20365
20365
  load() {
20366
- return import("./dist-DGnWQOnS.js").then((e) => e.less());
20366
+ return import("./dist-Djl1P_Vh.js").then((e) => e.less());
20367
20367
  }
20368
20368
  }),
20369
20369
  LanguageDescription.of({
@@ -20372,7 +20372,7 @@ ${c.join("\n")}`;
20372
20372
  "liquid"
20373
20373
  ],
20374
20374
  load() {
20375
- return import("./dist-S2JcqPPB.js").then((e) => e.liquid());
20375
+ return import("./dist-MCqj0bEP.js").then((e) => e.liquid());
20376
20376
  }
20377
20377
  }),
20378
20378
  LanguageDescription.of({
@@ -20389,7 +20389,7 @@ ${c.join("\n")}`;
20389
20389
  "mkd"
20390
20390
  ],
20391
20391
  load() {
20392
- return import("./dist-7CqcJssH.js").then((e) => e.markdown());
20392
+ return import("./dist-BZrCuBDi.js").then((e) => e.markdown());
20393
20393
  }
20394
20394
  }),
20395
20395
  LanguageDescription.of({
@@ -20415,7 +20415,7 @@ ${c.join("\n")}`;
20415
20415
  "phtml"
20416
20416
  ],
20417
20417
  load() {
20418
- return import("./dist-C6QrJGYr.js").then((e) => e.php());
20418
+ return import("./dist-CbNrcsEy.js").then((e) => e.php());
20419
20419
  }
20420
20420
  }),
20421
20421
  LanguageDescription.of({
@@ -20443,7 +20443,7 @@ ${c.join("\n")}`;
20443
20443
  ],
20444
20444
  filename: /^(BUCK|BUILD)$/,
20445
20445
  load() {
20446
- return import("./dist-K_AqLCfS.js").then((e) => e.python());
20446
+ return import("./dist-DQOkkAzs.js").then((e) => e.python());
20447
20447
  }
20448
20448
  }),
20449
20449
  LanguageDescription.of({
@@ -20452,7 +20452,7 @@ ${c.join("\n")}`;
20452
20452
  "rs"
20453
20453
  ],
20454
20454
  load() {
20455
- return import("./dist-hcPlrsR9.js").then((e) => e.rust());
20455
+ return import("./dist-l9YJLCkC.js").then((e) => e.rust());
20456
20456
  }
20457
20457
  }),
20458
20458
  LanguageDescription.of({
@@ -20461,7 +20461,7 @@ ${c.join("\n")}`;
20461
20461
  "sass"
20462
20462
  ],
20463
20463
  load() {
20464
- return import("./dist-_tHnp24J.js").then((e) => e.sass({
20464
+ return import("./dist-CiMy2-5u.js").then((e) => e.sass({
20465
20465
  indented: true
20466
20466
  }));
20467
20467
  }
@@ -20472,7 +20472,7 @@ ${c.join("\n")}`;
20472
20472
  "scss"
20473
20473
  ],
20474
20474
  load() {
20475
- return import("./dist-_tHnp24J.js").then((e) => e.sass());
20475
+ return import("./dist-CiMy2-5u.js").then((e) => e.sass());
20476
20476
  }
20477
20477
  }),
20478
20478
  LanguageDescription.of({
@@ -20496,7 +20496,7 @@ ${c.join("\n")}`;
20496
20496
  "tsx"
20497
20497
  ],
20498
20498
  load() {
20499
- return import("./dist-eSnWVS11.js").then((e) => e.javascript({
20499
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript({
20500
20500
  jsx: true,
20501
20501
  typescript: true
20502
20502
  }));
@@ -20513,7 +20513,7 @@ ${c.join("\n")}`;
20513
20513
  "cts"
20514
20514
  ],
20515
20515
  load() {
20516
- return import("./dist-eSnWVS11.js").then((e) => e.javascript({
20516
+ return import("./dist-k6dhIy0O.js").then((e) => e.javascript({
20517
20517
  typescript: true
20518
20518
  }));
20519
20519
  }
@@ -20525,7 +20525,7 @@ ${c.join("\n")}`;
20525
20525
  "wast"
20526
20526
  ],
20527
20527
  load() {
20528
- return import("./dist-poXa8G8m.js").then((e) => e.wast());
20528
+ return import("./dist-DVuYVZws.js").then((e) => e.wast());
20529
20529
  }
20530
20530
  }),
20531
20531
  LanguageDescription.of({
@@ -20542,7 +20542,7 @@ ${c.join("\n")}`;
20542
20542
  "svg"
20543
20543
  ],
20544
20544
  load() {
20545
- return import("./dist-BYS0EtbC.js").then((e) => e.xml());
20545
+ return import("./dist-m4uUGntS.js").then((e) => e.xml());
20546
20546
  }
20547
20547
  }),
20548
20548
  LanguageDescription.of({
@@ -20555,7 +20555,7 @@ ${c.join("\n")}`;
20555
20555
  "yml"
20556
20556
  ],
20557
20557
  load() {
20558
- return import("./dist-NxHLuq7w.js").then((e) => e.yaml());
20558
+ return import("./dist-CoHj7yHI.js").then((e) => e.yaml());
20559
20559
  }
20560
20560
  }),
20561
20561
  LanguageDescription.of({
@@ -21663,13 +21663,13 @@ ${c.join("\n")}`;
21663
21663
  "vue"
21664
21664
  ],
21665
21665
  load() {
21666
- return import("./dist-CmgxQNWN.js").then((e) => e.vue());
21666
+ return import("./dist-CkXa7yhd.js").then((e) => e.vue());
21667
21667
  }
21668
21668
  }),
21669
21669
  LanguageDescription.of({
21670
21670
  name: "Angular Template",
21671
21671
  load() {
21672
- return import("./dist-CawOxmKh.js").then((e) => e.angular());
21672
+ return import("./dist-DKdtgJ4Q.js").then((e) => e.angular());
21673
21673
  }
21674
21674
  })
21675
21675
  ], cache$1 = /* @__PURE__ */ new WeakMap(), newline = /(\n|\r\n?|\u2028|\u2029)/g, leadingWhitespace = /^\s*/, nonWhitespace = /\S/, slice$1 = Array.prototype.slice, zero = 48, nine = 57, lowerA = 97, lowerF = 102, upperA = 65, upperF = 70;
@@ -21982,19 +21982,11 @@ ${g}
21982
21982
  }
21983
21983
  transformOut(e, r) {
21984
21984
  e === "" && (e = " ");
21985
- let { quotePrefix: c } = r, l = e.replaceAll('"""', String.raw`\"""`), d = !e.includes("\n"), f = e.startsWith('"') || e.endsWith('"');
21986
- if (d && !f) {
21987
- let e2 = `mo.md(${c}"""`;
21988
- return {
21989
- code: e2 + l + '""")',
21990
- offset: e2.length
21991
- };
21992
- }
21993
- let h = `mo.md(${c}"""
21985
+ let { quotePrefix: c } = r, l = e.replaceAll('""', String.raw`"\"`), d = `mo.md(${c}"""
21994
21986
  `;
21995
21987
  return {
21996
- code: h + l + '\n""")',
21997
- offset: h.length + 1
21988
+ code: d + l + '\n""")',
21989
+ offset: d.length + 1
21998
21990
  };
21999
21991
  }
22000
21992
  isSupported(e) {
@@ -30803,530 +30795,9 @@ ${JSON.stringify(e2, null, 4)}`);
30803
30795
  })
30804
30796
  ]);
30805
30797
  }
30806
- const lazy$3 = (e) => {
30807
- let r;
30808
- return async () => (r || (r = e()), await r);
30809
- };
30810
- var NodeSqlParser = class {
30811
- constructor(e = {}) {
30812
- __publicField(this, "opts");
30813
- __publicField(this, "parser", null);
30814
- __publicField(this, "offsetRecord", {});
30815
- __publicField(this, "getParser", lazy$3(async () => {
30816
- if (this.parser) return this.parser;
30817
- let e = await import("./node-sql-parser-IKID_dZE.js").then(__toDynamicImportESM(1)), { Parser: r } = e.default || e;
30818
- return this.parser = new r(), this.parser;
30819
- }));
30820
- this.opts = e;
30821
- }
30822
- async parse(e, r) {
30823
- var _a2, _b2;
30824
- this.offsetRecord = {};
30825
- let c = (_b2 = (_a2 = this.opts).getParserOptions) == null ? void 0 : _b2.call(_a2, r.state), l = await this.sanitizeSql(e, c);
30826
- try {
30827
- let e2 = await this.getParser();
30828
- return (c == null ? void 0 : c.database) === "DuckDB" ? this.parseWithDuckDBSupport(l, c) : {
30829
- success: true,
30830
- errors: [],
30831
- ast: e2.astify(l, c)
30832
- };
30833
- } catch (e2) {
30834
- return {
30835
- success: false,
30836
- errors: [
30837
- this.extractErrorInfo(e2, l)
30838
- ]
30839
- };
30840
- }
30841
- }
30842
- async sanitizeSql(e, r) {
30843
- if (r == null ? void 0 : r.ignoreBrackets) {
30844
- let { sql: r2, offsetRecord: c } = replaceBracketsWithQuotes(e);
30845
- return this.offsetRecord = c, r2;
30846
- }
30847
- return e;
30848
- }
30849
- async parseWithDuckDBSupport(e, r) {
30850
- let c = await this.getParser(), l = removeCommentsFromStart(e).trimStart().toLowerCase();
30851
- if (l.startsWith("from") || l.includes("macro")) return {
30852
- success: true,
30853
- errors: []
30854
- };
30855
- let d = e;
30856
- l.includes("create or replace table") && (this.offsetRecord[e.indexOf("create or replace table")] = -11, d = e.replace(/create or replace table/i, "create table"));
30857
- try {
30858
- let e2 = {
30859
- ...r,
30860
- database: "PostgreSQL"
30861
- };
30862
- return {
30863
- success: true,
30864
- errors: [],
30865
- ast: c.astify(d, e2)
30866
- };
30867
- } catch (r2) {
30868
- return {
30869
- success: false,
30870
- errors: [
30871
- this.extractErrorInfo(r2, e)
30872
- ]
30873
- };
30874
- }
30875
- }
30876
- extractErrorInfo(e, r) {
30877
- var _a2, _b2, _c2;
30878
- let c = 1, l = 1, d = (e == null ? void 0 : e.message) || "SQL parsing error", f = e;
30879
- if (f == null ? void 0 : f.location) c = ((_a2 = f.location.start) == null ? void 0 : _a2.line) || 1, l = ((_b2 = f.location.start) == null ? void 0 : _b2.column) || 1;
30880
- else if (f == null ? void 0 : f.hash) c = f.hash.line || 1, l = ((_c2 = f.hash.loc) == null ? void 0 : _c2.first_column) || 1;
30881
- else {
30882
- let e2 = d.match(/line (\d+)/i), r2 = d.match(/column (\d+)/i);
30883
- (e2 == null ? void 0 : e2[1]) && (c = parseInt(e2[1], 10)), (r2 == null ? void 0 : r2[1]) && (l = parseInt(r2[1], 10));
30884
- }
30885
- for (let [e2, r2] of Object.entries(this.offsetRecord)) l > parseInt(e2, 10) && (l -= r2);
30886
- return l > r.length && (l = r.length), {
30887
- message: this.cleanErrorMessage(d),
30888
- line: Math.max(1, c),
30889
- column: l,
30890
- severity: "error"
30891
- };
30892
- }
30893
- cleanErrorMessage(e) {
30894
- return e.replace(/^Error: /, "").replace(/Expected .* but .* found\./i, (e2) => e2.replace(/but .* found/, "found unexpected token")).trim();
30895
- }
30896
- async validateSql(e, r) {
30897
- return (await this.parse(e, r)).errors;
30898
- }
30899
- async extractTableReferences(e) {
30900
- try {
30901
- return (await this.getParser()).tableList(e).map((e2) => {
30902
- let r = e2.split("::");
30903
- return r[r.length - 1] || e2;
30904
- });
30905
- } catch {
30906
- return [];
30907
- }
30908
- }
30909
- async extractColumnReferences(e) {
30910
- try {
30911
- return (await this.getParser()).columnList(e).map((e2) => {
30912
- let r = e2.split("::");
30913
- return r[r.length - 1] || e2;
30914
- });
30915
- } catch {
30916
- return [];
30917
- }
30918
- }
30919
- };
30920
- function removeCommentsFromStart(e, r = [
30921
- "/*",
30922
- "--"
30923
- ]) {
30924
- let c = [];
30925
- if (r.includes("/*") && c.push("/\\*[\\s\\S]*?\\*/"), r.includes("--") && c.push("--[^\\n]*"), c.length === 0) return e;
30926
- let l = RegExp(`^\\s*(${c.join("|")})\\s*`, ""), d = e, f = "";
30927
- for (; d !== f; ) f = d, d = d.replace(l, "");
30928
- return d;
30929
- }
30930
- var QUOTE_LENGTH = 2;
30931
- function replaceBracketsWithQuotes(e) {
30932
- let r = {};
30933
- return {
30934
- sql: e.replace(/("(?:[^"\\]|\\.)*")|('(?:[^'\\]|\\.)*')|(\{[^}]*\})/g, (e2, c, l, d, f) => c || l ? e2 : d ? (r[f] = QUOTE_LENGTH, `'${d}'`) : e2),
30935
- offsetRecord: r
30936
- };
30937
- }
30938
- var DEFAULT_DELAY = 750;
30939
- function convertToCodeMirrorDiagnostic(e, r) {
30940
- let c = r.line(e.line).from + Math.max(0, e.column - 1);
30941
- return {
30942
- from: c,
30943
- to: c + 1,
30944
- severity: e.severity,
30945
- message: e.message,
30946
- source: "sql-parser"
30947
- };
30948
- }
30949
- function sqlLinter(e = {}) {
30950
- let r = e.parser || new NodeSqlParser();
30951
- return linter(async (e2) => {
30952
- let c = e2.state.doc, l = c.toString();
30953
- return l.trim() ? (await r.validateSql(l, {
30954
- state: e2.state
30955
- })).map((e3) => convertToCodeMirrorDiagnostic(e3, c)) : [];
30956
- }, {
30957
- delay: e.delay || DEFAULT_DELAY
30958
- });
30959
- }
30960
- function isObjectNamespace(e) {
30961
- return typeof e == "object" && !Array.isArray(e) && !("self" in e);
30962
- }
30963
- function isSelfChildrenNamespace(e) {
30964
- return typeof e == "object" && !Array.isArray(e) && "self" in e && "children" in e;
30965
- }
30966
30798
  function isArrayNamespace(e) {
30967
30799
  return Array.isArray(e);
30968
30800
  }
30969
- function determineSemanticType(e, r, c, l) {
30970
- let d = e.length;
30971
- if (r === "string" || r === "completion" && l && isArrayNamespace(l)) return "column";
30972
- if (r === "namespace" && c) {
30973
- if (isArrayNamespace(c)) return "table";
30974
- if (isObjectNamespace(c)) return Object.values(c).some((e2) => isArrayNamespace(e2) || isSelfChildrenNamespace(e2) && isArrayNamespace(e2.children)) ? d <= 1 ? "database" : "schema" : d === 0 ? "database" : "namespace";
30975
- }
30976
- if (r === "completion" && c) return isArrayNamespace(c) ? "table" : (isObjectNamespace(c) && Object.values(c).some((e2) => isArrayNamespace(e2) || isSelfChildrenNamespace(e2) && isArrayNamespace(e2.children)), d <= 1 ? "database" : "schema");
30977
- switch (d) {
30978
- case 0:
30979
- return "database";
30980
- case 1:
30981
- return "schema";
30982
- default:
30983
- return "namespace";
30984
- }
30985
- }
30986
- function traverseNamespacePath(e, r, c = {}) {
30987
- let { maxDepth: l = 10 } = c;
30988
- if (r === "" && isSelfChildrenNamespace(e)) {
30989
- let r2 = determineSemanticType([], "completion", e.children);
30990
- return {
30991
- completion: e.self,
30992
- path: [],
30993
- type: "completion",
30994
- semanticType: r2,
30995
- namespace: e.children
30996
- };
30997
- }
30998
- let d = r.split(".").filter((e2) => e2.length > 0);
30999
- return d.length === 0 || d.length > l ? null : traverseNamespaceRecursive(e, d, [], c);
31000
- }
31001
- function traverseNamespaceRecursive(e, r, c, l, d) {
31002
- if (r.length === 0) {
31003
- if (isSelfChildrenNamespace(e)) {
31004
- let r2 = determineSemanticType(c, "completion", e.children, d);
31005
- return {
31006
- completion: e.self,
31007
- path: c,
31008
- type: "completion",
31009
- semanticType: r2,
31010
- namespace: e.children
31011
- };
31012
- }
31013
- return {
31014
- path: c,
31015
- type: "namespace",
31016
- semanticType: determineSemanticType(c, "namespace", e, d),
31017
- namespace: e
31018
- };
31019
- }
31020
- let [f, ...h] = r, { caseSensitive: g = false } = l;
31021
- if (!f) return null;
31022
- if (isObjectNamespace(e)) {
31023
- let r2 = g ? Object.keys(e).find((e2) => e2 === f) : Object.keys(e).find((e2) => e2.toLowerCase() === f.toLowerCase());
31024
- if (r2) {
31025
- let d2 = e[r2];
31026
- if (d2) return traverseNamespaceRecursive(d2, h, [
31027
- ...c,
31028
- r2
31029
- ], l, e);
31030
- }
31031
- } else if (isSelfChildrenNamespace(e)) return traverseNamespaceRecursive(e.children, r, c, l, e);
31032
- else if (isArrayNamespace(e)) {
31033
- for (let r2 of e) if (typeof r2 == "string") {
31034
- if ((g ? r2 === f : r2.toLowerCase() === f.toLowerCase()) && h.length === 0) {
31035
- let l2 = determineSemanticType([
31036
- ...c,
31037
- r2
31038
- ], "string", void 0, e);
31039
- return {
31040
- value: r2,
31041
- path: [
31042
- ...c,
31043
- r2
31044
- ],
31045
- type: "string",
31046
- semanticType: l2
31047
- };
31048
- }
31049
- } else if ((g ? r2.label === f : r2.label.toLowerCase() === f.toLowerCase()) && h.length === 0) {
31050
- let l2 = determineSemanticType([
31051
- ...c,
31052
- r2.label
31053
- ], "completion", void 0, e);
31054
- return {
31055
- completion: r2,
31056
- path: [
31057
- ...c,
31058
- r2.label
31059
- ],
31060
- type: "completion",
31061
- semanticType: l2
31062
- };
31063
- }
31064
- }
31065
- return null;
31066
- }
31067
- function findNamespaceCompletions(e, r, c = {}) {
31068
- let l = [];
31069
- if (r.includes(".")) {
31070
- let l2 = r.lastIndexOf("."), d = r.substring(0, l2), f = r.substring(l2 + 1), h = traverseNamespacePath(e, d, c);
31071
- if (h == null ? void 0 : h.namespace) return findCompletionsInNamespace(h.namespace, f, h.path, c);
31072
- } else return findCompletionsInNamespace(e, r, [], c);
31073
- return l;
31074
- }
31075
- function findCompletionsInNamespace(e, r, c, l) {
31076
- let d = [], { caseSensitive: f = false, allowPartialMatch: h = true } = l;
31077
- if (isObjectNamespace(e)) {
31078
- for (let [l2, g] of Object.entries(e)) if (h ? f ? l2.startsWith(r) : l2.toLowerCase().startsWith(r.toLowerCase()) : f ? l2 === r : l2.toLowerCase() === r.toLowerCase()) if (isSelfChildrenNamespace(g)) {
31079
- let r2 = determineSemanticType([
31080
- ...c,
31081
- l2
31082
- ], "completion", g.children, e);
31083
- d.push({
31084
- completion: g.self,
31085
- path: [
31086
- ...c,
31087
- l2
31088
- ],
31089
- type: "completion",
31090
- semanticType: r2,
31091
- namespace: g.children
31092
- });
31093
- } else {
31094
- let r2 = determineSemanticType([
31095
- ...c,
31096
- l2
31097
- ], "namespace", g, e);
31098
- d.push({
31099
- path: [
31100
- ...c,
31101
- l2
31102
- ],
31103
- type: "namespace",
31104
- semanticType: r2,
31105
- namespace: g
31106
- });
31107
- }
31108
- } else if (isSelfChildrenNamespace(e)) {
31109
- if (h ? f ? e.self.label.startsWith(r) : e.self.label.toLowerCase().startsWith(r.toLowerCase()) : f ? e.self.label === r : e.self.label.toLowerCase() === r.toLowerCase()) {
31110
- let r2 = determineSemanticType([
31111
- ...c,
31112
- e.self.label
31113
- ], "completion", e.children);
31114
- d.push({
31115
- completion: e.self,
31116
- path: [
31117
- ...c,
31118
- e.self.label
31119
- ],
31120
- type: "completion",
31121
- semanticType: r2,
31122
- namespace: e.children
31123
- });
31124
- }
31125
- d.push(...findCompletionsInNamespace(e.children, r, c, l));
31126
- } else if (isArrayNamespace(e)) {
31127
- for (let l2 of e) if (typeof l2 == "string") {
31128
- if (h ? f ? l2.startsWith(r) : l2.toLowerCase().startsWith(r.toLowerCase()) : f ? l2 === r : l2.toLowerCase() === r.toLowerCase()) {
31129
- let r2 = determineSemanticType([
31130
- ...c,
31131
- l2
31132
- ], "string", void 0, e);
31133
- d.push({
31134
- value: l2,
31135
- path: [
31136
- ...c,
31137
- l2
31138
- ],
31139
- type: "string",
31140
- semanticType: r2
31141
- });
31142
- }
31143
- } else if (h ? f ? l2.label.startsWith(r) : l2.label.toLowerCase().startsWith(r.toLowerCase()) : f ? l2.label === r : l2.label.toLowerCase() === r.toLowerCase()) {
31144
- let r2 = determineSemanticType([
31145
- ...c,
31146
- l2.label
31147
- ], "completion", void 0, e);
31148
- d.push({
31149
- completion: l2,
31150
- path: [
31151
- ...c,
31152
- l2.label
31153
- ],
31154
- type: "completion",
31155
- semanticType: r2
31156
- });
31157
- }
31158
- }
31159
- return d;
31160
- }
31161
- function findNamespaceItemByEndMatch(e, r, c = {}) {
31162
- let l = [], { maxDepth: d = 10 } = c;
31163
- collectAllItems(e, [], l, d);
31164
- let { caseSensitive: f = false } = c;
31165
- return l.filter((e2) => e2.path.some((e3) => f ? e3 === r : e3.toLowerCase() === r.toLowerCase())).sort((e2, c2) => {
31166
- var _a2, _b2;
31167
- let l2 = f ? e2.path[e2.path.length - 1] === r : ((_a2 = e2.path[e2.path.length - 1]) == null ? void 0 : _a2.toLowerCase()) === r.toLowerCase(), d2 = f ? c2.path[c2.path.length - 1] === r : ((_b2 = c2.path[c2.path.length - 1]) == null ? void 0 : _b2.toLowerCase()) === r.toLowerCase();
31168
- return l2 && !d2 ? -1 : !l2 && d2 ? 1 : e2.path.length - c2.path.length;
31169
- });
31170
- }
31171
- function collectAllItems(e, r, c, l) {
31172
- if (!(r.length >= l)) {
31173
- if (isObjectNamespace(e)) for (let [d, f] of Object.entries(e)) {
31174
- let h = [
31175
- ...r,
31176
- d
31177
- ];
31178
- if (isSelfChildrenNamespace(f)) {
31179
- let r2 = determineSemanticType(h, "completion", f.children, e);
31180
- c.push({
31181
- completion: f.self,
31182
- path: h,
31183
- type: "completion",
31184
- semanticType: r2,
31185
- namespace: f.children
31186
- }), collectAllItems(f.children, h, c, l);
31187
- } else {
31188
- let r2 = determineSemanticType(h, "namespace", f, e);
31189
- c.push({
31190
- path: h,
31191
- type: "namespace",
31192
- semanticType: r2,
31193
- namespace: f
31194
- }), collectAllItems(f, h, c, l);
31195
- }
31196
- }
31197
- else if (isSelfChildrenNamespace(e)) {
31198
- let d = determineSemanticType(r, "completion", e.children);
31199
- c.push({
31200
- completion: e.self,
31201
- path: r,
31202
- type: "completion",
31203
- semanticType: d,
31204
- namespace: e.children
31205
- }), collectAllItems(e.children, r, c, l);
31206
- } else if (isArrayNamespace(e)) for (let l2 of e) if (typeof l2 == "string") {
31207
- let d = determineSemanticType([
31208
- ...r,
31209
- l2
31210
- ], "string", void 0, e);
31211
- c.push({
31212
- value: l2,
31213
- path: [
31214
- ...r,
31215
- l2
31216
- ],
31217
- type: "string",
31218
- semanticType: d
31219
- });
31220
- } else {
31221
- let d = determineSemanticType([
31222
- ...r,
31223
- l2.label
31224
- ], "completion", void 0, e);
31225
- c.push({
31226
- completion: l2,
31227
- path: [
31228
- ...r,
31229
- l2.label
31230
- ],
31231
- type: "completion",
31232
- semanticType: d
31233
- });
31234
- }
31235
- }
31236
- }
31237
- function resolveNamespaceItem(e, r, c = {}) {
31238
- let { enableFuzzySearch: l = false } = c, d = traverseNamespacePath(e, r, c);
31239
- if (d) return d;
31240
- let f = findNamespaceCompletions(e, r, c);
31241
- if (f.length > 0) return f[0] || null;
31242
- if (l) {
31243
- let l2 = findNamespaceItemByEndMatch(e, r, c);
31244
- if (l2.length > 0) return l2[0] || null;
31245
- }
31246
- return null;
31247
- }
31248
- function filterSchemaByTableRefs(e, r) {
31249
- if (r.size === 0) return {};
31250
- if (isObjectNamespace(e)) {
31251
- let c = {};
31252
- for (let [l, d] of Object.entries(e)) if (Array.from(r).some((e2) => e2.toLowerCase() === l.toLowerCase())) c[l] = d;
31253
- else if (isObjectNamespace(d)) {
31254
- let e2 = filterSchemaByTableRefs(d, r);
31255
- Object.keys(e2).length > 0 && (c[l] = e2);
31256
- }
31257
- return c;
31258
- }
31259
- return e;
31260
- }
31261
- function sqlHover(e = {}) {
31262
- let { schema: r = {}, keywords: c = {}, hoverTime: l = 300, enableKeywords: d = true, enableTables: f = true, enableColumns: h = true, enableFuzzySearch: g = true, parser: _ = new NodeSqlParser(), tooltipRender: y, tooltipRenderers: b = {} } = e, S = null;
31263
- return hoverTooltip(async (e2, l2, w) => {
31264
- let { from: D, to: P, text: F } = e2.state.doc.lineAt(l2), R = l2, z = l2;
31265
- S === null && (S = typeof c == "function" ? c(e2) : Promise.resolve(c));
31266
- let H = await S;
31267
- for (; R > D && /[\w.]/.test(F[R - D - 1] ?? ""); ) R--;
31268
- for (; z < P && /[\w.]/.test(F[z - D] ?? ""); ) z++;
31269
- if (R === l2 && w < 0 || z === l2 && w > 0) return null;
31270
- let Q = F.slice(R - D, z - D).toLowerCase();
31271
- if (!Q || Q.length === 0) return null;
31272
- let iX = typeof r == "function" ? r(e2) : r, aX = null;
31273
- if (`${Q}`, !aX && d && H[Q] && (H[Q], aX = {
31274
- word: Q,
31275
- view: e2,
31276
- pos: l2,
31277
- tooltipType: "keyword",
31278
- keywordData: {
31279
- keyword: Q,
31280
- info: H[Q]
31281
- }
31282
- }), !aX && (f || h) && iX) {
31283
- let r2 = e2.state.doc.toString(), c2 = await _.extractTableReferences(r2), d2 = new Set(c2.map((e3) => e3.toLowerCase())), f2 = filterSchemaByTableRefs(iX, d2), h2 = resolveNamespaceItem(f2, Q, {
31284
- enableFuzzySearch: g
31285
- });
31286
- !h2 && d2.size === 0 && (h2 = resolveNamespaceItem(iX, Q, {
31287
- enableFuzzySearch: g
31288
- })), h2 && (Array.from(d2), aX = {
31289
- word: Q,
31290
- view: e2,
31291
- pos: l2,
31292
- tooltipType: "namespace",
31293
- namespaceData: {
31294
- item: h2,
31295
- word: Q,
31296
- resolvedSchema: d2.size > 0 ? f2 : iX
31297
- }
31298
- });
31299
- }
31300
- return aX ? {
31301
- pos: R,
31302
- end: z,
31303
- above: true,
31304
- create(e3) {
31305
- if (y) {
31306
- let r3 = y(Q, e3, l2);
31307
- if (r3) return {
31308
- dom: r3
31309
- };
31310
- }
31311
- let r2 = null;
31312
- if (aX.tooltipType === "keyword" && aX.keywordData) r2 = b.keyword ? b.keyword(aX.keywordData) : createKeywordTooltip(aX.keywordData);
31313
- else if (aX.tooltipType === "namespace" && aX.namespaceData) {
31314
- let e4 = aX.namespaceData, { semanticType: c3 } = e4.item;
31315
- r2 = c3 === "table" && b.table ? b.table(e4) : c3 === "column" && b.column ? b.column(e4) : (c3 === "database" || c3 === "schema" || c3 === "namespace") && b.namespace ? b.namespace(e4) : createNamespaceTooltip(e4.item);
31316
- }
31317
- if (!r2) return {
31318
- dom: document.createElement("div")
31319
- };
31320
- let c2 = document.createElement("div");
31321
- return c2.className = "cm-sql-hover-tooltip", c2.innerHTML = r2, {
31322
- dom: c2
31323
- };
31324
- }
31325
- } : null;
31326
- }, {
31327
- hoverTime: l
31328
- });
31329
- }
31330
30801
  function createNamespaceTooltip(e) {
31331
30802
  var _a2, _b2, _c2, _d2, _e3, _f, _g;
31332
30803
  let r = e.path.join("."), c = ((_a2 = e.completion) == null ? void 0 : _a2.label) || e.value || e.path[e.path.length - 1] || "unknown", l = `<div class="sql-hover-${e.semanticType}">`;
@@ -31422,386 +30893,7 @@ ${JSON.stringify(e2, null, 4)}`);
31422
30893
  table: createTableTooltip,
31423
30894
  column: createColumnTooltip,
31424
30895
  namespace: createNamespaceTooltip
31425
- }, defaultSqlHoverTheme = (e = "light") => {
31426
- let r = e === "dark" ? {
31427
- tooltipBg: "#1f2937",
31428
- tooltipBorder: "#374151",
31429
- tooltipText: "#f9fafb",
31430
- tooltipTypeBg: "#374151",
31431
- tooltipTypeText: "#9ca3af",
31432
- tooltipChildren: "#9ca3af",
31433
- codeBg: "#374151",
31434
- codeText: "#f3f4f6",
31435
- strong: "#ffffff",
31436
- em: "#9ca3af",
31437
- header: "#ffffff",
31438
- info: "#d1d5db",
31439
- related: "#d1d5db",
31440
- path: "#d1d5db",
31441
- example: "#d1d5db",
31442
- columns: "#d1d5db",
31443
- syntax: "#d1d5db"
31444
- } : {
31445
- tooltipBg: "#ffffff",
31446
- tooltipBorder: "#e5e7eb",
31447
- tooltipText: "#374151",
31448
- tooltipTypeBg: "#f3f4f6",
31449
- tooltipTypeText: "#6b7280",
31450
- tooltipChildren: "#6b7280",
31451
- codeBg: "#f9fafb",
31452
- codeText: "#1f2937",
31453
- strong: "#111827",
31454
- em: "#6b7280",
31455
- header: "#111827",
31456
- info: "#374151",
31457
- related: "#374151",
31458
- path: "#374151",
31459
- example: "#374151",
31460
- columns: "#374151",
31461
- syntax: "#374151"
31462
- };
31463
- return EditorView.theme({
31464
- ".cm-sql-hover-tooltip": {
31465
- padding: "8px 12px",
31466
- backgroundColor: r.tooltipBg,
31467
- border: `1px solid ${r.tooltipBorder}`,
31468
- borderRadius: "6px",
31469
- boxShadow: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
31470
- fontSize: "13px",
31471
- lineHeight: "1.4",
31472
- maxWidth: "320px",
31473
- fontFamily: "system-ui, -apple-system, sans-serif",
31474
- color: r.tooltipText
31475
- },
31476
- ".cm-sql-hover-tooltip .sql-hover-header": {
31477
- marginBottom: "6px",
31478
- display: "flex",
31479
- alignItems: "center",
31480
- gap: "6px",
31481
- color: r.header
31482
- },
31483
- ".cm-sql-hover-tooltip .sql-hover-type": {
31484
- fontSize: "11px",
31485
- padding: "2px 6px",
31486
- backgroundColor: r.tooltipTypeBg,
31487
- color: r.tooltipTypeText,
31488
- borderRadius: "4px",
31489
- fontWeight: "500"
31490
- },
31491
- ".cm-sql-hover-tooltip .sql-hover-description": {
31492
- color: r.info,
31493
- marginBottom: "8px"
31494
- },
31495
- ".cm-sql-hover-tooltip .sql-hover-syntax": {
31496
- marginBottom: "8px",
31497
- color: r.syntax
31498
- },
31499
- ".cm-sql-hover-tooltip .sql-hover-example": {
31500
- marginBottom: "4px",
31501
- color: r.example
31502
- },
31503
- ".cm-sql-hover-tooltip .sql-hover-columns": {
31504
- marginBottom: "4px",
31505
- color: r.columns
31506
- },
31507
- ".cm-sql-hover-tooltip .sql-hover-related": {
31508
- marginBottom: "4px",
31509
- color: r.related
31510
- },
31511
- ".cm-sql-hover-tooltip .sql-hover-path": {
31512
- marginBottom: "4px",
31513
- color: r.path
31514
- },
31515
- ".cm-sql-hover-tooltip .sql-hover-info": {
31516
- marginBottom: "4px",
31517
- color: r.info
31518
- },
31519
- ".cm-sql-hover-tooltip .sql-hover-children": {
31520
- marginBottom: "4px",
31521
- color: r.tooltipChildren,
31522
- fontSize: "12px"
31523
- },
31524
- ".cm-sql-hover-tooltip code": {
31525
- backgroundColor: r.codeBg,
31526
- padding: "1px 4px",
31527
- borderRadius: "3px",
31528
- fontSize: "12px",
31529
- fontFamily: "ui-monospace, 'SF Mono', 'Monaco', 'Cascadia Code', 'Roboto Mono', monospace",
31530
- color: r.codeText
31531
- },
31532
- ".cm-sql-hover-tooltip strong": {
31533
- fontWeight: "600",
31534
- color: r.strong
31535
- },
31536
- ".cm-sql-hover-tooltip em": {
31537
- fontStyle: "italic",
31538
- color: r.em
31539
- }
31540
- });
31541
- };
31542
- var SqlStructureAnalyzer = class {
31543
- constructor(e) {
31544
- __publicField(this, "parser");
31545
- __publicField(this, "cache", /* @__PURE__ */ new Map());
31546
- __publicField(this, "MAX_CACHE_SIZE", 10);
31547
- this.parser = e;
31548
- }
31549
- async analyzeDocument(e) {
31550
- let r = e.doc.toString(), c = this.generateCacheKey(r), l = this.cache.get(c);
31551
- if (l) return l;
31552
- let d = await this.extractStatements(r, e);
31553
- if (this.cache.set(c, d), this.cache.size > this.MAX_CACHE_SIZE) {
31554
- let e2 = this.cache.keys().next().value;
31555
- e2 !== void 0 && this.cache.delete(e2);
31556
- }
31557
- return d;
31558
- }
31559
- async getStatementAtPosition(e, r) {
31560
- return (await this.analyzeDocument(e)).find((e2) => r >= e2.from && r <= e2.to) || null;
31561
- }
31562
- async getStatementsInRange(e, r, c) {
31563
- return (await this.analyzeDocument(e)).filter((e2) => e2.from <= c && e2.to >= r);
31564
- }
31565
- async extractStatements(e, r) {
31566
- let c = [], l = this.splitByStatementSeparators(e), d = 0;
31567
- for (let e2 of l) {
31568
- let l2 = e2.trim();
31569
- if (l2.length === 0) {
31570
- d += e2.length;
31571
- continue;
31572
- }
31573
- let f = d + e2.indexOf(l2), h = f + l2.length, g = r.doc.lineAt(f), _ = r.doc.lineAt(h), y = this.stripComments(l2);
31574
- if (y.trim().length === 0 || y.trim() === ";") {
31575
- d += e2.length;
31576
- continue;
31577
- }
31578
- let b = await this.parser.parse(y, {
31579
- state: r
31580
- }), S = this.determineStatementType(y), w = y.endsWith(";") ? y.slice(0, -1).trim() : y.trim();
31581
- c.push({
31582
- from: f,
31583
- to: h,
31584
- lineFrom: g.number,
31585
- lineTo: _.number,
31586
- content: w,
31587
- type: S,
31588
- isValid: b.success
31589
- }), d += e2.length;
31590
- }
31591
- return c;
31592
- }
31593
- splitByStatementSeparators(e) {
31594
- let r = [], c = "", l = false, d = "", f = false, h = false, g = 0;
31595
- for (; g < e.length; ) {
31596
- let _ = e[g], y = e[g + 1];
31597
- if (!l && !h && _ === "-" && y === "-") {
31598
- f = true, c += _ + y, g += 2;
31599
- continue;
31600
- }
31601
- if (!l && !f && _ === "/" && y === "*") {
31602
- h = true, c += _ + y, g += 2;
31603
- continue;
31604
- }
31605
- if (h && _ === "*" && y === "/") {
31606
- h = false, c += _ + y, g += 2;
31607
- continue;
31608
- }
31609
- if (f && (_ === "\n" || _ === "\r")) {
31610
- f = false, c += _, g++;
31611
- continue;
31612
- }
31613
- if (f || h) {
31614
- c += _, g++;
31615
- continue;
31616
- }
31617
- if (!l && (_ === "'" || _ === '"' || _ === "`")) l = true, d = _, c += _;
31618
- else if (l && _ === d) {
31619
- if (y === d) {
31620
- c += _ + y, g += 2;
31621
- continue;
31622
- }
31623
- l = false, d = "", c += _;
31624
- } else !l && _ === ";" ? (c += _, r.push(c), c = "") : c += _;
31625
- g++;
31626
- }
31627
- return c.trim() && r.push(c), r;
31628
- }
31629
- determineStatementType(e) {
31630
- let r = e.trim().toLowerCase();
31631
- return r.startsWith("select") ? "select" : r.startsWith("insert") ? "insert" : r.startsWith("update") ? "update" : r.startsWith("delete") ? "delete" : r.startsWith("create") ? "create" : r.startsWith("drop") ? "drop" : r.startsWith("alter") ? "alter" : r.startsWith("use") ? "use" : "other";
31632
- }
31633
- stripComments(e) {
31634
- let r = "", c = false, l = "", d = false, f = false, h = 0;
31635
- for (; h < e.length; ) {
31636
- let g = e[h], _ = e[h + 1];
31637
- if (!c && !f && g === "-" && _ === "-") {
31638
- d = true, h += 2;
31639
- continue;
31640
- }
31641
- if (!c && !d && g === "/" && _ === "*") {
31642
- f = true, h += 2;
31643
- continue;
31644
- }
31645
- if (f && g === "*" && _ === "/") {
31646
- f = false, h += 2;
31647
- continue;
31648
- }
31649
- if (d && (g === "\n" || g === "\r")) {
31650
- d = false, r += g, h++;
31651
- continue;
31652
- }
31653
- if (d || f) {
31654
- h++;
31655
- continue;
31656
- }
31657
- if (!c && (g === "'" || g === '"' || g === "`")) c = true, l = g, r += g;
31658
- else if (c && g === l) {
31659
- if (_ === l) {
31660
- r += g + _, h += 2;
31661
- continue;
31662
- }
31663
- c = false, l = "", r += g;
31664
- } else r += g;
31665
- h++;
31666
- }
31667
- return r;
31668
- }
31669
- generateCacheKey(e) {
31670
- let r = 0;
31671
- for (let c = 0; c < e.length; c++) {
31672
- let l = e.charCodeAt(c);
31673
- r = (r << 5) - r + l, r &= r;
31674
- }
31675
- return r.toString();
31676
- }
31677
- clearCache() {
31678
- this.cache.clear();
31679
- }
31680
- }, updateSqlStatementsEffect = StateEffect.define(), sqlGutterStateField = StateField.define({
31681
- create() {
31682
- return {
31683
- currentStatement: null,
31684
- allStatements: [],
31685
- cursorPosition: 0,
31686
- isFocused: true
31687
- };
31688
- },
31689
- update(e, r) {
31690
- for (let e2 of r.effects) if (e2.is(updateSqlStatementsEffect)) return e2.value;
31691
- return e;
31692
- }
31693
- }), SqlGutterMarker = class extends GutterMarker {
31694
- constructor(e, r, c = true, l = true) {
31695
- super();
31696
- __publicField(this, "config");
31697
- __publicField(this, "isCurrent");
31698
- __publicField(this, "isValid");
31699
- __publicField(this, "isFocused");
31700
- this.config = e, this.isCurrent = r, this.isValid = c, this.isFocused = l;
31701
- }
31702
- toDOM() {
31703
- let e = document.createElement("div");
31704
- e.className = "cm-sql-gutter-marker";
31705
- let r = this.config.backgroundColor || "#3b82f6";
31706
- !this.isValid && this.config.showInvalid !== false && (r = this.config.errorBackgroundColor || "#ef4444");
31707
- let c;
31708
- return c = this.isFocused ? this.isCurrent ? "1" : (this.config.inactiveOpacity || "0.3").toString() : this.config.unfocusedOpacity === void 0 ? this.config.hideWhenNotFocused ? "0" : this.isCurrent ? "1" : (this.config.inactiveOpacity || "0.3").toString() : this.config.unfocusedOpacity.toString(), e.style.cssText = `
31709
- background: ${r};
31710
- height: 100%;
31711
- width: 100%;
31712
- opacity: ${c};
31713
- transition: opacity 150ms ease-in-out;
31714
- border-radius: 1px;
31715
- `, e;
31716
- }
31717
- eq(e) {
31718
- return this.isCurrent === e.isCurrent && this.isValid === e.isValid && this.isFocused === e.isFocused && this.config === e.config;
31719
- }
31720
30896
  };
31721
- function createSqlGutterMarkers(e, r) {
31722
- var _a2;
31723
- let c = RangeSet.empty;
31724
- if ((_a2 = r.whenHide) == null ? void 0 : _a2.call(r, e)) return c;
31725
- let l = e.state.field(sqlGutterStateField, false);
31726
- if (!l) return c;
31727
- let { currentStatement: d, allStatements: f, isFocused: h } = l;
31728
- try {
31729
- for (let l2 of f) {
31730
- let f2 = (d == null ? void 0 : d.from) === l2.from && (d == null ? void 0 : d.to) === l2.to;
31731
- if (!l2.isValid && r.showInvalid === false) continue;
31732
- let g = new SqlGutterMarker(r, f2, l2.isValid, h);
31733
- for (let r2 = l2.lineFrom; r2 <= l2.lineTo; r2++) try {
31734
- if (r2 < 1 || r2 > e.state.doc.lines) continue;
31735
- let l3 = e.state.doc.line(r2);
31736
- c = c.update({
31737
- add: [
31738
- g.range(l3.from)
31739
- ]
31740
- });
31741
- } catch (e2) {
31742
- console.warn("SqlGutter: Invalid line number", r2, e2);
31743
- }
31744
- }
31745
- } catch (e2) {
31746
- console.warn("SqlGutter: Error creating markers", e2);
31747
- }
31748
- return c;
31749
- }
31750
- function createUpdateListener(e) {
31751
- return EditorView.updateListener.of(async (r) => {
31752
- if (!r.docChanged && !r.selectionSet && !r.focusChanged) return;
31753
- let { state: c } = r.view, { main: l } = c.selection, d = l.head, f = await e.analyzeDocument(c), h = {
31754
- currentStatement: await e.getStatementAtPosition(c, d),
31755
- allStatements: f,
31756
- cursorPosition: d,
31757
- isFocused: r.view.hasFocus
31758
- };
31759
- r.view.dispatch({
31760
- effects: updateSqlStatementsEffect.of(h)
31761
- });
31762
- });
31763
- }
31764
- function createGutterTheme(e) {
31765
- let r = e.width || 3;
31766
- return EditorView.baseTheme({
31767
- ".cm-sql-gutter": {
31768
- width: `${r}px`,
31769
- minWidth: `${r}px`
31770
- },
31771
- ".cm-sql-gutter .cm-gutterElement": {
31772
- width: `${r}px`,
31773
- padding: "0",
31774
- margin: "0"
31775
- },
31776
- ".cm-sql-gutter-marker": {
31777
- width: "100%",
31778
- height: "100%",
31779
- display: "block"
31780
- },
31781
- ".cm-lineNumbers .cm-gutterElement": {
31782
- paddingLeft: "8px",
31783
- paddingRight: "8px"
31784
- }
31785
- });
31786
- }
31787
- function createSqlGutter(e) {
31788
- return gutter({
31789
- class: `cm-sql-gutter ${e.className || ""}`,
31790
- markers: (r) => createSqlGutterMarkers(r, e)
31791
- });
31792
- }
31793
- function sqlStructureGutter(e = {}) {
31794
- return [
31795
- sqlGutterStateField,
31796
- createUpdateListener(new SqlStructureAnalyzer(e.parser || new NodeSqlParser())),
31797
- createGutterTheme(e),
31798
- createSqlGutter(e)
31799
- ];
31800
- }
31801
- function sqlExtension(e = {}) {
31802
- let r = [], { enableLinting: c = true, enableGutterMarkers: l = true, enableHover: d = true, linterConfig: f, gutterConfig: h, hoverConfig: g } = e;
31803
- return c && r.push(sqlLinter(f)), l && r.push(sqlStructureGutter(h)), d && (r.push(sqlHover(g)), (g == null ? void 0 : g.theme) ? r.push(g.theme) : r.push(defaultSqlHoverTheme())), r;
31804
- }
31805
30897
  var BigQuery = {
31806
30898
  ...PostgreSQL,
31807
30899
  caseInsensitiveIdentifiers: true,
@@ -33128,7 +32220,7 @@ ${JSON.stringify(e2, null, 4)}`);
33128
32220
  function getSQLMode() {
33129
32221
  return store.get(sqlModeAtom);
33130
32222
  }
33131
- var DEFAULT_DIALECT = DuckDBDialect, DEFAULT_PARSER_DIALECT = "DuckDB", sqlConfigCompartment = new Compartment();
32223
+ var DEFAULT_DIALECT = DuckDBDialect, sqlConfigCompartment = new Compartment();
33132
32224
  function getLatestEngine() {
33133
32225
  return store.get(dataSourceConnectionsAtom).latestEngineSelected;
33134
32226
  }
@@ -33168,7 +32260,6 @@ ${JSON.stringify(e2, null, 4)}`);
33168
32260
  return this.parser.isSupported(e);
33169
32261
  }
33170
32262
  getExtension(e, r, c, l, d) {
33171
- var _a2;
33172
32263
  let f = [
33173
32264
  sqlConfigCompartment.of(sql({
33174
32265
  dialect: DEFAULT_DIALECT
@@ -33190,89 +32281,9 @@ ${JSON.stringify(e2, null, 4)}`);
33190
32281
  ]
33191
32282
  })
33192
32283
  ];
33193
- if (((_a2 = d == null ? void 0 : d.diagnostics) == null ? void 0 : _a2.sql_linter) ?? false) {
33194
- let e2 = store.get(resolvedThemeAtom), r2 = new CustomSqlParser({
33195
- getParserOptions: (e3) => ({
33196
- database: guessParserDialect(e3) ?? DEFAULT_PARSER_DIALECT
33197
- })
33198
- });
33199
- f.push(sqlExtension({
33200
- enableLinting: true,
33201
- linterConfig: {
33202
- delay: 250,
33203
- parser: r2
33204
- },
33205
- enableGutterMarkers: true,
33206
- gutterConfig: {
33207
- backgroundColor: "#3b82f6",
33208
- errorBackgroundColor: "#ef4444",
33209
- hideWhenNotFocused: true,
33210
- parser: r2
33211
- },
33212
- hoverConfig: {
33213
- schema: getSchema,
33214
- hoverTime: 300,
33215
- enableKeywords: true,
33216
- enableTables: true,
33217
- enableColumns: true,
33218
- parser: r2,
33219
- theme: defaultSqlHoverTheme(e2)
33220
- }
33221
- }), EditorView.updateListener.of((e3) => {
33222
- e3.focusChanged && r2.setFocusState(e3.view.hasFocus);
33223
- }));
33224
- }
33225
32284
  return this.sqlModeEnabled && f.push(sqlValidationExtension()), f;
33226
32285
  }
33227
- }, __publicField(_b, "fromQuery", (e) => SQLParser.fromQuery(e)), _b), CustomSqlParser = class extends NodeSqlParser {
33228
- constructor() {
33229
- super(...arguments);
33230
- __publicField(this, "validationTimeout", null);
33231
- __publicField(this, "VALIDATION_DELAY_MS", 300);
33232
- __publicField(this, "isFocused", false);
33233
- }
33234
- setFocusState(e) {
33235
- this.isFocused = e;
33236
- }
33237
- async validateWithDelay(e, r, c) {
33238
- return this.validationTimeout && window.clearTimeout(this.validationTimeout), new Promise((l) => {
33239
- this.validationTimeout = window.setTimeout(async () => {
33240
- var _a2;
33241
- if (!this.isFocused) {
33242
- l([]);
33243
- return;
33244
- }
33245
- try {
33246
- let d = await validateSQL(e, r, c, getSQLMode());
33247
- if (d.error) {
33248
- Logger.error("Failed to validate SQL", {
33249
- error: d.error
33250
- }), l([]);
33251
- return;
33252
- }
33253
- l(((_a2 = d.parse_result) == null ? void 0 : _a2.errors) ?? []);
33254
- } catch (e2) {
33255
- Logger.error("Failed to validate SQL", {
33256
- error: e2
33257
- }), l([]);
33258
- }
33259
- }, this.VALIDATION_DELAY_MS);
33260
- });
33261
- }
33262
- async validateSql(e, r) {
33263
- let c = getSQLMetadata(r.state);
33264
- if (!this.isFocused) return [];
33265
- if (!INTERNAL_SQL_ENGINES.has(c.engine)) return super.validateSql(e, r);
33266
- let l = guessParserDialect(r.state);
33267
- return this.validateWithDelay(e, c.engine, l);
33268
- }
33269
- async parse(e, r) {
33270
- return getSQLMetadata(r.state).engine === "__marimo_duckdb" ? {
33271
- success: true,
33272
- errors: []
33273
- } : super.parse(e, r);
33274
- }
33275
- };
32286
+ }, __publicField(_b, "fromQuery", (e) => SQLParser.fromQuery(e)), _b);
33276
32287
  function updateSQLDialect(e, r) {
33277
32288
  e.dispatch({
33278
32289
  effects: sqlConfigCompartment.reconfigure(sql({
@@ -33286,14 +32297,6 @@ ${JSON.stringify(e2, null, 4)}`);
33286
32297
  function getSQLMetadata(e) {
33287
32298
  return e.field(languageMetadataField);
33288
32299
  }
33289
- function getSchema(e) {
33290
- let r = getSQLMetadata(e.state).engine, c = SCHEMA_CACHE.getCompletionSource(r);
33291
- return (c == null ? void 0 : c.schema) ? c.schema : {};
33292
- }
33293
- function guessParserDialect(e) {
33294
- let r = getSQLMetadata(e).engine;
33295
- return connectionNameToParserDialect(r);
33296
- }
33297
32300
  function connectionNameToParserDialect(e) {
33298
32301
  var _a2;
33299
32302
  let r = (_a2 = SCHEMA_CACHE.getInternalDialect(e)) == null ? void 0 : _a2.toLowerCase();
@@ -50373,7 +49376,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${r}Chann
50373
49376
  children: _
50374
49377
  }), r[7] = d.label, r[8] = g, r[9] = _, r[10] = y) : y = r[10], y;
50375
49378
  };
50376
- const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-Bs2c1bKU.js"));
49379
+ const LazyAnyLanguageCodeMirror = (0, import_react.lazy)(() => import("./any-language-editor-BpWjHMW2.js"));
50377
49380
  var import_compiler_runtime$121 = __toESM(require_compiler_runtime(), 1), CodeEditorPlugin = class {
50378
49381
  constructor() {
50379
49382
  __publicField(this, "tagName", "marimo-code-editor");
@@ -54668,7 +53671,7 @@ Error message: ${getErrorMessage$1(r)}`,
54668
53671
  }, {
54669
53672
  message: "Must be a Buffer"
54670
53673
  })
54671
- ]), jsonValueSchema = lazy$4(() => union([
53674
+ ]), jsonValueSchema = lazy$3(() => union([
54672
53675
  _null(),
54673
53676
  string$2(),
54674
53677
  number$2(),
@@ -58891,7 +57894,7 @@ Database schema: ${c}`), (_a3 = r2.aiFix) == null ? void 0 : _a3.setAiCompletion
58891
57894
  function isOutputEmpty(e) {
58892
57895
  return e == null || e.data == null || e.data === "";
58893
57896
  }
58894
- const LazyVegaEmbed = import_react.lazy(() => import("./react-vega-DM3e8kar.js").then((e) => ({
57897
+ const LazyVegaEmbed = import_react.lazy(() => import("./react-vega-BhZaW0DJ.js").then((e) => ({
58895
57898
  default: e.VegaEmbed
58896
57899
  })));
58897
57900
  var import_compiler_runtime$108 = __toESM(require_compiler_runtime(), 1);
@@ -69587,7 +68590,7 @@ Image URL: ${r.imageUrl}`)), contextToXml({
69587
68590
  function getVegaFieldTypes(e) {
69588
68591
  return !e || Object.keys(e).length === 0 ? "auto" : Objects.mapValues(e, (e2) => e2 === "date" || e2 === "time" ? "string" : e2 === "datetime" ? "date" : e2);
69589
68592
  }
69590
- var import_compiler_runtime$79 = __toESM(require_compiler_runtime(), 1), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-1bUl_mRe.js").then(async (m2) => {
68593
+ var import_compiler_runtime$79 = __toESM(require_compiler_runtime(), 1), LazyDataEditor = import_react.lazy(() => import("./glide-data-editor-hF8NzJm2.js").then(async (m2) => {
69591
68594
  await m2.__tla;
69592
68595
  return m2;
69593
68596
  }));
@@ -81164,7 +80167,7 @@ ${c}
81164
80167
  fullWidth: g,
81165
80168
  children: F
81166
80169
  }), r[19] = g, r[20] = _, r[21] = c, r[22] = F, r[23] = R) : R = r[23], R;
81167
- }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-DY9cADKc.js"));
80170
+ }, LazyDataExplorerComponent = import_react.lazy(() => import("./ConnectedDataExplorerComponent-BC1bAfWX.js"));
81168
80171
  const DataExplorerPlugin = createPlugin("marimo-data-explorer").withData(object$1({
81169
80172
  label: string$2().nullish(),
81170
80173
  data: string$2()
@@ -90226,7 +89229,7 @@ ${c}
90226
89229
  });
90227
89230
  }
90228
89231
  };
90229
- const LazyPlot = (0, import_react.lazy)(() => import("./react-plotly-Cs07wkly.js").then(__toDynamicImportESM(1)).then((e) => e.default));
89232
+ const LazyPlot = (0, import_react.lazy)(() => import("./react-plotly-YQqow0sD.js").then(__toDynamicImportESM(1)).then((e) => e.default));
90230
89233
  function initialLayout(e) {
90231
89234
  return {
90232
89235
  autosize: e.layout.width === void 0,
@@ -91396,7 +90399,7 @@ ${c}
91396
90399
  return true;
91397
90400
  }
91398
90401
  }
91399
- var LazyVegaComponent = import_react.lazy(() => import("./vega-component-C58Jk3ub.js")), VegaPlugin = class {
90402
+ var LazyVegaComponent = import_react.lazy(() => import("./vega-component-B26vOtT-.js")), VegaPlugin = class {
91400
90403
  constructor() {
91401
90404
  __publicField(this, "tagName", "marimo-vega");
91402
90405
  __publicField(this, "validator", object$1({
@@ -91716,7 +90719,7 @@ ${c}
91716
90719
  diagram: e.data.diagram
91717
90720
  });
91718
90721
  }
91719
- }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-DIjoC4T4.js").then(async (m2) => {
90722
+ }, LazyMermaid = (0, import_react.lazy)(() => import("./mermaid-BAe4A_1z.js").then(async (m2) => {
91720
90723
  await m2.__tla;
91721
90724
  return m2;
91722
90725
  })), import_compiler_runtime$15 = __toESM(require_compiler_runtime(), 1);
@@ -93645,6 +92648,7 @@ Defaulting to \`null\`.`;
93645
92648
  }
93646
92649
  render(e) {
93647
92650
  return (0, import_jsx_runtime.jsx)(TexComponent, {
92651
+ host: e.host,
93648
92652
  tex: e.host.textContent || e.host.innerHTML
93649
92653
  });
93650
92654
  }
@@ -93674,16 +92678,31 @@ Defaulting to \`null\`.`;
93674
92678
  });
93675
92679
  }
93676
92680
  var TexComponent = (e) => {
93677
- let r = (0, import_compiler_runtime$8.c)(4), { tex: c } = e, l = (0, import_react.useRef)(null), d, f;
93678
- r[0] === c ? (d = r[1], f = r[2]) : (d = () => {
93679
- l.current && renderLatex(l.current, c);
93680
- }, f = [
92681
+ let r = (0, import_compiler_runtime$8.c)(7), { host: c, tex: l } = e, d = (0, import_react.useRef)(null), [f, h] = (0, import_react.useState)(l), g, _;
92682
+ r[0] === c ? (g = r[1], _ = r[2]) : (g = () => {
92683
+ let e2 = new MutationObserver(() => {
92684
+ h(c.textContent || c.innerHTML);
92685
+ });
92686
+ return e2.observe(c, {
92687
+ childList: true,
92688
+ characterData: true,
92689
+ subtree: true
92690
+ }), () => {
92691
+ e2.disconnect();
92692
+ };
92693
+ }, _ = [
93681
92694
  c
93682
- ], r[0] = c, r[1] = d, r[2] = f), (0, import_react.useLayoutEffect)(d, f);
93683
- let h;
93684
- return r[3] === Symbol.for("react.memo_cache_sentinel") ? (h = (0, import_jsx_runtime.jsx)("span", {
93685
- ref: l
93686
- }), r[3] = h) : h = r[3], h;
92695
+ ], r[0] = c, r[1] = g, r[2] = _), (0, import_react.useLayoutEffect)(g, _);
92696
+ let y, b;
92697
+ r[3] === f ? (y = r[4], b = r[5]) : (y = () => {
92698
+ d.current && renderLatex(d.current, f);
92699
+ }, b = [
92700
+ f
92701
+ ], r[3] = f, r[4] = y, r[5] = b), (0, import_react.useLayoutEffect)(y, b);
92702
+ let S;
92703
+ return r[6] === Symbol.for("react.memo_cache_sentinel") ? (S = (0, import_jsx_runtime.jsx)("span", {
92704
+ ref: d
92705
+ }), r[6] = S) : S = r[6], S;
93687
92706
  };
93688
92707
  const UI_PLUGINS = [
93689
92708
  new ButtonPlugin(),
@@ -97599,7 +96618,7 @@ Defaulting to \`null\`.`;
97599
96618
  return Logger.warn("Failed to get version from mount config"), null;
97600
96619
  }
97601
96620
  }
97602
- const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.17.4"), showCodeInRunModeAtom = atom(true);
96621
+ const marimoVersionAtom = atom(getVersionFromMountConfig() || "0.17.6"), showCodeInRunModeAtom = atom(true);
97603
96622
  atom(null);
97604
96623
  var VIRTUAL_FILE_REGEX = /\/@file\/([^\s/]+)\.([\dA-Za-z]+)/g, VirtualFileTracker = class e {
97605
96624
  constructor() {