@cccsaurora/clue-ui 1.4.0 → 1.5.0-dev.449
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/ActionForm-CbLz66Rk.js +6099 -0
- package/AnnotationDetails-CdNvyJl7.js +176 -0
- package/AnnotationPreview-C6a3qRFG.js +188 -0
- package/ClueEnrichContext-0eVIgvZp.js +594 -0
- package/FlexOne-BSYAhhtG.js +9 -0
- package/_MapCache-kuEY_iOH.js +220 -0
- package/_Set-BrSMTlHn.js +6 -0
- package/_Uint8Array-OPpgYQj7.js +123 -0
- package/_arrayIncludes-BNqL-9ZP.js +31 -0
- package/_arrayPush-CBkQqaE_.js +10 -0
- package/_baseAssignValue-CNUVPOBW.js +16 -0
- package/_baseClone-9FaRd1R2.js +287 -0
- package/_baseExtremum-wOGT4Dgw.js +18 -0
- package/_baseFlatten-Co6QHDlG.js +92 -0
- package/_baseGet-Cmp6FztG.js +109 -0
- package/_baseGetTag-Hj-0NTYF.js +44 -0
- package/_baseIsEqual-1CpU47TZ.js +211 -0
- package/_baseIteratee-BN7Vbe5g.js +126 -0
- package/_baseRest-BZ_hQ9PC.js +8 -0
- package/_baseSlice-GAv_YFTT.js +20 -0
- package/_baseSum-D0WC1dN0.js +13 -0
- package/_baseUniq-BnvS3JHL.js +63 -0
- package/_cacheHas-_aF2y2Xv.js +25 -0
- package/_commonjsHelpers-CUmg6egw.js +6 -0
- package/_createAggregator-BUZrP_is.js +63 -0
- package/_defineProperty-DolZLKmv.js +12 -0
- package/_getPrototype-Bb4gm-5m.js +5 -0
- package/_getTag-CML_cXiN.js +105 -0
- package/_isIterateeCall-B1IFEqVv.js +17 -0
- package/_setToArray-CqyqC8ib.js +10 -0
- package/cloneDeep-l3UkXG5M.js +8 -0
- package/components/AnnotationBody.js +49 -35
- package/components/AnnotationDetailPopover.js +39 -30
- package/components/AnnotationDetails.js +7 -7
- package/components/AnnotationEntry.js +35 -35
- package/components/AnnotationPreview.js +5 -5
- package/components/ClassificationChip.js +44 -23
- package/components/CountBadge.js +31 -26
- package/components/EnrichedCard.js +110 -97
- package/components/EnrichedChip.js +130 -105
- package/components/EnrichedTypography.js +133 -107
- package/components/ErrorBoundary.js +28 -24
- package/components/RetryFailedEnrichments.js +10 -9
- package/components/SourcePicker.js +57 -49
- package/components/actions/ActionForm.js +4 -4
- package/components/actions/ExecutePopover.js +75 -59
- package/components/actions/ResultModal.js +4 -4
- package/components/actions/form/schemaAdapter.js +39 -23
- package/components/actions/formats/FileResult.js +86 -59
- package/components/actions/formats/index.js +29 -25
- package/components/display/graph/ExpandMoreButton.js +10 -10
- package/components/display/graph/elements/NodeCard.js +111 -91
- package/components/display/graph/elements/NodeTag.js +15 -13
- package/components/display/graph/index.js +261 -202
- package/components/display/graph/visualizations/Leaf.js +89 -70
- package/components/display/graph/visualizations/cloud/index.js +98 -81
- package/components/display/graph/visualizations/icons/BaseIcon.js +26 -21
- package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
- package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
- package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
- package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
- package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
- package/components/display/graph/visualizations/icons/index.js +14 -13
- package/components/display/graph/visualizations/panels/NodePanel.js +10 -8
- package/components/display/graph/visualizations/tree/BundleLine.js +108 -81
- package/components/display/graph/visualizations/tree/Triangle.js +13 -13
- package/components/display/graph/visualizations/tree/index.js +408 -306
- package/components/display/icons/Iconified.js +27 -12
- package/components/display/json/index.js +4 -4
- package/components/display/markdown/index.js +8678 -5770
- package/components/enrichment/EnrichPopover.js +54 -46
- package/components/fetchers/Fetcher.js +166 -123
- package/components/fetchers/FetcherResultView.js +31 -27
- package/components/fetchers/PreviewModal.js +17 -16
- package/components/fetchers/StatusChip.js +21 -17
- package/components/group/Entry.js +13 -11
- package/components/group/Group.js +13 -10
- package/components/group/GroupControl.js +76 -65
- package/components/stats/QueryStatus.js +45 -32
- package/countBy-Bqcp3VCs.js +14 -0
- package/data/event.js +6 -4
- package/database/globals.js +2 -2
- package/database/index.js +3 -3
- package/database/replication.js +4 -4
- package/get-CdMThM8x.js +8 -0
- package/groupBy-BVV07EGQ.js +14 -0
- package/hooks/ClueActionContext.js +6 -6
- package/hooks/ClueComponentContext.js +29 -23
- package/hooks/ClueConfigProvider.js +14 -12
- package/hooks/ClueDatabaseContext.js +35 -23
- package/hooks/ClueEnrichContext.js +11 -11
- package/hooks/ClueFetcherContext.js +83 -56
- package/hooks/ClueGroupContext.js +17 -14
- package/hooks/CluePopupContext.js +5 -5
- package/hooks/ClueProvider.js +13 -11
- package/hooks/ClueUIPluginContext.js +49 -35
- package/hooks/selectors.js +7 -7
- package/hooks/useActionResult.js +3 -3
- package/hooks/useAnnotations.js +48 -32
- package/hooks/useClue.js +6 -4
- package/hooks/useClueActions.js +3 -3
- package/hooks/useClueConfig.js +6 -4
- package/hooks/useClueTypeConfig.js +49 -24
- package/hooks/useClueUIPlugins.js +8 -7
- package/hooks/useComparator.js +722 -435
- package/hooks/useErrors.js +22 -18
- package/hooks/useFetcherResult.js +33 -24
- package/hooks/useMyHighlights.js +66 -36
- package/hooks/useMyLocalStorage.js +66 -37
- package/iconify-DJxl6dC-.js +1789 -0
- package/icons/Action.js +66 -49
- package/icons/Assessment.js +85 -69
- package/icons/Context.js +77 -63
- package/icons/Opinion.js +76 -60
- package/icons/iconMap.js +2 -2
- package/identity-CPGTqrE4.js +6 -0
- package/index-CDrC9oSE.js +1172 -0
- package/index-CVUD9o3t.js +15768 -0
- package/index-DUEubgWN.js +464 -0
- package/index-DpJxD74E.js +3272 -0
- package/index-IKI1G5v-.js +9314 -0
- package/index-_gpzM2Px.js +702 -0
- package/isArguments-CuYlEuhP.js +27 -0
- package/isArray-RJPfgWqI.js +4 -0
- package/isEmpty-BE656RUK.js +30 -0
- package/isNil-CIubwp4T.js +6 -0
- package/isObject-FTY-5JQX.js +7 -0
- package/isObjectLike-CeENW9FN.js +6 -0
- package/isSymbol-D_H4HPZQ.js +9 -0
- package/last-CUCl67Im.js +7 -0
- package/main.js +62 -62
- package/maxBy-BjjQmX5t.js +8 -0
- package/package.json +1 -1
- package/plugins/ClueUIPlugin.js +163 -96
- package/plugins/file/index.js +15 -15
- package/plugins/graph/index.js +29 -26
- package/plugins/image/index.js +28 -24
- package/plugins/json/index.js +21 -21
- package/plugins/markdown/index.js +18 -18
- package/plugins/registry.js +6 -6
- package/plugins/store.js +4 -4
- package/plugins/test/index.js +17 -17
- package/plugins/utils.js +13 -12
- package/replication-kdsH0l7f.js +11779 -0
- package/sessionStorage-B68y-wnE.js +140 -0
- package/sortBy-B8JVsLQY.js +95 -0
- package/store-9Bv4xoVU.js +2165 -0
- package/sumBy-D-HCzM2i.js +8 -0
- package/text/Frequency.js +42 -23
- package/toFinite-meZTg4Su.js +16 -0
- package/toNumber-B5JaA1vX.js +39 -0
- package/uniq-CahZPAwp.js +7 -0
- package/utils/chain.js +92 -65
- package/utils/classificationParser.js +519 -256
- package/utils/constants.js +37 -11
- package/utils/graph.js +72 -45
- package/utils/hashUtil.js +7 -7
- package/utils/line.js +131 -81
- package/utils/loggerUtil.js +5 -3
- package/utils/sessionStorage.js +7 -7
- package/utils/time.js +447 -427
- package/utils/utils.js +10 -10
- package/utils/window.js +21 -10
- package/utils-CEySTPtg.js +224 -0
- package/ActionForm-DjyNwVzM.js +0 -4403
- package/AnnotationDetails-BvPv3_pR.js +0 -160
- package/AnnotationPreview-C0JN_lr0.js +0 -140
- package/ClueEnrichContext-CNbh-qiy.js +0 -452
- package/FlexOne-BXWFOd1T.js +0 -6
- package/_MapCache-DRK-s2eK.js +0 -179
- package/_Set-DrS_bbSV.js +0 -6
- package/_Uint8Array-D9R2N9Lp.js +0 -98
- package/_arrayIncludes-Dcl_29E6.js +0 -25
- package/_arrayPush-DBJIuK2V.js +0 -8
- package/_baseAssignValue-Bx1cxHj5.js +0 -12
- package/_baseClone-DRhywkxm.js +0 -211
- package/_baseExtremum-DodEaEyF.js +0 -16
- package/_baseFlatten-CD9NgrYE.js +0 -72
- package/_baseGet-bVwDaGrA.js +0 -80
- package/_baseGetTag-CxDaTem-.js +0 -25
- package/_baseIsEqual-C-FKsm1J.js +0 -150
- package/_baseIteratee-D0FhC5bC.js +0 -95
- package/_baseRest-D_eW2E0d.js +0 -8
- package/_baseSlice-M5RKzt1A.js +0 -10
- package/_baseSum-wEbgNeUs.js +0 -10
- package/_baseUniq-D3N8igOm.js +0 -41
- package/_cacheHas-Wgl-hw34.js +0 -22
- package/_commonjsHelpers-C6fGbg64.js +0 -6
- package/_createAggregator-BVj8IAuF.js +0 -53
- package/_defineProperty-BZU4WKA3.js +0 -11
- package/_getPrototype-BGBCg-aX.js +0 -5
- package/_getTag-B7R9qBo7.js +0 -73
- package/_isIterateeCall-Dm0VTAYy.js +0 -13
- package/_setToArray-Ck4YZu0Z.js +0 -9
- package/cloneDeep-fV59zwUf.js +0 -8
- package/countBy-B3rNuG4T.js +0 -8
- package/get-Bil3mzRD.js +0 -8
- package/groupBy-CrJC7sGa.js +0 -8
- package/iconify-Ptb5dTKy.js +0 -1270
- package/identity-ByMq8VxU.js +0 -6
- package/index-BH-gBhtO.js +0 -2282
- package/index-BM9Sve5T.js +0 -571
- package/index-Cj4d5cGz.js +0 -357
- package/index-D3Dwn-8x.js +0 -6464
- package/index-Dh2PP9h8.js +0 -11747
- package/index-DoFpWPHo.js +0 -975
- package/isArguments-BWcXOE6a.js +0 -24
- package/isArray-WzO_os3q.js +0 -4
- package/isEmpty-DKxrY-_M.js +0 -22
- package/isNil-CjWwlQS3.js +0 -6
- package/isObject-B53jY8Qg.js +0 -7
- package/isObjectLike-CYbdrIBr.js +0 -6
- package/isSymbol-DE1Kcy2M.js +0 -9
- package/last-7CdUxN0r.js +0 -7
- package/maxBy-BOWDkL_D.js +0 -8
- package/replication-WkKbPdwG.js +0 -8453
- package/sessionStorage-DFMae61b.js +0 -90
- package/sortBy-BHe812lF.js +0 -74
- package/store-DClHBq7r.js +0 -1169
- package/sumBy-B7f_bP_k.js +0 -8
- package/toFinite-CBrE65MP.js +0 -14
- package/toNumber-CxmWey0f.js +0 -31
- package/uniq-B4UZ671_.js +0 -7
- package/utils-SpTOhPYl.js +0 -147
|
@@ -1,452 +0,0 @@
|
|
|
1
|
-
import { jsx as Ct } from "react/jsx-runtime";
|
|
2
|
-
import { a as Ot } from "./iconify-Ptb5dTKy.js";
|
|
3
|
-
import { a as $t, p as ft } from "./index-BH-gBhtO.js";
|
|
4
|
-
import { REPLICATORS as F } from "./database/globals.js";
|
|
5
|
-
import { clueDebugLogger as G } from "./utils/loggerUtil.js";
|
|
6
|
-
import { c as H } from "./utils-SpTOhPYl.js";
|
|
7
|
-
import { b as gt } from "./_baseSlice-M5RKzt1A.js";
|
|
8
|
-
import { t as jt } from "./toFinite-CBrE65MP.js";
|
|
9
|
-
import { d as Pt } from "./sessionStorage-DFMae61b.js";
|
|
10
|
-
import { g as dt } from "./groupBy-CrJC7sGa.js";
|
|
11
|
-
import { u as pt } from "./uniq-B4UZ671_.js";
|
|
12
|
-
import { b as Mt } from "./_baseIteratee-D0FhC5bC.js";
|
|
13
|
-
import { b as Rt } from "./_baseUniq-D3N8igOm.js";
|
|
14
|
-
import { useContext as qt, useState as S, useMemo as K, useCallback as g, useRef as At, useEffect as j } from "react";
|
|
15
|
-
import { c as St } from "./index-BM9Sve5T.js";
|
|
16
|
-
import { ClueDatabaseContext as Bt } from "./hooks/ClueDatabaseContext.js";
|
|
17
|
-
import bt from "./hooks/useClueConfig.js";
|
|
18
|
-
import Vt from "./hooks/useClueTypeConfig.js";
|
|
19
|
-
import { i as Ut } from "./isEmpty-DKxrY-_M.js";
|
|
20
|
-
function Wt(n) {
|
|
21
|
-
var r = jt(n), m = r % 1;
|
|
22
|
-
return r === r ? m ? r - m : r : 0;
|
|
23
|
-
}
|
|
24
|
-
var Ft = Math.ceil, Ht = Math.max;
|
|
25
|
-
function Jt(n, r, m) {
|
|
26
|
-
r === void 0 ? r = 1 : r = Ht(Wt(r), 0);
|
|
27
|
-
var u = n == null ? 0 : n.length;
|
|
28
|
-
if (!u || r < 1)
|
|
29
|
-
return [];
|
|
30
|
-
for (var y = 0, D = 0, P = Array(Ft(u / r)); y < u; )
|
|
31
|
-
P[D++] = gt(n, y, y += r);
|
|
32
|
-
return P;
|
|
33
|
-
}
|
|
34
|
-
function Qt(n, r) {
|
|
35
|
-
return n && n.length ? Rt(n, Mt(r)) : [];
|
|
36
|
-
}
|
|
37
|
-
let J;
|
|
38
|
-
const _t = new Uint8Array(16);
|
|
39
|
-
function Gt() {
|
|
40
|
-
if (!J && (J = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !J))
|
|
41
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
42
|
-
return J(_t);
|
|
43
|
-
}
|
|
44
|
-
const p = [];
|
|
45
|
-
for (let n = 0; n < 256; ++n)
|
|
46
|
-
p.push((n + 256).toString(16).slice(1));
|
|
47
|
-
function Kt(n, r = 0) {
|
|
48
|
-
return p[n[r + 0]] + p[n[r + 1]] + p[n[r + 2]] + p[n[r + 3]] + "-" + p[n[r + 4]] + p[n[r + 5]] + "-" + p[n[r + 6]] + p[n[r + 7]] + "-" + p[n[r + 8]] + p[n[r + 9]] + "-" + p[n[r + 10]] + p[n[r + 11]] + p[n[r + 12]] + p[n[r + 13]] + p[n[r + 14]] + p[n[r + 15]];
|
|
49
|
-
}
|
|
50
|
-
const Xt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), mt = {
|
|
51
|
-
randomUUID: Xt
|
|
52
|
-
};
|
|
53
|
-
function X(n, r, m) {
|
|
54
|
-
if (mt.randomUUID && !n)
|
|
55
|
-
return mt.randomUUID();
|
|
56
|
-
n = n || {};
|
|
57
|
-
const u = n.random || (n.rng || Gt)();
|
|
58
|
-
return u[6] = u[6] & 15 | 64, u[8] = u[8] & 63 | 128, Kt(u);
|
|
59
|
-
}
|
|
60
|
-
const Yt = St(null), pe = ({
|
|
61
|
-
children: n,
|
|
62
|
-
classification: r,
|
|
63
|
-
baseURL: m,
|
|
64
|
-
getToken: u,
|
|
65
|
-
onNetworkCall: y,
|
|
66
|
-
pickSources: D,
|
|
67
|
-
chunkSize: P = 15,
|
|
68
|
-
maxRequestCount: Q = 4,
|
|
69
|
-
defaultTimeout: B = 5,
|
|
70
|
-
enabled: M = !0,
|
|
71
|
-
ready: yt = !1,
|
|
72
|
-
publicIconify: Y = !0,
|
|
73
|
-
skipConfigCall: Z = !1,
|
|
74
|
-
customIconify: b,
|
|
75
|
-
debugLogging: C = !0
|
|
76
|
-
}) => {
|
|
77
|
-
var ot, ct, at, ut, lt;
|
|
78
|
-
const $ = bt(), t = qt(Bt), [z, ht] = S(null), E = K(
|
|
79
|
-
() => {
|
|
80
|
-
var e, s;
|
|
81
|
-
return z ?? r ?? ((s = (e = $.config) == null ? void 0 : e.c12nDef) == null ? void 0 : s.RESTRICTED);
|
|
82
|
-
},
|
|
83
|
-
[r, (ct = (ot = $.config) == null ? void 0 : ot.c12nDef) == null ? void 0 : ct.RESTRICTED, z]
|
|
84
|
-
), N = g(
|
|
85
|
-
(e) => {
|
|
86
|
-
var s;
|
|
87
|
-
return ht(e((s = $.config) == null ? void 0 : s.c12nDef));
|
|
88
|
-
},
|
|
89
|
-
[(at = $.config) == null ? void 0 : at.c12nDef]
|
|
90
|
-
), [x, wt] = S(yt), R = At(0), [O, vt] = S([]), { availableSources: q, typesDetection: V, supportedTypes: T } = Vt(
|
|
91
|
-
M && x,
|
|
92
|
-
m,
|
|
93
|
-
C,
|
|
94
|
-
u,
|
|
95
|
-
y
|
|
96
|
-
);
|
|
97
|
-
j(() => {
|
|
98
|
-
if (Z || !M || !x)
|
|
99
|
-
return;
|
|
100
|
-
const e = {}, s = u == null ? void 0 : u();
|
|
101
|
-
s && (e.Authorization = `Bearer ${s}`);
|
|
102
|
-
let c = { baseURL: m, headers: e };
|
|
103
|
-
y && (c = y(c)), $t.configs.get(c).then($.setConfig);
|
|
104
|
-
}, [m, y, Z, x]);
|
|
105
|
-
const [L, k] = S(() => {
|
|
106
|
-
var e;
|
|
107
|
-
return !!((e = t == null ? void 0 : t.selectors) != null && e.synced);
|
|
108
|
-
});
|
|
109
|
-
j(() => {
|
|
110
|
-
var e;
|
|
111
|
-
k(!!((e = t == null ? void 0 : t.selectors) != null && e.synced));
|
|
112
|
-
}, [t]), j(() => {
|
|
113
|
-
if (x) {
|
|
114
|
-
const e = Object.values(F).map((s) => (s.reSync(), s.start(), s.active$.subscribe((c) => {
|
|
115
|
-
var i;
|
|
116
|
-
c || k(!!((i = t == null ? void 0 : t.selectors) != null && i.synced));
|
|
117
|
-
})));
|
|
118
|
-
return () => {
|
|
119
|
-
e.forEach((s) => s.unsubscribe()), Object.values(F).forEach((s) => {
|
|
120
|
-
s.pause();
|
|
121
|
-
});
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
return () => {
|
|
125
|
-
Object.values(F).forEach((e) => {
|
|
126
|
-
e.pause();
|
|
127
|
-
});
|
|
128
|
-
};
|
|
129
|
-
}, [t, x]);
|
|
130
|
-
const [tt, et] = S(b);
|
|
131
|
-
j(() => {
|
|
132
|
-
b && et(b);
|
|
133
|
-
}, [b]), j(() => {
|
|
134
|
-
if (Y)
|
|
135
|
-
return;
|
|
136
|
-
let e = tt ?? void 0 ?? (m == null ? void 0 : m.replace(/^[^.]+/, "icons"));
|
|
137
|
-
!e && typeof window < "u" && window && !window.location.origin.includes("localhost") && (e = window.location.protocol + "//" + window.location.origin.replace(/^[^.]+/, "icons")), e && (G(`Using ${e} for iconify`, C), Ot("", {
|
|
138
|
-
resources: [e]
|
|
139
|
-
}));
|
|
140
|
-
}, [m, tt, C, Y]);
|
|
141
|
-
const U = g(
|
|
142
|
-
async (e) => {
|
|
143
|
-
const s = [];
|
|
144
|
-
for (const i of e) {
|
|
145
|
-
const { latency: a, source: l, type: o, value: h, items: f, error: w } = i;
|
|
146
|
-
await t.selectors.find({ selector: { type: o, value: h, source: l } }).incrementalRemove(), w && s.push({
|
|
147
|
-
id: X(),
|
|
148
|
-
source: l,
|
|
149
|
-
type: o,
|
|
150
|
-
value: h,
|
|
151
|
-
annotations: [],
|
|
152
|
-
classification: E,
|
|
153
|
-
latency: a,
|
|
154
|
-
count: 0,
|
|
155
|
-
error: w
|
|
156
|
-
});
|
|
157
|
-
for (const d of f) {
|
|
158
|
-
const { classification: v, count: I, link: xt, annotations: Dt } = d, _ = {
|
|
159
|
-
id: X(),
|
|
160
|
-
source: l,
|
|
161
|
-
type: o,
|
|
162
|
-
value: h,
|
|
163
|
-
annotations: Dt,
|
|
164
|
-
classification: v,
|
|
165
|
-
latency: a,
|
|
166
|
-
count: I,
|
|
167
|
-
link: xt,
|
|
168
|
-
error: w
|
|
169
|
-
};
|
|
170
|
-
s.some((It) => It.id === _.id) && (_.id = X()), s.push(_);
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
const c = await t.selectors.bulkInsert(s);
|
|
174
|
-
c.error.length > 0 && (console.warn("Errors on upsert:"), c.error.forEach((i) => console.warn(i.documentId, i.validationErrors ?? i.status)));
|
|
175
|
-
},
|
|
176
|
-
[t, E]
|
|
177
|
-
), st = g(
|
|
178
|
-
async (e, s, c = {}) => {
|
|
179
|
-
var d;
|
|
180
|
-
if (!e || !s)
|
|
181
|
-
return console.error(`Type (${e}) or value (${s}) is empty, returning empty response`), {};
|
|
182
|
-
const i = (D == null ? void 0 : D(O, q, [{ type: e, value: s, classification: c.classification }])) ?? O, a = {
|
|
183
|
-
timeout: B,
|
|
184
|
-
force: !1,
|
|
185
|
-
includeRaw: !1,
|
|
186
|
-
noCache: !1,
|
|
187
|
-
classification: E,
|
|
188
|
-
sources: i,
|
|
189
|
-
...c
|
|
190
|
-
}, l = {}, o = u == null ? void 0 : u();
|
|
191
|
-
o && (l.Authorization = `Bearer ${o}`);
|
|
192
|
-
let h = { baseURL: m, headers: l };
|
|
193
|
-
y && (h = y(h));
|
|
194
|
-
const f = {
|
|
195
|
-
type: e,
|
|
196
|
-
value: s,
|
|
197
|
-
classification: a.classification
|
|
198
|
-
};
|
|
199
|
-
let w = await t.status.findOne({ selector: { ...f } }).exec();
|
|
200
|
-
w ? await w.incrementalPatch({ status: "in-progress" }) : w = await ((d = t.status) == null ? void 0 : d.insert({
|
|
201
|
-
id: await H(f.type, f.value, f.classification ?? E),
|
|
202
|
-
type: f.type,
|
|
203
|
-
value: f.value,
|
|
204
|
-
classification: f.classification ?? E,
|
|
205
|
-
status: "in-progress"
|
|
206
|
-
}));
|
|
207
|
-
try {
|
|
208
|
-
const v = await ft([f], a.sources, a, h), I = Object.values(Object.values(v)[0])[0];
|
|
209
|
-
return await U(Object.values(I)), I;
|
|
210
|
-
} catch (v) {
|
|
211
|
-
return console.error(v), {};
|
|
212
|
-
} finally {
|
|
213
|
-
await (w == null ? void 0 : w.incrementalPatch({ status: "complete" }));
|
|
214
|
-
}
|
|
215
|
-
},
|
|
216
|
-
[
|
|
217
|
-
U,
|
|
218
|
-
q,
|
|
219
|
-
m,
|
|
220
|
-
t,
|
|
221
|
-
E,
|
|
222
|
-
B,
|
|
223
|
-
u,
|
|
224
|
-
y,
|
|
225
|
-
D,
|
|
226
|
-
O
|
|
227
|
-
]
|
|
228
|
-
), W = g(
|
|
229
|
-
async (e, s) => {
|
|
230
|
-
var f, w;
|
|
231
|
-
const c = (D == null ? void 0 : D(O, q, e)) ?? O, i = {
|
|
232
|
-
timeout: B,
|
|
233
|
-
includeRaw: !1,
|
|
234
|
-
noCache: !1,
|
|
235
|
-
classification: E,
|
|
236
|
-
sources: c,
|
|
237
|
-
...s
|
|
238
|
-
}, a = {}, l = u == null ? void 0 : u();
|
|
239
|
-
l && (a.Authorization = `Bearer ${l}`);
|
|
240
|
-
let o = { baseURL: m, headers: a };
|
|
241
|
-
y && (o = y(o));
|
|
242
|
-
const h = [];
|
|
243
|
-
for (const d of e) {
|
|
244
|
-
const v = { type: d.type, value: d.value, classification: i.classification };
|
|
245
|
-
let I = await ((f = t.status) == null ? void 0 : f.findOne({
|
|
246
|
-
selector: v
|
|
247
|
-
}).incrementalPatch({
|
|
248
|
-
status: "in-progress"
|
|
249
|
-
}));
|
|
250
|
-
I || (I = await ((w = t.status) == null ? void 0 : w.insert({
|
|
251
|
-
id: await H(v.type, v.value, v.classification),
|
|
252
|
-
...v,
|
|
253
|
-
status: "in-progress",
|
|
254
|
-
sources: i.sources
|
|
255
|
-
}))), I && h.push(I.toMutableJSON());
|
|
256
|
-
}
|
|
257
|
-
try {
|
|
258
|
-
const d = await ft(e, i.sources, i, o), v = Object.values(d).flatMap(Object.values).flatMap(Object.values);
|
|
259
|
-
return await U(v), d;
|
|
260
|
-
} catch (d) {
|
|
261
|
-
return console.error(d), {};
|
|
262
|
-
} finally {
|
|
263
|
-
t.status.bulkUpsert(
|
|
264
|
-
Qt(h, (d) => d.id).map((d) => (d.status = "complete", d))
|
|
265
|
-
);
|
|
266
|
-
}
|
|
267
|
-
},
|
|
268
|
-
[
|
|
269
|
-
D,
|
|
270
|
-
O,
|
|
271
|
-
q,
|
|
272
|
-
B,
|
|
273
|
-
E,
|
|
274
|
-
u,
|
|
275
|
-
m,
|
|
276
|
-
y,
|
|
277
|
-
t,
|
|
278
|
-
U
|
|
279
|
-
]
|
|
280
|
-
), A = K(
|
|
281
|
-
() => Pt(
|
|
282
|
-
async () => {
|
|
283
|
-
if (t != null && t.status) {
|
|
284
|
-
if (t.status.closed) {
|
|
285
|
-
console.warn("Status database is closed, will not enrich");
|
|
286
|
-
return;
|
|
287
|
-
}
|
|
288
|
-
} else return;
|
|
289
|
-
const e = await t.status.find({ selector: { status: "pending" } }).update({ $set: { status: "in-progress" } });
|
|
290
|
-
if (e.length < 1)
|
|
291
|
-
return;
|
|
292
|
-
const s = Jt(e, P);
|
|
293
|
-
G(
|
|
294
|
-
`Enriching ${e.length} selectors in ${s.length} chunks of ${P}.`,
|
|
295
|
-
C
|
|
296
|
-
), await Promise.all(
|
|
297
|
-
// For performance reasons, we chunk the requests. This will allow us to take advantage of parellelization in the
|
|
298
|
-
// backend, both on the pod level and kubernetes level
|
|
299
|
-
s.map(async (c) => {
|
|
300
|
-
let i = null;
|
|
301
|
-
if (R.current <= Q)
|
|
302
|
-
R.current += 1;
|
|
303
|
-
else {
|
|
304
|
-
let a = Date.now();
|
|
305
|
-
await new Promise((l) => {
|
|
306
|
-
i = setInterval(() => {
|
|
307
|
-
G(
|
|
308
|
-
`Waiting on ${R.current} existing requests to complete (total delay: ${Date.now() - a}ms)`,
|
|
309
|
-
C
|
|
310
|
-
), R.current < Q && l();
|
|
311
|
-
}, 400);
|
|
312
|
-
}).finally(() => {
|
|
313
|
-
R.current += 1, clearInterval(i);
|
|
314
|
-
});
|
|
315
|
-
}
|
|
316
|
-
try {
|
|
317
|
-
const a = {}, l = pt(c.flatMap((o) => o.sources ?? []));
|
|
318
|
-
l.length > 0 && (a.sources = l), await W(
|
|
319
|
-
c.map((o) => o.toSelector()),
|
|
320
|
-
a
|
|
321
|
-
), await t.status.findByIds(c.map((o) => o.id)).update({ $set: { status: "complete" } });
|
|
322
|
-
} catch (a) {
|
|
323
|
-
console.error(a);
|
|
324
|
-
} finally {
|
|
325
|
-
R.current -= 1, i && clearInterval(i);
|
|
326
|
-
}
|
|
327
|
-
})
|
|
328
|
-
);
|
|
329
|
-
},
|
|
330
|
-
200,
|
|
331
|
-
{ maxWait: 500, leading: !1 }
|
|
332
|
-
),
|
|
333
|
-
[W, P, t, C, Q]
|
|
334
|
-
);
|
|
335
|
-
j(() => {
|
|
336
|
-
}, [t, C]), j(() => {
|
|
337
|
-
if (!M || !x || !(t != null && t.status))
|
|
338
|
-
return;
|
|
339
|
-
if (t != null && t.status.closed) {
|
|
340
|
-
console.warn("Status collection is closed");
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
const e = t.status.find({
|
|
344
|
-
selector: {
|
|
345
|
-
status: "pending"
|
|
346
|
-
}
|
|
347
|
-
}).$.subscribe(() => A());
|
|
348
|
-
return () => {
|
|
349
|
-
try {
|
|
350
|
-
e == null || e.unsubscribe(), A.cancel();
|
|
351
|
-
} catch (s) {
|
|
352
|
-
console.warn(s);
|
|
353
|
-
}
|
|
354
|
-
};
|
|
355
|
-
}, [M, x, t, C, A, (ut = t == null ? void 0 : t.status) == null ? void 0 : ut.closed]);
|
|
356
|
-
const nt = g(
|
|
357
|
-
async (e, s, c) => {
|
|
358
|
-
var l, o;
|
|
359
|
-
if (!e)
|
|
360
|
-
throw new Error("Type cannot be null");
|
|
361
|
-
if (!s)
|
|
362
|
-
throw new Error("Value cannot be null");
|
|
363
|
-
if (!t.status || t.status.closed) {
|
|
364
|
-
console.warn("status collection is closed");
|
|
365
|
-
return;
|
|
366
|
-
}
|
|
367
|
-
const i = { type: e, value: s, classification: c ?? E };
|
|
368
|
-
let a = await ((l = t.status) == null ? void 0 : l.findOne({
|
|
369
|
-
selector: i
|
|
370
|
-
}).exec());
|
|
371
|
-
return a || (a = await ((o = t.status) == null ? void 0 : o.queueInsert({
|
|
372
|
-
id: await H(i.type, i.value, i.classification),
|
|
373
|
-
...i,
|
|
374
|
-
status: "pending"
|
|
375
|
-
}))), a;
|
|
376
|
-
},
|
|
377
|
-
[E, t]
|
|
378
|
-
), rt = g(async () => {
|
|
379
|
-
if (!(t != null && t.selectors) || t.selectors.closed)
|
|
380
|
-
return;
|
|
381
|
-
const e = await t.selectors.find({ selector: { error: { $exists: !0 } } }).exec(), s = dt(e, "classification"), c = [];
|
|
382
|
-
for (const [i, a] of Object.entries(s)) {
|
|
383
|
-
const l = dt(a, (o) => `${o.type}:${o.value}`);
|
|
384
|
-
for (const o of Object.values(l))
|
|
385
|
-
c.push({
|
|
386
|
-
id: await H(o[0].type, o[0].value, i),
|
|
387
|
-
type: o[0].type,
|
|
388
|
-
value: o[0].value,
|
|
389
|
-
classification: i,
|
|
390
|
-
sources: pt(o.map((h) => h.source)).sort(),
|
|
391
|
-
status: "pending"
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
c.length > 0 && (await t.status.bulkInsert(c), M && x && A()), await t.selectors.bulkRemove(e);
|
|
395
|
-
}, [t, M, A, x]), it = g(
|
|
396
|
-
(e) => {
|
|
397
|
-
var l, o;
|
|
398
|
-
if (!e)
|
|
399
|
-
return null;
|
|
400
|
-
const s = Object.entries(V), c = (l = s.find(([h, f]) => f.exec(e))) == null ? void 0 : l[0];
|
|
401
|
-
if (c)
|
|
402
|
-
return c;
|
|
403
|
-
const i = e.toLowerCase(), a = (o = s.find(([h, f]) => f.exec(i))) == null ? void 0 : o[0];
|
|
404
|
-
return a || null;
|
|
405
|
-
},
|
|
406
|
-
[V]
|
|
407
|
-
), Et = K(
|
|
408
|
-
() => {
|
|
409
|
-
var e;
|
|
410
|
-
return {
|
|
411
|
-
bulkEnrich: W,
|
|
412
|
-
enrich: st,
|
|
413
|
-
enrichFailedEnrichments: rt,
|
|
414
|
-
sources: O,
|
|
415
|
-
setSources: vt,
|
|
416
|
-
typesDetection: V,
|
|
417
|
-
supportedTypes: T,
|
|
418
|
-
availableSources: q,
|
|
419
|
-
guessType: it,
|
|
420
|
-
queueEnrich: nt,
|
|
421
|
-
setCustomIconify: et,
|
|
422
|
-
setDefaultClassification: N,
|
|
423
|
-
setReady: wt,
|
|
424
|
-
defaultClassification: E,
|
|
425
|
-
ready: x && !!t && !!((e = $.config) != null && e.c12nDef) && (Ut(F) || L)
|
|
426
|
-
};
|
|
427
|
-
},
|
|
428
|
-
[
|
|
429
|
-
W,
|
|
430
|
-
st,
|
|
431
|
-
rt,
|
|
432
|
-
O,
|
|
433
|
-
V,
|
|
434
|
-
T,
|
|
435
|
-
q,
|
|
436
|
-
it,
|
|
437
|
-
nt,
|
|
438
|
-
N,
|
|
439
|
-
E,
|
|
440
|
-
x,
|
|
441
|
-
t,
|
|
442
|
-
(lt = $.config) == null ? void 0 : lt.c12nDef,
|
|
443
|
-
L
|
|
444
|
-
]
|
|
445
|
-
);
|
|
446
|
-
return /* @__PURE__ */ Ct(Yt.Provider, { value: Et, children: n });
|
|
447
|
-
};
|
|
448
|
-
export {
|
|
449
|
-
Yt as C,
|
|
450
|
-
pe as a,
|
|
451
|
-
Qt as u
|
|
452
|
-
};
|
package/FlexOne-BXWFOd1T.js
DELETED
package/_MapCache-DRK-s2eK.js
DELETED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
import { b as d, r as _ } from "./_baseGetTag-CxDaTem-.js";
|
|
2
|
-
import { i as l } from "./isObject-B53jY8Qg.js";
|
|
3
|
-
var v = "[object AsyncFunction]", g = "[object Function]", y = "[object GeneratorFunction]", b = "[object Proxy]";
|
|
4
|
-
function C(t) {
|
|
5
|
-
if (!l(t))
|
|
6
|
-
return !1;
|
|
7
|
-
var e = d(t);
|
|
8
|
-
return e == g || e == y || e == v || e == b;
|
|
9
|
-
}
|
|
10
|
-
var u = _["__core-js_shared__"], p = (function() {
|
|
11
|
-
var t = /[^.]+$/.exec(u && u.keys && u.keys.IE_PROTO || "");
|
|
12
|
-
return t ? "Symbol(src)_1." + t : "";
|
|
13
|
-
})();
|
|
14
|
-
function m(t) {
|
|
15
|
-
return !!p && p in t;
|
|
16
|
-
}
|
|
17
|
-
var O = Function.prototype, P = O.toString;
|
|
18
|
-
function w(t) {
|
|
19
|
-
if (t != null) {
|
|
20
|
-
try {
|
|
21
|
-
return P.call(t);
|
|
22
|
-
} catch {
|
|
23
|
-
}
|
|
24
|
-
try {
|
|
25
|
-
return t + "";
|
|
26
|
-
} catch {
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return "";
|
|
30
|
-
}
|
|
31
|
-
var x = /[\\^$.*+?()[\]{}|]/g, j = /^\[object .+?Constructor\]$/, $ = Function.prototype, z = Object.prototype, S = $.toString, D = z.hasOwnProperty, H = RegExp(
|
|
32
|
-
"^" + S.call(D).replace(x, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
33
|
-
);
|
|
34
|
-
function F(t) {
|
|
35
|
-
if (!l(t) || m(t))
|
|
36
|
-
return !1;
|
|
37
|
-
var e = C(t) ? H : j;
|
|
38
|
-
return e.test(w(t));
|
|
39
|
-
}
|
|
40
|
-
function I(t, e) {
|
|
41
|
-
return t == null ? void 0 : t[e];
|
|
42
|
-
}
|
|
43
|
-
function f(t, e) {
|
|
44
|
-
var a = I(t, e);
|
|
45
|
-
return F(a) ? a : void 0;
|
|
46
|
-
}
|
|
47
|
-
function T(t, e) {
|
|
48
|
-
return t === e || t !== t && e !== e;
|
|
49
|
-
}
|
|
50
|
-
var i = f(Object, "create");
|
|
51
|
-
function E() {
|
|
52
|
-
this.__data__ = i ? i(null) : {}, this.size = 0;
|
|
53
|
-
}
|
|
54
|
-
function N(t) {
|
|
55
|
-
var e = this.has(t) && delete this.__data__[t];
|
|
56
|
-
return this.size -= e ? 1 : 0, e;
|
|
57
|
-
}
|
|
58
|
-
var M = "__lodash_hash_undefined__", G = Object.prototype, A = G.hasOwnProperty;
|
|
59
|
-
function R(t) {
|
|
60
|
-
var e = this.__data__;
|
|
61
|
-
if (i) {
|
|
62
|
-
var a = e[t];
|
|
63
|
-
return a === M ? void 0 : a;
|
|
64
|
-
}
|
|
65
|
-
return A.call(e, t) ? e[t] : void 0;
|
|
66
|
-
}
|
|
67
|
-
var K = Object.prototype, L = K.hasOwnProperty;
|
|
68
|
-
function U(t) {
|
|
69
|
-
var e = this.__data__;
|
|
70
|
-
return i ? e[t] !== void 0 : L.call(e, t);
|
|
71
|
-
}
|
|
72
|
-
var q = "__lodash_hash_undefined__";
|
|
73
|
-
function J(t, e) {
|
|
74
|
-
var a = this.__data__;
|
|
75
|
-
return this.size += this.has(t) ? 0 : 1, a[t] = i && e === void 0 ? q : e, this;
|
|
76
|
-
}
|
|
77
|
-
function n(t) {
|
|
78
|
-
var e = -1, a = t == null ? 0 : t.length;
|
|
79
|
-
for (this.clear(); ++e < a; ) {
|
|
80
|
-
var r = t[e];
|
|
81
|
-
this.set(r[0], r[1]);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
n.prototype.clear = E;
|
|
85
|
-
n.prototype.delete = N;
|
|
86
|
-
n.prototype.get = R;
|
|
87
|
-
n.prototype.has = U;
|
|
88
|
-
n.prototype.set = J;
|
|
89
|
-
function V() {
|
|
90
|
-
this.__data__ = [], this.size = 0;
|
|
91
|
-
}
|
|
92
|
-
function h(t, e) {
|
|
93
|
-
for (var a = t.length; a--; )
|
|
94
|
-
if (T(t[a][0], e))
|
|
95
|
-
return a;
|
|
96
|
-
return -1;
|
|
97
|
-
}
|
|
98
|
-
var B = Array.prototype, Q = B.splice;
|
|
99
|
-
function W(t) {
|
|
100
|
-
var e = this.__data__, a = h(e, t);
|
|
101
|
-
if (a < 0)
|
|
102
|
-
return !1;
|
|
103
|
-
var r = e.length - 1;
|
|
104
|
-
return a == r ? e.pop() : Q.call(e, a, 1), --this.size, !0;
|
|
105
|
-
}
|
|
106
|
-
function X(t) {
|
|
107
|
-
var e = this.__data__, a = h(e, t);
|
|
108
|
-
return a < 0 ? void 0 : e[a][1];
|
|
109
|
-
}
|
|
110
|
-
function Y(t) {
|
|
111
|
-
return h(this.__data__, t) > -1;
|
|
112
|
-
}
|
|
113
|
-
function Z(t, e) {
|
|
114
|
-
var a = this.__data__, r = h(a, t);
|
|
115
|
-
return r < 0 ? (++this.size, a.push([t, e])) : a[r][1] = e, this;
|
|
116
|
-
}
|
|
117
|
-
function o(t) {
|
|
118
|
-
var e = -1, a = t == null ? 0 : t.length;
|
|
119
|
-
for (this.clear(); ++e < a; ) {
|
|
120
|
-
var r = t[e];
|
|
121
|
-
this.set(r[0], r[1]);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
o.prototype.clear = V;
|
|
125
|
-
o.prototype.delete = W;
|
|
126
|
-
o.prototype.get = X;
|
|
127
|
-
o.prototype.has = Y;
|
|
128
|
-
o.prototype.set = Z;
|
|
129
|
-
var k = f(_, "Map");
|
|
130
|
-
function tt() {
|
|
131
|
-
this.size = 0, this.__data__ = {
|
|
132
|
-
hash: new n(),
|
|
133
|
-
map: new (k || o)(),
|
|
134
|
-
string: new n()
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function et(t) {
|
|
138
|
-
var e = typeof t;
|
|
139
|
-
return e == "string" || e == "number" || e == "symbol" || e == "boolean" ? t !== "__proto__" : t === null;
|
|
140
|
-
}
|
|
141
|
-
function c(t, e) {
|
|
142
|
-
var a = t.__data__;
|
|
143
|
-
return et(e) ? a[typeof e == "string" ? "string" : "hash"] : a.map;
|
|
144
|
-
}
|
|
145
|
-
function at(t) {
|
|
146
|
-
var e = c(this, t).delete(t);
|
|
147
|
-
return this.size -= e ? 1 : 0, e;
|
|
148
|
-
}
|
|
149
|
-
function rt(t) {
|
|
150
|
-
return c(this, t).get(t);
|
|
151
|
-
}
|
|
152
|
-
function nt(t) {
|
|
153
|
-
return c(this, t).has(t);
|
|
154
|
-
}
|
|
155
|
-
function ot(t, e) {
|
|
156
|
-
var a = c(this, t), r = a.size;
|
|
157
|
-
return a.set(t, e), this.size += a.size == r ? 0 : 1, this;
|
|
158
|
-
}
|
|
159
|
-
function s(t) {
|
|
160
|
-
var e = -1, a = t == null ? 0 : t.length;
|
|
161
|
-
for (this.clear(); ++e < a; ) {
|
|
162
|
-
var r = t[e];
|
|
163
|
-
this.set(r[0], r[1]);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
s.prototype.clear = tt;
|
|
167
|
-
s.prototype.delete = at;
|
|
168
|
-
s.prototype.get = rt;
|
|
169
|
-
s.prototype.has = nt;
|
|
170
|
-
s.prototype.set = ot;
|
|
171
|
-
export {
|
|
172
|
-
o as L,
|
|
173
|
-
k as M,
|
|
174
|
-
s as a,
|
|
175
|
-
T as e,
|
|
176
|
-
f as g,
|
|
177
|
-
C as i,
|
|
178
|
-
w as t
|
|
179
|
-
};
|