@sisense/sdk-ui 2.25.0 → 2.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/dist/ai.cjs +33 -33
  2. package/dist/ai.js +626 -639
  3. package/dist/analytics-composer/node.cjs +1 -1
  4. package/dist/analytics-composer/node.js +1010 -865
  5. package/dist/analytics-composer.cjs +1 -1
  6. package/dist/analytics-composer.js +6 -6
  7. package/dist/{apply-styled-options-to-query-BsBTwL6W.js → apply-styled-options-to-query-Bzt2GrgO.js} +1459 -1426
  8. package/dist/apply-styled-options-to-query-COD9fRYD.cjs +1 -0
  9. package/dist/dimensions-Ce2zWFrs.js +204 -0
  10. package/dist/dimensions-u3w5qNF0.cjs +1 -0
  11. package/dist/index.cjs +380 -380
  12. package/dist/index.js +17024 -16696
  13. package/dist/index.umd.js +649 -660
  14. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/translate-dashboard-utils.d.ts +2 -0
  15. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/types.d.ts +11 -0
  16. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/types.d.ts +12 -0
  17. package/dist/packages/sdk-ui/src/domains/dashboarding/dashboard-model/use-dashboard-model/dashboard-model-reducer/utils.d.ts +5 -2
  18. package/dist/packages/sdk-ui/src/domains/dashboarding/hooks/use-widget-scroll-persistence.d.ts +16 -0
  19. package/dist/packages/sdk-ui/src/domains/dashboarding/use-composed-dashboard.d.ts +2 -3
  20. package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-dimensions.d.ts +10 -0
  21. package/dist/packages/sdk-ui/src/domains/data-browser/data-source-dimensional-model/hooks/use-get-data-source-fields.d.ts +2 -0
  22. package/dist/packages/sdk-ui/src/domains/drilldown/components/drilldown-widget/drilldown-widget.d.ts +2 -2
  23. package/dist/packages/sdk-ui/src/domains/narrative/core/widget-narrative-options.d.ts +2 -1
  24. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-get-widget-narrative.d.ts +2 -2
  25. package/dist/packages/sdk-ui/src/domains/narrative/hooks/use-widget-narrative-state.d.ts +1 -1
  26. package/dist/packages/sdk-ui/src/domains/query-execution/core/date-formats/simple-date-format-replacers.d.ts +13 -0
  27. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-pivot-query/use-execute-pivot-query.d.ts +2 -2
  28. package/dist/packages/sdk-ui/src/domains/query-execution/hooks/use-execute-query/use-execute-query.d.ts +2 -2
  29. package/dist/packages/sdk-ui/src/domains/visualizations/components/area-chart.d.ts +2 -2
  30. package/dist/packages/sdk-ui/src/domains/visualizations/components/areamap-chart.d.ts +2 -2
  31. package/dist/packages/sdk-ui/src/domains/visualizations/components/bar-chart.d.ts +2 -2
  32. package/dist/packages/sdk-ui/src/domains/visualizations/components/boxplot-chart/boxplot-chart.d.ts +2 -2
  33. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/chart.d.ts +2 -2
  34. package/dist/packages/sdk-ui/src/domains/visualizations/components/chart/restructured-charts/highchart-based-charts/cartesians/helpers/highchart-options/axis.d.ts +1 -1
  35. package/dist/packages/sdk-ui/src/domains/visualizations/components/column-chart.d.ts +2 -2
  36. package/dist/packages/sdk-ui/src/domains/visualizations/components/funnel-chart.d.ts +2 -2
  37. package/dist/packages/sdk-ui/src/domains/visualizations/components/line-chart.d.ts +2 -2
  38. package/dist/packages/sdk-ui/src/domains/visualizations/components/pie-chart/pie-chart.d.ts +2 -2
  39. package/dist/packages/sdk-ui/src/domains/visualizations/components/polar-chart.d.ts +2 -2
  40. package/dist/packages/sdk-ui/src/domains/visualizations/components/scatter-chart.d.ts +2 -2
  41. package/dist/packages/sdk-ui/src/domains/visualizations/components/scattermap-chart.d.ts +2 -2
  42. package/dist/packages/sdk-ui/src/domains/visualizations/components/sunburst-chart/sunburst-chart.d.ts +2 -2
  43. package/dist/packages/sdk-ui/src/domains/visualizations/components/table/table.d.ts +2 -2
  44. package/dist/packages/sdk-ui/src/domains/visualizations/components/treemap-chart/treemap-chart.d.ts +2 -2
  45. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-data-options/types.d.ts +6 -6
  46. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/cartesian/utils/axis/axis-builders.d.ts +6 -1
  47. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/plot-bands.d.ts +2 -1
  48. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/axis-section.d.ts +29 -1
  49. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/design-options.d.ts +1 -0
  50. package/dist/packages/sdk-ui/src/domains/visualizations/core/chart-options-processor/translations/tooltip-utils.d.ts +1 -1
  51. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/compose-code-to-readable.d.ts +24 -4
  52. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/index.d.ts +3 -0
  53. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-params-to-view-model.d.ts +6 -2
  54. package/dist/packages/sdk-ui/src/domains/visualizations/core/query-definition/query-pill.d.ts +6 -1
  55. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/translate-widget-style-options/to-widget-dto-style.d.ts +118 -2
  56. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/types.d.ts +18 -0
  57. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/use-scroller-location-save.d.ts +8 -0
  58. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/utils.d.ts +9 -0
  59. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/widget-by-id.d.ts +2 -2
  60. package/dist/packages/sdk-ui/src/domains/widgets/components/widget-by-id/with-navigator-scroll-save.d.ts +10 -0
  61. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/use-get-widget-model.d.ts +2 -2
  62. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/to-widget-dto-panels.d.ts +170 -0
  63. package/dist/packages/sdk-ui/src/domains/widgets/widget-model/widget-model-translator/widget-model-translator.d.ts +8 -14
  64. package/dist/packages/sdk-ui/src/infra/api/narrative/narrative-endpoints.d.ts +3 -3
  65. package/dist/packages/sdk-ui/src/infra/api/rest-api.d.ts +12 -1
  66. package/dist/packages/sdk-ui/src/infra/app/settings/settings.d.ts +10 -2
  67. package/dist/packages/sdk-ui/src/infra/contexts/custom-widgets-provider/use-custom-widgets.d.ts +10 -3
  68. package/dist/packages/sdk-ui/src/infra/plugins/plugin-context.d.ts +2 -2
  69. package/dist/packages/sdk-ui/src/infra/plugins/types.d.ts +2 -2
  70. package/dist/packages/sdk-ui/src/infra/plugins/widget-plugins/types.d.ts +9 -0
  71. package/dist/packages/sdk-ui/src/modules/ai/api/chat-rest-api.d.ts +3 -4
  72. package/dist/packages/sdk-ui/src/modules/ai/index.d.ts +1 -0
  73. package/dist/packages/sdk-ui/src/public-api/internal.d.ts +1 -1
  74. package/dist/packages/sdk-ui/src/public-api/sisense-internal.d.ts +1 -1
  75. package/dist/packages/sdk-ui/src/shared/utils/filter-relations.d.ts +2 -0
  76. package/dist/packages/sdk-ui/src/types.d.ts +7 -7
  77. package/dist/{types-GFLaiax5.cjs → types-COBvZZm_.cjs} +1 -1
  78. package/dist/{types-BBp2sp_s.js → types-D6jCGncV.js} +1 -1
  79. package/dist/{use-hover-mptQLQ4S.js → use-hover-B1HPf4hF.js} +6190 -6093
  80. package/dist/{use-hover-DsnmY-p_.cjs → use-hover-CaQrW_gv.cjs} +112 -112
  81. package/dist/{utils-DTUC-wtI.js → utils-BQtueE3Z.js} +9591 -9422
  82. package/dist/utils-CAubp1g1.cjs +179 -0
  83. package/dist/{widget-composer-D0BZrLna.js → widget-composer-BAJFWk3t.js} +3 -3
  84. package/dist/{widget-composer-CDb2iOoS.cjs → widget-composer-C75b-E6W.cjs} +1 -1
  85. package/package.json +8 -8
  86. package/dist/apply-styled-options-to-query-mFJvsssw.cjs +0 -1
  87. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/index.d.ts +0 -2
  88. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/table-widget.d.ts +0 -22
  89. package/dist/packages/sdk-ui/src/domains/widgets/components/table-widget/types.d.ts +0 -61
  90. package/dist/parse-compose-code-DfZskSng.js +0 -352
  91. package/dist/parse-compose-code-v4J9BrUg.cjs +0 -1
  92. package/dist/utils-BlNqPAG8.cjs +0 -190
package/dist/ai.js CHANGED
@@ -9,18 +9,18 @@ var We = (e, t, n) => t in e ? Mn(e, t, { enumerable: !0, configurable: !0, writ
9
9
  for (var n of Ie(t))
10
10
  yt.call(t, n) && We(e, n, t[n]);
11
11
  return e;
12
- }, L = (e, t) => Tn(e, Rn(t));
12
+ }, E = (e, t) => Tn(e, Rn(t));
13
13
  var Ze = (e, t) => {
14
14
  var n = {};
15
- for (var r in e)
16
- bt.call(e, r) && t.indexOf(r) < 0 && (n[r] = e[r]);
15
+ for (var o in e)
16
+ bt.call(e, o) && t.indexOf(o) < 0 && (n[o] = e[o]);
17
17
  if (e != null && Ie)
18
- for (var r of Ie(e))
19
- t.indexOf(r) < 0 && yt.call(e, r) && (n[r] = e[r]);
18
+ for (var o of Ie(e))
19
+ t.indexOf(o) < 0 && yt.call(e, o) && (n[o] = e[o]);
20
20
  return n;
21
21
  };
