autoql-fe-utils 1.11.9 → 1.11.11

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/index.d.mts CHANGED
@@ -2232,6 +2232,22 @@ declare const getPieChartData: ({ data, numberColumnIndex, legendLabels }: {
2232
2232
  pieChartFn: any;
2233
2233
  legendScale: any;
2234
2234
  };
2235
+ /** Retry measuring element size until stable (browser-only, returns current rect in tests) */
2236
+ declare const waitForStableRect: (el: Element | null, opts?: {
2237
+ retries?: number;
2238
+ stableThreshold?: number;
2239
+ delayMs?: number;
2240
+ }) => Promise<{
2241
+ width: number;
2242
+ height: number;
2243
+ }>;
2244
+ /** Observe container resize/visibility changes and re-render; waits for stable size on first render (browser-only) */
2245
+ declare const observeAndRender: (container: Element | null, renderFn: (rect: {
2246
+ width: number;
2247
+ height: number;
2248
+ }) => void | Promise<void>, opts?: {
2249
+ debounceMs?: number;
2250
+ }) => () => void;
2235
2251
  declare const getDefaultBucketConfig: (data: any, bucketSize: any) => {
2236
2252
  bucketSize: any;
2237
2253
  minBucketSize: any;
@@ -2981,4 +2997,4 @@ declare function color(): {
2981
2997
  on(): any;
2982
2998
  };
2983
2999
 
2984
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
3000
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, observeAndRender, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression, waitForStableRect };
package/dist/index.d.ts CHANGED
@@ -2232,6 +2232,22 @@ declare const getPieChartData: ({ data, numberColumnIndex, legendLabels }: {
2232
2232
  pieChartFn: any;
2233
2233
  legendScale: any;
2234
2234
  };
2235
+ /** Retry measuring element size until stable (browser-only, returns current rect in tests) */
2236
+ declare const waitForStableRect: (el: Element | null, opts?: {
2237
+ retries?: number;
2238
+ stableThreshold?: number;
2239
+ delayMs?: number;
2240
+ }) => Promise<{
2241
+ width: number;
2242
+ height: number;
2243
+ }>;
2244
+ /** Observe container resize/visibility changes and re-render; waits for stable size on first render (browser-only) */
2245
+ declare const observeAndRender: (container: Element | null, renderFn: (rect: {
2246
+ width: number;
2247
+ height: number;
2248
+ }) => void | Promise<void>, opts?: {
2249
+ debounceMs?: number;
2250
+ }) => () => void;
2235
2251
  declare const getDefaultBucketConfig: (data: any, bucketSize: any) => {
2236
2252
  bucketSize: any;
2237
2253
  minBucketSize: any;
@@ -2981,4 +2997,4 @@ declare function color(): {
2981
2997
  on(): any;
2982
2998
  };
2983
2999
 
2984
- export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression };
3000
+ export { AGG_TYPES, AXIS_TITLE_BORDER_PADDING_LEFT, AXIS_TITLE_BORDER_PADDING_TOP, AXIS_TITLE_PADDING_BOTTOM, AXIS_TITLE_PADDING_TOP, type AdditionalSelect, AggType, type AggTypeParams, AggTypes, type ApiFilter, type ApiSorter, type Authentication, type AutoQLJWT, type AvailableSelect, type AxiosResponse, BUTTON_PADDING, CHARTS_WITHOUT_AGGREGATED_DATA, CHARTS_WITHOUT_AXES, CHARTS_WITHOUT_LEGENDS, CHART_PADDING, CHART_TYPES, COLUMN_TYPES, COMPARE_TYPE, CONTINUOUS_TYPE, CUSTOM_TYPE, type Column, Column$1 as ColumnObj, type ColumnSelect, ColumnType, ColumnTypes, CustomColumnRowRangeTypes, CustomColumnTypes, CustomColumnValues, DATA_ALERT_CONDITION_TYPES, DATA_ALERT_ENABLED_STATUSES, DATA_ALERT_FREQUENCY_TYPE_OPTIONS, DATA_ALERT_OPERATORS, DATA_ALERT_STATUSES, DATE_ONLY_CHART_TYPES, DAYJS_PRECISION_FORMATS, DEFAULT_AGG_TYPE, DEFAULT_CHART_CONFIG, DEFAULT_COLUMN_NAME, DEFAULT_CSS_PREFIX, DEFAULT_DATA_PAGE_SIZE, DEFAULT_EVALUATION_FREQUENCY, DEFAULT_LEGEND_PADDING_BOTTOM, DEFAULT_LEGEND_PADDING_LEFT, DEFAULT_LEGEND_PADDING_RIGHT, DEFAULT_LEGEND_PADDING_TOP, DEFAULT_MAX_LEGEND_WIDTH, DEFAULT_SOURCE, DISABLED_CLASS, DISPLAY_TYPES, DOUBLE_AXIS_CHART_TYPES, DOW_STYLES, type DataConfig, DataExplorerSubject, type DataExplorerSubjectFilter, type DataExplorerSubjectGroups, type DataExplorerSubjectInterface, type DataExplorerSuggestion, DataExplorerTypes, type DataFormatting, DateStringPrecisionTypes, DateUTC, type DisplayOverride, DisplayTypes, EVALUATION_FREQUENCY_OPTIONS, EXISTS_TYPE, FILTER_MATCHERS, FORMULA_CLASS, FUNCTION_OPERATORS, type FilterCondition, type FilterLock, type FilterOperator, FilterOperatorEnum, type FilterType, FilterTypeEnum, type FrontendReq, GENERAL_ERROR, GENERAL_HTML_ERROR, GENERAL_QUERY_ERROR, GLOBAL_OPERATORS, GROUP_TERM_TYPE, GeneralErrorTypes, HIGHLIGHTED_CLASS, HORIZONTAL_LEGEND_SPACING, LABEL_FONT_SIZE, LEGEND_BORDER_PADDING, LEGEND_BORDER_THICKNESS, LEGEND_SHAPE_SIZE, LEGEND_TOP_ADJUSTMENT, LOAD_MORE_DROPDOWN_PADDING_BOTTOM, MAX_CHART_ELEMENTS, MAX_DATA_PAGE_SIZE, MAX_LEGEND_LABELS, MAX_RECENT_SEARCHES, MAX_ROWS_FOR_PIE_CHART, MINIMUM_INNER_HEIGHT, MINIMUM_INNER_WIDTH, MINIMUM_TITLE_LENGTH, MIN_HISTOGRAM_SAMPLE, MONTH_DAY_SELECT_OPTIONS, MONTH_NAMES, type MatcherFn, NUMBER_TERM_TYPE, OPERATORS, ORDERBY_DIRECTIONS, Operators, PATH_SMOOTHING, PERIODIC_TYPE, PROJECT_TYPE, type ParsedInterpretation, type ParsedInterpretationChunk, PrecisionTypes, QUERY_TERM_TYPE, QUERY_TIMEOUT_ERROR, type QueryData, QueryErrorTypes, type QueryResponse, REQUEST_CANCELLED_ERROR, RESET_PERIOD_OPTIONS, ROWS_RANGE, ROWS_RANGE_OPTIONS, type RawColumn, type Rows, SCHEDULED_TYPE, SCHEDULE_FREQUENCY_OPTIONS, SCHEDULE_INTERVAL_OPTIONS, SEASON_NAMES, SampleQueryReplacementTypes, type Scale, type SubjectSuggestion, TABLE_TYPES, TITLE_FONT_SIZE, type TableConfig, type TabulatorFilter, type TabulatorSorter, type Theme, ThemeType, type Tile, type TransformedAxiosResponse, type TransformedQueryResponse, TranslationTypes, UNAUTHENTICATED_ERROR, VERTICAL_LEGEND_SPACING, type ValueLabel, type ValueLabelSuggestion, WEEKDAY_NAMES_MON, WEEKDAY_NAMES_SUN, WINDOW_FUNCTIONS, addSubjectToRecentSearches, addUserToProjectRule, adjustBottomTitleToFit, adjustMinAndMaxForScaleRatio, adjustTitleToFit, adjustTopTitleToFit, adjustVerticalTitleToFit, aggregateData, aggregateDataOld, aggregateOtherCategory, animateInputText, applyLegendTitleStyles, applyPrecisionToDate, applyStylesForHiddenSeries, areAllColumnsHidden, areSomeColumnsHidden, assignLabelToManagementDataAlert, authenticationDefault, autoQLConfigDefault, bezierCommand, buildPlainColumnArrayFn, calculateMinAndMaxSums, capitalizeFirstChar, cloneObject, configureTheme, constructFilter, constructRTArray, convertToFunctionStr, convertToNumber, countDecimals, createDataAlert, createFilterFunction, createManagementDataAlert, createMutatorFn, createNotificationChannel, createSVGPath, currentEventLoopEnd, dataConfigDefault, dataFormattingDefault, dataStructureChanged, dateSortFn, dateStringSortFn, deepEqual, deleteAllNotifications, deleteDataAlert, deleteMultipleNotifications, deleteNotification, difference, dismissAllNotifications, dismissNotification, distributeListsEvenly, doesElementOverflowContainer, exportCSV, extractOperatorFromValue, fetchAutocomplete, fetchDataAlerts, fetchDataExplorerAutocomplete, fetchDataExplorerSampleQueries, fetchDataExplorerSuggestions, fetchDataPreview, fetchExploreQueries, fetchFilters, fetchLLMSummary, fetchNotification, fetchNotificationChannels, fetchNotificationCount, fetchNotificationData, fetchNotificationFeed, fetchRule, fetchSubjectList, fetchSubjectListV2, fetchSubscribedDataAlerts, fetchSuggestions, fetchTopics, fetchTopicsForVL, fetchVLAutocomplete, filterDataByColumn, findNetworkColumns, formatAdditionalSelectColumn, formatChartLabel, formatDatePivotMonth, formatDatePivotYear, formatDateStringType, formatDateType, formatElement, formatEpochDate, formatFiltersForAPI, formatFiltersForTabulator, formatISODateWithPrecision, formatNextScheduleDate, formatNumberFilterValue, formatQueryColumns, formatResetDate, formatSortersForAPI, formatSortersForTabulator, formatStringDate, formatStringDateWithPrecision, formatTableParams, functionsEqual, generateDatePivotData, generateFilterDrilldownResponse, generatePivotData, generatePivotTableData, getAggConfig, getAllDataAlertsLabels, getAllDataAlertsLabelsByProject, getAuthentication, getAutoQLConfig, getAxis, getAxisLabelsBbox, getBBoxFromRef, getBandScale, getBarRectObj, getBinData, getBinLinearScale, getBubbleObj, getChartColorVars, getChartScaleRatio, getCleanColumnName, getColorScale, getColorScales, getColumnDateRanges, getColumnFieldCompat, getColumnIdentifierCompat, getColumnIndexCompat, getColumnIndexConfig, getColumnNameForDateRange, getColumnOriginalIndexCompat, getColumnPositionCompat, getColumnRectObj, getColumnTypeAmounts, getCombinedFilters, getCurrencySymbol, getCurrentTimezone, getDashboardRefreshInterval, getDataAlertsByLabel, getDataConfig, getDataFormatting, getDateColumnIndex, getDateColumns, getDateNoQuotes, getDateRangeIntersection, getDateRangesFromInterpretation, getDatesFromRT, getDayJSObj, getDayLocalStartDate, getDayOfTheMonthFromTimestamp, getDayOfTheMonthSuffix, getDayjsObjForStringType, getDefaultBucketConfig, getDefaultDisplayType, getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices, getDefaultJoinColumns, getDrilldownData, getDrilldownGroupby, getEpochFromDate, getFilterDrilldown, getFilterPrecision, getFirstChartDisplayType, getFnSummary, getFormattedTimestamp, getGroupBys, getGroupBysFromPivotTable, getGroupBysFromTable, getGroupableColumns, getHeatmapRectObj, getHiddenColumns, getHistogramColumnObj, getHistogramScale, getInitialBucketSize, getInitialSelections, getKey, getKeyByValue, getLabelsBBox, getLegendLabels, getLegendLabelsForGroupbyQuery, getLegendLabelsForMultiSeries, getLegendLabelsForSingleColumn, getLegendLocation, getLegendScale, getLegendTitleFromColumns, getLineVertexObj, getLinearAxisTitle, getLinearScale, getLinearScales, getLogger, getMaxLegendHeight, getMaxLegendSectionWidth, getMaxTickLabelWidth, getMaxValueFromKeyValueObj, getMinAndMaxValues, getMinValueFromKeyValueObj, getMonthLocalStartDate, getMultiSeriesColumnIndex, getNiceDateTickValues, getNiceTickValues, getNotLabeledDataAlerts, getNumberAxisUnits, getNumberColumnIndices, getNumberFormatConfig, getNumberOfGroupables, getNumberOfSeries, getNumericalColumns, getObjSize, getOpacityScale, getOperators, getPadding, getPieChartData, getPivotColumnIndexConfig, getPlainTextList, getPointObj, getPotentialDisplayTypes, getPrecisionForDayJS, getProtectedRanges, getQueryFn, getQueryParams, getQueryRequestParams, getQuerySelectableJoinColumns, getQueryValidationQueryText, getRadiusScale, getRangeForAxis, getRecentSearchesFromLocalStorage, getRecentSelectionID, getRowNumberListForPopover, getSVGBase64, getSampleQueryRegex, getSampleQueryText, getScheduleFrequencyObject, getSelectableColumns, getSortColumnIndex, getSortDirection, getStartAndEndDateFromDateStrs, getStringColumnIndices, getStringColumns, getStringFromSource, getSuggestionLists, getSupportedConditionTypes, getSupportedDisplayTypes, getThemeType, getThemeValue, getTickSizeFromNumTicks, getTickValues, getTimeFrameTextFromChunk, getTimeObjFromTimeStamp, getTimeRangeFromDateArray, getTimeRangeFromRT, getTimeScale, getTitleCase, getTodaysDayOfTheMonth, getTooltipContent, getTotalBottomPadding, getTotalHorizontalPadding, getTotalLeftPadding, getTotalPossibleLegendSections, getTotalRightPadding, getTotalTopPadding, getTotalVerticalPadding, getUniqueYearsForColumn, getUnitSymbol, getUnitsForColumn, getVisibleColumns, getWeekLocalStartDate, getWeekdayFromTimeStamp, getlegendLabelSections, handleTooltipBoundaryCollision, hasColumnIndex, hasData, hasDateColumn, hasMoreData, hasNumberColumn, hasStringColumn, initializeAlert, initializeQueryValidationOptions, isAggSeed, isAggregation, isChartType, isColumnDateType, isColumnIndexConfigValid, isColumnIndexValid, isColumnIndicesValid, isColumnNumberType, isColumnStringType, isColumnSummable, isDataLimited, isDisplayTypeValid, isDrilldown, isError500Type, isExpressionQueryValid, isISODate, isInitialSelectionValid, isListQuery, isNumber, isNumericEqual, isObject, isOperatorJs, isSelectableNumberColumn, isSelectableStringColumn, isSingleValueResponse, isTableType, isTabulatorColumnComponent, isValidFilterType, isValidOperator, isValueEmpty, color as legendColor, lineCommand, makeEmptyArray, markNotificationAsUnread, matchCell, matchesNumericFilterValue, matchesStringFilter, mergeBboxes, mergeBoundingClientRects, mergeSources, nameValueObject, normalizeCoalesceParentheses, normalizeColumnIdentifier, normalizeInitialTableConfigs, normalizeString, normalizeTileConfig, numberIndicesArraysOverlap, numberSortFn, observeAndRender, onTableCellClick, onlySeriesVisibilityChanged, onlyUnique, parseFilter, parseJwt, parseList, parseLocaleNumber, potentiallySupportsDatePivot, potentiallySupportsPivot, previewDataAlert, previewManagementDataAlert, removeDashboardRefreshInterval, removeElementAtIndex, removeFromDOM, removeHiddenLegendLabels, removeNotificationChannel, removeUserFromProjectRule, reportProblem, resetDateIsFuture, resetNotificationCount, rotateArray, roundDownToNearestMultiple, roundToNearestLog10, roundToNearestMultiple, roundUpToNearestMultiple, runCachedDashboardQuery, runDrilldown, runQuery, runQueryNewPage, runQueryOnly, runQueryValidation, scaleZero, sendDataToChannel, sendSuggestion, sendTrainingData, setCaretPosition, setColumnVisibility, setDashboardRefreshInterval, setFilters, setHeaderFilterPlaceholder, setLogger, setRecentSearchesInLocalStorage, setSorterFunction, setTickSize, setTickValues, shouldDisableChartScale, shouldLabelsRotate, shouldPlotMultiSeries, shouldShowAxisSelector, showEvaluationFrequencySetting, sortDataByAlphabet, sortDataByColumn, sortDataByDate, supportsDatePivotTable, supportsNetworkGraph, supportsPieChart, supportsRegularPivotTable, svgPathD, svgToPng, type tableFilterParams, titlelizeString, toggleCustomDataAlertStatus, toggleProjectDataAlertStatus, transformDivisionExpression, transformLabels, transformQueryResponse, transformQueryResponseColumns, transformQueryResponseImmutable, unsetFilterFromAPI, updateDataAlert, updateDataAlertStatus, updateManagementDataAlert, updateStartAndEndIndexes, usePivotDataForChart, uuidv4, validateExpression, waitForStableRect };
@@ -2053,36 +2053,54 @@
2053
2053
  elementBBoxesCache = /* @__PURE__ */ new WeakMap();
2054
2054
  }
2055
2055
  function getElementBBoxes(element) {
2056
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p;
2056
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v;
2057
2057
  if (!element) return { bbox: { x: 0, y: 0, width: 0, height: 0 }, clientRect: {} };
2058
+ const tagName = (_b = (_a = element == null ? void 0 : element.tagName) == null ? void 0 : _a.toLowerCase) == null ? void 0 : _b.call(_a);
2059
+ const shouldBypassCache = tagName === "text" || tagName === "tspan";
2058
2060
  try {
2059
- const cached = elementBBoxesCache.get(element);
2060
- const now = Date.now();
2061
- if (cached && now - cached.ts < CACHE_TTL) return { bbox: cached.bbox, clientRect: cached.clientRect };
2061
+ if (!shouldBypassCache) {
2062
+ const cached = elementBBoxesCache.get(element);
2063
+ const now = Date.now();
2064
+ if (cached && now - cached.ts < CACHE_TTL) return { bbox: cached.bbox, clientRect: cached.clientRect };
2065
+ }
2062
2066
  } catch (e) {
2063
2067
  }
2064
2068
  const bbox = getBBoxSafe(element) || { x: 0, y: 0, width: 0, height: 0 };
2065
2069
  let clientRect;
2070
+ let clientRectsLength = -1;
2066
2071
  try {
2067
2072
  if (element && typeof element.getBoundingClientRect === "function")
2068
2073
  clientRect = element.getBoundingClientRect();
2069
2074
  } catch (e) {
2070
2075
  }
2076
+ try {
2077
+ if (element && typeof element.getClientRects === "function")
2078
+ clientRectsLength = element.getClientRects().length;
2079
+ } catch (e) {
2080
+ }
2071
2081
  if (!clientRect) {
2072
2082
  clientRect = {
2073
- x: (_b = (_a = bbox.x) != null ? _a : bbox.left) != null ? _b : 0,
2074
- y: (_d = (_c = bbox.y) != null ? _c : bbox.top) != null ? _d : 0,
2075
- width: (_e = bbox.width) != null ? _e : 0,
2076
- height: (_f = bbox.height) != null ? _f : 0,
2077
- left: (_h = (_g = bbox.x) != null ? _g : bbox.left) != null ? _h : 0,
2078
- top: (_j = (_i = bbox.y) != null ? _i : bbox.top) != null ? _j : 0,
2079
- right: ((_l = (_k = bbox.x) != null ? _k : bbox.left) != null ? _l : 0) + ((_m = bbox.width) != null ? _m : 0),
2080
- bottom: ((_o = (_n = bbox.y) != null ? _n : bbox.top) != null ? _o : 0) + ((_p = bbox.height) != null ? _p : 0)
2083
+ x: (_d = (_c = bbox.x) != null ? _c : bbox.left) != null ? _d : 0,
2084
+ y: (_f = (_e = bbox.y) != null ? _e : bbox.top) != null ? _f : 0,
2085
+ width: (_g = bbox.width) != null ? _g : 0,
2086
+ height: (_h = bbox.height) != null ? _h : 0,
2087
+ left: (_j = (_i = bbox.x) != null ? _i : bbox.left) != null ? _j : 0,
2088
+ top: (_l = (_k = bbox.y) != null ? _k : bbox.top) != null ? _l : 0,
2089
+ right: ((_n = (_m = bbox.x) != null ? _m : bbox.left) != null ? _n : 0) + ((_o = bbox.width) != null ? _o : 0),
2090
+ bottom: ((_q = (_p = bbox.y) != null ? _p : bbox.top) != null ? _q : 0) + ((_r = bbox.height) != null ? _r : 0)
2081
2091
  };
2082
2092
  }
2083
- try {
2084
- elementBBoxesCache.set(element, { bbox, clientRect, ts: Date.now() });
2085
- } catch (e) {
2093
+ const isDisconnected = typeof element.isConnected === "boolean" ? !element.isConnected : false;
2094
+ const bboxW = (_s = bbox == null ? void 0 : bbox.width) != null ? _s : 0;
2095
+ const bboxH = (_t = bbox == null ? void 0 : bbox.height) != null ? _t : 0;
2096
+ const rectW = (_u = clientRect == null ? void 0 : clientRect.width) != null ? _u : 0;
2097
+ const rectH = (_v = clientRect == null ? void 0 : clientRect.height) != null ? _v : 0;
2098
+ const isHidden = clientRectsLength === 0 && rectW === 0 && rectH === 0 && bboxW === 0 && bboxH === 0;
2099
+ if (!shouldBypassCache && !isDisconnected && !isHidden) {
2100
+ try {
2101
+ elementBBoxesCache.set(element, { bbox, clientRect, ts: Date.now() });
2102
+ } catch (e) {
2103
+ }
2086
2104
  }
2087
2105
  return { bbox, clientRect };
2088
2106
  }
@@ -2099,6 +2117,20 @@
2099
2117
  } catch (e) {
2100
2118
  }
2101
2119
  });
