autoql-fe-utils 1.11.17 → 1.11.18

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.
@@ -14380,9 +14380,9 @@
14380
14380
  unit: unit2,
14381
14381
  supportedOperators
14382
14382
  }) {
14383
- var _a, _b;
14384
- this.type = (_a = type != null ? type : description) != null ? _a : "";
14385
- this.description = (_b = description != null ? description : type) != null ? _b : "";
14383
+ var _a2, _b2;
14384
+ this.type = (_a2 = type != null ? type : description) != null ? _a2 : "";
14385
+ this.description = (_b2 = description != null ? description : type) != null ? _b2 : "";
14386
14386
  this.continuous = !!continuous2;
14387
14387
  this.ordinal = !!ordinal2;
14388
14388
  this.aggOptions = aggOptions != null ? aggOptions : aggregable ? Object.values(AggTypes) : [];
@@ -14614,8 +14614,8 @@
14614
14614
  tooltip: "<strong>Count:</strong> The total number of non-blank values will be shown for all data points with the same label.",
14615
14615
  symbol: "#",
14616
14616
  fn: (arr) => {
14617
- var _a, _b;
14618
- return (_b = (_a = arr == null ? void 0 : arr.filter((value) => !!value)) == null ? void 0 : _a.length) != null ? _b : 0;
14617
+ var _a2, _b2;
14618
+ return (_b2 = (_a2 = arr == null ? void 0 : arr.filter((value) => !!value)) == null ? void 0 : _a2.length) != null ? _b2 : 0;
14619
14619
  },
14620
14620
  sqlFn: (columnName) => `count(${columnName})`
14621
14621
  }),
@@ -14627,8 +14627,8 @@
14627
14627
  tooltip: "<strong>Count Distinct:</strong> The total number of <em>unique</em> non-blank values will be shown for all data points with the same label.",
14628
14628
  symbol: "#!",
14629
14629
  fn: (arr) => {
14630
- var _a, _b, _c;
14631
- return (_c = (_b = (_a = arr == null ? void 0 : arr.filter((value) => !!value || value == 0)) == null ? void 0 : _a.filter(onlyUnique)) == null ? void 0 : _b.length) != null ? _c : 0;
14630
+ var _a2, _b2, _c;
14631
+ return (_c = (_b2 = (_a2 = arr == null ? void 0 : arr.filter((value) => !!value || value == 0)) == null ? void 0 : _a2.filter(onlyUnique)) == null ? void 0 : _b2.length) != null ? _c : 0;
14632
14632
  },
14633
14633
  sqlFn: (columnName) => `count(distinct ${columnName})`
14634
14634
  }),
@@ -15436,8 +15436,8 @@
15436
15436
  return [];
15437
15437
  };
