@databrainhq/plugin 0.17.9-beta.23 → 0.17.9-beta.25

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.
Files changed (34) hide show
  1. package/dist/{Accordion-CFr5mbwz.mjs → Accordion-Fad8DYon.mjs} +1 -1
  2. package/dist/{Chart-CvMpLgcw.mjs → Chart-B3VzztF2.mjs} +705 -694
  3. package/dist/{ChartNavigationProvider-C8UjyHEP.mjs → ChartNavigationProvider-CFDuKLxv.mjs} +578 -565
  4. package/dist/{CreateGlobalFilter-DDdh8kEY.mjs → CreateGlobalFilter-Cu3O5ENs.mjs} +2 -2
  5. package/dist/{CreateMetricV2-am7_yyXZ.mjs → CreateMetricV2-DEuHwXdn.mjs} +10 -10
  6. package/dist/{DraggableItem-Co8Wu8U2.mjs → DraggableItem-BDntbrsm.mjs} +2 -2
  7. package/dist/{HorizontalStackTable-kjK_mshx.mjs → HorizontalStackTable-CeNx2pS8.mjs} +3 -3
  8. package/dist/{MetricCardV2-IbwASx78.mjs → MetricCardV2-DJNyFvZe.mjs} +7 -7
  9. package/dist/{NoDataFound-CPqDgwx_.mjs → NoDataFound-1p3W6VT3.mjs} +1 -1
  10. package/dist/{NoDataState-CCuvt0t1.mjs → NoDataState-BIUG8tOF.mjs} +2 -2
  11. package/dist/{Panel-Cl8UCrwx.mjs → Panel-DK436Zy8.mjs} +1 -1
  12. package/dist/{PivotTableV2-BTPfWThX.mjs → PivotTableV2-MNVr6CYo.mjs} +2 -2
  13. package/dist/{PivotTableV3-k0zpjv7K.mjs → PivotTableV3-CA1CPQ5G.mjs} +4 -4
  14. package/dist/{Portal-WeKuJ7j6.mjs → Portal-nCdXVAdn.mjs} +81 -81
  15. package/dist/{RadioButton-DRlYo2_S.mjs → RadioButton-DaBNeuHf.mjs} +1 -1
  16. package/dist/{ScheduleEmail-Da6ZAeL0.mjs → ScheduleEmail-Djbe70ul.mjs} +4 -4
  17. package/dist/{SearchMetricData-BAkkiKry.mjs → SearchMetricData-m3JwSX5b.mjs} +11 -11
  18. package/dist/{SortPanel-idxLZc34.mjs → SortPanel-41ex8yDo.mjs} +7 -7
  19. package/dist/{Table-B7qURYwS.mjs → Table-BmvnimZO.mjs} +4 -4
  20. package/dist/{TagInputField-E-mmcq-N.mjs → TagInputField-D2-ZjGwR.mjs} +2 -2
  21. package/dist/{TextAreaField-D_mHGW0R.mjs → TextAreaField-BQIhzzc0.mjs} +5 -5
  22. package/dist/{TimeSeriesSettings-DrbJSavY.mjs → TimeSeriesSettings-DbZu1jcC.mjs} +2 -2
  23. package/dist/{charts-CqXw5nWb.mjs → charts-CT97dkOO.mjs} +1329 -1244
  24. package/dist/{chevron-down-BUPagYDC.mjs → chevron-down-CcrMhLPe.mjs} +0 -0
  25. package/dist/{conditionalFormatting-CuqDFMOC.mjs → conditionalFormatting-C-KQImY8.mjs} +1 -1
  26. package/dist/{createGlobalFilter.module-Czn2-vHn.mjs → createGlobalFilter.module-B7js-eIL.mjs} +1 -1
  27. package/dist/{echarts-DItRYaFI.mjs → echarts-g0jh5yYA.mjs} +2 -2
  28. package/dist/{getTableDisplayName-D26qnyRH.mjs → getTableDisplayName-Bz9e9kfO.mjs} +3 -3
  29. package/dist/{timeseries-CkzWMhfw.mjs → timeseries-D38T0e7I.mjs} +1 -1
  30. package/dist/{toTasteAppearance-BdcghsEP.mjs → toTasteAppearance-Caa-L7Go.mjs} +1 -1
  31. package/dist/{useQuery-BYsdmQEA.mjs → useQuery-D-Ae4ZKV.mjs} +1 -1
  32. package/dist/webcomponents.es.js +26 -25
  33. package/dist/webcomponents.umd.js +164 -164
  34. package/package.json +1 -1
@@ -5,21 +5,21 @@ import { o as e } from "./rolldown-runtime-C1JUX4Ur.mjs";
5
5
  import { a as t, o as n } from "./cardStates-Cpns2lUc.mjs";
6
6
  import { It as r, Jt as i, Lt as a, Nt as o, Rt as s, d as c, o as l, r as u, s as d } from "./pluginV3Request-BS1Sa8o7.mjs";
7
7
  import { $ as f, K as p, O as m, Q as h, U as g, X as _, Y as v, Z as y, a as b, at as x, d as ee, et as S, i as C, l as w, lt as te, q as T, s as E, tt as D } from "./metric.mutation-DpLOPFjt.mjs";
8
- import { $ as O, $r as k, Aa as ne, B as re, Cr as ie, D as ae, Dt as oe, E as se, Gt as ce, H as le, J as ue, Jt as de, Kt as fe, L as pe, N as me, Na as he, Oa as ge, P as _e, Sa as A, U as ve, Vt as ye, W as be, Y as xe, _n as Se, bt as Ce, ct as we, et as Te, ft as Ee, gn as De, gt as Oe, hn as ke, it as Ae, j as je, ja as Me, k as Ne, ka as j, ki as Pe, kn as Fe, lt as Ie, mr as Le, nt as Re, ot as ze, pn as Be, s as Ve, ta as He, ti as M, tt as Ue, ut as We, vt as Ge, ya as Ke, yn as qe, yt as Je, z as Ye, zi as Xe } from "./Portal-WeKuJ7j6.mjs";
9
- import { t as N } from "./jsx-runtime-B0EUnyJj.mjs";
10
- import { t as Ze } from "./useQuery-BYsdmQEA.mjs";
11
- import { i as Qe } from "./chevron-down-BUPagYDC.mjs";
12
- import { n as $e } from "./timeseries-CkzWMhfw.mjs";
13
- import { i as et } from "./text-CtrvkDIo.mjs";
14
- import { a as tt, d as nt, n as rt } from "./RadioButton-DRlYo2_S.mjs";
15
- import { t as it } from "./TimeSeriesSettings-DrbJSavY.mjs";
16
- import { i as at, n as ot, o as st } from "./getTableDisplayName-D26qnyRH.mjs";
17
- import { r as ct } from "./cardActions-BLBLsjcd.mjs";
18
- import { t as lt } from "./createLucideIcon-C-N26TaJ.mjs";
19
- import * as ut from "react";
20
- import { createContext as dt, useCallback as P, useContext as ft, useEffect as F, useLayoutEffect as pt, useMemo as I, useRef as L, useState as R } from "react";
8
+ import { $ as O, $r as k, Aa as ne, B as re, Cr as ie, D as ae, Dt as oe, E as se, Gt as ce, H as le, J as ue, Jt as de, Kt as fe, L as pe, N as me, Na as he, Oa as ge, P as _e, Sa as A, U as ve, Vt as ye, W as be, Y as xe, _n as Se, bt as Ce, ct as we, et as Te, ft as Ee, gn as De, gt as Oe, hn as ke, it as Ae, j as je, ja as Me, k as Ne, ka as j, ki as Pe, kn as Fe, lt as Ie, mr as Le, nt as Re, ot as ze, pn as Be, s as Ve, ta as He, ti as Ue, tt as We, ut as Ge, vt as Ke, ya as qe, yn as Je, yt as Ye, z as Xe, zi as Ze } from "./Portal-nCdXVAdn.mjs";
9
+ import { t as M } from "./jsx-runtime-B0EUnyJj.mjs";
10
+ import { t as Qe } from "./useQuery-D-Ae4ZKV.mjs";
11
+ import { i as $e } from "./chevron-down-CcrMhLPe.mjs";
12
+ import { n as et } from "./timeseries-D38T0e7I.mjs";
13
+ import { i as tt } from "./text-CtrvkDIo.mjs";
14
+ import { a as nt, d as rt, n as it } from "./RadioButton-DaBNeuHf.mjs";
15
+ import { t as at } from "./TimeSeriesSettings-DbZu1jcC.mjs";
16
+ import { i as ot, n as st, o as ct } from "./getTableDisplayName-Bz9e9kfO.mjs";
17
+ import { r as lt } from "./cardActions-BLBLsjcd.mjs";
18
+ import { t as ut } from "./createLucideIcon-C-N26TaJ.mjs";
19
+ import * as dt from "react";
20
+ import { createContext as ft, useCallback as N, useContext as pt, useEffect as P, useLayoutEffect as mt, useMemo as F, useRef as I, useState as L } from "react";
21
21
  //#region src/components/MetricList/emptyCopyContext.ts
22
- var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/, vt = (e) => e.replace(_t, ""), yt = (e) => `${e?.token || ""}|${+!!e?.isFrontendApp}|${e?.clientId || ""}`, bt = (e, t = {}) => e?.id ? e.drillConfig?.levels?.some((e) => !!e?.filters?.length) ? {
22
+ var ht = ft({}), gt = () => pt(ht), _t = /* @__PURE__ */ e(Me()), vt = /;\s*$/, yt = (e) => e.replace(vt, ""), bt = (e) => `${e?.token || ""}|${+!!e?.isFrontendApp}|${e?.clientId || ""}`, xt = (e, t = {}) => e?.id ? e.drillConfig?.levels?.some((e) => !!e?.filters?.length) ? {
23
23
  eligible: !1,
24
24
  reason: "drill-filtered"
25
25
  } : e.isEncrypted && !t.isGuestTokenSession ? {
@@ -28,7 +28,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
28
28
  } : { eligible: !0 } : {
29
29
  eligible: !1,
30
30
  reason: "no-metric-id"
31
- }, xt = (e, t, n, r = "embed", i) => ({
31
+ }, St = (e, t, n, r = "embed", i) => ({
32
32
  key: e,
33
33
  externalMetricId: t.id,
34
34
  ...r === "platform" && n ? { clientId: n } : {},
@@ -57,7 +57,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
57
57
  comparisonCount: t.comparisonCount,
58
58
  drillConfig: t.drillConfig,
59
59
  ...t.isEncrypted && i ? { isEncrypted: !0 } : {}
60
- }), St = (e) => {
60
+ }), Ct = (e) => {
61
61
  let t = [];
62
62
  if (typeof e.data == "string") try {
63
63
  t = JSON.parse(e.data);
@@ -78,7 +78,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
78
78
  ...e.notices ? { notices: e.notices } : {},
79
79
  ...e.error ? { error: e.error } : {}
80
80
  };
81
- }, Ct = 45e3, wt = 1e3, Tt = 1500, Et = class {
81
+ }, wt = 45e3, Tt = 1e3, Et = 1500, Dt = class {
82
82
  options;
83
83
  queue = [];
84
84
  flushScheduled = !1;
@@ -163,7 +163,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
163
163
  }
164
164
  let n = /* @__PURE__ */ new Map();
165
165
  e.forEach((e) => {
166
- let t = yt(e.session), r = n.get(t);
166
+ let t = bt(e.session), r = n.get(t);
167
167
  r ? r.push(e) : n.set(t, [e]);
168
168
  });
169
169
  let { coldHeadSize: r, maxBatchSize: i } = this.options, a = t ? Math.min(r, i) : 0, o = [];
@@ -238,51 +238,51 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
238
238
  this.settleWithFallback(e);
239
239
  return;
240
240
  }
241
- let r = St(n);
241
+ let r = Ct(n);
242
242
  e.resolve(r);
243
243
  });
244
244
  }
245
245
  settleWithFallback(e) {
246
246
  e.fallback().then(e.resolve, e.reject);
247
247
  }
