@ssgc/alert-console 2.8.2 → 2.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -307,8 +307,8 @@ function ci() {
307
307
  return { M: m, y: p, w: d, d: u, D: k, h: o, m: l, s: i, ms: a, Q: w }[L] || String(L || "").toLowerCase().replace(/s$/, "");
308
308
  }, u: function(L) {
309
309
  return L === void 0;
310
- } }, R = "en", V = {};
311
- V[R] = F;
310
+ } }, R = "en", Z = {};
311
+ Z[R] = F;
312
312
  var C = "$isDayjsObject", q = function(L) {
313
313
  return L instanceof oe || !(!L || !L[C]);
314
314
  }, h = function L(A, v, x) {
@@ -316,12 +316,12 @@ function ci() {
316
316
  if (!A) return R;
317
317
  if (typeof A == "string") {
318
318
  var U = A.toLowerCase();
319
- V[U] && (T = U), v && (V[U] = v, T = U);
319
+ Z[U] && (T = U), v && (Z[U] = v, T = U);
320
320
  var P = A.split("-");
321
321
  if (!T && P.length > 1) return L(P[0]);
322
322
  } else {
323
323
  var Y = A.name;
324
- V[Y] = A, T = Y;
324
+ Z[Y] = A, T = Y;
325
325
  }
326
326
  return !x && T && (R = T), T || !x && R;
327
327
  }, S = function(L, A) {
@@ -531,7 +531,7 @@ function ci() {
531
531
  }, A.daysInMonth = function() {
532
532
  return this.endOf(m).$D;
533
533
  }, A.$locale = function() {
534
- return V[this.$L];
534
+ return Z[this.$L];
535
535
  }, A.locale = function(v, x) {
536
536
  if (!v) return this.$L;
537
537
  var T = this.clone(), U = h(v, x, !0);
@@ -556,7 +556,7 @@ function ci() {
556
556
  return L.$i || (L(A, oe, S), L.$i = !0), S;
557
557
  }, S.locale = h, S.isDayjs = q, S.unix = function(L) {
558
558
  return S(1e3 * L);
559
- }, S.en = V[R], S.Ls = V, S.p = {}, S;
559
+ }, S.en = Z[R], S.Ls = Z, S.p = {}, S;
560
560
  }));
561
561
  })(us)), us.exports;
562
562
  }
