@cccsaurora/clue-ui 1.0.1-dev.57 → 1.0.1

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 (180) hide show
  1. package/ActionForm-WIj7BfD5.js +340 -0
  2. package/AnnotationPreview-DWRDhxUB.js +140 -0
  3. package/ClueEnrichContext-CbJVBm4w.js +397 -0
  4. package/FlexOne-BXWFOd1T.js +6 -0
  5. package/_Map-DXNg_Z-q.js +54 -0
  6. package/_MapCache-Cu25RRDU.js +129 -0
  7. package/_Uint8Array-DlJCtTvG.js +102 -0
  8. package/_baseAssignValue-CUmzp727.js +20 -0
  9. package/_baseClone-BlMmRXeX.js +208 -0
  10. package/_baseExtremum-P_0akmCi.js +27 -0
  11. package/_baseFlatten-CN7vDNEQ.js +72 -0
  12. package/_baseGet-Dgf6_xCm.js +80 -0
  13. package/_baseIsEqual-Cpjtfb3Q.js +173 -0
  14. package/_baseIteratee-CP1bocOX.js +95 -0
  15. package/_baseSlice-M5RKzt1A.js +10 -0
  16. package/_baseSum-wEbgNeUs.js +10 -0
  17. package/_baseUniq-tMFmk80M.js +61 -0
  18. package/_commonjsHelpers-C6fGbg64.js +6 -0
  19. package/_createAggregator-B4Cav8ZM.js +53 -0
  20. package/_getPrototype-CHAFQYL_.js +5 -0
  21. package/_getTag-BV_UoLYG.js +90 -0
  22. package/cloneDeep-BPVpFBzJ.js +8 -0
  23. package/components/AnnotationBody.js +34 -49
  24. package/components/AnnotationDetailPopover.js +30 -36
  25. package/components/AnnotationDetails.js +94 -109
  26. package/components/AnnotationEntry.js +52 -50
  27. package/components/AnnotationPreview.js +5 -5
  28. package/components/ClassificationChip.js +23 -44
  29. package/components/CountBadge.js +26 -31
  30. package/components/EnrichedCard.js +92 -104
  31. package/components/EnrichedChip.js +109 -134
  32. package/components/EnrichedTypography.js +110 -136
  33. package/components/ErrorBoundary.js +24 -28
  34. package/components/RetryFailedEnrichments.js +9 -10
  35. package/components/SourcePicker.js +49 -57
  36. package/components/actions/ActionForm.js +4 -4
  37. package/components/actions/ExecutePopover.js +50 -64
  38. package/components/actions/ResultModal.js +34 -37
  39. package/components/actions/form/schemaAdapter.js +20 -39
  40. package/components/display/graph/ExpandMoreButton.js +10 -10
  41. package/components/display/graph/elements/NodeCard.js +76 -92
  42. package/components/display/graph/elements/NodeTag.js +13 -15
  43. package/components/display/graph/index.js +200 -258
  44. package/components/display/graph/visualizations/Leaf.js +69 -88
  45. package/components/display/graph/visualizations/cloud/index.js +81 -98
  46. package/components/display/graph/visualizations/icons/BaseIcon.js +21 -26
  47. package/components/display/graph/visualizations/icons/BugIcon.js +12 -12
  48. package/components/display/graph/visualizations/icons/HostIcon.js +12 -12
  49. package/components/display/graph/visualizations/icons/NetworkIcon.js +12 -12
  50. package/components/display/graph/visualizations/icons/ProcessIcon.js +12 -12
  51. package/components/display/graph/visualizations/icons/TargetIcon.js +13 -13
  52. package/components/display/graph/visualizations/icons/index.js +13 -14
  53. package/components/display/graph/visualizations/panels/NodePanel.js +8 -10
  54. package/components/display/graph/visualizations/tree/BundleLine.js +81 -108
  55. package/components/display/graph/visualizations/tree/Triangle.js +13 -13
  56. package/components/display/graph/visualizations/tree/index.js +305 -407
  57. package/components/display/icons/Iconified.js +12 -27
  58. package/components/display/json/index.js +4 -4
  59. package/components/display/markdown/DynamicTabs.js +17 -22
  60. package/components/display/markdown/index.js +5674 -8531
  61. package/components/display/markdown/markdownPlugins/tabs.js +1 -1
  62. package/components/enrichment/EnrichPopover.js +47 -55
  63. package/components/fetchers/Fetcher.js +95 -123
  64. package/components/fetchers/PreviewModal.js +17 -20
  65. package/components/fetchers/StatusChip.js +18 -22
  66. package/components/group/Entry.js +11 -13
  67. package/components/group/Group.js +10 -13
  68. package/components/group/GroupControl.js +65 -76
  69. package/components/stats/QueryStatus.js +28 -37
  70. package/countBy-DOutsa_w.js +8 -0
  71. package/data/event.js +4 -6
  72. package/database/index.js +2 -2
  73. package/debounce-DryYcbJ4.js +56 -0
  74. package/get-Bow1vKwx.js +8 -0
  75. package/groupBy-BheQYl6f.js +8 -0
  76. package/hooks/ClueActionContext.js +6 -6
  77. package/hooks/ClueComponentContext.js +23 -29
  78. package/hooks/ClueConfigProvider.js +12 -14
  79. package/hooks/ClueDatabaseContext.js +13 -19
  80. package/hooks/ClueEnrichContext.js +8 -8
  81. package/hooks/ClueFetcherContext.js +46 -74
  82. package/hooks/ClueGroupContext.js +14 -17
  83. package/hooks/CluePopupContext.js +5 -5
  84. package/hooks/ClueProvider.js +10 -12
  85. package/hooks/selectors.js +11 -22
  86. package/hooks/useAnnotations.js +32 -48
  87. package/hooks/useClue.js +4 -6
  88. package/hooks/useClueActions.js +3 -3
  89. package/hooks/useClueConfig.js +5 -5
  90. package/hooks/useClueTypeConfig.js +3 -3
  91. package/hooks/useComparator.js +435 -722
  92. package/hooks/useErrors.js +18 -22
  93. package/hooks/useMyHighlights.js +36 -66
  94. package/hooks/useMyLocalStorage.js +43 -63
  95. package/iconify-BBckr5AQ.js +1263 -0
  96. package/icons/Action.js +49 -66
  97. package/icons/Assessment.js +68 -84
  98. package/icons/Context.js +61 -75
  99. package/icons/Opinion.js +65 -77
  100. package/icons/iconMap.js +2 -2
  101. package/identity-ByMq8VxU.js +6 -0
  102. package/index-4YFAh_sa.js +358 -0
  103. package/index-E7g8cRyW.js +568 -0
  104. package/index-HuYhutsd.js +975 -0
  105. package/index-WvFmjbxF.js +12734 -0
  106. package/index-p5_wX7q1.js +11729 -0
  107. package/isEmpty-g47Qir2A.js +21 -0
  108. package/isNil-CjWwlQS3.js +6 -0
  109. package/isObject-B53jY8Qg.js +7 -0
  110. package/isObjectLike-BatpeCIi.js +29 -0
  111. package/isSymbol-C3_SC0Qp.js +8 -0
  112. package/isUndefined-DiNCDKoz.js +10 -0
  113. package/last-7CdUxN0r.js +7 -0
  114. package/main.js +68 -68
  115. package/package.json +1 -1
  116. package/sortBy-ITdmD17L.js +79 -0
  117. package/sumBy-DxJUU2E8.js +8 -0
  118. package/tabs-CgADNA57.js +195 -0
  119. package/text/Frequency.js +23 -42
  120. package/toFinite-BMy6GObD.js +14 -0
  121. package/toNumber-YVhnnJv4.js +31 -0
  122. package/useClueTypeConfig-BQ33EiyB.js +2273 -0
  123. package/utils/chain.js +64 -91
  124. package/utils/classificationParser.js +254 -504
  125. package/utils/constants.js +10 -35
  126. package/utils/graph.js +45 -72
  127. package/utils/hashUtil.js +7 -7
  128. package/utils/line.js +81 -131
  129. package/utils/loggerUtil.js +3 -5
  130. package/utils/sessionStorage.js +29 -41
  131. package/utils/utils.js +9 -9
  132. package/utils/window.js +10 -21
  133. package/utils-C_RX5uMP.js +2704 -0
  134. package/ActionForm-c5hLIfQ-.js +0 -436
  135. package/AnnotationPreview-BvNpZOP0.js +0 -188
  136. package/ClueEnrichContext-m-4vn9rz.js +0 -518
  137. package/FlexOne-BSYAhhtG.js +0 -9
  138. package/_Map-kgDsDYxq.js +0 -64
  139. package/_MapCache-DabaaWfq.js +0 -161
  140. package/_Uint8Array-BlVVH1tp.js +0 -129
  141. package/_baseAssignValue-CNbcU6Nb.js +0 -25
  142. package/_baseClone-D3a8Pa4T.js +0 -284
  143. package/_baseExtremum-B1o1zHjR.js +0 -33
  144. package/_baseFlatten-D4huXoEI.js +0 -92
  145. package/_baseGet-BSK_nnoz.js +0 -109
  146. package/_baseIsEqual-B5xLoweL.js +0 -238
  147. package/_baseIteratee-p6Nj07-n.js +0 -126
  148. package/_baseSlice-GAv_YFTT.js +0 -20
  149. package/_baseSum-D0WC1dN0.js +0 -13
  150. package/_baseUniq-CpupKWcL.js +0 -89
  151. package/_commonjsHelpers-CUmg6egw.js +0 -6
  152. package/_createAggregator-BpVy5xMi.js +0 -63
  153. package/_getPrototype-D1LAdQKO.js +0 -5
  154. package/_getTag-D3ToyefI.js +0 -126
  155. package/cloneDeep-CjP5k9zW.js +0 -8
  156. package/countBy-C69WslUA.js +0 -14
  157. package/debounce-bV0h5FC5.js +0 -92
  158. package/get-D3C3lEU3.js +0 -8
  159. package/groupBy-DC2oOuBN.js +0 -14
  160. package/iconify-CXMreGTg.js +0 -1782
  161. package/identity-CPGTqrE4.js +0 -6
  162. package/index-BDVjGvMI.js +0 -696
  163. package/index-BDrtH5ec.js +0 -465
  164. package/index-BbPn6-Mw.js +0 -15750
  165. package/index-C9lySIVX.js +0 -1172
  166. package/index-Dn2NHyXg.js +0 -17654
  167. package/isEmpty-BQkZubqU.js +0 -29
  168. package/isNil-CIubwp4T.js +0 -6
  169. package/isObject-FTY-5JQX.js +0 -7
  170. package/isObjectLike-OAgjjZye.js +0 -48
  171. package/isSymbol-Xd2FsJyp.js +0 -8
  172. package/isUndefined-CE8h73dH.js +0 -10
  173. package/last-CUCl67Im.js +0 -7
  174. package/sortBy-B-UKp4GT.js +0 -100
  175. package/sumBy-MYkDPHZL.js +0 -8
  176. package/tabs-xGuUGsJd.js +0 -254
  177. package/toFinite-Bc55msYj.js +0 -16
  178. package/toNumber-DPxy1FBy.js +0 -39
  179. package/useClueTypeConfig-D4zcy8Gr.js +0 -3184
  180. package/utils-CxIhC2xH.js +0 -4182
