@allurereport/web-components 3.22.0 → 3.22.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 (150) hide show
  1. package/dist/{Attachment-D75lkuAG.js → Attachment-DFk4AiwI.js} +2 -2
  2. package/dist/{Attachment-D75lkuAG.js.map → Attachment-DFk4AiwI.js.map} +1 -1
  3. package/dist/Attachment.js +1 -1
  4. package/dist/{AttachmentCode-BaFv0Nkk.js → AttachmentCode-DLfL9_C7.js} +2 -2
  5. package/dist/{AttachmentCode-BaFv0Nkk.js.map → AttachmentCode-DLfL9_C7.js.map} +1 -1
  6. package/dist/AttachmentImageDiff-Bp1b_UU5.js +2 -0
  7. package/dist/{AttachmentImageDiff-BXiyAOHw.js.map → AttachmentImageDiff-Bp1b_UU5.js.map} +1 -1
  8. package/dist/{AttachmentTable-xY7Ovinb.js → AttachmentTable-B_2qN3O-.js} +2 -2
  9. package/dist/{AttachmentTable-xY7Ovinb.js.map → AttachmentTable-B_2qN3O-.js.map} +1 -1
  10. package/dist/{BarChart-DVqwZDOJ.js → BarChart-Dmhamjn_.js} +2 -2
  11. package/dist/{BarChart-DVqwZDOJ.js.map → BarChart-Dmhamjn_.js.map} +1 -1
  12. package/dist/{BarChartRenderer-DyfCJzro.js → BarChartRenderer-Ip2G__e-.js} +2 -2
  13. package/dist/{BarChartRenderer-DyfCJzro.js.map → BarChartRenderer-Ip2G__e-.js.map} +1 -1
  14. package/dist/ChartWidget.js +1 -1
  15. package/dist/CodeViewer.js +1 -1
  16. package/dist/CurrentStatusChartWidget.js +1 -1
  17. package/dist/DurationDynamicsChartWidget.js +1 -1
  18. package/dist/DurationsChartWidget.js +1 -1
  19. package/dist/{EmptyDataStub-BuH_D_lp.js → EmptyDataStub-CRdg61R2.js} +2 -2
  20. package/dist/{EmptyDataStub-BuH_D_lp.js.map → EmptyDataStub-CRdg61R2.js.map} +1 -1
  21. package/dist/FunnelChartRenderer-tZ8LQJEg.js +2 -0
  22. package/dist/{FunnelChartRenderer-CLesVf61.js.map → FunnelChartRenderer-tZ8LQJEg.js.map} +1 -1
  23. package/dist/Grid.js +1 -1
  24. package/dist/{GridItem-DNsiFecD.js → GridItem-DI1f2R1r.js} +2 -2
  25. package/dist/{GridItem-DNsiFecD.js.map → GridItem-DI1f2R1r.js.map} +1 -1
  26. package/dist/HeatMapChartRenderer-CgQ03Op3.js +2 -0
  27. package/dist/{HeatMapChartRenderer-BrBfW8zd.js.map → HeatMapChartRenderer-CgQ03Op3.js.map} +1 -1
  28. package/dist/{HeatMapWidget-CwCccKA9.js → HeatMapWidget-Dqm7-_SB.js} +2 -2
  29. package/dist/{HeatMapWidget-CwCccKA9.js.map → HeatMapWidget-Dqm7-_SB.js.map} +1 -1
  30. package/dist/HeatMapWidget.js +1 -1
  31. package/dist/{HtmlPreview-NgG4sciW.js → HtmlPreview-u0sa77g5.js} +2 -2
  32. package/dist/{HtmlPreview-NgG4sciW.js.map → HtmlPreview-u0sa77g5.js.map} +1 -1
  33. package/dist/{HttpAttachment-A7AWm-d9.js → HttpAttachment-CkQRcAfa.js} +2 -2
  34. package/dist/{HttpAttachment-A7AWm-d9.js.map → HttpAttachment-CkQRcAfa.js.map} +1 -1
  35. package/dist/{MarkdownPreview-C-NFR_X3.js → MarkdownPreview-BEs6LvOd.js} +2 -2
  36. package/dist/{MarkdownPreview-C-NFR_X3.js.map → MarkdownPreview-BEs6LvOd.js.map} +1 -1
  37. package/dist/{MermaidPreview-DHvqVM10.js → MermaidPreview-4EDQwdX3.js} +2 -2
  38. package/dist/{MermaidPreview-DHvqVM10.js.map → MermaidPreview-4EDQwdX3.js.map} +1 -1
  39. package/dist/PieChartRenderer-Cv4hjlRj.js +2 -0
  40. package/dist/{PieChartRenderer-CBEEPgfv.js.map → PieChartRenderer-Cv4hjlRj.js.map} +1 -1
  41. package/dist/StabilityDistributionWidget.js +1 -1
  42. package/dist/StatusAgePyramidChartWidget.js +1 -1
  43. package/dist/StatusDynamicsChartWidget.js +1 -1
  44. package/dist/StatusTransitionsChartWidget.js +1 -1
  45. package/dist/SuccessRatePieChart.js +1 -1
  46. package/dist/TestBaseGrowthDynamicsChartWidget.js +1 -1
  47. package/dist/TestingPyramidWidget.js +1 -1
  48. package/dist/{Timeline-BkaMlh1L.js → Timeline-BWVXDTn-.js} +2 -2
  49. package/dist/{Timeline-BkaMlh1L.js.map → Timeline-BWVXDTn-.js.map} +1 -1
  50. package/dist/Timeline.js +1 -1
  51. package/dist/TrSeveritiesChartWidget.js +1 -1
  52. package/dist/TreeMapChartRenderer-DAOzpUju.js +2 -0
  53. package/dist/{TreeMapChartRenderer-4eHZtCVj.js.map → TreeMapChartRenderer-DAOzpUju.js.map} +1 -1
  54. package/dist/{TreeMapChartWidget-CWMvuICi.js → TreeMapChartWidget-DKXJlnm9.js} +2 -2
  55. package/dist/{TreeMapChartWidget-CWMvuICi.js.map → TreeMapChartWidget-DKXJlnm9.js.map} +1 -1
  56. package/dist/TreeMapChartWidget.js +1 -1
  57. package/dist/{_baseSlice-DybH-rwG.js → _baseSlice-CBpWu5XB.js} +1 -1
  58. package/dist/{_baseSlice-DybH-rwG.js.map → _baseSlice-CBpWu5XB.js.map} +1 -1
  59. package/dist/{_commonjsHelpers-bbZql6IY.js → _commonjsHelpers-Doe7ti1T.js} +1 -1
  60. package/dist/_commonjsHelpers-Doe7ti1T.js.map +1 -0
  61. package/dist/{_stringToArray-99CYzIaW.js → _stringToArray-aaWSQcKo.js} +2 -2
  62. package/dist/{_stringToArray-99CYzIaW.js.map → _stringToArray-aaWSQcKo.js.map} +1 -1
  63. package/dist/{array-Z5whfZ28.js → array-B0SXO2zY.js} +1 -1
  64. package/dist/{array-Z5whfZ28.js.map → array-B0SXO2zY.js.map} +1 -1
  65. package/dist/{clipboard-CO7bSAxL.js → clipboard-BUUe2rGt.js} +1 -1
  66. package/dist/{clipboard-CO7bSAxL.js.map → clipboard-BUUe2rGt.js.map} +1 -1
  67. package/dist/{clsx-BnvTIEMY.js → clsx-D83172mf.js} +1 -1
  68. package/dist/{clsx-BnvTIEMY.js.map → clsx-D83172mf.js.map} +1 -1
  69. package/dist/{config-DZ-BTm2e.js → config-CgDglkkw.js} +1 -1
  70. package/dist/{config-DZ-BTm2e.js.map → config-CgDglkkw.js.map} +1 -1
  71. package/dist/{constants-BhEoR-GZ.js → constants-D-YBPtws.js} +1 -1
  72. package/dist/{constants-BhEoR-GZ.js.map → constants-D-YBPtws.js.map} +1 -1
  73. package/dist/core.js +1 -1
  74. package/dist/{floating-ui.dom-PEni3-qj.js → floating-ui.dom-B9YqEzUD.js} +1 -1
  75. package/dist/{floating-ui.dom-PEni3-qj.js.map → floating-ui.dom-B9YqEzUD.js.map} +1 -1
  76. package/dist/{identity-DzNdV8kh.js → identity-DBvQ9SaG.js} +1 -1
  77. package/dist/{identity-DzNdV8kh.js.map → identity-DBvQ9SaG.js.map} +1 -1
  78. package/dist/{index-CHmhJlCy.js → index-BLcyRUFW.js} +2 -2
  79. package/dist/{index-CHmhJlCy.js.map → index-BLcyRUFW.js.map} +1 -1
  80. package/dist/{index-CZJiaWZN.js → index-BZ-V3udE.js} +2 -2
  81. package/dist/{index-CZJiaWZN.js.map → index-BZ-V3udE.js.map} +1 -1
  82. package/dist/{index-CMG20_7S.js → index-BzcM2nAl.js} +2 -2
  83. package/dist/{index-CMG20_7S.js.map → index-BzcM2nAl.js.map} +1 -1
  84. package/dist/{index-wexsN8zu.js → index-CCQ13d2t.js} +2 -2
  85. package/dist/{index-wexsN8zu.js.map → index-CCQ13d2t.js.map} +1 -1
  86. package/dist/{index-BrOvQRuo.js → index-CbwuBF9w.js} +2 -2
  87. package/dist/{index-BrOvQRuo.js.map → index-CbwuBF9w.js.map} +1 -1
  88. package/dist/{index-BJ3L12TJ.js → index-Cf1z5wAO.js} +2 -2
  89. package/dist/{index-BJ3L12TJ.js.map → index-Cf1z5wAO.js.map} +1 -1
  90. package/dist/{index-DRO8HSfm.js → index-D2c5viX_.js} +2 -2
  91. package/dist/{index-DRO8HSfm.js.map → index-D2c5viX_.js.map} +1 -1
  92. package/dist/{index-BniCQn-f.js → index-DQIPuqU4.js} +2 -2
  93. package/dist/{index-BniCQn-f.js.map → index-DQIPuqU4.js.map} +1 -1
  94. package/dist/{index-CXgF3Yhl.js → index-DYL-tbfk.js} +2 -2
  95. package/dist/{index-CXgF3Yhl.js.map → index-DYL-tbfk.js.map} +1 -1
  96. package/dist/{index-Dj8HmckV.js → index-Dq7O-bm8.js} +2 -2
  97. package/dist/{index-Dj8HmckV.js.map → index-Dq7O-bm8.js.map} +1 -1
  98. package/dist/{index-CljGQaiY.js → index-k2XcinIa.js} +2 -2
  99. package/dist/{index-CljGQaiY.js.map → index-k2XcinIa.js.map} +1 -1
  100. package/dist/{index-D_2wjrUN.js → index-qMwNH4DY.js} +2 -2
  101. package/dist/{index-D_2wjrUN.js.map → index-qMwNH4DY.js.map} +1 -1
  102. package/dist/{index-DZlENr_C.js → index-uBEpZNBn.js} +2 -2
  103. package/dist/{index-DZlENr_C.js.map → index-uBEpZNBn.js.map} +1 -1
  104. package/dist/index.css +1 -1
  105. package/dist/index.js +1 -1
  106. package/dist/{index.module-BKdNahiA.js → index.module-Bdu_gwCw.js} +2 -2
  107. package/dist/{index.module-BKdNahiA.js.map → index.module-Bdu_gwCw.js.map} +1 -1
  108. package/dist/{line-Dnk6WnzK.js → line-CEBDCBhb.js} +2 -2
  109. package/dist/{line-Dnk6WnzK.js.map → line-CEBDCBhb.js.map} +1 -1
  110. package/dist/{linear-CZyKfBBG.js → linear-C7uKb8Tk.js} +1 -1
  111. package/dist/{linear-CZyKfBBG.js.map → linear-C7uKb8Tk.js.map} +1 -1
  112. package/dist/{nivo-annotations-B2rsOOOb.js → nivo-annotations-OXtu3nXs.js} +2 -2
  113. package/dist/{nivo-annotations-B2rsOOOb.js.map → nivo-annotations-OXtu3nXs.js.map} +1 -1
  114. package/dist/{nivo-axes-Ce1dH5CY.js → nivo-axes-3Cy5TCy7.js} +2 -2
  115. package/dist/{nivo-axes-Ce1dH5CY.js.map → nivo-axes-3Cy5TCy7.js.map} +1 -1
  116. package/dist/{nivo-colors-DSqwed4A.js → nivo-colors-fVDn0-vW.js} +2 -2
  117. package/dist/{nivo-colors-DSqwed4A.js.map → nivo-colors-fVDn0-vW.js.map} +1 -1
  118. package/dist/{nivo-legends-0WTLJ5Sd.js → nivo-legends-BIaWaGVX.js} +2 -2
  119. package/dist/{nivo-legends-0WTLJ5Sd.js.map → nivo-legends-BIaWaGVX.js.map} +1 -1
  120. package/dist/{omit-DhTTm08t.js → omit-Cims_XVO.js} +2 -2
  121. package/dist/{omit-DhTTm08t.js.map → omit-Cims_XVO.js.map} +1 -1
  122. package/dist/{prism-global-DdhG-WkK.js → prism-global-B3qB0vXd.js} +2 -2
  123. package/dist/{prism-global-DdhG-WkK.js.map → prism-global-B3qB0vXd.js.map} +1 -1
  124. package/dist/{successRate-BKeIquyk.js → successRate-rrLYYsum.js} +2 -2
  125. package/dist/{successRate-BKeIquyk.js.map → successRate-rrLYYsum.js.map} +1 -1
  126. package/dist/{time-Dfkn_dVS.js → time-CyaymdXm.js} +1 -1
  127. package/dist/{time-Dfkn_dVS.js.map → time-CyaymdXm.js.map} +1 -1
  128. package/dist/{toNumber-DEBMlvT0.js → toNumber-Cpsf6DxM.js} +2 -2
  129. package/dist/{toNumber-DEBMlvT0.js.map → toNumber-Cpsf6DxM.js.map} +1 -1
  130. package/dist/{toString-CTcEQi-b.js → toString-Ccq3A8Sl.js} +2 -2
  131. package/dist/{toString-CTcEQi-b.js.map → toString-Ccq3A8Sl.js.map} +1 -1
  132. package/dist/{truncate-DRv_tZCJ.js → truncate-Bk-Lghrl.js} +2 -2
  133. package/dist/{truncate-DRv_tZCJ.js.map → truncate-Bk-Lghrl.js.map} +1 -1
  134. package/dist/{upperFirst-D5eOlcn2.js → upperFirst-jXpCKAQr.js} +2 -2
  135. package/dist/{upperFirst-D5eOlcn2.js.map → upperFirst-jXpCKAQr.js.map} +1 -1
  136. package/dist/{useTooltip-DhzO0u9M.js → useTooltip-VGYCawp2.js} +2 -2
  137. package/dist/{useTooltip-DhzO0u9M.js.map → useTooltip-VGYCawp2.js.map} +1 -1
  138. package/dist/{utcTime-wBDrZaMa.js → utcTime-ClVTKNFl.js} +2 -2
  139. package/dist/{utcTime-wBDrZaMa.js.map → utcTime-ClVTKNFl.js.map} +1 -1
  140. package/dist/{utils-C1Oqs14G.js → utils-DKmgmsaJ.js} +2 -2
  141. package/dist/{utils-C1Oqs14G.js.map → utils-DKmgmsaJ.js.map} +1 -1
  142. package/dist/{utils-DNKsxZkE.js → utils-DfVSL1lz.js} +2 -2
  143. package/dist/{utils-DNKsxZkE.js.map → utils-DfVSL1lz.js.map} +1 -1
  144. package/package.json +6 -6
  145. package/dist/AttachmentImageDiff-BXiyAOHw.js +0 -2
  146. package/dist/FunnelChartRenderer-CLesVf61.js +0 -2
  147. package/dist/HeatMapChartRenderer-BrBfW8zd.js +0 -2
  148. package/dist/PieChartRenderer-CBEEPgfv.js +0 -2
  149. package/dist/TreeMapChartRenderer-4eHZtCVj.js +0 -2
  150. package/dist/_commonjsHelpers-bbZql6IY.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{u as t}from"./clsx-BnvTIEMY.js";import{useMemo as e,useState as r,useEffect as a}from"preact/hooks";import{E as i}from"./index-CHmhJlCy.js";import{S as m}from"./index-CljGQaiY.js";import{s as n}from"./Attachment-D75lkuAG.js";import"preact";import"./index-D_2wjrUN.js";import"react";import"./index-Dj8HmckV.js";import"./identity-DzNdV8kh.js";import"node:crypto";import"./utils-C1Oqs14G.js";import"./array-Z5whfZ28.js";import"./constants-BhEoR-GZ.js";import"./_commonjsHelpers-bbZql6IY.js";import"preact/compat";let s,o=Promise.resolve();const d=(t,e,r="default")=>{const a=async()=>{const a=await(s??=(async()=>{const{default:t}=await import("mermaid");return t})());a.mermaidAPI.globalReset(),a.initialize({securityLevel:"strict",startOnLoad:!1,suppressErrorRendering:!0,theme:r});const{svg:i}=await a.render(t,e);return(t=>{const e=t.match(/\bviewBox="([^"]+)"/)?.[1],r=e?.trim().split(/\s+/)[2];return!r||!Number.isFinite(Number(r))||Number(r)<=0?t:t.replace(/(<svg\b[^>]*\s)width="100%"/,`$1width="${r}"`)})(i)},i=o.then(a,a);return o=i.then((()=>{}),(()=>{})),i};let c=0;const l=()=>"undefined"!=typeof document&&"dark"===document.documentElement.dataset.theme?"dark":"light",p=({attachment:s})=>{const o=e((()=>"allure-mermaid-"+ ++c),[]),[p,u]=r(""),[h,j]=r(!1),[f,v]=r(l),w=s.text??"";return a((()=>{const t=new MutationObserver((()=>v(l())));return t.observe(document.documentElement,{attributeFilter:["data-theme"]}),()=>t.disconnect()}),[]),a((()=>{let t=!0;return u(""),j(!1),w.trim()?(d(o,w,"dark"===f?"dark":"default").then((e=>{t&&u(e)})).catch((()=>{t&&j(!0)})),()=>{t=!1}):()=>{t=!1}}),[f,w,o]),w.trim()?h?t(i,{description:"Failed to render Mermaid diagram",size:"xs"}):t("div",p?{className:n["mermaid-attachment-preview"],"data-testid":"mermaid-attachment-preview",dangerouslySetInnerHTML:{__html:p}}:{className:n["mermaid-attachment-loading"],"data-testid":"mermaid-attachment-loading",children:t(m,{})}):null};export{p as MermaidPreview};
2
- //# sourceMappingURL=MermaidPreview-DHvqVM10.js.map
1
+ import{u as t}from"./clsx-D83172mf.js";import{useMemo as e,useState as r,useEffect as a}from"preact/hooks";import{E as i}from"./index-BLcyRUFW.js";import{S as m}from"./index-k2XcinIa.js";import{s as n}from"./Attachment-DFk4AiwI.js";import"preact";import"./index-qMwNH4DY.js";import"react";import"./index-Dq7O-bm8.js";import"./identity-DBvQ9SaG.js";import"node:crypto";import"./utils-DKmgmsaJ.js";import"./array-B0SXO2zY.js";import"./constants-D-YBPtws.js";import"./_commonjsHelpers-Doe7ti1T.js";import"preact/compat";let s,o=Promise.resolve();const d=(t,e,r="default")=>{const a=async()=>{const a=await(s??=(async()=>{const{default:t}=await import("mermaid");return t})());a.mermaidAPI.globalReset(),a.initialize({securityLevel:"strict",startOnLoad:!1,suppressErrorRendering:!0,theme:r});const{svg:i}=await a.render(t,e);return(t=>{const e=t.match(/\bviewBox="([^"]+)"/)?.[1],r=e?.trim().split(/\s+/)[2];return!r||!Number.isFinite(Number(r))||Number(r)<=0?t:t.replace(/(<svg\b[^>]*\s)width="100%"/,`$1width="${r}"`)})(i)},i=o.then(a,a);return o=i.then((()=>{}),(()=>{})),i};let c=0;const l=()=>"undefined"!=typeof document&&"dark"===document.documentElement.dataset.theme?"dark":"light",p=({attachment:s})=>{const o=e((()=>"allure-mermaid-"+ ++c),[]),[p,u]=r(""),[h,j]=r(!1),[f,v]=r(l),w=s.text??"";return a((()=>{const t=new MutationObserver((()=>v(l())));return t.observe(document.documentElement,{attributeFilter:["data-theme"]}),()=>t.disconnect()}),[]),a((()=>{let t=!0;return u(""),j(!1),w.trim()?(d(o,w,"dark"===f?"dark":"default").then((e=>{t&&u(e)})).catch((()=>{t&&j(!0)})),()=>{t=!1}):()=>{t=!1}}),[f,w,o]),w.trim()?h?t(i,{description:"Failed to render Mermaid diagram",size:"xs"}):t("div",p?{className:n["mermaid-attachment-preview"],"data-testid":"mermaid-attachment-preview",dangerouslySetInnerHTML:{__html:p}}:{className:n["mermaid-attachment-loading"],"data-testid":"mermaid-attachment-loading",children:t(m,{})}):null};export{p as MermaidPreview};
2
+ //# sourceMappingURL=MermaidPreview-4EDQwdX3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MermaidPreview-DHvqVM10.js","sources":["../src/components/Attachment/mermaid.ts","../src/components/Attachment/MermaidPreview.tsx"],"sourcesContent":[null,null],"names":["mermaidPromise","renderQueue","Promise","resolve","renderMermaid","id","definition","theme","render","async","mermaid","default","import","loadMermaid","mermaidAPI","globalReset","initialize","securityLevel","startOnLoad","suppressErrorRendering","svg","viewBox","match","width","trim","split","Number","isFinite","replace","preserveMermaidNaturalWidth","result","then","diagramSequence","getCurrentTheme","document","documentElement","dataset","MermaidPreview","attachment","diagramId","useMemo","setSvg","useState","error","setError","currentTheme","setCurrentTheme","text","useEffect","observer","MutationObserver","observe","attributeFilter","disconnect","active","renderedSvg","catch","_jsx","EmptyView","description","size","className","styles","dangerouslySetInnerHTML","__html","Spinner"],"mappings":"qgBAEA,IAAIA,EACAC,EAAcC,QAAQC,UAE1B,MAgBaC,EAAgBA,CAC3BC,EACAC,EACAC,EAA4B,aAE5B,MAAMC,EAASC,UACb,MAAMC,QAAiBV,IAtBPS,WAClB,MAAQE,QAASD,SAAkBE,OAAO,WAC1C,OAAOF,CAAO,EAoB8BG,IAE1CH,EAAQI,WAAWC,cACnBL,EAAQM,WAAW,CACjBC,cAAe,SACfC,aAAa,EACbC,wBAAwB,EACxBZ,UAGF,MAAMa,IAAEA,SAAcV,EAAQF,OAAOH,EAAIC,GAEzC,MA7BwCc,KAC1C,MAAMC,EAAUD,EAAIE,MAAM,yBAAyB,GAC7CC,EAAQF,GAASG,OAAOC,MAAM,OAAO,GAE3C,OAAKF,IAAUG,OAAOC,SAASD,OAAOH,KAAWG,OAAOH,IAAU,EACzDH,EAGFA,EAAIQ,QAAQ,8BAA+B,YAAYL,KAAS,EAqB9DM,CAA4BT,EAAI,EAEnCU,EAAS7B,EAAY8B,KAAKvB,EAAQA,GAOxC,OALAP,EAAc6B,EAAOC,MACnB,KAAe,IACf,KAAe,IAGVD,CAAM,ECtCf,IAAIE,EAAkB,EAEtB,MAAMC,EAAkBA,IACF,oBAAbC,UAAuE,SAA3CA,SAASC,gBAAgBC,QAAQ7B,MAAmB,OAAS,QAMrF8B,EAAqEA,EAAGC,iBACnF,MAAMC,EAAYC,GAAQ,IAAM,qBAAoBR,GAAmB,KAChEZ,EAAKqB,GAAUC,EAAS,KACxBC,EAAOC,GAAYF,GAAS,IAC5BG,EAAcC,GAAmBJ,EAAST,GAC3C3B,EAAagC,EAAWS,MAAQ,GAuCtC,OArCAC,GAAU,KACR,MAAMC,EAAW,IAAIC,kBAAiB,IAAMJ,EAAgBb,OAI5D,OAFAgB,EAASE,QAAQjB,SAASC,gBAAiB,CAAEiB,gBAAiB,CAAC,gBAExD,IAAMH,EAASI,YAAY,GACjC,IAEHL,GAAU,KACR,IAAIM,GAAS,EAKb,OAHAb,EAAO,IACPG,GAAS,GAEJtC,EAAWkB,QAMXpB,EAAcmC,EAAWjC,EAA6B,SAAjBuC,EAA0B,OAAS,WAC1Ed,MAAMwB,IACDD,GACFb,EAAOc,EACT,IAEDC,OAAM,KACDF,GACFV,GAAS,EACX,IAGG,KACLU,GAAS,CAAK,GAlBP,KACLA,GAAS,CAAK,CAkBjB,GACA,CAACT,EAAcvC,EAAYiC,IAEzBjC,EAAWkB,OAIZmB,EACKc,EAACC,EAAS,CAACC,YAAY,mCAAmCC,KAAK,OAYtEH,QATGrC,GAUDyC,UAAWC,EAAO,8BAA6B,cACnC,6BAEZC,wBAAyB,CAAEC,OAAQ5C,IAXnC,CAAKyC,UAAWC,EAAO,8BAA6B,cAAc,sCAChEL,EAACQ,EAAO,CAAA,KAVL,IAqBL"}
1
+ {"version":3,"file":"MermaidPreview-4EDQwdX3.js","sources":["../src/components/Attachment/mermaid.ts","../src/components/Attachment/MermaidPreview.tsx"],"sourcesContent":[null,null],"names":["mermaidPromise","renderQueue","Promise","resolve","renderMermaid","id","definition","theme","render","async","mermaid","default","import","loadMermaid","mermaidAPI","globalReset","initialize","securityLevel","startOnLoad","suppressErrorRendering","svg","viewBox","match","width","trim","split","Number","isFinite","replace","preserveMermaidNaturalWidth","result","then","diagramSequence","getCurrentTheme","document","documentElement","dataset","MermaidPreview","attachment","diagramId","useMemo","setSvg","useState","error","setError","currentTheme","setCurrentTheme","text","useEffect","observer","MutationObserver","observe","attributeFilter","disconnect","active","renderedSvg","catch","_jsx","EmptyView","description","size","className","styles","dangerouslySetInnerHTML","__html","Spinner"],"mappings":"qgBAEA,IAAIA,EACAC,EAAcC,QAAQC,UAE1B,MAgBaC,EAAgBA,CAC3BC,EACAC,EACAC,EAA4B,aAE5B,MAAMC,EAASC,UACb,MAAMC,QAAiBV,IAtBPS,WAClB,MAAQE,QAASD,SAAkBE,OAAO,WAC1C,OAAOF,CAAO,EAoB8BG,IAE1CH,EAAQI,WAAWC,cACnBL,EAAQM,WAAW,CACjBC,cAAe,SACfC,aAAa,EACbC,wBAAwB,EACxBZ,UAGF,MAAMa,IAAEA,SAAcV,EAAQF,OAAOH,EAAIC,GAEzC,MA7BwCc,KAC1C,MAAMC,EAAUD,EAAIE,MAAM,yBAAyB,GAC7CC,EAAQF,GAASG,OAAOC,MAAM,OAAO,GAE3C,OAAKF,IAAUG,OAAOC,SAASD,OAAOH,KAAWG,OAAOH,IAAU,EACzDH,EAGFA,EAAIQ,QAAQ,8BAA+B,YAAYL,KAAS,EAqB9DM,CAA4BT,EAAI,EAEnCU,EAAS7B,EAAY8B,KAAKvB,EAAQA,GAOxC,OALAP,EAAc6B,EAAOC,MACnB,KAAe,IACf,KAAe,IAGVD,CAAM,ECtCf,IAAIE,EAAkB,EAEtB,MAAMC,EAAkBA,IACF,oBAAbC,UAAuE,SAA3CA,SAASC,gBAAgBC,QAAQ7B,MAAmB,OAAS,QAMrF8B,EAAqEA,EAAGC,iBACnF,MAAMC,EAAYC,GAAQ,IAAM,qBAAoBR,GAAmB,KAChEZ,EAAKqB,GAAUC,EAAS,KACxBC,EAAOC,GAAYF,GAAS,IAC5BG,EAAcC,GAAmBJ,EAAST,GAC3C3B,EAAagC,EAAWS,MAAQ,GAuCtC,OArCAC,GAAU,KACR,MAAMC,EAAW,IAAIC,kBAAiB,IAAMJ,EAAgBb,OAI5D,OAFAgB,EAASE,QAAQjB,SAASC,gBAAiB,CAAEiB,gBAAiB,CAAC,gBAExD,IAAMH,EAASI,YAAY,GACjC,IAEHL,GAAU,KACR,IAAIM,GAAS,EAKb,OAHAb,EAAO,IACPG,GAAS,GAEJtC,EAAWkB,QAMXpB,EAAcmC,EAAWjC,EAA6B,SAAjBuC,EAA0B,OAAS,WAC1Ed,MAAMwB,IACDD,GACFb,EAAOc,EACT,IAEDC,OAAM,KACDF,GACFV,GAAS,EACX,IAGG,KACLU,GAAS,CAAK,GAlBP,KACLA,GAAS,CAAK,CAkBjB,GACA,CAACT,EAAcvC,EAAYiC,IAEzBjC,EAAWkB,OAIZmB,EACKc,EAACC,EAAS,CAACC,YAAY,mCAAmCC,KAAK,OAYtEH,QATGrC,GAUDyC,UAAWC,EAAO,8BAA6B,cACnC,6BAEZC,wBAAyB,CAAEC,OAAQ5C,IAXnC,CAAKyC,UAAWC,EAAO,8BAA6B,cAAc,sCAChEL,EAACQ,EAAO,CAAA,KAVL,IAqBL"}
@@ -0,0 +1,2 @@
1
+ import{u as t}from"./clsx-D83172mf.js";import{C as r}from"./constants-D-YBPtws.js";import{CurrentStatusChartWidget as i}from"./CurrentStatusChartWidget.js";import"preact";import"react";import"./nivo-colors-fVDn0-vW.js";import"./_commonjsHelpers-Doe7ti1T.js";import"./toString-Ccq3A8Sl.js";import"./index.module-Bdu_gwCw.js";import"./linear-C7uKb8Tk.js";import"./array-B0SXO2zY.js";import"react-dom";import"./line-CEBDCBhb.js";import"./utils-DKmgmsaJ.js";import"./identity-DBvQ9SaG.js";import"node:crypto";import"./nivo-legends-BIaWaGVX.js";import"preact/hooks";import"./index-BzcM2nAl.js";import"./index-Dq7O-bm8.js";import"./index-DYL-tbfk.js";import"@preact/signals";import"./toNumber-Cpsf6DxM.js";import"./index-DQIPuqU4.js";import"./config-CgDglkkw.js";import"./index-D2c5viX_.js";import"./index-qMwNH4DY.js";import"./index-BZ-V3udE.js";import"./floating-ui.dom-B9YqEzUD.js";import"./utils-DfVSL1lz.js";const o=({chartData:o,t:s})=>{if(o.type===r.CurrentStatus){const r=o.title??s("currentStatus.title");return t(i,{title:r,data:o.data,statuses:o.statuses,metric:o.metric,i18n:(t,r={})=>s(`currentStatus.${t}`,r)})}return null};export{o as ChartRenderer};
2
+ //# sourceMappingURL=PieChartRenderer-Cv4hjlRj.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PieChartRenderer-CBEEPgfv.js","sources":["../src/components/Charts/PieChartRenderer.tsx"],"sourcesContent":[null],"names":["ChartRenderer","chartData","t","type","ChartType","CurrentStatus","title","_jsx","CurrentStatusChartWidget","data","statuses","metric","i18n","key","props"],"mappings":"24BAKO,MAAMA,EAAgBA,EAAGC,YAAWC,QACzC,GAAQD,EAAUE,OACXC,EAAUC,cAAe,CAC5B,MAAMC,EAAQL,EAAUK,OAASJ,EAAE,uBAEnC,OACEK,EAACC,EAAwB,CACvBF,MAAOA,EACPG,KAAMR,EAAUQ,KAChBC,SAAUT,EAAUS,SACpBC,OAAQV,EAAUU,OAClBC,KAAMA,CAACC,EAAKC,EAAQ,CAAA,IAAOZ,EAAE,iBAAiBW,IAAOC,IAG3D,CAEE,OAAO,IACX"}
1
+ {"version":3,"file":"PieChartRenderer-Cv4hjlRj.js","sources":["../src/components/Charts/PieChartRenderer.tsx"],"sourcesContent":[null],"names":["ChartRenderer","chartData","t","type","ChartType","CurrentStatus","title","_jsx","CurrentStatusChartWidget","data","statuses","metric","i18n","key","props"],"mappings":"24BAKO,MAAMA,EAAgBA,EAAGC,YAAWC,QACzC,GAAQD,EAAUE,OACXC,EAAUC,cAAe,CAC5B,MAAMC,EAAQL,EAAUK,OAASJ,EAAE,uBAEnC,OACEK,EAACC,EAAwB,CACvBF,MAAOA,EACPG,KAAMR,EAAUQ,KAChBC,SAAUT,EAAUS,SACpBC,OAAQV,EAAUU,OAClBC,KAAMA,CAACC,EAAKC,EAAQ,CAAA,IAAOZ,EAAE,iBAAiBW,IAAOC,IAG3D,CAEE,OAAO,IACX"}
@@ -1,2 +1,2 @@
1
- import{u as t}from"./clsx-BnvTIEMY.js";import{g as r}from"./_commonjsHelpers-bbZql6IY.js";import{r as i}from"./_baseSlice-DybH-rwG.js";import{r as e,t as o}from"./truncate-DRv_tZCJ.js";import{useMemo as a}from"preact/hooks";import{E as s}from"./index-CHmhJlCy.js";import{a as n}from"./index-D_2wjrUN.js";import{W as m}from"./index-CMG20_7S.js";import{B as l}from"./BarChart-DVqwZDOJ.js";import{C as c}from"./config-DZ-BTm2e.js";import"preact";import"./toString-CTcEQi-b.js";import"./_stringToArray-99CYzIaW.js";import"./nivo-colors-DSqwed4A.js";import"react";import"./index.module-BKdNahiA.js";import"./linear-CZyKfBBG.js";import"./array-Z5whfZ28.js";import"react-dom";import"./nivo-annotations-B2rsOOOb.js";import"./omit-DhTTm08t.js";import"./toNumber-DEBMlvT0.js";import"./index-Dj8HmckV.js";import"./nivo-axes-Ce1dH5CY.js";import"./utcTime-wBDrZaMa.js";import"./nivo-legends-0WTLJ5Sd.js";import"./index-BniCQn-f.js";import"preact/compat";import"./useTooltip-DhzO0u9M.js";import"./floating-ui.dom-PEni3-qj.js";import"./line-Dnk6WnzK.js";var d,p;var f=/*@__PURE__*/r(function(){if(p)return d;p=1;var t=i(),r=e();return d=function(i,e,o){return i&&i.length?(e=o||void 0===e?1:r(e),t(i,0,e<0?0:e)):[]}}());const g=(t,r)=>t>=r,u=t=>t>=91?"bottom-right":"top-right",j=r=>{const{title:i,data:e,i18n:d,keys:p,threshold:j=90}=r,v=a((()=>f(e,15).map((({id:t,stabilityRate:r})=>({id:t,stabilityRate:r,[t]:r})))),[e]),h=d("legend.stabilityRate"),x=(t=>t>=100?100:t<=0?0:t)(j),b=a((()=>v.map((({id:t,stabilityRate:r})=>({id:t,label:h,color:g(r,x)?"var(--color-intent-success-bg-active)":"var(--color-intent-danger-bg-active)",value:r,[t]:r})))),[v,h,x]),k=0===v.length;return t(m,k?{title:i,children:t(s,{title:d("no-results"),icon:n.lineChartsBarChartSquare})}:{title:i,children:t(l,{markers:[{axis:"y",value:j,legend:`${j}%`,textStyle:{fill:c.markers?.text?.fill,fontSize:c.markers?.text?.fontSize,fontWeight:c.markers?.text?.fontWeight},lineStyle:{stroke:c.markers?.lineColor,strokeWidth:c.markers?.lineStrokeWidth},legendPosition:u(x),legendOffsetY:10,legendOffsetX:7}],groupMode:"stacked",data:v,legend:b,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>p[t.id],formatBottomTick:(t,r)=>o(p[r.id],{length:15}),bottomTickSize:v.length>4?10:12,formatLegendValue:({value:t})=>{if(void 0!==t)return`${t}%`},noLegend:!0,formatLeftTick:t=>`${t}%`,maxValue:100,leftAxisTickValues:[0,10,20,30,40,50,60,70,80,90,100],bottomTickRotation:45,colors:t=>((t,r)=>{if(t>=r)return"var(--color-intent-success-bg-active)";const i=r>20?r-5:void 0;return i&&t>=i?"var(--color-intent-warning-bg-active)":"var(--color-intent-danger-bg-active)"})(t.data.stabilityRate,x)})})};export{j as StabilityDistributionWidget};
1
+ import{u as t}from"./clsx-D83172mf.js";import{g as r}from"./_commonjsHelpers-Doe7ti1T.js";import{r as i}from"./_baseSlice-CBpWu5XB.js";import{r as e,t as o}from"./truncate-Bk-Lghrl.js";import{useMemo as a}from"preact/hooks";import{E as s}from"./index-BLcyRUFW.js";import{a as n}from"./index-qMwNH4DY.js";import{W as m}from"./index-BzcM2nAl.js";import{B as l}from"./BarChart-Dmhamjn_.js";import{C as c}from"./config-CgDglkkw.js";import"preact";import"./toString-Ccq3A8Sl.js";import"./_stringToArray-aaWSQcKo.js";import"./nivo-colors-fVDn0-vW.js";import"react";import"./index.module-Bdu_gwCw.js";import"./linear-C7uKb8Tk.js";import"./array-B0SXO2zY.js";import"react-dom";import"./nivo-annotations-OXtu3nXs.js";import"./omit-Cims_XVO.js";import"./toNumber-Cpsf6DxM.js";import"./index-Dq7O-bm8.js";import"./nivo-axes-3Cy5TCy7.js";import"./utcTime-ClVTKNFl.js";import"./nivo-legends-BIaWaGVX.js";import"./index-DQIPuqU4.js";import"preact/compat";import"./useTooltip-VGYCawp2.js";import"./floating-ui.dom-B9YqEzUD.js";import"./line-CEBDCBhb.js";var d,p;var f=/*@__PURE__*/r(function(){if(p)return d;p=1;var t=i(),r=e();return d=function(i,e,o){return i&&i.length?(e=o||void 0===e?1:r(e),t(i,0,e<0?0:e)):[]}}());const g=(t,r)=>t>=r,u=t=>t>=91?"bottom-right":"top-right",j=r=>{const{title:i,data:e,i18n:d,keys:p,threshold:j=90}=r,v=a((()=>f(e,15).map((({id:t,stabilityRate:r})=>({id:t,stabilityRate:r,[t]:r})))),[e]),h=d("legend.stabilityRate"),x=(t=>t>=100?100:t<=0?0:t)(j),b=a((()=>v.map((({id:t,stabilityRate:r})=>({id:t,label:h,color:g(r,x)?"var(--color-intent-success-bg-active)":"var(--color-intent-danger-bg-active)",value:r,[t]:r})))),[v,h,x]),k=0===v.length;return t(m,k?{title:i,children:t(s,{title:d("no-results"),icon:n.lineChartsBarChartSquare})}:{title:i,children:t(l,{markers:[{axis:"y",value:j,legend:`${j}%`,textStyle:{fill:c.markers?.text?.fill,fontSize:c.markers?.text?.fontSize,fontWeight:c.markers?.text?.fontWeight},lineStyle:{stroke:c.markers?.lineColor,strokeWidth:c.markers?.lineStrokeWidth},legendPosition:u(x),legendOffsetY:10,legendOffsetX:7}],groupMode:"stacked",data:v,legend:b,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>p[t.id],formatBottomTick:(t,r)=>o(p[r.id],{length:15}),bottomTickSize:v.length>4?10:12,formatLegendValue:({value:t})=>{if(void 0!==t)return`${t}%`},noLegend:!0,formatLeftTick:t=>`${t}%`,maxValue:100,leftAxisTickValues:[0,10,20,30,40,50,60,70,80,90,100],bottomTickRotation:45,colors:t=>((t,r)=>{if(t>=r)return"var(--color-intent-success-bg-active)";const i=r>20?r-5:void 0;return i&&t>=i?"var(--color-intent-warning-bg-active)":"var(--color-intent-danger-bg-active)"})(t.data.stabilityRate,x)})})};export{j as StabilityDistributionWidget};
2
2
  //# sourceMappingURL=StabilityDistributionWidget.js.map
@@ -1,2 +1,2 @@
1
- import{u as t}from"./clsx-BnvTIEMY.js";import{t as r}from"./truncate-DRv_tZCJ.js";import{useMemo as i}from"preact/hooks";import{E as e}from"./index-CHmhJlCy.js";import{a as o}from"./index-D_2wjrUN.js";import{W as s}from"./index-CMG20_7S.js";import{B as a}from"./BarChart-DVqwZDOJ.js";import{f as m}from"./index-BniCQn-f.js";import{g as n}from"./utils-DNKsxZkE.js";import"preact";import"./_commonjsHelpers-bbZql6IY.js";import"./toString-CTcEQi-b.js";import"./_stringToArray-99CYzIaW.js";import"./_baseSlice-DybH-rwG.js";import"./nivo-colors-DSqwed4A.js";import"react";import"./index.module-BKdNahiA.js";import"./linear-CZyKfBBG.js";import"./array-Z5whfZ28.js";import"react-dom";import"./nivo-annotations-B2rsOOOb.js";import"./omit-DhTTm08t.js";import"./toNumber-DEBMlvT0.js";import"./index-Dj8HmckV.js";import"./nivo-axes-Ce1dH5CY.js";import"./utcTime-wBDrZaMa.js";import"./nivo-legends-0WTLJ5Sd.js";import"./config-DZ-BTm2e.js";import"preact/compat";import"./useTooltip-DhzO0u9M.js";import"./floating-ui.dom-PEni3-qj.js";import"./line-Dnk6WnzK.js";import"./identity-DzNdV8kh.js";import"node:crypto";import"./constants-BhEoR-GZ.js";import"./utils-C1Oqs14G.js";const p=t=>"skipped"===t||"unknown"===t,l=t=>"failed"===t||"broken"===t,c=(t,r)=>r.reduce(((r,i)=>(p(i)&&(r[i]=t[i]??0),l(i)&&(r[i]=-(t[i]??0)),r)),{}),u=u=>{const{title:d,data:j,i18n:f,statuses:h}=u,b=j.find((t=>"current"===t.id)),g=i((()=>h.map((t=>({id:t,label:f(`status.${t}`),color:n(t,"chartFill"),value:p(t)?1:-1})))),[h,f]),x=i((()=>j.map((t=>({id:t.id,timestamp:t.timestamp,...c(t,h)})))),[j,h]),y=x.every((t=>h.every((r=>0===t[r])))),k=x.filter((t=>"current"!==t.id)).every((t=>h.every((r=>0===t[r]))));if(!b||y)return t(s,{title:d,children:t(e,{title:f("no-results"),icon:o.lineChartsBarChartSquare})});if(1===j.length&&b||k)return t(s,{title:d,children:t(e,{title:f("no-history"),icon:o.lineChartsBarChartSquare})});const v=Math.max(...x.map((t=>{const r=Math.abs(h.filter((t=>l(t))).reduce(((r,i)=>r+(t[i]??0)),0)),i=Math.abs(h.filter((t=>p(t))).reduce(((r,i)=>r+(t[i]??0)),0));return Math.max(r,i)}))),M=Math.ceil(1.01*v);return t(s,{title:d,children:t(a,{groupMode:"stacked",layout:"horizontal",data:x,legend:g,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>"current"===t.id?f("tooltips.current"):f("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return r(f("ticks.current"),{length:15});const i=x.find((r=>r.id===t));return i?r(f("ticks.history",{timestamp:i?.timestamp}),{length:15}):""},bottomTickSize:10,formatLegendValue:({value:t})=>t?m(Math.abs(Number(t))):"-",noLegend:!0,formatLeftTick:t=>{const r=Math.abs(Number(t));return Number.isInteger(r)?m(Math.abs(Number(t))):""},minValue:-M,maxValue:M})})};export{u as StatusAgePyramidChartWidget};
1
+ import{u as t}from"./clsx-D83172mf.js";import{t as r}from"./truncate-Bk-Lghrl.js";import{useMemo as i}from"preact/hooks";import{E as e}from"./index-BLcyRUFW.js";import{a as o}from"./index-qMwNH4DY.js";import{W as s}from"./index-BzcM2nAl.js";import{B as a}from"./BarChart-Dmhamjn_.js";import{f as m}from"./index-DQIPuqU4.js";import{g as n}from"./utils-DfVSL1lz.js";import"preact";import"./_commonjsHelpers-Doe7ti1T.js";import"./toString-Ccq3A8Sl.js";import"./_stringToArray-aaWSQcKo.js";import"./_baseSlice-CBpWu5XB.js";import"./nivo-colors-fVDn0-vW.js";import"react";import"./index.module-Bdu_gwCw.js";import"./linear-C7uKb8Tk.js";import"./array-B0SXO2zY.js";import"react-dom";import"./nivo-annotations-OXtu3nXs.js";import"./omit-Cims_XVO.js";import"./toNumber-Cpsf6DxM.js";import"./index-Dq7O-bm8.js";import"./nivo-axes-3Cy5TCy7.js";import"./utcTime-ClVTKNFl.js";import"./nivo-legends-BIaWaGVX.js";import"./config-CgDglkkw.js";import"preact/compat";import"./useTooltip-VGYCawp2.js";import"./floating-ui.dom-B9YqEzUD.js";import"./line-CEBDCBhb.js";import"./identity-DBvQ9SaG.js";import"node:crypto";import"./constants-D-YBPtws.js";import"./utils-DKmgmsaJ.js";const p=t=>"skipped"===t||"unknown"===t,l=t=>"failed"===t||"broken"===t,c=(t,r)=>r.reduce(((r,i)=>(p(i)&&(r[i]=t[i]??0),l(i)&&(r[i]=-(t[i]??0)),r)),{}),u=u=>{const{title:d,data:j,i18n:f,statuses:h}=u,b=j.find((t=>"current"===t.id)),g=i((()=>h.map((t=>({id:t,label:f(`status.${t}`),color:n(t,"chartFill"),value:p(t)?1:-1})))),[h,f]),x=i((()=>j.map((t=>({id:t.id,timestamp:t.timestamp,...c(t,h)})))),[j,h]),y=x.every((t=>h.every((r=>0===t[r])))),k=x.filter((t=>"current"!==t.id)).every((t=>h.every((r=>0===t[r]))));if(!b||y)return t(s,{title:d,children:t(e,{title:f("no-results"),icon:o.lineChartsBarChartSquare})});if(1===j.length&&b||k)return t(s,{title:d,children:t(e,{title:f("no-history"),icon:o.lineChartsBarChartSquare})});const v=Math.max(...x.map((t=>{const r=Math.abs(h.filter((t=>l(t))).reduce(((r,i)=>r+(t[i]??0)),0)),i=Math.abs(h.filter((t=>p(t))).reduce(((r,i)=>r+(t[i]??0)),0));return Math.max(r,i)}))),M=Math.ceil(1.01*v);return t(s,{title:d,children:t(a,{groupMode:"stacked",layout:"horizontal",data:x,legend:g,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>"current"===t.id?f("tooltips.current"):f("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return r(f("ticks.current"),{length:15});const i=x.find((r=>r.id===t));return i?r(f("ticks.history",{timestamp:i?.timestamp}),{length:15}):""},bottomTickSize:10,formatLegendValue:({value:t})=>t?m(Math.abs(Number(t))):"-",noLegend:!0,formatLeftTick:t=>{const r=Math.abs(Number(t));return Number.isInteger(r)?m(Math.abs(Number(t))):""},minValue:-M,maxValue:M})})};export{u as StatusAgePyramidChartWidget};
2
2
  //# sourceMappingURL=StatusAgePyramidChartWidget.js.map
@@ -1,2 +1,2 @@
1
- import{u as t}from"./clsx-BnvTIEMY.js";import{s as r}from"./identity-DzNdV8kh.js";import{E as i}from"./index-CHmhJlCy.js";import{a as o}from"./index-D_2wjrUN.js";import{W as e}from"./index-CMG20_7S.js";import{B as a}from"./BarChart-DVqwZDOJ.js";import{f as s}from"./index-BniCQn-f.js";import{g as m}from"./utils-DNKsxZkE.js";import"preact";import"node:crypto";import"./index-Dj8HmckV.js";import"react";import"./nivo-axes-Ce1dH5CY.js";import"./nivo-colors-DSqwed4A.js";import"./_commonjsHelpers-bbZql6IY.js";import"./toString-CTcEQi-b.js";import"./index.module-BKdNahiA.js";import"./linear-CZyKfBBG.js";import"./array-Z5whfZ28.js";import"react-dom";import"./nivo-annotations-B2rsOOOb.js";import"./omit-DhTTm08t.js";import"./_baseSlice-DybH-rwG.js";import"./utcTime-wBDrZaMa.js";import"./nivo-legends-0WTLJ5Sd.js";import"preact/hooks";import"./config-DZ-BTm2e.js";import"./toNumber-DEBMlvT0.js";import"preact/compat";import"./useTooltip-DhzO0u9M.js";import"./floating-ui.dom-PEni3-qj.js";import"./line-Dnk6WnzK.js";import"./constants-BhEoR-GZ.js";import"./utils-C1Oqs14G.js";const n=n=>{const{title:p,data:l,statuses:c=r,i18n:d}=n,u=l.find((t=>"current"===t.id)),j=c.map((t=>({id:t,label:d(`status.${t}`),color:m(t,"chartFill")}))),f=l.map((t=>({id:t.id,name:t.name,timestamp:t.timestamp,url:t.url,...t.statistic}))),h=f.every((t=>0===t.total)),x=f.filter((t=>"current"!==t.id)).every((t=>0===t.total)),g=1.01*f.reduce(((t,r)=>Math.max(t,r.total)),0);if(h||!u||0===u.statistic.total)return t(e,{title:p,children:t(i,{title:d("no-results"),icon:o.lineChartsBarChartSquare})});if(1===l.length&&u||x)return t(e,{title:p,children:t(i,{title:d("no-history"),icon:o.lineChartsBarChartSquare})});return t(e,{title:p,children:t(a,{groupMode:"stacked",data:f,legend:j,indexBy:"id",hasValueFn:t=>t.total>0,onBarClick:t=>{"current"!==t.data.id&&t.data.url&&window.open(t.data.url,"_blank","noopener,noreferrer")},formatIndexBy:t=>"current"===t.id?d("tooltips.current"):d("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return d("ticks.current");const r=f.find((r=>r.id===t));return r?d("ticks.history",{timestamp:r?.timestamp}):""},bottomTickRotation:45,formatLeftTick:t=>{const r=Math.abs(Number(t));return Number.isInteger(r)?s(Math.abs(Number(t))):""},formatLegendValue:({value:t})=>t?s(t):"-",noLegend:!0,maxValue:g})})};export{n as StatusDynamicsChartWidget};
1
+ import{u as t}from"./clsx-D83172mf.js";import{s as r}from"./identity-DBvQ9SaG.js";import{E as i}from"./index-BLcyRUFW.js";import{a as o}from"./index-qMwNH4DY.js";import{W as e}from"./index-BzcM2nAl.js";import{B as a}from"./BarChart-Dmhamjn_.js";import{f as s}from"./index-DQIPuqU4.js";import{g as m}from"./utils-DfVSL1lz.js";import"preact";import"node:crypto";import"./index-Dq7O-bm8.js";import"react";import"./nivo-axes-3Cy5TCy7.js";import"./nivo-colors-fVDn0-vW.js";import"./_commonjsHelpers-Doe7ti1T.js";import"./toString-Ccq3A8Sl.js";import"./index.module-Bdu_gwCw.js";import"./linear-C7uKb8Tk.js";import"./array-B0SXO2zY.js";import"react-dom";import"./nivo-annotations-OXtu3nXs.js";import"./omit-Cims_XVO.js";import"./_baseSlice-CBpWu5XB.js";import"./utcTime-ClVTKNFl.js";import"./nivo-legends-BIaWaGVX.js";import"preact/hooks";import"./config-CgDglkkw.js";import"./toNumber-Cpsf6DxM.js";import"preact/compat";import"./useTooltip-VGYCawp2.js";import"./floating-ui.dom-B9YqEzUD.js";import"./line-CEBDCBhb.js";import"./constants-D-YBPtws.js";import"./utils-DKmgmsaJ.js";const n=n=>{const{title:p,data:l,statuses:c=r,i18n:d}=n,u=l.find((t=>"current"===t.id)),j=c.map((t=>({id:t,label:d(`status.${t}`),color:m(t,"chartFill")}))),f=l.map((t=>({id:t.id,name:t.name,timestamp:t.timestamp,url:t.url,...t.statistic}))),h=f.every((t=>0===t.total)),x=f.filter((t=>"current"!==t.id)).every((t=>0===t.total)),g=1.01*f.reduce(((t,r)=>Math.max(t,r.total)),0);if(h||!u||0===u.statistic.total)return t(e,{title:p,children:t(i,{title:d("no-results"),icon:o.lineChartsBarChartSquare})});if(1===l.length&&u||x)return t(e,{title:p,children:t(i,{title:d("no-history"),icon:o.lineChartsBarChartSquare})});return t(e,{title:p,children:t(a,{groupMode:"stacked",data:f,legend:j,indexBy:"id",hasValueFn:t=>t.total>0,onBarClick:t=>{"current"!==t.data.id&&t.data.url&&window.open(t.data.url,"_blank","noopener,noreferrer")},formatIndexBy:t=>"current"===t.id?d("tooltips.current"):d("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return d("ticks.current");const r=f.find((r=>r.id===t));return r?d("ticks.history",{timestamp:r?.timestamp}):""},bottomTickRotation:45,formatLeftTick:t=>{const r=Math.abs(Number(t));return Number.isInteger(r)?s(Math.abs(Number(t))):""},formatLegendValue:({value:t})=>t?s(t):"-",noLegend:!0,maxValue:g})})};export{n as StatusDynamicsChartWidget};
2
2
  //# sourceMappingURL=StatusDynamicsChartWidget.js.map
@@ -1,2 +1,2 @@
1
- import{u as t}from"./clsx-BnvTIEMY.js";import{useMemo as e}from"preact/hooks";import{E as r}from"./index-CHmhJlCy.js";import{a as i}from"./index-D_2wjrUN.js";import{W as o}from"./index-CMG20_7S.js";import{B as n}from"./BarChart-DVqwZDOJ.js";import{f as s}from"./index-BniCQn-f.js";import{a}from"./utils-DNKsxZkE.js";import"preact";import"./index-Dj8HmckV.js";import"react";import"./nivo-axes-Ce1dH5CY.js";import"./nivo-colors-DSqwed4A.js";import"./_commonjsHelpers-bbZql6IY.js";import"./toString-CTcEQi-b.js";import"./index.module-BKdNahiA.js";import"./linear-CZyKfBBG.js";import"./array-Z5whfZ28.js";import"react-dom";import"./nivo-annotations-B2rsOOOb.js";import"./omit-DhTTm08t.js";import"./_baseSlice-DybH-rwG.js";import"./utcTime-wBDrZaMa.js";import"./nivo-legends-0WTLJ5Sd.js";import"./config-DZ-BTm2e.js";import"./toNumber-DEBMlvT0.js";import"preact/compat";import"./useTooltip-DhzO0u9M.js";import"./floating-ui.dom-PEni3-qj.js";import"./line-Dnk6WnzK.js";import"./identity-DzNdV8kh.js";import"node:crypto";import"./constants-BhEoR-GZ.js";import"./utils-C1Oqs14G.js";const m=t=>{switch(t){case"new":return"var(--color-intent-info-text)";case"fixed":return"var(--color-intent-success-text)";case"regressed":return"var(--color-intent-danger-text)";case"malfunctioned":return"var(--color-intent-warning-text)"}},d=["fixed","regressed","malfunctioned"],c=c=>{const{title:l,data:p,i18n:u}=c,f=Math.ceil(1.01*Math.max(...p.map((t=>t.fixed+t.regressed+t.malfunctioned)))),j=p.map((t=>{const e=2*f,r=t.regressed+t.malfunctioned,i=a({positiveValue:t.fixed,negativeValue:r,absTotal:e,noValuePercentage:-1});return{id:t.id,timestamp:t.timestamp,prevItemTimestamp:t.prevItemTimestamp,fixed:t.fixed,regressed:0===t.regressed?0:-t.regressed,malfunctioned:0===t.malfunctioned?0:-t.malfunctioned,trend:i}})),g=p.find((t=>"current"===t.id)),x=e((()=>[...d.map((t=>({id:t,label:u(`transitions.${t}`),color:m(t),value:"fixed"===t?1:-1}))),{id:"trend",label:u("legend.trend"),color:"var(--color-chart-categorical-9)",type:"point"}]),[u]),h=j.every((t=>0===t.fixed&&0===t.regressed&&0===t.malfunctioned)),v=j.filter((t=>"current"!==t.id)).every((t=>0===t.fixed&&0===t.regressed&&0===t.malfunctioned));if(!g||h)return t(o,{title:l,children:t(r,{title:u("no-results"),icon:i.lineChartsBarChartSquare})});if(1===p.length&&g||v)return t(o,{title:l,children:t(r,{title:u("no-history"),icon:i.lineChartsBarChartSquare})});return t(o,{title:l,children:t(n,{groupMode:"stacked",data:j,legend:x,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>"current"===t.id?u("tooltips.current"):u("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return u("ticks.current");const e=j.find((e=>e.id===t));return e?u("ticks.history",{timestamp:e?.timestamp}):""},bottomTickRotation:45,formatTrendValue:t=>{if(-1!==t)return t},formatLegendValue:({value:t,id:e})=>"trend"===e?"":t?s(Math.abs(Number(t))):"-",noLegend:!0,formatLeftTick:t=>{const e=Math.abs(Number(t));return Number.isInteger(e)?s(Math.abs(Number(t))):""},minValue:-f,maxValue:f})})};export{c as StatusTransitionsChartWidget};
1
+ import{u as t}from"./clsx-D83172mf.js";import{useMemo as e}from"preact/hooks";import{E as r}from"./index-BLcyRUFW.js";import{a as i}from"./index-qMwNH4DY.js";import{W as o}from"./index-BzcM2nAl.js";import{B as n}from"./BarChart-Dmhamjn_.js";import{f as s}from"./index-DQIPuqU4.js";import{a}from"./utils-DfVSL1lz.js";import"preact";import"./index-Dq7O-bm8.js";import"react";import"./nivo-axes-3Cy5TCy7.js";import"./nivo-colors-fVDn0-vW.js";import"./_commonjsHelpers-Doe7ti1T.js";import"./toString-Ccq3A8Sl.js";import"./index.module-Bdu_gwCw.js";import"./linear-C7uKb8Tk.js";import"./array-B0SXO2zY.js";import"react-dom";import"./nivo-annotations-OXtu3nXs.js";import"./omit-Cims_XVO.js";import"./_baseSlice-CBpWu5XB.js";import"./utcTime-ClVTKNFl.js";import"./nivo-legends-BIaWaGVX.js";import"./config-CgDglkkw.js";import"./toNumber-Cpsf6DxM.js";import"preact/compat";import"./useTooltip-VGYCawp2.js";import"./floating-ui.dom-B9YqEzUD.js";import"./line-CEBDCBhb.js";import"./identity-DBvQ9SaG.js";import"node:crypto";import"./constants-D-YBPtws.js";import"./utils-DKmgmsaJ.js";const m=t=>{switch(t){case"new":return"var(--color-intent-info-text)";case"fixed":return"var(--color-intent-success-text)";case"regressed":return"var(--color-intent-danger-text)";case"malfunctioned":return"var(--color-intent-warning-text)"}},d=["fixed","regressed","malfunctioned"],c=c=>{const{title:l,data:p,i18n:u}=c,f=Math.ceil(1.01*Math.max(...p.map((t=>t.fixed+t.regressed+t.malfunctioned)))),j=p.map((t=>{const e=2*f,r=t.regressed+t.malfunctioned,i=a({positiveValue:t.fixed,negativeValue:r,absTotal:e,noValuePercentage:-1});return{id:t.id,timestamp:t.timestamp,prevItemTimestamp:t.prevItemTimestamp,fixed:t.fixed,regressed:0===t.regressed?0:-t.regressed,malfunctioned:0===t.malfunctioned?0:-t.malfunctioned,trend:i}})),g=p.find((t=>"current"===t.id)),x=e((()=>[...d.map((t=>({id:t,label:u(`transitions.${t}`),color:m(t),value:"fixed"===t?1:-1}))),{id:"trend",label:u("legend.trend"),color:"var(--color-chart-categorical-9)",type:"point"}]),[u]),h=j.every((t=>0===t.fixed&&0===t.regressed&&0===t.malfunctioned)),v=j.filter((t=>"current"!==t.id)).every((t=>0===t.fixed&&0===t.regressed&&0===t.malfunctioned));if(!g||h)return t(o,{title:l,children:t(r,{title:u("no-results"),icon:i.lineChartsBarChartSquare})});if(1===p.length&&g||v)return t(o,{title:l,children:t(r,{title:u("no-history"),icon:i.lineChartsBarChartSquare})});return t(o,{title:l,children:t(n,{groupMode:"stacked",data:j,legend:x,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>"current"===t.id?u("tooltips.current"):u("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return u("ticks.current");const e=j.find((e=>e.id===t));return e?u("ticks.history",{timestamp:e?.timestamp}):""},bottomTickRotation:45,formatTrendValue:t=>{if(-1!==t)return t},formatLegendValue:({value:t,id:e})=>"trend"===e?"":t?s(Math.abs(Number(t))):"-",noLegend:!0,formatLeftTick:t=>{const e=Math.abs(Number(t));return Number.isInteger(e)?s(Math.abs(Number(t))):""},minValue:-f,maxValue:f})})};export{c as StatusTransitionsChartWidget};
2
2
  //# sourceMappingURL=StatusTransitionsChartWidget.js.map
@@ -1,2 +1,2 @@
1
- import{u as t,c as s}from"./clsx-BnvTIEMY.js";import{i as r,e as a}from"./identity-DzNdV8kh.js";import{g as o}from"./utils-C1Oqs14G.js";import{H as e}from"./index-Dj8HmckV.js";import{d as i,s as l,u as c,f as m}from"./successRate-BKeIquyk.js";import{g as n}from"./utils-DNKsxZkE.js";import{Fragment as p}from"preact";import"node:crypto";import"./array-Z5whfZ28.js";import"./constants-BhEoR-GZ.js";import"./_commonjsHelpers-bbZql6IY.js";import"./floating-ui.dom-PEni3-qj.js";import"preact/compat";import"preact/hooks";import"./index-CZJiaWZN.js";import"./linear-CZyKfBBG.js";var u="styles_legend__JMBvn",d="styles_chart__mUNSO",_="styles_target__iJ491";const g=({slice:s,total:r,i18n:a})=>{const o=a("statusSlice",{count:s.count,status:a(`status.${s.status}`),percent:m(r?s.count/r*100:0)}),{triggerProps:e,tooltip:i}=c(o);return s.d?"__empty__"===s.status?t("path",{d:s.d,fill:"var(--color-control-bg)"}):t(p,{children:[t("path",{...e,role:"img","aria-label":o,className:_,d:s.d,fill:n(s.status,"chartFill")}),i]}):null},f=({slices:n,percentage:p,className:f,i18n:j=i})=>{const h=a();for(const t of n)"__empty__"!==t.status&&r(h,t.status,t.count);const y=0===h.total?"???":`${m(p)}%`,v=j("successRate",{rate:y}),x=l(h.total,o(h),j),{triggerProps:N,tooltip:b}=c(`${v}\n${x}`,v);return t("article",{className:s(d,f),children:[t("svg",{viewBox:"0 0 100 100",children:t("g",{transform:"translate(50, 50)",children:n.map((s=>t(g,{slice:s,total:h.total,i18n:j},s.status)))})}),t("div",{...N,role:"img","aria-label":v,className:s(u,_),children:t(e,{size:"s",tag:"b",children:y})}),b]})};export{f as SuccessRatePieChart};
1
+ import{u as t,c as s}from"./clsx-D83172mf.js";import{i as r,e as a}from"./identity-DBvQ9SaG.js";import{g as o}from"./utils-DKmgmsaJ.js";import{H as e}from"./index-Dq7O-bm8.js";import{d as i,s as l,u as c,f as m}from"./successRate-rrLYYsum.js";import{g as n}from"./utils-DfVSL1lz.js";import{Fragment as p}from"preact";import"node:crypto";import"./array-B0SXO2zY.js";import"./constants-D-YBPtws.js";import"./_commonjsHelpers-Doe7ti1T.js";import"./floating-ui.dom-B9YqEzUD.js";import"preact/compat";import"preact/hooks";import"./index-BZ-V3udE.js";import"./linear-C7uKb8Tk.js";var u="styles_legend__JMBvn",d="styles_chart__mUNSO",_="styles_target__iJ491";const g=({slice:s,total:r,i18n:a})=>{const o=a("statusSlice",{count:s.count,status:a(`status.${s.status}`),percent:m(r?s.count/r*100:0)}),{triggerProps:e,tooltip:i}=c(o);return s.d?"__empty__"===s.status?t("path",{d:s.d,fill:"var(--color-control-bg)"}):t(p,{children:[t("path",{...e,role:"img","aria-label":o,className:_,d:s.d,fill:n(s.status,"chartFill")}),i]}):null},f=({slices:n,percentage:p,className:f,i18n:j=i})=>{const h=a();for(const t of n)"__empty__"!==t.status&&r(h,t.status,t.count);const y=0===h.total?"???":`${m(p)}%`,v=j("successRate",{rate:y}),x=l(h.total,o(h),j),{triggerProps:N,tooltip:b}=c(`${v}\n${x}`,v);return t("article",{className:s(d,f),children:[t("svg",{viewBox:"0 0 100 100",children:t("g",{transform:"translate(50, 50)",children:n.map((s=>t(g,{slice:s,total:h.total,i18n:j},s.status)))})}),t("div",{...N,role:"img","aria-label":v,className:s(u,_),children:t(e,{size:"s",tag:"b",children:y})}),b]})};export{f as SuccessRatePieChart};
2
2
  //# sourceMappingURL=SuccessRatePieChart.js.map
@@ -1,2 +1,2 @@
1
- import{u as t}from"./clsx-BnvTIEMY.js";import{useMemo as r}from"preact/hooks";import{E as e}from"./index-CHmhJlCy.js";import{a as o}from"./index-D_2wjrUN.js";import{W as i}from"./index-CMG20_7S.js";import{B as a}from"./BarChart-DVqwZDOJ.js";import{f as s}from"./index-BniCQn-f.js";import{g as n,a as m}from"./utils-DNKsxZkE.js";import"preact";import"./index-Dj8HmckV.js";import"react";import"./nivo-axes-Ce1dH5CY.js";import"./nivo-colors-DSqwed4A.js";import"./_commonjsHelpers-bbZql6IY.js";import"./toString-CTcEQi-b.js";import"./index.module-BKdNahiA.js";import"./linear-CZyKfBBG.js";import"./array-Z5whfZ28.js";import"react-dom";import"./nivo-annotations-B2rsOOOb.js";import"./omit-DhTTm08t.js";import"./_baseSlice-DybH-rwG.js";import"./utcTime-wBDrZaMa.js";import"./nivo-legends-0WTLJ5Sd.js";import"./config-DZ-BTm2e.js";import"./toNumber-DEBMlvT0.js";import"preact/compat";import"./useTooltip-DhzO0u9M.js";import"./floating-ui.dom-PEni3-qj.js";import"./line-Dnk6WnzK.js";import"./identity-DzNdV8kh.js";import"node:crypto";import"./constants-BhEoR-GZ.js";import"./utils-C1Oqs14G.js";const p=t=>t.startsWith("new:"),l=t=>t.startsWith("removed:"),c=c=>{const{title:d,data:u,i18n:f,statuses:h}=c,j=u.find((t=>"current"===t.id)),b=r((()=>{const t=[];for(const r of h)t.push(`new:${r}`);for(const r of h)t.push(`removed:${r}`);return t}),[h]),g=r((()=>[...b.map((t=>{const r=t.replace(":",""),e=t.replace("new:","").replace("removed:","");return{id:t,label:f(`status.${r}`),color:n(e,"chartFill"),value:p(t)?1:-1}})),{id:"trend",label:f("legend.trend"),color:"var(--color-chart-categorical-9)",type:"point"}]),[b,f]),v=Math.ceil(1.01*Math.max(...u.map((t=>{const r=Math.abs(b.filter((t=>l(t))).reduce(((r,e)=>r+(t[e]??0)),0)),e=Math.abs(b.filter((t=>p(t))).reduce(((r,e)=>r+(t[e]??0)),0));return Math.max(e,r)})))),x=r((()=>u.map((t=>{const r=2*v,e=((t,r)=>r.reduce(((r,e)=>(p(e)&&(r[e]=t[e]??0),l(e)&&(r[e]=-(t[e]??0)),r)),{}))(t,b),o=Math.abs(b.filter((t=>l(t))).reduce(((t,r)=>t+(e[r]??0)),0)),i=Math.abs(b.filter((t=>p(t))).reduce(((t,r)=>t+(e[r]??0)),0)),a=m({positiveValue:i,negativeValue:o,absTotal:r,noValuePercentage:-1});return{id:t.id,timestamp:t.timestamp,...e,trend:a}}))),[u,b,v]),y=x.every((t=>b.every((r=>0===t[r])))),M=x.filter((t=>"current"!==t.id)).every((t=>b.every((r=>0===t[r]))));return!j||y?t(i,{title:d,children:t(e,{title:f("no-results"),icon:o.lineChartsBarChartSquare})}):1===u.length&&j||M?t(i,{title:d,children:t(e,{title:f("no-history"),icon:o.lineChartsBarChartSquare})}):t(i,{title:d,children:t(a,{groupMode:"stacked",data:x,legend:g,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>"current"===t.id?f("tooltips.current"):f("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return f("ticks.current");const r=x.find((r=>r.id===t));return r?f("ticks.history",{timestamp:r?.timestamp}):""},bottomTickRotation:45,formatLegendValue:({value:t,id:r})=>"trend"===r?"":t?s(Math.abs(Number(t))):"-",noLegend:!0,formatLeftTick:t=>{const r=Math.abs(Number(t));return Number.isInteger(r)?s(Math.abs(Number(t))):""},minValue:-v,maxValue:v,formatTrendValue:t=>{if(-1!==t)return t}})})};export{c as TestBaseGrowthDynamicsChartWidget};
1
+ import{u as t}from"./clsx-D83172mf.js";import{useMemo as r}from"preact/hooks";import{E as e}from"./index-BLcyRUFW.js";import{a as o}from"./index-qMwNH4DY.js";import{W as i}from"./index-BzcM2nAl.js";import{B as a}from"./BarChart-Dmhamjn_.js";import{f as s}from"./index-DQIPuqU4.js";import{g as n,a as m}from"./utils-DfVSL1lz.js";import"preact";import"./index-Dq7O-bm8.js";import"react";import"./nivo-axes-3Cy5TCy7.js";import"./nivo-colors-fVDn0-vW.js";import"./_commonjsHelpers-Doe7ti1T.js";import"./toString-Ccq3A8Sl.js";import"./index.module-Bdu_gwCw.js";import"./linear-C7uKb8Tk.js";import"./array-B0SXO2zY.js";import"react-dom";import"./nivo-annotations-OXtu3nXs.js";import"./omit-Cims_XVO.js";import"./_baseSlice-CBpWu5XB.js";import"./utcTime-ClVTKNFl.js";import"./nivo-legends-BIaWaGVX.js";import"./config-CgDglkkw.js";import"./toNumber-Cpsf6DxM.js";import"preact/compat";import"./useTooltip-VGYCawp2.js";import"./floating-ui.dom-B9YqEzUD.js";import"./line-CEBDCBhb.js";import"./identity-DBvQ9SaG.js";import"node:crypto";import"./constants-D-YBPtws.js";import"./utils-DKmgmsaJ.js";const p=t=>t.startsWith("new:"),l=t=>t.startsWith("removed:"),c=c=>{const{title:d,data:u,i18n:f,statuses:h}=c,j=u.find((t=>"current"===t.id)),b=r((()=>{const t=[];for(const r of h)t.push(`new:${r}`);for(const r of h)t.push(`removed:${r}`);return t}),[h]),g=r((()=>[...b.map((t=>{const r=t.replace(":",""),e=t.replace("new:","").replace("removed:","");return{id:t,label:f(`status.${r}`),color:n(e,"chartFill"),value:p(t)?1:-1}})),{id:"trend",label:f("legend.trend"),color:"var(--color-chart-categorical-9)",type:"point"}]),[b,f]),v=Math.ceil(1.01*Math.max(...u.map((t=>{const r=Math.abs(b.filter((t=>l(t))).reduce(((r,e)=>r+(t[e]??0)),0)),e=Math.abs(b.filter((t=>p(t))).reduce(((r,e)=>r+(t[e]??0)),0));return Math.max(e,r)})))),x=r((()=>u.map((t=>{const r=2*v,e=((t,r)=>r.reduce(((r,e)=>(p(e)&&(r[e]=t[e]??0),l(e)&&(r[e]=-(t[e]??0)),r)),{}))(t,b),o=Math.abs(b.filter((t=>l(t))).reduce(((t,r)=>t+(e[r]??0)),0)),i=Math.abs(b.filter((t=>p(t))).reduce(((t,r)=>t+(e[r]??0)),0)),a=m({positiveValue:i,negativeValue:o,absTotal:r,noValuePercentage:-1});return{id:t.id,timestamp:t.timestamp,...e,trend:a}}))),[u,b,v]),y=x.every((t=>b.every((r=>0===t[r])))),M=x.filter((t=>"current"!==t.id)).every((t=>b.every((r=>0===t[r]))));return!j||y?t(i,{title:d,children:t(e,{title:f("no-results"),icon:o.lineChartsBarChartSquare})}):1===u.length&&j||M?t(i,{title:d,children:t(e,{title:f("no-history"),icon:o.lineChartsBarChartSquare})}):t(i,{title:d,children:t(a,{groupMode:"stacked",data:x,legend:g,indexBy:"id",hasValueFn:()=>!0,formatIndexBy:t=>"current"===t.id?f("tooltips.current"):f("tooltips.history",{timestamp:t?.timestamp}),formatBottomTick:t=>{if("current"===t)return f("ticks.current");const r=x.find((r=>r.id===t));return r?f("ticks.history",{timestamp:r?.timestamp}):""},bottomTickRotation:45,formatLegendValue:({value:t,id:r})=>"trend"===r?"":t?s(Math.abs(Number(t))):"-",noLegend:!0,formatLeftTick:t=>{const r=Math.abs(Number(t));return Number.isInteger(r)?s(Math.abs(Number(t))):""},minValue:-v,maxValue:v,formatTrendValue:t=>{if(-1!==t)return t}})})};export{c as TestBaseGrowthDynamicsChartWidget};
2
2
  //# sourceMappingURL=TestBaseGrowthDynamicsChartWidget.js.map
@@ -1,2 +1,2 @@
1
- import"./clsx-BnvTIEMY.js";import"./nivo-colors-DSqwed4A.js";export{T as TestingPyramidWidget}from"./index-BrOvQRuo.js";import"preact/hooks";import"./index-CMG20_7S.js";import"./successRate-BKeIquyk.js";import"./EmptyDataStub-BuH_D_lp.js";import"preact";import"react";import"./_commonjsHelpers-bbZql6IY.js";import"./toString-CTcEQi-b.js";import"./index.module-BKdNahiA.js";import"./linear-CZyKfBBG.js";import"./array-Z5whfZ28.js";import"react-dom";import"./nivo-annotations-B2rsOOOb.js";import"./omit-DhTTm08t.js";import"./_baseSlice-DybH-rwG.js";import"./line-Dnk6WnzK.js";import"./index-Dj8HmckV.js";import"./floating-ui.dom-PEni3-qj.js";import"preact/compat";import"./index-CZJiaWZN.js";
1
+ import"./clsx-D83172mf.js";import"./nivo-colors-fVDn0-vW.js";export{T as TestingPyramidWidget}from"./index-CbwuBF9w.js";import"preact/hooks";import"./index-BzcM2nAl.js";import"./successRate-rrLYYsum.js";import"./EmptyDataStub-CRdg61R2.js";import"preact";import"react";import"./_commonjsHelpers-Doe7ti1T.js";import"./toString-Ccq3A8Sl.js";import"./index.module-Bdu_gwCw.js";import"./linear-C7uKb8Tk.js";import"./array-B0SXO2zY.js";import"react-dom";import"./nivo-annotations-OXtu3nXs.js";import"./omit-Cims_XVO.js";import"./_baseSlice-CBpWu5XB.js";import"./line-CEBDCBhb.js";import"./index-Dq7O-bm8.js";import"./floating-ui.dom-B9YqEzUD.js";import"preact/compat";import"./index-BZ-V3udE.js";
2
2
  //# sourceMappingURL=TestingPyramidWidget.js.map
@@ -1,2 +1,2 @@
1
- import{u as t}from"./clsx-BnvTIEMY.js";import{s as e}from"./identity-DzNdV8kh.js";import{f as n}from"./time-Dfkn_dVS.js";import{k as r,m as i,i as o,n as a,o as s,l as u,p as l}from"./linear-CZyKfBBG.js";import{createPortal as c}from"preact/compat";import{useState as f,useRef as h,useEffect as d,useMemo as p,useCallback as m,useContext as g,useId as v}from"preact/hooks";import{R as y}from"./config-DZ-BTm2e.js";import{u as _}from"./useTooltip-DhzO0u9M.js";import{createContext as w}from"preact";import{a as x,o as b}from"./index.module-BKdNahiA.js";import{T as k}from"./index-Dj8HmckV.js";import{u as A,p as R}from"./utcTime-wBDrZaMa.js";var T,M=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function N(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*M,skewX:Math.atan(u)*M,scaleX:a,scaleY:s}}function C(t,e,n,i){function o(t){return t.length?t.pop()+" ":""}return function(a,s){var u=[],l=[];return a=t(a),s=t(s),function(t,i,o,a,s,u){if(t!==o||i!==a){var l=s.push("translate(",null,e,null,n);u.push({i:l-4,x:r(t,o)},{i:l-2,x:r(i,a)})}else(o||a)&&s.push("translate("+o+e+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,u,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(o(n)+"rotate(",null,i)-2,x:r(t,e)})):e&&n.push(o(n)+"rotate("+e+i)}(a.rotate,s.rotate,u,l),function(t,e,n,a){t!==e?a.push({i:n.push(o(n)+"skewX(",null,i)-2,x:r(t,e)}):e&&n.push(o(n)+"skewX("+e+i)}(a.skewX,s.skewX,u,l),function(t,e,n,i,a,s){if(t!==n||e!==i){var u=a.push(o(a)+"scale(",null,",",null,")");s.push({i:u-4,x:r(t,n)},{i:u-2,x:r(e,i)})}else 1===n&&1===i||a.push(o(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,u,l),a=s=null,function(t){for(var e,n=-1,r=l.length;++n<r;)u[(e=l[n]).i]=e.x(t);return u.join("")}}}var E=C((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?S:N(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),z=C((function(t){return null==t?S:(T||(T=document.createElementNS("http://www.w3.org/2000/svg","g")),T.setAttribute("transform",t),(t=T.transform.baseVal.consolidate())?N((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):S)}),", ",")",")");function P(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function I(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}var V="http://www.w3.org/1999/xhtml",D={svg:"http://www.w3.org/2000/svg",xhtml:V,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),D.hasOwnProperty(e)?{space:D[e],local:t}:t}function j(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===V&&e.documentElement.namespaceURI===V?e.createElement(t):e.createElementNS(n,t)}}function X(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function F(t){var e=$(t);return(e.local?X:j)(e)}function O(){}function G(t){return null==t?O:function(){return this.querySelector(t)}}function q(){return[]}function Y(t){return null==t?q:function(){return this.querySelectorAll(t)}}function B(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function L(t){return function(){return this.matches(t)}}function H(t){return function(e){return e.matches(t)}}var W=Array.prototype.find;function U(){return this.firstElementChild}var K=Array.prototype.filter;function J(){return Array.from(this.children)}function Q(t){return new Array(t.length)}function Z(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function tt(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Z(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function et(t,e,n,r,i,o,a){var s,u,l,c=new Map,f=e.length,h=o.length,d=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(d[s]=l=a.call(u,u.__data__,s,e)+"",c.has(l)?i[s]=u:c.set(l,u));for(s=0;s<h;++s)l=a.call(t,o[s],s,o)+"",(u=c.get(l))?(r[s]=u,u.__data__=o[s],c.delete(l)):n[s]=new Z(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&c.get(d[s])===u&&(i[s]=u)}function nt(t){return t.__data__}function rt(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function it(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ot(t){return function(){this.removeAttribute(t)}}function at(t){return function(){this.removeAttributeNS(t.space,t.local)}}function st(t,e){return function(){this.setAttribute(t,e)}}function ut(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function lt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ct(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ft(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ht(t){return function(){this.style.removeProperty(t)}}function dt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function pt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function mt(t,e){return t.style.getPropertyValue(e)||ft(t).getComputedStyle(t,null).getPropertyValue(e)}function gt(t){return function(){delete this[t]}}function vt(t,e){return function(){this[t]=e}}function yt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function _t(t){return t.trim().split(/^|\s+/)}function wt(t){return t.classList||new xt(t)}function xt(t){this._node=t,this._names=_t(t.getAttribute("class")||"")}function bt(t,e){for(var n=wt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function kt(t,e){for(var n=wt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function At(t){return function(){bt(this,t)}}function Rt(t){return function(){kt(this,t)}}function Tt(t,e){return function(){(e.apply(this,arguments)?bt:kt)(this,t)}}function Mt(){this.textContent=""}function St(t){return function(){this.textContent=t}}function Nt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ct(){this.innerHTML=""}function Et(t){return function(){this.innerHTML=t}}function zt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Pt(){this.nextSibling&&this.parentNode.appendChild(this)}function It(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Vt(){return null}function Dt(){var t=this.parentNode;t&&t.removeChild(this)}function $t(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ft(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Ot(t,e,n){var r=ft(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Gt(t,e){return function(){return Ot(this,t,e)}}function qt(t,e){return function(){return Ot(this,t,e.apply(this,arguments))}}Z.prototype={constructor:Z,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},xt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Yt=[null];function Bt(t,e){this._groups=t,this._parents=e}function Lt(){return new Bt([[document.documentElement]],Yt)}function Ht(t){return"string"==typeof t?new Bt([[document.querySelector(t)]],[document.documentElement]):new Bt([[t]],Yt)}function Wt(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}Bt.prototype=Lt.prototype={constructor:Bt,select:function(t){"function"!=typeof t&&(t=G(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new Bt(r,this._parents)},selectAll:function(t){t="function"==typeof t?B(t):Y(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new Bt(r,i)},selectChild:function(t){return this.select(null==t?U:function(t){return function(){return W.call(this.children,t)}}("function"==typeof t?t:H(t)))},selectChildren:function(t){return this.selectAll(null==t?J:function(t){return function(){return K.call(this.children,t)}}("function"==typeof t?t:H(t)))},filter:function(t){"function"!=typeof t&&(t=L(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Bt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,nt);var n,r=e?et:tt,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),l=new Array(a),c=0;c<a;++c){var f=i[c],h=o[c],d=h.length,p=rt(t.call(f,f&&f.__data__,c,i)),m=p.length,g=u[c]=new Array(m),v=s[c]=new Array(m);r(f,h,g,v,l[c]=new Array(d),p,e);for(var y,_,w=0,x=0;w<m;++w)if(y=g[w]){for(w>=x&&(x=w+1);!(_=v[x])&&++x<m;);y._next=_||null}}return(s=new Bt(s,i))._enter=u,s._exit=l,s},enter:function(){return new Bt(this._enter||this._groups.map(Q),this._parents)},exit:function(){return new Bt(this._exit||this._groups.map(Q),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l,c=n[u],f=r[u],h=c.length,d=s[u]=new Array(h),p=0;p<h;++p)(l=c[p]||f[p])&&(d[p]=l);for(;u<i;++u)s[u]=n[u];return new Bt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=it);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new Bt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=$(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?at:ot:"function"==typeof e?n.local?ct:lt:n.local?ut:st)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ht:"function"==typeof e?pt:dt)(t,e,null==n?"":n)):mt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?yt:vt)(t,e)):this.node()[t]},classed:function(t,e){var n=_t(t+"");if(arguments.length<2){for(var r=wt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Tt:e?At:Rt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Mt:("function"==typeof t?Nt:St)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ct:("function"==typeof t?zt:Et)(t)):this.node().innerHTML},raise:function(){return this.each(Pt)},lower:function(){return this.each(It)},append:function(t){var e="function"==typeof t?t:F(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:F(t),r=null==e?Vt:"function"==typeof e?e:G(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Dt)},clone:function(t){return this.select(t?jt:$t)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Ft:Xt,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?qt:Gt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Ut={value:()=>{}};function Kt(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Jt(r)}function Jt(t){this._=t}function Qt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Zt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ut,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Jt.prototype=Kt.prototype={constructor:Jt,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=Zt(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Zt(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=Qt(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Jt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var te,ee,ne=0,re=0,ie=0,oe=0,ae=0,se=0,ue="object"==typeof performance&&performance.now?performance:Date,le="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ce(){return ae||(le(fe),ae=ue.now()+se)}function fe(){ae=0}function he(){this._call=this._time=this._next=null}function de(t,e,n){var r=new he;return r.restart(t,e,n),r}function pe(){ae=(oe=ue.now())+se,ne=re=0;try{!function(){ce(),++ne;for(var t,e=te;e;)(t=ae-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ne}()}finally{ne=0,function(){var t,e,n=te,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:te=e);ee=t,ge(r)}(),ae=0}}function me(){var t=ue.now(),e=t-oe;e>1e3&&(se-=e,oe=t)}function ge(t){ne||(re&&(re=clearTimeout(re)),t-ae>24?(t<1/0&&(re=setTimeout(pe,t-ue.now()-se)),ie&&(ie=clearInterval(ie))):(ie||(oe=ue.now(),ie=setInterval(me,1e3)),ne=1,le(pe)))}function ve(t,e,n){var r=new he;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}he.prototype=de.prototype={constructor:he,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ce():+n)+(null==e?0:+e),this._next||ee===this||(ee?ee._next=this:te=this,ee=this),this._call=t,this._time=n,ge()},stop:function(){this._call&&(this._call=null,this._time=1/0,ge())}};var ye=Kt("start","end","cancel","interrupt"),_e=[];function we(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var l,c,f,h;if(1!==n.state)return u();for(l in i)if((h=i[l]).name===n.name){if(3===h.state)return ve(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(ve((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(o))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),l=0,c=-1;l<f;++l)(h=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=de(o,0,n.time)}(t,n,{name:e,index:r,group:i,on:ye,tween:_e,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function xe(t,e){var n=ke(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function be(t,e){var n=ke(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ke(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ae(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function Re(t,e){var n,r;return function(){var i=be(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Te(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=be(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Me(t,e,n){var r=t._id;return t.each((function(){var t=be(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ke(t,r).value[e]}}function Se(t,e){var n;return("number"==typeof e?r:e instanceof i?o:(n=i(e))?(e=n,o):a)(t,e)}function Ne(t){return function(){this.removeAttribute(t)}}function Ce(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ee(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function ze(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Pe(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Ie(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Ve(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function De(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function $e(t,e){return function(){xe(this,t).delay=+e.apply(this,arguments)}}function je(t,e){return e=+e,function(){xe(this,t).delay=e}}function Xe(t,e){return function(){be(this,t).duration=+e.apply(this,arguments)}}function Fe(t,e){return e=+e,function(){be(this,t).duration=e}}var Oe=Lt.prototype.constructor;function Ge(t){return function(){this.style.removeProperty(t)}}var qe=0;function Ye(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Be(t){return Lt().transition(t)}function Le(){return++qe}var He=Lt.prototype;Ye.prototype=Be.prototype={constructor:Ye,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=G(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,f=o[a]=new Array(c),h=0;h<c;++h)(s=l[h])&&(u=t.call(s,s.__data__,h,l))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,we(f[h],e,n,h,f,ke(s,n)));return new Ye(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Y(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,f=0;f<c;++f)if(u=l[f]){for(var h,d=t.call(u,u.__data__,f,l),p=ke(u,n),m=0,g=d.length;m<g;++m)(h=d[m])&&we(h,e,n,m,d,p);o.push(d),a.push(u)}return new Ye(o,a,e,n)},selectChild:He.selectChild,selectChildren:He.selectChildren,filter:function(t){"function"!=typeof t&&(t=L(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Ye(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],f=l.length,h=a[s]=new Array(f),d=0;d<f;++d)(u=l[d]||c[d])&&(h[d]=u);for(;s<r;++s)a[s]=e[s];return new Ye(a,this._parents,this._name,this._id)},selection:function(){return new Oe(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Le(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=ke(a,e);we(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ye(r,this._parents,t,n)},call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:function(t,e){var n=this._id;return arguments.length<2?ke(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?xe:be;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=$(t),r="transform"===n?z:Se;return this.attrTween(t,"function"==typeof e?(n.local?Ie:Pe)(n,r,Me(this,"attr."+t,e)):null==e?(n.local?Ce:Ne)(n):(n.local?ze:Ee)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=$(t);return this.tween(n,(r.local?Ve:De)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?E:Se;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=mt(this,t),a=(this.style.removeProperty(t),mt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Ge(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=mt(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=mt(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Me(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=be(this,t),l=u.on,c=null==u.value[a]?o||(o=Ge(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=mt(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Me(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ke(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Re:Te)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?$e:je)(e,t)):ke(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Xe:Fe)(e,t)):ke(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){be(this,t).ease=e}}(e,t)):ke(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;be(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=be(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:He[Symbol.iterator]};var We={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ue(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ke(t){return t}Lt.prototype.interrupt=function(t){return this.each((function(){Ae(this,t)}))},Lt.prototype.transition=function(t){var e,n;t instanceof Ye?(e=t._id,t=t._name):(e=Le(),(n=We).time=ce(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&we(a,t,e,l,s,n||Ue(a,e));return new Ye(r,this._parents,t,e)};var Je=1e-6;function Qe(t){return"translate("+t+",0)"}function Ze(t){return"translate(0,"+t+")"}function tn(t){return e=>+t(e)}function en(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nn(){return!this.__axis}function rn(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",f=1===t||3===t?Qe:Ze;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Ke:i,m=Math.max(o,0)+s,g=e.range(),v=+g[0]+u,y=+g[g.length-1]+u,_=(e.bandwidth?en:tn)(e.copy(),u),w=h.selection?h.selection():h,x=w.selectAll(".domain").data([null]),b=w.selectAll(".tick").data(d,e).order(),k=b.exit(),A=b.enter().append("g").attr("class","tick"),R=b.select("line"),T=b.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(A),R=R.merge(A.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),T=T.merge(A.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==w&&(x=x.transition(h),b=b.transition(h),R=R.transition(h),T=T.transition(h),k=k.transition(h).attr("opacity",Je).attr("transform",(function(t){return isFinite(t=_(t))?f(t+u):this.getAttribute("transform")})),A.attr("opacity",Je).attr("transform",(function(t){var e=this.parentNode.__axis;return f((e&&isFinite(e=e(t))?e:_(t))+u)}))),k.remove(),x.attr("d",4===t||2===t?a?"M"+l*a+","+v+"H"+u+"V"+y+"H"+l*a:"M"+u+","+v+"V"+y:a?"M"+v+","+l*a+"V"+u+"H"+y+"V"+l*a:"M"+v+","+u+"H"+y),b.attr("opacity",1).attr("transform",(function(t){return f(_(t)+u)})),R.attr(c+"2",l*o),T.attr(c,l*m).text(p),w.filter(nn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each((function(){this.__axis=_}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h.offset=function(t){return arguments.length?(u=+t,h):u},h}function on(t){return rn(3,t)}const an={capture:!0,passive:!1};function sn(t){t.preventDefault(),t.stopImmediatePropagation()}var un=t=>()=>t;function ln(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function cn(t){t.preventDefault(),t.stopImmediatePropagation()}var fn={name:"drag"},hn={name:"space"},dn={name:"handle"},pn={name:"center"};const{abs:mn,max:gn,min:vn}=Math;function yn(t){return[+t[0],+t[1]]}function _n(t){return[yn(t[0]),yn(t[1])]}var wn={name:"x",handles:["w","e"].map(Mn),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},xn={},bn={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},kn={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},An={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Rn={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Tn={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Mn(t){return{type:t}}function Sn(t){return!t.ctrlKey&&!t.button}function Nn(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Cn(){return navigator.maxTouchPoints||"ontouchstart"in this}function En(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function zn(){return function(t){var e,n=Nn,r=Sn,i=Cn,o=!0,a=Kt("start","brush","end"),u=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([Mn("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",bn.overlay).merge(n).each((function(){var t=En(this).extent;Ht(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Mn("selection")]).enter().append("rect").attr("class","selection").attr("cursor",bn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return bn[t.type]})),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=Ht(this),e=En(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-u/2:e[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-u/2:e[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,s,u,l,h,d,p,m,g,v,y=this,_=n.target.__data__.type,w="selection"===(o&&n.metaKey?_="overlay":_)?fn:o&&n.altKey?pn:dn,x=t===xn?null:Rn[_],b=t===wn?null:Tn[_],k=En(y),A=k.extent,R=k.selection,T=A[0][0],M=A[0][1],S=A[1][0],N=A[1][1],C=0,E=0,z=x&&b&&o&&n.shiftKey,P=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=Wt(t,y)).point0=t.slice(),t.identifier=e,t}));Ae(y);var I=f(y,arguments,!0).beforestart();if("overlay"===_){R&&(m=!0);const e=[P[0],P[1]||P[0]];k.selection=R=[[i=t===xn?T:vn(e[0][0],e[1][0]),s=t===wn?M:vn(e[0][1],e[1][1])],[l=t===xn?S:gn(e[0][0],e[1][0]),d=t===wn?N:gn(e[0][1],e[1][1])]],P.length>1&&X(n)}else i=R[0][0],s=R[0][1],l=R[1][0],d=R[1][1];a=i,u=s,h=l,p=d;var V=Ht(y).attr("pointer-events","none"),D=V.selectAll(".overlay").attr("cursor",bn[_]);if(n.touches)I.moved=j,I.ended=F;else{var $=Ht(n.view).on("mousemove.brush",j,!0).on("mouseup.brush",F,!0);o&&$.on("keydown.brush",O,!0).on("keyup.brush",G,!0),function(t){var e=t.document.documentElement,n=Ht(t).on("dragstart.drag",sn,an);"onselectstart"in e?n.on("selectstart.drag",sn,an):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(n.view)}c.call(y),I.start(n,w.name)}function j(t){for(const e of t.changedTouches||[t])for(const t of P)t.identifier===e.identifier&&(t.cur=Wt(e,y));if(z&&!g&&!v&&1===P.length){const t=P[0];mn(t.cur[0]-t[0])>mn(t.cur[1]-t[1])?v=!0:g=!0}for(const t of P)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,cn(t),X(t)}function X(t){const e=P[0],n=e.point0;var r;switch(C=e[0]-n[0],E=e[1]-n[1],w){case hn:case fn:x&&(C=gn(T-i,vn(S-l,C)),a=i+C,h=l+C),b&&(E=gn(M-s,vn(N-d,E)),u=s+E,p=d+E);break;case dn:P[1]?(x&&(a=gn(T,vn(S,P[0][0])),h=gn(T,vn(S,P[1][0])),x=1),b&&(u=gn(M,vn(N,P[0][1])),p=gn(M,vn(N,P[1][1])),b=1)):(x<0?(C=gn(T-i,vn(S-i,C)),a=i+C,h=l):x>0&&(C=gn(T-l,vn(S-l,C)),a=i,h=l+C),b<0?(E=gn(M-s,vn(N-s,E)),u=s+E,p=d):b>0&&(E=gn(M-d,vn(N-d,E)),u=s,p=d+E));break;case pn:x&&(a=gn(T,vn(S,i-C*x)),h=gn(T,vn(S,l+C*x))),b&&(u=gn(M,vn(N,s-E*b)),p=gn(M,vn(N,d+E*b)))}h<a&&(x*=-1,r=i,i=l,l=r,r=a,a=h,h=r,_ in kn&&D.attr("cursor",bn[_=kn[_]])),p<u&&(b*=-1,r=s,s=d,d=r,r=u,u=p,p=r,_ in An&&D.attr("cursor",bn[_=An[_]])),k.selection&&(R=k.selection),g&&(a=R[0][0],h=R[1][0]),v&&(u=R[0][1],p=R[1][1]),R[0][0]===a&&R[0][1]===u&&R[1][0]===h&&R[1][1]===p||(k.selection=[[a,u],[h,p]],c.call(y),I.brush(t,w.name))}function F(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else!function(t,e){var n=t.document.documentElement,r=Ht(t).on("dragstart.drag",null);e&&(r.on("click.drag",sn,an),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,m),$.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);V.attr("pointer-events","all"),D.attr("cursor",bn.overlay),k.selection&&(R=k.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(R)&&(k.selection=null,c.call(y)),I.end(t,w.name)}function O(t){switch(t.keyCode){case 16:z=x&&b;break;case 18:w===dn&&(x&&(l=h-C*x,i=a+C*x),b&&(d=p-E*b,s=u+E*b),w=pn,X(t));break;case 32:w!==dn&&w!==pn||(x<0?l=h-C:x>0&&(i=a-C),b<0?d=p-E:b>0&&(s=u-E),w=hn,D.attr("cursor",bn.selection),X(t));break;default:return}cn(t)}function G(t){switch(t.keyCode){case 16:z&&(g=v=z=!1,X(t));break;case 18:w===pn&&(x<0?l=h:x>0&&(i=a),b<0?d=p:b>0&&(s=u),w=dn,X(t));break;case 32:w===hn&&(t.altKey?(x&&(l=h-C*x,i=a+C*x),b&&(d=p-E*b,s=u+E*b),w=pn):(x<0?l=h:x>0&&(i=a),b<0?d=p:b>0&&(s=u),w=dn),D.attr("cursor",bn[_]),X(t));break;default:return}cn(t)}}function p(t){f(this,arguments).moved(t)}function m(t){f(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=_n(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){f(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){f(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=f(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),u=s(o,a);function l(t){r.selection=1===t&&null===a?null:u(t),c.call(e),i.brush()}return null!==o&&null!==a?l:l(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof n?n.apply(e,i):n,o.extent),s=f(e,i).beforestart();Ae(e),o.selection=null===a?null:a,c.call(e),s.start(r).brush(r).end(r)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=Ht(this.that).datum();a.call(e,this.that,new ln(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:un(_n(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:un(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:un(!!t),l):i},l.handleSize=function(t){return arguments.length?(u=+t,l):u},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}(wn)}const Pn=(t,e)=>{const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz-";let r=5381;const i=Array.from(`${t}:${e}`);for(const t of i)r=Math.imul(r,33)+t.charCodeAt(0);const o=new Array(21);let a=Math.abs(r);for(let t=0;t<21;++t)a=(1664525*a+1013904223)%4294967296,o[t]=n[a%64];return o.join("")};class In extends CustomEvent{constructor(t){super("zoom",{detail:t})}}const Vn=()=>{return rn(1,t);var t},Dn=()=>{return rn(4,t);var t},$n=(t,e=jn)=>{const[n,r]=f(t),i=h(n),o=h(e);return d((()=>{o.current=e}),[e]),d((()=>{i.current=n,o.current(i.current)}),[n]),[i,n,r]},jn=()=>{},Xn=t=>t?t<0?0:t:0;var Fn={timelineContainer:"styles_timelineContainer__3SW8x",durationRangeText:"styles_durationRangeText__kjCEl",timelineChart:"styles_timelineChart__sjwgA",axises:"styles_axises__nnLwP",xAxis:"styles_xAxis__w8pk1",xGrid:"styles_xGrid__2cimK",groupAxis:"styles_groupAxis__8rzsA",group:"styles_group__-lm0v",segment:"styles_segment__tDYtR",brusher:"styles_brusher__iTl0A",zoomSelection:"styles_zoomSelection__W-Y0x",brush:"styles_brush__5MVEw",tooltip:"styles_tooltip__WgR7o",tooltipContent:"styles_tooltipContent__qmhxV",labelGroup:"styles_labelGroup__wJsCk"};const On=()=>on(),Gn={top:0,right:0,bottom:20,left:0},qn=300,Yn=20,Bn=()=>{},Ln=e=>{const{width:r=qn,height:i=Yn,margins:o=Gn,domainRange:a,currentSelection:s,tickFormat:l,onChange:c=Bn,onReset:f=Bn,selectedTestsCount:p,totalTestsCount:m,translations:g,transitionDuration:v=300}=e,y=Xn(r-o.left-o.right),_=Xn(i-o.top-o.bottom),[w,x,b]=$n((()=>u().domain(a).range([0,y])));d((()=>{b((()=>u().domain(a).range([0,y])))}),[a,y]);const k=h(null),A=h(null),R=h(null),T=h(null),M=h(null),S=h(null),N=h(c),C=h(f);d((()=>{N.current=c,C.current=f}),[c,f]);const E=h(On().tickFormat((()=>""))),z=h(On().tickPadding(0)),P=h(zn().handleSize(24).on("end",(t=>{if(!t.sourceEvent||!w.current||!N.current)return;if(!(t.selection&&2===t.selection.length)){const[t,e]=w.current.domain();return void N.current(t,e)}const[e,n]=t.selection.map((t=>x.invert(t)));N.current(e,n)})));d((()=>{if(!k.current||!x)return;if(!a||a[1]<=a[0])return;const[t,e]=a,n=(e-t)/6,r=[];for(let e=0;e<7;e++)r.push(t+n*e);if(r[0]=t,r[6]=e,z.current.scale(x).tickFormat(l).tickValues(r),E.current.scale(x).tickSize(-_).tickValues(r),Ht(A.current).attr("transform",`translate(${o.left},${o.top})`),Ht(R.current).exit().transition().duration(v).attr("width",0).attr("height",0),T.current&&(Ht(T.current).attr("transform",`translate(0,${_})`),Ht(T.current).call(E.current)),M.current&&(Ht(M.current).attr("transform",`translate(0,${_})`),Ht(M.current).call(z.current).selectAll("text").attr("y",8)),S.current){const t=Ht(S.current);t.select(".selection").attr("rx",2).attr("ry",2),t.call(P.current.extent([[0,0],[y,_]]));const e=[x(s[0]??a[0]),x(s[1]??a[1])];P.current.move(t,e)}}),[o,x,a,s,l,y,_,v]);const I=(p/m*100).toFixed(2);return t("svg",{ref:k,className:Fn.brusher,width:r,height:i+14,children:t("g",{ref:A,className:Fn.brusherMargins,children:[t("rect",{ref:R,className:Fn.gridBackground}),t("g",{ref:S,className:Fn.brush}),t("g",{className:Fn.axises,children:[t("g",{ref:T,className:Fn.xGrid}),t("g",{ref:M,className:Fn.xAxis}),t("text",{x:y/2,y:60,textAnchor:"middle",className:Fn.durationRangeText,children:g.selected({count:p,percentage:I,minDuration:n(s[0]),maxDuration:n(s[1])})})]})]})})},Hn=e=>{const{segments:r,groupId:i,groupName:o,offsetTime:a}=e,[s,u]=p((()=>{let t=1/0,e=-1/0;const n=r.filter((t=>t.groupId===i));for(const r of n)t=Math.min(t,r.timeRange[0].getTime()),e=Math.max(e,r.timeRange[1].getTime());return[t,e]}),[r,i]);return t("div",{className:Fn.tooltipContent,children:[t("div",{children:o}),t("div",{children:[n(s-a)," — ",n(u-a)]})]})},Wn=w(null),Un=e=>{const{children:n,width:r}=e;return t(Wn.Provider,{value:r,children:n})},Kn=()=>{},Jn=e=>{const{children:n,width:r,onResize:i,debounceResize:o=0}=e,[a]=x(r,o);return d((()=>{i?.(a)}),[a,i]),a>0?t(Un,{width:a,children:n}):null},Qn=e=>{const{children:n,defaultWidth:r=0,onResize:i=Kn,debounceResize:o=0}=e,a=h(null),[s,u]=f(r);return d((()=>{if(!a.current)return;u(a.current.clientWidth);const t=new ResizeObserver((t=>{for(const e of t)u(e.target.clientWidth)}));return t.observe(a.current),()=>t.disconnect()}),[r]),t("div",{ref:a,children:t(Jn,{width:s,onResize:i,debounceResize:o,children:n})})},Zn=e=>{const{segment:r,offsetTime:i}=e;if(!r.id)return null;const o=r.labelGroup.length>1;return t("div",{className:Fn.tooltipContent,children:[o?t("div",{className:Fn.labelGroup,children:r.labelGroup.map(((e,n)=>t(k,{type:"ui",size:"s",bold:!0,children:e},n)))}):t(k,{type:"ui",size:"s",bold:!0,children:r.label}),t("div",{children:[n(r.timeRange[0].getTime()-i)," — ",n(r.timeRange[1].getTime()-i)]})]})},tr=()=>on(),er={top:0,right:0,bottom:20,left:0},nr=300,rr=20,ir=()=>{},or=e=>{const{width:n=nr,height:r=rr,margins:i=er,scale:o,domainRange:a,currentSelection:s,tickFormat:u,onChange:l=ir,onReset:c=ir,transitionDuration:f=300}=e,[p,m,g]=$n((()=>o.copy()));d((()=>{g((()=>p.current.domain()===o.domain()&&p.current.range()===o.range()?p.current:o.copy()))}),[o]);const v=Xn(n-i.left-i.right),y=Xn(r-i.top-i.bottom);d((()=>{g((()=>o.copy().domain(a??[]).range([0,v])))}),[a,v,o]);const _=h(null),w=h(null),x=h(null),b=h(null),k=h(null),A=h(null),R=h(l),T=h(c),M=h(tr().tickFormat((()=>""))),S=h(tr().tickPadding(0)),N=h(zn().handleSize(24).on("end",(t=>{if(!t.sourceEvent||!p.current||!R.current)return;if(!(t.selection&&2===t.selection.length)){const[t,e]=p.current.domain();return void R.current(t,e)}const[e,n]=t.selection.map((t=>p.current.invert(t)));R.current(e,n)})));return d((()=>{R.current=l,T.current=c}),[l,c]),d((()=>{if(_.current&&m&&a&&!(a[1]<=a[0])&&(S.current.scale(m).tickFormat(u),M.current.scale(m).tickSize(-y),M.current.ticks(7),Ht(w.current).attr("transform",`translate(${i.left},${i.top})`),Ht(x.current).transition().duration(f).attr("width",String(v)).attr("height",String(y)),b.current&&(Ht(b.current).attr("transform",`translate(0,${y})`),Ht(b.current).call(M.current)),k.current&&(Ht(k.current).attr("transform",`translate(0,${y})`),Ht(k.current).call(S.current).selectAll("text").attr("y",8)),A.current)){const t=Ht(A.current);t.select(".selection").attr("rx",2).attr("ry",2),t.call(N.current.extent([[0,0],[v,y]]));const e=[m(s?.[0]??a[0].getTime()),m(s?.[1]??a[1].getTime())];N.current.move(t,e)}}),[v,y,i,a,s,u,m,f]),t("svg",{ref:_,className:Fn.brusher,width:n,height:r,children:t("g",{ref:w,className:Fn.brusherMargins,children:[t("rect",{ref:x,className:Fn.gridBackground}),t("g",{ref:A,className:Fn.brush}),t("g",{className:Fn.axises,children:[t("g",{ref:b,className:Fn.xGrid}),t("g",{ref:k,className:Fn.xAxis})]})]})})};Ht.prototype.transition=Be;const ar=t=>{const e={failed:"var(--timeline-status-failed, var(--color-status-failed-chart))",broken:"var(--timeline-status-broken, var(--color-status-broken-chart))",passed:"var(--timeline-status-passed, var(--color-status-passed-chart))",skipped:"var(--timeline-status-skipped, var(--color-status-skipped-chart))",unknown:"var(--timeline-status-unknown, var(--color-status-unknown-chart))"};return e[t]||e.unknown},sr=t=>{const e={failed:"var(--color-status-failed-text)",broken:"var(--color-status-broken-text)",passed:"var(--color-status-passed-text)",skipped:"var(--color-status-skipped-text)",unknown:"var(--color-status-unknown-text)"};return e[t]||e.unknown},ur=t=>{if(t>=20)return 4;if(t<4)return 0;const e=(t-4)/16;return 4*(e*(2-e))},lr=100,cr=100,fr=26,hr=20,dr=r=>{const{data:i=[],translations:o,onTestResultClick:a}=r,s=v(),{durationRange:u,handleDurationChange:w,durationDomain:x}=(t=>{const e=p((()=>{const e=t.reduce(((t,e)=>{const n=e.segments.map((t=>t.val));return{min:Math.min(t.min,...n),max:Math.max(t.max,...n)}}),{min:1/0,max:-1/0});return[e.min,e.max]}),[t]),[n,r]=f(e[0]),[i,o]=f(e[1]);d((()=>{r(e[0])}),[e[0]]),d((()=>{o(e[1])}),[e[1]]);const a=m(((t,e)=>{r(t),o(e)}),[]);return{durationRange:[n,i],handleDurationChange:a,durationDomain:e}})(i),k=(()=>{const t=g(Wn);if(!t)throw new Error("useWidth must be used within a ResponsiveWrapper");return t})(),T=h(null),M=h(null),S=h(null),N=h(null),C=h(null),E=h(null),[z,V,D]=$n((()=>R())),[$,j,X]=$n((()=>b())),F=h(on()),O=h(Vn()),G=h(Dn()),{tooltipRef:q,isVisible:Y,handleShowTooltip:B,handleHideTooltip:L,data:H}=_("bottom"),{tooltipRef:W,isVisible:U,handleShowTooltip:K,handleHideTooltip:J,data:Q}=_("bottom"),Z=y?0:500,tt=y?0:150,et=h(!1),nt=i.length,rt=Xn(k-lr-cr),it=Xn(24*nt),ot=it+fr+30,at=p((()=>{const t=[];for(const e of i)for(const n of e.segments)t.push({groupId:e.id,groupName:e.name,label:n.label,labelGroup:n.labelGroup,timeRange:n.timeRange,isRetry:n.isRetry,val:n.val,labelVal:n.val,segment:n,id:n.id});return t}),[i]),st=p((()=>i.map((t=>({id:t.id,name:t.name})))),[i]),ut=p((()=>[I(at,(t=>t.timeRange[0])),P(at,(t=>t.timeRange[1]))]),[at]),[lt,ct]=f(ut),[ft,ht]=f([null,null]),dt=m((t=>{ct((e=>((t,e)=>{if(!t&&!e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;const n=t?.[0]?.getTime()??void 0,r=t?.[1]?.getTime()??void 0,i=e?.[0]?.getTime()??void 0,o=e?.[1]?.getTime()??void 0;return n===i&&r===o})(e,t)?e:t))}),[]),pt=m((t=>{ht((e=>((t,e)=>{if(!t&&!e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;const n=t?.[0]??void 0,r=t?.[1]??void 0;return n===(e?.[0]??void 0)&&r===(e?.[1]??void 0)})(e,t)?e:t))}),[]),[mt,gt,vt]=$n((()=>A().domain(ut).range([0,rt]).clamp(!0)));d((()=>{vt((()=>mt.current.copy().domain(ut))),dt(ut)}),[...ut,dt]),d((()=>{vt((()=>mt.current.copy().range([0,rt]).clamp(!0)))}),[rt]);const yt=p((()=>[I(at,(t=>t.timeRange[0])),P(at,(t=>t.timeRange[1]))]),[at]);d((()=>{if(!T.current)return;const t=t=>{const{zoomX:e,zoomY:n}=t.detail;e&&dt(e),n&&pt(n)};if(T.current?.addEventListener("zoom",t),!M.current)return;const e=Ht(M.current),n=t=>Wt(t,M.current);return e.on("mousedown",(t=>{if(null!=Ht(window).on("mousemove.zoomRect"))return;const r=n(t);if(r[0]<0||r[0]>rt||r[1]<0||r[1]>it)return;et.current=!0;const i=e.append("rect").attr("class",Fn.zoomSelection);Ht(window).on("mousemove.zoomRect",(t=>{t.stopPropagation();const e=n(t),o=[Math.max(0,Math.min(rt,e[0])),Math.max(0,Math.min(it,e[1]))];i.attr("x",Math.min(r[0],o[0])).attr("y",Math.min(r[1],o[1])).attr("width",Math.abs(o[0]-r[0])).attr("height",Math.abs(o[1]-r[1]))})).on("mouseup.zoomRect",(t=>{Ht(window).on("mousemove.zoomRect",null).on("mouseup.zoomRect",null),i.remove(),et.current=!1;const e=n(t),o=[Math.max(0,Math.min(rt,e[0])),Math.max(0,Math.min(it,e[1]))];if(r[0]===o[0]&&r[1]===o[1])return;const a=[r[0],o[0]].sort(l).map((t=>mt.current.invert(t)));a[1].getTime()-a[0].getTime()>10&&T.current?.dispatchEvent(new In({zoomX:a,zoomY:null}))}),!0),t.stopPropagation()})),()=>{T.current?.removeEventListener("zoom",t)}}),[rt,it,ft,at,dt,pt,j]),d((()=>{const t=lt?.[0]&&lt?.[1]?lt:ut;vt((()=>mt.current.copy().domain(t).range([0,rt]).clamp(!0)))}),[lt,ut,rt]),d((()=>{G.current.scale(j)}),[j,st]),d((()=>{X((()=>$.current.copy().domain(st.map((t=>t.id))).range(st.map(((t,e)=>(e+.5)/nt*it)))))}),[st,nt,it]),d((()=>{D((()=>z.current.copy().domain(st.map((t=>t.id))).range([it/st.length*.5,it*(1-.5/st.length)])))}),[st,it,nt]),d((()=>{if(!(T.current&&gt&&0!==it&&N.current&&C.current))return;const[t,e]=gt.range();if(t===e)return;F.current.scale(gt),F.current.ticks(7),F.current.tickFormat((t=>yt[0]?n(t.getTime()-yt[0].getTime()):"")),O.current.scale(gt).ticks(7).tickFormat((()=>""));Ht(N.current).style("stroke-opacity",0).style("fill-opacity",0).attr("transform",`translate(0,${it})`).transition().duration(Z).call(F.current).style("stroke-opacity",1).style("fill-opacity",1),O.current.tickSize(it),Ht(C.current).attr("transform",`translate(0,${it})`).transition().duration(Z).call(O.current);const r=Math.ceil(2*nt/Math.sqrt(2)/it/.6),i=z.current.domain().filter(((t,e)=>!(e%r)));let o=Math.min(12,it/i.length*.6*Math.sqrt(2)),a=Math.ceil(cr/(o/Math.sqrt(2)));const s=j.range(),u=I(s,((t,e)=>e>0?t-s[e-1]:2*t));o=Math.min(14,.6*Xn(u)*Math.sqrt(2)),a=Math.floor(lr/(o/Math.sqrt(2))),G.current.tickFormat((t=>{const e=st.find((e=>e.id===t)),n=e?.name??"";return n.length<=a?n:`${n.substring(0,2*a/3)}...${n.substring(n.length-a/3,n.length)}`})),Ht(E.current).transition().duration(Z).style("font-size",`${o}px`).call(G.current),Ht(E.current).selectAll(".tick").each((function(t){const e=t,n=st.find((t=>t.id===e));n&&Ht(this).select("text").on("mouseover",(t=>{B(t.target,n)})).on("mouseout",(t=>{L(t.target)}))}))}),[rt,it,nt,Z,yt,gt,j,st,B,L]),d((()=>{if(!M.current||0===it)return;const t=Ht(M.current).selectAll(`rect.${Fn.group}`).data(st,(t=>t.id));t.exit().transition().duration(Z).style("stroke-opacity",0).style("fill-opacity",0).remove();const e=t.enter().append("rect").attr("class",Fn.group).attr("x",0).attr("y",0).attr("height",0).attr("fill","none").style("fill-opacity",0).style("stroke-opacity",0);t.merge(e).transition().duration(Z).attr("width",rt).attr("height",it/nt).attr("y",(t=>{const e=j(t.id);return Number.isInteger(e)?e-it/nt/2:0})).style("fill-opacity",1).style("stroke-opacity",1)}),[st,rt,it,nt,Z,j,B,L]);const[_t,wt]=u,xt=p((()=>at.filter((t=>{if(-1===j.domain().indexOf(t.groupId))return!1;const e=t.val;return!(e<_t||e>wt)})).length),[j,at,_t,wt]),bt=p((()=>at.filter((t=>{if(-1===j.domain().indexOf(t.groupId))return!1;const e=t.val;if(e<_t||e>wt)return!1;const[n,r]=gt.domain(),[i,o]=t.timeRange;return!(o<n||i>r)}))),[j,gt,at,_t,wt]);d((()=>{if(!M.current||0===it||!gt)return;(async()=>{const t=Ht(M.current);let e=t.selectAll(`rect.${Fn.segment}`).data(bt,(t=>t.id));if(0===bt.length)return void e.exit().remove();e.exit().transition().duration(Z).style("fill-opacity",0).remove();const n=e.enter().append("rect").attr("class",Fn.segment).attr("data-testid","timeline-segment").attr("data-test-result-id",(t=>t.segment.testResultId)).attr("data-test-result-name",(t=>t.segment.label)).attr("rx",1).attr("ry",1).attr("x",(t=>gt(t.timeRange[0]))).attr("y",(t=>(V(t.groupId)||0)-10)).attr("width",0).attr("height",0).style("fill",(t=>ar(t.segment.status))).style("fill-opacity",0);n.on("mouseover",(function(t,e){if(et.current)return;Ht(this).transition().duration(tt).attr("x",mt.current(e.timeRange[0])-1).attr("width",P([2,mt.current(e.timeRange[1])-mt.current(e.timeRange[0])])+2).attr("y",(z.current(e.groupId)||0)-11).attr("height",22).style("fill-opacity",1),K(t.target,e)})).on("mouseout",(function(t,e){if(et.current)return;const n=mt.current(e.timeRange[1])-mt.current(e.timeRange[0]);Ht(this).transition().duration(tt).attr("x",mt.current(e.timeRange[0])).attr("width",P([2,n])??0).attr("y",(z.current(e.groupId)??0)-10).attr("height",hr).style("fill-opacity",1),J(t.target)})),e=e.merge(n),e.on("click",((t,e)=>{a?.(e.segment.testResultId)})).attr("rx",(t=>{const e=gt(t.timeRange[1])-gt(t.timeRange[0]);return ur(e)})).attr("ry",(t=>{const e=gt(t.timeRange[1])-gt(t.timeRange[0]);return ur(e)})).attr("stroke-width",(t=>gt(t.timeRange[1])-gt(t.timeRange[0])>=12?.5:.1)).attr("stroke","var(--timeline-bg, #ffffff)").attr("height",hr),e.transition().duration(Z).attr("x",(t=>gt(t.timeRange[0]))).attr("y",(t=>(V(t.groupId)||0)-10)).attr("width",(t=>{const e=P([2,(gt(t.timeRange[1])??0)-(gt(t.timeRange[0])??0)]);return(e??0)<0?0:e??0})).attr("height",hr).style("fill",(t=>t.isRetry?`url(#gradient-${s}-${t.segment.status})`:ar(t.segment.status))).style("fill-opacity",1)})()}),[bt,rt,it,Z,lt,gt,tt,V,s,a]),d((()=>{T.current&&Ht(T.current).transition().duration(Z).attr("width",k).attr("height",ot)}),[k,ot,Z]);const kt=m(((t,e)=>dt([t,e])),[dt]),[At,Rt]=gt.range(),Tt=At!==Rt;return Tt?t("div",{className:Fn.timelineChart,children:[x[0]!==x[1]&&Tt&&t(Ln,{selectedTestsCount:xt,totalTestsCount:at.length,translations:o,width:k,height:76,margins:{top:fr,right:cr,bottom:30,left:lr},domainRange:x,currentSelection:[_t,wt],onChange:w,onReset:()=>w(x[0],x[1]),tickFormat:t=>n(t)},k),t("svg",{ref:T,width:k,height:ot,children:[t("defs",{children:e.map((e=>t("pattern",{id:`gradient-${s}-${e}`,patternUnits:"userSpaceOnUse",width:"10",height:"10",patternTransform:"rotate(-45 5 5)",children:[t("rect",{width:"5",height:"10",fill:sr(e)}),t("rect",{x:"5",width:"5",height:"10",fill:ar(e)})]},e)))}),t("g",{ref:S,className:Fn.axises,"data-label":"axises",transform:"translate(100,26)",children:[t("g",{ref:N,className:Fn.xAxis,"data-label":"x-axis"}),t("g",{ref:C,className:Fn.xGrid,"data-label":"grid"}),t("g",{ref:E,className:Fn.groupAxis,"data-label":"groups-axis"})]}),t("g",{ref:M,"data-label":"graph",transform:"translate(100,26)",children:t("rect",{"data-label":"graph-selection",x:0,y:0,width:rt,height:it,fill:"transparent"})})]}),ut[0].getTime()!==ut[1].getTime()&&Tt&&t(or,{width:k,height:76,margins:{top:fr,right:cr,bottom:30,left:lr},scale:gt,domainRange:ut,currentSelection:lt,onChange:kt,onReset:()=>dt(ut),tickFormat:t=>n(t.getTime()-yt[0].getTime())}),c(t("div",{ref:q,"data-visible":Y,className:Fn.tooltip,children:H?.id&&t(Hn,{segments:bt,groupId:H.id,groupName:H.name,offsetTime:yt[0].getTime()})}),document.body),c(t("div",{ref:W,"data-visible":U,className:Fn.tooltip,children:Q&&t(Zn,{segment:Q,offsetTime:yt[0].getTime()})}),document.body)]}):null},pr=e=>{const{data:n,width:r,dataId:i,...o}=e,a=p((()=>((t,e)=>{const n=[];for(const r of t){const{host:t,thread:i,id:o,start:a,duration:s,status:u,isRetry:l,name:c}=r,f=a+s,h=Pn(t,e),d=Pn(i,h),p=n.find((({id:t})=>t===d)),m=p?.segments??[],g=o,v=-1!==m.findIndex((({id:t})=>t===g)),y=m.find((({timeRange:t})=>t[0].getTime()===a&&t[1].getTime()===f));v||y||m.push({label:c,labelGroup:[c],timeRange:[new Date(a),new Date(f)],val:s,status:u,id:g,testResultId:o,isRetry:l}),!v&&y&&y.labelGroup.push(r.name),p?p.segments=m:n.push({id:d,name:i,segments:m})}return n})(n,i)),[n,i]);return t("div",{className:Fn.timelineContainer,children:t(Qn,{defaultWidth:r,children:t(dr,{...o,data:a},i)})})};export{pr as T};
2
- //# sourceMappingURL=Timeline-BkaMlh1L.js.map
1
+ import{u as t}from"./clsx-D83172mf.js";import{s as e}from"./identity-DBvQ9SaG.js";import{f as n}from"./time-CyaymdXm.js";import{k as r,m as i,i as o,n as a,o as s,l as u,p as l}from"./linear-C7uKb8Tk.js";import{createPortal as c}from"preact/compat";import{useState as f,useRef as h,useEffect as d,useMemo as p,useCallback as m,useContext as g,useId as v}from"preact/hooks";import{R as y}from"./config-CgDglkkw.js";import{u as _}from"./useTooltip-VGYCawp2.js";import{createContext as w}from"preact";import{a as x,o as b}from"./index.module-Bdu_gwCw.js";import{T as k}from"./index-Dq7O-bm8.js";import{u as A,p as R}from"./utcTime-ClVTKNFl.js";var T,M=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function N(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*M,skewX:Math.atan(u)*M,scaleX:a,scaleY:s}}function C(t,e,n,i){function o(t){return t.length?t.pop()+" ":""}return function(a,s){var u=[],l=[];return a=t(a),s=t(s),function(t,i,o,a,s,u){if(t!==o||i!==a){var l=s.push("translate(",null,e,null,n);u.push({i:l-4,x:r(t,o)},{i:l-2,x:r(i,a)})}else(o||a)&&s.push("translate("+o+e+a+n)}(a.translateX,a.translateY,s.translateX,s.translateY,u,l),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(o(n)+"rotate(",null,i)-2,x:r(t,e)})):e&&n.push(o(n)+"rotate("+e+i)}(a.rotate,s.rotate,u,l),function(t,e,n,a){t!==e?a.push({i:n.push(o(n)+"skewX(",null,i)-2,x:r(t,e)}):e&&n.push(o(n)+"skewX("+e+i)}(a.skewX,s.skewX,u,l),function(t,e,n,i,a,s){if(t!==n||e!==i){var u=a.push(o(a)+"scale(",null,",",null,")");s.push({i:u-4,x:r(t,n)},{i:u-2,x:r(e,i)})}else 1===n&&1===i||a.push(o(a)+"scale("+n+","+i+")")}(a.scaleX,a.scaleY,s.scaleX,s.scaleY,u,l),a=s=null,function(t){for(var e,n=-1,r=l.length;++n<r;)u[(e=l[n]).i]=e.x(t);return u.join("")}}}var E=C((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?S:N(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),z=C((function(t){return null==t?S:(T||(T=document.createElementNS("http://www.w3.org/2000/svg","g")),T.setAttribute("transform",t),(t=T.transform.baseVal.consolidate())?N((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):S)}),", ",")",")");function P(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function I(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}var V="http://www.w3.org/1999/xhtml",D={svg:"http://www.w3.org/2000/svg",xhtml:V,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function $(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),D.hasOwnProperty(e)?{space:D[e],local:t}:t}function j(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===V&&e.documentElement.namespaceURI===V?e.createElement(t):e.createElementNS(n,t)}}function X(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function F(t){var e=$(t);return(e.local?X:j)(e)}function O(){}function G(t){return null==t?O:function(){return this.querySelector(t)}}function q(){return[]}function Y(t){return null==t?q:function(){return this.querySelectorAll(t)}}function B(t){return function(){return null==(e=t.apply(this,arguments))?[]:Array.isArray(e)?e:Array.from(e);var e}}function L(t){return function(){return this.matches(t)}}function H(t){return function(e){return e.matches(t)}}var W=Array.prototype.find;function U(){return this.firstElementChild}var K=Array.prototype.filter;function J(){return Array.from(this.children)}function Q(t){return new Array(t.length)}function Z(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function tt(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new Z(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function et(t,e,n,r,i,o,a){var s,u,l,c=new Map,f=e.length,h=o.length,d=new Array(f);for(s=0;s<f;++s)(u=e[s])&&(d[s]=l=a.call(u,u.__data__,s,e)+"",c.has(l)?i[s]=u:c.set(l,u));for(s=0;s<h;++s)l=a.call(t,o[s],s,o)+"",(u=c.get(l))?(r[s]=u,u.__data__=o[s],c.delete(l)):n[s]=new Z(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&c.get(d[s])===u&&(i[s]=u)}function nt(t){return t.__data__}function rt(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function it(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ot(t){return function(){this.removeAttribute(t)}}function at(t){return function(){this.removeAttributeNS(t.space,t.local)}}function st(t,e){return function(){this.setAttribute(t,e)}}function ut(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function lt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function ct(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function ft(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function ht(t){return function(){this.style.removeProperty(t)}}function dt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function pt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function mt(t,e){return t.style.getPropertyValue(e)||ft(t).getComputedStyle(t,null).getPropertyValue(e)}function gt(t){return function(){delete this[t]}}function vt(t,e){return function(){this[t]=e}}function yt(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function _t(t){return t.trim().split(/^|\s+/)}function wt(t){return t.classList||new xt(t)}function xt(t){this._node=t,this._names=_t(t.getAttribute("class")||"")}function bt(t,e){for(var n=wt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function kt(t,e){for(var n=wt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function At(t){return function(){bt(this,t)}}function Rt(t){return function(){kt(this,t)}}function Tt(t,e){return function(){(e.apply(this,arguments)?bt:kt)(this,t)}}function Mt(){this.textContent=""}function St(t){return function(){this.textContent=t}}function Nt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Ct(){this.innerHTML=""}function Et(t){return function(){this.innerHTML=t}}function zt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Pt(){this.nextSibling&&this.parentNode.appendChild(this)}function It(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Vt(){return null}function Dt(){var t=this.parentNode;t&&t.removeChild(this)}function $t(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function jt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function Ft(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Ot(t,e,n){var r=ft(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Gt(t,e){return function(){return Ot(this,t,e)}}function qt(t,e){return function(){return Ot(this,t,e.apply(this,arguments))}}Z.prototype={constructor:Z,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},xt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Yt=[null];function Bt(t,e){this._groups=t,this._parents=e}function Lt(){return new Bt([[document.documentElement]],Yt)}function Ht(t){return"string"==typeof t?new Bt([[document.querySelector(t)]],[document.documentElement]):new Bt([[t]],Yt)}function Wt(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}Bt.prototype=Lt.prototype={constructor:Bt,select:function(t){"function"!=typeof t&&(t=G(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new Bt(r,this._parents)},selectAll:function(t){t="function"==typeof t?B(t):Y(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new Bt(r,i)},selectChild:function(t){return this.select(null==t?U:function(t){return function(){return W.call(this.children,t)}}("function"==typeof t?t:H(t)))},selectChildren:function(t){return this.selectAll(null==t?J:function(t){return function(){return K.call(this.children,t)}}("function"==typeof t?t:H(t)))},filter:function(t){"function"!=typeof t&&(t=L(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Bt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,nt);var n,r=e?et:tt,i=this._parents,o=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var a=o.length,s=new Array(a),u=new Array(a),l=new Array(a),c=0;c<a;++c){var f=i[c],h=o[c],d=h.length,p=rt(t.call(f,f&&f.__data__,c,i)),m=p.length,g=u[c]=new Array(m),v=s[c]=new Array(m);r(f,h,g,v,l[c]=new Array(d),p,e);for(var y,_,w=0,x=0;w<m;++w)if(y=g[w]){for(w>=x&&(x=w+1);!(_=v[x])&&++x<m;);y._next=_||null}}return(s=new Bt(s,i))._enter=u,s._exit=l,s},enter:function(){return new Bt(this._enter||this._groups.map(Q),this._parents)},exit:function(){return new Bt(this._exit||this._groups.map(Q),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l,c=n[u],f=r[u],h=c.length,d=s[u]=new Array(h),p=0;p<h;++p)(l=c[p]||f[p])&&(d[p]=l);for(;u<i;++u)s[u]=n[u];return new Bt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=it);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new Bt(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=$(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?at:ot:"function"==typeof e?n.local?ct:lt:n.local?ut:st)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?ht:"function"==typeof e?pt:dt)(t,e,null==n?"":n)):mt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?gt:"function"==typeof e?yt:vt)(t,e)):this.node()[t]},classed:function(t,e){var n=_t(t+"");if(arguments.length<2){for(var r=wt(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Tt:e?At:Rt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Mt:("function"==typeof t?Nt:St)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Ct:("function"==typeof t?zt:Et)(t)):this.node().innerHTML},raise:function(){return this.each(Pt)},lower:function(){return this.each(It)},append:function(t){var e="function"==typeof t?t:F(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:F(t),r=null==e?Vt:"function"==typeof e?e:G(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Dt)},clone:function(t){return this.select(t?jt:$t)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Ft:Xt,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?qt:Gt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var Ut={value:()=>{}};function Kt(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Jt(r)}function Jt(t){this._=t}function Qt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Zt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ut,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Jt.prototype=Kt.prototype={constructor:Jt,on:function(t,e){var n,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(n=(t=o[a]).type)i[n]=Zt(i[n],t.name,e);else if(null==e)for(n in i)i[n]=Zt(i[n],t.name,null);return this}for(;++a<s;)if((n=(t=o[a]).type)&&(n=Qt(i[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Jt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var te,ee,ne=0,re=0,ie=0,oe=0,ae=0,se=0,ue="object"==typeof performance&&performance.now?performance:Date,le="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ce(){return ae||(le(fe),ae=ue.now()+se)}function fe(){ae=0}function he(){this._call=this._time=this._next=null}function de(t,e,n){var r=new he;return r.restart(t,e,n),r}function pe(){ae=(oe=ue.now())+se,ne=re=0;try{!function(){ce(),++ne;for(var t,e=te;e;)(t=ae-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ne}()}finally{ne=0,function(){var t,e,n=te,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:te=e);ee=t,ge(r)}(),ae=0}}function me(){var t=ue.now(),e=t-oe;e>1e3&&(se-=e,oe=t)}function ge(t){ne||(re&&(re=clearTimeout(re)),t-ae>24?(t<1/0&&(re=setTimeout(pe,t-ue.now()-se)),ie&&(ie=clearInterval(ie))):(ie||(oe=ue.now(),ie=setInterval(me,1e3)),ne=1,le(pe)))}function ve(t,e,n){var r=new he;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}he.prototype=de.prototype={constructor:he,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?ce():+n)+(null==e?0:+e),this._next||ee===this||(ee?ee._next=this:te=this,ee=this),this._call=t,this._time=n,ge()},stop:function(){this._call&&(this._call=null,this._time=1/0,ge())}};var ye=Kt("start","end","cancel","interrupt"),_e=[];function we(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}function a(o){var l,c,f,h;if(1!==n.state)return u();for(l in i)if((h=i[l]).name===n.name){if(3===h.state)return ve(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(ve((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(o))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),l=0,c=-1;l<f;++l)(h=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=de(o,0,n.time)}(t,n,{name:e,index:r,group:i,on:ye,tween:_e,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function xe(t,e){var n=ke(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function be(t,e){var n=ke(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ke(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ae(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}function Re(t,e){var n,r;return function(){var i=be(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function Te(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=be(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function Me(t,e,n){var r=t._id;return t.each((function(){var t=be(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ke(t,r).value[e]}}function Se(t,e){var n;return("number"==typeof e?r:e instanceof i?o:(n=i(e))?(e=n,o):a)(t,e)}function Ne(t){return function(){this.removeAttribute(t)}}function Ce(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ee(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function ze(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function Pe(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function Ie(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function Ve(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}(t,i)),n}return i._value=e,i}function De(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}(t,i)),n}return i._value=e,i}function $e(t,e){return function(){xe(this,t).delay=+e.apply(this,arguments)}}function je(t,e){return e=+e,function(){xe(this,t).delay=e}}function Xe(t,e){return function(){be(this,t).duration=+e.apply(this,arguments)}}function Fe(t,e){return e=+e,function(){be(this,t).duration=e}}var Oe=Lt.prototype.constructor;function Ge(t){return function(){this.style.removeProperty(t)}}var qe=0;function Ye(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Be(t){return Lt().transition(t)}function Le(){return++qe}var He=Lt.prototype;Ye.prototype=Be.prototype={constructor:Ye,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=G(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,f=o[a]=new Array(c),h=0;h<c;++h)(s=l[h])&&(u=t.call(s,s.__data__,h,l))&&("__data__"in s&&(u.__data__=s.__data__),f[h]=u,we(f[h],e,n,h,f,ke(s,n)));return new Ye(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Y(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,f=0;f<c;++f)if(u=l[f]){for(var h,d=t.call(u,u.__data__,f,l),p=ke(u,n),m=0,g=d.length;m<g;++m)(h=d[m])&&we(h,e,n,m,d,p);o.push(d),a.push(u)}return new Ye(o,a,e,n)},selectChild:He.selectChild,selectChildren:He.selectChildren,filter:function(t){"function"!=typeof t&&(t=L(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new Ye(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],f=l.length,h=a[s]=new Array(f),d=0;d<f;++d)(u=l[d]||c[d])&&(h[d]=u);for(;s<r;++s)a[s]=e[s];return new Ye(a,this._parents,this._name,this._id)},selection:function(){return new Oe(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Le(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=ke(a,e);we(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Ye(r,this._parents,t,n)},call:He.call,nodes:He.nodes,node:He.node,size:He.size,empty:He.empty,each:He.each,on:function(t,e){var n=this._id;return arguments.length<2?ke(this.node(),n).on.on(t):this.each(function(t,e,n){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?xe:be;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}(n,t,e))},attr:function(t,e){var n=$(t),r="transform"===n?z:Se;return this.attrTween(t,"function"==typeof e?(n.local?Ie:Pe)(n,r,Me(this,"attr."+t,e)):null==e?(n.local?Ce:Ne)(n):(n.local?ze:Ee)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=$(t);return this.tween(n,(r.local?Ve:De)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?E:Se;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=mt(this,t),a=(this.style.removeProperty(t),mt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Ge(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=mt(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=mt(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,Me(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=be(this,t),l=u.on,c=null==u.value[a]?o||(o=Ge(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=mt(this,t);return a===o?null:a===r?i:i=e(r=a,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}(t,o,n)),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Me(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){return function(e){this.textContent=t.call(this,e)}}(r)),e}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ke(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?Re:Te)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?$e:je)(e,t)):ke(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Xe:Fe)(e,t)):ke(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){be(this,t).ease=e}}(e,t)):ke(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;be(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=be(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:He[Symbol.iterator]};var We={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Ue(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Ke(t){return t}Lt.prototype.interrupt=function(t){return this.each((function(){Ae(this,t)}))},Lt.prototype.transition=function(t){var e,n;t instanceof Ye?(e=t._id,t=t._name):(e=Le(),(n=We).time=ce(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&we(a,t,e,l,s,n||Ue(a,e));return new Ye(r,this._parents,t,e)};var Je=1e-6;function Qe(t){return"translate("+t+",0)"}function Ze(t){return"translate(0,"+t+")"}function tn(t){return e=>+t(e)}function en(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function nn(){return!this.__axis}function rn(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",f=1===t||3===t?Qe:Ze;function h(h){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Ke:i,m=Math.max(o,0)+s,g=e.range(),v=+g[0]+u,y=+g[g.length-1]+u,_=(e.bandwidth?en:tn)(e.copy(),u),w=h.selection?h.selection():h,x=w.selectAll(".domain").data([null]),b=w.selectAll(".tick").data(d,e).order(),k=b.exit(),A=b.enter().append("g").attr("class","tick"),R=b.select("line"),T=b.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(A),R=R.merge(A.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),T=T.merge(A.append("text").attr("fill","currentColor").attr(c,l*m).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==w&&(x=x.transition(h),b=b.transition(h),R=R.transition(h),T=T.transition(h),k=k.transition(h).attr("opacity",Je).attr("transform",(function(t){return isFinite(t=_(t))?f(t+u):this.getAttribute("transform")})),A.attr("opacity",Je).attr("transform",(function(t){var e=this.parentNode.__axis;return f((e&&isFinite(e=e(t))?e:_(t))+u)}))),k.remove(),x.attr("d",4===t||2===t?a?"M"+l*a+","+v+"H"+u+"V"+y+"H"+l*a:"M"+u+","+v+"V"+y:a?"M"+v+","+l*a+"V"+u+"H"+y+"V"+l*a:"M"+v+","+u+"H"+y),b.attr("opacity",1).attr("transform",(function(t){return f(_(t)+u)})),R.attr(c+"2",l*o),T.attr(c,l*m).text(p),w.filter(nn).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),w.each((function(){this.__axis=_}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h.offset=function(t){return arguments.length?(u=+t,h):u},h}function on(t){return rn(3,t)}const an={capture:!0,passive:!1};function sn(t){t.preventDefault(),t.stopImmediatePropagation()}var un=t=>()=>t;function ln(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function cn(t){t.preventDefault(),t.stopImmediatePropagation()}var fn={name:"drag"},hn={name:"space"},dn={name:"handle"},pn={name:"center"};const{abs:mn,max:gn,min:vn}=Math;function yn(t){return[+t[0],+t[1]]}function _n(t){return[yn(t[0]),yn(t[1])]}var wn={name:"x",handles:["w","e"].map(Mn),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},xn={},bn={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},kn={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},An={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Rn={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Tn={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Mn(t){return{type:t}}function Sn(t){return!t.ctrlKey&&!t.button}function Nn(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Cn(){return navigator.maxTouchPoints||"ontouchstart"in this}function En(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function zn(){return function(t){var e,n=Nn,r=Sn,i=Cn,o=!0,a=Kt("start","brush","end"),u=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([Mn("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",bn.overlay).merge(n).each((function(){var t=En(this).extent;Ht(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([Mn("selection")]).enter().append("rect").attr("class","selection").attr("cursor",bn.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return bn[t.type]})),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=Ht(this),e=En(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-u/2:e[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-u/2:e[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function f(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,s,u,l,h,d,p,m,g,v,y=this,_=n.target.__data__.type,w="selection"===(o&&n.metaKey?_="overlay":_)?fn:o&&n.altKey?pn:dn,x=t===xn?null:Rn[_],b=t===wn?null:Tn[_],k=En(y),A=k.extent,R=k.selection,T=A[0][0],M=A[0][1],S=A[1][0],N=A[1][1],C=0,E=0,z=x&&b&&o&&n.shiftKey,P=Array.from(n.touches||[n],(t=>{const e=t.identifier;return(t=Wt(t,y)).point0=t.slice(),t.identifier=e,t}));Ae(y);var I=f(y,arguments,!0).beforestart();if("overlay"===_){R&&(m=!0);const e=[P[0],P[1]||P[0]];k.selection=R=[[i=t===xn?T:vn(e[0][0],e[1][0]),s=t===wn?M:vn(e[0][1],e[1][1])],[l=t===xn?S:gn(e[0][0],e[1][0]),d=t===wn?N:gn(e[0][1],e[1][1])]],P.length>1&&X(n)}else i=R[0][0],s=R[0][1],l=R[1][0],d=R[1][1];a=i,u=s,h=l,p=d;var V=Ht(y).attr("pointer-events","none"),D=V.selectAll(".overlay").attr("cursor",bn[_]);if(n.touches)I.moved=j,I.ended=F;else{var $=Ht(n.view).on("mousemove.brush",j,!0).on("mouseup.brush",F,!0);o&&$.on("keydown.brush",O,!0).on("keyup.brush",G,!0),function(t){var e=t.document.documentElement,n=Ht(t).on("dragstart.drag",sn,an);"onselectstart"in e?n.on("selectstart.drag",sn,an):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}(n.view)}c.call(y),I.start(n,w.name)}function j(t){for(const e of t.changedTouches||[t])for(const t of P)t.identifier===e.identifier&&(t.cur=Wt(e,y));if(z&&!g&&!v&&1===P.length){const t=P[0];mn(t.cur[0]-t[0])>mn(t.cur[1]-t[1])?v=!0:g=!0}for(const t of P)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);m=!0,cn(t),X(t)}function X(t){const e=P[0],n=e.point0;var r;switch(C=e[0]-n[0],E=e[1]-n[1],w){case hn:case fn:x&&(C=gn(T-i,vn(S-l,C)),a=i+C,h=l+C),b&&(E=gn(M-s,vn(N-d,E)),u=s+E,p=d+E);break;case dn:P[1]?(x&&(a=gn(T,vn(S,P[0][0])),h=gn(T,vn(S,P[1][0])),x=1),b&&(u=gn(M,vn(N,P[0][1])),p=gn(M,vn(N,P[1][1])),b=1)):(x<0?(C=gn(T-i,vn(S-i,C)),a=i+C,h=l):x>0&&(C=gn(T-l,vn(S-l,C)),a=i,h=l+C),b<0?(E=gn(M-s,vn(N-s,E)),u=s+E,p=d):b>0&&(E=gn(M-d,vn(N-d,E)),u=s,p=d+E));break;case pn:x&&(a=gn(T,vn(S,i-C*x)),h=gn(T,vn(S,l+C*x))),b&&(u=gn(M,vn(N,s-E*b)),p=gn(M,vn(N,d+E*b)))}h<a&&(x*=-1,r=i,i=l,l=r,r=a,a=h,h=r,_ in kn&&D.attr("cursor",bn[_=kn[_]])),p<u&&(b*=-1,r=s,s=d,d=r,r=u,u=p,p=r,_ in An&&D.attr("cursor",bn[_=An[_]])),k.selection&&(R=k.selection),g&&(a=R[0][0],h=R[1][0]),v&&(u=R[0][1],p=R[1][1]),R[0][0]===a&&R[0][1]===u&&R[1][0]===h&&R[1][1]===p||(k.selection=[[a,u],[h,p]],c.call(y),I.brush(t,w.name))}function F(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else!function(t,e){var n=t.document.documentElement,r=Ht(t).on("dragstart.drag",null);e&&(r.on("click.drag",sn,an),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}(t.view,m),$.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);V.attr("pointer-events","all"),D.attr("cursor",bn.overlay),k.selection&&(R=k.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(R)&&(k.selection=null,c.call(y)),I.end(t,w.name)}function O(t){switch(t.keyCode){case 16:z=x&&b;break;case 18:w===dn&&(x&&(l=h-C*x,i=a+C*x),b&&(d=p-E*b,s=u+E*b),w=pn,X(t));break;case 32:w!==dn&&w!==pn||(x<0?l=h-C:x>0&&(i=a-C),b<0?d=p-E:b>0&&(s=u-E),w=hn,D.attr("cursor",bn.selection),X(t));break;default:return}cn(t)}function G(t){switch(t.keyCode){case 16:z&&(g=v=z=!1,X(t));break;case 18:w===pn&&(x<0?l=h:x>0&&(i=a),b<0?d=p:b>0&&(s=u),w=dn,X(t));break;case 32:w===hn&&(t.altKey?(x&&(l=h-C*x,i=a+C*x),b&&(d=p-E*b,s=u+E*b),w=pn):(x<0?l=h:x>0&&(i=a),b<0?d=p:b>0&&(s=u),w=dn),D.attr("cursor",bn[_]),X(t));break;default:return}cn(t)}}function p(t){f(this,arguments).moved(t)}function m(t){f(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=_n(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){f(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){f(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=f(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),u=s(o,a);function l(t){r.selection=1===t&&null===a?null:u(t),c.call(e),i.brush()}return null!==o&&null!==a?l:l(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof n?n.apply(e,i):n,o.extent),s=f(e,i).beforestart();Ae(e),o.selection=null===a?null:a,c.call(e),s.start(r).brush(r).end(r)}))},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=Ht(this.that).datum();a.call(e,this.that,new ln(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:un(_n(t)),l):n},l.filter=function(t){return arguments.length?(r="function"==typeof t?t:un(!!t),l):r},l.touchable=function(t){return arguments.length?(i="function"==typeof t?t:un(!!t),l):i},l.handleSize=function(t){return arguments.length?(u=+t,l):u},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}(wn)}const Pn=(t,e)=>{const n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz-";let r=5381;const i=Array.from(`${t}:${e}`);for(const t of i)r=Math.imul(r,33)+t.charCodeAt(0);const o=new Array(21);let a=Math.abs(r);for(let t=0;t<21;++t)a=(1664525*a+1013904223)%4294967296,o[t]=n[a%64];return o.join("")};class In extends CustomEvent{constructor(t){super("zoom",{detail:t})}}const Vn=()=>{return rn(1,t);var t},Dn=()=>{return rn(4,t);var t},$n=(t,e=jn)=>{const[n,r]=f(t),i=h(n),o=h(e);return d((()=>{o.current=e}),[e]),d((()=>{i.current=n,o.current(i.current)}),[n]),[i,n,r]},jn=()=>{},Xn=t=>t?t<0?0:t:0;var Fn={timelineContainer:"styles_timelineContainer__3SW8x",durationRangeText:"styles_durationRangeText__kjCEl",timelineChart:"styles_timelineChart__sjwgA",axises:"styles_axises__nnLwP",xAxis:"styles_xAxis__w8pk1",xGrid:"styles_xGrid__2cimK",groupAxis:"styles_groupAxis__8rzsA",group:"styles_group__-lm0v",segment:"styles_segment__tDYtR",brusher:"styles_brusher__iTl0A",zoomSelection:"styles_zoomSelection__W-Y0x",brush:"styles_brush__5MVEw",tooltip:"styles_tooltip__WgR7o",tooltipContent:"styles_tooltipContent__qmhxV",labelGroup:"styles_labelGroup__wJsCk"};const On=()=>on(),Gn={top:0,right:0,bottom:20,left:0},qn=300,Yn=20,Bn=()=>{},Ln=e=>{const{width:r=qn,height:i=Yn,margins:o=Gn,domainRange:a,currentSelection:s,tickFormat:l,onChange:c=Bn,onReset:f=Bn,selectedTestsCount:p,totalTestsCount:m,translations:g,transitionDuration:v=300}=e,y=Xn(r-o.left-o.right),_=Xn(i-o.top-o.bottom),[w,x,b]=$n((()=>u().domain(a).range([0,y])));d((()=>{b((()=>u().domain(a).range([0,y])))}),[a,y]);const k=h(null),A=h(null),R=h(null),T=h(null),M=h(null),S=h(null),N=h(c),C=h(f);d((()=>{N.current=c,C.current=f}),[c,f]);const E=h(On().tickFormat((()=>""))),z=h(On().tickPadding(0)),P=h(zn().handleSize(24).on("end",(t=>{if(!t.sourceEvent||!w.current||!N.current)return;if(!(t.selection&&2===t.selection.length)){const[t,e]=w.current.domain();return void N.current(t,e)}const[e,n]=t.selection.map((t=>x.invert(t)));N.current(e,n)})));d((()=>{if(!k.current||!x)return;if(!a||a[1]<=a[0])return;const[t,e]=a,n=(e-t)/6,r=[];for(let e=0;e<7;e++)r.push(t+n*e);if(r[0]=t,r[6]=e,z.current.scale(x).tickFormat(l).tickValues(r),E.current.scale(x).tickSize(-_).tickValues(r),Ht(A.current).attr("transform",`translate(${o.left},${o.top})`),Ht(R.current).exit().transition().duration(v).attr("width",0).attr("height",0),T.current&&(Ht(T.current).attr("transform",`translate(0,${_})`),Ht(T.current).call(E.current)),M.current&&(Ht(M.current).attr("transform",`translate(0,${_})`),Ht(M.current).call(z.current).selectAll("text").attr("y",8)),S.current){const t=Ht(S.current);t.select(".selection").attr("rx",2).attr("ry",2),t.call(P.current.extent([[0,0],[y,_]]));const e=[x(s[0]??a[0]),x(s[1]??a[1])];P.current.move(t,e)}}),[o,x,a,s,l,y,_,v]);const I=(p/m*100).toFixed(2);return t("svg",{ref:k,className:Fn.brusher,width:r,height:i+14,children:t("g",{ref:A,className:Fn.brusherMargins,children:[t("rect",{ref:R,className:Fn.gridBackground}),t("g",{ref:S,className:Fn.brush}),t("g",{className:Fn.axises,children:[t("g",{ref:T,className:Fn.xGrid}),t("g",{ref:M,className:Fn.xAxis}),t("text",{x:y/2,y:60,textAnchor:"middle",className:Fn.durationRangeText,children:g.selected({count:p,percentage:I,minDuration:n(s[0]),maxDuration:n(s[1])})})]})]})})},Hn=e=>{const{segments:r,groupId:i,groupName:o,offsetTime:a}=e,[s,u]=p((()=>{let t=1/0,e=-1/0;const n=r.filter((t=>t.groupId===i));for(const r of n)t=Math.min(t,r.timeRange[0].getTime()),e=Math.max(e,r.timeRange[1].getTime());return[t,e]}),[r,i]);return t("div",{className:Fn.tooltipContent,children:[t("div",{children:o}),t("div",{children:[n(s-a)," — ",n(u-a)]})]})},Wn=w(null),Un=e=>{const{children:n,width:r}=e;return t(Wn.Provider,{value:r,children:n})},Kn=()=>{},Jn=e=>{const{children:n,width:r,onResize:i,debounceResize:o=0}=e,[a]=x(r,o);return d((()=>{i?.(a)}),[a,i]),a>0?t(Un,{width:a,children:n}):null},Qn=e=>{const{children:n,defaultWidth:r=0,onResize:i=Kn,debounceResize:o=0}=e,a=h(null),[s,u]=f(r);return d((()=>{if(!a.current)return;u(a.current.clientWidth);const t=new ResizeObserver((t=>{for(const e of t)u(e.target.clientWidth)}));return t.observe(a.current),()=>t.disconnect()}),[r]),t("div",{ref:a,children:t(Jn,{width:s,onResize:i,debounceResize:o,children:n})})},Zn=e=>{const{segment:r,offsetTime:i}=e;if(!r.id)return null;const o=r.labelGroup.length>1;return t("div",{className:Fn.tooltipContent,children:[o?t("div",{className:Fn.labelGroup,children:r.labelGroup.map(((e,n)=>t(k,{type:"ui",size:"s",bold:!0,children:e},n)))}):t(k,{type:"ui",size:"s",bold:!0,children:r.label}),t("div",{children:[n(r.timeRange[0].getTime()-i)," — ",n(r.timeRange[1].getTime()-i)]})]})},tr=()=>on(),er={top:0,right:0,bottom:20,left:0},nr=300,rr=20,ir=()=>{},or=e=>{const{width:n=nr,height:r=rr,margins:i=er,scale:o,domainRange:a,currentSelection:s,tickFormat:u,onChange:l=ir,onReset:c=ir,transitionDuration:f=300}=e,[p,m,g]=$n((()=>o.copy()));d((()=>{g((()=>p.current.domain()===o.domain()&&p.current.range()===o.range()?p.current:o.copy()))}),[o]);const v=Xn(n-i.left-i.right),y=Xn(r-i.top-i.bottom);d((()=>{g((()=>o.copy().domain(a??[]).range([0,v])))}),[a,v,o]);const _=h(null),w=h(null),x=h(null),b=h(null),k=h(null),A=h(null),R=h(l),T=h(c),M=h(tr().tickFormat((()=>""))),S=h(tr().tickPadding(0)),N=h(zn().handleSize(24).on("end",(t=>{if(!t.sourceEvent||!p.current||!R.current)return;if(!(t.selection&&2===t.selection.length)){const[t,e]=p.current.domain();return void R.current(t,e)}const[e,n]=t.selection.map((t=>p.current.invert(t)));R.current(e,n)})));return d((()=>{R.current=l,T.current=c}),[l,c]),d((()=>{if(_.current&&m&&a&&!(a[1]<=a[0])&&(S.current.scale(m).tickFormat(u),M.current.scale(m).tickSize(-y),M.current.ticks(7),Ht(w.current).attr("transform",`translate(${i.left},${i.top})`),Ht(x.current).transition().duration(f).attr("width",String(v)).attr("height",String(y)),b.current&&(Ht(b.current).attr("transform",`translate(0,${y})`),Ht(b.current).call(M.current)),k.current&&(Ht(k.current).attr("transform",`translate(0,${y})`),Ht(k.current).call(S.current).selectAll("text").attr("y",8)),A.current)){const t=Ht(A.current);t.select(".selection").attr("rx",2).attr("ry",2),t.call(N.current.extent([[0,0],[v,y]]));const e=[m(s?.[0]??a[0].getTime()),m(s?.[1]??a[1].getTime())];N.current.move(t,e)}}),[v,y,i,a,s,u,m,f]),t("svg",{ref:_,className:Fn.brusher,width:n,height:r,children:t("g",{ref:w,className:Fn.brusherMargins,children:[t("rect",{ref:x,className:Fn.gridBackground}),t("g",{ref:A,className:Fn.brush}),t("g",{className:Fn.axises,children:[t("g",{ref:b,className:Fn.xGrid}),t("g",{ref:k,className:Fn.xAxis})]})]})})};Ht.prototype.transition=Be;const ar=t=>{const e={failed:"var(--timeline-status-failed, var(--color-status-failed-chart))",broken:"var(--timeline-status-broken, var(--color-status-broken-chart))",passed:"var(--timeline-status-passed, var(--color-status-passed-chart))",skipped:"var(--timeline-status-skipped, var(--color-status-skipped-chart))",unknown:"var(--timeline-status-unknown, var(--color-status-unknown-chart))"};return e[t]||e.unknown},sr=t=>{const e={failed:"var(--color-status-failed-text)",broken:"var(--color-status-broken-text)",passed:"var(--color-status-passed-text)",skipped:"var(--color-status-skipped-text)",unknown:"var(--color-status-unknown-text)"};return e[t]||e.unknown},ur=t=>{if(t>=20)return 4;if(t<4)return 0;const e=(t-4)/16;return 4*(e*(2-e))},lr=100,cr=100,fr=26,hr=20,dr=r=>{const{data:i=[],translations:o,onTestResultClick:a}=r,s=v(),{durationRange:u,handleDurationChange:w,durationDomain:x}=(t=>{const e=p((()=>{const e=t.reduce(((t,e)=>{const n=e.segments.map((t=>t.val));return{min:Math.min(t.min,...n),max:Math.max(t.max,...n)}}),{min:1/0,max:-1/0});return[e.min,e.max]}),[t]),[n,r]=f(e[0]),[i,o]=f(e[1]);d((()=>{r(e[0])}),[e[0]]),d((()=>{o(e[1])}),[e[1]]);const a=m(((t,e)=>{r(t),o(e)}),[]);return{durationRange:[n,i],handleDurationChange:a,durationDomain:e}})(i),k=(()=>{const t=g(Wn);if(!t)throw new Error("useWidth must be used within a ResponsiveWrapper");return t})(),T=h(null),M=h(null),S=h(null),N=h(null),C=h(null),E=h(null),[z,V,D]=$n((()=>R())),[$,j,X]=$n((()=>b())),F=h(on()),O=h(Vn()),G=h(Dn()),{tooltipRef:q,isVisible:Y,handleShowTooltip:B,handleHideTooltip:L,data:H}=_("bottom"),{tooltipRef:W,isVisible:U,handleShowTooltip:K,handleHideTooltip:J,data:Q}=_("bottom"),Z=y?0:500,tt=y?0:150,et=h(!1),nt=i.length,rt=Xn(k-lr-cr),it=Xn(24*nt),ot=it+fr+30,at=p((()=>{const t=[];for(const e of i)for(const n of e.segments)t.push({groupId:e.id,groupName:e.name,label:n.label,labelGroup:n.labelGroup,timeRange:n.timeRange,isRetry:n.isRetry,val:n.val,labelVal:n.val,segment:n,id:n.id});return t}),[i]),st=p((()=>i.map((t=>({id:t.id,name:t.name})))),[i]),ut=p((()=>[I(at,(t=>t.timeRange[0])),P(at,(t=>t.timeRange[1]))]),[at]),[lt,ct]=f(ut),[ft,ht]=f([null,null]),dt=m((t=>{ct((e=>((t,e)=>{if(!t&&!e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;const n=t?.[0]?.getTime()??void 0,r=t?.[1]?.getTime()??void 0,i=e?.[0]?.getTime()??void 0,o=e?.[1]?.getTime()??void 0;return n===i&&r===o})(e,t)?e:t))}),[]),pt=m((t=>{ht((e=>((t,e)=>{if(!t&&!e)return!0;if(!t&&e)return!1;if(t&&!e)return!1;const n=t?.[0]??void 0,r=t?.[1]??void 0;return n===(e?.[0]??void 0)&&r===(e?.[1]??void 0)})(e,t)?e:t))}),[]),[mt,gt,vt]=$n((()=>A().domain(ut).range([0,rt]).clamp(!0)));d((()=>{vt((()=>mt.current.copy().domain(ut))),dt(ut)}),[...ut,dt]),d((()=>{vt((()=>mt.current.copy().range([0,rt]).clamp(!0)))}),[rt]);const yt=p((()=>[I(at,(t=>t.timeRange[0])),P(at,(t=>t.timeRange[1]))]),[at]);d((()=>{if(!T.current)return;const t=t=>{const{zoomX:e,zoomY:n}=t.detail;e&&dt(e),n&&pt(n)};if(T.current?.addEventListener("zoom",t),!M.current)return;const e=Ht(M.current),n=t=>Wt(t,M.current);return e.on("mousedown",(t=>{if(null!=Ht(window).on("mousemove.zoomRect"))return;const r=n(t);if(r[0]<0||r[0]>rt||r[1]<0||r[1]>it)return;et.current=!0;const i=e.append("rect").attr("class",Fn.zoomSelection);Ht(window).on("mousemove.zoomRect",(t=>{t.stopPropagation();const e=n(t),o=[Math.max(0,Math.min(rt,e[0])),Math.max(0,Math.min(it,e[1]))];i.attr("x",Math.min(r[0],o[0])).attr("y",Math.min(r[1],o[1])).attr("width",Math.abs(o[0]-r[0])).attr("height",Math.abs(o[1]-r[1]))})).on("mouseup.zoomRect",(t=>{Ht(window).on("mousemove.zoomRect",null).on("mouseup.zoomRect",null),i.remove(),et.current=!1;const e=n(t),o=[Math.max(0,Math.min(rt,e[0])),Math.max(0,Math.min(it,e[1]))];if(r[0]===o[0]&&r[1]===o[1])return;const a=[r[0],o[0]].sort(l).map((t=>mt.current.invert(t)));a[1].getTime()-a[0].getTime()>10&&T.current?.dispatchEvent(new In({zoomX:a,zoomY:null}))}),!0),t.stopPropagation()})),()=>{T.current?.removeEventListener("zoom",t)}}),[rt,it,ft,at,dt,pt,j]),d((()=>{const t=lt?.[0]&&lt?.[1]?lt:ut;vt((()=>mt.current.copy().domain(t).range([0,rt]).clamp(!0)))}),[lt,ut,rt]),d((()=>{G.current.scale(j)}),[j,st]),d((()=>{X((()=>$.current.copy().domain(st.map((t=>t.id))).range(st.map(((t,e)=>(e+.5)/nt*it)))))}),[st,nt,it]),d((()=>{D((()=>z.current.copy().domain(st.map((t=>t.id))).range([it/st.length*.5,it*(1-.5/st.length)])))}),[st,it,nt]),d((()=>{if(!(T.current&&gt&&0!==it&&N.current&&C.current))return;const[t,e]=gt.range();if(t===e)return;F.current.scale(gt),F.current.ticks(7),F.current.tickFormat((t=>yt[0]?n(t.getTime()-yt[0].getTime()):"")),O.current.scale(gt).ticks(7).tickFormat((()=>""));Ht(N.current).style("stroke-opacity",0).style("fill-opacity",0).attr("transform",`translate(0,${it})`).transition().duration(Z).call(F.current).style("stroke-opacity",1).style("fill-opacity",1),O.current.tickSize(it),Ht(C.current).attr("transform",`translate(0,${it})`).transition().duration(Z).call(O.current);const r=Math.ceil(2*nt/Math.sqrt(2)/it/.6),i=z.current.domain().filter(((t,e)=>!(e%r)));let o=Math.min(12,it/i.length*.6*Math.sqrt(2)),a=Math.ceil(cr/(o/Math.sqrt(2)));const s=j.range(),u=I(s,((t,e)=>e>0?t-s[e-1]:2*t));o=Math.min(14,.6*Xn(u)*Math.sqrt(2)),a=Math.floor(lr/(o/Math.sqrt(2))),G.current.tickFormat((t=>{const e=st.find((e=>e.id===t)),n=e?.name??"";return n.length<=a?n:`${n.substring(0,2*a/3)}...${n.substring(n.length-a/3,n.length)}`})),Ht(E.current).transition().duration(Z).style("font-size",`${o}px`).call(G.current),Ht(E.current).selectAll(".tick").each((function(t){const e=t,n=st.find((t=>t.id===e));n&&Ht(this).select("text").on("mouseover",(t=>{B(t.target,n)})).on("mouseout",(t=>{L(t.target)}))}))}),[rt,it,nt,Z,yt,gt,j,st,B,L]),d((()=>{if(!M.current||0===it)return;const t=Ht(M.current).selectAll(`rect.${Fn.group}`).data(st,(t=>t.id));t.exit().transition().duration(Z).style("stroke-opacity",0).style("fill-opacity",0).remove();const e=t.enter().append("rect").attr("class",Fn.group).attr("x",0).attr("y",0).attr("height",0).attr("fill","none").style("fill-opacity",0).style("stroke-opacity",0);t.merge(e).transition().duration(Z).attr("width",rt).attr("height",it/nt).attr("y",(t=>{const e=j(t.id);return Number.isInteger(e)?e-it/nt/2:0})).style("fill-opacity",1).style("stroke-opacity",1)}),[st,rt,it,nt,Z,j,B,L]);const[_t,wt]=u,xt=p((()=>at.filter((t=>{if(-1===j.domain().indexOf(t.groupId))return!1;const e=t.val;return!(e<_t||e>wt)})).length),[j,at,_t,wt]),bt=p((()=>at.filter((t=>{if(-1===j.domain().indexOf(t.groupId))return!1;const e=t.val;if(e<_t||e>wt)return!1;const[n,r]=gt.domain(),[i,o]=t.timeRange;return!(o<n||i>r)}))),[j,gt,at,_t,wt]);d((()=>{if(!M.current||0===it||!gt)return;(async()=>{const t=Ht(M.current);let e=t.selectAll(`rect.${Fn.segment}`).data(bt,(t=>t.id));if(0===bt.length)return void e.exit().remove();e.exit().transition().duration(Z).style("fill-opacity",0).remove();const n=e.enter().append("rect").attr("class",Fn.segment).attr("data-testid","timeline-segment").attr("data-test-result-id",(t=>t.segment.testResultId)).attr("data-test-result-name",(t=>t.segment.label)).attr("rx",1).attr("ry",1).attr("x",(t=>gt(t.timeRange[0]))).attr("y",(t=>(V(t.groupId)||0)-10)).attr("width",0).attr("height",0).style("fill",(t=>ar(t.segment.status))).style("fill-opacity",0);n.on("mouseover",(function(t,e){if(et.current)return;Ht(this).transition().duration(tt).attr("x",mt.current(e.timeRange[0])-1).attr("width",P([2,mt.current(e.timeRange[1])-mt.current(e.timeRange[0])])+2).attr("y",(z.current(e.groupId)||0)-11).attr("height",22).style("fill-opacity",1),K(t.target,e)})).on("mouseout",(function(t,e){if(et.current)return;const n=mt.current(e.timeRange[1])-mt.current(e.timeRange[0]);Ht(this).transition().duration(tt).attr("x",mt.current(e.timeRange[0])).attr("width",P([2,n])??0).attr("y",(z.current(e.groupId)??0)-10).attr("height",hr).style("fill-opacity",1),J(t.target)})),e=e.merge(n),e.on("click",((t,e)=>{a?.(e.segment.testResultId)})).attr("rx",(t=>{const e=gt(t.timeRange[1])-gt(t.timeRange[0]);return ur(e)})).attr("ry",(t=>{const e=gt(t.timeRange[1])-gt(t.timeRange[0]);return ur(e)})).attr("stroke-width",(t=>gt(t.timeRange[1])-gt(t.timeRange[0])>=12?.5:.1)).attr("stroke","var(--timeline-bg, #ffffff)").attr("height",hr),e.transition().duration(Z).attr("x",(t=>gt(t.timeRange[0]))).attr("y",(t=>(V(t.groupId)||0)-10)).attr("width",(t=>{const e=P([2,(gt(t.timeRange[1])??0)-(gt(t.timeRange[0])??0)]);return(e??0)<0?0:e??0})).attr("height",hr).style("fill",(t=>t.isRetry?`url(#gradient-${s}-${t.segment.status})`:ar(t.segment.status))).style("fill-opacity",1)})()}),[bt,rt,it,Z,lt,gt,tt,V,s,a]),d((()=>{T.current&&Ht(T.current).transition().duration(Z).attr("width",k).attr("height",ot)}),[k,ot,Z]);const kt=m(((t,e)=>dt([t,e])),[dt]),[At,Rt]=gt.range(),Tt=At!==Rt;return Tt?t("div",{className:Fn.timelineChart,children:[x[0]!==x[1]&&Tt&&t(Ln,{selectedTestsCount:xt,totalTestsCount:at.length,translations:o,width:k,height:76,margins:{top:fr,right:cr,bottom:30,left:lr},domainRange:x,currentSelection:[_t,wt],onChange:w,onReset:()=>w(x[0],x[1]),tickFormat:t=>n(t)},k),t("svg",{ref:T,width:k,height:ot,children:[t("defs",{children:e.map((e=>t("pattern",{id:`gradient-${s}-${e}`,patternUnits:"userSpaceOnUse",width:"10",height:"10",patternTransform:"rotate(-45 5 5)",children:[t("rect",{width:"5",height:"10",fill:sr(e)}),t("rect",{x:"5",width:"5",height:"10",fill:ar(e)})]},e)))}),t("g",{ref:S,className:Fn.axises,"data-label":"axises",transform:"translate(100,26)",children:[t("g",{ref:N,className:Fn.xAxis,"data-label":"x-axis"}),t("g",{ref:C,className:Fn.xGrid,"data-label":"grid"}),t("g",{ref:E,className:Fn.groupAxis,"data-label":"groups-axis"})]}),t("g",{ref:M,"data-label":"graph",transform:"translate(100,26)",children:t("rect",{"data-label":"graph-selection",x:0,y:0,width:rt,height:it,fill:"transparent"})})]}),ut[0].getTime()!==ut[1].getTime()&&Tt&&t(or,{width:k,height:76,margins:{top:fr,right:cr,bottom:30,left:lr},scale:gt,domainRange:ut,currentSelection:lt,onChange:kt,onReset:()=>dt(ut),tickFormat:t=>n(t.getTime()-yt[0].getTime())}),c(t("div",{ref:q,"data-visible":Y,className:Fn.tooltip,children:H?.id&&t(Hn,{segments:bt,groupId:H.id,groupName:H.name,offsetTime:yt[0].getTime()})}),document.body),c(t("div",{ref:W,"data-visible":U,className:Fn.tooltip,children:Q&&t(Zn,{segment:Q,offsetTime:yt[0].getTime()})}),document.body)]}):null},pr=e=>{const{data:n,width:r,dataId:i,...o}=e,a=p((()=>((t,e)=>{const n=[];for(const r of t){const{host:t,thread:i,id:o,start:a,duration:s,status:u,isRetry:l,name:c}=r,f=a+s,h=Pn(t,e),d=Pn(i,h),p=n.find((({id:t})=>t===d)),m=p?.segments??[],g=o,v=-1!==m.findIndex((({id:t})=>t===g)),y=m.find((({timeRange:t})=>t[0].getTime()===a&&t[1].getTime()===f));v||y||m.push({label:c,labelGroup:[c],timeRange:[new Date(a),new Date(f)],val:s,status:u,id:g,testResultId:o,isRetry:l}),!v&&y&&y.labelGroup.push(r.name),p?p.segments=m:n.push({id:d,name:i,segments:m})}return n})(n,i)),[n,i]);return t("div",{className:Fn.timelineContainer,children:t(Qn,{defaultWidth:r,children:t(dr,{...o,data:a},i)})})};export{pr as T};
2
+ //# sourceMappingURL=Timeline-BWVXDTn-.js.map