drizzle-cube 0.12.3 → 0.13.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-BSTVDQG3.js +1 -0
- package/dist/adapters/ActivityGridChart.config-D2oLDJki.cjs +1 -0
- package/dist/adapters/AreaChart.config-CaZVNqn-.cjs +1 -0
- package/dist/adapters/AreaChart.config-HUr9G5_c.js +1 -0
- package/dist/adapters/BarChart.config-BhYrmQ9W.js +1 -0
- package/dist/adapters/BarChart.config-BolWSYuN.cjs +1 -0
- package/dist/adapters/BoxPlotChart.config-DUxYeOWV.js +1 -0
- package/dist/adapters/BoxPlotChart.config-DxfUywRi.cjs +1 -0
- package/dist/adapters/BubbleChart.config-CNkdZMOF.cjs +1 -0
- package/dist/adapters/BubbleChart.config-DYtZIaKF.js +1 -0
- package/dist/adapters/CandlestickChart.config-C9ilaGM6.js +1 -0
- package/dist/adapters/CandlestickChart.config-CwOt677r.cjs +1 -0
- package/dist/adapters/DataTable.config-Br-X1vrT.js +1 -0
- package/dist/adapters/DataTable.config-BvuVZ9Jj.cjs +1 -0
- package/dist/adapters/DotStripChart.config-Beuh7di8.js +1 -0
- package/dist/adapters/DotStripChart.config-DViEbi8S.cjs +1 -0
- package/dist/adapters/FunnelChart.config-BnjD49Wp.js +1 -0
- package/dist/adapters/FunnelChart.config-DQob2fw6.cjs +1 -0
- package/dist/adapters/GaugeChart.config-4f1JNOsS.cjs +1 -0
- package/dist/adapters/GaugeChart.config-sHuMiR0R.js +1 -0
- package/dist/adapters/HeatMapChart.config-DGkFw6IU.js +1 -0
- package/dist/adapters/HeatMapChart.config-DUM2mA2Z.cjs +1 -0
- package/dist/adapters/KpiDelta.config-C3lTkG4L.js +1 -0
- package/dist/adapters/KpiDelta.config-KCvw480l.cjs +1 -0
- package/dist/adapters/KpiNumber.config-Bbt4Jk-l.cjs +1 -0
- package/dist/adapters/KpiNumber.config-DpVzsbkJ.js +1 -0
- package/dist/adapters/KpiText.config-B_wDkvrC.cjs +1 -0
- package/dist/adapters/KpiText.config-BpbC9fM8.js +1 -0
- package/dist/adapters/LineChart.config-C0JcDxH6.js +1 -0
- package/dist/adapters/LineChart.config-C2Xvxvxn.cjs +1 -0
- package/dist/adapters/MarkdownChart.config-5EolVJ3p.js +1 -0
- package/dist/adapters/MarkdownChart.config-YvMw-Ve_.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-DYH3OLCF.cjs +1 -0
- package/dist/adapters/MeasureProfileChart.config-DxwRbnb1.js +1 -0
- package/dist/adapters/PieChart.config-DOkkTRV7.cjs +1 -0
- package/dist/adapters/PieChart.config-me-OCnBU.js +1 -0
- package/dist/adapters/ProportionBarChart.config--rJi1BjU.cjs +1 -0
- package/dist/adapters/ProportionBarChart.config-DAyp-gwk.js +1 -0
- package/dist/adapters/RadarChart.config-BA0Qep8F.cjs +1 -0
- package/dist/adapters/RadarChart.config-BMusTmHu.js +1 -0
- package/dist/adapters/RadialBarChart.config-CpN-rQQV.js +1 -0
- package/dist/adapters/RadialBarChart.config-CqKrOZ31.cjs +1 -0
- package/dist/adapters/RecordsTable.config-D1oll1Av.cjs +1 -0
- package/dist/adapters/RecordsTable.config-tQAxFn8Y.js +1 -0
- package/dist/adapters/RetentionCombinedChart.config-CfPPOzHw.js +1 -0
- package/dist/adapters/RetentionCombinedChart.config-DDX-9tjM.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-DzmrQBgA.cjs +1 -0
- package/dist/adapters/RetentionHeatmap.config-sdYuBcId.js +1 -0
- package/dist/adapters/SankeyChart.config-BFkz9AUb.js +1 -0
- package/dist/adapters/SankeyChart.config-BKbMaV-d.cjs +1 -0
- package/dist/adapters/ScatterChart.config-D5tbnMBt.js +1 -0
- package/dist/adapters/ScatterChart.config-DlDcvEw6.cjs +1 -0
- package/dist/adapters/SunburstChart.config-Bb8nbyu6.cjs +1 -0
- package/dist/adapters/SunburstChart.config-CTRj2x0y.js +1 -0
- package/dist/adapters/TreeMapChart.config-DB99vBJS.cjs +1 -0
- package/dist/adapters/TreeMapChart.config-DviTwv0e.js +1 -0
- package/dist/adapters/WaterfallChart.config-CEOy3p3L.js +1 -0
- package/dist/adapters/WaterfallChart.config-DNBLGLpY.cjs +1 -0
- package/dist/adapters/core/index.cjs +1 -1
- package/dist/adapters/core/index.js +1 -1
- package/dist/adapters/{core-CD6SqK5q.js → core-D1FtXGPM.js} +2 -2
- package/dist/adapters/{core-3nDM2f7O.cjs → core-Ib5DN_B6.cjs} +1 -1
- package/dist/adapters/{cors-headers-DYYDrG7S.js → cors-headers-1y1YYuKm.js} +1 -1
- package/dist/adapters/{cors-headers-DxkPVNnZ.cjs → cors-headers-g45-9YKF.cjs} +1 -1
- 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-DSOaXFuV.cjs → handler-C3oYSaVM.cjs} +3 -3
- package/dist/adapters/{handler-B_vsFWWm.js → handler-C9ZFhsv6.js} +32 -32
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +4 -4
- package/dist/adapters/mcp-app-html.cjs +1 -1
- package/dist/adapters/mcp-app-html.d.ts +3 -3
- package/dist/adapters/mcp-app-html.js +5 -1
- package/dist/adapters/mcp-tools.cjs +1 -1
- package/dist/adapters/mcp-tools.d.ts +21 -4
- package/dist/adapters/mcp-tools.js +42 -36
- package/dist/adapters/{mcp-transport-7zszPPXk.cjs → mcp-transport-DnnABB3F.cjs} +1 -1
- package/dist/adapters/{mcp-transport-DVI1lCNM.js → mcp-transport-DpJDF0M_.js} +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +5 -5
- package/dist/adapters/{openai-DA9yrRkA.js → openai-DDdpBh3c.js} +1 -1
- package/dist/adapters/{openai-Bdnnw3Ok.js → openai-DOMIchMU.js} +1 -1
- package/dist/adapters/{openai-JLaT_FPt.cjs → openai-Dxk9OT5p.cjs} +1 -1
- package/dist/adapters/{openai-CE52anhW.cjs → openai-Dxu_8i7e.cjs} +1 -1
- package/dist/adapters/{utils-OLv25-nn.cjs → utils-0Afl53Xc.cjs} +1 -1
- package/dist/adapters/{utils-BtiRfbcX.js → utils-DrbnoHoa.js} +3 -1
- package/dist/adapters/utils.cjs +1 -1
- package/dist/adapters/utils.js +1 -1
- package/dist/cjs/adapters/mcp-app-html.d.ts +3 -3
- package/dist/cjs/adapters/mcp-tools.d.ts +21 -4
- package/dist/cjs/client/components/charts/HeatMapCanvas.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/DashboardContext.d.ts +1 -1
- package/dist/cjs/client/components/dashboard/gridLayoutModule.d.ts +9 -0
- package/dist/cjs/client/hooks/dashboard/useGridLayoutEngine.d.ts +1 -1
- package/dist/cjs/client/hooks/useDashboardHook.d.ts +1 -1
- package/dist/cjs/client/stores/dashboardStore.d.ts +1 -1
- package/dist/cjs/client/types/gridLayout.d.ts +29 -0
- package/dist/client/charts.js +15 -14
- package/dist/client/chunks/ActivityGridChart-BpA0H20k.js +297 -0
- package/dist/client/chunks/ActivityGridChart-BpA0H20k.js.map +1 -0
- package/dist/client/chunks/AngledXAxisTick-CY2hSVQ6.js +23 -0
- package/dist/client/chunks/AngledXAxisTick-CY2hSVQ6.js.map +1 -0
- package/dist/client/chunks/BarSeries-CA5hID9E.js +85 -0
- package/dist/client/chunks/BarSeries-CA5hID9E.js.map +1 -0
- package/dist/client/chunks/BatchCoordinator-DGE3i5Sj.js +315 -0
- package/dist/client/chunks/BatchCoordinator-DGE3i5Sj.js.map +1 -0
- package/dist/client/chunks/BubbleChart-Va-bRr3Y.js +222 -0
- package/dist/client/chunks/BubbleChart-Va-bRr3Y.js.map +1 -0
- package/dist/client/chunks/BubbleChart.helpers-CaDSYRlF.js +1477 -0
- package/dist/client/chunks/BubbleChart.helpers-CaDSYRlF.js.map +1 -0
- package/dist/client/chunks/ChartStates-DV1Jtonz.js +66 -0
- package/dist/client/chunks/ChartStates-DV1Jtonz.js.map +1 -0
- package/dist/client/chunks/ChartSummaryHeader-DSmXm_lT.js +67 -0
- package/dist/client/chunks/ChartSummaryHeader-DSmXm_lT.js.map +1 -0
- package/dist/client/chunks/{DashboardEditModal-F2fGr29d.js → DashboardEditModal-CnbCHKtu.js} +2611 -4403
- package/dist/client/chunks/DashboardEditModal-CnbCHKtu.js.map +1 -0
- package/dist/client/chunks/DataHistogram-zBz4Opmm.js +105 -0
- package/dist/client/chunks/DataHistogram-zBz4Opmm.js.map +1 -0
- package/dist/client/chunks/{DotStripChart-CQaJwo8K.js → DotStripChart-D6o5DpPf.js} +13 -9
- package/dist/client/chunks/{DotStripChart-CQaJwo8K.js.map → DotStripChart-D6o5DpPf.js.map} +1 -1
- package/dist/client/chunks/DotStripChart.config-BbyRO65s.js +118 -0
- package/dist/client/chunks/DotStripChart.config-BbyRO65s.js.map +1 -0
- package/dist/client/chunks/FunnelViews-DwvKEzU7.js +279 -0
- package/dist/client/chunks/FunnelViews-DwvKEzU7.js.map +1 -0
- package/dist/client/chunks/HeatMapChart-DqOZawm3.js +207 -0
- package/dist/client/chunks/HeatMapChart-DqOZawm3.js.map +1 -0
- package/dist/client/chunks/KpiCompactLayout-rsMv3YHG.js +176 -0
- package/dist/client/chunks/KpiCompactLayout-rsMv3YHG.js.map +1 -0
- package/dist/client/chunks/KpiDelta-CUqF9vVH.js +32 -0
- package/dist/client/chunks/KpiDelta-CUqF9vVH.js.map +1 -0
- package/dist/client/chunks/KpiText-Dply9kb4.js +61 -0
- package/dist/client/chunks/KpiText-Dply9kb4.js.map +1 -0
- package/dist/client/chunks/LoadingIndicator-DQ0k6L2K.js +20 -0
- package/dist/client/chunks/LoadingIndicator-DQ0k6L2K.js.map +1 -0
- package/dist/client/chunks/MarkdownChart-BlL5h7nK.js +4672 -0
- package/dist/client/chunks/MarkdownChart-BlL5h7nK.js.map +1 -0
- package/dist/client/chunks/PortletAnalysisModal-CDw3uit7.js +664 -0
- package/dist/client/chunks/PortletAnalysisModal-CDw3uit7.js.map +1 -0
- package/dist/client/chunks/{ProportionBarChart-DiA5ZGeg.js → ProportionBarChart-CK0FlfTr.js} +12 -9
- package/dist/client/chunks/{ProportionBarChart-DiA5ZGeg.js.map → ProportionBarChart-CK0FlfTr.js.map} +1 -1
- package/dist/client/chunks/ProportionBarChart.config-CMtPMCH4.js +65 -0
- package/dist/client/chunks/ProportionBarChart.config-CMtPMCH4.js.map +1 -0
- package/dist/client/chunks/{RecordsTable-Bgqo-LjT.js → RecordsTable-DURm8ypj.js} +22 -18
- package/dist/client/chunks/{RecordsTable-Bgqo-LjT.js.map → RecordsTable-DURm8ypj.js.map} +1 -1
- package/dist/client/chunks/RecordsTable.config-ke4o6xDT.js +71 -0
- package/dist/client/chunks/RecordsTable.config-ke4o6xDT.js.map +1 -0
- package/dist/client/chunks/{RetentionCombinedChart-BtMRtwlb.js → RetentionCombinedChart-90MBVuS7.js} +4 -3
- package/dist/client/chunks/{RetentionCombinedChart-BtMRtwlb.js.map → RetentionCombinedChart-90MBVuS7.js.map} +1 -1
- package/dist/client/chunks/RetentionCombinedChart.config-BHrENGdA.js +53 -0
- package/dist/client/chunks/RetentionCombinedChart.config-BHrENGdA.js.map +1 -0
- package/dist/client/chunks/{RetentionHeatmap-ChTa35gp.js → RetentionHeatmap-ChwWtk6j.js} +2 -2
- package/dist/client/chunks/{RetentionHeatmap-ChTa35gp.js.map → RetentionHeatmap-ChwWtk6j.js.map} +1 -1
- package/dist/client/chunks/RetentionHeatmap.config-Dk4X_BQS.js +22 -0
- package/dist/client/chunks/RetentionHeatmap.config-Dk4X_BQS.js.map +1 -0
- package/dist/client/chunks/ScatterSeries-CJCF4e7H.js +161 -0
- package/dist/client/chunks/ScatterSeries-CJCF4e7H.js.map +1 -0
- package/dist/client/chunks/SchemaVisualization-RWq1-GVI.js +1 -0
- package/dist/client/chunks/TextPortletModal-Fvuzf3mT.js +193 -0
- package/dist/client/chunks/TextPortletModal-Fvuzf3mT.js.map +1 -0
- package/dist/client/chunks/TreeMapLegend-D39xLZ7R.js +258 -0
- package/dist/client/chunks/TreeMapLegend-D39xLZ7R.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-CnmkTZm2.js → analysis-builder-4WfT396_.js} +716 -712
- package/dist/client/chunks/{analysis-builder-CnmkTZm2.js.map → analysis-builder-4WfT396_.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-shared-BsjxOL7r.js → analysis-builder-shared-DQCAOl8f.js} +985 -983
- package/dist/client/chunks/{analysis-builder-shared-BsjxOL7r.js.map → analysis-builder-shared-DQCAOl8f.js.map} +1 -1
- package/dist/client/chunks/cartesianChartHelpers-D6a1iOJI.js +261 -0
- package/dist/client/chunks/cartesianChartHelpers-D6a1iOJI.js.map +1 -0
- package/dist/client/chunks/chart-activity-grid-C0V6erx3.js +133 -0
- package/dist/client/chunks/chart-activity-grid-C0V6erx3.js.map +1 -0
- package/dist/client/chunks/chart-area-D93yaXt_.js +127 -0
- package/dist/client/chunks/chart-area-D93yaXt_.js.map +1 -0
- package/dist/client/chunks/chart-bar-Cm5gacSp.js +131 -0
- package/dist/client/chunks/chart-bar-Cm5gacSp.js.map +1 -0
- package/dist/client/chunks/{chart-box-plot-CW5GZHM9.js → chart-box-plot-XWfiRDvb.js} +13 -11
- package/dist/client/chunks/{chart-box-plot-CW5GZHM9.js.map → chart-box-plot-XWfiRDvb.js.map} +1 -1
- package/dist/client/chunks/chart-bubble-B5eN2Ass.js +97 -0
- package/dist/client/chunks/chart-bubble-B5eN2Ass.js.map +1 -0
- package/dist/client/chunks/{chart-candlestick-BPFeay7t.js → chart-candlestick-DkjqHZaS.js} +4 -3
- package/dist/client/chunks/{chart-candlestick-BPFeay7t.js.map → chart-candlestick-DkjqHZaS.js.map} +1 -1
- package/dist/client/chunks/{chart-config-activity-grid-C4vXGQNu.js → chart-config-activity-grid-BxBwSQOi.js} +2 -2
- package/dist/client/chunks/{chart-config-activity-grid-C4vXGQNu.js.map → chart-config-activity-grid-BxBwSQOi.js.map} +1 -1
- package/dist/client/chunks/chart-config-area-BAQ3OOX8.js +53 -0
- package/dist/client/chunks/chart-config-area-BAQ3OOX8.js.map +1 -0
- package/dist/client/chunks/{chart-config-bar-G2HJJBVV.js → chart-config-bar-BI_fdiHp.js} +7 -7
- package/dist/client/chunks/{chart-config-bar-G2HJJBVV.js.map → chart-config-bar-BI_fdiHp.js.map} +1 -1
- package/dist/client/chunks/{chart-config-box-plot-DMuJZqkr.js → chart-config-box-plot-MlPKB7lL.js} +2 -2
- package/dist/client/chunks/{chart-config-box-plot-DMuJZqkr.js.map → chart-config-box-plot-MlPKB7lL.js.map} +1 -1
- package/dist/client/chunks/{chart-config-bubble-1IyZinH0.js → chart-config-bubble-kkgqYpmA.js} +2 -2
- package/dist/client/chunks/{chart-config-bubble-1IyZinH0.js.map → chart-config-bubble-kkgqYpmA.js.map} +1 -1
- package/dist/client/chunks/{chart-config-candlestick-QwQwJB_-.js → chart-config-candlestick-BROunjEW.js} +2 -2
- package/dist/client/chunks/{chart-config-candlestick-QwQwJB_-.js.map → chart-config-candlestick-BROunjEW.js.map} +1 -1
- package/dist/client/chunks/{chart-config-data-table-CrGyS7aJ.js → chart-config-data-table-B6Qi3Xm7.js} +2 -2
- package/dist/client/chunks/{chart-config-data-table-CrGyS7aJ.js.map → chart-config-data-table-B6Qi3Xm7.js.map} +1 -1
- package/dist/client/chunks/{chart-config-funnel-DMLLKtPF.js → chart-config-funnel-Dd5O8OuZ.js} +2 -2
- package/dist/client/chunks/{chart-config-funnel-DMLLKtPF.js.map → chart-config-funnel-Dd5O8OuZ.js.map} +1 -1
- package/dist/client/chunks/{chart-config-gauge-CJktdjox.js → chart-config-gauge-BHzJ-ajH.js} +2 -2
- package/dist/client/chunks/{chart-config-gauge-CJktdjox.js.map → chart-config-gauge-BHzJ-ajH.js.map} +1 -1
- package/dist/client/chunks/{chart-config-heat-map-CJF65SyL.js → chart-config-heat-map-BQ3lWgrt.js} +2 -2
- package/dist/client/chunks/{chart-config-heat-map-CJF65SyL.js.map → chart-config-heat-map-BQ3lWgrt.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-delta-BIAq1Ftg.js → chart-config-kpi-delta-B_RTgzlg.js} +3 -3
- package/dist/client/chunks/{chart-config-kpi-delta-BIAq1Ftg.js.map → chart-config-kpi-delta-B_RTgzlg.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-number-Dgc4gIYu.js → chart-config-kpi-number-DJAk5ijx.js} +3 -3
- package/dist/client/chunks/{chart-config-kpi-number-Dgc4gIYu.js.map → chart-config-kpi-number-DJAk5ijx.js.map} +1 -1
- package/dist/client/chunks/{chart-config-kpi-text-DnnxvOSA.js → chart-config-kpi-text-xy5s6xuC.js} +2 -2
- package/dist/client/chunks/{chart-config-kpi-text-DnnxvOSA.js.map → chart-config-kpi-text-xy5s6xuC.js.map} +1 -1
- package/dist/client/chunks/{chart-config-line-DLkRs1Zr.js → chart-config-line-IvPzwe7J.js} +9 -9
- package/dist/client/chunks/{chart-config-line-DLkRs1Zr.js.map → chart-config-line-IvPzwe7J.js.map} +1 -1
- package/dist/client/chunks/{chart-config-markdown-CK8PAWUg.js → chart-config-markdown-BWAma-cF.js} +2 -2
- package/dist/client/chunks/{chart-config-markdown-CK8PAWUg.js.map → chart-config-markdown-BWAma-cF.js.map} +1 -1
- package/dist/client/chunks/{chart-config-measure-profile-CRSRIpKh.js → chart-config-measure-profile-CLvcY5Qs.js} +2 -2
- package/dist/client/chunks/{chart-config-measure-profile-CRSRIpKh.js.map → chart-config-measure-profile-CLvcY5Qs.js.map} +1 -1
- package/dist/client/chunks/{chart-config-pie-XrHim0C8.js → chart-config-pie-XmiWQBnz.js} +3 -3
- package/dist/client/chunks/{chart-config-pie-XrHim0C8.js.map → chart-config-pie-XmiWQBnz.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radar-xNS6Juqc.js → chart-config-radar-DgJ6MjX5.js} +3 -3
- package/dist/client/chunks/{chart-config-radar-xNS6Juqc.js.map → chart-config-radar-DgJ6MjX5.js.map} +1 -1
- package/dist/client/chunks/{chart-config-radial-bar-ChUChsEe.js → chart-config-radial-bar-XtEyL4I7.js} +3 -3
- package/dist/client/chunks/{chart-config-radial-bar-ChUChsEe.js.map → chart-config-radial-bar-XtEyL4I7.js.map} +1 -1
- package/dist/client/chunks/{chart-config-sankey-De8E0C1A.js → chart-config-sankey-CbqiUqXk.js} +2 -2
- package/dist/client/chunks/{chart-config-sankey-De8E0C1A.js.map → chart-config-sankey-CbqiUqXk.js.map} +1 -1
- package/dist/client/chunks/{chart-config-scatter-CWA89oX4.js → chart-config-scatter-CpsCAH0E.js} +2 -2
- package/dist/client/chunks/{chart-config-scatter-CWA89oX4.js.map → chart-config-scatter-CpsCAH0E.js.map} +1 -1
- package/dist/client/chunks/{chart-config-sunburst-B4NUYHMH.js → chart-config-sunburst-D_uXQPeS.js} +2 -2
- package/dist/client/chunks/{chart-config-sunburst-B4NUYHMH.js.map → chart-config-sunburst-D_uXQPeS.js.map} +1 -1
- package/dist/client/chunks/{chart-config-tree-map-CnrJ7OC1.js → chart-config-tree-map-BPkeTgk_.js} +3 -3
- package/dist/client/chunks/{chart-config-tree-map-CnrJ7OC1.js.map → chart-config-tree-map-BPkeTgk_.js.map} +1 -1
- package/dist/client/chunks/{chart-config-waterfall-DlQb_PLh.js → chart-config-waterfall-CNLbg6tA.js} +2 -2
- package/dist/client/chunks/{chart-config-waterfall-DlQb_PLh.js.map → chart-config-waterfall-CNLbg6tA.js.map} +1 -1
- package/dist/client/chunks/chart-data-table-LvjMZByO.js +167 -0
- package/dist/client/chunks/chart-data-table-LvjMZByO.js.map +1 -0
- package/dist/client/chunks/chart-funnel-B_YO8r5g.js +34 -0
- package/dist/client/chunks/chart-funnel-B_YO8r5g.js.map +1 -0
- package/dist/client/chunks/chart-gauge-BbcdeJ5v.js +145 -0
- package/dist/client/chunks/chart-gauge-BbcdeJ5v.js.map +1 -0
- package/dist/client/chunks/chart-heat-map-C35lzmXC.js +66 -0
- package/dist/client/chunks/chart-heat-map-C35lzmXC.js.map +1 -0
- package/dist/client/chunks/chart-kpi-delta-DB4S3nWz.js +211 -0
- package/dist/client/chunks/chart-kpi-delta-DB4S3nWz.js.map +1 -0
- package/dist/client/chunks/chart-kpi-number-D_NrcF-S.js +166 -0
- package/dist/client/chunks/chart-kpi-number-D_NrcF-S.js.map +1 -0
- package/dist/client/chunks/chart-kpi-text-CnaJn4Dj.js +132 -0
- package/dist/client/chunks/chart-kpi-text-CnaJn4Dj.js.map +1 -0
- package/dist/client/chunks/{chart-line-D_yFQDze.js → chart-line-B2R3wnGP.js} +35 -28
- package/dist/client/chunks/{chart-line-D_yFQDze.js.map → chart-line-B2R3wnGP.js.map} +1 -1
- package/dist/client/chunks/chart-markdown-DGPf7O38.js +68 -0
- package/dist/client/chunks/chart-markdown-DGPf7O38.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-DOHIm-QY.js → chart-measure-profile-CYli1HVY.js} +14 -10
- package/dist/client/chunks/{chart-measure-profile-DOHIm-QY.js.map → chart-measure-profile-CYli1HVY.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-DLrT81CL.js → chart-pie-CsO68YHG.js} +37 -32
- package/dist/client/chunks/{chart-pie-DLrT81CL.js.map → chart-pie-CsO68YHG.js.map} +1 -1
- package/dist/client/chunks/chart-radar-C17iNC8c.js +99 -0
- package/dist/client/chunks/chart-radar-C17iNC8c.js.map +1 -0
- package/dist/client/chunks/chart-radial-bar-ftFfZ-ob.js +90 -0
- package/dist/client/chunks/chart-radial-bar-ftFfZ-ob.js.map +1 -0
- package/dist/client/chunks/{chart-sankey-CWkctg-k.js → chart-sankey-BUSpiTBN.js} +64 -72
- package/dist/client/chunks/chart-sankey-BUSpiTBN.js.map +1 -0
- package/dist/client/chunks/chart-scatter-Btk1kofc.js +108 -0
- package/dist/client/chunks/chart-scatter-Btk1kofc.js.map +1 -0
- package/dist/client/chunks/{chart-sunburst-9sgiHFSO.js → chart-sunburst-BoaobkAb.js} +5 -4
- package/dist/client/chunks/{chart-sunburst-9sgiHFSO.js.map → chart-sunburst-BoaobkAb.js.map} +1 -1
- package/dist/client/chunks/chart-tree-map-DL_NEnww.js +79 -0
- package/dist/client/chunks/chart-tree-map-DL_NEnww.js.map +1 -0
- package/dist/client/chunks/{chart-waterfall-BS7x0dW-.js → chart-waterfall-FXv1uwLV.js} +17 -13
- package/dist/client/chunks/{chart-waterfall-BS7x0dW-.js.map → chart-waterfall-FXv1uwLV.js.map} +1 -1
- package/dist/client/chunks/chartAxisResolution-s-yFUG-H.js +14 -0
- package/dist/client/chunks/chartAxisResolution-s-yFUG-H.js.map +1 -0
- package/dist/client/chunks/chartComponentRegistry-D5I9EH9T.js +183 -0
- package/dist/client/chunks/chartComponentRegistry-D5I9EH9T.js.map +1 -0
- package/dist/client/chunks/chartConstants-CeG7zZmB.js +32 -0
- package/dist/client/chunks/chartConstants-CeG7zZmB.js.map +1 -0
- package/dist/client/chunks/chartPlugin-BHp3WRCj.js +126 -0
- package/dist/client/chunks/chartPlugin-BHp3WRCj.js.map +1 -0
- package/dist/client/chunks/chartRegistry-Bmubf4iX.js +430 -0
- package/dist/client/chunks/chartRegistry-Bmubf4iX.js.map +1 -0
- package/dist/client/chunks/chartScaffolding-BFh8cJ0z.js +132 -0
- package/dist/client/chunks/chartScaffolding-BFh8cJ0z.js.map +1 -0
- package/dist/client/chunks/chartUtils-BDj8NT4c.js +293 -0
- package/dist/client/chunks/chartUtils-BDj8NT4c.js.map +1 -0
- package/dist/client/chunks/charts-core-CII8LhSd.js +137 -0
- package/dist/client/chunks/charts-core-CII8LhSd.js.map +1 -0
- package/dist/client/chunks/charts-loader-B6kvPaGV.js +164 -0
- package/dist/client/chunks/charts-loader-B6kvPaGV.js.map +1 -0
- package/dist/client/chunks/comparisonUtils-BrJqygLf.js +150 -0
- package/dist/client/chunks/comparisonUtils-BrJqygLf.js.map +1 -0
- package/dist/client/chunks/{core-C6Oh9jUG.js → core-nhQQ5GTQ.js} +2 -2
- package/dist/client/chunks/{core-C6Oh9jUG.js.map → core-nhQQ5GTQ.js.map} +1 -1
- package/dist/client/chunks/{dashboardExport-ZiT4DcDZ.js → dashboardExport-BNWvcHvg.js} +2 -2
- package/dist/client/chunks/{dashboardExport-ZiT4DcDZ.js.map → dashboardExport-BNWvcHvg.js.map} +1 -1
- package/dist/client/chunks/dist-CiyOP0NN.js +3830 -0
- package/dist/client/chunks/dist-CiyOP0NN.js.map +1 -0
- package/dist/client/chunks/exportXlsx-Dnc0ZOJW.js +238 -0
- package/dist/client/chunks/exportXlsx-Dnc0ZOJW.js.map +1 -0
- package/dist/client/chunks/flow-utils-D1Ql5SVc.js +13 -0
- package/dist/client/chunks/flow-utils-D1Ql5SVc.js.map +1 -0
- package/dist/client/chunks/funnel-utils-DM7HviOg.js +107 -0
- package/dist/client/chunks/funnel-utils-DM7HviOg.js.map +1 -0
- package/dist/client/chunks/gaugeChartHelpers-DIizWJgM.js +317 -0
- package/dist/client/chunks/gaugeChartHelpers-DIizWJgM.js.map +1 -0
- package/dist/client/chunks/multiQueryUtils-My_HGw4K.js +104 -0
- package/dist/client/chunks/multiQueryUtils-My_HGw4K.js.map +1 -0
- package/dist/client/chunks/{nl-NL-CKfZudeP.js → nl-NL-D0By-h6j.js} +4 -2
- package/dist/client/chunks/{nl-NL-CKfZudeP.js.map → nl-NL-D0By-h6j.js.map} +1 -1
- package/dist/client/chunks/ordinal-CTFeIYeM.js +67 -0
- package/dist/client/chunks/ordinal-CTFeIYeM.js.map +1 -0
- package/dist/client/chunks/periodUtils-Ce0-vU2S.js +77 -0
- package/dist/client/chunks/periodUtils-Ce0-vU2S.js.map +1 -0
- package/dist/client/chunks/pivotUtils-wtiioqnU.js +117 -0
- package/dist/client/chunks/pivotUtils-wtiioqnU.js.map +1 -0
- package/dist/client/chunks/providers-jeBitA9w.js +238 -0
- package/dist/client/chunks/providers-jeBitA9w.js.map +1 -0
- package/dist/client/chunks/quantize-CaQkhIo6.js +906 -0
- package/dist/client/chunks/quantize-CaQkhIo6.js.map +1 -0
- package/dist/client/chunks/query-shape-Dv_qf-Nn.js +10 -0
- package/dist/client/chunks/query-shape-Dv_qf-Nn.js.map +1 -0
- package/dist/client/chunks/radarChartHelpers-qBWsG55A.js +47 -0
- package/dist/client/chunks/radarChartHelpers-qBWsG55A.js.map +1 -0
- package/dist/client/chunks/radialBarChartHelpers-BSdeHzM7.js +40 -0
- package/dist/client/chunks/radialBarChartHelpers-BSdeHzM7.js.map +1 -0
- package/dist/client/chunks/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-B0aSnxlc.js} +2 -5
- package/dist/client/chunks/{schema-visualization-BO70spCF.js → schema-visualization-D8DYZY2B.js} +115 -106
- package/dist/client/chunks/schema-visualization-D8DYZY2B.js.map +1 -0
- package/dist/client/chunks/targetUtils-SRy303Hh.js +36 -0
- package/dist/client/chunks/targetUtils-SRy303Hh.js.map +1 -0
- package/dist/client/chunks/theme-wFun5b1M.js +100 -0
- package/dist/client/chunks/theme-wFun5b1M.js.map +1 -0
- package/dist/client/chunks/useChartDimensions-Dj85ySRd.js +52 -0
- package/dist/client/chunks/useChartDimensions-Dj85ySRd.js.map +1 -0
- package/dist/client/chunks/useCubeFieldLabel-CFIn-5yX.js +12 -0
- package/dist/client/chunks/useCubeFieldLabel-CFIn-5yX.js.map +1 -0
- package/dist/client/chunks/useCubeMetaQuery-CoYktIQn.js +46 -0
- package/dist/client/chunks/useCubeMetaQuery-CoYktIQn.js.map +1 -0
- package/dist/client/chunks/{useDirtyStateTracking-OVW-JnrF.js → useDirtyStateTracking-BRiIxFzz.js} +84 -81
- package/dist/client/chunks/{useDirtyStateTracking-OVW-JnrF.js.map → useDirtyStateTracking-BRiIxFzz.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-BrjlR24K.js → useExplainAI-Cxzacka-.js} +29 -29
- package/dist/client/chunks/{useExplainAI-BrjlR24K.js.map → useExplainAI-Cxzacka-.js.map} +1 -1
- package/dist/client/chunks/useTheme-Bq_gYwsK.js +27 -0
- package/dist/client/chunks/useTheme-Bq_gYwsK.js.map +1 -0
- package/dist/client/chunks/{chart-activity-grid-DeDPSs12.js → useTranslation-DiobqdOI.js} +38 -1007
- package/dist/client/chunks/useTranslation-DiobqdOI.js.map +1 -0
- package/dist/client/chunks/vendor-BPwAo1-t.js +2466 -0
- package/dist/client/chunks/vendor-BPwAo1-t.js.map +1 -0
- package/dist/client/components/charts/HeatMapCanvas.d.ts +1 -1
- package/dist/client/components/dashboard/DashboardContext.d.ts +1 -1
- package/dist/client/components/dashboard/gridLayoutModule.d.ts +9 -0
- package/dist/client/components.js +1214 -3
- package/dist/client/components.js.map +1 -0
- package/dist/client/hooks/dashboard/useGridLayoutEngine.d.ts +1 -1
- package/dist/client/hooks/useDashboardHook.d.ts +1 -1
- package/dist/client/hooks.js +4 -4
- package/dist/client/icons.js +1846 -1
- package/dist/client/icons.js.map +1 -0
- package/dist/client/index.js +454 -446
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +3 -3
- package/dist/client/schema.js +1 -1
- package/dist/client/stores/dashboardStore.d.ts +1 -1
- package/dist/client/types/gridLayout.d.ts +29 -0
- package/dist/client/utils.js +19 -16
- package/dist/client/utils.js.map +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/mcp-app/mcp-app.html +139 -139
- package/dist/server/index.cjs +1 -1
- package/dist/server/index.js +3 -1
- package/package.json +47 -39
- package/dist/adapters/ActivityGridChart.config-D14_z5sv.js +0 -1
- package/dist/adapters/ActivityGridChart.config-ufhph9uT.cjs +0 -1
- package/dist/adapters/AreaChart.config-0WZQMQva.js +0 -1
- package/dist/adapters/AreaChart.config-D13ltksm.cjs +0 -1
- package/dist/adapters/BarChart.config-CKW_EixK.cjs +0 -1
- package/dist/adapters/BarChart.config-Dap2k5h9.js +0 -1
- package/dist/adapters/BoxPlotChart.config-BL9GycIS.js +0 -1
- package/dist/adapters/BoxPlotChart.config-D8ijk7P0.cjs +0 -1
- package/dist/adapters/BubbleChart.config-B5mdZpOU.js +0 -1
- package/dist/adapters/BubbleChart.config-D_F6Q5z3.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-DWebnARH.cjs +0 -1
- package/dist/adapters/CandlestickChart.config-U_bjkKnh.js +0 -1
- package/dist/adapters/DataTable.config-CgONV9qM.cjs +0 -1
- package/dist/adapters/DataTable.config-Cuagfjxg.js +0 -1
- package/dist/adapters/DotStripChart.config-B5lxjWSO.js +0 -1
- package/dist/adapters/DotStripChart.config-fD9Mc6W1.cjs +0 -1
- package/dist/adapters/FunnelChart.config-BaE_hLT-.js +0 -1
- package/dist/adapters/FunnelChart.config-Cx7W7-R0.cjs +0 -1
- package/dist/adapters/GaugeChart.config-CgKuBQVo.cjs +0 -1
- package/dist/adapters/GaugeChart.config-ilNlLLj6.js +0 -1
- package/dist/adapters/HeatMapChart.config-Bbk6aa8K.js +0 -1
- package/dist/adapters/HeatMapChart.config-CURg_iiu.cjs +0 -1
- package/dist/adapters/KpiDelta.config-CuZ2C_6t.js +0 -1
- package/dist/adapters/KpiDelta.config-DRy870xF.cjs +0 -1
- package/dist/adapters/KpiNumber.config-BWowvaBG.cjs +0 -1
- package/dist/adapters/KpiNumber.config-h9VspPBo.js +0 -1
- package/dist/adapters/KpiText.config-CXouHoxx.js +0 -1
- package/dist/adapters/KpiText.config-dSbcOdVW.cjs +0 -1
- package/dist/adapters/LineChart.config-BrcTc3dO.cjs +0 -1
- package/dist/adapters/LineChart.config-DOZctkmK.js +0 -1
- package/dist/adapters/MarkdownChart.config-BduAIK5N.js +0 -1
- package/dist/adapters/MarkdownChart.config-CFnH92Fg.cjs +0 -1
- package/dist/adapters/MeasureProfileChart.config-BgdtMIbZ.js +0 -1
- package/dist/adapters/MeasureProfileChart.config-CUahwnse.cjs +0 -1
- package/dist/adapters/PieChart.config-Bwf8meCN.js +0 -1
- package/dist/adapters/PieChart.config-ClfJ6LyA.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-CKyen5fP.cjs +0 -1
- package/dist/adapters/ProportionBarChart.config-D7RADfKH.js +0 -1
- package/dist/adapters/RadarChart.config-CBR7pNrt.js +0 -1
- package/dist/adapters/RadarChart.config-DSLRklgx.cjs +0 -1
- package/dist/adapters/RadialBarChart.config-BTGjY6JD.js +0 -1
- package/dist/adapters/RadialBarChart.config-CPbimqdg.cjs +0 -1
- package/dist/adapters/RecordsTable.config-B1Z_3JTJ.js +0 -1
- package/dist/adapters/RecordsTable.config-C6QhLcZk.cjs +0 -1
- package/dist/adapters/RetentionCombinedChart.config-BkSezvSb.js +0 -1
- package/dist/adapters/RetentionCombinedChart.config-R1Eq-xRI.cjs +0 -1
- package/dist/adapters/RetentionHeatmap.config-BlUhtL5W.js +0 -1
- package/dist/adapters/RetentionHeatmap.config-DCIsToqo.cjs +0 -1
- package/dist/adapters/SankeyChart.config-Bt0F2A6e.js +0 -1
- package/dist/adapters/SankeyChart.config-_Z5ZrziF.cjs +0 -1
- package/dist/adapters/ScatterChart.config-BW0_kSo8.cjs +0 -1
- package/dist/adapters/ScatterChart.config-DCaM-v68.js +0 -1
- package/dist/adapters/SunburstChart.config-B8Q9pbbo.js +0 -1
- package/dist/adapters/SunburstChart.config-mhQZB6uc.cjs +0 -1
- package/dist/adapters/TreeMapChart.config-Ch--bdyv.js +0 -1
- package/dist/adapters/TreeMapChart.config-DaNlt1aC.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-CR49XWjE.cjs +0 -1
- package/dist/adapters/WaterfallChart.config-qHaD0m4H.js +0 -1
- package/dist/adapters/mcp-app-html-DkiIh0rL.cjs +0 -1
- package/dist/adapters/mcp-app-html-DwnysAEL.js +0 -5
- package/dist/client/chunks/DashboardEditModal-F2fGr29d.js.map +0 -1
- package/dist/client/chunks/chart-activity-grid-DeDPSs12.js.map +0 -1
- package/dist/client/chunks/chart-area-WyrVYze7.js +0 -961
- package/dist/client/chunks/chart-area-WyrVYze7.js.map +0 -1
- package/dist/client/chunks/chart-bar-wGHC1Hfo.js +0 -201
- package/dist/client/chunks/chart-bar-wGHC1Hfo.js.map +0 -1
- package/dist/client/chunks/chart-bubble-CKkVi7L2.js +0 -221
- package/dist/client/chunks/chart-bubble-CKkVi7L2.js.map +0 -1
- package/dist/client/chunks/chart-config-area-BnsRQ-MY.js +0 -172
- package/dist/client/chunks/chart-config-area-BnsRQ-MY.js.map +0 -1
- package/dist/client/chunks/chart-data-table-uJG1V-be.js +0 -5548
- package/dist/client/chunks/chart-data-table-uJG1V-be.js.map +0 -1
- package/dist/client/chunks/chart-funnel-BtUexI1t.js +0 -409
- package/dist/client/chunks/chart-funnel-BtUexI1t.js.map +0 -1
- package/dist/client/chunks/chart-gauge-BSrfZFsW.js +0 -456
- package/dist/client/chunks/chart-gauge-BSrfZFsW.js.map +0 -1
- package/dist/client/chunks/chart-heat-map-DtMtuFnw.js +0 -236
- package/dist/client/chunks/chart-heat-map-DtMtuFnw.js.map +0 -1
- package/dist/client/chunks/chart-kpi-delta-B0BkN_Q6.js +0 -482
- package/dist/client/chunks/chart-kpi-delta-B0BkN_Q6.js.map +0 -1
- package/dist/client/chunks/chart-kpi-number-zlBkLesi.js +0 -263
- package/dist/client/chunks/chart-kpi-number-zlBkLesi.js.map +0 -1
- package/dist/client/chunks/chart-kpi-text-BXXfkhz_.js +0 -188
- package/dist/client/chunks/chart-kpi-text-BXXfkhz_.js.map +0 -1
- package/dist/client/chunks/chart-markdown-DaBTpRgf.js +0 -8565
- package/dist/client/chunks/chart-markdown-DaBTpRgf.js.map +0 -1
- package/dist/client/chunks/chart-radar-CcXG6k6o.js +0 -138
- package/dist/client/chunks/chart-radar-CcXG6k6o.js.map +0 -1
- package/dist/client/chunks/chart-radial-bar-DYn5FLrG.js +0 -122
- package/dist/client/chunks/chart-radial-bar-DYn5FLrG.js.map +0 -1
- package/dist/client/chunks/chart-sankey-CWkctg-k.js.map +0 -1
- package/dist/client/chunks/chart-scatter-CCGL2IEP.js +0 -258
- package/dist/client/chunks/chart-scatter-CCGL2IEP.js.map +0 -1
- package/dist/client/chunks/chart-tree-map-DOWeXCn_.js +0 -325
- package/dist/client/chunks/chart-tree-map-DOWeXCn_.js.map +0 -1
- package/dist/client/chunks/charts-core-DM-Eav_9.js +0 -190
- package/dist/client/chunks/charts-core-DM-Eav_9.js.map +0 -1
- package/dist/client/chunks/charts-loader-3N-LqjLk.js +0 -87
- package/dist/client/chunks/charts-loader-3N-LqjLk.js.map +0 -1
- package/dist/client/chunks/exceljs.min-BqhtpmKc.js +0 -32036
- package/dist/client/chunks/exceljs.min-BqhtpmKc.js.map +0 -1
- package/dist/client/chunks/providers-DwQCKdGW.js +0 -7
- package/dist/client/chunks/providers-DwQCKdGW.js.map +0 -1
- package/dist/client/chunks/schema-visualization-BO70spCF.js.map +0 -1
- package/dist/client/chunks/vendor-Das3qwov.js +0 -881
- package/dist/client/chunks/vendor-Das3qwov.js.map +0 -1
|
@@ -0,0 +1,2466 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-B0aSnxlc.js";
|
|
2
|
+
import t, * as n from "react";
|
|
3
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
+
//#region node_modules/@tanstack/react-query/build/modern/QueryClientProvider.js
|
|
5
|
+
var i = n.createContext(void 0), a = (e) => {
|
|
6
|
+
let t = n.useContext(i);
|
|
7
|
+
if (e) return e;
|
|
8
|
+
if (!t) throw Error("No QueryClient set, use QueryClientProvider to set one");
|
|
9
|
+
return t;
|
|
10
|
+
}, o = ({ client: e, children: t }) => (n.useEffect(() => (e.mount(), () => {
|
|
11
|
+
e.unmount();
|
|
12
|
+
}), [e]), /* @__PURE__ */ r(i.Provider, {
|
|
13
|
+
value: e,
|
|
14
|
+
children: t
|
|
15
|
+
})), s = {
|
|
16
|
+
setTimeout: (e, t) => setTimeout(e, t),
|
|
17
|
+
clearTimeout: (e) => clearTimeout(e),
|
|
18
|
+
setInterval: (e, t) => setInterval(e, t),
|
|
19
|
+
clearInterval: (e) => clearInterval(e)
|
|
20
|
+
}, c = new class {
|
|
21
|
+
#e = s;
|
|
22
|
+
#t = !1;
|
|
23
|
+
setTimeoutProvider(e) {
|
|
24
|
+
process.env.NODE_ENV !== "production" && this.#t && e !== this.#e && console.error("[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.", {
|
|
25
|
+
previous: this.#e,
|
|
26
|
+
provider: e
|
|
27
|
+
}), this.#e = e, process.env.NODE_ENV !== "production" && (this.#t = !1);
|
|
28
|
+
}
|
|
29
|
+
setTimeout(e, t) {
|
|
30
|
+
return process.env.NODE_ENV !== "production" && (this.#t = !0), this.#e.setTimeout(e, t);
|
|
31
|
+
}
|
|
32
|
+
clearTimeout(e) {
|
|
33
|
+
this.#e.clearTimeout(e);
|
|
34
|
+
}
|
|
35
|
+
setInterval(e, t) {
|
|
36
|
+
return process.env.NODE_ENV !== "production" && (this.#t = !0), this.#e.setInterval(e, t);
|
|
37
|
+
}
|
|
38
|
+
clearInterval(e) {
|
|
39
|
+
this.#e.clearInterval(e);
|
|
40
|
+
}
|
|
41
|
+
}();
|
|
42
|
+
function l(e) {
|
|
43
|
+
setTimeout(e, 0);
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region node_modules/@tanstack/query-core/build/modern/utils.js
|
|
47
|
+
var u = typeof window > "u" || "Deno" in globalThis;
|
|
48
|
+
function d() {}
|
|
49
|
+
function f(e, t) {
|
|
50
|
+
return typeof e == "function" ? e(t) : e;
|
|
51
|
+
}
|
|
52
|
+
function p(e) {
|
|
53
|
+
return typeof e == "number" && e >= 0 && e !== Infinity;
|
|
54
|
+
}
|
|
55
|
+
function m(e, t) {
|
|
56
|
+
return Math.max(e + (t || 0) - Date.now(), 0);
|
|
57
|
+
}
|
|
58
|
+
function h(e, t) {
|
|
59
|
+
return typeof e == "function" ? e(t) : e;
|
|
60
|
+
}
|
|
61
|
+
function g(e, t) {
|
|
62
|
+
let { type: n = "all", exact: r, fetchStatus: i, predicate: a, queryKey: o, stale: s } = e;
|
|
63
|
+
if (o) {
|
|
64
|
+
if (r) {
|
|
65
|
+
if (t.queryHash !== v(o, t.options)) return !1;
|
|
66
|
+
} else if (!b(t.queryKey, o)) return !1;
|
|
67
|
+
}
|
|
68
|
+
if (n !== "all") {
|
|
69
|
+
let e = t.isActive();
|
|
70
|
+
if (n === "active" && !e || n === "inactive" && e) return !1;
|
|
71
|
+
}
|
|
72
|
+
return !(typeof s == "boolean" && t.isStale() !== s || i && i !== t.state.fetchStatus || a && !a(t));
|
|
73
|
+
}
|
|
74
|
+
function _(e, t) {
|
|
75
|
+
let { exact: n, status: r, predicate: i, mutationKey: a } = e;
|
|
76
|
+
if (a) {
|
|
77
|
+
if (!t.options.mutationKey) return !1;
|
|
78
|
+
if (n) {
|
|
79
|
+
if (y(t.options.mutationKey) !== y(a)) return !1;
|
|
80
|
+
} else if (!b(t.options.mutationKey, a)) return !1;
|
|
81
|
+
}
|
|
82
|
+
return !(r && t.state.status !== r || i && !i(t));
|
|
83
|
+
}
|
|
84
|
+
function v(e, t) {
|
|
85
|
+
return (t?.queryKeyHashFn || y)(e);
|
|
86
|
+
}
|
|
87
|
+
function y(e) {
|
|
88
|
+
return JSON.stringify(e, (e, t) => w(t) ? Object.keys(t).sort().reduce((e, n) => (e[n] = t[n], e), {}) : t);
|
|
89
|
+
}
|
|
90
|
+
function b(e, t) {
|
|
91
|
+
if (e === t) return !0;
|
|
92
|
+
if (typeof e != typeof t) return !1;
|
|
93
|
+
if (e && t && typeof e == "object" && typeof t == "object") {
|
|
94
|
+
if (Array.isArray(e) && Array.isArray(t)) {
|
|
95
|
+
if (t.length > e.length) return !1;
|
|
96
|
+
for (let n = 0; n < t.length; n++) if (!b(e[n], t[n])) return !1;
|
|
97
|
+
return !0;
|
|
98
|
+
}
|
|
99
|
+
let n = Object.keys(t);
|
|
100
|
+
for (let r of n) if (!b(e[r], t[r])) return !1;
|
|
101
|
+
return !0;
|
|
102
|
+
}
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
var x = Object.prototype.hasOwnProperty;
|
|
106
|
+
function S(e, t, n = 0) {
|
|
107
|
+
if (e === t) return e;
|
|
108
|
+
if (n > 500) return t;
|
|
109
|
+
let r = ee(e) && ee(t);
|
|
110
|
+
if (!r && !(w(e) && w(t))) return t;
|
|
111
|
+
let i = (r ? e : Object.keys(e)).length, a = r ? t : Object.keys(t), o = a.length, s = r ? Array(o) : {}, c = 0;
|
|
112
|
+
for (let l = 0; l < o; l++) {
|
|
113
|
+
let o = r ? l : a[l], u = e[o], d = t[o];
|
|
114
|
+
if (u === d) {
|
|
115
|
+
s[o] = u, (r ? l < i : x.call(e, o)) && c++;
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (u === null || d === null || typeof u != "object" || typeof d != "object") {
|
|
119
|
+
s[o] = d;
|
|
120
|
+
continue;
|
|
121
|
+
}
|
|
122
|
+
let f = S(u, d, n + 1);
|
|
123
|
+
s[o] = f, f === u && c++;
|
|
124
|
+
}
|
|
125
|
+
return i === o && c === i ? e : s;
|
|
126
|
+
}
|
|
127
|
+
function C(e, t) {
|
|
128
|
+
if (!t || Object.keys(e).length !== Object.keys(t).length) return !1;
|
|
129
|
+
for (let n in e) if (e[n] !== t[n]) return !1;
|
|
130
|
+
return !0;
|
|
131
|
+
}
|
|
132
|
+
function ee(e) {
|
|
133
|
+
return Array.isArray(e) && e.length === Object.keys(e).length;
|
|
134
|
+
}
|
|
135
|
+
function w(e) {
|
|
136
|
+
if (!te(e)) return !1;
|
|
137
|
+
let t = Object.getPrototypeOf(e), n = t?.constructor;
|
|
138
|
+
if (n === void 0) return !0;
|
|
139
|
+
if (typeof n != "function") return !1;
|
|
140
|
+
let r = n.prototype;
|
|
141
|
+
return !(!te(r) || !r.hasOwnProperty("isPrototypeOf") || t !== Object.prototype);
|
|
142
|
+
}
|
|
143
|
+
function te(e) {
|
|
144
|
+
return Object.prototype.toString.call(e) === "[object Object]";
|
|
145
|
+
}
|
|
146
|
+
function ne(e) {
|
|
147
|
+
return new Promise((t) => {
|
|
148
|
+
c.setTimeout(t, e);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
function T(e, t, n) {
|
|
152
|
+
if (typeof n.structuralSharing == "function") return n.structuralSharing(e, t);
|
|
153
|
+
if (n.structuralSharing !== !1) {
|
|
154
|
+
if (process.env.NODE_ENV !== "production") try {
|
|
155
|
+
return S(e, t);
|
|
156
|
+
} catch (e) {
|
|
157
|
+
throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`), e;
|
|
158
|
+
}
|
|
159
|
+
return S(e, t);
|
|
160
|
+
}
|
|
161
|
+
return t;
|
|
162
|
+
}
|
|
163
|
+
function re(e, t, n = 0) {
|
|
164
|
+
let r = [...e, t];
|
|
165
|
+
return n && r.length > n ? r.slice(1) : r;
|
|
166
|
+
}
|
|
167
|
+
function ie(e, t, n = 0) {
|
|
168
|
+
let r = [t, ...e];
|
|
169
|
+
return n && r.length > n ? r.slice(0, -1) : r;
|
|
170
|
+
}
|
|
171
|
+
var E = Symbol();
|
|
172
|
+
function ae(e, t) {
|
|
173
|
+
return process.env.NODE_ENV !== "production" && e.queryFn === E && console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`), !e.queryFn && t?.initialPromise ? () => t.initialPromise : !e.queryFn || e.queryFn === E ? () => Promise.reject(/* @__PURE__ */ Error(`Missing queryFn: '${e.queryHash}'`)) : e.queryFn;
|
|
174
|
+
}
|
|
175
|
+
function D(e, t) {
|
|
176
|
+
return typeof e == "function" ? e(...t) : !!e;
|
|
177
|
+
}
|
|
178
|
+
function oe(e, t, n) {
|
|
179
|
+
let r = !1, i;
|
|
180
|
+
return Object.defineProperty(e, "signal", {
|
|
181
|
+
enumerable: !0,
|
|
182
|
+
get: () => (i ??= t(), r || (r = !0, i.aborted ? n() : i.addEventListener("abort", n, { once: !0 })), i)
|
|
183
|
+
}), e;
|
|
184
|
+
}
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region node_modules/@tanstack/query-core/build/modern/environmentManager.js
|
|
187
|
+
var se = () => u, O = () => se(), k = class {
|
|
188
|
+
constructor() {
|
|
189
|
+
this.listeners = /* @__PURE__ */ new Set(), this.subscribe = this.subscribe.bind(this);
|
|
190
|
+
}
|
|
191
|
+
subscribe(e) {
|
|
192
|
+
return this.listeners.add(e), this.onSubscribe(), () => {
|
|
193
|
+
this.listeners.delete(e), this.onUnsubscribe();
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
hasListeners() {
|
|
197
|
+
return this.listeners.size > 0;
|
|
198
|
+
}
|
|
199
|
+
onSubscribe() {}
|
|
200
|
+
onUnsubscribe() {}
|
|
201
|
+
}, A = new class extends k {
|
|
202
|
+
#e;
|
|
203
|
+
#t;
|
|
204
|
+
#n;
|
|
205
|
+
constructor() {
|
|
206
|
+
super(), this.#n = (e) => {
|
|
207
|
+
if (typeof window < "u" && window.addEventListener) {
|
|
208
|
+
let t = () => e();
|
|
209
|
+
return window.addEventListener("visibilitychange", t, !1), () => {
|
|
210
|
+
window.removeEventListener("visibilitychange", t);
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
onSubscribe() {
|
|
216
|
+
this.#t || this.setEventListener(this.#n);
|
|
217
|
+
}
|
|
218
|
+
onUnsubscribe() {
|
|
219
|
+
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
220
|
+
}
|
|
221
|
+
setEventListener(e) {
|
|
222
|
+
this.#n = e, this.#t?.(), this.#t = e((e) => {
|
|
223
|
+
typeof e == "boolean" ? this.setFocused(e) : this.onFocus();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
setFocused(e) {
|
|
227
|
+
this.#e !== e && (this.#e = e, this.onFocus());
|
|
228
|
+
}
|
|
229
|
+
onFocus() {
|
|
230
|
+
let e = this.isFocused();
|
|
231
|
+
this.listeners.forEach((t) => {
|
|
232
|
+
t(e);
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
isFocused() {
|
|
236
|
+
return typeof this.#e == "boolean" ? this.#e : globalThis.document?.visibilityState !== "hidden";
|
|
237
|
+
}
|
|
238
|
+
}(), ce = l;
|
|
239
|
+
function le() {
|
|
240
|
+
let e = [], t = 0, n = (e) => {
|
|
241
|
+
e();
|
|
242
|
+
}, r = (e) => {
|
|
243
|
+
e();
|
|
244
|
+
}, i = ce, a = (r) => {
|
|
245
|
+
t ? e.push(r) : i(() => {
|
|
246
|
+
n(r);
|
|
247
|
+
});
|
|
248
|
+
}, o = () => {
|
|
249
|
+
let t = e;
|
|
250
|
+
e = [], t.length && i(() => {
|
|
251
|
+
r(() => {
|
|
252
|
+
t.forEach((e) => {
|
|
253
|
+
n(e);
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
return {
|
|
259
|
+
batch: (e) => {
|
|
260
|
+
let n;
|
|
261
|
+
t++;
|
|
262
|
+
try {
|
|
263
|
+
n = e();
|
|
264
|
+
} finally {
|
|
265
|
+
t--, t || o();
|
|
266
|
+
}
|
|
267
|
+
return n;
|
|
268
|
+
},
|
|
269
|
+
batchCalls: (e) => (...t) => {
|
|
270
|
+
a(() => {
|
|
271
|
+
e(...t);
|
|
272
|
+
});
|
|
273
|
+
},
|
|
274
|
+
schedule: a,
|
|
275
|
+
setNotifyFunction: (e) => {
|
|
276
|
+
n = e;
|
|
277
|
+
},
|
|
278
|
+
setBatchNotifyFunction: (e) => {
|
|
279
|
+
r = e;
|
|
280
|
+
},
|
|
281
|
+
setScheduler: (e) => {
|
|
282
|
+
i = e;
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
}
|
|
286
|
+
var j = le(), M = new class extends k {
|
|
287
|
+
#e = !0;
|
|
288
|
+
#t;
|
|
289
|
+
#n;
|
|
290
|
+
constructor() {
|
|
291
|
+
super(), this.#n = (e) => {
|
|
292
|
+
if (typeof window < "u" && window.addEventListener) {
|
|
293
|
+
let t = () => e(!0), n = () => e(!1);
|
|
294
|
+
return window.addEventListener("online", t, !1), window.addEventListener("offline", n, !1), () => {
|
|
295
|
+
window.removeEventListener("online", t), window.removeEventListener("offline", n);
|
|
296
|
+
};
|
|
297
|
+
}
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
onSubscribe() {
|
|
301
|
+
this.#t || this.setEventListener(this.#n);
|
|
302
|
+
}
|
|
303
|
+
onUnsubscribe() {
|
|
304
|
+
this.hasListeners() || (this.#t?.(), this.#t = void 0);
|
|
305
|
+
}
|
|
306
|
+
setEventListener(e) {
|
|
307
|
+
this.#n = e, this.#t?.(), this.#t = e(this.setOnline.bind(this));
|
|
308
|
+
}
|
|
309
|
+
setOnline(e) {
|
|
310
|
+
this.#e !== e && (this.#e = e, this.listeners.forEach((t) => {
|
|
311
|
+
t(e);
|
|
312
|
+
}));
|
|
313
|
+
}
|
|
314
|
+
isOnline() {
|
|
315
|
+
return this.#e;
|
|
316
|
+
}
|
|
317
|
+
}();
|
|
318
|
+
//#endregion
|
|
319
|
+
//#region node_modules/@tanstack/query-core/build/modern/retryer.js
|
|
320
|
+
function ue(e) {
|
|
321
|
+
return Math.min(1e3 * 2 ** e, 3e4);
|
|
322
|
+
}
|
|
323
|
+
function de(e) {
|
|
324
|
+
return (e ?? "online") !== "online" || M.isOnline();
|
|
325
|
+
}
|
|
326
|
+
var N = class extends Error {
|
|
327
|
+
constructor(e) {
|
|
328
|
+
super("CancelledError"), this.revert = e?.revert, this.silent = e?.silent;
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
function fe(e) {
|
|
332
|
+
let t = !1, n = 0, r, i = "pending", a, o, s = new Promise((e, t) => {
|
|
333
|
+
a = e, o = t;
|
|
334
|
+
});
|
|
335
|
+
s.catch(d);
|
|
336
|
+
let c = () => i !== "pending", l = (t) => {
|
|
337
|
+
if (!c()) {
|
|
338
|
+
let n = new N(t);
|
|
339
|
+
g(n), e.onCancel?.(n);
|
|
340
|
+
}
|
|
341
|
+
}, u = () => {
|
|
342
|
+
t = !0;
|
|
343
|
+
}, f = () => {
|
|
344
|
+
t = !1;
|
|
345
|
+
}, p = () => A.isFocused() && (e.networkMode === "always" || M.isOnline()) && e.canRun(), m = () => de(e.networkMode) && e.canRun(), h = (e) => {
|
|
346
|
+
c() || (r?.(), i = "resolved", a(e));
|
|
347
|
+
}, g = (e) => {
|
|
348
|
+
c() || (r?.(), i = "rejected", o(e));
|
|
349
|
+
}, _ = () => new Promise((t) => {
|
|
350
|
+
r = (e) => {
|
|
351
|
+
(c() || p()) && t(e);
|
|
352
|
+
}, e.onPause?.();
|
|
353
|
+
}).then(() => {
|
|
354
|
+
r = void 0, c() || e.onContinue?.();
|
|
355
|
+
}), v = () => {
|
|
356
|
+
if (c()) return;
|
|
357
|
+
let r, i = n === 0 ? e.initialPromise : void 0;
|
|
358
|
+
try {
|
|
359
|
+
r = i ?? e.fn();
|
|
360
|
+
} catch (e) {
|
|
361
|
+
r = Promise.reject(e);
|
|
362
|
+
}
|
|
363
|
+
Promise.resolve(r).then(h).catch((r) => {
|
|
364
|
+
if (c()) return;
|
|
365
|
+
let i = e.retry ?? (O() ? 0 : 3), a = e.retryDelay ?? ue, o = typeof a == "function" ? a(n, r) : a, s = i === !0 || typeof i == "number" && n < i || typeof i == "function" && i(n, r);
|
|
366
|
+
t || !s ? g(r) : (n++, e.onFail?.(n, r), ne(o).then(() => p() ? void 0 : _()).then(() => {
|
|
367
|
+
t ? g(r) : v();
|
|
368
|
+
}));
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
return {
|
|
372
|
+
promise: s,
|
|
373
|
+
status: () => i,
|
|
374
|
+
cancel: l,
|
|
375
|
+
continue: () => (r?.(), s),
|
|
376
|
+
cancelRetry: u,
|
|
377
|
+
continueRetry: f,
|
|
378
|
+
canStart: m,
|
|
379
|
+
start: () => (m() ? v() : _().then(v), s)
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
//#endregion
|
|
383
|
+
//#region node_modules/@tanstack/query-core/build/modern/removable.js
|
|
384
|
+
var P = class {
|
|
385
|
+
#e;
|
|
386
|
+
destroy() {
|
|
387
|
+
this.clearGcTimeout();
|
|
388
|
+
}
|
|
389
|
+
scheduleGc() {
|
|
390
|
+
this.clearGcTimeout(), p(this.gcTime) && (this.#e = c.setTimeout(() => {
|
|
391
|
+
this.optionalRemove();
|
|
392
|
+
}, this.gcTime));
|
|
393
|
+
}
|
|
394
|
+
updateGcTime(e) {
|
|
395
|
+
this.gcTime = Math.max(this.gcTime || 0, e ?? (O() ? Infinity : 3e5));
|
|
396
|
+
}
|
|
397
|
+
clearGcTimeout() {
|
|
398
|
+
this.#e !== void 0 && (c.clearTimeout(this.#e), this.#e = void 0);
|
|
399
|
+
}
|
|
400
|
+
};
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region node_modules/@tanstack/query-core/build/modern/infiniteQueryBehavior.js
|
|
403
|
+
function pe(e) {
|
|
404
|
+
return { onFetch: (t, n) => {
|
|
405
|
+
let r = t.options, i = t.fetchOptions?.meta?.fetchMore?.direction, a = t.state.data?.pages || [], o = t.state.data?.pageParams || [], s = {
|
|
406
|
+
pages: [],
|
|
407
|
+
pageParams: []
|
|
408
|
+
}, c = 0, l = async () => {
|
|
409
|
+
let n = !1, l = (e) => {
|
|
410
|
+
oe(e, () => t.signal, () => n = !0);
|
|
411
|
+
}, u = ae(t.options, t.fetchOptions), d = async (e, r, i) => {
|
|
412
|
+
if (n) return Promise.reject(t.signal.reason);
|
|
413
|
+
if (r == null && e.pages.length) return Promise.resolve(e);
|
|
414
|
+
let a = (() => {
|
|
415
|
+
let e = {
|
|
416
|
+
client: t.client,
|
|
417
|
+
queryKey: t.queryKey,
|
|
418
|
+
pageParam: r,
|
|
419
|
+
direction: i ? "backward" : "forward",
|
|
420
|
+
meta: t.options.meta
|
|
421
|
+
};
|
|
422
|
+
return l(e), e;
|
|
423
|
+
})(), o = await u(a), { maxPages: s } = t.options, c = i ? ie : re;
|
|
424
|
+
return {
|
|
425
|
+
pages: c(e.pages, o, s),
|
|
426
|
+
pageParams: c(e.pageParams, r, s)
|
|
427
|
+
};
|
|
428
|
+
};
|
|
429
|
+
if (i && a.length) {
|
|
430
|
+
let e = i === "backward", t = e ? me : F, n = {
|
|
431
|
+
pages: a,
|
|
432
|
+
pageParams: o
|
|
433
|
+
};
|
|
434
|
+
s = await d(n, t(r, n), e);
|
|
435
|
+
} else {
|
|
436
|
+
let t = e ?? a.length;
|
|
437
|
+
do {
|
|
438
|
+
let e = c === 0 ? o[0] ?? r.initialPageParam : F(r, s);
|
|
439
|
+
if (c > 0 && e == null) break;
|
|
440
|
+
s = await d(s, e), c++;
|
|
441
|
+
} while (c < t);
|
|
442
|
+
}
|
|
443
|
+
return s;
|
|
444
|
+
};
|
|
445
|
+
t.fetchFn = t.options.persister ? () => t.options.persister?.(l, {
|
|
446
|
+
client: t.client,
|
|
447
|
+
queryKey: t.queryKey,
|
|
448
|
+
meta: t.options.meta,
|
|
449
|
+
signal: t.signal
|
|
450
|
+
}, n) : l;
|
|
451
|
+
} };
|
|
452
|
+
}
|
|
453
|
+
function F(e, { pages: t, pageParams: n }) {
|
|
454
|
+
let r = t.length - 1;
|
|
455
|
+
return t.length > 0 ? e.getNextPageParam(t[r], t, n[r], n) : void 0;
|
|
456
|
+
}
|
|
457
|
+
function me(e, { pages: t, pageParams: n }) {
|
|
458
|
+
return t.length > 0 ? e.getPreviousPageParam?.(t[0], t, n[0], n) : void 0;
|
|
459
|
+
}
|
|
460
|
+
//#endregion
|
|
461
|
+
//#region node_modules/@tanstack/query-core/build/modern/query.js
|
|
462
|
+
var he = class extends P {
|
|
463
|
+
#e;
|
|
464
|
+
#t;
|
|
465
|
+
#n;
|
|
466
|
+
#r;
|
|
467
|
+
#i;
|
|
468
|
+
#a;
|
|
469
|
+
#o;
|
|
470
|
+
#s;
|
|
471
|
+
constructor(e) {
|
|
472
|
+
super(), this.#s = !1, this.#o = e.defaultOptions, this.setOptions(e.options), this.observers = [], this.#i = e.client, this.#r = this.#i.getQueryCache(), this.queryKey = e.queryKey, this.queryHash = e.queryHash, this.#t = R(this.options), this.state = e.state ?? this.#t, this.scheduleGc();
|
|
473
|
+
}
|
|
474
|
+
get meta() {
|
|
475
|
+
return this.options.meta;
|
|
476
|
+
}
|
|
477
|
+
get queryType() {
|
|
478
|
+
return this.#e;
|
|
479
|
+
}
|
|
480
|
+
get promise() {
|
|
481
|
+
return this.#a?.promise;
|
|
482
|
+
}
|
|
483
|
+
setOptions(e) {
|
|
484
|
+
if (this.options = {
|
|
485
|
+
...this.#o,
|
|
486
|
+
...e
|
|
487
|
+
}, e?._type && (this.#e = e._type), this.updateGcTime(this.options.gcTime), this.state && this.state.data === void 0) {
|
|
488
|
+
let e = R(this.options);
|
|
489
|
+
e.data !== void 0 && (this.setState(L(e.data, e.dataUpdatedAt)), this.#t = e);
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
optionalRemove() {
|
|
493
|
+
!this.observers.length && this.state.fetchStatus === "idle" && this.#r.remove(this);
|
|
494
|
+
}
|
|
495
|
+
setData(e, t) {
|
|
496
|
+
let n = T(this.state.data, e, this.options);
|
|
497
|
+
return this.#c({
|
|
498
|
+
data: n,
|
|
499
|
+
type: "success",
|
|
500
|
+
dataUpdatedAt: t?.updatedAt,
|
|
501
|
+
manual: t?.manual
|
|
502
|
+
}), n;
|
|
503
|
+
}
|
|
504
|
+
setState(e) {
|
|
505
|
+
this.#c({
|
|
506
|
+
type: "setState",
|
|
507
|
+
state: e
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
cancel(e) {
|
|
511
|
+
let t = this.#a?.promise;
|
|
512
|
+
return this.#a?.cancel(e), t ? t.then(d).catch(d) : Promise.resolve();
|
|
513
|
+
}
|
|
514
|
+
destroy() {
|
|
515
|
+
super.destroy(), this.cancel({ silent: !0 });
|
|
516
|
+
}
|
|
517
|
+
get resetState() {
|
|
518
|
+
return this.#t;
|
|
519
|
+
}
|
|
520
|
+
reset() {
|
|
521
|
+
this.destroy(), this.setState(this.resetState);
|
|
522
|
+
}
|
|
523
|
+
isActive() {
|
|
524
|
+
return this.observers.some((e) => h(e.options.enabled, this) !== !1);
|
|
525
|
+
}
|
|
526
|
+
isDisabled() {
|
|
527
|
+
return this.getObserversCount() > 0 ? !this.isActive() : this.options.queryFn === E || !this.isFetched();
|
|
528
|
+
}
|
|
529
|
+
isFetched() {
|
|
530
|
+
return this.state.dataUpdateCount + this.state.errorUpdateCount > 0;
|
|
531
|
+
}
|
|
532
|
+
isStatic() {
|
|
533
|
+
return this.getObserversCount() > 0 && this.observers.some((e) => h(e.options.staleTime, this) === "static");
|
|
534
|
+
}
|
|
535
|
+
isStale() {
|
|
536
|
+
return this.getObserversCount() > 0 ? this.observers.some((e) => e.getCurrentResult().isStale) : this.state.data === void 0 || this.state.isInvalidated;
|
|
537
|
+
}
|
|
538
|
+
isStaleByTime(e = 0) {
|
|
539
|
+
return this.state.data === void 0 ? !0 : e === "static" ? !1 : this.state.isInvalidated ? !0 : !m(this.state.dataUpdatedAt, e);
|
|
540
|
+
}
|
|
541
|
+
onFocus() {
|
|
542
|
+
this.observers.find((e) => e.shouldFetchOnWindowFocus())?.refetch({ cancelRefetch: !1 }), this.#a?.continue();
|
|
543
|
+
}
|
|
544
|
+
onOnline() {
|
|
545
|
+
this.observers.find((e) => e.shouldFetchOnReconnect())?.refetch({ cancelRefetch: !1 }), this.#a?.continue();
|
|
546
|
+
}
|
|
547
|
+
addObserver(e) {
|
|
548
|
+
this.observers.includes(e) || (this.observers.push(e), this.clearGcTimeout(), this.#r.notify({
|
|
549
|
+
type: "observerAdded",
|
|
550
|
+
query: this,
|
|
551
|
+
observer: e
|
|
552
|
+
}));
|
|
553
|
+
}
|
|
554
|
+
removeObserver(e) {
|
|
555
|
+
let t = this.observers.indexOf(e);
|
|
556
|
+
t !== -1 && (this.observers.splice(t, 1), this.observers.length || (this.#a && (this.#s || this.state.fetchStatus === "paused" && this.state.status === "pending" ? this.#a.cancel({ revert: !0 }) : this.#a.cancelRetry()), this.scheduleGc()), this.#r.notify({
|
|
557
|
+
type: "observerRemoved",
|
|
558
|
+
query: this,
|
|
559
|
+
observer: e
|
|
560
|
+
}));
|
|
561
|
+
}
|
|
562
|
+
getObserversCount() {
|
|
563
|
+
return this.observers.length;
|
|
564
|
+
}
|
|
565
|
+
invalidate() {
|
|
566
|
+
this.state.isInvalidated || this.#c({ type: "invalidate" });
|
|
567
|
+
}
|
|
568
|
+
async fetch(e, t) {
|
|
569
|
+
if (this.state.fetchStatus !== "idle" && this.#a?.status() !== "rejected") {
|
|
570
|
+
if (this.state.data !== void 0 && t?.cancelRefetch) this.cancel({ silent: !0 });
|
|
571
|
+
else if (this.#a) return this.#a.continueRetry(), this.#a.promise;
|
|
572
|
+
}
|
|
573
|
+
if (e && this.setOptions(e), !this.options.queryFn) {
|
|
574
|
+
let e = this.observers.find((e) => e.options.queryFn);
|
|
575
|
+
e && this.setOptions(e.options);
|
|
576
|
+
}
|
|
577
|
+
process.env.NODE_ENV !== "production" && (Array.isArray(this.options.queryKey) || console.error("As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']"));
|
|
578
|
+
let n = new AbortController(), r = (e) => {
|
|
579
|
+
Object.defineProperty(e, "signal", {
|
|
580
|
+
enumerable: !0,
|
|
581
|
+
get: () => (this.#s = !0, n.signal)
|
|
582
|
+
});
|
|
583
|
+
}, i = () => {
|
|
584
|
+
let e = ae(this.options, t), n = (() => {
|
|
585
|
+
let e = {
|
|
586
|
+
client: this.#i,
|
|
587
|
+
queryKey: this.queryKey,
|
|
588
|
+
meta: this.meta
|
|
589
|
+
};
|
|
590
|
+
return r(e), e;
|
|
591
|
+
})();
|
|
592
|
+
return this.#s = !1, this.options.persister ? this.options.persister(e, n, this) : e(n);
|
|
593
|
+
}, a = (() => {
|
|
594
|
+
let e = {
|
|
595
|
+
fetchOptions: t,
|
|
596
|
+
options: this.options,
|
|
597
|
+
queryKey: this.queryKey,
|
|
598
|
+
client: this.#i,
|
|
599
|
+
state: this.state,
|
|
600
|
+
fetchFn: i
|
|
601
|
+
};
|
|
602
|
+
return r(e), e;
|
|
603
|
+
})();
|
|
604
|
+
(this.#e === "infinite" ? pe(this.options.pages) : this.options.behavior)?.onFetch(a, this), this.#n = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== a.fetchOptions?.meta) && this.#c({
|
|
605
|
+
type: "fetch",
|
|
606
|
+
meta: a.fetchOptions?.meta
|
|
607
|
+
});
|
|
608
|
+
let o = this.#a = fe({
|
|
609
|
+
initialPromise: t?.initialPromise,
|
|
610
|
+
fn: a.fetchFn,
|
|
611
|
+
onCancel: (e) => {
|
|
612
|
+
e instanceof N && e.revert && this.setState({
|
|
613
|
+
...this.#n,
|
|
614
|
+
fetchStatus: "idle"
|
|
615
|
+
}), n.abort();
|
|
616
|
+
},
|
|
617
|
+
onFail: (e, t) => {
|
|
618
|
+
this.#c({
|
|
619
|
+
type: "failed",
|
|
620
|
+
failureCount: e,
|
|
621
|
+
error: t
|
|
622
|
+
});
|
|
623
|
+
},
|
|
624
|
+
onPause: () => {
|
|
625
|
+
this.#c({ type: "pause" });
|
|
626
|
+
},
|
|
627
|
+
onContinue: () => {
|
|
628
|
+
this.#c({ type: "continue" });
|
|
629
|
+
},
|
|
630
|
+
retry: a.options.retry,
|
|
631
|
+
retryDelay: a.options.retryDelay,
|
|
632
|
+
networkMode: a.options.networkMode,
|
|
633
|
+
canRun: () => !0
|
|
634
|
+
});
|
|
635
|
+
try {
|
|
636
|
+
let e = await o.start();
|
|
637
|
+
if (e === void 0) throw process.env.NODE_ENV !== "production" && console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`), Error(`${this.queryHash} data is undefined`);
|
|
638
|
+
return this.setData(e), this.#r.config.onSuccess?.(e, this), this.#r.config.onSettled?.(e, this.state.error, this), e;
|
|
639
|
+
} catch (e) {
|
|
640
|
+
if (e instanceof N) {
|
|
641
|
+
if (e.silent) return this.#a.promise;
|
|
642
|
+
if (e.revert) {
|
|
643
|
+
if (this.state.data === void 0) throw e;
|
|
644
|
+
return this.state.data;
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
throw this.#c({
|
|
648
|
+
type: "error",
|
|
649
|
+
error: e
|
|
650
|
+
}), this.#r.config.onError?.(e, this), this.#r.config.onSettled?.(this.state.data, e, this), e;
|
|
651
|
+
} finally {
|
|
652
|
+
this.#a === o && (this.#a = void 0), this.scheduleGc();
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
#c(e) {
|
|
656
|
+
let t = (t) => {
|
|
657
|
+
switch (e.type) {
|
|
658
|
+
case "failed": return {
|
|
659
|
+
...t,
|
|
660
|
+
fetchFailureCount: e.failureCount,
|
|
661
|
+
fetchFailureReason: e.error
|
|
662
|
+
};
|
|
663
|
+
case "pause": return {
|
|
664
|
+
...t,
|
|
665
|
+
fetchStatus: "paused"
|
|
666
|
+
};
|
|
667
|
+
case "continue": return {
|
|
668
|
+
...t,
|
|
669
|
+
fetchStatus: "fetching"
|
|
670
|
+
};
|
|
671
|
+
case "fetch": return {
|
|
672
|
+
...t,
|
|
673
|
+
...I(t.data, this.options),
|
|
674
|
+
fetchMeta: e.meta ?? null
|
|
675
|
+
};
|
|
676
|
+
case "success":
|
|
677
|
+
let n = {
|
|
678
|
+
...t,
|
|
679
|
+
...L(e.data, e.dataUpdatedAt),
|
|
680
|
+
dataUpdateCount: t.dataUpdateCount + 1,
|
|
681
|
+
...!e.manual && {
|
|
682
|
+
fetchStatus: "idle",
|
|
683
|
+
fetchFailureCount: 0,
|
|
684
|
+
fetchFailureReason: null
|
|
685
|
+
}
|
|
686
|
+
};
|
|
687
|
+
return this.#n = e.manual ? n : void 0, n;
|
|
688
|
+
case "error":
|
|
689
|
+
let r = e.error;
|
|
690
|
+
return {
|
|
691
|
+
...t,
|
|
692
|
+
error: r,
|
|
693
|
+
errorUpdateCount: t.errorUpdateCount + 1,
|
|
694
|
+
errorUpdatedAt: Date.now(),
|
|
695
|
+
fetchFailureCount: t.fetchFailureCount + 1,
|
|
696
|
+
fetchFailureReason: r,
|
|
697
|
+
fetchStatus: "idle",
|
|
698
|
+
status: "error",
|
|
699
|
+
isInvalidated: !0
|
|
700
|
+
};
|
|
701
|
+
case "invalidate": return {
|
|
702
|
+
...t,
|
|
703
|
+
isInvalidated: !0
|
|
704
|
+
};
|
|
705
|
+
case "setState": return {
|
|
706
|
+
...t,
|
|
707
|
+
...e.state
|
|
708
|
+
};
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
this.state = t(this.state), j.batch(() => {
|
|
712
|
+
this.observers.slice().forEach((e) => {
|
|
713
|
+
e.onQueryUpdate();
|
|
714
|
+
}), this.#r.notify({
|
|
715
|
+
query: this,
|
|
716
|
+
type: "updated",
|
|
717
|
+
action: e
|
|
718
|
+
});
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
};
|
|
722
|
+
function I(e, t) {
|
|
723
|
+
return {
|
|
724
|
+
fetchFailureCount: 0,
|
|
725
|
+
fetchFailureReason: null,
|
|
726
|
+
fetchStatus: de(t.networkMode) ? "fetching" : "paused",
|
|
727
|
+
...e === void 0 && {
|
|
728
|
+
error: null,
|
|
729
|
+
status: "pending"
|
|
730
|
+
}
|
|
731
|
+
};
|
|
732
|
+
}
|
|
733
|
+
function L(e, t) {
|
|
734
|
+
return {
|
|
735
|
+
data: e,
|
|
736
|
+
dataUpdatedAt: t ?? Date.now(),
|
|
737
|
+
error: null,
|
|
738
|
+
isInvalidated: !1,
|
|
739
|
+
status: "success"
|
|
740
|
+
};
|
|
741
|
+
}
|
|
742
|
+
function R(e) {
|
|
743
|
+
let t = typeof e.initialData == "function" ? e.initialData() : e.initialData, n = t !== void 0, r = n ? typeof e.initialDataUpdatedAt == "function" ? e.initialDataUpdatedAt() : e.initialDataUpdatedAt : 0;
|
|
744
|
+
return {
|
|
745
|
+
data: t,
|
|
746
|
+
dataUpdateCount: 0,
|
|
747
|
+
dataUpdatedAt: n ? r ?? Date.now() : 0,
|
|
748
|
+
error: null,
|
|
749
|
+
errorUpdateCount: 0,
|
|
750
|
+
errorUpdatedAt: 0,
|
|
751
|
+
fetchFailureCount: 0,
|
|
752
|
+
fetchFailureReason: null,
|
|
753
|
+
fetchMeta: null,
|
|
754
|
+
isInvalidated: !1,
|
|
755
|
+
status: n ? "success" : "pending",
|
|
756
|
+
fetchStatus: "idle"
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
//#endregion
|
|
760
|
+
//#region node_modules/@tanstack/query-core/build/modern/queryObserver.js
|
|
761
|
+
var z = class extends k {
|
|
762
|
+
#e;
|
|
763
|
+
#t = void 0;
|
|
764
|
+
#n = void 0;
|
|
765
|
+
#r = void 0;
|
|
766
|
+
#i;
|
|
767
|
+
#a;
|
|
768
|
+
#o;
|
|
769
|
+
#s;
|
|
770
|
+
#c;
|
|
771
|
+
#l;
|
|
772
|
+
#u;
|
|
773
|
+
#d;
|
|
774
|
+
#f;
|
|
775
|
+
#p = /* @__PURE__ */ new Set();
|
|
776
|
+
constructor(e, t) {
|
|
777
|
+
super(), this.options = t, this.#e = e, this.#o = null, this.bindMethods(), this.setOptions(t);
|
|
778
|
+
}
|
|
779
|
+
bindMethods() {
|
|
780
|
+
this.refetch = this.refetch.bind(this);
|
|
781
|
+
}
|
|
782
|
+
onSubscribe() {
|
|
783
|
+
this.listeners.size === 1 && (this.#t.addObserver(this), B(this.#t, this.options) ? this.#m() : this.updateResult(), this.#y());
|
|
784
|
+
}
|
|
785
|
+
onUnsubscribe() {
|
|
786
|
+
this.hasListeners() || this.destroy();
|
|
787
|
+
}
|
|
788
|
+
shouldFetchOnReconnect() {
|
|
789
|
+
return V(this.#t, this.options, this.options.refetchOnReconnect);
|
|
790
|
+
}
|
|
791
|
+
shouldFetchOnWindowFocus() {
|
|
792
|
+
return V(this.#t, this.options, this.options.refetchOnWindowFocus);
|
|
793
|
+
}
|
|
794
|
+
destroy() {
|
|
795
|
+
this.listeners = /* @__PURE__ */ new Set(), this.#b(), this.#x(), this.#t.removeObserver(this);
|
|
796
|
+
}
|
|
797
|
+
setOptions(e) {
|
|
798
|
+
let t = this.options, n = this.#t;
|
|
799
|
+
if (this.options = this.#e.defaultQueryOptions(e), this.options.enabled !== void 0 && typeof this.options.enabled != "boolean" && typeof this.options.enabled != "function" && typeof h(this.options.enabled, this.#t) != "boolean") throw Error("Expected enabled to be a boolean or a callback that returns a boolean");
|
|
800
|
+
this.#S(), this.#t.setOptions(this.options), t._defaulted && !C(this.options, t) && this.#e.getQueryCache().notify({
|
|
801
|
+
type: "observerOptionsUpdated",
|
|
802
|
+
query: this.#t,
|
|
803
|
+
observer: this
|
|
804
|
+
});
|
|
805
|
+
let r = this.hasListeners();
|
|
806
|
+
r && H(this.#t, n, this.options, t) && this.#m(), this.updateResult(), r && (this.#t !== n || h(this.options.enabled, this.#t) !== h(t.enabled, this.#t) || h(this.options.staleTime, this.#t) !== h(t.staleTime, this.#t)) && this.#g();
|
|
807
|
+
let i = this.#_();
|
|
808
|
+
r && (this.#t !== n || h(this.options.enabled, this.#t) !== h(t.enabled, this.#t) || i !== this.#f) && this.#v(i);
|
|
809
|
+
}
|
|
810
|
+
getOptimisticResult(e) {
|
|
811
|
+
let t = this.#e.getQueryCache().build(this.#e, e), n = this.createResult(t, e);
|
|
812
|
+
return C(this.getCurrentResult(), n) || (this.#r = n, this.#a = this.options, this.#i = this.#t.state), n;
|
|
813
|
+
}
|
|
814
|
+
getCurrentResult() {
|
|
815
|
+
return this.#r;
|
|
816
|
+
}
|
|
817
|
+
trackResult(e, t) {
|
|
818
|
+
return new Proxy(e, { get: (e, n) => (this.trackProp(n), t?.(n), Reflect.get(e, n)) });
|
|
819
|
+
}
|
|
820
|
+
trackProp(e) {
|
|
821
|
+
this.#p.add(e);
|
|
822
|
+
}
|
|
823
|
+
getCurrentQuery() {
|
|
824
|
+
return this.#t;
|
|
825
|
+
}
|
|
826
|
+
refetch({ ...e } = {}) {
|
|
827
|
+
return this.fetch({ ...e });
|
|
828
|
+
}
|
|
829
|
+
fetchOptimistic(e) {
|
|
830
|
+
let t = this.#e.defaultQueryOptions(e), n = this.#e.getQueryCache().build(this.#e, t), r = () => {}, i, a = new Promise((e) => {
|
|
831
|
+
i = e, r = this.#e.getQueryCache().subscribe((i) => {
|
|
832
|
+
i.type === "updated" && i.query.queryHash === n.queryHash && n.state.data !== void 0 && (r(), e(this.createResult(n, t)));
|
|
833
|
+
});
|
|
834
|
+
});
|
|
835
|
+
return Promise.race([n.fetch().then(() => {
|
|
836
|
+
let e = this.createResult(n, t);
|
|
837
|
+
return i?.(e), e;
|
|
838
|
+
}).finally(() => {
|
|
839
|
+
r();
|
|
840
|
+
}), a]);
|
|
841
|
+
}
|
|
842
|
+
fetch(e) {
|
|
843
|
+
return this.#m({
|
|
844
|
+
...e,
|
|
845
|
+
cancelRefetch: e.cancelRefetch ?? !0
|
|
846
|
+
}).then(() => (this.updateResult(), this.#r));
|
|
847
|
+
}
|
|
848
|
+
#m(e) {
|
|
849
|
+
this.#S();
|
|
850
|
+
let t = this.#t.fetch(this.options, e);
|
|
851
|
+
return e?.throwOnError || (t = t.catch(d)), t;
|
|
852
|
+
}
|
|
853
|
+
#h(e) {
|
|
854
|
+
return !O() && h(this.options.enabled, this.#t) !== !1 && p(e);
|
|
855
|
+
}
|
|
856
|
+
#g() {
|
|
857
|
+
this.#b();
|
|
858
|
+
let e = h(this.options.staleTime, this.#t);
|
|
859
|
+
if (this.#r.isStale || !this.#h(e)) return;
|
|
860
|
+
let t = m(this.#r.dataUpdatedAt, e) + 1;
|
|
861
|
+
this.#u = c.setTimeout(() => {
|
|
862
|
+
this.#r.isStale || this.updateResult();
|
|
863
|
+
}, t);
|
|
864
|
+
}
|
|
865
|
+
#_() {
|
|
866
|
+
return h(this.options.refetchInterval, this.#t) ?? !1;
|
|
867
|
+
}
|
|
868
|
+
#v(e) {
|
|
869
|
+
this.#x(), this.#f = e, this.#f !== 0 && this.#h(this.#f) && (this.#d = c.setInterval(() => {
|
|
870
|
+
(this.options.refetchIntervalInBackground || A.isFocused()) && this.#m();
|
|
871
|
+
}, this.#f));
|
|
872
|
+
}
|
|
873
|
+
#y() {
|
|
874
|
+
this.#g(), this.#v(this.#_());
|
|
875
|
+
}
|
|
876
|
+
#b() {
|
|
877
|
+
this.#u !== void 0 && (c.clearTimeout(this.#u), this.#u = void 0);
|
|
878
|
+
}
|
|
879
|
+
#x() {
|
|
880
|
+
this.#d !== void 0 && (c.clearInterval(this.#d), this.#d = void 0);
|
|
881
|
+
}
|
|
882
|
+
createResult(e, t) {
|
|
883
|
+
let n = this.#t, r = this.options, i = this.#r, a = this.#i, o = this.#a, s = e === n ? this.#n : e.state, { state: c } = e, l = { ...c }, u = !1, d;
|
|
884
|
+
if (t._optimisticResults) {
|
|
885
|
+
let i = this.hasListeners(), a = !i && B(e, t), o = i && H(e, n, t, r);
|
|
886
|
+
(a || o) && (l = {
|
|
887
|
+
...l,
|
|
888
|
+
...I(c.data, e.options)
|
|
889
|
+
}), t._optimisticResults === "isRestoring" && (l.fetchStatus = "idle");
|
|
890
|
+
}
|
|
891
|
+
let { error: f, errorUpdatedAt: p, status: m } = l;
|
|
892
|
+
d = l.data;
|
|
893
|
+
let g = !1;
|
|
894
|
+
if (t.placeholderData !== void 0 && d === void 0 && m === "pending") {
|
|
895
|
+
let e;
|
|
896
|
+
i?.isPlaceholderData && t.placeholderData === o?.placeholderData ? (e = i.data, g = !0) : e = typeof t.placeholderData == "function" ? t.placeholderData(this.#l?.state.data, this.#l) : t.placeholderData, e !== void 0 && (m = "success", d = T(i?.data, e, t), u = !0);
|
|
897
|
+
}
|
|
898
|
+
if (t.select && d !== void 0 && !g) {
|
|
899
|
+
if (i && d === a?.data && t.select === this.#s) d = this.#c;
|
|
900
|
+
else try {
|
|
901
|
+
this.#s = t.select, d = t.select(d), d = T(i?.data, d, t), this.#c = d, this.#o = null;
|
|
902
|
+
} catch (e) {
|
|
903
|
+
this.#o = e;
|
|
904
|
+
}
|
|
905
|
+
} else d === void 0 && (this.#o = null);
|
|
906
|
+
this.#o && (f = this.#o, d = this.#c, p = Date.now(), m = "error", u = !1);
|
|
907
|
+
let _ = l.fetchStatus === "fetching", v = m === "pending", y = m === "error", b = v && _, x = d !== void 0;
|
|
908
|
+
return {
|
|
909
|
+
status: m,
|
|
910
|
+
fetchStatus: l.fetchStatus,
|
|
911
|
+
isPending: v,
|
|
912
|
+
isSuccess: m === "success",
|
|
913
|
+
isError: y,
|
|
914
|
+
isInitialLoading: b,
|
|
915
|
+
isLoading: b,
|
|
916
|
+
data: d,
|
|
917
|
+
dataUpdatedAt: l.dataUpdatedAt,
|
|
918
|
+
error: f,
|
|
919
|
+
errorUpdatedAt: p,
|
|
920
|
+
failureCount: l.fetchFailureCount,
|
|
921
|
+
failureReason: l.fetchFailureReason,
|
|
922
|
+
errorUpdateCount: l.errorUpdateCount,
|
|
923
|
+
isFetched: e.isFetched(),
|
|
924
|
+
isFetchedAfterMount: l.dataUpdateCount > s.dataUpdateCount || l.errorUpdateCount > s.errorUpdateCount,
|
|
925
|
+
isFetching: _,
|
|
926
|
+
isRefetching: _ && !v,
|
|
927
|
+
isLoadingError: y && !x,
|
|
928
|
+
isPaused: l.fetchStatus === "paused",
|
|
929
|
+
isPlaceholderData: u,
|
|
930
|
+
isRefetchError: y && x,
|
|
931
|
+
isStale: U(e, t),
|
|
932
|
+
refetch: this.refetch,
|
|
933
|
+
isEnabled: h(t.enabled, e) !== !1
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
updateResult() {
|
|
937
|
+
let e = this.#r, t = this.createResult(this.#t, this.options);
|
|
938
|
+
if (this.#i = this.#t.state, this.#a = this.options, this.#i.data !== void 0 && (this.#l = this.#t), C(t, e)) return;
|
|
939
|
+
this.#r = t;
|
|
940
|
+
let n = (() => {
|
|
941
|
+
if (!e) return !0;
|
|
942
|
+
let { notifyOnChangeProps: t } = this.options, n = typeof t == "function" ? t() : t;
|
|
943
|
+
if (n === "all" || !n && !this.#p.size) return !0;
|
|
944
|
+
let r = new Set(n ?? this.#p);
|
|
945
|
+
return this.options.throwOnError && r.add("error"), Object.keys(this.#r).some((t) => {
|
|
946
|
+
let n = t;
|
|
947
|
+
return this.#r[n] !== e[n] && r.has(n);
|
|
948
|
+
});
|
|
949
|
+
})();
|
|
950
|
+
j.batch(() => {
|
|
951
|
+
n && this.listeners.forEach((e) => {
|
|
952
|
+
e(this.#r);
|
|
953
|
+
}), this.#e.getQueryCache().notify({
|
|
954
|
+
query: this.#t,
|
|
955
|
+
type: "observerResultsUpdated"
|
|
956
|
+
});
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
#S() {
|
|
960
|
+
let e = this.#e.getQueryCache().build(this.#e, this.options);
|
|
961
|
+
if (e === this.#t) return;
|
|
962
|
+
let t = this.#t;
|
|
963
|
+
this.#t = e, this.#n = e.state, this.hasListeners() && (t?.removeObserver(this), e.addObserver(this));
|
|
964
|
+
}
|
|
965
|
+
onQueryUpdate() {
|
|
966
|
+
this.updateResult(), this.hasListeners() && this.#y();
|
|
967
|
+
}
|
|
968
|
+
};
|
|
969
|
+
function ge(e, t) {
|
|
970
|
+
return h(t.enabled, e) !== !1 && e.state.data === void 0 && (e.state.status !== "error" || h(t.retryOnMount, e) !== !1);
|
|
971
|
+
}
|
|
972
|
+
function B(e, t) {
|
|
973
|
+
return ge(e, t) || e.state.data !== void 0 && V(e, t, t.refetchOnMount);
|
|
974
|
+
}
|
|
975
|
+
function V(e, t, n) {
|
|
976
|
+
if (h(t.enabled, e) !== !1 && h(t.staleTime, e) !== "static") {
|
|
977
|
+
let r = h(n, e);
|
|
978
|
+
return r === "always" || r !== !1 && U(e, t);
|
|
979
|
+
}
|
|
980
|
+
return !1;
|
|
981
|
+
}
|
|
982
|
+
function H(e, t, n, r) {
|
|
983
|
+
return (e !== t || h(r.enabled, e) === !1) && (!n.suspense || e.state.status !== "error") && U(e, n);
|
|
984
|
+
}
|
|
985
|
+
function U(e, t) {
|
|
986
|
+
return h(t.enabled, e) !== !1 && e.isStaleByTime(h(t.staleTime, e));
|
|
987
|
+
}
|
|
988
|
+
//#endregion
|
|
989
|
+
//#region node_modules/@tanstack/query-core/build/modern/mutation.js
|
|
990
|
+
var _e = class extends P {
|
|
991
|
+
#e;
|
|
992
|
+
#t;
|
|
993
|
+
#n;
|
|
994
|
+
#r;
|
|
995
|
+
constructor(e) {
|
|
996
|
+
super(), this.#e = e.client, this.mutationId = e.mutationId, this.#n = e.mutationCache, this.#t = [], this.state = e.state || W(), this.setOptions(e.options), this.scheduleGc();
|
|
997
|
+
}
|
|
998
|
+
setOptions(e) {
|
|
999
|
+
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
1000
|
+
}
|
|
1001
|
+
get meta() {
|
|
1002
|
+
return this.options.meta;
|
|
1003
|
+
}
|
|
1004
|
+
addObserver(e) {
|
|
1005
|
+
this.#t.includes(e) || (this.#t.push(e), this.clearGcTimeout(), this.#n.notify({
|
|
1006
|
+
type: "observerAdded",
|
|
1007
|
+
mutation: this,
|
|
1008
|
+
observer: e
|
|
1009
|
+
}));
|
|
1010
|
+
}
|
|
1011
|
+
removeObserver(e) {
|
|
1012
|
+
this.#t = this.#t.filter((t) => t !== e), this.scheduleGc(), this.#n.notify({
|
|
1013
|
+
type: "observerRemoved",
|
|
1014
|
+
mutation: this,
|
|
1015
|
+
observer: e
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
optionalRemove() {
|
|
1019
|
+
this.#t.length || (this.state.status === "pending" ? this.scheduleGc() : this.#n.remove(this));
|
|
1020
|
+
}
|
|
1021
|
+
continue() {
|
|
1022
|
+
return this.#r?.continue() ?? (this.state.status === "pending" ? this.execute(this.state.variables) : Promise.resolve());
|
|
1023
|
+
}
|
|
1024
|
+
async execute(e) {
|
|
1025
|
+
let t = () => {
|
|
1026
|
+
this.#i({ type: "continue" });
|
|
1027
|
+
}, n = {
|
|
1028
|
+
client: this.#e,
|
|
1029
|
+
meta: this.options.meta,
|
|
1030
|
+
mutationKey: this.options.mutationKey
|
|
1031
|
+
}, r = this.#r = fe({
|
|
1032
|
+
fn: () => this.options.mutationFn ? this.options.mutationFn(e, n) : Promise.reject(/* @__PURE__ */ Error("No mutationFn found")),
|
|
1033
|
+
onFail: (e, t) => {
|
|
1034
|
+
this.#i({
|
|
1035
|
+
type: "failed",
|
|
1036
|
+
failureCount: e,
|
|
1037
|
+
error: t
|
|
1038
|
+
});
|
|
1039
|
+
},
|
|
1040
|
+
onPause: () => {
|
|
1041
|
+
this.#i({ type: "pause" });
|
|
1042
|
+
},
|
|
1043
|
+
onContinue: t,
|
|
1044
|
+
retry: this.options.retry ?? 0,
|
|
1045
|
+
retryDelay: this.options.retryDelay,
|
|
1046
|
+
networkMode: this.options.networkMode,
|
|
1047
|
+
canRun: () => this.#n.canRun(this)
|
|
1048
|
+
}), i = this.state.status === "pending", a = !r.canStart();
|
|
1049
|
+
try {
|
|
1050
|
+
if (i) t();
|
|
1051
|
+
else {
|
|
1052
|
+
this.#i({
|
|
1053
|
+
type: "pending",
|
|
1054
|
+
variables: e,
|
|
1055
|
+
isPaused: a
|
|
1056
|
+
}), this.#n.config.onMutate && await this.#n.config.onMutate(e, this, n);
|
|
1057
|
+
let t = await this.options.onMutate?.(e, n);
|
|
1058
|
+
t !== this.state.context && this.#i({
|
|
1059
|
+
type: "pending",
|
|
1060
|
+
context: t,
|
|
1061
|
+
variables: e,
|
|
1062
|
+
isPaused: a
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
let o = await r.start();
|
|
1066
|
+
return await this.#n.config.onSuccess?.(o, e, this.state.context, this, n), await this.options.onSuccess?.(o, e, this.state.context, n), await this.#n.config.onSettled?.(o, null, this.state.variables, this.state.context, this, n), await this.options.onSettled?.(o, null, e, this.state.context, n), this.#i({
|
|
1067
|
+
type: "success",
|
|
1068
|
+
data: o
|
|
1069
|
+
}), o;
|
|
1070
|
+
} catch (t) {
|
|
1071
|
+
try {
|
|
1072
|
+
await this.#n.config.onError?.(t, e, this.state.context, this, n);
|
|
1073
|
+
} catch (e) {
|
|
1074
|
+
Promise.reject(e);
|
|
1075
|
+
}
|
|
1076
|
+
try {
|
|
1077
|
+
await this.options.onError?.(t, e, this.state.context, n);
|
|
1078
|
+
} catch (e) {
|
|
1079
|
+
Promise.reject(e);
|
|
1080
|
+
}
|
|
1081
|
+
try {
|
|
1082
|
+
await this.#n.config.onSettled?.(void 0, t, this.state.variables, this.state.context, this, n);
|
|
1083
|
+
} catch (e) {
|
|
1084
|
+
Promise.reject(e);
|
|
1085
|
+
}
|
|
1086
|
+
try {
|
|
1087
|
+
await this.options.onSettled?.(void 0, t, e, this.state.context, n);
|
|
1088
|
+
} catch (e) {
|
|
1089
|
+
Promise.reject(e);
|
|
1090
|
+
}
|
|
1091
|
+
throw this.#i({
|
|
1092
|
+
type: "error",
|
|
1093
|
+
error: t
|
|
1094
|
+
}), t;
|
|
1095
|
+
} finally {
|
|
1096
|
+
this.#r === r && (this.#r = void 0), this.#n.runNext(this);
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
#i(e) {
|
|
1100
|
+
let t = (t) => {
|
|
1101
|
+
switch (e.type) {
|
|
1102
|
+
case "failed": return {
|
|
1103
|
+
...t,
|
|
1104
|
+
failureCount: e.failureCount,
|
|
1105
|
+
failureReason: e.error
|
|
1106
|
+
};
|
|
1107
|
+
case "pause": return {
|
|
1108
|
+
...t,
|
|
1109
|
+
isPaused: !0
|
|
1110
|
+
};
|
|
1111
|
+
case "continue": return {
|
|
1112
|
+
...t,
|
|
1113
|
+
isPaused: !1
|
|
1114
|
+
};
|
|
1115
|
+
case "pending": return {
|
|
1116
|
+
...t,
|
|
1117
|
+
context: e.context,
|
|
1118
|
+
data: void 0,
|
|
1119
|
+
failureCount: 0,
|
|
1120
|
+
failureReason: null,
|
|
1121
|
+
error: null,
|
|
1122
|
+
isPaused: e.isPaused,
|
|
1123
|
+
status: "pending",
|
|
1124
|
+
variables: e.variables,
|
|
1125
|
+
submittedAt: Date.now()
|
|
1126
|
+
};
|
|
1127
|
+
case "success": return {
|
|
1128
|
+
...t,
|
|
1129
|
+
data: e.data,
|
|
1130
|
+
failureCount: 0,
|
|
1131
|
+
failureReason: null,
|
|
1132
|
+
error: null,
|
|
1133
|
+
status: "success",
|
|
1134
|
+
isPaused: !1
|
|
1135
|
+
};
|
|
1136
|
+
case "error": return {
|
|
1137
|
+
...t,
|
|
1138
|
+
data: void 0,
|
|
1139
|
+
error: e.error,
|
|
1140
|
+
failureCount: t.failureCount + 1,
|
|
1141
|
+
failureReason: e.error,
|
|
1142
|
+
isPaused: !1,
|
|
1143
|
+
status: "error"
|
|
1144
|
+
};
|
|
1145
|
+
}
|
|
1146
|
+
};
|
|
1147
|
+
this.state = t(this.state), j.batch(() => {
|
|
1148
|
+
this.#t.forEach((t) => {
|
|
1149
|
+
t.onMutationUpdate(e);
|
|
1150
|
+
}), this.#n.notify({
|
|
1151
|
+
mutation: this,
|
|
1152
|
+
type: "updated",
|
|
1153
|
+
action: e
|
|
1154
|
+
});
|
|
1155
|
+
});
|
|
1156
|
+
}
|
|
1157
|
+
};
|
|
1158
|
+
function W() {
|
|
1159
|
+
return {
|
|
1160
|
+
context: void 0,
|
|
1161
|
+
data: void 0,
|
|
1162
|
+
error: null,
|
|
1163
|
+
failureCount: 0,
|
|
1164
|
+
failureReason: null,
|
|
1165
|
+
isPaused: !1,
|
|
1166
|
+
status: "idle",
|
|
1167
|
+
variables: void 0,
|
|
1168
|
+
submittedAt: 0
|
|
1169
|
+
};
|
|
1170
|
+
}
|
|
1171
|
+
//#endregion
|
|
1172
|
+
//#region node_modules/@tanstack/query-core/build/modern/mutationCache.js
|
|
1173
|
+
var ve = class extends k {
|
|
1174
|
+
#e;
|
|
1175
|
+
#t;
|
|
1176
|
+
#n;
|
|
1177
|
+
constructor(e = {}) {
|
|
1178
|
+
super(), this.config = e, this.#e = /* @__PURE__ */ new Set(), this.#t = /* @__PURE__ */ new Map(), this.#n = 0;
|
|
1179
|
+
}
|
|
1180
|
+
build(e, t, n) {
|
|
1181
|
+
let r = new _e({
|
|
1182
|
+
client: e,
|
|
1183
|
+
mutationCache: this,
|
|
1184
|
+
mutationId: ++this.#n,
|
|
1185
|
+
options: e.defaultMutationOptions(t),
|
|
1186
|
+
state: n
|
|
1187
|
+
});
|
|
1188
|
+
return this.add(r), r;
|
|
1189
|
+
}
|
|
1190
|
+
add(e) {
|
|
1191
|
+
this.#e.add(e);
|
|
1192
|
+
let t = G(e);
|
|
1193
|
+
if (typeof t == "string") {
|
|
1194
|
+
let n = this.#t.get(t);
|
|
1195
|
+
n ? n.push(e) : this.#t.set(t, [e]);
|
|
1196
|
+
}
|
|
1197
|
+
this.notify({
|
|
1198
|
+
type: "added",
|
|
1199
|
+
mutation: e
|
|
1200
|
+
});
|
|
1201
|
+
}
|
|
1202
|
+
remove(e) {
|
|
1203
|
+
if (this.#e.delete(e)) {
|
|
1204
|
+
let t = G(e);
|
|
1205
|
+
if (typeof t == "string") {
|
|
1206
|
+
let n = this.#t.get(t);
|
|
1207
|
+
if (n) {
|
|
1208
|
+
if (n.length > 1) {
|
|
1209
|
+
let t = n.indexOf(e);
|
|
1210
|
+
t !== -1 && n.splice(t, 1);
|
|
1211
|
+
} else n[0] === e && this.#t.delete(t);
|
|
1212
|
+
}
|
|
1213
|
+
}
|
|
1214
|
+
}
|
|
1215
|
+
this.notify({
|
|
1216
|
+
type: "removed",
|
|
1217
|
+
mutation: e
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
canRun(e) {
|
|
1221
|
+
let t = G(e);
|
|
1222
|
+
if (typeof t == "string") {
|
|
1223
|
+
let n = this.#t.get(t)?.find((e) => e.state.status === "pending");
|
|
1224
|
+
return !n || n === e;
|
|
1225
|
+
}
|
|
1226
|
+
return !0;
|
|
1227
|
+
}
|
|
1228
|
+
runNext(e) {
|
|
1229
|
+
let t = G(e);
|
|
1230
|
+
return typeof t == "string" ? (this.#t.get(t)?.find((t) => t !== e && t.state.isPaused))?.continue() ?? Promise.resolve() : Promise.resolve();
|
|
1231
|
+
}
|
|
1232
|
+
clear() {
|
|
1233
|
+
j.batch(() => {
|
|
1234
|
+
this.#e.forEach((e) => {
|
|
1235
|
+
this.notify({
|
|
1236
|
+
type: "removed",
|
|
1237
|
+
mutation: e
|
|
1238
|
+
});
|
|
1239
|
+
}), this.#e.clear(), this.#t.clear();
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
getAll() {
|
|
1243
|
+
return Array.from(this.#e);
|
|
1244
|
+
}
|
|
1245
|
+
find(e) {
|
|
1246
|
+
let t = {
|
|
1247
|
+
exact: !0,
|
|
1248
|
+
...e
|
|
1249
|
+
};
|
|
1250
|
+
return this.getAll().find((e) => _(t, e));
|
|
1251
|
+
}
|
|
1252
|
+
findAll(e = {}) {
|
|
1253
|
+
return this.getAll().filter((t) => _(e, t));
|
|
1254
|
+
}
|
|
1255
|
+
notify(e) {
|
|
1256
|
+
j.batch(() => {
|
|
1257
|
+
this.listeners.forEach((t) => {
|
|
1258
|
+
t(e);
|
|
1259
|
+
});
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1262
|
+
resumePausedMutations() {
|
|
1263
|
+
let e = this.getAll().filter((e) => e.state.isPaused);
|
|
1264
|
+
return j.batch(() => Promise.all(e.map((e) => e.continue().catch(d))));
|
|
1265
|
+
}
|
|
1266
|
+
};
|
|
1267
|
+
function G(e) {
|
|
1268
|
+
return e.options.scope?.id;
|
|
1269
|
+
}
|
|
1270
|
+
//#endregion
|
|
1271
|
+
//#region node_modules/@tanstack/query-core/build/modern/mutationObserver.js
|
|
1272
|
+
var ye = class extends k {
|
|
1273
|
+
#e;
|
|
1274
|
+
#t = void 0;
|
|
1275
|
+
#n;
|
|
1276
|
+
#r;
|
|
1277
|
+
constructor(e, t) {
|
|
1278
|
+
super(), this.#e = e, this.setOptions(t), this.bindMethods(), this.#i();
|
|
1279
|
+
}
|
|
1280
|
+
bindMethods() {
|
|
1281
|
+
this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
|
|
1282
|
+
}
|
|
1283
|
+
setOptions(e) {
|
|
1284
|
+
let t = this.options;
|
|
1285
|
+
this.options = this.#e.defaultMutationOptions(e), C(this.options, t) || this.#e.getMutationCache().notify({
|
|
1286
|
+
type: "observerOptionsUpdated",
|
|
1287
|
+
mutation: this.#n,
|
|
1288
|
+
observer: this
|
|
1289
|
+
}), t?.mutationKey && this.options.mutationKey && y(t.mutationKey) !== y(this.options.mutationKey) ? this.reset() : this.#n?.state.status === "pending" && this.#n.setOptions(this.options);
|
|
1290
|
+
}
|
|
1291
|
+
onSubscribe() {
|
|
1292
|
+
this.listeners.size === 1 && this.#n && (this.#n.addObserver(this), this.#i());
|
|
1293
|
+
}
|
|
1294
|
+
onUnsubscribe() {
|
|
1295
|
+
this.hasListeners() || this.#n?.removeObserver(this);
|
|
1296
|
+
}
|
|
1297
|
+
onMutationUpdate(e) {
|
|
1298
|
+
this.#i(), this.#a(e);
|
|
1299
|
+
}
|
|
1300
|
+
getCurrentResult() {
|
|
1301
|
+
return this.#t;
|
|
1302
|
+
}
|
|
1303
|
+
reset() {
|
|
1304
|
+
this.#n?.removeObserver(this), this.#n = void 0, this.#i(), this.#a();
|
|
1305
|
+
}
|
|
1306
|
+
mutate(e, t) {
|
|
1307
|
+
return this.#r = t, this.#n?.removeObserver(this), this.#n = this.#e.getMutationCache().build(this.#e, this.options), this.#n.addObserver(this), this.#n.execute(e);
|
|
1308
|
+
}
|
|
1309
|
+
#i() {
|
|
1310
|
+
let e = this.#n?.state ?? W();
|
|
1311
|
+
this.#t = {
|
|
1312
|
+
...e,
|
|
1313
|
+
isPending: e.status === "pending",
|
|
1314
|
+
isSuccess: e.status === "success",
|
|
1315
|
+
isError: e.status === "error",
|
|
1316
|
+
isIdle: e.status === "idle",
|
|
1317
|
+
mutate: this.mutate,
|
|
1318
|
+
reset: this.reset
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
#a(e) {
|
|
1322
|
+
j.batch(() => {
|
|
1323
|
+
if (this.#r && this.hasListeners()) {
|
|
1324
|
+
let t = this.#t.variables, n = this.#t.context, r = {
|
|
1325
|
+
client: this.#e,
|
|
1326
|
+
meta: this.options.meta,
|
|
1327
|
+
mutationKey: this.options.mutationKey
|
|
1328
|
+
};
|
|
1329
|
+
if (e?.type === "success") {
|
|
1330
|
+
try {
|
|
1331
|
+
this.#r.onSuccess?.(e.data, t, n, r);
|
|
1332
|
+
} catch (e) {
|
|
1333
|
+
Promise.reject(e);
|
|
1334
|
+
}
|
|
1335
|
+
try {
|
|
1336
|
+
this.#r.onSettled?.(e.data, null, t, n, r);
|
|
1337
|
+
} catch (e) {
|
|
1338
|
+
Promise.reject(e);
|
|
1339
|
+
}
|
|
1340
|
+
} else if (e?.type === "error") {
|
|
1341
|
+
try {
|
|
1342
|
+
this.#r.onError?.(e.error, t, n, r);
|
|
1343
|
+
} catch (e) {
|
|
1344
|
+
Promise.reject(e);
|
|
1345
|
+
}
|
|
1346
|
+
try {
|
|
1347
|
+
this.#r.onSettled?.(void 0, e.error, t, n, r);
|
|
1348
|
+
} catch (e) {
|
|
1349
|
+
Promise.reject(e);
|
|
1350
|
+
}
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1353
|
+
this.listeners.forEach((e) => {
|
|
1354
|
+
e(this.#t);
|
|
1355
|
+
});
|
|
1356
|
+
});
|
|
1357
|
+
}
|
|
1358
|
+
};
|
|
1359
|
+
//#endregion
|
|
1360
|
+
//#region node_modules/@tanstack/query-core/build/modern/queriesObserver.js
|
|
1361
|
+
function be(e, t) {
|
|
1362
|
+
let n = new Set(t);
|
|
1363
|
+
return e.filter((e) => !n.has(e));
|
|
1364
|
+
}
|
|
1365
|
+
var xe = class extends k {
|
|
1366
|
+
#e;
|
|
1367
|
+
#t;
|
|
1368
|
+
#n;
|
|
1369
|
+
#r;
|
|
1370
|
+
#i;
|
|
1371
|
+
#a;
|
|
1372
|
+
#o;
|
|
1373
|
+
#s;
|
|
1374
|
+
#c;
|
|
1375
|
+
#l = [];
|
|
1376
|
+
constructor(e, t, n) {
|
|
1377
|
+
super(), this.#e = e, this.#r = n, this.#n = [], this.#i = [], this.#t = [], this.setQueries(t);
|
|
1378
|
+
}
|
|
1379
|
+
onSubscribe() {
|
|
1380
|
+
this.listeners.size === 1 && this.#i.forEach((e) => {
|
|
1381
|
+
e.subscribe((t) => {
|
|
1382
|
+
this.#m(e, t);
|
|
1383
|
+
});
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
onUnsubscribe() {
|
|
1387
|
+
this.listeners.size || this.destroy();
|
|
1388
|
+
}
|
|
1389
|
+
destroy() {
|
|
1390
|
+
this.listeners = /* @__PURE__ */ new Set(), this.#i.forEach((e) => {
|
|
1391
|
+
e.destroy();
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
setQueries(e, t) {
|
|
1395
|
+
if (this.#n = e, this.#r = t, process.env.NODE_ENV !== "production") {
|
|
1396
|
+
let t = e.map((e) => this.#e.defaultQueryOptions(e).queryHash);
|
|
1397
|
+
new Set(t).size !== t.length && console.warn("[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.");
|
|
1398
|
+
}
|
|
1399
|
+
j.batch(() => {
|
|
1400
|
+
let e = this.#i, t = this.#p(this.#n);
|
|
1401
|
+
t.forEach((e) => e.observer.setOptions(e.defaultedQueryOptions));
|
|
1402
|
+
let n = t.map((e) => e.observer), r = n.map((e) => e.getCurrentResult()), i = e.length !== n.length, a = n.some((t, n) => t !== e[n]), o = i || a, s = o ? !0 : r.some((e, t) => {
|
|
1403
|
+
let n = this.#t[t];
|
|
1404
|
+
return !n || !C(e, n);
|
|
1405
|
+
});
|
|
1406
|
+
(o || s) && (o && (this.#l = t, this.#i = n), this.#t = r, this.hasListeners() && (o && (be(e, n).forEach((e) => {
|
|
1407
|
+
e.destroy();
|
|
1408
|
+
}), be(n, e).forEach((e) => {
|
|
1409
|
+
e.subscribe((t) => {
|
|
1410
|
+
this.#m(e, t);
|
|
1411
|
+
});
|
|
1412
|
+
})), this.#h()));
|
|
1413
|
+
});
|
|
1414
|
+
}
|
|
1415
|
+
getCurrentResult() {
|
|
1416
|
+
return this.#t;
|
|
1417
|
+
}
|
|
1418
|
+
getQueries() {
|
|
1419
|
+
return this.#i.map((e) => e.getCurrentQuery());
|
|
1420
|
+
}
|
|
1421
|
+
getObservers() {
|
|
1422
|
+
return this.#i;
|
|
1423
|
+
}
|
|
1424
|
+
getOptimisticResult(e, t) {
|
|
1425
|
+
let n = this.#p(e), r = n.map((e) => e.observer.getOptimisticResult(e.defaultedQueryOptions)), i = n.map((e) => e.defaultedQueryOptions.queryHash);
|
|
1426
|
+
return [
|
|
1427
|
+
r,
|
|
1428
|
+
(e) => this.#d(e ?? r, t, i),
|
|
1429
|
+
() => this.#u(r, n)
|
|
1430
|
+
];
|
|
1431
|
+
}
|
|
1432
|
+
#u(e, t) {
|
|
1433
|
+
let n = /* @__PURE__ */ new Set();
|
|
1434
|
+
return t.map((r, i) => {
|
|
1435
|
+
let a = e[i];
|
|
1436
|
+
return r.defaultedQueryOptions.notifyOnChangeProps ? a : r.observer.trackResult(a, (e) => {
|
|
1437
|
+
n.has(e) || (n.add(e), t.forEach((t) => {
|
|
1438
|
+
t.observer.trackProp(e);
|
|
1439
|
+
}));
|
|
1440
|
+
});
|
|
1441
|
+
});
|
|
1442
|
+
}
|
|
1443
|
+
#d(e, t, n) {
|
|
1444
|
+
if (t) {
|
|
1445
|
+
let r = this.#c, i = n !== void 0 && r !== void 0 && (r.length !== n.length || n.some((e, t) => e !== r[t]));
|
|
1446
|
+
return (this.#t !== this.#s || i || t !== this.#o) && (this.#o = t, this.#s = this.#t, n !== void 0 && (this.#c = n), this.#a = S(this.#a, t(e))), this.#a;
|
|
1447
|
+
}
|
|
1448
|
+
return e;
|
|
1449
|
+
}
|
|
1450
|
+
#f() {
|
|
1451
|
+
return !this.#r?.combine || this.#i.some((e, t) => e.options.suspense && this.#t[t]?.data === void 0);
|
|
1452
|
+
}
|
|
1453
|
+
#p(e) {
|
|
1454
|
+
let t = /* @__PURE__ */ new Map();
|
|
1455
|
+
this.#i.forEach((e) => {
|
|
1456
|
+
let n = e.options.queryHash;
|
|
1457
|
+
if (!n) return;
|
|
1458
|
+
let r = t.get(n);
|
|
1459
|
+
r ? r.push(e) : t.set(n, [e]);
|
|
1460
|
+
});
|
|
1461
|
+
let n = [];
|
|
1462
|
+
return e.forEach((e) => {
|
|
1463
|
+
let r = this.#e.defaultQueryOptions(e), i = t.get(r.queryHash)?.shift() ?? new z(this.#e, r);
|
|
1464
|
+
n.push({
|
|
1465
|
+
defaultedQueryOptions: r,
|
|
1466
|
+
observer: i
|
|
1467
|
+
});
|
|
1468
|
+
}), n;
|
|
1469
|
+
}
|
|
1470
|
+
#m(e, t) {
|
|
1471
|
+
let n = this.#i.indexOf(e);
|
|
1472
|
+
n !== -1 && (this.#t = this.#t.slice(), this.#t[n] = t, this.#h());
|
|
1473
|
+
}
|
|
1474
|
+
#h() {
|
|
1475
|
+
if (this.hasListeners()) {
|
|
1476
|
+
let e = this.#f(), t = this.#a, n = e ? t : this.#d(this.#u(this.#t, this.#l), this.#r?.combine);
|
|
1477
|
+
(e || t !== n) && j.batch(() => {
|
|
1478
|
+
this.listeners.forEach((e) => {
|
|
1479
|
+
e(this.#t);
|
|
1480
|
+
});
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
}, Se = class extends k {
|
|
1485
|
+
#e;
|
|
1486
|
+
constructor(e = {}) {
|
|
1487
|
+
super(), this.config = e, this.#e = /* @__PURE__ */ new Map();
|
|
1488
|
+
}
|
|
1489
|
+
build(e, t, n) {
|
|
1490
|
+
let r = t.queryKey, i = t.queryHash ?? v(r, t), a = this.get(i);
|
|
1491
|
+
return a || (a = new he({
|
|
1492
|
+
client: e,
|
|
1493
|
+
queryKey: r,
|
|
1494
|
+
queryHash: i,
|
|
1495
|
+
options: e.defaultQueryOptions(t),
|
|
1496
|
+
state: n,
|
|
1497
|
+
defaultOptions: e.getQueryDefaults(r)
|
|
1498
|
+
}), this.add(a)), a;
|
|
1499
|
+
}
|
|
1500
|
+
add(e) {
|
|
1501
|
+
this.#e.has(e.queryHash) || (this.#e.set(e.queryHash, e), this.notify({
|
|
1502
|
+
type: "added",
|
|
1503
|
+
query: e
|
|
1504
|
+
}));
|
|
1505
|
+
}
|
|
1506
|
+
remove(e) {
|
|
1507
|
+
this.#e.get(e.queryHash) === e && (e.destroy(), this.#e.delete(e.queryHash), this.notify({
|
|
1508
|
+
type: "removed",
|
|
1509
|
+
query: e
|
|
1510
|
+
}));
|
|
1511
|
+
}
|
|
1512
|
+
clear() {
|
|
1513
|
+
j.batch(() => {
|
|
1514
|
+
this.getAll().forEach((e) => {
|
|
1515
|
+
this.remove(e);
|
|
1516
|
+
});
|
|
1517
|
+
});
|
|
1518
|
+
}
|
|
1519
|
+
get(e) {
|
|
1520
|
+
return this.#e.get(e);
|
|
1521
|
+
}
|
|
1522
|
+
getAll() {
|
|
1523
|
+
return [...this.#e.values()];
|
|
1524
|
+
}
|
|
1525
|
+
find(e) {
|
|
1526
|
+
let t = {
|
|
1527
|
+
exact: !0,
|
|
1528
|
+
...e
|
|
1529
|
+
};
|
|
1530
|
+
return this.getAll().find((e) => g(t, e));
|
|
1531
|
+
}
|
|
1532
|
+
findAll(e = {}) {
|
|
1533
|
+
let t = this.getAll();
|
|
1534
|
+
return Object.keys(e).length > 0 ? t.filter((t) => g(e, t)) : t;
|
|
1535
|
+
}
|
|
1536
|
+
notify(e) {
|
|
1537
|
+
j.batch(() => {
|
|
1538
|
+
this.listeners.forEach((t) => {
|
|
1539
|
+
t(e);
|
|
1540
|
+
});
|
|
1541
|
+
});
|
|
1542
|
+
}
|
|
1543
|
+
onFocus() {
|
|
1544
|
+
j.batch(() => {
|
|
1545
|
+
this.getAll().forEach((e) => {
|
|
1546
|
+
e.onFocus();
|
|
1547
|
+
});
|
|
1548
|
+
});
|
|
1549
|
+
}
|
|
1550
|
+
onOnline() {
|
|
1551
|
+
j.batch(() => {
|
|
1552
|
+
this.getAll().forEach((e) => {
|
|
1553
|
+
e.onOnline();
|
|
1554
|
+
});
|
|
1555
|
+
});
|
|
1556
|
+
}
|
|
1557
|
+
}, Ce = class {
|
|
1558
|
+
#e;
|
|
1559
|
+
#t;
|
|
1560
|
+
#n;
|
|
1561
|
+
#r;
|
|
1562
|
+
#i;
|
|
1563
|
+
#a;
|
|
1564
|
+
#o;
|
|
1565
|
+
#s;
|
|
1566
|
+
constructor(e = {}) {
|
|
1567
|
+
this.#e = e.queryCache || new Se(), this.#t = e.mutationCache || new ve(), this.#n = e.defaultOptions || {}, this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Map(), this.#a = 0;
|
|
1568
|
+
}
|
|
1569
|
+
mount() {
|
|
1570
|
+
this.#a++, this.#a === 1 && (this.#o = A.subscribe(async (e) => {
|
|
1571
|
+
e && (await this.resumePausedMutations(), this.#e.onFocus());
|
|
1572
|
+
}), this.#s = M.subscribe(async (e) => {
|
|
1573
|
+
e && (await this.resumePausedMutations(), this.#e.onOnline());
|
|
1574
|
+
}));
|
|
1575
|
+
}
|
|
1576
|
+
unmount() {
|
|
1577
|
+
this.#a--, this.#a === 0 && (this.#o?.(), this.#o = void 0, this.#s?.(), this.#s = void 0);
|
|
1578
|
+
}
|
|
1579
|
+
isFetching(e) {
|
|
1580
|
+
return this.#e.findAll({
|
|
1581
|
+
...e,
|
|
1582
|
+
fetchStatus: "fetching"
|
|
1583
|
+
}).length;
|
|
1584
|
+
}
|
|
1585
|
+
isMutating(e) {
|
|
1586
|
+
return this.#t.findAll({
|
|
1587
|
+
...e,
|
|
1588
|
+
status: "pending"
|
|
1589
|
+
}).length;
|
|
1590
|
+
}
|
|
1591
|
+
getQueryData(e) {
|
|
1592
|
+
let t = this.defaultQueryOptions({ queryKey: e });
|
|
1593
|
+
return this.#e.get(t.queryHash)?.state.data;
|
|
1594
|
+
}
|
|
1595
|
+
ensureQueryData(e) {
|
|
1596
|
+
let t = this.defaultQueryOptions(e), n = this.#e.build(this, t), r = n.state.data;
|
|
1597
|
+
return r === void 0 ? this.fetchQuery(e) : (e.revalidateIfStale && n.isStaleByTime(h(t.staleTime, n)) && this.prefetchQuery(t), Promise.resolve(r));
|
|
1598
|
+
}
|
|
1599
|
+
getQueriesData(e) {
|
|
1600
|
+
return this.#e.findAll(e).map(({ queryKey: e, state: t }) => [e, t.data]);
|
|
1601
|
+
}
|
|
1602
|
+
setQueryData(e, t, n) {
|
|
1603
|
+
let r = this.defaultQueryOptions({ queryKey: e }), i = this.#e.get(r.queryHash)?.state.data, a = f(t, i);
|
|
1604
|
+
if (a !== void 0) return this.#e.build(this, r).setData(a, {
|
|
1605
|
+
...n,
|
|
1606
|
+
manual: !0
|
|
1607
|
+
});
|
|
1608
|
+
}
|
|
1609
|
+
setQueriesData(e, t, n) {
|
|
1610
|
+
return j.batch(() => this.#e.findAll(e).map(({ queryKey: e }) => [e, this.setQueryData(e, t, n)]));
|
|
1611
|
+
}
|
|
1612
|
+
getQueryState(e) {
|
|
1613
|
+
let t = this.defaultQueryOptions({ queryKey: e });
|
|
1614
|
+
return this.#e.get(t.queryHash)?.state;
|
|
1615
|
+
}
|
|
1616
|
+
removeQueries(e) {
|
|
1617
|
+
let t = this.#e;
|
|
1618
|
+
j.batch(() => {
|
|
1619
|
+
t.findAll(e).forEach((e) => {
|
|
1620
|
+
t.remove(e);
|
|
1621
|
+
});
|
|
1622
|
+
});
|
|
1623
|
+
}
|
|
1624
|
+
resetQueries(e, t) {
|
|
1625
|
+
let n = this.#e;
|
|
1626
|
+
return j.batch(() => {
|
|
1627
|
+
let r = n.findAll(e), i = new Set(r);
|
|
1628
|
+
return r.forEach((e) => {
|
|
1629
|
+
e.reset();
|
|
1630
|
+
}), this.refetchQueries({
|
|
1631
|
+
type: "active",
|
|
1632
|
+
predicate: (e) => i.has(e)
|
|
1633
|
+
}, t);
|
|
1634
|
+
});
|
|
1635
|
+
}
|
|
1636
|
+
cancelQueries(e, t = {}) {
|
|
1637
|
+
let n = {
|
|
1638
|
+
revert: !0,
|
|
1639
|
+
...t
|
|
1640
|
+
}, r = j.batch(() => this.#e.findAll(e).map((e) => e.cancel(n)));
|
|
1641
|
+
return Promise.all(r).then(d).catch(d);
|
|
1642
|
+
}
|
|
1643
|
+
invalidateQueries(e, t = {}) {
|
|
1644
|
+
return j.batch(() => (this.#e.findAll(e).forEach((e) => {
|
|
1645
|
+
e.invalidate();
|
|
1646
|
+
}), e?.refetchType === "none" ? Promise.resolve() : this.refetchQueries({
|
|
1647
|
+
...e,
|
|
1648
|
+
type: e?.refetchType ?? e?.type ?? "active"
|
|
1649
|
+
}, t)));
|
|
1650
|
+
}
|
|
1651
|
+
refetchQueries(e, t = {}) {
|
|
1652
|
+
let n = {
|
|
1653
|
+
...t,
|
|
1654
|
+
cancelRefetch: t.cancelRefetch ?? !0
|
|
1655
|
+
}, r = j.batch(() => this.#e.findAll(e).filter((e) => !e.isDisabled() && !e.isStatic()).map((e) => {
|
|
1656
|
+
let t = e.fetch(void 0, n);
|
|
1657
|
+
return n.throwOnError || (t = t.catch(d)), e.state.fetchStatus === "paused" ? Promise.resolve() : t;
|
|
1658
|
+
}));
|
|
1659
|
+
return Promise.all(r).then(d);
|
|
1660
|
+
}
|
|
1661
|
+
async query(e) {
|
|
1662
|
+
let t = this.defaultQueryOptions(e);
|
|
1663
|
+
t.retry === void 0 && (t.retry = !1);
|
|
1664
|
+
let n = this.#e.build(this, t), r = n.isStaleByTime(h(t.staleTime, n)) ? await n.fetch(t) : n.state.data, i = t.select;
|
|
1665
|
+
return i ? i(r) : r;
|
|
1666
|
+
}
|
|
1667
|
+
fetchQuery(e) {
|
|
1668
|
+
let t = this.defaultQueryOptions(e);
|
|
1669
|
+
t.retry === void 0 && (t.retry = !1);
|
|
1670
|
+
let n = this.#e.build(this, t);
|
|
1671
|
+
return n.isStaleByTime(h(t.staleTime, n)) ? n.fetch(t) : Promise.resolve(n.state.data);
|
|
1672
|
+
}
|
|
1673
|
+
prefetchQuery(e) {
|
|
1674
|
+
return this.fetchQuery(e).then(d).catch(d);
|
|
1675
|
+
}
|
|
1676
|
+
infiniteQuery(e) {
|
|
1677
|
+
return e._type = "infinite", this.query(e);
|
|
1678
|
+
}
|
|
1679
|
+
fetchInfiniteQuery(e) {
|
|
1680
|
+
return e._type = "infinite", this.fetchQuery(e);
|
|
1681
|
+
}
|
|
1682
|
+
prefetchInfiniteQuery(e) {
|
|
1683
|
+
return this.fetchInfiniteQuery(e).then(d).catch(d);
|
|
1684
|
+
}
|
|
1685
|
+
ensureInfiniteQueryData(e) {
|
|
1686
|
+
return e._type = "infinite", this.ensureQueryData(e);
|
|
1687
|
+
}
|
|
1688
|
+
resumePausedMutations() {
|
|
1689
|
+
return M.isOnline() ? this.#t.resumePausedMutations() : Promise.resolve();
|
|
1690
|
+
}
|
|
1691
|
+
getQueryCache() {
|
|
1692
|
+
return this.#e;
|
|
1693
|
+
}
|
|
1694
|
+
getMutationCache() {
|
|
1695
|
+
return this.#t;
|
|
1696
|
+
}
|
|
1697
|
+
getDefaultOptions() {
|
|
1698
|
+
return this.#n;
|
|
1699
|
+
}
|
|
1700
|
+
setDefaultOptions(e) {
|
|
1701
|
+
this.#n = e;
|
|
1702
|
+
}
|
|
1703
|
+
setQueryDefaults(e, t) {
|
|
1704
|
+
this.#r.set(y(e), {
|
|
1705
|
+
queryKey: e,
|
|
1706
|
+
defaultOptions: t
|
|
1707
|
+
});
|
|
1708
|
+
}
|
|
1709
|
+
getQueryDefaults(e) {
|
|
1710
|
+
let t = [...this.#r.values()], n = {};
|
|
1711
|
+
return t.forEach((t) => {
|
|
1712
|
+
b(e, t.queryKey) && Object.assign(n, t.defaultOptions);
|
|
1713
|
+
}), n;
|
|
1714
|
+
}
|
|
1715
|
+
setMutationDefaults(e, t) {
|
|
1716
|
+
this.#i.set(y(e), {
|
|
1717
|
+
mutationKey: e,
|
|
1718
|
+
defaultOptions: t
|
|
1719
|
+
});
|
|
1720
|
+
}
|
|
1721
|
+
getMutationDefaults(e) {
|
|
1722
|
+
let t = [...this.#i.values()], n = {};
|
|
1723
|
+
return t.forEach((t) => {
|
|
1724
|
+
b(e, t.mutationKey) && Object.assign(n, t.defaultOptions);
|
|
1725
|
+
}), n;
|
|
1726
|
+
}
|
|
1727
|
+
defaultQueryOptions(e) {
|
|
1728
|
+
if (e._defaulted) return e;
|
|
1729
|
+
let t = {
|
|
1730
|
+
...this.#n.queries,
|
|
1731
|
+
...this.getQueryDefaults(e.queryKey),
|
|
1732
|
+
...e,
|
|
1733
|
+
_defaulted: !0
|
|
1734
|
+
};
|
|
1735
|
+
return t.queryHash ||= v(t.queryKey, t), t.refetchOnReconnect === void 0 && (t.refetchOnReconnect = t.networkMode !== "always"), t.throwOnError === void 0 && (t.throwOnError = !!t.suspense), !t.networkMode && t.persister && (t.networkMode = "offlineFirst"), t.queryFn === E && (t.enabled = !1), t;
|
|
1736
|
+
}
|
|
1737
|
+
defaultMutationOptions(e) {
|
|
1738
|
+
return e?._defaulted ? e : {
|
|
1739
|
+
...this.#n.mutations,
|
|
1740
|
+
...e?.mutationKey && this.getMutationDefaults(e.mutationKey),
|
|
1741
|
+
...e,
|
|
1742
|
+
_defaulted: !0
|
|
1743
|
+
};
|
|
1744
|
+
}
|
|
1745
|
+
clear() {
|
|
1746
|
+
this.#e.clear(), this.#t.clear();
|
|
1747
|
+
}
|
|
1748
|
+
}, we = n.createContext(!1), Te = () => n.useContext(we);
|
|
1749
|
+
//#endregion
|
|
1750
|
+
//#region node_modules/@tanstack/react-query/build/modern/QueryErrorResetBoundary.js
|
|
1751
|
+
function Ee() {
|
|
1752
|
+
let e = !1;
|
|
1753
|
+
return {
|
|
1754
|
+
clearReset: () => {
|
|
1755
|
+
e = !1;
|
|
1756
|
+
},
|
|
1757
|
+
reset: () => {
|
|
1758
|
+
e = !0;
|
|
1759
|
+
},
|
|
1760
|
+
isReset: () => e
|
|
1761
|
+
};
|
|
1762
|
+
}
|
|
1763
|
+
var De = n.createContext(Ee()), Oe = () => n.useContext(De), K = (e, t, n) => {
|
|
1764
|
+
let r = n?.state.error && typeof e.throwOnError == "function" ? D(e.throwOnError, [n.state.error, n]) : e.throwOnError;
|
|
1765
|
+
(e.suspense || r) && (t.isReset() || (e.retryOnMount = !1));
|
|
1766
|
+
}, ke = (e) => {
|
|
1767
|
+
n.useEffect(() => {
|
|
1768
|
+
e.clearReset();
|
|
1769
|
+
}, [e]);
|
|
1770
|
+
}, Ae = ({ result: e, errorResetBoundary: t, throwOnError: n, query: r, suspense: i }) => e.isError && !t.isReset() && !e.isFetching && r && (i && e.data === void 0 || D(n, [e.error, r])), je = (e) => {
|
|
1771
|
+
if (e.suspense) {
|
|
1772
|
+
let t = 1e3, n = (e) => e === "static" ? e : Math.max(e ?? t, t), r = e.staleTime;
|
|
1773
|
+
e.staleTime = typeof r == "function" ? (...e) => n(r(...e)) : n(r), typeof e.gcTime == "number" && (e.gcTime = Math.max(e.gcTime, t));
|
|
1774
|
+
}
|
|
1775
|
+
}, q = (e, t) => e?.suspense && t.isPending, Me = (e, t, n) => t.fetchOptimistic(e).catch(() => {
|
|
1776
|
+
n.clearReset();
|
|
1777
|
+
});
|
|
1778
|
+
//#endregion
|
|
1779
|
+
//#region node_modules/@tanstack/react-query/build/modern/useQueries.js
|
|
1780
|
+
function Ne({ queries: e, ...t }, r) {
|
|
1781
|
+
let i = a(r), o = Te(), s = Oe(), c = t.subscribed !== !1, l = n.useMemo(() => e.map((e) => {
|
|
1782
|
+
let t = i.defaultQueryOptions(e);
|
|
1783
|
+
return t._optimisticResults = o ? "isRestoring" : c ? "optimistic" : void 0, t;
|
|
1784
|
+
}), [
|
|
1785
|
+
e,
|
|
1786
|
+
i,
|
|
1787
|
+
o,
|
|
1788
|
+
c
|
|
1789
|
+
]);
|
|
1790
|
+
l.forEach((e) => {
|
|
1791
|
+
je(e);
|
|
1792
|
+
let t = i.getQueryCache().get(e.queryHash);
|
|
1793
|
+
K(e, s, t);
|
|
1794
|
+
}), ke(s);
|
|
1795
|
+
let [u] = n.useState(() => new xe(i, l, t)), [f, p, m] = u.getOptimisticResult(l, t.combine), h = !o && c;
|
|
1796
|
+
n.useSyncExternalStore(n.useCallback((e) => h ? u.subscribe(j.batchCalls(e)) : d, [u, h]), () => u.getCurrentResult(), () => u.getCurrentResult()), n.useEffect(() => {
|
|
1797
|
+
u.setQueries(l, t);
|
|
1798
|
+
}, [
|
|
1799
|
+
l,
|
|
1800
|
+
t,
|
|
1801
|
+
u
|
|
1802
|
+
]);
|
|
1803
|
+
let g = f.some((e, t) => q(l[t], e)) ? f.flatMap((e, t) => {
|
|
1804
|
+
let n = l[t];
|
|
1805
|
+
return n && q(n, e) ? Me(n, new z(i, n), s) : [];
|
|
1806
|
+
}) : [];
|
|
1807
|
+
if (g.length > 0) throw Promise.all(g);
|
|
1808
|
+
let _ = f.find((e, t) => {
|
|
1809
|
+
let n = l[t];
|
|
1810
|
+
return n && Ae({
|
|
1811
|
+
result: e,
|
|
1812
|
+
errorResetBoundary: s,
|
|
1813
|
+
throwOnError: n.throwOnError,
|
|
1814
|
+
query: i.getQueryCache().get(n.queryHash),
|
|
1815
|
+
suspense: n.suspense
|
|
1816
|
+
});
|
|
1817
|
+
});
|
|
1818
|
+
if (_) throw _.error;
|
|
1819
|
+
return p(m());
|
|
1820
|
+
}
|
|
1821
|
+
//#endregion
|
|
1822
|
+
//#region node_modules/@tanstack/react-query/build/modern/useBaseQuery.js
|
|
1823
|
+
function Pe(e, t, r) {
|
|
1824
|
+
if (process.env.NODE_ENV !== "production" && (typeof e != "object" || Array.isArray(e))) throw Error("Bad argument type. Starting with v5, only the \"Object\" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object");
|
|
1825
|
+
let i = Te(), o = Oe(), s = a(r), c = s.defaultQueryOptions(e), l = s.getQueryCache().get(c.queryHash);
|
|
1826
|
+
process.env.NODE_ENV !== "production" && (c.queryFn || console.error(`[${c.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`));
|
|
1827
|
+
let u = e.subscribed !== !1;
|
|
1828
|
+
c._optimisticResults = i ? "isRestoring" : u ? "optimistic" : void 0, je(c), K(c, o, l), ke(o);
|
|
1829
|
+
let [f] = n.useState(() => new t(s, c)), p = f.getOptimisticResult(c), m = !i && u;
|
|
1830
|
+
if (n.useSyncExternalStore(n.useCallback((e) => {
|
|
1831
|
+
let t = m ? f.subscribe(j.batchCalls(e)) : d;
|
|
1832
|
+
return f.updateResult(), t;
|
|
1833
|
+
}, [f, m]), () => f.getCurrentResult(), () => f.getCurrentResult()), n.useEffect(() => {
|
|
1834
|
+
f.setOptions(c);
|
|
1835
|
+
}, [c, f]), q(c, p)) throw Me(c, f, o);
|
|
1836
|
+
if (Ae({
|
|
1837
|
+
result: p,
|
|
1838
|
+
errorResetBoundary: o,
|
|
1839
|
+
throwOnError: c.throwOnError,
|
|
1840
|
+
query: l,
|
|
1841
|
+
suspense: c.suspense
|
|
1842
|
+
})) throw p.error;
|
|
1843
|
+
return c.notifyOnChangeProps ? p : f.trackResult(p);
|
|
1844
|
+
}
|
|
1845
|
+
//#endregion
|
|
1846
|
+
//#region node_modules/@tanstack/react-query/build/modern/useQuery.js
|
|
1847
|
+
function Fe(e, t) {
|
|
1848
|
+
return Pe(e, z, t);
|
|
1849
|
+
}
|
|
1850
|
+
//#endregion
|
|
1851
|
+
//#region node_modules/@tanstack/react-query/build/modern/useMutation.js
|
|
1852
|
+
function Ie(e, t) {
|
|
1853
|
+
let r = a(t), [i] = n.useState(() => new ye(r, e));
|
|
1854
|
+
n.useEffect(() => {
|
|
1855
|
+
i.setOptions(e);
|
|
1856
|
+
}, [i, e]);
|
|
1857
|
+
let o = n.useSyncExternalStore(n.useCallback((e) => i.subscribe(j.batchCalls(e)), [i]), () => i.getCurrentResult(), () => i.getCurrentResult()), s = n.useCallback((...e) => {
|
|
1858
|
+
i.mutate(e[0], e[1]).catch(d);
|
|
1859
|
+
}, [i]);
|
|
1860
|
+
if (o.error && D(i.options.throwOnError, [o.error])) throw o.error;
|
|
1861
|
+
return {
|
|
1862
|
+
...o,
|
|
1863
|
+
mutate: s,
|
|
1864
|
+
mutateAsync: o.mutate
|
|
1865
|
+
};
|
|
1866
|
+
}
|
|
1867
|
+
//#endregion
|
|
1868
|
+
//#region node_modules/react-intersection-observer/dist/index.mjs
|
|
1869
|
+
var J = /* @__PURE__ */ new Map(), Y = /* @__PURE__ */ new WeakMap(), Le = 0, Re;
|
|
1870
|
+
function ze(e) {
|
|
1871
|
+
return e ? (Y.has(e) || (Le += 1, Y.set(e, Le.toString())), Y.get(e)) : "0";
|
|
1872
|
+
}
|
|
1873
|
+
function Be(e) {
|
|
1874
|
+
return Object.keys(e).sort().filter((t) => e[t] !== void 0).map((t) => `${t}_${t === "root" ? ze(e.root) : e[t]}`).toString();
|
|
1875
|
+
}
|
|
1876
|
+
function Ve(e) {
|
|
1877
|
+
let t = Be(e), n = J.get(t);
|
|
1878
|
+
if (!n) {
|
|
1879
|
+
let r = /* @__PURE__ */ new Map(), i, a = new IntersectionObserver((t) => {
|
|
1880
|
+
t.forEach((t) => {
|
|
1881
|
+
let n = t.isIntersecting && i.some((e) => t.intersectionRatio >= e);
|
|
1882
|
+
e.trackVisibility && t.isVisible === void 0 && (t.isVisible = n), [...r.get(t.target) ?? []].forEach((e) => {
|
|
1883
|
+
e(n, t);
|
|
1884
|
+
});
|
|
1885
|
+
});
|
|
1886
|
+
}, e);
|
|
1887
|
+
i = a.thresholds || (Array.isArray(e.threshold) ? e.threshold : [e.threshold || 0]), n = {
|
|
1888
|
+
id: t,
|
|
1889
|
+
observer: a,
|
|
1890
|
+
elements: r
|
|
1891
|
+
}, J.set(t, n);
|
|
1892
|
+
}
|
|
1893
|
+
return n;
|
|
1894
|
+
}
|
|
1895
|
+
function He(e, t, n = {}, r = Re) {
|
|
1896
|
+
if (window.IntersectionObserver === void 0 && r !== void 0) {
|
|
1897
|
+
let i = e.getBoundingClientRect();
|
|
1898
|
+
return t(r, {
|
|
1899
|
+
isIntersecting: r,
|
|
1900
|
+
target: e,
|
|
1901
|
+
intersectionRatio: typeof n.threshold == "number" ? n.threshold : 0,
|
|
1902
|
+
time: 0,
|
|
1903
|
+
boundingClientRect: i,
|
|
1904
|
+
intersectionRect: i,
|
|
1905
|
+
rootBounds: i
|
|
1906
|
+
}), () => {};
|
|
1907
|
+
}
|
|
1908
|
+
let { id: i, observer: a, elements: o } = Ve(n), s = o.get(e) || [];
|
|
1909
|
+
o.has(e) || o.set(e, s), s.push(t), a.observe(e);
|
|
1910
|
+
let c = !1;
|
|
1911
|
+
return function() {
|
|
1912
|
+
c || (c = !0, s.splice(s.indexOf(t), 1), s.length === 0 && (o.delete(e), a.unobserve(e)), o.size === 0 && (a.disconnect(), J.delete(i)));
|
|
1913
|
+
};
|
|
1914
|
+
}
|
|
1915
|
+
var Ue = Reflect.get(n, "useInsertionEffect"), We = Ue ?? n.useEffect;
|
|
1916
|
+
function Ge(e) {
|
|
1917
|
+
return e?.startsWith("19.") || !1;
|
|
1918
|
+
}
|
|
1919
|
+
var Ke = Ge(n.version);
|
|
1920
|
+
function qe(e, { threshold: t, root: r, rootMargin: i, scrollMargin: a, trackVisibility: o, delay: s, fallbackInView: c, skip: l, triggerOnce: u }) {
|
|
1921
|
+
let d = n.useRef(e), f = n.useRef({
|
|
1922
|
+
node: null,
|
|
1923
|
+
stop: void 0,
|
|
1924
|
+
owner: null
|
|
1925
|
+
});
|
|
1926
|
+
return Ue || (d.current = e), We(() => {
|
|
1927
|
+
d.current = e;
|
|
1928
|
+
}, [e]), n.useCallback(function e(n) {
|
|
1929
|
+
let p = f.current;
|
|
1930
|
+
if (!n && p.owner !== e) return;
|
|
1931
|
+
if (n === p.node) return p.owner = e, Ke ? p.stop : void 0;
|
|
1932
|
+
let m = p.stop;
|
|
1933
|
+
if (p.stop = void 0, m?.(), !n || l) {
|
|
1934
|
+
p.node = null, p.owner = n ? e : null;
|
|
1935
|
+
return;
|
|
1936
|
+
}
|
|
1937
|
+
p.node = n, p.owner = e;
|
|
1938
|
+
let h, g;
|
|
1939
|
+
function _() {
|
|
1940
|
+
h?.(), p.stop === _ && (p.node = null, p.stop = void 0);
|
|
1941
|
+
}
|
|
1942
|
+
return p.stop = _, h = He(n, (e, t) => {
|
|
1943
|
+
d.current(e, t, g), g = e, u && e && _();
|
|
1944
|
+
}, {
|
|
1945
|
+
threshold: t,
|
|
1946
|
+
root: r,
|
|
1947
|
+
rootMargin: i,
|
|
1948
|
+
scrollMargin: a,
|
|
1949
|
+
trackVisibility: o,
|
|
1950
|
+
delay: s
|
|
1951
|
+
}, c), p.stop !== _ && h(), Ke ? p.stop : void 0;
|
|
1952
|
+
}, [
|
|
1953
|
+
Array.isArray(t) ? t.toString() : t,
|
|
1954
|
+
r,
|
|
1955
|
+
i,
|
|
1956
|
+
a,
|
|
1957
|
+
o,
|
|
1958
|
+
s,
|
|
1959
|
+
c,
|
|
1960
|
+
l,
|
|
1961
|
+
u
|
|
1962
|
+
]);
|
|
1963
|
+
}
|
|
1964
|
+
var Je = typeof window > "u" ? n.useEffect : n.useLayoutEffect;
|
|
1965
|
+
function Ye({ threshold: e, delay: t, trackVisibility: r, rootMargin: i, scrollMargin: a, root: o, triggerOnce: s, skip: c, initialInView: l, fallbackInView: u, onChange: d } = {}) {
|
|
1966
|
+
let f = n.useRef(l), [p, m] = n.useState({
|
|
1967
|
+
inView: !!l,
|
|
1968
|
+
entry: void 0
|
|
1969
|
+
}), h = qe((e, t) => {
|
|
1970
|
+
let n = f.current;
|
|
1971
|
+
f.current = e, (n !== void 0 || e) && (m({
|
|
1972
|
+
inView: e,
|
|
1973
|
+
entry: t
|
|
1974
|
+
}), d?.(e, t));
|
|
1975
|
+
}, {
|
|
1976
|
+
threshold: e,
|
|
1977
|
+
root: o,
|
|
1978
|
+
rootMargin: i,
|
|
1979
|
+
scrollMargin: a,
|
|
1980
|
+
trackVisibility: r,
|
|
1981
|
+
delay: t,
|
|
1982
|
+
fallbackInView: u,
|
|
1983
|
+
skip: c,
|
|
1984
|
+
triggerOnce: s
|
|
1985
|
+
}), g = n.useRef({
|
|
1986
|
+
node: null,
|
|
1987
|
+
reset: !1
|
|
1988
|
+
}), _ = n.useCallback(function(e) {
|
|
1989
|
+
e ? (g.current.node = e, g.current.reset = !1) : g.current.node && (g.current.node = null, g.current.reset = !0);
|
|
1990
|
+
let t = h(e);
|
|
1991
|
+
if (t) return () => {
|
|
1992
|
+
t(), g.current.node === e && (g.current.node = null, g.current.reset = !0);
|
|
1993
|
+
};
|
|
1994
|
+
}, [h]);
|
|
1995
|
+
Je(() => {
|
|
1996
|
+
g.current.reset && (g.current.reset = !1, !(s || c) && (m({
|
|
1997
|
+
inView: !!l,
|
|
1998
|
+
entry: void 0
|
|
1999
|
+
}), f.current = l));
|
|
2000
|
+
});
|
|
2001
|
+
let v = [
|
|
2002
|
+
_,
|
|
2003
|
+
p.inView,
|
|
2004
|
+
p.entry
|
|
2005
|
+
];
|
|
2006
|
+
return v.ref = v[0], v.inView = v[1], v.entry = v[2], v;
|
|
2007
|
+
}
|
|
2008
|
+
//#endregion
|
|
2009
|
+
//#region node_modules/zustand/esm/vanilla.mjs
|
|
2010
|
+
var Xe = (e) => {
|
|
2011
|
+
let t, n = /* @__PURE__ */ new Set(), r = (e, r) => {
|
|
2012
|
+
let i = typeof e == "function" ? e(t) : e;
|
|
2013
|
+
if (!Object.is(i, t)) {
|
|
2014
|
+
let e = t;
|
|
2015
|
+
t = r ?? (typeof i != "object" || !i) ? i : Object.assign({}, t, i), n.forEach((n) => n(t, e));
|
|
2016
|
+
}
|
|
2017
|
+
}, i = () => t, a = {
|
|
2018
|
+
setState: r,
|
|
2019
|
+
getState: i,
|
|
2020
|
+
getInitialState: () => o,
|
|
2021
|
+
subscribe: (e) => (n.add(e), () => n.delete(e))
|
|
2022
|
+
}, o = t = e(r, i, a);
|
|
2023
|
+
return a;
|
|
2024
|
+
}, Ze = ((e) => e ? Xe(e) : Xe), Qe = (e) => e;
|
|
2025
|
+
function $e(e, n = Qe) {
|
|
2026
|
+
let r = t.useSyncExternalStore(e.subscribe, t.useCallback(() => n(e.getState()), [e, n]), t.useCallback(() => n(e.getInitialState()), [e, n]));
|
|
2027
|
+
return t.useDebugValue(r), r;
|
|
2028
|
+
}
|
|
2029
|
+
//#endregion
|
|
2030
|
+
//#region node_modules/zustand/esm/middleware.mjs
|
|
2031
|
+
var et = (e) => !!e.dispatchFromDevtools && typeof e.dispatch == "function", X = /* @__PURE__ */ new Map(), Z = (e) => {
|
|
2032
|
+
let t = X.get(e);
|
|
2033
|
+
return t ? Object.fromEntries(Object.entries(t.stores).map(([e, t]) => [e, t.getState()])) : {};
|
|
2034
|
+
}, tt = (e, t, n) => {
|
|
2035
|
+
if (e === void 0) return {
|
|
2036
|
+
type: "untracked",
|
|
2037
|
+
connection: t.connect(n)
|
|
2038
|
+
};
|
|
2039
|
+
let r = X.get(n.name);
|
|
2040
|
+
if (r) return {
|
|
2041
|
+
type: "tracked",
|
|
2042
|
+
store: e,
|
|
2043
|
+
...r
|
|
2044
|
+
};
|
|
2045
|
+
let i = {
|
|
2046
|
+
connection: t.connect(n),
|
|
2047
|
+
stores: {}
|
|
2048
|
+
};
|
|
2049
|
+
return X.set(n.name, i), {
|
|
2050
|
+
type: "tracked",
|
|
2051
|
+
store: e,
|
|
2052
|
+
...i
|
|
2053
|
+
};
|
|
2054
|
+
}, nt = (e, t) => {
|
|
2055
|
+
if (t === void 0) return;
|
|
2056
|
+
let n = X.get(e);
|
|
2057
|
+
n && (delete n.stores[t], Object.keys(n.stores).length === 0 && X.delete(e));
|
|
2058
|
+
}, rt = /^at (?:new |async )?(.+?) \(/, it = /^([^@]+)@/;
|
|
2059
|
+
function at(e) {
|
|
2060
|
+
if (!e) return;
|
|
2061
|
+
let t = e.split("\n"), n = t.findIndex((e) => e.includes("api.setState"));
|
|
2062
|
+
if (n < 0) return;
|
|
2063
|
+
let r = t[n + 1]?.trim() || "";
|
|
2064
|
+
return rt.exec(r)?.[1] || it.exec(r)?.[1];
|
|
2065
|
+
}
|
|
2066
|
+
var ot = (e, t = {}) => (n, r, i) => {
|
|
2067
|
+
let { enabled: a, anonymousActionType: o, store: s, ...c } = t, l;
|
|
2068
|
+
try {
|
|
2069
|
+
l = (a ?? !1) && window.__REDUX_DEVTOOLS_EXTENSION__;
|
|
2070
|
+
} catch {}
|
|
2071
|
+
if (!l) return e(n, r, i);
|
|
2072
|
+
let { connection: u, ...d } = tt(s, l, c), f = !0;
|
|
2073
|
+
i.setState = ((e, t, a) => {
|
|
2074
|
+
let l = n(e, t);
|
|
2075
|
+
if (!f) return l;
|
|
2076
|
+
let d = a === void 0 ? { type: o || at((/* @__PURE__ */ Error()).stack) || "anonymous" } : typeof a == "string" ? { type: a } : a;
|
|
2077
|
+
return s === void 0 ? (u?.send(d, r()), l) : (u?.send({
|
|
2078
|
+
...d,
|
|
2079
|
+
type: `${s}/${d.type}`
|
|
2080
|
+
}, {
|
|
2081
|
+
...Z(c.name),
|
|
2082
|
+
[s]: i.getState()
|
|
2083
|
+
}), l);
|
|
2084
|
+
}), i.devtools = { cleanup: () => {
|
|
2085
|
+
u && typeof u.unsubscribe == "function" && u.unsubscribe(), nt(c.name, s);
|
|
2086
|
+
} };
|
|
2087
|
+
let p = (...e) => {
|
|
2088
|
+
let t = f;
|
|
2089
|
+
f = !1, n(...e), f = t;
|
|
2090
|
+
}, m = e(i.setState, r, i);
|
|
2091
|
+
if (d.type === "untracked" ? u?.init(m) : (d.stores[d.store] = i, u?.init(Object.fromEntries(Object.entries(d.stores).map(([e, t]) => [e, e === d.store ? m : t.getState()])))), et(i)) {
|
|
2092
|
+
let e = i.dispatch;
|
|
2093
|
+
i.dispatch = (...t) => {
|
|
2094
|
+
e(...t);
|
|
2095
|
+
};
|
|
2096
|
+
}
|
|
2097
|
+
return u.subscribe((e) => {
|
|
2098
|
+
switch (e.type) {
|
|
2099
|
+
case "ACTION":
|
|
2100
|
+
if (typeof e.payload != "string") {
|
|
2101
|
+
console.error("[zustand devtools middleware] Unsupported action format");
|
|
2102
|
+
return;
|
|
2103
|
+
}
|
|
2104
|
+
return Q(e.payload, (e) => {
|
|
2105
|
+
if (e.type === "__setState") {
|
|
2106
|
+
if (s === void 0) {
|
|
2107
|
+
p(e.state);
|
|
2108
|
+
return;
|
|
2109
|
+
}
|
|
2110
|
+
Object.keys(e.state).length !== 1 && console.error("\n [zustand devtools middleware] Unsupported __setState action format.\n When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),\n and value of this only key should be a state object. Example: { \"type\": \"__setState\", \"state\": { \"abc123Store\": { \"foo\": \"bar\" } } }\n ");
|
|
2111
|
+
let t = e.state[s];
|
|
2112
|
+
if (t == null) return;
|
|
2113
|
+
JSON.stringify(i.getState()) !== JSON.stringify(t) && p(t);
|
|
2114
|
+
} else et(i) && i.dispatch(e);
|
|
2115
|
+
});
|
|
2116
|
+
case "DISPATCH":
|
|
2117
|
+
switch (e.payload.type) {
|
|
2118
|
+
case "RESET": return p(m), s === void 0 ? u?.init(i.getState()) : u?.init(Z(c.name));
|
|
2119
|
+
case "COMMIT":
|
|
2120
|
+
if (s === void 0) {
|
|
2121
|
+
u?.init(i.getState());
|
|
2122
|
+
return;
|
|
2123
|
+
}
|
|
2124
|
+
return u?.init(Z(c.name));
|
|
2125
|
+
case "ROLLBACK": return Q(e.state, (e) => {
|
|
2126
|
+
s === void 0 ? (p(e), u?.init(i.getState())) : (p(e[s]), u?.init(Z(c.name)));
|
|
2127
|
+
});
|
|
2128
|
+
case "JUMP_TO_STATE":
|
|
2129
|
+
case "JUMP_TO_ACTION": return Q(e.state, (e) => {
|
|
2130
|
+
s === void 0 ? p(e) : JSON.stringify(i.getState()) !== JSON.stringify(e[s]) && p(e[s]);
|
|
2131
|
+
});
|
|
2132
|
+
case "IMPORT_STATE": {
|
|
2133
|
+
let { nextLiftedState: t } = e.payload, n = t.computedStates.slice(-1)[0]?.state;
|
|
2134
|
+
if (!n) return;
|
|
2135
|
+
p(s === void 0 ? n : n[s]), u?.send(null, t);
|
|
2136
|
+
return;
|
|
2137
|
+
}
|
|
2138
|
+
case "PAUSE_RECORDING": return f = !f;
|
|
2139
|
+
}
|
|
2140
|
+
return;
|
|
2141
|
+
}
|
|
2142
|
+
}), m;
|
|
2143
|
+
}, Q = (e, t) => {
|
|
2144
|
+
let n;
|
|
2145
|
+
try {
|
|
2146
|
+
n = JSON.parse(e);
|
|
2147
|
+
} catch (e) {
|
|
2148
|
+
console.error("[zustand devtools middleware] Could not parse the received json", e);
|
|
2149
|
+
}
|
|
2150
|
+
n !== void 0 && t(n);
|
|
2151
|
+
}, st = (e) => (t, n, r) => {
|
|
2152
|
+
let i = r.subscribe;
|
|
2153
|
+
return r.subscribe = ((e, t, n) => {
|
|
2154
|
+
let a = e;
|
|
2155
|
+
if (t) {
|
|
2156
|
+
let i = n?.equalityFn || Object.is, o = e(r.getState());
|
|
2157
|
+
a = (n) => {
|
|
2158
|
+
let r = e(n);
|
|
2159
|
+
if (!i(o, r)) {
|
|
2160
|
+
let e = o;
|
|
2161
|
+
t(o = r, e);
|
|
2162
|
+
}
|
|
2163
|
+
}, n?.fireImmediately && t(o, o);
|
|
2164
|
+
}
|
|
2165
|
+
return i(a);
|
|
2166
|
+
}), e(t, n, r);
|
|
2167
|
+
};
|
|
2168
|
+
function ct(e, t) {
|
|
2169
|
+
let n;
|
|
2170
|
+
try {
|
|
2171
|
+
n = e();
|
|
2172
|
+
} catch {
|
|
2173
|
+
return;
|
|
2174
|
+
}
|
|
2175
|
+
return {
|
|
2176
|
+
getItem: (e) => {
|
|
2177
|
+
let r = (e) => e === null ? null : JSON.parse(e, t?.reviver), i = n.getItem(e) ?? null;
|
|
2178
|
+
return i instanceof Promise ? i.then(r) : r(i);
|
|
2179
|
+
},
|
|
2180
|
+
setItem: (e, r) => n.setItem(e, JSON.stringify(r, t?.replacer)),
|
|
2181
|
+
removeItem: (e) => n.removeItem(e)
|
|
2182
|
+
};
|
|
2183
|
+
}
|
|
2184
|
+
var $ = (e) => (t) => {
|
|
2185
|
+
try {
|
|
2186
|
+
let n = e(t);
|
|
2187
|
+
return n instanceof Promise ? n : {
|
|
2188
|
+
then(e) {
|
|
2189
|
+
return $(e)(n);
|
|
2190
|
+
},
|
|
2191
|
+
catch(e) {
|
|
2192
|
+
return this;
|
|
2193
|
+
}
|
|
2194
|
+
};
|
|
2195
|
+
} catch (e) {
|
|
2196
|
+
return {
|
|
2197
|
+
then(e) {
|
|
2198
|
+
return this;
|
|
2199
|
+
},
|
|
2200
|
+
catch(t) {
|
|
2201
|
+
return $(t)(e);
|
|
2202
|
+
}
|
|
2203
|
+
};
|
|
2204
|
+
}
|
|
2205
|
+
}, lt = (e, t) => (n, r, i) => {
|
|
2206
|
+
let a = {
|
|
2207
|
+
storage: ct(() => window.localStorage),
|
|
2208
|
+
partialize: (e) => e,
|
|
2209
|
+
version: 0,
|
|
2210
|
+
merge: (e, t) => ({
|
|
2211
|
+
...t,
|
|
2212
|
+
...e
|
|
2213
|
+
}),
|
|
2214
|
+
...t
|
|
2215
|
+
}, o = !1, s = 0, c = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Set(), u = a.storage;
|
|
2216
|
+
if (!u) return e((...e) => {
|
|
2217
|
+
console.warn(`[zustand persist middleware] Unable to update item '${a.name}', the given storage is currently unavailable.`), n(...e);
|
|
2218
|
+
}, r, i);
|
|
2219
|
+
let d = () => {
|
|
2220
|
+
let e = a.partialize({ ...r() });
|
|
2221
|
+
return u.setItem(a.name, {
|
|
2222
|
+
state: e,
|
|
2223
|
+
version: a.version
|
|
2224
|
+
});
|
|
2225
|
+
}, f = i.setState;
|
|
2226
|
+
i.setState = (e, t) => (f(e, t), d());
|
|
2227
|
+
let p = e((...e) => (n(...e), d()), r, i);
|
|
2228
|
+
i.getInitialState = () => p;
|
|
2229
|
+
let m, h = () => {
|
|
2230
|
+
if (!u) return;
|
|
2231
|
+
let e = ++s;
|
|
2232
|
+
o = !1, c.forEach((e) => e(r() ?? p));
|
|
2233
|
+
let t = a.onRehydrateStorage?.call(a, r() ?? p) || void 0;
|
|
2234
|
+
return $(u.getItem.bind(u))(a.name).then((e) => {
|
|
2235
|
+
if (e) {
|
|
2236
|
+
if (typeof e.version == "number" && e.version !== a.version) {
|
|
2237
|
+
if (a.migrate) {
|
|
2238
|
+
let t = a.migrate(e.state, e.version);
|
|
2239
|
+
return t instanceof Promise ? t.then((e) => [!0, e]) : [!0, t];
|
|
2240
|
+
}
|
|
2241
|
+
console.error("State loaded from storage couldn't be migrated since no migrate function was provided");
|
|
2242
|
+
} else return [!1, e.state];
|
|
2243
|
+
}
|
|
2244
|
+
return [!1, void 0];
|
|
2245
|
+
}).then((t) => {
|
|
2246
|
+
if (e !== s) return;
|
|
2247
|
+
let [i, o] = t;
|
|
2248
|
+
if (m = a.merge(o, r() ?? p), n(m, !0), i) return d();
|
|
2249
|
+
}).then(() => {
|
|
2250
|
+
e === s && (t?.(r(), void 0), m = r(), o = !0, l.forEach((e) => e(m)));
|
|
2251
|
+
}).catch((n) => {
|
|
2252
|
+
e === s && t?.(void 0, n);
|
|
2253
|
+
});
|
|
2254
|
+
};
|
|
2255
|
+
return i.persist = {
|
|
2256
|
+
setOptions: (e) => {
|
|
2257
|
+
a = {
|
|
2258
|
+
...a,
|
|
2259
|
+
...e
|
|
2260
|
+
}, e.storage && (u = e.storage);
|
|
2261
|
+
},
|
|
2262
|
+
clearStorage: () => {
|
|
2263
|
+
++s, u?.removeItem(a.name);
|
|
2264
|
+
},
|
|
2265
|
+
getOptions: () => a,
|
|
2266
|
+
rehydrate: () => h(),
|
|
2267
|
+
hasHydrated: () => o,
|
|
2268
|
+
onHydrate: (e) => (c.add(e), () => {
|
|
2269
|
+
c.delete(e);
|
|
2270
|
+
}),
|
|
2271
|
+
onFinishHydration: (e) => (l.add(e), () => {
|
|
2272
|
+
l.delete(e);
|
|
2273
|
+
})
|
|
2274
|
+
}, a.skipHydration || h(), m || p;
|
|
2275
|
+
}, ut = (e) => Symbol.iterator in e, dt = (e) => "entries" in e, ft = (e, t) => {
|
|
2276
|
+
let n = e instanceof Map ? e : new Map(e.entries()), r = t instanceof Map ? t : new Map(t.entries());
|
|
2277
|
+
if (n.size !== r.size) return !1;
|
|
2278
|
+
for (let [e, t] of n) if (!r.has(e) || !Object.is(t, r.get(e))) return !1;
|
|
2279
|
+
return !0;
|
|
2280
|
+
}, pt = (e, t) => {
|
|
2281
|
+
let n = e[Symbol.iterator](), r = t[Symbol.iterator](), i = n.next(), a = r.next();
|
|
2282
|
+
for (; !i.done && !a.done;) {
|
|
2283
|
+
if (!Object.is(i.value, a.value)) return !1;
|
|
2284
|
+
i = n.next(), a = r.next();
|
|
2285
|
+
}
|
|
2286
|
+
return !!i.done && !!a.done;
|
|
2287
|
+
};
|
|
2288
|
+
function mt(e, t) {
|
|
2289
|
+
return Object.is(e, t) ? !0 : typeof e != "object" || !e || typeof t != "object" || !t || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 : ut(e) && ut(t) ? dt(e) && dt(t) ? ft(e, t) : pt(e, t) : ft({ entries: () => Object.entries(e) }, { entries: () => Object.entries(t) });
|
|
2290
|
+
}
|
|
2291
|
+
//#endregion
|
|
2292
|
+
//#region node_modules/zustand/esm/react/shallow.mjs
|
|
2293
|
+
function ht(e) {
|
|
2294
|
+
let n = t.useRef(void 0);
|
|
2295
|
+
return (t) => {
|
|
2296
|
+
let r = e(t);
|
|
2297
|
+
return mt(n.current, r) ? n.current : n.current = r;
|
|
2298
|
+
};
|
|
2299
|
+
}
|
|
2300
|
+
//#endregion
|
|
2301
|
+
//#region node_modules/lz-string/libs/lz-string.js
|
|
2302
|
+
var gt = /* @__PURE__ */ e(((e, t) => {
|
|
2303
|
+
var n = (function() {
|
|
2304
|
+
var e = String.fromCharCode, t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$", r = {};
|
|
2305
|
+
function i(e, t) {
|
|
2306
|
+
if (!r[e]) {
|
|
2307
|
+
r[e] = {};
|
|
2308
|
+
for (var n = 0; n < e.length; n++) r[e][e.charAt(n)] = n;
|
|
2309
|
+
}
|
|
2310
|
+
return r[e][t];
|
|
2311
|
+
}
|
|
2312
|
+
var a = {
|
|
2313
|
+
compressToBase64: function(e) {
|
|
2314
|
+
if (e == null) return "";
|
|
2315
|
+
var n = a._compress(e, 6, function(e) {
|
|
2316
|
+
return t.charAt(e);
|
|
2317
|
+
});
|
|
2318
|
+
switch (n.length % 4) {
|
|
2319
|
+
default:
|
|
2320
|
+
case 0: return n;
|
|
2321
|
+
case 1: return n + "===";
|
|
2322
|
+
case 2: return n + "==";
|
|
2323
|
+
case 3: return n + "=";
|
|
2324
|
+
}
|
|
2325
|
+
},
|
|
2326
|
+
decompressFromBase64: function(e) {
|
|
2327
|
+
return e == null ? "" : e == "" ? null : a._decompress(e.length, 32, function(n) {
|
|
2328
|
+
return i(t, e.charAt(n));
|
|
2329
|
+
});
|
|
2330
|
+
},
|
|
2331
|
+
compressToUTF16: function(t) {
|
|
2332
|
+
return t == null ? "" : a._compress(t, 15, function(t) {
|
|
2333
|
+
return e(t + 32);
|
|
2334
|
+
}) + " ";
|
|
2335
|
+
},
|
|
2336
|
+
decompressFromUTF16: function(e) {
|
|
2337
|
+
return e == null ? "" : e == "" ? null : a._decompress(e.length, 16384, function(t) {
|
|
2338
|
+
return e.charCodeAt(t) - 32;
|
|
2339
|
+
});
|
|
2340
|
+
},
|
|
2341
|
+
compressToUint8Array: function(e) {
|
|
2342
|
+
for (var t = a.compress(e), n = new Uint8Array(t.length * 2), r = 0, i = t.length; r < i; r++) {
|
|
2343
|
+
var o = t.charCodeAt(r);
|
|
2344
|
+
n[r * 2] = o >>> 8, n[r * 2 + 1] = o % 256;
|
|
2345
|
+
}
|
|
2346
|
+
return n;
|
|
2347
|
+
},
|
|
2348
|
+
decompressFromUint8Array: function(t) {
|
|
2349
|
+
if (t == null) return a.decompress(t);
|
|
2350
|
+
for (var n = Array(t.length / 2), r = 0, i = n.length; r < i; r++) n[r] = t[r * 2] * 256 + t[r * 2 + 1];
|
|
2351
|
+
var o = [];
|
|
2352
|
+
return n.forEach(function(t) {
|
|
2353
|
+
o.push(e(t));
|
|
2354
|
+
}), a.decompress(o.join(""));
|
|
2355
|
+
},
|
|
2356
|
+
compressToEncodedURIComponent: function(e) {
|
|
2357
|
+
return e == null ? "" : a._compress(e, 6, function(e) {
|
|
2358
|
+
return n.charAt(e);
|
|
2359
|
+
});
|
|
2360
|
+
},
|
|
2361
|
+
decompressFromEncodedURIComponent: function(e) {
|
|
2362
|
+
return e == null ? "" : e == "" ? null : (e = e.replace(/ /g, "+"), a._decompress(e.length, 32, function(t) {
|
|
2363
|
+
return i(n, e.charAt(t));
|
|
2364
|
+
}));
|
|
2365
|
+
},
|
|
2366
|
+
compress: function(t) {
|
|
2367
|
+
return a._compress(t, 16, function(t) {
|
|
2368
|
+
return e(t);
|
|
2369
|
+
});
|
|
2370
|
+
},
|
|
2371
|
+
_compress: function(e, t, n) {
|
|
2372
|
+
if (e == null) return "";
|
|
2373
|
+
for (var r, i, a = {}, o = {}, s = "", c = "", l = "", u = 2, d = 3, f = 2, p = [], m = 0, h = 0, g = 0; g < e.length; g += 1) if (s = e.charAt(g), Object.prototype.hasOwnProperty.call(a, s) || (a[s] = d++, o[s] = !0), c = l + s, Object.prototype.hasOwnProperty.call(a, c)) l = c;
|
|
2374
|
+
else {
|
|
2375
|
+
if (Object.prototype.hasOwnProperty.call(o, l)) {
|
|
2376
|
+
if (l.charCodeAt(0) < 256) {
|
|
2377
|
+
for (r = 0; r < f; r++) m <<= 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++;
|
|
2378
|
+
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
2379
|
+
} else {
|
|
2380
|
+
for (i = 1, r = 0; r < f; r++) m = m << 1 | i, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i = 0;
|
|
2381
|
+
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
2382
|
+
}
|
|
2383
|
+
u--, u == 0 && (u = 2 ** f, f++), delete o[l];
|
|
2384
|
+
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
2385
|
+
u--, u == 0 && (u = 2 ** f, f++), a[c] = d++, l = String(s);
|
|
2386
|
+
}
|
|
2387
|
+
if (l !== "") {
|
|
2388
|
+
if (Object.prototype.hasOwnProperty.call(o, l)) {
|
|
2389
|
+
if (l.charCodeAt(0) < 256) {
|
|
2390
|
+
for (r = 0; r < f; r++) m <<= 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++;
|
|
2391
|
+
for (i = l.charCodeAt(0), r = 0; r < 8; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
2392
|
+
} else {
|
|
2393
|
+
for (i = 1, r = 0; r < f; r++) m = m << 1 | i, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i = 0;
|
|
2394
|
+
for (i = l.charCodeAt(0), r = 0; r < 16; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
2395
|
+
}
|
|
2396
|
+
u--, u == 0 && (u = 2 ** f, f++), delete o[l];
|
|
2397
|
+
} else for (i = a[l], r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
2398
|
+
u--, u == 0 && (u = 2 ** f, f++);
|
|
2399
|
+
}
|
|
2400
|
+
for (i = 2, r = 0; r < f; r++) m = m << 1 | i & 1, h == t - 1 ? (h = 0, p.push(n(m)), m = 0) : h++, i >>= 1;
|
|
2401
|
+
for (;;) {
|
|
2402
|
+
if (m <<= 1, h == t - 1) {
|
|
2403
|
+
p.push(n(m));
|
|
2404
|
+
break;
|
|
2405
|
+
}
|
|
2406
|
+
h++;
|
|
2407
|
+
}
|
|
2408
|
+
return p.join("");
|
|
2409
|
+
},
|
|
2410
|
+
decompress: function(e) {
|
|
2411
|
+
return e == null ? "" : e == "" ? null : a._decompress(e.length, 32768, function(t) {
|
|
2412
|
+
return e.charCodeAt(t);
|
|
2413
|
+
});
|
|
2414
|
+
},
|
|
2415
|
+
_decompress: function(t, n, r) {
|
|
2416
|
+
var i = [], a = 4, o = 4, s = 3, c = "", l = [], u, d, f, p, m, h, g, _ = {
|
|
2417
|
+
val: r(0),
|
|
2418
|
+
position: n,
|
|
2419
|
+
index: 1
|
|
2420
|
+
};
|
|
2421
|
+
for (u = 0; u < 3; u += 1) i[u] = u;
|
|
2422
|
+
for (f = 0, m = 4, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= +(p > 0) * h, h <<= 1;
|
|
2423
|
+
switch (f) {
|
|
2424
|
+
case 0:
|
|
2425
|
+
for (f = 0, m = 256, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= +(p > 0) * h, h <<= 1;
|
|
2426
|
+
g = e(f);
|
|
2427
|
+
break;
|
|
2428
|
+
case 1:
|
|
2429
|
+
for (f = 0, m = 2 ** 16, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= +(p > 0) * h, h <<= 1;
|
|
2430
|
+
g = e(f);
|
|
2431
|
+
break;
|
|
2432
|
+
case 2: return "";
|
|
2433
|
+
}
|
|
2434
|
+
for (i[3] = g, d = g, l.push(g);;) {
|
|
2435
|
+
if (_.index > t) return "";
|
|
2436
|
+
for (f = 0, m = 2 ** s, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= +(p > 0) * h, h <<= 1;
|
|
2437
|
+
switch (g = f) {
|
|
2438
|
+
case 0:
|
|
2439
|
+
for (f = 0, m = 256, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= +(p > 0) * h, h <<= 1;
|
|
2440
|
+
i[o++] = e(f), g = o - 1, a--;
|
|
2441
|
+
break;
|
|
2442
|
+
case 1:
|
|
2443
|
+
for (f = 0, m = 2 ** 16, h = 1; h != m;) p = _.val & _.position, _.position >>= 1, _.position == 0 && (_.position = n, _.val = r(_.index++)), f |= +(p > 0) * h, h <<= 1;
|
|
2444
|
+
i[o++] = e(f), g = o - 1, a--;
|
|
2445
|
+
break;
|
|
2446
|
+
case 2: return l.join("");
|
|
2447
|
+
}
|
|
2448
|
+
if (a == 0 && (a = 2 ** s, s++), i[g]) c = i[g];
|
|
2449
|
+
else if (g === o) c = d + d.charAt(0);
|
|
2450
|
+
else return null;
|
|
2451
|
+
l.push(c), i[o++] = d + c.charAt(0), a--, d = c, a == 0 && (a = 2 ** s, s++);
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
};
|
|
2455
|
+
return a;
|
|
2456
|
+
})();
|
|
2457
|
+
typeof define == "function" && define.amd ? define(function() {
|
|
2458
|
+
return n;
|
|
2459
|
+
}) : t !== void 0 && t != null ? t.exports = n : typeof angular < "u" && angular != null && angular.module("LZString", []).factory("LZString", function() {
|
|
2460
|
+
return n;
|
|
2461
|
+
});
|
|
2462
|
+
}));
|
|
2463
|
+
//#endregion
|
|
2464
|
+
export { st as a, Ye as c, Ne as d, Ce as f, lt as i, Ie as l, a as m, ht as n, $e as o, o as p, ot as r, Ze as s, gt as t, Fe as u };
|
|
2465
|
+
|
|
2466
|
+
//# sourceMappingURL=vendor-BPwAo1-t.js.map
|