@@ -0,0 +1,21 @@
1
+ import { i, a as o, b as e, c as n, g as a, d as f, e as p } from "./_getTag-BV_UoLYG.js";
2
+ import { i as y } from "./_Map-DXNg_Z-q.js";
3
+ var g = "[object Map]", c = "[object Set]", m = Object.prototype, b = m.hasOwnProperty;
4
+ function A(r) {
5
+ if (r == null)
6
+ return !0;
7
+ if (i(r) && (y(r) || typeof r == "string" || typeof r.splice == "function" || o(r) || e(r) || n(r)))
8
+ return !r.length;
9
+ var t = a(r);
10
+ if (t == g || t == c)
11
+ return !r.size;
12
+ if (f(r))
13
+ return !p(r).length;
14
+ for (var s in r)
15
+ if (b.call(r, s))
16
+ return !1;
17
+ return !0;
18
+ }
19
+ export {
20
+ A as i
21
+ };
@@ -0,0 +1,6 @@
1
+ function n(i) {
2
+ return i == null;
3
+ }
4
+ export {
5
+ n as i
6
+ };
@@ -0,0 +1,7 @@
1
+ function e(t) {
2
+ var n = typeof t;
3
+ return t != null && (n == "object" || n == "function");
4
+ }
5
+ export {
6
+ e as i
7
+ };
@@ -0,0 +1,29 @@
1
+ var f = typeof global == "object" && global && global.Object === Object && global, l = typeof self == "object" && self && self.Object === Object && self, g = f || l || Function("return this")(), r = g.Symbol, o = Object.prototype, s = o.hasOwnProperty, j = o.toString, e = r ? r.toStringTag : void 0;
2
+ function d(t) {
3
+ var a = s.call(t, e), i = t[e];
4
+ try {
5
+ t[e] = void 0;
6
+ var c = !0;
7
+ } catch {
8
+ }
9
+ var b = j.call(t);
10
+ return c && (a ? t[e] = i : delete t[e]), b;
11
+ }
12
+ var O = Object.prototype, S = O.toString;
13
+ function T(t) {
14
+ return S.call(t);
15
+ }
16
+ var u = "[object Null]", y = "[object Undefined]", n = r ? r.toStringTag : void 0;
17
+ function v(t) {
18
+ return t == null ? t === void 0 ? y : u : n && n in Object(t) ? d(t) : T(t);
19
+ }
20
+ function h(t) {
21
+ return t != null && typeof t == "object";
22
+ }
23
+ export {
24
+ r as S,
25
+ v as b,
26
+ f,
27
+ h as i,
28
+ g as r
29
+ };
@@ -0,0 +1,8 @@
1
+ import { i as b, b as s } from "./isObjectLike-BatpeCIi.js";
2
+ var t = "[object Symbol]";
3
+ function e(o) {
4
+ return typeof o == "symbol" || b(o) && s(o) == t;
5
+ }
6
+ export {
7
+ e as i
8
+ };
@@ -0,0 +1,10 @@
1
+ function e(n) {
2
+ return n === null;
3
+ }
4
+ function i(n) {
5
+ return n === void 0;
6
+ }
7
+ export {
8
+ i as a,
9
+ e as i
10
+ };
@@ -0,0 +1,7 @@
1
+ function l(n) {
2
+ var e = n == null ? 0 : n.length;
3
+ return e ? n[e - 1] : void 0;
4
+ }
5
+ export {
6
+ l
7
+ };
package/main.js CHANGED
@@ -1,70 +1,70 @@
1
- import { A, u, u as u2 } from "./ActionForm-c5hLIfQ-.js";
2
- import { default as default2 } from "./components/AnnotationDetailPopover.js";
3
- import { default as default3 } from "./components/AnnotationDetails.js";
4
- import { default as default4 } from "./components/AnnotationEntry.js";
5
- import { A as A2, C, C as C2 } from "./AnnotationPreview-BvNpZOP0.js";
6
- import { default as default5 } from "./components/CountBadge.js";
7
- import { default as default6 } from "./components/EnrichedCard.js";
8
- import { default as default7 } from "./components/EnrichedChip.js";
9
- import { default as default8 } from "./components/EnrichedTypography.js";
10
- import { default as default9 } from "./components/fetchers/Fetcher.js";
11
- import { default as default10 } from "./components/fetchers/StatusChip.js";
12
- import { default as default11 } from "./components/group/Entry.js";
13
- import { default as default12 } from "./components/group/Group.js";
14
- import { default as default13 } from "./components/group/GroupControl.js";
15
- import { default as default14 } from "./components/SourcePicker.js";
16
- import { SNACKBAR_EVENT_ID } from "./data/event.js";
17
- import { b } from "./index-Dn2NHyXg.js";
18
- import { ClueComponentContext, ClueComponentContext as ClueComponentContext2 } from "./hooks/ClueComponentContext.js";
19
- import { ClueDatabaseContext, ClueDatabaseContext as ClueDatabaseContext2 } from "./hooks/ClueDatabaseContext.js";
20
- import { C as C3, C as C4 } from "./ClueEnrichContext-m-4vn9rz.js";
21
- import { ClueProvider, ClueProvider as ClueProvider2 } from "./hooks/ClueProvider.js";
22
- import { useClueActionsSelector, useClueEnrichSelector, useClueFetcherSelector, useClueActionsSelector as useClueActionsSelector2, useClueEnrichSelector as useClueEnrichSelector2, useClueFetcherSelector as useClueFetcherSelector2 } from "./hooks/selectors.js";
23
- import { default as default15, default as default16 } from "./hooks/useClue.js";
24
- import { default as default17 } from "./icons/Assessment.js";
25
- import { default as default18 } from "./icons/Context.js";
26
- import { default as default19 } from "./icons/Opinion.js";
27
- import { default as default20 } from "./text/Frequency.js";
1
+ import { A as t, u as r, u as a } from "./ActionForm-WIj7BfD5.js";
2
+ import { default as u } from "./components/AnnotationDetailPopover.js";
3
+ import { default as n } from "./components/AnnotationDetails.js";
4
+ import { default as p } from "./components/AnnotationEntry.js";
5
+ import { A as C, C as x, C as c } from "./AnnotationPreview-DWRDhxUB.js";
6
+ import { default as d } from "./components/CountBadge.js";
7
+ import { default as A } from "./components/EnrichedCard.js";
8
+ import { default as E } from "./components/EnrichedChip.js";
9
+ import { default as P } from "./components/EnrichedTypography.js";
10
+ import { default as b } from "./components/fetchers/Fetcher.js";
11
+ import { default as v } from "./components/fetchers/StatusChip.js";
12
+ import { default as I } from "./components/group/Entry.js";
13
+ import { default as g } from "./components/group/Group.js";
14
+ import { default as N } from "./components/group/GroupControl.js";
15
+ import { default as k } from "./components/SourcePicker.js";
16
+ import { SNACKBAR_EVENT_ID as w } from "./data/event.js";
17
+ import { b as O } from "./index-WvFmjbxF.js";
18
+ import { ClueComponentContext as V, ClueComponentContext as j } from "./hooks/ClueComponentContext.js";
19
+ import { ClueDatabaseContext as H, ClueDatabaseContext as J } from "./hooks/ClueDatabaseContext.js";
20
+ import { C as M, C as Q } from "./ClueEnrichContext-CbJVBm4w.js";
21
+ import { ClueProvider as W, ClueProvider as X } from "./hooks/ClueProvider.js";
22
+ import { useClueActionsSelector as Z, useClueEnrichSelector as $, useClueFetcherSelector as ee, useClueActionsSelector as oe, useClueEnrichSelector as te, useClueFetcherSelector as re } from "./hooks/selectors.js";
23
+ import { default as se, default as ue } from "./hooks/useClue.js";
24
+ import { default as ne } from "./icons/Assessment.js";
25
+ import { default as pe } from "./icons/Context.js";
26
+ import { default as Ce } from "./icons/Opinion.js";
27
+ import { default as ce } from "./text/Frequency.js";
28
28
  export {
29
- A as ActionForm,
30
- default2 as AnnotationDetailPopover,
31
- default3 as AnnotationDetails,
32
- default4 as AnnotationEntry,
33
- A2 as AnnotationPreview,
34
- default17 as AssessmentIcon,
35
- ClueComponentContext as BorealisComponentContext,
36
- ClueDatabaseContext as BorealisDatabaseContext,
37
- C3 as BorealisEnrichContext,
38
- C as BorealisPopupContext,
39
- ClueProvider as BorealisProvider,
40
- ClueComponentContext2 as ClueComponentContext,
41
- ClueDatabaseContext2 as ClueDatabaseContext,
42
- C4 as ClueEnrichContext,
43
- C2 as CluePopupContext,
44
- ClueProvider2 as ClueProvider,
45
- default18 as ContextIcon,
46
- default5 as CountBadge,
47
- default6 as EnrichedCard,
48
- default7 as EnrichedChip,
49
- default8 as EnrichedTypography,
50
- default11 as Entry,
51
- default9 as Fetcher,
52
- default20 as FrequencyText,
53
- default12 as Group,
54
- default13 as GroupControl,
55
- default19 as OpinionIcon,
56
- SNACKBAR_EVENT_ID,
57
- default14 as SourcePicker,
58
- default10 as StatusChip,
59
- b as buildDatabase,
60
- default15 as useBorealis,
61
- u as useBorealisActions,
62
- useClueActionsSelector as useBorealisActionsSelector,
63
- useClueEnrichSelector as useBorealisEnrichSelector,
64
- useClueFetcherSelector as useBorealisFetcherSelector,
65
- default16 as useClue,
66
- u2 as useClueActions,
67
- useClueActionsSelector2 as useClueActionsSelector,
68
- useClueEnrichSelector2 as useClueEnrichSelector,
69
- useClueFetcherSelector2 as useClueFetcherSelector
29
+ t as ActionForm,
30
+ u as AnnotationDetailPopover,
31
+ n as AnnotationDetails,
32
+ p as AnnotationEntry,
33
+ C as AnnotationPreview,
34
+ ne as AssessmentIcon,
35
+ V as BorealisComponentContext,
36
+ H as BorealisDatabaseContext,
37
+ M as BorealisEnrichContext,
38
+ x as BorealisPopupContext,
39
+ W as BorealisProvider,
40
+ j as ClueComponentContext,
41
+ J as ClueDatabaseContext,
42
+ Q as ClueEnrichContext,
43
+ c as CluePopupContext,
44
+ X as ClueProvider,
45
+ pe as ContextIcon,
46
+ d as CountBadge,
47
+ A as EnrichedCard,
48
+ E as EnrichedChip,
49
+ P as EnrichedTypography,
50
+ I as Entry,
51
+ b as Fetcher,
52
+ ce as FrequencyText,
53
+ g as Group,
54
+ N as GroupControl,
55
+ Ce as OpinionIcon,
56
+ w as SNACKBAR_EVENT_ID,
57
+ k as SourcePicker,
58
+ v as StatusChip,
59
+ O as buildDatabase,
60
+ se as useBorealis,
61
+ r as useBorealisActions,
62
+ Z as useBorealisActionsSelector,
63
+ $ as useBorealisEnrichSelector,
64
+ ee as useBorealisFetcherSelector,
65
+ ue as useClue,
66
+ a as useClueActions,
67
+ oe as useClueActionsSelector,
68
+ te as useClueEnrichSelector,
69
+ re as useClueFetcherSelector
70
70
  };
