@ssgc/alert-console 2.9.11 → 2.9.12

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,6 +1,6 @@
1
1
  import { jsx as c, jsxs as h, Fragment as cr } from "react/jsx-runtime";
2
- import { useContext as ka, useMemo as Ne, createContext as Ia, forwardRef as ur, createElement as qs, useState as v, useEffect as ne, useRef as xa } from "react";
3
- import { Select as Ce, Table as on, Row as $e, Col as _, Input as Oa, Tag as Ct, Space as at, Tooltip as wn, Button as Pe, Progress as Ea, Dropdown as Ma, Typography as _t, Spin as Ts, Checkbox as Ot, Divider as Bt, TimePicker as An, Tabs as ln, Card as Rs, Steps as Da, Modal as Ca, Carousel as Ra } from "antd";
2
+ import { useContext as ka, useMemo as Te, createContext as Ia, forwardRef as ur, createElement as qs, useState as v, useEffect as ne, useRef as xa } from "react";
3
+ import { Select as Ce, Table as on, Row as $e, Col as _, Input as Oa, Tag as Ct, Space as at, Tooltip as wn, Button as Pe, Progress as Ea, Dropdown as Ma, Typography as _t, Spin as Ns, Checkbox as Ot, Divider as Bt, TimePicker as An, Tabs as ln, Card as Rs, Steps as Da, Modal as Ca, Carousel as Ra } from "antd";
4
4
  import { MessageOutlined as Ua, MailOutlined as La, MoreOutlined as Fa, PlusOutlined as $a, EditOutlined as Pa, LeftOutlined as Wa, RightOutlined as Va } from "@ant-design/icons";
5
5
  import { toast as be } from "react-toastify";
6
6
  import { useQueryClient as Za, useMutation as Ba, useQuery as cn, QueryClient as za, QueryClientProvider as Ha } from "@tanstack/react-query";
@@ -9,16 +9,16 @@ const Ga = "#FF3B30", qa = "#FF9500", Ya = "#FFCC00", ja = "#34C759", ss = {
9
9
  high: qa,
10
10
  medium: Ya,
11
11
  low: ja
12
- }, Tn = {
12
+ }, Nn = {
13
13
  Critical: ss.critical,
14
14
  High: ss.high,
15
15
  Medium: ss.medium,
16
16
  Low: ss.low
17
17
  };
18
18
  function _a(t) {
19
- return Tn[t] || Tn.Low;
19
+ return Nn[t] || Nn.Low;
20
20
  }
