@cccsaurora/clue-ui 1.3.0 → 1.4.0-dev.424
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-CqKcnDWC.js +6099 -0
- package/AnnotationDetails-BlPd3T8k.js +176 -0
- package/AnnotationPreview-Bl447SKT.js +188 -0
- package/ClueEnrichContext-B3YrTCaJ.js +567 -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 +36 -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-CAvu7vwt.js +1172 -0
- package/index-CVUD9o3t.js +15768 -0
- package/index-DUEubgWN.js +464 -0
- package/index-Dj1N4IQP.js +9314 -0
- package/index-DpJxD74E.js +3272 -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--gLEZw8a.js +11777 -0
- package/sessionStorage-B68y-wnE.js +140 -0
- package/sortBy-B8JVsLQY.js +95 -0
- package/store-B9sjQbcS.js +2163 -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-CHOSKfvu.js +0 -4403
- package/AnnotationDetails-Bqq6Ymmg.js +0 -160
- package/AnnotationPreview-CqXmC-j8.js +0 -140
- package/ClueEnrichContext-DL6aGe1k.js +0 -432
- 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-Dh2PP9h8.js +0 -11747
- package/index-DoFpWPHo.js +0 -975
- package/index-DzVIklWY.js +0 -6464
- 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,432 +0,0 @@
|
|
|
1
|
-
import { jsx as Dt } from "react/jsx-runtime";
|
|
2
|
-
import { a as It } from "./iconify-Ptb5dTKy.js";
|
|
3
|
-
import { a as Ct, p as ut } from "./index-BH-gBhtO.js";
|
|
4
|
-
import { REPLICATORS as Q } from "./database/globals.js";
|
|
5
|
-
import { clueDebugLogger as _ } from "./utils/loggerUtil.js";
|
|
6
|
-
import { c as U } from "./utils-SpTOhPYl.js";
|
|
7
|
-
import { b as Ot } from "./_baseSlice-M5RKzt1A.js";
|
|
8
|
-
import { t as $t } from "./toFinite-CBrE65MP.js";
|
|
9
|
-
import { d as gt } from "./sessionStorage-DFMae61b.js";
|
|
10
|
-
import { g as lt } from "./groupBy-CrJC7sGa.js";
|
|
11
|
-
import { u as ft } from "./uniq-B4UZ671_.js";
|
|
12
|
-
import { b as jt } from "./_baseIteratee-D0FhC5bC.js";
|
|
13
|
-
import { b as Pt } from "./_baseUniq-D3N8igOm.js";
|
|
14
|
-
import { useContext as Mt, useState as W, useMemo as G, useCallback as g, useRef as Rt, useEffect as R } from "react";
|
|
15
|
-
import { c as bt } from "./index-BM9Sve5T.js";
|
|
16
|
-
import { ClueDatabaseContext as qt } from "./hooks/ClueDatabaseContext.js";
|
|
17
|
-
import At from "./hooks/useClueConfig.js";
|
|
18
|
-
import Bt from "./hooks/useClueTypeConfig.js";
|
|
19
|
-
import { i as Vt } from "./isEmpty-DKxrY-_M.js";
|
|
20
|
-
function St(s) {
|
|
21
|
-
var n = $t(s), m = n % 1;
|
|
22
|
-
return n === n ? m ? n - m : n : 0;
|
|
23
|
-
}
|
|
24
|
-
var Ut = Math.ceil, Wt = Math.max;
|
|
25
|
-
function Ft(s, n, m) {
|
|
26
|
-
n === void 0 ? n = 1 : n = Wt(St(n), 0);
|
|
27
|
-
var u = s == null ? 0 : s.length;
|
|
28
|
-
if (!u || n < 1)
|
|
29
|
-
return [];
|
|
30
|
-
for (var y = 0, x = 0, j = Array(Ut(u / n)); y < u; )
|
|
31
|
-
j[x++] = Ot(s, y, y += n);
|
|
32
|
-
return j;
|
|
33
|
-
}
|
|
34
|
-
function Ht(s, n) {
|
|
35
|
-
return s && s.length ? Pt(s, jt(n)) : [];
|
|
36
|
-
}
|
|
37
|
-
let F;
|
|
38
|
-
const Jt = new Uint8Array(16);
|
|
39
|
-
function Qt() {
|
|
40
|
-
if (!F && (F = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !F))
|
|
41
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
42
|
-
return F(Jt);
|
|
43
|
-
}
|
|
44
|
-
const p = [];
|
|
45
|
-
for (let s = 0; s < 256; ++s)
|
|
46
|
-
p.push((s + 256).toString(16).slice(1));
|
|
47
|
-
function _t(s, n = 0) {
|
|
48
|
-
return p[s[n + 0]] + p[s[n + 1]] + p[s[n + 2]] + p[s[n + 3]] + "-" + p[s[n + 4]] + p[s[n + 5]] + "-" + p[s[n + 6]] + p[s[n + 7]] + "-" + p[s[n + 8]] + p[s[n + 9]] + "-" + p[s[n + 10]] + p[s[n + 11]] + p[s[n + 12]] + p[s[n + 13]] + p[s[n + 14]] + p[s[n + 15]];
|
|
49
|
-
}
|
|
50
|
-
const Gt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), dt = {
|
|
51
|
-
randomUUID: Gt
|
|
52
|
-
};
|
|
53
|
-
function K(s, n, m) {
|
|
54
|
-
if (dt.randomUUID && !s)
|
|
55
|
-
return dt.randomUUID();
|
|
56
|
-
s = s || {};
|
|
57
|
-
const u = s.random || (s.rng || Qt)();
|
|
58
|
-
return u[6] = u[6] & 15 | 64, u[8] = u[8] & 63 | 128, _t(u);
|
|
59
|
-
}
|
|
60
|
-
const Kt = bt(null), fe = ({
|
|
61
|
-
children: s,
|
|
62
|
-
classification: n,
|
|
63
|
-
baseURL: m,
|
|
64
|
-
getToken: u,
|
|
65
|
-
onNetworkCall: y,
|
|
66
|
-
pickSources: x,
|
|
67
|
-
chunkSize: j = 15,
|
|
68
|
-
maxRequestCount: H = 4,
|
|
69
|
-
defaultTimeout: b = 5,
|
|
70
|
-
enabled: q = !0,
|
|
71
|
-
ready: pt = !1,
|
|
72
|
-
publicIconify: X = !0,
|
|
73
|
-
skipConfigCall: Y = !1,
|
|
74
|
-
customIconify: A,
|
|
75
|
-
debugLogging: C = !0
|
|
76
|
-
}) => {
|
|
77
|
-
var it, ot, rt, ct, at;
|
|
78
|
-
const $ = At(), e = Mt(qt), [Z, mt] = W(null), E = G(
|
|
79
|
-
() => {
|
|
80
|
-
var t, i;
|
|
81
|
-
return Z ?? n ?? ((i = (t = $.config) == null ? void 0 : t.c12nDef) == null ? void 0 : i.RESTRICTED);
|
|
82
|
-
},
|
|
83
|
-
[n, (ot = (it = $.config) == null ? void 0 : it.c12nDef) == null ? void 0 : ot.RESTRICTED, Z]
|
|
84
|
-
), z = g(
|
|
85
|
-
(t) => {
|
|
86
|
-
var i;
|
|
87
|
-
return mt(t((i = $.config) == null ? void 0 : i.c12nDef));
|
|
88
|
-
},
|
|
89
|
-
[(rt = $.config) == null ? void 0 : rt.c12nDef]
|
|
90
|
-
), [D, yt] = W(pt), P = Rt(0), [O, ht] = W([]), { availableSources: M, typesDetection: B, supportedTypes: N } = Bt(
|
|
91
|
-
q && D,
|
|
92
|
-
m,
|
|
93
|
-
C,
|
|
94
|
-
u,
|
|
95
|
-
y
|
|
96
|
-
);
|
|
97
|
-
R(() => {
|
|
98
|
-
if (Y || !q || !D)
|
|
99
|
-
return;
|
|
100
|
-
const t = {}, i = u == null ? void 0 : u();
|
|
101
|
-
i && (t.Authorization = `Bearer ${i}`);
|
|
102
|
-
let a = { baseURL: m, headers: t };
|
|
103
|
-
y && (a = y(a)), Ct.configs.get(a).then($.setConfig);
|
|
104
|
-
}, [m, y, Y, D]), R(() => (D && Object.values(Q).forEach((t) => {
|
|
105
|
-
t.reSync(), t.start();
|
|
106
|
-
}), () => {
|
|
107
|
-
Object.values(Q).forEach((t) => {
|
|
108
|
-
t.pause();
|
|
109
|
-
});
|
|
110
|
-
}), [D]);
|
|
111
|
-
const [T, L] = W(A);
|
|
112
|
-
R(() => {
|
|
113
|
-
A && L(A);
|
|
114
|
-
}, [A]), R(() => {
|
|
115
|
-
if (X)
|
|
116
|
-
return;
|
|
117
|
-
let t = T ?? void 0 ?? (m == null ? void 0 : m.replace(/^[^.]+/, "icons"));
|
|
118
|
-
!t && typeof window < "u" && window && !window.location.origin.includes("localhost") && (t = window.location.protocol + "//" + window.location.origin.replace(/^[^.]+/, "icons")), t && (_(`Using ${t} for iconify`, C), It("", {
|
|
119
|
-
resources: [t]
|
|
120
|
-
}));
|
|
121
|
-
}, [m, T, C, X]);
|
|
122
|
-
const V = g(
|
|
123
|
-
async (t) => {
|
|
124
|
-
const i = [];
|
|
125
|
-
for (const r of t) {
|
|
126
|
-
const { latency: c, source: l, type: o, value: h, items: f, error: w } = r;
|
|
127
|
-
await e.selectors.find({ selector: { type: o, value: h, source: l } }).incrementalRemove(), w && i.push({
|
|
128
|
-
id: K(),
|
|
129
|
-
source: l,
|
|
130
|
-
type: o,
|
|
131
|
-
value: h,
|
|
132
|
-
annotations: [],
|
|
133
|
-
classification: E,
|
|
134
|
-
latency: c,
|
|
135
|
-
count: 0,
|
|
136
|
-
error: w
|
|
137
|
-
});
|
|
138
|
-
for (const d of f) {
|
|
139
|
-
const { classification: v, count: I, link: vt, annotations: Et } = d, J = {
|
|
140
|
-
id: K(),
|
|
141
|
-
source: l,
|
|
142
|
-
type: o,
|
|
143
|
-
value: h,
|
|
144
|
-
annotations: Et,
|
|
145
|
-
classification: v,
|
|
146
|
-
latency: c,
|
|
147
|
-
count: I,
|
|
148
|
-
link: vt,
|
|
149
|
-
error: w
|
|
150
|
-
};
|
|
151
|
-
i.some((xt) => xt.id === J.id) && (J.id = K()), i.push(J);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
const a = await e.selectors.bulkInsert(i);
|
|
155
|
-
a.error.length > 0 && (console.warn("Errors on upsert:"), a.error.forEach((r) => console.warn(r.documentId, r.validationErrors ?? r.status)));
|
|
156
|
-
},
|
|
157
|
-
[e, E]
|
|
158
|
-
), k = g(
|
|
159
|
-
async (t, i, a = {}) => {
|
|
160
|
-
var d;
|
|
161
|
-
if (!t || !i)
|
|
162
|
-
return console.error(`Type (${t}) or value (${i}) is empty, returning empty response`), {};
|
|
163
|
-
const r = (x == null ? void 0 : x(O, M, [{ type: t, value: i, classification: a.classification }])) ?? O, c = {
|
|
164
|
-
timeout: b,
|
|
165
|
-
force: !1,
|
|
166
|
-
includeRaw: !1,
|
|
167
|
-
noCache: !1,
|
|
168
|
-
classification: E,
|
|
169
|
-
sources: r,
|
|
170
|
-
...a
|
|
171
|
-
}, l = {}, o = u == null ? void 0 : u();
|
|
172
|
-
o && (l.Authorization = `Bearer ${o}`);
|
|
173
|
-
let h = { baseURL: m, headers: l };
|
|
174
|
-
y && (h = y(h));
|
|
175
|
-
const f = {
|
|
176
|
-
type: t,
|
|
177
|
-
value: i,
|
|
178
|
-
classification: c.classification
|
|
179
|
-
};
|
|
180
|
-
let w = await e.status.findOne({ selector: { ...f } }).exec();
|
|
181
|
-
w ? await w.incrementalPatch({ status: "in-progress" }) : w = await ((d = e.status) == null ? void 0 : d.insert({
|
|
182
|
-
id: await U(f.type, f.value, f.classification ?? E),
|
|
183
|
-
type: f.type,
|
|
184
|
-
value: f.value,
|
|
185
|
-
classification: f.classification ?? E,
|
|
186
|
-
status: "in-progress"
|
|
187
|
-
}));
|
|
188
|
-
try {
|
|
189
|
-
const v = await ut([f], c.sources, c, h), I = Object.values(Object.values(v)[0])[0];
|
|
190
|
-
return await V(Object.values(I)), I;
|
|
191
|
-
} catch (v) {
|
|
192
|
-
return console.error(v), {};
|
|
193
|
-
} finally {
|
|
194
|
-
await (w == null ? void 0 : w.incrementalPatch({ status: "complete" }));
|
|
195
|
-
}
|
|
196
|
-
},
|
|
197
|
-
[
|
|
198
|
-
V,
|
|
199
|
-
M,
|
|
200
|
-
m,
|
|
201
|
-
e,
|
|
202
|
-
E,
|
|
203
|
-
b,
|
|
204
|
-
u,
|
|
205
|
-
y,
|
|
206
|
-
x,
|
|
207
|
-
O
|
|
208
|
-
]
|
|
209
|
-
), S = g(
|
|
210
|
-
async (t, i) => {
|
|
211
|
-
var f, w;
|
|
212
|
-
const a = (x == null ? void 0 : x(O, M, t)) ?? O, r = {
|
|
213
|
-
timeout: b,
|
|
214
|
-
includeRaw: !1,
|
|
215
|
-
noCache: !1,
|
|
216
|
-
classification: E,
|
|
217
|
-
sources: a,
|
|
218
|
-
...i
|
|
219
|
-
}, c = {}, l = u == null ? void 0 : u();
|
|
220
|
-
l && (c.Authorization = `Bearer ${l}`);
|
|
221
|
-
let o = { baseURL: m, headers: c };
|
|
222
|
-
y && (o = y(o));
|
|
223
|
-
const h = [];
|
|
224
|
-
for (const d of t) {
|
|
225
|
-
const v = { type: d.type, value: d.value, classification: r.classification };
|
|
226
|
-
let I = await ((f = e.status) == null ? void 0 : f.findOne({
|
|
227
|
-
selector: v
|
|
228
|
-
}).incrementalPatch({
|
|
229
|
-
status: "in-progress"
|
|
230
|
-
}));
|
|
231
|
-
I || (I = await ((w = e.status) == null ? void 0 : w.insert({
|
|
232
|
-
id: await U(v.type, v.value, v.classification),
|
|
233
|
-
...v,
|
|
234
|
-
status: "in-progress",
|
|
235
|
-
sources: r.sources
|
|
236
|
-
}))), I && h.push(I.toMutableJSON());
|
|
237
|
-
}
|
|
238
|
-
try {
|
|
239
|
-
const d = await ut(t, r.sources, r, o), v = Object.values(d).flatMap(Object.values).flatMap(Object.values);
|
|
240
|
-
return await V(v), d;
|
|
241
|
-
} catch (d) {
|
|
242
|
-
return console.error(d), {};
|
|
243
|
-
} finally {
|
|
244
|
-
e.status.bulkUpsert(
|
|
245
|
-
Ht(h, (d) => d.id).map((d) => (d.status = "complete", d))
|
|
246
|
-
);
|
|
247
|
-
}
|
|
248
|
-
},
|
|
249
|
-
[
|
|
250
|
-
x,
|
|
251
|
-
O,
|
|
252
|
-
M,
|
|
253
|
-
b,
|
|
254
|
-
E,
|
|
255
|
-
u,
|
|
256
|
-
m,
|
|
257
|
-
y,
|
|
258
|
-
e,
|
|
259
|
-
V
|
|
260
|
-
]
|
|
261
|
-
), tt = g(async () => {
|
|
262
|
-
if (!(e != null && e.selectors) || e.selectors.closed)
|
|
263
|
-
return;
|
|
264
|
-
const t = await e.selectors.find({ selector: { error: { $exists: !0 } } }).exec(), i = lt(t, "classification"), a = [];
|
|
265
|
-
for (const [r, c] of Object.entries(i)) {
|
|
266
|
-
const l = lt(c, (o) => `${o.type}:${o.value}`);
|
|
267
|
-
for (const o of Object.values(l))
|
|
268
|
-
a.push({
|
|
269
|
-
id: await U(o[0].type, o[0].value, r),
|
|
270
|
-
type: o[0].type,
|
|
271
|
-
value: o[0].value,
|
|
272
|
-
classification: r,
|
|
273
|
-
sources: ft(o.map((h) => h.source)).sort(),
|
|
274
|
-
status: "pending"
|
|
275
|
-
});
|
|
276
|
-
}
|
|
277
|
-
await e.status.bulkInsert(a), await e.selectors.bulkRemove(t);
|
|
278
|
-
}, [e]), et = G(
|
|
279
|
-
() => gt(
|
|
280
|
-
async () => {
|
|
281
|
-
if (e != null && e.status) {
|
|
282
|
-
if (e.status.closed) {
|
|
283
|
-
console.warn("Status database is closed, will not enrich");
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
} else return;
|
|
287
|
-
const t = await e.status.find({ selector: { status: "pending" } }).update({ $set: { status: "in-progress" } });
|
|
288
|
-
if (t.length < 1)
|
|
289
|
-
return;
|
|
290
|
-
const i = Ft(t, j);
|
|
291
|
-
_(
|
|
292
|
-
`Enriching ${t.length} selectors in ${i.length} chunks of ${j}.`,
|
|
293
|
-
C
|
|
294
|
-
), await Promise.all(
|
|
295
|
-
// For performance reasons, we chunk the requests. This will allow us to take advantage of parellelization in the
|
|
296
|
-
// backend, both on the pod level and kubernetes level
|
|
297
|
-
i.map(async (a) => {
|
|
298
|
-
let r = null;
|
|
299
|
-
if (P.current <= H)
|
|
300
|
-
P.current += 1;
|
|
301
|
-
else {
|
|
302
|
-
let c = Date.now();
|
|
303
|
-
await new Promise((l) => {
|
|
304
|
-
r = setInterval(() => {
|
|
305
|
-
_(
|
|
306
|
-
`Waiting on ${P.current} existing requests to complete (total delay: ${Date.now() - c}ms)`,
|
|
307
|
-
C
|
|
308
|
-
), P.current < H && l();
|
|
309
|
-
}, 400);
|
|
310
|
-
}).finally(() => {
|
|
311
|
-
P.current += 1, clearInterval(r);
|
|
312
|
-
});
|
|
313
|
-
}
|
|
314
|
-
try {
|
|
315
|
-
const c = {}, l = ft(a.flatMap((o) => o.sources ?? []));
|
|
316
|
-
l.length > 0 && (c.sources = l), await S(
|
|
317
|
-
a.map((o) => o.toSelector()),
|
|
318
|
-
c
|
|
319
|
-
), await e.status.findByIds(a.map((o) => o.id)).update({ $set: { status: "complete" } });
|
|
320
|
-
} catch (c) {
|
|
321
|
-
console.error(c);
|
|
322
|
-
} finally {
|
|
323
|
-
P.current -= 1, r && clearInterval(r);
|
|
324
|
-
}
|
|
325
|
-
})
|
|
326
|
-
);
|
|
327
|
-
},
|
|
328
|
-
200,
|
|
329
|
-
{ maxWait: 500, leading: !1 }
|
|
330
|
-
),
|
|
331
|
-
[S, j, e, C, H]
|
|
332
|
-
);
|
|
333
|
-
R(() => {
|
|
334
|
-
}, [e, C]), R(() => {
|
|
335
|
-
if (!q || !D || !(e != null && e.status))
|
|
336
|
-
return;
|
|
337
|
-
if (e != null && e.status.closed) {
|
|
338
|
-
console.warn("Status collection is closed");
|
|
339
|
-
return;
|
|
340
|
-
}
|
|
341
|
-
const t = e.status.find({
|
|
342
|
-
selector: {
|
|
343
|
-
status: "pending"
|
|
344
|
-
}
|
|
345
|
-
}).$.subscribe(() => et());
|
|
346
|
-
return () => {
|
|
347
|
-
try {
|
|
348
|
-
t == null || t.unsubscribe();
|
|
349
|
-
} catch (i) {
|
|
350
|
-
console.warn(i);
|
|
351
|
-
}
|
|
352
|
-
};
|
|
353
|
-
}, [q, D, e, C, et, (ct = e == null ? void 0 : e.status) == null ? void 0 : ct.closed]);
|
|
354
|
-
const st = g(
|
|
355
|
-
async (t, i, a) => {
|
|
356
|
-
var l, o;
|
|
357
|
-
if (!t)
|
|
358
|
-
throw new Error("Type cannot be null");
|
|
359
|
-
if (!i)
|
|
360
|
-
throw new Error("Value cannot be null");
|
|
361
|
-
if (!e.status || e.status.closed) {
|
|
362
|
-
console.warn("status collection is closed");
|
|
363
|
-
return;
|
|
364
|
-
}
|
|
365
|
-
const r = { type: t, value: i, classification: a ?? E };
|
|
366
|
-
let c = await ((l = e.status) == null ? void 0 : l.findOne({
|
|
367
|
-
selector: r
|
|
368
|
-
}).exec());
|
|
369
|
-
return c || (c = await ((o = e.status) == null ? void 0 : o.queueInsert({
|
|
370
|
-
id: await U(r.type, r.value, r.classification),
|
|
371
|
-
...r,
|
|
372
|
-
status: "pending"
|
|
373
|
-
}))), c;
|
|
374
|
-
},
|
|
375
|
-
[E, e]
|
|
376
|
-
), nt = g(
|
|
377
|
-
(t) => {
|
|
378
|
-
var l, o;
|
|
379
|
-
if (!t)
|
|
380
|
-
return null;
|
|
381
|
-
const i = Object.entries(B), a = (l = i.find(([h, f]) => f.exec(t))) == null ? void 0 : l[0];
|
|
382
|
-
if (a)
|
|
383
|
-
return a;
|
|
384
|
-
const r = t.toLowerCase(), c = (o = i.find(([h, f]) => f.exec(r))) == null ? void 0 : o[0];
|
|
385
|
-
return c || null;
|
|
386
|
-
},
|
|
387
|
-
[B]
|
|
388
|
-
), wt = G(
|
|
389
|
-
() => {
|
|
390
|
-
var t, i;
|
|
391
|
-
return {
|
|
392
|
-
bulkEnrich: S,
|
|
393
|
-
enrich: k,
|
|
394
|
-
enrichFailedEnrichments: tt,
|
|
395
|
-
sources: O,
|
|
396
|
-
setSources: ht,
|
|
397
|
-
typesDetection: B,
|
|
398
|
-
supportedTypes: N,
|
|
399
|
-
availableSources: M,
|
|
400
|
-
guessType: nt,
|
|
401
|
-
queueEnrich: st,
|
|
402
|
-
setCustomIconify: L,
|
|
403
|
-
setDefaultClassification: z,
|
|
404
|
-
setReady: yt,
|
|
405
|
-
defaultClassification: E,
|
|
406
|
-
ready: D && !!e && !!((t = $.config) != null && t.c12nDef) && (Vt(Q) || ((i = e.selectors) == null ? void 0 : i.synced))
|
|
407
|
-
};
|
|
408
|
-
},
|
|
409
|
-
[
|
|
410
|
-
S,
|
|
411
|
-
k,
|
|
412
|
-
tt,
|
|
413
|
-
O,
|
|
414
|
-
B,
|
|
415
|
-
N,
|
|
416
|
-
M,
|
|
417
|
-
nt,
|
|
418
|
-
st,
|
|
419
|
-
z,
|
|
420
|
-
E,
|
|
421
|
-
D,
|
|
422
|
-
e,
|
|
423
|
-
(at = $.config) == null ? void 0 : at.c12nDef
|
|
424
|
-
]
|
|
425
|
-
);
|
|
426
|
-
return /* @__PURE__ */ Dt(Kt.Provider, { value: wt, children: s });
|
|
427
|
-
};
|
|
428
|
-
export {
|
|
429
|
-
Kt as C,
|
|
430
|
-
fe as a,
|
|
431
|
-
Ht as u
|
|
432
|
-
};
|
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
|
-
};
|