package/package.json CHANGED
@@ -62,7 +62,7 @@
62
62
  },
63
63
  "type": "module",
64
64
  "types": "main.d.ts",
65
- "version": "1.0.1-dev.57",
65
+ "version": "1.0.1",
66
66
  "exports": {
67
67
  ".": "./main.js",
68
68
  "./index.css": "./index.css",
@@ -0,0 +1,79 @@
1
+ import { b as A, a as B, i as o } from "./_baseExtremum-P_0akmCi.js";
2
+ import { b as d } from "./_baseIteratee-CP1bocOX.js";
3
+ import { s as x, o as C, b as M } from "./_baseFlatten-CN7vDNEQ.js";
4
+ import { a as g, b as k } from "./_baseGet-Dgf6_xCm.js";
5
+ import { b as w } from "./_createAggregator-B4Cav8ZM.js";
6
+ import { i as E, f as G } from "./_getTag-BV_UoLYG.js";
7
+ import { i as b } from "./isSymbol-C3_SC0Qp.js";
8
+ import { i as s } from "./identity-ByMq8VxU.js";
9
+ import { i as L } from "./_Map-DXNg_Z-q.js";
10
+ function F(r, n) {
11
+ return x(C(r, n, s), r + "");
12
+ }
13
+ function O(r, n) {
14
+ var u = -1, f = E(r) ? Array(r.length) : [];
15
+ return w(r, function(a, i, t) {
16
+ f[++u] = n(a, i, t);
17
+ }), f;
18
+ }
19
+ function X(r, n) {
20
+ return r && r.length ? A(r, d(n), B) : void 0;
21
+ }
22
+ function T(r, n) {
23
+ var u = r.length;
24
+ for (r.sort(n); u--; )
25
+ r[u] = r[u].value;
26
+ return r;
27
+ }
28
+ function U(r, n) {
29
+ if (r !== n) {
30
+ var u = r !== void 0, f = r === null, a = r === r, i = b(r), t = n !== void 0, p = n === null, m = n === n, c = b(n);
31
+ if (!p && !c && !i && r > n || i && t && m && !p && !c || f && t && m || !u && m || !a)
32
+ return 1;
33
+ if (!f && !i && !c && r < n || c && u && a && !f && !i || p && u && a || !t && a || !m)
34
+ return -1;
35
+ }
36
+ return 0;
37
+ }
38
+ function j(r, n, u) {
39
+ for (var f = -1, a = r.criteria, i = n.criteria, t = a.length, p = u.length; ++f < t; ) {
40
+ var m = U(a[f], i[f]);
41
+ if (m) {
42
+ if (f >= p)
43
+ return m;
44
+ var c = u[f];
45
+ return m * (c == "desc" ? -1 : 1);
46
+ }
47
+ }
48
+ return r.index - n.index;
49
+ }
50
+ function q(r, n, u) {
51
+ n.length ? n = g(n, function(i) {
52
+ return L(i) ? function(t) {
53
+ return k(t, i.length === 1 ? i[0] : i);
54
+ } : i;
55
+ }) : n = [s];
56
+ var f = -1;
57
+ n = g(n, G(d));
58
+ var a = O(r, function(i, t, p) {
59
+ var m = g(n, function(c) {
60
+ return c(i);
61
+ });
62
+ return { criteria: m, index: ++f, value: i };
63
+ });
64
+ return T(a, function(i, t) {
65
+ return j(i, t, u);
66
+ });
67
+ }
68
+ var Y = F(function(r, n) {
69
+ if (r == null)
70
+ return [];
71
+ var u = n.length;
72
+ return u > 1 && o(r, n[0], n[1]) ? n = [] : u > 2 && o(n[0], n[1], n[2]) && (n = [n[0]]), q(r, M(n), []);
73
+ });
74
+ export {
75
+ q as a,
76
+ O as b,
77
+ X as m,
78
+ Y as s
79
+ };
@@ -0,0 +1,8 @@
1
+ import { b as s } from "./_baseIteratee-CP1bocOX.js";
2
+ import { b as m } from "./_baseSum-wEbgNeUs.js";
3
+ function n(e, t) {
4
+ return e && e.length ? m(e, s(t)) : 0;
5
+ }
6
+ export {
7
+ n as s
8
+ };
@@ -0,0 +1,195 @@
1
+ const N = (
2
+ // Note: overloads in JSDoc can’t yet use different `@template`s.
3
+ /**
4
+ * @type {(
5
+ * (<Condition extends string>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & {type: Condition}) &
6
+ * (<Condition extends Props>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Condition) &
7
+ * (<Condition extends TestFunction>(test: Condition) => (node: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node & Predicate<Condition, Node>) &
8
+ * ((test?: null | undefined) => (node?: unknown, index?: number | null | undefined, parent?: Parent | null | undefined, context?: unknown) => node is Node) &
9
+ * ((test?: Test) => Check)
10
+ * )}
11
+ */
12
+ /**
13
+ * @param {Test} [test]
14
+ * @returns {Check}
15
+ */
16
+ function(t) {
17
+ if (t == null)
18
+ return E;
19
+ if (typeof t == "function")
20
+ return g(t);
21
+ if (typeof t == "object")
22
+ return Array.isArray(t) ? j(t) : F(t);
23
+ if (typeof t == "string")
24
+ return P(t);
25
+ throw new Error("Expected function, string, or object as test");
26
+ }
27
+ );
28
+ function j(t) {
29
+ const r = [];
30
+ let n = -1;
31
+ for (; ++n < t.length; )
32
+ r[n] = N(t[n]);
33
+ return g(i);
34
+ function i(...e) {
35
+ let c = -1;
36
+ for (; ++c < r.length; )
37
+ if (r[c].apply(this, e)) return !0;
38
+ return !1;
39
+ }
40
+ }
41
+ function F(t) {
42
+ const r = (
43
+ /** @type {Record<string, unknown>} */
44
+ t
45
+ );
46
+ return g(n);
47
+ function n(i) {
48
+ const e = (
49
+ /** @type {Record<string, unknown>} */
50
+ /** @type {unknown} */
51
+ i
52
+ );
53
+ let c;
54
+ for (c in t)
55
+ if (e[c] !== r[c]) return !1;
56
+ return !0;
57
+ }
58
+ }
59
+ function P(t) {
60
+ return g(r);
61
+ function r(n) {
62
+ return n && n.type === t;
63
+ }
64
+ }
65
+ function g(t) {
66
+ return r;
67
+ function r(n, i, e) {
68
+ return !!(I(n) && t.call(
69
+ this,
70
+ n,
71
+ typeof i == "number" ? i : void 0,
72
+ e || void 0
73
+ ));
74
+ }
75
+ }
76
+ function E() {
77
+ return !0;
78
+ }
79
+ function I(t) {
80
+ return t !== null && typeof t == "object" && "type" in t;
81
+ }
82
+ const A = [], S = !0, k = !1, T = "skip";
83
+ function $(t, r, n, i) {
84
+ let e;
85
+ typeof r == "function" && typeof n != "function" ? (i = n, n = r) : e = r;
86
+ const c = N(e), l = i ? -1 : 1;
87
+ f(t, void 0, [])();
88
+ function f(o, p, u) {
89
+ const s = (
90
+ /** @type {Record<string, unknown>} */
91
+ o && typeof o == "object" ? o : {}
92
+ );
93
+ if (typeof s.type == "string") {
94
+ const a = (
95
+ // `hast`
96
+ typeof s.tagName == "string" ? s.tagName : (
97
+ // `xast`
98
+ typeof s.name == "string" ? s.name : void 0
99
+ )
100
+ );
101
+ Object.defineProperty(b, "name", {
102
+ value: "node (" + (o.type + (a ? "<" + a + ">" : "")) + ")"
103
+ });
104
+ }
105
+ return b;
106
+ function b() {
107
+ let a = A, d, y, m;
108
+ if ((!r || c(o, p, u[u.length - 1] || void 0)) && (a = x(n(o, u)), a[0] === k))
109
+ return a;
110
+ if ("children" in o && o.children) {
111
+ const h = (
112
+ /** @type {UnistParent} */
113
+ o
114
+ );
115
+ if (h.children && a[0] !== T)
116
+ for (y = (i ? h.children.length : -1) + l, m = u.concat(h); y > -1 && y < h.children.length; ) {
117
+ const w = h.children[y];
118
+ if (d = f(w, y, m)(), d[0] === k)
119
+ return d;
120
+ y = typeof d[1] == "number" ? d[1] : y + l;
121
+ }
122
+ }
123
+ return a;
124
+ }
125
+ }
126
+ }
127
+ function x(t) {
128
+ return Array.isArray(t) ? t : typeof t == "number" ? [S, t] : t == null ? A : [t];
129
+ }
130
+ function B(t, r, n, i) {
131
+ let e, c, l;
132
+ typeof r == "function" && typeof n != "function" ? (c = void 0, l = r, e = n) : (c = r, l = n, e = i), $(t, c, f, e);
133
+ function f(o, p) {
134
+ const u = p[p.length - 1], s = u ? u.children.indexOf(o) : void 0;
135
+ return l(o, s, u);
136
+ }
137
+ }
138
+ function C(t, r) {
139
+ const { children: n } = r, i = [];
140
+ for (; t++ < n.length; ) {
141
+ const e = n[t];
142
+ if (e && e.type === "code") {
143
+ const c = `${e.lang ?? ""} ${e.meta ?? ""}`.trim();
144
+ if (!c) break;
145
+ const [l] = c.match(new RegExp(`(?<=tab=("|'))(.*?)(?=("|'))`)) ?? [""];
146
+ if (!l) {
147
+ console.warn("Failed to parse tab title.");
148
+ break;
149
+ }
150
+ i.push({ title: l, lang: e.lang, value: e.value });
151
+ } else
152
+ break;
153
+ }
154
+ return i;
155
+ }
156
+ const J = () => (t, r) => {
157
+ B(t, "code", (n, i, e) => {
158
+ const c = `${n.lang ?? ""} ${n.meta ?? ""}`.trim();
159
+ if (!c)
160
+ return;
161
+ const [l] = c.match(new RegExp(`(?<=tab=("|'))(.*?)(?=("|'))`)) ?? [""];
162
+ if (!l && c.includes("tab=")) {
163
+ r.message("Invalid tab title", n, "remark-code-title");
164
+ return;
165
+ }
166
+ if (!l)
167
+ return;
168
+ const f = [{ title: l, lang: n.lang, value: n.value }, ...C(i, e)];
169
+ if (f.length > 1) {
170
+ const o = {
171
+ type: "code",
172
+ lang: "tabs",
173
+ value: JSON.stringify(f)
174
+ };
175
+ return e.children.splice(i, f.length, o), i + f.length - 1;
176
+ } else {
177
+ const o = {
178
+ type: "paragraph",
179
+ data: {
180
+ hName: "div",
181
+ hProperties: {
182
+ "data-remark-code-title": !0,
183
+ "data-language": n.lang
184
+ }
185
+ },
186
+ children: [{ type: "text", value: l }]
187
+ };
188
+ return e.children.splice(i, 0, o), i + 2;
189
+ }
190
+ });
191
+ };
192
+ export {
193
+ J as c,
194
+ B as v
195
+ };
package/text/Frequency.js CHANGED
@@ -1,49 +1,30 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Typography } from "@mui/material";
3
- import { useMemo } from "react";
4
- import { s as sumBy } from "../sumBy-MYkDPHZL.js";
5
- import { i as isNull, a as isUndefined } from "../isUndefined-CE8h73dH.js";
6
- const FrequencyText = ({
7
- annotations,
8
- value,
9
- ...otherProps
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { Typography as m } from "@mui/material";
3
+ import { useMemo as t } from "react";
4
+ import { s as d } from "../sumBy-DxJUU2E8.js";
5
+ import { i, a as l } from "../isUndefined-DiNCDKoz.js";
6
+ const x = ({
7
+ annotations: u,
8
+ value: f,
9
+ ...e
10
10
  }) => {
11
- const frequencyAnnotations = useMemo(
12
- () => annotations.filter((annotation) => annotation.type === "frequency"),
13
- [annotations]
14
- );
15
- const frequency = useMemo(
16
- () => frequencyAnnotations.length > 0 ? sumBy(frequencyAnnotations, (annotation) => annotation.value) : null,
17
- [frequencyAnnotations]
18
- );
19
- const color = useMemo(() => {
20
- if (isNull(frequency) || isUndefined(frequency)) {
21
- return null;
22
- }
23
- if (frequency < 1) {
24
- return "error";
25
- }
26
- if (frequency < 1e3) {
27
- return "secondary";
28
- }
29
- if (frequency < 1e6) {
30
- return "disabled";
31
- }
32
- return null;
33
- }, [frequency]);
34
- if (isNull(frequency) || isUndefined(frequency)) {
35
- return /* @__PURE__ */ jsx(Typography, { ...otherProps, color, children: value });
36
- }
37
- return /* @__PURE__ */ jsx(
38
- Typography,
11
+ const n = t(
12
+ () => u.filter((o) => o.type === "frequency"),
13
+ [u]
14
+ ), r = t(
15
+ () => n.length > 0 ? d(n, (o) => o.value) : null,
16
+ [n]
17
+ ), s = t(() => i(r) || l(r) ? null : r < 1 ? "error" : r < 1e3 ? "secondary" : r < 1e6 ? "disabled" : null, [r]);
18
+ return i(r) || l(r) ? /* @__PURE__ */ c(m, { ...e, color: s, children: f }) : /* @__PURE__ */ c(
19
+ m,
39
20
  {
40
- ...otherProps,
41
- color: color ?? otherProps.color,
42
- sx: { fontWeight: !isNull(frequency) && !isUndefined(frequency) && frequency < 10 ? "bold" : "inherit" },
43
- children: value
21
+ ...e,
22
+ color: s ?? e.color,
23
+ sx: { fontWeight: !i(r) && !l(r) && r < 10 ? "bold" : "inherit" },
24
+ children: f
44
25
  }
45
26
  );
46
27
  };
47
28
  export {
48
- FrequencyText as default
29
+ x as default
49
30
  };
@@ -0,0 +1,14 @@
1
+ import { t as n } from "./toNumber-YVhnnJv4.js";
2
+ var t = 1 / 0, o = 17976931348623157e292;
3
+ function I(r) {
4
+ if (!r)
5
+ return r === 0 ? r : 0;
6
+ if (r = n(r), r === t || r === -t) {
7
+ var i = r < 0 ? -1 : 1;
8
+ return i * o;
9
+ }
10
+ return r === r ? r : 0;
11
+ }
12
+ export {
13
+ I as t
14
+ };
@@ -0,0 +1,31 @@
1
+ import { i as e } from "./isObject-B53jY8Qg.js";
2
+ import { i as s } from "./isSymbol-C3_SC0Qp.js";
3
+ var f = /\s/;
4
+ function o(r) {
5
+ for (var t = r.length; t-- && f.test(r.charAt(t)); )
6
+ ;
7
+ return t;
8
+ }
9
+ var c = /^\s+/;
10
+ function m(r) {
11
+ return r && r.slice(0, o(r) + 1).replace(c, "");
12
+ }
13
+ var n = NaN, a = /^[-+]0x[0-9a-f]+$/i, p = /^0b[01]+$/i, b = /^0o[0-7]+$/i, y = parseInt;
14
+ function x(r) {
15
+ if (typeof r == "number")
16
+ return r;
17
+ if (s(r))
18
+ return n;
19
+ if (e(r)) {
20
+ var t = typeof r.valueOf == "function" ? r.valueOf() : r;
21
+ r = e(t) ? t + "" : t;
22
+ }
23
+ if (typeof r != "string")
24
+ return r === 0 ? r : +r;
25
+ r = m(r);
26
+ var i = p.test(r);
27
+ return i || b.test(r) ? y(r.slice(2), i ? 2 : 8) : a.test(r) ? n : +r;
28
+ }
29
+ export {
30
+ x as t
31
+ };