@cccsaurora/clue-ui 1.3.0-dev.403 → 1.3.0

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 (236) hide show
  1. package/ActionForm-CHOSKfvu.js +4403 -0
  2. package/AnnotationDetails-Bqq6Ymmg.js +160 -0
  3. package/AnnotationPreview-CqXmC-j8.js +140 -0
  4. package/ClueEnrichContext-DL6aGe1k.js +432 -0
  5. package/FlexOne-BXWFOd1T.js +6 -0
  6. package/_MapCache-DRK-s2eK.js +179 -0
  7. package/_Set-DrS_bbSV.js +6 -0
  8. package/_Uint8Array-D9R2N9Lp.js +98 -0
  9. package/_arrayIncludes-Dcl_29E6.js +25 -0
  10. package/_arrayPush-DBJIuK2V.js +8 -0
  11. package/_baseAssignValue-Bx1cxHj5.js +12 -0
  12. package/_baseClone-DRhywkxm.js +211 -0
  13. package/_baseExtremum-DodEaEyF.js +16 -0
  14. package/_baseFlatten-CD9NgrYE.js +72 -0
  15. package/_baseGet-bVwDaGrA.js +80 -0
  16. package/_baseGetTag-CxDaTem-.js +25 -0
  17. package/_baseIsEqual-C-FKsm1J.js +150 -0
  18. package/_baseIteratee-D0FhC5bC.js +95 -0
  19. package/_baseRest-D_eW2E0d.js +8 -0
  20. package/_baseSlice-M5RKzt1A.js +10 -0
  21. package/_baseSum-wEbgNeUs.js +10 -0
  22. package/_baseUniq-D3N8igOm.js +41 -0
  23. package/_cacheHas-Wgl-hw34.js +22 -0
  24. package/_commonjsHelpers-C6fGbg64.js +6 -0
  25. package/_createAggregator-BVj8IAuF.js +53 -0
  26. package/_defineProperty-BZU4WKA3.js +11 -0
  27. package/_getPrototype-BGBCg-aX.js +5 -0
  28. package/_getTag-B7R9qBo7.js +73 -0
  29. package/_isIterateeCall-Dm0VTAYy.js +13 -0
  30. package/_setToArray-Ck4YZu0Z.js +9 -0
  31. package/cloneDeep-fV59zwUf.js +8 -0
  32. package/components/AnnotationBody.js +35 -49
  33. package/components/AnnotationDetailPopover.js +30 -36
  34. package/components/AnnotationDetails.js +7 -7
  35. package/components/AnnotationEntry.js +35 -35
  36. package/components/AnnotationPreview.js +5 -5
  37. package/components/ClassificationChip.js +23 -44
  38. package/components/CountBadge.js +26 -31
  39. package/components/EnrichedCard.js +97 -110
  40. package/components/EnrichedChip.js +105 -130
  41. package/components/EnrichedTypography.js +107 -133
  42. package/components/ErrorBoundary.js +24 -28
  43. package/components/RetryFailedEnrichments.js +9 -10
  44. package/components/SourcePicker.js +49 -57
  45. package/components/actions/ActionForm.js +4 -4
  46. package/components/actions/ExecutePopover.js +59 -75
  47. package/components/actions/ResultModal.js +4 -4
  48. package/components/actions/form/schemaAdapter.js +23 -39
  49. package/components/actions/formats/FileResult.js +59 -86
  50. package/components/actions/formats/index.js +25 -29
  51. package/components/display/graph/ExpandMoreButton.js +10 -10
  52. package/components/display/graph/elements/NodeCard.js +91 -111
  53. package/components/display/graph/elements/NodeTag.js +13 -15
  54. package/components/display/graph/index.js +204 -262
  55. package/components/display/graph/visualizations/Leaf.js +70 -89
  56. package/components/display/graph/visualizations/cloud/index.js +81 -98
  57. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  58. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  59. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  60. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  61. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  62. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  63. package/components/display/graph/visualizations/icons/index.js +13 -14
  64. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  65. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  66. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  67. package/components/display/graph/visualizations/tree/index.js +306 -408
  68. package/components/display/icons/Iconified.js +12 -27
  69. package/components/display/json/index.js +4 -4
  70. package/components/display/markdown/index.js +5770 -8678
  71. package/components/enrichment/EnrichPopover.js +46 -54
  72. package/components/fetchers/Fetcher.js +123 -166
  73. package/components/fetchers/FetcherResultView.js +27 -31
  74. package/components/fetchers/PreviewModal.js +16 -17
  75. package/components/fetchers/StatusChip.js +17 -21
  76. package/components/group/Entry.js +11 -13
  77. package/components/group/Group.js +10 -13
  78. package/components/group/GroupControl.js +65 -76
  79. package/components/stats/QueryStatus.js +32 -45
  80. package/countBy-B3rNuG4T.js +8 -0
  81. package/data/event.js +4 -6
  82. package/database/globals.js +2 -2
  83. package/database/index.js +3 -3
  84. package/database/replication.js +4 -4
  85. package/en/translation.json +7 -0
  86. package/fr/translation.json +7 -0
  87. package/get-Bil3mzRD.js +8 -0
  88. package/groupBy-CrJC7sGa.js +8 -0
  89. package/hooks/ClueActionContext.js +6 -6
  90. package/hooks/ClueComponentContext.js +23 -29
  91. package/hooks/ClueConfigProvider.js +12 -14
  92. package/hooks/ClueDatabaseContext.js +23 -35
  93. package/hooks/ClueEnrichContext.js +11 -11
  94. package/hooks/ClueFetcherContext.js +56 -83
  95. package/hooks/ClueGroupContext.js +14 -17
  96. package/hooks/CluePopupContext.js +5 -5
  97. package/hooks/ClueProvider.js +11 -13
  98. package/hooks/ClueUIPluginContext.d.ts +5 -0
  99. package/hooks/ClueUIPluginContext.js +35 -47
  100. package/hooks/selectors.js +7 -7
  101. package/hooks/useActionResult.js +3 -3
  102. package/hooks/useAnnotations.js +32 -48
  103. package/hooks/useClue.js +4 -6
  104. package/hooks/useClueActions.js +3 -3
  105. package/hooks/useClueConfig.js +4 -6
  106. package/hooks/useClueTypeConfig.js +24 -49
  107. package/hooks/useClueUIPlugins.d.ts +4 -0
  108. package/hooks/useClueUIPlugins.js +11 -0
  109. package/hooks/useComparator.js +435 -722
  110. package/hooks/useErrors.js +18 -22
  111. package/hooks/useFetcherResult.js +24 -33
  112. package/hooks/useMyHighlights.js +36 -66
  113. package/hooks/useMyLocalStorage.js +37 -66
  114. package/iconify-Ptb5dTKy.js +1270 -0
  115. package/icons/Action.js +49 -66
  116. package/icons/Assessment.js +69 -85
  117. package/icons/Context.js +63 -77
  118. package/icons/Opinion.js +60 -76
  119. package/icons/iconMap.js +2 -2
  120. package/identity-ByMq8VxU.js +6 -0
  121. package/index-BH-gBhtO.js +2282 -0
  122. package/index-BM9Sve5T.js +571 -0
  123. package/index-Cj4d5cGz.js +357 -0
  124. package/index-Dh2PP9h8.js +11747 -0
  125. package/index-DoFpWPHo.js +975 -0
  126. package/index-DzVIklWY.js +6464 -0
  127. package/isArguments-BWcXOE6a.js +24 -0
  128. package/isArray-WzO_os3q.js +4 -0
  129. package/isEmpty-DKxrY-_M.js +22 -0
  130. package/isNil-CjWwlQS3.js +6 -0
  131. package/isObject-B53jY8Qg.js +7 -0
  132. package/isObjectLike-CYbdrIBr.js +6 -0
  133. package/isSymbol-DE1Kcy2M.js +9 -0
  134. package/last-7CdUxN0r.js +7 -0
  135. package/main.js +62 -62
  136. package/maxBy-BOWDkL_D.js +8 -0
  137. package/package.json +3 -2
  138. package/plugins/ClueUIPlugin.d.ts +5 -1
  139. package/plugins/ClueUIPlugin.js +124 -162
  140. package/plugins/file/index.js +15 -15
  141. package/plugins/graph/example/tree.json.d.ts +91 -0
  142. package/plugins/graph/index.d.ts +3 -0
  143. package/plugins/graph/index.js +34 -17
  144. package/plugins/image/index.d.ts +3 -0
  145. package/plugins/image/index.js +34 -18
  146. package/plugins/json/index.d.ts +3 -0
  147. package/plugins/json/index.js +29 -17
  148. package/plugins/markdown/index.d.ts +3 -0
  149. package/plugins/markdown/index.js +28 -17
  150. package/plugins/registry.js +6 -6
  151. package/plugins/store.d.ts +1 -0
  152. package/plugins/store.js +4 -4
  153. package/plugins/test/index.js +17 -17
  154. package/plugins/utils.d.ts +1 -0
  155. package/plugins/utils.js +19 -0
  156. package/replication-WkKbPdwG.js +8453 -0
  157. package/sessionStorage-DFMae61b.js +90 -0
  158. package/sortBy-BHe812lF.js +74 -0
  159. package/store-DClHBq7r.js +1169 -0
  160. package/sumBy-B7f_bP_k.js +8 -0
  161. package/text/Frequency.js +23 -42
  162. package/toFinite-CBrE65MP.js +14 -0
  163. package/toNumber-CxmWey0f.js +31 -0
  164. package/uniq-B4UZ671_.js +7 -0
  165. package/utils/chain.js +65 -92
  166. package/utils/classificationParser.js +256 -519
  167. package/utils/constants.js +11 -37
  168. package/utils/graph.js +45 -72
  169. package/utils/hashUtil.js +7 -7
  170. package/utils/line.js +81 -131
  171. package/utils/loggerUtil.js +3 -5
  172. package/utils/sessionStorage.js +7 -7
  173. package/utils/time.js +427 -447
  174. package/utils/utils.js +10 -10
  175. package/utils/window.js +10 -21
  176. package/utils-SpTOhPYl.js +147 -0
  177. package/ActionForm-CqKcnDWC.js +0 -6099
  178. package/AnnotationDetails-BlPd3T8k.js +0 -176
  179. package/AnnotationPreview-Bl447SKT.js +0 -188
  180. package/ClueEnrichContext-B3YrTCaJ.js +0 -567
  181. package/FlexOne-BSYAhhtG.js +0 -9
  182. package/_MapCache-kuEY_iOH.js +0 -220
  183. package/_Set-BrSMTlHn.js +0 -6
  184. package/_Uint8Array-OPpgYQj7.js +0 -123
  185. package/_arrayIncludes-BNqL-9ZP.js +0 -31
  186. package/_arrayPush-CBkQqaE_.js +0 -10
  187. package/_baseAssignValue-CNUVPOBW.js +0 -16
  188. package/_baseClone-9FaRd1R2.js +0 -287
  189. package/_baseExtremum-wOGT4Dgw.js +0 -18
  190. package/_baseFlatten-Co6QHDlG.js +0 -92
  191. package/_baseGet-Cmp6FztG.js +0 -109
  192. package/_baseGetTag-Hj-0NTYF.js +0 -44
  193. package/_baseIsEqual-1CpU47TZ.js +0 -211
  194. package/_baseIteratee-BN7Vbe5g.js +0 -126
  195. package/_baseRest-BZ_hQ9PC.js +0 -8
  196. package/_baseSlice-GAv_YFTT.js +0 -20
  197. package/_baseSum-D0WC1dN0.js +0 -13
  198. package/_baseUniq-BnvS3JHL.js +0 -63
  199. package/_cacheHas-_aF2y2Xv.js +0 -25
  200. package/_commonjsHelpers-CUmg6egw.js +0 -6
  201. package/_createAggregator-BUZrP_is.js +0 -63
  202. package/_defineProperty-DolZLKmv.js +0 -12
  203. package/_getPrototype-Bb4gm-5m.js +0 -5
  204. package/_getTag-CML_cXiN.js +0 -105
  205. package/_isIterateeCall-B1IFEqVv.js +0 -17
  206. package/_setToArray-CqyqC8ib.js +0 -10
  207. package/cloneDeep-l3UkXG5M.js +0 -8
  208. package/countBy-Bqcp3VCs.js +0 -14
  209. package/get-CdMThM8x.js +0 -8
  210. package/groupBy-BVV07EGQ.js +0 -14
  211. package/iconify-DJxl6dC-.js +0 -1789
  212. package/identity-CPGTqrE4.js +0 -6
  213. package/index-CAvu7vwt.js +0 -1172
  214. package/index-CVUD9o3t.js +0 -15768
  215. package/index-DUEubgWN.js +0 -464
  216. package/index-Dj1N4IQP.js +0 -9314
  217. package/index-DpJxD74E.js +0 -3272
  218. package/index-_gpzM2Px.js +0 -702
  219. package/isArguments-CuYlEuhP.js +0 -27
  220. package/isArray-RJPfgWqI.js +0 -4
  221. package/isEmpty-BE656RUK.js +0 -30
  222. package/isNil-CIubwp4T.js +0 -6
  223. package/isObject-FTY-5JQX.js +0 -7
  224. package/isObjectLike-CeENW9FN.js +0 -6
  225. package/isSymbol-D_H4HPZQ.js +0 -9
  226. package/last-CUCl67Im.js +0 -7
  227. package/maxBy-BjjQmX5t.js +0 -8
  228. package/replication--gLEZw8a.js +0 -11777
  229. package/sessionStorage-B68y-wnE.js +0 -140
  230. package/sortBy-B8JVsLQY.js +0 -95
  231. package/store-DMdRx9g0.js +0 -2156
  232. package/sumBy-D-HCzM2i.js +0 -8
  233. package/toFinite-meZTg4Su.js +0 -16
  234. package/toNumber-B5JaA1vX.js +0 -39
  235. package/uniq-CahZPAwp.js +0 -7
  236. package/utils-CEySTPtg.js +0 -224