@@ -934,7 +934,7 @@ function gi(t) {
934
934
  })), R = k.map((h) => ({
935
935
  recordId: h?.AnomalyId,
936
936
  anomalyName: h?.DisplayName ?? h?.Name ?? ""
937
- })), V = D.map((h) => ({
937
+ })), Z = D.map((h) => ({
938
938
  thirdPartyId: Number(h?.ThirdPartyId),
939
939
  thirdPartyName: h?.ThirdPartyName ?? h?.Name ?? ""
940
940
  })), C = W.map((h) => ({
@@ -943,7 +943,7 @@ function gi(t) {
943
943
  })), q = {
944
944
  actionTypes: N,
945
945
  anomalies: R,
946
- thirdParties: V
946
+ thirdParties: Z
947
947
  };
948
948
  return E.length && (q.severities = E.map((h) => ({
949
949
  severityId: h?.SeverityId ?? h?.severityId,
@@ -1063,15 +1063,15 @@ function vi(t) {
1063
1063
  const R = N.map((C) => ({
1064
1064
  userRoleId: C.userRoleId ?? 0,
1065
1065
  userRoleName: C.userRoleName ?? ""
1066
- })), V = {
1066
+ })), Z = {
1067
1067
  actionTypes: G,
1068
1068
  anomalies: F,
1069
1069
  thirdParties: W
1070
1070
  };
1071
- return D.length && (V.severities = D.map((C) => ({
1071
+ return D.length && (Z.severities = D.map((C) => ({
1072
1072
  SeverityId: C.SeverityId,
1073
1073
  DisplayName: C.SeverityName ?? C.DisplayName ?? ""
1074
- }))), R.length && (V.userRoles = R), V;
1074
+ }))), R.length && (Z.userRoles = R), Z;
1075
1075
  },
1076
1076
  async updateRule(n, r) {
1077
1077
  const a = new URL("/update-rule", t.baseUrl).toString(), { escalationSettings: i, ruleId: l, ruleName: o, ruleDesc: u, ...d } = r ?? {}, m = i ?? {}, w = (m.escalationSettingsActionTypeIds ?? []).filter((k) => k != null && !Number.isNaN(k)), p = {
@@ -1673,9 +1673,9 @@ const Tr = [
1673
1673
  "elopement confirmed"
1674
1674
  ];
1675
1675
  function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage: r, columns: a, severityOptions: i, anomalyOptions: l, spaceOptions: o, renderActions: u, onAlertIdClick: d, onRefetch: m, onPageChange: w, onFilterChange: p, excludeCompleted: k = !0, resetKey: D, serverSideFilters: E = !1 }) {
1676
- const [G, F] = g("All"), [W, N] = g("All"), [R, V] = g("All"), [C, q] = g("All"), [h, S] = g("");
1676
+ const [G, F] = g("All"), [W, N] = g("All"), [R, Z] = g("All"), [C, q] = g("All"), [h, S] = g("");
1677
1677
  de(() => {
1678
- D !== void 0 && (F("All"), N("All"), V("All"), q("All"), S(""));
1678
+ D !== void 0 && (F("All"), N("All"), Z("All"), q("All"), S(""));
1679
1679
  }, [D]);
1680
1680
  const [M, oe] = g([{ label: "All", value: "All" }]), [re, L] = g([]), [A, v] = g([]), [x, T] = g([]), [U, P] = g(/* @__PURE__ */ new Set()), { rules: Y, alerts: _ } = $e(), te = {
1681
1681
  6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ c($a, {}) },
@@ -1686,16 +1686,16 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1686
1686
  let Q = !0;
1687
1687
  return (async () => {
1688
1688
  try {
1689
- const Z = await _.getAllSpaces();
1689
+ const V = await _.getAllSpaces();
1690
1690
  if (Q) {
1691
- const Se = Z.map((he) => ({
1691
+ const Se = V.map((he) => ({
1692
1692
  label: he.spaceName,
1693
1693
  value: String(he.spaceId)
1694
1694
  }));
1695
1695
  L([{ label: "All", value: "All" }, ...Se]);
1696
1696
  }
1697
- } catch (Z) {
1698
- console.error("Error loading space options", Z);
1697
+ } catch (V) {
1698
+ console.error("Error loading space options", V);
1699
1699
  }
1700
1700
  })(), () => {
1701
1701
  Q = !1;
@@ -1704,19 +1704,19 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1704
1704
  let Q = !0;
1705
1705
  return (async () => {
1706
1706
  try {
1707
- const Z = await Y.getLookups(), he = (Array.isArray(Z.thirdParties) ? Z.thirdParties : []).map((we) => ({
1707
+ const V = await Y.getLookups(), he = (Array.isArray(V.thirdParties) ? V.thirdParties : []).map((we) => ({
1708
1708
  label: we.thirdPartyName,
1709
1709
  value: String(we.thirdPartyId)
1710
- })), Pe = (Array.isArray(Z.anomalies) ? Z.anomalies : []).map((we) => ({
1710
+ })), Pe = (Array.isArray(V.anomalies) ? V.anomalies : []).map((we) => ({
1711
1711
  label: we.anomalyName,
1712
1712
  value: String(we.recordId)
1713
- })), Ge = (Array.isArray(Z.severities) ? Z.severities : []).map((we) => ({
1713
+ })), Ge = (Array.isArray(V.severities) ? V.severities : []).map((we) => ({
1714
1714
  label: we.severityName,
1715
1715
  value: String(we.severityId)
1716
1716
  }));
1717
1717
  Q && (oe([{ label: "All", value: "All" }, ...he]), Pe.length && v([{ label: "All Types", value: "All" }, ...Pe]), Ge.length && T([{ label: "All levels", value: "All" }, ...Ge]));
1718
- } catch (Z) {
1719
- console.error("Error loading filter options", Z);
1718
+ } catch (V) {
1719
+ console.error("Error loading filter options", V);
1720
1720
  }
1721
1721
  })(), () => {
1722
1722
  Q = !1;
@@ -1740,8 +1740,8 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1740
1740
  }, [W, R, G, C, A.length, re.length, x.length]);
1741
1741
  const le = ge(() => {
1742
1742
  const Q = E;
1743
- return (t || []).filter((Z) => {
1744
- const Se = Q || G === "All" || Z.priority === G, he = `${Z.id} ${Z.description} ${Z.statusType}`.toLowerCase(), Ie = !h || he.includes(h.toLowerCase()), Pe = Q || W === "All" || (Z.anomalyName || "").toLowerCase() === W.toLowerCase(), qe = Q || R === "All" || (Z.spaceName || "").toLowerCase() === R.toLowerCase(), Ge = Q || !Ne || C === "All" || kn(Z).includes(Number(C)), we = hs(String(Z.statusType || "")), We = !k || !Tr.some((yt) => we.includes(hs(yt)));
1743
+ return (t || []).filter((V) => {
1744
+ const Se = Q || G === "All" || V.priority === G, he = `${V.id} ${V.alertNumber} ${V.description} ${V.statusType}`.toLowerCase(), Ie = !h || he.includes(h.toLowerCase()), Pe = Q || W === "All" || (V.anomalyName || "").toLowerCase() === W.toLowerCase(), qe = Q || R === "All" || (V.spaceName || "").toLowerCase() === R.toLowerCase(), Ge = Q || !Ne || C === "All" || kn(V).includes(Number(C)), we = hs(String(V.statusType || "")), We = !k || !Tr.some((yt) => we.includes(hs(yt)));
1745
1745
  return Se && Ie && Pe && qe && Ge && We;
1746
1746
  });
1747
1747
  }, [t, G, h, W, R, C, Ne, k, E]), fe = l?.length ? l : ne, Ae = E && A.length > 1 ? A : fe, ie = o?.length ? o : me, ce = E && re.length > 1 ? re : ie, be = E && x.length > 1 ? x : i, ze = [
@@ -1756,11 +1756,11 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1756
1756
  title: "Tracker",
1757
1757
  key: "tracker",
1758
1758
  width: 140,
1759
- render: (Q, Z) => /* @__PURE__ */ c(
1759
+ render: (Q, V) => /* @__PURE__ */ c(
1760
1760
  "a",
1761
1761
  {
1762
1762
  onClick: (Se) => {
1763
- Se.preventDefault(), d?.(Z, { tab: "track", sourceTab: "active" });
1763
+ Se.preventDefault(), d?.(V, { tab: "track", sourceTab: "active" });
1764
1764
  },
1765
1765
  className: "text-blue-600 hover:underline",
1766
1766
  children: "Tracker"
@@ -1771,13 +1771,13 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1771
1771
  title: "Call to action/Human in the loop",
1772
1772
  key: "actions",
1773
1773
  width: 320,
1774
- render: (Q, Z) => {
1775
- if (u) return /* @__PURE__ */ c(ur, { children: u(Z) });
1774
+ render: (Q, V) => {
1775
+ if (u) return /* @__PURE__ */ c(ur, { children: u(V) });
1776
1776
  const Se = async (pt, Pt) => {
1777
- const Nt = Rs(Z.id, pt);
1777
+ const Nt = Rs(V.id, pt);
1778
1778
  P((ke) => new Set(ke).add(Nt));
1779
1779
  try {
1780
- const ke = await _.sendSMSorEmailNotifications?.(Z.id, pt, Pt);
1780
+ const ke = await _.sendSMSorEmailNotifications?.(V.id, pt, Pt);
1781
1781
  ke?.responseStatus || ke?.Success || ke?.success ? (Te.success(ke?.message || ke.data || (pt ? "Email sent successfully" : "SMS sent successfully")), m?.()) : Te.error(ke?.message || ke?.data || ke?.errorMessage || "Failed to send notification");
1782
1782
  } catch (ke) {
1783
1783
  Te.error(ke?.message || "Failed to send notification");
@@ -1787,7 +1787,7 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1787
1787
  return bt.delete(Nt), bt;
1788
1788
  });
1789
1789
  }
1790
- }, he = cn, Ie = un, Pe = te[he], qe = te[Ie], Ge = Mn(he, Z, Pe?.title), we = Mn(Ie, Z, qe?.title), We = Rs(Z.id, !0), yt = Rs(Z.id, !1), At = ns(he) && U.has(We), Tt = ns(Ie) && U.has(yt);
1790
+ }, he = cn, Ie = un, Pe = te[he], qe = te[Ie], Ge = Mn(he, V, Pe?.title), we = Mn(Ie, V, qe?.title), We = Rs(V.id, !0), yt = Rs(V.id, !1), At = ns(he) && U.has(We), Tt = ns(Ie) && U.has(yt);
1791
1791
  return /* @__PURE__ */ y(rt, { size: "middle", children: [
1792
1792
  /* @__PURE__ */ c(An, { title: Ge.tooltipTitle, children: /* @__PURE__ */ c(
1793
1793
  Fe,
@@ -1823,14 +1823,14 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1823
1823
  dataIndex: "timestamp",
1824
1824
  key: "timestamp",
1825
1825
  width: 220,
1826
- render: (Q, Z) => {
1827
- const Se = Z?.timeElapsed, he = Z?.timeRemaining, Ie = Se ? bn(Se) : 0, Pe = he ? bn(he) : 0, qe = Math.round(Ie / (Ie + Pe) * 100);
1826
+ render: (Q, V) => {
1827
+ const Se = V?.timeElapsed, he = V?.timeRemaining, Ie = Se ? bn(Se) : 0, Pe = he ? bn(he) : 0, qe = Math.round(Ie / (Ie + Pe) * 100);
1828
1828
  return /* @__PURE__ */ y("div", { children: [
1829
1829
  /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
1830
1830
  /* @__PURE__ */ c("span", { className: "w-[70px]", children: "Elapsed:" }),
1831
1831
  /* @__PURE__ */ c("span", { className: "font-medium", children: Se ?? "-" })
1832
1832
  ] }),
1833
- /* @__PURE__ */ c(Da, { percent: qe, showInfo: !1, size: "small", strokeColor: Ka(Z.priority) }),
1833
+ /* @__PURE__ */ c(Da, { percent: qe, showInfo: !1, size: "small", strokeColor: Ka(V.priority) }),
1834
1834
  /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
1835
1835
  /* @__PURE__ */ c("span", { className: "w-[70px]", children: "Remaining" }),
1836
1836
  /* @__PURE__ */ c("span", { className: "font-medium", children: he ?? "-" })
@@ -1848,15 +1848,15 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1848
1848
  title: "Description",
1849
1849
  dataIndex: "description",
1850
1850
  key: "description",
1851
- render: (Q, Z) => /* @__PURE__ */ y("div", { children: [
1851
+ render: (Q, V) => /* @__PURE__ */ y("div", { children: [
1852
1852
  /* @__PURE__ */ c(
1853
1853
  "a",
1854
1854
  {
1855
1855
  onClick: (Se) => {
1856
- Se.preventDefault(), d?.(Z, { sourceTab: "active" });
1856
+ Se.preventDefault(), d?.(V, { sourceTab: "active" });
1857
1857
  },
1858
1858
  className: "inline-block mb-1 text-blue-600",
1859
- children: Z.alertNumber
1859
+ children: V.alertNumber
1860
1860
  }
1861
1861
  ),
1862
1862
  /* @__PURE__ */ c("div", { className: "text-black/65", children: Q })
@@ -1867,7 +1867,7 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1867
1867
  key: "preview",
1868
1868
  width: 100,
1869
1869
  align: "center",
1870
- render: (Q, Z) => /* @__PURE__ */ c(Ar, { record: Z })
1870
+ render: (Q, V) => /* @__PURE__ */ c(Ar, { record: V })
1871
1871
  }
1872
1872
  ], He = a && a.length ? a : ze;
1873
1873
  return /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
@@ -1892,7 +1892,7 @@ function Nr({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1892
1892
  ] }) }),
1893
1893
  /* @__PURE__ */ c(j, { flex: "none", children: /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
1894
1894
  /* @__PURE__ */ c("span", { children: "Space" }),
1895
- /* @__PURE__ */ c(Di, { value: R, onChange: V, options: ce })
1895
+ /* @__PURE__ */ c(Di, { value: R, onChange: Z, options: ce })
1896
1896
  ] }) }),
1897
1897
  /* @__PURE__ */ c(j, { flex: "none", children: /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
1898
1898
  /* @__PURE__ */ c("span", { children: "Action Taken" }),
@@ -6047,7 +6047,7 @@ class B {
6047
6047
  const N = D ? To(a, i, l) : d ? No(a) : Kr(a), R = N || Qr(a);
6048
6048
  if (R)
6049
6049
  return B.invalid(R);
6050
- const V = D ? Bn(a, i, l) : d ? zn(a) : a, [C, q] = ds(V, u, n), h = new B({
6050
+ const Z = D ? Bn(a, i, l) : d ? zn(a) : a, [C, q] = ds(Z, u, n), h = new B({
6051
6051
  ts: C,
6052
6052
  zone: n,
6053
6053
  o: q,
@@ -7827,7 +7827,7 @@ function rc(t) {
7827
7827
  setActions: W,
7828
7828
  thirdPartyIds: N,
7829
7829
  setThirdPartyIds: R,
7830
- humanLoop: V,
7830
+ humanLoop: Z,
7831
7831
  setHumanLoop: C,
7832
7832
  isAutoExpire: q,
7833
7833
  setAutoExpire: h,
@@ -7856,7 +7856,7 @@ function rc(t) {
7856
7856
  le = !0;
7857
7857
  };
7858
7858
  }, []);
7859
- const te = typeof i == "number" || typeof o == "number", ne = typeof d == "number" || typeof w == "number", me = typeof i == "number" || typeof o == "number" || typeof d == "number" || typeof w == "number" || typeof k == "number" || typeof E == "number" || Array.isArray(F) && F.length > 0 || Array.isArray(N) && N.length > 0 || !!V || !!q;
7859
+ const te = typeof i == "number" || typeof o == "number", ne = typeof d == "number" || typeof w == "number", me = typeof i == "number" || typeof o == "number" || typeof d == "number" || typeof w == "number" || typeof k == "number" || typeof E == "number" || Array.isArray(F) && F.length > 0 || Array.isArray(N) && N.length > 0 || !!Z || !!q;
7860
7860
  return /* @__PURE__ */ y(ws, { spinning: !!oe || Y, children: [
7861
7861
  /* @__PURE__ */ y(Le, { gutter: [16, 16], align: "bottom", children: [
7862
7862
  /* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ y("div", { children: [
@@ -7991,7 +7991,7 @@ function rc(t) {
7991
7991
  ] }),
7992
7992
  /* @__PURE__ */ y(Le, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
7993
7993
  /* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, lg: 7, children: /* @__PURE__ */ y("div", { className: "flex items-center h-full gap-8", children: [
7994
- !v && /* @__PURE__ */ c(Ot, { checked: V, onChange: (le) => C(le.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
7994
+ !v && /* @__PURE__ */ c(Ot, { checked: Z, onChange: (le) => C(le.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
7995
7995
  /* @__PURE__ */ c(Ot, { checked: q, onChange: (le) => h(le.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
7996
7996
  ] }) }),
7997
7997
  /* @__PURE__ */ c(j, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
@@ -8102,7 +8102,7 @@ function oc({ userRoles: t, rules: e, rawRules: s }) {
8102
8102
  return;
8103
8103
  }
8104
8104
  const N = o.find(
8105
- (V) => V?.ruleId === d || V?.RuleId === d || V?.ruleName === d
8105
+ (Z) => Z?.ruleId === d || Z?.RuleId === d || Z?.ruleName === d
8106
8106
  ), R = N?.userRoleIds ?? N?.UserRoleIds;
8107
8107
  p(Array.isArray(R) ? R : []);
8108
8108
  }, [d, o]);
@@ -8110,9 +8110,9 @@ function oc({ userRoles: t, rules: e, rawRules: s }) {
8110
8110
  if (!Array.isArray(o) || !o.length) return {};
8111
8111
  const N = {};
8112
8112
  for (const R of E) {
8113
- const V = o.find(
8113
+ const Z = o.find(
8114
8114
  (h) => h?.ruleId === R.key || h?.ruleName === R.key || h?.RuleId === R.key || h?.ruleName === R.ruleName || h?.Name === R.ruleName
8115
- ), C = V?.userRoleIds ?? V?.UserRoleIds, q = Array.isArray(C) ? C : [];
8115
+ ), C = Z?.userRoleIds ?? Z?.UserRoleIds, q = Array.isArray(C) ? C : [];
8116
8116
  q.length && (N[R.key] = q);
8117
8117
  }
8118
8118
  return N;
@@ -8169,14 +8169,14 @@ function oc({ userRoles: t, rules: e, rawRules: s }) {
8169
8169
  ) : void 0, R = typeof N?.recordId == "number" ? N.recordId : N?.ruleId || N?.RuleId || void 0;
8170
8170
  if (!N || !R)
8171
8171
  throw new Error(`Unable to find rule identifier for rule ${d}`);
8172
- const V = w.map((h) => {
8172
+ const Z = w.map((h) => {
8173
8173
  const S = t.find((M) => M.userRoleId === h);
8174
8174
  return { id: h, name: S?.userRoleName ?? String(h) };
8175
8175
  }), C = {
8176
8176
  ...N,
8177
8177
  ruleId: d,
8178
8178
  userRoleIds: w,
8179
- userRoles: V
8179
+ userRoles: Z
8180
8180
  }, q = await n.updateRule(R, C);
8181
8181
  if (!q?.responseStatus && !q?.Success && !q?.success)
8182
8182
  Te.error(q?.errorMessage || q?.Message || "Error saving Alert Assignment");
@@ -8220,8 +8220,8 @@ function oc({ userRoles: t, rules: e, rawRules: s }) {
8220
8220
  title: "Alert Notification To",
8221
8221
  key: "assign",
8222
8222
  render: (N, R) => {
8223
- const V = G[R.key] ?? [];
8224
- return V.length ? /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: V.map((C) => {
8223
+ const Z = G[R.key] ?? [];
8224
+ return Z.length ? /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: Z.map((C) => {
8225
8225
  const q = t.find((h) => h.userRoleId === C);
8226
8226
  return /* @__PURE__ */ c(Ct, { children: q?.userRoleName ?? String(C) }, C);
8227
8227
  }) }) : /* @__PURE__ */ c(zs, { type: "secondary", children: "—" });
@@ -8248,7 +8248,7 @@ function Hs(t) {
8248
8248
  };
8249
8249
  }
8250
8250
  function lc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: a }) {
8251
- const { rules: i, alerts: l } = $e(), [o, u] = g("By Severity"), [d, m] = g("By severity"), [w, p] = g("By Severity"), [k, D] = g(!1), [E, G] = g(!1), [F, W] = g(!1), [N, R] = g(null), [V, C] = g("rules"), [q, h] = g(), [S, M] = g(), [oe, re] = g(), [L, A] = g(), [v, x] = g(), [T, U] = g(), [P, Y] = g(), [_, te] = g(), [ne, me] = g([]), [Ne, le] = g([]), [fe, Ae] = g(!1), [ie, ce] = g(!1), [be, ze] = g({}), [He, Q] = g({}), [Z, Se] = g(s || []), [he, Ie] = g([]), [Pe, qe] = g(!1), [Ge, we] = g(!1), [We, yt] = g(n || []);
8251
+ const { rules: i, alerts: l } = $e(), [o, u] = g("By Severity"), [d, m] = g("By severity"), [w, p] = g("By Severity"), [k, D] = g(!1), [E, G] = g(!1), [F, W] = g(!1), [N, R] = g(null), [Z, C] = g("rules"), [q, h] = g(), [S, M] = g(), [oe, re] = g(), [L, A] = g(), [v, x] = g(), [T, U] = g(), [P, Y] = g(), [_, te] = g(), [ne, me] = g([]), [Ne, le] = g([]), [fe, Ae] = g(!1), [ie, ce] = g(!1), [be, ze] = g({}), [He, Q] = g({}), [V, Se] = g(s || []), [he, Ie] = g([]), [Pe, qe] = g(!1), [Ge, we] = g(!1), [We, yt] = g(n || []);
8252
8252
  de(() => {
8253
8253
  n && n.length && yt(n);
8254
8254
  }, [n]), de(() => {
@@ -8278,8 +8278,8 @@ function lc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8278
8278
  () => e.map(($) => ({ label: $.Name, value: $.RuleId })),
8279
8279
  [e]
8280
8280
  ), pt = ge(
8281
- () => Z.map(($) => ({ label: $.userRoleName, value: $.userRoleId })),
8282
- [Z]
8281
+ () => V.map(($) => ({ label: $.userRoleName, value: $.userRoleId })),
8282
+ [V]
8283
8283
  ), Pt = ge(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map(($) => ({ label: `${$}`, value: $ })), []);
8284
8284
  de(() => {
8285
8285
  let $ = !1;
@@ -8319,7 +8319,7 @@ function lc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8319
8319
  const O = Array.isArray(f.escalationSettingsActionTypeIds) ? f.escalationSettingsActionTypeIds : [];
8320
8320
  me(O.map((I) => String(I))), le(Array.isArray(f.thirdPartyId) ? f.thirdPartyId : []), Ae(!!f.humanLoop), ce(!!f.isAutoExpire);
8321
8321
  }
8322
- }, [V, S, We]);
8322
+ }, [Z, S, We]);
8323
8323
  const Nt = async () => {
8324
8324
  try {
8325
8325
  we(!0);
@@ -8411,7 +8411,7 @@ function lc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8411
8411
  /* @__PURE__ */ c(
8412
8412
  rc,
8413
8413
  {
8414
- escBasis: V,
8414
+ escBasis: Z,
8415
8415
  setEscBasis: C,
8416
8416
  selectedSeverity: q,
8417
8417
  setSelectedSeverity: h,
@@ -8504,7 +8504,7 @@ function lc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8504
8504
  ac,
8505
8505
  {
8506
8506
  entries: he,
8507
- userRoles: Z,
8507
+ userRoles: V,
8508
8508
  loading: Ge || r,
8509
8509
  onEdit: ($) => {
8510
8510
  C("rules");
@@ -8514,7 +8514,7 @@ function lc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8514
8514
  }
8515
8515
  ),
8516
8516
  /* @__PURE__ */ c(Vt, { className: "my-6" }),
8517
- /* @__PURE__ */ c(oc, { userRoles: Z, rules: e, rawRules: n }),
8517
+ /* @__PURE__ */ c(oc, { userRoles: V, rules: e, rawRules: n }),
8518
8518
  /* @__PURE__ */ c(Vt, {})
8519
8519
  ] });
8520
8520
  }
@@ -8523,7 +8523,7 @@ function Mc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8523
8523
  const { rules: r, alerts: a } = $e(), i = [
8524
8524
  { label: "By Severity", value: "By Severity" },
8525
8525
  { label: "By Created Date", value: "By Created Date" }
8526
- ], [l, o] = g("By Severity"), [u, d] = g(/* @__PURE__ */ new Set()), [m, w] = g(null), [p, k] = g(null), [D, E] = g({ inApp: !1, sms: !1, email: !1 }), [G, F] = g([]), [W, N] = g(!0), [R, V] = g(!1);
8526
+ ], [l, o] = g("By Severity"), [u, d] = g(/* @__PURE__ */ new Set()), [m, w] = g(null), [p, k] = g(null), [D, E] = g({ inApp: !1, sms: !1, email: !1 }), [G, F] = g([]), [W, N] = g(!0), [R, Z] = g(!1);
8527
8527
  de(() => {
8528
8528
  let h = !1;
8529
8529
  return (async () => {
@@ -8578,7 +8578,7 @@ function Mc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8578
8578
  channels: D
8579
8579
  });
8580
8580
  try {
8581
- V(!0);
8581
+ Z(!0);
8582
8582
  const h = m ? m.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", S = p ? p.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", M = Array.from(u).map((re) => Number(re)).filter((re) => Number.isFinite(re)), oe = await a.setPreferenceSettings({
8583
8583
  anomalyIds: M,
8584
8584
  doNotDisturbStart: h,
@@ -8592,7 +8592,7 @@ function Mc({ severities: t, rules: e, onSave: s, onCancel: n }) {
8592
8592
  } catch (h) {
8593
8593
  console.error("Error in saving my preferences: ", h);
8594
8594
  } finally {
8595
- V(!1);
8595
+ Z(!1);
8596
8596
  }
8597
8597
  };
8598
8598
  return /* @__PURE__ */ y("div", { className: "w-full", children: [
@@ -8821,7 +8821,7 @@ const hc = ({
8821
8821
  "brandished guns & knives": "weapon",
8822
8822
  "brandished guns and knives": "weapon"
8823
8823
  }, Sc = ({ isModalOpen: t, handleModalClose: e, selectedRow: s, fetchAlertLogs: n, alertStatusList: r = [], alertStatusLoading: a = !1, initialTab: i = "details", sourceTab: l }) => {
8824
- const [o, u] = g(), [d, m] = g(""), [w, p] = g(!1), k = Ea(null), [D, E] = g("details"), [G, F] = g(void 0), W = br(), { alerts: N, rules: R, config: V } = $e(), { timeZoneDetails: C } = Os(), [q, h] = g(null), [S, M] = g(!1), [oe, re] = g(!1), [L, A] = g(void 0), [v, x] = g(void 0), [T, U] = g({}), [P, Y] = g({}), _ = (f, O, I) => {
8824
+ const [o, u] = g(), [d, m] = g(""), [w, p] = g(!1), k = Ea(null), [D, E] = g("details"), [G, F] = g(void 0), W = br(), { alerts: N, rules: R, config: Z } = $e(), { timeZoneDetails: C } = Os(), [q, h] = g(null), [S, M] = g(!1), [oe, re] = g(!1), [L, A] = g(void 0), [v, x] = g(void 0), [T, U] = g({}), [P, Y] = g({}), _ = (f, O, I) => {
8825
8825
  const H = P[f];
8826
8826
  return T[f] === !1 && !H ? /* @__PURE__ */ y("div", { className: "w-full flex flex-col items-center justify-center min-h-[200px] bg-gray-100 rounded-lg gap-2 text-gray-400", children: [
8827
8827
  /* @__PURE__ */ c(Sr, { size: 40 }),
@@ -8853,10 +8853,10 @@ const hc = ({
8853
8853
  statusType: ze,
8854
8854
  id: He,
8855
8855
  alertDetails: Q,
8856
- statusHistory: Z,
8856
+ statusHistory: V,
8857
8857
  mediaDetails: Se,
8858
8858
  alertNumber: he
8859
- } = te, Ie = V.tenant === "snl" ? me || ne || "Alert Event" : ne || "Alert Event", Pe = (f) => {
8859
+ } = te, Ie = Z.tenant === "snl" ? me || ne || "Alert Event" : ne || "Alert Event", Pe = (f) => {
8860
8860
  const O = String(f || "").toLowerCase();
8861
8861
  return O === "delivered" || O === "sent" ? "Delivered" : O === "failed" ? "Failed" : "Queued";
8862
8862
  }, qe = (f) => ({
@@ -8901,7 +8901,7 @@ const hc = ({
8901
8901
  }, [D, He]), de(() => {
8902
8902
  t ? E(i) : (u(void 0), m(""));
8903
8903
  }, [t, i]), de(() => {
8904
- if (!t || V.tenant !== "snl") return;
8904
+ if (!t || Z.tenant !== "snl") return;
8905
8905
  let f = !1;
8906
8906
  return M(!0), R.getLookups().then((O) => {
8907
8907
  f || (h(O.alertStatusTypes ?? []), M(!1));
@@ -8910,7 +8910,7 @@ const hc = ({
8910
8910
  }), () => {
8911
8911
  f = !0;
8912
8912
  };
8913
- }, [t, V.tenant]);
8913
+ }, [t, Z.tenant]);
8914
8914
  const At = l === "archived" || ["completed", "false positive"].includes(String(ze || "").toLowerCase()), Tt = (f) => {
8915
8915
  const O = String(f?.value || "").toLowerCase(), I = String(f?.statusName || "").toLowerCase();
8916
8916
  return O.includes("reopen") || I.includes("reopen");
@@ -8928,7 +8928,7 @@ const hc = ({
8928
8928
  default:
8929
8929
  return !f.isElopementStatus && !bt(f) && !Es(f);
8930
8930
  }
8931
- }).map((f) => ({ value: f.alertStatusTypeName, label: f.alertStatusTypeName })), $ = V.tenant === "snl" && q !== null ? vn : Nt, K = ge(() => pr(Se), [Se]);
8931
+ }).map((f) => ({ value: f.alertStatusTypeName, label: f.alertStatusTypeName })), $ = Z.tenant === "snl" && q !== null ? vn : Nt, K = ge(() => pr(Se), [Se]);
8932
8932
  return de(() => {
8933
8933
  let f = !1;
8934
8934
  const O = new AbortController(), I = async (ae) => {
@@ -9076,7 +9076,7 @@ const hc = ({
9076
9076
  onChange: (f) => u(f),
9077
9077
  value: o,
9078
9078
  options: $,
9079
- loading: V.tenant === "snl" ? S : a
9079
+ loading: Z.tenant === "snl" ? S : a
9080
9080
  }
9081
9081
  ) }),
9082
9082
  /* @__PURE__ */ y("div", { className: "flex flex-col gap-2 mt-3", children: [
@@ -9172,7 +9172,7 @@ const hc = ({
9172
9172
  priority: be,
9173
9173
  spaceName: ie,
9174
9174
  alertNumber: he,
9175
- statusHistory: Z,
9175
+ statusHistory: V,
9176
9176
  notifGroups: G
9177
9177
  }
9178
9178
  )
@@ -9201,7 +9201,7 @@ function Ia({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r,
9201
9201
  function R(oe, re) {
9202
9202
  m(oe), p(re?.tab ?? "details"), q(re?.sourceTab ?? "active"), u(!0);
9203
9203
  }
9204
- function V() {
9204
+ function Z() {
9205
9205
  u(!1);
9206
9206
  }
9207
9207
  const [C, q] = g("active"), [h, S] = g(0), M = d ? {
@@ -9256,7 +9256,7 @@ function Ia({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r,
9256
9256
  Sc,
9257
9257
  {
9258
9258
  isModalOpen: o,
9259
- handleModalClose: V,
9259
+ handleModalClose: Z,
9260
9260
  selectedRow: M,
9261
9261
  fetchAlertLogs: () => {
9262
9262
  },