15438
15438
  var getColumnDateRanges = (response) => {
15439
- var _a, _b;
15440
- const parsedInterpretation = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.parsed_interpretation;
15439
+ var _a2, _b2;
15440
+ const parsedInterpretation = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.parsed_interpretation;
15441
15441
  if (!parsedInterpretation) {
15442
15442
  return [];
15443
15443
  }
@@ -15528,10 +15528,10 @@
15528
15528
  var isChartType = (type) => CHART_TYPES.includes(type);
15529
15529
  var isTableType = (type) => TABLE_TYPES.includes(type);
15530
15530
  var isDisplayTypeValid = (response, displayType, dataLength, pivotDataLength, columns, isDataLimited2) => {
15531
- var _a, _b;
15531
+ var _a2, _b2;
15532
15532
  const supportedDisplayTypes = getSupportedDisplayTypes({
15533
15533
  response,
15534
- columns: columns != null ? columns : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns,
15534
+ columns: columns != null ? columns : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns,
15535
15535
  dataLength,
15536
15536
  pivotDataLength,
15537
15537
  isDataLimited: isDataLimited2
@@ -15556,10 +15556,10 @@
15556
15556
  return true;
15557
15557
  };
15558
15558
  var getPotentialDisplayTypes = (response) => {
15559
- var _a, _b, _c;
15559
+ var _a2, _b2, _c;
15560
15560
  return getSupportedDisplayTypes({
15561
15561
  response,
15562
- columns: (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) == null ? void 0 : _c.map((col) => ({
15562
+ columns: (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) == null ? void 0 : _c.map((col) => ({
15563
15563
  ...col
15564
15564
  }))
15565
15565
  });
@@ -15569,8 +15569,8 @@
15569
15569
  return potentialDisplayTypes == null ? void 0 : potentialDisplayTypes.includes("pivot_table");
15570
15570
  };
15571
15571
  var potentiallySupportsDatePivot = (response) => {
15572
- var _a, _b, _c;
15573
- return potentiallySupportsPivot(response) && ((_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) == null ? void 0 : _c.length) === 2;
15572
+ var _a2, _b2, _c;
15573
+ return potentiallySupportsPivot(response) && ((_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) == null ? void 0 : _c.length) === 2;
15574
15574
  };
15575
15575
  var usePivotDataForChart = (response) => {
15576
15576
  return potentiallySupportsPivot(response) && !potentiallySupportsDatePivot(response);
@@ -15596,17 +15596,17 @@
15596
15596
  return true;
15597
15597
  };
15598
15598
  var supportsDatePivotTable = (columns) => {
15599
- var _a;
15599
+ var _a2;
15600
15600
  const dateColumnIndex = getDateColumnIndex(columns);
15601
15601
  const dateColumn = columns[dateColumnIndex];
15602
- return dateColumn && ((_a = dateColumn == null ? void 0 : dateColumn.display_name) == null ? void 0 : _a.toLowerCase().includes("month")) && (columns == null ? void 0 : columns.length) === 2;
15602
+ return dateColumn && ((_a2 = dateColumn == null ? void 0 : dateColumn.display_name) == null ? void 0 : _a2.toLowerCase().includes("month")) && (columns == null ? void 0 : columns.length) === 2;
15603
15603
  };
15604
15604
  var isSingleValueResponse = (response) => {
15605
- var _a, _b, _c, _d, _e, _f;
15605
+ var _a2, _b2, _c, _d, _e, _f;
15606
15606
  if (!response) {
15607
15607
  return false;
15608
15608
  }
15609
- const rows = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows;
15609
+ const rows = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows;
15610
15610
  const columns = (_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data) == null ? void 0 : _d.columns;
15611
15611
  const referenceID = (_e = response == null ? void 0 : response.data) == null ? void 0 : _e.reference_id;
15612
15612
  const hasNoData = rows && !(rows == null ? void 0 : rows.length);
@@ -15673,10 +15673,10 @@
15673
15673
  let targetColumnIndex = -1;
15674
15674
  let weightColumnIndex = -1;
15675
15675
  columns.forEach((col, loopIndex) => {
15676
- var _a;
15676
+ var _a2;
15677
15677
  if (col.is_visible !== false && col.type !== "DATE" && col.type !== "DATE_STRING") {
15678
15678
  const colIndex = typeof col.index === "number" ? col.index : loopIndex;
15679
- const name = ((_a = col.display_name) == null ? void 0 : _a.toLowerCase()) || "";
15679
+ const name = ((_a2 = col.display_name) == null ? void 0 : _a2.toLowerCase()) || "";
15680
15680
  const matchesSource = sourceKeywords.some((keyword) => name.includes(keyword) && col.type === "STRING" /* STRING */);
15681
15681
  const matchesTarget = targetKeywords.some((keyword) => name.includes(keyword) && col.type === "STRING" /* STRING */);
15682
15682
  if (sourceColumnIndex === -1 && matchesSource) {
@@ -15745,9 +15745,9 @@
15745
15745
  isDataLimited: isDataLimited2,
15746
15746
  allowNumericStringColumns = true
15747
15747
  } = {}) => {
15748
- var _a, _b, _c, _d, _e, _f, _g;
15748
+ var _a2, _b2, _c, _d, _e, _f, _g;
15749
15749
  try {
15750
- if (!((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.display_type)) {
15750
+ if (!((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.display_type)) {
15751
15751
  return [];
15752
15752
  }
15753
15753
  const displayType = response.data.data.display_type;
@@ -15839,10 +15839,10 @@
15839
15839
  return fallback;
15840
15840
  };
15841
15841
  var getDefaultDisplayType = (response, defaultToChart, columns, dataLength, pivotDataLength, preferredDisplayType, isDataLimited2 = false, preferRegularTable = false) => {
15842
- var _a, _b, _c, _d, _e, _f, _g, _h;
15842
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
15843
15843
  const supportedDisplayTypes = getSupportedDisplayTypes({
15844
15844
  response,
15845
- columns: columns != null ? columns : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns,
15845
+ columns: columns != null ? columns : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns,
15846
15846
  dataLength,
15847
15847
  pivotDataLength,
15848
15848
  isDataLimited: isDataLimited2
@@ -15877,15 +15877,15 @@
15877
15877
  return "text";
15878
15878
  };
15879
15879
  var hasData = (response) => {
15880
- var _a, _b, _c;
15880
+ var _a2, _b2, _c;
15881
15881
  if (!response) {
15882
15882
  return false;
15883
15883
  }
15884
- return (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length;
15884
+ return (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length;
15885
15885
  };
15886
15886
  var hasMoreData = (response, currentNumRows) => {
15887
- var _a, _b, _c, _d, _e;
15888
- const numRows = currentNumRows != null ? currentNumRows : (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length;
15887
+ var _a2, _b2, _c, _d, _e;
15888
+ const numRows = currentNumRows != null ? currentNumRows : (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length;
15889
15889
  const totalRows = (_e = (_d = response == null ? void 0 : response.data) == null ? void 0 : _d.data) == null ? void 0 : _e.count_rows;
15890
15890
  if (!numRows || !totalRows) {
15891
15891
  return false;
@@ -15893,8 +15893,8 @@
15893
15893
  return numRows < totalRows;
15894
15894
  };
15895
15895
  var isDataLimited = (queryResponse, rows) => {
15896
- var _a, _b, _c, _d, _e, _f;
15897
- const numRows = (_d = rows == null ? void 0 : rows.length) != null ? _d : (_c = (_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length;
15896
+ var _a2, _b2, _c, _d, _e, _f;
15897
+ const numRows = (_d = rows == null ? void 0 : rows.length) != null ? _d : (_c = (_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length;
15898
15898
  const totalRows = (_f = (_e = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _e.data) == null ? void 0 : _f.count_rows;
15899
15899
  if (!numRows || !totalRows) {
15900
15900
  return false;
@@ -15902,9 +15902,9 @@
15902
15902
  return numRows < totalRows;
15903
15903
  };
15904
15904
  var isDrilldown = (queryResponse) => {
15905
- var _a, _b;
15905
+ var _a2, _b2;
15906
15906
  try {
15907
- const queryText = ((_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.text) || "";
15907
+ const queryText = ((_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.text) || "";
15908
15908
  const isDrilldown2 = queryText.split(":")[0] === "Drilldown";
15909
15909
  return isDrilldown2;
15910
15910
  } catch (error) {
@@ -15994,7 +15994,9 @@
15994
15994
  };
15995
15995
 
15996
15996
  // src/safeRegex.ts
15997
- var MAX_PATTERN_LENGTH = Number(process.env.REGEXP_GUARD_MAX_LEN) || 2e3;
15997
+ var _a, _b;
15998
+ var envPatternMaxLength = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" && ((_b = (_a = globalThis.process) == null ? void 0 : _a.env) == null ? void 0 : _b.REGEXP_GUARD_MAX_LEN);
15999
+ var MAX_PATTERN_LENGTH = Number(envPatternMaxLength) || 2e3;
15998
16000
  function isSimpleLiteral(pattern) {
15999
16001
  return typeof pattern === "string" && /^[A-Za-z0-9 _\-\.,:\/]+$/.test(pattern);
16000
16002
  }
@@ -16051,16 +16053,16 @@
16051
16053
  BOOLEAN: "boolean"
16052
16054
  };
16053
16055
  var likeMatcher = (cell, cond) => {
16054
- var _a;
16056
+ var _a2;
16055
16057
  if (cell == null) return false;
16056
- const needle = String((_a = cond.value) != null ? _a : "").toLowerCase();
16058
+ const needle = String((_a2 = cond.value) != null ? _a2 : "").toLowerCase();
16057
16059
  if (needle.length === 0) return false;
16058
16060
  return String(cell).toLowerCase().includes(needle);
16059
16061
  };
16060
16062
  var notLikeMatcher = (cell, cond) => {
16061
- var _a;
16063
+ var _a2;
16062
16064
  if (cell == null) return false;
16063
- const needle = String((_a = cond.value) != null ? _a : "").toLowerCase();
16065
+ const needle = String((_a2 = cond.value) != null ? _a2 : "").toLowerCase();
16064
16066
  if (needle.length === 0) return true;
16065
16067
  return !String(cell).toLowerCase().includes(needle);
16066
16068
  };
@@ -16133,15 +16135,15 @@
16133
16135
  return FILTER_TYPES.includes(t);
16134
16136
  }
16135
16137
  function parseLocaleNumber(value, locale3) {
16136
- var _a, _b;
16138
+ var _a2, _b2;
16137
16139
  if (typeof value === "number") return value;
16138
16140
  let str = String(value != null ? value : "").trim();
16139
16141
  if (str.length === 0) return Number.NaN;
16140
16142
  str = str.replace(/\s|\u00A0/g, "");
16141
16143
  try {
16142
16144
  const parts = Intl.NumberFormat(locale3).formatToParts(12345.6);
16143
- const group = (_a = parts.find((p) => p.type === "group")) == null ? void 0 : _a.value;
16144
- const decimal = (_b = parts.find((p) => p.type === "decimal")) == null ? void 0 : _b.value;
16145
+ const group = (_a2 = parts.find((p) => p.type === "group")) == null ? void 0 : _a2.value;
16146
+ const decimal = (_b2 = parts.find((p) => p.type === "decimal")) == null ? void 0 : _b2.value;
16145
16147
  if (group) {
16146
16148
  const grpRe = compileSafeRegex(escapeRegExp(group), "g");
16147
16149
  if (grpRe) {
@@ -16172,7 +16174,7 @@
16172
16174
  return _logger;
16173
16175
  }
16174
16176
  function parseFilter(raw, type, defaultOperator = "like" /* LIKE */) {
16175
- var _a, _b, _c;
16177
+ var _a2, _b2, _c;
16176
16178
  if (typeof raw !== "string") return { operator: defaultOperator, value: raw, type };
16177
16179
  const trimmed = raw.trim();
16178
16180
  if (trimmed.length === 0) return { operator: defaultOperator, value: "", type };
@@ -16181,8 +16183,8 @@
16181
16183
  const opRe = compileSafeRegex(opPattern, "i");
16182
16184
  const opMatch = opRe ? opRe.exec(trimmed) : null;
16183
16185
  if (opMatch) {
16184
- let op = String((_a = opMatch[1]) != null ? _a : "").toLowerCase();
16185
- const rest = (_b = opMatch[2]) != null ? _b : "";
16186
+ let op = String((_a2 = opMatch[1]) != null ? _a2 : "").toLowerCase();
16187
+ const rest = (_b2 = opMatch[2]) != null ? _b2 : "";
16186
16188
  if (op === "!") op = "not_like" /* NOT_LIKE */;
16187
16189
  if (type === FilterTypeEnum.STRING && op === "!=") op = "not_like" /* NOT_LIKE */;
16188
16190
  if (op === "between" /* BETWEEN */) {
@@ -16233,12 +16235,12 @@
16233
16235
  // src/HelperFns/tableHelpers.ts
16234
16236
  var normalizeOperator = (op) => op === "!" ? "not_like" : op;
16235
16237
  function getColumnIdentifierCompat(col) {
16236
- var _a;
16238
+ var _a2;
16237
16239
  if (!col) return void 0;
16238
16240
  if (isTabulatorColumnComponent(col)) {
16239
16241
  if (typeof col.id === "string" && col.id) return col.id;
16240
16242
  if (typeof col.getField === "function") return col.getField();
16241
- const def = (_a = col.getDefinition) == null ? void 0 : _a.call(col);
16243
+ const def = (_a2 = col.getDefinition) == null ? void 0 : _a2.call(col);
16242
16244
  if (def && typeof def.field === "string") return def.field;
16243
16245
  return void 0;
16244
16246
  }
@@ -16246,12 +16248,12 @@
16246
16248
  return getColumnFieldCompat(col);
16247
16249
  }
16248
16250
  function getColumnOriginalIndexCompat(col, originalColumns) {
16249
- var _a;
16251
+ var _a2;
16250
16252
  if (!col || !Array.isArray(originalColumns)) return void 0;
16251
16253
  const identifier = getColumnIdentifierCompat(col);
16252
16254
  const idx = originalColumns.findIndex((orig) => getColumnIdentifierCompat(orig) === identifier);
16253
16255
  if (idx !== -1) return idx;
16254
- const def = (_a = col.getDefinition) == null ? void 0 : _a.call(col);
16256
+ const def = (_a2 = col.getDefinition) == null ? void 0 : _a2.call(col);
16255
16257
  if (def && typeof def.index === "number") return def.index;
16256
16258
  return void 0;
16257
16259
  }
@@ -16282,10 +16284,10 @@
16282
16284
  return void 0;
16283
16285
  }
16284
16286
  function getColumnFieldCompat(col) {
16285
- var _a;
16287
+ var _a2;
16286
16288
  if (!col) return void 0;
16287
16289
  if (typeof col.getField === "function") return col.getField();
16288
- if (typeof col.getDefinition === "function") return (_a = col.getDefinition()) == null ? void 0 : _a.field;
16290
+ if (typeof col.getDefinition === "function") return (_a2 = col.getDefinition()) == null ? void 0 : _a2.field;
16289
16291
  return col.field;
16290
16292
  }
16291
16293
  var formatTableParams = (params, columns) => {
@@ -16299,9 +16301,9 @@
16299
16301
  return configState;
16300
16302
  };
16301
16303
  var formatSortersForAPI = (params, columns) => {
16302
- var _a;
16304
+ var _a2;
16303
16305
  const sorters = [];
16304
- if (((_a = params == null ? void 0 : params.sort) == null ? void 0 : _a.length) > 0) {
16306
+ if (((_a2 = params == null ? void 0 : params.sort) == null ? void 0 : _a2.length) > 0) {
16305
16307
  params.sort.forEach((sorter) => {
16306
16308
  try {
16307
16309
  const column = columns.find((col) => col.field == sorter.field);
@@ -16332,21 +16334,21 @@
16332
16334
  return null;
16333
16335
  };
16334
16336
  var formatNumberFilterValue = (headerValue = "") => {
16335
- var _a, _b;
16337
+ var _a2, _b2;
16336
16338
  const trimmed = String(headerValue != null ? headerValue : "").trim();
16337
16339
  const extracted = extractOperatorFromValue(trimmed, "=");
16338
- const operator = (_a = extracted == null ? void 0 : extracted.operator) != null ? _a : "=";
16339
- const rest = (_b = extracted == null ? void 0 : extracted.cleanValue) != null ? _b : trimmed;
16340
+ const operator = (_a2 = extracted == null ? void 0 : extracted.operator) != null ? _a2 : "=";
16341
+ const rest = (_b2 = extracted == null ? void 0 : extracted.cleanValue) != null ? _b2 : trimmed;
16340
16342
  const re2 = /^([+-]?\d+(?:\.\d+)?)$/;
16341
16343
  const m = re2.exec(rest.replaceAll(",", ""));
16342
16344
  return m ? { value: m[1], operator } : { value: "", operator };
16343
16345
  };
16344
16346
  var formatFiltersForAPI = (params, columns) => {
16345
- var _a;
16347
+ var _a2;
16346
16348
  const filters = [];
16347
- if (((_a = params == null ? void 0 : params.filter) == null ? void 0 : _a.length) > 0) {
16349
+ if (((_a2 = params == null ? void 0 : params.filter) == null ? void 0 : _a2.length) > 0) {
16348
16350
  params.filter.forEach((filter3) => {
16349
- var _a2, _b, _c, _d;
16351
+ var _a3, _b2, _c, _d;
16350
16352
  try {
16351
16353
  const column = columns.find((col) => col.field == filter3.field);
16352
16354
  if (column) {
@@ -16361,7 +16363,7 @@
16361
16363
  const betweenMatch = svTrim.match(/^between\s*\(?\s*([^)]*?)\s*\)?$/i);
16362
16364
  if (betweenMatch) {
16363
16365
  operator = "between" /* BETWEEN */;
16364
- value = ((_a2 = betweenMatch[1]) != null ? _a2 : "").trim();
16366
+ value = ((_a3 = betweenMatch[1]) != null ? _a3 : "").trim();
16365
16367
  operatorExtracted = true;
16366
16368
  } else {
16367
16369
  const extracted = extractOperatorFromValue(stringValue);
@@ -16387,7 +16389,7 @@
16387
16389
  return;
16388
16390
  }
16389
16391
  const filterObj = {
16390
- name: (_b = column.name) != null ? _b : "",
16392
+ name: (_b2 = column.name) != null ? _b2 : "",
16391
16393
  columnName: (_c = column.title) != null ? _c : "",
16392
16394
  value,
16393
16395
  operator,
@@ -16479,9 +16481,9 @@
16479
16481
  });
16480
16482
  };
16481
16483
  var onTableCellClick = ({ cell, columns, tableConfig, pivotData }) => {
16482
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
16484
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j;
16483
16485
  try {
16484
- if ((_b = (_a = cell == null ? void 0 : cell.getColumn()) == null ? void 0 : _a.getDefinition()) == null ? void 0 : _b.pivot) {
16486
+ if ((_b2 = (_a2 = cell == null ? void 0 : cell.getColumn()) == null ? void 0 : _a2.getDefinition()) == null ? void 0 : _b2.pivot) {
16485
16487
  return;
16486
16488
  }
16487
16489
  if (!columns) {
@@ -16545,21 +16547,21 @@
16545
16547
  }
16546
16548
  };
16547
16549
  var hasNumberColumn = (columns) => {
16548
- var _a;
16550
+ var _a2;
16549
16551
  const visibleColumns = getVisibleColumns(columns);
16550
- const hasNumberColumn2 = !!((_a = visibleColumns.filter((col) => isColumnNumberType(col))) == null ? void 0 : _a.length);
16552
+ const hasNumberColumn2 = !!((_a2 = visibleColumns.filter((col) => isColumnNumberType(col))) == null ? void 0 : _a2.length);
16551
16553
  return hasNumberColumn2;
16552
16554
  };
16553
16555
  var hasStringColumn = (columns) => {
16554
- var _a;
16556
+ var _a2;
16555
16557
  const visibleColumns = getVisibleColumns(columns);
16556
- const hasStringColumn2 = !!((_a = visibleColumns.filter((col) => isColumnStringType(col))) == null ? void 0 : _a.length);
16558
+ const hasStringColumn2 = !!((_a2 = visibleColumns.filter((col) => isColumnStringType(col))) == null ? void 0 : _a2.length);
16557
16559
  return hasStringColumn2;
16558
16560
  };
16559
16561
  var hasDateColumn = (columns) => {
16560
- var _a;
16562
+ var _a2;
16561
16563
  const visibleColumns = getVisibleColumns(columns);
16562
- const hasDateColumn2 = !!((_a = visibleColumns.filter((col) => isColumnDateType(col))) == null ? void 0 : _a.length);
16564
+ const hasDateColumn2 = !!((_a2 = visibleColumns.filter((col) => isColumnDateType(col))) == null ? void 0 : _a2.length);
16563
16565
  return hasDateColumn2;
16564
16566
  };
16565
16567
  var getVisibleColumns = (columns) => {
@@ -16632,9 +16634,9 @@
16632
16634
  return groupByArray;
16633
16635
  };
16634
16636
  var getGroupBysFromPivotTable = ({ cell, rowHeaderDefinition, columnHeaderDefinition }) => {
16635
- var _a, _b, _c, _d, _e, _f, _g;
16637
+ var _a2, _b2, _c, _d, _e, _f, _g;
16636
16638
  try {
16637
- const rowHeaderValue = (_d = (_c = (_b = (_a = cell == null ? void 0 : cell.getRow) == null ? void 0 : _a.call(cell)) == null ? void 0 : _b.getData) == null ? void 0 : _c.call(_b)) == null ? void 0 : _d[0];
16639
+ const rowHeaderValue = (_d = (_c = (_b2 = (_a2 = cell == null ? void 0 : cell.getRow) == null ? void 0 : _a2.call(cell)) == null ? void 0 : _b2.getData) == null ? void 0 : _c.call(_b2)) == null ? void 0 : _d[0];
16638
16640
  const clickedColDef = (_g = (_f = (_e = cell == null ? void 0 : cell.getColumn) == null ? void 0 : _e.call(cell)) == null ? void 0 : _f.getDefinition) == null ? void 0 : _g.call(_f);
16639
16641
  if (rowHeaderValue === void 0 || !clickedColDef) {
16640
16642
  return void 0;
@@ -16732,7 +16734,7 @@
16732
16734
  }) => {
16733
16735
  if ((column == null ? void 0 : column.type) === "DATE" /* DATE */) {
16734
16736
  return (headerValue, rowValue) => {
16735
- var _a;
16737
+ var _a2;
16736
16738
  try {
16737
16739
  if (rowValue === void 0 || rowValue === null) {
16738
16740
  getLogger().warn("date filter: row value missing", { column });
@@ -16755,7 +16757,7 @@
16755
16757
  }
16756
16758
  const precision = getPrecisionForDayJS(getFilterPrecision(column));
16757
16759
  const startDateRaw = parts[0];
16758
- const endDateRaw = (_a = parts[1]) != null ? _a : parts[0];
16760
+ const endDateRaw = (_a2 = parts[1]) != null ? _a2 : parts[0];
16759
16761
  const startDate = dayjsWithPlugins_default.utc(startDateRaw);
16760
16762
  const endDate = dayjsWithPlugins_default.utc(endDateRaw);
16761
16763
  if (!startDate.isValid() || !endDate.isValid()) {
@@ -16837,8 +16839,8 @@
16837
16839
  return aggConfig;
16838
16840
  };
16839
16841
  var getDrilldownGroupby = (queryResponse, newCol) => {
16840
- var _a, _b, _c, _d;
16841
- return (_d = (_c = (_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.fe_req) == null ? void 0 : _c.columns) == null ? void 0 : _d.find((column) => newCol.name === column.name);
16842
+ var _a2, _b2, _c, _d;
16843
+ return (_d = (_c = (_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.fe_req) == null ? void 0 : _c.columns) == null ? void 0 : _d.find((column) => newCol.name === column.name);
16842
16844
  };
16843
16845
  var formatQueryColumns = ({
16844
16846
  columns,
@@ -16853,9 +16855,9 @@
16853
16855
  }
16854
16856
  const isListQuery2 = getNumberOfGroupables(columns) === 0;
16855
16857
  const formattedColumns = columns.map((col, i) => {
16856
- var _a, _b, _c;
16858
+ var _a2, _b2, _c;
16857
16859
  const newCol = (0, import_lodash2.default)(col);
16858
- newCol.id = (_a = col.id) != null ? _a : v4_default();
16860
+ newCol.id = (_a2 = col.id) != null ? _a2 : v4_default();
16859
16861
  newCol.field = `${i}`;
16860
16862
  newCol.index = i;
16861
16863
  newCol.title = col.display_name;
@@ -16884,7 +16886,7 @@
16884
16886
  htmlElement: cell.getElement()
16885
16887
  });
16886
16888
  };
16887
- newCol.headerFilter = (_b = col.headerFilter) != null ? _b : "input";
16889
+ newCol.headerFilter = (_b2 = col.headerFilter) != null ? _b2 : "input";
16888
16890
  newCol.headerFilterPlaceholder = setHeaderFilterPlaceholder(newCol);
16889
16891
  newCol.headerFilterLiveFilter = false;
16890
16892
  newCol.headerFilterFunc = createFilterFunction({ column: newCol, dataFormatting });
@@ -16918,7 +16920,7 @@
16918
16920
  return formattedColumns;
16919
16921
  };
16920
16922
  var getStringColumnIndices = (columns, supportsPivot = false, includeNumerics = false, defaultDateColumn) => {
16921
- var _a, _b;
16923
+ var _a2, _b2;
16922
16924
  if (!columns) {
16923
16925
  return void 0;
16924
16926
  }
@@ -16949,12 +16951,12 @@
16949
16951
  }
16950
16952
  if (includeNumerics && stringColumnIndex == void 0) {
16951
16953
  const { numberColumnIndices, numberColumnIndices2 } = getNumberColumnIndices(columns);
16952
- stringColumnIndex = (_a = stringColumnIndices.find(
16954
+ stringColumnIndex = (_a2 = stringColumnIndices.find(
16953
16955
  (index) => !numberColumnIndices.includes(index) && !numberColumnIndices2.includes(index)
16954
- )) != null ? _a : stringColumnIndices.find((index) => !numberColumnIndices.includes(index));
16956
+ )) != null ? _a2 : stringColumnIndices.find((index) => !numberColumnIndices.includes(index));
16955
16957
  }
16956
16958
  if (supportsPivot) {
16957
- const isDateColumnGroupable = (_b = columns[dateColumnIndex]) == null ? void 0 : _b.groupable;
16959
+ const isDateColumnGroupable = (_b2 = columns[dateColumnIndex]) == null ? void 0 : _b2.groupable;
16958
16960
  stringColumnIndex = isDateColumnGroupable ? dateColumnIndex : stringColumnIndices.findIndex((index) => columns[index].groupable);
16959
16961
  if (!(stringColumnIndex >= 0)) {
16960
16962
  stringColumnIndex = stringColumnIndices[0];
@@ -17142,8 +17144,8 @@
17142
17144
  currentTableConfig,
17143
17145
  allowNumericalOrdinalAxis = true
17144
17146
  } = {}) => {
17145
- var _a, _b, _c, _d;
17146
- const cols = columns != null ? columns : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns;
17147
+ var _a2, _b2, _c, _d;
17148
+ const cols = columns != null ? columns : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns;
17147
17149
  if (!cols) {
17148
17150
  return;
17149
17151
  }
@@ -17240,8 +17242,8 @@
17240
17242
  return tableConfig;
17241
17243
  };
17242
17244
  var isColumnIndexConfigValid = ({ response, columnIndexConfig, columns, displayType }) => {
17243
- var _a, _b, _c, _d, _e, _f;
17244
- if (!columns || !((_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows) == null ? void 0 : _c.length)) {
17245
+ var _a2, _b2, _c, _d, _e, _f;
17246
+ if (!columns || !((_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.length)) {
17245
17247
  console.debug("Invalid Config: either no columns or no data were provided to table config validation");
17246
17248
  return false;
17247
17249
  }
@@ -17268,8 +17270,8 @@
17268
17270
  return false;
17269
17271
  }
17270
17272
  if (isNumber(columnIndexConfig.stringColumnIndex) && (!((_d = columns[columnIndexConfig.stringColumnIndex]) == null ? void 0 : _d.is_visible) || columnIndexConfig.stringColumnIndices.length && columnIndexConfig.stringColumnIndices.find((i) => {
17271
- var _a2;
17272
- return !((_a2 = columns[i]) == null ? void 0 : _a2.is_visible);
17273
+ var _a3;
17274
+ return !((_a3 = columns[i]) == null ? void 0 : _a3.is_visible);
17273
17275
  }) !== void 0)) {
17274
17276
  console.debug(
17275
17277
  "Table config invalid: Some of the string column indices were pointing to hidden columns.",
@@ -17279,8 +17281,8 @@
17279
17281
  return false;
17280
17282
  }
17281
17283
  if (isNumber(columnIndexConfig.numberColumnIndex) && (!((_e = columns[columnIndexConfig.numberColumnIndex]) == null ? void 0 : _e.is_visible) || columnIndexConfig.numberColumnIndices.find((i) => {
17282
- var _a2;
17283
- return !((_a2 = columns[i]) == null ? void 0 : _a2.is_visible);
17284
+ var _a3;
17285
+ return !((_a3 = columns[i]) == null ? void 0 : _a3.is_visible);
17284
17286
  }) !== void 0)) {
17285
17287
  console.debug(
17286
17288
  "Table config invalid: Some of the number column indices were pointing to hidden columns.",
@@ -17295,8 +17297,8 @@
17295
17297
  }
17296
17298
  if (displayType === "column_line" /* COLUMN_LINE */ || displayType === "scatterplot" /* SCATTERPLOT */) {
17297
17299
  if (columnIndexConfig.numberColumnIndices2.find((i) => {
17298
- var _a2;
17299
- return !((_a2 = columns[i]) == null ? void 0 : _a2.is_visible);
17300
+ var _a3;
17301
+ return !((_a3 = columns[i]) == null ? void 0 : _a3.is_visible);
17300
17302
  })) {
17301
17303
  console.debug("Second axis indices had hidden columns");
17302
17304
  return false;
@@ -17325,14 +17327,14 @@
17325
17327
  };
17326
17328
  var getQuerySelectableJoinColumns = (columns) => {
17327
17329
  return columns.map((col, index) => {
17328
- var _a, _b;
17329
- return ((_b = (_a = getStringColumnIndices(columns)) == null ? void 0 : _a.stringColumnIndices) == null ? void 0 : _b.includes(index)) ? col : null;
17330
+ var _a2, _b2;
17331
+ return ((_b2 = (_a2 = getStringColumnIndices(columns)) == null ? void 0 : _a2.stringColumnIndices) == null ? void 0 : _b2.includes(index)) ? col : null;
17330
17332
  }).filter(Boolean);
17331
17333
  };
17332
17334
  var getDefaultJoinColumnAndDisplayNameAndJoinColumnsIndices = (queryResponse) => {
17333
- var _a, _b;
17335
+ var _a2, _b2;
17334
17336
  try {
17335
- const columns = ((_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) || [];
17337
+ const columns = ((_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) || [];
17336
17338
  const selectableJoinColumns = getQuerySelectableJoinColumns(columns);
17337
17339
  let defaultJoinColumn = [];
17338
17340
  let defaultDisplayName = "";
@@ -17359,10 +17361,10 @@
17359
17361
  }
17360
17362
  };
17361
17363
  var getDefaultJoinColumns = (firstQueryResult, secondQueryResult) => {
17362
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
17364
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l;
17363
17365
  try {
17364
17366
  const firstSelectableJoinColumns = getQuerySelectableJoinColumns(
17365
- ((_b = (_a = firstQueryResult == null ? void 0 : firstQueryResult.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) || []
17367
+ ((_b2 = (_a2 = firstQueryResult == null ? void 0 : firstQueryResult.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) || []
17366
17368
  ).filter((column) => column.groupable === true);
17367
17369
  const secondSelectableJoinColumns = getQuerySelectableJoinColumns(
17368
17370
  ((_d = (_c = secondQueryResult == null ? void 0 : secondQueryResult.data) == null ? void 0 : _c.data) == null ? void 0 : _d.columns) || []
@@ -17629,7 +17631,7 @@
17629
17631
  }
17630
17632
  };
17631
17633
  var formatStringDate = (value, config = dataFormattingDefault) => {
17632
- var _a;
17634
+ var _a2;
17633
17635
  if (!value) {
17634
17636
  return void 0;
17635
17637
  }
@@ -17639,7 +17641,7 @@
17639
17641
  const day = dateArray == null ? void 0 : dateArray[2];
17640
17642
  let month;
17641
17643
  let week;
17642
- if ((_a = dateArray == null ? void 0 : dateArray[1]) == null ? void 0 : _a.includes("W")) {
17644
+ if ((_a2 = dateArray == null ? void 0 : dateArray[1]) == null ? void 0 : _a2.includes("W")) {
17643
17645
  week = dateArray == null ? void 0 : dateArray[1];
17644
17646
  } else {
17645
17647
  month = dateArray == null ? void 0 : dateArray[1];
@@ -17911,7 +17913,7 @@
17911
17913
  return a - b;
17912
17914
  };
17913
17915
  var dateStringSortFn = (a, b, col) => {
17914
- var _a;
17916
+ var _a2;
17915
17917
  if (typeof a !== "string" || typeof b !== "string" || !col) {
17916
17918
  return a - b;
17917
17919
  }
@@ -17946,7 +17948,7 @@
17946
17948
  } else {
17947
17949
  switch (col.precision) {
17948
17950
  case "DOW": {
17949
- const dowStyle = (_a = col.dow_style) != null ? _a : "ALPHA_MON";
17951
+ const dowStyle = (_a2 = col.dow_style) != null ? _a2 : "ALPHA_MON";
17950
17952
  let aIndex = WEEKDAY_NAMES_MON.findIndex((dow) => dow.toLowerCase().includes(aTrimmed.toLowerCase()));
17951
17953
  let bIndex = WEEKDAY_NAMES_MON.findIndex((dow) => dow.toLowerCase().includes(bTrimmed.toLowerCase()));
17952
17954
  if (dowStyle === "ALPHA_SUN") {
@@ -18048,13 +18050,13 @@
18048
18050
  if (op === "like" /* LIKE */ || op === "includes" || op === "contains") {
18049
18051
  if (colType === "DATE" /* DATE */) {
18050
18052
  return data.concat().filter((row) => {
18051
- var _a;
18053
+ var _a2;
18052
18054
  const cell = row[columnIndex];
18053
18055
  if (isNil(cell)) return false;
18054
18056
  const parts = parseRangeParts(filterValue);
18055
18057
  const precision = getPrecisionForDayJS(getFilterPrecision(column));
18056
18058
  const start = dayjsWithPlugins_default.utc(parts[0]).startOf(precision);
18057
- const end = dayjsWithPlugins_default.utc((_a = parts[1]) != null ? _a : parts[0]).endOf(precision);
18059
+ const end = dayjsWithPlugins_default.utc((_a2 = parts[1]) != null ? _a2 : parts[0]).endOf(precision);
18058
18060
  const rowVal = getDayJSObj({ value: cell, column });
18059
18061
  return start.isSameOrBefore(rowVal) && rowVal.isSameOrBefore(end);
18060
18062
  });
@@ -18089,14 +18091,14 @@
18089
18091
  }
18090
18092
  if (op === "between" /* BETWEEN */) {
18091
18093
  return data.concat().filter((row) => {
18092
- var _a;
18094
+ var _a2;
18093
18095
  const cell = row[columnIndex];
18094
18096
  if (isNil(cell)) return false;
18095
18097
  if (colType === "DATE" /* DATE */ || colType === "DATE_STRING" /* DATE_STRING */) {
18096
18098
  try {
18097
18099
  const parts2 = parseRangeParts(filterValue);
18098
18100
  const start = getDayJSObj({ value: parts2[0], column });
18099
- const end = getDayJSObj({ value: (_a = parts2[1]) != null ? _a : parts2[0], column });
18101
+ const end = getDayJSObj({ value: (_a2 = parts2[1]) != null ? _a2 : parts2[0], column });
18100
18102
  const rowVal = getDayJSObj({ value: cell, column });
18101
18103
  return start.isSameOrBefore(rowVal) && rowVal.isSameOrBefore(end);
18102
18104
  } catch (e) {
@@ -18152,13 +18154,13 @@
18152
18154
  if (op === "!" || op === "not_like") {
18153
18155
  if (colType === "DATE" /* DATE */) {
18154
18156
  return data.concat().filter((row) => {
18155
- var _a;
18157
+ var _a2;
18156
18158
  const cell = row[columnIndex];
18157
18159
  if (isNil(cell)) return true;
18158
18160
  const parts = parseRangeParts(filterValue);
18159
18161
  const precision = getPrecisionForDayJS(getFilterPrecision(column));
18160
18162
  const start = dayjsWithPlugins_default.utc(parts[0]).startOf(precision);
18161
- const end = dayjsWithPlugins_default.utc((_a = parts[1]) != null ? _a : parts[0]).endOf(precision);
18163
+ const end = dayjsWithPlugins_default.utc((_a2 = parts[1]) != null ? _a2 : parts[0]).endOf(precision);
18162
18164
  const rowVal = getDayJSObj({ value: cell, column });
18163
18165
  return !(start.isSameOrBefore(rowVal) && rowVal.isSameOrBefore(end));
18164
18166
  });
@@ -18214,8 +18216,8 @@
18214
18216
  } else {
18215
18217
  const sortedData = data.concat().sort(
18216
18218
  (a, b) => {
18217
- var _a;
18218
- return multiplier * ((_a = `${a[columnIndex]}`) == null ? void 0 : _a.localeCompare(`${b[columnIndex]}`, "en", { ignorePunctuation: true }));
18219
+ var _a2;
18220
+ return multiplier * ((_a2 = `${a[columnIndex]}`) == null ? void 0 : _a2.localeCompare(`${b[columnIndex]}`, "en", { ignorePunctuation: true }));
18219
18221
  }
18220
18222
  );
18221
18223
  return sortedData;
@@ -18251,8 +18253,8 @@
18251
18253
  if (stringColumnIndex >= 0) {
18252
18254
  let multiplier = sortDirection === "asc" ? -1 : 1;
18253
18255
  const sortedData = data.concat().sort((a, b) => {
18254
- var _a;
18255
- return (_a = a[0]) == null ? void 0 : _a.localeCompare(b[0]);
18256
+ var _a2;
18257
+ return (_a2 = a[0]) == null ? void 0 : _a2.localeCompare(b[0]);
18256
18258
  });
18257
18259
  return sortedData;
18258
18260
  }
@@ -18391,7 +18393,7 @@
18391
18393
  }
18392
18394
  };
18393
18395
  var getNumberFormatConfig = (d, scale) => {
18394
- var _a, _b, _c, _d, _e, _f, _g, _h;
18396
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
18395
18397
  const dNumber = typeof d === "string" ? parseFloat(d) : d;
18396
18398
  let minimumFractionDigits = 0;
18397
18399
  let maximumFractionDigits = 0;
@@ -18401,7 +18403,7 @@
18401
18403
  const maxValue = scale == null ? void 0 : scale.maxValue;
18402
18404
  let domainRange = 0;
18403
18405
  if (domain) {
18404
- domainRange = Math.abs(((_a = domain[1]) != null ? _a : 0) - ((_b = domain[0]) != null ? _b : 0));
18406
+ domainRange = Math.abs(((_a2 = domain[1]) != null ? _a2 : 0) - ((_b2 = domain[0]) != null ? _b2 : 0));
18405
18407
  } else if (!isNaN(maxValue) && !isNaN(minValue)) {
18406
18408
  domainRange = Math.abs(maxValue - minValue);
18407
18409
  }
@@ -18446,7 +18448,7 @@
18446
18448
  maxLabelWidth,
18447
18449
  sigDigits
18448
18450
  }) => {
18449
- var _a;
18451
+ var _a2;
18450
18452
  if (d === null) {
18451
18453
  return {
18452
18454
  fullWidthLabel: "Untitled Category",
@@ -18460,7 +18462,7 @@
18460
18462
  formattedLabel: d
18461
18463
  };
18462
18464
  }
18463
- const config = (_a = dataFormatting != null ? dataFormatting : scale == null ? void 0 : scale.dataFormatting) != null ? _a : getDataFormatting();
18465
+ const config = (_a2 = dataFormatting != null ? dataFormatting : scale == null ? void 0 : scale.dataFormatting) != null ? _a2 : getDataFormatting();
18464
18466
  const { currencyCode, languageCode } = config;
18465
18467
  let type = col.type;
18466
18468
  if ((scale == null ? void 0 : scale.units) === "none") {
@@ -18572,14 +18574,14 @@
18572
18574
  return { fullWidthLabel, formattedLabel };
18573
18575
  };
18574
18576
  var getCurrencySymbol = (dataFormatting = dataFormattingDefault) => {
18575
- var _a;
18577
+ var _a2;
18576
18578
  try {
18577
18579
  const { currencyCode, languageCode } = getDataFormatting(dataFormatting);
18578
18580
  const formattedParts = new Intl.NumberFormat(languageCode, {
18579
18581
  style: "currency",
18580
18582
  currency: currencyCode
18581
18583
  }).formatToParts(0);
18582
- const symbol = (_a = formattedParts.find((part) => (part == null ? void 0 : part.type) === "currency")) == null ? void 0 : _a.value;
18584
+ const symbol = (_a2 = formattedParts.find((part) => (part == null ? void 0 : part.type) === "currency")) == null ? void 0 : _a2.value;
18583
18585
  return symbol;
18584
18586
  } catch (error) {
18585
18587
  console.error(error);
@@ -18783,7 +18785,7 @@
18783
18785
  return chunkedFilter;
18784
18786
  };
18785
18787
  var chunkNullVLString = (str) => {
18786
- var _a;
18788
+ var _a2;
18787
18789
  let strArray = [];
18788
18790
  const splitStr = str.split("null");
18789
18791
  if (splitStr[0]) {
@@ -18797,7 +18799,7 @@
18797
18799
  c_type: "VALUE_LABEL",
18798
18800
  eng: "null",
18799
18801
  for: "null",
18800
- operator: (_a = splitStr[0].trim()) != null ? _a : void 0
18802
+ operator: (_a2 = splitStr[0].trim()) != null ? _a2 : void 0
18801
18803
  });
18802
18804
  if (splitStr[1]) {
18803
18805
  strArray.push({
@@ -18815,8 +18817,8 @@
18815
18817
  }).filter(Boolean);
18816
18818
  };
18817
18819
  var parseChunkCauses = (chunk) => {
18818
- var _a, _b;
18819
- if (!((_a = chunk == null ? void 0 : chunk.causes) == null ? void 0 : _a.length) || !((_b = chunk.causes_gen2) == null ? void 0 : _b.length) || !chunk.eng) {
18820
+ var _a2, _b2;
18821
+ if (!((_a2 = chunk == null ? void 0 : chunk.causes) == null ? void 0 : _a2.length) || !((_b2 = chunk.causes_gen2) == null ? void 0 : _b2.length) || !chunk.eng) {
18820
18822
  return chunk;
18821
18823
  }
18822
18824
  const cleanCauses = extractQuotedContent([...chunk.causes, ...chunk.causes_gen2]);
@@ -18829,7 +18831,7 @@
18829
18831
  };
18830
18832
  };
18831
18833
  var parseFilterChunk = (chunk) => {
18832
- var _a, _b, _c, _d, _e, _f, _g;
18834
+ var _a2, _b2, _c, _d, _e, _f, _g;
18833
18835
  try {
18834
18836
  const input = chunk.eng;
18835
18837
  const textOutsideBrackets = input.split(bracketsRegex);
@@ -18838,7 +18840,7 @@
18838
18840
  while ((match = bracketsRegex.exec(input)) !== null) {
18839
18841
  bracketTextMatches.push(match);
18840
18842
  }
18841
- if (!bracketTextMatches.length || !textOutsideBrackets.length || ((_a = bracketTextMatches[0]) == null ? void 0 : _a[0]) === "(Date)" || ((_b = bracketTextMatches[0]) == null ? void 0 : _b[0]) === "(Month)" || ((_c = bracketTextMatches[0]) == null ? void 0 : _c[0]) === "(Year)" || ((_d = bracketTextMatches[0]) == null ? void 0 : _d[0]) === "(Week)" || ((_e = bracketTextMatches[0]) == null ? void 0 : _e[0]) === "(Day)" || ((_g = (_f = textOutsideBrackets[0]) == null ? void 0 : _f.split(" ")) == null ? void 0 : _g.find((word) => {
18843
+ if (!bracketTextMatches.length || !textOutsideBrackets.length || ((_a2 = bracketTextMatches[0]) == null ? void 0 : _a2[0]) === "(Date)" || ((_b2 = bracketTextMatches[0]) == null ? void 0 : _b2[0]) === "(Month)" || ((_c = bracketTextMatches[0]) == null ? void 0 : _c[0]) === "(Year)" || ((_d = bracketTextMatches[0]) == null ? void 0 : _d[0]) === "(Week)" || ((_e = bracketTextMatches[0]) == null ? void 0 : _e[0]) === "(Day)" || ((_g = (_f = textOutsideBrackets[0]) == null ? void 0 : _f.split(" ")) == null ? void 0 : _g.find((word) => {
18842
18844
  if (isISODate(word)) return true;
18843
18845
  const trimmed = word.replace(/\'/g, "");
18844
18846
  if (/^\d{4}-\d{1,2}-\d{1,2}$/.test(trimmed)) return true;
@@ -18852,21 +18854,21 @@
18852
18854
  }
18853
18855
  let mergedArray = [];
18854
18856
  textOutsideBrackets.forEach((str, i) => {
18855
- var _a2, _b2, _c2;
18857
+ var _a3, _b3, _c2;
18856
18858
  let strChunked = [];
18857
18859
  const isNullVL = str.trim() === "null" || str.includes(" null ");
18858
18860
  if (isNullVL) {
18859
18861
  strChunked = chunkNullVLString(str);
18860
18862
  } else {
18861
18863
  const textInQuotesMatches = getRegexMatchArray(str, singleQuoteRegex);
18862
- strChunked = (_a2 = chunkStrByMatches(str, textInQuotesMatches)) != null ? _a2 : [];
18864
+ strChunked = (_a3 = chunkStrByMatches(str, textInQuotesMatches)) != null ? _a3 : [];
18863
18865
  }
18864
18866
  mergedArray = [...mergedArray, ...strChunked];
18865
18867
  const vlSuffixMatch = bracketTextMatches[i];
18866
18868
  if (vlSuffixMatch) {
18867
18869
  mergedArray.push({
18868
18870
  c_type: "VL_SUFFIX",
18869
- eng: (_b2 = vlSuffixMatch[0]) == null ? void 0 : _b2.trim(),
18871
+ eng: (_b3 = vlSuffixMatch[0]) == null ? void 0 : _b3.trim(),
18870
18872
  for: (_c2 = strChunked.find((ch) => ch.c_type === "VALUE_LABEL")) == null ? void 0 : _c2.for
18871
18873
  });
18872
18874
  }
@@ -18905,9 +18907,9 @@
18905
18907
  }
18906
18908
  };
18907
18909
  var getDatesFromRT = (queryResponse) => {
18908
- var _a, _b;
18910
+ var _a2, _b2;
18909
18911
  try {
18910
- const parsedRT = (_b = (_a = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.parsed_interpretation;
18912
+ const parsedRT = (_b2 = (_a2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.parsed_interpretation;
18911
18913
  if (!parsedRT) {
18912
18914
  return;
18913
18915
  }
@@ -19183,7 +19185,7 @@
19183
19185
  }
19184
19186
  };
19185
19187
  var getChartColorVars = (prefix2) => {
19186
- var _a, _b, _c;
19188
+ var _a2, _b2, _c;
19187
19189
  try {
19188
19190
  const chartColors = [];
19189
19191
  const chartColorsDark = [];
@@ -19192,7 +19194,7 @@
19192
19194
  while (counter < maxLoops) {
19193
19195
  try {
19194
19196
  const chartColor = getThemeValue(`chart-color-${counter}`, prefix2);
19195
- const chartColorDark = (_a = getThemeValue(`chart-color-dark-${counter}`, prefix2)) != null ? _a : chartColor;
19197
+ const chartColorDark = (_a2 = getThemeValue(`chart-color-dark-${counter}`, prefix2)) != null ? _a2 : chartColor;
19196
19198
  if (chartColor) {
19197
19199
  chartColors.push(chartColor);
19198
19200
  chartColorsDark.push(chartColorDark);
@@ -19207,7 +19209,7 @@
19207
19209
  } catch (error) {
19208
19210
  console.error("Could not get chart color css vars. See below for error details");
19209
19211
  console.error(error);
19210
- return { chartColors: (_b = defaultThemeConfig.chartColors) != null ? _b : [], chartColorsDark: (_c = defaultThemeConfig.chartColors) != null ? _c : [] };
19212
+ return { chartColors: (_b2 = defaultThemeConfig.chartColors) != null ? _b2 : [], chartColorsDark: (_c = defaultThemeConfig.chartColors) != null ? _c : [] };
19211
19213
  }
19212
19214
  };
19213
19215
  var setAccentColorVars = (accentColor, themeStyles) => {
@@ -20097,8 +20099,8 @@
20097
20099
  });
20098
20100
  };
20099
20101
  var handleTooltipBoundaryCollision = (e, self2) => {
20100
- var _a;
20101
- const tooltipRef = (_a = self2 == null ? void 0 : self2.reactTooltipRef) == null ? void 0 : _a.tooltipRef;
20102
+ var _a2;
20103
+ const tooltipRef = (_a2 = self2 == null ? void 0 : self2.reactTooltipRef) == null ? void 0 : _a2.tooltipRef;
20102
20104
  if (!tooltipRef) {
20103
20105
  return;
20104
20106
  }
@@ -20197,10 +20199,10 @@
20197
20199
  };
20198
20200
  var svgToPng = (svgElement, scale = 3, CSS_PREFIX) => {
20199
20201
  return new Promise(function(resolve, reject) {
20200
- var _a, _b, _c, _d;
20202
+ var _a2, _b2, _c, _d;
20201
20203
  try {
20202
20204
  const margin = 10;
20203
- const originalWidth = (_b = (_a = svgElement == null ? void 0 : svgElement.getBoundingClientRect) == null ? void 0 : _a.call(svgElement)) == null ? void 0 : _b.width;
20205
+ const originalWidth = (_b2 = (_a2 = svgElement == null ? void 0 : svgElement.getBoundingClientRect) == null ? void 0 : _a2.call(svgElement)) == null ? void 0 : _b2.width;
20204
20206
  const originalHeight = (_d = (_c = svgElement == null ? void 0 : svgElement.getBoundingClientRect) == null ? void 0 : _c.call(svgElement)) == null ? void 0 : _d.height;
20205
20207
  if (!originalHeight || !originalWidth) {
20206
20208
  throw new Error("SVG has no height or width");
@@ -20250,12 +20252,12 @@
20250
20252
 
20251
20253
  // src/HelperFns/dataAlertHelpers.ts
20252
20254
  var getScheduleFrequencyObject = (dataAlert) => {
20253
- var _a, _b;
20255
+ var _a2, _b2;
20254
20256
  if (!dataAlert) {
20255
20257
  return;
20256
20258
  }
20257
20259
  if (dataAlert.notification_type === SCHEDULED_TYPE) {
20258
- const schedulePeriod = (_b = (_a = dataAlert.schedules) == null ? void 0 : _a[0]) == null ? void 0 : _b.notification_period;
20260
+ const schedulePeriod = (_b2 = (_a2 = dataAlert.schedules) == null ? void 0 : _a2[0]) == null ? void 0 : _b2.notification_period;
20259
20261
  let scheduleFrequency = schedulePeriod;
20260
20262
  if (schedulePeriod === "WEEK" && dataAlert.schedules.length === 7) {
20261
20263
  scheduleFrequency = "DAY";
@@ -20265,10 +20267,10 @@
20265
20267
  return RESET_PERIOD_OPTIONS[dataAlert.reset_period];
20266
20268
  };
20267
20269
  var getSupportedConditionTypes = (expression, queryResponse) => {
20268
- var _a, _b, _c, _d, _e, _f, _g, _h;
20270
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
20269
20271
  try {
20270
20272
  if (expression == null ? void 0 : expression[0]) {
20271
- const firstCondition = (_a = expression == null ? void 0 : expression[0]) == null ? void 0 : _a.condition;
20273
+ const firstCondition = (_a2 = expression == null ? void 0 : expression[0]) == null ? void 0 : _a2.condition;
20272
20274
  if (firstCondition && firstCondition === EXISTS_TYPE) {
20273
20275
  return [EXISTS_TYPE];
20274
20276
  }
@@ -20276,7 +20278,7 @@
20276
20278
  }
20277
20279
  if (isSingleValueResponse(queryResponse)) {
20278
20280
  return [COMPARE_TYPE];
20279
- } else if (isAggregation((_c = (_b = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _b.data) == null ? void 0 : _c.columns)) {
20281
+ } else if (isAggregation((_c = (_b2 = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _b2.data) == null ? void 0 : _c.columns)) {
20280
20282
  if ((_f = (_e = (_d = queryResponse == null ? void 0 : queryResponse.data) == null ? void 0 : _d.data) == null ? void 0 : _e.columns) == null ? void 0 : _f.find((col) => col.is_visible && isColumnNumberType(col))) {
20281
20283
  return [COMPARE_TYPE, EXISTS_TYPE];
20282
20284
  }
@@ -20310,12 +20312,12 @@
20310
20312
  return `${dateDayJS.format("ll [at] h:mma")} (${dataAlert.time_zone})`;
20311
20313
  };
20312
20314
  var formatNextScheduleDate = (schedules, short) => {
20313
- var _a, _b;
20315
+ var _a2, _b2;
20314
20316
  if (!(schedules == null ? void 0 : schedules.length)) {
20315
20317
  return "";
20316
20318
  }
20317
- const date2 = (_a = schedules[0]) == null ? void 0 : _a.next_evaluation;
20318
- const timezone2 = (_b = schedules[0]) == null ? void 0 : _b.time_zone;
20319
+ const date2 = (_a2 = schedules[0]) == null ? void 0 : _a2.next_evaluation;
20320
+ const timezone2 = (_b2 = schedules[0]) == null ? void 0 : _b2.time_zone;
20319
20321
  const dateDayJS = dayjsWithPlugins_default(date2).tz(timezone2);
20320
20322
  if (short) {
20321
20323
  const today = dayjsWithPlugins_default().tz(timezone2).startOf("day");
@@ -20391,12 +20393,12 @@
20391
20393
  // src/HelperFns/dataGeneration.ts
20392
20394
  var import_lodash4 = __toESM(require_lodash());
20393
20395
  var getLabelFromRow = ({ row, index, columns, dataFormatting }) => {
20394
- var _a, _b;
20396
+ var _a2, _b2;
20395
20397
  const column = columns[index];
20396
20398
  let label;
20397
20399
  if (row) {
20398
20400
  if ((column == null ? void 0 : column.type) === "DATE" /* DATE */ || (column == null ? void 0 : column.type) === "DATE_STRING" /* DATE_STRING */) {
20399
- label = (_b = (_a = formatChartLabel({ d: row[index], column, dataFormatting })) == null ? void 0 : _a.fullWidthLabel) != null ? _b : row[index];
20401
+ label = (_b2 = (_a2 = formatChartLabel({ d: row[index], column, dataFormatting })) == null ? void 0 : _a2.fullWidthLabel) != null ? _b2 : row[index];
20400
20402
  } else {
20401
20403
  return row[index];
20402
20404
  }
@@ -20429,9 +20431,9 @@
20429
20431
  var aggregateRow = (row, datasetsToAggregate, columns) => {
20430
20432
  const newRow = [...row];
20431
20433
  Object.keys(datasetsToAggregate).forEach((index) => {
20432
- var _a;
20434
+ var _a2;
20433
20435
  const aggType = columns[index].aggType || DEFAULT_AGG_TYPE;
20434
- newRow[index] = (_a = AGG_TYPES[aggType]) == null ? void 0 : _a.fn(datasetsToAggregate[index]);
20436
+ newRow[index] = (_a2 = AGG_TYPES[aggType]) == null ? void 0 : _a2.fn(datasetsToAggregate[index]);
20435
20437
  });
20436
20438
  return newRow;
20437
20439
  };
@@ -20448,14 +20450,14 @@
20448
20450
  const clonedSortedData = (0, import_lodash4.default)(sortedData);
20449
20451
  const dataWithOther = [];
20450
20452
  clonedSortedData.forEach((row, i) => {
20451
- var _a;
20453
+ var _a2;
20452
20454
  if (i === maxElements) {
20453
20455
  dataWithOther[maxElements] = row;
20454
20456
  dataWithOther[maxElements][columnIndexConfig.stringColumnIndex] = "Other";
20455
20457
  dataWithOther[maxElements].isOther = true;
20456
20458
  dataWithOther[maxElements][columnIndexConfig.numberColumnIndex] = parseFloat(dataWithOther[maxElements][columnIndexConfig.numberColumnIndex]) || 0;
20457
20459
  } else if (i > maxElements) {
20458
- const value = parseFloat((_a = sortedData[i]) == null ? void 0 : _a[columnIndexConfig.numberColumnIndex]) || 0;
20460
+ const value = parseFloat((_a2 = sortedData[i]) == null ? void 0 : _a2[columnIndexConfig.numberColumnIndex]) || 0;
20459
20461
  dataWithOther[maxElements][columnIndexConfig.numberColumnIndex] += value;
20460
20462
  } else {
20461
20463
  dataWithOther[i] = row;
@@ -20637,7 +20639,7 @@
20637
20639
  Object.keys(uniqueValues0).length
20638
20640
  );
20639
20641
  tableData.forEach((row) => {
20640
- var _a;
20642
+ var _a2;
20641
20643
  const pivotCategoryIndex = uniqueValues0[row[newStringColumnIndex]];
20642
20644
  const pivotCategoryValue = row[newStringColumnIndex];
20643
20645
  pivotTableData[pivotCategoryIndex][0] = pivotCategoryValue;
@@ -20645,7 +20647,7 @@
20645
20647
  const pivotValue = Number(row[numberColumnIndex]);
20646
20648
  pivotTableData[pivotCategoryIndex][pivotColumnIndex] = pivotValue;
20647
20649
  pivotTableColumns[pivotColumnIndex].origValues[pivotCategoryValue] = {
20648
- name: (_a = columns[newStringColumnIndex]) == null ? void 0 : _a.name,
20650
+ name: (_a2 = columns[newStringColumnIndex]) == null ? void 0 : _a2.name,
20649
20651
  value: pivotCategoryValue
20650
20652
  };
20651
20653
  });
@@ -20800,17 +20802,17 @@
20800
20802
  }
20801
20803
  };
20802
20804
  var generatePivotData = (params = {}) => {
20803
- var _a;
20804
- if (((_a = params.columns) == null ? void 0 : _a.length) === 2) {
20805
+ var _a2;
20806
+ if (((_a2 = params.columns) == null ? void 0 : _a2.length) === 2) {
20805
20807
  return generateDatePivotData(params);
20806
20808
  } else {
20807
20809
  return generatePivotTableData(params);
20808
20810
  }
20809
20811
  };
20810
20812
  var generateFilterDrilldownResponse = ({ response, rows, index, value }) => {
20811
- var _a, _b;
20813
+ var _a2, _b2;
20812
20814
  try {
20813
- const data = rows != null ? rows : (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.rows;
20815
+ const data = rows != null ? rows : (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows;
20814
20816
  const filteredRows = data == null ? void 0 : data.filter((origRow) => {
20815
20817
  return `${origRow[index]}` === `${value}`;
20816
20818
  });
@@ -20980,10 +20982,10 @@
20980
20982
  return updateStartAndEndIndexes({ selectedSuggestions, plainTextList });
20981
20983
  };
20982
20984
  var initializeQueryValidationOptions = ({ responseBody, initialSelections, autoSelectSuggestion = true }) => {
20983
- var _a, _b;
20985
+ var _a2, _b2;
20984
20986
  try {
20985
- const replacements = (_a = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _a.replacements;
20986
- const query = (_b = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _b.query;
20987
+ const replacements = (_a2 = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _a2.replacements;
20988
+ const query = (_b2 = responseBody == null ? void 0 : responseBody.data) == null ? void 0 : _b2.query;
20987
20989
  if (!(replacements == null ? void 0 : replacements.length) || !query) {
20988
20990
  console.warn("Unable to construct validation suggestions - One or more of the following was not found:", {
20989
20991
  sortedReplacements: !!replacements,
@@ -21348,25 +21350,25 @@
21348
21350
  return value === null || value === void 0 || value === "";
21349
21351
  };
21350
21352
  var convertToFunctionStr = (origColumnFnArray) => {
21351
- var _a, _b;
21353
+ var _a2, _b2;
21352
21354
  try {
21353
21355
  let columnFnStr = "";
21354
- const numRightBrackets = (_a = origColumnFnArray.filter(
21356
+ const numRightBrackets = (_a2 = origColumnFnArray.filter(
21355
21357
  (chunk) => chunk.value === "RIGHT_BRACKET" /* RIGHT_BRACKET */
21356
- )) == null ? void 0 : _a.length;
21357
- const numLeftBrackets = (_b = origColumnFnArray.filter((chunk) => chunk.value === "LEFT_BRACKET" /* LEFT_BRACKET */)) == null ? void 0 : _b.length;
21358
+ )) == null ? void 0 : _a2.length;
21359
+ const numLeftBrackets = (_b2 = origColumnFnArray.filter((chunk) => chunk.value === "LEFT_BRACKET" /* LEFT_BRACKET */)) == null ? void 0 : _b2.length;
21358
21360
  if (numRightBrackets !== numLeftBrackets) {
21359
21361
  throw new ChataError("Syntax Error: Formula contains unclosed brackets");
21360
21362
  }
21361
21363
  origColumnFnArray.forEach((chunk, i) => {
21362
- var _a2, _b2, _c;
21364
+ var _a3, _b3, _c;
21363
21365
  if (chunk.type === "operator" /* OPERATOR */) {
21364
21366
  if (i === origColumnFnArray.length - 1) {
21365
21367
  if (chunk.value !== "RIGHT_BRACKET" /* RIGHT_BRACKET */) {
21366
21368
  throw new ChataError("Syntax Error: Formula can't end with an operator");
21367
21369
  }
21368
21370
  }
21369
- columnFnStr = columnFnStr + " " + ((_b2 = (_a2 = OPERATORS[chunk.value]) == null ? void 0 : _a2.js) != null ? _b2 : "");
21371
+ columnFnStr = columnFnStr + " " + ((_b3 = (_a3 = OPERATORS[chunk.value]) == null ? void 0 : _a3.js) != null ? _b3 : "");
21370
21372
  } else if (chunk.type === "number") {
21371
21373
  if (isValueEmpty(chunk.value)) {
21372
21374
  throw new ChataError("Syntax Error: Number input is empty");
@@ -21407,13 +21409,13 @@
21407
21409
  try {
21408
21410
  let fnSummary = "";
21409
21411
  columnFnArray.forEach((chunk, i) => {
21410
- var _a, _b;
21412
+ var _a2, _b2;
21411
21413
  if (chunk.type === "operator" /* OPERATOR */) {
21412
- fnSummary = `${fnSummary} ${(_a = OPERATORS[chunk.value]) == null ? void 0 : _a.js}`;
21414
+ fnSummary = `${fnSummary} ${(_a2 = OPERATORS[chunk.value]) == null ? void 0 : _a2.js}`;
21413
21415
  } else if (chunk.type === "number" /* NUMBER */) {
21414
21416
  fnSummary = `${fnSummary} ${chunk.value}`;
21415
21417
  } else if (chunk.type === "column" /* COLUMN */ && (chunk == null ? void 0 : chunk.column)) {
21416
- fnSummary = `${fnSummary} ${(_b = chunk.column) == null ? void 0 : _b.display_name}`;
21418
+ fnSummary = `${fnSummary} ${(_b2 = chunk.column) == null ? void 0 : _b2.display_name}`;
21417
21419
  }
21418
21420
  });
21419
21421
  return fnSummary;
@@ -21435,8 +21437,8 @@
21435
21437
  return getVisibleColumns(columns).filter((col) => isColumnDateType(col));
21436
21438
  };
21437
21439
  var getCleanColumnName = (colName) => {
21438
- var _a;
21439
- return (_a = colName.replace(/\b(sum|avg|min|max|count|distinct|stddev)\b\(([^()]+)\)/g, "$2")) == null ? void 0 : _a.trim();
21440
+ var _a2;
21441
+ return (_a2 = colName.replace(/\b(sum|avg|min|max|count|distinct|stddev)\b\(([^()]+)\)/g, "$2")) == null ? void 0 : _a2.trim();
21440
21442
  };
21441
21443
  var buildPlainColumnArrayFn = (columnName) => {
21442
21444
  try {
@@ -23911,8 +23913,8 @@
23911
23913
  var MAX_SCALE_RATIO = 0.9;
23912
23914
  var MIN_SCALE_RATIO = 0.1;
23913
23915
  var dataStructureChanged = (props, prevProps) => {
23914
- var _a, _b;
23915
- return ((_a = props.data) == null ? void 0 : _a.length) !== ((_b = prevProps.data) == null ? void 0 : _b.length) || props.stringColumnIndex !== prevProps.stringColumnIndex || props.numberColumnIndex !== prevProps.numberColumnIndex || !(0, import_lodash7.default)(props.legendColumn, prevProps.legendColumn) || !(0, import_lodash7.default)(props.columns, prevProps.columns) || !(0, import_lodash7.default)(props.numberColumnIndices, prevProps.numberColumnIndices) || !(0, import_lodash7.default)(props.stringColumnIndices, prevProps.stringColumnIndices) || props.type === "pie" && !(0, import_lodash7.default)(props.data, prevProps.data);
23916
+ var _a2, _b2;
23917
+ return ((_a2 = props.data) == null ? void 0 : _a2.length) !== ((_b2 = prevProps.data) == null ? void 0 : _b2.length) || props.stringColumnIndex !== prevProps.stringColumnIndex || props.numberColumnIndex !== prevProps.numberColumnIndex || !(0, import_lodash7.default)(props.legendColumn, prevProps.legendColumn) || !(0, import_lodash7.default)(props.columns, prevProps.columns) || !(0, import_lodash7.default)(props.numberColumnIndices, prevProps.numberColumnIndices) || !(0, import_lodash7.default)(props.stringColumnIndices, prevProps.stringColumnIndices) || props.type === "pie" && !(0, import_lodash7.default)(props.data, prevProps.data);
23916
23918
  };
23917
23919
  var onlySeriesVisibilityChanged = (props, prevProps) => {
23918
23920
  if ((0, import_lodash7.default)(props.columns, prevProps.columns)) {
@@ -23981,10 +23983,10 @@
23981
23983
  }
23982
23984
  };
23983
23985
  var transformLabels = (orient, axisElement, innerHeight, rotateLabels) => {
23984
- var _a;
23986
+ var _a2;
23985
23987
  select_default2(axisElement).selectAll(".tick text").attr("transform", getLabelTranslateValue(orient)).style("stroke-width", 0).style("stroke", "inherit").style("font-size", "inherit").style("font-weight", "inherit").style("font-family", "inherit");
23986
23988
  if (orient === "bottom" || orient === "top") {
23987
- const labelsAreRotated = (_a = shouldLabelsRotate(axisElement)) != null ? _a : rotateLabels;
23989
+ const labelsAreRotated = (_a2 = shouldLabelsRotate(axisElement)) != null ? _a2 : rotateLabels;
23988
23990
  if (labelsAreRotated) {
23989
23991
  if (orient === "bottom") {
23990
23992
  select_default2(axisElement).selectAll(".tick text").style("text-anchor", "end").attr("dominant-baseline", "text-top").attr("transform", `rotate(-45, 0, ${innerHeight}) translate(-10, 0)`);
@@ -24005,13 +24007,13 @@
24005
24007
  columnIndexConfig,
24006
24008
  activeKey
24007
24009
  }) => {
24008
- var _a, _b, _c, _d;
24010
+ var _a2, _b2, _c, _d;
24009
24011
  const { stringColumnIndex } = columnIndexConfig;
24010
24012
  const drilldownData = {};
24011
24013
  const groupBys = [];
24012
24014
  const column = columns[colIndex];
24013
- const stringColumn = ((_a = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _a.origColumn) || (columns == null ? void 0 : columns[stringColumnIndex]);
24014
- if ((_b = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _b.datePivot) {
24015
+ const stringColumn = ((_a2 = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _a2.origColumn) || (columns == null ? void 0 : columns[stringColumnIndex]);
24016
+ if ((_b2 = columns == null ? void 0 : columns[stringColumnIndex]) == null ? void 0 : _b2.datePivot) {
24015
24017
  const year = Number((_c = columns == null ? void 0 : columns[colIndex]) == null ? void 0 : _c.name);
24016
24018
  const month = row == null ? void 0 : row[stringColumnIndex];
24017
24019
  const value = `${(_d = pivotOriginalColumnData == null ? void 0 : pivotOriginalColumnData[year]) == null ? void 0 : _d[month]}`;
@@ -24064,7 +24066,7 @@
24064
24066
  dataFormatting,
24065
24067
  aggregated = true
24066
24068
  }) => {
24067
- var _a, _b;
24069
+ var _a2, _b2;
24068
24070
  let tooltipElement = null;
24069
24071
  try {
24070
24072
  let tooltipLine1 = "";
@@ -24078,7 +24080,7 @@
24078
24080
  if (column1) {
24079
24081
  let column1Title = column1.origColumn ? column1.origColumn.display_name : column1.display_name;
24080
24082
  if (aggregated) {
24081
- const aggTypeDisplayName = (_a = AGG_TYPES[column1.aggType]) == null ? void 0 : _a.displayName;
24083
+ const aggTypeDisplayName = (_a2 = AGG_TYPES[column1.aggType]) == null ? void 0 : _a2.displayName;
24082
24084
  if (aggTypeDisplayName) {
24083
24085
  column1Title = `${column1Title} (${aggTypeDisplayName})`;
24084
24086
  }
@@ -24092,7 +24094,7 @@
24092
24094
  tooltipLine2 = `<div><strong>${column1Title}:</strong> ${column1Value}</div>`;
24093
24095
  }
24094
24096
  if (column2) {
24095
- const stringTitle = (_b = column2.tooltipTitle) != null ? _b : column2.display_name;
24097
+ const stringTitle = (_b2 = column2.tooltipTitle) != null ? _b2 : column2.display_name;
24096
24098
  const stringValue = formatElement({
24097
24099
  element: row[colIndex2],
24098
24100
  column: column2,
@@ -24113,9 +24115,9 @@
24113
24115
  }
24114
24116
  };
24115
24117
  var getFilterDrilldown = ({ stringColumnIndex, row, json }) => {
24116
- var _a;
24118
+ var _a2;
24117
24119
  try {
24118
- const filteredRows = (_a = json.data.data.rows) == null ? void 0 : _a.filter((origRow) => {
24120
+ const filteredRows = (_a2 = json.data.data.rows) == null ? void 0 : _a2.filter((origRow) => {
24119
24121
  return `${origRow[stringColumnIndex]}` === `${row[stringColumnIndex]}`;
24120
24122
  });
24121
24123
  const drilldownResponse = (0, import_lodash8.default)(json);
@@ -24154,8 +24156,8 @@
24154
24156
  };
24155
24157
  };
24156
24158
  var getCombinedFilters = (newFilter, response, formattedTableParams) => {
24157
- var _a, _b, _c, _d;
24158
- const queryRequestData = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.fe_req;
24159
+ var _a2, _b2, _c, _d;
24160
+ const queryRequestData = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.fe_req;
24159
24161
  const queryFilters = (_c = queryRequestData == null ? void 0 : queryRequestData.filters) != null ? _c : [];
24160
24162
  const tableFilters = (_d = formattedTableParams == null ? void 0 : formattedTableParams.filters) != null ? _d : [];
24161
24163
  const allFilters = [];
@@ -24184,8 +24186,8 @@
24184
24186
  }
24185
24187
  }
24186
24188
  return allFilters.map((filter3) => {
24187
- var _a2, _b2, _c2;
24188
- const foundColumn = (_c2 = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) == null ? void 0 : _c2.find((column) => column.name === filter3.name);
24189
+ var _a3, _b3, _c2;
24190
+ const foundColumn = (_c2 = (_b3 = (_a3 = response == null ? void 0 : response.data) == null ? void 0 : _a3.data) == null ? void 0 : _b3.columns) == null ? void 0 : _c2.find((column) => column.name === filter3.name);
24189
24191
  return {
24190
24192
  ...filter3,
24191
24193
  columnName: foundColumn == null ? void 0 : foundColumn.title
@@ -24236,11 +24238,11 @@
24236
24238
  }
24237
24239
  const allAggTypesSame = numberColumns.every((col) => col.aggType === numberColumns[0].aggType);
24238
24240
  const legendLabels = numberColumnIndices.map((columnIndex, i) => {
24239
- var _a;
24241
+ var _a2;
24240
24242
  const column = columns[columnIndex];
24241
24243
  let label = column.display_name;
24242
24244
  if (!allAggTypesSame) {
24243
- const aggTypeDisplayName = (_a = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a.displayName;
24245
+ const aggTypeDisplayName = (_a2 = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a2.displayName;
24244
24246
  if (aggTypeDisplayName) {
24245
24247
  label = `${label} (${aggTypeDisplayName})`;
24246
24248
  }
@@ -24312,14 +24314,14 @@
24312
24314
  data.forEach((row) => {
24313
24315
  const label = `${row[stringColumnIndex]}`;
24314
24316
  numberColumnIndices.forEach((colIndex) => {
24315
- var _a;
24317
+ var _a2;
24316
24318
  const rawValue = row[colIndex];
24317
24319
  let value = Number(rawValue);
24318
24320
  if (isNaN(value)) {
24319
24321
  value = 0;
24320
24322
  }
24321
24323
  const sumsObject = value >= 0 ? positiveSumsObject : negativeSumsObject;
24322
- const previousValue = (_a = sumsObject[label]) != null ? _a : 0;
24324
+ const previousValue = (_a2 = sumsObject[label]) != null ? _a2 : 0;
24323
24325
  sumsObject[label] = previousValue + value;
24324
24326
  });
24325
24327
  });
@@ -24347,8 +24349,8 @@
24347
24349
  return Object.keys(obj).length;
24348
24350
  };
24349
24351
  var getMaxValueFromKeyValueObj = (obj) => {
24350
- var _a;
24351
- const size = (_a = getObjSize(obj)) != null ? _a : 0;
24352
+ var _a2;
24353
+ const size = (_a2 = getObjSize(obj)) != null ? _a2 : 0;
24352
24354
  let maxValue = 0;
24353
24355
  if (size === 1) {
24354
24356
  maxValue = obj[Object.keys(obj)[0]];
@@ -24361,8 +24363,8 @@
24361
24363
  return maxValue;
24362
24364
  };
24363
24365
  var getMinValueFromKeyValueObj = (obj) => {
24364
- var _a;
24365
- const size = (_a = getObjSize(obj)) != null ? _a : 0;
24366
+ var _a2;
24367
+ const size = (_a2 = getObjSize(obj)) != null ? _a2 : 0;
24366
24368
  let minValue = 0;
24367
24369
  if (size === 1) {
24368
24370
  minValue = obj[Object.keys(obj)[0]];
@@ -24496,7 +24498,7 @@
24496
24498
  changeStringColumnIndices,
24497
24499
  originalColumns
24498
24500
  }) => {
24499
- var _a, _b, _c, _d;
24501
+ var _a2, _b2, _c, _d;
24500
24502
  let error = false;
24501
24503
  const config = getDataFormatting(dataFormatting);
24502
24504
  const dateArray = data.map((d) => {
@@ -24543,9 +24545,9 @@
24543
24545
  scale.dataFormatting = config;
24544
24546
  scale.column = columns[columnIndex];
24545
24547
  scale.columnIndex = columnIndex;
24546
- scale.title = (_a = scale.column) == null ? void 0 : _a.display_name;
24548
+ scale.title = (_a2 = scale.column) == null ? void 0 : _a2.display_name;
24547
24549
  scale.fields = axisColumns;
24548
- const candidateStringIndices = (_b = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b.stringColumnIndices;
24550
+ const candidateStringIndices = (_b2 = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b2.stringColumnIndices;
24549
24551
  scale.allFields = candidateStringIndices;
24550
24552
  const nonStringColumns = (columns || []).filter(
24551
24553
  (col) => (col == null ? void 0 : col.type) && !["STRING" /* STRING */, "DATE_STRING" /* DATE_STRING */, "DATE" /* DATE */].includes(col.type)
@@ -24563,8 +24565,8 @@
24563
24565
  scale.changeColumnIndices = changeStringColumnIndices;
24564
24566
  scale.tickSize = 0;
24565
24567
  scale.getValue = (value) => {
24566
- var _a2;
24567
- return scale((_a2 = getDayJSObj({ value, column: scale.column })) == null ? void 0 : _a2.toDate());
24568
+ var _a3;
24569
+ return scale((_a3 = getDayJSObj({ value, column: scale.column })) == null ? void 0 : _a3.toDate());
24568
24570
  };
24569
24571
  return scale;
24570
24572
  };
@@ -24586,7 +24588,7 @@
24586
24588
  changeStringColumnIndices,
24587
24589
  originalColumns
24588
24590
  }) => {
24589
- var _a, _b, _c, _d;
24591
+ var _a2, _b2, _c, _d;
24590
24592
  const colIndex = columnIndex != null ? columnIndex : stringColumnIndex;
24591
24593
  const range2 = getRangeForAxis({ axis: axis2, height, width });
24592
24594
  const scaleDomain = domain != null ? domain : data.map((d) => `${d[colIndex]}`);
@@ -24597,9 +24599,9 @@
24597
24599
  scale.dataFormatting = getDataFormatting(dataFormatting);
24598
24600
  scale.column = column != null ? column : columns[colIndex];
24599
24601
  scale.columnIndex = colIndex;
24600
- scale.title = (_a = scale.column) == null ? void 0 : _a.display_name;
24602
+ scale.title = (_a2 = scale.column) == null ? void 0 : _a2.display_name;
24601
24603
  scale.fields = axisColumns;
24602
- const candidateStringIndices = (_b = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b.stringColumnIndices;
24604
+ const candidateStringIndices = (_b2 = getStringColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _b2.stringColumnIndices;
24603
24605
  scale.allFields = candidateStringIndices;
24604
24606
  scale.tickSize = scale.bandwidth();
24605
24607
  const nonStringColumns = (columns || []).filter(
@@ -24633,10 +24635,10 @@
24633
24635
  return ordinal().domain(values).range(colors);
24634
24636
  };
24635
24637
  var getColorScales = ({ numberColumnIndices, numberColumnIndices2, CSS_PREFIX, data, type }) => {
24636
- var _a;
24638
+ var _a2;
24637
24639
  const colorScales = { colorScale: void 0, colorScale2: void 0 };
24638
24640
  const { chartColors, chartColorsDark } = getChartColorVars(CSS_PREFIX);
24639
- const numSeries = (_a = numberColumnIndices == null ? void 0 : numberColumnIndices.length) != null ? _a : 1;
24641
+ const numSeries = (_a2 = numberColumnIndices == null ? void 0 : numberColumnIndices.length) != null ? _a2 : 1;
24640
24642
  const chartColors2 = rotateArray(chartColorsDark, -1 * numSeries);
24641
24643
  const legendUsesColumns = type !== "pie" /* PIE */;
24642
24644
  const domain = legendUsesColumns ? numberColumnIndices : data.map((d, i) => i);
@@ -24647,13 +24649,13 @@
24647
24649
  return colorScales;
24648
24650
  };
24649
24651
  var getUnitsForColumn = (column, useAgg = true) => {
24650
- var _a;
24652
+ var _a2;
24651
24653
  if (!column) {
24652
24654
  return;
24653
24655
  }
24654
24656
  let aggUnit;
24655
24657
  if (useAgg && column.aggType) {
24656
- aggUnit = (_a = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a.unit;
24658
+ aggUnit = (_a2 = AGG_TYPES[column == null ? void 0 : column.aggType]) == null ? void 0 : _a2.unit;
24657
24659
  }
24658
24660
  switch (aggUnit) {
24659
24661
  case "none": {
@@ -24688,14 +24690,14 @@
24688
24690
  aggregated = false,
24689
24691
  isDataAggregated = false
24690
24692
  }) => {
24691
- var _a, _b, _c;
24693
+ var _a2, _b2, _c;
24692
24694
  let title = "Amount";
24693
24695
  try {
24694
24696
  if (!(numberColumns == null ? void 0 : numberColumns.length)) {
24695
24697
  return void 0;
24696
24698
  }
24697
24699
  if (isDataAggregated) {
24698
- const origColumn = (_b = (_a = numberColumns[0]) == null ? void 0 : _a.origColumn) != null ? _b : numberColumns[0];
24700
+ const origColumn = (_b2 = (_a2 = numberColumns[0]) == null ? void 0 : _a2.origColumn) != null ? _b2 : numberColumns[0];
24699
24701
  if (origColumn == null ? void 0 : origColumn.display_name) {
24700
24702
  title = origColumn.display_name;
24701
24703
  }
@@ -24748,7 +24750,7 @@
24748
24750
  changeNumberColumnIndices,
24749
24751
  originalColumns
24750
24752
  }) => {
24751
- var _a, _b;
24753
+ var _a2, _b2;
24752
24754
  const { amountOfNumberColumns } = getColumnTypeAmounts(originalColumns != null ? originalColumns : columns);
24753
24755
  const domain = [bins[0], bins[bins.length - 1]];
24754
24756
  const range2 = getRangeForAxis({ axis: axis2, height, width });
@@ -24759,7 +24761,7 @@
24759
24761
  scale.maxValue = domain[1];
24760
24762
  scale.column = columns[columnIndex];
24761
24763
  scale.fields = [columnIndex];
24762
- scale.allFields = (_a = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a.allNumberColumnIndices;
24764
+ scale.allFields = (_a2 = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a2.allNumberColumnIndices;
24763
24765
  scale.columnIndex = columnIndex;
24764
24766
  scale.dataFormatting = {
24765
24767
  ...getDataFormatting(dataFormatting),
@@ -24768,7 +24770,7 @@
24768
24770
  scale.hasDropdown = enableAxisDropdown && amountOfNumberColumns > 1;
24769
24771
  scale.stacked = false;
24770
24772
  scale.units = getUnitsForColumn(columns[columnIndex], false);
24771
- scale.title = (_b = columns[columnIndex]) == null ? void 0 : _b.display_name;
24773
+ scale.title = (_b2 = columns[columnIndex]) == null ? void 0 : _b2.display_name;
24772
24774
  scale.tickSize = (axis2 === "x" ? innerWidth : innerHeight) / buckets.length;
24773
24775
  scale.isScaled = false;
24774
24776
  scale.aggregated = false;
@@ -24803,17 +24805,17 @@
24803
24805
  aggregated,
24804
24806
  isDataAggregated
24805
24807
  }) => {
24806
- var _a, _b, _c;
24808
+ var _a2, _b2, _c;
24807
24809
  const maxBins = (buckets == null ? void 0 : buckets.length) ? max(buckets, (d) => {
24808
- var _a2;
24809
- return (_a2 = d == null ? void 0 : d.length) != null ? _a2 : 0;
24810
+ var _a3;
24811
+ return (_a3 = d == null ? void 0 : d.length) != null ? _a3 : 0;
24810
24812
  }) : 1;
24811
24813
  const range2 = getRangeForAxis({ axis: axis2, height, width });
24812
24814
  const domain = [0, maxBins];
24813
24815
  const units = "none";
24814
24816
  const allowMultipleSeries = false;
24815
- const candidateNumberIndices = (_a = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a.allNumberColumnIndices;
24816
- const hasDropdown = enableAxisDropdown && ((_c = (_b = candidateNumberIndices == null ? void 0 : candidateNumberIndices.length) != null ? _b : columns == null ? void 0 : columns.length) != null ? _c : 0) > 1;
24817
+ const candidateNumberIndices = (_a2 = getNumberColumnIndices(originalColumns != null ? originalColumns : columns)) == null ? void 0 : _a2.allNumberColumnIndices;
24818
+ const hasDropdown = enableAxisDropdown && ((_c = (_b2 = candidateNumberIndices == null ? void 0 : candidateNumberIndices.length) != null ? _b2 : columns == null ? void 0 : columns.length) != null ? _c : 0) > 1;
24817
24819
  const disableAutoScale = true;
24818
24820
  const title = "Count";
24819
24821
  return getLinearScale({
@@ -24876,11 +24878,11 @@
24876
24878
  originalColumns,
24877
24879
  isDataAggregated
24878
24880
  }) => {
24879
- var _a, _b, _c, _d, _e, _f, _g;
24881
+ var _a2, _b2, _c, _d, _e, _f, _g;
24880
24882
  let domainFinal = domain;
24881
24883
  if (!domain) {
24882
- let min2 = (_a = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a : 0;
24883
- let max2 = (_b = maxValue != null ? maxValue : tickValues == null ? void 0 : tickValues[(tickValues == null ? void 0 : tickValues.length) - 1]) != null ? _b : 0;
24884
+ let min2 = (_a2 = minValue != null ? minValue : tickValues == null ? void 0 : tickValues[0]) != null ? _a2 : 0;
24885
+ let max2 = (_b2 = maxValue != null ? maxValue : tickValues == null ? void 0 : tickValues[(tickValues == null ? void 0 : tickValues.length) - 1]) != null ? _b2 : 0;
24884
24886
  if (adjustRange) {
24885
24887
  const { newMinValue, newMaxValue } = adjustMinAndMaxForScaleRatio(min2, max2, isScaled);
24886
24888
  if (newMinValue) min2 = newMinValue;
@@ -24959,7 +24961,7 @@
24959
24961
  colorScales,
24960
24962
  isDataAggregated
24961
24963
  }) => {
24962
- var _a, _b;
24964
+ var _a2, _b2;
24963
24965
  const commonParams = {
24964
24966
  stacked,
24965
24967
  isScaled,
@@ -25016,7 +25018,7 @@
25016
25018
  maxValue: maxValue2,
25017
25019
  disableAutoScale: disableAutoScale != null ? disableAutoScale : disableScale2,
25018
25020
  range: tempScale1.range(),
25019
- numTicks: (_b = (_a = tempScale1.tickLabels) == null ? void 0 : _a.length) != null ? _b : void 0,
25021
+ numTicks: (_b2 = (_a2 = tempScale1.tickLabels) == null ? void 0 : _a2.length) != null ? _b2 : void 0,
25020
25022
  ...scaleColumnConfig2,
25021
25023
  ...commonParams
25022
25024
  });
@@ -25082,7 +25084,7 @@
25082
25084
  return date2;
25083
25085
  };
25084
25086
  var getNiceDateTickValues = ({ tickValues, scale }) => {
25085
- var _a;
25087
+ var _a2;
25086
25088
  try {
25087
25089
  if ((tickValues == null ? void 0 : tickValues.length) < 2) {
25088
25090
  return tickValues;
@@ -25098,7 +25100,7 @@
25098
25100
  }
25099
25101
  const newTickValues = [...tickValues];
25100
25102
  const tickRange = getEpochFromDate(tickValues[1]) - getEpochFromDate(tickValues[0]);
25101
- const dayjsPrecision = DAYJS_PRECISION_FORMATS[(_a = scale == null ? void 0 : scale.column) == null ? void 0 : _a.precision];
25103
+ const dayjsPrecision = DAYJS_PRECISION_FORMATS[(_a2 = scale == null ? void 0 : scale.column) == null ? void 0 : _a2.precision];
25102
25104
  const minTickValue = getEpochFromDate(tickValues[0], dayjsPrecision, "start");
25103
25105
  const maxTickValue = getEpochFromDate(tickValues[tickValues.length - 1], dayjsPrecision, "end");
25104
25106
  if (!tickRange || isNaN(minTickValue) || isNaN(maxTickValue)) {
@@ -25162,9 +25164,9 @@
25162
25164
  innerPadding = DEFAULT_INNER_PADDING,
25163
25165
  outerPadding = DEFAULT_OUTER_PADDING
25164
25166
  }) => {
25165
- var _a, _b, _c, _d;
25167
+ var _a2, _b2, _c, _d;
25166
25168
  const fontSize = 12;
25167
- const rangeStart = (_b = (_a = scale == null ? void 0 : scale.range()) == null ? void 0 : _a[1]) != null ? _b : 0;
25169
+ const rangeStart = (_b2 = (_a2 = scale == null ? void 0 : scale.range()) == null ? void 0 : _a2[1]) != null ? _b2 : 0;
25168
25170
  const rangeEnd = (_d = (_c = scale == null ? void 0 : scale.range()) == null ? void 0 : _c[0]) != null ? _d : 0;
25169
25171
  const fullSize = Math.abs(rangeEnd - rangeStart) + fontSize;
25170
25172
  if (scale.type !== "BAND") {
@@ -25182,7 +25184,7 @@
25182
25184
  innerPadding = DEFAULT_INNER_PADDING,
25183
25185
  outerPadding = DEFAULT_OUTER_PADDING
25184
25186
  }) => {
25185
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
25187
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
25186
25188
  try {
25187
25189
  let tickValues = scale.tickLabels;
25188
25190
  if (initialTicks) {
@@ -25191,7 +25193,7 @@
25191
25193
  tickValues = scale.ticks(numTicks);
25192
25194
  }
25193
25195
  if (scale.type === "LINEAR" || scale.type === "BIN") {
25194
- const domainRange = ((_c = (_b = scale == null ? void 0 : scale.maxValue) != null ? _b : (_a = scale == null ? void 0 : scale.domain) == null ? void 0 : _a[1]) != null ? _c : 0) - ((_f = (_e = scale == null ? void 0 : scale.minValue) != null ? _e : (_d = scale == null ? void 0 : scale.domain) == null ? void 0 : _d[0]) != null ? _f : 0);
25196
+ const domainRange = ((_c = (_b2 = scale == null ? void 0 : scale.maxValue) != null ? _b2 : (_a2 = scale == null ? void 0 : scale.domain) == null ? void 0 : _a2[1]) != null ? _c : 0) - ((_f = (_e = scale == null ? void 0 : scale.minValue) != null ? _e : (_d = scale == null ? void 0 : scale.domain) == null ? void 0 : _d[0]) != null ? _f : 0);
25195
25197
  if (domainRange >= 2 && tickValues.length > domainRange) {
25196
25198
  tickValues = scale.ticks(domainRange);
25197
25199
  }
@@ -25321,7 +25323,7 @@
25321
25323
  return rowNumberList;
25322
25324
  };
25323
25325
  var getAxisLabelsBbox = (axisElement) => {
25324
- var _a;
25326
+ var _a2;
25325
25327
  if (!axisElement) {
25326
25328
  return;
25327
25329
  }
@@ -25337,7 +25339,7 @@
25337
25339
  yDiff = (axisBoundingRect == null ? void 0 : axisBoundingRect.y) - (axisBBox == null ? void 0 : axisBBox.y);
25338
25340
  }
25339
25341
  const labelBboxes = [];
25340
- (_a = selectedElement.selectAll) == null ? void 0 : _a.call(selectedElement, "g.tick text").each(function() {
25342
+ (_a2 = selectedElement.selectAll) == null ? void 0 : _a2.call(selectedElement, "g.tick text").each(function() {
25341
25343
  const textBoundingRect = select_default2(this).node().getBoundingClientRect();
25342
25344
  labelBboxes.push({
25343
25345
  left: textBoundingRect.left - xDiff,
@@ -25357,23 +25359,23 @@
25357
25359
  return;
25358
25360
  };
25359
25361
  var getTotalLeftPadding = (legendPadding = {}) => {
25360
- var _a;
25361
- return ((_a = legendPadding.left) != null ? _a : DEFAULT_LEGEND_PADDING_LEFT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25362
+ var _a2;
25363
+ return ((_a2 = legendPadding.left) != null ? _a2 : DEFAULT_LEGEND_PADDING_LEFT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25362
25364
  };
25363
25365
  var getTotalRightPadding = (legendPadding = {}) => {
25364
- var _a;
25365
- return ((_a = legendPadding.right) != null ? _a : DEFAULT_LEGEND_PADDING_RIGHT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25366
+ var _a2;
25367
+ return ((_a2 = legendPadding.right) != null ? _a2 : DEFAULT_LEGEND_PADDING_RIGHT) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25366
25368
  };
25367
25369
  var getTotalHorizontalPadding = (legendPadding = {}) => {
25368
25370
  return getTotalLeftPadding(legendPadding) + getTotalRightPadding(legendPadding);
25369
25371
  };
25370
25372
  var getTotalBottomPadding = (legendPadding = {}) => {
25371
- var _a;
25372
- return ((_a = legendPadding.bottom) != null ? _a : DEFAULT_LEGEND_PADDING_BOTTOM) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25373
+ var _a2;
25374
+ return ((_a2 = legendPadding.bottom) != null ? _a2 : DEFAULT_LEGEND_PADDING_BOTTOM) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25373
25375
  };
25374
25376
  var getTotalTopPadding = (legendPadding = {}) => {
25375
- var _a;
25376
- return ((_a = legendPadding.top) != null ? _a : DEFAULT_LEGEND_PADDING_TOP) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25377
+ var _a2;
25378
+ return ((_a2 = legendPadding.top) != null ? _a2 : DEFAULT_LEGEND_PADDING_TOP) + LEGEND_BORDER_PADDING + LEGEND_BORDER_THICKNESS;
25377
25379
  };
25378
25380
  var getTotalVerticalPadding = (legendPadding = {}) => {
25379
25381
  return getTotalBottomPadding(legendPadding) + getTotalTopPadding(legendPadding);
@@ -25417,11 +25419,11 @@
25417
25419
  return totalPossibleSections;
25418
25420
  };
25419
25421
  var distributeListsEvenly = (list1Orig, list2Orig, numSections) => {
25420
- var _a, _b;
25422
+ var _a2, _b2;
25421
25423
  const list1 = (0, import_lodash8.default)(list1Orig);
25422
25424
  const list2 = (0, import_lodash8.default)(list2Orig);
25423
- const list1Size = (_a = list1 == null ? void 0 : list1.length) != null ? _a : 0;
25424
- const list2Size = (_b = list2 == null ? void 0 : list2.length) != null ? _b : 0;
25425
+ const list1Size = (_a2 = list1 == null ? void 0 : list1.length) != null ? _a2 : 0;
25426
+ const list2Size = (_b2 = list2 == null ? void 0 : list2.length) != null ? _b2 : 0;
25425
25427
  const totalSize = list1Size + list2Size;
25426
25428
  const list1Distribution = list1Size / totalSize;
25427
25429
  let list1NumSections = Math.round(list1Distribution * numSections);
@@ -25450,7 +25452,7 @@
25450
25452
  return sections;
25451
25453
  };
25452
25454
  var getlegendLabelSections = ({ orientation, outerWidth, hasSecondAxis, labels, labels2, legendPadding }) => {
25453
- var _a, _b;
25455
+ var _a2, _b2;
25454
25456
  const totalPossibleSections = getTotalPossibleLegendSections({
25455
25457
  orientation,
25456
25458
  outerWidth,
@@ -25458,8 +25460,8 @@
25458
25460
  legendPadding
25459
25461
  });
25460
25462
  let totalSections = totalPossibleSections;
25461
- const legendLabels1Size = (_a = labels == null ? void 0 : labels.length) != null ? _a : 0;
25462
- const legendLabels2Size = (_b = labels2 == null ? void 0 : labels2.length) != null ? _b : 0;
25463
+ const legendLabels1Size = (_a2 = labels == null ? void 0 : labels.length) != null ? _a2 : 0;
25464
+ const legendLabels2Size = (_b2 = labels2 == null ? void 0 : labels2.length) != null ? _b2 : 0;
25463
25465
  const totalLabels = legendLabels1Size + legendLabels2Size;
25464
25466
  if (totalLabels < totalPossibleSections) {
25465
25467
  totalSections = totalLabels;
@@ -25500,19 +25502,19 @@
25500
25502
  return titleBBox;
25501
25503
  };
25502
25504
  var removeHiddenLegendLabels = ({ legendElement, legendBorder, chartTooltipID }) => {
25503
- var _a, _b;
25505
+ var _a2, _b2;
25504
25506
  const legendContainerBBox = legendBorder == null ? void 0 : legendBorder.getBoundingClientRect();
25505
- const legendBottom = ((_a = legendContainerBBox == null ? void 0 : legendContainerBBox.y) != null ? _a : 0) + ((_b = legendContainerBBox == null ? void 0 : legendContainerBBox.height) != null ? _b : 0) - LEGEND_BORDER_PADDING;
25507
+ const legendBottom = ((_a2 = legendContainerBBox == null ? void 0 : legendContainerBBox.y) != null ? _a2 : 0) + ((_b2 = legendContainerBBox == null ? void 0 : legendContainerBBox.height) != null ? _b2 : 0) - LEGEND_BORDER_PADDING;
25506
25508
  let hasRemovedElement = false;
25507
25509
  let removedElementYBottom = void 0;
25508
25510
  let removedElementTransform = void 0;
25509
25511
  select_default2(legendElement).selectAll(".cell").each(function() {
25510
- var _a2, _b2, _c, _d;
25512
+ var _a3, _b3, _c, _d;
25511
25513
  if (hasRemovedElement) {
25512
25514
  select_default2(this).remove();
25513
25515
  } else {
25514
25516
  const cellBBox = this.getBoundingClientRect();
25515
- const cellBottom = ((_a2 = cellBBox == null ? void 0 : cellBBox.y) != null ? _a2 : 0) + ((_b2 = cellBBox == null ? void 0 : cellBBox.height) != null ? _b2 : 0) - 2;
25517
+ const cellBottom = ((_a3 = cellBBox == null ? void 0 : cellBBox.y) != null ? _a3 : 0) + ((_b3 = cellBBox == null ? void 0 : cellBBox.height) != null ? _b3 : 0) - 2;
25516
25518
  if (cellBottom > legendBottom) {
25517
25519
  const bbox = this.getBBox();
25518
25520
  removedElementYBottom = ((_c = bbox == null ? void 0 : bbox.y) != null ? _c : 0) + ((_d = bbox == null ? void 0 : bbox.height) != null ? _d : 0);
@@ -25531,8 +25533,8 @@
25531
25533
  var applyStylesForHiddenSeries = ({ legendElement, legendLabels }) => {
25532
25534
  try {
25533
25535
  select_default2(legendElement).selectAll(".cell").each(function() {
25534
- var _a, _b;
25535
- const cellData = JSON.parse((_b = (_a = select_default2(this)) == null ? void 0 : _a.data) == null ? void 0 : _b.call(_a));
25536
+ var _a2, _b2;
25537
+ const cellData = JSON.parse((_b2 = (_a2 = select_default2(this)) == null ? void 0 : _a2.data) == null ? void 0 : _b2.call(_a2));
25536
25538
  const legendLabel = legendLabels == null ? void 0 : legendLabels.find((l) => l.label === (cellData == null ? void 0 : cellData.label));
25537
25539
  if (legendLabel) {
25538
25540
  select_default2(this).select(".swatch").attr("stroke", legendLabel.color).attr("stroke-location", "outside");
@@ -25557,8 +25559,8 @@
25557
25559
  ...d,
25558
25560
  legendLabel: legendLabels == null ? void 0 : legendLabels[i]
25559
25561
  })).filter((d) => {
25560
- var _a;
25561
- return !((_a = d == null ? void 0 : d.legendLabel) == null ? void 0 : _a.hidden);
25562
+ var _a2;
25563
+ return !((_a2 = d == null ? void 0 : d.legendLabel) == null ? void 0 : _a2.hidden);
25562
25564
  })
25563
25565
  )
25564
25566
  );
@@ -25597,15 +25599,15 @@
25597
25599
  return initialBucketSize;
25598
25600
  };
25599
25601
  var getBinData = ({ newBucketSize, bucketConfig, data, numberColumnIndex }) => {
25600
- var _a, _b, _c, _d;
25602
+ var _a2, _b2, _c, _d;
25601
25603
  let minValue = min(data, (d) => convertToNumber(d[numberColumnIndex]));
25602
25604
  let maxValue = max(data, (d) => convertToNumber(d[numberColumnIndex]));
25603
25605
  if (minValue === maxValue) {
25604
25606
  minValue = minValue - 1;
25605
25607
  maxValue = maxValue + 1;
25606
25608
  }
25607
- const maxBucketSizeRaw = (maxValue - minValue) / ((_a = bucketConfig.minNumBuckets) != null ? _a : 1);
25608
- const minBucketSizeRaw = (maxValue - minValue) / ((_b = bucketConfig.maxNumBuckets) != null ? _b : 1);
25609
+ const maxBucketSizeRaw = (maxValue - minValue) / ((_a2 = bucketConfig.minNumBuckets) != null ? _a2 : 1);
25610
+ const minBucketSizeRaw = (maxValue - minValue) / ((_b2 = bucketConfig.maxNumBuckets) != null ? _b2 : 1);
25609
25611
  const bucketSizeRange = maxBucketSizeRaw - minBucketSizeRaw;
25610
25612
  if (bucketSizeRange <= 10) {
25611
25613
  const avgNumSteps = 100;
@@ -25821,7 +25823,7 @@
25821
25823
  innerHeight,
25822
25824
  maxLabelWidth
25823
25825
  } = {}) => {
25824
- var _a, _b;
25826
+ var _a2, _b2;
25825
25827
  if (!axis2 || !axis2.scale()) {
25826
25828
  return;
25827
25829
  }
@@ -25832,7 +25834,7 @@
25832
25834
  }
25833
25835
  return d;
25834
25836
  });
25835
- if ((_b = (_a = axis2.scale()) == null ? void 0 : _a.tickLabels) == null ? void 0 : _b.length) {
25837
+ if ((_b2 = (_a2 = axis2.scale()) == null ? void 0 : _a2.tickLabels) == null ? void 0 : _b2.length) {
25836
25838
  axis2.tickValues(axis2.scale().tickLabels);
25837
25839
  }
25838
25840
  setTickSize({ axis: axis2, innerWidth, innerHeight });
@@ -25908,7 +25910,7 @@
25908
25910
  deltaX,
25909
25911
  chartPadding = 0
25910
25912
  } = {}, CSS_PREFIX = DEFAULT_CSS_PREFIX) => {
25911
- var _a, _b, _c;
25913
+ var _a2, _b2, _c;
25912
25914
  if (!titleElement || !labelsBBox || !innerWidth || !outerWidth) {
25913
25915
  console.warn("Unable to adjust bottom title - one of the following were not provided", {
25914
25916
  titleElement: !!titleElement,
@@ -25918,7 +25920,7 @@
25918
25920
  });
25919
25921
  return;
25920
25922
  }
25921
- const labelBBoxBottom = ((_a = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a : 0) + ((_b = labelsBBox == null ? void 0 : labelsBBox.height) != null ? _b : 0);
25923
+ const labelBBoxBottom = ((_a2 = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a2 : 0) + ((_b2 = labelsBBox == null ? void 0 : labelsBBox.height) != null ? _b2 : 0);
25922
25924
  const xLabelX = innerWidth / 2;
25923
25925
  const xLabelY = labelBBoxBottom + AXIS_TITLE_PADDING_TOP;
25924
25926
  select_default2(titleElement).attr("x", xLabelX).attr("y", xLabelY);
@@ -25946,11 +25948,11 @@
25946
25948
  labelsBBox,
25947
25949
  innerWidth
25948
25950
  } = {}) => {
25949
- var _a;
25951
+ var _a2;
25950
25952
  if (!innerWidth || !labelsBBox) {
25951
25953
  return;
25952
25954
  }
25953
- const labelBBoxTop = (_a = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a : 0;
25955
+ const labelBBoxTop = (_a2 = labelsBBox == null ? void 0 : labelsBBox.y) != null ? _a2 : 0;
25954
25956
  const xLabelX = innerWidth / 2;
25955
25957
  const xLabelY = labelBBoxTop - AXIS_TITLE_PADDING_TOP;
25956
25958
  select_default2(titleElement).attr("x", xLabelX).attr("y", xLabelY);
@@ -25959,7 +25961,7 @@
25959
25961
  deltaY,
25960
25962
  chartPadding = 0
25961
25963
  } = {}, CSS_PREFIX = DEFAULT_CSS_PREFIX) => {
25962
- var _a;
25964
+ var _a2;
25963
25965
  if (deltaY === void 0 || !titleElement) {
25964
25966
  return;
25965
25967
  }
@@ -25967,7 +25969,7 @@
25967
25969
  const chartContainerHeight = outerHeight - 2 * chartPadding;
25968
25970
  textElement.attr("textLength", null);
25969
25971
  const yTitleBBox = titleElement.getBBox();
25970
- const yTitleHeight = ((_a = yTitleBBox.height) != null ? _a : 0) + 2 * AXIS_TITLE_BORDER_PADDING_LEFT;
25972
+ const yTitleHeight = ((_a2 = yTitleBBox.height) != null ? _a2 : 0) + 2 * AXIS_TITLE_BORDER_PADDING_LEFT;
25971
25973
  if (yTitleHeight > chartContainerHeight) {
25972
25974
  let textLength = Math.floor(chartContainerHeight) - 2 * AXIS_TITLE_BORDER_PADDING_LEFT;
25973
25975
  if (textLength < 0) {
@@ -25993,7 +25995,7 @@
25993
25995
 
25994
25996
  // src/Charts/chartElementArrays.ts
25995
25997
  var getHistogramColumnObj = ({ xScale, yScale, index, d, activeKey }) => {
25996
- var _a;
25998
+ var _a2;
25997
25999
  if (!d) {
25998
26000
  return null;
25999
26001
  }
@@ -26017,7 +26019,7 @@
26017
26019
  const drilldownData = {
26018
26020
  activeKey: key,
26019
26021
  filter: {
26020
- name: (_a = xScale == null ? void 0 : xScale.column) == null ? void 0 : _a.name,
26022
+ name: (_a2 = xScale == null ? void 0 : xScale.column) == null ? void 0 : _a2.name,
26021
26023
  value: `${d.x0},${d.x1}`,
26022
26024
  operator: "between" /* BETWEEN */,
26023
26025
  column_type: "AMOUNT"
@@ -26256,9 +26258,9 @@
26256
26258
  prevY,
26257
26259
  prevHeight = 0
26258
26260
  }) => {
26259
- var _a;
26261
+ var _a2;
26260
26262
  const { stringColumnIndex } = columnIndexConfig;
26261
- const color3 = (_a = yScale.colorScale) == null ? void 0 : _a.call(yScale, colIndex);
26263
+ const color3 = (_a2 = yScale.colorScale) == null ? void 0 : _a2.call(yScale, colIndex);
26262
26264
  const value = d[colIndex];
26263
26265
  if (!value) {
26264
26266
  return null;
@@ -26324,9 +26326,9 @@
26324
26326
  prevX,
26325
26327
  prevWidth = 0
26326
26328
  }) => {
26327
- var _a;
26329
+ var _a2;
26328
26330
  const { stringColumnIndex } = columnIndexConfig;
26329
- const color3 = (_a = xScale.colorScale) == null ? void 0 : _a.call(xScale, colIndex);
26331
+ const color3 = (_a2 = xScale.colorScale) == null ? void 0 : _a2.call(xScale, colIndex);
26330
26332
  const value = d[colIndex];
26331
26333
  if (!value) {
26332
26334
  return null;
@@ -26378,16 +26380,16 @@
26378
26380
  columns,
26379
26381
  hasSecondAxis
26380
26382
  }) => {
26381
- var _a, _b, _c;
26383
+ var _a2, _b2, _c;
26382
26384
  if (isDataAggregated) {
26383
- return (_a = legendColumn == null ? void 0 : legendColumn.display_name) != null ? _a : "Legend";
26385
+ return (_a2 = legendColumn == null ? void 0 : legendColumn.display_name) != null ? _a2 : "Legend";
26384
26386
  }
26385
26387
  let title = "Fields";
26386
26388
  const legendColumns = columnIndices.map((index) => columns[index]);
26387
26389
  const columnTypeArray = columnIndices.map((index) => columns[index].type);
26388
26390
  const allTypesEqual = !columnTypeArray.find((type) => type !== columnTypeArray[0]);
26389
26391
  if (hasSecondAxis && allTypesEqual) {
26390
- const columnTypeName = (_b = COLUMN_TYPES[columnTypeArray[0]]) == null ? void 0 : _b.description;
26392
+ const columnTypeName = (_b2 = COLUMN_TYPES[columnTypeArray[0]]) == null ? void 0 : _b2.description;
26391
26393
  if (columnTypeName) {
26392
26394
  title = `${columnTypeName} ${title}`;
26393
26395
  }
@@ -29989,8 +29991,8 @@
29989
29991
  }
29990
29992
  };
29991
29993
  var factory = (env) => {
29992
- var _a;
29993
- const globalObject = (_a = utils_default.global) != null ? _a : globalThis;
29994
+ var _a2;
29995
+ const globalObject = (_a2 = utils_default.global) != null ? _a2 : globalThis;
29994
29996
  const { ReadableStream: ReadableStream2, TextEncoder: TextEncoder2 } = globalObject;
29995
29997
  env = utils_default.merge.call(
29996
29998
  {
@@ -30928,9 +30930,9 @@
30928
30930
  clickedFilter,
30929
30931
  ...args
30930
30932
  }) => {
30931
- var _a, _b;
30933
+ var _a2, _b2;
30932
30934
  try {
30933
- const queryRequestData = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.fe_req;
30935
+ const queryRequestData = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.fe_req;
30934
30936
  const allFilters = getCombinedFilters(clickedFilter, response, formattedTableParams);
30935
30937
  const queryParams = {
30936
30938
  ...authentication,
@@ -30963,9 +30965,9 @@
30963
30965
  };
30964
30966
  };
30965
30967
  var transformQueryResponse = (response, originalQueryID, isDrilldown2 = false, newColumns) => {
30966
- var _a, _b;
30968
+ var _a2, _b2;
30967
30969
  const transformedResponse = (0, import_lodash9.default)(response);
30968
- if ((_b = (_a = transformedResponse == null ? void 0 : transformedResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns) {
30970
+ if ((_b2 = (_a2 = transformedResponse == null ? void 0 : transformedResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns) {
30969
30971
  const transformedColumns = transformQueryResponseColumns(transformedResponse, newColumns);
30970
30972
  if (transformedColumns) {
30971
30973
  transformedResponse.data.data.columns = transformedColumns;
@@ -30981,21 +30983,21 @@
30981
30983
  return transformedResponse;
30982
30984
  };
30983
30985
  var transformQueryResponseColumns = (response, addedColumns) => {
30984
- var _a, _b;
30985
- const columns = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.columns;
30986
+ var _a2, _b2;
30987
+ const columns = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.columns;
30986
30988
  if (!(columns == null ? void 0 : columns.length)) {
30987
30989
  return columns;
30988
30990
  }
30989
30991
  const isSingleValue = isSingleValueResponse(response);
30990
30992
  const transformedColumns = columns.map((col, i) => {
30991
- var _a2, _b2, _c, _d;
30992
- const dataSample = (_d = (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.rows) == null ? void 0 : _c.find((row) => row[i])) == null ? void 0 : _d[i];
30993
+ var _a3, _b3, _c, _d;
30994
+ const dataSample = (_d = (_c = (_b3 = (_a3 = response == null ? void 0 : response.data) == null ? void 0 : _a3.data) == null ? void 0 : _b3.rows) == null ? void 0 : _c.find((row) => row[i])) == null ? void 0 : _d[i];
30993
30995
  const drilldownGroupby = getDrilldownGroupby(response, col);
30994
30996
  let additional = false;
30995
30997
  let is_timestamp = false;
30996
30998
  if (addedColumns == null ? void 0 : addedColumns.find((select) => {
30997
- var _a3;
30998
- return select.columns.includes((_a3 = col.alt_name) != null ? _a3 : col.name);
30999
+ var _a4;
31000
+ return select.columns.includes((_a4 = col.alt_name) != null ? _a4 : col.name);
30999
31001
  })) {
31000
31002
  additional = true;
31001
31003
  }
@@ -31024,14 +31026,14 @@
31024
31026
  return { data: { message } };
31025
31027
  };
31026
31028
  var formatErrorResponse = (error) => {
31027
- var _a, _b, _c;
31029
+ var _a2, _b2, _c;
31028
31030
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
31029
31031
  return Promise.reject(createErrorMessage(REQUEST_CANCELLED_ERROR));
31030
31032
  }
31031
31033
  if ((error == null ? void 0 : error.message) === "Parse error" /* PARSE_ERROR */) {
31032
31034
  return Promise.reject(createErrorMessage(GENERAL_QUERY_ERROR));
31033
31035
  }
31034
- if ((_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.message) {
31036
+ if ((_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.message) {
31035
31037
  return Promise.reject(error == null ? void 0 : error.response);
31036
31038
  }
31037
31039
  const errorStatus = (_c = error == null ? void 0 : error.response) == null ? void 0 : _c.status;
@@ -31055,11 +31057,11 @@
31055
31057
  }
31056
31058
  const finalUserSelection = [];
31057
31059
  userSelection.forEach((suggestion) => {
31058
- var _a, _b, _c;
31060
+ var _a2, _b2, _c;
31059
31061
  if (!suggestion.hidden) {
31060
31062
  finalUserSelection.push({
31061
- start: (_a = suggestion.start) != null ? _a : 0,
31062
- end: (_b = suggestion.end) != null ? _b : 0,
31063
+ start: (_a2 = suggestion.start) != null ? _a2 : 0,
31064
+ end: (_b2 = suggestion.end) != null ? _b2 : 0,
31063
31065
  value: (_c = suggestion.text || suggestion.value || suggestion.format_txt) == null ? void 0 : _c.toLowerCase(),
31064
31066
  value_label: suggestion.value_label || suggestion.show_message || suggestion.display_name || "ORIGINAL_TEXT",
31065
31067
  canonical: suggestion.canonical || suggestion.key || "ORIGINAL_TEXT"
@@ -31090,8 +31092,8 @@
31090
31092
  return timeZone;
31091
31093
  };
31092
31094
  var failedValidation = (response) => {
31093
- var _a, _b, _c;
31094
- return ((_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.replacements) == null ? void 0 : _c.length) > 0;
31095
+ var _a2, _b2, _c;
31096
+ return ((_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.replacements) == null ? void 0 : _c.length) > 0;
31095
31097
  };
31096
31098
  var fetchSuggestions = ({
31097
31099
  query,
@@ -31150,14 +31152,14 @@
31150
31152
  cancelToken
31151
31153
  );
31152
31154
  return axios_default.post(url2, data, config).then((response) => {
31153
- var _a, _b;
31155
+ var _a2, _b2;
31154
31156
  if (response.data && typeof response.data === "string") {
31155
31157
  throw new Error("Parse error" /* PARSE_ERROR */);
31156
31158
  }
31157
- if ((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) {
31159
+ if ((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) {
31158
31160
  response.data.data.page = page;
31159
31161
  }
31160
- return Promise.resolve((_b = response == null ? void 0 : response.data) == null ? void 0 : _b.data);
31162
+ return Promise.resolve((_b2 = response == null ? void 0 : response.data) == null ? void 0 : _b2.data);
31161
31163
  }).catch((error) => formatErrorResponse(error));
31162
31164
  };
31163
31165
  var runQueryOnly = ({
@@ -31219,14 +31221,14 @@
31219
31221
  cancelToken
31220
31222
  );
31221
31223
  return axios_default.post(url2, data, config).then((response) => {
31222
- var _a;
31223
- if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
31224
+ var _a2;
31225
+ if (!((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data)) {
31224
31226
  throw new Error("Parse error" /* PARSE_ERROR */);
31225
31227
  }
31226
31228
  return Promise.resolve(transformQueryResponse(response, void 0, void 0, newColumns));
31227
31229
  }).catch((error) => {
31228
- var _a, _b, _c, _d, _e;
31229
- const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;
31230
+ var _a2, _b2, _c, _d, _e;
31231
+ const referenceId = (_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.reference_id;
31230
31232
  const isSubquery = (tableFilters == null ? void 0 : tableFilters.length) || (orders == null ? void 0 : orders.length);
31231
31233
  const needsSuggestions = referenceId === "1.1.430" || referenceId === "1.1.431" || isError500Type(referenceId);
31232
31234
  if (needsSuggestions && allowSuggestions && !isSubquery) {
@@ -31372,14 +31374,14 @@
31372
31374
  }
31373
31375
  };
31374
31376
  return axios_default.get(url2, config).then((response) => {
31375
- var _a;
31376
- if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
31377
+ var _a2;
31378
+ if (!((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data)) {
31377
31379
  throw new Error("Parse error" /* PARSE_ERROR */);
31378
31380
  }
31379
31381
  return Promise.resolve(transformQueryResponse(response, void 0, void 0, newColumns));
31380
31382
  }).catch((error) => {
31381
- var _a, _b, _c, _d, _e;
31382
- const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;
31383
+ var _a2, _b2, _c, _d, _e;
31384
+ const referenceId = (_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.reference_id;
31383
31385
  const isSubquery = (tableFilters == null ? void 0 : tableFilters.length) || (orders == null ? void 0 : orders.length);
31384
31386
  const needsSuggestions = referenceId === "1.1.430" || referenceId === "1.1.431" || isError500Type(referenceId);
31385
31387
  if (needsSuggestions && allowSuggestions && !isSubquery) {
@@ -31439,14 +31441,14 @@
31439
31441
  };
31440
31442
  const finalConfig = axiosUtils_default(config, cancelToken);
31441
31443
  return axios_default.post(url2, data, finalConfig).then((response) => {
31442
- var _a;
31443
- if (!((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data)) {
31444
+ var _a2;
31445
+ if (!((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data)) {
31444
31446
  throw new Error("Parse error" /* PARSE_ERROR */);
31445
31447
  }
31446
31448
  return Promise.resolve(transformQueryResponse(response, void 0, void 0, newColumns));
31447
31449
  }).catch((error) => {
31448
- var _a, _b, _c, _d, _e;
31449
- const referenceId = (_b = (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data) == null ? void 0 : _b.reference_id;
31450
+ var _a2, _b2, _c, _d, _e;
31451
+ const referenceId = (_b2 = (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data) == null ? void 0 : _b2.reference_id;
31450
31452
  const isSubquery = (tableFilters == null ? void 0 : tableFilters.length) || (orders == null ? void 0 : orders.length);
31451
31453
  const needsSuggestions = referenceId === "1.1.430" || referenceId === "1.1.431" || isError500Type(referenceId);
31452
31454
  if (needsSuggestions && allowSuggestions && !isSubquery) {
@@ -31544,8 +31546,8 @@
31544
31546
  }
31545
31547
  };
31546
31548
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31547
- var _a;
31548
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31549
+ var _a2;
31550
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31549
31551
  });
31550
31552
  };
31551
31553
  var fetchAutocomplete = ({
@@ -31554,8 +31556,8 @@
31554
31556
  apiKey,
31555
31557
  token
31556
31558
  } = {}) => {
31557
- var _a;
31558
- if (!suggestion || !((_a = suggestion.trim) == null ? void 0 : _a.call(suggestion))) {
31559
+ var _a2;
31560
+ if (!suggestion || !((_a2 = suggestion.trim) == null ? void 0 : _a2.call(suggestion))) {
31559
31561
  return Promise.reject(new Error("No query supplied" /* NO_QUERY_SUPPLIED */));
31560
31562
  }
31561
31563
  if (!domain || !apiKey || !token) {
@@ -31568,8 +31570,8 @@
31568
31570
  }
31569
31571
  };
31570
31572
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31571
- var _a2;
31572
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31573
+ var _a3;
31574
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
31573
31575
  });
31574
31576
  };
31575
31577
  var fetchVLAutocomplete = ({
@@ -31581,11 +31583,11 @@
31581
31583
  filter: filter3,
31582
31584
  cancelToken
31583
31585
  } = {}) => {
31584
- var _a, _b;
31586
+ var _a2, _b2;
31585
31587
  if (!domain || !apiKey || !token) {
31586
31588
  return Promise.reject(new Error("Unauthenticated" /* UNAUTHENTICATED */));
31587
31589
  }
31588
- const text = (_b = (_a = suggestion == null ? void 0 : suggestion.trim) == null ? void 0 : _a.call(suggestion)) != null ? _b : "";
31590
+ const text = (_b2 = (_a2 = suggestion == null ? void 0 : suggestion.trim) == null ? void 0 : _a2.call(suggestion)) != null ? _b2 : "";
31589
31591
  if (!text && !filter3) {
31590
31592
  return Promise.reject(
31591
31593
  new Error(
@@ -31609,13 +31611,13 @@
31609
31611
  cancelToken
31610
31612
  );
31611
31613
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31612
- var _a2;
31614
+ var _a3;
31613
31615
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
31614
31616
  return Promise.reject({
31615
31617
  data: { message: REQUEST_CANCELLED_ERROR }
31616
31618
  });
31617
31619
  }
31618
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31620
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
31619
31621
  });
31620
31622
  };
31621
31623
  var fetchFilters = ({
@@ -31633,8 +31635,8 @@
31633
31635
  }
31634
31636
  };
31635
31637
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31636
- var _a;
31637
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31638
+ var _a2;
31639
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31638
31640
  });
31639
31641
  };
31640
31642
  var setFilters = ({
@@ -31657,8 +31659,8 @@
31657
31659
  };
31658
31660
  const data = { columns: filters };
31659
31661
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31660
- var _a;
31661
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31662
+ var _a2;
31663
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31662
31664
  });
31663
31665
  };
31664
31666
  var unsetFilterFromAPI = ({
@@ -31677,8 +31679,8 @@
31677
31679
  }
31678
31680
  };
31679
31681
  return axios_default.delete(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
31680
- var _a;
31681
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31682
+ var _a2;
31683
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31682
31684
  });
31683
31685
  };
31684
31686
  var setColumnVisibility = ({
@@ -31698,8 +31700,8 @@
31698
31700
  }
31699
31701
  };
31700
31702
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31701
- var _a;
31702
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31703
+ var _a2;
31704
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31703
31705
  });
31704
31706
  };
31705
31707
  var sendSuggestion = ({
@@ -31720,8 +31722,8 @@
31720
31722
  }
31721
31723
  };
31722
31724
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31723
- var _a;
31724
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31725
+ var _a2;
31726
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31725
31727
  });
31726
31728
  };
31727
31729
  var fetchExploreQueries = ({
@@ -31752,24 +31754,24 @@
31752
31754
  apiKey,
31753
31755
  token
31754
31756
  }).then((queryValidationResponse) => {
31755
- var _a, _b, _c;
31756
- if (((_c = (_b = (_a = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.replacements) == null ? void 0 : _c.length) > 0) {
31757
+ var _a2, _b2, _c;
31758
+ if (((_c = (_b2 = (_a2 = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.replacements) == null ? void 0 : _c.length) > 0) {
31757
31759
  return Promise.resolve(queryValidationResponse);
31758
31760
  }
31759
31761
  return axios_default.get(exploreQueriesUrl, config).then((response) => Promise.resolve(response)).catch((error) => {
31760
- var _a2;
31761
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31762
+ var _a3;
31763
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
31762
31764
  });
31763
31765
  }).catch(() => {
31764
31766
  return axios_default.get(exploreQueriesUrl, config).then((response) => Promise.resolve(response)).catch((error) => {
31765
- var _a;
31766
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31767
+ var _a2;
31768
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31767
31769
  });
31768
31770
  });
31769
31771
  }
31770
31772
  return axios_default.get(exploreQueriesUrl, config).then((response) => Promise.resolve(response)).catch((error) => {
31771
- var _a;
31772
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31773
+ var _a2;
31774
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31773
31775
  });
31774
31776
  };
31775
31777
  var reportProblem = ({
@@ -31797,8 +31799,8 @@
31797
31799
  message
31798
31800
  };
31799
31801
  return axios_default.put(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31800
- var _a;
31801
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31802
+ var _a2;
31803
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31802
31804
  });
31803
31805
  };
31804
31806
  var fetchLLMSummary = ({
@@ -31821,8 +31823,8 @@
31821
31823
  }
31822
31824
  };
31823
31825
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31824
- var _a;
31825
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31826
+ var _a2;
31827
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31826
31828
  });
31827
31829
  };
31828
31830
  var fetchLLMSummaryQuote = ({
@@ -31845,8 +31847,8 @@
31845
31847
  }
31846
31848
  };
31847
31849
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31848
- var _a;
31849
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31850
+ var _a2;
31851
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31850
31852
  });
31851
31853
  };
31852
31854
  var fetchLLMSummaryEstimate = ({
@@ -31869,8 +31871,8 @@
31869
31871
  }
31870
31872
  };
31871
31873
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
31872
- var _a;
31873
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
31874
+ var _a2;
31875
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
31874
31876
  });
31875
31877
  };
31876
31878
 
@@ -31896,9 +31898,9 @@
31896
31898
  }
31897
31899
  let queryText = query;
31898
31900
  valueArray.forEach((valueKey) => {
31899
- var _a;
31901
+ var _a2;
31900
31902
  const chunk = values[valueKey];
31901
- const replacementText = (_a = chunk == null ? void 0 : chunk.replacement) == null ? void 0 : _a.format_txt;
31903
+ const replacementText = (_a2 = chunk == null ? void 0 : chunk.replacement) == null ? void 0 : _a2.format_txt;
31902
31904
  const pattern = `\\b${valueKey}\\b`;
31903
31905
  const valueKeyRegex = compileSafeRegex(pattern);
31904
31906
  if (replacementText) {
@@ -31918,19 +31920,19 @@
31918
31920
  var fetchTopicsForVL = () => {
31919
31921
  };
31920
31922
  var getQueryRequestParams = (chunk, values) => {
31921
- var _a, _b;
31923
+ var _a2, _b2;
31922
31924
  if (!chunk) {
31923
31925
  return;
31924
31926
  }
31925
31927
  const sampleQueryText = getSampleQueryText(chunk.initialQuery, values);
31926
31928
  const userSelection = [];
31927
- if ((_a = Object.keys(values)) == null ? void 0 : _a.length) {
31928
- (_b = Object.keys(values)) == null ? void 0 : _b.forEach((key) => {
31929
- var _a2, _b2, _c, _d;
31929
+ if ((_a2 = Object.keys(values)) == null ? void 0 : _a2.length) {
31930
+ (_b2 = Object.keys(values)) == null ? void 0 : _b2.forEach((key) => {
31931
+ var _a3, _b3, _c, _d;
31930
31932
  const value = values[key];
31931
31933
  if (value.type === "VL" /* SAMPLE_QUERY_VL_TYPE */ && value.replacement) {
31932
- const replacedValue = (_a2 = value.replacement) == null ? void 0 : _a2.format_txt;
31933
- const start = (_b2 = sampleQueryText.indexOf(replacedValue)) != null ? _b2 : 0;
31934
+ const replacedValue = (_a3 = value.replacement) == null ? void 0 : _a3.format_txt;
31935
+ const start = (_b3 = sampleQueryText.indexOf(replacedValue)) != null ? _b3 : 0;
31934
31936
  if (start > -1) {
31935
31937
  const end = start + ((_d = (_c = value == null ? void 0 : value.value) == null ? void 0 : _c.length) != null ? _d : 0);
31936
31938
  userSelection.push({
@@ -31966,17 +31968,17 @@
31966
31968
  return newSuggestions;
31967
31969
  };
31968
31970
  var transformSampleQueryValues = (originalValues = {}) => {
31969
- var _a;
31971
+ var _a2;
31970
31972
  const newValues = {};
31971
- if ((_a = Object.keys(originalValues)) == null ? void 0 : _a.length) {
31973
+ if ((_a2 = Object.keys(originalValues)) == null ? void 0 : _a2.length) {
31972
31974
  Object.keys(originalValues).forEach((key) => {
31973
- var _a2;
31975
+ var _a3;
31974
31976
  if (!key) {
31975
31977
  return;
31976
31978
  }
31977
31979
  newValues[key] = {
31978
31980
  replacement: originalValues[key],
31979
- value: (_a2 = originalValues[key]) == null ? void 0 : _a2.format_txt,
31981
+ value: (_a3 = originalValues[key]) == null ? void 0 : _a3.format_txt,
31980
31982
  type: getSampleQueryReplacementType(key, originalValues[key])
31981
31983
  };
31982
31984
  });
@@ -31998,7 +32000,7 @@
31998
32000
  }
31999
32001
  };
32000
32002
  var getSampleQueryChunks = (query, values = {}) => {
32001
- var _a, _b;
32003
+ var _a2, _b2;
32002
32004
  try {
32003
32005
  const valueArray = Object.keys(values);
32004
32006
  if (!(valueArray == null ? void 0 : valueArray.length)) {
@@ -32033,7 +32035,7 @@
32033
32035
  let matchedText = "";
32034
32036
  if (re2) {
32035
32037
  match = re2.exec(remaining);
32036
- matchedText = (_a = match == null ? void 0 : match[0]) != null ? _a : "";
32038
+ matchedText = (_a2 = match == null ? void 0 : match[0]) != null ? _a2 : "";
32037
32039
  } else if (isSimpleLiteral(value)) {
32038
32040
  const idx = remaining.toLowerCase().indexOf(String(value).toLowerCase());
32039
32041
  if (idx >= 0) {
@@ -32043,7 +32045,7 @@
32043
32045
  }
32044
32046
  }
32045
32047
  if (match) {
32046
- const matchIndex = (_b = match.index) != null ? _b : 0;
32048
+ const matchIndex = (_b2 = match.index) != null ? _b2 : 0;
32047
32049
  result.push(remaining.substring(0, matchIndex), matchedText || match[0]);
32048
32050
  remaining = remaining.substring(matchIndex + (matchedText || match[0]).length);
32049
32051
  }
@@ -32053,14 +32055,14 @@
32053
32055
  }
32054
32056
  const chunkedSuggestion = [];
32055
32057
  splitStrArray.forEach((key) => {
32056
- var _a2, _b2;
32057
- const replacement = (_a2 = values[key]) == null ? void 0 : _a2.replacement;
32058
+ var _a3, _b3;
32059
+ const replacement = (_a3 = values[key]) == null ? void 0 : _a3.replacement;
32058
32060
  const type = getSampleQueryReplacementType(key, replacement);
32059
32061
  const name = key == null ? void 0 : key.trim();
32060
32062
  if (!type || !name) {
32061
32063
  return;
32062
32064
  }
32063
- let value = (_b2 = replacement == null ? void 0 : replacement.format_txt) == null ? void 0 : _b2.trim();
32065
+ let value = (_b3 = replacement == null ? void 0 : replacement.format_txt) == null ? void 0 : _b3.trim();
32064
32066
  if (type == "TEXT" /* SAMPLE_QUERY_TEXT_TYPE */) {
32065
32067
  value = name;
32066
32068
  }
@@ -32081,9 +32083,9 @@
32081
32083
  }
32082
32084
  };
32083
32085
  var transformDataExplorerAutocompleteResponse = (response) => {
32084
- var _a, _b, _c, _d, _e, _f, _g, _h;
32086
+ var _a2, _b2, _c, _d, _e, _f, _g, _h;
32085
32087
  let vlMatches = [];
32086
- if ((_d = (_c = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.suggestions) == null ? void 0 : _c.value_labels) == null ? void 0 : _d.length) {
32088
+ if ((_d = (_c = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.suggestions) == null ? void 0 : _c.value_labels) == null ? void 0 : _d.length) {
32087
32089
  const vlMatchesTrimmed = response.data.data.suggestions.value_labels.slice(0, 10);
32088
32090
  vlMatches = vlMatchesTrimmed.map((vl) => new DataExplorerSubject(vl));
32089
32091
  }
@@ -32101,8 +32103,8 @@
32101
32103
  apiKey,
32102
32104
  cancelToken
32103
32105
  } = {}) => {
32104
- var _a;
32105
- if (!suggestion || !((_a = suggestion.trim) == null ? void 0 : _a.call(suggestion))) {
32106
+ var _a2;
32107
+ if (!suggestion || !((_a2 = suggestion.trim) == null ? void 0 : _a2.call(suggestion))) {
32106
32108
  return Promise.reject(new Error("No query supplied"));
32107
32109
  }
32108
32110
  if (!domain || !apiKey || !token) {
@@ -32124,21 +32126,21 @@
32124
32126
  return axios_default.get(url2, config).then((response) => {
32125
32127
  return transformDataExplorerAutocompleteResponse(response);
32126
32128
  }).catch((error) => {
32127
- var _a2;
32129
+ var _a3;
32128
32130
  if ((error == null ? void 0 : error.message) === REQUEST_CANCELLED_ERROR) {
32129
32131
  return Promise.reject({
32130
32132
  data: { message: REQUEST_CANCELLED_ERROR }
32131
32133
  });
32132
32134
  }
32133
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32135
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
32134
32136
  });
32135
32137
  };
32136
32138
  var transformVLForDataExplorerSuggestions = (vl) => {
32137
- var _a;
32139
+ var _a2;
32138
32140
  return {
32139
32141
  name: vl.keyword,
32140
32142
  alias_name: vl.show_message,
32141
- column_name: (_a = vl.column_name) != null ? _a : ""
32143
+ column_name: (_a2 = vl.column_name) != null ? _a2 : ""
32142
32144
  };
32143
32145
  };
32144
32146
  var fetchDataExplorerSampleQueries = async ({
@@ -32165,15 +32167,15 @@
32165
32167
  cancelToken
32166
32168
  );
32167
32169
  return axios_default.post(url2, data, config).then((response) => {
32168
- var _a, _b, _c, _d;
32169
- if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.suggestions) {
32170
+ var _a2, _b2, _c, _d;
32171
+ if ((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.suggestions) {
32170
32172
  const suggestions = transformSampleQuerySuggestions((_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data) == null ? void 0 : _d.suggestions);
32171
32173
  response.data.data.suggestions = suggestions;
32172
32174
  }
32173
32175
  return Promise.resolve(response);
32174
32176
  }).catch((error) => {
32175
- var _a;
32176
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32177
+ var _a2;
32178
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32177
32179
  });
32178
32180
  };
32179
32181
  var fetchDataExplorerSuggestions = async ({
@@ -32188,7 +32190,7 @@
32188
32190
  userVLSelection = [],
32189
32191
  skipQueryValidation
32190
32192
  } = {}) => {
32191
- var _a, _b, _c;
32193
+ var _a2, _b2, _c;
32192
32194
  if (!token || !domain || !apiKey) {
32193
32195
  return Promise.reject(new Error("Unauthenticated"));
32194
32196
  }
@@ -32199,7 +32201,7 @@
32199
32201
  apiKey,
32200
32202
  token
32201
32203
  });
32202
- if (((_c = (_b = (_a = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a.data) == null ? void 0 : _b.replacements) == null ? void 0 : _c.length) > 0) {
32204
+ if (((_c = (_b2 = (_a2 = queryValidationResponse == null ? void 0 : queryValidationResponse.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.replacements) == null ? void 0 : _c.length) > 0) {
32203
32205
  return Promise.resolve(queryValidationResponse);
32204
32206
  }
32205
32207
  }
@@ -32225,8 +32227,8 @@
32225
32227
  value_label_info: vlInfo
32226
32228
  };
32227
32229
  return axios_default.post(exploreQueriesUrl, data, config).then((response) => Promise.resolve(response)).catch((error) => {
32228
- var _a2;
32229
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32230
+ var _a3;
32231
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
32230
32232
  });
32231
32233
  };
32232
32234
  var fetchSubjectListV2 = ({
@@ -32252,9 +32254,9 @@
32252
32254
  cancelToken
32253
32255
  );
32254
32256
  return axios_default.get(url2, config).then((response) => {
32255
- var _a, _b;
32257
+ var _a2, _b2;
32256
32258
  let subjectList = [];
32257
- if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.subjects) {
32259
+ if ((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.subjects) {
32258
32260
  subjectList = response.data.data.subjects.sort((a, b) => {
32259
32261
  const aName = a.subject;
32260
32262
  const bName = b.subject;
@@ -32263,8 +32265,8 @@
32263
32265
  }
32264
32266
  return Promise.resolve(subjectList);
32265
32267
  }).catch((error) => {
32266
- var _a;
32267
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32268
+ var _a2;
32269
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32268
32270
  });
32269
32271
  };
32270
32272
  var fetchSubjectList = ({ domain, apiKey, token, valueLabel }) => {
@@ -32281,9 +32283,9 @@
32281
32283
  }
32282
32284
  };
32283
32285
  return axios_default.get(url2, config).then((response) => {
32284
- var _a, _b;
32286
+ var _a2, _b2;
32285
32287
  let subjectList = [];
32286
- if ((_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.subjects) {
32288
+ if ((_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.subjects) {
32287
32289
  subjectList = response.data.data.subjects.map((subject) => new DataExplorerSubject(subject)).sort((a, b) => {
32288
32290
  const aName = a.displayName;
32289
32291
  const bName = b.displayName;
@@ -32292,8 +32294,8 @@
32292
32294
  }
32293
32295
  return Promise.resolve(subjectList);
32294
32296
  }).catch((error) => {
32295
- var _a;
32296
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32297
+ var _a2;
32298
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32297
32299
  });
32298
32300
  };
32299
32301
  var fetchDataPreview = ({
@@ -32332,7 +32334,7 @@
32332
32334
 
32333
32335
  // src/Api/notificationService.ts
32334
32336
  var transformNotificationQueryResult = (queryResult) => {
32335
- var _a;
32337
+ var _a2;
32336
32338
  let transformedQueryResult = {};
32337
32339
  let hasQueryResult = false;
32338
32340
  for (let key in queryResult) {
@@ -32342,7 +32344,7 @@
32342
32344
  }
32343
32345
  }
32344
32346
  if (hasQueryResult) {
32345
- transformedQueryResult = (_a = transformQueryResponse({ data: queryResult })) == null ? void 0 : _a.data;
32347
+ transformedQueryResult = (_a2 = transformQueryResponse({ data: queryResult })) == null ? void 0 : _a2.data;
32346
32348
  } else {
32347
32349
  transformedQueryResult = {
32348
32350
  message: GENERAL_ERROR,
@@ -32362,8 +32364,8 @@
32362
32364
  });
32363
32365
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${id}?key=${apiKey}`;
32364
32366
  return axiosInstance.get(url2).then((response) => {
32365
- var _a, _b;
32366
- const queryResult = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.query_result;
32367
+ var _a2, _b2;
32368
+ const queryResult = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.query_result;
32367
32369
  let hasQueryResult = false;
32368
32370
  for (let key in queryResult) {
32369
32371
  if (queryResult.hasOwnProperty(key)) {
@@ -32378,8 +32380,8 @@
32378
32380
  return Promise.reject({ response: { data: { message: GENERAL_ERROR, hasQueryResult } } });
32379
32381
  }
32380
32382
  }).catch((error) => {
32381
- var _a;
32382
- return Promise.reject({ data: (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data });
32383
+ var _a2;
32384
+ return Promise.reject({ data: (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data });
32383
32385
  });
32384
32386
  };
32385
32387
  var fetchNotification = ({ id, domain, apiKey, token }) => {
@@ -32393,14 +32395,14 @@
32393
32395
  });
32394
32396
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${id}?key=${apiKey}`;
32395
32397
  return axiosInstance.get(url2).then((response) => {
32396
- var _a, _b, _c, _d;
32397
- const transformedResponse = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) != null ? _b : {};
32398
+ var _a2, _b2, _c, _d;
32399
+ const transformedResponse = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) != null ? _b2 : {};
32398
32400
  const transformedQueryResult = transformNotificationQueryResult((_d = (_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data) == null ? void 0 : _d.query_result);
32399
32401
  transformedResponse.query_result = transformedQueryResult;
32400
32402
  return Promise.resolve(transformedResponse);
32401
32403
  }).catch((error) => {
32402
- var _a;
32403
- return Promise.reject({ data: (_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data });
32404
+ var _a2;
32405
+ return Promise.reject({ data: (_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data });
32404
32406
  });
32405
32407
  };
32406
32408
  var isExpressionQueryValid = ({ query, domain, apiKey, token }) => {
@@ -32472,8 +32474,8 @@
32472
32474
  url2 = url2 + withoutProjectsRestriction;
32473
32475
  }
32474
32476
  return axiosInstance.get(url2).then((response) => {
32475
- var _a, _b, _c;
32476
- const notificationList = (_b = (_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data) == null ? void 0 : _b.items;
32477
+ var _a2, _b2, _c;
32478
+ const notificationList = (_b2 = (_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data) == null ? void 0 : _b2.items;
32477
32479
  if (notificationList == null ? void 0 : notificationList.length) {
32478
32480
  notificationList.forEach((notification) => {
32479
32481
  const transformedQueryResult = transformNotificationQueryResult(notification.query_result);
@@ -32482,8 +32484,8 @@
32482
32484
  }
32483
32485
  return Promise.resolve((_c = response == null ? void 0 : response.data) == null ? void 0 : _c.data);
32484
32486
  }).catch((error) => {
32485
- var _a;
32486
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32487
+ var _a2;
32488
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32487
32489
  });
32488
32490
  };
32489
32491
  var fetchNotificationChannels = ({ domain, apiKey, token, channelType }) => {
@@ -32497,11 +32499,11 @@
32497
32499
  });
32498
32500
  const url2 = `${domain}/autoql/api/v1/notifications/channels?key=${apiKey}&type=${channelType}`;
32499
32501
  return axiosInstance.get(url2).then((response) => Promise.resolve(response == null ? void 0 : response.data)).catch((error) => {
32500
- var _a, _b;
32501
- if (((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.status) === 404) {
32502
+ var _a2, _b2;
32503
+ if (((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.status) === 404) {
32502
32504
  return Promise.resolve({ data: [] });
32503
32505
  }
32504
- return Promise.reject((_b = error == null ? void 0 : error.response) == null ? void 0 : _b.data);
32506
+ return Promise.reject((_b2 = error == null ? void 0 : error.response) == null ? void 0 : _b2.data);
32505
32507
  });
32506
32508
  };
32507
32509
  var fetchDataAlerts = ({ domain, apiKey, token }) => {
@@ -32515,8 +32517,8 @@
32515
32517
  });
32516
32518
  const url2 = `${domain}/autoql/api/v1/data-alerts?key=${apiKey}`;
32517
32519
  return axiosInstance.get(url2).then((response) => Promise.resolve(response == null ? void 0 : response.data)).catch((error) => {
32518
- var _a;
32519
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32520
+ var _a2;
32521
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32520
32522
  });
32521
32523
  };
32522
32524
  var getDataAlertsByLabel = ({ domain, apiKey, token, labelId }) => {
@@ -32530,8 +32532,8 @@
32530
32532
  }
32531
32533
  };
32532
32534
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
32533
- var _a;
32534
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32535
+ var _a2;
32536
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32535
32537
  });
32536
32538
  };
32537
32539
  var getNotLabeledDataAlerts = ({ domain, apiKey, token }) => {
@@ -32545,8 +32547,8 @@
32545
32547
  }
32546
32548
  };
32547
32549
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
32548
- var _a;
32549
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32550
+ var _a2;
32551
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32550
32552
  });
32551
32553
  };
32552
32554
  var fetchSubscribedDataAlerts = ({ domain, apiKey, token }) => {
@@ -32560,8 +32562,8 @@
32560
32562
  });
32561
32563
  const url2 = `${domain}/autoql/api/v1/data-alerts?status=active&key=${apiKey}`;
32562
32564
  return axiosInstance.get(url2).then((response) => Promise.resolve(response == null ? void 0 : response.data)).catch((error) => {
32563
- var _a;
32564
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32565
+ var _a2;
32566
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32565
32567
  });
32566
32568
  };
32567
32569
  var fetchRule = ({ domain, apiKey, token, dataAlertId }) => {
@@ -32575,11 +32577,11 @@
32575
32577
  });
32576
32578
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}?key=${apiKey}`;
32577
32579
  return axiosInstance.get(url2).then((response) => {
32578
- var _a;
32579
- return Promise.resolve((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data);
32580
+ var _a2;
32581
+ return Promise.resolve((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data);
32580
32582
  }).catch((error) => {
32581
- var _a;
32582
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32583
+ var _a2;
32584
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32583
32585
  });
32584
32586
  };
32585
32587
  var resetNotificationCount = ({ domain, apiKey, token }) => {
@@ -32597,11 +32599,11 @@
32597
32599
  };
32598
32600
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}`;
32599
32601
  return axiosInstance.put(url2, data).then((response) => {
32600
- var _a;
32601
- return Promise.resolve((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data);
32602
+ var _a2;
32603
+ return Promise.resolve((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data);
32602
32604
  }).catch((error) => {
32603
- var _a;
32604
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32605
+ var _a2;
32606
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32605
32607
  });
32606
32608
  };
32607
32609
  var initializeAlert = ({ id, domain, apiKey, token }) => {
@@ -32618,11 +32620,11 @@
32618
32620
  });
32619
32621
  const url2 = `${domain}/autoql/api/v1/data-alerts/${id}/initialize?key=${apiKey}`;
32620
32622
  return axiosInstance.put(url2).then((response) => {
32621
- var _a;
32622
- return Promise.resolve((_a = response == null ? void 0 : response.data) == null ? void 0 : _a.data);
32623
+ var _a2;
32624
+ return Promise.resolve((_a2 = response == null ? void 0 : response.data) == null ? void 0 : _a2.data);
32623
32625
  }).catch((error) => {
32624
- var _a;
32625
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32626
+ var _a2;
32627
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32626
32628
  });
32627
32629
  };
32628
32630
  var deleteNotification = ({ notificationId, domain, apiKey, token }) => {
@@ -32639,8 +32641,8 @@
32639
32641
  });
32640
32642
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${notificationId}?key=${apiKey}`;
32641
32643
  return axiosInstance.delete(url2).catch((error) => {
32642
- var _a;
32643
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32644
+ var _a2;
32645
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32644
32646
  });
32645
32647
  };
32646
32648
  var deleteMultipleNotifications = ({ notificationList, domain, apiKey, token }) => {
@@ -32658,8 +32660,8 @@
32658
32660
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}`;
32659
32661
  const data = { operation: "delete", notifications: notificationList };
32660
32662
  return axios_default.patch(url2, data, config).catch((error) => {
32661
- var _a;
32662
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32663
+ var _a2;
32664
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32663
32665
  });
32664
32666
  };
32665
32667
  var deleteAllNotifications = ({ domain, apiKey, token, projectId }) => {
@@ -32677,8 +32679,8 @@
32677
32679
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}&project=${projectId}`;
32678
32680
  const data = { operation: "delete_all" };
32679
32681
  return axios_default.patch(url2, data, config).catch((error) => {
32680
- var _a;
32681
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32682
+ var _a2;
32683
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32682
32684
  });
32683
32685
  };
32684
32686
  var dismissAllNotifications = ({ domain, apiKey, token }) => {
@@ -32695,8 +32697,8 @@
32695
32697
  };
32696
32698
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications?key=${apiKey}&project=all`;
32697
32699
  return axiosInstance.put(url2, data).catch((error) => {
32698
- var _a;
32699
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32700
+ var _a2;
32701
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32700
32702
  });
32701
32703
  };
32702
32704
  var markNotificationAsUnread = ({ notificationId, domain, apiKey, token }) => {
@@ -32716,8 +32718,8 @@
32716
32718
  };
32717
32719
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${notificationId}?key=${apiKey}`;
32718
32720
  return axiosInstance.put(url2, data).catch((error) => {
32719
- var _a;
32720
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32721
+ var _a2;
32722
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32721
32723
  });
32722
32724
  };
32723
32725
  var dismissNotification = ({ notificationId, domain, apiKey, token }) => {
@@ -32737,8 +32739,8 @@
32737
32739
  };
32738
32740
  const url2 = `${domain}/autoql/api/v1/data-alerts/notifications/${notificationId}?key=${apiKey}`;
32739
32741
  return axiosInstance.put(url2, data).catch((error) => {
32740
- var _a;
32741
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32742
+ var _a2;
32743
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32742
32744
  });
32743
32745
  };
32744
32746
  var removeUserFromProjectRule = ({ dataAlertId, token, domain, apiKey }) => {
@@ -32749,8 +32751,8 @@
32749
32751
  };
32750
32752
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}/user?key=${apiKey}`;
32751
32753
  return axios_default.delete(url2, config).catch((error) => {
32752
- var _a;
32753
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32754
+ var _a2;
32755
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32754
32756
  });
32755
32757
  };
32756
32758
  var addUserToProjectRule = ({ dataAlertId, token, domain, apiKey }) => {
@@ -32761,8 +32763,8 @@
32761
32763
  };
32762
32764
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}/user?key=${apiKey}`;
32763
32765
  return axios_default.post(url2, {}, config).catch((error) => {
32764
- var _a;
32765
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32766
+ var _a2;
32767
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32766
32768
  });
32767
32769
  };
32768
32770
  var toggleProjectDataAlertStatus = ({ dataAlertId, status, token, domain, apiKey }) => {
@@ -32793,8 +32795,8 @@
32793
32795
  };
32794
32796
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}?key=${apiKey}`;
32795
32797
  return axios_default.put(url2, data, config).catch((error) => {
32796
- var _a;
32797
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32798
+ var _a2;
32799
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32798
32800
  });
32799
32801
  };
32800
32802
  var updateDataAlertStatus = ({ dataAlertId, status, type, domain, apiKey, token }) => {
@@ -32849,8 +32851,8 @@
32849
32851
  };
32850
32852
  const url2 = `${domain}/autoql/api/v1/notifications/channels?key=${apiKey}`;
32851
32853
  return axios_default.post(url2, data, config).catch((error) => {
32852
- var _a;
32853
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32854
+ var _a2;
32855
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32854
32856
  });
32855
32857
  };
32856
32858
  var sendDataToChannel = ({ token, domain, apiKey, channelId, fileName, base64Data }) => {
@@ -32868,8 +32870,8 @@
32868
32870
  };
32869
32871
  const url2 = `${domain}/autoql/api/v1/notifications/channels/${channelId}/send?key=${apiKey}`;
32870
32872
  return axios_default.post(url2, data, config).catch((error) => {
32871
- var _a;
32872
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32873
+ var _a2;
32874
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32873
32875
  });
32874
32876
  };
32875
32877
  var updateDataAlert = ({ dataAlert, domain, apiKey, token }) => {
@@ -32886,8 +32888,8 @@
32886
32888
  });
32887
32889
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlert.id}?key=${apiKey}`;
32888
32890
  return axiosInstance.put(url2, dataAlert).catch((error) => {
32889
- var _a;
32890
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32891
+ var _a2;
32892
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32891
32893
  });
32892
32894
  };
32893
32895
  var createDataAlert = ({ dataAlert = {}, domain, apiKey, token }) => {
@@ -32902,12 +32904,12 @@
32902
32904
  const data = { ...dataAlert, id: void 0 };
32903
32905
  const url2 = `${domain}/autoql/api/v1/data-alerts?validate=true&key=${apiKey}`;
32904
32906
  return axiosInstance.post(url2, data).catch((error) => {
32905
- var _a;
32906
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32907
+ var _a2;
32908
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32907
32909
  });
32908
32910
  };
32909
32911
  var createManagementDataAlert = ({ dataAlert = {}, domain, apiKey, token, projectId, evaluationMode }) => {
32910
- var _a, _b;
32912
+ var _a2, _b2;
32911
32913
  if (!token || !apiKey || !domain) {
32912
32914
  return Promise.reject(new Error("UNAUTHORIZED" /* UNAUTHORIZED */));
32913
32915
  }
@@ -32919,14 +32921,14 @@
32919
32921
  const projects = evaluationMode === "COMPOSITE" ? [] : [
32920
32922
  {
32921
32923
  id: projectId,
32922
- time_zone: (_b = (_a = Intl == null ? void 0 : Intl.DateTimeFormat()) == null ? void 0 : _a.resolvedOptions()) == null ? void 0 : _b.timeZone
32924
+ time_zone: (_b2 = (_a2 = Intl == null ? void 0 : Intl.DateTimeFormat()) == null ? void 0 : _a2.resolvedOptions()) == null ? void 0 : _b2.timeZone
32923
32925
  }
32924
32926
  ];
32925
32927
  const data = { ...dataAlert, id: void 0, projects };
32926
32928
  const url2 = `${domain}/autoql/management/api/v1/data-alerts?validate=true&key=${apiKey}`;
32927
32929
  return axiosInstance.post(url2, data).catch((error) => {
32928
- var _a2;
32929
- return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32930
+ var _a3;
32931
+ return Promise.reject((_a3 = error == null ? void 0 : error.response) == null ? void 0 : _a3.data);
32930
32932
  });
32931
32933
  };
32932
32934
  var updateManagementDataAlert = ({ dataAlert, domain, apiKey, token, projectId }) => {
@@ -32941,8 +32943,8 @@
32941
32943
  const data = { ...dataAlert, id: void 0, project_id: projectId };
32942
32944
  const url2 = `${domain}/autoql/management/api/v1/data-alerts/${dataAlert == null ? void 0 : dataAlert.id}?key=${apiKey}`;
32943
32945
  return axiosInstance.put(url2, data).catch((error) => {
32944
- var _a;
32945
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32946
+ var _a2;
32947
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32946
32948
  });
32947
32949
  };
32948
32950
  var previewDataAlert = ({ dataAlertId, domain, apiKey, token }) => {
@@ -32956,8 +32958,8 @@
32956
32958
  });
32957
32959
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}/preview?key=${apiKey}`;
32958
32960
  return axiosInstance.get(url2).then((response) => Promise.resolve(response)).catch((error) => {
32959
- var _a;
32960
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32961
+ var _a2;
32962
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32961
32963
  });
32962
32964
  };
32963
32965
  var previewManagementDataAlert = ({ dataAlertId, domain, apiKey, token, projectId }) => {
@@ -32971,8 +32973,8 @@
32971
32973
  });
32972
32974
  const url2 = `${domain}/autoql/management/api/v1/data-alerts/${dataAlertId}/preview?key=${apiKey}&project_id=${projectId}`;
32973
32975
  return axiosInstance.get(url2).then((response) => Promise.resolve(response)).catch((error) => {
32974
- var _a;
32975
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32976
+ var _a2;
32977
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32976
32978
  });
32977
32979
  };
32978
32980
  var assignLabelToManagementDataAlert = ({ dataAlertId, domain, apiKey, token, categoryId }) => {
@@ -32987,8 +32989,8 @@
32987
32989
  const data = { data_alert_ids: [dataAlertId], operation: "ADD" };
32988
32990
  const url2 = `${domain}/autoql/management/api/v1/data-alerts/labels/${categoryId}?key=${apiKey}`;
32989
32991
  return axiosInstance.patch(url2, data).catch((error) => {
32990
- var _a;
32991
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
32992
+ var _a2;
32993
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
32992
32994
  });
32993
32995
  };
32994
32996
  var validateExpression = ({ expression, domain, apiKey, token }) => {
@@ -33003,8 +33005,8 @@
33003
33005
  const data = { expression };
33004
33006
  const url2 = `${domain}/autoql/api/v1/data-alerts/validate?key=${apiKey}`;
33005
33007
  return axiosInstance.post(url2, data).catch((error) => {
33006
- var _a;
33007
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33008
+ var _a2;
33009
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33008
33010
  });
33009
33011
  };
33010
33012
  var deleteDataAlert = (dataAlertId, authObject) => {
@@ -33019,8 +33021,8 @@
33019
33021
  });
33020
33022
  const url2 = `${domain}/autoql/api/v1/data-alerts/${dataAlertId}?key=${apiKey}`;
33021
33023
  return axiosInstance.delete(url2).catch((error) => {
33022
- var _a;
33023
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33024
+ var _a2;
33025
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33024
33026
  });
33025
33027
  };
33026
33028
  var getAllDataAlertsLabelsByProject = ({ domain, apiKey, token }) => {
@@ -33034,8 +33036,8 @@
33034
33036
  }
33035
33037
  };
33036
33038
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33037
- var _a;
33038
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33039
+ var _a2;
33040
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33039
33041
  });
33040
33042
  };
33041
33043
  var getAllDataAlertsLabels = ({ domain, apiKey, token }) => {
@@ -33049,8 +33051,8 @@
33049
33051
  }
33050
33052
  };
33051
33053
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33052
- var _a;
33053
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33054
+ var _a2;
33055
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33054
33056
  });
33055
33057
  };
33056
33058
  var removeNotificationChannel = ({ channelId, domain, apiKey, token }) => {
@@ -33064,8 +33066,8 @@
33064
33066
  });
33065
33067
  const url2 = `${domain}/autoql/api/v1/notifications/channels/${channelId}?key=${apiKey}`;
33066
33068
  return axiosInstance.delete(url2).catch((error) => {
33067
- var _a;
33068
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33069
+ var _a2;
33070
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33069
33071
  });
33070
33072
  };
33071
33073
 
@@ -33081,8 +33083,8 @@
33081
33083
  }
33082
33084
  };
33083
33085
  return axios_default.get(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33084
- var _a;
33085
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33086
+ var _a2;
33087
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33086
33088
  });
33087
33089
  };
33088
33090
  var removeDashboardRefreshInterval = ({ domain, apiKey, token, dashboard }) => {
@@ -33096,8 +33098,8 @@
33096
33098
  }
33097
33099
  };
33098
33100
  return axios_default.delete(url2, config).then((response) => Promise.resolve(response)).catch((error) => {
33099
- var _a;
33100
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33101
+ var _a2;
33102
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33101
33103
  });
33102
33104
  };
33103
33105
  var setDashboardRefreshInterval = ({ domain, apiKey, token, dashboard, refreshInterval }) => {
@@ -33116,8 +33118,8 @@
33116
33118
  }
33117
33119
  };
33118
33120
  return axios_default.post(url2, body, config).then((response) => Promise.resolve(response)).catch((error) => {
33119
- var _a;
33120
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33121
+ var _a2;
33122
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33121
33123
  });
33122
33124
  };
33123
33125
 
@@ -33139,8 +33141,8 @@
33139
33141
  }
33140
33142
  };
33141
33143
  return axios_default.post(url2, data, config).then((response) => Promise.resolve(response)).catch((error) => {
33142
- var _a;
33143
- return Promise.reject((_a = error == null ? void 0 : error.response) == null ? void 0 : _a.data);
33144
+ var _a2;
33145
+ return Promise.reject((_a2 = error == null ? void 0 : error.response) == null ? void 0 : _a2.data);
33144
33146
  });
33145
33147
  };
33146
33148
 
@@ -33442,8 +33444,8 @@
33442
33444
  let cellTrans, textTrans, textAlign = labelAlign == "start" ? 0 : labelAlign == "middle" ? 0.5 : 1;
33443
33445
  if (orient === "vertical") {
33444
33446
  const cellSize = textSize.map((d, i) => {
33445
- var _a;
33446
- return Math.max(d == null ? void 0 : d.height, (_a = shapeSize[i]) == null ? void 0 : _a.height);
33447
+ var _a2;
33448
+ return Math.max(d == null ? void 0 : d.height, (_a2 = shapeSize[i]) == null ? void 0 : _a2.height);
33447
33449
  });
33448
33450
  cellTrans = (d, i) => {
33449
33451
  const height = sum(cellSize.slice(0, i));
@@ -33451,19 +33453,19 @@
33451
33453
  };
33452
33454
  if (shapeSize == null ? void 0 : shapeSize.length) {
33453
33455
  textTrans = (d, i) => {
33454
- var _a, _b, _c, _d;
33455
- return `translate( ${((_a = shapeSize[i]) == null ? void 0 : _a.width) + ((_b = shapeSize[i]) == null ? void 0 : _b.x) + labelOffset}, ${((_c = shapeSize[i]) == null ? void 0 : _c.y) + ((_d = shapeSize[i]) == null ? void 0 : _d.height) / 2 + 4})`;
33456
+ var _a2, _b2, _c, _d;
33457
+ return `translate( ${((_a2 = shapeSize[i]) == null ? void 0 : _a2.width) + ((_b2 = shapeSize[i]) == null ? void 0 : _b2.x) + labelOffset}, ${((_c = shapeSize[i]) == null ? void 0 : _c.y) + ((_d = shapeSize[i]) == null ? void 0 : _d.height) / 2 + 4})`;
33456
33458
  };
33457
33459
  }
33458
33460
  } else if (orient === "horizontal") {
33459
33461
  if (shapeSize == null ? void 0 : shapeSize.length) {
33460
33462
  cellTrans = (d, i) => {
33461
- var _a;
33462
- return `translate(${i * (((_a = shapeSize[i]) == null ? void 0 : _a.width) + shapePadding)},0)`;
33463
+ var _a2;
33464
+ return `translate(${i * (((_a2 = shapeSize[i]) == null ? void 0 : _a2.width) + shapePadding)},0)`;
33463
33465
  };
33464
33466
  textTrans = (d, i) => {
33465
- var _a, _b, _c, _d;
33466
- return `translate(${((_a = shapeSize[i]) == null ? void 0 : _a.width) * textAlign + ((_b = shapeSize[i]) == null ? void 0 : _b.x)},
33467
+ var _a2, _b2, _c, _d;
33468
+ return `translate(${((_a2 = shapeSize[i]) == null ? void 0 : _a2.width) * textAlign + ((_b2 = shapeSize[i]) == null ? void 0 : _b2.x)},
33467
33469
  ${((_c = shapeSize[i]) == null ? void 0 : _c.height) + ((_d = shapeSize[i]) == null ? void 0 : _d.y) + labelOffset + 8})`;
33468
33470
  };
33469
33471
  }