2120
+ window.addEventListener("pageshow", () => {
2121
+ try {
2122
+ clearElementBBoxesCache();
2123
+ } catch (e) {
2124
+ }
2125
+ });
2126
+ }
2127
+ if (typeof document !== "undefined" && typeof document.addEventListener === "function") {
2128
+ document.addEventListener("visibilitychange", () => {
2129
+ try {
2130
+ clearElementBBoxesCache();
2131
+ } catch (e) {
2132
+ }
2133
+ });
2102
2134
  }
2103
2135
  }
2104
2136
  });
@@ -24633,6 +24665,9 @@
24633
24665
  maxValue = 0;
24634
24666
  }
24635
24667
  }
24668
+ if (maxValue >= 0 && minValue >= 0) {
24669
+ minValue = 0;
24670
+ }
24636
24671
  return {
24637
24672
  maxValue,
24638
24673
  minValue,
@@ -24688,13 +24723,11 @@
24688
24723
  let newMinValue = minValue;
24689
24724
  let newMaxValue = maxValue;
24690
24725
  const disableScale = isScaled && shouldDisableChartScale(minValue, maxValue);
24691
- if (!isScaled || disableScale) {
24692
- if (maxValue >= 0 && minValue >= 0) {
24693
- newMinValue = 0;
24694
- } else if (maxValue < 0 && minValue < 0) {
24695
- newMaxValue = 0;
24696
- }
24697
- } else if (!isScaled && getChartScaleRatio(minValue, maxValue) < MIN_SCALE_RATIO) {
24726
+ if (maxValue >= 0 && minValue >= 0) {
24727
+ newMinValue = 0;
24728
+ } else if (maxValue < 0 && minValue < 0) {
24729
+ newMaxValue = 0;
24730
+ } else if (isScaled && getChartScaleRatio(minValue, maxValue) < MIN_SCALE_RATIO) {
24698
24731
  const range2 = maxValue - minValue;
24699
24732
  newMinValue = minValue - range2 * 0.05;
24700
24733
  newMaxValue = maxValue + range2 * 0.05;
@@ -25178,41 +25211,48 @@
25178
25211
  originalColumns,
25179
25212
  isDataAggregated
25180
25213
  }) => {
25181
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
25214
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q;
25182
25215
  let domainFinal = domain;
25183
25216
  if (!domain) {
25184
25217
  let min2 = (_a = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a : 0;
25185
25218
  let max2 = (_b = maxValue != null ? maxValue : tickValues == null ? void 0 : tickValues[(tickValues == null ? void 0 : tickValues.length) - 1]) != null ? _b : 0;
25186
25219
  if (adjustRange) {
25187
25220
  const { newMinValue, newMaxValue } = adjustMinAndMaxForScaleRatio(min2, max2, isScaled);
25188
- if (newMinValue) min2 = newMinValue;
25189
- if (newMaxValue) max2 = newMaxValue;
25221
+ if (newMinValue !== void 0) min2 = newMinValue;
25222
+ if (newMaxValue !== void 0) max2 = newMaxValue;
25190
25223
  }
25191
25224
  domainFinal = [min2, max2];
25192
25225
  }
25193
25226
  const config = getDataFormatting(dataFormatting);
25194
25227
  const colIndices = columnIndices != null ? columnIndices : [columnIndex];
25195
25228
  const scaleRange = range2 != null ? range2 : getRangeForAxis({ axis: axis2, height, width });
25196
- const axisColumns = (_c = colIndices == null ? void 0 : colIndices.map((index) => columns == null ? void 0 : columns[index])) != null ? _c : [];
25229
+ let finalScaleRange = scaleRange;
25230
+ if (typeof window !== "undefined") {
25231
+ const delta = Math.abs(((_c = scaleRange == null ? void 0 : scaleRange[1]) != null ? _c : 0) - ((_d = scaleRange == null ? void 0 : scaleRange[0]) != null ? _d : 0));
25232
+ if (delta < 30) {
25233
+ finalScaleRange = axis2 === "x" ? [(_e = scaleRange == null ? void 0 : scaleRange[0]) != null ? _e : 0, ((_f = scaleRange == null ? void 0 : scaleRange[0]) != null ? _f : 0) + 30] : [((_g = scaleRange == null ? void 0 : scaleRange[1]) != null ? _g : 0) + 30, (_h = scaleRange == null ? void 0 : scaleRange[1]) != null ? _h : 0];
25234
+ }
25235
+ }
25236
+ const axisColumns = (_i = colIndices == null ? void 0 : colIndices.map((index) => columns == null ? void 0 : columns[index])) != null ? _i : [];
25197
25237
  const axisTitle = title != null ? title : getLinearAxisTitle({
25198
25238
  numberColumns: axisColumns,
25199
25239
  aggregated,
25200
25240
  isDataAggregated
25201
25241
  });
25202
- const disableScale = isScaled && shouldDisableChartScale((_d = domainFinal == null ? void 0 : domainFinal[0]) != null ? _d : 0, (_e = domainFinal == null ? void 0 : domainFinal[1]) != null ? _e : 0);
25203
- const scale = linear2().domain(domainFinal).range(scaleRange);
25242
+ const disableScale = isScaled && shouldDisableChartScale((_j = domainFinal == null ? void 0 : domainFinal[0]) != null ? _j : 0, (_k = domainFinal == null ? void 0 : domainFinal[1]) != null ? _k : 0);
25243
+ const scale = linear2().domain(domainFinal).range(finalScaleRange);
25204
25244
  scale.disableAutoScale = disableAutoScale != null ? disableAutoScale : disableScale;
25205
- scale.minValue = (_f = domainFinal == null ? void 0 : domainFinal[0]) != null ? _f : 0;
25206
- scale.maxValue = (_g = domainFinal == null ? void 0 : domainFinal[1]) != null ? _g : 0;
25245
+ scale.minValue = (_l = domainFinal == null ? void 0 : domainFinal[0]) != null ? _l : 0;
25246
+ scale.maxValue = (_m = domainFinal == null ? void 0 : domainFinal[1]) != null ? _m : 0;
25207
25247
  scale.columnIndex = columnIndex;
25208
25248
  scale.column = columns == null ? void 0 : columns[columnIndex];
25209
25249
  scale.fields = axisColumns;
25210
- scale.allFields = aggregated ? (_h = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _h.allNumberColumnIndices : (_i = getNumberColumnIndices(columns)) == null ? void 0 : _i.allNumberColumnIndices;
25250
+ scale.allFields = aggregated ? (_n = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _n.allNumberColumnIndices : (_o = getNumberColumnIndices(columns)) == null ? void 0 : _o.allNumberColumnIndices;
25211
25251
  scale.dataFormatting = config;
25212
25252
  scale.hasDropdown = shouldShowAxisSelector({
25213
25253
  scaleType: "LINEAR",
25214
25254
  enableAxisDropdown: hasDropdown != null ? hasDropdown : enableAxisDropdown,
25215
- numAllFields: (_k = (_j = scale.allFields) == null ? void 0 : _j.length) != null ? _k : 0
25255
+ numAllFields: (_q = (_p = scale.allFields) == null ? void 0 : _p.length) != null ? _q : 0
25216
25256
  });
25217
25257
  scale.stacked = !!stacked;
25218
25258
  scale.type = "LINEAR";
@@ -25874,6 +25914,66 @@
25874
25914
  const legendScale = getLegendScale(legendLabels);
25875
25915
  return { pieChartFn, legendScale };
25876
25916
  };
25917
+ var waitForStableRect = async (el, opts = {}) => {
25918
+ var _a, _b;
25919
+ const { retries = 10, stableThreshold = 3, delayMs = 80 } = opts;
25920
+ if (!el || typeof window === "undefined") {
25921
+ return { width: (_a = el == null ? void 0 : el.clientWidth) != null ? _a : 0, height: (_b = el == null ? void 0 : el.clientHeight) != null ? _b : 0 };
25922
+ }
25923
+ let lastW = el.clientWidth;
25924
+ let lastH = el.clientHeight;
25925
+ for (let i = 0; i < retries; i++) {
25926
+ await new Promise((resolve) => requestAnimationFrame(resolve));
25927
+ const w = el.clientWidth;
25928
+ const h = el.clientHeight;
25929
+ if (Math.abs(w - lastW) <= stableThreshold && Math.abs(h - lastH) <= stableThreshold) {
25930
+ return { width: w, height: h };
25931
+ }
25932
+ lastW = w;
25933
+ lastH = h;
25934
+ if (delayMs > 0) await new Promise((r) => setTimeout(r, delayMs));
25935
+ }
25936
+ return { width: el.clientWidth, height: el.clientHeight };
25937
+ };
25938
+ var observeAndRender = (container, renderFn, opts = {}) => {
25939
+ var _a, _b;
25940
+ const { debounceMs = 100 } = opts;
25941
+ if (!container || typeof window === "undefined" || typeof ResizeObserver === "undefined") {
25942
+ const rect = { width: (_a = container == null ? void 0 : container.clientWidth) != null ? _a : 0, height: (_b = container == null ? void 0 : container.clientHeight) != null ? _b : 0 };
25943
+ void Promise.resolve(renderFn(rect));
25944
+ return () => {
25945
+ };
25946
+ }
25947
+ let timer = null;
25948
+ let initialRenderDone = false;
25949
+ const runRender = async () => {
25950
+ if (!initialRenderDone) {
25951
+ initialRenderDone = true;
25952
+ const rect2 = await waitForStableRect(container, { retries: 15, stableThreshold: 3, delayMs: 50 });
25953
+ await Promise.resolve(renderFn(rect2));
25954
+ return;
25955
+ }
25956
+ const rect = { width: container.clientWidth, height: container.clientHeight };
25957
+ await Promise.resolve(renderFn(rect));
25958
+ };
25959
+ const schedule = () => {
25960
+ if (timer) clearTimeout(timer);
25961
+ timer = setTimeout(runRender, debounceMs);
25962
+ };
25963
+ const ro = new ResizeObserver(() => schedule());
25964
+ ro.observe(container);
25965
+ const onWindowResize = () => schedule();
25966
+ const onPageShow = (e) => (e == null ? void 0 : e.persisted) && schedule();
25967
+ window.addEventListener("resize", onWindowResize);
25968
+ window.addEventListener("pageshow", onPageShow);
25969
+ schedule();
25970
+ return () => {
25971
+ ro.disconnect();
25972
+ window.removeEventListener("resize", onWindowResize);
25973
+ window.removeEventListener("pageshow", onPageShow);
25974
+ if (timer) clearTimeout(timer);
25975
+ };
25976
+ };
25877
25977
  var getDefaultBucketConfig = (data, bucketSize) => {
25878
25978
  const DEFAULT_MIN_NUM_BUCKETS = 5;
25879
25979
  const DEFAULT_MAX_NUM_BUCKETS = 20;