248
- }, Dt = "dbnMetricBatch", Ot = "@dbn:metricQueryBatch", kt = () => {
248
+ }, Ot = "dbnMetricBatch", kt = "@dbn:metricQueryBatch", At = () => {
249
249
  try {
250
- let e = window.localStorage.getItem(Ot);
250
+ let e = window.localStorage.getItem(kt);
251
251
  if (e === "on" || e === "off") return e;
252
252
  } catch {}
253
253
  return null;
254
- }, At = (e) => {
254
+ }, jt = (e) => {
255
255
  try {
256
- e === null ? window.localStorage.removeItem(Ot) : window.localStorage.setItem(Ot, e);
256
+ e === null ? window.localStorage.removeItem(kt) : window.localStorage.setItem(kt, e);
257
257
  } catch {}
258
- }, jt = () => {
258
+ }, Mt = () => {
259
259
  try {
260
- let e = new URLSearchParams(window.location.search).get(Dt);
261
- (e === "on" || e === "off") && At(e);
260
+ let e = new URLSearchParams(window.location.search).get(Ot);
261
+ (e === "on" || e === "off") && jt(e);
262
262
  } catch {}
263
- }, Mt = () => typeof window > "u" || window.dbn?.disableMetricQueryBatch ? "off" : (jt(), kt() ?? "auto"), z = () => Mt() !== "off", Nt = /* @__PURE__ */ new Set(), B = () => {
263
+ }, Nt = () => typeof window > "u" || window.dbn?.disableMetricQueryBatch ? "off" : (Mt(), At() ?? "auto"), R = () => Nt() !== "off", Pt = /* @__PURE__ */ new Set(), z = () => {
264
264
  let e;
265
- return Nt.forEach((t) => {
265
+ return Pt.forEach((t) => {
266
266
  if (!e) try {
267
267
  let n = t();
268
268
  n && Object.keys(n).length && (e = n);
269
269
  } catch {}
270
270
  }), e;
271
- }, Pt = "/hasuraActions/externalMetricQueryBatch", Ft = "/api/v3/metric/queryBatch", It = [
271
+ }, Ft = "/hasuraActions/externalMetricQueryBatch", It = "/api/v3/metric/queryBatch", Lt = [
272
272
  404,
273
273
  405,
274
274
  501
275
- ], Lt = [
275
+ ], Rt = [
276
276
  200,
277
277
  400,
278
278
  401,
279
279
  403
280
- ], Rt = (e) => !!e.token || !!(e.isFrontendApp && e.clientId), V = (e = {}) => typeof window > "u" || typeof fetch != "function" || window.dbn?.isEnableProxyAuth ? null : Rt(e) ? "embed" : B() ? "platform" : null, zt = (e = "platform") => `${window.dbn?.baseUrl || c}${e === "embed" ? Ft : Pt}`, Bt = async (e, n, r = {}) => {
281
- let i = V(r);
280
+ ], zt = (e) => !!e.token || !!(e.isFrontendApp && e.clientId), B = (e = {}) => typeof window > "u" || typeof fetch != "function" || window.dbn?.isEnableProxyAuth ? null : zt(e) ? "embed" : z() ? "platform" : null, Bt = (e = "platform") => `${window.dbn?.baseUrl || c}${e === "embed" ? It : Ft}`, Vt = async (e, n, r = {}) => {
281
+ let i = B(r);
282
282
  if (!i) throw new v("No credentials available for batched queries");
283
283
  let a;
284
284
  if (i === "embed") a = await l({
285
- path: Ft,
285
+ path: It,
286
286
  method: "POST",
287
287
  signal: n,
288
288
  token: r.token,
@@ -292,9 +292,9 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
292
292
  throwOnHttpError: !1
293
293
  });
294
294
  else {
295
- let t = B();
295
+ let t = z();
296
296
  if (!t) throw new v("No access token available for batched queries");
297
- a = await fetch(zt(i), {
297
+ a = await fetch(Bt(i), {
298
298
  method: "POST",
299
299
  signal: n,
300
300
  headers: {
@@ -305,7 +305,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
305
305
  body: JSON.stringify({ input: { input: { requests: e } } })
306
306
  });
307
307
  }
308
- if (It.includes(a.status)) throw new _(`Batch endpoint responded ${a.status}`);
308
+ if (Lt.includes(a.status)) throw new _(`Batch endpoint responded ${a.status}`);
309
309
  let o;
310
310
  try {
311
311
  o = await a.json();
@@ -315,52 +315,52 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
315
315
  let s = t(o);
316
316
  if (s?.code === "UNAUTHORIZED_ORIGIN" || s?.details?.reason === "UNAUTHORIZED_ORIGIN") throw Object.assign(Error(s.message || "UNAUTHORIZED_ORIGIN"), s, { code: "UNAUTHORIZED_ORIGIN" });
317
317
  let c = o?.error && typeof o.error == "object" ? o.error : void 0;
318
- if (c && Lt.includes(a.status)) throw new v(c.message || "Unauthorized request!");
318
+ if (c && Rt.includes(a.status)) throw new v(c.message || "Unauthorized request!");
319
319
  if (a.status === 401 || a.status === 403) throw new v(`Batch endpoint responded ${a.status}`);
320
320
  if (!a.ok) throw Error(o?.message || `Batch request failed with status ${a.status}`);
321
321
  if (!Array.isArray(o?.results) && typeof o?.error != "string") throw new _("Batch endpoint response did not match the expected shape");
322
322
  return o;
323
- }, Vt = null, Ht = 50, Ut = 4, Wt = () => (Vt ||= new Et({
324
- transport: Bt,
323
+ }, Ht = null, Ut = 50, Wt = 4, Gt = () => (Ht ||= new Dt({
324
+ transport: Vt,
325
325
  coalesceWindowMs: 500,
326
- visibleCoalesceWindowMs: Ht,
327
- coalesceIdleMs: wt,
328
- coalesceMaxWaitMs: Tt,
329
- coldHeadSize: Ut
330
- }), Vt), Gt = async ({ payload: e, savedMetricQuery: t, dbName: n, savedMetricIdentifiers: r, clientId: i, key: a, hints: o, batchPolicy: s, session: c, single: l }) => {
326
+ visibleCoalesceWindowMs: Ut,
327
+ coalesceIdleMs: Tt,
328
+ coalesceMaxWaitMs: Et,
329
+ coldHeadSize: Wt
330
+ }), Ht), Kt = async ({ payload: e, savedMetricQuery: t, dbName: n, savedMetricIdentifiers: r, clientId: i, key: a, hints: o, batchPolicy: s, session: c, single: l }) => {
331
331
  t !== void 0 && ke(t, "metric.query", n), De(r);
332
- let u = qe(e);
333
- if (!z()) return l(u);
334
- let d = V(c);
335
- if (!d || !bt(u, o).eligible) return l(u);
332
+ let u = Je(e);
333
+ if (!R()) return l(u);
334
+ let d = B(c);
335
+ if (!d || !xt(u, o).eligible) return l(u);
336
336
  let f = {
337
- request: xt(a, u, i, d, c?.token),
337
+ request: St(a, u, i, d, c?.token),
338
338
  fallback: () => l(u),
339
339
  batchPolicy: s,
340
340
  session: c
341
341
  };
342
- return Wt().enqueue(f);
343
- }, Kt = dt("standard"), qt = 134217728, Jt = /* @__PURE__ */ new WeakMap(), Yt = (e, t = /* @__PURE__ */ new WeakSet()) => {
342
+ return Gt().enqueue(f);
343
+ }, qt = ft("standard"), Jt = 134217728, Yt = /* @__PURE__ */ new WeakMap(), Xt = (e, t = /* @__PURE__ */ new WeakSet()) => {
344
344
  if (e == null) return 0;
345
345
  if (typeof e == "string") return e.length * 2;
346
346
  if (typeof e == "number" || typeof e == "bigint") return 8;
347
347
  if (typeof e == "boolean") return 4;
348
348
  if (typeof e != "object") return 0;
349
- let n = e, r = Jt.get(n);
349
+ let n = e, r = Yt.get(n);
350
350
  if (r !== void 0) return r;
351
351
  if (t.has(n)) return 0;
352
352
  t.add(n);
353
353
  let i = 32;
354
- if (Array.isArray(e)) for (let n of e) i += 8 + Yt(n, t);
355
- else for (let [n, r] of Object.entries(e)) i += n.length * 2 + 8 + Yt(r, t);
356
- return Jt.set(n, i), i;
357
- }, Xt = (e, { maxEntries: t = 128, maxBytes: n = qt } = {}) => {
354
+ if (Array.isArray(e)) for (let n of e) i += 8 + Xt(n, t);
355
+ else for (let [n, r] of Object.entries(e)) i += n.length * 2 + 8 + Xt(r, t);
356
+ return Yt.set(n, i), i;
357
+ }, Zt = (e, { maxEntries: t = 128, maxBytes: n = Jt } = {}) => {
358
358
  let i = e.getQueryCache().findAll({
359
359
  queryKey: [r],
360
360
  type: "inactive"
361
361
  }).map((e) => ({
362
362
  query: e,
363
- bytes: Yt(e.state.data)
363
+ bytes: Xt(e.state.data)
364
364
  })).sort((e, t) => e.query.state.dataUpdatedAt - t.query.state.dataUpdatedAt), a = i.reduce((e, t) => e + t.bytes, 0);
365
365
  for (; i.length > t || a > n && i.length > 1;) {
366
366
  let t = i.shift();
@@ -371,11 +371,11 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
371
371
  type: "inactive"
372
372
  });
373
373
  }
374
- }, Zt = /* @__PURE__ */ new WeakSet(), Qt = (e) => {
375
- if (Zt.has(e)) return;
376
- Zt.add(e);
374
+ }, Qt = /* @__PURE__ */ new WeakSet(), $t = (e) => {
375
+ if (Qt.has(e)) return;
376
+ Qt.add(e);
377
377
  let t = () => {
378
- Zt.delete(e), Xt(e);
378
+ Qt.delete(e), Zt(e);
379
379
  }, n = globalThis.scheduler;
380
380
  if (typeof n?.postTask == "function") {
381
381
  n.postTask(t, { priority: "background" });
@@ -386,37 +386,37 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
386
386
  return;
387
387
  }
388
388
  setTimeout(t, 0);
389
- }, $t = (e) => {
389
+ }, en = (e) => {
390
390
  let t = Object.getPrototypeOf(e);
391
391
  return (t === Object.prototype || t === null) && !("toJSON" in e);
392
- }, H = (e, t) => {
392
+ }, V = (e, t) => {
393
393
  if (e === t) return !0;
394
394
  if (e === null || t === null || typeof e != "object" || typeof t != "object") return !1;
395
395
  if (Array.isArray(e)) {
396
396
  if (!Array.isArray(t) || e.length !== t.length) return !1;
397
- for (let n = 0; n < e.length; n += 1) if (!H(e[n], t[n])) return !1;
397
+ for (let n = 0; n < e.length; n += 1) if (!V(e[n], t[n])) return !1;
398
398
  return !0;
399
399
  }
400
- if (Array.isArray(t) || !$t(e) || !$t(t)) return !1;
400
+ if (Array.isArray(t) || !en(e) || !en(t)) return !1;
401
401
  let n = Object.keys(e);
402
402
  if (n.length !== Object.keys(t).length) return !1;
403
- for (let r of n) if (!Object.hasOwn(t, r) || !H(e[r], t[r])) return !1;
403
+ for (let r of n) if (!Object.hasOwn(t, r) || !V(e[r], t[r])) return !1;
404
404
  return !0;
405
- }, en = "dbn:metric-query:guest-principal:v1", U = 8, tn = /* @__PURE__ */ new Map(), nn = (e) => {
405
+ }, tn = "dbn:metric-query:guest-principal:v1", H = 8, U = /* @__PURE__ */ new Map(), nn = (e) => {
406
406
  if (!e) return;
407
- let t = tn.get(e);
407
+ let t = U.get(e);
408
408
  if (t !== void 0) return t;
409
- let n = gt.default.HmacSHA256(e, en).toString(gt.default.enc.Hex);
410
- if (tn.size >= U) {
411
- let e = tn.keys().next().value;
412
- e !== void 0 && tn.delete(e);
409
+ let n = _t.default.HmacSHA256(e, tn).toString(_t.default.enc.Hex);
410
+ if (U.size >= H) {
411
+ let e = U.keys().next().value;
412
+ e !== void 0 && U.delete(e);
413
413
  }
414
- return tn.set(e, n), n;
414
+ return U.set(e, n), n;
415
415
  }, rn = "dbn:metric-query:client-scope:v1", an = 16, on = /* @__PURE__ */ new Map(), sn = (e) => {
416
416
  if (!e) return;
417
417
  let t = on.get(e);
418
418
  if (t !== void 0) return t;
419
- let n = gt.default.HmacSHA256(e, rn).toString(gt.default.enc.Hex);
419
+ let n = _t.default.HmacSHA256(e, rn).toString(_t.default.enc.Hex);
420
420
  if (on.size >= an) {
421
421
  let e = on.keys().next().value;
422
422
  e !== void 0 && on.delete(e);
@@ -439,7 +439,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
439
439
  if (!e) return;
440
440
  let t = ln.get(e);
441
441
  if (t !== void 0) return t;
442
- let n = e, r = gt.default.SHA256(JSON.stringify(cn.map((e) => n[e] ?? null))).toString(gt.default.enc.Hex).slice(0, 16);
442
+ let n = e, r = _t.default.SHA256(JSON.stringify(cn.map((e) => n[e] ?? null))).toString(_t.default.enc.Hex).slice(0, 16);
443
443
  return ln.set(e, r), r;
444
444
  }, dn = (e, t, n) => {
445
445
  if (!t) return e;
@@ -473,7 +473,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
473
473
  if (typeof e != "object" || !e) return gn(e);
474
474
  let t = W.get(e);
475
475
  if (t !== void 0) return t;
476
- let n = e.id, r = typeof n == "string" ? hn.get(n) : void 0, i = r && H(r.payload, e) ? r.hash : gn(e);
476
+ let n = e.id, r = typeof n == "string" ? hn.get(n) : void 0, i = r && V(r.payload, e) ? r.hash : gn(e);
477
477
  return W.set(e, i), typeof n == "string" && _n(n, e, i), i;
478
478
  }, yn = (e) => `[${e.map((e, t) => t === 1 ? vn(e) : gn(e)).join(",")}]`, bn = ({ queryName: e, workspaceId: t, guestToken: n, isFrontendApp: r, encryptedClientId: i }) => [
479
479
  e,
@@ -483,8 +483,8 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
483
483
  isFrontendApp: r,
484
484
  encryptedClientId: i
485
485
  }
486
- ], xn = ({ clientId: e, clientCacheScope: t, metricRevision: a, data: o, token: s, isFrontendApp: c, isFullScreen: l = "", batchHints: u, savedMetricQuery: d, savedMetricIdentifiers: p, dbName: m, timeoutMs: _ = Ct }, v) => {
487
- let y = g(), b = ft(Kt), x = !!o.id && !v?.isDisableQuery && (!c || !!e), ee = fn({
486
+ ], xn = ({ clientId: e, clientCacheScope: t, metricRevision: a, data: o, token: s, isFrontendApp: c, isFullScreen: l = "", batchHints: u, savedMetricQuery: d, savedMetricIdentifiers: p, dbName: m, timeoutMs: _ = wt }, v) => {
487
+ let y = g(), b = pt(qt), x = !!o.id && !v?.isDisableQuery && (!c || !!e), ee = fn({
488
488
  queryName: r,
489
489
  data: o,
490
490
  clientId: e,
@@ -494,7 +494,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
494
494
  isFullScreen: l,
495
495
  metricRevision: a
496
496
  });
497
- F(() => {
497
+ P(() => {
498
498
  D() && f("metric-query-enabled-state", {
499
499
  isQueryEnabled: x,
500
500
  hasMetricId: !!o.id,
@@ -540,13 +540,13 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
540
540
  token: s,
541
541
  timeoutMs: _
542
542
  });
543
- }, C = Ze({
543
+ }, C = Qe({
544
544
  queryKey: ee,
545
545
  queryKeyHashFn: yn,
546
546
  queryFn: () => (D() && f("metric-query-dispatch", {
547
547
  metricId: o?.id,
548
548
  payload: te(o)
549
- }), Gt({
549
+ }), Kt({
550
550
  batchPolicy: b,
551
551
  payload: o,
552
552
  savedMetricQuery: d,
@@ -570,7 +570,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
570
570
  retry: (e, t) => n(t).code !== "UNAUTHORIZED_ORIGIN" && !h(t) && e < 2,
571
571
  staleTime: 3e5,
572
572
  gcTime: 9e5
573
- }), w = yn(ee), E = I(() => ({
573
+ }), w = yn(ee), E = F(() => ({
574
574
  queryHash: w,
575
575
  dataUpdatedAt: C.dataUpdatedAt,
576
576
  errorUpdatedAt: C.errorUpdatedAt,
@@ -588,10 +588,10 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
588
588
  C.isError,
589
589
  C.data,
590
590
  C.error
591
- ]), O = L(o);
591
+ ]), O = I(o);
592
592
  O.current = o;
593
- let k = L(v);
594
- return k.current = v, F(() => {
593
+ let k = I(v);
594
+ return k.current = v, P(() => {
595
595
  if (!E.isSuccess || E.fetchStatus !== "idle") return;
596
596
  let e = E.data;
597
597
  D() && f("metric-query-success", {
@@ -599,8 +599,8 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
599
599
  responseDataType: typeof e?.data,
600
600
  responseRowCount: Array.isArray(e?.data) ? e?.data?.length : void 0,
601
601
  totalRecords: e?.totalRecords
602
- }), k.current?.onSuccess?.(e), Qt(y);
603
- }, [E, y]), F(() => () => Qt(y), [y]), F(() => {
602
+ }), k.current?.onSuccess?.(e), $t(y);
603
+ }, [E, y]), P(() => () => $t(y), [y]), P(() => {
604
604
  if (E.fetchStatus !== "idle" || !E.isSuccess && !E.isError) return;
605
605
  let e = E.data, t = E.error;
606
606
  D() && f("metric-query-settled", {
@@ -618,7 +618,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
618
618
  clientId: r
619
619
  })), Cn = (e, t, n, r) => {
620
620
  let { token: i } = he(), a = n ? "" : t || i || "";
621
- return Ze({
621
+ return Qe({
622
622
  queryKey: bn({
623
623
  queryName: s,
624
624
  workspaceId: e,
@@ -697,7 +697,7 @@ var mt = dt({}), ht = () => ft(mt), gt = /* @__PURE__ */ e(Me()), _t = /;\s*$/,
697
697
  isSingleValueChart: i,
698
698
  value: a
699
699
  }), Pn = ({ query: e, limit: t, offset: n, dbName: r }) => {
700
- let i = Le === r?.toLowerCase(), a = [M, k].includes(r?.toLowerCase() || ""), o = Pe === r?.toLowerCase(), s = (e) => n ? `OFFSET ${n} LIMIT ${e}` : `LIMIT ${e}`, c = vt(e), l = (c?.toLowerCase() ?? "").includes("order"), u = parseInt(t, 10);
700
+ let i = Le === r?.toLowerCase(), a = [Ue, k].includes(r?.toLowerCase() || ""), o = Pe === r?.toLowerCase(), s = (e) => n ? `OFFSET ${n} LIMIT ${e}` : `LIMIT ${e}`, c = yt(e), l = (c?.toLowerCase() ?? "").includes("order"), u = parseInt(t, 10);
701
701
  if (c?.toLowerCase().includes("limit")) {
702
702
  let e = parseInt(c?.toLowerCase().split("limit")?.[1]?.trim() ?? "0", 10), r = n ? t : Math.min(e, u);
703
703
  o ? (c = c.replace(`limit ${e}`, s(r)), c = c.replace(`LIMIT ${e}`, s(r))) : a || i ? (c = c.replace(`limit ${e}`, `${l || i || o ? "" : "order by(select null)"} ${`offset ${n || 0} rows`} fetch next ${r} rows only`), c = c.replace(`LIMIT ${e}`, `${l || i || o ? "" : " ORDER BY(SELECT NULL) "} OFFSET ${n || 0} ROWS FETCH NEXT ${r} ROWS ONLY`)) : (c = c.replace(`limit ${e}`, `limit ${r} ${n ? `OFFSET ${n}` : ""}`), c = c.replace(`LIMIT ${e}`, `LIMIT ${r} ${n ? `OFFSET ${n}` : ""}`));
@@ -725,7 +725,7 @@ function Ln(e, t) {
725
725
  });
726
726
  }
727
727
  var Rn = ({ datasourceId: e, clientName: t, dbName: n, tenancyType: r, values: i, query: a, companyId: o, workspaceId: s, metricId: c, dashboardId: l, token: u, isFrontendApp: d, encryptedClientId: f, globalFilters: p, isAllClient: m, rlsConditions: h, dataMartRelationships: g, customSql: _, isEnableCustomSQL: v, drillFilters: y }) => {
728
- let { mutateAsync: b } = w(), { data: x } = Cn(s, void 0, d, f), ee = x?.weekStartDay === "sunday" ? "sunday" : "monday", S = L(/* @__PURE__ */ new Map()), C = L({
728
+ let { mutateAsync: b } = w(), { data: x } = Cn(s, void 0, d, f), ee = x?.weekStartDay === "sunday" ? "sunday" : "monday", S = I(/* @__PURE__ */ new Map()), C = I({
729
729
  token: u,
730
730
  epoch: 0
731
731
  });
@@ -734,12 +734,12 @@ var Rn = ({ datasourceId: e, clientName: t, dbName: n, tenancyType: r, values: i
734
734
  epoch: C.current.epoch + 1
735
735
  });
736
736
  let te = C.current.epoch;
737
- return F(() => {
737
+ return P(() => {
738
738
  let e = S.current;
739
739
  return () => {
740
740
  e.clear();
741
741
  };
742
- }, []), { getUnderlyingData: P(({ columnName: x, dataType: C, expressionSql: w, value: T, setData: E, setLoading: D, isSingleValueChart: O, clientColumnType: k, limit: re, offset: ie, search: ae, searchColumns: oe, setTotalRecords: se, pointFilters: ce, onError: le, withoutFilters: ue }) => {
742
+ }, []), { getUnderlyingData: N(({ columnName: x, dataType: C, expressionSql: w, value: T, setData: E, setLoading: D, isSingleValueChart: O, clientColumnType: k, limit: re, offset: ie, search: ae, searchColumns: oe, setTotalRecords: se, pointFilters: ce, onError: le, withoutFilters: ue }) => {
743
743
  let de = r === "MULTI_DATABASE" && t || "", fe = v && _ ? _ : re !== void 0 || ie !== void 0 ? a : Pn({
744
744
  query: a,
745
745
  limit: "5000",
@@ -747,7 +747,7 @@ var Rn = ({ datasourceId: e, clientName: t, dbName: n, tenancyType: r, values: i
747
747
  }), pe = ue ? {
748
748
  ...p,
749
749
  filters: p.filters.filter((e) => e.isVariableFilter)
750
- } : p, me = h, he = Ge({
750
+ } : p, me = h, he = Ke({
751
751
  clientColumnType: k,
752
752
  query: fe || "",
753
753
  dbName: n,
@@ -759,7 +759,7 @@ var Rn = ({ datasourceId: e, clientName: t, dbName: n, tenancyType: r, values: i
759
759
  isAllClient: m,
760
760
  dataMartRelationships: g,
761
761
  weekStartDay: ee
762
- }), ge = O && !v ? nt(he) : he, _e = An(y, ce) ? Nn({
762
+ }), ge = O && !v ? rt(he) : he, _e = An(y, ce) ? Nn({
763
763
  columnName: x,
764
764
  dataType: C,
765
765
  drillFilters: ce?.length ? [...y ?? [], ...ce] : y,
@@ -1587,10 +1587,10 @@ var Dr = "Empty", Or = (e) => e !== void 0 && (typeof e != "string" || e.trim()
1587
1587
  measures: t || [],
1588
1588
  filters: []
1589
1589
  };
1590
- }), ni = (e) => (e || []).map((e) => e?.alias || "").filter((e) => !!e), ri = (e) => e?.value === null ? {
1590
+ }), ni = (e) => !!e && !e.measures?.length, ri = (e) => (e || []).map((e) => e?.alias || "").filter((e) => !!e), ii = (e) => e?.value === null ? {
1591
1591
  ...e,
1592
1592
  operator: "isNull"
1593
- } : e, ii = ({ config: e, clickedLevelIndex: t, isReset: n, clickedValue: r, rowFilters: i, adhocDescent: a, enrichFilter: o = (e) => e }) => {
1593
+ } : e, ai = ({ config: e, clickedLevelIndex: t, isReset: n, clickedValue: r, rowFilters: i, adhocDescent: a, enrichFilter: o = (e) => e }) => {
1594
1594
  let s = e?.levels || [], c = s.find((e) => t ? e?.index === t : e?.isEnable), l = s.findIndex((e) => t ? e?.index === t : e?.isEnable), u = l >= 0 && l < s.length - 1, d = u ? s[l + 1] : s[0], f = c?.dimensions?.[0]?.alias, p = i || [];
1595
1595
  if (!c || n) return {
1596
1596
  config: {
@@ -1622,7 +1622,7 @@ var Dr = "Empty", Or = (e) => e !== void 0 && (typeof e != "string" || e.trim()
1622
1622
  outcome: "jump"
1623
1623
  };
1624
1624
  if (a) {
1625
- let t = a.parentFilters || [], n = typeof r == "string" && r.trim() === "", i = r != null && !n && !!a.columnName, l = (e) => e.filter((e) => Or(e.value)), u = l(a.pointFilters ?? []), d = l(p.map(ri).map(o)), f = u.length ? [...t, ...u] : d.length ? [...t, ...d] : i ? [...t, o({
1625
+ let t = a.parentFilters || [], n = typeof r == "string" && r.trim() === "", i = r != null && !n && !!a.columnName, l = (e) => e.filter((e) => Or(e.value)), u = l(a.pointFilters ?? []), d = l(p.map(ii).map(o)), f = u.length ? [...t, ...u] : d.length ? [...t, ...d] : i ? [...t, o({
1626
1626
  columnName: a.columnName,
1627
1627
  value: r
1628
1628
  })] : t;
@@ -1646,7 +1646,7 @@ var Dr = "Empty", Or = (e) => e !== void 0 && (typeof e != "string" || e.trim()
1646
1646
  ...e,
1647
1647
  levels: s.map((e) => e?.index === d?.index ? {
1648
1648
  ...e,
1649
- filters: u ? [...c?.filters || [], ...p.length ? p.map(ri).map(o) : [o({
1649
+ filters: u ? [...c?.filters || [], ...p.length ? p.map(ii).map(o) : [o({
1650
1650
  columnName: f,
1651
1651
  value: r
1652
1652
  })]] : [],
@@ -1674,22 +1674,22 @@ var Dr = "Empty", Or = (e) => e !== void 0 && (typeof e != "string" || e.trim()
1674
1674
  },
1675
1675
  outcome: "stay"
1676
1676
  };
1677
- }, ai = {
1677
+ }, oi = {
1678
1678
  "no-subset": "no-subset",
1679
1679
  "no-reachable-columns": "no-reachable-columns",
1680
1680
  "all-dimensions-used": "all-dimensions-used",
1681
1681
  "max-depth-reached": "max-depth-reached",
1682
1682
  "custom-sql": "custom-sql"
1683
- }, oi = ({ position: e, hasAuthoredNextLevel: t, pool: n, canDrillIntoAnyDimension: r }) => {
1683
+ }, si = ({ position: e, hasAuthoredNextLevel: t, pool: n, canDrillIntoAnyDimension: r }) => {
1684
1684
  if (t) return "underlying-data-not-permitted";
1685
1685
  if (r) {
1686
1686
  if (n?.groups?.length) return "underlying-data-not-permitted";
1687
- if (n?.unavailableReason) return ai[n.unavailableReason];
1687
+ if (n?.unavailableReason) return oi[n.unavailableReason];
1688
1688
  if (e.currentDepth >= 3) return "max-depth-reached";
1689
1689
  }
1690
1690
  return "hierarchy-exhausted";
1691
1691
  };
1692
- function si(e) {
1692
+ function ci(e) {
1693
1693
  if (e.resultState === "failed") return {
1694
1694
  kind: "none",
1695
1695
  reason: "query-failed"
@@ -1708,10 +1708,10 @@ function si(e) {
1708
1708
  isOpenInNewTab: t.isOpenInNewTab
1709
1709
  } : e.canViewUnderlyingData ? { kind: "viewRecords" } : {
1710
1710
  kind: "none",
1711
- reason: oi(e)
1711
+ reason: si(e)
1712
1712
  };
1713
1713
  }
1714
- var ci = {
1714
+ var li = {
1715
1715
  "hierarchy-exhausted": {
1716
1716
  title: "There is nothing further to break this down by",
1717
1717
  body: "This is the whole breakdown this chart is set up for."
@@ -1748,12 +1748,16 @@ var ci = {
1748
1748
  title: "This one is blank, so there is nothing to open",
1749
1749
  body: "Pick a point with a name on it, or go back a step."
1750
1750
  },
1751
+ "level-without-measure": {
1752
+ title: "The next step was saved without a measure, so it has no values to show",
1753
+ body: "The chart author can add a measure to this step in the metric editor."
1754
+ },
1751
1755
  "query-failed": {
1752
1756
  title: "This did not load",
1753
1757
  body: "Try again, or go back a step."
1754
1758
  }
1755
1759
  };
1756
- function li(e) {
1760
+ function ui(e) {
1757
1761
  switch (e.kind) {
1758
1762
  case "viewRecords": return {
1759
1763
  title: "Look at the rows behind this",
@@ -1770,20 +1774,20 @@ function li(e) {
1770
1774
  body: "Another chart is set up to pick up from what you picked here.",
1771
1775
  cta: "Open chart"
1772
1776
  };
1773
- default: return ci[e.reason];
1777
+ default: return li[e.reason];
1774
1778
  }
1775
1779
  }
1776
1780
  //#endregion
1777
1781
  //#region src/helpers/metricFilterExportState.ts
1778
- var ui = (e, t, n) => n?.length ? {
1782
+ var di = (e, t, n) => n?.length ? {
1779
1783
  ...e,
1780
1784
  [t]: n
1781
- } : Object.fromEntries(Object.entries(e).filter(([e]) => e !== t)), di = ({ metricId: e, filters: t, onChange: n }) => {
1785
+ } : Object.fromEntries(Object.entries(e).filter(([e]) => e !== t)), fi = ({ metricId: e, filters: t, onChange: n }) => {
1782
1786
  e && n?.(e, t);
1783
- }, fi = (e) => e.find(([, e, t]) => !Array.isArray(e) || !t && e.length === 0)?.[0], pi = (e, t) => {
1787
+ }, pi = (e) => e.find(([, e, t]) => !Array.isArray(e) || !t && e.length === 0)?.[0], mi = (e, t) => {
1784
1788
  let n = e?.chartType, r = n === "pivotV2" || n === "pivot table 2";
1785
1789
  if (!r && n !== "pivotV3" && n !== "pivot table 3") return { renderEmpty: !1 };
1786
- let i = fi(r ? [
1790
+ let i = pi(r ? [
1787
1791
  ["chartOptions.pivotTableSettings2.dimensions", e?.pivotTableSettings2?.dimensions],
1788
1792
  [
1789
1793
  "chartOptions.pivotTableSettings2.headers",
@@ -1801,7 +1805,7 @@ var ui = (e, t, n) => n?.length ? {
1801
1805
  renderEmpty: !0,
1802
1806
  missingField: i
1803
1807
  };
1804
- let a = t?.newDatasetSettings, o = fi([
1808
+ let a = t?.newDatasetSettings, o = pi([
1805
1809
  ["datasetMetricSettings.newDatasetSettings.selectedDims", a?.selectedDims],
1806
1810
  ["datasetMetricSettings.newDatasetSettings.selectedMetrics", a?.selectedMetrics],
1807
1811
  [
@@ -1814,31 +1818,31 @@ var ui = (e, t, n) => n?.length ? {
1814
1818
  renderEmpty: !0,
1815
1819
  missingField: o
1816
1820
  } : { renderEmpty: !1 };
1817
- }, mi = 100, hi = (e) => {
1818
- let [t, n] = R(e);
1819
- return F(() => {
1821
+ }, hi = 100, gi = (e) => {
1822
+ let [t, n] = L(e);
1823
+ return P(() => {
1820
1824
  if (e) {
1821
1825
  n(!0);
1822
1826
  return;
1823
1827
  }
1824
- let t = setTimeout(() => n(!1), mi);
1828
+ let t = setTimeout(() => n(!1), hi);
1825
1829
  return () => clearTimeout(t);
1826
1830
  }, [e]), t;
1827
- }, gi = (e, t) => !(!e || e.isLoading !== !0 || e.key !== t || e.data?.data?.length), _i = ({ clientId: e, guestToken: t, isFrontendApp: n }) => JSON.stringify({
1831
+ }, _i = (e, t) => !(!e || e.isLoading !== !0 || e.key !== t || e.data?.data?.length), vi = ({ clientId: e, guestToken: t, isFrontendApp: n }) => JSON.stringify({
1828
1832
  clientId: e,
1829
1833
  guestToken: t || "",
1830
1834
  isFrontendApp: n
1831
- }), vi = ({ query: e, clientId: t, isFrontendApp: n }) => JSON.stringify({
1835
+ }), yi = ({ query: e, clientId: t, isFrontendApp: n }) => JSON.stringify({
1832
1836
  query: e,
1833
1837
  tenant: {
1834
1838
  clientId: t,
1835
1839
  isFrontendApp: n
1836
1840
  }
1837
- }), yi = (e, t) => e?.includes(t) ? e : [...e || [], t], bi = (e, t) => e?.includes(t) ? e.filter((e) => e !== t) : e, xi = (e, t) => !!(e && e.data?.data === t.data && e.data?.name === t.name && e.data?.description === t.description && e.isLoading === t.isLoading && e.key === t.key), Si = (e) => e.isMetric !== !1 || e.elementSettings?.elementType?.value === "metricExpression", Ci = ({ metric: e, isAllClient: t, tenancyLevel: n, appliedMetricFilters: r, firstLoadAppliedMetricFilters: i, tableColumnFilters: a, chartSettings: o, isPythonMode: s, globalFilters: c, filterValues: l, tableLimit: u, calendarType: d, comparisonCount: f, datasourceId: p, drillConfig: m, isFrontendApp: h, guestToken: g }) => ({
1841
+ }), bi = (e, t) => e?.includes(t) ? e : [...e || [], t], xi = (e, t) => e?.includes(t) ? e.filter((e) => e !== t) : e, Si = (e, t) => !!(e && e.data?.data === t.data && e.data?.name === t.name && e.data?.description === t.description && e.isLoading === t.isLoading && e.key === t.key), Ci = (e) => e.isMetric !== !1 || e.elementSettings?.elementType?.value === "metricExpression", wi = ({ metric: e, isAllClient: t, tenancyLevel: n, appliedMetricFilters: r, firstLoadAppliedMetricFilters: i, tableColumnFilters: a, chartSettings: o, isPythonMode: s, globalFilters: c, filterValues: l, tableLimit: u, calendarType: d, comparisonCount: f, datasourceId: p, drillConfig: m, isFrontendApp: h, guestToken: g }) => ({
1838
1842
  isAllClient: t,
1839
1843
  id: e?.id,
1840
1844
  tenancyLevel: n,
1841
- rlsConditions: [...(r?.length ? r : i) || [], ...o?.tableSettings?.isServerSidePagination && o?.chartType === A.table ? a.map((e) => e.condition).filter((e) => Je(e)) : []],
1845
+ rlsConditions: [...(r?.length ? r : i) || [], ...o?.tableSettings?.isServerSidePagination && o?.chartType === A.table ? a.map((e) => e.condition).filter((e) => Ye(e)) : []],
1842
1846
  globalFilters: s ? void 0 : {
1843
1847
  ...c,
1844
1848
  filters: c?.filters?.filter((e) => Array.isArray(e?.value) ? e?.value?.length : e)
@@ -1856,7 +1860,7 @@ var ui = (e, t, n) => n?.length ? {
1856
1860
  chartSeriesField: o?.seriesField !== "ungrouped" && o?.seriesField && o?.isDynamicSeries ? o?.seriesField : void 0,
1857
1861
  comparisonCount: f,
1858
1862
  dynamicXAxis: {
1859
- isEnable: !!(o?.dynamicXAxis?.isEnabled || o?.enduserMeasureAndDimensions?.isEnabled) && Xe.includes(o?.chartType || ""),
1863
+ isEnable: !!(o?.dynamicXAxis?.isEnabled || o?.enduserMeasureAndDimensions?.isEnabled) && Ze.includes(o?.chartType || ""),
1860
1864
  xaxis: o?.xAxis || "",
1861
1865
  customField: o?.dynamicXAxis?.selectedOption?.column
1862
1866
  },
@@ -1864,27 +1868,27 @@ var ui = (e, t, n) => n?.length ? {
1864
1868
  elementSettings: e?.elementSettings?.metricExpression,
1865
1869
  drillConfig: m,
1866
1870
  isEncrypted: !(h || !g)
1867
- }), wi = (e) => {
1871
+ }), Ti = (e) => {
1868
1872
  let t = e.object.customTable?.query;
1869
1873
  return e.object.wId ? !t || !t.includes("{{") : !1;
1870
- }, Ti = (e, t) => e.customTable ? "" : e.tableName ? ne(e.tableName, t) : e.tableName, Ei = (e, t) => {
1874
+ }, Ei = (e, t) => e.customTable ? "" : e.tableName ? ne(e.tableName, t) : e.tableName, Di = (e, t) => {
1871
1875
  if (!e.customColumnSql) return e.columnName ? ne(e.columnName, t) : e.columnName;
1872
- }, Di = (e) => {
1876
+ }, Oi = (e) => {
1873
1877
  let { object: t } = e, n = t.wId;
1874
1878
  return {
1875
1879
  ...t,
1876
- tableName: Ti(t, n),
1877
- columnName: Ei(t, n),
1880
+ tableName: Ei(t, n),
1881
+ columnName: Di(t, n),
1878
1882
  filter: t.filter?.length ? j(t.filter, n) : [],
1879
1883
  customTable: t.customTable?.query ? {
1880
1884
  query: ne(t.customTable.query, n),
1881
1885
  alias: ne(t.customTable.alias, n)
1882
1886
  } : t.customTable
1883
1887
  };
1884
- }, Oi = async (e, t, n) => {
1885
- if (wi(e)) try {
1888
+ }, ki = async (e, t, n) => {
1889
+ if (Ti(e)) try {
1886
1890
  let r = await t({
1887
- data: Di(e),
1891
+ data: Oi(e),
1888
1892
  encryptedClientId: n.isFrontendApp ? n.encryptedClientId || "" : n.clientId || "",
1889
1893
  isFrontendApp: !!n.isFrontendApp,
1890
1894
  token: n.token || ""
@@ -1893,7 +1897,7 @@ var ui = (e, t, n) => n?.length ? {
1893
1897
  } catch {
1894
1898
  return;
1895
1899
  }
1896
- }, ki = async ({ entries: e, fetchColumnValues: t, ctx: n, onSeed: r, onResolved: i, onLoading: a, onSettle: o, isCancelled: s }) => {
1900
+ }, Ai = async ({ entries: e, fetchColumnValues: t, ctx: n, onSeed: r, onResolved: i, onLoading: a, onSettle: o, isCancelled: s }) => {
1897
1901
  a(!0);
1898
1902
  let c = {};
1899
1903
  e?.forEach((e) => {
@@ -1904,24 +1908,24 @@ var ui = (e, t, n) => n?.length ? {
1904
1908
  if (s()) return;
1905
1909
  let o = e[r];
1906
1910
  a(!0);
1907
- let c = await Oi(o, t, n);
1911
+ let c = await ki(o, t, n);
1908
1912
  if (s()) return;
1909
1913
  c !== void 0 && i(o.element.name, c);
1910
1914
  }
1911
1915
  } finally {
1912
1916
  o();
1913
1917
  }
1914
- }, Ai = "Could not generate this metric summary. Try again.", ji = 1500, Mi = /* @__PURE__ */ new Map(), Ni = (e, t) => {
1915
- Mi.get(e) === t && Mi.delete(e), t.abandonTimer && clearTimeout(t.abandonTimer), t.abandonTimer = void 0;
1916
- }, Pi = (e) => {
1917
- Mi.forEach((t, n) => {
1918
- t.settledAt !== void 0 && e - t.settledAt >= 3e4 && Ni(n, t);
1919
- }), !(Mi.size <= 24) && [...Mi.entries()].filter(([, e]) => e.settledAt !== void 0).sort(([, e], [, t]) => (e.settledAt ?? 0) - (t.settledAt ?? 0)).slice(0, Math.max(0, Mi.size - 24)).forEach(([e, t]) => {
1920
- Ni(e, t);
1918
+ }, ji = "Could not generate this metric summary. Try again.", Mi = 1500, Ni = /* @__PURE__ */ new Map(), Pi = (e, t) => {
1919
+ Ni.get(e) === t && Ni.delete(e), t.abandonTimer && clearTimeout(t.abandonTimer), t.abandonTimer = void 0;
1920
+ }, Fi = (e) => {
1921
+ Ni.forEach((t, n) => {
1922
+ t.settledAt !== void 0 && e - t.settledAt >= 3e4 && Pi(n, t);
1923
+ }), !(Ni.size <= 24) && [...Ni.entries()].filter(([, e]) => e.settledAt !== void 0).sort(([, e], [, t]) => (e.settledAt ?? 0) - (t.settledAt ?? 0)).slice(0, Math.max(0, Ni.size - 24)).forEach(([e, t]) => {
1924
+ Pi(e, t);
1921
1925
  });
1922
- }, Fi = (e, t, n = Date.now) => {
1923
- Pi(n());
1924
- let r = Mi.get(e);
1926
+ }, Ii = (e, t, n = Date.now) => {
1927
+ Fi(n());
1928
+ let r = Ni.get(e);
1925
1929
  if (r) r.abandonTimer && (clearTimeout(r.abandonTimer), r.abandonTimer = void 0);
1926
1930
  else {
1927
1931
  let i = new AbortController(), a = {
@@ -1930,74 +1934,74 @@ var ui = (e, t, n) => n?.length ? {
1930
1934
  promise: Promise.resolve()
1931
1935
  };
1932
1936
  a.promise = t(i.signal).then((e) => (a.settledAt = n(), e), (t) => {
1933
- throw Ni(e, a), t;
1934
- }), a.promise.catch(() => void 0), Mi.set(e, a), r = a;
1937
+ throw Pi(e, a), t;
1938
+ }), a.promise.catch(() => void 0), Ni.set(e, a), r = a;
1935
1939
  }
1936
1940
  let i = r;
1937
1941
  i.holders += 1;
1938
1942
  let a = !1, o = () => {
1939
1943
  a || (a = !0, --i.holders, !(i.holders > 0 || i.settledAt !== void 0) && (i.abandonTimer ||= setTimeout(() => {
1940
- i.abandonTimer = void 0, !(i.holders > 0) && (i.controller.abort(), Ni(e, i));
1941
- }, ji)));
1944
+ i.abandonTimer = void 0, !(i.holders > 0) && (i.controller.abort(), Pi(e, i));
1945
+ }, Mi)));
1942
1946
  };
1943
1947
  return {
1944
1948
  promise: i.promise,
1945
1949
  release: o,
1946
1950
  abort: () => {
1947
- o(), i.controller.abort(), Ni(e, i);
1951
+ o(), i.controller.abort(), Pi(e, i);
1948
1952
  }
1949
1953
  };
1950
- }, Ii = {
1954
+ }, Li = {
1951
1955
  status: "idle",
1952
1956
  summary: "",
1953
1957
  error: "",
1954
1958
  empty: !1
1955
- }, Li = {
1956
- ...Ii,
1957
- status: "failed",
1958
- error: Ai
1959
1959
  }, Ri = {
1960
+ ...Li,
1961
+ status: "failed",
1962
+ error: ji
1963
+ }, zi = {
1960
1964
  status: "done",
1961
1965
  summary: "",
1962
1966
  error: "There is no data to summarize.",
1963
1967
  empty: !0
1964
- }, zi = () => {
1965
- let [e, t] = R(Ii), n = L(null), r = L(null), i = P(() => {
1968
+ }, Bi = () => {
1969
+ let [e, t] = L(Li), n = I(null), r = I(null), i = N(() => {
1966
1970
  let e = r.current;
1967
- r.current = null, n.current = null, e?.abort(), t(Ii);
1968
- }, []), a = P(() => {
1971
+ r.current = null, n.current = null, e?.abort(), t(Li);
1972
+ }, []), a = N(() => {
1969
1973
  let e = r.current;
1970
- r.current = null, e?.abort(), t(Ii);
1971
- }, []), o = P((e, i) => {
1974
+ r.current = null, e?.abort(), t(Li);
1975
+ }, []), o = N((e, i) => {
1972
1976
  if (n.current === e) return;
1973
1977
  if (n.current = e, r.current?.release(), r.current = null, !i) {
1974
- t(Ri);
1978
+ t(zi);
1975
1979
  return;
1976
1980
  }
1977
1981
  t({
1978
- ...Ii,
1982
+ ...Li,
1979
1983
  status: "running"
1980
1984
  });
1981
- let a = Fi(e, async (e) => {
1985
+ let a = Ii(e, async (e) => {
1982
1986
  try {
1983
1987
  let t = await i(e), n = t && typeof t == "object" && "summary" in t && typeof t.summary == "string" ? t.summary.trim() : "";
1984
1988
  return n ? {
1985
- ...Ii,
1989
+ ...Li,
1986
1990
  status: "done",
1987
1991
  summary: n
1988
- } : Ri;
1992
+ } : zi;
1989
1993
  } catch (e) {
1990
1994
  if (u(e)) throw e;
1991
- return Li;
1995
+ return Ri;
1992
1996
  }
1993
1997
  });
1994
1998
  r.current = a, a.promise.then((e) => {
1995
1999
  r.current === a && t(e);
1996
2000
  }, (e) => {
1997
- r.current === a && t(u(e) ? Ii : Li);
2001
+ r.current === a && t(u(e) ? Li : Ri);
1998
2002
  });
1999
2003
  }, []);
2000
- return F(() => () => {
2004
+ return P(() => () => {
2001
2005
  r.current?.release(), r.current = null, n.current = null;
2002
2006
  }, []), {
2003
2007
  state: e,
@@ -2005,90 +2009,90 @@ var ui = (e, t, n) => n?.length ? {
2005
2009
  stop: a,
2006
2010
  reset: i
2007
2011
  };
2008
- }, Bi = (e) => {
2009
- let t = L(e);
2010
- return t.current !== e && !H(t.current, e) && (t.current = e), t.current;
2012
+ }, Vi = (e) => {
2013
+ let t = I(e);
2014
+ return t.current !== e && !V(t.current, e) && (t.current = e), t.current;
2011
2015
  }, $ = (e) => {
2012
2016
  if (!e) return null;
2013
2017
  let t = new Date(e);
2014
2018
  return t instanceof Date && !Number.isNaN(t.getTime()) ? t : null;
2015
- }, Vi = (e) => Fe(e || {}) ? {
2019
+ }, Hi = (e) => Fe(e || {}) ? {
2016
2020
  startTime: e?.startTime,
2017
2021
  endTime: e?.endTime,
2018
2022
  isTimeFilter: !0
2019
- } : {}, Hi = ({ option: e, value: t }) => ({
2023
+ } : {}, Ui = ({ option: e, value: t }) => ({
2020
2024
  startDate: $(e?.fromDate) ?? $(e?.startDate) ?? void 0,
2021
2025
  endDate: $(e?.toDate) ?? $(e?.endDate) ?? void 0,
2022
- ...Vi(e),
2026
+ ...Hi(e),
2023
2027
  value: t,
2024
2028
  label: t
2025
- }), Ui = (e, t) => {
2029
+ }), Wi = (e, t) => {
2026
2030
  if (typeof e == "object" && e) return Reflect.get(e, t);
2027
- }, Wi = [], Gi = [], Ki = [], qi = (e, t) => {
2031
+ }, Gi = [], Ki = [], qi = [], Ji = (e, t) => {
2028
2032
  let n = t?.configV2?.levels?.find((e) => e?.isEnable)?.chartSettings;
2029
2033
  return n ? {
2030
2034
  ...e,
2031
2035
  ...n
2032
2036
  } : e;
2033
- }, Ji = ({ raw: e, selectedDims: t, selectedMetrics: n, datasetSettings: r, integrationName: i, isPythonMode: a }) => {
2037
+ }, Yi = ({ raw: e, selectedDims: t, selectedMetrics: n, datasetSettings: r, integrationName: i, isPythonMode: a }) => {
2034
2038
  let o = Jn({ data: e });
2035
- if (!o.rows.length) return Wi;
2039
+ if (!o.rows.length) return Gi;
2036
2040
  let s = se(o.rows, t || [], n || []), c = s;
2037
2041
  if (i?.toLowerCase() === "redshift" && !a) {
2038
- let e = r?.selectedMetrics || [], t = [...((r?.selectedDims)?.filter((e) => !et(e?.alias)) || [])?.map((e) => e.alias), ...e?.map((e) => e.alias)];
2039
- c = Ue(t, s);
2042
+ let e = r?.selectedMetrics || [], t = [...((r?.selectedDims)?.filter((e) => !tt(e?.alias)) || [])?.map((e) => e.alias), ...e?.map((e) => e.alias)];
2043
+ c = We(t, s);
2040
2044
  }
2041
- let l = ot(c);
2042
- return !Array.isArray(l) || !l.length ? Wi : l;
2043
- }, Yi = ({ metric: e, globalFilters: t = {
2045
+ let l = st(c);
2046
+ return !Array.isArray(l) || !l.length ? Gi : l;
2047
+ }, Xi = ({ metric: e, globalFilters: t = {
2044
2048
  tableName: "",
2045
2049
  filters: []
2046
- }, rlsFilters: n, clientId: r, tenancyLevel: i, isInternalApp: a, appFilters: s, setCrossDashboardFilters: c, crossDashboardFilters: l, enableCrossFilter: u, enableCrossFilterBeforeDrill: d = !1, metricFilterOptions: m, isAllClient: h, isFrontendApp: g, guestToken: _, encryptedClientId: v, clientCacheScope: y, dashboardId: w, workspaceId: T, metricStore: D, setMetricStore: k, summaryReferencedMetricIds: ne, onServerEvent: de, clientColumnType: he, datasourceId: ye, appliedCardMetricFilters: De, onMetricFiltersChange: ke, language: Me, translationDictionary: j, calendarType: Pe, setLoadedCardMetadata: Fe, isRulePending: Le = !1, setSettledCardIds: Be, drillUrlState: M, isFullScreen: Ue, setMetricMetadata: qe, viewMetricData: N, generatingPdf: Ze, dataMartTables: et, isDisableQuery: nt = !1, token: ct, drilledLevel: lt, drillFilters: ut, drillType: dt, underlyingDataDrillFilters: ft }) => {
2047
- let [mt, ht] = R(!1), gt = ee(), [_t, vt] = R(null), { state: yt, start: bt, stop: xt, reset: St } = zi(), Ct = yt.summary, wt = yt.error, Tt = yt.empty, Et = yt.status === "running", Dt = L(null), Ot = L(null), [kt, At] = R({
2050
+ }, rlsFilters: n, clientId: r, tenancyLevel: i, isInternalApp: a, appFilters: s, setCrossDashboardFilters: c, crossDashboardFilters: l, enableCrossFilter: u, enableCrossFilterBeforeDrill: d = !1, metricFilterOptions: m, isAllClient: h, isFrontendApp: g, guestToken: _, encryptedClientId: v, clientCacheScope: y, dashboardId: w, workspaceId: T, metricStore: D, setMetricStore: k, summaryReferencedMetricIds: ne, onServerEvent: de, clientColumnType: he, datasourceId: ye, appliedCardMetricFilters: De, onMetricFiltersChange: ke, language: Me, translationDictionary: j, calendarType: Pe, setLoadedCardMetadata: Fe, isRulePending: Le = !1, setSettledCardIds: Be, drillUrlState: Ue, isFullScreen: We, setMetricMetadata: Je, viewMetricData: M, generatingPdf: Qe, dataMartTables: tt, isDisableQuery: rt = !1, token: lt, drilledLevel: ut, drillFilters: dt, drillType: ft, underlyingDataDrillFilters: pt }) => {
2051
+ let [ht, gt] = L(!1), _t = ee(), [vt, yt] = L(null), { state: bt, start: xt, stop: St, reset: Ct } = Bi(), wt = bt.summary, Tt = bt.error, Et = bt.empty, Dt = bt.status === "running", Ot = I(null), kt = I(null), [At, jt] = L({
2048
2052
  limit: parseInt(e?.chartOptions?.tableSettings?.defaultRowSize || "100", 10),
2049
2053
  offset: 0
2050
- }), [jt, Mt] = R(0), [z, Nt] = R(0), [B, Pt] = R(e?.rlsConditions || []), [Ft, It] = R([]), [Lt, Rt] = R(!1), [V, zt] = R(), [Bt, Vt] = R(""), [Ht, Ut] = R([]), [Wt, Gt] = R({
2054
+ }), [Mt, Nt] = L(0), [R, Pt] = L(0), [z, Ft] = L(e?.rlsConditions || []), [It, Lt] = L([]), [Rt, zt] = L(!1), [B, Bt] = L(), [Vt, Ht] = L(""), [Ut, Wt] = L([]), [Gt, Kt] = L({
2051
2055
  isOpen: !1,
2052
2056
  report: "",
2053
2057
  isLoading: !1
2054
- }), [Kt, qt] = R(!1), [Jt, Yt] = R([]), Xt = ut ?? [], Zt = L(Xt), Qt = L(ft), $t = er(e?.drillDownSettings, {
2055
- drilledLevel: lt,
2056
- drillFilters: ut,
2057
- drillType: dt,
2058
- underlyingDataDrillFilters: ft
2059
- }), [H, en] = R(Xt), [U, tn] = R($t ?? {
2058
+ }), [qt, Jt] = L(!1), [Yt, Xt] = L([]), Zt = dt ?? [], Qt = I(Zt), $t = I(pt), en = er(e?.drillDownSettings, {
2059
+ drilledLevel: ut,
2060
+ drillFilters: dt,
2061
+ drillType: ft,
2062
+ underlyingDataDrillFilters: pt
2063
+ }), [V, tn] = L(Zt), [H, U] = L(en ?? {
2060
2064
  isEnableGroupBy: !1,
2061
2065
  isEnableCrossFilter: !1,
2062
2066
  drillType: ""
2063
2067
  }), nn = !a && d === !0, rn = Sr({
2064
2068
  runtimeEnabled: u,
2065
2069
  metricEnabled: e?.drillDownSettings?.isEnableCrossFilter
2066
- }), [an, on] = R([]), [sn, cn] = R([]), [ln, dn] = R(!1), [fn, pn] = R(!1), [W, mn] = R([]), hn = L(ke);
2070
+ }), [an, on] = L([]), [sn, cn] = L([]), [ln, dn] = L(!1), [fn, pn] = L(!1), [W, mn] = L([]), hn = I(ke);
2067
2071
  hn.current = ke;
2068
- let gn = P((t) => {
2072
+ let gn = N((t) => {
2069
2073
  mn((n) => {
2070
2074
  let r = typeof t == "function" ? t(n) : t;
2071
- return di({
2075
+ return fi({
2072
2076
  metricId: e?.id,
2073
2077
  filters: r,
2074
2078
  onChange: hn.current
2075
2079
  }), r;
2076
2080
  });
2077
- }, [e?.id]), [_n, vn] = R({}), [yn, bn] = R(!1), [Sn, wn] = R(null), [G, K] = R(qi(e?.chartOptions, e?.drillDownSettings)), Tn = L(""), [En, Dn] = R({
2081
+ }, [e?.id]), [_n, vn] = L({}), [yn, bn] = L(!1), [Sn, wn] = L([]), [G, K] = L(Ji(e?.chartOptions, e?.drillDownSettings)), Tn = I(""), [En, Dn] = L({
2078
2082
  data: [],
2079
2083
  error: "",
2080
2084
  isLoading: !1,
2081
2085
  currentValue: ""
2082
- }), q = I(() => !!e?.datasetMetricSettings?.newDatasetSettings?.isPythonMode, [e?.datasetMetricSettings?.newDatasetSettings?.isPythonMode]), On = P((e) => Je(e) ? !0 : e?.isAddOnMetrics && e?.datatype === "date" ? !1 : !!(e?.isAddOnMetrics && e?.client?.isEnable && e?.client?.columnName && e?.client?.as && !h && r), [r, h]), kn = I(() => e?.externalDashboardMetrics?.[0]?.externalDashboard?.companyWorkspace?.datamart?.datamartRelationships || [], [e]), An = I(() => {
2086
+ }), q = F(() => !!e?.datasetMetricSettings?.newDatasetSettings?.isPythonMode, [e?.datasetMetricSettings?.newDatasetSettings?.isPythonMode]), On = N((e) => Ye(e) ? !0 : e?.isAddOnMetrics && e?.datatype === "date" ? !1 : !!(e?.isAddOnMetrics && e?.client?.isEnable && e?.client?.columnName && e?.client?.as && !h && r), [r, h]), kn = F(() => e?.externalDashboardMetrics?.[0]?.externalDashboard?.companyWorkspace?.datamart?.datamartRelationships || [], [e]), An = F(() => {
2083
2087
  let e = {};
2084
2088
  if (n?.values) for (let t in n.values) {
2085
2089
  let r = `${t}_variable`;
2086
2090
  e[r] = n.values[t];
2087
2091
  }
2088
2092
  return e;
2089
- }, [n?.values]), jn = I(() => {
2093
+ }, [n?.values]), jn = F(() => {
2090
2094
  let t = e?.datasetMetricSettings?.newDatasetSettings?.selectedMainTable;
2091
- return (et?.find((e) => e.tableName === t?.tableName))?.customColumnFields?.map((n) => ({
2095
+ return (tt?.find((e) => e.tableName === t?.tableName))?.customColumnFields?.map((n) => ({
2092
2096
  value: n?.columnName,
2093
2097
  label: n?.columnName,
2094
2098
  isCustomField: !0,
@@ -2118,15 +2122,15 @@ var ui = (e, t, n) => n?.length ? {
2118
2122
  }, [
2119
2123
  e?.datasetMetricSettings?.newDatasetSettings?.selectedMainTable,
2120
2124
  e?.companyIntegration?.name,
2121
- et
2122
- ]), Mn = I(() => {
2125
+ tt
2126
+ ]), Mn = F(() => {
2123
2127
  let t = e?.drillDownSettings?.isEnableGroupBy;
2124
- return (nn ? [...B?.length ? B : [], ...dr({
2128
+ return (nn ? [...z?.length ? z : [], ...dr({
2125
2129
  filters: l,
2126
2130
  metricId: e?.id,
2127
2131
  isGroupByEnabled: t,
2128
2132
  enableCrossFilterBeforeDrill: !0
2129
- })] : t ? B || [] : [...B?.length ? B : [], ...l || []]).filter((e) => e.isAddOnMetrics).map((e) => a ? {
2133
+ })] : t ? z || [] : [...z?.length ? z : [], ...l || []]).filter((e) => e.isAddOnMetrics).map((e) => a ? {
2130
2134
  ...e,
2131
2135
  dimensionColumn: G?.xAxis || "",
2132
2136
  measureColumn: G?.yAxisList?.[0] || "",
@@ -2153,25 +2157,25 @@ var ui = (e, t, n) => n?.length ? {
2153
2157
  nn,
2154
2158
  a,
2155
2159
  e?.drillDownSettings?.isEnableGroupBy,
2156
- B,
2160
+ z,
2157
2161
  On
2158
- ]), Nn = I(() => JSON.stringify(Ft), [Ft]), J = Bi(I(() => ({
2159
- ...Ci({
2162
+ ]), Nn = F(() => JSON.stringify(It), [It]), J = Vi(F(() => ({
2163
+ ...wi({
2160
2164
  metric: e,
2161
2165
  isAllClient: h,
2162
2166
  tenancyLevel: i,
2163
2167
  appliedMetricFilters: W,
2164
2168
  firstLoadAppliedMetricFilters: Mn,
2165
- tableColumnFilters: Ft,
2169
+ tableColumnFilters: It,
2166
2170
  chartSettings: G,
2167
2171
  isPythonMode: q,
2168
2172
  globalFilters: t,
2169
2173
  filterValues: An,
2170
- tableLimit: kt,
2174
+ tableLimit: At,
2171
2175
  calendarType: Pe,
2172
- comparisonCount: z,
2176
+ comparisonCount: R,
2173
2177
  datasourceId: ye,
2174
- drillConfig: U?.configV2,
2178
+ drillConfig: H?.configV2,
2175
2179
  isFrontendApp: g,
2176
2180
  guestToken: _
2177
2181
  }),
@@ -2184,20 +2188,20 @@ var ui = (e, t, n) => n?.length ? {
2184
2188
  Mn,
2185
2189
  q,
2186
2190
  An,
2187
- H,
2191
+ V,
2188
2192
  i,
2189
2193
  t,
2190
- kt,
2191
- z,
2192
- Xe,
2194
+ At,
2195
+ R,
2196
+ Ze,
2193
2197
  ye,
2194
2198
  Pe,
2195
- U?.configV2,
2199
+ H?.configV2,
2196
2200
  _,
2197
2201
  g,
2198
2202
  w,
2199
2203
  Nn
2200
- ])), Pn = I(() => JSON.stringify(J), [J]), Fn = pi(G, e?.datasetMetricSettings), In = e?.datasetMetricSettings, Ln = Se(In), zn = nt || Fn.renderEmpty || !!Ln, Bn = g ? v || "" : r || "", Y = I(() => vi({
2204
+ ])), Pn = F(() => JSON.stringify(J), [J]), Fn = mi(G, e?.datasetMetricSettings), In = e?.datasetMetricSettings, Ln = Se(In), zn = rt || Fn.renderEmpty || !!Ln, Bn = g ? v || "" : r || "", Y = F(() => yi({
2201
2205
  query: J,
2202
2206
  clientId: Bn,
2203
2207
  isFrontendApp: g
@@ -2205,7 +2209,7 @@ var ui = (e, t, n) => n?.length ? {
2205
2209
  Bn,
2206
2210
  g,
2207
2211
  J
2208
- ]), Vn = I(() => _i({
2212
+ ]), Vn = F(() => vi({
2209
2213
  clientId: Bn,
2210
2214
  guestToken: _,
2211
2215
  isFrontendApp: g
@@ -2214,7 +2218,7 @@ var ui = (e, t, n) => n?.length ? {
2214
2218
  _,
2215
2219
  g
2216
2220
  ]);
2217
- F(() => {
2221
+ P(() => {
2218
2222
  f("metric-query-payload-prepared", {
2219
2223
  metricId: e?.id,
2220
2224
  metricName: e?.name,
@@ -2227,14 +2231,14 @@ var ui = (e, t, n) => n?.length ? {
2227
2231
  e?.name,
2228
2232
  G?.chartType
2229
2233
  ]);
2230
- let Hn = I(() => un(e), [e]), { data: X, dataUpdatedAt: Un, isFetching: Kn, isLoading: Z, error: qn, refetch: Yn } = xn({
2234
+ let Hn = F(() => un(e), [e]), { data: X, dataUpdatedAt: Un, isFetching: Kn, isLoading: Z, error: qn, refetch: Yn } = xn({
2231
2235
  data: J,
2232
2236
  clientId: g ? v || "" : r,
2233
2237
  clientCacheScope: g ? y : void 0,
2234
2238
  metricRevision: Hn,
2235
2239
  token: _,
2236
2240
  isFrontendApp: g,
2237
- isFullScreen: Ue,
2241
+ isFullScreen: We,
2238
2242
  savedMetricQuery: e?.isMetric === !1 || !e?.query ? void 0 : ge(e?.query, e?.companyId),
2239
2243
  savedMetricIdentifiers: In,
2240
2244
  dbName: e?.companyIntegration?.name || e?.integrationName,
@@ -2249,8 +2253,8 @@ var ui = (e, t, n) => n?.length ? {
2249
2253
  }, {
2250
2254
  isDisableQuery: zn,
2251
2255
  onSuccess: (e) => {
2252
- let t = Jn(e), n = ot(t.rows), r = Ui(Ui(t.error, "details"), "legacyCode");
2253
- if (Fe && Ui(t.error, "code") !== "E1001" && r !== "E1001") {
2256
+ let t = Jn(e), n = st(t.rows), r = Wi(Wi(t.error, "details"), "legacyCode");
2257
+ if (Fe && Wi(t.error, "code") !== "E1001" && r !== "E1001") {
2254
2258
  let e = J?.id, t = !!n?.length && (G?.chartType !== A.singleValue || n?.[0]?.[G?.singleValue || ""] != null);
2255
2259
  Fe?.((n) => {
2256
2260
  let r = n?.find((t) => t?.id === e);
@@ -2263,13 +2267,13 @@ var ui = (e, t, n) => n?.length ? {
2263
2267
  },
2264
2268
  onSettled: () => {
2265
2269
  let e = J?.id;
2266
- Be && e && Be((t) => yi(t, e));
2270
+ Be && e && Be((t) => bi(t, e));
2267
2271
  }
2268
- }), Xn = hi(Z), Zn = Kn && !Z && Un > 0, Qn = I(() => Jn(X), [X]), $n = !zn && !Kn && !qn && Qn.isFilterNotApplied ? "This drill filter could not be applied to a custom SQL metric." : void 0, tr = L(void 0);
2269
- F(() => {
2272
+ }), Xn = gi(Z), Zn = Kn && !Z && Un > 0, Qn = F(() => Jn(X), [X]), $n = !zn && !Kn && !qn && Qn.isFilterNotApplied ? "This drill filter could not be applied to a custom SQL metric." : void 0, tr = I(void 0);
2273
+ P(() => {
2270
2274
  $n && tr.current !== X && (tr.current = X, p("metric.filter_not_applied", { error_code: "FILTER_NOT_APPLIED" }));
2271
2275
  }, [$n, X]);
2272
- let Q = I(() => Ji({
2276
+ let Q = F(() => Yi({
2273
2277
  raw: Qn.rows,
2274
2278
  selectedDims: (e?.datasetMetricSettings)?.newDatasetSettings?.selectedDims,
2275
2279
  selectedMetrics: (e?.datasetMetricSettings)?.newDatasetSettings?.selectedMetrics,
@@ -2281,10 +2285,10 @@ var ui = (e, t, n) => n?.length ? {
2281
2285
  e?.datasetMetricSettings,
2282
2286
  e?.companyIntegration?.name,
2283
2287
  q
2284
- ]), nr = I(() => Wn(X?.metaData?.truncation, Q.length), [X, Q]), ir = I(() => Gn(nr), [nr]), ar = Ln || qn || Qn.error;
2285
- F(() => {
2288
+ ]), nr = F(() => Wn(X?.metaData?.truncation, Q.length), [X, Q]), ir = F(() => Gn(nr), [nr]), ar = Ln || qn || Qn.error;
2289
+ P(() => {
2286
2290
  if (!ar) return;
2287
- let t = ar instanceof Error ? ar.message : Ui(ar, "message"), n = Ui(ar, "context");
2291
+ let t = ar instanceof Error ? ar.message : Wi(ar, "message"), n = Wi(ar, "context");
2288
2292
  f("metric-query-error-observed", {
2289
2293
  metricId: e?.id,
2290
2294
  metricName: e?.name,
@@ -2298,41 +2302,41 @@ var ui = (e, t, n) => n?.length ? {
2298
2302
  e?.id,
2299
2303
  e?.name,
2300
2304
  G?.chartType
2301
- ]), F(() => {
2305
+ ]), P(() => {
2302
2306
  let e = J?.id;
2303
- zn && Be && e && Be((t) => yi(t, e));
2307
+ zn && Be && e && Be((t) => bi(t, e));
2304
2308
  }, [
2305
2309
  zn,
2306
2310
  J?.id,
2307
2311
  Be
2308
- ]), F(() => {
2312
+ ]), P(() => {
2309
2313
  let e = J?.id;
2310
- !zn && Be && e && Be((t) => bi(t, e));
2314
+ !zn && Be && e && Be((t) => xi(t, e));
2311
2315
  }, [
2312
2316
  zn,
2313
2317
  Pn,
2314
2318
  Be
2315
2319
  ]);
2316
- let { data: or } = Cn(T, void 0, g, v), cr = I(() => or?.weekStartDay === "sunday" ? "sunday" : "monday", [or]), { mutate: lr } = C(), { mutateAsync: ur } = b(), fr = I(() => JSON.stringify({
2317
- metricViewFilters: N?.metricViewFilters || [],
2318
- xAxisSettings: N?.xAxisSettings || [],
2319
- yAxisSettings: N?.yAxisSettings || []
2320
+ let { data: or } = Cn(T, void 0, g, v), cr = F(() => or?.weekStartDay === "sunday" ? "sunday" : "monday", [or]), { mutate: lr } = C(), { mutateAsync: ur } = b(), fr = F(() => JSON.stringify({
2321
+ metricViewFilters: M?.metricViewFilters || [],
2322
+ xAxisSettings: M?.xAxisSettings || [],
2323
+ yAxisSettings: M?.yAxisSettings || []
2320
2324
  }), [
2321
- N?.metricViewFilters,
2322
- N?.xAxisSettings,
2323
- N?.yAxisSettings
2324
- ]), pr = I(() => JSON.stringify(De || []), [De]), mr = L(N);
2325
- mr.current = N;
2326
- let hr = L(De);
2325
+ M?.metricViewFilters,
2326
+ M?.xAxisSettings,
2327
+ M?.yAxisSettings
2328
+ ]), pr = F(() => JSON.stringify(De || []), [De]), mr = I(M);
2329
+ mr.current = M;
2330
+ let hr = I(De);
2327
2331
  hr.current = De;
2328
- let gr = L(e?.id);
2329
- gr.current = e?.id, F(() => {
2332
+ let gr = I(e?.id);
2333
+ gr.current = e?.id, P(() => {
2330
2334
  let t = mr.current, n = hr.current, a = gr.current, o = Tn.current !== fr, s = [...t?.metricViewFilters?.find((e) => e.id === a)?.filters?.filter((e) => !n?.find((t) => e?.name === t?.name)) || [], ...n || []];
2331
- Pt((t) => {
2335
+ Ft((t) => {
2332
2336
  let n = e?.rlsConditions?.map((e) => {
2333
2337
  let n = t?.find((t) => t.name === e.name && t.datatype === e.datatype && t.tableName === e.tableName && t.columnName === e.columnName), a = e;
2334
2338
  if (m) {
2335
- let e = Zi(a, m);
2339
+ let e = Qi(a, m);
2336
2340
  if (e) {
2337
2341
  let t = a.datatype === "date" ? e.options?.find((t) => t.name === e.value) : void 0;
2338
2342
  a = {
@@ -2347,7 +2351,7 @@ var ui = (e, t, n) => n?.length ? {
2347
2351
  maxDate: $(e.maxDate) ?? void 0,
2348
2352
  fromDate: $(e.fromDate) ?? void 0,
2349
2353
  toDate: $(e.toDate) ?? void 0,
2350
- ...Vi(e)
2354
+ ...Hi(e)
2351
2355
  })) : e.options,
2352
2356
  variableOptions: a.datatype === "date" ? e.options?.map((e) => ({
2353
2357
  range: e.range,
@@ -2357,7 +2361,7 @@ var ui = (e, t, n) => n?.length ? {
2357
2361
  maxDate: $(e.maxDate) ?? void 0,
2358
2362
  fromDate: $(e.fromDate) ?? void 0,
2359
2363
  toDate: $(e.toDate) ?? void 0,
2360
- ...Vi(e),
2364
+ ...Hi(e),
2361
2365
  value: e.name,
2362
2366
  label: e.name
2363
2367
  })) : e.options?.map((e) => ({
@@ -2367,7 +2371,7 @@ var ui = (e, t, n) => n?.length ? {
2367
2371
  selectedVariableValue: e.value ? a.datatype === "string" ? {
2368
2372
  value: e.value,
2369
2373
  label: e.value
2370
- } : Hi({
2374
+ } : Ui({
2371
2375
  option: t,
2372
2376
  value: e.value
2373
2377
  }) : a.selectedVariableValue
@@ -2413,14 +2417,14 @@ var ui = (e, t, n) => n?.length ? {
2413
2417
  r,
2414
2418
  pr,
2415
2419
  fr
2416
- ]), F(() => {
2420
+ ]), P(() => {
2417
2421
  Tn.current = fr;
2418
- }, [fr]), F(() => {
2419
- e?.id && qe && !q && e?.isMetric && qe?.((t) => {
2422
+ }, [fr]), P(() => {
2423
+ e?.id && Je && !q && e?.isMetric && Je?.((t) => {
2420
2424
  let n = {
2421
- filters: [...W || [], ...G?.tableSettings?.isServerSidePagination && G?.chartType === A.table ? Ft?.map((e) => e.condition)?.filter((e) => Je(e)) : []],
2425
+ filters: [...W || [], ...G?.tableSettings?.isServerSidePagination && G?.chartType === A.table ? It?.map((e) => e.condition)?.filter((e) => Ye(e)) : []],
2422
2426
  xAxisSettings: {
2423
- isEnable: !!(G?.dynamicXAxis?.isEnabled || G?.enduserMeasureAndDimensions?.isEnabled) && Xe.includes(G?.chartType || ""),
2427
+ isEnable: !!(G?.dynamicXAxis?.isEnabled || G?.enduserMeasureAndDimensions?.isEnabled) && Ze.includes(G?.chartType || ""),
2424
2428
  xaxis: G?.xAxis || ""
2425
2429
  },
2426
2430
  yAxisSettings: {
@@ -2448,15 +2452,15 @@ var ui = (e, t, n) => n?.length ? {
2448
2452
  q,
2449
2453
  Pe,
2450
2454
  h,
2451
- Ft,
2455
+ It,
2452
2456
  G?.tableSettings?.isServerSidePagination,
2453
2457
  G?.chartType,
2454
2458
  G?.dynamicYAxis,
2455
2459
  G?.dynamicXAxis
2456
- ]), F(() => {
2460
+ ]), P(() => {
2457
2461
  if (e?.drillDownSettings?.isEnableGroupBy) {
2458
2462
  let t = e?.datasetMetricSettings;
2459
- if (!e?.drillDownSettings?.configV2 && !U?.configV2 && t?.newDatasetSettings?.selectedMetrics?.length && t?.newDatasetSettings?.selectedDims?.length) {
2463
+ if (!e?.drillDownSettings?.configV2 && !H?.configV2 && t?.newDatasetSettings?.selectedMetrics?.length && t?.newDatasetSettings?.selectedDims?.length) {
2460
2464
  let n = {
2461
2465
  ...e?.drillDownSettings || {},
2462
2466
  configV2: {
@@ -2470,35 +2474,35 @@ var ui = (e, t, n) => n?.length ? {
2470
2474
  })
2471
2475
  }
2472
2476
  };
2473
- tn(() => er(n, {
2474
- drilledLevel: lt,
2475
- drillFilters: ut,
2476
- drillType: dt,
2477
- underlyingDataDrillFilters: ft
2477
+ U(() => er(n, {
2478
+ drilledLevel: ut,
2479
+ drillFilters: dt,
2480
+ drillType: ft,
2481
+ underlyingDataDrillFilters: pt
2478
2482
  }) ?? n);
2479
- } else U?.isEnableGroupBy || tn(e?.drillDownSettings);
2483
+ } else H?.isEnableGroupBy || U(e?.drillDownSettings);
2480
2484
  }
2481
2485
  }, [
2482
2486
  e?.drillDownSettings?.isEnableGroupBy,
2483
2487
  e?.drillDownSettings?.configV2,
2484
2488
  e?.datasetMetricSettings,
2485
2489
  G,
2486
- ut,
2487
- lt,
2488
2490
  dt,
2489
- ft
2491
+ ut,
2492
+ ft,
2493
+ pt
2490
2494
  ]);
2491
- let _r = L(!1);
2492
- F(() => {
2495
+ let _r = I(!1);
2496
+ P(() => {
2493
2497
  if (_r.current) return;
2494
- let t = M?.position;
2495
- if (!M?.enabled || !t || !e?.id) return;
2496
- let n = U?.configV2;
2498
+ let t = Ue?.position;
2499
+ if (!Ue?.enabled || !t || !e?.id) return;
2500
+ let n = H?.configV2;
2497
2501
  if (!n?.levels?.length) return;
2498
2502
  _r.current = !0;
2499
2503
  let r = sr(n, t);
2500
2504
  if (!r) return;
2501
- tn((e) => ({
2505
+ U((e) => ({
2502
2506
  ...e,
2503
2507
  configV2: r
2504
2508
  }));
@@ -2512,35 +2516,35 @@ var ui = (e, t, n) => n?.length ? {
2512
2516
  filterCount: t.filters?.length || 0
2513
2517
  });
2514
2518
  }, [
2515
- M?.enabled,
2516
- M?.position,
2517
- U?.configV2,
2519
+ Ue?.enabled,
2520
+ Ue?.position,
2521
+ H?.configV2,
2518
2522
  e?.id
2519
2523
  ]);
2520
- let yr = L(void 0);
2521
- F(() => {
2522
- if (!M?.enabled || !M.onChange || !e?.id) return;
2523
- let t = U?.configV2?.levels || [], n = t.findIndex((e) => e?.isEnable), r = n >= 0 ? t[n] : void 0, i = n > 0 && r?.index ? rr({
2524
+ let yr = I(void 0);
2525
+ P(() => {
2526
+ if (!Ue?.enabled || !Ue.onChange || !e?.id) return;
2527
+ let t = H?.configV2?.levels || [], n = t.findIndex((e) => e?.isEnable), r = n >= 0 ? t[n] : void 0, i = n > 0 && r?.index ? rr({
2524
2528
  levelIndex: r.index,
2525
2529
  filters: (r.filters || []).filter((e) => e?.columnName).map((e) => ({
2526
2530
  columnName: String(e.columnName),
2527
2531
  value: String(e.value ?? "")
2528
2532
  }))
2529
2533
  }) : null;
2530
- yr.current !== i && (yr.current = i, M.onChange(e.id, i));
2534
+ yr.current !== i && (yr.current = i, Ue.onChange(e.id, i));
2531
2535
  }, [
2532
- M?.enabled,
2533
- M?.onChange,
2534
- U?.configV2,
2536
+ Ue?.enabled,
2537
+ Ue?.onChange,
2538
+ H?.configV2,
2535
2539
  e?.id
2536
2540
  ]);
2537
- let { mutateAsync: xr } = E(), Cr = I(() => JSON.stringify(t?.filters), [t?.filters]), wr = I(() => {
2541
+ let { mutateAsync: xr } = E(), Cr = F(() => JSON.stringify(t?.filters), [t?.filters]), wr = F(() => {
2538
2542
  let n = e?.datasetMetricSettings?.metricVariables || [];
2539
2543
  if (!n || !Array.isArray(n) || !n?.length) return [];
2540
2544
  let a = [];
2541
2545
  for (let o = 0; o < n?.length; o++) {
2542
2546
  let s = n[o], c = s.type.value === "custom" && s.customQuery && s.customColumnName, l = c ? {
2543
- query: Ge({
2547
+ query: Ke({
2544
2548
  query: s?.customQuery || "",
2545
2549
  tenancyLevel: i,
2546
2550
  clientId: r,
@@ -2602,20 +2606,20 @@ var ui = (e, t, n) => n?.length ? {
2602
2606
  r,
2603
2607
  h,
2604
2608
  ye
2605
- ]), Tr = I(() => JSON.stringify(wr), [wr]), Dr = L(null), Or = L(0), kr = L({
2609
+ ]), Tr = F(() => JSON.stringify(wr), [wr]), Dr = I(null), Or = I(0), kr = I({
2606
2610
  clientId: r,
2607
2611
  encryptedClientId: v,
2608
2612
  isFrontendApp: g,
2609
- token: ct
2613
+ token: lt
2610
2614
  });
2611
- kr.current.clientId = r, kr.current.encryptedClientId = v, kr.current.isFrontendApp = g, kr.current.token = ct;
2612
- let Ar = L(xr);
2613
- Ar.current = xr, F(() => {
2615
+ kr.current.clientId = r, kr.current.encryptedClientId = v, kr.current.isFrontendApp = g, kr.current.token = lt;
2616
+ let Ar = I(xr);
2617
+ Ar.current = xr, P(() => {
2614
2618
  Or.current += 1;
2615
2619
  let e = Or.current, t = () => Or.current !== e;
2616
2620
  if (wr?.length) {
2617
2621
  let { clientId: e, encryptedClientId: n, isFrontendApp: r, token: i } = kr.current;
2618
- ki({
2622
+ Ai({
2619
2623
  entries: wr,
2620
2624
  fetchColumnValues: Ar.current,
2621
2625
  ctx: {
@@ -2629,10 +2633,10 @@ var ui = (e, t, n) => n?.length ? {
2629
2633
  ...n,
2630
2634
  [e]: t
2631
2635
  })),
2632
- onLoading: (e) => ht(e),
2636
+ onLoading: (e) => gt(e),
2633
2637
  onSettle: () => {
2634
2638
  Dr.current && clearTimeout(Dr.current), Dr.current = setTimeout(() => {
2635
- Dr.current = null, ht(!1);
2639
+ Dr.current = null, gt(!1);
2636
2640
  }, 200);
2637
2641
  },
2638
2642
  isCancelled: t
@@ -2642,23 +2646,23 @@ var ui = (e, t, n) => n?.length ? {
2642
2646
  Or.current += 1, Dr.current &&= (clearTimeout(Dr.current), null);
2643
2647
  };
2644
2648
  }, [Tr]);
2645
- let Mr = I(() => (e?.datasetMetricSettings)?.newDatasetSettings?.selectedDims?.[0]?.name, [e]);
2646
- I(() => le(e?.datasetMetricSettings?.selectedDimensions?.[H.length < e?.datasetMetricSettings?.selectedDimensions?.length ? H.length : 0] || ""), [e?.datasetMetricSettings, H]);
2647
- let Nr = I(() => {
2649
+ let Mr = F(() => (e?.datasetMetricSettings)?.newDatasetSettings?.selectedDims?.[0]?.name, [e]);
2650
+ F(() => le(e?.datasetMetricSettings?.selectedDimensions?.[V.length < e?.datasetMetricSettings?.selectedDimensions?.length ? V.length : 0] || ""), [e?.datasetMetricSettings, V]);
2651
+ let Nr = F(() => {
2648
2652
  let t = e?.drillDownSettings?.isEnableGroupBy;
2649
- return nn ? [...B?.length ? B : [], ...dr({
2653
+ return nn ? [...z?.length ? z : [], ...dr({
2650
2654
  filters: l,
2651
2655
  metricId: e?.id,
2652
2656
  isGroupByEnabled: t,
2653
2657
  enableCrossFilterBeforeDrill: !0
2654
- })] : t ? B || [] : [...B?.length ? B : [], ...l || []];
2658
+ })] : t ? z || [] : [...z?.length ? z : [], ...l || []];
2655
2659
  }, [
2656
2660
  l,
2657
2661
  e?.id,
2658
2662
  nn,
2659
2663
  e?.drillDownSettings?.isEnableGroupBy,
2660
- B
2661
- ]), Pr = P((e = []) => e.filter((e) => e.isAddOnMetrics).map((e) => a ? {
2664
+ z
2665
+ ]), Pr = N((e = []) => e.filter((e) => e.isAddOnMetrics).map((e) => a ? {
2662
2666
  ...e,
2663
2667
  dimensionColumn: G?.xAxis || "",
2664
2668
  measureColumn: G?.yAxisList?.[0] || "",
@@ -2682,11 +2686,11 @@ var ui = (e, t, n) => n?.length ? {
2682
2686
  a,
2683
2687
  On
2684
2688
  ]);
2685
- I(() => Pr(Nr), [Pr, Nr]), F(() => {
2689
+ F(() => Pr(Nr), [Pr, Nr]), P(() => {
2686
2690
  Nr?.some((e) => e.isAddOnMetrics) ? gn(Pr(Nr)) : gn([]);
2687
2691
  }, [Pr, Nr]);
2688
- let Fr = I(() => G?.chartType === A.singleValue && !!G?.customSettings?.comparisonValueShow && !!G?.customSettings?.comparisonTimeGrain && !!G?.customSettings?.comparisonTimePeriod && !!G?.singleValue, [G]);
2689
- F(() => {
2692
+ let Fr = F(() => G?.chartType === A.singleValue && !!G?.customSettings?.comparisonValueShow && !!G?.customSettings?.comparisonTimeGrain && !!G?.customSettings?.comparisonTimePeriod && !!G?.singleValue, [G]);
2693
+ P(() => {
2690
2694
  let t = X;
2691
2695
  if (Dn({
2692
2696
  data: [],
@@ -2695,7 +2699,7 @@ var ui = (e, t, n) => n?.length ? {
2695
2699
  currentValue: ""
2696
2700
  }), G?.chartType === A.table) {
2697
2701
  let e = t?.totalRecords;
2698
- typeof e == "number" && Mt(e);
2702
+ typeof e == "number" && Nt(e);
2699
2703
  }
2700
2704
  if (f("metric-query-response-applied", {
2701
2705
  metricId: e?.id,
@@ -2705,7 +2709,7 @@ var ui = (e, t, n) => n?.length ? {
2705
2709
  columns: Object.keys(Q?.[0] || {}),
2706
2710
  totalRecords: t?.totalRecords,
2707
2711
  truncation: nr,
2708
- drillConfig: x(U?.configV2)
2712
+ drillConfig: x(H?.configV2)
2709
2713
  }), e?.datasetMetricSettings?.isUseRawSQL) {
2710
2714
  let e = Object.keys(Q?.[0] || {});
2711
2715
  K((t) => ({
@@ -2714,7 +2718,7 @@ var ui = (e, t, n) => n?.length ? {
2714
2718
  }));
2715
2719
  }
2716
2720
  let n = t?.metaData;
2717
- cn(ve(n?.groupbyColumnList)), Gt((e) => ({
2721
+ cn(ve(n?.groupbyColumnList)), Kt((e) => ({
2718
2722
  ...e,
2719
2723
  report: "",
2720
2724
  isLoading: e?.isLoading,
@@ -2725,9 +2729,9 @@ var ui = (e, t, n) => n?.length ? {
2725
2729
  e?.datasetMetricSettings,
2726
2730
  Q,
2727
2731
  nr
2728
- ]), F(() => {
2732
+ ]), P(() => {
2729
2733
  e?.datasetMetricSettings?.createdSorts?.length ? bn(!0) : bn(!1);
2730
- }, [e?.datasetMetricSettings?.createdSorts?.length]), F(() => {
2734
+ }, [e?.datasetMetricSettings?.createdSorts?.length]), P(() => {
2731
2735
  G?.chartType === A.timeSeries && G?.timeSeriesSettings?.groupBySettings?.value && !q && K((e) => ({
2732
2736
  ...e,
2733
2737
  xAxis: `${G?.timeSeriesSettings?.groupBySettings?.value?.toLowerCase()} of ${Mr}`
@@ -2737,7 +2741,7 @@ var ui = (e, t, n) => n?.length ? {
2737
2741
  G?.chartType,
2738
2742
  G?.timeSeriesSettings,
2739
2743
  q
2740
- ]), F(() => {
2744
+ ]), P(() => {
2741
2745
  if (G?.isEnableComparisonFilter && [A.line].includes(G?.chartType)) {
2742
2746
  let t = e?.datasetMetricSettings?.newDatasetSettings?.selectedMetrics || [], n = Object?.keys(Q?.[0] || {});
2743
2747
  K((e) => ({
@@ -2748,18 +2752,18 @@ var ui = (e, t, n) => n?.length ? {
2748
2752
  }, [
2749
2753
  Q,
2750
2754
  G?.isEnableComparisonFilter,
2751
- z,
2755
+ R,
2752
2756
  G?.chartType
2753
2757
  ]);
2754
- let Ir = P((t, n, r, i, a, s) => {
2758
+ let Ir = N((t, n, r, i, a, s) => {
2755
2759
  S("metric-filter-applied", {
2756
2760
  metricId: e?.id,
2757
2761
  hasCustomValue: !!i,
2758
2762
  hasStringValues: !!a?.length,
2759
2763
  stringValueCount: a?.length || 0,
2760
2764
  hasTimeGrain: !!s,
2761
- rlsConditionCount: B?.length || 0
2762
- }), de?.(o, e?.id), Pt(i ? (e) => e?.map((e) => e.name === t ? {
2765
+ rlsConditionCount: z?.length || 0
2766
+ }), de?.(o, e?.id), Ft(i ? (e) => e?.map((e) => e.name === t ? {
2763
2767
  ...e,
2764
2768
  value: n,
2765
2769
  options: e.options?.map((e) => n === e.name ? {
@@ -2777,7 +2781,7 @@ var ui = (e, t, n) => n?.length ? {
2777
2781
  label: n,
2778
2782
  endDate: i.endDate,
2779
2783
  startDate: i.startDate,
2780
- ...Vi(i),
2784
+ ...Hi(i),
2781
2785
  timeGrainValue: s
2782
2786
  }
2783
2787
  } : e) : a ? (e) => e?.map((e) => e.name === t ? {
@@ -2796,7 +2800,7 @@ var ui = (e, t, n) => n?.length ? {
2796
2800
  label: r || n
2797
2801
  }
2798
2802
  } : e));
2799
- }, []), Rr = P((t) => {
2803
+ }, []), Rr = N((t) => {
2800
2804
  t?.event && t?.event?.event?.preventDefault(), f("chart-click-params-captured", {
2801
2805
  metricId: e?.id,
2802
2806
  metricName: e?.name,
@@ -2805,17 +2809,17 @@ var ui = (e, t, n) => n?.length ? {
2805
2809
  value: t?.value,
2806
2810
  seriesName: t?.seriesName,
2807
2811
  dataIndex: t?.dataIndex,
2808
- drillConfig: x(U?.configV2)
2809
- }), zt(t);
2812
+ drillConfig: x(H?.configV2)
2813
+ }), Bt(t);
2810
2814
  }, [
2811
2815
  e?.id,
2812
2816
  e?.name,
2813
2817
  G?.chartType,
2814
- U?.configV2
2815
- ]), zr = I(() => {
2816
- let t = Array.isArray(Q) && Q.length && V?.name != null ? Q?.map((e) => Object.entries(e).find(([, e]) => (typeof e == "number" && typeof V?.name == "string" ? e?.toString() : e) === V.name)?.[0]).filter((e) => e)[0] : "";
2818
+ H?.configV2
2819
+ ]), zr = F(() => {
2820
+ let t = Array.isArray(Q) && Q.length && B?.name != null ? Q?.map((e) => Object.entries(e).find(([, e]) => (typeof e == "number" && typeof B?.name == "string" ? e?.toString() : e) === B.name)?.[0]).filter((e) => e)[0] : "";
2817
2821
  if (!t) return t;
2818
- let n = e?.datasetMetricSettings?.newDatasetSettings, r = [...n?.selectedDims || [], ...n?.selectedMetrics || []], i = U?.configV2?.levels?.flatMap((e) => e?.dimensions || []) || [];
2822
+ let n = e?.datasetMetricSettings?.newDatasetSettings, r = [...n?.selectedDims || [], ...n?.selectedMetrics || []], i = H?.configV2?.levels?.flatMap((e) => e?.dimensions || []) || [];
2819
2823
  return we(t, {
2820
2824
  selectedColumns: r,
2821
2825
  levelColumns: i,
@@ -2823,45 +2827,45 @@ var ui = (e, t, n) => n?.length ? {
2823
2827
  });
2824
2828
  }, [
2825
2829
  Q,
2826
- V?.name,
2830
+ B?.name,
2827
2831
  e?.datasetMetricSettings,
2828
2832
  e?.companyIntegration?.name,
2829
- U?.configV2?.levels
2830
- ]), Br = I(() => {
2831
- if (!V) return;
2832
- let e = G?.isMultiDimension || G?.isDynamicSeries ? G?.seriesField : void 0, t = e === "ungrouped" ? void 0 : e, n = !t && typeof V.seriesName == "string" ? V.seriesName : G?.yAxisList?.[0] || G?.singleValue, r = Qe(G);
2833
+ H?.configV2?.levels
2834
+ ]), Br = F(() => {
2835
+ if (!B) return;
2836
+ let e = G?.isMultiDimension || G?.isDynamicSeries ? G?.seriesField : void 0, t = e === "ungrouped" ? void 0 : e, n = !t && typeof B.seriesName == "string" ? B.seriesName : G?.yAxisList?.[0] || G?.singleValue, r = $e(G);
2833
2837
  return Lr({
2834
- params: V,
2838
+ params: B,
2835
2839
  axisDimension: zr ? { columnName: zr } : void 0,
2836
2840
  seriesDimension: t ? { columnName: t } : void 0,
2837
2841
  measure: n ? { columnName: n } : void 0,
2838
2842
  formatMeasure: r ? (e) => r(e, n) : void 0
2839
2843
  });
2840
2844
  }, [
2841
- V,
2845
+ B,
2842
2846
  zr,
2843
2847
  G
2844
- ]), Vr = I(() => {
2848
+ ]), Vr = F(() => {
2845
2849
  let t = e?.datasetMetricSettings?.newDatasetSettings;
2846
2850
  return {
2847
2851
  selectedDims: t?.selectedDims,
2848
2852
  selectedMetrics: t?.selectedMetrics,
2849
- levelDimensions: U?.configV2?.levels?.flatMap((e) => e?.dimensions || []) || []
2853
+ levelDimensions: H?.configV2?.levels?.flatMap((e) => e?.dimensions || []) || []
2850
2854
  };
2851
- }, [U?.configV2?.levels, e?.datasetMetricSettings]), Hr = P((e) => Ne({
2855
+ }, [H?.configV2?.levels, e?.datasetMetricSettings]), Hr = N((e) => Ne({
2852
2856
  filter: e,
2853
2857
  ...Vr
2854
- }), [Vr]), Ur = I(() => {
2855
- if (Qt.current !== void 0 && H === Zt.current) return Qt.current;
2856
- let e = U?.configV2?.levels?.find((e) => e?.isEnable)?.filters || [];
2857
- return (e.length ? e : H).map(Hr);
2858
+ }), [Vr]), Ur = F(() => {
2859
+ if ($t.current !== void 0 && V === Qt.current) return $t.current;
2860
+ let e = H?.configV2?.levels?.find((e) => e?.isEnable)?.filters || [];
2861
+ return (e.length ? e : V).map(Hr);
2858
2862
  }, [
2859
- U?.configV2?.levels,
2860
- H,
2863
+ H?.configV2?.levels,
2864
+ V,
2861
2865
  Hr,
2862
- Zt,
2863
- Qt
2864
- ]), Wr = I(() => Ie({
2866
+ Qt,
2867
+ $t
2868
+ ]), Wr = F(() => Ie({
2865
2869
  columnName: zr,
2866
2870
  ...Vr
2867
2871
  }), [zr, Vr]), { getUnderlyingData: Gr } = Rn({
@@ -2882,7 +2886,7 @@ var ui = (e, t, n) => n?.length ? {
2882
2886
  isEnableCustomSQL: G?.chartType === A.singleValue && e?.clickActions?.underlyingData?.isEnable && e?.clickActions?.underlyingData?.sql,
2883
2887
  datasourceId: ye,
2884
2888
  drillFilters: Ur,
2885
- token: ct || "",
2889
+ token: lt || "",
2886
2890
  isFrontendApp: g,
2887
2891
  encryptedClientId: g ? v || "" : r || ""
2888
2892
  }), Kr = async (t, n, a, o, s, u) => {
@@ -2895,13 +2899,13 @@ var ui = (e, t, n) => n?.length ? {
2895
2899
  clickValue: n?.value,
2896
2900
  rowFilters: n?.rowFilters,
2897
2901
  incomingConfig: x(t),
2898
- stateConfig: x(U?.configV2)
2902
+ stateConfig: x(H?.configV2)
2899
2903
  });
2900
2904
  let d = e?.datasetMetricSettings;
2901
2905
  if (!t || !d?.newDatasetSettings?.configuration || !e?.companyIntegration?.name) {
2902
2906
  f("drill-config-change-skipped", {
2903
2907
  metricId: e?.id,
2904
- hasStateConfig: !!U?.configV2,
2908
+ hasStateConfig: !!H?.configV2,
2905
2909
  hasIncomingConfig: !!t,
2906
2910
  hasDatasetConfiguration: !!d?.newDatasetSettings?.configuration,
2907
2911
  integrationName: e?.companyIntegration?.name
@@ -2911,7 +2915,7 @@ var ui = (e, t, n) => n?.length ? {
2911
2915
  });
2912
2916
  return;
2913
2917
  }
2914
- let m = n?.name, h = (t?.levels || []).find((e) => a ? e?.index === a : e?.isEnable), g = h?.dimensions?.[0]?.alias, _ = n?.rowFilters || [], { config: v, outcome: y } = ii({
2918
+ let m = n?.name, h = (t?.levels || []).find((e) => a ? e?.index === a : e?.isEnable), g = h?.dimensions?.[0]?.alias, _ = n?.rowFilters || [], { config: v, outcome: y } = ai({
2915
2919
  config: t,
2916
2920
  clickedLevelIndex: a,
2917
2921
  isReset: o,
@@ -2928,7 +2932,7 @@ var ui = (e, t, n) => n?.length ? {
2928
2932
  rowFilters: n?.rowFilters,
2929
2933
  resolvedConfig: x(v)
2930
2934
  }), y === "unrepresentable") {
2931
- vt(li({
2935
+ yt(ui({
2932
2936
  kind: "none",
2933
2937
  reason: "blank-value"
2934
2938
  })), p("metric.drill_blocked", {
@@ -2937,15 +2941,24 @@ var ui = (e, t, n) => n?.length ? {
2937
2941
  });
2938
2942
  return;
2939
2943
  }
2940
- vt(null);
2941
2944
  let b = v, ee = [...s || [], ...an], S = ee.length ? [...d?.newDatasetSettings?.selectedDims || [], ...ee] : d?.newDatasetSettings?.selectedDims;
2942
- b = Ae({
2945
+ if (b = Ae({
2943
2946
  config: b,
2944
2947
  selectedDims: S,
2945
2948
  selectedMetrics: d?.newDatasetSettings?.selectedMetrics,
2946
2949
  previousSelectedDims: S,
2947
2950
  previousSelectedMetrics: d?.newDatasetSettings?.selectedMetrics
2948
- }) || b;
2951
+ }) || b, y === "descend" && ni(b?.levels?.find((e) => e?.isEnable))) {
2952
+ yt(ui({
2953
+ kind: "none",
2954
+ reason: "level-without-measure"
2955
+ })), p("metric.drill_blocked", {
2956
+ reason: "level-without-measure",
2957
+ error_code: "DRILL_LEVEL_NO_MEASURE"
2958
+ });
2959
+ return;
2960
+ }
2961
+ yt(null);
2949
2962
  let C = b?.levels?.find((e) => e?.isEnable), w = !!b?.levels?.[b?.levels?.length - 1]?.isEnable, te = b?.levels?.[0]?.isEnable, T = $r({
2950
2963
  parentSettings: G,
2951
2964
  levelSettings: C?.chartSettings,
@@ -2970,7 +2983,7 @@ var ui = (e, t, n) => n?.length ? {
2970
2983
  yAxisList: O?.yAxisList,
2971
2984
  tableColumns: D,
2972
2985
  updatedConfig: x(b)
2973
- }), tn((e) => ({
2986
+ }), U((e) => ({
2974
2987
  ...e,
2975
2988
  configV2: {
2976
2989
  ...b || {},
@@ -2980,7 +2993,7 @@ var ui = (e, t, n) => n?.length ? {
2980
2993
  } : e) || []
2981
2994
  }
2982
2995
  })), K((e) => O), y === "descend" || y === "adhoc-descend") {
2983
- let e = Ot.current, t = e ? e.querySelector("[data-chart-engine=\"v2\"]") ? "v2" : "v1" : void 0;
2996
+ let e = kt.current, t = e ? e.querySelector("[data-chart-engine=\"v2\"]") ? "v2" : "v1" : void 0;
2984
2997
  p("metric.drilled", {
2985
2998
  level: b.levels?.findIndex((e) => e.isEnable) ?? -1,
2986
2999
  ...t ? { engine: t } : {}
@@ -3014,7 +3027,7 @@ var ui = (e, t, n) => n?.length ? {
3014
3027
  metricId: e?.id,
3015
3028
  crossFilterCount: t?.length || 0,
3016
3029
  drillCrossFilters: t
3017
- }), n ? (vt({
3030
+ }), n ? (yt({
3018
3031
  title: "Filter unavailable",
3019
3032
  body: n
3020
3033
  }), p("metric.drill_blocked", {
@@ -3031,7 +3044,7 @@ var ui = (e, t, n) => n?.length ? {
3031
3044
  requiresSchemaMetadata: !0
3032
3045
  });
3033
3046
  if (s) {
3034
- vt({
3047
+ yt({
3035
3048
  title: "Filter unavailable",
3036
3049
  body: s
3037
3050
  }), p("metric.drill_blocked", {
@@ -3065,7 +3078,7 @@ var ui = (e, t, n) => n?.length ? {
3065
3078
  requiresSchemaMetadata: !0
3066
3079
  });
3067
3080
  if (s) {
3068
- vt({
3081
+ yt({
3069
3082
  title: "Filter unavailable",
3070
3083
  body: s
3071
3084
  }), p("metric.drill_blocked", {
@@ -3098,14 +3111,14 @@ var ui = (e, t, n) => n?.length ? {
3098
3111
  paramsValue: t?.value,
3099
3112
  paramsSeriesName: t?.seriesName,
3100
3113
  rowFilters: t?.rowFilters || n,
3101
- drillConfig: x(U?.configV2)
3102
- }), await Kr(U?.configV2, t), f("drill-down-handler-complete", {
3114
+ drillConfig: x(H?.configV2)
3115
+ }), await Kr(H?.configV2, t), f("drill-down-handler-complete", {
3103
3116
  metricId: e?.id,
3104
3117
  metricName: e?.name
3105
3118
  });
3106
3119
  }, Xr = async ({ dimension: t, params: n, point: r }) => {
3107
3120
  if (!t?.alias) return;
3108
- let i = e?.datasetMetricSettings, a = U?.configV2, o = a?.levels || [], s = o.findIndex((e) => e?.isEnable), c = (s >= 0 ? o.slice(0, s + 1) : []).map((e) => ({
3121
+ let i = e?.datasetMetricSettings, a = H?.configV2, o = a?.levels || [], s = o.findIndex((e) => e?.isEnable), c = (s >= 0 ? o.slice(0, s + 1) : []).map((e) => ({
3109
3122
  ...e,
3110
3123
  isEnable: !1
3111
3124
  })), l = ei({
@@ -3128,7 +3141,7 @@ var ui = (e, t, n) => n?.length ? {
3128
3141
  clickedValue: n?.name,
3129
3142
  seededConfig: !a,
3130
3143
  drillConfig: x(u)
3131
- }), on((e) => e.some((e) => e?.alias === t?.alias) ? e : [...e, t]), tn((e) => ({
3144
+ }), on((e) => e.some((e) => e?.alias === t?.alias) ? e : [...e, t]), U((e) => ({
3132
3145
  ...e,
3133
3146
  isEnableGroupBy: !0,
3134
3147
  configV2: u
@@ -3161,7 +3174,7 @@ var ui = (e, t, n) => n?.length ? {
3161
3174
  ...m,
3162
3175
  ...l,
3163
3176
  ...d
3164
- ], { aggregates: b, dimensions: x } = Ye(y), ee = je(u), S = at(ee, y), C = {
3177
+ ], { aggregates: b, dimensions: x } = Xe(y), ee = je(u), S = ot(ee, y), C = {
3165
3178
  ...s,
3166
3179
  dimensions: x,
3167
3180
  aggregates: b,
@@ -3192,7 +3205,7 @@ var ui = (e, t, n) => n?.length ? {
3192
3205
  currentValue: ""
3193
3206
  }));
3194
3207
  else {
3195
- let t = se(Array.isArray(r) ? r : [], c, l), n = ot(t);
3208
+ let t = se(Array.isArray(r) ? r : [], c, l), n = st(t);
3196
3209
  Dn((e) => ({
3197
3210
  data: [...e.data, {
3198
3211
  key: p,
@@ -3211,48 +3224,48 @@ var ui = (e, t, n) => n?.length ? {
3211
3224
  }));
3212
3225
  }
3213
3226
  } });
3214
- }, Qr = P(async (t, n) => {
3227
+ }, Qr = N(async (t, n) => {
3215
3228
  f("drill-level-click-handler-start", {
3216
3229
  metricId: e?.id,
3217
3230
  metricName: e?.name,
3218
3231
  clickedLevelIndex: t,
3219
3232
  isReset: !!n,
3220
- drillConfig: x(U?.configV2)
3221
- }), n && on([]), vt(null), await Kr(U?.configV2, void 0, t, n), f("drill-level-click-handler-complete", {
3233
+ drillConfig: x(H?.configV2)
3234
+ }), n && on([]), yt(null), await Kr(H?.configV2, void 0, t, n), f("drill-level-click-handler-complete", {
3222
3235
  metricId: e?.id,
3223
3236
  metricName: e?.name,
3224
3237
  clickedLevelIndex: t,
3225
3238
  isReset: !!n
3226
3239
  });
3227
3240
  }, [
3228
- U?.configV2,
3241
+ H?.configV2,
3229
3242
  e?.id,
3230
3243
  e?.name
3231
- ]), ni = P((e) => {
3232
- if (e) Pt((e) => [...e?.filter((e) => e.group !== `${z}`)]), Nt((e) => e - 1);
3244
+ ]), ri = N((e) => {
3245
+ if (e) Ft((e) => [...e?.filter((e) => e.group !== `${R}`)]), Pt((e) => e - 1);
3233
3246
  else {
3234
- let e = B.filter((e) => !e?.group)?.map((e) => ({
3247
+ let e = z.filter((e) => !e?.group)?.map((e) => ({
3235
3248
  ...e,
3236
- name: `${e?.name}_${z + 1}`,
3237
- group: `${z + 1}`,
3249
+ name: `${e?.name}_${R + 1}`,
3250
+ group: `${R + 1}`,
3238
3251
  dependOn: e.dependOn ? {
3239
- value: `${e.dependOn?.value}_${z + 1}`,
3240
- label: `${e.dependOn?.label}_${z + 1}`,
3252
+ value: `${e.dependOn?.value}_${R + 1}`,
3253
+ label: `${e.dependOn?.label}_${R + 1}`,
3241
3254
  customColumnName: e.dependOn?.customColumnName
3242
3255
  } : void 0,
3243
3256
  dependOns: e?.dependOns?.map((e) => ({
3244
- value: `${e?.value}_${z + 1}`,
3245
- label: `${e?.label}_${z + 1}`,
3257
+ value: `${e?.value}_${R + 1}`,
3258
+ label: `${e?.label}_${R + 1}`,
3246
3259
  customColumnName: e?.customColumnName
3247
3260
  })) || []
3248
3261
  }));
3249
- e.length && (Pt((t) => [...t, ...e]), Nt((e) => e + 1));
3262
+ e.length && (Ft((t) => [...t, ...e]), Pt((e) => e + 1));
3250
3263
  }
3251
- }, [B]), ri = P(async () => {
3252
- Wt.report ? Gt((e) => ({
3264
+ }, [z]), ii = N(async () => {
3265
+ Gt.report ? Kt((e) => ({
3253
3266
  ...e,
3254
3267
  isOpen: !0
3255
- })) : (Gt({
3268
+ })) : (Kt({
3256
3269
  report: "",
3257
3270
  isLoading: !0,
3258
3271
  isOpen: !0
@@ -3267,14 +3280,14 @@ var ui = (e, t, n) => n?.length ? {
3267
3280
  }, {
3268
3281
  onSuccess(e) {
3269
3282
  let t = e?.content;
3270
- Gt((e) => ({
3283
+ Kt((e) => ({
3271
3284
  ...e,
3272
3285
  report: t || "",
3273
3286
  isLoading: !1
3274
3287
  }));
3275
3288
  },
3276
3289
  onError() {
3277
- Gt((e) => ({
3290
+ Kt((e) => ({
3278
3291
  ...e,
3279
3292
  report: "",
3280
3293
  isLoading: !1
@@ -3288,8 +3301,8 @@ var ui = (e, t, n) => n?.length ? {
3288
3301
  _,
3289
3302
  v,
3290
3303
  r,
3291
- Wt
3292
- ]), ai = I(() => {
3304
+ Gt
3305
+ ]), oi = F(() => {
3293
3306
  let t = e?.datasetMetricSettings?.newDatasetSettings, n = t?.configuration, r = Oe(Q || []), i = r, a = t?.selectedDims?.some((e) => Te(e?.datatype)) || O(Q?.[0] || ""), o = t?.selectedDims?.length > 1 && t?.selectedMetrics?.length > 0, s = [
3294
3307
  A.pivot,
3295
3308
  A.pivotV2,
@@ -3302,17 +3315,17 @@ var ui = (e, t, n) => n?.length ? {
3302
3315
  A.geoScatterMap,
3303
3316
  A.worldMap
3304
3317
  ], c = !!n?.aggregates?.length && !!n?.dimensions?.length;
3305
- return c && a && (i = [...r?.filter((e) => !s?.includes(e)), ...s]), c && !a && (i = [...r?.filter((e) => !s?.includes(e)), ...s?.filter((e) => e !== A.timeSeries)]), !c && a && (i = [...r?.filter((e) => !s?.includes(e)), A.timeSeries]), !c && !a && (i = r?.filter((e) => !s?.includes(e))), U?.isEnableGroupBy && U?.configV2 && (i = i?.filter((e) => Ke?.includes(e))), o || (i = i?.filter((e) => e !== A.bubbleV2)), i;
3318
+ return c && a && (i = [...r?.filter((e) => !s?.includes(e)), ...s]), c && !a && (i = [...r?.filter((e) => !s?.includes(e)), ...s?.filter((e) => e !== A.timeSeries)]), !c && a && (i = [...r?.filter((e) => !s?.includes(e)), A.timeSeries]), !c && !a && (i = r?.filter((e) => !s?.includes(e))), H?.isEnableGroupBy && H?.configV2 && (i = i?.filter((e) => qe?.includes(e))), o || (i = i?.filter((e) => e !== A.bubbleV2)), i;
3306
3319
  }, [
3307
3320
  Q,
3308
3321
  G?.xAxis,
3309
- U?.isEnableGroupBy,
3310
- U?.configV2,
3322
+ H?.isEnableGroupBy,
3323
+ H?.configV2,
3311
3324
  e?.datasetMetricSettings?.newDatasetSettings?.configuration?.aggregates,
3312
3325
  e?.datasetMetricSettings?.newDatasetSettings?.configuration?.dimensions
3313
- ]), oi = (t) => {
3326
+ ]), si = (t) => {
3314
3327
  let n = e?.datasetMetricSettings?.newDatasetSettings, r = n?.configuration, i = n?.selectedDims || [], a = n?.selectedMetrics || [], o = e?.companyIntegration?.name, s = G?.enduserMeasureAndDimensions?.isEnabled;
3315
- We({
3328
+ Ge({
3316
3329
  chartAggregateColumns: ue(_e(a?.filter((e) => e.configType === "AGGREGATE" && s ? G?.enduserMeasureAndDimensions?.measures?.some((t) => t.value === e.alias) : !0) || [], o), Q || []),
3317
3330
  chartDimensions: ue(_e(i?.filter((e) => !s || G?.enduserMeasureAndDimensions?.dimensions?.some((t) => t.value === e.alias)) || [], o), Q || []),
3318
3331
  chartMetrics: ue(_e(a?.filter((e) => !s || G?.enduserMeasureAndDimensions?.measures?.some((t) => t.value === e.alias)) || [], o), Q || []),
@@ -3326,12 +3339,12 @@ var ui = (e, t, n) => n?.length ? {
3326
3339
  resultData: Q || [],
3327
3340
  setChartSettings: K
3328
3341
  });
3329
- }, si = I(() => oe(B.filter((e) => e.group && e.isAddOnMetrics && !e.isHiddenInUi && !e.isAppFilter), "group"), [B]), ci = I(() => G?.customSettings?.comparisonValueShow && G?.chartType === A.singleValue ? t?.filters?.find((e) => e?.as === "date") : void 0, [
3342
+ }, ci = F(() => oe(z.filter((e) => e.group && e.isAddOnMetrics && !e.isHiddenInUi && !e.isAppFilter), "group"), [z]), li = F(() => G?.customSettings?.comparisonValueShow && G?.chartType === A.singleValue ? t?.filters?.find((e) => e?.as === "date") : void 0, [
3330
3343
  G?.customSettings?.comparisonValueShow,
3331
3344
  G?.chartType,
3332
3345
  t?.filters?.find((e) => e?.as === "date")
3333
3346
  ]);
3334
- F(() => {
3347
+ P(() => {
3335
3348
  Q?.length && sn.length ? dn(!0) : dn(!1);
3336
3349
  }, [
3337
3350
  Q,
@@ -3339,29 +3352,29 @@ var ui = (e, t, n) => n?.length ? {
3339
3352
  e?.integrationName,
3340
3353
  e?.query
3341
3354
  ]);
3342
- let ui = I(() => e?.datasetMetricSettings?.newDatasetSettings?.selectedMetrics?.some((e) => e.configType === "AGGREGATE") && e?.datasetMetricSettings?.newDatasetSettings?.selectedDims?.map((e) => ({
3355
+ let di = F(() => e?.datasetMetricSettings?.newDatasetSettings?.selectedMetrics?.some((e) => e.configType === "AGGREGATE") && e?.datasetMetricSettings?.newDatasetSettings?.selectedDims?.map((e) => ({
3343
3356
  value: e.alias,
3344
3357
  label: e.alias
3345
- })) || [], [e?.datasetMetricSettings?.newDatasetSettings]), fi = I(() => e?.datasetMetricSettings?.newDatasetSettings?.selectedMetrics?.map((e) => ({
3358
+ })) || [], [e?.datasetMetricSettings?.newDatasetSettings]), pi = F(() => e?.datasetMetricSettings?.newDatasetSettings?.selectedMetrics?.map((e) => ({
3346
3359
  value: e?.alias || e?.name,
3347
3360
  label: e?.alias || e?.name
3348
- })) || [], [e?.datasetMetricSettings?.newDatasetSettings?.selectedMetrics]), { metricFilters: mi, leftPositionedMetricFilters: wi, rightPositionedMetricFilters: Ti } = I(() => {
3349
- let t = Qi({
3350
- rlsConditions: B,
3361
+ })) || [], [e?.datasetMetricSettings?.newDatasetSettings?.selectedMetrics]), { metricFilters: hi, leftPositionedMetricFilters: Ti, rightPositionedMetricFilters: Ei } = F(() => {
3362
+ let t = $i({
3363
+ rlsConditions: z,
3351
3364
  isFrontendApp: g
3352
- }), n = tt({
3365
+ }), n = nt({
3353
3366
  metric: e,
3354
3367
  isAllClient: h,
3355
3368
  tenancyLevel: i
3356
- }) ? rt({
3369
+ }) ? it({
3357
3370
  filters: t,
3358
3371
  clientId: r,
3359
3372
  isAllClient: h,
3360
3373
  clientColumnType: he,
3361
- dataMartTables: et,
3374
+ dataMartTables: tt,
3362
3375
  tenancyLevel: i
3363
3376
  }) : t, a = n.filter((e) => e.isAddOnMetrics);
3364
- Ze && (a = a.filter((e) => Je(e, !0)));
3377
+ Qe && (a = a.filter((e) => Ye(e, !0)));
3365
3378
  let o = [], s = [];
3366
3379
  return a.forEach((e) => {
3367
3380
  e.position === "top-right" ? s.push(e) : o.push(e);
@@ -3371,17 +3384,17 @@ var ui = (e, t, n) => n?.length ? {
3371
3384
  rightPositionedMetricFilters: s
3372
3385
  };
3373
3386
  }, [
3374
- B,
3387
+ z,
3375
3388
  g,
3376
- Ze,
3389
+ Qe,
3377
3390
  e?.isCreatedByClient,
3378
3391
  e?.isAutomaticClientScopeEnabled,
3379
3392
  i,
3380
3393
  r,
3381
3394
  h,
3382
3395
  he,
3383
- et
3384
- ]), Ei = [
3396
+ tt
3397
+ ]), Di = [
3385
3398
  A.pie,
3386
3399
  A.doughnut,
3387
3400
  A.rose,
@@ -3402,21 +3415,21 @@ var ui = (e, t, n) => n?.length ? {
3402
3415
  A.boxplot,
3403
3416
  A.timeSeries,
3404
3417
  A.gantt
3405
- ].includes(G?.chartType) || (G?.isMultiDimension || G?.isDynamicSeries) && G?.seriesField !== "ungrouped", Di = P((t) => {
3418
+ ].includes(G?.chartType) || (G?.isMultiDimension || G?.isDynamicSeries) && G?.seriesField !== "ungrouped", Oi = N((t) => {
3406
3419
  let n = e?.dataSecuritySettings?.csvColumns || [];
3407
3420
  return t?.length ? t?.map((e) => {
3408
3421
  let t = {};
3409
3422
  for (let r in e) n?.includes(r) || (t[r] = e[r]);
3410
3423
  return t;
3411
3424
  }) : [];
3412
- }, [e?.dataSecuritySettings]), Oi = I(() => Di(Q), [Q, Di]);
3413
- F(() => {
3414
- G || (K(e?.chartOptions), At({
3425
+ }, [e?.dataSecuritySettings]), ki = F(() => Oi(Q), [Q, Oi]);
3426
+ P(() => {
3427
+ G || (K(e?.chartOptions), jt({
3415
3428
  limit: parseInt(e?.chartOptions?.tableSettings?.defaultRowSize || "100", 10),
3416
3429
  offset: 0
3417
3430
  }));
3418
- }, [e?.chartOptions, G]), F(() => {
3419
- G?.tableSettings?.isServerSidePagination && G?.chartType === A.table && At({
3431
+ }, [e?.chartOptions, G]), P(() => {
3432
+ G?.tableSettings?.isServerSidePagination && G?.chartType === A.table && jt({
3420
3433
  limit: parseInt(G?.tableSettings?.defaultRowSize || "100", 10),
3421
3434
  offset: 0
3422
3435
  });
@@ -3425,13 +3438,13 @@ var ui = (e, t, n) => n?.length ? {
3425
3438
  G?.chartType,
3426
3439
  G?.tableSettings?.defaultRowSize
3427
3440
  ]);
3428
- let Ai = L(t);
3429
- Ai.current = t, F(() => {
3441
+ let ji = I(t);
3442
+ ji.current = t, P(() => {
3430
3443
  if (G?.chartType === A.timeSeries && G?.timeSeriesSettings?.groupBySettings?.isGlobalFilter && Mr) {
3431
- let e = Ai.current?.filters?.find((e) => e.label === G?.timeSeriesSettings?.groupBySettings?.globalFilterOption?.value)?.value;
3444
+ let e = ji.current?.filters?.find((e) => e.label === G?.timeSeriesSettings?.groupBySettings?.globalFilterOption?.value)?.value;
3432
3445
  if ((typeof e == "string" || typeof e == "object" && e?.value) && e) {
3433
3446
  let t = typeof e == "string" ? Ce(e)?.toLowerCase() : G?.timeSeriesSettings?.groupBySettings?.formatWithValue?.find((t) => t.value === Ce(e?.value))?.format?.toLowerCase() || "";
3434
- it?.find((e) => e?.value?.toLowerCase() === t) && K((e) => ({
3447
+ at?.find((e) => e?.value?.toLowerCase() === t) && K((e) => ({
3435
3448
  ...e,
3436
3449
  timeSeriesSettings: {
3437
3450
  ...e?.timeSeriesSettings,
@@ -3450,7 +3463,7 @@ var ui = (e, t, n) => n?.length ? {
3450
3463
  G?.timeSeriesSettings?.groupBySettings?.isGlobalFilter,
3451
3464
  G?.timeSeriesSettings?.groupBySettings?.globalFilterOption,
3452
3465
  Mr
3453
- ]), F(() => {
3466
+ ]), P(() => {
3454
3467
  G?.isDynamicSeries && (G?.seriesOptions?.includes("ungrouped") ? G?.ungroupedAlias ? wn(G?.seriesOptions?.map((e) => e === "ungrouped" ? {
3455
3468
  value: e,
3456
3469
  label: G?.ungroupedAlias
@@ -3469,17 +3482,17 @@ var ui = (e, t, n) => n?.length ? {
3469
3482
  G?.isDynamicSeries,
3470
3483
  G?.ungroupedAlias
3471
3484
  ]);
3472
- let [ji, Mi] = R(!1), Ni = (e) => {
3473
- e.key === "Control" && Mi(!0);
3474
- }, Pi = (e) => {
3475
- e.key === "Control" && Mi(!1);
3485
+ let [Mi, Ni] = L(!1), Pi = (e) => {
3486
+ e.key === "Control" && Ni(!0);
3487
+ }, Fi = (e) => {
3488
+ e.key === "Control" && Ni(!1);
3476
3489
  };
3477
- F(() => {
3478
- Q?.length && Ut(Object.keys(Q?.[0] || {}));
3479
- }, [Q?.length]), F(() => (G?.customSettings?.chartZoom?.isZoomEnabled && (window.addEventListener("keydown", Ni), window.addEventListener("keyup", Pi)), () => {
3480
- window.removeEventListener("keydown", Ni), window.removeEventListener("keyup", Pi);
3490
+ P(() => {
3491
+ Q?.length && Wt(Object.keys(Q?.[0] || {}));
3492
+ }, [Q?.length]), P(() => (G?.customSettings?.chartZoom?.isZoomEnabled && (window.addEventListener("keydown", Pi), window.addEventListener("keyup", Fi)), () => {
3493
+ window.removeEventListener("keydown", Pi), window.removeEventListener("keyup", Fi);
3481
3494
  }), []);
3482
- let Fi = I(() => {
3495
+ let Ii = F(() => {
3483
3496
  let e = !1;
3484
3497
  if (Q?.length) {
3485
3498
  let t = G?.singleValue;
@@ -3490,7 +3503,7 @@ var ui = (e, t, n) => n?.length ? {
3490
3503
  Q?.length,
3491
3504
  G?.singleValue,
3492
3505
  G?.chartType === A.singleValue
3493
- ]), Ii = I(() => $e({
3506
+ ]), Li = F(() => et({
3494
3507
  chartOptions: G,
3495
3508
  data: Q || []
3496
3509
  }), [
@@ -3504,7 +3517,7 @@ var ui = (e, t, n) => n?.length ? {
3504
3517
  G?.isGroupXAxis,
3505
3518
  G?.timeSeriesSettings?.seriesType[0],
3506
3519
  G?.timeSeriesSettings?.groupBySettings?.fillXAxis
3507
- ]), Li = I(() => Ee({
3520
+ ]), Ri = F(() => Ee({
3508
3521
  text: ze(e?.name || "", _n) || "",
3509
3522
  selectedLanguage: Me,
3510
3523
  translationDictionary: j
@@ -3513,7 +3526,7 @@ var ui = (e, t, n) => n?.length ? {
3513
3526
  _n,
3514
3527
  j,
3515
3528
  Me
3516
- ]), Ri = I(() => Ee({
3529
+ ]), zi = F(() => Ee({
3517
3530
  text: ze(e?.longDescription || "", _n) || "",
3518
3531
  selectedLanguage: Me,
3519
3532
  translationDictionary: j
@@ -3522,7 +3535,7 @@ var ui = (e, t, n) => n?.length ? {
3522
3535
  _n,
3523
3536
  Me,
3524
3537
  j
3525
- ]), Wi = I(() => Ee({
3538
+ ]), Gi = F(() => Ee({
3526
3539
  text: ze(e?.description || "", _n) || "",
3527
3540
  selectedLanguage: Me,
3528
3541
  translationDictionary: j
@@ -3531,7 +3544,7 @@ var ui = (e, t, n) => n?.length ? {
3531
3544
  _n,
3532
3545
  Me,
3533
3546
  j
3534
- ]), Yi = I(() => Ee({
3547
+ ]), Xi = F(() => Ee({
3535
3548
  text: ze(e?.footNote || "", _n) || "",
3536
3549
  selectedLanguage: Me,
3537
3550
  translationDictionary: j
@@ -3540,7 +3553,7 @@ var ui = (e, t, n) => n?.length ? {
3540
3553
  _n,
3541
3554
  Me,
3542
3555
  j
3543
- ]), $i = I(() => `${Q?.[0]?.dbn_metric_expression_data || "No Data Found"}`, [Q]), ea = I(() => e?.rlsConditions?.map((e) => {
3556
+ ]), ea = F(() => `${Q?.[0]?.dbn_metric_expression_data || "No Data Found"}`, [Q]), ta = F(() => e?.rlsConditions?.map((e) => {
3544
3557
  if (e?.datatype === "date" && e?.options?.find((e) => e.range === "Custom Date") && e?.isEnableDynamicDate && e?.dynamicDate?.value) {
3545
3558
  let t = pe(He?.find((t) => t.value === e?.dynamicDate?.value)?.count || 0), n = Ve(t), r = Ve(t);
3546
3559
  return {
@@ -3555,9 +3568,9 @@ var ui = (e, t, n) => n?.length ? {
3555
3568
  }
3556
3569
  return e;
3557
3570
  }), [e?.rlsConditions]);
3558
- pt(() => {
3571
+ mt(() => {
3559
3572
  if (Z && k?.((t) => {
3560
- if (gi(t?.get(e?.id), Y)) return t;
3573
+ if (_i(t?.get(e?.id), Y)) return t;
3561
3574
  let n = new Map(t);
3562
3575
  return n.set(e?.id, {
3563
3576
  data: {
@@ -3569,9 +3582,9 @@ var ui = (e, t, n) => n?.length ? {
3569
3582
  key: Y
3570
3583
  }), n;
3571
3584
  }), X?.data && D) {
3572
- let t = Xi(e?.id, ne) ? X?.data : void 0;
3585
+ let t = Zi(e?.id, ne) ? X?.data : void 0;
3573
3586
  k?.((n) => {
3574
- if (xi(n?.get(e?.id), {
3587
+ if (Si(n?.get(e?.id), {
3575
3588
  data: t,
3576
3589
  name: e?.name || "",
3577
3590
  description: e?.description || "",
@@ -3591,7 +3604,7 @@ var ui = (e, t, n) => n?.length ? {
3591
3604
  });
3592
3605
  }
3593
3606
  if (!Z && ar) {
3594
- let t = Si(e);
3607
+ let t = Ci(e);
3595
3608
  k?.((n) => {
3596
3609
  let r = n?.get(e?.id);
3597
3610
  if (r && !r.isLoading && !!r.error === t && r.key === Y) return n;
@@ -3614,13 +3627,13 @@ var ui = (e, t, n) => n?.length ? {
3614
3627
  Y,
3615
3628
  ar
3616
3629
  ]);
3617
- let ta = L(e?.id);
3618
- ta.current = e?.id;
3619
- let na = L(D);
3620
- na.current = D;
3621
- let ra = L(k);
3622
- ra.current = k, F(() => () => {
3623
- let e = ta.current, t = na.current, n = ra.current;
3630
+ let na = I(e?.id);
3631
+ na.current = e?.id;
3632
+ let ra = I(D);
3633
+ ra.current = D;
3634
+ let ia = I(k);
3635
+ ia.current = k, P(() => () => {
3636
+ let e = na.current, t = ra.current, n = ia.current;
3624
3637
  e && t && n && t.get(e)?.data?.data && n((t) => {
3625
3638
  let n = t.get(e);
3626
3639
  if (!n?.data?.data) return t;
@@ -3634,15 +3647,15 @@ var ui = (e, t, n) => n?.length ? {
3634
3647
  }), r;
3635
3648
  });
3636
3649
  }, []);
3637
- let ia = !!e?.elementSettings?.summary?.metricList?.length, [aa, oa] = R(0);
3638
- F(() => {
3650
+ let aa = !!e?.elementSettings?.summary?.metricList?.length, [oa, sa] = L(0);
3651
+ P(() => {
3639
3652
  let e = D?.subscribe;
3640
- if (ia && typeof e == "function") return e(() => oa((e) => e + 1));
3641
- }, [D, ia]), pt(() => {
3642
- Dt.current !== Vn && (Dt.current = Vn, St());
3643
- }, [Vn, St]);
3644
- let sa = () => !!e?.elementSettings?.summary?.metricList?.some((e) => D?.get(e.value)?.isLoading === !0);
3645
- pt(() => {
3653
+ if (aa && typeof e == "function") return e(() => sa((e) => e + 1));
3654
+ }, [D, aa]), mt(() => {
3655
+ Ot.current !== Vn && (Ot.current = Vn, Ct());
3656
+ }, [Vn, Ct]);
3657
+ let ca = () => !!e?.elementSettings?.summary?.metricList?.some((e) => D?.get(e.value)?.isLoading === !0);
3658
+ mt(() => {
3646
3659
  let t = e?.elementSettings?.summary;
3647
3660
  if (!t?.metricList?.length || !D?.get(e?.id)) return;
3648
3661
  let n = t.metricList.map((e) => D.get(e.value));
@@ -3657,7 +3670,7 @@ var ui = (e, t, n) => n?.length ? {
3657
3670
  metricName: e?.data?.name,
3658
3671
  metricDescription: e?.data?.description
3659
3672
  })), o = a.every((e) => e.data.length > 0);
3660
- bt(i, o ? (i) => gt.mutateAsync({
3673
+ xt(i, o ? (i) => _t.mutateAsync({
3661
3674
  signal: i,
3662
3675
  data: {
3663
3676
  metricData: a,
@@ -3678,17 +3691,17 @@ var ui = (e, t, n) => n?.length ? {
3678
3691
  e?.name,
3679
3692
  e?.description,
3680
3693
  D,
3681
- aa,
3694
+ oa,
3682
3695
  Vn,
3683
- bt,
3684
- gt,
3696
+ xt,
3697
+ _t,
3685
3698
  T,
3686
3699
  _,
3687
3700
  g,
3688
3701
  v,
3689
3702
  r
3690
- ]), F(() => {
3691
- let e = st(G?.customSettings?.comboAxisSettings || []), t = e?.flatMap((e) => e?.measures), n = G?.yAxisList?.every((e) => t?.includes(e));
3703
+ ]), P(() => {
3704
+ let e = ct(G?.customSettings?.comboAxisSettings || []), t = e?.flatMap((e) => e?.measures), n = G?.yAxisList?.every((e) => t?.includes(e));
3692
3705
  if (G?.yAxisList?.length && G?.yAxisList?.length !== t?.length && !t?.length && [
3693
3706
  A.combo,
3694
3707
  A.timeSeries,
@@ -3699,7 +3712,7 @@ var ui = (e, t, n) => n?.length ? {
3699
3712
  ...t,
3700
3713
  customSettings: {
3701
3714
  ...t.customSettings,
3702
- comboAxisSettings: st([
3715
+ comboAxisSettings: ct([
3703
3716
  ...t.customSettings?.comboAxisSettings || [],
3704
3717
  ...e?.map((e) => {
3705
3718
  let t = G?.customSettings?.comboLabelFormatter?.find((t) => t.axis === e)?.formatter, n = G?.customSettings?.comboAxisSymbols?.find((t) => t.name === e);
@@ -3778,7 +3791,7 @@ var ui = (e, t, n) => n?.length ? {
3778
3791
  ...t,
3779
3792
  customSettings: {
3780
3793
  ...t.customSettings,
3781
- comboAxisSettings: st(r ? t.customSettings?.comboAxisSettings?.map((t) => t.axis === n ? {
3794
+ comboAxisSettings: ct(r ? t.customSettings?.comboAxisSettings?.map((t) => t.axis === n ? {
3782
3795
  ...t,
3783
3796
  measures: t?.measures?.filter((t) => t !== e)
3784
3797
  } : t)?.filter((e) => e?.measures?.length) || [] : t.customSettings?.comboAxisSettings?.filter((e) => e.axis !== n && e?.measures?.length) || [])
@@ -3788,7 +3801,7 @@ var ui = (e, t, n) => n?.length ? {
3788
3801
  ...t,
3789
3802
  customSettings: {
3790
3803
  ...t.customSettings,
3791
- comboAxisSettings: st([...t.customSettings?.comboAxisSettings || [], ...e?.map((e) => ({
3804
+ comboAxisSettings: ct([...t.customSettings?.comboAxisSettings || [], ...e?.map((e) => ({
3792
3805
  axis: e,
3793
3806
  measures: [e],
3794
3807
  chartTypes: [{
@@ -3825,7 +3838,7 @@ var ui = (e, t, n) => n?.length ? {
3825
3838
  G?.customSettings?.combinedAxisPrefix,
3826
3839
  G?.customSettings?.combinedAxisSuffix,
3827
3840
  G?.chartType
3828
- ]), F(() => {
3841
+ ]), P(() => {
3829
3842
  G?.yAxisList?.length && G?.yAxisList?.length < 5 && G?.chartType === A.boxplot && K((e) => ({
3830
3843
  ...e,
3831
3844
  chartType: A.line
@@ -3834,17 +3847,17 @@ var ui = (e, t, n) => n?.length ? {
3834
3847
  chartType: A.singleValue
3835
3848
  }));
3836
3849
  }, [G?.chartType, G?.yAxisList?.length]);
3837
- let ca = ({ columnAlias: t, value: n, isClear: r = !1 }) => {
3850
+ let la = ({ columnAlias: t, value: n, isClear: r = !1 }) => {
3838
3851
  let i = e?.datasetMetricSettings;
3839
3852
  i && Re({
3840
3853
  columnAlias: t,
3841
3854
  datasetSettings: i,
3842
- setTableColumnFilters: It,
3855
+ setTableColumnFilters: Lt,
3843
3856
  value: n,
3844
3857
  isClear: r
3845
3858
  });
3846
3859
  };
3847
- F(() => {
3860
+ P(() => {
3848
3861
  if (!G?.dynamicYAxis?.isEnabled || !G?.dynamicYAxis?.selectedOption || Array.isArray(G?.dynamicYAxis?.selectedOption)) return;
3849
3862
  let e = G?.dynamicYAxis?.selectedOption;
3850
3863
  K((t) => ({
@@ -3855,8 +3868,8 @@ var ui = (e, t, n) => n?.length ? {
3855
3868
  },
3856
3869
  yAxisList: [e?.value]
3857
3870
  }));
3858
- }, [G?.dynamicYAxis?.selectedOption, G?.dynamicYAxis?.isEnabled]), F(() => {
3859
- let t = N?.yAxisSettings?.find((t) => t?.yAxisSettings?.isEnable && t?.id === e?.id && t?.yAxisSettings?.yAxis && Array.isArray(t?.yAxisSettings?.yAxis) && t?.yAxisSettings?.yAxis?.length > 0), n = N?.xAxisSettings?.find((t) => t?.xAxisSettings?.isEnable && t?.id === e?.id && t?.xAxisSettings?.xaxis), r = U?.configV2?.levels?.length ? U : e?.drillDownSettings, i = qi(e?.chartOptions, r), a = i !== e?.chartOptions;
3871
+ }, [G?.dynamicYAxis?.selectedOption, G?.dynamicYAxis?.isEnabled]), P(() => {
3872
+ let t = M?.yAxisSettings?.find((t) => t?.yAxisSettings?.isEnable && t?.id === e?.id && t?.yAxisSettings?.yAxis && Array.isArray(t?.yAxisSettings?.yAxis) && t?.yAxisSettings?.yAxis?.length > 0), n = M?.xAxisSettings?.find((t) => t?.xAxisSettings?.isEnable && t?.id === e?.id && t?.xAxisSettings?.xaxis), r = H?.configV2?.levels?.length ? H : e?.drillDownSettings, i = Ji(e?.chartOptions, r), a = i !== e?.chartOptions;
3860
3873
  if (!G?.dynamicYAxis?.isEnabled && !G?.dynamicXAxis?.isEnabled && !a || !t && !n && !a) {
3861
3874
  K((t) => e?.chartOptions || t);
3862
3875
  return;
@@ -3885,17 +3898,17 @@ var ui = (e, t, n) => n?.length ? {
3885
3898
  };
3886
3899
  });
3887
3900
  }, [
3888
- N?.yAxisSettings,
3901
+ M?.yAxisSettings,
3889
3902
  e?.id,
3890
- N?.xAxisSettings,
3903
+ M?.xAxisSettings,
3891
3904
  G?.dynamicYAxis?.isEnabled,
3892
3905
  G?.dynamicXAxis?.isEnabled,
3893
- U,
3894
- U?.configV2?.isEnable,
3895
- U?.configV2?.levels,
3906
+ H,
3907
+ H?.configV2?.isEnable,
3908
+ H?.configV2?.levels,
3896
3909
  e?.chartOptions,
3897
3910
  e?.drillDownSettings
3898
- ]), F(() => {
3911
+ ]), P(() => {
3899
3912
  G?.customSettings?.isShowDuration && G?.chartType === A.gantt && !G?.customSettings?.ganttTooltipKeys?.includes("Duration") && K((e) => ({
3900
3913
  ...e,
3901
3914
  customSettings: {
@@ -3908,17 +3921,17 @@ var ui = (e, t, n) => n?.length ? {
3908
3921
  G?.chartType,
3909
3922
  G?.customSettings?.ganttTooltipKeys
3910
3923
  ]);
3911
- let la = I(() => e?.datasetMetricSettings?.selectedDimensions?.map((e) => le(e || "none")) || Ki, [e?.datasetMetricSettings?.selectedDimensions]);
3924
+ let ua = F(() => e?.datasetMetricSettings?.selectedDimensions?.map((e) => le(e || "none")) || qi, [e?.datasetMetricSettings?.selectedDimensions]);
3912
3925
  return {
3913
- drillBlockedNotice: _t,
3926
+ drillBlockedNotice: vt,
3914
3927
  filterNotAppliedNotice: $n,
3915
- dismissDrillBlockedNotice: () => vt(null),
3916
- elementSummary: Ct,
3917
- elementSummaryError: wt,
3918
- elementSummaryEmpty: Tt,
3919
- isLoadingSummary: Et,
3920
- stopSummary: xt,
3921
- isMetricListLoading: sa,
3928
+ dismissDrillBlockedNotice: () => yt(null),
3929
+ elementSummary: wt,
3930
+ elementSummaryError: Tt,
3931
+ elementSummaryEmpty: Et,
3932
+ isLoadingSummary: Dt,
3933
+ stopSummary: St,
3934
+ isMetricListLoading: ca,
3922
3935
  onDrillLevelClick: Qr,
3923
3936
  onDrillDown: Yr,
3924
3937
  onFilterDashboardTo: qr,
@@ -3929,34 +3942,34 @@ var ui = (e, t, n) => n?.length ? {
3929
3942
  truncationNotice: ir,
3930
3943
  getUnderlyingData: Gr,
3931
3944
  onChangeFilterValue: Ir,
3932
- isShowChartPopup: Lt,
3933
- setShowChartPopup: Rt,
3945
+ isShowChartPopup: Rt,
3946
+ setShowChartPopup: zt,
3934
3947
  columnName: zr,
3935
3948
  underlyingDataPoint: Br,
3936
- chartParams: V,
3937
- isQueryLoading: !Ln && (Z || mt || Xn || Le && (!Q?.length || Fi)),
3949
+ chartParams: B,
3950
+ isQueryLoading: !Ln && (Z || ht || Xn || Le && (!Q?.length || Ii)),
3938
3951
  isMetricUpdating: Zn,
3939
- isSingleValueNull: Fi,
3952
+ isSingleValueNull: Ii,
3940
3953
  dynamicOptions: Sn,
3941
3954
  chartSettings: G,
3942
3955
  setChartSettings: K,
3943
- isEnableZoom: ji,
3956
+ isEnableZoom: Mi,
3944
3957
  filterValues: An,
3945
- containerRef: Ot,
3946
- drilledLevel: H.length,
3947
- dimensions: la,
3948
- rlsConditions: B,
3949
- setRlsConditions: Pt,
3950
- setTableLimit: At,
3951
- isEnableNextBtn: jt > kt?.limit + kt?.offset,
3952
- isEnablePrevBtn: kt?.offset !== 0,
3958
+ containerRef: kt,
3959
+ drilledLevel: V.length,
3960
+ dimensions: ua,
3961
+ rlsConditions: z,
3962
+ setRlsConditions: Ft,
3963
+ setTableLimit: jt,
3964
+ isEnableNextBtn: Mt > At?.limit + At?.offset,
3965
+ isEnablePrevBtn: At?.offset !== 0,
3953
3966
  paginationInfo: {
3954
- limit: kt?.limit,
3955
- offset: kt?.offset,
3956
- totalRecords: jt
3967
+ limit: At?.limit,
3968
+ offset: At?.offset,
3969
+ totalRecords: Mt
3957
3970
  },
3958
3971
  onChangePage: (e, t, n) => {
3959
- At(t ? {
3972
+ jt(t ? {
3960
3973
  limit: t,
3961
3974
  offset: 0
3962
3975
  } : (t) => {
@@ -3973,72 +3986,72 @@ var ui = (e, t, n) => n?.length ? {
3973
3986
  hasNumberKeys: !0,
3974
3987
  isEnableGauge: !0,
3975
3988
  updateFilter: (e) => {
3976
- Pt((t) => t?.map((t) => t.name === e.name && t.datatype === e.datatype && t.tableName === e.tableName && t.columnName === e.columnName ? {
3989
+ Ft((t) => t?.map((t) => t.name === e.name && t.datatype === e.datatype && t.tableName === e.tableName && t.columnName === e.columnName ? {
3977
3990
  ...t,
3978
3991
  isAddOnMetrics: !t.isAddOnMetrics
3979
3992
  } : t));
3980
3993
  },
3981
- metricFilters: mi,
3982
- leftPositionedMetricFilters: wi,
3983
- rightPositionedMetricFilters: Ti,
3984
- drillFilters: H,
3994
+ metricFilters: hi,
3995
+ leftPositionedMetricFilters: Ti,
3996
+ rightPositionedMetricFilters: Ei,
3997
+ drillFilters: V,
3985
3998
  underlyingDataColumnMetadata: Wr,
3986
3999
  underlyingDataDrillFilters: Ur,
3987
- drillType: U?.drillType,
3988
- tableResultsDownloadData: Oi,
3989
- filterCsvColumns: Di,
4000
+ drillType: H?.drillType,
4001
+ tableResultsDownloadData: ki,
4002
+ filterCsvColumns: Oi,
3990
4003
  appliedMetricFilters: W,
3991
- pivotHeaderOptions: ui,
4004
+ pivotHeaderOptions: di,
3992
4005
  pivotDrillState: En,
3993
4006
  onDrillPivotTable: Zr,
3994
- legendData: Ii,
4007
+ legendData: Li,
3995
4008
  timeseriesDimension: Mr,
3996
4009
  isPythonMode: q,
3997
- sortOrder: Bt,
3998
- setSortOrder: Vt,
3999
- isNotFirstRender: Kt,
4000
- setNotFirstRender: qt,
4010
+ sortOrder: Vt,
4011
+ setSortOrder: Ht,
4012
+ isNotFirstRender: qt,
4013
+ setNotFirstRender: Jt,
4001
4014
  isSorted: yn,
4002
- isInavlidForSort: Ei,
4003
- onAddComparison: ni,
4004
- groupedRlsConditions: si,
4005
- onGenerateMetricSummary: ri,
4006
- summary: Wt,
4007
- setSummary: Gt,
4015
+ isInavlidForSort: Di,
4016
+ onAddComparison: ri,
4017
+ groupedRlsConditions: ci,
4018
+ onGenerateMetricSummary: ii,
4019
+ summary: Gt,
4020
+ setSummary: Kt,
4008
4021
  dataMartRelationships: kn,
4009
- onChartChange: oi,
4022
+ onChartChange: si,
4010
4023
  isCompareValue: Fr,
4011
4024
  isShowChartPropertyPanel: fn,
4012
4025
  setShowChartPropertyPanel: pn,
4013
- columnList: Ht,
4026
+ columnList: Ut,
4014
4027
  variables: _n,
4015
- metricName: Li,
4016
- longDescription: Ri,
4017
- footNote: Yi,
4018
- description: Wi,
4019
- drilldownCols: Jt,
4020
- switchMeasureOptions: fi,
4021
- metricExpressionResult: $i,
4022
- dateFilter: ci,
4023
- drillDownSettings: U,
4028
+ metricName: Ri,
4029
+ longDescription: zi,
4030
+ footNote: Xi,
4031
+ description: Gi,
4032
+ drilldownCols: Yt,
4033
+ switchMeasureOptions: pi,
4034
+ metricExpressionResult: ea,
4035
+ dateFilter: li,
4036
+ drillDownSettings: H,
4024
4037
  onDrillIntoDimension: Xr,
4025
4038
  adhocDrillDims: an,
4026
- enabledCharts: ai,
4027
- tableColumnFilters: Ft,
4028
- onChangePaginationColumnFilters: ca,
4039
+ enabledCharts: oi,
4040
+ tableColumnFilters: It,
4041
+ onChangePaginationColumnFilters: la,
4029
4042
  queryError: ar,
4030
4043
  queryPermissionDenied: !!qn?.isBatchAuth,
4031
4044
  refetchMetricData: Yn,
4032
4045
  customSwitchXAxis: jn,
4033
- savedMetricFilters: ea || Gi
4046
+ savedMetricFilters: ta || Ki
4034
4047
  };
4035
4048
  };
4036
- function Xi(e, t) {
4049
+ function Zi(e, t) {
4037
4050
  return t === void 0 || t.has(e);
4038
4051
  }
4039
4052
  //#endregion
4040
4053
  //#region src/helpers/getValidRlsConditionOptions.ts
4041
- var Zi = (e, t) => {
4054
+ var Qi = (e, t) => {
4042
4055
  if (!t?.[e.name]) return;
4043
4056
  let n = t?.[e.name]?.defaultOption?.toString(), r = (t?.[e.name]?.options)?.filter((t) => {
4044
4057
  if (t == null) return !1;
@@ -4085,16 +4098,16 @@ var Zi = (e, t) => {
4085
4098
  }) ? n : void 0,
4086
4099
  options: r
4087
4100
  };
4088
- }, Qi = ({ rlsConditions: e, isFrontendApp: t }) => e.filter((e) => (t || !e.isAppFilter) && !e.isHiddenInUi), $i = (e) => !!e && e !== "null" && e !== "undefined", ea = (e) => {
4101
+ }, $i = ({ rlsConditions: e, isFrontendApp: t }) => e.filter((e) => (t || !e.isAppFilter) && !e.isHiddenInUi), ea = (e) => !!e && e !== "null" && e !== "undefined", ta = (e) => {
4089
4102
  if (e == null) return null;
4090
4103
  let t = typeof e == "string" ? e : String(e);
4091
4104
  return t.length ? t : null;
4092
- }, ta = ({ config: e, value: t, carryFilters: n = [] }) => {
4105
+ }, na = ({ config: e, value: t, carryFilters: n = [] }) => {
4093
4106
  if (!e?.isEnable) return {
4094
4107
  ok: !1,
4095
4108
  reason: "disabled"
4096
4109
  };
4097
- if (!$i(e.dashboardId)) return {
4110
+ if (!ea(e.dashboardId)) return {
4098
4111
  ok: !1,
4099
4112
  reason: "no_destination"
4100
4113
  };
@@ -4103,7 +4116,7 @@ var Zi = (e, t) => {
4103
4116
  ok: !1,
4104
4117
  reason: "no_target_filter"
4105
4118
  };
4106
- let i = ea(t);
4119
+ let i = ta(t);
4107
4120
  if (i === null) return {
4108
4121
  ok: !1,
4109
4122
  reason: "no_value"
@@ -4115,7 +4128,7 @@ var Zi = (e, t) => {
4115
4128
  a.forEach((e) => {
4116
4129
  o.set(e.column, e.value);
4117
4130
  });
4118
- let s = `/externalDashboard/${encodeURIComponent(e.dashboardId)}/?${o.toString()}`, c = ct(s, { routeType: "internal" });
4131
+ let s = `/externalDashboard/${encodeURIComponent(e.dashboardId)}/?${o.toString()}`, c = lt(s, { routeType: "internal" });
4119
4132
  return c.ok ? {
4120
4133
  ok: !0,
4121
4134
  intent: {
@@ -4132,7 +4145,7 @@ var Zi = (e, t) => {
4132
4145
  navigation: c.code
4133
4146
  }
4134
4147
  };
4135
- }, na = (e, t) => {
4148
+ }, ra = (e, t) => {
4136
4149
  let n = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? e : null, { params: r, rowFilters: i } = t, a = e?.valueColumn?.trim();
4137
4150
  if (a) {
4138
4151
  let e = (i ?? []).find((e) => e?.columnName === a);
@@ -4141,7 +4154,7 @@ var Zi = (e, t) => {
4141
4154
  if (r && r.name !== void 0 && r.name !== null) return n(r.name);
4142
4155
  let o = (i ?? []).find((e) => e?.value !== void 0 && e?.value !== null);
4143
4156
  return o ? n(o.value) : null;
4144
- }, ra = lt("triangle-alert", [
4157
+ }, ia = ut("triangle-alert", [
4145
4158
  ["path", {
4146
4159
  d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
4147
4160
  key: "wmoenq"
@@ -4154,7 +4167,7 @@ var Zi = (e, t) => {
4154
4167
  d: "M12 17h.01",
4155
4168
  key: "p32p05"
4156
4169
  }]
4157
- ]), ia = (e) => e === "column" ? {
4170
+ ]), aa = (e) => e === "column" ? {
4158
4171
  code: "JOIN_COLUMN_HIDDEN",
4159
4172
  message: "A column this metric uses is hidden or no longer in the datamart.",
4160
4173
  hint: "Ask an editor to unhide it in the datamart or update the metric."
@@ -4162,44 +4175,44 @@ var Zi = (e, t) => {
4162
4175
  code: "JOIN_PATH_MISSING",
4163
4176
  message: "A join this metric uses is no longer in the datamart.",
4164
4177
  hint: "Ask an editor to add the relationship back or update the metric."
4165
- }, aa = (e) => {
4178
+ }, oa = (e) => {
4166
4179
  let t = n(e, { fallback: "The query couldn't run." });
4167
- return t.code === "JOIN_COLUMN_HIDDEN" ? n(ia("column")) : t.code === "JOIN_PATH_MISSING" ? n(ia("join")) : t;
4168
- }, oa = {
4180
+ return t.code === "JOIN_COLUMN_HIDDEN" ? n(aa("column")) : t.code === "JOIN_PATH_MISSING" ? n(aa("join")) : t;
4181
+ }, sa = {
4169
4182
  notice: "_notice_vwpz7_1",
4170
4183
  icon: "_icon_vwpz7_15"
4171
- }, sa = N(), ca = ({ text: e }) => e ? /* @__PURE__ */ (0, sa.jsxs)("div", {
4172
- className: oa.notice,
4184
+ }, ca = M(), la = ({ text: e }) => e ? /* @__PURE__ */ (0, ca.jsxs)("div", {
4185
+ className: sa.notice,
4173
4186
  role: "status",
4174
4187
  "data-testid": "custom-sql-filter-notice",
4175
- children: [/* @__PURE__ */ (0, sa.jsx)(ra, {
4176
- className: oa.icon,
4188
+ children: [/* @__PURE__ */ (0, ca.jsx)(ia, {
4189
+ className: sa.icon,
4177
4190
  "aria-hidden": "true"
4178
- }), /* @__PURE__ */ (0, sa.jsx)("span", { children: e })]
4179
- }) : null, la = (e) => {
4191
+ }), /* @__PURE__ */ (0, ca.jsx)("span", { children: e })]
4192
+ }) : null, ua = (e) => {
4180
4193
  let t = e.value ?? e.selectedVariableValue?.value;
4181
4194
  return Array.isArray(t) ? t.length > 0 : typeof t == "string" ? t.trim().length > 0 : t != null;
4182
- }, ua = (e) => {
4195
+ }, da = (e) => {
4183
4196
  let t = e.label ?? e.name ?? e.column;
4184
4197
  return typeof t == "string" && t.trim() ? t.trim() : "Filter";
4185
- }, da = ({ isCustomSqlMetric: e, query: t, metricId: n, filters: r }) => {
4198
+ }, fa = ({ isCustomSqlMetric: e, query: t, metricId: n, filters: r }) => {
4186
4199
  if (!e) return [];
4187
4200
  let i = Be(t || "");
4188
4201
  return (r || []).flatMap((e) => {
4189
4202
  let t = e.restrictedMetrics?.some((e) => e.value === n);
4190
- if (!e.isVariableFilter || e.isFilterApplied === !1 || e.isHiddenInUi || t || !la(e)) return [];
4203
+ if (!e.isVariableFilter || e.isFilterApplied === !1 || e.isHiddenInUi || t || !ua(e)) return [];
4191
4204
  let r = (e.variableStrings || []).filter(Boolean), a = r.filter((e) => !i.includes(e));
4192
4205
  return r.length > 0 && a.length === 0 ? [] : [{
4193
- label: ua(e),
4206
+ label: da(e),
4194
4207
  missingVariables: a
4195
4208
  }];
4196
4209
  });
4197
- }, fa = (e) => e.length === 1 ? e[0] : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e.at(-1)}`, pa = (e) => {
4198
- let t = da(e);
4210
+ }, pa = (e) => e.length === 1 ? e[0] : e.length === 2 ? `${e[0]} and ${e[1]}` : `${e.slice(0, -1).join(", ")}, and ${e.at(-1)}`, ma = (e) => {
4211
+ let t = fa(e);
4199
4212
  if (!t.length) return null;
4200
4213
  let n = [...new Set(t.flatMap((e) => e.missingVariables))], r = t.length === 1 ? `${t[0].label} is not applied to this custom SQL metric.` : `${t.length} filters are not applied to this custom SQL metric.`;
4201
- return n.length ? `${r} Add ${fa(n)} to the metric SQL.` : `${r} Configure matching filter variables in the metric SQL.`;
4202
- }, ma = ({ chart: e, valueColumn: t, isDrillEnabled: n, drilledLevel: r, dimensionCount: i, params: a, passAllData: o }) => {
4214
+ return n.length ? `${r} Add ${pa(n)} to the metric SQL.` : `${r} Configure matching filter variables in the metric SQL.`;
4215
+ }, ha = ({ chart: e, valueColumn: t, isDrillEnabled: n, drilledLevel: r, dimensionCount: i, params: a, passAllData: o }) => {
4203
4216
  let s = e?.chartType;
4204
4217
  return s === A.table || s === A.singleValue || n && r === i ? o ? a?.reduce((e, t) => (e[t.columnName] = t.value, e), {}) : a?.find((e) => e.columnName === t)?.value : [A.sankey, A.treeMap].includes(s) ? o ? {
4205
4218
  name: a?.name,
@@ -4209,19 +4222,19 @@ var Zi = (e, t) => {
4209
4222
  value: a?.value,
4210
4223
  columnName: a?.seriesName
4211
4224
  } : t === e?.xAxis || s === A.gauge && t === e?.gaugeSettings?.dimensions?.join(", ") ? a?.name : a?.seriesName === t || s === A.gauge && t === e?.gaugeSettings?.metric || [A.funnel].includes(s) ? a?.value : null;
4212
- }, ha = (e, t, n) => !e || t === n, ga = ({ chart: e, chartWithMetric: t, chartWithDashboard: n, isDrillEnabled: r, drilledLevel: i, dimensionCount: a, isLastConfiguredDrillLevel: o, isTableRedirectAllowed: s = !0 }) => {
4213
- let c = ha(r, i, a), l = c || !!o, u = !!e?.isEnable && l && s, d = e?.routeType === "user";
4225
+ }, ga = (e, t, n) => !e || t === n, _a = ({ chart: e, chartWithMetric: t, chartWithDashboard: n, isDrillEnabled: r, drilledLevel: i, dimensionCount: a, isLastConfiguredDrillLevel: o, isTableRedirectAllowed: s = !0 }) => {
4226
+ let c = ga(r, i, a), l = c || !!o, u = !!e?.isEnable && l && s, d = e?.routeType === "user";
4214
4227
  return {
4215
4228
  navigate: u && !d,
4216
4229
  host: u && d,
4217
4230
  openNestedMetric: !!t?.isEnable && c,
4218
4231
  openDashboard: !!n?.isEnable && l
4219
4232
  };
4220
- }, _a = ut.createContext({
4233
+ }, va = dt.createContext({
4221
4234
  navigate: null,
4222
4235
  carryFilters: []
4223
- }), va = [], ya = ({ children: e, isEnabled: t = !1, onNavigate: n, carryFilters: r }) => {
4224
- let i = r?.length ? r : va, a = ut.useMemo(() => ({
4236
+ }), ya = [], ba = ({ children: e, isEnabled: t = !1, onNavigate: n, carryFilters: r }) => {
4237
+ let i = r?.length ? r : ya, a = dt.useMemo(() => ({
4225
4238
  navigate: t && n ? n : null,
4226
4239
  carryFilters: i
4227
4240
  }), [
@@ -4229,25 +4242,25 @@ var Zi = (e, t) => {
4229
4242
  n,
4230
4243
  i
4231
4244
  ]);
4232
- return /* @__PURE__ */ (0, sa.jsx)(_a.Provider, {
4245
+ return /* @__PURE__ */ (0, ca.jsx)(va.Provider, {
4233
4246
  value: a,
4234
4247
  children: e
4235
4248
  });
4236
- }, ba = () => {
4237
- let { navigate: e, carryFilters: t } = ut.useContext(_a), n = ut.useCallback((n, r) => {
4249
+ }, xa = () => {
4250
+ let { navigate: e, carryFilters: t } = dt.useContext(va), n = dt.useCallback((n, r) => {
4238
4251
  if (!e) return !1;
4239
4252
  let i = n?.clickActions?.chartWithDashboard;
4240
4253
  if (!i?.isEnable) return !1;
4241
- let a = ta({
4254
+ let a = na({
4242
4255
  config: i,
4243
- value: na(i, r),
4256
+ value: ra(i, r),
4244
4257
  carryFilters: t
4245
4258
  });
4246
4259
  return a.ok ? (e(a.intent), !0) : (typeof a.reason == "object" && a.reason.code === "unsafe_target" && console.warn(`[chartNavigation] dashboard navigation rejected: ${a.reason.navigation}`), !1);
4247
4260
  }, [e, t]);
4248
4261
  return e ? n : null;
4249
- }, xa = (e) => {
4262
+ }, Sa = (e) => {
4250
4263
  if (typeof e == "function") return (t) => e(t);
4251
4264
  };
4252
4265
  //#endregion
4253
- export { mt as $, Tr as A, Qn as B, Br as C, jr as D, Nr as E, Q as F, G, Gn as H, cr as I, K as J, On as K, ar as L, Cr as M, nr as N, Lr as O, or as P, Cn as Q, $n as R, Gr as S, Mr as T, Un as U, X as V, q as W, Tn as X, En as Y, Dn as Z, li as _, ma as a, Qr as b, ia as c, ta as d, ht as et, Qi as f, si as g, ui as h, ga as i, Sr as j, wr as k, aa as l, Ai as m, xa as n, pa as o, Yi as p, J as q, ba as r, ca as s, ya as t, ra as u, Rr as v, Dr as w, ni as x, Zr as y, er as z };
4266
+ export { ht as $, Tr as A, Qn as B, Br as C, jr as D, Nr as E, Q as F, G, Gn as H, cr as I, K as J, On as K, ar as L, Cr as M, nr as N, Lr as O, or as P, Cn as Q, $n as R, Gr as S, Mr as T, Un as U, X as V, q as W, Tn as X, En as Y, Dn as Z, ui as _, ha as a, Qr as b, aa as c, na as d, gt as et, $i as f, ci as g, di as h, _a as i, Sr as j, wr as k, oa as l, ji as m, Sa as n, ma as o, Xi as p, J as q, xa as r, la as s, ba as t, ia as u, Rr as v, Dr as w, ri as x, Zr as y, er as z };