@marimo-team/islands 0.26.1-dev25 → 0.26.1-dev29
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-Bs2ehxEI.js → ErrorBoundary-CPcZlpvU.js} +1 -1
- package/dist/{chat-ui-DOvIzlMA.js → chat-ui-CWmSnBs8.js} +899 -899
- package/dist/{code-visibility-BnMkbydx.js → code-visibility-CHvnQsso.js} +2 -2
- package/dist/{common-CQur5dRA.js → common-9OlCmjdr.js} +6565 -6565
- package/dist/{config-DL9e-OWE.js → config-1ku0tAiU.js} +27 -28
- package/dist/{data-grid-overlay-editor-BXEY35Xl.js → data-grid-overlay-editor-D6x_MBSD.js} +1 -1
- package/dist/{dropdown-menu-DYN2RV5d.js → dropdown-menu-D65ZUqka.js} +1983 -1983
- package/dist/{error-entries-CncQR572.js → error-entries-DFHEq_SO.js} +515 -519
- package/dist/{feedback-button-BAOp7zqu.js → feedback-button-CodkZ3hF.js} +19 -19
- package/dist/{glide-data-editor-Ce94qTW7.js → glide-data-editor-BZxvtSp-.js} +35 -35
- package/dist/{globals-Uqg4j5z5.js → globals-DFf-tSyE.js} +1 -1
- package/dist/{html-to-image-BU7H-AM1.js → html-to-image-D6Gtk5ik.js} +24005 -23992
- package/dist/main.js +864 -864
- package/dist/{number-overlay-editor-Br_Vp3Ws.js → number-overlay-editor-CfwFMv_U.js} +1 -1
- package/dist/{process-output-xJm8T5-E.js → process-output-ZBdibqlG.js} +2 -2
- package/dist/{reveal-component-B7TgfbYJ.js → reveal-component-CDfNuSFv.js} +3 -3
- package/dist/style.css +1 -1
- package/dist/{vega-component-DpTyTrz3.js → vega-component-D61CTW1X.js} +1 -1
- package/package.json +1 -1
- package/src/__mocks__/intersection-observer.ts +45 -0
- package/src/components/databases/engine-variable.tsx +2 -2
- package/src/components/dependency-graph/panels.tsx +2 -2
- package/src/components/editor/actions/useCellActionButton.tsx +2 -8
- package/src/components/editor/cell/code/__tests__/code-placeholder.test.tsx +40 -0
- package/src/components/editor/cell/code/cell-editor.tsx +41 -104
- package/src/components/editor/cell/code/code-placeholder.css +61 -11
- package/src/components/editor/cell/code/code-placeholder.tsx +52 -29
- package/src/components/editor/cell/useSplitCell.tsx +2 -2
- package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +6 -10
- package/src/components/editor/errors/auto-fix.tsx +8 -7
- package/src/components/editor/navigation/__tests__/navigation.test.ts +3 -12
- package/src/components/editor/navigation/focus-utils.ts +20 -8
- package/src/components/editor/navigation/multi-cell-action-toolbar.tsx +3 -11
- package/src/components/editor/navigation/navigation.ts +2 -2
- package/src/components/editor/notebook-cell.tsx +15 -24
- package/src/components/editor/output/MarimoTracebackOutput.tsx +2 -2
- package/src/components/editor/renderers/vertical-layout/__tests__/useFocusFirstEditor.test.ts +6 -9
- package/src/components/editor/renderers/vertical-layout/useFocusFirstEditor.ts +2 -5
- package/src/components/find-replace/find-replace.tsx +3 -7
- package/src/components/variables/__tests__/variables-table.test.tsx +1 -2
- package/src/core/ai/__tests__/staged-cells.test.ts +6 -39
- package/src/core/ai/staged-cells.ts +2 -20
- package/src/core/ai/tools/__tests__/edit-notebook-tool.test.ts +15 -13
- package/src/core/ai/tools/edit-notebook-tool.ts +13 -8
- package/src/core/cells/__tests__/cell-editor-view.test.ts +44 -0
- package/src/core/cells/__tests__/cells.test.ts +0 -1
- package/src/core/cells/__tests__/focus.test.ts +1 -7
- package/src/core/cells/__tests__/harness.ts +0 -1
- package/src/core/cells/cells.ts +15 -10
- package/src/core/cells/focus.ts +1 -1
- package/src/core/cells/scrollCellIntoView.ts +4 -14
- package/src/core/cells/utils.ts +0 -13
- package/src/core/codemirror/__tests__/cell-documents.test.ts +79 -0
- package/src/core/codemirror/__tests__/editor-mount-scheduler.test.ts +75 -105
- package/src/core/codemirror/__tests__/format.test.ts +85 -63
- package/src/core/codemirror/__tests__/use-lazy-editor-mount.test.tsx +193 -0
- package/src/core/codemirror/cell-documents.ts +132 -0
- package/src/core/codemirror/copilot/__tests__/getCodes.test.ts +0 -1
- package/src/core/codemirror/copilot/getCodes.ts +3 -14
- package/src/core/codemirror/editor-mount-scheduler.ts +41 -48
- package/src/core/codemirror/extensions.ts +2 -2
- package/src/core/codemirror/find-replace/__tests__/navigate.test.ts +42 -16
- package/src/core/codemirror/find-replace/__tests__/search-highlight.test.ts +30 -0
- package/src/core/codemirror/find-replace/__tests__/unmounted-cells.test.ts +145 -0
- package/src/core/codemirror/find-replace/navigate.ts +88 -129
- package/src/core/codemirror/find-replace/search-highlight.ts +3 -1
- package/src/core/codemirror/find-replace/state.ts +7 -2
- package/src/core/codemirror/format.ts +25 -31
- package/src/core/codemirror/go-to-definition/__tests__/utils.test.ts +8 -9
- package/src/core/codemirror/language/cell-code.ts +7 -0
- package/src/core/codemirror/lsp/__tests__/notebook-lsp.test.ts +25 -0
- package/src/core/codemirror/lsp/notebook-lsp.ts +6 -16
- package/src/core/codemirror/use-lazy-editor-mount.ts +67 -0
- package/src/core/codemirror/utils.ts +2 -6
- package/src/utils/__tests__/shared-intersection-observer.test.ts +49 -0
- package/src/utils/shared-intersection-observer.ts +53 -0
package/dist/main.js
CHANGED
|
@@ -3,20 +3,20 @@ 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-Bgs_wQh3.js";
|
|
4
4
|
import { t as b } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { i as x, n as S, r as C, t as w } from "./copy-icon-rYV2znAe.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,
|
|
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, J as N, L as P, Lt as F, M as I, Mt as L, O as R, Ot as z, P as B, R as ee, Rt as te, Ut as ne, Vt as re, Wt as ie, Y as ae, _ as oe, a as se, at as ce, b as le, bt as ue, c as de, ct as fe, ft as pe, ht as me, i as he, it as ge, j as _e, kt as ve, lt as ye, mt as be, n as xe, nt as Se, o as Ce, ot as we, pt as Te, tt as Ee, ut as De, vt as Oe, xt as ke, z as Ae, zt as je } from "./html-to-image-D6Gtk5ik.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-DSWC_Td_.js";
|
|
8
8
|
import { D as Ve, E as He, S as Ue, T as We, _ as Ge, a as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, i as Qe, l as $e, m as et, n as tt, o as nt, p as rt, r as it, s as at, t as ot, u as st, v as ct, w as lt, x as ut, y as dt } from "./spec-C4uOz0Em.js";
|
|
9
|
-
import { $ as ft, $t as pt, A as mt, An as ht, At as gt, B as _t, Bt as vt, C as yt, D as bt, Dn 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, Mn as Vt, Mt as Ht, N as Ut, Nt as Wt, O as Gt, On as Kt, Ot as qt, P as Jt, Pt as Yt, Q as Xt, Qt as Zt, R as Qt, Rt as $t, S as en, Sn as tn, St as nn, T as rn, Tn as an, Tt as on, U as sn, Ut as cn, V as ln, Vt as un, W as dn, Wt as fn, X as pn, Xt as mn, Y as hn, Yt as gn, Z as _n, Zt as vn, _ as yn, _n as bn, _t as xn, an as Sn, at as Cn, b as wn, bn as Tn, bt as En, c as Dn, cn as On, ct as kn, d as An, dn as jn, dt as Mn, en as Nn, f as Pn, fn as Fn, ft as In, g as Ln, gn as Rn, gt as zn, h as Bn, hn as Vn, ht as Hn, in as Un, it as Wn, j as Gn, jn as Kn, jt as qn, k as Jn, kn as Yn, kt as Xn, ln as Zn, lt as Qn, m as $n, mn as er, mt as tr, nn as nr, on as rr, ot as ir, p as ar, pn as or, pt as sr, q as cr, qt as lr, r as ur, rn as dr, rt as fr, sn as pr, st as mr, t as hr, tn as gr, u as _r, un as vr, ut as yr, v as br, vn as xr, vt as Sr, w as Cr, wn as wr, x as Tr, xn as Er, xt as Dr, y as Or, yn as kr, yt as Ar, z as jr, zt as Mr } from "./common-
|
|
9
|
+
import { $ as ft, $t as pt, A as mt, An as ht, At as gt, B as _t, Bt as vt, C as yt, D as bt, Dn 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, Mn as Vt, Mt as Ht, N as Ut, Nt as Wt, O as Gt, On as Kt, Ot as qt, P as Jt, Pt as Yt, Q as Xt, Qt as Zt, R as Qt, Rt as $t, S as en, Sn as tn, St as nn, T as rn, Tn as an, Tt as on, U as sn, Ut as cn, V as ln, Vt as un, W as dn, Wt as fn, X as pn, Xt as mn, Y as hn, Yt as gn, Z as _n, Zt as vn, _ as yn, _n as bn, _t as xn, an as Sn, at as Cn, b as wn, bn as Tn, bt as En, c as Dn, cn as On, ct as kn, d as An, dn as jn, dt as Mn, en as Nn, f as Pn, fn as Fn, ft as In, g as Ln, gn as Rn, gt as zn, h as Bn, hn as Vn, ht as Hn, in as Un, it as Wn, j as Gn, jn as Kn, jt as qn, k as Jn, kn as Yn, kt as Xn, ln as Zn, lt as Qn, m as $n, mn as er, mt as tr, nn as nr, on as rr, ot as ir, p as ar, pn as or, pt as sr, q as cr, qt as lr, r as ur, rn as dr, rt as fr, sn as pr, st as mr, t as hr, tn as gr, u as _r, un as vr, ut as yr, v as br, vn as xr, vt as Sr, w as Cr, wn as wr, x as Tr, xn as Er, xt as Dr, y as Or, yn as kr, yt as Ar, z as jr, zt as Mr } from "./common-9OlCmjdr.js";
|
|
10
10
|
import { a as Nr, n as Pr, s as Fr, t as Ir } from "./useLifecycle-CCV7yZ-v.js";
|
|
11
11
|
import { t as Lr } from "./check-LtjuWmNn.js";
|
|
12
12
|
import { A as Rr, C as zr, D as Br, M as Vr, O as Hr, a as Ur, c as Wr, d as Gr, i as Kr, k as qr, l as Jr, n as Yr, o as Xr, r as Zr, s as Qr, t as $r, w as ei, x as ti } from "./select-CKLRKIzB.js";
|
|
13
|
-
import { $ as ni, At as ri,
|
|
14
|
-
import {
|
|
15
|
-
import { $t as Ui,
|
|
16
|
-
import { a as Na, d as Pa, i as Fa, n as Ia, o as La, r as Ra, s as za, t as Ba, u as Va } from "./process-output-
|
|
13
|
+
import { $ as ni, At as ri, Cn as ii, E as ai, H as oi, K as si, Nt as ci, Q as li, Sn as ui, T as di, V as fi, X as pi, Y as mi, Z as hi, _ as gi, a as _i, b as vi, c as yi, f as bi, g as xi, h as Si, i as Ci, m as wi, mt as Ti, n as Ei, r as Di, rt as Oi, s as ki, t as Ai, v as ji, vt as Mi, w as Ni, x as Pi, xn as Fi, y as Ii } from "./dropdown-menu-D65ZUqka.js";
|
|
14
|
+
import { a as Li, c as Ri, l as zi, r as Bi, s as Vi, t as Hi } from "./config-1ku0tAiU.js";
|
|
15
|
+
import { $t as Ui, A as Wi, At as Gi, C as Ki, Ct as qi, Dt as Ji, Ft as Yi, H as Xi, I as Zi, It as Qi, J as $i, Kt as ea, Nt as ta, Pt as na, Qt as ra, Rt as ia, S as aa, St as oa, T as sa, U as ca, V as la, W as ua, X as da, Xt as fa, Y as pa, Yt as ma, Zt as ha, _ as ga, bt as _a, d as va, g as ya, h as ba, ht as xa, l as Sa, m as Ca, mt as wa, nt as Ta, p as Ea, rt as Da, s as Oa, tn as ka, vt as Aa, w as ja, xt as Ma } from "./error-entries-DFHEq_SO.js";
|
|
16
|
+
import { a as Na, d as Pa, i as Fa, n as Ia, o as La, r as Ra, s as za, t as Ba, u as Va } from "./process-output-ZBdibqlG.js";
|
|
17
17
|
import { t as Ha } from "./pencil-AWgwbH4D.js";
|
|
18
18
|
import { a as Ua, c as Wa, d as Ga, f as Ka, i as qa, l as Ja, r as Ya } from "./glide-utils-CZ-O-CB_.js";
|
|
19
|
-
import { n as Xa, t as Za } from "./globals-
|
|
19
|
+
import { n as Xa, t as Za } from "./globals-DFf-tSyE.js";
|
|
20
20
|
import { a as Qa, i as $a, n as eo, r as to, s as no, t as ro } from "./assertNever-BHnIohkX.js";
|
|
21
21
|
import { t as io } from "./react-dom-DdqGVp5N.js";
|
|
22
22
|
import { t as ao } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -34,16 +34,16 @@ import { c as Vs, i as Hs, m as Us, n as Ws, o as Gs, r as Ks, t as qs } from ".
|
|
|
34
34
|
import { i as Js, n as Ys, r as Xs } from "./formats-BUFLQJXY.js";
|
|
35
35
|
import { o as Zs, r as Qs, t as $s } from "./arrays-DoQ-AILx.js";
|
|
36
36
|
import { n as ec } from "./once-NnpX_HnX.js";
|
|
37
|
-
import { n as tc } from "./
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
37
|
+
import { n as tc, t as nc } from "./esm-Dw2ZydG_.js";
|
|
38
|
+
import { n as rc } from "./dist-CQfpgadU.js";
|
|
39
|
+
import { i as ic } from "./dist-BG-7Qpaj.js";
|
|
40
40
|
import { p as ac } from "./dist-BidYR5m4.js";
|
|
41
41
|
import { t as oc } from "./useAsyncData-P5-Oovhq.js";
|
|
42
42
|
import { n as sc, r as cc, t as lc } from "./useDeepCompareMemoize-BsaXfZ8C.js";
|
|
43
|
-
import { t as uc } from "./ErrorBoundary-
|
|
43
|
+
import { t as uc } from "./ErrorBoundary-CPcZlpvU.js";
|
|
44
44
|
import { G as dc, W as fc } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
45
45
|
import { a as pc, n as mc } from "./loader-qPmiRXZd.js";
|
|
46
|
-
import { a as hc, c as gc, i as _c, l as vc, o as yc, s as bc, t as xc } from "./code-visibility-
|
|
46
|
+
import { a as hc, c as gc, i as _c, l as vc, o as yc, s as bc, t as xc } from "./code-visibility-CHvnQsso.js";
|
|
47
47
|
import { t as Sc } from "./esm-DY8dGAjJ.js";
|
|
48
48
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
49
49
|
var Cc = Object.freeze({
|
|
@@ -2924,7 +2924,7 @@ function Hp(e, t, n) {
|
|
|
2924
2924
|
//#endregion
|
|
2925
2925
|
//#region ../node_modules/.pnpm/react-stately@3.50.0_react@19.3.1/node_modules/react-stately/dist/private/toggle/useToggleState.mjs
|
|
2926
2926
|
function Up(e = {}) {
|
|
2927
|
-
let { isReadOnly: t } = e, [n, r] =
|
|
2927
|
+
let { isReadOnly: t } = e, [n, r] = Oi(e.isSelected, e.defaultSelected || !1, e.onChange), [i] = (0, J.useState)(n);
|
|
2928
2928
|
function a(e) {
|
|
2929
2929
|
t || r(e);
|
|
2930
2930
|
}
|
|
@@ -4614,7 +4614,7 @@ function S_(e, t, n) {
|
|
|
4614
4614
|
}
|
|
4615
4615
|
var C_ = {
|
|
4616
4616
|
state: Ui.CLOSED,
|
|
4617
|
-
code:
|
|
4617
|
+
code: ra.KERNEL_DISCONNECTED,
|
|
4618
4618
|
reason: "kernel not found"
|
|
4619
4619
|
}, w_ = {
|
|
4620
4620
|
...C_,
|
|
@@ -4632,7 +4632,7 @@ function D_(e) {
|
|
|
4632
4632
|
analysis: m_,
|
|
4633
4633
|
attachments: h_,
|
|
4634
4634
|
runtime: y_,
|
|
4635
|
-
executions:
|
|
4635
|
+
executions: fa
|
|
4636
4636
|
}), i = Io({
|
|
4637
4637
|
stream: r.initial,
|
|
4638
4638
|
retained: null,
|
|
@@ -4650,7 +4650,7 @@ function D_(e) {
|
|
|
4650
4650
|
...t,
|
|
4651
4651
|
resources: {
|
|
4652
4652
|
...t.resources,
|
|
4653
|
-
executions:
|
|
4653
|
+
executions: ha(t.resources.executions, r.resources.executions, t.resources.runtime?.id)
|
|
4654
4654
|
}
|
|
4655
4655
|
});
|
|
4656
4656
|
let { analysis: n, document: i } = t.resources;
|
|
@@ -4822,48 +4822,89 @@ function D_(e) {
|
|
|
4822
4822
|
}
|
|
4823
4823
|
}
|
|
4824
4824
|
//#endregion
|
|
4825
|
-
//#region ../node_modules/.pnpm/react-
|
|
4826
|
-
var
|
|
4825
|
+
//#region ../node_modules/.pnpm/react-aria-components@1.21.1_react-dom@19.3.1_react@19.3.1__react@19.3.1/node_modules/react-aria-components/dist/private/SelectionIndicator.mjs
|
|
4826
|
+
var O_ = /*#__PURE__*/ (0, J.createContext)({ isSelected: !1 }), k_ = /*#__PURE__*/ (0, J.createContext)(null), A_ = /*#__PURE__*/ (0, J.createContext)({}), j_ = /*#__PURE__*/ (0, J.forwardRef)(function(e, t) {
|
|
4827
|
+
[e, t] = fi(e, t, A_);
|
|
4828
|
+
let n = (0, J.useContext)(k_), r = Up(n && e.id != null ? {
|
|
4829
|
+
isSelected: n.selectedKeys.has(e.id),
|
|
4830
|
+
onChange(t) {
|
|
4831
|
+
n.setSelected(e.id, t);
|
|
4832
|
+
}
|
|
4833
|
+
} : e), { buttonProps: i, isPressed: a, isSelected: o, isDisabled: s } = n && e.id != null ? Hp({
|
|
4834
|
+
...e,
|
|
4835
|
+
id: e.id
|
|
4836
|
+
}, n, t) : Vp({
|
|
4837
|
+
...e,
|
|
4838
|
+
id: e.id == null ? void 0 : String(e.id)
|
|
4839
|
+
}, r, t), { focusProps: c, isFocused: l, isFocusVisible: u } = ni(e), { hoverProps: d, isHovered: f } = li({
|
|
4840
|
+
...e,
|
|
4841
|
+
isDisabled: s
|
|
4842
|
+
}), p = oi({
|
|
4843
|
+
...e,
|
|
4844
|
+
id: void 0,
|
|
4845
|
+
values: {
|
|
4846
|
+
isHovered: f,
|
|
4847
|
+
isPressed: a,
|
|
4848
|
+
isFocused: l,
|
|
4849
|
+
isSelected: r.isSelected,
|
|
4850
|
+
isFocusVisible: u,
|
|
4851
|
+
isDisabled: s,
|
|
4852
|
+
state: r
|
|
4853
|
+
},
|
|
4854
|
+
defaultClassName: "react-aria-ToggleButton"
|
|
4855
|
+
}), m = Mi(e, { global: !0 });
|
|
4856
|
+
return delete m.id, delete m.onClick, /*#__PURE__*/ J.createElement(si.button, {
|
|
4857
|
+
...ri(m, p, i, c, d),
|
|
4858
|
+
ref: t,
|
|
4859
|
+
slot: e.slot || void 0,
|
|
4860
|
+
"data-focused": l || void 0,
|
|
4861
|
+
"data-disabled": s || void 0,
|
|
4862
|
+
"data-pressed": a || void 0,
|
|
4863
|
+
"data-selected": o || void 0,
|
|
4864
|
+
"data-hovered": f || void 0,
|
|
4865
|
+
"data-focus-visible": u || void 0
|
|
4866
|
+
}, /*#__PURE__*/ J.createElement(O_.Provider, { value: { isSelected: o } }, p.children));
|
|
4867
|
+
}), X = b(), M_ = Vi(), N_ = /* @__PURE__ */ e(De(), 1), P_ = (e) => e.type === "checkbox", F_ = (e) => e instanceof Date, I_ = (e) => e == null, L_ = (e) => typeof e == "object", R_ = (e) => !I_(e) && !Array.isArray(e) && L_(e) && !F_(e), z_ = (e) => R_(e) && e.target ? P_(e.target) ? e.target.checked : e.target.value : e, B_ = (e) => e.substring(0, e.search(/\.\d+(\.|$)/)) || e, V_ = (e, t) => e.has(B_(t)), H_ = (e) => {
|
|
4827
4868
|
let t = e.constructor && e.constructor.prototype;
|
|
4828
|
-
return
|
|
4829
|
-
},
|
|
4830
|
-
function
|
|
4869
|
+
return R_(t) && t.hasOwnProperty("isPrototypeOf");
|
|
4870
|
+
}, U_ = typeof window < "u" && window.HTMLElement !== void 0 && typeof document < "u";
|
|
4871
|
+
function W_(e) {
|
|
4831
4872
|
let t, n = Array.isArray(e), r = typeof FileList < "u" && e instanceof FileList;
|
|
4832
4873
|
if (e instanceof Date) t = new Date(e);
|
|
4833
4874
|
else if (e instanceof Set) t = new Set(e);
|
|
4834
|
-
else if (!(
|
|
4835
|
-
if (t = n ? [] : {}, !n && !
|
|
4836
|
-
else for (let n in e) e.hasOwnProperty(n) && (t[n] =
|
|
4875
|
+
else if (!(U_ && (e instanceof Blob || r)) && (n || R_(e))) {
|
|
4876
|
+
if (t = n ? [] : {}, !n && !H_(e)) t = e;
|
|
4877
|
+
else for (let n in e) e.hasOwnProperty(n) && (t[n] = W_(e[n]));
|
|
4837
4878
|
} else return e;
|
|
4838
4879
|
return t;
|
|
4839
4880
|
}
|
|
4840
|
-
var
|
|
4841
|
-
if (!t || !
|
|
4842
|
-
let r =
|
|
4843
|
-
return
|
|
4844
|
-
},
|
|
4845
|
-
let r = -1, i =
|
|
4881
|
+
var G_ = (e) => Array.isArray(e) ? e.filter(Boolean) : [], K_ = (e) => e === void 0, Z = (e, t, n) => {
|
|
4882
|
+
if (!t || !R_(e)) return n;
|
|
4883
|
+
let r = G_(t.split(/[,[\].]+?/)).reduce((e, t) => I_(e) ? e : e[t], e);
|
|
4884
|
+
return K_(r) || r === e ? K_(e[t]) ? n : e[t] : r;
|
|
4885
|
+
}, q_ = (e) => typeof e == "boolean", J_ = (e) => /^\w*$/.test(e), Y_ = (e) => G_(e.replace(/["|']|\]/g, "").split(/\.|\[/)), X_ = (e, t, n) => {
|
|
4886
|
+
let r = -1, i = J_(t) ? [t] : Y_(t), a = i.length, o = a - 1;
|
|
4846
4887
|
for (; ++r < a;) {
|
|
4847
4888
|
let t = i[r], a = n;
|
|
4848
4889
|
if (r !== o) {
|
|
4849
4890
|
let n = e[t];
|
|
4850
|
-
a =
|
|
4891
|
+
a = R_(n) || Array.isArray(n) ? n : isNaN(+i[r + 1]) ? {} : [];
|
|
4851
4892
|
}
|
|
4852
4893
|
if (t === "__proto__" || t === "constructor" || t === "prototype") return;
|
|
4853
4894
|
e[t] = a, e = e[t];
|
|
4854
4895
|
}
|
|
4855
4896
|
return e;
|
|
4856
|
-
},
|
|
4897
|
+
}, Z_ = {
|
|
4857
4898
|
BLUR: "blur",
|
|
4858
4899
|
FOCUS_OUT: "focusout",
|
|
4859
4900
|
CHANGE: "change"
|
|
4860
|
-
},
|
|
4901
|
+
}, Q_ = {
|
|
4861
4902
|
onBlur: "onBlur",
|
|
4862
4903
|
onChange: "onChange",
|
|
4863
4904
|
onSubmit: "onSubmit",
|
|
4864
4905
|
onTouched: "onTouched",
|
|
4865
4906
|
all: "all"
|
|
4866
|
-
},
|
|
4907
|
+
}, $_ = {
|
|
4867
4908
|
max: "max",
|
|
4868
4909
|
min: "min",
|
|
4869
4910
|
maxLength: "maxLength",
|
|
@@ -4871,22 +4912,22 @@ var V_ = (e) => Array.isArray(e) ? e.filter(Boolean) : [], H_ = (e) => e === voi
|
|
|
4871
4912
|
pattern: "pattern",
|
|
4872
4913
|
required: "required",
|
|
4873
4914
|
validate: "validate"
|
|
4874
|
-
},
|
|
4915
|
+
}, ev = J.createContext(null), tv = () => J.useContext(ev), nv = (e) => {
|
|
4875
4916
|
let { children: t, ...n } = e;
|
|
4876
|
-
return J.createElement(
|
|
4877
|
-
},
|
|
4917
|
+
return J.createElement(ev.Provider, { value: n }, t);
|
|
4918
|
+
}, rv = (e, t, n, r = !0) => {
|
|
4878
4919
|
let i = { defaultValues: t._defaultValues };
|
|
4879
4920
|
for (let a in e) Object.defineProperty(i, a, { get: () => {
|
|
4880
4921
|
let i = a;
|
|
4881
|
-
return t._proxyFormState[i] !==
|
|
4922
|
+
return t._proxyFormState[i] !== Q_.all && (t._proxyFormState[i] = !r || Q_.all), n && (n[i] = !0), e[i];
|
|
4882
4923
|
} });
|
|
4883
4924
|
return i;
|
|
4884
|
-
},
|
|
4925
|
+
}, iv = (e) => R_(e) && !Object.keys(e).length, av = (e, t, n, r) => {
|
|
4885
4926
|
n(e);
|
|
4886
4927
|
let { name: i, ...a } = e;
|
|
4887
|
-
return
|
|
4888
|
-
},
|
|
4889
|
-
function
|
|
4928
|
+
return iv(a) || Object.keys(a).length >= Object.keys(t).length || Object.keys(a).find((e) => t[e] === (!r || Q_.all));
|
|
4929
|
+
}, ov = (e) => Array.isArray(e) ? e : [e], sv = (e, t, n) => !e || !t || e === t || ov(e).some((e) => e && (n ? e === t : e.startsWith(t) || t.startsWith(e)));
|
|
4930
|
+
function cv(e) {
|
|
4890
4931
|
let t = J.useRef(e);
|
|
4891
4932
|
t.current = e, J.useEffect(() => {
|
|
4892
4933
|
let n = !e.disabled && t.current.subject && t.current.subject.subscribe({ next: t.current.next });
|
|
@@ -4895,8 +4936,8 @@ function iv(e) {
|
|
|
4895
4936
|
};
|
|
4896
4937
|
}, [e.disabled]);
|
|
4897
4938
|
}
|
|
4898
|
-
function
|
|
4899
|
-
let t =
|
|
4939
|
+
function lv(e) {
|
|
4940
|
+
let t = tv(), { control: n = t.control, disabled: r, name: i, exact: a } = e || {}, [o, s] = J.useState(n._formState), c = J.useRef(!0), l = J.useRef({
|
|
4900
4941
|
isDirty: !1,
|
|
4901
4942
|
isLoading: !1,
|
|
4902
4943
|
dirtyFields: !1,
|
|
@@ -4906,44 +4947,44 @@ function av(e) {
|
|
|
4906
4947
|
isValid: !1,
|
|
4907
4948
|
errors: !1
|
|
4908
4949
|
}), u = J.useRef(i);
|
|
4909
|
-
return u.current = i,
|
|
4950
|
+
return u.current = i, cv({
|
|
4910
4951
|
disabled: r,
|
|
4911
|
-
next: (e) => c.current &&
|
|
4952
|
+
next: (e) => c.current && sv(u.current, e.name, a) && av(e, l.current, n._updateFormState) && s({
|
|
4912
4953
|
...n._formState,
|
|
4913
4954
|
...e
|
|
4914
4955
|
}),
|
|
4915
4956
|
subject: n._subjects.state
|
|
4916
4957
|
}), J.useEffect(() => (c.current = !0, l.current.isValid && n._updateValid(!0), () => {
|
|
4917
4958
|
c.current = !1;
|
|
4918
|
-
}), [n]), J.useMemo(() =>
|
|
4959
|
+
}), [n]), J.useMemo(() => rv(o, n, l.current, !1), [o, n]);
|
|
4919
4960
|
}
|
|
4920
|
-
var
|
|
4921
|
-
function
|
|
4922
|
-
let t =
|
|
4923
|
-
s.current = r,
|
|
4961
|
+
var uv = (e) => typeof e == "string", dv = (e, t, n, r, i) => uv(e) ? (r && t.watch.add(e), Z(n, e, i)) : Array.isArray(e) ? e.map((e) => (r && t.watch.add(e), Z(n, e))) : (r && (t.watchAll = !0), n);
|
|
4962
|
+
function fv(e) {
|
|
4963
|
+
let t = tv(), { control: n = t.control, name: r, defaultValue: i, disabled: a, exact: o } = e || {}, s = J.useRef(r);
|
|
4964
|
+
s.current = r, cv({
|
|
4924
4965
|
disabled: a,
|
|
4925
4966
|
subject: n._subjects.values,
|
|
4926
4967
|
next: (e) => {
|
|
4927
|
-
|
|
4968
|
+
sv(s.current, e.name, o) && l(W_(dv(s.current, n._names, e.values || n._formValues, !1, i)));
|
|
4928
4969
|
}
|
|
4929
4970
|
});
|
|
4930
4971
|
let [c, l] = J.useState(n._getWatch(r, i));
|
|
4931
4972
|
return J.useEffect(() => n._removeUnmounted()), c;
|
|
4932
4973
|
}
|
|
4933
|
-
function
|
|
4934
|
-
let t =
|
|
4974
|
+
function pv(e) {
|
|
4975
|
+
let t = tv(), { name: n, disabled: r, control: i = t.control, shouldUnregister: a } = e, o = V_(i._names.array, n), s = fv({
|
|
4935
4976
|
control: i,
|
|
4936
4977
|
name: n,
|
|
4937
4978
|
defaultValue: Z(i._formValues, n, Z(i._defaultValues, n, e.defaultValue)),
|
|
4938
4979
|
exact: !0
|
|
4939
|
-
}), c =
|
|
4980
|
+
}), c = lv({
|
|
4940
4981
|
control: i,
|
|
4941
4982
|
name: n,
|
|
4942
4983
|
exact: !0
|
|
4943
4984
|
}), l = J.useRef(i.register(n, {
|
|
4944
4985
|
...e.rules,
|
|
4945
4986
|
value: s,
|
|
4946
|
-
...
|
|
4987
|
+
...q_(e.disabled) ? { disabled: e.disabled } : {}
|
|
4947
4988
|
})), u = J.useMemo(() => Object.defineProperties({}, {
|
|
4948
4989
|
invalid: {
|
|
4949
4990
|
enumerable: !0,
|
|
@@ -4968,20 +5009,20 @@ function lv(e) {
|
|
|
4968
5009
|
}), [c, n]), d = J.useMemo(() => ({
|
|
4969
5010
|
name: n,
|
|
4970
5011
|
value: s,
|
|
4971
|
-
...
|
|
5012
|
+
...q_(r) || c.disabled ? { disabled: c.disabled || r } : {},
|
|
4972
5013
|
onChange: (e) => l.current.onChange({
|
|
4973
5014
|
target: {
|
|
4974
|
-
value:
|
|
5015
|
+
value: z_(e),
|
|
4975
5016
|
name: n
|
|
4976
5017
|
},
|
|
4977
|
-
type:
|
|
5018
|
+
type: Z_.CHANGE
|
|
4978
5019
|
}),
|
|
4979
5020
|
onBlur: () => l.current.onBlur({
|
|
4980
5021
|
target: {
|
|
4981
5022
|
value: Z(i._formValues, n),
|
|
4982
5023
|
name: n
|
|
4983
5024
|
},
|
|
4984
|
-
type:
|
|
5025
|
+
type: Z_.BLUR
|
|
4985
5026
|
}),
|
|
4986
5027
|
ref: (e) => {
|
|
4987
5028
|
let t = Z(i._fields, n);
|
|
@@ -5006,8 +5047,8 @@ function lv(e) {
|
|
|
5006
5047
|
n && n._f && (n._f.mount = t);
|
|
5007
5048
|
};
|
|
5008
5049
|
if (t(n, !0), e) {
|
|
5009
|
-
let e =
|
|
5010
|
-
|
|
5050
|
+
let e = W_(Z(i._options.defaultValues, n));
|
|
5051
|
+
X_(i._defaultValues, n, e), K_(Z(i._formValues, n)) && X_(i._formValues, n, e);
|
|
5011
5052
|
}
|
|
5012
5053
|
return !o && i.register(n), () => {
|
|
5013
5054
|
(o ? e && !i._state.action : e) ? i.unregister(n) : t(n, !1);
|
|
@@ -5037,49 +5078,49 @@ function lv(e) {
|
|
|
5037
5078
|
u
|
|
5038
5079
|
]);
|
|
5039
5080
|
}
|
|
5040
|
-
var
|
|
5081
|
+
var mv = (e) => e.render(pv(e)), hv = (e, t, n, r, i) => t ? {
|
|
5041
5082
|
...n[e],
|
|
5042
5083
|
types: {
|
|
5043
5084
|
...n[e] && n[e].types ? n[e].types : {},
|
|
5044
5085
|
[r]: i || !0
|
|
5045
5086
|
}
|
|
5046
|
-
} : {},
|
|
5087
|
+
} : {}, gv = () => {
|
|
5047
5088
|
let e = typeof performance > "u" ? Date.now() : performance.now() * 1e3;
|
|
5048
5089
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (t) => {
|
|
5049
5090
|
let n = (Math.random() * 16 + e) % 16 | 0;
|
|
5050
5091
|
return (t == "x" ? n : n & 3 | 8).toString(16);
|
|
5051
5092
|
});
|
|
5052
|
-
},
|
|
5053
|
-
isOnSubmit: !e || e ===
|
|
5054
|
-
isOnBlur: e ===
|
|
5055
|
-
isOnChange: e ===
|
|
5056
|
-
isOnAll: e ===
|
|
5057
|
-
isOnTouch: e ===
|
|
5058
|
-
}),
|
|
5093
|
+
}, _v = (e, t, n = {}) => n.shouldFocus || K_(n.shouldFocus) ? n.focusName || `${e}.${K_(n.focusIndex) ? t : n.focusIndex}.` : "", vv = (e) => ({
|
|
5094
|
+
isOnSubmit: !e || e === Q_.onSubmit,
|
|
5095
|
+
isOnBlur: e === Q_.onBlur,
|
|
5096
|
+
isOnChange: e === Q_.onChange,
|
|
5097
|
+
isOnAll: e === Q_.all,
|
|
5098
|
+
isOnTouch: e === Q_.onTouched
|
|
5099
|
+
}), yv = (e, t, n) => !n && (t.watchAll || t.watch.has(e) || [...t.watch].some((t) => e.startsWith(t) && /^\.\w+/.test(e.slice(t.length)))), bv = (e, t, n, r) => {
|
|
5059
5100
|
for (let i of n || Object.keys(e)) {
|
|
5060
5101
|
let n = Z(e, i);
|
|
5061
5102
|
if (n) {
|
|
5062
5103
|
let { _f: e, ...a } = n;
|
|
5063
5104
|
if (e) {
|
|
5064
5105
|
if (e.refs && e.refs[0] && t(e.refs[0], i) && !r || e.ref && t(e.ref, e.name) && !r) return !0;
|
|
5065
|
-
if (
|
|
5066
|
-
} else if (
|
|
5106
|
+
if (bv(a, t)) break;
|
|
5107
|
+
} else if (R_(a) && bv(a, t)) break;
|
|
5067
5108
|
}
|
|
5068
5109
|
}
|
|
5069
|
-
},
|
|
5070
|
-
let r =
|
|
5071
|
-
return
|
|
5072
|
-
},
|
|
5073
|
-
if (!
|
|
5110
|
+
}, xv = (e, t, n) => {
|
|
5111
|
+
let r = ov(Z(e, n));
|
|
5112
|
+
return X_(r, "root", t[n]), X_(e, n, r), e;
|
|
5113
|
+
}, Sv = (e) => e.type === "file", Cv = (e) => typeof e == "function", wv = (e) => {
|
|
5114
|
+
if (!U_) return !1;
|
|
5074
5115
|
let t = e ? e.ownerDocument : 0;
|
|
5075
5116
|
return e instanceof (t && t.defaultView ? t.defaultView.HTMLElement : HTMLElement);
|
|
5076
|
-
},
|
|
5117
|
+
}, Tv = (e) => uv(e), Ev = (e) => e.type === "radio", Dv = (e) => e instanceof RegExp, Ov = {
|
|
5077
5118
|
value: !1,
|
|
5078
5119
|
isValid: !1
|
|
5079
|
-
},
|
|
5120
|
+
}, kv = {
|
|
5080
5121
|
value: !0,
|
|
5081
5122
|
isValid: !0
|
|
5082
|
-
},
|
|
5123
|
+
}, Av = (e) => {
|
|
5083
5124
|
if (Array.isArray(e)) {
|
|
5084
5125
|
if (e.length > 1) {
|
|
5085
5126
|
let t = e.filter((e) => e && e.checked && !e.disabled).map((e) => e.value);
|
|
@@ -5088,35 +5129,35 @@ var uv = (e) => e.render(lv(e)), dv = (e, t, n, r, i) => t ? {
|
|
|
5088
5129
|
isValid: !!t.length
|
|
5089
5130
|
};
|
|
5090
5131
|
}
|
|
5091
|
-
return e[0].checked && !e[0].disabled ? e[0].attributes && !
|
|
5132
|
+
return e[0].checked && !e[0].disabled ? e[0].attributes && !K_(e[0].attributes.value) ? K_(e[0].value) || e[0].value === "" ? kv : {
|
|
5092
5133
|
value: e[0].value,
|
|
5093
5134
|
isValid: !0
|
|
5094
|
-
} :
|
|
5135
|
+
} : kv : Ov;
|
|
5095
5136
|
}
|
|
5096
|
-
return
|
|
5097
|
-
},
|
|
5137
|
+
return Ov;
|
|
5138
|
+
}, jv = {
|
|
5098
5139
|
isValid: !1,
|
|
5099
5140
|
value: null
|
|
5100
|
-
},
|
|
5141
|
+
}, Mv = (e) => Array.isArray(e) ? e.reduce((e, t) => t && t.checked && !t.disabled ? {
|
|
5101
5142
|
isValid: !0,
|
|
5102
5143
|
value: t.value
|
|
5103
|
-
} : e,
|
|
5104
|
-
function
|
|
5105
|
-
if (
|
|
5144
|
+
} : e, jv) : jv;
|
|
5145
|
+
function Nv(e, t, n = "validate") {
|
|
5146
|
+
if (Tv(e) || Array.isArray(e) && e.every(Tv) || q_(e) && !e) return {
|
|
5106
5147
|
type: n,
|
|
5107
|
-
message:
|
|
5148
|
+
message: Tv(e) ? e : "",
|
|
5108
5149
|
ref: t
|
|
5109
5150
|
};
|
|
5110
5151
|
}
|
|
5111
|
-
var
|
|
5152
|
+
var Pv = (e) => R_(e) && !Dv(e) ? e : {
|
|
5112
5153
|
value: e,
|
|
5113
5154
|
message: ""
|
|
5114
|
-
},
|
|
5155
|
+
}, Fv = async (e, t, n, r, i, a) => {
|
|
5115
5156
|
let { ref: o, refs: s, required: c, maxLength: l, minLength: u, min: d, max: f, pattern: p, validate: m, name: h, valueAsNumber: g, mount: _ } = e._f, v = Z(n, h);
|
|
5116
5157
|
if (!_ || t.has(h)) return {};
|
|
5117
5158
|
let y = s ? s[0] : o, b = (e) => {
|
|
5118
|
-
i && y.reportValidity && (y.setCustomValidity(
|
|
5119
|
-
}, x = {}, S =
|
|
5159
|
+
i && y.reportValidity && (y.setCustomValidity(q_(e) ? "" : e || ""), y.reportValidity());
|
|
5160
|
+
}, x = {}, S = Ev(o), C = P_(o), w = S || C, T = (g || Sv(o)) && K_(o.value) && K_(v) || wv(o) && o.value === "" || v === "" || Array.isArray(v) && !v.length, E = hv.bind(null, h, r, x), D = (e, t, n, r = $_.maxLength, i = $_.minLength) => {
|
|
5120
5161
|
let a = e ? t : n;
|
|
5121
5162
|
x[h] = {
|
|
5122
5163
|
type: e ? r : i,
|
|
@@ -5125,104 +5166,104 @@ var Av = (e) => P_(e) && !Cv(e) ? e : {
|
|
|
5125
5166
|
...E(e ? r : i, a)
|
|
5126
5167
|
};
|
|
5127
5168
|
};
|
|
5128
|
-
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T ||
|
|
5129
|
-
let { value: e, message: t } =
|
|
5169
|
+
if (a ? !Array.isArray(v) || !v.length : c && (!w && (T || I_(v)) || q_(v) && !v || C && !Av(s).isValid || S && !Mv(s).isValid)) {
|
|
5170
|
+
let { value: e, message: t } = Tv(c) ? {
|
|
5130
5171
|
value: !!c,
|
|
5131
5172
|
message: c
|
|
5132
|
-
} :
|
|
5173
|
+
} : Pv(c);
|
|
5133
5174
|
if (e && (x[h] = {
|
|
5134
|
-
type:
|
|
5175
|
+
type: $_.required,
|
|
5135
5176
|
message: t,
|
|
5136
5177
|
ref: y,
|
|
5137
|
-
...E(
|
|
5178
|
+
...E($_.required, t)
|
|
5138
5179
|
}, !r)) return b(t), x;
|
|
5139
5180
|
}
|
|
5140
|
-
if (!T && (!
|
|
5141
|
-
let e, t, n =
|
|
5142
|
-
if (!
|
|
5181
|
+
if (!T && (!I_(d) || !I_(f))) {
|
|
5182
|
+
let e, t, n = Pv(f), i = Pv(d);
|
|
5183
|
+
if (!I_(v) && !isNaN(v)) {
|
|
5143
5184
|
let r = o.valueAsNumber || v && +v;
|
|
5144
|
-
|
|
5185
|
+
I_(n.value) || (e = r > n.value), I_(i.value) || (t = r < i.value);
|
|
5145
5186
|
} else {
|
|
5146
5187
|
let r = o.valueAsDate || new Date(v), a = (e) => /* @__PURE__ */ new Date((/* @__PURE__ */ new Date()).toDateString() + " " + e), s = o.type == "time", c = o.type == "week";
|
|
5147
|
-
|
|
5188
|
+
uv(n.value) && v && (e = s ? a(v) > a(n.value) : c ? v > n.value : r > new Date(n.value)), uv(i.value) && v && (t = s ? a(v) < a(i.value) : c ? v < i.value : r < new Date(i.value));
|
|
5148
5189
|
}
|
|
5149
|
-
if ((e || t) && (D(!!e, n.message, i.message,
|
|
5190
|
+
if ((e || t) && (D(!!e, n.message, i.message, $_.max, $_.min), !r)) return b(x[h].message), x;
|
|
5150
5191
|
}
|
|
5151
|
-
if ((l || u) && !T && (
|
|
5152
|
-
let e =
|
|
5192
|
+
if ((l || u) && !T && (uv(v) || a && Array.isArray(v))) {
|
|
5193
|
+
let e = Pv(l), t = Pv(u), n = !I_(e.value) && v.length > +e.value, i = !I_(t.value) && v.length < +t.value;
|
|
5153
5194
|
if ((n || i) && (D(n, e.message, t.message), !r)) return b(x[h].message), x;
|
|
5154
5195
|
}
|
|
5155
|
-
if (p && !T &&
|
|
5156
|
-
let { value: e, message: t } =
|
|
5157
|
-
if (
|
|
5158
|
-
type:
|
|
5196
|
+
if (p && !T && uv(v)) {
|
|
5197
|
+
let { value: e, message: t } = Pv(p);
|
|
5198
|
+
if (Dv(e) && !v.match(e) && (x[h] = {
|
|
5199
|
+
type: $_.pattern,
|
|
5159
5200
|
message: t,
|
|
5160
5201
|
ref: o,
|
|
5161
|
-
...E(
|
|
5202
|
+
...E($_.pattern, t)
|
|
5162
5203
|
}, !r)) return b(t), x;
|
|
5163
5204
|
}
|
|
5164
5205
|
if (m) {
|
|
5165
|
-
if (
|
|
5166
|
-
let e =
|
|
5206
|
+
if (Cv(m)) {
|
|
5207
|
+
let e = Nv(await m(v, n), y);
|
|
5167
5208
|
if (e && (x[h] = {
|
|
5168
5209
|
...e,
|
|
5169
|
-
...E(
|
|
5210
|
+
...E($_.validate, e.message)
|
|
5170
5211
|
}, !r)) return b(e.message), x;
|
|
5171
|
-
} else if (
|
|
5212
|
+
} else if (R_(m)) {
|
|
5172
5213
|
let e = {};
|
|
5173
5214
|
for (let t in m) {
|
|
5174
|
-
if (!
|
|
5175
|
-
let i =
|
|
5215
|
+
if (!iv(e) && !r) break;
|
|
5216
|
+
let i = Nv(await m[t](v, n), y, t);
|
|
5176
5217
|
i && (e = {
|
|
5177
5218
|
...i,
|
|
5178
5219
|
...E(t, i.message)
|
|
5179
5220
|
}, b(i.message), r && (x[h] = e));
|
|
5180
5221
|
}
|
|
5181
|
-
if (!
|
|
5222
|
+
if (!iv(e) && (x[h] = {
|
|
5182
5223
|
ref: y,
|
|
5183
5224
|
...e
|
|
5184
5225
|
}, !r)) return x;
|
|
5185
5226
|
}
|
|
5186
5227
|
}
|
|
5187
5228
|
return b(!0), x;
|
|
5188
|
-
},
|
|
5189
|
-
function
|
|
5229
|
+
}, Iv = (e, t) => [...e, ...ov(t)], Lv = (e) => Array.isArray(e) ? e.map(() => void 0) : void 0;
|
|
5230
|
+
function Rv(e, t, n) {
|
|
5190
5231
|
return [
|
|
5191
5232
|
...e.slice(0, t),
|
|
5192
|
-
...
|
|
5233
|
+
...ov(n),
|
|
5193
5234
|
...e.slice(t)
|
|
5194
5235
|
];
|
|
5195
5236
|
}
|
|
5196
|
-
var
|
|
5197
|
-
function
|
|
5237
|
+
var zv = (e, t, n) => Array.isArray(e) ? (K_(e[n]) && (e[n] = void 0), e.splice(n, 0, e.splice(t, 1)[0]), e) : [], Bv = (e, t) => [...ov(t), ...ov(e)];
|
|
5238
|
+
function Vv(e, t) {
|
|
5198
5239
|
let n = 0, r = [...e];
|
|
5199
5240
|
for (let e of t) r.splice(e - n, 1), n++;
|
|
5200
|
-
return
|
|
5241
|
+
return G_(r).length ? r : [];
|
|
5201
5242
|
}
|
|
5202
|
-
var
|
|
5243
|
+
var Hv = (e, t) => K_(t) ? [] : Vv(e, ov(t).sort((e, t) => e - t)), Uv = (e, t, n) => {
|
|
5203
5244
|
[e[t], e[n]] = [e[n], e[t]];
|
|
5204
5245
|
};
|
|
5205
|
-
function
|
|
5246
|
+
function Wv(e, t) {
|
|
5206
5247
|
let n = t.slice(0, -1).length, r = 0;
|
|
5207
|
-
for (; r < n;) e =
|
|
5248
|
+
for (; r < n;) e = K_(e) ? r++ : e[t[r++]];
|
|
5208
5249
|
return e;
|
|
5209
5250
|
}
|
|
5210
|
-
function
|
|
5211
|
-
for (let t in e) if (e.hasOwnProperty(t) && !
|
|
5251
|
+
function Gv(e) {
|
|
5252
|
+
for (let t in e) if (e.hasOwnProperty(t) && !K_(e[t])) return !1;
|
|
5212
5253
|
return !0;
|
|
5213
5254
|
}
|
|
5214
|
-
function
|
|
5215
|
-
let n = Array.isArray(t) ? t :
|
|
5216
|
-
return r && delete r[a], i !== 0 && (
|
|
5255
|
+
function Kv(e, t) {
|
|
5256
|
+
let n = Array.isArray(t) ? t : J_(t) ? [t] : Y_(t), r = n.length === 1 ? e : Wv(e, n), i = n.length - 1, a = n[i];
|
|
5257
|
+
return r && delete r[a], i !== 0 && (R_(r) && iv(r) || Array.isArray(r) && Gv(r)) && Kv(e, n.slice(0, -1)), e;
|
|
5217
5258
|
}
|
|
5218
|
-
var
|
|
5219
|
-
function
|
|
5220
|
-
let t =
|
|
5221
|
-
d.current = r, u.current = s, n._names.array.add(r), o && n.register(r, o),
|
|
5259
|
+
var qv = (e, t, n) => (e[t] = n, e);
|
|
5260
|
+
function Jv(e) {
|
|
5261
|
+
let t = tv(), { control: n = t.control, name: r, keyName: i = "id", shouldUnregister: a, rules: o } = e, [s, c] = J.useState(n._getFieldArray(r)), l = J.useRef(n._getFieldArray(r).map(gv)), u = J.useRef(s), d = J.useRef(r), f = J.useRef(!1);
|
|
5262
|
+
d.current = r, u.current = s, n._names.array.add(r), o && n.register(r, o), cv({
|
|
5222
5263
|
next: ({ values: e, name: t }) => {
|
|
5223
5264
|
if (t === d.current || !t) {
|
|
5224
5265
|
let t = Z(e, d.current);
|
|
5225
|
-
Array.isArray(t) && (c(t), l.current = t.map(
|
|
5266
|
+
Array.isArray(t) && (c(t), l.current = t.map(gv));
|
|
5226
5267
|
}
|
|
5227
5268
|
},
|
|
5228
5269
|
subject: n._subjects.array
|
|
@@ -5231,20 +5272,20 @@ function Wv(e) {
|
|
|
5231
5272
|
f.current = !0, n._updateFieldArray(r, e);
|
|
5232
5273
|
}, [n, r]);
|
|
5233
5274
|
return J.useEffect(() => {
|
|
5234
|
-
if (n._state.action = !1,
|
|
5275
|
+
if (n._state.action = !1, yv(r, n._names) && n._subjects.state.next({ ...n._formState }), f.current && (!vv(n._options.mode).isOnSubmit || n._formState.isSubmitted)) {
|
|
5235
5276
|
if (n._options.resolver) n._executeSchema([r]).then((e) => {
|
|
5236
5277
|
let t = Z(e.errors, r), i = Z(n._formState.errors, r);
|
|
5237
|
-
(i ? !t && i.type || t && (i.type !== t.type || i.message !== t.message) : t && t.type) && (t ?
|
|
5278
|
+
(i ? !t && i.type || t && (i.type !== t.type || i.message !== t.message) : t && t.type) && (t ? X_(n._formState.errors, r, t) : Kv(n._formState.errors, r), n._subjects.state.next({ errors: n._formState.errors }));
|
|
5238
5279
|
});
|
|
5239
5280
|
else {
|
|
5240
5281
|
let e = Z(n._fields, r);
|
|
5241
|
-
e && e._f && !(
|
|
5282
|
+
e && e._f && !(vv(n._options.reValidateMode).isOnSubmit && vv(n._options.mode).isOnSubmit) && Fv(e, n._names.disabled, n._formValues, n._options.criteriaMode === Q_.all, n._options.shouldUseNativeValidation, !0).then((e) => !iv(e) && n._subjects.state.next({ errors: xv(n._formState.errors, e, r) }));
|
|
5242
5283
|
}
|
|
5243
5284
|
}
|
|
5244
5285
|
n._subjects.values.next({
|
|
5245
5286
|
name: r,
|
|
5246
5287
|
values: { ...n._formValues }
|
|
5247
|
-
}), n._names.focus &&
|
|
5288
|
+
}), n._names.focus && bv(n._fields, (e, t) => {
|
|
5248
5289
|
if (n._names.focus && t.startsWith(n._names.focus) && e.focus) return e.focus(), 1;
|
|
5249
5290
|
}), n._names.focus = "", n._updateValid(), f.current = !1;
|
|
5250
5291
|
}, [
|
|
@@ -5261,7 +5302,7 @@ function Wv(e) {
|
|
|
5261
5302
|
]), {
|
|
5262
5303
|
swap: J.useCallback((e, t) => {
|
|
5263
5304
|
let i = n._getFieldArray(r);
|
|
5264
|
-
|
|
5305
|
+
Uv(i, e, t), Uv(l.current, e, t), p(i), c(i), n._updateFieldArray(r, i, Uv, {
|
|
5265
5306
|
argA: e,
|
|
5266
5307
|
argB: t
|
|
5267
5308
|
}, !1);
|
|
@@ -5272,7 +5313,7 @@ function Wv(e) {
|
|
|
5272
5313
|
]),
|
|
5273
5314
|
move: J.useCallback((e, t) => {
|
|
5274
5315
|
let i = n._getFieldArray(r);
|
|
5275
|
-
|
|
5316
|
+
zv(i, e, t), zv(l.current, e, t), p(i), c(i), n._updateFieldArray(r, i, zv, {
|
|
5276
5317
|
argA: e,
|
|
5277
5318
|
argB: t
|
|
5278
5319
|
}, !1);
|
|
@@ -5282,34 +5323,34 @@ function Wv(e) {
|
|
|
5282
5323
|
n
|
|
5283
5324
|
]),
|
|
5284
5325
|
prepend: J.useCallback((e, t) => {
|
|
5285
|
-
let i =
|
|
5286
|
-
n._names.focus =
|
|
5326
|
+
let i = ov(W_(e)), a = Bv(n._getFieldArray(r), i);
|
|
5327
|
+
n._names.focus = _v(r, 0, t), l.current = Bv(l.current, i.map(gv)), p(a), c(a), n._updateFieldArray(r, a, Bv, { argA: Lv(e) });
|
|
5287
5328
|
}, [
|
|
5288
5329
|
p,
|
|
5289
5330
|
r,
|
|
5290
5331
|
n
|
|
5291
5332
|
]),
|
|
5292
5333
|
append: J.useCallback((e, t) => {
|
|
5293
|
-
let i =
|
|
5294
|
-
n._names.focus =
|
|
5334
|
+
let i = ov(W_(e)), a = Iv(n._getFieldArray(r), i);
|
|
5335
|
+
n._names.focus = _v(r, a.length - 1, t), l.current = Iv(l.current, i.map(gv)), p(a), c(a), n._updateFieldArray(r, a, Iv, { argA: Lv(e) });
|
|
5295
5336
|
}, [
|
|
5296
5337
|
p,
|
|
5297
5338
|
r,
|
|
5298
5339
|
n
|
|
5299
5340
|
]),
|
|
5300
5341
|
remove: J.useCallback((e) => {
|
|
5301
|
-
let t =
|
|
5302
|
-
l.current =
|
|
5342
|
+
let t = Hv(n._getFieldArray(r), e);
|
|
5343
|
+
l.current = Hv(l.current, e), p(t), c(t), !Array.isArray(Z(n._fields, r)) && X_(n._fields, r, void 0), n._updateFieldArray(r, t, Hv, { argA: e });
|
|
5303
5344
|
}, [
|
|
5304
5345
|
p,
|
|
5305
5346
|
r,
|
|
5306
5347
|
n
|
|
5307
5348
|
]),
|
|
5308
5349
|
insert: J.useCallback((e, t, i) => {
|
|
5309
|
-
let a =
|
|
5310
|
-
n._names.focus =
|
|
5350
|
+
let a = ov(W_(t)), o = Rv(n._getFieldArray(r), e, a);
|
|
5351
|
+
n._names.focus = _v(r, e, i), l.current = Rv(l.current, e, a.map(gv)), p(o), c(o), n._updateFieldArray(r, o, Rv, {
|
|
5311
5352
|
argA: e,
|
|
5312
|
-
argB:
|
|
5353
|
+
argB: Lv(t)
|
|
5313
5354
|
});
|
|
5314
5355
|
}, [
|
|
5315
5356
|
p,
|
|
@@ -5317,8 +5358,8 @@ function Wv(e) {
|
|
|
5317
5358
|
n
|
|
5318
5359
|
]),
|
|
5319
5360
|
update: J.useCallback((e, t) => {
|
|
5320
|
-
let i =
|
|
5321
|
-
l.current = [...a].map((t, n) => !t || n === e ?
|
|
5361
|
+
let i = W_(t), a = qv(n._getFieldArray(r), e, i);
|
|
5362
|
+
l.current = [...a].map((t, n) => !t || n === e ? gv() : l.current[n]), p(a), c([...a]), n._updateFieldArray(r, a, qv, {
|
|
5322
5363
|
argA: e,
|
|
5323
5364
|
argB: i
|
|
5324
5365
|
}, !0, !1);
|
|
@@ -5328,8 +5369,8 @@ function Wv(e) {
|
|
|
5328
5369
|
n
|
|
5329
5370
|
]),
|
|
5330
5371
|
replace: J.useCallback((e) => {
|
|
5331
|
-
let t =
|
|
5332
|
-
l.current = t.map(
|
|
5372
|
+
let t = ov(W_(e));
|
|
5373
|
+
l.current = t.map(gv), p([...t]), c([...t]), n._updateFieldArray(r, [...t], (e) => e, {}, !0, !1);
|
|
5333
5374
|
}, [
|
|
5334
5375
|
p,
|
|
5335
5376
|
r,
|
|
@@ -5337,11 +5378,11 @@ function Wv(e) {
|
|
|
5337
5378
|
]),
|
|
5338
5379
|
fields: J.useMemo(() => s.map((e, t) => ({
|
|
5339
5380
|
...e,
|
|
5340
|
-
[i]: l.current[t] ||
|
|
5381
|
+
[i]: l.current[t] || gv()
|
|
5341
5382
|
})), [s, i])
|
|
5342
5383
|
};
|
|
5343
5384
|
}
|
|
5344
|
-
var
|
|
5385
|
+
var Yv = () => {
|
|
5345
5386
|
let e = [];
|
|
5346
5387
|
return {
|
|
5347
5388
|
get observers() {
|
|
@@ -5357,10 +5398,10 @@ var Gv = () => {
|
|
|
5357
5398
|
e = [];
|
|
5358
5399
|
}
|
|
5359
5400
|
};
|
|
5360
|
-
},
|
|
5361
|
-
function
|
|
5362
|
-
if (
|
|
5363
|
-
if (
|
|
5401
|
+
}, Xv = (e) => I_(e) || !L_(e);
|
|
5402
|
+
function Zv(e, t) {
|
|
5403
|
+
if (Xv(e) || Xv(t)) return e === t;
|
|
5404
|
+
if (F_(e) && F_(t)) return e.getTime() === t.getTime();
|
|
5364
5405
|
let n = Object.keys(e), r = Object.keys(t);
|
|
5365
5406
|
if (n.length !== r.length) return !1;
|
|
5366
5407
|
for (let i of n) {
|
|
@@ -5368,35 +5409,35 @@ function qv(e, t) {
|
|
|
5368
5409
|
if (!r.includes(i)) return !1;
|
|
5369
5410
|
if (i !== "ref") {
|
|
5370
5411
|
let e = t[i];
|
|
5371
|
-
if (
|
|
5412
|
+
if (F_(n) && F_(e) || R_(n) && R_(e) || Array.isArray(n) && Array.isArray(e) ? !Zv(n, e) : n !== e) return !1;
|
|
5372
5413
|
}
|
|
5373
5414
|
}
|
|
5374
5415
|
return !0;
|
|
5375
5416
|
}
|
|
5376
|
-
var
|
|
5377
|
-
for (let t in e) if (
|
|
5417
|
+
var Qv = (e) => e.type === "select-multiple", $v = (e) => Ev(e) || P_(e), ey = (e) => wv(e) && e.isConnected, ty = (e) => {
|
|
5418
|
+
for (let t in e) if (Cv(e[t])) return !0;
|
|
5378
5419
|
return !1;
|
|
5379
5420
|
};
|
|
5380
|
-
function
|
|
5421
|
+
function ny(e, t = {}) {
|
|
5381
5422
|
let n = Array.isArray(e);
|
|
5382
|
-
if (
|
|
5423
|
+
if (R_(e) || n) for (let n in e) Array.isArray(e[n]) || R_(e[n]) && !ty(e[n]) ? (t[n] = Array.isArray(e[n]) ? [] : {}, ny(e[n], t[n])) : I_(e[n]) || (t[n] = !0);
|
|
5383
5424
|
return t;
|
|
5384
5425
|
}
|
|
5385
|
-
function
|
|
5426
|
+
function ry(e, t, n) {
|
|
5386
5427
|
let r = Array.isArray(e);
|
|
5387
|
-
if (
|
|
5428
|
+
if (R_(e) || r) for (let r in e) Array.isArray(e[r]) || R_(e[r]) && !ty(e[r]) ? K_(t) || Xv(n[r]) ? n[r] = Array.isArray(e[r]) ? ny(e[r], []) : { ...ny(e[r]) } : ry(e[r], I_(t) ? {} : t[r], n[r]) : n[r] = !Zv(e[r], t[r]);
|
|
5388
5429
|
return n;
|
|
5389
5430
|
}
|
|
5390
|
-
var
|
|
5391
|
-
function
|
|
5431
|
+
var iy = (e, t) => ry(e, t, ny(t)), ay = (e, { valueAsNumber: t, valueAsDate: n, setValueAs: r }) => K_(e) ? e : t ? e === "" ? NaN : e && +e : n && uv(e) ? new Date(e) : r ? r(e) : e;
|
|
5432
|
+
function oy(e) {
|
|
5392
5433
|
let t = e.ref;
|
|
5393
|
-
return
|
|
5434
|
+
return Sv(t) ? t.files : Ev(t) ? Mv(e.refs).value : Qv(t) ? [...t.selectedOptions].map(({ value: e }) => e) : P_(t) ? Av(e.refs).value : ay(K_(t.value) ? e.ref.value : t.value, e);
|
|
5394
5435
|
}
|
|
5395
|
-
var
|
|
5436
|
+
var sy = (e, t, n, r) => {
|
|
5396
5437
|
let i = {};
|
|
5397
5438
|
for (let n of e) {
|
|
5398
5439
|
let e = Z(t, n);
|
|
5399
|
-
e &&
|
|
5440
|
+
e && X_(i, n, e._f);
|
|
5400
5441
|
}
|
|
5401
5442
|
return {
|
|
5402
5443
|
criteriaMode: n,
|
|
@@ -5404,10 +5445,10 @@ var ry = (e, t, n, r) => {
|
|
|
5404
5445
|
fields: i,
|
|
5405
5446
|
shouldUseNativeValidation: r
|
|
5406
5447
|
};
|
|
5407
|
-
},
|
|
5408
|
-
function
|
|
5448
|
+
}, cy = (e) => K_(e) ? e : Dv(e) ? e.source : R_(e) ? Dv(e.value) ? e.value.source : e.value : e, ly = "AsyncFunction", uy = (e) => !!e && !!e.validate && !!(Cv(e.validate) && e.validate.constructor.name === ly || R_(e.validate) && Object.values(e.validate).find((e) => e.constructor.name === ly)), dy = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate);
|
|
5449
|
+
function fy(e, t, n) {
|
|
5409
5450
|
let r = Z(e, n);
|
|
5410
|
-
if (r ||
|
|
5451
|
+
if (r || J_(n)) return {
|
|
5411
5452
|
error: r,
|
|
5412
5453
|
name: n
|
|
5413
5454
|
};
|
|
@@ -5423,19 +5464,19 @@ function cy(e, t, n) {
|
|
|
5423
5464
|
}
|
|
5424
5465
|
return { name: n };
|
|
5425
5466
|
}
|
|
5426
|
-
var
|
|
5427
|
-
mode:
|
|
5428
|
-
reValidateMode:
|
|
5467
|
+
var py = (e, t, n, r, i) => i.isOnAll ? !1 : !n && i.isOnTouch ? !(t || e) : (n ? r.isOnBlur : i.isOnBlur) ? !e : !(n ? r.isOnChange : i.isOnChange) || e, my = (e, t) => !G_(Z(e, t)).length && Kv(e, t), hy = {
|
|
5468
|
+
mode: Q_.onSubmit,
|
|
5469
|
+
reValidateMode: Q_.onChange,
|
|
5429
5470
|
shouldFocusError: !0
|
|
5430
5471
|
};
|
|
5431
|
-
function
|
|
5472
|
+
function gy(e = {}) {
|
|
5432
5473
|
let t = {
|
|
5433
|
-
...
|
|
5474
|
+
...hy,
|
|
5434
5475
|
...e
|
|
5435
5476
|
}, n = {
|
|
5436
5477
|
submitCount: 0,
|
|
5437
5478
|
isDirty: !1,
|
|
5438
|
-
isLoading:
|
|
5479
|
+
isLoading: Cv(t.defaultValues),
|
|
5439
5480
|
isValidating: !1,
|
|
5440
5481
|
isSubmitted: !1,
|
|
5441
5482
|
isSubmitting: !1,
|
|
@@ -5446,7 +5487,7 @@ function fy(e = {}) {
|
|
|
5446
5487
|
validatingFields: {},
|
|
5447
5488
|
errors: t.errors || {},
|
|
5448
5489
|
disabled: t.disabled || !1
|
|
5449
|
-
}, r = {}, i = (
|
|
5490
|
+
}, r = {}, i = (R_(t.defaultValues) || R_(t.values)) && W_(t.defaultValues || t.values) || {}, a = t.shouldUnregister ? {} : W_(i), o = {
|
|
5450
5491
|
action: !1,
|
|
5451
5492
|
mount: !1,
|
|
5452
5493
|
watch: !1
|
|
@@ -5465,47 +5506,47 @@ function fy(e = {}) {
|
|
|
5465
5506
|
isValid: !1,
|
|
5466
5507
|
errors: !1
|
|
5467
5508
|
}, d = {
|
|
5468
|
-
values:
|
|
5469
|
-
array:
|
|
5470
|
-
state:
|
|
5471
|
-
}, f =
|
|
5509
|
+
values: Yv(),
|
|
5510
|
+
array: Yv(),
|
|
5511
|
+
state: Yv()
|
|
5512
|
+
}, f = vv(t.mode), p = vv(t.reValidateMode), m = t.criteriaMode === Q_.all, h = (e) => (t) => {
|
|
5472
5513
|
clearTimeout(l), l = setTimeout(e, t);
|
|
5473
5514
|
}, g = async (e) => {
|
|
5474
5515
|
if (!t.disabled && (u.isValid || e)) {
|
|
5475
|
-
let e = t.resolver ?
|
|
5516
|
+
let e = t.resolver ? iv((await w()).errors) : await E(r, !0);
|
|
5476
5517
|
e !== n.isValid && d.state.next({ isValid: e });
|
|
5477
5518
|
}
|
|
5478
5519
|
}, _ = (e, r) => {
|
|
5479
5520
|
!t.disabled && (u.isValidating || u.validatingFields) && ((e || Array.from(s.mount)).forEach((e) => {
|
|
5480
|
-
e && (r ?
|
|
5521
|
+
e && (r ? X_(n.validatingFields, e, r) : Kv(n.validatingFields, e));
|
|
5481
5522
|
}), d.state.next({
|
|
5482
5523
|
validatingFields: n.validatingFields,
|
|
5483
|
-
isValidating: !
|
|
5524
|
+
isValidating: !iv(n.validatingFields)
|
|
5484
5525
|
}));
|
|
5485
5526
|
}, v = (e, s = [], c, l, f = !0, p = !0) => {
|
|
5486
5527
|
if (l && c && !t.disabled) {
|
|
5487
5528
|
if (o.action = !0, p && Array.isArray(Z(r, e))) {
|
|
5488
5529
|
let t = c(Z(r, e), l.argA, l.argB);
|
|
5489
|
-
f &&
|
|
5530
|
+
f && X_(r, e, t);
|
|
5490
5531
|
}
|
|
5491
5532
|
if (p && Array.isArray(Z(n.errors, e))) {
|
|
5492
5533
|
let t = c(Z(n.errors, e), l.argA, l.argB);
|
|
5493
|
-
f &&
|
|
5534
|
+
f && X_(n.errors, e, t), my(n.errors, e);
|
|
5494
5535
|
}
|
|
5495
5536
|
if (u.touchedFields && p && Array.isArray(Z(n.touchedFields, e))) {
|
|
5496
5537
|
let t = c(Z(n.touchedFields, e), l.argA, l.argB);
|
|
5497
|
-
f &&
|
|
5538
|
+
f && X_(n.touchedFields, e, t);
|
|
5498
5539
|
}
|
|
5499
|
-
u.dirtyFields && (n.dirtyFields =
|
|
5540
|
+
u.dirtyFields && (n.dirtyFields = iy(i, a)), d.state.next({
|
|
5500
5541
|
name: e,
|
|
5501
5542
|
isDirty: O(e, s),
|
|
5502
5543
|
dirtyFields: n.dirtyFields,
|
|
5503
5544
|
errors: n.errors,
|
|
5504
5545
|
isValid: n.isValid
|
|
5505
5546
|
});
|
|
5506
|
-
} else
|
|
5547
|
+
} else X_(a, e, s);
|
|
5507
5548
|
}, y = (e, t) => {
|
|
5508
|
-
|
|
5549
|
+
X_(n.errors, e, t), d.state.next({ errors: n.errors });
|
|
5509
5550
|
}, b = (e) => {
|
|
5510
5551
|
n.errors = e, d.state.next({
|
|
5511
5552
|
errors: n.errors,
|
|
@@ -5514,8 +5555,8 @@ function fy(e = {}) {
|
|
|
5514
5555
|
}, x = (e, t, n, s) => {
|
|
5515
5556
|
let c = Z(r, e);
|
|
5516
5557
|
if (c) {
|
|
5517
|
-
let r = Z(a, e,
|
|
5518
|
-
|
|
5558
|
+
let r = Z(a, e, K_(n) ? Z(i, e) : n);
|
|
5559
|
+
K_(r) || s && s.defaultChecked || t ? X_(a, e, t ? r : oy(c._f)) : j(e, r), o.mount && g();
|
|
5519
5560
|
}
|
|
5520
5561
|
}, S = (e, a, o, s, c) => {
|
|
5521
5562
|
let l = !1, f = !1, p = { name: e };
|
|
@@ -5523,22 +5564,22 @@ function fy(e = {}) {
|
|
|
5523
5564
|
let t = !!(Z(r, e) && Z(r, e)._f && Z(r, e)._f.disabled);
|
|
5524
5565
|
if (!o || s) {
|
|
5525
5566
|
u.isDirty && (f = n.isDirty, n.isDirty = p.isDirty = O(), l = f !== p.isDirty);
|
|
5526
|
-
let r = t ||
|
|
5527
|
-
f = !(t || !Z(n.dirtyFields, e)), r || t ?
|
|
5567
|
+
let r = t || Zv(Z(i, e), a);
|
|
5568
|
+
f = !(t || !Z(n.dirtyFields, e)), r || t ? Kv(n.dirtyFields, e) : X_(n.dirtyFields, e, !0), p.dirtyFields = n.dirtyFields, l ||= u.dirtyFields && f !== !r;
|
|
5528
5569
|
}
|
|
5529
5570
|
if (o) {
|
|
5530
5571
|
let t = Z(n.touchedFields, e);
|
|
5531
|
-
t || (
|
|
5572
|
+
t || (X_(n.touchedFields, e, o), p.touchedFields = n.touchedFields, l ||= u.touchedFields && t !== o);
|
|
5532
5573
|
}
|
|
5533
5574
|
l && c && d.state.next(p);
|
|
5534
5575
|
}
|
|
5535
5576
|
return l ? p : {};
|
|
5536
5577
|
}, C = (e, r, i, a) => {
|
|
5537
|
-
let o = Z(n.errors, e), s = u.isValid &&
|
|
5538
|
-
if (t.delayError && i ? (c = h(() => y(e, i)), c(t.delayError)) : (clearTimeout(l), c = null, i ?
|
|
5578
|
+
let o = Z(n.errors, e), s = u.isValid && q_(r) && n.isValid !== r;
|
|
5579
|
+
if (t.delayError && i ? (c = h(() => y(e, i)), c(t.delayError)) : (clearTimeout(l), c = null, i ? X_(n.errors, e, i) : Kv(n.errors, e)), (i ? !Zv(o, i) : o) || !iv(a) || s) {
|
|
5539
5580
|
let t = {
|
|
5540
5581
|
...a,
|
|
5541
|
-
...s &&
|
|
5582
|
+
...s && q_(r) ? { isValid: r } : {},
|
|
5542
5583
|
errors: n.errors,
|
|
5543
5584
|
name: e
|
|
5544
5585
|
};
|
|
@@ -5549,13 +5590,13 @@ function fy(e = {}) {
|
|
|
5549
5590
|
}
|
|
5550
5591
|
}, w = async (e) => {
|
|
5551
5592
|
_(e, !0);
|
|
5552
|
-
let n = await t.resolver(a, t.context,
|
|
5593
|
+
let n = await t.resolver(a, t.context, sy(e || s.mount, r, t.criteriaMode, t.shouldUseNativeValidation));
|
|
5553
5594
|
return _(e), n;
|
|
5554
5595
|
}, T = async (e) => {
|
|
5555
5596
|
let { errors: t } = await w(e);
|
|
5556
5597
|
if (e) for (let r of e) {
|
|
5557
5598
|
let e = Z(t, r);
|
|
5558
|
-
e ?
|
|
5599
|
+
e ? X_(n.errors, r, e) : Kv(n.errors, r);
|
|
5559
5600
|
}
|
|
5560
5601
|
else n.errors = t;
|
|
5561
5602
|
return t;
|
|
@@ -5565,27 +5606,27 @@ function fy(e = {}) {
|
|
|
5565
5606
|
if (c) {
|
|
5566
5607
|
let { _f: e, ...l } = c;
|
|
5567
5608
|
if (e) {
|
|
5568
|
-
let l = s.array.has(e.name), d = c._f &&
|
|
5609
|
+
let l = s.array.has(e.name), d = c._f && uy(c._f);
|
|
5569
5610
|
d && u.validatingFields && _([o], !0);
|
|
5570
|
-
let f = await
|
|
5611
|
+
let f = await Fv(c, s.disabled, a, m, t.shouldUseNativeValidation && !r, l);
|
|
5571
5612
|
if (d && u.validatingFields && _([o]), f[e.name] && (i.valid = !1, r)) break;
|
|
5572
|
-
!r && (Z(f, e.name) ? l ?
|
|
5613
|
+
!r && (Z(f, e.name) ? l ? xv(n.errors, f, e.name) : X_(n.errors, e.name, f[e.name]) : Kv(n.errors, e.name));
|
|
5573
5614
|
}
|
|
5574
|
-
!
|
|
5615
|
+
!iv(l) && await E(l, r, i);
|
|
5575
5616
|
}
|
|
5576
5617
|
}
|
|
5577
5618
|
return i.valid;
|
|
5578
5619
|
}, D = () => {
|
|
5579
5620
|
for (let e of s.unMount) {
|
|
5580
5621
|
let t = Z(r, e);
|
|
5581
|
-
t && (t._f.refs ? t._f.refs.every((e) => !
|
|
5622
|
+
t && (t._f.refs ? t._f.refs.every((e) => !ey(e)) : !ey(t._f.ref)) && te(e);
|
|
5582
5623
|
}
|
|
5583
5624
|
s.unMount = /* @__PURE__ */ new Set();
|
|
5584
|
-
}, O = (e, n) => !t.disabled && (e && n &&
|
|
5625
|
+
}, O = (e, n) => !t.disabled && (e && n && X_(a, e, n), !Zv(L(), i)), k = (e, t, n) => dv(e, s, { ...o.mount ? a : K_(t) ? i : uv(e) ? { [e]: t } : t }, n, t), A = (e) => G_(Z(o.mount ? a : i, e, t.shouldUnregister ? Z(i, e, []) : [])), j = (e, t, n = {}) => {
|
|
5585
5626
|
let i = Z(r, e), o = t;
|
|
5586
5627
|
if (i) {
|
|
5587
5628
|
let n = i._f;
|
|
5588
|
-
n && (!n.disabled &&
|
|
5629
|
+
n && (!n.disabled && X_(a, e, ay(t, n)), o = wv(n.ref) && I_(t) ? "" : t, Qv(n.ref) ? [...n.ref.options].forEach((e) => e.selected = o.includes(e.value)) : n.refs ? P_(n.ref) ? n.refs.length > 1 ? n.refs.forEach((e) => (!e.defaultChecked || !e.disabled) && (e.checked = Array.isArray(o) ? !!o.find((t) => t === e.value) : o === e.value)) : n.refs[0] && (n.refs[0].checked = !!o) : n.refs.forEach((e) => e.checked = e.value === o) : Sv(n.ref) ? n.ref.value = "" : (n.ref.value = o, n.ref.type || d.values.next({
|
|
5589
5630
|
name: e,
|
|
5590
5631
|
values: { ...a }
|
|
5591
5632
|
})));
|
|
@@ -5594,30 +5635,30 @@ function fy(e = {}) {
|
|
|
5594
5635
|
}, M = (e, t, n) => {
|
|
5595
5636
|
for (let i in t) {
|
|
5596
5637
|
let a = t[i], o = `${e}.${i}`, c = Z(r, o);
|
|
5597
|
-
(s.array.has(e) ||
|
|
5638
|
+
(s.array.has(e) || R_(a) || c && !c._f) && !F_(a) ? M(o, a, n) : j(o, a, n);
|
|
5598
5639
|
}
|
|
5599
5640
|
}, N = (e, t, c = {}) => {
|
|
5600
|
-
let l = Z(r, e), f = s.array.has(e), p =
|
|
5601
|
-
|
|
5641
|
+
let l = Z(r, e), f = s.array.has(e), p = W_(t);
|
|
5642
|
+
X_(a, e, p), f ? (d.array.next({
|
|
5602
5643
|
name: e,
|
|
5603
5644
|
values: { ...a }
|
|
5604
5645
|
}), (u.isDirty || u.dirtyFields) && c.shouldDirty && d.state.next({
|
|
5605
5646
|
name: e,
|
|
5606
|
-
dirtyFields:
|
|
5647
|
+
dirtyFields: iy(i, a),
|
|
5607
5648
|
isDirty: O(e, p)
|
|
5608
|
-
})) : l && !l._f && !
|
|
5649
|
+
})) : l && !l._f && !I_(p) ? M(e, p, c) : j(e, p, c), yv(e, s) && d.state.next({ ...n }), d.values.next({
|
|
5609
5650
|
name: o.mount ? e : void 0,
|
|
5610
5651
|
values: { ...a }
|
|
5611
5652
|
});
|
|
5612
5653
|
}, P = async (e) => {
|
|
5613
5654
|
o.mount = !0;
|
|
5614
|
-
let i = e.target, l = i.name, h = !0, v = Z(r, l), y = () => i.type ?
|
|
5615
|
-
h = Number.isNaN(e) ||
|
|
5655
|
+
let i = e.target, l = i.name, h = !0, v = Z(r, l), y = () => i.type ? oy(v._f) : z_(e), b = (e) => {
|
|
5656
|
+
h = Number.isNaN(e) || F_(e) && isNaN(e.getTime()) || Zv(e, Z(a, l, e));
|
|
5616
5657
|
};
|
|
5617
5658
|
if (v) {
|
|
5618
|
-
let i, o, x = y(), T = e.type ===
|
|
5619
|
-
|
|
5620
|
-
let k = S(l, x, T, !1), A = !
|
|
5659
|
+
let i, o, x = y(), T = e.type === Z_.BLUR || e.type === Z_.FOCUS_OUT, D = !dy(v._f) && !t.resolver && !Z(n.errors, l) && !v._f.deps || py(T, Z(n.touchedFields, l), n.isSubmitted, p, f), O = yv(l, s, T);
|
|
5660
|
+
X_(a, l, x), T ? (v._f.onBlur && v._f.onBlur(e), c && c(0)) : v._f.onChange && v._f.onChange(e);
|
|
5661
|
+
let k = S(l, x, T, !1), A = !iv(k) || O;
|
|
5621
5662
|
if (!T && d.values.next({
|
|
5622
5663
|
name: l,
|
|
5623
5664
|
type: e.type,
|
|
@@ -5629,31 +5670,31 @@ function fy(e = {}) {
|
|
|
5629
5670
|
if (!T && O && d.state.next({ ...n }), t.resolver) {
|
|
5630
5671
|
let { errors: e } = await w([l]);
|
|
5631
5672
|
if (b(x), h) {
|
|
5632
|
-
let t =
|
|
5633
|
-
i = a.error, l = a.name, o =
|
|
5673
|
+
let t = fy(n.errors, r, l), a = fy(e, r, t.name || l);
|
|
5674
|
+
i = a.error, l = a.name, o = iv(e);
|
|
5634
5675
|
}
|
|
5635
|
-
} else _([l], !0), i = (await
|
|
5676
|
+
} else _([l], !0), i = (await Fv(v, s.disabled, a, m, t.shouldUseNativeValidation))[l], _([l]), b(x), h && (i ? o = !1 : u.isValid && (o = await E(r, !0)));
|
|
5636
5677
|
h && (v._f.deps && I(v._f.deps), C(l, o, i, k));
|
|
5637
5678
|
}
|
|
5638
5679
|
}, F = (e, t) => {
|
|
5639
5680
|
if (Z(n.errors, t) && e.focus) return e.focus(), 1;
|
|
5640
5681
|
}, I = async (e, i = {}) => {
|
|
5641
|
-
let a, o, c =
|
|
5682
|
+
let a, o, c = ov(e);
|
|
5642
5683
|
if (t.resolver) {
|
|
5643
|
-
let t = await T(
|
|
5644
|
-
a =
|
|
5684
|
+
let t = await T(K_(e) ? e : c);
|
|
5685
|
+
a = iv(t), o = e ? !c.some((e) => Z(t, e)) : a;
|
|
5645
5686
|
} else e ? (o = (await Promise.all(c.map(async (e) => {
|
|
5646
5687
|
let t = Z(r, e);
|
|
5647
5688
|
return await E(t && t._f ? { [e]: t } : t);
|
|
5648
5689
|
}))).every(Boolean), (o || n.isValid) && g()) : o = a = await E(r);
|
|
5649
5690
|
return d.state.next({
|
|
5650
|
-
...!
|
|
5691
|
+
...!uv(e) || u.isValid && a !== n.isValid ? {} : { name: e },
|
|
5651
5692
|
...t.resolver || !e ? { isValid: a } : {},
|
|
5652
5693
|
errors: n.errors
|
|
5653
|
-
}), i.shouldFocus && !o &&
|
|
5694
|
+
}), i.shouldFocus && !o && bv(r, F, e ? c : s.mount), o;
|
|
5654
5695
|
}, L = (e) => {
|
|
5655
5696
|
let t = { ...o.mount ? a : i };
|
|
5656
|
-
return
|
|
5697
|
+
return K_(e) ? t : uv(e) ? Z(t, e) : e.map((e) => Z(t, e));
|
|
5657
5698
|
}, R = (e, t) => ({
|
|
5658
5699
|
invalid: !!Z((t || n).errors, e),
|
|
5659
5700
|
isDirty: !!Z((t || n).dirtyFields, e),
|
|
@@ -5661,10 +5702,10 @@ function fy(e = {}) {
|
|
|
5661
5702
|
isValidating: !!Z(n.validatingFields, e),
|
|
5662
5703
|
isTouched: !!Z((t || n).touchedFields, e)
|
|
5663
5704
|
}), z = (e) => {
|
|
5664
|
-
e &&
|
|
5705
|
+
e && ov(e).forEach((e) => Kv(n.errors, e)), d.state.next({ errors: e ? n.errors : {} });
|
|
5665
5706
|
}, B = (e, t, i) => {
|
|
5666
5707
|
let a = (Z(r, e, { _f: {} })._f || {}).ref, { ref: o, message: s, type: c, ...l } = Z(n.errors, e) || {};
|
|
5667
|
-
|
|
5708
|
+
X_(n.errors, e, {
|
|
5668
5709
|
...l,
|
|
5669
5710
|
...t,
|
|
5670
5711
|
ref: a
|
|
@@ -5673,17 +5714,17 @@ function fy(e = {}) {
|
|
|
5673
5714
|
errors: n.errors,
|
|
5674
5715
|
isValid: !1
|
|
5675
5716
|
}), i && i.shouldFocus && a && a.focus && a.focus();
|
|
5676
|
-
}, ee = (e, t) =>
|
|
5677
|
-
for (let c of e ?
|
|
5717
|
+
}, ee = (e, t) => Cv(e) ? d.values.subscribe({ next: (n) => e(k(void 0, t), n) }) : k(e, t, !0), te = (e, o = {}) => {
|
|
5718
|
+
for (let c of e ? ov(e) : s.mount) s.mount.delete(c), s.array.delete(c), o.keepValue || (Kv(r, c), Kv(a, c)), !o.keepError && Kv(n.errors, c), !o.keepDirty && Kv(n.dirtyFields, c), !o.keepTouched && Kv(n.touchedFields, c), !o.keepIsValidating && Kv(n.validatingFields, c), !t.shouldUnregister && !o.keepDefaultValue && Kv(i, c);
|
|
5678
5719
|
d.values.next({ values: { ...a } }), d.state.next({
|
|
5679
5720
|
...n,
|
|
5680
5721
|
...o.keepDirty ? { isDirty: O() } : {}
|
|
5681
5722
|
}), !o.keepIsValid && g();
|
|
5682
5723
|
}, ne = ({ disabled: e, name: t, field: n, fields: r }) => {
|
|
5683
|
-
(
|
|
5724
|
+
(q_(e) && o.mount || e || s.disabled.has(t)) && (e ? s.disabled.add(t) : s.disabled.delete(t), S(t, oy(n ? n._f : Z(r, t)._f), !1, !1, !0));
|
|
5684
5725
|
}, re = (e, n = {}) => {
|
|
5685
|
-
let a = Z(r, e), c =
|
|
5686
|
-
return
|
|
5726
|
+
let a = Z(r, e), c = q_(n.disabled) || q_(t.disabled);
|
|
5727
|
+
return X_(r, e, {
|
|
5687
5728
|
...a || {},
|
|
5688
5729
|
_f: {
|
|
5689
5730
|
...a && a._f ? a._f : { ref: { name: e } },
|
|
@@ -5693,17 +5734,17 @@ function fy(e = {}) {
|
|
|
5693
5734
|
}
|
|
5694
5735
|
}), s.mount.add(e), a ? ne({
|
|
5695
5736
|
field: a,
|
|
5696
|
-
disabled:
|
|
5737
|
+
disabled: q_(n.disabled) ? n.disabled : t.disabled,
|
|
5697
5738
|
name: e
|
|
5698
5739
|
}) : x(e, !0, n.value), {
|
|
5699
5740
|
...c ? { disabled: n.disabled || t.disabled } : {},
|
|
5700
5741
|
...t.progressive ? {
|
|
5701
5742
|
required: !!n.required,
|
|
5702
|
-
min:
|
|
5703
|
-
max:
|
|
5704
|
-
minLength:
|
|
5705
|
-
maxLength:
|
|
5706
|
-
pattern:
|
|
5743
|
+
min: cy(n.min),
|
|
5744
|
+
max: cy(n.max),
|
|
5745
|
+
minLength: cy(n.minLength),
|
|
5746
|
+
maxLength: cy(n.maxLength),
|
|
5747
|
+
pattern: cy(n.pattern)
|
|
5707
5748
|
} : {},
|
|
5708
5749
|
name: e,
|
|
5709
5750
|
onChange: P,
|
|
@@ -5711,13 +5752,13 @@ function fy(e = {}) {
|
|
|
5711
5752
|
ref: (c) => {
|
|
5712
5753
|
if (c) {
|
|
5713
5754
|
re(e, n), a = Z(r, e);
|
|
5714
|
-
let t =
|
|
5755
|
+
let t = K_(c.value) && c.querySelectorAll && c.querySelectorAll("input,select,textarea")[0] || c, o = $v(t), s = a._f.refs || [];
|
|
5715
5756
|
if (o ? s.find((e) => e === t) : t === a._f.ref) return;
|
|
5716
|
-
|
|
5757
|
+
X_(r, e, { _f: {
|
|
5717
5758
|
...a._f,
|
|
5718
5759
|
...o ? {
|
|
5719
5760
|
refs: [
|
|
5720
|
-
...s.filter(
|
|
5761
|
+
...s.filter(ey),
|
|
5721
5762
|
t,
|
|
5722
5763
|
...Array.isArray(Z(i, e)) ? [{}] : []
|
|
5723
5764
|
],
|
|
@@ -5727,11 +5768,11 @@ function fy(e = {}) {
|
|
|
5727
5768
|
}
|
|
5728
5769
|
} : { ref: t }
|
|
5729
5770
|
} }), x(e, !1, void 0, t);
|
|
5730
|
-
} else a = Z(r, e, {}), a._f && (a._f.mount = !1), (t.shouldUnregister || n.shouldUnregister) && !(
|
|
5771
|
+
} else a = Z(r, e, {}), a._f && (a._f.mount = !1), (t.shouldUnregister || n.shouldUnregister) && !(V_(s.array, e) && o.action) && s.unMount.add(e);
|
|
5731
5772
|
}
|
|
5732
5773
|
};
|
|
5733
|
-
}, ie = () => t.shouldFocusError &&
|
|
5734
|
-
|
|
5774
|
+
}, ie = () => t.shouldFocusError && bv(r, F, s.mount), ae = (e) => {
|
|
5775
|
+
q_(e) && (d.state.next({ disabled: e }), bv(r, (t, n) => {
|
|
5735
5776
|
let i = Z(r, n);
|
|
5736
5777
|
i && (t.disabled = i._f.disabled || e, Array.isArray(i._f.refs) && i._f.refs.forEach((t) => {
|
|
5737
5778
|
t.disabled = i._f.disabled || e;
|
|
@@ -5740,13 +5781,13 @@ function fy(e = {}) {
|
|
|
5740
5781
|
}, oe = (e, i) => async (o) => {
|
|
5741
5782
|
let c;
|
|
5742
5783
|
o && (o.preventDefault && o.preventDefault(), o.persist && o.persist());
|
|
5743
|
-
let l =
|
|
5744
|
-
if (s.disabled.size) for (let e of s.disabled)
|
|
5784
|
+
let l = W_(a);
|
|
5785
|
+
if (s.disabled.size) for (let e of s.disabled) X_(l, e, void 0);
|
|
5745
5786
|
if (d.state.next({ isSubmitting: !0 }), t.resolver) {
|
|
5746
5787
|
let { errors: e, values: t } = await w();
|
|
5747
5788
|
n.errors = e, l = t;
|
|
5748
5789
|
} else await E(r);
|
|
5749
|
-
if (
|
|
5790
|
+
if (Kv(n.errors, "root"), iv(n.errors)) {
|
|
5750
5791
|
d.state.next({ errors: {} });
|
|
5751
5792
|
try {
|
|
5752
5793
|
await e(l, o);
|
|
@@ -5757,24 +5798,24 @@ function fy(e = {}) {
|
|
|
5757
5798
|
if (d.state.next({
|
|
5758
5799
|
isSubmitted: !0,
|
|
5759
5800
|
isSubmitting: !1,
|
|
5760
|
-
isSubmitSuccessful:
|
|
5801
|
+
isSubmitSuccessful: iv(n.errors) && !c,
|
|
5761
5802
|
submitCount: n.submitCount + 1,
|
|
5762
5803
|
errors: n.errors
|
|
5763
5804
|
}), c) throw c;
|
|
5764
5805
|
}, se = (e, t = {}) => {
|
|
5765
|
-
Z(r, e) && (
|
|
5806
|
+
Z(r, e) && (K_(t.defaultValue) ? N(e, W_(Z(i, e))) : (N(e, t.defaultValue), X_(i, e, W_(t.defaultValue))), t.keepTouched || Kv(n.touchedFields, e), t.keepDirty || (Kv(n.dirtyFields, e), n.isDirty = t.defaultValue ? O(e, W_(Z(i, e))) : O()), t.keepError || (Kv(n.errors, e), u.isValid && g()), d.state.next({ ...n }));
|
|
5766
5807
|
}, ce = (e, c = {}) => {
|
|
5767
|
-
let l = e ?
|
|
5808
|
+
let l = e ? W_(e) : i, f = W_(l), p = iv(e), m = p ? i : f;
|
|
5768
5809
|
if (c.keepDefaultValues || (i = l), !c.keepValues) {
|
|
5769
5810
|
if (c.keepDirtyValues) {
|
|
5770
|
-
let e = /* @__PURE__ */ new Set([...s.mount, ...Object.keys(
|
|
5771
|
-
for (let t of Array.from(e)) Z(n.dirtyFields, t) ?
|
|
5811
|
+
let e = /* @__PURE__ */ new Set([...s.mount, ...Object.keys(iy(i, a))]);
|
|
5812
|
+
for (let t of Array.from(e)) Z(n.dirtyFields, t) ? X_(m, t, Z(a, t)) : N(t, Z(m, t));
|
|
5772
5813
|
} else {
|
|
5773
|
-
if (
|
|
5814
|
+
if (U_ && K_(e)) for (let e of s.mount) {
|
|
5774
5815
|
let t = Z(r, e);
|
|
5775
5816
|
if (t && t._f) {
|
|
5776
5817
|
let e = Array.isArray(t._f.refs) ? t._f.refs[0] : t._f.ref;
|
|
5777
|
-
if (
|
|
5818
|
+
if (wv(e)) {
|
|
5778
5819
|
let t = e.closest("form");
|
|
5779
5820
|
if (t) {
|
|
5780
5821
|
t.reset();
|
|
@@ -5785,7 +5826,7 @@ function fy(e = {}) {
|
|
|
5785
5826
|
}
|
|
5786
5827
|
r = {};
|
|
5787
5828
|
}
|
|
5788
|
-
a = t.shouldUnregister ? c.keepDefaultValues ?
|
|
5829
|
+
a = t.shouldUnregister ? c.keepDefaultValues ? W_(i) : {} : W_(m), d.array.next({ values: { ...m } }), d.values.next({ values: { ...m } });
|
|
5789
5830
|
}
|
|
5790
5831
|
s = {
|
|
5791
5832
|
mount: c.keepDirtyValues ? s.mount : /* @__PURE__ */ new Set(),
|
|
@@ -5797,15 +5838,15 @@ function fy(e = {}) {
|
|
|
5797
5838
|
focus: ""
|
|
5798
5839
|
}, o.mount = !u.isValid || !!c.keepIsValid || !!c.keepDirtyValues, o.watch = !!t.shouldUnregister, d.state.next({
|
|
5799
5840
|
submitCount: c.keepSubmitCount ? n.submitCount : 0,
|
|
5800
|
-
isDirty: p ? !1 : c.keepDirty ? n.isDirty : !(!c.keepDefaultValues ||
|
|
5841
|
+
isDirty: p ? !1 : c.keepDirty ? n.isDirty : !(!c.keepDefaultValues || Zv(e, i)),
|
|
5801
5842
|
isSubmitted: c.keepIsSubmitted ? n.isSubmitted : !1,
|
|
5802
|
-
dirtyFields: p ? {} : c.keepDirtyValues ? c.keepDefaultValues && a ?
|
|
5843
|
+
dirtyFields: p ? {} : c.keepDirtyValues ? c.keepDefaultValues && a ? iy(i, a) : n.dirtyFields : c.keepDefaultValues && e ? iy(i, e) : c.keepDirty ? n.dirtyFields : {},
|
|
5803
5844
|
touchedFields: c.keepTouched ? n.touchedFields : {},
|
|
5804
5845
|
errors: c.keepErrors ? n.errors : {},
|
|
5805
5846
|
isSubmitSuccessful: c.keepIsSubmitSuccessful ? n.isSubmitSuccessful : !1,
|
|
5806
5847
|
isSubmitting: !1
|
|
5807
5848
|
});
|
|
5808
|
-
}, le = (e, t) => ce(
|
|
5849
|
+
}, le = (e, t) => ce(Cv(e) ? e(a) : e, t);
|
|
5809
5850
|
return {
|
|
5810
5851
|
control: {
|
|
5811
5852
|
register: re,
|
|
@@ -5822,7 +5863,7 @@ function fy(e = {}) {
|
|
|
5822
5863
|
_updateDisabledField: ne,
|
|
5823
5864
|
_getFieldArray: A,
|
|
5824
5865
|
_reset: ce,
|
|
5825
|
-
_resetDefaultValues: () =>
|
|
5866
|
+
_resetDefaultValues: () => Cv(t.defaultValues) && t.defaultValues().then((e) => {
|
|
5826
5867
|
le(e, t.resetOptions), d.state.next({ isLoading: !1 });
|
|
5827
5868
|
}),
|
|
5828
5869
|
_updateFormState: (e) => {
|
|
@@ -5887,17 +5928,17 @@ function fy(e = {}) {
|
|
|
5887
5928
|
let n = Z(r, e), i = n && n._f;
|
|
5888
5929
|
if (i) {
|
|
5889
5930
|
let e = i.refs ? i.refs[0] : i.ref;
|
|
5890
|
-
e.focus && (e.focus(), t.shouldSelect &&
|
|
5931
|
+
e.focus && (e.focus(), t.shouldSelect && Cv(e.select) && e.select());
|
|
5891
5932
|
}
|
|
5892
5933
|
},
|
|
5893
5934
|
getFieldState: R
|
|
5894
5935
|
};
|
|
5895
5936
|
}
|
|
5896
|
-
function
|
|
5937
|
+
function _y(e = {}) {
|
|
5897
5938
|
let t = J.useRef(void 0), n = J.useRef(void 0), [r, i] = J.useState({
|
|
5898
5939
|
isDirty: !1,
|
|
5899
5940
|
isValidating: !1,
|
|
5900
|
-
isLoading:
|
|
5941
|
+
isLoading: Cv(e.defaultValues),
|
|
5901
5942
|
isSubmitted: !1,
|
|
5902
5943
|
isSubmitting: !1,
|
|
5903
5944
|
isSubmitSuccessful: !1,
|
|
@@ -5908,17 +5949,17 @@ function py(e = {}) {
|
|
|
5908
5949
|
validatingFields: {},
|
|
5909
5950
|
errors: e.errors || {},
|
|
5910
5951
|
disabled: e.disabled || !1,
|
|
5911
|
-
defaultValues:
|
|
5952
|
+
defaultValues: Cv(e.defaultValues) ? void 0 : e.defaultValues
|
|
5912
5953
|
});
|
|
5913
5954
|
t.current ||= {
|
|
5914
|
-
...
|
|
5955
|
+
...gy(e),
|
|
5915
5956
|
formState: r
|
|
5916
5957
|
};
|
|
5917
5958
|
let a = t.current.control;
|
|
5918
|
-
return a._options = e,
|
|
5959
|
+
return a._options = e, cv({
|
|
5919
5960
|
subject: a._subjects.state,
|
|
5920
5961
|
next: (e) => {
|
|
5921
|
-
|
|
5962
|
+
av(e, a._proxyFormState, a._updateFormState, !0) && i({ ...a._formState });
|
|
5922
5963
|
}
|
|
5923
5964
|
}), J.useEffect(() => a._disableForm(e.disabled), [a, e.disabled]), J.useEffect(() => {
|
|
5924
5965
|
if (a._proxyFormState.isDirty) {
|
|
@@ -5926,57 +5967,57 @@ function py(e = {}) {
|
|
|
5926
5967
|
e !== r.isDirty && a._subjects.state.next({ isDirty: e });
|
|
5927
5968
|
}
|
|
5928
5969
|
}, [a, r.isDirty]), J.useEffect(() => {
|
|
5929
|
-
e.values && !
|
|
5970
|
+
e.values && !Zv(e.values, n.current) ? (a._reset(e.values, a._options.resetOptions), n.current = e.values, i((e) => ({ ...e }))) : a._resetDefaultValues();
|
|
5930
5971
|
}, [e.values, a]), J.useEffect(() => {
|
|
5931
5972
|
e.errors && a._setErrors(e.errors);
|
|
5932
5973
|
}, [e.errors, a]), J.useEffect(() => {
|
|
5933
5974
|
a._state.mount || (a._updateValid(), a._state.mount = !0), a._state.watch && (a._state.watch = !1, a._subjects.state.next({ ...a._formState })), a._removeUnmounted();
|
|
5934
5975
|
}), J.useEffect(() => {
|
|
5935
5976
|
e.shouldUnregister && a._subjects.values.next({ values: a._getWatch() });
|
|
5936
|
-
}, [e.shouldUnregister, a]), t.current.formState =
|
|
5977
|
+
}, [e.shouldUnregister, a]), t.current.formState = rv(r, a), t.current;
|
|
5937
5978
|
}
|
|
5938
5979
|
//#endregion
|
|
5939
5980
|
//#region ../node_modules/.pnpm/@hookform+resolvers@5.9.2_@standard-schema+spec@1.1.0_ajv-formats@2.1.1_ajv@8.20.0__ajv_45651ce990fc20538619024bcddda421/node_modules/@hookform/resolvers/dist/resolvers.mjs
|
|
5940
|
-
var
|
|
5981
|
+
var vy = (e, t, n) => {
|
|
5941
5982
|
if (e && "reportValidity" in e) {
|
|
5942
5983
|
let r = Z(n, t);
|
|
5943
5984
|
e.setCustomValidity(r && r.message || ""), e.reportValidity();
|
|
5944
5985
|
}
|
|
5945
|
-
},
|
|
5986
|
+
}, yy = (e, t) => {
|
|
5946
5987
|
for (let n in t.fields) {
|
|
5947
5988
|
let r = t.fields[n];
|
|
5948
|
-
r && r.ref && "reportValidity" in r.ref ?
|
|
5989
|
+
r && r.ref && "reportValidity" in r.ref ? vy(r.ref, n, e) : r && r.refs && r.refs.forEach((t) => vy(t, n, e));
|
|
5949
5990
|
}
|
|
5950
|
-
},
|
|
5951
|
-
t.shouldUseNativeValidation &&
|
|
5991
|
+
}, by = (e, t) => {
|
|
5992
|
+
t.shouldUseNativeValidation && yy(e, t);
|
|
5952
5993
|
let n = {};
|
|
5953
5994
|
for (let r in e) {
|
|
5954
5995
|
let i = Z(t.fields, r), a = Object.assign(e[r] || {}, { ref: i && i.refs ? i.refs[0] : i && i.ref });
|
|
5955
|
-
if (
|
|
5996
|
+
if (xy(t.names || Object.keys(e), r)) {
|
|
5956
5997
|
let e = Object.assign({}, Z(n, r));
|
|
5957
|
-
|
|
5958
|
-
} else
|
|
5998
|
+
X_(e, "root", a), X_(n, r, e);
|
|
5999
|
+
} else X_(n, r, a);
|
|
5959
6000
|
}
|
|
5960
6001
|
return n;
|
|
5961
|
-
},
|
|
5962
|
-
let n =
|
|
5963
|
-
return e.some((e) =>
|
|
6002
|
+
}, xy = (e, t) => {
|
|
6003
|
+
let n = Sy(t).replace(/[.*+?^${}()|\\]/g, "\\$&");
|
|
6004
|
+
return e.some((e) => Sy(e).match(`^${n}\\.\\d+`));
|
|
5964
6005
|
};
|
|
5965
|
-
function
|
|
6006
|
+
function Sy(e) {
|
|
5966
6007
|
return e.replace(/\[(\d+)]/g, ".$1").replace(/[[\]]/g, "");
|
|
5967
6008
|
}
|
|
5968
6009
|
//#endregion
|
|
5969
6010
|
//#region ../node_modules/.pnpm/@hookform+resolvers@5.9.2_@standard-schema+spec@1.1.0_ajv-formats@2.1.1_ajv@8.20.0__ajv_45651ce990fc20538619024bcddda421/node_modules/@hookform/resolvers/zod/dist/zod.mjs
|
|
5970
|
-
function
|
|
5971
|
-
return
|
|
6011
|
+
function Cy() {
|
|
6012
|
+
return Cy = Object.assign ? Object.assign.bind() : function(e) {
|
|
5972
6013
|
for (var t = 1; t < arguments.length; t++) {
|
|
5973
6014
|
var n = arguments[t];
|
|
5974
6015
|
for (var r in n) ({}).hasOwnProperty.call(n, r) && (e[r] = n[r]);
|
|
5975
6016
|
}
|
|
5976
6017
|
return e;
|
|
5977
|
-
},
|
|
6018
|
+
}, Cy.apply(null, arguments);
|
|
5978
6019
|
}
|
|
5979
|
-
function
|
|
6020
|
+
function wy(e, t) {
|
|
5980
6021
|
try {
|
|
5981
6022
|
var n = e();
|
|
5982
6023
|
} catch (e) {
|
|
@@ -5984,7 +6025,7 @@ function by(e, t) {
|
|
|
5984
6025
|
}
|
|
5985
6026
|
return n && n.then ? n.then(void 0, t) : n;
|
|
5986
6027
|
}
|
|
5987
|
-
function
|
|
6028
|
+
function Ty(e, t) {
|
|
5988
6029
|
for (var n = Object.create(null); e.length;) {
|
|
5989
6030
|
var r = e[0], i = r.code, a = r.message, o = r.path.join(".");
|
|
5990
6031
|
if (!n[o]) {
|
|
@@ -6007,13 +6048,13 @@ function xy(e, t) {
|
|
|
6007
6048
|
});
|
|
6008
6049
|
}), t) {
|
|
6009
6050
|
var c = n[o].types, l = c && c[r.code];
|
|
6010
|
-
n[o] =
|
|
6051
|
+
n[o] = hv(o, t, n, i, l ? [].concat(l, r.message) : r.message);
|
|
6011
6052
|
}
|
|
6012
6053
|
e.shift();
|
|
6013
6054
|
}
|
|
6014
6055
|
return n;
|
|
6015
6056
|
}
|
|
6016
|
-
function
|
|
6057
|
+
function Ey(e, t) {
|
|
6017
6058
|
for (var n = Object.create(null), r = function() {
|
|
6018
6059
|
var r = e[0], i = r.code, a = r.message, o = r.path.join(".");
|
|
6019
6060
|
if (!n[o]) {
|
|
@@ -6032,24 +6073,24 @@ function Sy(e, t) {
|
|
|
6032
6073
|
}
|
|
6033
6074
|
if (r.code === "invalid_union" && r.errors.forEach(function(t) {
|
|
6034
6075
|
return t.forEach(function(t) {
|
|
6035
|
-
return e.push(
|
|
6076
|
+
return e.push(Cy({}, t, { path: [].concat(r.path, t.path) }));
|
|
6036
6077
|
});
|
|
6037
6078
|
}), t) {
|
|
6038
6079
|
var c = n[o].types, l = c && c[r.code];
|
|
6039
|
-
n[o] =
|
|
6080
|
+
n[o] = hv(o, t, n, i, l ? [].concat(l, r.message) : r.message);
|
|
6040
6081
|
}
|
|
6041
6082
|
e.shift();
|
|
6042
6083
|
}; e.length;) r();
|
|
6043
6084
|
return n;
|
|
6044
6085
|
}
|
|
6045
|
-
function
|
|
6086
|
+
function Dy(e, t, n) {
|
|
6046
6087
|
if (n === void 0 && (n = {}), function(e) {
|
|
6047
6088
|
return "_zod" in e && typeof e._zod == "object";
|
|
6048
6089
|
}(e)) return function(r, i, a) {
|
|
6049
6090
|
try {
|
|
6050
|
-
return Promise.resolve(
|
|
6091
|
+
return Promise.resolve(wy(function() {
|
|
6051
6092
|
function i(e) {
|
|
6052
|
-
return a.shouldUseNativeValidation &&
|
|
6093
|
+
return a.shouldUseNativeValidation && yy({}, a), {
|
|
6053
6094
|
errors: {},
|
|
6054
6095
|
values: n.raw ? Object.assign({}, r) : e
|
|
6055
6096
|
};
|
|
@@ -6062,7 +6103,7 @@ function Cy(e, t, n) {
|
|
|
6062
6103
|
return !(e == null || (t = e._zod) == null || (t = t.traits) == null || !t.has("$ZodError"));
|
|
6063
6104
|
}(e)) return {
|
|
6064
6105
|
values: {},
|
|
6065
|
-
errors:
|
|
6106
|
+
errors: by(Ey(e.issues, !a.shouldUseNativeValidation && a.criteriaMode === "all"), a)
|
|
6066
6107
|
};
|
|
6067
6108
|
throw e;
|
|
6068
6109
|
}));
|
|
@@ -6074,9 +6115,9 @@ function Cy(e, t, n) {
|
|
|
6074
6115
|
return "_def" in e && typeof e._def == "object";
|
|
6075
6116
|
}(e)) return function(r, i, a) {
|
|
6076
6117
|
try {
|
|
6077
|
-
return Promise.resolve(
|
|
6118
|
+
return Promise.resolve(wy(function() {
|
|
6078
6119
|
return Promise.resolve(e[n.mode === "sync" ? "parse" : "parseAsync"](r, t)).then(function(e) {
|
|
6079
|
-
return a.shouldUseNativeValidation &&
|
|
6120
|
+
return a.shouldUseNativeValidation && yy({}, a), {
|
|
6080
6121
|
errors: {},
|
|
6081
6122
|
values: n.raw ? Object.assign({}, r) : e
|
|
6082
6123
|
};
|
|
@@ -6086,7 +6127,7 @@ function Cy(e, t, n) {
|
|
|
6086
6127
|
return Array.isArray(e?.issues);
|
|
6087
6128
|
}(e)) return {
|
|
6088
6129
|
values: {},
|
|
6089
|
-
errors:
|
|
6130
|
+
errors: by(Ty(e.errors, !a.shouldUseNativeValidation && a.criteriaMode === "all"), a)
|
|
6090
6131
|
};
|
|
6091
6132
|
throw e;
|
|
6092
6133
|
}));
|
|
@@ -6098,7 +6139,7 @@ function Cy(e, t, n) {
|
|
|
6098
6139
|
}
|
|
6099
6140
|
//#endregion
|
|
6100
6141
|
//#region src/components/forms/options.ts
|
|
6101
|
-
var
|
|
6142
|
+
var Oy = {
|
|
6102
6143
|
of(e) {
|
|
6103
6144
|
return JSON.stringify(e);
|
|
6104
6145
|
},
|
|
@@ -6111,36 +6152,36 @@ var wy = {
|
|
|
6111
6152
|
}
|
|
6112
6153
|
}
|
|
6113
6154
|
};
|
|
6114
|
-
function
|
|
6155
|
+
function ky() {
|
|
6115
6156
|
return Math.floor(Math.random() * 1e5);
|
|
6116
6157
|
}
|
|
6117
6158
|
//#endregion
|
|
6118
6159
|
//#region src/utils/zod-utils.ts
|
|
6119
|
-
function
|
|
6160
|
+
function Ay(e) {
|
|
6120
6161
|
return e instanceof Oo;
|
|
6121
6162
|
}
|
|
6122
|
-
function
|
|
6163
|
+
function jy(e) {
|
|
6123
6164
|
return e instanceof ws;
|
|
6124
6165
|
}
|
|
6125
|
-
function
|
|
6166
|
+
function My(e) {
|
|
6126
6167
|
return e instanceof Lo;
|
|
6127
6168
|
}
|
|
6128
6169
|
//#endregion
|
|
6129
6170
|
//#region src/components/ui/form.tsx
|
|
6130
|
-
var
|
|
6171
|
+
var Ny = nv, Py = J.createContext({}), Fy = (e) => {
|
|
6131
6172
|
let t = (0, X.c)(10), n;
|
|
6132
6173
|
t[0] === e ? n = t[1] : ({...n} = e, t[0] = e, t[1] = n);
|
|
6133
6174
|
let r;
|
|
6134
6175
|
t[2] === n.name ? r = t[3] : (r = { name: n.name }, t[2] = n.name, t[3] = r);
|
|
6135
6176
|
let i;
|
|
6136
|
-
t[4] === n ? i = t[5] : (i = /* @__PURE__ */ (0, Y.jsx)(
|
|
6177
|
+
t[4] === n ? i = t[5] : (i = /* @__PURE__ */ (0, Y.jsx)(mv, { ...n }), t[4] = n, t[5] = i);
|
|
6137
6178
|
let a;
|
|
6138
|
-
return t[6] !== n.name || t[7] !== r || t[8] !== i ? (a = /* @__PURE__ */ (0, Y.jsx)(
|
|
6179
|
+
return t[6] !== n.name || t[7] !== r || t[8] !== i ? (a = /* @__PURE__ */ (0, Y.jsx)(Py, {
|
|
6139
6180
|
value: r,
|
|
6140
6181
|
children: i
|
|
6141
6182
|
}, n.name), t[6] = n.name, t[7] = r, t[8] = i, t[9] = a) : a = t[9], a;
|
|
6142
|
-
},
|
|
6143
|
-
let e = (0, X.c)(11), t = J.use(
|
|
6183
|
+
}, Iy = () => {
|
|
6184
|
+
let e = (0, X.c)(11), t = J.use(Py), n = J.use(Ly), { getFieldState: r, formState: i } = tv(), a;
|
|
6144
6185
|
e[0] !== t.name || e[1] !== i || e[2] !== r ? (a = r(t.name, i), e[0] = t.name, e[1] = i, e[2] = r, e[3] = a) : a = e[3];
|
|
6145
6186
|
let o = a;
|
|
6146
6187
|
if (!t) throw Error("useFormField should be used within <FormField>");
|
|
@@ -6153,7 +6194,7 @@ var ky = Q_, Ay = J.createContext({}), jy = (e) => {
|
|
|
6153
6194
|
formMessageId: u,
|
|
6154
6195
|
...o
|
|
6155
6196
|
}, e[4] = t.name, e[5] = o, e[6] = s, e[7] = c, e[8] = l, e[9] = u, e[10] = d) : d = e[10], d;
|
|
6156
|
-
},
|
|
6197
|
+
}, Ly = J.createContext({}), Ry = J.forwardRef((e, t) => {
|
|
6157
6198
|
let n = (0, X.c)(14), r, i;
|
|
6158
6199
|
n[0] === e ? (r = n[1], i = n[2]) : ({className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
6159
6200
|
let a = J.useId(), o;
|
|
@@ -6167,16 +6208,16 @@ var ky = Q_, Ay = J.createContext({}), jy = (e) => {
|
|
|
6167
6208
|
...i
|
|
6168
6209
|
}), n[7] = i, n[8] = t, n[9] = s, n[10] = c) : c = n[10];
|
|
6169
6210
|
let u;
|
|
6170
|
-
return n[11] !== o || n[12] !== c ? (u = /* @__PURE__ */ (0, Y.jsx)(
|
|
6211
|
+
return n[11] !== o || n[12] !== c ? (u = /* @__PURE__ */ (0, Y.jsx)(Ly, {
|
|
6171
6212
|
value: o,
|
|
6172
6213
|
children: c
|
|
6173
6214
|
}), n[11] = o, n[12] = c, n[13] = u) : u = n[13], u;
|
|
6174
6215
|
});
|
|
6175
|
-
|
|
6176
|
-
var
|
|
6216
|
+
Ry.displayName = "FormItem";
|
|
6217
|
+
var zy = J.forwardRef((e, t) => {
|
|
6177
6218
|
let n = (0, X.c)(11), r, i;
|
|
6178
6219
|
n[0] === e ? (r = n[1], i = n[2]) : ({className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
6179
|
-
let { error: a, formItemId: o } =
|
|
6220
|
+
let { error: a, formItemId: o } = Iy();
|
|
6180
6221
|
if (!i.children) return;
|
|
6181
6222
|
let s = a && "text-destructive", c;
|
|
6182
6223
|
n[3] !== r || n[4] !== s ? (c = l(s, r), n[3] = r, n[4] = s, n[5] = c) : c = n[5];
|
|
@@ -6188,11 +6229,11 @@ var Fy = J.forwardRef((e, t) => {
|
|
|
6188
6229
|
...i
|
|
6189
6230
|
}), n[6] = o, n[7] = i, n[8] = t, n[9] = c, n[10] = u) : u = n[10], u;
|
|
6190
6231
|
});
|
|
6191
|
-
|
|
6192
|
-
var
|
|
6232
|
+
zy.displayName = "FormLabel";
|
|
6233
|
+
var By = J.forwardRef((e, t) => {
|
|
6193
6234
|
let n = (0, X.c)(8), r;
|
|
6194
6235
|
n[0] === e ? r = n[1] : ({...r} = e, n[0] = e, n[1] = r);
|
|
6195
|
-
let { error: i, formItemId: a, formDescriptionId: o, formMessageId: s } =
|
|
6236
|
+
let { error: i, formItemId: a, formDescriptionId: o, formMessageId: s } = Iy(), c = i ? `${o} ${s}` : o, l = !!i, u;
|
|
6196
6237
|
return n[2] !== a || n[3] !== r || n[4] !== t || n[5] !== c || n[6] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(d, {
|
|
6197
6238
|
ref: t,
|
|
6198
6239
|
id: a,
|
|
@@ -6201,11 +6242,11 @@ var Iy = J.forwardRef((e, t) => {
|
|
|
6201
6242
|
...r
|
|
6202
6243
|
}), n[2] = a, n[3] = r, n[4] = t, n[5] = c, n[6] = l, n[7] = u) : u = n[7], u;
|
|
6203
6244
|
});
|
|
6204
|
-
|
|
6205
|
-
var
|
|
6245
|
+
By.displayName = "FormControl";
|
|
6246
|
+
var Vy = J.forwardRef((e, t) => {
|
|
6206
6247
|
let n = (0, X.c)(10), r, i;
|
|
6207
6248
|
n[0] === e ? (r = n[1], i = n[2]) : ({className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
6208
|
-
let { formDescriptionId: a } =
|
|
6249
|
+
let { formDescriptionId: a } = Iy();
|
|
6209
6250
|
if (!i.children) return null;
|
|
6210
6251
|
let o;
|
|
6211
6252
|
n[3] === r ? o = n[4] : (o = l("text-sm text-muted-foreground", r), n[3] = r, n[4] = o);
|
|
@@ -6217,11 +6258,11 @@ var Ly = J.forwardRef((e, t) => {
|
|
|
6217
6258
|
...i
|
|
6218
6259
|
}), n[5] = a, n[6] = i, n[7] = t, n[8] = o, n[9] = s) : s = n[9], s;
|
|
6219
6260
|
});
|
|
6220
|
-
|
|
6221
|
-
var
|
|
6261
|
+
Vy.displayName = "FormDescription";
|
|
6262
|
+
var Hy = J.forwardRef((e, t) => {
|
|
6222
6263
|
let n = (0, X.c)(12), r, i, a;
|
|
6223
6264
|
n[0] === e ? (r = n[1], i = n[2], a = n[3]) : ({className: i, children: r, ...a} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a);
|
|
6224
|
-
let { error: o, formMessageId: s } =
|
|
6265
|
+
let { error: o, formMessageId: s } = Iy(), c = o?.message ? String(o?.message) : r;
|
|
6225
6266
|
if (!c) return null;
|
|
6226
6267
|
let u;
|
|
6227
6268
|
n[4] === i ? u = n[5] : (u = l("text-xs font-medium text-destructive", i), n[4] = i, n[5] = u);
|
|
@@ -6234,9 +6275,9 @@ var Ry = J.forwardRef((e, t) => {
|
|
|
6234
6275
|
children: c
|
|
6235
6276
|
}), n[6] = c, n[7] = s, n[8] = a, n[9] = t, n[10] = u, n[11] = d) : d = n[11], d;
|
|
6236
6277
|
});
|
|
6237
|
-
|
|
6238
|
-
var
|
|
6239
|
-
let t = (0, X.c)(7), { className: n } = e, { error: r } =
|
|
6278
|
+
Hy.displayName = "FormMessage";
|
|
6279
|
+
var Uy = (e) => {
|
|
6280
|
+
let t = (0, X.c)(7), { className: n } = e, { error: r } = Iy(), i = r?.message ? String(r?.message) : null;
|
|
6240
6281
|
if (!i) return null;
|
|
6241
6282
|
let a;
|
|
6242
6283
|
t[0] === n ? a = t[1] : (a = l("stroke-[1.8px]", n), t[0] = n, t[1] = a);
|
|
@@ -6248,51 +6289,10 @@ var zy = (e) => {
|
|
|
6248
6289
|
children: o
|
|
6249
6290
|
}), t[4] = i, t[5] = o, t[6] = s) : s = t[6], s;
|
|
6250
6291
|
};
|
|
6251
|
-
|
|
6292
|
+
Uy.displayName = "FormMessageTooltip";
|
|
6252
6293
|
//#endregion
|
|
6253
|
-
//#region
|
|
6254
|
-
var
|
|
6255
|
-
[e, t] = ii(e, t, Hy);
|
|
6256
|
-
let n = (0, J.useContext)(Vy), r = Up(n && e.id != null ? {
|
|
6257
|
-
isSelected: n.selectedKeys.has(e.id),
|
|
6258
|
-
onChange(t) {
|
|
6259
|
-
n.setSelected(e.id, t);
|
|
6260
|
-
}
|
|
6261
|
-
} : e), { buttonProps: i, isPressed: a, isSelected: o, isDisabled: s } = n && e.id != null ? Hp({
|
|
6262
|
-
...e,
|
|
6263
|
-
id: e.id
|
|
6264
|
-
}, n, t) : Vp({
|
|
6265
|
-
...e,
|
|
6266
|
-
id: e.id == null ? void 0 : String(e.id)
|
|
6267
|
-
}, r, t), { focusProps: c, isFocused: l, isFocusVisible: u } = ni(e), { hoverProps: d, isHovered: f } = li({
|
|
6268
|
-
...e,
|
|
6269
|
-
isDisabled: s
|
|
6270
|
-
}), p = fi({
|
|
6271
|
-
...e,
|
|
6272
|
-
id: void 0,
|
|
6273
|
-
values: {
|
|
6274
|
-
isHovered: f,
|
|
6275
|
-
isPressed: a,
|
|
6276
|
-
isFocused: l,
|
|
6277
|
-
isSelected: r.isSelected,
|
|
6278
|
-
isFocusVisible: u,
|
|
6279
|
-
isDisabled: s,
|
|
6280
|
-
state: r
|
|
6281
|
-
},
|
|
6282
|
-
defaultClassName: "react-aria-ToggleButton"
|
|
6283
|
-
}), m = Ni(e, { global: !0 });
|
|
6284
|
-
return delete m.id, delete m.onClick, /*#__PURE__*/ J.createElement(si.button, {
|
|
6285
|
-
...ri(m, p, i, c, d),
|
|
6286
|
-
ref: t,
|
|
6287
|
-
slot: e.slot || void 0,
|
|
6288
|
-
"data-focused": l || void 0,
|
|
6289
|
-
"data-disabled": s || void 0,
|
|
6290
|
-
"data-pressed": a || void 0,
|
|
6291
|
-
"data-selected": o || void 0,
|
|
6292
|
-
"data-hovered": f || void 0,
|
|
6293
|
-
"data-focus-visible": u || void 0
|
|
6294
|
-
}, /*#__PURE__*/ J.createElement(By.Provider, { value: { isSelected: o } }, p.children));
|
|
6295
|
-
}), Wy = J.forwardRef((e, t) => {
|
|
6294
|
+
//#region src/components/ui/textarea.tsx
|
|
6295
|
+
var Wy = J.forwardRef((e, t) => {
|
|
6296
6296
|
let n = (0, X.c)(16), r, i, a;
|
|
6297
6297
|
n[0] === e ? (r = n[1], i = n[2], a = n[3]) : ({className: i, bottomAdornment: r, ...a} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a);
|
|
6298
6298
|
let o;
|
|
@@ -6385,11 +6385,11 @@ function Jy(e) {
|
|
|
6385
6385
|
let t = e.def.defaultValue;
|
|
6386
6386
|
return typeof t == "function" ? t() : t;
|
|
6387
6387
|
}
|
|
6388
|
-
if (
|
|
6389
|
-
if (
|
|
6388
|
+
if (jy(e)) return t(e.in);
|
|
6389
|
+
if (My(e)) return e.def.items.map((e) => t(e));
|
|
6390
6390
|
if ("unwrap" in e) return t(qy(e));
|
|
6391
6391
|
};
|
|
6392
|
-
return e instanceof Fo || e instanceof wo ? t(e.options[0]) :
|
|
6392
|
+
return e instanceof Fo || e instanceof wo ? t(e.options[0]) : Ay(e) ? Xy(e) ? [Jy(e.element)] : [] : e instanceof lo ? "" : e instanceof Eo ? e.options[0] : e instanceof So ? Object.fromEntries(Object.entries(e.shape).map(([e, n]) => [e, t(n)])) : t(e);
|
|
6393
6393
|
}
|
|
6394
6394
|
function Yy(e) {
|
|
6395
6395
|
if (e instanceof go) return e;
|
|
@@ -6528,7 +6528,7 @@ var ab = [], ob = (e) => {
|
|
|
6528
6528
|
renderers: c
|
|
6529
6529
|
}), t[0] = r, t[1] = s, t[2] = c, t[3] = n, t[4] = l) : l = t[4];
|
|
6530
6530
|
let u;
|
|
6531
|
-
return t[5] !== o || t[6] !== r || t[7] !== l ? (u = /* @__PURE__ */ (0, Y.jsxs)(
|
|
6531
|
+
return t[5] !== o || t[6] !== r || t[7] !== l ? (u = /* @__PURE__ */ (0, Y.jsxs)(nv, {
|
|
6532
6532
|
...r,
|
|
6533
6533
|
children: [o, l]
|
|
6534
6534
|
}), t[5] = o, t[6] = r, t[7] = l, t[8] = u) : u = t[8], u;
|
|
@@ -6542,7 +6542,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6542
6542
|
path: n
|
|
6543
6543
|
});
|
|
6544
6544
|
}
|
|
6545
|
-
let { label: i, description: a, special: o, direction: s = "column", minLength: c } =
|
|
6545
|
+
let { label: i, description: a, special: o, direction: s = "column", minLength: c } = Oy.parse(e.description || "");
|
|
6546
6546
|
if (e instanceof ts || e instanceof jo) {
|
|
6547
6547
|
let i = e.unwrap();
|
|
6548
6548
|
return i = !i.description && e.description ? i.describe(e.description) : i, sb({
|
|
@@ -6554,7 +6554,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6554
6554
|
}
|
|
6555
6555
|
if (e instanceof So) return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
6556
6556
|
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"),
|
|
6557
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
6557
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: i }), Ns.entries(e.shape).map(([e, i]) => {
|
|
6558
6558
|
let a = i instanceof go, o = sb({
|
|
6559
6559
|
schema: i,
|
|
6560
6560
|
form: t,
|
|
@@ -6567,42 +6567,42 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6567
6567
|
}, e);
|
|
6568
6568
|
})]
|
|
6569
6569
|
});
|
|
6570
|
-
if (e instanceof lo) return o === "time" ? /* @__PURE__ */ (0, Y.jsx)(
|
|
6570
|
+
if (e instanceof lo) return o === "time" ? /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6571
6571
|
control: t.control,
|
|
6572
6572
|
name: n,
|
|
6573
|
-
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
6574
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6575
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6576
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6573
|
+
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6574
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: i }),
|
|
6575
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: a }),
|
|
6576
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
6577
6577
|
...e,
|
|
6578
6578
|
onValueChange: e.onChange,
|
|
6579
6579
|
type: "time",
|
|
6580
6580
|
className: "my-0"
|
|
6581
6581
|
}) }),
|
|
6582
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6582
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6583
6583
|
] })
|
|
6584
6584
|
}) : /* @__PURE__ */ (0, Y.jsx)(lb, {
|
|
6585
6585
|
schema: e,
|
|
6586
6586
|
form: t,
|
|
6587
6587
|
path: n
|
|
6588
6588
|
});
|
|
6589
|
-
if (e instanceof ns) return /* @__PURE__ */ (0, Y.jsx)(
|
|
6589
|
+
if (e instanceof ns) return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6590
6590
|
control: t.control,
|
|
6591
6591
|
name: n,
|
|
6592
|
-
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
6592
|
+
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
6593
6593
|
className: l("flex flex-row gap-2", a ? "items-start" : "items-center"),
|
|
6594
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
6594
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(Wi, {
|
|
6595
6595
|
"data-testid": "marimo-plugin-data-frames-boolean-checkbox",
|
|
6596
6596
|
checked: e.value,
|
|
6597
6597
|
onCheckedChange: e.onChange,
|
|
6598
6598
|
className: a ? "mt-0.5" : void 0
|
|
6599
6599
|
}) }), /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
6600
6600
|
className: "flex flex-col gap-1",
|
|
6601
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
6601
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: i }), /* @__PURE__ */ (0, Y.jsx)(Vy, { children: a })]
|
|
6602
6602
|
})]
|
|
6603
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
6603
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Hy, {})] })
|
|
6604
6604
|
});
|
|
6605
|
-
if (e instanceof bo) return o === "random_number_button" ? /* @__PURE__ */ (0, Y.jsx)(
|
|
6605
|
+
if (e instanceof bo) return o === "random_number_button" ? /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6606
6606
|
control: t.control,
|
|
6607
6607
|
name: n,
|
|
6608
6608
|
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(_, {
|
|
@@ -6610,39 +6610,39 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6610
6610
|
"data-testid": "marimo-plugin-data-frames-random-number-button",
|
|
6611
6611
|
variant: "secondary",
|
|
6612
6612
|
onClick: () => {
|
|
6613
|
-
e.onChange(
|
|
6613
|
+
e.onChange(ky());
|
|
6614
6614
|
},
|
|
6615
6615
|
children: [/* @__PURE__ */ (0, Y.jsx)(Sd, { className: "w-3.5 h-3.5 mr-1" }), i]
|
|
6616
6616
|
})
|
|
6617
|
-
}) : /* @__PURE__ */ (0, Y.jsx)(
|
|
6617
|
+
}) : /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6618
6618
|
control: t.control,
|
|
6619
6619
|
name: n,
|
|
6620
|
-
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
6621
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6622
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6623
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6620
|
+
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6621
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: i }),
|
|
6622
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: a }),
|
|
6623
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(Si, {
|
|
6624
6624
|
...e,
|
|
6625
6625
|
className: "my-0",
|
|
6626
6626
|
onValueChange: e.onChange
|
|
6627
6627
|
}) }),
|
|
6628
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6628
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6629
6629
|
] })
|
|
6630
6630
|
});
|
|
6631
6631
|
if (e instanceof so) {
|
|
6632
6632
|
let e = o === "datetime" ? "datetime-local" : o === "time" ? "time" : "date";
|
|
6633
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
6633
|
+
return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6634
6634
|
control: t.control,
|
|
6635
6635
|
name: n,
|
|
6636
|
-
render: ({ field: t }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
6637
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6638
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6639
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6636
|
+
render: ({ field: t }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6637
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: i }),
|
|
6638
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: a }),
|
|
6639
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
6640
6640
|
...t,
|
|
6641
6641
|
onValueChange: t.onChange,
|
|
6642
6642
|
type: e,
|
|
6643
6643
|
className: "my-0"
|
|
6644
6644
|
}) }),
|
|
6645
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6645
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6646
6646
|
] })
|
|
6647
6647
|
});
|
|
6648
6648
|
}
|
|
@@ -6690,7 +6690,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6690
6690
|
}
|
|
6691
6691
|
if (e instanceof wo) {
|
|
6692
6692
|
let a = e.def, o = a.options, s = a.discriminator, c = (e) => o.find((t) => Yy(t).value === e);
|
|
6693
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
6693
|
+
return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6694
6694
|
control: t.control,
|
|
6695
6695
|
name: n,
|
|
6696
6696
|
render: ({ field: e }) => {
|
|
@@ -6698,7 +6698,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6698
6698
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
6699
6699
|
className: "flex flex-col",
|
|
6700
6700
|
children: [
|
|
6701
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6701
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
6702
6702
|
className: "mb-2",
|
|
6703
6703
|
children: i
|
|
6704
6704
|
}),
|
|
@@ -6728,7 +6728,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6728
6728
|
}
|
|
6729
6729
|
});
|
|
6730
6730
|
}
|
|
6731
|
-
return e instanceof Fo ? /* @__PURE__ */ (0, Y.jsx)(
|
|
6731
|
+
return e instanceof Fo ? /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6732
6732
|
control: t.control,
|
|
6733
6733
|
name: n,
|
|
6734
6734
|
render: ({ field: a }) => {
|
|
@@ -6738,7 +6738,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6738
6738
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
6739
6739
|
className: "flex flex-col mb-4 gap-1",
|
|
6740
6740
|
children: [
|
|
6741
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6741
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: i }),
|
|
6742
6742
|
/* @__PURE__ */ (0, Y.jsx)(Jr, {
|
|
6743
6743
|
"data-testid": "marimo-plugin-data-frames-union-select",
|
|
6744
6744
|
...a,
|
|
@@ -6756,7 +6756,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6756
6756
|
]
|
|
6757
6757
|
});
|
|
6758
6758
|
}
|
|
6759
|
-
}) : e instanceof go ? /* @__PURE__ */ (0, Y.jsx)(
|
|
6759
|
+
}) : e instanceof go ? /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6760
6760
|
control: t.control,
|
|
6761
6761
|
name: n,
|
|
6762
6762
|
render: ({ field: t }) => /* @__PURE__ */ (0, Y.jsx)("input", {
|
|
@@ -6769,7 +6769,7 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6769
6769
|
form: t,
|
|
6770
6770
|
path: n,
|
|
6771
6771
|
renderers: r
|
|
6772
|
-
}) :
|
|
6772
|
+
}) : jy(e) ? sb({
|
|
6773
6773
|
schema: e.in,
|
|
6774
6774
|
form: t,
|
|
6775
6775
|
path: n,
|
|
@@ -6782,16 +6782,16 @@ function sb({ schema: e, form: t, path: n, renderers: r }) {
|
|
|
6782
6782
|
}
|
|
6783
6783
|
var cb = (e) => {
|
|
6784
6784
|
let t = (0, X.c)(39), { schema: n, form: r, path: i, minLength: a, renderers: o } = e, s;
|
|
6785
|
-
t[0] === n.description ? s = t[1] : (s =
|
|
6785
|
+
t[0] === n.description ? s = t[1] : (s = Oy.parse(n.description || ""), t[0] = n.description, t[1] = s);
|
|
6786
6786
|
let { label: c, description: l } = s, u = r.control, d;
|
|
6787
6787
|
t[2] !== u || t[3] !== i ? (d = {
|
|
6788
6788
|
control: u,
|
|
6789
6789
|
name: i
|
|
6790
6790
|
}, t[2] = u, t[3] = i, t[4] = d) : d = t[4];
|
|
6791
|
-
let { fields: p, append: m, remove: h } =
|
|
6792
|
-
t[5] === c ? y = t[6] : (y = /* @__PURE__ */ (0, Y.jsx)(
|
|
6791
|
+
let { fields: p, append: m, remove: h } = Jv(d), g = a != null && p.length < a, v = a == null || p.length > a, y;
|
|
6792
|
+
t[5] === c ? y = t[6] : (y = /* @__PURE__ */ (0, Y.jsx)(zy, { children: c }), t[5] = c, t[6] = y);
|
|
6793
6793
|
let b;
|
|
6794
|
-
t[7] === l ? b = t[8] : (b = /* @__PURE__ */ (0, Y.jsx)(
|
|
6794
|
+
t[7] === l ? b = t[8] : (b = /* @__PURE__ */ (0, Y.jsx)(Vy, { children: l }), t[7] = l, t[8] = b);
|
|
6795
6795
|
let x;
|
|
6796
6796
|
if (t[9] !== v || t[10] !== p || t[11] !== r || t[12] !== i || t[13] !== h || t[14] !== o || t[15] !== n) {
|
|
6797
6797
|
let e;
|
|
@@ -6803,7 +6803,7 @@ var cb = (e) => {
|
|
|
6803
6803
|
form: r,
|
|
6804
6804
|
path: `${i}[${t}]`,
|
|
6805
6805
|
renderers: o
|
|
6806
|
-
}), v && /* @__PURE__ */ (0, Y.jsx)(
|
|
6806
|
+
}), v && /* @__PURE__ */ (0, Y.jsx)(z, {
|
|
6807
6807
|
className: "w-4 h-4 ml-2 my-1 text-muted-foreground hover:text-destructive cursor-pointer absolute right-0 top-5",
|
|
6808
6808
|
onClick: () => {
|
|
6809
6809
|
h(t);
|
|
@@ -6848,16 +6848,16 @@ var cb = (e) => {
|
|
|
6848
6848
|
}), t[33] = y, t[34] = b, t[35] = x, t[36] = S, t[37] = T, t[38] = E) : E = t[38], E;
|
|
6849
6849
|
}, lb = (e) => {
|
|
6850
6850
|
let t = (0, X.c)(21), { schema: n, form: r, path: i } = e, a;
|
|
6851
|
-
t[0] === n.description ? a = t[1] : (a =
|
|
6851
|
+
t[0] === n.description ? a = t[1] : (a = Oy.parse(n.description), t[0] = n.description, t[1] = a);
|
|
6852
6852
|
let { label: o, description: s, placeholder: c, disabled: l, inputType: u } = a;
|
|
6853
6853
|
if (u === "textarea") {
|
|
6854
6854
|
let e;
|
|
6855
6855
|
t[2] !== s || t[3] !== l || t[4] !== o || t[5] !== c ? (e = (e) => {
|
|
6856
6856
|
let { field: t } = e;
|
|
6857
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
6858
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6859
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6860
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6857
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6858
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: o }),
|
|
6859
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: s }),
|
|
6860
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(Wy, {
|
|
6861
6861
|
...t,
|
|
6862
6862
|
value: t.value,
|
|
6863
6863
|
onChange: t.onChange,
|
|
@@ -6865,11 +6865,11 @@ var cb = (e) => {
|
|
|
6865
6865
|
placeholder: c,
|
|
6866
6866
|
disabled: l
|
|
6867
6867
|
}) }),
|
|
6868
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6868
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6869
6869
|
] });
|
|
6870
6870
|
}, t[2] = s, t[3] = l, t[4] = o, t[5] = c, t[6] = e) : e = t[6];
|
|
6871
6871
|
let n;
|
|
6872
|
-
return t[7] !== r.control || t[8] !== i || t[9] !== e ? (n = /* @__PURE__ */ (0, Y.jsx)(
|
|
6872
|
+
return t[7] !== r.control || t[8] !== i || t[9] !== e ? (n = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6873
6873
|
control: r.control,
|
|
6874
6874
|
name: i,
|
|
6875
6875
|
render: e
|
|
@@ -6878,10 +6878,10 @@ var cb = (e) => {
|
|
|
6878
6878
|
let d;
|
|
6879
6879
|
t[11] !== s || t[12] !== l || t[13] !== u || t[14] !== o || t[15] !== c ? (d = (e) => {
|
|
6880
6880
|
let { field: t } = e;
|
|
6881
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
6882
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6883
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6884
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6881
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6882
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: o }),
|
|
6883
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: s }),
|
|
6884
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
6885
6885
|
...t,
|
|
6886
6886
|
type: u,
|
|
6887
6887
|
value: t.value,
|
|
@@ -6890,49 +6890,49 @@ var cb = (e) => {
|
|
|
6890
6890
|
placeholder: c,
|
|
6891
6891
|
disabled: l
|
|
6892
6892
|
}) }),
|
|
6893
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6893
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6894
6894
|
] });
|
|
6895
6895
|
}, t[11] = s, t[12] = l, t[13] = u, t[14] = o, t[15] = c, t[16] = d) : d = t[16];
|
|
6896
6896
|
let f;
|
|
6897
|
-
return t[17] !== r.control || t[18] !== i || t[19] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(
|
|
6897
|
+
return t[17] !== r.control || t[18] !== i || t[19] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6898
6898
|
control: r.control,
|
|
6899
6899
|
name: i,
|
|
6900
6900
|
render: d
|
|
6901
6901
|
}), t[17] = r.control, t[18] = i, t[19] = d, t[20] = f) : f = t[20], f;
|
|
6902
6902
|
}, ub = (e) => {
|
|
6903
6903
|
let t = (0, X.c)(10), { schema: n, form: r, path: i } = e, a;
|
|
6904
|
-
t[0] === n.description ? a = t[1] : (a =
|
|
6904
|
+
t[0] === n.description ? a = t[1] : (a = Oy.parse(n.description), t[0] = n.description, t[1] = a);
|
|
6905
6905
|
let { label: o, description: s, placeholder: c } = a, l;
|
|
6906
6906
|
t[2] !== s || t[3] !== o || t[4] !== c ? (l = (e) => {
|
|
6907
6907
|
let { field: t } = e;
|
|
6908
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
6909
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6910
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6911
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6908
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6909
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: o }),
|
|
6910
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: s }),
|
|
6911
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(tb, {
|
|
6912
6912
|
...t,
|
|
6913
6913
|
placeholder: c
|
|
6914
6914
|
}) }),
|
|
6915
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6915
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6916
6916
|
] });
|
|
6917
6917
|
}, t[2] = s, t[3] = o, t[4] = c, t[5] = l) : l = t[5];
|
|
6918
6918
|
let u;
|
|
6919
|
-
return t[6] !== r.control || t[7] !== i || t[8] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(
|
|
6919
|
+
return t[6] !== r.control || t[7] !== i || t[8] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6920
6920
|
control: r.control,
|
|
6921
6921
|
name: i,
|
|
6922
6922
|
render: l
|
|
6923
6923
|
}), t[6] = r.control, t[7] = i, t[8] = l, t[9] = u) : u = t[9], u;
|
|
6924
6924
|
}, db = (e) => {
|
|
6925
6925
|
let t = (0, X.c)(22), { schema: n, form: r, path: i, options: a, textTransform: o } = e, s;
|
|
6926
|
-
t[0] === n.description ? s = t[1] : (s =
|
|
6926
|
+
t[0] === n.description ? s = t[1] : (s = Oy.parse(n.description), t[0] = n.description, t[1] = s);
|
|
6927
6927
|
let { label: c, description: l, disabled: u, special: d } = s;
|
|
6928
6928
|
if (d === "radio_group") {
|
|
6929
6929
|
let e;
|
|
6930
6930
|
t[2] !== l || t[3] !== c || t[4] !== a || t[5] !== i ? (e = (e) => {
|
|
6931
6931
|
let { field: t } = e;
|
|
6932
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
6933
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6934
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6935
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6932
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6933
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: c }),
|
|
6934
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: l }),
|
|
6935
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(mn, {
|
|
6936
6936
|
className: "flex flex-row gap-2 pt-1 items-center",
|
|
6937
6937
|
value: t.value,
|
|
6938
6938
|
onValueChange: t.onChange,
|
|
@@ -6941,18 +6941,18 @@ var cb = (e) => {
|
|
|
6941
6941
|
children: [/* @__PURE__ */ (0, Y.jsx)(vn, {
|
|
6942
6942
|
value: e,
|
|
6943
6943
|
id: `${i}-${e}`
|
|
6944
|
-
}, e), /* @__PURE__ */ (0, Y.jsx)(
|
|
6944
|
+
}, e), /* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
6945
6945
|
className: "whitespace-pre",
|
|
6946
6946
|
htmlFor: `${i}-${e}`,
|
|
6947
6947
|
children: to.startCase(e)
|
|
6948
6948
|
})]
|
|
6949
6949
|
}, e))
|
|
6950
6950
|
}) }),
|
|
6951
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6951
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6952
6952
|
] });
|
|
6953
6953
|
}, t[2] = l, t[3] = c, t[4] = a, t[5] = i, t[6] = e) : e = t[6];
|
|
6954
6954
|
let n;
|
|
6955
|
-
return t[7] !== u || t[8] !== r.control || t[9] !== i || t[10] !== e ? (n = /* @__PURE__ */ (0, Y.jsx)(
|
|
6955
|
+
return t[7] !== u || t[8] !== r.control || t[9] !== i || t[10] !== e ? (n = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6956
6956
|
control: r.control,
|
|
6957
6957
|
name: i,
|
|
6958
6958
|
disabled: u,
|
|
@@ -6962,13 +6962,13 @@ var cb = (e) => {
|
|
|
6962
6962
|
let f;
|
|
6963
6963
|
t[12] !== l || t[13] !== c || t[14] !== a || t[15] !== o ? (f = (e) => {
|
|
6964
6964
|
let { field: t } = e;
|
|
6965
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
6966
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6965
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
6966
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
6967
6967
|
className: "whitespace-pre",
|
|
6968
6968
|
children: c
|
|
6969
6969
|
}),
|
|
6970
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6971
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6970
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: l }),
|
|
6971
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
6972
6972
|
"data-testid": "marimo-plugin-data-frames-select",
|
|
6973
6973
|
value: t.value,
|
|
6974
6974
|
onValueChange: t.onChange,
|
|
@@ -6984,11 +6984,11 @@ var cb = (e) => {
|
|
|
6984
6984
|
children: "No options"
|
|
6985
6985
|
})] }) })]
|
|
6986
6986
|
}) }),
|
|
6987
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
6987
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
6988
6988
|
] });
|
|
6989
6989
|
}, t[12] = l, t[13] = c, t[14] = a, t[15] = o, t[16] = f) : f = t[16];
|
|
6990
6990
|
let p;
|
|
6991
|
-
return t[17] !== u || t[18] !== r.control || t[19] !== i || t[20] !== f ? (p = /* @__PURE__ */ (0, Y.jsx)(
|
|
6991
|
+
return t[17] !== u || t[18] !== r.control || t[19] !== i || t[20] !== f ? (p = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
6992
6992
|
control: r.control,
|
|
6993
6993
|
name: i,
|
|
6994
6994
|
disabled: u,
|
|
@@ -6996,19 +6996,19 @@ var cb = (e) => {
|
|
|
6996
6996
|
}), t[17] = u, t[18] = r.control, t[19] = i, t[20] = f, t[21] = p) : p = t[21], p;
|
|
6997
6997
|
}, fb = (e) => {
|
|
6998
6998
|
let t = (0, X.c)(15), { schema: n, form: r, path: i, options: a, itemLabel: o, showSwitchable: s } = e, c;
|
|
6999
|
-
t[0] === n.description ? c = t[1] : (c =
|
|
6999
|
+
t[0] === n.description ? c = t[1] : (c = Oy.parse(n.description), t[0] = n.description, t[1] = c);
|
|
7000
7000
|
let { label: l, description: u, placeholder: d } = c, f;
|
|
7001
7001
|
t[2] !== o || t[3] !== d ? (f = d ?? (o ? `Select ${o?.toLowerCase()}` : void 0), t[2] = o, t[3] = d, t[4] = f) : f = t[4];
|
|
7002
7002
|
let p = f, m;
|
|
7003
7003
|
t[5] !== u || t[6] !== l || t[7] !== a || t[8] !== p || t[9] !== s ? (m = (e) => {
|
|
7004
7004
|
let { field: t } = e, n = nb(t.value);
|
|
7005
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
7006
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
7005
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
7006
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
7007
7007
|
className: "whitespace-pre",
|
|
7008
7008
|
children: l
|
|
7009
7009
|
}),
|
|
7010
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
7011
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
7010
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: u }),
|
|
7011
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: s ? /* @__PURE__ */ (0, Y.jsx)(eb, {
|
|
7012
7012
|
...t,
|
|
7013
7013
|
value: n,
|
|
7014
7014
|
options: a,
|
|
@@ -7024,11 +7024,11 @@ var cb = (e) => {
|
|
|
7024
7024
|
onValueChange: t.onChange,
|
|
7025
7025
|
children: a.map(gb)
|
|
7026
7026
|
}) }),
|
|
7027
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
7027
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
7028
7028
|
] });
|
|
7029
7029
|
}, t[5] = u, t[6] = l, t[7] = a, t[8] = p, t[9] = s, t[10] = m) : m = t[10];
|
|
7030
7030
|
let h;
|
|
7031
|
-
return t[11] !== r.control || t[12] !== i || t[13] !== m ? (h = /* @__PURE__ */ (0, Y.jsx)(
|
|
7031
|
+
return t[11] !== r.control || t[12] !== i || t[13] !== m ? (h = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
7032
7032
|
control: r.control,
|
|
7033
7033
|
name: i,
|
|
7034
7034
|
render: m
|
|
@@ -7205,18 +7205,18 @@ function Tb(e) {
|
|
|
7205
7205
|
return typeof e == "function";
|
|
7206
7206
|
}
|
|
7207
7207
|
function Eb(e) {
|
|
7208
|
-
return
|
|
7208
|
+
return ce(e) && (wb(e.render) || Tb(e.initialize));
|
|
7209
7209
|
}
|
|
7210
7210
|
function Db(e) {
|
|
7211
7211
|
return typeof e == "function" || Eb(e);
|
|
7212
7212
|
}
|
|
7213
7213
|
function Ob(e) {
|
|
7214
|
-
return
|
|
7214
|
+
return ce(e) && Db(e.default);
|
|
7215
7215
|
}
|
|
7216
7216
|
var kb = /* @__PURE__ */ new Set(), Ab = /* @__PURE__ */ new WeakMap();
|
|
7217
7217
|
function jb(e, t) {
|
|
7218
7218
|
if (Ob(e)) return e.default;
|
|
7219
|
-
if (!
|
|
7219
|
+
if (!ce(e) || e.default !== void 0) return null;
|
|
7220
7220
|
let n = wb(e.render) ? e.render : void 0, r = Tb(e.initialize) ? e.initialize : void 0;
|
|
7221
7221
|
if (n === void 0 && r === void 0) return null;
|
|
7222
7222
|
let i = Ab.get(e);
|
|
@@ -7229,8 +7229,8 @@ function jb(e, t) {
|
|
|
7229
7229
|
return Ab.set(e, a), a;
|
|
7230
7230
|
}
|
|
7231
7231
|
function Mb(e, t) {
|
|
7232
|
-
let n = "https://anywidget.dev/en/afm/", r =
|
|
7233
|
-
if (
|
|
7232
|
+
let n = "https://anywidget.dev/en/afm/", r = ce(e) && ge(e, "render"), i = ce(e) && ge(e, "initialize");
|
|
7233
|
+
if (ce(e) && e.default !== void 0) return /* @__PURE__ */ Error(`Anywidget module at ${t} has an invalid default export. Expected a factory function or an object with \`render\` or \`initialize\`. See ${n}`);
|
|
7234
7234
|
if (r || i) {
|
|
7235
7235
|
let e = [r ? "`render`" : null, i ? "`initialize`" : null].filter(Boolean).join(" and "), a = [r ? "render" : null, i ? "initialize" : null].filter((e) => e !== null), o = `export default { ${a.join(", ")} }`, s = a.length === 1 ? `export function ${a[0]}` : "named export function ...";
|
|
7236
7236
|
return /* @__PURE__ */ Error(`Anywidget module at ${t} uses named exports (${e}). Per the AFM spec, use a default export instead: \`${o}\` (not \`${s}\`). See ${n}`);
|
|
@@ -7435,7 +7435,7 @@ var Gb = class e {
|
|
|
7435
7435
|
#r;
|
|
7436
7436
|
#i;
|
|
7437
7437
|
#a = new AbortController();
|
|
7438
|
-
#o = new
|
|
7438
|
+
#o = new Ri();
|
|
7439
7439
|
#s = /* @__PURE__ */ new Set();
|
|
7440
7440
|
#c = /* @__PURE__ */ new Map();
|
|
7441
7441
|
#l;
|
|
@@ -7651,7 +7651,7 @@ function Qb(e) {
|
|
|
7651
7651
|
for (let a of t) {
|
|
7652
7652
|
let t = As(e, a);
|
|
7653
7653
|
if (t instanceof DataView) {
|
|
7654
|
-
let e =
|
|
7654
|
+
let e = R(t);
|
|
7655
7655
|
r.push(e), i.push(a), co(n, a, e);
|
|
7656
7656
|
}
|
|
7657
7657
|
}
|
|
@@ -7746,7 +7746,7 @@ async function nx(e, t) {
|
|
|
7746
7746
|
}
|
|
7747
7747
|
e.createModel(n, (e) => {
|
|
7748
7748
|
let t = new sc(1), r = (r) => t.run(async () => {
|
|
7749
|
-
e.aborted ? c.debug(`[Model] ${r.message.method} suppressed for model=${n} (signal aborted)`) : await
|
|
7749
|
+
e.aborted ? c.debug(`[Model] ${r.message.method} suppressed for model=${n} (signal aborted)`) : await $i().sendModelValue(r);
|
|
7750
7750
|
}), i = Ws() ? {
|
|
7751
7751
|
sendUpdate: async () => void 0,
|
|
7752
7752
|
sendCustomMessage: async () => void 0
|
|
@@ -7770,7 +7770,7 @@ async function nx(e, t) {
|
|
|
7770
7770
|
method: "custom",
|
|
7771
7771
|
content: e
|
|
7772
7772
|
},
|
|
7773
|
-
buffers: t.map(
|
|
7773
|
+
buffers: t.map(R)
|
|
7774
7774
|
});
|
|
7775
7775
|
}
|
|
7776
7776
|
};
|
|
@@ -7801,7 +7801,7 @@ async function nx(e, t) {
|
|
|
7801
7801
|
default: ro(r);
|
|
7802
7802
|
}
|
|
7803
7803
|
}
|
|
7804
|
-
|
|
7804
|
+
Oe(tx, "WIDGET_REGISTRY");
|
|
7805
7805
|
//#endregion
|
|
7806
7806
|
//#region src/components/ui/navigation.tsx
|
|
7807
7807
|
var rx = J.forwardRef((e, t) => {
|
|
@@ -7852,7 +7852,7 @@ var ox = cf, sx = u("group inline-flex rounded-md bg-background px-4 py-2 text-l
|
|
|
7852
7852
|
let o;
|
|
7853
7853
|
n[4] === i ? o = n[5] : (o = l(sx(), "group", i), n[4] = i, n[5] = o);
|
|
7854
7854
|
let s;
|
|
7855
|
-
n[6] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsx)(
|
|
7855
|
+
n[6] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsx)(le, {
|
|
7856
7856
|
className: "relative top-px ml-1 h-3 w-3 transition duration-300 group-data-[state=open]:rotate-180",
|
|
7857
7857
|
"aria-hidden": "true"
|
|
7858
7858
|
}), n[6] = s) : s = n[6];
|
|
@@ -7959,7 +7959,7 @@ var gx = (e) => {
|
|
|
7959
7959
|
let t = (0, X.c)(23), { item: n, preserveQueryParams: r, target: i } = e, a = J.useRef(null), [o, s] = J.useState(!1), c;
|
|
7960
7960
|
t[0] === Symbol.for("react.memo_cache_sentinel") ? (c = (e) => s(e !== ""), t[0] = c) : c = t[0];
|
|
7961
7961
|
let l;
|
|
7962
|
-
t[1] === n.label ? l = t[2] : (l =
|
|
7962
|
+
t[1] === n.label ? l = t[2] : (l = I({ html: n.label }), t[1] = n.label, t[2] = l);
|
|
7963
7963
|
let u;
|
|
7964
7964
|
t[3] === l ? u = t[4] : (u = /* @__PURE__ */ (0, Y.jsx)(cx, {
|
|
7965
7965
|
ref: a,
|
|
@@ -7972,7 +7972,7 @@ var gx = (e) => {
|
|
|
7972
7972
|
label: e.label,
|
|
7973
7973
|
href: r(e.href),
|
|
7974
7974
|
target: i(e.href),
|
|
7975
|
-
children: e.description &&
|
|
7975
|
+
children: e.description && I({ html: e.description })
|
|
7976
7976
|
}, e.label), t[9] = r, t[10] = i, t[11] = e) : e = t[11], d = n.items.map(e), t[5] = n.items, t[6] = r, t[7] = i, t[8] = d;
|
|
7977
7977
|
} else d = t[8];
|
|
7978
7978
|
let f;
|
|
@@ -8066,7 +8066,7 @@ var gx = (e) => {
|
|
|
8066
8066
|
target: a
|
|
8067
8067
|
}, e.label) : /* @__PURE__ */ (0, Y.jsxs)(ox, { children: [/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
8068
8068
|
className: "inline-flex h-9 w-max items-center justify-center rounded-md px-4 py-2 text-base font-medium text-muted-foreground/80 tracking-wide font-semibold",
|
|
8069
|
-
children:
|
|
8069
|
+
children: I({ html: e.label })
|
|
8070
8070
|
}), /* @__PURE__ */ (0, Y.jsx)(ax, {
|
|
8071
8071
|
className: "ml-4 auto-collapse-nav",
|
|
8072
8072
|
orientation: r,
|
|
@@ -8074,13 +8074,13 @@ var gx = (e) => {
|
|
|
8074
8074
|
href: o(e.href),
|
|
8075
8075
|
target: a(e.href),
|
|
8076
8076
|
className: sx({ orientation: r }),
|
|
8077
|
-
children:
|
|
8077
|
+
children: I({ html: e.label })
|
|
8078
8078
|
}, e.label), e.description) }, e.label))
|
|
8079
8079
|
})] }, e.label) : /* @__PURE__ */ (0, Y.jsx)(ox, { children: /* @__PURE__ */ (0, Y.jsx)(ux, {
|
|
8080
8080
|
href: o(e.href),
|
|
8081
8081
|
target: a(e.href),
|
|
8082
8082
|
className: sx({ orientation: r }),
|
|
8083
|
-
children:
|
|
8083
|
+
children: I({ html: e.label })
|
|
8084
8084
|
}) }, e.label), t[0] = r, t[1] = s);
|
|
8085
8085
|
let c = s, l;
|
|
8086
8086
|
if (t[2] !== n || t[3] !== c) {
|
|
@@ -8104,7 +8104,7 @@ var gx = (e) => {
|
|
|
8104
8104
|
let s;
|
|
8105
8105
|
n[5] === i ? s = n[6] : (s = l("block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-hidden transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground", i), n[5] = i, n[6] = s);
|
|
8106
8106
|
let c;
|
|
8107
|
-
n[7] === a ? c = n[8] : (c =
|
|
8107
|
+
n[7] === a ? c = n[8] : (c = I({ html: a }), n[7] = a, n[8] = c);
|
|
8108
8108
|
let u;
|
|
8109
8109
|
n[9] === c ? u = n[10] : (u = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
8110
8110
|
className: "text-base font-medium leading-none",
|
|
@@ -8130,7 +8130,7 @@ Sx.displayName = "ListItem";
|
|
|
8130
8130
|
function Cx(e, t) {
|
|
8131
8131
|
return t ? /* @__PURE__ */ (0, Y.jsx)(Be, {
|
|
8132
8132
|
delayDuration: 200,
|
|
8133
|
-
content:
|
|
8133
|
+
content: I({ html: t }),
|
|
8134
8134
|
children: e
|
|
8135
8135
|
}) : e;
|
|
8136
8136
|
}
|
|
@@ -8139,7 +8139,7 @@ function wx(e) {
|
|
|
8139
8139
|
}
|
|
8140
8140
|
function Tx(e) {
|
|
8141
8141
|
let t = new URL(globalThis.location.href);
|
|
8142
|
-
return
|
|
8142
|
+
return Bi({
|
|
8143
8143
|
href: e,
|
|
8144
8144
|
queryParams: t.search,
|
|
8145
8145
|
keys: [Qo.filePath]
|
|
@@ -8173,7 +8173,7 @@ var Dx = class e {
|
|
|
8173
8173
|
let n = this.entries.get(e);
|
|
8174
8174
|
n === void 0 ? this.entries.set(e, {
|
|
8175
8175
|
objectId: e,
|
|
8176
|
-
value:
|
|
8176
|
+
value: ca(t, this),
|
|
8177
8177
|
elements: /* @__PURE__ */ new Set([t])
|
|
8178
8178
|
}) : n.elements.add(t);
|
|
8179
8179
|
}
|
|
@@ -8230,8 +8230,8 @@ var Dx = class e {
|
|
|
8230
8230
|
detail: { objectId: t }
|
|
8231
8231
|
})));
|
|
8232
8232
|
}
|
|
8233
|
-
}, Ox = Dx.INSTANCE, kx = new
|
|
8234
|
-
await
|
|
8233
|
+
}, Ox = Dx.INSTANCE, kx = new be("function-call-result", async (e, t) => {
|
|
8234
|
+
await $i().sendFunctionRequest({
|
|
8235
8235
|
functionCallId: e,
|
|
8236
8236
|
...t
|
|
8237
8237
|
});
|
|
@@ -11809,10 +11809,10 @@ var aD = 3, oD = 150;
|
|
|
11809
11809
|
function sD({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
11810
11810
|
let [o, s] = (0, J.useState)(n), [l, u] = (0, J.useState)(r), d = (0, J.useRef)(l), { theme: f } = Go(), p = (e) => {
|
|
11811
11811
|
d.current = e, u(e);
|
|
11812
|
-
}, [m, g] = (0, J.useState)(() => t.validator.safeParse(
|
|
11812
|
+
}, [m, g] = (0, J.useState)(() => t.validator.safeParse(Xi(e))), [_, v] = (0, J.useState)(0);
|
|
11813
11813
|
(0, J.useImperativeHandle)(i, () => ({
|
|
11814
11814
|
reset: () => {
|
|
11815
|
-
p(r()), g(t.validator.safeParse(
|
|
11815
|
+
p(r()), g(t.validator.safeParse(Xi(e))), v((e) => e + 1);
|
|
11816
11816
|
},
|
|
11817
11817
|
setChildren: (e) => {
|
|
11818
11818
|
s(e);
|
|
@@ -11821,7 +11821,7 @@ function sD({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
11821
11821
|
t.detail.element === e && p(t.detail.value);
|
|
11822
11822
|
}), (0, J.useEffect)(() => {
|
|
11823
11823
|
let n = new MutationObserver((n) => {
|
|
11824
|
-
n.some((e) => e.type === "attributes" && e.attributeName?.startsWith("data-")) && g(t.validator.safeParse(
|
|
11824
|
+
n.some((e) => e.type === "attributes" && e.attributeName?.startsWith("data-")) && g(t.validator.safeParse(Xi(e)));
|
|
11825
11825
|
});
|
|
11826
11826
|
return n.observe(e, { attributes: !0 }), () => {
|
|
11827
11827
|
n.disconnect();
|
|
@@ -11837,9 +11837,9 @@ function sD({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
11837
11837
|
let { input: t, output: a } = i;
|
|
11838
11838
|
n[r] = async (...n) => {
|
|
11839
11839
|
Ps(n.length <= 1, `Plugin functions only supports a single argument. Called ${r}`);
|
|
11840
|
-
let i = Ws(), o =
|
|
11840
|
+
let i = Ws(), o = Gi.findElementThroughShadowDOMs(e)?.id, s = o ? Gi.parse(o) : null;
|
|
11841
11841
|
if (s && !i) {
|
|
11842
|
-
if (
|
|
11842
|
+
if (aa(ma(fo.get(ia), s))) throw new Es();
|
|
11843
11843
|
} else c.warn(`Cell ID ${s} cannot be found`);
|
|
11844
11844
|
let l = mD(t, n[0]);
|
|
11845
11845
|
for (let t = 0;; t++) {
|
|
@@ -11878,7 +11878,7 @@ function sD({ hostElement: e, plugin: t, children: n, getInitialValue: r }, i) {
|
|
|
11878
11878
|
functions: b
|
|
11879
11879
|
}) })
|
|
11880
11880
|
})
|
|
11881
|
-
}) }) : rD(m.error, Ns.mapValues(e.dataset, (e) => typeof e == "string" ?
|
|
11881
|
+
}) }) : rD(m.error, Ns.mapValues(e.dataset, (e) => typeof e == "string" ? la(e) : e));
|
|
11882
11882
|
}
|
|
11883
11883
|
var cD = J.forwardRef(sD), lD = /* @__PURE__ */ new Map(), uD = "__custom_marimo_element__";
|
|
11884
11884
|
function dD(e) {
|
|
@@ -11894,7 +11894,7 @@ function dD(e) {
|
|
|
11894
11894
|
});
|
|
11895
11895
|
}
|
|
11896
11896
|
connectedCallback() {
|
|
11897
|
-
this.isLightDOMChildOfMarimoElement() || (this.mounted || (Ps(this.shadowRoot, "Shadow root should exist"), this.root && this.root.unmount(), this.root =
|
|
11897
|
+
this.isLightDOMChildOfMarimoElement() || (this.mounted || (Ps(this.shadowRoot, "Shadow root should exist"), this.root && this.root.unmount(), this.root = N_.createRoot(this.shadowRoot), this.mountReactComponent()), this.observer.observe(this, {
|
|
11898
11898
|
attributes: !0,
|
|
11899
11899
|
childList: !0,
|
|
11900
11900
|
subtree: !0,
|
|
@@ -11913,16 +11913,16 @@ function dD(e) {
|
|
|
11913
11913
|
return !1;
|
|
11914
11914
|
}
|
|
11915
11915
|
reset() {
|
|
11916
|
-
this.dispatchEvent(La(
|
|
11916
|
+
this.dispatchEvent(La(la(this.dataset.initialValue), this)), this.rerender();
|
|
11917
11917
|
}
|
|
11918
11918
|
rerender() {
|
|
11919
11919
|
this.pluginRef.current?.reset();
|
|
11920
11920
|
}
|
|
11921
11921
|
getChildren() {
|
|
11922
|
-
return this.children.length === 0 ? null : this.children.length === 1 ?
|
|
11922
|
+
return this.children.length === 0 ? null : this.children.length === 1 ? I({
|
|
11923
11923
|
html: this.innerHTML,
|
|
11924
11924
|
alwaysSanitizeHtml: !1
|
|
11925
|
-
}) : Array.from(this.children).map((e, t) => /* @__PURE__ */ (0, Y.jsx)(J.Fragment, { children:
|
|
11925
|
+
}) : Array.from(this.children).map((e, t) => /* @__PURE__ */ (0, Y.jsx)(J.Fragment, { children: I({
|
|
11926
11926
|
html: e.outerHTML,
|
|
11927
11927
|
alwaysSanitizeHtml: !1
|
|
11928
11928
|
}) }, t));
|
|
@@ -11934,7 +11934,7 @@ function dD(e) {
|
|
|
11934
11934
|
hostElement: this,
|
|
11935
11935
|
plugin: e,
|
|
11936
11936
|
ref: this.pluginRef,
|
|
11937
|
-
getInitialValue: () =>
|
|
11937
|
+
getInitialValue: () => ca(this, Dx.INSTANCE),
|
|
11938
11938
|
children: this.getChildren()
|
|
11939
11939
|
}) })
|
|
11940
11940
|
}));
|
|
@@ -12005,7 +12005,7 @@ function gD() {
|
|
|
12005
12005
|
inputListener = a.NOOP;
|
|
12006
12006
|
init() {
|
|
12007
12007
|
if (this.initialized) return;
|
|
12008
|
-
let e =
|
|
12008
|
+
let e = ta.parseOrThrow(this);
|
|
12009
12009
|
this.inputListener = (n) => {
|
|
12010
12010
|
e !== null && n.detail.element === this.firstElementChild && (Ox.has(e) || Ox.registerInstance(e, t), Ox.broadcastValueUpdate(t, e, n.detail.value));
|
|
12011
12011
|
};
|
|
@@ -12014,14 +12014,14 @@ function gD() {
|
|
|
12014
12014
|
}
|
|
12015
12015
|
connectedCallback() {
|
|
12016
12016
|
if (this.init(), this.initialized) {
|
|
12017
|
-
let e =
|
|
12017
|
+
let e = ta.parseOrThrow(this), t = this.firstElementChild;
|
|
12018
12018
|
Ox.registerInstance(e, t), document.addEventListener(Ra.TYPE, this.inputListener);
|
|
12019
12019
|
}
|
|
12020
12020
|
}
|
|
12021
12021
|
disconnectedCallback() {
|
|
12022
12022
|
if (this.initialized) {
|
|
12023
12023
|
document.removeEventListener(Ra.TYPE, this.inputListener);
|
|
12024
|
-
let e =
|
|
12024
|
+
let e = ta.parseOrThrow(this);
|
|
12025
12025
|
Ox.removeInstance(e, this.firstElementChild);
|
|
12026
12026
|
}
|
|
12027
12027
|
}
|
|
@@ -12030,7 +12030,7 @@ function gD() {
|
|
|
12030
12030
|
pD(e) ? e.reset() : c.error("[marimo-ui-element] first child must have a reset method");
|
|
12031
12031
|
}
|
|
12032
12032
|
static get observedAttributes() {
|
|
12033
|
-
return [
|
|
12033
|
+
return [Qi];
|
|
12034
12034
|
}
|
|
12035
12035
|
attributeChangedCallback(e, t, n) {
|
|
12036
12036
|
if (this.initialized && e === "random-id" && t !== n) {
|
|
@@ -12044,9 +12044,9 @@ function gD() {
|
|
|
12044
12044
|
}
|
|
12045
12045
|
function _D(e) {
|
|
12046
12046
|
if (!e) return null;
|
|
12047
|
-
if (e.nodeName === hD) return
|
|
12047
|
+
if (e.nodeName === hD) return ta.parseOrThrow(e);
|
|
12048
12048
|
let t = e.parentElement;
|
|
12049
|
-
return t?.nodeName === hD ?
|
|
12049
|
+
return t?.nodeName === hD ? ta.parseOrThrow(t) : null;
|
|
12050
12050
|
}
|
|
12051
12051
|
function vD(e) {
|
|
12052
12052
|
return e.tagName === hD;
|
|
@@ -12066,7 +12066,7 @@ var yD = To({ isOpen: !0 }, (e, t) => {
|
|
|
12066
12066
|
};
|
|
12067
12067
|
default: return e;
|
|
12068
12068
|
}
|
|
12069
|
-
}), bD = (0,
|
|
12069
|
+
}), bD = (0, M_.init)({ length: 6 });
|
|
12070
12070
|
function xD() {
|
|
12071
12071
|
Nx("marimo-sidebar", class extends HTMLElement {
|
|
12072
12072
|
observer;
|
|
@@ -12119,7 +12119,7 @@ function xD() {
|
|
|
12119
12119
|
}
|
|
12120
12120
|
}
|
|
12121
12121
|
getContents() {
|
|
12122
|
-
return
|
|
12122
|
+
return I({ html: this.innerHTML });
|
|
12123
12123
|
}
|
|
12124
12124
|
});
|
|
12125
12125
|
}
|
|
@@ -12386,7 +12386,7 @@ var MD = H([
|
|
|
12386
12386
|
t || (n.stopPropagation(), e.setValue((e) => e + 1));
|
|
12387
12387
|
},
|
|
12388
12388
|
type: "submit",
|
|
12389
|
-
children:
|
|
12389
|
+
children: I({ html: r })
|
|
12390
12390
|
}), c = o && !a ? /* @__PURE__ */ (0, Y.jsx)(TD, { shortcut: o }) : a;
|
|
12391
12391
|
return c ? /* @__PURE__ */ (0, Y.jsx)(Be, {
|
|
12392
12392
|
content: c,
|
|
@@ -12426,7 +12426,7 @@ var FD = (e) => {
|
|
|
12426
12426
|
let f;
|
|
12427
12427
|
t[8] === o ? f = t[9] : (f = l("font-prose", o), t[8] = o, t[9] = f);
|
|
12428
12428
|
let p;
|
|
12429
|
-
t[10] === n ? p = t[11] : (p =
|
|
12429
|
+
t[10] === n ? p = t[11] : (p = I({ html: n }), t[10] = n, t[11] = p);
|
|
12430
12430
|
let m;
|
|
12431
12431
|
t[12] !== u || t[13] !== s || t[14] !== f || t[15] !== p ? (m = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
12432
12432
|
part: "label",
|
|
@@ -12461,7 +12461,7 @@ var FD = (e) => {
|
|
|
12461
12461
|
e !== "indeterminate" && r(e);
|
|
12462
12462
|
}, t[0] = r, t[1] = a);
|
|
12463
12463
|
let o = a, s = (0, J.useId)(), c;
|
|
12464
|
-
t[2] !== i.disabled || t[3] !== s || t[4] !== o || t[5] !== n ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
12464
|
+
t[2] !== i.disabled || t[3] !== s || t[4] !== o || t[5] !== n ? (c = /* @__PURE__ */ (0, Y.jsx)(Wi, {
|
|
12465
12465
|
"data-testid": "marimo-plugin-checkbox",
|
|
12466
12466
|
checked: n,
|
|
12467
12467
|
onCheckedChange: o,
|
|
@@ -12531,7 +12531,7 @@ var FD = (e) => {
|
|
|
12531
12531
|
t[20] === Symbol.for("react.memo_cache_sentinel") ? (n = [], t[20] = n) : n = t[20], x = n;
|
|
12532
12532
|
}
|
|
12533
12533
|
let S = x, C = `cm *:outline-hidden border rounded overflow-hidden ${r}`, w = r === "dark" ? "dark" : "light", T = !e.disabled, E;
|
|
12534
|
-
t[21] !== S || t[22] !== g || t[23] !== o || t[24] !== a || t[25] !== i || t[26] !== e.language || t[27] !== e.placeholder || t[28] !== e.showCopyButton || t[29] !== C || t[30] !== w || t[31] !== T ? (E = /* @__PURE__ */ (0, Y.jsx)(
|
|
12534
|
+
t[21] !== S || t[22] !== g || t[23] !== o || t[24] !== a || t[25] !== i || t[26] !== e.language || t[27] !== e.placeholder || t[28] !== e.showCopyButton || t[29] !== C || t[30] !== w || t[31] !== T ? (E = /* @__PURE__ */ (0, Y.jsx)(he, {
|
|
12535
12535
|
className: C,
|
|
12536
12536
|
theme: w,
|
|
12537
12537
|
minHeight: i,
|
|
@@ -12558,7 +12558,7 @@ var FD = (e) => {
|
|
|
12558
12558
|
output: t
|
|
12559
12559
|
};
|
|
12560
12560
|
} };
|
|
12561
|
-
} }, VD = J.lazy(() => import("./chat-ui-
|
|
12561
|
+
} }, VD = J.lazy(() => import("./chat-ui-CWmSnBs8.js").then((e) => ({ default: e.Chatbot }))), HD = V(G({
|
|
12562
12562
|
id: K(),
|
|
12563
12563
|
role: H([
|
|
12564
12564
|
"system",
|
|
@@ -12682,25 +12682,25 @@ var QD = [
|
|
|
12682
12682
|
"min",
|
|
12683
12683
|
"max"
|
|
12684
12684
|
], tO = {
|
|
12685
|
-
number: zp().describe(
|
|
12686
|
-
string: K().min(1).describe(
|
|
12687
|
-
stringColumnValues: K().min(1).describe(
|
|
12685
|
+
number: zp().describe(Oy.of({ label: "Value" })),
|
|
12686
|
+
string: K().min(1).describe(Oy.of({ label: "Value" })),
|
|
12687
|
+
stringColumnValues: K().min(1).describe(Oy.of({
|
|
12688
12688
|
label: "Value",
|
|
12689
12689
|
special: "column_values"
|
|
12690
12690
|
})),
|
|
12691
|
-
stringMultiColumnValues: V(K()).min(1).describe(
|
|
12691
|
+
stringMultiColumnValues: V(K()).min(1).describe(Oy.of({
|
|
12692
12692
|
label: "Value",
|
|
12693
12693
|
special: "column_values"
|
|
12694
12694
|
})),
|
|
12695
|
-
date: Bp().describe(
|
|
12695
|
+
date: Bp().describe(Oy.of({
|
|
12696
12696
|
label: "Value",
|
|
12697
12697
|
special: "date"
|
|
12698
12698
|
})),
|
|
12699
|
-
datetime: Bp().describe(
|
|
12699
|
+
datetime: Bp().describe(Oy.of({
|
|
12700
12700
|
label: "Value",
|
|
12701
12701
|
special: "datetime"
|
|
12702
12702
|
})),
|
|
12703
|
-
time: K().regex(/^\d{2}:\d{2}(:\d{2})?$/).describe(
|
|
12703
|
+
time: K().regex(/^\d{2}:\d{2}(:\d{2})?$/).describe(Oy.of({
|
|
12704
12704
|
label: "Value",
|
|
12705
12705
|
special: "time"
|
|
12706
12706
|
}))
|
|
@@ -12780,42 +12780,42 @@ function pO(e, t) {
|
|
|
12780
12780
|
].flat();
|
|
12781
12781
|
return n.length === 0 || n.some((e) => e.safeParse(t).success);
|
|
12782
12782
|
}
|
|
12783
|
-
var mO = (e, t) => e[t] ? e[t] : [], hO = V(Ko([Rp(), Ko([H(QD).catch("unknown"), K()])])), gO = K().min(1, "Required").or(W()).transform((e) => e).describe(
|
|
12783
|
+
var mO = (e, t) => e[t] ? e[t] : [], hO = V(Ko([Rp(), Ko([H(QD).catch("unknown"), K()])])), gO = K().min(1, "Required").or(W()).transform((e) => e).describe(Oy.of({
|
|
12784
12784
|
label: "Column",
|
|
12785
12785
|
special: "column_id"
|
|
12786
|
-
})), _O = V(gO.describe(
|
|
12786
|
+
})), _O = V(gO.describe(Oy.of({ special: "column_id" }))).min(1, "At least one column is required").default([]).describe(Oy.of({
|
|
12787
12787
|
label: "Columns",
|
|
12788
12788
|
minLength: 1
|
|
12789
12789
|
})), vO = G({
|
|
12790
12790
|
type: hs("column_conversion"),
|
|
12791
12791
|
column_id: gO,
|
|
12792
|
-
data_type: H($D).describe(
|
|
12793
|
-
errors: H(["ignore", "raise"]).default("ignore").describe(
|
|
12792
|
+
data_type: H($D).describe(Oy.of({ label: "Data type (numpy)" })).default("bool"),
|
|
12793
|
+
errors: H(["ignore", "raise"]).default("ignore").describe(Oy.of({
|
|
12794
12794
|
label: "Handle errors",
|
|
12795
12795
|
special: "radio_group"
|
|
12796
12796
|
}))
|
|
12797
|
-
}).describe(
|
|
12797
|
+
}).describe(Oy.of({})), yO = G({
|
|
12798
12798
|
type: hs("rename_column"),
|
|
12799
12799
|
column_id: gO,
|
|
12800
|
-
new_column_id: K().min(1, "Required").transform((e) => e).describe(
|
|
12800
|
+
new_column_id: K().min(1, "Required").transform((e) => e).describe(Oy.of({
|
|
12801
12801
|
label: "New column name",
|
|
12802
12802
|
minLength: 1
|
|
12803
12803
|
}))
|
|
12804
12804
|
}), bO = G({
|
|
12805
12805
|
type: hs("sort_column"),
|
|
12806
12806
|
column_id: gO,
|
|
12807
|
-
ascending: U().describe(
|
|
12808
|
-
na_position: H(["first", "last"]).describe(
|
|
12807
|
+
ascending: U().describe(Oy.of({ label: "Ascending" })).default(!0),
|
|
12808
|
+
na_position: H(["first", "last"]).describe(Oy.of({
|
|
12809
12809
|
label: "N/A position",
|
|
12810
12810
|
special: "radio_group"
|
|
12811
12811
|
})).default("last")
|
|
12812
12812
|
}), xO = G({
|
|
12813
12813
|
column_id: gO,
|
|
12814
|
-
operator: H(Object.keys(lO)).describe(
|
|
12814
|
+
operator: H(Object.keys(lO)).describe(Oy.of({ label: " " })),
|
|
12815
12815
|
type: hs("condition").default("condition"),
|
|
12816
|
-
value: ds().optional().describe(
|
|
12816
|
+
value: ds().optional().describe(Oy.of({ label: "Value" })),
|
|
12817
12817
|
negate: U().default(!1)
|
|
12818
|
-
}).describe(
|
|
12818
|
+
}).describe(Oy.of({
|
|
12819
12819
|
direction: "row",
|
|
12820
12820
|
special: "column_filter"
|
|
12821
12821
|
})), SO = qo(() => G({
|
|
@@ -12825,8 +12825,8 @@ var mO = (e, t) => e[t] ? e[t] : [], hO = V(Ko([Rp(), Ko([H(QD).catch("unknown")
|
|
|
12825
12825
|
negate: U().default(!1)
|
|
12826
12826
|
})), CO = G({
|
|
12827
12827
|
type: hs("filter_rows"),
|
|
12828
|
-
operation: H(["keep_rows", "remove_rows"]).default("keep_rows").describe(
|
|
12829
|
-
where: V(xO).min(1).describe(
|
|
12828
|
+
operation: H(["keep_rows", "remove_rows"]).default("keep_rows").describe(Oy.of({ special: "radio_group" })),
|
|
12829
|
+
where: V(xO).min(1).describe(Oy.of({
|
|
12830
12830
|
label: "Value",
|
|
12831
12831
|
minLength: 1
|
|
12832
12832
|
})).default(() => [{
|
|
@@ -12838,34 +12838,34 @@ var mO = (e, t) => e[t] ? e[t] : [], hO = V(Ko([Rp(), Ko([H(QD).catch("unknown")
|
|
|
12838
12838
|
}]).transform((e) => e.filter((e) => pO(e.operator, e.value)))
|
|
12839
12839
|
}), wO = G({
|
|
12840
12840
|
type: hs("group_by"),
|
|
12841
|
-
column_ids: V(gO.describe(
|
|
12841
|
+
column_ids: V(gO.describe(Oy.of({ special: "column_id" }))).default([]).describe(Oy.of({
|
|
12842
12842
|
label: "Group by columns",
|
|
12843
12843
|
minLength: 1
|
|
12844
12844
|
})),
|
|
12845
|
-
aggregation_column_ids: V(gO.describe(
|
|
12846
|
-
aggregation: H(eO).default("count").describe(
|
|
12847
|
-
drop_na: U().default(!1).describe(
|
|
12848
|
-
}).describe(
|
|
12845
|
+
aggregation_column_ids: V(gO.describe(Oy.of({ special: "column_id" }))).default([]).describe(Oy.of({ label: "Aggregate on columns" })),
|
|
12846
|
+
aggregation: H(eO).default("count").describe(Oy.of({ label: "Aggregation" })),
|
|
12847
|
+
drop_na: U().default(!1).describe(Oy.of({ label: "Drop N/A" }))
|
|
12848
|
+
}).describe(Oy.of({})), TO = G({
|
|
12849
12849
|
type: hs("aggregate"),
|
|
12850
12850
|
column_ids: _O,
|
|
12851
|
-
aggregations: V(H(eO)).min(1, "At least one aggregation is required").default(["count"]).describe(
|
|
12851
|
+
aggregations: V(H(eO)).min(1, "At least one aggregation is required").default(["count"]).describe(Oy.of({
|
|
12852
12852
|
label: "Aggregations",
|
|
12853
12853
|
minLength: 1
|
|
12854
12854
|
}))
|
|
12855
|
-
}).describe(
|
|
12855
|
+
}).describe(Oy.of({ direction: "row" })), EO = G({
|
|
12856
12856
|
type: hs("select_columns"),
|
|
12857
12857
|
column_ids: _O
|
|
12858
12858
|
}), DO = G({
|
|
12859
12859
|
type: hs("sample_rows"),
|
|
12860
|
-
n: W().positive().describe(
|
|
12861
|
-
seed: W().default(() =>
|
|
12860
|
+
n: W().positive().describe(Oy.of({ label: "Number of rows" })),
|
|
12861
|
+
seed: W().default(() => ky()).describe(Oy.of({
|
|
12862
12862
|
label: "Re-sample",
|
|
12863
12863
|
special: "random_number_button"
|
|
12864
12864
|
})),
|
|
12865
|
-
replace: U().default(!1).describe(
|
|
12865
|
+
replace: U().default(!1).describe(Oy.of({ label: "Sample with replacement" }))
|
|
12866
12866
|
}), OO = G({
|
|
12867
12867
|
type: hs("shuffle_rows"),
|
|
12868
|
-
seed: W().default(() =>
|
|
12868
|
+
seed: W().default(() => ky()).describe(Oy.of({
|
|
12869
12869
|
label: "Re-shuffle",
|
|
12870
12870
|
special: "random_number_button"
|
|
12871
12871
|
}))
|
|
@@ -12883,17 +12883,17 @@ var mO = (e, t) => e[t] ? e[t] : [], hO = V(Ko([Rp(), Ko([H(QD).catch("unknown")
|
|
|
12883
12883
|
"last",
|
|
12884
12884
|
"none",
|
|
12885
12885
|
"any"
|
|
12886
|
-
]).default("first").describe(
|
|
12887
|
-
}).describe(
|
|
12886
|
+
]).default("first").describe(Oy.of({ label: "Keep" }))
|
|
12887
|
+
}).describe(Oy.of({ direction: "row" })), MO = G({
|
|
12888
12888
|
type: hs("pivot"),
|
|
12889
12889
|
column_ids: _O,
|
|
12890
|
-
index_column_ids: V(gO.describe(
|
|
12891
|
-
value_column_ids: V(gO.describe(
|
|
12890
|
+
index_column_ids: V(gO.describe(Oy.of({ special: "column_id" }))).default([]).describe(Oy.of({ label: "Rows" })),
|
|
12891
|
+
value_column_ids: V(gO.describe(Oy.of({ special: "column_id" }))).default([]).describe(Oy.of({
|
|
12892
12892
|
label: "Values",
|
|
12893
12893
|
minLength: 1
|
|
12894
12894
|
})),
|
|
12895
|
-
aggregation: H(eO).default("sum").describe(
|
|
12896
|
-
}).describe(
|
|
12895
|
+
aggregation: H(eO).default("sum").describe(Oy.of({ label: "Aggregation" }))
|
|
12896
|
+
}).describe(Oy.of({})), NO = Xo([
|
|
12897
12897
|
CO,
|
|
12898
12898
|
EO,
|
|
12899
12899
|
yO,
|
|
@@ -13027,7 +13027,7 @@ function BO(e, t) {
|
|
|
13027
13027
|
}
|
|
13028
13028
|
//#endregion
|
|
13029
13029
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
13030
|
-
var VO = J.lazy(() => import("./glide-data-editor-
|
|
13030
|
+
var VO = J.lazy(() => import("./glide-data-editor-BZxvtSp-.js").then((e) => e.t)), HO = SD("marimo-data-editor", { cssStyles: [GD, KD] }).withData(G({
|
|
13031
13031
|
initialValue: G({ edits: V(G({
|
|
13032
13032
|
rowIdx: W(),
|
|
13033
13033
|
columnId: K(),
|
|
@@ -13384,7 +13384,7 @@ var dk = J.forwardRef((e, t) => {
|
|
|
13384
13384
|
className: l("absolute bg-blue-500 dark:bg-primary", "data-[orientation=horizontal]:h-full", "data-[orientation=vertical]:w-full", "data-disabled:opacity-50")
|
|
13385
13385
|
})
|
|
13386
13386
|
}), n[3] = p) : p = n[3];
|
|
13387
|
-
let m = ze, h = o.value != null && o.value.length === 1 && /* @__PURE__ */ (0, Y.jsx)(Le, { children:
|
|
13387
|
+
let m = ze, h = o.value != null && o.value.length === 1 && /* @__PURE__ */ (0, Y.jsx)(Le, { children: di(i(o.value[0]), {
|
|
13388
13388
|
locale: u,
|
|
13389
13389
|
maximumFractionDigits: a
|
|
13390
13390
|
}) }, o.value[0]), g;
|
|
@@ -13466,7 +13466,7 @@ function mk(e) {
|
|
|
13466
13466
|
//#endregion
|
|
13467
13467
|
//#region src/components/editor/cell/useAddCell.ts
|
|
13468
13468
|
function hk() {
|
|
13469
|
-
let e = (0, X.c)(4), t = uo(xs), n =
|
|
13469
|
+
let e = (0, X.c)(4), t = uo(xs), n = Ae(), { createCell: r } = P(), i;
|
|
13470
13470
|
return e[0] !== t || e[1] !== r || e[2] !== n ? (i = (e) => {
|
|
13471
13471
|
e.includes("alt") && T({
|
|
13472
13472
|
autoInstantiate: t,
|
|
@@ -14738,7 +14738,7 @@ var _k = [gk({
|
|
|
14738
14738
|
borderBottom: "2px solid var(--cm-reactive-reference-border-color)"
|
|
14739
14739
|
},
|
|
14740
14740
|
".mo-cm-reactive-reference-hover": { cursor: "pointer" }
|
|
14741
|
-
})], yk = [
|
|
14741
|
+
})], yk = [Se(), Ls.lineWrapping], bk = [ac(), Ls.lineWrapping], xk = [rc(), Ls.lineWrapping];
|
|
14742
14742
|
function Sk(e) {
|
|
14743
14743
|
switch (e) {
|
|
14744
14744
|
case "sql": return bk;
|
|
@@ -14780,7 +14780,7 @@ var Ck = (0, J.memo)((e) => {
|
|
|
14780
14780
|
let E = h && "opacity-20 h-8 overflow-hidden", D;
|
|
14781
14781
|
t[28] === E ? D = t[29] : (D = l("cm", E), t[28] = E, t[29] = D);
|
|
14782
14782
|
let O;
|
|
14783
|
-
t[30] !== i || t[31] !== b || t[32] !== s || t[33] !== D ? (O = /* @__PURE__ */ (0, Y.jsx)(
|
|
14783
|
+
t[30] !== i || t[31] !== b || t[32] !== s || t[33] !== D ? (O = /* @__PURE__ */ (0, Y.jsx)(nc, {
|
|
14784
14784
|
...s,
|
|
14785
14785
|
className: D,
|
|
14786
14786
|
theme: "none",
|
|
@@ -14877,7 +14877,7 @@ var Ok = (e) => {
|
|
|
14877
14877
|
let t = (0, X.c)(5), { text: n, tooltip: r } = e, i;
|
|
14878
14878
|
t[0] === r ? i = t[1] : (i = r && /* @__PURE__ */ (0, Y.jsx)(Be, {
|
|
14879
14879
|
content: r,
|
|
14880
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
14880
|
+
children: /* @__PURE__ */ (0, Y.jsx)(F, { className: "w-3 h-3 mt-0.5" })
|
|
14881
14881
|
}), t[0] = r, t[1] = i);
|
|
14882
14882
|
let a;
|
|
14883
14883
|
return t[2] !== i || t[3] !== n ? (a = /* @__PURE__ */ (0, Y.jsxs)("h2", {
|
|
@@ -14950,7 +14950,7 @@ var Ok = (e) => {
|
|
|
14950
14950
|
insertNewCell: r
|
|
14951
14951
|
}), t[0] = n, t[1] = r, t[2] = i, t[3] = a) : a = t[3], a;
|
|
14952
14952
|
}, Lk = "__clear__", Rk = (e) => {
|
|
14953
|
-
let t = (0, X.c)(23), { fieldName: n, columns: r, onValueChange: i, includeCountField: a } = e, o = a === void 0 || a, s =
|
|
14953
|
+
let t = (0, X.c)(23), { fieldName: n, columns: r, onValueChange: i, includeCountField: a } = e, o = a === void 0 || a, s = tv(), c;
|
|
14954
14954
|
t[0] === n ? c = t[1] : (c = n.replace(".field", ".type"), t[0] = n, t[1] = c);
|
|
14955
14955
|
let l = c, u;
|
|
14956
14956
|
t[2] === n ? u = t[3] : (u = n.replace(".field", ".selectedDataType"), t[2] = n, t[3] = u);
|
|
@@ -14961,7 +14961,7 @@ var Ok = (e) => {
|
|
|
14961
14961
|
let p = f, m;
|
|
14962
14962
|
t[10] !== p || t[11] !== r || t[12] !== n || t[13] !== s || t[14] !== o || t[15] !== i || t[16] !== d || t[17] !== l ? (m = (e) => {
|
|
14963
14963
|
let { field: t } = e;
|
|
14964
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
14964
|
+
return /* @__PURE__ */ (0, Y.jsx)(Ry, { children: /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
14965
14965
|
...t,
|
|
14966
14966
|
onValueChange: (e) => {
|
|
14967
14967
|
if (e === Lk) {
|
|
@@ -15000,18 +15000,18 @@ var Ok = (e) => {
|
|
|
15000
15000
|
}) }) });
|
|
15001
15001
|
}, t[10] = p, t[11] = r, t[12] = n, t[13] = s, t[14] = o, t[15] = i, t[16] = d, t[17] = l, t[18] = m) : m = t[18];
|
|
15002
15002
|
let h;
|
|
15003
|
-
return t[19] !== n || t[20] !== s.control || t[21] !== m ? (h = /* @__PURE__ */ (0, Y.jsx)(
|
|
15003
|
+
return t[19] !== n || t[20] !== s.control || t[21] !== m ? (h = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15004
15004
|
control: s.control,
|
|
15005
15005
|
name: n,
|
|
15006
15006
|
render: m
|
|
15007
15007
|
}), t[19] = n, t[20] = s.control, t[21] = m, t[22] = h) : h = t[22], h;
|
|
15008
15008
|
}, zk = (e) => {
|
|
15009
|
-
let t = (0, X.c)(8), { fieldName: n, label: r, options: i, defaultValue: a } = e, o =
|
|
15009
|
+
let t = (0, X.c)(8), { fieldName: n, label: r, options: i, defaultValue: a } = e, o = tv(), s;
|
|
15010
15010
|
t[0] !== a || t[1] !== r || t[2] !== i ? (s = (e) => {
|
|
15011
15011
|
let { field: t } = e;
|
|
15012
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15012
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15013
15013
|
className: "flex flex-row items-center justify-between",
|
|
15014
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15014
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: r }), /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
15015
15015
|
...t,
|
|
15016
15016
|
onValueChange: t.onChange,
|
|
15017
15017
|
value: t.value ?? a,
|
|
@@ -15023,18 +15023,18 @@ var Ok = (e) => {
|
|
|
15023
15023
|
});
|
|
15024
15024
|
}, t[0] = a, t[1] = r, t[2] = i, t[3] = s) : s = t[3];
|
|
15025
15025
|
let c;
|
|
15026
|
-
return t[4] !== n || t[5] !== o.control || t[6] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
15026
|
+
return t[4] !== n || t[5] !== o.control || t[6] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15027
15027
|
control: o.control,
|
|
15028
15028
|
name: n,
|
|
15029
15029
|
render: s
|
|
15030
15030
|
}), t[4] = n, t[5] = o.control, t[6] = s, t[7] = c) : c = t[7], c;
|
|
15031
15031
|
}, Bk = (e) => {
|
|
15032
|
-
let t = (0, X.c)(6), { fieldName: n, label: r } = e, i =
|
|
15032
|
+
let t = (0, X.c)(6), { fieldName: n, label: r } = e, i = tv(), a;
|
|
15033
15033
|
t[0] === r ? a = t[1] : (a = (e) => {
|
|
15034
15034
|
let { field: t } = e;
|
|
15035
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15035
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15036
15036
|
className: "flex flex-row gap-2 items-center",
|
|
15037
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15037
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: r }), /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
15038
15038
|
...t,
|
|
15039
15039
|
value: t.value ?? "",
|
|
15040
15040
|
onValueChange: t.onChange,
|
|
@@ -15043,7 +15043,7 @@ var Ok = (e) => {
|
|
|
15043
15043
|
});
|
|
15044
15044
|
}, t[0] = r, t[1] = a);
|
|
15045
15045
|
let o;
|
|
15046
|
-
return t[2] !== n || t[3] !== i.control || t[4] !== a ? (o = /* @__PURE__ */ (0, Y.jsx)(
|
|
15046
|
+
return t[2] !== n || t[3] !== i.control || t[4] !== a ? (o = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15047
15047
|
control: i.control,
|
|
15048
15048
|
name: n,
|
|
15049
15049
|
render: a
|
|
@@ -15051,15 +15051,15 @@ var Ok = (e) => {
|
|
|
15051
15051
|
}, Vk = (e) => {
|
|
15052
15052
|
let t = (0, X.c)(17), n, r, i, a, o, s;
|
|
15053
15053
|
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6]) : ({fieldName: r, label: o, className: n, inputClassName: i, isDisabled: a, ...s} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s);
|
|
15054
|
-
let c =
|
|
15054
|
+
let c = tv(), u;
|
|
15055
15055
|
t[7] !== n || t[8] !== i || t[9] !== a || t[10] !== o || t[11] !== s ? (u = (e) => {
|
|
15056
15056
|
let { field: t } = e;
|
|
15057
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15057
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15058
15058
|
className: l("flex flex-row items-center gap-2", n),
|
|
15059
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15059
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
15060
15060
|
className: "whitespace-nowrap",
|
|
15061
15061
|
children: o
|
|
15062
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
15062
|
+
}), /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(Si, {
|
|
15063
15063
|
...t,
|
|
15064
15064
|
value: t.value,
|
|
15065
15065
|
onValueChange: t.onChange,
|
|
@@ -15072,18 +15072,18 @@ var Ok = (e) => {
|
|
|
15072
15072
|
});
|
|
15073
15073
|
}, t[7] = n, t[8] = i, t[9] = a, t[10] = o, t[11] = s, t[12] = u) : u = t[12];
|
|
15074
15074
|
let d;
|
|
15075
|
-
return t[13] !== r || t[14] !== c.control || t[15] !== u ? (d = /* @__PURE__ */ (0, Y.jsx)(
|
|
15075
|
+
return t[13] !== r || t[14] !== c.control || t[15] !== u ? (d = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15076
15076
|
control: c.control,
|
|
15077
15077
|
name: r,
|
|
15078
15078
|
render: u
|
|
15079
15079
|
}), t[13] = r, t[14] = c.control, t[15] = u, t[16] = d) : d = t[16], d;
|
|
15080
15080
|
}, Hk = (e) => {
|
|
15081
|
-
let t = (0, X.c)(8), { fieldName: n, label: r, className: i, defaultValue: a } = e, o =
|
|
15081
|
+
let t = (0, X.c)(8), { fieldName: n, label: r, className: i, defaultValue: a } = e, o = tv(), s;
|
|
15082
15082
|
t[0] !== i || t[1] !== a || t[2] !== r ? (s = (e) => {
|
|
15083
15083
|
let { field: t } = e;
|
|
15084
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15084
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15085
15085
|
className: l("flex flex-row items-center gap-2", i),
|
|
15086
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15086
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: r }), /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(Wi, {
|
|
15087
15087
|
checked: t.value ?? a ?? !1,
|
|
15088
15088
|
onCheckedChange: t.onChange,
|
|
15089
15089
|
className: "w-4 h-4"
|
|
@@ -15091,23 +15091,23 @@ var Ok = (e) => {
|
|
|
15091
15091
|
});
|
|
15092
15092
|
}, t[0] = i, t[1] = a, t[2] = r, t[3] = s) : s = t[3];
|
|
15093
15093
|
let c;
|
|
15094
|
-
return t[4] !== n || t[5] !== o.control || t[6] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
15094
|
+
return t[4] !== n || t[5] !== o.control || t[6] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15095
15095
|
control: o.control,
|
|
15096
15096
|
name: n,
|
|
15097
15097
|
render: s
|
|
15098
15098
|
}), t[4] = n, t[5] = o.control, t[6] = s, t[7] = c) : c = t[7], c;
|
|
15099
15099
|
}, Uk = (e) => {
|
|
15100
|
-
let t = (0, X.c)(13), { fieldName: n, label: r, defaultValue: i, start: a, stop: o, step: s, className: c } = e, u =
|
|
15100
|
+
let t = (0, X.c)(13), { fieldName: n, label: r, defaultValue: i, start: a, stop: o, step: s, className: c } = e, u = tv(), d = J.useId(), f;
|
|
15101
15101
|
t[0] !== c || t[1] !== i || t[2] !== n || t[3] !== r || t[4] !== d || t[5] !== a || t[6] !== s || t[7] !== o ? (f = (e) => {
|
|
15102
15102
|
let { field: t } = e, u = t.value ?? i, f = Number(u), p = (e) => {
|
|
15103
15103
|
typeof e == "string" && (e = Number(e)), t.onChange(e);
|
|
15104
15104
|
};
|
|
15105
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15105
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15106
15106
|
className: l("flex flex-row items-center gap-2 w-1/2", c),
|
|
15107
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15107
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
15108
15108
|
id: d,
|
|
15109
15109
|
children: r
|
|
15110
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
15110
|
+
}), /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(dk, {
|
|
15111
15111
|
...t,
|
|
15112
15112
|
"aria-labelledby": d,
|
|
15113
15113
|
id: n,
|
|
@@ -15129,13 +15129,13 @@ var Ok = (e) => {
|
|
|
15129
15129
|
});
|
|
15130
15130
|
}, t[0] = c, t[1] = i, t[2] = n, t[3] = r, t[4] = d, t[5] = a, t[6] = s, t[7] = o, t[8] = f) : f = t[8];
|
|
15131
15131
|
let p;
|
|
15132
|
-
return t[9] !== n || t[10] !== u.control || t[11] !== f ? (p = /* @__PURE__ */ (0, Y.jsx)(
|
|
15132
|
+
return t[9] !== n || t[10] !== u.control || t[11] !== f ? (p = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15133
15133
|
control: u.control,
|
|
15134
15134
|
name: n,
|
|
15135
15135
|
render: f
|
|
15136
15136
|
}), t[9] = n, t[10] = u.control, t[11] = f, t[12] = p) : p = t[12], p;
|
|
15137
15137
|
}, Wk = (e) => {
|
|
15138
|
-
let t = (0, X.c)(28), { fieldName: n, label: r, className: i } = e, a =
|
|
15138
|
+
let t = (0, X.c)(28), { fieldName: n, label: r, className: i } = e, a = tv(), o;
|
|
15139
15139
|
t[0] !== n || t[1] !== a ? (o = a.watch(n), t[0] = n, t[1] = a, t[2] = o) : o = t[2];
|
|
15140
15140
|
let s = o, c;
|
|
15141
15141
|
t[3] === s ? c = t[4] : (c = s ?? [], t[3] = s, t[4] = c);
|
|
@@ -15155,9 +15155,9 @@ var Ok = (e) => {
|
|
|
15155
15155
|
r[e] = t, d(r), a.setValue(n, r);
|
|
15156
15156
|
}, t[13] = u, t[14] = n, t[15] = a, t[16] = g) : g = t[16];
|
|
15157
15157
|
let v = g, y;
|
|
15158
|
-
t[17] !== p || t[18] !== i || t[19] !== u || t[20] !== r || t[21] !== h || t[22] !== v ? (y = () => /* @__PURE__ */ (0, Y.jsxs)(
|
|
15158
|
+
t[17] !== p || t[18] !== i || t[19] !== u || t[20] !== r || t[21] !== h || t[22] !== v ? (y = () => /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15159
15159
|
className: l("flex flex-col gap-2", i),
|
|
15160
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15160
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: r }), /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
15161
15161
|
className: "flex flex-col gap-2",
|
|
15162
15162
|
children: [u.map((e, t) => /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
15163
15163
|
className: "flex items-center gap-2",
|
|
@@ -15190,22 +15190,22 @@ var Ok = (e) => {
|
|
|
15190
15190
|
})]
|
|
15191
15191
|
}), t[17] = p, t[18] = i, t[19] = u, t[20] = r, t[21] = h, t[22] = v, t[23] = y) : y = t[23];
|
|
15192
15192
|
let b;
|
|
15193
|
-
return t[24] !== n || t[25] !== a.control || t[26] !== y ? (b = /* @__PURE__ */ (0, Y.jsx)(
|
|
15193
|
+
return t[24] !== n || t[25] !== a.control || t[26] !== y ? (b = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15194
15194
|
control: a.control,
|
|
15195
15195
|
name: n,
|
|
15196
15196
|
render: y
|
|
15197
15197
|
}), t[24] = n, t[25] = a.control, t[26] = y, t[27] = b) : b = t[27], b;
|
|
15198
15198
|
}, Gk = (e) => {
|
|
15199
|
-
let t = (0, X.c)(10), { fieldName: n, label: r } = e, i =
|
|
15199
|
+
let t = (0, X.c)(10), { fieldName: n, label: r } = e, i = tv(), a;
|
|
15200
15200
|
t[0] !== n || t[1] !== i ? (a = () => {
|
|
15201
15201
|
i.setValue(n, "");
|
|
15202
15202
|
}, t[0] = n, t[1] = i, t[2] = a) : a = t[2];
|
|
15203
15203
|
let o = a, s = tA, c;
|
|
15204
15204
|
t[3] !== o || t[4] !== r ? (c = (e) => {
|
|
15205
15205
|
let { field: t } = e;
|
|
15206
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15206
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15207
15207
|
className: "flex flex-row items-center justify-between w-full",
|
|
15208
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15208
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: r }), /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
15209
15209
|
...t,
|
|
15210
15210
|
onValueChange: (e) => {
|
|
15211
15211
|
e === Lk ? o() : t.onChange(e);
|
|
@@ -15232,18 +15232,18 @@ var Ok = (e) => {
|
|
|
15232
15232
|
});
|
|
15233
15233
|
}, t[3] = o, t[4] = r, t[5] = c) : c = t[5];
|
|
15234
15234
|
let l;
|
|
15235
|
-
return t[6] !== n || t[7] !== i.control || t[8] !== c ? (l = /* @__PURE__ */ (0, Y.jsx)(
|
|
15235
|
+
return t[6] !== n || t[7] !== i.control || t[8] !== c ? (l = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15236
15236
|
control: i.control,
|
|
15237
15237
|
name: n,
|
|
15238
15238
|
render: c
|
|
15239
15239
|
}), t[6] = n, t[7] = i.control, t[8] = c, t[9] = l) : l = t[9], l;
|
|
15240
15240
|
}, Kk = (e) => {
|
|
15241
|
-
let t = (0, X.c)(9), { fieldName: n, label: r, defaultValue: i, onValueChange: a } = e, [o, s] = J.useState(!1), c =
|
|
15241
|
+
let t = (0, X.c)(9), { fieldName: n, label: r, defaultValue: i, onValueChange: a } = e, [o, s] = J.useState(!1), c = tv(), l;
|
|
15242
15242
|
t[0] !== i || t[1] !== o || t[2] !== r || t[3] !== a ? (l = (e) => {
|
|
15243
15243
|
let { field: t } = e;
|
|
15244
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
15244
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, {
|
|
15245
15245
|
className: "flex flex-row items-center justify-between w-full",
|
|
15246
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15246
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, { children: r }), /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
15247
15247
|
...t,
|
|
15248
15248
|
onValueChange: (e) => {
|
|
15249
15249
|
t.onChange(e), a?.(e);
|
|
@@ -15252,7 +15252,7 @@ var Ok = (e) => {
|
|
|
15252
15252
|
open: o,
|
|
15253
15253
|
onOpenChange: s,
|
|
15254
15254
|
children: [/* @__PURE__ */ (0, Y.jsx)(Qr, { children: /* @__PURE__ */ (0, Y.jsx)(Wr, { placeholder: "Select an option" }) }), /* @__PURE__ */ (0, Y.jsx)(Yr, { children: /* @__PURE__ */ (0, Y.jsx)(Zr, { children: Je.map((e) => {
|
|
15255
|
-
let t =
|
|
15255
|
+
let t = ae[e], n = e === "string" ? "categorical" : e;
|
|
15256
15256
|
return /* @__PURE__ */ (0, Y.jsx)(Kr, {
|
|
15257
15257
|
value: e,
|
|
15258
15258
|
className: "flex flex-col items-start justify-center",
|
|
@@ -15270,13 +15270,13 @@ var Ok = (e) => {
|
|
|
15270
15270
|
});
|
|
15271
15271
|
}, t[0] = i, t[1] = o, t[2] = r, t[3] = a, t[4] = l) : l = t[4];
|
|
15272
15272
|
let u;
|
|
15273
|
-
return t[5] !== n || t[6] !== c.control || t[7] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(
|
|
15273
|
+
return t[5] !== n || t[6] !== c.control || t[7] !== l ? (u = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15274
15274
|
control: c.control,
|
|
15275
15275
|
name: n,
|
|
15276
15276
|
render: l
|
|
15277
15277
|
}), t[5] = n, t[6] = c.control, t[7] = l, t[8] = u) : u = t[8], u;
|
|
15278
15278
|
}, qk = (e) => {
|
|
15279
|
-
let t = (0, X.c)(12), { fieldName: n, selectedDataType: r, binFieldName: i, defaultAggregation: a } = e, o =
|
|
15279
|
+
let t = (0, X.c)(12), { fieldName: n, selectedDataType: r, binFieldName: i, defaultAggregation: a } = e, o = tv(), s = r === "string" ? et : Ke, { chartType: c } = ck(), l = c !== $e.HEATMAP, u = nA, d = rA, f;
|
|
15280
15280
|
t[0] !== i || t[1] !== o ? (f = (e) => {
|
|
15281
15281
|
let { value: t, previousValue: n, onChange: r } = e;
|
|
15282
15282
|
t === "bin" ? o.setValue(i, !0) : n === "bin" && o.setValue(i, !1), r(t);
|
|
@@ -15284,7 +15284,7 @@ var Ok = (e) => {
|
|
|
15284
15284
|
let p = f, m;
|
|
15285
15285
|
t[3] !== s || t[4] !== a || t[5] !== p || t[6] !== l ? (m = (e) => {
|
|
15286
15286
|
let { field: t } = e;
|
|
15287
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
15287
|
+
return /* @__PURE__ */ (0, Y.jsx)(Ry, { children: /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
15288
15288
|
...t,
|
|
15289
15289
|
value: (t.value ?? a ?? "none").toString(),
|
|
15290
15290
|
onValueChange: (e) => {
|
|
@@ -15308,16 +15308,16 @@ var Ok = (e) => {
|
|
|
15308
15308
|
}) }) });
|
|
15309
15309
|
}, t[3] = s, t[4] = a, t[5] = p, t[6] = l, t[7] = m) : m = t[7];
|
|
15310
15310
|
let h;
|
|
15311
|
-
return t[8] !== n || t[9] !== o.control || t[10] !== m ? (h = /* @__PURE__ */ (0, Y.jsx)(
|
|
15311
|
+
return t[8] !== n || t[9] !== o.control || t[10] !== m ? (h = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15312
15312
|
control: o.control,
|
|
15313
15313
|
name: n,
|
|
15314
15314
|
render: m
|
|
15315
15315
|
}), t[8] = n, t[9] = o.control, t[10] = m, t[11] = h) : h = t[11], h;
|
|
15316
15316
|
}, Jk = (e) => {
|
|
15317
|
-
let t = (0, X.c)(7), { fieldName: n, saveFunction: r } = e, i =
|
|
15317
|
+
let t = (0, X.c)(7), { fieldName: n, saveFunction: r } = e, i = tv(), { fields: a } = ck(), o = iA, s;
|
|
15318
15318
|
t[0] !== a || t[1] !== r ? (s = (e) => {
|
|
15319
15319
|
let { field: t } = e, n = t.value?.map(aA) ?? [];
|
|
15320
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
15320
|
+
return /* @__PURE__ */ (0, Y.jsx)(Ry, { children: /* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(pk, {
|
|
15321
15321
|
options: a?.map(oA) ?? [],
|
|
15322
15322
|
disabled: !1,
|
|
15323
15323
|
value: n,
|
|
@@ -15330,7 +15330,7 @@ var Ok = (e) => {
|
|
|
15330
15330
|
}) }) });
|
|
15331
15331
|
}, t[0] = a, t[1] = r, t[2] = s) : s = t[2];
|
|
15332
15332
|
let c;
|
|
15333
|
-
return t[3] !== n || t[4] !== i.control || t[5] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(
|
|
15333
|
+
return t[3] !== n || t[4] !== i.control || t[5] !== s ? (c = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
15334
15334
|
control: i.control,
|
|
15335
15335
|
name: n,
|
|
15336
15336
|
render: s
|
|
@@ -15346,9 +15346,9 @@ var Ok = (e) => {
|
|
|
15346
15346
|
defaultValue: o
|
|
15347
15347
|
}), t[1] = n, t[2] = r, t[3] = o, t[4] = s) : s = t[4], s;
|
|
15348
15348
|
}, Xk = (e) => {
|
|
15349
|
-
let t = (0, X.c)(13), { fieldName: n } = e, r =
|
|
15349
|
+
let t = (0, X.c)(13), { fieldName: n } = e, r = tv(), i;
|
|
15350
15350
|
t[0] === r.control ? i = t[1] : (i = { control: r.control }, t[0] = r.control, t[1] = i);
|
|
15351
|
-
let a =
|
|
15351
|
+
let a = fv(i);
|
|
15352
15352
|
if (!a[n]?.bin?.binned) return null;
|
|
15353
15353
|
let o;
|
|
15354
15354
|
t[2] !== n || t[3] !== a ? (o = Number.isNaN(a[n]?.bin?.step), t[2] = n, t[3] = a, t[4] = o) : o = t[4];
|
|
@@ -15375,7 +15375,7 @@ var Ok = (e) => {
|
|
|
15375
15375
|
};
|
|
15376
15376
|
function Zk(e) {
|
|
15377
15377
|
if (e.name.trim() === "") return null;
|
|
15378
|
-
let t =
|
|
15378
|
+
let t = ae[e.type];
|
|
15379
15379
|
return /* @__PURE__ */ (0, Y.jsx)(Kr, {
|
|
15380
15380
|
value: e.name,
|
|
15381
15381
|
children: /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
@@ -15533,9 +15533,9 @@ var mA = (e) => {
|
|
|
15533
15533
|
children: o
|
|
15534
15534
|
}), t[7] = n, t[8] = o, t[9] = s) : s = t[9], s;
|
|
15535
15535
|
}, _A = () => {
|
|
15536
|
-
let e = (0, X.c)(22), t =
|
|
15536
|
+
let e = (0, X.c)(22), t = tv(), n;
|
|
15537
15537
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
15538
|
-
let r =
|
|
15538
|
+
let r = fv(n), i = ck(), a = r.general?.xColumn, o;
|
|
15539
15539
|
e[2] === a ? o = e[3] : (o = pA(a), e[2] = a, e[3] = o);
|
|
15540
15540
|
let { inferredDataType: s } = o, c = i.chartType === $e.LINE || i.chartType === $e.BAR || i.chartType === $e.AREA, l;
|
|
15541
15541
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ (0, Y.jsx)(Ok, { text: "X-Axis" }), e[4] = l) : l = e[4];
|
|
@@ -15572,9 +15572,9 @@ var mA = (e) => {
|
|
|
15572
15572
|
p
|
|
15573
15573
|
] }), e[17] = u, e[18] = d, e[19] = f, e[20] = p, e[21] = m) : m = e[21], m;
|
|
15574
15574
|
}, vA = () => {
|
|
15575
|
-
let e = (0, X.c)(29), t =
|
|
15575
|
+
let e = (0, X.c)(29), t = tv(), n;
|
|
15576
15576
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
15577
|
-
let r =
|
|
15577
|
+
let r = fv(n), i = ck(), a = r.general?.yColumn, o = a?.field, s;
|
|
15578
15578
|
e[2] === o ? s = e[3] : (s = it(o), e[2] = o, e[3] = s);
|
|
15579
15579
|
let c = s, l = r.general?.xColumn?.field, u;
|
|
15580
15580
|
e[4] === l ? u = e[5] : (u = it(l), e[4] = l, e[5] = u);
|
|
@@ -15620,9 +15620,9 @@ var mA = (e) => {
|
|
|
15620
15620
|
b
|
|
15621
15621
|
] }), e[23] = y, e[24] = b, e[25] = g, e[26] = _, e[27] = v, e[28] = x) : x = e[28], x;
|
|
15622
15622
|
}, yA = () => {
|
|
15623
|
-
let e = (0, X.c)(13), { fields: t } = ck(), n =
|
|
15623
|
+
let e = (0, X.c)(13), { fields: t } = ck(), n = tv(), r;
|
|
15624
15624
|
e[0] === n.control ? r = e[1] : (r = { control: n.control }, e[0] = n.control, e[1] = r);
|
|
15625
|
-
let i =
|
|
15625
|
+
let i = fv(r).general?.colorByColumn, a;
|
|
15626
15626
|
e[2] === i ? a = e[3] : (a = uA(i), e[2] = i, e[3] = a);
|
|
15627
15627
|
let o = a, s;
|
|
15628
15628
|
e[4] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsx)(Ok, { text: "Color by" }), e[4] = s) : s = e[4];
|
|
@@ -15642,9 +15642,9 @@ var mA = (e) => {
|
|
|
15642
15642
|
l
|
|
15643
15643
|
] }), e[10] = c, e[11] = l, e[12] = u) : u = e[12], u;
|
|
15644
15644
|
}, bA = () => {
|
|
15645
|
-
let e = (0, X.c)(7), t = ck().fields, n =
|
|
15645
|
+
let e = (0, X.c)(7), t = ck().fields, n = tv(), r;
|
|
15646
15646
|
e[0] === n.control ? r = e[1] : (r = { control: n.control }, e[0] = n.control, e[1] = r);
|
|
15647
|
-
let i =
|
|
15647
|
+
let i = fv(r), a;
|
|
15648
15648
|
e[2] !== t || e[3] !== i.general?.facet ? (a = (e) => {
|
|
15649
15649
|
let n = i.general?.facet?.[e], r = it(n?.field), { inferredDataType: a } = pA(n), o = e === "row" ? "general.facet.row.linkYAxis" : "general.facet.column.linkXAxis";
|
|
15650
15650
|
return /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
@@ -15705,9 +15705,9 @@ function xA(e) {
|
|
|
15705
15705
|
//#endregion
|
|
15706
15706
|
//#region src/components/data-table/charts/forms/common-chart.tsx
|
|
15707
15707
|
var SA = () => {
|
|
15708
|
-
let e = (0, X.c)(17), t =
|
|
15708
|
+
let e = (0, X.c)(17), t = tv(), n;
|
|
15709
15709
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
15710
|
-
let r =
|
|
15710
|
+
let r = fv(n), i = r.general?.yColumn, a = r.general?.colorByColumn, o = i?.field, s;
|
|
15711
15711
|
e[2] === o ? s = e[3] : (s = it(o), e[2] = o, e[3] = s);
|
|
15712
15712
|
let c = s, { chartType: l } = ck(), u;
|
|
15713
15713
|
e[4] !== l || e[5] !== a?.field ? (u = it(a?.field) && (l === $e.BAR || l === $e.LINE), e[4] = l, e[5] = a?.field, e[6] = u) : u = e[6];
|
|
@@ -15822,7 +15822,7 @@ var SA = () => {
|
|
|
15822
15822
|
p,
|
|
15823
15823
|
/* @__PURE__ */ (0, Y.jsxs)("p", {
|
|
15824
15824
|
className: "text-xs",
|
|
15825
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
15825
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(F, { className: "w-2.5 h-2.5 inline mb-1 mr-1" }), "If you are using color range, color scheme will be ignored."]
|
|
15826
15826
|
})
|
|
15827
15827
|
] })]
|
|
15828
15828
|
}), e[12] = m) : m = e[12];
|
|
@@ -15837,9 +15837,9 @@ var SA = () => {
|
|
|
15837
15837
|
]
|
|
15838
15838
|
}), e[13] = a, e[14] = h), h;
|
|
15839
15839
|
}, wA = () => {
|
|
15840
|
-
let e = (0, X.c)(11), { saveForm: t } = ck(), n =
|
|
15840
|
+
let e = (0, X.c)(11), { saveForm: t } = ck(), n = tv(), r;
|
|
15841
15841
|
e[0] === n.control ? r = e[1] : (r = { control: n.control }, e[0] = n.control, e[1] = r);
|
|
15842
|
-
let i =
|
|
15842
|
+
let i = fv(r).tooltips?.auto, a;
|
|
15843
15843
|
e[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ (0, Y.jsx)(Nk, {
|
|
15844
15844
|
className: "pt-0",
|
|
15845
15845
|
children: /* @__PURE__ */ (0, Y.jsx)(Ok, {
|
|
@@ -15891,9 +15891,9 @@ function EA(e) {
|
|
|
15891
15891
|
//#endregion
|
|
15892
15892
|
//#region src/components/data-table/charts/forms/heatmap.tsx
|
|
15893
15893
|
var DA = () => {
|
|
15894
|
-
let e = (0, X.c)(17), t =
|
|
15894
|
+
let e = (0, X.c)(17), t = tv(), n;
|
|
15895
15895
|
e[0] === t.control ? n = e[1] : (n = { control: t.control }, e[0] = t.control, e[1] = n);
|
|
15896
|
-
let r =
|
|
15896
|
+
let r = fv(n), i = r.general?.xColumn?.field, a;
|
|
15897
15897
|
e[2] === i ? a = e[3] : (a = it(i), e[2] = i, e[3] = a);
|
|
15898
15898
|
let o = a, s = r.general?.yColumn?.field, c;
|
|
15899
15899
|
e[4] === s ? c = e[5] : (c = it(s), e[4] = s, e[5] = c);
|
|
@@ -15925,9 +15925,9 @@ var DA = () => {
|
|
|
15925
15925
|
m
|
|
15926
15926
|
] }), e[14] = d, e[15] = p, e[16] = g) : g = e[16], g;
|
|
15927
15927
|
}, OA = () => {
|
|
15928
|
-
let e = (0, X.c)(25), t =
|
|
15928
|
+
let e = (0, X.c)(25), t = tv(), { fields: n } = ck(), r;
|
|
15929
15929
|
e[0] === t.control ? r = e[1] : (r = { control: t.control }, e[0] = t.control, e[1] = r);
|
|
15930
|
-
let i =
|
|
15930
|
+
let i = fv(r), a = i.general?.colorByColumn, o = i.general?.yColumn?.selectedDataType;
|
|
15931
15931
|
(o === "" || !o) && (o = "string");
|
|
15932
15932
|
let s;
|
|
15933
15933
|
e[2] === a ? s = e[3] : (s = a?.type ? Qe(a.type) : "string", e[2] = a, e[3] = s);
|
|
@@ -16119,7 +16119,7 @@ var RA = "marimo:charts:v2", zA = G({
|
|
|
16119
16119
|
}).transform((e) => ({
|
|
16120
16120
|
...e,
|
|
16121
16121
|
id: e.id ?? e.tabName
|
|
16122
|
-
})), BA = V(Ko([K().transform((e) => e), V(zA)])), VA = new
|
|
16122
|
+
})), BA = V(Ko([K().transform((e) => e), V(zA)])), VA = new Zi(RA, BA, () => []), HA = {
|
|
16123
16123
|
getItem: (e) => {
|
|
16124
16124
|
try {
|
|
16125
16125
|
let t = VA.get(e);
|
|
@@ -16136,7 +16136,7 @@ var RA = "marimo:charts:v2", zA = G({
|
|
|
16136
16136
|
}
|
|
16137
16137
|
}, UA = Do(RA, /* @__PURE__ */ new Map(), HA);
|
|
16138
16138
|
function WA() {
|
|
16139
|
-
return
|
|
16139
|
+
return me();
|
|
16140
16140
|
}
|
|
16141
16141
|
function GA(e, t) {
|
|
16142
16142
|
let n = $a(t);
|
|
@@ -16270,13 +16270,13 @@ var ej = (e) => {
|
|
|
16270
16270
|
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 } = Go(), p;
|
|
16271
16271
|
t[0] === r ? p = t[1] : (p = r ?? LA(), t[0] = r, t[1] = p);
|
|
16272
16272
|
let m;
|
|
16273
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (m =
|
|
16273
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (m = Dy(IA), t[2] = m) : m = t[2];
|
|
16274
16274
|
let h;
|
|
16275
16275
|
t[3] === p ? h = t[4] : (h = {
|
|
16276
16276
|
defaultValues: p,
|
|
16277
16277
|
resolver: m
|
|
16278
16278
|
}, t[3] = p, t[4] = h);
|
|
16279
|
-
let g =
|
|
16279
|
+
let g = _y(h), [v, y] = (0, J.useState)(i), [b, x] = (0, J.useState)(!1), [S, C] = (0, J.useState)(!u), { ref: w } = KO(), T = lc(d ? c : null), E;
|
|
16280
16280
|
t[5] !== T || t[6] !== s || t[7] !== S || t[8] !== n ? (E = async () => {
|
|
16281
16281
|
if (!s || n.length === 0 || !S) return [];
|
|
16282
16282
|
let e = await s({});
|
|
@@ -16295,7 +16295,7 @@ var ej = (e) => {
|
|
|
16295
16295
|
], t[10] = T, t[11] = S, t[12] = n, t[13] = D) : D = t[13];
|
|
16296
16296
|
let { data: O, isPending: k, error: A } = oc(E, D), j;
|
|
16297
16297
|
t[14] === g.control ? j = t[15] : (j = { control: g.control }, t[14] = g.control, t[15] = j);
|
|
16298
|
-
let M =
|
|
16298
|
+
let M = fv(j), N;
|
|
16299
16299
|
t[16] !== M || t[17] !== v || t[18] !== f ? (N = tt({
|
|
16300
16300
|
chartType: v,
|
|
16301
16301
|
formValues: M,
|
|
@@ -16405,7 +16405,7 @@ var ej = (e) => {
|
|
|
16405
16405
|
let u = `relative flex flex-col gap-2 overflow-auto px-2 py-3 scrollbar-thin transition-width duration-200 ${b ? "w-8" : "w-[300px]"}`, d = !b && l, f;
|
|
16406
16406
|
t[56] === Symbol.for("react.memo_cache_sentinel") ? (f = () => x(aj), t[56] = f) : f = t[56];
|
|
16407
16407
|
let p = b ? "Expand sidebar" : "Collapse sidebar", m;
|
|
16408
|
-
t[57] === b ? m = t[58] : (m = b ? /* @__PURE__ */ (0, Y.jsx)(
|
|
16408
|
+
t[57] === b ? m = t[58] : (m = b ? /* @__PURE__ */ (0, Y.jsx)(ii, { className: "w-4 h-5" }) : /* @__PURE__ */ (0, Y.jsx)(Kn, { className: "w-4 h-5" }), t[57] = b, t[58] = m);
|
|
16409
16409
|
let h;
|
|
16410
16410
|
t[59] !== p || t[60] !== m ? (h = /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
16411
16411
|
variant: "outline",
|
|
@@ -16462,7 +16462,7 @@ var ej = (e) => {
|
|
|
16462
16462
|
children: [f, /* @__PURE__ */ (0, Y.jsxs)(Nt, {
|
|
16463
16463
|
value: "style",
|
|
16464
16464
|
className: "w-1/2 h-6",
|
|
16465
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
16465
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(L, { className: "w-4 h-4 mr-2" }), "Style"]
|
|
16466
16466
|
})]
|
|
16467
16467
|
}), t[11] = p) : p = t[11];
|
|
16468
16468
|
let m;
|
|
@@ -16495,7 +16495,7 @@ var ej = (e) => {
|
|
|
16495
16495
|
children: v
|
|
16496
16496
|
}), t[19] = l, t[20] = v, t[21] = y) : y = t[21];
|
|
16497
16497
|
let b;
|
|
16498
|
-
t[22] !== n || t[23] !== y ? (b = /* @__PURE__ */ (0, Y.jsx)(
|
|
16498
|
+
t[22] !== n || t[23] !== y ? (b = /* @__PURE__ */ (0, Y.jsx)(Ny, {
|
|
16499
16499
|
...n,
|
|
16500
16500
|
children: y
|
|
16501
16501
|
}), t[22] = n, t[23] = y, t[24] = b) : b = t[24];
|
|
@@ -16524,7 +16524,7 @@ function sj(e) {
|
|
|
16524
16524
|
//#endregion
|
|
16525
16525
|
//#region src/components/data-table/hooks/use-panel-ownership.ts
|
|
16526
16526
|
function cj(e, t) {
|
|
16527
|
-
let n = (0, X.c)(16), r = uo(TS), { focusCell: i } =
|
|
16527
|
+
let n = (0, X.c)(16), r = uo(TS), { focusCell: i } = ee(), a = Ae(), [o, s] = Ts(CS), [l, u] = Ts(SS), [d, f] = Ts(wS), p = lj(e, t);
|
|
16528
16528
|
!t && r && (c.error("CellId is not found, defaulting to fixed mode"), r = !1);
|
|
16529
16529
|
let m = (e) => l === p && d && e === o, h = a === t, g = l && uj(l, t);
|
|
16530
16530
|
r && h && l !== p && !g && u(p);
|
|
@@ -16620,7 +16620,7 @@ function vj({ stats: e, dataType: t, locale: n }) {
|
|
|
16620
16620
|
}),
|
|
16621
16621
|
/* @__PURE__ */ (0, Y.jsx)("span", {
|
|
16622
16622
|
className: "text-xs font-bold text-muted-foreground tracking-wide",
|
|
16623
|
-
children:
|
|
16623
|
+
children: Ni(r, n)
|
|
16624
16624
|
}),
|
|
16625
16625
|
/* @__PURE__ */ (0, Y.jsx)(w, {
|
|
16626
16626
|
className: "h-3 w-3 invisible group-hover:visible",
|
|
@@ -16632,7 +16632,7 @@ function vj({ stats: e, dataType: t, locale: n }) {
|
|
|
16632
16632
|
}
|
|
16633
16633
|
var yj = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
16634
16634
|
className: "flex justify-center",
|
|
16635
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
16635
|
+
children: /* @__PURE__ */ (0, Y.jsx)(xe, { className: "size-4" })
|
|
16636
16636
|
});
|
|
16637
16637
|
function bj(e, t) {
|
|
16638
16638
|
return /* @__PURE__ */ (0, Y.jsx)(J.Suspense, {
|
|
@@ -16658,7 +16658,7 @@ function bj(e, t) {
|
|
|
16658
16658
|
});
|
|
16659
16659
|
}
|
|
16660
16660
|
var xj = (e) => {
|
|
16661
|
-
let t = (0, X.c)(11), { chartCode: n, columnName: r } = e, i = uo(xs), a =
|
|
16661
|
+
let t = (0, X.c)(11), { chartCode: n, columnName: r } = e, i = uo(xs), a = Ae(), { createCell: o } = P(), s;
|
|
16662
16662
|
t[0] !== i || t[1] !== o || t[2] !== a ? (s = (e) => {
|
|
16663
16663
|
e.includes("alt") && T({
|
|
16664
16664
|
autoInstantiate: i,
|
|
@@ -16769,7 +16769,7 @@ function Cj({ columnName: e, column: t, dataType: n, externalType: r, previewCol
|
|
|
16769
16769
|
onSelect: () => u(!c),
|
|
16770
16770
|
className: "flex flex-row items-center gap-1.5 group w-full cursor-pointer",
|
|
16771
16771
|
children: [
|
|
16772
|
-
c ? /* @__PURE__ */ (0, Y.jsx)(Vr, { className: "w-3 h-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ (0, Y.jsx)(
|
|
16772
|
+
c ? /* @__PURE__ */ (0, Y.jsx)(Vr, { className: "w-3 h-3 shrink-0 text-muted-foreground" }) : /* @__PURE__ */ (0, Y.jsx)(ii, { className: "w-3 h-3 shrink-0 text-muted-foreground" }),
|
|
16773
16773
|
/* @__PURE__ */ (0, Y.jsx)(Jn, {
|
|
16774
16774
|
columnName: /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
16775
16775
|
className: c ? "font-semibold" : "",
|
|
@@ -16896,12 +16896,12 @@ var wj = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
16896
16896
|
});
|
|
16897
16897
|
if (i === 0) return /* @__PURE__ */ (0, Y.jsx)(Dj, {
|
|
16898
16898
|
kind: "info",
|
|
16899
|
-
Icon:
|
|
16899
|
+
Icon: F,
|
|
16900
16900
|
message: "No rows selected"
|
|
16901
16901
|
});
|
|
16902
16902
|
if (!y) return /* @__PURE__ */ (0, Y.jsx)(xn, {
|
|
16903
16903
|
milliseconds: 200,
|
|
16904
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
16904
|
+
children: /* @__PURE__ */ (0, Y.jsx)(xe, {
|
|
16905
16905
|
size: "medium",
|
|
16906
16906
|
centered: !0
|
|
16907
16907
|
})
|
|
@@ -16974,7 +16974,7 @@ var wj = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
16974
16974
|
title: "Select/unselect the current row",
|
|
16975
16975
|
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
16976
16976
|
className: "flex items-center gap-1.5",
|
|
16977
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
16977
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(Wi, {
|
|
16978
16978
|
id: p,
|
|
16979
16979
|
checked: c,
|
|
16980
16980
|
onCheckedChange: T,
|
|
@@ -16993,8 +16993,8 @@ var wj = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
16993
16993
|
t[30] === S ? j = t[31] : (j = () => S(0), t[30] = S, t[31] = j);
|
|
16994
16994
|
let M = n === 0, N;
|
|
16995
16995
|
t[32] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ (0, Y.jsx)(Yn, {}), t[32] = N) : N = t[32];
|
|
16996
|
-
let
|
|
16997
|
-
t[33] !== j || t[34] !== M ? (
|
|
16996
|
+
let P;
|
|
16997
|
+
t[33] !== j || t[34] !== M ? (P = /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
16998
16998
|
variant: "outline",
|
|
16999
16999
|
size: "xs",
|
|
17000
17000
|
className: "h-6 w-6 p-0.5 ml-auto",
|
|
@@ -17002,7 +17002,7 @@ var wj = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
17002
17002
|
disabled: M,
|
|
17003
17003
|
"aria-label": "Go to first row",
|
|
17004
17004
|
children: N
|
|
17005
|
-
}), t[33] = j, t[34] = M, t[35] =
|
|
17005
|
+
}), t[33] = j, t[34] = M, t[35] = P) : P = t[35];
|
|
17006
17006
|
let I;
|
|
17007
17007
|
t[36] !== n || t[37] !== S ? (I = () => S(n - 1), t[36] = n, t[37] = S, t[38] = I) : I = t[38];
|
|
17008
17008
|
let L = n === 0, R;
|
|
@@ -17027,7 +17027,7 @@ var wj = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
17027
17027
|
let te;
|
|
17028
17028
|
t[50] !== n || t[51] !== S ? (te = () => S(n + 1), t[50] = n, t[51] = S, t[52] = te) : te = t[52];
|
|
17029
17029
|
let ne = !h && n === i - 1, re;
|
|
17030
|
-
t[53] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ (0, Y.jsx)(
|
|
17030
|
+
t[53] === Symbol.for("react.memo_cache_sentinel") ? (re = /* @__PURE__ */ (0, Y.jsx)(ii, {}), t[53] = re) : re = t[53];
|
|
17031
17031
|
let ie;
|
|
17032
17032
|
t[54] !== te || t[55] !== ne ? (ie = /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
17033
17033
|
variant: "outline",
|
|
@@ -17055,17 +17055,17 @@ var wj = ({ previewColumn: e, columnName: t, dataType: n }) => {
|
|
|
17055
17055
|
children: se
|
|
17056
17056
|
}), t[62] = ae, t[63] = oe, t[64] = ce) : ce = t[64];
|
|
17057
17057
|
let le;
|
|
17058
|
-
t[65] !==
|
|
17058
|
+
t[65] !== P || t[66] !== z || t[67] !== ee || t[68] !== ie || t[69] !== ce || t[70] !== A ? (le = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
17059
17059
|
className: "flex flex-row gap-2 items-center mr-2 px-2",
|
|
17060
17060
|
children: [
|
|
17061
17061
|
A,
|
|
17062
|
-
|
|
17062
|
+
P,
|
|
17063
17063
|
z,
|
|
17064
17064
|
ee,
|
|
17065
17065
|
ie,
|
|
17066
17066
|
ce
|
|
17067
17067
|
]
|
|
17068
|
-
}), t[65] =
|
|
17068
|
+
}), t[65] = P, t[66] = z, t[67] = ee, t[68] = ie, t[69] = ce, t[70] = A, t[71] = le) : le = t[71];
|
|
17069
17069
|
let ue;
|
|
17070
17070
|
t[72] === u ? ue = t[73] : (ue = /* @__PURE__ */ (0, Y.jsx)(Nn, {
|
|
17071
17071
|
className: "bg-background",
|
|
@@ -17350,7 +17350,7 @@ var Wj = (e) => {
|
|
|
17350
17350
|
let t = (0, X.c)(13), { isLazy: n, children: r, preload: i, host: a } = e, o, s, c, l;
|
|
17351
17351
|
if (t[0] !== a || t[1] !== n || t[2] !== i) {
|
|
17352
17352
|
let e = a.closest(`[${Yi}]`);
|
|
17353
|
-
l = e ?
|
|
17353
|
+
l = e ? ta.parse(e) : null, o = a.closest(`[${Qi}]`)?.getAttribute(Qi), s = J.useState, c = n && !i && !Hj(l, o), t[0] = a, t[1] = n, t[2] = i, t[3] = o, t[4] = s, t[5] = c, t[6] = l;
|
|
17354
17354
|
} else o = t[3], s = t[4], c = t[5], l = t[6];
|
|
17355
17355
|
let [u, d] = s(c);
|
|
17356
17356
|
if (u) {
|
|
@@ -17359,7 +17359,7 @@ var Wj = (e) => {
|
|
|
17359
17359
|
Uj(l, o), d(!1);
|
|
17360
17360
|
}, t[7] = o, t[8] = l, t[9] = e) : e = t[9];
|
|
17361
17361
|
let n;
|
|
17362
|
-
t[10] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ (0, Y.jsx)(
|
|
17362
|
+
t[10] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ (0, Y.jsx)(ve, { className: "mr-2 h-4 w-4" }), t[10] = n) : n = t[10];
|
|
17363
17363
|
let r;
|
|
17364
17364
|
return t[11] === e ? r = t[12] : (r = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
17365
17365
|
className: "flex h-20 items-center justify-center",
|
|
@@ -17374,7 +17374,7 @@ var Wj = (e) => {
|
|
|
17374
17374
|
return r;
|
|
17375
17375
|
}, Gj = (0, J.memo)((e) => {
|
|
17376
17376
|
let t = (0, X.c)(125), n;
|
|
17377
|
-
t[0] === e.host ? n = t[1] : (n =
|
|
17377
|
+
t[0] === e.host ? n = t[1] : (n = na(e.host), t[0] = e.host, t[1] = n);
|
|
17378
17378
|
let r = n, i = e.search, a = e.setValue, o;
|
|
17379
17379
|
t[2] === Symbol.for("react.memo_cache_sentinel") ? (o = [], t[2] = o) : o = t[2];
|
|
17380
17380
|
let [s, l] = (0, J.useState)(o), u;
|
|
@@ -17752,10 +17752,10 @@ var Kj = (e) => {
|
|
|
17752
17752
|
className: "mb-1 rounded",
|
|
17753
17753
|
children: [
|
|
17754
17754
|
"Showing the first ",
|
|
17755
|
-
/* @__PURE__ */ (0, Y.jsx)("strong", { children:
|
|
17755
|
+
/* @__PURE__ */ (0, Y.jsx)("strong", { children: Ni(r.length, be) }),
|
|
17756
17756
|
" ",
|
|
17757
17757
|
"of ",
|
|
17758
|
-
/* @__PURE__ */ (0, Y.jsx)("strong", { children:
|
|
17758
|
+
/* @__PURE__ */ (0, Y.jsx)("strong", { children: Ni(o, be) }),
|
|
17759
17759
|
" rows. Increase the table's ",
|
|
17760
17760
|
/* @__PURE__ */ (0, Y.jsx)("code", { children: "page_size" }),
|
|
17761
17761
|
" to embed more in the static export."
|
|
@@ -18205,18 +18205,18 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18205
18205
|
}), t[2] = i, t[3] = a), a;
|
|
18206
18206
|
}, SM = () => ({
|
|
18207
18207
|
isMatch: (e) => {
|
|
18208
|
-
let { special: t } =
|
|
18208
|
+
let { special: t } = Oy.parse(e.description || "");
|
|
18209
18209
|
return t === "column_id";
|
|
18210
18210
|
},
|
|
18211
18211
|
Component: ({ schema: e, form: t, path: n }) => {
|
|
18212
|
-
let r = J.use(vM), { label: i, description: a } =
|
|
18213
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
18212
|
+
let r = J.use(vM), { label: i, description: a } = Oy.parse(e.description);
|
|
18213
|
+
return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18214
18214
|
control: t.control,
|
|
18215
18215
|
name: n,
|
|
18216
|
-
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
18217
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18218
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18219
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18216
|
+
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
18217
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: i }),
|
|
18218
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: a }),
|
|
18219
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
18220
18220
|
"data-testid": "marimo-plugin-data-frames-column-select",
|
|
18221
18221
|
value: e.value == null ? e.value : JSON.stringify(e.value),
|
|
18222
18222
|
onValueChange: (t) => {
|
|
@@ -18261,13 +18261,13 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18261
18261
|
}), CM = () => ({
|
|
18262
18262
|
isMatch: (e) => {
|
|
18263
18263
|
if (e instanceof Oo) {
|
|
18264
|
-
let t = e.element, n = t instanceof vo ? t.description : "", { special: r } =
|
|
18264
|
+
let t = e.element, n = t instanceof vo ? t.description : "", { special: r } = Oy.parse(n || "");
|
|
18265
18265
|
return r === "column_id";
|
|
18266
18266
|
}
|
|
18267
18267
|
return !1;
|
|
18268
18268
|
},
|
|
18269
18269
|
Component: ({ schema: e, form: t, path: n }) => {
|
|
18270
|
-
let { label: r } =
|
|
18270
|
+
let { label: r } = Oy.parse(e.description);
|
|
18271
18271
|
return /* @__PURE__ */ (0, Y.jsx)(wM, {
|
|
18272
18272
|
schema: e,
|
|
18273
18273
|
form: t,
|
|
@@ -18277,16 +18277,16 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18277
18277
|
}
|
|
18278
18278
|
}), wM = (e) => {
|
|
18279
18279
|
let t = (0, X.c)(13), { schema: n, form: r, path: i, itemLabel: a } = e, o = J.use(vM), s;
|
|
18280
|
-
t[0] === n.description ? s = t[1] : (s =
|
|
18280
|
+
t[0] === n.description ? s = t[1] : (s = Oy.parse(n.description), t[0] = n.description, t[1] = s);
|
|
18281
18281
|
let { description: c } = s, l;
|
|
18282
18282
|
t[2] === a ? l = t[3] : (l = a ? `Select ${a.toLowerCase()}` : void 0, t[2] = a, t[3] = l);
|
|
18283
18283
|
let u = l, d;
|
|
18284
18284
|
t[4] !== o || t[5] !== c || t[6] !== a || t[7] !== u ? (d = (e) => {
|
|
18285
18285
|
let { field: t } = e, n = nb(t.value);
|
|
18286
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
18287
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18288
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18289
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18286
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
18287
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: a }),
|
|
18288
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: c }),
|
|
18289
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(Zt, {
|
|
18290
18290
|
className: "min-w-[180px]",
|
|
18291
18291
|
placeholder: u,
|
|
18292
18292
|
displayValue: String,
|
|
@@ -18299,11 +18299,11 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18299
18299
|
},
|
|
18300
18300
|
children: [...o.entries()].map(jM)
|
|
18301
18301
|
}) }),
|
|
18302
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18302
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
18303
18303
|
] });
|
|
18304
18304
|
}, t[4] = o, t[5] = c, t[6] = a, t[7] = u, t[8] = d) : d = t[8];
|
|
18305
18305
|
let f;
|
|
18306
|
-
return t[9] !== r.control || t[10] !== i || t[11] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(
|
|
18306
|
+
return t[9] !== r.control || t[10] !== i || t[11] !== d ? (f = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18307
18307
|
control: r.control,
|
|
18308
18308
|
name: i,
|
|
18309
18309
|
render: d
|
|
@@ -18311,40 +18311,40 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18311
18311
|
}, TM = () => ({
|
|
18312
18312
|
isMatch: (e) => {
|
|
18313
18313
|
if (e instanceof Oo) {
|
|
18314
|
-
let { special: t } =
|
|
18314
|
+
let { special: t } = Oy.parse(e.description || "");
|
|
18315
18315
|
return t === "column_values";
|
|
18316
18316
|
}
|
|
18317
18317
|
return !1;
|
|
18318
18318
|
},
|
|
18319
18319
|
Component: ({ schema: e, form: t, path: n }) => {
|
|
18320
|
-
let { label: r, description: i, placeholder: a } =
|
|
18321
|
-
if (u.length === 0 && !l) return /* @__PURE__ */ (0, Y.jsx)(
|
|
18320
|
+
let { label: r, description: i, placeholder: a } = Oy.parse(e.description), o = J.use(yM), s = J.use(bM), { data: c, isPending: l } = oc(() => s({ column: o }), [o]), u = c?.values || [];
|
|
18321
|
+
if (u.length === 0 && !l) return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18322
18322
|
control: t.control,
|
|
18323
18323
|
name: n,
|
|
18324
|
-
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
18325
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18326
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18327
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18324
|
+
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
18325
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: r }),
|
|
18326
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: i }),
|
|
18327
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
18328
18328
|
...e,
|
|
18329
18329
|
value: e.value,
|
|
18330
18330
|
onValueChange: e.onChange,
|
|
18331
18331
|
className: "my-0",
|
|
18332
18332
|
placeholder: a
|
|
18333
18333
|
}) }),
|
|
18334
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18334
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
18335
18335
|
] })
|
|
18336
18336
|
});
|
|
18337
18337
|
let d = u.map(String);
|
|
18338
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
18338
|
+
return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18339
18339
|
control: t.control,
|
|
18340
18340
|
name: n,
|
|
18341
|
-
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
18342
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18341
|
+
render: ({ field: e }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
18342
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
18343
18343
|
className: "whitespace-pre",
|
|
18344
18344
|
children: r
|
|
18345
18345
|
}),
|
|
18346
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18347
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18346
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: i }),
|
|
18347
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(Zt, {
|
|
18348
18348
|
className: "min-w-[180px]",
|
|
18349
18349
|
placeholder: a,
|
|
18350
18350
|
multiple: !1,
|
|
@@ -18356,40 +18356,40 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18356
18356
|
children: e
|
|
18357
18357
|
}, e))
|
|
18358
18358
|
}) }),
|
|
18359
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18359
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
18360
18360
|
] })
|
|
18361
18361
|
});
|
|
18362
18362
|
}
|
|
18363
18363
|
}), EM = () => ({
|
|
18364
18364
|
isMatch: (e) => {
|
|
18365
|
-
let { special: t } =
|
|
18365
|
+
let { special: t } = Oy.parse(e.description || "");
|
|
18366
18366
|
return t === "column_values" && e instanceof Oo;
|
|
18367
18367
|
},
|
|
18368
18368
|
Component: ({ schema: e, form: t, path: n }) => {
|
|
18369
18369
|
let r = J.use(yM), i = J.use(bM), { data: a, isPending: o } = oc(() => i({ column: r }), [r]), s = a?.values || [];
|
|
18370
|
-
if (s.length === 0 && !o) return /* @__PURE__ */ (0, Y.jsx)(
|
|
18370
|
+
if (s.length === 0 && !o) return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18371
18371
|
control: t.control,
|
|
18372
18372
|
name: n,
|
|
18373
|
-
render: ({ field: t }) => /* @__PURE__ */ (0, Y.jsxs)(
|
|
18374
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18375
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18376
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18373
|
+
render: ({ field: t }) => /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
18374
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: e.description }),
|
|
18375
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(tb, { ...t }) }),
|
|
18376
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
18377
18377
|
] })
|
|
18378
18378
|
});
|
|
18379
18379
|
let c = s.map(String);
|
|
18380
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
18380
|
+
return /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18381
18381
|
control: t.control,
|
|
18382
18382
|
name: n,
|
|
18383
18383
|
render: ({ field: t }) => {
|
|
18384
18384
|
let n = nb(t.value);
|
|
18385
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
18386
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18387
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18385
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
18386
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, { children: e.description }),
|
|
18387
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsx)(eb, {
|
|
18388
18388
|
...t,
|
|
18389
18389
|
value: n,
|
|
18390
18390
|
options: c
|
|
18391
18391
|
}) }),
|
|
18392
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18392
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
18393
18393
|
] });
|
|
18394
18394
|
}
|
|
18395
18395
|
});
|
|
@@ -18398,11 +18398,11 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18398
18398
|
let t = (0, X.c)(4), { className: n } = e, r;
|
|
18399
18399
|
t[0] === n ? r = t[1] : (r = l("text-destructive text-xs w-[16px]", n), t[0] = n, t[1] = r);
|
|
18400
18400
|
let i;
|
|
18401
|
-
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ (0, Y.jsx)(
|
|
18401
|
+
return t[2] === r ? i = t[3] : (i = /* @__PURE__ */ (0, Y.jsx)(Uy, { className: r }), t[2] = r, t[3] = i), i;
|
|
18402
18402
|
}, OM = () => ({
|
|
18403
18403
|
isMatch: (e) => {
|
|
18404
18404
|
if (e instanceof So) {
|
|
18405
|
-
let { special: t } =
|
|
18405
|
+
let { special: t } = Oy.parse(e.description || "");
|
|
18406
18406
|
return t === "column_filter";
|
|
18407
18407
|
}
|
|
18408
18408
|
return !1;
|
|
@@ -18414,10 +18414,10 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18414
18414
|
})
|
|
18415
18415
|
}), kM = (e) => {
|
|
18416
18416
|
let t = (0, X.c)(25), { path: n, form: r, schema: i } = e, a;
|
|
18417
|
-
t[0] === i.description ? a = t[1] : (a =
|
|
18417
|
+
t[0] === i.description ? a = t[1] : (a = Oy.parse(i.description), t[0] = i.description, t[1] = a);
|
|
18418
18418
|
let { description: o } = a, s = J.use(vM), c = Ns.entries(i.shape).find(MM)?.[1], u;
|
|
18419
18419
|
t[2] === n ? u = t[3] : (u = { name: n }, t[2] = n, t[3] = u);
|
|
18420
|
-
let { column_id: d, operator: f } =
|
|
18420
|
+
let { column_id: d, operator: f } = fv(u), p = SM(), m = [sb({
|
|
18421
18421
|
schema: c,
|
|
18422
18422
|
form: r,
|
|
18423
18423
|
path: `${n}.column_id`,
|
|
@@ -18439,7 +18439,7 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18439
18439
|
let e;
|
|
18440
18440
|
t[13] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
18441
18441
|
className: "text-muted-foreground text-xs font-semibold",
|
|
18442
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
18442
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
18443
18443
|
className: "whitespace-pre",
|
|
18444
18444
|
children: " "
|
|
18445
18445
|
}), /* @__PURE__ */ (0, Y.jsx)("p", { children: "This column type does not support filtering." })]
|
|
@@ -18448,13 +18448,13 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18448
18448
|
let e = `${n}.operator`, a;
|
|
18449
18449
|
t[14] !== o || t[15] !== i ? (a = (e) => {
|
|
18450
18450
|
let { field: t } = e;
|
|
18451
|
-
return /* @__PURE__ */ (0, Y.jsxs)(
|
|
18452
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18451
|
+
return /* @__PURE__ */ (0, Y.jsxs)(Ry, { children: [
|
|
18452
|
+
/* @__PURE__ */ (0, Y.jsx)(zy, {
|
|
18453
18453
|
className: "whitespace-pre",
|
|
18454
18454
|
children: " "
|
|
18455
18455
|
}),
|
|
18456
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18457
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18456
|
+
/* @__PURE__ */ (0, Y.jsx)(Vy, { children: o }),
|
|
18457
|
+
/* @__PURE__ */ (0, Y.jsx)(By, { children: /* @__PURE__ */ (0, Y.jsxs)($r, {
|
|
18458
18458
|
"data-testid": "marimo-plugin-data-frames-filter-operator-select",
|
|
18459
18459
|
value: t.value,
|
|
18460
18460
|
onValueChange: t.onChange,
|
|
@@ -18463,11 +18463,11 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18463
18463
|
children: /* @__PURE__ */ (0, Y.jsx)(Wr, { placeholder: "--" })
|
|
18464
18464
|
}), /* @__PURE__ */ (0, Y.jsx)(Yr, { children: /* @__PURE__ */ (0, Y.jsx)(Zr, { children: i.map(NM) }) })]
|
|
18465
18465
|
}) }),
|
|
18466
|
-
/* @__PURE__ */ (0, Y.jsx)(
|
|
18466
|
+
/* @__PURE__ */ (0, Y.jsx)(Hy, {})
|
|
18467
18467
|
] });
|
|
18468
18468
|
}, t[14] = o, t[15] = i, t[16] = a) : a = t[16];
|
|
18469
18469
|
let s;
|
|
18470
|
-
t[17] !== r.control || t[18] !== e || t[19] !== a ? (s = /* @__PURE__ */ (0, Y.jsx)(
|
|
18470
|
+
t[17] !== r.control || t[18] !== e || t[19] !== a ? (s = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18471
18471
|
control: r.control,
|
|
18472
18472
|
name: e,
|
|
18473
18473
|
render: a
|
|
@@ -18488,9 +18488,9 @@ var gM = J.lazy(() => import("./ConnectedDataExplorerComponent-jtTaDisw.js")), _
|
|
|
18488
18488
|
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
18489
18489
|
className: l("flex flex-row gap-2"),
|
|
18490
18490
|
children: m
|
|
18491
|
-
}), /* @__PURE__ */ (0, Y.jsx)(
|
|
18491
|
+
}), /* @__PURE__ */ (0, Y.jsx)(Hy, {})]
|
|
18492
18492
|
}), v;
|
|
18493
|
-
return t[21] !== r.control || t[22] !== n || t[23] !== _ ? (v = /* @__PURE__ */ (0, Y.jsx)(
|
|
18493
|
+
return t[21] !== r.control || t[22] !== n || t[23] !== _ ? (v = /* @__PURE__ */ (0, Y.jsx)(Fy, {
|
|
18494
18494
|
control: r.control,
|
|
18495
18495
|
name: n,
|
|
18496
18496
|
render: _
|
|
@@ -18549,8 +18549,8 @@ function PM(e, t, n = 0) {
|
|
|
18549
18549
|
//#endregion
|
|
18550
18550
|
//#region src/plugins/impl/data-frames/panel.tsx
|
|
18551
18551
|
var FM = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getColumnValues: i, columnTypesPerStep: a, lazy: o, ref: s }) => {
|
|
18552
|
-
let c =
|
|
18553
|
-
resolver:
|
|
18552
|
+
let c = _y({
|
|
18553
|
+
resolver: Dy(PO),
|
|
18554
18554
|
defaultValues: e,
|
|
18555
18555
|
mode: "onChange",
|
|
18556
18556
|
reValidateMode: "onChange"
|
|
@@ -18576,7 +18576,7 @@ var FM = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18576
18576
|
h,
|
|
18577
18577
|
o
|
|
18578
18578
|
]);
|
|
18579
|
-
let [g, v] = J.useState(e.transforms.length > 0 ? 0 : void 0), y =
|
|
18579
|
+
let [g, v] = J.useState(e.transforms.length > 0 ? 0 : void 0), y = Jv({
|
|
18580
18580
|
control: d,
|
|
18581
18581
|
name: "transforms"
|
|
18582
18582
|
}), b = c.watch("transforms"), x = g === void 0 ? void 0 : b[g]?.type, S = NO.options.find((e) => Yy(e).value === x), C = (0, J.useMemo)(() => PM(t, a, g), [
|
|
@@ -18678,7 +18678,7 @@ var FM = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18678
18678
|
"to automatically apply transformations."
|
|
18679
18679
|
] })]
|
|
18680
18680
|
}),
|
|
18681
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
18681
|
+
children: /* @__PURE__ */ (0, Y.jsx)(F, { className: "w-3 h-3 text-muted-foreground hover:text-foreground cursor-help" })
|
|
18682
18682
|
})]
|
|
18683
18683
|
})
|
|
18684
18684
|
]
|
|
@@ -18710,7 +18710,7 @@ var FM = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18710
18710
|
}
|
|
18711
18711
|
o(t);
|
|
18712
18712
|
},
|
|
18713
|
-
children: /* @__PURE__ */ (0, Y.jsx)(
|
|
18713
|
+
children: /* @__PURE__ */ (0, Y.jsx)(z, { className: "w-3 h-3" })
|
|
18714
18714
|
})]
|
|
18715
18715
|
}, i);
|
|
18716
18716
|
}), d;
|
|
@@ -18749,7 +18749,7 @@ var FM = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18749
18749
|
children: r
|
|
18750
18750
|
}), t[0] = r, t[1] = i);
|
|
18751
18751
|
let a, o;
|
|
18752
|
-
t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ (0, Y.jsx)(_i, { children: "Add Transform" }), o = /* @__PURE__ */ (0, Y.jsx)(
|
|
18752
|
+
t[2] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ (0, Y.jsx)(_i, { children: "Add Transform" }), o = /* @__PURE__ */ (0, Y.jsx)(ki, {}), t[2] = a, t[3] = o) : (a = t[2], o = t[3]);
|
|
18753
18753
|
let s;
|
|
18754
18754
|
t[4] === n ? s = t[5] : (s = Object.values(NO.options).map((e) => {
|
|
18755
18755
|
let t = Yy(e), r = RM[t.value];
|
|
@@ -18774,11 +18774,11 @@ var FM = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18774
18774
|
children: [
|
|
18775
18775
|
a,
|
|
18776
18776
|
o,
|
|
18777
|
-
/* @__PURE__ */ (0, Y.jsxs)(
|
|
18777
|
+
/* @__PURE__ */ (0, Y.jsxs)(Di, { children: [s, c] })
|
|
18778
18778
|
]
|
|
18779
18779
|
}), t[7] = s, t[8] = l);
|
|
18780
18780
|
let u;
|
|
18781
|
-
return t[9] !== i || t[10] !== l ? (u = /* @__PURE__ */ (0, Y.jsxs)(
|
|
18781
|
+
return t[9] !== i || t[10] !== l ? (u = /* @__PURE__ */ (0, Y.jsxs)(Ai, {
|
|
18782
18782
|
modal: !1,
|
|
18783
18783
|
children: [i, l]
|
|
18784
18784
|
}), t[9] = i, t[10] = l, t[11] = u) : u = t[11], u;
|
|
@@ -18795,7 +18795,7 @@ var FM = ({ initialValue: e, columns: t, onChange: n, onInvalidChange: r, getCol
|
|
|
18795
18795
|
explode_columns: rd,
|
|
18796
18796
|
expand_dict: ld,
|
|
18797
18797
|
unique: sd,
|
|
18798
|
-
pivot:
|
|
18798
|
+
pivot: ve
|
|
18799
18799
|
};
|
|
18800
18800
|
function zM(e) {
|
|
18801
18801
|
e.stopPropagation(), window.open("https://github.com/marimo-team/marimo/issues/new?title=New%20dataframe%20transform:&labels=enhancement&template=feature_request.yaml", "_blank", "noopener");
|
|
@@ -18913,7 +18913,7 @@ var BM = SD("marimo-dataframe").withData(G({
|
|
|
18913
18913
|
]
|
|
18914
18914
|
}), t[23] = re, t[24] = ie, t[25] = oe) : oe = t[25];
|
|
18915
18915
|
let se;
|
|
18916
|
-
t[26] === S ? se = t[27] : (se = S && /* @__PURE__ */ (0, Y.jsx)(
|
|
18916
|
+
t[26] === S ? se = t[27] : (se = S && /* @__PURE__ */ (0, Y.jsx)(xe, { size: "small" }), t[26] = S, t[27] = se);
|
|
18917
18917
|
let ce;
|
|
18918
18918
|
t[28] !== oe || t[29] !== se ? (ce = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
18919
18919
|
className: "flex items-center gap-2",
|
|
@@ -19007,12 +19007,12 @@ var BM = SD("marimo-dataframe").withData(G({
|
|
|
19007
19007
|
lazy: !1,
|
|
19008
19008
|
host: g
|
|
19009
19009
|
}), 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, t[67] = be) : be = t[67];
|
|
19010
|
-
let
|
|
19011
|
-
return t[68] !== pe || t[69] !== me || t[70] !== be ? (
|
|
19010
|
+
let Se;
|
|
19011
|
+
return t[68] !== pe || t[69] !== me || t[70] !== be ? (Se = /* @__PURE__ */ (0, Y.jsxs)("div", { children: [
|
|
19012
19012
|
pe,
|
|
19013
19013
|
me,
|
|
19014
19014
|
be
|
|
19015
|
-
] }), t[68] = pe, t[69] = me, t[70] = be, t[71] =
|
|
19015
|
+
] }), t[68] = pe, t[69] = me, t[70] = be, t[71] = Se) : Se = t[71], Se;
|
|
19016
19016
|
});
|
|
19017
19017
|
HM.displayName = "DataFrameComponent";
|
|
19018
19018
|
function UM() {
|
|
@@ -19075,12 +19075,12 @@ var KM = {
|
|
|
19075
19075
|
python: ud,
|
|
19076
19076
|
code: ud,
|
|
19077
19077
|
json: ld,
|
|
19078
|
-
text:
|
|
19078
|
+
text: te,
|
|
19079
19079
|
image: yd,
|
|
19080
19080
|
audio: dd,
|
|
19081
19081
|
video: fd,
|
|
19082
19082
|
data: pd,
|
|
19083
|
-
pdf:
|
|
19083
|
+
pdf: te,
|
|
19084
19084
|
zip: md,
|
|
19085
19085
|
unknown: Pa
|
|
19086
19086
|
};
|
|
@@ -19140,7 +19140,7 @@ function XM(e) {
|
|
|
19140
19140
|
let s = !r, c;
|
|
19141
19141
|
t[2] === s ? c = t[3] : (c = l({ "hidden group-hover:flex group-focus:flex": s }), t[2] = s, t[3] = c);
|
|
19142
19142
|
let u;
|
|
19143
|
-
t[4] !== r || t[5] !== e || t[6] !== i || t[7] !== c ? (u = /* @__PURE__ */ (0, Y.jsx)(
|
|
19143
|
+
t[4] !== r || t[5] !== e || t[6] !== i || t[7] !== c ? (u = /* @__PURE__ */ (0, Y.jsx)(Wi, {
|
|
19144
19144
|
checked: r,
|
|
19145
19145
|
"aria-label": e,
|
|
19146
19146
|
tabIndex: -1,
|
|
@@ -19167,7 +19167,7 @@ function XM(e) {
|
|
|
19167
19167
|
}), t[18] = a, t[19] = s), s;
|
|
19168
19168
|
}
|
|
19169
19169
|
var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i, label: a, restrictNavigation: o, list_directory: s, host: c }) => {
|
|
19170
|
-
let [u, d] = hi(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(`[${
|
|
19170
|
+
let [u, d] = hi(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(`[${Qi}]`)?.getAttribute(Qi), { data: S, error: C, isPending: w } = oc(() => s({ path: u }), [
|
|
19171
19171
|
u,
|
|
19172
19172
|
b,
|
|
19173
19173
|
s
|
|
@@ -19181,20 +19181,20 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19181
19181
|
}), h(0)), (0, J.useLayoutEffect)(() => {
|
|
19182
19182
|
y.current && (y.current = !1, g.current[0]?.focus());
|
|
19183
19183
|
}, [D]);
|
|
19184
|
-
let A = S?.files ?? [], j = new Set(e.map((e) => e.path)), M = r === "directory" || r === "all",
|
|
19184
|
+
let A = S?.files ?? [], j = new Set(e.map((e) => e.path)), M = r === "directory" || r === "all", P = r === "file" || r === "all", F = A.filter((e) => M && e.is_directory || P && !e.is_directory), L = F.length > 0 && F.every((e) => j.has(e.path));
|
|
19185
19185
|
if (!S && C) return /* @__PURE__ */ (0, Y.jsx)(ks, {
|
|
19186
19186
|
kind: "danger",
|
|
19187
19187
|
children: C.message
|
|
19188
19188
|
});
|
|
19189
|
-
let
|
|
19190
|
-
function
|
|
19189
|
+
let R = pe.guessDeliminator(n).deliminator, z = e.map((e) => /* @__PURE__ */ (0, Y.jsx)("li", { children: e.path }, e.id));
|
|
19190
|
+
function B(e) {
|
|
19191
19191
|
if (f) return;
|
|
19192
19192
|
if (p(!0), e === YM) {
|
|
19193
|
-
if (u ===
|
|
19193
|
+
if (u === R) {
|
|
19194
19194
|
p(!1);
|
|
19195
19195
|
return;
|
|
19196
19196
|
}
|
|
19197
|
-
e =
|
|
19197
|
+
e = Te.dirname(u), e === "" && (e = R);
|
|
19198
19198
|
}
|
|
19199
19199
|
let t = e.length < n.length;
|
|
19200
19200
|
o && t ? (x({
|
|
@@ -19203,7 +19203,7 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19203
19203
|
variant: "danger"
|
|
19204
19204
|
}), p(!1)) : (y.current = v.current?.contains(document.activeElement) ?? !1, d(e), p(!1));
|
|
19205
19205
|
}
|
|
19206
|
-
function
|
|
19206
|
+
function ee({ path: e, name: t, isDirectory: n }) {
|
|
19207
19207
|
return {
|
|
19208
19208
|
id: e,
|
|
19209
19209
|
name: t,
|
|
@@ -19211,22 +19211,22 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19211
19211
|
is_directory: n
|
|
19212
19212
|
};
|
|
19213
19213
|
}
|
|
19214
|
-
function
|
|
19215
|
-
let o =
|
|
19214
|
+
function te({ path: n, name: r, isDirectory: a }) {
|
|
19215
|
+
let o = ee({
|
|
19216
19216
|
path: n,
|
|
19217
19217
|
name: r,
|
|
19218
19218
|
isDirectory: a
|
|
19219
19219
|
});
|
|
19220
19220
|
j.has(n) ? t(e.filter((e) => e.path !== n)) : t(i ? [...e, o] : [o]);
|
|
19221
19221
|
}
|
|
19222
|
-
function te() {
|
|
19223
|
-
t(e.filter((e) => be.dirname(e.path) !== u));
|
|
19224
|
-
}
|
|
19225
19222
|
function ne() {
|
|
19223
|
+
t(e.filter((e) => Te.dirname(e.path) !== u));
|
|
19224
|
+
}
|
|
19225
|
+
function re() {
|
|
19226
19226
|
let n = [];
|
|
19227
19227
|
for (let e of A) {
|
|
19228
19228
|
if (!M && e.is_directory || j.has(e.path)) continue;
|
|
19229
|
-
let t =
|
|
19229
|
+
let t = ee({
|
|
19230
19230
|
path: e.path,
|
|
19231
19231
|
name: e.name,
|
|
19232
19232
|
isDirectory: e.is_directory
|
|
@@ -19235,18 +19235,18 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19235
19235
|
}
|
|
19236
19236
|
t([...e, ...n]);
|
|
19237
19237
|
}
|
|
19238
|
-
let
|
|
19238
|
+
let ie = [{
|
|
19239
19239
|
key: "parent",
|
|
19240
19240
|
name: YM,
|
|
19241
19241
|
Icon: cd,
|
|
19242
19242
|
isSelected: !1,
|
|
19243
19243
|
canSelect: !1,
|
|
19244
|
-
onPrimary: () =>
|
|
19244
|
+
onPrimary: () => B(YM),
|
|
19245
19245
|
onToggleSelect: null
|
|
19246
19246
|
}, ...A.map((e) => {
|
|
19247
19247
|
let t = e.path;
|
|
19248
19248
|
t.startsWith("//") && (t = t.slice(1));
|
|
19249
|
-
let n = M && e.is_directory ||
|
|
19249
|
+
let n = M && e.is_directory || P && !e.is_directory, r = j.has(t), i = e.is_directory ? "directory" : GM(e.name), a = () => te({
|
|
19250
19250
|
path: t,
|
|
19251
19251
|
name: e.name,
|
|
19252
19252
|
isDirectory: e.is_directory
|
|
@@ -19257,50 +19257,50 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19257
19257
|
Icon: KM[i],
|
|
19258
19258
|
isSelected: r,
|
|
19259
19259
|
canSelect: n,
|
|
19260
|
-
onPrimary: e.is_directory ? () =>
|
|
19260
|
+
onPrimary: e.is_directory ? () => B(t) : n ? a : () => {},
|
|
19261
19261
|
onToggleSelect: n ? a : null
|
|
19262
19262
|
};
|
|
19263
19263
|
})];
|
|
19264
|
-
function
|
|
19264
|
+
function ae(e) {
|
|
19265
19265
|
h(e), g.current[e]?.focus();
|
|
19266
19266
|
}
|
|
19267
19267
|
function oe(e, t) {
|
|
19268
|
-
let n =
|
|
19268
|
+
let n = ie.length - 1;
|
|
19269
19269
|
switch (e.key) {
|
|
19270
19270
|
case "ArrowDown":
|
|
19271
|
-
e.preventDefault(),
|
|
19271
|
+
e.preventDefault(), ae(Math.min(t + 1, n));
|
|
19272
19272
|
break;
|
|
19273
19273
|
case "ArrowUp":
|
|
19274
|
-
e.preventDefault(),
|
|
19274
|
+
e.preventDefault(), ae(Math.max(t - 1, 0));
|
|
19275
19275
|
break;
|
|
19276
19276
|
case "Home":
|
|
19277
|
-
e.preventDefault(),
|
|
19277
|
+
e.preventDefault(), ae(0);
|
|
19278
19278
|
break;
|
|
19279
19279
|
case "End":
|
|
19280
|
-
e.preventDefault(),
|
|
19280
|
+
e.preventDefault(), ae(n);
|
|
19281
19281
|
break;
|
|
19282
19282
|
case "Enter":
|
|
19283
|
-
e.preventDefault(),
|
|
19283
|
+
e.preventDefault(), ie[t].onPrimary();
|
|
19284
19284
|
break;
|
|
19285
|
-
case " ": e.preventDefault(),
|
|
19285
|
+
case " ": e.preventDefault(), ie[t].onToggleSelect?.();
|
|
19286
19286
|
}
|
|
19287
19287
|
}
|
|
19288
19288
|
let { protocol: se, parentDirectories: ce } = qM({
|
|
19289
19289
|
path: u,
|
|
19290
|
-
delimiter:
|
|
19290
|
+
delimiter: R,
|
|
19291
19291
|
initialPath: n,
|
|
19292
19292
|
restrictNavigation: o
|
|
19293
19293
|
}), le = ce.toReversed().map((e) => ({
|
|
19294
19294
|
path: e,
|
|
19295
|
-
name: e === se ? se : e.split(
|
|
19296
|
-
})), ue = r === "all" ?
|
|
19295
|
+
name: e === se ? se : e.split(R).findLast(Boolean) ?? e
|
|
19296
|
+
})), ue = r === "all" ? N.of("file", "folder") : r === "directory" ? N.of("folder") : N.of("file");
|
|
19297
19297
|
return /* @__PURE__ */ (0, Y.jsxs)("div", { children: [
|
|
19298
19298
|
C && /* @__PURE__ */ (0, Y.jsx)(ks, {
|
|
19299
19299
|
kind: "danger",
|
|
19300
19300
|
children: C.message
|
|
19301
19301
|
}),
|
|
19302
19302
|
(() => {
|
|
19303
|
-
let e = a ?? `Select ${ue.join(" and ", 2)}...`, t = /* @__PURE__ */ (0, Y.jsx)(Gr, { children:
|
|
19303
|
+
let e = a ?? `Select ${ue.join(" and ", 2)}...`, t = /* @__PURE__ */ (0, Y.jsx)(Gr, { children: I({ html: e }) });
|
|
19304
19304
|
return i ? /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
19305
19305
|
className: "flex items-center justify-between border px-2",
|
|
19306
19306
|
children: [/* @__PURE__ */ (0, Y.jsx)("div", {
|
|
@@ -19309,8 +19309,8 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19309
19309
|
}), /* @__PURE__ */ (0, Y.jsx)("div", { children: /* @__PURE__ */ (0, Y.jsx)(_, {
|
|
19310
19310
|
size: "xs",
|
|
19311
19311
|
variant: "link",
|
|
19312
|
-
onClick:
|
|
19313
|
-
children:
|
|
19312
|
+
onClick: L ? ne : re,
|
|
19313
|
+
children: L ? "Deselect all" : "Select all"
|
|
19314
19314
|
}) })]
|
|
19315
19315
|
}) : t;
|
|
19316
19316
|
})(),
|
|
@@ -19323,7 +19323,7 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19323
19323
|
let n = t === le.length - 1;
|
|
19324
19324
|
return /* @__PURE__ */ (0, Y.jsxs)("li", {
|
|
19325
19325
|
className: "flex items-center gap-0.5",
|
|
19326
|
-
children: [t > 0 && /* @__PURE__ */ (0, Y.jsx)(
|
|
19326
|
+
children: [t > 0 && /* @__PURE__ */ (0, Y.jsx)(ii, {
|
|
19327
19327
|
size: 14,
|
|
19328
19328
|
className: "text-muted-foreground shrink-0",
|
|
19329
19329
|
"aria-hidden": !0
|
|
@@ -19332,7 +19332,7 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19332
19332
|
title: e.path,
|
|
19333
19333
|
"aria-current": n ? "page" : void 0,
|
|
19334
19334
|
onClick: () => {
|
|
19335
|
-
n ||
|
|
19335
|
+
n || B(e.path);
|
|
19336
19336
|
},
|
|
19337
19337
|
className: l("rounded px-1 focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring", n ? "font-medium cursor-default" : "text-muted-foreground hover:bg-accent hover:text-foreground"),
|
|
19338
19338
|
children: e.name
|
|
@@ -19353,14 +19353,14 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19353
19353
|
children: [E && /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
19354
19354
|
className: "absolute inset-0 flex flex-col items-center justify-center gap-2 bg-background/80 text-xs text-muted-foreground pointer-events-none z-10",
|
|
19355
19355
|
role: "status",
|
|
19356
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
19356
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(xe, { size: "small" }), /* @__PURE__ */ (0, Y.jsx)("span", { children: "Listing files..." })]
|
|
19357
19357
|
}), /* @__PURE__ */ (0, Y.jsx)(Cn, {
|
|
19358
19358
|
ref: v,
|
|
19359
19359
|
className: "cursor-pointer table-fixed",
|
|
19360
19360
|
role: "grid",
|
|
19361
19361
|
"aria-label": "File browser",
|
|
19362
19362
|
"aria-multiselectable": i,
|
|
19363
|
-
children: /* @__PURE__ */ (0, Y.jsx)(ir, { children:
|
|
19363
|
+
children: /* @__PURE__ */ (0, Y.jsx)(ir, { children: ie.map((e, t) => /* @__PURE__ */ (0, Y.jsxs)(yr, {
|
|
19364
19364
|
role: "row",
|
|
19365
19365
|
ref: (e) => {
|
|
19366
19366
|
g.current[t] = e;
|
|
@@ -19412,7 +19412,7 @@ var ZM = ({ value: e, setValue: t, initialPath: n, selectionMode: r, multiple: i
|
|
|
19412
19412
|
children: /* @__PURE__ */ (0, Y.jsx)("ul", {
|
|
19413
19413
|
style: { marginBlock: 0 },
|
|
19414
19414
|
className: "m-0 text-xs text-muted-foreground",
|
|
19415
|
-
children:
|
|
19415
|
+
children: z
|
|
19416
19416
|
})
|
|
19417
19417
|
})] })
|
|
19418
19418
|
})
|
|
@@ -21548,7 +21548,7 @@ var RP = (e) => {
|
|
|
21548
21548
|
size: "xs"
|
|
21549
21549
|
}), t[15] = a) : a = t[15];
|
|
21550
21550
|
let o;
|
|
21551
|
-
t[16] === n ? o = t[17] : (o =
|
|
21551
|
+
t[16] === n ? o = t[17] : (o = I({ html: n }), t[16] = n, t[17] = o);
|
|
21552
21552
|
let c;
|
|
21553
21553
|
t[18] === Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ (0, Y.jsx)(Md, {
|
|
21554
21554
|
size: 14,
|
|
@@ -21612,9 +21612,9 @@ var RP = (e) => {
|
|
|
21612
21612
|
let O;
|
|
21613
21613
|
t[43] === D ? O = t[44] : (O = /* @__PURE__ */ (0, Y.jsx)("input", { ...D }), t[43] = D, t[44] = O);
|
|
21614
21614
|
let k;
|
|
21615
|
-
t[45] !== S || t[46] !== x ? (k = x ? /* @__PURE__ */ (0, Y.jsxs)("span", { children: ["To re-upload: ",
|
|
21615
|
+
t[45] !== S || t[46] !== x ? (k = x ? /* @__PURE__ */ (0, Y.jsxs)("span", { children: ["To re-upload: ", I({ html: S })] }) : /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
21616
21616
|
className: "mt-0",
|
|
21617
|
-
children:
|
|
21617
|
+
children: I({ html: S })
|
|
21618
21618
|
}), t[45] = S, t[46] = x, t[47] = k) : k = t[47];
|
|
21619
21619
|
let A = g && "text-primary", j = _ && "text-destructive", M;
|
|
21620
21620
|
t[48] !== A || t[49] !== j ? (M = l(A, j), t[48] = A, t[49] = j, t[50] = M) : M = t[50];
|
|
@@ -21623,8 +21623,8 @@ var RP = (e) => {
|
|
|
21623
21623
|
strokeWidth: 1.4,
|
|
21624
21624
|
className: M
|
|
21625
21625
|
}), t[51] = M, t[52] = N);
|
|
21626
|
-
let P = g && "text-primary",
|
|
21627
|
-
t[53] !== P || t[54] !==
|
|
21626
|
+
let P = g && "text-primary", F = _ && "text-destructive", L;
|
|
21627
|
+
t[53] !== P || t[54] !== F ? (L = l(P, F), t[53] = P, t[54] = F, t[55] = L) : L = t[55];
|
|
21628
21628
|
let R;
|
|
21629
21629
|
t[56] === L ? R = t[57] : (R = /* @__PURE__ */ (0, Y.jsx)(Dd, {
|
|
21630
21630
|
strokeWidth: 1.4,
|
|
@@ -21775,7 +21775,7 @@ var GP = SD("marimo-form").withData(G({
|
|
|
21775
21775
|
let M;
|
|
21776
21776
|
t[11] === o ? M = t[12] : (M = o === null ? null : /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
21777
21777
|
className: "text-center",
|
|
21778
|
-
children:
|
|
21778
|
+
children: I({ html: o })
|
|
21779
21779
|
}), t[11] = o, t[12] = M);
|
|
21780
21780
|
let N;
|
|
21781
21781
|
t[13] === C ? N = t[14] : (N = C != null && /* @__PURE__ */ (0, Y.jsx)(ks, {
|
|
@@ -21785,15 +21785,15 @@ var GP = SD("marimo-form").withData(G({
|
|
|
21785
21785
|
}), t[13] = C, t[14] = N);
|
|
21786
21786
|
let P;
|
|
21787
21787
|
t[15] === n ? P = t[16] : (P = /* @__PURE__ */ (0, Y.jsx)("div", { children: n }), t[15] = n, t[16] = P);
|
|
21788
|
-
let
|
|
21789
|
-
t[17] !== h || t[18] !== g || t[19] !== m ? (
|
|
21788
|
+
let F;
|
|
21789
|
+
t[17] !== h || t[18] !== g || t[19] !== m ? (F = m && JP(/* @__PURE__ */ (0, Y.jsx)(_, {
|
|
21790
21790
|
"data-testid": "marimo-plugin-form-clear-button",
|
|
21791
21791
|
variant: "text",
|
|
21792
21792
|
onClick: (e) => {
|
|
21793
21793
|
e.preventDefault(), E();
|
|
21794
21794
|
},
|
|
21795
21795
|
children: h
|
|
21796
|
-
}), g), t[17] = h, t[18] = g, t[19] = m, t[20] =
|
|
21796
|
+
}), g), t[17] = h, t[18] = g, t[19] = m, t[20] = F) : F = t[20];
|
|
21797
21797
|
let L = f || c, R;
|
|
21798
21798
|
t[21] === c ? R = t[22] : (R = c && /* @__PURE__ */ (0, Y.jsx)(A, { className: "h-4 w-4 mr-2 animate-spin" }), t[21] = c, t[22] = R);
|
|
21799
21799
|
let z;
|
|
@@ -21807,10 +21807,10 @@ var GP = SD("marimo-form").withData(G({
|
|
|
21807
21807
|
let B;
|
|
21808
21808
|
t[28] !== d || t[29] !== z ? (B = JP(z, d), t[28] = d, t[29] = z, t[30] = B) : B = t[30];
|
|
21809
21809
|
let ee;
|
|
21810
|
-
t[31] !== B || t[32] !==
|
|
21810
|
+
t[31] !== B || t[32] !== F ? (ee = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
21811
21811
|
className: "flex justify-end gap-2 font-code",
|
|
21812
|
-
children: [
|
|
21813
|
-
}), t[31] = B, t[32] =
|
|
21812
|
+
children: [F, B]
|
|
21813
|
+
}), t[31] = B, t[32] = F, t[33] = ee) : ee = t[33];
|
|
21814
21814
|
let te;
|
|
21815
21815
|
t[34] !== ee || t[35] !== k || t[36] !== M || t[37] !== N || t[38] !== P ? (te = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
21816
21816
|
className: k,
|
|
@@ -22908,7 +22908,7 @@ var RF = class {
|
|
|
22908
22908
|
onChange: e.setValue
|
|
22909
22909
|
}, t[2] = i, t[3] = e.setValue, t[4] = a, t[5] = o) : o = t[5];
|
|
22910
22910
|
let { value: s, onChange: c } = mi(o), u;
|
|
22911
|
-
t[6] !== e.start || t[7] !== e.stop ? (u = (t) =>
|
|
22911
|
+
t[6] !== e.start || t[7] !== e.stop ? (u = (t) => ke(t, e.start ?? -Infinity, e.stop ?? Infinity), t[6] = e.start, t[7] = e.stop, t[8] = u) : u = t[8];
|
|
22912
22912
|
let d = u, f;
|
|
22913
22913
|
t[9] !== d || t[10] !== c || t[11] !== s ? (f = (e) => {
|
|
22914
22914
|
let t = BF(e), n = t == null ? null : d(t);
|
|
@@ -22919,7 +22919,7 @@ var RF = class {
|
|
|
22919
22919
|
let y = e.start ?? void 0, b = e.stop ?? void 0, x;
|
|
22920
22920
|
t[15] !== d || t[16] !== s ? (x = s == null ? NaN : d(s), t[15] = d, t[16] = s, t[17] = x) : x = t[17];
|
|
22921
22921
|
let S = e.label || "Number input", C;
|
|
22922
|
-
t[18] !== p || t[19] !== n || t[20] !== e.disabled || t[21] !== e.step || t[22] !== y || t[23] !== b || t[24] !== x || t[25] !== S || t[26] !== v ? (C = /* @__PURE__ */ (0, Y.jsx)(
|
|
22922
|
+
t[18] !== p || t[19] !== n || t[20] !== e.disabled || t[21] !== e.step || t[22] !== y || t[23] !== b || t[24] !== x || t[25] !== S || t[26] !== v ? (C = /* @__PURE__ */ (0, Y.jsx)(ji, {
|
|
22923
22923
|
"data-testid": "marimo-plugin-number-input",
|
|
22924
22924
|
className: v,
|
|
22925
22925
|
minValue: y,
|
|
@@ -23637,7 +23637,7 @@ var HI = class {
|
|
|
23637
23637
|
children: f
|
|
23638
23638
|
}), t[13] = n, t[14] = e.label, t[15] = i, t[16] = f, t[17] = p) : p = t[17], p;
|
|
23639
23639
|
}, WI = J.forwardRef((e, t) => {
|
|
23640
|
-
let n = (0, X.c)(29), { className: r, steps: i, valueMap: a, ...o } = e, [s, c] = lk(!1), { locale: u } = zr(), d =
|
|
23640
|
+
let n = (0, X.c)(29), { className: r, steps: i, valueMap: a, ...o } = e, [s, c] = lk(!1), { locale: u } = zr(), d = vi(o.step, i, o.min, o.value?.map(a)), f = J.useRef(!1), p = J.useRef(0), m = J.useRef(0), h = J.useRef([]), g = J.useRef([]), _ = J.useRef(null), v = J.useRef(null), y = J.useRef(null), b;
|
|
23641
23641
|
n[0] === t ? b = n[1] : (b = (e) => {
|
|
23642
23642
|
_.current = e, typeof t == "function" ? t(e) : t && (t.current = e);
|
|
23643
23643
|
}, n[0] = t, n[1] = b);
|
|
@@ -23678,7 +23678,7 @@ var HI = class {
|
|
|
23678
23678
|
onMouseLeave: c.setFalse
|
|
23679
23679
|
})
|
|
23680
23680
|
}), n[6] = c.setFalse, n[7] = c.setTrue, n[8] = O) : O = n[8];
|
|
23681
|
-
let k = o.value != null && o.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(Le, { children:
|
|
23681
|
+
let k = o.value != null && o.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(Le, { children: di(a(o.value[0]), {
|
|
23682
23682
|
maximumFractionDigits: d,
|
|
23683
23683
|
locale: u
|
|
23684
23684
|
}) }, o.value[0]), A;
|
|
@@ -23701,7 +23701,7 @@ var HI = class {
|
|
|
23701
23701
|
onMouseLeave: c.setFalse
|
|
23702
23702
|
})
|
|
23703
23703
|
}), n[15] = c.setFalse, n[16] = c.setTrue, n[17] = P) : P = n[17];
|
|
23704
|
-
let F = ze, I = o.value != null && o.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(Le, { children:
|
|
23704
|
+
let F = ze, I = o.value != null && o.value.length === 2 && /* @__PURE__ */ (0, Y.jsx)(Le, { children: di(a(o.value[1]), {
|
|
23705
23705
|
maximumFractionDigits: d,
|
|
23706
23706
|
locale: u
|
|
23707
23707
|
}) }, o.value[1]), L;
|
|
@@ -23763,7 +23763,7 @@ var GI = class {
|
|
|
23763
23763
|
});
|
|
23764
23764
|
}
|
|
23765
23765
|
}, KI = (e) => {
|
|
23766
|
-
let t = (0, X.c)(47), { label: n, setValue: r, value: i, start: a, stop: o, step: s, steps: c, debounce: u, orientation: d, showValue: f, fullWidth: p, disabled: m, valueMap: h } = e, g = (0, J.useId)(), { locale: _ } = zr(), [v, y] = (0, J.useState)(i), b =
|
|
23766
|
+
let t = (0, X.c)(47), { label: n, setValue: r, value: i, start: a, stop: o, step: s, steps: c, debounce: u, orientation: d, showValue: f, fullWidth: p, disabled: m, valueMap: h } = e, g = (0, J.useId)(), { locale: _ } = zr(), [v, y] = (0, J.useState)(i), b = vi(s, c, a, v.map(h)), x, S;
|
|
23767
23767
|
t[0] === i ? (x = t[1], S = t[2]) : (x = () => {
|
|
23768
23768
|
y(i);
|
|
23769
23769
|
}, S = [i], t[0] = i, t[1] = x, t[2] = S), (0, J.useEffect)(x, S);
|
|
@@ -23804,10 +23804,10 @@ var GI = class {
|
|
|
23804
23804
|
}), 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, t[34] = L) : L = t[34];
|
|
23805
23805
|
let R = f && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
23806
23806
|
className: "text-xs text-muted-foreground min-w-[16px]",
|
|
23807
|
-
children: `${
|
|
23807
|
+
children: `${di(h(v[0]), {
|
|
23808
23808
|
maximumFractionDigits: b,
|
|
23809
23809
|
locale: _
|
|
23810
|
-
})}, ${
|
|
23810
|
+
})}, ${di(h(v[1]), {
|
|
23811
23811
|
maximumFractionDigits: b,
|
|
23812
23812
|
locale: _
|
|
23813
23813
|
})}`
|
|
@@ -24002,7 +24002,7 @@ var GI = class {
|
|
|
24002
24002
|
render(e) {
|
|
24003
24003
|
let t = (t) => {
|
|
24004
24004
|
let { steps: n } = e.data;
|
|
24005
|
-
return n && n.length > 0 ? n[
|
|
24005
|
+
return n && n.length > 0 ? n[ke(t, 0, n.length - 1)] : t;
|
|
24006
24006
|
};
|
|
24007
24007
|
return /* @__PURE__ */ (0, Y.jsx)(rL, {
|
|
24008
24008
|
...e.data,
|
|
@@ -24028,13 +24028,13 @@ function nL(e) {
|
|
|
24028
24028
|
r > 0 && r < n && (n = r);
|
|
24029
24029
|
}
|
|
24030
24030
|
(!Number.isFinite(n) || n <= 0) && (n = 1);
|
|
24031
|
-
let r =
|
|
24031
|
+
let r = Pi(e, n);
|
|
24032
24032
|
return {
|
|
24033
24033
|
steps: e,
|
|
24034
24034
|
fractionDigits: r,
|
|
24035
|
-
minValue:
|
|
24036
|
-
maxValue:
|
|
24037
|
-
inputStep:
|
|
24035
|
+
minValue: ai(t[0], r),
|
|
24036
|
+
maxValue: ai(t[t.length - 1], r),
|
|
24037
|
+
inputStep: ai(n, r),
|
|
24038
24038
|
formatOptions: {
|
|
24039
24039
|
minimumFractionDigits: 0,
|
|
24040
24040
|
maximumFractionDigits: r
|
|
@@ -24045,9 +24045,9 @@ var rL = (e) => {
|
|
|
24045
24045
|
let t = (0, X.c)(85), { label: n, setValue: r, value: i, start: a, stop: o, step: s, steps: c, debounce: u, orientation: d, showValue: f, fullWidth: p, valueMap: m, includeInput: h, disabled: g } = e, _ = (0, J.useId)(), v = (0, J.useId)(), { locale: y } = zr(), b = p && d === "horizontal", [x, S] = hi(i, Object.is), C;
|
|
24046
24046
|
t[0] === c ? C = t[1] : (C = nL(c), t[0] = c, t[1] = C);
|
|
24047
24047
|
let w = C, T, E;
|
|
24048
|
-
t[2] === s ? (T = t[3], E = t[4]) : (T =
|
|
24048
|
+
t[2] === s ? (T = t[3], E = t[4]) : (T = Ii(s ?? 0), E = s != null && ai(s, T) === s, t[2] = s, t[3] = T, t[4] = E);
|
|
24049
24049
|
let D = E, O;
|
|
24050
|
-
t[5] !== x || t[6] !== D || t[7] !== a || t[8] !== s || t[9] !== T || t[10] !== c || t[11] !== m ? (O = s != null && Number.isFinite(s) && s > 0 && !c?.length ? Math.max(
|
|
24050
|
+
t[5] !== x || t[6] !== D || t[7] !== a || t[8] !== s || t[9] !== T || t[10] !== c || t[11] !== m ? (O = s != null && Number.isFinite(s) && s > 0 && !c?.length ? Math.max(Ii(a), D ? T : 2, Math.ceil(-Math.log10(s))) : vi(s, c, a, [m(x)]), t[5] = x, t[6] = D, t[7] = a, t[8] = s, t[9] = T, t[10] = c, t[11] = m, t[12] = O) : O = t[12];
|
|
24051
24051
|
let k = O, A;
|
|
24052
24052
|
t[13] !== x || t[14] !== S || t[15] !== r || t[16] !== a || t[17] !== w ? (A = (e) => {
|
|
24053
24053
|
if (w) {
|
|
@@ -24056,7 +24056,7 @@ var rL = (e) => {
|
|
|
24056
24056
|
S(0), r(0);
|
|
24057
24057
|
return;
|
|
24058
24058
|
}
|
|
24059
|
-
let i =
|
|
24059
|
+
let i = ai(e, n), a = tL(t, i), o = ai(t[x] ?? t[0], n);
|
|
24060
24060
|
a === x && i !== o && (a = i > o ? Math.min(x + 1, t.length - 1) : Math.max(x - 1, 0)), S(a), r(a);
|
|
24061
24061
|
return;
|
|
24062
24062
|
}
|
|
@@ -24065,7 +24065,7 @@ var rL = (e) => {
|
|
|
24065
24065
|
}, t[13] = x, t[14] = S, t[15] = r, t[16] = a, t[17] = w, t[18] = A) : A = t[18];
|
|
24066
24066
|
let j = A, M;
|
|
24067
24067
|
t[19] !== x || t[20] !== a || t[21] !== s || t[22] !== w || t[23] !== o || t[24] !== m ? (M = w ? {
|
|
24068
|
-
value:
|
|
24068
|
+
value: ai(m(x), w.fractionDigits),
|
|
24069
24069
|
minValue: w.minValue,
|
|
24070
24070
|
maxValue: w.maxValue,
|
|
24071
24071
|
step: w.inputStep,
|
|
@@ -24114,13 +24114,13 @@ var rL = (e) => {
|
|
|
24114
24114
|
let ce;
|
|
24115
24115
|
t[58] !== k || t[59] !== x || t[60] !== b || t[61] !== y || t[62] !== f || t[63] !== m ? (ce = f && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
24116
24116
|
className: l("text-xs text-muted-foreground min-w-[16px]", b && "col-span-full row-start-2 min-w-0 max-w-full justify-self-end break-all"),
|
|
24117
|
-
children:
|
|
24117
|
+
children: di(m(x), {
|
|
24118
24118
|
locale: y,
|
|
24119
24119
|
maximumFractionDigits: k
|
|
24120
24120
|
})
|
|
24121
24121
|
}), t[58] = k, t[59] = x, t[60] = b, t[61] = y, t[62] = f, t[63] = m, t[64] = ce) : ce = t[64];
|
|
24122
24122
|
let le;
|
|
24123
|
-
t[65] !== g || t[66] !== j || t[67] !== h || t[68] !== N || t[69] !== b || t[70] !== n ? (le = h && /* @__PURE__ */ (0, Y.jsx)(
|
|
24123
|
+
t[65] !== g || t[66] !== j || t[67] !== h || t[68] !== N || t[69] !== b || t[70] !== n ? (le = h && /* @__PURE__ */ (0, Y.jsx)(ji, {
|
|
24124
24124
|
...N,
|
|
24125
24125
|
onChange: j,
|
|
24126
24126
|
className: l("w-24", b && "col-start-2 row-start-1"),
|
|
@@ -24208,7 +24208,7 @@ var rL = (e) => {
|
|
|
24208
24208
|
t[11] === p ? e = t[12] : (e = (e, t) => /* @__PURE__ */ (0, Y.jsx)(Nt, {
|
|
24209
24209
|
value: t.toString(),
|
|
24210
24210
|
className: l(p && "w-full justify-start"),
|
|
24211
|
-
children:
|
|
24211
|
+
children: I({ html: e })
|
|
24212
24212
|
}, t), t[11] = p, t[12] = e), b = n.map(e), t[8] = p, t[9] = n, t[10] = b;
|
|
24213
24213
|
} else b = t[10];
|
|
24214
24214
|
let x;
|
|
@@ -24382,7 +24382,7 @@ var lL = class {
|
|
|
24382
24382
|
passwordHasValue: U().optional()
|
|
24383
24383
|
});
|
|
24384
24384
|
render(e) {
|
|
24385
|
-
let t = e.data.kind === "password" ? e.host.closest(`[${
|
|
24385
|
+
let t = e.data.kind === "password" ? e.host.closest(`[${Qi}]`)?.getAttribute(Qi) : void 0;
|
|
24386
24386
|
return /* @__PURE__ */ (0, Y.jsx)(pL, {
|
|
24387
24387
|
...e.data,
|
|
24388
24388
|
value: e.value,
|
|
@@ -24424,7 +24424,7 @@ var lL = class {
|
|
|
24424
24424
|
let T = w, E;
|
|
24425
24425
|
if (e.debounce === !0) {
|
|
24426
24426
|
let r = b[e.kind], i = e.minLength != null && e.minLength > 0, a;
|
|
24427
|
-
t[15] !== S || t[16] !== T || t[17] !== n || t[18] !== p || t[19] !== c || t[20] !== e.disabled || t[21] !== e.kind || t[22] !== e.maxLength || t[23] !== e.minLength || t[24] !== d || t[25] !== r || t[26] !== i || t[27] !== s ? (a = /* @__PURE__ */ (0, Y.jsx)(
|
|
24427
|
+
t[15] !== S || t[16] !== T || t[17] !== n || t[18] !== p || t[19] !== c || t[20] !== e.disabled || t[21] !== e.kind || t[22] !== e.maxLength || t[23] !== e.minLength || t[24] !== d || t[25] !== r || t[26] !== i || t[27] !== s ? (a = /* @__PURE__ */ (0, Y.jsx)(gi, {
|
|
24428
24428
|
id: n,
|
|
24429
24429
|
"data-testid": "marimo-plugin-text-input",
|
|
24430
24430
|
type: e.kind,
|
|
@@ -24444,7 +24444,7 @@ var lL = class {
|
|
|
24444
24444
|
let r = b[e.kind], i = e.minLength != null && e.minLength > 0, a;
|
|
24445
24445
|
t[29] === Symbol.for("react.memo_cache_sentinel") ? (a = (e) => h(e.currentTarget.value), t[29] = a) : a = t[29];
|
|
24446
24446
|
let o;
|
|
24447
|
-
t[30] !== S || t[31] !== T || t[32] !== n || t[33] !== p || t[34] !== c || t[35] !== e.debounce || t[36] !== e.disabled || t[37] !== e.kind || t[38] !== e.maxLength || t[39] !== e.minLength || t[40] !== d || t[41] !== r || t[42] !== i || t[43] !== s ? (o = /* @__PURE__ */ (0, Y.jsx)(
|
|
24447
|
+
t[30] !== S || t[31] !== T || t[32] !== n || t[33] !== p || t[34] !== c || t[35] !== e.debounce || t[36] !== e.disabled || t[37] !== e.kind || t[38] !== e.maxLength || t[39] !== e.minLength || t[40] !== d || t[41] !== r || t[42] !== i || t[43] !== s ? (o = /* @__PURE__ */ (0, Y.jsx)(wi, {
|
|
24448
24448
|
id: n,
|
|
24449
24449
|
"data-testid": "marimo-plugin-text-input",
|
|
24450
24450
|
type: e.kind,
|
|
@@ -24468,7 +24468,7 @@ var lL = class {
|
|
|
24468
24468
|
let o;
|
|
24469
24469
|
t[47] === Symbol.for("react.memo_cache_sentinel") ? (o = (e) => h(e.currentTarget.value), t[47] = o) : o = t[47];
|
|
24470
24470
|
let l;
|
|
24471
|
-
t[48] !== S || t[49] !== T || t[50] !== n || t[51] !== p || t[52] !== c || t[53] !== e.disabled || t[54] !== e.kind || t[55] !== e.maxLength || t[56] !== e.minLength || t[57] !== r || t[58] !== i || t[59] !== a || t[60] !== s ? (l = /* @__PURE__ */ (0, Y.jsx)(
|
|
24471
|
+
t[48] !== S || t[49] !== T || t[50] !== n || t[51] !== p || t[52] !== c || t[53] !== e.disabled || t[54] !== e.kind || t[55] !== e.maxLength || t[56] !== e.minLength || t[57] !== r || t[58] !== i || t[59] !== a || t[60] !== s ? (l = /* @__PURE__ */ (0, Y.jsx)(xi, {
|
|
24472
24472
|
id: n,
|
|
24473
24473
|
"data-testid": "marimo-plugin-text-input",
|
|
24474
24474
|
type: e.kind,
|
|
@@ -24504,7 +24504,7 @@ function mL(e, t) {
|
|
|
24504
24504
|
}
|
|
24505
24505
|
//#endregion
|
|
24506
24506
|
//#region src/plugins/impl/vega/VegaPlugin.tsx
|
|
24507
|
-
var hL = J.lazy(() => import("./vega-component-
|
|
24507
|
+
var hL = J.lazy(() => import("./vega-component-D61CTW1X.js")), gL = class {
|
|
24508
24508
|
tagName = "marimo-vega";
|
|
24509
24509
|
validator = G({
|
|
24510
24510
|
spec: os({}).transform((e) => e),
|
|
@@ -24553,7 +24553,7 @@ var hL = J.lazy(() => import("./vega-component-DpTyTrz3.js")), gL = class {
|
|
|
24553
24553
|
value: t.toString(),
|
|
24554
24554
|
children: [/* @__PURE__ */ (0, Y.jsx)(lr, {
|
|
24555
24555
|
className: "py-2 text-md",
|
|
24556
|
-
children:
|
|
24556
|
+
children: I({ html: n[t] ?? "" })
|
|
24557
24557
|
}), /* @__PURE__ */ (0, Y.jsx)(kt, {
|
|
24558
24558
|
className: "text-md",
|
|
24559
24559
|
children: e
|
|
@@ -24661,7 +24661,7 @@ var xL = class {
|
|
|
24661
24661
|
r(!1);
|
|
24662
24662
|
}
|
|
24663
24663
|
}
|
|
24664
|
-
}, a = n ? A : an, o = e.label ?
|
|
24664
|
+
}, a = n ? A : an, o = e.label ? I({ html: e.label }) : "Download";
|
|
24665
24665
|
return /* @__PURE__ */ (0, Y.jsxs)("a", {
|
|
24666
24666
|
href: Cr(e.data) ? e.data : void 0,
|
|
24667
24667
|
download: e.filename ?? "",
|
|
@@ -24734,7 +24734,7 @@ var xL = class {
|
|
|
24734
24734
|
return t[11] === h ? e = t[12] : (e = /* @__PURE__ */ (0, Y.jsx)(Ds, { error: h }), t[11] = h, t[12] = e), e;
|
|
24735
24735
|
}
|
|
24736
24736
|
let _;
|
|
24737
|
-
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 &&
|
|
24737
|
+
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 && I({ html: m.html }), t[13] = m, t[14] = g, t[15] = r, t[16] = _) : _ = t[16];
|
|
24738
24738
|
let v;
|
|
24739
24739
|
return t[17] !== s || t[18] !== _ ? (v = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
24740
24740
|
ref: s,
|
|
@@ -24789,7 +24789,7 @@ function HL(e) {
|
|
|
24789
24789
|
let n = e.target;
|
|
24790
24790
|
e.isIntersecting ? (!s.current || n.getBoundingClientRect().top < s.current.getBoundingClientRect().top) && (s.current = n, t = !0) : n === s.current && (s.current = null, t = !0);
|
|
24791
24791
|
}), t && s.current) {
|
|
24792
|
-
let e =
|
|
24792
|
+
let e = ka(s.current), t = "id" in e ? e.id : e.path;
|
|
24793
24793
|
r(t), a(l.current.get(s.current));
|
|
24794
24794
|
}
|
|
24795
24795
|
}, {
|
|
@@ -24798,7 +24798,7 @@ function HL(e) {
|
|
|
24798
24798
|
threshold: 0
|
|
24799
24799
|
}), e.forEach((t) => {
|
|
24800
24800
|
if (t) {
|
|
24801
|
-
let n =
|
|
24801
|
+
let n = ka(t[0]), r = e.map(UL).filter((e) => "id" in n ? e.id === n.id : e.textContent === t[0].textContent).indexOf(t[0]);
|
|
24802
24802
|
l.current.set(t[0], r), o.current?.observe(t[0]);
|
|
24803
24803
|
}
|
|
24804
24804
|
}), () => {
|
|
@@ -24839,7 +24839,7 @@ function KL(e, t) {
|
|
|
24839
24839
|
//#endregion
|
|
24840
24840
|
//#region src/components/editor/chrome/panels/outline/floating-outline.tsx
|
|
24841
24841
|
var qL = () => {
|
|
24842
|
-
let e = (0, X.c)(22), { items: t } = uo(
|
|
24842
|
+
let e = (0, X.c)(22), { items: t } = uo(ya), n;
|
|
24843
24843
|
e[0] === t ? n = e[1] : (n = WL(t), e[0] = t, e[1] = n);
|
|
24844
24844
|
let { activeHeaderId: r, activeOccurrences: i } = HL(n), [a, o] = J.useState(!1), [s, c] = J.useState(!1), u = a || s;
|
|
24845
24845
|
if (t.length < 2) return null;
|
|
@@ -24923,7 +24923,7 @@ var qL = () => {
|
|
|
24923
24923
|
children: u
|
|
24924
24924
|
}), t[10] = s, t[11] = c, t[12] = u, t[13] = d) : d = t[13], d;
|
|
24925
24925
|
}, XL = (e) => {
|
|
24926
|
-
let t = (0, X.c)(12), { label: n } = e, { items: r } = uo(
|
|
24926
|
+
let t = (0, X.c)(12), { label: n } = e, { items: r } = uo(ya), i;
|
|
24927
24927
|
t[0] === r ? i = t[1] : (i = WL(r), t[0] = r, t[1] = i);
|
|
24928
24928
|
let { activeHeaderId: a, activeOccurrences: o } = HL(i);
|
|
24929
24929
|
if (r.length === 0) {
|
|
@@ -25758,12 +25758,12 @@ var qL = () => {
|
|
|
25758
25758
|
let f = d, p = `flex flex-col ${c} max-w-sm p-6 mx-auto`, m;
|
|
25759
25759
|
t[8] === n ? m = t[9] : (m = n && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
25760
25760
|
className: "text-lg font-bold text-foreground/60",
|
|
25761
|
-
children:
|
|
25761
|
+
children: I({ html: n })
|
|
25762
25762
|
}), t[8] = n, t[9] = m);
|
|
25763
25763
|
let h;
|
|
25764
25764
|
t[10] === r ? h = t[11] : (h = r && /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
25765
25765
|
className: "text-sm text-muted-foreground",
|
|
25766
|
-
children:
|
|
25766
|
+
children: I({ html: r })
|
|
25767
25767
|
}), t[10] = r, t[11] = h);
|
|
25768
25768
|
let g;
|
|
25769
25769
|
t[12] === u ? g = t[13] : (g = u(), t[12] = u, t[13] = g);
|
|
@@ -25785,7 +25785,7 @@ var qL = () => {
|
|
|
25785
25785
|
}), t[19] = p, t[20] = m, t[21] = h, t[22] = v, t[23] = y) : y = t[23], y;
|
|
25786
25786
|
};
|
|
25787
25787
|
function tR(e) {
|
|
25788
|
-
return
|
|
25788
|
+
return ke(e, 0, 100);
|
|
25789
25789
|
}
|
|
25790
25790
|
var nR = QL.default.humanizer({
|
|
25791
25791
|
language: "shortEn",
|
|
@@ -26029,13 +26029,13 @@ var iR = (/* @__PURE__ */ i(((e) => {
|
|
|
26029
26029
|
}
|
|
26030
26030
|
}, lR = (e) => {
|
|
26031
26031
|
let t = (0, X.c)(31), { value: n, label: r, caption: i, bordered: a, direction: o, target_direction: s, slot: u } = e, { locale: d } = zr(), f;
|
|
26032
|
-
t[0] !== d || t[1] !== n ? (f = () => n == null ? /* @__PURE__ */ (0, Y.jsx)("i", { children: "No value" }) : typeof n == "string" ? n : typeof n == "number" ?
|
|
26032
|
+
t[0] !== d || t[1] !== n ? (f = () => n == null ? /* @__PURE__ */ (0, Y.jsx)("i", { children: "No value" }) : typeof n == "string" ? n : typeof n == "number" ? Ni(n, d) : typeof n == "boolean" ? n ? "True" : "False" : String(n), t[0] = d, t[1] = n, t[2] = f) : f = t[2];
|
|
26033
26033
|
let p = f, m = o === s, h = m ? "var(--grass-8)" : "var(--red-8)", g = m ? "var(--grass-9)" : "var(--red-9)", _;
|
|
26034
26034
|
t[3] === u ? _ = t[4] : (_ = () => {
|
|
26035
26035
|
let e = St(u);
|
|
26036
26036
|
if (e?.[0]) {
|
|
26037
26037
|
let { mimetype: t, data: n } = e[0];
|
|
26038
|
-
return t !== "text/html" && c.warn(`Expected text/html, got ${t}`),
|
|
26038
|
+
return t !== "text/html" && c.warn(`Expected text/html, got ${t}`), I({
|
|
26039
26039
|
html: n,
|
|
26040
26040
|
alwaysSanitizeHtml: !0
|
|
26041
26041
|
});
|
|
@@ -29186,7 +29186,7 @@ var $R, ez, tz, nz, rz, iz, az, oz, sz, cz, lz, uz, dz, fz, pz, mz, hz, gz, _z,
|
|
|
29186
29186
|
}
|
|
29187
29187
|
})), bz = (/* @__PURE__ */ i(((e, t) => {
|
|
29188
29188
|
t.exports = zR().default, t.exports.utils = SR(), t.exports.calculateUtils = CR(), t.exports.Responsive = VR().default, t.exports.Responsive.utils = BR(), t.exports.WidthProvider = yz().default;
|
|
29189
|
-
})))(), xz = [
|
|
29189
|
+
})))(), xz = [ic(), tc({
|
|
29190
29190
|
syntaxHighlighting: !0,
|
|
29191
29191
|
highlightSpecialChars: !1,
|
|
29192
29192
|
history: !1,
|
|
@@ -29197,7 +29197,7 @@ var $R, ez, tz, nz, rz, iz, az, oz, sz, cz, lz, uz, dz, fz, pz, mz, hz, gz, _z,
|
|
|
29197
29197
|
let t = (0, X.c)(8), { code: n, className: r } = e, { theme: i } = Go(), a;
|
|
29198
29198
|
t[0] === r ? a = t[1] : (a = l(r, "text-muted-foreground flex flex-col overflow-hidden"), t[0] = r, t[1] = a);
|
|
29199
29199
|
let o = i === "dark" ? "dark" : "light", s;
|
|
29200
|
-
t[2] !== n || t[3] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(
|
|
29200
|
+
t[2] !== n || t[3] !== o ? (s = /* @__PURE__ */ (0, Y.jsx)(nc, {
|
|
29201
29201
|
minHeight: "10px",
|
|
29202
29202
|
theme: o,
|
|
29203
29203
|
height: "100%",
|
|
@@ -29506,7 +29506,7 @@ var Az = (e) => {
|
|
|
29506
29506
|
let c;
|
|
29507
29507
|
t[4] !== n.columns || t[5] !== s ? (c = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
29508
29508
|
className: "flex flex-row items-center gap-2",
|
|
29509
|
-
children: [o, /* @__PURE__ */ (0, Y.jsx)(
|
|
29509
|
+
children: [o, /* @__PURE__ */ (0, Y.jsx)(ji, {
|
|
29510
29510
|
"data-testid": "grid-columns-input",
|
|
29511
29511
|
id: "columns",
|
|
29512
29512
|
value: n.columns,
|
|
@@ -29531,7 +29531,7 @@ var Az = (e) => {
|
|
|
29531
29531
|
let d;
|
|
29532
29532
|
t[11] !== n.rowHeight || t[12] !== u ? (d = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
29533
29533
|
className: "flex flex-row items-center gap-2",
|
|
29534
|
-
children: [l, /* @__PURE__ */ (0, Y.jsx)(
|
|
29534
|
+
children: [l, /* @__PURE__ */ (0, Y.jsx)(ji, {
|
|
29535
29535
|
"data-testid": "grid-row-height-input",
|
|
29536
29536
|
id: "rowHeight",
|
|
29537
29537
|
value: n.rowHeight,
|
|
@@ -29556,7 +29556,7 @@ var Az = (e) => {
|
|
|
29556
29556
|
let m;
|
|
29557
29557
|
t[18] !== n.maxWidth || t[19] !== p ? (m = /* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
29558
29558
|
className: "flex flex-row items-center gap-2",
|
|
29559
|
-
children: [f, /* @__PURE__ */ (0, Y.jsx)(
|
|
29559
|
+
children: [f, /* @__PURE__ */ (0, Y.jsx)(ji, {
|
|
29560
29560
|
"data-testid": "grid-max-width-input",
|
|
29561
29561
|
id: "maxWidth",
|
|
29562
29562
|
value: n.maxWidth,
|
|
@@ -29570,7 +29570,7 @@ var Az = (e) => {
|
|
|
29570
29570
|
t[21] === Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ (0, Y.jsxs)(Gr, {
|
|
29571
29571
|
className: "flex flex-row items-center gap-1",
|
|
29572
29572
|
htmlFor: "lock",
|
|
29573
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
29573
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(oe, { className: "h-3 w-3" }), "Bordered"]
|
|
29574
29574
|
}), t[21] = h) : h = t[21];
|
|
29575
29575
|
let g;
|
|
29576
29576
|
t[22] !== n || t[23] !== r ? (g = (e) => {
|
|
@@ -29674,7 +29674,7 @@ var Mz = (e) => {
|
|
|
29674
29674
|
children: y
|
|
29675
29675
|
}), t[11] = y, t[12] = b);
|
|
29676
29676
|
let x;
|
|
29677
|
-
t[13] !== g || t[14] !== _ || t[15] !== v || t[16] !== b ? (x = /* @__PURE__ */ (0, Y.jsxs)(
|
|
29677
|
+
t[13] !== g || t[14] !== _ || t[15] !== v || t[16] !== b ? (x = /* @__PURE__ */ (0, Y.jsxs)(Ai, {
|
|
29678
29678
|
open: g,
|
|
29679
29679
|
onOpenChange: _,
|
|
29680
29680
|
children: [v, b]
|
|
@@ -29709,7 +29709,7 @@ var Mz = (e) => {
|
|
|
29709
29709
|
})
|
|
29710
29710
|
}), t[28] = T, t[29] = D, t[30] = O) : O = t[30];
|
|
29711
29711
|
let k;
|
|
29712
|
-
t[31] !== S || t[32] !== C || t[33] !== O ? (k = /* @__PURE__ */ (0, Y.jsxs)(
|
|
29712
|
+
t[31] !== S || t[32] !== C || t[33] !== O ? (k = /* @__PURE__ */ (0, Y.jsxs)(Ai, {
|
|
29713
29713
|
open: S,
|
|
29714
29714
|
onOpenChange: C,
|
|
29715
29715
|
children: [w, O]
|
|
@@ -29888,9 +29888,9 @@ var Hz = (e) => {
|
|
|
29888
29888
|
//#endregion
|
|
29889
29889
|
//#region src/components/editor/cell/useDeleteCell.tsx
|
|
29890
29890
|
function Uz() {
|
|
29891
|
-
let e = (0, X.c)(3), { deleteCells: t, undoDeleteCell: n } =
|
|
29891
|
+
let e = (0, X.c)(3), { deleteCells: t, undoDeleteCell: n } = P(), r;
|
|
29892
29892
|
return e[0] !== t || e[1] !== n ? (r = (e) => {
|
|
29893
|
-
let { cellId: r } = e, i = (fo.get(
|
|
29893
|
+
let { cellId: r } = e, i = (fo.get(ba).cellData[r]?.code ?? "").trim() === "";
|
|
29894
29894
|
if (t({ cellIds: [r] }) && !i) {
|
|
29895
29895
|
let { dismiss: e } = x({
|
|
29896
29896
|
title: "Cell deleted",
|
|
@@ -32407,7 +32407,7 @@ function jU() {
|
|
|
32407
32407
|
return /* @__PURE__ */ new Set();
|
|
32408
32408
|
}
|
|
32409
32409
|
var MU = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skippedIds: i, noOutputIds: a, slideTypes: o, onSlideClick: s }) => {
|
|
32410
|
-
let l =
|
|
32410
|
+
let l = xa(), { moveCellToIndex: u, createCell: d } = P(), f = Uz(), p = (0, J.useRef)(null), m = AU(p), [h, g] = (0, J.useState)(null), [_, v] = (0, J.useState)(null), y = TU(t), b = (e, t) => {
|
|
32411
32411
|
d({
|
|
32412
32412
|
...t ? { before: e } : { after: e },
|
|
32413
32413
|
focus: !1
|
|
@@ -32489,7 +32489,7 @@ var MU = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skipped
|
|
|
32489
32489
|
ref: p,
|
|
32490
32490
|
children: [/* @__PURE__ */ (0, Y.jsxs)("div", {
|
|
32491
32491
|
className: "text-xs text-gray-500 flex items-center gap-0.5",
|
|
32492
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
32492
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(F, { className: "h-3 w-3" }), "Reordering is not supported in multi-column mode"]
|
|
32493
32493
|
}), e.map((e, t) => /* @__PURE__ */ (0, Y.jsx)(FU, {
|
|
32494
32494
|
cell: e,
|
|
32495
32495
|
dimensions: y,
|
|
@@ -32604,7 +32604,7 @@ var MU = ({ cells: e, thumbnailWidth: t, canReorder: n, activeCellId: r, skipped
|
|
|
32604
32604
|
t[51] === u ? F = t[52] : (F = u && /* @__PURE__ */ (0, Y.jsxs)(sn, {
|
|
32605
32605
|
variant: "danger",
|
|
32606
32606
|
onSelect: u,
|
|
32607
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
32607
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(z, { className: "mr-2 h-3.5 w-3.5" }), "Delete cell"]
|
|
32608
32608
|
}), t[51] = u, t[52] = F);
|
|
32609
32609
|
let I;
|
|
32610
32610
|
t[53] !== N || t[54] !== F ? (I = /* @__PURE__ */ (0, Y.jsxs)(At, { children: [
|
|
@@ -32750,8 +32750,8 @@ function UU(e) {
|
|
|
32750
32750
|
}
|
|
32751
32751
|
//#endregion
|
|
32752
32752
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32753
|
-
var WU = J.lazy(() => import("./reveal-component-
|
|
32754
|
-
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = uo(Gs), s = a === "read" || o, c = uo(
|
|
32753
|
+
var WU = J.lazy(() => import("./reveal-component-CDfNuSFv.js")), GU = (e) => {
|
|
32754
|
+
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = uo(Gs), s = a === "read" || o, c = uo(wa) > 1, [l, u] = (0, J.useState)(null), d;
|
|
32755
32755
|
t[0] !== i || t[1] !== n ? (d = Vz(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
32756
32756
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
32757
32757
|
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];
|
|
@@ -32899,7 +32899,7 @@ function QU(e) {
|
|
|
32899
32899
|
//#region src/components/debugger/debugger-code.tsx
|
|
32900
32900
|
var $U = (0, J.memo)((e) => {
|
|
32901
32901
|
let t = J.useRef({});
|
|
32902
|
-
return /* @__PURE__ */ (0, Y.jsx)(
|
|
32902
|
+
return /* @__PURE__ */ (0, Y.jsx)(nc, {
|
|
32903
32903
|
minHeight: "200px",
|
|
32904
32904
|
maxHeight: "200px",
|
|
32905
32905
|
ref: t,
|
|
@@ -33051,10 +33051,10 @@ function tW(e = !0) {
|
|
|
33051
33051
|
//#endregion
|
|
33052
33052
|
//#region src/components/editor/actions/name-cell-input.tsx
|
|
33053
33053
|
var nW = (e) => {
|
|
33054
|
-
let t = (0, X.c)(12), { value: n, cellId: r, className: i } = e, a =
|
|
33054
|
+
let t = (0, X.c)(12), { value: n, cellId: r, className: i } = e, a = de(), o;
|
|
33055
33055
|
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];
|
|
33056
33056
|
let s = rW(n, o);
|
|
33057
|
-
if (
|
|
33057
|
+
if (Ma(n)) return null;
|
|
33058
33058
|
let c = s.focusing ? "" : "text-ellipsis", u;
|
|
33059
33059
|
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];
|
|
33060
33060
|
let d;
|
|
@@ -33075,23 +33075,23 @@ var nW = (e) => {
|
|
|
33075
33075
|
function rW(e, t) {
|
|
33076
33076
|
let n = (0, X.c)(13), [r, i] = (0, J.useState)(e), [a, o] = (0, J.useState)(!1), s;
|
|
33077
33077
|
n[0] !== t || n[1] !== e ? (s = (n) => {
|
|
33078
|
-
n !== e && (!n ||
|
|
33078
|
+
n !== e && (!n || Ma(n) ? t(n) : t(_a(n, va())));
|
|
33079
33079
|
}, n[0] = t, n[1] = e, n[2] = s) : s = n[2];
|
|
33080
33080
|
let c = s, l;
|
|
33081
|
-
n[3] === r ? l = n[4] : (l =
|
|
33081
|
+
n[3] === r ? l = n[4] : (l = Ma(r) ? "" : r, n[3] = r, n[4] = l);
|
|
33082
33082
|
let u;
|
|
33083
33083
|
n[5] === Symbol.for("react.memo_cache_sentinel") ? (u = (e) => {
|
|
33084
|
-
let t = e.target.value, n =
|
|
33084
|
+
let t = e.target.value, n = oa(t);
|
|
33085
33085
|
i(n);
|
|
33086
33086
|
}, n[5] = u) : u = n[5];
|
|
33087
33087
|
let d;
|
|
33088
33088
|
n[6] === c ? d = n[7] : (d = (e) => {
|
|
33089
33089
|
if (e.target instanceof HTMLInputElement) {
|
|
33090
33090
|
let t = e.target.value;
|
|
33091
|
-
c(
|
|
33091
|
+
c(oa(t));
|
|
33092
33092
|
} else if (e.target instanceof HTMLSpanElement) {
|
|
33093
33093
|
let t = e.target.innerText.trim();
|
|
33094
|
-
c(
|
|
33094
|
+
c(oa(t)), e.target.scrollLeft = 0, o(!1);
|
|
33095
33095
|
}
|
|
33096
33096
|
}, n[6] = c, n[7] = d);
|
|
33097
33097
|
let f;
|
|
@@ -33112,7 +33112,7 @@ function iW(e) {
|
|
|
33112
33112
|
}
|
|
33113
33113
|
//#endregion
|
|
33114
33114
|
//#region src/components/editor/output/useWrapText.ts
|
|
33115
|
-
var aW = Do("marimo:console:wrapText", !1,
|
|
33115
|
+
var aW = Do("marimo:console:wrapText", !1, ue);
|
|
33116
33116
|
function oW() {
|
|
33117
33117
|
let e = (0, X.c)(3), [t, n] = Ts(aW), r;
|
|
33118
33118
|
return e[0] !== n || e[1] !== t ? (r = {
|
|
@@ -33157,7 +33157,7 @@ var cW = J.memo((e) => {
|
|
|
33157
33157
|
C,
|
|
33158
33158
|
a,
|
|
33159
33159
|
r
|
|
33160
|
-
], t[4] = b, t[5] = w, t[6] = a, t[7] = C, t[8] = r, t[9] = O) : O = t[9], (0, J.useLayoutEffect)(D, O), !w &&
|
|
33160
|
+
], t[4] = b, t[5] = w, t[6] = a, t[7] = C, t[8] = r, t[9] = O) : O = t[9], (0, J.useLayoutEffect)(D, O), !w && Ma(m)) return null;
|
|
33161
33161
|
let k, A, j, M, N, P, F, I, L, R, z;
|
|
33162
33162
|
if (t[10] !== h || t[11] !== y || t[12] !== b || t[13] !== w || t[14] !== d || t[15] !== a || t[16] !== E || t[17] !== _ || t[18] !== v || t[19] !== g || t[20] !== C || t[21] !== T || t[22] !== o || t[23] !== i || t[24] !== p || t[25] !== s || t[26] !== r) {
|
|
33163
33163
|
let e = b.toReversed(), u = e.some(mW), f = e.findIndex(hW);
|
|
@@ -33174,7 +33174,7 @@ var cW = J.memo((e) => {
|
|
|
33174
33174
|
output: "",
|
|
33175
33175
|
isPdb: !0,
|
|
33176
33176
|
onSubmit: (e) => {
|
|
33177
|
-
|
|
33177
|
+
$i().sendPdbReply({
|
|
33178
33178
|
cellId: h,
|
|
33179
33179
|
inputId: C,
|
|
33180
33180
|
value: e
|
|
@@ -33251,7 +33251,7 @@ var cW = J.memo((e) => {
|
|
|
33251
33251
|
let d = r ? "Disable wrap text" : "Wrap text", f;
|
|
33252
33252
|
t[4] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ (0, Y.jsx)(kr, { className: "h-4 w-4" }), t[4] = f) : f = t[4];
|
|
33253
33253
|
let p;
|
|
33254
|
-
t[5] !== i || t[6] !== r ? (p = /* @__PURE__ */ (0, Y.jsx)("span", { children: /* @__PURE__ */ (0, Y.jsx)(
|
|
33254
|
+
t[5] !== i || t[6] !== r ? (p = /* @__PURE__ */ (0, Y.jsx)("span", { children: /* @__PURE__ */ (0, Y.jsx)(j_, {
|
|
33255
33255
|
"aria-label": "Toggle text wrapping",
|
|
33256
33256
|
className: "p-1 rounded bg-transparent text-muted-foreground data-hovered:text-foreground data-selected:text-foreground",
|
|
33257
33257
|
isSelected: r,
|
|
@@ -33293,7 +33293,7 @@ var cW = J.memo((e) => {
|
|
|
33293
33293
|
let m = o ? "password" : "text", h;
|
|
33294
33294
|
t[2] === r ? h = t[3] : (h = (e) => r(e.target.value), t[2] = r, t[3] = h);
|
|
33295
33295
|
let g;
|
|
33296
|
-
t[4] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, Y.jsx)(
|
|
33296
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ (0, Y.jsx)(ii, { className: "w-5 h-5" }), t[4] = g) : g = t[4];
|
|
33297
33297
|
let _;
|
|
33298
33298
|
t[5] !== f || t[6] !== o || t[7] !== d || t[8] !== u || t[9] !== c || t[10] !== r ? (_ = (e) => {
|
|
33299
33299
|
if (!o && e.key === "ArrowUp") u(), e.preventDefault();
|
|
@@ -33307,7 +33307,7 @@ var cW = J.memo((e) => {
|
|
|
33307
33307
|
}
|
|
33308
33308
|
}, t[5] = f, t[6] = o, t[7] = d, t[8] = u, t[9] = c, t[10] = r, t[11] = _) : _ = t[11];
|
|
33309
33309
|
let v;
|
|
33310
|
-
t[12] !== m || t[13] !== h || t[14] !== _ || t[15] !== n ? (v = /* @__PURE__ */ (0, Y.jsx)(
|
|
33310
|
+
t[12] !== m || t[13] !== h || t[14] !== _ || t[15] !== n ? (v = /* @__PURE__ */ (0, Y.jsx)(xi, {
|
|
33311
33311
|
"data-testid": "console-input",
|
|
33312
33312
|
"data-stdin-blocking": !0,
|
|
33313
33313
|
type: m,
|
|
@@ -33341,7 +33341,7 @@ var cW = J.memo((e) => {
|
|
|
33341
33341
|
t[2] !== i || t[3] !== r ? (o = !i && r != null && /* @__PURE__ */ (0, Y.jsxs)("span", {
|
|
33342
33342
|
className: "inline-flex items-center gap-1 text-(--sky-11)",
|
|
33343
33343
|
"aria-label": "stdin response",
|
|
33344
|
-
children: [/* @__PURE__ */ (0, Y.jsx)(
|
|
33344
|
+
children: [/* @__PURE__ */ (0, Y.jsx)(ii, { className: "w-4 h-4 shrink-0 opacity-70" }), r === "" ? /* @__PURE__ */ (0, Y.jsx)("span", {
|
|
33345
33345
|
className: "italic opacity-70",
|
|
33346
33346
|
children: "(empty)"
|
|
33347
33347
|
}) : r]
|
|
@@ -33367,7 +33367,7 @@ function vW(e) {
|
|
|
33367
33367
|
}
|
|
33368
33368
|
//#endregion
|
|
33369
33369
|
//#region src/core/cells/readonly-code-display.ts
|
|
33370
|
-
var yW = new
|
|
33370
|
+
var yW = new ye(), bW = new fe();
|
|
33371
33371
|
function xW(e) {
|
|
33372
33372
|
let t = e.trim();
|
|
33373
33373
|
return t ? yW.isSupported(t) ? {
|
|
@@ -33387,12 +33387,12 @@ function xW(e) {
|
|
|
33387
33387
|
//#endregion
|
|
33388
33388
|
//#region src/core/export/layout.ts
|
|
33389
33389
|
async function SW() {
|
|
33390
|
-
return await
|
|
33390
|
+
return await Ta(), YW();
|
|
33391
33391
|
}
|
|
33392
33392
|
//#endregion
|
|
33393
33393
|
//#region src/core/static/download-html.ts
|
|
33394
33394
|
async function CW(e) {
|
|
33395
|
-
let t =
|
|
33395
|
+
let t = $i(), { includeCode: n } = e, r = await t.exportAsHTML({
|
|
33396
33396
|
download: !0,
|
|
33397
33397
|
includeCode: n,
|
|
33398
33398
|
files: Ji.INSTANCE.filenames(),
|
|
@@ -33410,7 +33410,7 @@ function TW(e, t) {
|
|
|
33410
33410
|
i(!1);
|
|
33411
33411
|
return;
|
|
33412
33412
|
}
|
|
33413
|
-
let n =
|
|
33413
|
+
let n = ke((e - 1) * wW, 100, 2e3), r = setTimeout(() => {
|
|
33414
33414
|
i(!1);
|
|
33415
33415
|
}, n);
|
|
33416
33416
|
return () => clearTimeout(r);
|
|
@@ -33426,7 +33426,7 @@ function EW({ showCodeInRunModePreference: e, kioskMode: t }) {
|
|
|
33426
33426
|
return n === null ? Ws() || Us() || t : n === "true";
|
|
33427
33427
|
}
|
|
33428
33428
|
function DW(e) {
|
|
33429
|
-
Ws() &&
|
|
33429
|
+
Ws() && Li((t) => {
|
|
33430
33430
|
t.set(Qo.showCode, String(e));
|
|
33431
33431
|
});
|
|
33432
33432
|
}
|
|
@@ -33438,7 +33438,7 @@ function OW(e) {
|
|
|
33438
33438
|
}), [...t.entries()].toSorted(([e], [t]) => e - t);
|
|
33439
33439
|
}
|
|
33440
33440
|
function kW(e, t) {
|
|
33441
|
-
let n = new we().isSupported(e), r = t !== null && !
|
|
33441
|
+
let n = new we().isSupported(e), r = t !== null && !se(t);
|
|
33442
33442
|
return n && r || e.trim() === "";
|
|
33443
33443
|
}
|
|
33444
33444
|
//#endregion
|
|
@@ -33535,7 +33535,7 @@ var AW = (e) => {
|
|
|
33535
33535
|
]
|
|
33536
33536
|
}), t[28] = r, t[29] = a, t[30] = w, t[31] = T, t[32] = D) : D = t[32], D;
|
|
33537
33537
|
}, MW = (e) => {
|
|
33538
|
-
let t = (0, X.c)(26), { canShowCode: n, showCode: r, onToggleShowCode: i } = e, { readCode: a } =
|
|
33538
|
+
let t = (0, X.c)(26), { canShowCode: n, showCode: r, onToggleShowCode: i } = e, { readCode: a } = da(), o = IW, s = LW, c;
|
|
33539
33539
|
t[0] === a ? c = t[1] : (c = async () => {
|
|
33540
33540
|
let e = await a();
|
|
33541
33541
|
wn(new Blob([e.contents], { type: "text/plain" }), Ct.toPY(document.title));
|
|
@@ -33567,7 +33567,7 @@ var AW = (e) => {
|
|
|
33567
33567
|
]
|
|
33568
33568
|
}, "show-code"), t[12] = i, t[13] = a, t[14] = o) : o = t[14];
|
|
33569
33569
|
let s;
|
|
33570
|
-
t[15] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsx)(
|
|
33570
|
+
t[15] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ (0, Y.jsx)(ki, {}, "show-code-separator"), t[15] = s) : s = t[15], p.push(o, s);
|
|
33571
33571
|
}
|
|
33572
33572
|
if (!f) {
|
|
33573
33573
|
let e;
|
|
@@ -33594,7 +33594,7 @@ var AW = (e) => {
|
|
|
33594
33594
|
}, "download-python"), t[18] = u, t[19] = n), p.push(n);
|
|
33595
33595
|
}
|
|
33596
33596
|
let r;
|
|
33597
|
-
t[20] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ (0, Y.jsx)(
|
|
33597
|
+
t[20] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ (0, Y.jsx)(ki, {}, "download-separator"), t[20] = r) : r = t[20];
|
|
33598
33598
|
let i;
|
|
33599
33599
|
t[21] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ (0, Y.jsxs)(Ci, {
|
|
33600
33600
|
onSelect: o,
|
|
@@ -33624,7 +33624,7 @@ var AW = (e) => {
|
|
|
33624
33624
|
return t[24] === p ? g = t[25] : (g = /* @__PURE__ */ (0, Y.jsx)("div", {
|
|
33625
33625
|
"data-testid": "notebook-actions-dropdown",
|
|
33626
33626
|
className: m,
|
|
33627
|
-
children: /* @__PURE__ */ (0, Y.jsxs)(
|
|
33627
|
+
children: /* @__PURE__ */ (0, Y.jsxs)(Ai, {
|
|
33628
33628
|
modal: !1,
|
|
33629
33629
|
children: [h, /* @__PURE__ */ (0, Y.jsx)(Ei, {
|
|
33630
33630
|
align: "end",
|
|
@@ -33641,7 +33641,7 @@ var AW = (e) => {
|
|
|
33641
33641
|
let S = x, C = d && c !== "present", w;
|
|
33642
33642
|
if (t[5] !== o || t[6] !== _ || t[7] !== C || t[8] !== s || t[9] !== v) {
|
|
33643
33643
|
let e = new we().isSupported(o);
|
|
33644
|
-
w = l("marimo-cell", "hover-actions-parent empty:invisible", !s && !C ?
|
|
33644
|
+
w = l("marimo-cell", "hover-actions-parent empty:invisible", !s && !C ? ja({
|
|
33645
33645
|
errored: _,
|
|
33646
33646
|
stopped: v
|
|
33647
33647
|
}) : {
|
|
@@ -33698,7 +33698,7 @@ var AW = (e) => {
|
|
|
33698
33698
|
]
|
|
33699
33699
|
}), t[33] = T, t[34] = v, t[35] = y, t[36] = h, t[37] = g, t[38] = _, t[39] = x) : x = t[39], x;
|
|
33700
33700
|
}
|
|
33701
|
-
if (
|
|
33701
|
+
if (sa({
|
|
33702
33702
|
errored: _,
|
|
33703
33703
|
interrupted: h.outcome === "cancelled",
|
|
33704
33704
|
stopped: v,
|
|
@@ -33836,11 +33836,11 @@ function JW({ state: e, plugin: t, cells: n }) {
|
|
|
33836
33836
|
}) : t.getInitialLayout(n));
|
|
33837
33837
|
}
|
|
33838
33838
|
function YW() {
|
|
33839
|
-
let e =
|
|
33839
|
+
let e = Ea(), t = fo.get(GW), { selectedLayout: n } = t;
|
|
33840
33840
|
if (n === "vertical") return null;
|
|
33841
33841
|
let r = zW.find((e) => e.type === n);
|
|
33842
33842
|
if (r === void 0) return c.error(`Unknown layout type: ${n}`), null;
|
|
33843
|
-
let i =
|
|
33843
|
+
let i = Ki(e), a = JW({
|
|
33844
33844
|
state: t,
|
|
33845
33845
|
plugin: r,
|
|
33846
33846
|
cells: i
|
|
@@ -34092,10 +34092,10 @@ function _G(e) {
|
|
|
34092
34092
|
return null;
|
|
34093
34093
|
}
|
|
34094
34094
|
function vG(e) {
|
|
34095
|
-
return
|
|
34095
|
+
return ce(e) ? e.schemaVersion === 1 && typeof e.appId == "string" && (e.dependencies === void 0 || Array.isArray(e.dependencies) && e.dependencies.every((e) => typeof e == "string")) && Array.isArray(e.cells) && e.cells.every(yG) : !1;
|
|
34096
34096
|
}
|
|
34097
34097
|
function yG(e) {
|
|
34098
|
-
return
|
|
34098
|
+
return ce(e) ? typeof e.cellId == "string" && typeof e.code == "string" && typeof e.outputHtml == "string" && typeof e.outputMimetype == "string" && typeof e.reactive == "boolean" && typeof e.displayCode == "boolean" && typeof e.displayOutput == "boolean" : !1;
|
|
34099
34099
|
}
|
|
34100
34100
|
//#endregion
|
|
34101
34101
|
//#region src/core/islands/components/IslandControls.tsx
|
|
@@ -34196,7 +34196,7 @@ var wG = (e) => {
|
|
|
34196
34196
|
children: a
|
|
34197
34197
|
}), t[0] = a, t[1] = e), e;
|
|
34198
34198
|
}
|
|
34199
|
-
if (c === null ||
|
|
34199
|
+
if (c === null || se(c)) {
|
|
34200
34200
|
let e;
|
|
34201
34201
|
return t[2] === Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ (0, Y.jsx)("div", { ref: s }), t[2] = e) : e = t[2], e;
|
|
34202
34202
|
}
|
|
@@ -34277,7 +34277,7 @@ var EG = (e) => {
|
|
|
34277
34277
|
return mG(this);
|
|
34278
34278
|
}
|
|
34279
34279
|
getCellIdFromIndex(e) {
|
|
34280
|
-
let { cellIds: t } = fo.get(
|
|
34280
|
+
let { cellIds: t } = fo.get(ba);
|
|
34281
34281
|
return t.at(e);
|
|
34282
34282
|
}
|
|
34283
34283
|
connectedCallback() {
|
|
@@ -34288,14 +34288,14 @@ var EG = (e) => {
|
|
|
34288
34288
|
this.classList.toggle("dark", e === "dark"), this.classList.toggle("light", e === "light");
|
|
34289
34289
|
};
|
|
34290
34290
|
this.unsubscribeTheme = fo.sub(gs, n), n(), queueMicrotask(() => {
|
|
34291
|
-
this.isConnected && t === this.connectionGeneration && (this.root =
|
|
34291
|
+
this.isConnected && t === this.connectionGeneration && (this.root = N_.createRoot(this), this.renderIsland());
|
|
34292
34292
|
});
|
|
34293
34293
|
}
|
|
34294
34294
|
handleSourceChanged = () => {
|
|
34295
34295
|
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();
|
|
34296
34296
|
};
|
|
34297
34297
|
syncCellIdsSubscription() {
|
|
34298
|
-
this.isReactive ? this.unsubscribeCellIds ??= fo.sub(
|
|
34298
|
+
this.isReactive ? this.unsubscribeCellIds ??= fo.sub(Oa, () => {
|
|
34299
34299
|
this.runtimeCellId = this.cellId, this.renderIsland();
|
|
34300
34300
|
}) : (this.unsubscribeCellIds?.(), this.unsubscribeCellIds = void 0);
|
|
34301
34301
|
}
|
|
@@ -34318,7 +34318,7 @@ var EG = (e) => {
|
|
|
34318
34318
|
renderIsland() {
|
|
34319
34319
|
let e = this.renderConfig;
|
|
34320
34320
|
if (!e) return;
|
|
34321
|
-
let { html: t, codeCallback: n, editor: r } = e, i = this.runtimeCellId, a = !!r, o = t.trim(), s = o === "<span></span>" || o === "" ? null :
|
|
34321
|
+
let { html: t, codeCallback: n, editor: r } = e, i = this.runtimeCellId, a = !!r, o = t.trim(), s = o === "<span></span>" || o === "" ? null : I({ html: o });
|
|
34322
34322
|
i ? this.root?.render(/* @__PURE__ */ (0, Y.jsx)(uc, { children: /* @__PURE__ */ (0, Y.jsx)(Mo, {
|
|
34323
34323
|
store: fo,
|
|
34324
34324
|
children: /* @__PURE__ */ (0, Y.jsx)(Ax, { children: /* @__PURE__ */ (0, Y.jsxs)(Fe, { children: [/* @__PURE__ */ (0, Y.jsx)(wG, {
|
|
@@ -34335,7 +34335,7 @@ var EG = (e) => {
|
|
|
34335
34335
|
getOptionalEditor() {
|
|
34336
34336
|
let t = this.querySelector(e.editorTagName)?.parentNode?.outerHTML;
|
|
34337
34337
|
if (t) {
|
|
34338
|
-
let e =
|
|
34338
|
+
let e = I({ html: t });
|
|
34339
34339
|
if ((0, J.isValidElement)(e)) return e;
|
|
34340
34340
|
}
|
|
34341
34341
|
return null;
|
|
@@ -34360,7 +34360,7 @@ function MG() {
|
|
|
34360
34360
|
//#region src/core/islands/bootstrap.ts
|
|
34361
34361
|
async function NG(e) {
|
|
34362
34362
|
let t = e.store || fo, n = e.root || document, r = e.bridge;
|
|
34363
|
-
t.set(
|
|
34363
|
+
t.set(pa, r), t.set(Hs, "read"), t.set(bc, null), e.autoInitializePlugins !== !1 && vR();
|
|
34364
34364
|
let i = Array.from(n.querySelectorAll(Gu.ISLAND));
|
|
34365
34365
|
if (i.length === 0) {
|
|
34366
34366
|
c.log("No islands found, skipping initialization");
|
|
@@ -34368,8 +34368,8 @@ async function NG(e) {
|
|
|
34368
34368
|
}
|
|
34369
34369
|
c.log(`Initializing ${i.length} island(s)`);
|
|
34370
34370
|
for (let e of i) e.classList.add(Yu.NAMESPACE);
|
|
34371
|
-
let o =
|
|
34372
|
-
t.set(
|
|
34371
|
+
let o = Sa((e) => {
|
|
34372
|
+
t.set(ba, (t) => ga(t, e));
|
|
34373
34373
|
});
|
|
34374
34374
|
t.sub(gc, () => {
|
|
34375
34375
|
let e = t.get(gc), r = n.querySelectorAll(Gu.ISLAND);
|
|
@@ -34394,7 +34394,7 @@ async function NG(e) {
|
|
|
34394
34394
|
shownDocumentAtom: s.shownDocumentAtom,
|
|
34395
34395
|
backendAtom: s.backendAtom
|
|
34396
34396
|
}), u = new AbortController();
|
|
34397
|
-
l.start({ signal: u.signal }), t.set(ho, l),
|
|
34397
|
+
l.start({ signal: u.signal }), t.set(ho, l), Da({
|
|
34398
34398
|
store: t,
|
|
34399
34399
|
model: l,
|
|
34400
34400
|
reconcile: o.reconcileDocument,
|
|
@@ -34442,14 +34442,14 @@ function PG(e, t, n, r) {
|
|
|
34442
34442
|
return;
|
|
34443
34443
|
case "kernel-ready":
|
|
34444
34444
|
ZW(e, {
|
|
34445
|
-
cells:
|
|
34445
|
+
cells: Ki(n.get(ba)),
|
|
34446
34446
|
resetCellRuntimes: t.resetCellRuntimes,
|
|
34447
34447
|
setLayoutData: a.NOOP,
|
|
34448
34448
|
setCapabilities: a.NOOP
|
|
34449
34449
|
}), window.customElements?.get(Gu.ISLAND) || Nx(Gu.ISLAND, OG);
|
|
34450
34450
|
return;
|
|
34451
34451
|
case "send-ui-element-message":
|
|
34452
|
-
Ox.broadcastMessage(e.ui_element, e.message,
|
|
34452
|
+
Ox.broadcastMessage(e.ui_element, e.message, _e(e));
|
|
34453
34453
|
return;
|
|
34454
34454
|
case "remove-ui-elements":
|
|
34455
34455
|
QW(e);
|
|
@@ -34470,7 +34470,7 @@ function PG(e, t, n, r) {
|
|
|
34470
34470
|
case "alert":
|
|
34471
34471
|
x({
|
|
34472
34472
|
title: e.title,
|
|
34473
|
-
description:
|
|
34473
|
+
description: I({ html: e.description }),
|
|
34474
34474
|
variant: e.variant
|
|
34475
34475
|
});
|
|
34476
34476
|
return;
|
|
@@ -34733,13 +34733,13 @@ var ZG = class {
|
|
|
34733
34733
|
store;
|
|
34734
34734
|
root;
|
|
34735
34735
|
session;
|
|
34736
|
-
sessionReady = new
|
|
34736
|
+
sessionReady = new Ri();
|
|
34737
34737
|
nextSessionGeneration = 0;
|
|
34738
34738
|
activeSessions = /* @__PURE__ */ new Map();
|
|
34739
34739
|
appTransition = Promise.resolve();
|
|
34740
|
-
workerReady = new
|
|
34740
|
+
workerReady = new Ri();
|
|
34741
34741
|
stream;
|
|
34742
|
-
initialized = new
|
|
34742
|
+
initialized = new Ri();
|
|
34743
34743
|
notebookBackend = {
|
|
34744
34744
|
transport: ({ signal: e }, t) => new Promise((n) => {
|
|
34745
34745
|
this.stream = t, t.open(), e.addEventListener("abort", () => {
|
|
@@ -34776,7 +34776,7 @@ var ZG = class {
|
|
|
34776
34776
|
}), this.rpc.addMessageListener("notebookEvent", ({ event: e, sessionGeneration: t }) => {
|
|
34777
34777
|
let n = this.activeSessions.get(t);
|
|
34778
34778
|
if (!n) return;
|
|
34779
|
-
let r =
|
|
34779
|
+
let r = ua(e);
|
|
34780
34780
|
r.event === "marimo" ? r.data.marimo && this.notificationConsumer?.(r.data.marimo, t) : t === this.session?.sessionGeneration ? this.stream?.message(r) : this.logIslandConsole(n, r);
|
|
34781
34781
|
});
|
|
34782
34782
|
}
|
|
@@ -34796,7 +34796,7 @@ var ZG = class {
|
|
|
34796
34796
|
case "console": {
|
|
34797
34797
|
let n = t.data.console, r = e.get(n.execution_id);
|
|
34798
34798
|
if (t.id !== void 0 && r !== void 0 && n.content.kind === "text") {
|
|
34799
|
-
let e =
|
|
34799
|
+
let e = qi({
|
|
34800
34800
|
cell_id: r,
|
|
34801
34801
|
console: {
|
|
34802
34802
|
channel: n.content.stream,
|
|
@@ -34805,7 +34805,7 @@ var ZG = class {
|
|
|
34805
34805
|
timestamp: t.data.time ? Date.parse(t.data.time) / 1e3 : Date.now() / 1e3
|
|
34806
34806
|
}
|
|
34807
34807
|
});
|
|
34808
|
-
this.store.set(
|
|
34808
|
+
this.store.set(ba, (t) => ga(t, {
|
|
34809
34809
|
type: "addLogs",
|
|
34810
34810
|
payload: { logs: e }
|
|
34811
34811
|
}));
|
|
@@ -34828,7 +34828,7 @@ var ZG = class {
|
|
|
34828
34828
|
async startApps() {
|
|
34829
34829
|
let e = nG(this.root, { materialize: !1 }), t = e.length === 1;
|
|
34830
34830
|
c.debug(`Starting sessions for ${e.length} app(s):`, e.map((e) => `${e.id} (${e.cells.length} cells)`));
|
|
34831
|
-
let n = (e.length === 1 && !e[0]?.payloadBacked ?
|
|
34831
|
+
let n = (e.length === 1 && !e[0]?.payloadBacked ? B() : void 0)?.notebookCode, r = t ? e[0] : void 0, i = r ? n || dG(r) : void 0;
|
|
34832
34832
|
if (r && this.session?.appId === r.id && this.session.code === i) nG(this.root);
|
|
34833
34833
|
else {
|
|
34834
34834
|
e.length > 0 && (this.activeSessions.clear(), this.store.set(bc, new Set(e.map((e, t) => this.nextSessionGeneration + t + 1)))), nG(this.root);
|
|
@@ -34840,7 +34840,7 @@ var ZG = class {
|
|
|
34840
34840
|
appId: n.id,
|
|
34841
34841
|
sessionGeneration: ++this.nextSessionGeneration
|
|
34842
34842
|
}, a = this.session, o = t && a !== void 0;
|
|
34843
|
-
this.activeSessions.set(r.sessionGeneration, /* @__PURE__ */ new Map()), o && (this.resetNotebookStream(), this.store.set(
|
|
34843
|
+
this.activeSessions.set(r.sessionGeneration, /* @__PURE__ */ new Map()), o && (this.resetNotebookStream(), this.store.set(ba, Ca())), (t || !a) && (t && this.sessionReady.status !== "pending" && (this.sessionReady = new Ri()), this.session = {
|
|
34844
34844
|
...r,
|
|
34845
34845
|
code: t ? e : void 0
|
|
34846
34846
|
});
|
|
@@ -34859,7 +34859,7 @@ var ZG = class {
|
|
|
34859
34859
|
t?.code === void 0 || e && t.appId !== e || (this.activeSessions.delete(t.sessionGeneration), await this.rpc.proxy.request.stopSession({
|
|
34860
34860
|
appId: t.appId,
|
|
34861
34861
|
sessionGeneration: t.sessionGeneration
|
|
34862
|
-
}), this.store.set(bc, null), this.session = void 0, this.sessionReady = new
|
|
34862
|
+
}), this.store.set(bc, null), this.session = void 0, this.sessionReady = new Ri(), this.resetNotebookStream(), this.store.set(ba, Ca()));
|
|
34863
34863
|
});
|
|
34864
34864
|
}
|
|
34865
34865
|
enqueueAppTransition(e) {
|
|
@@ -34875,7 +34875,7 @@ var ZG = class {
|
|
|
34875
34875
|
sendComponentValues = async (e) => (await this.putControlRequest({
|
|
34876
34876
|
type: "update-ui-element",
|
|
34877
34877
|
...e,
|
|
34878
|
-
token:
|
|
34878
|
+
token: me()
|
|
34879
34879
|
}), null);
|
|
34880
34880
|
sendFunctionRequest = async (e) => (await this.putControlRequest({
|
|
34881
34881
|
type: "invoke-function",
|