@ssgc/alert-console 2.4.6 → 2.4.7

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
@@ -1,7 +1,7 @@
1
1
  import { jsx as c, jsxs as y, Fragment as ea } from "react/jsx-runtime";
2
2
  import * as be from "react";
3
3
  import { useContext as ta, useMemo as we, createContext as sa, useState as k, useEffect as Se, forwardRef as Rr, createElement as Bs, useRef as na } from "react";
4
- import { Select as De, Table as un, Row as Ue, Col as X, Input as ra, Tag as Ht, Space as _e, Tooltip as Dn, Button as Fe, Progress as ia, Dropdown as aa, Typography as jt, Spin as ws, Checkbox as kt, Divider as $t, TimePicker as Fn, Tabs as dn, Card as Fs, Steps as oa, Modal as la, Carousel as ca } from "antd";
4
+ import { Select as De, Table as un, Row as Ue, Col as X, Input as ra, Tag as Ht, Space as _e, Tooltip as Dn, Button as Fe, Progress as ia, Dropdown as aa, Typography as zt, Spin as ws, Checkbox as kt, Divider as $t, TimePicker as Fn, Tabs as dn, Card as Fs, Steps as oa, Modal as la, Carousel as ca } from "antd";
5
5
  import { MessageOutlined as ua, MailOutlined as da, MoreOutlined as ha, PlusOutlined as fa, EditOutlined as ma, LeftOutlined as ya, RightOutlined as pa } from "@ant-design/icons";
6
6
  import { toast as Ee } from "react-toastify";
7
7
  const ga = "#FF3B30", va = "#FF9500", Sa = "#FFCC00", wa = "#34C759", Jt = {
@@ -300,13 +300,13 @@ function Ma() {
300
300
  return { M: h, y: m, w: d, d: u, D: g, h: l, m: o, s: a, ms: i, Q: f }[M] || String(M || "").toLowerCase().replace(/s$/, "");
301
301
  }, u: function(M) {
302
302
  return M === void 0;
303
- } }, j = "en", Q = {};
304
- Q[j] = D;
303
+ } }, z = "en", Q = {};
304
+ Q[z] = D;
305
305
  var J = "$isDayjsObject", K = function(M) {
306
306
  return M instanceof ie || !(!M || !M[J]);
307
307
  }, O = function M(b, S, x) {
308
308
  var w;
309
- if (!b) return j;
309
+ if (!b) return z;
310
310
  if (typeof b == "string") {
311
311
  var T = b.toLowerCase();
312
312
  Q[T] && (w = T), S && (Q[T] = S, w = T);
@@ -316,7 +316,7 @@ function Ma() {
316
316
  var F = b.name;
317
317
  Q[F] = b, w = F;
318
318
  }
319
- return !x && w && (j = w), w || !x && j;
319
+ return !x && w && (z = w), w || !x && z;
320
320
  }, I = function(M, b) {
321
321
  if (K(M)) return M.clone();
322
322
  var S = typeof b == "object" ? b : {};
@@ -549,7 +549,7 @@ function Ma() {
549
549
  return M.$i || (M(b, ie, I), M.$i = !0), I;
550
550
  }, I.locale = O, I.isDayjs = K, I.unix = function(M) {
551
551
  return I(1e3 * M);
552
- }, I.en = Q[j], I.Ls = Q, I.p = {}, I;
552
+ }, I.en = Q[z], I.Ls = Q, I.p = {}, I;
553
553
  }));
554
554
  })(ls)), ls.exports;
555
555
  }
@@ -918,17 +918,17 @@ const Ba = [
918
918
  { label: "Medium", value: "Medium" },
919
919
  { label: "Low", value: "Low" }
920
920
  ];
921
- function za({ value: t, onChange: e, options: s }) {
921
+ function ja({ value: t, onChange: e, options: s }) {
922
922
  return /* @__PURE__ */ c(bs, { className: "w-[140px]", value: t, onChange: e, options: s || Ba });
923
923
  }
924
- const ja = [
924
+ const za = [
925
925
  { label: "All Types", value: "All" },
926
926
  { label: "Weapon Detection", value: "Weapon" },
927
927
  { label: "Unauthorized Access", value: "Unauthorized" },
928
928
  { label: "Aggressive Behavior", value: "Aggressive" }
929
929
  ];
930
930
  function _a({ value: t, onChange: e, options: s }) {
931
- return /* @__PURE__ */ c(bs, { className: "w-[220px]", dropdownWidth: 280, value: t, onChange: e, options: s || ja });
931
+ return /* @__PURE__ */ c(bs, { className: "w-[220px]", dropdownWidth: 280, value: t, onChange: e, options: s || za });
932
932
  }
933
933
  function Ya({ value: t, onChange: e, options: s }) {
934
934
  return /* @__PURE__ */ c(bs, { className: "w-[100px]", value: t, onChange: e, options: s || [] });
@@ -974,7 +974,7 @@ function Ja({
974
974
  ] });
975
975
  }
976
976
  function Wr({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOptions: r, spaceOptions: i, renderActions: a, onAlertIdClick: o, onRefetch: l, excludeCompleted: u = !0 }) {
977
- const [d, h] = k("All"), [f, m] = k("All"), [g, p] = k("All"), [v, U] = k("All"), [D, V] = k(""), [L, j] = k([{ label: "All", value: "All" }]), [Q, J] = k(/* @__PURE__ */ new Set()), { rules: K, alerts: O } = Be(), I = {
977
+ const [d, h] = k("All"), [f, m] = k("All"), [g, p] = k("All"), [v, U] = k("All"), [D, V] = k(""), [L, z] = k([{ label: "All", value: "All" }]), [Q, J] = k(/* @__PURE__ */ new Set()), { rules: K, alerts: O } = Be(), I = {
978
978
  6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ c(da, {}) },
979
979
  7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ c(ua, {}) }
980
980
  }, C = we(() => Za(t), [t]), ie = we(() => Ha(t), [t]);
@@ -986,7 +986,7 @@ function Wr({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
986
986
  label: Z.thirdPartyName,
987
987
  value: String(Z.thirdPartyId)
988
988
  }));
989
- T && j([{ label: "All", value: "All" }, ...q]);
989
+ T && z([{ label: "All", value: "All" }, ...q]);
990
990
  } catch (A) {
991
991
  console.error("Error loading third party options", A);
992
992
  }
