@cccsaurora/clue-ui 1.0.1-dev.70 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (181) hide show
  1. package/ActionForm-BtTv0s4P.js +340 -0
  2. package/AnnotationDetails-D5tBIeEw.js +160 -0
  3. package/AnnotationPreview-CZr_CcZC.js +140 -0
  4. package/ClueEnrichContext-DH9lqjwH.js +401 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_Map-DXNg_Z-q.js +54 -0
  7. package/_MapCache-Cu25RRDU.js +129 -0
  8. package/_Uint8Array-DlJCtTvG.js +102 -0
  9. package/_baseAssignValue-CUmzp727.js +20 -0
  10. package/_baseClone-BlMmRXeX.js +208 -0
  11. package/_baseExtremum-P_0akmCi.js +27 -0
  12. package/_baseFlatten-CN7vDNEQ.js +72 -0
  13. package/_baseGet-Dgf6_xCm.js +80 -0
  14. package/_baseIsEqual-Cpjtfb3Q.js +173 -0
  15. package/_baseIteratee-CP1bocOX.js +95 -0
  16. package/_baseSlice-M5RKzt1A.js +10 -0
  17. package/_baseSum-wEbgNeUs.js +10 -0
  18. package/_baseUniq-tMFmk80M.js +61 -0
  19. package/_commonjsHelpers-C6fGbg64.js +6 -0
  20. package/_createAggregator-B4Cav8ZM.js +53 -0
  21. package/_getPrototype-CHAFQYL_.js +5 -0
  22. package/_getTag-BV_UoLYG.js +90 -0
  23. package/cloneDeep-BPVpFBzJ.js +8 -0
  24. package/components/AnnotationBody.js +34 -49
  25. package/components/AnnotationDetailPopover.js +30 -36
  26. package/components/AnnotationDetails.js +6 -6
  27. package/components/AnnotationEntry.js +47 -50
  28. package/components/AnnotationPreview.js +5 -5
  29. package/components/ClassificationChip.js +23 -44
  30. package/components/CountBadge.js +26 -31
  31. package/components/EnrichedCard.js +92 -104
  32. package/components/EnrichedChip.js +109 -134
  33. package/components/EnrichedTypography.js +110 -136
  34. package/components/ErrorBoundary.js +24 -28
  35. package/components/RetryFailedEnrichments.js +9 -10
  36. package/components/SourcePicker.js +49 -57
  37. package/components/actions/ActionForm.js +4 -4
  38. package/components/actions/ExecutePopover.js +50 -64
  39. package/components/actions/ResultModal.js +34 -37
  40. package/components/actions/form/schemaAdapter.js +20 -39
  41. package/components/display/graph/ExpandMoreButton.js +10 -10
  42. package/components/display/graph/elements/NodeCard.js +76 -92
  43. package/components/display/graph/elements/NodeTag.js +13 -15
  44. package/components/display/graph/index.js +200 -258
  45. package/components/display/graph/visualizations/Leaf.js +69 -88
  46. package/components/display/graph/visualizations/cloud/index.js +81 -98
  47. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  48. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  49. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  50. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  52. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  53. package/components/display/graph/visualizations/icons/index.js +13 -14
  54. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  55. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  56. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  57. package/components/display/graph/visualizations/tree/index.js +305 -407
  58. package/components/display/icons/Iconified.js +12 -27
  59. package/components/display/json/index.js +4 -4
  60. package/components/display/markdown/DynamicTabs.js +17 -22
  61. package/components/display/markdown/index.js +5674 -8531
  62. package/components/display/markdown/markdownPlugins/tabs.js +1 -1
  63. package/components/enrichment/EnrichPopover.js +47 -55
  64. package/components/fetchers/Fetcher.js +95 -123
  65. package/components/fetchers/PreviewModal.js +17 -20
  66. package/components/fetchers/StatusChip.js +18 -22
  67. package/components/group/Entry.js +11 -13
  68. package/components/group/Group.js +10 -13
  69. package/components/group/GroupControl.js +65 -76
  70. package/components/stats/QueryStatus.js +28 -37
  71. package/countBy-DOutsa_w.js +8 -0
  72. package/data/event.js +4 -6
  73. package/database/index.js +2 -2
  74. package/debounce-DryYcbJ4.js +56 -0
  75. package/get-Bow1vKwx.js +8 -0
  76. package/groupBy-BheQYl6f.js +8 -0
  77. package/hooks/ClueActionContext.js +6 -6
  78. package/hooks/ClueComponentContext.js +23 -29
  79. package/hooks/ClueConfigProvider.js +12 -14
  80. package/hooks/ClueDatabaseContext.js +13 -19
  81. package/hooks/ClueEnrichContext.js +8 -8
  82. package/hooks/ClueFetcherContext.js +46 -74
  83. package/hooks/ClueGroupContext.js +14 -17
  84. package/hooks/CluePopupContext.js +5 -5
  85. package/hooks/ClueProvider.js +10 -12
  86. package/hooks/selectors.js +11 -22
  87. package/hooks/useAnnotations.js +29 -45
  88. package/hooks/useClue.js +4 -6
  89. package/hooks/useClueActions.js +3 -3
  90. package/hooks/useClueConfig.js +5 -5
  91. package/hooks/useClueTypeConfig.js +3 -3
  92. package/hooks/useComparator.js +435 -722
  93. package/hooks/useErrors.js +18 -22
  94. package/hooks/useMyHighlights.js +36 -66
  95. package/hooks/useMyLocalStorage.js +43 -63
  96. package/iconify-BBckr5AQ.js +1263 -0
  97. package/icons/Action.js +49 -66
  98. package/icons/Assessment.js +68 -84
  99. package/icons/Context.js +61 -75
  100. package/icons/Opinion.js +65 -77
  101. package/icons/iconMap.js +2 -2
  102. package/identity-ByMq8VxU.js +6 -0
  103. package/index-BUcHmehh.js +975 -0
  104. package/index-Bo-v5IAc.js +12754 -0
  105. package/index-CnaCBNrd.js +358 -0
  106. package/index-E7g8cRyW.js +568 -0
  107. package/index-p5_wX7q1.js +11729 -0
  108. package/isEmpty-g47Qir2A.js +21 -0
  109. package/isNil-CjWwlQS3.js +6 -0
  110. package/isObject-B53jY8Qg.js +7 -0
  111. package/isObjectLike-BatpeCIi.js +29 -0
  112. package/isSymbol-C3_SC0Qp.js +8 -0
  113. package/last-7CdUxN0r.js +7 -0
  114. package/main.js +58 -58
  115. package/package.json +1 -1
  116. package/sortBy-ITdmD17L.js +79 -0
  117. package/sumBy-DxJUU2E8.js +8 -0
  118. package/tabs-CgADNA57.js +195 -0
  119. package/text/Frequency.js +23 -42
  120. package/toFinite-BMy6GObD.js +14 -0
  121. package/toNumber-YVhnnJv4.js +31 -0
  122. package/useClueTypeConfig-CneP98N_.js +2260 -0
  123. package/utils/chain.js +64 -91
  124. package/utils/classificationParser.d.ts +8 -8
  125. package/utils/classificationParser.js +257 -520
  126. package/utils/constants.js +10 -35
  127. package/utils/graph.js +45 -72
  128. package/utils/hashUtil.js +7 -7
  129. package/utils/line.js +81 -131
  130. package/utils/loggerUtil.js +3 -5
  131. package/utils/sessionStorage.js +29 -41
  132. package/utils/utils.js +9 -9
  133. package/utils/window.js +10 -21
  134. package/utils-CD0rFIFU.js +2704 -0
  135. package/ActionForm-D4ryHO0M.js +0 -436
  136. package/AnnotationDetails-YAPoqw3R.js +0 -175
  137. package/AnnotationPreview-DiQDjt9s.js +0 -188
  138. package/ClueEnrichContext-DIn6g8tw.js +0 -522
  139. package/FlexOne-BSYAhhtG.js +0 -9
  140. package/_Map-kgDsDYxq.js +0 -64
  141. package/_MapCache-DabaaWfq.js +0 -161
  142. package/_Uint8Array-BlVVH1tp.js +0 -129
  143. package/_baseAssignValue-CNbcU6Nb.js +0 -25
  144. package/_baseClone-D3a8Pa4T.js +0 -284
  145. package/_baseExtremum-B1o1zHjR.js +0 -33
  146. package/_baseFlatten-D4huXoEI.js +0 -92
  147. package/_baseGet-BSK_nnoz.js +0 -109
  148. package/_baseIsEqual-B5xLoweL.js +0 -238
  149. package/_baseIteratee-p6Nj07-n.js +0 -126
  150. package/_baseSlice-GAv_YFTT.js +0 -20
  151. package/_baseSum-D0WC1dN0.js +0 -13
  152. package/_baseUniq-CpupKWcL.js +0 -89
  153. package/_commonjsHelpers-CUmg6egw.js +0 -6
  154. package/_createAggregator-BpVy5xMi.js +0 -63
  155. package/_getPrototype-D1LAdQKO.js +0 -5
  156. package/_getTag-D3ToyefI.js +0 -126
  157. package/cloneDeep-CjP5k9zW.js +0 -8
  158. package/countBy-C69WslUA.js +0 -14
  159. package/debounce-bV0h5FC5.js +0 -92
  160. package/get-D3C3lEU3.js +0 -8
  161. package/groupBy-DC2oOuBN.js +0 -14
  162. package/iconify-CXMreGTg.js +0 -1782
  163. package/identity-CPGTqrE4.js +0 -6
  164. package/index-BDVjGvMI.js +0 -696
  165. package/index-BHPT3qoB.js +0 -1172
  166. package/index-BMxyILVD.js +0 -465
  167. package/index-BbPn6-Mw.js +0 -15750
  168. package/index-Dz1kF2MU.js +0 -17654
  169. package/isEmpty-BQkZubqU.js +0 -29
  170. package/isNil-CIubwp4T.js +0 -6
  171. package/isObject-FTY-5JQX.js +0 -7
  172. package/isObjectLike-OAgjjZye.js +0 -48
  173. package/isSymbol-Xd2FsJyp.js +0 -8
  174. package/last-CUCl67Im.js +0 -7
  175. package/sortBy-B-UKp4GT.js +0 -100
  176. package/sumBy-MYkDPHZL.js +0 -8
  177. package/tabs-xGuUGsJd.js +0 -254
  178. package/toFinite-Bc55msYj.js +0 -16
  179. package/toNumber-DPxy1FBy.js +0 -39
  180. package/useClueTypeConfig-CH-nGq6a.js +0 -3184
  181. package/utils-Dr4wbKBZ.js +0 -4182