@@ -1,39 +1,13 @@
1
- const CLUE_API = void 0;
2
- const LOCAL = CLUE_API === "MOCK";
3
- const VERSION = void 0;
4
- const REPLICATE = false;
5
- const MY_LOCAL_STORAGE_PREFIX = "clue.ui";
6
- const MY_SESSION_STORAGE_PREFIX = `${MY_LOCAL_STORAGE_PREFIX}.cache`;
7
- var StorageKey = /* @__PURE__ */ ((StorageKey2) => {
8
- StorageKey2["PROVIDER"] = "provider";
9
- StorageKey2["REFRESH_TOKEN"] = "refresh_token";
10
- StorageKey2["APP_TOKEN"] = "app_token";
11
- StorageKey2["NEXT_LOCATION"] = "next.location";
12
- StorageKey2["NEXT_SEARCH"] = "next.search";
13
- StorageKey2["AXIOS_CACHE"] = "axios.cache";
14
- StorageKey2["COMPACT_JSON"] = "compact_json_view";
15
- StorageKey2["FLATTEN_JSON"] = "flatten_json_view";
16
- StorageKey2["PAGE_COUNT"] = "page_count";
17
- StorageKey2["CLUE_CACHE"] = "results";
18
- StorageKey2["LOGIN_NONCE"] = "login_nonce";
19
- StorageKey2["COLOR_SCHEME"] = "color.scheme";
20
- StorageKey2["SHOW_DIRECTIONALITY"] = "show.directionality";
21
- StorageKey2["SHOW_CARDS"] = "show.cards";
22
- StorageKey2["CARD_CUTOFF"] = "card.cutoff";
23
- StorageKey2["SHOW_MOUSE_POS"] = "show.mouse.position";
24
- StorageKey2["SHOW_COORDINATES"] = "show.coordinates";
25
- StorageKey2["PANEL_LOCATION"] = "panel.location";
26
- StorageKey2["FORCE_COLOR_SETTING"] = "force.color.setting";
27
- return StorageKey2;
28
- })(StorageKey || {});
29
- const BUNDLE_SEPARATOR = "-X-";
1
+ const n = void 0, c = !1, C = void 0, s = !1, _ = "clue.ui", A = `${_}.cache`;
2
+ var E = /* @__PURE__ */ ((O) => (O.PROVIDER = "provider", O.REFRESH_TOKEN = "refresh_token", O.APP_TOKEN = "app_token", O.NEXT_LOCATION = "next.location", O.NEXT_SEARCH = "next.search", O.AXIOS_CACHE = "axios.cache", O.COMPACT_JSON = "compact_json_view", O.FLATTEN_JSON = "flatten_json_view", O.PAGE_COUNT = "page_count", O.CLUE_CACHE = "results", O.LOGIN_NONCE = "login_nonce", O.COLOR_SCHEME = "color.scheme", O.SHOW_DIRECTIONALITY = "show.directionality", O.SHOW_CARDS = "show.cards", O.CARD_CUTOFF = "card.cutoff", O.SHOW_MOUSE_POS = "show.mouse.position", O.SHOW_COORDINATES = "show.coordinates", O.PANEL_LOCATION = "panel.location", O.FORCE_COLOR_SETTING = "force.color.setting", O))(E || {});
3
+ const o = "-X-";
30
4
  export {
31
- BUNDLE_SEPARATOR,
32
- CLUE_API,
33
- LOCAL,
34
- MY_LOCAL_STORAGE_PREFIX,
35
- MY_SESSION_STORAGE_PREFIX,
36
- REPLICATE,
37
- StorageKey,
38
- VERSION
5
+ o as BUNDLE_SEPARATOR,
6
+ n as CLUE_API,
7
+ c as LOCAL,
8
+ _ as MY_LOCAL_STORAGE_PREFIX,
9
+ A as MY_SESSION_STORAGE_PREFIX,
10
+ s as REPLICATE,
11
+ E as StorageKey,
12
+ C as VERSION
39
13
  };