@@ -1130,7 +1130,7 @@ function Wr({ data: t, loading: e = !1, pageSize: s = 10, columns: n, severityOp
1130
1130
  toolbar: /* @__PURE__ */ y(Ue, { gutter: [12, 12], className: "mb-3", align: "middle", children: [
1131
1131
  /* @__PURE__ */ c(X, { flex: "none", children: /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
1132
1132
  /* @__PURE__ */ c("span", { children: "Severity" }),
1133
- /* @__PURE__ */ c(za, { value: d, onChange: h, options: r })
1133
+ /* @__PURE__ */ c(ja, { value: d, onChange: h, options: r })
1134
1134
  ] }) }),
1135
1135
  /* @__PURE__ */ c(X, { flex: "none", children: /* @__PURE__ */ y("div", { className: "flex items-center gap-2", children: [
1136
1136
  /* @__PURE__ */ c("span", { children: "Anomaly type" }),
@@ -1228,7 +1228,7 @@ function xe() {
1228
1228
  function to(t, e) {
1229
1229
  return typeof t == "function" ? t(e) : t;
1230
1230
  }
1231
- function zs(t) {
1231
+ function js(t) {
1232
1232
  return typeof t == "number" && t >= 0 && t !== 1 / 0;
1233
1233
  }
1234
1234
  function Vr(t, e) {
@@ -1289,11 +1289,11 @@ function Bt(t, e) {
1289
1289
  return t === e ? !0 : typeof t != typeof e ? !1 : t && e && typeof t == "object" && typeof e == "object" ? Object.keys(e).every((s) => Bt(t[s], e[s])) : !1;
1290
1290
  }
1291
1291
  var so = Object.prototype.hasOwnProperty;
1292
- function js(t, e, s = 0) {
1292
+ function zs(t, e, s = 0) {
1293
1293
  if (t === e)
1294
1294
  return t;
1295
1295
  if (s > 500) return e;
1296
- const n = zn(t) && zn(e);
1296
+ const n = jn(t) && jn(e);
1297
1297
  if (!n && !(_s(t) && _s(e))) return e;
1298
1298
  const i = (n ? t : Object.keys(t)).length, a = n ? e : Object.keys(e), o = a.length, l = n ? new Array(o) : {};
1299
1299
  let u = 0;
@@ -1307,7 +1307,7 @@ function js(t, e, s = 0) {
1307
1307
  l[h] = m;
1308
1308
  continue;
1309
1309
  }
1310
- const g = js(f, m, s + 1);
1310
+ const g = zs(f, m, s + 1);
1311
1311
  l[h] = g, g === f && u++;
1312
1312
  }
1313
1313
  return i === o && u === i ? t : l;
@@ -1320,19 +1320,19 @@ function hs(t, e) {
1320
1320
  return !1;
1321
1321
  return !0;
1322
1322
  }
1323
- function zn(t) {
1323
+ function jn(t) {
1324
1324
  return Array.isArray(t) && t.length === Object.keys(t).length;
1325
1325
  }
1326
1326
  function _s(t) {
1327
- if (!jn(t))
1327
+ if (!zn(t))
1328
1328
  return !1;
1329
1329
  const e = t.constructor;
1330
1330
  if (e === void 0)
1331
1331
  return !0;
1332
1332
  const s = e.prototype;
1333
- return !(!jn(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
1333
+ return !(!zn(s) || !s.hasOwnProperty("isPrototypeOf") || Object.getPrototypeOf(t) !== Object.prototype);
1334
1334
  }
1335
- function jn(t) {
1335
+ function zn(t) {
1336
1336
  return Object.prototype.toString.call(t) === "[object Object]";
1337
1337
  }
1338
1338
  function no(t) {
@@ -1346,13 +1346,13 @@ function Ys(t, e, s) {
1346
1346
  if (s.structuralSharing !== !1) {
1347
1347
  if (process.env.NODE_ENV !== "production")
1348
1348
  try {
1349
- return js(t, e);
1349
+ return zs(t, e);
1350
1350
  } catch (n) {
1351
1351
  throw console.error(
1352
1352
  `Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${s.queryHash}]: ${n}`
1353
1353
  ), n;
1354
1354
  }
1355
- return js(t, e);
1355
+ return zs(t, e);
1356
1356
  }
1357
1357
  return e;
1358
1358
  }
@@ -1577,8 +1577,8 @@ function Hr(t) {
1577
1577
  Promise.resolve(p).then(h).catch((U) => {
1578
1578
  if (i())
1579
1579
  return;
1580
- const D = t.retry ?? (pt ? 0 : 3), V = t.retryDelay ?? ho, L = typeof V == "function" ? V(s, U) : V, j = D === !0 || typeof D == "number" && s < D || typeof D == "function" && D(s, U);
1581
- if (e || !j) {
1580
+ const D = t.retry ?? (pt ? 0 : 3), V = t.retryDelay ?? ho, L = typeof V == "function" ? V(s, U) : V, z = D === !0 || typeof D == "number" && s < D || typeof D == "function" && D(s, U);
1581
+ if (e || !z) {
1582
1582
  f(U);
1583
1583
  return;
1584
1584
  }
@@ -1604,7 +1604,7 @@ var Br = class {
1604
1604
  this.clearGcTimeout();
1605
1605
  }
1606
1606
  scheduleGc() {
1607
- this.clearGcTimeout(), zs(this.gcTime) && (this.#e = mt.setTimeout(() => {
1607
+ this.clearGcTimeout(), js(this.gcTime) && (this.#e = mt.setTimeout(() => {
1608
1608
  this.optionalRemove();
1609
1609
  }, this.gcTime));
1610
1610
  }
@@ -1834,7 +1834,7 @@ var Br = class {
1834
1834
  case "fetch":
1835
1835
  return {
1836
1836
  ...s,
1837
- ...zr(s.data, this.options),
1837
+ ...jr(s.data, this.options),
1838
1838
  fetchMeta: t.meta ?? null
1839
1839
  };
1840
1840
  case "success":
@@ -1883,7 +1883,7 @@ var Br = class {
1883
1883
  });
1884
1884
  }
1885
1885
  };
1886
- function zr(t, e) {
1886
+ function jr(t, e) {
1887
1887
  return {
1888
1888
  fetchFailureCount: 0,
1889
1889
  fetchFailureReason: null,
@@ -2039,7 +2039,7 @@ var mo = class extends Et {
2039
2039
  this.options.staleTime,
2040
2040
  this.#t
2041
2041
  );
2042
- if (pt || this.#r.isStale || !zs(t))
2042
+ if (pt || this.#r.isStale || !js(t))
2043
2043
  return;
2044
2044
  const s = Vr(this.#r.dataUpdatedAt, t) + 1;
2045
2045
  this.#c = mt.setTimeout(() => {
@@ -2050,7 +2050,7 @@ var mo = class extends Et {
2050
2050
  return (typeof this.options.refetchInterval == "function" ? this.options.refetchInterval(this.#t) : this.options.refetchInterval) ?? !1;
2051
2051
  }
2052
2052
  #v(t) {
2053
- this.#b(), this.#l = t, !(pt || qe(this.options.enabled, this.#t) === !1 || !zs(this.#l) || this.#l === 0) && (this.#u = mt.setInterval(() => {
2053
+ this.#b(), this.#l = t, !(pt || qe(this.options.enabled, this.#t) === !1 || !js(this.#l) || this.#l === 0) && (this.#u = mt.setInterval(() => {
2054
2054
  (this.options.refetchIntervalInBackground || pn.isFocused()) && this.#d();
2055
2055
  }, this.#l));
2056
2056
  }
@@ -2070,7 +2070,7 @@ var mo = class extends Et {
2070
2070
  const K = this.hasListeners(), O = !K && Gn(t, e), I = K && Qn(t, s, e, n);
2071
2071
  (O || I) && (d = {
2072
2072
  ...d,
2073
- ...zr(u.data, t.options)
2073
+ ...jr(u.data, t.options)
2074
2074
  }), e._optimisticResults === "isRestoring" && (d.fetchStatus = "idle");
2075
2075
  }
2076
2076
  let { error: m, errorUpdatedAt: g, status: p } = d;
@@ -2097,7 +2097,7 @@ var mo = class extends Et {
2097
2097
  this.#i = K;
2098
2098
  }
2099
2099
  this.#i && (m = this.#i, f = this.#h, g = Date.now(), p = "error");
2100
- const U = d.fetchStatus === "fetching", D = p === "pending", V = p === "error", L = D && U, j = f !== void 0, J = {
2100
+ const U = d.fetchStatus === "fetching", D = p === "pending", V = p === "error", L = D && U, z = f !== void 0, J = {
2101
2101
  status: p,
2102
2102
  fetchStatus: d.fetchStatus,
2103
2103
  isPending: D,
@@ -2116,10 +2116,10 @@ var mo = class extends Et {
2116
2116
  isFetchedAfterMount: d.dataUpdateCount > l.dataUpdateCount || d.errorUpdateCount > l.errorUpdateCount,
2117
2117
  isFetching: U,
2118
2118
  isRefetching: U && !D,
2119
- isLoadingError: V && !j,
2119
+ isLoadingError: V && !z,
2120
2120
  isPaused: d.fetchStatus === "paused",
2121
2121
  isPlaceholderData: h,
2122
- isRefetchError: V && j,
2122
+ isRefetchError: V && z,
2123
2123
  isStale: gn(t, e),
2124
2124
  refetch: this.refetch,
2125
2125
  promise: this.#o,
@@ -2237,10 +2237,10 @@ function Jn(t) {
2237
2237
  meta: e.options.meta
2238
2238
  };
2239
2239
  return h(Q), Q;
2240
- })(), V = await f(D), { maxPages: L } = e.options, j = v ? io : ro;
2240
+ })(), V = await f(D), { maxPages: L } = e.options, z = v ? io : ro;
2241
2241
  return {
2242
- pages: j(g.pages, V, L),
2243
- pageParams: j(g.pageParams, p, L)
2242
+ pages: z(g.pages, V, L),
2243
+ pageParams: z(g.pageParams, p, L)
2244
2244
  };
2245
2245
  };
2246
2246
  if (r && i.length) {
@@ -2291,7 +2291,7 @@ var vo = class extends Br {
2291
2291
  #s;
2292
2292
  #r;
2293
2293
  constructor(t) {
2294
- super(), this.#e = t.client, this.mutationId = t.mutationId, this.#s = t.mutationCache, this.#t = [], this.state = t.state || jr(), this.setOptions(t.options), this.scheduleGc();
2294
+ super(), this.#e = t.client, this.mutationId = t.mutationId, this.#s = t.mutationCache, this.#t = [], this.state = t.state || zr(), this.setOptions(t.options), this.scheduleGc();
2295
2295
  }
2296
2296
  setOptions(t) {
2297
2297
  this.options = t, this.updateGcTime(this.options.gcTime);
@@ -2504,7 +2504,7 @@ var vo = class extends Br {
2504
2504
  });
2505
2505
  }
2506
2506
  };
2507
- function jr() {
2507
+ function zr() {
2508
2508
  return {
2509
2509
  context: void 0,
2510
2510
  data: void 0,
@@ -2644,7 +2644,7 @@ var wo = class extends Et {
2644
2644
  return this.#r = e, this.#s?.removeObserver(this), this.#s = this.#e.getMutationCache().build(this.#e, this.options), this.#s.addObserver(this), this.#s.execute(t);
2645
2645
  }
2646
2646
  #n() {
2647
- const t = this.#s?.state ?? jr();
2647
+ const t = this.#s?.state ?? zr();
2648
2648
  this.#t = {
2649
2649
  ...t,
2650
2650
  isPending: t.status === "pending",
@@ -3591,7 +3591,7 @@ class nt extends _t {
3591
3591
  }
3592
3592
  }
3593
3593
  let er = {};
3594
- function zo(t, e = {}) {
3594
+ function jo(t, e = {}) {
3595
3595
  const s = JSON.stringify([t, e]);
3596
3596
  let n = er[s];
3597
3597
  return n || (n = new Intl.ListFormat(t, e), er[s] = n), n;
@@ -3603,7 +3603,7 @@ function en(t, e = {}) {
3603
3603
  return n === void 0 && (n = new Intl.DateTimeFormat(t, e), Xs.set(s, n)), n;
3604
3604
  }
3605
3605
  const tn = /* @__PURE__ */ new Map();
3606
- function jo(t, e = {}) {
3606
+ function zo(t, e = {}) {
3607
3607
  const s = JSON.stringify([t, e]);
3608
3608
  let n = tn.get(s);
3609
3609
  return n === void 0 && (n = new Intl.NumberFormat(t, e), tn.set(s, n)), n;
@@ -3682,7 +3682,7 @@ class tl {
3682
3682
  const { padTo: r, floor: i, ...a } = n;
3683
3683
  if (!s || Object.keys(a).length > 0) {
3684
3684
  const o = { useGrouping: !1, ...n };
3685
- n.padTo > 0 && (o.minimumIntegerDigits = n.padTo), this.inf = jo(e, o);
3685
+ n.padTo > 0 && (o.minimumIntegerDigits = n.padTo), this.inf = zo(e, o);
3686
3686
  }
3687
3687
  }
3688
3688
  format(e) {
@@ -3851,7 +3851,7 @@ class ne {
3851
3851
  return new nl(this.intl, this.isEnglish(), e);
3852
3852
  }
3853
3853
  listFormatter(e = {}) {
3854
- return zo(this.intl, e);
3854
+ return jo(this.intl, e);
3855
3855
  }
3856
3856
  isEnglish() {
3857
3857
  return this.locale === "en" || this.locale.toLowerCase() === "en-us" || pi(this.intl).locale.startsWith("en-us");
@@ -4107,7 +4107,7 @@ const an = /* @__PURE__ */ new Map();
4107
4107
  function ol() {
4108
4108
  an.clear();
4109
4109
  }
4110
- function ze({ numberingSystem: t }, e = "") {
4110
+ function je({ numberingSystem: t }, e = "") {
4111
4111
  const s = t || "latn";
4112
4112
  let n = an.get(s);
4113
4113
  n === void 0 && (n = /* @__PURE__ */ new Map(), an.set(s, n));
@@ -4288,7 +4288,7 @@ function bn(t, e) {
4288
4288
  function ps(t, e = 4, s = 1) {
4289
4289
  const { year: n, month: r, day: i } = t, a = wi(n, r, i), o = bn(wn(n, r, i), s);
4290
4290
  let l = Math.floor((a - o + 14 - e) / 7), u;
4291
- return l < 1 ? (u = n - 1, l = zt(u, e, s)) : l > zt(n, e, s) ? (u = n + 1, l = 1) : u = n, { weekYear: u, weekNumber: l, weekday: o, ...Os(t) };
4291
+ return l < 1 ? (u = n - 1, l = jt(u, e, s)) : l > jt(n, e, s) ? (u = n + 1, l = 1) : u = n, { weekYear: u, weekNumber: l, weekday: o, ...Os(t) };
4292
4292
  }
4293
4293
  function ur(t, e = 4, s = 1) {
4294
4294
  const { weekYear: n, weekNumber: r, weekday: i } = t, a = bn(wn(n, 1, e), s), o = Ot(n);
@@ -4322,7 +4322,7 @@ function ll(t, e = 4, s = 1) {
4322
4322
  const n = Ns(t.weekYear), r = He(
4323
4323
  t.weekNumber,
4324
4324
  1,
4325
- zt(t.weekYear, e, s)
4325
+ jt(t.weekYear, e, s)
4326
4326
  ), i = He(t.weekday, 1, 7);
4327
4327
  return n ? r ? i ? !1 : Ze("weekday", t.weekday) : Ze("week", t.weekNumber) : Ze("weekYear", t.weekYear);
4328
4328
  }
@@ -4463,7 +4463,7 @@ function ks(t) {
4463
4463
  function mr(t, e, s) {
4464
4464
  return -bn(wn(t, 1, e), s) + e - 1;
4465
4465
  }
4466
- function zt(t, e = 4, s = 1) {
4466
+ function jt(t, e = 4, s = 1) {
4467
4467
  const n = mr(t, e, s), r = mr(t + 1, e, s);
4468
4468
  return (Ot(t) - n + r) / 7;
4469
4469
  }
@@ -5027,12 +5027,12 @@ function ql(t) {
5027
5027
  function Zl(t) {
5028
5028
  return t.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
5029
5029
  }
5030
- const Hl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, Bl = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, zl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
5030
+ const Hl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/, Bl = /^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/, jl = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;
5031
5031
  function pr(t) {
5032
5032
  const [, e, s, n, r, i, a, o] = t;
5033
5033
  return [In(e, r, n, s, i, a, o), Ce.utcInstance];
5034
5034
  }
5035
- function jl(t) {
5035
+ function zl(t) {
5036
5036
  const [, e, s, n, r, i, a, o] = t;
5037
5037
  return [In(e, o, s, n, r, i, a), Ce.utcInstance];
5038
5038
  }
@@ -5073,7 +5073,7 @@ function sc(t) {
5073
5073
  t,
5074
5074
  [Hl, pr],
5075
5075
  [Bl, pr],
5076
- [zl, jl]
5076
+ [jl, zl]
5077
5077
  );
5078
5078
  }
5079
5079
  function nc(t) {
@@ -6499,7 +6499,7 @@ function vc(t) {
6499
6499
  function br(t) {
6500
6500
  return t.replace(/\./g, "").replace(Bi, " ").toLowerCase();
6501
6501
  }
6502
- function je(t, e) {
6502
+ function ze(t, e) {
6503
6503
  return t === null ? null : {
6504
6504
  regex: RegExp(t.map(vc).join("|")),
6505
6505
  deser: ([s]) => t.findIndex((n) => br(s) === br(n)) + e
@@ -6515,15 +6515,15 @@ function Sc(t) {
6515
6515
  return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
6516
6516
  }
6517
6517
  function wc(t, e) {
6518
- const s = ze(e), n = ze(e, "{2}"), r = ze(e, "{3}"), i = ze(e, "{4}"), a = ze(e, "{6}"), o = ze(e, "{1,2}"), l = ze(e, "{1,3}"), u = ze(e, "{1,6}"), d = ze(e, "{1,9}"), h = ze(e, "{2,4}"), f = ze(e, "{4,6}"), m = (v) => ({ regex: RegExp(Sc(v.val)), deser: ([U]) => U, literal: !0 }), p = ((v) => {
6518
+ const s = je(e), n = je(e, "{2}"), r = je(e, "{3}"), i = je(e, "{4}"), a = je(e, "{6}"), o = je(e, "{1,2}"), l = je(e, "{1,3}"), u = je(e, "{1,6}"), d = je(e, "{1,9}"), h = je(e, "{2,4}"), f = je(e, "{4,6}"), m = (v) => ({ regex: RegExp(Sc(v.val)), deser: ([U]) => U, literal: !0 }), p = ((v) => {
6519
6519
  if (t.literal)
6520
6520
  return m(v);
6521
6521
  switch (v.val) {
6522
6522
  // era
6523
6523
  case "G":
6524
- return je(e.eras("short"), 0);
6524
+ return ze(e.eras("short"), 0);
6525
6525
  case "GG":
6526
- return je(e.eras("long"), 0);
6526
+ return ze(e.eras("long"), 0);
6527
6527
  // years
6528
6528
  case "y":
6529
6529
  return te(u);
@@ -6541,17 +6541,17 @@ function wc(t, e) {
6541
6541
  case "MM":
6542
6542
  return te(n);
6543
6543
  case "MMM":
6544
- return je(e.months("short", !0), 1);
6544
+ return ze(e.months("short", !0), 1);
6545
6545
  case "MMMM":
6546
- return je(e.months("long", !0), 1);
6546
+ return ze(e.months("long", !0), 1);
6547
6547
  case "L":
6548
6548
  return te(o);
6549
6549
  case "LL":
6550
6550
  return te(n);
6551
6551
  case "LLL":
6552
- return je(e.months("short", !1), 1);
6552
+ return ze(e.months("short", !1), 1);
6553
6553
  case "LLLL":
6554
- return je(e.months("long", !1), 1);
6554
+ return ze(e.months("long", !1), 1);
6555
6555
  // dates
6556
6556
  case "d":
6557
6557
  return te(o);
@@ -6595,7 +6595,7 @@ function wc(t, e) {
6595
6595
  return te(s);
6596
6596
  // meridiem
6597
6597
  case "a":
6598
- return je(e.meridiems(), 0);
6598
+ return ze(e.meridiems(), 0);
6599
6599
  // weekYear (k)
6600
6600
  case "kkkk":
6601
6601
  return te(i);
@@ -6611,13 +6611,13 @@ function wc(t, e) {
6611
6611
  case "c":
6612
6612
  return te(s);
6613
6613
  case "EEE":
6614
- return je(e.weekdays("short", !1), 1);
6614
+ return ze(e.weekdays("short", !1), 1);
6615
6615
  case "EEEE":
6616
- return je(e.weekdays("long", !1), 1);
6616
+ return ze(e.weekdays("long", !1), 1);
6617
6617
  case "ccc":
6618
- return je(e.weekdays("short", !0), 1);
6618
+ return ze(e.weekdays("short", !0), 1);
6619
6619
  case "cccc":
6620
- return je(e.weekdays("long", !0), 1);
6620
+ return ze(e.weekdays("long", !0), 1);
6621
6621
  // offset/zone
6622
6622
  case "Z":
6623
6623
  case "ZZ":
@@ -6768,12 +6768,12 @@ function Oc(t, e) {
6768
6768
  const s = Ie.macroTokenToFormatOpts(t.val), n = Yi(s, e);
6769
6769
  return n == null || n.includes(void 0) ? t : n;
6770
6770
  }
6771
- function zi(t, e) {
6771
+ function ji(t, e) {
6772
6772
  return Array.prototype.concat(...t.map((s) => Oc(s, e)));
6773
6773
  }
6774
- class ji {
6774
+ class zi {
6775
6775
  constructor(e, s) {
6776
- if (this.locale = e, this.format = s, this.tokens = zi(Ie.parseFormat(s), e), this.units = this.tokens.map((n) => wc(n, e)), this.disqualifyingUnit = this.units.find((n) => n.invalidReason), !this.disqualifyingUnit) {
6776
+ if (this.locale = e, this.format = s, this.tokens = ji(Ie.parseFormat(s), e), this.units = this.tokens.map((n) => wc(n, e)), this.disqualifyingUnit = this.units.find((n) => n.invalidReason), !this.disqualifyingUnit) {
6777
6777
  const [n, r] = Ac(this.units);
6778
6778
  this.regex = RegExp(n, "i"), this.handlers = r;
6779
6779
  }
@@ -6806,7 +6806,7 @@ class ji {
6806
6806
  }
6807
6807
  }
6808
6808
  function _i(t, e, s) {
6809
- return new ji(t, s).explainFromTokens(e);
6809
+ return new zi(t, s).explainFromTokens(e);
6810
6810
  }
6811
6811
  function xc(t, e, s) {
6812
6812
  const { result: n, zone: r, specificOffset: i, invalidReason: a } = _i(t, e, s);
@@ -7252,9 +7252,9 @@ class $ {
7252
7252
  const C = i[I];
7253
7253
  W(C) ? V ? i[I] = U[I] : i[I] = D[I] : V = !0;
7254
7254
  }
7255
- const L = p ? ll(i, a, o) : d ? cl(i) : Ti(i), j = L || Ai(i);
7256
- if (j)
7257
- return $.invalid(j);
7255
+ const L = p ? ll(i, a, o) : d ? cl(i) : Ti(i), z = L || Ai(i);
7256
+ if (z)
7257
+ return $.invalid(z);
7258
7258
  const Q = p ? ur(i, a, o) : d ? dr(i) : i, [J, K] = cs(Q, u, n), O = new $({
7259
7259
  ts: J,
7260
7260
  zone: n,
@@ -7421,7 +7421,7 @@ class $ {
7421
7421
  * @returns {string}
7422
7422
  */
7423
7423
  static expandFormat(e, s = {}) {
7424
- return zi(Ie.parseFormat(e), ne.fromObject(s)).map((r) => r.val).join("");
7424
+ return ji(Ie.parseFormat(e), ne.fromObject(s)).map((r) => r.val).join("");
7425
7425
  }
7426
7426
  static resetCache() {
7427
7427
  qt = void 0, cn.clear();
@@ -7763,7 +7763,7 @@ class $ {
7763
7763
  * @type {number}
7764
7764
  */
7765
7765
  get weeksInWeekYear() {
7766
- return this.isValid ? zt(this.weekYear) : NaN;
7766
+ return this.isValid ? jt(this.weekYear) : NaN;
7767
7767
  }
7768
7768
  /**
7769
7769
  * Returns the number of weeks in this DateTime's local week year
@@ -7772,7 +7772,7 @@ class $ {
7772
7772
  * @type {number}
7773
7773
  */
7774
7774
  get weeksInLocalWeekYear() {
7775
- return this.isValid ? zt(
7775
+ return this.isValid ? jt(
7776
7776
  this.localWeekYear,
7777
7777
  this.loc.getMinDaysInFirstWeek(),
7778
7778
  this.loc.getStartOfWeek()
@@ -8440,7 +8440,7 @@ class $ {
8440
8440
  numberingSystem: r,
8441
8441
  defaultToEN: !0
8442
8442
  });
8443
- return new ji(i, e);
8443
+ return new zi(i, e);
8444
8444
  }
8445
8445
  /**
8446
8446
  * Create a DateTime from an input string and format parser.
@@ -8960,11 +8960,11 @@ const Zc = [{ SeverityId: 1, Code: "LOW", DisplayName: "Low", SortOrder: 10, IsA
8960
8960
  severities: Zc,
8961
8961
  rules: Hc,
8962
8962
  userRoles: Bc
8963
- }, { Text: zc } = jt;
8964
- function jc({ sortBy: t, onChange: e, showActions: s, onSave: n, onClear: r, saving: i }) {
8963
+ }, { Text: jc } = zt;
8964
+ function zc({ sortBy: t, onChange: e, showActions: s, onSave: n, onClear: r, saving: i }) {
8965
8965
  return /* @__PURE__ */ y(Ue, { gutter: [16, 16], align: "middle", children: [
8966
8966
  /* @__PURE__ */ c(X, { xs: 24, md: 8, lg: 5, children: /* @__PURE__ */ y(_e, { className: "w-full items-center", direction: "horizontal", size: 12, children: [
8967
- /* @__PURE__ */ c(zc, { className: "text-gray-600 whitespace-nowrap", children: "Sort By:" }),
8967
+ /* @__PURE__ */ c(jc, { className: "text-gray-600 whitespace-nowrap", children: "Sort By:" }),
8968
8968
  /* @__PURE__ */ c(
8969
8969
  De,
8970
8970
  {
@@ -8986,7 +8986,7 @@ function jc({ sortBy: t, onChange: e, showActions: s, onSave: n, onClear: r, sav
8986
8986
  ] }) : null })
8987
8987
  ] });
8988
8988
  }
8989
- const { Text: st } = jt;
8989
+ const { Text: st } = zt;
8990
8990
  function _c(t) {
8991
8991
  const {
8992
8992
  // escBasis, setEscBasis,
@@ -9011,7 +9011,7 @@ function _c(t) {
9011
9011
  actions: D,
9012
9012
  setActions: V,
9013
9013
  thirdPartyIds: L,
9014
- setThirdPartyIds: j,
9014
+ setThirdPartyIds: z,
9015
9015
  humanLoop: Q,
9016
9016
  setHumanLoop: J,
9017
9017
  isAutoExpire: K,
@@ -9171,7 +9171,7 @@ function _c(t) {
9171
9171
  placeholder: "Third Party app",
9172
9172
  className: "w-full",
9173
9173
  value: L,
9174
- onChange: j,
9174
+ onChange: z,
9175
9175
  options: x
9176
9176
  }
9177
9177
  )
@@ -9253,7 +9253,7 @@ function Yc({ entries: t, userRoles: e, onEdit: s, loading: n }) {
9253
9253
  }
9254
9254
  );
9255
9255
  }
9256
- const { Title: Gc } = jt;
9256
+ const { Title: Gc } = zt;
9257
9257
  function Qc({ userRoles: t, rules: e, rawRules: s }) {
9258
9258
  const { rules: n } = Be(), [r, i] = k(!1), [a, o] = k(s), [l, u] = k({}), d = we(() => t.map((p) => ({ label: p.userRoleName, value: p.userRoleId })), [t]), h = we(
9259
9259
  () => (e || []).map((p, v) => ({
@@ -9344,7 +9344,7 @@ function Qc({ userRoles: t, rules: e, rawRules: s }) {
9344
9344
  ), V = typeof D?.recordId == "number" ? D.recordId : void 0;
9345
9345
  if (!D || typeof V != "number")
9346
9346
  throw new Error(`Unable to find recordId for rule ${v}`);
9347
- const L = Array.isArray(U) ? U : [], j = L.map((J) => {
9347
+ const L = Array.isArray(U) ? U : [], z = L.map((J) => {
9348
9348
  const K = t.find((O) => O.userRoleId === J);
9349
9349
  return {
9350
9350
  id: J,
@@ -9355,7 +9355,7 @@ function Qc({ userRoles: t, rules: e, rawRules: s }) {
9355
9355
  ruleId: v,
9356
9356
  // ensure ruleId matches the selected rule
9357
9357
  userRoleIds: L,
9358
- userRoles: j,
9358
+ userRoles: z,
9359
9359
  actions: [
9360
9360
  {
9361
9361
  actionTypeId: 4,
@@ -9393,16 +9393,16 @@ function Qc({ userRoles: t, rules: e, rawRules: s }) {
9393
9393
  ] })
9394
9394
  ] });
9395
9395
  }
9396
- const { Title: Er } = jt;
9396
+ const { Title: Er } = zt;
9397
9397
  function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9398
- const { rules: i, alerts: a } = Be(), [o, l] = k("By Severity"), [u, d] = k("By severity"), [h, f] = k("By Severity"), [m, g] = k(!1), [p, v] = k(!1), [U, D] = k(!1), [V, L] = k(null), [j, Q] = k("rules"), [J, K] = k(), [O, I] = k(), [C, ie] = k(), [se, M] = k(), [b, S] = k(), [x, w] = k(), [T, A] = k(), [F, q] = k(), [Z, H] = k([]), [B, le] = k([]), [ye, fe] = k(!1), [Te, ce] = k(!1), [ge, Re] = k({}), [Me, St] = k({}), [Ae, wt] = k(s || []), [Lt, Pt] = k([]), [dt, Cs] = k(!1), [E, _] = k(!1), [z, Ne] = k(n || []);
9398
+ const { rules: i, alerts: a } = Be(), [o, l] = k("By Severity"), [u, d] = k("By severity"), [h, f] = k("By Severity"), [m, g] = k(!1), [p, v] = k(!1), [U, D] = k(!1), [V, L] = k(null), [z, Q] = k("rules"), [J, K] = k(), [O, I] = k(), [C, ie] = k(), [se, M] = k(), [b, S] = k(), [x, w] = k(), [T, A] = k(), [F, q] = k(), [Z, H] = k([]), [B, le] = k([]), [ye, fe] = k(!1), [Te, ce] = k(!1), [ge, Re] = k({}), [Me, St] = k({}), [Ae, wt] = k(s || []), [Lt, Pt] = k([]), [dt, Cs] = k(!1), [E, _] = k(!1), [j, Ne] = k(n || []);
9399
9399
  Se(() => {
9400
9400
  n && n.length && Ne(n);
9401
9401
  }, [n]), Se(() => {
9402
- if (!z || !z.length) return;
9402
+ if (!j || !j.length) return;
9403
9403
  const R = Object.keys(ge).length > 0 || Object.keys(Me).length > 0;
9404
9404
  if (Lt.length && !R) return;
9405
- const oe = z.map((Y, P) => {
9405
+ const oe = j.map((Y, P) => {
9406
9406
  const ae = e.find((Oe) => Oe.RuleId === (Y.ruleId || Y.ruleName))?.Name || Y.ruleName || Y.Name || "-", G = Y.escalationSettings || {}, ue = typeof G.level1UserRoleId == "number" && G.level1UserRoleId > 0 ? [G.level1UserRoleId] : [], Ke = typeof G.level2UserRoleId == "number" && G.level2UserRoleId > 0 ? [G.level2UserRoleId] : [], Es = typeof G.level3UserRoleId == "number" && G.level3UserRoleId > 0 ? [G.level3UserRoleId] : [], Cn = (Array.isArray(G.escalationSettingsActionTypeIds) ? G.escalationSettingsActionTypeIds : []).map((Oe) => ge[Oe] || String(Oe)), Mn = (Array.isArray(G.thirdPartyId) ? G.thirdPartyId : []).map((Oe) => Me[Oe] || String(Oe)), Ms = typeof G.humanLoop == "boolean" ? G.humanLoop : null, Ds = typeof G.isAutoExpire == "boolean" ? G.isAutoExpire : null;
9407
9407
  return {
9408
9408
  id: String(Y.ruleId || Y.ruleName || P),
@@ -9417,7 +9417,7 @@ function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9417
9417
  };
9418
9418
  });
9419
9419
  Pt(oe);
9420
- }, [z, e, ge, Me]);
9420
+ }, [j, e, ge, Me]);
9421
9421
  const We = we(
9422
9422
  () => t.map((R) => ({ label: R.DisplayName, value: R.SeverityId })),
9423
9423
  [t]
@@ -9458,7 +9458,7 @@ function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9458
9458
  }, oe = (ae) => {
9459
9459
  const G = Number(ae);
9460
9460
  return !isNaN(G) && G > 0 ? G : void 0;
9461
- }, P = (z || []).find(
9461
+ }, P = (j || []).find(
9462
9462
  (ae) => ae?.ruleId === O || ae?.ruleName === O || ae?.RuleId === O
9463
9463
  )?.escalationSettings;
9464
9464
  if (P && typeof P == "object") {
@@ -9466,7 +9466,7 @@ function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9466
9466
  const ae = Array.isArray(P.escalationSettingsActionTypeIds) ? P.escalationSettingsActionTypeIds : [];
9467
9467
  H(ae.map((G) => String(G))), le(Array.isArray(P.thirdPartyId) ? P.thirdPartyId : []), fe(!!P.humanLoop), ce(!!P.isAutoExpire);
9468
9468
  }
9469
- }, [j, O, z]);
9469
+ }, [z, O, j]);
9470
9470
  const Je = async () => {
9471
9471
  try {
9472
9472
  _(!0);
@@ -9523,7 +9523,7 @@ function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9523
9523
  V
9524
9524
  ] }) : null,
9525
9525
  /* @__PURE__ */ c(
9526
- jc,
9526
+ zc,
9527
9527
  {
9528
9528
  sortBy: o,
9529
9529
  groupBy: u,
@@ -9556,7 +9556,7 @@ function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9556
9556
  /* @__PURE__ */ c(
9557
9557
  _c,
9558
9558
  {
9559
- escBasis: j,
9559
+ escBasis: z,
9560
9560
  setEscBasis: Q,
9561
9561
  selectedSeverity: J,
9562
9562
  setSelectedSeverity: K,
@@ -9602,7 +9602,7 @@ function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9602
9602
  });
9603
9603
  try {
9604
9604
  if (O) {
9605
- const Y = Array.isArray(Z) ? Z.map((Ke) => Number(Ke)) : [], P = (z || []).find(
9605
+ const Y = Array.isArray(Z) ? Z.map((Ke) => Number(Ke)) : [], P = (j || []).find(
9606
9606
  (Ke) => Ke?.ruleId === O || Ke?.ruleName === O || Ke?.RuleId === O
9607
9607
  ), ae = typeof P?.recordId == "number" ? P.recordId : void 0;
9608
9608
  if (!P || typeof ae != "number") {
@@ -9698,12 +9698,12 @@ function Jc({ severities: t, rules: e, userRoles: s, rawRules: n, onSave: r }) {
9698
9698
  /* @__PURE__ */ c($t, {})
9699
9699
  ] });
9700
9700
  }
9701
- const { Title: Mr, Text: os } = jt;
9701
+ const { Title: Mr, Text: os } = zt;
9702
9702
  function Fu({ severities: t, rules: e, onSave: s, onCancel: n }) {
9703
9703
  const { rules: r, alerts: i } = Be(), a = [
9704
9704
  { label: "By Severity", value: "By Severity" },
9705
9705
  { label: "By Created Date", value: "By Created Date" }
9706
- ], [o, l] = k("By Severity"), [u, d] = k(/* @__PURE__ */ new Set()), [h, f] = k(null), [m, g] = k(null), [p, v] = k({ inApp: !1, sms: !1, email: !1 }), [U, D] = k([]), [V, L] = k(!0), [j, Q] = k(!1);
9706
+ ], [o, l] = k("By Severity"), [u, d] = k(/* @__PURE__ */ new Set()), [h, f] = k(null), [m, g] = k(null), [p, v] = k({ inApp: !1, sms: !1, email: !1 }), [U, D] = k([]), [V, L] = k(!0), [z, Q] = k(!1);
9707
9707
  Se(() => {
9708
9708
  let O = !1;
9709
9709
  return (async () => {
@@ -9810,8 +9810,8 @@ function Fu({ severities: t, rules: e, onSave: s, onCancel: n }) {
9810
9810
  ] }),
9811
9811
  /* @__PURE__ */ c($t, {}),
9812
9812
  /* @__PURE__ */ y(_e, { className: "gap-3", children: [
9813
- /* @__PURE__ */ c(Fe, { onClick: n, disabled: j, children: "Cancel" }),
9814
- /* @__PURE__ */ c(Fe, { type: "primary", onClick: K, loading: j, children: "Save" })
9813
+ /* @__PURE__ */ c(Fe, { onClick: n, disabled: z, children: "Cancel" }),
9814
+ /* @__PURE__ */ c(Fe, { type: "primary", onClick: K, loading: z, children: "Save" })
9815
9815
  ] })
9816
9816
  ] });
9817
9817
  }
@@ -9871,7 +9871,7 @@ function su({ data: t }) {
9871
9871
  {
9872
9872
  key: "action",
9873
9873
  label: "Action Taken",
9874
- children: /* @__PURE__ */ y("div", { className: "w-full", children: [
9874
+ children: /* @__PURE__ */ y("div", { className: "w-full", style: { maxHeight: "50vh", overflowY: "auto" }, children: [
9875
9875
  /* @__PURE__ */ c(Fs, { className: "mb-4 rounded-md p-4", bordered: !0, children: /* @__PURE__ */ y("div", { className: "grid grid-cols-4 gap-6 text-xs", children: [
9876
9876
  /* @__PURE__ */ y("div", { className: "flex flex-col gap-1", children: [
9877
9877
  /* @__PURE__ */ c("span", { className: "text-gray-500", children: "Alert ID" }),
@@ -9903,7 +9903,7 @@ function su({ data: t }) {
9903
9903
  {
9904
9904
  key: "notification",
9905
9905
  label: "Notification Sent",
9906
- children: /* @__PURE__ */ y("div", { className: "grid grid-cols-2 gap-4", children: [
9906
+ children: /* @__PURE__ */ y("div", { className: "grid grid-cols-2 gap-4", style: { maxHeight: "50vh", overflowY: "auto" }, children: [
9907
9907
  (t.notifications || []).map((s, n) => /* @__PURE__ */ y(Fs, { className: "rounded-md p-4", bordered: !0, children: [
9908
9908
  /* @__PURE__ */ y("div", { className: "flex items-start justify-between", children: [
9909
9909
  /* @__PURE__ */ y("div", { className: "flex flex-col", children: [
@@ -10170,7 +10170,7 @@ const gu = {
10170
10170
  Medium: "#FEF9C2",
10171
10171
  Low: "#E0EDFF"
10172
10172
  }, Su = ({ isModalOpen: t, handleModalClose: e, selectedRow: s, fetchAlertLogs: n, alertStatusList: r = [], alertStatusLoading: i = !1, initialTab: a = "details", sourceTab: o }) => {
10173
- const [l, u] = k(), [d, h] = k(""), [f, m] = k(!1), g = na(null), [p, v] = k("details"), [U, D] = k(void 0), V = Gr(), { alerts: L } = Be(), { timeZoneDetails: j } = xs(), [Q, J] = k(!1), [K, O] = k(void 0), [I, C] = k(void 0), [ie, se] = k({}), [M, b] = k({}), S = s?.originalData || {}, {
10173
+ const [l, u] = k(), [d, h] = k(""), [f, m] = k(!1), g = na(null), [p, v] = k("details"), [U, D] = k(void 0), V = Gr(), { alerts: L } = Be(), { timeZoneDetails: z } = xs(), [Q, J] = k(!1), [K, O] = k(void 0), [I, C] = k(void 0), [ie, se] = k({}), [M, b] = k({}), S = s?.originalData || {}, {
10174
10174
  eventName: x,
10175
10175
  alertId: w,
10176
10176
  timestamp: T,
@@ -10194,26 +10194,26 @@ const gu = {
10194
10194
  status: ce(E?.messageStatus),
10195
10195
  notificationReceipientType: E?.notificationReceipientType || ""
10196
10196
  }), Re = (E, _) => {
10197
- const z = _.map(ge), Ne = z.filter((rt) => rt.status === "Delivered").length, We = _.map((rt) => rt?.sentAt).filter(Boolean).sort((rt, Je) => new Date(Je).getTime() - new Date(rt).getTime())[0], re = _[0] || {}, Qe = [re?.severityName, re?.anomalyName].filter(Boolean).join(" - ") || `${E} Notification`;
10197
+ const j = _.map(ge), Ne = j.filter((rt) => rt.status === "Delivered").length, We = _.map((rt) => rt?.sentAt).filter(Boolean).sort((rt, Je) => new Date(Je).getTime() - new Date(rt).getTime())[0], re = _[0] || {}, Qe = [re?.severityName, re?.anomalyName].filter(Boolean).join(" - ") || `${E} Notification`;
10198
10198
  return {
10199
10199
  channelLabel: `${E} Notification`,
10200
10200
  sentAt: We || "",
10201
10201
  messageTitle: Qe,
10202
10202
  messageBody: "",
10203
- total: z.length,
10203
+ total: j.length,
10204
10204
  delivered: Ne,
10205
- recipients: z
10205
+ recipients: j
10206
10206
  };
10207
10207
  }, Me = (E) => {
10208
10208
  const _ = /* @__PURE__ */ new Map();
10209
- return (E || []).forEach((z) => {
10210
- const Ne = String(z?.notificationType || "Unknown"), We = _.get(Ne) || [];
10211
- We.push(z), _.set(Ne, We);
10212
- }), Array.from(_.entries()).map(([z, Ne]) => Re(z, Ne));
10209
+ return (E || []).forEach((j) => {
10210
+ const Ne = String(j?.notificationType || "Unknown"), We = _.get(Ne) || [];
10211
+ We.push(j), _.set(Ne, We);
10212
+ }), Array.from(_.entries()).map(([j, Ne]) => Re(j, Ne));
10213
10213
  }, St = async (E) => {
10214
10214
  try {
10215
- const _ = await L.getAlertNotifications(E), z = Me(_);
10216
- D(z);
10215
+ const _ = await L.getAlertNotifications(E), j = Me(_);
10216
+ D(j);
10217
10217
  } catch {
10218
10218
  D(void 0);
10219
10219
  }
@@ -10230,15 +10230,15 @@ const gu = {
10230
10230
  t && v(a);
10231
10231
  }, [t, a]);
10232
10232
  const wt = o === "archived" || ["completed", "false positive"].includes(String(H || "").toLowerCase()), Lt = (E) => {
10233
- const _ = String(E?.value || "").toLowerCase(), z = String(E?.statusName || "").toLowerCase();
10234
- return _.includes("reopen") || z.includes("reopen");
10233
+ const _ = String(E?.value || "").toLowerCase(), j = String(E?.statusName || "").toLowerCase();
10234
+ return _.includes("reopen") || j.includes("reopen");
10235
10235
  }, Pt = (r || []).filter((E) => {
10236
10236
  const _ = Lt(E);
10237
10237
  return typeof o < "u" ? o === "archived" ? _ : !_ : wt ? _ : !_;
10238
10238
  }).map((E) => ({ value: E.value, label: E.statusName })), dt = we(() => pu(fe), [fe]);
10239
10239
  return Se(() => {
10240
10240
  let E = !1;
10241
- const _ = new AbortController(), z = async (re) => {
10241
+ const _ = new AbortController(), j = async (re) => {
10242
10242
  if (re) {
10243
10243
  E || se((Qe) => ({ ...Qe, [re]: !1 }));
10244
10244
  try {
@@ -10262,7 +10262,7 @@ const gu = {
10262
10262
  const Ne = dt.filter((re) => !Fr(re)).map((re) => re?.mediaUrl || re).filter((re) => typeof re == "string" && re.length > 0), We = {};
10263
10263
  return Ne.forEach((re) => {
10264
10264
  We[re] = !0;
10265
- }), b(We), Ne.forEach((re) => z(re)), () => {
10265
+ }), b(We), Ne.forEach((re) => j(re)), () => {
10266
10266
  E = !0, _.abort();
10267
10267
  };
10268
10268
  }, [dt]), /* @__PURE__ */ c(
@@ -10271,12 +10271,6 @@ const gu = {
10271
10271
  open: t,
10272
10272
  onCancel: e,
10273
10273
  width: 1e3,
10274
- styles: {
10275
- body: {
10276
- maxHeight: "70vh",
10277
- overflowY: "auto"
10278
- }
10279
- },
10280
10274
  footer: p === "details" ? /* @__PURE__ */ y("div", { className: "flex flex-row gap-2 justify-start", children: [
10281
10275
  /* @__PURE__ */ c(Fe, { onClick: e, className: "bg-[#6C757D] text-white", children: "Cancel" }),
10282
10276
  /* @__PURE__ */ c(
@@ -10294,16 +10288,16 @@ const gu = {
10294
10288
  modifiedBy: 0
10295
10289
  }, _ = await V.mutateAsync(E);
10296
10290
  if (_?.responseStatus) {
10297
- const z = _?.data || "Alert updated successfully.";
10298
- Ee.success(z, {
10291
+ const j = _?.data || "Alert updated successfully.";
10292
+ Ee.success(j, {
10299
10293
  autoClose: 1500,
10300
10294
  onClose: () => {
10301
10295
  n(), e();
10302
10296
  }
10303
10297
  }), u(void 0), h("");
10304
10298
  } else {
10305
- const z = _?.errorMessage || "Failed to update alert status";
10306
- Ee.error(z);
10299
+ const j = _?.errorMessage || "Failed to update alert status";
10300
+ Ee.error(j);
10307
10301
  }
10308
10302
  } catch (E) {
10309
10303
  console.error("Error updating alert status:", E), Ee.error("Failed to update alert status. Please try again.");
@@ -10325,7 +10319,7 @@ const gu = {
10325
10319
  {
10326
10320
  key: "details",
10327
10321
  label: "Alert Detail",
10328
- children: /* @__PURE__ */ y("div", { className: "grid grid-cols-2 gap-2", children: [
10322
+ children: /* @__PURE__ */ y("div", { className: "grid grid-cols-2 gap-2", style: { maxHeight: "50vh", overflowY: "auto" }, children: [
10329
10323
  /* @__PURE__ */ y("div", { className: "flex flex-col gap-2", children: [
10330
10324
  /* @__PURE__ */ c("div", { className: "text-sm font-bold", children: x || "Alert Event" }),
10331
10325
  le?.firstName ? /* @__PURE__ */ y("div", { className: "text-sm text-gray-500", children: [
@@ -10338,7 +10332,7 @@ const gu = {
10338
10332
  ] }) : null,
10339
10333
  /* @__PURE__ */ y("div", { className: "text-sm text-gray-500", children: [
10340
10334
  "Timestamp: ",
10341
- Ss(T, j?.ianaTimeZoneId)
10335
+ Ss(T, z?.ianaTimeZoneId)
10342
10336
  ] }),
10343
10337
  /* @__PURE__ */ y("div", { className: "font-sm text-gray-500", children: [
10344
10338
  /* @__PURE__ */ c("b", { className: "text-black text-sm/6", children: "Description:" }),
@@ -10434,7 +10428,7 @@ const gu = {
10434
10428
  ] }) : null
10435
10429
  ] }),
10436
10430
  dt.length ? /* @__PURE__ */ c("div", { className: "w-full", children: /* @__PURE__ */ c(ca, { ref: g, dots: !0, className: "w-full", children: dt.map((E, _) => {
10437
- const z = E.mediaUrl || E, Ne = Fr(E), We = !Ne && M[String(z)];
10431
+ const j = E.mediaUrl || E, Ne = Fr(E), We = !Ne && M[String(j)];
10438
10432
  return /* @__PURE__ */ y("div", { className: "flex justify-center items-center relative", children: [
10439
10433
  Ne ? /* @__PURE__ */ y(
10440
10434
  "video",
@@ -10444,7 +10438,7 @@ const gu = {
10444
10438
  controls: !0,
10445
10439
  className: "max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg",
10446
10440
  children: [
10447
- /* @__PURE__ */ c("source", { src: z }),
10441
+ /* @__PURE__ */ c("source", { src: j }),
10448
10442
  "Your browser does not support the video tag."
10449
10443
  ]
10450
10444
  }
@@ -10453,27 +10447,27 @@ const gu = {
10453
10447
  /* @__PURE__ */ c(
10454
10448
  "img",
10455
10449
  {
10456
- src: z,
10450
+ src: j,
10457
10451
  alt: E.caption || `media-${_}`,
10458
10452
  className: `max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg transition-opacity duration-200 ${We ? "opacity-0" : "opacity-100"}`,
10459
- onLoad: () => b((re) => ({ ...re, [String(z)]: !1 })),
10460
- onError: () => b((re) => ({ ...re, [String(z)]: !1 }))
10453
+ onLoad: () => b((re) => ({ ...re, [String(j)]: !1 })),
10454
+ onError: () => b((re) => ({ ...re, [String(j)]: !1 }))
10461
10455
  },
10462
- String(z)
10456
+ String(j)
10463
10457
  )
10464
10458
  ] }),
10465
10459
  E.caption && /* @__PURE__ */ c("p", { className: "text-xs text-gray-500 mt-1", children: E.caption }),
10466
- !Ne && ie[String(z)] ? /* @__PURE__ */ c(
10460
+ !Ne && ie[String(j)] ? /* @__PURE__ */ c(
10467
10461
  "button",
10468
10462
  {
10469
10463
  onClick: () => {
10470
- J(!0), O(z), C(E.type || "image");
10464
+ J(!0), O(j), C(E.type || "image");
10471
10465
  },
10472
10466
  className: "absolute bottom-3 right-3 text-white bg-black/50 rounded-full p-2 hover:bg-black/70",
10473
10467
  children: /* @__PURE__ */ c(Ki, { size: 20 })
10474
10468
  }
10475
10469
  ) : null
10476
- ] }, String(z) || _);
10470
+ ] }, String(j) || _);
10477
10471
  }) }) }) : null
10478
10472
  ] }) }),
10479
10473
  /* @__PURE__ */ c(
@@ -10524,8 +10518,8 @@ function wu() {
10524
10518
  }
10525
10519
  function Xi({ alerts: t, loading: e = !1, columns: s, onRefetch: n }) {
10526
10520
  const [r, i] = k(!1), [a, o] = k(null), [l, u] = k("details"), { list: d, loading: h } = wu(), { timeZoneDetails: f, loading: m } = xs(), g = f?.timeZoneName ?? "UTC", p = f?.ianaTimeZoneId ?? "UTC";
10527
- function v(j, Q) {
10528
- o(j), u(Q?.tab ?? "details"), V(Q?.sourceTab ?? "active"), i(!0);
10521
+ function v(z, Q) {
10522
+ o(z), u(Q?.tab ?? "details"), V(Q?.sourceTab ?? "active"), i(!0);
10529
10523
  }
10530
10524
  function U() {
10531
10525
  i(!1);
@@ -10540,9 +10534,9 @@ function Xi({ alerts: t, loading: e = !1, columns: s, onRefetch: n }) {
10540
10534
  }
10541
10535
  } : null;
10542
10536
  return /* @__PURE__ */ y("div", { className: "p-6 flex flex-col items-start justify-start min-h-screen w-full overflow-auto", children: [
10543
- /* @__PURE__ */ y("div", { className: "w-1/2 flex items-center justify-between mb-4", children: [
10537
+ /* @__PURE__ */ y("div", { className: "w-full grid grid-cols-3 sm:grid-cols-1 items-center mb-4", children: [
10544
10538
  /* @__PURE__ */ c("h1", { className: "text-xl font-bold text-black", children: "Alert Console" }),
10545
- m ? /* @__PURE__ */ c(ws, { size: "small" }) : /* @__PURE__ */ c(qc, { label: g, timeZone: p })
10539
+ /* @__PURE__ */ c("div", { className: "flex items-center justify-start sm:justify-center", children: m ? /* @__PURE__ */ c(ws, { size: "small" }) : /* @__PURE__ */ c(qc, { label: g, timeZone: p }) })
10546
10540
  ] }),
10547
10541
  /* @__PURE__ */ c(
10548
10542
  dn,
@@ -10550,8 +10544,8 @@ function Xi({ alerts: t, loading: e = !1, columns: s, onRefetch: n }) {
10550
10544
  defaultActiveKey: "active",
10551
10545
  className: "w-full",
10552
10546
  tabBarStyle: { fontSize: "medium" },
10553
- onChange: (j) => {
10554
- j === "active" && n?.();
10547
+ onChange: (z) => {
10548
+ z === "active" && n?.();
10555
10549
  },
10556
10550
  items: [
10557
10551
  {