@marimo-team/islands 0.15.2 → 0.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedDataExplorerComponent-C39nQwtD.js → ConnectedDataExplorerComponent-DfvW3rBn.js} +323 -328
- package/dist/{ImageComparisonComponent-BhkiyswP.js → ImageComparisonComponent-XaJshw7d.js} +13 -13
- package/dist/{_baseUniq-DdHL34FO.js → _baseUniq-dN9WKF9m.js} +67 -67
- package/dist/any-language-editor-CpFniVi-.js +27 -0
- package/dist/{arc-BXrety1g.js → arc-BOhn-m2C.js} +1 -1
- package/dist/{architectureDiagram-KFL7JDKH-BMy6ywCF.js → architectureDiagram-W76B3OCA-Bpg85ZKv.js} +144 -144
- package/dist/assets/{worker-COGufAQn.js → worker-Y-Q4G-N2.js} +30 -26
- package/dist/asterisk-DS281yxp.js +271 -0
- package/dist/{blockDiagram-ZYB65J3Q-DYT2-nlI.js → blockDiagram-QIGZ2CNN-DS1kOHlW.js} +10 -10
- package/dist/{c4Diagram-AAMF2YG6-ZiQzioe6.js → c4Diagram-FPNF74CW-CyRVKssw.js} +8 -8
- package/dist/{channel-CeuXqUAU.js → channel-BilGXox7.js} +1 -1
- package/dist/{chunk-ANTBXLJU-BvYnIrdq.js → chunk-4BX2VUAB-CZR39zCO.js} +1 -1
- package/dist/{chunk-WVR4S24B-DXj8yaUk.js → chunk-55IACEB6-BIH-MYov.js} +1 -1
- package/dist/{chunk-GLLZNHP4-CyFsosAe.js → chunk-FMBD7UC4-4PZXFZE8.js} +1 -1
- package/dist/{chunk-JBRWN2VN-DA_EEhy2.js → chunk-K7UQS3LO-CEvWKznk.js} +117 -117
- package/dist/{chunk-NRVI72HA-BYx2jMlI.js → chunk-QN33PNHL-D5LO5Jq_.js} +1 -1
- package/dist/{chunk-FHKO5MBM-DfCztBk8.js → chunk-QZHKN3VN-6gwUonWI.js} +1 -1
- package/dist/{chunk-LXBSTHXV-Se7vdY6J.js → chunk-TVAH2DTR-3gm06QdU.js} +7 -7
- package/dist/{chunk-OMD6QJNC-CqgcPMgL.js → chunk-TZMSLE5B-Cm8Iy9bO.js} +1 -1
- package/dist/{classDiagram-v2-QTMF73CY-B19A3G1l.js → classDiagram-KNZD7YFC-DC529O_z.js} +2 -2
- package/dist/{classDiagram-3BZAVTQC-B19A3G1l.js → classDiagram-v2-RKCZMP56-DC529O_z.js} +2 -2
- package/dist/{clone-78au0tn1.js → clone-CLoRX3j6.js} +1 -1
- package/dist/cose-bilkent-S5V4N54A-qf5DlS6Y.js +2609 -0
- package/dist/{cytoscape.esm-BYnVVhJX.js → cytoscape.esm-DfdJODL8.js} +34 -34
- package/dist/{dagre-2BBEFEWP-BfEn3ZUV.js → dagre-5GWH7T2D-Ceocls0m.js} +6 -6
- package/dist/{data-grid-overlay-editor-CH_qLkV2.js → data-grid-overlay-editor-AqDS_UKe.js} +11 -11
- package/dist/{diagram-4IRLE6MV-CL8xidnG.js → diagram-N5W7TBWH-CP66oSiv.js} +59 -60
- package/dist/{diagram-RP2FKANI-B1BPcUew.js → diagram-QEK2KX5R-_YD4kxxi.js} +15 -15
- package/dist/{diagram-GUPCWM2R-CZ5cfqlq.js → diagram-S2PKOQOG-Cnj8T-OP.js} +10 -10
- package/dist/dockerfile-Cm8cRYCN.js +194 -0
- package/dist/ebnf-DUPDuY4r.js +78 -0
- package/dist/{erDiagram-HZWUO2LU-BEAIww50.js → erDiagram-AWTI2OKA-CGnvoHx6.js} +8 -8
- package/dist/fcl-CPC2WYrI.js +103 -0
- package/dist/{flowDiagram-THRYKUMA-Czs2UAI2.js → flowDiagram-PVAE7QVJ-DG-pr9R9.js} +9 -9
- package/dist/{ganttDiagram-WV7ZQ7D5-ByYIAVFO.js → ganttDiagram-OWAHRB6G-JmChtxvn.js} +34 -34
- package/dist/{gitGraphDiagram-OJR772UL-BcpDsiyB.js → gitGraphDiagram-NY62KEGX-D8wLfOPd.js} +4 -4
- package/dist/{glide-data-editor-CmN6FVyi.js → glide-data-editor-9nC3iCIZ.js} +33 -33
- package/dist/{graph-77W6heli.js → graph-CoRe7vAN.js} +3 -3
- package/dist/http-D9LttvKF.js +44 -0
- package/dist/{index-Bfk9dnyS.js → index-6qYeHHjQ.js} +33090 -32892
- package/dist/{index-BOojn38D.js → index-BpzLh4Qe.js} +7711 -7711
- package/dist/{index-CmozKMxx.js → index-BthgsgYX.js} +6 -6
- package/dist/{index-pBmAzQJl.js → index-MCx5v1x0.js} +2 -2
- package/dist/index-jkm77Jrz.js +98 -0
- package/dist/{infoDiagram-6WOFNB3A-CfzLHHVP.js → infoDiagram-STP46IZ2-BlXxvOrR.js} +2 -2
- package/dist/{journeyDiagram-FFXJYRFH-ndAcpkGn.js → journeyDiagram-BIP6EPQ6-CNRYs_Fc.js} +24 -26
- package/dist/{kanban-definition-KOZQBZVT-DcQYzNvc.js → kanban-definition-6OIFK2YF-B9HeMAuP.js} +14 -14
- package/dist/{layout-XySVHJgD.js → layout-m2vOUiW1.js} +81 -81
- package/dist/{linear-PbooOqg7.js → linear-DU6Q5CX3.js} +35 -35
- package/dist/{main-B5yML0bw.js → main-BD2KGFpU.js} +74594 -68034
- package/dist/main.js +1 -1
- package/dist/{mermaid-Cg5IX6Nv.js → mermaid-HVCtvbyx.js} +6160 -7493
- package/dist/min-DcGMA4e_.js +80 -0
- package/dist/mindmap-definition-Q6HEUPPD-BW8UmIDQ.js +785 -0
- package/dist/nginx-zDPm3Z74.js +89 -0
- package/dist/{number-overlay-editor-DUhfZqtP.js → number-overlay-editor-D8Hl0Syo.js} +19 -19
- package/dist/{pieDiagram-DBDJKBY4-DTOlNsja.js → pieDiagram-ADFJNKIX-Bg-3zg5U.js} +17 -17
- package/dist/{quadrantDiagram-YPSRARAO-BX2d8VS-.js → quadrantDiagram-LMRXKWRM-BO4IG6Yz.js} +6 -6
- package/dist/{react-plotly-Dcyw-3Sa.js → react-plotly-dkvHVuRb.js} +3577 -3577
- package/dist/{requirementDiagram-EGVEC5DT-D1T5u-wG.js → requirementDiagram-4UW4RH46-5sdTguSM.js} +7 -7
- package/dist/{sankeyDiagram-HRAUVNP4-G6xDfnp-.js → sankeyDiagram-GR3RE2ED-Buhlv9OI.js} +5 -5
- package/dist/sequenceDiagram-C3RYC4MD-C3qsM2UP.js +2519 -0
- package/dist/{slides-component-BJLlPJSr.js → slides-component-D209A0-s.js} +66 -66
- package/dist/solr-BNlsLglM.js +41 -0
- package/dist/spreadsheet-C-cy4P5N.js +49 -0
- package/dist/{stateDiagram-UUKSUZ4H-CYXbjaom.js → stateDiagram-KXAO66HF-CopJ7G6P.js} +5 -5
- package/dist/{stateDiagram-v2-EYPG3UTE-Br1HYKT6.js → stateDiagram-v2-UMBNRL4Z-CejL8AKf.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/tiddlywiki-5wqsXtSk.js +155 -0
- package/dist/tiki-__Kn3CeS.js +181 -0
- package/dist/{time-B9SZnSen.js → time-BwSBitlN.js} +58 -58
- package/dist/{timeline-definition-3HZDQTIS-DeK_ZRD0.js → timeline-definition-XQNQX7LJ-DzMNTX-C.js} +10 -12
- package/dist/{timer-BYwnU4DF.js → timer-B0-z63CM.js} +16 -16
- package/dist/{treemap-75Q7IDZK-CKP4vV_0.js → treemap-75Q7IDZK-zeJG07dk.js} +14 -14
- package/dist/{vega-component-CpgdqX2d.js → vega-component-CUkiTayd.js} +30 -30
- package/dist/{xychartDiagram-FDP5SA34-AMEPsx_R.js → xychartDiagram-6GGTOJPD-DiENNXMS.js} +7 -7
- package/package.json +39 -39
- package/src/__mocks__/notebook.ts +3 -0
- package/src/__mocks__/requests.ts +3 -0
- package/src/__tests__/__snapshots__/CellStatus.test.tsx.snap +12 -12
- package/src/__tests__/chat-utils.test.ts +26 -211
- package/src/components/ai/ai-model-dropdown.tsx +25 -9
- package/src/components/app-config/ai-config.tsx +7 -0
- package/src/components/chat/chat-components.tsx +71 -0
- package/src/components/chat/chat-panel.tsx +481 -291
- package/src/components/chat/chat-utils.ts +50 -0
- package/src/components/chat/markdown-renderer.tsx +3 -7
- package/src/components/chat/tool-call-accordion.tsx +5 -5
- package/src/components/datasources/__tests__/utils.test.ts +6 -0
- package/src/components/datasources/column-preview.tsx +1 -3
- package/src/components/editor/actions/useNotebookActions.tsx +1 -1
- package/src/components/editor/ai/add-cell-with-ai.tsx +20 -15
- package/src/components/editor/ai/ai-completion-editor.tsx +22 -3
- package/src/components/editor/ai/completion-handlers.tsx +2 -4
- package/src/components/editor/ai/completion-utils.ts +85 -11
- package/src/components/editor/alerts/startup-logs-alert.tsx +72 -0
- package/src/components/editor/chrome/panels/datasources-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/dependency-graph-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/documentation-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/error-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/file-explorer-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/logs-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/outline-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/packages-panel.tsx +4 -2
- package/src/components/editor/chrome/panels/scratchpad-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/secrets-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/snippets-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/tracing-panel.tsx +3 -1
- package/src/components/editor/chrome/panels/variable-panel.tsx +3 -1
- package/src/components/editor/chrome/wrapper/app-chrome.tsx +38 -28
- package/src/components/editor/controls/command-palette-button.tsx +1 -1
- package/src/components/editor/controls/command-palette.tsx +5 -4
- package/src/components/editor/controls/state.ts +4 -0
- package/src/components/editor/package-alert.tsx +108 -58
- package/src/components/editor/renderers/CellArray.tsx +2 -0
- package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +0 -1
- package/src/components/pages/edit-page.tsx +7 -3
- package/src/core/ai/chat-utils.ts +26 -43
- package/src/core/ai/config.ts +1 -1
- package/src/core/ai/context/__tests__/registry.test.ts +277 -3
- package/src/core/ai/context/context.ts +11 -1
- package/src/core/ai/context/providers/__tests__/cell-output.test.ts +378 -0
- package/src/core/ai/context/providers/__tests__/error.test.ts +3 -2
- package/src/core/ai/context/providers/__tests__/file.test.ts +119 -0
- package/src/core/ai/context/providers/cell-output.ts +349 -0
- package/src/core/ai/context/providers/common.ts +5 -1
- package/src/core/ai/context/providers/file.ts +287 -0
- package/src/core/ai/context/registry.ts +79 -0
- package/src/core/ai/state.ts +22 -5
- package/src/core/alerts/state.ts +71 -3
- package/src/core/cells/cell.ts +2 -2
- package/src/core/cells/cells.ts +1 -1
- package/src/core/cells/logs.ts +1 -1
- package/src/core/cells/runs.ts +6 -5
- package/src/core/codemirror/ai/resources.ts +47 -5
- package/src/core/codemirror/ai/state.ts +12 -0
- package/src/core/codemirror/language/__tests__/sql.test.ts +45 -0
- package/src/core/codemirror/markdown/__tests__/commands.test.ts +1 -0
- package/src/core/codemirror/theme/dark.ts +1 -1
- package/src/core/config/capabilities.ts +1 -1
- package/src/core/datasets/__tests__/data-source.test.ts +24 -0
- package/src/core/errors/__tests__/errors.test.ts +2 -0
- package/src/core/islands/bridge.ts +1 -0
- package/src/core/islands/main.ts +1 -0
- package/src/core/kernel/messages.ts +12 -6
- package/src/core/layout/layout.ts +3 -3
- package/src/core/network/requests-network.ts +8 -0
- package/src/core/network/requests-static.ts +1 -0
- package/src/core/network/requests-toasting.ts +1 -0
- package/src/core/network/types.ts +4 -1
- package/src/core/wasm/bridge.ts +18 -2
- package/src/core/wasm/worker/bootstrap.ts +3 -1
- package/src/core/wasm/worker/getMarimoWheel.ts +3 -8
- package/src/core/wasm/worker/types.ts +3 -0
- package/src/core/websocket/useMarimoWebSocket.tsx +7 -1
- package/src/css/app/Cell.css +42 -21
- package/src/css/app/codemirror.css +5 -1
- package/src/css/globals.css +3 -0
- package/src/css/md.css +1 -1
- package/src/plugins/impl/MicrophonePlugin.tsx +2 -2
- package/src/plugins/impl/chat/ChatPlugin.tsx +2 -9
- package/src/plugins/impl/chat/chat-ui.tsx +129 -110
- package/src/plugins/impl/chat/types.ts +5 -8
- package/src/plugins/impl/code/__tests__/language.test.ts +15 -0
- package/src/plugins/impl/code/any-language-editor.tsx +11 -8
- package/src/plugins/layout/MimeRenderPlugin.tsx +3 -6
- package/src/stories/cell.stories.tsx +6 -0
- package/src/stories/layout/vertical/one-column.stories.tsx +215 -0
- package/src/theme/useTheme.ts +11 -6
- package/src/utils/__tests__/blob.test.ts +37 -0
- package/src/utils/arrays.ts +13 -0
- package/src/utils/fileToBase64.ts +21 -6
- package/src/utils/json/base64.ts +5 -2
- package/src/utils/numbers.ts +9 -7
- package/dist/any-language-editor-DC5170DQ.js +0 -45
- package/dist/asn1-jKiBa2Ya.js +0 -95
- package/dist/clojure-CCKyeQKf.js +0 -800
- package/dist/css-BkF-NPzE.js +0 -1553
- package/dist/index-5ZH_qS8j.js +0 -288
- package/dist/index-U4yn89qO.js +0 -341
- package/dist/javascript-C2yteZeJ.js +0 -691
- package/dist/min-DS5Jz-hg.js +0 -80
- package/dist/mindmap-definition-LNHGMQRG-0aOVaMR8.js +0 -3234
- package/dist/mllike-BSnXJBGA.js +0 -272
- package/dist/pug-CwAQJzGR.js +0 -248
- package/dist/python-BkR3uSy8.js +0 -313
- package/dist/rpm-IznJm2Xc.js +0 -57
- package/dist/sequenceDiagram-WFGC7UMF-DMhHzllb.js +0 -2284
- package/dist/ttcn-cfg-Bac_acMi.js +0 -88
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as Na, c as _a, N as Ca, V as Bn } from "./index-
|
|
1
|
+
import { bm as sr, y as cr, bn as Ki, j as S, bo as Xi, bp as Ji, bq as Zi, br as Qi, A as Ce, r as Ln, bs as Ae, aH as ea, aI as ur, bt as Ot, bu as lr, bv as bt, bw as Ke, bx as xt, L as ta, by as na, bz as ra, bA as ia, bB as on, bC as dr, bD as aa, bE as fr, bF as oa, bG as sa, bH as ca, bI as ua, bJ as la, G as da, J as fa, F as ga, E as ha, U as ma, bK as pa, O as ya, bL as Ea, w as Sa } from "./main-BD2KGFpU.js";
|
|
2
|
+
import { i as Na, c as _a, N as Ca, V as Bn } from "./index-6qYeHHjQ.js";
|
|
3
3
|
/**
|
|
4
|
-
* @license lucide-react v0.
|
|
4
|
+
* @license lucide-react v0.542.0 - ISC
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the ISC license.
|
|
7
7
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -12,7 +12,7 @@ const Ta = [
|
|
|
12
12
|
["rect", { x: "7", y: "8", width: "4", height: "9", rx: "1", key: "sr5ea" }]
|
|
13
13
|
], Aa = sr("chart-column-big", Ta);
|
|
14
14
|
/**
|
|
15
|
-
* @license lucide-react v0.
|
|
15
|
+
* @license lucide-react v0.542.0 - ISC
|
|
16
16
|
*
|
|
17
17
|
* This source code is licensed under the ISC license.
|
|
18
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
@@ -49,8 +49,8 @@ function Me(e, t) {
|
|
|
49
49
|
}
|
|
50
50
|
var $t = { exports: {} }, $n;
|
|
51
51
|
function xa() {
|
|
52
|
-
return $n || ($n = 1, function(e) {
|
|
53
|
-
var t = function() {
|
|
52
|
+
return $n || ($n = 1, (function(e) {
|
|
53
|
+
var t = (function() {
|
|
54
54
|
function n(l, g) {
|
|
55
55
|
return g != null && l instanceof g;
|
|
56
56
|
}
|
|
@@ -84,7 +84,7 @@ function xa() {
|
|
|
84
84
|
return null;
|
|
85
85
|
if (b === 0)
|
|
86
86
|
return N;
|
|
87
|
-
var C,
|
|
87
|
+
var C, P;
|
|
88
88
|
if (typeof N != "object")
|
|
89
89
|
return N;
|
|
90
90
|
if (n(N, a))
|
|
@@ -108,12 +108,12 @@ function xa() {
|
|
|
108
108
|
else {
|
|
109
109
|
if (T && Buffer.isBuffer(N))
|
|
110
110
|
return Buffer.allocUnsafe ? C = Buffer.allocUnsafe(N.length) : C = new Buffer(N.length), N.copy(C), C;
|
|
111
|
-
n(N, Error) ? C = Object.create(N) : typeof p > "u" ? (
|
|
111
|
+
n(N, Error) ? C = Object.create(N) : typeof p > "u" ? (P = Object.getPrototypeOf(N), C = Object.create(P)) : (C = Object.create(p), P = p);
|
|
112
112
|
}
|
|
113
113
|
if (g) {
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
116
|
-
return _[
|
|
114
|
+
var w = E.indexOf(N);
|
|
115
|
+
if (w != -1)
|
|
116
|
+
return _[w];
|
|
117
117
|
E.push(N), _.push(C);
|
|
118
118
|
}
|
|
119
119
|
n(N, a) && N.forEach(function(pe, je) {
|
|
@@ -123,20 +123,20 @@ function xa() {
|
|
|
123
123
|
var je = A(pe, b - 1);
|
|
124
124
|
C.add(je);
|
|
125
125
|
});
|
|
126
|
-
for (var
|
|
127
|
-
var
|
|
128
|
-
|
|
126
|
+
for (var D in N) {
|
|
127
|
+
var q;
|
|
128
|
+
P && (q = Object.getOwnPropertyDescriptor(P, D)), !(q && q.set == null) && (C[D] = A(N[D], b - 1));
|
|
129
129
|
}
|
|
130
130
|
if (Object.getOwnPropertySymbols)
|
|
131
|
-
for (var
|
|
132
|
-
var
|
|
133
|
-
Z && !Z.enumerable && !y || (C[
|
|
131
|
+
for (var B = Object.getOwnPropertySymbols(N), D = 0; D < B.length; D++) {
|
|
132
|
+
var v = B[D], Z = Object.getOwnPropertyDescriptor(N, v);
|
|
133
|
+
Z && !Z.enumerable && !y || (C[v] = A(N[v], b - 1), Z.enumerable || Object.defineProperty(C, v, {
|
|
134
134
|
enumerable: false
|
|
135
135
|
}));
|
|
136
136
|
}
|
|
137
137
|
if (y)
|
|
138
|
-
for (var $e = Object.getOwnPropertyNames(N),
|
|
139
|
-
var Q = $e[
|
|
138
|
+
for (var $e = Object.getOwnPropertyNames(N), D = 0; D < $e.length; D++) {
|
|
139
|
+
var Q = $e[D], Z = Object.getOwnPropertyDescriptor(N, Q);
|
|
140
140
|
Z && Z.enumerable || (C[Q] = A(N[Q], b - 1), Object.defineProperty(C, Q, {
|
|
141
141
|
enumerable: false
|
|
142
142
|
}));
|
|
@@ -173,24 +173,24 @@ function xa() {
|
|
|
173
173
|
return l.global && (g += "g"), l.ignoreCase && (g += "i"), l.multiline && (g += "m"), g;
|
|
174
174
|
}
|
|
175
175
|
return c.__getRegExpFlags = u, c;
|
|
176
|
-
}();
|
|
176
|
+
})();
|
|
177
177
|
e.exports && (e.exports = t);
|
|
178
|
-
}($t)), $t.exports;
|
|
178
|
+
})($t)), $t.exports;
|
|
179
179
|
}
|
|
180
180
|
xa();
|
|
181
181
|
var jt, jn;
|
|
182
182
|
function Ia() {
|
|
183
183
|
return jn || (jn = 1, jt = function(e, t) {
|
|
184
184
|
t || (t = {}), typeof t == "function" && (t = { cmp: t });
|
|
185
|
-
var n = typeof t.cycles == "boolean" ? t.cycles : false, a = t.cmp && /* @__PURE__ */ function(o) {
|
|
185
|
+
var n = typeof t.cycles == "boolean" ? t.cycles : false, a = t.cmp && /* @__PURE__ */ (function(o) {
|
|
186
186
|
return function(c) {
|
|
187
187
|
return function(f, i) {
|
|
188
188
|
var s = { key: f, value: c[f] }, d = { key: i, value: c[i] };
|
|
189
189
|
return o(s, d);
|
|
190
190
|
};
|
|
191
191
|
};
|
|
192
|
-
}(t.cmp), r = [];
|
|
193
|
-
return function o(c) {
|
|
192
|
+
})(t.cmp), r = [];
|
|
193
|
+
return (function o(c) {
|
|
194
194
|
if (c && c.toJSON && typeof c.toJSON == "function" && (c = c.toJSON()), c !== void 0) {
|
|
195
195
|
if (typeof c == "number") return isFinite(c) ? "" + c : "null";
|
|
196
196
|
if (typeof c != "object") return JSON.stringify(c);
|
|
@@ -212,7 +212,7 @@ function Ia() {
|
|
|
212
212
|
}
|
|
213
213
|
return r.splice(s, 1), "{" + i + "}";
|
|
214
214
|
}
|
|
215
|
-
}(e);
|
|
215
|
+
})(e);
|
|
216
216
|
}), jt;
|
|
217
217
|
}
|
|
218
218
|
var wa = Ia();
|
|
@@ -316,7 +316,7 @@ Set.prototype.toJSON = function() {
|
|
|
316
316
|
return `Set(${[...this].map((e) => gr(e)).join(",")})`;
|
|
317
317
|
};
|
|
318
318
|
const V = gr;
|
|
319
|
-
function
|
|
319
|
+
function Y(e, t) {
|
|
320
320
|
return e.indexOf(t) > -1;
|
|
321
321
|
}
|
|
322
322
|
function Ma(e, t) {
|
|
@@ -928,15 +928,15 @@ const Es = {
|
|
|
928
928
|
temporal: 1,
|
|
929
929
|
nominal: 1,
|
|
930
930
|
geojson: 1
|
|
931
|
-
},
|
|
931
|
+
}, M = "quantitative", se = "ordinal", W = "temporal", ae = "nominal", Ss = "geojson";
|
|
932
932
|
function Ns(e) {
|
|
933
933
|
if (e)
|
|
934
934
|
switch (e = e.toLowerCase(), e) {
|
|
935
935
|
case "q":
|
|
936
|
-
case
|
|
936
|
+
case M:
|
|
937
937
|
return "quantitative";
|
|
938
938
|
case "t":
|
|
939
|
-
case
|
|
939
|
+
case W:
|
|
940
940
|
return "temporal";
|
|
941
941
|
case "o":
|
|
942
942
|
case se:
|
|
@@ -1020,17 +1020,17 @@ function Wt(e, t) {
|
|
|
1020
1020
|
return true;
|
|
1021
1021
|
case "scheme":
|
|
1022
1022
|
case "interpolate":
|
|
1023
|
-
return !
|
|
1023
|
+
return !Y(["point", "band", "identity"], e);
|
|
1024
1024
|
case "bins":
|
|
1025
|
-
return !
|
|
1025
|
+
return !Y(["point", "band", "identity", "ordinal"], e);
|
|
1026
1026
|
case "round":
|
|
1027
1027
|
return De(e) || e === "band" || e === "point";
|
|
1028
1028
|
case "padding":
|
|
1029
|
-
return De(e) ||
|
|
1029
|
+
return De(e) || Y(["point", "band"], e);
|
|
1030
1030
|
case "paddingOuter":
|
|
1031
1031
|
case "rangeStep":
|
|
1032
1032
|
case "align":
|
|
1033
|
-
return
|
|
1033
|
+
return Y(["point", "band"], e);
|
|
1034
1034
|
case "paddingInner":
|
|
1035
1035
|
return e === "band";
|
|
1036
1036
|
case "clamp":
|
|
@@ -1044,7 +1044,7 @@ function Wt(e, t) {
|
|
|
1044
1044
|
case "constant":
|
|
1045
1045
|
return e === "symlog";
|
|
1046
1046
|
case "zero":
|
|
1047
|
-
return vs(e) && !
|
|
1047
|
+
return vs(e) && !Y([
|
|
1048
1048
|
"log",
|
|
1049
1049
|
"time",
|
|
1050
1050
|
"utc",
|
|
@@ -1080,7 +1080,7 @@ function Fs(e, t) {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
function Fr(e, t) {
|
|
1083
|
-
return
|
|
1083
|
+
return Y([se, ae], t) ? e === void 0 || be(e) : t === W ? Y([k.TIME, k.UTC, void 0], e) : t === M ? Y([
|
|
1084
1084
|
k.LOG,
|
|
1085
1085
|
k.POW,
|
|
1086
1086
|
k.SQRT,
|
|
@@ -1096,14 +1096,14 @@ function Rr(e, t) {
|
|
|
1096
1096
|
switch (e) {
|
|
1097
1097
|
case R:
|
|
1098
1098
|
case F:
|
|
1099
|
-
return De(t) ||
|
|
1099
|
+
return De(t) || Y(["band", "point"], t);
|
|
1100
1100
|
case Ne:
|
|
1101
1101
|
// TODO: size and opacity can support ordinal with more modification
|
|
1102
1102
|
case kt:
|
|
1103
1103
|
case Dt:
|
|
1104
1104
|
case Ft:
|
|
1105
1105
|
case Rt:
|
|
1106
|
-
return De(t) || Ds(t) ||
|
|
1106
|
+
return De(t) || Ds(t) || Y(["band", "point"], t);
|
|
1107
1107
|
case le:
|
|
1108
1108
|
case wt:
|
|
1109
1109
|
case vt:
|
|
@@ -1129,7 +1129,7 @@ function ks(e, t) {
|
|
|
1129
1129
|
}
|
|
1130
1130
|
var Yt = { exports: {} }, Hn;
|
|
1131
1131
|
function Qe() {
|
|
1132
|
-
return Hn || (Hn = 1, function(e) {
|
|
1132
|
+
return Hn || (Hn = 1, (function(e) {
|
|
1133
1133
|
var t = e.exports, n = "__name__";
|
|
1134
1134
|
t.namedfunc = function(i, s) {
|
|
1135
1135
|
return s[n] = i, s;
|
|
@@ -1307,7 +1307,7 @@ function Qe() {
|
|
|
1307
1307
|
}), i.length ? i.join("").trim() : l[0].slice(0, s);
|
|
1308
1308
|
}
|
|
1309
1309
|
var f = /([\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u2028\u2029\u3000\uFEFF])/;
|
|
1310
|
-
}(Yt)), Yt.exports;
|
|
1310
|
+
})(Yt)), Yt.exports;
|
|
1311
1311
|
}
|
|
1312
1312
|
var I = Qe();
|
|
1313
1313
|
function ee(e, t) {
|
|
@@ -1319,7 +1319,7 @@ function ue(e, t) {
|
|
|
1319
1319
|
return false;
|
|
1320
1320
|
return true;
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function z(e, t, n) {
|
|
1323
1323
|
if (e.forEach)
|
|
1324
1324
|
e.forEach.call(n, t);
|
|
1325
1325
|
else
|
|
@@ -1433,7 +1433,7 @@ const Te = "area", ge = "bar", Ye = "line", qe = "point", sn = "rect", cn = "rul
|
|
|
1433
1433
|
square: 1
|
|
1434
1434
|
};
|
|
1435
1435
|
function Ys(e) {
|
|
1436
|
-
return
|
|
1436
|
+
return Y(["line", "area", "trail"], e);
|
|
1437
1437
|
}
|
|
1438
1438
|
const zs = fe(Ws);
|
|
1439
1439
|
function qs(e) {
|
|
@@ -1457,10 +1457,10 @@ const Vs = [
|
|
|
1457
1457
|
Vs.map((e) => e.substr(0, 3));
|
|
1458
1458
|
const Ks = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"];
|
|
1459
1459
|
Ks.map((e) => e.substr(0, 3));
|
|
1460
|
-
var
|
|
1460
|
+
var j;
|
|
1461
1461
|
(function(e) {
|
|
1462
1462
|
e.YEAR = "year", e.MONTH = "month", e.DAY = "day", e.DATE = "date", e.HOURS = "hours", e.MINUTES = "minutes", e.SECONDS = "seconds", e.MILLISECONDS = "milliseconds", e.YEARMONTH = "yearmonth", e.YEARMONTHDATE = "yearmonthdate", e.YEARMONTHDATEHOURS = "yearmonthdatehours", e.YEARMONTHDATEHOURSMINUTES = "yearmonthdatehoursminutes", e.YEARMONTHDATEHOURSMINUTESSECONDS = "yearmonthdatehoursminutesseconds", e.MONTHDATE = "monthdate", e.MONTHDATEHOURS = "monthdatehours", e.HOURSMINUTES = "hoursminutes", e.HOURSMINUTESSECONDS = "hoursminutesseconds", e.MINUTESSECONDS = "minutesseconds", e.SECONDSMILLISECONDS = "secondsmilliseconds", e.QUARTER = "quarter", e.YEARQUARTER = "yearquarter", e.QUARTERMONTH = "quartermonth", e.YEARQUARTERMONTH = "yearquartermonth", e.UTCYEAR = "utcyear", e.UTCMONTH = "utcmonth", e.UTCDAY = "utcday", e.UTCDATE = "utcdate", e.UTCHOURS = "utchours", e.UTCMINUTES = "utcminutes", e.UTCSECONDS = "utcseconds", e.UTCMILLISECONDS = "utcmilliseconds", e.UTCYEARMONTH = "utcyearmonth", e.UTCYEARMONTHDATE = "utcyearmonthdate", e.UTCYEARMONTHDATEHOURS = "utcyearmonthdatehours", e.UTCYEARMONTHDATEHOURSMINUTES = "utcyearmonthdatehoursminutes", e.UTCYEARMONTHDATEHOURSMINUTESSECONDS = "utcyearmonthdatehoursminutesseconds", e.UTCMONTHDATE = "utcmonthdate", e.UTCMONTHDATEHOURS = "utcmonthdatehours", e.UTCHOURSMINUTES = "utchoursminutes", e.UTCHOURSMINUTESSECONDS = "utchoursminutesseconds", e.UTCMINUTESSECONDS = "utcminutesseconds", e.UTCSECONDSMILLISECONDS = "utcsecondsmilliseconds", e.UTCQUARTER = "utcquarter", e.UTCYEARQUARTER = "utcyearquarter", e.UTCQUARTERMONTH = "utcquartermonth", e.UTCYEARQUARTERMONTH = "utcyearquartermonth";
|
|
1463
|
-
})(
|
|
1463
|
+
})(j || (j = {}));
|
|
1464
1464
|
const wn = {
|
|
1465
1465
|
year: 1,
|
|
1466
1466
|
quarter: 1,
|
|
@@ -1547,9 +1547,9 @@ function ic(e, t) {
|
|
|
1547
1547
|
for (const r of Gr)
|
|
1548
1548
|
if (Wr(e, r))
|
|
1549
1549
|
switch (r) {
|
|
1550
|
-
case
|
|
1550
|
+
case j.DAY:
|
|
1551
1551
|
throw new Error("Cannot convert to TimeUnits containing 'day'");
|
|
1552
|
-
case
|
|
1552
|
+
case j.QUARTER: {
|
|
1553
1553
|
const { getDateMethod: o, setDateMethod: c } = Wn("month", n);
|
|
1554
1554
|
a[c](Math.floor(t[o]() / 3) * 3);
|
|
1555
1555
|
break;
|
|
@@ -1567,7 +1567,7 @@ function Wn(e, t) {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
function Wr(e, t) {
|
|
1569
1569
|
const n = e.indexOf(t);
|
|
1570
|
-
return n > -1 && (t !==
|
|
1570
|
+
return n > -1 && (t !== j.SECONDS || n === 0 || e.charAt(n - 1) !== "i");
|
|
1571
1571
|
}
|
|
1572
1572
|
const U = "?";
|
|
1573
1573
|
function O(e) {
|
|
@@ -1825,9 +1825,9 @@ const X = [false, true], oc = {
|
|
|
1825
1825
|
autoCount: X,
|
|
1826
1826
|
bin: X,
|
|
1827
1827
|
hasFn: X,
|
|
1828
|
-
timeUnit: [void 0,
|
|
1828
|
+
timeUnit: [void 0, j.YEAR, j.MONTH, j.MINUTES, j.SECONDS],
|
|
1829
1829
|
field: [void 0],
|
|
1830
|
-
type: [ae, se,
|
|
1830
|
+
type: [ae, se, M, W],
|
|
1831
1831
|
sort: ["ascending", "descending"],
|
|
1832
1832
|
stack: ["zero", "normalize", "center", null],
|
|
1833
1833
|
value: [void 0],
|
|
@@ -2059,7 +2059,7 @@ function Ac(e, t) {
|
|
|
2059
2059
|
case "longitude2":
|
|
2060
2060
|
case "latitude":
|
|
2061
2061
|
case "latitude2":
|
|
2062
|
-
return n !==
|
|
2062
|
+
return n !== M ? {
|
|
2063
2063
|
compatible: false,
|
|
2064
2064
|
warning: `Channel ${t} should be used with a quantitative field only, not ${e.type} field.`
|
|
2065
2065
|
} : ve;
|
|
@@ -2075,7 +2075,7 @@ function Ac(e, t) {
|
|
|
2075
2075
|
warning: `Channel ${t} should not be used with an unsorted discrete field.`
|
|
2076
2076
|
} : ve;
|
|
2077
2077
|
case "shape":
|
|
2078
|
-
return
|
|
2078
|
+
return Y(["ordinal", "nominal", "geojson"], e.type) ? ve : {
|
|
2079
2079
|
compatible: false,
|
|
2080
2080
|
warning: "Shape channel should be used with only either discrete or geojson data."
|
|
2081
2081
|
};
|
|
@@ -2095,7 +2095,7 @@ function bc(e, t, n) {
|
|
|
2095
2095
|
switch (t.type) {
|
|
2096
2096
|
case "nominal":
|
|
2097
2097
|
case "ordinal":
|
|
2098
|
-
return st(e) || Ht(e) === "discrete" ? (e === "shape" && t.type === "ordinal" && _e(ie.discreteChannelCannotEncode(e, "ordinal")), "ordinal") :
|
|
2098
|
+
return st(e) || Ht(e) === "discrete" ? (e === "shape" && t.type === "ordinal" && _e(ie.discreteChannelCannotEncode(e, "ordinal")), "ordinal") : Y(["x", "y"], e) && Y(["rect", "bar", "rule"], n) ? "band" : "point";
|
|
2099
2099
|
case "temporal":
|
|
2100
2100
|
return st(e) ? "time" : Ht(e) === "discrete" ? (_e(ie.discreteChannelCannotEncode(e, "temporal")), "ordinal") : "time";
|
|
2101
2101
|
case "quantitative":
|
|
@@ -2107,7 +2107,7 @@ function bc(e, t, n) {
|
|
|
2107
2107
|
}
|
|
2108
2108
|
var ce;
|
|
2109
2109
|
(function(e) {
|
|
2110
|
-
e.QUANTITATIVE =
|
|
2110
|
+
e.QUANTITATIVE = M, e.ORDINAL = se, e.TEMPORAL = W, e.NOMINAL = ae, e.KEY = "key";
|
|
2111
2111
|
})(ce || (ce = {}));
|
|
2112
2112
|
function Yn(e) {
|
|
2113
2113
|
return e === se || e === ae || e === ce.KEY;
|
|
@@ -2179,7 +2179,7 @@ function Dc(e) {
|
|
|
2179
2179
|
}
|
|
2180
2180
|
function Fc(e, t, n, a = {}) {
|
|
2181
2181
|
const r = qs(e) ? e.type : e;
|
|
2182
|
-
if (!
|
|
2182
|
+
if (!Y(wc, r))
|
|
2183
2183
|
return null;
|
|
2184
2184
|
const o = Dc(t);
|
|
2185
2185
|
if (!o)
|
|
@@ -2199,14 +2199,14 @@ function Fc(e, t, n, a = {}) {
|
|
|
2199
2199
|
return g;
|
|
2200
2200
|
}, []);
|
|
2201
2201
|
let l;
|
|
2202
|
-
if (c.stack !== void 0 ? yn(c.stack) ? l = c.stack ? "zero" : null : l = c.stack : u.length > 0 && (
|
|
2202
|
+
if (c.stack !== void 0 ? yn(c.stack) ? l = c.stack ? "zero" : null : l = c.stack : u.length > 0 && (Y(vc, r) ? l = $a(n, "zero") : l = n), !l || !Ic(l))
|
|
2203
2203
|
return null;
|
|
2204
2204
|
if (c.scale && c.scale.type && c.scale.type !== k.LINEAR) {
|
|
2205
2205
|
if (a.disallowNonLinearStack)
|
|
2206
2206
|
return null;
|
|
2207
2207
|
_e(ie.cannotStackNonLinearScale(c.scale.type));
|
|
2208
2208
|
}
|
|
2209
|
-
return zn(t, o === R ? En : Sn) ? (c.stack !== void 0 && _e(ie.cannotStackRangedMark(o)), null) : (c.aggregate && !
|
|
2209
|
+
return zn(t, o === R ? En : Sn) ? (c.stack !== void 0 && _e(ie.cannotStackRangedMark(o)), null) : (c.aggregate && !Y(Yr, c.aggregate) && _e(ie.stackNonSummativeAggregate(c.aggregate)), {
|
|
2210
2210
|
groupbyChannel: s ? i : void 0,
|
|
2211
2211
|
fieldChannel: o,
|
|
2212
2212
|
impute: Ys(r),
|
|
@@ -2311,7 +2311,7 @@ function qn(e, t = Fn, n = Dn) {
|
|
|
2311
2311
|
if (t.get(m.CHANNEL) && a.push(Oe(e.channel, n.get(m.CHANNEL))), x(e)) {
|
|
2312
2312
|
const r = Jr(e, t, n);
|
|
2313
2313
|
r && a.push(r);
|
|
2314
|
-
} else ne(e) ? a.push(e.value) :
|
|
2314
|
+
} else ne(e) ? a.push(e.value) : G(e) && a.push("autocount()");
|
|
2315
2315
|
return a.join(":");
|
|
2316
2316
|
}
|
|
2317
2317
|
function Jr(e, t = Fn, n = Dn) {
|
|
@@ -2324,14 +2324,14 @@ function Jr(e, t = Fn, n = Dn) {
|
|
|
2324
2324
|
if (O(e.type))
|
|
2325
2325
|
o += "," + Oe(e.type, n.get(m.TYPE));
|
|
2326
2326
|
else {
|
|
2327
|
-
const c = ((e.type ||
|
|
2327
|
+
const c = ((e.type || M) + "").substr(0, 1);
|
|
2328
2328
|
o += "," + Oe(c, n.get(m.TYPE));
|
|
2329
2329
|
}
|
|
2330
2330
|
o += r.map((c) => {
|
|
2331
2331
|
let f = c.value instanceof Array ? "[" + c.value + "]" : c.value;
|
|
2332
2332
|
return "," + c.key + "=" + f;
|
|
2333
2333
|
}).join("");
|
|
2334
|
-
} else
|
|
2334
|
+
} else G(e) && (o = "*,q");
|
|
2335
2335
|
return o ? a ? (I.isString(a) ? a : U + (I.keys(a).length > 0 ? JSON.stringify(a) : "")) + "(" + o + ")" : o : null;
|
|
2336
2336
|
}
|
|
2337
2337
|
function Bc(e, t, n) {
|
|
@@ -2479,14 +2479,14 @@ function ne(e) {
|
|
|
2479
2479
|
function x(e) {
|
|
2480
2480
|
return e != null && (e.field || e.aggregate === "count");
|
|
2481
2481
|
}
|
|
2482
|
-
function
|
|
2482
|
+
function G(e) {
|
|
2483
2483
|
return e != null && "autoCount" in e;
|
|
2484
2484
|
}
|
|
2485
2485
|
function re(e) {
|
|
2486
|
-
return
|
|
2486
|
+
return G(e) && e.autoCount === false;
|
|
2487
2487
|
}
|
|
2488
2488
|
function Pt(e) {
|
|
2489
|
-
return
|
|
2489
|
+
return G(e) && e.autoCount === true;
|
|
2490
2490
|
}
|
|
2491
2491
|
const jc = [
|
|
2492
2492
|
m.AGGREGATE,
|
|
@@ -2568,7 +2568,7 @@ function Rn(e, t = {}) {
|
|
|
2568
2568
|
}
|
|
2569
2569
|
}
|
|
2570
2570
|
function We(e) {
|
|
2571
|
-
return x(e) ? !Ee(e) && e.type !== "temporal" :
|
|
2571
|
+
return x(e) ? !Ee(e) && e.type !== "temporal" : G(e);
|
|
2572
2572
|
}
|
|
2573
2573
|
function Ee(e) {
|
|
2574
2574
|
if (x(e)) {
|
|
@@ -2592,7 +2592,7 @@ function xe(e) {
|
|
|
2592
2592
|
return Oc({ type: t.type }, a, i, c);
|
|
2593
2593
|
}
|
|
2594
2594
|
var it = { exports: {} }, Zt = /* @__PURE__ */ new Date(), Qt = /* @__PURE__ */ new Date();
|
|
2595
|
-
function
|
|
2595
|
+
function H(e, t, n, a) {
|
|
2596
2596
|
function r(o) {
|
|
2597
2597
|
return e(o = /* @__PURE__ */ new Date(+o)), o;
|
|
2598
2598
|
}
|
|
@@ -2609,7 +2609,7 @@ function W(e, t, n, a) {
|
|
|
2609
2609
|
for (t(o, 1), e(o), o < c && i.push(/* @__PURE__ */ new Date(+o)); t(o, f), e(o), o < c; ) i.push(/* @__PURE__ */ new Date(+o));
|
|
2610
2610
|
return i;
|
|
2611
2611
|
}, r.filter = function(o) {
|
|
2612
|
-
return
|
|
2612
|
+
return H(function(c) {
|
|
2613
2613
|
for (; e(c), !o(c); ) c.setTime(c - 1);
|
|
2614
2614
|
}, function(c, f) {
|
|
2615
2615
|
for (; --f >= 0; ) for (; t(c, 1), !o(c); ) ;
|
|
@@ -2624,14 +2624,14 @@ function W(e, t, n, a) {
|
|
|
2624
2624
|
}) : r;
|
|
2625
2625
|
}), r;
|
|
2626
2626
|
}
|
|
2627
|
-
var Ve =
|
|
2627
|
+
var Ve = H(function() {
|
|
2628
2628
|
}, function(e, t) {
|
|
2629
2629
|
e.setTime(+e + t);
|
|
2630
2630
|
}, function(e, t) {
|
|
2631
2631
|
return t - e;
|
|
2632
2632
|
});
|
|
2633
2633
|
Ve.every = function(e) {
|
|
2634
|
-
return e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ?
|
|
2634
|
+
return e = Math.floor(e), !isFinite(e) || !(e > 0) ? null : e > 1 ? H(function(t) {
|
|
2635
2635
|
t.setTime(Math.floor(t / e) * e);
|
|
2636
2636
|
}, function(t, n) {
|
|
2637
2637
|
t.setTime(+t + n * e);
|
|
@@ -2639,7 +2639,7 @@ Ve.every = function(e) {
|
|
|
2639
2639
|
return (n - t) / e;
|
|
2640
2640
|
}) : Ve;
|
|
2641
2641
|
};
|
|
2642
|
-
const Qr =
|
|
2642
|
+
const Qr = H(function(e) {
|
|
2643
2643
|
e.setMilliseconds(0);
|
|
2644
2644
|
}, function(e, t) {
|
|
2645
2645
|
e.setTime(+e + t * 1e3);
|
|
@@ -2647,7 +2647,7 @@ const Qr = W(function(e) {
|
|
|
2647
2647
|
return (t - e) / 1e3;
|
|
2648
2648
|
}, function(e) {
|
|
2649
2649
|
return e.getSeconds();
|
|
2650
|
-
}), ei =
|
|
2650
|
+
}), ei = H(function(e) {
|
|
2651
2651
|
e.setSeconds(0, 0);
|
|
2652
2652
|
}, function(e, t) {
|
|
2653
2653
|
e.setTime(+e + t * 6e4);
|
|
@@ -2655,7 +2655,7 @@ const Qr = W(function(e) {
|
|
|
2655
2655
|
return (t - e) / 6e4;
|
|
2656
2656
|
}, function(e) {
|
|
2657
2657
|
return e.getMinutes();
|
|
2658
|
-
}), ti =
|
|
2658
|
+
}), ti = H(function(e) {
|
|
2659
2659
|
e.setMinutes(0, 0, 0);
|
|
2660
2660
|
}, function(e, t) {
|
|
2661
2661
|
e.setTime(+e + t * 36e5);
|
|
@@ -2663,7 +2663,7 @@ const Qr = W(function(e) {
|
|
|
2663
2663
|
return (t - e) / 36e5;
|
|
2664
2664
|
}, function(e) {
|
|
2665
2665
|
return e.getHours();
|
|
2666
|
-
}), ni =
|
|
2666
|
+
}), ni = H(function(e) {
|
|
2667
2667
|
e.setHours(0, 0, 0, 0);
|
|
2668
2668
|
}, function(e, t) {
|
|
2669
2669
|
e.setDate(e.getDate() + t);
|
|
@@ -2673,7 +2673,7 @@ const Qr = W(function(e) {
|
|
|
2673
2673
|
return e.getDate() - 1;
|
|
2674
2674
|
});
|
|
2675
2675
|
function Ie(e) {
|
|
2676
|
-
return
|
|
2676
|
+
return H(function(t) {
|
|
2677
2677
|
t.setHours(0, 0, 0, 0), t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7);
|
|
2678
2678
|
}, function(t, n) {
|
|
2679
2679
|
t.setDate(t.getDate() + n * 7);
|
|
@@ -2682,7 +2682,7 @@ function Ie(e) {
|
|
|
2682
2682
|
});
|
|
2683
2683
|
}
|
|
2684
2684
|
var mt = Ie(0), ri = Ie(1), ii = Ie(2), ai = Ie(3), oi = Ie(4), si = Ie(5), ci = Ie(6);
|
|
2685
|
-
const ui =
|
|
2685
|
+
const ui = H(function(e) {
|
|
2686
2686
|
e.setHours(0, 0, 0, 0), e.setDate(1);
|
|
2687
2687
|
}, function(e, t) {
|
|
2688
2688
|
e.setMonth(e.getMonth() + t);
|
|
@@ -2690,7 +2690,7 @@ const ui = W(function(e) {
|
|
|
2690
2690
|
return t.getMonth() - e.getMonth() + (t.getFullYear() - e.getFullYear()) * 12;
|
|
2691
2691
|
}, function(e) {
|
|
2692
2692
|
return e.getMonth();
|
|
2693
|
-
}), li =
|
|
2693
|
+
}), li = H(function(e) {
|
|
2694
2694
|
e.setHours(0, 0, 0, 0), e.setMonth(0, 1);
|
|
2695
2695
|
}, function(e, t) {
|
|
2696
2696
|
e.setFullYear(e.getFullYear() + t);
|
|
@@ -2698,7 +2698,7 @@ const ui = W(function(e) {
|
|
|
2698
2698
|
return t.getFullYear() - e.getFullYear();
|
|
2699
2699
|
}, function(e) {
|
|
2700
2700
|
return e.getFullYear();
|
|
2701
|
-
}), di =
|
|
2701
|
+
}), di = H(function(e) {
|
|
2702
2702
|
e.setUTCMilliseconds(0);
|
|
2703
2703
|
}, function(e, t) {
|
|
2704
2704
|
e.setTime(+e + t * 1e3);
|
|
@@ -2706,7 +2706,7 @@ const ui = W(function(e) {
|
|
|
2706
2706
|
return (t - e) / 1e3;
|
|
2707
2707
|
}, function(e) {
|
|
2708
2708
|
return e.getUTCSeconds();
|
|
2709
|
-
}), fi =
|
|
2709
|
+
}), fi = H(function(e) {
|
|
2710
2710
|
e.setUTCSeconds(0, 0);
|
|
2711
2711
|
}, function(e, t) {
|
|
2712
2712
|
e.setTime(+e + t * 6e4);
|
|
@@ -2714,7 +2714,7 @@ const ui = W(function(e) {
|
|
|
2714
2714
|
return (t - e) / 6e4;
|
|
2715
2715
|
}, function(e) {
|
|
2716
2716
|
return e.getUTCMinutes();
|
|
2717
|
-
}), gi =
|
|
2717
|
+
}), gi = H(function(e) {
|
|
2718
2718
|
e.setUTCMinutes(0, 0, 0);
|
|
2719
2719
|
}, function(e, t) {
|
|
2720
2720
|
e.setTime(+e + t * 36e5);
|
|
@@ -2722,7 +2722,7 @@ const ui = W(function(e) {
|
|
|
2722
2722
|
return (t - e) / 36e5;
|
|
2723
2723
|
}, function(e) {
|
|
2724
2724
|
return e.getUTCHours();
|
|
2725
|
-
}), hi =
|
|
2725
|
+
}), hi = H(function(e) {
|
|
2726
2726
|
e.setUTCHours(0, 0, 0, 0);
|
|
2727
2727
|
}, function(e, t) {
|
|
2728
2728
|
e.setUTCDate(e.getUTCDate() + t);
|
|
@@ -2732,7 +2732,7 @@ const ui = W(function(e) {
|
|
|
2732
2732
|
return e.getUTCDate() - 1;
|
|
2733
2733
|
});
|
|
2734
2734
|
function we(e) {
|
|
2735
|
-
return
|
|
2735
|
+
return H(function(t) {
|
|
2736
2736
|
t.setUTCHours(0, 0, 0, 0), t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7);
|
|
2737
2737
|
}, function(t, n) {
|
|
2738
2738
|
t.setUTCDate(t.getUTCDate() + n * 7);
|
|
@@ -2741,7 +2741,7 @@ function we(e) {
|
|
|
2741
2741
|
});
|
|
2742
2742
|
}
|
|
2743
2743
|
var pt = we(0), mi = we(1), pi = we(2), yi = we(3), Ei = we(4), Si = we(5), Ni = we(6);
|
|
2744
|
-
const _i =
|
|
2744
|
+
const _i = H(function(e) {
|
|
2745
2745
|
e.setUTCHours(0, 0, 0, 0), e.setUTCDate(1);
|
|
2746
2746
|
}, function(e, t) {
|
|
2747
2747
|
e.setUTCMonth(e.getUTCMonth() + t);
|
|
@@ -2749,7 +2749,7 @@ const _i = W(function(e) {
|
|
|
2749
2749
|
return t.getUTCMonth() - e.getUTCMonth() + (t.getUTCFullYear() - e.getUTCFullYear()) * 12;
|
|
2750
2750
|
}, function(e) {
|
|
2751
2751
|
return e.getUTCMonth();
|
|
2752
|
-
}), Ci =
|
|
2752
|
+
}), Ci = H(function(e) {
|
|
2753
2753
|
e.setUTCHours(0, 0, 0, 0), e.setUTCMonth(0, 1);
|
|
2754
2754
|
}, function(e, t) {
|
|
2755
2755
|
e.setUTCFullYear(e.getUTCFullYear() + t);
|
|
@@ -2767,7 +2767,7 @@ const Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
2767
2767
|
fridays: Zc,
|
|
2768
2768
|
hour: ti,
|
|
2769
2769
|
hours: Yc,
|
|
2770
|
-
interval:
|
|
2770
|
+
interval: H,
|
|
2771
2771
|
millisecond: Ve,
|
|
2772
2772
|
milliseconds: Ti,
|
|
2773
2773
|
minute: ei,
|
|
@@ -3215,7 +3215,7 @@ function Ai() {
|
|
|
3215
3215
|
}
|
|
3216
3216
|
var Ou = Ai(), nn = { exports: {} }, rn = { exports: {} }, Zn;
|
|
3217
3217
|
function bu() {
|
|
3218
|
-
return Zn || (Zn = 1, function(e) {
|
|
3218
|
+
return Zn || (Zn = 1, (function(e) {
|
|
3219
3219
|
var t = Qe(), n = e.exports;
|
|
3220
3220
|
n.repeat = function(a, r) {
|
|
3221
3221
|
var o = Array(r), c;
|
|
@@ -3296,11 +3296,11 @@ function bu() {
|
|
|
3296
3296
|
return n.zeros(s).map(i);
|
|
3297
3297
|
}, i;
|
|
3298
3298
|
};
|
|
3299
|
-
}(rn)), rn.exports;
|
|
3299
|
+
})(rn)), rn.exports;
|
|
3300
3300
|
}
|
|
3301
3301
|
var Qn;
|
|
3302
3302
|
function xu() {
|
|
3303
|
-
return Qn || (Qn = 1, function(e) {
|
|
3303
|
+
return Qn || (Qn = 1, (function(e) {
|
|
3304
3304
|
var t = Qe(), n = Ai(), a = bu(), r = e.exports;
|
|
3305
3305
|
r.unique = function(i, s, d) {
|
|
3306
3306
|
s = t.$(s), d = d || [];
|
|
@@ -3577,21 +3577,21 @@ function xu() {
|
|
|
3577
3577
|
});
|
|
3578
3578
|
return d.__summary__ = true, d;
|
|
3579
3579
|
};
|
|
3580
|
-
}(nn)), nn.exports;
|
|
3580
|
+
})(nn)), nn.exports;
|
|
3581
3581
|
}
|
|
3582
3582
|
var Iu = xu();
|
|
3583
3583
|
const wu = Au;
|
|
3584
3584
|
function vu(e, t = {}, n = { fields: [] }) {
|
|
3585
3585
|
t = I.extend({}, et, t);
|
|
3586
3586
|
let a = Iu.summary(e), r = Ou.inferAll(e), o = n.fields.reduce((i, s) => (i[s.name] = s, i), {}), c = a.map(function(i, s) {
|
|
3587
|
-
const d = i.field, u = r[d] === "date" ?
|
|
3587
|
+
const d = i.field, u = r[d] === "date" ? L.DATETIME : r[d];
|
|
3588
3588
|
let l = i.distinct, g;
|
|
3589
|
-
if (u ===
|
|
3590
|
-
g =
|
|
3591
|
-
else if (u ===
|
|
3592
|
-
l < t.numberNominalLimit && l / i.count < t.numberNominalProportion ? g = ae : g =
|
|
3593
|
-
else if (u ===
|
|
3594
|
-
g =
|
|
3589
|
+
if (u === L.NUMBER)
|
|
3590
|
+
g = M;
|
|
3591
|
+
else if (u === L.INTEGER)
|
|
3592
|
+
l < t.numberNominalLimit && l / i.count < t.numberNominalProportion ? g = ae : g = M;
|
|
3593
|
+
else if (u === L.DATETIME) {
|
|
3594
|
+
g = W, i.min = new Date(e[0][d]), i.max = new Date(e[0][d]);
|
|
3595
3595
|
for (const y of e) {
|
|
3596
3596
|
const E = new Date(y[d]).getTime();
|
|
3597
3597
|
E < i.min.getTime() && (i.min = new Date(E)), E > i.max.getTime() && (i.max = new Date(E));
|
|
@@ -3613,10 +3613,10 @@ function vu(e, t = {}, n = { fields: [] }) {
|
|
|
3613
3613
|
return h = I.extend(h, p), h;
|
|
3614
3614
|
});
|
|
3615
3615
|
for (let i of c)
|
|
3616
|
-
if (i.vlType ===
|
|
3616
|
+
if (i.vlType === M)
|
|
3617
3617
|
for (let s of t.enum.binProps.maxbins)
|
|
3618
3618
|
i.binStats[s] = Oi(s, i.stats);
|
|
3619
|
-
else if (i.vlType ===
|
|
3619
|
+
else if (i.vlType === W)
|
|
3620
3620
|
for (let s of t.enum.timeUnit)
|
|
3621
3621
|
s !== void 0 && (i.timeStats[s] = bi(s, i.stats));
|
|
3622
3622
|
const f = Object.assign({}, n, { fields: c });
|
|
@@ -3667,7 +3667,7 @@ class Du {
|
|
|
3667
3667
|
*/
|
|
3668
3668
|
cardinality(t, n = true, a = false) {
|
|
3669
3669
|
const r = this._fieldSchemaIndex[t.field];
|
|
3670
|
-
if (t.aggregate ||
|
|
3670
|
+
if (t.aggregate || G(t) && t.autoCount)
|
|
3671
3671
|
return 1;
|
|
3672
3672
|
if (t.bin) {
|
|
3673
3673
|
let o;
|
|
@@ -3682,21 +3682,21 @@ class Du {
|
|
|
3682
3682
|
if (n)
|
|
3683
3683
|
switch (t.timeUnit) {
|
|
3684
3684
|
// TODO: this should not always be the case once Vega-Lite supports turning off domain augmenting (VL issue #1385)
|
|
3685
|
-
case
|
|
3685
|
+
case j.SECONDS:
|
|
3686
3686
|
return 60;
|
|
3687
|
-
case
|
|
3687
|
+
case j.MINUTES:
|
|
3688
3688
|
return 60;
|
|
3689
|
-
case
|
|
3689
|
+
case j.HOURS:
|
|
3690
3690
|
return 24;
|
|
3691
|
-
case
|
|
3691
|
+
case j.DAY:
|
|
3692
3692
|
return 7;
|
|
3693
|
-
case
|
|
3693
|
+
case j.DATE:
|
|
3694
3694
|
return 31;
|
|
3695
|
-
case
|
|
3695
|
+
case j.MONTH:
|
|
3696
3696
|
return 12;
|
|
3697
|
-
case
|
|
3697
|
+
case j.QUARTER:
|
|
3698
3698
|
return 4;
|
|
3699
|
-
case
|
|
3699
|
+
case j.MILLISECONDS:
|
|
3700
3700
|
return 1e3;
|
|
3701
3701
|
}
|
|
3702
3702
|
let o = t.timeUnit, c = r.timeStats;
|
|
@@ -3715,8 +3715,8 @@ class Du {
|
|
|
3715
3715
|
timeUnitHasVariation(t) {
|
|
3716
3716
|
if (!t.timeUnit)
|
|
3717
3717
|
return;
|
|
3718
|
-
if (t.timeUnit ===
|
|
3719
|
-
const a = I.extend({}, t, { timeUnit:
|
|
3718
|
+
if (t.timeUnit === j.DAY) {
|
|
3719
|
+
const a = I.extend({}, t, { timeUnit: j.DATE });
|
|
3720
3720
|
if (this.cardinality(a, false, true) <= 1)
|
|
3721
3721
|
return false;
|
|
3722
3722
|
}
|
|
@@ -3732,7 +3732,7 @@ class Du {
|
|
|
3732
3732
|
domain(t) {
|
|
3733
3733
|
const n = this._fieldSchemaIndex[t.field];
|
|
3734
3734
|
let a = I.keys(n.stats.unique);
|
|
3735
|
-
return n.vlType ===
|
|
3735
|
+
return n.vlType === M ? [+n.stats.min, +n.stats.max] : n.type === L.DATETIME ? [n.stats.min, n.stats.max] : n.type === L.INTEGER || n.type === L.NUMBER ? (a = a.map((r) => +r), a.sort(I.cmp)) : n.vlType === se && n.ordinalDomain ? n.ordinalDomain : a.map((r) => r === "null" ? null : r).sort(I.cmp);
|
|
3736
3736
|
}
|
|
3737
3737
|
/**
|
|
3738
3738
|
* @return a Summary corresponding to the field of the given EncodingQuery
|
|
@@ -3755,7 +3755,7 @@ function bi(e, t) {
|
|
|
3755
3755
|
let a = {};
|
|
3756
3756
|
return I.keys(t.unique).forEach(function(r) {
|
|
3757
3757
|
let o = r === "null" ? null : new Date(r), c;
|
|
3758
|
-
o === null ? c = null : isNaN(o.getTime()) ? c = "Invalid Date" : c = (e ===
|
|
3758
|
+
o === null ? c = null : isNaN(o.getTime()) ? c = "Invalid Date" : c = (e === j.DAY ? o.getDay() : ic(e, o)).toString(), a[c] = (a[c] || 0) + t.unique[r];
|
|
3759
3759
|
}), n.unique = a, n.distinct = I.keys(a).length, n;
|
|
3760
3760
|
}
|
|
3761
3761
|
function Fu(e, t) {
|
|
@@ -3771,10 +3771,10 @@ function er(e, t) {
|
|
|
3771
3771
|
return e[a] ? n + 1 : n;
|
|
3772
3772
|
}, 0);
|
|
3773
3773
|
}
|
|
3774
|
-
var
|
|
3774
|
+
var L;
|
|
3775
3775
|
(function(e) {
|
|
3776
3776
|
e[e.STRING = "string"] = "STRING", e[e.NUMBER = "number"] = "NUMBER", e[e.INTEGER = "integer"] = "INTEGER", e[e.BOOLEAN = "boolean"] = "BOOLEAN", e[e.DATETIME = "datetime"] = "DATETIME";
|
|
3777
|
-
})(
|
|
3777
|
+
})(L || (L = {}));
|
|
3778
3778
|
class xi {
|
|
3779
3779
|
constructor(t) {
|
|
3780
3780
|
this.constraint = t;
|
|
@@ -3833,7 +3833,7 @@ const wi = [
|
|
|
3833
3833
|
allowWildcardForProperties: false,
|
|
3834
3834
|
strict: true,
|
|
3835
3835
|
satisfy: (e, t, n, a) => {
|
|
3836
|
-
if (e.bin && e.type ===
|
|
3836
|
+
if (e.bin && e.type === M) {
|
|
3837
3837
|
let r = {
|
|
3838
3838
|
channel: e.channel,
|
|
3839
3839
|
field: e.field,
|
|
@@ -3850,7 +3850,7 @@ const wi = [
|
|
|
3850
3850
|
properties: [m.TYPE, m.BIN],
|
|
3851
3851
|
allowWildcardForProperties: false,
|
|
3852
3852
|
strict: true,
|
|
3853
|
-
satisfy: (e, t, n, a) => e.bin ? e.type ===
|
|
3853
|
+
satisfy: (e, t, n, a) => e.bin ? e.type === M : true
|
|
3854
3854
|
},
|
|
3855
3855
|
{
|
|
3856
3856
|
name: "channelFieldCompatible",
|
|
@@ -3893,7 +3893,7 @@ const wi = [
|
|
|
3893
3893
|
properties: [m.TYPE, m.TIMEUNIT],
|
|
3894
3894
|
allowWildcardForProperties: false,
|
|
3895
3895
|
strict: true,
|
|
3896
|
-
satisfy: (e, t, n, a) => !(e.timeUnit && e.type !==
|
|
3896
|
+
satisfy: (e, t, n, a) => !(e.timeUnit && e.type !== W)
|
|
3897
3897
|
},
|
|
3898
3898
|
{
|
|
3899
3899
|
name: "timeUnitShouldHaveVariation",
|
|
@@ -3901,7 +3901,7 @@ const wi = [
|
|
|
3901
3901
|
properties: [m.TIMEUNIT, m.TYPE],
|
|
3902
3902
|
allowWildcardForProperties: false,
|
|
3903
3903
|
strict: false,
|
|
3904
|
-
satisfy: (e, t, n, a) => e.timeUnit && e.type ===
|
|
3904
|
+
satisfy: (e, t, n, a) => e.timeUnit && e.type === W ? !n.has("timeUnit") && !a.constraintManuallySpecifiedValue ? true : t.timeUnitHasVariation(e) : true
|
|
3905
3905
|
},
|
|
3906
3906
|
{
|
|
3907
3907
|
name: "scalePropertiesSupportedByScaleType",
|
|
@@ -3964,14 +3964,14 @@ const wi = [
|
|
|
3964
3964
|
if (!n.has("field") && !n.has("type") && !a.constraintManuallySpecifiedValue)
|
|
3965
3965
|
return true;
|
|
3966
3966
|
switch (r) {
|
|
3967
|
-
case
|
|
3968
|
-
case
|
|
3969
|
-
return o !==
|
|
3970
|
-
case
|
|
3971
|
-
case
|
|
3972
|
-
return o !==
|
|
3973
|
-
case
|
|
3974
|
-
return o ===
|
|
3967
|
+
case L.BOOLEAN:
|
|
3968
|
+
case L.STRING:
|
|
3969
|
+
return o !== M && o !== W;
|
|
3970
|
+
case L.NUMBER:
|
|
3971
|
+
case L.INTEGER:
|
|
3972
|
+
return o !== W;
|
|
3973
|
+
case L.DATETIME:
|
|
3974
|
+
return o === W;
|
|
3975
3975
|
case null:
|
|
3976
3976
|
return false;
|
|
3977
3977
|
}
|
|
@@ -3984,7 +3984,7 @@ const wi = [
|
|
|
3984
3984
|
properties: [m.FIELD, m.TYPE],
|
|
3985
3985
|
allowWildcardForProperties: false,
|
|
3986
3986
|
strict: false,
|
|
3987
|
-
satisfy: (e, t, n, a) => !n.has("field") && !n.has("type") && !a.constraintManuallySpecifiedValue ? true : e.field === "*" ? e.type ===
|
|
3987
|
+
satisfy: (e, t, n, a) => !n.has("field") && !n.has("type") && !a.constraintManuallySpecifiedValue ? true : e.field === "*" ? e.type === M : t.vlType(e.field) === e.type
|
|
3988
3988
|
},
|
|
3989
3989
|
{
|
|
3990
3990
|
name: "maxCardinalityForCategoricalColor",
|
|
@@ -4027,9 +4027,9 @@ const wi = [
|
|
|
4027
4027
|
const r = e.type, o = xe(e);
|
|
4028
4028
|
if (Yn(r))
|
|
4029
4029
|
return o === void 0 || be(o);
|
|
4030
|
-
if (r ===
|
|
4030
|
+
if (r === W)
|
|
4031
4031
|
return e.timeUnit ? ee([k.TIME, k.UTC, void 0], o) || be(o) : ee([k.TIME, k.UTC, void 0], o);
|
|
4032
|
-
if (r ===
|
|
4032
|
+
if (r === M)
|
|
4033
4033
|
return e.bin ? ee([k.LINEAR, void 0], o) : ee([
|
|
4034
4034
|
k.LOG,
|
|
4035
4035
|
k.POW,
|
|
@@ -4138,7 +4138,7 @@ const Di = [
|
|
|
4138
4138
|
const a = e.getMark(), r = e.getEncodings();
|
|
4139
4139
|
if (a === ge) {
|
|
4140
4140
|
for (let o of r)
|
|
4141
|
-
if (x(o) && (o.channel === R || o.channel === F) && o.type ===
|
|
4141
|
+
if (x(o) && (o.channel === R || o.channel === F) && o.type === M && o.scale && o.scale.zero === false)
|
|
4142
4142
|
return false;
|
|
4143
4143
|
}
|
|
4144
4144
|
return true;
|
|
@@ -4153,12 +4153,12 @@ const Di = [
|
|
|
4153
4153
|
satisfy: (e, t, n) => {
|
|
4154
4154
|
if (he(e.getEncodings(), (r) => Pt(r)))
|
|
4155
4155
|
return ue(e.getEncodings(), (r) => {
|
|
4156
|
-
if (ne(r) ||
|
|
4156
|
+
if (ne(r) || G(r))
|
|
4157
4157
|
return true;
|
|
4158
4158
|
switch (r.type) {
|
|
4159
|
-
case
|
|
4159
|
+
case M:
|
|
4160
4160
|
return !!r.bin;
|
|
4161
|
-
case
|
|
4161
|
+
case W:
|
|
4162
4162
|
return !!r.timeUnit;
|
|
4163
4163
|
case se:
|
|
4164
4164
|
case ce.KEY:
|
|
@@ -4171,9 +4171,9 @@ const Di = [
|
|
|
4171
4171
|
const r = e.wildcardIndex.encodingIndicesByProperty.get("autoCount") || [];
|
|
4172
4172
|
if (ue(r, (c) => {
|
|
4173
4173
|
let f = e.getEncodingQueryByIndex(c);
|
|
4174
|
-
return
|
|
4174
|
+
return G(f) && !O(f.autoCount);
|
|
4175
4175
|
}))
|
|
4176
|
-
return he(e.getEncodings(), (c) => (x(c) ||
|
|
4176
|
+
return he(e.getEncodings(), (c) => (x(c) || G(c)) && c.type === M ? re(c) ? false : x(c) && (!c.bin || O(c.bin)) : x(c) && c.type === W ? !c.timeUnit || O(c.timeUnit) : false);
|
|
4177
4177
|
}
|
|
4178
4178
|
return true;
|
|
4179
4179
|
}
|
|
@@ -4359,7 +4359,7 @@ const Di = [
|
|
|
4359
4359
|
const a = e.specQuery.encodings;
|
|
4360
4360
|
for (let r = 0; r < a.length; r++) {
|
|
4361
4361
|
const o = a[r];
|
|
4362
|
-
if (!(ne(o) || re(o)) && (x(o) && o.type ===
|
|
4362
|
+
if (!(ne(o) || re(o)) && (x(o) && o.type === W && !o.timeUnit && (e.wildcardIndex.hasEncodingProperty(r, m.TIMEUNIT) || n.constraintManuallySpecifiedValue) || o.type === M && x(o) && !o.bin && !o.aggregate && (e.wildcardIndex.hasEncodingProperty(r, m.BIN) || e.wildcardIndex.hasEncodingProperty(r, m.AGGREGATE) || e.wildcardIndex.hasEncodingProperty(r, m.AUTOCOUNT) || n.constraintManuallySpecifiedValue)))
|
|
4363
4363
|
return false;
|
|
4364
4364
|
}
|
|
4365
4365
|
}
|
|
@@ -4385,10 +4385,10 @@ const Di = [
|
|
|
4385
4385
|
const o = e.specQuery.encodings;
|
|
4386
4386
|
for (let c = 0; c < o.length; c++) {
|
|
4387
4387
|
const f = o[c];
|
|
4388
|
-
if (ne(f) ||
|
|
4388
|
+
if (ne(f) || G(f))
|
|
4389
4389
|
continue;
|
|
4390
4390
|
let i;
|
|
4391
|
-
if (f.field && !O(f.field) && (i = f.field),
|
|
4391
|
+
if (f.field && !O(f.field) && (i = f.field), G(f) && !O(f.autoCount) && (i = "count_*"), i) {
|
|
4392
4392
|
if (e.wildcardIndex.hasEncodingProperty(c, m.FIELD) && (r[i] = true), a[i] && (r[i] || n.constraintManuallySpecifiedValue))
|
|
4393
4393
|
return false;
|
|
4394
4394
|
a[i] = true;
|
|
@@ -4705,7 +4705,7 @@ class Ku {
|
|
|
4705
4705
|
}
|
|
4706
4706
|
class yt {
|
|
4707
4707
|
constructor(t, n, a, r, o) {
|
|
4708
|
-
this._rankingScore = {}, this._spec = t, this._channelFieldCount = t.encodings.reduce((c, f) => (!O(f.channel) && (!
|
|
4708
|
+
this._rankingScore = {}, this._spec = t, this._channelFieldCount = t.encodings.reduce((c, f) => (!O(f.channel) && (!G(f) || f.autoCount !== false) && (c[f.channel + ""] = 1), c), {}), this._wildcardIndex = n, this._assignedWildcardIndex = o, this._opt = r, this._schema = a;
|
|
4709
4709
|
}
|
|
4710
4710
|
/**
|
|
4711
4711
|
* Build a WildcardIndex by detecting wildcards
|
|
@@ -4721,7 +4721,7 @@ class yt {
|
|
|
4721
4721
|
t.mark = zt(t.mark, o, a.enum.mark), r.setMark(t.mark);
|
|
4722
4722
|
}
|
|
4723
4723
|
if (t.encodings.forEach((o, c) => {
|
|
4724
|
-
|
|
4724
|
+
G(o) && (console.warn("A field with autoCount should not be included as autoCount meant to be an internal object."), o.type = M), x(o) && o.type === void 0 && (o.type = U), bn.forEach((f) => {
|
|
4725
4725
|
if (O(o[f])) {
|
|
4726
4726
|
const i = He(f) + c, s = Vt(f, n, a), d = o[f] = zt(o[f], i, s);
|
|
4727
4727
|
r.setEncodingProperty(c, f, d);
|
|
@@ -4746,7 +4746,7 @@ class yt {
|
|
|
4746
4746
|
}, f = {
|
|
4747
4747
|
channel: o,
|
|
4748
4748
|
autoCount: c,
|
|
4749
|
-
type:
|
|
4749
|
+
type: M
|
|
4750
4750
|
};
|
|
4751
4751
|
t.encodings.push(f);
|
|
4752
4752
|
const i = t.encodings.length - 1;
|
|
@@ -4898,7 +4898,7 @@ class Be {
|
|
|
4898
4898
|
}
|
|
4899
4899
|
var J;
|
|
4900
4900
|
(function(e) {
|
|
4901
|
-
e[e.Q =
|
|
4901
|
+
e[e.Q = M] = "Q", e[e.BIN_Q = "bin_" + M] = "BIN_Q", e[e.T = W] = "T", e[e.TIMEUNIT_T = "timeUnit_time"] = "TIMEUNIT_T", e[e.TIMEUNIT_O = "timeUnit_" + se] = "TIMEUNIT_O", e[e.O = se] = "O", e[e.N = ae] = "N", e[e.K = ce.KEY] = "K", e[e.NONE = "-"] = "NONE";
|
|
4902
4902
|
})(J || (J = {}));
|
|
4903
4903
|
const Mi = J.Q, Et = J.BIN_Q, Un = J.T, Fe = J.TIMEUNIT_T, St = J.TIMEUNIT_O, Nt = J.O, _t = J.N, fn = J.K, Ct = J.NONE;
|
|
4904
4904
|
function Tt(e) {
|
|
@@ -4951,7 +4951,7 @@ class Ju extends Be {
|
|
|
4951
4951
|
}
|
|
4952
4952
|
getScore(t, n, a) {
|
|
4953
4953
|
return t.getEncodings().reduce((r, o) => {
|
|
4954
|
-
if (x(o) ||
|
|
4954
|
+
if (x(o) || G(o)) {
|
|
4955
4955
|
const c = Tt(o), f = this.featurize(c, o.channel), i = this.getFeatureScore(f);
|
|
4956
4956
|
i && r.push(i);
|
|
4957
4957
|
}
|
|
@@ -4975,7 +4975,7 @@ class Zu extends Be {
|
|
|
4975
4975
|
}
|
|
4976
4976
|
getScore(t, n, a) {
|
|
4977
4977
|
return t.isAggregate() && t.getEncodings().reduce((r, o) => {
|
|
4978
|
-
if (
|
|
4978
|
+
if (G(o) || x(o) && !o.aggregate) {
|
|
4979
4979
|
const c = this.getFeatureScore(o.channel + "");
|
|
4980
4980
|
if (c && c.score > r.score)
|
|
4981
4981
|
return c;
|
|
@@ -4995,7 +4995,7 @@ class Qu extends Be {
|
|
|
4995
4995
|
}
|
|
4996
4996
|
getScore(t, n, a) {
|
|
4997
4997
|
return t.getEncodings().reduce((r, o) => {
|
|
4998
|
-
if (x(o) ||
|
|
4998
|
+
if (x(o) || G(o)) {
|
|
4999
4999
|
const c = this.getFeatureScore(o.channel);
|
|
5000
5000
|
c && r.push(c);
|
|
5001
5001
|
}
|
|
@@ -5016,7 +5016,7 @@ class el extends Be {
|
|
|
5016
5016
|
getScore(t, n, a) {
|
|
5017
5017
|
const r = t.getMark();
|
|
5018
5018
|
return t.getEncodings().reduce((o, c) => {
|
|
5019
|
-
if (x(c) ||
|
|
5019
|
+
if (x(c) || G(c)) {
|
|
5020
5020
|
const f = r + "_" + c.channel, i = this.getFeatureScore(f);
|
|
5021
5021
|
i && o.push(i);
|
|
5022
5022
|
}
|
|
@@ -5082,15 +5082,15 @@ class tl extends Be {
|
|
|
5082
5082
|
}
|
|
5083
5083
|
getScore(t, n, a) {
|
|
5084
5084
|
const r = t.getEncodings().reduce((c, f) => {
|
|
5085
|
-
if (x(f) ||
|
|
5085
|
+
if (x(f) || G(f)) {
|
|
5086
5086
|
const i = Jr(f);
|
|
5087
5087
|
(c[i] = c[i] || []).push(f);
|
|
5088
5088
|
}
|
|
5089
5089
|
return c;
|
|
5090
5090
|
}, {}), o = [];
|
|
5091
|
-
return
|
|
5091
|
+
return z(r, (c) => {
|
|
5092
5092
|
const f = c.reduce((i, s) => {
|
|
5093
|
-
if (x(s) ||
|
|
5093
|
+
if (x(s) || G(s)) {
|
|
5094
5094
|
const d = Tt(s), u = this.featurize(d, s.channel), l = this.getFeatureScore(u);
|
|
5095
5095
|
if (i === null || l.score > i.score)
|
|
5096
5096
|
return l;
|
|
@@ -5115,7 +5115,7 @@ class nl extends Be {
|
|
|
5115
5115
|
return u ? [u] : (console.error("feature score missing for", d), []);
|
|
5116
5116
|
}
|
|
5117
5117
|
}
|
|
5118
|
-
function
|
|
5118
|
+
function $(e, t, n, a) {
|
|
5119
5119
|
return e + "_" + t + "_" + n + "_" + a;
|
|
5120
5120
|
}
|
|
5121
5121
|
function rl() {
|
|
@@ -5123,7 +5123,7 @@ function rl() {
|
|
|
5123
5123
|
let a = {};
|
|
5124
5124
|
e.forEach((r) => {
|
|
5125
5125
|
e.forEach((o) => {
|
|
5126
|
-
|
|
5126
|
+
z({
|
|
5127
5127
|
point: 0,
|
|
5128
5128
|
text: -0.2,
|
|
5129
5129
|
tick: -0.5,
|
|
@@ -5133,9 +5133,9 @@ function rl() {
|
|
|
5133
5133
|
area: -2,
|
|
5134
5134
|
rule: -2.5
|
|
5135
5135
|
}, (i, s) => {
|
|
5136
|
-
const d =
|
|
5136
|
+
const d = $(r, o, true, s);
|
|
5137
5137
|
a[d] = i;
|
|
5138
|
-
}),
|
|
5138
|
+
}), z({
|
|
5139
5139
|
point: 0,
|
|
5140
5140
|
text: -0.2,
|
|
5141
5141
|
tick: -0.5,
|
|
@@ -5144,13 +5144,13 @@ function rl() {
|
|
|
5144
5144
|
area: -2,
|
|
5145
5145
|
rule: -2.5
|
|
5146
5146
|
}, (i, s) => {
|
|
5147
|
-
const d =
|
|
5147
|
+
const d = $(r, o, false, s);
|
|
5148
5148
|
a[d] = i;
|
|
5149
5149
|
});
|
|
5150
5150
|
});
|
|
5151
5151
|
}), e.forEach((r) => {
|
|
5152
5152
|
n.forEach((o) => {
|
|
5153
|
-
|
|
5153
|
+
z({
|
|
5154
5154
|
tick: 0,
|
|
5155
5155
|
point: -0.2,
|
|
5156
5156
|
text: -0.5,
|
|
@@ -5159,13 +5159,13 @@ function rl() {
|
|
|
5159
5159
|
area: -2,
|
|
5160
5160
|
rule: -2.5
|
|
5161
5161
|
}, (f, i) => {
|
|
5162
|
-
const s =
|
|
5162
|
+
const s = $(r, o, true, i);
|
|
5163
5163
|
a[s] = f;
|
|
5164
|
-
const d =
|
|
5164
|
+
const d = $(o, r, true, i);
|
|
5165
5165
|
a[d] = f;
|
|
5166
5166
|
});
|
|
5167
5167
|
}), [Fe].forEach((o) => {
|
|
5168
|
-
|
|
5168
|
+
z({
|
|
5169
5169
|
// For Time Dimension with time scale, tick is not good
|
|
5170
5170
|
point: 0,
|
|
5171
5171
|
text: -0.5,
|
|
@@ -5175,13 +5175,13 @@ function rl() {
|
|
|
5175
5175
|
area: -2,
|
|
5176
5176
|
rule: -2.5
|
|
5177
5177
|
}, (f, i) => {
|
|
5178
|
-
const s =
|
|
5178
|
+
const s = $(r, o, true, i);
|
|
5179
5179
|
a[s] = f;
|
|
5180
|
-
const d =
|
|
5180
|
+
const d = $(o, r, true, i);
|
|
5181
5181
|
a[d] = f;
|
|
5182
5182
|
});
|
|
5183
5183
|
}), [Ct, _t, Nt, fn].forEach((o) => {
|
|
5184
|
-
|
|
5184
|
+
z({
|
|
5185
5185
|
bar: 0,
|
|
5186
5186
|
point: -0.2,
|
|
5187
5187
|
tick: -0.25,
|
|
@@ -5192,13 +5192,13 @@ function rl() {
|
|
|
5192
5192
|
// Non-sense to use rule here
|
|
5193
5193
|
rule: -2.5
|
|
5194
5194
|
}, (f, i) => {
|
|
5195
|
-
const s =
|
|
5195
|
+
const s = $(r, o, false, i);
|
|
5196
5196
|
a[s] = f;
|
|
5197
|
-
const d =
|
|
5197
|
+
const d = $(o, r, false, i);
|
|
5198
5198
|
a[d] = f;
|
|
5199
5199
|
});
|
|
5200
5200
|
}), [Et].forEach((o) => {
|
|
5201
|
-
|
|
5201
|
+
z({
|
|
5202
5202
|
bar: 0,
|
|
5203
5203
|
point: -0.2,
|
|
5204
5204
|
tick: -0.25,
|
|
@@ -5209,13 +5209,13 @@ function rl() {
|
|
|
5209
5209
|
// Non-sense to use rule here
|
|
5210
5210
|
rule: -2.5
|
|
5211
5211
|
}, (f, i) => {
|
|
5212
|
-
const s =
|
|
5212
|
+
const s = $(r, o, false, i);
|
|
5213
5213
|
a[s] = f;
|
|
5214
|
-
const d =
|
|
5214
|
+
const d = $(o, r, false, i);
|
|
5215
5215
|
a[d] = f;
|
|
5216
5216
|
});
|
|
5217
5217
|
}), [Fe, St].forEach((o) => {
|
|
5218
|
-
|
|
5218
|
+
z({
|
|
5219
5219
|
line: 0,
|
|
5220
5220
|
area: -0.1,
|
|
5221
5221
|
bar: -0.2,
|
|
@@ -5225,9 +5225,9 @@ function rl() {
|
|
|
5225
5225
|
// Non-sense to use rule here
|
|
5226
5226
|
rule: -2.5
|
|
5227
5227
|
}, (f, i) => {
|
|
5228
|
-
const s =
|
|
5228
|
+
const s = $(r, o, false, i);
|
|
5229
5229
|
a[s] = f;
|
|
5230
|
-
const d =
|
|
5230
|
+
const d = $(o, r, false, i);
|
|
5231
5231
|
a[d] = f;
|
|
5232
5232
|
});
|
|
5233
5233
|
});
|
|
@@ -5243,11 +5243,11 @@ function rl() {
|
|
|
5243
5243
|
area: -2,
|
|
5244
5244
|
rule: -2.5
|
|
5245
5245
|
};
|
|
5246
|
-
|
|
5247
|
-
const s =
|
|
5246
|
+
z(c, (f, i) => {
|
|
5247
|
+
const s = $(r, o, true, i);
|
|
5248
5248
|
a[s] = f;
|
|
5249
|
-
}),
|
|
5250
|
-
const s =
|
|
5249
|
+
}), z(c, (f, i) => {
|
|
5250
|
+
const s = $(r, o, false, i);
|
|
5251
5251
|
a[s] = f;
|
|
5252
5252
|
});
|
|
5253
5253
|
}), n.forEach((o) => {
|
|
@@ -5261,17 +5261,17 @@ function rl() {
|
|
|
5261
5261
|
area: -2,
|
|
5262
5262
|
rule: -2.5
|
|
5263
5263
|
};
|
|
5264
|
-
|
|
5265
|
-
const s =
|
|
5264
|
+
z(c, (f, i) => {
|
|
5265
|
+
const s = $(r, o, true, i);
|
|
5266
5266
|
a[s] = f;
|
|
5267
|
-
}),
|
|
5268
|
-
const s =
|
|
5267
|
+
}), z(c, (f, i) => {
|
|
5268
|
+
const s = $(o, r, true, i);
|
|
5269
5269
|
a[s] = f;
|
|
5270
|
-
}),
|
|
5271
|
-
const s =
|
|
5270
|
+
}), z(c, (f, i) => {
|
|
5271
|
+
const s = $(r, o, false, i);
|
|
5272
5272
|
a[s] = f;
|
|
5273
|
-
}),
|
|
5274
|
-
const s =
|
|
5273
|
+
}), z(c, (f, i) => {
|
|
5274
|
+
const s = $(o, r, false, i);
|
|
5275
5275
|
a[s] = f;
|
|
5276
5276
|
});
|
|
5277
5277
|
});
|
|
@@ -5288,11 +5288,11 @@ function rl() {
|
|
|
5288
5288
|
area: -2,
|
|
5289
5289
|
rule: -2.5
|
|
5290
5290
|
};
|
|
5291
|
-
|
|
5292
|
-
const s =
|
|
5291
|
+
z(c, (f, i) => {
|
|
5292
|
+
const s = $(r, o, true, i);
|
|
5293
5293
|
a[s] = f;
|
|
5294
|
-
}),
|
|
5295
|
-
const s =
|
|
5294
|
+
}), z(c, (f, i) => {
|
|
5295
|
+
const s = $(r, o, false, i);
|
|
5296
5296
|
a[s] = f;
|
|
5297
5297
|
});
|
|
5298
5298
|
}
|
|
@@ -5327,7 +5327,7 @@ function ol(e, t, n) {
|
|
|
5327
5327
|
function sl(e, t, n) {
|
|
5328
5328
|
const a = e.getEncodings();
|
|
5329
5329
|
if (e.isAggregate()) {
|
|
5330
|
-
if (he(a, (o) => x(o) && (o.type ===
|
|
5330
|
+
if (he(a, (o) => x(o) && (o.type === M && !o.bin && !o.aggregate || o.type === W && !o.timeUnit)))
|
|
5331
5331
|
return {
|
|
5332
5332
|
type: ye,
|
|
5333
5333
|
score: 0.1,
|
|
@@ -5491,13 +5491,13 @@ function Bi(e, t, n) {
|
|
|
5491
5491
|
};
|
|
5492
5492
|
}
|
|
5493
5493
|
const Re = {
|
|
5494
|
-
[
|
|
5495
|
-
[
|
|
5496
|
-
[
|
|
5497
|
-
[
|
|
5498
|
-
[
|
|
5494
|
+
[L.BOOLEAN]: /* @__PURE__ */ S.jsx(Qi, { className: "h-5 w-5 inline-flex opacity-60" }),
|
|
5495
|
+
[L.DATETIME]: /* @__PURE__ */ S.jsx(Zi, { className: "h-5 w-5 inline-flex opacity-60" }),
|
|
5496
|
+
[L.NUMBER]: /* @__PURE__ */ S.jsx(Ji, { className: "h-5 w-5 inline-flex opacity-60" }),
|
|
5497
|
+
[L.STRING]: /* @__PURE__ */ S.jsx(Xi, { className: "h-5 w-5 inline-flex opacity-60" }),
|
|
5498
|
+
[L.INTEGER]: /* @__PURE__ */ S.jsx(ba, { className: "h-5 w-5 inline-flex opacity-60" })
|
|
5499
5499
|
}, ar = 12, Sl = (e) => {
|
|
5500
|
-
const t = Ce.c(
|
|
5500
|
+
const t = Ce.c(24), {
|
|
5501
5501
|
schema: n
|
|
5502
5502
|
} = e, [a, r] = Ln.useState(), [o, c] = Ln.useState();
|
|
5503
5503
|
let f;
|
|
@@ -5508,15 +5508,10 @@ const Re = {
|
|
|
5508
5508
|
}) : void 0;
|
|
5509
5509
|
let d;
|
|
5510
5510
|
t[4] === Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ S.jsx(Aa, { className: "text-muted-foreground", width: 40, height: 40, strokeWidth: 1.5 }), t[4] = d) : d = t[4];
|
|
5511
|
-
const u = d, l = o ? i : i.slice(0, ar), g = i.length > ar
|
|
5512
|
-
let
|
|
5513
|
-
t[5] !==
|
|
5514
|
-
|
|
5515
|
-
" fields"
|
|
5516
|
-
] }), t[5] = h, t[6] = p) : p = t[6];
|
|
5517
|
-
let y;
|
|
5518
|
-
t[7] !== n || t[8] !== a ? (y = (w) => {
|
|
5519
|
-
const L = n.cardinality({
|
|
5511
|
+
const u = d, l = o ? i : i.slice(0, ar), g = i.length > ar;
|
|
5512
|
+
let h;
|
|
5513
|
+
t[5] !== n || t[6] !== a ? (h = (w) => {
|
|
5514
|
+
const D = n.cardinality({
|
|
5520
5515
|
channel: "x",
|
|
5521
5516
|
field: w
|
|
5522
5517
|
});
|
|
@@ -5529,30 +5524,30 @@ const Re = {
|
|
|
5529
5524
|
}, children: [
|
|
5530
5525
|
Re[n.primitiveType(w)],
|
|
5531
5526
|
w,
|
|
5532
|
-
|
|
5527
|
+
D > 1 && /* @__PURE__ */ S.jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
5533
5528
|
"(",
|
|
5534
|
-
|
|
5529
|
+
D,
|
|
5535
5530
|
")"
|
|
5536
5531
|
] })
|
|
5537
5532
|
] }, w);
|
|
5538
|
-
}, t[
|
|
5539
|
-
const
|
|
5540
|
-
let
|
|
5541
|
-
t[
|
|
5542
|
-
let
|
|
5543
|
-
t[
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
] }), t[
|
|
5547
|
-
const
|
|
5548
|
-
let
|
|
5549
|
-
t[
|
|
5533
|
+
}, t[5] = n, t[6] = a, t[7] = h) : h = t[7];
|
|
5534
|
+
const p = l.map(h);
|
|
5535
|
+
let y;
|
|
5536
|
+
t[8] !== g || t[9] !== o ? (y = g && /* @__PURE__ */ S.jsx(ur, { "data-testid": "marimo-plugin-data-explorer-show-more-columns", variant: "link", size: "sm", className: "self-center col-span-3 -mt-1", onClick: () => c(Cl), children: o ? "Show less" : "Show more" }), t[8] = g, t[9] = o, t[10] = y) : y = t[10];
|
|
5537
|
+
let E;
|
|
5538
|
+
t[11] !== p || t[12] !== y ? (E = /* @__PURE__ */ S.jsxs("div", { className: "hidden lg:grid grid-cols-2 xl:grid-cols-3 gap-2 p-2 bg-(--slate-1) border rounded lg:items-center items-start w-fit grid-flow-dense max-h-[300px] overflow-auto", children: [
|
|
5539
|
+
p,
|
|
5540
|
+
y
|
|
5541
|
+
] }), t[11] = p, t[12] = y, t[13] = E) : E = t[13];
|
|
5542
|
+
const _ = a || "", T = i.length === 0;
|
|
5543
|
+
let A;
|
|
5544
|
+
t[14] === Symbol.for("react.memo_cache_sentinel") ? (A = (w) => {
|
|
5550
5545
|
r(w);
|
|
5551
|
-
}, t[
|
|
5552
|
-
let
|
|
5553
|
-
t[
|
|
5554
|
-
let
|
|
5555
|
-
t[
|
|
5546
|
+
}, t[14] = A) : A = t[14];
|
|
5547
|
+
let N;
|
|
5548
|
+
t[15] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ S.jsx(Ot, { className: "min-w-[210px] h-full", children: /* @__PURE__ */ S.jsx(lr, { placeholder: "Select a column" }) }), t[15] = N) : N = t[15];
|
|
5549
|
+
let b;
|
|
5550
|
+
t[16] !== n ? (b = n.fieldNames().map((w) => /* @__PURE__ */ S.jsx(Ae, { value: w.toString(), children: /* @__PURE__ */ S.jsxs("span", { className: "flex items-center gap-2 flex-1", children: [
|
|
5556
5551
|
Re[n.primitiveType(w)],
|
|
5557
5552
|
/* @__PURE__ */ S.jsx("span", { className: "flex-1", children: w }),
|
|
5558
5553
|
/* @__PURE__ */ S.jsxs("span", { className: "text-muted-foreground text-xs font-semibold", children: [
|
|
@@ -5560,18 +5555,21 @@ const Re = {
|
|
|
5560
5555
|
n.vlType(w),
|
|
5561
5556
|
")"
|
|
5562
5557
|
] })
|
|
5563
|
-
] }) }, w)), t[
|
|
5564
|
-
let
|
|
5565
|
-
t[
|
|
5566
|
-
let
|
|
5567
|
-
t[
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
] }) }), t[
|
|
5558
|
+
] }) }, w)), t[16] = n, t[17] = b) : b = t[17];
|
|
5559
|
+
let C;
|
|
5560
|
+
t[18] !== b ? (C = /* @__PURE__ */ S.jsx(bt, { children: /* @__PURE__ */ S.jsx(Ke, { children: b }) }), t[18] = b, t[19] = C) : C = t[19];
|
|
5561
|
+
let P;
|
|
5562
|
+
t[20] !== C || t[21] !== _ || t[22] !== T ? (P = /* @__PURE__ */ S.jsx("div", { className: "lg:hidden", children: /* @__PURE__ */ S.jsxs(xt, { "data-testid": "marimo-plugin-data-explorer-column-select", value: _, disabled: T, onValueChange: A, children: [
|
|
5563
|
+
N,
|
|
5564
|
+
C
|
|
5565
|
+
] }) }), t[20] = C, t[21] = _, t[22] = T, t[23] = P) : P = t[23], f = /* @__PURE__ */ S.jsxs("div", { className: "flex flex-col justify-center items-center h-full flex-1 gap-2", children: [
|
|
5571
5566
|
u,
|
|
5572
|
-
|
|
5573
|
-
|
|
5574
|
-
|
|
5567
|
+
/* @__PURE__ */ S.jsxs("span", { className: "text-muted-foreground font-semibold", children: [
|
|
5568
|
+
i.length > 0 ? i.length : "No",
|
|
5569
|
+
" fields"
|
|
5570
|
+
] }),
|
|
5571
|
+
E,
|
|
5572
|
+
P,
|
|
5575
5573
|
a && /* @__PURE__ */ S.jsx("div", { className: "grid grid-cols-1 lg:grid-cols-2 xl:grid-cols-3 gap-2 p-2 text-sm", children: Nl.map((w) => /* @__PURE__ */ S.jsxs("div", { className: "flex flex-row gap-2 min-w-[100px]", children: [
|
|
5576
5574
|
/* @__PURE__ */ S.jsx("span", { className: "font-semibold", children: w }),
|
|
5577
5575
|
/* @__PURE__ */ S.jsx("span", { children: _l(s == null ? void 0 : s[w]) })
|
|
@@ -5779,7 +5777,7 @@ function Hi(e) {
|
|
|
5779
5777
|
function Wi(e) {
|
|
5780
5778
|
let t = false, n = false, a = false;
|
|
5781
5779
|
for (const r of e.encodings)
|
|
5782
|
-
ne(r) || (
|
|
5780
|
+
ne(r) || (G(r) ? O(r.autoCount) && (n = true) : (O(r.field) && (t = true), (O(r.aggregate) || O(r.bin) || O(r.timeUnit)) && (n = true), O(r.channel) && (a = true)));
|
|
5783
5781
|
return {
|
|
5784
5782
|
hasAnyWildcard: a || t || n,
|
|
5785
5783
|
hasWildcardField: t,
|
|
@@ -5940,8 +5938,8 @@ const Wl = ia((e) => {
|
|
|
5940
5938
|
let f;
|
|
5941
5939
|
t[0] !== o || t[1] !== c || t[2] !== n || t[3] !== r.encoding ? (f = (N) => {
|
|
5942
5940
|
const C = (N === "row" || N === "column") && !c;
|
|
5943
|
-
return /* @__PURE__ */ S.jsx(Vl, { schema: n, label: N, disabled: C, fieldDefinition: r.encoding[N], onChange: (
|
|
5944
|
-
[N]:
|
|
5941
|
+
return /* @__PURE__ */ S.jsx(Vl, { schema: n, label: N, disabled: C, fieldDefinition: r.encoding[N], onChange: (P) => o.setEncoding({
|
|
5942
|
+
[N]: P
|
|
5945
5943
|
}) }, N);
|
|
5946
5944
|
}, t[0] = o, t[1] = c, t[2] = n, t[3] = r.encoding, t[4] = f) : f = t[4];
|
|
5947
5945
|
const i = f;
|
|
@@ -5996,13 +5994,13 @@ const Wl = ia((e) => {
|
|
|
5996
5994
|
return "--";
|
|
5997
5995
|
if (r.field === "*")
|
|
5998
5996
|
return /* @__PURE__ */ S.jsxs("span", { className: "flex gap-2 flex-1", children: [
|
|
5999
|
-
Re[
|
|
5997
|
+
Re[L.NUMBER],
|
|
6000
5998
|
/* @__PURE__ */ S.jsx("span", { className: "text-left flex-1", children: "Count" })
|
|
6001
5999
|
] });
|
|
6002
|
-
const
|
|
6000
|
+
const B = r.field.toString(), v = () => r.fn ? `${r.fn}(${r.field})` : B;
|
|
6003
6001
|
return /* @__PURE__ */ S.jsxs("span", { className: "flex gap-2 flex-1", children: [
|
|
6004
|
-
Re[a.primitiveType(
|
|
6005
|
-
/* @__PURE__ */ S.jsx("span", { className: "text-left flex-1", children:
|
|
6002
|
+
Re[a.primitiveType(B)],
|
|
6003
|
+
/* @__PURE__ */ S.jsx("span", { className: "text-left flex-1", children: v() })
|
|
6006
6004
|
] });
|
|
6007
6005
|
}, t[0] = r, t[1] = a, t[2] = f) : f = t[2];
|
|
6008
6006
|
const i = f;
|
|
@@ -6017,14 +6015,14 @@ const Wl = ia((e) => {
|
|
|
6017
6015
|
let g;
|
|
6018
6016
|
t[7] !== n ? (g = /* @__PURE__ */ S.jsx(aa, { className: "text-(--slate-11) font-semibold", children: n }), t[7] = n, t[8] = g) : g = t[8];
|
|
6019
6017
|
let h;
|
|
6020
|
-
t[9] !== c || t[10] !== a ? (h = (
|
|
6021
|
-
c(
|
|
6018
|
+
t[9] !== c || t[10] !== a ? (h = (B) => {
|
|
6019
|
+
c(B === "*" ? {
|
|
6022
6020
|
field: "*",
|
|
6023
6021
|
fn: "count",
|
|
6024
6022
|
type: "quantitative"
|
|
6025
6023
|
} : {
|
|
6026
|
-
field:
|
|
6027
|
-
type: a.vlType(
|
|
6024
|
+
field: B,
|
|
6025
|
+
type: a.vlType(B)
|
|
6028
6026
|
});
|
|
6029
6027
|
}, t[9] = c, t[10] = a, t[11] = h) : h = t[11];
|
|
6030
6028
|
const p = l ? d : void 0;
|
|
@@ -6033,22 +6031,22 @@ const Wl = ia((e) => {
|
|
|
6033
6031
|
let E;
|
|
6034
6032
|
t[14] !== p || t[15] !== y ? (E = /* @__PURE__ */ S.jsx(Ot, { className: "min-w-[140px] lg:min-w-[210px] h-full", onClear: p, children: y }), t[14] = p, t[15] = y, t[16] = E) : E = t[16];
|
|
6035
6033
|
let _;
|
|
6036
|
-
t[17] !== a ? (_ = a.fieldNames().map((
|
|
6037
|
-
Re[a.primitiveType(
|
|
6038
|
-
/* @__PURE__ */ S.jsx("span", { className: "flex-1", children:
|
|
6034
|
+
t[17] !== a ? (_ = a.fieldNames().map((B) => /* @__PURE__ */ S.jsx(Ae, { value: B.toString(), children: /* @__PURE__ */ S.jsxs("span", { className: "flex items-center gap-2 flex-1", children: [
|
|
6035
|
+
Re[a.primitiveType(B)],
|
|
6036
|
+
/* @__PURE__ */ S.jsx("span", { className: "flex-1", children: B }),
|
|
6039
6037
|
/* @__PURE__ */ S.jsxs("span", { className: "text-muted-foreground text-xs font-semibold", children: [
|
|
6040
6038
|
"(",
|
|
6041
|
-
a.vlType(
|
|
6039
|
+
a.vlType(B),
|
|
6042
6040
|
")"
|
|
6043
6041
|
] })
|
|
6044
|
-
] }) },
|
|
6042
|
+
] }) }, B)), t[17] = a, t[18] = _) : _ = t[18];
|
|
6045
6043
|
let T;
|
|
6046
6044
|
t[19] !== a ? (T = a.fieldNames().length === 0 && /* @__PURE__ */ S.jsx(Ae, { disabled: true, value: "--", children: "No columns" }), t[19] = a, t[20] = T) : T = t[20];
|
|
6047
6045
|
let A;
|
|
6048
6046
|
t[21] === Symbol.for("react.memo_cache_sentinel") ? (A = /* @__PURE__ */ S.jsx(fr, {}), t[21] = A) : A = t[21];
|
|
6049
6047
|
let N;
|
|
6050
6048
|
t[22] === Symbol.for("react.memo_cache_sentinel") ? (N = /* @__PURE__ */ S.jsx(Ae, { value: "*", children: /* @__PURE__ */ S.jsxs("span", { className: "flex items-center gap-1 flex-1", children: [
|
|
6051
|
-
Re[
|
|
6049
|
+
Re[L.NUMBER],
|
|
6052
6050
|
/* @__PURE__ */ S.jsx("span", { className: "flex-1", children: "Count" })
|
|
6053
6051
|
] }) }, "*"), t[22] = N) : N = t[22];
|
|
6054
6052
|
let b;
|
|
@@ -6063,63 +6061,60 @@ const Wl = ia((e) => {
|
|
|
6063
6061
|
E,
|
|
6064
6062
|
b
|
|
6065
6063
|
] }), t[26] = o, t[27] = l, t[28] = b, t[29] = h, t[30] = E, t[31] = C) : C = t[31];
|
|
6066
|
-
let
|
|
6067
|
-
t[32] !== r || t[33] !== c ? (
|
|
6068
|
-
let $;
|
|
6069
|
-
t[35] !== M ? ($ = /* @__PURE__ */ S.jsx("div", { className: "w-[26px]", children: M }), t[35] = M, t[36] = $) : $ = t[36];
|
|
6070
|
-
let v;
|
|
6071
|
-
t[37] !== C || t[38] !== $ ? (v = /* @__PURE__ */ S.jsxs("div", { className: "flex flex-row gap-1 h-[26px]", children: [
|
|
6072
|
-
C,
|
|
6073
|
-
$
|
|
6074
|
-
] }), t[37] = C, t[38] = $, t[39] = v) : v = t[39];
|
|
6064
|
+
let P;
|
|
6065
|
+
t[32] !== r || t[33] !== c ? (P = r && /* @__PURE__ */ S.jsx(Kl, { field: r, onChange: c }), t[32] = r, t[33] = c, t[34] = P) : P = t[34];
|
|
6075
6066
|
let w;
|
|
6076
|
-
|
|
6067
|
+
t[35] !== P ? (w = /* @__PURE__ */ S.jsx("div", { className: "w-[26px]", children: P }), t[35] = P, t[36] = w) : w = t[36];
|
|
6068
|
+
let D;
|
|
6069
|
+
t[37] !== C || t[38] !== w ? (D = /* @__PURE__ */ S.jsxs("div", { className: "flex flex-row gap-1 h-[26px]", children: [
|
|
6070
|
+
C,
|
|
6071
|
+
w
|
|
6072
|
+
] }), t[37] = C, t[38] = w, t[39] = D) : D = t[39];
|
|
6073
|
+
let q;
|
|
6074
|
+
return t[40] !== D || t[41] !== g ? (q = /* @__PURE__ */ S.jsxs(S.Fragment, { children: [
|
|
6077
6075
|
g,
|
|
6078
|
-
|
|
6079
|
-
] }), t[40] =
|
|
6076
|
+
D
|
|
6077
|
+
] }), t[40] = D, t[41] = g, t[42] = q) : q = t[42], q;
|
|
6080
6078
|
}, gn = "__", Kl = (e) => {
|
|
6081
|
-
const t = Ce.c(
|
|
6079
|
+
const t = Ce.c(10), {
|
|
6082
6080
|
field: n,
|
|
6083
6081
|
onChange: a
|
|
6084
6082
|
} = e;
|
|
6085
6083
|
if (n.field === "*")
|
|
6086
6084
|
return null;
|
|
6087
6085
|
let r;
|
|
6088
|
-
t[0]
|
|
6089
|
-
|
|
6090
|
-
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
] }), t[11] = n.fn, t[12] = c, t[13] = d, t[14] = u) : u = t[14], u;
|
|
6121
|
-
}
|
|
6122
|
-
return null;
|
|
6086
|
+
if (t[0] !== n || t[1] !== a) {
|
|
6087
|
+
r = Symbol.for("react.early_return_sentinel");
|
|
6088
|
+
e: {
|
|
6089
|
+
let o = [];
|
|
6090
|
+
if (n.type === ce.QUANTITATIVE && (o = [["", Ol]]), n.type === ce.TEMPORAL && (o = [["Single", $i], ["Multi", ji]]), o.length > 0) {
|
|
6091
|
+
const c = (l) => {
|
|
6092
|
+
a({
|
|
6093
|
+
...n,
|
|
6094
|
+
fn: l === gn ? void 0 : l
|
|
6095
|
+
});
|
|
6096
|
+
};
|
|
6097
|
+
let f;
|
|
6098
|
+
t[3] === Symbol.for("react.memo_cache_sentinel") ? (f = /* @__PURE__ */ S.jsx(Ot, { className: "h-full px-1", hideChevron: true, variant: "ghost", children: /* @__PURE__ */ S.jsx(sa, { size: 14, strokeWidth: 1.5 }) }), t[3] = f) : f = t[3];
|
|
6099
|
+
let i, s;
|
|
6100
|
+
t[4] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ S.jsx(Ke, { children: /* @__PURE__ */ S.jsx(Ae, { value: gn, children: "None" }) }), s = /* @__PURE__ */ S.jsx(fr, {}), t[4] = i, t[5] = s) : (i = t[4], s = t[5]);
|
|
6101
|
+
const d = /* @__PURE__ */ S.jsxs(bt, { children: [
|
|
6102
|
+
i,
|
|
6103
|
+
s,
|
|
6104
|
+
o.map(Zl)
|
|
6105
|
+
] });
|
|
6106
|
+
let u;
|
|
6107
|
+
t[6] !== n.fn || t[7] !== c || t[8] !== d ? (u = /* @__PURE__ */ S.jsxs(xt, { "data-testid": "marimo-plugin-data-explorer-field-options", value: n.fn, onValueChange: c, children: [
|
|
6108
|
+
f,
|
|
6109
|
+
d
|
|
6110
|
+
] }), t[6] = n.fn, t[7] = c, t[8] = d, t[9] = u) : u = t[9], r = u;
|
|
6111
|
+
break e;
|
|
6112
|
+
}
|
|
6113
|
+
}
|
|
6114
|
+
t[0] = n, t[1] = a, t[2] = r;
|
|
6115
|
+
} else
|
|
6116
|
+
r = t[2];
|
|
6117
|
+
return r !== Symbol.for("react.early_return_sentinel") ? r : null;
|
|
6123
6118
|
};
|
|
6124
6119
|
function Xl(e) {
|
|
6125
6120
|
return /* @__PURE__ */ S.jsx(Ae, { value: e, children: e === U ? "auto" : e }, e);
|
|
@@ -6136,22 +6131,22 @@ function Zl(e) {
|
|
|
6136
6131
|
}
|
|
6137
6132
|
const Md = (e) => {
|
|
6138
6133
|
const t = Ce.c(5);
|
|
6139
|
-
let n
|
|
6140
|
-
t[0] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
6141
|
-
const
|
|
6134
|
+
let n;
|
|
6135
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = ca(), t[0] = n) : n = t[0];
|
|
6136
|
+
const a = n;
|
|
6137
|
+
let r;
|
|
6138
|
+
t[1] !== e ? (r = () => {
|
|
6139
|
+
const c = a.sub(ke, () => {
|
|
6140
|
+
const i = a.get(ke), {
|
|
6141
|
+
schema: s,
|
|
6142
|
+
...d
|
|
6143
|
+
} = i;
|
|
6144
|
+
e.setValue(d);
|
|
6145
|
+
}), f = e.value;
|
|
6146
|
+
return f && Object.keys(f).length > 0 && a.set(ke, f), c;
|
|
6147
|
+
}, t[1] = e, t[2] = r) : r = t[2], ua(r);
|
|
6142
6148
|
let o;
|
|
6143
|
-
t[
|
|
6144
|
-
const f = r.sub(ke, () => {
|
|
6145
|
-
const s = r.get(ke), {
|
|
6146
|
-
schema: d,
|
|
6147
|
-
...u
|
|
6148
|
-
} = s;
|
|
6149
|
-
e.setValue(u);
|
|
6150
|
-
}), i = e.value;
|
|
6151
|
-
return i && Object.keys(i).length > 0 && r.set(ke, i), f;
|
|
6152
|
-
}, t[1] = e, t[2] = o) : o = t[2], ua(o);
|
|
6153
|
-
let c;
|
|
6154
|
-
return t[3] !== e ? (c = /* @__PURE__ */ S.jsx(la, { store: r, children: /* @__PURE__ */ S.jsx(td, { ...e }) }), t[3] = e, t[4] = c) : c = t[4], c;
|
|
6149
|
+
return t[3] !== e ? (o = /* @__PURE__ */ S.jsx(la, { store: a, children: /* @__PURE__ */ S.jsx(td, { ...e }) }), t[3] = e, t[4] = o) : o = t[4], o;
|
|
6155
6150
|
}, Ql = {
|
|
6156
6151
|
export: {
|
|
6157
6152
|
svg: true,
|
|
@@ -6174,14 +6169,14 @@ const Md = (e) => {
|
|
|
6174
6169
|
t[0] !== a || t[1] !== n ? (r = async () => {
|
|
6175
6170
|
if (!n)
|
|
6176
6171
|
return {};
|
|
6177
|
-
const
|
|
6172
|
+
const v = await ga(n, {
|
|
6178
6173
|
type: "csv",
|
|
6179
6174
|
parse: "auto"
|
|
6180
6175
|
}, {
|
|
6181
6176
|
replacePeriod: true
|
|
6182
|
-
}), Z = vu(
|
|
6177
|
+
}), Z = vu(v);
|
|
6183
6178
|
return a.setSchema(Z), {
|
|
6184
|
-
chartData:
|
|
6179
|
+
chartData: v,
|
|
6185
6180
|
schema: Z
|
|
6186
6181
|
};
|
|
6187
6182
|
}, t[0] = a, t[1] = n, t[2] = r) : r = t[2];
|
|
@@ -6197,20 +6192,20 @@ const Md = (e) => {
|
|
|
6197
6192
|
theme: u
|
|
6198
6193
|
} = fa();
|
|
6199
6194
|
if (i) {
|
|
6200
|
-
let
|
|
6201
|
-
return t[5] !== i ? (
|
|
6195
|
+
let v;
|
|
6196
|
+
return t[5] !== i ? (v = /* @__PURE__ */ S.jsx(ha, { error: i }), t[5] = i, t[6] = v) : v = t[6], v;
|
|
6202
6197
|
}
|
|
6203
6198
|
if (!c) {
|
|
6204
|
-
let
|
|
6205
|
-
return t[7] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
6199
|
+
let v;
|
|
6200
|
+
return t[7] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ S.jsx("div", {}), t[7] = v) : v = t[7], v;
|
|
6206
6201
|
}
|
|
6207
6202
|
const {
|
|
6208
6203
|
chartData: l,
|
|
6209
6204
|
schema: g
|
|
6210
6205
|
} = c;
|
|
6211
6206
|
if (f || !g) {
|
|
6212
|
-
let
|
|
6213
|
-
return t[8] === Symbol.for("react.memo_cache_sentinel") ? (
|
|
6207
|
+
let v;
|
|
6208
|
+
return t[8] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ S.jsx("div", {}), t[8] = v) : v = t[8], v;
|
|
6214
6209
|
}
|
|
6215
6210
|
const h = (_b = (_a2 = d.main) == null ? void 0 : _a2.plots) == null ? void 0 : _b[0];
|
|
6216
6211
|
let p;
|
|
@@ -6230,11 +6225,11 @@ const Md = (e) => {
|
|
|
6230
6225
|
T,
|
|
6231
6226
|
A
|
|
6232
6227
|
] }), t[21] = T, t[22] = A, t[23] = N) : N = t[23];
|
|
6233
|
-
const b = (_c2 = d.histograms) == null ? void 0 : _c2.plots, C = (_d2 = d.addCategoricalField) == null ? void 0 : _d2.plots,
|
|
6234
|
-
let
|
|
6235
|
-
if (t[24] !== a || t[25] !== l || t[26] !== y || t[27] !==
|
|
6236
|
-
let
|
|
6237
|
-
t[33] !== a || t[34] !== l || t[35] !== y || t[36] !== u ? (
|
|
6228
|
+
const b = (_c2 = d.histograms) == null ? void 0 : _c2.plots, C = (_d2 = d.addCategoricalField) == null ? void 0 : _d2.plots, P = (_e2 = d.addQuantitativeField) == null ? void 0 : _e2.plots, w = (_f = d.addTemporalField) == null ? void 0 : _f.plots;
|
|
6229
|
+
let D;
|
|
6230
|
+
if (t[24] !== a || t[25] !== l || t[26] !== y || t[27] !== P || t[28] !== w || t[29] !== b || t[30] !== C || t[31] !== u) {
|
|
6231
|
+
let v;
|
|
6232
|
+
t[33] !== a || t[34] !== l || t[35] !== y || t[36] !== u ? (v = (Z, $e) => /* @__PURE__ */ S.jsx(rd, { title: /* @__PURE__ */ S.jsx("div", { className: "flex flex-row gap-1", children: Z.fieldInfos.map((Q) => {
|
|
6238
6233
|
const pe = Q.fieldDef.field === "*" ? "Count" : Q.fieldDef.fn ? `${Q.fieldDef.fn}(${Q.fieldDef.field})` : Q.fieldDef.field.toString();
|
|
6239
6234
|
return /* @__PURE__ */ S.jsx(Ea, { variant: y.has(Q.fieldDef.field) ? "secondary" : "defaultOutline", children: pe }, pe);
|
|
6240
6235
|
}) }), actions: /* @__PURE__ */ S.jsx(ma, { content: "Make main plot", children: /* @__PURE__ */ S.jsx(ur, { "data-testid": "marimo-plugin-data-explorer-make-main-plot", variant: "text", size: "icon", onClick: () => {
|
|
@@ -6242,16 +6237,16 @@ const Md = (e) => {
|
|
|
6242
6237
|
a.setEncoding(Q);
|
|
6243
6238
|
}, children: /* @__PURE__ */ S.jsx(pa, { className: "w-4 h-4" }) }) }), children: /* @__PURE__ */ S.jsx(Bn, { data: {
|
|
6244
6239
|
source: l
|
|
6245
|
-
}, actions: false, spec: Z.spec, theme: u === "dark" ? "dark" : void 0 }, $e) }, $e), t[33] = a, t[34] = l, t[35] = y, t[36] = u, t[37] =
|
|
6240
|
+
}, actions: false, spec: Z.spec, theme: u === "dark" ? "dark" : void 0 }, $e) }, $e), t[33] = a, t[34] = l, t[35] = y, t[36] = u, t[37] = v) : v = t[37], D = [b, C, P, w].filter(Boolean).flat().map(v), t[24] = a, t[25] = l, t[26] = y, t[27] = P, t[28] = w, t[29] = b, t[30] = C, t[31] = u, t[32] = D;
|
|
6246
6241
|
} else
|
|
6247
|
-
|
|
6248
|
-
let
|
|
6249
|
-
t[38] !==
|
|
6250
|
-
let
|
|
6251
|
-
return t[40] !==
|
|
6242
|
+
D = t[32];
|
|
6243
|
+
let q;
|
|
6244
|
+
t[38] !== D ? (q = /* @__PURE__ */ S.jsx(nd, { children: D }), t[38] = D, t[39] = q) : q = t[39];
|
|
6245
|
+
let B;
|
|
6246
|
+
return t[40] !== q || t[41] !== N ? (B = /* @__PURE__ */ S.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
6252
6247
|
N,
|
|
6253
|
-
|
|
6254
|
-
] }), t[40] =
|
|
6248
|
+
q
|
|
6249
|
+
] }), t[40] = q, t[41] = N, t[42] = B) : B = t[42], B;
|
|
6255
6250
|
}, nd = (e) => {
|
|
6256
6251
|
const t = Ce.c(2), {
|
|
6257
6252
|
children: n
|