22
- var A = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
23
- var X = (e, t, n) => new Promise((r, s) => {
22
+ var W = (e, t, n) => We(e, typeof t != "symbol" ? t + "" : t, n);
23
+ var X = (e, t, n) => new Promise((o, s) => {
24
24
  var c = (d) => {
25
25
  try {
26
26
  h(n.next(d));
@@ -33,16 +33,16 @@ var X = (e, t, n) => new Promise((r, s) => {
33
33
  } catch (g) {
34
34
  s(g);
35
35
  }
36
- }, h = (d) => d.done ? r(d.value) : Promise.resolve(d.value).then(c, l);
36
+ }, h = (d) => d.done ? o(d.value) : Promise.resolve(d.value).then(c, l);
37
37
  h((n = n.apply(e, t)).next());
38
38
  });
39
- import { S as Ln, s as En, n as Pt, g as In, u as we, a as Nn, b as Pn, p as Hn, c as tt, Q as Ht, d as Bt, e as Ft, f as At, h as ge, w as nt, i as w, j as z, k as R, P as Ot, T as Bn, E as Fn, l as An, m as On, o as Dn, q as Ae, B as qn, M as zn, r as he, t as Dt, v as Wn, x as Zn, y as jn, z as Un, A as Ce, C as je, F as xt, D as C, G as Gn, I as qt, H as Vn, J as Qn, K as _n, L as xe, N as Kn, O as Xn, R as Yn, U as Jn, V as er, W as tr, X as zt, Y as nr, Z as rr, _ as or, $ as ir } from "./use-hover-mptQLQ4S.js";
40
- import { j as o, u as N, c as S, F as j, e as Wt, i as He, f as sr, h as ar, t as lr, m as cr, a as dr } from "./utils-DTUC-wtI.js";
39
+ import { S as Ln, s as En, n as Pt, g as In, u as we, a as Nn, b as Pn, p as Hn, c as tt, Q as Ht, d as Bt, e as Ft, f as Ot, h as ge, w as nt, i as w, j as q, k as R, P as At, T as Bn, E as Fn, l as On, m as An, o as Dn, q as Oe, B as qn, M as zn, r as he, t as Dt, v as Wn, x as Zn, y as jn, z as Gn, A as Ce, C as je, F as xt, D as C, G as Un, I as qt, H as Vn, J as Qn, K as _n, L as xe, N as Kn, O as Xn, R as Yn, U as Jn, V as er, W as tr, X as zt, Y as nr, Z as rr, _ as or, $ as ir } from "./use-hover-B1HPf4hF.js";
40
+ import { j as r, u as N, c as S, F as j, e as Wt, i as He, f as sr, h as ar, t as lr, m as cr, a as dr } from "./utils-BQtueE3Z.js";
41
41
  import * as Y from "react";
42
- import { createContext as rt, useState as O, useCallback as F, useContext as ot, useMemo as D, useEffect as Se, useRef as ve, useLayoutEffect as Be, forwardRef as ur, memo as Zt } from "react";
43
- import { t as Oe } from "./widget-composer-D0BZrLna.js";
44
- import { w as ls } from "./widget-composer-D0BZrLna.js";
45
- import { T as Ke, x as hr, y as pr } from "./apply-styled-options-to-query-BsBTwL6W.js";
42
+ import { createContext as rt, useState as O, useCallback as F, useContext as ot, useMemo as A, useEffect as Se, useRef as ve, useLayoutEffect as Be, forwardRef as ur, memo as Zt } from "react";
43
+ import { t as Ae } from "./widget-composer-BAJFWk3t.js";
44
+ import { w as ls } from "./widget-composer-BAJFWk3t.js";
45
+ import { T as Ke, x as hr, y as pr } from "./apply-styled-options-to-query-Bzt2GrgO.js";
46
46
  import { jsx as me } from "react/jsx-runtime";
47
47
  class gr extends Ln {
48
48
  constructor(t, n) {
@@ -53,8 +53,8 @@ class gr extends Ln {
53
53
  }
54
54
  setOptions(t) {
55
55
  var n;
56
- const r = this.options;
57
- this.options = this.client.defaultMutationOptions(t), En(r, this.options) || this.client.getMutationCache().notify({
56
+ const o = this.options;
57
+ this.options = this.client.defaultMutationOptions(t), En(o, this.options) || this.client.getMutationCache().notify({
58
58
  type: "observerOptionsUpdated",
59
59
  mutation: this.currentMutation,
60
60
  observer: this
@@ -82,12 +82,12 @@ class gr extends Ln {
82
82
  });
83
83
  }
84
84
  mutate(t, n) {
85
- return this.mutateOptions = n, this.currentMutation && this.currentMutation.removeObserver(this), this.currentMutation = this.client.getMutationCache().build(this.client, L($({}, this.options), {
85
+ return this.mutateOptions = n, this.currentMutation && this.currentMutation.removeObserver(this), this.currentMutation = this.client.getMutationCache().build(this.client, E($({}, this.options), {
86
86
  variables: typeof t != "undefined" ? t : this.options.variables
87
87
  })), this.currentMutation.addObserver(this), this.currentMutation.execute();
88
88
  }
89
89
  updateResult() {
90
- const t = this.currentMutation ? this.currentMutation.state : In(), n = t.status === "loading", r = L($({}, t), {
90
+ const t = this.currentMutation ? this.currentMutation.state : In(), n = t.status === "loading", o = E($({}, t), {
91
91
  isLoading: n,
92
92
  isPending: n,
93
93
  isSuccess: t.status === "success",
@@ -96,48 +96,48 @@ class gr extends Ln {
96
96
  mutate: this.mutate,
97
97
  reset: this.reset
98
98
  });
99
- this.currentResult = r;
99
+ this.currentResult = o;
100
100
  }
101
101
  notify(t) {
102
102
  Pt.batch(() => {
103
103
  if (this.mutateOptions && this.hasListeners()) {
104
104
  if (t.onSuccess) {
105
- var n, r, s, c;
106
- (n = (r = this.mutateOptions).onSuccess) == null || n.call(r, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (s = (c = this.mutateOptions).onSettled) == null || s.call(c, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);
105
+ var n, o, s, c;
106
+ (n = (o = this.mutateOptions).onSuccess) == null || n.call(o, this.currentResult.data, this.currentResult.variables, this.currentResult.context), (s = (c = this.mutateOptions).onSettled) == null || s.call(c, this.currentResult.data, null, this.currentResult.variables, this.currentResult.context);
107
107
  } else if (t.onError) {
108
108
  var l, h, d, g;
109
109
  (l = (h = this.mutateOptions).onError) == null || l.call(h, this.currentResult.error, this.currentResult.variables, this.currentResult.context), (d = (g = this.mutateOptions).onSettled) == null || d.call(g, void 0, this.currentResult.error, this.currentResult.variables, this.currentResult.context);
110
110
  }
111
111
  }
112
112
  t.listeners && this.listeners.forEach(({
113
- listener: m
113
+ listener: b
114
114
  }) => {
115
- m(this.currentResult);
115
+ b(this.currentResult);
116
116
  });
117
117
  });
118
118
  }
119
119
  }
120
120
  function it(e, t, n) {
121
- const r = Hn(e, t), s = we({
122
- context: r.context
123
- }), [c] = Y.useState(() => new gr(s, r));
121
+ const o = Hn(e, t), s = we({
122
+ context: o.context
123
+ }), [c] = Y.useState(() => new gr(s, o));
124
124
  Y.useEffect(() => {
125
- c.setOptions(r);
126
- }, [c, r]);
125
+ c.setOptions(o);
126
+ }, [c, o]);
127
127
  const l = Nn(Y.useCallback((d) => c.subscribe(Pt.batchCalls(d)), [c]), () => c.getCurrentResult(), () => c.getCurrentResult()), h = Y.useCallback((d, g) => {
128
128
  c.mutate(d, g).catch(fr);
129
129
  }, [c]);
130
130
  if (l.error && Pn(c.options.useErrorBoundary, [l.error]))
131
131
  throw l.error;
132
- return L($({}, l), {
132
+ return E($({}, l), {
133
133
  mutate: h,
134
134
  mutateAsync: l.mutate
135
135
  });
136
136
  }
137
137
  function fr() {
138
138
  }
139
- const jt = rt({}), Cr = () => ot(jt), Ut = ({ children: e }) => {
140
- const [t, n] = O({}), r = F(
139
+ const jt = rt({}), Cr = () => ot(jt), Gt = ({ children: e }) => {
140
+ const [t, n] = O({}), o = F(
141
141
  (l, h) => {
142
142
  var d;
143
143
  return `${l}_${(d = h == null ? void 0 : h.dashboardId) != null ? d : ""}`;
@@ -145,51 +145,46 @@ const jt = rt({}), Cr = () => ot(jt), Ut = ({ children: e }) => {
145
145
  []
146
146
  ), s = F(
147
147
  (l, h, d) => {
148
- n((g) => L($({}, g), {
149
- [r(h, d)]: l
148
+ n((g) => E($({}, g), {
149
+ [o(h, d)]: l
150
150
  }));
151
151
  },
152
- [r]
152
+ [o]
153
153
  ), c = F(
154
- (l, h) => t[r(l, h)],
155
- [t, r]
154
+ (l, h) => t[o(l, h)],
155
+ [t, o]
156
156
  );
157
- return /* @__PURE__ */ o(jt.Provider, { value: { saveChatId: s, getChatId: c }, children: e });
157
+ return /* @__PURE__ */ r(jt.Provider, { value: { saveChatId: s, getChatId: c }, children: e });
158
158
  };
159
159
  class mr {
160
- constructor(t, n = !1, r, s) {
161
- A(this, "httpClient");
162
- A(this, "isUnifiedNarrationEnabled");
163
- A(this, "isSisenseAiEnabled");
164
- A(this, "getChatContexts", () => X(this, null, function* () {
160
+ constructor(t, n = !1) {
161
+ W(this, "httpClient");
162
+ W(this, "getChatContexts", () => X(this, null, function* () {
165
163
  return (yield this.httpClient.get("api/datasources//")) || [];
166
164
  }));
167
165
  // ==== /v2/ai endpoints ====
168
- A(this, "getNlgInsights", (t) => tt(this.httpClient, t, {
169
- isUnifiedNarrationEnabled: this.isUnifiedNarrationEnabled,
170
- isSisenseAiEnabled: this.isSisenseAiEnabled
171
- }));
172
- A(this, "getQueryRecommendations", (t, n) => this.httpClient.get(
166
+ W(this, "getNlgInsights", (t, n) => tt(this.httpClient, t, n));
167
+ W(this, "getQueryRecommendations", (t, n) => this.httpClient.get(
173
168
  `api/v2/ai/recommendations/query/${t}/${n.numOfRecommendations}${n.userPrompt ? "?userPrompt=" + encodeURIComponent(n.userPrompt) : ""}`
174
169
  ));
175
- A(this, "getNlqResult", (t, n) => this.httpClient.post(`api/v2/ai/nlq/query/${t}`, n));
176
- A(this, "setLlmConfig", (t) => this.httpClient.post("api/v2/settings/ai/llmProvider", t).catch((n) => {
170
+ W(this, "getNlqResult", (t, n) => this.httpClient.post(`api/v2/ai/nlq/query/${t}`, n));
171
+ W(this, "setLlmConfig", (t) => this.httpClient.post("api/v2/settings/ai/llmProvider", t).catch((n) => {
177
172
  console.error("Unable to set llm config", n);
178
173
  }));
179
174
  // ==== /v2/ai/chats endpoints ====
180
- A(this, "getAllChats", () => X(this, null, function* () {
175
+ W(this, "getAllChats", () => X(this, null, function* () {
181
176
  return this.volatile ? [] : this.httpClient.get("api/v2/ai/chats");
182
177
  }));
183
- A(this, "getChatById", (t) => this.httpClient.get(`api/v2/ai/chats/${t}`));
184
- A(this, "createChat", (t, n) => this.httpClient.post("api/v2/ai/chats", {
178
+ W(this, "getChatById", (t) => this.httpClient.get(`api/v2/ai/chats/${t}`));
179
+ W(this, "createChat", (t, n) => this.httpClient.post("api/v2/ai/chats", {
185
180
  sourceId: t,
186
181
  volatile: this.volatile,
187
182
  contextDetails: n
188
183
  }));
189
- A(this, "postChat", (t, n) => this.httpClient.post(`api/v2/ai/chats/${t}`, n));
190
- A(this, "deleteChatHistory", (t) => this.httpClient.delete(`api/v2/ai/chats/${t}/history`));
191
- A(this, "sendFeedback", (t) => this.httpClient.post("api/v2/ai/feedback", t));
192
- A(this, "ai", {
184
+ W(this, "postChat", (t, n) => this.httpClient.post(`api/v2/ai/chats/${t}`, n));
185
+ W(this, "deleteChatHistory", (t) => this.httpClient.delete(`api/v2/ai/chats/${t}/history`));
186
+ W(this, "sendFeedback", (t) => this.httpClient.post("api/v2/ai/feedback", t));
187
+ W(this, "ai", {
193
188
  getNlgInsights: this.getNlgInsights,
194
189
  getNlqResult: this.getNlqResult,
195
190
  getQueryRecommendations: this.getQueryRecommendations,
@@ -203,7 +198,7 @@ class mr {
203
198
  clearHistory: this.deleteChatHistory
204
199
  }
205
200
  });
206
- this.volatile = n, this.httpClient = t, this.isUnifiedNarrationEnabled = r, this.isSisenseAiEnabled = s;
201
+ this.volatile = n, this.httpClient = t;
207
202
  }
208
203
  }
209
204
  const br = new Ht({
@@ -217,55 +212,47 @@ const br = new Ht({
217
212
  children: e,
218
213
  volatile: t
219
214
  }) => {
220
- const { app: n } = Bt(), r = D(
221
- () => {
222
- var s, c;
223
- return n ? new mr(
224
- n.httpClient,
225
- t,
226
- (s = n.settings) == null ? void 0 : s.isUnifiedNarrationEnabled,
227
- (c = n.settings) == null ? void 0 : c.isSisenseAiEnabled
228
- ) : void 0;
229
- },
215
+ const { app: n } = Bt(), o = A(
216
+ () => n ? new mr(n.httpClient, t) : void 0,
230
217
  [n, t]
231
218
  );
232
- return /* @__PURE__ */ o(st.Provider, { value: r, children: /* @__PURE__ */ o(Ft, { client: br, children: e }) });
219
+ return /* @__PURE__ */ r(st.Provider, { value: o, children: /* @__PURE__ */ r(Ft, { client: br, children: e }) });
233
220
  };
234
221
  function _1({ children: e, volatile: t }) {
235
- return /* @__PURE__ */ o(Ut, { children: /* @__PURE__ */ o(yr, { volatile: t, children: e }) });
222
+ return /* @__PURE__ */ r(Gt, { children: /* @__PURE__ */ r(yr, { volatile: t, children: e }) });
236
223
  }
237
224
  const De = (e, t = !0) => {
238
- var i, u;
239
- const { app: n } = Bt(), r = n == null ? void 0 : n.httpClient, s = D(
225
+ var i, u, a, f;
226
+ const { app: n } = Bt(), o = n == null ? void 0 : n.httpClient, s = A(
240
227
  () => {
241
- var a, f, p, b;
228
+ var p, m, y, x, L, M;
242
229
  return {
243
- isUnifiedNarrationEnabled: (f = (a = n == null ? void 0 : n.settings) == null ? void 0 : a.isUnifiedNarrationEnabled) != null ? f : !1,
244
- isSisenseAiEnabled: (b = (p = n == null ? void 0 : n.settings) == null ? void 0 : p.isSisenseAiEnabled) != null ? b : !1
230
+ isUnified: (y = (m = (p = n == null ? void 0 : n.settings) == null ? void 0 : p.narrative) == null ? void 0 : m.isUnified) != null ? y : !1,
231
+ isSisenseAiEnabled: (M = (L = (x = n == null ? void 0 : n.settings) == null ? void 0 : x.narrative) == null ? void 0 : L.isSisenseAiEnabled) != null ? M : !1
245
232
  };
246
233
  },
247
- [(i = n == null ? void 0 : n.settings) == null ? void 0 : i.isUnifiedNarrationEnabled, (u = n == null ? void 0 : n.settings) == null ? void 0 : u.isSisenseAiEnabled]
248
- ), c = D(() => At(e), [e]), { data: l, error: h, isError: d, isLoading: g, isSuccess: m, refetch: x } = ge({
234
+ [(u = (i = n == null ? void 0 : n.settings) == null ? void 0 : i.narrative) == null ? void 0 : u.isUnified, (f = (a = n == null ? void 0 : n.settings) == null ? void 0 : a.narrative) == null ? void 0 : f.isSisenseAiEnabled]
235
+ ), c = A(() => Ot(e), [e]), { data: l, error: h, isError: d, isLoading: g, isSuccess: b, refetch: k } = ge({
249
236
  queryKey: ["narrative", c, s],
250
- queryFn: () => r ? tt(r, c, s) : Promise.reject(new Error("HttpClient is required for narrative requests")),
251
- select: (a) => {
252
- var f;
253
- return (f = a == null ? void 0 : a.data) == null ? void 0 : f.answer;
237
+ queryFn: () => o ? tt(o, c, s) : Promise.reject(new Error("HttpClient is required for narrative requests")),
238
+ select: (p) => {
239
+ var m;
240
+ return (m = p == null ? void 0 : p.data) == null ? void 0 : m.answer;
254
241
  },
255
242
  enabled: t
256
243
  });
257
244
  return {
258
245
  isLoading: g,
259
246
  isError: d,
260
- isSuccess: m,
247
+ isSuccess: b,
261
248
  data: l,
262
249
  error: h,
263
250
  refetch: F(() => {
264
- x();
265
- }, [x])
251
+ k();
252
+ }, [k])
266
253
  };
267
254
  }, xr = (e) => {
268
- const r = e, { enabled: t } = r, n = Ze(r, ["enabled"]);
255
+ const o = e, { enabled: t } = o, n = Ze(o, ["enabled"]);
269
256
  return De(n, t);
270
257
  }, K1 = nt("useGetNlgInsights")(
271
258
  xr
@@ -277,23 +264,23 @@ const De = (e, t = !0) => {
277
264
  "pie",
278
265
  "bar"
279
266
  ];
280
- function Gt(e) {
281
- const { dataSource: t, query: n, chartTypes: r } = e;
267
+ function Ut(e) {
268
+ const { dataSource: t, query: n, chartTypes: o } = e;
282
269
  return {
283
270
  contextTitle: typeof t == "string" ? t : t.title,
284
271
  request: {
285
272
  text: n,
286
273
  // Timezone is not used by AI API, but it is currently required by the endpoint
287
274
  timezone: "UTC",
288
- chartTypes: r != null ? r : [...vr]
275
+ chartTypes: o != null ? o : [...vr]
289
276
  }
290
277
  };
291
278
  }
292
279
  function kr(e, t) {
293
280
  return X(this, null, function* () {
294
- const { contextTitle: n, request: r } = Gt(e), s = yield t.ai.getNlqResult(n, r);
281
+ const { contextTitle: n, request: o } = Ut(e), s = yield t.ai.getNlqResult(n, o);
295
282
  return {
296
- widgetProps: s ? Oe(s, {
283
+ widgetProps: s ? Ae(s, {
297
284
  useCustomizedStyleOptions: e.enableAxisTitlesInWidgetProps || !1
298
285
  }) : void 0,
299
286
  nlqResult: s
@@ -301,10 +288,10 @@ function kr(e, t) {
301
288
  });
302
289
  }
303
290
  const wr = (e) => {
304
- const { contextTitle: t, request: n } = Gt(e), r = te(), s = ["getNlqResult", t, n, r], { isLoading: c, isError: l, isSuccess: h, data: d, error: g, refetch: m } = ge({
291
+ const { contextTitle: t, request: n } = Ut(e), o = te(), s = ["getNlqResult", t, n, o], { isLoading: c, isError: l, isSuccess: h, data: d, error: g, refetch: b } = ge({
305
292
  queryKey: s,
306
- queryFn: () => r ? kr(e, r).then((x) => x.widgetProps) : Promise.reject("No API available"),
307
- enabled: !!r && e.enabled
293
+ queryFn: () => o ? kr(e, o).then((k) => k.widgetProps) : Promise.reject("No API available"),
294
+ enabled: !!o && e.enabled
308
295
  });
309
296
  return {
310
297
  isLoading: c,
@@ -313,14 +300,14 @@ const wr = (e) => {
313
300
  data: d,
314
301
  error: g,
315
302
  refetch: F(() => {
316
- m();
317
- }, [m])
303
+ b();
304
+ }, [b])
318
305
  };
319
306
  }, X1 = nt("useGetNlqResult")(wr), Sr = 4, Vt = (e) => {
320
- const { contextTitle: t, count: n, enableAxisTitlesInWidgetProps: r, enabled: s, customPrompt: c } = e, l = te(), h = n != null ? n : Sr, d = (s === void 0 || s === !0) && h > 0, {
307
+ const { contextTitle: t, count: n, enableAxisTitlesInWidgetProps: o, enabled: s, customPrompt: c } = e, l = te(), h = n != null ? n : Sr, d = (s === void 0 || s === !0) && h > 0, {
321
308
  isLoading: g,
322
- isError: m,
323
- isSuccess: x,
309
+ isError: b,
310
+ isSuccess: k,
324
311
  data: i,
325
312
  error: u,
326
313
  refetch: a
@@ -330,15 +317,15 @@ const wr = (e) => {
330
317
  numOfRecommendations: h
331
318
  }, c ? { userPrompt: c } : null)),
332
319
  enabled: !!l && d
333
- }), f = D(() => i == null ? void 0 : i.map((p) => L($({}, p), {
334
- widgetProps: p.jaql ? Oe(p, {
335
- useCustomizedStyleOptions: r
320
+ }), f = A(() => i == null ? void 0 : i.map((p) => E($({}, p), {
321
+ widgetProps: p.jaql ? Ae(p, {
322
+ useCustomizedStyleOptions: o
336
323
  }) : void 0
337
- })), [i, r]);
324
+ })), [i, o]);
338
325
  return {
339
326
  isLoading: d ? g : !1,
340
- isError: m,
341
- isSuccess: x,
327
+ isError: b,
328
+ isSuccess: k,
342
329
  data: f != null ? f : void 0,
343
330
  error: u,
344
331
  refetch: F(() => {
@@ -354,15 +341,15 @@ const wr = (e) => {
354
341
  numOfRecommendations: 4,
355
342
  numOfRecentPrompts: 5
356
343
  }), _t = rt($({}, Qt)), ne = () => ot(_t), $r = ({ children: e, value: t }) => {
357
- const { t: n } = N(), r = Object.entries(t).reduce(
344
+ const { t: n } = N(), o = Object.entries(t).reduce(
358
345
  (s, [c, l]) => (l !== void 0 && (s[c] = l), s),
359
- L($({}, Qt), {
346
+ E($({}, Qt), {
360
347
  inputPromptText: n("ai.config.inputPromptText"),
361
348
  welcomeText: n("ai.config.welcomeText"),
362
349
  suggestionsWelcomeText: n("ai.config.suggestionsWelcomeText")
363
350
  })
364
351
  );
365
- return /* @__PURE__ */ o(_t.Provider, { value: r, children: e });
352
+ return /* @__PURE__ */ r(_t.Provider, { value: o, children: e });
366
353
  }, at = "chatHistory", Mr = (e) => {
367
354
  const t = te(), { hideHistory: n } = ne();
368
355
  return ge({
@@ -372,8 +359,8 @@ const wr = (e) => {
372
359
  return;
373
360
  if (n)
374
361
  return [];
375
- const r = yield t.ai.chat.getById(e);
376
- return r == null ? void 0 : r.chatHistory;
362
+ const o = yield t.ai.chat.getById(e);
363
+ return o == null ? void 0 : o.chatHistory;
377
364
  }),
378
365
  enabled: !!t && !!e
379
366
  });
@@ -384,24 +371,24 @@ const wr = (e) => {
384
371
  if (!(!t || !e))
385
372
  return t.ai.chat.clearHistory(e);
386
373
  }),
387
- onError: (r) => {
388
- console.error("Error when clearing history:", r);
374
+ onError: (o) => {
375
+ console.error("Error when clearing history:", o);
389
376
  },
390
377
  onSettled: () => {
391
378
  e && n.setQueriesData([at, e], []);
392
379
  }
393
380
  });
394
381
  }, lt = (e) => {
395
- const { data: t, isLoading: n, isError: r } = Mr(e), { mutate: s } = Kt(e);
382
+ const { data: t, isLoading: n, isError: o } = Mr(e), { mutate: s } = Kt(e);
396
383
  return Se(() => {
397
- r && s();
398
- }, [r, s]), {
384
+ o && s();
385
+ }, [o, s]), {
399
386
  history: t,
400
387
  isLoading: n,
401
- isError: r
388
+ isError: o
402
389
  };
403
390
  }, Tr = () => {
404
- const e = te(), { data: t, isLoading: n, fetchStatus: r } = ge({
391
+ const e = te(), { data: t, isLoading: n, fetchStatus: o } = ge({
405
392
  queryKey: ["getDataTopics", e],
406
393
  queryFn: () => X(void 0, null, function* () {
407
394
  if (e)
@@ -409,7 +396,7 @@ const wr = (e) => {
409
396
  }),
410
397
  enabled: !!e
411
398
  });
412
- return { data: t, isLoading: n, fetchStatus: r };
399
+ return { data: t, isLoading: n, fetchStatus: o };
413
400
  }, Rr = () => {
414
401
  const e = te(), { data: t, isLoading: n } = ge({
415
402
  queryKey: ["getAllChats", e],
@@ -421,12 +408,12 @@ const wr = (e) => {
421
408
  isLoading: n
422
409
  };
423
410
  }, Lr = (e, t, n) => {
424
- const r = we(), s = te(), c = it({
411
+ const o = we(), s = te(), c = it({
425
412
  mutationFn: () => X(void 0, null, function* () {
426
413
  if (!(!s || !e))
427
414
  return s.ai.chat.create(e, n);
428
415
  }),
429
- onSuccess: () => r.invalidateQueries(["getAllChats"])
416
+ onSuccess: () => o.invalidateQueries(["getAllChats"])
430
417
  });
431
418
  return Se(() => {
432
419
  t && c.isIdle && c.mutate();
@@ -449,7 +436,7 @@ const wr = (e) => {
449
436
  throw Error(`${t}${JSON.stringify(e)}`);
450
437
  }
451
438
  }, Ir = (e, t) => {
452
- const n = we(), r = F(
439
+ const n = we(), o = F(
453
440
  (d) => {
454
441
  e && n.setQueriesData([at, e], (g) => g && [...g, d]);
455
442
  },
@@ -463,13 +450,13 @@ const wr = (e) => {
463
450
  });
464
451
  }),
465
452
  onMutate: (d) => {
466
- r({
453
+ o({
467
454
  content: d,
468
455
  role: "user"
469
456
  });
470
457
  },
471
458
  onError: (d) => {
472
- d instanceof Error && (console.error("Error when sending message:", d.message), r({
459
+ d instanceof Error && (console.error("Error when sending message:", d.message), o({
473
460
  content: s(`ai.errors.${d.interpolationOptions.errorCode}`, {
474
461
  defaultValue: s("ai.errors.unexpectedChatResponse")
475
462
  }),
@@ -480,18 +467,18 @@ const wr = (e) => {
480
467
  if (!d)
481
468
  return;
482
469
  const g = s("ai.errors.unknownResponse");
483
- r(Er(d, g));
470
+ o(Er(d, g));
484
471
  }
485
472
  });
486
473
  return { mutate: l, isLoading: h };
487
474
  }, ct = (e, t, n = !1) => {
488
- var m;
489
- const { data: r, isLoading: s } = Rr(), c = Cr(), l = c.getChatId(e, t) || ((m = r.find(
490
- (x) => {
475
+ var b;
476
+ const { data: o, isLoading: s } = Rr(), c = Cr(), l = c.getChatId(e, t) || ((b = o.find(
477
+ (k) => {
491
478
  var i;
492
- return x.contextTitle === e && ((i = x.contextDetails) == null ? void 0 : i.dashboardId) === (t == null ? void 0 : t.dashboardId);
479
+ return k.contextTitle === e && ((i = k.contextDetails) == null ? void 0 : i.dashboardId) === (t == null ? void 0 : t.dashboardId);
493
480
  }
494
- )) == null ? void 0 : m.chatId), { isError: h, data: d, isSuccess: g } = Lr(
481
+ )) == null ? void 0 : b.chatId), { isError: h, data: d, isSuccess: g } = Lr(
495
482
  e,
496
483
  n && !s && !l,
497
484
  t
@@ -499,7 +486,7 @@ const wr = (e) => {
499
486
  return Se(() => {
500
487
  g && d && !l && c.saveChatId(d.chatId, e, t);
501
488
  }, [d, g, e, t, l, c]), { chatId: l, isLoading: s, isError: h };
502
- }, Xt = (e) => D(() => {
489
+ }, Xt = (e) => A(() => {
503
490
  if (e != null && e.length) {
504
491
  const t = e[e.length - 1];
505
492
  if (dt(t))
@@ -507,19 +494,19 @@ const wr = (e) => {
507
494
  }
508
495
  return null;
509
496
  }, [e]), dt = (e) => !!e && "type" in e && e.type === "nlq", Nr = (e) => !!e && "type" in e && e.type === "text", Pr = (e, t) => {
510
- const { t: n } = N(), { enableFollowupQuestions: r } = ne(), { chatId: s, isError: c } = ct(e, t, !0), [l, h] = O(null), { history: d, isLoading: g, isError: m } = lt(s);
497
+ const { t: n } = N(), { enableFollowupQuestions: o } = ne(), { chatId: s, isError: c } = ct(e, t, !0), [l, h] = O(null), { history: d, isLoading: g, isError: b } = lt(s);
511
498
  Se(() => {
512
- c ? h(new Ke("ai.errors.chatUnavailable")) : m && h(new Ke("ai.errors.fetchHistory"));
513
- }, [c, m, n]);
514
- const { mutate: x, isLoading: i } = Ir(
499
+ c ? h(new Ke("ai.errors.chatUnavailable")) : b && h(new Ke("ai.errors.fetchHistory"));
500
+ }, [c, b, n]);
501
+ const { mutate: k, isLoading: i } = Ir(
515
502
  s,
516
- r
503
+ o
517
504
  ), u = Xt(d);
518
505
  return {
519
506
  chatId: s,
520
507
  history: d != null ? d : [],
521
508
  lastNlqResponse: u,
522
- sendMessage: x,
509
+ sendMessage: k,
523
510
  isAwaitingResponse: i,
524
511
  isLoading: g,
525
512
  lastError: l
@@ -528,22 +515,22 @@ const wr = (e) => {
528
515
  contextTitle: e,
529
516
  contextDetails: t
530
517
  }) => {
531
- const { chatId: n } = ct(e, t), { history: r } = lt(n);
532
- return Xt(r);
518
+ const { chatId: n } = ct(e, t), { history: o } = lt(n);
519
+ return Xt(o);
533
520
  }, es = ({
534
521
  contextTitle: e,
535
522
  contextDetails: t
536
523
  }) => {
537
- const { chatId: n } = ct(e, t), { history: r } = lt(n);
538
- return D(() => {
539
- if (r != null && r.length) {
540
- const s = r.slice().reverse().find(dt);
524
+ const { chatId: n } = ct(e, t), { history: o } = lt(n);
525
+ return A(() => {
526
+ if (o != null && o.length) {
527
+ const s = o.slice().reverse().find(dt);
541
528
  if (s)
542
529
  return JSON.parse(s.content);
543
530
  }
544
531
  return null;
545
- }, [r]);
546
- }, Hr = 500, Br = 500, Fr = 500, Ar = 900, Or = w.div`
532
+ }, [o]);
533
+ }, Hr = 500, Br = 500, Fr = 500, Or = 900, Ar = w.div`
547
534
  box-sizing: border-box;
548
535
  position: relative;
549
536
  display: flex;
@@ -556,9 +543,9 @@ const wr = (e) => {
556
543
  min-width: ${Hr}px;
557
544
  min-height: ${Br}px;
558
545
  width: ${({ width: e }) => e ? vt(e) : `${Fr}px`};
559
- height: ${({ height: e }) => e ? vt(e) : `${Ar}px`};
546
+ height: ${({ height: e }) => e ? vt(e) : `${Or}px`};
560
547
 
561
- ${({ theme: e }) => z`
548
+ ${({ theme: e }) => q`
562
549
  font-size: ${e.aiChat.primaryFontSize[0]};
563
550
  line-height: ${e.aiChat.primaryFontSize[1]};
564
551
  `}
@@ -578,7 +565,7 @@ function Dr({ spin: e }) {
578
565
  fill: "none",
579
566
  className: `${e ? "csdk-animate-spin" : ""}`,
580
567
  children: [
581
- /* @__PURE__ */ o(
568
+ /* @__PURE__ */ r(
582
569
  "path",
583
570
  {
584
571
  fillRule: "evenodd",
@@ -588,7 +575,7 @@ function Dr({ spin: e }) {
588
575
  fillOpacity: "0.3"
589
576
  }
590
577
  ),
591
- /* @__PURE__ */ o(
578
+ /* @__PURE__ */ r(
592
579
  "path",
593
580
  {
594
581
  fillRule: "evenodd",
@@ -602,7 +589,7 @@ function Dr({ spin: e }) {
602
589
  );
603
590
  }
604
591
  function qe() {
605
- return /* @__PURE__ */ o("div", { className: "csdk-m-auto", role: "status", "aria-label": "loading spinner", children: /* @__PURE__ */ o(Dr, { spin: !0 }) });
592
+ return /* @__PURE__ */ r("div", { className: "csdk-m-auto", role: "status", "aria-label": "loading spinner", children: /* @__PURE__ */ r(Dr, { spin: !0 }) });
606
593
  }
607
594
  const qr = w.div`
608
595
  text-align: center;
@@ -621,7 +608,7 @@ const qr = w.div`
621
608
  function zr({ theme: e }) {
622
609
  const { t } = N();
623
610
  return /* @__PURE__ */ S(qr, { theme: e, children: [
624
- /* @__PURE__ */ o("div", { children: t("ai.disclaimer.poweredByAi") }),
611
+ /* @__PURE__ */ r("div", { children: t("ai.disclaimer.poweredByAi") }),
625
612
  /* @__PURE__ */ S("div", { children: [
626
613
  " ",
627
614
  t("ai.disclaimer.rateRequest")
@@ -652,19 +639,19 @@ const Wr = w.div`
652
639
  background-color: ${({ theme: e }) => e.aiChat.dropup.items.hover.backgroundColor};
653
640
  }
654
641
  `;
655
- function Ur({
642
+ function Gr({
656
643
  title: e,
657
644
  items: t,
658
645
  onSelect: n,
659
- alwaysExpanded: r = !1
646
+ alwaysExpanded: o = !1
660
647
  }) {
661
648
  const [s, c] = O(!1), { themeSettings: l } = R();
662
649
  return /* @__PURE__ */ S(Wr, { children: [
663
- /* @__PURE__ */ o(Zr, { onClick: () => c((h) => !h), theme: l, children: e.toUpperCase() }),
664
- (s || r) && t.map((h, d) => /* @__PURE__ */ o(jr, { onClick: () => n(h), theme: l, children: h }, d))
650
+ /* @__PURE__ */ r(Zr, { onClick: () => c((h) => !h), theme: l, children: e.toUpperCase() }),
651
+ (s || o) && t.map((h, d) => /* @__PURE__ */ r(jr, { onClick: () => n(h), theme: l, children: h }, d))
665
652
  ] });
666
653
  }
667
- const Gr = w.div`
654
+ const Ur = w.div`
668
655
  font-family: ${({ theme: e }) => e.typography.fontFamily};
669
656
  font-size: ${({ theme: e }) => e.aiChat.primaryFontSize[0]};
670
657
  line-height: ${({ theme: e }) => e.aiChat.primaryFontSize[1]};
@@ -686,7 +673,7 @@ function Qr({
686
673
  recentPrompts: e,
687
674
  suggestions: t,
688
675
  isLoading: n,
689
- onSelection: r,
676
+ onSelection: o,
690
677
  anchorEl: s,
691
678
  text: c,
692
679
  recommendationsError: l
@@ -695,18 +682,18 @@ function Qr({
695
682
  {
696
683
  title: "/recent searches",
697
684
  items: e,
698
- onSelect: r
685
+ onSelect: o
699
686
  },
700
687
  {
701
688
  title: "/ai recommendations",
702
689
  items: t,
703
- onSelect: r
690
+ onSelect: o
704
691
  }
705
692
  ].filter(
706
693
  (i) => i.title.slice(0, c.length) === c
707
- ), { themeSettings: g } = R(), { t: m } = N(), x = d.length === 1;
708
- return /* @__PURE__ */ o(
709
- Ot,
694
+ ), { themeSettings: g } = R(), { t: b } = N(), k = d.length === 1;
695
+ return /* @__PURE__ */ r(
696
+ At,
710
697
  {
711
698
  open: Xe(c) && d.length > 0,
712
699
  anchorEl: s,
@@ -720,18 +707,18 @@ function Qr({
720
707
  }
721
708
  ],
722
709
  sx: { zIndex: 3 },
723
- children: /* @__PURE__ */ S(Gr, { style: { width: s == null ? void 0 : s.offsetWidth }, theme: g, children: [
724
- n && /* @__PURE__ */ o(qe, {}),
725
- !n && !l && d.map((i) => /* @__PURE__ */ o(Ur, L($({}, i), { alwaysExpanded: x }), i.title)),
726
- l && /* @__PURE__ */ o(Vr, { theme: g, children: m("ai.errors.recommendationsNotAvailable") })
710
+ children: /* @__PURE__ */ S(Ur, { style: { width: s == null ? void 0 : s.offsetWidth }, theme: g, children: [
711
+ n && /* @__PURE__ */ r(qe, {}),
712
+ !n && !l && d.map((i) => /* @__PURE__ */ r(Gr, E($({}, i), { alwaysExpanded: k }), i.title)),
713
+ l && /* @__PURE__ */ r(Vr, { theme: g, children: b("ai.errors.recommendationsNotAvailable") })
727
714
  ] })
728
715
  }
729
716
  );
730
717
  }
731
718
  const _r = 500;
732
719
  function $e({ title: e, placement: t = "top", children: n }) {
733
- const { themeSettings: r } = R();
734
- return /* @__PURE__ */ o(
720
+ const { themeSettings: o } = R();
721
+ return /* @__PURE__ */ r(
735
722
  Bn,
736
723
  {
737
724
  title: e,
@@ -740,20 +727,20 @@ function $e({ title: e, placement: t = "top", children: n }) {
740
727
  componentsProps: {
741
728
  tooltip: {
742
729
  sx: {
743
- bgcolor: r.aiChat.tooltips.backgroundColor,
744
- color: r.aiChat.tooltips.textColor,
730
+ bgcolor: o.aiChat.tooltips.backgroundColor,
731
+ color: o.aiChat.tooltips.textColor,
745
732
  paddingX: "16px",
746
733
  paddingY: "12px",
747
734
  fontSize: "13px",
748
- fontFamily: r.typography.fontFamily,
735
+ fontFamily: o.typography.fontFamily,
749
736
  fontWeight: 400,
750
737
  borderRadius: "4px",
751
- boxShadow: r.aiChat.tooltips.boxShadow
738
+ boxShadow: o.aiChat.tooltips.boxShadow
752
739
  }
753
740
  },
754
741
  arrow: {
755
742
  sx: {
756
- color: r.aiChat.tooltips.backgroundColor
743
+ color: o.aiChat.tooltips.backgroundColor
757
744
  }
758
745
  }
759
746
  },
@@ -765,21 +752,21 @@ function $e({ title: e, placement: t = "top", children: n }) {
765
752
  function Kr({ theme: e }) {
766
753
  const t = e.aiChat.icons.color;
767
754
  return /* @__PURE__ */ S("svg", { xmlns: "http://www.w3.org/2000/svg", width: "25", height: "25", viewBox: "0 0 25 25", fill: "none", children: [
768
- /* @__PURE__ */ o(
755
+ /* @__PURE__ */ r(
769
756
  "path",
770
757
  {
771
758
  d: "M21.4095 11.1195L12.5644 6.0459C12.3247 5.90841 12.0189 5.99143 11.8816 6.23128L10.764 8.18434C10.6275 8.42284 10.709 8.72678 10.9466 8.86491L19.7108 13.9614C19.9464 14.0984 20.2483 14.0215 20.3897 13.7884L21.5883 11.8125C21.734 11.5723 21.6532 11.2592 21.4095 11.1195Z",
772
759
  fill: t
773
760
  }
774
761
  ),
775
- /* @__PURE__ */ o(
762
+ /* @__PURE__ */ r(
776
763
  "path",
777
764
  {
778
765
  d: "M18.7329 8.60735L16.1048 7.07819L19.6668 0.928042C19.8041 0.6909 20.1068 0.608502 20.3454 0.743288L22.156 1.7661C22.3992 1.90347 22.4827 2.21344 22.3414 2.45438L18.7329 8.60735Z",
779
766
  fill: t
780
767
  }
781
768
  ),
782
- /* @__PURE__ */ o(
769
+ /* @__PURE__ */ r(
783
770
  "path",
784
771
  {
785
772
  d: "M19.8544 14.9048L10.3563 9.43067C10.2184 9.35116 10.0413 9.39515 9.95275 9.52746C7.03423 13.8862 4.07448 15.2337 3.18167 16.0938C3.09276 16.1794 3.08414 16.3141 3.1538 16.416C3.74961 17.2879 5.10497 18.4425 6.05628 19.2048C6.17328 19.2985 6.34145 19.2903 6.44961 19.1865L9.97994 15.7973L7.69329 20.1066C7.61954 20.2456 7.66674 20.4186 7.80041 20.5017C11.6152 22.8708 14.2978 24.0437 16.9604 24.4472C17.1542 24.4766 17.3191 24.3106 17.3033 24.1152C17.007 20.469 19.0807 16.6112 19.8544 14.9048Z",
@@ -789,7 +776,7 @@ function Kr({ theme: e }) {
789
776
  ] });
790
777
  }
791
778
  function Xr({ theme: e }) {
792
- return /* @__PURE__ */ o("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o(
779
+ return /* @__PURE__ */ r("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
793
780
  "path",
794
781
  {
795
782
  d: "M4 14L0 10L24 0L14 24L10 20L8.47667 16.9533L19 6.4L20 4.00001L17.6099 5L7.04354 15.5218L4 14Z",
@@ -844,10 +831,10 @@ const Yr = w.div`
844
831
 
845
832
  color: ${({ theme: e }) => e.aiChat.primaryTextColor};
846
833
 
847
- ${({ disabled: e }) => e ? z`
834
+ ${({ disabled: e }) => e ? q`
848
835
  opacity: 0.3;
849
836
  cursor: not-allowed;
850
- ` : z`
837
+ ` : q`
851
838
  opacity: 1;
852
839
  cursor: pointer;
853
840
  `}
@@ -856,33 +843,33 @@ function ro({
856
843
  onSendMessage: e,
857
844
  onClearHistoryClick: t,
858
845
  disabled: n,
859
- recentPrompts: r,
846
+ recentPrompts: o,
860
847
  suggestions: s,
861
848
  isLoading: c,
862
849
  recommendationsError: l,
863
850
  onChange: h
864
851
  }) {
865
- const [d, g] = O(""), { inputPromptText: m } = ne(), x = F(() => {
852
+ const [d, g] = O(""), { inputPromptText: b } = ne(), k = F(() => {
866
853
  if (n) return;
867
854
  if (Xe(d)) {
868
855
  g("");
869
856
  return;
870
857
  }
871
- const k = d.trim();
872
- k.length !== 0 && (e(k), g(""));
858
+ const x = d.trim();
859
+ x.length !== 0 && (e(x), g(""));
873
860
  }, [n, e, d]), i = F(
874
- (k) => {
875
- e(k), g("");
861
+ (x) => {
862
+ e(x), g("");
876
863
  },
877
864
  [e]
878
865
  ), u = F(
879
- (k) => {
880
- k.key === "Enter" ? (k.preventDefault(), x()) : k.key === "Escape" && Xe(d) && g("");
866
+ (x) => {
867
+ x.key === "Enter" ? (x.preventDefault(), k()) : x.key === "Escape" && Xe(d) && g("");
881
868
  },
882
- [x, d]
869
+ [k, d]
883
870
  ), a = F(
884
- (k) => {
885
- h == null || h(k.target.value), g(k.target.value);
871
+ (x) => {
872
+ h == null || h(x.target.value), g(x.target.value);
886
873
  },
887
874
  [h]
888
875
  ), f = ve(null);
@@ -895,21 +882,21 @@ function ro({
895
882
  }, [d]), Be(() => {
896
883
  f.current && f.current.focus({ preventScroll: !0 });
897
884
  }, []);
898
- const { themeSettings: p } = R(), { t: b } = N(), v = F((k) => {
899
- var E;
900
- if ((E = document.getElementById("csdk-chatbot-frame")) != null && E.contains(k.relatedTarget)) {
901
- const T = (M) => {
885
+ const { themeSettings: p } = R(), { t: m } = N(), y = F((x) => {
886
+ var L;
887
+ if ((L = document.getElementById("csdk-chatbot-frame")) != null && L.contains(x.relatedTarget)) {
888
+ const M = (T) => {
902
889
  var I;
903
- document.removeEventListener("mouseup", T), document.removeEventListener("keyup", T), M.type === "mouseup" && ((I = document.getSelection()) == null ? void 0 : I.type) !== "Range" && k.target.focus({ preventScroll: !0 });
890
+ document.removeEventListener("mouseup", M), document.removeEventListener("keyup", M), T.type === "mouseup" && ((I = document.getSelection()) == null ? void 0 : I.type) !== "Range" && x.target.focus({ preventScroll: !0 });
904
891
  };
905
- document.addEventListener("mouseup", T), document.addEventListener("keyup", T);
892
+ document.addEventListener("mouseup", M), document.addEventListener("keyup", M);
906
893
  }
907
894
  }, []);
908
895
  return /* @__PURE__ */ S(Yr, { theme: p, children: [
909
- /* @__PURE__ */ o(
896
+ /* @__PURE__ */ r(
910
897
  Qr,
911
898
  {
912
- recentPrompts: r,
899
+ recentPrompts: o,
913
900
  suggestions: s,
914
901
  isLoading: c,
915
902
  onSelection: i,
@@ -918,32 +905,32 @@ function ro({
918
905
  recommendationsError: l
919
906
  }
920
907
  ),
921
- t && /* @__PURE__ */ o($e, { title: b("ai.buttons.clearChat"), placement: "bottom-start", children: /* @__PURE__ */ o(Jr, { "aria-label": "clear history", onClick: t, children: /* @__PURE__ */ o(Kr, { theme: p }) }) }),
922
- /* @__PURE__ */ o(
908
+ t && /* @__PURE__ */ r($e, { title: m("ai.buttons.clearChat"), placement: "bottom-start", children: /* @__PURE__ */ r(Jr, { "aria-label": "clear history", onClick: t, children: /* @__PURE__ */ r(Kr, { theme: p }) }) }),
909
+ /* @__PURE__ */ r(
923
910
  eo,
924
911
  {
925
912
  "aria-label": "chat input",
926
- onBlur: v,
913
+ onBlur: y,
927
914
  maxLength: _r,
928
915
  ref: f,
929
916
  rows: 1,
930
917
  onChange: a,
931
918
  spellCheck: "true",
932
- placeholder: m,
919
+ placeholder: b,
933
920
  value: d,
934
921
  onKeyDown: u,
935
922
  theme: p,
936
923
  disabled: n
937
924
  }
938
925
  ),
939
- /* @__PURE__ */ o(
926
+ /* @__PURE__ */ r(
940
927
  to,
941
928
  {
942
929
  "aria-label": "send chat message",
943
930
  disabled: n || d.length === 0,
944
- onClick: x,
931
+ onClick: k,
945
932
  theme: p,
946
- children: /* @__PURE__ */ o("span", { "data-state": "closed", children: /* @__PURE__ */ o(Xr, { theme: p }) })
933
+ children: /* @__PURE__ */ r("span", { "data-state": "closed", children: /* @__PURE__ */ r(Xr, { theme: p }) })
947
934
  }
948
935
  )
949
936
  ] });
@@ -965,9 +952,9 @@ const oo = w.div`
965
952
  function Yt({ text: e, action: t }) {
966
953
  const { themeSettings: n } = R();
967
954
  return /* @__PURE__ */ S(oo, { children: [
968
- /* @__PURE__ */ o(io, { theme: n, children: e }),
969
- /* @__PURE__ */ o(Fn, {}),
970
- t && /* @__PURE__ */ o(so, { onClick: t.onClick, children: t.text })
955
+ /* @__PURE__ */ r(io, { theme: n, children: e }),
956
+ /* @__PURE__ */ r(Fn, {}),
957
+ t && /* @__PURE__ */ r(so, { onClick: t.onClick, children: t.text })
971
958
  ] });
972
959
  }
973
960
  const ao = w.div`
@@ -986,11 +973,11 @@ const ao = w.div`
986
973
  margin-left: 20px;
987
974
 
988
975
  color: ${({ style: e }) => e.textColor};
989
- `, Jt = ur(function({ title: t, leftNav: n, rightNav: r, style: s }, c) {
976
+ `, Jt = ur(function({ title: t, leftNav: n, rightNav: o, style: s }, c) {
990
977
  return /* @__PURE__ */ S(ao, { ref: c, style: s, children: [
991
978
  n,
992
- /* @__PURE__ */ o(lo, { style: s, children: t }),
993
- r && /* @__PURE__ */ o("div", { className: "csdk-ml-auto", children: r })
979
+ /* @__PURE__ */ r(lo, { style: s, children: t }),
980
+ o && /* @__PURE__ */ r("div", { className: "csdk-ml-auto", children: o })
994
981
  ] });
995
982
  }), Ne = w.div`
996
983
  width: 5px;
@@ -1029,10 +1016,10 @@ function ut() {
1029
1016
  className: "csdk-flex csdk-justify-between csdk-w-[28px] csdk-py-[14.5px]",
1030
1017
  "aria-label": "loading dots",
1031
1018
  children: [
1032
- /* @__PURE__ */ o(Ne, { color: t }),
1033
- /* @__PURE__ */ o(Ne, { color: t }),
1034
- /* @__PURE__ */ o(Ne, { color: t }),
1035
- /* @__PURE__ */ o(Ne, { color: t })
1019
+ /* @__PURE__ */ r(Ne, { color: t }),
1020
+ /* @__PURE__ */ r(Ne, { color: t }),
1021
+ /* @__PURE__ */ r(Ne, { color: t }),
1022
+ /* @__PURE__ */ r(Ne, { color: t })
1036
1023
  ]
1037
1024
  }
1038
1025
  );
@@ -1041,17 +1028,17 @@ function ce() {
1041
1028
  return ce = Object.assign ? Object.assign.bind() : function(e) {
1042
1029
  for (var t = 1; t < arguments.length; t++) {
1043
1030
  var n = arguments[t];
1044
- for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && (e[r] = n[r]);
1031
+ for (var o in n) Object.prototype.hasOwnProperty.call(n, o) && (e[o] = n[o]);
1045
1032
  }
1046
1033
  return e;
1047
1034
  }, ce.apply(this, arguments);
1048
1035
  }
1049
- const co = ["children", "options"], y = { blockQuote: "0", breakLine: "1", breakThematic: "2", codeBlock: "3", codeFenced: "4", codeInline: "5", footnote: "6", footnoteReference: "7", gfmTask: "8", heading: "9", headingSetext: "10", htmlBlock: "11", htmlComment: "12", htmlSelfClosing: "13", image: "14", link: "15", linkAngleBraceStyleDetector: "16", linkBareUrlDetector: "17", linkMailtoDetector: "18", newlineCoalescer: "19", orderedList: "20", paragraph: "21", ref: "22", refImage: "23", refLink: "24", table: "25", tableSeparator: "26", text: "27", textBolded: "28", textEmphasized: "29", textEscaped: "30", textMarked: "31", textStrikethroughed: "32", unorderedList: "33" };
1036
+ const co = ["children", "options"], v = { blockQuote: "0", breakLine: "1", breakThematic: "2", codeBlock: "3", codeFenced: "4", codeInline: "5", footnote: "6", footnoteReference: "7", gfmTask: "8", heading: "9", headingSetext: "10", htmlBlock: "11", htmlComment: "12", htmlSelfClosing: "13", image: "14", link: "15", linkAngleBraceStyleDetector: "16", linkBareUrlDetector: "17", linkMailtoDetector: "18", newlineCoalescer: "19", orderedList: "20", paragraph: "21", ref: "22", refImage: "23", refLink: "24", table: "25", tableSeparator: "26", text: "27", textBolded: "28", textEmphasized: "29", textEscaped: "30", textMarked: "31", textStrikethroughed: "32", unorderedList: "33" };
1050
1037
  var kt;
1051
1038
  (function(e) {
1052
1039
  e[e.MAX = 0] = "MAX", e[e.HIGH = 1] = "HIGH", e[e.MED = 2] = "MED", e[e.LOW = 3] = "LOW", e[e.MIN = 4] = "MIN";
1053
1040
  })(kt || (kt = {}));
1054
- const wt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), St = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, uo = ["style", "script"], ho = ["src", "href", "data", "formAction", "srcDoc", "action"], po = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, go = /mailto:/i, fo = /\n{2,}$/, en = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Co = /^ *> ?/gm, mo = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, bo = /^ {2,}\n/, yo = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, tn = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, nn = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, xo = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, vo = /^(?:\n *)*\n/, ko = /\r\n?/g, wo = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, So = /^\[\^([^\]]+)]/, $o = /\f/g, Mo = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, To = /^\s*?\[(x|\s)\]/, rn = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, on = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, sn = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, Ye = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Ro = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, an = /^<!--[\s\S]*?(?:-->)/, Lo = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Je = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Eo = /^\{.*\}$/, Io = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, No = /^<([^ >]+@[^ >]+)>/, Po = /^<([^ >]+:\/[^ >]+)>/, Ho = /-([a-z])?/gi, ln = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Bo = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Fo = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Ao = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Oo = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Do = /\t/g, qo = /(^ *\||\| *$)/g, zo = /^ *:-+: *$/, Wo = /^ *:-+ *$/, Zo = /^ *-+: *$/, ze = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", jo = new RegExp(`^([*_])\\1${ze}\\1\\1(?!\\1)`), Uo = new RegExp(`^([*_])${ze}\\1(?!\\1)`), Go = new RegExp(`^(==)${ze}\\1`), Vo = new RegExp(`^(~~)${ze}\\1`), Qo = /^\\([^0-9A-Za-z\s])/, $t = /\\([^0-9A-Za-z\s])/g, _o = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Ko = /^\n+/, Xo = /^([ \t]*)/, Yo = /\\([^\\])/g, Jo = /(?:^|\n)( *)$/, ht = "(?:\\d+\\.)", pt = "(?:[*+-])";
1041
+ const wt = ["allowFullScreen", "allowTransparency", "autoComplete", "autoFocus", "autoPlay", "cellPadding", "cellSpacing", "charSet", "classId", "colSpan", "contentEditable", "contextMenu", "crossOrigin", "encType", "formAction", "formEncType", "formMethod", "formNoValidate", "formTarget", "frameBorder", "hrefLang", "inputMode", "keyParams", "keyType", "marginHeight", "marginWidth", "maxLength", "mediaGroup", "minLength", "noValidate", "radioGroup", "readOnly", "rowSpan", "spellCheck", "srcDoc", "srcLang", "srcSet", "tabIndex", "useMap"].reduce((e, t) => (e[t.toLowerCase()] = t, e), { class: "className", for: "htmlFor" }), St = { amp: "&", apos: "'", gt: ">", lt: "<", nbsp: " ", quot: "“" }, uo = ["style", "script"], ho = ["src", "href", "data", "formAction", "srcDoc", "action"], po = /([-A-Z0-9_:]+)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|(?:\{((?:\\.|{[^}]*?}|[^}])*)\})))?/gi, go = /mailto:/i, fo = /\n{2,}$/, en = /^(\s*>[\s\S]*?)(?=\n\n|$)/, Co = /^ *> ?/gm, mo = /^(?:\[!([^\]]*)\]\n)?([\s\S]*)/, bo = /^ {2,}\n/, yo = /^(?:( *[-*_])){3,} *(?:\n *)+\n/, tn = /^(?: {1,3})?(`{3,}|~{3,}) *(\S+)? *([^\n]*?)?\n([\s\S]*?)(?:\1\n?|$)/, nn = /^(?: {4}[^\n]+\n*)+(?:\n *)+\n?/, xo = /^(`+)((?:\\`|(?!\1)`|[^`])+)\1/, vo = /^(?:\n *)*\n/, ko = /\r\n?/g, wo = /^\[\^([^\]]+)](:(.*)((\n+ {4,}.*)|(\n(?!\[\^).+))*)/, So = /^\[\^([^\]]+)]/, $o = /\f/g, Mo = /^---[ \t]*\n(.|\n)*\n---[ \t]*\n/, To = /^\s*?\[(x|\s)\]/, rn = /^ *(#{1,6}) *([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, on = /^ *(#{1,6}) +([^\n]+?)(?: +#*)?(?:\n *)*(?:\n|$)/, sn = /^([^\n]+)\n *(=|-){3,} *(?:\n *)+\n/, Ye = /^ *(?!<[a-z][^ >/]* ?\/>)<([a-z][^ >/]*) ?((?:[^>]*[^/])?)>\n?(\s*(?:<\1[^>]*?>[\s\S]*?<\/\1>|(?!<\1\b)[\s\S])*?)<\/\1>(?!<\/\1>)\n*/i, Ro = /&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-fA-F]{1,6});/gi, an = /^<!--[\s\S]*?(?:-->)/, Lo = /^(data|aria|x)-[a-z_][a-z\d_.-]*$/, Je = /^ *<([a-z][a-z0-9:]*)(?:\s+((?:<.*?>|[^>])*))?\/?>(?!<\/\1>)(\s*\n)?/i, Eo = /^\{.*\}$/, Io = /^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/, No = /^<([^ >]+@[^ >]+)>/, Po = /^<([^ >]+:\/[^ >]+)>/, Ho = /-([a-z])?/gi, ln = /^(\|.*)\n(?: *(\|? *[-:]+ *\|[-| :]*)\n((?:.*\|.*\n)*))?\n?/, Bo = /^\[([^\]]*)\]:\s+<?([^\s>]+)>?\s*("([^"]*)")?/, Fo = /^!\[([^\]]*)\] ?\[([^\]]*)\]/, Oo = /^\[([^\]]*)\] ?\[([^\]]*)\]/, Ao = /(\n|^[-*]\s|^#|^ {2,}|^-{2,}|^>\s)/, Do = /\t/g, qo = /(^ *\||\| *$)/g, zo = /^ *:-+: *$/, Wo = /^ *:-+ *$/, Zo = /^ *-+: *$/, ze = "((?:\\[.*?\\][([].*?[)\\]]|<.*?>(?:.*?<.*?>)?|`.*?`|\\\\\\1|[\\s\\S])+?)", jo = new RegExp(`^([*_])\\1${ze}\\1\\1(?!\\1)`), Go = new RegExp(`^([*_])${ze}\\1(?!\\1)`), Uo = new RegExp(`^(==)${ze}\\1`), Vo = new RegExp(`^(~~)${ze}\\1`), Qo = /^\\([^0-9A-Za-z\s])/, $t = /\\([^0-9A-Za-z\s])/g, _o = /^([\s\S](?:(?! |[0-9]\.)[^=*_~\-\n<`\\\[!])*)/, Ko = /^\n+/, Xo = /^([ \t]*)/, Yo = /\\([^\\])/g, Jo = /(?:^|\n)( *)$/, ht = "(?:\\d+\\.)", pt = "(?:[*+-])";
1055
1042
  function cn(e) {
1056
1043
  return "( *)(" + (e === 1 ? ht : pt) + ") +";
1057
1044
  }
@@ -1070,29 +1057,29 @@ function gn(e) {
1070
1057
  }
1071
1058
  const fn = gn(1), Cn = gn(2);
1072
1059
  function Mt(e, t) {
1073
- const n = t === 1, r = n ? fn : Cn, s = n ? ni : ri, c = n ? ei : ti;
1060
+ const n = t === 1, o = n ? fn : Cn, s = n ? ni : ri, c = n ? ei : ti;
1074
1061
  return { match: pe(function(l, h) {
1075
1062
  const d = Jo.exec(h.prevCapture);
1076
- return d && (h.list || !h.inline && !h.simple) ? r.exec(l = d[1] + l) : null;
1063
+ return d && (h.list || !h.inline && !h.simple) ? o.exec(l = d[1] + l) : null;
1077
1064
  }), order: 1, parse(l, h, d) {
1078
- const g = n ? +l[2] : void 0, m = l[0].replace(fo, `
1065
+ const g = n ? +l[2] : void 0, b = l[0].replace(fo, `
1079
1066
  `).match(s);
1080
- let x = !1;
1081
- return { items: m.map(function(i, u) {
1082
- const a = c.exec(i)[0].length, f = new RegExp("^ {1," + a + "}", "gm"), p = i.replace(f, "").replace(c, ""), b = u === m.length - 1, v = p.indexOf(`
1067
+ let k = !1;
1068
+ return { items: b.map(function(i, u) {
1069
+ const a = c.exec(i)[0].length, f = new RegExp("^ {1," + a + "}", "gm"), p = i.replace(f, "").replace(c, ""), m = u === b.length - 1, y = p.indexOf(`
1083
1070
 
1084
- `) !== -1 || b && x;
1085
- x = v;
1086
- const k = d.inline, E = d.list;
1087
- let T;
1088
- d.list = !0, v ? (d.inline = !1, T = ke(p) + `
1071
+ `) !== -1 || m && k;
1072
+ k = y;
1073
+ const x = d.inline, L = d.list;
1074
+ let M;
1075
+ d.list = !0, y ? (d.inline = !1, M = ke(p) + `
1089
1076
 
1090
- `) : (d.inline = !0, T = ke(p));
1091
- const M = h(T, d);
1092
- return d.inline = k, d.list = E, M;
1077
+ `) : (d.inline = !0, M = ke(p));
1078
+ const T = h(M, d);
1079
+ return d.inline = x, d.list = L, T;
1093
1080
  }), ordered: n, start: g };
1094
- }, render: (l, h, d) => e(l.ordered ? "ol" : "ul", { key: d.key, start: l.type === y.orderedList ? l.start : void 0 }, l.items.map(function(g, m) {
1095
- return e("li", { key: m }, h(g, d));
1081
+ }, render: (l, h, d) => e(l.ordered ? "ol" : "ul", { key: d.key, start: l.type === v.orderedList ? l.start : void 0 }, l.items.map(function(g, b) {
1082
+ return e("li", { key: b }, h(g, d));
1096
1083
  })) };
1097
1084
  }
1098
1085
  const oi = new RegExp(`^\\[((?:\\[[^\\]]*\\]|[^\\[\\]]|\\](?=[^\\[]*\\]))*)\\]\\(\\s*<?((?:\\([^)]*\\)|[^\\s\\\\]|\\\\.)*?)>?(?:\\s+['"]([\\s\\S]*?)['"])?\\s*\\)`), ii = /^!\[(.*?)\]\( *((?:\([^)]*\)|[^() ])*) *"?([^)"]*)?"?\)/, mn = [en, tn, nn, rn, sn, on, ln, fn, Cn], si = [...mn, /^[^\n]+(?: \n|\n{2,})/, Ye, an, Je];
@@ -1107,7 +1094,7 @@ function be(e) {
1107
1094
  function ai(e) {
1108
1095
  return Zo.test(e) ? "right" : zo.test(e) ? "center" : Wo.test(e) ? "left" : null;
1109
1096
  }
1110
- function Tt(e, t, n, r) {
1097
+ function Tt(e, t, n, o) {
1111
1098
  const s = n.inTable;
1112
1099
  n.inTable = !0;
1113
1100
  let c = [[]], l = "";
@@ -1116,19 +1103,19 @@ function Tt(e, t, n, r) {
1116
1103
  const d = c[c.length - 1];
1117
1104
  d.push.apply(d, t(l, n)), l = "";
1118
1105
  }
1119
- return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d, g, m) => {
1120
- d.trim() === "|" && (h(), r) ? g !== 0 && g !== m.length - 1 && c.push([]) : l += d;
1106
+ return e.trim().split(/(`[^`]*`|\\\||\|)/).filter(Boolean).forEach((d, g, b) => {
1107
+ d.trim() === "|" && (h(), o) ? g !== 0 && g !== b.length - 1 && c.push([]) : l += d;
1121
1108
  }), h(), n.inTable = s, c;
1122
1109
  }
1123
1110
  function li(e, t, n) {
1124
1111
  n.inline = !0;
1125
- const r = e[2] ? e[2].replace(qo, "").split("|").map(ai) : [], s = e[3] ? function(l, h, d) {
1112
+ const o = e[2] ? e[2].replace(qo, "").split("|").map(ai) : [], s = e[3] ? function(l, h, d) {
1126
1113
  return l.trim().split(`
1127
1114
  `).map(function(g) {
1128
1115
  return Tt(g, h, d, !0);
1129
1116
  });
1130
1117
  }(e[3], t, n) : [], c = Tt(e[1], t, n, !!s.length);
1131
- return n.inline = !1, s.length ? { align: r, cells: s, header: c, type: y.table } : { children: c, type: y.paragraph };
1118
+ return n.inline = !1, s.length ? { align: o, cells: s, header: c, type: v.table } : { children: c, type: v.paragraph };
1132
1119
  }
1133
1120
  function Rt(e, t) {
1134
1121
  return e.align[t] == null ? {} : { textAlign: e.align[t] };
@@ -1162,8 +1149,8 @@ function ci(e, t) {
1162
1149
  e.split(`
1163
1150
  `).every((s) => (s += `
1164
1151
  `, !mn.some((c) => c.test(s)) && (n += s, !!s.trim())));
1165
- const r = ke(n);
1166
- return r == "" ? null : [n, , r];
1152
+ const o = ke(n);
1153
+ return o == "" ? null : [n, , o];
1167
1154
  }
1168
1155
  const di = /(javascript|vbscript|data(?!:image)):/i;
1169
1156
  function ui(e) {
@@ -1179,25 +1166,25 @@ function Lt(e) {
1179
1166
  return e.replace(Yo, "$1");
1180
1167
  }
1181
1168
  function Pe(e, t, n) {
1182
- const r = n.inline || !1, s = n.simple || !1;
1169
+ const o = n.inline || !1, s = n.simple || !1;
1183
1170
  n.inline = !0, n.simple = !0;
1184
1171
  const c = e(t, n);
1185
- return n.inline = r, n.simple = s, c;
1172
+ return n.inline = o, n.simple = s, c;
1186
1173
  }
1187
1174
  function hi(e, t, n) {
1188
- const r = n.inline || !1, s = n.simple || !1;
1175
+ const o = n.inline || !1, s = n.simple || !1;
1189
1176
  n.inline = !1, n.simple = !0;
1190
1177
  const c = e(t, n);
1191
- return n.inline = r, n.simple = s, c;
1178
+ return n.inline = o, n.simple = s, c;
1192
1179
  }
1193
1180
  function pi(e, t, n) {
1194
- const r = n.inline || !1;
1181
+ const o = n.inline || !1;
1195
1182
  n.inline = !1;
1196
1183
  const s = e(t, n);
1197
- return n.inline = r, s;
1184
+ return n.inline = o, s;
1198
1185
  }
1199
- const Ue = (e, t, n) => ({ children: Pe(t, e[2], n) });
1200
- function Ge() {
1186
+ const Ge = (e, t, n) => ({ children: Pe(t, e[2], n) });
1187
+ function Ue() {
1201
1188
  return {};
1202
1189
  }
1203
1190
  function Ve() {
@@ -1207,23 +1194,23 @@ function gi(...e) {
1207
1194
  return e.filter(Boolean).join(" ");
1208
1195
  }
1209
1196
  function Qe(e, t, n) {
1210
- let r = e;
1197
+ let o = e;
1211
1198
  const s = t.split(".");
1212
- for (; s.length && (r = r[s[0]], r !== void 0); ) s.shift();
1213
- return r || n;
1199
+ for (; s.length && (o = o[s[0]], o !== void 0); ) s.shift();
1200
+ return o || n;
1214
1201
  }
1215
1202
  function fi(e = "", t = {}) {
1216
1203
  function n(i, u, ...a) {
1217
1204
  const f = Qe(t.overrides, `${i}.props`, {});
1218
- return t.createElement(function(p, b) {
1219
- const v = Qe(b, p);
1220
- return v ? typeof v == "function" || typeof v == "object" && "render" in v ? v : Qe(b, `${p}.component`, p) : p;
1205
+ return t.createElement(function(p, m) {
1206
+ const y = Qe(m, p);
1207
+ return y ? typeof y == "function" || typeof y == "object" && "render" in y ? y : Qe(m, `${p}.component`, p) : p;
1221
1208
  }(i, t.overrides), ce({}, u, f, { className: gi(u == null ? void 0 : u.className, f.className) || void 0 }), ...a);
1222
1209
  }
1223
- function r(i) {
1210
+ function o(i) {
1224
1211
  i = i.replace(Mo, "");
1225
1212
  let u = !1;
1226
- t.forceInline ? u = !0 : t.forceBlock || (u = Oo.test(i) === !1);
1213
+ t.forceInline ? u = !0 : t.forceBlock || (u = Ao.test(i) === !1);
1227
1214
  const a = g(d(u ? i : `${ke(i).replace(Ko, "")}
1228
1215
 
1229
1216
  `, { inline: u }));
@@ -1241,31 +1228,31 @@ function fi(e = "", t = {}) {
1241
1228
  function s(i, u) {
1242
1229
  const a = u.match(po);
1243
1230
  return a ? a.reduce(function(f, p) {
1244
- const b = p.indexOf("=");
1245
- if (b !== -1) {
1246
- const v = function(M) {
1247
- return M.indexOf("-") !== -1 && M.match(Lo) === null && (M = M.replace(Ho, function(I, B) {
1231
+ const m = p.indexOf("=");
1232
+ if (m !== -1) {
1233
+ const y = function(T) {
1234
+ return T.indexOf("-") !== -1 && T.match(Lo) === null && (T = T.replace(Ho, function(I, B) {
1248
1235
  return B.toUpperCase();
1249
- })), M;
1250
- }(p.slice(0, b)).trim(), k = function(M) {
1251
- const I = M[0];
1252
- return (I === '"' || I === "'") && M.length >= 2 && M[M.length - 1] === I ? M.slice(1, -1) : M;
1253
- }(p.slice(b + 1).trim()), E = wt[v] || v;
1254
- if (E === "ref") return f;
1255
- const T = f[E] = function(M, I, B, le) {
1236
+ })), T;
1237
+ }(p.slice(0, m)).trim(), x = function(T) {
1238
+ const I = T[0];
1239
+ return (I === '"' || I === "'") && T.length >= 2 && T[T.length - 1] === I ? T.slice(1, -1) : T;
1240
+ }(p.slice(m + 1).trim()), L = wt[y] || y;
1241
+ if (L === "ref") return f;
1242
+ const M = f[L] = function(T, I, B, le) {
1256
1243
  return I === "style" ? function(V) {
1257
1244
  const Z = [];
1258
- let Q = "", _ = !1, q = !1, J = "";
1245
+ let Q = "", _ = !1, D = !1, J = "";
1259
1246
  if (!V) return Z;
1260
- for (let U = 0; U < V.length; U++) {
1261
- const W = V[U];
1262
- if (W !== '"' && W !== "'" || _ || (q ? W === J && (q = !1, J = "") : (q = !0, J = W)), W === "(" && Q.endsWith("url") ? _ = !0 : W === ")" && _ && (_ = !1), W !== ";" || q || _) Q += W;
1247
+ for (let G = 0; G < V.length; G++) {
1248
+ const z = V[G];
1249
+ if (z !== '"' && z !== "'" || _ || (D ? z === J && (D = !1, J = "") : (D = !0, J = z)), z === "(" && Q.endsWith("url") ? _ = !0 : z === ")" && _ && (_ = !1), z !== ";" || D || _) Q += z;
1263
1250
  else {
1264
- const G = Q.trim();
1265
- if (G) {
1266
- const re = G.indexOf(":");
1251
+ const U = Q.trim();
1252
+ if (U) {
1253
+ const re = U.indexOf(":");
1267
1254
  if (re > 0) {
1268
- const fe = G.slice(0, re).trim(), de = G.slice(re + 1).trim();
1255
+ const fe = U.slice(0, re).trim(), de = U.slice(re + 1).trim();
1269
1256
  Z.push([fe, de]);
1270
1257
  }
1271
1258
  }
@@ -1274,120 +1261,120 @@ function fi(e = "", t = {}) {
1274
1261
  }
1275
1262
  const P = Q.trim();
1276
1263
  if (P) {
1277
- const U = P.indexOf(":");
1278
- if (U > 0) {
1279
- const W = P.slice(0, U).trim(), G = P.slice(U + 1).trim();
1280
- Z.push([W, G]);
1264
+ const G = P.indexOf(":");
1265
+ if (G > 0) {
1266
+ const z = P.slice(0, G).trim(), U = P.slice(G + 1).trim();
1267
+ Z.push([z, U]);
1281
1268
  }
1282
1269
  }
1283
1270
  return Z;
1284
1271
  }(B).reduce(function(V, [Z, Q]) {
1285
- return V[Z.replace(/(-[a-z])/g, (_) => _[1].toUpperCase())] = le(Q, M, Z), V;
1286
- }, {}) : ho.indexOf(I) !== -1 ? le(B, M, I) : (B.match(Eo) && (B = B.slice(1, B.length - 1)), B === "true" || B !== "false" && B);
1287
- }(i, v, k, t.sanitizer);
1288
- typeof T == "string" && (Ye.test(T) || Je.test(T)) && (f[E] = r(T.trim()));
1272
+ return V[Z.replace(/(-[a-z])/g, (_) => _[1].toUpperCase())] = le(Q, T, Z), V;
1273
+ }, {}) : ho.indexOf(I) !== -1 ? le(B, T, I) : (B.match(Eo) && (B = B.slice(1, B.length - 1)), B === "true" || B !== "false" && B);
1274
+ }(i, y, x, t.sanitizer);
1275
+ typeof M == "string" && (Ye.test(M) || Je.test(M)) && (f[L] = o(M.trim()));
1289
1276
  } else p !== "style" && (f[wt[p] || p] = !0);
1290
1277
  return f;
1291
1278
  }, {}) : null;
1292
1279
  }
1293
1280
  t.overrides = t.overrides || {}, t.sanitizer = t.sanitizer || ui, t.slugify = t.slugify || be, t.namedCodesToUnicode = t.namedCodesToUnicode ? ce({}, St, t.namedCodesToUnicode) : St, t.createElement = t.createElement || Y.createElement;
1294
- const c = [], l = {}, h = { [y.blockQuote]: { match: ee(en), order: 1, parse(i, u, a) {
1281
+ const c = [], l = {}, h = { [v.blockQuote]: { match: ee(en), order: 1, parse(i, u, a) {
1295
1282
  const [, f, p] = i[0].replace(Co, "").match(mo);
1296
1283
  return { alert: f, children: u(p, a) };
1297
1284
  }, render(i, u, a) {
1298
1285
  const f = { key: a.key };
1299
- return i.alert && (f.className = "markdown-alert-" + t.slugify(i.alert.toLowerCase(), be), i.children.unshift({ attrs: {}, children: [{ type: y.text, text: i.alert }], noInnerParse: !0, type: y.htmlBlock, tag: "header" })), n("blockquote", f, u(i.children, a));
1300
- } }, [y.breakLine]: { match: ye(bo), order: 1, parse: Ge, render: (i, u, a) => n("br", { key: a.key }) }, [y.breakThematic]: { match: ee(yo), order: 1, parse: Ge, render: (i, u, a) => n("hr", { key: a.key }) }, [y.codeBlock]: { match: ee(nn), order: 0, parse: (i) => ({ lang: void 0, text: ke(i[0].replace(/^ {4}/gm, "")).replace($t, "$1") }), render: (i, u, a) => n("pre", { key: a.key }, n("code", ce({}, i.attrs, { className: i.lang ? `lang-${i.lang}` : "" }), i.text)) }, [y.codeFenced]: { match: ee(tn), order: 0, parse: (i) => ({ attrs: s("code", i[3] || ""), lang: i[2] || void 0, text: i[4], type: y.codeBlock }) }, [y.codeInline]: { match: se(xo), order: 3, parse: (i) => ({ text: i[2].replace($t, "$1") }), render: (i, u, a) => n("code", { key: a.key }, i.text) }, [y.footnote]: { match: ee(wo), order: 0, parse: (i) => (c.push({ footnote: i[2], identifier: i[1] }), {}), render: Ve }, [y.footnoteReference]: { match: ie(So), order: 1, parse: (i) => ({ target: `#${t.slugify(i[1], be)}`, text: i[1] }), render: (i, u, a) => n("a", { key: a.key, href: t.sanitizer(i.target, "a", "href") }, n("sup", { key: a.key }, i.text)) }, [y.gfmTask]: { match: ie(To), order: 1, parse: (i) => ({ completed: i[1].toLowerCase() === "x" }), render: (i, u, a) => n("input", { checked: i.completed, key: a.key, readOnly: !0, type: "checkbox" }) }, [y.heading]: { match: ee(t.enforceAtxHeadings ? on : rn), order: 1, parse: (i, u, a) => ({ children: Pe(u, i[2], a), id: t.slugify(i[2], be), level: i[1].length }), render: (i, u, a) => n(`h${i.level}`, { id: i.id, key: a.key }, u(i.children, a)) }, [y.headingSetext]: { match: ee(sn), order: 0, parse: (i, u, a) => ({ children: Pe(u, i[1], a), level: i[2] === "=" ? 1 : 2, type: y.heading }) }, [y.htmlBlock]: { match: ye(Ye), order: 1, parse(i, u, a) {
1301
- const [, f] = i[3].match(Xo), p = new RegExp(`^${f}`, "gm"), b = i[3].replace(p, ""), v = (k = b, si.some((B) => B.test(k)) ? pi : Pe);
1302
- var k;
1303
- const E = i[1].toLowerCase(), T = uo.indexOf(E) !== -1, M = (T ? E : i[1]).trim(), I = { attrs: s(M, i[2]), noInnerParse: T, tag: M };
1304
- return a.inAnchor = a.inAnchor || E === "a", T ? I.text = i[3] : I.children = v(u, b, a), a.inAnchor = !1, I;
1305
- }, render: (i, u, a) => n(i.tag, ce({ key: a.key }, i.attrs), i.text || (i.children ? u(i.children, a) : "")) }, [y.htmlSelfClosing]: { match: ye(Je), order: 1, parse(i) {
1286
+ return i.alert && (f.className = "markdown-alert-" + t.slugify(i.alert.toLowerCase(), be), i.children.unshift({ attrs: {}, children: [{ type: v.text, text: i.alert }], noInnerParse: !0, type: v.htmlBlock, tag: "header" })), n("blockquote", f, u(i.children, a));
1287
+ } }, [v.breakLine]: { match: ye(bo), order: 1, parse: Ue, render: (i, u, a) => n("br", { key: a.key }) }, [v.breakThematic]: { match: ee(yo), order: 1, parse: Ue, render: (i, u, a) => n("hr", { key: a.key }) }, [v.codeBlock]: { match: ee(nn), order: 0, parse: (i) => ({ lang: void 0, text: ke(i[0].replace(/^ {4}/gm, "")).replace($t, "$1") }), render: (i, u, a) => n("pre", { key: a.key }, n("code", ce({}, i.attrs, { className: i.lang ? `lang-${i.lang}` : "" }), i.text)) }, [v.codeFenced]: { match: ee(tn), order: 0, parse: (i) => ({ attrs: s("code", i[3] || ""), lang: i[2] || void 0, text: i[4], type: v.codeBlock }) }, [v.codeInline]: { match: se(xo), order: 3, parse: (i) => ({ text: i[2].replace($t, "$1") }), render: (i, u, a) => n("code", { key: a.key }, i.text) }, [v.footnote]: { match: ee(wo), order: 0, parse: (i) => (c.push({ footnote: i[2], identifier: i[1] }), {}), render: Ve }, [v.footnoteReference]: { match: ie(So), order: 1, parse: (i) => ({ target: `#${t.slugify(i[1], be)}`, text: i[1] }), render: (i, u, a) => n("a", { key: a.key, href: t.sanitizer(i.target, "a", "href") }, n("sup", { key: a.key }, i.text)) }, [v.gfmTask]: { match: ie(To), order: 1, parse: (i) => ({ completed: i[1].toLowerCase() === "x" }), render: (i, u, a) => n("input", { checked: i.completed, key: a.key, readOnly: !0, type: "checkbox" }) }, [v.heading]: { match: ee(t.enforceAtxHeadings ? on : rn), order: 1, parse: (i, u, a) => ({ children: Pe(u, i[2], a), id: t.slugify(i[2], be), level: i[1].length }), render: (i, u, a) => n(`h${i.level}`, { id: i.id, key: a.key }, u(i.children, a)) }, [v.headingSetext]: { match: ee(sn), order: 0, parse: (i, u, a) => ({ children: Pe(u, i[1], a), level: i[2] === "=" ? 1 : 2, type: v.heading }) }, [v.htmlBlock]: { match: ye(Ye), order: 1, parse(i, u, a) {
1288
+ const [, f] = i[3].match(Xo), p = new RegExp(`^${f}`, "gm"), m = i[3].replace(p, ""), y = (x = m, si.some((B) => B.test(x)) ? pi : Pe);
1289
+ var x;
1290
+ const L = i[1].toLowerCase(), M = uo.indexOf(L) !== -1, T = (M ? L : i[1]).trim(), I = { attrs: s(T, i[2]), noInnerParse: M, tag: T };
1291
+ return a.inAnchor = a.inAnchor || L === "a", M ? I.text = i[3] : I.children = y(u, m, a), a.inAnchor = !1, I;
1292
+ }, render: (i, u, a) => n(i.tag, ce({ key: a.key }, i.attrs), i.text || (i.children ? u(i.children, a) : "")) }, [v.htmlSelfClosing]: { match: ye(Je), order: 1, parse(i) {
1306
1293
  const u = i[1].trim();
1307
1294
  return { attrs: s(u, i[2] || ""), tag: u };
1308
- }, render: (i, u, a) => n(i.tag, ce({}, i.attrs, { key: a.key })) }, [y.htmlComment]: { match: ye(an), order: 1, parse: () => ({}), render: Ve }, [y.image]: { match: se(ii), order: 1, parse: (i) => ({ alt: i[1], target: Lt(i[2]), title: i[3] }), render: (i, u, a) => n("img", { key: a.key, alt: i.alt || void 0, title: i.title || void 0, src: t.sanitizer(i.target, "img", "src") }) }, [y.link]: { match: ie(oi), order: 3, parse: (i, u, a) => ({ children: hi(u, i[1], a), target: Lt(i[2]), title: i[3] }), render: (i, u, a) => n("a", { key: a.key, href: t.sanitizer(i.target, "a", "href"), title: i.title }, u(i.children, a)) }, [y.linkAngleBraceStyleDetector]: { match: ie(Po), order: 0, parse: (i) => ({ children: [{ text: i[1], type: y.text }], target: i[1], type: y.link }) }, [y.linkBareUrlDetector]: { match: pe((i, u) => u.inAnchor || t.disableAutoLink ? null : ie(Io)(i, u)), order: 0, parse: (i) => ({ children: [{ text: i[1], type: y.text }], target: i[1], title: void 0, type: y.link }) }, [y.linkMailtoDetector]: { match: ie(No), order: 0, parse(i) {
1295
+ }, render: (i, u, a) => n(i.tag, ce({}, i.attrs, { key: a.key })) }, [v.htmlComment]: { match: ye(an), order: 1, parse: () => ({}), render: Ve }, [v.image]: { match: se(ii), order: 1, parse: (i) => ({ alt: i[1], target: Lt(i[2]), title: i[3] }), render: (i, u, a) => n("img", { key: a.key, alt: i.alt || void 0, title: i.title || void 0, src: t.sanitizer(i.target, "img", "src") }) }, [v.link]: { match: ie(oi), order: 3, parse: (i, u, a) => ({ children: hi(u, i[1], a), target: Lt(i[2]), title: i[3] }), render: (i, u, a) => n("a", { key: a.key, href: t.sanitizer(i.target, "a", "href"), title: i.title }, u(i.children, a)) }, [v.linkAngleBraceStyleDetector]: { match: ie(Po), order: 0, parse: (i) => ({ children: [{ text: i[1], type: v.text }], target: i[1], type: v.link }) }, [v.linkBareUrlDetector]: { match: pe((i, u) => u.inAnchor || t.disableAutoLink ? null : ie(Io)(i, u)), order: 0, parse: (i) => ({ children: [{ text: i[1], type: v.text }], target: i[1], title: void 0, type: v.link }) }, [v.linkMailtoDetector]: { match: ie(No), order: 0, parse(i) {
1309
1296
  let u = i[1], a = i[1];
1310
- return go.test(a) || (a = "mailto:" + a), { children: [{ text: u.replace("mailto:", ""), type: y.text }], target: a, type: y.link };
1311
- } }, [y.orderedList]: Mt(n, 1), [y.unorderedList]: Mt(n, 2), [y.newlineCoalescer]: { match: ee(vo), order: 3, parse: Ge, render: () => `
1312
- ` }, [y.paragraph]: { match: pe(ci), order: 3, parse: Ue, render: (i, u, a) => n("p", { key: a.key }, u(i.children, a)) }, [y.ref]: { match: ie(Bo), order: 0, parse: (i) => (l[i[1]] = { target: i[2], title: i[4] }, {}), render: Ve }, [y.refImage]: { match: se(Fo), order: 0, parse: (i) => ({ alt: i[1] || void 0, ref: i[2] }), render: (i, u, a) => l[i.ref] ? n("img", { key: a.key, alt: i.alt, src: t.sanitizer(l[i.ref].target, "img", "src"), title: l[i.ref].title }) : null }, [y.refLink]: { match: ie(Ao), order: 0, parse: (i, u, a) => ({ children: u(i[1], a), fallbackChildren: i[0], ref: i[2] }), render: (i, u, a) => l[i.ref] ? n("a", { key: a.key, href: t.sanitizer(l[i.ref].target, "a", "href"), title: l[i.ref].title }, u(i.children, a)) : n("span", { key: a.key }, i.fallbackChildren) }, [y.table]: { match: ee(ln), order: 1, parse: li, render(i, u, a) {
1297
+ return go.test(a) || (a = "mailto:" + a), { children: [{ text: u.replace("mailto:", ""), type: v.text }], target: a, type: v.link };
1298
+ } }, [v.orderedList]: Mt(n, 1), [v.unorderedList]: Mt(n, 2), [v.newlineCoalescer]: { match: ee(vo), order: 3, parse: Ue, render: () => `
1299
+ ` }, [v.paragraph]: { match: pe(ci), order: 3, parse: Ge, render: (i, u, a) => n("p", { key: a.key }, u(i.children, a)) }, [v.ref]: { match: ie(Bo), order: 0, parse: (i) => (l[i[1]] = { target: i[2], title: i[4] }, {}), render: Ve }, [v.refImage]: { match: se(Fo), order: 0, parse: (i) => ({ alt: i[1] || void 0, ref: i[2] }), render: (i, u, a) => l[i.ref] ? n("img", { key: a.key, alt: i.alt, src: t.sanitizer(l[i.ref].target, "img", "src"), title: l[i.ref].title }) : null }, [v.refLink]: { match: ie(Oo), order: 0, parse: (i, u, a) => ({ children: u(i[1], a), fallbackChildren: i[0], ref: i[2] }), render: (i, u, a) => l[i.ref] ? n("a", { key: a.key, href: t.sanitizer(l[i.ref].target, "a", "href"), title: l[i.ref].title }, u(i.children, a)) : n("span", { key: a.key }, i.fallbackChildren) }, [v.table]: { match: ee(ln), order: 1, parse: li, render(i, u, a) {
1313
1300
  const f = i;
1314
- return n("table", { key: a.key }, n("thead", null, n("tr", null, f.header.map(function(p, b) {
1315
- return n("th", { key: b, style: Rt(f, b) }, u(p, a));
1316
- }))), n("tbody", null, f.cells.map(function(p, b) {
1317
- return n("tr", { key: b }, p.map(function(v, k) {
1318
- return n("td", { key: k, style: Rt(f, k) }, u(v, a));
1301
+ return n("table", { key: a.key }, n("thead", null, n("tr", null, f.header.map(function(p, m) {
1302
+ return n("th", { key: m, style: Rt(f, m) }, u(p, a));
1303
+ }))), n("tbody", null, f.cells.map(function(p, m) {
1304
+ return n("tr", { key: m }, p.map(function(y, x) {
1305
+ return n("td", { key: x, style: Rt(f, x) }, u(y, a));
1319
1306
  }));
1320
1307
  })));
1321
- } }, [y.text]: { match: ye(_o), order: 4, parse: (i) => ({ text: i[0].replace(Ro, (u, a) => t.namedCodesToUnicode[a] ? t.namedCodesToUnicode[a] : u) }), render: (i) => i.text }, [y.textBolded]: { match: se(jo), order: 2, parse: (i, u, a) => ({ children: u(i[2], a) }), render: (i, u, a) => n("strong", { key: a.key }, u(i.children, a)) }, [y.textEmphasized]: { match: se(Uo), order: 3, parse: (i, u, a) => ({ children: u(i[2], a) }), render: (i, u, a) => n("em", { key: a.key }, u(i.children, a)) }, [y.textEscaped]: { match: se(Qo), order: 1, parse: (i) => ({ text: i[1], type: y.text }) }, [y.textMarked]: { match: se(Go), order: 3, parse: Ue, render: (i, u, a) => n("mark", { key: a.key }, u(i.children, a)) }, [y.textStrikethroughed]: { match: se(Vo), order: 3, parse: Ue, render: (i, u, a) => n("del", { key: a.key }, u(i.children, a)) } };
1322
- t.disableParsingRawHTML === !0 && (delete h[y.htmlBlock], delete h[y.htmlSelfClosing]);
1308
+ } }, [v.text]: { match: ye(_o), order: 4, parse: (i) => ({ text: i[0].replace(Ro, (u, a) => t.namedCodesToUnicode[a] ? t.namedCodesToUnicode[a] : u) }), render: (i) => i.text }, [v.textBolded]: { match: se(jo), order: 2, parse: (i, u, a) => ({ children: u(i[2], a) }), render: (i, u, a) => n("strong", { key: a.key }, u(i.children, a)) }, [v.textEmphasized]: { match: se(Go), order: 3, parse: (i, u, a) => ({ children: u(i[2], a) }), render: (i, u, a) => n("em", { key: a.key }, u(i.children, a)) }, [v.textEscaped]: { match: se(Qo), order: 1, parse: (i) => ({ text: i[1], type: v.text }) }, [v.textMarked]: { match: se(Uo), order: 3, parse: Ge, render: (i, u, a) => n("mark", { key: a.key }, u(i.children, a)) }, [v.textStrikethroughed]: { match: se(Vo), order: 3, parse: Ge, render: (i, u, a) => n("del", { key: a.key }, u(i.children, a)) } };
1309
+ t.disableParsingRawHTML === !0 && (delete h[v.htmlBlock], delete h[v.htmlSelfClosing]);
1323
1310
  const d = function(i) {
1324
1311
  let u = Object.keys(i);
1325
1312
  function a(f, p) {
1326
- let b, v, k = [], E = "", T = "";
1313
+ let m, y, x = [], L = "", M = "";
1327
1314
  for (p.prevCapture = p.prevCapture || ""; f; ) {
1328
- let M = 0;
1329
- for (; M < u.length; ) {
1330
- if (E = u[M], b = i[E], p.inline && !b.match.inline) {
1331
- M++;
1315
+ let T = 0;
1316
+ for (; T < u.length; ) {
1317
+ if (L = u[T], m = i[L], p.inline && !m.match.inline) {
1318
+ T++;
1332
1319
  continue;
1333
1320
  }
1334
- const I = b.match(f, p);
1321
+ const I = m.match(f, p);
1335
1322
  if (I) {
1336
- T = I[0], p.prevCapture += T, f = f.substring(T.length), v = b.parse(I, a, p), v.type == null && (v.type = E), k.push(v);
1323
+ M = I[0], p.prevCapture += M, f = f.substring(M.length), y = m.parse(I, a, p), y.type == null && (y.type = L), x.push(y);
1337
1324
  break;
1338
1325
  }
1339
- M++;
1326
+ T++;
1340
1327
  }
1341
1328
  }
1342
- return p.prevCapture = "", k;
1329
+ return p.prevCapture = "", x;
1343
1330
  }
1344
1331
  return u.sort(function(f, p) {
1345
- let b = i[f].order, v = i[p].order;
1346
- return b !== v ? b - v : f < p ? -1 : 1;
1332
+ let m = i[f].order, y = i[p].order;
1333
+ return m !== y ? m - y : f < p ? -1 : 1;
1347
1334
  }), function(f, p) {
1348
- return a(function(b) {
1349
- return b.replace(ko, `
1335
+ return a(function(m) {
1336
+ return m.replace(ko, `
1350
1337
  `).replace($o, "").replace(Do, " ");
1351
1338
  }(f), p);
1352
1339
  };
1353
- }(h), g = (m = /* @__PURE__ */ function(i, u) {
1340
+ }(h), g = (b = /* @__PURE__ */ function(i, u) {
1354
1341
  return function(a, f, p) {
1355
- const b = i[a.type].render;
1356
- return u ? u(() => b(a, f, p), a, f, p) : b(a, f, p);
1342
+ const m = i[a.type].render;
1343
+ return u ? u(() => m(a, f, p), a, f, p) : m(a, f, p);
1357
1344
  };
1358
1345
  }(h, t.renderRule), function i(u, a = {}) {
1359
1346
  if (Array.isArray(u)) {
1360
1347
  const f = a.key, p = [];
1361
- let b = !1;
1362
- for (let v = 0; v < u.length; v++) {
1363
- a.key = v;
1364
- const k = i(u[v], a), E = typeof k == "string";
1365
- E && b ? p[p.length - 1] += k : k !== null && p.push(k), b = E;
1348
+ let m = !1;
1349
+ for (let y = 0; y < u.length; y++) {
1350
+ a.key = y;
1351
+ const x = i(u[y], a), L = typeof x == "string";
1352
+ L && m ? p[p.length - 1] += x : x !== null && p.push(x), m = L;
1366
1353
  }
1367
1354
  return a.key = f, p;
1368
1355
  }
1369
- return m(u, i, a);
1356
+ return b(u, i, a);
1370
1357
  });
1371
- var m;
1372
- const x = r(e);
1373
- return c.length ? n("div", null, x, n("footer", { key: "footer" }, c.map(function(i) {
1358
+ var b;
1359
+ const k = o(e);
1360
+ return c.length ? n("div", null, k, n("footer", { key: "footer" }, c.map(function(i) {
1374
1361
  return n("div", { id: t.slugify(i.identifier, be), key: i.identifier }, i.identifier, g(d(i.footnote, { inline: !0 })));
1375
- }))) : x;
1362
+ }))) : k;
1376
1363
  }
1377
1364
  const Ci = (e) => {
1378
- let { children: t = "", options: n } = e, r = function(s, c) {
1365
+ let { children: t = "", options: n } = e, o = function(s, c) {
1379
1366
  if (s == null) return {};
1380
1367
  var l, h, d = {}, g = Object.keys(s);
1381
1368
  for (h = 0; h < g.length; h++) c.indexOf(l = g[h]) >= 0 || (d[l] = s[l]);
1382
1369
  return d;
1383
1370
  }(e, co);
1384
- return Y.cloneElement(fi(t, n), r);
1371
+ return Y.cloneElement(fi(t, n), o);
1385
1372
  }, mi = w.div`
1386
1373
  display: flex;
1387
1374
 
1388
- ${({ align: e }) => e === "right" ? z`
1375
+ ${({ align: e }) => e === "right" ? q`
1389
1376
  justify-content: flex-end;
1390
- ` : z`
1377
+ ` : q`
1391
1378
  justify-content: flex-start;
1392
1379
  `}
1393
1380
  `, bn = w.div`
@@ -1401,15 +1388,15 @@ const Ci = (e) => {
1401
1388
  overflow-wrap: break-word;
1402
1389
  box-sizing: border-box;
1403
1390
 
1404
- ${({ align: e }) => e === "right" ? z`
1391
+ ${({ align: e }) => e === "right" ? q`
1405
1392
  text-align: right;
1406
1393
  border-radius: 10px 10px 0px 10px;
1407
- ` : z`
1394
+ ` : q`
1408
1395
  text-align: left;
1409
1396
  border-radius: 10px 10px 10px 0px;
1410
1397
  `}
1411
1398
 
1412
- ${({ align: e }) => e !== "full" ? z`
1399
+ ${({ align: e }) => e !== "full" ? q`
1413
1400
  max-width: 85%;
1414
1401
  ` : ""}
1415
1402
 
@@ -1417,18 +1404,18 @@ const Ci = (e) => {
1417
1404
  background-color: ${({ theme: e, align: t }) => t === "right" ? e.aiChat.userMessages.backgroundColor : e.aiChat.systemMessages.backgroundColor};
1418
1405
  `, ae = ({ align: e, children: t }) => {
1419
1406
  const { themeSettings: n } = R();
1420
- return /* @__PURE__ */ o(mi, { theme: n, align: e, children: /* @__PURE__ */ o(bn, { theme: n, align: e, children: typeof t == "string" ? /* @__PURE__ */ o(Ci, { children: t }) : t }) });
1407
+ return /* @__PURE__ */ r(mi, { theme: n, align: e, children: /* @__PURE__ */ r(bn, { theme: n, align: e, children: typeof t == "string" ? /* @__PURE__ */ r(Ci, { children: t }) : t }) });
1421
1408
  };
1422
1409
  function bi() {
1423
1410
  const { welcomeText: e } = ne();
1424
- return e === !1 ? null : /* @__PURE__ */ o(ae, { align: "left", children: e });
1411
+ return e === !1 ? null : /* @__PURE__ */ r(ae, { align: "left", children: e });
1425
1412
  }
1426
1413
  const yi = w.div`
1427
1414
  display: flex;
1428
1415
 
1429
- ${({ align: e }) => e === "right" ? z`
1416
+ ${({ align: e }) => e === "right" ? q`
1430
1417
  justify-content: flex-end;
1431
- ` : z`
1418
+ ` : q`
1432
1419
  justify-content: flex-start;
1433
1420
  `}
1434
1421
  `, xi = w.button`
@@ -1447,21 +1434,21 @@ const yi = w.div`
1447
1434
  }
1448
1435
  border-radius: 20px;
1449
1436
 
1450
- ${({ align: e }) => e === "right" ? z`
1437
+ ${({ align: e }) => e === "right" ? q`
1451
1438
  text-align: right;
1452
- ` : z`
1439
+ ` : q`
1453
1440
  text-align: left;
1454
1441
  `}
1455
1442
 
1456
- ${({ align: e }) => e !== "full" ? z`
1443
+ ${({ align: e }) => e !== "full" ? q`
1457
1444
  max-width: 382px;
1458
1445
  ` : ""}
1459
1446
 
1460
1447
  ${({ theme: e }) => {
1461
1448
  const { borderGradient: t, borderRadius: n } = e.aiChat.suggestions;
1462
1449
  if (t) {
1463
- const [r, s] = t;
1464
- return z`
1450
+ const [o, s] = t;
1451
+ return q`
1465
1452
  border: none;
1466
1453
  position: relative;
1467
1454
  border-radius: ${n};
@@ -1474,7 +1461,7 @@ const yi = w.div`
1474
1461
  bottom: 0;
1475
1462
  border-radius: ${n};
1476
1463
  border: 1px solid transparent;
1477
- background: linear-gradient(30deg, ${r}, ${s}) border-box;
1464
+ background: linear-gradient(30deg, ${o}, ${s}) border-box;
1478
1465
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
1479
1466
  -webkit-mask-composite: destination-out;
1480
1467
  mask-composite: exclude;
@@ -1488,19 +1475,19 @@ function Fe({
1488
1475
  children: e,
1489
1476
  align: t,
1490
1477
  onClick: n,
1491
- onMouseEnter: r,
1478
+ onMouseEnter: o,
1492
1479
  onMouseLeave: s,
1493
1480
  accessibleName: c
1494
1481
  }) {
1495
1482
  const { themeSettings: l } = R();
1496
- return /* @__PURE__ */ o(yi, { align: t, children: /* @__PURE__ */ o(
1483
+ return /* @__PURE__ */ r(yi, { align: t, children: /* @__PURE__ */ r(
1497
1484
  xi,
1498
1485
  {
1499
1486
  "aria-label": c,
1500
1487
  theme: l,
1501
1488
  onClick: n,
1502
1489
  align: t,
1503
- onMouseEnter: r,
1490
+ onMouseEnter: o,
1504
1491
  onMouseLeave: s,
1505
1492
  children: e
1506
1493
  }
@@ -1509,17 +1496,17 @@ function Fe({
1509
1496
  function vi({ onCancel: e, onConfirm: t }) {
1510
1497
  const { t: n } = N();
1511
1498
  return /* @__PURE__ */ S(j, { children: [
1512
- /* @__PURE__ */ o(ae, { align: "left", children: n("ai.clearHistoryPrompt") }),
1499
+ /* @__PURE__ */ r(ae, { align: "left", children: n("ai.clearHistoryPrompt") }),
1513
1500
  /* @__PURE__ */ S("div", { className: "csdk-flex csdk-gap-x-2", children: [
1514
- /* @__PURE__ */ o(Fe, { align: "right", onClick: t, accessibleName: "confirm clear chat", children: /* @__PURE__ */ o("div", { className: "csdk-py-[6px] csdk-px-[20px]", children: n("ai.buttons.yes") }) }),
1515
- /* @__PURE__ */ o(Fe, { align: "right", onClick: e, accessibleName: "cancel clear chat", children: /* @__PURE__ */ o("div", { className: "csdk-py-[6px] csdk-px-[20px]", children: n("ai.buttons.no") }) })
1501
+ /* @__PURE__ */ r(Fe, { align: "right", onClick: t, accessibleName: "confirm clear chat", children: /* @__PURE__ */ r("div", { className: "csdk-py-[6px] csdk-px-[20px]", children: n("ai.buttons.yes") }) }),
1502
+ /* @__PURE__ */ r(Fe, { align: "right", onClick: e, accessibleName: "cancel clear chat", children: /* @__PURE__ */ r("div", { className: "csdk-py-[6px] csdk-px-[20px]", children: n("ai.buttons.no") }) })
1516
1503
  ] })
1517
1504
  ] });
1518
1505
  }
1519
- var ki = An("toLowerCase");
1506
+ var ki = On("toLowerCase");
1520
1507
  function wi() {
1521
1508
  const { themeSettings: e } = R();
1522
- return /* @__PURE__ */ o("svg", { width: "24", height: "25", viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o(
1509
+ return /* @__PURE__ */ r("svg", { width: "24", height: "25", viewBox: "0 0 24 25", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
1523
1510
  "path",
1524
1511
  {
1525
1512
  fillRule: "evenodd",
@@ -1531,12 +1518,12 @@ function wi() {
1531
1518
  }
1532
1519
  function Si({ onClick: e }) {
1533
1520
  const { t } = N();
1534
- return /* @__PURE__ */ o(Fe, { align: "left", onClick: e, children: /* @__PURE__ */ S(
1521
+ return /* @__PURE__ */ r(Fe, { align: "left", onClick: e, children: /* @__PURE__ */ S(
1535
1522
  "div",
1536
1523
  {
1537
1524
  className: "csdk-py-[5px] csdk-px-2 csdk-flex csdk-items-center csdk-gap-x-1 csdk-select-none",
1538
1525
  children: [
1539
- /* @__PURE__ */ o(wi, {}),
1526
+ /* @__PURE__ */ r(wi, {}),
1540
1527
  t("ai.buttons.insights")
1541
1528
  ]
1542
1529
  }
@@ -1545,9 +1532,9 @@ function Si({ onClick: e }) {
1545
1532
  function $i(e) {
1546
1533
  return Dn("MuiDialog", e);
1547
1534
  }
1548
- const _e = On("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), yn = /* @__PURE__ */ Y.createContext({});
1535
+ const _e = An("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), yn = /* @__PURE__ */ Y.createContext({});
1549
1536
  process.env.NODE_ENV !== "production" && (yn.displayName = "DialogContext");
1550
- const Mi = Ae(qn, {
1537
+ const Mi = Oe(qn, {
1551
1538
  name: "MuiDialog",
1552
1539
  slot: "Backdrop",
1553
1540
  overrides: (e, t) => t.backdrop
@@ -1558,16 +1545,16 @@ const Mi = Ae(qn, {
1558
1545
  const {
1559
1546
  classes: t,
1560
1547
  scroll: n,
1561
- maxWidth: r,
1548
+ maxWidth: o,
1562
1549
  fullWidth: s,
1563
1550
  fullScreen: c
1564
1551
  } = e, l = {
1565
1552
  root: ["root"],
1566
1553
  container: ["container", `scroll${he(n)}`],
1567
- paper: ["paper", `paperScroll${he(n)}`, `paperWidth${he(String(r))}`, s && "paperFullWidth", c && "paperFullScreen"]
1554
+ paper: ["paper", `paperScroll${he(n)}`, `paperWidth${he(String(o))}`, s && "paperFullWidth", c && "paperFullScreen"]
1568
1555
  };
1569
- return Gn(l, $i, t);
1570
- }, Ri = Ae(zn, {
1556
+ return Un(l, $i, t);
1557
+ }, Ri = Oe(zn, {
1571
1558
  name: "MuiDialog",
1572
1559
  slot: "Root",
1573
1560
  overridesResolver: (e, t) => t.root
@@ -1576,7 +1563,7 @@ const Mi = Ae(qn, {
1576
1563
  // Use !important to override the Modal inline-style.
1577
1564
  position: "absolute !important"
1578
1565
  }
1579
- }), Li = Ae("div", {
1566
+ }), Li = Oe("div", {
1580
1567
  name: "MuiDialog",
1581
1568
  slot: "Container",
1582
1569
  overridesResolver: (e, t) => {
@@ -1618,7 +1605,7 @@ const Mi = Ae(qn, {
1618
1605
  }
1619
1606
  }
1620
1607
  }]
1621
- }), Ei = Ae(Dt, {
1608
+ }), Ei = Oe(Dt, {
1622
1609
  name: "MuiDialog",
1623
1610
  slot: "Paper",
1624
1611
  overridesResolver: (e, t) => {
@@ -1711,30 +1698,30 @@ const Mi = Ae(qn, {
1711
1698
  }
1712
1699
  }]
1713
1700
  }))), xn = /* @__PURE__ */ Y.forwardRef(function(t, n) {
1714
- const r = Zn({
1701
+ const o = Zn({
1715
1702
  props: t,
1716
1703
  name: "MuiDialog"
1717
1704
  }), s = jn(), c = {
1718
1705
  enter: s.transitions.duration.enteringScreen,
1719
1706
  exit: s.transitions.duration.leavingScreen
1720
- }, mt = r, {
1707
+ }, mt = o, {
1721
1708
  "aria-describedby": l,
1722
1709
  "aria-labelledby": h,
1723
1710
  "aria-modal": d = !0,
1724
1711
  BackdropComponent: g,
1725
- BackdropProps: m,
1726
- children: x,
1712
+ BackdropProps: b,
1713
+ children: k,
1727
1714
  className: i,
1728
1715
  disableEscapeKeyDown: u = !1,
1729
1716
  fullScreen: a = !1,
1730
1717
  fullWidth: f = !1,
1731
1718
  maxWidth: p = "sm",
1732
- onBackdropClick: b,
1733
- onClick: v,
1734
- onClose: k,
1735
- open: E,
1736
- PaperComponent: T = Dt,
1737
- PaperProps: M = {},
1719
+ onBackdropClick: m,
1720
+ onClick: y,
1721
+ onClose: x,
1722
+ open: L,
1723
+ PaperComponent: M = Dt,
1724
+ PaperProps: T = {},
1738
1725
  scroll: I = "paper",
1739
1726
  slots: B = {},
1740
1727
  slotProps: le = {},
@@ -1765,24 +1752,24 @@ const Mi = Ae(qn, {
1765
1752
  "TransitionComponent",
1766
1753
  "transitionDuration",
1767
1754
  "TransitionProps"
1768
- ]), q = L($({}, r), {
1755
+ ]), D = E($({}, o), {
1769
1756
  disableEscapeKeyDown: u,
1770
1757
  fullScreen: a,
1771
1758
  fullWidth: f,
1772
1759
  maxWidth: p,
1773
1760
  scroll: I
1774
- }), J = Ti(q), P = Y.useRef(), U = (ue) => {
1761
+ }), J = Ti(D), P = Y.useRef(), G = (ue) => {
1775
1762
  P.current = ue.target === ue.currentTarget;
1776
- }, W = (ue) => {
1777
- v && v(ue), P.current && (P.current = null, b && b(ue), k && k(ue, "backdropClick"));
1778
- }, G = Un(h), re = Y.useMemo(() => ({
1779
- titleId: G
1780
- }), [G]), fe = $({
1763
+ }, z = (ue) => {
1764
+ y && y(ue), P.current && (P.current = null, m && m(ue), x && x(ue, "backdropClick"));
1765
+ }, U = Gn(h), re = Y.useMemo(() => ({
1766
+ titleId: U
1767
+ }), [U]), fe = $({
1781
1768
  transition: V
1782
1769
  }, B), de = $({
1783
1770
  transition: Q,
1784
- paper: M,
1785
- backdrop: m
1771
+ paper: T,
1772
+ backdrop: b
1786
1773
  }, le), oe = {
1787
1774
  slots: fe,
1788
1775
  slotProps: de
@@ -1790,37 +1777,37 @@ const Mi = Ae(qn, {
1790
1777
  elementType: Ri,
1791
1778
  shouldForwardComponentProp: !0,
1792
1779
  externalForwardedProps: oe,
1793
- ownerState: q,
1780
+ ownerState: D,
1794
1781
  className: je(J.root, i),
1795
1782
  ref: n
1796
1783
  }), [H, K] = Ce("backdrop", {
1797
1784
  elementType: Mi,
1798
1785
  shouldForwardComponentProp: !0,
1799
1786
  externalForwardedProps: oe,
1800
- ownerState: q
1787
+ ownerState: D
1801
1788
  }), [Le, Ct] = Ce("paper", {
1802
1789
  elementType: Ei,
1803
1790
  shouldForwardComponentProp: !0,
1804
1791
  externalForwardedProps: oe,
1805
- ownerState: q,
1806
- className: je(J.paper, M.className)
1792
+ ownerState: D,
1793
+ className: je(J.paper, T.className)
1807
1794
  }), [Ee, wn] = Ce("container", {
1808
1795
  elementType: Li,
1809
1796
  externalForwardedProps: oe,
1810
- ownerState: q,
1797
+ ownerState: D,
1811
1798
  className: je(J.container)
1812
1799
  }), [Sn, $n] = Ce("transition", {
1813
1800
  elementType: xt,
1814
1801
  externalForwardedProps: oe,
1815
- ownerState: q,
1802
+ ownerState: D,
1816
1803
  additionalProps: {
1817
1804
  appear: !0,
1818
- in: E,
1805
+ in: L,
1819
1806
  timeout: Z,
1820
1807
  role: "presentation"
1821
1808
  }
1822
1809
  });
1823
- return /* @__PURE__ */ me(Te, L($($({
1810
+ return /* @__PURE__ */ me(Te, E($($({
1824
1811
  closeAfterTransition: !0,
1825
1812
  slots: {
1826
1813
  backdrop: H
@@ -1832,25 +1819,25 @@ const Mi = Ae(qn, {
1832
1819
  }, K)
1833
1820
  },
1834
1821
  disableEscapeKeyDown: u,
1835
- onClose: k,
1836
- open: E,
1837
- onClick: W
1822
+ onClose: x,
1823
+ open: L,
1824
+ onClick: z
1838
1825
  }, Re), _), {
1839
- children: /* @__PURE__ */ me(Sn, L($({}, $n), {
1840
- children: /* @__PURE__ */ me(Ee, L($({
1841
- onMouseDown: U
1826
+ children: /* @__PURE__ */ me(Sn, E($({}, $n), {
1827
+ children: /* @__PURE__ */ me(Ee, E($({
1828
+ onMouseDown: G
1842
1829
  }, wn), {
1843
- children: /* @__PURE__ */ me(Le, L($({
1844
- as: T,
1830
+ children: /* @__PURE__ */ me(Le, E($({
1831
+ as: M,
1845
1832
  elevation: 24,
1846
1833
  role: "dialog",
1847
1834
  "aria-describedby": l,
1848
- "aria-labelledby": G,
1835
+ "aria-labelledby": U,
1849
1836
  "aria-modal": d
1850
1837
  }, Ct), {
1851
1838
  children: /* @__PURE__ */ me(yn.Provider, {
1852
1839
  value: re,
1853
- children: x
1840
+ children: k
1854
1841
  })
1855
1842
  }))
1856
1843
  }))
@@ -2022,8 +2009,8 @@ process.env.NODE_ENV !== "production" && (xn.propTypes = {
2022
2009
  });
2023
2010
  function Ii({ fillColor: e = "#262E3D" }) {
2024
2011
  return /* @__PURE__ */ S("svg", { xmlns: "http://www.w3.org/2000/svg", width: "30", height: "30", viewBox: "0 0 30 30", fill: "none", children: [
2025
- /* @__PURE__ */ o("rect", { x: "1", y: "1", width: "28", height: "28", rx: "14", stroke: "#9EA2AB" }),
2026
- /* @__PURE__ */ o(
2012
+ /* @__PURE__ */ r("rect", { x: "1", y: "1", width: "28", height: "28", rx: "14", stroke: "#9EA2AB" }),
2013
+ /* @__PURE__ */ r(
2027
2014
  "path",
2028
2015
  {
2029
2016
  fillRule: "evenodd",
@@ -2131,7 +2118,7 @@ const vn = {
2131
2118
  }
2132
2119
  }));
2133
2120
  function Pi({ fill: e = "rgba(38, 46, 61, 0.67)" }) {
2134
- return /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ o(
2121
+ return /* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ r(
2135
2122
  "path",
2136
2123
  {
2137
2124
  fillRule: "evenodd",
@@ -2142,7 +2129,7 @@ function Pi({ fill: e = "rgba(38, 46, 61, 0.67)" }) {
2142
2129
  ) });
2143
2130
  }
2144
2131
  function Hi({ fill: e = "rgba(38, 46, 61, 0.67)" }) {
2145
- return /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ o(
2132
+ return /* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ r(
2146
2133
  "path",
2147
2134
  {
2148
2135
  fillRule: "evenodd",
@@ -2153,7 +2140,7 @@ function Hi({ fill: e = "rgba(38, 46, 61, 0.67)" }) {
2153
2140
  ) });
2154
2141
  }
2155
2142
  function Bi() {
2156
- return /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ o(
2143
+ return /* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ r(
2157
2144
  "path",
2158
2145
  {
2159
2146
  fillRule: "evenodd",
@@ -2166,24 +2153,24 @@ function Bi() {
2166
2153
  }
2167
2154
  const gt = (e) => Wt(e.chart.backgroundColor), Fi = ({ title: e }) => {
2168
2155
  const { themeSettings: t } = R();
2169
- return /* @__PURE__ */ o($e, { title: e, children: /* @__PURE__ */ o(Me, { disableTouchRipple: !0, $hoverColor: gt(t), children: /* @__PURE__ */ o(Hi, { fill: t.chart.textColor }) }) });
2170
- }, Ai = ({ items: e }) => {
2171
- const [t, n] = O(null), r = (l) => {
2156
+ return /* @__PURE__ */ r($e, { title: e, children: /* @__PURE__ */ r(Me, { disableTouchRipple: !0, $hoverColor: gt(t), children: /* @__PURE__ */ r(Hi, { fill: t.chart.textColor }) }) });
2157
+ }, Oi = ({ items: e }) => {
2158
+ const [t, n] = O(null), o = (l) => {
2172
2159
  n(l.currentTarget);
2173
2160
  }, s = () => {
2174
2161
  n(null);
2175
2162
  }, { themeSettings: c } = R();
2176
2163
  return /* @__PURE__ */ S(j, { children: [
2177
- /* @__PURE__ */ o(
2164
+ /* @__PURE__ */ r(
2178
2165
  Me,
2179
2166
  {
2180
- onClick: r,
2167
+ onClick: o,
2181
2168
  $hoverColor: gt(c),
2182
2169
  "aria-label": "three dots button",
2183
- children: /* @__PURE__ */ o(Vn, { fill: c.chart.textColor })
2170
+ children: /* @__PURE__ */ r(Vn, { fill: c.chart.textColor })
2184
2171
  }
2185
2172
  ),
2186
- /* @__PURE__ */ o(
2173
+ /* @__PURE__ */ r(
2187
2174
  _n,
2188
2175
  {
2189
2176
  anchorEl: t,
@@ -2211,7 +2198,7 @@ const gt = (e) => Wt(e.chart.backgroundColor), Fi = ({ title: e }) => {
2211
2198
  disableRipple: !0,
2212
2199
  children: [
2213
2200
  l.icon,
2214
- /* @__PURE__ */ o("div", { className: "csdk-ml-1", children: l.title })
2201
+ /* @__PURE__ */ r("div", { className: "csdk-ml-1", children: l.title })
2215
2202
  ]
2216
2203
  },
2217
2204
  l.title
@@ -2219,9 +2206,9 @@ const gt = (e) => Wt(e.chart.backgroundColor), Fi = ({ title: e }) => {
2219
2206
  }
2220
2207
  )
2221
2208
  ] });
2222
- }, Oi = ({ onClick: e }) => {
2209
+ }, Ai = ({ onClick: e }) => {
2223
2210
  const { themeSettings: t } = R(), { t: n } = N();
2224
- return /* @__PURE__ */ o($e, { title: n("ai.preview"), children: /* @__PURE__ */ o(Me, { onClick: e, $hoverColor: gt(t), children: /* @__PURE__ */ o(Pi, { fill: t.chart.textColor }) }) });
2211
+ return /* @__PURE__ */ r($e, { title: n("ai.preview"), children: /* @__PURE__ */ r(Me, { onClick: e, $hoverColor: gt(t), children: /* @__PURE__ */ r(Pi, { fill: t.chart.textColor }) }) });
2225
2212
  }, Di = w.div`
2226
2213
  display: flex;
2227
2214
  padding-top: 6px;
@@ -2232,31 +2219,31 @@ function qi({
2232
2219
  onRefresh: t,
2233
2220
  onExpand: n
2234
2221
  }) {
2235
- const r = D(
2222
+ const o = A(
2236
2223
  () => [
2237
2224
  {
2238
2225
  title: "Refresh",
2239
2226
  onClick: t,
2240
- icon: /* @__PURE__ */ o(Bi, {})
2227
+ icon: /* @__PURE__ */ r(Bi, {})
2241
2228
  }
2242
2229
  ],
2243
2230
  [t]
2244
2231
  );
2245
2232
  return /* @__PURE__ */ S(Di, { "aria-label": "chatbot chart toolbar", children: [
2246
- /* @__PURE__ */ o(Fi, { title: e != null ? e : "" }),
2247
- /* @__PURE__ */ o(Ai, { items: r }),
2248
- /* @__PURE__ */ o(Oi, { onClick: n })
2233
+ /* @__PURE__ */ r(Fi, { title: e != null ? e : "" }),
2234
+ /* @__PURE__ */ r(Oi, { items: o }),
2235
+ /* @__PURE__ */ r(Ai, { onClick: n })
2249
2236
  ] });
2250
2237
  }
2251
2238
  function zi({ content: e }) {
2252
- const [t, n] = O(!1), { themeSettings: r } = R(), { inlineElement: s, expandedElement: c } = D(() => {
2253
- const l = Oe(e, { useCustomizedStyleOptions: !0 });
2239
+ const [t, n] = O(!1), { themeSettings: o } = R(), { inlineElement: s, expandedElement: c } = A(() => {
2240
+ const l = Ae(e, { useCustomizedStyleOptions: !0 });
2254
2241
  if (l === void 0 || !He(l))
2255
2242
  throw new Ke("errors.otherWidgetTypesNotSupported");
2256
2243
  const { detailedDescription: h } = e, { styleOptions: d } = l, g = {
2257
2244
  cornerRadius: "Small",
2258
2245
  header: {
2259
- renderToolbar: (i) => /* @__PURE__ */ o(
2246
+ renderToolbar: (i) => /* @__PURE__ */ r(
2260
2247
  qi,
2261
2248
  {
2262
2249
  infoTooltipText: h,
@@ -2266,25 +2253,25 @@ function zi({ content: e }) {
2266
2253
  )
2267
2254
  }
2268
2255
  };
2269
- let m, x;
2256
+ let b, k;
2270
2257
  if (hr(l.chartType))
2271
- m = /* @__PURE__ */ o("div", { className: "csdk-h-[245px]", children: /* @__PURE__ */ o(xe, L($({}, l), { styleOptions: g })) }), x = /* @__PURE__ */ o(xe, L($({}, l), { styleOptions: { header: { hidden: !0 } } }));
2258
+ b = /* @__PURE__ */ r("div", { className: "csdk-h-[245px]", children: /* @__PURE__ */ r(xe, E($({}, l), { styleOptions: g })) }), k = /* @__PURE__ */ r(xe, E($({}, l), { styleOptions: { header: { hidden: !0 } } }));
2272
2259
  else {
2273
- const i = L($({}, d), {
2260
+ const i = E($({}, d), {
2274
2261
  header: { hidden: !0 }
2275
- }), u = $(L($({}, d), {
2262
+ }), u = $(E($({}, d), {
2276
2263
  legend: void 0,
2277
2264
  xAxis: void 0,
2278
2265
  yAxis: void 0
2279
2266
  }), g);
2280
- delete u.legend, delete u.xAxis, delete u.yAxis, m = /* @__PURE__ */ o("div", { children: /* @__PURE__ */ o(xe, L($({}, l), { styleOptions: u })) }), x = /* @__PURE__ */ o(
2267
+ delete u.legend, delete u.xAxis, delete u.yAxis, b = /* @__PURE__ */ r("div", { children: /* @__PURE__ */ r(xe, E($({}, l), { styleOptions: u })) }), k = /* @__PURE__ */ r(
2281
2268
  xe,
2282
- L($({}, l), {
2269
+ E($({}, l), {
2283
2270
  styleOptions: $({ cornerRadius: "None" }, i)
2284
2271
  })
2285
2272
  );
2286
2273
  }
2287
- return { inlineElement: m, expandedElement: x };
2274
+ return { inlineElement: b, expandedElement: k };
2288
2275
  }, [e]);
2289
2276
  return /* @__PURE__ */ S(j, { children: [
2290
2277
  s,
@@ -2297,23 +2284,23 @@ function zi({ content: e }) {
2297
2284
  fullWidth: !0,
2298
2285
  PaperProps: {
2299
2286
  sx: {
2300
- backgroundColor: r.chart.backgroundColor,
2301
- color: r.aiChat.primaryTextColor
2287
+ backgroundColor: o.chart.backgroundColor,
2288
+ color: o.aiChat.primaryTextColor
2302
2289
  }
2303
2290
  },
2304
2291
  children: [
2305
2292
  /* @__PURE__ */ S("div", { className: "csdk-flex csdk-items-center csdk-justify-between csdk-mt-[16px] csdk-mx-[16px] csdk-pl-[20px]", children: [
2306
- /* @__PURE__ */ o("div", { className: "csdk-text-ai-lg csdk-semibold", children: e.queryTitle }),
2307
- /* @__PURE__ */ o(qt, { onClick: () => n(!1), "aria-label": "close expanded chart", children: /* @__PURE__ */ o(Ii, { fillColor: r.aiChat.primaryTextColor }) })
2293
+ /* @__PURE__ */ r("div", { className: "csdk-text-ai-lg csdk-semibold", children: e.queryTitle }),
2294
+ /* @__PURE__ */ r(qt, { onClick: () => n(!1), "aria-label": "close expanded chart", children: /* @__PURE__ */ r(Ii, { fillColor: o.aiChat.primaryTextColor }) })
2308
2295
  ] }),
2309
- /* @__PURE__ */ o("div", { className: "csdk-h-screen csdk-mt-[8px] csdk-mb-[24px] csdk-mx-[16px]", children: c })
2296
+ /* @__PURE__ */ r("div", { className: "csdk-h-screen csdk-mt-[8px] csdk-mb-[24px] csdk-mx-[16px]", children: c })
2310
2297
  ]
2311
2298
  }
2312
2299
  )
2313
2300
  ] });
2314
2301
  }
2315
2302
  function Wi({ theme: e }) {
2316
- return /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ o(
2303
+ return /* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ r(
2317
2304
  "path",
2318
2305
  {
2319
2306
  fillRule: "evenodd",
@@ -2324,20 +2311,20 @@ function Wi({ theme: e }) {
2324
2311
  ) });
2325
2312
  }
2326
2313
  function Zi({ onClick: e, disabled: t }) {
2327
- const { themeSettings: n } = R(), { t: r } = N();
2328
- return /* @__PURE__ */ o($e, { title: r("ai.buttons.incorrectResponse"), children: /* @__PURE__ */ o(
2314
+ const { themeSettings: n } = R(), { t: o } = N();
2315
+ return /* @__PURE__ */ r($e, { title: o("ai.buttons.incorrectResponse"), children: /* @__PURE__ */ r(
2329
2316
  Me,
2330
2317
  {
2331
2318
  "aria-label": "thumbs-down",
2332
2319
  onClick: e,
2333
2320
  $hoverColor: n.aiChat.icons.feedbackIcons.hoverColor,
2334
2321
  disabled: t,
2335
- children: /* @__PURE__ */ o(Wi, { theme: n })
2322
+ children: /* @__PURE__ */ r(Wi, { theme: n })
2336
2323
  }
2337
2324
  ) });
2338
2325
  }
2339
2326
  function ji({ theme: e }) {
2340
- return /* @__PURE__ */ o("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ o(
2327
+ return /* @__PURE__ */ r("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ r(
2341
2328
  "path",
2342
2329
  {
2343
2330
  fillRule: "evenodd",
@@ -2347,66 +2334,66 @@ function ji({ theme: e }) {
2347
2334
  }
2348
2335
  ) });
2349
2336
  }
2350
- function Ui({ onClick: e, disabled: t }) {
2351
- const { themeSettings: n } = R(), { t: r } = N();
2352
- return /* @__PURE__ */ o($e, { title: r("ai.buttons.correctResponse"), children: /* @__PURE__ */ o(
2337
+ function Gi({ onClick: e, disabled: t }) {
2338
+ const { themeSettings: n } = R(), { t: o } = N();
2339
+ return /* @__PURE__ */ r($e, { title: o("ai.buttons.correctResponse"), children: /* @__PURE__ */ r(
2353
2340
  Me,
2354
2341
  {
2355
2342
  "aria-label": "thumbs-up",
2356
2343
  onClick: e,
2357
2344
  $hoverColor: n.aiChat.icons.feedbackIcons.hoverColor,
2358
2345
  disabled: t,
2359
- children: /* @__PURE__ */ o(ji, { theme: n })
2346
+ children: /* @__PURE__ */ r(ji, { theme: n })
2360
2347
  }
2361
2348
  ) });
2362
2349
  }
2363
- const Gi = w.div`
2350
+ const Ui = w.div`
2364
2351
  display: flex;
2365
2352
  flex-direction: column;
2366
2353
  row-gap: ${({ theme: e }) => e.aiChat.body.gapBetweenMessages};
2367
2354
  `;
2368
2355
  function Vi({ visible: e, onSend: t }) {
2369
- const [n, r] = O(!1), s = F(
2356
+ const [n, o] = O(!1), s = F(
2370
2357
  (l) => {
2371
- r(!0), t(l === "up" ? 1 : -1);
2358
+ o(!0), t(l === "up" ? 1 : -1);
2372
2359
  },
2373
2360
  [t]
2374
2361
  ), c = `csdk-transition-opacity csdk-delay-150 csdk-duration-500 ${n ? "csdk-opacity-0" : "csdk-opacity-100"}`;
2375
2362
  return e ? /* @__PURE__ */ S("div", { className: `csdk-flex csdk-items-center ${c}`, children: [
2376
- /* @__PURE__ */ o(Ui, { onClick: () => s("up"), disabled: n }),
2377
- /* @__PURE__ */ o(Zi, { onClick: () => s("down"), disabled: n })
2363
+ /* @__PURE__ */ r(Gi, { onClick: () => s("up"), disabled: n }),
2364
+ /* @__PURE__ */ r(Zi, { onClick: () => s("down"), disabled: n })
2378
2365
  ] }) : null;
2379
2366
  }
2380
2367
  function et({
2381
2368
  sourceId: e,
2382
2369
  data: t,
2383
2370
  type: n,
2384
- buttonVisibility: r = "onHover",
2371
+ buttonVisibility: o = "onHover",
2385
2372
  renderContent: s
2386
2373
  }) {
2387
2374
  const c = te(), l = Kn(
2388
2375
  F(
2389
- (x) => {
2376
+ (k) => {
2390
2377
  c && c.ai.sendFeedback({
2391
2378
  sourceId: e,
2392
2379
  type: n,
2393
2380
  data: t,
2394
- rating: x
2381
+ rating: k
2395
2382
  });
2396
2383
  },
2397
2384
  [c, e, t, n]
2398
2385
  ),
2399
2386
  200
2400
- ), [h, d] = Xn(), g = D(() => r === "onHover" ? d : r !== "never", [d, r]), { themeSettings: m } = R();
2401
- return /* @__PURE__ */ o(Gi, { ref: h, theme: m, children: s(/* @__PURE__ */ o(Vi, { onSend: l, visible: g })) });
2387
+ ), [h, d] = Xn(), g = A(() => o === "onHover" ? d : o !== "never", [d, o]), { themeSettings: b } = R();
2388
+ return /* @__PURE__ */ r(Ui, { ref: h, theme: b, children: s(/* @__PURE__ */ r(Vi, { onSend: l, visible: g })) });
2402
2389
  }
2403
2390
  const Qi = 18, _i = 5, Et = Qi * _i;
2404
2391
  function ft({ text: e }) {
2405
- const [t, n] = O(!0), [r, s] = O(!1), { t: c } = N(), l = ve(null);
2392
+ const [t, n] = O(!0), [o, s] = O(!1), { t: c } = N(), l = ve(null);
2406
2393
  return Be(() => {
2407
2394
  l.current && s(l.current.scrollHeight > Et);
2408
2395
  }, [e]), /* @__PURE__ */ S("div", { className: "csdk-min-w-0 csdk-flex-1", children: [
2409
- /* @__PURE__ */ o(
2396
+ /* @__PURE__ */ r(
2410
2397
  "div",
2411
2398
  {
2412
2399
  ref: l,
@@ -2415,7 +2402,7 @@ function ft({ text: e }) {
2415
2402
  children: e
2416
2403
  }
2417
2404
  ),
2418
- r && /* @__PURE__ */ o("div", { className: "csdk-mt-3 csdk-flex csdk-justify-end", children: /* @__PURE__ */ o(
2405
+ o && /* @__PURE__ */ r("div", { className: "csdk-mt-3 csdk-flex csdk-justify-end", children: /* @__PURE__ */ r(
2419
2406
  "div",
2420
2407
  {
2421
2408
  className: "csdk-text-ai-xs csdk-text-text-link csdk-cursor-pointer",
@@ -2426,8 +2413,8 @@ function ft({ text: e }) {
2426
2413
  ] });
2427
2414
  }
2428
2415
  function Ki({ nlgRequest: e }) {
2429
- const { data: t, isLoading: n, isError: r } = De(e), { t: s } = N();
2430
- return n ? /* @__PURE__ */ o(ut, {}) : r ? /* @__PURE__ */ o(ae, { align: "left", children: s("ai.errors.unexpected") }) : /* @__PURE__ */ o(ae, { align: "full", children: /* @__PURE__ */ o(ft, { text: t != null ? t : s("ai.errors.insightsNotAvailable") }) });
2416
+ const { data: t, isLoading: n, isError: o } = De(e), { t: s } = N();
2417
+ return n ? /* @__PURE__ */ r(ut, {}) : o ? /* @__PURE__ */ r(ae, { align: "left", children: s("ai.errors.unexpected") }) : /* @__PURE__ */ r(ae, { align: "full", children: /* @__PURE__ */ r(ft, { text: t != null ? t : s("ai.errors.insightsNotAvailable") }) });
2431
2418
  }
2432
2419
  const It = w.div`
2433
2420
  display: flex;
@@ -2435,50 +2422,50 @@ const It = w.div`
2435
2422
  column-gap: 10px;
2436
2423
  `, Xi = (e) => !!e && "aeiou".includes(e[0]);
2437
2424
  function Yi({ data: e, alwaysShowFeedback: t }) {
2438
- const { chatMode: n = "analyze", enableInsights: r } = ne(), { themeSettings: s } = R(), { queryTitle: c, chartRecommendations: l, jaql: h, userMsg: d, clarification: g = "" } = e;
2425
+ const { chatMode: n = "analyze", enableInsights: o } = ne(), { themeSettings: s } = R(), { queryTitle: c, chartRecommendations: l, jaql: h, userMsg: d, clarification: g = "" } = e;
2439
2426
  console.debug(`JAQL for ${c}`, h), console.debug(`chart recommendations for ${c}`, l);
2440
- const m = "chartType" in l ? l.chartType : "table";
2441
- let x;
2442
- Xi(m) ? x = `an ${m}` : x = `a ${m}`, m !== "table" && (x += " chart");
2427
+ const b = "chartType" in l ? l.chartType : "table";
2428
+ let k;
2429
+ Xi(b) ? k = `an ${b}` : k = `a ${b}`, b !== "table" && (k += " chart");
2443
2430
  const i = h.datasource.title, [u, a] = O(!1), f = F(() => {
2444
- a((k) => !k);
2431
+ a((x) => !x);
2445
2432
  }, []), p = {
2446
2433
  jaql: {
2447
2434
  datasource: h.datasource,
2448
2435
  metadata: h.metadata
2449
2436
  }
2450
- }, b = n === "analyze", v = `${d}${d && g ? `
2437
+ }, m = n === "analyze", y = `${d}${d && g ? `
2451
2438
  ` : ""}${g}`;
2452
2439
  return /* @__PURE__ */ S(j, { children: [
2453
- /* @__PURE__ */ o(
2440
+ /* @__PURE__ */ r(
2454
2441
  et,
2455
2442
  {
2456
2443
  sourceId: i,
2457
2444
  data: e,
2458
2445
  type: "chats/nlq",
2459
2446
  buttonVisibility: t ? "always" : "onHover",
2460
- renderContent: (k) => /* @__PURE__ */ S(j, { children: [
2447
+ renderContent: (x) => /* @__PURE__ */ S(j, { children: [
2461
2448
  /* @__PURE__ */ S(It, { children: [
2462
- /* @__PURE__ */ o(bn, { align: "left", theme: s, children: v || `Here's ${x} showing ${ki(c)}.` }),
2463
- k
2449
+ /* @__PURE__ */ r(bn, { align: "left", theme: s, children: y || `Here's ${k} showing ${ki(c)}.` }),
2450
+ x
2464
2451
  ] }),
2465
- b && /* @__PURE__ */ o(zi, { content: e })
2452
+ m && /* @__PURE__ */ r(zi, { content: e })
2466
2453
  ] })
2467
2454
  }
2468
2455
  ),
2469
- r && /* @__PURE__ */ o(
2456
+ o && /* @__PURE__ */ r(
2470
2457
  et,
2471
2458
  {
2472
2459
  sourceId: i,
2473
2460
  data: p,
2474
2461
  type: "nlg/queryResult",
2475
2462
  buttonVisibility: u ? "onHover" : "never",
2476
- renderContent: (k) => /* @__PURE__ */ S(j, { children: [
2463
+ renderContent: (x) => /* @__PURE__ */ S(j, { children: [
2477
2464
  /* @__PURE__ */ S(It, { children: [
2478
- /* @__PURE__ */ o(Si, { onClick: f }),
2479
- k
2465
+ /* @__PURE__ */ r(Si, { onClick: f }),
2466
+ x
2480
2467
  ] }),
2481
- u && /* @__PURE__ */ o(Ki, { nlgRequest: p })
2468
+ u && /* @__PURE__ */ r(Ki, { nlgRequest: p })
2482
2469
  ] })
2483
2470
  }
2484
2471
  )
@@ -2486,31 +2473,31 @@ function Yi({ data: e, alwaysShowFeedback: t }) {
2486
2473
  }
2487
2474
  function Ji({ message: e, isLastMessage: t }) {
2488
2475
  if (dt(e)) {
2489
- const r = JSON.parse(e.content);
2490
- return /* @__PURE__ */ o(Yi, { data: r, alwaysShowFeedback: t });
2476
+ const o = JSON.parse(e.content);
2477
+ return /* @__PURE__ */ r(Yi, { data: o, alwaysShowFeedback: t });
2491
2478
  }
2492
2479
  const n = Nr(e) ? JSON.parse(e.content).answer : e.content;
2493
- return /* @__PURE__ */ o(ae, { align: e.role === "user" ? "right" : "left", children: n });
2480
+ return /* @__PURE__ */ r(ae, { align: e.role === "user" ? "right" : "left", children: n });
2494
2481
  }
2495
2482
  const e1 = Zt(Ji), t1 = ({
2496
2483
  error: e,
2497
2484
  displayMessage: t
2498
- }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ o(ae, { align: "left", children: t }));
2485
+ }) => (console.debug("Unexpected error occurred when resolving a chat message:", e), /* @__PURE__ */ r(ae, { align: "left", children: t }));
2499
2486
  function n1({ messages: e }) {
2500
2487
  const { t } = N();
2501
- return /* @__PURE__ */ o(j, { children: e.map((n, r) => /* @__PURE__ */ o(
2488
+ return /* @__PURE__ */ r(j, { children: e.map((n, o) => /* @__PURE__ */ r(
2502
2489
  Yn,
2503
2490
  {
2504
- fallbackRender: (s) => t1(L($({}, s), {
2491
+ fallbackRender: (s) => t1(E($({}, s), {
2505
2492
  displayMessage: t("ai.errors.unexpected")
2506
2493
  })),
2507
- children: /* @__PURE__ */ o(e1, { message: n, isLastMessage: r === e.length - 1 }, r)
2494
+ children: /* @__PURE__ */ r(e1, { message: n, isLastMessage: o === e.length - 1 }, o)
2508
2495
  },
2509
- r
2496
+ o
2510
2497
  )) });
2511
2498
  }
2512
2499
  function kn({ color: e }) {
2513
- return /* @__PURE__ */ o(
2500
+ return /* @__PURE__ */ r(
2514
2501
  "svg",
2515
2502
  {
2516
2503
  width: "100%",
@@ -2518,7 +2505,7 @@ function kn({ color: e }) {
2518
2505
  viewBox: "0 0 4 8",
2519
2506
  fill: "none",
2520
2507
  xmlns: "http://www.w3.org/2000/svg",
2521
- children: /* @__PURE__ */ o(
2508
+ children: /* @__PURE__ */ r(
2522
2509
  "path",
2523
2510
  {
2524
2511
  d: "M3.87815 0.825307C4.05781 0.615598 4.03345 0.299954 3.82374 0.120297C3.61403 -0.05936 3.29838 -0.034998 3.11873 0.174711L0.120288 3.67471C-0.040096 3.86192 -0.040096 4.1381 0.120288 4.32531L3.11873 7.82531C3.29838 8.03502 3.61403 8.05938 3.82374 7.87972C4.03345 7.70006 4.05781 7.38442 3.87815 7.17471L1.15839 4.00001L3.87815 0.825307Z",
@@ -2529,19 +2516,19 @@ function kn({ color: e }) {
2529
2516
  );
2530
2517
  }
2531
2518
  function r1({ onClick: e, color: t }) {
2532
- return /* @__PURE__ */ o(
2519
+ return /* @__PURE__ */ r(
2533
2520
  "div",
2534
2521
  {
2535
2522
  "aria-label": "go back",
2536
2523
  className: "csdk-w-5 csdk-h-5 csdk-flex csdk-p-[4px] csdk-ml-[6px] csdk-cursor-pointer",
2537
2524
  onClick: e,
2538
- children: /* @__PURE__ */ o(kn, { color: t })
2525
+ children: /* @__PURE__ */ r(kn, { color: t })
2539
2526
  }
2540
2527
  );
2541
2528
  }
2542
2529
  function o1() {
2543
2530
  const { themeSettings: e } = R();
2544
- return /* @__PURE__ */ o("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ o(
2531
+ return /* @__PURE__ */ r("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ r(
2545
2532
  "path",
2546
2533
  {
2547
2534
  fillRule: "evenodd",
@@ -2573,8 +2560,8 @@ const i1 = (e, t) => {
2573
2560
  box-shadow: none;
2574
2561
  `, a1 = ({ onClick: e }) => {
2575
2562
  const { themeSettings: t } = R();
2576
- return /* @__PURE__ */ o(s1, { theme: t, onClick: e, children: /* @__PURE__ */ o(o1, {}) });
2577
- }, l1 = ({ isVisible: e, onClick: t, anchorElement: n }) => /* @__PURE__ */ o(Ot, { anchorEl: n, open: e, placement: "top", sx: { zIndex: 2 }, children: /* @__PURE__ */ o(a1, { onClick: t }) }), c1 = w.button`
2563
+ return /* @__PURE__ */ r(s1, { theme: t, onClick: e, children: /* @__PURE__ */ r(o1, {}) });
2564
+ }, l1 = ({ isVisible: e, onClick: t, anchorElement: n }) => /* @__PURE__ */ r(At, { anchorEl: n, open: e, placement: "top", sx: { zIndex: 2 }, children: /* @__PURE__ */ r(a1, { onClick: t }) }), c1 = w.button`
2578
2565
  font-size: inherit;
2579
2566
  line-height: inherit;
2580
2567
  box-sizing: border-box;
@@ -2600,8 +2587,8 @@ const i1 = (e, t) => {
2600
2587
  ${({ theme: e }) => {
2601
2588
  const { borderGradient: t, borderRadius: n } = e.aiChat.suggestions;
2602
2589
  if (t) {
2603
- const [r, s] = t;
2604
- return z`
2590
+ const [o, s] = t;
2591
+ return q`
2605
2592
  border: none;
2606
2593
  position: relative;
2607
2594
  border-radius: ${n};
@@ -2614,7 +2601,7 @@ const i1 = (e, t) => {
2614
2601
  bottom: 0;
2615
2602
  border-radius: ${n};
2616
2603
  border: 1px solid transparent;
2617
- background: linear-gradient(30deg, ${r}, ${s}) border-box;
2604
+ background: linear-gradient(30deg, ${o}, ${s}) border-box;
2618
2605
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
2619
2606
  -webkit-mask-composite: destination-out;
2620
2607
  mask-composite: exclude;
@@ -2626,7 +2613,7 @@ const i1 = (e, t) => {
2626
2613
  `;
2627
2614
  function Nt({ question: e, onClick: t }) {
2628
2615
  const { themeSettings: n } = R();
2629
- return /* @__PURE__ */ o(c1, { onClick: t, theme: n, children: e });
2616
+ return /* @__PURE__ */ r(c1, { onClick: t, theme: n, children: e });
2630
2617
  }
2631
2618
  const d1 = w.div`
2632
2619
  display: flex;
@@ -2635,10 +2622,10 @@ const d1 = w.div`
2635
2622
  row-gap: ${({ theme: e }) => e.aiChat.suggestions.gap};
2636
2623
  `;
2637
2624
  function u1({ questions: e, onSelection: t }) {
2638
- const { t: n } = N(), [r, s] = O(!0), c = D(() => r && e.length > 5 ? e.slice(0, 4) : e, [e, r]), { themeSettings: l } = R();
2625
+ const { t: n } = N(), [o, s] = O(!0), c = A(() => o && e.length > 5 ? e.slice(0, 4) : e, [e, o]), { themeSettings: l } = R();
2639
2626
  return /* @__PURE__ */ S(d1, { "aria-label": "list of suggested questions", theme: l, children: [
2640
- c.map((h) => /* @__PURE__ */ o(Nt, { question: h, onClick: () => t(h) }, h)),
2641
- c.length < e.length && /* @__PURE__ */ o(Nt, { question: n("ai.buttons.seeMore"), onClick: () => s(!1) })
2627
+ c.map((h) => /* @__PURE__ */ r(Nt, { question: h, onClick: () => t(h) }, h)),
2628
+ c.length < e.length && /* @__PURE__ */ r(Nt, { question: n("ai.buttons.seeMore"), onClick: () => s(!1) })
2642
2629
  ] });
2643
2630
  }
2644
2631
  const h1 = w.div`
@@ -2672,13 +2659,13 @@ const h1 = w.div`
2672
2659
  `;
2673
2660
  function g1() {
2674
2661
  const { themeSettings: e } = R();
2675
- return /* @__PURE__ */ o(p1, { children: Array.from({ length: 3 }, (t, n) => /* @__PURE__ */ o(h1, { theme: e }, n)) });
2662
+ return /* @__PURE__ */ r(p1, { children: Array.from({ length: 3 }, (t, n) => /* @__PURE__ */ r(h1, { theme: e }, n)) });
2676
2663
  }
2677
2664
  function f1({ questions: e, isLoading: t, onSelection: n }) {
2678
- const r = e.length > 0, { suggestionsWelcomeText: s } = ne();
2679
- return t ? /* @__PURE__ */ o(g1, {}) : r ? /* @__PURE__ */ S(j, { children: [
2680
- s && /* @__PURE__ */ o(ae, { align: "left", children: s }),
2681
- /* @__PURE__ */ o(u1, { onSelection: n, questions: e })
2665
+ const o = e.length > 0, { suggestionsWelcomeText: s } = ne();
2666
+ return t ? /* @__PURE__ */ r(g1, {}) : o ? /* @__PURE__ */ S(j, { children: [
2667
+ s && /* @__PURE__ */ r(ae, { align: "left", children: s }),
2668
+ /* @__PURE__ */ r(u1, { onSelection: n, questions: e })
2682
2669
  ] }) : null;
2683
2670
  }
2684
2671
  const C1 = w.div`
@@ -2707,34 +2694,34 @@ const C1 = w.div`
2707
2694
  `;
2708
2695
  function y1({ contextTitle: e, onGoBack: t, contextDetails: n }) {
2709
2696
  var de, oe, Te, Re;
2710
- const { t: r } = N(), {
2697
+ const { t: o } = N(), {
2711
2698
  enableFollowupQuestions: s,
2712
2699
  enableHeader: c,
2713
2700
  numOfRecentPrompts: l,
2714
2701
  numOfRecommendations: h,
2715
2702
  customPrompt: d
2716
- } = ne(), { themeSettings: g } = R(), { quotaState: m } = Jn(), {
2717
- data: x,
2703
+ } = ne(), { themeSettings: g } = R(), { quotaState: b } = Jn(), {
2704
+ data: k,
2718
2705
  isLoading: i,
2719
2706
  isError: u
2720
2707
  } = Vt({
2721
2708
  contextTitle: e,
2722
2709
  count: h,
2723
2710
  customPrompt: d
2724
- }), a = D(
2725
- () => x == null ? void 0 : x.map((H) => H.nlqPrompt),
2726
- [x]
2711
+ }), a = A(
2712
+ () => k == null ? void 0 : k.map((H) => H.nlqPrompt),
2713
+ [k]
2727
2714
  ), {
2728
2715
  history: f,
2729
2716
  lastNlqResponse: p,
2730
- isAwaitingResponse: b,
2731
- sendMessage: v,
2732
- isLoading: k,
2733
- chatId: E,
2734
- lastError: T
2735
- } = Pr(e, n), M = b || k || ((de = m == null ? void 0 : m.isExceeded) != null ? de : !1), { mutate: I, isLoading: B } = Kt(E), [le, V] = O(!1), [Z, Q] = O(!1), _ = () => V(!0), q = () => V(!1), J = () => {
2736
- I(), q();
2737
- }, P = ve(null), U = ve(null), W = () => {
2717
+ isAwaitingResponse: m,
2718
+ sendMessage: y,
2719
+ isLoading: x,
2720
+ chatId: L,
2721
+ lastError: M
2722
+ } = Pr(e, n), T = m || x || ((de = b == null ? void 0 : b.isExceeded) != null ? de : !1), { mutate: I, isLoading: B } = Kt(L), [le, V] = O(!1), [Z, Q] = O(!1), _ = () => V(!0), D = () => V(!1), J = () => {
2723
+ I(), D();
2724
+ }, P = ve(null), G = ve(null), z = () => {
2738
2725
  if (!(P != null && P.current)) return;
2739
2726
  const { scrollTop: H, clientHeight: K, scrollHeight: Le } = P.current;
2740
2727
  if (H === void 0 || K === void 0 || Le === void 0) return;
@@ -2743,16 +2730,16 @@ function y1({ contextTitle: e, onGoBack: t, contextDetails: n }) {
2743
2730
  };
2744
2731
  Be(() => {
2745
2732
  P.current && (P.current.scrollTop = P.current.scrollHeight);
2746
- }, [f, le, b]);
2747
- const G = ve(null), re = c ? /* @__PURE__ */ o(
2733
+ }, [f, le, m]);
2734
+ const U = ve(null), re = c ? /* @__PURE__ */ r(
2748
2735
  Jt,
2749
2736
  {
2750
- ref: G,
2737
+ ref: U,
2751
2738
  title: e,
2752
- leftNav: t && /* @__PURE__ */ o(r1, { onClick: t, color: g.aiChat.header.textColor }),
2739
+ leftNav: t && /* @__PURE__ */ r(r1, { onClick: t, color: g.aiChat.header.textColor }),
2753
2740
  style: g.aiChat.header
2754
2741
  }
2755
- ) : null, fe = D(
2742
+ ) : null, fe = A(
2756
2743
  () => [
2757
2744
  ...new Set(
2758
2745
  f.filter((H) => H.role === "user").filter((H) => !(a != null && a.includes(H.content))).map((H) => H.content).reverse()
@@ -2760,18 +2747,18 @@ function y1({ contextTitle: e, onGoBack: t, contextDetails: n }) {
2760
2747
  ].slice(0, l),
2761
2748
  [f, l, a]
2762
2749
  );
2763
- return (T == null ? void 0 : T.message) === r("ai.errors.chatUnavailable") ? /* @__PURE__ */ S(j, { children: [
2750
+ return (M == null ? void 0 : M.message) === o("ai.errors.chatUnavailable") ? /* @__PURE__ */ S(j, { children: [
2764
2751
  c && re,
2765
- /* @__PURE__ */ o(Yt, { text: T.message })
2752
+ /* @__PURE__ */ r(Yt, { text: M.message })
2766
2753
  ] }) : /* @__PURE__ */ S(j, { children: [
2767
2754
  re,
2768
- /* @__PURE__ */ o(er, {}),
2769
- /* @__PURE__ */ S(C1, { ref: P, theme: g, onScroll: W, children: [
2770
- /* @__PURE__ */ o(
2755
+ /* @__PURE__ */ r(er, {}),
2756
+ /* @__PURE__ */ S(C1, { ref: P, theme: g, onScroll: z, children: [
2757
+ /* @__PURE__ */ r(
2771
2758
  l1,
2772
2759
  {
2773
2760
  isVisible: Z,
2774
- anchorElement: U.current,
2761
+ anchorElement: G.current,
2775
2762
  onClick: () => {
2776
2763
  var H, K;
2777
2764
  (K = P.current) == null || K.scroll({
@@ -2781,52 +2768,52 @@ function y1({ contextTitle: e, onGoBack: t, contextDetails: n }) {
2781
2768
  }
2782
2769
  }
2783
2770
  ),
2784
- /* @__PURE__ */ o(bi, {}),
2785
- /* @__PURE__ */ o(
2771
+ /* @__PURE__ */ r(bi, {}),
2772
+ /* @__PURE__ */ r(
2786
2773
  f1,
2787
2774
  {
2788
2775
  questions: a || [],
2789
2776
  isLoading: i,
2790
- onSelection: v
2777
+ onSelection: y
2791
2778
  }
2792
2779
  ),
2793
- T && /* @__PURE__ */ o(ae, { align: "left", children: T.message }),
2794
- k ? /* @__PURE__ */ o(qe, {}) : /* @__PURE__ */ o(n1, { messages: f }),
2795
- s && p && ((Te = (oe = p.followupQuestions) == null ? void 0 : oe.length) != null ? Te : 0) > 0 && /* @__PURE__ */ o(b1, { theme: g, children: (Re = p.followupQuestions) == null ? void 0 : Re.slice(0, 2).map((H, K) => /* @__PURE__ */ o(
2780
+ M && /* @__PURE__ */ r(ae, { align: "left", children: M.message }),
2781
+ x ? /* @__PURE__ */ r(qe, {}) : /* @__PURE__ */ r(n1, { messages: f }),
2782
+ s && p && ((Te = (oe = p.followupQuestions) == null ? void 0 : oe.length) != null ? Te : 0) > 0 && /* @__PURE__ */ r(b1, { theme: g, children: (Re = p.followupQuestions) == null ? void 0 : Re.slice(0, 2).map((H, K) => /* @__PURE__ */ r(
2796
2783
  Fe,
2797
2784
  {
2798
2785
  align: "left",
2799
2786
  onClick: () => {
2800
- v(H);
2787
+ y(H);
2801
2788
  },
2802
- children: /* @__PURE__ */ o("div", { className: "csdk-py-[7px] csdk-px-4", children: H })
2789
+ children: /* @__PURE__ */ r("div", { className: "csdk-py-[7px] csdk-px-4", children: H })
2803
2790
  },
2804
2791
  K
2805
2792
  )) }),
2806
- (b || B) && /* @__PURE__ */ o(ut, {}),
2807
- le && /* @__PURE__ */ o(
2793
+ (m || B) && /* @__PURE__ */ r(ut, {}),
2794
+ le && /* @__PURE__ */ r(
2808
2795
  vi,
2809
2796
  {
2810
- onCancel: q,
2797
+ onCancel: D,
2811
2798
  onConfirm: J
2812
2799
  }
2813
2800
  )
2814
2801
  ] }),
2815
- /* @__PURE__ */ S(m1, { ref: U, theme: g, children: [
2816
- /* @__PURE__ */ o(
2802
+ /* @__PURE__ */ S(m1, { ref: G, theme: g, children: [
2803
+ /* @__PURE__ */ r(
2817
2804
  ro,
2818
2805
  {
2819
- onSendMessage: v,
2820
- disabled: M,
2806
+ onSendMessage: y,
2807
+ disabled: T,
2821
2808
  onClearHistoryClick: _,
2822
2809
  suggestions: a || [],
2823
2810
  recentPrompts: fe,
2824
- isLoading: i || k,
2811
+ isLoading: i || x,
2825
2812
  recommendationsError: u,
2826
- onChange: q
2813
+ onChange: D
2827
2814
  }
2828
2815
  ),
2829
- /* @__PURE__ */ o(zr, { theme: g })
2816
+ /* @__PURE__ */ r(zr, { theme: g })
2830
2817
  ] })
2831
2818
  ] });
2832
2819
  }
@@ -2859,13 +2846,13 @@ const x1 = w.button`
2859
2846
  transform: rotate(180deg);
2860
2847
  `;
2861
2848
  function S1(e) {
2862
- const { title: t, description: n, onClick: r } = e, { themeSettings: s } = R();
2863
- return /* @__PURE__ */ S(x1, { onClick: r, theme: s, children: [
2849
+ const { title: t, description: n, onClick: o } = e, { themeSettings: s } = R();
2850
+ return /* @__PURE__ */ S(x1, { onClick: o, theme: s, children: [
2864
2851
  /* @__PURE__ */ S("div", { children: [
2865
- /* @__PURE__ */ o(v1, { theme: s, children: t }),
2866
- /* @__PURE__ */ o(k1, { theme: s, children: n })
2852
+ /* @__PURE__ */ r(v1, { theme: s, children: t }),
2853
+ /* @__PURE__ */ r(k1, { theme: s, children: n })
2867
2854
  ] }),
2868
- /* @__PURE__ */ o(w1, { children: /* @__PURE__ */ o(kn, { color: s.aiChat.icons.color }) })
2855
+ /* @__PURE__ */ r(w1, { children: /* @__PURE__ */ r(kn, { color: s.aiChat.icons.color }) })
2869
2856
  ] });
2870
2857
  }
2871
2858
  const $1 = w.div`
@@ -2889,16 +2876,16 @@ const $1 = w.div`
2889
2876
  color: ${({ theme: e }) => e.aiChat.primaryTextColor};
2890
2877
  `;
2891
2878
  function R1(e) {
2892
- const { dataTopics: t } = e, { themeSettings: n } = R(), { t: r } = N();
2879
+ const { dataTopics: t } = e, { themeSettings: n } = R(), { t: o } = N();
2893
2880
  return /* @__PURE__ */ S($1, { children: [
2894
- /* @__PURE__ */ o(M1, { theme: n, children: r("ai.dataTopics") }),
2881
+ /* @__PURE__ */ r(M1, { theme: n, children: o("ai.dataTopics") }),
2895
2882
  /* @__PURE__ */ S(T1, { theme: n, children: [
2896
- r("ai.chatbotDescription"),
2897
- /* @__PURE__ */ o("br", {}),
2898
- /* @__PURE__ */ o("br", {}),
2899
- r("ai.topicSelectPrompt")
2883
+ o("ai.chatbotDescription"),
2884
+ /* @__PURE__ */ r("br", {}),
2885
+ /* @__PURE__ */ r("br", {}),
2886
+ o("ai.topicSelectPrompt")
2900
2887
  ] }),
2901
- t.map((s) => /* @__PURE__ */ tr(S1, L($({}, s), { key: s.title })))
2888
+ t.map((s) => /* @__PURE__ */ tr(S1, E($({}, s), { key: s.title })))
2902
2889
  ] });
2903
2890
  }
2904
2891
  const L1 = "#000000", E1 = "#FFFFFF";
@@ -2913,112 +2900,112 @@ function I1({ isDarkBackground: e = !1 }) {
2913
2900
  fill: "none",
2914
2901
  xmlns: "http://www.w3.org/2000/svg",
2915
2902
  children: [
2916
- /* @__PURE__ */ o(
2903
+ /* @__PURE__ */ r(
2917
2904
  "path",
2918
2905
  {
2919
2906
  d: "M365.111 69.5654C350.571 69.5654 338.747 81.3237 338.747 95.7826C338.747 110.241 350.571 122 365.111 122C379.651 122 391.476 110.241 391.476 95.7826C391.476 81.3237 379.651 69.5654 365.111 69.5654Z",
2920
2907
  fill: t
2921
2908
  }
2922
2909
  ),
2923
- /* @__PURE__ */ o(
2910
+ /* @__PURE__ */ r(
2924
2911
  "path",
2925
2912
  {
2926
2913
  d: "M135.365 147.679C120.824 147.679 109 159.437 109 173.896C109 188.355 120.824 200.113 135.365 200.113C149.905 200.113 161.715 188.355 161.715 173.896C161.715 159.437 149.891 147.679 135.365 147.679Z",
2927
2914
  fill: t
2928
2915
  }
2929
2916
  ),
2930
- /* @__PURE__ */ o(
2917
+ /* @__PURE__ */ r(
2931
2918
  "path",
2932
2919
  {
2933
2920
  d: "M135.365 225.789C120.824 225.789 109 237.547 109 252.006C109 266.465 120.824 278.21 135.365 278.21C149.905 278.21 161.715 266.451 161.715 252.006C161.715 237.561 149.891 225.789 135.365 225.789Z",
2934
2921
  fill: t
2935
2922
  }
2936
2923
  ),
2937
- /* @__PURE__ */ o(
2924
+ /* @__PURE__ */ r(
2938
2925
  "path",
2939
2926
  {
2940
2927
  d: "M364.401 225.789C349.861 225.789 338.037 237.547 338.037 252.006C338.037 266.465 349.861 278.21 364.401 278.21C378.941 278.21 390.766 266.451 390.766 252.006C390.766 237.561 378.941 225.789 364.401 225.789Z",
2941
2928
  fill: t
2942
2929
  }
2943
2930
  ),
2944
- /* @__PURE__ */ o(
2931
+ /* @__PURE__ */ r(
2945
2932
  "path",
2946
2933
  {
2947
2934
  d: "M365.111 303.899C350.571 303.899 338.747 315.658 338.747 330.117C338.747 344.575 350.571 356.334 365.111 356.334C379.651 356.334 391.476 344.575 391.476 330.117C391.476 315.658 379.651 303.899 365.111 303.899Z",
2948
2935
  fill: t
2949
2936
  }
2950
2937
  ),
2951
- /* @__PURE__ */ o(
2938
+ /* @__PURE__ */ r(
2952
2939
  "path",
2953
2940
  {
2954
2941
  d: "M135.365 382.013C120.824 382.013 109 393.771 109 408.23C109 422.689 120.824 434.447 135.365 434.447C149.905 434.447 161.715 422.689 161.715 408.23C161.715 393.771 149.891 382.013 135.365 382.013Z",
2955
2942
  fill: t
2956
2943
  }
2957
2944
  ),
2958
- /* @__PURE__ */ o(
2945
+ /* @__PURE__ */ r(
2959
2946
  "path",
2960
2947
  {
2961
2948
  d: "M289.516 142.11C271.898 142.11 257.567 156.362 257.567 173.895C257.567 191.429 271.898 205.666 289.516 205.666C307.135 205.666 321.466 191.415 321.466 173.895C321.466 156.375 307.135 142.11 289.516 142.11Z",
2962
2949
  fill: t
2963
2950
  }
2964
2951
  ),
2965
- /* @__PURE__ */ o(
2952
+ /* @__PURE__ */ r(
2966
2953
  "path",
2967
2954
  {
2968
2955
  d: "M210.96 142.11C193.342 142.11 179.01 156.362 179.01 173.895C179.01 191.429 193.342 205.666 210.96 205.666C228.578 205.666 242.909 191.415 242.909 173.895C242.909 156.375 228.578 142.11 210.96 142.11Z",
2969
2956
  fill: t
2970
2957
  }
2971
2958
  ),
2972
- /* @__PURE__ */ o(
2959
+ /* @__PURE__ */ r(
2973
2960
  "path",
2974
2961
  {
2975
2962
  d: "M289.516 220.224C271.898 220.224 257.567 234.475 257.567 252.008C257.567 269.542 271.898 283.779 289.516 283.779C307.135 283.779 321.466 269.528 321.466 252.008C321.466 234.489 307.135 220.224 289.516 220.224Z",
2976
2963
  fill: t
2977
2964
  }
2978
2965
  ),
2979
- /* @__PURE__ */ o(
2966
+ /* @__PURE__ */ r(
2980
2967
  "path",
2981
2968
  {
2982
2969
  d: "M210.96 220.224C193.342 220.224 179.01 234.475 179.01 252.008C179.01 269.542 193.342 283.779 210.96 283.779C228.578 283.779 242.909 269.528 242.909 252.008C242.909 234.489 228.578 220.224 210.96 220.224Z",
2983
2970
  fill: t
2984
2971
  }
2985
2972
  ),
2986
- /* @__PURE__ */ o(
2973
+ /* @__PURE__ */ r(
2987
2974
  "path",
2988
2975
  {
2989
2976
  d: "M289.516 298.334C271.898 298.334 257.567 312.585 257.567 330.105C257.567 347.624 271.898 361.889 289.516 361.889C307.135 361.889 321.466 347.638 321.466 330.105C321.466 312.571 307.135 298.334 289.516 298.334Z",
2990
2977
  fill: t
2991
2978
  }
2992
2979
  ),
2993
- /* @__PURE__ */ o(
2980
+ /* @__PURE__ */ r(
2994
2981
  "path",
2995
2982
  {
2996
2983
  d: "M210.96 298.334C193.342 298.334 179.01 312.585 179.01 330.105C179.01 347.624 193.342 361.889 210.96 361.889C228.578 361.889 242.909 347.638 242.909 330.105C242.909 312.571 228.578 298.334 210.96 298.334Z",
2997
2984
  fill: t
2998
2985
  }
2999
2986
  ),
3000
- /* @__PURE__ */ o(
2987
+ /* @__PURE__ */ r(
3001
2988
  "path",
3002
2989
  {
3003
2990
  d: "M289.516 64C271.898 64 257.567 78.2512 257.567 95.7847C257.567 113.318 271.898 127.555 289.516 127.555C307.135 127.555 321.466 113.304 321.466 95.7847C321.466 78.265 307.135 64 289.516 64Z",
3004
2991
  fill: t
3005
2992
  }
3006
2993
  ),
3007
- /* @__PURE__ */ o(
2994
+ /* @__PURE__ */ r(
3008
2995
  "path",
3009
2996
  {
3010
2997
  d: "M210.96 64C193.342 64 179.01 78.2512 179.01 95.7847C179.01 113.318 193.342 127.555 210.96 127.555C228.578 127.555 242.909 113.304 242.909 95.7847C242.909 78.265 228.578 64 210.96 64Z",
3011
2998
  fill: t
3012
2999
  }
3013
3000
  ),
3014
- /* @__PURE__ */ o(
3001
+ /* @__PURE__ */ r(
3015
3002
  "path",
3016
3003
  {
3017
3004
  d: "M289.516 376.442C271.898 376.442 257.567 390.694 257.567 408.213C257.567 425.733 271.898 439.998 289.516 439.998C307.135 439.998 321.466 425.747 321.466 408.213C321.466 390.68 307.135 376.442 289.516 376.442Z",
3018
3005
  fill: t
3019
3006
  }
3020
3007
  ),
3021
- /* @__PURE__ */ o(
3008
+ /* @__PURE__ */ r(
3022
3009
  "path",
3023
3010
  {
3024
3011
  d: "M210.96 376.442C193.342 376.442 179.01 390.694 179.01 408.213C179.01 425.733 193.342 439.998 210.96 439.998C228.578 439.998 242.909 425.747 242.909 408.213C242.909 390.68 228.578 376.442 210.96 376.442Z",
@@ -3042,57 +3029,57 @@ const N1 = w.div`
3042
3029
  background-color: ${({ theme: e }) => e.aiChat.dataTopics.backgroundColor};
3043
3030
  `;
3044
3031
  function H1({ dataTopicsList: e, onDataTopicClick: t }) {
3045
- const { enableHeader: n } = ne(), { themeSettings: r } = R(), { t: s } = N(), c = D(() => e == null ? void 0 : e.map((h) => ({
3032
+ const { enableHeader: n } = ne(), { themeSettings: o } = R(), { t: s } = N(), c = A(() => e == null ? void 0 : e.map((h) => ({
3046
3033
  title: h,
3047
3034
  onClick: () => t(h)
3048
- })), [e, t]), l = ar(lr(r.aiChat.header.backgroundColor)) > 0.5;
3035
+ })), [e, t]), l = ar(lr(o.aiChat.header.backgroundColor)) > 0.5;
3049
3036
  return /* @__PURE__ */ S(j, { children: [
3050
- n ? /* @__PURE__ */ o(
3037
+ n ? /* @__PURE__ */ r(
3051
3038
  Jt,
3052
3039
  {
3053
3040
  title: s("ai.analyticsChatbot"),
3054
- leftNav: /* @__PURE__ */ o(N1, { children: /* @__PURE__ */ o(I1, { isDarkBackground: l }) }),
3055
- style: r.aiChat.header
3041
+ leftNav: /* @__PURE__ */ r(N1, { children: /* @__PURE__ */ r(I1, { isDarkBackground: l }) }),
3042
+ style: o.aiChat.header
3056
3043
  }
3057
3044
  ) : null,
3058
- /* @__PURE__ */ S(P1, { theme: r, children: [
3059
- !c && /* @__PURE__ */ o(qe, {}),
3060
- c && /* @__PURE__ */ o(R1, { dataTopics: c })
3045
+ /* @__PURE__ */ S(P1, { theme: o, children: [
3046
+ !c && /* @__PURE__ */ r(qe, {}),
3047
+ c && /* @__PURE__ */ r(R1, { dataTopics: c })
3061
3048
  ] })
3062
3049
  ] });
3063
3050
  }
3064
3051
  function B1() {
3065
- const [e, t] = O(), [n, r] = O(), { data: s, fetchStatus: c } = Tr(), { dataTopicsList: l, contextDetails: h } = ne(), { t: d } = N(), g = d("ai.errors.noAvailableDataTopics"), m = F(
3052
+ const [e, t] = O(), [n, o] = O(), { data: s, fetchStatus: c } = Tr(), { dataTopicsList: l, contextDetails: h } = ne(), { t: d } = N(), g = d("ai.errors.noAvailableDataTopics"), b = F(
3066
3053
  (a) => {
3067
- a.length ? a.length === 1 && (r(void 0), t(a[0])) : r(g);
3054
+ a.length ? a.length === 1 && (o(void 0), t(a[0])) : o(g);
3068
3055
  },
3069
3056
  [g]
3070
- ), x = D(() => {
3057
+ ), k = A(() => {
3071
3058
  if (s && c === "idle") {
3072
3059
  const f = (l != null && l.length ? s == null ? void 0 : s.filter((p) => l == null ? void 0 : l.includes(p.title)) : s).map((p) => p.title);
3073
- return m(f), f;
3060
+ return b(f), f;
3074
3061
  }
3075
3062
  return [];
3076
- }, [s, c, l, m]), i = we(), u = F(() => {
3077
- r(void 0), i.invalidateQueries(["getDataTopics"]);
3063
+ }, [s, c, l, b]), i = we(), u = F(() => {
3064
+ o(void 0), i.invalidateQueries(["getDataTopics"]);
3078
3065
  }, [i]);
3079
- return n ? /* @__PURE__ */ o(
3066
+ return n ? /* @__PURE__ */ r(
3080
3067
  Yt,
3081
3068
  {
3082
3069
  text: n,
3083
3070
  action: { text: d("ai.buttons.refresh"), onClick: u }
3084
3071
  }
3085
- ) : x.length === 1 && !e ? /* @__PURE__ */ o(qe, {}) : e ? /* @__PURE__ */ o(
3072
+ ) : k.length === 1 && !e ? /* @__PURE__ */ r(qe, {}) : e ? /* @__PURE__ */ r(
3086
3073
  y1,
3087
3074
  {
3088
3075
  contextTitle: e,
3089
3076
  contextDetails: h,
3090
- onGoBack: x.length === 1 ? void 0 : () => t(void 0)
3077
+ onGoBack: k.length === 1 ? void 0 : () => t(void 0)
3091
3078
  }
3092
- ) : /* @__PURE__ */ o(
3079
+ ) : /* @__PURE__ */ r(
3093
3080
  H1,
3094
3081
  {
3095
- dataTopicsList: x,
3082
+ dataTopicsList: k,
3096
3083
  onDataTopicClick: (a) => t(a)
3097
3084
  }
3098
3085
  );
@@ -3100,26 +3087,26 @@ function B1() {
3100
3087
  const ts = zt({
3101
3088
  componentName: "Chatbot"
3102
3089
  })((e) => {
3103
- const { width: t, height: n, config: r } = e, { themeSettings: s } = R();
3104
- return /* @__PURE__ */ o($r, { value: r != null ? r : {}, children: /* @__PURE__ */ o(
3105
- Or,
3090
+ const { width: t, height: n, config: o } = e, { themeSettings: s } = R();
3091
+ return /* @__PURE__ */ r($r, { value: o != null ? o : {}, children: /* @__PURE__ */ r(
3092
+ Ar,
3106
3093
  {
3107
3094
  id: "csdk-chatbot-frame",
3108
3095
  width: t,
3109
3096
  height: n,
3110
3097
  theme: s,
3111
3098
  tabIndex: 0,
3112
- children: /* @__PURE__ */ o(B1, {})
3099
+ children: /* @__PURE__ */ r(B1, {})
3113
3100
  }
3114
3101
  ) });
3115
3102
  }), ns = zt({
3116
3103
  componentName: "GetNlgInsights"
3117
3104
  })(function(t) {
3118
- const { data: n, isLoading: r, isError: s } = De(t), { t: c } = N();
3105
+ const { data: n, isLoading: o, isError: s } = De(t), { t: c } = N();
3119
3106
  if (s)
3120
- return /* @__PURE__ */ o(j, { children: c("ai.errors.unexpected") });
3107
+ return /* @__PURE__ */ r(j, { children: c("ai.errors.unexpected") });
3121
3108
  const l = n != null ? n : c("ai.errors.insightsNotAvailable");
3122
- return /* @__PURE__ */ o(ft, { text: r ? "Loading..." : l });
3109
+ return /* @__PURE__ */ r(ft, { text: o ? "Loading..." : l });
3123
3110
  });
3124
3111
  function F1({ theme: e }) {
3125
3112
  const t = e.general.brandColor;
@@ -3132,7 +3119,7 @@ function F1({ theme: e }) {
3132
3119
  viewBox: "-2 -3 24 24",
3133
3120
  fill: "none",
3134
3121
  children: [
3135
- /* @__PURE__ */ o(
3122
+ /* @__PURE__ */ r(
3136
3123
  "path",
3137
3124
  {
3138
3125
  fillRule: "evenodd",
@@ -3141,7 +3128,7 @@ function F1({ theme: e }) {
3141
3128
  fill: t
3142
3129
  }
3143
3130
  ),
3144
- /* @__PURE__ */ o(
3131
+ /* @__PURE__ */ r(
3145
3132
  "path",
3146
3133
  {
3147
3134
  fillRule: "evenodd",
@@ -3150,7 +3137,7 @@ function F1({ theme: e }) {
3150
3137
  fill: t
3151
3138
  }
3152
3139
  ),
3153
- /* @__PURE__ */ o(
3140
+ /* @__PURE__ */ r(
3154
3141
  "path",
3155
3142
  {
3156
3143
  fillRule: "evenodd",
@@ -3163,7 +3150,7 @@ function F1({ theme: e }) {
3163
3150
  }
3164
3151
  );
3165
3152
  }
3166
- const A1 = w.div`
3153
+ const O1 = w.div`
3167
3154
  display: flex;
3168
3155
  flex-direction: row;
3169
3156
  align-items: center;
@@ -3172,21 +3159,21 @@ const A1 = w.div`
3172
3159
  max-width: 640px;
3173
3160
  color: ${({ theme: e }) => e.chart.textColor};
3174
3161
  background-color: ${({ theme: e }) => e.chart.backgroundColor};
3175
- `, O1 = w.div`
3162
+ `, A1 = w.div`
3176
3163
  align-self: flex-start;
3177
3164
  `, D1 = ({ summary: e, nlgRequest: t }) => {
3178
3165
  const { themeSettings: n } = R();
3179
- return /* @__PURE__ */ o(
3166
+ return /* @__PURE__ */ r(
3180
3167
  et,
3181
3168
  {
3182
3169
  sourceId: t.jaql.datasource.title,
3183
3170
  data: t,
3184
3171
  type: "chart/insights",
3185
3172
  buttonVisibility: "always",
3186
- renderContent: (r) => /* @__PURE__ */ S(A1, { theme: n, children: [
3187
- /* @__PURE__ */ o(O1, { theme: n, children: /* @__PURE__ */ o(F1, { theme: n }) }),
3188
- /* @__PURE__ */ o(ft, { text: e }),
3189
- r
3173
+ renderContent: (o) => /* @__PURE__ */ S(O1, { theme: n, children: [
3174
+ /* @__PURE__ */ r(A1, { theme: n, children: /* @__PURE__ */ r(F1, { theme: n }) }),
3175
+ /* @__PURE__ */ r(ft, { text: e }),
3176
+ o
3190
3177
  ] })
3191
3178
  }
3192
3179
  );
@@ -3194,12 +3181,12 @@ const A1 = w.div`
3194
3181
  function({
3195
3182
  nlqResponse: t,
3196
3183
  onDataReady: n,
3197
- styleOptions: r,
3184
+ styleOptions: o,
3198
3185
  widgetProps: s,
3199
3186
  filters: c = []
3200
3187
  }) {
3201
- const l = t.timestamp, h = D(
3202
- () => L($({}, t), {
3188
+ const l = t.timestamp, h = A(
3189
+ () => E($({}, t), {
3203
3190
  queryTitle: nr(t.queryTitle)
3204
3191
  }),
3205
3192
  // Memoize based on timestamp to prevent unnecessary recomputations
@@ -3207,46 +3194,46 @@ const A1 = w.div`
3207
3194
  [l]
3208
3195
  ), { connectToWidgetProps: d } = rr({
3209
3196
  initialFilters: c
3210
- }), [g, m] = O(null);
3197
+ }), [g, b] = O(null);
3211
3198
  Se(() => {
3212
- const p = Oe(h, {
3199
+ const p = Ae(h, {
3213
3200
  useCustomizedStyleOptions: !0
3214
3201
  });
3215
- if (!p) m(null);
3202
+ if (!p) b(null);
3216
3203
  else {
3217
- r && p.styleOptions && (p.styleOptions = cr(
3204
+ o && p.styleOptions && (p.styleOptions = cr(
3218
3205
  p.styleOptions,
3219
- r
3206
+ o
3220
3207
  ));
3221
- const b = d(p, {
3208
+ const m = d(p, {
3222
3209
  shouldAffectFilters: !1,
3223
3210
  applyMode: "filter"
3224
3211
  });
3225
- m(b);
3212
+ b(m);
3226
3213
  }
3227
- }, [h, d, r]);
3228
- const x = D(() => {
3229
- const p = g && He(g) ? pr(g == null ? void 0 : g.filters) : [], b = h.jaql.metadata.filter((v) => !v.jaql.filter).concat(
3230
- p.filter((v) => !v.config.disabled).map((v) => v.jaql())
3214
+ }, [h, d, o]);
3215
+ const k = A(() => {
3216
+ const p = g && He(g) ? pr(g == null ? void 0 : g.filters) : [], m = h.jaql.metadata.filter((y) => !y.jaql.filter).concat(
3217
+ p.filter((y) => !y.config.disabled).map((y) => y.jaql())
3231
3218
  );
3232
- return L($({}, h), {
3233
- jaql: L($({}, h.jaql), { metadata: b }),
3219
+ return E($({}, h), {
3220
+ jaql: E($({}, h.jaql), { metadata: m }),
3234
3221
  verbosity: "Low"
3235
3222
  });
3236
- }, [h, g]), { data: i, isLoading: u, isError: a } = De(x);
3223
+ }, [h, g]), { data: i, isLoading: u, isError: a } = De(k);
3237
3224
  if (u || !g)
3238
- return /* @__PURE__ */ o(ut, {});
3225
+ return /* @__PURE__ */ r(ut, {});
3239
3226
  if (!He(g))
3240
- return /* @__PURE__ */ o(j, {});
3241
- const f = s || L($({}, g), {
3242
- styleOptions: r,
3227
+ return /* @__PURE__ */ r(j, {});
3228
+ const f = s || E($({}, g), {
3229
+ styleOptions: o,
3243
3230
  onDataReady: n
3244
3231
  });
3245
- return /* @__PURE__ */ o(
3232
+ return /* @__PURE__ */ r(
3246
3233
  xe,
3247
- L($({}, f), {
3234
+ E($({}, f), {
3248
3235
  highlightSelectionDisabled: !0,
3249
- topSlot: i && !a && /* @__PURE__ */ o(D1, { nlgRequest: x, summary: i })
3236
+ topSlot: i && !a && /* @__PURE__ */ r(D1, { nlgRequest: k, summary: i })
3250
3237
  })
3251
3238
  );
3252
3239
  },
@@ -3263,17 +3250,17 @@ function os({
3263
3250
  children: e,
3264
3251
  context: t
3265
3252
  }) {
3266
- return /* @__PURE__ */ o(Ut, { children: /* @__PURE__ */ o(st.Provider, { value: t == null ? void 0 : t.api, children: /* @__PURE__ */ o(Ft, { client: z1, children: e }) }) });
3253
+ return /* @__PURE__ */ r(Gt, { children: /* @__PURE__ */ r(st.Provider, { value: t == null ? void 0 : t.api, children: /* @__PURE__ */ r(Ft, { client: z1, children: e }) }) });
3267
3254
  }
3268
3255
  function is(e, t, n) {
3269
3256
  return X(this, null, function* () {
3270
3257
  var c;
3271
- const r = dr(e) ? or(
3258
+ const o = dr(e) ? or(
3272
3259
  e,
3273
3260
  n == null ? void 0 : n.defaultDataSource,
3274
3261
  n == null ? void 0 : n.verbosity,
3275
3262
  n == null ? void 0 : n.ignoreTrendAndForecast
3276
- ) : He(e) ? At(
3263
+ ) : He(e) ? Ot(
3277
3264
  ir(
3278
3265
  e,
3279
3266
  n == null ? void 0 : n.defaultDataSource,
@@ -3281,10 +3268,10 @@ function is(e, t, n) {
3281
3268
  n == null ? void 0 : n.ignoreTrendAndForecast
3282
3269
  )
3283
3270
  ) : null;
3284
- if (!r)
3271
+ if (!o)
3285
3272
  throw new Error("Only chart or pivot widget props are supported");
3286
- const s = yield tt(t, r, {
3287
- isUnifiedNarrationEnabled: n == null ? void 0 : n.isUnifiedNarrationEnabled,
3273
+ const s = yield tt(t, o, {
3274
+ isUnified: n == null ? void 0 : n.isUnified,
3288
3275
  isSisenseAiEnabled: n == null ? void 0 : n.isSisenseAiEnabled
3289
3276
  });
3290
3277
  if (!((c = s == null ? void 0 : s.data) != null && c.answer))
@@ -3303,8 +3290,8 @@ export {
3303
3290
  rs as NlqChartWidget,
3304
3291
  kr as executeGetNlqResult,
3305
3292
  is as getNlgInsightsFromWidget,
3306
- At as prepareGetNlgInsightsPayload,
3307
- Gt as prepareGetNlqResultPayload,
3293
+ Ot as prepareGetNlgInsightsPayload,
3294
+ Ut as prepareGetNlqResultPayload,
3308
3295
  Pr as useChatSession,
3309
3296
  es as useFinalNlqResponse,
3310
3297
  K1 as useGetNlgInsights,