package/utils/graph.js CHANGED
@@ -1,79 +1,52 @@
1
- const cyrb53 = (str, seed = 0) => {
2
- let h1 = 3735928559 ^ seed, h2 = 1103547991 ^ seed;
3
- for (let i = 0, ch; i < str.length; i++) {
4
- ch = str.charCodeAt(i);
5
- h1 = Math.imul(h1 ^ ch, 2654435761);
6
- h2 = Math.imul(h2 ^ ch, 1597334677);
7
- }
8
- h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507);
9
- h1 ^= Math.imul(h2 ^ h2 >>> 13, 3266489909);
10
- h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507);
11
- h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
12
- return parseFloat(`0.${4294967296 * (2097151 & h2) + (h1 >>> 0)}`);
13
- };
14
- const cssImportant = (property) => `${property} !important`;
15
- const findNode = (nodeId, flatNodes) => {
16
- return flatNodes.find((node) => node.id === nodeId);
17
- };
18
- const getPathToRoot = (nodeId, data) => {
19
- const getRoot = (currNodeId, results) => {
20
- if (results.has(currNodeId)) {
21
- return results;
22
- }
23
- let newResults = results.add(currNodeId);
24
- const currNode = findNode(currNodeId, data.flat());
25
- if (currNode == null ? void 0 : currNode.edges) {
26
- currNode == null ? void 0 : currNode.edges.forEach((parent) => {
27
- newResults = getRoot(parent, results);
28
- });
29
- }
30
- return newResults;
1
+ const u = (n, i = 0) => {
2
+ let t = 3735928559 ^ i, e = 1103547991 ^ i;
3
+ for (let s = 0, a; s < n.length; s++)
4
+ a = n.charCodeAt(s), t = Math.imul(t ^ a, 2654435761), e = Math.imul(e ^ a, 1597334677);
5
+ return t = Math.imul(t ^ t >>> 16, 2246822507), t ^= Math.imul(e ^ e >>> 13, 3266489909), e = Math.imul(e ^ e >>> 16, 2246822507), e ^= Math.imul(t ^ t >>> 13, 3266489909), parseFloat(`0.${4294967296 * (2097151 & e) + (t >>> 0)}`);
6
+ }, p = (n) => `${n} !important`, f = (n, i) => i.find((t) => t.id === n), o = (n, i) => {
7
+ const t = (e, s) => {
8
+ if (s.has(e))
9
+ return s;
10
+ let a = s.add(e);
11
+ const h = f(e, i.flat());
12
+ return h != null && h.edges && (h == null || h.edges.forEach((l) => {
13
+ a = t(l, s);
14
+ })), a;
31
15
  };
32
- return getRoot(nodeId, /* @__PURE__ */ new Set());
33
- };
34
- const getAllChildren = (nodeId, data) => {
35
- const getChildren = (currNodeId, results) => {
36
- if (results.has(currNodeId)) {
37
- return results;
38
- }
39
- let newResults = results.add(currNodeId);
40
- const currNode = findNode(currNodeId, data.flat());
41
- const directChildren = data.flat().filter((n) => {
42
- var _a;
43
- return (_a = n.edges) == null ? void 0 : _a.includes(currNode == null ? void 0 : currNode.id);
16
+ return t(n, /* @__PURE__ */ new Set());
17
+ }, g = (n, i) => {
18
+ const t = (e, s) => {
19
+ if (s.has(e))
20
+ return s;
21
+ let a = s.add(e);
22
+ const h = f(e, i.flat()), l = i.flat().filter((r) => {
23
+ var c;
24
+ return (c = r.edges) == null ? void 0 : c.includes(h == null ? void 0 : h.id);
44
25
  });
45
- if (directChildren) {
46
- directChildren.forEach((child) => {
47
- newResults = getChildren(child.id, newResults);
48
- });
49
- }
50
- return newResults;
26
+ return l && l.forEach((r) => {
27
+ a = t(r.id, a);
28
+ }), a;
51
29
  };
52
- return getChildren(nodeId, /* @__PURE__ */ new Set());
53
- };
54
- const getSubGraphNodeSet = (nodeId, data) => {
55
- if (!data) {
56
- return new Set(nodeId);
57
- }
58
- const ancestors = getPathToRoot(nodeId, data);
59
- const descendents = getAllChildren(nodeId, data);
60
- return /* @__PURE__ */ new Set([nodeId, ...ancestors, ...descendents]);
61
- };
62
- const createSubGraph = (nodeId, dataset) => {
63
- const subGraphNodes = getSubGraphNodeSet(nodeId, dataset.data);
64
- const newData = dataset.data.map(
65
- (level) => level.filter((node) => subGraphNodes.has(node.id)).map((node) => {
66
- var _a;
67
- return { ...node, edges: (_a = node == null ? void 0 : node.edges) == null ? void 0 : _a.filter((edge) => subGraphNodes.has(edge)) };
30
+ return t(n, /* @__PURE__ */ new Set());
31
+ }, m = (n, i) => {
32
+ if (!i)
33
+ return new Set(n);
34
+ const t = o(n, i), e = g(n, i);
35
+ return /* @__PURE__ */ new Set([n, ...t, ...e]);
36
+ }, w = (n, i) => {
37
+ const t = m(n, i.data);
38
+ return i.data.map(
39
+ (s) => s.filter((a) => t.has(a.id)).map((a) => {
40
+ var h;
41
+ return { ...a, edges: (h = a == null ? void 0 : a.edges) == null ? void 0 : h.filter((l) => t.has(l)) };
68
42
  })
69
- ).filter((level) => level.length > 0);
70
- return newData;
43
+ ).filter((s) => s.length > 0);
71
44
  };
72
45
  export {
73
- createSubGraph,
74
- cssImportant,
75
- cyrb53,
76
- getAllChildren,
77
- getPathToRoot,
78
- getSubGraphNodeSet
46
+ w as createSubGraph,
47
+ p as cssImportant,
48
+ u as cyrb53,
49
+ g as getAllChildren,
50
+ o as getPathToRoot,
51
+ m as getSubGraphNodeSet
79
52
  };
package/utils/hashUtil.js CHANGED
@@ -1,11 +1,11 @@
1
- function simpleHash(value) {
2
- let hash = 0;
3
- for (let i = 0; i < value.length; i++) {
4
- const char = value.charCodeAt(i);
5
- hash = (hash << 5) - hash + char;
1
+ function n(e) {
2
+ let t = 0;
3
+ for (let r = 0; r < e.length; r++) {
4
+ const h = e.charCodeAt(r);
5
+ t = (t << 5) - t + h;
6
6
  }
7
- return (hash >>> 0).toString(36).padStart(7, "0");
7
+ return (t >>> 0).toString(36).padStart(7, "0");
8
8
  }
9
9
  export {
10
- simpleHash
10
+ n as simpleHash
11
11
  };
package/utils/line.js CHANGED
@@ -1,136 +1,86 @@
1
- const buildHorizontalLine = ({
2
- paddingAtLevel,
3
- numLines,
4
- distanceX,
5
- distanceY,
6
- childX,
7
- childY,
8
- childHeight,
9
- parentX,
10
- parentY,
11
- linePaddingX,
12
- nodeLocations,
13
- dest,
14
- arcRadius
1
+ const w = ({
2
+ paddingAtLevel: m,
3
+ numLines: q,
4
+ distanceX: V,
5
+ distanceY: j,
6
+ childX: x,
7
+ childY: f,
8
+ childHeight: b,
9
+ parentX: z,
10
+ parentY: A,
11
+ linePaddingX: k,
12
+ nodeLocations: L,
13
+ dest: v,
14
+ arcRadius: $
15
15
  }) => {
16
- const d = [];
17
- const verticalLineX = childX - (paddingAtLevel - numLines) * linePaddingX;
18
- if (distanceX === 0) {
19
- if (distanceY === 0) {
20
- d.push(
21
- `M ${parentX} ${parentY}`,
22
- `L ${parentX - linePaddingX + 3} ${parentY}`,
23
- `A 3 3 90 0 0 ${verticalLineX} ${parentY + 3}`
24
- );
25
- d.push(
26
- `L ${verticalLineX} ${nodeLocations[dest.id][1] - 3}`,
27
- `A 3 3 90 0 0 ${verticalLineX + 3} ${nodeLocations[dest.id][1]}`,
28
- `L ${childX} ${nodeLocations[dest.id][1]}`
29
- );
30
- } else {
31
- d.push(`M ${parentX} ${parentY}`, `L ${verticalLineX + arcRadius} ${parentY}`);
32
- if (Math.sign(distanceY) < 0) {
33
- d.push(
34
- `A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY - arcRadius}`,
35
- `L ${verticalLineX} ${childY + arcRadius}`,
36
- `A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX + arcRadius} ${childY}`
37
- );
38
- } else {
39
- d.push(
40
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY + arcRadius}`,
41
- `L ${verticalLineX} ${childY - arcRadius}`,
42
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX + arcRadius} ${childY}`
43
- );
44
- }
45
- d.push(`L ${childX} ${childY}`);
46
- }
47
- } else {
48
- d.push(`M ${parentX} ${parentY}`);
49
- if (Math.sign(distanceY) < 0) {
50
- if (Math.sign(distanceX) < 0) {
51
- d.push(
52
- `L ${verticalLineX + arcRadius} ${parentY}`,
53
- `A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY - arcRadius}`
54
- );
55
- } else {
56
- d.push(
57
- `L ${verticalLineX - arcRadius} ${parentY}`,
58
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY - arcRadius}`
59
- );
60
- }
61
- d.push(
62
- `L ${verticalLineX} ${childY + childHeight / 2 + arcRadius}`,
63
- `A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
64
- );
65
- } else {
66
- if (Math.sign(distanceX) < 0) {
67
- d.push(
68
- `L ${verticalLineX + arcRadius} ${parentY}`,
69
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY + arcRadius}`
70
- );
71
- } else {
72
- d.push(
73
- `L ${verticalLineX - arcRadius} ${parentY}`,
74
- `A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY + arcRadius}`
75
- );
76
- }
77
- d.push(
78
- `L ${verticalLineX} ${childY + childHeight / 2 - arcRadius}`,
79
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
80
- );
81
- }
82
- d.push(`L ${childX} ${childY + childHeight / 2}`);
83
- }
84
- return d;
85
- };
86
- const buildVerticalLine = ({
87
- paddingAtLevel,
88
- numLines,
89
- distanceX,
90
- distanceY,
91
- childX,
92
- childY,
93
- childHeight,
94
- parentX,
95
- parentY,
96
- linePaddingX,
97
- arcRadius
16
+ const o = [], M = x - (m - q) * k;
17
+ return V === 0 ? j === 0 ? (o.push(
18
+ `M ${z} ${A}`,
19
+ `L ${z - k + 3} ${A}`,
20
+ `A 3 3 90 0 0 ${M} ${A + 3}`
21
+ ), o.push(
22
+ `L ${M} ${L[v.id][1] - 3}`,
23
+ `A 3 3 90 0 0 ${M + 3} ${L[v.id][1]}`,
24
+ `L ${x} ${L[v.id][1]}`
25
+ )) : (o.push(`M ${z} ${A}`, `L ${M + $} ${A}`), Math.sign(j) < 0 ? o.push(
26
+ `A ${$} ${$} 90 0 1 ${M} ${A - $}`,
27
+ `L ${M} ${f + $}`,
28
+ `A ${$} ${$} 90 0 1 ${M + $} ${f}`
29
+ ) : o.push(
30
+ `A ${$} ${$} 90 0 0 ${M} ${A + $}`,
31
+ `L ${M} ${f - $}`,
32
+ `A ${$} ${$} 90 0 0 ${M + $} ${f}`
33
+ ), o.push(`L ${x} ${f}`)) : (o.push(`M ${z} ${A}`), Math.sign(j) < 0 ? (Math.sign(V) < 0 ? o.push(
34
+ `L ${M + $} ${A}`,
35
+ `A ${$} ${$} 90 0 1 ${M} ${A - $}`
36
+ ) : o.push(
37
+ `L ${M - $} ${A}`,
38
+ `A ${$} ${$} 90 0 0 ${M} ${A - $}`
39
+ ), o.push(
40
+ `L ${M} ${f + b / 2 + $}`,
41
+ `A ${$} ${$} 90 0 1 ${M + $} ${f + b / 2}`
42
+ )) : (Math.sign(V) < 0 ? o.push(
43
+ `L ${M + $} ${A}`,
44
+ `A ${$} ${$} 90 0 0 ${M} ${A + $}`
45
+ ) : o.push(
46
+ `L ${M - $} ${A}`,
47
+ `A ${$} ${$} 90 0 1 ${M} ${A + $}`
48
+ ), o.push(
49
+ `L ${M} ${f + b / 2 - $}`,
50
+ `A ${$} ${$} 90 0 0 ${M + $} ${f + b / 2}`
51
+ )), o.push(`L ${x} ${f + b / 2}`)), o;
52
+ }, y = ({
53
+ paddingAtLevel: m,
54
+ numLines: q,
55
+ distanceX: V,
56
+ distanceY: j,
57
+ childX: x,
58
+ childY: f,
59
+ childHeight: b,
60
+ parentX: z,
61
+ parentY: A,
62
+ linePaddingX: k,
63
+ arcRadius: L
98
64
  }) => {
99
- const d = [];
100
- const verticalLineX = (Math.sign(distanceY) < 0 ? childX : parentX) - (paddingAtLevel - numLines) * linePaddingX;
101
- if (distanceX === 0) {
102
- d.push(`M ${parentX} ${parentY}`, `L ${childX} ${childY}`);
103
- } else {
104
- d.push(`M ${parentX} ${parentY}`);
105
- if (Math.sign(distanceY) < 0) {
106
- if (Math.sign(distanceX) < 0) {
107
- d.push(
108
- `L ${verticalLineX + arcRadius} ${parentY}`,
109
- `A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX} ${parentY - arcRadius}`,
110
- `L ${verticalLineX} ${childY + childHeight / 2 + arcRadius}`,
111
- `A ${arcRadius} ${arcRadius} 90 0 1 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
112
- );
113
- } else {
114
- d.push(
115
- `L ${verticalLineX - arcRadius} ${parentY}`,
116
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY - arcRadius}`,
117
- `L ${verticalLineX} ${childY + childHeight / 2 + arcRadius}`,
118
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX - arcRadius} ${childY + childHeight / 2}`
119
- );
120
- }
121
- } else {
122
- d.push(
123
- `L ${verticalLineX + arcRadius} ${parentY}`,
124
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX} ${parentY + arcRadius}`,
125
- `L ${verticalLineX} ${childY + childHeight / 2 - arcRadius}`,
126
- `A ${arcRadius} ${arcRadius} 90 0 0 ${verticalLineX + arcRadius} ${childY + childHeight / 2}`
127
- );
128
- }
129
- d.push(`L ${childX} ${childY + childHeight / 2}`);
130
- }
131
- return d;
65
+ const v = [], $ = (Math.sign(j) < 0 ? x : z) - (m - q) * k;
66
+ return V === 0 ? v.push(`M ${z} ${A}`, `L ${x} ${f}`) : (v.push(`M ${z} ${A}`), Math.sign(j) < 0 ? Math.sign(V) < 0 ? v.push(
67
+ `L ${$ + L} ${A}`,
68
+ `A ${L} ${L} 90 0 1 ${$} ${A - L}`,
69
+ `L ${$} ${f + b / 2 + L}`,
70
+ `A ${L} ${L} 90 0 1 ${$ + L} ${f + b / 2}`
71
+ ) : v.push(
72
+ `L ${$ - L} ${A}`,
73
+ `A ${L} ${L} 90 0 0 ${$} ${A - L}`,
74
+ `L ${$} ${f + b / 2 + L}`,
75
+ `A ${L} ${L} 90 0 0 ${$ - L} ${f + b / 2}`
76
+ ) : v.push(
77
+ `L ${$ + L} ${A}`,
78
+ `A ${L} ${L} 90 0 0 ${$} ${A + L}`,
79
+ `L ${$} ${f + b / 2 - L}`,
80
+ `A ${L} ${L} 90 0 0 ${$ + L} ${f + b / 2}`
81
+ ), v.push(`L ${x} ${f + b / 2}`)), v;
132
82
  };
133
83
  export {
134
- buildHorizontalLine,
135
- buildVerticalLine
84
+ w as buildHorizontalLine,
85
+ y as buildVerticalLine
136
86
  };
@@ -1,8 +1,6 @@
1
- const clueDebugLogger = (message, loggingEnabled) => {
2
- if (loggingEnabled) {
3
- console.debug(message);
4
- }
1
+ const g = (e, o) => {
2
+ o && console.debug(e);
5
3
  };
6
4
  export {
7
- clueDebugLogger
5
+ g as clueDebugLogger
8
6
  };
@@ -1,10 +1,10 @@
1
1
  import "./constants.js";
2
- import { b, g, a, r, s, c } from "../sessionStorage-B68y-wnE.js";
2
+ import { b as o, g as t, a as r, r as d, s as i, c as m } from "../sessionStorage-DFMae61b.js";
3
3
  export {
4
- b as buildName,
5
- g as getAxiosCache,
6
- a as getStored,
7
- r as removeStored,
8
- s as setAxiosCache,
9
- c as setStored
4
+ o as buildName,
5
+ t as getAxiosCache,
6
+ r as getStored,
7
+ d as removeStored,
8
+ i as setAxiosCache,
9
+ m as setStored
10
10
  };