drizzle-cube 0.11.2 → 0.12.0
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/adapters/ActivityGridChart.config-D2pyoHSf.cjs +1 -0
- package/dist/adapters/ActivityGridChart.config-DW-AgFxA.js +2 -0
- package/dist/adapters/AreaChart.config-BP3BU4W2.js +2 -0
- package/dist/adapters/AreaChart.config-CRyAhIvc.cjs +1 -0
- package/dist/adapters/BarChart.config-A6F0Q9OX.cjs +1 -0
- package/dist/adapters/BarChart.config-BInCLrWt.js +2 -0
- package/dist/adapters/BoxPlotChart.config-DUTvglWv.cjs +1 -0
- package/dist/adapters/BoxPlotChart.config-DXvJdMSr.js +2 -0
- package/dist/adapters/BubbleChart.config-B66v-bb5.cjs +1 -0
- package/dist/adapters/BubbleChart.config-nIFyWuBW.js +2 -0
- package/dist/adapters/CandlestickChart.config-C05c1RMZ.cjs +1 -0
- package/dist/adapters/CandlestickChart.config-D4axcOge.js +2 -0
- package/dist/adapters/DataTable.config-BOIQnyoS.js +2 -0
- package/dist/adapters/DataTable.config-CeFswxJI.cjs +1 -0
- package/dist/adapters/DotStripChart.config-B4DU-F1R.cjs +1 -0
- package/dist/adapters/DotStripChart.config-BsWG7BRS.js +2 -0
- package/dist/adapters/FunnelChart.config-BuAkxiFx.js +2 -0
- package/dist/adapters/FunnelChart.config-CEVsDKfR.cjs +1 -0
- package/dist/adapters/GaugeChart.config-JhbBQ77o.cjs +1 -0
- package/dist/adapters/GaugeChart.config-g3iF-G9g.js +2 -0
- package/dist/adapters/HeatMapChart.config-BzSlU0B1.cjs +1 -0
- package/dist/adapters/HeatMapChart.config-C6D638Sr.js +2 -0
- package/dist/adapters/KpiDelta.config-B5UKJ4n-.js +2 -0
- package/dist/adapters/KpiDelta.config-C3E_pfdr.cjs +1 -0
- package/dist/adapters/KpiNumber.config-B8mACkJy.js +2 -0
- package/dist/adapters/KpiNumber.config-BgNPzbNS.cjs +1 -0
- package/dist/adapters/KpiText.config-BsXkIGNW.js +2 -0
- package/dist/adapters/KpiText.config-vp2VuogK.cjs +1 -0
- package/dist/adapters/LineChart.config-B3NcBB9q.cjs +1 -0
- package/dist/adapters/LineChart.config-D_CAQVHv.js +2 -0
- package/dist/adapters/MarkdownChart.config-D_oVj4zs.js +2 -0
- package/dist/adapters/MarkdownChart.config-zhKb-tLR.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-B-wBjGdA.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-bRBJlzNa.js +2 -0
- package/dist/adapters/PieChart.config-CR9SlQ2E.cjs +1 -0
- package/dist/adapters/PieChart.config-DeGWqMNO.js +2 -0
- package/dist/adapters/ProportionBarChart.config-Bz0ssM8J.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-CXhHPnpM.js +2 -0
- package/dist/adapters/RadarChart.config-ColTmOOV.js +2 -0
- package/dist/adapters/RadarChart.config-QV34AUcy.cjs +1 -0
- package/dist/adapters/RadialBarChart.config-BU4kj-pP.js +2 -0
- package/dist/adapters/RadialBarChart.config-CxBOhmiO.cjs +1 -0
- package/dist/adapters/RecordsTable.config-B51ugEpH.js +2 -0
- package/dist/adapters/RecordsTable.config-LxS0O10c.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-DjunHInA.cjs +1 -0
- package/dist/adapters/RetentionCombinedChart.config-Xna3wl8a.js +2 -0
- package/dist/adapters/RetentionHeatmap.config-DJBHUdn1.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-DMAmGV7x.js +2 -0
- package/dist/adapters/SankeyChart.config-CKuUbXMt.js +2 -0
- package/dist/adapters/SankeyChart.config-JrhBtNH4.cjs +1 -0
- package/dist/adapters/ScatterChart.config-BARL2-vh.cjs +1 -0
- package/dist/adapters/ScatterChart.config-Ch4yWKYL.js +2 -0
- package/dist/adapters/SunburstChart.config-CbvgqJ8d.cjs +1 -0
- package/dist/adapters/SunburstChart.config-Q89VT8vO.js +2 -0
- package/dist/adapters/TreeMapChart.config-Bee0ahde.js +2 -0
- package/dist/adapters/TreeMapChart.config-Dz1mOrnC.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-BCJ4ZD6x.cjs +1 -0
- package/dist/adapters/WaterfallChart.config-Bz3tEEKN.js +2 -0
- package/dist/adapters/{compiler-BhityGUO.js → compiler-Cfy_zqyJ.js} +1 -1
- package/dist/adapters/{compiler-B-yljK02.cjs → compiler-ia3Lmjpw.cjs} +1 -1
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-CQOrzBNh.cjs → core-ClA09uBX.cjs} +1 -1
- package/dist/adapters/{core-xZE0miIu.js → core-D4mTEaeK.js} +2 -2
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +5 -5
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +5 -5
- package/dist/adapters/{handler-ByeQ0-1r.js → handler-Bnp5LEMQ.js} +34 -33
- package/dist/adapters/{handler-DSNmfv1R.cjs → handler-TCnGdCyr.cjs} +3 -3
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html-D37s8SEa.js +5 -0
- package/dist/adapters/mcp-app-html-MZNCuL3w.cjs +1 -0
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.js +1 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.js +3 -3
- package/dist/adapters/{mcp-transport-DnLP5FPL.cjs → mcp-transport-6CWmHVtJ.cjs} +2 -2
- package/dist/adapters/{mcp-transport-Cy6n4uj1.js → mcp-transport-cd2BlW-Z.js} +28 -4
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-D3Nt6Bj7.js → openai-CIIYPf0X.js} +1 -1
- package/dist/adapters/{openai-z1ai-G4Q.cjs → openai-Cl5zHeHg.cjs} +1 -1
- package/dist/adapters/{openai-C4HrjyJj.js → openai-DioFEjMP.js} +1 -1
- package/dist/adapters/{openai-BQl0yJCS.cjs → openai-yJ8nX3dq.cjs} +1 -1
- package/dist/adapters/{utils-BaxFceDq.js → utils-B3_hJWlf.js} +9 -0
- package/dist/adapters/{utils-a2p2B6x8.cjs → utils-CeveyqY3.cjs} +1 -1
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/client/charts/chartConfigs.d.ts +17 -0
- package/dist/cjs/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +9 -2
- package/dist/cjs/client/types.d.ts +15 -1
- package/dist/cjs/client/utils/recordsTableUtils.d.ts +6 -3
- package/dist/cjs/server/ai/chart-schema.d.ts +25 -2
- package/dist/client/charts/chartConfigs.d.ts +17 -0
- package/dist/client/charts.js +12 -12
- package/dist/client/chunks/{DashboardEditModal-BrZuaG5z.js → DashboardEditModal-BFC08Qog.js} +315 -198
- package/dist/client/chunks/DashboardEditModal-BFC08Qog.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-B9IVCFPO.js → DotStripChart-BwitDmpR.js} +3 -3
- package/dist/client/chunks/{DotStripChart-B9IVCFPO.js.map → DotStripChart-BwitDmpR.js.map} +1 -1
- package/dist/client/chunks/{ProportionBarChart-DieF9AzP.js → ProportionBarChart-CpUHH9UH.js} +3 -3
- package/dist/client/chunks/{ProportionBarChart-DieF9AzP.js.map → ProportionBarChart-CpUHH9UH.js.map} +1 -1
- package/dist/client/chunks/{RecordsTable-Mo3ai5_M.js → RecordsTable-BoQZiVVM.js} +85 -63
- package/dist/client/chunks/RecordsTable-BoQZiVVM.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-Bie4ADyA.js → RetentionCombinedChart-Dd07baUu.js} +3 -3
- package/dist/client/chunks/{RetentionCombinedChart-Bie4ADyA.js.map → RetentionCombinedChart-Dd07baUu.js.map} +1 -1
- package/dist/client/chunks/{RetentionHeatmap-qstIAx5B.js → RetentionHeatmap-DlD2XmJe.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-qstIAx5B.js.map → RetentionHeatmap-DlD2XmJe.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-CwKFNoe7.js → analysis-builder-DVWOTd7e.js} +9 -9
- package/dist/client/chunks/{analysis-builder-CwKFNoe7.js.map → analysis-builder-DVWOTd7e.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-D1SsD4qC.js → analysis-builder-shared-CXDGMDB-.js} +9 -9
- package/dist/client/chunks/{analysis-builder-shared-D1SsD4qC.js.map → analysis-builder-shared-CXDGMDB-.js.map} +1 -1
- package/dist/client/chunks/{chart-activity-grid-Ly_-2B-f.js → chart-activity-grid-BHaBagS8.js} +12 -3
- package/dist/client/chunks/chart-activity-grid-BHaBagS8.js.map +1 -0
- package/dist/client/chunks/{chart-area-D3l-71Wy.js → chart-area-9lHCX2OO.js} +2 -2
- package/dist/client/chunks/{chart-area-D3l-71Wy.js.map → chart-area-9lHCX2OO.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-BaTyQOqs.js → chart-bar-Dk1CH41V.js} +3 -3
- package/dist/client/chunks/{chart-bar-BaTyQOqs.js.map → chart-bar-Dk1CH41V.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-Cem6PHjz.js → chart-box-plot-CMkzjTFz.js} +2 -2
- package/dist/client/chunks/{chart-box-plot-Cem6PHjz.js.map → chart-box-plot-CMkzjTFz.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-DFlfqCDG.js → chart-bubble-q8f7wXlp.js} +2 -2
- package/dist/client/chunks/{chart-bubble-DFlfqCDG.js.map → chart-bubble-q8f7wXlp.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-BkAFBXtZ.js → chart-candlestick-DTX3wu-1.js} +2 -2
- package/dist/client/chunks/{chart-candlestick-BkAFBXtZ.js.map → chart-candlestick-DTX3wu-1.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-Cxd0cdAl.js → chart-data-table-BYQzVqtc.js} +4 -3
- package/dist/client/chunks/chart-data-table-BYQzVqtc.js.map +1 -0
- package/dist/client/chunks/{chart-funnel-71Kn4eeF.js → chart-funnel-CxW1voDU.js} +2 -2
- package/dist/client/chunks/{chart-funnel-71Kn4eeF.js.map → chart-funnel-CxW1voDU.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-BddS_9oS.js → chart-gauge-0M-Jufnw.js} +3 -3
- package/dist/client/chunks/{chart-gauge-BddS_9oS.js.map → chart-gauge-0M-Jufnw.js.map} +1 -1
- package/dist/client/chunks/{chart-heat-map-BQIsrn8m.js → chart-heat-map-BZvPdZAu.js} +3 -3
- package/dist/client/chunks/{chart-heat-map-BQIsrn8m.js.map → chart-heat-map-BZvPdZAu.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-DndbqdZT.js → chart-kpi-delta-De-F9NUk.js} +3 -3
- package/dist/client/chunks/{chart-kpi-delta-DndbqdZT.js.map → chart-kpi-delta-De-F9NUk.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-DAbfoHMt.js → chart-kpi-number-MSdv2_ha.js} +5 -5
- package/dist/client/chunks/{chart-kpi-number-DAbfoHMt.js.map → chart-kpi-number-MSdv2_ha.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-D8oQgpxL.js → chart-kpi-text-Zt9JlUi2.js} +3 -3
- package/dist/client/chunks/{chart-kpi-text-D8oQgpxL.js.map → chart-kpi-text-Zt9JlUi2.js.map} +1 -1
- package/dist/client/chunks/{chart-line-BNqjUowg.js → chart-line-VFRY7_Zn.js} +3 -3
- package/dist/client/chunks/{chart-line-BNqjUowg.js.map → chart-line-VFRY7_Zn.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-XWU1MyCy.js → chart-markdown-RumOX5HX.js} +2 -2
- package/dist/client/chunks/{chart-markdown-XWU1MyCy.js.map → chart-markdown-RumOX5HX.js.map} +1 -1
- package/dist/client/chunks/{chart-measure-profile-D5nZMWlI.js → chart-measure-profile-5FFyPuV_.js} +3 -3
- package/dist/client/chunks/{chart-measure-profile-D5nZMWlI.js.map → chart-measure-profile-5FFyPuV_.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-D8r9HCZ4.js → chart-pie-Bf5SbxZt.js} +3 -3
- package/dist/client/chunks/{chart-pie-D8r9HCZ4.js.map → chart-pie-Bf5SbxZt.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-R4PuCIWp.js → chart-radar-D9NgUbth.js} +3 -3
- package/dist/client/chunks/{chart-radar-R4PuCIWp.js.map → chart-radar-D9NgUbth.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-hmrSFa6O.js → chart-radial-bar-BlFXSc1c.js} +3 -3
- package/dist/client/chunks/{chart-radial-bar-hmrSFa6O.js.map → chart-radial-bar-BlFXSc1c.js.map} +1 -1
- package/dist/client/chunks/{chart-sankey-CFXPybny.js → chart-sankey-BkanN_ql.js} +2 -2
- package/dist/client/chunks/{chart-sankey-CFXPybny.js.map → chart-sankey-BkanN_ql.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-CH82md0L.js → chart-scatter-DqqWojlQ.js} +3 -3
- package/dist/client/chunks/{chart-scatter-CH82md0L.js.map → chart-scatter-DqqWojlQ.js.map} +1 -1
- package/dist/client/chunks/{chart-sunburst-CTj95eEC.js → chart-sunburst-BMhXLThV.js} +3 -3
- package/dist/client/chunks/{chart-sunburst-CTj95eEC.js.map → chart-sunburst-BMhXLThV.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-CmysE4bF.js → chart-tree-map-eaHTIJ76.js} +3 -3
- package/dist/client/chunks/{chart-tree-map-CmysE4bF.js.map → chart-tree-map-eaHTIJ76.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-Bv1mPvlB.js → chart-waterfall-4MOpuCrR.js} +3 -3
- package/dist/client/chunks/{chart-waterfall-Bv1mPvlB.js.map → chart-waterfall-4MOpuCrR.js.map} +1 -1
- package/dist/client/chunks/{charts-core-BdEQgbqN.js → charts-core-CTTLxFYp.js} +2 -2
- package/dist/client/chunks/{charts-core-BdEQgbqN.js.map → charts-core-CTTLxFYp.js.map} +1 -1
- package/dist/client/chunks/charts-loader-DQ7MgPWB.js +87 -0
- package/dist/client/chunks/{charts-loader-DMdE-Azc.js.map → charts-loader-DQ7MgPWB.js.map} +1 -1
- package/dist/client/chunks/{en-US-HP6FHuNy.js → en-US-CXODg-om.js} +3 -1
- package/dist/client/chunks/{en-US-HP6FHuNy.js.map → en-US-CXODg-om.js.map} +1 -1
- package/dist/client/chunks/{nl-NL-DVZXf8U7.js → nl-NL-CpH637df.js} +10 -1
- package/dist/client/chunks/nl-NL-CpH637df.js.map +1 -0
- package/dist/client/chunks/{schema-visualization-MlRrcJQH.js → schema-visualization-26uy1UwE.js} +3 -3
- package/dist/client/chunks/{schema-visualization-MlRrcJQH.js.map → schema-visualization-26uy1UwE.js.map} +1 -1
- package/dist/client/chunks/{useDirtyStateTracking-DUyYwuN_.js → useDirtyStateTracking-CnEIH78A.js} +4 -4
- package/dist/client/chunks/{useDirtyStateTracking-DUyYwuN_.js.map → useDirtyStateTracking-CnEIH78A.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-BtoS3tb5.js → useExplainAI-SbAIGXOr.js} +4 -4
- package/dist/client/chunks/{useExplainAI-BtoS3tb5.js.map → useExplainAI-SbAIGXOr.js.map} +1 -1
- package/dist/client/chunks/{vendor-BfBpNmMa.js → vendor-Cn44d7zS.js} +2 -2
- package/dist/client/chunks/{vendor-BfBpNmMa.js.map → vendor-Cn44d7zS.js.map} +1 -1
- package/dist/client/components/AnalysisBuilder/ColumnFormatsEditor.d.ts +9 -2
- package/dist/client/components.js +1 -1
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.js +13 -13
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.js +1 -1
- package/dist/client/types.d.ts +15 -1
- package/dist/client/utils/recordsTableUtils.d.ts +6 -3
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +69 -69
- package/dist/server/ai/chart-schema.d.ts +25 -2
- package/dist/server/index.cjs +3 -3
- package/dist/server/index.js +37 -3
- package/package.json +1 -1
- package/dist/adapters/ActivityGridChart.config-XMtoteb6.js +0 -2
- package/dist/adapters/ActivityGridChart.config-h1AXPvn0.cjs +0 -1
- package/dist/adapters/AreaChart.config-DYf9wufo.cjs +0 -1
- package/dist/adapters/AreaChart.config-We6b53aT.js +0 -2
- package/dist/adapters/BarChart.config-4SX44IYv.cjs +0 -1
- package/dist/adapters/BarChart.config-CwBnyptL.js +0 -2
- package/dist/adapters/BoxPlotChart.config-BzNe-FlW.cjs +0 -1
- package/dist/adapters/BoxPlotChart.config-mfAHqmcp.js +0 -2
- package/dist/adapters/BubbleChart.config-CBT5jMdc.cjs +0 -1
- package/dist/adapters/BubbleChart.config-DxG_Umal.js +0 -2
- package/dist/adapters/CandlestickChart.config-Cqw3XP1h.js +0 -2
- package/dist/adapters/CandlestickChart.config-DPSSlzUD.cjs +0 -1
- package/dist/adapters/DataTable.config-DS1bvaDu.js +0 -2
- package/dist/adapters/DataTable.config-D_NsMeyz.cjs +0 -1
- package/dist/adapters/DotStripChart.config-BApWn6QV.cjs +0 -1
- package/dist/adapters/DotStripChart.config-Bdk5-YfB.js +0 -2
- package/dist/adapters/FunnelChart.config-BT5up_Bg.cjs +0 -1
- package/dist/adapters/FunnelChart.config-ISZiz9fn.js +0 -2
- package/dist/adapters/GaugeChart.config-Biaq1cKc.cjs +0 -1
- package/dist/adapters/GaugeChart.config-BjGfB84t.js +0 -2
- package/dist/adapters/HeatMapChart.config-Bmca8KiH.cjs +0 -1
- package/dist/adapters/HeatMapChart.config-uWvR0B-N.js +0 -2
- package/dist/adapters/KpiDelta.config-CJeDdj_1.js +0 -2
- package/dist/adapters/KpiDelta.config-CKr9pAxL.cjs +0 -1
- package/dist/adapters/KpiNumber.config-6YLEF2fy.cjs +0 -1
- package/dist/adapters/KpiNumber.config-C00M46GA.js +0 -2
- package/dist/adapters/KpiText.config-C8Av_D2W.cjs +0 -1
- package/dist/adapters/KpiText.config-bKTHob0C.js +0 -2
- package/dist/adapters/LineChart.config-DH68HT_B.js +0 -2
- package/dist/adapters/LineChart.config-DPq7GvL9.cjs +0 -1
- package/dist/adapters/MarkdownChart.config-CaaJPO3c.js +0 -2
- package/dist/adapters/MarkdownChart.config-ca_UyhWJ.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-C1Il0IqL.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-DMOnkmb6.js +0 -2
- package/dist/adapters/PieChart.config-Bg-8cxWK.js +0 -2
- package/dist/adapters/PieChart.config-joJcF--K.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-B2sltKsI.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-BlCedy1v.js +0 -2
- package/dist/adapters/RadarChart.config-DD1pX6FZ.js +0 -2
- package/dist/adapters/RadarChart.config-DVCCLSVw.cjs +0 -1
- package/dist/adapters/RadialBarChart.config--VIE2jMM.js +0 -2
- package/dist/adapters/RadialBarChart.config-BZwyWhTg.cjs +0 -1
- package/dist/adapters/RecordsTable.config-CTBQc-2r.js +0 -2
- package/dist/adapters/RecordsTable.config-DPdO0DL5.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-PGVxnkRL.js +0 -2
- package/dist/adapters/RetentionCombinedChart.config-mX5PMh82.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-Co-JMzBm.js +0 -2
- package/dist/adapters/RetentionHeatmap.config-Cub3-ksy.cjs +0 -1
- package/dist/adapters/SankeyChart.config-BkIyUcAE.cjs +0 -1
- package/dist/adapters/SankeyChart.config-DGTnRmYg.js +0 -2
- package/dist/adapters/ScatterChart.config-CdZrBorg.js +0 -2
- package/dist/adapters/ScatterChart.config-CwN9niUL.cjs +0 -1
- package/dist/adapters/SunburstChart.config-D0ZkRSJv.cjs +0 -1
- package/dist/adapters/SunburstChart.config-RF3uu5Sa.js +0 -2
- package/dist/adapters/TreeMapChart.config-B2Yn_V7p.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-diJtcs4D.js +0 -2
- package/dist/adapters/WaterfallChart.config-B10PxftT.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-BImlkLmR.js +0 -2
- package/dist/adapters/mcp-app-html-BCkzy3a2.cjs +0 -1
- package/dist/adapters/mcp-app-html-WiSFu1oD.js +0 -5
- package/dist/client/chunks/DashboardEditModal-BrZuaG5z.js.map +0 -1
- package/dist/client/chunks/RecordsTable-Mo3ai5_M.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-Ly_-2B-f.js.map +0 -1
- package/dist/client/chunks/chart-data-table-Cxd0cdAl.js.map +0 -1
- package/dist/client/chunks/charts-loader-DMdE-Azc.js +0 -87
- package/dist/client/chunks/nl-NL-DVZXf8U7.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { J as e, Y as t, _ as n, b as r, g as i, h as a, m as o, p as s } from "./utils-
|
|
2
|
-
import { D as c, E as l, O as u, T as d } from "./mcp-transport-
|
|
1
|
+
import { J as e, Y as t, _ as n, b as r, g as i, h as a, m as o, p as s } from "./utils-B3_hJWlf.js";
|
|
2
|
+
import { D as c, E as l, O as u, T as d } from "./mcp-transport-cd2BlW-Z.js";
|
|
3
3
|
import { a as f, c as p, d as m, f as h, i as g, l as _, n as v, o as y, r as b, s as x, t as S, u as ee } from "./chartConfigHelpers-BsviVhEw.js";
|
|
4
4
|
//#region src/server/agent/agent-prompts.ts
|
|
5
5
|
var te = [
|
|
@@ -780,7 +780,8 @@ var w = {
|
|
|
780
780
|
key: "columnFormats",
|
|
781
781
|
label: "chart.recordsTable.option.columnFormats.label",
|
|
782
782
|
type: "columnFormats",
|
|
783
|
-
description: "chart.recordsTable.option.columnFormats.description"
|
|
783
|
+
description: "chart.recordsTable.option.columnFormats.description",
|
|
784
|
+
progressBands: !0
|
|
784
785
|
},
|
|
785
786
|
{
|
|
786
787
|
key: "rowLink",
|
|
@@ -1917,7 +1918,7 @@ var w = {
|
|
|
1917
1918
|
useCase: "chart.bar.useCase",
|
|
1918
1919
|
isAvailable: y,
|
|
1919
1920
|
dependencies: q,
|
|
1920
|
-
config: async () => (await import("./BarChart.config-
|
|
1921
|
+
config: async () => (await import("./BarChart.config-BInCLrWt.js")).barChartConfig
|
|
1921
1922
|
},
|
|
1922
1923
|
line: {
|
|
1923
1924
|
label: "chart.line.label",
|
|
@@ -1926,7 +1927,7 @@ var w = {
|
|
|
1926
1927
|
useCase: "chart.line.useCase",
|
|
1927
1928
|
isAvailable: y,
|
|
1928
1929
|
dependencies: q,
|
|
1929
|
-
config: async () => (await import("./LineChart.config-
|
|
1930
|
+
config: async () => (await import("./LineChart.config-D_CAQVHv.js")).lineChartConfig
|
|
1930
1931
|
},
|
|
1931
1932
|
area: {
|
|
1932
1933
|
label: "chart.area.label",
|
|
@@ -1935,7 +1936,7 @@ var w = {
|
|
|
1935
1936
|
useCase: "chart.area.useCase",
|
|
1936
1937
|
isAvailable: y,
|
|
1937
1938
|
dependencies: q,
|
|
1938
|
-
config: async () => (await import("./AreaChart.config-
|
|
1939
|
+
config: async () => (await import("./AreaChart.config-BP3BU4W2.js")).areaChartConfig
|
|
1939
1940
|
},
|
|
1940
1941
|
pie: {
|
|
1941
1942
|
label: "chart.pie.label",
|
|
@@ -1944,7 +1945,7 @@ var w = {
|
|
|
1944
1945
|
useCase: "chart.pie.useCase",
|
|
1945
1946
|
isAvailable: y,
|
|
1946
1947
|
dependencies: q,
|
|
1947
|
-
config: async () => (await import("./PieChart.config-
|
|
1948
|
+
config: async () => (await import("./PieChart.config-DeGWqMNO.js")).pieChartConfig
|
|
1948
1949
|
},
|
|
1949
1950
|
scatter: {
|
|
1950
1951
|
label: "chart.scatter.label",
|
|
@@ -1959,7 +1960,7 @@ var w = {
|
|
|
1959
1960
|
reason: "chart.availability.scatter"
|
|
1960
1961
|
} : { available: !0 },
|
|
1961
1962
|
dependencies: q,
|
|
1962
|
-
config: async () => (await import("./ScatterChart.config-
|
|
1963
|
+
config: async () => (await import("./ScatterChart.config-Ch4yWKYL.js")).scatterChartConfig
|
|
1963
1964
|
},
|
|
1964
1965
|
bubble: {
|
|
1965
1966
|
label: "chart.bubble.label",
|
|
@@ -1974,7 +1975,7 @@ var w = {
|
|
|
1974
1975
|
reason: "chart.availability.bubble"
|
|
1975
1976
|
} : { available: !0 },
|
|
1976
1977
|
dependencies: q,
|
|
1977
|
-
config: async () => (await import("./BubbleChart.config-
|
|
1978
|
+
config: async () => (await import("./BubbleChart.config-nIFyWuBW.js")).bubbleChartConfig
|
|
1978
1979
|
},
|
|
1979
1980
|
radar: {
|
|
1980
1981
|
label: "chart.radar.label",
|
|
@@ -1983,7 +1984,7 @@ var w = {
|
|
|
1983
1984
|
useCase: "chart.radar.useCase",
|
|
1984
1985
|
isAvailable: y,
|
|
1985
1986
|
dependencies: q,
|
|
1986
|
-
config: async () => (await import("./RadarChart.config-
|
|
1987
|
+
config: async () => (await import("./RadarChart.config-ColTmOOV.js")).radarChartConfig
|
|
1987
1988
|
},
|
|
1988
1989
|
radialBar: {
|
|
1989
1990
|
label: "chart.radialBar.label",
|
|
@@ -1992,7 +1993,7 @@ var w = {
|
|
|
1992
1993
|
useCase: "chart.radialBar.useCase",
|
|
1993
1994
|
isAvailable: y,
|
|
1994
1995
|
dependencies: q,
|
|
1995
|
-
config: async () => (await import("./RadialBarChart.config
|
|
1996
|
+
config: async () => (await import("./RadialBarChart.config-BU4kj-pP.js")).radialBarChartConfig
|
|
1996
1997
|
},
|
|
1997
1998
|
treemap: {
|
|
1998
1999
|
label: "chart.treemap.label",
|
|
@@ -2001,21 +2002,21 @@ var w = {
|
|
|
2001
2002
|
useCase: "chart.treemap.useCase",
|
|
2002
2003
|
isAvailable: y,
|
|
2003
2004
|
dependencies: q,
|
|
2004
|
-
config: async () => (await import("./TreeMapChart.config-
|
|
2005
|
+
config: async () => (await import("./TreeMapChart.config-Bee0ahde.js")).treemapChartConfig
|
|
2005
2006
|
},
|
|
2006
2007
|
table: {
|
|
2007
2008
|
label: "chart.table.label",
|
|
2008
2009
|
icon: "chartTable",
|
|
2009
2010
|
description: "chart.table.description",
|
|
2010
2011
|
useCase: "chart.table.useCase",
|
|
2011
|
-
config: async () => (await import("./DataTable.config-
|
|
2012
|
+
config: async () => (await import("./DataTable.config-BOIQnyoS.js")).dataTableConfig
|
|
2012
2013
|
},
|
|
2013
2014
|
recordsTable: {
|
|
2014
2015
|
label: "chart.recordsTable.label",
|
|
2015
2016
|
icon: "chartRecordsTable",
|
|
2016
2017
|
description: "chart.recordsTable.description",
|
|
2017
2018
|
useCase: "chart.recordsTable.useCase",
|
|
2018
|
-
config: async () => (await import("./RecordsTable.config-
|
|
2019
|
+
config: async () => (await import("./RecordsTable.config-B51ugEpH.js")).recordsTableConfig
|
|
2019
2020
|
},
|
|
2020
2021
|
activityGrid: {
|
|
2021
2022
|
label: "chart.activityGrid.label",
|
|
@@ -2029,7 +2030,7 @@ var w = {
|
|
|
2029
2030
|
available: !1,
|
|
2030
2031
|
reason: "chart.availability.requiresTimeDimension"
|
|
2031
2032
|
} : { available: !0 },
|
|
2032
|
-
config: async () => (await import("./ActivityGridChart.config-
|
|
2033
|
+
config: async () => (await import("./ActivityGridChart.config-DW-AgFxA.js")).activityGridChartConfig
|
|
2033
2034
|
},
|
|
2034
2035
|
kpiNumber: {
|
|
2035
2036
|
label: "chart.kpiNumber.label",
|
|
@@ -2037,7 +2038,7 @@ var w = {
|
|
|
2037
2038
|
description: "chart.kpiNumber.description",
|
|
2038
2039
|
useCase: "chart.kpiNumber.useCase",
|
|
2039
2040
|
isAvailable: f,
|
|
2040
|
-
config: async () => (await import("./KpiNumber.config-
|
|
2041
|
+
config: async () => (await import("./KpiNumber.config-B8mACkJy.js")).kpiNumberConfig
|
|
2041
2042
|
},
|
|
2042
2043
|
kpiDelta: {
|
|
2043
2044
|
label: "chart.kpiDelta.label",
|
|
@@ -2045,7 +2046,7 @@ var w = {
|
|
|
2045
2046
|
description: "chart.kpiDelta.description",
|
|
2046
2047
|
useCase: "chart.kpiDelta.useCase",
|
|
2047
2048
|
isAvailable: y,
|
|
2048
|
-
config: async () => (await import("./KpiDelta.config-
|
|
2049
|
+
config: async () => (await import("./KpiDelta.config-B5UKJ4n-.js")).kpiDeltaConfig
|
|
2049
2050
|
},
|
|
2050
2051
|
kpiText: {
|
|
2051
2052
|
label: "chart.kpiText.label",
|
|
@@ -2053,14 +2054,14 @@ var w = {
|
|
|
2053
2054
|
description: "chart.kpiText.description",
|
|
2054
2055
|
useCase: "chart.kpiText.useCase",
|
|
2055
2056
|
isAvailable: f,
|
|
2056
|
-
config: async () => (await import("./KpiText.config-
|
|
2057
|
+
config: async () => (await import("./KpiText.config-BsXkIGNW.js")).kpiTextConfig
|
|
2057
2058
|
},
|
|
2058
2059
|
markdown: {
|
|
2059
2060
|
label: "chart.markdown.label",
|
|
2060
2061
|
icon: "chartMarkdown",
|
|
2061
2062
|
description: "chart.markdown.description",
|
|
2062
2063
|
useCase: "chart.markdown.useCase",
|
|
2063
|
-
config: async () => (await import("./MarkdownChart.config-
|
|
2064
|
+
config: async () => (await import("./MarkdownChart.config-D_oVj4zs.js")).markdownConfig
|
|
2064
2065
|
},
|
|
2065
2066
|
funnel: {
|
|
2066
2067
|
label: "chart.funnel.label",
|
|
@@ -2068,7 +2069,7 @@ var w = {
|
|
|
2068
2069
|
description: "chart.funnel.description",
|
|
2069
2070
|
useCase: "chart.funnel.useCase",
|
|
2070
2071
|
dependencies: q,
|
|
2071
|
-
config: async () => (await import("./FunnelChart.config-
|
|
2072
|
+
config: async () => (await import("./FunnelChart.config-BuAkxiFx.js")).funnelChartConfig
|
|
2072
2073
|
},
|
|
2073
2074
|
sankey: {
|
|
2074
2075
|
label: "chart.sankey.label",
|
|
@@ -2076,7 +2077,7 @@ var w = {
|
|
|
2076
2077
|
description: "chart.sankey.description",
|
|
2077
2078
|
useCase: "chart.sankey.useCase",
|
|
2078
2079
|
dependencies: q,
|
|
2079
|
-
config: async () => (await import("./SankeyChart.config-
|
|
2080
|
+
config: async () => (await import("./SankeyChart.config-CKuUbXMt.js")).sankeyChartConfig
|
|
2080
2081
|
},
|
|
2081
2082
|
sunburst: {
|
|
2082
2083
|
label: "chart.sunburst.label",
|
|
@@ -2084,7 +2085,7 @@ var w = {
|
|
|
2084
2085
|
description: "chart.sunburst.description",
|
|
2085
2086
|
useCase: "chart.sunburst.useCase",
|
|
2086
2087
|
dependencies: q,
|
|
2087
|
-
config: async () => (await import("./SunburstChart.config-
|
|
2088
|
+
config: async () => (await import("./SunburstChart.config-Q89VT8vO.js")).sunburstChartConfig
|
|
2088
2089
|
},
|
|
2089
2090
|
heatmap: {
|
|
2090
2091
|
label: "chart.heatmap.label",
|
|
@@ -2102,21 +2103,21 @@ var w = {
|
|
|
2102
2103
|
packageName: "@nivo/heatmap",
|
|
2103
2104
|
installCommand: "npm install @nivo/heatmap"
|
|
2104
2105
|
},
|
|
2105
|
-
config: async () => (await import("./HeatMapChart.config-
|
|
2106
|
+
config: async () => (await import("./HeatMapChart.config-C6D638Sr.js")).heatmapChartConfig
|
|
2106
2107
|
},
|
|
2107
2108
|
retentionHeatmap: {
|
|
2108
2109
|
label: "chart.retentionHeatmap.label",
|
|
2109
2110
|
icon: "chartRetention",
|
|
2110
2111
|
description: "chart.retentionHeatmap.description",
|
|
2111
2112
|
useCase: "chart.retentionHeatmap.useCase",
|
|
2112
|
-
config: async () => (await import("./RetentionHeatmap.config-
|
|
2113
|
+
config: async () => (await import("./RetentionHeatmap.config-DMAmGV7x.js")).retentionHeatmapConfig
|
|
2113
2114
|
},
|
|
2114
2115
|
retentionCombined: {
|
|
2115
2116
|
label: "chart.retentionCombined.label",
|
|
2116
2117
|
icon: "chartRetention",
|
|
2117
2118
|
description: "chart.retentionCombined.description",
|
|
2118
2119
|
useCase: "chart.retentionCombined.useCase",
|
|
2119
|
-
config: async () => (await import("./RetentionCombinedChart.config-
|
|
2120
|
+
config: async () => (await import("./RetentionCombinedChart.config-Xna3wl8a.js")).retentionCombinedConfig
|
|
2120
2121
|
},
|
|
2121
2122
|
boxPlot: {
|
|
2122
2123
|
label: "chart.boxPlot.label",
|
|
@@ -2124,7 +2125,7 @@ var w = {
|
|
|
2124
2125
|
description: "chart.boxPlot.description",
|
|
2125
2126
|
useCase: "chart.boxPlot.useCase",
|
|
2126
2127
|
isAvailable: y,
|
|
2127
|
-
config: async () => (await import("./BoxPlotChart.config-
|
|
2128
|
+
config: async () => (await import("./BoxPlotChart.config-DXvJdMSr.js")).boxPlotChartConfig
|
|
2128
2129
|
},
|
|
2129
2130
|
dotStrip: {
|
|
2130
2131
|
label: "chart.dotStrip.label",
|
|
@@ -2132,7 +2133,7 @@ var w = {
|
|
|
2132
2133
|
description: "chart.dotStrip.description",
|
|
2133
2134
|
useCase: "chart.dotStrip.useCase",
|
|
2134
2135
|
isAvailable: y,
|
|
2135
|
-
config: async () => (await import("./DotStripChart.config-
|
|
2136
|
+
config: async () => (await import("./DotStripChart.config-BsWG7BRS.js")).dotStripChartConfig
|
|
2136
2137
|
},
|
|
2137
2138
|
waterfall: {
|
|
2138
2139
|
label: "chart.waterfall.label",
|
|
@@ -2141,7 +2142,7 @@ var w = {
|
|
|
2141
2142
|
useCase: "chart.waterfall.useCase",
|
|
2142
2143
|
isAvailable: y,
|
|
2143
2144
|
dependencies: q,
|
|
2144
|
-
config: async () => (await import("./WaterfallChart.config-
|
|
2145
|
+
config: async () => (await import("./WaterfallChart.config-Bz3tEEKN.js")).waterfallChartConfig
|
|
2145
2146
|
},
|
|
2146
2147
|
candlestick: {
|
|
2147
2148
|
label: "chart.candlestick.label",
|
|
@@ -2155,7 +2156,7 @@ var w = {
|
|
|
2155
2156
|
available: !1,
|
|
2156
2157
|
reason: "chart.availability.requiresDimension"
|
|
2157
2158
|
} : { available: !0 },
|
|
2158
|
-
config: async () => (await import("./CandlestickChart.config-
|
|
2159
|
+
config: async () => (await import("./CandlestickChart.config-D4axcOge.js")).candlestickChartConfig
|
|
2159
2160
|
},
|
|
2160
2161
|
measureProfile: {
|
|
2161
2162
|
label: "chart.measureProfile.label",
|
|
@@ -2167,7 +2168,7 @@ var w = {
|
|
|
2167
2168
|
reason: "chart.availability.requiresTwoMeasures"
|
|
2168
2169
|
} : { available: !0 },
|
|
2169
2170
|
dependencies: q,
|
|
2170
|
-
config: async () => (await import("./MeasureProfileChart.config-
|
|
2171
|
+
config: async () => (await import("./MeasureProfileChart.config-bRBJlzNa.js")).measureProfileChartConfig
|
|
2171
2172
|
},
|
|
2172
2173
|
proportionBar: {
|
|
2173
2174
|
label: "chart.proportionBar.label",
|
|
@@ -2175,7 +2176,7 @@ var w = {
|
|
|
2175
2176
|
description: "chart.proportionBar.description",
|
|
2176
2177
|
useCase: "chart.proportionBar.useCase",
|
|
2177
2178
|
isAvailable: y,
|
|
2178
|
-
config: async () => (await import("./ProportionBarChart.config-
|
|
2179
|
+
config: async () => (await import("./ProportionBarChart.config-CXhHPnpM.js")).proportionBarChartConfig
|
|
2179
2180
|
},
|
|
2180
2181
|
gauge: {
|
|
2181
2182
|
label: "chart.gauge.label",
|
|
@@ -2187,7 +2188,7 @@ var w = {
|
|
|
2187
2188
|
packageName: "d3-shape",
|
|
2188
2189
|
installCommand: "npm install d3-shape"
|
|
2189
2190
|
},
|
|
2190
|
-
config: async () => (await import("./GaugeChart.config-
|
|
2191
|
+
config: async () => (await import("./GaugeChart.config-g3iF-G9g.js")).gaugeChartConfig
|
|
2191
2192
|
}
|
|
2192
2193
|
};
|
|
2193
2194
|
function he(e, t) {
|
|
@@ -3037,7 +3038,7 @@ async function Ie(e, t, n) {
|
|
|
3037
3038
|
return new e(t);
|
|
3038
3039
|
}
|
|
3039
3040
|
case "openai": {
|
|
3040
|
-
let { OpenAIProvider: e } = await import("./openai-
|
|
3041
|
+
let { OpenAIProvider: e } = await import("./openai-DioFEjMP.js");
|
|
3041
3042
|
return new e(t, n);
|
|
3042
3043
|
}
|
|
3043
3044
|
case "google": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
const e=require("./utils-
|
|
1
|
+
const e=require("./utils-CeveyqY3.cjs"),t=require("./mcp-transport-6CWmHVtJ.cjs"),n=require("./chartConfigHelpers-BhME7ow_.cjs");var r=[`You are an analyst agent working in a notebook backed by a drizzle-cube semantic layer.`,``,`Your tools, in the order you normally use them:`,"1) `discover_cubes` {topic|intent} — find cubes and understand the schema. Call this first.","2) `get_cube_metadata` — full measure/dimension detail for every cube, when discover is not enough.","3) `execute_query` — run a query and get results back, along with a `dataShape` summary.","4) `add_markdown` — write the finding into the notebook.","5) `add_portlet` — add the chart that shows it.","6) `update_portlet` — amend a chart you already added, instead of adding a second one.","7) `save_as_dashboard` — only when the user explicitly asks for a dashboard.",``,`CROSS-CUBE JOINS:`,`The "joins" property in discover results shows relationships between cubes.`,`You can include dimensions from ANY related cube in your query — the system auto-joins.`,`Example: If Productivity joins to Employees, query:`,`{ "measures": ["Productivity.totalPullRequests"], "dimensions": ["Employees.name"] }`,``,`Do NOT hallucinate cube/field names — always use discover_cubes first.`].join(`
|
|
2
2
|
`);function i(e,t){if(t.measures&&t.measures.length!==0){e.push(``),e.push(`**Measures:**`);for(let n of t.measures){let r=n.description?` - ${n.description}`:``;e.push(`- \`${t.name}.${n.name}\` (${n.type})${r}`)}}}function a(e,t){if(t.dimensions&&t.dimensions.length!==0){e.push(``),e.push(`**Dimensions:**`);for(let n of t.dimensions){let r=n.description?` - ${n.description}`:``;e.push(`- \`${t.name}.${n.name}\` (${n.type})${r}`)}}}function o(e,t){if(t.relationships&&t.relationships.length!==0){e.push(``),e.push(`**Joins:**`);for(let n of t.relationships)e.push(`- → \`${n.targetCube}\` (${n.relationship})`)}}function s(e,t){t.meta?.eventStream&&(e.push(``),e.push(`**Event Stream:** Yes (supports funnel, flow, retention queries)`),t.meta.eventStream.bindingKey&&e.push(`- Binding key: \`${t.name}.${t.meta.eventStream.bindingKey}\``),t.meta.eventStream.timeDimension&&e.push(`- Time dimension: \`${t.name}.${t.meta.eventStream.timeDimension}\``))}function c(e){if(e.length===0)return`No cubes are currently available.`;let t=[`## Available Cubes`,``];for(let n of e)t.push(`### ${n.name}`),n.description&&t.push(n.description),i(t,n),a(t,n),o(t,n),s(t,n),t.push(``);return t.join(`
|
|
3
3
|
`)}function l(e){return e.messages.map(e=>e.content.text).join(`
|
|
4
4
|
|
|
5
5
|
`)}function u(t){return[`# Drizzle Cube Analytics Agent`,``,`You are an analytics agent that helps users explore and visualize data.`,`You have access to a semantic layer with cubes (data models) that you can query.`,``,`## Your Workflow`,``,`For EACH insight, follow this cycle — do NOT batch all queries first:`,``,"1. **Discover** available cubes using `discover_cubes` (once at the start)",`2. **For each analysis point**, repeat this cycle:`," a. `execute_query` — get the data"," b. `add_markdown` — explain the results and insight"," c. `add_portlet` — visualize the results",``,`Call all three (query → markdown → portlet) in a single turn before moving on to the next analysis.`,`Do NOT run multiple queries first and add charts later — the user sees results in real-time.`,``,`## Important Guidelines`,``,`- ALWAYS discover cubes first before attempting queries`,"- Field names MUST be EXACTLY `CubeName.fieldName` — two parts separated by a single dot. Examples: `PullRequests.count`, `Teams.name`, `Employees.department`."," WRONG patterns that WILL FAIL: `Teams.Teams.name` (double-prefixed), `PullRequests.PullRequests.count` (double-prefixed), `PullRequests` (bare cube), `Teams_count` (underscore). Use the EXACT field names from discover results — copy them verbatim, do not prefix them again.",`- Order keys MUST be one of the measures or dimensions already listed in that query. You CANNOT order by a field that is not in measures or dimensions — add it to measures first, or remove it from order.`,"- After EVERY `execute_query`, IMMEDIATELY call `add_markdown` and `add_portlet` in the SAME turn — never defer visualizations to a later turn",`- Choose the chart type from the Chart Selection Guide below — match the chart to the question being asked, and vary chart types across the notebook`,`- If a query fails, explain the error and try an alternative approach`,``,`## Output Format Rules`,``,`### CRITICAL: Always think before acting`,`- EVERY single turn MUST begin with a text message (1-2 sentences) BEFORE any tool calls. This is your #1 rule — never violate it.`,`- This applies to EVERY turn, including turns where you are adding visualizations or explanations to the notebook.`,`- Even when adding multiple charts in sequence, each turn must start with a brief status like "Now I'll chart the productivity breakdown." or "Next, let me show the department comparison."`,`- Example good turn: "Let me see what data is available." → discover_cubes`,`- Example good turn: "I'll add a chart showing the top employees." → add_markdown → add_portlet`,`- Example bad turn: (no text) → add_portlet ← NEVER do this`,``,`### Text vs Notebook`,"- ALL analysis, findings, methodology, and insights MUST go through `add_markdown` tool calls — never in your text responses",`- Your text responses must be 1-2 short sentences (under 50 words) summarizing what you are about to do next — status updates only`,`- Never use markdown formatting (headers, bullets, bold, code blocks) in text responses — plain sentences only`,`- Write text responses as a friendly analyst would — use plain business language the user understands`,`- NEVER mention internal terms like "cube", "query syntax", "field names", "measures", "dimensions", "portlet", "prefix format", or tool names in text responses`,`- Instead of "Let me correct the query syntax and retry" → "Let me fix that and try again"`,`- Instead of "I'll query the PullRequests cube" → "I'll look at the pull request data"`,`- Instead of "Adding a portlet with the results" → "Here's a chart of the results"`,``,`### Notebook content rules`,"- Before each `add_portlet`, ALWAYS call `add_markdown` first to explain WHY you are adding this visualization and what it shows","- Before calling `add_portlet`, verify the query is valid: all fields in `order` must also appear in `measures` or `dimensions`",'- Never put data tables in markdown blocks — use `add_portlet` with chartType "table" instead',"- If a chart you already added is wrong, or the user asks to change one, call `update_portlet` with its id — do NOT add a second chart of the same data","- Think out loud in the notebook: use `add_markdown` to share your reasoning at each step so users can follow along",`- NEVER use emojis in text responses or markdown content — no 📊, 📈, ✅, 🔍, etc. Write in plain, professional language.`,``,`### Analysis Depth and Layout`,``,`- A good notebook answers the question and then earns its keep: aim for 4-6 distinct insights unless the user asked something narrow.`,`- Vary the angle, not just the chart: overall level → breakdown by a dimension → trend over time → outliers or concentration → a caveat about the data.`,`- Actively look for the surprising thing: the biggest mover, the outlier, the category carrying most of the total, the segment moving against the trend. Say so in the markdown, plainly.`,`- Never add a chart that restates the previous chart with a different chart type.`,`- Structure the notebook like a short report: a scene-setting markdown block, then alternating markdown/chart pairs, then a closing block with the takeaways and what you could NOT determine from the available data.`,`- If a result is boring — flat, evenly distributed, or too few rows to mean anything — say that in the markdown and move to a different angle rather than charting it.`,``,`## Chart Selection Guide`,``,`Pick the chart that answers the question, not the one that is easiest. Consider how many rows came back, whether the values are categorical or temporal, and whether the user is comparing, trending, or summarising. Do NOT default to the first option in this table.`,``,"`execute_query` returns a `dataShape` summary alongside the rows — use it. `distinctCount` on the dimension you are charting is the single most useful signal: 2-7 favours a part-of-whole treatment, 8-25 a ranking, and above that take a top-N with `order` + `limit` or show a table instead. Widely different `min`/`max` across measures means you need `yAxisAssignment`.",``,"Only the first rows are returned to you. When `truncated` is true the chart is still correct — the portlet re-runs the query itself — but do NOT state totals, counts or extremes you cannot see; use `rowCount` and `dataShape`, or run a narrower query.",``,`| Question the user is asking | Chart |`,`|---|---|`,"| Compare discrete categories or rankings | `bar` |","| Trend over time (one or few series) | `line` |","| Trend over time showing volume/magnitude | `area` |","| Part-of-whole breakdown | `pie` (2-7 slices) or `proportionBar` (one stacked bar, easier to read) |","| Contributions summing to a total, with signed ups and downs | `waterfall` (deltas only, never raw totals) |","| Long tail or nested breakdown, many categories | `treemap` |","| Categories as compact circular progress | `radialBar` |","| Correlation between two measures | `scatter` |","| Correlation with size/colour third dimension | `bubble` |","| Intensity across two categorical dimensions | `heatmap` (set `valueField`) |","| Activity per day across weeks or months | `activityGrid` (needs a `day`-granularity time dimension; set `dateField` and `valueField`) |","| Multi-variable comparison across categories | `radar` |","| Distribution/spread, summarised | `boxPlot` |","| Distribution/spread, every individual value | `dotStrip` |","| A shape across ordered measures (e.g. -2m, at event, +2h) | `measureProfile` (2+ measures on a comparable scale) |","| Detailed row-level data or many columns | `table` (aggregates) or `recordsTable` (one row per record) |","| Progress toward a known target or limit | `gauge` (ALWAYS set `maxValue`, or it scales to the data and reads as 100%) |","| Open/high/low/close price or range data | `candlestick` (put the measures in `yAxis` in OHLC order) |","| Narrative, caveats, methodology | `markdown` |","| Single headline number — ONLY when user explicitly asks for a KPI card or single number | `kpiNumber` |","| Headline metric with period-over-period change — ONLY when user asks about change in a single metric | `kpiDelta` |","| Headline number inside a sentence — same restraint as kpiNumber | `kpiText` |",``,`Analysis-mode-specific chart types (require the corresponding analysis mode):`,``,`| Analysis Mode | Chart Type | Description |`,`|---|---|---|`,"| Funnel | `funnel` | Sequential step conversion bars with conversion rates |","| Flow | `sankey` | Flow diagram showing paths between states/steps |","| Flow | `sunburst` | Radial rings showing forward paths from a starting event |","| Retention | `retentionHeatmap` | Cohort × period retention matrix |","| Retention | `retentionCombined` | Retention with line chart, heatmap, or combined modes |",``,"**Vary the chart types across a notebook.** A notebook of nothing but bars and tables is a failure even when every chart is individually valid. `kpiNumber`/`kpiDelta`/`kpiText` are a last resort — use them only when the user explicitly asks for a single headline number, never for a multi-row result.",``,'`recordsTable` lists one row per record, so its query MUST set `"ungrouped": true` — which also means one cube plus its to-one joins, since an ungrouped query cannot span a hasMany relationship.',``,`## Chart Axis Configuration Rules`,``,"**Bar charts need an xAxis dimension.** A bar chart over a measures-only query has no category axis to label its bars; if you send one it is converted to a `table` (or `kpiNumber` for a single measure) and you are told so. To get a real bar chart, put the category in the query's `dimensions` and use a single measure. To compare several measures as an ordered shape, use `measureProfile`.",``,"**Never duplicate xAxis in series.** Putting the same dimension in both `xAxis` and `series` creates a sparse, broken-looking chart. The `series` field is ONLY for splitting bars into grouped/stacked sub-series by a SECOND dimension.",``,`Correct bar chart examples:`,'- Categories only: `xAxis: ["Cube.category"], yAxis: ["Cube.count"]` — no series needed','- Grouped bars: `xAxis: ["Cube.category"], yAxis: ["Cube.count"], series: ["Cube.status"]` — series is a DIFFERENT dimension','- Multiple measures: `xAxis: ["Cube.category"], yAxis: ["Cube.count", "Cube.total"]` — each measure becomes a bar group',``,`Wrong:`,'- `xAxis: [], yAxis: ["Cube.avg1", "Cube.avg2"]` — missing xAxis, bars have no labels','- `xAxis: ["Cube.size"], series: ["Cube.size"]` — same field in both, creates sparse chart',``,"**Dual Y-axis for multi-measure charts.** When a `bar`, `line`, or `area` chart has 2+ measures with different scales (e.g. revenue in thousands vs conversion rate as a percentage), use `chartConfig.yAxisAssignment` to put them on separate axes:","```json",`{`,` "xAxis": ["Sales.month"],`,` "yAxis": ["Sales.revenue", "Sales.conversionRate"],`,` "yAxisAssignment": { "Sales.revenue": "left", "Sales.conversionRate": "right" }`,`}`,"```",`Only use dual axis when measures have genuinely different scales. If both measures share the same unit/scale, keep them on the same (left) axis — omit yAxisAssignment entirely.`,``,`## Analysis Mode Decision Tree`,``,`The default mode is **query** (standard measures/dimensions). Switch to a special mode only when the user's question matches:`,``,`- **Funnel mode** — "What is the conversion rate from step A → B → C?"`," - Requires: an event-stream cube with `capabilities.funnel = true` from `discover_cubes`"," - Execute: `execute_query` with `funnel` param:",' `{ bindingKey: "Events.userId", timeDimension: "Events.timestamp", steps: [{ name: "Signup", filter: { member: "Events.eventName", operator: "equals", values: ["signup"] }}, { name: "Purchase", filter: { member: "Events.eventName", operator: "equals", values: ["purchase"] }}] }`',' - Visualize: `add_portlet` with `chartType: "funnel"` and `query` as JSON string containing `{ "funnel": { ... } }`',``,`- **Flow mode** — "What paths do users take after signup?"`," - Requires: `capabilities.flow = true` from `discover_cubes`"," - Execute: `execute_query` with `flow` param:",' `{ bindingKey: "Events.userId", timeDimension: "Events.timestamp", eventDimension: "Events.eventName", startingStep: { name: "Signup", filter: { member: "Events.eventName", operator: "equals", values: ["signup"] }}, stepsBefore: 0, stepsAfter: 3 }`',' - Visualize: `add_portlet` with `chartType: "sankey"` (or `"sunburst"`) and `query` as JSON string containing `{ "flow": { ... } }`',``,`- **Retention mode** — "What % of users come back after 7 days?"`," - Requires: `capabilities.retention = true` from `discover_cubes`"," - Execute: `execute_query` with `retention` param:",' `{ timeDimension: "Events.timestamp", bindingKey: "Events.userId", dateRange: { start: "2024-01-01", end: "2024-03-31" }, granularity: "week", periods: 8, retentionType: "classic" }`',' - Visualize: `add_portlet` with `chartType: "retentionCombined"` (or `"retentionHeatmap"`) and `query` as JSON string containing `{ "retention": { ... } }`',``,"Before using funnel/flow/retention, check the `capabilities` object returned by `discover_cubes`. If the required capability is `false`, explain to the user that the data model does not support that analysis mode.",``,`Event-stream cubes are marked in the Available Cubes section below with **Event Stream: Yes** and list their binding key and time dimension.`,``,`---`,``,r,``,`---`,``,l(e._),``,`---`,``,l(e.g),``,`---`,``,`## Save as Dashboard`,``,"ONLY call `save_as_dashboard` when the user EXPLICITLY asks to save, export, or convert the notebook into a dashboard. NEVER save a dashboard on your own initiative — wait for the user to request it.",``,`### Layout Rules`,`- Dashboard grid is 12 columns wide`,`- KPI cards: w=3, h=3 — place at the top in a row of 4`,`- Overview charts (bar, line, area): w=6, h=4`,`- Wide charts (heatmap, table, recordsTable): w=12, h=5`,`- Section headers (markdown): w=12, h=1`,``,`### Section Headers`,'Use `chartType: "markdown"` portlets as section headers to organize the dashboard:',"```json",`{`,` "id": "header-overview",`,` "title": "Overview",`,` "chartType": "markdown",`,` "displayConfig": {`,` "content": "## Overview",`,` "hideHeader": true,`,` "transparentBackground": true,`,` "autoHeight": true`,` },`,` "w": 12, "h": 1, "x": 0, "y": 0`,`}`,"```",``,`### Dashboard Filters`,"- ALWAYS include a universal date filter with `isUniversalTime: true`",'- A universal date filter only reaches portlets through their `timeDimensions`. For KPI or breakdown portlets without a time dimension, map it as `{ filterId, member: "<Cube.timeField>" }` so it filters that field instead of leaving the portlet unfiltered',`- Add dimension filters for key fields used across portlets (e.g., department, status, region)`,`- Use human-readable labels (e.g., "Department" not "Employees.departmentName")`,"- Map filters to portlets using `dashboardFilterMapping` — list the filter IDs that apply","- To apply a filter to a different field for one portlet, use `{ filterId, member }` instead of a plain ID (e.g. remap a Customer filter to `Invoices.customerId`); the target field must be join-reachable from the portlet query",`- When promoting a hardcoded filter to a dashboard filter, REMOVE that filter from the portlet query`,``,`### Analysis Types`,'- Standard query portlets: `analysisType: "query"` (default)','- Funnel portlets: `analysisType: "funnel"`, query contains `{ "funnel": {...} }`, chartType `"funnel"`','- Flow portlets: `analysisType: "flow"`, query contains `{ "flow": {...} }`, chartType `"sankey"` or `"sunburst"`','- Retention portlets: `analysisType: "retention"`, query contains `{ "retention": {...} }`, chartType `"retentionHeatmap"` or `"retentionCombined"`',``,`### CRITICAL: Only use portlets from the notebook`,"- ONLY include portlets that you already added to the notebook via `add_portlet` during this conversation",`- Do NOT invent new queries or charts that were not part of the analysis — the dashboard is a direct conversion of the notebook`,`- Reuse the exact same queries, chart types, and chart configs from the notebook portlets`,`- Arrange the existing portlets in a sensible layout (KPIs at top, charts in middle, tables at bottom)`,`- You may add section header markdown portlets to organize the layout, but do not add new data portlets`,``,`---`,``,c(t)].join(`
|
|
6
|
-
`)}var d={clickableElements:{bar:!0},dropZones:[{key:`xAxis`,label:`chart.dropZone.xAxis.label`,description:`chart.dropZone.xAxis.description`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.bar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dropZone.yAxis.label`,description:`chart.configText.measures_for_bar_heights`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.bar.dropZone.yAxis.empty`,enableDualAxis:!0},{key:`series`,label:`chart.dropZone.series.label`,description:`chart.dropZone.series.description`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.bar.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`showAllXLabels`,`hideHeader`],displayOptionsConfig:[n.u(`chart.configText.how_to_stack_multiple_bar_series`),n.d,n.n,n.i,n.s]},f={clickableElements:{point:!0},dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_time_categories`,description:`chart.configText.time_dimensions_or_dimensions_for_x_axis`,mandatory:!0,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.line.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dropZone.yAxis.label`,description:`chart.configText.measures_for_line_values`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.line.dropZone.yAxis.empty`,enableDualAxis:!0},{key:`series`,label:`chart.configText.series_multiple_lines`,description:`chart.configText.dimensions_to_create_separate_lines`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.line.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`showAllXLabels`,`hideHeader`],displayOptionsConfig:[n.l,n.c(),n.t,n.n,n.d,{key:`priorPeriodStyle`,label:`chart.option.priorPeriodStyle.label`,type:`select`,defaultValue:`dashed`,options:[{value:`dashed`,label:`chart.option.priorPeriodStyle.dashed`},{value:`dotted`,label:`chart.option.priorPeriodStyle.dotted`},{value:`solid`,label:`chart.option.priorPeriodStyle.solid`}],description:`chart.option.priorPeriodStyle.description`},{key:`priorPeriodOpacity`,label:`chart.option.priorPeriodOpacity.label`,type:`number`,defaultValue:.5,min:.1,max:1,step:.1,description:`chart.option.priorPeriodOpacity.description`},n.i,n.s]},p={dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_time_categories`,description:`chart.configText.time_dimensions_or_dimensions_for_x_axis`,mandatory:!0,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.area.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dropZone.yAxis.label`,description:`chart.configText.measures_for_area_values`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.area.dropZone.yAxis.empty`,enableDualAxis:!0},{key:`series`,label:`chart.configText.series_stack_areas`,description:`chart.configText.dimensions_to_create_stacked_areas`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.area.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`showAllXLabels`,`hideHeader`],displayOptionsConfig:[n.l,n.c(!1),n.u(`chart.configText.how_to_stack_multiple_area_series`),n.t,n.n,n.d,n.i,n.s]},m={clickableElements:{slice:!0},dropZones:[{key:`xAxis`,label:`chart.configText.categories`,description:`chart.configText.dimension_for_pie_slices`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.pie.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.values`,description:`chart.configText.measure_for_slice_sizes`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.pie.dropZone.yAxis.empty`}],displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],displayOptionsConfig:[{key:`innerRadius`,label:`chart.option.innerRadius.label`,type:`select`,description:`chart.configText.hollow_center_size_0_percent_solid_pie_higher_donut_style`,defaultValue:`0%`,options:[{value:`0%`,label:`chart.configText.none_pie`},{value:`20%`,label:`chart.configText.20_percent`},{value:`40%`,label:`chart.configText.40_percent`},{value:`60%`,label:`chart.configText.60_percent`},{value:`80%`,label:`chart.configText.80_percent`}]},n.f()]},h={dropZones:[{key:`xAxis`,label:`chart.runtime.axisFormat.xAxis`,description:`chart.configText.measure_or_dimension_for_x_position`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.scatter.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis`,description:`chart.configText.measure_for_y_position`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.scatter.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.series_color_groups`,description:`chart.configText.dimension_to_color_points_by_category`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.scatter.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`hideHeader`],displayOptionsConfig:[{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.option.xAxisFormat.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.option.yAxisFormat.description`}]},g={dropZones:[{key:`xAxis`,label:`chart.runtime.axisFormat.xAxis`,description:`chart.configText.horizontal_axis_position`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.bubble.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis`,description:`chart.configText.vertical_axis_position`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.bubble.dropZone.yAxis.empty`},{key:`sizeField`,label:`chart.configText.bubble_radius`,description:`chart.configText.size_of_bubbles_based_on_this_measure`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.bubble.dropZone.sizeField.empty`},{key:`series`,label:`chart.configText.bubble_labels`,description:`chart.configText.field_to_use_for_bubble_labels_and_identification`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.bubble.dropZone.series.empty`},{key:`colorField`,label:`chart.configText.bubble_colour`,description:`chart.configText.color_bubbles_by_this_field_optional`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`,`measure`],emptyText:`chart.bubble.dropZone.colorField.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`minBubbleSize`,`maxBubbleSize`,`bubbleOpacity`,`hideHeader`],displayOptionsConfig:[{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.option.xAxisFormat.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_y_axis_and_values`}]},_={dropZones:[{key:`xAxis`,label:`chart.configText.axes_categories`,description:`chart.configText.dimensions_for_radar_axes`,mandatory:!0,acceptTypes:[`dimension`],emptyText:`chart.radar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.values`,description:`chart.configText.measures_for_radar_values`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.radar.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.series_multiple_shapes`,description:`chart.configText.dimensions_to_create_multiple_radar_shapes`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.radar.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`hideHeader`],displayOptionsConfig:[n.f()]},v={dropZones:[{key:`xAxis`,label:`chart.configText.categories`,description:`chart.configText.dimensions_for_radial_segments`,mandatory:!0,acceptTypes:[`dimension`],emptyText:`chart.radialBar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.values`,description:`chart.configText.measures_for_radial_bar_lengths`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.radialBar.dropZone.yAxis.empty`}],displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],displayOptionsConfig:[n.f()]},y={dropZones:[{key:`xAxis`,label:`chart.configText.categories`,description:`chart.configText.dimensions_for_treemap_rectangles`,mandatory:!0,acceptTypes:[`dimension`],emptyText:`chart.treemap.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.size`,description:`chart.configText.measure_for_rectangle_sizes`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.treemap.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.color_groups`,description:`chart.configText.dimension_to_color_rectangles_by_category`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.treemap.dropZone.series.empty`}],displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],displayOptionsConfig:[n.f(`chart.configText.number_formatting_for_size_values`)],clickableElements:{cell:!0}},b={dropZones:[{key:`xAxis`,label:`chart.configText.columns`,description:`chart.configText.all_fields_to_display_as_columns`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.table.dropZone.xAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`leftYAxisFormat`,label:`chart.option.valueFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_numeric_values`}]},x={dropZones:[{key:`columns`,label:`chart.recordsTable.dropZone.columns.label`,description:`chart.recordsTable.dropZone.columns.description`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.recordsTable.dropZone.columns.empty`},{key:`hiddenColumns`,label:`chart.recordsTable.dropZone.hiddenColumns.label`,description:`chart.recordsTable.dropZone.hiddenColumns.description`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.recordsTable.dropZone.hiddenColumns.empty`,excludeFromInference:!0}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`columnFormats`,label:`chart.recordsTable.option.columnFormats.label`,type:`columnFormats`,description:`chart.recordsTable.option.columnFormats.description`},{key:`rowLink`,label:`chart.recordsTable.option.rowLink.label`,type:`rowLink`,description:`chart.recordsTable.option.rowLink.description`},{key:`pageSize`,label:`chart.recordsTable.option.pageSize.label`,type:`select`,defaultValue:25,description:`chart.recordsTable.option.pageSize.description`,options:[{value:25,label:`chart.recordsTable.option.pageSize.option.25`},{value:50,label:`chart.recordsTable.option.pageSize.option.50`},{value:100,label:`chart.recordsTable.option.pageSize.option.100`}]}],clickableElements:{row:!0},recordGrain:!0},S={dropZones:[{key:`dateField`,label:`chart.configText.time_dimension`,description:`chart.configText.time_field_that_determines_grid_structure_granularity_affects_layout`,mandatory:!0,maxItems:1,acceptTypes:[`timeDimension`],emptyText:`chart.activityGrid.dropZone.dateField.empty`},{key:`valueField`,label:`chart.configText.activity_measure`,description:`chart.configText.measure_used_for_activity_intensity_color_coding`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.activityGrid.dropZone.valueField.empty`}],displayOptions:[`showLabels`,`showTooltip`,`hideHeader`],displayOptionsConfig:[{key:`fitToWidth`,label:`chart.option.fitToWidth.label`,type:`boolean`,defaultValue:!1,description:`chart.option.fitToWidth.description`}],validate:e=>{let{dateField:t,valueField:n}=e;return!t||Array.isArray(t)&&t.length===0?{isValid:!1,message:`chart.activityGrid.validation.timeDimensionRequired`}:!n||Array.isArray(n)&&n.length===0?{isValid:!1,message:`chart.activityGrid.validation.measureRequired`}:{isValid:!0}},clickableElements:{cell:!0}},C={dropZones:[{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_to_display_as_kpi_number`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.kpiNumber.dropZone.yAxis.empty`}],displayOptionsConfig:[n.r,{key:`target`,label:`chart.runtime.tooltip.targetValue`,type:`string`,placeholder:`e.g., 100`,description:`chart.configText.target_value_to_compare_against_first_value_used_if_multiple_provided`},{key:`prefix`,label:`chart.option.prefix.label`,type:`string`,placeholder:`e.g., $, €, #`,description:`chart.option.prefix.description`},{key:`suffix`,label:`chart.option.suffix.label`,type:`string`,placeholder:`e.g., %, units, items`,description:`chart.option.suffix.description`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:0,min:0,max:10,step:1,description:`chart.option.decimals.description`},{key:`valueColorIndex`,label:`chart.configText.value_color`,type:`paletteColor`,defaultValue:0,description:`chart.configText.color_from_the_dashboard_palette_for_the_kpi_value_text`},{key:`useLastCompletePeriod`,label:`chart.option.useLastCompletePeriod.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.exclude_current_incomplete_period_from_aggregation_e_g_partial_week_mont`},{key:`skipLastPeriod`,label:`chart.option.skipLastPeriod.label`,type:`boolean`,defaultValue:!1,description:`chart.option.skipLastPeriod.description`}],displayOptions:[`hideHeader`]},w={dropZones:[{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_to_track_changes_for`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.kpiDelta.dropZone.yAxis.empty`},{key:`xAxis`,label:`chart.configText.dimension_optional`,description:`chart.configText.dimension_for_ordering_data_typically_time`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.kpiDelta.dropZone.xAxis.empty`}],displayOptionsConfig:[n.r,{key:`showBaseline`,label:`chart.option.showBaseline.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showBaseline.description`},{key:`prefix`,label:`chart.option.prefix.label`,type:`string`,placeholder:`e.g., $, €, #`,description:`chart.option.prefix.description`},{key:`suffix`,label:`chart.option.suffix.label`,type:`string`,placeholder:`e.g., %, units, items`,description:`chart.option.suffix.description`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:1,min:0,max:10,step:1,description:`chart.option.decimals.description`},{key:`positiveColorIndex`,label:`chart.configText.positive_change_color`,type:`paletteColor`,defaultValue:2,description:`chart.configText.color_for_positive_changes_increases`},{key:`negativeColorIndex`,label:`chart.configText.negative_change_color`,type:`paletteColor`,defaultValue:3,description:`chart.configText.color_for_negative_changes_decreases`},{key:`showHistogram`,label:`chart.option.showHistogram.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showHistogram.description`},{key:`useLastCompletePeriod`,label:`chart.option.useLastCompletePeriod.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.exclude_current_incomplete_period_from_delta_calculation_e_g_partial_wee`},{key:`skipLastPeriod`,label:`chart.option.skipLastPeriod.label`,type:`boolean`,defaultValue:!1,description:`chart.option.skipLastPeriod.description`}],displayOptions:[`hideHeader`],validate:e=>!e.yAxis||Array.isArray(e.yAxis)&&e.yAxis.length===0?{isValid:!1,message:`chart.kpiDelta.validation.measureRequired`}:{isValid:!0}},T={dropZones:[{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_to_display_in_the_kpi_text_template`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.kpiText.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`template`,label:`chart.configText.text_template`,type:`string`,placeholder:"e.g., Total Revenue: ${value}",description:`chart.configText.template_for_displaying_the_text_use_value_to_insert_the_measure_value`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:0,min:0,max:10,step:1,description:`chart.configText.number_of_decimal_places_to_display_for_numeric_values`},{key:`valueColorIndex`,label:`chart.configText.value_color`,type:`paletteColor`,defaultValue:0,description:`chart.configText.color_from_the_dashboard_palette_for_the_kpi_value_text`}],displayOptions:[`hideHeader`]},E={skipQuery:!0,dropZones:[],displayOptionsConfig:[{key:`content`,label:`chart.configText.markdown_content`,type:`string`,placement:`chart`,rows:18,syntax:`markdownTemplate`,placeholder:`chart.markdown.contentPlaceholder`,description:`chart.markdown.contentDescription`,docsUrl:`https://knap.md/variables`,docsLabel:`chart.markdown.contentDocsLabel`},{key:`accentColorIndex`,label:`chart.configText.accent_color`,type:`paletteColor`,defaultValue:0,description:`chart.configText.color_from_the_dashboard_palette_for_headers_bullets_and_links`},{key:`fontSize`,label:`chart.option.fontSize.label`,type:`select`,defaultValue:`medium`,options:[{value:`small`,label:`chart.option.fontSize.small`},{value:`medium`,label:`chart.option.fontSize.medium`},{value:`large`,label:`chart.option.fontSize.large`}],description:`chart.configText.overall_text_size_for_the_markdown_content`},{key:`alignment`,label:`chart.option.alignment.label`,type:`select`,defaultValue:`left`,options:[{value:`left`,label:`chart.option.accentBorder.left`},{value:`center`,label:`chart.option.alignment.center`},{value:`right`,label:`chart.option.alignment.right`}],description:`chart.configText.horizontal_alignment_of_the_markdown_content`},{key:`hideHeader`,label:`chart.option.hideHeader.label`,type:`boolean`,defaultValue:!0,description:`chart.option.hideHeader.description`},{key:`transparentBackground`,label:`chart.option.transparentBackground.label`,type:`boolean`,defaultValue:!1,description:`chart.option.transparentBackground.description`},{key:`autoHeight`,label:`chart.option.autoHeight.label`,type:`boolean`,defaultValue:!0,description:`chart.option.autoHeight.description`},{key:`accentBorder`,label:`chart.option.accentBorder.label`,type:`select`,defaultValue:`none`,options:[{value:`none`,label:`chart.option.accentBorder.none`},{value:`left`,label:`chart.option.accentBorder.left`},{value:`top`,label:`chart.option.accentBorder.top`},{value:`bottom`,label:`chart.option.accentBorder.bottom`}],description:`chart.configText.add_an_accent_colored_border_on_one_side_of_the_content`}]},D={dropZones:[{key:`xAxis`,label:`chart.configText.step_name`,description:`chart.configText.step_names_auto_populated_from_funnel_steps`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.funnel.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.step_count`,description:`chart.configText.count_at_each_step_auto_calculated`,mandatory:!1,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.funnel.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`funnelStyle`,label:`chart.option.funnelStyle.label`,type:`buttonGroup`,defaultValue:`bars`,options:[{value:`bars`,label:`chart.option.funnelStyle.bars`},{value:`funnel`,label:`chart.option.funnelStyle.funnel`}],description:`chart.configText.visualization_style`},{key:`funnelOrientation`,label:`chart.option.funnelOrientation.label`,type:`buttonGroup`,defaultValue:`horizontal`,options:[{value:`horizontal`,label:`chart.option.funnelOrientation.horizontal`},{value:`vertical`,label:`chart.option.funnelOrientation.vertical`}]},{key:`hideSummaryFooter`,label:`chart.option.hideSummaryFooter.label`,type:`boolean`,defaultValue:!1,description:`chart.option.hideSummaryFooter.description`},{key:`showFunnelConversion`,label:`chart.option.showConversion.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showConversion.description`},{key:`showFunnelAvgTime`,label:`chart.option.showAvgTime.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showAvgTime.description`},{key:`showFunnelMedianTime`,label:`chart.option.showMedianTime.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showMedianTime.description`},{key:`showFunnelP90Time`,label:`chart.option.showP90Time.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showP90Time.description`}]},O={dropZones:[{key:`xAxis`,label:`chart.configText.event_type`,description:`chart.configText.event_dimension_that_categorizes_flow_nodes`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.sankey.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.flow_count`,description:`chart.configText.count_of_entities_following_each_path`,mandatory:!1,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.sankey.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`linkOpacity`,label:`chart.option.linkOpacity.label`,type:`buttonGroup`,defaultValue:`0.5`,options:[{value:`0.3`,label:`chart.option.linkOpacity.light`},{value:`0.5`,label:`chart.option.fontSize.medium`},{value:`0.7`,label:`chart.option.linkOpacity.dark`}],description:`chart.configText.opacity_of_flow_links`},{key:`showNodeLabels`,label:`chart.option.showNodeLabels.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showNodeLabels.description`},{key:`hideSummaryFooter`,label:`chart.option.hideSummaryFooter.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.hide_the_statistics_footer_below_the_chart`}]},ee={dropZones:[{key:`xAxis`,label:`chart.configText.event_type`,description:`chart.configText.event_dimension_that_categorizes_flow_nodes`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.sunburst.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.flow_count`,description:`chart.configText.count_of_entities_following_each_path`,mandatory:!1,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.sunburst.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`innerRadius`,label:`chart.option.innerRadius.label`,type:`number`,defaultValue:40,min:0,max:100,step:10,description:`chart.configText.size_of_the_center_hole_0_for_full_circle`},{key:`hideSummaryFooter`,label:`chart.option.hideSummaryFooter.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.hide_the_statistics_footer_below_the_chart`}]},te={dropZones:[{key:`xAxis`,label:`chart.configText.columns_x_axis`,description:`chart.configText.dimension_for_column_categories`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.heatmap.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.rows_y_axis`,description:`chart.configText.dimension_for_row_categories`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.heatmap.dropZone.yAxis.empty`},{key:`valueField`,label:`chart.configText.value_color_intensity`,description:`chart.configText.measure_that_determines_cell_color`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.heatmap.dropZone.valueField.empty`}],displayOptions:[`showLegend`,`showTooltip`],displayOptionsConfig:[{key:`showLabels`,label:`chart.option.showLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showLabels.description`},{key:`cellShape`,label:`chart.option.cellShape.label`,type:`select`,defaultValue:`rect`,options:[{value:`rect`,label:`chart.option.cellShape.rectangle`},{value:`circle`,label:`chart.option.cellShape.circle`}]},{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_x_axis_labels`},{key:`yAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_y_axis_labels`},{key:`valueFormat`,label:`chart.option.valueFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_cell_values_and_legend`}],validate:e=>e.xAxis?.length?e.yAxis?.length?e.valueField?.length?{isValid:!0}:{isValid:!1,message:`chart.heatmap.validation.valueRequired`}:{isValid:!1,message:`chart.heatmap.validation.yAxisRequired`}:{isValid:!1,message:`chart.heatmap.validation.xAxisRequired`}},ne={dropZones:[],displayOptionsConfig:[{key:`showLegend`,label:`chart.option.showLegend.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.show_the_color_intensity_legend`},{key:`showTooltip`,label:`chart.option.showTooltip.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showTooltip.description`}]},k={dropZones:[],displayOptionsConfig:[{key:`retentionDisplayMode`,label:`chart.option.retentionDisplayMode.label`,type:`select`,defaultValue:`line`,options:[{value:`line`,label:`chart.option.retentionDisplayMode.lineChart`},{value:`heatmap`,label:`chart.option.retentionDisplayMode.heatmapTable`},{value:`combined`,label:`chart.option.retentionDisplayMode.combined`}],description:`chart.configText.choose_how_to_visualize_retention_data`},{key:`showLegend`,label:`chart.option.showLegend.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.show_the_legend_for_breakdown_segments`},{key:`showGrid`,label:`chart.option.showGrid.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showGrid.description`},{key:`showTooltip`,label:`chart.option.showTooltip.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showTooltip.description`}]},A={displayOptions:[`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_groups`,description:`chart.configText.dimension_to_group_boxes_by_e_g_symbol_platform`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.boxPlot.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis_measures`,description:`chart.configText.drop_1_measure_for_auto_mode_3_for_avg_stddev_median_mode_or_5_for_min_q`,mandatory:!0,maxItems:5,acceptTypes:[`measure`],emptyText:`chart.boxPlot.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_value_axis`}]},j={displayOptions:[`showGrid`,`showTooltip`,`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.dotStrip.dropZone.xAxis.label`,description:`chart.dotStrip.dropZone.xAxis.description`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.dotStrip.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dotStrip.dropZone.yAxis.label`,description:`chart.dotStrip.dropZone.yAxis.description`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.dotStrip.dropZone.yAxis.empty`},{key:`series`,label:`chart.dotStrip.dropZone.series.label`,description:`chart.dotStrip.dropZone.series.description`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.dotStrip.dropZone.series.empty`}],clickableElements:{point:!0},displayOptionsConfig:[{key:`showMedianMarker`,label:`chart.option.showMedianMarker.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showMedianMarker.description`},{key:`showBandStats`,label:`chart.option.showBandStats.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showBandStats.description`},{key:`showExtremeLabels`,label:`chart.option.showExtremeLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showExtremeLabels.description`},{key:`dotSize`,label:`chart.option.dotSize.label`,type:`select`,defaultValue:`medium`,options:[{value:`small`,label:`chart.option.dotSize.small`},{value:`medium`,label:`chart.option.dotSize.medium`},{value:`large`,label:`chart.option.dotSize.large`}],description:`chart.option.dotSize.description`},{key:`bandSort`,label:`chart.option.bandSort.label`,type:`select`,defaultValue:`none`,options:[{value:`none`,label:`chart.option.bandSort.none`},{value:`valueDesc`,label:`chart.option.bandSort.valueDesc`},{value:`valueAsc`,label:`chart.option.bandSort.valueAsc`},{value:`count`,label:`chart.option.bandSort.count`}],description:`chart.option.bandSort.description`},{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.option.xAxisFormat.description`}]},M={clickableElements:{bar:!0},displayOptions:[`showTooltip`,`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.dropZone.xAxis.label`,description:`chart.configText.dimension_labels_for_each_bar_segment_e_g_symbol_transaction_type`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.waterfall.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis_value`,description:`chart.configText.single_measure_whose_values_are_summed_cumulatively`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.waterfall.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`showTotal`,label:`chart.option.showTotal.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showTotal.description`},{key:`showConnectorLine`,label:`chart.option.showConnectorLine.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showConnectorLine.description`},{key:`showDataLabels`,label:`chart.option.showDataLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.configText.display_the_value_above_each_bar_segment`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_y_axis`}]},N={clickableElements:{bar:!0},displayOptions:[`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_time_category`,description:`chart.configText.time_dimension_or_category_for_each_candle_e_g_date_symbol`,mandatory:!0,maxItems:1,acceptTypes:[`timeDimension`,`dimension`],emptyText:`chart.candlestick.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.ohlc_measures_open_close_high_low`,description:`chart.configText.drop_2_4_measures_in_order_open_close_high_low_ohlc_mode_for_range_mode_`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.candlestick.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`rangeMode`,label:`chart.option.rangeMode.label`,type:`select`,defaultValue:`ohlc`,options:[{value:`ohlc`,label:`chart.option.rangeMode.ohlc`},{value:`range`,label:`chart.option.rangeMode.range`}],description:`chart.option.rangeMode.description`},{key:`bullColor`,label:`chart.option.bullColor.label`,type:`color`,defaultValue:`#22c55e`,description:`chart.option.bullColor.description`},{key:`bearColor`,label:`chart.option.bearColor.label`,type:`color`,defaultValue:`#ef4444`,description:`chart.option.bearColor.description`},{key:`showWicks`,label:`chart.option.showWicks.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showWicks.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_price_axis`}]},P={displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],dropZones:[{key:`yAxis`,label:`chart.configText.measures_x_axis_order`,description:`chart.configText.add_2_or_more_measures_they_become_the_x_axis_categories_in_the_order_li`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.measureProfile.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.series_split_into_multiple_lines`,description:`chart.configText.dimension_to_split_data_into_separate_profile_lines_e_g_symbol_platform`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.measureProfile.dropZone.series.empty`}],displayOptionsConfig:[{key:`showReferenceLineAtZero`,label:`chart.option.showReferenceLineAtZero.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showReferenceLineAtZero.description`},{key:`showDataLabels`,label:`chart.option.showDataLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.configText.display_value_at_each_data_point`},{key:`showLegend`,label:`chart.option.showLegend.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.show_series_legend_only_visible_with_a_series_dimension`},{key:`lineType`,label:`chart.option.lineType.label`,type:`select`,defaultValue:`monotone`,options:[{value:`monotone`,label:`chart.option.lineType.smooth`},{value:`linear`,label:`chart.option.lineType.linear`},{value:`step`,label:`chart.option.lineType.step`}],description:`chart.option.lineType.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_y_axis`}]},F={dropZones:[{key:`xAxis`,label:`chart.configText.category`,description:`chart.configText.dimension_to_split_the_bar_into_segments`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.proportionBar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_that_determines_each_segments_share`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.proportionBar.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`showLabels`,label:`chart.option.proportionBarLabels.label`,type:`boolean`,defaultValue:!0,description:`chart.option.proportionBarLabels.description`},{key:`showPercentages`,label:`chart.option.showPercentages.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showPercentages.description`},{key:`sortSegments`,label:`chart.option.sortSegments.label`,type:`boolean`,defaultValue:!1,description:`chart.option.sortSegments.description`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:0,min:0,max:2,description:`chart.option.proportionBarDecimals.description`}],validate:e=>!e?.xAxis||Array.isArray(e.xAxis)&&e.xAxis.length===0?{isValid:!1,message:`chart.proportionBar.validation.dimensionRequired`}:!e?.yAxis||Array.isArray(e.yAxis)&&e.yAxis.length===0?{isValid:!1,message:`chart.proportionBar.validation.measureRequired`}:{isValid:!0}},I={clickableElements:{},displayOptions:[`hideHeader`],dropZones:[{key:`yAxis`,label:`chart.configText.value_measure`,description:`chart.configText.current_value_to_display_on_the_gauge_e_g_current_equity_margin_used`,mandatory:!0,maxItems:2,acceptTypes:[`measure`],emptyText:`chart.gauge.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`minValue`,label:`chart.option.minValue.label`,type:`number`,defaultValue:0,description:`chart.option.minValue.description`},{key:`maxValue`,label:`chart.option.maxValue.label`,type:`number`,description:`chart.option.maxValue.description`},{key:`thresholds`,label:`chart.configText.threshold_bands`,type:`thresholdBands`,description:`chart.gauge.thresholds.description`},{key:`showCenterLabel`,label:`chart.option.showCentreLabel.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showCentreLabel.description`},{key:`showPercentage`,label:`chart.option.showPercentage.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showPercentage.description`},{key:`leftYAxisFormat`,label:`chart.option.valueFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_displayed_value_and_axis_labels`}]},L={packageName:`recharts`,installCommand:`npm install recharts`},R={bar:{label:`chart.bar.label`,icon:`chartBar`,description:`chart.bar.description`,useCase:`chart.bar.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./BarChart.config-4SX44IYv.cjs"))).barChartConfig},line:{label:`chart.line.label`,icon:`chartLine`,description:`chart.line.description`,useCase:`chart.line.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./LineChart.config-DPq7GvL9.cjs"))).lineChartConfig},area:{label:`chart.area.label`,icon:`chartArea`,description:`chart.area.description`,useCase:`chart.area.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./AreaChart.config-DYf9wufo.cjs"))).areaChartConfig},pie:{label:`chart.pie.label`,icon:`chartPie`,description:`chart.pie.description`,useCase:`chart.pie.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./PieChart.config-joJcF--K.cjs"))).pieChartConfig},scatter:{label:`chart.scatter.label`,icon:`chartScatter`,description:`chart.scatter.description`,useCase:`chart.scatter.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<1?{available:!1,reason:`chart.availability.requiresMeasure`}:e<2&&t<1?{available:!1,reason:`chart.availability.scatter`}:{available:!0},dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./ScatterChart.config-CwN9niUL.cjs"))).scatterChartConfig},bubble:{label:`chart.bubble.label`,icon:`chartBubble`,description:`chart.bubble.description`,useCase:`chart.bubble.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<2?{available:!1,reason:`chart.availability.requiresTwoMeasures`}:t<1?{available:!1,reason:`chart.availability.bubble`}:{available:!0},dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./BubbleChart.config-CBT5jMdc.cjs"))).bubbleChartConfig},radar:{label:`chart.radar.label`,icon:`chartRadar`,description:`chart.radar.description`,useCase:`chart.radar.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./RadarChart.config-DVCCLSVw.cjs"))).radarChartConfig},radialBar:{label:`chart.radialBar.label`,icon:`chartRadialBar`,description:`chart.radialBar.description`,useCase:`chart.radialBar.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./RadialBarChart.config-BZwyWhTg.cjs"))).radialBarChartConfig},treemap:{label:`chart.treemap.label`,icon:`chartTreemap`,description:`chart.treemap.description`,useCase:`chart.treemap.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./TreeMapChart.config-B2Yn_V7p.cjs"))).treemapChartConfig},table:{label:`chart.table.label`,icon:`chartTable`,description:`chart.table.description`,useCase:`chart.table.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./DataTable.config-D_NsMeyz.cjs"))).dataTableConfig},recordsTable:{label:`chart.recordsTable.label`,icon:`chartRecordsTable`,description:`chart.recordsTable.description`,useCase:`chart.recordsTable.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./RecordsTable.config-DPdO0DL5.cjs"))).recordsTableConfig},activityGrid:{label:`chart.activityGrid.label`,icon:`chartActivityGrid`,description:`chart.activityGrid.description`,useCase:`chart.activityGrid.useCase`,isAvailable:({measureCount:e,timeDimensionCount:t})=>e<1?{available:!1,reason:`chart.availability.requiresMeasure`}:t<1?{available:!1,reason:`chart.availability.requiresTimeDimension`}:{available:!0},config:async()=>(await Promise.resolve().then(()=>require("./ActivityGridChart.config-h1AXPvn0.cjs"))).activityGridChartConfig},kpiNumber:{label:`chart.kpiNumber.label`,icon:`chartKpiNumber`,description:`chart.kpiNumber.description`,useCase:`chart.kpiNumber.useCase`,isAvailable:n.a,config:async()=>(await Promise.resolve().then(()=>require("./KpiNumber.config-6YLEF2fy.cjs"))).kpiNumberConfig},kpiDelta:{label:`chart.kpiDelta.label`,icon:`chartKpiDelta`,description:`chart.kpiDelta.description`,useCase:`chart.kpiDelta.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./KpiDelta.config-CKr9pAxL.cjs"))).kpiDeltaConfig},kpiText:{label:`chart.kpiText.label`,icon:`chartKpiText`,description:`chart.kpiText.description`,useCase:`chart.kpiText.useCase`,isAvailable:n.a,config:async()=>(await Promise.resolve().then(()=>require("./KpiText.config-C8Av_D2W.cjs"))).kpiTextConfig},markdown:{label:`chart.markdown.label`,icon:`chartMarkdown`,description:`chart.markdown.description`,useCase:`chart.markdown.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./MarkdownChart.config-ca_UyhWJ.cjs"))).markdownConfig},funnel:{label:`chart.funnel.label`,icon:`chartFunnel`,description:`chart.funnel.description`,useCase:`chart.funnel.useCase`,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./FunnelChart.config-BT5up_Bg.cjs"))).funnelChartConfig},sankey:{label:`chart.sankey.label`,icon:`chartSankey`,description:`chart.sankey.description`,useCase:`chart.sankey.useCase`,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./SankeyChart.config-BkIyUcAE.cjs"))).sankeyChartConfig},sunburst:{label:`chart.sunburst.label`,icon:`chartSunburst`,description:`chart.sunburst.description`,useCase:`chart.sunburst.useCase`,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./SunburstChart.config-D0ZkRSJv.cjs"))).sunburstChartConfig},heatmap:{label:`chart.heatmap.label`,icon:`chartHeatmap`,description:`chart.heatmap.description`,useCase:`chart.heatmap.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<1?{available:!1,reason:`chart.availability.requiresMeasure`}:t<2?{available:!1,reason:`chart.availability.requiresTwoDimensions`}:{available:!0},dependencies:{packageName:`@nivo/heatmap`,installCommand:`npm install @nivo/heatmap`},config:async()=>(await Promise.resolve().then(()=>require("./HeatMapChart.config-Bmca8KiH.cjs"))).heatmapChartConfig},retentionHeatmap:{label:`chart.retentionHeatmap.label`,icon:`chartRetention`,description:`chart.retentionHeatmap.description`,useCase:`chart.retentionHeatmap.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./RetentionHeatmap.config-Cub3-ksy.cjs"))).retentionHeatmapConfig},retentionCombined:{label:`chart.retentionCombined.label`,icon:`chartRetention`,description:`chart.retentionCombined.description`,useCase:`chart.retentionCombined.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./RetentionCombinedChart.config-mX5PMh82.cjs"))).retentionCombinedConfig},boxPlot:{label:`chart.boxPlot.label`,icon:`chartBoxPlot`,description:`chart.boxPlot.description`,useCase:`chart.boxPlot.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./BoxPlotChart.config-BzNe-FlW.cjs"))).boxPlotChartConfig},dotStrip:{label:`chart.dotStrip.label`,icon:`chartDotStrip`,description:`chart.dotStrip.description`,useCase:`chart.dotStrip.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./DotStripChart.config-BApWn6QV.cjs"))).dotStripChartConfig},waterfall:{label:`chart.waterfall.label`,icon:`chartWaterfall`,description:`chart.waterfall.description`,useCase:`chart.waterfall.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./WaterfallChart.config-B10PxftT.cjs"))).waterfallChartConfig},candlestick:{label:`chart.candlestick.label`,icon:`chartCandlestick`,description:`chart.candlestick.description`,useCase:`chart.candlestick.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<2?{available:!1,reason:`chart.availability.requiresTwoMeasures`}:t<1?{available:!1,reason:`chart.availability.requiresDimension`}:{available:!0},config:async()=>(await Promise.resolve().then(()=>require("./CandlestickChart.config-DPSSlzUD.cjs"))).candlestickChartConfig},measureProfile:{label:`chart.measureProfile.label`,icon:`chartMeasureProfile`,description:`chart.measureProfile.description`,useCase:`chart.measureProfile.useCase`,isAvailable:({measureCount:e})=>e<2?{available:!1,reason:`chart.availability.requiresTwoMeasures`}:{available:!0},dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./MeasureProfileChart.config-C1Il0IqL.cjs"))).measureProfileChartConfig},proportionBar:{label:`chart.proportionBar.label`,icon:`chartProportionBar`,description:`chart.proportionBar.description`,useCase:`chart.proportionBar.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./ProportionBarChart.config-B2sltKsI.cjs"))).proportionBarChartConfig},gauge:{label:`chart.gauge.label`,icon:`chartGauge`,description:`chart.gauge.description`,useCase:`chart.gauge.useCase`,isAvailable:n.a,dependencies:{packageName:`d3-shape`,installCommand:`npm install d3-shape`},config:async()=>(await Promise.resolve().then(()=>require("./GaugeChart.config-Biaq1cKc.cjs"))).gaugeChartConfig}};function re(e,t){return{...t,label:e.label,description:e.description,useCase:e.useCase,isAvailable:e.isAvailable}}var ie={bar:d,line:f,area:p,pie:m,scatter:h,bubble:g,radar:_,radialBar:v,treemap:y,table:b,recordsTable:x,activityGrid:S,kpiNumber:C,kpiDelta:w,kpiText:T,markdown:E,funnel:D,sankey:O,sunburst:ee,heatmap:te,retentionHeatmap:ne,retentionCombined:k,boxPlot:A,dotStrip:j,waterfall:M,candlestick:N,measureProfile:P,proportionBar:F,gauge:I},z=Object.fromEntries(Object.keys(R).map(e=>[e,re(R[e],ie[e])]));function B(e){return z[e]?.recordGrain===!0}function V(e){return Array.isArray(e)?e.length>0:!!e}function H(e){let t=e.timeDimensions??[];return e.ungrouped?t:t.filter(e=>!!e.granularity)}function ae(t,n,r,i){for(let a of t.dropZones){if(!a.mandatory||V(r?.[a.key]))continue;let t=a.acceptTypes?.join(`/`)??`fields`;i.push(e.Y(`server.validation.chart.dropZoneRequired`,{key:a.key,chartType:n,label:a.label,acceptDesc:t}))}}function oe(t,n,r){if(V(t?.xAxis))return;let i=n.dimensions??[],a=H(n),o=i.length>0||a.length>0;r.push(e.Y(o?`server.validation.chart.barXAxisRequired`:`server.validation.chart.barNeedsDimension`))}function U(e){return Array.isArray(e)?e:[e]}function se(t,n){if(!t?.xAxis||!t?.series)return;let r=new Set(U(t.xAxis)),i=U(t.series).filter(e=>r.has(e));i.length>0&&n.push(e.Y(`server.validation.chart.seriesDuplicatesXAxis`,{duplicates:i.join(`, `)}))}function ce(t,n,r){B(t)&&n.ungrouped!==!0&&r.push(e.Y(`server.validation.chart.recordGrainNeedsUngrouped`,{chartType:t}))}function W(e,t,n){let r=z[e];if(!r||r.skipQuery)return{isValid:!0,errors:[]};let i=[];return ae(r,e,t,i),ce(e,n,i),e===`bar`&&oe(t,n,i),se(t,i),{isValid:i.length===0,errors:i}}function G(e,t,n){if(e!==`bar`||V(t?.xAxis))return{chartType:e};let r=n.dimensions??[],i=H(n);if(r.length>0||i.length>0)return{chartType:e};let a=(n.measures??[]).length===1?`kpiNumber`:`table`;return{chartType:a,note:`Note: chartType was changed from "bar" to "${a}" because the query has no dimension, so a bar chart would have no category axis to label its bars. For a real bar chart, put the category in the query's dimensions and use a single measure. To plot several measures as an ordered profile instead, use "measureProfile".`}}function le(e,t,n,r){if(!(e.acceptTypes??[]).includes(`measure`))return;let i=new Set;for(let r of t.dropZones){if(r.key===e.key)continue;let t=n[r.key];Array.isArray(t)?t.forEach(e=>i.add(e)):typeof t==`string`&&i.add(t)}let a=r.filter(e=>!i.has(e));a.length>0&&(n[e.key]=a[0])}function ue(e,t){let n=new Set;for(let[r,i]of Object.entries(e))if(r!==t){if(Array.isArray(i))for(let e of i)typeof e==`string`&&n.add(e);else typeof i==`string`&&n.add(i)}return n}function de(e,t,n){let r=e.acceptTypes??[],i=[];if(r.includes(`dimension`)&&i.push(...n.dimensions),r.includes(`timeDimension`)&&i.push(...n.timeDimFields),r.includes(`measure`)&&i.push(...n.measures),i.length===0)return;let a=ue(t,e.key),o=i.filter(e=>!a.has(e));if(o.length===0)return;let s=e.maxItems??1/0,c=o.slice(0,s);c.length>0&&(t[e.key]=c)}function K(e,t,n){let r=z[e];if(!r)return t??{};let i={...t},a=H(n),o={measures:n.measures??[],dimensions:n.dimensions??[],timeDimFields:a.map(e=>e.dimension)};for(let e of r.dropZones)e.excludeFromInference||V(i[e.key])||(e.key===`sizeField`||e.key===`colorField`?le(e,r,i,o.measures):de(e,i,o));return i}function q(t){return t?e.J(t)?e.Y(t):t:``}function fe(e){let t=[`
|
|
6
|
+
`)}var d={clickableElements:{bar:!0},dropZones:[{key:`xAxis`,label:`chart.dropZone.xAxis.label`,description:`chart.dropZone.xAxis.description`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.bar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dropZone.yAxis.label`,description:`chart.configText.measures_for_bar_heights`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.bar.dropZone.yAxis.empty`,enableDualAxis:!0},{key:`series`,label:`chart.dropZone.series.label`,description:`chart.dropZone.series.description`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.bar.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`showAllXLabels`,`hideHeader`],displayOptionsConfig:[n.u(`chart.configText.how_to_stack_multiple_bar_series`),n.d,n.n,n.i,n.s]},f={clickableElements:{point:!0},dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_time_categories`,description:`chart.configText.time_dimensions_or_dimensions_for_x_axis`,mandatory:!0,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.line.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dropZone.yAxis.label`,description:`chart.configText.measures_for_line_values`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.line.dropZone.yAxis.empty`,enableDualAxis:!0},{key:`series`,label:`chart.configText.series_multiple_lines`,description:`chart.configText.dimensions_to_create_separate_lines`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.line.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`showAllXLabels`,`hideHeader`],displayOptionsConfig:[n.l,n.c(),n.t,n.n,n.d,{key:`priorPeriodStyle`,label:`chart.option.priorPeriodStyle.label`,type:`select`,defaultValue:`dashed`,options:[{value:`dashed`,label:`chart.option.priorPeriodStyle.dashed`},{value:`dotted`,label:`chart.option.priorPeriodStyle.dotted`},{value:`solid`,label:`chart.option.priorPeriodStyle.solid`}],description:`chart.option.priorPeriodStyle.description`},{key:`priorPeriodOpacity`,label:`chart.option.priorPeriodOpacity.label`,type:`number`,defaultValue:.5,min:.1,max:1,step:.1,description:`chart.option.priorPeriodOpacity.description`},n.i,n.s]},p={dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_time_categories`,description:`chart.configText.time_dimensions_or_dimensions_for_x_axis`,mandatory:!0,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.area.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dropZone.yAxis.label`,description:`chart.configText.measures_for_area_values`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.area.dropZone.yAxis.empty`,enableDualAxis:!0},{key:`series`,label:`chart.configText.series_stack_areas`,description:`chart.configText.dimensions_to_create_stacked_areas`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.area.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`showAllXLabels`,`hideHeader`],displayOptionsConfig:[n.l,n.c(!1),n.u(`chart.configText.how_to_stack_multiple_area_series`),n.t,n.n,n.d,n.i,n.s]},m={clickableElements:{slice:!0},dropZones:[{key:`xAxis`,label:`chart.configText.categories`,description:`chart.configText.dimension_for_pie_slices`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.pie.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.values`,description:`chart.configText.measure_for_slice_sizes`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.pie.dropZone.yAxis.empty`}],displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],displayOptionsConfig:[{key:`innerRadius`,label:`chart.option.innerRadius.label`,type:`select`,description:`chart.configText.hollow_center_size_0_percent_solid_pie_higher_donut_style`,defaultValue:`0%`,options:[{value:`0%`,label:`chart.configText.none_pie`},{value:`20%`,label:`chart.configText.20_percent`},{value:`40%`,label:`chart.configText.40_percent`},{value:`60%`,label:`chart.configText.60_percent`},{value:`80%`,label:`chart.configText.80_percent`}]},n.f()]},h={dropZones:[{key:`xAxis`,label:`chart.runtime.axisFormat.xAxis`,description:`chart.configText.measure_or_dimension_for_x_position`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.scatter.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis`,description:`chart.configText.measure_for_y_position`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.scatter.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.series_color_groups`,description:`chart.configText.dimension_to_color_points_by_category`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.scatter.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`hideHeader`],displayOptionsConfig:[{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.option.xAxisFormat.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.option.yAxisFormat.description`}]},g={dropZones:[{key:`xAxis`,label:`chart.runtime.axisFormat.xAxis`,description:`chart.configText.horizontal_axis_position`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.bubble.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis`,description:`chart.configText.vertical_axis_position`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.bubble.dropZone.yAxis.empty`},{key:`sizeField`,label:`chart.configText.bubble_radius`,description:`chart.configText.size_of_bubbles_based_on_this_measure`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.bubble.dropZone.sizeField.empty`},{key:`series`,label:`chart.configText.bubble_labels`,description:`chart.configText.field_to_use_for_bubble_labels_and_identification`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.bubble.dropZone.series.empty`},{key:`colorField`,label:`chart.configText.bubble_colour`,description:`chart.configText.color_bubbles_by_this_field_optional`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`,`measure`],emptyText:`chart.bubble.dropZone.colorField.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`minBubbleSize`,`maxBubbleSize`,`bubbleOpacity`,`hideHeader`],displayOptionsConfig:[{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.option.xAxisFormat.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_y_axis_and_values`}]},_={dropZones:[{key:`xAxis`,label:`chart.configText.axes_categories`,description:`chart.configText.dimensions_for_radar_axes`,mandatory:!0,acceptTypes:[`dimension`],emptyText:`chart.radar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.values`,description:`chart.configText.measures_for_radar_values`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.radar.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.series_multiple_shapes`,description:`chart.configText.dimensions_to_create_multiple_radar_shapes`,mandatory:!1,acceptTypes:[`dimension`],emptyText:`chart.radar.dropZone.series.empty`}],displayOptions:[`showLegend`,`showGrid`,`showTooltip`,`hideHeader`],displayOptionsConfig:[n.f()]},v={dropZones:[{key:`xAxis`,label:`chart.configText.categories`,description:`chart.configText.dimensions_for_radial_segments`,mandatory:!0,acceptTypes:[`dimension`],emptyText:`chart.radialBar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.values`,description:`chart.configText.measures_for_radial_bar_lengths`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.radialBar.dropZone.yAxis.empty`}],displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],displayOptionsConfig:[n.f()]},y={dropZones:[{key:`xAxis`,label:`chart.configText.categories`,description:`chart.configText.dimensions_for_treemap_rectangles`,mandatory:!0,acceptTypes:[`dimension`],emptyText:`chart.treemap.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.size`,description:`chart.configText.measure_for_rectangle_sizes`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.treemap.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.color_groups`,description:`chart.configText.dimension_to_color_rectangles_by_category`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.treemap.dropZone.series.empty`}],displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],displayOptionsConfig:[n.f(`chart.configText.number_formatting_for_size_values`)],clickableElements:{cell:!0}},b={dropZones:[{key:`xAxis`,label:`chart.configText.columns`,description:`chart.configText.all_fields_to_display_as_columns`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.table.dropZone.xAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`leftYAxisFormat`,label:`chart.option.valueFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_numeric_values`}]},x={dropZones:[{key:`columns`,label:`chart.recordsTable.dropZone.columns.label`,description:`chart.recordsTable.dropZone.columns.description`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.recordsTable.dropZone.columns.empty`},{key:`hiddenColumns`,label:`chart.recordsTable.dropZone.hiddenColumns.label`,description:`chart.recordsTable.dropZone.hiddenColumns.description`,mandatory:!1,acceptTypes:[`dimension`,`timeDimension`,`measure`],emptyText:`chart.recordsTable.dropZone.hiddenColumns.empty`,excludeFromInference:!0}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`columnFormats`,label:`chart.recordsTable.option.columnFormats.label`,type:`columnFormats`,description:`chart.recordsTable.option.columnFormats.description`,progressBands:!0},{key:`rowLink`,label:`chart.recordsTable.option.rowLink.label`,type:`rowLink`,description:`chart.recordsTable.option.rowLink.description`},{key:`pageSize`,label:`chart.recordsTable.option.pageSize.label`,type:`select`,defaultValue:25,description:`chart.recordsTable.option.pageSize.description`,options:[{value:25,label:`chart.recordsTable.option.pageSize.option.25`},{value:50,label:`chart.recordsTable.option.pageSize.option.50`},{value:100,label:`chart.recordsTable.option.pageSize.option.100`}]}],clickableElements:{row:!0},recordGrain:!0},S={dropZones:[{key:`dateField`,label:`chart.configText.time_dimension`,description:`chart.configText.time_field_that_determines_grid_structure_granularity_affects_layout`,mandatory:!0,maxItems:1,acceptTypes:[`timeDimension`],emptyText:`chart.activityGrid.dropZone.dateField.empty`},{key:`valueField`,label:`chart.configText.activity_measure`,description:`chart.configText.measure_used_for_activity_intensity_color_coding`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.activityGrid.dropZone.valueField.empty`}],displayOptions:[`showLabels`,`showTooltip`,`hideHeader`],displayOptionsConfig:[{key:`fitToWidth`,label:`chart.option.fitToWidth.label`,type:`boolean`,defaultValue:!1,description:`chart.option.fitToWidth.description`}],validate:e=>{let{dateField:t,valueField:n}=e;return!t||Array.isArray(t)&&t.length===0?{isValid:!1,message:`chart.activityGrid.validation.timeDimensionRequired`}:!n||Array.isArray(n)&&n.length===0?{isValid:!1,message:`chart.activityGrid.validation.measureRequired`}:{isValid:!0}},clickableElements:{cell:!0}},C={dropZones:[{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_to_display_as_kpi_number`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.kpiNumber.dropZone.yAxis.empty`}],displayOptionsConfig:[n.r,{key:`target`,label:`chart.runtime.tooltip.targetValue`,type:`string`,placeholder:`e.g., 100`,description:`chart.configText.target_value_to_compare_against_first_value_used_if_multiple_provided`},{key:`prefix`,label:`chart.option.prefix.label`,type:`string`,placeholder:`e.g., $, €, #`,description:`chart.option.prefix.description`},{key:`suffix`,label:`chart.option.suffix.label`,type:`string`,placeholder:`e.g., %, units, items`,description:`chart.option.suffix.description`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:0,min:0,max:10,step:1,description:`chart.option.decimals.description`},{key:`valueColorIndex`,label:`chart.configText.value_color`,type:`paletteColor`,defaultValue:0,description:`chart.configText.color_from_the_dashboard_palette_for_the_kpi_value_text`},{key:`useLastCompletePeriod`,label:`chart.option.useLastCompletePeriod.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.exclude_current_incomplete_period_from_aggregation_e_g_partial_week_mont`},{key:`skipLastPeriod`,label:`chart.option.skipLastPeriod.label`,type:`boolean`,defaultValue:!1,description:`chart.option.skipLastPeriod.description`}],displayOptions:[`hideHeader`]},w={dropZones:[{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_to_track_changes_for`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.kpiDelta.dropZone.yAxis.empty`},{key:`xAxis`,label:`chart.configText.dimension_optional`,description:`chart.configText.dimension_for_ordering_data_typically_time`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.kpiDelta.dropZone.xAxis.empty`}],displayOptionsConfig:[n.r,{key:`showBaseline`,label:`chart.option.showBaseline.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showBaseline.description`},{key:`prefix`,label:`chart.option.prefix.label`,type:`string`,placeholder:`e.g., $, €, #`,description:`chart.option.prefix.description`},{key:`suffix`,label:`chart.option.suffix.label`,type:`string`,placeholder:`e.g., %, units, items`,description:`chart.option.suffix.description`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:1,min:0,max:10,step:1,description:`chart.option.decimals.description`},{key:`positiveColorIndex`,label:`chart.configText.positive_change_color`,type:`paletteColor`,defaultValue:2,description:`chart.configText.color_for_positive_changes_increases`},{key:`negativeColorIndex`,label:`chart.configText.negative_change_color`,type:`paletteColor`,defaultValue:3,description:`chart.configText.color_for_negative_changes_decreases`},{key:`showHistogram`,label:`chart.option.showHistogram.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showHistogram.description`},{key:`useLastCompletePeriod`,label:`chart.option.useLastCompletePeriod.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.exclude_current_incomplete_period_from_delta_calculation_e_g_partial_wee`},{key:`skipLastPeriod`,label:`chart.option.skipLastPeriod.label`,type:`boolean`,defaultValue:!1,description:`chart.option.skipLastPeriod.description`}],displayOptions:[`hideHeader`],validate:e=>!e.yAxis||Array.isArray(e.yAxis)&&e.yAxis.length===0?{isValid:!1,message:`chart.kpiDelta.validation.measureRequired`}:{isValid:!0}},T={dropZones:[{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_to_display_in_the_kpi_text_template`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.kpiText.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`template`,label:`chart.configText.text_template`,type:`string`,placeholder:"e.g., Total Revenue: ${value}",description:`chart.configText.template_for_displaying_the_text_use_value_to_insert_the_measure_value`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:0,min:0,max:10,step:1,description:`chart.configText.number_of_decimal_places_to_display_for_numeric_values`},{key:`valueColorIndex`,label:`chart.configText.value_color`,type:`paletteColor`,defaultValue:0,description:`chart.configText.color_from_the_dashboard_palette_for_the_kpi_value_text`}],displayOptions:[`hideHeader`]},E={skipQuery:!0,dropZones:[],displayOptionsConfig:[{key:`content`,label:`chart.configText.markdown_content`,type:`string`,placement:`chart`,rows:18,syntax:`markdownTemplate`,placeholder:`chart.markdown.contentPlaceholder`,description:`chart.markdown.contentDescription`,docsUrl:`https://knap.md/variables`,docsLabel:`chart.markdown.contentDocsLabel`},{key:`accentColorIndex`,label:`chart.configText.accent_color`,type:`paletteColor`,defaultValue:0,description:`chart.configText.color_from_the_dashboard_palette_for_headers_bullets_and_links`},{key:`fontSize`,label:`chart.option.fontSize.label`,type:`select`,defaultValue:`medium`,options:[{value:`small`,label:`chart.option.fontSize.small`},{value:`medium`,label:`chart.option.fontSize.medium`},{value:`large`,label:`chart.option.fontSize.large`}],description:`chart.configText.overall_text_size_for_the_markdown_content`},{key:`alignment`,label:`chart.option.alignment.label`,type:`select`,defaultValue:`left`,options:[{value:`left`,label:`chart.option.accentBorder.left`},{value:`center`,label:`chart.option.alignment.center`},{value:`right`,label:`chart.option.alignment.right`}],description:`chart.configText.horizontal_alignment_of_the_markdown_content`},{key:`hideHeader`,label:`chart.option.hideHeader.label`,type:`boolean`,defaultValue:!0,description:`chart.option.hideHeader.description`},{key:`transparentBackground`,label:`chart.option.transparentBackground.label`,type:`boolean`,defaultValue:!1,description:`chart.option.transparentBackground.description`},{key:`autoHeight`,label:`chart.option.autoHeight.label`,type:`boolean`,defaultValue:!0,description:`chart.option.autoHeight.description`},{key:`accentBorder`,label:`chart.option.accentBorder.label`,type:`select`,defaultValue:`none`,options:[{value:`none`,label:`chart.option.accentBorder.none`},{value:`left`,label:`chart.option.accentBorder.left`},{value:`top`,label:`chart.option.accentBorder.top`},{value:`bottom`,label:`chart.option.accentBorder.bottom`}],description:`chart.configText.add_an_accent_colored_border_on_one_side_of_the_content`}]},D={dropZones:[{key:`xAxis`,label:`chart.configText.step_name`,description:`chart.configText.step_names_auto_populated_from_funnel_steps`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.funnel.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.step_count`,description:`chart.configText.count_at_each_step_auto_calculated`,mandatory:!1,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.funnel.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`funnelStyle`,label:`chart.option.funnelStyle.label`,type:`buttonGroup`,defaultValue:`bars`,options:[{value:`bars`,label:`chart.option.funnelStyle.bars`},{value:`funnel`,label:`chart.option.funnelStyle.funnel`}],description:`chart.configText.visualization_style`},{key:`funnelOrientation`,label:`chart.option.funnelOrientation.label`,type:`buttonGroup`,defaultValue:`horizontal`,options:[{value:`horizontal`,label:`chart.option.funnelOrientation.horizontal`},{value:`vertical`,label:`chart.option.funnelOrientation.vertical`}]},{key:`hideSummaryFooter`,label:`chart.option.hideSummaryFooter.label`,type:`boolean`,defaultValue:!1,description:`chart.option.hideSummaryFooter.description`},{key:`showFunnelConversion`,label:`chart.option.showConversion.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showConversion.description`},{key:`showFunnelAvgTime`,label:`chart.option.showAvgTime.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showAvgTime.description`},{key:`showFunnelMedianTime`,label:`chart.option.showMedianTime.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showMedianTime.description`},{key:`showFunnelP90Time`,label:`chart.option.showP90Time.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showP90Time.description`}]},O={dropZones:[{key:`xAxis`,label:`chart.configText.event_type`,description:`chart.configText.event_dimension_that_categorizes_flow_nodes`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.sankey.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.flow_count`,description:`chart.configText.count_of_entities_following_each_path`,mandatory:!1,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.sankey.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`linkOpacity`,label:`chart.option.linkOpacity.label`,type:`buttonGroup`,defaultValue:`0.5`,options:[{value:`0.3`,label:`chart.option.linkOpacity.light`},{value:`0.5`,label:`chart.option.fontSize.medium`},{value:`0.7`,label:`chart.option.linkOpacity.dark`}],description:`chart.configText.opacity_of_flow_links`},{key:`showNodeLabels`,label:`chart.option.showNodeLabels.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showNodeLabels.description`},{key:`hideSummaryFooter`,label:`chart.option.hideSummaryFooter.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.hide_the_statistics_footer_below_the_chart`}]},ee={dropZones:[{key:`xAxis`,label:`chart.configText.event_type`,description:`chart.configText.event_dimension_that_categorizes_flow_nodes`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.sunburst.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.flow_count`,description:`chart.configText.count_of_entities_following_each_path`,mandatory:!1,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.sunburst.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`innerRadius`,label:`chart.option.innerRadius.label`,type:`number`,defaultValue:40,min:0,max:100,step:10,description:`chart.configText.size_of_the_center_hole_0_for_full_circle`},{key:`hideSummaryFooter`,label:`chart.option.hideSummaryFooter.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.hide_the_statistics_footer_below_the_chart`}]},te={dropZones:[{key:`xAxis`,label:`chart.configText.columns_x_axis`,description:`chart.configText.dimension_for_column_categories`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.heatmap.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.rows_y_axis`,description:`chart.configText.dimension_for_row_categories`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.heatmap.dropZone.yAxis.empty`},{key:`valueField`,label:`chart.configText.value_color_intensity`,description:`chart.configText.measure_that_determines_cell_color`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.heatmap.dropZone.valueField.empty`}],displayOptions:[`showLegend`,`showTooltip`],displayOptionsConfig:[{key:`showLabels`,label:`chart.option.showLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showLabels.description`},{key:`cellShape`,label:`chart.option.cellShape.label`,type:`select`,defaultValue:`rect`,options:[{value:`rect`,label:`chart.option.cellShape.rectangle`},{value:`circle`,label:`chart.option.cellShape.circle`}]},{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_x_axis_labels`},{key:`yAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_y_axis_labels`},{key:`valueFormat`,label:`chart.option.valueFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_cell_values_and_legend`}],validate:e=>e.xAxis?.length?e.yAxis?.length?e.valueField?.length?{isValid:!0}:{isValid:!1,message:`chart.heatmap.validation.valueRequired`}:{isValid:!1,message:`chart.heatmap.validation.yAxisRequired`}:{isValid:!1,message:`chart.heatmap.validation.xAxisRequired`}},ne={dropZones:[],displayOptionsConfig:[{key:`showLegend`,label:`chart.option.showLegend.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.show_the_color_intensity_legend`},{key:`showTooltip`,label:`chart.option.showTooltip.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showTooltip.description`}]},k={dropZones:[],displayOptionsConfig:[{key:`retentionDisplayMode`,label:`chart.option.retentionDisplayMode.label`,type:`select`,defaultValue:`line`,options:[{value:`line`,label:`chart.option.retentionDisplayMode.lineChart`},{value:`heatmap`,label:`chart.option.retentionDisplayMode.heatmapTable`},{value:`combined`,label:`chart.option.retentionDisplayMode.combined`}],description:`chart.configText.choose_how_to_visualize_retention_data`},{key:`showLegend`,label:`chart.option.showLegend.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.show_the_legend_for_breakdown_segments`},{key:`showGrid`,label:`chart.option.showGrid.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showGrid.description`},{key:`showTooltip`,label:`chart.option.showTooltip.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showTooltip.description`}]},A={displayOptions:[`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_groups`,description:`chart.configText.dimension_to_group_boxes_by_e_g_symbol_platform`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.boxPlot.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis_measures`,description:`chart.configText.drop_1_measure_for_auto_mode_3_for_avg_stddev_median_mode_or_5_for_min_q`,mandatory:!0,maxItems:5,acceptTypes:[`measure`],emptyText:`chart.boxPlot.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_value_axis`}]},j={displayOptions:[`showGrid`,`showTooltip`,`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.dotStrip.dropZone.xAxis.label`,description:`chart.dotStrip.dropZone.xAxis.description`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.dotStrip.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.dotStrip.dropZone.yAxis.label`,description:`chart.dotStrip.dropZone.yAxis.description`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.dotStrip.dropZone.yAxis.empty`},{key:`series`,label:`chart.dotStrip.dropZone.series.label`,description:`chart.dotStrip.dropZone.series.description`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.dotStrip.dropZone.series.empty`}],clickableElements:{point:!0},displayOptionsConfig:[{key:`showMedianMarker`,label:`chart.option.showMedianMarker.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showMedianMarker.description`},{key:`showBandStats`,label:`chart.option.showBandStats.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showBandStats.description`},{key:`showExtremeLabels`,label:`chart.option.showExtremeLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showExtremeLabels.description`},{key:`dotSize`,label:`chart.option.dotSize.label`,type:`select`,defaultValue:`medium`,options:[{value:`small`,label:`chart.option.dotSize.small`},{value:`medium`,label:`chart.option.dotSize.medium`},{value:`large`,label:`chart.option.dotSize.large`}],description:`chart.option.dotSize.description`},{key:`bandSort`,label:`chart.option.bandSort.label`,type:`select`,defaultValue:`none`,options:[{value:`none`,label:`chart.option.bandSort.none`},{value:`valueDesc`,label:`chart.option.bandSort.valueDesc`},{value:`valueAsc`,label:`chart.option.bandSort.valueAsc`},{value:`count`,label:`chart.option.bandSort.count`}],description:`chart.option.bandSort.description`},{key:`xAxisFormat`,label:`chart.option.xAxisFormat.label`,type:`axisFormat`,description:`chart.option.xAxisFormat.description`}]},M={clickableElements:{bar:!0},displayOptions:[`showTooltip`,`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.dropZone.xAxis.label`,description:`chart.configText.dimension_labels_for_each_bar_segment_e_g_symbol_transaction_type`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.waterfall.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.y_axis_value`,description:`chart.configText.single_measure_whose_values_are_summed_cumulatively`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.waterfall.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`showTotal`,label:`chart.option.showTotal.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showTotal.description`},{key:`showConnectorLine`,label:`chart.option.showConnectorLine.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showConnectorLine.description`},{key:`showDataLabels`,label:`chart.option.showDataLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.configText.display_the_value_above_each_bar_segment`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_y_axis`}]},N={clickableElements:{bar:!0},displayOptions:[`hideHeader`],dropZones:[{key:`xAxis`,label:`chart.configText.x_axis_time_category`,description:`chart.configText.time_dimension_or_category_for_each_candle_e_g_date_symbol`,mandatory:!0,maxItems:1,acceptTypes:[`timeDimension`,`dimension`],emptyText:`chart.candlestick.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.ohlc_measures_open_close_high_low`,description:`chart.configText.drop_2_4_measures_in_order_open_close_high_low_ohlc_mode_for_range_mode_`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.candlestick.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`rangeMode`,label:`chart.option.rangeMode.label`,type:`select`,defaultValue:`ohlc`,options:[{value:`ohlc`,label:`chart.option.rangeMode.ohlc`},{value:`range`,label:`chart.option.rangeMode.range`}],description:`chart.option.rangeMode.description`},{key:`bullColor`,label:`chart.option.bullColor.label`,type:`color`,defaultValue:`#22c55e`,description:`chart.option.bullColor.description`},{key:`bearColor`,label:`chart.option.bearColor.label`,type:`color`,defaultValue:`#ef4444`,description:`chart.option.bearColor.description`},{key:`showWicks`,label:`chart.option.showWicks.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showWicks.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_price_axis`}]},P={displayOptions:[`showLegend`,`showTooltip`,`hideHeader`],dropZones:[{key:`yAxis`,label:`chart.configText.measures_x_axis_order`,description:`chart.configText.add_2_or_more_measures_they_become_the_x_axis_categories_in_the_order_li`,mandatory:!0,acceptTypes:[`measure`],emptyText:`chart.measureProfile.dropZone.yAxis.empty`},{key:`series`,label:`chart.configText.series_split_into_multiple_lines`,description:`chart.configText.dimension_to_split_data_into_separate_profile_lines_e_g_symbol_platform`,mandatory:!1,maxItems:1,acceptTypes:[`dimension`],emptyText:`chart.measureProfile.dropZone.series.empty`}],displayOptionsConfig:[{key:`showReferenceLineAtZero`,label:`chart.option.showReferenceLineAtZero.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showReferenceLineAtZero.description`},{key:`showDataLabels`,label:`chart.option.showDataLabels.label`,type:`boolean`,defaultValue:!1,description:`chart.configText.display_value_at_each_data_point`},{key:`showLegend`,label:`chart.option.showLegend.label`,type:`boolean`,defaultValue:!0,description:`chart.configText.show_series_legend_only_visible_with_a_series_dimension`},{key:`lineType`,label:`chart.option.lineType.label`,type:`select`,defaultValue:`monotone`,options:[{value:`monotone`,label:`chart.option.lineType.smooth`},{value:`linear`,label:`chart.option.lineType.linear`},{value:`step`,label:`chart.option.lineType.step`}],description:`chart.option.lineType.description`},{key:`leftYAxisFormat`,label:`chart.option.yAxisFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_y_axis`}]},F={dropZones:[{key:`xAxis`,label:`chart.configText.category`,description:`chart.configText.dimension_to_split_the_bar_into_segments`,mandatory:!0,maxItems:1,acceptTypes:[`dimension`,`timeDimension`],emptyText:`chart.proportionBar.dropZone.xAxis.empty`},{key:`yAxis`,label:`chart.configText.value`,description:`chart.configText.measure_that_determines_each_segments_share`,mandatory:!0,maxItems:1,acceptTypes:[`measure`],emptyText:`chart.proportionBar.dropZone.yAxis.empty`}],displayOptions:[`hideHeader`],displayOptionsConfig:[{key:`showLabels`,label:`chart.option.proportionBarLabels.label`,type:`boolean`,defaultValue:!0,description:`chart.option.proportionBarLabels.description`},{key:`showPercentages`,label:`chart.option.showPercentages.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showPercentages.description`},{key:`sortSegments`,label:`chart.option.sortSegments.label`,type:`boolean`,defaultValue:!1,description:`chart.option.sortSegments.description`},{key:`decimals`,label:`chart.option.decimals.label`,type:`number`,defaultValue:0,min:0,max:2,description:`chart.option.proportionBarDecimals.description`}],validate:e=>!e?.xAxis||Array.isArray(e.xAxis)&&e.xAxis.length===0?{isValid:!1,message:`chart.proportionBar.validation.dimensionRequired`}:!e?.yAxis||Array.isArray(e.yAxis)&&e.yAxis.length===0?{isValid:!1,message:`chart.proportionBar.validation.measureRequired`}:{isValid:!0}},I={clickableElements:{},displayOptions:[`hideHeader`],dropZones:[{key:`yAxis`,label:`chart.configText.value_measure`,description:`chart.configText.current_value_to_display_on_the_gauge_e_g_current_equity_margin_used`,mandatory:!0,maxItems:2,acceptTypes:[`measure`],emptyText:`chart.gauge.dropZone.yAxis.empty`}],displayOptionsConfig:[{key:`minValue`,label:`chart.option.minValue.label`,type:`number`,defaultValue:0,description:`chart.option.minValue.description`},{key:`maxValue`,label:`chart.option.maxValue.label`,type:`number`,description:`chart.option.maxValue.description`},{key:`thresholds`,label:`chart.configText.threshold_bands`,type:`thresholdBands`,description:`chart.gauge.thresholds.description`},{key:`showCenterLabel`,label:`chart.option.showCentreLabel.label`,type:`boolean`,defaultValue:!0,description:`chart.option.showCentreLabel.description`},{key:`showPercentage`,label:`chart.option.showPercentage.label`,type:`boolean`,defaultValue:!1,description:`chart.option.showPercentage.description`},{key:`leftYAxisFormat`,label:`chart.option.valueFormat.label`,type:`axisFormat`,description:`chart.configText.number_formatting_for_the_displayed_value_and_axis_labels`}]},L={packageName:`recharts`,installCommand:`npm install recharts`},R={bar:{label:`chart.bar.label`,icon:`chartBar`,description:`chart.bar.description`,useCase:`chart.bar.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./BarChart.config-A6F0Q9OX.cjs"))).barChartConfig},line:{label:`chart.line.label`,icon:`chartLine`,description:`chart.line.description`,useCase:`chart.line.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./LineChart.config-B3NcBB9q.cjs"))).lineChartConfig},area:{label:`chart.area.label`,icon:`chartArea`,description:`chart.area.description`,useCase:`chart.area.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./AreaChart.config-CRyAhIvc.cjs"))).areaChartConfig},pie:{label:`chart.pie.label`,icon:`chartPie`,description:`chart.pie.description`,useCase:`chart.pie.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./PieChart.config-CR9SlQ2E.cjs"))).pieChartConfig},scatter:{label:`chart.scatter.label`,icon:`chartScatter`,description:`chart.scatter.description`,useCase:`chart.scatter.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<1?{available:!1,reason:`chart.availability.requiresMeasure`}:e<2&&t<1?{available:!1,reason:`chart.availability.scatter`}:{available:!0},dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./ScatterChart.config-BARL2-vh.cjs"))).scatterChartConfig},bubble:{label:`chart.bubble.label`,icon:`chartBubble`,description:`chart.bubble.description`,useCase:`chart.bubble.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<2?{available:!1,reason:`chart.availability.requiresTwoMeasures`}:t<1?{available:!1,reason:`chart.availability.bubble`}:{available:!0},dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./BubbleChart.config-B66v-bb5.cjs"))).bubbleChartConfig},radar:{label:`chart.radar.label`,icon:`chartRadar`,description:`chart.radar.description`,useCase:`chart.radar.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./RadarChart.config-QV34AUcy.cjs"))).radarChartConfig},radialBar:{label:`chart.radialBar.label`,icon:`chartRadialBar`,description:`chart.radialBar.description`,useCase:`chart.radialBar.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./RadialBarChart.config-CxBOhmiO.cjs"))).radialBarChartConfig},treemap:{label:`chart.treemap.label`,icon:`chartTreemap`,description:`chart.treemap.description`,useCase:`chart.treemap.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./TreeMapChart.config-Dz1mOrnC.cjs"))).treemapChartConfig},table:{label:`chart.table.label`,icon:`chartTable`,description:`chart.table.description`,useCase:`chart.table.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./DataTable.config-CeFswxJI.cjs"))).dataTableConfig},recordsTable:{label:`chart.recordsTable.label`,icon:`chartRecordsTable`,description:`chart.recordsTable.description`,useCase:`chart.recordsTable.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./RecordsTable.config-LxS0O10c.cjs"))).recordsTableConfig},activityGrid:{label:`chart.activityGrid.label`,icon:`chartActivityGrid`,description:`chart.activityGrid.description`,useCase:`chart.activityGrid.useCase`,isAvailable:({measureCount:e,timeDimensionCount:t})=>e<1?{available:!1,reason:`chart.availability.requiresMeasure`}:t<1?{available:!1,reason:`chart.availability.requiresTimeDimension`}:{available:!0},config:async()=>(await Promise.resolve().then(()=>require("./ActivityGridChart.config-D2pyoHSf.cjs"))).activityGridChartConfig},kpiNumber:{label:`chart.kpiNumber.label`,icon:`chartKpiNumber`,description:`chart.kpiNumber.description`,useCase:`chart.kpiNumber.useCase`,isAvailable:n.a,config:async()=>(await Promise.resolve().then(()=>require("./KpiNumber.config-BgNPzbNS.cjs"))).kpiNumberConfig},kpiDelta:{label:`chart.kpiDelta.label`,icon:`chartKpiDelta`,description:`chart.kpiDelta.description`,useCase:`chart.kpiDelta.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./KpiDelta.config-C3E_pfdr.cjs"))).kpiDeltaConfig},kpiText:{label:`chart.kpiText.label`,icon:`chartKpiText`,description:`chart.kpiText.description`,useCase:`chart.kpiText.useCase`,isAvailable:n.a,config:async()=>(await Promise.resolve().then(()=>require("./KpiText.config-vp2VuogK.cjs"))).kpiTextConfig},markdown:{label:`chart.markdown.label`,icon:`chartMarkdown`,description:`chart.markdown.description`,useCase:`chart.markdown.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./MarkdownChart.config-zhKb-tLR.cjs"))).markdownConfig},funnel:{label:`chart.funnel.label`,icon:`chartFunnel`,description:`chart.funnel.description`,useCase:`chart.funnel.useCase`,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./FunnelChart.config-CEVsDKfR.cjs"))).funnelChartConfig},sankey:{label:`chart.sankey.label`,icon:`chartSankey`,description:`chart.sankey.description`,useCase:`chart.sankey.useCase`,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./SankeyChart.config-JrhBtNH4.cjs"))).sankeyChartConfig},sunburst:{label:`chart.sunburst.label`,icon:`chartSunburst`,description:`chart.sunburst.description`,useCase:`chart.sunburst.useCase`,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./SunburstChart.config-CbvgqJ8d.cjs"))).sunburstChartConfig},heatmap:{label:`chart.heatmap.label`,icon:`chartHeatmap`,description:`chart.heatmap.description`,useCase:`chart.heatmap.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<1?{available:!1,reason:`chart.availability.requiresMeasure`}:t<2?{available:!1,reason:`chart.availability.requiresTwoDimensions`}:{available:!0},dependencies:{packageName:`@nivo/heatmap`,installCommand:`npm install @nivo/heatmap`},config:async()=>(await Promise.resolve().then(()=>require("./HeatMapChart.config-BzSlU0B1.cjs"))).heatmapChartConfig},retentionHeatmap:{label:`chart.retentionHeatmap.label`,icon:`chartRetention`,description:`chart.retentionHeatmap.description`,useCase:`chart.retentionHeatmap.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./RetentionHeatmap.config-DJBHUdn1.cjs"))).retentionHeatmapConfig},retentionCombined:{label:`chart.retentionCombined.label`,icon:`chartRetention`,description:`chart.retentionCombined.description`,useCase:`chart.retentionCombined.useCase`,config:async()=>(await Promise.resolve().then(()=>require("./RetentionCombinedChart.config-DjunHInA.cjs"))).retentionCombinedConfig},boxPlot:{label:`chart.boxPlot.label`,icon:`chartBoxPlot`,description:`chart.boxPlot.description`,useCase:`chart.boxPlot.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./BoxPlotChart.config-DUTvglWv.cjs"))).boxPlotChartConfig},dotStrip:{label:`chart.dotStrip.label`,icon:`chartDotStrip`,description:`chart.dotStrip.description`,useCase:`chart.dotStrip.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./DotStripChart.config-B4DU-F1R.cjs"))).dotStripChartConfig},waterfall:{label:`chart.waterfall.label`,icon:`chartWaterfall`,description:`chart.waterfall.description`,useCase:`chart.waterfall.useCase`,isAvailable:n.o,dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./WaterfallChart.config-BCJ4ZD6x.cjs"))).waterfallChartConfig},candlestick:{label:`chart.candlestick.label`,icon:`chartCandlestick`,description:`chart.candlestick.description`,useCase:`chart.candlestick.useCase`,isAvailable:({measureCount:e,dimensionCount:t})=>e<2?{available:!1,reason:`chart.availability.requiresTwoMeasures`}:t<1?{available:!1,reason:`chart.availability.requiresDimension`}:{available:!0},config:async()=>(await Promise.resolve().then(()=>require("./CandlestickChart.config-C05c1RMZ.cjs"))).candlestickChartConfig},measureProfile:{label:`chart.measureProfile.label`,icon:`chartMeasureProfile`,description:`chart.measureProfile.description`,useCase:`chart.measureProfile.useCase`,isAvailable:({measureCount:e})=>e<2?{available:!1,reason:`chart.availability.requiresTwoMeasures`}:{available:!0},dependencies:L,config:async()=>(await Promise.resolve().then(()=>require("./MeasureProfileChart.config-B-wBjGdA.cjs"))).measureProfileChartConfig},proportionBar:{label:`chart.proportionBar.label`,icon:`chartProportionBar`,description:`chart.proportionBar.description`,useCase:`chart.proportionBar.useCase`,isAvailable:n.o,config:async()=>(await Promise.resolve().then(()=>require("./ProportionBarChart.config-Bz0ssM8J.cjs"))).proportionBarChartConfig},gauge:{label:`chart.gauge.label`,icon:`chartGauge`,description:`chart.gauge.description`,useCase:`chart.gauge.useCase`,isAvailable:n.a,dependencies:{packageName:`d3-shape`,installCommand:`npm install d3-shape`},config:async()=>(await Promise.resolve().then(()=>require("./GaugeChart.config-JhbBQ77o.cjs"))).gaugeChartConfig}};function re(e,t){return{...t,label:e.label,description:e.description,useCase:e.useCase,isAvailable:e.isAvailable}}var ie={bar:d,line:f,area:p,pie:m,scatter:h,bubble:g,radar:_,radialBar:v,treemap:y,table:b,recordsTable:x,activityGrid:S,kpiNumber:C,kpiDelta:w,kpiText:T,markdown:E,funnel:D,sankey:O,sunburst:ee,heatmap:te,retentionHeatmap:ne,retentionCombined:k,boxPlot:A,dotStrip:j,waterfall:M,candlestick:N,measureProfile:P,proportionBar:F,gauge:I},z=Object.fromEntries(Object.keys(R).map(e=>[e,re(R[e],ie[e])]));function B(e){return z[e]?.recordGrain===!0}function V(e){return Array.isArray(e)?e.length>0:!!e}function H(e){let t=e.timeDimensions??[];return e.ungrouped?t:t.filter(e=>!!e.granularity)}function ae(t,n,r,i){for(let a of t.dropZones){if(!a.mandatory||V(r?.[a.key]))continue;let t=a.acceptTypes?.join(`/`)??`fields`;i.push(e.Y(`server.validation.chart.dropZoneRequired`,{key:a.key,chartType:n,label:a.label,acceptDesc:t}))}}function oe(t,n,r){if(V(t?.xAxis))return;let i=n.dimensions??[],a=H(n),o=i.length>0||a.length>0;r.push(e.Y(o?`server.validation.chart.barXAxisRequired`:`server.validation.chart.barNeedsDimension`))}function U(e){return Array.isArray(e)?e:[e]}function se(t,n){if(!t?.xAxis||!t?.series)return;let r=new Set(U(t.xAxis)),i=U(t.series).filter(e=>r.has(e));i.length>0&&n.push(e.Y(`server.validation.chart.seriesDuplicatesXAxis`,{duplicates:i.join(`, `)}))}function ce(t,n,r){B(t)&&n.ungrouped!==!0&&r.push(e.Y(`server.validation.chart.recordGrainNeedsUngrouped`,{chartType:t}))}function W(e,t,n){let r=z[e];if(!r||r.skipQuery)return{isValid:!0,errors:[]};let i=[];return ae(r,e,t,i),ce(e,n,i),e===`bar`&&oe(t,n,i),se(t,i),{isValid:i.length===0,errors:i}}function G(e,t,n){if(e!==`bar`||V(t?.xAxis))return{chartType:e};let r=n.dimensions??[],i=H(n);if(r.length>0||i.length>0)return{chartType:e};let a=(n.measures??[]).length===1?`kpiNumber`:`table`;return{chartType:a,note:`Note: chartType was changed from "bar" to "${a}" because the query has no dimension, so a bar chart would have no category axis to label its bars. For a real bar chart, put the category in the query's dimensions and use a single measure. To plot several measures as an ordered profile instead, use "measureProfile".`}}function le(e,t,n,r){if(!(e.acceptTypes??[]).includes(`measure`))return;let i=new Set;for(let r of t.dropZones){if(r.key===e.key)continue;let t=n[r.key];Array.isArray(t)?t.forEach(e=>i.add(e)):typeof t==`string`&&i.add(t)}let a=r.filter(e=>!i.has(e));a.length>0&&(n[e.key]=a[0])}function ue(e,t){let n=new Set;for(let[r,i]of Object.entries(e))if(r!==t){if(Array.isArray(i))for(let e of i)typeof e==`string`&&n.add(e);else typeof i==`string`&&n.add(i)}return n}function de(e,t,n){let r=e.acceptTypes??[],i=[];if(r.includes(`dimension`)&&i.push(...n.dimensions),r.includes(`timeDimension`)&&i.push(...n.timeDimFields),r.includes(`measure`)&&i.push(...n.measures),i.length===0)return;let a=ue(t,e.key),o=i.filter(e=>!a.has(e));if(o.length===0)return;let s=e.maxItems??1/0,c=o.slice(0,s);c.length>0&&(t[e.key]=c)}function K(e,t,n){let r=z[e];if(!r)return t??{};let i={...t},a=H(n),o={measures:n.measures??[],dimensions:n.dimensions??[],timeDimFields:a.map(e=>e.dimension)};for(let e of r.dropZones)e.excludeFromInference||V(i[e.key])||(e.key===`sizeField`||e.key===`colorField`?le(e,r,i,o.measures):de(e,i,o));return i}function q(t){return t?e.J(t)?e.Y(t):t:``}function fe(e){let t=[`
|
|
7
7
|
Chart config requirements by type:`];for(let n of e){let e=z[n];if(!e)continue;let r=[q(e.description),q(e.useCase)].filter(Boolean).join(`. `),i=r?` — ${r}.`:``,a=B(n)?` Query MUST set "ungrouped": true, which also means one cube plus its to-one joins — an ungrouped query cannot span a hasMany relationship.`:``,o=e.dropZones.filter(e=>e.mandatory);if(o.length===0&&!e.skipQuery){t.push(` ${n}${i}${a} chartConfig auto-inferred from query.`);continue}if(e.skipQuery){t.push(` ${n}${i} Query optional: omit it for static text, or supply one to render displayConfig.content as a data template.`);continue}let s=o.map(e=>{let t=e.acceptTypes?.join(`/`)??`any`,n=e.maxItems?` (max ${e.maxItems})`:``;return`${e.key}=[${t}]${n}`});t.push(` ${n}${i}${a} Requires ${s.join(`, `)}.`)}return t.join(`
|
|
8
8
|
`)}function J(e,t,n,r){let i=new Set,a=0,o,s,c=!0;for(let n of e){let e=n[t];if(e==null){a++;continue}i.add(e);let r=typeof e==`number`?e:Number(e);typeof e==`boolean`||Number.isNaN(r)?c=!1:(o=o===void 0||r<o?r:o,s=s===void 0||r>s?r:s)}return{field:t,kind:n,...r?{type:r}:{},distinctCount:i.size,nullCount:a,...c&&o!==void 0?{min:o,max:s}:{}}}function pe(e,t){if(e.length===0)return[];let n=[],r=new Set,i=[[`dimension`,t?.dimensions],[`timeDimension`,t?.timeDimensions],[`measure`,t?.measures]];for(let[t,a]of i)for(let[i,o]of Object.entries(a??{}))r.add(i),n.push(J(e,i,t,o?.type));for(let t of Object.keys(e[0]))r.has(t)||n.push(J(e,t,`dimension`,void 0));return n}function Y(e){if(!e||typeof e!=`object`)return!1;let t=e=>Array.isArray(e)?e.length:0;return t(e.measures)>0||t(e.dimensions)>0||t(e.timeDimensions)>0}var X='With a query attached, `content` is rendered as a Knap template over the result rows. Variables: `rows` (rows keyed by snake_case alias, so Employees.avgSalary becomes employees_avg_salary), `labelled` (same rows keyed by field label — use this for `{{ labelled | table }}` so column headers read well), `data` (raw rows, addressed as `{{ data[0]["Employees.count"] }}`), `rowCount`, `first` and `last`. Filters include sum, map, join, length, sort, reverse, slice, round, number_format, date and table. Example: `We employ {{ rows | map:"employees_count" | sum }} people across {{ rowCount }} teams.` A template cannot sort and then index, so rely on the query\'s own order via `first` and `last`.',Z=`bar.line.area.pie.scatter.radar.bubble.table.kpiNumber.kpiDelta.kpiText.funnel.heatmap.sankey.sunburst.retentionHeatmap.retentionCombined.boxPlot.markdown.recordsTable.treemap.radialBar.proportionBar.dotStrip.waterfall.measureProfile.activityGrid.gauge.candlestick`.split(`.`);function me(){return[{name:`discover_cubes`,description:`Search for available data cubes by topic or intent. Call this FIRST to understand what data is available. Returns cube names, measures, dimensions, and relationships.`,parameters:{type:`object`,properties:{topic:{type:`string`,description:`Keyword to search (e.g., "sales", "employees")`},intent:{type:`string`,description:`Natural language goal (e.g., "analyze productivity trends")`},limit:{type:`number`,description:`Max results (default: 10)`},minScore:{type:`number`,description:`Min relevance 0-1 (default: 0.1)`}}}},{name:`get_cube_metadata`,description:`Get full metadata for all registered cubes including all measures, dimensions, types, and relationships. Use this for detailed schema information.`,parameters:{type:`object`,properties:{}}},{name:`execute_query`,description:`Execute a semantic query and return data results. Supports standard queries (measures/dimensions) and analysis modes (funnel/flow/retention). Only provide ONE mode per call.`,parameters:{type:`object`,properties:e.b}},{name:`add_portlet`,description:`Add a chart visualization to the notebook.
|
|
9
9
|
`+fe(Z)+`
|
|
@@ -13,4 +13,4 @@ The query is validated before adding. The portlet fetches its own data.`,paramet
|
|
|
13
13
|
[IMPORTANT: Your next response MUST start with a brief text message BEFORE any tool calls. Now call add_markdown and add_portlet to visualize these results.]`}}catch(e){let n={measures:t.measures,dimensions:t.dimensions,filters:t.filters,timeDimensions:t.timeDimensions,order:t.order,limit:t.limit,...t.funnel?{funnel:t.funnel}:{},...t.flow?{flow:t.flow}:{},...t.retention?{retention:t.retention}:{}};return{result:`Query execution failed: ${e instanceof Error?e.message:`Unknown error`}\n\nAttempted query:\n${JSON.stringify(n,null,2)}`,isError:!0}}});function c(t){let i={number:`kpiNumber`,retention:`retentionHeatmap`}[t.chartType]??t.chartType,a;try{a=JSON.parse(t.query)}catch{return{error:"Invalid query: could not parse JSON string. Ensure `query` is a valid JSON string."}}a=e.h(a);let o=n.validateQuery(a,r);if(!o.isValid)return{error:`Invalid query — fix these errors and retry:\n${o.errors.join(`
|
|
14
14
|
`)}\n\nAttempted query:\n${JSON.stringify(a,null,2)}`};let s=!!(a.funnel||a.flow||a.retention),c,l=i,u;if(s)c=t.chartConfig??{};else{let e=G(i,t.chartConfig,a);l=e.chartType,u=e.note;let n=K(l,t.chartConfig,a),r=W(l,n,a);if(!r.isValid)return{error:`Chart config invalid — fix these errors and retry:\n${r.errors.join(`
|
|
15
15
|
`)}\n\nchartType: ${l}\nAttempted chartConfig:\n${JSON.stringify(n,null,2)}\n\nQuery:\n${JSON.stringify(a,null,2)}`};c=n}return{portlet:{query:JSON.stringify(a),chartType:l,chartConfig:c,displayConfig:t.displayConfig},...u?{note:u}:{}}}return i.set(`add_portlet`,async e=>{let t=c({query:e.query,chartType:e.chartType,chartConfig:e.chartConfig,displayConfig:e.displayConfig});if(`error`in t)return{result:t.error,isError:!0};let n=`portlet-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,r={id:n,title:e.title,...t.portlet};return a.set(n,r),{result:`Portlet "${e.title}" added to notebook (id: ${n}, chart: ${r.chartType}).`+(t.note?`\n${t.note}`:``)+` [Reminder: in your next response, start with a brief sentence about what you will do next BEFORE making any tool calls.]`,sideEffect:{type:`add_portlet`,data:r}}}),i.set(`update_portlet`,async e=>{let t=e.portletId,n=t?a.get(t):void 0,r=e.query??n?.query,i=e.chartType??n?.chartType;if(!t||!r||!i)return{result:`Cannot update portlet "${t??``}": it was not added in this conversation, so there is nothing to merge your change into. Call update_portlet again with the same portletId plus the full \`query\` and \`chartType\` for the chart you want.`,isError:!0};let o=c({query:r,chartType:i,chartConfig:e.chartConfig??n?.chartConfig,displayConfig:e.displayConfig??n?.displayConfig});if(`error`in o)return{result:o.error,isError:!0};let s=e.title??n?.title??`Untitled`,l={id:t,title:s,...o.portlet};return a.set(t,l),{result:`Portlet "${s}" updated (id: ${t}, chart: ${l.chartType}).`+(o.note?`\n${o.note}`:``)+` [Reminder: in your next response, start with a brief sentence about what you will do next BEFORE making any tool calls.]`,sideEffect:{type:`update_portlet`,data:l}}}),i.set(`add_markdown`,async e=>{let t=e.content||e.text||e.markdown||``;if(typeof t!=`string`||t.trim()===``)return{result:"add_markdown was called with no content, so no block was added. Call add_markdown again with the explanation text in the `content` field.",isError:!0};let n=`markdown-${Date.now()}-${Math.random().toString(36).slice(2,7)}`,r={id:n,title:e.title,content:t};return{result:`Markdown block added to notebook (id: ${n}). [Reminder: in your next response, start with a brief sentence about what you will do next BEFORE making any tool calls.]`,sideEffect:{type:`add_markdown`,data:r}}}),i.set(`save_as_dashboard`,async t=>{try{let i=t.portlets;if(!i||i.length===0)return{result:`Dashboard must contain at least one portlet.`,isError:!0};let a=[],o=new Map,s=new Map;for(let t of i){let i=t.chartType,c=i===`markdown`,l=t.query;if(!l){if(c)continue;a.push(`Portlet "${t.title}": missing query`);continue}let u;try{u=JSON.parse(l)}catch{a.push(`Portlet "${t.title}": invalid JSON query`);continue}if(u=e.h(u),c&&!Y(u))continue;let d=n.validateQuery(u,r);if(!d.isValid){a.push(`Portlet "${t.title}": ${d.errors.join(`, `)}`);continue}if(c){s.set(t,i);continue}let f=G(i,t.chartConfig,u).chartType,p=K(f,t.chartConfig,u),m=W(f,p,u);if(!m.isValid){a.push(`Portlet "${t.title}": ${m.errors.join(`, `)}`);continue}o.set(t,p),s.set(t,f)}if(a.length>0)return{result:`Dashboard has invalid portlets — fix these errors and retry:\n${a.join(`
|
|
16
|
-
`)}`,isError:!0};let c={portlets:i.map(e=>{let t=s.get(e)??e.chartType,n=t===`markdown`,r=n?`query`:e.analysisType||`query`,i=r===`funnel`?`funnel`:r===`flow`?`flow`:r===`retention`?`retention`:`query`,a=e.query||`{}`,c;try{c=JSON.parse(a)}catch{c={}}let l={version:1,analysisType:i,activeView:`chart`,charts:{[i]:{chartType:t,chartConfig:o.get(e)??e.chartConfig??{},displayConfig:e.displayConfig||{}}},query:n&&!Y(c)?{}:c};return{id:e.id,title:e.title,analysisConfig:l,dashboardFilterMapping:e.dashboardFilterMapping,w:e.w,h:e.h,x:e.x,y:e.y}}),filters:t.filters,colorPalette:t.colorPalette},l=t.title;return{result:`Dashboard "${l}" created with ${c.portlets.length} portlets and ${c.filters?.length||0} filters.`,sideEffect:{type:`dashboard_saved`,data:{title:l,description:t.description,dashboardConfig:c}}}}catch(e){return{result:`Failed to save dashboard: ${e instanceof Error?e.message:`Unknown error`}`,isError:!0}}}),i}async function ge(e,t,n){switch(e){case`anthropic`:{let{AnthropicProvider:e}=await Promise.resolve().then(()=>require("./anthropic-CqLkud62.cjs"));return new e(t)}case`openai`:{let{OpenAIProvider:e}=await Promise.resolve().then(()=>require("./openai-
|
|
16
|
+
`)}`,isError:!0};let c={portlets:i.map(e=>{let t=s.get(e)??e.chartType,n=t===`markdown`,r=n?`query`:e.analysisType||`query`,i=r===`funnel`?`funnel`:r===`flow`?`flow`:r===`retention`?`retention`:`query`,a=e.query||`{}`,c;try{c=JSON.parse(a)}catch{c={}}let l={version:1,analysisType:i,activeView:`chart`,charts:{[i]:{chartType:t,chartConfig:o.get(e)??e.chartConfig??{},displayConfig:e.displayConfig||{}}},query:n&&!Y(c)?{}:c};return{id:e.id,title:e.title,analysisConfig:l,dashboardFilterMapping:e.dashboardFilterMapping,w:e.w,h:e.h,x:e.x,y:e.y}}),filters:t.filters,colorPalette:t.colorPalette},l=t.title;return{result:`Dashboard "${l}" created with ${c.portlets.length} portlets and ${c.filters?.length||0} filters.`,sideEffect:{type:`dashboard_saved`,data:{title:l,description:t.description,dashboardConfig:c}}}}catch(e){return{result:`Failed to save dashboard: ${e instanceof Error?e.message:`Unknown error`}`,isError:!0}}}),i}async function ge(e,t,n){switch(e){case`anthropic`:{let{AnthropicProvider:e}=await Promise.resolve().then(()=>require("./anthropic-CqLkud62.cjs"));return new e(t)}case`openai`:{let{OpenAIProvider:e}=await Promise.resolve().then(()=>require("./openai-Cl5zHeHg.cjs"));return new e(t,n)}case`google`:{let{GoogleProvider:e}=await Promise.resolve().then(()=>require("./google-6pofxIfm.cjs"));return new e(t)}default:throw Error(`Unknown LLM provider: "${e}". Supported providers: anthropic, openai, google`)}}function Q(e,t){if(Array.isArray(t))for(let n of t)e.push(n);else e.push(t)}function $(e){if(e)try{e()}catch{}}function _e(e,t){let n=[];if(!e||e.length===0)return n;for(let r of e){if(r.role===`user`){n.push({role:`user`,content:r.content});continue}if(r.role!==`assistant`)continue;let e=[];if(r.content&&e.push({type:`text`,text:r.content}),r.toolCalls&&r.toolCalls.length>0){for(let t of r.toolCalls)e.push({type:`tool_use`,id:t.id,name:t.name,input:t.input||{}});n.push({role:`assistant`,content:e});let i=r.toolCalls.map(e=>({toolUseId:e.id,toolName:e.name,content:typeof e.result==`string`?e.result:JSON.stringify(e.result??``),isError:e.status===`error`}));Q(n,t.formatToolResults(i))}else e.length>0&&n.push({role:`assistant`,content:r.content})}return n}function ve(e,t){if(e?.type===`tool_use`&&t)try{e.input=JSON.parse(t)}catch{e.input={},e.inputParseError=!0}}function ye(e,t){let n=e.contentBlocks[e.contentBlocks.length-1];n&&n.type===`text`?n.text=(n.text||``)+t:e.contentBlocks.push({type:`text`,text:t})}function be(e,t){e.currentBlockIsToolUse&&e.currentToolInputJson&&ve(e.contentBlocks[e.contentBlocks.length-1],e.currentToolInputJson),e.contentBlocks.push({type:`tool_use`,id:t.id,name:t.name,input:{},...t.metadata?{metadata:t.metadata}:{}}),e.currentToolInputJson=``,e.currentBlockIsToolUse=!0}function xe(e,t){if(t.id&&t.input){let n=e.contentBlocks.find(e=>e.type===`tool_use`&&e.id===t.id);n&&(n.input=t.input,t.parseError&&(n.inputParseError=!0))}else if(e.currentBlockIsToolUse){let t=e.contentBlocks[e.contentBlocks.length-1];t?.type===`tool_use`&&e.currentToolInputJson&&(ve(t,e.currentToolInputJson),e.currentToolInputJson=``),e.currentBlockIsToolUse=!1}}async function*Se(e,t){let n={contentBlocks:[],currentToolInputJson:``,currentBlockIsToolUse:!1,stopReason:``};for await(let r of e.parseStreamEvents(t)){let e=r;switch(e.type){case`text_delta`:ye(n,e.text),yield{type:`text_delta`,data:e.text};break;case`tool_use_start`:be(n,e),yield{type:`tool_use_start`,data:{id:e.id,name:e.name,input:void 0}};break;case`tool_input_delta`:n.currentToolInputJson+=e.json;break;case`tool_use_end`:xe(n,e);break;case`message_meta`:e.inputTokens!=null&&(n.inputTokens=e.inputTokens),e.outputTokens!=null&&(n.outputTokens=e.outputTokens),e.stopReason&&(n.stopReason=e.stopReason)}}return{contentBlocks:n.contentBlocks,stopReason:n.stopReason,inputTokens:n.inputTokens,outputTokens:n.outputTokens}}async function*Ce(e,t){let{executor:n,observability:r,traceId:i,turn:a}=t,o=e.name,s=e.input||{},c=e.id;if(e.inputParseError){let e=`Could not parse the arguments you sent for ${o} — they were not valid JSON, so the tool was not run. Call it again with well-formed JSON arguments.`;return yield{type:`tool_use_result`,data:{id:c,name:o,result:e,isError:!0}},$(()=>r?.onToolEnd?.({traceId:i,turn:a,toolName:o,toolUseId:c,isError:!0,durationMs:0})),{toolUseId:c,toolName:o,content:e,isError:!0}}let l=n.get(o);if(!l)return yield{type:`tool_use_result`,data:{id:c,name:o,result:`Unknown tool: ${o}`,isError:!0}},{toolUseId:c,toolName:o,content:`Unknown tool: ${o}`,isError:!0};let u=Date.now();try{let e=await l(s);return e.sideEffect&&(yield e.sideEffect),yield{type:`tool_use_result`,data:{id:c,name:o,input:s,result:e.result,...e.isError?{isError:!0}:{}}},$(()=>r?.onToolEnd?.({traceId:i,turn:a,toolName:o,toolUseId:c,isError:!!e.isError,durationMs:Date.now()-u})),{toolUseId:c,toolName:o,content:e.result,...e.isError?{isError:!0}:{}}}catch(e){let t=e instanceof Error?e.message:`Tool execution failed`;return yield{type:`tool_use_result`,data:{id:c,name:o,result:t,isError:!0}},$(()=>r?.onToolEnd?.({traceId:i,turn:a,toolName:o,toolUseId:c,isError:!0,durationMs:Date.now()-u})),{toolUseId:c,toolName:o,content:t,isError:!0}}}async function*we(e,t){let n=[];for(let r of e){if(r.type!==`tool_use`)continue;let e=yield*Ce(r,t);n.push(e)}return n}var Te={anthropic:`claude-sonnet-4-6`,openai:`gpt-4.1-mini`,google:`gemini-3-flash-preview`};async function*Ee(t){let{message:n,history:r,semanticLayer:i,securityContext:a,agentConfig:o,apiKey:s}=t,c=t.sessionId||crypto.randomUUID(),l=o.observability,d=crypto.randomUUID(),f=Date.now(),p=t.providerOverride||o.provider||`anthropic`,m=t.modelOverride||o.model||Te[p]||`claude-sonnet-4-6`,h=t.baseURLOverride||o.baseURL,g=o.maxTurns||25,_=o.maxTokens||8192,v;try{v=await ge(p,s,{baseURL:h})}catch(t){console.error(`[agent] Failed to create %s provider: %s`,String(p).replace(/\n|\r/g,``),String(t instanceof Error?t.message:t).replace(/\n|\r/g,``)),yield{type:`error`,data:{message:t instanceof Error?t.message:e.Y(`server.errors.llmInitFailed`)}};return}let y=me(),b=he({semanticLayer:i,securityContext:a}),x=u(i.getMetadata(a));t.systemContext&&(x+=`\n\n## User Context\n\n${t.systemContext}`),$(()=>l?.onChatStart?.({traceId:d,sessionId:c,message:n,model:m,historyLength:r?.length??0}));let S=_e(r,v);S.push({role:`user`,content:n});let C=0;try{for(let t=0;t<g;t++){C=t+1;let n=await v.createStream({model:m,maxTokens:_,system:x,tools:y,messages:S}),r=Date.now(),{contentBlocks:i,stopReason:a,inputTokens:o,outputTokens:s}=yield*Se(v,n);if($(()=>l?.onGenerationEnd?.({traceId:d,turn:t,model:m,stopReason:a,inputTokens:o,outputTokens:s,durationMs:Date.now()-r,input:S,output:i})),S.push({role:`assistant`,content:i}),v.isTruncated(a)){yield{type:`error`,data:{message:e.Y(`server.errors.agentResponseTruncated`)}};break}if(!v.shouldContinue(a))break;let c=yield*we(i,{executor:b,observability:l,traceId:d,turn:t});yield{type:`turn_complete`,data:{}},Q(S,v.formatToolResults(c))}$(()=>l?.onChatEnd?.({traceId:d,sessionId:c,totalTurns:C,durationMs:Date.now()-f})),yield{type:`done`,data:{sessionId:c||``,traceId:d}}}catch(e){try{l?.onChatEnd?.({traceId:d,sessionId:c,totalTurns:0,durationMs:Date.now()-f,error:e instanceof Error?e.message:`Unknown error`})}catch{}console.error(`[agent] Chat error (provider=%s, model=%s): %s`,String(p).replace(/\n|\r/g,``),String(m).replace(/\n|\r/g,``),String(e instanceof Error?e.message:e).replace(/\n|\r/g,``)),yield{type:`error`,data:{message:v.formatError(e)}}}}exports.C=_,exports.D=p,exports.E=m,exports.O=f,exports.S=v,exports.T=h,exports._=C,exports.a=M,exports.b=b,exports.c=k,exports.d=ee,exports.f=O,exports.g=w,exports.h=T,exports.handleAgentChat=Ee,exports.i=N,exports.k=d,exports.l=ne,exports.m=E,exports.n=F,exports.o=j,exports.p=D,exports.r=P,exports.s=A,exports.t=I,exports.u=te,exports.v=S,exports.w=g,exports.x=y,exports.y=x;
|