@@ -0,0 +1,61 @@
1
+ import { s as I, S as x, c as S } from "./_baseIsEqual-Cpjtfb3Q.js";
2
+ import { S as g } from "./_getTag-BV_UoLYG.js";
3
+ function b() {
4
+ }
5
+ function d(n, e, i, t) {
6
+ for (var s = n.length, h = i + -1; ++h < s; )
7
+ if (e(n[h], h, n))
8
+ return h;
9
+ return -1;
10
+ }
11
+ function A(n) {
12
+ return n !== n;
13
+ }
14
+ function N(n, e, i) {
15
+ for (var t = i - 1, s = n.length; ++t < s; )
16
+ if (n[t] === e)
17
+ return t;
18
+ return -1;
19
+ }
20
+ function R(n, e, i) {
21
+ return e === e ? N(n, e, i) : d(n, A, i);
22
+ }
23
+ function v(n, e) {
24
+ var i = n == null ? 0 : n.length;
25
+ return !!i && R(n, e, 0) > -1;
26
+ }
27
+ function C(n, e, i) {
28
+ for (var t = -1, s = n == null ? 0 : n.length; ++t < s; )
29
+ if (i(e, n[t]))
30
+ return !0;
31
+ return !1;
32
+ }
33
+ var E = 1 / 0, F = g && 1 / I(new g([, -0]))[1] == E ? function(n) {
34
+ return new g(n);
35
+ } : b, O = 200;
36
+ function _(n, e, i) {
37
+ var t = -1, s = v, h = n.length, c = !0, r = [], f = r;
38
+ if (i)
39
+ c = !1, s = C;
40
+ else if (h >= O) {
41
+ var o = e ? null : F(n);
42
+ if (o)
43
+ return I(o);
44
+ c = !1, s = S, f = new x();
45
+ } else
46
+ f = e ? [] : r;
47
+ n:
48
+ for (; ++t < h; ) {
49
+ var l = n[t], u = e ? e(l) : l;
50
+ if (l = i || l !== 0 ? l : 0, c && u === u) {
51
+ for (var w = f.length; w--; )
52
+ if (f[w] === u)
53
+ continue n;
54
+ e && f.push(u), r.push(l);
55
+ } else s(f, u, i) || (f !== r && f.push(u), r.push(l));
56
+ }
57
+ return r;
58
+ }
59
+ export {
60
+ _ as b
61
+ };
@@ -0,0 +1,6 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as g
6
+ };
@@ -0,0 +1,53 @@
1
+ import { k as g } from "./_Uint8Array-DlJCtTvG.js";
2
+ import { i as h } from "./_getTag-BV_UoLYG.js";
3
+ import { b } from "./_baseIteratee-CP1bocOX.js";
4
+ import { i as o } from "./_Map-DXNg_Z-q.js";
5
+ function m(e, t, r, n) {
6
+ for (var a = -1, i = e == null ? 0 : e.length; ++a < i; ) {
7
+ var f = e[a];
8
+ t(n, f, r(f), e);
9
+ }
10
+ return n;
11
+ }
12
+ function p(e) {
13
+ return function(t, r, n) {
14
+ for (var a = -1, i = Object(t), f = n(t), u = f.length; u--; ) {
15
+ var s = f[++a];
16
+ if (r(i[s], s, i) === !1)
17
+ break;
18
+ }
19
+ return t;
20
+ };
21
+ }
22
+ var v = p();
23
+ function k(e, t) {
24
+ return e && v(e, t, g);
25
+ }
26
+ function A(e, t) {
27
+ return function(r, n) {
28
+ if (r == null)
29
+ return r;
30
+ if (!h(r))
31
+ return e(r, n);
32
+ for (var a = r.length, i = -1, f = Object(r); ++i < a && n(f[i], i, f) !== !1; )
33
+ ;
34
+ return r;
35
+ };
36
+ }
37
+ var w = A(k);
38
+ function x(e, t, r, n) {
39
+ return w(e, function(a, i, f) {
40
+ t(n, a, r(a), f);
41
+ }), n;
42
+ }
43
+ function E(e, t) {
44
+ return function(r, n) {
45
+ var a = o(r) ? m : x, i = {};
46
+ return a(r, e, b(n), i);
47
+ };
48
+ }
49
+ export {
50
+ k as a,
51
+ w as b,
52
+ E as c
53
+ };
@@ -0,0 +1,5 @@
1
+ import { o as t } from "./_getTag-BV_UoLYG.js";
2
+ var e = t(Object.getPrototypeOf, Object);
3
+ export {
4
+ e as g
5
+ };
@@ -0,0 +1,90 @@
1
+ import { g as i, a as B, t as n, M as b } from "./_Map-DXNg_Z-q.js";
2
+ import { r as c, i as T, b as u, f as C } from "./isObjectLike-BatpeCIi.js";
3
+ var f = i(c, "WeakMap"), k = 9007199254740991;
4
+ function P(r) {
5
+ return typeof r == "number" && r > -1 && r % 1 == 0 && r <= k;
6
+ }
7
+ function Pr(r) {
8
+ return r != null && P(r.length) && !B(r);
9
+ }
10
+ var V = Object.prototype;
11
+ function F(r) {
12
+ var t = r && r.constructor, a = typeof t == "function" && t.prototype || V;
13
+ return r === a;
14
+ }
15
+ var U = "[object Arguments]";
16
+ function l(r) {
17
+ return T(r) && u(r) == U;
18
+ }
19
+ var h = Object.prototype, D = h.hasOwnProperty, W = h.propertyIsEnumerable, hr = l(/* @__PURE__ */ function() {
20
+ return arguments;
21
+ }()) ? l : function(r) {
22
+ return T(r) && D.call(r, "callee") && !W.call(r, "callee");
23
+ };
24
+ function G() {
25
+ return !1;
26
+ }
27
+ var E = typeof exports == "object" && exports && !exports.nodeType && exports, m = E && typeof module == "object" && module && !module.nodeType && module, L = m && m.exports === E, v = L ? c.Buffer : void 0, N = v ? v.isBuffer : void 0, Er = N || G, q = "[object Arguments]", K = "[object Array]", R = "[object Boolean]", _ = "[object Date]", X = "[object Error]", z = "[object Function]", H = "[object Map]", J = "[object Number]", Q = "[object Object]", Y = "[object RegExp]", Z = "[object Set]", rr = "[object String]", er = "[object WeakMap]", tr = "[object ArrayBuffer]", ar = "[object DataView]", or = "[object Float32Array]", nr = "[object Float64Array]", sr = "[object Int8Array]", cr = "[object Int16Array]", ir = "[object Int32Array]", ur = "[object Uint8Array]", pr = "[object Uint8ClampedArray]", br = "[object Uint16Array]", fr = "[object Uint32Array]", e = {};
28
+ e[or] = e[nr] = e[sr] = e[cr] = e[ir] = e[ur] = e[pr] = e[br] = e[fr] = !0;
29
+ e[q] = e[K] = e[tr] = e[R] = e[ar] = e[_] = e[X] = e[z] = e[H] = e[J] = e[Q] = e[Y] = e[Z] = e[rr] = e[er] = !1;
30
+ function gr(r) {
31
+ return T(r) && P(r.length) && !!e[u(r)];
32
+ }
33
+ function yr(r) {
34
+ return function(t) {
35
+ return r(t);
36
+ };
37
+ }
38
+ var I = typeof exports == "object" && exports && !exports.nodeType && exports, s = I && typeof module == "object" && module && !module.nodeType && module, jr = s && s.exports === I, p = jr && C.process, A = function() {
39
+ try {
40
+ var r = s && s.require && s.require("util").types;
41
+ return r || p && p.binding && p.binding("util");
42
+ } catch {
43
+ }
44
+ }(), w = A && A.isTypedArray, Ir = w ? yr(w) : gr;
45
+ function Tr(r, t) {
46
+ return function(a) {
47
+ return r(t(a));
48
+ };
49
+ }
50
+ var dr = Tr(Object.keys, Object), lr = Object.prototype, mr = lr.hasOwnProperty;
51
+ function Br(r) {
52
+ if (!F(r))
53
+ return dr(r);
54
+ var t = [];
55
+ for (var a in Object(r))
56
+ mr.call(r, a) && a != "constructor" && t.push(a);
57
+ return t;
58
+ }
59
+ var g = i(c, "DataView"), y = i(c, "Promise"), j = i(c, "Set"), x = "[object Map]", vr = "[object Object]", M = "[object Promise]", S = "[object Set]", O = "[object WeakMap]", $ = "[object DataView]", Ar = n(g), wr = n(b), xr = n(y), Mr = n(j), Sr = n(f), o = u;
60
+ (g && o(new g(new ArrayBuffer(1))) != $ || b && o(new b()) != x || y && o(y.resolve()) != M || j && o(new j()) != S || f && o(new f()) != O) && (o = function(r) {
61
+ var t = u(r), a = t == vr ? r.constructor : void 0, d = a ? n(a) : "";
62
+ if (d)
63
+ switch (d) {
64
+ case Ar:
65
+ return $;
66
+ case wr:
67
+ return x;
68
+ case xr:
69
+ return M;
70
+ case Mr:
71
+ return S;
72
+ case Sr:
73
+ return O;
74
+ }
75
+ return t;
76
+ });
77
+ export {
78
+ j as S,
79
+ Er as a,
80
+ Ir as b,
81
+ hr as c,
82
+ F as d,
83
+ Br as e,
84
+ yr as f,
85
+ o as g,
86
+ P as h,
87
+ Pr as i,
88
+ A as n,
89
+ Tr as o
90
+ };
@@ -0,0 +1,8 @@
1
+ import { b as o } from "./_baseClone-BlMmRXeX.js";
2
+ var r = 1, n = 4;
3
+ function a(e) {
4
+ return o(e, r | n);
5
+ }
6
+ export {
7
+ a as c
8
+ };
@@ -1,56 +1,41 @@
1
- import { jsx, jsxs } from "react/jsx-runtime";
2
- import { I as Icon } from "../iconify-CXMreGTg.js";
3
- import { Box, Chip, Stack, Typography } from "@mui/material";
4
- import { memo, useMemo } from "react";
5
- const AnnotationBody = ({ annotation }) => {
6
- const icon = useMemo(() => {
7
- if (annotation.type === "assessment") {
8
- return ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(annotation.value) ? "healthicons:hazardous" : "fluent-mdl2:ribbon-solid";
1
+ import { jsx as r, jsxs as l } from "react/jsx-runtime";
2
+ import { I as s } from "../iconify-BBckr5AQ.js";
3
+ import { Box as c, Chip as m, Stack as u, Typography as p } from "@mui/material";
4
+ import { memo as o, useMemo as d } from "react";
5
+ const t = ({ annotation: e }) => {
6
+ const i = d(() => e.type === "assessment" ? ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(e.value) ? "healthicons:hazardous" : "fluent-mdl2:ribbon-solid" : e.type === "opinion" ? e.value === "benign" ? "mdi:shield-check" : e.value === "suspicious" ? "mdi:warning-outline" : e.value === "obscure" ? "bi:eye-slash-fill" : "mdi:warning-decagram" : null, [e.type, e.value]);
7
+ return e.type === "assessment" ? /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
8
+ m,
9
+ {
10
+ size: "small",
11
+ icon: /* @__PURE__ */ r(s, { icon: i }),
12
+ color: ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(e.value) ? "error" : "success",
13
+ label: `${e.type}: ${e.value}`,
14
+ sx: { textTransform: "capitalize" }
9
15
  }
10
- if (annotation.type === "opinion") {
11
- return annotation.value === "benign" ? "mdi:shield-check" : annotation.value === "suspicious" ? "mdi:warning-outline" : annotation.value === "obscure" ? "bi:eye-slash-fill" : "mdi:warning-decagram";
16
+ ) }) : e.type === "opinion" ? /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(
17
+ m,
18
+ {
19
+ size: "small",
20
+ icon: /* @__PURE__ */ r(s, { icon: i }),
21
+ color: {
22
+ benign: "success",
23
+ suspicious: "warning",
24
+ obscure: "error",
25
+ malicious: "error"
26
+ }[e.value],
27
+ label: `${e.type}: ${e.value}`,
28
+ sx: { textTransform: "capitalize" }
12
29
  }
13
- return null;
14
- }, [annotation.type, annotation.value]);
15
- if (annotation.type === "assessment") {
16
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
17
- Chip,
18
- {
19
- size: "small",
20
- icon: /* @__PURE__ */ jsx(Icon, { icon }),
21
- color: ["trivial", "recon", "attempt", "compromise", "mitigated"].includes(annotation.value) ? "error" : "success",
22
- label: `${annotation.type}: ${annotation.value}`,
23
- sx: { textTransform: "capitalize" }
24
- }
25
- ) });
26
- }
27
- if (annotation.type === "opinion") {
28
- return /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(
29
- Chip,
30
- {
31
- size: "small",
32
- icon: /* @__PURE__ */ jsx(Icon, { icon }),
33
- color: {
34
- benign: "success",
35
- suspicious: "warning",
36
- obscure: "error",
37
- malicious: "error"
38
- }[annotation.value],
39
- label: `${annotation.type}: ${annotation.value}`,
40
- sx: { textTransform: "capitalize" }
41
- }
42
- ) });
43
- }
44
- return /* @__PURE__ */ jsxs(Stack, { direction: "row", alignItems: "center", spacing: 0.5, children: [
45
- annotation.icon && /* @__PURE__ */ jsx(Icon, { icon: annotation.icon, style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" } }),
46
- annotation.type !== "context" && /* @__PURE__ */ jsxs(Typography, { variant: "body2", sx: { textTransform: "capitalize" }, children: [
47
- annotation.type,
30
+ ) }) : /* @__PURE__ */ l(u, { direction: "row", alignItems: "center", spacing: 0.5, children: [
31
+ e.icon && /* @__PURE__ */ r(s, { icon: e.icon, style: { filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" } }),
32
+ e.type !== "context" && /* @__PURE__ */ l(p, { variant: "body2", sx: { textTransform: "capitalize" }, children: [
33
+ e.type,
48
34
  ":"
49
35
  ] }),
50
- /* @__PURE__ */ jsx(Typography, { variant: "body2", children: annotation.value })
36
+ /* @__PURE__ */ r(p, { variant: "body2", children: e.value })
51
37
  ] });
52
- };
53
- const AnnotationBody$1 = memo(AnnotationBody);
38
+ }, v = o(t);
54
39
  export {
55
- AnnotationBody$1 as default
40
+ v as default
56
41
  };
@@ -1,55 +1,49 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Popover } from "@mui/material";
3
- import React__default, { useRef, useState, useEffect } from "react";
4
- import { A as AnnotationDetails } from "../AnnotationDetails-YAPoqw3R.js";
5
- const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest, open, onClose, ...otherProps }) => {
6
- var _a, _b, _c;
7
- const actionRef = useRef();
8
- const [ready, setReady] = useState(false);
9
- useEffect(() => {
10
- if (!open) {
11
- setReady(false);
12
- }
13
- }, [open]);
14
- return /* @__PURE__ */ jsx(
15
- Popover,
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { Popover as r } from "@mui/material";
3
+ import v, { useRef as c, useState as g, useEffect as R } from "react";
4
+ import { A as k } from "../AnnotationDetails-D5tBIeEw.js";
5
+ const S = v.memo(({ anchorEl: t, enrichRequest: u, open: o, onClose: l, ...e }) => {
6
+ var f, s, m;
7
+ const a = c(), [x, n] = g(!1);
8
+ return R(() => {
9
+ o || n(!1);
10
+ }, [o]), /* @__PURE__ */ d(
11
+ r,
16
12
  {
17
13
  anchorOrigin: { horizontal: "left", vertical: "bottom" },
18
- ...otherProps,
19
- action: actionRef,
20
- open: !!(open && ready),
21
- keepMounted: open,
22
- anchorEl,
23
- onClose,
14
+ ...e,
15
+ action: a,
16
+ open: !!(o && x),
17
+ keepMounted: o,
18
+ anchorEl: t,
19
+ onClose: l,
24
20
  slotProps: {
25
- ...otherProps.slotProps ?? {},
21
+ ...e.slotProps ?? {},
26
22
  paper: {
27
- ...((_a = otherProps.slotProps) == null ? void 0 : _a.paper) ?? {},
23
+ ...((f = e.slotProps) == null ? void 0 : f.paper) ?? {},
28
24
  sx: [
29
25
  {
30
26
  maxHeight: "min(600px, 95vh)",
31
27
  overflowY: "auto",
32
28
  maxWidth: "500px",
33
29
  width: "100%",
34
- zIndex: ((_c = (_b = anchorEl == null ? void 0 : anchorEl.computedStyleMap) == null ? void 0 : _b.call(anchorEl).get("z-index")) == null ? void 0 : _c.toString()) || 2
30
+ zIndex: ((m = (s = t == null ? void 0 : t.computedStyleMap) == null ? void 0 : s.call(t).get("z-index")) == null ? void 0 : m.toString()) || 2
35
31
  }
36
32
  ]
37
33
  }
38
34
  },
39
- onClick: (e) => {
40
- var _a2;
41
- e.preventDefault();
42
- e.stopPropagation();
43
- (_a2 = otherProps.onClick) == null ? void 0 : _a2.call(otherProps, e);
35
+ onClick: (i) => {
36
+ var p;
37
+ i.preventDefault(), i.stopPropagation(), (p = e.onClick) == null || p.call(e, i);
44
38
  },
45
- children: /* @__PURE__ */ jsx(
46
- AnnotationDetails,
39
+ children: /* @__PURE__ */ d(
40
+ k,
47
41
  {
48
- enrichRequest,
49
- setReady,
42
+ enrichRequest: u,
43
+ setReady: n,
50
44
  updatePosition: () => {
51
- var _a2;
52
- return (_a2 = actionRef.current) == null ? void 0 : _a2.updatePosition();
45
+ var i;
46
+ return (i = a.current) == null ? void 0 : i.updatePosition();
53
47
  }
54
48
  }
55
49
  )
@@ -57,5 +51,5 @@ const AnnotationDetailPopover = React__default.memo(({ anchorEl, enrichRequest,
57
51
  );
58
52
  });
59
53
  export {
60
- AnnotationDetailPopover as default
54
+ S as default
61
55
  };
@@ -1,5 +1,5 @@
1
1
  import "react/jsx-runtime";
2
- import "../iconify-CXMreGTg.js";
2
+ import "../iconify-BBckr5AQ.js";
3
3
  import "@mui/material";
4
4
  import "./display/icons/Iconified.js";
5
5
  import "../data/event.js";
@@ -9,15 +9,15 @@ import "../hooks/useAnnotations.js";
9
9
  import "../hooks/useErrors.js";
10
10
  import "../icons/iconMap.js";
11
11
  import "../utils/window.js";
12
- import "../groupBy-DC2oOuBN.js";
13
- import { A } from "../AnnotationDetails-YAPoqw3R.js";
14
- import "../ClueEnrichContext-DIn6g8tw.js";
12
+ import "../groupBy-BheQYl6f.js";
13
+ import { A as n } from "../AnnotationDetails-D5tBIeEw.js";
14
+ import "../ClueEnrichContext-DH9lqjwH.js";
15
15
  import "react";
16
- import "../index-BDVjGvMI.js";
16
+ import "../index-E7g8cRyW.js";
17
17
  import "./actions/ExecutePopover.js";
18
18
  import "./AnnotationEntry.js";
19
19
  import "./ClassificationChip.js";
20
20
  import "./enrichment/EnrichPopover.js";
21
21
  export {
22
- A as default
22
+ n as default
23
23
  };
@@ -1,54 +1,51 @@
1
- import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
- import { I as Icon } from "../iconify-CXMreGTg.js";
3
- import { Stack, Typography, Chip, IconButton } from "@mui/material";
4
- import Iconified from "./display/icons/Iconified.js";
5
- import { t as twitterShort } from "../utils-Dr4wbKBZ.js";
6
- import { memo } from "react";
7
- import AnnotationBody from "./AnnotationBody.js";
8
- import ClassificationChip from "./ClassificationChip.js";
9
- const AnnotatonEntry = ({ annotation }) => {
10
- return /* @__PURE__ */ jsxs(Stack, { direction: "column", spacing: 1, children: [
11
- /* @__PURE__ */ jsxs(Stack, { direction: "row", spacing: 1, alignItems: "center", children: [
12
- annotation.analytic_icon && /* @__PURE__ */ jsx(
13
- Icon,
14
- {
15
- style: { alignSelf: "center", filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" },
16
- icon: annotation.analytic_icon
17
- }
18
- ),
19
- /* @__PURE__ */ jsx(Typography, { variant: "body1", sx: { textTransform: "capitalize", maxWidth: "275px" }, children: annotation.analytic ?? annotation.author }),
20
- annotation.quantity > 1 && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", children: [
21
- "(x",
22
- annotation.quantity,
23
- ")"
24
- ] }),
25
- /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
26
- annotation.version && /* @__PURE__ */ jsx(
27
- Chip,
28
- {
29
- size: "small",
30
- label: /* @__PURE__ */ jsxs(Fragment, { children: [
31
- "v",
32
- annotation.version.replace(/^v/, "")
33
- ] })
34
- }
35
- ),
36
- annotation.link && /* @__PURE__ */ jsx(IconButton, { component: "a", href: annotation.link, target: "_blank", rel: "noreferrer", size: "small", children: /* @__PURE__ */ jsx(Iconified, { icon: "ic:baseline-open-in-new", fontSize: "small" }) }),
37
- annotation.classification && /* @__PURE__ */ jsx(ClassificationChip, { size: "small", classification: annotation.classification })
1
+ import { jsxs as e, jsx as i, Fragment as l } from "react/jsx-runtime";
2
+ import { I as o } from "../iconify-BBckr5AQ.js";
3
+ import { Stack as t, Typography as c, Chip as s, IconButton as a } from "@mui/material";
4
+ import n from "./display/icons/Iconified.js";
5
+ import { t as m } from "../utils-CD0rFIFU.js";
6
+ import { memo as p } from "react";
7
+ import d from "./AnnotationBody.js";
8
+ import f from "./ClassificationChip.js";
9
+ const y = ({ annotation: r }) => /* @__PURE__ */ e(t, { direction: "column", spacing: 1, children: [
10
+ /* @__PURE__ */ e(t, { direction: "row", spacing: 1, alignItems: "center", children: [
11
+ r.analytic_icon && /* @__PURE__ */ i(
12
+ o,
13
+ {
14
+ style: { alignSelf: "center", filter: "drop-shadow(0px 0px 1px rgb(0 0 0 / 0.4))" },
15
+ icon: r.analytic_icon
16
+ }
17
+ ),
18
+ /* @__PURE__ */ i(c, { variant: "body1", sx: { textTransform: "capitalize", maxWidth: "275px" }, children: r.analytic ?? r.author }),
19
+ r.quantity > 1 && /* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", children: [
20
+ "(x",
21
+ r.quantity,
22
+ ")"
38
23
  ] }),
39
- /* @__PURE__ */ jsx(AnnotationBody, { annotation }),
40
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", children: annotation.summary }),
41
- /* @__PURE__ */ jsxs(Stack, { direction: "row", children: [
42
- /* @__PURE__ */ jsx(Typography, { variant: "caption", color: "text.secondary", fontSize: "10px", children: twitterShort(annotation.timestamp) }),
43
- /* @__PURE__ */ jsx("div", { style: { flex: 1 } }),
44
- !!annotation.latency && /* @__PURE__ */ jsxs(Typography, { variant: "caption", color: "text.secondary", fontSize: "10px", children: [
45
- Math.round(annotation.latency),
46
- "ms"
47
- ] })
24
+ /* @__PURE__ */ i("div", { style: { flex: 1 } }),
25
+ r.version && /* @__PURE__ */ i(
26
+ s,
27
+ {
28
+ size: "small",
29
+ label: /* @__PURE__ */ e(l, { children: [
30
+ "v",
31
+ r.version.replace(/^v/, "")
32
+ ] })
33
+ }
34
+ ),
35
+ r.link && /* @__PURE__ */ i(a, { component: "a", href: r.link, target: "_blank", rel: "noreferrer", size: "small", children: /* @__PURE__ */ i(n, { icon: "ic:baseline-open-in-new", fontSize: "small" }) }),
36
+ r.classification && /* @__PURE__ */ i(f, { size: "small", classification: r.classification })
37
+ ] }),
38
+ /* @__PURE__ */ i(d, { annotation: r }),
39
+ /* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", children: r.summary }),
40
+ /* @__PURE__ */ e(t, { direction: "row", children: [
41
+ /* @__PURE__ */ i(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: m(r.timestamp) }),
42
+ /* @__PURE__ */ i("div", { style: { flex: 1 } }),
43
+ !!r.latency && /* @__PURE__ */ e(c, { variant: "caption", color: "text.secondary", fontSize: "10px", children: [
44
+ Math.round(r.latency),
45
+ "ms"
48
46
  ] })
49
- ] });
50
- };
51
- const AnnotationEntry = memo(AnnotatonEntry);
47
+ ] })
48
+ ] }), w = p(y);
52
49
  export {
53
- AnnotationEntry as default
50
+ w as default
54
51
  };
@@ -1,11 +1,11 @@
1
1
  import "react/jsx-runtime";
2
- import "../iconify-CXMreGTg.js";
2
+ import "../iconify-BBckr5AQ.js";
3
3
  import "@mui/material";
4
- import { A } from "../AnnotationPreview-DiQDjt9s.js";
4
+ import { A as d } from "../AnnotationPreview-CZr_CcZC.js";
5
5
  import "../hooks/useAnnotations.js";
6
- import "../utils-Dr4wbKBZ.js";
6
+ import "../utils-CD0rFIFU.js";
7
7
  import "react";
8
- import "../index-BDVjGvMI.js";
8
+ import "../index-E7g8cRyW.js";
9
9
  export {
10
- A as default
10
+ d as default
11
11
  };
@@ -1,52 +1,31 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Tooltip, Chip } from "@mui/material";
3
- import useClueConfig from "../hooks/useClueConfig.js";
4
- import { getParts, normalizedClassification } from "../utils/classificationParser.js";
5
- import React__default, { useMemo, memo } from "react";
6
- const THEME_TYPES = ["default", "primary", "secondary", "error", "info", "success", "warning"];
7
- const ClassificationChip = React__default.memo(
8
- ({ classification, ...otherProps }) => {
9
- var _a, _b;
10
- const { config } = useClueConfig();
11
- const parts = useMemo(() => {
12
- if (!config.c12nDef) {
13
- return null;
14
- }
15
- return getParts(classification, config.c12nDef, "short", true);
16
- }, [classification, config.c12nDef]);
17
- const normalized = useMemo(() => {
18
- if (!config.c12nDef || !parts) {
19
- return classification;
20
- }
21
- return normalizedClassification(parts, config.c12nDef, "short", true);
22
- }, [classification, config.c12nDef, parts]);
23
- const chipProps = useMemo(() => {
24
- var _a2, _b2, _c;
25
- const definedColor = (_c = (_b2 = config.c12nDef) == null ? void 0 : _b2.levels_styles_map[(_a2 = config.c12nDef) == null ? void 0 : _a2.levels_map[parts.lvlIdx]]) == null ? void 0 : _c.color;
26
- if (THEME_TYPES.includes(definedColor)) {
27
- return { color: definedColor };
28
- }
29
- if (definedColor) {
30
- return { sx: { color: definedColor } };
31
- }
32
- return { color: "default" };
33
- }, [(_a = config.c12nDef) == null ? void 0 : _a.levels_map, (_b = config.c12nDef) == null ? void 0 : _b.levels_styles_map, parts.lvlIdx]);
34
- return /* @__PURE__ */ jsx(Tooltip, { title: classification, children: /* @__PURE__ */ jsx(
35
- Chip,
1
+ import { jsx as u } from "react/jsx-runtime";
2
+ import { Tooltip as p, Chip as x } from "@mui/material";
3
+ import D from "../hooks/useClueConfig.js";
4
+ import { getParts as C, normalizedClassification as _ } from "../utils/classificationParser.js";
5
+ import v, { useMemo as s, memo as y } from "react";
6
+ const g = ["default", "primary", "secondary", "error", "info", "success", "warning"], A = v.memo(
7
+ ({ classification: r, ...n }) => {
8
+ var i, f;
9
+ const { config: e } = D(), t = s(() => e.c12nDef ? C(r, e.c12nDef, "short", !0) : null, [r, e.c12nDef]), d = s(() => !e.c12nDef || !t ? r : _(t, e.c12nDef, "short", !0), [r, e.c12nDef, t]), o = s(() => {
10
+ var c, a, m;
11
+ const l = (m = (a = e.c12nDef) == null ? void 0 : a.levels_styles_map[(c = e.c12nDef) == null ? void 0 : c.levels_map[t.lvlIdx]]) == null ? void 0 : m.color;
12
+ return g.includes(l) ? { color: l } : l ? { sx: { color: l } } : { color: "default" };
13
+ }, [(i = e.c12nDef) == null ? void 0 : i.levels_map, (f = e.c12nDef) == null ? void 0 : f.levels_styles_map, t.lvlIdx]);
14
+ return /* @__PURE__ */ u(p, { title: r, children: /* @__PURE__ */ u(
15
+ x,
36
16
  {
37
- variant: otherProps.variant || "outlined",
38
- label: normalized,
39
- ...chipProps,
40
- ...otherProps,
17
+ variant: n.variant || "outlined",
18
+ label: d,
19
+ ...o,
20
+ ...n,
41
21
  sx: [
42
- ...Array.isArray(chipProps.sx) ? chipProps.sx : [chipProps.sx],
43
- ...Array.isArray(otherProps.sx) ? otherProps.sx : [otherProps.sx]
22
+ ...Array.isArray(o.sx) ? o.sx : [o.sx],
23
+ ...Array.isArray(n.sx) ? n.sx : [n.sx]
44
24
  ]
45
25
  }
46
26
  ) });
47
27
  }
48
- );
49
- const ClassificationChip$1 = memo(ClassificationChip);
28
+ ), M = y(A);
50
29
  export {
51
- ClassificationChip$1 as default
30
+ M as default
52
31
  };