@marimo-team/islands 0.25.3-dev312 → 0.25.3-dev316
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ErrorBoundary-CCrWQ8Zi.js → ErrorBoundary-C3G05Nb1.js} +1 -1
- package/dist/{chat-ui-DkuxGEDp.js → chat-ui-DASKYW38.js} +13 -13
- package/dist/{code-visibility-DLBADpvq.js → code-visibility-B3_gXvem.js} +31 -32
- package/dist/{common-Cc-bvilP.js → common-Vd6TgXHQ.js} +5074 -5074
- package/dist/{config-BVYA1P0C.js → config-CL7mwGLX.js} +87 -129
- package/dist/{data-grid-overlay-editor-CAEih52I.js → data-grid-overlay-editor-DLEPVcX1.js} +1 -1
- package/dist/{error-entries-istW7Xbs.js → error-entries-kb4H6PAT.js} +533 -508
- package/dist/feedback-button-gqE30Uez.js +370 -0
- package/dist/{formats-CMa7L3E8.js → formats-qhBmYb0l.js} +1 -1
- package/dist/{glide-data-editor-hsf5AOwE.js → glide-data-editor-BmtEcZoo.js} +3 -3
- package/dist/{globals-Blgj9EWO.js → globals-BIt_qRYC.js} +1 -1
- package/dist/{html-to-image-pPbR2cDx.js → html-to-image-DR8VPB7E.js} +4018 -4021
- package/dist/main.js +606 -607
- package/dist/{number-overlay-editor-BgNsDtQP.js → number-overlay-editor-Bbxt9i1c.js} +1 -1
- package/dist/{process-output-BySO1nIs.js → process-output-BDMtqL6K.js} +2 -2
- package/dist/{reveal-component-MUD9gGln.js → reveal-component-DXFsIk5S.js} +4 -4
- package/dist/static-state-Dtocd9UO.js +68 -0
- package/dist/{vega-component-Bly2lDhz.js → vega-component-CeN8zClP.js} +9 -9
- package/package.json +1 -1
- package/src/__tests__/mount.test.ts +17 -58
- package/src/components/editor/actions/useRestartKernel.tsx +0 -5
- package/src/components/editor/cell/__tests__/useRunCells.test.tsx +0 -3
- package/src/components/editor/cell/useRunCells.ts +2 -2
- package/src/components/editor/chrome/wrapper/footer-items/backend-status.tsx +2 -16
- package/src/components/editor/renderers/cell-array.tsx +0 -3
- package/src/core/edit-app.tsx +2 -7
- package/src/core/executions/__tests__/run.test.ts +0 -3
- package/src/core/executions/index.ts +1 -1
- package/src/core/executions/run.ts +1 -14
- package/src/core/islands/bootstrap.ts +0 -1
- package/src/core/network/__tests__/requests-network.test.ts +0 -16
- package/src/core/network/connection.ts +0 -5
- package/src/core/network/requests-toasting.tsx +1 -49
- package/src/core/network/resolve.ts +1 -5
- package/src/core/notebook/replica/__tests__/replica.test.ts +3 -3
- package/src/core/notebook/replica/connection.ts +1 -5
- package/src/core/runtime/__tests__/createWsUrl.test.ts +4 -16
- package/src/core/runtime/__tests__/runtime.test.ts +58 -168
- package/src/core/runtime/adapter.ts +1 -8
- package/src/core/runtime/config.ts +4 -59
- package/src/core/runtime/runtime.ts +1 -31
- package/src/core/runtime/types.ts +0 -5
- package/src/core/session/__tests__/useNotebookReplica.hook.test.tsx +5 -5
- package/src/core/session/__tests__/useNotebookSession.hook.test.tsx +125 -29
- package/src/core/session/connection-utils.ts +2 -14
- package/src/core/session/useNotebookSession.tsx +19 -12
- package/src/mount.tsx +3 -9
- package/src/utils/errors.ts +0 -7
- package/dist/feedback-button-BJvIOw-c.js +0 -371
- package/dist/toDate-5qPtZ6HL.js +0 -94
- package/src/components/editor/alerts/connecting-alert.tsx +0 -27
- package/src/core/network/__tests__/requests-lazy.test.ts +0 -322
- package/src/core/network/requests-lazy.ts +0 -222
package/dist/main.js
CHANGED
|
@@ -3,35 +3,35 @@ import { _ as a, a as o, d as s, g as c, h as l, i as u, l as d, m as f, n as p,
|
|
|
3
3
|
import { t as y } from "./react-CHbZqgBF.js";
|
|
4
4
|
import { t as b } from "./compiler-runtime-DNezxW8I.js";
|
|
5
5
|
import { i as x, n as S, r as C, t as w } from "./copy-icon-oHFcxX_y.js";
|
|
6
|
-
import { B as T, Bt as E, Ct as D, E as O, F as k, Ft as A, I as j, It as M, L as N, Lt as P, M as F, Mt as I, O as L, Ot as R, P as z, R as B, Rt as ee, St as te, Ut as ne, Vt as re, Wt as ie, X as ae, Z as oe, _ as se, _t as ce, a as le, at as ue, b as de, bt as fe, c as pe, ct as me, dt as he, i as ge, it as _e, j as ve, kt as ye, lt as be, mt as xe, n as Se, o as Ce, ot as we, q as Te, rt as Ee, ut as De, vt as Oe, yt as ke, z as Ae, zt as je } from "./html-to-image-
|
|
6
|
+
import { B as T, Bt as E, Ct as D, E as O, F as k, Ft as A, I as j, It as M, L as N, Lt as P, M as F, Mt as I, O as L, Ot as R, P as z, R as B, Rt as ee, St as te, Ut as ne, Vt as re, Wt as ie, X as ae, Z as oe, _ as se, _t as ce, a as le, at as ue, b as de, bt as fe, c as pe, ct as me, dt as he, i as ge, it as _e, j as ve, kt as ye, lt as be, mt as xe, n as Se, o as Ce, ot as we, q as Te, rt as Ee, ut as De, vt as Oe, yt as ke, z as Ae, zt as je } from "./html-to-image-DR8VPB7E.js";
|
|
7
7
|
import { a as Me, f as Ne, h as Pe, i as Fe, m as Ie, n as Le, o as Re, r as ze, t as Be } from "./tooltip-BekOCQ3v.js";
|
|
8
8
|
import { D as Ve, E as He, O as Ue, S as We, T as Ge, _ as Ke, a as qe, c as Je, d as Ye, f as Xe, g as Ze, h as Qe, i as $e, l as et, m as tt, n as nt, o as rt, p as it, r as at, s as ot, t as st, u as ct, v as lt, w as ut, x as dt, y as ft } from "./spec-CSS9g9Su.js";
|
|
9
|
-
import { $t as pt, A as mt, At as ht, B as gt, Bt as _t, C as vt, Cn as yt, Ct as bt, D as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mt as Vt, N as Ht, Nt as Ut, O as Wt, Ot as Gt, P as Kt, Pt as qt, Qt as Jt, R as Yt, Rt as Xt, S as Zt, Sn as Qt, T as $t, Tn as en, Tt as tn, U as nn, Ut as rn, V as an, Vt as on, W as sn, Wt as cn, X as ln, Xt as un, Y as dn, Yt as fn, Z as pn, Zt as mn, _ as hn, _t as gn, an as _n, at as vn, b as yn, bn, bt as xn, c as Sn, cn as Cn, ct as wn, d as Tn, dn as En, dt as Dn, en as On, f as kn, fn as An, ft as jn, g as Mn, gn as Nn, gt as Pn, h as Fn, hn as In, ht as Ln, in as Rn, it as zn, j as Bn, jt as Vn, k as Hn, kt as Un, ln as Wn, lt as Gn, m as Kn, mn as qn, mt as Jn, nn as Yn, nt as Xn, on as Zn, ot as Qn, p as $n, pn as er, pt as tr, q as nr, qt as rr, r as ir, rn as ar, rt as or, sn as sr, st as cr, t as lr, tn as ur, tt as dr, u as fr, un as pr, ut as mr, v as hr, vn as gr, vt as _r, w as vr, wn as yr, wt as br, x as xr, xn as Sr, y as Cr, yn as wr, yt as Tr, z as Er, zt as Dr } from "./common-
|
|
9
|
+
import { $t as pt, A as mt, At as ht, B as gt, Bt as _t, C as vt, Cn as yt, Ct as bt, D as xt, Dt as St, E as Ct, En as wt, Et as Tt, F as Et, Ft as Dt, G as Ot, Gt as kt, H as At, Ht as jt, I as Mt, It as Nt, J as Pt, Jt as Ft, K as It, Kt as Lt, L as Rt, Lt as zt, M as Bt, Mt as Vt, N as Ht, Nt as Ut, O as Wt, Ot as Gt, P as Kt, Pt as qt, Qt as Jt, R as Yt, Rt as Xt, S as Zt, Sn as Qt, T as $t, Tn as en, Tt as tn, U as nn, Ut as rn, V as an, Vt as on, W as sn, Wt as cn, X as ln, Xt as un, Y as dn, Yt as fn, Z as pn, Zt as mn, _ as hn, _t as gn, an as _n, at as vn, b as yn, bn, bt as xn, c as Sn, cn as Cn, ct as wn, d as Tn, dn as En, dt as Dn, en as On, f as kn, fn as An, ft as jn, g as Mn, gn as Nn, gt as Pn, h as Fn, hn as In, ht as Ln, in as Rn, it as zn, j as Bn, jt as Vn, k as Hn, kt as Un, ln as Wn, lt as Gn, m as Kn, mn as qn, mt as Jn, nn as Yn, nt as Xn, on as Zn, ot as Qn, p as $n, pn as er, pt as tr, q as nr, qt as rr, r as ir, rn as ar, rt as or, sn as sr, st as cr, t as lr, tn as ur, tt as dr, u as fr, un as pr, ut as mr, v as hr, vn as gr, vt as _r, w as vr, wn as yr, wt as br, x as xr, xn as Sr, y as Cr, yn as wr, yt as Tr, z as Er, zt as Dr } from "./common-Vd6TgXHQ.js";
|
|
10
10
|
import { a as Or, n as kr, s as Ar, t as jr } from "./useLifecycle-BMlFy2yY.js";
|
|
11
11
|
import { t as Mr } from "./check-DCQEEsUn.js";
|
|
12
12
|
import { A as Nr, C as Pr, D as Fr, M as Ir, O as Lr, a as Rr, c as zr, d as Br, i as Vr, k as Hr, l as Ur, n as Wr, o as Gr, r as Kr, s as qr, t as Jr, w as Yr, x as Xr } from "./select-XmXyen3r.js";
|
|
13
13
|
import { B as Zr, C as Qr, J as $r, Mt as ei, Q as ti, S as ni, Sn as ri, W as ii, X as ai, Y as oi, Z as si, _ as ci, _t as li, a as ui, bn as di, c as fi, f as pi, g as mi, h as hi, i as gi, kt as _i, m as vi, n as yi, nt as bi, p as xi, pt as Si, r as Ci, s as wi, t as Ti, v as Ei, w as Di, xn as Oi, y as ki, z as Ai } from "./dropdown-menu-CAejOChE.js";
|
|
14
|
-
import {
|
|
15
|
-
import { At as Li,
|
|
16
|
-
import { a as
|
|
17
|
-
import { t as
|
|
18
|
-
import { a as
|
|
19
|
-
import { n as
|
|
20
|
-
import { a as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { $ as
|
|
24
|
-
import { f as
|
|
25
|
-
import { m as
|
|
26
|
-
import { t as
|
|
27
|
-
import { t as
|
|
28
|
-
import { t as
|
|
29
|
-
import { t as
|
|
30
|
-
import { t as
|
|
31
|
-
import {
|
|
32
|
-
import { t as
|
|
33
|
-
import {
|
|
34
|
-
import { i as Vs, n as Hs, r as Us } from "./formats-
|
|
14
|
+
import { c as ji, i as Mi, l as Ni, o as Pi, s as Fi, t as Ii } from "./config-CL7mwGLX.js";
|
|
15
|
+
import { At as Li, B as Ri, Dt as zi, E as Bi, Ft as Vi, G as Hi, J as Ui, Jt as Wi, K as Gi, Kt as Ki, L as qi, M as Ji, Mt as Yi, Nt as Xi, Ot as Zi, R as Qi, Rt as $i, Ut as ea, Vt as ta, W as na, X as ra, Y as ia, _ as aa, at as oa, bt as sa, c as ca, ct as la, d as ua, g as da, h as fa, it as pa, kt as ma, lt as ha, m as ga, p as _a, q as va, qt as ya, s as ba, st as xa, wt as Sa, xt as Ca, z as wa } from "./error-entries-kb4H6PAT.js";
|
|
16
|
+
import { a as Ta, c as Ea, d as Da, f as Oa, i as ka, l as Aa, n as ja, o as Ma, r as Na, s as Pa, t as Fa } from "./process-output-BDMtqL6K.js";
|
|
17
|
+
import { t as Ia } from "./pencil-BUfnNZAE.js";
|
|
18
|
+
import { a as La, c as Ra, d as za, f as Ba, i as Va, l as Ha, r as Ua } from "./glide-utils-C4TKZeBA.js";
|
|
19
|
+
import { n as Wa, t as Ga } from "./globals-BIt_qRYC.js";
|
|
20
|
+
import { a as Ka, i as qa, n as Ja, r as Ya, s as Xa, t as Za } from "./assertNever-efcK_v3t.js";
|
|
21
|
+
import { t as Qa } from "./react-dom-DhWGW7e0.js";
|
|
22
|
+
import { t as $a } from "./jsx-runtime-6ZiU38At.js";
|
|
23
|
+
import { $ as eo, A as to, At as no, B as ro, C as io, Ct as ao, D as oo, Dt as so, E as co, F as lo, Ft as uo, G as fo, H as V, I as po, J as mo, K as H, L as ho, Lt as go, M as _o, Mt as vo, N as yo, Nt as bo, O as xo, Ot as So, P as Co, Pt as wo, Q as To, Qt as Eo, R as Do, Rt as Oo, St as ko, T as Ao, Tt as jo, U as Mo, V as No, W as Po, X as Fo, Z as Io, _t as Lo, a as Ro, an as zo, at as Bo, b as Vo, c as Ho, cn as Uo, ct as Wo, d as Go, dn as Ko, dt as qo, et as Jo, f as Yo, fn as Xo, gt as Zo, hn as Qo, ht as $o, it as es, j as ts, k as ns, l as rs, ln as is, lt as as, m as os, mn as ss, mt as cs, nt as U, ot as W, pn as ls, pt as us, q as G, rt as K, s as ds, sn as fs, st as ps, u as ms, un as hs, v as gs, yt as _s, z as vs } from "./use-restore-focus-DyrKLdSB.js";
|
|
24
|
+
import { f as ys, n as bs, p as xs, t as Ss } from "./error-banner-DkQNU4bn.js";
|
|
25
|
+
import { m as Cs } from "./isArrayLikeObject-B-HXCsex.js";
|
|
26
|
+
import { t as ws } from "./pick-DgpAbcwP.js";
|
|
27
|
+
import { t as Ts } from "./debounce-DrhhziJv.js";
|
|
28
|
+
import { t as Es } from "./objects-DCmMvZtn.js";
|
|
29
|
+
import { t as Ds } from "./invariant-DLmrl-hA.js";
|
|
30
|
+
import { t as Os } from "./useEvent-xDnF2X04.js";
|
|
31
|
+
import { t as ks } from "./createReducer-DHfURLCk.js";
|
|
32
|
+
import { R as q, V as As, f as js, j as Ms, t as Ns } from "./dist-B_xgcU0N.js";
|
|
33
|
+
import { c as Ps, i as Fs, m as Is, n as Ls, o as Rs, r as zs, t as Bs } from "./static-state-Dtocd9UO.js";
|
|
34
|
+
import { i as Vs, n as Hs, r as Us } from "./formats-qhBmYb0l.js";
|
|
35
35
|
import { o as Ws, r as Gs, t as Ks } from "./arrays-DoQ-AILx.js";
|
|
36
36
|
import { n as qs } from "./once-NnpX_HnX.js";
|
|
37
37
|
import { n as Js } from "./dist-U4WlxEDL.js";
|
|
@@ -40,10 +40,10 @@ import { n as Xs, t as Zs } from "./esm-BvhFNYzM.js";
|
|
|
40
40
|
import { p as Qs } from "./dist-B_EswY8r.js";
|
|
41
41
|
import { t as $s } from "./useAsyncData-DMBliR6D.js";
|
|
42
42
|
import { t as ec } from "./semaphore-8KhQouXt.js";
|
|
43
|
-
import { t as tc } from "./ErrorBoundary-
|
|
43
|
+
import { t as tc } from "./ErrorBoundary-C3G05Nb1.js";
|
|
44
44
|
import { D as nc, O as rc } from "./vega-loader.browser-Cnf7IHA8.js";
|
|
45
45
|
import { a as ic, n as ac } from "./loader-BIlwkY0d.js";
|
|
46
|
-
import { a as oc, c as sc, i as cc, l as lc, o as uc, s as dc, t as fc } from "./code-visibility-
|
|
46
|
+
import { a as oc, c as sc, i as cc, l as lc, o as uc, s as dc, t as fc } from "./code-visibility-B3_gXvem.js";
|
|
47
47
|
import { t as pc } from "./useDeepCompareMemoize-CxywEb3a.js";
|
|
48
48
|
import { t as mc } from "./esm-wKplZtOX.js";
|
|
49
49
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
@@ -1856,7 +1856,7 @@ function Dd(e) {
|
|
|
1856
1856
|
Ed(Dd, "usePrevious");
|
|
1857
1857
|
//#endregion
|
|
1858
1858
|
//#region ../node_modules/.pnpm/@radix-ui+react-navigation-menu@1.4.1_@types+react-dom@19.3.0_@types+react@19.3.0__@typ_5045728451ff7eb4d8fae3501b20e6e5/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs
|
|
1859
|
-
var Od = /* @__PURE__ */ e(
|
|
1859
|
+
var Od = /* @__PURE__ */ e(Qa(), 1), Y = $a(), kd = Object.defineProperty, Ad = (e, t) => kd(e, "name", {
|
|
1860
1860
|
value: t,
|
|
1861
1861
|
configurable: !0
|
|
1862
1862
|
}), jd = {
|
|
@@ -1868,8 +1868,8 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
1868
1868
|
}, Nd = {
|
|
1869
1869
|
LTR: "ltr",
|
|
1870
1870
|
RTL: "rtl"
|
|
1871
|
-
}, Pd = "NavigationMenu", [Fd, Id, Ld] =
|
|
1872
|
-
let { __scopeNavigationMenu: n, value: r, onValueChange: i, defaultValue: a, delayDuration: o = 200, skipDelayDuration: s = 300, orientation: c = Md.Horizontal, dir: l, activationMode: u = jd.Automatic, ...d } = e, [f, p] = J.useState(null), h = m(t, p), g = Nr(l), _ = J.useRef(0), v = J.useRef(0), y = J.useRef(0), [b, x] = J.useState(!0), [S, C] =
|
|
1871
|
+
}, Pd = "NavigationMenu", [Fd, Id, Ld] = Ka(Pd), [Rd, zd, Bd] = Ka(Pd), [Vd, Hd] = ls(Pd, [Ld, Bd]), [Ud, Wd] = Vd(Pd), [Gd, Kd] = Vd(Pd), qd = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Ad(function(e, t) {
|
|
1872
|
+
let { __scopeNavigationMenu: n, value: r, onValueChange: i, defaultValue: a, delayDuration: o = 200, skipDelayDuration: s = 300, orientation: c = Md.Horizontal, dir: l, activationMode: u = jd.Automatic, ...d } = e, [f, p] = J.useState(null), h = m(t, p), g = Nr(l), _ = J.useRef(0), v = J.useRef(0), y = J.useRef(0), [b, x] = J.useState(!0), [S, C] = hs({
|
|
1873
1873
|
prop: r,
|
|
1874
1874
|
onChange: /* @__PURE__ */ Ad((e) => {
|
|
1875
1875
|
let t = e !== "", n = s > 0;
|
|
@@ -1916,7 +1916,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
1916
1916
|
C((t) => t === e ? "" : e);
|
|
1917
1917
|
},
|
|
1918
1918
|
onItemDismiss: () => C(""),
|
|
1919
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
1919
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ss.nav, {
|
|
1920
1920
|
"aria-label": "Main",
|
|
1921
1921
|
"data-orientation": c,
|
|
1922
1922
|
dir: g,
|
|
@@ -1932,7 +1932,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
1932
1932
|
rootNavigationMenu: r,
|
|
1933
1933
|
value: c,
|
|
1934
1934
|
previousValue: Dd(c),
|
|
1935
|
-
baseId:
|
|
1935
|
+
baseId: Uo(),
|
|
1936
1936
|
dir: i,
|
|
1937
1937
|
orientation: a,
|
|
1938
1938
|
activationMode: o,
|
|
@@ -1940,12 +1940,12 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
1940
1940
|
onViewportChange: g,
|
|
1941
1941
|
indicatorTrack: y,
|
|
1942
1942
|
onIndicatorTrackChange: b,
|
|
1943
|
-
onTriggerEnter:
|
|
1944
|
-
onTriggerLeave:
|
|
1945
|
-
onContentEnter:
|
|
1946
|
-
onContentLeave:
|
|
1947
|
-
onItemSelect:
|
|
1948
|
-
onItemDismiss:
|
|
1943
|
+
onTriggerEnter: fs(d),
|
|
1944
|
+
onTriggerLeave: fs(f),
|
|
1945
|
+
onContentEnter: fs(p),
|
|
1946
|
+
onContentLeave: fs(m),
|
|
1947
|
+
onItemSelect: fs(l),
|
|
1948
|
+
onItemDismiss: fs(u),
|
|
1949
1949
|
onViewportContentChange: J.useCallback((e, t) => {
|
|
1950
1950
|
v((n) => (n.set(e, t), new Map(n)));
|
|
1951
1951
|
}, []),
|
|
@@ -1962,12 +1962,12 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
1962
1962
|
})
|
|
1963
1963
|
});
|
|
1964
1964
|
}, "NavigationMenuProvider"), Yd = "NavigationMenuList", Xd = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Ad(function(e, t) {
|
|
1965
|
-
let { __scopeNavigationMenu: n, ...r } = e, i = Wd(Yd, n), a = /* @__PURE__ */ (0, Y.jsx)(
|
|
1965
|
+
let { __scopeNavigationMenu: n, ...r } = e, i = Wd(Yd, n), a = /* @__PURE__ */ (0, Y.jsx)(ss.ul, {
|
|
1966
1966
|
"data-orientation": i.orientation,
|
|
1967
1967
|
...r,
|
|
1968
1968
|
ref: t
|
|
1969
1969
|
});
|
|
1970
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
1970
|
+
return /* @__PURE__ */ (0, Y.jsx)(ss.div, {
|
|
1971
1971
|
style: { position: "relative" },
|
|
1972
1972
|
ref: i.onIndicatorTrackChange,
|
|
1973
1973
|
children: /* @__PURE__ */ (0, Y.jsx)(Fd.Slot, {
|
|
@@ -1979,7 +1979,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
1979
1979
|
})
|
|
1980
1980
|
});
|
|
1981
1981
|
}, "NavigationMenuList")), [Zd, Qd] = Vd("NavigationMenuItem"), $d = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Ad(function(e, t) {
|
|
1982
|
-
let { __scopeNavigationMenu: n, value: r, ...i } = e, a =
|
|
1982
|
+
let { __scopeNavigationMenu: n, value: r, ...i } = e, a = Uo(), o = r || a || "LEGACY_REACT_AUTO_VALUE", s = J.useRef(null), c = J.useRef(null), l = J.useRef(null), u = J.useRef(() => {}), d = J.useRef(!1), f = J.useCallback((e = "start") => {
|
|
1983
1983
|
if (s.current) {
|
|
1984
1984
|
u.current();
|
|
1985
1985
|
let t = Cf(s.current);
|
|
@@ -2002,7 +2002,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2002
2002
|
onFocusProxyEnter: f,
|
|
2003
2003
|
onRootContentClose: p,
|
|
2004
2004
|
onContentFocusOutside: p,
|
|
2005
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
2005
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ss.li, {
|
|
2006
2006
|
...i,
|
|
2007
2007
|
ref: t
|
|
2008
2008
|
})
|
|
@@ -2014,7 +2014,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2014
2014
|
value: o.value,
|
|
2015
2015
|
children: /* @__PURE__ */ (0, Y.jsx)(Sf, {
|
|
2016
2016
|
asChild: !0,
|
|
2017
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
2017
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ss.button, {
|
|
2018
2018
|
id: l,
|
|
2019
2019
|
disabled: r,
|
|
2020
2020
|
"data-disabled": r ? "" : void 0,
|
|
@@ -2023,19 +2023,19 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2023
2023
|
"aria-controls": p ? u : void 0,
|
|
2024
2024
|
...i,
|
|
2025
2025
|
ref: c,
|
|
2026
|
-
onPointerEnter:
|
|
2026
|
+
onPointerEnter: Ko(e.onPointerEnter, () => {
|
|
2027
2027
|
f.current = !1, o.wasEscapeCloseRef.current = !1;
|
|
2028
2028
|
}),
|
|
2029
|
-
onPointerMove:
|
|
2029
|
+
onPointerMove: Ko(e.onPointerMove, Af(() => {
|
|
2030
2030
|
r || f.current || o.wasEscapeCloseRef.current || d.current || (a.onTriggerEnter(o.value), d.current = !0);
|
|
2031
2031
|
})),
|
|
2032
|
-
onPointerLeave:
|
|
2032
|
+
onPointerLeave: Ko(e.onPointerLeave, Af(() => {
|
|
2033
2033
|
r || (a.onTriggerLeave(), d.current = !1);
|
|
2034
2034
|
})),
|
|
2035
|
-
onClick:
|
|
2035
|
+
onClick: Ko(e.onClick, () => {
|
|
2036
2036
|
a.onItemSelect(o.value), f.current = p;
|
|
2037
2037
|
}),
|
|
2038
|
-
onKeyDown:
|
|
2038
|
+
onKeyDown: Ko(e.onKeyDown, (e) => {
|
|
2039
2039
|
let t = {
|
|
2040
2040
|
horizontal: "ArrowDown",
|
|
2041
2041
|
vertical: a.dir === Nd.RTL ? "ArrowLeft" : "ArrowRight"
|
|
@@ -2057,29 +2057,29 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2057
2057
|
let { __scopeNavigationMenu: n, active: r, onSelect: i, ...a } = e;
|
|
2058
2058
|
return /* @__PURE__ */ (0, Y.jsx)(Sf, {
|
|
2059
2059
|
asChild: !0,
|
|
2060
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
2060
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ss.a, {
|
|
2061
2061
|
"data-active": r ? "" : void 0,
|
|
2062
2062
|
"aria-current": r ? "page" : void 0,
|
|
2063
2063
|
...a,
|
|
2064
2064
|
ref: t,
|
|
2065
|
-
onClick:
|
|
2065
|
+
onClick: Ko(e.onClick, (e) => {
|
|
2066
2066
|
let t = e.target, n = new CustomEvent(nf, {
|
|
2067
2067
|
bubbles: !0,
|
|
2068
2068
|
cancelable: !0
|
|
2069
2069
|
});
|
|
2070
|
-
if (t.addEventListener(nf, (e) => i?.(e), { once: !0 }),
|
|
2070
|
+
if (t.addEventListener(nf, (e) => i?.(e), { once: !0 }), Qo(t, n), !n.defaultPrevented && !e.metaKey) {
|
|
2071
2071
|
let e = new CustomEvent(df, {
|
|
2072
2072
|
bubbles: !0,
|
|
2073
2073
|
cancelable: !0
|
|
2074
2074
|
});
|
|
2075
|
-
|
|
2075
|
+
Qo(t, e);
|
|
2076
2076
|
}
|
|
2077
2077
|
}, { checkForDefaultPrevented: !1 })
|
|
2078
2078
|
})
|
|
2079
2079
|
});
|
|
2080
2080
|
}, "NavigationMenuLink")), af = "NavigationMenuIndicator", of = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Ad(function(e, t) {
|
|
2081
2081
|
let { forceMount: n, ...r } = e, i = Wd(af, e.__scopeNavigationMenu), a = !!i.value;
|
|
2082
|
-
return i.indicatorTrack ? Od.createPortal(/* @__PURE__ */ (0, Y.jsx)(
|
|
2082
|
+
return i.indicatorTrack ? Od.createPortal(/* @__PURE__ */ (0, Y.jsx)(is, {
|
|
2083
2083
|
present: n || a,
|
|
2084
2084
|
children: /* @__PURE__ */ (0, Y.jsx)(sf, {
|
|
2085
2085
|
...r,
|
|
@@ -2098,7 +2098,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2098
2098
|
offset: u ? o.offsetLeft : o.offsetTop
|
|
2099
2099
|
});
|
|
2100
2100
|
}, "handlePositionChange");
|
|
2101
|
-
return Ef(o, f), Ef(i.indicatorTrack, f), c ? /* @__PURE__ */ (0, Y.jsx)(
|
|
2101
|
+
return Ef(o, f), Ef(i.indicatorTrack, f), c ? /* @__PURE__ */ (0, Y.jsx)(ss.div, {
|
|
2102
2102
|
"aria-hidden": !0,
|
|
2103
2103
|
"data-state": d ? "visible" : "hidden",
|
|
2104
2104
|
"data-orientation": i.orientation,
|
|
@@ -2135,14 +2135,14 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2135
2135
|
forceMount: n,
|
|
2136
2136
|
...l,
|
|
2137
2137
|
ref: o
|
|
2138
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
2138
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(is, {
|
|
2139
2139
|
present: n || s,
|
|
2140
2140
|
children: /* @__PURE__ */ (0, Y.jsx)(ff, {
|
|
2141
2141
|
"data-state": c,
|
|
2142
2142
|
...l,
|
|
2143
2143
|
ref: o,
|
|
2144
|
-
onPointerEnter:
|
|
2145
|
-
onPointerLeave:
|
|
2144
|
+
onPointerEnter: Ko(e.onPointerEnter, i.onContentEnter),
|
|
2145
|
+
onPointerLeave: Ko(e.onPointerLeave, Af(i.onContentLeave)),
|
|
2146
2146
|
style: {
|
|
2147
2147
|
pointerEvents: !s && i.isRootMenu ? "none" : void 0,
|
|
2148
2148
|
...l.style
|
|
@@ -2151,7 +2151,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2151
2151
|
});
|
|
2152
2152
|
}, "NavigationMenuContent")), uf = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Ad(function(e, t) {
|
|
2153
2153
|
let { onViewportContentChange: n, onViewportContentRemove: r } = Wd(cf, e.__scopeNavigationMenu);
|
|
2154
|
-
return
|
|
2154
|
+
return Xo(() => {
|
|
2155
2155
|
n(e.value, {
|
|
2156
2156
|
ref: t,
|
|
2157
2157
|
...e
|
|
@@ -2160,7 +2160,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2160
2160
|
e,
|
|
2161
2161
|
t,
|
|
2162
2162
|
n
|
|
2163
|
-
]),
|
|
2163
|
+
]), Xo(() => () => r(e.value), [e.value, r]), null;
|
|
2164
2164
|
}, "ViewportContentMounter")), df = "navigationMenu.rootContentDismiss", ff = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Ad(function(e, t) {
|
|
2165
2165
|
let { __scopeNavigationMenu: n, value: r, triggerRef: i, focusProxyRef: a, wasEscapeCloseRef: o, onRootContentClose: s, onContentFocusOutside: c, ...l } = e, u = Wd(cf, n), d = J.useRef(null), f = m(d, t), p = Of(u.baseId, r), h = kf(u.baseId, r), g = Id(n), _ = J.useRef(null), { onItemDismiss: v } = u;
|
|
2166
2166
|
J.useEffect(() => {
|
|
@@ -2200,7 +2200,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2200
2200
|
]);
|
|
2201
2201
|
return /* @__PURE__ */ (0, Y.jsx)(yf, {
|
|
2202
2202
|
asChild: !0,
|
|
2203
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
2203
|
+
children: /* @__PURE__ */ (0, Y.jsx)(zo, {
|
|
2204
2204
|
id: h,
|
|
2205
2205
|
"aria-labelledby": p,
|
|
2206
2206
|
"data-motion": y,
|
|
@@ -2215,30 +2215,30 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2215
2215
|
});
|
|
2216
2216
|
d.current?.dispatchEvent(e);
|
|
2217
2217
|
},
|
|
2218
|
-
onFocusOutside:
|
|
2218
|
+
onFocusOutside: Ko(e.onFocusOutside, (e) => {
|
|
2219
2219
|
c();
|
|
2220
2220
|
let t = e.target, n = e.detail.originalEvent.relatedTarget, r = u.rootNavigationMenu?.contains(t), i = u.rootNavigationMenu?.contains(n);
|
|
2221
2221
|
(r || !i) && e.preventDefault();
|
|
2222
2222
|
}),
|
|
2223
|
-
onPointerDownOutside:
|
|
2223
|
+
onPointerDownOutside: Ko(e.onPointerDownOutside, (e) => {
|
|
2224
2224
|
let t = e.target, n = g().some((e) => e.ref.current?.contains(t)), r = u.isRootMenu && u.viewport?.contains(t);
|
|
2225
2225
|
(n || r || !u.isRootMenu) && e.preventDefault();
|
|
2226
2226
|
}),
|
|
2227
|
-
onKeyDown:
|
|
2227
|
+
onKeyDown: Ko(e.onKeyDown, (e) => {
|
|
2228
2228
|
let t = e.altKey || e.ctrlKey || e.metaKey;
|
|
2229
2229
|
if (e.key === "Tab" && !t) {
|
|
2230
2230
|
let t = Cf(e.currentTarget), n = document.activeElement, r = t.findIndex((e) => e === n);
|
|
2231
2231
|
wf(e.shiftKey ? t.slice(0, r).reverse() : t.slice(r + 1, t.length)) ? e.preventDefault() : a.current?.focus();
|
|
2232
2232
|
}
|
|
2233
2233
|
}),
|
|
2234
|
-
onEscapeKeyDown:
|
|
2234
|
+
onEscapeKeyDown: Ko(e.onEscapeKeyDown, (e) => {
|
|
2235
2235
|
o.current = !0;
|
|
2236
2236
|
})
|
|
2237
2237
|
})
|
|
2238
2238
|
});
|
|
2239
2239
|
}, "NavigationMenuContentImpl")), pf = "NavigationMenuViewport", mf = s(pf), hf = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Ad(function(e, t) {
|
|
2240
2240
|
let { forceMount: n, ...r } = e, i = !!Wd(pf, e.__scopeNavigationMenu).value;
|
|
2241
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
2241
|
+
return /* @__PURE__ */ (0, Y.jsx)(is, {
|
|
2242
2242
|
present: n || i,
|
|
2243
2243
|
children: /* @__PURE__ */ (0, Y.jsx)(gf, {
|
|
2244
2244
|
...r,
|
|
@@ -2252,7 +2252,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2252
2252
|
width: u.offsetWidth,
|
|
2253
2253
|
height: u.offsetHeight
|
|
2254
2254
|
});
|
|
2255
|
-
}, "handleSizeChange")), /* @__PURE__ */ (0, Y.jsxs)(
|
|
2255
|
+
}, "handleSizeChange")), /* @__PURE__ */ (0, Y.jsxs)(ss.div, {
|
|
2256
2256
|
"data-state": Df(h),
|
|
2257
2257
|
"data-orientation": a.orientation,
|
|
2258
2258
|
...i,
|
|
@@ -2263,11 +2263,11 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2263
2263
|
"--radix-navigation-menu-viewport-height": p,
|
|
2264
2264
|
...i.style
|
|
2265
2265
|
},
|
|
2266
|
-
onPointerEnter:
|
|
2267
|
-
onPointerLeave:
|
|
2266
|
+
onPointerEnter: Ko(e.onPointerEnter, a.onContentEnter),
|
|
2267
|
+
onPointerLeave: Ko(e.onPointerLeave, Af(a.onContentLeave)),
|
|
2268
2268
|
children: [/* @__PURE__ */ (0, Y.jsx)(mf, { children: r }), Array.from(s.items).map(([e, { ref: t, forceMount: n, ...r }]) => {
|
|
2269
2269
|
let i = g === e;
|
|
2270
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
2270
|
+
return /* @__PURE__ */ (0, Y.jsx)(is, {
|
|
2271
2271
|
present: n || i,
|
|
2272
2272
|
children: /* @__PURE__ */ (0, Y.jsx)(_f, {
|
|
2273
2273
|
...r,
|
|
@@ -2292,7 +2292,7 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2292
2292
|
scope: n,
|
|
2293
2293
|
children: /* @__PURE__ */ (0, Y.jsx)(Rd.Slot, {
|
|
2294
2294
|
scope: n,
|
|
2295
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
2295
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ss.div, {
|
|
2296
2296
|
dir: i.dir,
|
|
2297
2297
|
...r,
|
|
2298
2298
|
ref: t
|
|
@@ -2308,10 +2308,10 @@ var Od = /* @__PURE__ */ e(Xa(), 1), Y = Za(), kd = Object.defineProperty, Ad =
|
|
|
2308
2308
|
let { __scopeNavigationMenu: n, ...r } = e, i = zd(n), a = Wd(xf, n);
|
|
2309
2309
|
return /* @__PURE__ */ (0, Y.jsx)(Rd.ItemSlot, {
|
|
2310
2310
|
scope: n,
|
|
2311
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
2311
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ss.button, {
|
|
2312
2312
|
...r,
|
|
2313
2313
|
ref: t,
|
|
2314
|
-
onKeyDown:
|
|
2314
|
+
onKeyDown: Ko(e.onKeyDown, (e) => {
|
|
2315
2315
|
if ([
|
|
2316
2316
|
"Home",
|
|
2317
2317
|
"End",
|
|
@@ -2358,8 +2358,8 @@ function Tf(e) {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
Ad(Tf, "removeFromTabOrder");
|
|
2360
2360
|
function Ef(e, t) {
|
|
2361
|
-
let n =
|
|
2362
|
-
|
|
2361
|
+
let n = fs(t);
|
|
2362
|
+
Xo(() => {
|
|
2363
2363
|
let t = 0;
|
|
2364
2364
|
if (e) {
|
|
2365
2365
|
let r = new ResizeObserver(() => {
|
|
@@ -2429,8 +2429,8 @@ var jf = Object.defineProperty, Mf = (e, t) => jf(e, "name", {
|
|
|
2429
2429
|
"ArrowUp",
|
|
2430
2430
|
"ArrowLeft"
|
|
2431
2431
|
]
|
|
2432
|
-
}, Rf = "Slider", [zf, Bf, Vf] =
|
|
2433
|
-
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = Nf.Horizontal, disabled: s = !1, minStepsBetweenThumbs: c = 0, preserveThumbOrder: l = !1, defaultValue: u = [r], value: d, onValueChange: f = /* @__PURE__ */ Mf(() => {}, "onValueChange"), onValueCommit: p = /* @__PURE__ */ Mf(() => {}, "onValueCommit"), inverted: h = !1, form: g, ..._ } = e, v = J.useRef(/* @__PURE__ */ new Set()), y = J.useRef(0), b = J.useRef(!1), [x, S] = J.useState(null), C = o === Nf.Horizontal ? Yf : Xf, [w, T] = J.useState(null), E = m(t, T), [D = [], O] =
|
|
2432
|
+
}, Rf = "Slider", [zf, Bf, Vf] = Ka(Rf), [Hf, Uf] = ls(Rf, [Vf]), [Wf, Gf] = Hf(Rf), Kf = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Mf(function(e, t) {
|
|
2433
|
+
let { name: n, min: r = 0, max: i = 100, step: a = 1, orientation: o = Nf.Horizontal, disabled: s = !1, minStepsBetweenThumbs: c = 0, preserveThumbOrder: l = !1, defaultValue: u = [r], value: d, onValueChange: f = /* @__PURE__ */ Mf(() => {}, "onValueChange"), onValueCommit: p = /* @__PURE__ */ Mf(() => {}, "onValueCommit"), inverted: h = !1, form: g, ..._ } = e, v = J.useRef(/* @__PURE__ */ new Set()), y = J.useRef(0), b = J.useRef(!1), [x, S] = J.useState(null), C = o === Nf.Horizontal ? Yf : Xf, [w, T] = J.useState(null), E = m(t, T), [D = [], O] = hs({
|
|
2434
2434
|
prop: d,
|
|
2435
2435
|
defaultProp: u,
|
|
2436
2436
|
onChange: /* @__PURE__ */ Mf((e) => {
|
|
@@ -2501,7 +2501,7 @@ var jf = Object.defineProperty, Mf = (e, t) => jf(e, "name", {
|
|
|
2501
2501
|
"data-disabled": s ? "" : void 0,
|
|
2502
2502
|
..._,
|
|
2503
2503
|
ref: E,
|
|
2504
|
-
onPointerDown:
|
|
2504
|
+
onPointerDown: Ko(_.onPointerDown, () => {
|
|
2505
2505
|
s || (k.current = D, b.current = !1);
|
|
2506
2506
|
}),
|
|
2507
2507
|
min: r,
|
|
@@ -2620,30 +2620,30 @@ var jf = Object.defineProperty, Mf = (e, t) => jf(e, "name", {
|
|
|
2620
2620
|
});
|
|
2621
2621
|
}, "SliderVertical")), Zf = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Mf(function(e, t) {
|
|
2622
2622
|
let { __scopeSlider: n, onSlideStart: r, onSlideMove: i, onSlideEnd: a, onHomeKeyDown: o, onEndKeyDown: s, onStepKeyDown: c, ...l } = e, u = Gf(Rf, n);
|
|
2623
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
2623
|
+
return /* @__PURE__ */ (0, Y.jsx)(ss.span, {
|
|
2624
2624
|
...l,
|
|
2625
2625
|
ref: t,
|
|
2626
|
-
onKeyDown:
|
|
2626
|
+
onKeyDown: Ko(e.onKeyDown, (e) => {
|
|
2627
2627
|
e.key === "Home" ? (o(e), e.preventDefault()) : e.key === "End" ? (s(e), e.preventDefault()) : Ff.concat(If).includes(e.key) && (c(e), e.preventDefault());
|
|
2628
2628
|
}),
|
|
2629
|
-
onPointerDown:
|
|
2629
|
+
onPointerDown: Ko(e.onPointerDown, (e) => {
|
|
2630
2630
|
let t = e.target;
|
|
2631
2631
|
t.setPointerCapture(e.pointerId), e.preventDefault(), u.thumbs.has(t) ? t.focus({
|
|
2632
2632
|
preventScroll: !0,
|
|
2633
2633
|
focusVisible: !1
|
|
2634
2634
|
}) : r(e);
|
|
2635
2635
|
}),
|
|
2636
|
-
onPointerMove:
|
|
2636
|
+
onPointerMove: Ko(e.onPointerMove, (e) => {
|
|
2637
2637
|
e.target.hasPointerCapture(e.pointerId) && i(e);
|
|
2638
2638
|
}),
|
|
2639
|
-
onPointerUp:
|
|
2639
|
+
onPointerUp: Ko(e.onPointerUp, (e) => {
|
|
2640
2640
|
let t = e.target;
|
|
2641
2641
|
t.hasPointerCapture(e.pointerId) && (t.releasePointerCapture(e.pointerId), a(e));
|
|
2642
2642
|
})
|
|
2643
2643
|
});
|
|
2644
2644
|
}, "SliderImpl")), Qf = "SliderTrack", $f = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Mf(function(e, t) {
|
|
2645
2645
|
let { __scopeSlider: n, ...r } = e, i = Gf(Qf, n);
|
|
2646
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
2646
|
+
return /* @__PURE__ */ (0, Y.jsx)(ss.span, {
|
|
2647
2647
|
"data-disabled": i.disabled ? "" : void 0,
|
|
2648
2648
|
"data-orientation": i.orientation,
|
|
2649
2649
|
...r,
|
|
@@ -2651,7 +2651,7 @@ var jf = Object.defineProperty, Mf = (e, t) => jf(e, "name", {
|
|
|
2651
2651
|
});
|
|
2652
2652
|
}, "SliderTrack")), ep = "SliderRange", tp = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ Mf(function(e, t) {
|
|
2653
2653
|
let { __scopeSlider: n, ...r } = e, i = Gf(ep, n), a = Jf(ep, n), o = J.useRef(null), s = m(t, o), c = i.values.length, l = i.values.map((e) => fp(e, i.min, i.max)), u = c > 1 ? Math.min(...l) : 0, d = 100 - Math.max(...l);
|
|
2654
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
2654
|
+
return /* @__PURE__ */ (0, Y.jsx)(ss.span, {
|
|
2655
2655
|
"data-orientation": i.orientation,
|
|
2656
2656
|
"data-disabled": i.disabled ? "" : void 0,
|
|
2657
2657
|
...r,
|
|
@@ -2698,7 +2698,7 @@ var op = "SliderThumbTrigger", sp = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */
|
|
|
2698
2698
|
},
|
|
2699
2699
|
children: /* @__PURE__ */ (0, Y.jsx)(zf.ItemSlot, {
|
|
2700
2700
|
scope: n,
|
|
2701
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
2701
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ss.span, {
|
|
2702
2702
|
role: "slider",
|
|
2703
2703
|
"aria-label": e["aria-label"] || f,
|
|
2704
2704
|
"aria-valuemin": i.min,
|
|
@@ -2711,7 +2711,7 @@ var op = "SliderThumbTrigger", sp = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */
|
|
|
2711
2711
|
...r,
|
|
2712
2712
|
ref: d,
|
|
2713
2713
|
style: s === void 0 ? { display: "none" } : e.style,
|
|
2714
|
-
onFocus:
|
|
2714
|
+
onFocus: Ko(e.onFocus, () => {
|
|
2715
2715
|
i.valueIndexToChangeRef.current = o;
|
|
2716
2716
|
})
|
|
2717
2717
|
})
|
|
@@ -2748,14 +2748,14 @@ var op = "SliderThumbTrigger", sp = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */
|
|
|
2748
2748
|
i,
|
|
2749
2749
|
a,
|
|
2750
2750
|
c
|
|
2751
|
-
]), /* @__PURE__ */ (0, Y.jsx)(
|
|
2751
|
+
]), /* @__PURE__ */ (0, Y.jsx)(ss.input, {
|
|
2752
2752
|
style: { display: "none" },
|
|
2753
2753
|
name: o,
|
|
2754
2754
|
form: s,
|
|
2755
2755
|
...n,
|
|
2756
2756
|
ref: u,
|
|
2757
2757
|
defaultValue: a,
|
|
2758
|
-
onInput:
|
|
2758
|
+
onInput: Ko(t, (e) => {
|
|
2759
2759
|
d.current && e.stopPropagation();
|
|
2760
2760
|
})
|
|
2761
2761
|
});
|
|
@@ -2837,20 +2837,20 @@ var Cp = Object.defineProperty, wp = (e, t) => Cp(e, "name", {
|
|
|
2837
2837
|
value: t,
|
|
2838
2838
|
configurable: !0
|
|
2839
2839
|
}), Tp = "Toggle", Ep = /* @__PURE__ */ J.forwardRef(/* @__PURE__ */ wp(function(e, t) {
|
|
2840
|
-
let { pressed: n, defaultPressed: r, onPressedChange: i, ...a } = e, [o, s] =
|
|
2840
|
+
let { pressed: n, defaultPressed: r, onPressedChange: i, ...a } = e, [o, s] = hs({
|
|
2841
2841
|
prop: n,
|
|
2842
2842
|
onChange: i,
|
|
2843
2843
|
defaultProp: r ?? !1,
|
|
2844
2844
|
caller: Tp
|
|
2845
2845
|
});
|
|
2846
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
2846
|
+
return /* @__PURE__ */ (0, Y.jsx)(ss.button, {
|
|
2847
2847
|
type: "button",
|
|
2848
2848
|
"aria-pressed": o,
|
|
2849
2849
|
"data-state": o ? "on" : "off",
|
|
2850
2850
|
"data-disabled": e.disabled ? "" : void 0,
|
|
2851
2851
|
...a,
|
|
2852
2852
|
ref: t,
|
|
2853
|
-
onClick:
|
|
2853
|
+
onClick: Ko(e.onClick, () => {
|
|
2854
2854
|
e.disabled || s(!o);
|
|
2855
2855
|
})
|
|
2856
2856
|
});
|
|
@@ -2871,18 +2871,18 @@ Op ||= {};
|
|
|
2871
2871
|
//#endregion
|
|
2872
2872
|
//#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/iso.js
|
|
2873
2873
|
function kp(e) {
|
|
2874
|
-
return
|
|
2874
|
+
return Zo(_o, e);
|
|
2875
2875
|
}
|
|
2876
2876
|
//#endregion
|
|
2877
2877
|
//#region ../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/coerce.js
|
|
2878
2878
|
function Ap(e) {
|
|
2879
|
-
return
|
|
2879
|
+
return $o(Do, e);
|
|
2880
2880
|
}
|
|
2881
2881
|
function jp(e) {
|
|
2882
|
-
return
|
|
2882
|
+
return cs(Co, e);
|
|
2883
2883
|
}
|
|
2884
2884
|
function Mp(e) {
|
|
2885
|
-
return
|
|
2885
|
+
return us(xo, e);
|
|
2886
2886
|
}
|
|
2887
2887
|
//#endregion
|
|
2888
2888
|
//#region ../node_modules/.pnpm/react-aria@3.52.1_react-dom@19.3.0_react@19.3.0__react@19.3.0/node_modules/react-aria/dist/private/button/useToggleButton.mjs
|
|
@@ -2942,11 +2942,11 @@ function Fp(e = {}) {
|
|
|
2942
2942
|
//#endregion
|
|
2943
2943
|
//#region ../packages/client/dist/protocol.js
|
|
2944
2944
|
var Ip = W().min(1).describe("Identifies a project. Unique within the host and unchanged while the project exists."), Lp = W().min(1).describe("Identifies a notebook. Unique within the host and unchanged while the notebook exists."), Rp = W().min(1).describe("Identifies a runtime. Unique within the host; every start and restart creates a new id."), zp = W().min(1).describe("Identifies an attachment. Unique within the host."), Bp = W().min(1).describe("Identifies a run independently of the request's `Idempotency-Key`. Events carry the key in `request_id`."), Vp = W().min(1).describe("Identifies an execution. Unique within the host."), Hp = W().min(1).describe("Identifies a console, display, input, or variable item uniquely within the host. Sending an item again with the same id replaces it."), Up = W().min(1).describe("Identifies a cell within its notebook. Stable while the host serves the notebook; whether it survives a reload of the store depends on the format. `setup` is the setup cell."), Wp = K({
|
|
2945
|
-
pid:
|
|
2945
|
+
pid: Fo().min(1).describe("The process id."),
|
|
2946
2946
|
started_at: kp({ offset: !0 }).describe("When the process started.")
|
|
2947
2947
|
}).describe("The process that wrote a record. A client checks that a process\nwith this `pid` that started at `started_at` still exists. If it\ndoes not, the record is stale and may be removed.\n");
|
|
2948
2948
|
K({
|
|
2949
|
-
version:
|
|
2949
|
+
version: To(1).describe("The version of this record's format. This document describes version 1."),
|
|
2950
2950
|
process: Wp,
|
|
2951
2951
|
name: W().describe("A label for the host to show people, such as `VS Code` or `marimo`. Two hosts can share a name; the filename is the identity."),
|
|
2952
2952
|
url: W().describe("Where the host's API is. The scheme is `http`, and the host part is `127.0.0.1` or `[::1]`, written exactly that way."),
|
|
@@ -2970,7 +2970,7 @@ var Gp = V([
|
|
|
2970
2970
|
"analysis"
|
|
2971
2971
|
]).describe("The kinds a stream carries, and the values `types` accepts. The\ncatalog stream carries host, project, notebook, runtime, and\nattachment. A notebook's stream carries notebook, document,\ncell, runtime, attachment, run, execution, console,\ndisplay, input, variable, and custom. Custom events describe occurrences\nrather than object state.\n"), Kp = K({
|
|
2972
2972
|
type: W().min(1).describe("A namespaced event type under a namespace the producer controls, such as `marimo.pair.agent-message`. Clients ignore types they do not recognize while retaining the stream cursor."),
|
|
2973
|
-
data:
|
|
2973
|
+
data: as().describe("Any JSON value, including null. The producer defines its schema and consumers of the type validate it.")
|
|
2974
2974
|
}).describe("A notebook occurrence with a producer-defined payload. It is replayed\nwhile event history is retained. Delivery is limited to live events\nand replay on the notebook stream, with `run_id` omitted from the\nstream's filters. The notebook is identified by the stream.\n"), qp = K({ operations: H(W()).describe("The operations this host implements, such as `runtime.start`. Whether a client may call one on a given project or notebook is that object's `operations`. Clients accept names they do not recognize.") }).describe("What the host can do. There is exactly one host object, and it is\nthe first object in a snapshot when the filter includes `host`.\nA resumed stream only sends it if its operations changed since\nthe cursor. The host sends it again if its operations change.\n"), Jp = V([
|
|
2975
2975
|
"indexing",
|
|
2976
2976
|
"indexed",
|
|
@@ -3022,7 +3022,7 @@ var Gp = V([
|
|
|
3022
3022
|
runtime_id: Rp.describe("The runtime that produced this run."),
|
|
3023
3023
|
cells: H(Up).describe("The cells the run was requested for. Fixed when the run is accepted, so a client can tell which cells a queued run will reach before the runtime has planned their executions. Each one's execution in this run reports the fingerprint of the source accepted for it. Empty for scratch code and for a run the runtime scheduled itself."),
|
|
3024
3024
|
status: nm.describe("Queued until the first execution starts, running until the cycle has settled or been terminated, and completed once all member executions are terminal and no more can be scheduled in this run. A run can complete with no executions."),
|
|
3025
|
-
outcome:
|
|
3025
|
+
outcome: Wo([rm, Po()]).describe("Null until completed, then final. Published with the terminal status and completed_at. An execution failure does not complete a run while other work remains. Interruption must have taken effect, not merely been requested."),
|
|
3026
3026
|
started_at: kp({ offset: !0 }).nullable().describe("When the first execution started. Null if none has started."),
|
|
3027
3027
|
completed_at: kp({ offset: !0 }).nullable().describe("When the run ended. Null until the run is `completed`.")
|
|
3028
3028
|
}).describe("One bounded cycle of notebook work initiated by an action. It\nincludes synchronous callbacks and reactive work owned and awaited\nby the runtime's scheduler. Context inherited by an independent task\nrecords provenance, not ownership of the cycle. The host completes it\nonly after all member executions have ended and scheduling for the\ncycle has finished. Completion fixes its status and execution membership.\nIndependently triggered later work starts another run, even when\nits cause belongs to an earlier run. Every consumer attached to\nthe notebook sees it.\n\nRetention is up to the host and independent of replay history.\nHosts SHOULD retain ephemeral results briefly after completion to\nallow reconnection. Runs, executions, and items each have removal\nevents; a cell result may outlive its run.\n"), am = K({
|
|
@@ -3030,7 +3030,7 @@ var Gp = V([
|
|
|
3030
3030
|
data: W().describe("The rendered value, embedded so clients can display it independently of the runtime. JSON mimetypes are encoded as text and binary mimetypes as base64.")
|
|
3031
3031
|
}).describe("A rendered value."), om = K({
|
|
3032
3032
|
execution: Vp.describe("The execution whose evaluation produced the value. Usually the variable's `execution_id`, and earlier when the runtime carried the value forward."),
|
|
3033
|
-
update:
|
|
3033
|
+
update: Fo().min(0).describe("How many times the value has been updated since it was produced. Zero at binding.")
|
|
3034
3034
|
}).describe("A variable's value at a point in time. Two revisions are equal\nwhen `execution` and `update` are equal. Clients compare\nrevisions for equality.\n"), sm = K({
|
|
3035
3035
|
id: Hp,
|
|
3036
3036
|
execution_id: Vp.describe("The execution that bound the name."),
|
|
@@ -3039,14 +3039,14 @@ var Gp = V([
|
|
|
3039
3039
|
type: W().nullable().describe("The runtime's label for the value's type. A host may leave it null."),
|
|
3040
3040
|
preview: W().nullable().describe("A short rendering of the value. A host may leave it null.")
|
|
3041
3041
|
}).describe("A name a cell's execution bound in the notebook's namespace, with\nthe revision of its value. The execution binds it as it ends, and\nthe item is removed with the execution. An update, as when a\nstate setter runs or a client sets a value, advances the revision\nwithout binding again, and the producer sends the item again with\nthe same id. Hosts publish a cell execution's variables before its\n`completed` status, and remove a cell's previous execution and\nits items before publishing the next one. A scratch execution's\nnames live only while it runs, so it publishes no variables.\n"), cm = K({
|
|
3042
|
-
line:
|
|
3043
|
-
character:
|
|
3042
|
+
line: Fo().min(0).describe("Zero-based line within the code."),
|
|
3043
|
+
character: Fo().min(0).describe("Zero-based offset in the line, in UTF-16 code units.")
|
|
3044
3044
|
}).describe("A position within code, using LSP coordinates."), lm = K({
|
|
3045
3045
|
start: cm,
|
|
3046
3046
|
end: cm.describe("Exclusive end. Equal to start when only a point is known.")
|
|
3047
3047
|
}).describe("A span within code."), um = K({
|
|
3048
3048
|
cell_id: Up,
|
|
3049
|
-
range:
|
|
3049
|
+
range: Wo([lm, Po()]).describe("Where in that cell, when known."),
|
|
3050
3050
|
message: W().describe("What that cell contributes, such as `reads x from C`.")
|
|
3051
3051
|
}).describe("A cell involved in an error, possibly the one carrying it."), dm = K({
|
|
3052
3052
|
kind: W().describe("The producer's identifier, scoped by source. Open; this protocol defines `exception`, `interrupted`, and `internal` for executions. Clients show unrecognized kinds as plain errors."),
|
|
@@ -3058,13 +3058,13 @@ var Gp = V([
|
|
|
3058
3058
|
"information",
|
|
3059
3059
|
"hint"
|
|
3060
3060
|
]).describe("Error unless the producer says otherwise. Only error affects scheduling."),
|
|
3061
|
-
range:
|
|
3061
|
+
range: Wo([lm, Po()]).describe("Where in the code, when known."),
|
|
3062
3062
|
name: W().nullable().describe("The exception class, such as `ZeroDivisionError`. Set when kind is exception, null otherwise."),
|
|
3063
|
-
traceback:
|
|
3063
|
+
traceback: Wo([am, Po()]).describe("The traceback as rendered by the runtime, plain text or HTML by its mimetype. Null when unavailable or not shown."),
|
|
3064
3064
|
related: H(um).describe("Every involved cell, including this one, in canonical order. Each copy of a cross-cell error carries the same list; clients deduplicate on kind and related cell ids. Empty when the error involves this code alone.")
|
|
3065
3065
|
}).describe("A problem shaped like an LSP diagnostic. Further members are\nkind-specific, as in Problem Details, and a client ignores\nmembers it does not know.\n"), fm = K({
|
|
3066
3066
|
kind: V(["value"]),
|
|
3067
|
-
display:
|
|
3067
|
+
display: Wo([am, Po()]).describe("The value as last rendered. Replaced as it grows. Null when the code produced no value.")
|
|
3068
3068
|
}), pm = K({
|
|
3069
3069
|
kind: V(["error"]),
|
|
3070
3070
|
error: dm
|
|
@@ -3073,34 +3073,34 @@ var Gp = V([
|
|
|
3073
3073
|
reason: W().describe("Why the cell did not evaluate. The string is open. This protocol\ndefines `upstream-failed`, a cell it depends on did not produce\nits value because it raised or could not resolve a reference,\n`upstream-stopped`, a cell it depends on stopped the cycle on\npurpose, and `superseded`, a later execution of the same cell\nreplaced this one before it started because the cell's source\nchanged while it waited. Clients show unrecognized reasons as\nskipped, with the message.\n"),
|
|
3074
3074
|
message: W().describe("Why the cell did not run, to show in place of its output."),
|
|
3075
3075
|
related: H(um).describe("The cells involved, the cause first and this cell last.")
|
|
3076
|
-
}), gm =
|
|
3076
|
+
}), gm = Wo([
|
|
3077
3077
|
fm,
|
|
3078
3078
|
pm,
|
|
3079
3079
|
mm,
|
|
3080
3080
|
hm
|
|
3081
3081
|
]).describe("How an execution ended, tagged on `kind`. A `value` carries the\nexecution's value as last rendered; while the execution is\nrunning it is the value so far, and it is final once the\nexecution is `completed`. An `error` carries the error that ended it.\nAn `interrupted` execution was cancelled before or during execution.\nA `skipped` execution did not evaluate because of another cell; it\nhas no value and binds no variables. Other kinds are defined by\nlater versions of this protocol.\n"), _m = W().min(1).describe("Opaque code identity assigned by the host. Clients compare cell and execution fingerprints for freshness. Incompatible schemes MUST produce distinct fingerprints."), vm = K({
|
|
3082
3082
|
id: Vp,
|
|
3083
|
-
run_id:
|
|
3084
|
-
runtime_id:
|
|
3085
|
-
caused_by:
|
|
3086
|
-
cell_id:
|
|
3083
|
+
run_id: Wo([Bp, Po()]).describe("The run that owns this execution. Every live execution belongs to exactly one run. May name a run the host has dropped. Null only for a restored result whose run is unknown."),
|
|
3084
|
+
runtime_id: Wo([Rp, Po()]).describe("The runtime that produced this execution. Live when it equals the current runtime's id. Null when the producer is unknown."),
|
|
3085
|
+
caused_by: Wo([Vp, Po()]).describe("The execution in the same run whose code was running when this one was scheduled, such as scratch code that ran a cell, set a UI element's value, or wrote state, and the cells that reacted to it. Null for an execution a client requested and for the cells that reacted to one."),
|
|
3086
|
+
cell_id: Wo([Up, Po()]).describe("The cell this execution belongs to. Null for scratch code, a cell outside the document."),
|
|
3087
3087
|
code: W().nullable().describe("The submitted code for an execution with no cell. Null for a cell's execution; its source is available through the cell when the host exposes it."),
|
|
3088
3088
|
code_fingerprint: _m.describe("Fingerprint of the code the execution evaluates. Fixed when the execution is published, while it is still queued."),
|
|
3089
|
-
depends_on:
|
|
3089
|
+
depends_on: Bo(W(), Wo([om, Po()])).describe("The variable revisions this result is valid against, keyed by name. Null for a name no retained cell execution had bound. Empty while queued, stamped as the execution ends, and final from then on."),
|
|
3090
3090
|
status: nm,
|
|
3091
|
-
outcome:
|
|
3091
|
+
outcome: Wo([gm, Po()]).describe("How the execution ended. Null while queued; while running, a value carries the display so far; final once completed."),
|
|
3092
3092
|
started_at: kp({ offset: !0 }).nullable().describe("When the code started executing. Null while queued or if the execution completed before starting."),
|
|
3093
3093
|
completed_at: kp({ offset: !0 }).nullable().describe("When the execution ended. Null until it is completed.")
|
|
3094
3094
|
}).describe("One cell evaluated within a run, or scratch code evaluated once.\nIt moves through `queued`, `running`, and `completed`, and ends with\none outcome. Side effects belong to the execution whose context\nproduced them, and items can arrive after completion while the\nexecution remains retained. Each new input belongs to a running\nexecution. Input calls from completed or removed executions raise\n`EOFError` in the calling code. Exactly one of `cell_id` and `code`\nis null: a cell's execution carries the cell and no code, and a\nscratch execution carries its code and no cell.\n"), ym = K({
|
|
3095
3095
|
id: Hp,
|
|
3096
3096
|
execution_id: Vp,
|
|
3097
|
-
seq:
|
|
3097
|
+
seq: Fo().min(0).describe("Position among the execution's items, increasing in the order they were produced."),
|
|
3098
3098
|
name: V(["stdout", "stderr"]).describe("Which stream the text went to."),
|
|
3099
3099
|
text: W().describe("The text, exactly as written.")
|
|
3100
3100
|
}).describe("Text an execution wrote to stdout or stderr. Items are ordinary\nobjects: a producer replaces one by sending it again with the\nsame id, and items are removed with their execution.\n"), bm = K({
|
|
3101
3101
|
id: Hp,
|
|
3102
3102
|
execution_id: Vp,
|
|
3103
|
-
seq:
|
|
3103
|
+
seq: Fo().min(0).describe("Position among the execution's items, increasing in the order they were produced."),
|
|
3104
3104
|
content: am.describe("The rendered value.")
|
|
3105
3105
|
}).describe("A value an execution showed as a side effect, such as a figure\nfrom `plt.show()`. A producer replaces one by sending it again\nwith the same id, which is how a progress bar updates in place.\n"), xm = V([
|
|
3106
3106
|
"pending",
|
|
@@ -3109,12 +3109,12 @@ var Gp = V([
|
|
|
3109
3109
|
]).describe("An input starts `pending` while it waits for an answer. It becomes\n`answered` when the host accepts a reply for delivery, or `cancelled`\nwhen the host ends the wait while input is still pending. Both\n`answered` and `cancelled` are final. An answered input stays\nanswered if execution later fails before consuming the value.\n"), Sm = K({
|
|
3110
3110
|
id: Hp.describe("Identifies this prompt uniquely across executions and runtime restarts."),
|
|
3111
3111
|
execution_id: Vp,
|
|
3112
|
-
seq:
|
|
3112
|
+
seq: Fo().min(0).describe("Position among the execution's console, display, and input items, increasing in production order."),
|
|
3113
3113
|
prompt: W().describe("The prompt to display, which may be empty."),
|
|
3114
3114
|
password: G().describe("Whether clients must obscure the value as it is entered."),
|
|
3115
3115
|
status: xm
|
|
3116
3116
|
}).describe("A running execution's request for a line of text. Its identity,\nexecution, prompt, password flag, and position stay fixed while\nits status tracks the request. The record remains with its\nexecution after it is answered or cancelled. Submitted answers\ntravel through the reply endpoint to the runtime.\n"), Cm = W().describe("An identifier derived from content, so that every host, kernel,\nand store computes the same value for the same state. It is the\nfirst 16 hexadecimal characters, in lower case, of SHA-256 over\nthe UTF-8 encoding of a canonical text. Each etag says what its\ntext is; a text made of several values is those values joined by\nnewlines. Clients do not compute etags. They read them from the\nstream and from responses, and send them back as preconditions.\n"), wm = K({
|
|
3117
|
-
column:
|
|
3117
|
+
column: Fo().nullable().describe("The column the cell sits in, for multi-column layouts. Null in a single column."),
|
|
3118
3118
|
disabled: G().describe("Whether the cell is kept from running."),
|
|
3119
3119
|
hide_code: G().describe("Whether clients hide the code by default. This is a presentation preference; source availability is represented by `Cell.code`."),
|
|
3120
3120
|
expand_output: G().describe("Whether clients show the full output rather than a scrolled box.")
|
|
@@ -3126,16 +3126,16 @@ var Gp = V([
|
|
|
3126
3126
|
config: wm,
|
|
3127
3127
|
etag: Cm.describe("Precondition for edits and cell runs. Covers exact source, name, and config. Its text is the newline-joined sequence of the first 16 hex characters of SHA-256 of the UTF-8 source, `name`, and the config values `column`, `disabled`, `hide_code`, and `expand_output`, in that order. Config values are JSON scalars."),
|
|
3128
3128
|
code_fingerprint: _m.describe("Fingerprint of the actual source, including when `code` is null. Formatting-only edits may preserve it. Independent of cell name, config, and source visibility."),
|
|
3129
|
-
version:
|
|
3129
|
+
version: Fo().min(1).describe("The document version at which the cell was created or last changed.")
|
|
3130
3130
|
}).describe("A unit of code and configuration in the document. A cell event\nfires when its code, name, or config changes. Markdown and SQL\ncells are code that calls `mo.md` or `mo.sql`; a client chooses\nthe editor to show.\n"), Em = K({
|
|
3131
3131
|
notebook_id: Lp.describe("The notebook this document belongs to."),
|
|
3132
3132
|
order: H(Up).describe("Cell ids in display order. A permutation of the notebook's cells, each appearing exactly once."),
|
|
3133
|
-
app_config:
|
|
3133
|
+
app_config: Bo(W(), as()).describe("Notebook-level settings, the keyword arguments to `marimo.App` such as `width` and `app_title`. Informational for now; no change sets it over this protocol."),
|
|
3134
3134
|
etag: Cm.describe("Identifies the document as currently applied. Its text is `order_etag`, `app_config_etag`, and every cell's `etag` in order, so it changes when any of them does."),
|
|
3135
|
-
saved_etag:
|
|
3135
|
+
saved_etag: Wo([Cm, Po()]).describe("Identifies the document as last written to the host's store, computed the same way over that state. Equal to `etag` when every accepted change has been persisted. Null when nothing has been persisted, which is the case for a scratch copy."),
|
|
3136
3136
|
order_etag: Cm.describe("Identifies the order alone. Its text is the cell IDs in order as a JSON array, with no whitespace and strings carrying only the escapes JSON requires. Editing a cell does not change it."),
|
|
3137
3137
|
app_config_etag: Cm.describe("Identifies the app config alone. Its text is the app config as canonical JSON, with keys sorted by code point, no whitespace, and strings carrying only the escapes JSON requires."),
|
|
3138
|
-
version:
|
|
3138
|
+
version: Fo().min(1).describe("Counts changes to the cells, the order, or the app config. A save does not advance it. Comparable only within one notebook while it is in the catalog.")
|
|
3139
3139
|
}).describe("The document as a whole, without its cells, which are their own\nobjects: the cell order and app config. One per notebook,\nand removed with it. The order and the app\nconfig carry their own etags, so an edit to one does not conflict\nwith an edit to the other, or with edits to cells.\n"), Dm = K({
|
|
3140
3140
|
request_id: W().optional().describe("The `Idempotency-Key` of the request that caused this event. Omitted when no request did, and on snapshots unless that request's work is still in progress."),
|
|
3141
3141
|
time: kp({ offset: !0 }).optional().describe("When the host made this change. Present on live and replayed events; omitted on snapshots."),
|
|
@@ -3307,7 +3307,7 @@ var Gp = V([
|
|
|
3307
3307
|
}).describe("Experimental (analysis). What a cell's text implies: the names it defines and reads, which\nare the edges of the dependency graph, and the errors found in the\ntext alone or across the set of cells. A pure function of the\ncode, so two producers compute the same values.\n"), hh = K({
|
|
3308
3308
|
notebook_id: Lp.describe("The notebook this analysis belongs to."),
|
|
3309
3309
|
document_etag: Cm.describe("The document revision this analysis describes. Equal to the document's `etag` while the analysis is current."),
|
|
3310
|
-
cells:
|
|
3310
|
+
cells: Bo(W(), mh).describe("Every cell of that revision, by id.")
|
|
3311
3311
|
}).describe("Experimental (analysis). What a document's cells imply, computed together over one\nrevision of the document so that cross-cell errors agree. One\nper notebook, and removed with it. It follows the document it\ndescribes, and `document_etag` says which revision that is.\n"), gh = K({
|
|
3312
3312
|
request_id: W().optional().describe("The `Idempotency-Key` of the request that caused this event. Omitted when no request did, and on snapshots unless that request's work is still in progress."),
|
|
3313
3313
|
time: kp({ offset: !0 }).optional().describe("When the host made this change. Present on live and replayed events; omitted on snapshots."),
|
|
@@ -3316,7 +3316,7 @@ var Gp = V([
|
|
|
3316
3316
|
event: V(["analysis"]),
|
|
3317
3317
|
id: W().min(1).optional().describe("The resume cursor. Omitted on snapshot and reset events."),
|
|
3318
3318
|
data: gh
|
|
3319
|
-
}).describe("Experimental (analysis). A `analysis` event from a host stream."), vh =
|
|
3319
|
+
}).describe("Experimental (analysis). A `analysis` event from a host stream."), vh = Wo([
|
|
3320
3320
|
Om,
|
|
3321
3321
|
Am,
|
|
3322
3322
|
Mm,
|
|
@@ -3352,13 +3352,13 @@ var Gp = V([
|
|
|
3352
3352
|
prompt: W().describe("The question, worded for a person."),
|
|
3353
3353
|
options: H(yh).describe("The possible answers.")
|
|
3354
3354
|
}).describe("A question the host needs answered before it can carry out a\nrequest. The client answers by repeating the request with\n`decisions` in the body, mapping this `id` to the `id` of an\noption.\n"), xh = K({
|
|
3355
|
-
change:
|
|
3356
|
-
cell:
|
|
3355
|
+
change: Fo().min(0).describe("The index of the stale change in the request's `changes`, or of the stale cell in a run's `cells`. `0` for a save with a stale `If-Match`."),
|
|
3356
|
+
cell: Wo([Tm, Po()]).describe("The cell the change named, as it now is. Null when the document does not have it, or when the change named the order."),
|
|
3357
3357
|
document: Em
|
|
3358
3358
|
}).describe("The first stale change of an edit or run, and the state the host holds."), Sh = K({
|
|
3359
3359
|
type: W().describe("What kind of problem this is, as a URI. The kinds this\nprotocol defines all start with `tag:marimo.io,2026:host/` and\nend with one of `invalid-request` (400), `unauthorized` (401),\n`forbidden` (403), `not-found` (404), `method-not-allowed`\n(405), `not-acceptable` (406), `conflict` (409), `no-runtime`\n(409), `decision-required` (409), `internal` (500), or\n`unsupported-operation` (501). A client that sees a kind it\ndoes not recognize falls back to `status`.\n"),
|
|
3360
3360
|
title: W().describe("A short, human-readable name for the kind of problem."),
|
|
3361
|
-
status:
|
|
3361
|
+
status: Fo().min(400).max(599).describe("The HTTP status code of the response."),
|
|
3362
3362
|
detail: W().optional().describe("A human-readable explanation of what went wrong this time."),
|
|
3363
3363
|
decisions: H(bh).optional().describe("The choices the client has to make before the host can carry out the request. Only present for `decision-required`."),
|
|
3364
3364
|
edit: xh.optional().describe("Which change was stale and what the host holds instead. Only present for a `conflict` answering an edit, a save, or a run of cells.")
|
|
@@ -3369,8 +3369,8 @@ var Gp = V([
|
|
|
3369
3369
|
}).describe("The notebook's own fields, minus what the host assigns. A project with a root requires `path`; one without requires `name`."), wh = K({
|
|
3370
3370
|
path: W().optional().describe("The new location, relative to the project root and written the way the host's operating system writes paths."),
|
|
3371
3371
|
name: W().optional().describe("The new label to show people.")
|
|
3372
|
-
}).describe("The fields to change. At least one is present."), Th = K({ url: W().describe("The URL the host used to show the notebook, with the host's token omitted.") }), Eh = K({ value: W().describe("The text to deliver to the input exactly as submitted, including an empty string when the answer is empty.") }).describe("The answer to one pending input."), Dh = K({ decisions:
|
|
3373
|
-
column:
|
|
3372
|
+
}).describe("The fields to change. At least one is present."), Th = K({ url: W().describe("The URL the host used to show the notebook, with the host's token omitted.") }), Eh = K({ value: W().describe("The text to deliver to the input exactly as submitted, including an empty string when the answer is empty.") }).describe("The answer to one pending input."), Dh = K({ decisions: Bo(W(), W()).optional().describe("Answers to the questions in a `decision-required` problem.\nEach key is a decision's `id` and each value is the `id` of\nthe chosen option. A client that already knows its choices can\nsend them the first time.\n") }), Oh = K({
|
|
3373
|
+
column: Fo().nullish().default(null),
|
|
3374
3374
|
disabled: G().default(!1),
|
|
3375
3375
|
hide_code: G().default(!1),
|
|
3376
3376
|
expand_output: G().default(!1)
|
|
@@ -3393,18 +3393,18 @@ var Gp = V([
|
|
|
3393
3393
|
kind: V(["set_order"]),
|
|
3394
3394
|
base_etag: W().describe("The document's `order_etag` as last read, or `*`."),
|
|
3395
3395
|
order: H(Up).describe("Every cell id exactly once, in the new order, counting cells this edit creates and leaving out cells it deletes.")
|
|
3396
|
-
}).describe("Replaces the cell order."), Nh =
|
|
3396
|
+
}).describe("Replaces the cell order."), Nh = Wo([
|
|
3397
3397
|
Ah,
|
|
3398
3398
|
jh,
|
|
3399
3399
|
Mh
|
|
3400
3400
|
]).describe("One change to the document, tagged on `kind`."), Ph = K({ changes: H(Nh).describe("The changes, applied in order as one unit.") }), Fh = K({
|
|
3401
3401
|
etag: Cm,
|
|
3402
3402
|
code_fingerprint: _m,
|
|
3403
|
-
version:
|
|
3403
|
+
version: Fo().min(1).describe("The cell's version after the edit.")
|
|
3404
3404
|
}).describe("A cell's etag, code fingerprint, and version after an edit."), Ih = K({
|
|
3405
3405
|
document: Em,
|
|
3406
|
-
cells:
|
|
3407
|
-
}).describe("The document as an edit or save left it, or at a later revision, and the cells it touched."), Lh = K({ decisions:
|
|
3406
|
+
cells: Bo(W(), Wo([Fh, Po()])).describe("The version of each cell the request created or changed, by id, and null for each cell it deleted.")
|
|
3407
|
+
}).describe("The document as an edit or save left it, or at a later revision, and the cells it touched."), Lh = K({ decisions: Bo(W(), W()).optional().describe("Answers to the questions in a `decision-required` problem, as for `runtime.start`.") }).describe("What a save needs from the client, which is nothing until the host asks a question. `{}` is the usual body."), Rh = K({
|
|
3408
3408
|
id: Up,
|
|
3409
3409
|
etag: Cm.optional().describe("The cell's `etag` when the client read it. If its code, name, or settings have changed, the host returns a `conflict`. Omit to run the cell as it is.")
|
|
3410
3410
|
}), zh = K({ cells: H(Rh).min(1).describe("Cells to run by id. The notebook's execution settings determine their order and whether dependent cells run too.") }).describe("Notebook cells to run."), Bh = K({ code: W().describe("Python code that can read the notebook's current values.\nAssignments stay local to the call. Changes to shared objects persist.\n") }).describe("Python code to execute with access to notebook values."), Vh = Gp.options.filter((e) => e !== "host" && e !== "project"), Hh = class extends Error {
|
|
@@ -3721,7 +3721,7 @@ function qh(e, t, n) {
|
|
|
3721
3721
|
}
|
|
3722
3722
|
var Jh = K({
|
|
3723
3723
|
status: U().int(),
|
|
3724
|
-
body:
|
|
3724
|
+
body: as()
|
|
3725
3725
|
});
|
|
3726
3726
|
async function Yh(e, t, { params: n = {}, body: r, headers: i = {}, options: a = {} }) {
|
|
3727
3727
|
let o = Uh[t], s = {};
|
|
@@ -3860,7 +3860,7 @@ function tg(e, t = {}) {
|
|
|
3860
3860
|
//#region ../packages/client/dist/transport/stream.js
|
|
3861
3861
|
var ng = new Set(vh.options.flatMap((e) => e.shape.event.options)), rg = K({
|
|
3862
3862
|
event: W().min(1),
|
|
3863
|
-
data:
|
|
3863
|
+
data: as(),
|
|
3864
3864
|
id: W().optional()
|
|
3865
3865
|
});
|
|
3866
3866
|
function ig(e) {
|
|
@@ -4469,9 +4469,9 @@ var Og = {
|
|
|
4469
4469
|
"input",
|
|
4470
4470
|
"variable",
|
|
4471
4471
|
"marimo"
|
|
4472
|
-
], Mg = K({ marimo:
|
|
4473
|
-
state:
|
|
4474
|
-
code:
|
|
4472
|
+
], Mg = K({ marimo: as() }), Ng = {
|
|
4473
|
+
state: Wi.CLOSED,
|
|
4474
|
+
code: ya.KERNEL_DISCONNECTED,
|
|
4475
4475
|
reason: "kernel not found"
|
|
4476
4476
|
}, Pg = {
|
|
4477
4477
|
...Ng,
|
|
@@ -4481,16 +4481,16 @@ function Fg(e) {
|
|
|
4481
4481
|
return typeof e == "object" && !!e && "state" in e;
|
|
4482
4482
|
}
|
|
4483
4483
|
function Ig(e) {
|
|
4484
|
-
return e instanceof Hh && Fg(e.cause) ? e.cause : e instanceof Hh && e.cause instanceof
|
|
4484
|
+
return e instanceof Hh && Fg(e.cause) ? e.cause : e instanceof Hh && e.cause instanceof qo ? Pg : Ng;
|
|
4485
4485
|
}
|
|
4486
4486
|
function Lg(e) {
|
|
4487
|
-
let t =
|
|
4487
|
+
let t = Oo({ state: Wi.NOT_STARTED }), n = gg({
|
|
4488
4488
|
document: bg,
|
|
4489
4489
|
attachments: _g,
|
|
4490
4490
|
runtime: Ag,
|
|
4491
4491
|
executions: Og,
|
|
4492
4492
|
results: kg
|
|
4493
|
-
}), r =
|
|
4493
|
+
}), r = Oo(n.initial), i = Oo(!1), a = Oo((e) => e(i) && e(t).state === Wi.OPEN), o = Oo((e) => e(a) ? e(r).notebook : null), s = Oo((e) => e(r).resources.document.current), l = Oo((e) => e(a) ? e(r).resources.attachments : _g.initial), u = Oo((e) => e(a) ? e(r).resources.runtime : null), d = Oo((e) => e(r).resources.executions), f = Oo((e) => e(r).resources.results), p = Oo(null), m;
|
|
4494
4494
|
function h(n) {
|
|
4495
4495
|
e.set(i, !1), e.set(t, n);
|
|
4496
4496
|
}
|
|
@@ -4521,7 +4521,7 @@ function Lg(e) {
|
|
|
4521
4521
|
cursor: t,
|
|
4522
4522
|
signal: s,
|
|
4523
4523
|
onStatus: (e) => {
|
|
4524
|
-
e === "connecting" ? h({ state:
|
|
4524
|
+
e === "connecting" ? h({ state: Wi.CONNECTING }) : e === "connected" && h({ state: Wi.OPEN });
|
|
4525
4525
|
}
|
|
4526
4526
|
});
|
|
4527
4527
|
i.subscribe((e) => b(i, e), (e) => {
|
|
@@ -4551,11 +4551,11 @@ function Lg(e) {
|
|
|
4551
4551
|
}
|
|
4552
4552
|
let x = {
|
|
4553
4553
|
end: () => {
|
|
4554
|
-
s.aborted || (o.abort(), m === x && (m = void 0, e.set(p, null)), g({ state:
|
|
4554
|
+
s.aborted || (o.abort(), m === x && (m = void 0, e.set(p, null)), g({ state: Wi.NOT_STARTED }));
|
|
4555
4555
|
},
|
|
4556
4556
|
reconnect: async () => {
|
|
4557
4557
|
if (!(s.aborted || f || d?.status !== "closed")) {
|
|
4558
|
-
f = !0, h({ state:
|
|
4558
|
+
f = !0, h({ state: Wi.CONNECTING });
|
|
4559
4559
|
try {
|
|
4560
4560
|
let e = await l();
|
|
4561
4561
|
if (s.aborted) return;
|
|
@@ -4572,12 +4572,12 @@ function Lg(e) {
|
|
|
4572
4572
|
}
|
|
4573
4573
|
}
|
|
4574
4574
|
};
|
|
4575
|
-
return m = x, h({ state:
|
|
4575
|
+
return m = x, h({ state: Wi.CONNECTING }), v(), x.end;
|
|
4576
4576
|
}
|
|
4577
4577
|
}
|
|
4578
4578
|
//#endregion
|
|
4579
4579
|
//#region ../node_modules/.pnpm/react-hook-form@7.54.2_react@19.3.0/node_modules/react-hook-form/dist/index.esm.mjs
|
|
4580
|
-
var X = b(), Rg =
|
|
4580
|
+
var X = b(), Rg = /* @__PURE__ */ e(fe(), 1), zg = Fi(), Bg = (e) => e.type === "checkbox", Vg = (e) => e instanceof Date, Hg = (e) => e == null, Ug = (e) => typeof e == "object", Wg = (e) => !Hg(e) && !Array.isArray(e) && Ug(e) && !Vg(e), Gg = (e) => Wg(e) && e.target ? Bg(e.target) ? e.target.checked : e.target.value : e, Kg = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, qg = (e, t) => e.has(Kg(t)), Jg = (e) => {
|
|
4581
4581
|
let t = e.constructor && e.constructor.prototype;
|
|
4582
4582
|
return Wg(t) && t.hasOwnProperty("isPrototypeOf");
|
|
4583
4583
|
}, Yg = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
@@ -5871,13 +5871,13 @@ function Fv() {
|
|
|
5871
5871
|
//#endregion
|
|
5872
5872
|
//#region src/utils/zod-utils.ts
|
|
5873
5873
|
function Iv(e) {
|
|
5874
|
-
return e instanceof
|
|
5874
|
+
return e instanceof co;
|
|
5875
5875
|
}
|
|
5876
5876
|
function Lv(e) {
|
|
5877
|
-
return e instanceof
|
|
5877
|
+
return e instanceof ho;
|
|
5878
5878
|
}
|
|
5879
5879
|
function Rv(e) {
|
|
5880
|
-
return e instanceof
|
|
5880
|
+
return e instanceof vs;
|
|
5881
5881
|
}
|
|
5882
5882
|
//#endregion
|
|
5883
5883
|
//#region src/components/ui/form.tsx
|
|
@@ -6102,7 +6102,7 @@ var ny = J.forwardRef((e, t) => {
|
|
|
6102
6102
|
defaultProp: o,
|
|
6103
6103
|
onChange: i
|
|
6104
6104
|
}, n[4] = o, n[5] = i, n[6] = a.value, n[7] = c) : c = n[7];
|
|
6105
|
-
let [l, u] =
|
|
6105
|
+
let [l, u] = hs(c), d, f;
|
|
6106
6106
|
n[8] === l ? (d = n[9], f = n[10]) : (d = () => {
|
|
6107
6107
|
s(l || "");
|
|
6108
6108
|
}, f = [l], n[8] = l, n[9] = d, n[10] = f), J.useEffect(d, f);
|
|
@@ -6131,11 +6131,11 @@ function ry(e) {
|
|
|
6131
6131
|
}
|
|
6132
6132
|
function iy(e) {
|
|
6133
6133
|
let t = (e) => {
|
|
6134
|
-
if (e instanceof
|
|
6134
|
+
if (e instanceof yo) {
|
|
6135
6135
|
let t = [...e.values];
|
|
6136
6136
|
return e.values.size === 1 ? t[0] : t;
|
|
6137
6137
|
}
|
|
6138
|
-
if (e instanceof
|
|
6138
|
+
if (e instanceof ns) {
|
|
6139
6139
|
let t = e.def.defaultValue;
|
|
6140
6140
|
return typeof t == "function" ? t() : t;
|
|
6141
6141
|
}
|
|
@@ -6143,16 +6143,16 @@ function iy(e) {
|
|
|
6143
6143
|
if (Rv(e)) return e.def.items.map((e) => t(e));
|
|
6144
6144
|
if ("unwrap" in e) return t(ry(e));
|
|
6145
6145
|
};
|
|
6146
|
-
return e instanceof
|
|
6146
|
+
return e instanceof No || e instanceof to ? t(e.options[0]) : Iv(e) ? oy(e) ? [iy(e.element)] : [] : e instanceof Do ? "" : e instanceof ts ? e.options[0] : e instanceof lo ? Object.fromEntries(Object.entries(e.shape).map(([e, n]) => [e, t(n)])) : t(e);
|
|
6147
6147
|
}
|
|
6148
6148
|
function ay(e) {
|
|
6149
|
-
if (e instanceof
|
|
6150
|
-
if (e instanceof
|
|
6149
|
+
if (e instanceof yo) return e;
|
|
6150
|
+
if (e instanceof lo) {
|
|
6151
6151
|
let t = e.shape.type;
|
|
6152
|
-
if (t instanceof
|
|
6152
|
+
if (t instanceof yo) return t;
|
|
6153
6153
|
throw Error("Invalid schema");
|
|
6154
6154
|
}
|
|
6155
|
-
if (e instanceof
|
|
6155
|
+
if (e instanceof No || e instanceof to) return ay(e.options[0]);
|
|
6156
6156
|
throw c.warn(e), Error("Invalid schema");
|
|
6157
6157
|
}
|
|
6158
6158
|
function oy(e) {
|
|
@@ -6297,7 +6297,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6297
6297
|
});
|
|
6298
6298
|
}
|
|
6299
6299
|
let { label: i, description: a, special: o, direction: s = "column", minLength: c } = Pv.parse(e.description || "");
|
|
6300
|
-
if (e instanceof
|
|
6300
|
+
if (e instanceof ns || e instanceof po) {
|
|
6301
6301
|
let i = e.unwrap();
|
|
6302
6302
|
return i = !i.description && e.description ? i.describe(e.description) : i, _y({
|
|
6303
6303
|
schema: i,
|
|
@@ -6306,10 +6306,10 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6306
6306
|
renderers: r
|
|
6307
6307
|
});
|
|
6308
6308
|
}
|
|
6309
|
-
if (e instanceof
|
|
6309
|
+
if (e instanceof lo) return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
6310
6310
|
className: l("flex", s === "row" ? "flex-row gap-6 items-start" : s === "two-columns" ? "grid grid-cols-2 gap-y-6" : "flex-col gap-6"),
|
|
6311
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(Gv, { children: i }),
|
|
6312
|
-
let a = i instanceof
|
|
6311
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Gv, { children: i }), Es.entries(e.shape).map(([e, i]) => {
|
|
6312
|
+
let a = i instanceof yo, o = _y({
|
|
6313
6313
|
schema: i,
|
|
6314
6314
|
form: t,
|
|
6315
6315
|
path: Cy(n, e),
|
|
@@ -6321,7 +6321,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6321
6321
|
}, e);
|
|
6322
6322
|
})]
|
|
6323
6323
|
});
|
|
6324
|
-
if (e instanceof
|
|
6324
|
+
if (e instanceof Do) return o === "time" ? /* @__PURE__ */ (0, Y.jsx)(Vv, {
|
|
6325
6325
|
control: t.control,
|
|
6326
6326
|
name: n,
|
|
6327
6327
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Wv, { children: [
|
|
@@ -6340,7 +6340,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6340
6340
|
form: t,
|
|
6341
6341
|
path: n
|
|
6342
6342
|
});
|
|
6343
|
-
if (e instanceof
|
|
6343
|
+
if (e instanceof oo) return /* @__PURE__ */ (0, Y.jsx)(Vv, {
|
|
6344
6344
|
control: t.control,
|
|
6345
6345
|
name: n,
|
|
6346
6346
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Wv, { children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
@@ -6356,7 +6356,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6356
6356
|
})]
|
|
6357
6357
|
}), /* @__PURE__ */ (0, Y.jsx)(Jv, {})] })
|
|
6358
6358
|
});
|
|
6359
|
-
if (e instanceof
|
|
6359
|
+
if (e instanceof Co) return o === "random_number_button" ? /* @__PURE__ */ (0, Y.jsx)(Vv, {
|
|
6360
6360
|
control: t.control,
|
|
6361
6361
|
name: n,
|
|
6362
6362
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(_, {
|
|
@@ -6382,7 +6382,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6382
6382
|
/* @__PURE__ */ (0, Y.jsx)(Jv, {})
|
|
6383
6383
|
] })
|
|
6384
6384
|
});
|
|
6385
|
-
if (e instanceof
|
|
6385
|
+
if (e instanceof xo) {
|
|
6386
6386
|
let e = o === "datetime" ? "datetime-local" : o === "time" ? "time" : "date";
|
|
6387
6387
|
return /* @__PURE__ */ (0, Y.jsx)(Vv, {
|
|
6388
6388
|
control: t.control,
|
|
@@ -6400,12 +6400,12 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6400
6400
|
] })
|
|
6401
6401
|
});
|
|
6402
6402
|
}
|
|
6403
|
-
if (e instanceof
|
|
6403
|
+
if (e instanceof Ao) return /* @__PURE__ */ (0, Y.jsx)(yy, {
|
|
6404
6404
|
schema: e,
|
|
6405
6405
|
form: t,
|
|
6406
6406
|
path: n
|
|
6407
6407
|
});
|
|
6408
|
-
if (e instanceof
|
|
6408
|
+
if (e instanceof ts) {
|
|
6409
6409
|
let r = e.options.map((e) => e.toString());
|
|
6410
6410
|
return /* @__PURE__ */ (0, Y.jsx)(xy, {
|
|
6411
6411
|
schema: e,
|
|
@@ -6414,14 +6414,14 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6414
6414
|
options: r
|
|
6415
6415
|
});
|
|
6416
6416
|
}
|
|
6417
|
-
if (e instanceof
|
|
6417
|
+
if (e instanceof co) {
|
|
6418
6418
|
if (o === "text_area_multiline") return /* @__PURE__ */ (0, Y.jsx)(by, {
|
|
6419
6419
|
schema: e,
|
|
6420
6420
|
form: t,
|
|
6421
6421
|
path: n
|
|
6422
6422
|
});
|
|
6423
6423
|
let a = e.element;
|
|
6424
|
-
if (a instanceof
|
|
6424
|
+
if (a instanceof ts) {
|
|
6425
6425
|
let r = a.options.map((e) => e.toString());
|
|
6426
6426
|
return /* @__PURE__ */ (0, Y.jsx)(Sy, {
|
|
6427
6427
|
schema: e,
|
|
@@ -6442,7 +6442,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6442
6442
|
}, n)]
|
|
6443
6443
|
});
|
|
6444
6444
|
}
|
|
6445
|
-
if (e instanceof
|
|
6445
|
+
if (e instanceof to) {
|
|
6446
6446
|
let a = e.def, o = a.options, s = a.discriminator, c = (e) => o.find((t) => ay(t).value === e);
|
|
6447
6447
|
return /* @__PURE__ */ (0, Y.jsx)(Vv, {
|
|
6448
6448
|
control: t.control,
|
|
@@ -6482,7 +6482,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6482
6482
|
}
|
|
6483
6483
|
});
|
|
6484
6484
|
}
|
|
6485
|
-
return e instanceof
|
|
6485
|
+
return e instanceof No ? /* @__PURE__ */ (0, Y.jsx)(Vv, {
|
|
6486
6486
|
control: t.control,
|
|
6487
6487
|
name: n,
|
|
6488
6488
|
render: ({ field: a }) => {
|
|
@@ -6510,7 +6510,7 @@ function _y({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6510
6510
|
]
|
|
6511
6511
|
});
|
|
6512
6512
|
}
|
|
6513
|
-
}) : e instanceof
|
|
6513
|
+
}) : e instanceof yo ? /* @__PURE__ */ (0, Y.jsx)(Vv, {
|
|
6514
6514
|
control: t.control,
|
|
6515
6515
|
name: n,
|
|
6516
6516
|
render: ({ field: t }) => /* @__PURE__ */ (0, Y.jsx)("input", {
|
|
@@ -6698,7 +6698,7 @@ var vy = (e) => {
|
|
|
6698
6698
|
}, e), /* @__PURE__ */ (0, Y.jsx)(Gv, {
|
|
6699
6699
|
className: "whitespace-pre",
|
|
6700
6700
|
htmlFor: `${i}-${e}`,
|
|
6701
|
-
children:
|
|
6701
|
+
children: Ya.startCase(e)
|
|
6702
6702
|
})]
|
|
6703
6703
|
}, e))
|
|
6704
6704
|
}) }),
|
|
@@ -6795,7 +6795,7 @@ function wy(e) {
|
|
|
6795
6795
|
return e.preventDefault();
|
|
6796
6796
|
}
|
|
6797
6797
|
function Ty(e) {
|
|
6798
|
-
return
|
|
6798
|
+
return Ya.startCase(e);
|
|
6799
6799
|
}
|
|
6800
6800
|
function Ey(e) {
|
|
6801
6801
|
return /* @__PURE__ */ (0, Y.jsx)(mn, {
|
|
@@ -6941,7 +6941,7 @@ var Ny = class e {
|
|
|
6941
6941
|
c.error("Error emitting event", e);
|
|
6942
6942
|
}
|
|
6943
6943
|
}
|
|
6944
|
-
#c =
|
|
6944
|
+
#c = Ts(() => {
|
|
6945
6945
|
let e = this.#i[this.#e];
|
|
6946
6946
|
if (e) for (let t of [...e]) try {
|
|
6947
6947
|
t();
|
|
@@ -6996,10 +6996,10 @@ function Hy(e, t) {
|
|
|
6996
6996
|
function Uy(e) {
|
|
6997
6997
|
return e.startsWith(".") ? e.slice(1) : e;
|
|
6998
6998
|
}
|
|
6999
|
-
function Wy(e, t =
|
|
6999
|
+
function Wy(e, t = Bs()) {
|
|
7000
7000
|
let n = Gy(e, t);
|
|
7001
7001
|
if (!n) return e;
|
|
7002
|
-
let r =
|
|
7002
|
+
let r = Aa(n);
|
|
7003
7003
|
return URL.createObjectURL(r);
|
|
7004
7004
|
}
|
|
7005
7005
|
function Gy(e, t) {
|
|
@@ -7018,7 +7018,7 @@ function qy(e) {
|
|
|
7018
7018
|
return typeof e != "string" || e.length === 0 ? !1 : !!(/^(\.?\/)?@file\/[^?#]+$/.test(e) || Yy(e));
|
|
7019
7019
|
}
|
|
7020
7020
|
function Jy() {
|
|
7021
|
-
return
|
|
7021
|
+
return _s.get(j) || k();
|
|
7022
7022
|
}
|
|
7023
7023
|
function Yy(e) {
|
|
7024
7024
|
return e.startsWith("data:text/javascript;base64,") || e.startsWith("data:application/javascript;base64,") || e.startsWith("data:text/css;base64,") ? Jy() : !1;
|
|
@@ -7066,7 +7066,7 @@ var Qy = class {
|
|
|
7066
7066
|
}
|
|
7067
7067
|
async #t(e, t = {}) {
|
|
7068
7068
|
if (!(qy(e) || t.kernelAuthored === !0 && /^(https?:|data:)/.test(e))) throw Error(`Refusing to load anywidget module from untrusted URL: ${String(e)}`);
|
|
7069
|
-
let n =
|
|
7069
|
+
let n = Ii(e).toString(), r = Ls() ? Wy(n) : n, i = () => {
|
|
7070
7070
|
r !== n && URL.revokeObjectURL(r);
|
|
7071
7071
|
};
|
|
7072
7072
|
try {
|
|
@@ -7189,7 +7189,7 @@ var tb = class e {
|
|
|
7189
7189
|
#r;
|
|
7190
7190
|
#i;
|
|
7191
7191
|
#a = new AbortController();
|
|
7192
|
-
#o = new
|
|
7192
|
+
#o = new ji();
|
|
7193
7193
|
#s = /* @__PURE__ */ new Set();
|
|
7194
7194
|
#c = /* @__PURE__ */ new Map();
|
|
7195
7195
|
#l;
|
|
@@ -7403,10 +7403,10 @@ function cb(e) {
|
|
|
7403
7403
|
};
|
|
7404
7404
|
let n = structuredClone(e), r = [], i = [];
|
|
7405
7405
|
for (let a of t) {
|
|
7406
|
-
let t =
|
|
7406
|
+
let t = Cs(e, a);
|
|
7407
7407
|
if (t instanceof DataView) {
|
|
7408
7408
|
let e = L(t);
|
|
7409
|
-
r.push(e), i.push(a),
|
|
7409
|
+
r.push(e), i.push(a), jo(n, a, e);
|
|
7410
7410
|
}
|
|
7411
7411
|
}
|
|
7412
7412
|
return {
|
|
@@ -7418,18 +7418,18 @@ function cb(e) {
|
|
|
7418
7418
|
function lb(e) {
|
|
7419
7419
|
let { state: t, bufferPaths: n, buffers: r } = e;
|
|
7420
7420
|
if (!n || n.length === 0) return t;
|
|
7421
|
-
r &&
|
|
7421
|
+
r && Ds(r.length === n.length, "Buffers and buffer paths not the same length");
|
|
7422
7422
|
let i = t;
|
|
7423
7423
|
for (let [e, t] of n.entries()) {
|
|
7424
7424
|
let n = r?.[e];
|
|
7425
|
-
n == null ? c.warn("[anywidget] Could not find buffer at path", t) : typeof n == "string" ?
|
|
7425
|
+
n == null ? c.warn("[anywidget] Could not find buffer at path", t) : typeof n == "string" ? jo(i, t, O(n)) : jo(i, t, n);
|
|
7426
7426
|
}
|
|
7427
7427
|
return i;
|
|
7428
7428
|
}
|
|
7429
7429
|
//#endregion
|
|
7430
7430
|
//#region src/plugins/impl/anywidget/registry.ts
|
|
7431
7431
|
function ub() {
|
|
7432
|
-
let e =
|
|
7432
|
+
let e = _s.get(Ps).mode;
|
|
7433
7433
|
return e === "edit" || e === "present";
|
|
7434
7434
|
}
|
|
7435
7435
|
var db = new class {
|
|
@@ -7500,8 +7500,8 @@ async function fb(e, t) {
|
|
|
7500
7500
|
}
|
|
7501
7501
|
e.createModel(n, (e) => {
|
|
7502
7502
|
let t = new ec(1), r = (r) => t.run(async () => {
|
|
7503
|
-
e.aborted ? c.debug(`[Model] ${r.message.method} suppressed for model=${n} (signal aborted)`) : await
|
|
7504
|
-
}), i =
|
|
7503
|
+
e.aborted ? c.debug(`[Model] ${r.message.method} suppressed for model=${n} (signal aborted)`) : await na().sendModelValue(r);
|
|
7504
|
+
}), i = Ls() ? {
|
|
7505
7505
|
sendUpdate: async () => void 0,
|
|
7506
7506
|
sendCustomMessage: async () => void 0
|
|
7507
7507
|
} : {
|
|
@@ -7552,7 +7552,7 @@ async function fb(e, t) {
|
|
|
7552
7552
|
My(await e.getModel(n)).updateAndEmitDiffs(o);
|
|
7553
7553
|
return;
|
|
7554
7554
|
}
|
|
7555
|
-
default:
|
|
7555
|
+
default: Za(r);
|
|
7556
7556
|
}
|
|
7557
7557
|
}
|
|
7558
7558
|
ce(db, "WIDGET_REGISTRY");
|
|
@@ -7681,7 +7681,7 @@ function wb(e) {
|
|
|
7681
7681
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (o = { ...Cb }, t[0] = o) : o = t[0];
|
|
7682
7682
|
let s = (0, J.useRef)(o), c;
|
|
7683
7683
|
t[1] === e ? c = t[2] : (c = (t) => e.onResize?.(t), t[1] = e, t[2] = c);
|
|
7684
|
-
let l =
|
|
7684
|
+
let l = Os(c), u, d;
|
|
7685
7685
|
t[3] !== a || t[4] !== l || t[5] !== n || t[6] !== i ? (u = () => {
|
|
7686
7686
|
if (!n.current || i || typeof window > "u" || !("ResizeObserver" in window)) return;
|
|
7687
7687
|
let e = new ResizeObserver((e) => {
|
|
@@ -7754,7 +7754,7 @@ var Eb = (e) => {
|
|
|
7754
7754
|
onValueChange: c,
|
|
7755
7755
|
children: [p, h]
|
|
7756
7756
|
}), t[20] = p, t[21] = h, t[22] = g) : g = t[22], g;
|
|
7757
|
-
}, Db =
|
|
7757
|
+
}, Db = Ro(({ container: e, children: t }) => (0, Od.createPortal)(t, e ?? document.body)), Ob = 8, kb = (e) => {
|
|
7758
7758
|
let t = (0, X.c)(18), { anchorRef: n, open: r, children: i } = e, [a, o] = J.useState(null), s = J.useRef(null), c;
|
|
7759
7759
|
t[0] === n ? c = t[1] : (c = () => {
|
|
7760
7760
|
if (!n.current) return;
|
|
@@ -7806,7 +7806,7 @@ var Eb = (e) => {
|
|
|
7806
7806
|
items: H(this.menuItemValidator)
|
|
7807
7807
|
});
|
|
7808
7808
|
validator = K({
|
|
7809
|
-
items: H(
|
|
7809
|
+
items: H(Wo([this.menuItemValidator, this.menuItemGroupValidator])),
|
|
7810
7810
|
orientation: V(["horizontal", "vertical"])
|
|
7811
7811
|
});
|
|
7812
7812
|
render(e) {
|
|
@@ -7893,10 +7893,10 @@ function Pb(e) {
|
|
|
7893
7893
|
}
|
|
7894
7894
|
function Fb(e) {
|
|
7895
7895
|
let t = new URL(globalThis.location.href);
|
|
7896
|
-
return
|
|
7896
|
+
return Mi({
|
|
7897
7897
|
href: e,
|
|
7898
7898
|
queryParams: t.search,
|
|
7899
|
-
keys: [
|
|
7899
|
+
keys: [os.filePath]
|
|
7900
7900
|
});
|
|
7901
7901
|
}
|
|
7902
7902
|
//#endregion
|
|
@@ -7927,7 +7927,7 @@ var Lb = class e {
|
|
|
7927
7927
|
let n = this.entries.get(e);
|
|
7928
7928
|
n === void 0 ? this.entries.set(e, {
|
|
7929
7929
|
objectId: e,
|
|
7930
|
-
value:
|
|
7930
|
+
value: wa(t, this),
|
|
7931
7931
|
elements: /* @__PURE__ */ new Set([t])
|
|
7932
7932
|
}) : n.elements.add(t);
|
|
7933
7933
|
}
|
|
@@ -7947,7 +7947,7 @@ var Lb = class e {
|
|
|
7947
7947
|
broadcastMessage(e, t, n) {
|
|
7948
7948
|
let r = this.entries.get(e);
|
|
7949
7949
|
r === void 0 ? c.warn("UIElementRegistry missing entry", e) : Ib(t) ? (r.value = t.value, r.elements.forEach((e) => {
|
|
7950
|
-
e.dispatchEvent(
|
|
7950
|
+
e.dispatchEvent(Pa.create({
|
|
7951
7951
|
bubbles: !1,
|
|
7952
7952
|
composed: !0,
|
|
7953
7953
|
detail: {
|
|
@@ -7956,7 +7956,7 @@ var Lb = class e {
|
|
|
7956
7956
|
}
|
|
7957
7957
|
}));
|
|
7958
7958
|
})) : r.elements.forEach((r) => {
|
|
7959
|
-
r.dispatchEvent(
|
|
7959
|
+
r.dispatchEvent(ka.create({
|
|
7960
7960
|
bubbles: !1,
|
|
7961
7961
|
composed: !0,
|
|
7962
7962
|
detail: {
|
|
@@ -7970,7 +7970,7 @@ var Lb = class e {
|
|
|
7970
7970
|
broadcastValueUpdate(e, t, n) {
|
|
7971
7971
|
let r = this.entries.get(t);
|
|
7972
7972
|
r === void 0 ? c.warn("UIElementRegistry missing entry", t) : (r.value = n, r.elements.forEach((t) => {
|
|
7973
|
-
t !== e && t.dispatchEvent(
|
|
7973
|
+
t !== e && t.dispatchEvent(Pa.create({
|
|
7974
7974
|
bubbles: !1,
|
|
7975
7975
|
composed: !0,
|
|
7976
7976
|
detail: {
|
|
@@ -7978,19 +7978,19 @@ var Lb = class e {
|
|
|
7978
7978
|
element: t
|
|
7979
7979
|
}
|
|
7980
7980
|
}));
|
|
7981
|
-
}), document.dispatchEvent(
|
|
7981
|
+
}), document.dispatchEvent(Ma.create({
|
|
7982
7982
|
bubbles: !0,
|
|
7983
7983
|
composed: !0,
|
|
7984
7984
|
detail: { objectId: t }
|
|
7985
7985
|
})));
|
|
7986
7986
|
}
|
|
7987
7987
|
}, Rb = Lb.INSTANCE, zb = new De("function-call-result", async (e, t) => {
|
|
7988
|
-
await
|
|
7988
|
+
await na().sendFunctionRequest({
|
|
7989
7989
|
functionCallId: e,
|
|
7990
7990
|
...t
|
|
7991
7991
|
});
|
|
7992
7992
|
}), Bb = (e) => {
|
|
7993
|
-
let t = (0, X.c)(5), { children: n } = e, r =
|
|
7993
|
+
let t = (0, X.c)(5), { children: n } = e, r = uo(Vo), i;
|
|
7994
7994
|
t[0] === r ? i = t[1] : (i = rr(r), t[0] = r, t[1] = i);
|
|
7995
7995
|
let a;
|
|
7996
7996
|
return t[2] !== n || t[3] !== i ? (a = /* @__PURE__ */ (0, Y.jsx)(Yr, {
|
|
@@ -8004,7 +8004,7 @@ function Vb(e, t) {
|
|
|
8004
8004
|
return e === t ? !0 : e == null || t == null ? !1 : Array.isArray(e) && Array.isArray(t) ? Gs(e, t) : typeof e == "object" && typeof t == "object" && Hb(e, t);
|
|
8005
8005
|
}
|
|
8006
8006
|
function Hb(e, t) {
|
|
8007
|
-
return Object.keys(e).length === Object.keys(t).length &&
|
|
8007
|
+
return Object.keys(e).length === Object.keys(t).length && Es.keys(e).every((n) => e[n] === t[n]);
|
|
8008
8008
|
}
|
|
8009
8009
|
//#endregion
|
|
8010
8010
|
//#region src/core/dom/defineCustomElement.ts
|
|
@@ -8263,24 +8263,24 @@ function _x(e) {
|
|
|
8263
8263
|
}
|
|
8264
8264
|
function vx({ store: e, source: t, signal: n }) {
|
|
8265
8265
|
n.throwIfAborted();
|
|
8266
|
-
let r =
|
|
8266
|
+
let r = Oo({
|
|
8267
8267
|
confirmed: e.get(t),
|
|
8268
8268
|
drafts: /* @__PURE__ */ new Map(),
|
|
8269
8269
|
pending: null
|
|
8270
|
-
}), i =
|
|
8270
|
+
}), i = Oo((e) => {
|
|
8271
8271
|
let t = e(r);
|
|
8272
8272
|
return t.confirmed === null ? null : px(t.confirmed, hx(t));
|
|
8273
|
-
}), a =
|
|
8273
|
+
}), a = Oo((e) => {
|
|
8274
8274
|
let t = e(r);
|
|
8275
8275
|
return t.confirmed === null ? null : mx(t.confirmed, hx(t));
|
|
8276
|
-
}), o =
|
|
8276
|
+
}), o = Oo((e) => e(r).pending?.submission ?? null), s = e.sub(t, () => {
|
|
8277
8277
|
let n = e.get(t);
|
|
8278
8278
|
e.set(r, (e) => _x({
|
|
8279
8279
|
...e,
|
|
8280
8280
|
confirmed: n,
|
|
8281
8281
|
pending: n !== null && e.pending !== null && n.revision.notebook_id !== e.pending.submission.notebookId ? null : e.pending
|
|
8282
8282
|
}));
|
|
8283
|
-
}), c = !1, l =
|
|
8283
|
+
}), c = !1, l = Oo(null, (e, i, a) => {
|
|
8284
8284
|
if (c) throw Error("Document transactions cannot be nested");
|
|
8285
8285
|
let o = e(r);
|
|
8286
8286
|
if (!(n.aborted || o.confirmed === null)) {
|
|
@@ -8293,7 +8293,7 @@ function vx({ store: e, source: t, signal: n }) {
|
|
|
8293
8293
|
c = !1;
|
|
8294
8294
|
}
|
|
8295
8295
|
}
|
|
8296
|
-
}), u =
|
|
8296
|
+
}), u = Oo(null, (e, t) => {
|
|
8297
8297
|
let i = e(r);
|
|
8298
8298
|
if (n.aborted || i.confirmed === null || i.pending !== null) return null;
|
|
8299
8299
|
let a = hx(i), o = mx(i.confirmed, a);
|
|
@@ -8311,7 +8311,7 @@ function vx({ store: e, source: t, signal: n }) {
|
|
|
8311
8311
|
responseRevision: null
|
|
8312
8312
|
}
|
|
8313
8313
|
}), s;
|
|
8314
|
-
}), d =
|
|
8314
|
+
}), d = Oo(null, (e, t, i, a) => {
|
|
8315
8315
|
let o = e(r);
|
|
8316
8316
|
if (!(n.aborted || o.pending?.submission !== i || o.pending.responseRevision !== null)) {
|
|
8317
8317
|
if (a !== null && a.notebook_id !== i.notebookId) throw Error("Edit response belongs to another notebook");
|
|
@@ -8404,7 +8404,7 @@ function Tx(e, t) {
|
|
|
8404
8404
|
}
|
|
8405
8405
|
function Ex({ store: e, documentAtom: t, backendAtom: n, state: r, signal: i }) {
|
|
8406
8406
|
i.throwIfAborted();
|
|
8407
|
-
let a =
|
|
8407
|
+
let a = Oo({ status: "idle" }), o = Oo((e) => ({
|
|
8408
8408
|
document: e(t),
|
|
8409
8409
|
backend: e(n),
|
|
8410
8410
|
pending: e(r.pendingAtom),
|
|
@@ -8533,20 +8533,20 @@ function Ex({ store: e, documentAtom: t, backendAtom: n, state: r, signal: i })
|
|
|
8533
8533
|
//#endregion
|
|
8534
8534
|
//#region src/core/notebook/document/model.ts
|
|
8535
8535
|
function Dx({ store: e, documentAtom: t, backendAtom: n }) {
|
|
8536
|
-
let r =
|
|
8536
|
+
let r = Oo(null);
|
|
8537
8537
|
function i() {
|
|
8538
8538
|
return Promise.reject(/* @__PURE__ */ Error("The document model is not started"));
|
|
8539
8539
|
}
|
|
8540
8540
|
return {
|
|
8541
|
-
documentAtom:
|
|
8541
|
+
documentAtom: Oo((e) => {
|
|
8542
8542
|
let t = e(r);
|
|
8543
8543
|
return t ? e(t.state.documentAtom) : null;
|
|
8544
8544
|
}),
|
|
8545
|
-
editAtom:
|
|
8545
|
+
editAtom: Oo(null, (e, t, n) => {
|
|
8546
8546
|
let i = e(r);
|
|
8547
8547
|
i && t(i.state.editAtom, n);
|
|
8548
8548
|
}),
|
|
8549
|
-
syncStatusAtom:
|
|
8549
|
+
syncStatusAtom: Oo((e) => {
|
|
8550
8550
|
let t = e(r);
|
|
8551
8551
|
return t ? e(t.sync.statusAtom) : { status: "unavailable" };
|
|
8552
8552
|
}),
|
|
@@ -8615,7 +8615,7 @@ function Ox(e, t) {
|
|
|
8615
8615
|
type: "condition",
|
|
8616
8616
|
negate: !1
|
|
8617
8617
|
}];
|
|
8618
|
-
default:
|
|
8618
|
+
default: Za(t);
|
|
8619
8619
|
}
|
|
8620
8620
|
case "text": switch (t.operator) {
|
|
8621
8621
|
case "contains":
|
|
@@ -8644,7 +8644,7 @@ function Ox(e, t) {
|
|
|
8644
8644
|
type: "condition",
|
|
8645
8645
|
negate: !1
|
|
8646
8646
|
}];
|
|
8647
|
-
default:
|
|
8647
|
+
default: Za(t);
|
|
8648
8648
|
}
|
|
8649
8649
|
case "date":
|
|
8650
8650
|
case "datetime":
|
|
@@ -8673,7 +8673,7 @@ function Ox(e, t) {
|
|
|
8673
8673
|
type: "condition",
|
|
8674
8674
|
negate: !1
|
|
8675
8675
|
}];
|
|
8676
|
-
default:
|
|
8676
|
+
default: Za(t);
|
|
8677
8677
|
}
|
|
8678
8678
|
}
|
|
8679
8679
|
case "boolean": return [{
|
|
@@ -8682,7 +8682,7 @@ function Ox(e, t) {
|
|
|
8682
8682
|
type: "condition",
|
|
8683
8683
|
negate: !1
|
|
8684
8684
|
}];
|
|
8685
|
-
default:
|
|
8685
|
+
default: Za(t);
|
|
8686
8686
|
}
|
|
8687
8687
|
}
|
|
8688
8688
|
function kx(e) {
|
|
@@ -8695,9 +8695,9 @@ function kx(e) {
|
|
|
8695
8695
|
}
|
|
8696
8696
|
//#endregion
|
|
8697
8697
|
//#region src/components/editor/chrome/panels/context-aware-panel/atoms.ts
|
|
8698
|
-
var Ax =
|
|
8699
|
-
|
|
8700
|
-
var Nx =
|
|
8698
|
+
var Ax = Oo(null), jx = Oo(null), Mx = Oo(!1);
|
|
8699
|
+
Oo(!1);
|
|
8700
|
+
var Nx = Oo(!1), Px = 0, Fx = 1, Ix = 2, Lx = 4;
|
|
8701
8701
|
function Rx(e) {
|
|
8702
8702
|
return () => e;
|
|
8703
8703
|
}
|
|
@@ -11448,7 +11448,7 @@ function aE(e) {
|
|
|
11448
11448
|
//#region src/plugins/core/BadPlugin.tsx
|
|
11449
11449
|
var oE = Wn, sE = pr, cE = En, lE = An, uE = (e) => {
|
|
11450
11450
|
let t = (0, X.c)(13), { error: n, badData: r } = e;
|
|
11451
|
-
if (n instanceof
|
|
11451
|
+
if (n instanceof qo) {
|
|
11452
11452
|
let e;
|
|
11453
11453
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(Vs, { children: "Bad Data" }), t[0] = e) : e = t[0];
|
|
11454
11454
|
let i;
|
|
@@ -11510,44 +11510,44 @@ function fE(e) {
|
|
|
11510
11510
|
//#region src/plugins/core/registerReactComponent.tsx
|
|
11511
11511
|
var pE = 3, mE = 150;
|
|
11512
11512
|
function hE({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
11513
|
-
let [o, s] = (0, J.useState)(n), [l, d] = (0, J.useState)(r), f = (0, J.useRef)(l), { theme: p } =
|
|
11513
|
+
let [o, s] = (0, J.useState)(n), [l, d] = (0, J.useState)(r), f = (0, J.useRef)(l), { theme: p } = ms(), m = (e) => {
|
|
11514
11514
|
f.current = e, d(e);
|
|
11515
|
-
}, [h, g] = (0, J.useState)(() => t.validator.safeParse(
|
|
11515
|
+
}, [h, g] = (0, J.useState)(() => t.validator.safeParse(Qi(e))), [_, v] = (0, J.useState)(0);
|
|
11516
11516
|
(0, J.useImperativeHandle)(i, () => ({
|
|
11517
11517
|
reset: () => {
|
|
11518
|
-
m(r()), g(t.validator.safeParse(
|
|
11518
|
+
m(r()), g(t.validator.safeParse(Qi(e))), v((e) => e + 1);
|
|
11519
11519
|
},
|
|
11520
11520
|
setChildren: (e) => {
|
|
11521
11521
|
s(e);
|
|
11522
11522
|
}
|
|
11523
|
-
})), u(e,
|
|
11523
|
+
})), u(e, Pa.TYPE, (t) => {
|
|
11524
11524
|
t.detail.element === e && m(t.detail.value);
|
|
11525
11525
|
}), (0, J.useEffect)(() => {
|
|
11526
11526
|
let n = new MutationObserver((n) => {
|
|
11527
|
-
n.some((e) => e.type === "attributes" && e.attributeName?.startsWith("data-")) && g(t.validator.safeParse(
|
|
11527
|
+
n.some((e) => e.type === "attributes" && e.attributeName?.startsWith("data-")) && g(t.validator.safeParse(Qi(e)));
|
|
11528
11528
|
});
|
|
11529
11529
|
return n.observe(e, { attributes: !0 }), () => {
|
|
11530
11530
|
n.disconnect();
|
|
11531
11531
|
};
|
|
11532
11532
|
}, [e, t.validator]);
|
|
11533
|
-
let y =
|
|
11533
|
+
let y = Os((t) => {
|
|
11534
11534
|
let n = f.current, r = a.asUpdater(t)(n);
|
|
11535
|
-
m(r), !Vb(r, n) && e.dispatchEvent(
|
|
11535
|
+
m(r), !Vb(r, n) && e.dispatchEvent(Ea(r, e));
|
|
11536
11536
|
}), b = (0, J.useMemo)(() => {
|
|
11537
11537
|
if (!t.functions) return {};
|
|
11538
11538
|
let n = {};
|
|
11539
|
-
for (let [r, i] of
|
|
11539
|
+
for (let [r, i] of Es.entries(t.functions)) {
|
|
11540
11540
|
let { input: t, output: a } = i;
|
|
11541
11541
|
n[r] = async (...n) => {
|
|
11542
|
-
|
|
11543
|
-
let i =
|
|
11542
|
+
Ds(n.length <= 1, `Plugin functions only supports a single argument. Called ${r}`);
|
|
11543
|
+
let i = Ls(), o = Sa.findElementThroughShadowDOMs(e)?.id, s = o ? Sa.parse(o) : null;
|
|
11544
11544
|
if (s && !i) {
|
|
11545
|
-
if (
|
|
11545
|
+
if (va(Ki(_s.get($i), s))) throw new ys();
|
|
11546
11546
|
} else c.warn(`Cell ID ${s} cannot be found`);
|
|
11547
11547
|
let l = SE(t, n[0]);
|
|
11548
11548
|
for (let t = 0;; t++) {
|
|
11549
11549
|
let n = TE(e);
|
|
11550
|
-
|
|
11550
|
+
Ds(n, "Object ID should exist");
|
|
11551
11551
|
let i = await zb.request({
|
|
11552
11552
|
args: l,
|
|
11553
11553
|
functionName: r,
|
|
@@ -11558,7 +11558,7 @@ function hE({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
11558
11558
|
if (o && t < pE) {
|
|
11559
11559
|
let e = mE * 2 ** t;
|
|
11560
11560
|
await new Promise((t) => setTimeout(t, e));
|
|
11561
|
-
} else throw c.error(i.status), o ? new
|
|
11561
|
+
} else throw c.error(i.status), o ? new xs() : Error(i.status.message || "Unknown error");
|
|
11562
11562
|
}
|
|
11563
11563
|
};
|
|
11564
11564
|
}
|
|
@@ -11568,7 +11568,7 @@ function hE({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
11568
11568
|
e,
|
|
11569
11569
|
_
|
|
11570
11570
|
]);
|
|
11571
|
-
return h.success ? /* @__PURE__ */ (0, Y.jsx)(
|
|
11571
|
+
return h.success ? /* @__PURE__ */ (0, Y.jsx)(Ho, { children: /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
11572
11572
|
className: `contents ${p}`,
|
|
11573
11573
|
children: /* @__PURE__ */ (0, Y.jsx)(J.Suspense, {
|
|
11574
11574
|
fallback: /* @__PURE__ */ (0, Y.jsx)("div", {}),
|
|
@@ -11581,7 +11581,7 @@ function hE({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
11581
11581
|
functions: b
|
|
11582
11582
|
}) })
|
|
11583
11583
|
})
|
|
11584
|
-
}) }) : dE(h.error,
|
|
11584
|
+
}) }) : dE(h.error, Es.mapValues(e.dataset, (e) => typeof e == "string" ? qi(e) : e));
|
|
11585
11585
|
}
|
|
11586
11586
|
var gE = J.forwardRef(hE), _E = /* @__PURE__ */ new Map(), vE = "__custom_marimo_element__";
|
|
11587
11587
|
function yE(e) {
|
|
@@ -11597,7 +11597,7 @@ function yE(e) {
|
|
|
11597
11597
|
});
|
|
11598
11598
|
}
|
|
11599
11599
|
connectedCallback() {
|
|
11600
|
-
this.isLightDOMChildOfMarimoElement() || (this.mounted || (
|
|
11600
|
+
this.isLightDOMChildOfMarimoElement() || (this.mounted || (Ds(this.shadowRoot, "Shadow root should exist"), this.root && this.root.unmount(), this.root = Rg.createRoot(this.shadowRoot), this.mountReactComponent()), this.observer.observe(this, {
|
|
11601
11601
|
attributes: !0,
|
|
11602
11602
|
childList: !0,
|
|
11603
11603
|
subtree: !0,
|
|
@@ -11616,7 +11616,7 @@ function yE(e) {
|
|
|
11616
11616
|
return !1;
|
|
11617
11617
|
}
|
|
11618
11618
|
reset() {
|
|
11619
|
-
this.dispatchEvent(
|
|
11619
|
+
this.dispatchEvent(Ea(qi(this.dataset.initialValue), this)), this.rerender();
|
|
11620
11620
|
}
|
|
11621
11621
|
rerender() {
|
|
11622
11622
|
this.pluginRef.current?.reset();
|
|
@@ -11631,20 +11631,20 @@ function yE(e) {
|
|
|
11631
11631
|
}) }, t));
|
|
11632
11632
|
}
|
|
11633
11633
|
async mountReactComponent() {
|
|
11634
|
-
this.mounted = !0,
|
|
11635
|
-
store:
|
|
11634
|
+
this.mounted = !0, Ds(this.root, "Root must be defined"), this.root.render(/* @__PURE__ */ (0, Y.jsx)(bo, {
|
|
11635
|
+
store: _s,
|
|
11636
11636
|
children: /* @__PURE__ */ (0, Y.jsx)(Bb, { children: /* @__PURE__ */ (0, Y.jsx)(gE, {
|
|
11637
11637
|
hostElement: this,
|
|
11638
11638
|
plugin: e,
|
|
11639
11639
|
ref: this.pluginRef,
|
|
11640
|
-
getInitialValue: () =>
|
|
11640
|
+
getInitialValue: () => wa(this, Lb.INSTANCE),
|
|
11641
11641
|
children: this.getChildren()
|
|
11642
11642
|
}) })
|
|
11643
11643
|
}));
|
|
11644
11644
|
}
|
|
11645
11645
|
async copyStyles() {
|
|
11646
11646
|
let t = this.shadowRoot;
|
|
11647
|
-
if (
|
|
11647
|
+
if (Ds(t, "Shadow root should exist"), !this.isAdoptedStyleSheetsSupported()) {
|
|
11648
11648
|
c.warn("adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser."), this.copyStylesFallback();
|
|
11649
11649
|
return;
|
|
11650
11650
|
}
|
|
@@ -11666,7 +11666,7 @@ function yE(e) {
|
|
|
11666
11666
|
}
|
|
11667
11667
|
copyStylesFallback() {
|
|
11668
11668
|
let t = this.shadowRoot;
|
|
11669
|
-
|
|
11669
|
+
Ds(t, "Shadow root should exist"), c.warn("adoptedStyleSheets not supported, copying stylesheets in a less performance way. Please consider upgrading your browser.");
|
|
11670
11670
|
let n = Array.from(document.styleSheets).flatMap((e) => {
|
|
11671
11671
|
if (!bE(e)) return [];
|
|
11672
11672
|
let t = document.createElement("style");
|
|
@@ -11696,7 +11696,7 @@ function xE(e) {
|
|
|
11696
11696
|
}
|
|
11697
11697
|
function SE(e, t) {
|
|
11698
11698
|
let n = e.safeParse(t);
|
|
11699
|
-
if (!n.success) throw c.log("Failed to parse data", t, n.error), Error(
|
|
11699
|
+
if (!n.success) throw c.log("Failed to parse data", t, n.error), Error(Lo(n.error));
|
|
11700
11700
|
return n.data;
|
|
11701
11701
|
}
|
|
11702
11702
|
//#endregion
|
|
@@ -11708,7 +11708,7 @@ function wE() {
|
|
|
11708
11708
|
inputListener = a.NOOP;
|
|
11709
11709
|
init() {
|
|
11710
11710
|
if (this.initialized) return;
|
|
11711
|
-
let e =
|
|
11711
|
+
let e = zi.parseOrThrow(this);
|
|
11712
11712
|
this.inputListener = (n) => {
|
|
11713
11713
|
e !== null && n.detail.element === this.firstElementChild && (Rb.has(e) || Rb.registerInstance(e, t), Rb.broadcastValueUpdate(t, e, n.detail.value));
|
|
11714
11714
|
};
|
|
@@ -11717,14 +11717,14 @@ function wE() {
|
|
|
11717
11717
|
}
|
|
11718
11718
|
connectedCallback() {
|
|
11719
11719
|
if (this.init(), this.initialized) {
|
|
11720
|
-
let e =
|
|
11721
|
-
Rb.registerInstance(e, t), document.addEventListener(
|
|
11720
|
+
let e = zi.parseOrThrow(this), t = this.firstElementChild;
|
|
11721
|
+
Rb.registerInstance(e, t), document.addEventListener(Ta.TYPE, this.inputListener);
|
|
11722
11722
|
}
|
|
11723
11723
|
}
|
|
11724
11724
|
disconnectedCallback() {
|
|
11725
11725
|
if (this.initialized) {
|
|
11726
|
-
document.removeEventListener(
|
|
11727
|
-
let e =
|
|
11726
|
+
document.removeEventListener(Ta.TYPE, this.inputListener);
|
|
11727
|
+
let e = zi.parseOrThrow(this);
|
|
11728
11728
|
Rb.removeInstance(e, this.firstElementChild);
|
|
11729
11729
|
}
|
|
11730
11730
|
}
|
|
@@ -11733,7 +11733,7 @@ function wE() {
|
|
|
11733
11733
|
xE(e) ? e.reset() : c.error("[marimo-ui-element] first child must have a reset method");
|
|
11734
11734
|
}
|
|
11735
11735
|
static get observedAttributes() {
|
|
11736
|
-
return [
|
|
11736
|
+
return [Li];
|
|
11737
11737
|
}
|
|
11738
11738
|
attributeChangedCallback(e, t, n) {
|
|
11739
11739
|
if (this.initialized && e === "random-id" && t !== n) {
|
|
@@ -11747,16 +11747,16 @@ function wE() {
|
|
|
11747
11747
|
}
|
|
11748
11748
|
function TE(e) {
|
|
11749
11749
|
if (!e) return null;
|
|
11750
|
-
if (e.nodeName === CE) return
|
|
11750
|
+
if (e.nodeName === CE) return zi.parseOrThrow(e);
|
|
11751
11751
|
let t = e.parentElement;
|
|
11752
|
-
return t?.nodeName === CE ?
|
|
11752
|
+
return t?.nodeName === CE ? zi.parseOrThrow(t) : null;
|
|
11753
11753
|
}
|
|
11754
11754
|
function EE(e) {
|
|
11755
11755
|
return e.tagName === CE;
|
|
11756
11756
|
}
|
|
11757
11757
|
//#endregion
|
|
11758
11758
|
//#region src/components/editor/renderers/vertical-layout/sidebar/state.ts
|
|
11759
|
-
var DE =
|
|
11759
|
+
var DE = so({ isOpen: !0 }, (e, t) => {
|
|
11760
11760
|
if (!t) return e;
|
|
11761
11761
|
switch (t.type) {
|
|
11762
11762
|
case "toggle": return {
|
|
@@ -11769,7 +11769,7 @@ var DE = ao({ isOpen: !0 }, (e, t) => {
|
|
|
11769
11769
|
};
|
|
11770
11770
|
default: return e;
|
|
11771
11771
|
}
|
|
11772
|
-
}), OE = (0,
|
|
11772
|
+
}), OE = (0, zg.init)({ length: 6 });
|
|
11773
11773
|
function kE() {
|
|
11774
11774
|
Ub("marimo-sidebar", class extends HTMLElement {
|
|
11775
11775
|
observer;
|
|
@@ -11810,10 +11810,10 @@ function kE() {
|
|
|
11810
11810
|
syncWidth() {
|
|
11811
11811
|
try {
|
|
11812
11812
|
let e = this.dataset.width;
|
|
11813
|
-
e ?
|
|
11813
|
+
e ? _s.set(DE, {
|
|
11814
11814
|
type: "setWidth",
|
|
11815
11815
|
width: JSON.parse(e)
|
|
11816
|
-
}) :
|
|
11816
|
+
}) : _s.set(DE, {
|
|
11817
11817
|
type: "setWidth",
|
|
11818
11818
|
width: void 0
|
|
11819
11819
|
});
|
|
@@ -11855,8 +11855,8 @@ function AE(e, t = {}) {
|
|
|
11855
11855
|
}
|
|
11856
11856
|
//#endregion
|
|
11857
11857
|
//#region src/plugins/impl/anywidget/AnyWidgetPlugin.tsx
|
|
11858
|
-
var jE = AE("marimo-anywidget").withData(K({ modelId:
|
|
11859
|
-
let t = (0, X.c)(9), { modelId: n } = e.data, r = (0, J.useRef)(null), [i, a] = (0, J.useState)(), o =
|
|
11858
|
+
var jE = AE("marimo-anywidget").withData(K({ modelId: mo(Oy, { message: "Expected a non-empty widget model id" }) })).withFunctions({}).renderer((e) => /* @__PURE__ */ (0, Y.jsx)(ME, { ...e })), ME = (e) => {
|
|
11859
|
+
let t = (0, X.c)(9), { modelId: n } = e.data, r = (0, J.useRef)(null), [i, a] = (0, J.useState)(), o = uo(oc), s, c;
|
|
11860
11860
|
t[0] !== o || t[1] !== n ? (s = () => {
|
|
11861
11861
|
if (!o) return;
|
|
11862
11862
|
let e = r.current;
|
|
@@ -11871,7 +11871,7 @@ var jE = AE("marimo-anywidget").withData(K({ modelId: fo(Oy, { message: "Expecte
|
|
|
11871
11871
|
}), () => t.abort();
|
|
11872
11872
|
}, c = [o, n], t[0] = o, t[1] = n, t[2] = s, t[3] = c) : (s = t[2], c = t[3]), (0, J.useEffect)(s, c);
|
|
11873
11873
|
let l;
|
|
11874
|
-
t[4] === i ? l = t[5] : (l = i ? /* @__PURE__ */ (0, Y.jsx)(
|
|
11874
|
+
t[4] === i ? l = t[5] : (l = i ? /* @__PURE__ */ (0, Y.jsx)(bs, { error: i }) : null, t[4] = i, t[5] = l);
|
|
11875
11875
|
let u;
|
|
11876
11876
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (u = /* @__PURE__ */ (0, Y.jsx)("div", { ref: r }), t[6] = u) : u = t[6];
|
|
11877
11877
|
let d;
|
|
@@ -12190,7 +12190,7 @@ var UE = (e) => {
|
|
|
12190
12190
|
minHeight: U().optional(),
|
|
12191
12191
|
maxHeight: U().optional(),
|
|
12192
12192
|
showCopyButton: G().optional(),
|
|
12193
|
-
debounce:
|
|
12193
|
+
debounce: Wo([G(), U()]).default(!1)
|
|
12194
12194
|
});
|
|
12195
12195
|
render(e) {
|
|
12196
12196
|
return /* @__PURE__ */ (0, Y.jsx)(qE, {
|
|
@@ -12200,7 +12200,7 @@ var UE = (e) => {
|
|
|
12200
12200
|
});
|
|
12201
12201
|
}
|
|
12202
12202
|
}, qE = (e) => {
|
|
12203
|
-
let t = (0, X.c)(36), { theme: n } =
|
|
12203
|
+
let t = (0, X.c)(36), { theme: n } = ms(), r = e.theme || n, i = e.minHeight ? `${e.minHeight}px` : "70px", a = e.maxHeight ? `${e.maxHeight}px` : void 0, [o, s] = (0, J.useState)(e.value), c = e.value, l = Number.isFinite(e.debounce) ? e.debounce : 0, u = e.setValue, d;
|
|
12204
12204
|
t[0] === e.debounce ? d = t[1] : (d = Number.isFinite(e.debounce), t[0] = e.debounce, t[1] = d);
|
|
12205
12205
|
let f = !d, p;
|
|
12206
12206
|
t[2] !== e.setValue || t[3] !== e.value || t[4] !== l || t[5] !== f ? (p = {
|
|
@@ -12213,7 +12213,7 @@ var UE = (e) => {
|
|
|
12213
12213
|
t[7] !== e || t[8] !== m ? (h = (t) => {
|
|
12214
12214
|
s(t), typeof e.debounce == "number" ? m(t) : e.debounce || e.setValue(t);
|
|
12215
12215
|
}, t[7] = e, t[8] = m, t[9] = h) : h = t[9];
|
|
12216
|
-
let g =
|
|
12216
|
+
let g = Os(h), _, v;
|
|
12217
12217
|
t[10] === e.value ? (_ = t[11], v = t[12]) : (_ = () => {
|
|
12218
12218
|
s(e.value);
|
|
12219
12219
|
}, v = [e.value], t[10] = e.value, t[11] = _, t[12] = v), (0, J.useEffect)(_, v);
|
|
@@ -12221,11 +12221,11 @@ var UE = (e) => {
|
|
|
12221
12221
|
t[13] !== o || t[14] !== e ? (y = () => {
|
|
12222
12222
|
e.setValue(o);
|
|
12223
12223
|
}, t[13] = o, t[14] = e, t[15] = y) : y = t[15];
|
|
12224
|
-
let b =
|
|
12224
|
+
let b = Os(y), x;
|
|
12225
12225
|
bb0: {
|
|
12226
12226
|
if (e.debounce === !0) {
|
|
12227
12227
|
let e;
|
|
12228
|
-
t[16] === b ? e = t[17] : (e =
|
|
12228
|
+
t[16] === b ? e = t[17] : (e = As.domEventHandlers({ blur: b }), t[16] = b, t[17] = e);
|
|
12229
12229
|
let n;
|
|
12230
12230
|
t[18] === e ? n = t[19] : (n = [e], t[18] = e, t[19] = n), x = n;
|
|
12231
12231
|
break bb0;
|
|
@@ -12261,7 +12261,7 @@ var UE = (e) => {
|
|
|
12261
12261
|
output: t
|
|
12262
12262
|
};
|
|
12263
12263
|
} };
|
|
12264
|
-
} }, YE = J.lazy(() => import("./chat-ui-
|
|
12264
|
+
} }, YE = J.lazy(() => import("./chat-ui-DASKYW38.js").then((e) => ({ default: e.Chatbot }))), XE = H(K({
|
|
12265
12265
|
id: W(),
|
|
12266
12266
|
role: V([
|
|
12267
12267
|
"system",
|
|
@@ -12269,8 +12269,8 @@ var UE = (e) => {
|
|
|
12269
12269
|
"assistant"
|
|
12270
12270
|
]),
|
|
12271
12271
|
content: W().nullable(),
|
|
12272
|
-
parts: H(
|
|
12273
|
-
metadata:
|
|
12272
|
+
parts: H(fo()),
|
|
12273
|
+
metadata: fo().optional()
|
|
12274
12274
|
})), ZE = K({
|
|
12275
12275
|
max_tokens: U().nullable(),
|
|
12276
12276
|
temperature: U().nullable(),
|
|
@@ -12283,18 +12283,18 @@ var UE = (e) => {
|
|
|
12283
12283
|
showConfigurationControls: G(),
|
|
12284
12284
|
maxHeight: U().optional(),
|
|
12285
12285
|
config: ZE,
|
|
12286
|
-
allowAttachments:
|
|
12286
|
+
allowAttachments: Wo([G(), W().array()]),
|
|
12287
12287
|
disabled: G().default(!1)
|
|
12288
12288
|
})).withFunctions({
|
|
12289
12289
|
get_chat_history: JE.input(K({})).output(K({ messages: XE })),
|
|
12290
|
-
delete_chat_history: JE.input(K({})).output(
|
|
12291
|
-
delete_chat_message: JE.input(K({ index: U() })).output(
|
|
12290
|
+
delete_chat_history: JE.input(K({})).output(Po()),
|
|
12291
|
+
delete_chat_message: JE.input(K({ index: U() })).output(Po()),
|
|
12292
12292
|
send_prompt: JE.input(K({
|
|
12293
12293
|
request_id: W(),
|
|
12294
12294
|
messages: XE,
|
|
12295
12295
|
config: ZE
|
|
12296
|
-
})).output(
|
|
12297
|
-
cancel_prompt: JE.input(K({ request_id: W() })).output(
|
|
12296
|
+
})).output(as()),
|
|
12297
|
+
cancel_prompt: JE.input(K({ request_id: W() })).output(Po())
|
|
12298
12298
|
}).renderer((e) => /* @__PURE__ */ (0, Y.jsx)(J.Suspense, { children: /* @__PURE__ */ (0, Y.jsx)(YE, {
|
|
12299
12299
|
prompts: e.data.prompts,
|
|
12300
12300
|
showConfigurationControls: e.data.showConfigurationControls,
|
|
@@ -12483,14 +12483,14 @@ function xD(e, t) {
|
|
|
12483
12483
|
].flat();
|
|
12484
12484
|
return n.length === 0 || n.some((e) => e.safeParse(t).success);
|
|
12485
12485
|
}
|
|
12486
|
-
var SD = (e, t) => e[t] ? e[t] : [], CD = H(
|
|
12486
|
+
var SD = (e, t) => e[t] ? e[t] : [], CD = H(ps([Ap(), ps([V(oD).catch("unknown"), W()])])), wD = W().min(1, "Required").or(U()).transform((e) => e).describe(Pv.of({
|
|
12487
12487
|
label: "Column",
|
|
12488
12488
|
special: "column_id"
|
|
12489
12489
|
})), TD = H(wD.describe(Pv.of({ special: "column_id" }))).min(1, "At least one column is required").default([]).describe(Pv.of({
|
|
12490
12490
|
label: "Columns",
|
|
12491
12491
|
minLength: 1
|
|
12492
12492
|
})), ED = K({
|
|
12493
|
-
type:
|
|
12493
|
+
type: To("column_conversion"),
|
|
12494
12494
|
column_id: wD,
|
|
12495
12495
|
data_type: V(sD).describe(Pv.of({ label: "Data type (numpy)" })).default("bool"),
|
|
12496
12496
|
errors: V(["ignore", "raise"]).default("ignore").describe(Pv.of({
|
|
@@ -12498,14 +12498,14 @@ var SD = (e, t) => e[t] ? e[t] : [], CD = H(ds([Ap(), ds([V(oD).catch("unknown")
|
|
|
12498
12498
|
special: "radio_group"
|
|
12499
12499
|
}))
|
|
12500
12500
|
}).describe(Pv.of({})), DD = K({
|
|
12501
|
-
type:
|
|
12501
|
+
type: To("rename_column"),
|
|
12502
12502
|
column_id: wD,
|
|
12503
12503
|
new_column_id: W().min(1, "Required").transform((e) => e).describe(Pv.of({
|
|
12504
12504
|
label: "New column name",
|
|
12505
12505
|
minLength: 1
|
|
12506
12506
|
}))
|
|
12507
12507
|
}), OD = K({
|
|
12508
|
-
type:
|
|
12508
|
+
type: To("sort_column"),
|
|
12509
12509
|
column_id: wD,
|
|
12510
12510
|
ascending: G().describe(Pv.of({ label: "Ascending" })).default(!0),
|
|
12511
12511
|
na_position: V(["first", "last"]).describe(Pv.of({
|
|
@@ -12515,19 +12515,19 @@ var SD = (e, t) => e[t] ? e[t] : [], CD = H(ds([Ap(), ds([V(oD).catch("unknown")
|
|
|
12515
12515
|
}), kD = K({
|
|
12516
12516
|
column_id: wD,
|
|
12517
12517
|
operator: V(Object.keys(_D)).describe(Pv.of({ label: " " })),
|
|
12518
|
-
type:
|
|
12519
|
-
value:
|
|
12518
|
+
type: To("condition").default("condition"),
|
|
12519
|
+
value: fo().optional().describe(Pv.of({ label: "Value" })),
|
|
12520
12520
|
negate: G().default(!1)
|
|
12521
12521
|
}).describe(Pv.of({
|
|
12522
12522
|
direction: "row",
|
|
12523
12523
|
special: "column_filter"
|
|
12524
|
-
})), AD =
|
|
12525
|
-
type:
|
|
12524
|
+
})), AD = Io(() => K({
|
|
12525
|
+
type: To("group").default("group"),
|
|
12526
12526
|
operator: V(["and", "or"]).default("and"),
|
|
12527
|
-
children: H(
|
|
12527
|
+
children: H(Wo([kD, AD])).default([]),
|
|
12528
12528
|
negate: G().default(!1)
|
|
12529
12529
|
})), jD = K({
|
|
12530
|
-
type:
|
|
12530
|
+
type: To("filter_rows"),
|
|
12531
12531
|
operation: V(["keep_rows", "remove_rows"]).default("keep_rows").describe(Pv.of({ special: "radio_group" })),
|
|
12532
12532
|
where: H(kD).min(1).describe(Pv.of({
|
|
12533
12533
|
label: "Value",
|
|
@@ -12540,7 +12540,7 @@ var SD = (e, t) => e[t] ? e[t] : [], CD = H(ds([Ap(), ds([V(oD).catch("unknown")
|
|
|
12540
12540
|
negate: !1
|
|
12541
12541
|
}]).transform((e) => e.filter((e) => xD(e.operator, e.value)))
|
|
12542
12542
|
}), MD = K({
|
|
12543
|
-
type:
|
|
12543
|
+
type: To("group_by"),
|
|
12544
12544
|
column_ids: H(wD.describe(Pv.of({ special: "column_id" }))).default([]).describe(Pv.of({
|
|
12545
12545
|
label: "Group by columns",
|
|
12546
12546
|
minLength: 1
|
|
@@ -12549,17 +12549,17 @@ var SD = (e, t) => e[t] ? e[t] : [], CD = H(ds([Ap(), ds([V(oD).catch("unknown")
|
|
|
12549
12549
|
aggregation: V(cD).default("count").describe(Pv.of({ label: "Aggregation" })),
|
|
12550
12550
|
drop_na: G().default(!1).describe(Pv.of({ label: "Drop N/A" }))
|
|
12551
12551
|
}).describe(Pv.of({})), ND = K({
|
|
12552
|
-
type:
|
|
12552
|
+
type: To("aggregate"),
|
|
12553
12553
|
column_ids: TD,
|
|
12554
12554
|
aggregations: H(V(cD)).min(1, "At least one aggregation is required").default(["count"]).describe(Pv.of({
|
|
12555
12555
|
label: "Aggregations",
|
|
12556
12556
|
minLength: 1
|
|
12557
12557
|
}))
|
|
12558
12558
|
}).describe(Pv.of({ direction: "row" })), PD = K({
|
|
12559
|
-
type:
|
|
12559
|
+
type: To("select_columns"),
|
|
12560
12560
|
column_ids: TD
|
|
12561
12561
|
}), FD = K({
|
|
12562
|
-
type:
|
|
12562
|
+
type: To("sample_rows"),
|
|
12563
12563
|
n: U().positive().describe(Pv.of({ label: "Number of rows" })),
|
|
12564
12564
|
seed: U().default(() => Fv()).describe(Pv.of({
|
|
12565
12565
|
label: "Re-sample",
|
|
@@ -12567,19 +12567,19 @@ var SD = (e, t) => e[t] ? e[t] : [], CD = H(ds([Ap(), ds([V(oD).catch("unknown")
|
|
|
12567
12567
|
})),
|
|
12568
12568
|
replace: G().default(!1).describe(Pv.of({ label: "Sample with replacement" }))
|
|
12569
12569
|
}), ID = K({
|
|
12570
|
-
type:
|
|
12570
|
+
type: To("shuffle_rows"),
|
|
12571
12571
|
seed: U().default(() => Fv()).describe(Pv.of({
|
|
12572
12572
|
label: "Re-shuffle",
|
|
12573
12573
|
special: "random_number_button"
|
|
12574
12574
|
}))
|
|
12575
12575
|
}), LD = K({
|
|
12576
|
-
type:
|
|
12576
|
+
type: To("explode_columns"),
|
|
12577
12577
|
column_ids: TD
|
|
12578
12578
|
}), RD = K({
|
|
12579
|
-
type:
|
|
12579
|
+
type: To("expand_dict"),
|
|
12580
12580
|
column_id: wD
|
|
12581
12581
|
}), zD = K({
|
|
12582
|
-
type:
|
|
12582
|
+
type: To("unique"),
|
|
12583
12583
|
column_ids: TD,
|
|
12584
12584
|
keep: V([
|
|
12585
12585
|
"first",
|
|
@@ -12588,7 +12588,7 @@ var SD = (e, t) => e[t] ? e[t] : [], CD = H(ds([Ap(), ds([V(oD).catch("unknown")
|
|
|
12588
12588
|
"any"
|
|
12589
12589
|
]).default("first").describe(Pv.of({ label: "Keep" }))
|
|
12590
12590
|
}).describe(Pv.of({ direction: "row" })), BD = K({
|
|
12591
|
-
type:
|
|
12591
|
+
type: To("pivot"),
|
|
12592
12592
|
column_ids: TD,
|
|
12593
12593
|
index_column_ids: H(wD.describe(Pv.of({ special: "column_id" }))).default([]).describe(Pv.of({ label: "Rows" })),
|
|
12594
12594
|
value_column_ids: H(wD.describe(Pv.of({ special: "column_id" }))).default([]).describe(Pv.of({
|
|
@@ -12596,7 +12596,7 @@ var SD = (e, t) => e[t] ? e[t] : [], CD = H(ds([Ap(), ds([V(oD).catch("unknown")
|
|
|
12596
12596
|
minLength: 1
|
|
12597
12597
|
})),
|
|
12598
12598
|
aggregation: V(cD).default("sum").describe(Pv.of({ label: "Aggregation" }))
|
|
12599
|
-
}).describe(Pv.of({})), VD =
|
|
12599
|
+
}).describe(Pv.of({})), VD = Wo([
|
|
12600
12600
|
jD,
|
|
12601
12601
|
PD,
|
|
12602
12602
|
DD,
|
|
@@ -12637,7 +12637,7 @@ function KD(e, t, n) {
|
|
|
12637
12637
|
function qD(e) {
|
|
12638
12638
|
let { columnFields: t, columnIdx: n } = e;
|
|
12639
12639
|
switch (e.type) {
|
|
12640
|
-
case
|
|
12640
|
+
case Ha.Insert: {
|
|
12641
12641
|
if (!e.newColumnName) return c.error("newName is required for insert"), t;
|
|
12642
12642
|
let r = [...t.entries()], i = [
|
|
12643
12643
|
...r.slice(0, n),
|
|
@@ -12646,7 +12646,7 @@ function qD(e) {
|
|
|
12646
12646
|
];
|
|
12647
12647
|
return new Map(i);
|
|
12648
12648
|
}
|
|
12649
|
-
case
|
|
12649
|
+
case Ha.Remove: {
|
|
12650
12650
|
if (n < 0 || n >= t.size) return t;
|
|
12651
12651
|
let e = [...t.entries()][n]?.[0];
|
|
12652
12652
|
if (e) {
|
|
@@ -12655,7 +12655,7 @@ function qD(e) {
|
|
|
12655
12655
|
}
|
|
12656
12656
|
return t;
|
|
12657
12657
|
}
|
|
12658
|
-
case
|
|
12658
|
+
case Ha.Rename: {
|
|
12659
12659
|
if (!e.newColumnName) return c.error("newName is required for rename"), t;
|
|
12660
12660
|
if (n < 0 || n >= t.size) return t;
|
|
12661
12661
|
let r = [...t.entries()], i = [
|
|
@@ -12665,7 +12665,7 @@ function qD(e) {
|
|
|
12665
12665
|
];
|
|
12666
12666
|
return new Map(i);
|
|
12667
12667
|
}
|
|
12668
|
-
default: return
|
|
12668
|
+
default: return Ja(e), t;
|
|
12669
12669
|
}
|
|
12670
12670
|
}
|
|
12671
12671
|
//#endregion
|
|
@@ -12673,7 +12673,7 @@ function qD(e) {
|
|
|
12673
12673
|
function JD(e, t) {
|
|
12674
12674
|
let n = [...e.data], r = new Map(e.columnFields), i = new Map(e.columnTypes);
|
|
12675
12675
|
for (let e of t) {
|
|
12676
|
-
if (
|
|
12676
|
+
if (Va(e)) {
|
|
12677
12677
|
if (e.rowIdx < 0) continue;
|
|
12678
12678
|
for (; n.length <= e.rowIdx;) n.push({});
|
|
12679
12679
|
n[e.rowIdx] = {
|
|
@@ -12682,14 +12682,14 @@ function JD(e, t) {
|
|
|
12682
12682
|
}, r.has(e.columnId) || r.set(e.columnId, "unknown");
|
|
12683
12683
|
continue;
|
|
12684
12684
|
}
|
|
12685
|
-
if (
|
|
12686
|
-
e.type ===
|
|
12685
|
+
if (La(e)) {
|
|
12686
|
+
e.type === Ha.Remove && e.rowIdx >= 0 && e.rowIdx < n.length && n.splice(e.rowIdx, 1);
|
|
12687
12687
|
continue;
|
|
12688
12688
|
}
|
|
12689
|
-
if (!
|
|
12689
|
+
if (!Ua(e)) continue;
|
|
12690
12690
|
let t = [...r.keys()][e.columnIdx];
|
|
12691
12691
|
switch (e.type) {
|
|
12692
|
-
case
|
|
12692
|
+
case Ha.Remove:
|
|
12693
12693
|
if (t === void 0) break;
|
|
12694
12694
|
n = WD(n, t), r = qD({
|
|
12695
12695
|
columnFields: r,
|
|
@@ -12697,7 +12697,7 @@ function JD(e, t) {
|
|
|
12697
12697
|
type: "remove"
|
|
12698
12698
|
}), i.delete(t);
|
|
12699
12699
|
break;
|
|
12700
|
-
case
|
|
12700
|
+
case Ha.Insert:
|
|
12701
12701
|
if (!e.newName || e.columnIdx < 0 || e.columnIdx > r.size || r.has(e.newName)) break;
|
|
12702
12702
|
n = GD(n, e.newName, e.columnIdx), r = qD({
|
|
12703
12703
|
columnFields: r,
|
|
@@ -12707,7 +12707,7 @@ function JD(e, t) {
|
|
|
12707
12707
|
newColumnName: e.newName
|
|
12708
12708
|
});
|
|
12709
12709
|
break;
|
|
12710
|
-
case
|
|
12710
|
+
case Ha.Rename:
|
|
12711
12711
|
if (t === void 0 || !e.newName || r.has(e.newName)) break;
|
|
12712
12712
|
n = KD(n, t, e.newName);
|
|
12713
12713
|
let a = i.get(t);
|
|
@@ -12719,7 +12719,7 @@ function JD(e, t) {
|
|
|
12719
12719
|
newColumnName: e.newName
|
|
12720
12720
|
});
|
|
12721
12721
|
break;
|
|
12722
|
-
default:
|
|
12722
|
+
default: Ja(e);
|
|
12723
12723
|
}
|
|
12724
12724
|
}
|
|
12725
12725
|
return {
|
|
@@ -12730,18 +12730,18 @@ function JD(e, t) {
|
|
|
12730
12730
|
}
|
|
12731
12731
|
//#endregion
|
|
12732
12732
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
12733
|
-
var YD = J.lazy(() => import("./glide-data-editor-
|
|
12733
|
+
var YD = J.lazy(() => import("./glide-data-editor-BmtEcZoo.js").then((e) => e.t)), XD = AE("marimo-data-editor", { cssStyles: [$E, eD] }).withData(K({
|
|
12734
12734
|
initialValue: K({ edits: H(K({
|
|
12735
12735
|
rowIdx: U(),
|
|
12736
12736
|
columnId: W(),
|
|
12737
|
-
value:
|
|
12737
|
+
value: as()
|
|
12738
12738
|
})) }),
|
|
12739
12739
|
label: W().nullable(),
|
|
12740
|
-
data:
|
|
12740
|
+
data: Wo([W(), H(eo({}))]),
|
|
12741
12741
|
fieldTypes: CD.nullish(),
|
|
12742
12742
|
columnNames: H(W()).default([]),
|
|
12743
|
-
editableColumns:
|
|
12744
|
-
columnTypes:
|
|
12743
|
+
editableColumns: Wo([H(W()), To("all")]),
|
|
12744
|
+
columnTypes: Bo(W(), Wo([To("boolean"), H(W())])).default({}),
|
|
12745
12745
|
columnSizingMode: V(["auto", "fit"]).default("auto")
|
|
12746
12746
|
})).withFunctions({}).renderer((e) => /* @__PURE__ */ (0, Y.jsx)(ZD, {
|
|
12747
12747
|
data: e.data.data,
|
|
@@ -12760,7 +12760,7 @@ var YD = J.lazy(() => import("./glide-data-editor-hsf5AOwE.js").then((e) => e.t)
|
|
|
12760
12760
|
}, { handleBigIntAndNumberLike: !0 }), r = new Map(Object.entries(e.columnTypes)), i = br(e.fieldTypes ?? Dn(n));
|
|
12761
12761
|
for (let [e, t] of r) i.set(e, t === "boolean" ? "boolean" : "string");
|
|
12762
12762
|
return {
|
|
12763
|
-
data:
|
|
12763
|
+
data: za(n, r),
|
|
12764
12764
|
columnFields: UD(i, e.columnNames),
|
|
12765
12765
|
columnTypes: r
|
|
12766
12766
|
};
|
|
@@ -13161,7 +13161,7 @@ function SO(e) {
|
|
|
13161
13161
|
//#endregion
|
|
13162
13162
|
//#region src/components/editor/cell/useAddCell.ts
|
|
13163
13163
|
function CO() {
|
|
13164
|
-
let e = (0, X.c)(4), t =
|
|
13164
|
+
let e = (0, X.c)(4), t = uo(gs), n = B(), { createCell: r } = Ae(), i;
|
|
13165
13165
|
return e[0] !== t || e[1] !== r || e[2] !== n ? (i = (e) => {
|
|
13166
13166
|
e.includes("alt") && T({
|
|
13167
13167
|
autoInstantiate: t,
|
|
@@ -13176,7 +13176,7 @@ function CO() {
|
|
|
13176
13176
|
//#endregion
|
|
13177
13177
|
//#region ../node_modules/.pnpm/thememirror@2.0.1_@codemirror+language@6.12.4_@codemirror+state@6.7.6_@codemirror+view@6.43.13/node_modules/thememirror/dist/create-theme.js
|
|
13178
13178
|
var wO = ({ variant: e, settings: t, styles: n }) => {
|
|
13179
|
-
let r =
|
|
13179
|
+
let r = As.theme({
|
|
13180
13180
|
"&": {
|
|
13181
13181
|
backgroundColor: t.background,
|
|
13182
13182
|
color: t.foreground
|
|
@@ -13190,8 +13190,8 @@ var wO = ({ variant: e, settings: t, styles: n }) => {
|
|
|
13190
13190
|
color: t.gutterForeground
|
|
13191
13191
|
},
|
|
13192
13192
|
".cm-activeLineGutter": { backgroundColor: t.lineHighlight }
|
|
13193
|
-
}, { dark: e === "dark" }), i =
|
|
13194
|
-
return [r,
|
|
13193
|
+
}, { dark: e === "dark" }), i = Ns.define(n);
|
|
13194
|
+
return [r, Ms(i)];
|
|
13195
13195
|
};
|
|
13196
13196
|
wO({
|
|
13197
13197
|
variant: "dark",
|
|
@@ -14338,7 +14338,7 @@ var TO = [wO({
|
|
|
14338
14338
|
color: "#e5c07b"
|
|
14339
14339
|
}
|
|
14340
14340
|
]
|
|
14341
|
-
}),
|
|
14341
|
+
}), As.theme({
|
|
14342
14342
|
"&": { "--cm-selection-background": "var(--cm-selection-background-dark)" },
|
|
14343
14343
|
".mo-cm-reactive-reference": {
|
|
14344
14344
|
fontWeight: "400",
|
|
@@ -14425,7 +14425,7 @@ var TO = [wO({
|
|
|
14425
14425
|
color: "#05a"
|
|
14426
14426
|
}
|
|
14427
14427
|
]
|
|
14428
|
-
}),
|
|
14428
|
+
}), As.theme({
|
|
14429
14429
|
"&": { "--cm-selection-background": "var(--cm-selection-background-light)" },
|
|
14430
14430
|
".mo-cm-reactive-reference": {
|
|
14431
14431
|
fontWeight: "400",
|
|
@@ -14433,7 +14433,7 @@ var TO = [wO({
|
|
|
14433
14433
|
borderBottom: "2px solid var(--cm-reactive-reference-border-color)"
|
|
14434
14434
|
},
|
|
14435
14435
|
".mo-cm-reactive-reference-hover": { cursor: "pointer" }
|
|
14436
|
-
})], DO = [Te(),
|
|
14436
|
+
})], DO = [Te(), As.lineWrapping], OO = [Qs(), As.lineWrapping], kO = [Js(), As.lineWrapping];
|
|
14437
14437
|
function AO(e) {
|
|
14438
14438
|
switch (e) {
|
|
14439
14439
|
case "sql": return OO;
|
|
@@ -14442,10 +14442,10 @@ function AO(e) {
|
|
|
14442
14442
|
}
|
|
14443
14443
|
}
|
|
14444
14444
|
var jO = (0, J.memo)((e) => {
|
|
14445
|
-
let t = (0, X.c)(39), { theme: n } =
|
|
14445
|
+
let t = (0, X.c)(39), { theme: n } = ms(), r, i, a, o, s, c, u, d;
|
|
14446
14446
|
t[0] === e ? (r = t[1], i = t[2], a = t[3], o = t[4], s = t[5], c = t[6], u = t[7], d = t[8]) : ({code: i, className: r, initiallyHideCode: a, showHideCode: c, showCopyCode: u, insertNewCell: o, language: d, ...s} = e, t[0] = e, t[1] = r, t[2] = i, t[3] = a, t[4] = o, t[5] = s, t[6] = c, t[7] = u, t[8] = d);
|
|
14447
14447
|
let f = c === void 0 || c, p = u === void 0 || u, m = d === void 0 ? "python" : d, [h, g] = (0, J.useState)(!!a), _ = n === "dark" ? TO : EO, v;
|
|
14448
|
-
t[9] === Symbol.for("react.memo_cache_sentinel") ? (v =
|
|
14448
|
+
t[9] === Symbol.for("react.memo_cache_sentinel") ? (v = Ms(js, { fallback: !0 }), t[9] = v) : v = t[9];
|
|
14449
14449
|
let y;
|
|
14450
14450
|
t[10] !== m || t[11] !== _ ? (y = [
|
|
14451
14451
|
_,
|
|
@@ -14680,7 +14680,7 @@ var IO = (e) => {
|
|
|
14680
14680
|
value: GO,
|
|
14681
14681
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
14682
14682
|
className: "flex items-center truncate",
|
|
14683
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14683
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Xa, { className: "w-3 h-3 mr-2" }), "Clear"]
|
|
14684
14684
|
})
|
|
14685
14685
|
}),
|
|
14686
14686
|
o && /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [/* @__PURE__ */ (0, Y.jsx)(Vr, {
|
|
@@ -14872,7 +14872,7 @@ var IO = (e) => {
|
|
|
14872
14872
|
size: "sm",
|
|
14873
14873
|
onClick: () => h(t),
|
|
14874
14874
|
className: "h-4 w-4 p-0",
|
|
14875
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
14875
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Xa, { className: "h-2 w-2" })
|
|
14876
14876
|
})
|
|
14877
14877
|
]
|
|
14878
14878
|
}, t)), /* @__PURE__ */ (0, Y.jsxs)(_, {
|
|
@@ -14915,7 +14915,7 @@ var IO = (e) => {
|
|
|
14915
14915
|
value: GO,
|
|
14916
14916
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
14917
14917
|
className: "flex items-center truncate",
|
|
14918
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
14918
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Xa, { className: "w-3 h-3 mr-2" }), "Clear"]
|
|
14919
14919
|
})
|
|
14920
14920
|
}), /* @__PURE__ */ (0, Y.jsx)(Gr, {})] }), /* @__PURE__ */ (0, Y.jsxs)(Kr, { children: [
|
|
14921
14921
|
Je.map(s),
|
|
@@ -14957,7 +14957,7 @@ var IO = (e) => {
|
|
|
14957
14957
|
}),
|
|
14958
14958
|
children: /* @__PURE__ */ (0, Y.jsx)(BO, {
|
|
14959
14959
|
Icon: t,
|
|
14960
|
-
text:
|
|
14960
|
+
text: qa(n)
|
|
14961
14961
|
})
|
|
14962
14962
|
}, e);
|
|
14963
14963
|
}) }) })]
|
|
@@ -15117,7 +15117,7 @@ function dk(e) {
|
|
|
15117
15117
|
subtitle: r,
|
|
15118
15118
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
15119
15119
|
className: "flex items-center",
|
|
15120
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(n, { className: "w-3 h-3 mr-2" }),
|
|
15120
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(n, { className: "w-3 h-3 mr-2" }), qa(t)]
|
|
15121
15121
|
})
|
|
15122
15122
|
}, t);
|
|
15123
15123
|
}
|
|
@@ -15137,7 +15137,7 @@ function hk(e) {
|
|
|
15137
15137
|
return {
|
|
15138
15138
|
display: /* @__PURE__ */ (0, Y.jsx)(BO, {
|
|
15139
15139
|
Icon: e === "ascending" ? Ku : wt,
|
|
15140
|
-
text:
|
|
15140
|
+
text: qa(e)
|
|
15141
15141
|
}),
|
|
15142
15142
|
value: e
|
|
15143
15143
|
};
|
|
@@ -15215,7 +15215,7 @@ var Sk = (e) => {
|
|
|
15215
15215
|
let t = (0, X.c)(10), { chartType: n } = e, r = lt[n], i;
|
|
15216
15216
|
t[0] === r ? i = t[1] : (i = /* @__PURE__ */ (0, Y.jsx)(r, { className: "w-4 h-4 mr-2" }), t[0] = r, t[1] = i);
|
|
15217
15217
|
let a;
|
|
15218
|
-
t[2] === n ? a = t[3] : (a =
|
|
15218
|
+
t[2] === n ? a = t[3] : (a = qa(n), t[2] = n, t[3] = a);
|
|
15219
15219
|
let o;
|
|
15220
15220
|
t[4] !== i || t[5] !== a ? (o = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
15221
15221
|
className: "flex items-center",
|
|
@@ -15348,7 +15348,7 @@ var Sk = (e) => {
|
|
|
15348
15348
|
className: "flex flex-row justify-between",
|
|
15349
15349
|
children: [/* @__PURE__ */ (0, Y.jsx)("p", {
|
|
15350
15350
|
className: "font-semibold",
|
|
15351
|
-
children:
|
|
15351
|
+
children: qa(e)
|
|
15352
15352
|
}), /* @__PURE__ */ (0, Y.jsx)(KO, {
|
|
15353
15353
|
fieldName: `general.facet.${e}.field`,
|
|
15354
15354
|
columns: t
|
|
@@ -15412,7 +15412,7 @@ var Ak = () => {
|
|
|
15412
15412
|
content: "To persist a chart, add the generated Python code to a new cell.",
|
|
15413
15413
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
15414
15414
|
className: "flex items-center gap-1",
|
|
15415
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15415
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Wa, { className: "h-3.5 w-3.5 mb-0.5 text-muted-foreground" }), /* @__PURE__ */ (0, Y.jsx)("p", {
|
|
15416
15416
|
className: "text-sm text-muted-foreground",
|
|
15417
15417
|
children: "Charts are not saved."
|
|
15418
15418
|
})]
|
|
@@ -15573,13 +15573,13 @@ var Ak = () => {
|
|
|
15573
15573
|
};
|
|
15574
15574
|
function Nk(e) {
|
|
15575
15575
|
return {
|
|
15576
|
-
display:
|
|
15576
|
+
display: qa(e),
|
|
15577
15577
|
value: e
|
|
15578
15578
|
};
|
|
15579
15579
|
}
|
|
15580
15580
|
function Pk(e) {
|
|
15581
15581
|
return {
|
|
15582
|
-
display:
|
|
15582
|
+
display: qa(e),
|
|
15583
15583
|
value: e
|
|
15584
15584
|
};
|
|
15585
15585
|
}
|
|
@@ -15676,7 +15676,7 @@ var Fk = () => {
|
|
|
15676
15676
|
_
|
|
15677
15677
|
] }), e[21] = u, e[22] = d, e[23] = h, e[24] = y) : y = e[24], y;
|
|
15678
15678
|
}, Lk = (e) => {
|
|
15679
|
-
let t = (0, X.c)(8), { baseSpec: n, data: r, height: i } = e, { theme: a } =
|
|
15679
|
+
let t = (0, X.c)(8), { baseSpec: n, data: r, height: i } = e, { theme: a } = ms();
|
|
15680
15680
|
if (!r) {
|
|
15681
15681
|
let e;
|
|
15682
15682
|
return t[0] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)("div", { children: "No data" }), t[0] = e) : e = t[0], e;
|
|
@@ -15814,7 +15814,7 @@ var Kk = "marimo:charts:v2", qk = K({
|
|
|
15814
15814
|
}).transform((e) => ({
|
|
15815
15815
|
...e,
|
|
15816
15816
|
id: e.id ?? e.tabName
|
|
15817
|
-
})), Jk = H(
|
|
15817
|
+
})), Jk = H(ps([W().transform((e) => e), H(qk)])), Yk = new Ji(Kk, Jk, () => []), Xk = {
|
|
15818
15818
|
getItem: (e) => {
|
|
15819
15819
|
try {
|
|
15820
15820
|
let t = Yk.get(e);
|
|
@@ -15829,12 +15829,12 @@ var Kk = "marimo:charts:v2", qk = K({
|
|
|
15829
15829
|
removeItem: (e) => {
|
|
15830
15830
|
Yk.remove(e);
|
|
15831
15831
|
}
|
|
15832
|
-
}, Zk =
|
|
15832
|
+
}, Zk = So(Kk, /* @__PURE__ */ new Map(), Xk);
|
|
15833
15833
|
function Qk() {
|
|
15834
15834
|
return he();
|
|
15835
15835
|
}
|
|
15836
15836
|
function $k(e, t) {
|
|
15837
|
-
let n =
|
|
15837
|
+
let n = qa(t);
|
|
15838
15838
|
return e === 0 ? `${n} Chart` : `${n} Chart ${e + 1}`;
|
|
15839
15839
|
}
|
|
15840
15840
|
var eA = Xk.getItem(Kk);
|
|
@@ -15850,7 +15850,7 @@ function sA(e, t) {
|
|
|
15850
15850
|
return !t || t.length === 0 ? n : Ws([...n, ...t], (e) => e[0]);
|
|
15851
15851
|
}
|
|
15852
15852
|
var cA = (e) => {
|
|
15853
|
-
let t = (0, X.c)(7), { cellId: n, data: r, dataTable: i, totalRows: a, columns: o, getDataUrl: s, fieldTypes: c, rowHeaders: l, displayHeader: u, onCloseChartBuilder: d } = e, [f, p] =
|
|
15853
|
+
let t = (0, X.c)(7), { cellId: n, data: r, dataTable: i, totalRows: a, columns: o, getDataUrl: s, fieldTypes: c, rowHeaders: l, displayHeader: u, onCloseChartBuilder: d } = e, [f, p] = wo(Zk), m = n ? f.get(n) ?? [] : [], [h, g] = (0, J.useState)(rA), [v, y] = (0, J.useState)(m.length), [b, x] = (0, J.useState)(u);
|
|
15854
15854
|
if (u !== b && x(u), u && !b && m.length === 0 && n) {
|
|
15855
15855
|
let e = $k(0, nA), t = new Map(f);
|
|
15856
15856
|
t.set(n, [{
|
|
@@ -15919,7 +15919,7 @@ var cA = (e) => {
|
|
|
15919
15919
|
className: "text-xs",
|
|
15920
15920
|
value: e.tabName,
|
|
15921
15921
|
onClick: () => g(e.tabName),
|
|
15922
|
-
children: [e.tabName, /* @__PURE__ */ (0, Y.jsx)(
|
|
15922
|
+
children: [e.tabName, /* @__PURE__ */ (0, Y.jsx)(Xa, {
|
|
15923
15923
|
className: "w-3 h-3 ml-1 mt-[0.5px] hover:text-red-500 hover:font-semibold",
|
|
15924
15924
|
onClick: (t) => {
|
|
15925
15925
|
t.stopPropagation(), C(e.tabName);
|
|
@@ -15962,7 +15962,7 @@ var cA = (e) => {
|
|
|
15962
15962
|
]
|
|
15963
15963
|
});
|
|
15964
15964
|
}, lA = "X and Y columns are not set", uA = (e) => {
|
|
15965
|
-
let t = (0, X.c)(73), { tableData: n, chartConfig: r, chartType: i, saveChart: a, saveChartType: o, getDataUrl: s, fieldTypes: c, hasSchema: l, isLargeDataset: u } = e, d = l ?? !!c?.length, { theme: f } =
|
|
15965
|
+
let t = (0, X.c)(73), { tableData: n, chartConfig: r, chartType: i, saveChart: a, saveChartType: o, getDataUrl: s, fieldTypes: c, hasSchema: l, isLargeDataset: u } = e, d = l ?? !!c?.length, { theme: f } = ms(), p;
|
|
15966
15966
|
t[0] === r ? p = t[1] : (p = r ?? Gk(), t[0] = r, t[1] = p);
|
|
15967
15967
|
let m;
|
|
15968
15968
|
t[2] === Symbol.for("react.memo_cache_sentinel") ? (m = Nv(Wk), t[2] = m) : m = t[2];
|
|
@@ -16012,7 +16012,7 @@ var cA = (e) => {
|
|
|
16012
16012
|
}
|
|
16013
16013
|
if (!S) {
|
|
16014
16014
|
let e;
|
|
16015
|
-
t[23] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(
|
|
16015
|
+
t[23] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)(Wa, { className: "h-4 w-4 mt-1" }), t[23] = e) : e = t[23];
|
|
16016
16016
|
let n;
|
|
16017
16017
|
t[24] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ (0, Y.jsx)("span", { children: "Rendering large datasets is not well supported and may crash the browser" }), t[24] = n) : n = t[24];
|
|
16018
16018
|
let r;
|
|
@@ -16219,7 +16219,7 @@ function hA(e) {
|
|
|
16219
16219
|
//#endregion
|
|
16220
16220
|
//#region src/components/data-table/hooks/use-panel-ownership.ts
|
|
16221
16221
|
function gA(e, t) {
|
|
16222
|
-
let n = (0, X.c)(16), r =
|
|
16222
|
+
let n = (0, X.c)(16), r = uo(Nx), { focusCell: i } = N(), a = B(), [o, s] = wo(jx), [l, u] = wo(Ax), [d, f] = wo(Mx), p = _A(e, t);
|
|
16223
16223
|
!t && r && (c.error("CellId is not found, defaulting to fixed mode"), r = !1);
|
|
16224
16224
|
let m = (e) => l === p && d && e === o, h = a === t, g = l && vA(l, t);
|
|
16225
16225
|
r && h && l !== p && !g && u(p);
|
|
@@ -16271,7 +16271,7 @@ var yA = K({
|
|
|
16271
16271
|
"json",
|
|
16272
16272
|
"parquet",
|
|
16273
16273
|
"tsv"
|
|
16274
|
-
]) })).output(bA), SA = JE.input(yA.extend({ format:
|
|
16274
|
+
]) })).output(bA), SA = JE.input(yA.extend({ format: To("geojson") })).output(bA.extend({ code: Wo([bA.shape.code, To("missing_crs")]) })), CA = K({
|
|
16275
16275
|
geometry_columns: H(K({
|
|
16276
16276
|
name: W(),
|
|
16277
16277
|
encoding: V([
|
|
@@ -16280,11 +16280,11 @@ var yA = K({
|
|
|
16280
16280
|
"wkt",
|
|
16281
16281
|
"other"
|
|
16282
16282
|
]),
|
|
16283
|
-
crs:
|
|
16283
|
+
crs: Wo([W(), Bo(W(), as())]).nullable()
|
|
16284
16284
|
})),
|
|
16285
16285
|
primary_geometry_column: W().nullable(),
|
|
16286
16286
|
default_geometry_column: W().nullable(),
|
|
16287
|
-
formats:
|
|
16287
|
+
formats: Bo(W(), K({
|
|
16288
16288
|
available: G(),
|
|
16289
16289
|
reason: W().nullable(),
|
|
16290
16290
|
missing_packages: H(W())
|
|
@@ -16353,7 +16353,7 @@ function OA(e, t) {
|
|
|
16353
16353
|
});
|
|
16354
16354
|
}
|
|
16355
16355
|
var kA = (e) => {
|
|
16356
|
-
let t = (0, X.c)(11), { chartCode: n, columnName: r } = e, i =
|
|
16356
|
+
let t = (0, X.c)(11), { chartCode: n, columnName: r } = e, i = uo(gs), a = B(), { createCell: o } = Ae(), s;
|
|
16357
16357
|
t[0] !== i || t[1] !== o || t[2] !== a ? (s = (e) => {
|
|
16358
16358
|
e.includes("alt") && T({
|
|
16359
16359
|
autoInstantiate: i,
|
|
@@ -16521,7 +16521,7 @@ function jA({ columnName: e, column: t, dataType: n, externalType: r, previewCol
|
|
|
16521
16521
|
}) })] });
|
|
16522
16522
|
}
|
|
16523
16523
|
var MA = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
16524
|
-
let { theme: r } =
|
|
16524
|
+
let { theme: r } = ms(), { locale: i } = Pr(), { data: a, error: o, isPending: s, refetch: c } = $s(async () => await e({ column: t }), []);
|
|
16525
16525
|
if (o) return /* @__PURE__ */ (0, Y.jsx)(mt, { error: o });
|
|
16526
16526
|
if (s) return /* @__PURE__ */ (0, Y.jsx)(Bn, { message: "Loading..." });
|
|
16527
16527
|
if (!a) return /* @__PURE__ */ (0, Y.jsx)(Hn, {
|
|
@@ -16564,7 +16564,7 @@ var MA = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
16564
16564
|
}, t[7] = r, t[8] = i, t[9] = x) : x = t[9];
|
|
16565
16565
|
let S = x, C;
|
|
16566
16566
|
t[10] !== l || t[11] !== c || t[12] !== n ? (C = () => {
|
|
16567
|
-
l?.((e) => c ?
|
|
16567
|
+
l?.((e) => c ? Es.filter(e, (e, t) => t !== String(n)) : {
|
|
16568
16568
|
...e,
|
|
16569
16569
|
[n]: !0
|
|
16570
16570
|
});
|
|
@@ -16585,7 +16585,7 @@ var MA = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
16585
16585
|
}, t[14] = n, t[15] = S, t[16] = T, t[17] = E) : E = t[17];
|
|
16586
16586
|
let D = E, O;
|
|
16587
16587
|
t[18] !== b || t[19] !== a || t[20] !== y || t[21] !== u || t[22] !== h || t[23] !== i ? (O = () => {
|
|
16588
|
-
if (b) return /* @__PURE__ */ (0, Y.jsx)(
|
|
16588
|
+
if (b) return /* @__PURE__ */ (0, Y.jsx)(bs, {
|
|
16589
16589
|
error: b,
|
|
16590
16590
|
className: "p-4 mx-3 mt-5"
|
|
16591
16591
|
});
|
|
@@ -16605,14 +16605,14 @@ var MA = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
16605
16605
|
let e = h ? "LazyFrame, no data available." : `Expected 1 row, got ${y.length} rows. Please report the issue.`;
|
|
16606
16606
|
return /* @__PURE__ */ (0, Y.jsx)(FA, {
|
|
16607
16607
|
kind: "warn",
|
|
16608
|
-
Icon:
|
|
16608
|
+
Icon: Wa,
|
|
16609
16609
|
message: e
|
|
16610
16610
|
});
|
|
16611
16611
|
}
|
|
16612
16612
|
let e = y[0];
|
|
16613
16613
|
if (typeof e != "object" || !e) return /* @__PURE__ */ (0, Y.jsx)(FA, {
|
|
16614
16614
|
kind: "warn",
|
|
16615
|
-
Icon:
|
|
16615
|
+
Icon: Wa,
|
|
16616
16616
|
message: "Row is not an object. Please report the issue."
|
|
16617
16617
|
});
|
|
16618
16618
|
let t = {};
|
|
@@ -16797,7 +16797,7 @@ var FA = (e) => {
|
|
|
16797
16797
|
let o;
|
|
16798
16798
|
t[2] === i ? o = t[3] : (o = /* @__PURE__ */ (0, Y.jsx)("span", { children: i }), t[2] = i, t[3] = o);
|
|
16799
16799
|
let s;
|
|
16800
|
-
return t[4] !== n || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ (0, Y.jsxs)(
|
|
16800
|
+
return t[4] !== n || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ (0, Y.jsxs)(Ss, {
|
|
16801
16801
|
kind: n,
|
|
16802
16802
|
className: "p-4 mx-3 mt-3 flex flex-row items-center gap-2",
|
|
16803
16803
|
children: [a, o]
|
|
@@ -16884,9 +16884,9 @@ function HA(e, t) {
|
|
|
16884
16884
|
}
|
|
16885
16885
|
//#endregion
|
|
16886
16886
|
//#region src/plugins/impl/DataTablePlugin.tsx
|
|
16887
|
-
var UA =
|
|
16887
|
+
var UA = Wo([
|
|
16888
16888
|
U(),
|
|
16889
|
-
|
|
16889
|
+
Jo(),
|
|
16890
16890
|
W()
|
|
16891
16891
|
]).nullable(), WA = K({
|
|
16892
16892
|
total: U().nullable(),
|
|
@@ -16904,29 +16904,29 @@ var UA = Ho([
|
|
|
16904
16904
|
p75: UA,
|
|
16905
16905
|
p95: UA
|
|
16906
16906
|
}), GA = H(K({
|
|
16907
|
-
bin_start:
|
|
16907
|
+
bin_start: Wo([
|
|
16908
16908
|
U(),
|
|
16909
16909
|
W(),
|
|
16910
|
-
|
|
16910
|
+
Mo(Date)
|
|
16911
16911
|
]),
|
|
16912
|
-
bin_end:
|
|
16912
|
+
bin_end: Wo([
|
|
16913
16913
|
U(),
|
|
16914
16914
|
W(),
|
|
16915
|
-
|
|
16915
|
+
Mo(Date)
|
|
16916
16916
|
]),
|
|
16917
16917
|
count: U()
|
|
16918
16918
|
})), KA = H(K({
|
|
16919
16919
|
value: W(),
|
|
16920
16920
|
count: U()
|
|
16921
|
-
})), qA =
|
|
16922
|
-
initialValue:
|
|
16921
|
+
})), qA = Bo(W(), Bo(W(), W().nullable())).optional(), JA = AE("marimo-table").withData(K({
|
|
16922
|
+
initialValue: Wo([H(U()), H(K({
|
|
16923
16923
|
rowId: W(),
|
|
16924
16924
|
columnName: W()
|
|
16925
16925
|
}))]),
|
|
16926
16926
|
label: W().nullable(),
|
|
16927
|
-
data:
|
|
16928
|
-
rawData:
|
|
16929
|
-
totalRows:
|
|
16927
|
+
data: Wo([W(), H(eo({}))]),
|
|
16928
|
+
rawData: Wo([W(), H(eo({}))]).nullish(),
|
|
16929
|
+
totalRows: Wo([U(), To(bt)]),
|
|
16930
16930
|
pagination: G().default(!1),
|
|
16931
16931
|
pageSize: U().default(10),
|
|
16932
16932
|
selection: V([
|
|
@@ -16937,7 +16937,7 @@ var UA = Ho([
|
|
|
16937
16937
|
]).nullable().default(null),
|
|
16938
16938
|
showDownload: G().default(!1),
|
|
16939
16939
|
showFilters: G().default(!1),
|
|
16940
|
-
showColumnSummaries:
|
|
16940
|
+
showColumnSummaries: Wo([G(), V(["stats", "chart"])]).default(!0),
|
|
16941
16941
|
showDataTypes: G().default(!0),
|
|
16942
16942
|
showPageSizeSelector: G().default(!0),
|
|
16943
16943
|
showColumnExplorer: G().default(!0),
|
|
@@ -16948,20 +16948,20 @@ var UA = Ho([
|
|
|
16948
16948
|
freezeColumnsLeft: H(W()).optional(),
|
|
16949
16949
|
freezeColumnsRight: H(W()).optional(),
|
|
16950
16950
|
hiddenColumns: H(W()).optional(),
|
|
16951
|
-
textJustifyColumns:
|
|
16951
|
+
textJustifyColumns: Bo(W(), V([
|
|
16952
16952
|
"left",
|
|
16953
16953
|
"center",
|
|
16954
16954
|
"right"
|
|
16955
16955
|
])).optional(),
|
|
16956
16956
|
wrappedColumns: H(W()).optional(),
|
|
16957
|
-
columnWidths:
|
|
16958
|
-
headerTooltip:
|
|
16957
|
+
columnWidths: Bo(W(), U().int().positive()).optional(),
|
|
16958
|
+
headerTooltip: Bo(W(), W()).optional(),
|
|
16959
16959
|
fieldTypes: CD.nullish(),
|
|
16960
16960
|
totalColumns: U(),
|
|
16961
|
-
maxColumns:
|
|
16961
|
+
maxColumns: Wo([U(), To("all")]).default("all"),
|
|
16962
16962
|
hasStableRowId: G().default(!1),
|
|
16963
16963
|
maxHeight: U().optional(),
|
|
16964
|
-
cellStyles:
|
|
16964
|
+
cellStyles: Bo(W(), Bo(W(), eo({}))).optional(),
|
|
16965
16965
|
hoverTemplate: W().optional(),
|
|
16966
16966
|
cellHoverTexts: qA,
|
|
16967
16967
|
lazy: G().default(!1),
|
|
@@ -16970,11 +16970,11 @@ var UA = Ho([
|
|
|
16970
16970
|
download_as: xA,
|
|
16971
16971
|
download_geojson: SA,
|
|
16972
16972
|
get_export_metadata: wA,
|
|
16973
|
-
get_column_summaries: JE.input(
|
|
16974
|
-
data:
|
|
16975
|
-
stats:
|
|
16976
|
-
bin_values:
|
|
16977
|
-
value_counts:
|
|
16973
|
+
get_column_summaries: JE.input(eo({})).output(K({
|
|
16974
|
+
data: Wo([W(), H(eo({}))]).nullable(),
|
|
16975
|
+
stats: Bo(W(), WA),
|
|
16976
|
+
bin_values: Bo(W(), GA),
|
|
16977
|
+
value_counts: Bo(W(), KA),
|
|
16978
16978
|
show_charts: G(),
|
|
16979
16979
|
is_disabled: G().optional()
|
|
16980
16980
|
})),
|
|
@@ -16989,20 +16989,20 @@ var UA = Ho([
|
|
|
16989
16989
|
page_size: U(),
|
|
16990
16990
|
max_columns: U().nullable().optional()
|
|
16991
16991
|
})).output(K({
|
|
16992
|
-
data:
|
|
16993
|
-
total_rows:
|
|
16992
|
+
data: Wo([W(), H(eo({}))]),
|
|
16993
|
+
total_rows: Wo([U(), To(bt)]),
|
|
16994
16994
|
has_next_page: G().nullish(),
|
|
16995
|
-
cell_styles:
|
|
16995
|
+
cell_styles: Bo(W(), Bo(W(), eo({}))).nullable(),
|
|
16996
16996
|
cell_hover_texts: qA.nullable(),
|
|
16997
|
-
raw_data:
|
|
16997
|
+
raw_data: Wo([W(), H(eo({}))]).nullish()
|
|
16998
16998
|
})),
|
|
16999
|
-
get_row_ids: JE.input(
|
|
16999
|
+
get_row_ids: JE.input(eo({})).output(K({
|
|
17000
17000
|
row_ids: H(U()),
|
|
17001
17001
|
all_rows: G(),
|
|
17002
17002
|
error: W().nullable()
|
|
17003
17003
|
})),
|
|
17004
|
-
get_data_url: JE.input(
|
|
17005
|
-
data_url:
|
|
17004
|
+
get_data_url: JE.input(eo({})).output(K({
|
|
17005
|
+
data_url: Wo([W(), H(eo({}))]),
|
|
17006
17006
|
format: V([
|
|
17007
17007
|
"csv",
|
|
17008
17008
|
"json",
|
|
@@ -17012,7 +17012,7 @@ var UA = Ho([
|
|
|
17012
17012
|
calculate_top_k_rows: JE.input(K({
|
|
17013
17013
|
column: W(),
|
|
17014
17014
|
k: U()
|
|
17015
|
-
})).output(K({ data: H(
|
|
17015
|
+
})).output(K({ data: H(ps([fo(), U()])) })),
|
|
17016
17016
|
preview_column: JE.input(K({ column: W() })).output(K({
|
|
17017
17017
|
chart_spec: W().nullable(),
|
|
17018
17018
|
chart_code: W().nullable(),
|
|
@@ -17044,8 +17044,8 @@ function ZA(e, t) {
|
|
|
17044
17044
|
var QA = (e) => {
|
|
17045
17045
|
let t = (0, X.c)(13), { isLazy: n, children: r, preload: i, host: a } = e, o, s, c, l;
|
|
17046
17046
|
if (t[0] !== a || t[1] !== n || t[2] !== i) {
|
|
17047
|
-
let e = a.closest(`[${
|
|
17048
|
-
l = e ?
|
|
17047
|
+
let e = a.closest(`[${ma}]`);
|
|
17048
|
+
l = e ? zi.parse(e) : null, o = a.closest(`[${Li}]`)?.getAttribute(Li), s = J.useState, c = n && !i && !XA(l, o), t[0] = a, t[1] = n, t[2] = i, t[3] = o, t[4] = s, t[5] = c, t[6] = l;
|
|
17049
17049
|
} else o = t[3], s = t[4], c = t[5], l = t[6];
|
|
17050
17050
|
let [u, d] = s(c);
|
|
17051
17051
|
if (u) {
|
|
@@ -17069,7 +17069,7 @@ var QA = (e) => {
|
|
|
17069
17069
|
return r;
|
|
17070
17070
|
}, $A = (0, J.memo)((e) => {
|
|
17071
17071
|
let t = (0, X.c)(125), n;
|
|
17072
|
-
t[0] === e.host ? n = t[1] : (n =
|
|
17072
|
+
t[0] === e.host ? n = t[1] : (n = Zi(e.host), t[0] = e.host, t[1] = n);
|
|
17073
17073
|
let r = n, i = e.search, a = e.setValue, o;
|
|
17074
17074
|
t[2] === Symbol.for("react.memo_cache_sentinel") ? (o = [], t[2] = o) : o = t[2];
|
|
17075
17075
|
let [s, l] = (0, J.useState)(o), u;
|
|
@@ -17102,19 +17102,19 @@ var QA = (e) => {
|
|
|
17102
17102
|
t[18] === e.lazy ? T = t[19] : (T = () => {
|
|
17103
17103
|
e.lazy && f(nj);
|
|
17104
17104
|
}, t[18] = e.lazy, t[19] = T);
|
|
17105
|
-
let E =
|
|
17105
|
+
let E = Os(T), D;
|
|
17106
17106
|
t[20] === E ? D = t[21] : (D = (e) => {
|
|
17107
17107
|
l(e), E();
|
|
17108
17108
|
}, t[20] = E, t[21] = D);
|
|
17109
|
-
let O =
|
|
17109
|
+
let O = Os(D), k;
|
|
17110
17110
|
t[22] === E ? k = t[23] : (k = (e) => {
|
|
17111
17111
|
_(e), E();
|
|
17112
17112
|
}, t[22] = E, t[23] = k);
|
|
17113
|
-
let A =
|
|
17113
|
+
let A = Os(k), j;
|
|
17114
17114
|
t[24] === E ? j = t[25] : (j = (e) => {
|
|
17115
17115
|
m(e), E();
|
|
17116
17116
|
}, t[24] = E, t[25] = j);
|
|
17117
|
-
let M =
|
|
17117
|
+
let M = Os(j), N;
|
|
17118
17118
|
t[26] !== g || t[27] !== d.pageIndex || t[28] !== d.pageSize || t[29] !== e.cellHoverTexts || t[30] !== e.cellStyles || t[31] !== e.data || t[32] !== e.lazy || t[33] !== e.pageSize || t[34] !== e.rawData || t[35] !== e.totalRows || t[36] !== i || t[37] !== p || t[38] !== s ? (N = async () => {
|
|
17119
17119
|
if (e.totalRows === 0) return {
|
|
17120
17120
|
rows: Ks.EMPTY,
|
|
@@ -17158,7 +17158,7 @@ var QA = (e) => {
|
|
|
17158
17158
|
d.pageSize,
|
|
17159
17159
|
d.pageIndex
|
|
17160
17160
|
], t[40] = g, t[41] = d.pageIndex, t[42] = d.pageSize, t[43] = e.cellHoverTexts, t[44] = e.cellStyles, t[45] = e.data, t[46] = e.lazy, t[47] = e.totalRows, t[48] = i, t[49] = p, t[50] = s, t[51] = P, t[52] = F) : F = t[52];
|
|
17161
|
-
let { data: I, error: L, isPending: R, isFetching: z } = $s(N, F), B =
|
|
17161
|
+
let { data: I, error: L, isPending: R, isFetching: z } = $s(N, F), B = uo($t), ee;
|
|
17162
17162
|
t[53] !== B || t[54] !== e ? (ee = async () => !B || !e.showDownload || e.lazy || e.totalRows === 0 ? null : (await e.get_size_bytes({})).size_bytes ?? null, t[53] = B, t[54] = e, t[55] = ee) : ee = t[55];
|
|
17163
17163
|
let te = e.showDownload, ne = e.get_size_bytes, re = e.lazy, ie = e.totalRows, ae = pc(g), oe = pc(s), se;
|
|
17164
17164
|
t[56] !== B || t[57] !== e.get_size_bytes || t[58] !== e.lazy || t[59] !== e.showDownload || t[60] !== e.totalRows || t[61] !== p || t[62] !== ae || t[63] !== oe ? (se = [
|
|
@@ -17187,7 +17187,7 @@ var QA = (e) => {
|
|
|
17187
17187
|
me !== I?.totalRows && (he(I?.totalRows), f(oj));
|
|
17188
17188
|
let ge;
|
|
17189
17189
|
t[70] === e ? ge = t[71] : (ge = async () => {
|
|
17190
|
-
let t =
|
|
17190
|
+
let t = Ls();
|
|
17191
17191
|
return e.totalRows === 0 || !e.showColumnSummaries || t ? {
|
|
17192
17192
|
data: null,
|
|
17193
17193
|
stats: {},
|
|
@@ -17219,7 +17219,7 @@ var QA = (e) => {
|
|
|
17219
17219
|
if (L) {
|
|
17220
17220
|
c.error(L);
|
|
17221
17221
|
let e;
|
|
17222
|
-
t[84] === L ? e = t[85] : (e = !
|
|
17222
|
+
t[84] === L ? e = t[85] : (e = !Ls() && /* @__PURE__ */ (0, Y.jsxs)(Hs, {
|
|
17223
17223
|
variant: "destructive",
|
|
17224
17224
|
className: "mb-2",
|
|
17225
17225
|
children: [/* @__PURE__ */ (0, Y.jsx)(Vs, { children: "Error" }), /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
@@ -17289,7 +17289,7 @@ var ej = (e) => {
|
|
|
17289
17289
|
});
|
|
17290
17290
|
}, t[0] = T, t[1] = E, t[2] = ve) : ve = t[2];
|
|
17291
17291
|
let ye = ve, { locale: be } = Pr(), [xe, Se] = (0, J.useState)(0), { isPanelOpen: Ce, isAnyPanelOpen: we, togglePanel: Te, panelType: Ee, setPanelType: De } = gA(_e, he), Oe;
|
|
17292
|
-
t[3] === Symbol.for("react.memo_cache_sentinel") ? (Oe =
|
|
17292
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (Oe = Ls(), t[3] = Oe) : Oe = t[3];
|
|
17293
17293
|
let ke = Oe, Ae;
|
|
17294
17294
|
bb0: {
|
|
17295
17295
|
if (!O || !S || !O.stats) {
|
|
@@ -17370,7 +17370,7 @@ var ej = (e) => {
|
|
|
17370
17370
|
A(Object.keys(t));
|
|
17371
17371
|
}
|
|
17372
17372
|
}, t[39] = Qe, t[40] = Je, t[41] = A, t[42] = $e) : $e = t[42];
|
|
17373
|
-
let et =
|
|
17373
|
+
let et = Os($e), tt;
|
|
17374
17374
|
t[43] !== C || t[44] !== w || t[45] !== o ? (tt = (e) => {
|
|
17375
17375
|
if (Se(e), e < 0 || typeof o == "number" && e >= o || o === "too_many") return;
|
|
17376
17376
|
let t = _r(e, C.pageIndex, C.pageSize);
|
|
@@ -17379,7 +17379,7 @@ var ej = (e) => {
|
|
|
17379
17379
|
pageIndex: t
|
|
17380
17380
|
}));
|
|
17381
17381
|
}, t[43] = C, t[44] = w, t[45] = o, t[46] = tt) : tt = t[46];
|
|
17382
|
-
let nt =
|
|
17382
|
+
let nt = Os(tt), rt;
|
|
17383
17383
|
t[47] === p ? rt = t[48] : (rt = p.filter(lj), t[47] = p, t[48] = rt);
|
|
17384
17384
|
let it = rt, at;
|
|
17385
17385
|
t[49] !== it || t[50] !== Je || t[51] !== A ? (at = (e) => {
|
|
@@ -17392,10 +17392,10 @@ var ej = (e) => {
|
|
|
17392
17392
|
A(t);
|
|
17393
17393
|
}
|
|
17394
17394
|
}, t[49] = it, t[50] = Je, t[51] = A, t[52] = at) : at = t[52];
|
|
17395
|
-
let ot =
|
|
17396
|
-
t[53] === Symbol.for("react.memo_cache_sentinel") ? (lt =
|
|
17395
|
+
let ot = Os(at), st = Je === "multi" || Je === "single", ct = _ && !!pe, lt;
|
|
17396
|
+
t[53] === Symbol.for("react.memo_cache_sentinel") ? (lt = ds(), t[53] = lt) : lt = t[53];
|
|
17397
17397
|
let ut = lt, dt;
|
|
17398
|
-
t[54] === Symbol.for("react.memo_cache_sentinel") ? (dt =
|
|
17398
|
+
t[54] === Symbol.for("react.memo_cache_sentinel") ? (dt = Go(), t[54] = dt) : dt = t[54];
|
|
17399
17399
|
let ft = dt, pt;
|
|
17400
17400
|
bb2: {
|
|
17401
17401
|
if (!we || !(v || ct)) {
|
|
@@ -17423,7 +17423,7 @@ var ej = (e) => {
|
|
|
17423
17423
|
}) }), t[55] = ct, t[56] = me, t[57] = et, t[58] = _e, t[59] = st, t[60] = Fe, t[61] = Ee, t[62] = pe, t[63] = Qe, t[64] = De, t[65] = nt, t[66] = v, t[67] = ae, t[68] = o, t[69] = xe, t[70] = e) : e = t[70], pt = e;
|
|
17424
17424
|
}
|
|
17425
17425
|
let mt = pt, ht;
|
|
17426
|
-
t[71] !== r || t[72] !== s || t[73] !== C || t[74] !== o ? (ht = s === void 0 && o === "too_many" && C.pageSize === r.length && /* @__PURE__ */ (0, Y.jsxs)(
|
|
17426
|
+
t[71] !== r || t[72] !== s || t[73] !== C || t[74] !== o ? (ht = s === void 0 && o === "too_many" && C.pageSize === r.length && /* @__PURE__ */ (0, Y.jsxs)(Ss, {
|
|
17427
17427
|
className: "mb-1 rounded",
|
|
17428
17428
|
children: [
|
|
17429
17429
|
"Previewing the first ",
|
|
@@ -17432,7 +17432,7 @@ var ej = (e) => {
|
|
|
17432
17432
|
]
|
|
17433
17433
|
}), t[71] = r, t[72] = s, t[73] = C, t[74] = o, t[75] = ht) : ht = t[75];
|
|
17434
17434
|
let gt;
|
|
17435
|
-
t[76] !== Ke || t[77] !== ae ? (gt = Ke < ae && Ke > 0 && /* @__PURE__ */ (0, Y.jsxs)(
|
|
17435
|
+
t[76] !== Ke || t[77] !== ae ? (gt = Ke < ae && Ke > 0 && /* @__PURE__ */ (0, Y.jsxs)(Ss, {
|
|
17436
17436
|
className: "mb-1 rounded",
|
|
17437
17437
|
children: [
|
|
17438
17438
|
"Result clipped. Showing ",
|
|
@@ -17443,7 +17443,7 @@ var ej = (e) => {
|
|
|
17443
17443
|
]
|
|
17444
17444
|
}), t[76] = Ke, t[77] = ae, t[78] = gt) : gt = t[78];
|
|
17445
17445
|
let _t;
|
|
17446
|
-
t[79] !== r || t[80] !== be || t[81] !== o ? (_t = ke && typeof o == "number" && r.length < o && /* @__PURE__ */ (0, Y.jsxs)(
|
|
17446
|
+
t[79] !== r || t[80] !== be || t[81] !== o ? (_t = ke && typeof o == "number" && r.length < o && /* @__PURE__ */ (0, Y.jsxs)(Ss, {
|
|
17447
17447
|
className: "mb-1 rounded",
|
|
17448
17448
|
children: [
|
|
17449
17449
|
"Showing the first ",
|
|
@@ -17457,7 +17457,7 @@ var ej = (e) => {
|
|
|
17457
17457
|
]
|
|
17458
17458
|
}), t[79] = r, t[80] = be, t[81] = o, t[82] = _t) : _t = t[82];
|
|
17459
17459
|
let vt;
|
|
17460
|
-
t[83] === O?.is_disabled ? vt = t[84] : (vt = O?.is_disabled && /* @__PURE__ */ (0, Y.jsx)(
|
|
17460
|
+
t[83] === O?.is_disabled ? vt = t[84] : (vt = O?.is_disabled && /* @__PURE__ */ (0, Y.jsx)(Ss, {
|
|
17461
17461
|
className: "mb-1 rounded",
|
|
17462
17462
|
children: "Column summaries are unavailable. Filter your data to fewer than 1,000,000 rows."
|
|
17463
17463
|
}), t[83] = O?.is_disabled, t[84] = vt);
|
|
@@ -17538,8 +17538,8 @@ var ej = (e) => {
|
|
|
17538
17538
|
] }), t[140] = ht, t[141] = gt, t[142] = _t, t[143] = vt, t[144] = Et, t[145] = Dt) : Dt = t[145], Dt;
|
|
17539
17539
|
}, tj = (e) => {
|
|
17540
17540
|
let t = (0, X.c)(2), { children: n } = e, r;
|
|
17541
|
-
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ (0, Y.jsx)(tc, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
17542
|
-
store:
|
|
17541
|
+
return t[0] === n ? r = t[1] : (r = /* @__PURE__ */ (0, Y.jsx)(tc, { children: /* @__PURE__ */ (0, Y.jsx)(bo, {
|
|
17542
|
+
store: _s,
|
|
17543
17543
|
children: /* @__PURE__ */ (0, Y.jsx)(Xn, {
|
|
17544
17544
|
controller: pn,
|
|
17545
17545
|
children: n
|
|
@@ -17638,7 +17638,7 @@ var uj = class {
|
|
|
17638
17638
|
}, fj = class {
|
|
17639
17639
|
tagName = "marimo-date-range";
|
|
17640
17640
|
validator = K({
|
|
17641
|
-
initialValue:
|
|
17641
|
+
initialValue: ps([W(), W()]),
|
|
17642
17642
|
label: W().nullable(),
|
|
17643
17643
|
start: W(),
|
|
17644
17644
|
stop: W(),
|
|
@@ -17749,7 +17749,7 @@ var uj = class {
|
|
|
17749
17749
|
tagName = "marimo-dict";
|
|
17750
17750
|
validator = K({
|
|
17751
17751
|
label: W().nullable(),
|
|
17752
|
-
elementIds:
|
|
17752
|
+
elementIds: Bo(W(), W())
|
|
17753
17753
|
});
|
|
17754
17754
|
render(e) {
|
|
17755
17755
|
return /* @__PURE__ */ (0, Y.jsx)(_j, {
|
|
@@ -17773,8 +17773,8 @@ var uj = class {
|
|
|
17773
17773
|
return n[a] = e.detail.value, n;
|
|
17774
17774
|
});
|
|
17775
17775
|
};
|
|
17776
|
-
return document.addEventListener(
|
|
17777
|
-
document.removeEventListener(
|
|
17776
|
+
return document.addEventListener(Ta.TYPE, e), () => {
|
|
17777
|
+
document.removeEventListener(Ta.TYPE, e);
|
|
17778
17778
|
};
|
|
17779
17779
|
}, o = [n, r], t[0] = n, t[1] = r, t[2] = a, t[3] = o) : (a = t[2], o = t[3]), (0, J.useEffect)(a, o), i;
|
|
17780
17780
|
}, vj = (e) => {
|
|
@@ -17955,8 +17955,8 @@ var wj = J.lazy(() => import("./ConnectedDataExplorerComponent-DieU6L4x.js")), T
|
|
|
17955
17955
|
}
|
|
17956
17956
|
}), jj = () => ({
|
|
17957
17957
|
isMatch: (e) => {
|
|
17958
|
-
if (e instanceof
|
|
17959
|
-
let t = e.element, n = t instanceof
|
|
17958
|
+
if (e instanceof co) {
|
|
17959
|
+
let t = e.element, n = t instanceof ro ? t.description : "", { special: r } = Pv.parse(n || "");
|
|
17960
17960
|
return r === "column_id";
|
|
17961
17961
|
}
|
|
17962
17962
|
return !1;
|
|
@@ -18005,7 +18005,7 @@ var wj = J.lazy(() => import("./ConnectedDataExplorerComponent-DieU6L4x.js")), T
|
|
|
18005
18005
|
}), t[9] = r.control, t[10] = i, t[11] = d, t[12] = f) : f = t[12], f;
|
|
18006
18006
|
}, Nj = () => ({
|
|
18007
18007
|
isMatch: (e) => {
|
|
18008
|
-
if (e instanceof
|
|
18008
|
+
if (e instanceof co) {
|
|
18009
18009
|
let { special: t } = Pv.parse(e.description || "");
|
|
18010
18010
|
return t === "column_values";
|
|
18011
18011
|
}
|
|
@@ -18058,7 +18058,7 @@ var wj = J.lazy(() => import("./ConnectedDataExplorerComponent-DieU6L4x.js")), T
|
|
|
18058
18058
|
}), Pj = () => ({
|
|
18059
18059
|
isMatch: (e) => {
|
|
18060
18060
|
let { special: t } = Pv.parse(e.description || "");
|
|
18061
|
-
return t === "column_values" && e instanceof
|
|
18061
|
+
return t === "column_values" && e instanceof co;
|
|
18062
18062
|
},
|
|
18063
18063
|
Component: ({ schema: e, form: t, path: n }) => {
|
|
18064
18064
|
let r = J.use(Dj), i = J.use(Oj), { data: a, isPending: o } = $s(() => i({ column: r }), [r]), s = a?.values || [];
|
|
@@ -18096,7 +18096,7 @@ var wj = J.lazy(() => import("./ConnectedDataExplorerComponent-DieU6L4x.js")), T
|
|
|
18096
18096
|
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ (0, Y.jsx)(Yv, { className: r }), t[2] = r, t[3] = i), i;
|
|
18097
18097
|
}, Ij = () => ({
|
|
18098
18098
|
isMatch: (e) => {
|
|
18099
|
-
if (e instanceof
|
|
18099
|
+
if (e instanceof lo) {
|
|
18100
18100
|
let { special: t } = Pv.parse(e.description || "");
|
|
18101
18101
|
return t === "column_filter";
|
|
18102
18102
|
}
|
|
@@ -18110,7 +18110,7 @@ var wj = J.lazy(() => import("./ConnectedDataExplorerComponent-DieU6L4x.js")), T
|
|
|
18110
18110
|
}), Lj = (e) => {
|
|
18111
18111
|
let t = (0, X.c)(25), { path: n, form: r, schema: i } = e, a;
|
|
18112
18112
|
t[0] === i.description ? a = t[1] : (a = Pv.parse(i.description), t[0] = i.description, t[1] = a);
|
|
18113
|
-
let { description: o } = a, s = J.use(Ej), c =
|
|
18113
|
+
let { description: o } = a, s = J.use(Ej), c = Es.entries(i.shape).find(Bj)?.[1], u;
|
|
18114
18114
|
t[2] === n ? u = t[3] : (u = { name: n }, t[2] = n, t[3] = u);
|
|
18115
18115
|
let { column_id: d, operator: f } = v_(u), p = Aj(), m = [_y({
|
|
18116
18116
|
schema: c,
|
|
@@ -18228,7 +18228,7 @@ function Bj(e) {
|
|
|
18228
18228
|
function Vj(e) {
|
|
18229
18229
|
return /* @__PURE__ */ (0, Y.jsx)(Vr, {
|
|
18230
18230
|
value: e,
|
|
18231
|
-
children:
|
|
18231
|
+
children: Ya.startCase(e)
|
|
18232
18232
|
}, e);
|
|
18233
18233
|
}
|
|
18234
18234
|
//#endregion
|
|
@@ -18249,11 +18249,11 @@ var Uj = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18249
18249
|
defaultValues: e,
|
|
18250
18250
|
mode: "onChange",
|
|
18251
18251
|
reValidateMode: "onChange"
|
|
18252
|
-
}), { handleSubmit: l, watch: u, control: d, formState: f } = c, p =
|
|
18252
|
+
}), { handleSubmit: l, watch: u, control: d, formState: f } = c, p = Os((e) => {
|
|
18253
18253
|
n(e);
|
|
18254
|
-
}), m =
|
|
18254
|
+
}), m = Os((e) => {
|
|
18255
18255
|
r(e);
|
|
18256
|
-
}), h =
|
|
18256
|
+
}), h = Os(() => {
|
|
18257
18257
|
l((e) => {
|
|
18258
18258
|
p(e), o && c.reset(e, { keepValues: !0 });
|
|
18259
18259
|
}, () => {
|
|
@@ -18393,10 +18393,10 @@ var Uj = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18393
18393
|
className: "grow text-left text-ellipsis py-2 focus-visible:outline focus-visible:outline-ring",
|
|
18394
18394
|
"aria-pressed": r === t,
|
|
18395
18395
|
onClick: () => a(t),
|
|
18396
|
-
children:
|
|
18396
|
+
children: Ya.startCase(u.type)
|
|
18397
18397
|
}), /* @__PURE__ */ (0, Y.jsx)("button", {
|
|
18398
18398
|
type: "button",
|
|
18399
|
-
"aria-label": `Delete ${
|
|
18399
|
+
"aria-label": `Delete ${Ya.startCase(u.type)} transform ${t + 1}`,
|
|
18400
18400
|
className: "opacity-0 group-hover:opacity-100 focus-visible:opacity-100 text-muted-foreground hover:text-destructive focus-visible:outline focus-visible:outline-ring",
|
|
18401
18401
|
onClick: (e) => {
|
|
18402
18402
|
if (e.currentTarget.matches(":focus")) {
|
|
@@ -18452,7 +18452,7 @@ var Uj = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18452
18452
|
onSelect: (t) => {
|
|
18453
18453
|
t.stopPropagation(), n(e);
|
|
18454
18454
|
},
|
|
18455
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(r, { className: "w-3.5 h-3.5 mr-2" }), /* @__PURE__ */ (0, Y.jsx)("span", { children:
|
|
18455
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(r, { className: "w-3.5 h-3.5 mr-2" }), /* @__PURE__ */ (0, Y.jsx)("span", { children: Ya.startCase(t.value) })]
|
|
18456
18456
|
}, t.value);
|
|
18457
18457
|
}), t[4] = n, t[5] = s);
|
|
18458
18458
|
let c;
|
|
@@ -18482,7 +18482,7 @@ var Uj = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18482
18482
|
column_conversion: re,
|
|
18483
18483
|
filter_rows: In,
|
|
18484
18484
|
group_by: ud,
|
|
18485
|
-
rename_column:
|
|
18485
|
+
rename_column: Ia,
|
|
18486
18486
|
select_columns: bd,
|
|
18487
18487
|
sort_column: Gu,
|
|
18488
18488
|
shuffle_rows: _d,
|
|
@@ -18502,7 +18502,7 @@ var Jj = AE("marimo-dataframe").withData(K({
|
|
|
18502
18502
|
pageSize: U().default(5),
|
|
18503
18503
|
showDownload: G().default(!0),
|
|
18504
18504
|
dataframeName: W().optional(),
|
|
18505
|
-
columns: H(
|
|
18505
|
+
columns: H(ps([
|
|
18506
18506
|
W().or(U()),
|
|
18507
18507
|
W(),
|
|
18508
18508
|
W()
|
|
@@ -18524,7 +18524,7 @@ var Jj = AE("marimo-dataframe").withData(K({
|
|
|
18524
18524
|
sql_code: W().nullish()
|
|
18525
18525
|
})),
|
|
18526
18526
|
get_column_values: JE.input(K({ column: W() })).output(K({
|
|
18527
|
-
values: H(
|
|
18527
|
+
values: H(fo()),
|
|
18528
18528
|
too_many_values: G()
|
|
18529
18529
|
})),
|
|
18530
18530
|
search: JE.input(K({
|
|
@@ -18537,7 +18537,7 @@ var Jj = AE("marimo-dataframe").withData(K({
|
|
|
18537
18537
|
page_number: U(),
|
|
18538
18538
|
page_size: U()
|
|
18539
18539
|
})).output(K({
|
|
18540
|
-
data:
|
|
18540
|
+
data: Wo([W(), H(eo({}))]),
|
|
18541
18541
|
total_rows: U()
|
|
18542
18542
|
})),
|
|
18543
18543
|
download_as: xA,
|
|
@@ -18616,7 +18616,7 @@ var Jj = AE("marimo-dataframe").withData(K({
|
|
|
18616
18616
|
}), t[28] = oe, t[29] = se, t[30] = ce) : ce = t[30];
|
|
18617
18617
|
let le;
|
|
18618
18618
|
t[31] !== c || t[32] !== s ? (le = (e) => {
|
|
18619
|
-
|
|
18619
|
+
vo(e, s) || (c(e), P(e));
|
|
18620
18620
|
}, t[31] = c, t[32] = s, t[33] = le) : le = t[33];
|
|
18621
18621
|
let ue;
|
|
18622
18622
|
t[34] !== k || t[35] !== n || t[36] !== u || t[37] !== N || t[38] !== o || t[39] !== le ? (ue = /* @__PURE__ */ (0, Y.jsx)(Vt, {
|
|
@@ -18667,7 +18667,7 @@ var Jj = AE("marimo-dataframe").withData(K({
|
|
|
18667
18667
|
]
|
|
18668
18668
|
}), t[45] = L, t[46] = ce, t[47] = ue, t[48] = de, t[49] = fe, t[50] = pe) : pe = t[50];
|
|
18669
18669
|
let me;
|
|
18670
|
-
t[51] === x ? me = t[52] : (me = x && /* @__PURE__ */ (0, Y.jsx)(
|
|
18670
|
+
t[51] === x ? me = t[52] : (me = x && /* @__PURE__ */ (0, Y.jsx)(bs, { error: x }), t[51] = x, t[52] = me);
|
|
18671
18671
|
let he = w || "", ge = T ?? 0, _e = M ?? 0, ve = D || Ks.EMPTY, ye = T && T > 5 || !1, be;
|
|
18672
18672
|
t[53] !== f || t[54] !== p || t[55] !== O || t[56] !== m || t[57] !== h || t[58] !== g || t[59] !== r || t[60] !== d || t[61] !== i || t[62] !== he || t[63] !== ge || t[64] !== _e || t[65] !== ve || t[66] !== ye ? (be = /* @__PURE__ */ (0, Y.jsx)($A, {
|
|
18673
18673
|
label: null,
|
|
@@ -18777,7 +18777,7 @@ var eM = {
|
|
|
18777
18777
|
data: ad,
|
|
18778
18778
|
pdf: ee,
|
|
18779
18779
|
zip: od,
|
|
18780
|
-
unknown:
|
|
18780
|
+
unknown: Oa
|
|
18781
18781
|
};
|
|
18782
18782
|
//#endregion
|
|
18783
18783
|
//#region src/hooks/useDelayElapsed.ts
|
|
@@ -18885,7 +18885,7 @@ function aM(e) {
|
|
|
18885
18885
|
}), t[18] = a, t[19] = s), s;
|
|
18886
18886
|
}
|
|
18887
18887
|
var oM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i, label: a, restrictNavigation: o, list_directory: s, host: c }) => {
|
|
18888
|
-
let [u, d] = ai(n), [f, p] = (0, J.useState)(!1), [m, h] = (0, J.useState)(0), g = (0, J.useRef)([]), v = (0, J.useRef)(null), y = (0, J.useRef)(!1), b = c.closest(`[${
|
|
18888
|
+
let [u, d] = ai(n), [f, p] = (0, J.useState)(!1), [m, h] = (0, J.useState)(0), g = (0, J.useRef)([]), v = (0, J.useRef)(null), y = (0, J.useRef)(!1), b = c.closest(`[${Li}]`)?.getAttribute(Li), { data: S, error: C, isPending: w } = $s(() => s({ path: u }), [
|
|
18889
18889
|
u,
|
|
18890
18890
|
b,
|
|
18891
18891
|
s
|
|
@@ -18900,7 +18900,7 @@ var oM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
18900
18900
|
y.current && (y.current = !1, g.current[0]?.focus());
|
|
18901
18901
|
}, [D]);
|
|
18902
18902
|
let A = S?.files ?? [], j = new Set(e.map((e) => e.path)), M = r === "directory" || r === "all", N = r === "file" || r === "all", P = A.filter((e) => M && e.is_directory || N && !e.is_directory), I = P.length > 0 && P.every((e) => j.has(e.path));
|
|
18903
|
-
if (!S && C) return /* @__PURE__ */ (0, Y.jsx)(
|
|
18903
|
+
if (!S && C) return /* @__PURE__ */ (0, Y.jsx)(Ss, {
|
|
18904
18904
|
kind: "danger",
|
|
18905
18905
|
children: C.message
|
|
18906
18906
|
});
|
|
@@ -19013,7 +19013,7 @@ var oM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19013
19013
|
name: e === se ? se : e.split(L).findLast(Boolean) ?? e
|
|
19014
19014
|
})), ue = r === "all" ? ae.of("file", "folder") : r === "directory" ? ae.of("folder") : ae.of("file");
|
|
19015
19015
|
return /* @__PURE__ */ (0, Y.jsxs)("div", { children: [
|
|
19016
|
-
C && /* @__PURE__ */ (0, Y.jsx)(
|
|
19016
|
+
C && /* @__PURE__ */ (0, Y.jsx)(Ss, {
|
|
19017
19017
|
kind: "danger",
|
|
19018
19018
|
children: C.message
|
|
19019
19019
|
}),
|
|
@@ -20370,7 +20370,7 @@ function uM(e, t, n) {
|
|
|
20370
20370
|
//#region ../node_modules/.pnpm/file-selector@2.1.2/node_modules/file-selector/dist/es2015/file-selector.js
|
|
20371
20371
|
var dM = [".DS_Store", "Thumbs.db"];
|
|
20372
20372
|
function fM(e) {
|
|
20373
|
-
return
|
|
20373
|
+
return Eo(this, void 0, void 0, function* () {
|
|
20374
20374
|
return hM(e) && pM(e.dataTransfer) ? vM(e.dataTransfer, e.type) : mM(e) ? gM(e) : Array.isArray(e) && e.every((e) => "getFile" in e && typeof e.getFile == "function") ? _M(e) : [];
|
|
20375
20375
|
});
|
|
20376
20376
|
}
|
|
@@ -20387,12 +20387,12 @@ function gM(e) {
|
|
|
20387
20387
|
return bM(e.target.files).map((e) => cM(e));
|
|
20388
20388
|
}
|
|
20389
20389
|
function _M(e) {
|
|
20390
|
-
return
|
|
20390
|
+
return Eo(this, void 0, void 0, function* () {
|
|
20391
20391
|
return (yield Promise.all(e.map((e) => e.getFile()))).map((e) => cM(e));
|
|
20392
20392
|
});
|
|
20393
20393
|
}
|
|
20394
20394
|
function vM(e, t) {
|
|
20395
|
-
return
|
|
20395
|
+
return Eo(this, void 0, void 0, function* () {
|
|
20396
20396
|
if (e.items) {
|
|
20397
20397
|
let n = bM(e.items).filter((e) => e.kind === "file");
|
|
20398
20398
|
return t === "drop" ? yM(SM(yield Promise.all(n.map(xM)))) : n;
|
|
@@ -20421,7 +20421,7 @@ function SM(e) {
|
|
|
20421
20421
|
return e.reduce((e, t) => [...e, ...Array.isArray(t) ? SM(t) : [t]], []);
|
|
20422
20422
|
}
|
|
20423
20423
|
function CM(e, t) {
|
|
20424
|
-
return
|
|
20424
|
+
return Eo(this, void 0, void 0, function* () {
|
|
20425
20425
|
if (globalThis.isSecureContext && typeof e.getAsFileSystemHandle == "function") {
|
|
20426
20426
|
let t = yield e.getAsFileSystemHandle();
|
|
20427
20427
|
if (t === null) throw Error(`${e} is not a File`);
|
|
@@ -20436,7 +20436,7 @@ function CM(e, t) {
|
|
|
20436
20436
|
});
|
|
20437
20437
|
}
|
|
20438
20438
|
function wM(e) {
|
|
20439
|
-
return
|
|
20439
|
+
return Eo(this, void 0, void 0, function* () {
|
|
20440
20440
|
return e.isDirectory ? TM(e) : EM(e);
|
|
20441
20441
|
});
|
|
20442
20442
|
}
|
|
@@ -20445,7 +20445,7 @@ function TM(e) {
|
|
|
20445
20445
|
return new Promise((e, n) => {
|
|
20446
20446
|
let r = [];
|
|
20447
20447
|
function i() {
|
|
20448
|
-
t.readEntries((t) =>
|
|
20448
|
+
t.readEntries((t) => Eo(this, void 0, void 0, function* () {
|
|
20449
20449
|
if (t.length) {
|
|
20450
20450
|
let e = Promise.all(t.map(wM));
|
|
20451
20451
|
r.push(e), i();
|
|
@@ -20462,7 +20462,7 @@ function TM(e) {
|
|
|
20462
20462
|
});
|
|
20463
20463
|
}
|
|
20464
20464
|
function EM(e) {
|
|
20465
|
-
return
|
|
20465
|
+
return Eo(this, void 0, void 0, function* () {
|
|
20466
20466
|
return new Promise((t, n) => {
|
|
20467
20467
|
e.file((n) => {
|
|
20468
20468
|
t(cM(n, e.fullPath));
|
|
@@ -20487,7 +20487,7 @@ var DM = /* @__PURE__ */ i(((e) => {
|
|
|
20487
20487
|
}
|
|
20488
20488
|
return !0;
|
|
20489
20489
|
};
|
|
20490
|
-
})), OM = /* @__PURE__ */ e(
|
|
20490
|
+
})), OM = /* @__PURE__ */ e(Ra()), kM = /* @__PURE__ */ e(DM());
|
|
20491
20491
|
function AM(e) {
|
|
20492
20492
|
return NM(e) || MM(e) || zM(e) || jM();
|
|
20493
20493
|
}
|
|
@@ -21219,7 +21219,7 @@ var WN = (e) => {
|
|
|
21219
21219
|
t[0] === e.filetypes ? n = t[1] : (n = UN(e.filetypes), t[0] = e.filetypes, t[1] = n);
|
|
21220
21220
|
let r = n, { setValue: i, kind: a, multiple: o, value: s, max_size: c } = e, u;
|
|
21221
21221
|
t[2] === i ? u = t[3] : (u = (e) => {
|
|
21222
|
-
|
|
21222
|
+
Na(e).then((e) => {
|
|
21223
21223
|
i(e);
|
|
21224
21224
|
}).catch(YN);
|
|
21225
21225
|
}, t[2] = i, t[3] = u);
|
|
@@ -21439,7 +21439,7 @@ var ZN = AE("marimo-form").withData(K({
|
|
|
21439
21439
|
clearButtonLabel: W().default("Clear"),
|
|
21440
21440
|
clearButtonTooltip: W().optional(),
|
|
21441
21441
|
shouldValidate: G().optional()
|
|
21442
|
-
})).withFunctions({ validate: JE.input(K({ value:
|
|
21442
|
+
})).withFunctions({ validate: JE.input(K({ value: as() })).output(W().nullish()) }).renderer(({ data: e, functions: t, ...n }) => /* @__PURE__ */ (0, Y.jsx)($N, {
|
|
21443
21443
|
...e,
|
|
21444
21444
|
...n,
|
|
21445
21445
|
...t
|
|
@@ -21476,7 +21476,7 @@ var ZN = AE("marimo-form").withData(K({
|
|
|
21476
21476
|
children: F({ html: o })
|
|
21477
21477
|
}), t[11] = o, t[12] = M);
|
|
21478
21478
|
let N;
|
|
21479
|
-
t[13] === C ? N = t[14] : (N = C != null && /* @__PURE__ */ (0, Y.jsx)(
|
|
21479
|
+
t[13] === C ? N = t[14] : (N = C != null && /* @__PURE__ */ (0, Y.jsx)(Ss, {
|
|
21480
21480
|
kind: "danger",
|
|
21481
21481
|
className: "rounded",
|
|
21482
21482
|
children: C ?? "Invalid input"
|
|
@@ -21544,8 +21544,8 @@ var ZN = AE("marimo-form").withData(K({
|
|
|
21544
21544
|
let t = e.detail.element;
|
|
21545
21545
|
t !== null && t instanceof Node && TE(t) === i && u(e.detail.value);
|
|
21546
21546
|
};
|
|
21547
|
-
return document.addEventListener(
|
|
21548
|
-
document.removeEventListener(
|
|
21547
|
+
return document.addEventListener(Ta.TYPE, e), () => {
|
|
21548
|
+
document.removeEventListener(Ta.TYPE, e);
|
|
21549
21549
|
};
|
|
21550
21550
|
}, t[12] = i, t[13] = m);
|
|
21551
21551
|
let h;
|
|
@@ -21815,7 +21815,7 @@ var pP = (e) => {
|
|
|
21815
21815
|
variant: "secondary",
|
|
21816
21816
|
onClick: r,
|
|
21817
21817
|
className: "w-[50px]",
|
|
21818
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
21818
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Da, {
|
|
21819
21819
|
className: "w-5 h-5 rounded-sm",
|
|
21820
21820
|
fill: "var(--red-9)",
|
|
21821
21821
|
strokeWidth: 1.5
|
|
@@ -21855,15 +21855,15 @@ function mP() {
|
|
|
21855
21855
|
n(hP);
|
|
21856
21856
|
}, 100);
|
|
21857
21857
|
}, e[1] = o) : o = e[1];
|
|
21858
|
-
let s =
|
|
21858
|
+
let s = Os(o), c;
|
|
21859
21859
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (c = () => {
|
|
21860
21860
|
r.current != null && (window.clearInterval(r.current), r.current = void 0);
|
|
21861
21861
|
}, e[2] = c) : c = e[2];
|
|
21862
|
-
let l =
|
|
21862
|
+
let l = Os(c), u;
|
|
21863
21863
|
e[3] === Symbol.for("react.memo_cache_sentinel") ? (u = () => {
|
|
21864
21864
|
n(0);
|
|
21865
21865
|
}, e[3] = u) : u = e[3];
|
|
21866
|
-
let d =
|
|
21866
|
+
let d = Os(u), f, p;
|
|
21867
21867
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (f = () => () => {
|
|
21868
21868
|
window.clearInterval(r.current);
|
|
21869
21869
|
}, p = [], e[4] = f, e[5] = p) : (f = e[4], p = e[5]), (0, J.useEffect)(f, p);
|
|
@@ -21894,15 +21894,15 @@ function gP(e) {
|
|
|
21894
21894
|
c.log(e), l(!1);
|
|
21895
21895
|
});
|
|
21896
21896
|
}, t[0] = n, t[1] = r, t[2] = f, t[3] = p) : p = t[3];
|
|
21897
|
-
let m =
|
|
21897
|
+
let m = Os(p), h;
|
|
21898
21898
|
t[4] === f ? h = t[5] : (h = () => {
|
|
21899
21899
|
o.current?.stop(), f.stop(), a("stopped");
|
|
21900
21900
|
}, t[4] = f, t[5] = h);
|
|
21901
|
-
let g =
|
|
21901
|
+
let g = Os(h), _;
|
|
21902
21902
|
t[6] === f ? _ = t[7] : (_ = () => {
|
|
21903
21903
|
a((e) => e === "recording" ? (o.current?.pause(), f.stop(), "paused") : e === "paused" ? (o.current?.resume(), f.start(), "recording") : e);
|
|
21904
21904
|
}, t[6] = f, t[7] = _);
|
|
21905
|
-
let v =
|
|
21905
|
+
let v = Os(_), y;
|
|
21906
21906
|
t[8] === f ? y = t[9] : (y = () => {
|
|
21907
21907
|
o.current?.stream.getTracks().forEach(_P), o.current?.stop(), f.stop();
|
|
21908
21908
|
}, t[8] = f, t[9] = y), kr(y);
|
|
@@ -21935,7 +21935,7 @@ var yP = class {
|
|
|
21935
21935
|
}, bP = (e) => {
|
|
21936
21936
|
let t = (0, X.c)(14), { setValue: n, data: r } = e, i;
|
|
21937
21937
|
t[0] === n ? i = t[1] : (i = { onDone: async (e) => {
|
|
21938
|
-
let t = await
|
|
21938
|
+
let t = await ja(e, "base64");
|
|
21939
21939
|
n(t);
|
|
21940
21940
|
} }, t[0] = n, t[1] = i);
|
|
21941
21941
|
let { start: a, stop: o, pauseResume: s, recordingStatus: c, recordingTime: l, allowed: u } = gP(i), d;
|
|
@@ -22376,9 +22376,9 @@ var MP = class {
|
|
|
22376
22376
|
tagName = "marimo-matplotlib";
|
|
22377
22377
|
validator = K({
|
|
22378
22378
|
chartBase64: W(),
|
|
22379
|
-
xBounds:
|
|
22380
|
-
yBounds:
|
|
22381
|
-
axesPixelBounds:
|
|
22379
|
+
xBounds: ps([U(), U()]),
|
|
22380
|
+
yBounds: ps([U(), U()]),
|
|
22381
|
+
axesPixelBounds: ps([
|
|
22382
22382
|
U(),
|
|
22383
22383
|
U(),
|
|
22384
22384
|
U(),
|
|
@@ -22443,7 +22443,7 @@ var MP = class {
|
|
|
22443
22443
|
}, IP = "mpl-interactive-figure", LP = AE("marimo-mpl-interactive").withData(K({
|
|
22444
22444
|
mplJsUrl: W(),
|
|
22445
22445
|
cssUrl: W(),
|
|
22446
|
-
toolbarImages:
|
|
22446
|
+
toolbarImages: Bo(W(), W()),
|
|
22447
22447
|
width: U(),
|
|
22448
22448
|
height: U()
|
|
22449
22449
|
})).withFunctions({}).renderer((e) => /* @__PURE__ */ (0, Y.jsx)(HP, { ...e })), RP = null;
|
|
@@ -22645,7 +22645,7 @@ function KP(e) {
|
|
|
22645
22645
|
}
|
|
22646
22646
|
//#endregion
|
|
22647
22647
|
//#region src/plugins/impl/panel/utils.ts
|
|
22648
|
-
var qP = K({ content:
|
|
22648
|
+
var qP = K({ content: Wo([K({ type: To("ACK") }), W()]).nullable() });
|
|
22649
22649
|
function JP(e, t) {
|
|
22650
22650
|
if (Array.isArray(e)) return e.map((e) => JP(e, t));
|
|
22651
22651
|
if (e instanceof Map) {
|
|
@@ -22699,12 +22699,12 @@ var YP = class {
|
|
|
22699
22699
|
}
|
|
22700
22700
|
}, XP = AE("marimo-panel").withData(K({
|
|
22701
22701
|
extensionUrl: W().nullable(),
|
|
22702
|
-
docs_json:
|
|
22703
|
-
render_json: K({ roots:
|
|
22702
|
+
docs_json: Bo(W(), as()),
|
|
22703
|
+
render_json: K({ roots: Bo(W(), W()) }).catchall(as())
|
|
22704
22704
|
})).withFunctions({ send_to_widget: JE.input(K({
|
|
22705
|
-
message:
|
|
22705
|
+
message: as(),
|
|
22706
22706
|
buffers: H(W())
|
|
22707
|
-
})).output(
|
|
22707
|
+
})).output(Po().optional()) }).renderer((e) => /* @__PURE__ */ (0, Y.jsx)($P, { ...e }));
|
|
22708
22708
|
function ZP() {
|
|
22709
22709
|
return window.Bokeh != null;
|
|
22710
22710
|
}
|
|
@@ -22727,7 +22727,7 @@ var $P = (e) => {
|
|
|
22727
22727
|
buffers: s
|
|
22728
22728
|
}).catch(rF);
|
|
22729
22729
|
}, t[0] = r, t[1] = _);
|
|
22730
|
-
let v =
|
|
22730
|
+
let v = Os(_), y, b;
|
|
22731
22731
|
t[2] === v ? (y = t[3], b = t[4]) : (y = () => {
|
|
22732
22732
|
let e = new YP(v);
|
|
22733
22733
|
return g.current = e, () => {
|
|
@@ -22765,7 +22765,7 @@ var $P = (e) => {
|
|
|
22765
22765
|
else return;
|
|
22766
22766
|
let o = r.message;
|
|
22767
22767
|
o != null && Object.keys(o.content).length > 0 && (o.content.events !== void 0 && (o.content.events = o.content.events.filter((e) => e?.model?.id && a._all_models.has(e.model.id))), a.apply_json_patch(o.content, o.buffers));
|
|
22768
|
-
}, t[8] = v, t[9] = C), u(i,
|
|
22768
|
+
}, t[8] = v, t[9] = C), u(i, ka.TYPE, C);
|
|
22769
22769
|
let w, T;
|
|
22770
22770
|
t[10] !== o || t[11] !== f || t[12] !== s || t[13] !== m ? (w = () => {
|
|
22771
22771
|
let e = Object.keys(o)[0];
|
|
@@ -22868,7 +22868,7 @@ function uF(e) {
|
|
|
22868
22868
|
return t === e ? this : uF(t);
|
|
22869
22869
|
},
|
|
22870
22870
|
parse(e) {
|
|
22871
|
-
return Object.entries(n).reduce((t, [n, r]) => (t[n] =
|
|
22871
|
+
return Object.entries(n).reduce((t, [n, r]) => (t[n] = Cs(e, r), t), {});
|
|
22872
22872
|
}
|
|
22873
22873
|
};
|
|
22874
22874
|
}
|
|
@@ -23035,20 +23035,20 @@ function jF(e) {
|
|
|
23035
23035
|
return e.map((e) => {
|
|
23036
23036
|
let n = _F(e);
|
|
23037
23037
|
if (n.type === "funnelarea") {
|
|
23038
|
-
let r =
|
|
23038
|
+
let r = ws(e, pF), i = Array.isArray(n.hovertemplate) ? n.hovertemplate[0] : n.hovertemplate;
|
|
23039
23039
|
return i ? (t = t ? t.update(i) : uF(i), {
|
|
23040
23040
|
...r,
|
|
23041
23041
|
...t.parse(e)
|
|
23042
23042
|
}) : r;
|
|
23043
23043
|
}
|
|
23044
23044
|
if (n.type === "funnel") {
|
|
23045
|
-
let r =
|
|
23045
|
+
let r = ws(e, fF), i = Array.isArray(n.hovertemplate) ? n.hovertemplate[0] : n.hovertemplate;
|
|
23046
23046
|
return i ? (t = t ? t.update(i) : uF(i), {
|
|
23047
23047
|
...r,
|
|
23048
23048
|
...t.parse(e)
|
|
23049
23049
|
}) : r;
|
|
23050
23050
|
}
|
|
23051
|
-
let r = AF(e,
|
|
23051
|
+
let r = AF(e, ws(e, hF)), i = Array.isArray(n.hovertemplate) ? n.hovertemplate[0] : n.hovertemplate;
|
|
23052
23052
|
return !i || n.type === "heatmap" ? r : (t = t ? t.update(i) : uF(i), {
|
|
23053
23053
|
...r,
|
|
23054
23054
|
...t.parse(e)
|
|
@@ -23056,7 +23056,7 @@ function jF(e) {
|
|
|
23056
23056
|
});
|
|
23057
23057
|
}
|
|
23058
23058
|
function MF(e) {
|
|
23059
|
-
return e.map((e) =>
|
|
23059
|
+
return e.map((e) => ws(e, dF));
|
|
23060
23060
|
}
|
|
23061
23061
|
var NF = MF, PF = [
|
|
23062
23062
|
"dragmode",
|
|
@@ -23083,7 +23083,7 @@ function RF(e, t, n) {
|
|
|
23083
23083
|
let r = IF(e);
|
|
23084
23084
|
return LF(t, e) ? {
|
|
23085
23085
|
...r,
|
|
23086
|
-
...
|
|
23086
|
+
...Es.pick(n, PF)
|
|
23087
23087
|
} : {
|
|
23088
23088
|
...r,
|
|
23089
23089
|
..."dragmode" in n ? { dragmode: n.dragmode } : {}
|
|
@@ -23091,11 +23091,11 @@ function RF(e, t, n) {
|
|
|
23091
23091
|
}
|
|
23092
23092
|
function zF(e, t) {
|
|
23093
23093
|
let n = new Set(FF);
|
|
23094
|
-
for (let r of n)
|
|
23094
|
+
for (let r of n) vo(e[r], t[r]) || n.delete(r);
|
|
23095
23095
|
return n;
|
|
23096
23096
|
}
|
|
23097
23097
|
function BF(e, t, n) {
|
|
23098
|
-
let r = zF(e, t), i =
|
|
23098
|
+
let r = zF(e, t), i = Es.omit(e, r);
|
|
23099
23099
|
return {
|
|
23100
23100
|
...n,
|
|
23101
23101
|
...i
|
|
@@ -23138,8 +23138,8 @@ function VF(e) {
|
|
|
23138
23138
|
var HF = class {
|
|
23139
23139
|
tagName = "marimo-plotly";
|
|
23140
23140
|
validator = K({
|
|
23141
|
-
figure:
|
|
23142
|
-
config:
|
|
23141
|
+
figure: eo({}).transform((e) => e),
|
|
23142
|
+
config: eo({})
|
|
23143
23143
|
});
|
|
23144
23144
|
render(e) {
|
|
23145
23145
|
return /* @__PURE__ */ (0, Y.jsx)(WF, {
|
|
@@ -23160,7 +23160,7 @@ var HF = class {
|
|
|
23160
23160
|
t[4] !== d || t[5] !== i ? (f = () => {
|
|
23161
23161
|
d(), i({});
|
|
23162
23162
|
}, t[4] = d, t[5] = i, t[6] = f) : f = t[6];
|
|
23163
|
-
let p =
|
|
23163
|
+
let p = Os(f), m;
|
|
23164
23164
|
t[7] !== u || t[8] !== i ? (m = (e) => {
|
|
23165
23165
|
u((t) => ({
|
|
23166
23166
|
...t,
|
|
@@ -23170,7 +23170,7 @@ var HF = class {
|
|
|
23170
23170
|
dragmode: e
|
|
23171
23171
|
}));
|
|
23172
23172
|
}, t[7] = u, t[8] = i, t[9] = m) : m = t[9];
|
|
23173
|
-
let h =
|
|
23173
|
+
let h = Os(m), g = pc(a), _;
|
|
23174
23174
|
t[10] === c.data ? _ = t[11] : (_ = SF(c.data) || CF(c.data), t[10] = c.data, t[11] = _);
|
|
23175
23175
|
let v = _, y, b, x;
|
|
23176
23176
|
if (t[12] !== g || t[13] !== p || t[14] !== h || t[15] !== v) {
|
|
@@ -23197,7 +23197,7 @@ var HF = class {
|
|
|
23197
23197
|
let t = {};
|
|
23198
23198
|
Object.entries(e).forEach((e) => {
|
|
23199
23199
|
let [n, r] = e;
|
|
23200
|
-
|
|
23200
|
+
jo(t, n, r);
|
|
23201
23201
|
}), i((e) => ({
|
|
23202
23202
|
...e,
|
|
23203
23203
|
...t
|
|
@@ -23208,21 +23208,21 @@ var HF = class {
|
|
|
23208
23208
|
t[25] === i ? T = t[26] : (T = () => {
|
|
23209
23209
|
i(KF);
|
|
23210
23210
|
}, t[25] = i, t[26] = T);
|
|
23211
|
-
let E =
|
|
23211
|
+
let E = Os(T), D;
|
|
23212
23212
|
t[27] === i ? D = t[28] : (D = (e) => {
|
|
23213
23213
|
e && i((t) => ({
|
|
23214
23214
|
...t,
|
|
23215
23215
|
points: NF(e.points)
|
|
23216
23216
|
}));
|
|
23217
23217
|
}, t[27] = i, t[28] = D);
|
|
23218
|
-
let O =
|
|
23218
|
+
let O = Os(D), k;
|
|
23219
23219
|
t[29] === i ? k = t[30] : (k = (e) => {
|
|
23220
23220
|
e && i((t) => ({
|
|
23221
23221
|
...t,
|
|
23222
23222
|
points: MF(e.points)
|
|
23223
23223
|
}));
|
|
23224
23224
|
}, t[29] = i, t[30] = k);
|
|
23225
|
-
let A =
|
|
23225
|
+
let A = Os(k), j;
|
|
23226
23226
|
t[31] === i ? j = t[32] : (j = (e) => {
|
|
23227
23227
|
if (!e || !DF(e.points)) return;
|
|
23228
23228
|
let t = jF(e.points), n = OF(e.points);
|
|
@@ -23235,7 +23235,7 @@ var HF = class {
|
|
|
23235
23235
|
indices: n
|
|
23236
23236
|
}));
|
|
23237
23237
|
}, t[31] = i, t[32] = j);
|
|
23238
|
-
let M =
|
|
23238
|
+
let M = Os(j), N;
|
|
23239
23239
|
t[33] === i ? N = t[34] : (N = (e) => {
|
|
23240
23240
|
e && i((t) => ({
|
|
23241
23241
|
...t,
|
|
@@ -23246,7 +23246,7 @@ var HF = class {
|
|
|
23246
23246
|
lasso: "lassoPoints" in e ? e.lassoPoints : void 0
|
|
23247
23247
|
}));
|
|
23248
23248
|
}, t[33] = i, t[34] = N);
|
|
23249
|
-
let P =
|
|
23249
|
+
let P = Os(N), F = c.frames ?? void 0, I = Os(qF), L;
|
|
23250
23250
|
return t[35] !== c || t[36] !== l || t[37] !== C || t[38] !== E || t[39] !== O || t[40] !== A || t[41] !== M || t[42] !== P || t[43] !== F || t[44] !== I || t[45] !== w ? (L = /* @__PURE__ */ (0, Y.jsx)(UF, {
|
|
23251
23251
|
...c,
|
|
23252
23252
|
layout: l,
|
|
@@ -23479,9 +23479,9 @@ var ZF = class {
|
|
|
23479
23479
|
}, t[10] = u, t[11] = r, t[12] = N, t[13] = P) : (N = t[12], P = t[13]);
|
|
23480
23480
|
let F, I;
|
|
23481
23481
|
t[14] !== u || t[15] !== v || t[16] !== r || t[17] !== i ? (F = () => {
|
|
23482
|
-
u && !
|
|
23482
|
+
u && !vo(v, i) && r(v);
|
|
23483
23483
|
}, I = () => {
|
|
23484
|
-
u && !
|
|
23484
|
+
u && !vo(v, i) && r(v);
|
|
23485
23485
|
}, t[14] = u, t[15] = v, t[16] = r, t[17] = i, t[18] = F, t[19] = I) : (F = t[18], I = t[19]);
|
|
23486
23486
|
let L;
|
|
23487
23487
|
t[20] !== m || t[21] !== g || t[22] !== v || t[23] !== d || t[24] !== a || t[25] !== s || t[26] !== o || t[27] !== j || t[28] !== M || t[29] !== N || t[30] !== P || t[31] !== F || t[32] !== I || t[33] !== h ? (L = /* @__PURE__ */ (0, Y.jsx)(XF, {
|
|
@@ -23629,8 +23629,8 @@ var ZF = class {
|
|
|
23629
23629
|
}), nI = class {
|
|
23630
23630
|
tagName = "marimo-refresh";
|
|
23631
23631
|
validator = K({
|
|
23632
|
-
options: H(
|
|
23633
|
-
defaultInterval:
|
|
23632
|
+
options: H(Wo([tI, U().min(eI)])).default([]),
|
|
23633
|
+
defaultInterval: Wo([tI, U().min(eI)]).optional(),
|
|
23634
23634
|
label: W().nullable()
|
|
23635
23635
|
});
|
|
23636
23636
|
render(e) {
|
|
@@ -23641,7 +23641,7 @@ var ZF = class {
|
|
|
23641
23641
|
(0, J.useEffect)(() => {
|
|
23642
23642
|
r(t.defaultInterval ?? rI);
|
|
23643
23643
|
}, [t.defaultInterval]);
|
|
23644
|
-
let [i, a] = (0, J.useState)(!1), o =
|
|
23644
|
+
let [i, a] = (0, J.useState)(!1), o = Os(() => {
|
|
23645
23645
|
a(!0), e(() => `${n} (${iI++})`), setTimeout(() => a(!1), 500);
|
|
23646
23646
|
});
|
|
23647
23647
|
(0, J.useEffect)(() => {
|
|
@@ -23948,7 +23948,7 @@ var hI = class {
|
|
|
23948
23948
|
maxLength: U().optional(),
|
|
23949
23949
|
minLength: U().optional(),
|
|
23950
23950
|
disabled: G().optional(),
|
|
23951
|
-
debounce:
|
|
23951
|
+
debounce: es(Wo([G(), U()])),
|
|
23952
23952
|
rows: U().default(4),
|
|
23953
23953
|
fullWidth: G().default(!1)
|
|
23954
23954
|
});
|
|
@@ -24068,11 +24068,11 @@ var hI = class {
|
|
|
24068
24068
|
minLength: U().optional(),
|
|
24069
24069
|
fullWidth: G().default(!1),
|
|
24070
24070
|
disabled: G().optional(),
|
|
24071
|
-
debounce:
|
|
24071
|
+
debounce: es(Wo([G(), U()])),
|
|
24072
24072
|
passwordHasValue: G().optional()
|
|
24073
24073
|
});
|
|
24074
24074
|
render(e) {
|
|
24075
|
-
let t = e.data.kind === "password" ? e.host.closest(`[${
|
|
24075
|
+
let t = e.data.kind === "password" ? e.host.closest(`[${Li}]`)?.getAttribute(Li) : void 0;
|
|
24076
24076
|
return /* @__PURE__ */ (0, Y.jsx)(yI, {
|
|
24077
24077
|
...e.data,
|
|
24078
24078
|
value: e.value,
|
|
@@ -24194,17 +24194,17 @@ function bI(e, t) {
|
|
|
24194
24194
|
}
|
|
24195
24195
|
//#endregion
|
|
24196
24196
|
//#region src/plugins/impl/vega/VegaPlugin.tsx
|
|
24197
|
-
var xI = J.lazy(() => import("./vega-component-
|
|
24197
|
+
var xI = J.lazy(() => import("./vega-component-CeN8zClP.js")), SI = class {
|
|
24198
24198
|
tagName = "marimo-vega";
|
|
24199
24199
|
validator = K({
|
|
24200
|
-
spec:
|
|
24201
|
-
chartSelection:
|
|
24200
|
+
spec: eo({}).transform((e) => e),
|
|
24201
|
+
chartSelection: Wo([
|
|
24202
24202
|
G(),
|
|
24203
|
-
|
|
24204
|
-
|
|
24203
|
+
To("point"),
|
|
24204
|
+
To("interval")
|
|
24205
24205
|
]).default(!0),
|
|
24206
|
-
fieldSelection:
|
|
24207
|
-
embedOptions:
|
|
24206
|
+
fieldSelection: Wo([G(), H(W())]).default(!0),
|
|
24207
|
+
embedOptions: eo({}).default({})
|
|
24208
24208
|
});
|
|
24209
24209
|
render(e) {
|
|
24210
24210
|
return /* @__PURE__ */ (0, Y.jsx)(xI, {
|
|
@@ -24303,7 +24303,7 @@ var DI = class {
|
|
|
24303
24303
|
tagName = "marimo-carousel";
|
|
24304
24304
|
validator = K({
|
|
24305
24305
|
index: W().nullish(),
|
|
24306
|
-
height:
|
|
24306
|
+
height: Wo([W(), U()]).nullish()
|
|
24307
24307
|
});
|
|
24308
24308
|
cssStyles = [
|
|
24309
24309
|
MI,
|
|
@@ -24382,7 +24382,7 @@ var DI = class {
|
|
|
24382
24382
|
tagName = "marimo-json-output";
|
|
24383
24383
|
validator = K({
|
|
24384
24384
|
name: W().nullish(),
|
|
24385
|
-
jsonData:
|
|
24385
|
+
jsonData: as(),
|
|
24386
24386
|
valueTypes: V(["json", "python"]).default("python")
|
|
24387
24387
|
});
|
|
24388
24388
|
render({ data: e }) {
|
|
@@ -24421,7 +24421,7 @@ var DI = class {
|
|
|
24421
24421
|
let { data: m, error: h, isPending: g } = $s(f, p);
|
|
24422
24422
|
if (h) {
|
|
24423
24423
|
let e;
|
|
24424
|
-
return t[11] === h ? e = t[12] : (e = /* @__PURE__ */ (0, Y.jsx)(
|
|
24424
|
+
return t[11] === h ? e = t[12] : (e = /* @__PURE__ */ (0, Y.jsx)(bs, { error: h }), t[11] = h, t[12] = e), e;
|
|
24425
24425
|
}
|
|
24426
24426
|
let _;
|
|
24427
24427
|
t[13] !== m || t[14] !== g || t[15] !== r ? (_ = g && r ? /* @__PURE__ */ (0, Y.jsx)(A, { className: "w-12 h-12 animate-spin text-primary my-4 mx-4" }) : m && F({ html: m.html }), t[13] = m, t[14] = g, t[15] = r, t[16] = _) : _ = t[16];
|
|
@@ -24435,11 +24435,11 @@ var DI = class {
|
|
|
24435
24435
|
tagName = "marimo-mime-renderer";
|
|
24436
24436
|
validator = K({
|
|
24437
24437
|
mime: W().transform((e) => e),
|
|
24438
|
-
data:
|
|
24438
|
+
data: Wo([
|
|
24439
24439
|
W(),
|
|
24440
|
-
|
|
24441
|
-
|
|
24442
|
-
H(
|
|
24440
|
+
Po(),
|
|
24441
|
+
Bo(W(), as()),
|
|
24442
|
+
H(fo())
|
|
24443
24443
|
]).transform((e) => e)
|
|
24444
24444
|
});
|
|
24445
24445
|
render({ data: e }) {
|
|
@@ -24454,7 +24454,7 @@ var DI = class {
|
|
|
24454
24454
|
validator = K({
|
|
24455
24455
|
diagram: W(),
|
|
24456
24456
|
theme: W().optional(),
|
|
24457
|
-
theme_variables:
|
|
24457
|
+
theme_variables: Bo(W(), W()).optional()
|
|
24458
24458
|
});
|
|
24459
24459
|
render(e) {
|
|
24460
24460
|
return /* @__PURE__ */ (0, Y.jsx)(KI, {
|
|
@@ -24467,7 +24467,7 @@ var DI = class {
|
|
|
24467
24467
|
//#endregion
|
|
24468
24468
|
//#region src/components/editor/chrome/panels/outline/useActiveOutline.tsx
|
|
24469
24469
|
function qI() {
|
|
24470
|
-
return
|
|
24470
|
+
return zs() === "edit" ? document.getElementById("App") : void 0;
|
|
24471
24471
|
}
|
|
24472
24472
|
function JI(e) {
|
|
24473
24473
|
let t = (0, X.c)(7), [n, r] = (0, J.useState)(void 0), [i, a] = (0, J.useState)(void 0), o = (0, J.useRef)(null), s = (0, J.useRef)(null), c;
|
|
@@ -24479,7 +24479,7 @@ function JI(e) {
|
|
|
24479
24479
|
let n = e.target;
|
|
24480
24480
|
e.isIntersecting ? (!s.current || n.getBoundingClientRect().top < s.current.getBoundingClientRect().top) && (s.current = n, t = !0) : n === s.current && (s.current = null, t = !0);
|
|
24481
24481
|
}), t && s.current) {
|
|
24482
|
-
let e =
|
|
24482
|
+
let e = Vi(s.current), t = "id" in e ? e.id : e.path;
|
|
24483
24483
|
r(t), a(l.current.get(s.current));
|
|
24484
24484
|
}
|
|
24485
24485
|
}, {
|
|
@@ -24488,7 +24488,7 @@ function JI(e) {
|
|
|
24488
24488
|
threshold: 0
|
|
24489
24489
|
}), e.forEach((t) => {
|
|
24490
24490
|
if (t) {
|
|
24491
|
-
let n =
|
|
24491
|
+
let n = Vi(t[0]), r = e.map(YI).filter((e) => "id" in n ? e.id === n.id : e.textContent === t[0].textContent).indexOf(t[0]);
|
|
24492
24492
|
l.current.set(t[0], r), o.current?.observe(t[0]);
|
|
24493
24493
|
}
|
|
24494
24494
|
}), () => {
|
|
@@ -24529,7 +24529,7 @@ function QI(e, t) {
|
|
|
24529
24529
|
//#endregion
|
|
24530
24530
|
//#region src/components/editor/chrome/panels/outline/floating-outline.tsx
|
|
24531
24531
|
var $I = () => {
|
|
24532
|
-
let e = (0, X.c)(22), { items: t } =
|
|
24532
|
+
let e = (0, X.c)(22), { items: t } = uo(da), n;
|
|
24533
24533
|
e[0] === t ? n = e[1] : (n = XI(t), e[0] = t, e[1] = n);
|
|
24534
24534
|
let { activeHeaderId: r, activeOccurrences: i } = JI(n), [a, o] = J.useState(!1), [s, c] = J.useState(!1), u = a || s;
|
|
24535
24535
|
if (t.length < 2) return null;
|
|
@@ -24613,7 +24613,7 @@ var $I = () => {
|
|
|
24613
24613
|
children: u
|
|
24614
24614
|
}), t[10] = s, t[11] = c, t[12] = u, t[13] = d) : d = t[13], d;
|
|
24615
24615
|
}, nL = (e) => {
|
|
24616
|
-
let t = (0, X.c)(12), { label: n } = e, { items: r } =
|
|
24616
|
+
let t = (0, X.c)(12), { label: n } = e, { items: r } = uo(da), i;
|
|
24617
24617
|
t[0] === r ? i = t[1] : (i = XI(r), t[0] = r, t[1] = i);
|
|
24618
24618
|
let { activeHeaderId: a, activeOccurrences: o } = JI(i);
|
|
24619
24619
|
if (r.length === 0) {
|
|
@@ -24645,8 +24645,8 @@ var $I = () => {
|
|
|
24645
24645
|
validator = K({ label: W().optional() });
|
|
24646
24646
|
render(e) {
|
|
24647
24647
|
let { label: t } = e.data;
|
|
24648
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
24649
|
-
store:
|
|
24648
|
+
return /* @__PURE__ */ (0, Y.jsx)(bo, {
|
|
24649
|
+
store: _s,
|
|
24650
24650
|
children: /* @__PURE__ */ (0, Y.jsx)(nL, { label: t })
|
|
24651
24651
|
});
|
|
24652
24652
|
}
|
|
@@ -25412,7 +25412,7 @@ var $I = () => {
|
|
|
25412
25412
|
validator = K({
|
|
25413
25413
|
title: W().optional(),
|
|
25414
25414
|
subtitle: W().optional(),
|
|
25415
|
-
progress:
|
|
25415
|
+
progress: Wo([U(), G()]),
|
|
25416
25416
|
total: U().optional(),
|
|
25417
25417
|
eta: U().optional(),
|
|
25418
25418
|
rate: U().optional()
|
|
@@ -25688,7 +25688,7 @@ var uL = (/* @__PURE__ */ i(((e) => {
|
|
|
25688
25688
|
let t = o.match(e);
|
|
25689
25689
|
l(t ? t[1] : null);
|
|
25690
25690
|
}, t[4] = o, t[5] = u);
|
|
25691
|
-
let d =
|
|
25691
|
+
let d = Os(u), f, p;
|
|
25692
25692
|
if (t[6] === d ? (f = t[7], p = t[8]) : (f = () => {
|
|
25693
25693
|
let e = () => {
|
|
25694
25694
|
d(window.location);
|
|
@@ -25702,7 +25702,7 @@ var uL = (/* @__PURE__ */ i(((e) => {
|
|
|
25702
25702
|
}, mL = class {
|
|
25703
25703
|
tagName = "marimo-stat";
|
|
25704
25704
|
validator = K({
|
|
25705
|
-
value:
|
|
25705
|
+
value: Wo([
|
|
25706
25706
|
W(),
|
|
25707
25707
|
U(),
|
|
25708
25708
|
G()
|
|
@@ -25712,7 +25712,7 @@ var uL = (/* @__PURE__ */ i(((e) => {
|
|
|
25712
25712
|
bordered: G().default(!1),
|
|
25713
25713
|
direction: V(["increase", "decrease"]).optional(),
|
|
25714
25714
|
target_direction: V(["increase", "decrease"]).default("increase"),
|
|
25715
|
-
slot:
|
|
25715
|
+
slot: fo().optional()
|
|
25716
25716
|
});
|
|
25717
25717
|
render({ data: e }) {
|
|
25718
25718
|
return /* @__PURE__ */ (0, Y.jsx)(hL, { ...e });
|
|
@@ -26681,7 +26681,7 @@ var TL = /* @__PURE__ */ i(((e, t, n) => {
|
|
|
26681
26681
|
function t() {}
|
|
26682
26682
|
})), FL = /* @__PURE__ */ i(((e) => {
|
|
26683
26683
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
26684
|
-
var t = l(y()), n = c(
|
|
26684
|
+
var t = l(y()), n = c(Ra()), r = c(Qa()), i = ML(), a = NL(), o = AL(), s = c(PL());
|
|
26685
26685
|
function c(e) {
|
|
26686
26686
|
return e && e.__esModule ? e : { default: e };
|
|
26687
26687
|
}
|
|
@@ -26845,7 +26845,7 @@ var TL = /* @__PURE__ */ i(((e, t, n) => {
|
|
|
26845
26845
|
return c.default;
|
|
26846
26846
|
}
|
|
26847
26847
|
}), e.default = void 0;
|
|
26848
|
-
var t = d(y()), n = u(
|
|
26848
|
+
var t = d(y()), n = u(Ra()), r = u(Qa()), i = EL(), a = ML(), o = NL(), s = AL(), c = u(FL()), l = u(PL());
|
|
26849
26849
|
function u(e) {
|
|
26850
26850
|
return e && e.__esModule ? e : { default: e };
|
|
26851
26851
|
}
|
|
@@ -27096,7 +27096,7 @@ var TL = /* @__PURE__ */ i(((e, t, n) => {
|
|
|
27096
27096
|
}
|
|
27097
27097
|
})), zL = /* @__PURE__ */ i(((e) => {
|
|
27098
27098
|
e.__esModule = !0, e.resizableProps = void 0;
|
|
27099
|
-
var t = n(
|
|
27099
|
+
var t = n(Ra());
|
|
27100
27100
|
LL();
|
|
27101
27101
|
function n(e) {
|
|
27102
27102
|
return e && e.__esModule ? e : { default: e };
|
|
@@ -27359,7 +27359,7 @@ var TL = /* @__PURE__ */ i(((e, t, n) => {
|
|
|
27359
27359
|
};
|
|
27360
27360
|
})), VL = /* @__PURE__ */ i(((e) => {
|
|
27361
27361
|
e.__esModule = !0, e.default = void 0;
|
|
27362
|
-
var t = c(y()), n = o(
|
|
27362
|
+
var t = c(y()), n = o(Ra()), r = o(BL()), i = zL(), a = [
|
|
27363
27363
|
"handle",
|
|
27364
27364
|
"handleSize",
|
|
27365
27365
|
"onResize",
|
|
@@ -27522,7 +27522,7 @@ var TL = /* @__PURE__ */ i(((e, t, n) => {
|
|
|
27522
27522
|
}, t.exports.Resizable = BL().default, t.exports.ResizableBox = VL().default;
|
|
27523
27523
|
})), UL = /* @__PURE__ */ i(((e) => {
|
|
27524
27524
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.resizeHandleType = e.resizeHandleAxesType = e.default = void 0;
|
|
27525
|
-
var t = r(
|
|
27525
|
+
var t = r(Ra()), n = r(y());
|
|
27526
27526
|
function r(e) {
|
|
27527
27527
|
return e && e.__esModule ? e : { default: e };
|
|
27528
27528
|
}
|
|
@@ -27592,7 +27592,7 @@ var TL = /* @__PURE__ */ i(((e, t, n) => {
|
|
|
27592
27592
|
};
|
|
27593
27593
|
})), WL = /* @__PURE__ */ i(((e) => {
|
|
27594
27594
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
27595
|
-
var t = u(y()), n =
|
|
27595
|
+
var t = u(y()), n = Qa(), r = u(Ra()), i = LL(), a = HL(), o = OL(), s = kL(), c = UL(), l = u(EL());
|
|
27596
27596
|
function u(e) {
|
|
27597
27597
|
return e && e.__esModule ? e : { default: e };
|
|
27598
27598
|
}
|
|
@@ -28296,7 +28296,7 @@ var TL = /* @__PURE__ */ i(((e, t, n) => {
|
|
|
28296
28296
|
}
|
|
28297
28297
|
})), qL = /* @__PURE__ */ i(((e) => {
|
|
28298
28298
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = void 0;
|
|
28299
|
-
var t = l(y()), n = c(
|
|
28299
|
+
var t = l(y()), n = c(Ra()), r = TL(), i = OL(), a = KL(), o = c(GL()), s = [
|
|
28300
28300
|
"breakpoint",
|
|
28301
28301
|
"breakpoints",
|
|
28302
28302
|
"cols",
|
|
@@ -28772,7 +28772,7 @@ var aR, oR, sR, cR, lR, uR, dR, fR, pR, mR, hR, gR, _R, vR, yR, bR, xR, SR, CR,
|
|
|
28772
28772
|
})();
|
|
28773
28773
|
})), TR = /* @__PURE__ */ i(((e) => {
|
|
28774
28774
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.default = g;
|
|
28775
|
-
var n = c(y()), r = s(
|
|
28775
|
+
var n = c(y()), r = s(Ra()), i = s((wR(), t(JL))), a = s(EL()), o = ["measureBeforeMount"];
|
|
28776
28776
|
function s(e) {
|
|
28777
28777
|
return e && e.__esModule ? e : { default: e };
|
|
28778
28778
|
}
|
|
@@ -28884,7 +28884,7 @@ var aR, oR, sR, cR, lR, uR, dR, fR, pR, mR, hR, gR, _R, vR, yR, bR, xR, SR, CR,
|
|
|
28884
28884
|
defaultKeymap: !1,
|
|
28885
28885
|
historyKeymap: !1
|
|
28886
28886
|
})], OR = (0, J.memo)((e) => {
|
|
28887
|
-
let t = (0, X.c)(8), { code: n, className: r } = e, { theme: i } =
|
|
28887
|
+
let t = (0, X.c)(8), { code: n, className: r } = e, { theme: i } = ms(), a;
|
|
28888
28888
|
t[0] === r ? a = t[1] : (a = l(r, "text-muted-foreground flex flex-col overflow-hidden"), t[0] = r, t[1] = a);
|
|
28889
28889
|
let o = i === "dark" ? "dark" : "light", s;
|
|
28890
28890
|
t[2] !== n || t[3] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(Zs, {
|
|
@@ -29155,9 +29155,9 @@ var jR = (0, ER.WidthProvider)(ER.Responsive), MR = [0, 0], NR = "grid-drag-hand
|
|
|
29155
29155
|
return t[158] !== me || t[159] !== _e ? (ve = /* @__PURE__ */ (0, Y.jsxs)(Y.Fragment, { children: [me, _e] }), t[158] = me, t[159] = _e, t[160] = ve) : ve = t[160], ve;
|
|
29156
29156
|
}, FR = (0, J.memo)((e) => {
|
|
29157
29157
|
let t = (0, X.c)(24), { output: n, cellId: r, mode: i, code: a, hideWithoutValue: o, isScrollable: s, side: c, className: u } = e, d = _n(r), f = Zn(r), p;
|
|
29158
|
-
t[0] === d.status ? p = t[1] : (p =
|
|
29158
|
+
t[0] === d.status ? p = t[1] : (p = Yi(d.status), t[0] = d.status, t[1] = p);
|
|
29159
29159
|
let m = p, h;
|
|
29160
|
-
t[2] !== d || t[3] !== f ? (h =
|
|
29160
|
+
t[2] !== d || t[3] !== f ? (h = Xi(d, f, !1), t[2] = d, t[3] = f, t[4] = h) : h = t[4];
|
|
29161
29161
|
let g = h, _ = o && d.outcome !== null && d.outcome !== "value";
|
|
29162
29162
|
if ((n == null || n.data === "") && i !== "read") {
|
|
29163
29163
|
let e;
|
|
@@ -29347,7 +29347,7 @@ var RR = (e) => {
|
|
|
29347
29347
|
children: d ? /* @__PURE__ */ (0, Y.jsx)(d, { className: "h-4 w-4 opacity-60 hover:opacity-100" }) : /* @__PURE__ */ (0, Y.jsx)(Uu, { className: "h-4 w-4 opacity-60 hover:opacity-100" })
|
|
29348
29348
|
}), t[6] = d, t[7] = v);
|
|
29349
29349
|
let y;
|
|
29350
|
-
t[8] !== a || t[9] !== i ? (y =
|
|
29350
|
+
t[8] !== a || t[9] !== i ? (y = Es.entries(BR).map((e) => {
|
|
29351
29351
|
let [t, n] = e;
|
|
29352
29352
|
return /* @__PURE__ */ (0, Y.jsxs)(gi, {
|
|
29353
29353
|
onSelect: () => a(t),
|
|
@@ -29355,7 +29355,7 @@ var RR = (e) => {
|
|
|
29355
29355
|
/* @__PURE__ */ (0, Y.jsx)(n, { className: "h-4 w-3 mr-2" }),
|
|
29356
29356
|
/* @__PURE__ */ (0, Y.jsx)("span", {
|
|
29357
29357
|
className: "flex-1",
|
|
29358
|
-
children:
|
|
29358
|
+
children: Ya.startCase(t)
|
|
29359
29359
|
}),
|
|
29360
29360
|
t === i && /* @__PURE__ */ (0, Y.jsx)(Mr, { className: "h-4 w-4" })
|
|
29361
29361
|
]
|
|
@@ -29410,7 +29410,7 @@ var RR = (e) => {
|
|
|
29410
29410
|
let A;
|
|
29411
29411
|
t[35] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ (0, Y.jsx)(qn, { className: l(NR, "cursor-move", "h-4 w-4 opacity-60 hover:opacity-100") }), t[35] = A) : A = t[35];
|
|
29412
29412
|
let j;
|
|
29413
|
-
t[36] === r ? j = t[37] : (j = /* @__PURE__ */ (0, Y.jsx)(
|
|
29413
|
+
t[36] === r ? j = t[37] : (j = /* @__PURE__ */ (0, Y.jsx)(Xa, {
|
|
29414
29414
|
className: "h-4 w-4 opacity-60 hover:opacity-100",
|
|
29415
29415
|
onClick: () => r()
|
|
29416
29416
|
}), t[36] = r, t[37] = j);
|
|
@@ -29449,13 +29449,13 @@ function WR(e) {
|
|
|
29449
29449
|
var GR = {
|
|
29450
29450
|
type: "grid",
|
|
29451
29451
|
name: "Grid",
|
|
29452
|
-
validator:
|
|
29452
|
+
validator: eo({
|
|
29453
29453
|
columns: U().min(1),
|
|
29454
29454
|
rowHeight: U().min(1),
|
|
29455
29455
|
maxWidth: U().nullish().transform((e) => e ?? void 0).catch(void 0),
|
|
29456
29456
|
bordered: G().optional().catch(void 0),
|
|
29457
|
-
cells: H(
|
|
29458
|
-
position:
|
|
29457
|
+
cells: H(eo({
|
|
29458
|
+
position: ps([
|
|
29459
29459
|
U(),
|
|
29460
29460
|
U(),
|
|
29461
29461
|
U(),
|
|
@@ -29583,7 +29583,7 @@ var JR = (e) => {
|
|
|
29583
29583
|
function YR() {
|
|
29584
29584
|
let e = (0, X.c)(3), { deleteCells: t, undoDeleteCell: n } = Ae(), r;
|
|
29585
29585
|
return e[0] !== t || e[1] !== n ? (r = (e) => {
|
|
29586
|
-
let { cellId: r } = e, i = (
|
|
29586
|
+
let { cellId: r } = e, i = (_s.get(fa).cellData[r]?.code ?? "").trim() === "";
|
|
29587
29587
|
if (t({ cellIds: [r] }) && !i) {
|
|
29588
29588
|
let { dismiss: e } = x({
|
|
29589
29589
|
title: "Cell deleted",
|
|
@@ -29596,7 +29596,7 @@ function YR() {
|
|
|
29596
29596
|
})
|
|
29597
29597
|
}), t = e;
|
|
29598
29598
|
}
|
|
29599
|
-
}, e[0] = t, e[1] = n, e[2] = r) : r = e[2],
|
|
29599
|
+
}, e[0] = t, e[1] = n, e[2] = r) : r = e[2], Os(r);
|
|
29600
29600
|
}
|
|
29601
29601
|
//#endregion
|
|
29602
29602
|
//#region ../node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@19.3.0/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
|
|
@@ -32100,7 +32100,7 @@ function LH() {
|
|
|
32100
32100
|
return /* @__PURE__ */ new Set();
|
|
32101
32101
|
}
|
|
32102
32102
|
var RH = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skippedIds: i, noOutputIds: a, slideTypes: o, onSlideClick: s }) => {
|
|
32103
|
-
let l =
|
|
32103
|
+
let l = Ca(), { moveCellToIndex: u, createCell: d } = Ae(), f = YR(), p = (0, J.useRef)(null), m = IH(p), [h, g] = (0, J.useState)(null), [_, v] = (0, J.useState)(null), y = jH(t), b = (e, t) => {
|
|
32104
32104
|
d({
|
|
32105
32105
|
...t ? { before: e } : { after: e },
|
|
32106
32106
|
focus: !1
|
|
@@ -32370,7 +32370,7 @@ var RH = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skipped
|
|
|
32370
32370
|
cellId: n.id,
|
|
32371
32371
|
status: C.status,
|
|
32372
32372
|
output: n.output,
|
|
32373
|
-
stale:
|
|
32373
|
+
stale: Xi(C, w, !1)
|
|
32374
32374
|
})
|
|
32375
32375
|
}), t[30] = n.code, t[31] = n.id, t[32] = n.output, t[33] = C, t[34] = w, t[35] = x, t[36] = y, t[37] = S, t[38] = j, t[39] = b, t[40] = I) : I = t[40];
|
|
32376
32376
|
let L;
|
|
@@ -32443,8 +32443,8 @@ function YH(e) {
|
|
|
32443
32443
|
}
|
|
32444
32444
|
//#endregion
|
|
32445
32445
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32446
|
-
var XH = J.lazy(() => import("./reveal-component-
|
|
32447
|
-
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o =
|
|
32446
|
+
var XH = J.lazy(() => import("./reveal-component-DXFsIk5S.js")), ZH = (e) => {
|
|
32447
|
+
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = uo(Rs), s = a === "read" || o, c = uo(sa) > 1, [l, u] = (0, J.useState)(null), d;
|
|
32448
32448
|
t[0] !== i || t[1] !== n ? (d = qR(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
32449
32449
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
32450
32450
|
t[3] !== l || t[4] !== f || t[5] !== g ? (_ = l ? f.findIndex((e) => e.id === l) : g, t[3] = l, t[4] = f, t[5] = g, t[6] = _) : _ = t[6];
|
|
@@ -32453,7 +32453,7 @@ var XH = J.lazy(() => import("./reveal-component-MUD9gGln.js")), ZH = (e) => {
|
|
|
32453
32453
|
let t = f[e];
|
|
32454
32454
|
t && u(t.id);
|
|
32455
32455
|
}, t[7] = f, t[8] = C);
|
|
32456
|
-
let w =
|
|
32456
|
+
let w = Os(C), T = b ? void 0 : w, E = s ? "read" : a, D = !s, O;
|
|
32457
32457
|
t[9] !== S || t[10] !== n || t[11] !== m || t[12] !== r || t[13] !== f || t[14] !== T || t[15] !== E || t[16] !== D ? (O = /* @__PURE__ */ (0, Y.jsx)(XH, {
|
|
32458
32458
|
slideCells: f,
|
|
32459
32459
|
layout: n,
|
|
@@ -32504,7 +32504,7 @@ var XH = J.lazy(() => import("./reveal-component-MUD9gGln.js")), ZH = (e) => {
|
|
|
32504
32504
|
"sub-slide",
|
|
32505
32505
|
"fragment",
|
|
32506
32506
|
"skip"
|
|
32507
|
-
]), $H =
|
|
32507
|
+
]), $H = eo({
|
|
32508
32508
|
type: QH.optional().catch(void 0),
|
|
32509
32509
|
speakerNotes: W().optional().catch(void 0),
|
|
32510
32510
|
showCode: G().optional().catch(void 0)
|
|
@@ -32519,13 +32519,13 @@ var XH = J.lazy(() => import("./reveal-component-MUD9gGln.js")), ZH = (e) => {
|
|
|
32519
32519
|
"top",
|
|
32520
32520
|
"center",
|
|
32521
32521
|
"bottom"
|
|
32522
|
-
]), nU =
|
|
32522
|
+
]), nU = eo({
|
|
32523
32523
|
transition: eU.optional().catch(void 0),
|
|
32524
32524
|
verticalAlign: tU.optional().catch(void 0)
|
|
32525
32525
|
}).catch({}), rU = {
|
|
32526
32526
|
type: "slides",
|
|
32527
32527
|
name: "Slides",
|
|
32528
|
-
validator:
|
|
32528
|
+
validator: eo({
|
|
32529
32529
|
cells: H($H).optional().catch(void 0),
|
|
32530
32530
|
deck: nU.optional().catch(void 0)
|
|
32531
32531
|
}),
|
|
@@ -32602,7 +32602,7 @@ var aU = (0, J.memo)((e) => {
|
|
|
32602
32602
|
readOnly: !0,
|
|
32603
32603
|
editable: !1,
|
|
32604
32604
|
basicSetup: { lineNumbers: !1 },
|
|
32605
|
-
extensions: [mc.sh(),
|
|
32605
|
+
extensions: [mc.sh(), As.updateListener.of((e) => {
|
|
32606
32606
|
e.docChanged && t.current.view?.dispatch({
|
|
32607
32607
|
selection: {
|
|
32608
32608
|
anchor: e.state.doc.length,
|
|
@@ -32680,7 +32680,7 @@ var oU = (e) => {
|
|
|
32680
32680
|
let v;
|
|
32681
32681
|
t[17] === n ? v = t[18] : (v = () => n("help"), t[17] = n, t[18] = v);
|
|
32682
32682
|
let y;
|
|
32683
|
-
t[19] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ (0, Y.jsx)(
|
|
32683
|
+
t[19] === Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ (0, Y.jsx)(Ni, {
|
|
32684
32684
|
fontSize: 36,
|
|
32685
32685
|
className: "w-5 h-5"
|
|
32686
32686
|
}), t[19] = y) : y = t[19];
|
|
@@ -32709,7 +32709,7 @@ var oU = (e) => {
|
|
|
32709
32709
|
onClick: () => {
|
|
32710
32710
|
n("q"), r();
|
|
32711
32711
|
},
|
|
32712
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
32712
|
+
children: /* @__PURE__ */ (0, Y.jsx)(Ba, {
|
|
32713
32713
|
fontSize: 36,
|
|
32714
32714
|
className: "w-5 h-5"
|
|
32715
32715
|
})
|
|
@@ -32747,7 +32747,7 @@ var cU = (e) => {
|
|
|
32747
32747
|
let t = (0, X.c)(12), { value: n, cellId: r, className: i } = e, a = pe(), o;
|
|
32748
32748
|
t[0] !== r || t[1] !== a ? (o = (e) => a((t) => t.setName(r, e)), t[0] = r, t[1] = a, t[2] = o) : o = t[2];
|
|
32749
32749
|
let s = lU(n, o);
|
|
32750
|
-
if (
|
|
32750
|
+
if (la(n)) return null;
|
|
32751
32751
|
let c = s.focusing ? "" : "text-ellipsis", u;
|
|
32752
32752
|
t[3] !== i || t[4] !== c ? (u = l("outline-hidden border hover:border-cyan-500/40 focus:border-cyan-500/40", c, i), t[3] = i, t[4] = c, t[5] = u) : u = t[5];
|
|
32753
32753
|
let d;
|
|
@@ -32768,10 +32768,10 @@ var cU = (e) => {
|
|
|
32768
32768
|
function lU(e, t) {
|
|
32769
32769
|
let n = (0, X.c)(13), [r, i] = (0, J.useState)(e), [a, o] = (0, J.useState)(!1), s;
|
|
32770
32770
|
n[0] !== t || n[1] !== e ? (s = (n) => {
|
|
32771
|
-
n !== e && (!n ||
|
|
32771
|
+
n !== e && (!n || la(n) ? t(n) : t(xa(n, ua())));
|
|
32772
32772
|
}, n[0] = t, n[1] = e, n[2] = s) : s = n[2];
|
|
32773
32773
|
let c = s, l;
|
|
32774
|
-
n[3] === r ? l = n[4] : (l =
|
|
32774
|
+
n[3] === r ? l = n[4] : (l = la(r) ? "" : r, n[3] = r, n[4] = l);
|
|
32775
32775
|
let u;
|
|
32776
32776
|
n[5] === Symbol.for("react.memo_cache_sentinel") ? (u = (e) => {
|
|
32777
32777
|
let t = e.target.value, n = ha(t);
|
|
@@ -32805,9 +32805,9 @@ function uU(e) {
|
|
|
32805
32805
|
}
|
|
32806
32806
|
//#endregion
|
|
32807
32807
|
//#region src/components/editor/output/useWrapText.ts
|
|
32808
|
-
var dU =
|
|
32808
|
+
var dU = So("marimo:console:wrapText", !1, xe);
|
|
32809
32809
|
function fU() {
|
|
32810
|
-
let e = (0, X.c)(3), [t, n] =
|
|
32810
|
+
let e = (0, X.c)(3), [t, n] = wo(dU), r;
|
|
32811
32811
|
return e[0] !== n || e[1] !== t ? (r = {
|
|
32812
32812
|
wrapText: t,
|
|
32813
32813
|
setWrapText: n
|
|
@@ -32842,7 +32842,7 @@ var mU = (e) => {
|
|
|
32842
32842
|
if (!e) return;
|
|
32843
32843
|
let t = e.scrollHeight - e.clientHeight;
|
|
32844
32844
|
t - e.scrollTop < 120 && (e.scrollTop = t);
|
|
32845
|
-
}, t[2] = D) : D = t[2], (0, J.useLayoutEffect)(D), !C &&
|
|
32845
|
+
}, t[2] = D) : D = t[2], (0, J.useLayoutEffect)(D), !C && la(h)) return null;
|
|
32846
32846
|
let O, k, A, j, M, N, P, F, I, L;
|
|
32847
32847
|
if (t[3] !== g || t[4] !== x || t[5] !== S || t[6] !== C || t[7] !== d || t[8] !== m || t[9] !== a || t[10] !== E || t[11] !== y || t[12] !== b || t[13] !== v || t[14] !== T || t[15] !== o || t[16] !== i || t[17] !== p || t[18] !== s || t[19] !== r) {
|
|
32848
32848
|
let e = S.toReversed(), u = e.some(yU), f = e.findIndex(bU), h;
|
|
@@ -32887,7 +32887,7 @@ var mU = (e) => {
|
|
|
32887
32887
|
if (e.channel === "pdb") return null;
|
|
32888
32888
|
let n = S.length - t - 1, i = e.id ?? `position-${n}`;
|
|
32889
32889
|
if (e.channel === "stdin") {
|
|
32890
|
-
|
|
32890
|
+
Ds(typeof e.data == "string", "Expected data to be a string");
|
|
32891
32891
|
let r = e.mimetype === "text/password";
|
|
32892
32892
|
return e.response == null && f === t ? /* @__PURE__ */ (0, Y.jsx)(gU, {
|
|
32893
32893
|
output: e.data,
|
|
@@ -33010,7 +33010,7 @@ function xU(e) {
|
|
|
33010
33010
|
return e.channel !== "pdb";
|
|
33011
33011
|
}
|
|
33012
33012
|
function SU(e) {
|
|
33013
|
-
return
|
|
33013
|
+
return Fa(e);
|
|
33014
33014
|
}
|
|
33015
33015
|
//#endregion
|
|
33016
33016
|
//#region src/core/cells/readonly-code-display.ts
|
|
@@ -33034,7 +33034,7 @@ function TU(e) {
|
|
|
33034
33034
|
//#endregion
|
|
33035
33035
|
//#region src/core/export/layout.ts
|
|
33036
33036
|
async function EU() {
|
|
33037
|
-
return await
|
|
33037
|
+
return await pa(), nW();
|
|
33038
33038
|
}
|
|
33039
33039
|
//#endregion
|
|
33040
33040
|
//#region src/core/static/virtual-file-tracker.ts
|
|
@@ -33075,7 +33075,7 @@ function kU(e) {
|
|
|
33075
33075
|
//#endregion
|
|
33076
33076
|
//#region src/core/static/download-html.ts
|
|
33077
33077
|
async function AU(e) {
|
|
33078
|
-
let t =
|
|
33078
|
+
let t = na(), { includeCode: n } = e, r = await t.exportAsHTML({
|
|
33079
33079
|
download: !0,
|
|
33080
33080
|
includeCode: n,
|
|
33081
33081
|
files: OU.INSTANCE.filenames(),
|
|
@@ -33105,12 +33105,12 @@ function MU(e, t) {
|
|
|
33105
33105
|
//#region src/components/editor/renderers/vertical-layout/utils.ts
|
|
33106
33106
|
function NU({ showCodeInRunModePreference: e, kioskMode: t }) {
|
|
33107
33107
|
if (!e) return !1;
|
|
33108
|
-
let n = new URLSearchParams(window.location.search).get(
|
|
33109
|
-
return n === null ?
|
|
33108
|
+
let n = new URLSearchParams(window.location.search).get(os.showCode);
|
|
33109
|
+
return n === null ? Ls() || Is() || t : n === "true";
|
|
33110
33110
|
}
|
|
33111
33111
|
function PU(e) {
|
|
33112
|
-
|
|
33113
|
-
t.set(
|
|
33112
|
+
Ls() && Pi((t) => {
|
|
33113
|
+
t.set(os.showCode, String(e));
|
|
33114
33114
|
});
|
|
33115
33115
|
}
|
|
33116
33116
|
function FU(e) {
|
|
@@ -33142,7 +33142,7 @@ var LU = (e) => {
|
|
|
33142
33142
|
children: h
|
|
33143
33143
|
}), t[12] = s, t[13] = h, t[14] = g) : g = t[14], g;
|
|
33144
33144
|
}, RU = (e) => {
|
|
33145
|
-
let t = (0, X.c)(33), { cells: n, appConfig: r, mode: i } = e, { invisible: a } = MU(n.length, i), o =
|
|
33145
|
+
let t = (0, X.c)(33), { cells: n, appConfig: r, mode: i } = e, { invisible: a } = MU(n.length, i), o = uo(Rs), s = uo(ea), [c] = io(), u = uo(cc), d;
|
|
33146
33146
|
t[0] !== o || t[1] !== u ? (d = () => NU({
|
|
33147
33147
|
showCodeInRunModePreference: u,
|
|
33148
33148
|
kioskMode: o
|
|
@@ -33180,7 +33180,7 @@ var LU = (e) => {
|
|
|
33180
33180
|
})
|
|
33181
33181
|
});
|
|
33182
33182
|
}
|
|
33183
|
-
return n.length === 0 && !a ? s !== "running" && !
|
|
33183
|
+
return n.length === 0 && !a ? s !== "running" && !Ls() ? /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
33184
33184
|
className: "flex-1 flex flex-col items-center justify-center py-8",
|
|
33185
33185
|
children: /* @__PURE__ */ (0, Y.jsx)(A, { className: "w-8 h-8 animate-spin text-muted-foreground" })
|
|
33186
33186
|
}) : /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
@@ -33219,13 +33219,13 @@ var LU = (e) => {
|
|
|
33219
33219
|
]
|
|
33220
33220
|
}), t[28] = r, t[29] = a, t[30] = w, t[31] = T, t[32] = D) : D = t[32], D;
|
|
33221
33221
|
}, zU = (e) => {
|
|
33222
|
-
let t = (0, X.c)(26), { canShowCode: n, showCode: r, onToggleShowCode: i } = e, { readCode: a } =
|
|
33222
|
+
let t = (0, X.c)(26), { canShowCode: n, showCode: r, onToggleShowCode: i } = e, { readCode: a } = Gi(), o = UU, s = WU, c;
|
|
33223
33223
|
t[0] === a ? c = t[1] : (c = async () => {
|
|
33224
33224
|
let e = await a();
|
|
33225
33225
|
hr(new Blob([e.contents], { type: "text/plain" }), vr.toPY(document.title));
|
|
33226
33226
|
}, t[0] = a, t[1] = c);
|
|
33227
33227
|
let u = c, d;
|
|
33228
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d =
|
|
33228
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (d = Ls(), t[2] = d) : d = t[2];
|
|
33229
33229
|
let f = d, p;
|
|
33230
33230
|
if (t[3] !== n || t[4] !== u || t[5] !== i || t[6] !== r) {
|
|
33231
33231
|
if (p = [], n) {
|
|
@@ -33294,7 +33294,7 @@ var LU = (e) => {
|
|
|
33294
33294
|
} else p = t[7];
|
|
33295
33295
|
if (p.length === 0) return null;
|
|
33296
33296
|
let m;
|
|
33297
|
-
t[22] === Symbol.for("react.memo_cache_sentinel") ? (m = l("right-0 top-0 z-50 m-4 print:hidden flex gap-2",
|
|
33297
|
+
t[22] === Symbol.for("react.memo_cache_sentinel") ? (m = l("right-0 top-0 z-50 m-4 print:hidden flex gap-2", Ls() ? "absolute" : "fixed"), t[22] = m) : m = t[22];
|
|
33298
33298
|
let h;
|
|
33299
33299
|
t[23] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsx)(pi, {
|
|
33300
33300
|
asChild: !0,
|
|
@@ -33319,13 +33319,13 @@ var LU = (e) => {
|
|
|
33319
33319
|
}), t[24] = p, t[25] = g), g;
|
|
33320
33320
|
}, BU = (0, J.memo)((e) => {
|
|
33321
33321
|
let t = (0, X.c)(54), { output: n, consoleOutputs: r, cellOutputArea: i, cellId: a, config: o, code: s, showCode: c, mode: u, name: d, kiosk: f, showErrorTracebacks: p } = e, m = (0, J.useRef)(null), h = _n(a), g = Zn(a), _ = h.outcome === "error", v = h.outcome === "interrupted", y = h.outcome === "skipped", b;
|
|
33322
|
-
t[0] !== h || t[1] !== g ? (b =
|
|
33322
|
+
t[0] !== h || t[1] !== g ? (b = Xi(h, g, !1), t[0] = h, t[1] = g, t[2] = b) : b = t[2];
|
|
33323
33323
|
let x = b, S;
|
|
33324
|
-
t[3] === h.status ? S = t[4] : (S =
|
|
33324
|
+
t[3] === h.status ? S = t[4] : (S = Yi(h.status), t[3] = h.status, t[4] = S);
|
|
33325
33325
|
let C = S, w = f && u !== "present", T;
|
|
33326
33326
|
if (t[5] !== s || t[6] !== _ || t[7] !== w || t[8] !== c || t[9] !== y) {
|
|
33327
33327
|
let e = new we().isSupported(s);
|
|
33328
|
-
T = l("marimo-cell", "hover-actions-parent empty:invisible", !c && !w ?
|
|
33328
|
+
T = l("marimo-cell", "hover-actions-parent empty:invisible", !c && !w ? ia({
|
|
33329
33329
|
errored: _,
|
|
33330
33330
|
stopped: y
|
|
33331
33331
|
}) : {
|
|
@@ -33340,7 +33340,7 @@ var LU = (e) => {
|
|
|
33340
33340
|
t[11] !== a || t[12] !== C || t[13] !== n || t[14] !== x ? (e = /* @__PURE__ */ (0, Y.jsx)(kn, {
|
|
33341
33341
|
allowExpand: !0,
|
|
33342
33342
|
output: n,
|
|
33343
|
-
className:
|
|
33343
|
+
className: Yo.outputArea,
|
|
33344
33344
|
cellId: a,
|
|
33345
33345
|
stale: x,
|
|
33346
33346
|
loading: C
|
|
@@ -33384,7 +33384,7 @@ var LU = (e) => {
|
|
|
33384
33384
|
]
|
|
33385
33385
|
}), t[34] = E, t[35] = y, t[36] = b, t[37] = h, t[38] = g, t[39] = _, t[40] = S) : S = t[40], S;
|
|
33386
33386
|
}
|
|
33387
|
-
if (
|
|
33387
|
+
if (ra({
|
|
33388
33388
|
errored: _,
|
|
33389
33389
|
interrupted: v,
|
|
33390
33390
|
stopped: y,
|
|
@@ -33397,7 +33397,7 @@ var LU = (e) => {
|
|
|
33397
33397
|
t[44] !== a || t[45] !== C || t[46] !== n || t[47] !== x || t[48] !== O ? (k = /* @__PURE__ */ (0, Y.jsx)(kn, {
|
|
33398
33398
|
allowExpand: O,
|
|
33399
33399
|
output: n,
|
|
33400
|
-
className:
|
|
33400
|
+
className: Yo.outputArea,
|
|
33401
33401
|
cellId: a,
|
|
33402
33402
|
stale: x,
|
|
33403
33403
|
loading: C
|
|
@@ -33415,7 +33415,7 @@ BU.displayName = "VerticalCell";
|
|
|
33415
33415
|
var VU = {
|
|
33416
33416
|
type: "vertical",
|
|
33417
33417
|
name: "Vertical",
|
|
33418
|
-
validator:
|
|
33418
|
+
validator: fo(),
|
|
33419
33419
|
Component: RU,
|
|
33420
33420
|
deserializeLayout: (e) => e,
|
|
33421
33421
|
serializeLayout: (e) => e,
|
|
@@ -33482,7 +33482,7 @@ function ZU(e, t) {
|
|
|
33482
33482
|
selectedLayout: t
|
|
33483
33483
|
};
|
|
33484
33484
|
}
|
|
33485
|
-
var { valueAtom: QU, useActions: $U } =
|
|
33485
|
+
var { valueAtom: QU, useActions: $U } = ks(XU, {
|
|
33486
33486
|
setLayoutView: ZU,
|
|
33487
33487
|
setLayoutData: ({ pendingLayout: e, ...t }, n) => ({
|
|
33488
33488
|
...t,
|
|
@@ -33522,11 +33522,11 @@ function tW({ state: e, plugin: t, cells: n }) {
|
|
|
33522
33522
|
}) : t.getInitialLayout(n));
|
|
33523
33523
|
}
|
|
33524
33524
|
function nW() {
|
|
33525
|
-
let e =
|
|
33525
|
+
let e = _a(), t = _s.get(QU), { selectedLayout: n } = t;
|
|
33526
33526
|
if (n === "vertical") return null;
|
|
33527
33527
|
let r = KU.find((e) => e.type === n);
|
|
33528
33528
|
if (r === void 0) return c.error(`Unknown layout type: ${n}`), null;
|
|
33529
|
-
let i =
|
|
33529
|
+
let i = Ui(e), a = tW({
|
|
33530
33530
|
state: t,
|
|
33531
33531
|
plugin: r,
|
|
33532
33532
|
cells: i
|
|
@@ -33560,14 +33560,14 @@ function aW(e, t) {
|
|
|
33560
33560
|
let f = rW(e, r, a);
|
|
33561
33561
|
if (o(u), d) return f;
|
|
33562
33562
|
if (c) {
|
|
33563
|
-
for (let [e, t] of
|
|
33563
|
+
for (let [e, t] of Es.entries(l || {})) {
|
|
33564
33564
|
let n = e;
|
|
33565
33565
|
Rb.set(n, t);
|
|
33566
33566
|
}
|
|
33567
33567
|
return f;
|
|
33568
33568
|
}
|
|
33569
33569
|
let { objectIds: p, values: m } = iW();
|
|
33570
|
-
return
|
|
33570
|
+
return na().sendInstantiate({
|
|
33571
33571
|
objectIds: p,
|
|
33572
33572
|
values: m,
|
|
33573
33573
|
autoRun: n
|
|
@@ -33617,10 +33617,10 @@ var cW = {
|
|
|
33617
33617
|
return this._sendComponentValues;
|
|
33618
33618
|
}
|
|
33619
33619
|
start(e) {
|
|
33620
|
-
this.hasStarted ? c.warn("RuntimeState already started") : (this._sendComponentValues = e, document.addEventListener(
|
|
33620
|
+
this.hasStarted ? c.warn("RuntimeState already started") : (this._sendComponentValues = e, document.addEventListener(Ma.TYPE, this.handleReadyEvent), this.hasStarted = !0);
|
|
33621
33621
|
}
|
|
33622
33622
|
stop() {
|
|
33623
|
-
this.hasStarted ? (document.removeEventListener(
|
|
33623
|
+
this.hasStarted ? (document.removeEventListener(Ma.TYPE, this.handleReadyEvent), this.hasStarted = !1) : c.warn("RuntimeState already stopped");
|
|
33624
33624
|
}
|
|
33625
33625
|
handleReadyEvent = (e) => {
|
|
33626
33626
|
let t = e.detail.objectId;
|
|
@@ -33824,7 +33824,7 @@ var kW = (e) => {
|
|
|
33824
33824
|
children: a
|
|
33825
33825
|
}), t[3] = a, t[4] = n, t[5] = o) : o = t[5], o;
|
|
33826
33826
|
}, AW = (e) => {
|
|
33827
|
-
let t = (0, X.c)(19), { cellId: n, codeCallback: r, visible: i } = e, a =
|
|
33827
|
+
let t = (0, X.c)(19), { cellId: n, codeCallback: r, visible: i } = e, a = go(), o = uo(ko), s;
|
|
33828
33828
|
t[0] === r ? s = t[1] : (s = () => {
|
|
33829
33829
|
S(r());
|
|
33830
33830
|
}, t[0] = r, t[1] = s);
|
|
@@ -33899,8 +33899,8 @@ var NW = (e) => {
|
|
|
33899
33899
|
let t = (0, X.c)(19), { cellId: n, codeCallback: r, alwaysShowRun: i, children: a } = e, o = jW(i), s = (0, J.useRef)(null), c;
|
|
33900
33900
|
t[0] === n ? c = t[1] : (c = (e) => e.cellRuntime[n], t[0] = n, t[1] = c);
|
|
33901
33901
|
let l = c, u;
|
|
33902
|
-
t[2] === l ? u = t[3] : (u =
|
|
33903
|
-
let d =
|
|
33902
|
+
t[2] === l ? u = t[3] : (u = no(fa, l), t[2] = l, t[3] = u);
|
|
33903
|
+
let d = uo(u), f = uo(oc), { status: p } = _n(n);
|
|
33904
33904
|
if (PW(s, p), !f || !d?.output) {
|
|
33905
33905
|
let e;
|
|
33906
33906
|
return t[4] === a ? e = t[5] : (e = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
@@ -33974,7 +33974,7 @@ var FW = (e) => {
|
|
|
33974
33974
|
}
|
|
33975
33975
|
get appId() {
|
|
33976
33976
|
let e = this.getAttribute(Bu.APP_ID);
|
|
33977
|
-
return
|
|
33977
|
+
return Ds(e, "Missing data-app-id attribute"), e;
|
|
33978
33978
|
}
|
|
33979
33979
|
get isReactive() {
|
|
33980
33980
|
return this.getAttribute(Bu.REACTIVE) === "true";
|
|
@@ -33990,25 +33990,25 @@ var FW = (e) => {
|
|
|
33990
33990
|
return CW(this);
|
|
33991
33991
|
}
|
|
33992
33992
|
getCellIdFromIndex(e) {
|
|
33993
|
-
let { cellIds: t } =
|
|
33993
|
+
let { cellIds: t } = _s.get(fa);
|
|
33994
33994
|
return t.at(e);
|
|
33995
33995
|
}
|
|
33996
33996
|
connectedCallback() {
|
|
33997
33997
|
let t = ++this.connectionGeneration;
|
|
33998
|
-
this.addEventListener(zu, this.handleSourceChanged), this.querySelector(e.outputTagName) && (this.renderConfig = this.extractRenderConfig()),
|
|
33998
|
+
this.addEventListener(zu, this.handleSourceChanged), this.querySelector(e.outputTagName) && (this.renderConfig = this.extractRenderConfig()), Ds(this.renderConfig, "Missing island render source"), this.runtimeAppId = this.appId, this.runtimeCellId = this.hasAttribute(Bu.CELL_IDX) ? this.cellId : void 0, this.syncCellIdsSubscription();
|
|
33999
33999
|
let n = () => {
|
|
34000
|
-
let e =
|
|
34000
|
+
let e = _s.get(rs);
|
|
34001
34001
|
this.classList.toggle("dark", e === "dark"), this.classList.toggle("light", e === "light");
|
|
34002
34002
|
};
|
|
34003
|
-
this.unsubscribeTheme =
|
|
34004
|
-
this.isConnected && t === this.connectionGeneration && (this.root =
|
|
34003
|
+
this.unsubscribeTheme = _s.sub(rs, n), n(), queueMicrotask(() => {
|
|
34004
|
+
this.isConnected && t === this.connectionGeneration && (this.root = Rg.createRoot(this), this.renderIsland());
|
|
34005
34005
|
});
|
|
34006
34006
|
}
|
|
34007
34007
|
handleSourceChanged = () => {
|
|
34008
34008
|
this.querySelector(e.outputTagName) && (this.renderConfig = this.extractRenderConfig(), this.querySelector(e.outputTagName)?.remove(), this.querySelector(e.codeTagName)?.remove()), this.runtimeCellId = this.isReactive && this.runtimeAppId === this.appId ? this.cellId : void 0, this.runtimeAppId = this.appId, this.syncCellIdsSubscription(), this.renderIsland();
|
|
34009
34009
|
};
|
|
34010
34010
|
syncCellIdsSubscription() {
|
|
34011
|
-
this.isReactive ? this.unsubscribeCellIds ??=
|
|
34011
|
+
this.isReactive ? this.unsubscribeCellIds ??= _s.sub(ba, () => {
|
|
34012
34012
|
this.runtimeCellId = this.cellId, this.renderIsland();
|
|
34013
34013
|
}) : (this.unsubscribeCellIds?.(), this.unsubscribeCellIds = void 0);
|
|
34014
34014
|
}
|
|
@@ -34018,7 +34018,7 @@ var FW = (e) => {
|
|
|
34018
34018
|
code: r,
|
|
34019
34019
|
output: t
|
|
34020
34020
|
});
|
|
34021
|
-
let i = (this.querySelector(e.editorTagName)?.parentElement)?.getAttribute(
|
|
34021
|
+
let i = (this.querySelector(e.editorTagName)?.parentElement)?.getAttribute(ma);
|
|
34022
34022
|
return {
|
|
34023
34023
|
html: t,
|
|
34024
34024
|
codeCallback: n && i ? () => {
|
|
@@ -34032,16 +34032,16 @@ var FW = (e) => {
|
|
|
34032
34032
|
let e = this.renderConfig;
|
|
34033
34033
|
if (!e) return;
|
|
34034
34034
|
let { html: t, codeCallback: n, editor: r } = e, i = this.runtimeCellId, a = !!r, o = t.trim(), s = o === "<span></span>" || o === "" ? null : F({ html: o });
|
|
34035
|
-
i ? this.root?.render(/* @__PURE__ */ (0, Y.jsx)(tc, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
34036
|
-
store:
|
|
34035
|
+
i ? this.root?.render(/* @__PURE__ */ (0, Y.jsx)(tc, { children: /* @__PURE__ */ (0, Y.jsx)(bo, {
|
|
34036
|
+
store: _s,
|
|
34037
34037
|
children: /* @__PURE__ */ (0, Y.jsx)(Bb, { children: /* @__PURE__ */ (0, Y.jsxs)(Fe, { children: [/* @__PURE__ */ (0, Y.jsx)(NW, {
|
|
34038
34038
|
cellId: i,
|
|
34039
34039
|
codeCallback: n,
|
|
34040
34040
|
alwaysShowRun: a,
|
|
34041
34041
|
children: s
|
|
34042
34042
|
}), r] }) })
|
|
34043
|
-
}) })) : (this.removeAttribute("data-status"), this.root?.render(/* @__PURE__ */ (0, Y.jsx)(tc, { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
34044
|
-
store:
|
|
34043
|
+
}) })) : (this.removeAttribute("data-status"), this.root?.render(/* @__PURE__ */ (0, Y.jsx)(tc, { children: /* @__PURE__ */ (0, Y.jsx)(bo, {
|
|
34044
|
+
store: _s,
|
|
34045
34045
|
children: /* @__PURE__ */ (0, Y.jsx)(Bb, { children: s })
|
|
34046
34046
|
}) })));
|
|
34047
34047
|
}
|
|
@@ -34055,7 +34055,7 @@ var FW = (e) => {
|
|
|
34055
34055
|
}
|
|
34056
34056
|
querySelectorOrThrow(e) {
|
|
34057
34057
|
let t = this.querySelector(e);
|
|
34058
|
-
return
|
|
34058
|
+
return Ds(t, `Missing ${e} element`), t;
|
|
34059
34059
|
}
|
|
34060
34060
|
disconnectedCallback() {
|
|
34061
34061
|
this.unsubscribeTheme?.(), this.unsubscribeTheme = void 0, this.removeEventListener(zu, this.handleSourceChanged), this.unsubscribeCellIds?.(), this.unsubscribeCellIds = void 0;
|
|
@@ -34072,8 +34072,8 @@ function VW() {
|
|
|
34072
34072
|
//#endregion
|
|
34073
34073
|
//#region src/core/islands/bootstrap.ts
|
|
34074
34074
|
async function HW(e) {
|
|
34075
|
-
let t = e.store ||
|
|
34076
|
-
t.set(
|
|
34075
|
+
let t = e.store || _s, n = e.root || document, r = e.bridge;
|
|
34076
|
+
t.set(Hi, r), t.set(Fs, "read"), t.set(dc, null), e.autoInitializePlugins !== !1 && wL();
|
|
34077
34077
|
let i = Array.from(n.querySelectorAll(Lu.ISLAND));
|
|
34078
34078
|
if (i.length === 0) {
|
|
34079
34079
|
c.log("No islands found, skipping initialization");
|
|
@@ -34081,8 +34081,8 @@ async function HW(e) {
|
|
|
34081
34081
|
}
|
|
34082
34082
|
c.log(`Initializing ${i.length} island(s)`);
|
|
34083
34083
|
for (let e of i) e.classList.add(Vu.NAMESPACE);
|
|
34084
|
-
let o =
|
|
34085
|
-
t.set(
|
|
34084
|
+
let o = ca((e) => {
|
|
34085
|
+
t.set(fa, (t) => aa(t, e));
|
|
34086
34086
|
});
|
|
34087
34087
|
t.sub(sc, () => {
|
|
34088
34088
|
let e = t.get(sc), r = n.querySelectorAll(Lu.ISLAND);
|
|
@@ -34097,18 +34097,18 @@ async function HW(e) {
|
|
|
34097
34097
|
UW(e, o, t, n);
|
|
34098
34098
|
});
|
|
34099
34099
|
let s = Lg(t);
|
|
34100
|
-
s.connect(r.notebookBackend, { onNotification: a.NOOP }), t.set(
|
|
34100
|
+
s.connect(r.notebookBackend, { onNotification: a.NOOP }), t.set(ao, s);
|
|
34101
34101
|
let l = Dx({
|
|
34102
34102
|
store: t,
|
|
34103
34103
|
documentAtom: s.documentAtom,
|
|
34104
34104
|
backendAtom: s.backendAtom
|
|
34105
34105
|
}), u = new AbortController();
|
|
34106
|
-
l.start({ signal: u.signal }), t.set(
|
|
34106
|
+
l.start({ signal: u.signal }), t.set(ko, l), oa({
|
|
34107
34107
|
store: t,
|
|
34108
34108
|
model: l,
|
|
34109
34109
|
reconcile: o.reconcileDocument,
|
|
34110
34110
|
signal: u.signal
|
|
34111
|
-
}), document.addEventListener(
|
|
34111
|
+
}), document.addEventListener(Ta.TYPE, () => {
|
|
34112
34112
|
t.set(lc, !0);
|
|
34113
34113
|
}, { once: !0 }), lW.INSTANCE.start(r.sendComponentValues);
|
|
34114
34114
|
}
|
|
@@ -34140,7 +34140,6 @@ function UW(e, t, n, r) {
|
|
|
34140
34140
|
case "startup-logs":
|
|
34141
34141
|
case "startup-progress":
|
|
34142
34142
|
case "interrupted":
|
|
34143
|
-
case "reconnected":
|
|
34144
34143
|
case "cache-cleared":
|
|
34145
34144
|
case "cache-info":
|
|
34146
34145
|
case "kernel-startup-error":
|
|
@@ -34155,7 +34154,7 @@ function UW(e, t, n, r) {
|
|
|
34155
34154
|
case "kernel-ready":
|
|
34156
34155
|
aW(e, {
|
|
34157
34156
|
autoInstantiate: !0,
|
|
34158
|
-
cells:
|
|
34157
|
+
cells: Ui(n.get(fa)),
|
|
34159
34158
|
resetCellRuntimes: t.resetCellRuntimes,
|
|
34160
34159
|
setLayoutData: a.NOOP,
|
|
34161
34160
|
setCapabilities: a.NOOP,
|
|
@@ -34172,7 +34171,7 @@ function UW(e, t, n, r) {
|
|
|
34172
34171
|
zb.resolve(e.function_call_id, e);
|
|
34173
34172
|
return;
|
|
34174
34173
|
case "cell-op":
|
|
34175
|
-
|
|
34174
|
+
ta(n, e), sW(e, t.handleCellMessage);
|
|
34176
34175
|
return;
|
|
34177
34176
|
case "alert":
|
|
34178
34177
|
x({
|
|
@@ -34199,7 +34198,7 @@ function UW(e, t, n, r) {
|
|
|
34199
34198
|
case "consumer-capabilities":
|
|
34200
34199
|
case "execution": return;
|
|
34201
34200
|
default:
|
|
34202
|
-
|
|
34201
|
+
Ja(e);
|
|
34203
34202
|
return;
|
|
34204
34203
|
}
|
|
34205
34204
|
} catch (e) {
|
|
@@ -34421,7 +34420,7 @@ var rG = "/assets/worker-BdfPA0g5.js", iG = class {
|
|
|
34421
34420
|
url;
|
|
34422
34421
|
name;
|
|
34423
34422
|
constructor(e = {}) {
|
|
34424
|
-
this.url = e.workerUrl || this.getDefaultWorkerUrl(), this.name = e.workerName ||
|
|
34423
|
+
this.url = e.workerUrl || this.getDefaultWorkerUrl(), this.name = e.workerName || Ga();
|
|
34425
34424
|
}
|
|
34426
34425
|
create() {
|
|
34427
34426
|
return nG(new URL(this.url, import.meta.url), { name: this.name });
|
|
@@ -34441,13 +34440,13 @@ var oG = class {
|
|
|
34441
34440
|
store;
|
|
34442
34441
|
root;
|
|
34443
34442
|
session;
|
|
34444
|
-
sessionReady = new
|
|
34443
|
+
sessionReady = new ji();
|
|
34445
34444
|
nextSessionGeneration = 0;
|
|
34446
34445
|
activeSessionGenerations = /* @__PURE__ */ new Set();
|
|
34447
34446
|
appTransition = Promise.resolve();
|
|
34448
|
-
workerReady = new
|
|
34447
|
+
workerReady = new ji();
|
|
34449
34448
|
stream;
|
|
34450
|
-
initialized = new
|
|
34449
|
+
initialized = new ji();
|
|
34451
34450
|
notebookBackend = {
|
|
34452
34451
|
transport: ({ signal: e }, t) => new Promise((n) => {
|
|
34453
34452
|
this.stream = t, t.open(), e.addEventListener("abort", () => {
|
|
@@ -34466,7 +34465,7 @@ var oG = class {
|
|
|
34466
34465
|
}
|
|
34467
34466
|
};
|
|
34468
34467
|
constructor(e = {}) {
|
|
34469
|
-
this.store = e.store ||
|
|
34468
|
+
this.store = e.store || _s, this.root = e.root || document;
|
|
34470
34469
|
try {
|
|
34471
34470
|
let t = (e.workerFactory || new iG()).create();
|
|
34472
34471
|
this.rpc = tG(t), this.setupMessageListeners();
|
|
@@ -34483,7 +34482,7 @@ var oG = class {
|
|
|
34483
34482
|
c.error("Islands initialization error:", e), this.store.set(uc, e), this.initialized.reject(Error(e));
|
|
34484
34483
|
}), this.rpc.addMessageListener("notebookEvent", ({ event: e, sessionGeneration: t }) => {
|
|
34485
34484
|
if (!this.activeSessionGenerations.has(t)) return;
|
|
34486
|
-
let n =
|
|
34485
|
+
let n = Ri(e);
|
|
34487
34486
|
n.event === "marimo" ? n.data.marimo && this.notificationConsumer?.(n.data.marimo, t) : t === this.session?.sessionGeneration && this.stream?.message(n);
|
|
34488
34487
|
});
|
|
34489
34488
|
}
|
|
@@ -34513,7 +34512,7 @@ var oG = class {
|
|
|
34513
34512
|
appId: n.id,
|
|
34514
34513
|
sessionGeneration: ++this.nextSessionGeneration
|
|
34515
34514
|
}, a = this.session, o = t && a !== void 0;
|
|
34516
|
-
this.activeSessionGenerations.add(r.sessionGeneration), o && (this.resetNotebookStream(), this.store.set(
|
|
34515
|
+
this.activeSessionGenerations.add(r.sessionGeneration), o && (this.resetNotebookStream(), this.store.set(fa, ga())), (t || !a) && (t && this.sessionReady.status !== "pending" && (this.sessionReady = new ji()), this.session = {
|
|
34517
34516
|
...r,
|
|
34518
34517
|
code: t ? e : void 0
|
|
34519
34518
|
});
|
|
@@ -34532,7 +34531,7 @@ var oG = class {
|
|
|
34532
34531
|
t?.code === void 0 || e && t.appId !== e || (this.activeSessionGenerations.delete(t.sessionGeneration), await this.rpc.proxy.request.stopSession({
|
|
34533
34532
|
appId: t.appId,
|
|
34534
34533
|
sessionGeneration: t.sessionGeneration
|
|
34535
|
-
}), this.store.set(dc, null), this.session = void 0, this.sessionReady = new
|
|
34534
|
+
}), this.store.set(dc, null), this.session = void 0, this.sessionReady = new ji(), this.resetNotebookStream(), this.store.set(fa, ga()));
|
|
34536
34535
|
});
|
|
34537
34536
|
}
|
|
34538
34537
|
enqueueAppTransition(e) {
|