@epam/statgpt-conversation-view 0.6.0-rc.9 → 0.6.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 (3) hide show
  1. package/index.js +4 -4
  2. package/index.mjs +191 -191
  3. package/package.json +6 -6
package/index.mjs CHANGED
@@ -895,8 +895,8 @@ var kd = (function() {
895
895
  "marginSize",
896
896
  "imageSettings"
897
897
  ]), { style: g } = y, v = Ss(y, ["style"]), w = h?.src, C = je.useRef(null), D = je.useRef(null), k = je.useCallback(
898
- (P) => {
899
- C.current = P, typeof n == "function" ? n(P) : n && (n.current = P);
898
+ (F) => {
899
+ C.current = F, typeof n == "function" ? n(F) : n && (n.current = F);
900
900
  },
901
901
  [n]
902
902
  ), [N, E] = je.useState(!1), { margin: M, cells: R, numCells: A, calculatedImageSettings: x } = _o({
@@ -911,7 +911,7 @@ var kd = (function() {
911
911
  });
912
912
  je.useEffect(() => {
913
913
  if (C.current != null) {
914
- const P = C.current, J = P.getContext("2d");
914
+ const F = C.current, J = F.getContext("2d");
915
915
  if (!J)
916
916
  return;
917
917
  let K = R;
@@ -921,7 +921,7 @@ var kd = (function() {
921
921
  x.excavation
922
922
  ));
923
923
  const Y = window.devicePixelRatio || 1;
924
- P.height = P.width = i * Y;
924
+ F.height = F.width = i * Y;
925
925
  const W = i / A * Y;
926
926
  J.scale(W, W), J.fillStyle = l, J.fillRect(0, 0, A, A), J.fillStyle = a, kd ? J.fill(new Path2D(Oo(K, M))) : R.forEach(function(ne, se) {
927
927
  ne.forEach(function(he, be) {
@@ -1086,7 +1086,7 @@ const Ld = (e, t) => ({
1086
1086
  clientSharedProp: k,
1087
1087
  shareAlertMessage: N
1088
1088
  }) => {
1089
- const [E, M] = S(null), [R, A] = S(), [x, L] = S(!1), [V, P] = S(!1), [J, K] = S(), X = ue(null), U = ue(null), Y = j(() => e?.id ? decodeURI(e.id) : C?.[0] && C?.[1] && t ? decodeURI(`${C[0]}/${t}/${C[1]}`) : null, [e?.id, C, t]), W = j(() => {
1089
+ const [E, M] = S(null), [R, A] = S(), [x, L] = S(!1), [V, F] = S(!1), [J, K] = S(), X = ue(null), U = ue(null), Y = j(() => e?.id ? decodeURI(e.id) : C?.[0] && C?.[1] && t ? decodeURI(`${C[0]}/${t}/${C[1]}`) : null, [e?.id, C, t]), W = j(() => {
1090
1090
  if (!E)
1091
1091
  return "";
1092
1092
  const H = w || window.location.origin;
@@ -1139,9 +1139,9 @@ const Ld = (e, t) => ({
1139
1139
  ne
1140
1140
  ]);
1141
1141
  const se = T(() => {
1142
- U.current?.abort(), X.current = null, n(), M(null), L(!1), P(!1);
1142
+ U.current?.abort(), X.current = null, n(), M(null), L(!1), F(!1);
1143
1143
  }, [n]), he = T(() => {
1144
- P(!0), navigator.clipboard.writeText(W || "");
1144
+ F(!0), navigator.clipboard.writeText(W || "");
1145
1145
  }, [W]), be = async () => {
1146
1146
  try {
1147
1147
  if (K(!0), R && await v?.({
@@ -1468,7 +1468,7 @@ const Ld = (e, t) => ({
1468
1468
  }
1469
1469
  })();
1470
1470
  }, [i]);
1471
- const P = T(
1471
+ const F = T(
1472
1472
  async (X, U) => {
1473
1473
  if (!g) {
1474
1474
  console.error("No bucket");
@@ -1557,7 +1557,7 @@ const Ld = (e, t) => ({
1557
1557
  ]
1558
1558
  );
1559
1559
  O(() => {
1560
- c && g && P(c);
1560
+ c && g && F(c);
1561
1561
  }, [g, c]);
1562
1562
  const K = () => {
1563
1563
  const X = !g;
@@ -1573,7 +1573,7 @@ const Ld = (e, t) => ({
1573
1573
  disabled: X,
1574
1574
  placeholder: s || o?.askAnything || "Ask anything...",
1575
1575
  sendMessageIcon: l.sendMessageIcon,
1576
- onSendMessage: P
1576
+ onSendMessage: F
1577
1577
  }
1578
1578
  ),
1579
1579
  /* @__PURE__ */ u(
@@ -1596,7 +1596,7 @@ const Ld = (e, t) => ({
1596
1596
  title: U.title,
1597
1597
  text: U[ms.DialWidgetOptions]?.populateText,
1598
1598
  disabled: X,
1599
- onClick: P
1599
+ onClick: F
1600
1600
  },
1601
1601
  U.title
1602
1602
  ))
@@ -1614,7 +1614,7 @@ const Ld = (e, t) => ({
1614
1614
  choiceButtons: m?.properties?.choice?.oneOf || [],
1615
1615
  disabled: !g,
1616
1616
  handleOnboardingSkip: J,
1617
- onClick: P
1617
+ onClick: F
1618
1618
  }
1619
1619
  ) : /* @__PURE__ */ b("div", { className: "flex h-full flex-col items-center justify-center sm:px-4", children: [
1620
1620
  /* @__PURE__ */ b(
@@ -2409,7 +2409,7 @@ function zd() {
2409
2409
  time_24hr: !0
2410
2410
  };
2411
2411
  L.l10ns.de = V, L.l10ns;
2412
- var P = {
2412
+ var F = {
2413
2413
  weekdays: {
2414
2414
  shorthand: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
2415
2415
  longhand: [
@@ -3610,7 +3610,7 @@ function zd() {
3610
3610
  Fe.l10ns.kz = G, Fe.l10ns;
3611
3611
  var I = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3612
3612
  l10ns: {}
3613
- }, F = {
3613
+ }, P = {
3614
3614
  weekdays: {
3615
3615
  shorthand: ["S", "Pr", "A", "T", "K", "Pn", "Š"],
3616
3616
  longhand: [
@@ -3663,7 +3663,7 @@ function zd() {
3663
3663
  toggleTitle: "Perjungti laiko formatą",
3664
3664
  time_24hr: !0
3665
3665
  };
3666
- I.l10ns.lt = F, I.l10ns;
3666
+ I.l10ns.lt = P, I.l10ns;
3667
3667
  var _ = typeof window < "u" && window.flatpickr !== void 0 ? window.flatpickr : {
3668
3668
  l10ns: {}
3669
3669
  }, q = {
@@ -5090,8 +5090,8 @@ function zd() {
5090
5090
  cy: R,
5091
5091
  da: x,
5092
5092
  de: V,
5093
- default: s({}, P),
5094
- en: P,
5093
+ default: s({}, F),
5094
+ en: F,
5095
5095
  eo: K,
5096
5096
  es: U,
5097
5097
  et: W,
@@ -5113,7 +5113,7 @@ function zd() {
5113
5113
  ko: ye,
5114
5114
  km: De,
5115
5115
  kz: G,
5116
- lt: F,
5116
+ lt: P,
5117
5117
  lv: q,
5118
5118
  mk: oe,
5119
5119
  mn: We,
@@ -5258,8 +5258,8 @@ function Jd() {
5258
5258
  L.push(x);
5259
5259
  break;
5260
5260
  case "range":
5261
- c.selectedDates.length === 2 ? L = [x] : (L = c.selectedDates.concat([x]), L.sort(function(V, P) {
5262
- return V.getTime() - P.getTime();
5261
+ c.selectedDates.length === 2 ? L = [x] : (L = c.selectedDates.concat([x]), L.sort(function(V, F) {
5262
+ return V.getTime() - F.getTime();
5263
5263
  }));
5264
5264
  break;
5265
5265
  }
@@ -5272,14 +5272,14 @@ function Jd() {
5272
5272
  38: -3
5273
5273
  };
5274
5274
  function k(A, x, L, V) {
5275
- var P = D[V.keyCode] !== void 0;
5276
- if (!(!P && V.keyCode !== 13) && !(!c.rContainer || !m.monthsContainer)) {
5275
+ var F = D[V.keyCode] !== void 0;
5276
+ if (!(!F && V.keyCode !== 13) && !(!c.rContainer || !m.monthsContainer)) {
5277
5277
  var J = c.rContainer.querySelector(".flatpickr-monthSelect-month.selected"), K = Array.prototype.indexOf.call(m.monthsContainer.children, document.activeElement);
5278
5278
  if (K === -1) {
5279
5279
  var X = J || m.monthsContainer.firstElementChild;
5280
5280
  X.focus(), K = X.$i;
5281
5281
  }
5282
- P ? m.monthsContainer.children[(12 + K + D[V.keyCode]) % 12].focus() : V.keyCode === 13 && m.monthsContainer.contains(document.activeElement) && C(document.activeElement.dateObj);
5282
+ F ? m.monthsContainer.children[(12 + K + D[V.keyCode]) % 12].focus() : V.keyCode === 13 && m.monthsContainer.contains(document.activeElement) && C(document.activeElement.dateObj);
5283
5283
  }
5284
5284
  }
5285
5285
  function N() {
@@ -5583,9 +5583,9 @@ const $o = (e, t, n, s, r) => e?.map((i) => {
5583
5583
  ), C = !t || t?.startPeriod?.getTime() === g?.startPeriod?.getTime() && t?.endPeriod?.getTime() === g?.endPeriod?.getTime() ? 0 : bn, [D, k] = S(
5584
5584
  c ?? C
5585
5585
  ), N = j(() => {
5586
- const { startPeriod: x, endPeriod: L } = g, V = x?.getFullYear(), P = L?.getFullYear(), J = (/* @__PURE__ */ new Date()).getFullYear();
5586
+ const { startPeriod: x, endPeriod: L } = g, V = x?.getFullYear(), F = L?.getFullYear(), J = (/* @__PURE__ */ new Date()).getFullYear();
5587
5587
  return n.filter(
5588
- (K) => K.value === bn || K.value === 0 || +K.value >= 0 && P - J >= +K.value || +K.value < 0 && V - J < +K.value
5588
+ (K) => K.value === bn || K.value === 0 || +K.value >= 0 && F - J >= +K.value || +K.value < 0 && V - J < +K.value
5589
5589
  );
5590
5590
  }, [g, n]);
5591
5591
  O(() => {
@@ -7068,7 +7068,7 @@ const nf = 2, Va = ({
7068
7068
  t,
7069
7069
  M,
7070
7070
  E
7071
- ]), P = V ? !V.length : !x?.length, J = !!d || !!i?.isLoading, K = j(
7071
+ ]), F = V ? !V.length : !x?.length, J = !!d || !!i?.isLoading, K = j(
7072
7072
  () => L.reduce(
7073
7073
  (U, Y) => U + Y.matchedCount,
7074
7074
  0
@@ -7137,7 +7137,7 @@ const nf = 2, Va = ({
7137
7137
  expandHierarchicalValue: y
7138
7138
  }
7139
7139
  ),
7140
- !J && P && /* @__PURE__ */ u("span", { className: "body-2 text-neutrals-700", children: o?.noResultsInSection?.(
7140
+ !J && F && /* @__PURE__ */ u("span", { className: "body-2 text-neutrals-700", children: o?.noResultsInSection?.(
7141
7141
  t.title ?? ""
7142
7142
  ) ?? `No results found in ${t.title ?? ""}` })
7143
7143
  ] }),
@@ -7358,7 +7358,7 @@ const nf = 2, Va = ({
7358
7358
  "div",
7359
7359
  {
7360
7360
  className: $(
7361
- "overflow-y-auto advanced-view-filters-list min-w-[320px] max-w-[338px] pr-3 h-full sm:max-w-full sm:w-full"
7361
+ "overflow-y-auto advanced-view-filters-list w-[338px] pr-3 h-full sm:w-full"
7362
7362
  ),
7363
7363
  children: [
7364
7364
  c && c.length > 0 && /* @__PURE__ */ u(
@@ -7478,7 +7478,7 @@ const nf = 2, Va = ({
7478
7478
  }) => {
7479
7479
  const { titles: A } = Ne(), x = C?.get(
7480
7480
  qe(t)
7481
- ), L = zn(), { isCrossDatasetModeOn: V } = Ke(), [P, J] = S(!1), K = j(
7481
+ ), L = zn(), { isCrossDatasetModeOn: V } = Ke(), [F, J] = S(!1), K = j(
7482
7482
  () => $u(
7483
7483
  e.filter(
7484
7484
  (H) => !(H.filterType === "dataset" && H.datasetUrn && E.has(H.datasetUrn))
@@ -7630,7 +7630,7 @@ const nf = 2, Va = ({
7630
7630
  hierarchyStateMap: C,
7631
7631
  dataQueries: N,
7632
7632
  disabledDatasetUrns: E,
7633
- isDatasetFacetSelected: P,
7633
+ isDatasetFacetSelected: F,
7634
7634
  onSelectDatasetFacet: Y,
7635
7635
  onClearAllDatasets: R
7636
7636
  }
@@ -7643,7 +7643,7 @@ const nf = 2, Va = ({
7643
7643
  ]
7644
7644
  }
7645
7645
  ),
7646
- !L && (P ? /* @__PURE__ */ u(
7646
+ !L && (F ? /* @__PURE__ */ u(
7647
7647
  af,
7648
7648
  {
7649
7649
  dataQueries: N ?? [],
@@ -8420,7 +8420,7 @@ const Sf = (e, t) => e?.filter(
8420
8420
  }) => {
8421
8421
  const { titles: C } = Ne(), [D, k] = S(Me.Closed), [N, E] = S([]), [M, R] = S([]), [A, x] = S(), [L, V] = S(
8422
8422
  []
8423
- ), [P, J] = S(void 0), K = ue(a || []), [X, U] = S([]), [Y, W] = S(), [ne, se] = S(), [he, be] = S(!1), pe = ue(0), H = ue(!1), [Z, ce] = S(!1), fe = T(() => {
8423
+ ), [F, J] = S(void 0), K = ue(a || []), [X, U] = S([]), [Y, W] = S(), [ne, se] = S(), [he, be] = S(!1), pe = ue(0), H = ue(!1), [Z, ce] = S(!1), fe = T(() => {
8424
8424
  pe.current += 1, pe.current === 1 && be(!0);
8425
8425
  }, []), me = T(() => {
8426
8426
  pe.current = Math.max(
@@ -8790,7 +8790,7 @@ const Sf = (e, t) => e?.filter(
8790
8790
  onClearAllFilters: Be,
8791
8791
  updateSelectedFilterValues: ve,
8792
8792
  onTimePeriodChange: it,
8793
- selectedTimeOption: P,
8793
+ selectedTimeOption: F,
8794
8794
  hierarchyStateMap: te,
8795
8795
  onSelectHierarchy: le,
8796
8796
  onExpandHierarchyNode: ie,
@@ -9136,7 +9136,7 @@ const Sf = (e, t) => e?.filter(
9136
9136
  N,
9137
9137
  h,
9138
9138
  n
9139
- ]), P = /* @__PURE__ */ b(
9139
+ ]), F = /* @__PURE__ */ b(
9140
9140
  "div",
9141
9141
  {
9142
9142
  className: $("download-metadata flex cursor-pointer gap-4", {
@@ -9234,11 +9234,11 @@ const Sf = (e, t) => e?.filter(
9234
9234
  {
9235
9235
  title: a?.metadata || "Metadata",
9236
9236
  value: N ? a?.all || "Included" : a?.none || "Not included",
9237
- children: P
9237
+ children: F
9238
9238
  }
9239
9239
  ) : /* @__PURE__ */ b("div", { className: "flex flex-col", children: [
9240
9240
  /* @__PURE__ */ u("div", { className: "flex items-center py-4", children: /* @__PURE__ */ u("span", { children: a?.metadata || "Metadata" }) }),
9241
- /* @__PURE__ */ u("div", { className: "pb-4", children: P })
9241
+ /* @__PURE__ */ u("div", { className: "pb-4", children: F })
9242
9242
  ] })
9243
9243
  ] }),
9244
9244
  /* @__PURE__ */ b("div", { className: "download-button mt-auto flex items-center gap-x-3 p-6", children: [
@@ -9604,16 +9604,16 @@ const Sf = (e, t) => e?.filter(
9604
9604
  const { isTableSettingsFeatureEnabled: h } = Ke(), { isOpenedAdvancedView: p } = Xe(), { titles: y } = Ne(), { onboardingFileSchema: g, isShowOnboarding: v } = lt(), w = ue(null), [C, D] = S(""), [k, N] = S(""), [E, M] = S(!1);
9605
9605
  O(() => {
9606
9606
  if (v) {
9607
- const { title: P, description: J } = St(
9607
+ const { title: F, description: J } = St(
9608
9608
  Ue.OPEN_ADVANCED_VIEW,
9609
9609
  y
9610
9610
  );
9611
- D(P), N(J);
9611
+ D(F), N(J);
9612
9612
  }
9613
9613
  }, [y, v]), O(() => {
9614
9614
  if (v) {
9615
- const P = g?.lastDisplayedElement === Ue.OPEN_ADVANCED_VIEW;
9616
- M(P), P && w?.current?.scrollIntoView({
9615
+ const F = g?.lastDisplayedElement === Ue.OPEN_ADVANCED_VIEW;
9616
+ M(F), F && w?.current?.scrollIntoView({
9617
9617
  block: "center",
9618
9618
  behavior: "smooth"
9619
9619
  });
@@ -11400,11 +11400,11 @@ const Qm = (e, t, n) => {
11400
11400
  ),
11401
11401
  [e, k, t]
11402
11402
  ), A = j(() => {
11403
- const V = k?.dataflows?.[0], P = mn(
11403
+ const V = k?.dataflows?.[0], F = mn(
11404
11404
  ln(V),
11405
11405
  e?.locale
11406
11406
  );
11407
- return fn(V, P, e?.locale, t);
11407
+ return fn(V, F, e?.locale, t);
11408
11408
  }, [k, e?.locale, t]), x = T(() => {
11409
11409
  if (g && y) {
11410
11410
  y.openPanel({
@@ -11442,11 +11442,11 @@ const Qm = (e, t, n) => {
11442
11442
  }, []);
11443
11443
  return O(() => {
11444
11444
  if (h) {
11445
- const { title: V, description: P } = St(
11445
+ const { title: V, description: F } = St(
11446
11446
  Ue.METADATA_PER_SERIES,
11447
11447
  t
11448
11448
  );
11449
- l(V), d(P);
11449
+ l(V), d(F);
11450
11450
  }
11451
11451
  }, [t, h]), O(() => {
11452
11452
  if (h) {
@@ -11632,18 +11632,18 @@ const Qm = (e, t, n) => {
11632
11632
  if (e.grid_data == null)
11633
11633
  d(!0);
11634
11634
  else {
11635
- const P = e.grid_data.columns.map((J) => J.colId === nn ? { ...J, hide: !n } : J);
11636
- m(e.grid_data.data), h(P), d(!1);
11635
+ const F = e.grid_data.columns.map((J) => J.colId === nn ? { ...J, hide: !n } : J);
11636
+ m(e.grid_data.data), h(F), d(!1);
11637
11637
  }
11638
11638
  }, [e.grid_data, n]), O(() => {
11639
11639
  c ? (y(Js(c.length)), i?.(c.length >= Vt)) : i?.(!1);
11640
11640
  }, [c, i]), O(() => {
11641
11641
  if (E) {
11642
- const { title: P, description: J } = St(
11642
+ const { title: F, description: J } = St(
11643
11643
  Ue.DATA_GRID,
11644
11644
  l
11645
11645
  );
11646
- w(P), D(J);
11646
+ w(F), D(J);
11647
11647
  }
11648
11648
  }, [l, E]), O(() => {
11649
11649
  M && !M?.infoElements?.dataGrid && R?.({
@@ -11656,8 +11656,8 @@ const Qm = (e, t, n) => {
11656
11656
  });
11657
11657
  }, [M, R]), O(() => {
11658
11658
  if (E) {
11659
- const P = M?.lastDisplayedElement === Ue.DATA_GRID;
11660
- N(P), !a && !t && P && setTimeout(() => {
11659
+ const F = M?.lastDisplayedElement === Ue.DATA_GRID;
11660
+ N(F), !a && !t && F && setTimeout(() => {
11661
11661
  g?.current?.scrollIntoView({
11662
11662
  block: "end",
11663
11663
  behavior: "smooth"
@@ -11671,8 +11671,8 @@ const Qm = (e, t, n) => {
11671
11671
  a
11672
11672
  ]);
11673
11673
  const A = T(
11674
- (P) => {
11675
- o?.(P.api);
11674
+ (F) => {
11675
+ o?.(F.api);
11676
11676
  },
11677
11677
  [o]
11678
11678
  ), x = j(() => ({ externalLink: r }), [r]), L = j(
@@ -11987,8 +11987,8 @@ const Vh = ({ option: e, style: t }) => {
11987
11987
  const L = c?.groups ?? [], V = c?.units ?? [];
11988
11988
  h(
11989
11989
  L.length > 0 ? L.flatMap(
11990
- (P) => P.units.map((J) => ({ unit: J, groupTitle: P.title }))
11991
- ) : V.map((P) => ({ unit: P }))
11990
+ (F) => F.units.map((J) => ({ unit: J, groupTitle: F.title }))
11991
+ ) : V.map((F) => ({ unit: F }))
11992
11992
  );
11993
11993
  }, [c]), O(() => {
11994
11994
  const L = f.length > p, V = L ? f[p] : f[0];
@@ -13091,15 +13091,15 @@ const cp = "merged-dimension-metadata-side-panel", dp = (e) => {
13091
13091
  M.isMetadata,
13092
13092
  V.signal
13093
13093
  );
13094
- } catch (P) {
13095
- if (v(P) && f.current)
13094
+ } catch (F) {
13095
+ if (v(F) && f.current)
13096
13096
  return;
13097
- R.push(L), console.error("Failed to download dataset", P);
13097
+ R.push(L), console.error("Failed to download dataset", F);
13098
13098
  } finally {
13099
13099
  a.current === V && (a.current = null);
13100
13100
  }
13101
13101
  x < M.items.length - 1 && await new Promise(
13102
- (P) => window.setTimeout(P, wp)
13102
+ (F) => window.setTimeout(F, wp)
13103
13103
  );
13104
13104
  }
13105
13105
  if (f.current)
@@ -13176,7 +13176,7 @@ const kl = ({
13176
13176
  attachmentsStyles: E,
13177
13177
  limitMessages: M,
13178
13178
  attachmentsConfig: R
13179
- } = Ne(), [A, x] = S(0), [L, V] = S(null), { isOpenedAdvancedView: P, setIsOpenedAdvancedView: J } = Xe(), [K, X] = S(Me.Closed), [U, Y] = S(!1), [W, ne] = S(!1), se = Xt.DATA_IN_TABLE, he = (z) => {
13179
+ } = Ne(), [A, x] = S(0), [L, V] = S(null), { isOpenedAdvancedView: F, setIsOpenedAdvancedView: J } = Xe(), [K, X] = S(Me.Closed), [U, Y] = S(!1), [W, ne] = S(!1), se = Xt.DATA_IN_TABLE, he = (z) => {
13180
13180
  x(z);
13181
13181
  }, be = T(() => {
13182
13182
  g?.(), J(!0), t.updateCurrentDataQuery(i || o?.[0]), t.updateDataQueries(o), t.updateDatasets(a);
@@ -13234,7 +13234,7 @@ const kl = ({
13234
13234
  attachmentsStyles: E,
13235
13235
  downloadDataSet: t.downloadDataSet
13236
13236
  });
13237
- return !e || e.length === 0 ? null : /* @__PURE__ */ u(Te, { children: P && !s ? /* @__PURE__ */ u(
13237
+ return !e || e.length === 0 ? null : /* @__PURE__ */ u(Te, { children: F && !s ? /* @__PURE__ */ u(
13238
13238
  Pf,
13239
13239
  {
13240
13240
  icon: N?.advanceViewIcon,
@@ -13245,12 +13245,12 @@ const kl = ({
13245
13245
  {
13246
13246
  className: $(
13247
13247
  "space-y-3 max-w-full max-h-full h-full",
13248
- !P && !n ? "pt-5" : "pt-0",
13248
+ !F && !n ? "pt-5" : "pt-0",
13249
13249
  "flex flex-col pb-1"
13250
13250
  ),
13251
13251
  children: [
13252
- !P && U ? /* @__PURE__ */ u(rt, {}) : /* @__PURE__ */ b(Te, { children: [
13253
- n && !P && /* @__PURE__ */ u(
13252
+ !F && U ? /* @__PURE__ */ u(rt, {}) : /* @__PURE__ */ b(Te, { children: [
13253
+ n && !F && /* @__PURE__ */ u(
13254
13254
  Lf,
13255
13255
  {
13256
13256
  titles: {
@@ -13263,7 +13263,7 @@ const kl = ({
13263
13263
  dataQueries: o
13264
13264
  }
13265
13265
  ),
13266
- !P && a?.length != null && a?.length > 0 && /* @__PURE__ */ u(
13266
+ !F && a?.length != null && a?.length > 0 && /* @__PURE__ */ u(
13267
13267
  Xa,
13268
13268
  {
13269
13269
  datasets: a,
@@ -13285,7 +13285,7 @@ const kl = ({
13285
13285
  "div",
13286
13286
  {
13287
13287
  className: $(
13288
- !P && a?.length && "attachments-bordered",
13288
+ !F && a?.length && "attachments-bordered",
13289
13289
  "attachments-wrapper h-full min-h-0"
13290
13290
  ),
13291
13291
  children: /* @__PURE__ */ b("div", { className: "flex h-full max-w-full flex-col items-center gap-4", children: [
@@ -13314,7 +13314,7 @@ const kl = ({
13314
13314
  actions: t,
13315
13315
  attachmentsStyles: E,
13316
13316
  isDataLoading: c,
13317
- isOpenedAdvancedView: P,
13317
+ isOpenedAdvancedView: F,
13318
13318
  onOpenAdvancedView: be,
13319
13319
  showLimitMessage: ne,
13320
13320
  onGridApiReady: D,
@@ -14028,7 +14028,7 @@ const Ip = "grid gap-1", Lp = {
14028
14028
  }) => {
14029
14029
  const { titles: g } = Ne(), v = nr(), [w, C] = S(Me.Closed), [D, k] = S([]), [N, E] = S([]), [M, R] = S(), [A, x] = S(
14030
14030
  []
14031
- ), [L, V] = S(void 0), P = ue(
14031
+ ), [L, V] = S(void 0), F = ue(
14032
14032
  t?.constraintsMap
14033
14033
  ), [J, K] = S(), [X, U] = S(), [Y, W] = S(), [ne, se] = S(!1), he = ue(0), [be, pe] = S(!1), [H, Z] = S(
14034
14034
  /* @__PURE__ */ new Set()
@@ -14058,7 +14058,7 @@ const Ip = "grid gap-1", Lp = {
14058
14058
  [te]
14059
14059
  ), z = T((G) => {
14060
14060
  const I = G.filterType === "dataset" ? G.datasetUrn : G.sourceDatasetUrns?.[0];
14061
- return I ? P.current?.get(I) : void 0;
14061
+ return I ? F.current?.get(I) : void 0;
14062
14062
  }, []), le = T(
14063
14063
  (G) => te(G).sourceArtefactUrn,
14064
14064
  [te]
@@ -14076,7 +14076,7 @@ const Ip = "grid gap-1", Lp = {
14076
14076
  getHierarchy: e?.getHierarchy
14077
14077
  }), ke = (G) => {
14078
14078
  const I = G ? D.map(
14079
- (F) => _e(F, G) ? G : F
14079
+ (P) => _e(P, G) ? G : P
14080
14080
  ) : D;
14081
14081
  W(!0), k(_n(I)), U?.(!0), ae(
14082
14082
  G?.isTimeDimension ? Rn(I, G) : I,
@@ -14086,13 +14086,13 @@ const Ip = "grid gap-1", Lp = {
14086
14086
  );
14087
14087
  };
14088
14088
  O(() => {
14089
- w === Me.Closed && K(P.current);
14089
+ w === Me.Closed && K(F.current);
14090
14090
  }, [w]);
14091
14091
  const ae = T(
14092
- (G, I, F, _) => {
14092
+ (G, I, P, _) => {
14093
14093
  const q = en(
14094
14094
  G,
14095
- P.current,
14095
+ F.current,
14096
14096
  !1,
14097
14097
  v.map
14098
14098
  ), Q = pi(
@@ -14112,7 +14112,7 @@ const Ip = "grid gap-1", Lp = {
14112
14112
  );
14113
14113
  Promise.allSettled(oe).then((Pe) => {
14114
14114
  const We = wi(
14115
- P.current || t?.constraintsMap,
14115
+ F.current || t?.constraintsMap,
14116
14116
  gi(Pe)
14117
14117
  ), Ve = {
14118
14118
  ...t,
@@ -14127,7 +14127,7 @@ const Ip = "grid gap-1", Lp = {
14127
14127
  v.map
14128
14128
  );
14129
14129
  if (pt) {
14130
- P.current = We, F?.(!0), W(!0);
14130
+ F.current = We, P?.(!0), W(!0);
14131
14131
  const wn = Jt(
14132
14132
  yt,
14133
14133
  Ve,
@@ -14137,7 +14137,7 @@ const Ip = "grid gap-1", Lp = {
14137
14137
  ae(
14138
14138
  wn,
14139
14139
  I,
14140
- F,
14140
+ P,
14141
14141
  _
14142
14142
  );
14143
14143
  return;
@@ -14149,7 +14149,7 @@ const Ip = "grid gap-1", Lp = {
14149
14149
  o,
14150
14150
  v.map
14151
14151
  );
14152
- if (P.current = We, F?.(!1), I(Ze), _) {
14152
+ if (F.current = We, P?.(!1), I(Ze), _) {
14153
14153
  const yt = Ze.find(
14154
14154
  (pt) => _e(pt, _)
14155
14155
  );
@@ -14161,13 +14161,13 @@ const Ip = "grid gap-1", Lp = {
14161
14161
  );
14162
14162
  }
14163
14163
  }).catch(() => {
14164
- const Pe = P.current || t?.constraintsMap || /* @__PURE__ */ new Map(), We = Jt(
14164
+ const Pe = F.current || t?.constraintsMap || /* @__PURE__ */ new Map(), We = Jt(
14165
14165
  q,
14166
14166
  { ...t, constraintsMap: Pe },
14167
14167
  o,
14168
14168
  v.map
14169
14169
  );
14170
- if (P.current = Pe, F?.(!1), I(We), _) {
14170
+ if (F.current = Pe, P?.(!1), I(We), _) {
14171
14171
  const Ve = We.find(
14172
14172
  (Ze) => _e(Ze, _)
14173
14173
  );
@@ -14207,14 +14207,14 @@ const Ip = "grid gap-1", Lp = {
14207
14207
  values: []
14208
14208
  }));
14209
14209
  return { ..._, filters: q };
14210
- }), F = ya(
14210
+ }), P = ya(
14211
14211
  G,
14212
14212
  I,
14213
14213
  t?.constraintsMap,
14214
14214
  v.map
14215
14215
  );
14216
14216
  U?.(!0), ae(
14217
- F,
14217
+ P,
14218
14218
  E,
14219
14219
  U
14220
14220
  );
@@ -14257,22 +14257,22 @@ const Ip = "grid gap-1", Lp = {
14257
14257
  }, [w, N, ie, ge]);
14258
14258
  const Re = T(
14259
14259
  async (G) => {
14260
- const I = ce.current, F = r?.map((oe) => ({
14260
+ const I = ce.current, P = r?.map((oe) => ({
14261
14261
  ...oe,
14262
14262
  disabled: H.has(oe.urn)
14263
- })), _ = F?.filter((oe) => !oe.disabled), q = Ea(
14263
+ })), _ = P?.filter((oe) => !oe.disabled), q = Ea(
14264
14264
  _,
14265
14265
  G
14266
14266
  ), Q = I ? {
14267
14267
  ...I,
14268
14268
  messages: Ya(
14269
14269
  I.messages,
14270
- F,
14270
+ P,
14271
14271
  q
14272
14272
  )
14273
14273
  } : null;
14274
14274
  m?.(Q), h?.(
14275
- F?.map((oe) => ({
14275
+ P?.map((oe) => ({
14276
14276
  ...oe,
14277
14277
  filters: oe.disabled ? oe.filters ?? [] : q.get(oe.urn) ?? []
14278
14278
  })) ?? []
@@ -14292,10 +14292,10 @@ const Ip = "grid gap-1", Lp = {
14292
14292
  ), Qe = T(
14293
14293
  (G, I) => {
14294
14294
  k(
14295
- (F) => Jo(F, G, I)
14295
+ (P) => Jo(P, G, I)
14296
14296
  ), _e(M, G) && R(
14297
- (F) => F && {
14298
- ...F,
14297
+ (P) => P && {
14298
+ ...P,
14299
14299
  displayMode: I
14300
14300
  }
14301
14301
  );
@@ -14310,30 +14310,30 @@ const Ip = "grid gap-1", Lp = {
14310
14310
  [r, t?.dimensionsMap]
14311
14311
  ), Be = T(
14312
14312
  (G, I) => {
14313
- const F = Jt(
14313
+ const P = Jt(
14314
14314
  G,
14315
14315
  I,
14316
14316
  o,
14317
14317
  v.map
14318
14318
  );
14319
- P.current = I?.constraintsMap, R(
14320
- (_) => F?.find(
14319
+ F.current = I?.constraintsMap, R(
14320
+ (_) => P?.find(
14321
14321
  (q) => _e(q, _)
14322
14322
  ) || _
14323
- ), k(F), W(!1);
14323
+ ), k(P), W(!1);
14324
14324
  },
14325
14325
  [v.map, o]
14326
14326
  ), ze = T(
14327
14327
  (G, I) => {
14328
14328
  W(!0), k(_n(G));
14329
- const F = en(
14329
+ const P = en(
14330
14330
  G,
14331
- P.current,
14331
+ F.current,
14332
14332
  !1,
14333
14333
  v.map
14334
- ), _ = P.current || t?.constraintsMap || /* @__PURE__ */ new Map(), q = pi(
14334
+ ), _ = F.current || t?.constraintsMap || /* @__PURE__ */ new Map(), q = pi(
14335
14335
  I,
14336
- F,
14336
+ P,
14337
14337
  e,
14338
14338
  v.map,
14339
14339
  G
@@ -14341,7 +14341,7 @@ const Ip = "grid gap-1", Lp = {
14341
14341
  q && fe();
14342
14342
  const Q = hi(
14343
14343
  I,
14344
- F,
14344
+ P,
14345
14345
  e,
14346
14346
  v.map,
14347
14347
  G
@@ -14351,12 +14351,12 @@ const Ip = "grid gap-1", Lp = {
14351
14351
  _,
14352
14352
  gi(oe)
14353
14353
  );
14354
- Be(F, {
14354
+ Be(P, {
14355
14355
  ...t,
14356
14356
  constraintsMap: Pe
14357
14357
  });
14358
14358
  }).catch(() => {
14359
- Be(F, {
14359
+ Be(P, {
14360
14360
  ...t,
14361
14361
  constraintsMap: _
14362
14362
  });
@@ -14376,9 +14376,9 @@ const Ip = "grid gap-1", Lp = {
14376
14376
  (G) => {
14377
14377
  const I = r?.find(
14378
14378
  (_) => _?.urn === G?.datasetUrn
14379
- ), F = Zo(D, G);
14379
+ ), P = Zo(D, G);
14380
14380
  ze(
14381
- F,
14381
+ P,
14382
14382
  G?.datasetUrn ? I ? [I] : [] : r
14383
14383
  );
14384
14384
  },
@@ -14386,12 +14386,12 @@ const Ip = "grid gap-1", Lp = {
14386
14386
  ), et = T(() => {
14387
14387
  Z(/* @__PURE__ */ new Set());
14388
14388
  }, []), ee = T((G, I) => {
14389
- Z((F) => {
14390
- const _ = new Set(F);
14389
+ Z((P) => {
14390
+ const _ = new Set(P);
14391
14391
  return I ? _.delete(G) : _.add(G), _;
14392
14392
  });
14393
14393
  }, []), we = T(() => {
14394
- P.current = J, C(Me.Closed), pe(!0);
14394
+ F.current = J, C(Me.Closed), pe(!0);
14395
14395
  }, [J]), ye = T(() => {
14396
14396
  const G = qo(D);
14397
14397
  ze(G, r), Z(/* @__PURE__ */ new Set());
@@ -14401,21 +14401,21 @@ const Ip = "grid gap-1", Lp = {
14401
14401
  disabled: H.has(oe.urn)
14402
14402
  })), I = en(
14403
14403
  D,
14404
- P.current,
14404
+ F.current,
14405
14405
  !1,
14406
14406
  v.map,
14407
14407
  H
14408
14408
  // disabled datasets are omitted from filtersParamsMap; their filters are preserved via updatedDataQueries spread
14409
- ), F = Jt(
14409
+ ), P = Jt(
14410
14410
  I,
14411
14411
  {
14412
14412
  ...t,
14413
- constraintsMap: P.current
14413
+ constraintsMap: F.current
14414
14414
  },
14415
14415
  o,
14416
14416
  v.map
14417
14417
  ), _ = Ye(I), q = Da(
14418
- D,
14418
+ P,
14419
14419
  r?.map((oe) => oe.urn) ?? [],
14420
14420
  r,
14421
14421
  v.map,
@@ -14434,13 +14434,13 @@ const Ip = "grid gap-1", Lp = {
14434
14434
  }
14435
14435
  i?.(
14436
14436
  _,
14437
- P.current,
14437
+ F.current,
14438
14438
  G?.filter(
14439
14439
  (oe) => q.has(oe.urn) || oe.disabled
14440
14440
  ),
14441
14441
  I,
14442
- F
14443
- ), E(F), C(Me.Closed), pe(!0), Ki(() => {
14442
+ P
14443
+ ), E(P), C(Me.Closed), pe(!0), Ki(() => {
14444
14444
  Re(I);
14445
14445
  });
14446
14446
  }, [
@@ -14457,7 +14457,7 @@ const Ip = "grid gap-1", Lp = {
14457
14457
  V(G);
14458
14458
  }, Fe = j(
14459
14459
  () => r?.map((G) => {
14460
- const I = t?.structuresMap?.get(G.urn)?.dataflows?.[0], F = Oe(I, o ?? ""), _ = F ? ft(F, "", I?.agencyID) : void 0;
14460
+ const I = t?.structuresMap?.get(G.urn)?.dataflows?.[0], P = Oe(I, o ?? ""), _ = P ? ft(P, "", I?.agencyID) : void 0;
14461
14461
  return _ ? { ...G, title: _ } : G;
14462
14462
  }),
14463
14463
  [r, t?.structuresMap, o]
@@ -14617,7 +14617,7 @@ const Ip = "grid gap-1", Lp = {
14617
14617
  infoSegmentHeaderClassName: p,
14618
14618
  nameAndMetadataContainerClassName: y
14619
14619
  }) => {
14620
- const { titles: g } = Ne(), v = "dataset-metadata-side-panel", [w, C] = S(""), [D, k] = S(!1), N = ue(null), [E, M] = S(""), [R, A] = S(""), [x, L] = S(!1), { onboardingFileSchema: V, isShowOnboarding: P } = lt(), { isOpenedAdvancedView: J } = Xe(), K = Ot(), { isMetadataInSidePanel: X } = Ke(), [U, Y] = S(!1), W = j(
14620
+ const { titles: g } = Ne(), v = "dataset-metadata-side-panel", [w, C] = S(""), [D, k] = S(!1), N = ue(null), [E, M] = S(""), [R, A] = S(""), [x, L] = S(!1), { onboardingFileSchema: V, isShowOnboarding: F } = lt(), { isOpenedAdvancedView: J } = Xe(), K = Ot(), { isMetadataInSidePanel: X } = Ke(), [U, Y] = S(!1), W = j(
14621
14621
  () => i?.isMetadataDescription ? Em(n, w, o, g) : [],
14622
14622
  [
14623
14623
  n,
@@ -14683,18 +14683,18 @@ const Ip = "grid gap-1", Lp = {
14683
14683
  const Z = l && l(ne) || mn(ln(n), o);
14684
14684
  C(Z);
14685
14685
  }, [n, o, ne, l]), O(() => {
14686
- if (P) {
14686
+ if (F) {
14687
14687
  const { title: H, description: Z } = St(
14688
14688
  Ue.METADATA_PER_DATASET,
14689
14689
  g
14690
14690
  );
14691
14691
  M(H), A(Z);
14692
14692
  }
14693
- }, [g, P]), O(() => {
14694
- P && L(
14693
+ }, [g, F]), O(() => {
14694
+ F && L(
14695
14695
  V?.lastDisplayedElement === Ue.METADATA_PER_DATASET
14696
14696
  );
14697
- }, [V?.lastDisplayedElement, P]);
14697
+ }, [V?.lastDisplayedElement, F]);
14698
14698
  const pe = (H, Z) => /* @__PURE__ */ b(
14699
14699
  "div",
14700
14700
  {
@@ -15414,7 +15414,7 @@ function Hl(e, t, n, s, r, i, o, l, a, d = !1, c, m = !1) {
15414
15414
  Lg(o?.dataGrid)
15415
15415
  ), [N, E] = S(
15416
15416
  Vl(o?.chart)
15417
- ), [M, R] = S(!1), [A, x] = S([]), [L, V] = S([]), [P, J] = S([]), [K, X] = S(!1), [U, Y] = S(!1), W = ue(0), [ne, se] = S({
15417
+ ), [M, R] = S(!1), [A, x] = S([]), [L, V] = S([]), [F, J] = S([]), [K, X] = S(!1), [U, Y] = S(!1), W = ue(0), [ne, se] = S({
15418
15418
  startPeriod: null,
15419
15419
  endPeriod: null
15420
15420
  }), {
@@ -15632,7 +15632,7 @@ function Hl(e, t, n, s, r, i, o, l, a, d = !1, c, m = !1) {
15632
15632
  structures: w,
15633
15633
  dataset: p,
15634
15634
  dimensions: L,
15635
- structureDimensions: P,
15635
+ structureDimensions: F,
15636
15636
  onFiltersChange: re,
15637
15637
  constraints: g,
15638
15638
  isLoadingGridData: K || U,
@@ -15973,7 +15973,7 @@ function Bl(e, t, n, s, r, i, o, l, a, d = ot.Compact, c) {
15973
15973
  k
15974
15974
  ] = S(!1), N = ue(0), E = ue(d), M = ue(f), [R, A] = S(
15975
15975
  Pg(c?.dataGrid)
15976
- ), [x, L] = S(Vl(c?.chart)), [V, P] = S(!1), [J, K] = S([]), {
15976
+ ), [x, L] = S(Vl(c?.chart)), [V, F] = S(!1), [J, K] = S([]), {
15977
15977
  getConstraints: X,
15978
15978
  getDataSet: U,
15979
15979
  getDataSetData: Y,
@@ -16163,14 +16163,14 @@ function Bl(e, t, n, s, r, i, o, l, a, d = ot.Compact, c) {
16163
16163
  ...de,
16164
16164
  charting_data: void 0,
16165
16165
  getChartingData: ge
16166
- })), P(!1), rn(() => {
16166
+ })), F(!1), rn(() => {
16167
16167
  try {
16168
- P(Pl(ge()));
16168
+ F(Pl(ge()));
16169
16169
  } catch (de) {
16170
16170
  console.error(
16171
16171
  "Error evaluating cross-dataset chart plottability",
16172
16172
  de
16173
- ), P(!1);
16173
+ ), F(!1);
16174
16174
  }
16175
16175
  });
16176
16176
  }
@@ -16356,11 +16356,11 @@ const zl = ht(void 0), Kg = {
16356
16356
  ), L = w === x ? v : Sa(
16357
16357
  e.dataQueries,
16358
16358
  N.map
16359
- ), V = D && !!e.dataQueries?.length, P = ue(f.filtersProps.conversation);
16360
- P.current = f.filtersProps.conversation;
16359
+ ), V = D && !!e.dataQueries?.length, F = ue(f.filtersProps.conversation);
16360
+ F.current = f.filtersProps.conversation;
16361
16361
  const J = T(
16362
16362
  (de) => {
16363
- const Ae = P.current;
16363
+ const Ae = F.current;
16364
16364
  if (!Ae) return;
16365
16365
  const ke = Gl(
16366
16366
  Ae.messages,
@@ -16973,7 +16973,7 @@ const Qg = ({ stage: e, stageRef: t, isCurrentStage: n }) => /* @__PURE__ */ b(
16973
16973
  editMessageTitles: k,
16974
16974
  expandStagesIcon: N,
16975
16975
  titles: E
16976
- } = Ne(), [M, R] = S(), [A, x] = S(), [L, V] = S([]), [P, J] = S(
16976
+ } = Ne(), [M, R] = S(), [A, x] = S(), [L, V] = S([]), [F, J] = S(
16977
16977
  []
16978
16978
  ), [K, X] = S(), [U, Y] = S(!1), { isCrossDatasetModeOn: W } = Ke(), ne = tr(), se = e.role === Je.User, he = e.role === Je.System, {
16979
16979
  datasets: be,
@@ -17117,7 +17117,7 @@ const Qg = ({ stage: e, stageRef: t, isCurrentStage: n }) => /* @__PURE__ */ b(
17117
17117
  kl,
17118
17118
  {
17119
17119
  actions: n,
17120
- attachments: U ? W ? Ye : B : P,
17120
+ attachments: U ? W ? Ye : B : F,
17121
17121
  onAdvancedViewOpen: d,
17122
17122
  isDataSetAttachments: U,
17123
17123
  datasets: be,
@@ -17137,7 +17137,7 @@ const Qg = ({ stage: e, stageRef: t, isCurrentStage: n }) => /* @__PURE__ */ b(
17137
17137
  n,
17138
17138
  U,
17139
17139
  B,
17140
- P,
17140
+ F,
17141
17141
  Ye,
17142
17142
  be,
17143
17143
  K,
@@ -17531,7 +17531,7 @@ const g1 = (e, t, n, s) => {
17531
17531
  headerRightSlot: L,
17532
17532
  children: V
17533
17533
  }) => {
17534
- const [P, J] = S(null), [K, X] = S(!1), [U, Y] = S(!0), { isStreaming: W, setIsStreaming: ne } = gd(), { isOpenedAdvancedView: se } = Xe(), { setCrossDatasetAttachmentsState: he } = rr(), { isCrossDatasetModeOn: be } = Ke(), { isAgentAvailable: pe } = Un(), { statusMessages: H } = So(), {
17534
+ const [F, J] = S(null), [K, X] = S(!1), [U, Y] = S(!0), { isStreaming: W, setIsStreaming: ne } = gd(), { isOpenedAdvancedView: se } = Xe(), { setCrossDatasetAttachmentsState: he } = rr(), { isCrossDatasetModeOn: be } = Ke(), { isAgentAvailable: pe } = Un(), { statusMessages: H } = So(), {
17535
17535
  onboardingFileSchema: Z,
17536
17536
  onboardingFilePath: ce,
17537
17537
  onboardingFileName: fe,
@@ -17558,13 +17558,13 @@ const g1 = (e, t, n, s) => {
17558
17558
  D(`/${m}${f}`);
17559
17559
  }, [m, f, D]), B = T(async () => {
17560
17560
  try {
17561
- const { bucket: I } = await n.getBucket(), F = n.getFileBlob && n.putFile ? await y1({
17561
+ const { bucket: I } = await n.getBucket(), P = n.getFileBlob && n.putFile ? await y1({
17562
17562
  conversation: t,
17563
17563
  bucket: I,
17564
17564
  getFileBlob: n.getFileBlob,
17565
17565
  putFile: n.putFile
17566
17566
  }) : t, _ = v1(
17567
- F,
17567
+ P,
17568
17568
  I,
17569
17569
  m
17570
17570
  );
@@ -17595,17 +17595,17 @@ const g1 = (e, t, n, s) => {
17595
17595
  messages: I.messages,
17596
17596
  customViewState: I.customViewState
17597
17597
  });
17598
- } catch (F) {
17599
- console.error("Failed to save conversation:", F);
17598
+ } catch (P) {
17599
+ console.error("Failed to save conversation:", P);
17600
17600
  }
17601
17601
  },
17602
17602
  [n, e]
17603
17603
  ), le = T(
17604
- (I, F) => {
17604
+ (I, P) => {
17605
17605
  if (!t) return;
17606
17606
  const _ = Gl(
17607
17607
  t.messages,
17608
- F,
17608
+ P,
17609
17609
  I
17610
17610
  );
17611
17611
  if (!_) return;
@@ -17619,9 +17619,9 @@ const g1 = (e, t, n, s) => {
17619
17619
  ), ie = T(
17620
17620
  (I) => {
17621
17621
  w(
17622
- (F) => F ? {
17623
- ...F,
17624
- messages: [...F?.messages || [], I]
17622
+ (P) => P ? {
17623
+ ...P,
17624
+ messages: [...P?.messages || [], I]
17625
17625
  } : null
17626
17626
  );
17627
17627
  },
@@ -17634,15 +17634,15 @@ const g1 = (e, t, n, s) => {
17634
17634
  timestamp: Date.now()
17635
17635
  };
17636
17636
  return w(
17637
- (F) => F ? {
17638
- ...F,
17639
- messages: [...F.messages, I]
17637
+ (P) => P ? {
17638
+ ...P,
17639
+ messages: [...P.messages, I]
17640
17640
  } : null
17641
17641
  ), I;
17642
17642
  }, [w]), ge = T(
17643
- (I, F) => {
17643
+ (I, P) => {
17644
17644
  const _ = vc?.(I, [
17645
- F
17645
+ P
17646
17646
  ]);
17647
17647
  if (_)
17648
17648
  return w(
@@ -17656,18 +17656,18 @@ const g1 = (e, t, n, s) => {
17656
17656
  },
17657
17657
  [w]
17658
17658
  ), de = T(
17659
- (I, F) => {
17659
+ (I, P) => {
17660
17660
  t?.model?.id && (n.rateResponse(
17661
17661
  I,
17662
- F === Nt.Liked,
17662
+ P === Nt.Liked,
17663
17663
  t.model.id
17664
17664
  ), t.messages = t.messages.map(
17665
- (_) => _.responseId === I ? ud(_, { like: F }) : _
17665
+ (_) => _.responseId === I ? ud(_, { like: P }) : _
17666
17666
  ), z(t));
17667
17667
  },
17668
17668
  [n, t, z]
17669
17669
  ), Ae = T(
17670
- (I, F) => {
17670
+ (I, P) => {
17671
17671
  let _ = H.serverError, q, Q;
17672
17672
  if (Ac(I)) {
17673
17673
  Q = I;
@@ -17681,13 +17681,13 @@ const g1 = (e, t, n, s) => {
17681
17681
  status: kn.INTERNAL_SERVER_ERROR,
17682
17682
  message: _
17683
17683
  });
17684
- return F && (F = ge(F, {
17684
+ return P && (P = ge(P, {
17685
17685
  errorMessage: _
17686
- })), g?.(Q), { assistantMessage: F, errorContext: q };
17686
+ })), g?.(Q), { assistantMessage: P, errorContext: q };
17687
17687
  },
17688
17688
  [g, H, ge]
17689
17689
  ), ke = T(
17690
- async (I, F, _) => {
17690
+ async (I, P, _) => {
17691
17691
  const q = new AbortController();
17692
17692
  J(q);
17693
17693
  let Q = I, oe;
@@ -17706,7 +17706,7 @@ const g1 = (e, t, n, s) => {
17706
17706
  };
17707
17707
  return await Cc?.(
17708
17708
  encodeURI(_.id),
17709
- F,
17709
+ P,
17710
17710
  {
17711
17711
  model: _.model,
17712
17712
  signal: q?.signal,
@@ -17746,55 +17746,55 @@ const g1 = (e, t, n, s) => {
17746
17746
  be
17747
17747
  ]
17748
17748
  ), ae = T(
17749
- async (I, F, _, q) => {
17750
- if (!F) return;
17749
+ async (I, P, _, q) => {
17750
+ if (!P) return;
17751
17751
  let Q = Ji(
17752
- F,
17752
+ P,
17753
17753
  q
17754
17754
  );
17755
17755
  Q = {
17756
17756
  ...Q,
17757
- messages: [...F.messages],
17757
+ messages: [...P.messages],
17758
17758
  updatedAt: Date.now()
17759
17759
  }, _ && Q.messages.push(_), Q.messages.push(I), await z(Q);
17760
17760
  },
17761
17761
  [z]
17762
17762
  ), Re = T(
17763
17763
  (I) => {
17764
- w((F) => F && Ji(F, I));
17764
+ w((P) => P && Ji(P, I));
17765
17765
  },
17766
17766
  [w]
17767
17767
  ), Qe = T(
17768
- (I, F) => {
17768
+ (I, P) => {
17769
17769
  w(
17770
17770
  (_) => _ ? {
17771
17771
  ..._,
17772
17772
  messages: _.messages.filter(
17773
- (q) => q.id !== F.id
17773
+ (q) => q.id !== P.id
17774
17774
  )
17775
17775
  } : null
17776
17776
  );
17777
17777
  },
17778
17778
  [w]
17779
17779
  ), Ye = T(() => {
17780
- P && !P.signal.aborted && P.abort();
17781
- }, [P]), Be = (I) => I?.name === D1, ze = T(
17782
- async (I, F, _, q, Q, oe = !0) => {
17780
+ F && !F.signal.aborted && F.abort();
17781
+ }, [F]), Be = (I) => I?.name === D1, ze = T(
17782
+ async (I, P, _, q, Q, oe = !0) => {
17783
17783
  Be(Q) ? await ae(
17784
17784
  q ?? _,
17785
17785
  I,
17786
- oe ? F : void 0
17787
- ) : Qe(Q, F);
17786
+ oe ? P : void 0
17787
+ ) : Qe(Q, P);
17788
17788
  },
17789
17789
  [ae, Qe]
17790
17790
  ), it = T(
17791
- async (I, F, _) => {
17792
- if (!F || !I)
17791
+ async (I, P, _) => {
17792
+ if (!P || !I)
17793
17793
  return;
17794
17794
  const q = g1(
17795
17795
  I,
17796
17796
  W,
17797
- F,
17797
+ P,
17798
17798
  _
17799
17799
  );
17800
17800
  let Q, oe;
@@ -17802,20 +17802,20 @@ const g1 = (e, t, n, s) => {
17802
17802
  ie(q);
17803
17803
  try {
17804
17804
  ne(!0), Q = ve();
17805
- const Pe = f1(q, F), { assistantMessage: We, errorContext: Ve } = await ke(
17805
+ const Pe = f1(q, P), { assistantMessage: We, errorContext: Ve } = await ke(
17806
17806
  Q,
17807
17807
  Pe,
17808
- F
17808
+ P
17809
17809
  );
17810
17810
  Re(Ve), oe = We, await ae(
17811
17811
  oe,
17812
- F,
17812
+ P,
17813
17813
  q,
17814
17814
  Ve
17815
17815
  );
17816
17816
  } catch (Pe) {
17817
17817
  ze(
17818
- F,
17818
+ P,
17819
17819
  q,
17820
17820
  Q,
17821
17821
  oe,
@@ -17837,24 +17837,24 @@ const g1 = (e, t, n, s) => {
17837
17837
  Re
17838
17838
  ]
17839
17839
  ), et = T(
17840
- async (I, F, _) => {
17840
+ async (I, P, _) => {
17841
17841
  let q, Q;
17842
17842
  try {
17843
17843
  ne(!0), q = ve();
17844
17844
  const { assistantMessage: oe, errorContext: Pe } = await ke(
17845
17845
  q,
17846
17846
  I,
17847
- F
17847
+ P
17848
17848
  );
17849
17849
  Q = oe, Re(Pe), await ae(
17850
17850
  Q,
17851
- F,
17851
+ P,
17852
17852
  void 0,
17853
17853
  Pe
17854
17854
  );
17855
17855
  } catch (oe) {
17856
17856
  ze(
17857
- F,
17857
+ P,
17858
17858
  _,
17859
17859
  q,
17860
17860
  Q,
@@ -17874,12 +17874,12 @@ const g1 = (e, t, n, s) => {
17874
17874
  Re
17875
17875
  ]
17876
17876
  ), ee = T(
17877
- async (I, F) => {
17878
- if (!F || !I)
17877
+ async (I, P) => {
17878
+ if (!P || !I)
17879
17879
  return;
17880
- const _ = m1(I, F), q = {
17881
- ...F,
17882
- messages: F.messages.slice(0, _.length)
17880
+ const _ = m1(I, P), q = {
17881
+ ...P,
17882
+ messages: P.messages.slice(0, _.length)
17883
17883
  };
17884
17884
  w(
17885
17885
  (Q) => Q ? {
@@ -17893,12 +17893,12 @@ const g1 = (e, t, n, s) => {
17893
17893
  const I = t?.messages?.at(-1);
17894
17894
  return { isLastMessageFailed: !!I?.errorMessage, regenerateLastMessage: I && (() => ee(I, t)) };
17895
17895
  }, [t, ee]), Ce = T(
17896
- async (I, F) => {
17897
- if (!F || !I)
17896
+ async (I, P) => {
17897
+ if (!P || !I)
17898
17898
  return;
17899
- const _ = h1(I, F), q = {
17900
- ...F,
17901
- messages: [...F.messages.slice(0, _.length - 1), I]
17899
+ const _ = h1(I, P), q = {
17900
+ ...P,
17901
+ messages: [...P.messages.slice(0, _.length - 1), I]
17902
17902
  };
17903
17903
  w(
17904
17904
  (Q) => Q ? {
@@ -17914,9 +17914,9 @@ const g1 = (e, t, n, s) => {
17914
17914
  async function I() {
17915
17915
  try {
17916
17916
  Y(!0);
17917
- const { bucket: F } = await n.getBucket(), _ = await n.getConversation(decodeURI(e));
17917
+ const { bucket: P } = await n.getBucket(), _ = await n.getConversation(decodeURI(e));
17918
17918
  w(_), X(
17919
- c1(_) && d1(_, F)
17919
+ c1(_) && d1(_, P)
17920
17920
  ), (_.messages.length === 0 || _?.messages?.[0]?.role === Je.Assistant && _?.messages?.length === 1) && it(_.prompt, _);
17921
17921
  } catch {
17922
17922
  X(!0), v?.();
@@ -17950,10 +17950,10 @@ const g1 = (e, t, n, s) => {
17950
17950
  Fe.errorContext
17951
17951
  );
17952
17952
  if (I) {
17953
- const F = Dc(I);
17953
+ const P = Dc(I);
17954
17954
  return /* @__PURE__ */ u(_t, { type: kt.Info, children: H.getAssistantRestoreMessage(
17955
- F.date,
17956
- F.time
17955
+ P.date,
17956
+ P.time
17957
17957
  ) });
17958
17958
  }
17959
17959
  }
@@ -18028,10 +18028,10 @@ const g1 = (e, t, n, s) => {
18028
18028
  dataQuery: y,
18029
18029
  locale: m,
18030
18030
  regenerateMessage: (I) => ee(I, t),
18031
- selectMessageToSend: (I, F) => it(
18031
+ selectMessageToSend: (I, P) => it(
18032
18032
  I,
18033
18033
  t,
18034
- F
18034
+ P
18035
18035
  ),
18036
18036
  rateResponse: de,
18037
18037
  editMessage: (I) => Ce(I, t),