21
- function Nn(t) {
21
+ function Tn(t) {
22
22
  if (!t || typeof t != "string") return 0;
23
23
  const e = t.trim().split(":");
24
24
  if (e.length !== 3) return 0;
@@ -95,7 +95,7 @@ function si(t) {
95
95
  pageSize: s?.pageSize ?? 10,
96
96
  ...s?.anomalyId !== void 0 && { anomalyId: s.anomalyId },
97
97
  ...s?.spaceId !== void 0 && { spaceId: s.spaceId },
98
- ...s?.severityId !== void 0 && { severity: s.severityId },
98
+ ...s?.severityName !== void 0 && { severity: s.severityName },
99
99
  ...s?.thirdPartyIds?.length && { thirdPartyIds: s.thirdPartyIds.join(",") },
100
100
  ...s?.searchText && { searchText: s.searchText },
101
101
  isArchived: s?.isArchived ?? !1
@@ -289,69 +289,69 @@ function oi() {
289
289
  (function(s, n) {
290
290
  t.exports = n();
291
291
  })(ii, (function() {
292
- var s = 1e3, n = 6e4, r = 36e5, a = "millisecond", i = "second", o = "minute", l = "hour", u = "day", d = "week", m = "month", S = "quarter", g = "year", I = "date", E = "Invalid Date", D = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, j = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, H = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(M) {
293
- var b = ["th", "st", "nd", "rd"], w = M % 100;
294
- return "[" + M + (b[(w - 20) % 10] || b[w] || b[0]) + "]";
295
- } }, P = function(M, b, w) {
296
- var x = String(M);
297
- return !x || x.length >= b ? M : "" + Array(b + 1 - x.length).join(w) + M;
298
- }, p = { s: P, z: function(M) {
299
- var b = -M.utcOffset(), w = Math.abs(b), x = Math.floor(w / 60), N = w % 60;
300
- return (b <= 0 ? "+" : "-") + P(x, 2, "0") + ":" + P(N, 2, "0");
301
- }, m: function M(b, w) {
302
- if (b.date() < w.date()) return -M(w, b);
303
- var x = 12 * (w.year() - b.year()) + (w.month() - b.month()), N = b.clone().add(x, m), F = w - N < 0, U = b.clone().add(x + (F ? -1 : 1), m);
304
- return +(-(x + (w - N) / (F ? N - U : U - N)) || 0);
305
- }, a: function(M) {
306
- return M < 0 ? Math.ceil(M) || 0 : Math.floor(M);
307
- }, p: function(M) {
308
- return { M: m, y: g, w: d, d: u, D: I, h: l, m: o, s: i, ms: a, Q: S }[M] || String(M || "").toLowerCase().replace(/s$/, "");
309
- }, u: function(M) {
310
- return M === void 0;
292
+ var s = 1e3, n = 6e4, r = 36e5, a = "millisecond", i = "second", o = "minute", l = "hour", u = "day", d = "week", m = "month", S = "quarter", g = "year", I = "date", E = "Invalid Date", M = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, j = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, G = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(D) {
293
+ var b = ["th", "st", "nd", "rd"], w = D % 100;
294
+ return "[" + D + (b[(w - 20) % 10] || b[w] || b[0]) + "]";
295
+ } }, P = function(D, b, w) {
296
+ var x = String(D);
297
+ return !x || x.length >= b ? D : "" + Array(b + 1 - x.length).join(w) + D;
298
+ }, p = { s: P, z: function(D) {
299
+ var b = -D.utcOffset(), w = Math.abs(b), x = Math.floor(w / 60), A = w % 60;
300
+ return (b <= 0 ? "+" : "-") + P(x, 2, "0") + ":" + P(A, 2, "0");
301
+ }, m: function D(b, w) {
302
+ if (b.date() < w.date()) return -D(w, b);
303
+ var x = 12 * (w.year() - b.year()) + (w.month() - b.month()), A = b.clone().add(x, m), F = w - A < 0, U = b.clone().add(x + (F ? -1 : 1), m);
304
+ return +(-(x + (w - A) / (F ? A - U : U - A)) || 0);
305
+ }, a: function(D) {
306
+ return D < 0 ? Math.ceil(D) || 0 : Math.floor(D);
307
+ }, p: function(D) {
308
+ return { M: m, y: g, w: d, d: u, D: I, h: l, m: o, s: i, ms: a, Q: S }[D] || String(D || "").toLowerCase().replace(/s$/, "");
309
+ }, u: function(D) {
310
+ return D === void 0;
311
311
  } }, O = "en", Z = {};
312
- Z[O] = H;
313
- var R = "$isDayjsObject", G = function(M) {
314
- return M instanceof re || !(!M || !M[R]);
315
- }, f = function M(b, w, x) {
316
- var N;
312
+ Z[O] = G;
313
+ var R = "$isDayjsObject", q = function(D) {
314
+ return D instanceof re || !(!D || !D[R]);
315
+ }, f = function D(b, w, x) {
316
+ var A;
317
317
  if (!b) return O;
318
318
  if (typeof b == "string") {
319
319
  var F = b.toLowerCase();
320
- Z[F] && (N = F), w && (Z[F] = w, N = F);
320
+ Z[F] && (A = F), w && (Z[F] = w, A = F);
321
321
  var U = b.split("-");
322
- if (!N && U.length > 1) return M(U[0]);
322
+ if (!A && U.length > 1) return D(U[0]);
323
323
  } else {
324
- var q = b.name;
325
- Z[q] = b, N = q;
324
+ var Y = b.name;
325
+ Z[Y] = b, A = Y;
326
326
  }
327
- return !x && N && (O = N), N || !x && O;
328
- }, A = function(M, b) {
329
- if (G(M)) return M.clone();
327
+ return !x && A && (O = A), A || !x && O;
328
+ }, N = function(D, b) {
329
+ if (q(D)) return D.clone();
330
330
  var w = typeof b == "object" ? b : {};
331
- return w.date = M, w.args = arguments, new re(w);
331
+ return w.date = D, w.args = arguments, new re(w);
332
332
  }, C = p;
333
- C.l = f, C.i = G, C.w = function(M, b) {
334
- return A(M, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
333
+ C.l = f, C.i = q, C.w = function(D, b) {
334
+ return N(D, { locale: b.$L, utc: b.$u, x: b.$x, $offset: b.$offset });
335
335
  };
336
336
  var re = (function() {
337
- function M(w) {
337
+ function D(w) {
338
338
  this.$L = f(w.locale, null, !0), this.parse(w), this.$x = this.$x || w.x || {}, this[R] = !0;
339
339
  }
340
- var b = M.prototype;
340
+ var b = D.prototype;
341
341
  return b.parse = function(w) {
342
342
  this.$d = (function(x) {
343
- var N = x.date, F = x.utc;
344
- if (N === null) return /* @__PURE__ */ new Date(NaN);
345
- if (C.u(N)) return /* @__PURE__ */ new Date();
346
- if (N instanceof Date) return new Date(N);
347
- if (typeof N == "string" && !/Z$/i.test(N)) {
348
- var U = N.match(D);
343
+ var A = x.date, F = x.utc;
344
+ if (A === null) return /* @__PURE__ */ new Date(NaN);
345
+ if (C.u(A)) return /* @__PURE__ */ new Date();
346
+ if (A instanceof Date) return new Date(A);
347
+ if (typeof A == "string" && !/Z$/i.test(A)) {
348
+ var U = A.match(M);
349
349
  if (U) {
350
- var q = U[2] - 1 || 0, J = (U[7] || "0").substring(0, 3);
351
- return F ? new Date(Date.UTC(U[1], q, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, J)) : new Date(U[1], q, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, J);
350
+ var Y = U[2] - 1 || 0, J = (U[7] || "0").substring(0, 3);
351
+ return F ? new Date(Date.UTC(U[1], Y, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, J)) : new Date(U[1], Y, U[3] || 1, U[4] || 0, U[5] || 0, U[6] || 0, J);
352
352
  }
353
353
  }
354
- return new Date(N);
354
+ return new Date(A);
355
355
  })(w), this.init();
356
356
  }, b.init = function() {
357
357
  var w = this.$d;
@@ -361,33 +361,33 @@ function oi() {
361
361
  }, b.isValid = function() {
362
362
  return this.$d.toString() !== E;
363
363
  }, b.isSame = function(w, x) {
364
- var N = A(w);
365
- return this.startOf(x) <= N && N <= this.endOf(x);
364
+ var A = N(w);
365
+ return this.startOf(x) <= A && A <= this.endOf(x);
366
366
  }, b.isAfter = function(w, x) {
367
- return A(w) < this.startOf(x);
367
+ return N(w) < this.startOf(x);
368
368
  }, b.isBefore = function(w, x) {
369
- return this.endOf(x) < A(w);
370
- }, b.$g = function(w, x, N) {
371
- return C.u(w) ? this[x] : this.set(N, w);
369
+ return this.endOf(x) < N(w);
370
+ }, b.$g = function(w, x, A) {
371
+ return C.u(w) ? this[x] : this.set(A, w);
372
372
  }, b.unix = function() {
373
373
  return Math.floor(this.valueOf() / 1e3);
374
374
  }, b.valueOf = function() {
375
375
  return this.$d.getTime();
376
376
  }, b.startOf = function(w, x) {
377
- var N = this, F = !!C.u(x) || x, U = C.p(w), q = function(we, ue) {
378
- var ie = C.w(N.$u ? Date.UTC(N.$y, ue, we) : new Date(N.$y, ue, we), N);
377
+ var A = this, F = !!C.u(x) || x, U = C.p(w), Y = function(Ae, ue) {
378
+ var ie = C.w(A.$u ? Date.UTC(A.$y, ue, Ae) : new Date(A.$y, ue, Ae), A);
379
379
  return F ? ie : ie.endOf(u);
380
- }, J = function(we, ue) {
381
- return C.w(N.toDate()[we].apply(N.toDate("s"), (F ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ue)), N);
380
+ }, J = function(Ae, ue) {
381
+ return C.w(A.toDate()[Ae].apply(A.toDate("s"), (F ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ue)), A);
382
382
  }, Q = this.$W, X = this.$M, oe = this.$D, ce = "set" + (this.$u ? "UTC" : "");
383
383
  switch (U) {
384
384
  case g:
385
- return F ? q(1, 0) : q(31, 11);
385
+ return F ? Y(1, 0) : Y(31, 11);
386
386
  case m:
387
- return F ? q(1, X) : q(0, X + 1);
387
+ return F ? Y(1, X) : Y(0, X + 1);
388
388
  case d:
389
389
  var ae = this.$locale().weekStart || 0, fe = (Q < ae ? Q + 7 : Q) - ae;
390
- return q(F ? oe - fe : oe + (6 - fe), X);
390
+ return Y(F ? oe - fe : oe + (6 - fe), X);
391
391
  case u:
392
392
  case I:
393
393
  return J(ce + "Hours", 0);
@@ -403,39 +403,39 @@ function oi() {
403
403
  }, b.endOf = function(w) {
404
404
  return this.startOf(w, !1);
405
405
  }, b.$set = function(w, x) {
406
- var N, F = C.p(w), U = "set" + (this.$u ? "UTC" : ""), q = (N = {}, N[u] = U + "Date", N[I] = U + "Date", N[m] = U + "Month", N[g] = U + "FullYear", N[l] = U + "Hours", N[o] = U + "Minutes", N[i] = U + "Seconds", N[a] = U + "Milliseconds", N)[F], J = F === u ? this.$D + (x - this.$W) : x;
406
+ var A, F = C.p(w), U = "set" + (this.$u ? "UTC" : ""), Y = (A = {}, A[u] = U + "Date", A[I] = U + "Date", A[m] = U + "Month", A[g] = U + "FullYear", A[l] = U + "Hours", A[o] = U + "Minutes", A[i] = U + "Seconds", A[a] = U + "Milliseconds", A)[F], J = F === u ? this.$D + (x - this.$W) : x;
407
407
  if (F === m || F === g) {
408
408
  var Q = this.clone().set(I, 1);
409
- Q.$d[q](J), Q.init(), this.$d = Q.set(I, Math.min(this.$D, Q.daysInMonth())).$d;
410
- } else q && this.$d[q](J);
409
+ Q.$d[Y](J), Q.init(), this.$d = Q.set(I, Math.min(this.$D, Q.daysInMonth())).$d;
410
+ } else Y && this.$d[Y](J);
411
411
  return this.init(), this;
412
412
  }, b.set = function(w, x) {
413
413
  return this.clone().$set(w, x);
414
414
  }, b.get = function(w) {
415
415
  return this[C.p(w)]();
416
416
  }, b.add = function(w, x) {
417
- var N, F = this;
417
+ var A, F = this;
418
418
  w = Number(w);
419
- var U = C.p(x), q = function(X) {
420
- var oe = A(F);
419
+ var U = C.p(x), Y = function(X) {
420
+ var oe = N(F);
421
421
  return C.w(oe.date(oe.date() + Math.round(X * w)), F);
422
422
  };
423
423
  if (U === m) return this.set(m, this.$M + w);
424
424
  if (U === g) return this.set(g, this.$y + w);
425
- if (U === u) return q(1);
426
- if (U === d) return q(7);
427
- var J = (N = {}, N[o] = n, N[l] = r, N[i] = s, N)[U] || 1, Q = this.$d.getTime() + w * J;
425
+ if (U === u) return Y(1);
426
+ if (U === d) return Y(7);
427
+ var J = (A = {}, A[o] = n, A[l] = r, A[i] = s, A)[U] || 1, Q = this.$d.getTime() + w * J;
428
428
  return C.w(Q, this);
429
429
  }, b.subtract = function(w, x) {
430
430
  return this.add(-1 * w, x);
431
431
  }, b.format = function(w) {
432
- var x = this, N = this.$locale();
433
- if (!this.isValid()) return N.invalidDate || E;
434
- var F = w || "YYYY-MM-DDTHH:mm:ssZ", U = C.z(this), q = this.$H, J = this.$m, Q = this.$M, X = N.weekdays, oe = N.months, ce = N.meridiem, ae = function(ue, ie, Ee, We) {
432
+ var x = this, A = this.$locale();
433
+ if (!this.isValid()) return A.invalidDate || E;
434
+ var F = w || "YYYY-MM-DDTHH:mm:ssZ", U = C.z(this), Y = this.$H, J = this.$m, Q = this.$M, X = A.weekdays, oe = A.months, ce = A.meridiem, ae = function(ue, ie, Ee, We) {
435
435
  return ue && (ue[ie] || ue(x, F)) || Ee[ie].slice(0, We);
436
436
  }, fe = function(ue) {
437
- return C.s(q % 12 || 12, ue, "0");
438
- }, we = ce || function(ue, ie, Ee) {
437
+ return C.s(Y % 12 || 12, ue, "0");
438
+ }, Ae = ce || function(ue, ie, Ee) {
439
439
  var We = ue < 12 ? "AM" : "PM";
440
440
  return Ee ? We.toLowerCase() : We;
441
441
  };
@@ -451,7 +451,7 @@ function oi() {
451
451
  case "MM":
452
452
  return C.s(Q + 1, 2, "0");
453
453
  case "MMM":
454
- return ae(N.monthsShort, Q, oe, 3);
454
+ return ae(A.monthsShort, Q, oe, 3);
455
455
  case "MMMM":
456
456
  return ae(oe, Q);
457
457
  case "D":
@@ -461,23 +461,23 @@ function oi() {
461
461
  case "d":
462
462
  return String(x.$W);
463
463
  case "dd":
464
- return ae(N.weekdaysMin, x.$W, X, 2);
464
+ return ae(A.weekdaysMin, x.$W, X, 2);
465
465
  case "ddd":
466
- return ae(N.weekdaysShort, x.$W, X, 3);
466
+ return ae(A.weekdaysShort, x.$W, X, 3);
467
467
  case "dddd":
468
468
  return X[x.$W];
469
469
  case "H":
470
- return String(q);
470
+ return String(Y);
471
471
  case "HH":
472
- return C.s(q, 2, "0");
472
+ return C.s(Y, 2, "0");
473
473
  case "h":
474
474
  return fe(1);
475
475
  case "hh":
476
476
  return fe(2);
477
477
  case "a":
478
- return we(q, J, !0);
478
+ return Ae(Y, J, !0);
479
479
  case "A":
480
- return we(q, J, !1);
480
+ return Ae(Y, J, !1);
481
481
  case "m":
482
482
  return String(J);
483
483
  case "mm":
@@ -496,11 +496,11 @@ function oi() {
496
496
  }));
497
497
  }, b.utcOffset = function() {
498
498
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
499
- }, b.diff = function(w, x, N) {
500
- var F, U = this, q = C.p(x), J = A(w), Q = (J.utcOffset() - this.utcOffset()) * n, X = this - J, oe = function() {
499
+ }, b.diff = function(w, x, A) {
500
+ var F, U = this, Y = C.p(x), J = N(w), Q = (J.utcOffset() - this.utcOffset()) * n, X = this - J, oe = function() {
501
501
  return C.m(U, J);
502
502
  };
503
- switch (q) {
503
+ switch (Y) {
504
504
  case g:
505
505
  F = oe() / 12;
506
506
  break;
@@ -528,15 +528,15 @@ function oi() {
528
528
  default:
529
529
  F = X;
530
530
  }
531
- return N ? F : C.a(F);
531
+ return A ? F : C.a(F);
532
532
  }, b.daysInMonth = function() {
533
533
  return this.endOf(m).$D;
534
534
  }, b.$locale = function() {
535
535
  return Z[this.$L];
536
536
  }, b.locale = function(w, x) {
537
537
  if (!w) return this.$L;
538
- var N = this.clone(), F = f(w, x, !0);
539
- return F && (N.$L = F), N;
538
+ var A = this.clone(), F = f(w, x, !0);
539
+ return F && (A.$L = F), A;
540
540
  }, b.clone = function() {
541
541
  return C.w(this.$d, this);
542
542
  }, b.toDate = function() {
@@ -547,17 +547,17 @@ function oi() {
547
547
  return this.$d.toISOString();
548
548
  }, b.toString = function() {
549
549
  return this.$d.toUTCString();
550
- }, M;
550
+ }, D;
551
551
  })(), me = re.prototype;
552
- return A.prototype = me, [["$ms", a], ["$s", i], ["$m", o], ["$H", l], ["$W", u], ["$M", m], ["$y", g], ["$D", I]].forEach((function(M) {
553
- me[M[1]] = function(b) {
554
- return this.$g(b, M[0], M[1]);
552
+ return N.prototype = me, [["$ms", a], ["$s", i], ["$m", o], ["$H", l], ["$W", u], ["$M", m], ["$y", g], ["$D", I]].forEach((function(D) {
553
+ me[D[1]] = function(b) {
554
+ return this.$g(b, D[0], D[1]);
555
555
  };
556
- })), A.extend = function(M, b) {
557
- return M.$i || (M(b, re, A), M.$i = !0), A;
558
- }, A.locale = f, A.isDayjs = G, A.unix = function(M) {
559
- return A(1e3 * M);
560
- }, A.en = Z[O], A.Ls = Z, A.p = {}, A;
556
+ })), N.extend = function(D, b) {
557
+ return D.$i || (D(b, re, N), D.$i = !0), N;
558
+ }, N.locale = f, N.isDayjs = q, N.unix = function(D) {
559
+ return N(1e3 * D);
560
+ }, N.en = Z[O], N.Ls = Z, N.p = {}, N;
561
561
  }));
562
562
  })(fs)), fs.exports;
563
563
  }
@@ -925,11 +925,11 @@ function yi(t) {
925
925
  m
926
926
  ] = await Promise.allSettled(a), S = (f) => {
927
927
  if (f.status !== "fulfilled") return [];
928
- const A = f.value;
929
- return Array.isArray(A) ? A : Array.isArray(A?.Data) ? A.Data : Array.isArray(A?.data) ? A.data : [];
930
- }, g = S(i), I = S(o), E = S(l), D = S(u), j = S(d), H = m.status === "fulfilled" ? m.value : null;
928
+ const N = f.value;
929
+ return Array.isArray(N) ? N : Array.isArray(N?.Data) ? N.Data : Array.isArray(N?.data) ? N.data : [];
930
+ }, g = S(i), I = S(o), E = S(l), M = S(u), j = S(d), G = m.status === "fulfilled" ? m.value : null;
931
931
  let P = [];
932
- Array.isArray(H) ? P = H : Array.isArray(H?.Data) ? P = H.Data : Array.isArray(H?.data) && (P = H.data);
932
+ Array.isArray(G) ? P = G : Array.isArray(G?.Data) ? P = G.Data : Array.isArray(G?.data) && (P = G.data);
933
933
  const p = g.map((f) => ({
934
934
  actionTypeId: Number(f?.ActionTypeId),
935
935
  name: f?.DisplayName ?? f?.Name ?? ""
@@ -942,15 +942,15 @@ function yi(t) {
942
942
  })), R = P.map((f) => ({
943
943
  userRoleId: f.UserRoleId ?? f.userRoleId ?? f.Id ?? f.id ?? 0,
944
944
  userRoleName: f.UserRoleName ?? f.userRoleName ?? f.Name ?? f.name ?? ""
945
- })), G = {
945
+ })), q = {
946
946
  actionTypes: p,
947
947
  anomalies: O,
948
948
  thirdParties: Z
949
949
  };
950
- return D.length && (G.severities = D.map((f) => ({
950
+ return M.length && (q.severities = M.map((f) => ({
951
951
  severityId: f?.SeverityId ?? f?.severityId,
952
952
  severityName: f?.DisplayName ?? f?.SeverityName ?? f?.Name ?? f?.name ?? ""
953
- }))), j.length && (G.scheduleTypes = j), R.length && (G.userRoles = R), G;
953
+ }))), j.length && (q.scheduleTypes = j), R.length && (q.userRoles = R), q;
954
954
  },
955
955
  async updateRule(n, r) {
956
956
  const a = `${s}/${n}`, { escalationSettings: i, Anomaly: o, Severity: l, ...u } = r ?? {};
@@ -1048,12 +1048,12 @@ function pi(t) {
1048
1048
  d
1049
1049
  ] = await Promise.allSettled(a), m = (R) => {
1050
1050
  if (R.status !== "fulfilled") return [];
1051
- const G = R.value;
1052
- return Array.isArray(G) ? G : Array.isArray(G?.data) ? G.data : [];
1053
- }, S = m(i), g = m(o), I = m(l), E = m(u), D = d.status === "fulfilled" ? d.value : null, j = S.map((R) => ({
1051
+ const q = R.value;
1052
+ return Array.isArray(q) ? q : Array.isArray(q?.data) ? q.data : [];
1053
+ }, S = m(i), g = m(o), I = m(l), E = m(u), M = d.status === "fulfilled" ? d.value : null, j = S.map((R) => ({
1054
1054
  actionTypeId: R?.ActionTypeUniqueId,
1055
1055
  name: R?.Name ?? ""
1056
- })), H = g.map((R) => ({
1056
+ })), G = g.map((R) => ({
1057
1057
  recordId: R?.AnomalyId,
1058
1058
  anomalyName: R?.DisplayName ?? R?.Name ?? ""
1059
1059
  })), P = I.map((R) => ({
@@ -1061,13 +1061,13 @@ function pi(t) {
1061
1061
  thirdPartyName: R?.ThirdPartyName ?? R?.Name ?? ""
1062
1062
  }));
1063
1063
  let p = [];
1064
- Array.isArray(D) ? p = D : Array.isArray(D?.Data) ? p = D.Data : Array.isArray(D?.data) && (p = D.data);
1064
+ Array.isArray(M) ? p = M : Array.isArray(M?.Data) ? p = M.Data : Array.isArray(M?.data) && (p = M.data);
1065
1065
  const O = p.map((R) => ({
1066
1066
  userRoleId: R.userRoleId ?? 0,
1067
1067
  userRoleName: R.userRoleName ?? ""
1068
1068
  })), Z = {
1069
1069
  actionTypes: j,
1070
- anomalies: H,
1070
+ anomalies: G,
1071
1071
  thirdParties: P
1072
1072
  };
1073
1073
  return E.length && (Z.severities = E.map((R) => ({
@@ -1291,7 +1291,7 @@ function wi({
1291
1291
  spacesBaseUrl: r,
1292
1292
  children: a
1293
1293
  }) {
1294
- const i = Ne(() => {
1294
+ const i = Te(() => {
1295
1295
  const l = e?.alertsBaseUrl?.trim() || kn[t]?.alerts || "";
1296
1296
  let u = e?.rulesBaseUrl?.trim() || kn[t]?.rules || "";
1297
1297
  t === "snl" && (u = l);
@@ -1305,7 +1305,7 @@ function wi({
1305
1305
  s,
1306
1306
  n,
1307
1307
  r
1308
- ]), o = Ne(() => {
1308
+ ]), o = Te(() => {
1309
1309
  const l = { baseUrl: i.alertsBaseUrl, headers: i.headers }, u = { baseUrl: i.rulesBaseUrl, headers: i.headers }, d = {
1310
1310
  schools: () => fi({ ...l, spacesBaseUrl: i.spacesBaseUrl }),
1311
1311
  transit: () => vi(l),
@@ -1333,7 +1333,7 @@ const Ai = {
1333
1333
  High: "#FF95004D",
1334
1334
  Medium: "#FEF9C2",
1335
1335
  Low: "#E0EDFF"
1336
- }, Ti = {
1336
+ }, Ni = {
1337
1337
  Critical: "#FF3B30",
1338
1338
  High: "#FFB86A",
1339
1339
  Medium: "#FFCC00",
@@ -1343,7 +1343,7 @@ function En(t, e, s) {
1343
1343
  const n = t === un, r = t === dn, a = e.isEmailSent ?? !1, i = e.isSMSSent ?? !1, o = n && a || r && i, l = n ? "Send Email" : r ? "Send SMS" : s, u = n && a ? "Email sent" : r && i ? "SMS sent" : l, d = n && a ? "Email sent" : r && i ? "SMS sent" : `Click to ${l}`;
1344
1344
  return { isDisabled: o, buttonText: u, tooltipTitle: d };
1345
1345
  }
1346
- function Ni(t, e = !1) {
1346
+ function Ti(t, e = !1) {
1347
1347
  const s = /* @__PURE__ */ new Set();
1348
1348
  (t || []).forEach((r) => {
1349
1349
  const a = e ? r.spaceNumber ?? r.spaceName : r.spaceName;
@@ -1358,7 +1358,7 @@ function Us(t, e) {
1358
1358
  function is(t) {
1359
1359
  return t === un || t === dn;
1360
1360
  }
1361
- function Ns({ value: t, onChange: e, options: s, className: n, dropdownWidth: r }) {
1361
+ function Ts({ value: t, onChange: e, options: s, className: n, dropdownWidth: r }) {
1362
1362
  return /* @__PURE__ */ c(
1363
1363
  Ce,
1364
1364
  {
@@ -1378,7 +1378,7 @@ const bi = [
1378
1378
  { label: "Low", value: "Low" }
1379
1379
  ];
1380
1380
  function ki({ value: t, onChange: e, options: s }) {
1381
- return /* @__PURE__ */ c(Ns, { className: "w-[140px]", value: t, onChange: e, options: s || bi });
1381
+ return /* @__PURE__ */ c(Ts, { className: "w-[140px]", value: t, onChange: e, options: s || bi });
1382
1382
  }
1383
1383
  const Ii = [
1384
1384
  { label: "All Types", value: "All" },
@@ -1387,10 +1387,10 @@ const Ii = [
1387
1387
  { label: "Aggressive Behavior", value: "Aggressive" }
1388
1388
  ];
1389
1389
  function xi({ value: t, onChange: e, options: s }) {
1390
- return /* @__PURE__ */ c(Ns, { className: "w-[220px]", dropdownWidth: 280, value: t, onChange: e, options: s || Ii });
1390
+ return /* @__PURE__ */ c(Ts, { className: "w-[220px]", dropdownWidth: 280, value: t, onChange: e, options: s || Ii });
1391
1391
  }
1392
1392
  function Oi({ value: t, onChange: e, options: s }) {
1393
- return /* @__PURE__ */ c(Ns, { className: "w-[100px]", value: t, onChange: e, options: s || [] });
1393
+ return /* @__PURE__ */ c(Ts, { className: "w-[100px]", value: t, onChange: e, options: s || [] });
1394
1394
  }
1395
1395
  const Ei = [
1396
1396
  { label: "All", value: "All" },
@@ -1401,7 +1401,7 @@ const Ei = [
1401
1401
  { label: "Skydio", value: "Skydio" }
1402
1402
  ];
1403
1403
  function Mi({ value: t, onChange: e, options: s }) {
1404
- return /* @__PURE__ */ c(Ns, { className: "w-[130px]", value: t, onChange: e, options: s || Ei });
1404
+ return /* @__PURE__ */ c(Ts, { className: "w-[130px]", value: t, onChange: e, options: s || Ei });
1405
1405
  }
1406
1406
  function Di({
1407
1407
  columns: t,
@@ -1627,7 +1627,7 @@ function Gi(t) {
1627
1627
  return typeof n != "string" || !n.length ? null : { url: n, item: s };
1628
1628
  }
1629
1629
  function wr({ record: t }) {
1630
- const e = Ne(() => Gi(t), [t]), [s, n] = v(!1), [r, a] = v(!1);
1630
+ const e = Te(() => Gi(t), [t]), [s, n] = v(!1), [r, a] = v(!1);
1631
1631
  if (ne(() => {
1632
1632
  a(!1);
1633
1633
  }, [e?.url]), !e)
@@ -1682,31 +1682,31 @@ function qi(t, e) {
1682
1682
  }, [t, e]), s;
1683
1683
  }
1684
1684
  function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage: r, columns: a, severityOptions: i, anomalyOptions: o, spaceOptions: l, renderActions: u, onAlertIdClick: d, onRefetch: m, onPageChange: S, onFilterChange: g, resetKey: I, serverSideFilters: E = !1 }) {
1685
- const [D, j] = v("All"), [H, P] = v("All"), [p, O] = v("All"), [Z, R] = v("All"), [G, f] = v(""), [A, C] = v(r ?? 1);
1685
+ const [M, j] = v("All"), [G, P] = v("All"), [p, O] = v("All"), [Z, R] = v("All"), [q, f] = v(""), [N, C] = v(r ?? 1);
1686
1686
  ne(() => {
1687
1687
  I !== void 0 && (j("All"), P("All"), O("All"), R("All"), f(""), C(1));
1688
1688
  }, [I]), ne(() => {
1689
1689
  r !== void 0 && C(r);
1690
1690
  }, [r]);
1691
- const [re, me] = v([{ label: "All", value: "All" }]), [M, b] = v([]), [w, x] = v([]), [N, F] = v([]), [U, q] = v(/* @__PURE__ */ new Set()), { rules: J, alerts: Q, config: X } = ze(), oe = X.tenant === "schools", ce = X.tenant === "transit", ae = qi(G, 600), fe = oe && ae.trim() ? 100 : s, we = {
1691
+ const [re, me] = v([{ label: "All", value: "All" }]), [D, b] = v([]), [w, x] = v([]), [A, F] = v([]), [U, Y] = v(/* @__PURE__ */ new Set()), { rules: J, alerts: Q, config: X } = ze(), oe = X.tenant === "schools", ce = X.tenant === "transit", ae = qi(q, 600), fe = oe && ae.trim() ? 100 : s, Ae = {
1692
1692
  6: { title: "Email", kind: "icon", icon: /* @__PURE__ */ c(La, {}) },
1693
1693
  7: { title: "SMS", kind: "icon", icon: /* @__PURE__ */ c(Ua, {}) }
1694
- }, ue = Ne(() => Ni(t, ce), [t, ce]);
1694
+ }, ue = Te(() => Ti(t, ce), [t, ce]);
1695
1695
  ne(() => {
1696
1696
  if (!Q.getAllSpaces) return;
1697
1697
  let he = !0;
1698
1698
  return (async () => {
1699
1699
  try {
1700
- const Y = await Q.getAllSpaces();
1700
+ const z = await Q.getAllSpaces();
1701
1701
  if (he) {
1702
- const Ae = Y.map((ye) => ({
1702
+ const Se = z.map((ye) => ({
1703
1703
  label: ce ? String(ye.spaceNumber ?? ye.spaceName ?? "") : ye.spaceName,
1704
1704
  value: String(ce ? ye.spaceNumber ?? ye.spaceId : ye.spaceId)
1705
1705
  }));
1706
- b([{ label: "All", value: "All" }, ...Ae]);
1706
+ b([{ label: "All", value: "All" }, ...Se]);
1707
1707
  }
1708
- } catch (Y) {
1709
- console.error("Error loading space options", Y);
1708
+ } catch (z) {
1709
+ console.error("Error loading space options", z);
1710
1710
  }
1711
1711
  })(), () => {
1712
1712
  he = !1;
@@ -1715,52 +1715,53 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1715
1715
  let he = !0;
1716
1716
  return (async () => {
1717
1717
  try {
1718
- const Y = await J.getLookups(), ye = (Array.isArray(Y.thirdParties) ? Y.thirdParties : []).map((ke) => ({
1718
+ const z = await J.getLookups(), ye = (Array.isArray(z.thirdParties) ? z.thirdParties : []).map((ke) => ({
1719
1719
  label: ke.thirdPartyName,
1720
1720
  value: String(ke.thirdPartyId)
1721
- })), Je = (Array.isArray(Y.anomalies) ? Y.anomalies : []).map((ke) => ({
1721
+ })), Je = (Array.isArray(z.anomalies) ? z.anomalies : []).map((ke) => ({
1722
1722
  label: ke.anomalyName,
1723
1723
  value: ke.anomalyId
1724
- })), Ie = (Array.isArray(Y.severities) ? Y.severities : []).map((ke) => ({
1724
+ })), Ie = (Array.isArray(z.severities) ? z.severities : []).map((ke) => ({
1725
1725
  label: ke.severityName,
1726
1726
  value: String(ke.severityId)
1727
1727
  }));
1728
1728
  he && (me([{ label: "All", value: "All" }, ...ye]), Je.length && x([{ label: "All Types", value: "All" }, ...Je]), Ie.length && F([{ label: "All levels", value: "All" }, ...Ie]));
1729
- } catch (Y) {
1730
- console.error("Error loading filter options", Y);
1729
+ } catch (z) {
1730
+ console.error("Error loading filter options", z);
1731
1731
  }
1732
1732
  })(), () => {
1733
1733
  he = !1;
1734
1734
  };
1735
1735
  }, [J]), ne(() => {
1736
1736
  if (!g) return;
1737
- const he = {
1738
- anomalyId: w.length > 1 && H !== "All" ? H : void 0,
1739
- spaceId: !ce && M.length > 1 && p !== "All" ? Number(p) : void 0,
1740
- spaceNumber: ce && M.length > 1 && p !== "All" ? p : void 0,
1741
- severityId: N.length > 1 && D !== "All" ? D : void 0,
1737
+ const he = A.find((Se) => Se.value === M), z = {
1738
+ anomalyId: w.length > 1 && G !== "All" ? G : void 0,
1739
+ spaceId: !ce && D.length > 1 && p !== "All" ? Number(p) : void 0,
1740
+ spaceNumber: ce && D.length > 1 && p !== "All" ? p : void 0,
1741
+ severityId: A.length > 1 && M !== "All" ? M : void 0,
1742
+ severityName: A.length > 1 && M !== "All" ? he?.label : void 0,
1742
1743
  thirdPartyIds: Z === "All" ? void 0 : [Number(Z)],
1743
1744
  searchText: ae.trim() || void 0
1744
1745
  };
1745
- g(he), S?.(1);
1746
- }, [H, p, D, Z, ae, w.length, M.length, N.length, ce, oe]);
1747
- const ie = E && w.length > 1 ? w : o, Ee = l?.length ? l : ue, We = E && M.length > 1 ? M : Ee, st = E && N.length > 1 ? N : i, it = [
1746
+ g(z), S?.(1);
1747
+ }, [G, p, M, Z, ae, w.length, D.length, A.length, ce, oe]);
1748
+ const ie = E && w.length > 1 ? w : o, Ee = l?.length ? l : ue, We = E && D.length > 1 ? D : Ee, st = E && A.length > 1 ? A : i, it = [
1748
1749
  {
1749
1750
  title: "Severity",
1750
1751
  dataIndex: "priority",
1751
1752
  key: "priority",
1752
1753
  width: 120,
1753
- render: (he) => /* @__PURE__ */ c(Ct, { className: "px-[10px] py-[2px]", style: { border: `2px solid ${Ti[he]}`, backgroundColor: Ai[he] }, children: he })
1754
+ render: (he) => /* @__PURE__ */ c(Ct, { className: "px-[10px] py-[2px]", style: { border: `2px solid ${Ni[he]}`, backgroundColor: Ai[he] }, children: he })
1754
1755
  },
1755
1756
  {
1756
1757
  title: "Tracker",
1757
1758
  key: "tracker",
1758
1759
  width: 140,
1759
- render: (he, Y) => /* @__PURE__ */ c(
1760
+ render: (he, z) => /* @__PURE__ */ c(
1760
1761
  "a",
1761
1762
  {
1762
- onClick: (Ae) => {
1763
- Ae.preventDefault(), d?.(Y, { tab: "track", sourceTab: "active" });
1763
+ onClick: (Se) => {
1764
+ Se.preventDefault(), d?.(z, { tab: "track", sourceTab: "active" });
1764
1765
  },
1765
1766
  className: "text-blue-600 hover:underline",
1766
1767
  children: "Tracker"
@@ -1771,32 +1772,32 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1771
1772
  title: "Call to action/Human in the loop",
1772
1773
  key: "actions",
1773
1774
  width: 320,
1774
- render: (he, Y) => {
1775
- if (u) return /* @__PURE__ */ c(cr, { children: u(Y) });
1776
- const Ae = async (pt, ts) => {
1777
- const Wt = Us(Y.id, pt);
1778
- q((Te) => new Set(Te).add(Wt));
1775
+ render: (he, z) => {
1776
+ if (u) return /* @__PURE__ */ c(cr, { children: u(z) });
1777
+ const Se = async (pt, ts) => {
1778
+ const Wt = Us(z.id, pt);
1779
+ Y((Ne) => new Set(Ne).add(Wt));
1779
1780
  try {
1780
- const Te = await Q.sendSMSorEmailNotifications?.(Y.id, pt, ts);
1781
- Te?.responseStatus || Te?.Success || Te?.success ? (be.success(Te?.message || Te.data || (pt ? "Email sent successfully" : "SMS sent successfully")), m?.()) : be.error(Te?.message || Te?.data || Te?.errorMessage || "Failed to send notification");
1782
- } catch (Te) {
1783
- be.error(Te?.message || "Failed to send notification");
1781
+ const Ne = await Q.sendSMSorEmailNotifications?.(z.id, pt, ts);
1782
+ Ne?.responseStatus || Ne?.Success || Ne?.success ? (be.success(Ne?.message || Ne.data || (pt ? "Email sent successfully" : "SMS sent successfully")), m?.()) : be.error(Ne?.message || Ne?.data || Ne?.errorMessage || "Failed to send notification");
1783
+ } catch (Ne) {
1784
+ be.error(Ne?.message || "Failed to send notification");
1784
1785
  } finally {
1785
- q((Te) => {
1786
- const bt = new Set(Te);
1786
+ Y((Ne) => {
1787
+ const bt = new Set(Ne);
1787
1788
  return bt.delete(Wt), bt;
1788
1789
  });
1789
1790
  }
1790
- }, ye = un, Ue = dn, Je = we[ye], nt = we[Ue], Ie = En(ye, Y, Je?.title), ke = En(Ue, Y, nt?.title), es = Us(Y.id, !0), Pt = Us(Y.id, !1), Tt = is(ye) && U.has(es), Nt = is(Ue) && U.has(Pt);
1791
+ }, ye = un, Ue = dn, Je = Ae[ye], nt = Ae[Ue], Ie = En(ye, z, Je?.title), ke = En(Ue, z, nt?.title), es = Us(z.id, !0), Pt = Us(z.id, !1), Nt = is(ye) && U.has(es), Tt = is(Ue) && U.has(Pt);
1791
1792
  return /* @__PURE__ */ h(at, { size: "middle", children: [
1792
1793
  /* @__PURE__ */ c(wn, { title: Ie.tooltipTitle, children: /* @__PURE__ */ c(
1793
1794
  Pe,
1794
1795
  {
1795
1796
  size: "small",
1796
1797
  disabled: Ie.isDisabled,
1797
- loading: Tt,
1798
- onClick: is(ye) ? () => Ae(!0, !1) : void 0,
1799
- icon: !Tt && Je?.icon,
1798
+ loading: Nt,
1799
+ onClick: is(ye) ? () => Se(!0, !1) : void 0,
1800
+ icon: !Nt && Je?.icon,
1800
1801
  className: "flex flex-col items-center justify-center gap-1",
1801
1802
  style: { height: "fit-content" },
1802
1803
  children: Ie.buttonText
@@ -1807,9 +1808,9 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1807
1808
  {
1808
1809
  size: "small",
1809
1810
  disabled: ke.isDisabled,
1810
- loading: Nt,
1811
- onClick: is(Ue) ? () => Ae(!1, !0) : void 0,
1812
- icon: !Nt && nt?.icon,
1811
+ loading: Tt,
1812
+ onClick: is(Ue) ? () => Se(!1, !0) : void 0,
1813
+ icon: !Tt && nt?.icon,
1813
1814
  className: "flex flex-col items-center justify-center gap-1",
1814
1815
  style: { height: "fit-content" },
1815
1816
  children: ke.buttonText
@@ -1823,14 +1824,14 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1823
1824
  dataIndex: "timestamp",
1824
1825
  key: "timestamp",
1825
1826
  width: 220,
1826
- render: (he, Y) => {
1827
- const Ae = Y?.timeElapsed, ye = Y?.timeRemaining, Ue = Ae ? Nn(Ae) : 0, Je = ye ? Nn(ye) : 0, nt = Math.round(Ue / (Ue + Je) * 100);
1827
+ render: (he, z) => {
1828
+ const Se = z?.timeElapsed, ye = z?.timeRemaining, Ue = Se ? Tn(Se) : 0, Je = ye ? Tn(ye) : 0, nt = Math.round(Ue / (Ue + Je) * 100);
1828
1829
  return /* @__PURE__ */ h("div", { children: [
1829
1830
  /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1830
1831
  /* @__PURE__ */ c("span", { className: "w-[70px]", children: "Elapsed:" }),
1831
- /* @__PURE__ */ c("span", { className: "font-medium", children: Ae ?? "-" })
1832
+ /* @__PURE__ */ c("span", { className: "font-medium", children: Se ?? "-" })
1832
1833
  ] }),
1833
- /* @__PURE__ */ c(Ea, { percent: nt, showInfo: !1, size: "small", strokeColor: _a(Y.priority) }),
1834
+ /* @__PURE__ */ c(Ea, { percent: nt, showInfo: !1, size: "small", strokeColor: _a(z.priority) }),
1834
1835
  /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1835
1836
  /* @__PURE__ */ c("span", { className: "w-[70px]", children: "Remaining" }),
1836
1837
  /* @__PURE__ */ c("span", { className: "font-medium", children: ye ?? "-" })
@@ -1848,15 +1849,15 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1848
1849
  title: "Description",
1849
1850
  dataIndex: "description",
1850
1851
  key: "description",
1851
- render: (he, Y) => /* @__PURE__ */ h("div", { children: [
1852
+ render: (he, z) => /* @__PURE__ */ h("div", { children: [
1852
1853
  /* @__PURE__ */ c(
1853
1854
  "a",
1854
1855
  {
1855
- onClick: (Ae) => {
1856
- Ae.preventDefault(), d?.(Y, { sourceTab: "active" });
1856
+ onClick: (Se) => {
1857
+ Se.preventDefault(), d?.(z, { sourceTab: "active" });
1857
1858
  },
1858
1859
  className: "inline-block mb-1 text-blue-600",
1859
- children: Y.alertNumber
1860
+ children: z.alertNumber
1860
1861
  }
1861
1862
  ),
1862
1863
  /* @__PURE__ */ c("div", { className: "text-black/65", children: he })
@@ -1867,7 +1868,7 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1867
1868
  key: "preview",
1868
1869
  width: 100,
1869
1870
  align: "center",
1870
- render: (he, Y) => /* @__PURE__ */ c(wr, { record: Y })
1871
+ render: (he, z) => /* @__PURE__ */ c(wr, { record: z })
1871
1872
  }
1872
1873
  ], _e = a && a.length ? a : it;
1873
1874
  return /* @__PURE__ */ c("div", { children: /* @__PURE__ */ c(
@@ -1879,16 +1880,16 @@ function Ar({ data: t, loading: e = !1, pageSize: s = 10, total: n, currentPage:
1879
1880
  loading: e,
1880
1881
  pageSize: fe,
1881
1882
  total: n,
1882
- currentPage: A,
1883
+ currentPage: N,
1883
1884
  onPageChange: S,
1884
1885
  toolbar: /* @__PURE__ */ h($e, { gutter: [12, 12], className: "mb-3", align: "middle", children: [
1885
1886
  /* @__PURE__ */ c(_, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1886
1887
  /* @__PURE__ */ c("span", { children: "Severity" }),
1887
- /* @__PURE__ */ c(ki, { value: D, onChange: j, options: st })
1888
+ /* @__PURE__ */ c(ki, { value: M, onChange: j, options: st })
1888
1889
  ] }) }),
1889
1890
  /* @__PURE__ */ c(_, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1890
1891
  /* @__PURE__ */ c("span", { children: "Anomaly type" }),
1891
- /* @__PURE__ */ c(xi, { value: H, onChange: P, options: ie })
1892
+ /* @__PURE__ */ c(xi, { value: G, onChange: P, options: ie })
1892
1893
  ] }) }),
1893
1894
  /* @__PURE__ */ c(_, { flex: "none", children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
1894
1895
  /* @__PURE__ */ c("span", { children: ce ? "Bus Number" : "Space" }),
@@ -1922,7 +1923,7 @@ const Yi = [
1922
1923
  "supervised exit",
1923
1924
  "elopement confirmed"
1924
1925
  ];
1925
- function Tr() {
1926
+ function Nr() {
1926
1927
  const { alerts: t } = ze(), e = Za();
1927
1928
  return Ba({
1928
1929
  mutationFn: (s) => t.updateAlertStatus(s),
@@ -1950,7 +1951,7 @@ class Ji extends At {
1950
1951
  }
1951
1952
  class Et extends At {
1952
1953
  }
1953
- class Nr extends At {
1954
+ class Tr extends At {
1954
1955
  constructor(e) {
1955
1956
  super(`Invalid unit ${e}`);
1956
1957
  }
@@ -2491,7 +2492,7 @@ class ho {
2491
2492
  return this.inf.format(s);
2492
2493
  } else {
2493
2494
  const s = this.floor ? Math.floor(e) : gn(e, 3);
2494
- return ve(s, this.padTo);
2495
+ return we(s, this.padTo);
2495
2496
  }
2496
2497
  }
2497
2498
  }
@@ -2837,7 +2838,7 @@ function yt(t, e) {
2837
2838
  return e;
2838
2839
  if (t instanceof Jt)
2839
2840
  return t;
2840
- if (No(t)) {
2841
+ if (To(t)) {
2841
2842
  const s = t.toLowerCase();
2842
2843
  return s === "default" ? e : s === "local" || s === "system" ? ks.instance : s === "utc" || s === "gmt" ? Re.utcInstance : Re.parseSpecifier(s) || dt.create(t);
2843
2844
  } else return gt(t) ? Re.instance(t) : typeof t == "object" && "offset" in t && typeof t.offset == "function" ? t : new po(t);
@@ -3126,7 +3127,7 @@ function Ao(t, e = 4, s = 1) {
3126
3127
  ), a = je(t.weekday, 1, 7);
3127
3128
  return n ? r ? a ? !1 : Ye("weekday", t.weekday) : Ye("week", t.weekNumber) : Ye("weekYear", t.weekYear);
3128
3129
  }
3129
- function To(t) {
3130
+ function No(t) {
3130
3131
  const e = Is(t.year), s = je(t.ordinal, 1, Mt(t.year));
3131
3132
  return e ? s ? !1 : Ye("ordinal", t.ordinal) : Ye("year", t.year);
3132
3133
  }
@@ -3147,7 +3148,7 @@ function gt(t) {
3147
3148
  function Is(t) {
3148
3149
  return typeof t == "number" && t % 1 === 0;
3149
3150
  }
3150
- function No(t) {
3151
+ function To(t) {
3151
3152
  return typeof t == "string";
3152
3153
  }
3153
3154
  function bo(t) {
@@ -3202,7 +3203,7 @@ function je(t, e, s) {
3202
3203
  function xo(t, e) {
3203
3204
  return t - e * Math.floor(t / e);
3204
3205
  }
3205
- function ve(t, e = 2) {
3206
+ function we(t, e = 2) {
3206
3207
  const s = t < 0;
3207
3208
  let n;
3208
3209
  return s ? n = "-" + ("" + -t).padStart(e, "0") : n = ("" + t).padStart(e, "0"), n;
@@ -3309,11 +3310,11 @@ function Yt(t, e) {
3309
3310
  const s = Math.trunc(Math.abs(t / 60)), n = Math.trunc(Math.abs(t % 60)), r = t >= 0 ? "+" : "-";
3310
3311
  switch (e) {
3311
3312
  case "short":
3312
- return `${r}${ve(s, 2)}:${ve(n, 2)}`;
3313
+ return `${r}${we(s, 2)}:${we(n, 2)}`;
3313
3314
  case "narrow":
3314
3315
  return `${r}${s}${n > 0 ? `:${n}` : ""}`;
3315
3316
  case "techie":
3316
- return `${r}${ve(s, 2)}${ve(n, 2)}`;
3317
+ return `${r}${we(s, 2)}${we(n, 2)}`;
3317
3318
  default:
3318
3319
  throw new RangeError(`Value format ${e} is out of range for property format`);
3319
3320
  }
@@ -3507,7 +3508,7 @@ class Oe {
3507
3508
  }
3508
3509
  num(e, s = 0, n = void 0) {
3509
3510
  if (this.opts.forceSimple)
3510
- return ve(e, s);
3511
+ return we(e, s);
3511
3512
  const r = { ...this.opts };
3512
3513
  return s > 0 && (r.padTo = s), n && (r.signDisplay = n), this.loc.numberFormatter(r).format(e);
3513
3514
  }
@@ -3888,7 +3889,7 @@ const vl = Ut(qo, Yo), wl = Ut(ma), Al = Lt(
3888
3889
  Qt,
3889
3890
  Xt
3890
3891
  );
3891
- function Tl(t) {
3892
+ function Nl(t) {
3892
3893
  return Ft(
3893
3894
  t,
3894
3895
  [vl, fa],
@@ -3912,7 +3913,7 @@ const jn = "Invalid Duration", ha = {
3912
3913
  hours: { minutes: 60, seconds: 3600, milliseconds: 3600 * 1e3 },
3913
3914
  minutes: { seconds: 60, milliseconds: 60 * 1e3 },
3914
3915
  seconds: { milliseconds: 1e3 }
3915
- }, Nl = {
3916
+ }, Tl = {
3916
3917
  years: {
3917
3918
  quarters: 4,
3918
3919
  months: 12,
@@ -4028,7 +4029,7 @@ class K {
4028
4029
  */
4029
4030
  constructor(e) {
4030
4031
  const s = e.conversionAccuracy === "longterm" || !1;
4031
- let n = s ? bl : Nl;
4032
+ let n = s ? bl : Tl;
4032
4033
  e.matrix && (n = e.matrix), this.values = e.values, this.loc = e.loc || se.create(), this.conversionAccuracy = s ? "longterm" : "casual", this.invalid = e.invalid || null, this.matrix = n, this.isLuxonDuration = !0;
4033
4034
  }
4034
4035
  /**
@@ -4172,7 +4173,7 @@ class K {
4172
4173
  millisecond: "milliseconds",
4173
4174
  milliseconds: "milliseconds"
4174
4175
  }[e && e.toLowerCase()];
4175
- if (!s) throw new Nr(e);
4176
+ if (!s) throw new Tr(e);
4176
4177
  return s;
4177
4178
  }
4178
4179
  /**
@@ -5315,10 +5316,10 @@ function Cl(t) {
5315
5316
  return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
5316
5317
  }
5317
5318
  function Rl(t, e) {
5318
- const s = Qe(e), n = Qe(e, "{2}"), r = Qe(e, "{3}"), a = Qe(e, "{4}"), i = Qe(e, "{6}"), o = Qe(e, "{1,2}"), l = Qe(e, "{1,3}"), u = Qe(e, "{1,6}"), d = Qe(e, "{1,9}"), m = Qe(e, "{2,4}"), S = Qe(e, "{4,6}"), g = (D) => ({ regex: RegExp(Cl(D.val)), deser: ([j]) => j, literal: !0 }), E = ((D) => {
5319
+ const s = Qe(e), n = Qe(e, "{2}"), r = Qe(e, "{3}"), a = Qe(e, "{4}"), i = Qe(e, "{6}"), o = Qe(e, "{1,2}"), l = Qe(e, "{1,3}"), u = Qe(e, "{1,6}"), d = Qe(e, "{1,9}"), m = Qe(e, "{2,4}"), S = Qe(e, "{4,6}"), g = (M) => ({ regex: RegExp(Cl(M.val)), deser: ([j]) => j, literal: !0 }), E = ((M) => {
5319
5320
  if (t.literal)
5320
- return g(D);
5321
- switch (D.val) {
5321
+ return g(M);
5322
+ switch (M.val) {
5322
5323
  // era
5323
5324
  case "G":
5324
5325
  return Xe(e.eras("short"), 0);
@@ -5433,7 +5434,7 @@ function Rl(t, e) {
5433
5434
  case " ":
5434
5435
  return cs(/[^\S\n\r]/);
5435
5436
  default:
5436
- return g(D);
5437
+ return g(M);
5437
5438
  }
5438
5439
  })(t) || {
5439
5440
  invalidReason: El
@@ -5643,7 +5644,7 @@ function vt(t, e) {
5643
5644
  };
5644
5645
  return new W({ ...s, ...e, old: s });
5645
5646
  }
5646
- function Ta(t, e, s) {
5647
+ function Na(t, e, s) {
5647
5648
  let n = t - e * 60 * 1e3;
5648
5649
  const r = s.offset(n);
5649
5650
  if (e === r)
@@ -5666,7 +5667,7 @@ function us(t, e) {
5666
5667
  };
5667
5668
  }
5668
5669
  function hs(t, e, s) {
5669
- return Ta(xs(t), e, s);
5670
+ return Na(xs(t), e, s);
5670
5671
  }
5671
5672
  function tr(t, e) {
5672
5673
  const s = t.o, n = t.c.year + Math.trunc(e.years), r = t.c.month + Math.trunc(e.months) + Math.trunc(e.quarters) * 3, a = {
@@ -5685,7 +5686,7 @@ function tr(t, e) {
5685
5686
  seconds: e.seconds,
5686
5687
  milliseconds: e.milliseconds
5687
5688
  }).as("milliseconds"), o = xs(a);
5688
- let [l, u] = Ta(o, s, t.zone);
5689
+ let [l, u] = Na(o, s, t.zone);
5689
5690
  return i !== 0 && (l += i, u = t.zone.offset(l)), { ts: l, o: u };
5690
5691
  }
5691
5692
  function xt(t, e, s, n, r, a) {
@@ -5711,12 +5712,12 @@ function ds(t, e, s = !0) {
5711
5712
  function zs(t, e, s) {
5712
5713
  const n = t.c.year > 9999 || t.c.year < 0;
5713
5714
  let r = "";
5714
- if (n && t.c.year >= 0 && (r += "+"), r += ve(t.c.year, n ? 6 : 4), s === "year") return r;
5715
+ if (n && t.c.year >= 0 && (r += "+"), r += we(t.c.year, n ? 6 : 4), s === "year") return r;
5715
5716
  if (e) {
5716
- if (r += "-", r += ve(t.c.month), s === "month") return r;
5717
+ if (r += "-", r += we(t.c.month), s === "month") return r;
5717
5718
  r += "-";
5718
- } else if (r += ve(t.c.month), s === "month") return r;
5719
- return r += ve(t.c.day), r;
5719
+ } else if (r += we(t.c.month), s === "month") return r;
5720
+ return r += we(t.c.day), r;
5720
5721
  }
5721
5722
  function sr(t, e, s, n, r, a, i) {
5722
5723
  let o = !s || t.c.millisecond !== 0 || t.c.second !== 0, l = "";
@@ -5726,20 +5727,20 @@ function sr(t, e, s, n, r, a, i) {
5726
5727
  case "year":
5727
5728
  break;
5728
5729
  default:
5729
- if (l += ve(t.c.hour), i === "hour") break;
5730
+ if (l += we(t.c.hour), i === "hour") break;
5730
5731
  if (e) {
5731
- if (l += ":", l += ve(t.c.minute), i === "minute") break;
5732
- o && (l += ":", l += ve(t.c.second));
5732
+ if (l += ":", l += we(t.c.minute), i === "minute") break;
5733
+ o && (l += ":", l += we(t.c.second));
5733
5734
  } else {
5734
- if (l += ve(t.c.minute), i === "minute") break;
5735
- o && (l += ve(t.c.second));
5735
+ if (l += we(t.c.minute), i === "minute") break;
5736
+ o && (l += we(t.c.second));
5736
5737
  }
5737
5738
  if (i === "second") break;
5738
- o && (!n || t.c.millisecond !== 0) && (l += ".", l += ve(t.c.millisecond, 3));
5739
+ o && (!n || t.c.millisecond !== 0) && (l += ".", l += we(t.c.millisecond, 3));
5739
5740
  }
5740
- return r && (t.isOffsetFixed && t.offset === 0 && !a ? l += "Z" : t.o < 0 ? (l += "-", l += ve(Math.trunc(-t.o / 60)), l += ":", l += ve(Math.trunc(-t.o % 60))) : (l += "+", l += ve(Math.trunc(t.o / 60)), l += ":", l += ve(Math.trunc(t.o % 60)))), a && (l += "[" + t.zone.ianaName + "]"), l;
5741
+ return r && (t.isOffsetFixed && t.offset === 0 && !a ? l += "Z" : t.o < 0 ? (l += "-", l += we(Math.trunc(-t.o / 60)), l += ":", l += we(Math.trunc(-t.o % 60))) : (l += "+", l += we(Math.trunc(t.o / 60)), l += ":", l += we(Math.trunc(t.o % 60)))), a && (l += "[" + t.zone.ianaName + "]"), l;
5741
5742
  }
5742
- const Na = {
5743
+ const Ta = {
5743
5744
  month: 1,
5744
5745
  day: 1,
5745
5746
  hour: 0,
@@ -5795,7 +5796,7 @@ function gs(t) {
5795
5796
  weekyears: "weekYear",
5796
5797
  ordinal: "ordinal"
5797
5798
  }[t.toLowerCase()];
5798
- if (!e) throw new Nr(t);
5799
+ if (!e) throw new Tr(t);
5799
5800
  return e;
5800
5801
  }
5801
5802
  function nr(t) {
@@ -5830,7 +5831,7 @@ function rr(t, e) {
5830
5831
  r = pe.now();
5831
5832
  else {
5832
5833
  for (const l of ys)
5833
- V(t[l]) && (t[l] = Na[l]);
5834
+ V(t[l]) && (t[l] = Ta[l]);
5834
5835
  const i = _r(t) || Jr(t);
5835
5836
  if (i)
5836
5837
  return W.invalid(i);
@@ -6045,20 +6046,20 @@ class W {
6045
6046
  if (S && d)
6046
6047
  throw new Et("Can't mix ordinal dates with month/day");
6047
6048
  const E = I || a.weekday && !g;
6048
- let D, j, H = us(l, u);
6049
- E ? (D = Hl, j = Bl, H = Ss(H, i, o)) : d ? (D = Gl, j = zl, H = Ps(H)) : (D = ys, j = Na);
6049
+ let M, j, G = us(l, u);
6050
+ E ? (M = Hl, j = Bl, G = Ss(G, i, o)) : d ? (M = Gl, j = zl, G = Ps(G)) : (M = ys, j = Ta);
6050
6051
  let P = !1;
6051
- for (const A of D) {
6052
- const C = a[A];
6053
- V(C) ? P ? a[A] = j[A] : a[A] = H[A] : P = !0;
6052
+ for (const N of M) {
6053
+ const C = a[N];
6054
+ V(C) ? P ? a[N] = j[N] : a[N] = G[N] : P = !0;
6054
6055
  }
6055
- const p = E ? Ao(a, i, o) : d ? To(a) : _r(a), O = p || Jr(a);
6056
+ const p = E ? Ao(a, i, o) : d ? No(a) : _r(a), O = p || Jr(a);
6056
6057
  if (O)
6057
6058
  return W.invalid(O);
6058
- const Z = E ? Zn(a, i, o) : d ? Bn(a) : a, [R, G] = hs(Z, u, n), f = new W({
6059
+ const Z = E ? Zn(a, i, o) : d ? Bn(a) : a, [R, q] = hs(Z, u, n), f = new W({
6059
6060
  ts: R,
6060
6061
  zone: n,
6061
- o: G,
6062
+ o: q,
6062
6063
  loc: r
6063
6064
  });
6064
6065
  return a.weekday && g && e.weekday !== f.weekday ? W.invalid(
@@ -6178,7 +6179,7 @@ class W {
6178
6179
  * @return {DateTime}
6179
6180
  */
6180
6181
  static fromSQL(e, s = {}) {
6181
- const [n, r] = Tl(e);
6182
+ const [n, r] = Nl(e);
6182
6183
  return xt(n, r, s, "SQL", e);
6183
6184
  }
6184
6185
  /**
@@ -7504,7 +7505,7 @@ function Ql({
7504
7505
  resetKey: g,
7505
7506
  serverSideFilters: I
7506
7507
  }) {
7507
- const E = Tr(), D = async (P) => {
7508
+ const E = Nr(), M = async (P) => {
7508
7509
  try {
7509
7510
  const p = await E.mutateAsync({
7510
7511
  alertUniqueId: P.alertId ?? P.id,
@@ -7593,21 +7594,21 @@ function Ql({
7593
7594
  { key: "reopen", label: "Reopen" }
7594
7595
  ],
7595
7596
  onClick: ({ key: O }) => {
7596
- O === "reopen" && D(p);
7597
+ O === "reopen" && M(p);
7597
7598
  }
7598
7599
  },
7599
7600
  children: /* @__PURE__ */ c(Pe, { type: "text", icon: /* @__PURE__ */ c(Fa, {}) })
7600
7601
  }
7601
7602
  )
7602
7603
  }
7603
- ], H = d && I ? t : (t || []).filter((P) => {
7604
+ ], G = d && I ? t : (t || []).filter((P) => {
7604
7605
  const p = bn(P.statusType || "");
7605
7606
  return Yi.some((O) => p.includes(bn(O)));
7606
7607
  });
7607
7608
  return /* @__PURE__ */ c(
7608
7609
  Ar,
7609
7610
  {
7610
- data: H,
7611
+ data: G,
7611
7612
  loading: e,
7612
7613
  pageSize: s,
7613
7614
  total: n,
@@ -7633,7 +7634,7 @@ function Xl({
7633
7634
  time: e,
7634
7635
  timeZone: s = "America/New_York"
7635
7636
  }) {
7636
- const { hours: n, minutes: r, seconds: a } = Ne(() => {
7637
+ const { hours: n, minutes: r, seconds: a } = Te(() => {
7637
7638
  const m = new Intl.DateTimeFormat("en-US", {
7638
7639
  timeZone: s,
7639
7640
  hour: "numeric",
@@ -7656,7 +7657,7 @@ function Xl({
7656
7657
  "aria-label": "Analog Clock",
7657
7658
  children: [
7658
7659
  [...Array(12)].map((d, m) => {
7659
- const S = m * 30, g = 6, I = u - 4, E = I - g, D = (S - 90) * (Math.PI / 180), j = u + E * Math.cos(D), H = u + E * Math.sin(D), P = u + I * Math.cos(D), p = u + I * Math.sin(D);
7660
+ const S = m * 30, g = 6, I = u - 4, E = I - g, M = (S - 90) * (Math.PI / 180), j = u + E * Math.cos(M), G = u + E * Math.sin(M), P = u + I * Math.cos(M), p = u + I * Math.sin(M);
7660
7661
  return /* @__PURE__ */ c(
7661
7662
  "svg",
7662
7663
  {
@@ -7667,7 +7668,7 @@ function Xl({
7667
7668
  "line",
7668
7669
  {
7669
7670
  x1: j,
7670
- y1: H,
7671
+ y1: G,
7671
7672
  x2: P,
7672
7673
  y2: p,
7673
7674
  stroke: "#9CA3AF",
@@ -7764,7 +7765,7 @@ function ec({ label: t = "USA", timeZone: e = "America/New_York", updateInterval
7764
7765
  const u = setInterval(() => a(/* @__PURE__ */ new Date()), s);
7765
7766
  return () => clearInterval(u);
7766
7767
  }, [s]);
7767
- const i = Ne(() => Yl(r, e), [r, e]), { abbr: o, offset: l } = Ne(() => jl(r, e), [r, e]);
7768
+ const i = Te(() => Yl(r, e), [r, e]), { abbr: o, offset: l } = Te(() => jl(r, e), [r, e]);
7768
7769
  return /* @__PURE__ */ h("div", { className: `flex items-center gap-3 ${n || ""}`, children: [
7769
7770
  /* @__PURE__ */ c(Xl, { time: r, timeZone: e, size: 80 }),
7770
7771
  /* @__PURE__ */ h("div", { className: "flex flex-col items-baseline gap-1", children: [
@@ -7831,30 +7832,30 @@ function nc(t) {
7831
7832
  setL2role: g,
7832
7833
  l3mins: I,
7833
7834
  setL3mins: E,
7834
- l3role: D,
7835
+ l3role: M,
7835
7836
  setL3role: j,
7836
- actions: H,
7837
+ actions: G,
7837
7838
  setActions: P,
7838
7839
  thirdPartyIds: p,
7839
7840
  setThirdPartyIds: O,
7840
7841
  humanLoop: Z,
7841
7842
  setHumanLoop: R,
7842
- isAutoExpire: G,
7843
+ isAutoExpire: q,
7843
7844
  setAutoExpire: f,
7844
- onClear: A,
7845
+ onClear: N,
7845
7846
  onSave: C,
7846
7847
  saving: re,
7847
7848
  onActionTypesLoaded: me
7848
- } = t, { rules: M, config: b } = ze(), w = b.tenant === "schools", [x, N] = v([]), [F, U] = v([]), [q, J] = v(!1);
7849
+ } = t, { rules: D, config: b } = ze(), w = b.tenant === "schools", [x, A] = v([]), [F, U] = v([]), [Y, J] = v(!1);
7849
7850
  ne(() => {
7850
7851
  let ae = !1;
7851
7852
  return (async () => {
7852
7853
  try {
7853
7854
  J(!0);
7854
- const fe = await M.getLookups();
7855
+ const fe = await D.getLookups();
7855
7856
  if (ae || !fe || !Array.isArray(fe.actionTypes)) return;
7856
- const we = fe.actionTypes.map((ie) => ({ label: ie.name, value: String(ie.actionTypeId) }));
7857
- N(we), me && me(fe.actionTypes);
7857
+ const Ae = fe.actionTypes.map((ie) => ({ label: ie.name, value: String(ie.actionTypeId) }));
7858
+ A(Ae), me && me(fe.actionTypes);
7858
7859
  const ue = Array.isArray(fe.thirdParties) ? fe.thirdParties.map((ie) => ({ label: ie.thirdPartyName, value: ie.thirdPartyIds ?? ie.thirdPartyId })) : [];
7859
7860
  U(ue);
7860
7861
  } catch (fe) {
@@ -7866,8 +7867,8 @@ function nc(t) {
7866
7867
  ae = !0;
7867
7868
  };
7868
7869
  }, []);
7869
- const Q = typeof i == "number" || typeof l == "number", X = typeof d == "number" || typeof S == "number", oe = typeof i == "number" || typeof l == "number" || typeof d == "number" || typeof S == "number" || typeof I == "number" || typeof D == "number" || Array.isArray(H) && H.length > 0 || Array.isArray(p) && p.length > 0 || !!Z || !!G;
7870
- return /* @__PURE__ */ h(Ts, { spinning: !!re || q, children: [
7870
+ const Q = typeof i == "number" || typeof l == "number", X = typeof d == "number" || typeof S == "number", oe = typeof i == "number" || typeof l == "number" || typeof d == "number" || typeof S == "number" || typeof I == "number" || typeof M == "number" || Array.isArray(G) && G.length > 0 || Array.isArray(p) && p.length > 0 || !!Z || !!q;
7871
+ return /* @__PURE__ */ h(Ns, { spinning: !!re || Y, children: [
7871
7872
  /* @__PURE__ */ h($e, { gutter: [16, 16], align: "bottom", children: [
7872
7873
  /* @__PURE__ */ c(_, { xs: 24, sm: 12, md: 8, lg: 4, children: /* @__PURE__ */ h("div", { children: [
7873
7874
  /* @__PURE__ */ c(ut, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
@@ -7959,7 +7960,7 @@ function nc(t) {
7959
7960
  {
7960
7961
  placeholder: "Escalate to",
7961
7962
  className: "w-full",
7962
- value: D,
7963
+ value: M,
7963
7964
  onChange: j,
7964
7965
  options: a
7965
7966
  }
@@ -7974,7 +7975,7 @@ function nc(t) {
7974
7975
  mode: "multiple",
7975
7976
  placeholder: "Select response actions",
7976
7977
  className: "w-full",
7977
- value: H,
7978
+ value: G,
7978
7979
  onChange: P,
7979
7980
  options: x,
7980
7981
  maxTagCount: 1,
@@ -8002,10 +8003,10 @@ function nc(t) {
8002
8003
  /* @__PURE__ */ h($e, { gutter: [16, 16], align: "bottom", className: "mt-4 items-center", children: [
8003
8004
  /* @__PURE__ */ c(_, { xs: 24, sm: 12, md: 8, lg: 7, children: /* @__PURE__ */ h("div", { className: "flex items-center h-full gap-8", children: [
8004
8005
  !w && /* @__PURE__ */ c(Ot, { checked: Z, onChange: (ae) => R(ae.target.checked), className: "w-full", children: "Human-In-The-Loop" }),
8005
- /* @__PURE__ */ c(Ot, { checked: G, onChange: (ae) => f(ae.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
8006
+ /* @__PURE__ */ c(Ot, { checked: q, onChange: (ae) => f(ae.target.checked), className: "w-full", children: "Auto-expire in 5 minutes" })
8006
8007
  ] }) }),
8007
8008
  /* @__PURE__ */ c(_, { xs: 24, sm: 12, md: 8, children: /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
8008
- /* @__PURE__ */ c(Pe, { onClick: A, children: "Clear" }),
8009
+ /* @__PURE__ */ c(Pe, { onClick: N, children: "Clear" }),
8009
8010
  /* @__PURE__ */ c(Pe, { type: "primary", onClick: C, loading: !!re, disabled: !(!!e && oe && !re), children: "Save" })
8010
8011
  ] }) })
8011
8012
  ] })
@@ -8081,7 +8082,7 @@ function rc({ entries: t, userRoles: e, onEdit: s, loading: n }) {
8081
8082
  }
8082
8083
  const { Title: ac, Text: Hs } = _t;
8083
8084
  function ic({ userRoles: t, rules: e, rawRules: s }) {
8084
- const { rules: n } = ze(), [r, a] = v(!1), [i, o] = v(!1), [l, u] = v(s), [d, m] = v(), [S, g] = v([]), I = Ne(() => t.map((p) => ({ label: p.userRoleName, value: p.userRoleId })), [t]), E = Ne(() => (e || []).map((p) => ({ label: p.Name || "-", value: p.RuleId || p.Name || "" })), [e]), D = Ne(
8085
+ const { rules: n } = ze(), [r, a] = v(!1), [i, o] = v(!1), [l, u] = v(s), [d, m] = v(), [S, g] = v([]), I = Te(() => t.map((p) => ({ label: p.userRoleName, value: p.userRoleId })), [t]), E = Te(() => (e || []).map((p) => ({ label: p.Name || "-", value: p.RuleId || p.Name || "" })), [e]), M = Te(
8085
8086
  () => (e || []).map((p, O) => ({
8086
8087
  key: p.RuleId || p.Name || String(O),
8087
8088
  ruleName: p.Name || "-",
@@ -8116,20 +8117,20 @@ function ic({ userRoles: t, rules: e, rawRules: s }) {
8116
8117
  ), O = p?.userRoleIds ?? p?.UserRoleIds;
8117
8118
  g(Array.isArray(O) ? O : []);
8118
8119
  }, [d, l]);
8119
- const j = Ne(() => {
8120
+ const j = Te(() => {
8120
8121
  if (!Array.isArray(l) || !l.length) return {};
8121
8122
  const p = {};
8122
- for (const O of D) {
8123
+ for (const O of M) {
8123
8124
  const Z = l.find(
8124
8125
  (f) => f?.ruleId === O.key || f?.ruleName === O.key || f?.RuleId === O.key || f?.ruleName === O.ruleName || f?.Name === O.ruleName
8125
- ), R = Z?.userRoleIds ?? Z?.UserRoleIds, G = Array.isArray(R) ? R : [];
8126
- G.length && (p[O.key] = G);
8126
+ ), R = Z?.userRoleIds ?? Z?.UserRoleIds, q = Array.isArray(R) ? R : [];
8127
+ q.length && (p[O.key] = q);
8127
8128
  }
8128
8129
  return p;
8129
- }, [l, D]);
8130
+ }, [l, M]);
8130
8131
  return /* @__PURE__ */ h("div", { className: "w-full", children: [
8131
8132
  /* @__PURE__ */ c(ac, { level: 4, className: "!mb-4", children: "Alert Assignment" }),
8132
- /* @__PURE__ */ c(Ts, { spinning: i || r, children: /* @__PURE__ */ h($e, { gutter: [16, 16], align: "bottom", className: "mb-6", children: [
8133
+ /* @__PURE__ */ c(Ns, { spinning: i || r, children: /* @__PURE__ */ h($e, { gutter: [16, 16], align: "bottom", className: "mb-6", children: [
8133
8134
  /* @__PURE__ */ c(_, { xs: 24, sm: 12, md: 8, lg: 6, children: /* @__PURE__ */ h("div", { children: [
8134
8135
  /* @__PURE__ */ c(Hs, { className: "text-gray-700 font-medium block mb-1", children: "Rules" }),
8135
8136
  /* @__PURE__ */ c(
@@ -8180,16 +8181,16 @@ function ic({ userRoles: t, rules: e, rawRules: s }) {
8180
8181
  if (!p || !O)
8181
8182
  throw new Error(`Unable to find rule identifier for rule ${d}`);
8182
8183
  const Z = S.map((f) => {
8183
- const A = t.find((C) => C.userRoleId === f);
8184
- return { id: f, name: A?.userRoleName ?? String(f) };
8184
+ const N = t.find((C) => C.userRoleId === f);
8185
+ return { id: f, name: N?.userRoleName ?? String(f) };
8185
8186
  }), R = {
8186
8187
  ...p,
8187
8188
  ruleId: d,
8188
8189
  userRoleIds: S,
8189
8190
  userRoles: Z
8190
- }, G = await n.updateRule(O, R);
8191
- if (!G?.responseStatus && !G?.Success && !G?.success)
8192
- be.error(G?.errorMessage || G?.Message || "Error saving Alert Assignment");
8191
+ }, q = await n.updateRule(O, R);
8192
+ if (!q?.responseStatus && !q?.Success && !q?.success)
8193
+ be.error(q?.errorMessage || q?.Message || "Error saving Alert Assignment");
8193
8194
  else {
8194
8195
  be.success("Alert assignment saved"), m(void 0), g([]);
8195
8196
  try {
@@ -8216,7 +8217,7 @@ function ic({ userRoles: t, rules: e, rawRules: s }) {
8216
8217
  on,
8217
8218
  {
8218
8219
  rowKey: "key",
8219
- dataSource: D,
8220
+ dataSource: M,
8220
8221
  loading: r,
8221
8222
  pagination: {
8222
8223
  pageSize: 10,
@@ -8232,8 +8233,8 @@ function ic({ userRoles: t, rules: e, rawRules: s }) {
8232
8233
  render: (p, O) => {
8233
8234
  const Z = j[O.key] ?? [];
8234
8235
  return Z.length ? /* @__PURE__ */ c("div", { className: "flex flex-wrap gap-1", children: Z.map((R) => {
8235
- const G = t.find((f) => f.userRoleId === R);
8236
- return /* @__PURE__ */ c(Ct, { children: G?.userRoleName ?? String(R) }, R);
8236
+ const q = t.find((f) => f.userRoleId === R);
8237
+ return /* @__PURE__ */ c(Ct, { children: q?.userRoleName ?? String(R) }, R);
8237
8238
  }) }) : /* @__PURE__ */ c(Hs, { type: "secondary", children: "—" });
8238
8239
  }
8239
8240
  }
@@ -8258,20 +8259,20 @@ function Gs(t) {
8258
8259
  };
8259
8260
  }
8260
8261
  function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules: r, onSave: a }) {
8261
- const { rules: i, alerts: o } = ze(), [l, u] = v("By Severity"), [d, m] = v("By severity"), [S, g] = v("By Severity"), [I, E] = v(!1), [D, j] = v(!1), [H, P] = v(!1), [p, O] = v(null), [Z, R] = v("rules"), [G, f] = v(), [A, C] = v(), [re, me] = v(), [M, b] = v(), [w, x] = v(), [N, F] = v(), [U, q] = v(), [J, Q] = v(), [X, oe] = v([]), [ce, ae] = v([]), [fe, we] = v(!1), [ue, ie] = v(!1), [Ee, We] = v({}), [st, it] = v({}), [_e, he] = v(s || []), [Y, Ae] = v([]), [ye, Ue] = v(!1), [Je, nt] = v(!1), [Ie, ke] = v(n || []);
8262
+ const { rules: i, alerts: o } = ze(), [l, u] = v("By Severity"), [d, m] = v("By severity"), [S, g] = v("By Severity"), [I, E] = v(!1), [M, j] = v(!1), [G, P] = v(!1), [p, O] = v(null), [Z, R] = v("rules"), [q, f] = v(), [N, C] = v(), [re, me] = v(), [D, b] = v(), [w, x] = v(), [A, F] = v(), [U, Y] = v(), [J, Q] = v(), [X, oe] = v([]), [ce, ae] = v([]), [fe, Ae] = v(!1), [ue, ie] = v(!1), [Ee, We] = v({}), [st, it] = v({}), [_e, he] = v(s || []), [z, Se] = v([]), [ye, Ue] = v(!1), [Je, nt] = v(!1), [Ie, ke] = v(n || []);
8262
8263
  ne(() => {
8263
8264
  n && n.length && ke(n);
8264
8265
  }, [n]), ne(() => {
8265
8266
  if (!Ie || !Ie.length) return;
8266
8267
  const $ = Object.keys(Ee).length > 0 || Object.keys(st).length > 0;
8267
- if (Y.length && !$) return;
8268
- const te = Ie.map((z, B) => {
8269
- const y = e.find((De) => De.RuleId === (z.ruleId || z.ruleName))?.Name || z.ruleName || z.Name || "-", T = Gs(z.escalationSettings), L = typeof T.level1UserRoleId == "number" && T.level1UserRoleId > 0 ? [T.level1UserRoleId] : [], Se = typeof T.level2UserRoleId == "number" && T.level2UserRoleId > 0 ? [T.level2UserRoleId] : [], Me = typeof T.level3UserRoleId == "number" && T.level3UserRoleId > 0 ? [T.level3UserRoleId] : [], Ke = (Array.isArray(T.escalationSettingsActionTypeIds) ? T.escalationSettingsActionTypeIds : []).map((De) => Ee[De] || String(De)), rt = (Array.isArray(T.thirdPartyId) ? T.thirdPartyId : []).map((De) => st[De] || String(De)), Ds = typeof T.humanLoop == "boolean" ? T.humanLoop : null, Cs = typeof T.isAutoExpire == "boolean" ? T.isAutoExpire : null;
8268
+ if (z.length && !$) return;
8269
+ const te = Ie.map((H, B) => {
8270
+ const y = e.find((De) => De.RuleId === (H.ruleId || H.ruleName))?.Name || H.ruleName || H.Name || "-", T = Gs(H.escalationSettings), L = typeof T.level1UserRoleId == "number" && T.level1UserRoleId > 0 ? [T.level1UserRoleId] : [], ve = typeof T.level2UserRoleId == "number" && T.level2UserRoleId > 0 ? [T.level2UserRoleId] : [], Me = typeof T.level3UserRoleId == "number" && T.level3UserRoleId > 0 ? [T.level3UserRoleId] : [], Ke = (Array.isArray(T.escalationSettingsActionTypeIds) ? T.escalationSettingsActionTypeIds : []).map((De) => Ee[De] || String(De)), rt = (Array.isArray(T.thirdPartyId) ? T.thirdPartyId : []).map((De) => st[De] || String(De)), Ds = typeof T.humanLoop == "boolean" ? T.humanLoop : null, Cs = typeof T.isAutoExpire == "boolean" ? T.isAutoExpire : null;
8270
8271
  return {
8271
- id: String(z.ruleId || z.ruleName || B),
8272
+ id: String(H.ruleId || H.ruleName || B),
8272
8273
  ruleOrSeverityLabel: y,
8273
8274
  l1: { minutes: T.level1PostAssistTime ?? void 0, roles: L },
8274
- l2: { minutes: T.level2PostAssistTime ?? void 0, roles: Se },
8275
+ l2: { minutes: T.level2PostAssistTime ?? void 0, roles: ve },
8275
8276
  l3: { minutes: T.level3PostAssistTime ?? void 0, roles: Me },
8276
8277
  actions: Ke,
8277
8278
  notify: rt,
@@ -8279,31 +8280,31 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8279
8280
  isAutoExpire: Cs
8280
8281
  };
8281
8282
  });
8282
- Ae(te);
8283
+ Se(te);
8283
8284
  }, [Ie, e, Ee, st]);
8284
- const es = Ne(
8285
+ const es = Te(
8285
8286
  () => t.map(($) => ({ label: $.DisplayName, value: $.SeverityId })),
8286
8287
  [t]
8287
- ), Pt = Ne(
8288
+ ), Pt = Te(
8288
8289
  () => e.map(($) => ({ label: $.Name, value: $.RuleId })),
8289
8290
  [e]
8290
- ), Tt = Ne(
8291
+ ), Nt = Te(
8291
8292
  () => _e.map(($) => ({ label: $.userRoleName, value: $.userRoleId })),
8292
8293
  [_e]
8293
- ), Nt = Ne(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map(($) => ({ label: `${$}`, value: $ })), []);
8294
+ ), Tt = Te(() => [1, 3, 5, 10, 15, 20, 30, 45, 60].map(($) => ({ label: `${$}`, value: $ })), []);
8294
8295
  ne(() => {
8295
8296
  let $ = !1;
8296
8297
  async function te() {
8297
8298
  try {
8298
8299
  P(!0), O(null);
8299
- const z = await o.getAdminSettings();
8300
- if (!$ && z) {
8301
- const B = mr(z.sortBy);
8300
+ const H = await o.getAdminSettings();
8301
+ if (!$ && H) {
8302
+ const B = mr(H.sortBy);
8302
8303
  u(B), g(B), E(!1);
8303
8304
  }
8304
- } catch (z) {
8305
+ } catch (H) {
8305
8306
  if (!$) {
8306
- const B = z instanceof Error ? z.message : "Failed to load admin settings";
8307
+ const B = H instanceof Error ? H.message : "Failed to load admin settings";
8307
8308
  O(B);
8308
8309
  }
8309
8310
  } finally {
@@ -8314,33 +8315,33 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8314
8315
  $ = !0;
8315
8316
  };
8316
8317
  }, []), ne(() => {
8317
- if (!A) return;
8318
+ if (!N) return;
8318
8319
  const $ = (y) => {
8319
8320
  const T = Number(y);
8320
8321
  return !isNaN(T) && T > 0 ? T : void 0;
8321
8322
  }, te = (y) => {
8322
8323
  const T = Number(y);
8323
8324
  return !isNaN(T) && T > 0 ? T : void 0;
8324
- }, z = (Ie || []).find(
8325
- (y) => y?.ruleId === A || y?.ruleName === A || y?.RuleId === A
8326
- ), B = Gs(z?.escalationSettings);
8325
+ }, H = (Ie || []).find(
8326
+ (y) => y?.ruleId === N || y?.ruleName === N || y?.RuleId === N
8327
+ ), B = Gs(H?.escalationSettings);
8327
8328
  if (B && typeof B == "object") {
8328
- me(te(B.level1PostAssistTime)), b($(B.level1UserRoleId)), x(te(B.level2PostAssistTime)), F($(B.level2UserRoleId)), q(te(B.level3PostAssistTime)), Q($(B.level3UserRoleId));
8329
+ me(te(B.level1PostAssistTime)), b($(B.level1UserRoleId)), x(te(B.level2PostAssistTime)), F($(B.level2UserRoleId)), Y(te(B.level3PostAssistTime)), Q($(B.level3UserRoleId));
8329
8330
  const y = Array.isArray(B.escalationSettingsActionTypeIds) ? B.escalationSettingsActionTypeIds : [];
8330
- oe(y.map((T) => String(T))), ae(Array.isArray(B.thirdPartyId) ? B.thirdPartyId : []), we(!!B.humanLoop), ie(!!B.isAutoExpire);
8331
+ oe(y.map((T) => String(T))), ae(Array.isArray(B.thirdPartyId) ? B.thirdPartyId : []), Ae(!!B.humanLoop), ie(!!B.isAutoExpire);
8331
8332
  }
8332
- }, [Z, A, Ie]);
8333
+ }, [Z, N, Ie]);
8333
8334
  const pt = async () => {
8334
8335
  try {
8335
8336
  nt(!0);
8336
8337
  const $ = await i.getRules(), te = Array.isArray($) ? $ : Array.isArray($?.data) ? $.data : [];
8337
8338
  ke(te);
8338
- const z = te.map((B, y) => {
8339
- const T = e.find((De) => De.RuleId === (B.ruleId || B.ruleName))?.Name || B.ruleName || B.Name || "-", L = Gs(B.escalationSettings ?? B.EscalationSettings), Se = typeof L.level1UserRoleId == "number" && L.level1UserRoleId > 0 ? [L.level1UserRoleId] : [], Me = typeof L.level2UserRoleId == "number" && L.level2UserRoleId > 0 ? [L.level2UserRoleId] : [], de = typeof L.level3UserRoleId == "number" && L.level3UserRoleId > 0 ? [L.level3UserRoleId] : [], ot = (Array.isArray(L.escalationSettingsActionTypeIds) ? L.escalationSettingsActionTypeIds : []).map((De) => Ee[De] || String(De)), Ds = (Array.isArray(L.thirdPartyId) ? L.thirdPartyId : []).map((De) => st[De] || String(De)), Cs = typeof L.humanLoop == "boolean" ? L.humanLoop : null;
8339
+ const H = te.map((B, y) => {
8340
+ const T = e.find((De) => De.RuleId === (B.ruleId || B.ruleName))?.Name || B.ruleName || B.Name || "-", L = Gs(B.escalationSettings ?? B.EscalationSettings), ve = typeof L.level1UserRoleId == "number" && L.level1UserRoleId > 0 ? [L.level1UserRoleId] : [], Me = typeof L.level2UserRoleId == "number" && L.level2UserRoleId > 0 ? [L.level2UserRoleId] : [], de = typeof L.level3UserRoleId == "number" && L.level3UserRoleId > 0 ? [L.level3UserRoleId] : [], ot = (Array.isArray(L.escalationSettingsActionTypeIds) ? L.escalationSettingsActionTypeIds : []).map((De) => Ee[De] || String(De)), Ds = (Array.isArray(L.thirdPartyId) ? L.thirdPartyId : []).map((De) => st[De] || String(De)), Cs = typeof L.humanLoop == "boolean" ? L.humanLoop : null;
8340
8341
  return {
8341
8342
  id: String(B.ruleId || B.ruleName || y),
8342
8343
  ruleOrSeverityLabel: T,
8343
- l1: { minutes: L.level1PostAssistTime ?? void 0, roles: Se },
8344
+ l1: { minutes: L.level1PostAssistTime ?? void 0, roles: ve },
8344
8345
  l2: { minutes: L.level2PostAssistTime ?? void 0, roles: Me },
8345
8346
  l3: { minutes: L.level3PostAssistTime ?? void 0, roles: de },
8346
8347
  actions: ot,
@@ -8348,7 +8349,7 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8348
8349
  humanLoop: Cs
8349
8350
  };
8350
8351
  });
8351
- Ae(z);
8352
+ Se(H);
8352
8353
  } catch ($) {
8353
8354
  console.error("Failed to refetch entries", $);
8354
8355
  } finally {
@@ -8361,13 +8362,13 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8361
8362
  try {
8362
8363
  const te = await i.getLookups();
8363
8364
  if ($ || !te) return;
8364
- const z = {};
8365
+ const H = {};
8365
8366
  if (Array.isArray(te.thirdParties))
8366
8367
  for (const y of te.thirdParties) {
8367
8368
  const T = y.thirdPartyIds ?? y.thirdPartyId;
8368
- typeof T == "number" && (z[T] = y.thirdPartyName);
8369
+ typeof T == "number" && (H[T] = y.thirdPartyName);
8369
8370
  }
8370
- it(z);
8371
+ it(H);
8371
8372
  const B = Array.isArray(te.userRoles) ? te.userRoles.map((y) => ({
8372
8373
  userRoleId: y.userRoleId ?? y.id,
8373
8374
  userRoleName: y.userRoleName ?? y.name
@@ -8382,7 +8383,7 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8382
8383
  }, []), /* @__PURE__ */ h("div", { className: "w-full", children: [
8383
8384
  /* @__PURE__ */ h("div", { className: "mb-6", children: [
8384
8385
  /* @__PURE__ */ c(or, { level: 4, className: "!mb-2", children: "Admin Settings" }),
8385
- /* @__PURE__ */ h(Ts, { spinning: H, children: [
8386
+ /* @__PURE__ */ h(Ns, { spinning: G, children: [
8386
8387
  p ? /* @__PURE__ */ h("div", { className: "text-sm text-red-600 mb-2", children: [
8387
8388
  "Failed to load settings: ",
8388
8389
  p
@@ -8410,7 +8411,7 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8410
8411
  onClear: () => {
8411
8412
  u(S), E(!1);
8412
8413
  },
8413
- saving: D
8414
+ saving: M
8414
8415
  }
8415
8416
  )
8416
8417
  ] })
@@ -8423,24 +8424,24 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8423
8424
  {
8424
8425
  escBasis: Z,
8425
8426
  setEscBasis: R,
8426
- selectedSeverity: G,
8427
+ selectedSeverity: q,
8427
8428
  setSelectedSeverity: f,
8428
- selectedRule: A,
8429
+ selectedRule: N,
8429
8430
  setSelectedRule: C,
8430
8431
  severityOptions: es,
8431
8432
  ruleOptions: Pt,
8432
- minsOptions: Nt,
8433
- roleOptions: Tt,
8433
+ minsOptions: Tt,
8434
+ roleOptions: Nt,
8434
8435
  l1mins: re,
8435
8436
  setL1mins: me,
8436
- l1role: M,
8437
+ l1role: D,
8437
8438
  setL1role: b,
8438
8439
  l2mins: w,
8439
8440
  setL2mins: x,
8440
- l2role: N,
8441
+ l2role: A,
8441
8442
  setL2role: F,
8442
8443
  l3mins: U,
8443
- setL3mins: q,
8444
+ setL3mins: Y,
8444
8445
  l3role: J,
8445
8446
  setL3role: Q,
8446
8447
  actions: X,
@@ -8448,16 +8449,16 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8448
8449
  thirdPartyIds: ce,
8449
8450
  setThirdPartyIds: ae,
8450
8451
  humanLoop: fe,
8451
- setHumanLoop: we,
8452
+ setHumanLoop: Ae,
8452
8453
  onClear: () => {
8453
- u("By Severity"), m("By severity"), R("rules"), f(void 0), C(void 0), me(void 0), b(void 0), x(void 0), F(void 0), q(void 0), Q(void 0), oe([]), ae([]), we(!1), ie(!1);
8454
+ u("By Severity"), m("By severity"), R("rules"), f(void 0), C(void 0), me(void 0), b(void 0), x(void 0), F(void 0), Y(void 0), Q(void 0), oe([]), ae([]), Ae(!1), ie(!1);
8454
8455
  },
8455
8456
  onSave: async () => {
8456
8457
  Ue(!0), a?.({
8457
- ruleId: A,
8458
+ ruleId: N,
8458
8459
  levels: [
8459
- { minutes: re, role: M },
8460
- { minutes: w, role: N },
8460
+ { minutes: re, role: D },
8461
+ { minutes: w, role: A },
8461
8462
  { minutes: U, role: J }
8462
8463
  ],
8463
8464
  actions: X,
@@ -8466,20 +8467,20 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8466
8467
  isAutoExpire: ue
8467
8468
  });
8468
8469
  try {
8469
- if (A) {
8470
- const te = Array.isArray(X) ? X.map((L) => Number.isNaN(Number(L)) ? L : Number(L)) : [], z = (Ie || []).find(
8471
- (L) => L?.ruleId === A || L?.ruleName === A || L?.RuleId === A
8472
- ), B = typeof z?.recordId == "number" ? z.recordId : z?.ruleId || z?.RuleId || void 0;
8473
- if (!z || !B) {
8470
+ if (N) {
8471
+ const te = Array.isArray(X) ? X.map((L) => Number.isNaN(Number(L)) ? L : Number(L)) : [], H = (Ie || []).find(
8472
+ (L) => L?.ruleId === N || L?.ruleName === N || L?.RuleId === N
8473
+ ), B = typeof H?.recordId == "number" ? H.recordId : H?.ruleId || H?.RuleId || void 0;
8474
+ if (!H || !B) {
8474
8475
  be.error("Unable to find rule identifier for update");
8475
8476
  return;
8476
8477
  }
8477
8478
  const y = {
8478
- ...z,
8479
+ ...H,
8479
8480
  escalationSettings: {
8480
- level1UserRoleId: M ?? 0,
8481
+ level1UserRoleId: D ?? 0,
8481
8482
  level1PostAssistTime: re ?? 0,
8482
- level2UserRoleId: N ?? 0,
8483
+ level2UserRoleId: A ?? 0,
8483
8484
  level2PostAssistTime: w ?? 0,
8484
8485
  level3UserRoleId: J ?? 0,
8485
8486
  level3PostAssistTime: U ?? 0,
@@ -8489,7 +8490,7 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8489
8490
  isAutoExpire: ue
8490
8491
  }
8491
8492
  }, T = await i.updateRule(B, y);
8492
- T?.responseStatus || T?.Success || T?.success ? (be.success("Escalation settings saved"), await pt(), C(void 0), me(void 0), b(void 0), x(void 0), F(void 0), q(void 0), Q(void 0), oe([]), ae([]), we(!1), ie(!1)) : be.error(T?.errorMessage || T?.Message || "Error saving Escalation Settings");
8493
+ T?.responseStatus || T?.Success || T?.success ? (be.success("Escalation settings saved"), await pt(), C(void 0), me(void 0), b(void 0), x(void 0), F(void 0), Y(void 0), Q(void 0), oe([]), ae([]), Ae(!1), ie(!1)) : be.error(T?.errorMessage || T?.Message || "Error saving Escalation Settings");
8493
8494
  }
8494
8495
  } catch (te) {
8495
8496
  console.error("Error saving escalation settings", te);
@@ -8500,8 +8501,8 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8500
8501
  saving: ye,
8501
8502
  onActionTypesLoaded: ($) => {
8502
8503
  const te = {};
8503
- for (const z of $)
8504
- typeof z.actionTypeId == "number" && (te[z.actionTypeId] = z.name);
8504
+ for (const H of $)
8505
+ typeof H.actionTypeId == "number" && (te[H.actionTypeId] = H.name);
8505
8506
  We(te);
8506
8507
  },
8507
8508
  isAutoExpire: ue,
@@ -8513,13 +8514,13 @@ function oc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8513
8514
  /* @__PURE__ */ c(
8514
8515
  rc,
8515
8516
  {
8516
- entries: Y,
8517
+ entries: z,
8517
8518
  userRoles: _e,
8518
8519
  loading: Je || r,
8519
8520
  onEdit: ($) => {
8520
8521
  R("rules");
8521
- const te = Y.find((B) => B.id === $), z = e.find((B) => B.RuleId === $) || (te ? e.find((B) => B.Name === te.ruleOrSeverityLabel) : void 0);
8522
- C(z ? z.RuleId : $);
8522
+ const te = z.find((B) => B.id === $), H = e.find((B) => B.RuleId === $) || (te ? e.find((B) => B.Name === te.ruleOrSeverityLabel) : void 0);
8523
+ C(H ? H.RuleId : $);
8523
8524
  }
8524
8525
  }
8525
8526
  ),
@@ -8533,23 +8534,23 @@ function Ec({ severities: t, rules: e, onSave: s, onCancel: n }) {
8533
8534
  const { rules: r, alerts: a } = ze(), i = [
8534
8535
  { label: "By Severity", value: "By Severity" },
8535
8536
  { label: "By Created Date", value: "By Created Date" }
8536
- ], [o, l] = v("By Severity"), [u, d] = v(/* @__PURE__ */ new Set()), [m, S] = v(null), [g, I] = v(null), [E, D] = v({ inApp: !1, sms: !1, email: !1 }), [j, H] = v([]), [P, p] = v(!0), [O, Z] = v(!1);
8537
+ ], [o, l] = v("By Severity"), [u, d] = v(/* @__PURE__ */ new Set()), [m, S] = v(null), [g, I] = v(null), [E, M] = v({ inApp: !1, sms: !1, email: !1 }), [j, G] = v([]), [P, p] = v(!0), [O, Z] = v(!1);
8537
8538
  ne(() => {
8538
8539
  let f = !1;
8539
8540
  return (async () => {
8540
8541
  try {
8541
- const A = await a.getPreferenceSettings();
8542
- if (f || !A) return;
8543
- D({
8544
- inApp: !!A.inApp,
8542
+ const N = await a.getPreferenceSettings();
8543
+ if (f || !N) return;
8544
+ M({
8545
+ inApp: !!N.inApp,
8545
8546
  //convert to bool - as the resp is str
8546
- sms: !!A.sms,
8547
- email: !!A.email
8547
+ sms: !!N.sms,
8548
+ email: !!N.email
8548
8549
  });
8549
- const C = mr(A.sortBy);
8550
- l(C === "By Created Date" ? "By Created Date" : "By Severity"), S(On(A.doNotDisturbStart)), I(On(A.doNotDisturbEnd)), Array.isArray(A.anomalyIds) && d(new Set(A.anomalyIds.map((re) => String(re))));
8551
- } catch (A) {
8552
- console.error("Error in loading my preferences: ", A);
8550
+ const C = mr(N.sortBy);
8551
+ l(C === "By Created Date" ? "By Created Date" : "By Severity"), S(On(N.doNotDisturbStart)), I(On(N.doNotDisturbEnd)), Array.isArray(N.anomalyIds) && d(new Set(N.anomalyIds.map((re) => String(re))));
8552
+ } catch (N) {
8553
+ console.error("Error in loading my preferences: ", N);
8553
8554
  }
8554
8555
  })(), () => {
8555
8556
  f = !0;
@@ -8559,12 +8560,12 @@ function Ec({ severities: t, rules: e, onSave: s, onCancel: n }) {
8559
8560
  return (async () => {
8560
8561
  try {
8561
8562
  p(!0);
8562
- const A = await r.getLookups();
8563
- if (f || !A) return;
8564
- const C = Array.isArray(A.anomalies) ? A.anomalies : [];
8565
- H(C);
8566
- } catch (A) {
8567
- console.error("Failed to load anomalies lookups", A);
8563
+ const N = await r.getLookups();
8564
+ if (f || !N) return;
8565
+ const C = Array.isArray(N.anomalies) ? N.anomalies : [];
8566
+ G(C);
8567
+ } catch (N) {
8568
+ console.error("Failed to load anomalies lookups", N);
8568
8569
  } finally {
8569
8570
  f || p(!1);
8570
8571
  }
@@ -8573,11 +8574,11 @@ function Ec({ severities: t, rules: e, onSave: s, onCancel: n }) {
8573
8574
  };
8574
8575
  }, []);
8575
8576
  const R = (f) => {
8576
- d((A) => {
8577
- const C = new Set(A);
8577
+ d((N) => {
8578
+ const C = new Set(N);
8578
8579
  return C.has(f) ? C.delete(f) : C.add(f), C;
8579
8580
  });
8580
- }, G = async () => {
8581
+ }, q = async () => {
8581
8582
  s?.({
8582
8583
  sortBy: o,
8583
8584
  subscribedRuleIds: Array.from(u),
@@ -8589,10 +8590,10 @@ function Ec({ severities: t, rules: e, onSave: s, onCancel: n }) {
8589
8590
  });
8590
8591
  try {
8591
8592
  Z(!0);
8592
- const f = m ? m.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", A = g ? g.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", C = Array.from(u).map((me) => Number(me)).filter((me) => Number.isFinite(me)), re = await a.setPreferenceSettings({
8593
+ const f = m ? m.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", N = g ? g.format?.("HH:mm:ss") ?? "00:00:00" : "00:00:00", C = Array.from(u).map((me) => Number(me)).filter((me) => Number.isFinite(me)), re = await a.setPreferenceSettings({
8593
8594
  anomalyIds: C,
8594
8595
  doNotDisturbStart: f,
8595
- doNotDisturbEnd: A,
8596
+ doNotDisturbEnd: N,
8596
8597
  inApp: !!E.inApp,
8597
8598
  sms: !!E.sms,
8598
8599
  email: !!E.email,
@@ -8612,9 +8613,9 @@ function Ec({ severities: t, rules: e, onSave: s, onCancel: n }) {
8612
8613
  ] }) }) }),
8613
8614
  /* @__PURE__ */ h("div", { className: "mb-4", children: [
8614
8615
  /* @__PURE__ */ c(lr, { level: 5, className: "!mb-2", children: "Anomalies" }),
8615
- P ? /* @__PURE__ */ c("div", { className: "py-4", children: /* @__PURE__ */ c(Ts, {}) }) : /* @__PURE__ */ c(at, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray(j) ? j : []).map((f) => {
8616
- const A = String(f.recordId), C = f.anomalyName;
8617
- return /* @__PURE__ */ c(Ot, { checked: u.has(A), onChange: () => R(A), children: C }, A);
8616
+ P ? /* @__PURE__ */ c("div", { className: "py-4", children: /* @__PURE__ */ c(Ns, {}) }) : /* @__PURE__ */ c(at, { direction: "vertical", size: 10, className: "w-full", children: (Array.isArray(j) ? j : []).map((f) => {
8617
+ const N = String(f.recordId), C = f.anomalyName;
8618
+ return /* @__PURE__ */ c(Ot, { checked: u.has(N), onChange: () => R(N), children: C }, N);
8618
8619
  }) })
8619
8620
  ] }),
8620
8621
  /* @__PURE__ */ h("div", { className: "mb-4", children: [
@@ -8633,15 +8634,15 @@ function Ec({ severities: t, rules: e, onSave: s, onCancel: n }) {
8633
8634
  ] })
8634
8635
  ] }) }) }),
8635
8636
  /* @__PURE__ */ h($e, { gutter: [24, 12], children: [
8636
- /* @__PURE__ */ c(_, { children: /* @__PURE__ */ c(Ot, { checked: E.inApp, onChange: (f) => D({ ...E, inApp: f.target.checked }), children: "In-app" }) }),
8637
- /* @__PURE__ */ c(_, { children: /* @__PURE__ */ c(Ot, { checked: E.sms, onChange: (f) => D({ ...E, sms: f.target.checked }), children: "SMS" }) }),
8638
- /* @__PURE__ */ c(_, { children: /* @__PURE__ */ c(Ot, { checked: E.email, onChange: (f) => D({ ...E, email: f.target.checked }), children: "Email" }) })
8637
+ /* @__PURE__ */ c(_, { children: /* @__PURE__ */ c(Ot, { checked: E.inApp, onChange: (f) => M({ ...E, inApp: f.target.checked }), children: "In-app" }) }),
8638
+ /* @__PURE__ */ c(_, { children: /* @__PURE__ */ c(Ot, { checked: E.sms, onChange: (f) => M({ ...E, sms: f.target.checked }), children: "SMS" }) }),
8639
+ /* @__PURE__ */ c(_, { children: /* @__PURE__ */ c(Ot, { checked: E.email, onChange: (f) => M({ ...E, email: f.target.checked }), children: "Email" }) })
8639
8640
  ] })
8640
8641
  ] }),
8641
8642
  /* @__PURE__ */ c(Bt, {}),
8642
8643
  /* @__PURE__ */ h(at, { className: "gap-3", children: [
8643
8644
  /* @__PURE__ */ c(Pe, { onClick: n, disabled: O, children: "Cancel" }),
8644
- /* @__PURE__ */ c(Pe, { type: "primary", onClick: G, loading: O, children: "Save" })
8645
+ /* @__PURE__ */ c(Pe, { type: "primary", onClick: q, loading: O, children: "Save" })
8645
8646
  ] })
8646
8647
  ] });
8647
8648
  }
@@ -8651,7 +8652,7 @@ function lc({ severities: t, rules: e, userRoles: s, rawRules: n, loadingRules:
8651
8652
  const cc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAIZSURBVHgBnZW/b9NAFMe/z3H6i1ZNJUBFQsL/QQkLCFBtRhhKF1ibhBmpXbtgFlYqsTG0gRGWwgAjMb8EYmjYGN0pCCrVVaX+SBxf37PiqHWcOu5Xsux79+6j77vz3RH66IbdsDTQPCFngmBwqMCPBwVXoe204Fd/2ZfrSWMpHrDshtGCvsY9FlKkFNYD+Es/7EtuX+itp1sLnLrScTWoPMYsfnty/lUPtAOs4syiUgQOoWHJpG9kdBiX11Z+UaZCk1YT+vOzACuzYxgf7hZbyBGvhTi9af+7SkQbyKi7M8N4ZJ5D+eU2dg9UN07KvyNOS8io6UkNFXMMj1/vnACKAuTmNXZpIqME+LF+iIbX7ukjkClODWTQw+ujuGYMYfXzXnICbxSBDrxAUvYDhkrZp6ggUC8+sDI7mpj9YmESb3/uJ5Z9TJ5A3eORvzsBpgs6lufGT2TKPNY3fbxh6Knis0FTSjnx+LP3u5DJicDi/t7MCFadPaRJQTl02/5vKcKnpITluYkwrWjksebs48Pvg3SoUkXtq32hxt+1pITI8Zc/zcGACN59ty/WdWnklV5ukZ+49wU8MUJIF3mBGlqUr3Dv1+wpl20v9UuP75pElyrgc3XK7UJFbLvK4DJiv9ggDmWcjO9G4imWvW00yV/hjvtpOFnpQOVLkcO+0EhyevGrROG1ol1hREFc8ZGxyddIje+v9c4i9+gI5z7MozLxclgAAAAASUVORK5CYII=", uc = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAAVCAYAAACpF6WWAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAKeSURBVHgBjVVdbtpAEJ5ZmygPfTBSaVWpUt0bwFuURgJOUG5QeoLACbw+QeAEwA3SGxgJokh9CDeI+xSpTRU/Imw8nbFZx6QQGAl5d2fm229+dkDYI2f6oaUAOwhWExBcPnL4FwFBSLCexpCMf+qPi12++PKgpR/cGOwRa1pwQIjgOoWkf6s/hOVzVd588R+/xWjf5YAY8Y0+ErQrZFfnXg3lK3uGm7A+RISOxfbit5NprqBxxgBoeEIVHehqtI9lSz+5McaaITaA2J17bycFaBayMOS8IaT+zHuv4Ui58P9oAvB4Ga0paUgqbFGswL5idIcIx3P9DCiXrQB7iJawcTiCkMMIUlj7Jo8zr6Yv/EfRXXIqRnzUxnP9u46Id8Q5Sslq3+pqWErHAPKqvxROC/ZMuJwKJ8bkPouUkrYUqgt5IgMDKAxfAYT8nAZnmR2A5J47YSjrFKyOYpZN2SiIJ8YjRqVfASyAFVg9s2F2gXwRsClMXdnYcFpq5PyiQ8KEilaywc79+aEow2i7fdCF46SIpuTvCGi2kWSXjCM4QqS4Zl3yjwQ0UySwrBfGRJNjQKW4ZrmEpL45CxUDTGWdgmoZgxOoDA6zxYgr7ZudhWk3x6Sp4kl0nZmgujQhcH5Cvqy/Hxi5hdL+dgsWxR2rma4FkLeDw+PMM243+t2YB0jDDI9nMBquyWqI3tjmLYguQfqDzxebty/DIcnePr9jfePVfDhSzv2/Hs8LAY3kMmFfTCl+rl3uu1GWF6Jx+X3vkpa+58jeeNyXvY3Pd8N+a0hvgK9ge3hMTmG5CPTnSICWcFpXaDfZUcAck99yOnZM/id3hcmAFV/hgEilU6p0TcH2gpZYS98xc/kXUJ8YImPFzfeLh0cgXbMp8n/yD3ySPZSK0MWKAAAAAElFTkSuQmCC";
8652
8653
  function Ms() {
8653
8654
  const { config: t } = ze();
8654
- return { timeZoneDetails: Ne(() => {
8655
+ return { timeZoneDetails: Te(() => {
8655
8656
  const s = t.timeZone || Intl.DateTimeFormat().resolvedOptions().timeZone;
8656
8657
  return { timeZoneUniqueId: "", ianaTimeZoneId: s, timeZoneName: s, offset: "" };
8657
8658
  }, [t.timeZone]), loading: !1 };
@@ -8831,19 +8832,19 @@ const fc = ({
8831
8832
  "brandished guns & knives": "weapon",
8832
8833
  "brandished guns and knives": "weapon"
8833
8834
  }, pc = ({ isModalOpen: t, handleModalClose: e, selectedRow: s, fetchAlertLogs: n, alertStatusList: r = [], alertStatusLoading: a = !1, initialTab: i = "details", sourceTab: o, onAlertView: l }) => {
8834
- const [u, d] = v(), [m, S] = v(""), [g, I] = v(!1), E = xa(null), [D, j] = v("details"), [H, P] = v(void 0), p = Tr(), { alerts: O, rules: Z, config: R } = ze(), { timeZoneDetails: G } = Ms(), [f, A] = v(null), [C, re] = v(!1), [me, M] = v(!1), [b, w] = v(void 0), [x, N] = v(void 0), [F, U] = v({}), [q, J] = v({}), Q = (y, T, L) => {
8835
- const Se = q[y];
8836
- return F[y] === !1 && !Se ? /* @__PURE__ */ h("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: [
8835
+ const [u, d] = v(), [m, S] = v(""), [g, I] = v(!1), E = xa(null), [M, j] = v("details"), [G, P] = v(void 0), p = Nr(), { alerts: O, rules: Z, config: R } = ze(), { timeZoneDetails: q } = Ms(), [f, N] = v(null), [C, re] = v(!1), [me, D] = v(!1), [b, w] = v(void 0), [x, A] = v(void 0), [F, U] = v({}), [Y, J] = v({}), Q = (y, T, L) => {
8836
+ const ve = Y[y];
8837
+ return F[y] === !1 && !ve ? /* @__PURE__ */ h("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: [
8837
8838
  /* @__PURE__ */ c(pr, { size: 40 }),
8838
8839
  /* @__PURE__ */ c("span", { className: "text-sm", children: "Media not available" })
8839
8840
  ] }) : /* @__PURE__ */ h("div", { className: "relative w-full flex justify-center items-center min-h-[200px]", children: [
8840
- Se && /* @__PURE__ */ c("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-100 rounded-lg z-10", children: /* @__PURE__ */ c(Zi, { size: 32, className: "animate-spin text-gray-400" }) }),
8841
+ ve && /* @__PURE__ */ c("div", { className: "absolute inset-0 flex items-center justify-center bg-gray-100 rounded-lg z-10", children: /* @__PURE__ */ c(Zi, { size: 32, className: "animate-spin text-gray-400" }) }),
8841
8842
  /* @__PURE__ */ c(
8842
8843
  "img",
8843
8844
  {
8844
8845
  src: y,
8845
8846
  alt: T.caption || `media-${L}`,
8846
- className: `max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg transition-opacity duration-200 ${Se ? "opacity-0" : "opacity-100"}`,
8847
+ className: `max-w-full max-h-[90vh] object-contain rounded-lg shadow-lg transition-opacity duration-200 ${ve ? "opacity-0" : "opacity-100"}`,
8847
8848
  onLoad: () => J((Me) => ({ ...Me, [y]: !1 })),
8848
8849
  onError: () => J((Me) => ({ ...Me, [y]: !1 }))
8849
8850
  },
@@ -8855,7 +8856,7 @@ const fc = ({
8855
8856
  eventDisplayName: ce,
8856
8857
  anomalyName: ae,
8857
8858
  alertId: fe,
8858
- timestamp: we,
8859
+ timestamp: Ae,
8859
8860
  description: ue,
8860
8861
  spaceName: ie,
8861
8862
  assignTeam: Ee,
@@ -8864,8 +8865,8 @@ const fc = ({
8864
8865
  id: it,
8865
8866
  alertDetails: _e,
8866
8867
  statusHistory: he,
8867
- mediaDetails: Y,
8868
- alertNumber: Ae
8868
+ mediaDetails: z,
8869
+ alertNumber: Se
8869
8870
  } = X, ye = R.tenant === "snl" ? ce || oe || "Alert Event" : oe || "Alert Event", Ue = (y) => {
8870
8871
  const T = String(y || "").toLowerCase();
8871
8872
  return T === "delivered" || T === "sent" ? "Delivered" : T === "failed" ? "Failed" : "Queued";
@@ -8876,22 +8877,22 @@ const fc = ({
8876
8877
  status: Ue(y?.messageStatus),
8877
8878
  notificationReceipientType: y?.notificationReceipientType || ""
8878
8879
  }), nt = (y, T) => {
8879
- const L = T.map(Je), Se = L.filter((ot) => ot.status === "Delivered").length, Me = T.map((ot) => ot?.sentAt).filter(Boolean).sort((ot, rt) => new Date(rt).getTime() - new Date(ot).getTime())[0], Ke = (T[0] || {})?.severityName || `${y} Notification`;
8880
+ const L = T.map(Je), ve = L.filter((ot) => ot.status === "Delivered").length, Me = T.map((ot) => ot?.sentAt).filter(Boolean).sort((ot, rt) => new Date(rt).getTime() - new Date(ot).getTime())[0], Ke = (T[0] || {})?.severityName || `${y} Notification`;
8880
8881
  return {
8881
8882
  channelLabel: `${y} Notification`,
8882
8883
  sentAt: Me || "",
8883
8884
  messageTitle: Ke,
8884
8885
  messageBody: "",
8885
8886
  total: L.length,
8886
- delivered: Se,
8887
+ delivered: ve,
8887
8888
  recipients: L
8888
8889
  };
8889
8890
  }, Ie = (y) => {
8890
8891
  const T = /* @__PURE__ */ new Map();
8891
8892
  return (y || []).forEach((L) => {
8892
- const Se = String(L?.notificationType || "Unknown"), Me = T.get(Se) || [];
8893
- Me.push(L), T.set(Se, Me);
8894
- }), Array.from(T.entries()).map(([L, Se]) => nt(L, Se));
8893
+ const ve = String(L?.notificationType || "Unknown"), Me = T.get(ve) || [];
8894
+ Me.push(L), T.set(ve, Me);
8895
+ }), Array.from(T.entries()).map(([L, ve]) => nt(L, ve));
8895
8896
  }, ke = async (y) => {
8896
8897
  try {
8897
8898
  const T = await O.getAlertNotifications(y), L = Ie(T);
@@ -8901,14 +8902,14 @@ const fc = ({
8901
8902
  }
8902
8903
  };
8903
8904
  ne(() => {
8904
- if (D !== "track" || !it) return;
8905
+ if (M !== "track" || !it) return;
8905
8906
  let y = !1;
8906
8907
  return ke(it).then(() => {
8907
8908
  y && P(void 0);
8908
8909
  }), () => {
8909
8910
  y = !0;
8910
8911
  };
8911
- }, [D, it]), ne(() => {
8912
+ }, [M, it]), ne(() => {
8912
8913
  t ? j(i) : (d(void 0), S(""));
8913
8914
  }, [t, i]), ne(() => {
8914
8915
  !t || !l || l([{
@@ -8920,31 +8921,31 @@ const fc = ({
8920
8921
  if (!t || R.tenant !== "snl") return;
8921
8922
  let y = !1;
8922
8923
  return re(!0), Z.getLookups().then((T) => {
8923
- y || (A(T.alertStatusTypes ?? []), re(!1));
8924
+ y || (N(T.alertStatusTypes ?? []), re(!1));
8924
8925
  }).catch(() => {
8925
- y || (A([]), re(!1));
8926
+ y || (N([]), re(!1));
8926
8927
  }), () => {
8927
8928
  y = !0;
8928
8929
  };
8929
8930
  }, [t, R.tenant]);
8930
- const Pt = o === "archived" || ["completed", "false positive"].includes(String(st || "").toLowerCase()), Tt = (y) => {
8931
+ const Pt = o === "archived" || ["completed", "false positive"].includes(String(st || "").toLowerCase()), Nt = (y) => {
8931
8932
  const T = String(y?.value || "").toLowerCase(), L = String(y?.statusName || "").toLowerCase();
8932
8933
  return T.includes("reopen") || L.includes("reopen");
8933
- }, Nt = String(ae || "").trim().toLowerCase(), pt = gc[Nt] ?? "general", ts = r.filter((y) => {
8934
- const T = Tt(y);
8934
+ }, Tt = String(ae || "").trim().toLowerCase(), pt = gc[Tt] ?? "general", ts = r.filter((y) => {
8935
+ const T = Nt(y);
8935
8936
  return typeof o < "u" ? o === "archived" ? T : !T : Pt ? T : !T;
8936
- }).map((y) => ({ value: y.value, label: y.statusName })), Wt = f ?? [], Te = (y) => !!y.isWatchListStatus, bt = (y) => !!y.isWeapontStatus, $ = Wt.filter((y) => {
8937
+ }).map((y) => ({ value: y.value, label: y.statusName })), Wt = f ?? [], Ne = (y) => !!y.isWatchListStatus, bt = (y) => !!y.isWeapontStatus, $ = Wt.filter((y) => {
8937
8938
  switch (pt) {
8938
8939
  case "elopement":
8939
8940
  return y.isElopementStatus;
8940
8941
  case "watchlist":
8941
- return Te(y);
8942
+ return Ne(y);
8942
8943
  case "weapon":
8943
8944
  return bt(y);
8944
8945
  default:
8945
- return !y.isElopementStatus && !Te(y) && !bt(y);
8946
+ return !y.isElopementStatus && !Ne(y) && !bt(y);
8946
8947
  }
8947
- }).map((y) => ({ value: y.alertStatusTypeName, label: y.alertStatusTypeName })), te = R.tenant === "snl" && f !== null ? $ : ts, z = Ne(() => yr(Y), [Y]);
8948
+ }).map((y) => ({ value: y.alertStatusTypeName, label: y.alertStatusTypeName })), te = R.tenant === "snl" && f !== null ? $ : ts, H = Te(() => yr(z), [z]);
8948
8949
  return ne(() => {
8949
8950
  let y = !1;
8950
8951
  const T = new AbortController(), L = async (de) => {
@@ -8968,19 +8969,19 @@ const fc = ({
8968
8969
  }
8969
8970
  };
8970
8971
  U({});
8971
- const Se = z.filter((de) => !Ys(de)).map((de) => de?.mediaUrl || de).filter((de) => typeof de == "string" && de.length > 0), Me = {};
8972
- return Se.forEach((de) => {
8972
+ const ve = H.filter((de) => !Ys(de)).map((de) => de?.mediaUrl || de).filter((de) => typeof de == "string" && de.length > 0), Me = {};
8973
+ return ve.forEach((de) => {
8973
8974
  Me[de] = !0;
8974
- }), J(Me), Se.forEach((de) => L(de)), () => {
8975
+ }), J(Me), ve.forEach((de) => L(de)), () => {
8975
8976
  y = !0, T.abort();
8976
8977
  };
8977
- }, [z]), /* @__PURE__ */ c(
8978
+ }, [H]), /* @__PURE__ */ c(
8978
8979
  Ca,
8979
8980
  {
8980
8981
  open: t,
8981
8982
  onCancel: e,
8982
8983
  width: 1e3,
8983
- footer: D === "details" ? /* @__PURE__ */ h("div", { className: "flex flex-row gap-2 justify-start", children: [
8984
+ footer: M === "details" ? /* @__PURE__ */ h("div", { className: "flex flex-row gap-2 justify-start", children: [
8984
8985
  /* @__PURE__ */ c(
8985
8986
  Pe,
8986
8987
  {
@@ -9029,7 +9030,7 @@ const fc = ({
9029
9030
  children: s && /* @__PURE__ */ c(
9030
9031
  ln,
9031
9032
  {
9032
- activeKey: D,
9033
+ activeKey: M,
9033
9034
  onChange: (y) => j(y),
9034
9035
  items: [
9035
9036
  {
@@ -9048,7 +9049,7 @@ const fc = ({
9048
9049
  ] }) : null,
9049
9050
  /* @__PURE__ */ h("div", { className: "text-sm text-gray-500", children: [
9050
9051
  "Timestamp: ",
9051
- As(we, G?.ianaTimeZoneId)
9052
+ As(Ae, q?.ianaTimeZoneId)
9052
9053
  ] }),
9053
9054
  /* @__PURE__ */ h("div", { className: "font-sm text-gray-500", children: [
9054
9055
  /* @__PURE__ */ c("b", { className: "text-black text-sm/6", children: "Description:" }),
@@ -9120,7 +9121,7 @@ const fc = ({
9120
9121
  /* @__PURE__ */ c("div", { className: "flex flex-col gap-4", children: /* @__PURE__ */ h("div", { className: "w-full mt-1", children: [
9121
9122
  /* @__PURE__ */ h("div", { className: "w-full flex items-center justify-between", children: [
9122
9123
  /* @__PURE__ */ c("h3", { className: "text-black font-bold text-sm", children: "Camera Footage" }),
9123
- z.length > 1 ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
9124
+ H.length > 1 ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2", children: [
9124
9125
  /* @__PURE__ */ c(
9125
9126
  "button",
9126
9127
  {
@@ -9143,10 +9144,10 @@ const fc = ({
9143
9144
  )
9144
9145
  ] }) : null
9145
9146
  ] }),
9146
- z.length ? /* @__PURE__ */ c("div", { className: "w-full", children: /* @__PURE__ */ c(Ra, { ref: E, dots: !0, className: "w-full", children: z.map((y, T) => {
9147
- const L = y.mediaUrl || y, Se = Ys(y);
9147
+ H.length ? /* @__PURE__ */ c("div", { className: "w-full", children: /* @__PURE__ */ c(Ra, { ref: E, dots: !0, className: "w-full", children: H.map((y, T) => {
9148
+ const L = y.mediaUrl || y, ve = Ys(y);
9148
9149
  return /* @__PURE__ */ h("div", { className: "flex justify-center items-center relative", children: [
9149
- Se ? /* @__PURE__ */ h(
9150
+ ve ? /* @__PURE__ */ h(
9150
9151
  "video",
9151
9152
  {
9152
9153
  width: "240",
@@ -9160,11 +9161,11 @@ const fc = ({
9160
9161
  }
9161
9162
  ) : Q(String(L), y, T),
9162
9163
  y.caption && /* @__PURE__ */ c("p", { className: "text-xs text-gray-500 mt-1", children: y.caption }),
9163
- !Se && F[String(L)] ? /* @__PURE__ */ c(
9164
+ !ve && F[String(L)] ? /* @__PURE__ */ c(
9164
9165
  "button",
9165
9166
  {
9166
9167
  onClick: () => {
9167
- M(!0), w(L), N(y.type || "image");
9168
+ D(!0), w(L), A(y.type || "image");
9168
9169
  },
9169
9170
  className: "absolute bottom-3 right-3 text-white bg-black/50 rounded-full p-2 hover:bg-black/70",
9170
9171
  children: /* @__PURE__ */ c(Sr, { size: 20 })
@@ -9177,7 +9178,7 @@ const fc = ({
9177
9178
  vr,
9178
9179
  {
9179
9180
  isOpen: me,
9180
- onClose: () => M(!1),
9181
+ onClose: () => D(!1),
9181
9182
  src: b || "",
9182
9183
  type: x || "image"
9183
9184
  }
@@ -9194,9 +9195,9 @@ const fc = ({
9194
9195
  id: it,
9195
9196
  priority: We,
9196
9197
  spaceName: ie,
9197
- alertNumber: Ae,
9198
+ alertNumber: Se,
9198
9199
  statusHistory: he,
9199
- notifGroups: H
9200
+ notifGroups: G
9200
9201
  }
9201
9202
  )
9202
9203
  }
@@ -9220,14 +9221,14 @@ function Sc() {
9220
9221
  };
9221
9222
  }
9222
9223
  function ba({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r, onRefetch: a, onPageChange: i, onFilterChange: o, onAlertView: l }) {
9223
- const [u, d] = v(!1), [m, S] = v(null), [g, I] = v("details"), { list: E, loading: D } = Sc(), j = !0, { timeZoneDetails: H } = Ms(), P = H?.timeZoneName ?? "UTC", p = H?.ianaTimeZoneId ?? "UTC";
9224
+ const [u, d] = v(!1), [m, S] = v(null), [g, I] = v("details"), { list: E, loading: M } = Sc(), j = !0, { timeZoneDetails: G } = Ms(), P = G?.timeZoneName ?? "UTC", p = G?.ianaTimeZoneId ?? "UTC";
9224
9225
  function O(re, me) {
9225
- S(re), I(me?.tab ?? "details"), G(me?.sourceTab ?? "active"), d(!0);
9226
+ S(re), I(me?.tab ?? "details"), q(me?.sourceTab ?? "active"), d(!0);
9226
9227
  }
9227
9228
  function Z() {
9228
9229
  d(!1);
9229
9230
  }
9230
- const [R, G] = v("active"), [f, A] = v(0), C = m ? {
9231
+ const [R, q] = v("active"), [f, N] = v(0), C = m ? {
9231
9232
  originalData: {
9232
9233
  // include the full selected alert so alll modal fieldsare present
9233
9234
  ...m,
@@ -9249,7 +9250,7 @@ function ba({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r,
9249
9250
  tabBarStyle: { fontSize: "medium" },
9250
9251
  onChange: (re) => {
9251
9252
  const me = re === "archived";
9252
- A((M) => M + 1), i?.(1), o?.({ isArchived: me });
9253
+ N((D) => D + 1), i?.(1), o?.({ isArchived: me });
9253
9254
  },
9254
9255
  items: [
9255
9256
  {
@@ -9284,7 +9285,7 @@ function ba({ alerts: t, loading: e = !1, columns: s, total: n, currentPage: r,
9284
9285
  fetchAlertLogs: () => {
9285
9286
  },
9286
9287
  alertStatusList: E,
9287
- alertStatusLoading: D,
9288
+ alertStatusLoading: M,
9288
9289
  initialTab: g,
9289
9290
  sourceTab: R,
9290
9291
  onAlertView: l
@@ -9309,9 +9310,9 @@ function vc() {
9309
9310
  }));
9310
9311
  e(g);
9311
9312
  try {
9312
- const I = await d.getLookups(), E = Array.isArray(I?.userRoles) ? I.userRoles.map((D) => ({
9313
- userRoleId: D.userRoleId ?? D.id,
9314
- userRoleName: D.userRoleName ?? D.name
9313
+ const I = await d.getLookups(), E = Array.isArray(I?.userRoles) ? I.userRoles.map((M) => ({
9314
+ userRoleId: M.userRoleId ?? M.id,
9315
+ userRoleName: M.userRoleName ?? M.name
9315
9316
  })) : [];
9316
9317
  n(E), a(Array.isArray(I?.severities) ? I.severities : []);
9317
9318
  } catch {
@@ -9354,7 +9355,7 @@ function Ac(t = 1, e) {
9354
9355
  refetch: a.refetch
9355
9356
  };
9356
9357
  }
9357
- function Tc(t) {
9358
+ function Nc(t) {
9358
9359
  const [e, s] = v(1), [n, r] = v({}), { alerts: a, total: i, loading: o, refetch: l } = Ac(e, n);
9359
9360
  ne(() => {
9360
9361
  !o && a.length > 0 && t.onAlertView?.(a);
@@ -9387,7 +9388,7 @@ function Mc({
9387
9388
  refetchOnWindowFocus: !1
9388
9389
  }
9389
9390
  }
9390
- })), S = Ne(
9391
+ })), S = Te(
9391
9392
  () => ({
9392
9393
  alertsBaseUrl: e,
9393
9394
  rulesBaseUrl: s || e,
@@ -9395,7 +9396,7 @@ function Mc({
9395
9396
  }),
9396
9397
  [e, s, n]
9397
9398
  );
9398
- return /* @__PURE__ */ c(Ha, { client: m, children: /* @__PURE__ */ c(wi, { tenant: t, override: S, timeZone: r, userManagementDomain: a, spacesBaseUrl: i, children: Array.isArray(o) ? /* @__PURE__ */ c(ba, { alerts: o, loading: !!l, columns: u, onAlertView: d }) : /* @__PURE__ */ c(Tc, { columns: u, onAlertView: d }) }) });
9399
+ return /* @__PURE__ */ c(Ha, { client: m, children: /* @__PURE__ */ c(wi, { tenant: t, override: S, timeZone: r, userManagementDomain: a, spacesBaseUrl: i, children: Array.isArray(o) ? /* @__PURE__ */ c(ba, { alerts: o, loading: !!l, columns: u, onAlertView: d }) : /* @__PURE__ */ c(Nc, { columns: u, onAlertView: d }) }) });
9399
9400
  }
9400
9401
  function Dc(t) {
9401
9402
  const { alerts: e } = ze(), s = cn({
@@ -9434,6 +9435,6 @@ export {
9434
9435
  Ac as useAlerts,
9435
9436
  Dc as useAlertsReport,
9436
9437
  ze as useApi,
9437
- Tr as useUpdateAlertStatus
9438
+ Nr as useUpdateAlertStatus
9438
9439
  };
9439
9440
  //# sourceMappingURL=index.es.js.map